var futureBooks =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// install a JSONP callback for chunk loading
/******/ 	function webpackJsonpCallback(data) {
/******/ 		var chunkIds = data[0];
/******/ 		var moreModules = data[1];
/******/
/******/
/******/ 		// add "moreModules" to the modules object,
/******/ 		// then flag all "chunkIds" as loaded and fire callback
/******/ 		var moduleId, chunkId, i = 0, resolves = [];
/******/ 		for(;i < chunkIds.length; i++) {
/******/ 			chunkId = chunkIds[i];
/******/ 			if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 				resolves.push(installedChunks[chunkId][0]);
/******/ 			}
/******/ 			installedChunks[chunkId] = 0;
/******/ 		}
/******/ 		for(moduleId in moreModules) {
/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ 				modules[moduleId] = moreModules[moduleId];
/******/ 			}
/******/ 		}
/******/ 		if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ 		while(resolves.length) {
/******/ 			resolves.shift()();
/******/ 		}
/******/
/******/ 	};
/******/
/******/
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// object to store loaded CSS chunks
/******/ 	var installedCssChunks = {
/******/ 		"Book": 0
/******/ 	}
/******/
/******/ 	// object to store loaded and loading chunks
/******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 	// Promise = chunk loading, 0 = chunk loaded
/******/ 	var installedChunks = {
/******/ 		"Book": 0
/******/ 	};
/******/
/******/
/******/
/******/ 	// script path function
/******/ 	function jsonpScriptSrc(chunkId) {
/******/ 		return __webpack_require__.p + "" + chunkId + ".book.js"
/******/ 	}
/******/
/******/ 	// 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;
/******/ 	}
/******/
/******/ 	// This file contains only the entry chunk.
/******/ 	// The chunk loading function for additional chunks
/******/ 	__webpack_require__.e = function requireEnsure(chunkId) {
/******/ 		var promises = [];
/******/
/******/
/******/ 		// mini-css-extract-plugin CSS loading
/******/ 		var cssChunks = {"ac01":1,"ac02":1};
/******/ 		if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
/******/ 		else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
/******/ 			promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
/******/ 				var href = "" + chunkId + ".app.css";
/******/ 				var fullhref = __webpack_require__.p + href;
/******/ 				var existingLinkTags = document.getElementsByTagName("link");
/******/ 				for(var i = 0; i < existingLinkTags.length; i++) {
/******/ 					var tag = existingLinkTags[i];
/******/ 					var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
/******/ 					if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
/******/ 				}
/******/ 				var existingStyleTags = document.getElementsByTagName("style");
/******/ 				for(var i = 0; i < existingStyleTags.length; i++) {
/******/ 					var tag = existingStyleTags[i];
/******/ 					var dataHref = tag.getAttribute("data-href");
/******/ 					if(dataHref === href || dataHref === fullhref) return resolve();
/******/ 				}
/******/ 				var linkTag = document.createElement("link");
/******/ 				linkTag.rel = "stylesheet";
/******/ 				linkTag.type = "text/css";
/******/ 				linkTag.onload = resolve;
/******/ 				linkTag.onerror = function(event) {
/******/ 					var request = event && event.target && event.target.src || fullhref;
/******/ 					var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
/******/ 					err.request = request;
/******/ 					delete installedCssChunks[chunkId]
/******/ 					linkTag.parentNode.removeChild(linkTag)
/******/ 					reject(err);
/******/ 				};
/******/ 				linkTag.href = fullhref;
/******/ 				var head = document.getElementsByTagName("head")[0];
/******/ 				head.appendChild(linkTag);
/******/ 			}).then(function() {
/******/ 				installedCssChunks[chunkId] = 0;
/******/ 			}));
/******/ 		}
/******/
/******/ 		// JSONP chunk loading for javascript
/******/
/******/ 		var installedChunkData = installedChunks[chunkId];
/******/ 		if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ 			// a Promise means "currently loading".
/******/ 			if(installedChunkData) {
/******/ 				promises.push(installedChunkData[2]);
/******/ 			} else {
/******/ 				// setup Promise in chunk cache
/******/ 				var promise = new Promise(function(resolve, reject) {
/******/ 					installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ 				});
/******/ 				promises.push(installedChunkData[2] = promise);
/******/
/******/ 				// start chunk loading
/******/ 				var script = document.createElement('script');
/******/ 				var onScriptComplete;
/******/
/******/ 				script.charset = 'utf-8';
/******/ 				script.timeout = 120;
/******/ 				if (__webpack_require__.nc) {
/******/ 					script.setAttribute("nonce", __webpack_require__.nc);
/******/ 				}
/******/ 				script.src = jsonpScriptSrc(chunkId);
/******/
/******/ 				// create error before stack unwound to get useful stacktrace later
/******/ 				var error = new Error();
/******/ 				onScriptComplete = function (event) {
/******/ 					// avoid mem leaks in IE.
/******/ 					script.onerror = script.onload = null;
/******/ 					clearTimeout(timeout);
/******/ 					var chunk = installedChunks[chunkId];
/******/ 					if(chunk !== 0) {
/******/ 						if(chunk) {
/******/ 							var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ 							var realSrc = event && event.target && event.target.src;
/******/ 							error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ 							error.name = 'ChunkLoadError';
/******/ 							error.type = errorType;
/******/ 							error.request = realSrc;
/******/ 							chunk[1](error);
/******/ 						}
/******/ 						installedChunks[chunkId] = undefined;
/******/ 					}
/******/ 				};
/******/ 				var timeout = setTimeout(function(){
/******/ 					onScriptComplete({ type: 'timeout', target: script });
/******/ 				}, 120000);
/******/ 				script.onerror = script.onload = onScriptComplete;
/******/ 				document.head.appendChild(script);
/******/ 			}
/******/ 		}
/******/ 		return Promise.all(promises);
/******/ 	};
/******/
/******/ 	// 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 = "";
/******/
/******/ 	// on error function for async loading
/******/ 	__webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ 	var jsonpArray = window["webpackJsonpfutureBooks"] = window["webpackJsonpfutureBooks"] || [];
/******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ 	jsonpArray.push = webpackJsonpCallback;
/******/ 	jsonpArray = jsonpArray.slice();
/******/ 	for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ 	var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/core/core.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/arrayWithHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/assertThisInitialized.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/asyncToGenerator.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/classCallCheck.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/construct.js":
/*!**********************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ \"./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n  if (isNativeReflectConstruct()) {\n    module.exports = _construct = Reflect.construct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  } else {\n    module.exports = _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) setPrototypeOf(instance, Class.prototype);\n      return instance;\n    }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  }\n\n  return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/construct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/createClass.js":
/*!************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/createClass.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/defineProperty.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/extends.js":
/*!********************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/extends.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _extends() {\n  module.exports = _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/extends.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/get.js":
/*!****************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/get.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var superPropBase = __webpack_require__(/*! ./superPropBase.js */ \"./node_modules/@babel/runtime/helpers/superPropBase.js\");\n\nfunction _get() {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  } else {\n    module.exports = _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(arguments.length < 3 ? target : receiver);\n      }\n\n      return desc.value;\n    }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  }\n\n  return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/get.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/getPrototypeOf.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
/*!*********************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/inherits.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/inheritsLoose.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/inheritsLoose.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/inheritsLoose.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/isNativeFunction.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/isNativeFunction.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/iterableToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n\n  var _s, _e;\n\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/nonIterableRest.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/nonIterableSpread.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n\n  return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/readOnlyError.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/readOnlyError.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _readOnlyError(name) {\n  throw new TypeError(\"\\\"\" + name + \"\\\" is read-only\");\n}\n\nmodule.exports = _readOnlyError, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/readOnlyError.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/setPrototypeOf.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/slicedToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/superPropBase.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/superPropBase.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/superPropBase.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\n\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/toConsumableArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
/*!*******************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/typeof.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n\nvar setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ \"./node_modules/@babel/runtime/helpers/isNativeFunction.js\");\n\nvar construct = __webpack_require__(/*! ./construct.js */ \"./node_modules/@babel/runtime/helpers/construct.js\");\n\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n  module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !isNativeFunction(Class)) return Class;\n\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n\n      _cache.set(Class, Wrapper);\n    }\n\n    function Wrapper() {\n      return construct(Class, arguments, getPrototypeOf(this).constructor);\n    }\n\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return setPrototypeOf(Wrapper, Class);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/helpers/wrapNativeSuper.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n  defineProperty(\n    GeneratorFunctionPrototype,\n    \"constructor\",\n    { value: GeneratorFunction, configurable: true }\n  );\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    defineProperty(this, \"_invoke\", { value: enqueue });\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var methodName = context.method;\n    var method = delegate.iterator[methodName];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method, or a missing .next mehtod, always terminate the\n      // yield* loop.\n      context.delegate = null;\n\n      // Note: [\"return\"] must be used for ES3 parsing compatibility.\n      if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n        // If the delegate iterator has a return method, give it a\n        // chance to clean up.\n        context.method = \"return\";\n        context.arg = undefined;\n        maybeInvokeDelegate(delegate, context);\n\n        if (context.method === \"throw\") {\n          // If maybeInvokeDelegate(context) changed context.method from\n          // \"return\" to \"throw\", let that override the TypeError below.\n          return ContinueSentinel;\n        }\n      }\n      if (methodName !== \"return\") {\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a '\" + methodName + \"' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(val) {\n    var object = Object(val);\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n   true ? module.exports : undefined\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/regenerator/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! regenerator-runtime */ \"./node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@babel/runtime/regenerator/index.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js":
/*!************************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/byte-helpers.js ***!
  \************************************************************/
/*! exports provided: countBits, countBytes, padStart, isArrayBufferView, isTypedArray, toUint8, toHexString, toBinaryString, ENDIANNESS, IS_BIG_ENDIAN, IS_LITTLE_ENDIAN, bytesToNumber, numberToBytes, bytesToString, stringToBytes, concatTypedArrays, bytesMatch, sliceBytes, reverseBytes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"countBits\", function() { return countBits; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"countBytes\", function() { return countBytes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"padStart\", function() { return padStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isArrayBufferView\", function() { return isArrayBufferView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return isTypedArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toUint8\", function() { return toUint8; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toHexString\", function() { return toHexString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toBinaryString\", function() { return toBinaryString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENDIANNESS\", function() { return ENDIANNESS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IS_BIG_ENDIAN\", function() { return IS_BIG_ENDIAN; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IS_LITTLE_ENDIAN\", function() { return IS_LITTLE_ENDIAN; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bytesToNumber\", function() { return bytesToNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"numberToBytes\", function() { return numberToBytes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bytesToString\", function() { return bytesToString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stringToBytes\", function() { return stringToBytes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"concatTypedArrays\", function() { return concatTypedArrays; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bytesMatch\", function() { return bytesMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sliceBytes\", function() { return sliceBytes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reverseBytes\", function() { return reverseBytes; });\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\n // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n  var acc = '';\n\n  while (len--) {\n    acc += str;\n  }\n\n  return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nvar countBits = function countBits(x) {\n  return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nvar countBytes = function countBytes(x) {\n  return Math.ceil(countBits(x) / 8);\n};\nvar padStart = function padStart(b, len, str) {\n  if (str === void 0) {\n    str = ' ';\n  }\n\n  return (repeat(str, len) + b.toString()).slice(-len);\n};\nvar isArrayBufferView = function isArrayBufferView(obj) {\n  if (ArrayBuffer.isView === 'function') {\n    return ArrayBuffer.isView(obj);\n  }\n\n  return obj && obj.buffer instanceof ArrayBuffer;\n};\nvar isTypedArray = function isTypedArray(obj) {\n  return isArrayBufferView(obj);\n};\nvar toUint8 = function toUint8(bytes) {\n  if (bytes instanceof Uint8Array) {\n    return bytes;\n  }\n\n  if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n    // any non-number or NaN leads to empty uint8array\n    // eslint-disable-next-line\n    if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n      bytes = 0;\n    } else {\n      bytes = [bytes];\n    }\n  }\n\n  return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nvar toHexString = function toHexString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(16), 2, '0');\n  }\n\n  return str;\n};\nvar toBinaryString = function toBinaryString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(2), 8, '0');\n  }\n\n  return str;\n};\nvar BigInt = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nvar ENDIANNESS = function () {\n  var a = new Uint16Array([0xFFCC]);\n  var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n  if (b[0] === 0xFF) {\n    return 'big';\n  }\n\n  if (b[0] === 0xCC) {\n    return 'little';\n  }\n\n  return 'unknown';\n}();\nvar IS_BIG_ENDIAN = ENDIANNESS === 'big';\nvar IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nvar bytesToNumber = function bytesToNumber(bytes, _temp) {\n  var _ref = _temp === void 0 ? {} : _temp,\n      _ref$signed = _ref.signed,\n      signed = _ref$signed === void 0 ? false : _ref$signed,\n      _ref$le = _ref.le,\n      le = _ref$le === void 0 ? false : _ref$le;\n\n  bytes = toUint8(bytes);\n  var fn = le ? 'reduce' : 'reduceRight';\n  var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n  var number = obj.call(bytes, function (total, byte, i) {\n    var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n    return total + BigInt(byte) * BYTE_TABLE[exponent];\n  }, BigInt(0));\n\n  if (signed) {\n    var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n    number = BigInt(number);\n\n    if (number > max) {\n      number -= max;\n      number -= max;\n      number -= BigInt(2);\n    }\n  }\n\n  return Number(number);\n};\nvar numberToBytes = function numberToBytes(number, _temp2) {\n  var _ref2 = _temp2 === void 0 ? {} : _temp2,\n      _ref2$le = _ref2.le,\n      le = _ref2$le === void 0 ? false : _ref2$le;\n\n  // eslint-disable-next-line\n  if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n    number = 0;\n  }\n\n  number = BigInt(number);\n  var byteCount = countBytes(number);\n  var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n  for (var i = 0; i < byteCount; i++) {\n    var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n    bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n    if (number < 0) {\n      bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n      bytes[byteIndex] -= i === 0 ? 1 : 2;\n    }\n  }\n\n  return bytes;\n};\nvar bytesToString = function bytesToString(bytes) {\n  if (!bytes) {\n    return '';\n  } // TODO: should toUint8 handle cases where we only have 8 bytes\n  // but report more since this is a Uint16+ Array?\n\n\n  bytes = Array.prototype.slice.call(bytes);\n  var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n  try {\n    return decodeURIComponent(escape(string));\n  } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n    // or full non string data. Just return the potentially garbled string.\n  }\n\n  return string;\n};\nvar stringToBytes = function stringToBytes(string, stringIsBytes) {\n  if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n    string = string.toString();\n  }\n\n  if (typeof string !== 'string') {\n    return new Uint8Array();\n  } // If the string already is bytes, we don't have to do this\n  // otherwise we do this so that we split multi length characters\n  // into individual bytes\n\n\n  if (!stringIsBytes) {\n    string = unescape(encodeURIComponent(string));\n  }\n\n  var view = new Uint8Array(string.length);\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n\n  return view;\n};\nvar concatTypedArrays = function concatTypedArrays() {\n  for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n    buffers[_key] = arguments[_key];\n  }\n\n  buffers = buffers.filter(function (b) {\n    return b && (b.byteLength || b.length) && typeof b !== 'string';\n  });\n\n  if (buffers.length <= 1) {\n    // for 0 length we will return empty uint8\n    // for 1 length we return the first uint8\n    return toUint8(buffers[0]);\n  }\n\n  var totalLen = buffers.reduce(function (total, buf, i) {\n    return total + (buf.byteLength || buf.length);\n  }, 0);\n  var tempBuffer = new Uint8Array(totalLen);\n  var offset = 0;\n  buffers.forEach(function (buf) {\n    buf = toUint8(buf);\n    tempBuffer.set(buf, offset);\n    offset += buf.byteLength;\n  });\n  return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n *        Bytes to check in\n *\n * @param {Uint8Array|Array} b\n *        Bytes to check for\n *\n * @param {Object} options\n *        options\n *\n * @param {Array|Uint8Array} [offset=0]\n *        offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n *        mask to use on bytes before comparison.\n *\n * @return {boolean}\n *         If all bytes in b are inside of a, taking into account\n *         bit masks.\n */\n\nvar bytesMatch = function bytesMatch(a, b, _temp3) {\n  var _ref3 = _temp3 === void 0 ? {} : _temp3,\n      _ref3$offset = _ref3.offset,\n      offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n      _ref3$mask = _ref3.mask,\n      mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n  a = toUint8(a);\n  b = toUint8(b); // ie 11 does not support uint8 every\n\n  var fn = b.every ? b.every : Array.prototype.every;\n  return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n  fn.call(b, function (bByte, i) {\n    var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n    return bByte === aByte;\n  });\n};\nvar sliceBytes = function sliceBytes(src, start, end) {\n  if (Uint8Array.prototype.slice) {\n    return Uint8Array.prototype.slice.call(src, start, end);\n  }\n\n  return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nvar reverseBytes = function reverseBytes(src) {\n  if (src.reverse) {\n    return src.reverse();\n  }\n\n  return Array.prototype.reverse.call(src);\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/byte-helpers.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/codecs.js":
/*!******************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/codecs.js ***!
  \******************************************************/
/*! exports provided: translateLegacyCodec, translateLegacyCodecs, mapLegacyAvcCodecs, parseCodecs, codecsFromDefault, isVideoCodec, isAudioCodec, isTextCodec, getMimeForCodec, browserSupportsCodec, muxerSupportsCodec, DEFAULT_AUDIO_CODEC, DEFAULT_VIDEO_CODEC */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translateLegacyCodec\", function() { return translateLegacyCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"translateLegacyCodecs\", function() { return translateLegacyCodecs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mapLegacyAvcCodecs\", function() { return mapLegacyAvcCodecs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCodecs\", function() { return parseCodecs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"codecsFromDefault\", function() { return codecsFromDefault; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isVideoCodec\", function() { return isVideoCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAudioCodec\", function() { return isAudioCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isTextCodec\", function() { return isTextCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMimeForCodec\", function() { return getMimeForCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"browserSupportsCodec\", function() { return browserSupportsCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"muxerSupportsCodec\", function() { return muxerSupportsCodec; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_AUDIO_CODEC\", function() { return DEFAULT_AUDIO_CODEC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_VIDEO_CODEC\", function() { return DEFAULT_VIDEO_CODEC; });\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\n\nvar regexs = {\n  // to determine mime types\n  mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n  webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n  ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n  // to determine if a codec is audio or video\n  video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n  audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n  text: /^(stpp.ttml.im1t)/,\n  // mux.js support regex\n  muxerVideo: /^(avc0?1)/,\n  muxerAudio: /^(mp4a)/,\n  // match nothing as muxer does not support text right now.\n  // there cannot never be a character before the start of a string\n  // so this matches nothing.\n  muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {string} codec\n *        Codec string to translate\n * @return {string}\n *         The translated codec string\n */\n\nvar translateLegacyCodec = function translateLegacyCodec(codec) {\n  if (!codec) {\n    return codec;\n  }\n\n  return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n    var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n    var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n    return 'avc1.' + profileHex + '00' + avcLevelHex;\n  });\n};\n/**\n * Replace the old apple-style `avc1.<dd>.<dd>` codec strings with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {string[]} codecs\n *        An array of codec strings to translate\n * @return {string[]}\n *         The translated array of codec strings\n */\n\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n  return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\n *\n * @param {string} codecString\n *        The codec string\n * @return {string}\n *         The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nvar mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n  return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n    return translateLegacyCodecs([match])[0];\n  });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n *           Number of codecs parsed\n * @property {string} [videoCodec]\n *           Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n *           Video object type indicator (if found)\n * @property {string|null} audioProfile\n *           Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n *        The codec string to parse\n * @return {ParsedCodecInfo}\n *         Parsed codec info\n */\n\nvar parseCodecs = function parseCodecs(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  var codecs = codecString.split(',');\n  var result = [];\n  codecs.forEach(function (codec) {\n    codec = codec.trim();\n    var codecType;\n    mediaTypes.forEach(function (name) {\n      var match = regexs[name].exec(codec.toLowerCase());\n\n      if (!match || match.length <= 1) {\n        return;\n      }\n\n      codecType = name; // maintain codec case\n\n      var type = codec.substring(0, match[1].length);\n      var details = codec.replace(type, '');\n      result.push({\n        type: type,\n        details: details,\n        mediaType: name\n      });\n    });\n\n    if (!codecType) {\n      result.push({\n        type: codec,\n        details: '',\n        mediaType: 'unknown'\n      });\n    }\n  });\n  return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n *        The master playlist\n * @param {string} audioGroupId\n *        ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n *         Parsed codec info\n */\n\nvar codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n  if (!master.mediaGroups.AUDIO || !audioGroupId) {\n    return null;\n  }\n\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n  if (!audioGroup) {\n    return null;\n  }\n\n  for (var name in audioGroup) {\n    var audioType = audioGroup[name];\n\n    if (audioType.default && audioType.playlists) {\n      // codec should be the same for all playlists within the audio type\n      return parseCodecs(audioType.playlists[0].attributes.CODECS);\n    }\n  }\n\n  return null;\n};\nvar isVideoCodec = function isVideoCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.video.test(codec.trim().toLowerCase());\n};\nvar isAudioCodec = function isAudioCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.audio.test(codec.trim().toLowerCase());\n};\nvar isTextCodec = function isTextCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.text.test(codec.trim().toLowerCase());\n};\nvar getMimeForCodec = function getMimeForCodec(codecString) {\n  if (!codecString || typeof codecString !== 'string') {\n    return;\n  }\n\n  var codecs = codecString.toLowerCase().split(',').map(function (c) {\n    return translateLegacyCodec(c.trim());\n  }); // default to video type\n\n  var type = 'video'; // only change to audio type if the only codec we have is\n  // audio\n\n  if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n    type = 'audio';\n  } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n    // text uses application/<container> for now\n    type = 'application';\n  } // default the container to mp4\n\n\n  var container = 'mp4'; // every codec must be able to go into the container\n  // for that container to be the correct one\n\n  if (codecs.every(function (c) {\n    return regexs.mp4.test(c);\n  })) {\n    container = 'mp4';\n  } else if (codecs.every(function (c) {\n    return regexs.webm.test(c);\n  })) {\n    container = 'webm';\n  } else if (codecs.every(function (c) {\n    return regexs.ogg.test(c);\n  })) {\n    container = 'ogg';\n  }\n\n  return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nvar browserSupportsCodec = function browserSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nvar muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  return codecString.toLowerCase().split(',').every(function (codec) {\n    codec = codec.trim(); // any match is supported.\n\n    for (var i = 0; i < upperMediaTypes.length; i++) {\n      var type = upperMediaTypes[i];\n\n      if (regexs[\"muxer\" + type].test(codec)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\nvar DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nvar DEFAULT_VIDEO_CODEC = 'avc1.4d400d';\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/codecs.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/containers.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/containers.js + 5 modules ***!
  \**********************************************************************/
/*! exports provided: isLikely, detectContainerForBytes, isLikelyFmp4MediaSegment */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@videojs/vhs-utils/es/byte-helpers.js because of ./node_modules/video.js/dist/video.es.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@videojs/vhs-utils/es/id3-helpers.js because of ./node_modules/video.js/dist/video.es.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"isLikely\", function() { return /* binding */ isLikely; });\n__webpack_require__.d(__webpack_exports__, \"detectContainerForBytes\", function() { return /* binding */ containers_detectContainerForBytes; });\n__webpack_require__.d(__webpack_exports__, \"isLikelyFmp4MediaSegment\", function() { return /* binding */ containers_isLikelyFmp4MediaSegment; });\n\n// EXTERNAL MODULE: ./node_modules/@videojs/vhs-utils/es/byte-helpers.js\nvar byte_helpers = __webpack_require__(\"./node_modules/@videojs/vhs-utils/es/byte-helpers.js\");\n\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/codec-helpers.js\n // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax\n// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1\n\nvar codec_helpers_getAv1Codec = function getAv1Codec(bytes) {\n  var codec = '';\n  var profile = bytes[1] >>> 3;\n  var level = bytes[1] & 0x1F;\n  var tier = bytes[2] >>> 7;\n  var highBitDepth = (bytes[2] & 0x40) >> 6;\n  var twelveBit = (bytes[2] & 0x20) >> 5;\n  var monochrome = (bytes[2] & 0x10) >> 4;\n  var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;\n  var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;\n  var chromaSamplePosition = bytes[2] & 0x03;\n  codec += profile + \".\" + Object(byte_helpers[\"padStart\"])(level, 2, '0');\n\n  if (tier === 0) {\n    codec += 'M';\n  } else if (tier === 1) {\n    codec += 'H';\n  }\n\n  var bitDepth;\n\n  if (profile === 2 && highBitDepth) {\n    bitDepth = twelveBit ? 12 : 10;\n  } else {\n    bitDepth = highBitDepth ? 10 : 8;\n  }\n\n  codec += \".\" + Object(byte_helpers[\"padStart\"])(bitDepth, 2, '0'); // TODO: can we parse color range??\n\n  codec += \".\" + monochrome;\n  codec += \".\" + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;\n  return codec;\n};\nvar codec_helpers_getAvcCodec = function getAvcCodec(bytes) {\n  var profileId = Object(byte_helpers[\"toHexString\"])(bytes[1]);\n  var constraintFlags = Object(byte_helpers[\"toHexString\"])(bytes[2] & 0xFC);\n  var levelId = Object(byte_helpers[\"toHexString\"])(bytes[3]);\n  return \"\" + profileId + constraintFlags + levelId;\n};\nvar codec_helpers_getHvcCodec = function getHvcCodec(bytes) {\n  var codec = '';\n  var profileSpace = bytes[1] >> 6;\n  var profileId = bytes[1] & 0x1F;\n  var tierFlag = (bytes[1] & 0x20) >> 5;\n  var profileCompat = bytes.subarray(2, 6);\n  var constraintIds = bytes.subarray(6, 12);\n  var levelId = bytes[12];\n\n  if (profileSpace === 1) {\n    codec += 'A';\n  } else if (profileSpace === 2) {\n    codec += 'B';\n  } else if (profileSpace === 3) {\n    codec += 'C';\n  }\n\n  codec += profileId + \".\"; // ffmpeg does this in big endian\n\n  var profileCompatVal = parseInt(Object(byte_helpers[\"toBinaryString\"])(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...\n\n  if (profileCompatVal > 255) {\n    profileCompatVal = parseInt(Object(byte_helpers[\"toBinaryString\"])(profileCompat), 2);\n  }\n\n  codec += profileCompatVal.toString(16) + \".\";\n\n  if (tierFlag === 0) {\n    codec += 'L';\n  } else {\n    codec += 'H';\n  }\n\n  codec += levelId;\n  var constraints = '';\n\n  for (var i = 0; i < constraintIds.length; i++) {\n    var v = constraintIds[i];\n\n    if (v) {\n      if (constraints) {\n        constraints += '.';\n      }\n\n      constraints += v.toString(16);\n    }\n  }\n\n  if (constraints) {\n    codec += \".\" + constraints;\n  }\n\n  return codec;\n};\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/opus-helpers.js\nvar OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nvar parseOpusHead = function parseOpusHead(bytes) {\n  var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n  var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n  var littleEndian = version !== 0;\n  var config = {\n    version: version,\n    channels: view.getUint8(1),\n    preSkip: view.getUint16(2, littleEndian),\n    sampleRate: view.getUint32(4, littleEndian),\n    outputGain: view.getUint16(8, littleEndian),\n    channelMappingFamily: view.getUint8(10)\n  };\n\n  if (config.channelMappingFamily > 0 && bytes.length > 10) {\n    config.streamCount = view.getUint8(11);\n    config.twoChannelStreamCount = view.getUint8(12);\n    config.channelMapping = [];\n\n    for (var c = 0; c < config.channels; c++) {\n      config.channelMapping.push(view.getUint8(13 + c));\n    }\n  }\n\n  return config;\n};\nvar setOpusHead = function setOpusHead(config) {\n  var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n  var view = new DataView(new ArrayBuffer(size));\n  var littleEndian = config.version !== 0;\n  view.setUint8(0, config.version);\n  view.setUint8(1, config.channels);\n  view.setUint16(2, config.preSkip, littleEndian);\n  view.setUint32(4, config.sampleRate, littleEndian);\n  view.setUint16(8, config.outputGain, littleEndian);\n  view.setUint8(10, config.channelMappingFamily);\n\n  if (config.channelMappingFamily > 0) {\n    view.setUint8(11, config.streamCount);\n    config.channelMapping.foreach(function (cm, i) {\n      view.setUint8(12 + i, cm);\n    });\n  }\n\n  return new Uint8Array(view.buffer);\n};\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/mp4-helpers.js\n\n\n\n\nvar mp4_helpers_normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return Object(byte_helpers[\"stringToBytes\"])(path);\n  }\n\n  if (typeof path === 'number') {\n    return path;\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [mp4_helpers_normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return mp4_helpers_normalizePath(p);\n  });\n};\n\nvar DESCRIPTORS;\nvar mp4_helpers_parseDescriptors = function parseDescriptors(bytes) {\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  var results = [];\n  var i = 0;\n\n  while (bytes.length > i) {\n    var tag = bytes[i];\n    var size = 0;\n    var headerSize = 0; // tag\n\n    headerSize++;\n    var byte = bytes[headerSize]; // first byte\n\n    headerSize++;\n\n    while (byte & 0x80) {\n      size = (byte & 0x7F) << 7;\n      byte = bytes[headerSize];\n      headerSize++;\n    }\n\n    size += byte & 0x7F;\n\n    for (var z = 0; z < DESCRIPTORS.length; z++) {\n      var _DESCRIPTORS$z = DESCRIPTORS[z],\n          id = _DESCRIPTORS$z.id,\n          parser = _DESCRIPTORS$z.parser;\n\n      if (tag === id) {\n        results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n        break;\n      }\n    }\n\n    i += size + headerSize;\n  }\n\n  return results;\n};\nDESCRIPTORS = [{\n  id: 0x03,\n  parser: function parser(bytes) {\n    var desc = {\n      tag: 0x03,\n      id: bytes[0] << 8 | bytes[1],\n      flags: bytes[2],\n      size: 3,\n      dependsOnEsId: 0,\n      ocrEsId: 0,\n      descriptors: [],\n      url: ''\n    }; // depends on es id\n\n    if (desc.flags & 0x80) {\n      desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    } // url\n\n\n    if (desc.flags & 0x40) {\n      var len = bytes[desc.size];\n      desc.url = Object(byte_helpers[\"bytesToString\"])(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n      desc.size += len;\n    } // ocr es id\n\n\n    if (desc.flags & 0x20) {\n      desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    }\n\n    desc.descriptors = mp4_helpers_parseDescriptors(bytes.subarray(desc.size)) || [];\n    return desc;\n  }\n}, {\n  id: 0x04,\n  parser: function parser(bytes) {\n    // DecoderConfigDescriptor\n    var desc = {\n      tag: 0x04,\n      oti: bytes[0],\n      streamType: bytes[1],\n      bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n      maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n      avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n      descriptors: mp4_helpers_parseDescriptors(bytes.subarray(13))\n    };\n    return desc;\n  }\n}, {\n  id: 0x05,\n  parser: function parser(bytes) {\n    // DecoderSpecificInfo\n    return {\n      tag: 0x05,\n      bytes: bytes\n    };\n  }\n}, {\n  id: 0x06,\n  parser: function parser(bytes) {\n    // SLConfigDescriptor\n    return {\n      tag: 0x06,\n      bytes: bytes\n    };\n  }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n *        bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n *        An array of paths or a single path representing the name\n *        of boxes to search through in bytes. Paths may be\n *        uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n *        Should we search only for complete boxes on the final path.\n *        This is very useful when you do not want to get back partial boxes\n *        in the case of streaming files.\n *\n * @return {Uint8Array[]}\n *         An array of the end paths that we found.\n */\n\nvar mp4_helpers_findBox = function findBox(bytes, paths, complete) {\n  if (complete === void 0) {\n    complete = false;\n  }\n\n  paths = normalizePaths(paths);\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    // short-circuit the search for empty paths\n    return results;\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n    var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n    if (size === 0) {\n      break;\n    }\n\n    var end = i + size;\n\n    if (end > bytes.length) {\n      // this box is bigger than the number of bytes we have\n      // and complete is set, we cannot find any more boxes.\n      if (complete) {\n        break;\n      }\n\n      end = bytes.length;\n    }\n\n    var data = bytes.subarray(i + 8, end);\n\n    if (Object(byte_helpers[\"bytesMatch\"])(type, paths[0])) {\n      if (paths.length === 1) {\n        // this is the end of the path and we've found the box we were\n        // looking for\n        results.push(data);\n      } else {\n        // recursively search for the next box along the path\n        results.push.apply(results, findBox(data, paths.slice(1), complete));\n      }\n    }\n\n    i = end;\n  } // we've finished searching all of bytes\n\n\n  return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n *        bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n *        The name of the box to find.\n *\n * @return {Uint8Array[]}\n *         a subarray of bytes representing the name boxed we found.\n */\n\nvar mp4_helpers_findNamedBox = function findNamedBox(bytes, name) {\n  name = mp4_helpers_normalizePath(name);\n\n  if (!name.length) {\n    // short-circuit the search for empty paths\n    return bytes.subarray(bytes.length);\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    if (Object(byte_helpers[\"bytesMatch\"])(bytes.subarray(i, i + name.length), name)) {\n      var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n      var end = size > 1 ? i + size : bytes.byteLength;\n      return bytes.subarray(i + 4, end);\n    }\n\n    i++;\n  } // we've finished searching all of bytes\n\n\n  return bytes.subarray(bytes.length);\n};\n\nvar mp4_helpers_parseSamples = function parseSamples(data, entrySize, parseEntry) {\n  if (entrySize === void 0) {\n    entrySize = 4;\n  }\n\n  if (parseEntry === void 0) {\n    parseEntry = function parseEntry(d) {\n      return Object(byte_helpers[\"bytesToNumber\"])(d);\n    };\n  }\n\n  var entries = [];\n\n  if (!data || !data.length) {\n    return entries;\n  }\n\n  var entryCount = Object(byte_helpers[\"bytesToNumber\"])(data.subarray(4, 8));\n\n  for (var i = 8; entryCount; i += entrySize, entryCount--) {\n    entries.push(parseEntry(data.subarray(i, i + entrySize)));\n  }\n\n  return entries;\n};\n\nvar mp4_helpers_buildFrameTable = function buildFrameTable(stbl, timescale) {\n  var keySamples = mp4_helpers_parseSamples(mp4_helpers_findBox(stbl, ['stss'])[0]);\n  var chunkOffsets = mp4_helpers_parseSamples(mp4_helpers_findBox(stbl, ['stco'])[0]);\n  var timeToSamples = mp4_helpers_parseSamples(mp4_helpers_findBox(stbl, ['stts'])[0], 8, function (entry) {\n    return {\n      sampleCount: Object(byte_helpers[\"bytesToNumber\"])(entry.subarray(0, 4)),\n      sampleDelta: Object(byte_helpers[\"bytesToNumber\"])(entry.subarray(4, 8))\n    };\n  });\n  var samplesToChunks = mp4_helpers_parseSamples(mp4_helpers_findBox(stbl, ['stsc'])[0], 12, function (entry) {\n    return {\n      firstChunk: Object(byte_helpers[\"bytesToNumber\"])(entry.subarray(0, 4)),\n      samplesPerChunk: Object(byte_helpers[\"bytesToNumber\"])(entry.subarray(4, 8)),\n      sampleDescriptionIndex: Object(byte_helpers[\"bytesToNumber\"])(entry.subarray(8, 12))\n    };\n  });\n  var stsz = mp4_helpers_findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n  var sampleSizes = mp4_helpers_parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n  var frames = [];\n\n  for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n    var samplesInChunk = void 0;\n\n    for (var i = 0; i < samplesToChunks.length; i++) {\n      var sampleToChunk = samplesToChunks[i];\n      var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n\n      if (isThisOne) {\n        samplesInChunk = sampleToChunk.samplesPerChunk;\n        break;\n      }\n    }\n\n    var chunkOffset = chunkOffsets[chunkIndex];\n\n    for (var _i = 0; _i < samplesInChunk; _i++) {\n      var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n      var keyframe = !keySamples.length;\n\n      if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n        keyframe = true;\n      }\n\n      var frame = {\n        keyframe: keyframe,\n        start: chunkOffset,\n        end: chunkOffset + frameEnd\n      };\n\n      for (var k = 0; k < timeToSamples.length; k++) {\n        var _timeToSamples$k = timeToSamples[k],\n            sampleCount = _timeToSamples$k.sampleCount,\n            sampleDelta = _timeToSamples$k.sampleDelta;\n\n        if (frames.length <= sampleCount) {\n          // ms to ns\n          var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n          frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n          frame.duration = sampleDelta;\n          break;\n        }\n      }\n\n      frames.push(frame);\n      chunkOffset += frameEnd;\n    }\n  }\n\n  return frames;\n};\nvar mp4_helpers_addSampleDescription = function addSampleDescription(track, bytes) {\n  var codec = Object(byte_helpers[\"bytesToString\"])(bytes.subarray(0, 4));\n\n  if (track.type === 'video') {\n    track.info = track.info || {};\n    track.info.width = bytes[28] << 8 | bytes[29];\n    track.info.height = bytes[30] << 8 | bytes[31];\n  } else if (track.type === 'audio') {\n    track.info = track.info || {};\n    track.info.channels = bytes[20] << 8 | bytes[21];\n    track.info.bitDepth = bytes[22] << 8 | bytes[23];\n    track.info.sampleRate = bytes[28] << 8 | bytes[29];\n  }\n\n  if (codec === 'avc1') {\n    var avcC = mp4_helpers_findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n    codec += \".\" + codec_helpers_getAvcCodec(avcC);\n    track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n    /* {\n      configurationVersion: avcC[0],\n      profile: avcC[1],\n      profileCompatibility: avcC[2],\n      level: avcC[3],\n      lengthSizeMinusOne: avcC[4] & 0x3\n    };\n     let spsNalUnitCount = avcC[5] & 0x1F;\n    const spsNalUnits = track.info.avc.spsNalUnits = [];\n     // past spsNalUnitCount\n    let offset = 6;\n     while (spsNalUnitCount--) {\n      const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n       spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n       offset += nalLen + 2;\n    }\n    let ppsNalUnitCount = avcC[offset];\n    const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n     // past ppsNalUnitCount\n    offset += 1;\n     while (ppsNalUnitCount--) {\n      const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n       ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n       offset += nalLen + 2;\n    }*/\n    // HEVCDecoderConfigurationRecord\n  } else if (codec === 'hvc1' || codec === 'hev1') {\n    codec += \".\" + codec_helpers_getHvcCodec(mp4_helpers_findNamedBox(bytes, 'hvcC'));\n  } else if (codec === 'mp4a' || codec === 'mp4v') {\n    var esds = mp4_helpers_findNamedBox(bytes, 'esds');\n    var esDescriptor = mp4_helpers_parseDescriptors(esds.subarray(4))[0];\n    var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n      var tag = _ref.tag;\n      return tag === 0x04;\n    })[0];\n\n    if (decoderConfig) {\n      // most codecs do not have a further '.'\n      // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n      codec += '.' + Object(byte_helpers[\"toHexString\"])(decoderConfig.oti);\n\n      if (decoderConfig.oti === 0x40) {\n        codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n      } else if (decoderConfig.oti === 0x20) {\n        codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n      } else if (decoderConfig.oti === 0xdd) {\n        codec = 'vorbis';\n      }\n    } else if (track.type === 'audio') {\n      codec += '.40.2';\n    } else {\n      codec += '.20.9';\n    }\n  } else if (codec === 'av01') {\n    // AV1DecoderConfigurationRecord\n    codec += \".\" + codec_helpers_getAv1Codec(mp4_helpers_findNamedBox(bytes, 'av1C'));\n  } else if (codec === 'vp09') {\n    // VPCodecConfigurationRecord\n    var vpcC = mp4_helpers_findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n    var profile = vpcC[0];\n    var level = vpcC[1];\n    var bitDepth = vpcC[2] >> 4;\n    var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n    var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n    var colourPrimaries = vpcC[3];\n    var transferCharacteristics = vpcC[4];\n    var matrixCoefficients = vpcC[5];\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(profile, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(level, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(bitDepth, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(chromaSubsampling, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(colourPrimaries, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(transferCharacteristics, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(matrixCoefficients, 2, '0');\n    codec += \".\" + Object(byte_helpers[\"padStart\"])(videoFullRangeFlag, 2, '0');\n  } else if (codec === 'theo') {\n    codec = 'theora';\n  } else if (codec === 'spex') {\n    codec = 'speex';\n  } else if (codec === '.mp3') {\n    codec = 'mp4a.40.34';\n  } else if (codec === 'msVo') {\n    codec = 'vorbis';\n  } else if (codec === 'Opus') {\n    codec = 'opus';\n    var dOps = mp4_helpers_findNamedBox(bytes, 'dOps');\n    track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n    // Firefox requires a codecDelay for opus playback\n    // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n    track.info.codecDelay = 6500000;\n  } else {\n    codec = codec.toLowerCase();\n  }\n  /* eslint-enable */\n  // flac, ac-3, ec-3, opus\n\n\n  track.codec = codec;\n};\nvar mp4_helpers_parseTracks = function parseTracks(bytes, frameTable) {\n  if (frameTable === void 0) {\n    frameTable = true;\n  }\n\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  var traks = mp4_helpers_findBox(bytes, ['moov', 'trak'], true);\n  var tracks = [];\n  traks.forEach(function (trak) {\n    var track = {\n      bytes: trak\n    };\n    var mdia = mp4_helpers_findBox(trak, ['mdia'])[0];\n    var hdlr = mp4_helpers_findBox(mdia, ['hdlr'])[0];\n    var trakType = Object(byte_helpers[\"bytesToString\"])(hdlr.subarray(8, 12));\n\n    if (trakType === 'soun') {\n      track.type = 'audio';\n    } else if (trakType === 'vide') {\n      track.type = 'video';\n    } else {\n      track.type = trakType;\n    }\n\n    var tkhd = mp4_helpers_findBox(trak, ['tkhd'])[0];\n\n    if (tkhd) {\n      var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n      var tkhdVersion = view.getUint8(0);\n      track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n    }\n\n    var mdhd = mp4_helpers_findBox(mdia, ['mdhd'])[0];\n\n    if (mdhd) {\n      // mdhd is a FullBox, meaning it will have its own version as the first byte\n      var version = mdhd[0];\n      var index = version === 0 ? 12 : 20;\n      track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n    }\n\n    var stbl = mp4_helpers_findBox(mdia, ['minf', 'stbl'])[0];\n    var stsd = mp4_helpers_findBox(stbl, ['stsd'])[0];\n    var descriptionCount = Object(byte_helpers[\"bytesToNumber\"])(stsd.subarray(4, 8));\n    var offset = 8; // add codec and codec info\n\n    while (descriptionCount--) {\n      var len = Object(byte_helpers[\"bytesToNumber\"])(stsd.subarray(offset, offset + 4));\n      var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n      mp4_helpers_addSampleDescription(track, sampleDescriptor);\n      offset += 4 + len;\n    }\n\n    if (frameTable) {\n      track.frameTable = mp4_helpers_buildFrameTable(stbl, track.timescale);\n    } // codec has no sub parameters\n\n\n    tracks.push(track);\n  });\n  return tracks;\n};\nvar mp4_helpers_parseMediaInfo = function parseMediaInfo(bytes) {\n  var mvhd = mp4_helpers_findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n  if (!mvhd || !mvhd.length) {\n    return;\n  }\n\n  var info = {}; // ms to ns\n  // mvhd v1 has 8 byte duration and other fields too\n\n  if (mvhd[0] === 1) {\n    info.timestampScale = Object(byte_helpers[\"bytesToNumber\"])(mvhd.subarray(20, 24));\n    info.duration = Object(byte_helpers[\"bytesToNumber\"])(mvhd.subarray(24, 32));\n  } else {\n    info.timestampScale = Object(byte_helpers[\"bytesToNumber\"])(mvhd.subarray(12, 16));\n    info.duration = Object(byte_helpers[\"bytesToNumber\"])(mvhd.subarray(16, 20));\n  }\n\n  info.bytes = mvhd;\n  return info;\n};\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/ebml-helpers.js\n\n // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nvar EBML_TAGS = {\n  EBML: Object(byte_helpers[\"toUint8\"])([0x1A, 0x45, 0xDF, 0xA3]),\n  DocType: Object(byte_helpers[\"toUint8\"])([0x42, 0x82]),\n  Segment: Object(byte_helpers[\"toUint8\"])([0x18, 0x53, 0x80, 0x67]),\n  SegmentInfo: Object(byte_helpers[\"toUint8\"])([0x15, 0x49, 0xA9, 0x66]),\n  Tracks: Object(byte_helpers[\"toUint8\"])([0x16, 0x54, 0xAE, 0x6B]),\n  Track: Object(byte_helpers[\"toUint8\"])([0xAE]),\n  TrackNumber: Object(byte_helpers[\"toUint8\"])([0xd7]),\n  DefaultDuration: Object(byte_helpers[\"toUint8\"])([0x23, 0xe3, 0x83]),\n  TrackEntry: Object(byte_helpers[\"toUint8\"])([0xAE]),\n  TrackType: Object(byte_helpers[\"toUint8\"])([0x83]),\n  FlagDefault: Object(byte_helpers[\"toUint8\"])([0x88]),\n  CodecID: Object(byte_helpers[\"toUint8\"])([0x86]),\n  CodecPrivate: Object(byte_helpers[\"toUint8\"])([0x63, 0xA2]),\n  VideoTrack: Object(byte_helpers[\"toUint8\"])([0xe0]),\n  AudioTrack: Object(byte_helpers[\"toUint8\"])([0xe1]),\n  // Not used yet, but will be used for live webm/mkv\n  // see https://www.matroska.org/technical/basics.html#block-structure\n  // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n  Cluster: Object(byte_helpers[\"toUint8\"])([0x1F, 0x43, 0xB6, 0x75]),\n  Timestamp: Object(byte_helpers[\"toUint8\"])([0xE7]),\n  TimestampScale: Object(byte_helpers[\"toUint8\"])([0x2A, 0xD7, 0xB1]),\n  BlockGroup: Object(byte_helpers[\"toUint8\"])([0xA0]),\n  BlockDuration: Object(byte_helpers[\"toUint8\"])([0x9B]),\n  Block: Object(byte_helpers[\"toUint8\"])([0xA1]),\n  SimpleBlock: Object(byte_helpers[\"toUint8\"])([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n  var len = 1;\n\n  for (var i = 0; i < LENGTH_TABLE.length; i++) {\n    if (byte & LENGTH_TABLE[i]) {\n      break;\n    }\n\n    len++;\n  }\n\n  return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\n\nvar ebml_helpers_getvint = function getvint(bytes, offset, removeLength, signed) {\n  if (removeLength === void 0) {\n    removeLength = true;\n  }\n\n  if (signed === void 0) {\n    signed = false;\n  }\n\n  var length = getLength(bytes[offset]);\n  var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n  // as they will be modified below to remove the dataSizeLen bits and we do not\n  // want to modify the original data. normally we could just call slice on\n  // uint8array but ie 11 does not support that...\n\n  if (removeLength) {\n    valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n    valueBytes[0] ^= LENGTH_TABLE[length - 1];\n  }\n\n  return {\n    length: length,\n    value: Object(byte_helpers[\"bytesToNumber\"])(valueBytes, {\n      signed: signed\n    }),\n    bytes: valueBytes\n  };\n};\n\nvar ebml_helpers_normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return path.match(/.{1,2}/g).map(function (p) {\n      return normalizePath(p);\n    });\n  }\n\n  if (typeof path === 'number') {\n    return Object(byte_helpers[\"numberToBytes\"])(path);\n  }\n\n  return path;\n};\n\nvar ebml_helpers_normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [ebml_helpers_normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return ebml_helpers_normalizePath(p);\n  });\n};\n\nvar ebml_helpers_getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n  if (offset >= bytes.length) {\n    return bytes.length;\n  }\n\n  var innerid = ebml_helpers_getvint(bytes, offset, false);\n\n  if (Object(byte_helpers[\"bytesMatch\"])(id.bytes, innerid.bytes)) {\n    return offset;\n  }\n\n  var dataHeader = ebml_helpers_getvint(bytes, offset + innerid.length);\n  return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n *    converting the byte to binary and counting the zeros\n *    before a 1. Then you add 1 to that. Examples\n *    00011111 = length 4 because there are 3 zeros before a 1.\n *    00100000 = length 3 because there are 2 zeros before a 1.\n *    00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n *    Then all the bytes are merged into a value. NOTE: this\n *    is not the case for id ebml tags as there id includes\n *    length bits.\n *\n */\n\n\nvar ebml_helpers_findEbml = function findEbml(bytes, paths) {\n  paths = ebml_helpers_normalizePaths(paths);\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    return results;\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    var id = ebml_helpers_getvint(bytes, i, false);\n    var dataHeader = ebml_helpers_getvint(bytes, i + id.length);\n    var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n    if (dataHeader.value === 0x7f) {\n      dataHeader.value = ebml_helpers_getInfinityDataSize(id, bytes, dataStart);\n\n      if (dataHeader.value !== bytes.length) {\n        dataHeader.value -= dataStart;\n      }\n    }\n\n    var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n    var data = bytes.subarray(dataStart, dataEnd);\n\n    if (Object(byte_helpers[\"bytesMatch\"])(paths[0], id.bytes)) {\n      if (paths.length === 1) {\n        // this is the end of the paths and we've found the tag we were\n        // looking for\n        results.push(data);\n      } else {\n        // recursively search for the next tag inside of the data\n        // of this one\n        results = results.concat(findEbml(data, paths.slice(1)));\n      }\n    }\n\n    var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n    i += totalLength;\n  }\n\n  return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nvar ebml_helpers_decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n  var duration;\n\n  if (type === 'group') {\n    duration = ebml_helpers_findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n    if (duration) {\n      duration = Object(byte_helpers[\"bytesToNumber\"])(duration);\n      duration = 1 / timestampScale * duration * timestampScale / 1000;\n    }\n\n    block = ebml_helpers_findEbml(block, [EBML_TAGS.Block])[0];\n    type = 'block'; // treat data as a block after this point\n  }\n\n  var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n  var trackNumber = ebml_helpers_getvint(block, 0);\n  var timestamp = dv.getInt16(trackNumber.length, false);\n  var flags = block[trackNumber.length + 2];\n  var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n  var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n  var parsed = {\n    duration: duration,\n    trackNumber: trackNumber.value,\n    keyframe: type === 'simple' && flags >> 7 === 1,\n    invisible: (flags & 0x08) >> 3 === 1,\n    lacing: (flags & 0x06) >> 1,\n    discardable: type === 'simple' && (flags & 0x01) === 1,\n    frames: [],\n    pts: ptsdts,\n    dts: ptsdts,\n    timestamp: timestamp\n  };\n\n  if (!parsed.lacing) {\n    parsed.frames.push(data);\n    return parsed;\n  }\n\n  var numberOfFrames = data[0] + 1;\n  var frameSizes = [];\n  var offset = 1; // Fixed\n\n  if (parsed.lacing === 2) {\n    var sizeOfFrame = (data.length - offset) / numberOfFrames;\n\n    for (var i = 0; i < numberOfFrames; i++) {\n      frameSizes.push(sizeOfFrame);\n    }\n  } // xiph\n\n\n  if (parsed.lacing === 1) {\n    for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n      var size = 0;\n\n      do {\n        size += data[offset];\n        offset++;\n      } while (data[offset - 1] === 0xFF);\n\n      frameSizes.push(size);\n    }\n  } // ebml\n\n\n  if (parsed.lacing === 3) {\n    // first vint is unsinged\n    // after that vints are singed and\n    // based on a compounding size\n    var _size = 0;\n\n    for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n      var vint = _i2 === 0 ? ebml_helpers_getvint(data, offset) : ebml_helpers_getvint(data, offset, true, true);\n      _size += vint.value;\n      frameSizes.push(_size);\n      offset += vint.length;\n    }\n  }\n\n  frameSizes.forEach(function (size) {\n    parsed.frames.push(data.subarray(offset, offset + size));\n    offset += size;\n  });\n  return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n  var i = 0;\n  var params = {};\n\n  while (i < bytes.length) {\n    var id = bytes[i] & 0x7f;\n    var len = bytes[i + 1];\n    var val = void 0;\n\n    if (len === 1) {\n      val = bytes[i + 2];\n    } else {\n      val = bytes.subarray(i + 2, i + 2 + len);\n    }\n\n    if (id === 1) {\n      params.profile = val;\n    } else if (id === 2) {\n      params.level = val;\n    } else if (id === 3) {\n      params.bitDepth = val;\n    } else if (id === 4) {\n      params.chromaSubsampling = val;\n    } else {\n      params[id] = val;\n    }\n\n    i += 2 + len;\n  }\n\n  return params;\n};\n\nvar ebml_helpers_parseTracks = function parseTracks(bytes) {\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  var decodedTracks = [];\n  var tracks = ebml_helpers_findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n  if (!tracks.length) {\n    tracks = ebml_helpers_findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    tracks = ebml_helpers_findEbml(bytes, [EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    return decodedTracks;\n  }\n\n  tracks.forEach(function (track) {\n    var trackType = ebml_helpers_findEbml(track, EBML_TAGS.TrackType)[0];\n\n    if (!trackType || !trackType.length) {\n      return;\n    } // 1 is video, 2 is audio, 17 is subtitle\n    // other values are unimportant in this context\n\n\n    if (trackType[0] === 1) {\n      trackType = 'video';\n    } else if (trackType[0] === 2) {\n      trackType = 'audio';\n    } else if (trackType[0] === 17) {\n      trackType = 'subtitle';\n    } else {\n      return;\n    } // todo parse language\n\n\n    var decodedTrack = {\n      rawCodec: Object(byte_helpers[\"bytesToString\"])(ebml_helpers_findEbml(track, [EBML_TAGS.CodecID])[0]),\n      type: trackType,\n      codecPrivate: ebml_helpers_findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n      number: Object(byte_helpers[\"bytesToNumber\"])(ebml_helpers_findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n      defaultDuration: Object(byte_helpers[\"bytesToNumber\"])(ebml_helpers_findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n      default: ebml_helpers_findEbml(track, [EBML_TAGS.FlagDefault])[0],\n      rawData: track\n    };\n    var codec = '';\n\n    if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n      codec = \"avc1.\" + codec_helpers_getAvcCodec(decodedTrack.codecPrivate);\n    } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n      codec = \"hev1.\" + codec_helpers_getHvcCodec(decodedTrack.codecPrivate);\n    } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n      } else {\n        codec = 'mp4v.20.9';\n      }\n    } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n      codec = 'theora';\n    } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n      codec = 'vp8';\n    } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n            profile = _parseVp9Private.profile,\n            level = _parseVp9Private.level,\n            bitDepth = _parseVp9Private.bitDepth,\n            chromaSubsampling = _parseVp9Private.chromaSubsampling;\n\n        codec = 'vp09.';\n        codec += Object(byte_helpers[\"padStart\"])(profile, 2, '0') + \".\";\n        codec += Object(byte_helpers[\"padStart\"])(level, 2, '0') + \".\";\n        codec += Object(byte_helpers[\"padStart\"])(bitDepth, 2, '0') + \".\";\n        codec += \"\" + Object(byte_helpers[\"padStart\"])(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n        var matrixCoefficients = ebml_helpers_findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n        var videoFullRangeFlag = ebml_helpers_findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n        var transferCharacteristics = ebml_helpers_findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n        var colourPrimaries = ebml_helpers_findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n        if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n          codec += \".\" + Object(byte_helpers[\"padStart\"])(colourPrimaries[0], 2, '0');\n          codec += \".\" + Object(byte_helpers[\"padStart\"])(transferCharacteristics[0], 2, '0');\n          codec += \".\" + Object(byte_helpers[\"padStart\"])(matrixCoefficients[0], 2, '0');\n          codec += \".\" + Object(byte_helpers[\"padStart\"])(videoFullRangeFlag[0], 2, '0');\n        }\n      } else {\n        codec = 'vp9';\n      }\n    } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n      codec = \"av01.\" + codec_helpers_getAv1Codec(decodedTrack.codecPrivate);\n    } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n      codec = 'alac';\n    } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n      codec = 'mp2';\n    } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n      codec = 'mp3';\n    } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n      } else {\n        codec = 'mp4a.40.2';\n      }\n    } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n      codec = 'ac-3';\n    } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n      codec = 'pcm';\n    } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n      codec = 'speex';\n    } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n      codec = 'ec-3';\n    } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n      codec = 'vorbis';\n    } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n      codec = 'flac';\n    } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n      codec = 'opus';\n    }\n\n    decodedTrack.codec = codec;\n    decodedTracks.push(decodedTrack);\n  });\n  return decodedTracks.sort(function (a, b) {\n    return a.number - b.number;\n  });\n};\nvar ebml_helpers_parseData = function parseData(data, tracks) {\n  var allBlocks = [];\n  var segment = ebml_helpers_findEbml(data, [EBML_TAGS.Segment])[0];\n  var timestampScale = ebml_helpers_findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n  if (timestampScale && timestampScale.length) {\n    timestampScale = Object(byte_helpers[\"bytesToNumber\"])(timestampScale);\n  } else {\n    timestampScale = 1000000;\n  }\n\n  var clusters = ebml_helpers_findEbml(segment, [EBML_TAGS.Cluster]);\n\n  if (!tracks) {\n    tracks = ebml_helpers_parseTracks(segment);\n  }\n\n  clusters.forEach(function (cluster, ci) {\n    var simpleBlocks = ebml_helpers_findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n      return {\n        type: 'simple',\n        data: b\n      };\n    });\n    var blockGroups = ebml_helpers_findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n      return {\n        type: 'group',\n        data: b\n      };\n    });\n    var timestamp = ebml_helpers_findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n\n    if (timestamp && timestamp.length) {\n      timestamp = Object(byte_helpers[\"bytesToNumber\"])(timestamp);\n    } // get all blocks then sort them into the correct order\n\n\n    var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n      return a.data.byteOffset - b.data.byteOffset;\n    });\n    blocks.forEach(function (block, bi) {\n      var decoded = ebml_helpers_decodeBlock(block.data, block.type, timestampScale, timestamp);\n      allBlocks.push(decoded);\n    });\n  });\n  return {\n    tracks: tracks,\n    blocks: allBlocks\n  };\n};\n// EXTERNAL MODULE: ./node_modules/@videojs/vhs-utils/es/id3-helpers.js\nvar id3_helpers = __webpack_require__(\"./node_modules/@videojs/vhs-utils/es/id3-helpers.js\");\n\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/nal-helpers.js\n\nvar NAL_TYPE_ONE = Object(byte_helpers[\"toUint8\"])([0x00, 0x00, 0x00, 0x01]);\nvar NAL_TYPE_TWO = Object(byte_helpers[\"toUint8\"])([0x00, 0x00, 0x01]);\nvar EMULATION_PREVENTION = Object(byte_helpers[\"toUint8\"])([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nvar nal_helpers_discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n  var positions = [];\n  var i = 1; // Find all `Emulation Prevention Bytes`\n\n  while (i < bytes.length - 2) {\n    if (Object(byte_helpers[\"bytesMatch\"])(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n      positions.push(i + 2);\n      i++;\n    }\n\n    i++;\n  } // If no Emulation Prevention Bytes were found just return the original\n  // array\n\n\n  if (positions.length === 0) {\n    return bytes;\n  } // Create a new array to hold the NAL unit data\n\n\n  var newLength = bytes.length - positions.length;\n  var newData = new Uint8Array(newLength);\n  var sourceIndex = 0;\n\n  for (i = 0; i < newLength; sourceIndex++, i++) {\n    if (sourceIndex === positions[0]) {\n      // Skip this byte\n      sourceIndex++; // Remove this position index\n\n      positions.shift();\n    }\n\n    newData[i] = bytes[sourceIndex];\n  }\n\n  return newData;\n};\nvar nal_helpers_findNal = function findNal(bytes, dataType, types, nalLimit) {\n  if (nalLimit === void 0) {\n    nalLimit = Infinity;\n  }\n\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n  types = [].concat(types);\n  var i = 0;\n  var nalStart;\n  var nalsFound = 0; // keep searching until:\n  // we reach the end of bytes\n  // we reach the maximum number of nals they want to seach\n  // NOTE: that we disregard nalLimit when we have found the start\n  // of the nal we want so that we can find the end of the nal we want.\n\n  while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n    var nalOffset = void 0;\n\n    if (Object(byte_helpers[\"bytesMatch\"])(bytes.subarray(i), NAL_TYPE_ONE)) {\n      nalOffset = 4;\n    } else if (Object(byte_helpers[\"bytesMatch\"])(bytes.subarray(i), NAL_TYPE_TWO)) {\n      nalOffset = 3;\n    } // we are unsynced,\n    // find the next nal unit\n\n\n    if (!nalOffset) {\n      i++;\n      continue;\n    }\n\n    nalsFound++;\n\n    if (nalStart) {\n      return nal_helpers_discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n    }\n\n    var nalType = void 0;\n\n    if (dataType === 'h264') {\n      nalType = bytes[i + nalOffset] & 0x1f;\n    } else if (dataType === 'h265') {\n      nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n    }\n\n    if (types.indexOf(nalType) !== -1) {\n      nalStart = i + nalOffset;\n    } // nal header is 1 length for h264, and 2 for h265\n\n\n    i += nalOffset + (dataType === 'h264' ? 1 : 2);\n  }\n\n  return bytes.subarray(0, 0);\n};\nvar findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n  return nal_helpers_findNal(bytes, 'h264', type, nalLimit);\n};\nvar findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n  return nal_helpers_findNal(bytes, 'h265', type, nalLimit);\n};\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/containers.js\n\n\n\n\n\nvar CONSTANTS = {\n  // \"webm\" string literal in hex\n  'webm': Object(byte_helpers[\"toUint8\"])([0x77, 0x65, 0x62, 0x6d]),\n  // \"matroska\" string literal in hex\n  'matroska': Object(byte_helpers[\"toUint8\"])([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n  // \"fLaC\" string literal in hex\n  'flac': Object(byte_helpers[\"toUint8\"])([0x66, 0x4c, 0x61, 0x43]),\n  // \"OggS\" string literal in hex\n  'ogg': Object(byte_helpers[\"toUint8\"])([0x4f, 0x67, 0x67, 0x53]),\n  // ac-3 sync byte, also works for ec-3 as that is simply a codec\n  // of ac-3\n  'ac3': Object(byte_helpers[\"toUint8\"])([0x0b, 0x77]),\n  // \"RIFF\" string literal in hex used for wav and avi\n  'riff': Object(byte_helpers[\"toUint8\"])([0x52, 0x49, 0x46, 0x46]),\n  // \"AVI\" string literal in hex\n  'avi': Object(byte_helpers[\"toUint8\"])([0x41, 0x56, 0x49]),\n  // \"WAVE\" string literal in hex\n  'wav': Object(byte_helpers[\"toUint8\"])([0x57, 0x41, 0x56, 0x45]),\n  // \"ftyp3g\" string literal in hex\n  '3gp': Object(byte_helpers[\"toUint8\"])([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n  // \"ftyp\" string literal in hex\n  'mp4': Object(byte_helpers[\"toUint8\"])([0x66, 0x74, 0x79, 0x70]),\n  // \"styp\" string literal in hex\n  'fmp4': Object(byte_helpers[\"toUint8\"])([0x73, 0x74, 0x79, 0x70]),\n  // \"ftypqt\" string literal in hex\n  'mov': Object(byte_helpers[\"toUint8\"])([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n  // moov string literal in hex\n  'moov': Object(byte_helpers[\"toUint8\"])([0x6D, 0x6F, 0x6F, 0x76]),\n  // moof string literal in hex\n  'moof': Object(byte_helpers[\"toUint8\"])([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n  aac: function aac(bytes) {\n    var offset = Object(id3_helpers[\"getId3Offset\"])(bytes);\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, [0xFF, 0x10], {\n      offset: offset,\n      mask: [0xFF, 0x16]\n    });\n  },\n  mp3: function mp3(bytes) {\n    var offset = Object(id3_helpers[\"getId3Offset\"])(bytes);\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, [0xFF, 0x02], {\n      offset: offset,\n      mask: [0xFF, 0x06]\n    });\n  },\n  webm: function webm(bytes) {\n    var docType = ebml_helpers_findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n    return Object(byte_helpers[\"bytesMatch\"])(docType, CONSTANTS.webm);\n  },\n  mkv: function mkv(bytes) {\n    var docType = ebml_helpers_findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n    return Object(byte_helpers[\"bytesMatch\"])(docType, CONSTANTS.matroska);\n  },\n  mp4: function mp4(bytes) {\n    // if this file is another base media file format, it is not mp4\n    if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n      return false;\n    } // if this file starts with a ftyp or styp box its mp4\n\n\n    if (Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.mp4, {\n      offset: 4\n    }) || Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.fmp4, {\n      offset: 4\n    })) {\n      return true;\n    } // if this file starts with a moof/moov box its mp4\n\n\n    if (Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.moof, {\n      offset: 4\n    }) || Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.moov, {\n      offset: 4\n    })) {\n      return true;\n    }\n  },\n  mov: function mov(bytes) {\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.mov, {\n      offset: 4\n    });\n  },\n  '3gp': function gp(bytes) {\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS['3gp'], {\n      offset: 4\n    });\n  },\n  ac3: function ac3(bytes) {\n    var offset = Object(id3_helpers[\"getId3Offset\"])(bytes);\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.ac3, {\n      offset: offset\n    });\n  },\n  ts: function ts(bytes) {\n    if (bytes.length < 189 && bytes.length >= 1) {\n      return bytes[0] === 0x47;\n    }\n\n    var i = 0; // check the first 376 bytes for two matching sync bytes\n\n    while (i + 188 < bytes.length && i < 188) {\n      if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n        return true;\n      }\n\n      i += 1;\n    }\n\n    return false;\n  },\n  flac: function flac(bytes) {\n    var offset = Object(id3_helpers[\"getId3Offset\"])(bytes);\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.flac, {\n      offset: offset\n    });\n  },\n  ogg: function ogg(bytes) {\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.ogg);\n  },\n  avi: function avi(bytes) {\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.riff) && Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.avi, {\n      offset: 8\n    });\n  },\n  wav: function wav(bytes) {\n    return Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.riff) && Object(byte_helpers[\"bytesMatch\"])(bytes, CONSTANTS.wav, {\n      offset: 8\n    });\n  },\n  'h264': function h264(bytes) {\n    // find seq_parameter_set_rbsp\n    return findH264Nal(bytes, 7, 3).length;\n  },\n  'h265': function h265(bytes) {\n    // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n    return findH265Nal(bytes, [32, 33], 3).length;\n  }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n  return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n  var isLikelyFn = _isLikely[type];\n\n  _isLikely[type] = function (bytes) {\n    return isLikelyFn(Object(byte_helpers[\"toUint8\"])(bytes));\n  };\n}); // export after wrapping\n\nvar isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nvar containers_detectContainerForBytes = function detectContainerForBytes(bytes) {\n  bytes = Object(byte_helpers[\"toUint8\"])(bytes);\n\n  for (var i = 0; i < isLikelyTypes.length; i++) {\n    var type = isLikelyTypes[i];\n\n    if (isLikely[type](bytes)) {\n      return type;\n    }\n  }\n\n  return '';\n}; // fmp4 is not a container\n\nvar containers_isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n  return mp4_helpers_findBox(bytes, ['moof']).length > 0;\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/containers.js_+_5_modules?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***!
  \*************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (Buffer) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return decodeB64ToUint8Array; });\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar atob = function atob(s) {\n  return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.atob ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nfunction decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/id3-helpers.js":
/*!***********************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/id3-helpers.js ***!
  \***********************************************************/
/*! exports provided: getId3Size, getId3Offset */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getId3Size\", function() { return getId3Size; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getId3Offset\", function() { return getId3Offset; });\n/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ \"./node_modules/@videojs/vhs-utils/es/byte-helpers.js\");\n\nvar ID3 = Object(_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__[\"toUint8\"])([0x49, 0x44, 0x33]);\nvar getId3Size = function getId3Size(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = Object(_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__[\"toUint8\"])(bytes);\n  var flags = bytes[offset + 5];\n  var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n  var footerPresent = (flags & 16) >> 4;\n\n  if (footerPresent) {\n    return returnSize + 20;\n  }\n\n  return returnSize + 10;\n};\nvar getId3Offset = function getId3Offset(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = Object(_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__[\"toUint8\"])(bytes);\n\n  if (bytes.length - offset < 10 || !Object(_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__[\"bytesMatch\"])(bytes, ID3, {\n    offset: offset\n  })) {\n    return offset;\n  }\n\n  offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n  // have multiple ID3 tag sections even though\n  // they should not.\n\n  return getId3Offset(bytes, offset);\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/id3-helpers.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/media-types.js":
/*!***********************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/media-types.js ***!
  \***********************************************************/
/*! exports provided: simpleTypeFromSourceType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"simpleTypeFromSourceType\", function() { return simpleTypeFromSourceType; });\nvar MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n *        Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n *         VHS source type string\n */\n\nvar simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n  if (MPEGURL_REGEX.test(type)) {\n    return 'hls';\n  }\n\n  if (DASH_REGEX.test(type)) {\n    return 'dash';\n  } // Denotes the special case of a manifest object passed to http-streaming instead of a\n  // source URL.\n  //\n  // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n  //\n  // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n  // project, and the +json suffix identifies the structure of the media type.\n\n\n  if (type === 'application/vnd.videojs.vhs+json') {\n    return 'vhs-json';\n  }\n\n  return null;\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/media-types.js?");

/***/ }),

/***/ "./node_modules/@videojs/vhs-utils/es/resolve-url.js":
/*!***********************************************************!*\
  !*** ./node_modules/@videojs/vhs-utils/es/resolve-url.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ \"./node_modules/url-toolkit/src/url-toolkit.js\");\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n  // return early if we don't need to resolve\n  if (/^[a-z]+:/i.test(relativeUrl)) {\n    return relativeUrl;\n  } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n  if (/^data:/.test(baseUrl)) {\n    baseUrl = global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location && global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location.href || '';\n  } // IE11 supports URL but not the URL constructor\n  // feature detect the behavior we want\n\n\n  var nativeURL = typeof global_window__WEBPACK_IMPORTED_MODULE_1___default.a.URL === 'function';\n  var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n  // and if baseUrl isn't an absolute url\n\n  var removeLocation = !global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n  if (nativeURL) {\n    baseUrl = new global_window__WEBPACK_IMPORTED_MODULE_1___default.a.URL(baseUrl, global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location || DEFAULT_LOCATION);\n  } else if (!/\\/\\//i.test(baseUrl)) {\n    baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default.a.buildAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location && global_window__WEBPACK_IMPORTED_MODULE_1___default.a.location.href || '', baseUrl);\n  }\n\n  if (nativeURL) {\n    var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n    // and if we're location-less, remove the location\n    // otherwise, return the url unmodified\n\n    if (removeLocation) {\n      return newUrl.href.slice(DEFAULT_LOCATION.length);\n    } else if (protocolLess) {\n      return newUrl.href.slice(newUrl.protocol.length);\n    }\n\n    return newUrl.href;\n  }\n\n  return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default.a.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (resolveUrl);\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/vhs-utils/es/resolve-url.js?");

/***/ }),

/***/ "./node_modules/@videojs/xhr/lib/http-handler.js":
/*!*******************************************************!*\
  !*** ./node_modules/@videojs/xhr/lib/http-handler.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar window = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n  if (decodeResponseBody === void 0) {\n    decodeResponseBody = false;\n  }\n\n  return function (err, response, responseBody) {\n    // if the XHR failed, return that error\n    if (err) {\n      callback(err);\n      return;\n    } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n    if (response.statusCode >= 400 && response.statusCode <= 599) {\n      var cause = responseBody;\n\n      if (decodeResponseBody) {\n        if (window.TextDecoder) {\n          var charset = getCharset(response.headers && response.headers['content-type']);\n\n          try {\n            cause = new TextDecoder(charset).decode(responseBody);\n          } catch (e) {}\n        } else {\n          cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n        }\n      }\n\n      callback({\n        cause: cause\n      });\n      return;\n    } // otherwise, request succeeded\n\n\n    callback(null, responseBody);\n  };\n};\n\nfunction getCharset(contentTypeHeader) {\n  if (contentTypeHeader === void 0) {\n    contentTypeHeader = '';\n  }\n\n  return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n    var _contentType$split = contentType.split('='),\n        type = _contentType$split[0],\n        value = _contentType$split[1];\n\n    if (type.trim() === 'charset') {\n      return value.trim();\n    }\n\n    return charset;\n  }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/xhr/lib/http-handler.js?");

/***/ }),

/***/ "./node_modules/@videojs/xhr/lib/index.js":
/*!************************************************!*\
  !*** ./node_modules/@videojs/xhr/lib/index.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar window = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n\nvar _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n\nvar isFunction = __webpack_require__(/*! is-function */ \"./node_modules/is-function/index.js\");\n\ncreateXHR.httpHandler = __webpack_require__(/*! ./http-handler.js */ \"./node_modules/@videojs/xhr/lib/http-handler.js\");\n/**\n * @license\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\n */\n\nvar parseHeaders = function parseHeaders(headers) {\n  var result = {};\n\n  if (!headers) {\n    return result;\n  }\n\n  headers.trim().split('\\n').forEach(function (row) {\n    var index = row.indexOf(':');\n    var key = row.slice(0, index).trim().toLowerCase();\n    var value = row.slice(index + 1).trim();\n\n    if (typeof result[key] === 'undefined') {\n      result[key] = value;\n    } else if (Array.isArray(result[key])) {\n      result[key].push(value);\n    } else {\n      result[key] = [result[key], value];\n    }\n  });\n  return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n  createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n    options = initParams(uri, options, callback);\n    options.method = method.toUpperCase();\n    return _createXHR(options);\n  };\n});\n\nfunction forEachArray(array, iterator) {\n  for (var i = 0; i < array.length; i++) {\n    iterator(array[i]);\n  }\n}\n\nfunction isEmpty(obj) {\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) return false;\n  }\n\n  return true;\n}\n\nfunction initParams(uri, options, callback) {\n  var params = uri;\n\n  if (isFunction(options)) {\n    callback = options;\n\n    if (typeof uri === \"string\") {\n      params = {\n        uri: uri\n      };\n    }\n  } else {\n    params = _extends({}, options, {\n      uri: uri\n    });\n  }\n\n  params.callback = callback;\n  return params;\n}\n\nfunction createXHR(uri, options, callback) {\n  options = initParams(uri, options, callback);\n  return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n  if (typeof options.callback === \"undefined\") {\n    throw new Error(\"callback argument missing\");\n  }\n\n  var called = false;\n\n  var callback = function cbOnce(err, response, body) {\n    if (!called) {\n      called = true;\n      options.callback(err, response, body);\n    }\n  };\n\n  function readystatechange() {\n    if (xhr.readyState === 4) {\n      setTimeout(loadFunc, 0);\n    }\n  }\n\n  function getBody() {\n    // Chrome with requestType=blob throws errors arround when even testing access to responseText\n    var body = undefined;\n\n    if (xhr.response) {\n      body = xhr.response;\n    } else {\n      body = xhr.responseText || getXml(xhr);\n    }\n\n    if (isJson) {\n      try {\n        body = JSON.parse(body);\n      } catch (e) {}\n    }\n\n    return body;\n  }\n\n  function errorFunc(evt) {\n    clearTimeout(timeoutTimer);\n\n    if (!(evt instanceof Error)) {\n      evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n    }\n\n    evt.statusCode = 0;\n    return callback(evt, failureResponse);\n  } // will load the data & process the response in a special response object\n\n\n  function loadFunc() {\n    if (aborted) return;\n    var status;\n    clearTimeout(timeoutTimer);\n\n    if (options.useXDR && xhr.status === undefined) {\n      //IE8 CORS GET successful response doesn't have a status field, but body is fine\n      status = 200;\n    } else {\n      status = xhr.status === 1223 ? 204 : xhr.status;\n    }\n\n    var response = failureResponse;\n    var err = null;\n\n    if (status !== 0) {\n      response = {\n        body: getBody(),\n        statusCode: status,\n        method: method,\n        headers: {},\n        url: uri,\n        rawRequest: xhr\n      };\n\n      if (xhr.getAllResponseHeaders) {\n        //remember xhr can in fact be XDR for CORS in IE\n        response.headers = parseHeaders(xhr.getAllResponseHeaders());\n      }\n    } else {\n      err = new Error(\"Internal XMLHttpRequest Error\");\n    }\n\n    return callback(err, response, response.body);\n  }\n\n  var xhr = options.xhr || null;\n\n  if (!xhr) {\n    if (options.cors || options.useXDR) {\n      xhr = new createXHR.XDomainRequest();\n    } else {\n      xhr = new createXHR.XMLHttpRequest();\n    }\n  }\n\n  var key;\n  var aborted;\n  var uri = xhr.url = options.uri || options.url;\n  var method = xhr.method = options.method || \"GET\";\n  var body = options.body || options.data;\n  var headers = xhr.headers = options.headers || {};\n  var sync = !!options.sync;\n  var isJson = false;\n  var timeoutTimer;\n  var failureResponse = {\n    body: undefined,\n    headers: {},\n    statusCode: 0,\n    method: method,\n    url: uri,\n    rawRequest: xhr\n  };\n\n  if (\"json\" in options && options.json !== false) {\n    isJson = true;\n    headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n    if (method !== \"GET\" && method !== \"HEAD\") {\n      headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n      body = JSON.stringify(options.json === true ? body : options.json);\n    }\n  }\n\n  xhr.onreadystatechange = readystatechange;\n  xhr.onload = loadFunc;\n  xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n  xhr.onprogress = function () {// IE must die\n  };\n\n  xhr.onabort = function () {\n    aborted = true;\n  };\n\n  xhr.ontimeout = errorFunc;\n  xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n  if (!sync) {\n    xhr.withCredentials = !!options.withCredentials;\n  } // Cannot set timeout with sync request\n  // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n  // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n  if (!sync && options.timeout > 0) {\n    timeoutTimer = setTimeout(function () {\n      if (aborted) return;\n      aborted = true; //IE9 may still call readystatechange\n\n      xhr.abort(\"timeout\");\n      var e = new Error(\"XMLHttpRequest timeout\");\n      e.code = \"ETIMEDOUT\";\n      errorFunc(e);\n    }, options.timeout);\n  }\n\n  if (xhr.setRequestHeader) {\n    for (key in headers) {\n      if (headers.hasOwnProperty(key)) {\n        xhr.setRequestHeader(key, headers[key]);\n      }\n    }\n  } else if (options.headers && !isEmpty(options.headers)) {\n    throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n  }\n\n  if (\"responseType\" in options) {\n    xhr.responseType = options.responseType;\n  }\n\n  if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n    options.beforeSend(xhr);\n  } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n  // XMLHttpRequest spec says to pass null as body to indicate no body\n  // See https://github.com/naugtur/xhr/issues/100.\n\n\n  xhr.send(body || null);\n  return xhr;\n}\n\nfunction getXml(xhr) {\n  // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n  // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n  try {\n    if (xhr.responseType === \"document\") {\n      return xhr.responseXML;\n    }\n\n    var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n    if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n      return xhr.responseXML;\n    }\n  } catch (e) {}\n\n  return null;\n}\n\nfunction noop() {}\n\n//# sourceURL=webpack://futureBooks/./node_modules/@videojs/xhr/lib/index.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/conventions.js":
/*!********************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/conventions.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array<T> | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array<T> | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial<Pick<ArrayConstructor['prototype'], 'find'>>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick<ObjectConstructor, 'freeze'> = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly<T>}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/conventions.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/dom-parser.js":
/*!*******************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/dom-parser.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var conventions = __webpack_require__(/*! ./conventions */ \"./node_modules/@xmldom/xmldom/lib/conventions.js\");\nvar dom = __webpack_require__(/*! ./dom */ \"./node_modules/@xmldom/xmldom/lib/dom.js\")\nvar entities = __webpack_require__(/*! ./entities */ \"./node_modules/@xmldom/xmldom/lib/entities.js\");\nvar sax = __webpack_require__(/*! ./sax */ \"./node_modules/@xmldom/xmldom/lib/sax.js\");\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.replace(/[\\r\\u0085\\u2028]/g, '\\n')\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record<string, string>} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax =  new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n  \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n    this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n\tstartDocument : function() {\n    \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n    \tif (this.locator) {\n        \tthis.doc.documentURI = this.locator.systemId;\n    \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t    var el = doc.createElementNS(namespaceURI, qName||localName);\n\t    var len = attrs.length;\n\t    appendElement(this, el);\n\t    this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t    for (var i = 0 ; i < len; i++) {\n\t        var namespaceURI = attrs.getURI(i);\n\t        var value = attrs.getValue(i);\n\t        var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t    }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t    var ins = this.doc.createProcessingInstruction(target, data);\n\t    this.locator && position(this.locator,ins)\n\t    appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t    if(this.locator = locator){// && !('lineNumber' in locator)){\n\t    \tlocator.lineNumber = 0;\n\t    }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t    var comm = this.doc.createComment(chars);\n\t    this.locator && position(this.locator,comm)\n\t    appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t    //used in characters() methods\n\t    this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t    this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t    if (impl && impl.createDocumentType) {\n\t        var dt = impl.createDocumentType(name, publicId, systemId);\n\t        this.locator && position(this.locator,dt)\n\t        appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t    }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n *  #comment(chars, start, length)\n *  #startCDATA()\n *  #endCDATA()\n *  #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n *  #endDTD()\n *  #startEntity(name)\n *  #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n *  #elementDecl(name, model)\n *  #externalEntityDecl(name, publicId, systemId)\n *  #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\n *  #resolveEntity(publicId, systemId)\n *  #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n *  #notationDecl(name, publicId, systemId) {};\n *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n    if (!hander.currentElement) {\n        hander.doc.appendChild(node);\n    } else {\n        hander.currentElement.appendChild(node);\n    }\n}//appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/dom-parser.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/dom.js":
/*!************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/dom.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var conventions = __webpack_require__(/*! ./conventions */ \"./node_modules/@xmldom/xmldom/lib/conventions.js\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record<string, boolean | undefined>} current\n * @param {string} element\n * @returns {Record<string, boolean | undefined>}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE                = NodeType.ELEMENT_NODE                = 1;\nvar ATTRIBUTE_NODE              = NodeType.ATTRIBUTE_NODE              = 2;\nvar TEXT_NODE                   = NodeType.TEXT_NODE                   = 3;\nvar CDATA_SECTION_NODE          = NodeType.CDATA_SECTION_NODE          = 4;\nvar ENTITY_REFERENCE_NODE       = NodeType.ENTITY_REFERENCE_NODE       = 5;\nvar ENTITY_NODE                 = NodeType.ENTITY_NODE                 = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE                = NodeType.COMMENT_NODE                = 8;\nvar DOCUMENT_NODE               = NodeType.DOCUMENT_NODE               = 9;\nvar DOCUMENT_TYPE_NODE          = NodeType.DOCUMENT_TYPE_NODE          = 10;\nvar DOCUMENT_FRAGMENT_NODE      = NodeType.DOCUMENT_FRAGMENT_NODE      = 11;\nvar NOTATION_NODE               = NodeType.NOTATION_NODE               = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR              = ExceptionCode.INDEX_SIZE_ERR              = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR          = ExceptionCode.DOMSTRING_SIZE_ERR          = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR       = ExceptionCode.HIERARCHY_REQUEST_ERR       = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR          = ExceptionCode.WRONG_DOCUMENT_ERR          = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR       = ExceptionCode.INVALID_CHARACTER_ERR       = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR         = ExceptionCode.NO_DATA_ALLOWED_ERR         = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR               = ExceptionCode.NOT_FOUND_ERR               = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR           = ExceptionCode.NOT_SUPPORTED_ERR           = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR         = ExceptionCode.INUSE_ATTRIBUTE_ERR         = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR        \t= ExceptionCode.INVALID_STATE_ERR        \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR               \t= ExceptionCode.SYNTAX_ERR               \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR            \t= ExceptionCode.NAMESPACE_ERR           \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR       \t= ExceptionCode.INVALID_ACCESS_ERR      \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index  unsigned long\n\t *   Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i<this.length;i++){\n\t\t\tserializeToString(this[i],buf,isHTML,nodeFilter);\n\t\t}\n\t\treturn buf.join('');\n\t},\n\t/**\n\t * @private\n\t * @param {function (Node):boolean} predicate\n\t * @returns {Node[]}\n\t */\n\tfilter: function (predicate) {\n\t\treturn Array.prototype.filter.call(this, predicate);\n\t},\n\t/**\n\t * @private\n\t * @param {Node} item\n\t * @returns {number}\n\t */\n\tindexOf: function (item) {\n\t\treturn Array.prototype.indexOf.call(this, item);\n\t},\n};\n\nfunction LiveNodeList(node,refresh){\n\tthis._node = node;\n\tthis._refresh = refresh\n\t_updateLiveList(this);\n}\nfunction _updateLiveList(list){\n\tvar inc = list._node._inc || list._node.ownerDocument._inc;\n\tif (list._inc !== inc) {\n\t\tvar ls = list._refresh(list._node);\n\t\t__set__(list,'length',ls.length);\n\t\tif (!list.$$length || ls.length < list.$$length) {\n\t\t\tfor (var i = ls.length; i in list; i++) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\t\t\tdelete list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcopy(ls,list);\n\t\tlist._inc = inc;\n\t}\n}\nLiveNodeList.prototype.item = function(i){\n\t_updateLiveList(this);\n\treturn this[i] || null;\n}\n\n_extends(LiveNodeList,NodeList);\n\n/**\n * Objects implementing the NamedNodeMap interface are used\n * to represent collections of nodes that can be accessed by name.\n * Note that NamedNodeMap does not inherit from NodeList;\n * NamedNodeMaps are not maintained in any particular order.\n * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index,\n * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,\n * and does not imply that the DOM specifies an order to these Nodes.\n * NamedNodeMap objects in the DOM are live.\n * used for attributes or DocumentType entities\n */\nfunction NamedNodeMap() {\n};\n\nfunction _findNodeIndex(list,node){\n\tvar i = list.length;\n\twhile(i--){\n\t\tif(list[i] === node){return i}\n\t}\n}\n\nfunction _addNamedNode(el,list,newAttr,oldAttr){\n\tif(oldAttr){\n\t\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\n\t}else{\n\t\tlist[list.length++] = newAttr;\n\t}\n\tif(el){\n\t\tnewAttr.ownerElement = el;\n\t\tvar doc = el.ownerDocument;\n\t\tif(doc){\n\t\t\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\n\t\t\t_onAddAttribute(doc,el,newAttr);\n\t\t}\n\t}\n}\nfunction _removeNamedNode(el,list,attr){\n\t//console.log('remove attr:'+attr)\n\tvar i = _findNodeIndex(list,attr);\n\tif(i>=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i<lastIndex){\n\t\t\tlist[i] = list[++i]\n\t\t}\n\t\tlist.length = lastIndex;\n\t\tif(el){\n\t\t\tvar doc = el.ownerDocument;\n\t\t\tif(doc){\n\t\t\t\t_onRemoveAttribute(doc,el,attr);\n\t\t\t\tattr.ownerElement = null;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tthrow new DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\n\t}\n}\nNamedNodeMap.prototype = {\n\tlength:0,\n\titem:NodeList.prototype.item,\n\tgetNamedItem: function(key) {\n//\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument  DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI,  qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t  or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n  \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n    // Introduced in DOM Level 2:\n    hasAttributes:function(){\n    \treturn this.attributes.length>0;\n    },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n    lookupPrefix:function(namespaceURI){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    lookupNamespaceURI:function(prefix){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n    \t\t\t\treturn map[prefix] ;\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    isDefaultNamespace:function(namespaceURI){\n    \tvar prefix = this.lookupPrefix(namespaceURI);\n    \treturn prefix == null;\n    }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '&lt;' ||\n         c == '>' && '&gt;' ||\n         c == '&' && '&amp;' ||\n         c == '\"' && '&quot;' ||\n         '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n        }while(node=node.nextSibling)\n    }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t\t// Update ownerDocument for each node being inserted\n\t\tvar targetDoc = parent.ownerDocument || parent;\n\t\t_updateOwnerDocument(newFirst, targetDoc);\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Recursively updates the ownerDocument property for a node and all its descendants\n * @param {Node} node\n * @param {Document} newOwnerDocument\n * @private\n */\nfunction _updateOwnerDocument(node, newOwnerDocument) {\n\tif (node.ownerDocument === newOwnerDocument) {\n\t\treturn;\n\t}\n\t\n\tnode.ownerDocument = newOwnerDocument;\n\t\n\t// Update attributes if this is an element\n\tif (node.nodeType === ELEMENT_NODE && node.attributes) {\n\t\tfor (var i = 0; i < node.attributes.length; i++) {\n\t\t\tvar attr = node.attributes.item(i);\n\t\t\tif (attr) {\n\t\t\t\tattr.ownerDocument = newOwnerDocument;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Recursively update child nodes\n\tvar child = node.firstChild;\n\twhile (child) {\n\t\t_updateOwnerDocument(child, newOwnerDocument);\n\t\tchild = child.nextSibling;\n\t}\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\t\n\t// Update ownerDocument for the new child and all its descendants\n\tvar targetDoc = parentNode.ownerDocument || parentNode;\n\t_updateOwnerDocument(newChild, targetDoc);\n\t\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName :  '#document',\n\tnodeType :  DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype :  null,\n\tdocumentElement :  null,\n\t_inc : 1,\n\n\tinsertBefore :  function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\t_updateOwnerDocument(newChild, this);\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild :  function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\t_updateOwnerDocument(newChild, this);\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\t// add namespaces for attributes\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (attr.prefix == 'xmlns') {\n\t\t\t\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\n\t\t\t}else if(attr.nodeName == 'xmlns'){\n\t\t\t\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\n\t\t\t}\n\t\t}\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\n\t\t\t\tvar prefix = attr.prefix||'';\n\t\t\t\tvar uri = attr.namespaceURI;\n\t\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t\t}\n\t\t\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t}\n\n\t\t// add namespace for current node\n\t\tif (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {\n\t\t\tvar prefix = node.prefix||'';\n\t\t\tvar uri = node.namespaceURI;\n\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t}\n\n\t\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\n\t\t\tbuf.push('>');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('</',prefixedNodeName,'>');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&amp;` and `&lt;` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" &gt; \", and must, for compatibility,\n\t\t * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '<![CDATA[',node.data,']]>');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"<!--\",node.data,\"-->\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('<!DOCTYPE ',node.name);\n\t\tif(pubid){\n\t\t\tbuf.push(' PUBLIC ', pubid);\n\t\t\tif (sysid && sysid!='.') {\n\t\t\t\tbuf.push(' ', sysid);\n\t\t\t}\n\t\t\tbuf.push('>');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"<?\",node.target,\" \",node.data,\"?>\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i<len;i++){\n\t\t\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n\t\t//}\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tbreak;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t\tbreak;\n\t//case ENTITY_REFERENCE_NODE:\n\t//case PROCESSING_INSTRUCTION_NODE:\n\t////case TEXT_NODE:\n\t//case CDATA_SECTION_NODE:\n\t//case COMMENT_NODE:\n\t//\tdeep = false;\n\t//\tbreak;\n\t//case DOCUMENT_NODE:\n\t//case DOCUMENT_TYPE_NODE:\n\t//cannot be imported.\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE：\n\t//can not hit in level3\n\t//default:throw e;\n\t}\n\tif(!node2){\n\t\tnode2 = node.cloneNode(false);//false\n\t}\n\tnode2.ownerDocument = doc;\n\tnode2.parentNode = null;\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(importNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n//\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\n//\t\t\t\t\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\nfunction cloneNode(doc,node,deep){\n\tvar node2 = new node.constructor();\n\tfor (var n in node) {\n\t\tif (Object.prototype.hasOwnProperty.call(node, n)) {\n\t\t\tvar v = node[n];\n\t\t\tif (typeof v != \"object\") {\n\t\t\t\tif (v != node2[n]) {\n\t\t\t\t\tnode2[n] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(node.childNodes){\n\t\tnode2.childNodes = new NodeList();\n\t}\n\tnode2.ownerDocument = doc;\n\tswitch (node2.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tvar attrs\t= node.attributes;\n\t\tvar attrs2\t= node2.attributes = new NamedNodeMap();\n\t\tvar len = attrs.length\n\t\tattrs2._ownerElement = node2;\n\t\tfor(var i=0;i<len;i++){\n\t\t\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\n\t\t}\n\t\tbreak;;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t}\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(cloneNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n\nfunction __set__(object,key,value){\n\tobject[key] = value\n}\n//do dynamic\ntry{\n\tif(Object.defineProperty){\n\t\tObject.defineProperty(LiveNodeList.prototype,'length',{\n\t\t\tget:function(){\n\t\t\t\t_updateLiveList(this);\n\t\t\t\treturn this.$$length;\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(Node.prototype,'textContent',{\n\t\t\tget:function(){\n\t\t\t\treturn getTextContent(this);\n\t\t\t},\n\n\t\t\tset:function(data){\n\t\t\t\tswitch(this.nodeType){\n\t\t\t\tcase ELEMENT_NODE:\n\t\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\t\twhile(this.firstChild){\n\t\t\t\t\t\tthis.removeChild(this.firstChild);\n\t\t\t\t\t}\n\t\t\t\t\tif(data || String(data)){\n\t\t\t\t\t\tthis.appendChild(this.ownerDocument.createTextNode(data));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.data = data;\n\t\t\t\t\tthis.value = data;\n\t\t\t\t\tthis.nodeValue = data;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tfunction getTextContent(node){\n\t\t\tswitch(node.nodeType){\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\tvar buf = [];\n\t\t\t\tnode = node.firstChild;\n\t\t\t\twhile(node){\n\t\t\t\t\tif(node.nodeType!==7 && node.nodeType !==8){\n\t\t\t\t\t\tbuf.push(getTextContent(node));\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t\treturn buf.join('');\n\t\t\tdefault:\n\t\t\t\treturn node.nodeValue;\n\t\t\t}\n\t\t}\n\n\t\t__set__ = function(object,key,value){\n\t\t\t//console.log(value)\n\t\t\tobject['$$'+key] = value\n\t\t}\n\t}\n}catch(e){//ie8\n}\n\n//if(typeof require == 'function'){\n\texports.DocumentType = DocumentType;\n\texports.DOMException = DOMException;\n\texports.DOMImplementation = DOMImplementation;\n\texports.Element = Element;\n\texports.Node = Node;\n\texports.NodeList = NodeList;\n\texports.XMLSerializer = XMLSerializer;\n//}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/dom.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/entities.js":
/*!*****************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/entities.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar freeze = __webpack_require__(/*! ./conventions */ \"./node_modules/@xmldom/xmldom/lib/conventions.js\").freeze;\n\n/**\n * The entities that are predefined in every XML document.\n *\n * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1\n * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia\n */\nexports.XML_ENTITIES = freeze({\n\tamp: '&',\n\tapos: \"'\",\n\tgt: '>',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/entities.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/index.js":
/*!**************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/index.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var dom = __webpack_require__(/*! ./dom */ \"./node_modules/@xmldom/xmldom/lib/dom.js\")\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = __webpack_require__(/*! ./dom-parser */ \"./node_modules/@xmldom/xmldom/lib/dom-parser.js\").DOMParser\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/index.js?");

/***/ }),

/***/ "./node_modules/@xmldom/xmldom/lib/sax.js":
/*!************************************************!*\
  !*** ./node_modules/@xmldom/xmldom/lib/sax.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var NAMESPACE = __webpack_require__(/*! ./conventions */ \"./node_modules/@xmldom/xmldom/lib/conventions.js\").NAMESPACE;\n\n//[4]   \tNameStartChar\t   ::=   \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a]   \tNameChar\t   ::=   \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5]   \tName\t   ::=   \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el<el />\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t    \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t    \t\t\tdoc.appendChild(text);\n\t    \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t        \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t        \t\tend = tagStart+1+tagName.length;\n\t        \t}else if(tagName.match(/\\s</)){\n\t        \t\ttagName = tagName.replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' maybe not complete');\n\t        \t\tend = tagStart+1+tagName.length;\n\t\t\t\t}\n\t\t\t\tvar localNSMap = config.localNSMap;\n\t\t\t\tvar endMatch = config.tagName == tagName;\n\t\t\t\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\n\t\t        if(endIgnoreCaseMach){\n\t\t        \tdomBuilder.endElement(config.uri,config.localName,tagName);\n\t\t\t\t\tif(localNSMap){\n\t\t\t\t\t\tfor (var prefix in localNSMap) {\n\t\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!endMatch){\n\t\t            \terrorHandler.fatalError(\"end tag name: \"+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case\n\t\t\t\t\t}\n\t\t        }else{\n\t\t        \tparseStack.push(config)\n\t\t        }\n\n\t\t\t\tend++;\n\t\t\t\tbreak;\n\t\t\t\t// end elment\n\t\t\tcase '?':// <?...?>\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// <!doctype,<![CDATA,<!--\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tvar el = new ElementAttributes();\n\t\t\t\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\t\t\t\t//elStartEnd\n\t\t\t\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\n\t\t\t\tvar len = el.length;\n\n\n\t\t\t\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tif(!entityMap.nbsp){\n\t\t\t\t\t\terrorHandler.warning('unclosed xml attribute');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(locator && len){\n\t\t\t\t\tvar locator2 = copyLocator(locator,{});\n\t\t\t\t\t//try{//attribute position fixed\n\t\t\t\t\tfor(var i = 0;i<len;i++){\n\t\t\t\t\t\tvar a = el[i];\n\t\t\t\t\t\tposition(a.offset);\n\t\t\t\t\t\ta.locator = copyLocator(locator,{});\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator2\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator;\n\t\t\t\t}else{\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (NAMESPACE.isHTML(el.uri) && !el.closed) {\n\t\t\t\t\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\n\t\t\t\t} else {\n\t\t\t\t\tend++;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(e){\n\t\t\tif (e instanceof ParseError) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\terrorHandler.error('element parse error: '+e)\n\t\t\tend = -1;\n\t\t}\n\t\tif(end>start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退，有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed  = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName =  el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos =  source.lastIndexOf('</'+tagName+'>')\n\t\tif(pos<elStartEnd){//忘记闭合\n\t\t\tpos = source.lastIndexOf('</'+tagName)\n\t\t}\n\t\tcloseMap[tagName] =pos\n\t}\n\treturn pos<elStartEnd;\n\t//}\n}\n\nfunction _copy (source, target) {\n\tfor (var n in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, n)) {\n\t\t\ttarget[n] = source[n];\n\t\t}\n\t}\n}\n\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\n\tvar next= source.charAt(start+2)\n\tswitch(next){\n\tcase '-':\n\t\tif(source.charAt(start + 3) === '-'){\n\t\t\tvar end = source.indexOf('-->',start+4);\n\t\t\t//append comment source.substring(4,end)//<!--\n\t\t\tif(end>start){\n\t\t\t\tdomBuilder.comment(source,start+4,end-start-4);\n\t\t\t\treturn end+3;\n\t\t\t}else{\n\t\t\t\terrorHandler.error(\"Unclosed comment\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}else{\n\t\t\t//error\n\t\t\treturn -1;\n\t\t}\n\tdefault:\n\t\tif(source.substr(start+3,6) == 'CDATA['){\n\t\t\tvar end = source.indexOf(']]>',start+9);\n\t\t\tdomBuilder.startCDATA();\n\t\t\tdomBuilder.characters(source,start+9,end-start-9);\n\t\t\tdomBuilder.endCDATA()\n\t\t\treturn end+3;\n\t\t}\n\t\t//<!DOCTYPE\n\t\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)\n\t\tvar matchs = split(source,start);\n\t\tvar len = matchs.length;\n\t\tif(len>1 && /!doctype/i.test(matchs[0][0])){\n\t\t\tvar name = matchs[1][0];\n\t\t\tvar pubid = false;\n\t\t\tvar sysid = false;\n\t\t\tif(len>3){\n\t\t\t\tif(/^public$/i.test(matchs[2][0])){\n\t\t\t\t\tpubid = matchs[3][0];\n\t\t\t\t\tsysid = len>4 && matchs[4][0];\n\t\t\t\t}else if(/^system$/i.test(matchs[2][0])){\n\t\t\t\t\tsysid = matchs[3][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar lastMatch = matchs[len-1]\n\t\t\tdomBuilder.startDTD(name, pubid, sysid);\n\t\t\tdomBuilder.endDTD();\n\n\t\t\treturn lastMatch.index+lastMatch[0].length\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n\nfunction parseInstruction(source,start,domBuilder){\n\tvar end = source.indexOf('?>',start);\n\tif(end){\n\t\tvar match = source.substring(start,end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n\t\tif(match){\n\t\t\tvar len = match[0].length;\n\t\t\tdomBuilder.processingInstruction(match[1], match[2]) ;\n\t\t\treturn end+2;\n\t\t}else{//error\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction ElementAttributes(){\n\tthis.attributeNames = {}\n}\nElementAttributes.prototype = {\n\tsetTagName:function(tagName){\n\t\tif(!tagNamePattern.test(tagName)){\n\t\t\tthrow new Error('invalid tagName:'+tagName)\n\t\t}\n\t\tthis.tagName = tagName\n\t},\n\taddValue:function(qName, value, offset) {\n\t\tif(!tagNamePattern.test(qName)){\n\t\t\tthrow new Error('invalid attribute:'+qName)\n\t\t}\n\t\tthis.attributeNames[qName] = this.length;\n\t\tthis[this.length++] = {qName:qName,value:value,offset:offset}\n\t},\n\tlength:0,\n\tgetLocalName:function(i){return this[i].localName},\n\tgetLocator:function(i){return this[i].locator},\n\tgetQName:function(i){return this[i].qName},\n\tgetURI:function(i){return this[i].uri},\n\tgetValue:function(i){return this[i].value}\n//\t,getIndex:function(uri, localName)){\n//\t\tif(localName){\n//\n//\t\t}else{\n//\t\t\tvar qName = uri\n//\t\t}\n//\t},\n//\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\n//\tgetType:function(uri,localName){}\n//\tgetType:function(i){},\n}\n\n\n\nfunction split(source,start){\n\tvar match;\n\tvar buf = [];\n\tvar reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n\treg.lastIndex = start;\n\treg.exec(source);//skip <\n\twhile(match = reg.exec(source)){\n\t\tbuf.push(match);\n\t\tif(match[1])return buf;\n\t}\n}\n\nexports.XMLReader = XMLReader;\nexports.ParseError = ParseError;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/@xmldom/xmldom/lib/sax.js?");

/***/ }),

/***/ "./node_modules/abcjs/abcjs-audio.css":
/*!********************************************!*\
  !*** ./node_modules/abcjs/abcjs-audio.css ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/abcjs-audio.css?");

/***/ }),

/***/ "./node_modules/abcjs/index.js":
/*!*************************************!*\
  !*** ./node_modules/abcjs/index.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**!\nCopyright (c) 2009-2024 Paul Rosen and Gregory Dyke\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n **This text is from: http://opensource.org/licenses/MIT**\n!**/\nvar version = __webpack_require__(/*! ./version */ \"./node_modules/abcjs/version.js\");\nvar animation = __webpack_require__(/*! ./src/api/abc_animation */ \"./node_modules/abcjs/src/api/abc_animation.js\");\nvar tuneBook = __webpack_require__(/*! ./src/api/abc_tunebook */ \"./node_modules/abcjs/src/api/abc_tunebook.js\");\nvar sequence = __webpack_require__(/*! ./src/synth/abc_midi_sequencer */ \"./node_modules/abcjs/src/synth/abc_midi_sequencer.js\");\nvar strTranspose = __webpack_require__(/*! ./src/str/output */ \"./node_modules/abcjs/src/str/output.js\");\n\nvar abcjs = {};\n\nabcjs.signature = \"abcjs-basic v\" + version;\n\nObject.keys(animation).forEach(function (key) {\n\tabcjs[key] = animation[key];\n});\n\nObject.keys(tuneBook).forEach(function (key) {\n\tabcjs[key] = tuneBook[key];\n});\n\nabcjs.renderAbc = __webpack_require__(/*! ./src/api/abc_tunebook_svg */ \"./node_modules/abcjs/src/api/abc_tunebook_svg.js\");\nabcjs.tuneMetrics = __webpack_require__(/*! ./src/api/tune-metrics */ \"./node_modules/abcjs/src/api/tune-metrics.js\");\nabcjs.TimingCallbacks = __webpack_require__(/*! ./src/api/abc_timing_callbacks */ \"./node_modules/abcjs/src/api/abc_timing_callbacks.js\");\n\nvar glyphs = __webpack_require__(/*! ./src/write/creation/glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nabcjs.setGlyph = glyphs.setSymbol;\nabcjs.strTranspose = strTranspose;\n\nvar CreateSynth = __webpack_require__(/*! ./src/synth/create-synth */ \"./node_modules/abcjs/src/synth/create-synth.js\");\nvar instrumentIndexToName = __webpack_require__(/*! ./src/synth/instrument-index-to-name */ \"./node_modules/abcjs/src/synth/instrument-index-to-name.js\");\nvar pitchToNoteName = __webpack_require__(/*! ./src/synth/pitch-to-note-name */ \"./node_modules/abcjs/src/synth/pitch-to-note-name.js\");\nvar SynthSequence = __webpack_require__(/*! ./src/synth/synth-sequence */ \"./node_modules/abcjs/src/synth/synth-sequence.js\");\nvar CreateSynthControl = __webpack_require__(/*! ./src/synth/create-synth-control */ \"./node_modules/abcjs/src/synth/create-synth-control.js\");\nvar registerAudioContext = __webpack_require__(/*! ./src/synth/register-audio-context */ \"./node_modules/abcjs/src/synth/register-audio-context.js\");\nvar activeAudioContext = __webpack_require__(/*! ./src/synth/active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\nvar supportsAudio = __webpack_require__(/*! ./src/synth/supports-audio */ \"./node_modules/abcjs/src/synth/supports-audio.js\");\nvar playEvent = __webpack_require__(/*! ./src/synth/play-event */ \"./node_modules/abcjs/src/synth/play-event.js\");\nvar SynthController = __webpack_require__(/*! ./src/synth/synth-controller */ \"./node_modules/abcjs/src/synth/synth-controller.js\");\nvar getMidiFile = __webpack_require__(/*! ./src/synth/get-midi-file */ \"./node_modules/abcjs/src/synth/get-midi-file.js\");\nvar midiRenderer = __webpack_require__(/*! ./src/synth/abc_midi_renderer */ \"./node_modules/abcjs/src/synth/abc_midi_renderer.js\");\n\nabcjs.synth = {\n\tCreateSynth: CreateSynth,\n\tinstrumentIndexToName: instrumentIndexToName,\n\tpitchToNoteName: pitchToNoteName,\n\tSynthController: SynthController,\n\tSynthSequence: SynthSequence,\n\tCreateSynthControl: CreateSynthControl,\n\tregisterAudioContext: registerAudioContext,\n\tactiveAudioContext: activeAudioContext,\n\tsupportsAudio: supportsAudio,\n\tplayEvent: playEvent,\n\tgetMidiFile: getMidiFile,\n\tsequence: sequence,\n\tmidiRenderer: midiRenderer,\n};\n\nabcjs['Editor'] = __webpack_require__(/*! ./src/edit/abc_editor */ \"./node_modules/abcjs/src/edit/abc_editor.js\");\nabcjs['EditArea'] = __webpack_require__(/*! ./src/edit/abc_editarea */ \"./node_modules/abcjs/src/edit/abc_editarea.js\");\n\nmodule.exports = abcjs;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/index.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/api/abc_animation.js":
/*!*****************************************************!*\
  !*** ./node_modules/abcjs/src/api/abc_animation.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_animation.js: handles animating the music in real time.\n\nvar TimingCallbacks = __webpack_require__(/*! ./abc_timing_callbacks */ \"./node_modules/abcjs/src/api/abc_timing_callbacks.js\");\n\nvar animation = {};\n\n(function() {\n\t\"use strict\";\n\n\tvar timer;\n\tvar cursor;\n\tanimation.startAnimation = function(paper, tune, options) {\n\t\t//options.bpm\n\t\t//options.showCursor\n\t\t//options.hideCurrentMeasure\n\t\t//options.hideFinishedMeasures\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\n\t\tif (options.showCursor) {\n\t\t\tcursor = paper.querySelector('.abcjs-cursor');\n\t\t\tif (!cursor) {\n\t\t\t\tcursor = document.createElement('DIV');\n\t\t\t\tcursor.className = 'abcjs-cursor cursor';\n\t\t\t\tcursor.style.position = 'absolute';\n\n\t\t\t\tpaper.appendChild(cursor);\n\t\t\t\tpaper.style.position = 'relative';\n\t\t\t}\n\t\t}\n\n\t\tfunction hideMeasures(elements) {\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tvar element = elements[i];\n\t\t\t\tif (!element.classList.contains('abcjs-bar'))\n\t\t\t\t\telement.style.display = \"none\";\n\t\t\t}\n\t\t}\n\n\t\tvar lastMeasure;\n\t\tfunction disappearMeasuresAfter(selector) {\n\t\t\tif (lastMeasure) {\n\t\t\t\tvar elements = paper.querySelectorAll(lastMeasure);\n\t\t\t\thideMeasures(elements);\n\t\t\t}\n\t\t\tlastMeasure = selector;\n\t\t}\n\n\t\tfunction disappearMeasuresBefore(selector) {\n\t\t\tvar elements = paper.querySelectorAll(selector);\n\t\t\thideMeasures(elements);\n\t\t}\n\n\t\tfunction measureCallback(selector) {\n\t\t\tif (options.hideCurrentMeasure) {\n\t\t\t\tdisappearMeasuresBefore(selector);\n\t\t\t} else if (options.hideFinishedMeasures) {\n\t\t\t\tdisappearMeasuresAfter(selector);\n\t\t\t}\n\t\t}\n\n\t\tfunction getLineAndMeasure(element) {\n\t\t\treturn '.abcjs-l' + element.line + '.abcjs-m' + element.measureNumber;\n\t\t}\n\n\t\tfunction setCursor(range) {\n\t\t\tif (range) {\n\t\t\t\tif (range.measureStart) {\n\t\t\t\t\tvar selector = getLineAndMeasure(range);\n\t\t\t\t\tif (selector)\n\t\t\t\t\t\tmeasureCallback(selector);\n\t\t\t\t}\n\t\t\t\tif (cursor) {\n\t\t\t\t\tcursor.style.left = range.left + \"px\";\n\t\t\t\t\tcursor.style.top = range.top + \"px\";\n\t\t\t\t\tcursor.style.width = range.width + \"px\";\n\t\t\t\t\tcursor.style.height = range.height + \"px\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttimer.stop();\n\t\t\t\ttimer = undefined;\n\t\t\t}\n\t\t}\n\n\t\ttimer = new TimingCallbacks(tune, {\n\t\t\tqpm: options.bpm,\n\t\t\teventCallback: setCursor\n\t\t});\n\t\ttimer.start();\n\t};\n\n\tanimation.pauseAnimation = function(pause) {\n\t\tif (timer) {\n\t\t\tif (pause)\n\t\t\t\ttimer.pause();\n\t\t\telse\n\t\t\t\ttimer.start();\n\t\t}\n\t};\n\n\tanimation.stopAnimation = function() {\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\t};\n\n})();\n\nmodule.exports = animation;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/api/abc_animation.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/api/abc_timing_callbacks.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/api/abc_timing_callbacks.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var TimingCallbacks = function(target, params) {\n\tvar self = this;\n\tif (!params) params = {};\n\tself.qpm = params.qpm ? parseInt(params.qpm, 10) : null;\n\tif (!self.qpm) {\n\t\tvar tempo = target.metaText ? target.metaText.tempo : null;\n\t\tself.qpm = target.getBpm(tempo);\n\t}\n\tself.extraMeasuresAtBeginning = params.extraMeasuresAtBeginning ? parseInt(params.extraMeasuresAtBeginning, 10) : 0;\n\tself.beatCallback = params.beatCallback; // This is called for each beat.\n\tself.eventCallback = params.eventCallback;   // This is called for each note or rest encountered.\n\tself.lineEndCallback = params.lineEndCallback;   // This is called when the end of a line is approaching.\n\tself.lineEndAnticipation = params.lineEndAnticipation ? parseInt(params.lineEndAnticipation, 10) : 0;   // How many milliseconds before the end should the call happen.\n\tself.beatSubdivisions = params.beatSubdivisions ? parseInt(params.beatSubdivisions, 10) : 1; // how many callbacks per beat is desired.\n\tself.joggerTimer = null;\n\n\tself.replaceTarget = function(newTarget) {\n\t\tself.noteTimings = newTarget.setTiming(self.qpm, self.extraMeasuresAtBeginning);\n\t\tif (newTarget.noteTimings.length === 0)\n\t\t\tself.noteTimings = newTarget.setTiming(0,0);\n\t\tif (self.lineEndCallback) {\n\t\t\tself.lineEndTimings = getLineEndTimings(newTarget.noteTimings, self.lineEndAnticipation);\n\t\t}\n\t\tself.startTime = null;\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.currentTime = 0;\n\t\tself.isPaused = false;\n\t\tself.isRunning = false;\n\t\tself.pausedPercent = null;\n\t\tself.justUnpaused = false;\n\t\tself.newSeekPercent = 0;\n\t\tself.lastTimestamp = 0;\n\n\t\tif (self.noteTimings.length === 0)\n\t\t\treturn;\n\t\t// noteTimings contains an array of events sorted by time. Events that happen at the same time are in the same element of the array.\n\t\tself.millisecondsPerBeat = 1000 / (self.qpm / 60) / self.beatSubdivisions;\n\t\tself.lastMoment = self.noteTimings[self.noteTimings.length-1].milliseconds;\n\t\tself.totalBeats = Math.round(self.lastMoment / self.millisecondsPerBeat);\n\t};\n\n\tself.replaceTarget(target);\n\n\tself.doTiming = function (timestamp) {\n\t\t// This is called 60 times a second, that is, every 16 msecs.\n\t\t//console.log(\"doTiming\", timestamp, timestamp-self.lastTimestamp);\n\t\tif (self.lastTimestamp === timestamp)\n\t\t\treturn; // If there are multiple seeks or other calls, then we can easily get multiple callbacks for the same instant.\n\t\tself.lastTimestamp = timestamp;\n\t\tif (!self.startTime) {\n\t\t\tself.startTime = timestamp;\n\t\t}\n\n\t\tif (!self.isPaused && self.isRunning) {\n\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\tself.currentTime += 16; // Add a little slop because this function isn't called exactly.\n\t\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\t\tif (self.eventCallback && self.noteTimings[self.currentEvent].type === 'event') {\n\t\t\t\t\tvar thisStartTime = self.startTime; // the event callback can call seek and change the position from beneath us.\n\t\t\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\t\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself.currentEvent++;\n\t\t\t}\n\t\t\tif (self.lineEndCallback && self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds < self.currentTime && self.currentEvent < self.noteTimings.length) {\n\t\t\t\tvar leftEvent = self.noteTimings[self.currentEvent].milliseconds === self.currentTime ? self.noteTimings[self.currentEvent] : self.noteTimings[self.currentEvent-1]\n\t\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], leftEvent, { line: self.currentLine, endTimings: self.lineEndTimings, currentTime: self.currentTime });\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t\tif (self.currentTime < self.lastMoment) {\n\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\tif (self.currentBeat * self.millisecondsPerBeat < self.currentTime) {\n\t\t\t\t\tvar ret = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret !== null)\n\t\t\t\t\t\tself.currentTime = ret;\n\t\t\t\t}\n\t\t\t} else if (self.currentBeat <= self.totalBeats) {\n\t\t\t\t// Because of timing issues (for instance, if the browser tab isn't active), the beat callbacks might not have happened when they are supposed to. To keep the client programs from having to deal with that, this will keep calling the loop until all of them have been sent.\n\t\t\t\tif (self.beatCallback) {\n\t\t\t\t\tvar ret2 = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret2 !== null)\n\t\t\t\t\t\tself.currentTime = ret2;\n\t\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self.currentTime >= self.lastMoment) {\n\t\t\t\tif (self.eventCallback) {\n\t\t\t\t\t// At the end, the event callback can return \"continue\" to keep from stopping.\n\t\t\t\t\t// The event callback can either be a promise or not.\n\t\t\t\t\tvar promise = self.eventCallback(null);\n\t\t\t\t\tself.shouldStop(promise).then(function(shouldStop) {\n\t\t\t\t\t\tif (shouldStop)\n\t\t\t\t\t\t\tself.stop();\n\t\t\t\t\t})\n\t\t\t\t} else\n\t\t\t\t\tself.stop();\n\t\t\t}\n\t\t}\n\t};\n\n\tself.shouldStop = function(promise) {\n\t\t// The return of the last event callback can be \"continue\" or a promise that returns \"continue\".\n\t\t// If it is then don't call stop. Any other value calls stop.\n\t\treturn new Promise(function (resolve) {\n\t\t\tif (!promise)\n\t\t\t\treturn resolve(true);\n\t\t\tif (promise === \"continue\")\n\t\t\t\treturn resolve(false);\n\t\t\tif (promise.then) {\n\t\t\t\tpromise.then(function (result) {\n\t\t\t\t\tresolve(result !== \"continue\");\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tself.doBeatCallback = function(timestamp) {\n\t\tif (self.beatCallback) {\n\t\t\tvar next = self.currentEvent;\n\t\t\twhile (next < self.noteTimings.length && self.noteTimings[next].left === null)\n\t\t\t\tnext++;\n\t\t\tvar endMs;\n\t\t\tvar ev;\n\t\t\tif (next < self.noteTimings.length) {\n\t\t\t\tendMs = self.noteTimings[next].milliseconds;\n\t\t\t\tnext = Math.max(0, self.currentEvent - 1);\n\t\t\t\twhile (next >= 0 && self.noteTimings[next].left === null)\n\t\t\t\t\tnext--;\n\n\t\t\t\tev = self.noteTimings[next];\n\t\t\t}\n\n\t\t\tvar position = {};\n\t\t\tvar debugInfo = {};\n\t\t\tif (ev) {\n\t\t\t\tposition.top = ev.top;\n\t\t\t\tposition.height = ev.height;\n\n\t\t\t\t// timestamp = the time passed in from the animation timer\n\t\t\t\t// self.startTime = the time that the tune was started (if there was seeking or pausing, it is adjusted to keep the math the same)\n\t\t\t\t// ev = the event that is either happening now or has most recently passed.\n\t\t\t\t// ev.milliseconds = the time that the current event starts (relative to self.startTime)\n\t\t\t\t// endMs = the time that the next event starts\n\t\t\t\t// ev.endX = the x coordinate that the next event happens (or the end of the line or repeat measure)\n\t\t\t\t// ev.left = the x coordinate of the current event\n\t\t\t\t//\n\t\t\t\t// The output is the X coordinate of the current cursor location. It is calculated with the ratio of the length of the event and the width of it.\n\t\t\t\tvar offMs = Math.max(0, timestamp-self.startTime-ev.milliseconds); // Offset in time from the last beat\n\t\t\t\tvar gapMs = endMs - ev.milliseconds; // Length of this event in time\n\t\t\t\tvar gapPx = ev.endX - ev.left; // The length in pixels\n\t\t\t\tvar offPx = gapMs ? offMs * gapPx / gapMs : 0;\n\t\t\t\tposition.left = ev.left + offPx;\n\t\t\t\t// See if this is before the first event - that is the case where there are \"prep beats\"\n\t\t\t\tif (self.currentEvent === 0 && ev.milliseconds > timestamp-self.startTime)\n\t\t\t\t\tposition.left = undefined\n\t\t\t\t\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t\tev: ev,\n\t\t\t\t\tendMs: endMs,\n\t\t\t\t\toffMs: offMs,\n\t\t\t\t\toffPx: offPx,\n\t\t\t\t\tgapMs: gapMs,\n\t\t\t\t\tgapPx: gapPx\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar thisStartTime = self.startTime; // the beat callback can call seek and change the position from beneath us.\n\t\t\tself.beatCallback(\n\t\t\t\tself.currentBeat / self.beatSubdivisions,\n\t\t\t\tself.totalBeats / self.beatSubdivisions,\n\t\t\t\tself.lastMoment,\n\t\t\t\tposition,\n\t\t\t\tdebugInfo);\n\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\treturn timestamp - self.startTime;\n\t\t\t} else\n\t\t\t\tself.currentBeat++;\n\t\t}\n\t\treturn null;\n\t};\n\n\t// In general music doesn't need a timer at 60 fps because notes don't happen that fast.\n\t// For instance, at 120 beats per minute, a sixteenth note takes 125ms. So just as a\n\t// compromise value between performance and jank this is set about half that.\n\tvar JOGGING_INTERVAL = 60;\n\n\tself.animationJogger = function() {\n\t\t// There are some cases where the animation timer doesn't work: for instance when\n\t\t// this isn't running in a visible tab and sometimes on mobile devices. We compensate\n\t\t// by having a backup timer using setTimeout. This won't be accurate so the performance\n\t\t// will be jerky, but without it the requestAnimationFrame might be skipped and so\n\t\t// not called again.\n\t\tif (self.isRunning) {\n\t\t\tself.doTiming(performance.now());\n\t\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t\t}\n\t};\n\n\tself.start = function(offsetPercent, units) {\n\t\tself.isRunning = true;\n\t\tif (self.isPaused) {\n\t\t\tself.isPaused = false;\n\t\t\tif (offsetPercent === undefined)\n\t\t\t\tself.justUnpaused = true;\n\t\t}\n\t\tif (offsetPercent) {\n\t\t\tself.setProgress(offsetPercent, units);\n\t\t} else if (offsetPercent === 0) {\n\t\t\tself.reset();\n\t\t} else if (self.pausedPercent !== null) {\n\t\t\tvar now = performance.now();\n\t\t\tself.currentTime = self.lastMoment * self.pausedPercent;\n\t\t\tself.startTime = now - self.currentTime;\n\t\t\tself.pausedPercent = null;\n\t\t\tself.reportNext = true;\n\t\t}\n\t\trequestAnimationFrame(self.doTiming);\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n\tself.pause = function() {\n\t\tself.isPaused = true;\n\t\tvar now = performance.now();\n\t\tself.pausedPercent = (now - self.startTime) / self.lastMoment;\n\t\tself.isRunning = false;\n\t\tif (self.joggerTimer) {\n\t\t\tclearTimeout(self.joggerTimer);\n\t\t\tself.joggerTimer = null;\n\t\t}\n\t};\n\tself.currentMillisecond = function() {\n\t\treturn self.currentTime;\n\t};\n\tself.reset = function() {\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.startTime = null;\n\t\tself.pausedPercent = null;\n\t};\n\tself.stop = function() {\n\t\tself.pause();\n\t\tself.reset();\n\t};\n\tself.setProgress = function(position, units) {\n\t\t// the effect of this function is to move startTime so that the callbacks happen correctly for the new seek.\n\t\tvar percent;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\tself.currentTime = position * 1000;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\tself.currentTime = position * self.millisecondsPerBeat * self.beatSubdivisions;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\t// this is passed a value between 0 and 1.\n\t\t\t\tpercent = position;\n\t\t\t\tif (percent < 0) percent = 0;\n\t\t\t\tif (percent > 1) percent = 1;\n\t\t\t\tself.currentTime = self.lastMoment * percent;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!self.isRunning)\n\t\t\tself.pausedPercent = percent;\n\n\t\tvar now = performance.now();\n\t\tself.startTime = now - self.currentTime;\n\n\t\tvar oldEvent = self.currentEvent;\n\t\tself.currentEvent = 0;\n\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\tself.currentEvent++;\n\t\t}\n\n\t\tif (self.lineEndCallback) {\n\t\t\tself.currentLine = 0;\n\t\t\twhile (self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds + self.lineEndAnticipation < self.currentTime) {\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t}\n\n\t\tvar oldBeat = self.currentBeat;\n\t\tself.currentBeat = Math.floor(self.currentTime / self.millisecondsPerBeat);\n\t\tif (self.beatCallback && oldBeat !== self.currentBeat) // If the movement caused the beat to change, then immediately report it to the client.\n\t\t\tself.doBeatCallback(self.startTime+self.currentTime);\n\n\t\tif (self.eventCallback && self.currentEvent >= 0 && self.noteTimings[self.currentEvent].type === 'event')\n\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\tif (self.lineEndCallback)\n\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], self.noteTimings[self.currentEvent], { line: self.currentLine, endTimings: self.lineEndTimings });\n\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n};\n\nfunction getLineEndTimings(timings, anticipation) {\n\t// Returns an array of milliseconds to call the lineEndCallback.\n\t// This figures out the timing of the beginning of each line and subtracts the anticipation from it.\n\tvar callbackTimes = [];\n\tvar lastTop = null;\n\tfor (var i = 0; i < timings.length; i++) {\n\t\tvar timing = timings[i];\n\t\tif (timing.type !== 'end' && timing.top !== lastTop) {\n\t\t\tcallbackTimes.push({ measureNumber: timing.measureNumber, milliseconds: timing.milliseconds-anticipation, top: timing.top, bottom: timing.top+timing.height });\n\t\t\tlastTop = timing.top;\n\t\t}\n\t}\n\treturn callbackTimes;\n}\n\nmodule.exports = TimingCallbacks;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/api/abc_timing_callbacks.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/api/abc_tunebook.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/api/abc_tunebook.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_tunebook.js: splits a string representing ABC Music Notation into individual tunes.\n\nvar Parse = __webpack_require__(/*! ../parse/abc_parse */ \"./node_modules/abcjs/src/parse/abc_parse.js\");\nvar bookParser = __webpack_require__(/*! ../parse/abc_parse_book */ \"./node_modules/abcjs/src/parse/abc_parse_book.js\");\nvar tablatures = __webpack_require__(/*! ../tablatures/abc_tablatures */ \"./node_modules/abcjs/src/tablatures/abc_tablatures.js\");\n\n\nvar tunebook = {};\n\n(function() {\n\t\"use strict\";\n\n\ttunebook.numberOfTunes = function(abc) {\n\t\tvar tunes = abc.split(\"\\nX:\");\n\t\tvar num = tunes.length;\n\t\tif (num === 0) num = 1;\n\t\treturn num;\n\t};\n\n\tvar TuneBook = tunebook.TuneBook = function(book) {\n\t\tvar parsed = bookParser(book);\n\t\tthis.header = parsed.header;\n\t\tthis.tunes = parsed.tunes;\n\t};\n\n\tTuneBook.prototype.getTuneById = function(id) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].id === ''+id)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\tTuneBook.prototype.getTuneByTitle = function(title) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].title === title)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\ttunebook.parseOnly = function(abc, params) {\n\t\tvar numTunes = tunebook.numberOfTunes(abc);\n\n\t\t// this just needs to be passed in because this tells the engine how many tunes to process.\n\t\tvar output = [];\n\t\tfor (var i = 0; i < numTunes; i++) {\n\t\t\toutput.push(1);\n\t\t}\n\t\tfunction callback() {\n\t\t\t// Don't need to do anything with the parsed tunes.\n\t\t}\n\t\treturn tunebook.renderEngine(callback, output, abc, params);\n\t};\n\n\ttunebook.renderEngine = function (callback, output, abc, params) {\n\t\tvar ret = [];\n\t\tvar isArray = function(testObject) {\n\t\t\treturn testObject && !(testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number';\n\t\t};\n\n\t\t// check and normalize input parameters\n\t\tif (output === undefined || abc === undefined)\n\t\t\treturn;\n\t\tif (!isArray(output))\n\t\t\toutput = [ output ];\n\t\tif (params === undefined)\n\t\t\tparams = {};\n\t\tvar currentTune = params.startingTune ? parseInt(params.startingTune, 10) : 0;\n\n\t\t// parse the abc string\n\t\tvar book = new TuneBook(abc);\n\t\tvar abcParser = new Parse();\n\n\t\t// output each tune, if it exists. Otherwise clear the div.\n\t\tfor (var i = 0; i < output.length; i++) {\n\t\t\tvar div = output[i];\n\t\t\tif (div === \"*\") {\n\t\t\t\t// This is for \"headless\" rendering: doing the work but not showing the svg.\n\t\t\t} else if (typeof(div) === \"string\")\n\t\t\t\tdiv = document.getElementById(div);\n\t\t\tif (div) {\n\t\t\t\tif (currentTune >= 0 && currentTune < book.tunes.length) {\n\t\t\t\t\tabcParser.parse(book.tunes[currentTune].abc, params, book.tunes[currentTune].startPos - book.header.length);\n\t\t\t\t\tvar tune = abcParser.getTune();\n\t\t\t\t\t//\n\t\t\t\t\t// Init tablatures plugins\n\t\t\t\t\t//\n\t\t\t\t\tif (params.tablature) {\n\t\t\t\t\t\ttune.tablatures = tablatures.preparePlugins(tune, currentTune, params);\n\t\t\t\t\t}\n\t\t\t\t\tvar warnings = abcParser.getWarnings();\n\t\t\t\t\tif (warnings)\n\t\t\t\t\t\ttune.warnings = warnings;\n\t\t\t\t\tvar override = callback(div, tune, i, book.tunes[currentTune].abc);\n\t\t\t\t\tret.push(override ? override : tune);\n\t\t\t\t} else {\n\t\t\t\t\tif (div['innerHTML'])\n\t\t\t\t\t\tdiv.innerHTML = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentTune++;\n\t\t}\n\t  return ret;\n\t};\n\n\tfunction flattenTune(tuneObj) {\n\t\t// This removes the line breaks and removes the non-music lines.\n\t\tvar staves = [];\n\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\tvar line = tuneObj.lines[j];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var k = 0; k < line.staff.length; k++) {\n\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\tif (!staves[k])\n\t\t\t\t\t\tstaves[k] = staff;\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\t\t\t\t\tif (staves[k].voices[i])\n\t\t\t\t\t\t\t\tstaves[k].voices[i] = staves[k].voices[i].concat(staff.voices[i]);\n\t\t\t\t\t\t\t// TODO-PER: If staves[k].voices[i] doesn't exist, that means a voice appeared in the middle of the tune. That isn't handled yet.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn staves;\n\t}\n\n\tfunction measuresParser(staff, tune) {\n\t\tvar voices = [];\n\t\tvar lastChord = null;\n\t\tvar measureStartChord = null;\n\t\tvar fragStart = null;\n\t\tvar hasNotes = false;\n\n\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\tvar voice = staff.voices[i];\n\t\t\tvoices.push([]);\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar elem = voice[j];\n\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\telse\n\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t}\n\t\t\t\tif (elem.chord)\n\t\t\t\t\tlastChord = elem;\n\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\tvoices[i].push(measure);\n\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\thasNotes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn voices;\n\t}\n\n\ttunebook.extractMeasures = function(abc) {\n\t\tvar tunes = [];\n\t\tvar book = new TuneBook(abc);\n\t\tfor (var i = 0; i < book.tunes.length; i++) {\n\t\t\tvar tune = book.tunes[i];\n\t\t\tvar arr = tune.abc.split(\"K:\");\n\t\t\tvar arr2 = arr[1].split(\"\\n\");\n\t\t\tvar header = arr[0] + \"K:\" + arr2[0] + \"\\n\";\n\t\t\tvar lastChord = null;\n\t\t\tvar measureStartChord = null;\n\t\t\tvar fragStart = null;\n\t\t\tvar measures = [];\n\t\t\tvar hasNotes = false;\n\t\t\tvar tuneObj = tunebook.parseOnly(tune.abc)[0];\n\t\t\tvar hasPickup = tuneObj.getPickupLength() > 0;\n\t\t\t// var staves = flattenTune(tuneObj);\n\t\t\t// for (var s = 0; s < staves.length; s++) {\n\t\t\t// \tvar voices = measuresParser(staves[s], tune);\n\t\t\t// \tif (s === 0)\n\t\t\t// \t\tmeasures = voices;\n\t\t\t// \telse {\n\t\t\t// \t\tfor (var ss = 0; ss < voices.length; ss++) {\n\t\t\t// \t\t\tvar voice = voices[ss];\n\t\t\t// \t\t\tif (measures.length <= ss)\n\t\t\t// \t\t\t\tmeasures.push([]);\n\t\t\t// \t\t\tvar measureVoice = measures[ss];\n\t\t\t// \t\t\tfor (var sss = 0; sss < voice.length; sss++) {\n\t\t\t// \t\t\t\tif (measureVoice.length > sss)\n\t\t\t// \t\t\t\t\tmeasureVoice[sss].abc += \"\\n\" + voice[sss].abc;\n\t\t\t// \t\t\t\telse\n\t\t\t// \t\t\t\t\tmeasures.push(voice[sss]);\n\t\t\t// \t\t\t}\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// \tconsole.log(voices);\n\t\t\t// }\n\t\t\t// measures = measures[0];\n\n\t\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\t\tvar line = tuneObj.lines[j];\n\t\t\t\tif (line.staff) {\n\t\t\t\t\tfor (var k = 0; k < 1 /*line.staff.length*/; k++) {\n\t\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\t\tfor (var kk = 0; kk < 1 /*staff.voices.length*/; kk++) {\n\t\t\t\t\t\t\tvar voice = staff.voices[kk];\n\t\t\t\t\t\t\tfor (var kkk = 0; kkk < voice.length; kkk++) {\n\t\t\t\t\t\t\t\tvar elem = voice[kkk];\n\t\t\t\t\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (elem.chord)\n\t\t\t\t\t\t\t\t\tlastChord = elem;\n\t\t\t\t\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\t\t\t\t\tmeasures.push(measure);\n\t\t\t\t\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\t\t\t\t\thasNotes = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttunes.push({\n\t\t\t\theader: header,\n\t\t\t\tmeasures: measures,\n\t\t\t\thasPickup: hasPickup\n\t\t\t});\n\t\t}\n\t\treturn tunes;\n\t};\n})();\n\nmodule.exports = tunebook;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/api/abc_tunebook.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/api/abc_tunebook_svg.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/api/abc_tunebook_svg.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var tunebook = __webpack_require__(/*! ./abc_tunebook */ \"./node_modules/abcjs/src/api/abc_tunebook.js\");\nvar Tune = __webpack_require__(/*! ../data/abc_tune */ \"./node_modules/abcjs/src/data/abc_tune.js\");\n\nvar EngraverController = __webpack_require__(/*! ../write/engraver-controller */ \"./node_modules/abcjs/src/write/engraver-controller.js\");\nvar Parse = __webpack_require__(/*! ../parse/abc_parse */ \"./node_modules/abcjs/src/parse/abc_parse.js\");\nvar wrap = __webpack_require__(/*! ../parse/wrap_lines */ \"./node_modules/abcjs/src/parse/wrap_lines.js\");\n\n\nvar resizeDivs = {};\nfunction resizeOuter() {\n    var width = window.innerWidth;\n    for (var id in resizeDivs) {\n        if (resizeDivs.hasOwnProperty(id)) {\n            var outer = resizeDivs[id];\n            var ofs = outer.offsetLeft;\n            width -= ofs * 2;\n            outer.style.width = width + \"px\";\n        }\n    }\n}\n\ntry {\n    window.addEventListener(\"resize\", resizeOuter);\n    window.addEventListener(\"orientationChange\", resizeOuter);\n} catch(e) {\n    // if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nfunction renderOne(div, tune, params, tuneNumber, lineOffset) {\n    if (params.viewportHorizontal) {\n        // Create an inner div that holds the music, so that the passed in div will be the viewport.\n        div.innerHTML = '<div class=\"abcjs-inner\"></div>';\n        if (params.scrollHorizontal) {\n            div.style.overflowX = \"auto\";\n            div.style.overflowY = \"hidden\";\n        } else\n            div.style.overflow = \"hidden\";\n        resizeDivs[div.id] = div; // We use a hash on the element's id so that multiple calls won't keep adding to the list.\n        div = div.children[0]; // The music should be rendered in the inner div.\n    }\n    else if (params.viewportVertical) {\n        // Create an inner div that holds the music, so that the passed in div will be the viewport.\n        div.innerHTML = '<div class=\"abcjs-inner scroll-amount\"></div>';\n        div.style.overflowX = \"hidden\";\n        div.style.overflowY = \"auto\";\n        div = div.children[0]; // The music should be rendered in the inner div.\n    }\n    else\n\t    div.innerHTML = \"\";\n    var engraver_controller = new EngraverController(div, params);\n    engraver_controller.engraveABC(tune, tuneNumber, lineOffset);\n    tune.engraver = engraver_controller;\n    if (params.viewportVertical || params.viewportHorizontal) {\n        // If we added a wrapper around the div, then we need to size the wrapper, too.\n        var parent = div.parentNode;\n        parent.style.width = div.style.width;\n    }\n}\n\n// A quick way to render a tune from javascript when interactivity is not required.\n// This is used when a javascript routine has some abc text that it wants to render\n// in a div or collection of divs. One tune or many can be rendered.\n//\n// parameters:\n//      output: an array of divs that the individual tunes are rendered to.\n//          If the number of tunes exceeds the number of divs in the array, then\n//          only the first tunes are rendered. If the number of divs exceeds the number\n//          of tunes, then the unused divs are cleared. The divs can be passed as either\n//          elements or strings of ids. If ids are passed, then the div MUST exist already.\n//          (if a single element is passed, then it is an implied array of length one.)\n//          (if a null is passed for an element, or the element doesn't exist, then that tune is skipped.)\n//      abc: text representing a tune or an entire tune book in ABC notation.\n//      renderParams: hash of:\n//          startingTune: an index, starting at zero, representing which tune to start rendering at.\n//              (If this element is not present, then rendering starts at zero.)\n//          width: 800 by default. The width in pixels of the output paper\nvar renderAbc = function(output, abc, parserParams, engraverParams, renderParams) {\n    // Note: all parameters have been condensed into the first ones. It doesn't hurt anything to allow the old format, so just copy them here.\n    var params = {};\n    var key;\n    if (parserParams) {\n        for (key in parserParams) {\n            if (parserParams.hasOwnProperty(key)) {\n                params[key] = parserParams[key];\n            }\n        }\n        if (params.warnings_id && params.tablature) {\n            params.tablature.warning_id = params.warnings_id;\n        }\n    }\n    if (engraverParams) {\n        for (key in engraverParams) {\n            if (engraverParams.hasOwnProperty(key)) {\n\t            // There is a conflict with the name of the parameter \"listener\". If it is in the second parameter, then it is for click.\n\t            if (key === \"listener\") {\n\t            \tif (engraverParams[key].highlight)\n\t\t                params.clickListener = engraverParams[key].highlight;\n\t            } else\n                    params[key] = engraverParams[key];\n            }\n        }\n    }\n    if (renderParams) {\n        for (key in renderParams) {\n            if (renderParams.hasOwnProperty(key)) {\n                params[key] = renderParams[key];\n            }\n        }\n    }\n\n    function callback(div, tune, tuneNumber, abcString) {\n        var removeDiv = false;\n        if (div === \"*\") {\n            removeDiv = true;\n            div = document.createElement(\"div\");\n            div.setAttribute(\"style\", \"visibility: hidden;\");\n            document.body.appendChild(div);\n        }\n        if (!removeDiv && params.wrap && params.staffwidth) {\n            tune = doLineWrapping(div, tune, tuneNumber, abcString, params);\n\t        return tune;\n        }\n        if (params.afterParsing)\n            params.afterParsing(tune, tuneNumber, abcString);\n        renderOne(div, tune, params, tuneNumber, 0);\n        if (removeDiv)\n            div.parentNode.removeChild(div);\n        return null;\n    }\n\n    return tunebook.renderEngine(callback, output, abc, params);\n};\n\nfunction doLineWrapping(div, tune, tuneNumber, abcString, params) {\n\tvar engraver_controller = new EngraverController(div, params);\n\tvar widths = engraver_controller.getMeasureWidths(tune);\n\n\tvar ret = wrap.calcLineWraps(tune, widths, params);\n\tif (ret.reParse) {\n        var abcParser = new Parse();\n        abcParser.parse(abcString, ret.revisedParams);\n        tune = abcParser.getTune();\n        var warnings = abcParser.getWarnings();\n        if (warnings)\n            tune.warnings = warnings;\n    }\n    if (params.afterParsing)\n        params.afterParsing(tune, tuneNumber, abcString);\n    renderOne(div, tune, ret.revisedParams, tuneNumber, 0);\n\ttune.explanation = ret.explanation;\n\treturn tune;\n}\n\nmodule.exports = renderAbc;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/api/abc_tunebook_svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/api/tune-metrics.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/api/tune-metrics.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var tunebook = __webpack_require__(/*! ./abc_tunebook */ \"./node_modules/abcjs/src/api/abc_tunebook.js\");\nvar EngraverController = __webpack_require__(/*! ../write/engraver-controller */ \"./node_modules/abcjs/src/write/engraver-controller.js\");\n\nvar tuneMetrics = function(abc, params) {\n    function callback(div, tune, tuneNumber, abcString) {\n\t\tdiv = document.createElement(\"div\");\n\t\tdiv.setAttribute(\"style\", \"visibility: hidden;\");\n\t\tdocument.body.appendChild(div);\n\t\tvar engraver_controller = new EngraverController(div, params);\n\t\tvar widths = engraver_controller.getMeasureWidths(tune);\n            div.parentNode.removeChild(div);\n        return {sections: widths};\n    }\n\n    return tunebook.renderEngine(callback, \"*\", abc, params);\n};\n\nmodule.exports = tuneMetrics;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/api/tune-metrics.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/const/key-accidentals.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/const/key-accidentals.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var { relativeMajor } = __webpack_require__(/*! ./relative-major */ \"./node_modules/abcjs/src/const/relative-major.js\");\n\nvar key1sharp = { acc: 'sharp', note: 'f' };\nvar key2sharp = { acc: 'sharp', note: 'c' };\nvar key3sharp = { acc: 'sharp', note: 'g' };\nvar key4sharp = { acc: 'sharp', note: 'd' };\nvar key5sharp = { acc: 'sharp', note: 'A' };\nvar key6sharp = { acc: 'sharp', note: 'e' };\nvar key7sharp = { acc: 'sharp', note: 'B' };\nvar key1flat = { acc: 'flat', note: 'B' };\nvar key2flat = { acc: 'flat', note: 'e' };\nvar key3flat = { acc: 'flat', note: 'A' };\nvar key4flat = { acc: 'flat', note: 'd' };\nvar key5flat = { acc: 'flat', note: 'G' };\nvar key6flat = { acc: 'flat', note: 'c' };\nvar key7flat = { acc: 'flat', note: 'F' };\n\nvar keys = {\n\t'C#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp, key7sharp],\n\t'F#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp],\n\t'B': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp],\n\t'E': [key1sharp, key2sharp, key3sharp, key4sharp],\n\t'A': [key1sharp, key2sharp, key3sharp],\n\t'D': [key1sharp, key2sharp],\n\t'G': [key1sharp],\n\t'C': [],\n\t'F': [key1flat],\n\t'Bb': [key1flat, key2flat],\n\t'Eb': [key1flat, key2flat, key3flat],\n\t'Cm': [key1flat, key2flat, key3flat],\n\t'Ab': [key1flat, key2flat, key3flat, key4flat],\n\t'Db': [key1flat, key2flat, key3flat, key4flat, key5flat],\n\t'Gb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat],\n\t'Cb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat, key7flat],\n\n\t// The following are not in the 2.0 spec, but seem normal enough.\n\t// TODO-PER: These SOUND the same as what's written, but they aren't right\n\t'A#': [key1flat, key2flat],\n\t'B#': [],\n\t'D#': [key1flat, key2flat, key3flat],\n\t'E#': [key1flat],\n\t'G#': [key1flat, key2flat, key3flat, key4flat],\n\t'none': [],\n};\n\nfunction keyAccidentals(key) {\n\tvar newKey = keys[relativeMajor(key)]\n\tif (!newKey) // If we don't recognize the key then there is no change\n\t\treturn null\n\treturn JSON.parse(JSON.stringify(newKey))\n};\n\nmodule.exports = keyAccidentals;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/const/key-accidentals.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/const/relative-major.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/const/relative-major.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// All these keys have the same number of accidentals\nvar keys = {\n\t'C': { modes: ['CMaj', 'Amin', 'Am', 'GMix', 'DDor', 'EPhr', 'FLyd', 'BLoc'], stepsFromC: 0 },\n\t'Db': { modes: ['DbMaj', 'Bbmin', 'Bbm', 'AbMix', 'EbDor', 'FPhr', 'GbLyd', 'CLoc'], stepsFromC: 1 },\n\t'D': { modes: ['DMaj', 'Bmin', 'Bm', 'AMix', 'EDor', 'F#Phr', 'GLyd', 'C#Loc'], stepsFromC: 2 },\n\t'Eb': { modes: ['EbMaj', 'Cmin', 'Cm', 'BbMix', 'FDor', 'GPhr', 'AbLyd', 'DLoc'], stepsFromC: 3 },\n\t'E': { modes: ['EMaj', 'C#min', 'C#m', 'BMix', 'F#Dor', 'G#Phr', 'ALyd', 'D#Loc'], stepsFromC: 4 },\n\t'F': { modes: ['FMaj', 'Dmin', 'Dm', 'CMix', 'GDor', 'APhr', 'BbLyd', 'ELoc'], stepsFromC: 5 },\n\t'Gb': { modes: ['GbMaj', 'Ebmin', 'Ebm', 'DbMix', 'AbDor', 'BbPhr', 'CbLyd', 'FLoc'], stepsFromC: 6 },\n\t'G': { modes: ['GMaj', 'Emin', 'Em', 'DMix', 'ADor', 'BPhr', 'CLyd', 'F#Loc'], stepsFromC: 7 },\n\t'Ab': { modes: ['AbMaj', 'Fmin', 'Fm', 'EbMix', 'BbDor', 'CPhr', 'DbLyd', 'GLoc'], stepsFromC: 8 },\n\t'A': { modes: ['AMaj', 'F#min', 'F#m', 'EMix', 'BDor', 'C#Phr', 'DLyd', 'G#Loc'], stepsFromC: 9 },\n\t'Bb': { modes: ['BbMaj', 'Gmin', 'Gm', 'FMix', 'CDor', 'DPhr', 'EbLyd', 'ALoc'], stepsFromC: 10 },\n\t'B': { modes: ['BMaj', 'G#min', 'G#m', 'F#Mix', 'C#Dor', 'D#Phr', 'ELyd', 'A#Loc'], stepsFromC: 11 },\n\t// Enharmonic keys\n\t'C#': { modes: ['C#Maj', 'A#min', 'A#m', 'G#Mix', 'D#Dor', 'E#Phr', 'F#Lyd', 'B#Loc'], stepsFromC: 1 },\n\t'F#': { modes: ['F#Maj', 'D#min', 'D#m', 'C#Mix', 'G#Dor', 'A#Phr', 'BLyd', 'E#Loc'], stepsFromC: 6 },\n\t'Cb': { modes: ['CbMaj', 'Abmin', 'Abm', 'GbMix', 'DbDor', 'EbPhr', 'FbLyd', 'BbLoc'], stepsFromC: 11 },\n}\n\nvar keyReverse = null\n\nfunction createKeyReverse() {\n\tkeyReverse = {}\n\tvar allKeys = Object.keys(keys)\n\tfor (var i = 0 ; i < allKeys.length; i++) {\n\t\tvar keyObj = keys[allKeys[i]]\n\t\tkeyReverse[allKeys[i].toLowerCase()] = allKeys[i];\n\t\tfor (var j = 0; j < keyObj.modes.length; j++) {\n\t\t\tvar mode = keyObj.modes[j].toLowerCase()\n\t\t\tkeyReverse[mode] = allKeys[i];\n\t\t}\n\t}\n}\n\nfunction relativeMajor(key) {\n\t// Translate a key to its relative major. If it doesn't exist, do the best we can\n\t// by just returning the original key.\n\t// There are alternate spellings of these - so the search needs to be case insensitive.\n\t// To make this efficient, the first time this is called the \"keys\" object is reversed so this search is fast in the future\n\tif (!keyReverse) {\n\t\tcreateKeyReverse()\n\t}\n\t// get the key portion itself - there might be other stuff, like extra sharps and flats, or the mode written out.\n\tvar mode = key.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/)\n\tif (!mode || !mode[2])\n\t\treturn key;\n\tmode = mode[1] + mode[2]\n\tvar maj = keyReverse[mode]\n\tif (maj)\n\t\treturn maj;\n\treturn key;\n}\n\nfunction relativeMode(majorKey, mode) {\n\t// The reverse of the relativeMajor. Translate it back to the original mode.\n\t// If it isn't a recognized mode or it is already major, then just return the major key.\n\tvar group = keys[majorKey]\n\tif (!group)\n\t\treturn majorKey;\n\tif (mode === '')\n\t\treturn majorKey;\n\tvar match = mode.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/)\t\n\tif (!match)\n\t\treturn majorKey\n\tvar regMode = match[1]\t\n\tfor (var i = 0; i < group.modes.length; i++) {\n\t\tvar thisMode = group.modes[i]\n\t\tvar ind = thisMode.toLowerCase().indexOf(regMode)\n\t\tif (ind !== -1 && ind === thisMode.length - regMode.length)\n\t\t\treturn thisMode.substring(0, thisMode.length - regMode.length)\n\t}\n\treturn majorKey;\n}\n\nfunction transposeKey(key, steps) {\n\t// This takes a major key and adds the desired steps.\n\t// It assigns each key a number that is the number of steps from C so that there can just be arithmetic.\n\tvar match = keys[key]\n\tif (!match)\n\t\treturn key;\n\twhile (steps < 0) steps += 12;\n\tvar fromC = (match.stepsFromC + steps) % 12;\n\tfor (var i = 0;  i < Object.keys(keys).length; i++) {\n\t\tvar k = Object.keys(keys)[i]\n\t\tif (keys[k].stepsFromC === fromC)\n\t\t\treturn k;\n\t}\n\treturn key;\n}\n\nmodule.exports = {relativeMajor: relativeMajor, relativeMode: relativeMode, transposeKey: transposeKey};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/const/relative-major.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/data/abc_tune.js":
/*!*************************************************!*\
  !*** ./node_modules/abcjs/src/data/abc_tune.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_tune.js: a computer usable internal structure representing one tune.\n\nvar parseCommon = __webpack_require__(/*! ../parse/abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\nvar spacing = __webpack_require__(/*! ../write/helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar sequence = __webpack_require__(/*! ../synth/abc_midi_sequencer */ \"./node_modules/abcjs/src/synth/abc_midi_sequencer.js\");\nvar flatten = __webpack_require__(/*! ../synth/abc_midi_flattener */ \"./node_modules/abcjs/src/synth/abc_midi_flattener.js\");\nvar delineTune = __webpack_require__(/*! ./deline-tune */ \"./node_modules/abcjs/src/data/deline-tune.js\");\n\n/**\n * This is the data for a single ABC tune. It is created and populated by the window.ABCJS.parse.Parse class.\n * Also known as the ABCJS Abstract Syntax Tree\n * @alternateClassName ABCJS.Tune\n */\nvar Tune = function() {\n\tthis.reset = function () {\n\t\tthis.version = \"1.1.0\";\n\t\tthis.media = \"screen\";\n\t\tthis.metaText = {};\n\t\tthis.metaTextInfo = {};\n\t\tthis.formatting = {};\n\t\tthis.lines = [];\n\t\tthis.staffNum = 0;\n\t\tthis.voiceNum = 0;\n\t\tthis.lineNum = 0;\n\t\tthis.runningFonts = {};\n\t\tdelete this.visualTranspose;\n\t};\n\tthis.reset();\n\n\tfunction copy(dest, src, prop, attrs) {\n\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\tdest[prop][attrs[i]] = src[prop][attrs[i]];\n\t}\n\n\tthis.copyTopInfo = function(src) {\n\t\tvar attrs = ['tempo', 'title', 'header', 'rhythm', 'origin', 'composer', 'author', 'partOrder'];\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\tthis.copyBottomInfo = function(src) {\n\t\tvar attrs = ['unalignedWords',\n\t\t\t'book',\n\t\t\t'source',\n\t\t\t'discography',\n\t\t\t'notes',\n\t\t\t'transcription',\n\t\t\t'history',\n\t\t\t'abc-copyright',\n\t\t\t'abc-creator',\n\t\t\t'abc-edited-by',\n\t\t\t'footer']\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\t// The structure consists of a hash with the following two items:\n\t// metaText: a hash of {key, value}, where key is one of: title, author, rhythm, source, transcription, unalignedWords, etc...\n\t// tempo: { noteLength: number (e.g. .125), bpm: number }\n\t// lines: an array of elements, or one of the following:\n\t//\n\t// STAFF: array of elements\n\t// SUBTITLE: string\n\t//\n\t// TODO: actually, the start and end char should modify each part of the note type\n\t// The elements all have a type field and a start and end char\n\t// field. The rest of the fields depend on the type and are listed below:\n\t// REST: duration=1,2,4,8; chord: string\n\t// NOTE: accidental=none,dbl_flat,flat,natural,sharp,dbl_sharp\n\t//\t\tpitch: \"C\" is 0. The numbers refer to the pitch letter.\n\t//\t\tduration: .5 (sixteenth), .75 (dotted sixteenth), 1 (eighth), 1.5 (dotted eighth)\n\t//\t\t\t2 (quarter), 3 (dotted quarter), 4 (half), 6 (dotted half) 8 (whole)\n\t//\t\tchord: { name:chord, position: one of 'default', 'above', 'below' }\n\t//\t\tend_beam = true or undefined if this is the last note in a beam.\n\t//\t\tlyric: array of { syllable: xxx, divider: one of \" -_\" }\n\t//\t\tstartTie = true|undefined\n\t//\t\tendTie = true|undefined\n\t//\t\tstartTriplet = num <- that is the number to print\n\t//\t\tendTriplet = true|undefined (the last note of the triplet)\n\t// TODO: actually, decoration should be an array.\n\t//\t\tdecoration: upbow, downbow, accent\n\t// BAR: type=bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\t//\tnumber: 1 or 2: if it is the start of a first or second ending\n\t// CLEF: type=treble,bass\n\t// KEY-SIG:\n\t//\t\taccidentals[]: { acc:sharp|dblsharp|natural|flat|dblflat,  note:a|b|c|d|e|f|g }\n\t// METER: type: common_time,cut_time,specified\n\t//\t\tif specified, { num: 99, den: 99 }\n\n\tthis.getBeatLength = function() {\n\t\t// This returns a fraction: for instance 1/4 for a quarter\n\t\t// There are two types of meters: compound and regular. Compound meter has 3 beats counted as one.\n\t\tvar meter = this.getMeterFraction();\n\t\tvar multiplier = 1;\n\t\tif (meter.num === 6 || meter.num === 9 || meter.num === 12)\n\t\t\tmultiplier = 3;\n\t\telse if (meter.num === 3 && meter.den === 8)\n\t\t\tmultiplier = 3;\n\n\t\treturn multiplier / meter.den;\n\t};\n\n\tfunction computePickupLength(lines, barLength) {\n\t\tvar pickupLength = 0;\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\tif (lines[i].staff) {\n\t\t\t\tfor (var j = 0; j < lines[i].staff.length; j++) {\n\t\t\t\t\tfor (var v = 0; v < lines[i].staff[j].voices.length; v++) {\n\t\t\t\t\t\tvar voice = lines[i].staff[j].voices[v];\n\t\t\t\t\t\tvar tripletMultiplier = 1;\n\t\t\t\t\t\tfor (var el = 0; el < voice.length; el++) {\n\t\t\t\t\t\t\tvar isSpacer = voice[el].rest && voice[el].rest.type === \"spacer\";\n\t\t\t\t\t\t\tif (voice[el].startTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = voice[el].tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].duration && !isSpacer && voice[el].el_type !== \"tempo\")\n\t\t\t\t\t\t\t\tpickupLength += voice[el].duration * tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].endTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = 1;\n\t\t\t\t\t\t\tif (pickupLength >= barLength)\n\t\t\t\t\t\t\t\tpickupLength -= barLength;\n\t\t\t\t\t\t\tif (voice[el].el_type === 'bar')\n\t\t\t\t\t\t\t\treturn pickupLength;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn pickupLength;\n\t}\n\tthis.getPickupLength = function() {\n\t\tvar barLength = this.getBarLength();\n\t\tvar pickupLength = computePickupLength(this.lines, barLength);\n\n\t\t// If computed pickup length is very close to 0 or the bar length, we assume\n\t\t// that we actually have a full bar and hence no pickup.\n\t\treturn (pickupLength < 1e-8 || barLength-pickupLength < 1e-8) ? 0 : pickupLength;\n\t};\n\n\tthis.getBarLength = function() {\n\t\tvar meter = this.getMeterFraction();\n\t\treturn meter.num / meter.den;\n\t};\n\n\tthis.getTotalTime = function() {\n\t\treturn this.totalTime;\n\t};\n\n\tthis.getTotalBeats = function() {\n\t\treturn this.totalBeats;\n\t};\n\n\tthis.millisecondsPerMeasure = function(bpmOverride) {\n\t\tvar bpm;\n\t\tif (bpmOverride) {\n\t\t\tbpm = bpmOverride;\n\t\t} else {\n\t\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\t\tbpm = this.getBpm(tempo);\n\t\t}\n\t\tif (bpm <= 0)\n\t\t\tbpm = 1; // I don't think this can happen, but we don't want a possibility of dividing by zero.\n\n\t\tvar beatsPerMeasure = this.getBeatsPerMeasure();\n\n\t\tvar minutesPerMeasure = beatsPerMeasure / bpm;\n\t\treturn minutesPerMeasure * 60000;\n\t};\n\n\tthis.getBeatsPerMeasure = function() {\n\t\tvar beatLen = this.getBeatLength();\n\t\tvar barLen = this.getBarLength();\n\t\treturn barLen / beatLen;\n\t};\n\n\tthis.getMeter = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar meter = line.staff[j].meter;\n\t\t\t\t\tif (meter) {\n\t\t\t\t\t\treturn meter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { type: \"common_time\" };\n\t};\n\n\tthis.getMeterFraction = function() {\n\t\tvar meter = this.getMeter();\n\t\tvar num = 4;\n\t\tvar den = 4;\n\t\tif (meter) {\n\t\t\tif (meter.type === 'specified') {\n\t\t\t\tnum = parseInt(meter.value[0].num, 10);\n\t\t\t\tden = parseInt(meter.value[0].den,10);\n\t\t\t} else if (meter.type === 'cut_time') {\n\t\t\t\tnum = 2;\n\t\t\t\tden = 2;\n\t\t\t} else if (meter.type === 'common_time') {\n\t\t\t\tnum = 4;\n\t\t\t\tden = 4;\n\t\t\t}\n\t\t}\n\t\tthis.meter = { num: num, den: den };\n\t\treturn this.meter; // TODO-PER: is this saved value used anywhere? A get function shouldn't change state.\n\t};\n\n\tthis.getKeySignature = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tif (line.staff[j].key)\n\t\t\t\t\t\treturn line.staff[j].key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn {  };\n\t};\n\n\tthis.getElementFromChar = function(char) {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar staff = line.staff[j];\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tfor (var ii = 0; ii < voice.length; ii++) {\n\t\t\t\t\t\t\tvar elem = voice[ii];\n\t\t\t\t\t\t\tif (elem.startChar && elem.endChar &&\n\t\t\t\t\t\t\t\telem.startChar <= char && elem.endChar > char)\n\t\t\t\t\t\t\t\treturn elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tfunction addVerticalInfo(timingEvents) {\n\t\t// Add vertical info to the bar events: put the next event's top, and the event after the next measure's top.\n\t\tvar lastBarTop;\n\t\tvar lastBarBottom;\n\t\tvar lastEventTop;\n\t\tvar lastEventBottom;\n\t\tfor (var e = timingEvents.length - 1; e >= 0; e--) {\n\t\t\tvar ev = timingEvents[e];\n\t\t\tif (ev.type === 'bar') {\n\t\t\t\tev.top = lastEventTop;\n\t\t\t\tev.nextTop = lastBarTop;\n\t\t\t\tlastBarTop = lastEventTop;\n\n\t\t\t\tev.bottom = lastEventBottom;\n\t\t\t\tev.nextBottom = lastBarBottom;\n\t\t\t\tlastBarBottom = lastEventBottom;\n\t\t\t} else if (ev.type === 'event') {\n\t\t\t\tlastEventTop = ev.top;\n\t\t\t\tlastEventBottom = ev.top + ev.height;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction makeSortedArray(hash) {\n\t\tvar arr = [];\n\t\tfor (var k in hash) {\n\t\t\tif (hash.hasOwnProperty(k))\n\t\t\t\tarr.push(hash[k]);\n\t\t}\n\t\tarr = arr.sort(function (a, b) {\n\t\t\tvar diff = a.milliseconds - b.milliseconds;\n\t\t\t// if the events have the same time, make sure a bar comes before a note\n\t\t\tif (diff !== 0) {\n\t\t\t\treturn diff;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn a.type === \"bar\" ? -1 : 1;\n\t\t\t}\n\t\t});\n\t\treturn arr;\n\t}\n\n\tthis.addElementToEvents = function(eventHash, element, voiceTimeMilliseconds, top, height, line, measureNumber, timeDivider, isTiedState, nextIsBar) {\n\t\tif (element.hint)\n\t\t\treturn { isTiedState: undefined, duration: 0 };\n\t\tvar realDuration = element.durationClass ? element.durationClass : element.duration;\n\t\tif (element.abcelem.rest && element.abcelem.rest.type === \"spacer\")\n\t\t\trealDuration = 0;\n\t\tif (realDuration > 0) {\n\t\t\tvar es = [];\n\t\t\t// If there is an invisible rest, then there are not elements, so don't push a null one.\n\t\t\tfor (var i = 0; i < element.elemset.length; i++) {\n\t\t\t\tif (element.elemset[i] !== null)\n\t\t\t\t\tes.push(element.elemset[i]);\n\t\t\t}\n\t\t\tvar isTiedToNext = element.startTie;\n\t\t\tif (isTiedState !== undefined) {\n\t\t\t\teventHash[\"event\" + isTiedState].elements.push(es); // Add the tied note to the first note that it is tied to\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\t\tline: line,\n\t\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\t\theight: height,\n\t\t\t\t\t\t\tleft: null,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\telements: [],\n\t\t\t\t\t\t\tstartChar: null,\n\t\t\t\t\t\t\tendChar: null,\n\t\t\t\t\t\t\tstartCharArray: [],\n\t\t\t\t\t\t\tendCharArray: []\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\tif (!isTiedToNext)\n\t\t\t\t\tisTiedState = undefined;\n\t\t\t} else {\n\t\t\t\t// the last note wasn't tied.\n\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\tline: line,\n\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: element.x,\n\t\t\t\t\t\twidth: element.w,\n\t\t\t\t\t\telements: [es],\n\t\t\t\t\t\tstartChar: element.abcelem.startChar,\n\t\t\t\t\t\tendChar: element.abcelem.endChar,\n\t\t\t\t\t\tstartCharArray: [element.abcelem.startChar],\n\t\t\t\t\t\tendCharArray: [element.abcelem.endChar],\n\t\t\t\t\t\tmidiPitches: element.abcelem.midiPitches ? parseCommon.cloneArray(element.abcelem.midiPitches) : []\n\t\t\t\t\t};\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = parseCommon.cloneArray(element.abcelem.midiGraceNotePitches);\n\t\t\t\t} else {\n\t\t\t\t\t// If there is more than one voice then two notes can fall at the same time. Usually they would be lined up in the same place, but if it is a whole rest, then it is placed funny. In any case, the left most element wins.\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].left)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = Math.min(eventHash[\"event\" + voiceTimeMilliseconds].left, element.x);\n\t\t\t\t\telse\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = element.x;\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].elements.push(es);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startCharArray.push(element.abcelem.startChar);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endCharArray.push(element.abcelem.endChar);\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].startChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startChar =element.abcelem.startChar;\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].endChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endChar =element.abcelem.endChar;\n\t\t\t\t\tif (element.abcelem.midiPitches && element.abcelem.midiPitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiPitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches = [];\n\t\t\t\t\t\tfor (var i = 0; i < element.abcelem.midiPitches.length; i++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches.push(element.abcelem.midiPitches[i]);\n\t\t\t\t\t}\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches && element.abcelem.midiGraceNotePitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = [];\n\t\t\t\t\t\tfor (var j = 0; j < element.abcelem.midiGraceNotePitches.length; j++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches.push(element.abcelem.midiGraceNotePitches[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\t// TODO-PER: There doesn't seem to be a harm in letting ties be two different notes and it fixes a bug when a tie goes to a new line. If there aren't other problems with this change, then the variable can be removed completely. \n\t\t\t\t// if (isTiedToNext)\n\t\t\t\t// \tisTiedState = voiceTimeMilliseconds;\n\t\t\t}\n\t\t}\n\t\treturn { isTiedState: isTiedState, duration: realDuration / timeDivider, nextIsBar: nextIsBar || element.type === 'bar' };\n\t};\n\n\tthis.makeVoicesArray = function() {\n\t\t// First make a new array that is arranged by voice so that the repeats that span different lines are handled correctly.\n\t\tvar voicesArr = [];\n\t\tvar measureNumber = [];\n\t\tvar tempos = {};\n\t\tfor (var line = 0; line < this.engraver.staffgroups.length; line++) {\n\t\t\tvar group = this.engraver.staffgroups[line];\n\t\t\tif (group && group.staffs && group.staffs.length > 0) {\n\t\t\t\tvar firstStaff = group.staffs[0];\n\t\t\t\tvar middleC = firstStaff.absoluteY;\n\t\t\t\tvar top = middleC - firstStaff.top * spacing.STEP;\n\t\t\t\tvar lastStaff = group.staffs[group.staffs.length - 1];\n\t\t\t\tmiddleC = lastStaff.absoluteY;\n\t\t\t\tvar bottom = middleC - lastStaff.bottom * spacing.STEP;\n\t\t\t\tvar height = bottom - top;\n\n\t\t\t\tvar voices = group.voices;\n\t\t\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\t\t\tif (voices[v].staff && voices[v].staff.isTabStaff)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tvar noteFound = false;\n\t\t\t\t\tif (!voicesArr[v])\n\t\t\t\t\t\tvoicesArr[v] = [];\n\t\t\t\t\tif (measureNumber[v] === undefined)\n\t\t\t\t\t\tmeasureNumber[v] = 0;\n\t\t\t\t\tvar elements = voices[v].children;\n\t\t\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\t\t\tif (elements[elem].type === \"tempo\")\n\t\t\t\t\t\t\ttempos[measureNumber[v]] = this.getBpm(elements[elem].abcelem);\n\t\t\t\t\t\tvoicesArr[v].push({top: top, height: height, line: group.line, measureNumber: measureNumber[v], elem: elements[elem]});\n\t\t\t\t\t\tif (elements[elem].type === 'bar' && noteFound) // Count the measures by counting the bar lines, but skip a bar line that appears at the left of the music, before any notes.\n\t\t\t\t\t\t\tmeasureNumber[v]++;\n\t\t\t\t\t\tif (elements[elem].type === 'note' || elements[elem].type === 'rest')\n\t\t\t\t\t\t\tnoteFound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.tempoLocations = tempos; // This should be passed back, but the function is accessible publicly so that would break the interface.\n\t\treturn voicesArr;\n\t};\n\n\tthis.setupEvents = function(startingDelay, timeDivider, startingBpm, warp) {\n\t\tif (!warp) warp = 1;\n\t\tvar timingEvents = [];\n\n\t\tvar eventHash = {};\n\t\t// The time is the number of seconds from the beginning of the piece.\n\t\t// The units we are scanning are in notation units (i.e. 0.25 is a quarter note)\n\t\tvar time = startingDelay;\n\t\tvar isTiedState;\n\t\tvar nextIsBar = true;\n\t\tvar voices = this.makeVoicesArray();\n\t\tvar maxVoiceTimeMilliseconds = 0;\n\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\tvar voiceTime = time;\n\t\t\tvar voiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\tvar startingRepeatElem = 0;\n\t\t\tvar endingRepeatElem = -1;\n\t\t\tvar elements = voices[v];\n\t\t\tvar bpm = startingBpm;\n\t\t\ttimeDivider = this.getBeatLength() * bpm / 60;\n\t\t\tvar tempoDone = -1;\n\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\tvar thisMeasure = elements[elem].measureNumber;\n\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t}\n\t\t\t\tvar element = elements[elem].elem;\n\t\t\t\tvar ret = this.addElementToEvents(eventHash, element, voiceTimeMilliseconds, elements[elem].top, elements[elem].height, elements[elem].line, elements[elem].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\tvar lastHash;\n\t\t\t\tif (element.duration > 0 && eventHash[\"event\" + voiceTimeMilliseconds]) // This won't exist if this is the end of a tie.\n\t\t\t\t\tlastHash = \"event\" + voiceTimeMilliseconds;\n\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\tif (element.type === 'bar') {\n\t\t\t\t\tvar barType = element.abcelem.type;\n\t\t\t\t\tvar endRepeat = (barType === \"bar_right_repeat\" || barType === \"bar_dbl_repeat\");\n\t\t\t\t\tvar startEnding = (element.abcelem.startEnding === '1');\n\t\t\t\t\tvar startRepeat = (barType === \"bar_left_repeat\" || barType === \"bar_dbl_repeat\" || barType === \"bar_right_repeat\");\n\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t// Force the end of the previous note to the position of the measure - the cursor won't go past the end repeat\n\t\t\t\t\t\tif (elem > 0) {\n\t\t\t\t\t\t\teventHash[lastHash].endX = element.x;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endingRepeatElem === -1)\n\t\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\t\tvar lastVoiceTimeMilliseconds = 0;\n\t\t\t\t\t\ttempoDone = -1;\n\t\t\t\t\t\tfor (var el2 = startingRepeatElem; el2 < endingRepeatElem; el2++) {\n\t\t\t\t\t\t\tthisMeasure = elements[el2].measureNumber;\n\t\t\t\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar element2 = elements[el2].elem;\n\t\t\t\t\t\t\tret = this.addElementToEvents(eventHash, element2, voiceTimeMilliseconds, elements[el2].top, elements[el2].height, elements[el2].line, elements[el2].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\t\t\t\tlastVoiceTimeMilliseconds = voiceTimeMilliseconds;\n\t\t\t\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (eventHash[\"event\" + lastVoiceTimeMilliseconds]) // This won't exist if it is the beginning of the next line. That's ok because we will just count the end of the last line as the end.\n\t\t\t\t\t\t\teventHash[\"event\" + lastVoiceTimeMilliseconds].endX = elements[endingRepeatElem].elem.x;\n\t\t\t\t\t\tnextIsBar = true;\n\t\t\t\t\t\tendingRepeatElem = -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\tstartingRepeatElem = elem;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaxVoiceTimeMilliseconds = Math.max(maxVoiceTimeMilliseconds, voiceTimeMilliseconds)\n\t\t}\n\t\t// now we have all the events, but if there are multiple voices then there may be events out of order or duplicated, so normalize it.\n\t\ttimingEvents = makeSortedArray(eventHash);\n\t\taddVerticalInfo(timingEvents);\n\t\taddEndPoints(this.lines, timingEvents)\n\t\ttimingEvents.push({ type: \"end\", milliseconds: maxVoiceTimeMilliseconds });\n\t\tthis.addUsefulCallbackInfo(timingEvents, bpm*warp);\n\t\treturn timingEvents;\n\t};\n\n\tthis.addUsefulCallbackInfo = function(timingEvents, bpm) {\n\t\tvar millisecondsPerMeasure = this.millisecondsPerMeasure(bpm);\n\t\tfor (var i = 0; i < timingEvents.length; i++) {\n\t\t\tvar ev = timingEvents[i];\n\t\t\tev.millisecondsPerMeasure = millisecondsPerMeasure;\n\t\t}\n\t};\n\n\tfunction skipTies(elements, index) {\n\t\twhile (index < elements.length && elements[index].left === null)\n\t\t\tindex++;\n\t\treturn elements[index];\n\t}\n\tfunction addEndPoints(lines, elements) {\n\t\tif (elements.length < 1)\n\t\t\treturn;\n\t\tfor (var i = 0; i < elements.length-1; i++) {\n\t\t\tvar el = elements[i];\n\t\t\tvar next = skipTies(elements, i+1);\n\t\t\tif (el.left !== null) {\n\t\t\t\t// If there is no left element that is because this is a tie so it should be skipped.\n\t\t\t\tvar endX = (next && el.top === next.top) ? next.left : lines[el.line].staffGroup.w;\n\t\t\t\t// If this is already set, it is because the notes aren't sequential here, like the next thing is a repeat bar line.\n\t\t\t\t// In that case, the right-most position is passed in. There could still be an intervening note in another voice, so always look for the closest position.\n\t\t\t\t// If there is a repeat that stays on the same line, the endX set above won't be right because the next note will be before. In that case, use the endX that was calculated.\n\t\t\t\tif  (el.endX !== undefined) {\n\t\t\t\t\tif (endX > el.left)\n\t\t\t\t\t\tel.endX = Math.min(el.endX, endX);\n\t\t\t\t} else\n\t\t\t\t\tel.endX = endX;\n\t\t\t}\n\t\t}\n\t\tvar lastEl = elements[elements.length-1];\n\t\tlastEl.endX = lines[lastEl.line].staffGroup.w;\n\t}\n\n\tthis.getBpm = function(tempo) {\n\t\tvar bpm;\n\t\tif (!tempo)\n\t\t\ttempo = this.metaText ? this.metaText.tempo : null;\n\t\tif (tempo) {\n\t\t\tbpm = tempo.bpm;\n\t\t\tvar beatLength = this.getBeatLength();\n\t\t\tvar statedBeatLength = tempo.duration && tempo.duration.length > 0 ? tempo.duration[0] : beatLength;\n\t\t\tbpm = bpm * statedBeatLength / beatLength;\n\t\t}\n\t\tif (!bpm) {\n\t\t\tbpm = 180;\n\t\t\t// Compensate for compound meter, where the beat isn't a beat.\n\t\t\tvar meter = this.getMeterFraction();\n\t\t\tif (meter && meter.num !== 3 && (meter.num % 3 === 0)) {\n\t\t\t\tbpm = 120;\n\t\t\t}\n\t\t}\n\t\treturn bpm;\n\t};\n\n\tthis.setTiming = function (bpm, measuresOfDelay) {\n\t\tmeasuresOfDelay = measuresOfDelay || 0;\n\t\tif (!this.engraver || !this.engraver.staffgroups) {\n\t\t\tconsole.log(\"setTiming cannot be called before the tune is drawn.\");\n\t\t\tthis.noteTimings = [];\n\t\t\treturn this.noteTimings;\n\t\t}\n\n\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\tvar naturalBpm = this.getBpm(tempo);\n\t\tvar warp = 1;\n\t\tif (bpm) {\n\t\t\tif (tempo)\n\t\t\t\twarp = bpm / naturalBpm;\n\t\t} else\n\t\t\tbpm = naturalBpm;\n\n\t\t// Calculate the basic midi data. We only care about the qpm variable here.\n\t\t//this.setUpAudio({qpm: bpm});\n\n\t\tvar beatLength = this.getBeatLength();\n\t\tvar beatsPerSecond = bpm / 60;\n\n\t\tvar measureLength = this.getBarLength();\n\n\t\tvar startingDelay = measureLength / beatLength * measuresOfDelay / beatsPerSecond;\n\t\tif (startingDelay)\n\t\t\tstartingDelay -= this.getPickupLength() / beatLength / beatsPerSecond;\n\t\tvar timeDivider = beatLength * beatsPerSecond;\n\n\t\tthis.noteTimings = this.setupEvents(startingDelay, timeDivider, bpm, warp);\n\t\tif (this.noteTimings.length > 0) {\n\t\t\tthis.totalTime = this.noteTimings[this.noteTimings.length - 1].milliseconds / 1000;\n\t\t\tthis.totalBeats = this.totalTime * beatsPerSecond;\n\t\t} else {\n\t\t\tthis.totalTime = undefined;\n\t\t\tthis.totalBeats = undefined;\n\t\t}\n\t\treturn this.noteTimings;\n\t};\n\n\tthis.setUpAudio = function(options) {\n\t\tif (!options) options = {};\n\t\tvar seq = sequence(this, options);\n\t\treturn flatten(seq, options, this.formatting.percmap, this.formatting.midi);\n\t};\n\tthis.deline = function(options) {\n\t\treturn delineTune(this.lines, options);\n\t}\n\tthis.findSelectableElement = function(target) {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.findSelectableElement(target)\n\t\treturn null\n\t}\n\tthis.getSelectableArray = function() {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.selectables\n\t\treturn []\n\t}\n};\n\nmodule.exports = Tune;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/data/abc_tune.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/data/deline-tune.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/data/deline-tune.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function delineTune(inputLines, options) {\n\tif (!options) options = {};\n\tvar lineBreaks = !!options.lineBreaks;\n\tvar outputLines = [];\n\tvar inMusicLine = false;\n\tvar currentMeter = [];\n\tvar currentKey = [];\n\tvar currentClef = [];\n\tvar currentVocalFont = [];\n\tvar currentGChordFont = [];\n\tvar currentTripletFont = [];\n\tvar currentAnnotationFont = [];\n\tfor (var i = 0; i < inputLines.length; i++) {\n\t\tvar inputLine = inputLines[i];\n\t\tif (inputLine.staff) {\n\t\t\tif (inMusicLine && !inputLine.vskip) {\n\t\t\t\tvar outputLine = outputLines[outputLines.length-1];\n\t\t\t\t//findMismatchKeys(inputLine, outputLine, [\"staff\", \"staffGroup\"], \"line\", i)\n\t\t\t\tfor (var s = 0; s < outputLine.staff.length; s++) {\n\t\t\t\t\tvar inputStaff = inputLine.staff[s];\n\t\t\t\t\tvar outputStaff = outputLine.staff[s];\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tif (!objEqual(inputStaff.meter, currentMeter[s])) {\n\t\t\t\t\t\t\t// The meter changed for this line, otherwise it wouldn't have been set\n\t\t\t\t\t\t\taddMeterToVoices(inputStaff.meter, inputStaff.voices)\n\t\t\t\t\t\t\tcurrentMeter[s] = inputStaff.meter;\n\t\t\t\t\t\t\tdelete inputStaff.meter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.key, currentKey[s])) {\n\t\t\t\t\t\t\taddKeyToVoices(inputStaff.key, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentKey[s] = inputStaff.key;\n\t\t\t\t\t\t\tdelete inputStaff.key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (inputStaff.title)\n\t\t\t\t\t\t\toutputStaff.abbrevTitle = inputStaff.title;\n\t\t\t\t\t\tif (!objEqual(inputStaff.clef, currentClef[s])) {\n\t\t\t\t\t\t\taddClefToVoices(inputStaff.clef, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentClef[s] = inputStaff.clef;\n\t\t\t\t\t\t\tdelete inputStaff.clef;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.vocalfont, currentVocalFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.vocalfont, inputStaff.voices, 'vocalfont')\n\t\t\t\t\t\t\tcurrentVocalFont[s] = inputStaff.vocalfont;\n\t\t\t\t\t\t\tdelete inputStaff.vocalfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.gchordfont, currentGChordFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.gchordfont, inputStaff.voices, 'gchordfont')\n\t\t\t\t\t\t\tcurrentGChordFont[s] = inputStaff.gchordfont;\n\t\t\t\t\t\t\tdelete inputStaff.gchordfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.tripletfont, currentTripletFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.tripletfont, inputStaff.voices, 'tripletfont')\n\t\t\t\t\t\t\tcurrentTripletFont[s] = inputStaff.tripletfont;\n\t\t\t\t\t\t\tdelete inputStaff.tripletfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.annotationfont, currentAnnotationFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.annotationfont, inputStaff.voices, 'annotationfont')\n\t\t\t\t\t\t\tcurrentAnnotationFont[s] = inputStaff.annotationfont;\n\t\t\t\t\t\t\tdelete inputStaff.annotationfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//findMismatchKeys(inputStaff, outputStaff, [\"voices\", \"title\", \"abbrevTitle\", \"barNumber\", \"meter\", \"key\", \"clef\", \"vocalfont\", \"gchordfont\", \"tripletfont\", \"annotationfont\"], \"staff\", i + ' ' + s)\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tfor (var v = 0; v < outputStaff.voices.length; v++) {\n\t\t\t\t\t\t\tvar outputVoice = outputStaff.voices[v];\n\t\t\t\t\t\t\tvar inputVoice = inputStaff.voices[v];\n\t\t\t\t\t\t\tif (lineBreaks)\n\t\t\t\t\t\t\t\toutputVoice.push({el_type: \"break\"});\n\t\t\t\t\t\t\tif (inputVoice)\n\t\t\t\t\t\t\t\toutputStaff.voices[v] = outputVoice.concat(inputVoice)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var ii = 0; ii < inputLine.staff.length; ii++) {\n\t\t\t\t\tcurrentKey[ii] = inputLine.staff[ii].key;\n\t\t\t\t\tcurrentMeter[ii] = inputLine.staff[ii].meter;\n\t\t\t\t\tcurrentClef[ii] = inputLine.staff[ii].clef;\n\t\t\t\t}\n\t\t\t\t// copy this because we are going to change it and we don't want to change the original.\n\t\t\t\toutputLines.push(cloneLine(inputLine));\n\t\t\t}\n\t\t\tinMusicLine = true;\n\t\t} else {\n\t\t\tinMusicLine = false;\n\t\t\toutputLines.push(inputLine);\n\t\t}\n\t}\n\treturn outputLines;\n}\n// function findMismatchKeys(input, output, ignore, context, context2) {\n// \tif (!input) {\n// \t\treturn;\n// \t}\n// \tvar outputKeys = Object.keys(output);\n// \tvar inputKeys = Object.keys(input);\n// \tfor (var ii = 0; ii < ignore.length; ii++) {\n// \t\tif (outputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\toutputKeys.splice(outputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t\tif (inputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\tinputKeys.splice(inputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t}\n// \tif (inputKeys.join(\",\") !== outputKeys.join(\",\")) {\n// \t\tconsole.log(\"keys mismatch \"+context + ' ' + context2, input, output);\n// \t}\n// \tfor (var k = 0; k < inputKeys.length; k++) {\n// \t\tvar key = inputKeys[k];\n// \t\tif (ignore.indexOf(key) < 0) {\n// \t\t\tvar inputValue = JSON.stringify(input[key], replacer);\n// \t\t\tvar outputValue = JSON.stringify(output[key], replacer);\n// \t\t\tif (inputValue !== outputValue)\n// \t\t\t\tconsole.log(\"value mismatch \"+context + ' ' + context2 + ' ' + key, inputValue, outputValue)\n// \t\t}\n// \t}\n// }\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'abselem') {\n\t\treturn 'abselem';\n\t}\n\treturn value;\n}\n\nfunction addMeterToVoices(meter, voices) {\n\tmeter.el_type = \"meter\";\n\tmeter.startChar = -1;\n\tmeter.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(meter);\n\t}\n}\n\nfunction addKeyToVoices(key, voices) {\n\tkey.el_type = \"key\";\n\tkey.startChar = -1;\n\tkey.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(key);\n\t}\n}\n\nfunction addClefToVoices(clef, voices) {\n\tclef.el_type = \"clef\";\n\tclef.startChar = -1;\n\tclef.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(clef);\n\t}\n}\n\nfunction addFontToVoices(font, voices, type) {\n\tfont.el_type = \"font\";\n\tfont.type = type;\n\tfont.startChar = -1;\n\tfont.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(font);\n\t}\n}\n\nfunction objEqual(input, output) {\n\tif (!input)\n\t\treturn true; // the default is whatever the old output is.\n\tvar inputValue = JSON.stringify(input, replacer);\n\tvar outputValue = JSON.stringify(output, replacer);\n\treturn inputValue === outputValue;\n}\n\nfunction cloneLine(line) {\n\tvar output = {};\n\tvar keys = Object.keys(line);\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tif (keys[i] !== \"staff\")\n\t\t\toutput[keys[i]] = line[keys[i]];\n\t\telse {\n\t\t\toutput.staff = [];\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = {};\n\t\t\t\tvar keys2 = Object.keys(line.staff[j]);\n\t\t\t\tfor (var k = 0; k < keys2.length; k++) {\n\t\t\t\t\tif (keys2[k] !== \"voices\")\n\t\t\t\t\t\tstaff[keys2[k]] = line.staff[j][keys2[k]];\n\t\t\t\t\telse {\n\t\t\t\t\t\tstaff.voices = [];\n\t\t\t\t\t\tfor (var v = 0; v < line.staff[j].voices.length; v++) {\n\t\t\t\t\t\t\tstaff.voices.push([].concat(line.staff[j].voices[v]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutput.staff.push(staff)\n\t\t\t}\n\t\t}\n\t}\n\treturn output;\n}\n\nmodule.exports = delineTune;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/data/deline-tune.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/edit/abc_editarea.js":
/*!*****************************************************!*\
  !*** ./node_modules/abcjs/src/edit/abc_editarea.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// abc_editor.js\n\n// window.ABCJS.Editor is the interface class for the area that contains the ABC text. It is responsible for\n// holding the text of the tune and calling the parser and the rendering engines.\n//\n// EditArea is an example of using a textarea as the control that is shown to the user. As long as\n// the same interface is used, window.ABCJS.Editor can use a different type of object.\n//\n// EditArea:\n// - constructor(textareaid)\n//\t\tThis contains the id of a textarea control that will be used.\n// - addSelectionListener(listener)\n//\t\tA callback class that contains the entry point fireSelectionChanged()\n// - addChangeListener(listener)\n//\t\tA callback class that contains the entry point fireChanged()\n// - getSelection()\n//\t\treturns the object { start: , end: } with the current selection in characters\n// - setSelection(start, end)\n//\t\tstart and end are the character positions that should be selected.\n// - getString()\n//\t\treturns the ABC text that is currently displayed.\n// - setString(str)\n//\t\tsets the ABC text that is currently displayed, and resets the initialText variable\n// - getElem()\n//\t\treturns the textarea element\n// - string initialText\n//\t\tContains the starting text. This can be compared against the current text to see if anything changed.\n//\n\n// Polyfill for CustomEvent for old IE versions\ntry {\n\tif (typeof window.CustomEvent !== \"function\") {\n\t\tvar CustomEvent = function (event, params) {\n\t\t\tparams = params || {bubbles: false, cancelable: false, detail: undefined};\n\t\t\tvar evt = document.createEvent('CustomEvent');\n\t\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n\t\t\treturn evt;\n\t\t};\n\t\tCustomEvent.prototype = window.Event.prototype;\n\t\twindow.CustomEvent = CustomEvent;\n\t}\n} catch (e) {\n\t// if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nvar EditArea = function(textareaid) {\n  if (typeof textareaid === \"string\")\n    this.textarea = document.getElementById(textareaid);\n  else\n    this.textarea = textareaid;\n  this.initialText = this.textarea.value;\n  this.isDragging = false;\n}\n\nEditArea.prototype.addSelectionListener = function(listener) {\n  this.textarea.onmousemove = function(ev) {\n\t  if (this.isDragging)\n\t    listener.fireSelectionChanged();\n  };\n};\n\nEditArea.prototype.addChangeListener = function(listener) {\n  this.changelistener = listener;\n  this.textarea.onkeyup = function() {\n    listener.fireChanged();\n  };\n  this.textarea.onmousedown = function() {\n\tthis.isDragging = true;\n    listener.fireSelectionChanged();\n  };\n  this.textarea.onmouseup = function() {\n\tthis.isDragging = false;\n    listener.fireChanged();\n  };\n  this.textarea.onchange = function() {\n    listener.fireChanged();\n  };\n};\n\n//TODO won't work under IE?\nEditArea.prototype.getSelection = function() {\n  return {start: this.textarea.selectionStart, end: this.textarea.selectionEnd};\n};\n\nEditArea.prototype.setSelection = function(start, end) {\n\tif(this.textarea.setSelectionRange)\n\t   this.textarea.setSelectionRange(start, end);\n\telse if(this.textarea.createTextRange) {\n\t\t// For IE8\n\t   var e = this.textarea.createTextRange();\n\t   e.collapse(true);\n\t   e.moveEnd('character', end);\n\t   e.moveStart('character', start);\n\t   e.select();\n\t}\n  this.textarea.focus();\n};\n\nEditArea.prototype.getString = function() {\n  return this.textarea.value;\n};\n\nEditArea.prototype.setString = function(str) {\n  this.textarea.value = str;\n  this.initialText = this.getString();\n  if (this.changelistener) {\n    this.changelistener.fireChanged();\n  }\n};\n\nEditArea.prototype.getElem = function() {\n  return this.textarea;\n};\n\nmodule.exports = EditArea;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/edit/abc_editarea.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/edit/abc_editor.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/edit/abc_editor.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// window.ABCJS.Editor:\n//\n// constructor(editarea, params)\n//\t\tif editarea is a string, then it is an HTML id of a textarea control.\n//\t\tOtherwise, it should be an instantiation of an object that expresses the EditArea interface.\n//\n//\t\tparams is a hash of:\n//\t\tcanvas_id: or paper_id: HTML id to draw in. If not present, then the drawing happens just below the editor.\n//\t\tgenerate_midi: if present, then midi is generated.\n//\t\tmidi_id: if present, the HTML id to place the midi control. Otherwise it is placed in the same div as the paper.\n//\t\tmidi_download_id: if present, the HTML id to place the midi download link. Otherwise it is placed in the same div as the paper.\n//\t\tgenerate_warnings: if present, then parser warnings are displayed on the page.\n//\t\twarnings_id: if present, the HTML id to place the warnings. Otherwise they are placed in the same div as the paper.\n//\t\tonchange: if present, the callback function to call whenever there has been a change.\n//\t\tgui: if present, the paper can send changes back to the editor (presumably because the user changed something directly.)\n//\t\tparser_options: options to send to the parser engine.\n//\t\tmidi_options: options to send to the midi engine.\n//\t\trender_options: options to send to the render engine.\n//\t\tindicate_changed: the dirty flag is set if this is true.\n//\n// - setReadOnly(bool)\n//\t\tadds or removes the class abc_textarea_readonly, and adds or removes the attribute readonly=yes\n// - setDirtyStyle(bool)\n//\t\tadds or removes the class abc_textarea_dirty\n// - modelChanged()\n//\t\tCalled when the model has been changed to trigger re-rendering\n// - parseABC()\n//\t\tCalled internally by fireChanged()\n//\t\treturns true if there has been a change since last call.\n// - updateSelection()\n//\t\tCalled when the user has changed the selection. This calls the engraver to show the selection.\n// - fireSelectionChanged()\n//\t\tCalled by the textarea object when the user has changed the selection.\n// - paramChanged(engraverparams)\n//\t\tCalled to signal that the engraver params have changed, so re-rendering should occur.\n// - fireChanged()\n//\t\tCalled by the textarea object when the user has changed something.\n// - setNotDirty()\n//\t\tCalled by the client app to reset the dirty flag\n// - isDirty()\n//\t\tReturns true or false, whether the textarea contains the same text that it started with.\n// - highlight(abcelem)\n//\t\tCalled by the engraver to highlight an area.\n// - pause(bool)\n//\t\tStops the automatic rendering when the user is typing.\n//\nvar parseCommon = __webpack_require__(/*! ../parse/abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\nvar SynthController = __webpack_require__(/*! ../synth/synth-controller */ \"./node_modules/abcjs/src/synth/synth-controller.js\");\nvar supportsAudio = __webpack_require__(/*! ../synth/supports-audio */ \"./node_modules/abcjs/src/synth/supports-audio.js\");\nvar renderAbc = __webpack_require__(/*! ../api/abc_tunebook_svg */ \"./node_modules/abcjs/src/api/abc_tunebook_svg.js\");\nvar EditArea = __webpack_require__(/*! ./abc_editarea */ \"./node_modules/abcjs/src/edit/abc_editarea.js\");\n\nfunction gatherAbcParams(params) {\n\t// There used to be a bunch of ways parameters can be passed in. This just simplifies it.\n\tvar abcjsParams = {};\n\tvar key;\n\tif (params.abcjsParams) {\n\t\tfor (key in params.abcjsParams) {\n\t\t\tif (params.abcjsParams.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.abcjsParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.midi_options) {\n\t\tfor (key in params.midi_options) {\n\t\t\tif (params.midi_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.midi_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.parser_options) {\n\t\tfor (key in params.parser_options) {\n\t\t\tif (params.parser_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.parser_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.render_options) {\n\t\tfor (key in params.render_options) {\n\t\t\tif (params.render_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.render_options[key];\n\t\t\t}\n\t\t}\n\t}\n\t/*\n\tif (params.tablature_options) {\n\t\tabcjsParams['tablatures'] = params.tablature_options;\n\t}\n\t*/\n\tif (abcjsParams.tablature) {\n\t\tif (params.warnings_id) {\n\t\t\t// store for plugin error handling\n\t\t\tabcjsParams.tablature.warnings_id = params.warnings_id;\n\t\t}\n\t}\n\treturn abcjsParams;\n}\n\nvar Editor = function(editarea, params) {\n\t// Copy all the options that will be passed through\n\tthis.abcjsParams = gatherAbcParams(params);\n\n\tif (params.indicate_changed)\n\t\tthis.indicate_changed = true;\n  if (typeof editarea === \"string\") {\n    this.editarea = new EditArea(editarea);\n  } else {\n    this.editarea = editarea;\n  }\n  this.editarea.addSelectionListener(this);\n  this.editarea.addChangeListener(this);\n\n  if (params.canvas_id) {\n    this.div = params.canvas_id;\n  } else if (params.paper_id) {\n    this.div = params.paper_id;\n  } else {\n    this.div = document.createElement(\"DIV\");\n    this.editarea.getElem().parentNode.insertBefore(this.div, this.editarea.getElem());\n  }\n  if (typeof this.div === 'string')\n\t  this.div = document.getElementById(this.div);\n\n  if (params.selectionChangeCallback) {\n  \tthis.selectionChangeCallback = params.selectionChangeCallback;\n  }\n\n  this.clientClickListener = this.abcjsParams.clickListener;\n  this.abcjsParams.clickListener = this.highlight.bind(this);\n\n  if (params.synth) {\n  \tif (supportsAudio()) {\n\t    this.synth = {\n\t\t    el: params.synth.el,\n\t\t    cursorControl: params.synth.cursorControl,\n\t\t    options: params.synth.options\n\t    };\n    }\n  }\n\t// If the user wants midi, then store the elements that it will be written to. The element could either be passed in as an id,\n\t// an element, or nothing. If nothing is passed in, then just put the midi on top of the generated music.\n\tif (params.generate_midi) {\n\t  \tthis.generate_midi = params.generate_midi;\n\t\tif (this.abcjsParams.generateDownload) {\n\t\t\tif (typeof params.midi_download_id === 'string')\n\t\t\t\tthis.downloadMidi = document.getElementById(params.midi_download_id);\n\t\t\telse if (params.midi_download_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.downloadMidi = params.midi_download_id;\n\t\t}\n\t\tif (this.abcjsParams.generateInline !== false) { // The default for this is true, so undefined is also true.\n\t\t\tif (typeof params.midi_id === 'string')\n\t\t\t\tthis.inlineMidi = document.getElementById(params.midi_id);\n\t\t\telse if (params.midi_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.inlineMidi = params.midi_id;\n\t\t}\n\t}\n\n  if (params.warnings_id) {\n  \tif (typeof(params.warnings_id) === \"string\")\n      this.warningsdiv = document.getElementById(params.warnings_id);\n  \telse\n\t\tthis.warningsdiv = params.warnings_id;\n  } else if (params.generate_warnings) {\n\t  this.warningsdiv = document.createElement(\"div\");\n\t  this.div.parentNode.insertBefore(this.warningsdiv, this.div);\n  }\n\n  this.onchangeCallback = params.onchange;\n\n  this.currentAbc = \"\";\n  this.tunes = [];\n  this.bReentry = false;\n  this.parseABC();\n  this.modelChanged();\n\n  this.addClassName = function(element, className) {\n    var hasClassName = function(element, className) {\n      var elementClassName = element.className;\n      return (elementClassName.length > 0 && (elementClassName === className ||\n        new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n    };\n\n    if (!hasClassName(element, className))\n      element.className += (element.className ? ' ' : '') + className;\n    return element;\n  };\n\n  this.removeClassName = function(element, className) {\n    element.className = parseCommon.strip(element.className.replace(\n      new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n    return element;\n  };\n\n  this.setReadOnly = function(readOnly) {\n\t  var readonlyClass = 'abc_textarea_readonly';\n\t  var el = this.editarea.getElem();\n    if (readOnly) {\n      el.setAttribute('readonly', 'yes');\n\t  this.addClassName(el, readonlyClass);\n\t} else {\n      el.removeAttribute('readonly');\n\t  this.removeClassName(el, readonlyClass);\n    }\n  };\n};\n\nEditor.prototype.redrawMidi = function() {\n\tif (this.generate_midi && !this.midiPause) {\n\t\tvar event = new window.CustomEvent(\"generateMidi\", {\n\t\t\tdetail: {\n\t\t\t\ttunes: this.tunes,\n\t\t\t\tabcjsParams: this.abcjsParams,\n\t\t\t\tdownloadMidiEl: this.downloadMidi,\n\t\t\t\tinlineMidiEl: this.inlineMidi,\n\t\t\t\tengravingEl: this.div\n\t\t\t}\n\t\t});\n\t\twindow.dispatchEvent(event);\n\t}\n\tif (this.synth) {\n\t\tvar userAction = this.synth.synthControl; // Can't really tell if there was a user action before drawing, but we assume that if the synthControl was created already there was a user action.\n\t\tif (!this.synth.synthControl) {\n\t\t\tthis.synth.synthControl = new SynthController();\n\t\t\tthis.synth.synthControl.load(this.synth.el, this.synth.cursorControl, this.synth.options);\n\t\t}\n\t\tthis.synth.synthControl.setTune(this.tunes[0], userAction, this.synth.options);\n\t}\n};\n\nEditor.prototype.modelChanged = function() {\n  if (this.bReentry)\n    return; // TODO is this likely? maybe, if we rewrite abc immediately w/ abc2abc\n\tthis.bReentry = true;\n\ttry {\n\t\tthis.timerId = null;\n\t\tif (this.synth && this.synth.synthControl)\n\t\t\tthis.synth.synthControl.disable(true);\n\n\t\tthis.tunes = renderAbc(this.div, this.currentAbc, this.abcjsParams);\n\t\tif (this.tunes.length > 0) {\n\t\t\tthis.warnings = this.tunes[0].warnings;\n\t\t}\n\t\tthis.redrawMidi();\n\t} catch(error) {\n\t\tconsole.error(\"ABCJS error: \", error);\n\t\tif (!this.warnings)\n\t\t\tthis.warnings = [];\n\t\tthis.warnings.push(error.message);\n\t}\n\n  if (this.warningsdiv) {\n    this.warningsdiv.innerHTML = (this.warnings) ? this.warnings.join(\"<br />\") : \"No errors\";\n  }\n  this.updateSelection();\n  this.bReentry = false;\n};\n\n// Call this to reparse in response to the client changing the parameters on the fly\nEditor.prototype.paramChanged = function(engraverParams) {\n\tif (engraverParams) {\n\t\tfor (var key in engraverParams) {\n\t\t\tif (engraverParams.hasOwnProperty(key)) {\n\t\t\t\tthis.abcjsParams[key] = engraverParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\nEditor.prototype.synthParamChanged = function(options) {\n\tif (!this.synth)\n\t\treturn;\n\tthis.synth.options = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tthis.synth.options[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\n// return true if the model has changed\nEditor.prototype.parseABC = function() {\n  var t = this.editarea.getString();\n  if (t===this.currentAbc) {\n    this.updateSelection();\n    return false;\n  }\n\n  this.currentAbc = t;\n  return true;\n};\n\nEditor.prototype.updateSelection = function() {\n  var selection = this.editarea.getSelection();\n  try {\n  \tif (this.tunes.length > 0 && this.tunes[0].engraver)\n\t  this.tunes[0].engraver.rangeHighlight(selection.start, selection.end);\n  } catch (e) {} // maybe printer isn't defined yet?\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(selection.start, selection.end);\n};\n\n// Called when the textarea's selection is in the process of changing (after mouse down, dragging, or keyboard arrows)\nEditor.prototype.fireSelectionChanged = function() {\n  this.updateSelection();\n};\n\nEditor.prototype.setDirtyStyle = function(isDirty) {\n\tif (this.indicate_changed === undefined)\n\t\treturn;\n  var addClassName = function(element, className) {\n    var hasClassName = function(element, className) {\n      var elementClassName = element.className;\n      return (elementClassName.length > 0 && (elementClassName === className ||\n        new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n    };\n\n    if (!hasClassName(element, className))\n      element.className += (element.className ? ' ' : '') + className;\n    return element;\n  };\n\n  var removeClassName = function(element, className) {\n    element.className = parseCommon.strip(element.className.replace(\n      new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n    return element;\n  };\n\n\tvar readonlyClass = 'abc_textarea_dirty';\n\tvar el = this.editarea.getElem();\n\tif (isDirty) {\n\t\taddClassName(el, readonlyClass);\n\t} else {\n\t\tremoveClassName(el, readonlyClass);\n    }\n};\n\n// call when the textarea alerts us that the abc text is changed and needs re-parsing\nEditor.prototype.fireChanged = function() {\n  if (this.bIsPaused)\n    return;\n  if (this.parseABC()) {\n    var self = this;\n    if (this.timerId)\t// If the user is still typing, cancel the update\n      clearTimeout(this.timerId);\n    this.timerId = setTimeout(function () {\n      self.modelChanged();\n    }, 300);\t// Is this a good compromise between responsiveness and not redrawing too much?\n\t  var isDirty = this.isDirty();\n\t  if (this.wasDirty !== isDirty) {\n\t\t  this.wasDirty = isDirty;\n\t\t  this.setDirtyStyle(isDirty);\n\t  }\n\t  if (this.onchangeCallback)\n\t\t  this.onchangeCallback(this);\n\t  }\n};\n\nEditor.prototype.setNotDirty = function() {\n\tthis.editarea.initialText = this.editarea.getString();\n\tthis.wasDirty = false;\n\tthis.setDirtyStyle(false);\n};\n\nEditor.prototype.isDirty = function() {\n\tif (this.indicate_changed === undefined)\n\t\treturn false;\n\treturn this.editarea.initialText !== this.editarea.getString();\n};\n\nEditor.prototype.highlight = function(abcelem, tuneNumber, classes, analysis, drag, mouseEvent) {\n\t// TODO-PER: The marker appears to get off by one for each tune parsed. I'm not sure why, but adding the tuneNumber in corrects it for the time being.\n//\tvar offset = (tuneNumber !== undefined) ? this.startPos[tuneNumber] + tuneNumber : 0;\n\n  this.editarea.setSelection(abcelem.startChar, abcelem.endChar);\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(abcelem.startChar, abcelem.endChar);\n\tif (this.clientClickListener)\n\t\tthis.clientClickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent);\n};\n\nEditor.prototype.pause = function(shouldPause) {\n\tthis.bIsPaused = shouldPause;\n\tif (!shouldPause)\n\t\tthis.fireChanged();\n};\n\nEditor.prototype.millisecondsPerMeasure = function() {\n\tif (!this.synth || !this.synth.synthControl || !this.synth.synthControl.visualObj)\n\t\treturn 0;\n\treturn this.synth.synthControl.visualObj.millisecondsPerMeasure();\n};\n\nEditor.prototype.pauseMidi = function(shouldPause) {\n\tthis.midiPause = shouldPause;\n\tif (!shouldPause)\n\t\tthis.redrawMidi();\n};\n\nmodule.exports = Editor;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/edit/abc_editor.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/midi/abc_midi_create.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/midi/abc_midi_create.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_midi_create.js: Turn a linear series of events into a midi file.\n\nvar rendererFactory = __webpack_require__(/*! ../synth/abc_midi_renderer */ \"./node_modules/abcjs/src/synth/abc_midi_renderer.js\");\n\nvar create;\n\n(function() {\n\t\"use strict\";\n\n\tvar baseDuration = 480*4; // nice and divisible, equals 1 whole note\n\n\tcreate = function create(abcTune, options) {\n\t\tif (options === undefined) options = {};\n\t\tvar commands = abcTune.setUpAudio(options);\n\t\tvar midi = rendererFactory();\n\t\tvar title = abcTune.metaText ? abcTune.metaText.title : undefined;\n\t\tif (title && title.length > 128) title = title.substring(0, 124) + '...';\n\t\tvar key = abcTune.getKeySignature();\n\t\tvar time = abcTune.getMeterFraction();\n\n\t\t// MAE 7 July 2024 - Fix for */8 meter tempos\n\t\tvar tempo = commands.tempo;\n\n\t\tvar beatsPerSecond = tempo / 60;\n\n\t\t// Fix tempo for */8 meters\n\t\tif (time.den == 8){\n\n\t\t\t// Compute the tempo based on the actual milliseconds per measure, scaled by the number of eight notes and halved to get tempo in bpm.\n\t\t\tvar msPerMeasure = abcTune.millisecondsPerMeasure();\n\t\t\t\n\t\t\ttempo = (60000 / (msPerMeasure/time.num)) / 2;\n\t\t\t\n\t\t\tbeatsPerSecond = tempo/60;\n\n\t\t}\n\n\t\t//var beatLength = abcTune.getBeatLength();\n\t\tmidi.setGlobalInfo(tempo, title, key, time);\n\t\t\n\t\tfor (var i = 0; i < commands.tracks.length; i++) {\n\t\t\tmidi.startTrack();\n\t\t\tvar notePlacement = {};\n\t\t\tfor (var j = 0; j < commands.tracks[i].length; j++) {\n\t\t\t\tvar event = commands.tracks[i][j];\n\t\t\t\tswitch (event.cmd) {\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\tmidi.setText(event.type, event.text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'program':\n\t\t\t\t\t\tvar pan = 0;\n\t\t\t\t\t\tif (options.pan && options.pan.length > i)\n\t\t\t\t\t\t\tpan = options.pan[i];\n\t\t\t\t\t\tif (event.instrument === 128) {\n\t\t\t\t\t\t\t// If we're using the percussion voice, change to Channel 10\n\t\t\t\t\t\t\tmidi.setChannel(9, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmidi.setChannel(event.channel, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(event.instrument);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'note':\n\t\t\t\t\t\tvar gapLengthInBeats = event.gap * beatsPerSecond;\n\t\t\t\t\t\tvar start = event.start;\n\t\t\t\t\t\t// The staccato and legato are indicated by event.gap.\n\t\t\t\t\t\t// event.gap is in seconds but the durations are in whole notes.\n\t\t\t\t\t\tvar end = start + event.duration - gapLengthInBeats;\n\t\t\t\t\t\tif (!notePlacement[start])\n\t\t\t\t\t\t\tnotePlacement[start] = [];\n\t\t\t\t\t\tnotePlacement[start].push({ pitch: event.pitch, volume: event.volume, cents: event.cents });\n\t\t\t\t\t\tif (!notePlacement[end])\n\t\t\t\t\t\t\tnotePlacement[end] = [];\n\t\t\t\t\t\tnotePlacement[end].push({ pitch: event.pitch, volume: 0 });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.log(\"MIDI create Unknown: \" + event.cmd);\n\t\t\t\t}\n\t\t\t}\n\t\t\taddNotes(midi, notePlacement, baseDuration);\n\t\t\tmidi.endTrack();\n\t\t}\n\n\t\treturn midi.getData();\n\t};\n\n\tfunction addNotes(midi, notePlacement, baseDuration) {\n\t\tvar times = Object.keys(notePlacement);\n\t\tfor (var h = 0; h < times.length; h++)\n\t\t\ttimes[h] = parseFloat(times[h]);\n\t\ttimes.sort(function(a,b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tvar lastTime = 0;\n\t\tfor (var i = 0; i < times.length; i++) {\n\t\t\tvar events = notePlacement[times[i]];\n\t\t\tif (times[i] > lastTime) {\n\t\t\t\tvar distance = (times[i] - lastTime) * baseDuration;\n\t\t\t\tmidi.addRest(distance);\n\t\t\t\tlastTime = times[i];\n\t\t\t}\n\t\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\t\tvar event = events[j];\n\t\t\t\tif (event.volume) {\n\t\t\t\t\tmidi.startNote(event.pitch, event.volume, event.cents);\n\t\t\t\t} else {\n\t\t\t\t\tmidi.endNote(event.pitch);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n})();\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/midi/abc_midi_create.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_common.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_common.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_common.js: Some common utility functions.\n\nvar parseCommon = {};\n\nparseCommon.cloneArray = function(source) {\n\tvar destination = [];\n\tfor (var i = 0; i < source.length; i++) {\n\t\tdestination.push(Object.assign({},source[i]));\n\t}\n\treturn destination;\n};\n\nparseCommon.cloneHashOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = Object.assign({},source[property]);\n\treturn destination;\n};\n\nparseCommon.cloneHashOfArrayOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = parseCommon.cloneArray(source[property]);\n\treturn destination;\n};\n\nparseCommon.strip = function(str) {\n\treturn str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n};\n\nparseCommon.startsWith = function(str, pattern) {\n\treturn str.indexOf(pattern) === 0;\n};\n\nparseCommon.endsWith = function(str, pattern) {\n\tvar d = str.length - pattern.length;\n\treturn d >= 0 && str.lastIndexOf(pattern) === d;\n};\n\nparseCommon.last = function(arr) {\n\tif (arr.length === 0)\n\t\treturn null;\n\treturn arr[arr.length-1];\n};\n\n\nmodule.exports = parseCommon;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_common.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_parse.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = __webpack_require__(/*! ./abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\nvar parseDirective = __webpack_require__(/*! ./abc_parse_directive */ \"./node_modules/abcjs/src/parse/abc_parse_directive.js\");\nvar ParseHeader = __webpack_require__(/*! ./abc_parse_header */ \"./node_modules/abcjs/src/parse/abc_parse_header.js\");\nvar ParseMusic = __webpack_require__(/*! ./abc_parse_music */ \"./node_modules/abcjs/src/parse/abc_parse_music.js\");\nvar Tokenizer = __webpack_require__(/*! ./abc_tokenizer */ \"./node_modules/abcjs/src/parse/abc_tokenizer.js\");\nvar wrap = __webpack_require__(/*! ./wrap_lines */ \"./node_modules/abcjs/src/parse/wrap_lines.js\");\n\nvar Tune = __webpack_require__(/*! ../data/abc_tune */ \"./node_modules/abcjs/src/data/abc_tune.js\");\nvar TuneBuilder = __webpack_require__(/*! ../parse/tune-builder */ \"./node_modules/abcjs/src/parse/tune-builder.js\");\n\nvar Parse = function() {\n\t\"use strict\";\n\tvar tune = new Tune();\n\tvar tuneBuilder = new TuneBuilder(tune);\n\tvar tokenizer;\n\tvar wordsContinuation = '';\n\tvar symbolContinuation = '';\n\n\tthis.getTune = function() {\n\t\tvar t = {\n\t\t\tformatting: tune.formatting,\n\t\t\tlines: tune.lines,\n\t\t\tmedia: tune.media,\n\t\t\tmetaText: tune.metaText,\n\t\t\tmetaTextInfo: tune.metaTextInfo,\n\t\t\tversion: tune.version,\n\n\t\t\taddElementToEvents: tune.addElementToEvents,\n\t\t\taddUsefulCallbackInfo: tune.addUsefulCallbackInfo,\n\t\t\tgetTotalTime: tune.getTotalTime,\n\t\t\tgetTotalBeats: tune.getTotalBeats,\n\t\t\tgetBarLength: tune.getBarLength,\n\t\t\tgetBeatLength: tune.getBeatLength,\n\t\t\tgetBeatsPerMeasure: tune.getBeatsPerMeasure,\n\t\t\tgetBpm: tune.getBpm,\n\t\t\tgetMeter: tune.getMeter,\n\t\t\tgetMeterFraction: tune.getMeterFraction,\n\t\t\tgetPickupLength: tune.getPickupLength,\n\t\t\tgetKeySignature: tune.getKeySignature,\n\t\t\tgetElementFromChar: tune.getElementFromChar,\n\t\t\tmakeVoicesArray: tune.makeVoicesArray,\n\t\t\tmillisecondsPerMeasure: tune.millisecondsPerMeasure,\n\t\t\tsetupEvents: tune.setupEvents,\n\t\t\tsetTiming: tune.setTiming,\n\t\t\tsetUpAudio: tune.setUpAudio,\n\t\t\tdeline: tune.deline,\n\t\t\tfindSelectableElement: tune.findSelectableElement,\n\t\t\tgetSelectableArray: tune.getSelectableArray,\n\t\t};\n\t\tif (tune.lineBreaks)\n\t\t\tt.lineBreaks = tune.lineBreaks;\n\t\tif (tune.visualTranspose)\n\t\t\tt.visualTranspose = tune.visualTranspose;\n\t\treturn t;\n\t};\n\n\tfunction addPositioning(el, type, value) {\n\t\tif (!el.positioning) el.positioning = {};\n\t\tel.positioning[type] = value;\n\t}\n\n\tfunction addFont(el, type, value) {\n\t\tif (!el.fonts) el.fonts = {};\n\t\tel.fonts[type] = value;\n\t}\n\n\tvar multilineVars = {\n\t\treset: function() {\n\t\t\tfor (var property in this) {\n\t\t\t\tif (this.hasOwnProperty(property) && typeof this[property] !== \"function\") {\n\t\t\t\t\tdelete this[property];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.iChar = 0;\n\t\t\tthis.key = {accidentals: [], root: 'none', acc: '', mode: '' };\n\t\t\tthis.meter = null; // if no meter is specified, free meter is assumed\n\t\t\tthis.origMeter = null;\t// this is for new voices that are created after we set the meter.\n\t\t\tthis.hasMainTitle = false;\n\t\t\tthis.default_length = 0.125;\n\t\t\tthis.clef = { type: 'treble', verticalPos: 0 };\n\t\t\tthis.octave = 0;\n\t\t\tthis.next_note_duration = 0;\n\t\t\tthis.start_new_line = true;\n\t\t\tthis.is_in_header = true;\n\t\t\tthis.partForNextLine = {};\n\t\t\tthis.tempoForNextLine = [];\n\t\t\tthis.havent_set_length = true;\n\t\t\tthis.voices = {};\n\t\t\tthis.staves = [];\n\t\t\tthis.macros = {};\n\t\t\tthis.currBarNumber = 1;\n\t\t\tthis.barCounter = {};\n\t\t\tthis.ignoredDecorations = [];\n\t\t\tthis.score_is_present = false;\t// Can't have original V: lines when there is the score directive\n\t\t\tthis.inEnding = false;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tthis.vocalPosition = \"auto\";\n\t\t\tthis.dynamicPosition = \"auto\";\n\t\t\tthis.chordPosition = \"auto\";\n\t\t\tthis.ornamentPosition = \"auto\";\n\t\t\tthis.volumePosition = \"auto\";\n\t\t\tthis.openSlurs = [];\n\t\t\tthis.freegchord = false;\n\t\t\tthis.endingHoldOver = {};\n\t\t},\n\t\tdifferentFont: function(type, defaultFonts) {\n\t\t\tif (this[type].decoration !== defaultFonts[type].decoration) return true;\n\t\t\tif (this[type].face !== defaultFonts[type].face) return true;\n\t\t\tif (this[type].size !== defaultFonts[type].size) return true;\n\t\t\tif (this[type].style !== defaultFonts[type].style) return true;\n\t\t\tif (this[type].weight !== defaultFonts[type].weight) return true;\n\t\t\treturn false;\n\t\t},\n\t\taddFormattingOptions: function(el, defaultFonts, elType) {\n\t\t\tif (elType === 'note') {\n\t\t\t\tif (this.vocalPosition !== 'auto') addPositioning(el, 'vocalPosition', this.vocalPosition);\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"annotationfont\", defaultFonts)) addFont(el, 'annotationfont', this.annotationfont);\n\t\t\t\tif (this.differentFont(\"gchordfont\", defaultFonts)) addFont(el, 'gchordfont', this.gchordfont);\n\t\t\t\tif (this.differentFont(\"vocalfont\", defaultFonts)) addFont(el, 'vocalfont', this.vocalfont);\n\t\t\t\tif (this.differentFont(\"tripletfont\", defaultFonts)) addFont(el, 'tripletfont', this.tripletfont);\n\t\t\t} else if (elType === 'bar') {\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"measurefont\", defaultFonts)) addFont(el, 'measurefont', this.measurefont);\n\t\t\t\tif (this.differentFont(\"repeatfont\", defaultFonts)) addFont(el, 'repeatfont', this.repeatfont);\n\t\t\t}\n\t\t},\n\t\tduplicateStartEndingHoldOvers: function() {\n\t\t\tthis.endingHoldOver = {\n\t\t\t\tinTie: [],\n\t\t\t\tinTieChord: {}\n\t\t\t};\n\t\t\tfor (var i = 0; i < this.inTie.length; i++) {\n\t\t\t\tthis.endingHoldOver.inTie.push([]);\n\t\t\t\tif (this.inTie[i]) { // if a voice is suppressed there might be a gap in the array.\n\t\t\t\t\tfor (var j = 0; j < this.inTie[i].length; j++) {\n\t\t\t\t\t\tthis.endingHoldOver.inTie[i].push(this.inTie[i][j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.inTieChord) {\n\t\t\t\tif (this.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.endingHoldOver.inTieChord[key] = this.inTieChord[key];\n\t\t\t}\n\t\t},\n\t\trestoreStartEndingHoldOvers: function() {\n\t\t\tif (!this.endingHoldOver.inTie)\n\t\t\t\treturn;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tfor (var i = 0; i < this.endingHoldOver.inTie.length; i++) {\n\t\t\t\tthis.inTie.push([]);\n\t\t\t\tfor (var j = 0; j < this.endingHoldOver.inTie[i].length; j++) {\n\t\t\t\t\tthis.inTie[i].push(this.endingHoldOver.inTie[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.endingHoldOver.inTieChord) {\n\t\t\t\tif (this.endingHoldOver.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.inTieChord[key] = this.endingHoldOver.inTieChord[key];\n\t\t\t}\n\t\t},\n\t};\n\n\tvar addWarning = function(str) {\n\t\tif (!multilineVars.warnings)\n\t\t\tmultilineVars.warnings = [];\n\t\tmultilineVars.warnings.push(str);\n\t};\n\n\tvar addWarningObject = function(warningObject) {\n\t\tif (!multilineVars.warningObjects)\n\t\t\tmultilineVars.warningObjects = [];\n\t\tmultilineVars.warningObjects.push(warningObject);\n\t};\n\n\tvar encode = function(str) {\n\t\tvar ret = str.replace(/\\x12/g, ' ');\n\t\tret = ret.replace(/&/g, '&amp;');\n\t\tret = ret.replace(/</g, '&lt;');\n\t\treturn ret.replace(/>/g, '&gt;');\n\t};\n\n\tvar warn = function(str, line, col_num) {\n\t\tif (!line) line = \" \";\n\t\tvar bad_char = line[col_num];\n\t\tif (bad_char === ' ' || !bad_char)\n\t\t\tbad_char = \"SPACE\";\n\t\tvar clean_line = encode(line.substring(col_num - 64, col_num)) + '<span style=\"text-decoration:underline;font-size:1.3em;font-weight:bold;\">' + bad_char + '</span>' + encode(line.substring(col_num + 1).substring(0,64));\n\t\taddWarning(\"Music Line:\" + tokenizer.lineIndex + \":\" + (col_num+1) + ': ' + str + \":  \" + clean_line);\n\t\taddWarningObject({message:str, line:line, startChar: multilineVars.iChar + col_num, column: col_num});\n\t};\n\n\tvar header;\n\tvar music;\n\n\tthis.getWarnings = function() {\n\t\treturn multilineVars.warnings;\n\t};\n\tthis.getWarningObjects = function() {\n\t\treturn multilineVars.warningObjects;\n\t};\n\n\tvar addWords = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\twordsContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = wordsContinuation + words\n\t\twordsContinuation = ''\n\n\t\tif (!line) { warn(\"Can't add words before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tword = word.replace(/\\\\([-_*|~])/g, '$1')\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tvar escNext = false;\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!escNext && !addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\treplace = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tescNext = words[i] === '\\\\'\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t\tif (el.el_type !== 'bar') {\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [{syllable: \"\", divider: \" \"}];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push({syllable: \"\", divider: \" \"});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (lyric.syllable)\n\t\t\t\t\t\t\tlyric.syllable = lyric.syllable.replace(/ +/g,'\\xA0');\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar addSymbols = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\tsymbolContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = symbolContinuation + words\n\t\tsymbolContinuation = ''\n\n\t\t// TODO-PER: Currently copied from w: line. This needs to be read as symbols instead.\n\t\tif (!line) { warn(\"Can't add symbols before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\treplace = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar parseLine = function(line) {\n\t\tif (parseCommon.startsWith(line, '%%')) {\n\t\t\tvar err = parseDirective.addDirective(line.substring(2));\n\t\t\tif (err) warn(err, line, 2);\n\t\t\treturn;\n\t\t}\n\n\t\tvar i = line.indexOf('%');\n\t\tif (i >= 0)\n\t\t\tline = line.substring(0, i);\n\t\tline = line.replace(/\\s+$/, '');\n\n\t\tif (line.length === 0)\n\t\t\treturn;\n\n\t\tif (wordsContinuation) {\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (symbolContinuation) {\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (line.length < 2 || line[1] !== ':' || music.lineContinuation) {\n\t\t\tmusic.parseMusic(line);\n\t\t\treturn\n\t\t}\n\n\t\tvar ret = header.parseHeader(line);\n\t\tif (ret.regular)\n\t\t\tmusic.parseMusic(line);\n\t\tif (ret.newline)\n\t\t\tmusic.startNewLine();\n\t\tif (ret.words)\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\tif (ret.symbols)\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t};\n\n\tfunction appendLastMeasure(voice, nextVoice) {\n\t\tvoice.push({\n\t\t\tel_type: 'hint'\n\t\t});\n\t\tfor (var i = 0; i < nextVoice.length; i++) {\n\t\t\tvar element = nextVoice[i];\n\t\t\tvar hint = Object.assign({},element);\n\t\t\tvoice.push(hint);\n\t\t\tif (element.el_type === 'bar')\n\t\t\t\t\treturn;\n\t\t}\n\t}\n\n\tfunction addHintMeasure(staff, nextStaff) {\n\t\tfor (var i = 0; i < staff.length; i++) {\n\t\t\tvar stave = staff[i];\n\t\t\tvar nextStave = nextStaff[i];\n\t\t\tif (nextStave) { // Be sure there is the same number of staves on the next line.\n\t\t\t\tfor (var j = 0; j < nextStave.voices.length; j++) {\n\t\t\t\t\tvar nextVoice = nextStave.voices[j];\n\t\t\t\t\tvar voice = stave.voices[j];\n\t\t\t\t\tif (voice) { // Be sure there are the same number of voices on the previous line.\n\t\t\t\t\t\tappendLastMeasure(voice, nextVoice);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction addHintMeasures() {\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar line = tune.lines[i].staff;\n\t\t\tif (line) {\n\t\t\t\tvar j = i+1;\n\t\t\t\twhile (j < tune.lines.length && tune.lines[j].staff === undefined)\n\t\t\t\t\tj++;\n\t\t\t\tif (j < tune.lines.length) {\n\t\t\t\t\tvar nextLine = tune.lines[j].staff;\n\t\t\t\t\taddHintMeasure(line, nextLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.parse = function(strTune, switches, startPos) {\n\t\t// the switches are optional and cause a difference in the way the tune is parsed.\n\t\t// switches.header_only : stop parsing when the header is finished\n\t\t// switches.stop_on_warning : stop at the first warning encountered.\n\t\t// switches.print: format for the page instead of the browser.\n\t\t// switches.format: a hash of the desired formatting commands.\n\t\t// switches.hint_measures: put the next measure at the end of the current line.\n\t\t// switches.transpose: change the key signature, chords, and notes by a number of half-steps.\n\t\tif (!switches) switches = {};\n\t\tif (!startPos) startPos = 0;\n\t\ttune.reset();\n\n\t\t// Take care of whatever line endings come our way\n\t\t// Tack on newline temporarily to make the last line continuation work\n\t\tstrTune = strTune.replace(/\\r\\n?/g, '\\n') + '\\n';\n\n\t\t// get rid of latex commands. If a line starts with a backslash, then it is replaced by spaces to keep the character count the same.\n\t\tvar arr = strTune.split(\"\\n\\\\\");\n\t\tif (arr.length > 1) {\n\t\t\tfor (var i2 = 1; i2 < arr.length; i2++) {\n\t\t\t\twhile (arr[i2].length > 0 && arr[i2][0] !== \"\\n\") {\n\t\t\t\t\tarr[i2] = arr[i2].substr(1);\n\t\t\t\t\tarr[i2-1] += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tstrTune = arr.join(\"  \"); //. the split removed two characters, so this puts them back\n\t\t}\n\t\t// take care of line continuations right away, but keep the same number of characters\n\t\tstrTune = strTune.replace(/\\\\([ \\t]*)(%.*)*\\n/g, function(all, backslash, comment){\n\t\t\tvar padding = comment ? Array(comment.length +1).join(' ') : \"\";\n\t\t\treturn backslash + \"\\x12\" + padding + '\\n';\n\t\t});\n\t\tvar lines = strTune.split('\\n')\n\t\tif (parseCommon.last(lines).length === 0)\t// remove the blank line we added above.\n\t\t\tlines.pop();\n\t\ttokenizer = new Tokenizer(lines, multilineVars);\n\t\theader = new ParseHeader(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tmusic = new ParseMusic(tokenizer, warn, multilineVars, tune, tuneBuilder, header);\n\n\t\tif (switches.print)\n\t\t\ttune.media = 'print';\n\t\tmultilineVars.reset();\n\t\tmultilineVars.iChar = startPos;\n\t\tif (switches.visualTranspose) {\n\t\t\tmultilineVars.globalTranspose = parseInt(switches.visualTranspose);\n\t\t\tif (multilineVars.globalTranspose === 0)\n\t\t\t\tmultilineVars.globalTranspose = undefined;\n\t\t\telse\n\t\t\t\ttuneBuilder.setVisualTranspose(switches.visualTranspose);\n\t\t} else\n\t\t\tmultilineVars.globalTranspose = undefined;\n\t\tif (switches.lineBreaks) {\n\t\t\t// The line break numbers are 0-based and they reflect the last measure of the current line.\n\t\t\tmultilineVars.lineBreaks = switches.lineBreaks;\n\t\t\t//multilineVars.continueall = true;\n\t\t}\n\t\theader.reset(tokenizer, warn, multilineVars, tune);\n\n\t\ttry {\n\t\t\tif (switches.format) {\n\t\t\t\tparseDirective.globalFormatting(switches.format);\n\t\t\t}\n\t\t\tvar line = tokenizer.nextLine();\n\t\t\twhile (line) {\n\t\t\t\tif (switches.header_only && multilineVars.is_in_header === false)\n\t\t\t\t\tthrow \"normal_abort\";\n\t\t\t\tif (switches.stop_on_warning && multilineVars.warnings)\n\t\t\t\t\tthrow \"normal_abort\";\n\n\t\t\t\tvar wasInHeader = multilineVars.is_in_header;\n\t\t\t\tparseLine(line);\n\t\t\t\tif (wasInHeader && !multilineVars.is_in_header) {\n\t\t\t\t\ttuneBuilder.setRunningFont(\"annotationfont\", multilineVars.annotationfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"gchordfont\", multilineVars.gchordfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"tripletfont\", multilineVars.tripletfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"vocalfont\", multilineVars.vocalfont);\n\t\t\t\t}\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t}\n\n\t\t\tif (wordsContinuation) {\n\t\t\t\taddWords(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tif (symbolContinuation) {\n\t\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tmultilineVars.openSlurs = tuneBuilder.cleanUp(multilineVars.barsperstaff, multilineVars.staffnonote, multilineVars.openSlurs);\n\n\t\t} catch (err) {\n\t\t\tif (err !== \"normal_abort\")\n\t\t\t\tthrow err;\n\t\t}\n\n\t\tvar ph = 11*72;\n\t\tvar pl = 8.5*72;\n\t\tswitch (multilineVars.papersize) {\n\t\t\t//case \"letter\": ph = 11*72; pl = 8.5*72; break;\n\t\t\tcase \"legal\": ph = 14*72; pl = 8.5*72; break;\n\t\t\tcase \"A4\": ph = 11.7*72; pl = 8.3*72; break;\n\t\t}\n\t\tif (multilineVars.landscape) {\n\t\t\tvar x = ph;\n\t\t\tph = pl;\n\t\t\tpl = x;\n\t\t}\n\t\tif (!tune.formatting.pagewidth)\n\t\t\ttune.formatting.pagewidth = pl;\n\t\tif (!tune.formatting.pageheight)\n\t\t\ttune.formatting.pageheight = ph;\n\n\t\tif (switches.hint_measures) {\n\t\t\taddHintMeasures();\n\t\t}\n\n\t\twrap.wrapLines(tune, multilineVars.lineBreaks, multilineVars.barNumbers);\n\t};\n};\n\nmodule.exports = Parse;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_book.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_book.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_parse_book.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = __webpack_require__(/*! ./abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\n\nvar bookParser = function(book) {\n\t\"use strict\";\n\n\tvar directives = \"\";\n\tvar initialWhiteSpace = book.match(/(\\s*)/)\n\tbook = parseCommon.strip(book);\n\tvar tuneStrings = book.split(\"\\nX:\");\n\t// Put back the X: that we lost when splitting the tunes.\n\tfor (var i = 1; i < tuneStrings.length; i++)\n\t\ttuneStrings[i] = \"X:\" + tuneStrings[i];\n\t// Keep track of the character position each tune starts with. If the string starts with white space, count that, too.\n\tvar pos = initialWhiteSpace ? initialWhiteSpace[0].length : 0;\n\tvar tunes = [];\n\ttuneStrings.forEach(function(tune) {\n\t\ttunes.push({ abc: tune, startPos: pos});\n\t\tpos += tune.length + 1; // We also lost a newline when splitting, so count that.\n\t});\n\tif (tunes.length > 1 && !parseCommon.startsWith(tunes[0].abc, 'X:')) {\t// If there is only one tune, the X: might be missing, otherwise assume the top of the file is \"intertune\"\n\t\t// There could be file-wide directives in this, if so, we need to insert it into each tune. We can probably get away with\n\t\t// just looking for file-wide directives here (before the first tune) and inserting them at the bottom of each tune, since\n\t\t// the tune is parsed all at once. The directives will be seen before the engraver begins processing.\n\t\tvar dir = tunes.shift();\n\t\tvar arrDir = dir.abc.split('\\n');\n\t\tarrDir.forEach(function(line) {\n\t\t\tif (parseCommon.startsWith(line, '%%'))\n\t\t\t\tdirectives += line + '\\n';\n\t\t});\n\t}\n\tvar header = directives;\n\n\t// Now, the tune ends at a blank line, so truncate it if needed. There may be \"intertune\" stuff.\n\ttunes.forEach(function(tune) {\n\t\tvar end = tune.abc.indexOf('\\n\\n');\n\t\tif (end > 0)\n\t\t\ttune.abc = tune.abc.substring(0, end);\n\t\ttune.pure = tune.abc;\n\t\ttune.abc = directives + tune.abc;\n\n\t\t// for the user's convenience, parse and store the title separately. The title is between the first T: and the next \\n\n\t\ttune.title = \"\";\n\t\tvar title = tune.pure.split(\"T:\");\n\t\tif (title.length > 1) {\n\t\t\ttitle = title[1].split(\"\\n\");\n\t\t\ttune.title = parseCommon.strip(title[0]);\n\t\t}\n\n\t\t// for the user's convenience, parse and store the id separately. The id is between the first X: and the next \\n\n\t\tvar id = tune.pure.substring(2, tune.pure.indexOf(\"\\n\"));\n\t\ttune.id = parseCommon.strip(id);\n\t});\n\n\treturn {\n\t\theader: header,\n\t\ttunes: tunes\n\t};\n};\n\nmodule.exports = bookParser;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_book.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_directive.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_directive.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var parseCommon = __webpack_require__(/*! ./abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\n\nvar parseDirective = {};\n\n(function() {\n\t\"use strict\";\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseDirective.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t\tinitializeFonts();\n\t};\n\n\tfunction initializeFonts() {\n\t\tmultilineVars.annotationfont  = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.gchordfont  = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.historyfont  = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.infofont  = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.measurefont  = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.partsfont  = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.repeatfont  = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.textfont  = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.tripletfont = {face: \"Times\", size: 11, weight: \"normal\", style: \"italic\", decoration: \"none\"};\n\t\tmultilineVars.vocalfont  = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.wordsfont  = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// These fonts are global for the entire tune.\n\t\ttune.formatting.composerfont  = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\ttune.formatting.subtitlefont  = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tempofont  = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.titlefont  = { face: \"\\\"Times New Roman\\\"\", size: 20, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.footerfont  = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.headerfont  = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.voicefont  = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tablabelfont  = { face: \"\\\"Trebuchet MS\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabnumberfont = { face: \"\\\"Arial\\\"\", size: 11, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabgracefont = { face: \"\\\"Arial\\\"\", size: 8, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// these are the default fonts for these element types. In the printer, these fonts might change as the tune progresses.\n\t\ttune.formatting.annotationfont  = multilineVars.annotationfont;\n\t\ttune.formatting.gchordfont  = multilineVars.gchordfont;\n\t\ttune.formatting.historyfont  = multilineVars.historyfont;\n\t\ttune.formatting.infofont  = multilineVars.infofont;\n\t\ttune.formatting.measurefont  = multilineVars.measurefont;\n\t\ttune.formatting.partsfont  = multilineVars.partsfont;\n\t\ttune.formatting.repeatfont  = multilineVars.repeatfont;\n\t\ttune.formatting.textfont  = multilineVars.textfont;\n\t\ttune.formatting.tripletfont  = multilineVars.tripletfont;\n\t\ttune.formatting.vocalfont  = multilineVars.vocalfont;\n\t\ttune.formatting.wordsfont  = multilineVars.wordsfont;\n\t}\n\n\tvar fontTypeCanHaveBox = { gchordfont: true, measurefont: true, partsfont: true, annotationfont: true, composerfont: true, historyfont: true, infofont: true, subtitlefont: true, textfont: true, titlefont: true, voicefont: true  };\n\n\tvar fontTranslation = function(fontFace) {\n\t\t// This translates Postscript fonts for a web alternative.\n\t\t// Note that the postscript fonts contain italic and bold info in them, so what is returned is a hash.\n\n\t\tswitch (fontFace) {\n\t\t\tcase \"Arial-Italic\":\n\t\t\t\treturn { face: \"Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Arial-Bold\":\n\t\t\t\treturn { face: \"Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Demi\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-DemiItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Light\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-LightItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-Oblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier-Bold\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Book\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-BookOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Demi\":\n\t\t\tcase \"Avant-Garde-Demi\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-DemiOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Oblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Bold\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-BoldOblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Oblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Bold\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Roman\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Italic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Bold\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-BoldItalic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Roman\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Italic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Bold\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times\":\n\t\t\tcase \"Times-Roman\":\n\t\t\tcase \"Times-Narrow\":\n\t\t\tcase \"Times-Courier\":\n\t\t\tcase \"Times-New-Roman\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-Italic\":\n\t\t\tcase \"Times-Italics\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times-Bold\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"ZapfChancery-MediumItalic\":\n\t\t\t\treturn { face: \"\\\"Zapf Chancery\\\",cursive,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\tvar getFontParameter = function(tokens, currentSetting, str, position, cmd) {\n\t\t// Every font parameter has the following format:\n\t\t// <face> <utf8> <size> <modifiers> <box>\n\t\t// Where:\n\t\t// face: either a standard web font name, or a postscript font, enumerated in fontTranslation. This could also be an * or be missing if the face shouldn't change.\n\t\t// utf8: This is optional, and specifies utf8. That's all that is supported so the field is just silently ignored.\n\t\t// size: The size, in pixels. This may be omitted if the size is not changing.\n\t\t// modifiers: zero or more of \"bold\", \"italic\", \"underline\"\n\t\t// box: Only applies to the measure numbers, gchords, and the parts. If present, then a box is drawn around the characters.\n\t\t// If face is present, then all the modifiers are cleared. If face is absent, then the modifiers are illegal.\n\t\t// The face can be a single word, a set of words separated by hyphens, or a quoted string.\n\t\t//\n\t\t// So, in practicality, there are three types of font definitions: a number only, an asterisk and a number only, or the full definition (with an optional size).\n\t\tfunction processNumberOnly() {\n\t\t\tvar size = parseInt(tokens[0].token);\n\t\t\ttokens.shift();\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Can't set just the size of the font since there is no default value.\", str, position);\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\", size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 0) {\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 1 && tokens[0].token === \"box\" && fontTypeCanHaveBox[cmd])\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size, box: true};\n\t\t\twarn(\"Extra parameters in font definition.\", str, position);\n\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t}\n\n\t\t// format 1: asterisk and number only\n\t\tif (tokens[0].token === '*') {\n\t\t\ttokens.shift();\n\t\t\tif (tokens[0].type === 'number')\n\t\t\t\treturn processNumberOnly();\n\t\t\telse {\n\t\t\t\twarn(\"Expected font size number after *.\", str, position);\n\t\t\t}\n\t\t}\n\n\t\t// format 2: number only\n\t\tif (tokens[0].type === 'number') {\n\t\t\treturn processNumberOnly();\n\t\t}\n\n\t\t// format 3: whole definition\n\t\tvar face = [];\n\t\tvar size;\n\t\tvar weight = \"normal\";\n\t\tvar style = \"normal\";\n\t\tvar decoration = \"none\";\n\t\tvar box = false;\n\t\tvar state = 'face';\n\t\tvar hyphenLast = false;\n\t\twhile (tokens.length) {\n\t\t\tvar currToken = tokens.shift();\n\t\t\tvar word = currToken.token.toLowerCase();\n\t\t\tswitch (state) {\n\t\t\t\tcase 'face':\n\t\t\t\t\tif (hyphenLast || (word !== 'utf' && currToken.type !== 'number' && word !== \"bold\" && word !== \"italic\" && word !== \"underline\" && word !== \"box\")) {\n\t\t\t\t\t\tif (face.length > 0 && currToken.token === '-') {\n\t\t\t\t\t\t\thyphenLast = true;\n\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (hyphenLast) {\n\t\t\t\t\t\t\t\thyphenLast = false;\n\t\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tface.push(currToken.token);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\t\t} else if (word === \"bold\")\n\t\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t\t} else if (word === \"utf\") {\n\t\t\t\t\t\t\tcurrToken = tokens.shift(); // this gets rid of the \"8\" after \"utf\"\n\t\t\t\t\t\t\tstate = \"size\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"size\":\n\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twarn(\"Expected font size in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"modifier\":\n\t\t\t\t\tif (word === \"bold\")\n\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t} else\n\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"finished\":\n\t\t\t\t\twarn(\"Extra characters found after \\\"box\\\" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size === undefined) {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the size of the font since there is no default value.\", str, position);\n\t\t\t\tsize = 12;\n\t\t\t} else\n\t\t\t\tsize = currentSetting.size;\n\t\t} else\n\t\t\tsize = parseFloat(size);\n\n\t\tface = face.join(' ');\n\t\tif (face === '') {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the name of the font since there is no default value.\", str, position);\n\t\t\t\tface = \"sans-serif\";\n\t\t\t} else\n\t\t\t\tface = currentSetting.face;\n\t\t}\n\t\tvar psFont = fontTranslation(face);\n\t\tvar font = {};\n\t\tif (psFont) {\n\t\t\tfont.face = psFont.face;\n\t\t\tfont.weight = psFont.weight;\n\t\t\tfont.style = psFont.style;\n\t\t\tfont.decoration = psFont.decoration;\n\t\t\tfont.size = size;\n\t\t\tif (box)\n\t\t\t\tfont.box = true;\n\t\t\treturn font;\n\t\t}\n\t\tfont.face = face;\n\t\tfont.weight = weight;\n\t\tfont.style = style;\n\t\tfont.decoration = decoration;\n\t\tfont.size = size;\n\t\tif (box)\n\t\t\tfont.box = true;\n\t\treturn font;\n\t};\n\n\tvar getChangingFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\tmultilineVars[cmd] = getFontParameter(tokens, multilineVars[cmd], str, 0, cmd);\n\t\tif (multilineVars.is_in_header) // If the font appears in the header, then it becomes the default font.\n\t\t\ttune.formatting[cmd] = multilineVars[cmd];\n\t\treturn null;\n\t};\n\tvar getGlobalFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\ttune.formatting[cmd] = getFontParameter(tokens, tune.formatting[cmd], str, 0, cmd);\n\t\treturn null;\n\t};\n\n\tvar setScale = function(cmd, tokens) {\n\t\tvar scratch = \"\";\n\t\ttokens.forEach(function(tok) {\n\t\t\tscratch += tok.token;\n\t\t});\n\t\tvar num = parseFloat(scratch);\n\t\tif (isNaN(num) || num === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\ttune.formatting.scale = num;\n\n\t};\n\t// starts at 35\n\tvar drumNames = [\n\t\t\"acoustic-bass-drum\",\n\t\t\"bass-drum-1\",\n\t\t\"side-stick\",\n\t\t\"acoustic-snare\",\n\t\t\"hand-clap\",\n\t\t\"electric-snare\",\n\t\t\"low-floor-tom\",\n\t\t\"closed-hi-hat\",\n\t\t\"high-floor-tom\",\n\t\t\"pedal-hi-hat\",\n\t\t\"low-tom\",\n\t\t\"open-hi-hat\",\n\t\t\"low-mid-tom\",\n\t\t\"hi-mid-tom\",\n\t\t\"crash-cymbal-1\",\n\t\t\"high-tom\",\n\t\t\"ride-cymbal-1\",\n\t\t\"chinese-cymbal\",\n\t\t\"ride-bell\",\n\t\t\"tambourine\",\n\t\t\"splash-cymbal\",\n\t\t\"cowbell\",\n\t\t\"crash-cymbal-2\",\n\t\t\"vibraslap\",\n\t\t\"ride-cymbal-2\",\n\t\t\"hi-bongo\",\n\t\t\"low-bongo\",\n\t\t\"mute-hi-conga\",\n\t\t\"open-hi-conga\",\n\t\t\"low-conga\",\n\t\t\"high-timbale\",\n\t\t\"low-timbale\",\n\t\t\"high-agogo\",\n\t\t\"low-agogo\",\n\t\t\"cabasa\",\n\t\t\"maracas\",\n\t\t\"short-whistle\",\n\t\t\"long-whistle\",\n\t\t\"short-guiro\",\n\t\t\"long-guiro\",\n\t\t\"claves\",\n\t\t\"hi-wood-block\",\n\t\t\"low-wood-block\",\n\t\t\"mute-cuica\",\n\t\t\"open-cuica\",\n\t\t\"mute-triangle\",\n\t\t\"open-triangle\",\n\t];\n\n\tvar interpretPercMap = function(restOfString) {\n\t\tvar tokens = restOfString.split(/\\s+/); // Allow multiple spaces.\n\t\tif (tokens.length !== 2 && tokens.length !== 3)\n\t\t\treturn { error: 'Expected parameters \"abc-note\", \"drum-sound\", and optionally \"note-head\"'};\n\t\tvar key = tokens[0];\n\t\t// The percussion sound can either be a MIDI number or a drum name. If it is not a number then check for a name.\n\t\tvar pitch = parseInt(tokens[1], 10);\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81) && tokens[1]) {\n\t\t\tpitch = drumNames.indexOf(tokens[1].toLowerCase()) + 35;\n\t\t}\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81))\n\t\t\treturn { error: 'Expected drum name, received \"' + tokens[1] + '\"' };\n\t\tvar value = { sound: pitch };\n\t\tif (tokens.length === 3)\n\t\t\tvalue.noteHead = tokens[2];\n\t\treturn { key: key, value: value };\n\t};\n\n\tvar getRequiredMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn { error: \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\"};\n\t\treturn points.value;\n\t};\n\tvar oneParameterMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\";\n\t\ttune.formatting[cmd] = points.value;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVar = function(key, cmd, tokens, min, max) {\n\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\tvar i = tokens[0].intt;\n\t\tif (min !== undefined && i < min)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number greater than or equal to \" + min + \" as a parameter.\";\n\t\tif (max !== undefined && i > max)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number less than or equal to \" + max + \" as a parameter.\";\n\t\tmultilineVars[key] = i;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarBool = function(key, cmd, tokens) {\n\t\tif (tokens.length === 1 && (tokens[0].token === 'true' || tokens[0].token === 'false')) {\n\t\t\tmultilineVars[key] = tokens[0].token === 'true';\n\t\t\treturn null;\n\t\t}\n\t\tvar str = addMultilineVar(key, cmd, tokens, 0, 1);\n\t\tif (str !== null) return str;\n\t\tmultilineVars[key] = (multilineVars[key] === 1);\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarOneParamChoice = function(key, cmd, tokens, choices) {\n\t\tif (tokens.length !== 1)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tvar choice = tokens[0].token;\n\t\tvar found = false;\n\t\tfor (var i = 0; !found && i < choices.length; i++) {\n\t\t\tif (choices[i] === choice)\n\t\t\t\tfound = true;\n\t\t}\n\t\tif (!found)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tmultilineVars[key] = choice;\n\t\treturn null;\n\t};\n\n\tvar midiCmdParam0 = [\n\t\t\"nobarlines\",\n\t\t\"barlines\",\n\t\t\"beataccents\",\n\t\t\"nobeataccents\",\n\t\t\"droneon\",\n\t\t\"droneoff\",\n\t\t\"drumon\",\n\t\t\"drumoff\",\n\t\t\"fermatafixed\",\n\t\t\"fermataproportional\",\n\t\t\"gchordon\",\n\t\t\"gchordoff\",\n\t\t\"controlcombo\",\n\t\t\"temperamentnormal\",\n\t\t\"noportamento\"\n\t];\n\tvar midiCmdParam1String = [\n\t\t\"gchord\",\n\t\t\"ptstress\",\n\t\t\"beatstring\"\n\t];\n\tvar midiCmdParam1Integer = [\n\t\t\"bassvol\",\n\t\t\"chordvol\",\n\t\t\"c\",\n\t\t\"channel\",\n\t\t\"beatmod\",\n\t\t\"deltaloudness\",\n\t\t\"drumbars\",\n\t\t\"gracedivider\",\n\t\t\"makechordchannels\",\n\t\t\"randomchordattack\",\n\t\t\"chordattack\",\n\t\t\"stressmodel\",\n\t\t\"transpose\",\n\t\t\"rtranspose\",\n\t\t\"vol\",\n\t\t\"volinc\",\n\t\t\"gchordbars\"\t\n\t];\n\tvar midiCmdParam1Integer1OptionalInteger = [\n\t\t\"program\"\n\t];\n\tvar midiCmdParam2Integer = [\n\t\t\"ratio\",\n\t\t\"snt\",\n\t\t\"bendvelocity\",\n\t\t\"pitchbend\",\n\t\t\"control\",\n\t\t\"temperamentlinear\"\n\t];\n\tvar midiCmdParam4Integer = [\n\t\t\"beat\"\n\t];\n\tvar midiCmdParam5Integer = [\n\t\t\"drone\"\n\t];\n\tvar midiCmdParam1String1Integer = [\n\t\t\"portamento\"\n\t];\n\tvar midiCmdParamFraction = [\n\t\t\"expand\",\n\t\t\"grace\",\n\t\t\"trim\"\n\t];\n\tvar midiCmdParam1StringVariableIntegers = [\n\t\t\"drum\",\n\t\t\"chordname\"\n\t];\n  \tvar midiCmdParam1Integer1OptionalString = [\n  \t\t\"bassprog\", \"chordprog\"\n  \t];\n\n\n\tvar parseMidiCommand = function(midi, tune, restOfString) {\n\t\tvar midi_cmd = midi.shift().token;\n\t\tvar midi_params = [];\n\t\tif (midiCmdParam0.indexOf(midi_cmd) >= 0) {\n\t\t\t// NO PARAMETERS\n\t\t\tif (midi.length !== 0)\n\t\t\t\twarn(\"Unexpected parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t} else if (midiCmdParam1String.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t} else if (midiCmdParam1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL PARAMETER\n\t\t\tif (midi.length !== 1 && midi.length !== 2)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 2)\n\t\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam2Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// TWO INT PARAMETERS\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected two integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1String1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER, ONE INT PARAMETER\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected one string and one integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midi_cmd === 'drummap') {\n\t\t\t// BUILD AN OBJECT OF ABC NOTE => MIDI NOTE\n\t\t\tif (midi.length === 2 && midi[0].type === 'alpha' && midi[1].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token] = midi[1].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else if (midi.length === 3 && midi[0].type === 'punct' && midi[1].type === 'alpha' && midi[2].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token+midi[1].token] = midi[2].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else {\n\t\t\t\twarn(\"Expected one note name and one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t}\n\t\t} else if (midiCmdParamFraction.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE FRACTION PARAMETER\n\t\t\tif (midi.length !== 3)\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].token !== \"/\" || midi[2].type !== \"number\")\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam4Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FOUR INT PARAMETERS\n\t\t\tif (midi.length !== 4)\n\t\t\t\twarn(\"Expected four parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\")\n\t\t\t\twarn(\"Expected four integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam5Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FIVE INT PARAMETERS\n\t\t\tif (midi.length !== 5)\n\t\t\t\twarn(\"Expected five parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\" || midi[4].type !== \"number\")\n\t\t\t\twarn(\"Expected five integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t\tmidi_params.push(midi[4].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL OCTAVE PARAMETER\n\t\t\tif (midi.length !== 1 || midi.length !== 4)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 4) {\n\t\t\t\tif (midi[1].token !== \"octave\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[2].token !== \"=\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[3].type !== \"number\")\n\t\t\t\t\twarn(\"Expected integer parameter for octave in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t} else {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 4)\n\t\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1StringVariableIntegers.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING, VARIABLE INT PARAMETERS\n\t\t\tif (midi.length < 2)\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\")\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tvar p = midi.shift();\n\t\t\t\tmidi_params.push(p.token);\n\t\t\t\twhile (midi.length > 0) {\n\t\t\t\t\tp = midi.shift();\n\t\t\t\t\tif (p.type !== \"number\")\n\t\t\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\t\tmidi_params.push(p.intt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t    else if (midiCmdParam1Integer1OptionalString.indexOf(midi_cmd) >= 0){\n\n\t      // ONE INT PARAMETER, ONE OPTIONAL string\n\t    \tif (midi.length !== 1 && midi.length !== 2) \n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\") \n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"alpha\") \n\t\t\t\twarn(\"Expected alpha parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t        \tmidi_params.push(midi[0].intt);\n\n\t        // Currently only bassprog and chordprog with optional octave shifts use this path\n\t        if (midi.length === 2){\n\t          var cmd = midi[1].token;\n\t          if (cmd.indexOf(\"octave=\") != -1){\n\t            cmd = cmd.replace(\"octave=\",\"\");\n\t            cmd = parseInt(cmd);\n\t            if (!isNaN(cmd)){\n\t              // Limit range from -1 to 3 octaves\n\t              if (cmd < -1){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be >= -1 (recv:'+cmd+')');\n\t                cmd = -1;\n\t              }\n\t              if (cmd > 3){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be <= 3 (recv:'+cmd+')');\n\t                cmd = 3;\n\t              }\n\t              midi_params.push(cmd);\n\t            } else\n\t            warn(\"Expected octave value in MIDI\" + midi_cmd);\n\t          }\n\t          else{\n\t            warn(\"Expected octave= in MIDI\" + midi_cmd);\n\t          }\n\t        }\n\t      }\n\t    }\n\n\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\ttuneBuilder.appendElement('midi', -1, -1, { cmd: midi_cmd, params: midi_params });\n\t\telse {\n\t\t\tif (tune.formatting['midi'] === undefined)\n\t\t\t\ttune.formatting['midi'] = {};\n\t\t\ttune.formatting['midi'][midi_cmd] = midi_params;\n\t\t}\n\t};\n\n\tparseDirective.parseFontChangeLine = function(textstr) {\n\t\t// We don't want to match two dollar signs, so change those temporarily\n\t\ttextstr = textstr.replace(/\\$\\$/g,\"\\x03\")\n\t\tvar textParts = textstr.split('$');\n\t\tif (textParts.length > 1 && multilineVars.setfont) {\n\t\t\tvar textarr = [ ];\n\t\t\tif (textParts[0] !== '') // did the original string start with `$`?\n\t\t\t\ttextarr.push({ text: textParts[0] })\n\t\t\tfor (var i = 1; i < textParts.length; i++) {\n\t\t\t\tif (textParts[i][0] === '0')\n\t\t\t\t\ttextarr.push({ text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\telse {\n\t\t\t\t\tvar whichFont = parseInt(textParts[i][0],10)\n\t\t\t\t\tif (multilineVars.setfont[whichFont])\n\t\t\t\t\t\ttextarr.push({font: multilineVars.setfont[whichFont], text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\t\telse\n\t\t\t\t\t\ttextarr[textarr.length-1].text += '$' + textParts[i].replace(/\\x03/g,\"$$\");\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\treturn textarr;\n\t\t}\n\t\treturn textstr.replace(/\\x03/g,\"$$\");\n\t};\n\n\tvar positionChoices = [ 'auto', 'above', 'below', 'hidden' ];\n\tparseDirective.addDirective = function(str) {\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\t// 3 or more % in a row, or just spaces after %% is just a comment\n\t\tif (tokens.length === 0 || tokens[0].type !== 'alpha') return null;\n\t\tvar restOfString = str.substring(str.indexOf(tokens[0].token)+tokens[0].token.length);\n\t\trestOfString = tokenizer.stripComment(restOfString);\n\t\tvar cmd = tokens.shift().token.toLowerCase();\n\t\tvar scratch = \"\";\n\t\tvar line;\n\t\tswitch (cmd)\n\t\t{\n\t\t\t// The following directives were added to abc_parser_lint, but haven't been implemented here.\n\t\t\t// Most of them are direct translations from the directives that will be parsed in. See abcm2ps's format.txt for info on each of these.\n\t\t\t//\t\t\t\t\talignbars: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\taligncomposer: { type: \"string\", Enum: [ 'left', 'center','right' ], optional: true },\n\t\t\t//\t\t\t\t\tbstemdown: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tcontinueall: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tdynalign: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprabove: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprbelow: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgchordbox: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgracespacebefore: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceinside: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceafter: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tinfospace: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tlineskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxshrink: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxsysstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tnotespacingfactor: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tparskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tslurheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tsplittune: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tsquarebreve: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstemheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tstraightflags: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstretchstaff: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\ttitleformat: { type: \"string\", optional: true },\n\t\t\tcase \"bagpipes\":tune.formatting.bagpipes = true;break;\n\t\t\tcase \"flatbeams\":tune.formatting.flatbeams = true;break;\n\t\t\tcase \"jazzchords\":tune.formatting.jazzchords = true;break;\n\t\t\tcase \"accentAbove\":tune.formatting.accentAbove = true;break;\n\t\t\tcase \"germanAlphabet\":tune.formatting.germanAlphabet = true;break;\n\t\t\tcase \"landscape\":multilineVars.landscape = true;break;\n\t\t\tcase \"papersize\":multilineVars.papersize = restOfString;break;\n\t\t\tcase \"graceslurs\":\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0' || tokens[0].token === 'false')\n\t\t\t\t\ttune.formatting.graceSlurs = false;\n\t\t\t\telse if (tokens[0].token === '1' || tokens[0].token === 'true')\n\t\t\t\t\ttune.formatting.graceSlurs = true;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"lineThickness\":\n\t\t\t\tvar lt = parseStretchLast(tokens);\n\t\t\t\tif (lt.value !== undefined)\n\t\t\t\t\ttune.formatting.lineThickness = lt.value;\n\t\t\t\tif (lt.error)\n\t\t\t\t\treturn lt.error;\n\t\t\t\tbreak;\n\t\t\tcase \"stretchlast\":\n\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\tif (sl.error)\n\t\t\t\t\treturn sl.error;\n\t\t\t\tbreak;\n\t\t\tcase \"titlecaps\":multilineVars.titlecaps = true;break;\n\t\t\tcase \"titleleft\":tune.formatting.titleleft = true;break;\n\t\t\tcase \"measurebox\":tune.formatting.measurebox = true;break;\n\n\t\t\tcase \"vocal\": return addMultilineVarOneParamChoice(\"vocalPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"dynamic\": return addMultilineVarOneParamChoice(\"dynamicPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"gchord\": return addMultilineVarOneParamChoice(\"chordPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"ornament\": return addMultilineVarOneParamChoice(\"ornamentPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"volume\": return addMultilineVarOneParamChoice(\"volumePosition\", cmd, tokens, positionChoices);\n\n\t\t\tcase \"botmargin\":\n\t\t\tcase \"botspace\":\n\t\t\tcase \"composerspace\":\n\t\t\tcase \"indent\":\n\t\t\tcase \"leftmargin\":\n\t\t\tcase \"linesep\":\n\t\t\tcase \"musicspace\":\n\t\t\tcase \"partsspace\":\n\t\t\tcase \"pageheight\":\n\t\t\tcase \"pagewidth\":\n\t\t\tcase \"rightmargin\":\n\t\t\tcase \"stafftopmargin\":\n\t\t\tcase \"staffsep\":\n\t\t\tcase \"staffwidth\":\n\t\t\tcase \"subtitlespace\":\n\t\t\tcase \"sysstaffsep\":\n\t\t\tcase \"systemsep\":\n\t\t\tcase \"textspace\":\n\t\t\tcase \"titlespace\":\n\t\t\tcase \"topmargin\":\n\t\t\tcase \"topspace\":\n\t\t\tcase \"vocalspace\":\n\t\t\tcase \"wordsspace\":\n\t\t\t\treturn oneParameterMeasurement(cmd, tokens);\n\t\t\tcase \"voicescale\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\treturn \"voicescale requires one float as a parameter\";\n\t\t\t\tvar voiceScale = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.scale = voiceScale.floatt;\n\t\t\t\t\ttuneBuilder.changeVoiceScale(multilineVars.currentVoice.scale);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"voicecolor\":\n\t\t\t\tif (tokens.length !== 1) // this could either be of type alpha or quote, but it's ok if it is a number\n\t\t\t\t\treturn \"voicecolor requires one string as a parameter\";\n\t\t\t\tvar voiceColor = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.color = voiceColor.token;\n\t\t\t\t\ttuneBuilder.changeVoiceColor(multilineVars.currentVoice.color);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"vskip\":\n\t\t\t\tvar vskip = Math.round(getRequiredMeasurement(cmd, tokens));\n\t\t\t\tif (vskip.error)\n\t\t\t\t\treturn vskip.error;\n\t\t\t\ttuneBuilder.addSpacing(vskip);\n\t\t\t\treturn null;\n\t\t\tcase \"scale\":\n\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\tbreak;\n\t\t\tcase \"sep\":\n\t\t\t\tif (tokens.length === 0)\n\t\t\t\t\ttuneBuilder.addSeparator(14,14,85, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+5}); // If no parameters are given, then there is a default size.\n\t\t\t\telse {\n\t\t\t\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceAbove = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceBelow = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar lenLine = points.value;\n\t\t\t\t\ttuneBuilder.addSeparator(spaceAbove, spaceBelow, lenLine, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"barsperstaff\":\n\t\t\t\tscratch = addMultilineVar('barsperstaff', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"staffnonote\":\n\t\t\t\t// The sense of the boolean is opposite here. \"0\" means true.\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0')\n\t\t\t\t\tmultilineVars.staffnonote = true;\n\t\t\t\telse if (tokens[0].token === '1')\n\t\t\t\t\tmultilineVars.staffnonote = false;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"printtempo\":\n\t\t\t\tscratch = addMultilineVarBool('printTempo', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"partsbox\":\n\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\tbreak;\n\t\t\tcase \"freegchord\":\n\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"measurenb\":\n\t\t\tcase \"barnumbers\":\n\t\t\t\tscratch = addMultilineVar('barNumbers', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"setbarnb\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number') {\n\t\t\t\t\treturn 'Directive setbarnb requires a number as a parameter.';\n\t\t\t\t}\n\t\t\t\tmultilineVars.currBarNumber = tuneBuilder.setBarNumberImmediate(tokens[0].intt);\n\t\t\t\tbreak;\n\t\t\tcase \"begintext\":\n\t\t\t\tvar textBlock = '';\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endtext') !== 0) {\n\t\t\t\t\tif (parseCommon.startsWith(line, \"%%\"))\n\t\t\t\t\t\ttextBlock += line.substring(2) + \"\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\ttextBlock += line + \"\\n\";\n\t\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\ttuneBuilder.addText(textBlock, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+textBlock.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"continueall\":\n\t\t\t\tmultilineVars.continueall = true;\n\t\t\t\tbreak;\n\t\t\tcase \"beginps\":\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endps') !== 0) {\n\t\t\t\t\ttokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\twarn(\"Postscript ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"deco\":\n\t\t\t\tif (restOfString.length > 0)\n\t\t\t\t\tmultilineVars.ignoredDecorations.push(restOfString.substring(0, restOfString.indexOf(' ')));\n\t\t\t\twarn(\"Decoration redefinition ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"text\":\n\t\t\t\tvar textstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addText(parseDirective.parseFontChangeLine(textstr), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"center\":\n\t\t\t\tvar centerstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addCentered(parseDirective.parseFontChangeLine(centerstr));\n\t\t\t\tbreak;\n\t\t\tcase \"font\":\n\t\t\t\t// don't need to do anything for this; it is a useless directive\n\t\t\t\tbreak;\n\t\t\tcase \"setfont\":\n\t\t\t\tvar sfTokens = tokenizer.tokenize(restOfString, 0, restOfString.length);\n//\t\t\t\tvar sfDone = false;\n\t\t\t\tif (sfTokens.length >= 4) {\n\t\t\t\t\tif (sfTokens[0].token === '-' && sfTokens[1].type === 'number') {\n\t\t\t\t\t\tvar sfNum = parseInt(sfTokens[1].token);\n\t\t\t\t\t\tif (sfNum >= 1 && sfNum <= 9) {\n\t\t\t\t\t\t\tif (!multilineVars.setfont)\n\t\t\t\t\t\t\t\tmultilineVars.setfont = [];\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = getFontParameter(sfTokens, multilineVars.setfont[sfNum], str, 0, 'setfont');\n//\t\t\t\t\t\t\tvar sfSize = sfTokens.pop();\n//\t\t\t\t\t\t\tif (sfSize.type === 'number') {\n//\t\t\t\t\t\t\t\tsfSize = parseInt(sfSize.token);\n//\t\t\t\t\t\t\t\tvar sfFontName = '';\n//\t\t\t\t\t\t\t\tfor (var sfi = 2; sfi < sfTokens.length; sfi++)\n//\t\t\t\t\t\t\t\t\tsfFontName += sfTokens[sfi].token;\n//\t\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = { face: sfFontName, size: sfSize };\n//\t\t\t\t\t\t\t\tsfDone = true;\n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\tif (!sfDone)\n//\t\t\t\t\treturn \"Bad parameters: \" + cmd;\n\t\t\t\tbreak;\n\t\t\tcase \"gchordfont\":\n\t\t\tcase \"partsfont\":\n\t\t\tcase \"tripletfont\":\n\t\t\tcase \"vocalfont\":\n\t\t\tcase \"textfont\":\n\t\t\tcase \"annotationfont\":\n\t\t\tcase \"historyfont\":\n\t\t\tcase \"infofont\":\n\t\t\tcase \"measurefont\":\n\t\t\tcase \"repeatfont\":\n\t\t\tcase \"wordsfont\":\n\t\t\t\treturn getChangingFont(cmd, tokens, str);\n\t\t\tcase \"composerfont\":\n\t\t\tcase \"subtitlefont\":\n\t\t\tcase \"tempofont\":\n\t\t\tcase \"titlefont\":\n\t\t\tcase \"voicefont\":\n\t\t\tcase \"footerfont\":\n\t\t\tcase \"headerfont\":\n\t\t\t\treturn getGlobalFont(cmd, tokens, str);\n\t\t\tcase \"barlabelfont\":\n\t\t\tcase \"barnumberfont\":\n\t\t\tcase \"barnumfont\":\n\t\t\t\treturn getChangingFont(\"measurefont\", tokens, str);\n\t\t\tcase \"staves\":\n\t\t\tcase \"score\":\n\t\t\t\tmultilineVars.score_is_present = true;\n\t\t\t\tvar addVoice = function(id, newStaff, bracket, brace, continueBar) {\n\t\t\t\t\tif (newStaff || multilineVars.staves.length === 0) {\n\t\t\t\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, numVoices: 0});\n\t\t\t\t\t}\n\t\t\t\t\tvar staff = parseCommon.last(multilineVars.staves);\n\t\t\t\t\tif (bracket !== undefined && staff.bracket === undefined) staff.bracket = bracket;\n\t\t\t\t\tif (brace !== undefined && staff.brace === undefined) staff.brace = brace;\n\t\t\t\t\tif (continueBar) staff.connectBarLines = 'end';\n\t\t\t\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\t\t\t\tmultilineVars.voices[id] = {staffNum: staff.index, index: staff.numVoices};\n\t\t\t\t\t\tstaff.numVoices++;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tvar openParen = false;\n\t\t\t\tvar openBracket = false;\n\t\t\t\tvar openBrace = false;\n\t\t\t\tvar justOpenParen = false;\n\t\t\t\tvar justOpenBracket = false;\n\t\t\t\tvar justOpenBrace = false;\n\t\t\t\tvar continueBar = false;\n\t\t\t\tvar lastVoice;\n\t\t\t\tvar addContinueBar = function() {\n\t\t\t\t\tcontinueBar = true;\n\t\t\t\t\tif (lastVoice) {\n\t\t\t\t\t\tvar ty = 'start';\n\t\t\t\t\t\tif (lastVoice.staffNum > 0) {\n\t\t\t\t\t\t\tif (multilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'start' ||\n\t\t\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'continue')\n\t\t\t\t\t\t\t\tty = 'continue';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum].connectBarLines = ty;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\twhile (tokens.length) {\n\t\t\t\t\tvar t = tokens.shift();\n\t\t\t\t\tswitch (t.token) {\n\t\t\t\t\t\tcase '(':\n\t\t\t\t\t\t\tif (openParen) warn(\"Can't nest parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openParen = true;justOpenParen = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\tif (!openParen || justOpenParen) warn(\"Unexpected close parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse openParen = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '[':\n\t\t\t\t\t\t\tif (openBracket) warn(\"Can't nest brackets in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = true;justOpenBracket = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ']':\n\t\t\t\t\t\t\tif (!openBracket || justOpenBracket) warn(\"Unexpected close bracket in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = false;multilineVars.staves[lastVoice.staffNum].bracket = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '{':\n\t\t\t\t\t\t\tif (openBrace ) warn(\"Can't nest braces in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = true;justOpenBrace = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '}':\n\t\t\t\t\t\t\tif (!openBrace || justOpenBrace) warn(\"Unexpected close brace in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = false;multilineVars.staves[lastVoice.staffNum].brace = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '|':\n\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tvar vc = \"\";\n\t\t\t\t\t\t\twhile (t.type === 'alpha' || t.type === 'number') {\n\t\t\t\t\t\t\t\tvc += t.token;\n\t\t\t\t\t\t\t\tif (t.continueId)\n\t\t\t\t\t\t\t\t\tt = tokens.shift();\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar newStaff = !openParen || justOpenParen;\n\t\t\t\t\t\t\tvar bracket = justOpenBracket ? 'start' : openBracket ? 'continue' : undefined;\n\t\t\t\t\t\t\tvar brace = justOpenBrace ? 'start' : openBrace ? 'continue' : undefined;\n\t\t\t\t\t\t\taddVoice(vc, newStaff, bracket, brace, continueBar);\n\t\t\t\t\t\t\tjustOpenParen = false;\n\t\t\t\t\t\t\tjustOpenBracket = false;\n\t\t\t\t\t\t\tjustOpenBrace = false;\n\t\t\t\t\t\t\tcontinueBar = false;\n\t\t\t\t\t\t\tlastVoice = multilineVars.voices[vc];\n\t\t\t\t\t\t\tif (cmd === 'staves')\n\t\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"newpage\":\n\t\t\t\tvar pgNum = tokenizer.getInt(restOfString);\n\t\t\t\ttuneBuilder.addNewPage(pgNum.digits === 0 ? -1 : pgNum.value);\n\t\t\t\tbreak;\n\n\t\t\tcase \"abc\":\n\t\t\t\tvar arr = restOfString.split(' ');\n\t\t\t\tswitch (arr[0]) {\n\t\t\t\t\tcase \"-copyright\":\n\t\t\t\t\tcase \"-creator\":\n\t\t\t\t\tcase \"-edited-by\":\n\t\t\t\t\tcase \"-version\":\n\t\t\t\t\tcase \"-charset\":\n\t\t\t\t\t\tvar subCmd = arr.shift();\n\t\t\t\t\t\ttuneBuilder.addMetaText(cmd+subCmd, arr.join(' '), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+5});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Unknown directive: \" + cmd+arr[0];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"header\":\n\t\t\tcase \"footer\":\n\t\t\t\tvar footerStr = tokenizer.getMeat(restOfString, 0, restOfString.length);\n\t\t\t\tfooterStr = restOfString.substring(footerStr.start, footerStr.end);\n\t\t\t\tif (footerStr[0] === '\"' && footerStr[footerStr.length-1] === '\"' )\n\t\t\t\t\tfooterStr = footerStr.substring(1, footerStr.length-1);\n\t\t\t\tvar footerArr = footerStr.split('\\t');\n\t\t\t\tvar footer = {};\n\t\t\t\tif (footerArr.length === 1)\n\t\t\t\t\tfooter = { left: \"\", center: footerArr[0], right: \"\" };\n\t\t\t\telse if (footerArr.length === 2)\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: \"\" };\n\t\t\t\telse\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: footerArr[2] };\n\t\t\t\tif (footerArr.length > 3)\n\t\t\t\t\twarn(\"Too many tabs in \" + cmd + \": \" + footerArr.length + \" found.\", restOfString, 0);\n\n\t\t\t\ttuneBuilder.addMetaTextObj(cmd, footer, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+str.length});\n\t\t\t\tbreak;\n\n\t\t\tcase \"midi\":\n\t\t\t\tvar midi = tokenizer.tokenize(restOfString, 0, restOfString.length, true);\n\t\t\t\tif (midi.length > 0 && midi[0].token === '=')\n\t\t\t\t\tmidi.shift();\n\t\t\t\tif (midi.length === 0)\n\t\t\t\t\twarn(\"Expected midi command\", restOfString, 0);\n\t\t\t\telse\n\t\t\t\t\tparseMidiCommand(midi, tune, restOfString);\n\t\t\t\tbreak;\n\t\t\tcase \"percmap\":\n\t\t\t\tvar percmap = interpretPercMap(restOfString);\n\t\t\t\tif (percmap.error)\n\t\t\t\t\twarn(percmap.error, str, 8);\n\t\t\t\telse {\n\t\t\t\t\tif (!tune.formatting.percmap)\n\t\t\t\t\t\ttune.formatting.percmap = {};\n\t\t\t\t\ttune.formatting.percmap[percmap.key] = percmap.value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"map\":\n\t\t\tcase \"playtempo\":\n\t\t\tcase \"auquality\":\n\t\t\tcase \"continuous\":\n\t\t\tcase \"nobarcheck\":\n\t\t\t\t// TODO-PER: Actually handle the parameters of these\n\t\t\t\ttune.formatting[cmd] = restOfString;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn \"Unknown directive: \" + cmd;\n\t\t}\n\t\treturn null;\n\t};\n\tparseDirective.globalFormatting = function(formatHash) {\n\t\tfor (var cmd in formatHash) {\n\t\t\tif (formatHash.hasOwnProperty(cmd)) {\n\t\t\t\tvar value = ''+formatHash[cmd];\n\t\t\t\tvar tokens = tokenizer.tokenize(value, 0, value.length);\n\t\t\t\tvar scratch;\n\t\t\t\tswitch (cmd) {\n\t\t\t\t\tcase \"titlefont\":\n\t\t\t\t\tcase \"gchordfont\":\n\t\t\t\t\tcase \"composerfont\":\n\t\t\t\t\tcase \"footerfont\":\n\t\t\t\t\tcase \"headerfont\":\n\t\t\t\t\tcase \"historyfont\":\n\t\t\t\t\tcase \"infofont\":\n\t\t\t\t\tcase \"measurefont\":\n\t\t\t\t\tcase \"partsfont\":\n\t\t\t\t\tcase \"repeatfont\":\n\t\t\t\t\tcase \"subtitlefont\":\n\t\t\t\t\tcase \"tempofont\":\n\t\t\t\t\tcase \"textfont\":\n\t\t\t\t\tcase \"voicefont\":\n\t\t\t\t\tcase \"tripletfont\":\n\t\t\t\t\tcase \"vocalfont\":\n\t\t\t\t\tcase \"wordsfont\":\n\t\t\t\t\tcase \"annotationfont\":\n\t\t\t\t\tcase \"tablabelfont\":\n\t\t\t\t\tcase \"tabnumberfont\":\n\t\t\t\t\tcase \"tabgracefont\":\n\t\t\t\t\t\tgetChangingFont(cmd, tokens, value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"scale\":\n\t\t\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"partsbox\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"freegchord\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"fontboxpadding\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.fontboxpadding = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stafftopmargin\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.stafftopmargin = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stretchlast\":\n\t\t\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\t\t\tif (sl.error)\n\t\t\t\t\t\t\treturn sl.error;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twarn(\"Formatting directive unrecognized: \", cmd, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction parseStretchLast(tokens) {\n\t\tif (tokens.length === 0)\n\t\t\treturn { value: 1 }; // if there is no value then the presence of this is the same as \"true\"\n\t\telse if (tokens.length === 1) {\n\t\t\tif (tokens[0].type === \"number\") {\n\t\t\t\tif (tokens[0].floatt >= 0 || tokens[0].floatt <= 1)\n\t\t\t\t\treturn {value: tokens[0].floatt};\n\t\t\t} else if (tokens[0].token === 'false') {\n\t\t\t\treturn { value: 0 };\n\t\t\t} else if (tokens[0].token === 'true') {\n\t\t\t\treturn {value: 1};\n\t\t\t}\n\t\t}\n\t\treturn { error: \"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received \" + tokens[0].token + ')' };\n\t}\n})();\n\nmodule.exports = parseDirective;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_directive.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_header.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_header.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_parse_header.js: parses a the header fields from a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = __webpack_require__(/*! ./abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\nvar parseDirective = __webpack_require__(/*! ./abc_parse_directive */ \"./node_modules/abcjs/src/parse/abc_parse_directive.js\");\nvar parseKeyVoice = __webpack_require__(/*! ./abc_parse_key_voice */ \"./node_modules/abcjs/src/parse/abc_parse_key_voice.js\");\n\nvar ParseHeader = function(tokenizer, warn, multilineVars, tune, tuneBuilder) {\n\tthis.reset = function(tokenizer, warn, multilineVars, tune) {\n\t\tparseKeyVoice.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tparseDirective.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t};\n\tthis.reset(tokenizer, warn, multilineVars, tune);\n\n\tthis.setTitle = function(title, origSize) {\n\t\tif (multilineVars.hasMainTitle)\n\t\t\ttuneBuilder.addSubtitle(title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\t// display secondary title\n\t\telse\n\t\t{\n\t\t\ttuneBuilder.addMetaText(\"title\", title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\n\t\t\tmultilineVars.hasMainTitle = true;\n\t\t}\n\t};\n\n\tthis.setMeter = function(line) {\n\t\tline = tokenizer.stripComment(line);\n\t\tif (line === 'C') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'common_time'};\n\t\t} else if (line === 'C|') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'cut_time'};\n\t\t} else if (line === 'o') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum'};\n\t\t} else if (line === 'c') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum'};\n\t\t} else if (line === 'o.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum_prolatio'};\n\t\t} else if (line === 'c.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum_prolatio'};\n\t\t} else if (line.length === 0 || line.toLowerCase() === 'none') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar tokens = tokenizer.tokenize(line, 0, line.length);\n\t\t\t// the form is [open_paren] decimal [ plus|dot decimal ]... [close_paren] slash decimal [plus same_as_before]\n\t\t\ttry {\n\t\t\t\tvar parseNum = function() {\n\t\t\t\t\t// handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren]\n\t\t\t\t\tvar ret = {value: 0, num: \"\"};\n\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token === '(')\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\twhile (1) {\n\t\t\t\t\t\tif (tok.type !== 'number') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.value += parseInt(tok.token);\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t\tif (tok.token === ')') {\n\t\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\t\tthrow \"Unexpected paren in meter\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tok.token !== '.' && tok.token !== '+') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0) throw \"Expected top number of meter\";\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\treturn ret;\t// just to suppress warning\n\t\t\t\t};\n\n\t\t\t\tvar parseFraction = function() {\n\t\t\t\t\t// handles this much: parseNum slash decimal\n\t\t\t\t\tvar ret = parseNum();\n\t\t\t\t\tif (tokens.length === 0) return ret;\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token !== '/') throw \"Expected slash in meter\";\n\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\tif (tok.type !== 'number') throw \"Expected bottom number of meter\";\n\t\t\t\t\tret.den = tok.token;\n\t\t\t\t\tret.value = ret.value / parseInt(ret.den);\n\t\t\t\t\treturn ret;\n\t\t\t\t};\n\n\t\t\t\tif (tokens.length === 0) throw \"Expected meter definition in M: line\";\n\t\t\t\tvar meter = {type: 'specified', value: [ ]};\n\t\t\t\tvar totalLength = 0;\n\t\t\t\twhile (1) {\n\t\t\t\t\tvar ret = parseFraction();\n\t\t\t\t\ttotalLength += ret.value;\n\t\t\t\t\tvar mv = { num: ret.num };\n\t\t\t\t\tif (ret.den !== undefined)\n\t\t\t\t\t\tmv.den = ret.den;\n\t\t\t\t\tmeter.value.push(mv);\n\t\t\t\t\tif (tokens.length === 0) break;\n\t\t\t\t\t//var tok = tokens.shift();\n\t\t\t\t\t//if (tok.token !== '+') throw \"Extra characters in M: line\";\n\t\t\t\t}\n\n\t\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\t\tmultilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125;\n\t\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t\t}\n\t\t\t\treturn meter;\n\t\t\t} catch (e) {\n\t\t\t\twarn(e, line, 0);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tthis.calcTempo = function(relTempo) {\n\t\tvar dur = 1/4;\n\t\tif (multilineVars.meter && multilineVars.meter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.meter.value[0].den);\n\t\t} else if (multilineVars.origMeter && multilineVars.origMeter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.origMeter.value[0].den);\n\t\t}\n\t\t//var dur = multilineVars.default_length ? multilineVars.default_length : 1;\n\t\tfor (var i = 0; i < relTempo.duration; i++)\n\t\t\trelTempo.duration[i] = dur * relTempo.duration[i];\n\t\treturn relTempo;\n\t};\n\n\tthis.resolveTempo = function() {\n\t\tif (multilineVars.tempo) {\t// If there's a tempo waiting to be resolved\n\t\t\tthis.calcTempo(multilineVars.tempo);\n\t\t\ttune.metaText.tempo = multilineVars.tempo;\n\t\t\tdelete multilineVars.tempo;\n\t\t}\n\t};\n\n\tthis.addUserDefinition = function(line, start, end) {\n\t\tvar equals = line.indexOf('=', start);\n\t\tif (equals === -1) {\n\t\t\twarn(\"Need an = in a macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\n\t\tvar before = parseCommon.strip(line.substring(start, equals));\n\t\tvar after = parseCommon.strip(line.substring(equals+1));\n\n\t\tif (before.length !== 1) {\n\t\t\twarn(\"Macro definitions can only be one character\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar legalChars = \"HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~\";\n\t\tif (legalChars.indexOf(before) === -1) {\n\t\t\twarn(\"Macro definitions must be H-Y, h-w, or tilde\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (after.length === 0) {\n\t\t\twarn(\"Missing macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (multilineVars.macros === undefined)\n\t\t\tmultilineVars.macros = {};\n\t\tmultilineVars.macros[before] = after;\n\t};\n\n\tthis.setDefaultLength = function(line, start, end) {\n\t\tvar len = line.substring(start, end).replace(/ /g, \"\");\n\t\tvar len_arr = len.split('/');\n\t\tif (len_arr.length === 2) {\n\t\t\tvar n = parseInt(len_arr[0]);\n\t\t\tvar d = parseInt(len_arr[1]);\n\t\t\tif (d > 0) {\n\t\t\t\tmultilineVars.default_length = n / d;\t// a whole note is 1\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t} else if (len_arr.length === 1 && len_arr[0] === '1') {\n\t\t\tmultilineVars.default_length = 1;\n\t\t\tmultilineVars.havent_set_length = false;\n\t\t}\n\t};\n\n\n\tvar tempoString = {\n\n\t\tlarghissimo: 20,\n\t\tadagissimo: 24,\n\t\tsostenuto: 28,\n\t\tgrave: 32,\n\t\tlargo: 40,\n\t\tlento: 50,\n\t\tlarghetto: 60,\n\t\tadagio: 68,\n\t\tadagietto: 74,\n\t\tandante: 80,\n\t\tandantino: 88,\n\t\t\"marcia moderato\": 84,\n\t\t\"andante moderato\": 100,\n\t\tmoderato: 112,\n\t\tallegretto: 116,\n\t\t\"allegro moderato\": 120,\n\t\tallegro: 126,\n\t\tanimato: 132,\n\t\tagitato: 140,\n\t\tveloce: 148,\n\t\t\"mosso vivo\": 156,\n\t\tvivace: 164,\n\t\tvivacissimo: 172,\n\t\tallegrissimo: 176,\n\t\tpresto: 184,\n\t\tprestissimo: 210,\n\t};\n\n\tthis.setTempo = function(line, start, end, iChar) {\n\t\t//Q - tempo; can be used to specify the notes per minute, e.g. If\n\t\t//the meter denominator is a 4 note then Q:120 or Q:C=120\n\t\t//is 120 quarter notes per minute. Similarly  Q:C3=40 would be 40\n\t\t//dotted half notes per minute. An absolute tempo may also be\n\t\t//set, e.g. Q:1/8=120 is 120 eighth notes per minute,\n\t\t//irrespective of the meter's denominator.\n\t\t//\n\t\t// This is either a number, \"C=number\", \"Cnumber=number\", or fraction [fraction...]=number\n\t\t// It depends on the M: field, which may either not be present, or may appear after this.\n\t\t// If M: is not present, an eighth note is used.\n\t\t// That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an M: field.\n\t\t// So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars.\n\t\t// The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1.\n\t\t// In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional.\n\t\ttry {\n\t\t\tvar tokens = tokenizer.tokenize(line, start, end);\n\n\t\t\tif (tokens.length === 0) throw \"Missing parameter in Q: field\";\n\n\t\t\tvar tempo = { startChar: iChar+start-2, endChar: iChar+end };\n\t\t\tvar delaySet = true;\n\t\t\tvar token = tokens.shift();\n\t\t\tif (token.type === 'quote') {\n\t\t\t\ttempo.preString = token.token;\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (tokens.length === 0) {\t// It's ok to just get a string for the tempo\n\t\t\t\t\t// If the string is a well-known tempo, put in the bpm\n\t\t\t\t\tif (tempoString[tempo.preString.toLowerCase()]) {\n\t\t\t\t\t\ttempo.bpm = tempoString[tempo.preString.toLowerCase()];\n\t\t\t\t\t\ttempo.suppressBpm = true;\n\t\t\t\t\t}\n\t\t\t\t\treturn {type: 'immediate', tempo: tempo};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (token.type === 'alpha' && token.token === 'C')\t { // either type 2 or type 3\n\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after C in Q: field\";\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'punct' && token.token === '=') {\n\t\t\t\t\t// This is a type 2 format. The duration is an implied 1\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else if (token.type === 'number') {\n\t\t\t\t\t// This is a type 3 format.\n\t\t\t\t\ttempo.duration = [parseInt(token.token)];\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing = after duration in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' || token.token !== '=') throw \"Expected = after duration in Q: field\";\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else throw \"Expected number or equal after C in Q: field\";\n\n\t\t\t} else if (token.type === 'number') {\t// either type 1 or type 4\n\t\t\t\tvar num = parseInt(token.token);\n\t\t\t\tif (tokens.length === 0 || tokens[0].type === 'quote') {\n\t\t\t\t\t// This is type 1\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = num;\n\t\t\t\t} else {\t// This is type 4\n\t\t\t\t\tdelaySet = false;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\tvar den = parseInt(token.token);\n\t\t\t\t\ttempo.duration = [num/den];\n\t\t\t\t\t// We got the first fraction, keep getting more as long as we find them.\n\t\t\t\t\twhile (tokens.length > 0  && tokens[0].token !== '=' && tokens[0].type !== 'quote') {\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tnum = parseInt(token.token);\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tden = parseInt(token.token);\n\t\t\t\t\t\ttempo.duration.push(num/den);\n\t\t\t\t\t}\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '=') throw \"Expected = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected tempo in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t}\n\t\t\t} else throw \"Unknown value in Q: field\";\n\t\t\tif (tokens.length !== 0) {\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'quote') {\n\t\t\t\t\ttempo.postString = token.token;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t}\n\t\t\t\tif (tokens.length !== 0) throw \"Unexpected string at end of Q: field\";\n\t\t\t}\n\t\t\tif (multilineVars.printTempo === false)\n\t\t\t\ttempo.suppress = true;\n\t\t\treturn {type: delaySet?'delaySet':'immediate', tempo: tempo};\n\t\t} catch (msg) {\n\t\t\twarn(msg, line, start);\n\t\t\treturn {type: 'none'};\n\t\t}\n\t};\n\n\tthis.letter_to_inline_header = function(line, i, startLine)\n\t{\n\t\tvar needsNewLine = false\n\t\tvar ws = tokenizer.eatWhiteSpace(line, i);\n\t\ti +=ws;\n\t\tif (line.length >= i+5 && line[i] === '[' && line[i+2] === ':') {\n\t\t\tvar e = line.indexOf(']', i);\n\t\t\tvar startChar = multilineVars.iChar + i;\n\t\t\tvar endChar = multilineVars.iChar + e + 1;\n\t\t\tswitch(line.substring(i, i+3))\n\t\t\t{\n\t\t\t\tcase \"[I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+3, e));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+3, e));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', startChar, endChar, meter);\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.meter = meter;\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+3, e), true);\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[P:\":\n\t\t\t\t\tvar part = parseDirective.parseFontChangeLine(line.substring(i+3, e))\n\t\t\t\t\tif (startLine || tune.lines.length <= tune.lineNum)\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: part, startChar: startChar, endChar: endChar };\n\t\t\t\t\telse\n\t\t\t\t\t\ttuneBuilder.appendElement('part', startChar, endChar, {title: part});\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+3, e);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[Q:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tvar tempo = this.setTempo(line, i+3, e, multilineVars.iChar);\n\t\t\t\t\t\tif (tempo.type === 'delaySet') {\n\t\t\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, this.calcTempo(tempo.tempo));\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, this.calcTempo(tempo.tempo)]\n\t\t\t\t\t\t} else if (tempo.type === 'immediate') {\n\t\t\t\t\t\t\tif (!startLine && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, tempo.tempo);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e)];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[V:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+3, e);\n\t\t\t\t\t\t//startNewLine();\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e), needsNewLine];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[r:\":\n\t\t\t\t\treturn [ e-i+1+ws ];\n\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tthis.letter_to_body_header = function(line, i)\n\t{\n\t\tvar needsNewLine = false\n\t\tif (line.length >= i+3) {\n\t\t\tswitch(line.substring(i, i+2))\n\t\t\t{\n\t\t\t\tcase \"I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+2));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+2));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', multilineVars.iChar + i, multilineVars.iChar + line.length, meter);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+2), tuneBuilder.hasBeginMusic());\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', multilineVars.iChar + i, multilineVars.iChar + line.length, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', multilineVars.iChar + i, multilineVars.iChar + line.length, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"P:\":\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendElement('part', multilineVars.iChar + i, multilineVars.iChar + line.length, {title: line.substring(i+2)});\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+2, line.length);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"Q:\":\n\t\t\t\t\tvar e = line.indexOf('\\x12', i+2);\n\t\t\t\t\tif (e === -1) e = line.length;\n\t\t\t\t\tvar tempo = this.setTempo(line, i+2, e, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, this.calcTempo(tempo.tempo));\n\t\t\t\t\telse if (tempo.type === 'immediate') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, tempo.tempo);\n\t\t\t\treturn [ e, line[i], parseCommon.strip(line.substring(i+2))];\n\t\t\t\tcase \"V:\":\n\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+2, line.length);\n//\t\t\t\t\t\tstartNewLine();\n\t\t\t\t\treturn [ line.length, line[i], parseCommon.strip(line.substring(i+2)), needsNewLine];\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tvar metaTextHeaders = {\n\t\tA: 'author',\n\t\tB: 'book',\n\t\tC: 'composer',\n\t\tD: 'discography',\n\t\tF: 'url',\n\t\tG: 'group',\n\t\tI: 'instruction',\n\t\tN: 'notes',\n\t\tO: 'origin',\n\t\tR: 'rhythm',\n\t\tS: 'source',\n\t\tW: 'unalignedWords',\n\t\tZ: 'transcription'\n\t};\n\n\tthis.parseHeader = function(line) {\n\t\tvar field = metaTextHeaders[line[0]];\n\t\tvar origSize = line.length-2\n\t\tvar restOfLine = tokenizer.translateString(tokenizer.stripComment(line.substring(2)))\n\t\tif (field === 'unalignedWords' || field === 'notes') {\n\t\t\t// These fields can be multi-line\n\t\t\ttuneBuilder.addMetaTextArray(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else if (field !== undefined) {\n\t\t\t// these fields are single line\n\t\t\ttuneBuilder.addMetaText(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else {\n\t\t\tvar startChar = multilineVars.iChar;\n\t\t\tvar endChar = startChar + line.length;\n\t\t\tswitch(line[0])\n\t\t\t{\n\t\t\t\tcase  'H':\n\t\t\t\t\t// History is a little different because once it starts it continues until another header field is encountered\n\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\twhile (line && line[1] !== ':') {\n\t\t\t\t\t\ttokenizer.nextLine()\n\t\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(tokenizer.translateString(tokenizer.stripComment(line))), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'K':\n\t\t\t\t\t// since the key is the last thing that can happen in the header, we can resolve the tempo now\n\t\t\t\t\tthis.resolveTempo();\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(2), false);\n\t\t\t\t\tif (!multilineVars.is_in_header && tuneBuilder.hasBeginMusic()) {\n\t\t\t\t\t\tif (result.foundClef)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\t\tif (result.foundKey)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.is_in_header = false;\t// The first key signifies the end of the header.\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'L':\n\t\t\t\t\tthis.setDefaultLength(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'M':\n\t\t\t\t\tmultilineVars.origMeter = multilineVars.meter = this.setMeter(line.substring(2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'P':\n\t\t\t\t\t// TODO-PER: There is more to do with parts, but the writer doesn't care.\n\t\t\t\t\tif (multilineVars.is_in_header)\n\t\t\t\t\t\ttuneBuilder.addMetaText(\"partOrder\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: restOfLine, startChar: startChar, endChar: endChar};\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'Q':\n\t\t\t\t\tvar tempo = this.setTempo(line, 2, line.length, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') multilineVars.tempo = tempo.tempo;\n\t\t\t\t\telse if (tempo.type === 'immediate') {\n\t\t\t\t\t\tif (!tune.metaText.tempo)\n\t\t\t\t\t\t\ttune.metaText.tempo = tempo.tempo;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'T':\n\t\t\t\t\tif (multilineVars.titlecaps)\n\t\t\t\t\t\trestOfLine = restOfLine.toUpperCase();\t\t\n\t\t\t\t\tthis.setTitle(parseDirective.parseFontChangeLine(tokenizer.theReverser(restOfLine)), origSize);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tthis.addUserDefinition(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase  'V':\n\t\t\t\t\tparseKeyVoice.parseVoice(line, 2, line.length);\n\t\t\t\t\tif (!multilineVars.is_in_header)\n\t\t\t\t\t\treturn {newline: true};\n\t\t\t\t\tbreak;\n\t\t\t\tcase  's':\n\t\t\t\t\treturn {symbols: true};\n\t\t\t\tcase  'w':\n\t\t\t\t\treturn {words: true};\n\t\t\t\tcase 'X':\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'm':\n\t\t\t\t\twarn(\"Ignored header\", line, 0);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {regular: true};\n\t\t\t}\n\t\t}\n\t\treturn {};\n\t};\n};\n\nmodule.exports = ParseHeader;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_header.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_key_voice.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_key_voice.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var parseDirective = __webpack_require__(/*! ./abc_parse_directive */ \"./node_modules/abcjs/src/parse/abc_parse_directive.js\");\nvar transpose = __webpack_require__(/*! ./abc_transpose */ \"./node_modules/abcjs/src/parse/abc_transpose.js\");\n\nvar parseKeyVoice = {};\n\n(function() {\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseKeyVoice.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t};\n\n\tparseKeyVoice.standardKey = function(keyName, root, acc, localTranspose) {\n\t\treturn transpose.keySignature(multilineVars, keyName, root, acc, localTranspose);\n\t};\n\n\tvar clefLines = {\n\t\t'treble': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble+8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble-8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble^8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble_8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble1': { clef: 'treble', pitch: 2, mid: 2 },\n\t\t'treble2': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble3': { clef: 'treble', pitch: 6, mid: -2 },\n\t\t'treble4': { clef: 'treble', pitch: 8, mid: -4 },\n\t\t'treble5': { clef: 'treble', pitch: 10, mid: -6 },\n\t\t'perc': { clef: 'perc', pitch: 6, mid: 0 },\n\t\t'none': { clef: 'none', mid: 0 },\n\t\t'bass': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass+8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass-8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass^8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass_8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass+16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass-16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass^16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass_16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass1': { clef: 'bass', pitch: 2, mid: -6 },\n\t\t'bass2': { clef: 'bass', pitch: 4, mid: -8 },\n\t\t'bass3': { clef: 'bass', pitch: 6, mid: -10 },\n\t\t'bass4': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass5': { clef: 'bass', pitch: 10, mid: -14 },\n\t\t'tenor': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'tenor2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'tenor3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'tenor4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'alto2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'alto3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'alto5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto+8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto-8': { clef: 'alto-8', pitch: 6, mid: -6 },\n\t\t'alto^8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto_8': { clef: 'alto-8', pitch: 6, mid: -6 }\n\t};\n\n\tvar calcMiddle = function(clef, oct) {\n\t\tvar value = clefLines[clef];\n\t\tvar mid = value ? value.mid : 0;\n\t\treturn mid+oct;\n\t};\n\n\tparseKeyVoice.fixClef = function(clef) {\n\t\tvar value = clefLines[clef.type];\n\t\tif (value) {\n\t\t\tclef.clefPos = value.pitch;\n\t\t\tclef.type = value.clef;\n\t\t}\n\t};\n\n\tparseKeyVoice.deepCopyKey = function(key) {\n\t\tvar ret = { accidentals: [], root: key.root, acc: key.acc, mode: key.mode };\n\t\tkey.accidentals.forEach(function(k) {\n\t\tret.accidentals.push(Object.assign({},k));\n\t\t});\n\t\treturn ret;\n\t};\n\n\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\n\tparseKeyVoice.addPosToKey = function(clef, key) {\n\t\t// Shift the key signature from the treble positions to whatever position is needed for the clef.\n\t\t// This may put the key signature unnaturally high or low, so if it does, then shift it.\n\t\tvar mid = clef.verticalPos;\n\t\tkey.accidentals.forEach(function(acc) {\n\t\t\tvar pitch = pitches[acc.note];\n\t\t\tpitch = pitch - mid;\n\t\t\tacc.verticalPos = pitch;\n\t\t});\n\t\tif (key.impliedNaturals)\n\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\tvar pitch = pitches[acc.note];\n\t\t\t\tpitch = pitch - mid;\n\t\t\t\tacc.verticalPos = pitch;\n\t\t\t});\n\n\t\tif (mid < -10) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid < -4) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid >= 7) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos += 7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos += 7;\n\t\t\t\t});\n\t\t}\n\t};\n\n\tparseKeyVoice.fixKey = function(clef, key) {\n\t\tvar fixedKey = Object.assign({},key);\n\t\tparseKeyVoice.addPosToKey(clef, fixedKey);\n\t\treturn fixedKey;\n\t};\n\n\tvar parseMiddle = function(str) {\n\t\tvar i = 0;\n\t\tvar p = str[i++];\n\t\tif (p === '^' || p === '_')\n\t\t\tp = str[i++];\n\t  var mid = pitches[p];\n\t\tif (mid === undefined)\n\t\t\tmid = 6; // If a legal middle note wasn't received, just ignore it.\n\t\tfor ( ; i < str.length; i++) {\n\t\t\tif (str[i] === ',') mid -= 7;\n\t\t\telse if (str[i] === \"'\") mid += 7;\n\t\t\telse break;\n\t\t}\n\t\treturn { mid: mid - 6, str: str.substring(i) };\t// We get the note in the middle of the staff. We want the note that appears as the first ledger line below the staff.\n\t};\n\n\tvar normalizeAccidentals = function(accs) {\n\t\tfor (var i = 0; i < accs.length; i++) {\n\t\t\tif (accs[i].note === 'b')\n\t\t\t\taccs[i].note = 'B';\n\t\t\telse if (accs[i].note === 'a')\n\t\t\t\taccs[i].note = 'A';\n\t\t\telse if (accs[i].note === 'F')\n\t\t\t\taccs[i].note = 'f';\n\t\t\telse if (accs[i].note === 'E')\n\t\t\t\taccs[i].note = 'e';\n\t\t\telse if (accs[i].note === 'D')\n\t\t\t\taccs[i].note = 'd';\n\t\t\telse if (accs[i].note === 'C')\n\t\t\t\taccs[i].note = 'c';\n\t\t\telse if (accs[i].note === 'G' && accs[i].acc === 'sharp')\n\t\t\t\taccs[i].note = 'g';\n\t\t\telse if (accs[i].note === 'g' && accs[i].acc === 'flat')\n\t\t\t\taccs[i].note = 'G';\n\t\t}\n\t};\n\n\tparseKeyVoice.parseKey = function(str, isInline)\t// (and clef)\n\t{\n\t\t// returns:\n\t\t//\t\t{ foundClef: true, foundKey: true }\n\t\t// Side effects:\n\t\t//\t\tcalls warn() when there is a syntax error\n\t\t//\t\tsets these members of multilineVars:\n\t\t//\t\t\tclef\n\t\t//\t\t\tkey\n\t\t//\t\t\tstyle\n\t\t//\n\t\t// The format is:\n\t\t// K: [⟨key⟩] [⟨modifiers⟩*]\n\t\t// modifiers are any of the following in any order:\n\t\t//  [⟨clef⟩] [middle=⟨pitch⟩] [transpose=[-]⟨number⟩] [stafflines=⟨number⟩] [staffscale=⟨number⟩][style=⟨style⟩]\n\t\t// key is none|HP|Hp|⟨specified_key⟩\n\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t// specified_key is ⟨pitch⟩[#|b][mode(first three chars are significant)][accidentals*]\n\t\tif (str.length === 0) {\n\t\t\t// an empty K: field is the same as K:none\n\t\t\tstr = 'none';\n\t\t}\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\n\t\tvar ret = {};\n\n\t\t// Be sure that a key was passed in\n\t\tif (tokens.length === 0) {\n\t\t\twarn(\"Must pass in key signature.\", str, 0);\n\t\t\treturn ret;\n\t\t}\n\n\t\t// first the key\n\t\tswitch (tokens[0].token) {\n\t\t\tcase 'HP':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"HP\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'Hp':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"Hp\", accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'none':\n\t\t\t\t// we got the none key - that's the same as C to us\n\t\t\t\tmultilineVars.key = { root: \"none\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar retPitch = tokenizer.getKeyPitch(tokens[0].token);\n\t\t\t\tif (retPitch.len > 0) {\n\t\t\t\t\tret.foundKey = true;\n\t\t\t\t\tvar acc = \"\";\n\t\t\t\t\tvar mode = \"\";\n\t\t\t\t\t// The accidental and mode might be attached to the pitch, so we might want to just remove the first character.\n\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\tvar key = retPitch.token;\n\t\t\t\t\t// We got a pitch to start with, so we might also have an accidental and a mode\n\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\tvar retAcc = tokenizer.getSharpFlat(tokens[0].token);\n\t\t\t\t\t\tif (retAcc.len > 0) {\n\t\t\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tkey += retAcc.token;\n\t\t\t\t\t\t\tacc = retAcc.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\t\tvar retMode = tokenizer.getMode(tokens[0].token);\n\t\t\t\t\t\t\tif (retMode.len > 0) {\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\t\tkey += retMode.token;\n\t\t\t\t\t\t\t\tmode = retMode.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Be sure that the key specified is in the list: not all keys are physically possible, like Cbmin.\n\t\t\t\t\t\tif (parseKeyVoice.standardKey(key, retPitch.token, acc, 0) === undefined) {\n\t\t\t\t\t\t\twarn(\"Unsupported key signature: \" + key, str, 0);\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// We need to do a deep copy because we are going to modify it\n\t\t\t\t\tvar oldKey = parseKeyVoice.deepCopyKey(multilineVars.key);\n\t\t\t\t\t//TODO-PER: HACK! To get the local transpose to work, the transposition is done for each line. This caused the global transposition variable to be factored in twice, so, instead of rewriting that right now, I'm just subtracting one of them here.\n\t\t\t\t\tvar keyCompensate = !isInline && multilineVars.globalTranspose ? -multilineVars.globalTranspose : 0;\n\t\t\t\t\t//console.log(\"parse\", JSON.stringify(multilineVars), isInline)\n\t\t\t\t\tvar savedOrigKey;\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tsavedOrigKey = multilineVars.globalTransposeOrigKeySig\n\t\t\t\t\tmultilineVars.key = parseKeyVoice.deepCopyKey(parseKeyVoice.standardKey(key, retPitch.token, acc, keyCompensate));\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tmultilineVars.globalTransposeOrigKeySig = savedOrigKey\n\t\t\t\t\tmultilineVars.key.mode = mode;\n\t\t\t\t\tif (oldKey) {\n\t\t\t\t\t\t// Add natural in all places that the old key had an accidental.\n\t\t\t\t\t\tvar kk;\n\t\t\t\t\t\tfor (var k = 0; k < multilineVars.key.accidentals.length; k++) {\n\t\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note && multilineVars.key.accidentals[k].note.toLowerCase() === oldKey.accidentals[kk].note.toLowerCase())\n\t\t\t\t\t\t\t\t\toldKey.accidentals[kk].note = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note) {\n\t\t\t\t\t\t\t\tif (!multilineVars.key.impliedNaturals)\n\t\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals = [];\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.push({ acc: 'natural', note: oldKey.accidentals[kk].note });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// There are two special cases of deprecated syntax. Ignore them if they occur\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'exp') tokens.shift();\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'oct') tokens.shift();\n\n\t\t// now see if there are extra accidentals\n\t\tif (tokens.length === 0) return ret;\n\t\tvar accs = tokenizer.getKeyAccidentals2(tokens);\n\t\tif (accs.warn)\n\t\t\twarn(accs.warn, str, 0);\n\t\t// If we have extra accidentals, first replace ones that are of the same pitch before adding them to the end.\n\t\tif (accs.accs) {\n\t\t\tif (!ret.foundKey) {\t\t// if there are only extra accidentals, make sure this is set.\n\t\t\t\tret.foundKey = true;\n\t\t\t\tmultilineVars.key = { root: \"none\", acc: \"\", mode: \"\", accidentals: [] };\n\t\t\t}\n\t\t\tnormalizeAccidentals(accs.accs);\n\t\t\tfor (var i = 0; i < accs.accs.length; i++) {\n\t\t\t\tvar found = false;\n\t\t\t\tfor (var j = 0; j < multilineVars.key.accidentals.length && !found; j++) {\n\t\t\t\t\tif (multilineVars.key.accidentals[j].note === accs.accs[i].note) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tif (multilineVars.key.accidentals[j].acc !== accs.accs[i].acc) {\n\t\t\t\t\t\t\t// If the accidental is different, then replace it. If it is the same, then the declaration was redundant, so just ignore it.\n\t\t\t\t\t\t\tmultilineVars.key.accidentals[j].acc = accs.accs[i].acc;\n\t\t\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\tmultilineVars.key.accidentals.push(accs.accs[i]);\n\t\t\t\t\tif (multilineVars.key.impliedNaturals) {\n\t\t\t\t\t\tfor (var kkk = 0; kkk < multilineVars.key.impliedNaturals.length; kkk++) {\n\t\t\t\t\t\t\tif (multilineVars.key.impliedNaturals[kkk].note === accs.accs[i].note)\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.splice(kkk, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now see if any optional parameters are present. They have the form \"key=value\", except that \"clef=\" is optional\n\t\tvar token;\n\t\twhile (tokens.length > 0) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase \"m\":\n\t\t\t\tcase \"middle\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after middle\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after middle\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after middle=\", str, 0); return ret; }\n\t\t\t\t\tvar pitch = tokenizer.getPitchFromTokens(tokens);\n\t\t\t\t\tif (pitch.warn)\n\t\t\t\t\t\twarn(pitch.warn, str, 0);\n\t\t\t\t\tif (pitch.position)\n\t\t\t\t\t\tmultilineVars.clef.verticalPos = pitch.position - 6;\t// we get the position from the middle line, but want to offset it to the first ledger line.\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"transpose\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after transpose\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after transpose\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after transpose=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after transpose\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.transpose = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stafflines\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after stafflines\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after stafflines\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after stafflines=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after stafflines\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.stafflines = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"staffscale\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after staffscale\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after staffscale\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after staffscale=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after staffscale\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.staffscale = tokens[0].floatt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"octave\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after octave\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after octave\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after octave=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after octave\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.octave = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"style\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after style\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after style\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after style=\", str, 0); return ret; }\n\t\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\t\tcase \"normal\":\n\t\t\t\t\t\tcase \"harmonic\":\n\t\t\t\t\t\tcase \"rhythm\":\n\t\t\t\t\t\tcase \"x\":\n\t\t\t\t\t\tcase \"triangle\":\n\t\t\t\t\t\t\tmultilineVars.style = tokens[0].token;\n\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"error parsing style element: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"clef\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after clef\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after clef\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after clef=\", str, 0); return ret; }\n\t\t\t\t\t//break; yes, we want to fall through. That allows \"clef=\" to be optional.\n\t\t\t\tcase \"treble\":\n\t\t\t\tcase \"bass\":\n\t\t\t\tcase \"alto\":\n\t\t\t\tcase \"tenor\":\n\t\t\t\tcase \"perc\":\n\t\t\t\tcase \"none\":\n\t\t\t\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t\t\t\tvar clef = tokens.shift();\n\t\t\t\t\tswitch (clef.token) {\n\t\t\t\t\t\tcase 'treble':\n\t\t\t\t\t\tcase 'tenor':\n\t\t\t\t\t\tcase 'alto':\n\t\t\t\t\t\tcase 'bass':\n\t\t\t\t\t\tcase 'perc':\n\t\t\t\t\t\tcase 'none':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'C': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'F': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'G': clef.token = 'treble'; break;\n\t\t\t\t\t\tcase 'c': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'f': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'g': clef.token = 'treble'; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"Expected clef name. Found \" + clef.token, str, clef.start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 0 && tokens[0].type === 'number') {\n\t\t\t\t\t\tclef.token += tokens[0].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 1 && (tokens[0].token === '-' || tokens[0].token === '+' || tokens[0].token === '^' || tokens[0].token === '_') && tokens[1].token === '8') {\n\t\t\t\t\t\tclef.token += tokens[0].token + tokens[1].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.clef = {type: clef.token, verticalPos: calcMiddle(clef.token, 0)};\n\t\t\t\t\tif (multilineVars.currentVoice && multilineVars.currentVoice.transpose !== undefined)\n\t\t\t\t\t\tmultilineVars.clef.transpose = multilineVars.currentVoice.transpose;\n\t\t\t\t\tret.foundClef = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\twarn(\"Unknown parameter: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\ttokens.shift();\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tvar setCurrentVoice = function(id) {\n\t\tvar currentVoice = multilineVars.voices[id]\n\t\tif (multilineVars.currentVoice) {\n\t\t\tif (multilineVars.currentVoice.index === currentVoice.index && multilineVars.currentVoice.staffNum === currentVoice.staffNum)\n\t\t\t\treturn // there was no change so don't reset it.\n\t\t}\n\t\tmultilineVars.currentVoice = currentVoice;\n\t\treturn tuneBuilder.setCurrentVoice(currentVoice.staffNum, currentVoice.index, id);\n\t};\n\n\tparseKeyVoice.parseVoice = function(line, i, e) {\n\t\t//First truncate the string to the first non-space character after V: through either the\n\t\t//end of the line or a % character. Then remove trailing spaces, too.\n\t\tvar ret = tokenizer.getMeat(line, i, e);\n\t\tvar start = ret.start;\n\t\tvar end = ret.end;\n\t\t//The first thing on the line is the ID. It can be any non-space string and terminates at the\n\t\t//first space.\n\t\tvar id = tokenizer.getToken(line, start, end);\n\t\tif (id.length === 0) {\n\t\t\twarn(\"Expected a voice id\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar isNew = false;\n\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\tmultilineVars.voices[id] = {};\n\t\t\tisNew = true;\n\t\t\tif (multilineVars.score_is_present)\n\t\t\t\twarn(\"Can't have an unknown V: id when the %score directive is present\", line, start);\n\t\t}\n\t\tstart += id.length;\n\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\n\t\tvar staffInfo = {startStaff: isNew};\n\t\tvar addNextTokenToStaffInfo = function(name) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse\n\t\t\t\tstaffInfo[name] = attr.token;\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextTokenToVoiceInfo = function(id, name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\tmultilineVars.voices[id][name] = attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar getNextToken = function(name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\treturn attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextNoteTokenToVoiceInfo = function(id, name) {\n\t\t\tvar noteToTransposition = {\n\t\t\t\t\"_B\": 2,\n\t\t\t\t\"_E\": 9,\n\t\t\t\t\"_b\": -10,\n\t\t\t\t\"_e\": -3\n\t\t\t};\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tvar t = noteToTransposition[attr.token];\n\t\t\t\tif (!t)\n\t\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\t\telse\n\t\t\t\t\tmultilineVars.voices[id][name] = t;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\n\t\t//Then the following items can occur in any order:\n\t\twhile (start < end) {\n\t\t\tvar token = tokenizer.getVoiceToken(line, start, end);\n\t\t\tstart += token.len;\n\n\t\t\tif (token.warn) {\n\t\t\t\twarn(\"Error parsing voice: \" + token.warn, line, start);\n\t\t\t} else {\n\t\t\t\tvar attr = null;\n\t\t\t\tswitch (token.token) {\n\t\t\t\t\tcase 'clef':\n\t\t\t\t\tcase 'cl':\n\t\t\t\t\t\taddNextTokenToStaffInfo('clef');\n\t\t\t\t\t\t// TODO-PER: check for a legal clef; do octavizing\n\t\t\t\t\t\tvar oct = 0;\n\t//\t\t\t\t\t\t\tfor (var ii = 0; ii < staffInfo.clef.length; ii++) {\n\t//\t\t\t\t\t\t\t\tif (staffInfo.clef[ii] === ',') oct -= 7;\n\t//\t\t\t\t\t\t\t\telse if (staffInfo.clef[ii] === \"'\") oct += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staffInfo.clef !== undefined) {\n\t\t\t\t\t\t  staffInfo.clef = staffInfo.clef.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\t\tif (staffInfo.clef.indexOf('+16') !== -1) {\n\t\t\t\t\t\t\t\toct += 14;\n\t\t\t\t\t\t\t\tstaffInfo.clef = staffInfo.clef.replace('+16', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'treble':\n\t\t\t\t\tcase 'bass':\n\t\t\t\t\tcase 'tenor':\n\t\t\t\t\tcase 'alto':\n\t\t\t\t\tcase 'perc':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\tcase 'treble\\'':\n\t\t\t\t\tcase 'bass\\'':\n\t\t\t\t\tcase 'tenor\\'':\n\t\t\t\t\tcase 'alto\\'':\n\t\t\t\t\tcase 'none\\'':\n\t\t\t\t\tcase 'treble\\'\\'':\n\t\t\t\t\tcase 'bass\\'\\'':\n\t\t\t\t\tcase 'tenor\\'\\'':\n\t\t\t\t\tcase 'alto\\'\\'':\n\t\t\t\t\tcase 'none\\'\\'':\n\t\t\t\t\tcase 'treble,':\n\t\t\t\t\tcase 'bass,':\n\t\t\t\t\tcase 'tenor,':\n\t\t\t\t\tcase 'alto,':\n\t\t\t\t\tcase 'none,':\n\t\t\t\t\tcase 'treble,,':\n\t\t\t\t\tcase 'bass,,':\n\t\t\t\t\tcase 'tenor,,':\n\t\t\t\t\tcase 'alto,,':\n\t\t\t\t\tcase 'none,,':\n\t\t\t\t\t\t// TODO-PER: handle the octave indicators on the clef by changing the middle property\n\t\t\t\t\t\tvar oct2 = 0;\n\t//\t\t\t\t\t\t\tfor (var iii = 0; iii < token.token.length; iii++) {\n\t//\t\t\t\t\t\t\t\tif (token.token[iii] === ',') oct2 -= 7;\n\t//\t\t\t\t\t\t\t\telse if (token.token[iii] === \"'\") oct2 += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t  staffInfo.clef = token.token.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct2);\n\t\t\t\t\t\tmultilineVars.voices[id].clef = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staves':\n\t\t\t\t\tcase 'stave':\n\t\t\t\t\tcase 'stv':\n\t\t\t\t\t\taddNextTokenToStaffInfo('staves');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'brace':\n\t\t\t\t\tcase 'brc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('brace');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bracket':\n\t\t\t\t\tcase 'brk':\n\t\t\t\t\t\taddNextTokenToStaffInfo('bracket');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'name':\n\t\t\t\t\tcase 'nm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('name');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'subname':\n\t\t\t\t\tcase 'sname':\n\t\t\t\t\tcase 'snm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('subname');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'merge':\n\t\t\t\t\t\tstaffInfo.startStaff = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stem':\n\t\t\t\t\tcase 'stems':\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'up' || attr.token === 'down')\n\t\t\t\t\t\t\tmultilineVars.voices[id].stem = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected up or down for voice stem\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'up':\n\t\t\t\t\tcase 'down':\n\t\t\t\t\t\tmultilineVars.voices[id].stem = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'middle':\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('verticalPos');\n\t\t\t\t\t\tstaffInfo.verticalPos = parseMiddle(staffInfo.verticalPos).mid;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'gchords':\n\t\t\t\t\tcase 'gch':\n\t\t\t\t\t\tmultilineVars.voices[id].suppressChords = true;\n\t\t\t\t\t\t// gchords can stand on its own, or it could be gchords=0.\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.token === \"0\")\n\t\t\t\t\t\t\tstart = start + attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'space':\n\t\t\t\t\tcase 'spc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('spacing');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'scale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'score':\n\t\t\t\t\t\taddNextNoteTokenToVoiceInfo(id, 'scoreTranspose');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'transpose':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'transpose', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stafflines':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'stafflines', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staffscale':\n\t\t\t\t\t\t// TODO-PER: This is passed to the engraver, but the engraver ignores it.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'staffscale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'octave':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'octave', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'volume', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cue':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\tvar cue = getNextToken('cue', 'string');\n\t\t\t\t\t\tif (cue === 'on')\n\t\t\t\t\t\t\tmultilineVars.voices[id].scale = 0.6;\n\t\t\t\t\t\telse multilineVars.voices[id].scale = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"style\":\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'normal' || attr.token === 'harmonic' || attr.token === 'rhythm' || attr.token === 'x' || attr.token === 'triangle')\n\t\t\t\t\t\t\tmultilineVars.voices[id].style = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected one of [normal, harmonic, rhythm, x, triangle] for voice style\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// default:\n\t\t\t\t\t// Use this to find V: usages that aren't handled.\n\t\t\t\t\t// \tconsole.log(\"parse voice\", token, tune.metaText.title);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\t\t}\n\n\t\t// now we've filled up staffInfo, figure out what to do with this voice\n\t\t// TODO-PER: It is unclear from the standard and the examples what to do with brace, bracket, and staves, so they are ignored for now.\n\t\tif (staffInfo.startStaff || multilineVars.staves.length === 0) {\n\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, meter: multilineVars.origMeter});\n\t\t\tif (!multilineVars.score_is_present)\n\t\t\t\tmultilineVars.staves[multilineVars.staves.length-1].numVoices = 0;\n\t\t}\n\t\tif (multilineVars.voices[id].staffNum === undefined) {\n\t\t\t// store where to write this for quick access later.\n\t\t\tmultilineVars.voices[id].staffNum = multilineVars.staves.length-1;\n\t\t\tvar vi = 0;\n\t\t\tfor(var v in multilineVars.voices) {\n\t\t\t\tif(multilineVars.voices.hasOwnProperty(v)) {\n\t\t\t\t\tif (multilineVars.voices[v].staffNum === multilineVars.voices[id].staffNum)\n\t\t\t\t\t\tvi++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmultilineVars.voices[id].index = vi-1;\n\t\t}\n\t\tvar s = multilineVars.staves[multilineVars.voices[id].staffNum];\n\t\tif (!multilineVars.score_is_present)\n\t\t\ts.numVoices++;\n\t\tif (staffInfo.clef) s.clef = {type: staffInfo.clef, verticalPos: staffInfo.verticalPos};\n\t\tif (staffInfo.spacing) s.spacing_below_offset = staffInfo.spacing;\n\t\tif (staffInfo.verticalPos) s.verticalPos = staffInfo.verticalPos;\n\n\t\tif (staffInfo.name) {if (s.name) s.name.push(staffInfo.name); else s.name = [ staffInfo.name ];}\n\t\tif (staffInfo.subname) {if (s.subname) s.subname.push(staffInfo.subname); else s.subname = [ staffInfo.subname ];}\n\n\t\treturn setCurrentVoice(id);\n\t};\n\n})();\n\nmodule.exports = parseKeyVoice;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_key_voice.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_music.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_music.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var parseKeyVoice = __webpack_require__(/*! ./abc_parse_key_voice */ \"./node_modules/abcjs/src/parse/abc_parse_key_voice.js\");\nvar transpose = __webpack_require__(/*! ./abc_transpose */ \"./node_modules/abcjs/src/parse/abc_transpose.js\");\n\nvar tokenizer;\nvar warn;\nvar multilineVars;\nvar tune;\nvar tuneBuilder;\nvar header;\n\nvar {\n  legalAccents,\n  volumeDecorations,\n  dynamicDecorations,\n  accentPseudonyms,\n  accentDynamicPseudonyms,\n  nonDecorations,\n  durations,\n  pitches,\n  rests,\n  accMap,\n  tripletQ\n} = __webpack_require__(/*! ./abc_parse_settings */ \"./node_modules/abcjs/src/parse/abc_parse_settings.js\")\n\nvar MusicParser = function(_tokenizer, _warn, _multilineVars, _tune, _tuneBuilder, _header) {\n\ttokenizer = _tokenizer;\n\twarn = _warn;\n\tmultilineVars = _multilineVars;\n\ttune = _tune;\n\ttuneBuilder = _tuneBuilder;\n\theader = _header;\n\tthis.lineContinuation = false;\n}\n\n//\n// Parse line of music\n//\n// This is a stream of <(bar-marking|header|note-group)...> in any order, with optional spaces between each element\n// core-note is <open-slur, accidental, pitch:required, octave, duration, close-slur&|tie> with no spaces within that\n// chord is <open-bracket:required, core-note:required... close-bracket:required duration> with no spaces within that\n// grace-notes is <open-brace:required, (open-slur|core-note:required|close-slur)..., close-brace:required> spaces are allowed\n// note-group is <grace-notes, chord symbols&|decorations..., grace-notes, slur&|triplet, chord|core-note, end-slur|tie> spaces are allowed between items\n// bar-marking is <ampersand> or <chord symbols&|decorations..., bar:required> spaces allowed\n// header is <open-bracket:required, K|M|L|V:required, colon:required, field:required, close-bracket:required> spaces can occur between the colon, in the field, and before the close bracket\n// header can also be the only thing on a line. This is true even if it is a continuation line. In this case the brackets are not required.\n// a space is a back-tick, a space, or a tab. If it is a back-tick, then there is no end-beam.\n\n// Line preprocessing: anything after a % is ignored (the double %% should have been taken care of before this)\n// Then, all leading and trailing spaces are ignored.\n// If there was a line continuation, the \\n was replaced by a \\r and the \\ was replaced by a space. This allows the construct\n// of having a header mid-line conceptually, but actually be at the start of the line. This is equivolent to putting the header in [ ].\n\n// TODO-PER: How to handle ! for line break?\n// TODO-PER: dots before bar, dots before slur\n// TODO-PER: U: redefinable symbols.\n\n// Ambiguous symbols:\n// \"[\" can be the start of a chord, the start of a header element or part of a bar line.\n// --- if it is immediately followed by \"|\", it is a bar line\n// --- if it is immediately followed by K: L: M: V: it is a header (note: there are other headers mentioned in the standard, but I'm not sure how they would be used.)\n// --- otherwise it is the beginning of a chord\n// \"(\" can be the start of a slur or a triplet\n// --- if it is followed by a number from 2-9, then it is a triplet\n// --- otherwise it is a slur\n// \"]\"\n// --- if there is a chord open, then this is the close\n// --- if it is after a [|, then it is an invisible bar line\n// --- otherwise, it is par of a bar\n// \".\" can be a bar modifier or a slur modifier, or a decoration\n// --- if it comes immediately before a bar, it is a bar modifier\n// --- if it comes immediately before a slur, it is a slur modifier\n// --- otherwise it is a decoration for the next note.\n// number:\n// --- if it is after a bar, with no space, it is an ending marker\n// --- if it is after a ( with no space, it is a triplet count\n// --- if it is after a pitch or octave or slash, then it is a duration\n\n// Unambiguous symbols (except inside quoted strings):\n// vertical-bar, colon: part of a bar\n// ABCDEFGabcdefg: pitch\n// xyzZ: rest\n// comma, prime: octave\n// close-paren: end-slur\n// hyphen: tie\n// tilde, v, u, bang, plus, THLMPSO: decoration\n// carat, underscore, equal: accidental\n// ampersand: time reset\n// open-curly, close-curly: grace notes\n// double-quote: chord symbol\n// less-than, greater-than, slash: duration\n// back-tick, space, tab: space\n\nvar isInTie = function(multilineVars, overlayLevel, el) {\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\treturn false;\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel][voiceIndex]) {\n\t\tif (el.pitches !== undefined || el.rest.type !== 'spacer')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nvar el = { };\nMusicParser.prototype.parseMusic = function(line) {\n\theader.resolveTempo();\n\t//multilineVars.havent_set_length = false;\t// To late to set this now.\n\tmultilineVars.is_in_header = false;\t// We should have gotten a key header by now, but just in case, this is definitely out of the header.\n\tvar i = 0;\n\tvar startOfLine = multilineVars.iChar;\n\t// see if there is nothing but a comment on this line. If so, just ignore it. A full line comment is optional white space followed by %\n\twhile (tokenizer.isWhiteSpace(line[i]) && i < line.length)\n\t\ti++;\n\tif (i === line.length || line[i] === '%')\n\t\treturn;\n\n\t// Start with the standard staff, clef and key symbols on each line\n\tvar delayStartNewLine = multilineVars.start_new_line;\n\tif (multilineVars.continueall === undefined)\n\t\tmultilineVars.start_new_line = true;\n\telse\n\t\tmultilineVars.start_new_line = false;\n\tvar tripletNotesLeft = 0;\n\n\t// See if the line starts with a header field\n\tvar retHeader = header.letter_to_body_header(line, i);\n\tif (retHeader[0] > 0) {\n\t\ti += retHeader[0];\n\t\t// fixes bug on this: c[V:2]d\n\t\tif (retHeader[1] === 'V')\n\t\t\tthis.startNewLine();\n\t\t\t// delayStartNewLine = true;\n\t\t// TODO-PER: Handle inline headers\n\t}\n\n\tvar overlayLevel = 0;\n\twhile (i < line.length)\n\t{\n\t\tvar startI = i;\n\t\tif (line[i] === '%')\n\t\t\tbreak;\n\n\t\tvar retInlineHeader = header.letter_to_inline_header(line, i, delayStartNewLine);\n\t\tif (retInlineHeader[0] > 0) {\n\t\t\ti += retInlineHeader[0];\n\t\t\t//console.log(\"inline header\", retInlineHeader)\n\t\t\tif (retInlineHeader[1] === 'V')\n\t\t\t\tdelayStartNewLine = true; // fixes bug on this: c[V:2]d\n\t\t\t// TODO-PER: Handle inline headers\n\t\t\t//multilineVars.start_new_line = false;\n\t\t} else {\n\t\t\t// Wait until here to actually start the line because we know we're past the inline statements.\n\t\t\tif (!tuneBuilder.hasBeginMusic() || (delayStartNewLine && !this.lineContinuation)) {\n\t\t\t\tthis.startNewLine();\n\t\t\t\tdelayStartNewLine = false;\n\t\t\t}\n\n\t\t\t// We need to decide if the following characters are a bar-marking or a note-group.\n\t\t\t// Unfortunately, that is ambiguous. Both can contain chord symbols and decorations.\n\t\t\t// If there is a grace note either before or after the chord symbols and decorations, then it is definitely a note-group.\n\t\t\t// If there is a bar marker, it is definitely a bar-marking.\n\t\t\t// If there is either a core-note or chord, it is definitely a note-group.\n\t\t\t// So, loop while we find grace-notes, chords-symbols, or decorations. [It is an error to have more than one grace-note group in a row; the others can be multiple]\n\t\t\t// Then, if there is a grace-note, we know where to go.\n\t\t\t// Else see if we have a chord, core-note, slur, triplet, or bar.\n\n\t\t\tvar ret;\n\t\t\twhile (1) {\n\t\t\t\tret = tokenizer.eatWhiteSpace(line, i);\n\t\t\t\tif (ret > 0) {\n\t\t\t\t\ti += ret;\n\t\t\t\t}\n\t\t\t\tif (i > 0 && line[i-1] === '\\x12') {\n\t\t\t\t\t// there is one case where a line continuation isn't the same as being on the same line, and that is if the next character after it is a header.\n\t\t\t\t\tret = header.letter_to_body_header(line, i);\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === 'V')\n\t\t\t\t\t\t\tthis.startNewLine(); // fixes bug on this: c\\\\nV:2]\\\\nd\n\t\t\t\t\t\t// TODO: insert header here\n\t\t\t\t\t\ti = ret[0];\n\t\t\t\t\t\tmultilineVars.start_new_line = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// gather all the grace notes, chord symbols and decorations\n\t\t\t\tret = letter_to_spacer(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ti += ret[0];\n\t\t\t\t}\n\n\t\t\t\tret = letter_to_chord(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t// There could be more than one chord here if they have different positions.\n\t\t\t\t\t// If two chords have the same position, then connect them with newline.\n\t\t\t\t\tif (!el.chord)\n\t\t\t\t\t\tel.chord = [];\n\t\t\t\t\tvar chordName = tokenizer.translateString(ret[1]);\n\t\t\t\t\tchordName = chordName.replace(/;/g, \"\\n\");\n\t\t\t\t\tvar addedChord = false;\n\t\t\t\t\tfor (var ci = 0; ci < el.chord.length; ci++) {\n\t\t\t\t\t\tif (el.chord[ci].position === ret[2]) {\n\t\t\t\t\t\t\taddedChord = true;\n\t\t\t\t\t\t\tel.chord[ci].name += \"\\n\" + chordName;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (addedChord === false) {\n\t\t\t\t\t\tif (ret[2] === null && ret[3])\n\t\t\t\t\t\t\tel.chord.push({name: chordName, rel_position: ret[3]});\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.chord.push({name: chordName, position: ret[2]});\n\t\t\t\t\t}\n\n\t\t\t\t\ti += ret[0];\n\t\t\t\t\tvar ii = tokenizer.skipWhiteSpace(line.substring(i));\n\t\t\t\t\tif (ii > 0)\n\t\t\t\t\t\tel.force_end_beam_last = true;\n\t\t\t\t\ti += ii;\n\t\t\t\t} else {\n\t\t\t\t\tif (nonDecorations.indexOf(line[i]) === -1)\n\t\t\t\t\t\tret = letter_to_accent(line, i);\n\t\t\t\t\telse ret = [ 0 ];\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === null) {\n\t\t\t\t\t\t\tif (i + 1 < line.length)\n\t\t\t\t\t\t\t\tthis.startNewLine();\t// There was a ! in the middle of the line. Start a new line if there is anything after it.\n\t\t\t\t\t\t} else if (ret[1].length > 0) {\n\t\t\t\t\t\t\tif (ret[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\tel.style = ret[1].substr(6);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\tif (ret[1] === 'beambr1')\n\t\t\t\t\t\t\t\t\tel.beambr = 1;\n\t\t\t\t\t\t\t\telse if (ret[1] === \"beambr2\")\n\t\t\t\t\t\t\t\t\tel.beambr = 2;\n\t\t\t\t\t\t\t\telse el.decoration.push(ret[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = letter_to_grace(line, i);\n\t\t\t\t\t\t// TODO-PER: Be sure there aren't already grace notes defined. That is an error.\n\t\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\t\tel.gracenotes = ret[1];\n\t\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tret = letter_to_bar(line, i);\n\t\t\tif (ret[0] > 0) {\n\t\t\t\t// This is definitely a bar\n\t\t\t\toverlayLevel = 0;\n\t\t\t\tif (el.gracenotes !== undefined) {\n\t\t\t\t\t// Attach the grace note to an invisible note\n\t\t\t\t\tel.rest = { type: 'spacer' };\n\t\t\t\t\tel.duration = 0.125; // TODO-PER: I don't think the duration of this matters much, but figure out if it does.\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+i, startOfLine+i+ret[0], el);\n\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\tvar bar = {type: ret[1]};\n\t\t\t\tif (bar.type.length === 0)\n\t\t\t\t\twarn(\"Unknown bar type\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tif (multilineVars.inEnding && bar.type !== 'bar_thin') {\n\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (ret[2]) {\n\t\t\t\t\t\tbar.startEnding = ret[2];\n\t\t\t\t\t\tif (multilineVars.inEnding)\n\t\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = true;\n\t\t\t\t\t\tif (ret[1] === \"bar_right_repeat\") {\n\t\t\t\t\t\t\t// restore the tie and slur state from the start repeat\n\t\t\t\t\t\t\tmultilineVars.restoreStartEndingHoldOvers();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// save inTie, inTieChord\n\t\t\t\t\t\t\tmultilineVars.duplicateStartEndingHoldOvers();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (el.decoration !== undefined)\n\t\t\t\t\t\tbar.decoration = el.decoration;\n\t\t\t\t\tif (el.chord !== undefined)\n\t\t\t\t\t\tbar.chord = el.chord;\n\t\t\t\t\tif (bar.startEnding && multilineVars.barFirstEndingNum === undefined)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = multilineVars.currBarNumber;\n\t\t\t\t\telse if (bar.startEnding && bar.endEnding && multilineVars.barFirstEndingNum)\n\t\t\t\t\t\tmultilineVars.currBarNumber = multilineVars.barFirstEndingNum;\n\t\t\t\t\telse if (bar.endEnding)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = undefined;\n\t\t\t\t\tif (bar.type !== 'bar_invisible' && multilineVars.measureNotEmpty) {\n\t\t\t\t\t\tif (isFirstVoice()) {\n\t\t\t\t\t\t\tmultilineVars.currBarNumber++;\n\t\t\t\t\t\t\tif (multilineVars.barNumbers && multilineVars.currBarNumber % multilineVars.barNumbers === 0)\n\t\t\t\t\t\t\t\tbar.barNumber = multilineVars.currBarNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'bar');\n\t\t\t\t\ttuneBuilder.appendElement('bar', startOfLine+startI, startOfLine+i+ret[0], bar);\n\t\t\t\t\tmultilineVars.measureNotEmpty = false;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\ti += ret[0];\n\t\t\t} else if (line[i] === '&') {\t// backtrack to beginning of measure\n\t\t\t\tret = letter_to_overlay(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ttuneBuilder.appendElement('overlay', startOfLine, startOfLine+1, {});\n\t\t\t\t\ti += 1;\n\t\t\t\t\toverlayLevel++;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// This is definitely a note group\n\t\t\t\t//\n\t\t\t\t// Look for as many open slurs and triplets as there are. (Note: only the first triplet is valid.)\n\t\t\t\tret = letter_to_open_slurs_and_triplets(line, i);\n\t\t\t\tif (ret.consumed > 0) {\n\t\t\t\t\tif (ret.startSlur !== undefined)\n\t\t\t\t\t\tel.startSlur = ret.startSlur;\n\t\t\t\t\tif (ret.dottedSlur)\n\t\t\t\t\t\tel.dottedSlur = true;\n\t\t\t\t\tif (ret.triplet !== undefined) {\n\t\t\t\t\t\tif (tripletNotesLeft > 0)\n\t\t\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tel.startTriplet = ret.triplet;\n\t\t\t\t\t\t\tel.tripletMultiplier = ret.tripletQ / ret.triplet;\n\t\t\t\t\t\t\tel.tripletR = ret.num_notes;\n\t\t\t\t\t\t\ttripletNotesLeft = ret.num_notes === undefined ? ret.triplet : ret.num_notes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ti += ret.consumed;\n\t\t\t\t}\n\n\t\t\t\t// handle chords.\n\t\t\t\tif (line[i] === '[') {\n\t\t\t\t\tvar chordStartChar = i;\n\t\t\t\t\ti++;\n\t\t\t\t\tvar chordDuration = null;\n\t\t\t\t\tvar rememberEndBeam = false;\n\n\t\t\t\t\tvar done = false;\n\t\t\t\t\twhile (!done) {\n\t\t\t\t\t\tvar accent = letter_to_accent(line, i);\n\t\t\t\t\t\tif (accent[0] > 0) {\n\t\t\t\t\t\t\ti += accent[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar chordNote = getCoreNote(line, i, {}, false);\n\t\t\t\t\t\tif (chordNote !== null && chordNote.pitch !== undefined) {\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a decoration above, it modifies the entire chord. \"style\" is handled below.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") !== 0) {\n\t\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\t\tel.decoration.push(accent[1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.end_beam) {\n\t\t\t\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t\t\t\tdelete chordNote.end_beam;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.pitches === undefined) {\n\t\t\t\t\t\t\t\tel.duration = chordNote.duration;\n\t\t\t\t\t\t\t\tel.pitches = [ chordNote ];\n\t\t\t\t\t\t\t} else\t// Just ignore the note lengths of all but the first note. The standard isn't clear here, but this seems less confusing.\n\t\t\t\t\t\t\t\tel.pitches.push(chordNote);\n\t\t\t\t\t\t\tdelete chordNote.duration;\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a style above, it modifies the individual pitch, not the entire chord.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\t\tel.pitches[el.pitches.length-1].style = accent[1].substr(6);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (multilineVars.inTieChord[el.pitches.length]) {\n\t\t\t\t\t\t\t\tchordNote.endTie = true;\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = undefined;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.startTie)\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = true;\n\n\t\t\t\t\t\t\ti  = chordNote.endChar;\n\t\t\t\t\t\t\tdelete chordNote.endChar;\n\t\t\t\t\t\t} else if (line[i] === ' ') {\n\t\t\t\t\t\t\t// Spaces are not allowed in chords, but we can recover from it by ignoring it.\n\t\t\t\t\t\t\twarn(\"Spaces are not allowed in chords\", line, i);\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (i < line.length && line[i] === ']') {\n\t\t\t\t\t\t\t\t// consume the close bracket\n\t\t\t\t\t\t\t\ti++;\n\n\t\t\t\t\t\t\t\tif (multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * multilineVars.next_note_duration;\n\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isInTie(multilineVars,  overlayLevel, el)) {\n\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.endTie = true; });\n\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars,  overlayLevel, false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(el.rest && el.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar postChordDone = false;\n\t\t\t\t\t\t\t\twhile (i < line.length && !postChordDone) {\n\t\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\t\tcase ' ':\n\t\t\t\t\t\t\t\t\t\tcase '\\t':\n\t\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '-':\n\t\t\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.startTie = {}; });\n\t\t\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars,  overlayLevel, true);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, i);\n\t\t\t\t\t\t\t\t\t\t\ti += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\t\t\t\t\t\tif (chordDuration)\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = chordDuration * br2[1];\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = br2[1];\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\t\t\t\tcase '/':\n\t\t\t\t\t\t\t\t\t\t\tvar fraction = tokenizer.getFraction(line, i);\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = fraction.value;\n\t\t\t\t\t\t\t\t\t\t\ti = fraction.index;\n\t\t\t\t\t\t\t\t\t\t\tvar ch = line[i]\n\t\t\t\t\t\t\t\t\t\t\tif (ch === ' ')\n\t\t\t\t\t\t\t\t\t\t\t\trememberEndBeam = true;\n\t\t\t\t\t\t\t\t\t\t\tif (ch === '-' || ch === ')' || ch === ' ' || ch === '<' || ch === '>')\n\t\t\t\t\t\t\t\t\t\t\t\ti--; // Subtracting one because one is automatically added below\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = 0;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (!postChordDone) {\n\t\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"Expected ']' to end the chords\", line, i);\n\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tif (chordDuration !== null) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * chordDuration;\n\t\t\t\t\t\t\t\t\tif (rememberEndBeam)\n\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\t\t\tel = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// Single pitch\n\t\t\t\t\tvar el2 = {};\n\t\t\t\t\tvar core = getCoreNote(line, i, el2, true);\n\t\t\t\t\tif (el2.endTie !== undefined) setIsInTie(multilineVars,  overlayLevel, true);\n\t\t\t\t\tif (core !== null) {\n\t\t\t\t\t\tif (core.pitch !== undefined) {\n\t\t\t\t\t\t\tel.pitches = [ { } ];\n\t\t\t\t\t\t\t// TODO-PER: straighten this out so there is not so much copying: getCoreNote shouldn't change e'\n\t\t\t\t\t\t\tif (core.accidental !== undefined) el.pitches[0].accidental = core.accidental;\n\t\t\t\t\t\t\tel.pitches[0].pitch = core.pitch;\n\t\t\t\t\t\t\tel.pitches[0].name = core.name;\n\t\t\t\t\t\t\tif (core.midipitch || core.midipitch === 0)\n\t\t\t\t\t\t\t\tel.pitches[0].midipitch = core.midipitch;\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.pitches[0].endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.pitches[0].endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.pitches[0].startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (el.startSlur !== undefined) el.pitches[0].startSlur = el.startSlur;\n\t\t\t\t\t\t\tif (el.dottedSlur !== undefined) el.pitches[0].dottedSlur = true;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.pitches[0].startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.pitches[0].startTie = el.startTie;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.rest = core.rest;\n\t\t\t\t\t\t\tif (core.rest.type === 'multimeasure' && isFirstVoice())\n\t\t\t\t\t\t\t\tmultilineVars.currBarNumber += core.rest.text - 1 // The minus one is because the measure with the rest is already counted once normally.\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.rest.endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.rest.startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.rest.startTie = el.startTie;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.chord !== undefined) el.chord = core.chord;\n\t\t\t\t\t\tif (core.duration !== undefined) el.duration = core.duration;\n\t\t\t\t\t\tif (core.decoration !== undefined) el.decoration = core.decoration;\n\t\t\t\t\t\tif (core.graceNotes !== undefined) el.graceNotes = core.graceNotes;\n\t\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\t\tdelete el.dottedSlur;\n\t\t\t\t\t\tif (isInTie(multilineVars,  overlayLevel, el)) {\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tel.pitches[0].endTie = true;\n\t\t\t\t\t\t\t} else if (el.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\tel.rest.endTie = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetIsInTie(multilineVars,  overlayLevel, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (core.startTie || el.startTie)\n\t\t\t\t\t\t\tsetIsInTie(multilineVars,  overlayLevel, true);\n\t\t\t\t\t\ti  = core.endChar;\n\n\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(core.rest && core.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.end_beam)\n\t\t\t\t\t\t\taddEndBeam(el);\n\n\t\t\t\t\t\t// If there is a whole rest, then it should be the duration of the measure, not it's own duration. We need to special case it.\n\t\t\t\t\t\t// If the time signature length is greater than 4/4, though, then a whole rest has no special treatment.\n\t\t\t\t\t\tif (el.rest && el.rest.type === 'rest' && el.duration === 1 && durationOfMeasure(multilineVars) <= 1) {\n\t\t\t\t\t\t\tel.rest.type = 'whole';\n\n\t\t\t\t\t\t\tel.duration = durationOfMeasure(multilineVars);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Create a warning if this is not a displayable duration.\n\t\t\t\t\t\t// The first item on a line is a regular note value, each item after that represents a dot placed after the previous note.\n\t\t\t\t\t\t// Only durations less than a whole note are tested because whole note durations have some tricky rules.\n\n\t\t\t\t\t\tif (el.duration < 1 && durations.indexOf(el.duration) === -1 && el.duration !== 0) {\n\t\t\t\t\t\t\tif (!el.rest || el.rest.type !== 'spacer')\n\t\t\t\t\t\t\t\twarn(\"Duration not representable: \" + line.substring(startI, i), line, i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\tvar succeeded = tuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\tif (!succeeded) {\n\t\t\t\t\t\t\tthis.startNewLine()\n\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\tel = {};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i === startI) {\t// don't know what this is, so ignore it.\n\t\t\t\t\tif (line[i] !== ' ' && line[i] !== '`')\n\t\t\t\t\t\twarn(\"Unknown character ignored\", line, i);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tthis.lineContinuation = line.indexOf('\\x12') >= 0 || (retHeader[0] > 0)\n\tif (!this.lineContinuation) { el = { } }\n};\n\nvar setIsInTie =function(multilineVars, overlayLevel, value) {\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\tmultilineVars.inTie[overlayLevel] = [];\n\tmultilineVars.inTie[overlayLevel][voiceIndex] = value;\n};\n\nvar letter_to_chord = function(line, i) {\n\tif (line[i] === '\"')\n\t{\n\t\tvar chord = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\tif (!chord[2])\n\t\t\twarn(\"Missing the closing quote while parsing the chord symbol\", line , i);\n\t\t// If it starts with ^, then the chord appears above.\n\t\t// If it starts with _ then the chord appears below.\n\t\t// (note that the 2.0 draft standard defines them as not chords, but annotations and also defines @.)\n\t\tif (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '^') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'above';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '_') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'below';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '<') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'left';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '>') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'right';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '@') {\n\t\t      // @-15,5.7\t\t\n\t\t      chord[1] = chord[1].substring(1);\n\t\t      var x = tokenizer.getFloat(chord[1]);\n\t\t      if (x.digits === 0){\n\t\t\twarn(\"Missing first position in absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t      }\n\t\t      chord[1] = chord[1].substring(x.digits);\n\t\t      if (chord[1][0] !== ','){\n\t\t\twarn(\"Missing comma absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t      }\n\t\t      chord[1] = chord[1].substring(1);\n\t\t      var y = tokenizer.getFloat(chord[1]);\n\t\t      if (y.digits === 0){\n\t\t\twarn(\"Missing second position in absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t      }\n\t\t      chord[1] = chord[1].substring(y.digits);\n\t\t      var ws = tokenizer.skipWhiteSpace(chord[1]);\n\t\t      chord[1] = chord[1].substring(ws);\n\t\t      chord[2] = null;\n\t\t      chord[3] = {\n\t\t\tx: x.value,\n\t\t\ty: y.value\n\t\t      };\t\n\t\t} else {\n\t\t\tif (multilineVars.freegchord !== true) {\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])b/g, \"$1♭\");\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])#/g, \"$1♯\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g, \"$1$2°$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o$/g, \"$1$2°\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g, \"$1$2ø$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)\\^([^A-Za-z])/g, \"$1$2∆$3\");\n\t\t\t}\n\t\t\tchord[2] = 'default';\n\t\t\tchord[1] = transpose.chordName(multilineVars, chord[1]);\n\t\t}\n\t\treturn chord;\n\t}\n\treturn [0, \"\"];\n};\n\nvar letter_to_grace =  function(line, i) {\n\t// Grace notes are an array of: startslur, note, endslur, space; where note is accidental, pitch, duration\n\tif (line[i] === '{') {\n\t\t// fetch the gracenotes string and consume that into the array\n\t\tvar gra = tokenizer.getBrackettedSubstring(line, i, 1, '}');\n\t\tif (!gra[2])\n\t\t\twarn(\"Missing the closing '}' while parsing grace note\", line, i);\n\t\t// If there is a slur after the grace construction, then move it to the last note inside the grace construction\n\t\tif (line[i+gra[0]] === ')') {\n\t\t\tgra[0]++;\n\t\t\tgra[1] += ')';\n\t\t}\n\n\t\tvar gracenotes = [];\n\t\tvar ii = 0;\n\t\tvar inTie = false;\n\t\twhile (ii < gra[1].length) {\n\t\t\tvar acciaccatura = false;\n\t\t\tif (gra[1][ii] === '/') {\n\t\t\t\tacciaccatura = true;\n\t\t\t\tii++;\n\t\t\t}\n\t\t\tvar note = getCoreNote(gra[1], ii, {}, false);\n\t\t\tif (note !== null) {\n\t\t\t\t// The grace note durations should not be affected by the default length: they should be based on 1/16, so if that isn't the default, then multiply here.\n\t\t\t\tnote.duration = note.duration / (multilineVars.default_length * 8);\n\t\t\t\tif (acciaccatura)\n\t\t\t\t\tnote.acciaccatura = true;\n\t\t\t\tif (note.rest) {\n\t\t\t\t\t// don't allow rests inside gracenotes\n\t\t\t\t\twarn(\"Rests not allowed as grace notes '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\t} else\n\t\t\t\t\tgracenotes.push(note);\n\n\t\t\t\tif (inTie) {\n\t\t\t\t\tnote.endTie = true;\n\t\t\t\t\tinTie = false;\n\t\t\t\t}\n\t\t\t\tif (note.startTie)\n\t\t\t\t\tinTie = true;\n\n\t\t\t\tii  = note.endChar;\n\t\t\t\tdelete note.endChar;\n\n\t\t\t\tif (note.end_beam) {\n\t\t\t\t\tnote.endBeam = true;\n\t\t\t\t\tdelete note.end_beam;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// We shouldn't get anything but notes or a space here, so report an error\n\t\t\t\tif (gra[1][ii] === ' ') {\n\t\t\t\t\tif (gracenotes.length > 0)\n\t\t\t\t\t\tgracenotes[gracenotes.length-1].endBeam = true;\n\t\t\t\t} else\n\t\t\t\t\twarn(\"Unknown character '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\t\tif (gracenotes.length)\n\t\t\treturn [gra[0], gracenotes];\n\t}\n\treturn [ 0 ];\n};\n\nfunction letter_to_overlay(line, i) {\n\tif (line[i] === '&') {\n\t\tvar start = i;\n\t\twhile (line[i] && line[i] !== ':' && line[i] !== '|')\n\t\t\ti++;\n\t\treturn [ i-start, line.substring(start+1, i) ];\n\t}\n\treturn [ 0 ];\n}\n\nfunction durationOfMeasure(multilineVars) {\n\t// TODO-PER: This could be more complicated if one of the unusual measures is used.\n\tvar meter = multilineVars.origMeter;\n\tif (!meter || meter.type !== 'specified')\n\t\treturn 1;\n\tif (!meter.value || meter.value.length === 0)\n\t\treturn 1;\n\treturn parseInt(meter.value[0].num, 10) / parseInt(meter.value[0].den, 10);\n}\n\n\n\n\nvar letter_to_accent = function(line, i) {\n\tvar macro = multilineVars.macros[line[i]];\n\n\tif (macro !== undefined) {\n\t\tif (macro[0] === '!' || macro[0] === '+')\n\t\t\tmacro = macro.substring(1);\n\t\tif (macro[macro.length-1] === '!' || macro[macro.length-1] === '+')\n\t\t\tmacro = macro.substring(0, macro.length-1);\n\t\tif (legalAccents.includes(macro))\n\t\t\treturn [ 1, macro ];\n\t\telse if (volumeDecorations.includes(macro)) {\n\t\t\tif (multilineVars.volumePosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else if (dynamicDecorations.includes(macro)) {\n\t\t\tif (multilineVars.dynamicPosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else {\n\t\t\tif (!multilineVars.ignoredDecorations.includes(macro))\n\t\t\t\twarn(\"Unknown macro: \" + macro, line, i);\n\t\t\treturn [1, '' ];\n\t\t}\n\t}\n\tswitch (line[i])\n\t{\n\t\tcase '.':\n\t\t\tif (line[i+1] === '(' || line[i+1] === '-') // a dot then open paren is a dotted slur; likewise dot dash is dotted tie.\n\t\t\t\tbreak;\n\t\t\treturn [1, 'staccato'];\n\t\tcase 'u':return [1, 'upbow'];\n\t\tcase 'v':return [1, 'downbow'];\n\t\tcase '~':return [1, 'irishroll'];\n\t\tcase '!':\n\t\tcase '+':\n\t\t\tvar ret = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\t\t// Be sure that the accent is recognizable.\n\t\t\tif (ret[1].length > 1 && (ret[1][0] === '^' || ret[1][0] ==='_'))\n\t\t\t\tret[1] = ret[1].substring(1);\t// TODO-PER: The test files have indicators forcing the ornament to the top or bottom, but that isn't in the standard. We'll just ignore them.\n\t\t\tif (legalAccents.includes(ret[1]))\n\t\t\t\treturn ret;\n\t\t\tif (volumeDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.volumePosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t\tif (dynamicDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tvar ind = accentPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentPseudonyms[ind][1];\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tind = accentDynamicPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentDynamicPseudonyms[ind][1];\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// We didn't find the accent in the list, so consume the space, but don't return an accent.\n\t\t\t// Although it is possible that ! was used as a line break, so accept that.\n\t\t\tif (line[i] === '!' && (ret[0] === 1 || line[i+ret[0]-1] !== '!'))\n\t\t\t\treturn [1, null ];\n\t\t\twarn(\"Unknown decoration: \" + ret[1], line, i);\n\t\t\tret[1] = \"\";\n\t\t\treturn ret;\n\t\tcase 'H':return [1, 'fermata'];\n\t\tcase 'J':return [1, 'slide'];\n\t\tcase 'L':return [1, 'accent'];\n\t\tcase 'M':return [1, 'mordent'];\n\t\tcase 'O':return[1, 'coda'];\n\t\tcase 'P':return[1, 'pralltriller'];\n\t\tcase 'R':return [1, 'roll'];\n\t\tcase 'S':return [1, 'segno'];\n\t\tcase 'T':return [1, 'trill'];\n\t}\n\treturn [0, 0];\n};\n\nvar letter_to_spacer = function(line, i) {\n\tvar start = i;\n\twhile (tokenizer.isWhiteSpace(line[i]))\n\t\ti++;\n\treturn [ i-start ];\n};\n\n// returns the class of the bar line\n// the number of the repeat\n// and the number of characters used up\n// if 0 is returned, then the next element was not a bar line\nvar letter_to_bar = function(line, curr_pos) {\n\tvar ret = tokenizer.getBarLine(line, curr_pos);\n\tif (ret.len === 0)\n\t\treturn [0,\"\"];\n\tif (ret.warn) {\n\t\twarn(ret.warn, line, curr_pos);\n\t\treturn [ret.len,\"\"];\n\t}\n\n\t// Now see if this is a repeated ending\n\t// A repeated ending is all of the characters 1,2,3,4,5,6,7,8,9,0,-, and comma\n\t// It can also optionally start with '[', which is ignored.\n\t// Also, it can have white space before the '['.\n\tfor (var ws = 0; ws < line.length; ws++)\n\t\tif (line[curr_pos + ret.len + ws] !== ' ')\n\t\t\tbreak;\n\tvar orig_bar_len = ret.len;\n\tif (line[curr_pos+ret.len+ws] === '[') {\n\t\tret.len += ws + 1;\n\t}\n\n\t// It can also be a quoted string. It is unclear whether that construct requires '[', but it seems like it would. otherwise it would be confused with a regular chord.\n\tif (line[curr_pos+ret.len] === '\"' && line[curr_pos+ret.len-1] === '[') {\n\t\tvar ending = tokenizer.getBrackettedSubstring(line, curr_pos+ret.len, 5);\n\t\treturn [ret.len+ending[0], ret.token, ending[1]];\n\t}\n\tvar retRep = tokenizer.getTokenOf(line.substring(curr_pos+ret.len), \"1234567890-,\");\n\tif (retRep.len === 0 || retRep.token[0] === '-')\n\t\treturn [orig_bar_len, ret.token];\n\n\treturn [ret.len+retRep.len, ret.token, retRep.token];\n};\n\nvar letter_to_open_slurs_and_triplets =  function(line, i) {\n\t// consume spaces, and look for all the open parens. If there is a number after the open paren,\n\t// that is a triplet. Otherwise that is a slur. Collect all the slurs and the first triplet.\n\tvar ret = {};\n\tvar start = i;\n\tif (line[i] === '.' && line[i+1] === '(') {\n\t\tret.dottedSlur = true;\n\t\ti++;\n\t}\n\twhile (line[i] === '(' || tokenizer.isWhiteSpace(line[i])) {\n\t\tif (line[i] === '(') {\n\t\t\tif (i+1 < line.length && (line[i+1] >= '2' && line[i+1] <= '9')) {\n\t\t\t\tif (ret.triplet !== undefined)\n\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tret.triplet = line[i+1] - '0';\n\t\t\t\t\tret.tripletQ = tripletQ[ret.triplet];\n\t\t\t\t\tret.num_notes = ret.triplet;\n\t\t\t\t\tif (i+2 < line.length && line[i+2] === ':') {\n\t\t\t\t\t\t// We are expecting \"(p:q:r\" or \"(p:q\" or \"(p::r\"\n\t\t\t\t\t\t// That is: \"put p notes into the time of q for the next r notes\"\n\t\t\t\t\t\t// if r is missing, then it is equal to p.\n\t\t\t\t\t\t// if q is missing, it is determined from this table:\n\t\t\t\t\t\t// (2 notes in the time of 3\n\t\t\t\t\t\t// (3 notes in the time of 2\n\t\t\t\t\t\t// (4 notes in the time of 3\n\t\t\t\t\t\t// (5 notes in the time of n | if time sig is (6/8, 9/8, 12/8), n=3, else n=2\n\t\t\t\t\t\t// (6 notes in the time of 2\n\t\t\t\t\t\t// (7 notes in the time of n\n\t\t\t\t\t\t// (8 notes in the time of 3\n\t\t\t\t\t\t// (9 notes in the time of n\n\t\t\t\t\t\tif (i+3 < line.length && line[i+3] === ':') {\n\t\t\t\t\t\t\t// The second number, 'q', is not present.\n\t\t\t\t\t\t\tif (i+4 < line.length && (line[i+4] >= '1' && line[i+4] <= '9')) {\n\t\t\t\t\t\t\t\tret.num_notes = line[i+4] - '0';\n\t\t\t\t\t\t\t\ti += 3;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"expected number after the two colons after the triplet to mark the duration\", line, i);\n\t\t\t\t\t\t} else if (i+3 < line.length && (line[i+3] >= '1' && line[i+3] <= '9')) {\n\t\t\t\t\t\t\tret.tripletQ = line[i+3] - '0';\n\t\t\t\t\t\t\tif (i+4 < line.length && line[i+4] === ':') {\n\t\t\t\t\t\t\t\tif (i+5 < line.length && (line[i+5] >= '1' && line[i+5] <= '9')) {\n\t\t\t\t\t\t\t\t\tret.num_notes = line[i+5] - '0';\n\t\t\t\t\t\t\t\t\ti += 4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"expected number after the triplet to mark the duration\", line, i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (ret.startSlur === undefined)\n\t\t\t\t\tret.startSlur = 1;\n\t\t\t\telse\n\t\t\t\t\tret.startSlur++;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\tret.consumed = i-start;\n\treturn ret;\n};\n\nMusicParser.prototype.startNewLine = function() {\n\tvar params = { startChar: -1, endChar: -1};\n\tif (multilineVars.partForNextLine.title)\n\t\tparams.part = multilineVars.partForNextLine;\n\tparams.clef = multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].clef !== undefined ? Object.assign({},multilineVars.staves[multilineVars.currentVoice.staffNum].clef) : Object.assign({},multilineVars.clef);\n\tvar scoreTranspose = multilineVars.currentVoice ? multilineVars.currentVoice.scoreTranspose : 0;\n\tparams.key = parseKeyVoice.standardKey(multilineVars.key.root+multilineVars.key.acc+multilineVars.key.mode, multilineVars.key.root, multilineVars.key.acc, scoreTranspose);\n\tparams.key.mode = multilineVars.key.mode;\n\tif (multilineVars.key.impliedNaturals)\n\t\tparams.key.impliedNaturals = multilineVars.key.impliedNaturals;\n\tif (multilineVars.key.explicitAccidentals) {\n\t\tfor (var i = 0; i < multilineVars.key.explicitAccidentals.length; i++) {\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < params.key.accidentals.length; j++) {\n\t\t\t\tif (params.key.accidentals[j].note === multilineVars.key.explicitAccidentals[i].note) {\n\t\t\t\t\t// If the note is already in the list, override it with the new value\n\t\t\t\t\tparams.key.accidentals[j].acc = multilineVars.key.explicitAccidentals[i].acc;\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found)\n\t\t\t\tparams.key.accidentals.push(multilineVars.key.explicitAccidentals[i]);\n\t\t}\n\t}\n\tmultilineVars.targetKey = params.key;\n\tif (params.key.explicitAccidentals)\n\t\tdelete params.key.explicitAccidentals;\n\tparseKeyVoice.addPosToKey(params.clef, params.key);\n\tif (multilineVars.meter !== null) {\n\t\tif (multilineVars.currentVoice) {\n\t\t\tmultilineVars.staves.forEach(function(st) {\n\t\t\t\tst.meter = multilineVars.meter;\n\t\t\t});\n\t\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t\t} else\n\t\t\tparams.meter = multilineVars.meter;\n\t\tmultilineVars.meter = null;\n\t} else if (multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].meter) {\n\t\t// Make sure that each voice gets the meter marking.\n\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t}\n\tif (multilineVars.currentVoice && multilineVars.currentVoice.name)\n\t\tparams.name = multilineVars.currentVoice.name;\n\tif (multilineVars.vocalfont)\n\t\tparams.vocalfont = multilineVars.vocalfont;\n\tif (multilineVars.tripletfont)\n\t\tparams.tripletfont = multilineVars.tripletfont;\n\tif (multilineVars.gchordfont)\n\t\tparams.gchordfont = multilineVars.gchordfont;\n\tif (multilineVars.style)\n\t\tparams.style = multilineVars.style;\n\tif (multilineVars.currentVoice) {\n\t\tvar staff = multilineVars.staves[multilineVars.currentVoice.staffNum];\n\t\tif (staff.brace) params.brace = staff.brace;\n\t\tif (staff.bracket) params.bracket = staff.bracket;\n\t\tif (staff.connectBarLines) params.connectBarLines = staff.connectBarLines;\n\t\tif (staff.name) params.name = staff.name[multilineVars.currentVoice.index];\n\t\tif (staff.subname) params.subname = staff.subname[multilineVars.currentVoice.index];\n\t\tif (multilineVars.currentVoice.stem)\n\t\t\tparams.stem = multilineVars.currentVoice.stem;\n\t\tif (multilineVars.currentVoice.stafflines)\n\t\t\tparams.stafflines = multilineVars.currentVoice.stafflines;\n\t\tif (multilineVars.currentVoice.staffscale)\n\t\t\tparams.staffscale = multilineVars.currentVoice.staffscale;\n\t\tif (multilineVars.currentVoice.scale)\n\t\t\tparams.scale = multilineVars.currentVoice.scale;\n\t\tif (multilineVars.currentVoice.color)\n\t\t\tparams.color = multilineVars.currentVoice.color;\n\t\tif (multilineVars.currentVoice.style)\n\t\t\tparams.style = multilineVars.currentVoice.style;\n\t\tif (multilineVars.currentVoice.transpose)\n\t\t\tparams.clef.transpose = multilineVars.currentVoice.transpose;\n\t\tparams.currentVoice = multilineVars.currentVoice\n\t\tvar voices = Object.keys(multilineVars.voices)\n\t\tfor (var mv = 0; mv < voices.length; mv++) {\n\t\t\tif (params.currentVoice.staffNum === multilineVars.voices[voices[mv]].staffNum && params.currentVoice.index === multilineVars.voices[voices[mv]].index)\n\t\t\t\tparams.currentVoiceName = voices[mv]\n\t\t}\n\t}\n\tif (multilineVars.barNumbers === 0 && isFirstVoice() && multilineVars.currBarNumber !== 1)\n\t\tparams.barNumber = multilineVars.currBarNumber;\n\ttuneBuilder.startNewLine(params);\n\tif (multilineVars.key.impliedNaturals)\n\t\tdelete multilineVars.key.impliedNaturals;\n\n\tmultilineVars.partForNextLine = {};\n\tif (multilineVars.tempoForNextLine.length === 4)\n\t\ttuneBuilder.appendElement(multilineVars.tempoForNextLine[0],multilineVars.tempoForNextLine[1],multilineVars.tempoForNextLine[2],multilineVars.tempoForNextLine[3]);\n\tmultilineVars.tempoForNextLine = [];\n}\n\n// TODO-PER: make this a method in el.\nvar addEndBeam = function(el) {\n\tif (el.duration !== undefined && el.duration < 0.25)\n\t\tel.end_beam = true;\n\treturn el;\n};\n\nvar getCoreNote = function(line, index, el, canHaveBrokenRhythm) {\n\t//var el = { startChar: index };\n\tvar isComplete = function(state) {\n\t\treturn (state === 'octave' || state === 'duration' || state === 'Zduration' || state === 'broken_rhythm' || state === 'end_slur');\n\t};\n\tvar dottedTie;\n\tif (line[index] === '.' && line[index+1] === '-') {\n\t\tdottedTie = true;\n\t\tindex++;\n\t}\n\tvar state = 'startSlur';\n\tvar durationSetByPreviousNote = false;\n\twhile (1) {\n\t\tswitch(line[index]) {\n\t\t\tcase '(':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tif (el.startSlur === undefined) el.startSlur = 1; else el.startSlur++;\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ')':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '^':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'sharp';state = 'sharp2';}\n\t\t\t\telse if (state === 'sharp2') {el.accidental = 'dblsharp';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '_':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'flat';state = 'flat2';}\n\t\t\t\telse if (state === 'flat2') {el.accidental = 'dblflat';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '=':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'natural';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\t\tif (state === 'startSlur' || state === 'sharp2' || state === 'flat2' || state === 'pitch') {\n\t\t\t\t\tel.pitch = pitches[line[index]];\n\t\t\t\t\tel.pitch += 7 * (multilineVars.currentVoice && multilineVars.currentVoice.octave !== undefined ? multilineVars.currentVoice.octave : multilineVars.octave);\n\t\t\t\t\tel.name = line[index];\n\t\t\t\t\tif (el.accidental)\n\t\t\t\t\t\tel.name = accMap[el.accidental] + el.name;\n\t\t\t\t\ttranspose.note(multilineVars, el);\n\t\t\t\t\tstate = 'octave';\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t} else\n\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t// If the clef is percussion, there is probably some translation of the pitch to a particular drum kit item.\n\t\t\t\t\tif ((multilineVars.clef && multilineVars.clef.type === \"perc\") ||\n\t\t\t\t\t\t(multilineVars.currentVoice && multilineVars.currentVoice.clef === \"perc\")) {\n\t\t\t\t\t\tvar key = line[index];\n\t\t\t\t\t\tif (el.accidental) {\n\t\t\t\t\t\t\tkey = accMap[el.accidental] + key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tune.formatting && tune.formatting.midi && tune.formatting.midi.drummap)\n\t\t\t\t\t\tel.midipitch = tune.formatting.midi.drummap[key];\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ',':\n\t\t\t\tif (state === 'octave') {el.pitch -= 7; el.name += ','; }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '\\'':\n\t\t\t\tif (state === 'octave') {el.pitch += 7; el.name += \"'\";  }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'y':\n\t\t\tcase 'z':\n\t\t\tcase 'Z':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tel.rest = { type: rests[line[index]] };\n\t\t\t\t\t// There shouldn't be some of the properties that notes have. If some sneak in due to bad syntax in the abc file,\n\t\t\t\t\t// just nix them here.\n\t\t\t\t\tdelete el.accidental;\n\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\tdelete el.startTie;\n\t\t\t\t\tdelete el.endSlur;\n\t\t\t\t\tdelete el.endTie;\n\t\t\t\t\tdelete el.end_beam;\n\t\t\t\t\tdelete el.grace_notes;\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (el.rest.type.indexOf('multimeasure') >= 0) {\n\t\t\t\t\t\tel.duration = tune.getBarLength();\n\t\t\t\t\t\tel.rest.text = 1;\n\t\t\t\t\t\tstate = 'Zduration';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t\tstate = 'duration';\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\tcase '0':\n\t\t\tcase '/':\n\t\t\t\tif (state === 'octave' || state === 'duration') {\n\t\t\t\t\tvar fraction = tokenizer.getFraction(line, index);\n\t\t\t\t\t//if (!durationSetByPreviousNote)\n\t\t\t\t\tel.duration = el.duration * fraction.value;\n\t\t\t\t\t// TODO-PER: We can test the returned duration here and give a warning if it isn't the one expected.\n\t\t\t\t\tel.endChar = fraction.index;\n\t\t\t\t\twhile (fraction.index < line.length && (tokenizer.isWhiteSpace(line[fraction.index]) || line[fraction.index] === '-')) {\n\t\t\t\t\t\tif (line[fraction.index] === '-')\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel = addEndBeam(el);\n\t\t\t\t\t\tfraction.index++;\n\t\t\t\t\t}\n\t\t\t\t\tindex = fraction.index-1;\n\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t} else if (state === 'sharp2') {\n\t\t\t\t\tel.accidental = 'quartersharp';state = 'pitch';\n\t\t\t\t} else if (state === 'flat2') {\n\t\t\t\t\tel.accidental = 'quarterflat';state = 'pitch';\n\t\t\t\t} else if (state === 'Zduration') {\n\t\t\t\t\tvar num = tokenizer.getNumber(line, index);\n\t\t\t\t\tel.duration = num.num * tune.getBarLength();\n\t\t\t\t\tel.rest.text = num.num;\n\t\t\t\t\tel.endChar = num.index;\n\t\t\t\t\treturn el;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\t// This is the first character, so it must have been meant for the previous note. Correct that here.\n\t\t\t\t\ttuneBuilder.addTieToLastNote(dottedTie);\n\t\t\t\t\tel.endTie = true;\n\t\t\t\t} else if (state === 'octave' || state === 'duration' || state === 'end_slur') {\n\t\t\t\t\tel.startTie = {};\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm)\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Peek ahead to the next character. If it is a space, then we have an end beam.\n\t\t\t\t\t\tif (tokenizer.isWhiteSpace(line[index + 1]))\n\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\tel.endChar = index+1;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else if (state === 'broken_rhythm') {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ' ':\n\t\t\tcase '\\t':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t// look ahead to see if there is a tie\n\t\t\t\t\tdottedTie = false;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (line[index] === '.' && line[index+1] === '-') {\n\t\t\t\t\t\t\tdottedTie = true;\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (line[index] === '-') {\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\t\tif (dottedTie)\n\t\t\t\t\t\t\t\tel.startTie.style = \"dotted\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} while (index < line.length &&\n\t\t\t\t\t\t(tokenizer.isWhiteSpace(line[index]) || line[index] === '-') ||\n\t\t\t\t\t\t(line[index] === '.' && line[index+1] === '-'));\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm && (line[index] === '<' || line[index] === '>')) {\t// TODO-PER: Don't need the test for < and >, but that makes the endChar work out for the regression test.\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '>':\n\t\t\tcase '<':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (canHaveBrokenRhythm) {\n\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, index);\n\t\t\t\t\t\tindex += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\tel.duration = br2[1]*el.duration;\n\t\t\t\t\t\tstate = 'end_slur';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.endChar = index;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t}\n\t\tindex++;\n\t\tif (index === line.length) {\n\t\t\tif (isComplete(state)) {el.endChar = index;return el;}\n\t\t\telse return null;\n\t\t}\n\t}\n\treturn null;\n};\n\nvar getBrokenRhythm = function(line, index) {\n\tswitch (line[index]) {\n\t\tcase '>':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '>' && line[index + 2] === '>')\t// triple >>>\n\t\t\t\treturn [3, 1.875, 0.125];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '>')\t// double >>\n\t\t\t\treturn [2, 1.75, 0.25];\n\t\t\telse\n\t\t\t\treturn [1, 1.5, 0.5];\n\t\tcase '<':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '<' && line[index + 2] === '<')\t// triple <<<\n\t\t\t\treturn [3, 0.125, 1.875];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '<')\t// double <<\n\t\t\t\treturn [2, 0.25, 1.75];\n\t\t\telse\n\t\t\t\treturn [1, 0.5, 1.5];\n\t}\n\treturn null;\n};\n\nfunction isFirstVoice() {\n\treturn multilineVars.currentVoice === undefined || (multilineVars.currentVoice.staffNum ===  0 && multilineVars.currentVoice.index ===  0);\n}\n\nmodule.exports = MusicParser;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_music.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_parse_settings.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_parse_settings.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports.legalAccents = [\n  'trill',\n  'lowermordent',\n  'uppermordent',\n  'mordent',\n  'pralltriller',\n  'accent',\n  'fermata',\n  'invertedfermata',\n  'tenuto',\n  '0',\n  '1',\n  '2',\n  '3',\n  '4',\n  '5',\n  '+',\n  'wedge',\n  'open',\n  'thumb',\n  'snap',\n  'turn',\n  'roll',\n  'breath',\n  'shortphrase',\n  'mediumphrase',\n  'longphrase',\n  'segno',\n  'coda',\n  'D.S.',\n  'D.C.',\n  'fine',\n  'beambr1',\n  'beambr2',\n  'slide',\n  'marcato',\n  'upbow',\n  'downbow',\n  '/',\n  '//',\n  '///',\n  '////',\n  'trem1',\n  'trem2',\n  'trem3',\n  'trem4',\n  'turnx',\n  'invertedturn',\n  'invertedturnx',\n  'trill(',\n  'trill)',\n  'arpeggio',\n  'xstem',\n  'mark',\n  'umarcato',\n  'style=normal',\n  'style=harmonic',\n  'style=rhythm',\n  'style=x',\n  'style=triangle',\n  'D.C.alcoda',\n  'D.C.alfine',\n  'D.S.alcoda',\n  'D.S.alfine',\n  'editorial',\n  'courtesy'\n];\n\nmodule.exports.volumeDecorations = [\n  'p',\n  'pp',\n  'f',\n  'ff',\n  'mf',\n  'mp',\n  'ppp',\n  'pppp',\n  'fff',\n  'ffff',\n  'sfz'\n];\n\nmodule.exports.dynamicDecorations = [\n  'crescendo(',\n  'crescendo)',\n  'diminuendo(',\n  'diminuendo)',\n  'glissando(',\n  'glissando)',\n  '~(',\n  '~)'\n];\n\nmodule.exports.accentPseudonyms = [\n  ['<', 'accent'],\n  ['>', 'accent'],\n  ['tr', 'trill'],\n  ['plus', '+'],\n  ['emphasis', 'accent'],\n  ['^', 'umarcato'],\n  ['marcato', 'umarcato']\n];\n\nmodule.exports.accentDynamicPseudonyms = [\n  ['<(', 'crescendo('],\n  ['<)', 'crescendo)'],\n  ['>(', 'diminuendo('],\n  ['>)', 'diminuendo)']\n];\n\nmodule.exports.nonDecorations = 'ABCDEFGabcdefgxyzZ[]|^_{'; // use this to prescreen so we don't have to look for a decoration at every note.\n\nmodule.exports.durations = [\n  0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.25, 0.375, 0.4375, 0.46875,\n  0.484375, 0.4921875, 0.125, 0.1875, 0.21875, 0.234375, 0.2421875, 0.24609375,\n  0.0625, 0.09375, 0.109375, 0.1171875, 0.12109375, 0.123046875, 0.03125,\n  0.046875, 0.0546875, 0.05859375, 0.060546875, 0.0615234375, 0.015625,\n  0.0234375, 0.02734375, 0.029296875, 0.0302734375, 0.03076171875\n];\n\nmodule.exports.pitches = {\n  A: 5,\n  B: 6,\n  C: 0,\n  D: 1,\n  E: 2,\n  F: 3,\n  G: 4,\n  a: 12,\n  b: 13,\n  c: 7,\n  d: 8,\n  e: 9,\n  f: 10,\n  g: 11\n};\n\nmodule.exports.rests = {\n  x: 'invisible',\n  X: 'invisible-multimeasure',\n  y: 'spacer',\n  z: 'rest',\n  Z: 'multimeasure'\n};\n\nmodule.exports.accMap = {\n  dblflat: '__',\n  flat: '_',\n  natural: '=',\n  sharp: '^',\n  dblsharp: '^^',\n  quarterflat: '_/',\n  quartersharp: '^/'\n};\n\nmodule.exports.tripletQ = {\n  2: 3,\n  3: 2,\n  4: 3,\n  5: 2, // TODO-PER: not handling 6/8 rhythm yet\n  6: 2,\n  7: 2, // TODO-PER: not handling 6/8 rhythm yet\n  8: 3,\n  9: 2 // TODO-PER: not handling 6/8 rhythm yet\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_parse_settings.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_tokenizer.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_tokenizer.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_tokenizer.js: tokenizes an ABC Music Notation string to support abc_parse.\n\nvar parseCommon = __webpack_require__(/*! ./abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\n\n// this is a series of functions that get a particular element out of the passed stream.\n// the return is the number of characters consumed, so 0 means that the element wasn't found.\n// also returned is the element found. This may be a different length because spaces may be consumed that aren't part of the string.\n// The return structure for most calls is { len: num_chars_consumed, token: str }\nvar Tokenizer = function(lines, multilineVars) {\n\tthis.lineIndex = 0\n\tthis.lines = lines\n\tthis.multilineVars = multilineVars;\n\n\tthis.skipWhiteSpace = function(str) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t  if (!this.isWhiteSpace(str[i]))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn str.length;\t// It must have been all white space\n\t};\n\tvar finished = function(str, i) {\n\t\treturn i >= str.length;\n\t};\n\tthis.eatWhiteSpace = function(line, index) {\n\t\tfor (var i = index; i < line.length; i++) {\n\t\t  if (!this.isWhiteSpace(line[i]))\n\t\t\t\treturn i-index;\n\t\t}\n\t\treturn i-index;\n\t};\n\n\t// This just gets the basic pitch letter, ignoring leading spaces, and normalizing it to a capital\n\tthis.getKeyPitch = function(str) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tswitch (str[i]) {\n\t\t\tcase 'A':return {len: i+1, token: 'A'};\n\t\t\tcase 'B':return {len: i+1, token: 'B'};\n\t\t\tcase 'C':return {len: i+1, token: 'C'};\n\t\t\tcase 'D':return {len: i+1, token: 'D'};\n\t\t\tcase 'E':return {len: i+1, token: 'E'};\n\t\t\tcase 'F':return {len: i+1, token: 'F'};\n\t\t\tcase 'G':return {len: i+1, token: 'G'};\n//\t\t\tcase 'a':return {len: i+1, token: 'A'};\n//\t\t\tcase 'b':return {len: i+1, token: 'B'};\n//\t\t\tcase 'c':return {len: i+1, token: 'C'};\n//\t\t\tcase 'd':return {len: i+1, token: 'D'};\n//\t\t\tcase 'e':return {len: i+1, token: 'E'};\n//\t\t\tcase 'f':return {len: i+1, token: 'F'};\n//\t\t\tcase 'g':return {len: i+1, token: 'G'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// This just gets the basic accidental, ignoring leading spaces, and only the ones that appear in a key\n\tthis.getSharpFlat = function(str) {\n\t\tif (str === 'bass')\n\t\t\treturn {len: 0};\n\t\tswitch (str[0]) {\n\t\t\tcase '#':return {len: 1, token: '#'};\n\t\t\tcase 'b':return {len: 1, token: 'b'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getMode = function(str) {\n\t\tvar skipAlpha = function(str, start) {\n\t\t\t// This returns the index of the next non-alphabetic char, or the entire length of the string if not found.\n\t\t  while (start < str.length && ((str[start] >= 'a' && str[start] <= 'z') || (str[start] >= 'A' && str[start] <= 'Z')))\n\t\t\t\tstart++;\n\t\t\treturn start;\n\t\t};\n\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar firstThree = str.substring(i,i+3).toLowerCase();\n\t\tif (firstThree.length > 1 && firstThree[1] === ' ' || firstThree[1] === '^' || firstThree[1] === '_' || firstThree[1] === '=') firstThree = firstThree[0];\t// This will handle the case of 'm'\n\t\tswitch (firstThree) {\n\t\t\tcase 'mix':return {len: skipAlpha(str, i), token: 'Mix'};\n\t\t\tcase 'dor':return {len: skipAlpha(str, i), token: 'Dor'};\n\t\t\tcase 'phr':return {len: skipAlpha(str, i), token: 'Phr'};\n\t\t\tcase 'lyd':return {len: skipAlpha(str, i), token: 'Lyd'};\n\t\t\tcase 'loc':return {len: skipAlpha(str, i), token: 'Loc'};\n\t\t\tcase 'aeo':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'maj':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'ion':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'min':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'm':return {len: skipAlpha(str, i), token: 'm'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getClef = function(str, bExplicitOnly) {\n\t\tvar strOrig = str;\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\t// The word 'clef' is optional, but if it appears, a clef MUST appear\n\t\tvar needsClef = false;\n\t\tvar strClef = str.substring(i);\n\t\tif (parseCommon.startsWith(strClef, 'clef=')) {\n\t\t\tneedsClef = true;\n\t\t\tstrClef = strClef.substring(5);\n\t\t\ti += 5;\n\t\t}\n\t\tif (strClef.length === 0 && needsClef)\n\t\t\treturn {len: i+5, warn: \"No clef specified: \" + strOrig};\n\n\t\tvar j = this.skipWhiteSpace(strClef);\n\t\tif (finished(strClef, j))\n\t\t\treturn {len: 0};\n\t\tif (j > 0) {\n\t\t\ti += j;\n\t\t\tstrClef = strClef.substring(j);\n\t\t}\n\t\tvar name = null;\n\t\tif (parseCommon.startsWith(strClef, 'treble'))\n\t\t\tname = 'treble';\n\t\telse if (parseCommon.startsWith(strClef, 'bass3'))\n\t\t\tname = 'bass3';\n\t\telse if (parseCommon.startsWith(strClef, 'bass'))\n\t\t\tname = 'bass';\n\t\telse if (parseCommon.startsWith(strClef, 'tenor'))\n\t\t\tname = 'tenor';\n\t\telse if (parseCommon.startsWith(strClef, 'alto2'))\n\t\t\tname = 'alto2';\n\t\telse if (parseCommon.startsWith(strClef, 'alto1'))\n\t\t\tname = 'alto1';\n\t\telse if (parseCommon.startsWith(strClef, 'alto'))\n\t\t\tname = 'alto';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'none')))\n\t\t\tname = 'none';\n\t\telse if (parseCommon.startsWith(strClef, 'perc'))\n\t\t\tname = 'perc';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'C')))\n\t\t\tname = 'tenor';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'F')))\n\t\t\tname = 'bass';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'G')))\n\t\t\tname = 'treble';\n\t\telse\n\t\t\treturn {len: i+5, warn: \"Unknown clef specified: \" + strOrig};\n\n\t\tstrClef = strClef.substring(name.length);\n\t\tj = this.isMatch(strClef, '+8');\n\t\tif (j > 0)\n\t\t\tname += \"+8\";\n\t\telse {\n\t\t\tj = this.isMatch(strClef, '-8');\n\t\t\tif (j > 0)\n\t\t\t\tname += \"-8\";\n\t\t}\n\t\treturn {len: i+name.length, token: name, explicit: needsClef};\n\t};\n\n\t// This returns one of the legal bar lines\n\t// This is called alot and there is no obvious tokenable items, so this is broken apart.\n\tthis.getBarLine = function(line, i) {\n\t\tswitch (line[i]) {\n\t\t\tcase ']':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase '|': return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\tcase '[':\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\t\treturn {len: 2, token: \"bar_invisible\"};\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ':':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ':': return {len: 2, token: \"bar_dbl_repeat\"};\n\t\t\t\t\tcase '|':\t// :|\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\tcase ']':\t// :|]\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\tcase '|':\t// :|]|\n\t\t\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\t\t\tif (line[i] === ':')  return {len: 5, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase '|':\t// :||\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tif (line[i] === ':')  return {len: 4, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn {len: 2, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '[':\t// [\n\t\t\t\t++i;\n\t\t\t\tif (line[i] === '|') {\t// [|\n\t\t\t\t\t++i;\n\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\tcase ':': return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\tcase ']': return {len: 3, token: \"bar_invisible\"};\n\t\t\t\t\t\tdefault: return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t\treturn {len: 0};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '|':\t// |\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ']': return {len: 2, token: \"bar_thin_thick\"};\n\t\t\t\t\tcase '|': // ||\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif (line[i] === ':') return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\treturn {len: 2, token: \"bar_thin_thin\"};\n\t\t\t\t\tcase ':':\t// |:\n\t\t\t\t\t\tvar colons = 0;\n\t\t\t\t\t\twhile (line[i+colons] === ':') colons++;\n\t\t\t\t\t\treturn { len: 1+colons, token: \"bar_left_repeat\"};\n\t\t\t\t\tdefault: return {len: 1, token: \"bar_thin\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// this returns all the characters in the string that match one of the characters in the legalChars string\n\tthis.getTokenOf = function(str, legalChars) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (legalChars.indexOf(str[i]) < 0)\n\t\t\t\treturn {len: i, token: str.substring(0, i)};\n\t\t}\n\t\treturn {len: i, token: str};\n\t};\n\n\tthis.getToken = function(str, start, end) {\n\t\t// This returns the next set of chars that doesn't contain spaces\n\t\tvar i = start;\n\t\twhile (i < end && !this.isWhiteSpace(str[i]))\n\t\t\ti++;\n\t\treturn str.substring(start, i);\n\t};\n\n\t// This just sees if the next token is the word passed in, with possible leading spaces\n\tthis.isMatch = function(str, match) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn 0;\n\t\tif (parseCommon.startsWith(str.substring(i), match))\n\t\t\treturn i+match.length;\n\t\treturn 0;\n\t};\n\n\tthis.getPitchFromTokens = function(tokens) {\n\t\tvar ret = { };\n\t\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\t\tret.position = pitches[tokens[0].token];\n\t\tif (ret.position === undefined)\n\t\t\treturn { warn: \"Pitch expected. Found: \" + tokens[0].token };\n\t\ttokens.shift();\n\t\twhile (tokens.length) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase ',': ret.position -= 7; tokens.shift(); break;\n\t\t\t\tcase '\\'': ret.position += 7; tokens.shift(); break;\n\t\t\t\tdefault: return ret;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tthis.getKeyAccidentals2 = function(tokens) {\n\t\tvar accs;\n\t\t// find and strip off all accidentals in the token list\n\t\twhile (tokens.length > 0) {\n\t\t\tvar acc;\n\t\t\tif (tokens[0].token === '^') {\n\t\t\t\tacc = 'sharp';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '^': acc = 'dblsharp'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quartersharp'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else if (tokens[0].token === '=') {\n\t\t\t\tacc = 'natural';\n\t\t\t\ttokens.shift();\n\t\t\t} else if (tokens[0].token === '_') {\n\t\t\t\tacc = 'flat';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '_': acc = 'dblflat'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quarterflat'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Not an accidental, we'll assume that a later parse will recognize it.\n\t\t\t\treturn { accs: accs };\n\t\t\t}\n\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\tswitch (tokens[0].token[0])\n\t\t\t{\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\t\tif (accs === undefined)\n\t\t\t\t\t\taccs = [];\n\t\t\t\t\taccs.push({ acc: acc, note: tokens[0].token[0] });\n\t\t\t\t\tif (tokens[0].token.length === 1)\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {accs: accs, warn: 'Expected note name after ' + acc + ' Found: ' + tokens[0].token };\n\t\t\t}\n\t\t}\n\t\treturn { accs: accs };\n\t};\n\n\t// This gets an accidental marking for the key signature. It has the accidental then the pitch letter.\n\tthis.getKeyAccidental = function(str) {\n\t\tvar accTranslation = {\n\t\t\t'^': 'sharp',\n\t\t\t'^^': 'dblsharp',\n\t\t\t'=': 'natural',\n\t\t\t'_': 'flat',\n\t\t\t'__': 'dblflat',\n\t\t\t'_/': 'quarterflat',\n\t\t\t'^/': 'quartersharp'\n\t\t};\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar acc = null;\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '=':\n\t\t\t\tacc = str[i];\n\t\t\t\tbreak;\n\t\t\tdefault:return {len: 0};\n\t\t}\n\t\ti++;\n\t\tif (finished(str, i))\n\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '/':\n\t\t\t\tacc += str[i];\n\t\t\t\ti++;\n\t\t\t\tif (finished(str, i))\n\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\tswitch (str[i])\n\t\t\t\t{\n\t\t\t\t\tcase 'a':\n\t\t\t\t\tcase 'b':\n\t\t\t\t\tcase 'c':\n\t\t\t\t\tcase 'd':\n\t\t\t\t\tcase 'e':\n\t\t\t\t\tcase 'f':\n\t\t\t\t\tcase 'g':\n\t\t\t\t\tcase 'A':\n\t\t\t\t\tcase 'B':\n\t\t\t\t\tcase 'C':\n\t\t\t\t\tcase 'D':\n\t\t\t\t\tcase 'E':\n\t\t\t\t\tcase 'F':\n\t\t\t\t\tcase 'G':\n\t\t\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\t}\n\t};\n\n\tthis.isWhiteSpace = function(ch) {\n\t\treturn ch === ' ' || ch === '\\t' || ch === '\\x12';\n\t};\n\n\tthis.getMeat = function(line, start, end) {\n\t\t// This removes any comments starting with '%' and trims the ends of the string so that there are no leading or trailing spaces.\n\t\t// it returns just the start and end characters that contain the meat.\n\t\tvar comment = line.indexOf('%', start);\n\t\tif (comment >= 0 && comment < end)\n\t\t\tend = comment;\n\t\twhile (start < end && (line[start] === ' ' || line[start] === '\\t' || line[start] === '\\x12'))\n\t\t\tstart++;\n\t\twhile (start < end && (line[end-1] === ' ' || line[end-1] === '\\t' || line[end-1] === '\\x12'))\n\t\t\tend--;\n\t\treturn {start: start, end: end};\n\t};\n\n\tvar isLetter = function(ch) {\n\t\treturn (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n\t};\n\n\tvar isNumber = function(ch) {\n\t\treturn (ch >= '0' && ch <= '9');\n\t};\n\n\tthis.tokenize = function(line, start, end, alphaUntilWhiteSpace) {\n\t\t// this returns all the tokens inside the passed string. A token is a punctuation mark, a string of digits, a string of letters.\n\t\t//  Quoted strings are one token.\n\t\t//  If there is a minus sign next to a number, then it is included in the number.\n\t\t// If there is a period immediately after a number, with a number immediately following, then a float is returned.\n\t\t// The type of token is returned: quote, alpha, number, punct\n\t\t// If alphaUntilWhiteSpace is true, then the behavior of the alpha token changes.\n\n\t\tvar ret = this.getMeat(line, start, end);\n\t\tstart = ret.start;\n\t\tend = ret.end;\n\t\tvar tokens = [];\n\t\tvar i;\n\t\twhile (start < end) {\n\t\t\tif (line[start] === '\"') {\n\t\t\t\ti = start+1;\n\t\t\t\twhile (i < end && line[i] !== '\"') i++;\n\t\t\t\ttokens.push({ type: 'quote', token: line.substring(start+1, i), start: start+1, end: i});\n\t\t\t\ti++;\n\t\t\t} else if (isLetter(line[start])) {\n\t\t\t\ti = start+1;\n\t\t\t\tif (alphaUntilWhiteSpace)\n\t\t\t\t\twhile (i < end && !this.isWhiteSpace(line[i])) i++;\n\t\t\t\telse\n\t\t\t\t\twhile (i < end && isLetter(line[i])) i++;\n\t\t\t\ttokens.push({ type: 'alpha', token: line.substring(start, i), continueId: isNumber(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === '.' && isNumber(line[i+1])) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar int2 = null;\n\t\t\t\tvar float2 = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\n\t\t\t\tfloat2 = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: int2, floatt: float2, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (isNumber(line[start]) || (line[start] === '-' && isNumber(line[i+1]))) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar intt = null;\n\t\t\t\tvar floatt = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\tif (line[i] === '.' && isNumber(line[i+1])) {\n\t\t\t\t\ti++;\n\t\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\t} else\n\t\t\t\t\tintt = parseInt(line.substring(start, i));\n\n\t\t\t\tfloatt = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: intt, floatt: floatt, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === ' ' || line[start] === '\\t') {\n\t\t\t\ti = start+1;\n\t\t\t} else {\n\t\t\t\ttokens.push({ type: 'punct', token: line[start], start: start, end: start+1});\n\t\t\t\ti = start+1;\n\t\t\t}\n\t\t\tstart = i;\n\t\t}\n\t\treturn tokens;\n\t};\n\n\tthis.getVoiceToken = function(line, start, end) {\n\t\t// This finds the next token. A token is delimited by a space or an equal sign. If it starts with a quote, then the portion between the quotes is returned.\n\t\tvar i = start;\n\t\twhile (i < end && this.isWhiteSpace(line[i]) || line[i] === '=')\n\t\t\ti++;\n\n\t\tif (line[i] === '\"') {\n\t\t\tvar close = line.indexOf('\"', i+1);\n\t\t\tif (close === -1 || close >= end)\n\t\t\t\treturn {len: 1, err: \"Missing close quote\"};\n\t\t\treturn {len: close-start+1, token: this.translateString(line.substring(i+1, close))};\n\t\t} else {\n\t\t\tvar ii = i;\n\t\t\twhile (ii < end && !this.isWhiteSpace(line[ii]) && line[ii] !== '=')\n\t\t\t\tii++;\n\t\t\treturn {len: ii-start+1, token: line.substring(i, ii)};\n\t\t}\n\t};\n\n\tvar charMap = {\n\t\t\"`a\": 'à', \"'a\": \"á\", \"^a\": \"â\", \"~a\": \"ã\", \"\\\"a\": \"ä\", \"oa\": \"å\", \"aa\": \"å\", \"=a\": \"ā\", \"ua\": \"ă\", \";a\": \"ą\",\n\t\t\"`e\": 'è', \"'e\": \"é\", \"^e\": \"ê\", \"\\\"e\": \"ë\", \"=e\": \"ē\", \"ue\": \"ĕ\", \";e\": \"ę\", \".e\": \"ė\",\n\t\t\"`i\": 'ì', \"'i\": \"í\", \"^i\": \"î\", \"\\\"i\": \"ï\", \"=i\": \"ī\", \"ui\": \"ĭ\", \";i\": \"į\",\n\t\t\"`o\": 'ò', \"'o\": \"ó\", \"^o\": \"ô\", \"~o\": \"õ\", \"\\\"o\": \"ö\", \"=o\": \"ō\", \"uo\": \"ŏ\", \"/o\": \"ø\",\n\t\t\"`u\": 'ù', \"'u\": \"ú\", \"^u\": \"û\", \"~u\": \"ũ\", \"\\\"u\": \"ü\", \"ou\": \"ů\", \"=u\": \"ū\", \"uu\": \"ŭ\", \";u\": \"ų\",\n\t\t\"`A\": 'À', \"'A\": \"Á\", \"^A\": \"Â\", \"~A\": \"Ã\", \"\\\"A\": \"Ä\", \"oA\": \"Å\", \"AA\": \"Å\", \"=A\": \"Ā\", \"uA\": \"Ă\", \";A\": \"Ą\",\n\t\t\"`E\": 'È', \"'E\": \"É\", \"^E\": \"Ê\", \"\\\"E\": \"Ë\", \"=E\": \"Ē\", \"uE\": \"Ĕ\", \";E\": \"Ę\", \".E\": \"Ė\",\n\t\t\"`I\": 'Ì', \"'I\": \"Í\", \"^I\": \"Î\", \"~I\": \"Ĩ\", \"\\\"I\": \"Ï\", \"=I\": \"Ī\", \"uI\": \"Ĭ\", \";I\": \"Į\", \".I\": \"İ\",\n\t\t\"`O\": 'Ò', \"'O\": \"Ó\", \"^O\": \"Ô\", \"~O\": \"Õ\", \"\\\"O\": \"Ö\", \"=O\": \"Ō\", \"uO\": \"Ŏ\", \"/O\": \"Ø\",\n\t\t\"`U\": 'Ù', \"'U\": \"Ú\", \"^U\": \"Û\", \"~U\": \"Ũ\", \"\\\"U\": \"Ü\", \"oU\": \"Ů\", \"=U\": \"Ū\", \"uU\": \"Ŭ\", \";U\": \"Ų\",\n\t\t\"ae\": \"æ\", \"AE\": \"Æ\", \"oe\": \"œ\", \"OE\": \"Œ\", \"ss\": \"ß\",\n\t\t\"'c\": \"ć\", \"^c\": \"ĉ\", \"uc\": \"č\", \"cc\": \"ç\", \".c\": \"ċ\", \"cC\": \"Ç\", \"'C\": \"Ć\", \"^C\": \"Ĉ\", \"uC\": \"Č\", \".C\": \"Ċ\",\n\t\t\"~N\": \"Ñ\", \"~n\": \"ñ\",\n\t\t\"=s\": \"š\", \"vs\": \"š\",\n\t\t\"DH\": \"Ð\", \"dh\": \"ð\",\n\t\t\"HO\": \"Ő\", \"Ho\": \"ő\", \"HU\": \"Ű\", \"Hu\": \"ű\",\n\t\t\"'Y\": \"Ý\", \"'y\": \"ý\", \"^Y\": \"Ŷ\", \"^y\": \"ŷ\", \"\\\"Y\": \"Ÿ\", \"\\\"y\": \"ÿ\",\n\t\t\"vS\": \"Š\", \"vZ\": \"Ž\", \"vz\": 'ž'\n\n// More chars: Ĳ ĳ Ď ď Đ đ Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ŉ Ŋ ŋ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š Ţ ţ Ť ť Ŧ ŧ Ŵ ŵ Ź ź Ż ż Ž\n\t};\n\tvar charMap1 = {\n\t\t\"#\": \"♯\",\n\t\t\"b\": \"♭\",\n\t\t\"=\": \"♮\"\n\t};\n\tvar charMap2 = {\n\t\t\"201\": \"♯\",\n\t\t\"202\": \"♭\",\n\t\t\"203\": \"♮\",\n\t\t\"241\": \"¡\",\n\t\t\"242\": \"¢\", \"252\": \"a\", \"262\": \"2\", \"272\": \"o\", \"302\": \"Â\", \"312\": \"Ê\", \"322\": \"Ò\", \"332\": \"Ú\", \"342\": \"â\", \"352\": \"ê\", \"362\": \"ò\", \"372\": \"ú\",\n\t\t\"243\": \"£\", \"253\": \"«\", \"263\": \"3\", \"273\": \"»\", \"303\": \"Ã\", \"313\": \"Ë\", \"323\": \"Ó\", \"333\": \"Û\", \"343\": \"ã\", \"353\": \"ë\", \"363\": \"ó\", \"373\": \"û\",\n\t\t\"244\": \"¤\", \"254\": \"¬\", \"264\": \"  ́\", \"274\": \"1⁄4\", \"304\": \"Ä\", \"314\": \"Ì\", \"324\": \"Ô\", \"334\": \"Ü\", \"344\": \"ä\", \"354\": \"ì\", \"364\": \"ô\", \"374\": \"ü\",\n\t\t\"245\": \"¥\", \"255\": \"-\", \"265\": \"μ\", \"275\": \"1⁄2\", \"305\": \"Å\", \"315\": \"Í\", \"325\": \"Õ\", \"335\": \"Ý\",  \"345\": \"å\", \"355\": \"í\", \"365\": \"õ\", \"375\": \"ý\",\n\t\t\"246\": \"¦\", \"256\": \"®\", \"266\": \"¶\", \"276\": \"3⁄4\", \"306\": \"Æ\", \"316\": \"Î\", \"326\": \"Ö\", \"336\": \"Þ\", \"346\": \"æ\", \"356\": \"î\", \"366\": \"ö\", \"376\": \"þ\",\n\t\t\"247\": \"§\", \"257\": \" ̄\", \"267\": \"·\", \"277\": \"¿\", \"307\": \"Ç\", \"317\": \"Ï\", \"327\": \"×\", \"337\": \"ß\", \"347\": \"ç\", \"357\": \"ï\", \"367\": \"÷\", \"377\": \"ÿ\",\n\t\t\"250\": \" ̈\", \"260\": \"°\", \"270\": \" ̧\", \"300\": \"À\", \"310\": \"È\", \"320\": \"Ð\", \"330\": \"Ø\", \"340\": \"à\", \"350\": \"è\", \"360\": \"ð\", \"370\": \"ø\",\n\t\t\"251\": \"©\", \"261\": \"±\", \"271\": \"1\", \"301\": \"Á\", \"311\": \"É\", \"321\": \"Ñ\", \"331\": \"Ù\", \"341\": \"á\", \"351\": \"é\", \"361\": \"ñ\", \"371\": \"ù\" };\n\tthis.translateString = function(str) {\n\t\tvar arr = str.split('\\\\');\n\t\tif (arr.length === 1) return str;\n\t\tvar out = null;\n\t\tarr.forEach(function(s) {\n\t\t\tif (out === null)\n\t\t\t\tout = s;\n\t\t\telse {\n\t\t\t\tvar c = charMap[s.substring(0, 2)];\n\t\t\t\tif (c !== undefined)\n\t\t\t\t\tout += c + s.substring(2);\n\t\t\t\telse {\n\t\t\t\t\tc = charMap2[s.substring(0, 3)];\n\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\tout += c + s.substring(3);\n\t\t\t\t\telse {\n\t\t\t\t\t\tc = charMap1[s.substring(0, 1)];\n\t\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\t\tout += c + s.substring(1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tout += \"\\\\\" + s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn out;\n\t};\n\tthis.getNumber = function(line, index) {\n\t\tvar num = 0;\n\t\twhile (index < line.length) {\n\t\t\tswitch (line[index]) {\n\t\t\t\tcase '0':num = num*10;index++;break;\n\t\t\t\tcase '1':num = num*10+1;index++;break;\n\t\t\t\tcase '2':num = num*10+2;index++;break;\n\t\t\t\tcase '3':num = num*10+3;index++;break;\n\t\t\t\tcase '4':num = num*10+4;index++;break;\n\t\t\t\tcase '5':num = num*10+5;index++;break;\n\t\t\t\tcase '6':num = num*10+6;index++;break;\n\t\t\t\tcase '7':num = num*10+7;index++;break;\n\t\t\t\tcase '8':num = num*10+8;index++;break;\n\t\t\t\tcase '9':num = num*10+9;index++;break;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {num: num, index: index};\n\t\t\t}\n\t\t}\n\t\treturn {num: num, index: index};\n\t};\n\n\tthis.getFraction = function(line, index) {\n\t\tvar num = 1;\n\t\tvar den = 1;\n\t\tif (line[index] !== '/') {\n\t\t\tvar ret = this.getNumber(line, index);\n\t\t\tnum = ret.num;\n\t\t\tindex = ret.index;\n\t\t}\n\t\tif (line[index] === '/') {\n\t\t\tindex++;\n\t\t\tif (line[index] === '/') {\n\t\t\t\tvar div = 0.5;\n\t\t\t\twhile (line[index++] === '/')\n\t\t\t\t\tdiv = div /2;\n\t\t\t\treturn {value: num * div, index: index-1};\n\t\t\t} else {\n\t\t\t\tvar iSave = index;\n\t\t\t\tvar ret2 = this.getNumber(line, index);\n\t\t\t\tif (ret2.num === 0 && iSave === index)\t// If we didn't use any characters, it is an implied 2\n\t\t\t\t\tret2.num = 2;\n\t\t\t\tif (ret2.num !== 0)\n\t\t\t\t\tden = ret2.num;\n\t\t\t\tindex = ret2.index;\n\t\t\t}\n\t\t}\n\n\t\treturn {value: num/den, index: index};\n\t};\n\n//\n// MAE 10 Jan 2023 - For better handling of tunes that have tune numbers in front of them.\n//\n// Previous version would take:\n// 21. Woman of the House, The\n// and return:\n// The 21. Woman of the House\n// \n// This fix results in:\n// 21. The Woman of the House\n//\n// Also added additional checks and handlers for lower case \", the\" and \", a\" since I found several tune collections with those tune name constructs\n//\n// Find an optional title number at the start of a tune title\nfunction getTitleNumber(str){\n\n  const regex = /^(\\d+)\\./;\n\n  // Use the exec method to search for the pattern in the string\n  const match = regex.exec(str);\n\n  // Check if a match is found\n  if (match) {\n\n\t// The matched number is captured in the first group (index 1)\n\tconst foundNumber = match[1];\n\treturn foundNumber;\n\n  } else {\n\n\t// Return null if no match is found\n\treturn null;\n\t\n  }\n\n}\n\nvar thePatterns = [\n\t{ match: /,\\s*[Tt]he$/, replace: \"The \" },\n\t{ match: /,\\s*[Aa]$/, replace: \"A \" },\n\t{ match: /,\\s*[Aa]n$/, replace: \"An \" },\n]\n\nthis.theReverser = function (str) {\n\n    for (var i = 0; i < thePatterns.length; i++) {\n\t\tvar thisPattern = thePatterns[i]\n\t\tvar match = str.match(thisPattern.match)\n\t\tif (match) {\n\t\t\tvar theTitleNumber = getTitleNumber(str);\n\t\t\tif (theTitleNumber){\n\t\t\n\t\t\t  //console.log(\"theReverser The titlenumber:\"+theTitleNumber); \n\t\t\n\t\t\t  str = str.replace(theTitleNumber+\".\",\"\");\n\t\t\t  str = str.trim();\n\t\t\t}\n\t\t\tvar len = match[0].length\n\t\t\tvar result = thisPattern.replace + str.substring(0, str.length - len);\n\t\t\n\t\t\tif (theTitleNumber){\n\t\t\t  result = theTitleNumber+\". \"+result;\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\n\t\t}\n\t}\n\n    return str;\n\n  };\n\n\tthis.stripComment = function(str) {\n\t\tvar i = str.indexOf('%');\n\t\tif (i >= 0)\n\t\t\treturn parseCommon.strip(str.substring(0, i));\n\t\treturn parseCommon.strip(str);\n\t};\n\n\tthis.getInt = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseInt(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getFloat = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseFloat(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getMeasurement = function(tokens) {\n\t\tif (tokens.length === 0) return { used: 0 };\n\t\tvar used = 1;\n\t\tvar num = '';\n\t\tif (tokens[0].token === '-') {\n\t\t\ttokens.shift();\n\t\t\tnum = '-';\n\t\t\tused++;\n\t\t}\n\t\telse if (tokens[0].type !== 'number') return { used: 0 };\n\t\tnum += tokens.shift().token;\n\t\tif (tokens.length === 0) return { used: 1, value: parseInt(num) };\n\t\tvar x = tokens.shift();\n\t\tif (x.token === '.') {\n\t\t\tused++;\n\t\t\tif (tokens.length === 0) return { used: used, value: parseInt(num) };\n\t\t\tif (tokens[0].type === 'number') {\n\t\t\t\tx = tokens.shift();\n\t\t\t\tnum = num + '.' + x.token;\n\t\t\t\tused++;\n\t\t\t\tif (tokens.length === 0) return { used: used, value: parseFloat(num) };\n\t\t\t}\n\t\t\tx = tokens.shift();\n\t\t}\n\t\tswitch (x.token) {\n\t\t\tcase 'pt': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'px': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'cm': return { used: used+1, value: parseFloat(num)/2.54*72 };\n\t\t\tcase 'in': return { used: used+1, value: parseFloat(num)*72 };\n\t\t\tdefault: tokens.unshift(x); return { used: used, value: parseFloat(num) };\n\t\t}\n\t};\n\tvar substInChord = function(str) {\n\t\tstr = str.replace(/\\\\n/g, \"\\n\");\n\t\tstr = str.replace(/\\\\\"/g, '\"');\n\t\treturn str;\n\t};\n\tthis.getBrackettedSubstring = function(line, i, maxErrorChars, _matchChar)\n\t{\n\t\t// This extracts the sub string by looking at the first character and searching for that\n\t\t// character later in the line (or search for the optional _matchChar).\n\t\t// For instance, if the first character is a quote it will look for\n\t\t// the end quote. If the end of the line is reached, then only up to the default number\n\t\t// of characters are returned, so that a missing end quote won't eat up the entire line.\n\t\t// It returns the substring and the number of characters consumed.\n\t\t// The number of characters consumed is normally two more than the size of the substring,\n\t\t// but in the error case it might not be.\n\t\tvar matchChar = _matchChar || line[i];\n\t\tvar pos = i+1;\n\t\tvar esc = false;\n\t\twhile ((pos < line.length) && (esc || line[pos] !== matchChar)) {\n\t\t\tesc = line[pos] === '\\\\';\n\t\t\t++pos;\n\t\t}\n\t\tif (line[pos] === matchChar)\n\t\t\treturn [pos-i+1,substInChord(line.substring(i+1, pos)), true];\n\t\telse\t// we hit the end of line, so we'll just pick an arbitrary num of chars so the line doesn't disappear.\n\t\t{\n\t\t\tpos = i+maxErrorChars;\n\t\t\tif (pos > line.length-1)\n\t\t\t\tpos = line.length-1;\n\t\t\treturn [pos-i+1, substInChord(line.substring(i+1, pos)), false];\n\t\t}\n\t};\n};\n\nTokenizer.prototype.peekLine = function() {\n\treturn this.lines[this.lineIndex]\n}\n\nTokenizer.prototype.nextLine = function() {\n\tif (this.lineIndex > 0) {\n\t\tthis.multilineVars.iChar += this.lines[this.lineIndex-1].length + 1;\n\t}\n\tif (this.lineIndex < this.lines.length) {\n\t\tvar result = this.lines[this.lineIndex]\n\t\tthis.lineIndex++\n\t\treturn result\n\t}\n\treturn null\n}\n\nmodule.exports = Tokenizer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_tokenizer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/abc_transpose.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/parse/abc_transpose.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_transpose.js: Handles the automatic transposition of key signatures, chord symbols, and notes.\n\nvar allNotes = __webpack_require__(/*! ./all-notes */ \"./node_modules/abcjs/src/parse/all-notes.js\");\nvar transposeChordName = __webpack_require__(/*! ../parse/transpose-chord */ \"./node_modules/abcjs/src/parse/transpose-chord.js\")\nvar keyAccidentals = __webpack_require__(/*! ../const/key-accidentals */ \"./node_modules/abcjs/src/const/key-accidentals.js\");\nvar transpose = {};\n\nvar keyIndex = {\n\t'C': 0,\n\t'C#': 1,\n\t'Db': 1,\n\t'D': 2,\n\t'D#': 3,\n\t'Eb': 3,\n\t'E': 4,\n\t'F': 5,\n\t'F#': 6,\n\t'Gb': 6,\n\t'G': 7,\n\t'G#': 8,\n\t'Ab': 8,\n\t'A': 9,\n\t'A#': 10,\n\t'Bb': 10,\n\t'B': 11\n};\nvar newKey = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab', 'A', 'Bb', 'B'];\nvar newKeyMinor = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'Bb', 'B'];\n\ntranspose.keySignature = function(multilineVars, keyName, root, acc, localTranspose) {\n\tif (multilineVars.clef.type === \"perc\" || multilineVars.clef.type === \"none\")\n\t\treturn { accidentals: keyAccidentals(keyName), root: root, acc: acc };\n\tif (!localTranspose) localTranspose = 0;\n\tmultilineVars.localTransposeVerticalMovement = 0;\n\tmultilineVars.localTransposePreferFlats = false;\n\tvar k = keyAccidentals(keyName);\n\tif (!k) return multilineVars.key; // If the key isn't in the list, it is non-standard. We won't attempt to transpose it.\n\tmultilineVars.localTranspose = (multilineVars.globalTranspose ? multilineVars.globalTranspose : 0) + localTranspose;\n\n\tif (!multilineVars.localTranspose)\n\t\treturn { accidentals: k, root: root, acc: acc };\n\tmultilineVars.globalTransposeOrigKeySig = k;\n\tif (multilineVars.localTranspose % 12 === 0) {\n\t\tmultilineVars.localTransposeVerticalMovement = (multilineVars.localTranspose / 12) * 7;\n\t\treturn { accidentals: k, root: root, acc: acc };\n\t}\n\n\tvar baseKey = keyName[0];\n\tif (keyName[1] === 'b' || keyName[1] === '#') {\n\t\tbaseKey += keyName[1];\n\t\tkeyName = keyName.substr(2);\n\t} else\n\t\tkeyName = keyName.substr(1);\n\tvar thisKeyIndex = keyIndex[baseKey]\n\tvar recognized = thisKeyIndex !== undefined\n\tif (!recognized) {\n\t\t// Either the key sig is \"none\" or we don't recognize it. Either way we don't change it, and we assume key of C for the purposes of this calculation.\n\t\tthisKeyIndex = 0\n\t\tbaseKey = \"C\"\n\t\tkeyName = \"\"\n\t}\n\tvar index = thisKeyIndex + multilineVars.localTranspose;\n\twhile (index < 0) index += 12;\n\tif (index > 11) index = index % 12;\n\tvar newKeyName = (keyName[0] === 'm' ? newKeyMinor[index] : newKey[index]);\n\tvar transposedKey = newKeyName + keyName;\n\tvar newKeySig = keyAccidentals(transposedKey);\n\tif (newKeySig.length > 0 && newKeySig[0].acc === 'flat')\n\t\tmultilineVars.localTransposePreferFlats = true;\n\tvar distance = transposedKey.charCodeAt(0) - baseKey.charCodeAt(0);\n\tif (multilineVars.localTranspose > 0) {\n\t\tif (distance < 0)\n\t\t\tdistance += 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is positive (we are raising pitch), and the change is higher (that is, Ab -> A), then raise an octave.\n\t\t\t// This test is easier because we know the keys are not equal (or we wouldn't get this far), so if the base key is a flat key, then\n\t\t\t// the transposed key must be higher. Likewise, if the transposed key is sharp, then the base key must be lower. And one\n\t\t\t// of those two things must be true because they are not both natural.\n\t\t\tif (baseKey[1] === '#' ||  transposedKey[1] === 'b')\n\t\t\t\tdistance += 7;\n\t\t}\n\t} else if (multilineVars.localTranspose < 0) {\n\t\tif (distance > 0)\n\t\t\tdistance -= 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is negative (we are dropping pitch), and the change is lower (that is, A -> Ab), then drop an octave.\n\t\t\tif (baseKey[1] === 'b' ||  transposedKey[1] === '#')\n\t\t\t\tdistance -= 7;\n\t\t}\n\t}\n\n\tif (multilineVars.localTranspose > 0)\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.floor(multilineVars.localTranspose / 12) * 7;\n\telse\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.ceil(multilineVars.localTranspose / 12) * 7;\n\tif (recognized)\n\t\treturn { accidentals: newKeySig, root: newKeyName[0], acc: newKeyName.length > 1 ? newKeyName[1] : \"\" };\n\telse\n\t\treturn { accidentals: [], root: root, acc: acc };\n};\n\ntranspose.chordName = function(multilineVars, chord) {\n\treturn transposeChordName(chord, multilineVars.localTranspose, multilineVars.localTransposePreferFlats, multilineVars.freegchord)\n};\n\nvar pitchToLetter = [ 'c', 'd', 'e', 'f', 'g', 'a', 'b' ];\nfunction accidentalChange(origPitch, newPitch, accidental, origKeySig, newKeySig) {\n\tvar origPitchLetter = pitchToLetter[(origPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar origAccidental = 0;\n\tfor (var i = 0; i < origKeySig.length; i++) {\n\t\tif (origKeySig[i].note.toLowerCase() === origPitchLetter)\n\t\t\torigAccidental = accidentals[origKeySig[i].acc];\n\t}\n\n\tvar currentAccidental = accidentals[accidental];\n\tvar delta = currentAccidental - origAccidental;\n\n\tvar newPitchLetter = pitchToLetter[(newPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar newAccidental = 0;\n\tfor (var j = 0; j < newKeySig.accidentals.length; j++) {\n\t\tif (newKeySig.accidentals[j].note.toLowerCase() === newPitchLetter)\n\t\t\tnewAccidental = accidentals[newKeySig.accidentals[j].acc];\n\t}\n\tvar calcAccidental = delta + newAccidental;\n\tif (calcAccidental < -2) {\n\t\tnewPitch--;\n\t\tcalcAccidental += (newPitchLetter === 'c' || newPitchLetter === 'f') ? 1 : 2;\n\t}\n\tif (calcAccidental > 2) {\n\t\tnewPitch++;\n\t\tcalcAccidental -= (newPitchLetter === 'b' || newPitchLetter === 'e') ? 1 : 2;\n\t}\n\treturn [newPitch, calcAccidental];\n}\n\nvar accidentals = {\n\tdblflat: -2,\n\tflat: -1,\n\tnatural: 0,\n\tsharp: 1,\n\tdblsharp: 2\n};\nvar accidentals2 = {\n\t\"-2\": \"dblflat\",\n\t\"-1\": \"flat\",\n\t\"0\": \"natural\",\n\t\"1\": \"sharp\",\n\t\"2\": \"dblsharp\"\n};\nvar accidentals3 = {\n\t\"-2\": \"__\",\n\t\"-1\": \"_\",\n\t\"0\": \"=\",\n\t\"1\": \"^\",\n\t\"2\": \"^^\"\n};\n//var count = 0\ntranspose.note = function(multilineVars, el) {\n\t// the \"el\" that is passed in has el.name, el.accidental, and el.pitch. \"pitch\" is the vertical position (0=middle C)\n\t// localTranspose is the number of half steps\n\t// localTransposeVerticalMovement is the vertical distance to move.\n\t//console.log(count++,multilineVars.localTranspose, el)\n\tif (!multilineVars.localTranspose || multilineVars.clef.type === \"perc\")\n\t\treturn;\n\tvar origPitch = el.pitch;\n\tif (multilineVars.localTransposeVerticalMovement) {\n\t\tel.pitch = el.pitch + multilineVars.localTransposeVerticalMovement;\n\t\tif (el.name) {\n\t\t\tvar actual = el.accidental ? el.name.substring(1) : el.name\n\t\t\tvar acc = el.accidental ? el.name[0] : ''\n\t\t\tvar p = allNotes.pitchIndex(actual)\n\t\t\tel.name = acc + allNotes.noteName(p+multilineVars.localTransposeVerticalMovement)\n\t\t}\n\t}\n\n\tif (el.accidental) {\n\t\tvar ret = accidentalChange(origPitch, el.pitch, el.accidental, multilineVars.globalTransposeOrigKeySig, multilineVars.targetKey);\n\t\tel.pitch = ret[0];\n\t\tel.accidental = accidentals2[ret[1]];\n\t\tif (el.name) {\n\t\t\tel.name = accidentals3[ret[1]] + el.name.replace(/[_^=]/g,'');\n\t\t}\n\t}\n\n};\n\nmodule.exports = transpose;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/abc_transpose.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/all-notes.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/parse/all-notes.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var allNotes = {};\n\nconst allPitches = [\n\t'C,,,', 'D,,,', 'E,,,', 'F,,,', 'G,,,', 'A,,,', 'B,,,',\n\t'C,,', 'D,,', 'E,,', 'F,,', 'G,,', 'A,,', 'B,,',\n\t'C,', 'D,', 'E,', 'F,', 'G,', 'A,', 'B,',\n\t'C', 'D', 'E', 'F', 'G', 'A', 'B',\n\t'c', 'd', 'e', 'f', 'g', 'a', 'b',\n\t\"c'\", \"d'\", \"e'\", \"f'\", \"g'\", \"a'\", \"b'\",\n\t\"c''\", \"d''\", \"e''\", \"f''\", \"g''\", \"a''\", \"b''\",\n\t\"c'''\", \"d'''\", \"e'''\", \"f'''\", \"g'''\", \"a'''\", \"b'''\",\n];\n\nallNotes.pitchIndex = function(noteName) {\n\treturn allPitches.indexOf(noteName)\n}\n\nallNotes.noteName = function(pitchIndex) {\n\treturn allPitches[pitchIndex]\n}\n\nmodule.exports = allNotes;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/all-notes.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/transpose-chord.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/parse/transpose-chord.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var sharpChords = ['C', 'C♯', 'D', \"D♯\", 'E', 'F', \"F♯\", 'G', 'G♯', 'A', 'A♯', 'B'];\nvar flatChords = ['C', 'D♭', 'D', 'E♭', 'E', 'F', 'G♭', 'G', 'A♭', 'A', 'B♭', 'B'];\nvar sharpChordsFree = ['C', 'C#', 'D', \"D#\", 'E', 'F', \"F#\", 'G', 'G#', 'A', 'A#', 'B'];\nvar flatChordsFree = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'];\n\nfunction transposeChordName(chord, steps, preferFlats, freeGCchord) {\n\tif (!steps || (steps % 12 === 0)) // The chords are the same if it is an exact octave change.\n\t\treturn chord;\n\n\t// There are two things in the chord that might need to be transposed:\n\t// The chord will start with a letter from A-G, and might have one accidental after it.\n\t// That accidental might be an actual sharp or flat char, or it might be a pound sign or lower case \"b\".\n\t// Then there is a bunch of stuff that isn't transposed and should just be copied. That is stuff like \"7\" and more complicated chords.\n\t// But there is one other exception: right after a slash there will be a bass note and possibly an accidental. That should also be transposed.\n\n\twhile (steps < 0) steps += 12;\n\tif (steps > 11) steps = steps % 12;\n\n\t// (chord name w/accidental) (a bunch of stuff) (/) (bass note) (anything else)\n\tvar match = chord.match(/^([A-G][b#♭♯]?)([^\\/]+)?\\/?([A-G][b#♭♯]?)?(.+)?/)\n\tif (!match)\n\t\treturn chord; // We don't recognize the format of the chord, so skip it.\n\tvar name = match[1]\n\tvar extra1 = match[2]\n\tvar bass = match[3]\n\tvar extra2 = match[4]\n\tvar index = sharpChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = sharpChordsFree.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChordsFree.indexOf(name)\n\tif (index < 0)\n\t\treturn chord; // This should never happen, but if we can't find the chord just bail.\t\n\n\tindex += steps\n\tindex = index % 12\n\n\tif (preferFlats) {\n\t\tif (freeGCchord) chord = flatChordsFree[index]\n\t\telse chord = flatChords[index]\n\t} else {\n\t\tif (freeGCchord) chord = sharpChordsFree[index]\n\t\telse chord = sharpChords[index]\n\t}\n\n\tif (extra1)\n\t\tchord += extra1\n\n\tif (bass) {\n\t\tvar index = sharpChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = sharpChordsFree.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChordsFree.indexOf(bass)\n\t\tchord += '/'\n\t\tif (index >= 0) {\n\t\t\tindex += steps\n\t\t\tindex = index % 12\n\t\t\tif (preferFlats) {\n\t\t\t\tif (freeGCchord) chord += flatChordsFree[index]\n\t\t\t\telse chord += flatChords[index]\n\t\t\t} else {\n\t\t\t\tif (freeGCchord) chord += sharpChordsFree[index]\n\t\t\t\telse chord += sharpChords[index]\n\t\t\t}\n\t\t} else\n\t\t\tchord += bass; // Don't know what to do so do nothing\n\t}\n\n\tif (extra2)\n\t\tchord += extra2\n\n\treturn chord;\n}\n\nmodule.exports = transposeChordName\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/transpose-chord.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/tune-builder.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/parse/tune-builder.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var parseKeyVoice = __webpack_require__(/*! ../parse/abc_parse_key_voice */ \"./node_modules/abcjs/src/parse/abc_parse_key_voice.js\");\n//var parseCommon = require('../parse/abc_common');\n//var parseDirective = require('./abc_parse_directive');\n\nvar TuneBuilder = function (tune) {\n\tvar self = this;\n\tvar voiceDefs = {}\n\tvar currentVoiceName = ''\n\ttune.reset();\n\n\tthis.setVisualTranspose = function (visualTranspose) {\n\t\tif (visualTranspose)\n\t\t\ttune.visualTranspose = visualTranspose;\n\t};\n\n\tthis.cleanUp = function (barsperstaff, staffnonote, currSlur) {\n\t\tcloseLine(tune);\t// Close the last line.\n\t\tdelete tune.runningFonts;\n\n\t\tsimplifyMetaText(tune)\n\t\t//addRichTextToAnnotationsAndLyrics(tune)\n\n\t\t// If the tempo was created with a string like \"Allegro\", then the duration of a beat needs to be set at the last moment, when it is most likely known.\n\t\tif (tune.metaText.tempo && tune.metaText.tempo.bpm && !tune.metaText.tempo.duration)\n\t\t\ttune.metaText.tempo.duration = [tune.getBeatLength()];\n\n\t\t// Remove any blank lines\n\t\tvar anyDeleted = false;\n\t\tvar i, s, v;\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\tvar hasAny = false;\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\tif (tune.lines[i].staff[s] === undefined) {\n\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t//tune.lines[i].staff[s] = { voices: []};\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (tune.lines[i].staff[s].voices[v] === undefined)\n\t\t\t\t\t\t\t\ttune.lines[i].staff[s].voices[v] = [];\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif (containsNotes(tune.lines[i].staff[s].voices[v])) hasAny = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hasAny) {\n\t\t\t\t\ttune.lines[i] = null;\n\t\t\t\t\tanyDeleted = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (anyDeleted) {\n\t\t\ttune.lines = tune.lines.filter(function (line) { return !!line });\n\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\tif (line.staff)\n\t\t\t\t\tline.staff = line.staff.filter(function (line) { return !!line });\n\t\t\t});\n\t\t}\n\n\t\t// if we exceeded the number of bars allowed on a line, then force a new line\n\t\tif (barsperstaff) {\n\t\t\twhile (wrapMusicLines(tune.lines, barsperstaff)) {\n\t\t\t\t// This will keep wrapping until the end of the piece.\n\t\t\t}\n\t\t}\n\n\t\t// If we were passed staffnonote, then we want to get rid of all staffs that contain only rests.\n\t\tif (staffnonote) {\n\t\t\tanyDeleted = false;\n\t\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\t\tvar keepThis = false;\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (containsNotesStrict(tune.lines[i].staff[s].voices[v])) {\n\t\t\t\t\t\t\t\tkeepThis = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!keepThis) {\n\t\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (anyDeleted) {\n\t\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\t\tif (line.staff)\n\t\t\t\t\t\tline.staff = line.staff.filter(function (staff) { return !!staff });\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfixTitles(tune.lines);\n\n\t\t// Remove the temporary working variables\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++)\n\t\t\t\t\tdelete tune.lines[i].staff[s].workingClef;\n\t\t\t}\n\t\t}\n\n\t\t// If there are overlays, create new voices for them.\n\t\twhile (resolveOverlays(tune)) {\n\t\t\t// keep resolving overlays as long as any are found.\n\t\t}\n\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar staff = tune.lines[i].staff;\n\t\t\tif (staff) {\n\t\t\t\tfor (tune.staffNum = 0; tune.staffNum < staff.length; tune.staffNum++) {\n\t\t\t\t\tif (staff[tune.staffNum].clef)\n\t\t\t\t\t\tparseKeyVoice.fixClef(staff[tune.staffNum].clef);\n\t\t\t\t\tfor (tune.voiceNum = 0; tune.voiceNum < staff[tune.staffNum].voices.length; tune.voiceNum++) {\n\t\t\t\t\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\t\t\t\t\tcleanUpSlursInLine(voice, tune.staffNum, tune.voiceNum, currSlur);\n\t\t\t\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\t\t\t\tif (voice[j].el_type === 'clef')\n\t\t\t\t\t\t\t\tparseKeyVoice.fixClef(voice[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (voice.length > 0 && voice[voice.length - 1].barNumber) {\n\t\t\t\t\t\t\t// Don't hang a bar number on the last bar line: it should go on the next line.\n\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(tune.lines, i);\n\t\t\t\t\t\t\tif (nextLine)\n\t\t\t\t\t\t\t\tnextLine.staff[0].barNumber = voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t\tdelete voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove temporary variables that the outside doesn't need to know about\n\t\tdelete tune.staffNum;\n\t\tdelete tune.voiceNum;\n\t\tdelete tune.lineNum;\n\t\tdelete tune.potentialStartBeam;\n\t\tdelete tune.potentialEndBeam;\n\t\tdelete tune.vskipPending;\n\n\t\treturn currSlur;\n\t};\n\n\tthis.addTieToLastNote = function (dottedTie) {\n\t\t// TODO-PER: if this is a chord, which note?\n\t\tvar el = getLastNote(tune);\n\t\tif (el && el.pitches && el.pitches.length > 0) {\n\t\t\tel.pitches[0].startTie = {};\n\t\t\tif (dottedTie)\n\t\t\t\tel.pitches[0].startTie.style = 'dotted';\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.appendElement = function (type, startChar, endChar, hashParams) {\n\t\thashParams.el_type = type;\n\t\tif (startChar !== null)\n\t\t\thashParams.startChar = startChar;\n\t\tif (endChar !== null)\n\t\t\thashParams.endChar = endChar;\n\t\tif (type === 'note') { // && (hashParams.rest !== undefined || hashParams.end_beam === undefined)) {\n\t\t\t// Now, add the startBeam and endBeam where it is needed.\n\t\t\t// end_beam is already set on the places where there is a forced end_beam. We'll remove that here after using that info.\n\t\t\t// this.potentialStartBeam either points to null or the start beam.\n\t\t\t// this.potentialEndBeam either points to null or the start beam.\n\t\t\t// If we have a beam break (note is longer than a quarter, or an end_beam is on this element), then set the beam if we have one.\n\t\t\t// reset the variables for the next notes.\n\t\t\tvar dur = getDuration(hashParams);\n\t\t\tif (dur >= 0.25) {\t// The beam ends on the note before this.\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.force_end_beam_last && tune.potentialStartBeam !== undefined) {\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.end_beam && tune.potentialStartBeam !== undefined) {\t// the beam is forced to end on this note, probably because of a space in the ABC\n\t\t\t\tif (hashParams.rest === undefined)\n\t\t\t\t\tendBeamHere(hashParams, tune);\n\t\t\t\telse\n\t\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.rest === undefined) {\t// this a short note and we aren't about to end the beam\n\t\t\t\tif (tune.potentialStartBeam === undefined) {\t// We aren't collecting notes for a beam, so start here.\n\t\t\t\t\tif (!hashParams.end_beam) {\n\t\t\t\t\t\ttune.potentialStartBeam = hashParams;\n\t\t\t\t\t\tdelete tune.potentialEndBeam;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttune.potentialEndBeam = hashParams;\t// Continue the beaming, look for the end next note.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//  end_beam goes on rests and notes which precede rests _except_ when a rest (or set of adjacent rests) has normal notes on both sides (no spaces)\n\t\t\t//\t\t\tif (hashParams.rest !== undefined)\n\t\t\t//\t\t\t{\n\t\t\t//\t\t\t\thashParams.end_beam = true;\n\t\t\t//\t\t\t\tvar el2 = getLastNote(tune);\n\t\t\t//\t\t\t\tif (el2) el2.end_beam = true;\n\t\t\t//\t\t\t\t// TODO-PER: implement exception mentioned in the comment.\n\t\t\t//\t\t\t}\n\t\t} else {\t// It's not a note, so there definitely isn't beaming after it.\n\t\t\tendBeamLast(tune);\n\t\t}\n\t\tdelete hashParams.end_beam;\t// We don't want this temporary variable hanging around.\n\t\tdelete hashParams.force_end_beam_last;\t// We don't want this temporary variable hanging around.\n\t\tif (hashParams.rest && hashParams.rest.type === 'invisible') {\n\t\t\tdelete hashParams.decoration // the decorations on invisible rests should be invisible, too.\n\t\t}\n\t\tif (tune.lines.length <= tune.lineNum || tune.lines[tune.lineNum].staff.length <= tune.staffNum) {\n\t\t\t//console.log(\"pushNote IGNORED\", tune.lines[tune.lineNum])\n\t\t\t// TODO-PER: This prevents a crash, but it drops the element. Need to figure out how to start a new line, or delay adding this.\n\t\t\treturn false;\n\t\t}\n\n\t\tpushNote(self, tune, hashParams, voiceDefs, currentVoiceName);\n\t\treturn true\n\t};\n\n\tthis.appendStartingElement = function (type, startChar, endChar, hashParams2) {\n\t\t//console.log('appendStartingElement', hashParams2)\n\t\t// If we're in the middle of beaming, then end the beam.\n\t\tcloseLine(tune);\n\n\t\t// We only ever want implied naturals the first time.\n\t\tvar impliedNaturals;\n\t\tif (type === 'key') {\n\t\t\timpliedNaturals = hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.explicitAccidentals;\n\t\t}\n\n\t\t// Clone the object because it will be sticking around for the next line and we don't want the extra fields in it.\n\t\tvar hashParams = Object.assign({}, hashParams2);\n\n\t\t// be sure that we are on a music type line before doing the following.\n\t\tif (!tune.lines[tune.lineNum]) return\n\t\tvar staff = tune.lines[tune.lineNum].staff\n\t\tif (!staff) return\n\n\t\t// If tune is the first item in tune staff, then we might have to initialize the staff, first.\n\t\tif (staff.length <= tune.staffNum) {\n\t\t\tstaff[tune.staffNum] = {};\n\t\t\tstaff[tune.staffNum].clef = Object.assign({}, staff[0].clef);\n\t\t\tstaff[tune.staffNum].key = Object.assign({}, staff[0].key);\n\t\t\tif (staff[0].meter)\n\t\t\t\tstaff[tune.staffNum].meter = Object.assign({}, staff[0].meter);\n\t\t\tstaff[tune.staffNum].workingClef = Object.assign({}, staff[0].workingClef);\n\t\t\tstaff[tune.staffNum].voices = [[]];\n\t\t}\n\t\t// If tune is a clef type, then we replace the working clef on the line. This is kept separate from\n\t\t// the clef in case there is an inline clef field. We need to know what the current position for\n\t\t// the note is.\n\t\tif (type === 'clef') {\n\t\t\tstaff[tune.staffNum].workingClef = hashParams;\n\t\t}\n\n\t\t// These elements should not be added twice, so if the element exists on tune line without a note or bar before it, just replace the staff version.\n\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar') {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice.push(hashParams);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (voice[i].el_type === type) {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice[i] = hashParams;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// We didn't see either that type or a note, so replace the element to the staff.\n\t\tstaff[tune.staffNum][type] = hashParams2;\n\t};\n\n\tthis.addSubtitle = function (str, info) {\n\t\tpushLine(tune, { subtitle: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addSpacing = function (num) {\n\t\ttune.vskipPending = num;\n\t};\n\n\tthis.addNewPage = function (num) {\n\t\tpushLine(tune, { newpage: num });\n\t};\n\n\tthis.addSeparator = function (spaceAbove, spaceBelow, lineLength, info) {\n\t\tpushLine(tune, { separator: { spaceAbove: Math.round(spaceAbove), spaceBelow: Math.round(spaceBelow), lineLength: Math.round(lineLength), startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addText = function (str, info) {\n\t\tpushLine(tune, { text: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addCentered = function (str) {\n\t\tpushLine(tune, { text: [{ text: str, center: true }] });\n\t};\n\n\t//\tanyVoiceContainsNotes: function(line) {\n\t//\t\tfor (var i = 0; i < line.staff.voices.length; i++) {\n\t//\t\t\tif (containsNotes(line.staff.voices[i]))\n\t//\t\t\t\treturn true;\n\t//\t\t}\n\t//\t\treturn false;\n\t//\t},\n\tthis.changeVoiceScale = function (scale) {\n\t\tself.appendElement('scale', null, null, { size: scale });\n\t};\n\tthis.changeVoiceColor = function (color) {\n\t\tself.appendElement('color', null, null, { color: color });\n\t};\n\n\tthis.startNewLine = function (params) {\n\t\t//console.log(\"startNewLine\", tune.lineNum, params, voiceDefs)\n\t\t// If the pointed to line doesn't exist, just create that. If the line does exist, but doesn't have any music on it, just use it.\n\t\t// If it does exist and has music, then increment the line number. If the new element doesn't exist, create it.\n\t\tcloseLine(tune);\t// Close the previous line.\n\t\tif (params.currentVoiceName) {\n\t\t\tcurrentVoiceName = params.currentVoiceName\n\t\t\tvoiceDefs[params.currentVoiceName] = params\n\t\t}\n\n\t\tif (tune.lines[tune.lineNum] === undefined) createLine(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff === undefined) {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t} else if (tune.lines[tune.lineNum].staff[tune.staffNum] === undefined) createStaff(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum] === undefined) createVoice(self, tune, params);\n\t\telse if (!containsNotes(tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum])) {\n\t\t\t// We don't need a new line but we might need to update parts of it.\n\t\t\tif (params.part)\n\t\t\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\t\t} else {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t}\n\t};\n\n\tthis.setRunningFont = function (type, font) {\n\t\t// This is called at tune start to set the current default fonts so we know whether to record a change.\n\t\ttune.runningFonts[type] = font;\n\t};\n\n\tthis.setBarNumberImmediate = function (barNumber) {\n\t\t// If tune is called right at the beginning of a line, then correct the measure number that is already written.\n\t\t// If tune is called at the beginning of a measure, then correct the measure number that was just created.\n\t\t// If tune is called in the middle of a measure, then subtract one from it, because it will be incremented before applied.\n\t\tvar currentVoice = this.getCurrentVoice();\n\t\tif (currentVoice && currentVoice.length > 0) {\n\t\t\tvar lastElement = currentVoice[currentVoice.length - 1];\n\t\t\tif (lastElement.el_type === 'bar') {\n\t\t\t\tif (lastElement.barNumber !== undefined) // the measure number might not be written for tune bar, don't override that.\n\t\t\t\t\tlastElement.barNumber = barNumber;\n\t\t\t} else\n\t\t\t\treturn barNumber - 1;\n\t\t}\n\t\treturn barNumber;\n\t};\n\n\tthis.hasBeginMusic = function () {\n\t\t// return true if there exists at least one line that contains \"staff\"\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.isFirstLine = function (index) {\n\t\tfor (var i = index - 1; i >= 0; i--) {\n\t\t\tif (tune.lines[i].staff !== undefined) return false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tthis.getCurrentVoice = function () {\n\t\t//console.log(\"getCurrentVoice\", tune.lineNum)\n\t\tvar currLine = getPrevMusicLine(tune.lines, tune.lineNum)\n\t\tif (!currLine)\n\t\t\treturn null;\n\t\tvar currStaff = currLine.staff[tune.staffNum];\n\t\tif (!currStaff)\n\t\t\treturn null;\n\t\tif (currStaff.voices[tune.voiceNum] !== undefined)\n\t\t\treturn currStaff.voices[tune.voiceNum];\n\t\telse return null;\n\t};\n\n\tthis.setCurrentVoice = function (staffNum, voiceNum, name) {\n\t\t//console.log(\"setCurrentVoice\", tune.lineNum, staffNum, voiceNum, name, voiceDefs)\n\t\ttune.staffNum = staffNum;\n\t\ttune.voiceNum = voiceNum;\n\t\tcurrentVoiceName = name\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tif (tune.lines[i].staff[staffNum] === undefined || tune.lines[i].staff[staffNum].voices[voiceNum] === undefined ||\n\t\t\t\t\t!containsNotes(tune.lines[i].staff[staffNum].voices[voiceNum])) {\n\t\t\t\t\t//console.log(\"cv2\", i, tune.lines[i].staff[staffNum])\n\t\t\t\t\ttune.lineNum = i;\n\t\t\t\t\tif (!tune.lines[i].staff[staffNum] || !!tune.lines[i].staff[staffNum].voices[voiceNum]) return true\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//console.log(\"cv3\", i, tune.lineNum, tune.lines[tune.lineNum])\n\t\ttune.lineNum = i;\n\t\treturn false\n\t};\n\n\tthis.addMetaText = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = value;\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\tif (typeof tune.metaText[key] === 'string' && typeof value === 'string')\n\t\t\t\ttune.metaText[key] += \"\\n\" + value;\n\t\t\telse {\n\t\t\t\tif (tune.metaText[key] === 'string')\n\t\t\t\t\ttune.metaText[key] = [{ text: tune.metaText[key] }]\n\t\t\t\tif (typeof value === 'string')\n\t\t\t\t\tvalue = [{ text: value }]\n\t\t\t\ttune.metaText[key] = tune.metaText[key].concat(value)\n\t\t\t}\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\n\tthis.addMetaTextArray = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = [value];\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\ttune.metaText[key].push(value);\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\tthis.addMetaTextObj = function (key, value, info) {\n\t\ttune.metaText[key] = value;\n\t\ttune.metaTextInfo[key] = info;\n\t};\n};\n\nfunction isArrayOfStrings(arr) {\n\tif (!arr) return false\n\tif (typeof arr === \"string\") return false\n\t//var str = ''\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (typeof arr[i] !== 'string')\n\t\t\treturn false\n\t}\n\treturn true\n}\n\nfunction simplifyMetaText(tune) {\n\tif (isArrayOfStrings(tune.metaText.notes))\n\t\ttune.metaText.notes = tune.metaText.notes.join(\"\\n\")\n\tif (isArrayOfStrings(tune.metaText.history))\n\t\ttune.metaText.history = tune.metaText.history.join(\"\\n\")\n}\n\n// function addRichTextToAnnotationsAndLyrics(tune) {\n// \tvar lines = tune.lines\n// \tfor (var i = 0; i < lines.length; i++) {\n// \t\tif (lines[i].staff !== undefined) {\n// \t\t\tfor (var s = 0; s < lines[i].staff.length; s++) {\n// \t\t\t\tfor (var v = 0; v < lines[i].staff[s].voices.length; v++) {\n// \t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n// \t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n// \t\t\t\t\t\tvar element = voice[n]\n// \t\t\t\t\t\tif (element.chord) {\n// \t\t\t\t\t\t\tfor (var c = 0; c < element.chord.length; c++) {\n// \t\t\t\t\t\t\t\telement.chord[c].name = parseDirective.parseFontChangeLine(element.chord[c].name)\n// \t\t\t\t\t\t\t\tconsole.log(element.chord[c].name)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\tif (element.lyric) {\n// \t\t\t\t\t\t\tfor (var l = 0; l < element.lyric.length; l++) {\n// \t\t\t\t\t\t\t\telement.lyric[l].syllable = parseDirective.parseFontChangeLine(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t\tconsole.log(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}\n// \t\t\t}\n// \t\t}\n// \t}\n\n// }\n\nfunction resolveOverlays(tune) {\n\tvar madeChanges = false;\n\tvar durationsPerLines = [];\n\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\tvar line = tune.lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tvar overlayVoice = [];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\toverlayVoice.push({ hasOverlay: false, voice: [], snip: [] });\n\t\t\t\t\tdurationsPerLines[i] = 0;\n\t\t\t\t\tvar durationThisBar = 0;\n\t\t\t\t\tvar inOverlay = false;\n\t\t\t\t\tvar overlayDuration = 0;\n\t\t\t\t\tvar snipStart = -1;\n\t\t\t\t\tfor (var kk = 0; kk < voice.length; kk++) {\n\t\t\t\t\t\tvar event = voice[kk];\n\t\t\t\t\t\tif (event.el_type === \"overlay\" && !inOverlay) {\n\t\t\t\t\t\t\tmadeChanges = true;\n\t\t\t\t\t\t\tinOverlay = true;\n\t\t\t\t\t\t\tsnipStart = kk;\n\t\t\t\t\t\t\toverlayVoice[k].hasOverlay = true;\n\t\t\t\t\t\t\tif (overlayDuration === 0)\n\t\t\t\t\t\t\t\toverlayDuration = durationsPerLines[i];\n\t\t\t\t\t\t\t// If this isn't the first line, we also need invisible rests on the previous lines.\n\t\t\t\t\t\t\t// So, if the next voice doesn't appear in a previous line, create it\n\t\t\t\t\t\t\tfor (var ii = 0; ii < i; ii++) {\n\t\t\t\t\t\t\t\tif (durationsPerLines[ii] && tune.lines[ii].staff && staff.voices.length >= tune.lines[ii].staff[0].voices.length) {\n\t\t\t\t\t\t\t\t\ttune.lines[ii].staff[0].voices.push([{\n\t\t\t\t\t\t\t\t\t\tel_type: \"note\",\n\t\t\t\t\t\t\t\t\t\tduration: durationsPerLines[ii],\n\t\t\t\t\t\t\t\t\t\trest: { type: \"invisible\" },\n\t\t\t\t\t\t\t\t\t\tstartChar: event.startChar,\n\t\t\t\t\t\t\t\t\t\tendChar: event.endChar\n\t\t\t\t\t\t\t\t\t}]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"bar\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\t// delete the overlay events from this array without messing up this loop.\n\t\t\t\t\t\t\t\tinOverlay = false;\n\t\t\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: kk - snipStart });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event); // Also end the overlay with the barline.\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// This keeps the voices lined up: if the overlay isn't in the first measure then we need a bunch of invisible rests.\n\t\t\t\t\t\t\t\tif (durationThisBar > 0)\n\t\t\t\t\t\t\t\t\toverlayVoice[k].voice.push({ el_type: \"note\", duration: durationThisBar, rest: { type: \"invisible\" }, startChar: event.startChar, endChar: event.endChar });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdurationThisBar = 0;\n\t\t\t\t\t\t} else if (event.el_type === \"note\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdurationThisBar += event.duration;\n\t\t\t\t\t\t\t\tdurationsPerLines[i] += event.duration;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"scale\" || event.el_type === \"stem\" || event.el_type === \"overlay\" || event.el_type === \"style\" || event.el_type === \"transpose\" || event.el_type === \"color\") {\n\t\t\t\t\t\t\t// These types of events are duplicated on the overlay layer.\n\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (overlayVoice[k].hasOverlay && overlayVoice[k].snip.length === 0) {\n\t\t\t\t\t\t// there was no closing bar, so we didn't set the snip amount.\n\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: voice.length - snipStart });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (k = 0; k < overlayVoice.length; k++) {\n\t\t\t\t\tvar ov = overlayVoice[k];\n\t\t\t\t\tif (ov.hasOverlay) {\n\t\t\t\t\t\tov.voice.splice(0, 0, { el_type: \"stem\", direction: \"down\" })\n\t\t\t\t\t\tstaff.voices.push(ov.voice);\n\t\t\t\t\t\tfor (var kkk = ov.snip.length - 1; kkk >= 0; kkk--) {\n\t\t\t\t\t\t\tvar snip = ov.snip[kkk];\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start, snip.len);\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start + 1, 0, { el_type: \"stem\", direction: \"auto\" });\n\t\t\t\t\t\t\tvar indexOfLastBar = findLastBar(staff.voices[k], snip.start);\n\t\t\t\t\t\t\tstaff.voices[k].splice(indexOfLastBar, 0, { el_type: \"stem\", direction: \"up\" });\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// remove ending marks from the overlay voice so they are not repeated\n\t\t\t\t\t\tfor (kkk = 0; kkk < staff.voices[staff.voices.length - 1].length; kkk++) {\n\t\t\t\t\t\t\tstaff.voices[staff.voices.length - 1][kkk] = Object.assign({}, staff.voices[staff.voices.length - 1][kkk]);\n\t\t\t\t\t\t\tvar el = staff.voices[staff.voices.length - 1][kkk];\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.startEnding) {\n\t\t\t\t\t\t\t\tdelete el.startEnding;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.endEnding)\n\t\t\t\t\t\t\t\tdelete el.endEnding;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn madeChanges;\n};\n\nfunction findLastBar(voice, start) {\n\tfor (var i = start - 1; i > 0 && voice[i].el_type !== \"bar\"; i--) {\n\n\t}\n\treturn i;\n}\n\nfunction fixTitles(lines) {\n\t// We might have name and subname defined. We now know what line everything is on, so we can determine which to use.\n\tvar firstMusicLine = true;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tif (staff.title) {\n\t\t\t\t\tvar hasATitle = false;\n\t\t\t\t\tfor (var k = 0; k < staff.title.length; k++) {\n\t\t\t\t\t\tif (staff.title[k]) {\n\t\t\t\t\t\t\tstaff.title[k] = (firstMusicLine) ? staff.title[k].name : staff.title[k].subname;\n\t\t\t\t\t\t\tif (staff.title[k])\n\t\t\t\t\t\t\t\thasATitle = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasATitle)\n\t\t\t\t\t\tdelete staff.title;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfirstMusicLine = false;\n\t\t}\n\t}\n}\n\nfunction cleanUpSlursInLine(line, staffNum, voiceNum, currSlur) {\n\tif (!currSlur[staffNum])\n\t\tcurrSlur[staffNum] = [];\n\tif (!currSlur[staffNum][voiceNum])\n\t\tcurrSlur[staffNum][voiceNum] = [];\n\tvar x;\n\t//\t\t\tvar lyr = null;\t// TODO-PER: debugging.\n\n\tvar addEndSlur = function (obj, num, chordPos) {\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t// There isn't an exact match for note position, but we'll take any other open slur.\n\t\t\tfor (x = 0; x < currSlur[staffNum][voiceNum].length; x++) {\n\t\t\t\tif (currSlur[staffNum][voiceNum][x] !== undefined) {\n\t\t\t\t\tchordPos = x;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t\tvar offNum = chordPos * 100 + 1;\n\t\t\t\tobj.endSlur.forEach(function (x) { if (offNum === x) --offNum; });\n\t\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [offNum];\n\t\t\t}\n\t\t}\n\t\tvar slurNum;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tslurNum = currSlur[staffNum][voiceNum][chordPos].pop();\n\t\t\tobj.endSlur.push(slurNum);\n\t\t\t//\t\t\t\t\tlyr.syllable += '<' + slurNum;\t// TODO-PER: debugging\n\t\t}\n\t\tif (currSlur[staffNum][voiceNum][chordPos].length === 0)\n\t\t\tdelete currSlur[staffNum][voiceNum][chordPos];\n\t\treturn slurNum;\n\t};\n\n\tvar addStartSlur = function (obj, num, chordPos, usedNums) {\n\t\tobj.startSlur = [];\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [];\n\t\t}\n\t\tvar nextNum = chordPos * 100 + 1;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tif (usedNums) {\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t}\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].push(nextNum);\n\t\t\tobj.startSlur.push({ label: nextNum });\n\t\t\tif (obj.dottedSlur) {\n\t\t\t\tobj.startSlur[obj.startSlur.length - 1].style = 'dotted';\n\t\t\t\tdelete obj.dottedSlur;\n\t\t\t}\n\t\t\t//\t\t\t\t\tlyr.syllable += ' ' + nextNum + '>';\t// TODO-PER:debugging\n\t\t\tnextNum++;\n\t\t}\n\t};\n\n\tfor (var i = 0; i < line.length; i++) {\n\t\tvar el = line[i];\n\t\t//\t\t\t\tif (el.lyric === undefined)\t// TODO-PER: debugging\n\t\t//\t\t\t\t\tel.lyric = [{ divider: '-' }];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr = el.lyric[0];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr.syllable = '';\t// TODO-PER: debugging\n\t\tif (el.el_type === 'note') {\n\t\t\tif (el.gracenotes) {\n\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\tif (el.gracenotes[g].endSlur) {\n\t\t\t\t\t\tvar gg = el.gracenotes[g].endSlur;\n\t\t\t\t\t\tel.gracenotes[g].endSlur = [];\n\t\t\t\t\t\tfor (var ggg = 0; ggg < gg; ggg++)\n\t\t\t\t\t\t\taddEndSlur(el.gracenotes[g], 1, 20);\n\t\t\t\t\t}\n\t\t\t\t\tif (el.gracenotes[g].startSlur) {\n\t\t\t\t\t\tx = el.gracenotes[g].startSlur;\n\t\t\t\t\t\taddStartSlur(el.gracenotes[g], x, 20);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.endSlur) {\n\t\t\t\tx = el.endSlur;\n\t\t\t\tel.endSlur = [];\n\t\t\t\taddEndSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.startSlur) {\n\t\t\t\tx = el.startSlur;\n\t\t\t\taddStartSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.pitches) {\n\t\t\t\tvar usedNums = [];\n\t\t\t\tfor (var p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].endSlur) {\n\t\t\t\t\t\tvar k = el.pitches[p].endSlur;\n\t\t\t\t\t\tel.pitches[p].endSlur = [];\n\t\t\t\t\t\tfor (var j = 0; j < k; j++) {\n\t\t\t\t\t\t\tvar slurNum = addEndSlur(el.pitches[p], 1, p + 1);\n\t\t\t\t\t\t\tusedNums.push(slurNum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].startSlur) {\n\t\t\t\t\t\tx = el.pitches[p].startSlur;\n\t\t\t\t\t\taddStartSlur(el.pitches[p], x, p + 1, usedNums);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Correct for the weird gracenote case where ({g}a) should match.\n\t\t\t\t// The end slur was already assigned to the note, and needs to be moved to the first note of the graces.\n\t\t\t\tif (el.gracenotes && el.pitches[0].endSlur && el.pitches[0].endSlur[0] === 100 && el.pitches[0].startSlur) {\n\t\t\t\t\tif (el.gracenotes[0].endSlur)\n\t\t\t\t\t\tel.gracenotes[0].endSlur.push(el.pitches[0].startSlur[0].label);\n\t\t\t\t\telse\n\t\t\t\t\t\tel.gracenotes[0].endSlur = [el.pitches[0].startSlur[0].label];\n\t\t\t\t\tif (el.pitches[0].endSlur.length === 1)\n\t\t\t\t\t\tdelete el.pitches[0].endSlur;\n\t\t\t\t\telse if (el.pitches[0].endSlur[0] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.shift();\n\t\t\t\t\telse if (el.pitches[0].endSlur[el.pitches[0].endSlur.length - 1] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.pop();\n\t\t\t\t\tif (currSlur[staffNum][voiceNum][1].length === 1)\n\t\t\t\t\t\tdelete currSlur[staffNum][voiceNum][1];\n\t\t\t\t\telse\n\t\t\t\t\t\tcurrSlur[staffNum][voiceNum][1].pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction wrapMusicLines(lines, barsperstaff) {\n\tfor (i = 0; i < lines.length; i++) {\n\t\tif (lines[i].staff !== undefined) {\n\t\t\tfor (s = 0; s < lines[i].staff.length; s++) {\n\t\t\t\tvar permanentItems = [];\n\t\t\t\tfor (v = 0; v < lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n\t\t\t\t\tvar barNumThisLine = 0;\n\t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n\t\t\t\t\t\tif (voice[n].el_type === 'bar') {\n\t\t\t\t\t\t\tbarNumThisLine++;\n\t\t\t\t\t\t\tif (barNumThisLine >= barsperstaff) {\n\t\t\t\t\t\t\t\t// push everything else to the next line, if there is anything else,\n\t\t\t\t\t\t\t\t// and there is a next line. If there isn't a next line, create one.\n\t\t\t\t\t\t\t\tif (n < voice.length - 1) {\n\t\t\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(lines, i);\n\t\t\t\t\t\t\t\t\tif (!nextLine) {\n\t\t\t\t\t\t\t\t\t\tvar cp = JSON.parse(JSON.stringify(lines[i]));\n\t\t\t\t\t\t\t\t\t\tlines.push(Object.assign({}, cp));\n\t\t\t\t\t\t\t\t\t\tnextLine = lines[lines.length - 1];\n\t\t\t\t\t\t\t\t\t\tfor (var ss = 0; ss < nextLine.staff.length; ss++) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var vv = 0; vv < nextLine.staff[ss].voices.length; vv++)\n\t\t\t\t\t\t\t\t\t\t\t\tnextLine.staff[ss].voices[vv] = [];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar startElement = n + 1;\n\t\t\t\t\t\t\t\t\tvar section = lines[i].staff[s].voices[v].slice(startElement);\n\t\t\t\t\t\t\t\t\tlines[i].staff[s].voices[v] = lines[i].staff[s].voices[v].slice(0, startElement);\n\t\t\t\t\t\t\t\t\tnextLine.staff[s].voices[v] = permanentItems.concat(section.concat(nextLine.staff[s].voices[v]));\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!voice[n].duration) {\n\t\t\t\t\t\t\tpermanentItems.push(voice[n]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getPrevMusicLine(lines, currentLine) {\n\t// If the current line doesn't have music, search backwards until one is found.\n\twhile (currentLine >= 0) {\n\t\tif (lines[currentLine].staff)\n\t\t\treturn lines[currentLine];\n\t\tcurrentLine--;\n\t}\n\treturn null;\n}\n\nfunction getNextMusicLine(lines, currentLine) {\n\tcurrentLine++;\n\twhile (lines.length > currentLine) {\n\t\tif (lines[currentLine].staff)\n\t\t\treturn lines[currentLine];\n\t\tcurrentLine++;\n\t}\n\treturn null;\n}\n\nfunction getLastNote(tune) {\n\tif (!tune.lines[tune.lineNum]) return null\n\tif (!tune.lines[tune.lineNum].staff) return null\n\tif (!tune.lines[tune.lineNum].staff[tune.staffNum]) return null\n\tvar voice = tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum]\n\tif (!voice) return null\n\tfor (var i = voice.length - 1; i >= 0; i--) {\n\t\tvar el = voice[i];\n\t\tif (el.el_type === 'note') {\n\t\t\treturn el;\n\t\t}\n\t}\n\treturn null;\n};\n\nfunction getDuration(el) {\n\tif (el.duration) return el.duration;\n\treturn 0;\n};\n\nfunction closeLine(tune) {\n\tif (tune.potentialStartBeam && tune.potentialEndBeam) {\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n};\n\nfunction containsNotes(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction containsNotesStrict(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' && (voice[i].rest === undefined || voice[i].chord !== undefined))\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction pushLine(tune, hash) {\n\tif (tune.vskipPending) {\n\t\thash.vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n\ttune.lines.push(hash);\n};\n\nfunction pushNote(self, tune, hp, voiceDefs, currentVoiceName) {\n\t//console.log(\"pushNote\", tune.lineNum, tune.staffNum, hp.pitches ? JSON.stringify(hp.pitches) : hp.pitches)\n\tvar currStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\n\tif (hp.pitches !== undefined) {\n\t\tvar mid = currStaff.workingClef.verticalPos;\n\t\thp.pitches.forEach(function (p) { p.verticalPos = p.pitch - mid; });\n\t}\n\tif (hp.gracenotes !== undefined) {\n\t\tvar mid2 = currStaff.workingClef.verticalPos;\n\t\thp.gracenotes.forEach(function (p) { p.verticalPos = p.pitch - mid2; });\n\t}\n\tif (currStaff.voices.length <= tune.voiceNum) {\n\t\t//console.log(\"should create?\", currentVoiceName, voiceDefs)\n\t\tif (!voiceDefs[currentVoiceName])\n\t\t\tvoiceDefs[currentVoiceName] = {}\n\t\tcreateVoice(self, tune, voiceDefs[currentVoiceName])\n\t}\n\tcurrStaff.voices[tune.voiceNum].push(hp);\n}\n\nfunction endBeamHere(hashParams, tune) {\n\ttune.potentialStartBeam.startBeam = true;\n\thashParams.endBeam = true;\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\nfunction endBeamLast(tune) {\n\tif (tune.potentialStartBeam !== undefined && tune.potentialEndBeam !== undefined) {\t// Do we have a set of notes to beam?\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\n\nfunction setLineFont(tune, type, font) {\n\t// If we haven't encountered the font type yet then we are using the default font so it doesn't\n\t// need to be noted. If we have encountered it, then only record it if it is different from the last time.\n\tif (tune.runningFonts[type]) {\n\t\tvar isDifferent = false;\n\t\tvar keys = Object.keys(font);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (tune.runningFonts[type][keys[i]] !== font[keys[i]])\n\t\t\t\tisDifferent = true;\n\t\t}\n\t\tif (isDifferent) {\n\t\t\ttune.lines[tune.lineNum].staff[tune.staffNum][type] = font;\n\t\t}\n\t}\n\ttune.runningFonts[type] = font;\n}\n\nfunction createVoice(self, tune, params) {\n\t//console.log(\"createVoice\", params)\n\tvar thisStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\tthisStaff.voices[tune.voiceNum] = [];\n\tif (!thisStaff.title)\n\t\tthisStaff.title = [];\n\tthisStaff.title[tune.voiceNum] = { name: params.name, subname: params.subname };\n\tif (params.style)\n\t\tself.appendElement('style', null, null, { head: params.style });\n\tif (params.stem)\n\t\tself.appendElement('stem', null, null, { direction: params.stem });\n\telse if (tune.voiceNum > 0) {\n\t\tif (thisStaff.voices[0] !== undefined) {\n\t\t\tvar found = false;\n\t\t\tfor (var i = 0; i < thisStaff.voices[0].length; i++) {\n\t\t\t\tif (thisStaff.voices[0].el_type === 'stem')\n\t\t\t\t\tfound = true;\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tvar stem = { el_type: 'stem', direction: 'up' };\n\t\t\t\tthisStaff.voices[0].splice(0, 0, stem);\n\t\t\t}\n\t\t}\n\t\tself.appendElement('stem', null, null, { direction: 'down' });\n\t}\n\tif (params.scale)\n\t\tself.appendElement('scale', null, null, { size: params.scale });\n\tif (params.color)\n\t\tself.appendElement('color', null, null, { color: params.color });\n}\n\nfunction createStaff(self, tune, params) {\n\tif (params.key && params.key.impliedNaturals) {\n\t\tparams.key.accidentals = params.key.accidentals.concat(params.key.impliedNaturals);\n\t\tdelete params.key.impliedNaturals;\n\t}\n\n\ttune.lines[tune.lineNum].staff[tune.staffNum] = { voices: [], clef: params.clef, key: params.key, workingClef: params.clef };\n\tvar staff = tune.lines[tune.lineNum].staff[tune.staffNum]\n\tif (params.stafflines !== undefined) {\n\t\tstaff.clef.stafflines = params.stafflines;\n\t\tstaff.workingClef.stafflines = params.stafflines;\n\t}\n\tif (params.staffscale) {\n\t\tstaff.staffscale = params.staffscale;\n\t}\n\tif (params.annotationfont) setLineFont(tune, \"annotationfont\", params.annotationfont);\n\tif (params.gchordfont) setLineFont(tune, \"gchordfont\", params.gchordfont);\n\tif (params.tripletfont) setLineFont(tune, \"tripletfont\", params.tripletfont);\n\tif (params.vocalfont) setLineFont(tune, \"vocalfont\", params.vocalfont);\n\tif (params.bracket) staff.bracket = params.bracket;\n\tif (params.brace) staff.brace = params.brace;\n\tif (params.connectBarLines) staff.connectBarLines = params.connectBarLines;\n\tif (params.barNumber) staff.barNumber = params.barNumber;\n\tcreateVoice(self, tune, params);\n\t// Some stuff just happens for the first voice\n\tif (params.part)\n\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\tif (params.meter !== undefined) staff.meter = params.meter;\n\tif (tune.vskipPending) {\n\t\ttune.lines[tune.lineNum].vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n}\n\nfunction createLine(self, tune, params) {\n\ttune.lines[tune.lineNum] = { staff: [] };\n\tcreateStaff(self, tune, params);\n}\n\nmodule.exports = TuneBuilder;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/tune-builder.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/parse/wrap_lines.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/parse/wrap_lines.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    wrap_lines.js: does line wrap on an already parsed tune.\n\nfunction wrapLines(tune, lineBreaks, barNumbers) {\n\tif (!lineBreaks || tune.lines.length === 0)\n\t\treturn;\n\n\t// tune.lines contains nested arrays: there is an array of lines (that's the part this function rewrites),\n\t// there is an array of staffs per line (for instance, piano will have 2, orchestra will have many)\n\t// there is an array of voices per staff (for instance, 4-part harmony might have bass and tenor on a single staff)\n\tvar lines = tune.deline({lineBreaks: false});\n\tvar linesBreakElements = findLineBreaks(lines, lineBreaks);\n\t//console.log(JSON.stringify(linesBreakElements))\n\ttune.lines = addLineBreaks(lines, linesBreakElements, barNumbers);\n\ttune.lineBreaks = linesBreakElements;\n}\n\nfunction addLineBreaks(lines, linesBreakElements, barNumbers) {\n\t// linesBreakElements is an array of all of the elements that break for a new line\n\t// The objects in the array look like:\n\t// {\"ogLine\":0,\"line\":0,\"staff\":0,\"voice\":0,\"start\":0, \"end\":21}\n\t// ogLine is the original line that it came from,\n\t// line is the target line.\n\t// then copy all the elements from start to end for the staff and voice specified.\n\t// If the item doesn't contain \"staff\" then it is a non music line and should just be copied.\n\tvar outputLines = [];\n\tvar lastKeySig = []; // This is per staff - if the key changed then this will be populated.\n\tvar lastStem = [];\n\tvar currentBarNumber = 1;\n\tfor (var i = 0; i < linesBreakElements.length; i++) {\n\t\tvar action = linesBreakElements[i];\n\t\tif (lines[action.ogLine].staff) {\n\t\t\tvar inputStaff = lines[action.ogLine].staff[action.staff];\n\t\t\tif (!outputLines[action.line]) {\n\t\t\t\toutputLines[action.line] = {staff: []}\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff]) {\n\t\t\t\toutputLines[action.line].staff[action.staff] = {voices: []};\n\t\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.line > 0) {\n\t\t\t\t\toutputLines[action.line].staff[action.staff].barNumber = currentBarNumber;\n\t\t\t\t}\n\t\t\t\tvar keys = Object.keys(inputStaff)\n\t\t\t\tfor (var k = 0; k < keys.length; k++) {\n\t\t\t\t\tvar skip = keys[k] === \"voices\";\n\t\t\t\t\tif (keys[k] === \"meter\" && action.line !== 0)\n\t\t\t\t\t\tskip = true;\n\t\t\t\t\tif (!skip)\n\t\t\t\t\t\toutputLines[action.line].staff[action.staff][keys[k]] = inputStaff[keys[k]];\n\t\t\t\t}\n\t\t\t\tif (lastKeySig[action.staff])\n\t\t\t\t\toutputLines[action.line].staff[action.staff].key = lastKeySig[action.staff];\n\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff].voices[action.voice]) {\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] = [];\n\t\t\t}\n\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] =\n\t\t\t\tlines[action.ogLine].staff[action.staff].voices[action.voice].slice(action.start, action.end+1);\n\t\t\tif (lastStem[action.staff*10+action.voice])\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice].unshift({el_type: \"stem\", direction: lastStem[action.staff*10+action.voice].direction})\n\t\t\tvar currVoice = outputLines[action.line].staff[action.staff].voices[action.voice];\n\t\t\tfor (var kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"key\") {\n\t\t\t\t\tlastKeySig[action.staff] = {\n\t\t\t\t\t\troot: currVoice[kk].root,\n\t\t\t\t\t\tacc: currVoice[kk].acc,\n\t\t\t\t\t\tmode: currVoice[kk].mode,\n\t\t\t\t\t\taccidentals: currVoice[kk].accidentals.filter(function (acc) { return acc.acc !== 'natural' })\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"stem\") {\n\t\t\t\t\tlastStem[action.staff*10+action.voice] = {\n\t\t\t\t\t\tdirection: currVoice[kk].direction,\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.voice === 0) {\n\t\t\t\tfor (kk = 0; kk < currVoice.length; kk++) {\n\t\t\t\t\tif (currVoice[kk].el_type === 'bar') {\n\t\t\t\t\t\tcurrentBarNumber++\n\t\t\t\t\t\tif (kk === currVoice.length-1)\n\t\t\t\t\t\t\tdelete currVoice[kk].barNumber\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurrVoice[kk].barNumber = currentBarNumber\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\toutputLines[action.line] = lines[action.ogLine];\n\t\t}\n\t}\n\t// There could be some missing info - if the tune passed in was incomplete or had different lengths for different voices or was missing a voice altogether - just fill in the gaps.\n\tfor (var ii = 0; ii < outputLines.length; ii++) {\n\t\tif (outputLines[ii].staff) {\n\t\t\toutputLines[ii].staff = outputLines[ii].staff.filter(function (el) {\n\t\t\t\treturn el != null;\n\t\t\t});\n\t\t}\n\t}\n\treturn outputLines;\n}\n\n\nfunction findLineBreaks(lines, lineBreakArray) {\n\t// lineBreakArray is an array of all of the sections of the tune - often there will just be one\n\t// section unless there is a subtitle or other non-music lines. Each of the elements of\n\t// Each element of lineBreakArray is an array of the zero-based last measure of the line.\n\tvar lineBreakIndexes = [];\n\tvar lbai = 0;\n\tvar lineCounter = 0;\n\tvar outputLine = 0;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tvar lineStart = lineCounter;\n\t\t\tvar lineBreaks = lineBreakArray[lbai];\n\t\t\tlbai++;\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\toutputLine = lineStart;\n\t\t\t\t\tvar measureNumber = 0;\n\t\t\t\t\tvar lbi = 0;\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\tvar start = 0;\n\t\t\t\t\tfor (var e = 0; e < voice.length; e++) {\n\t\t\t\t\t\tvar el = voice[e];\n\n\t\t\t\t\t\tif (el.el_type === 'bar') {\n\t\t\t\t\t\t\tif (lineBreaks[lbi] === measureNumber) {\n\t\t\t\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: e})\n\t\t\t\t\t\t\t\tstart = e + 1;\n\t\t\t\t\t\t\t\toutputLine++;\n\t\t\t\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t\t\t\t\tlbi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmeasureNumber++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: voice.length})\n\t\t\t\t\toutputLine++;\n\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine })\n\t\t\toutputLine++;\n\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t}\n\t}\n\treturn lineBreakIndexes;\n}\n\n\nfunction freeFormLineBreaks(widths, lineBreakPoint) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar totalThisLine = 0;\n\t// run through each measure and see if the accumulation is less than the ideal.\n\t// if it passes the ideal, then see whether the last or this one is closer to the ideal.\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tvar width = widths[i];\n\t\tvar attemptedWidth = totalThisLine + width;\n\t\tif (attemptedWidth < lineBreakPoint)\n\t\t\ttotalThisLine = attemptedWidth;\n\t\telse {\n\t\t\t// This just passed the ideal, so see whether the previous or the current number of measures is closer.\n\t\t\tvar oldDistance = lineBreakPoint - totalThisLine;\n\t\t\tvar newDistance = attemptedWidth - lineBreakPoint;\n\t\t\tif (oldDistance < newDistance && totalThisLine > 0) {\n\t\t\t\tlineBreaks.push(i - 1);\n\t\t\t\ttotals.push(Math.round(totalThisLine - width));\n\t\t\t\ttotalThisLine = width;\n\t\t\t} else {\n\t\t\t\tif (i < widths.length-1) {\n\t\t\t\t\tlineBreaks.push(i);\n\t\t\t\t\ttotals.push(Math.round(totalThisLine));\n\t\t\t\t\ttotalThisLine = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttotals.push(Math.round(totalThisLine));\n\treturn { lineBreaks: lineBreaks, totals: totals };\n}\n\nfunction clone(arr) {\n\tvar newArr = [];\n\tfor (var i = 0; i < arr.length; i++)\n\t\tnewArr.push(arr[i]);\n\treturn newArr;\n}\n\nfunction oneTry(measureWidths, idealWidths, accumulator, lineAccumulator, lineWidths, lastVariance, highestVariance, currLine, lineBreaks, startIndex, otherTries) {\n\tfor (var i = startIndex; i < measureWidths.length; i++) {\n\t\tvar measureWidth = measureWidths[i];\n\t\taccumulator += measureWidth;\n\t\tlineAccumulator += measureWidth;\n\t\tvar thisVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\tvar varianceIsClose = Math.abs(thisVariance - lastVariance) < idealWidths[0] / 10; // see if the difference is less than 10%, if so, run the test both ways.\n\t\tif (varianceIsClose) {\n\t\t\tif (thisVariance < lastVariance) {\n\t\t\t\t// Also attempt one less measure on the current line - sometimes that works out better.\n\t\t\t\tvar newWidths = clone(lineWidths);\n\t\t\t\tvar newBreaks = clone(lineBreaks);\n\t\t\t\tnewBreaks.push(i-1);\n\t\t\t\tnewWidths.push(lineAccumulator - measureWidth);\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: measureWidth,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: Math.abs(accumulator - idealWidths[currLine+1]),\n\t\t\t\t\thighestVariance: Math.max(highestVariance, lastVariance),\n\t\t\t\t\tcurrLine: currLine+1,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t} else if (thisVariance > lastVariance && i < measureWidths.length-1) {\n\t\t\t\t// Also attempt one extra measure on this line.\n\t\t\t\tnewWidths = clone(lineWidths);\n\t\t\t\tnewBreaks = clone(lineBreaks);\n\t\t\t\t// newBreaks[newBreaks.length-1] = i;\n\t\t\t\t// newWidths[newWidths.length-1] = lineAccumulator;\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: lineAccumulator,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: thisVariance,\n\t\t\t\t\thighestVariance: Math.max(highestVariance, thisVariance),\n\t\t\t\t\tcurrLine: currLine,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t}\n\t\t}\n\t\tif (thisVariance > lastVariance) {\n\t\t\tlineBreaks.push(i - 1);\n\t\t\tcurrLine++;\n\t\t\thighestVariance = Math.max(highestVariance, lastVariance);\n\t\t\tlastVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\t\tlineWidths.push(lineAccumulator - measureWidth);\n\t\t\tlineAccumulator = measureWidth;\n\t\t} else {\n\t\t\tlastVariance = thisVariance;\n\t\t}\n\t}\n\tlineWidths.push(lineAccumulator);\n}\n\nfunction optimizeLineWidths(widths, lineBreakPoint, lineBreaks, explanation) {\n\t//\tfigure out how many lines\n\tvar numLines = Math.ceil(widths.total / lineBreakPoint); // + 1 TODO-PER: this used to be plus one - not sure why\n\n\t//\tget the ideal width for a line (cumulative width / num lines) - approx the same as lineBreakPoint except for rounding\n\tvar idealWidth = Math.floor(widths.total / numLines);\n\n\t//\tget each ideal line width (1*ideal, 2*ideal, 3*ideal, etc)\n\tvar idealWidths = [];\n\tfor (var i = 0; i < numLines; i++)\n\t\tidealWidths.push(idealWidth*(i+1));\n\n\t//\tfrom first measure, step through accum. Widths until the abs of the ideal is greater than the last one.\n\t// This can sometimes look funny in edge cases, so when the length is within 10%, try one more or one less to see which is better.\n\t// This is better than trying all the possibilities because that would get to be a huge number for even a medium size piece.\n\t// This method seems to never generate more than about 16 tries and it is usually 4 or less.\n\tvar otherTries = [];\n\totherTries.push({\n\t\taccumulator: 0,\n\t\tlineAccumulator: 0,\n\t\tlineWidths: [],\n\t\tlastVariance: 999999,\n\t\thighestVariance: 0,\n\t\tcurrLine: 0,\n\t\tlineBreaks: [], // These are the zero-based last measure on each line\n\t\tstartIndex: 0});\n\tvar index = 0;\n\twhile (index < otherTries.length) {\n\t\toneTry(widths.measureWidths,\n\t\t\tidealWidths,\n\t\t\totherTries[index].accumulator,\n\t\t\totherTries[index].lineAccumulator,\n\t\t\totherTries[index].lineWidths,\n\t\t\totherTries[index].lastVariance,\n\t\t\totherTries[index].highestVariance,\n\t\t\totherTries[index].currLine,\n\t\t\totherTries[index].lineBreaks,\n\t\t\totherTries[index].startIndex,\n\t\t\totherTries);\n\t\tindex++;\n\t}\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\tvar otherTry = otherTries[i];\n\t\totherTry.variances = [];\n\t\totherTry.aveVariance = 0;\n\t\tfor (var j = 0; j < otherTry.lineWidths.length; j++) {\n\t\t\tvar lineWidth = otherTry.lineWidths[j];\n\t\t\totherTry.variances.push(lineWidth - idealWidths[0]);\n\t\t\totherTry.aveVariance += Math.abs(lineWidth - idealWidths[0]);\n\t\t}\n\t\totherTry.aveVariance =  otherTry.aveVariance / otherTry.lineWidths.length;\n\t\texplanation.attempts.push({ type: \"optimizeLineWidths\", lineBreaks: otherTry.lineBreaks, variances: otherTry.variances, aveVariance: otherTry.aveVariance, widths: widths.measureWidths });\n\t}\n\tvar smallest = 9999999;\n\tvar smallestIndex = -1;\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\totherTry = otherTries[i];\n\t\tif (otherTry.aveVariance < smallest) {\n\t\t\tsmallest = otherTry.aveVariance;\n\t\t\tsmallestIndex = i;\n\t\t}\n\t}\n\treturn { failed: false, lineBreaks: otherTries[smallestIndex].lineBreaks, variance: otherTries[smallestIndex].highestVariance };\n}\n\nfunction fixedMeasureLineBreaks(widths, lineBreakPoint, preferredMeasuresPerLine) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar thisWidth = 0;\n\tvar failed = false;\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tthisWidth += widths[i];\n\t\tif (thisWidth > lineBreakPoint) {\n\t\t\tfailed = true;\n\t\t}\n\t\tif (i % preferredMeasuresPerLine === (preferredMeasuresPerLine-1)) {\n\t\t\tif (i !== widths.length-1) // Don't bother putting a line break for the last line - it's already a break.\n\t\t\t\tlineBreaks.push(i);\n\t\t\ttotals.push(Math.round(thisWidth));\n\t\t\tthisWidth = 0;\n\t\t}\n\t}\n\treturn { failed: failed, totals: totals, lineBreaks: lineBreaks };\n}\n\nfunction getRevisedTuneParams(lineBreaks, staffWidth, params) {\n\n\tvar revisedParams = {\n\t\tlineBreaks: lineBreaks,\n\t\tstaffwidth: staffWidth\n\t};\n\tfor (var key in params) {\n\t\tif (params.hasOwnProperty(key) && key !== 'wrap' && key !== 'staffwidth') {\n\t\t\trevisedParams[key] = params[key];\n\t\t}\n\t}\n\n\treturn { revisedParams: revisedParams };\n}\n\nfunction calcLineWraps(tune, widths, params) {\n\t// For calculating how much can go on the line, it depends on the width of the line. It is a convenience to just divide it here\n\t// by the minimum spacing instead of multiplying the min spacing later.\n\t// The scaling works differently: this is done by changing the scaling of the outer SVG, so the scaling needs to be compensated\n\t// for here, because the actual width will be different from the calculated numbers.\n\n\t// If the desired width is less than the margin, just punt and return the original tune\n\t//console.log(widths)\n\tif (widths.length === 0 || params.staffwidth < widths[0].left) {\n\t\treturn {\n\t\t\treParse: false,\n\t\t\texplanation: \"Staff width is narrower than the margin\",\n\t\t\trevisedParams: params\n\t\t};\n\t}\n\tvar scale = params.scale ? Math.max(params.scale, 0.1) : 1;\n\tvar minSpacing = params.wrap.minSpacing ? Math.max(parseFloat(params.wrap.minSpacing), 1) : 1;\n\tvar minSpacingLimit = params.wrap.minSpacingLimit ? Math.max(parseFloat(params.wrap.minSpacingLimit), 1) : minSpacing - 0.1;\n\tvar maxSpacing = params.wrap.maxSpacing ? Math.max(parseFloat(params.wrap.maxSpacing), 1) : undefined;\n\tif (params.wrap.lastLineLimit && !maxSpacing)\n\t\tmaxSpacing = Math.max(parseFloat(params.wrap.lastLineLimit), 1);\n\t// var targetHeight = params.wrap.targetHeight ? Math.max(parseInt(params.wrap.targetHeight, 10), 100) : undefined;\n\tvar preferredMeasuresPerLine = params.wrap.preferredMeasuresPerLine ? Math.max(parseInt(params.wrap.preferredMeasuresPerLine, 10), 0) : undefined;\n\n\tvar accumulatedLineBreaks = [];\n\tvar explanations = [];\n\tfor (var s = 0; s < widths.length; s++) {\n\t\tvar section = widths[s];\n\t\tvar usableWidth = params.staffwidth - section.left;\n\t\tvar lineBreakPoint = usableWidth / minSpacing / scale;\n\t\tvar minLineSize = usableWidth / maxSpacing / scale;\n\t\tvar allowableVariance = usableWidth / minSpacingLimit / scale;\n\t\tvar explanation = {\n\t\t\twidths: section,\n\t\t\tlineBreakPoint: lineBreakPoint,\n\t\t\tminLineSize: minLineSize,\n\t\t\tattempts: [],\n\t\t\tstaffWidth: params.staffwidth,\n\t\t\tminWidth: Math.round(allowableVariance)\n\t\t};\n\n\t\t// If there is a preferred number of measures per line, test that first. If none of the lines is too long, then we're finished.\n\t\tvar lineBreaks = null;\n\t\tif (preferredMeasuresPerLine) {\n\t\t\tvar f = fixedMeasureLineBreaks(section.measureWidths, lineBreakPoint, preferredMeasuresPerLine);\n\t\t\texplanation.attempts.push({\n\t\t\t\ttype: \"Fixed Measures Per Line\",\n\t\t\t\tpreferredMeasuresPerLine: preferredMeasuresPerLine,\n\t\t\t\tlineBreaks: f.lineBreaks,\n\t\t\t\tfailed: f.failed,\n\t\t\t\ttotals: f.totals\n\t\t\t});\n\t\t\tif (!f.failed)\n\t\t\t\tlineBreaks = f.lineBreaks;\n\t\t}\n\n\t\t// If we don't have lineBreaks yet, use the free form method of line breaks.\n\t\t// This will be called either if Preferred Measures is not used, or if the music is just weird - like a single measure is way too crowded.\n\t\tif (!lineBreaks) {\n\t\t\tvar ff = freeFormLineBreaks(section.measureWidths, lineBreakPoint);\n\t\t\texplanation.attempts.push({type: \"Free Form\", lineBreaks: ff.lineBreaks, totals: ff.totals});\n\t\t\tlineBreaks = ff.lineBreaks;\n\n\t\t\t// We now have an acceptable number of lines, but the measures may not be optimally distributed. See if there is a better distribution.\n\t\t\tif (lineBreaks.length > 0 && section.measureWidths.length < 25) {\n\t\t\t\t// Only do this if everything doesn't fit on one line.\n\t\t\t\t// This is an intensive operation and it is optional so just do it for shorter music.\n\t\t\t\tff = optimizeLineWidths(section, lineBreakPoint, lineBreaks, explanation);\n\t\t\t\texplanation.attempts.push({\n\t\t\t\t\ttype: \"Optimize\",\n\t\t\t\t\tfailed: ff.failed,\n\t\t\t\t\treason: ff.reason,\n\t\t\t\t\tlineBreaks: ff.lineBreaks,\n\t\t\t\t\ttotals: ff.totals\n\t\t\t\t});\n\t\t\t\tif (!ff.failed)\n\t\t\t\t\tlineBreaks = ff.lineBreaks;\n\t\t\t}\n\t\t}\n\t\taccumulatedLineBreaks.push(lineBreaks);\n\t\texplanations.push(explanation);\n\t}\n\t// If the vertical space exceeds targetHeight, remove a line and try again. If that is too crowded, then don't use it.\n\tvar staffWidth = params.staffwidth;\n\tvar ret = getRevisedTuneParams(accumulatedLineBreaks, staffWidth, params);\n\tret.explanation = explanations;\n\tret.reParse = true;\n\treturn ret;\n}\n\nmodule.exports = { wrapLines: wrapLines, calcLineWraps: calcLineWraps };\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/parse/wrap_lines.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/str/output.js":
/*!**********************************************!*\
  !*** ./node_modules/abcjs/src/str/output.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var keyAccidentals = __webpack_require__(/*! ../const/key-accidentals */ \"./node_modules/abcjs/src/const/key-accidentals.js\");\nvar { relativeMajor, transposeKey, relativeMode } = __webpack_require__(/*! ../const/relative-major */ \"./node_modules/abcjs/src/const/relative-major.js\");\nvar transposeChordName = __webpack_require__(/*! ../parse/transpose-chord */ \"./node_modules/abcjs/src/parse/transpose-chord.js\")\n\nvar strTranspose;\n\n(function () {\n\t\"use strict\";\n\tstrTranspose = function (abc, abcTune, steps) {\n\t\tif (abcTune === \"TEST\") // Backdoor way to get entry points for unit tests\n\t\t\treturn { keyAccidentals: keyAccidentals, relativeMajor: relativeMajor, transposeKey: transposeKey, relativeMode: relativeMode, transposeChordName: transposeChordName}\n\t\tsteps = parseInt(steps, 10)\n\t\tvar changes = [];\n\t\tvar i;\n\t\tfor (i = 0; i < abcTune.length; i++)\n\t\t\tchanges = changes.concat(transposeOneTune(abc, abcTune[i], steps))\n\n\t\t// Reverse sort so that we are replacing strings from the end to the beginning so that the indexes aren't invalidated as we go.\n\t\t// (Because voices can be written in different ways we can't count on the notes being encountered in the order they appear in the string.)\n\t\tchanges = changes.sort(function (a, b) {\n\t\t\treturn b.start - a.start\n\t\t})\n\t\tvar output = abc.split('')\n\t\tfor (i = 0; i < changes.length; i++) {\n\t\t\tvar ch = changes[i]\n\t\t\toutput.splice(ch.start, ch.end - ch.start, ch.note)\n\t\t}\n\t\treturn output.join('')\n\t}\n\n\tfunction transposeOneTune(abc, abcTune, steps) {\n\t\tvar changes = []\n\n\t\t// Don't transpose bagpipe music - that is a special case and is always a particular key\n\t\tvar key = abcTune.getKeySignature()\n\t\tif (key.root === 'Hp' || key.root === \"HP\")\n\t\t\treturn changes;\n\n\t\tchanges = changes.concat(changeAllKeySigs(abc, steps))\n\n\t\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\t\tvar staves = abcTune.lines[i].staff\n\t\t\tif (staves) {\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j]\n\t\t\t\t\tif (staff.clef.type !== \"perc\")\n\t\t\t\t\t\tchanges = changes.concat(transposeVoices(abc, staff.voices, staff.key, steps))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction changeAllKeySigs(abc, steps) {\n\t\tvar changes = [];\n\t\tvar arr = abc.split(\"K:\")\n\t\t// now each line except the first one will start with whatever is right after \"K:\"\n\t\tvar count = arr[0].length\n\t\tfor (var i = 1; i < arr.length; i++) {\n\t\t\tvar segment = arr[i]\n\t\t\tvar match = segment.match(/^( *)([A-G])([#b]?)(\\w*)/)\n\t\t\tif (match) {\n\t\t\t\tvar start = count + 2 + match[1].length // move past the 'K:' and optional white space\n\t\t\t\tvar key = match[2] + match[3] + match[4] // key name, accidental, and mode\n\t\t\t\tvar destinationKey = newKey({ root: match[2], acc: match[3], mode: match[4] }, steps)\n\t\t\t\tvar dest = destinationKey.root + destinationKey.acc + destinationKey.mode\n\t\t\t\tchanges.push({ start: start, end: start + key.length, note: dest })\n\t\t\t}\n\t\t\tcount += segment.length + 2\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction transposeVoices(abc, voices, key, steps) {\n\t\tvar changes = [];\n\t\tvar destinationKey = newKey(key, steps)\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tchanges = changes.concat(transposeVoice(abc, voices[i], key.root, createKeyAccidentals(key), destinationKey, steps))\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction createKeyAccidentals(key) {\n\t\tvar ret = {}\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tvar acc = key.accidentals[i];\n\t\t\tif (acc.acc === 'flat')\n\t\t\t\tret[acc.note.toUpperCase()] = '_'\n\t\t\telse if (acc.acc === 'sharp')\n\t\t\t\tret[acc.note.toUpperCase()] = '^'\n\t\t}\n\t\treturn ret\n\t}\n\n\tfunction setLetterDistance(destinationKey, keyRoot, steps) {\n\t\tvar letterDistance = letters.indexOf(destinationKey.root) - letters.indexOf(keyRoot)\n\t\tif (keyRoot === \"none\")\n\t\t\tletterDistance = letters.indexOf(destinationKey.root)\n\t\tif (letterDistance === 0) {\n\t\t\t// This could either be a half step (like Eb => E) or almost an octave (like E => Eb)\n\t\t\tif (steps > 2) // If it is a large leap, then we are going up an octave\n\t\t\t\tletterDistance += 7\n\t\t\telse if (steps === -12) // If it is a large leap, then we are going down an octave\t\n\t\t\t \tletterDistance -= 7\n\t\t} else if (steps > 0 && letterDistance < 0) \n\t\t\tletterDistance += 7\n\t\telse if (steps < 0 && letterDistance > 0) \n\t\t\tletterDistance -= 7\n\n\t\tif (steps > 12)\n\t\t\tletterDistance += 7\n\t\telse if (steps < -12)\n\t\t\tletterDistance -= 7\n\n\t\treturn letterDistance\n\t}\n\n\tfunction transposeVoice(abc, voice, keyRoot, keyAccidentals, destinationKey, steps) {\n\t\tvar changes = []\n\t\tvar letterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\n\t\tvar measureAccidentals = {}\n\t\tvar transposedMeasureAccidentals = {}\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tvar el = voice[i];\n\t\t\tif (el.chord) {\n\t\t\t\tfor (var c = 0; c < el.chord.length; c++) {\n\t\t\t\t\tvar ch = el.chord[c]\n\t\t\t\t\tif (ch.position === 'default') {\n\t\t\t\t\t\tvar prefersFlats = destinationKey.accidentals.length && destinationKey.accidentals[0].acc === 'flat'\n\t\t\t\t\t\tvar newChord = transposeChordName(ch.name, steps, prefersFlats, true)\n\t\t\t\t\t\tnewChord = newChord.replace(/♭/g, \"b\").replace(/♯/g, \"#\")\n\t\t\t\t\t\tif (newChord !== ch.name) // If we didn't recognize the chord the input is returned unchanged and there is nothing to replace\n\t\t\t\t\t\t\tchanges.push(replaceChord(abc, el.startChar, el.endChar, newChord))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.el_type === 'note' && el.pitches) {\n\t\t\t\tfor (var j = 0; j < el.pitches.length; j++) {\n\t\t\t\t\tvar note = parseNote(el.pitches[j].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\tif (note.acc)\n\t\t\t\t\t\tmeasureAccidentals[note.name.toUpperCase()] = note.acc\n\t\t\t\t\tvar newPitch = transposePitch(note, destinationKey, letterDistance, transposedMeasureAccidentals)\n\t\t\t\t\tif (newPitch.acc)\n\t\t\t\t\t\ttransposedMeasureAccidentals[newPitch.upper] = newPitch.acc\n\t\t\t\t\tchanges.push(replaceNote(abc, el.startChar, el.endChar, newPitch.acc + newPitch.name, j))\n\t\t\t\t}\n\t\t\t\tif (el.gracenotes) {\n\t\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\t\tvar grace = parseNote(el.gracenotes[g].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\t\tif (grace.acc)\n\t\t\t\t\t\t\tmeasureAccidentals[grace.name.toUpperCase()] = grace.acc\n\t\t\t\t\t\tvar newGrace = transposePitch(grace, destinationKey, letterDistance, measureAccidentals)\n\t\t\t\t\t\tif (newGrace.acc)\n\t\t\t\t\t\t\ttransposedMeasureAccidentals[newGrace.upper] = newGrace.acc\n\t\t\t\t\t\tchanges.push(replaceGrace(abc, el.startChar, el.endChar, newGrace.acc + newGrace.name, g))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (el.el_type === \"bar\") {\n\t\t\t\tmeasureAccidentals = {}\n\t\t\t\ttransposedMeasureAccidentals = {}\n\t\t\t} else if (el.el_type === \"keySignature\") {\n\t\t\t\tkeyRoot = el.root\n\t\t\t\tkeyAccidentals = createKeyAccidentals(el)\n\t\t\t\tdestinationKey = newKey(el, steps)\n\t\t\t\tletterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tvar letters = \"CDEFGAB\"\n\tvar octaves = [\",,,,\", \",,,\", \",,\", \",\", \"\", \"'\", \"''\", \"'''\", \"''''\"]\n\n\tfunction newKey(key, steps) {\n\t\tif (key.root === \"none\") {\n\t\t\treturn { root: transposeKey(\"C\", steps), mode: \"\", acc: \"\", accidentals: [] }\n\t\t}\n\t\tvar major = relativeMajor(key.root + key.acc + key.mode)\n\t\tvar newMajor = transposeKey(major, steps)\n\t\tvar newMode = relativeMode(newMajor, key.mode)\n\t\tvar acc = keyAccidentals(newMajor)\n\t\treturn { root: newMode[0], mode: key.mode, acc: newMode.length > 1 ? newMode[1] : '', accidentals: acc }\n\t}\n\n\tfunction transposePitch(note, key, letterDistance, measureAccidentals) {\n\t\t// Depending on what the current note and new note are, the octave might have changed\n\t\t// The letterDistance is how far the change is to see if we passed \"C\" when transposing.\n\n\t\tvar pitch = note.pitch\n\t\tvar origDistFromC = letters.indexOf(note.name)\n\t\tvar root = letters.indexOf(key.root)\n\t\tvar index = (root + pitch) % 7\n\t\t// if the note crosses \"c\" then the octave changes, so that is true of \"B\" when going up one step, \"A\" and \"B\" when going up two steps, etc., and reverse when going down.\n\t\tvar newDistFromC = origDistFromC + letterDistance\n\t\tvar oct = note.oct\n\t\twhile (newDistFromC > 6) {\n\t\t\toct++\n\t\t\tnewDistFromC -= 7\n\t\t}\n\t\twhile (newDistFromC < 0) {\n\t\t\toct--\n\t\t\tnewDistFromC += 7\n\t\t}\n\n\t\tvar name = letters[index]\n\n\t\tvar acc = '';\n\t\tvar adj = note.adj\n\t\t// the amount of adjustment depends on the key - if there is a sharp in the key sig, then -1 is a natural, if there isn't, then -1 is a flat.\n\t\tvar keyAcc = '=';\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].note.toLowerCase() === name.toLowerCase()) {\n\t\t\t\tadj = adj + (key.accidentals[i].acc === 'flat' ? -1 : 1)\n\t\t\t\tkeyAcc = (key.accidentals[i].acc === 'flat' ? '_' : '^')\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tswitch (adj) {\n\t\t\tcase -2: acc = \"__\"; break;\n\t\t\tcase -1: acc = \"_\"; break;\n\t\t\tcase 0: acc = \"=\"; break;\n\t\t\tcase 1: acc = \"^\"; break;\n\t\t\tcase 2: acc = \"^^\"; break;\n\t\t\tcase -3:\n\t\t\t\t// This requires a triple flat, so bump down the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch - 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) - 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"B\"\n\t\t\t\t\tnewNote.oct--\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"B\" || newNote.name === \"E\")\n\t\t\t\t\tnewNote.adj = note.adj + 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj + 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t\tcase 3:\n\t\t\t\t// This requires a triple sharp, so bump up the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch + 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) + 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"C\"\n\t\t\t\t\tnewNote.oct++\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"C\" || newNote.name === \"F\")\n\t\t\t\t\tnewNote.adj = note.adj - 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj - 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t}\n\t\tif ((measureAccidentals[name] === acc || (!measureAccidentals[name] && acc === keyAcc)) && !note.courtesy)\n\t\t\tacc = \"\"\n\n\t\tswitch (oct) {\n\t\t\tcase 0: name = name + \",,,\"; break;\n\t\t\tcase 1: name = name + \",,\"; break;\n\t\t\tcase 2: name = name + \",\"; break;\n\t\t\t// case 3: it is already correct\n\t\t\tcase 4: name = name.toLowerCase(); break;\n\t\t\tcase 5: name = name.toLowerCase() + \"'\"; break;\n\t\t\tcase 6: name = name.toLowerCase() + \"''\"; break;\n\t\t\tcase 7: name = name.toLowerCase() + \"'''\"; break;\n\t\t\tcase 8: name = name.toLowerCase() + \"''''\"; break;\n\t\t}\n\t\tif (oct > 4)\n\t\t\tname = name.toLowerCase();\n\n\t\treturn { acc: acc, name: name, upper: name.toUpperCase() }\n\t}\n\n\tvar regPitch = /([_^=]*)([A-Ga-g])([,']*)/\n\tvar regNote = /([_^=]*[A-Ga-g][,']*)(\\d*\\/*\\d*)([\\>\\<\\-\\)\\.\\s\\\\]*)/\n\tvar regOptionalNote = /([_^=]*[A-Ga-g][,']*)?(\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)?/\n\tvar regSpace = /(\\s*)$/\n\n\t// This the relationship of the note to the tonic and an octave. So what is returned is a distance in steps from the tonic and the amount of adjustment from\n\t// a normal scale. That is - in the key of D an F# is two steps from the tonic and no adjustment. A G# is three steps from the tonic and one half-step higher.\n\t// I don't think there is any adjustment needed for minor keys since the adjustment is based on the key signature and the accidentals.\n\tfunction parseNote(note, keyRoot, keyAccidentals, measureAccidentals) {\n\t\tvar root = keyRoot === \"none\" ? 0 : letters.indexOf(keyRoot)\n\t\tvar reg = note.match(regPitch)\n\t\t// reg[1] : \"__\", \"_\", \"\", \"=\", \"^\", or \"^^\"\n\t\t// reg[2] : A-G a-g\n\t\t// reg[3] : commas or apostrophes\n\t\tvar name = reg[2].toUpperCase()\n\t\tvar pos = letters.indexOf(name) - root;\n\t\tif (pos < 0) pos += 7\n\t\tvar oct = octaves.indexOf(reg[3])\n\t\tif (name === reg[2]) // See if it is a capital letter and subtract an octave if so.\n\t\t\toct--;\n\t\tvar currentAcc = measureAccidentals[name] || keyAccidentals[name] || \"=\" //  use the key accidentals if they exist, but override with the measure accidentals, and if neither of them exist, use a natural.\n\t\treturn { acc: reg[1], name: name, pitch: pos, oct: oct, adj: calcAdjustment(reg[1], keyAccidentals[name], measureAccidentals[name]), courtesy: reg[1] === currentAcc }\n\t}\n\n\tfunction replaceNote(abc, start, end, newPitch, index) {\n\t\t// There may be more than just the note between the start and end - there could be spaces, there could be a chord symbol, there could be a decoration.\n\t\t// This could also be a part of a chord. If so, then the particular note needs to be teased out.\n\t\tvar note = abc.substring(start, end)\n\t\tvar match = note.match(new RegExp(regNote.source + regSpace.source), '')\n\t\tif (match) {\n\t\t\t// This will match a single note\n\t\t\tvar noteLen = match[1].length\n\t\t\tvar trailingLen = match[2].length + match[3].length + match[4].length\n\t\t\tvar leadingLen = end - start - noteLen - trailingLen\n\t\t\tstart += leadingLen\n\t\t\tend -= trailingLen\n\t\t} else {\n\t\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\t\tvar regPreBracket = /([^\\[]*)/\n\t\t\tvar regOpenBracket = /\\[/\n\t\t\tvar regCloseBracket = /\\-?](\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)/\n\t\t\tmatch = note.match(new RegExp(regPreBracket.source + regOpenBracket.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regCloseBracket.source + regSpace.source))\n\n\t\t\tif (match) {\n\t\t\t\t// This will match a chord\n\t\t\t\t// Get the number of chars used by the previous notes in this chord\n\t\t\t\tvar count = 1 + match[1].length // one character for the open bracket\n\t\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\t}\n\t\t\t\tstart += count\n\t\t\t\tvar endLen = match[index * 3 + 2] ? match[index * 3 + 2].length : 0\n\t\t\t\t// endLen += match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\t\t// endLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\n\t\t\t\tend = start + endLen\n\t\t\t}\n\t\t}\n\t\treturn { start: start, end: end, note: newPitch }\n\t}\n\n\tfunction replaceGrace(abc, start, end, newGrace, index) {\n\t\tvar note = abc.substring(start, end)\n\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\tvar regOpenBrace = /\\{/\n\t\tvar regCloseBrace = /\\}/\n\t\tvar regPreBrace = /([^\\{]*)/\n\t\tvar regPreNote = /(\\/*)/\n\t\tvar match = note.match(new RegExp(regPreBrace.source + regOpenBrace.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regCloseBrace.source))\n\t\tif (match) {\n\t\t\t// This will match all notes inside a grace symbol\n\t\t\t// Get the number of chars used by the previous graces\n\t\t\tvar count = 1 + match[1].length // one character for the open brace, and whatever comes before the brace\n\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\tif (match[i * 3 + 5])\n\t\t\t\t\tcount += match[i * 3 + 5].length\n\t\t\t}\n\t\t\tif (match[index * 3 + 2])\n\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\tstart += count\n\t\t\tvar endLen = match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\tendLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\t\t\tendLen += match[index * 3 + 5] ? match[index * 3 + 5].length : 0\n\n\t\t\tend = start + endLen\n\t\t}\n\t\treturn { start: start, end: end, note: newGrace }\n\t}\n\n\tfunction replaceChord(abc, start, end, newChord) {\n\t\t// Isolate the chord and just replace that\n\t\tvar match = abc.substring(start, end).match(/([^\"]+)?(\".+\")+/)\n\t\tif (match[1])\n\t\t\tstart += match[1].length\n\t\tend = start + match[2].length\n\t\t// leave the quote in, so skip one more\n\t\treturn { start: start + 1, end: end - 1, note: newChord }\n\t}\n\n\tfunction calcAdjustment(thisAccidental, keyAccidental, measureAccidental) {\n\t\tif (!thisAccidental && measureAccidental) {\n\t\t\t// There was no accidental on this note, but there was earlier in the measure, so we'll use that\n\t\t\tthisAccidental = measureAccidental\n\t\t}\n\t\tif (!thisAccidental)\n\t\t\treturn 0; // there is no deviation from the key.\n\n\t\tswitch (keyAccidental) {\n\t\t\tcase undefined:\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -2;\n\t\t\t\t\tcase '_': return -1;\n\t\t\t\t\tcase '=': return 0;\n\t\t\t\t\tcase '^': return 1;\n\t\t\t\t\tcase '^^': return 2;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '_':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -1;\n\t\t\t\t\tcase '_': return 0;\n\t\t\t\t\tcase '=': return 1;\n\t\t\t\t\tcase '^': return 2;\n\t\t\t\t\tcase '^^': return 3;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '^':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -3;\n\t\t\t\t\tcase '_': return -2;\n\t\t\t\t\tcase '=': return -1;\n\t\t\t\t\tcase '^': return 0;\n\t\t\t\t\tcase '^^': return 1;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t}\n\t\treturn 0// this should never happen\n\t}\n})();\n\nmodule.exports = strTranspose;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/str/output.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/abc_midi_flattener.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/abc_midi_flattener.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_midi_flattener.js: Turn a linear series of events into a series of MIDI commands.\n\n// We input a set of voices, but the notes are still complex. This pass changes the logical definitions\n// of the grace notes, decorations, ties, triplets, rests, transpositions, keys, and accidentals into actual note durations.\n// It also extracts guitar chords to a separate voice and resolves their rhythm.\n\nvar flatten;\nvar ChordTrack = __webpack_require__(/*! ./chord-track */ \"./node_modules/abcjs/src/synth/chord-track.js\");\nvar pitchesToPerc = __webpack_require__(/*! ./pitches-to-perc */ \"./node_modules/abcjs/src/synth/pitches-to-perc.js\");\n\n(function() {\n\t\"use strict\";\n\n\tvar barAccidentals;\n\tvar accidentals;\n\tvar transpose;\n\tvar bagpipes;\n\tvar tracks;\n\tvar startingTempo;\n\tvar startingMeter;\n\tvar tempoChangeFactor = 1;\n\tvar instrument;\n\tvar currentInstrument;\n\t// var channel;\n\tvar currentTrack;\n\tvar lastNoteDurationPosition;\n\tvar currentTrackName;\n\tvar lastEventTime;\n\tvar chordTrack;\n\n\tvar meter = { num: 4, den: 4 };\n\tvar drumInstrument = 128;\n\tvar lastBarTime;\n\tvar doBeatAccents = true;\n\tvar stressBeat1 = 105;\n\tvar stressBeatDown = 95;\n\tvar stressBeatUp = 85;\n\tvar beatFraction = 0.25;\n\tvar nextVolume;\n\tvar nextVolumeDelta;\n\tvar slurCount = 0;\n\n\tvar drumTrack;\n\tvar drumTrackFinished;\n\tvar drumDefinition = {};\n\tvar drumBars;\n\n\tvar pickupLength = 0;\n\tvar percmap;\n\n\t// The gaps per beat. The first two are in seconds, the third is in fraction of a duration.\n\tvar normalBreakBetweenNotes = 0; //0.000520833333325*1.5; // for articulation (matches muse score value)\n\tvar slurredBreakBetweenNotes = -0.001; // make the slurred notes actually overlap\n\tvar staccatoBreakBetweenNotes = 0.4; // some people say staccato is half duration, some say 3/4 so this splits it\n\n\tflatten = function(voices, options, percmap_, midiOptions) {\n\t\tif (!options) options = {};\n\t\tif (!midiOptions) midiOptions = {};\n\t\tbarAccidentals = [];\n\t\taccidentals = [0,0,0,0,0,0,0];\n\t\tbagpipes = false;\n\t\ttracks = [];\n\t\tstartingTempo = options.qpm;\n\t\tstartingMeter = undefined;\n\t\ttempoChangeFactor = 1;\n\t\tinstrument = undefined;\n\t\tcurrentInstrument = undefined;\n\t\t// channel = undefined;\n\t\tcurrentTrack = undefined;\n\t\tcurrentTrackName = undefined;\n\t\tlastEventTime = 0;\n\t\tpercmap = percmap_;\n\n\t\tmeter = { num: 4, den: 4 };\n\n\t\tdoBeatAccents = true;\n\t\tstressBeat1 = 105;\n\t\tstressBeatDown = 95;\n\t\tstressBeatUp = 85;\n\t\tbeatFraction = 0.25;\n\t\tnextVolume = undefined;\n\t\tnextVolumeDelta = undefined;\n\t\tslurCount = 0;\n\n\t\t// For the drum/metronome track.\n\t\tdrumTrack = [];\n\t\tdrumTrackFinished = false;\n\t\tdrumDefinition = {};\n\t\tdrumBars = 1;\n\n\t\tif (voices.length > 0 && voices[0].length > 0)\n\t\t\tpickupLength = voices[0][0].pickupLength;\n\n\t\t// For resolving chords.\n\t\tif (options.bassprog !== undefined && !midiOptions.bassprog)\n\t\t\tmidiOptions.bassprog = [options.bassprog]\n\t\tif (options.bassvol !== undefined && !midiOptions.bassvol)\n\t\t\tmidiOptions.bassvol = [options.bassvol]\n\t\tif (options.chordprog !== undefined && !midiOptions.chordprog)\n\t\t\tmidiOptions.chordprog = [options.chordprog]\n\t\tif (options.chordvol !== undefined && !midiOptions.chordvol)\n\t\t\tmidiOptions.chordvol = [options.chordvol]\n\t\tif (options.gchord !== undefined && !midiOptions.gchord)\n\t\t\tmidiOptions.gchord = [options.gchord]\n\t\tchordTrack = new ChordTrack(voices.length, options.chordsOff, midiOptions, meter)\n\n\t\t// First adjust the input to resolve ties, set the starting time for each note, etc. That will make the rest of the logic easier\n\t\tpreProcess(voices, options);\n\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\ttranspose = 0;\n\t\t\tchordTrack.setTranspose(transpose)\n\t\t\tlastNoteDurationPosition = -1;\n\t\t\tvar voice = voices[i];\n\t\t\tcurrentTrack = [{ cmd: 'program', channel: i, instrument: instrument }];\n\t\t\tcurrentTrackName = undefined;\n\t\t\tlastBarTime = 0;\n\t\t\tchordTrack.setLastBarTime(0)\n\t\t\tvar voiceOff = false;\n\t\t\tif (options.voicesOff === true)\n\t\t\t\tvoiceOff = true;\n\t\t\telse if (options.voicesOff && options.voicesOff.length && options.voicesOff.indexOf(i) >= 0)\n\t\t\t\tvoiceOff = true;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\t\t\t\tswitch (element.el_type) {\n\t\t\t\t\tcase \"name\":\n\t\t\t\t\t\tcurrentTrackName = {cmd: 'text', type: \"name\", text: element.trackName };\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\twriteNote(element, voiceOff);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\taccidentals = setKeySignature(element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\tif (!startingMeter)\n\t\t\t\t\t\t\tstartingMeter = element;\n\t\t\t\t\t\tmeter = element;\n\t\t\t\t\t\tchordTrack.setMeter(meter)\n\t\t\t\t\t\tbeatFraction = getBeatFraction(meter);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttempoChangeFactor = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\t\tchordTrack.setTempoChangeFactor(tempoChangeFactor)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\ttranspose = element.transpose;\n\t\t\t\t\t\tchordTrack.setTranspose(transpose)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\tchordTrack.barEnd(element)\n\n\t\t\t\t\t\tbarAccidentals = [];\n\t\t\t\t\t\tif (i === 0) // Only write the drum part on the first voice so that it is not duplicated.\n\t\t\t\t\t\t\twriteDrum(voices.length+1);\n\t\t\t\t\t\t\tchordTrack.setRhythmHead(false) // decide whether there are rhythm heads each measure.\n\t\t\t\t\t\tlastBarTime = timeToRealTime(element.time);\n\t\t\t\t\t\tchordTrack.setLastBarTime(lastBarTime)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bagpipes\":\n\t\t\t\t\t\tbagpipes = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"instrument\":\n\t\t\t\t\t\tif (instrument === undefined)\n\t\t\t\t\t\t\tinstrument = element.program;\n\t\t\t\t\t\tcurrentInstrument = element.program;\n\t\t\t\t\t\tif (currentTrack.length > 0 && currentTrack[currentTrack.length-1].cmd === 'program')\n\t\t\t\t\t\t\tcurrentTrack[currentTrack.length-1].instrument = element.program;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar ii;\n\t\t\t\t\t\t\tfor (ii = currentTrack.length-1; ii >= 0 && currentTrack[ii].cmd !== 'program'; ii--)\n\t\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\tif (ii < 0 || currentTrack[ii].instrument !== element.program)\n\t\t\t\t\t\t\t\tcurrentTrack.push({cmd: 'program', channel: 0, instrument: element.program});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\tsetChannel(element.channel);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"drum\":\n\t\t\t\t\t\tdrumDefinition = normalizeDrumDefinition(element.params);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchordOn\":\n\t\t\t\t\t\tchordTrack.gChordOn(element)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\tstressBeat1 = element.beats[0];\n\t\t\t\t\t\tstressBeatDown = element.beats[1];\n\t\t\t\t\t\tstressBeatUp = element.beats[2];\n\t\t\t\t\t\t// TODO-PER: also use the last parameter - which changes which beats are strong.\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\tnextVolume = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\tnextVolumeDelta = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\tdoBeatAccents = element.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\tcase \"bassprog\":\n\t\t\t\t\tcase \"chordprog\":\n\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\tcase \"gchordbars\":\n\t\t\t\t\t\tchordTrack.paramChange(element)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// This should never happen\n\t\t\t\t\t\tconsole.log(\"MIDI creation. Unknown el_type: \" + element.el_type + \"\\n\");// jshint ignore:line\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentTrack[0].instrument === undefined)\n\t\t\t\tcurrentTrack[0].instrument = instrument ? instrument : 0;\n\t\t\tif (currentTrackName)\n\t\t\t\tcurrentTrack.unshift(currentTrackName);\n\t\t\ttracks.push(currentTrack);\n\t\t\tchordTrack.finish()\n\t\t\tif (drumTrack.length > 0) // Don't do drums on more than one track, so turn off drum after we create it.\n\t\t\t\tdrumTrackFinished = true;\n\t\t}\n\t\t// See if any notes are octaves played at the same time. If so, raise the pitch of the higher one.\n\t\tif (options.detuneOctave)\n\t\t\tfindOctaves(tracks, parseInt(options.detuneOctave, 10));\n\n\t\tchordTrack.addTrack(tracks)\n\t\tif (drumTrack.length > 0)\n\t\t\ttracks.push(drumTrack);\n\n\t\treturn { tempo: startingTempo, instrument: instrument, tracks: tracks, totalDuration: lastEventTime };\n\t};\n\n\tfunction setChannel(channel) {\n\t\tfor (var i = currentTrack.length-1; i>=0; i--) {\n\t\t\tif (currentTrack[i].cmd === \"program\") {\n\t\t\t\tcurrentTrack[i].channel = channel;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction timeToRealTime(time) {\n\t\treturn time/1000000;\n\t}\n\n\tfunction durationRounded(duration) {\n\t\treturn Math.round(duration*tempoChangeFactor*1000000)/1000000;\n\t}\n\n\tfunction preProcess(voices, options) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar ties = {};\n\t\t\tvar startingTempo = options.qpm;\n\t\t\tvar timeCounter = 0;\n\t\t\tvar tempoMultiplier = 1;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\n\t\t\t\tif (element.el_type === 'tempo') {\n\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\telse\n\t\t\t\t\t\ttempoMultiplier = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// For convenience, put the current time in each event so that it doesn't have to be calculated in the complicated stuff that follows.\n\t\t\t\telement.time = timeCounter;\n\t\t\t\tvar thisDuration = element.duration ? element.duration : 0;\n\t\t\t\ttimeCounter += Math.round(thisDuration*tempoMultiplier*1000000); // To compensate for JS rounding problems, do all intermediate calcs on integers.\n\n\t\t\t\t// If there are pitches then put the duration in the pitch object and if there are ties then change the duration of the first note in the tie.\n\t\t\t\tif (element.pitches) {\n\t\t\t\t\tfor (var k = 0; k < element.pitches.length; k++) {\n\t\t\t\t\t\tvar pitch = element.pitches[k];\n\t\t\t\t\t\tif (pitch) {\n\t\t\t\t\t\t\tpitch.duration = element.duration;\n\t\t\t\t\t\t\tif (pitch.startTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tif (ties[pitch.pitch] === undefined) // We might have three notes tied together - if so just add this duration.\n\t\t\t\t\t\t\t\t\tties[pitch.pitch] = {el: j, pitch: k};\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvoice[ties[pitch.pitch].el].pitches[ties[pitch.pitch].pitch].duration += pitch.duration;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//console.log(\">>> START\", JSON.stringify(ties));\n\t\t\t\t\t\t\t} else if (pitch.endTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tvar tie = ties[pitch.pitch];\n\t\t\t\t\t\t\t\t//console.log(\">>> END\", pitch.pitch, tie, JSON.stringify(ties));\n\t\t\t\t\t\t\t\tif (tie) {\n\t\t\t\t\t\t\t\t\tvar dur = pitch.duration;\n\t\t\t\t\t\t\t\t\tdelete voice[tie.el].pitches[tie.pitch].startTie;\n\t\t\t\t\t\t\t\t\tvoice[tie.el].pitches[tie.pitch].duration += dur;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t\tdelete ties[pitch.pitch];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdelete pitch.endTie;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdelete element.duration;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in ties) {\n\t\t\t\tif (ties.hasOwnProperty(key)) {\n\t\t\t\t\tvar item = ties[key];\n\t\t\t\t\tdelete voice[item.el].pitches[item.pitch].startTie;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// voices[0].forEach(v => delete v.elem)\n\t\t\t// voices[1].forEach(v => delete v.elem)\n\t\t\t// console.log(JSON.stringify(voices))\n\t\t}\n\t}\n\n\tfunction getBeatFraction(meter) {\n\t\tswitch (parseInt(meter.den,10)) {\n\t\t\tcase 2: return 0.5;\n\t\t\tcase 4: return 0.25;\n\t\t\tcase 8:\n\t\t\t\tif (meter.num % 3 === 0)\n\t\t\t\t\treturn 0.375;\n\t\t\t\telse\n\t\t\t\t\treturn 0.125;\n\t\t\tcase 16: return 0.125;\n\t\t}\n\t\treturn 0.25;\n\t}\n\n\tfunction calcBeat(measureStart, beatLength, currTime) {\n\t\tvar distanceFromStart = currTime - measureStart;\n\t\treturn distanceFromStart / beatLength;\n\t}\n\n\tfunction processVolume(beat, voiceOff) {\n\t\tif (voiceOff)\n\t\t\treturn 0;\n\n\t\tvar volume;\n    \t// MAE 21 Jun 2024 - This previously wasn't allowing zero volume to be applied\n\t\tif (nextVolume != undefined) {\n\t\t\tvolume = nextVolume;\n\t\t\tnextVolume = undefined;\n\t\t} else if (!doBeatAccents) {\n\t\t\tvolume = stressBeatDown;\n\t\t} else if (pickupLength > beat) {\n\t\t\tvolume = stressBeatUp;\n\t\t} else {\n\t\t\t//var barLength = meter.num / meter.den;\n\t\t\tvar barBeat = calcBeat(lastBarTime, getBeatFraction(meter), beat);\n\t\t\tif (barBeat === 0)\n\t\t\t\tvolume = stressBeat1;\n\t\t\telse if (parseInt(barBeat,10) === barBeat)\n\t\t\t\tvolume = stressBeatDown;\n\t\t\telse\n\t\t\t\tvolume = stressBeatUp;\n\t\t}\n\t\tif (nextVolumeDelta) {\n\t\t\tvolume += nextVolumeDelta;\n\t\t\tnextVolumeDelta = undefined;\n\t\t}\n\t\tif (volume < 0)\n\t\t\tvolume = 0;\n\t\tif (volume > 127)\n\t\t\tvolume = 127;\n\t\treturn voiceOff ? 0 : volume;\n\t}\n\n\n\tfunction findNoteModifications(elem, velocity) {\n\t\tvar ret = { };\n\t\tif (elem.decoration) {\n\t\t\tfor (var d = 0; d < elem.decoration.length; d++) {\n\t\t\t\tif (elem.decoration[d] === 'staccato')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'staccato';\n\t\t\t\telse if (elem.decoration[d] === 'tenuto')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'tenuto';\n\t\t\t\telse if (elem.decoration[d] === 'accent')\n\t\t\t\t\tret.velocity = Math.min(127, velocity * 1.5);\n\t\t\t\telse if (elem.decoration[d] === 'trill')\n\t\t\t\t\tret.noteModification = \"trill\";\n\t\t\t\telse if (elem.decoration[d] === 'lowermordent')\n\t\t\t\t\tret.noteModification = \"lowermordent\";\n\t\t\t\telse if (elem.decoration[d] === 'uppermordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'mordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'turn')\n\t\t\t\t\tret.noteModification = \"turn\";\n\t\t\t\telse if (elem.decoration[d] === 'roll')\n\t\t\t\t\tret.noteModification = \"roll\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction doModifiedNotes(noteModification, p) {\n\t\tvar noteTime;\n\t\tvar numNotes;\n\t\tvar start = p.start;\n\t\tvar pp;\n\t\tvar runningDuration = p.duration;\n\t\tvar shortestNote = durationRounded(1.0 / 32);\n\n\t\tswitch (noteModification) {\n\t\t\tcase \"trill\":\n\t\t\t\tvar note = 2;\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+note, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\tnote = (note === 2) ? 0 : 2;\n\t\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\t\tstart += shortestNote;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"mordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+2, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"lowermordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch-2, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"turn\":\n\t\t\t\tshortestNote = p.duration / 4;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+2, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch-1, volume: p.volume, start: start+shortestNote*2, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote*3, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tbreak;\n\t\t\tcase \"roll\":\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\trunningDuration -= shortestNote*2;\n\t\t\t\t\tstart += shortestNote*2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tfunction writeNote(elem, voiceOff) {\n\t\t//\n\t\t// Create a series of note events to append to the current track.\n\t\t// The output event is one of: { pitchStart: pitch_in_abc_units, volume: from_1_to_64 }\n\t\t// { pitchStop: pitch_in_abc_units }\n\t\t// { moveTime: duration_in_abc_units }\n\t\t// If there are guitar chords, then they are put in a separate track, but they have the same format.\n\t\t//\n\n\t\t//var trackStartingIndex = currentTrack.length;\n\n\t\tvar velocity = processVolume(timeToRealTime(elem.time), voiceOff);\n\t\tchordTrack.processChord(elem)\n\n\t\t// if there are grace notes, then also play them.\n\t\t// I'm not sure there is an exact rule for the length of the notes. My rule, unless I find\n\t\t// a better one is: the grace notes cannot take more than 1/2 of the main note's value.\n\t\t// A grace note (of 1/8 note duration) takes 1/8 of the main note's value.\n\t\tvar graces;\n\t\tif (elem.gracenotes && elem.pitches && elem.pitches.length > 0 && elem.pitches[0]) {\n\t\t\tgraces = processGraceNotes(elem.gracenotes, elem.pitches[0].duration);\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiGraceNotePitches = writeGraceNotes(graces, timeToRealTime(elem.time), velocity*2/3, currentInstrument); // make the graces a little quieter.\n\t\t}\n\n\t\t// The beat fraction is the note that gets a beat (.25 is a quarter note)\n\t\t// The tempo is in minutes and we want to get to milliseconds.\n\t\t// If the element is inside a repeat, there may be more than one value. If there is one value,\n\t\t// then just store that as a number. If there are more than one value, then change that to\n\t\t// an array and return all of them.\n\t\tif (elem.elem) {\n\t\t\tvar rt = timeToRealTime(elem.time);\n\t\t\tvar ms = rt / beatFraction / startingTempo * 60 * 1000;\n\t\t\tif (elem.elem.currentTrackMilliseconds === undefined) {\n\t\t\t\telem.elem.currentTrackMilliseconds = ms;\n\t\t\t\telem.elem.currentTrackWholeNotes = rt;\n\t\t\t} else {\n\t\t\t\tif (elem.elem.currentTrackMilliseconds.length === undefined) {\n\t\t\t\t\tif (elem.elem.currentTrackMilliseconds !== ms) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds = [elem.elem.currentTrackMilliseconds, ms];\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes = [elem.elem.currentTrackWholeNotes, rt];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// There can be duplicates if there are multiple voices\n\t\t\t\t\tvar found = false;\n\t\t\t\t\tfor (var j = 0; j < elem.elem.currentTrackMilliseconds.length; j++) {\n\t\t\t\t\t\tif (elem.elem.currentTrackMilliseconds[j] === ms)\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (!found) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds.push(ms);\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes.push(rt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//var tieAdjustment = 0;\n\t\tif (elem.pitches) {\n\t\t\tvar thisBreakBetweenNotes = '';\n\t\t\tvar ret = findNoteModifications(elem, velocity);\n\t\t\tif (ret.thisBreakBetweenNotes)\n\t\t\t\tthisBreakBetweenNotes = ret.thisBreakBetweenNotes;\n\t\t\tif (ret.velocity)\n\t\t\t\tvelocity = ret.velocity;\n\n\t\t\t// TODO-PER: Can also make a different sound on style=x and style=harmonic\n\t\t\tvar ePitches = elem.pitches;\n\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\tePitches = chordTrack.setRhythmHead(true, elem)\n\t\t\t}\n\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiPitches = [];\n\t\t\tfor (var i=0; i<ePitches.length; i++) {\n\t\t\t\tvar note = ePitches[i];\n\t\t\t\tif (!note)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (note.startSlur)\n\t\t\t\t\tslurCount += note.startSlur.length;\n\t\t\t\tif (note.endSlur)\n\t\t\t\t\tslurCount -= note.endSlur.length;\n\t\t\t\tvar actualPitch = note.actualPitch ? note.actualPitch : adjustPitch(note);\n\t\t\t\tif (currentInstrument === drumInstrument && percmap) {\n\t\t\t\t\tvar name = pitchesToPerc(note)\n\t\t\t\t\tif (name && percmap[name])\n\t\t\t\t\t\tactualPitch = percmap[name].sound;\n\t\t\t\t}\n\t\t\t\tvar p = { cmd: 'note', pitch: actualPitch, volume: velocity, start: timeToRealTime(elem.time), duration: durationRounded(note.duration), instrument: currentInstrument, startChar: elem.elem.startChar, endChar: elem.elem.endChar};\n\t\t\t\tp = adjustForMicroTone(p);\n\t\t\t\tif (elem.gracenotes) {\n\t\t\t\t\tp.duration = p.duration / 2;\n\t\t\t\t\tp.start = p.start + p.duration;\n\t\t\t\t}\n\t\t\t\tif (elem.elem)\n\t\t\t\t\telem.elem.midiPitches.push(p);\n\t\t\t\tif (ret.noteModification) {\n\t\t\t\t\tdoModifiedNotes(ret.noteModification, p);\n\t\t\t\t} else {\n\t\t\t\t\tif (slurCount > 0)\n\t\t\t\t\t\tp.endType = 'tenuto';\n\t\t\t\t\telse if (thisBreakBetweenNotes)\n\t\t\t\t\t\tp.endType = thisBreakBetweenNotes;\n\n\t\t\t\t\tswitch (p.endType) {\n\t\t\t\t\t\tcase \"tenuto\":\n\t\t\t\t\t\t\tp.gap = slurredBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"staccato\":\n\t\t\t\t\t\t\tvar d = p.duration * staccatoBreakBetweenNotes;\n\t\t\t\t\t\t\tp.gap = startingTempo / 60 * d;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tp.gap = normalBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentTrack.push(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlastNoteDurationPosition = currentTrack.length-1;\n\n\t\t}\n\t\tvar realDur = getRealDuration(elem);\n\t\tlastEventTime = Math.max(lastEventTime, timeToRealTime(elem.time)+durationRounded(realDur));\n\t}\n\tfunction getRealDuration(elem) {\n\t\tif (elem.pitches && elem.pitches.length > 0 && elem.pitches[0])\n\t\t\treturn elem.pitches[0].duration;\n\t\tif (elem.elem)\n\t\t\treturn elem.elem.duration;\n\t\treturn elem.duration;\n\t}\n\n\tvar scale = [0,2,4,5,7,9,11];\n\tfunction adjustPitch(note) {\n\t\tif (note.midipitch !== undefined)\n\t\t\treturn note.midipitch; // The pitch might already be known, for instance if there is a drummap.\n\t\tvar pitch = note.pitch;\n\t\tif (note.accidental) {\n\t\t\tswitch(note.accidental) { // change that pitch (not other octaves) for the rest of the bar\n\t\t\t\tcase \"sharp\":\n\t\t\t\t\tbarAccidentals[pitch]=1; break;\n\t\t\t\tcase \"flat\":\n\t\t\t\t\tbarAccidentals[pitch]=-1; break;\n\t\t\t\tcase \"natural\":\n\t\t\t\t\tbarAccidentals[pitch]=0; break;\n\t\t\t\tcase \"dblsharp\":\n\t\t\t\t\tbarAccidentals[pitch]=2; break;\n\t\t\t\tcase \"dblflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-2; break;\n\t\t\t\tcase \"quartersharp\":\n\t\t\t\t\tbarAccidentals[pitch]=0.25; break;\n\t\t\t\tcase \"quarterflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-0.25; break;\n\t\t\t}\n\t\t}\n\n\t\tvar actualPitch = extractOctave(pitch) *12 + scale[extractNote(pitch)] + 60;\n\n\t\tif ( barAccidentals[pitch]!==undefined) {\n\t\t\t// An accidental is always taken at face value and supersedes the key signature.\n\t\t\tactualPitch += barAccidentals[pitch];\n\t\t} else { // use normal accidentals\n\t\t\tactualPitch +=  accidentals[extractNote(pitch)];\n\t\t}\n\t\tactualPitch += transpose;\n\t\treturn actualPitch;\n\t}\n\n\tfunction setKeySignature(elem) {\n\t\tvar accidentals = [0,0,0,0,0,0,0];\n\t\tif (!elem.accidentals) return accidentals;\n\t\tfor (var i = 0; i < elem.accidentals.length; i++) {\n\t\t\tvar acc = elem.accidentals[i];\n\t\t\tvar d;\n\t\t\tswitch (acc.acc) {\n\t\t\t\tcase \"flat\": d = -1; break;\n\t\t\t\tcase \"quarterflat\": d = -0.25; break;\n\t\t\t\tcase \"sharp\": d = 1; break;\n\t\t\t\tcase \"quartersharp\": d = 0.25; break;\n\t\t\t\tdefault: d = 0; break;\n\t\t\t}\n\n\t\t\tvar lowercase = acc.note.toLowerCase();\n\t\t\tvar note = extractNote(lowercase.charCodeAt(0)-'c'.charCodeAt(0));\n\t\t\taccidentals[note]+=d;\n\t\t}\n\t\treturn accidentals;\n\t}\n\n\tfunction processGraceNotes(graces, companionDuration) {\n\t\t// Grace notes take up half of the note value. So if there are many of them they are all real short.\n\t\tvar graceDuration = 0;\n\t\tvar ret = [];\n\t\tvar grace;\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tgraceDuration += grace.duration;\n\t\t}\n\t\tvar multiplier = companionDuration/2 / graceDuration;\n\n\t\tfor (g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tvar actualPitch = adjustPitch(grace);\n\t\t\tif (currentInstrument === drumInstrument && percmap) {\n\t\t\t\tvar name = pitchesToPerc(grace)\n\t\t\t\tif (name && percmap[name])\n\t\t\t\t\tactualPitch = percmap[name].sound;\n\t\t\t}\n\t\t\tvar pitch = { pitch: actualPitch, duration: grace.duration*multiplier };\n\t\t\tpitch = adjustForMicroTone(pitch);\n\t\t\tret.push(pitch);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction writeGraceNotes(graces, start, velocity, currentInstrument) {\n\t\tvar midiGrace = [];\n\t\tvelocity = Math.round(velocity)\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tvar gp = graces[g];\n\t\t\tcurrentTrack.push({cmd: 'note', pitch: gp.pitch, volume: velocity, start: start, duration: gp.duration, gap: 0, instrument:currentInstrument, style: 'grace'});\n\t\t\tmidiGrace.push({\n\t\t\t\tpitch: gp.pitch,\n\t\t\t\tdurationInMeasures: gp.duration,\n\t\t\t\tvolume: velocity,\n\t\t\t\tinstrument: currentInstrument\n\t\t\t});\n\t\t\tstart += gp.duration;\n\t\t}\n\t\treturn midiGrace;\n\t}\n\n\tvar quarterToneFactor = 0.02930223664349;\n\tfunction adjustForMicroTone(description) {\n\t\t// if the pitch is not a whole number then make it a whole number and add a tuning factor\n\t\tvar pitch = ''+description.pitch;\n\t\tif (pitch.indexOf(\".75\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = -50;\n\t\t} else if (pitch.indexOf(\".25\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = 50;\n\t\t}\n\n\t\treturn description;\n\t}\n\n\tfunction extractOctave(pitch) {\n\t\treturn Math.floor(pitch/7);\n\t}\n\n\tfunction extractNote(pitch) {\n\t\tpitch = pitch%7;\n\t\tif (pitch<0) pitch+=7;\n\t\treturn pitch;\n\t}\n\n\n\tfunction normalizeDrumDefinition(params) {\n\t\t// Be very strict with the drum definition. If anything is not perfect,\n\t\t// just turn the drums off.\n\t\t// Perhaps all of this logic belongs in the parser instead.\n\t\tif (params.pattern.length === 0 || params.on === false)\n\t\t\treturn { on: false };\n\n\t\tvar str = params.pattern[0];\n\t\tvar events = [];\n\t\tvar event = \"\";\n\t\tvar totalPlay = 0;\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (str[i] === 'd')\n\t\t\t\ttotalPlay++;\n\t\t\tif (str[i] === 'd' || str[i] === 'z') {\n\t\t\t\tif (event.length !== 0) {\n\t\t\t\t\tevents.push(event);\n\t\t\t\t\tevent = str[i];\n\t\t\t\t} else\n\t\t\t\t\tevent = event + str[i];\n\t\t\t} else {\n\t\t\t\tif (event.length === 0) {\n\t\t\t\t\t// there was an error: the string should have started with d or z\n\t\t\t\t\treturn {on: false};\n\t\t\t\t}\n\t\t\t\tevent = event + str[i];\n\t\t\t}\n\t\t}\n\n\t\tif (event.length !== 0)\n\t\t\tevents.push(event);\n\n\t\t// Now the events array should have one item per event.\n\t\t// There should be two more params for each event: the volume and the pitch.\n\t\tif (params.pattern.length !== totalPlay*2 + 1)\n\t\t\treturn { on: false };\n\n\t\tvar ret = { on: true, bars: params.bars, pattern: []};\n\t\tvar beatLength = getBeatFraction(meter);\n\t\tvar playCount = 0;\n\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\tevent = events[j];\n\t\t\tvar len = 1;\n\t\t\tvar div = false;\n\t\t\tvar num = 0;\n\t\t\tfor (var k = 1; k < event.length; k++) {\n\t\t\t\tswitch(event[k]) {\n\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\tif (num !== 0)\n\t\t\t\t\t\t\tlen *= num;\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\t\tdiv = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tnum = num*10 +event[k];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn { on: false };\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (div) {\n\t\t\t\tif (num === 0) num = 2; // a slash by itself is interpreted as \"/2\"\n\t\t\t\tlen /= num;\n\t\t\t} else if (num)\n\t\t\t\tlen *= num;\n\t\t\tif (event[0] === 'd') {\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: params.pattern[1 + playCount], velocity: params.pattern[1 + playCount + totalPlay]});\n\t\t\t\tplayCount++;\n\t\t\t} else\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: null});\n\t\t}\n\t\tdrumBars = params.bars ? params.bars : 1;\n\t\treturn ret;\n\t}\n\n\tfunction alignDrumToMeter() {\n\t\tif (!drumDefinition ||!drumDefinition.pattern) {\n\t\t\treturn;\n\t\t}\n\t\tvar ret = drumDefinition;\n\t\t// Now normalize the pattern to cover the correct number of measures. The note lengths passed are relative to each other and need to be scaled to fit a measure.\n\t\tvar totalTime = 0;\n\t\tvar measuresPerBeat = meter.num/meter.den;\n\t\tfor (var ii = 0; ii < ret.pattern.length; ii++)\n\t\t\ttotalTime += ret.pattern[ii].len;\n\t\tvar factor = totalTime /  drumBars / measuresPerBeat;\n\t\tfor (ii = 0; ii < ret.pattern.length; ii++)\n\t\t\tret.pattern[ii].len = ret.pattern[ii].len / factor;\n\t\tdrumDefinition = ret;\n\t}\n\n\tfunction writeDrum(channel) {\n\t\tif (drumTrack.length === 0 && !drumDefinition.on)\n\t\t\treturn;\n\n\t\tvar measureLen = meter.num/meter.den;\n\t\tif (drumTrack.length === 0) {\n\t\t\tif (lastEventTime < measureLen)\n\t\t\t\treturn; // This is true if there are pickup notes. The drum doesn't start until the first full measure.\n\t\t\tdrumTrack.push({cmd: 'program', channel: channel, instrument: drumInstrument});\n\t\t}\n\n\t\tif (!drumDefinition.on) {\n\t\t\t// this is the case where there has been a drum track, but it was specifically turned off.\n\t\t\treturn;\n\t\t}\n\t\tvar start = lastBarTime;\n\t\tfor (var i = 0; i < drumDefinition.pattern.length; i++) {\n\t\t\tvar len = durationRounded(drumDefinition.pattern[i].len);\n\t\t\tif (drumDefinition.pattern[i].pitch) {\n\t\t\t\tdrumTrack.push({\n\t\t\t\t\tcmd: 'note',\n\t\t\t\t\tpitch: drumDefinition.pattern[i].pitch,\n\t\t\t\t\tvolume: drumDefinition.pattern[i].velocity,\n\t\t\t\t\tstart: start,\n\t\t\t\t\tduration: len,\n\t\t\t\t\tgap: 0,\n\t\t\t\t\tinstrument: drumInstrument});\n\t\t\t}\n\t\t\tstart += len;\n\t\t}\n\t}\n\n\tfunction findOctaves(tracks, detuneCents) {\n\t\tvar timing = {};\n\t\tfor (var i = 0; i < tracks.length; i++) {\n\t\t\tfor (var j = 0; j < tracks[i].length; j++) {\n\t\t\t\tvar note = tracks[i][j];\n\t\t\t\tif (note.cmd === \"note\") {\n\t\t\t\t\tif (timing[note.start] === undefined)\n\t\t\t\t\t\ttiming[note.start] = [];\n\t\t\t\t\ttiming[note.start].push({track: i, event: j, pitch: note.pitch});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar keys = Object.keys(timing);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tvar arr = timing[keys[i]];\n\t\t\tif (arr.length > 1) {\n\t\t\t\tarr = arr.sort(function(a,b) {\n\t\t\t\t\treturn a.pitch - b.pitch;\n\t\t\t\t});\n\t\t\t\tvar topEvent = arr[arr.length-1];\n\t\t\t\tvar topNote = topEvent.pitch % 12;\n\t\t\t\tvar found = false;\n\t\t\t\tfor (j = 0; !found && j < arr.length-1; j++) {\n\t\t\t\t\tif (arr[j].pitch % 12 === topNote)\n\t\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tif (found) {\n\t\t\t\t\tvar event = tracks[topEvent.track][topEvent.event];\n\t\t\t\t\tif (!event.cents)\n\t\t\t\t\t\tevent.cents = 0;\n\t\t\t\t\tevent.cents += detuneCents;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n})();\n\nmodule.exports = flatten;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/abc_midi_flattener.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/abc_midi_renderer.js":
/*!***********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/abc_midi_renderer.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_midi_renderer.js: Create the actual format for the midi.\n\nvar centsToFactor = __webpack_require__(/*! ./cents-to-factor */ \"./node_modules/abcjs/src/synth/cents-to-factor.js\");\nvar rendererFactory;\n\n(function() {\n\t\"use strict\";\n\tfunction setAttributes(elm, attrs) {\n\t\tfor (var attr in attrs)\n\t\t\tif (attrs.hasOwnProperty(attr))\n\t\t\t\telm.setAttribute(attr, attrs[attr]);\n\t\treturn elm;\n\t}\n\n\tfunction Midi() {\n\t\tthis.trackstrings = \"\";\n\t\tthis.trackcount = 0;\n\t\tthis.noteOnAndChannel = \"%90\";\n\t\tthis.noteOffAndChannel = \"%80\";\n\t}\n\n\tMidi.prototype.setTempo = function(qpm) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(Math.round(60000000 / qpm), 6);\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.setGlobalInfo = function(qpm, name, key, time) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tvar divisions = Math.round(60000000 / qpm);\n\t\t\t// Add the tempo\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(divisions, 6);\n\n\t\t\tif (key)\n\t\t\t\tthis.track += keySignature(key);\n\t\t\tif (time)\n\t\t\t\tthis.track += timeSignature(time);\n\t\t\tif (name) {\n\t\t\t\tthis.track += encodeString(name, \"%01\");\n\t\t\t}\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.startTrack = function() {\n\t\tthis.noteWarped = {};\n\t\tthis.track = \"\";\n\t\tthis.trackName = \"\";\n\t\tthis.trackInstrument = \"\";\n\t\tthis.silencelength = 0;\n\t\tthis.trackcount++;\n\t\tif (this.instrument) {\n\t\t\tthis.setInstrument(this.instrument);\n\t\t}\n\t};\n\n\tMidi.prototype.endTrack = function() {\n\t\tthis.track = this.trackName + this.trackInstrument + this.track;\n\t\tvar tracklength = toHex(this.track.length / 3 + 4, 8);\n\t\tthis.track = \"MTrk\" + tracklength + // track header\n\t\t\tthis.track +\n\t\t\t'%00%FF%2F%00'; // track end\n\t\tthis.trackstrings += this.track;\n\t};\n\n\tMidi.prototype.setText = function(type, text) {\n\t\t// MIDI defines the following types of events:\n\t\t//FF 01 len text Text Event\n\t\t//FF 02 len text Copyright Notice\n\t\t//FF 03 len text Sequence/Track Name\n\t\t//FF 04 len text Instrument Name\n\t\t//FF 05 len text Lyric\n\t\t//FF 06 len text Marker\n\t\t//FF 07 len text Cue Point\n\t\tswitch(type) {\n\t\t\tcase 'name':\n\t\t\t\tthis.trackName = encodeString(text, \"%03\");\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tMidi.prototype.setInstrument = function(number) {\n\t\tthis.trackInstrument = \"%00%C0\" + toHex(number, 2);\n\t\tthis.instrument = number;\n\t};\n\n\tMidi.prototype.setChannel = function(number, pan) {\n\t\tthis.channel = number;\n\t\tvar ccPrefix = \"%00%B\" + this.channel.toString(16);\n\t\t// Reset midi, in case it was set previously.\n\t\tthis.track += ccPrefix + \"%79%00\"; // Reset All Controllers\n\t\tthis.track += ccPrefix + \"%40%00\"; // Damper pedal\n\t\tthis.track += ccPrefix + \"%5B%30\"; // Effect 1 Depth (reverb)\n\t\t// Translate pan as -1 to 1 to 0 to 127\n\t\tif (!pan)\n\t\t\tpan = 0;\n\t\tpan = Math.round((pan + 1) * 64);\n\t\tthis.track += ccPrefix + \"%0A\" + toHex(pan, 2); // Pan\n\t\tthis.track += ccPrefix + \"%07%64\"; // Channel Volume\n\n\t\tthis.noteOnAndChannel = \"%9\" + this.channel.toString(16);\n\t\tthis.noteOffAndChannel = \"%8\" + this.channel.toString(16);\n\t};\n\n\tvar HALF_STEP = 4096; // For the pitch wheel - (i.e. the distance from C to C#)\n\tMidi.prototype.startNote = function(pitch, loudness, cents) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (cents) {\n\t\t\t// the pitch is altered so send a midi pitch wheel event\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tvar bend = Math.round(centsToFactor(cents)*HALF_STEP);\n\t\t\tthis.track += to7BitHex(0x2000 + bend);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = true;\n\t\t}\n\t\tthis.track += this.noteOnAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + toHex(loudness, 2); //note\n\t};\n\n\tMidi.prototype.endNote = function(pitch) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (this.noteWarped[pitch]) {\n\t\t\t// the pitch was altered so alter it back.\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tthis.track += to7BitHex(0x2000);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = false;\n\t\t}\n\t\tthis.track += this.noteOffAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + \"%00\";//end note\n\t};\n\n\tMidi.prototype.addRest = function(length) {\n\t\tthis.silencelength += length;\n\t\tif (this.silencelength < 0)\n\t\t\tthis.silencelength = 0;\n\t};\n\n\tMidi.prototype.getData = function() {\n\t\treturn \"data:audio/midi,\" +\n\t\t\t\"MThd%00%00%00%06%00%01\" + toHex(this.trackcount, 4) + \"%01%e0\" + // header\n\t\t\tthis.trackstrings;\n\t};\n\n\tMidi.prototype.embed = function(parent, noplayer) {\n\n\t\tvar data = this.getData();\n\n\t\tvar link = setAttributes(document.createElement('a'), {\n\t\t\thref: data\n\t\t});\n\t\tlink.innerHTML = \"download midi\";\n\t\tparent.insertBefore(link, parent.firstChild);\n\n\t\tif (noplayer) return;\n\n\t\tvar embed = setAttributes(document.createElement('embed'), {\n\t\t\tsrc: data,\n\t\t\ttype: 'video/quicktime',\n\t\t\tcontroller: 'true',\n\t\t\tautoplay: 'false',\n\t\t\tloop: 'false',\n\t\t\tenablejavascript: 'true',\n\t\t\tstyle: 'display:block; height: 20px;'\n\t\t});\n\t\tparent.insertBefore(embed, parent.firstChild);\n\t};\n\n\tfunction encodeString(str, cmdType) {\n\t\t// If there are multi-byte chars, we don't know how long the string will be until we create it.\n\t\tvar nameArray = \"\";\n\t\tfor (var i = 0; i < str.length; i++)\n\t\t\tnameArray += toHex(str.charCodeAt(i), 2);\n\t\treturn \"%00%FF\" + cmdType + toHex(nameArray.length/3, 2) + nameArray; // Each byte is represented by three chars \"%XX\", so divide by 3 to get the length.\n\t}\n\n\tfunction keySignature(key) {\n\t\t//00 FF 5902 03 00 - key signature\n\t\tif (!key || !key.accidentals)\n\t\t\treturn \"\";\n\t\tvar hex = \"%00%FF%59%02\";\n\t\tvar sharpCount = 0;\n\t\tvar flatCount = 256;\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].acc === \"sharp\") sharpCount++;\n\t\t\telse if (key.accidentals[i].acc === \"flat\") flatCount--;\n\t\t}\n\t\tvar sig = flatCount !== 256 ? toHex(flatCount, 2) : toHex(sharpCount, 2);\n\t\tvar mode = (key.mode === \"m\") ? \"%01\" : \"%00\";\n\t\treturn hex + sig + mode;\n\t}\n\n\tfunction timeSignature(time) {\n\t\t//00 FF 58 04 04 02 30 08 - time signature\n\t\tvar hex = \"%00%FF%58%04\" + toHex(time.num,2);\n\t\tvar dens = { 1: 0, 2: 1, 4: 2, 8: 3, 16: 4, 32: 5 };\n\t\tvar den = dens[time.den];\n\t\tif (!den)\n\t\t\treturn \"\"; // the denominator is not supported, so just don't include this.\n\t\thex += toHex(den, 2);\n\n\t\tvar clocks;\n\t\tswitch (time.num+\"/\"+time.den) {\n\t\t\tcase \"2/4\":\n\t\t\tcase \"3/4\":\n\t\t\tcase \"4/4\":\n\t\t\tcase \"5/4\":\n\t\t\t\tclocks = 24;\n\t\t\t\tbreak;\n\t\t\tcase \"6/4\":\n\t\t\t\tclocks = 72;\n\t\t\t\tbreak;\n\t\t\tcase \"2/2\":\n\t\t\tcase \"3/2\":\n\t\t\tcase \"4/2\":\n\t\t\t\tclocks = 48;\n\t\t\t\tbreak;\n\t\t\tcase \"3/8\":\n\t\t\tcase \"6/8\":\n\t\t\tcase \"9/8\":\n\t\t\tcase \"12/8\":\n\t\t\t\tclocks = 36;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!clocks)\n\t\t\treturn \"\"; // time sig is not supported.\n\t\thex += toHex(clocks, 2);\n\t\treturn hex + \"%08\";\n\t}\n\n\t// s is assumed to be of even length\n\tfunction encodeHex(s) {\n\t\tvar ret = \"\";\n\t\tfor (var i = 0; i < s.length; i += 2) {\n\t\t\tret += \"%\";\n\t\t\tret += s.substr(i, 2);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction toHex(n, padding) {\n\t\tvar s = n.toString(16);\n\t\ts = s.split(\".\")[0];\n\t\twhile (s.length < padding) {\n\t\t\ts = \"0\" + s;\n\t\t}\n\t\tif (s.length > padding)\n\t\t\ts = s.substring(0,padding)\n\t\treturn encodeHex(s);\n\t}\n\n\tfunction to7BitHex(n) {\n\t\t// this takes a number and shifts all digits from the 7th one to the left.\n\t\tn = Math.round(n);\n\t\tvar lower = n % 128;\n\t\tvar higher = n - lower;\n\t\treturn toHex(higher*2+lower, 4);\n\t}\n\n\tfunction toDurationHex(n) {\n\t\tvar res = 0;\n\t\tvar a = [];\n\n\t\t// cut up into 7 bit chunks;\n\t\tn = Math.round(n);\n\t\twhile (n !== 0) {\n\t\t\ta.push(n & 0x7F);\n\t\t\tn = n >> 7;\n\t\t}\n\n\t\t// join the 7 bit chunks together, all but last chunk get leading 1\n\t\tfor (var i = a.length - 1; i >= 0; i--) {\n\t\t\tres = res << 8;\n\t\t\tvar bits = a[i];\n\t\t\tif (i !== 0) {\n\t\t\t\tbits = bits | 0x80;\n\t\t\t}\n\t\t\tres = res | bits;\n\t\t}\n\n\t\tvar padding = res.toString(16).length;\n\t\tpadding += padding % 2;\n\n\t\treturn toHex(res, padding);\n\t}\n\n\trendererFactory = function() {\n\t\treturn new Midi();\n\t};\n})();\n\nmodule.exports = rendererFactory;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/abc_midi_renderer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/abc_midi_sequencer.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/abc_midi_sequencer.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_midi_sequencer.js: Turn parsed abc into a linear series of events.\n\nvar sequence;\nvar parseCommon = __webpack_require__(/*! ../parse/abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\n\n(function() {\n\t\"use strict\";\n\n\tvar measureLength = 1; // This should be set by the meter, but just in case that is missing, we'll take a guess.\n\t// The abc is provided to us line by line. It might have repeats in it. We want to re arrange the elements to\n\t// be an array of voices with all the repeats embedded, and no lines. Then it is trivial to go through the events\n\t// one at a time and turn it into midi.\n\n\tvar PERCUSSION_PROGRAM = 128;\n\n\tsequence = function(abctune, options) {\n\t\t// Global options\n\t\toptions = options || {};\n\t\tvar qpm;\n\t\tvar program = options.program || 0;\t// The program if there isn't a program specified.\n\t\tvar transpose = options.midiTranspose || 0;\n\t\t// If the tune has a visual transpose then that needs to be subtracted out because we are getting the visual object.\n\t\tif (abctune.visualTranspose)\n\t\t\ttranspose -= abctune.visualTranspose;\n\t\tvar channel = options.channel || 0;\n\t\tvar channelExplicitlySet = false;\n\t\tvar drumPattern = options.drum || \"\";\n\t\tvar drumBars = options.drumBars || 1;\n\t\tvar drumIntro = options.drumIntro || 0;\n\t\tvar drumOn = drumPattern !== \"\";\n\t\tvar drumOffAfterIntro = !!options.drumOff\n\t\tvar style = []; // The note head style for each voice.\n\t\tvar rhythmHeadThisBar = false; // Rhythm notation was detected.\n\t\tvar crescendoSize = 50; // how much to increase or decrease volume when crescendo/diminuendo is encountered.\n\n\t\t// All of the above overrides need to be integers\n\t\tprogram = parseInt(program, 10);\n\t\ttranspose = parseInt(transpose, 10);\n\t\tchannel = parseInt(channel, 10);\n\t\tif (channel === 10)\n\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\tdrumPattern = drumPattern.split(\" \");\n\t\tdrumBars = parseInt(drumBars, 10);\n\t\tdrumIntro = parseInt(drumIntro, 10);\n\n\t\tvar bagpipes = abctune.formatting.bagpipes; // If it is bagpipes, then the gracenotes are played on top of the main note.\n\t\tif (bagpipes)\n\t\t\tprogram = 71;\n\n\t\t// %%MIDI fermatafixed\n\t\t// %%MIDI fermataproportional\n\t\t// %%MIDI deltaloudness n\n\t\t// %%MIDI gracedivider b\n\t\t// %%MIDI ratio n m\n\t\t// %%MIDI beat a b c n\n\t\t// %%MIDI grace a/b\n\t\t// %%MIDI trim x/y\n\n\t\t// %MIDI gchordon\n\t\t// %MIDI gchordoff\n\t\t// %%MIDI bassprog 45\n\t\t// %%MIDI chordprog 24\n\t\t// %%MIDI chordname name n1 n2 n3 n4 n5 n6\n\n\t\t//%%MIDI beat ⟨int1⟩ ⟨int2⟩ ⟨int3⟩ ⟨int4⟩: controls the volumes of the notes in a measure. The first note in a bar has volume ⟨int1⟩; other ‘strong’ notes have volume ⟨int2⟩ and all the rest have volume ⟨int3⟩. These values must be in the range 0–127. The parameter ⟨int4⟩ determines which notes are ‘strong’. If the time signature is x/y, then each note is given a position number k = 0, 1, 2. . . x-1 within each bar. If k is a multiple of ⟨int4⟩, then the note is ‘strong’.\n\n\t\tvar startingMidi = [];\n\t\tif (abctune.formatting.midi) {\n\t\t\t//console.log(\"MIDI Formatting:\", abctune.formatting.midi);\n\t\t\tvar globals = abctune.formatting.midi;\n\t\t\tif (globals.program && globals.program.length > 0) {\n\t\t\t\tprogram = globals.program[0];\n\t\t\t\tif (globals.program.length > 1) {\n\t\t\t\t\tprogram = globals.program[1];\n\t\t\t\t\tchannel = globals.program[0];\n\t\t\t\t}\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.transpose)\n\t\t\t\ttranspose = globals.transpose[0];\n\t\t\tif (globals.channel) {\n\t\t\t\tchannel = globals.channel[0];\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.drum)\n\t\t\t\tdrumPattern = globals.drum;\n\t\t\tif (globals.drumbars)\n\t\t\t\tdrumBars = globals.drumbars[0];\n\t\t\tif (globals.drumon)\n\t\t\t\tdrumOn = true;\n\t\t\tif (channel === 10)\n\t\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\t\tif (globals.beat)\n\t\t\t\tstartingMidi.push({ el_type: 'beat', beats: globals.beat })\n\t\t\tif (globals.nobeataccents)\n\t\t\t\tstartingMidi.push({ el_type: 'beataccents', value: false });\n\n\t\t}\n\n\t\t// Specified options in abc string.\n\n\t\t// If the tempo was passed in, use that.\n\t\t// If the tempo is specified, use that.\n\t\t// If there is a default, use that.\n\t\t// Otherwise, use the default.\n\t\tif (options.qpm)\n\t\t\tqpm = parseInt(options.qpm, 10);\n\t\telse if (abctune.metaText.tempo)\n\t\t\tqpm = interpretTempo(abctune.metaText.tempo, abctune.getBeatLength());\n\t\telse if (options.defaultQpm)\n\t\t\tqpm = options.defaultQpm;\n\t\telse\n\t\t\tqpm = 180; \t// The tempo if there isn't a tempo specified.\n\n\t\tvar startVoice = [];\n\t\tif (bagpipes)\n\t\t\tstartVoice.push({ el_type: 'bagpipes' });\n\t\tstartVoice.push({ el_type: 'instrument', program: program });\n\t\tif (channel)\n\t\t\tstartVoice.push({ el_type: 'channel', channel: channel });\n\t\tif (transpose)\n\t\t\tstartVoice.push({ el_type: 'transpose', transpose: transpose });\n\t\tstartVoice.push({ el_type: 'tempo', qpm: qpm });\n\t\tfor (var ss = 0; ss < startingMidi.length;ss++)\n\t\t\tstartVoice.push(startingMidi[ss]);\n\n\t\t// the relevant part of the input structure is:\n\t\t// abctune\n\t\t//\t\tarray lines\n\t\t//\t\t\tarray staff\n\t\t//\t\t\t\tobject key\n\t\t//\t\t\t\tobject meter\n\t\t//\t\t\t\tarray voices\n\t\t//\t\t\t\t\tarray abcelem\n\n\t\t// visit each voice completely in turn\n\t\tvar voices = [];\n\t\tvar inCrescendo = [];\n\t\tvar inDiminuendo = [];\n\t\tvar durationCounter = [0];\n\t\tvar tempoChanges = {};\n\t\ttempoChanges[\"0\"] = { el_type: 'tempo', qpm: qpm, timing: 0 };\n\t\tvar currentVolume;\n\t\tvar startRepeatPlaceholder = []; // There is a place holder for each voice.\n\t\tvar skipEndingPlaceholder = []; // This is the place where the first ending starts.\n\t\tvar startingDrumSet = false;\n\t\tvar lines = abctune.lines; //abctune.deline(); TODO-PER: can switch to this, then simplify the loops below.\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\t// For each group of staff lines in the tune.\n\t\t\tvar line = lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tvar staves = line.staff;\n\t\t\t\tvar voiceNumber = 0;\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j];\n\t\t\t\t\tif (staff.clef && staff.clef.type === \"TAB\")\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// For each staff line\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\t// For each voice in a staff line\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tif (!voices[voiceNumber]) {\n\t\t\t\t\t\t\tvoices[voiceNumber] = [].concat(JSON.parse(JSON.stringify(startVoice)));\n\t\t\t\t\t\t\tvar voiceName = getTrackTitle(line.staff, voiceNumber);\n\t\t\t\t\t\t\tif (voiceName)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].unshift({el_type: \"name\", trackName: voiceName});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Negate any transposition for the percussion staff.\n\t\t\t\t\t\tif (transpose && staff.clef.type === \"perc\")\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 0 });\n\n\t\t\t\t\t\tif (staff.clef && staff.clef.type === 'perc' && !channelExplicitlySet) {\n\t\t\t\t\t\t\tfor (var cl = 0; cl < voices[voiceNumber].length; cl++) {\n\t\t\t\t\t\t\t\tif (voices[voiceNumber][cl].el_type === 'instrument')\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber][cl].program = PERCUSSION_PROGRAM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (staff.key) {\n\t\t\t\t\t\t\taddKey(voices[voiceNumber], staff.key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.meter) {\n\t\t\t\t\t\t\taddMeter(voices[voiceNumber], staff.meter);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!startingDrumSet && drumOn) { // drum information is only needed once, so use the first line and track 0.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: drumPattern, bars: drumBars, on: drumOn, intro: drumIntro}});\n\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type !== \"perc\" && staff.clef.transpose) {\n\t\t\t\t\t\t\tstaff.clef.el_type = 'clef';\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: staff.clef.transpose });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type) {\n\t\t\t\t\t\t\tif (staff.clef.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\telse if (staff.clef.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (abctune.formatting.midi && abctune.formatting.midi.drumoff) {\n\t\t\t\t\t\t\t// If there is a drum off command right at the beginning it is put in the metaText instead of the stream,\n\t\t\t\t\t\t\t// so we will just insert it here.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' });\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: \"\", on: false }});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar noteEventsInBar = 0;\n\t\t\t\t\t\tvar tripletMultiplier = 0;\n\t\t\t\t\t\tvar tripletDurationTotal = 0; // try to mitigate the js rounding problems.\n\t\t\t\t\t\tvar tripletDurationCount = 0;\n\t\t\t\t\t\tcurrentVolume = [105, 95, 85, 1];\n\n\t\t\t\t\t\tfor (var v = 0; v < voice.length; v++) {\n\t\t\t\t\t\t\t// For each element in a voice\n\t\t\t\t\t\t\tvar elem = voice[v];\n\t\t\t\t\t\t\tswitch (elem.el_type) {\n\t\t\t\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\t\t\t\tif (inCrescendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (inDiminuendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\n\t\t\t\t\t\t\t\t\t// regular items are just pushed.\n\t\t\t\t\t\t\t\t\tif (!elem.rest || elem.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\t\t\tvar noteElem = { elem: elem, el_type: \"note\", timing: durationCounter[voiceNumber] }; // Make a copy so that modifications aren't kept except for adding the midiPitches\n\t\t\t\t\t\t\t\t\t\tif (elem.style)\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = elem.style;\n\t\t\t\t\t\t\t\t\t\telse if (style[voiceNumber])\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = style[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tnoteElem.duration = (elem.duration === 0) ? 0.25 : elem.duration;\n\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet) {\n\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = elem.tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = elem.startTriplet * tripletMultiplier * elem.duration;\n\t\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet !== elem.tripletR) { // most commonly (3:2:2\n\t\t\t\t\t\t\t\t\t\t\t\tif (v + elem.tripletR <= voice.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar durationTotal = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (var w = v; w < v + elem.tripletR; w++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdurationTotal += voice[w].duration;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = tripletMultiplier * durationTotal;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount = noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t} else if (tripletMultiplier) {\n\t\t\t\t\t\t\t\t\t\t\tif (elem.endTriplet) {\n\t\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = 0;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round((tripletDurationTotal - tripletDurationCount)*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount += noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (elem.rest) noteElem.rest = elem.rest;\n\t\t\t\t\t\t\t\t\t\tif (elem.decoration) noteElem.decoration = elem.decoration.slice(0);\n\t\t\t\t\t\t\t\t\t\tif (elem.pitches) noteElem.pitches = parseCommon.cloneArray(elem.pitches);\n\t\t\t\t\t\t\t\t\t\tif (elem.gracenotes) noteElem.gracenotes = parseCommon.cloneArray(elem.gracenotes);\n\t\t\t\t\t\t\t\t\t\tif (elem.chord) noteElem.chord = parseCommon.cloneArray(elem.chord);\n\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(noteElem);\n\t\t\t\t\t\t\t\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\t\t\t\t\t\t\t\trhythmHeadThisBar = true;\n\t\t\t\t\t\t\t\t\t\t\tchordVoiceOffThisBar(voices)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tnoteEventsInBar++;\n\t\t\t\t\t\t\t\t\t\tdurationCounter[voiceNumber] += noteElem.duration;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\t\t\tcase \"keySignature\":\n\t\t\t\t\t\t\t\t\taddKey(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\t\t\t\taddMeter(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"clef\": // need to keep this to catch the \"transpose\" element.\n\t\t\t\t\t\t\t\t\tif (elem.transpose)\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.transpose });\n\t\t\t\t\t\t\t\t\tif (elem.type) {\n\t\t\t\t\t\t\t\t\t\tif (elem.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\t\t\t\telse if (elem.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\t\t\t\tqpm = interpretTempo(elem, abctune.getBeatLength());\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] });\n\t\t\t\t\t\t\t\t\ttempoChanges[''+durationCounter[voiceNumber]] = { el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] };\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\t\t\t\tif (noteEventsInBar > 0) // don't add two bars in a row.\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' }); // We need the bar marking to reset the accidentals.\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\t\t\t\t\t\t\t\t\tnoteEventsInBar = 0;\n\t\t\t\t\t\t\t\t\t// figure out repeats and endings --\n\t\t\t\t\t\t\t\t\t// The important part is where there is a start repeat, and end repeat, or a first ending.\n\t\t\t\t\t\t\t\t\tvar endRepeat = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\t\t\t\t\t\t\t\t\tvar startEnding = (elem.startEnding === '1');\n\t\t\t\t\t\t\t\t\tvar startRepeat = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_right_repeat\");\n\t\t\t\t\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t\t\t\t\tvar s = startRepeatPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!s) s = 0; // If there wasn't a left repeat, then we repeat from the beginning.\n\t\t\t\t\t\t\t\t\t\tvar e = skipEndingPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!e) e = voices[voiceNumber].length; // If there wasn't a first ending marker, then we copy everything.\n\t\t\t\t\t\t\t\t\t\t// duplicate each of the elements - this has to be a deep copy.\n\t\t\t\t\t\t\t\t\t\tfor (var z = s; z < e; z++) {\n\t\t\t\t\t\t\t\t\t\t\tvar item = Object.assign({},voices[voiceNumber][z]);\n\t\t\t\t\t\t\t\t\t\t\tif (item.pitches)\n\t\t\t\t\t\t\t\t\t\t\t\titem.pitches = parseCommon.cloneArray(item.pitches);\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(item);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// reset these in case there is a second repeat later on.\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\trhythmHeadThisBar = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'style':\n\t\t\t\t\t\t\t\t\tstyle[voiceNumber] = elem.head;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'timeSignature':\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(interpretMeter(elem));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'part':\n\t\t\t\t\t\t\t\t\t// TODO-PER: If there is a part section in the header, then this should probably affect the repeats.\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'stem':\n\t\t\t\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\t\t\tcase 'break':\n\t\t\t\t\t\t\t\tcase 'font':\n\t\t\t\t\t\t\t\t\t// These elements don't affect sound\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'midi':\n\t\t\t\t\t\t\t\t\t//console.log(\"MIDI inline\", elem); // TODO-PER: for debugging. Remove this.\n\t\t\t\t\t\t\t\t\tvar drumChange = false;\n\t\t\t\t\t\t\t\t\tswitch (elem.cmd) {\n\t\t\t\t\t\t\t\t\t\tcase \"drumon\": drumOn = true; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumoff\": drumOn = false; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drum\": drumPattern = elem.params; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumbars\": drumBars = elem.params[0]; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drummap\":\n\t\t\t\t\t\t\t\t\t\t\t// This is handled before getting here so it can be ignored.\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\t\t\t\t\t\t// There's not much needed for the channel except to look out for the percussion channel\n\t\t\t\t\t\t\t\t\t\t\tif (elem.params[0] === 10)\n\t\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'instrument', program: PERCUSSION_PROGRAM });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"program\":\n\t\t\t\t\t\t\t\t\t\t\taddIfDifferent(voices[voiceNumber], { el_type: 'instrument', program: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tchannelExplicitlySet = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordoff\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordon\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: elem.params });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"nobeataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, volume: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"swing\":\n\t\t\t\t\t\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\t\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\t\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, param: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase \"bassprog\": // MAE 22 May 2024\n\t\t\t\t\t\t\t\t\t\tcase \"chordprog\": // MAE 22 May 2024\n\t\t\t\t\t                      voices[voiceNumber].push({\n\t\t\t\t\t                        el_type: elem.cmd,\n\t\t\t\t\t                        value: elem.params[0],\n\t\t\t\t\t                        octaveShift: elem.params[1]\n\t\t\t\t\t                      });\n\t\t\t\t\t                      break;\n\n\t\t\t\t\t                    // MAE 23 Jun 2024\n\t\t\t\t\t                    case \"gchordbars\":\n\t\t\t\t\t                        voices[voiceNumber].push({\n\t\t\t\t\t                          el_type: elem.cmd,\n\t\t\t\t\t                          param: elem.params[0]\n\t\t\t\t\t                        });\n\t\t\t\t\t                    break;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI seq: midi cmd not handled: \", elem.cmd, elem);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (drumChange) {\n\t\t\t\t\t\t\t\t\t\tvoices[0].push({el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI: element type \" + elem.el_type + \" not handled.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvoiceNumber++;\n\t\t\t\t\t\tif (!durationCounter[voiceNumber])\n\t\t\t\t\t\t\tdurationCounter[voiceNumber] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction setDynamics(elem) {\n\t\t\t\t\tvar volumes = {\n\t\t\t\t\t\t'pppp': [15, 10, 5, 1],\n\t\t\t\t\t\t'ppp': [30, 20, 10, 1],\n\t\t\t\t\t\t'pp': [45, 35, 20, 1],\n\t\t\t\t\t\t'p': [60, 50, 35, 1],\n\t\t\t\t\t\t'mp': [75, 65, 50, 1],\n\t\t\t\t\t\t'mf': [90, 80, 65, 1],\n\t\t\t\t\t\t'f': [105, 95, 80, 1],\n\t\t\t\t\t\t'ff': [120, 110, 95, 1],\n\t\t\t\t\t\t'fff': [127, 125, 110, 1],\n\t\t\t\t\t\t'ffff': [127, 125, 110, 1]\n\t\t\t\t\t};\n\n\t\t\t\t\tvar dynamicType;\n\t\t\t\t\tif (elem.decoration) {\n\t\t\t\t\t\tif (elem.decoration.indexOf('pppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('pp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('p') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'p';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mf') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mf';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('f') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'f';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('fff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'fff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ffff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ffff';\n\n\t\t\t\t\t\tif (dynamicType) {\n\t\t\t\t\t\t\tcurrentVolume = volumes[dynamicType].slice(0);\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (elem.decoration.indexOf(\"crescendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n = numNotesToDecoration(voice, v, \"crescendo)\");\n\t\t\t\t\t\t\tvar top = Math.min(127, currentVolume[0] + crescendoSize);\n\t\t\t\t\t\t\tvar endDec = endingVolume(voice, v+n+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec)\n\t\t\t\t\t\t\t\ttop = volumes[endDec][0];\n\t\t\t\t\t\t\tif (n > 0)\n\t\t\t\t\t\t\t\tinCrescendo[k] = Math.floor((top - currentVolume[0]) / n);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"crescendo)\") >= 0) {\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n2 = numNotesToDecoration(voice, v, \"diminuendo)\");\n\t\t\t\t\t\t\tvar bottom = Math.max(15, currentVolume[0] - crescendoSize);\n\t\t\t\t\t\t\tvar endDec2 = endingVolume(voice, v+n2+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec2)\n\t\t\t\t\t\t\t\tbottom = volumes[endDec2][0];\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tif (n2 > 0)\n\t\t\t\t\t\t\t\tinDiminuendo[k] = Math.floor((bottom - currentVolume[0]) / n2);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo)\") >= 0) {\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// If there are tempo changes, make sure they are in all the voices. This must be done post process because all the elements in all the voices need to be created first.\n\t\tinsertTempoChanges(voices, tempoChanges);\n\n\t\tif (drumIntro) {\n\t\t\tvar pickups = abctune.getPickupLength();\n\t\t\t// add some measures of rests to the start of each track.\n\t\t\tfor (var vv = 0; vv < voices.length; vv++) {\n\t\t\t\tvar insertPoint = 0;\n\t\t\t\twhile (voices[vv][insertPoint].el_type !== \"note\" && voices[vv].length > insertPoint)\n\t\t\t\t\tinsertPoint++;\n\t\t\t\tif (voices[vv].length > insertPoint) {\n\t\t\t\t\tfor (var w = 0; w < drumIntro; w++) {\n\t\t\t\t\t\t// If it is the last measure of intro, subtract the pickups.\n\t\t\t\t\t\tif (pickups === 0 || w < drumIntro-1) {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint, 0, \n\t\t\t\t\t\t\t\t{el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength},\n\t\t\t\t\t\t\t\t{ el_type: \"bar\" }\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tinsertPoint += 2\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength-pickups});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (drumOffAfterIntro) {\n\t\t\t\t\t\tdrumOn = false\n\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\tdrumOffAfterIntro = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (voices.length > 0 && voices[0].length > 0) {\n\t\t\tvoices[0][0].pickupLength = abctune.getPickupLength();\n\t\t}\n\t\treturn voices;\n\t};\n\n\tfunction numNotesToDecoration(voice, start, decoration) {\n\t\tvar counter = 0;\n\t\tfor (var i = start+1; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === \"note\")\n\t\t\t\tcounter++;\n\t\t\tif (voice[i].decoration && voice[i].decoration.indexOf(decoration) >= 0)\n\t\t\t\treturn counter;\n\t\t}\n\t\treturn counter;\n\t}\n\tfunction endingVolume(voice, start, volumeDecorations) {\n\t\tvar end = Math.min(voice.length, start + 3); // If we have a volume within a couple notes of the end then assume that is the destination.\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tif (voice[i].el_type === \"note\") {\n\t\t\t\tif (voice[i].decoration) {\n\t\t\t\t\tfor (var j = 0; j < voice[i].decoration.length; j++) {\n\t\t\t\t\t\tif (volumeDecorations.indexOf(voice[i].decoration[j]) >= 0)\n\t\t\t\t\t\t\treturn voice[i].decoration[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction insertTempoChanges(voices, tempoChanges) {\n\t\tif (!tempoChanges || tempoChanges.length === 0)\n\t\t\treturn;\n\t\tvar changePositions = Object.keys(tempoChanges);\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar lastTempo = tempoChanges['0'] ? tempoChanges['0'].qpm : 0; // Don't insert redundant changes. This happens normally when repeating from the beginning, but could happen anywhere that there is a tempo marking that is the same as the last one.\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar el = voice[j];\n\t\t\t\tif (el.el_type === \"tempo\")\n\t\t\t\t\tlastTempo = el.qpm;\n\t\t\t\tif (changePositions.indexOf(''+el.timing) >= 0 && lastTempo !== tempoChanges[''+el.timing].qpm) {\n\t\t\t\t\tlastTempo = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\tif (el.el_type === \"tempo\") {\n\t\t\t\t\t\tel.qpm = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\t\tj++; // when there is a tempo element the next element has the same timing and we don't want it to match the second time.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//console.log(\"tempo position\", i, j, el);\n\t\t\t\t\t\tvoices[i].splice(j, 0, {el_type: \"tempo\", qpm: tempoChanges[''+el.timing].qpm, timing: el.timing});\n\t\t\t\t\t\tj +=2; // skip the element we just inserted.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction chordVoiceOffThisBar(voices) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar j = voice.length-1;\n\t\t\twhile (j >= 0 && voice[j].el_type !== 'bar') {\n\t\t\t\tvoice[j].noChordVoice = true;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getTrackTitle(staff, voiceNumber) {\n\t\tif (!staff || staff.length <= voiceNumber || !staff[voiceNumber].title)\n\t\t\treturn undefined;\n\t\treturn staff[voiceNumber].title.join(\" \");\n\t}\n\n\tfunction interpretTempo(element, beatLength) {\n\t\tvar duration = 1/4;\n\t\tif (element.duration) {\n\t\t\tduration = element.duration[0];\n\t\t}\n\t\tvar bpm = 60;\n\t\tif (element.bpm) {\n\t\t\tbpm = element.bpm;\n\t\t}\n\t\t// The tempo is defined with a beat length of \"duration\". If that isn't the natural beat length then there is a translation.\n\t\treturn duration * bpm / beatLength;\n\t}\n\n\tfunction interpretMeter(element) {\n\t\tvar meter;\n\t\tswitch (element.type) {\n\t\t\tcase \"common_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 4, den: 4 };\n\t\t\t\tbreak;\n\t\t\tcase \"cut_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 2, den: 2 };\n\t\t\t\tbreak;\n\t\t\tcase \"specified\":\n\t\t\t\t// TODO-PER: only taking the first meter, so the complex meters are not handled.\n\t\t\t\tmeter = { el_type: 'meter', num: element.value[0].num, den: element.value[0].den };\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// This should never happen.\n\t\t\t\tmeter = { el_type: 'meter' };\n\t\t}\n\t\tmeasureLength = meter.num/meter.den;\n\t\treturn meter;\n\t}\n\n\tfunction removeNaturals(accidentals) {\n\t\tvar acc = [];\n\t\tfor (var i = 0; i < accidentals.length; i++) {\n\t\t\tif (accidentals[i].acc !== \"natural\")\n\t\t\t\tacc.push(accidentals[i])\n\t\t}\n\t\treturn acc;\n\t}\n\tfunction addKey(arr, key) {\n\t\tvar newKey;\n\t\tif (key.root === 'HP')\n\t\t\tnewKey = {el_type: 'key', accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}]};\n\t\telse\n\t\t\tnewKey = {el_type: 'key', accidentals: removeNaturals(key.accidentals) };\n\t\taddIfDifferent(arr, newKey);\n\t}\n\tfunction addMeter(arr, meter) {\n\t\tvar newMeter = interpretMeter(meter);\n\t\taddIfDifferent(arr, newMeter);\n\t}\n\tfunction addIfDifferent(arr, item) {\n\t\tfor (var i = arr.length-1; i >= 0; i--) {\n\t\t\tif (arr[i].el_type === item.el_type) {\n\t\t\t\tif (JSON.stringify(arr[i]) !== JSON.stringify(item))\n\t\t\t\t\tarr.push(item);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tarr.push(item);\n\t}\n\n})();\n\nmodule.exports = sequence;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/abc_midi_sequencer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/active-audio-context.js":
/*!**************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/active-audio-context.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var registerAudioContext = __webpack_require__(/*! ./register-audio-context.js */ \"./node_modules/abcjs/src/synth/register-audio-context.js\");\n\nfunction activeAudioContext() {\n\tif (!window.abcjsAudioContext)\n\t\tregisterAudioContext();\n\treturn window.abcjsAudioContext;\n}\n\nmodule.exports = activeAudioContext;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/active-audio-context.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/cents-to-factor.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/cents-to-factor.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// This turns the number of cents to detune into a value that is convenient to use in pitch calculations\n// A cent is 1/100 of a musical half step and is calculated exponentially over the course of an octave.\n// The equation is:\n// Two to the power of cents divided by 1200\n\nfunction centsToFactor(cents) {\n\treturn Math.pow(2, cents/1200);\n}\n\nmodule.exports = centsToFactor;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/cents-to-factor.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/chord-track.js":
/*!*****************************************************!*\
  !*** ./node_modules/abcjs/src/synth/chord-track.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//\n// The algorithm for chords is:\n// - The chords are done in a separate track.\n// - If there are notes before the first chord, then put that much silence to start the track.\n// - The pattern of chord expression depends on the meter, and how many chords are in a measure.\n// - There is a possibility that a measure will have an incorrect number of beats, if that is the case, then\n// start the pattern anew on the next measure number.\n// - If a chord root is not A-G, then ignore it as if the chord wasn't there at all.\n// - If a chord modification isn't in our supported list, change it to a major triad.\n//\n// - There is a standard pattern of boom-chick for each time sig, or it can be overridden.\n// - For any unrecognized meter, play the full chord on each beat.\n//\n//\t- If there is a chord specified that is not on a beat, move it earlier to the previous beat, unless there is already a chord on that beat.\n//\t- Otherwise, move it later, unless there is already a chord on that beat.\n// \t- Otherwise, ignore it. (TODO-PER: expand this as more support is added.)\n//\n// If there is any note in the melody that has a rhythm head, then assume the melody controls the rhythm, so there is no chord added for that entire measure.\n\nvar ChordTrack = function ChordTrack(numVoices, chordsOff, midiOptions, meter) {\n\tthis.chordTrack = [];\n\tthis.chordTrackFinished = false;\n\tthis.chordChannel = numVoices; // first free channel for chords\n\tthis.currentChords = [];\n\tthis.lastChord;\n\tthis.chordLastBar;\n\tthis.chordsOff = !!chordsOff\n\tthis.gChordTacet = this.chordsOff;\n\tthis.hasRhythmHead = false;\n\tthis.transpose = 0;\n\tthis.lastBarTime = 0;\n\tthis.meter = meter;\n\tthis.tempoChangeFactor = 1;\n\n\t// MAE 17 Jun 2024 - To allow for bass and chord instrument octave shifts\n\tthis.bassInstrument = midiOptions.bassprog && midiOptions.bassprog.length >= 1 ? midiOptions.bassprog[0] : 0;\n\tthis.chordInstrument = midiOptions.chordprog && midiOptions.chordprog.length >= 1 ? midiOptions.chordprog[0] : 0;\n\n\t// MAE For octave shifted bass and chords\n\tthis.bassOctaveShift = midiOptions.bassprog && midiOptions.bassprog.length === 2 ? midiOptions.bassprog[1] : 0;\n\tthis.chordOctaveShift = midiOptions.chordprog && midiOptions.chordprog.length === 2 ? midiOptions.chordprog[1] : 0;\n\n\tthis.boomVolume = midiOptions.bassvol && midiOptions.bassvol.length === 1 ? midiOptions.bassvol[0] : 64;\n\tthis.chickVolume = midiOptions.chordvol && midiOptions.chordvol.length === 1 ? midiOptions.chordvol[0] : 48;\n\n\t// This allows for an initial %%MIDI gchord with no string\n\tif (midiOptions.gchord && (midiOptions.gchord.length > 0)) {\n\t\tthis.overridePattern = parseGChord(midiOptions.gchord[0])\n\t}\n\telse {\n\t\tthis.overridePattern = undefined;\n\t}\n};\n\nChordTrack.prototype.setMeter = function (meter) {\n\tthis.meter = meter\n};\n\nChordTrack.prototype.setTempoChangeFactor = function (tempoChangeFactor) {\n\tthis.tempoChangeFactor = tempoChangeFactor\n};\n\nChordTrack.prototype.setLastBarTime = function (lastBarTime) {\n\tthis.lastBarTime = lastBarTime\n};\n\nChordTrack.prototype.setTranspose = function (transpose) {\n\tthis.transpose = transpose\n};\n\nChordTrack.prototype.setRhythmHead = function (isRhythmHead, elem) {\n\tthis.hasRhythmHead = isRhythmHead\n\tvar ePitches = [];\n\tif (isRhythmHead) {\n\t\tif (this.lastChord && this.lastChord.chick) {\n\t\t\tfor (var i2 = 0; i2 < this.lastChord.chick.length; i2++) {\n\t\t\t\tvar note2 = Object.assign({},elem.pitches[0]);\n\t\t\t\tnote2.actualPitch = this.lastChord.chick[i2];\n\t\t\t\tePitches.push(note2);\n\t\t\t}\n\t\t}\n\t}\n\treturn ePitches\n};\n\nChordTrack.prototype.barEnd = function (element) {\n\tif (this.chordTrack.length > 0 && !this.chordTrackFinished) {\n\t\tthis.resolveChords(this.lastBarTime, timeToRealTime(element.time));\n\t\tthis.currentChords = [];\n\t}\n\tthis.chordLastBar = this.lastChord;\n};\n\nChordTrack.prototype.gChordOn = function (element) {\n\tif (!this.chordsOff)\n\t\tthis.gChordTacet = element.tacet;\n};\n\nChordTrack.prototype.paramChange = function (element) {\n\tswitch (element.el_type) {\n\t\tcase \"gchord\":\n\t\t\t// Skips gchord elements that don't have pattern strings\n\t\t\tif (element.param && element.param.length > 0) {\n\t\t\t\tthis.overridePattern = parseGChord(element.param);\n\n\t\t\t\t// Generate a default duration scale based on the pattern\n\t\t\t\t//this.gchordduration = generateDefaultDurationScale(element.param);\n\t\t\t} else\n\t\t\t\tthis.overridePattern = undefined;\n\t\t\tbreak;\n\t\tcase \"bassprog\":\n\t\t\tthis.bassInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.bassOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.bassOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"chordprog\":\n\t\t\tthis.chordInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.chordOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.chordOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bassvol\":\n\t\t\tthis.boomVolume = element.param;\n\t\t\tbreak;\n\t\tcase \"chordvol\":\n\t\t\tthis.chickVolume = element.param;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconsole.log(\"unhandled midi param\", element)\t\n\t}\n};\n\nChordTrack.prototype.finish = function () {\n\tif (!this.chordTrackEmpty()) // Don't do chords on more than one track, so turn off chord detection after we create it.\n\t\tthis.chordTrackFinished = true;\n};\n\nChordTrack.prototype.addTrack = function (tracks) {\n\tif (!this.chordTrackEmpty())\n\t\ttracks.push(this.chordTrack);\n};\n\nChordTrack.prototype.findChord = function (elem) {\n\tif (this.gChordTacet)\n\t\treturn 'break';\n\n\t// TODO-PER: Just using the first chord if there are more than one.\n\tif (this.chordTrackFinished || !elem.chord || elem.chord.length === 0)\n\t\treturn null;\n\n\t// Return the first annotation that is a regular chord: that is, it is in the default place or is a recognized \"tacet\" phrase.\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar ch = elem.chord[i];\n\t\tif (ch.position === 'default')\n\t\t\treturn ch.name;\n\t\tif (this.breakSynonyms.indexOf(ch.name.toLowerCase()) >= 0)\n\t\t\treturn 'break';\n\t}\n\treturn null;\n}\n\nChordTrack.prototype.interpretChord = function (name) {\n\t// chords have the format:\n\t// [root][acc][modifier][/][bass][acc]\n\t// (The chord might be surrounded by parens. Just ignore them.)\n\t// root must be present and must be from A-G.\n\t// acc is optional and can be # or b\n\t// The modifier can be a wide variety of things, like \"maj7\". As they are discovered, more are supported here.\n\t// If there is a slash, then there is a bass note, which can be from A-G, with an optional acc.\n\t// If the root is unrecognized, then \"undefined\" is returned and there is no chord.\n\t// If the modifier is unrecognized, a major triad is returned.\n\t// If the bass notes is unrecognized, it is ignored.\n\tif (name.length === 0)\n\t\treturn undefined;\n\tif (name === 'break')\n\t\treturn { chick: [] };\n\tvar root = name.substring(0, 1);\n\tif (root === '(') {\n\t\tname = name.substring(1, name.length - 2);\n\t\tif (name.length === 0)\n\t\t\treturn undefined;\n\t\troot = name.substring(0, 1);\n\t}\n\tvar bass = this.basses[root];\n\tif (!bass)\t// If the bass note isn't listed, then this was an unknown root. Only A-G are accepted.\n\t\treturn undefined;\n\t// Don't transpose the chords more than an octave.\n\tvar chordTranspose = this.transpose;\n\twhile (chordTranspose < -8)\n\t\tchordTranspose += 12;\n\twhile (chordTranspose > 8)\n\t\tchordTranspose -= 12;\n\tbass += chordTranspose;\n\t\n    \t// MAE 31 Aug 2024 - For visual transpose backup range issue\n    \t// If transposed below A or above G, bring it back in the normal backup range\n    \tif (bass < 33){\n      \t\tbass += 12;\n    \t}\n    \telse if (bass > 44){\n\t     \t bass -= 12;\n    \t}\n\n\t// MAE 17 Jun 2024 - Supporting octave shifted bass and chords\n\tvar unshiftedBass = bass;\n\n\tbass += this.bassOctaveShift * 12;\n\n\tvar bass2 = bass - 5;\t// The alternating bass is a 4th below\n\tvar chick;\n\tif (name.length === 1)\n\t\tchick = this.chordNotes(bass, '');\n\tvar remaining = name.substring(1);\n\tvar acc = remaining.substring(0, 1);\n\tif (acc === 'b' || acc === '♭') {\n\t\tunshiftedBass--;\n\t\tbass--;\n\t\tbass2--;\n\t\tremaining = remaining.substring(1);\n\t} else if (acc === '#' || acc === '♯') {\n\t\tunshiftedBass++;\n\t\tbass++;\n\t\tbass2++;\n\t\tremaining = remaining.substring(1);\n\t}\n\tvar arr = remaining.split('/');\n\tchick = this.chordNotes(unshiftedBass, arr[0]);\n\t// If the 5th is altered then the bass is altered. Normally the bass is 7 from the root, so adjust if it isn't.\n\tif (chick.length >= 3) {\n\t\tvar fifth = chick[2] - chick[0];\n\t\tbass2 = bass2 + fifth - 7;\n\t}\n\n\tif (arr.length === 2) {\n\t\tvar explicitBass = this.basses[arr[1].substring(0, 1)];\n\t\tif (explicitBass) {\n\t\t\tvar bassAcc = arr[1].substring(1);\n\t\t\tvar bassShift = { '#': 1, '♯': 1, 'b': -1, '♭': -1 }[bassAcc] || 0;\n\t\t\tbass = this.basses[arr[1].substring(0, 1)] + bassShift + chordTranspose;\n\n\t\t\t// MAE 22 May 2024 - Supporting octave shifted bass and chords\n\t\t\tbass += this.bassOctaveShift * 12;\n\n\t\t\tbass2 = bass;\n\t\t}\n\t}\n\treturn { boom: bass, boom2: bass2, chick: chick };\n}\n\nChordTrack.prototype.chordNotes = function (bass, modifier) {\n\tvar intervals = this.chordIntervals[modifier];\n\tif (!intervals) {\n\t\tif (modifier.slice(0, 2).toLowerCase() === 'ma' || modifier[0] === 'M')\n\t\t\tintervals = this.chordIntervals.M;\n\t\telse if (modifier[0] === 'm' || modifier[0] === '-')\n\t\t\tintervals = this.chordIntervals.m;\n\t\telse\n\t\t\tintervals = this.chordIntervals.M;\n\t}\n\tbass += 12;\t// the chord is an octave above the bass note.\n\n\t// MAE 22 May 2024 - For chick octave shift\n\tbass += (this.chordOctaveShift * 12);\n\n\tvar notes = [];\n\tfor (var i = 0; i < intervals.length; i++) {\n\t\tnotes.push(bass + intervals[i]);\n\t}\n\treturn notes;\n}\n\nChordTrack.prototype.writeNote = function (note, beatLength, volume, beat, noteLength, instrument) {\n\t// undefined means there is a stop time.\n\tif (note !== undefined)\n\t\tthis.chordTrack.push({ cmd: 'note', pitch: note, volume: volume, start: this.lastBarTime + beat * durationRounded(beatLength, this.tempoChangeFactor), duration: durationRounded(noteLength, this.tempoChangeFactor), gap: 0, instrument: instrument });\n}\n\nChordTrack.prototype.chordTrackEmpty = function () {\n\tvar isEmpty = true;\n\tfor (var i = 0; i < this.chordTrack.length && isEmpty; i++) {\n\t\tif (this.chordTrack[i].cmd === 'note')\n\t\t\tisEmpty = false\n\t}\n\treturn isEmpty;\n}\n\nChordTrack.prototype.resolveChords = function (startTime, endTime) {\n\t// If there is a rhythm head anywhere in the measure then don't add a separate rhythm track\n\tif (this.hasRhythmHead)\n\t\treturn\n\n\tvar num = this.meter.num;\n\tvar den = this.meter.den;\n\tvar beatLength = 1 / den;\n\tvar noteLength = beatLength / 2;\n\tvar thisMeasureLength = parseInt(num, 10) / parseInt(den, 10);\n\tvar portionOfAMeasure = thisMeasureLength - (endTime - startTime) / this.tempoChangeFactor;\n\tif (Math.abs(portionOfAMeasure) < 0.00001)\n\t\tportionOfAMeasure = 0;\n\n\t // there wasn't a new chord this measure, so use the last chord declared.\n\t // also the case where there is a chord declared in the measure, but not on its first beat.\n\tif (this.currentChords.length === 0 || this.currentChords[0].beat !== 0) {\n\t\tthis.currentChords.unshift({ beat: 0, chord: this.chordLastBar });\n\t}\n\n\t//console.log(this.currentChords)\n\tvar currentChordsExpanded = expandCurrentChords(this.currentChords, 8*num/den, beatLength)\n\t//console.log(currentChordsExpanded)\n\tvar thisPattern = this.overridePattern ? this.overridePattern : this.rhythmPatterns[num + '/' + den]\n\tif (portionOfAMeasure) {\n\t\tthisPattern = [];\n\t\tvar beatsPresent = ((endTime - startTime) / this.tempoChangeFactor) * 8;\n\t\tfor (var p = 0; p < beatsPresent/2; p += 2) {\n\t\t\tthisPattern.push(\"chick\");\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tif (!thisPattern) {\n\t\tthisPattern = []\n\t\tfor (var p = 0; p < (8*num/den)/2; p++) {\n\t\t\tthisPattern.push('chick')\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tvar firstBoom = true\n\t// If the pattern is overridden, it might be longer than the length of a measure. If so, then ignore the rest of it\n\tvar minLength = Math.min(thisPattern.length, currentChordsExpanded.length)\n\tfor (var p = 0; p < minLength; p++) {\n\t\tif (p > 0 && currentChordsExpanded[p-1] && currentChordsExpanded[p] && currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\t\tfirstBoom = true\n\t\tvar type = thisPattern[p]\n\t\tvar isBoom = type.indexOf('boom') >= 0\n\t\t// If we changed chords at a time when we're not expecting a bass note, then add an extra bass note in if the first thing in the pattern is a bass note.\n\t\tvar newBass = !isBoom &&\n\t\t\tp !== 0 &&\n\t\t\tthisPattern[0].indexOf('boom') >= 0 &&\n\t\t\t(!currentChordsExpanded[p-1] || currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\tvar pitches = resolvePitch(currentChordsExpanded[p], type, firstBoom, newBass)\n\t\tif (isBoom)\n\t\t\tfirstBoom = false\n\t\tfor (var oo = 0; oo < pitches.length; oo++) {\n\t\t\tthis.writeNote(pitches[oo], \n\t\t\t\t0.125,\n\t\t\t\tisBoom || newBass ? this.boomVolume : this.chickVolume,\n\t\t\t\tp,\n\t\t\t\tnoteLength,\n\t\t\t\tisBoom || newBass ? this.bassInstrument : this.chordInstrument\n\t\t\t)\n\t\t\tif (newBass)\n\t\t\t\tnewBass = false\n\t\t\telse\n\t\t\t\tisBoom = false // only the first note in a chord is a bass note. This handles the case where bass and chord are played at the same time.\n\t\t}\n\t}\n\treturn\n}\n\nChordTrack.prototype.processChord = function (elem) {\n\tif (this.chordTrackFinished)\n\t\treturn\n\tvar chord = this.findChord(elem);\n\tif (chord) {\n\t\tvar c = this.interpretChord(chord);\n\t\t// If this isn't a recognized chord, just completely ignore it.\n\t\tif (c) {\n\t\t\t// If we ever have a chord in this voice, then we add the chord track.\n\t\t\t// However, if there are chords on more than one voice, then just use the first voice.\n\t\t\tif (this.chordTrack.length === 0) {\n\t\t\t\tthis.chordTrack.push({ cmd: 'program', channel: this.chordChannel, instrument: this.chordInstrument });\n\t\t\t}\n\n\t\t\tthis.lastChord = c;\n\t\t\tvar barBeat = calcBeat(this.lastBarTime, timeToRealTime(elem.time));\n\t\t\tthis.currentChords.push({ chord: this.lastChord, beat: barBeat, start: timeToRealTime(elem.time) });\n\t\t}\n\t}\n}\n\nfunction resolvePitch(currentChord, type, firstBoom, newBass) {\n\tvar ret = []\n\tif (!currentChord)\n\t\treturn ret\n\tif (type.indexOf('boom') >= 0)\n\t\tret.push(firstBoom ? currentChord.boom : currentChord.boom2)\n\telse if (newBass)\n\t\tret.push(currentChord.boom)\n\tvar numChordNotes = currentChord.chick.length\n\tif (type.indexOf('chick') >= 0) {\n\t\tfor (var i = 0; i < numChordNotes; i++)\n\t\t\tret.push(currentChord.chick[i])\n\t}\n\tswitch (type) {\n\t\tcase 'DO': ret.push(currentChord.chick[0]); break;\n\t\tcase 'MI': ret.push(currentChord.chick[1]); break;\n\t\tcase 'SOL': ret.push(extractNote(currentChord,2)); break;\n\t\tcase 'TI': ret.push(extractNote(currentChord,3)); break;\n\t\tcase 'TOP': ret.push(extractNote(currentChord,4)); break;\n\t\tcase 'do': ret.push(currentChord.chick[0]+12); break;\n\t\tcase 'mi': ret.push(currentChord.chick[1]+12); break;\n\t\tcase 'sol': ret.push(extractNote(currentChord,2)+12); break;\n\t\tcase 'ti': ret.push(extractNote(currentChord,3)+12); break;\n\t\tcase 'top': ret.push(extractNote(currentChord,4)+12); break;\n\t}\n\treturn ret\n}\n\nfunction extractNote(chord, index) {\n\t// This creates an arpeggio note no matter how many notes are in the chord - if it runs out of notes it continues in the next octave\n\tvar octave = Math.floor(index / chord.chick.length)\n\tvar note = chord.chick[index % chord.chick.length]\n\t//console.log(chord.chick, {index, octave, note}, index % chord.chick.length)\n\treturn note + octave * 12\n}\n\nfunction parseGChord(gchord) {\n\t// TODO-PER: The spec is more complicated than this but for now this will not try to do anything with error cases like the wrong number of beats.\n\tvar pattern = []\n\tfor (var i = 0; i < gchord.length; i++) {\n\t\tvar ch = gchord[i]\n\t\tswitch(ch) {\n\t\t\tcase 'z' : pattern.push(''); break;\n\t\t\tcase '2' : pattern.push(''); break; // TODO-PER: This should extend the last note, but that's a small effect\n\t\t\tcase 'c' : pattern.push('chick'); break;\n\t\t\tcase 'b' : pattern.push('boom&chick'); break;\n\t\t\tcase 'f' : pattern.push('boom'); break;\n\t\t\tcase 'G' : pattern.push('DO'); break;\n\t\t\tcase 'H' : pattern.push('MI'); break;\n\t\t\tcase 'I' : pattern.push('SOL'); break;\n\t\t\tcase 'J' : pattern.push('TI'); break;\n\t\t\tcase 'K' : pattern.push('TOP'); break;\n\t\t\tcase 'g' : pattern.push('do'); break;\n\t\t\tcase 'h' : pattern.push('mi'); break;\n\t\t\tcase 'i' : pattern.push('sol'); break;\n\t\t\tcase 'j' : pattern.push('ti'); break;\n\t\t\tcase 'k' : pattern.push('top'); break;\n\t\t}\n\t}\n\treturn pattern\n}\n\n// This returns an array that has a chord for each 1/8th note position in the current measure\nfunction expandCurrentChords(currentChords, num8thNotes, beatLength) {\n\tbeatLength = beatLength * 8 // this is expressed as a fraction, so that 0.25 is a quarter notes. We want it to be the number of 8th notes\n\tvar chords = []\n\tif (currentChords.length === 0)\n\t\treturn chords\n\n\tvar currentChord = currentChords[0].chord\n\tfor (var i = 1; i < currentChords.length; i++) {\n\t\tvar current = currentChords[i]\n\t\twhile (chords.length < current.beat) {\n\t\t\tchords.push(currentChord)\n\t\t}\n\t\tcurrentChord = current.chord\n\t}\n\twhile (chords.length < num8thNotes)\n\t\tchords.push(currentChord)\n\treturn chords\n}\n\nfunction calcBeat(measureStart, currTime) {\n\tvar distanceFromStart = currTime - measureStart;\n\treturn distanceFromStart * 8;\n}\n\nChordTrack.prototype.breakSynonyms = ['break', '(break)', 'no chord', 'n.c.', 'tacet'];\n\nChordTrack.prototype.basses = {\n\t'A': 33, 'B': 35, 'C': 36, 'D': 38, 'E': 40, 'F': 41, 'G': 43\n};\n\nChordTrack.prototype.chordIntervals = {\n\t// diminished (all flat 5 chords)\n\t'dim': [0, 3, 6],\n\t'°': [0, 3, 6],\n\t'˚': [0, 3, 6],\n\n\t'dim7': [0, 3, 6, 9],\n\t'°7': [0, 3, 6, 9],\n\t'˚7': [0, 3, 6, 9],\n\n\t'ø7': [0, 3, 6, 10],\n\t'm7(b5)': [0, 3, 6, 10],\n\t'm7b5': [0, 3, 6, 10],\n\t'm7♭5': [0, 3, 6, 10],\n\t'-7(b5)': [0, 3, 6, 10],\n\t'-7b5': [0, 3, 6, 10],\n\n\t'7b5': [0, 4, 6, 10],\n\t'7(b5)': [0, 4, 6, 10],\n\t'7♭5': [0, 4, 6, 10],\n\n\t'7(b9,b5)': [0, 4, 6, 10, 13],\n\t'7b9,b5': [0, 4, 6, 10, 13],\n\t'7(#9,b5)': [0, 4, 6, 10, 15],\n\t'7#9b5': [0, 4, 6, 10, 15],\n\t'maj7(b5)': [0, 4, 6, 11],\n\t'maj7b5': [0, 4, 6, 11],\n\t'13(b5)': [0, 4, 6, 10, 14, 21],\n\t'13b5': [0, 4, 6, 10, 14, 21],\n\n\t// minor (all normal 5, minor 3 chords)\n\t'm': [0, 3, 7],\n\t'-': [0, 3, 7],\n\t'm6': [0, 3, 7, 9],\n\t'-6': [0, 3, 7, 9],\n\t'm7': [0, 3, 7, 10],\n\t'-7': [0, 3, 7, 10],\n\n\t'-(b6)': [0, 3, 7, 8],\n\t'-b6': [0, 3, 7, 8],\n\t'-6/9': [0, 3, 7, 9, 14],\n\t'-7(b9)': [0, 3, 7, 10, 13],\n\t'-7b9': [0, 3, 7, 10, 13],\n\t'-maj7': [0, 3, 7, 11],\n\t'-9+7': [0, 3, 7, 11, 13],\n\t'-11': [0, 3, 7, 11, 14, 17],\n\t'm11': [0, 3, 7, 11, 14, 17],\n\t'-maj9': [0, 3, 7, 11, 14],\n\t'-∆9': [0, 3, 7, 11, 14],\n\t'mM9': [0, 3, 7, 11, 14],\n\n\t// major (all normal 5, major 3 chords)\n\t'M': [0, 4, 7],\n\t'6': [0, 4, 7, 9],\n\t'6/9': [0, 4, 7, 9, 14],\n\t'6add9': [0, 4, 7, 9, 14],\n\t'69': [0, 4, 7, 9, 14],\n\n\t'7': [0, 4, 7, 10],\n\t'9': [0, 4, 7, 10, 14],\n\t'11': [0, 7, 10, 14, 17],\n\t'13': [0, 4, 7, 10, 14, 21],\n\t'7b9': [0, 4, 7, 10, 13],\n\t'7♭9': [0, 4, 7, 10, 13],\n\t'7(b9)': [0, 4, 7, 10, 13],\n\t'7(#9)': [0, 4, 7, 10, 15],\n\t'7#9': [0, 4, 7, 10, 15],\n\t'(13)': [0, 4, 7, 10, 14, 21],\n\t'7(9,13)': [0, 4, 7, 10, 14, 21],\n\t'7(#9,b13)': [0, 4, 7, 10, 15, 20],\n\t'7(#11)': [0, 4, 7, 10, 14, 18],\n\t'7#11': [0, 4, 7, 10, 14, 18],\n\t'7(b13)': [0, 4, 7, 10, 20],\n\t'7b13': [0, 4, 7, 10, 20],\n\t'9(#11)': [0, 4, 7, 10, 14, 18],\n\t'9#11': [0, 4, 7, 10, 14, 18],\n\t'13(#11)': [0, 4, 7, 10, 18, 21],\n\t'13#11': [0, 4, 7, 10, 18, 21],\n\n\t'maj7': [0, 4, 7, 11],\n\t'∆7': [0, 4, 7, 11],\n\t'Δ7': [0, 4, 7, 11],\n\t'maj9': [0, 4, 7, 11, 14],\n\t'maj7(9)': [0, 4, 7, 11, 14],\n\t'maj7(11)': [0, 4, 7, 11, 17],\n\t'maj7(#11)': [0, 4, 7, 11, 18],\n\t'maj7(13)': [0, 4, 7, 14, 21],\n\t'maj7(9,13)': [0, 4, 7, 11, 14, 21],\n\n\t'7sus4': [0, 5, 7, 10],\n\t'm7sus4': [0, 3, 7, 10, 17],\n\t'sus4': [0, 5, 7],\n\t'sus2': [0, 2, 7],\n\t'7sus2': [0, 2, 7, 10],\n\t'9sus4': [0, 5, 7, 10, 14],\n\t'13sus4': [0, 5, 7, 10, 14, 21],\n\n\t// augmented (all sharp 5 chords)\n\t'aug7': [0, 4, 8, 10],\n\t'+7': [0, 4, 8, 10],\n\t'+': [0, 4, 8],\n\t'7#5': [0, 4, 8, 10],\n\t'7♯5': [0, 4, 8, 10],\n\t'7+5': [0, 4, 8, 10],\n\t'9#5': [0, 4, 8, 10, 14],\n\t'9♯5': [0, 4, 8, 10, 14],\n\t'9+5': [0, 4, 8, 10, 14],\n\t'-7(#5)': [0, 3, 8, 10],\n\t'-7#5': [0, 3, 8, 10],\n\t'7(#5)': [0, 4, 8, 10],\n\t'7(b9,#5)': [0, 4, 8, 10, 13],\n\t'7b9#5': [0, 4, 8, 10, 13],\n\t'maj7(#5)': [0, 4, 8, 11],\n\t'maj7#5': [0, 4, 8, 11],\n\t'maj7(#5,#11)': [0, 4, 8, 11, 18],\n\t'maj7#5#11': [0, 4, 8, 11, 18],\n\t'9(#5)': [0, 4, 8, 10, 14],\n\t'13(#5)': [0, 4, 8, 10, 14, 21],\n\t'13#5': [0, 4, 8, 10, 14, 21],\n\t// MAE Power chords added 10 April 2024\n\t'5': [0, 7],\n\t'5(8)': [0, 7, 12],\n\t'5add8': [0, 7, 12]\n\n};\n\nChordTrack.prototype.rhythmPatterns = {\n\t\"2/2\": ['boom', '', '', '', 'chick', '', '', ''],\n\t\"3/2\": ['boom', '', '', '', 'chick', '', '', '', 'chick', '', '', ''],\n\t\"4/2\": ['boom', '', '', '', 'chick', '', '', '', 'boom', '', '', '', 'chick', '', '', ''],\n\n\t\"2/4\": ['boom', '', 'chick', ''],\n\t\"3/4\": ['boom', '', 'chick', '', 'chick', ''],\n\t\"4/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"5/4\": ['boom', '', 'chick', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"6/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\n\t\"3/8\": ['boom', '', 'chick'],\n\t\"5/8\": ['boom', 'chick', 'chick', 'boom', 'chick'],\n\t\"6/8\": ['boom', '', 'chick', 'boom', '', 'chick'],\n\t\"7/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"9/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n\t\"10/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"11/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick', 'chick'],\n\t\"12/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n};\n\n// TODO-PER: these are repeated in flattener. Can it be shared?\n\nfunction timeToRealTime(time) {\n\treturn time / 1000000;\n}\n\nfunction durationRounded(duration, tempoChangeFactor) {\n\treturn Math.round(duration * tempoChangeFactor * 1000000) / 1000000;\n}\n\nmodule.exports = ChordTrack;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/chord-track.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/create-note-map.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/create-note-map.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// Convert the input structure to a more useful structure where each item has a length of its own.\n\nvar instrumentIndexToName = __webpack_require__(/*! ./instrument-index-to-name */ \"./node_modules/abcjs/src/synth/instrument-index-to-name.js\");\n\nvar createNoteMap = function(sequence) {\n\tvar map = [];\n\tfor (var i = 0; i < sequence.tracks.length; i++)\n\t\tmap.push([]);\n\n\t// TODO-PER: handle more than one note in a track\n\tvar nextNote = {};\n\tvar currentInstrument = instrumentIndexToName[0];\n\t// ev.start and ev.duration are in whole notes. Need to turn them into\n\tsequence.tracks.forEach(function(track, i) {\n\t\ttrack.forEach(function(ev) {\n\t\t\tswitch (ev.cmd) {\n\t\t\t\tcase \"note\":\n\t\t\t\t\t// ev contains:\n\t\t\t\t\t// {\"cmd\":\"note\",\"pitch\":72,\"volume\":95,\"start\":0.125,\"duration\":0.25,\"instrument\":0,\"gap\":0}\n\t\t\t\t\t// where start and duration are in whole notes, gap is in 1/1920 of a second (i.e. MIDI ticks)\n\t\t\t\t\tvar inst = ev.instrument !== undefined ? instrumentIndexToName[ev.instrument] : currentInstrument\n\t\t\t\t\tif (ev.duration > 0) {\n\t\t\t\t\t\tvar gap = ev.gap ? ev.gap : 0;\n\t\t\t\t\t\tvar len = ev.duration;\n\t\t\t\t\t\tgap = Math.min(gap, len * 2 / 3);\n\t\t\t\t\t\tvar obj = {\n\t\t\t\t\t\t\tpitch: ev.pitch,\n\t\t\t\t\t\t\tinstrument: inst,\n\t\t\t\t\t\t\tstart: Math.round((ev.start) * 1000000)/1000000,\n\t\t\t\t\t\t\tend: Math.round((ev.start + len - gap) * 1000000)/1000000,\n\t\t\t\t\t\t\tvolume: ev.volume\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (ev.startChar)\n\t\t\t\t\t\t\tobj.startChar = ev.startChar;\n\t\t\t\t\t\tif (ev.endChar)\n\t\t\t\t\t\t\tobj.endChar = ev.endChar;\n\t\t\t\t\t\tif (ev.style)\n\t\t\t\t\t\t\tobj.style = ev.style;\n\t\t\t\t\t\tif (ev.cents)\n\t\t\t\t\t\t\tobj.cents = ev.cents;\n\t\t\t\t\t\tmap[i].push(obj);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"program\":\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[ev.instrument];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Ignore the track names - that is just for midi files.\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO-PER: handle other event types\n\t\t\t\t\tconsole.log(\"Unhandled midi event\", ev);\n\t\t\t}\n\t\t});\n\t});\n\treturn map;\n};\n\nmodule.exports = createNoteMap;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/create-note-map.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/create-synth-control.js":
/*!**************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/create-synth-control.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var supportsAudio = __webpack_require__(/*! ./supports-audio */ \"./node_modules/abcjs/src/synth/supports-audio.js\");\nvar registerAudioContext = __webpack_require__(/*! ./register-audio-context */ \"./node_modules/abcjs/src/synth/register-audio-context.js\");\nvar activeAudioContext = __webpack_require__(/*! ./active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\n\nvar loopImage = __webpack_require__(/*! ./images/loop.svg.js */ \"./node_modules/abcjs/src/synth/images/loop.svg.js\");\nvar playImage = __webpack_require__(/*! ./images/play.svg.js */ \"./node_modules/abcjs/src/synth/images/play.svg.js\");\nvar pauseImage = __webpack_require__(/*! ./images/pause.svg.js */ \"./node_modules/abcjs/src/synth/images/pause.svg.js\");\nvar loadingImage = __webpack_require__(/*! ./images/loading.svg.js */ \"./node_modules/abcjs/src/synth/images/loading.svg.js\");\nvar resetImage = __webpack_require__(/*! ./images/reset.svg.js */ \"./node_modules/abcjs/src/synth/images/reset.svg.js\");\n\nfunction CreateSynthControl(parent, options) {\n\tvar self = this;\n\t// parent is either an element or a selector.\n\tif (typeof parent === \"string\") {\n\t\tvar selector = parent;\n\t\tparent = document.querySelector(selector);\n\t\tif (!parent)\n\t\t\tthrow new Error(\"Cannot find element \\\"\" + selector + \"\\\" in the DOM.\");\n\t} else if (!(parent instanceof HTMLElement))\n\t\tthrow new Error(\"The first parameter must be a valid element or selector in the DOM.\");\n\n\tself.parent = parent;\n\tself.options = {};\n\tif (options)\n\t\tself.options = Object.assign({},options);\n\n\t// This can be called in the following cases:\n\t// AC already registered and not suspended\n\t// AC already registered and suspended\n\t// AC not registered and not passed in\n\t// AC not registered but passed in (but suspended)\n\t// AC not registered but passed in (not suspended)\n\t// If the AC is already registered, then just use it - ignore what is passed in\n\t// Create the AC if necessary if there isn't one already.\n\t// We don't care right now if the AC is suspended - whenever a button is clicked then we check it.\n\tif (self.options.ac)\n\t\tregisterAudioContext(self.options.ac);\n\tbuildDom(self.parent, self.options);\n\tattachListeners(self);\n\n\tself.disable = function(isDisabled) {\n\t\tvar el = self.parent.querySelector(\".abcjs-inline-audio\");\n\t\tif (isDisabled)\n\t\t\tel.classList.add(\"abcjs-disabled\");\n\t\telse\n\t\t\tel.classList.remove(\"abcjs-disabled\");\n\t};\n\tself.setWarp = function(tempo, warp) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-tempo\");\n\t\tel.value = Math.round(warp);\n\t\tself.setTempo(tempo)\n\t};\n\tself.setTempo = function(tempo) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-current-tempo\");\n\t\tif (el)\n\t\t\tel.innerHTML = Math.round(tempo);\n\t};\n\tself.resetAll = function() {\n\t\tvar pushedButtons = self.parent.querySelectorAll(\".abcjs-pushed\");\n\t\tfor (var i = 0; i < pushedButtons.length; i++) {\n\t\t\tvar button = pushedButtons[i];\n\t\t\tbutton.classList.remove(\"abcjs-pushed\");\n\t\t}\n\t};\n\tself.pushPlay = function(push) {\n\t\tvar startButton = self.parent.querySelector(\".abcjs-midi-start\");\n\t\tif (!startButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tstartButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tstartButton.classList.remove(\"abcjs-pushed\");\n\t};\n\tself.pushLoop = function(push) {\n\t\tvar loopButton = self.parent.querySelector(\".abcjs-midi-loop\");\n\t\tif (!loopButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tloopButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tloopButton.classList.remove(\"abcjs-pushed\");\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tvar progressBackground = self.parent.querySelector(\".abcjs-midi-progress-background\");\n\t\tvar progressThumb = self.parent.querySelector(\".abcjs-midi-progress-indicator\");\n\t\tif (!progressBackground || !progressThumb)\n\t\t\treturn;\n\t\tvar width = progressBackground.clientWidth;\n\t\tvar left = width * percent;\n\t\tprogressThumb.style.left = left + \"px\";\n\n\t\tvar clock = self.parent.querySelector(\".abcjs-midi-clock\");\n\t\tif (clock) {\n\t\t\tvar totalSeconds = (totalTime * percent) / 1000;\n\t\t\tvar minutes = Math.floor(totalSeconds / 60);\n\t\t\tvar seconds = Math.floor(totalSeconds % 60);\n\t\t\tvar secondsFormatted = seconds < 10 ? \"0\" + seconds : seconds;\n\t\t\tclock.innerHTML = minutes + \":\" + secondsFormatted;\n\t\t}\n\t};\n\n\tif (self.options.afterResume) {\n\t\tvar isResumed = false;\n\t\tif (self.options.ac) {\n\t\t\tisResumed = self.options.ac.state !== \"suspended\";\n\t\t} else if (activeAudioContext()) {\n\t\t\tisResumed = activeAudioContext().state !== \"suspended\";\n\t\t}\n\t\tif (isResumed)\n\t\t\tself.options.afterResume();\n\t}\n}\n\nfunction buildDom(parent, options) {\n\tvar hasLoop = !!options.loopHandler;\n\tvar hasRestart = !!options.restartHandler;\n\tvar hasPlay = !!options.playHandler || !!options.playPromiseHandler;\n\tvar hasProgress = !!options.progressHandler;\n\tvar hasWarp = !!options.warpHandler;\n\tvar hasClock = options.hasClock !== false;\n\n\tvar html = '<div class=\"abcjs-inline-audio\">\\n';\n\tif (hasLoop) {\n\t\tvar repeatTitle = options.repeatTitle ? options.repeatTitle : \"Click to toggle play once/repeat.\";\n\t\tvar repeatAria = options.repeatAria ? options.repeatAria : repeatTitle;\n\t\thtml += '<button type=\"button\" class=\"abcjs-midi-loop abcjs-btn\" title=\"' + repeatTitle + '\" aria-label=\"' + repeatAria + '\">' + loopImage + '</button>\\n';\n\t}\n\tif (hasRestart) {\n\t\tvar restartTitle = options.restartTitle ? options.restartTitle : \"Click to go to beginning.\";\n\t\tvar restartAria = options.restartAria ? options.restartAria : restartTitle;\n\t\thtml += '<button type=\"button\" class=\"abcjs-midi-reset abcjs-btn\" title=\"' + restartTitle + '\" aria-label=\"' + restartAria + '\">' + resetImage + '</button>\\n';\n\t}\n\tif (hasPlay) {\n\t\tvar playTitle = options.playTitle ? options.playTitle : \"Click to play/pause.\";\n\t\tvar playAria = options.playAria ? options.playAria : playTitle;\n\t\thtml += '<button type=\"button\" class=\"abcjs-midi-start abcjs-btn\" title=\"' + playTitle + '\" aria-label=\"' + playAria + '\">' + playImage + pauseImage + loadingImage + '</button>\\n';\n\t}\n\tif (hasProgress) {\n\t\tvar randomTitle = options.randomTitle ? options.randomTitle : \"Click to change the playback position.\";\n\t\tvar randomAria = options.randomAria ? options.randomAria : randomTitle;\n\t\thtml += '<button type=\"button\" class=\"abcjs-midi-progress-background\" title=\"' + randomTitle + '\" aria-label=\"' + randomAria + '\"><span class=\"abcjs-midi-progress-indicator\"></span></button>\\n';\n\t}\n\tif (hasClock) {\n\t\thtml += '<span class=\"abcjs-midi-clock\"></span>\\n';\n\t}\n\tif (hasWarp) {\n\t\tvar warpTitle = options.warpTitle ? options.warpTitle : \"Change the playback speed.\";\n\t\tvar warpAria = options.warpAria ? options.warpAria : warpTitle;\n\t\tvar bpm = options.bpm ? options.bpm : \"BPM\";\n\t\thtml += '<span class=\"abcjs-tempo-wrapper\"><label><input class=\"abcjs-midi-tempo\" type=\"number\" min=\"1\" max=\"300\" value=\"100\" title=\"' + warpTitle + '\" aria-label=\"' + warpAria + '\">%</label><span>&nbsp;(<span class=\"abcjs-midi-current-tempo\"></span> ' + bpm + ')</span></span>\\n';\n\t}\n\thtml += '<div class=\"abcjs-css-warning\" style=\"font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;\">CSS required: load abcjs-audio.css</div>';\n\thtml += '</div>\\n';\n\tparent.innerHTML = html;\n}\n\nfunction acResumerMiddleWare(next, ev, playBtn, afterResume, isPromise) {\n\tvar needsInit = true;\n\tif (!activeAudioContext()) {\n\t\tregisterAudioContext();\n\t} else {\n\t\tneedsInit = activeAudioContext().state === \"suspended\";\n\t}\n\tif (!supportsAudio()) {\n\t\tthrow { status: \"NotSupported\", message: \"This browser does not support audio.\"};\n\t}\n\n\tif ((needsInit || isPromise) && playBtn)\n\t\tplayBtn.classList.add(\"abcjs-loading\");\n\n\tif (needsInit) {\n\t\tactiveAudioContext().resume().then(function () {\n\t\t\tif (afterResume) {\n\t\t\t\tafterResume().then(function (response) {\n\t\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tdoNext(next, ev, playBtn, isPromise);\n\t}\n}\n\nfunction doNext(next, ev, playBtn, isPromise) {\n\tif (isPromise) {\n\t\tnext(ev).then(function() {\n\t\t\tif (playBtn)\n\t\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t\t});\n\t} else {\n\t\tnext(ev);\n\t\tif (playBtn)\n\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t}\n}\n\nfunction attachListeners(self) {\n\tvar hasLoop = !!self.options.loopHandler;\n\tvar hasRestart = !!self.options.restartHandler;\n\tvar hasPlay = !!self.options.playHandler || !!self.options.playPromiseHandler;\n\tvar hasProgress = !!self.options.progressHandler;\n\tvar hasWarp = !!self.options.warpHandler;\n\tvar playBtn = self.parent.querySelector(\".abcjs-midi-start\");\n\n\tif (hasLoop)\n\t\tself.parent.querySelector(\".abcjs-midi-loop\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.loopHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasRestart)\n\t\tself.parent.querySelector(\".abcjs-midi-reset\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.restartHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasPlay)\n\t\tplayBtn.addEventListener(\"click\", function(ev){\n\t\t\tacResumerMiddleWare(\n\t\t\t\tself.options.playPromiseHandler || self.options.playHandler,\n\t\t\t\tev,\n\t\t\t\tplayBtn,\n\t\t\t\tself.options.afterResume,\n\t\t\t\t!!self.options.playPromiseHandler)\n\t\t});\n\tif (hasProgress)\n\t\tself.parent.querySelector(\".abcjs-midi-progress-background\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.progressHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasWarp)\n\t\tself.parent.querySelector(\".abcjs-midi-tempo\").addEventListener(\"change\", function(ev){acResumerMiddleWare(self.options.warpHandler, ev, playBtn, self.options.afterResume)});\n}\nmodule.exports = CreateSynthControl;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/create-synth-control.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/create-synth.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/synth/create-synth.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNote = __webpack_require__(/*! ./load-note */ \"./node_modules/abcjs/src/synth/load-note.js\");\nvar createNoteMap = __webpack_require__(/*! ./create-note-map */ \"./node_modules/abcjs/src/synth/create-note-map.js\");\nvar registerAudioContext = __webpack_require__(/*! ./register-audio-context */ \"./node_modules/abcjs/src/synth/register-audio-context.js\");\nvar activeAudioContext = __webpack_require__(/*! ./active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\nvar supportsAudio = __webpack_require__(/*! ./supports-audio */ \"./node_modules/abcjs/src/synth/supports-audio.js\");\nvar pitchToNoteName = __webpack_require__(/*! ./pitch-to-note-name */ \"./node_modules/abcjs/src/synth/pitch-to-note-name.js\");\nvar instrumentIndexToName = __webpack_require__(/*! ./instrument-index-to-name */ \"./node_modules/abcjs/src/synth/instrument-index-to-name.js\");\nvar downloadBuffer = __webpack_require__(/*! ./download-buffer */ \"./node_modules/abcjs/src/synth/download-buffer.js\");\nvar placeNote = __webpack_require__(/*! ./place-note */ \"./node_modules/abcjs/src/synth/place-note.js\");\nvar soundsCache = __webpack_require__(/*! ./sounds-cache */ \"./node_modules/abcjs/src/synth/sounds-cache.js\");\n\n// TODO-PER: remove the midi tests from here: I don't think the object can be constructed unless it passes.\nvar notSupportedMessage = \"MIDI is not supported in this browser.\";\n\nvar originalSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/abcjs/\";\n// These are the original soundfonts supplied. They will need a volume boost:\nvar defaultSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/\";\nvar alternateSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/\";\n\nfunction CreateSynth() {\n\tvar self = this;\n\tself.audioBufferPossible = undefined;\n\tself.directSource = []; // type: AudioBufferSourceNode\n\tself.startTimeSec = undefined; // the time (in seconds) that the audio started: used for pause to get the pausedTimeSec.\n\tself.pausedTimeSec = undefined; // the position (in seconds) that the audio was paused: used for resume.\n\tself.audioBuffers = []; // cache of the buffers so starting play can be fast.\n\tself.duration = undefined; // the duration of the tune in seconds.\n\tself.isRunning = false; // whether there is currently a sound buffer running.\n\tself.options = undefined\n\tself.pickupLength = 0\n\n\t// Load and cache all needed sounds\n\tself.init = function(options) {\n\t\tif (!options)\n\t\t\toptions = {};\n\t\tif (options.options)\n\t\t\tself.options = options.options\n\t\tregisterAudioContext(options.audioContext); // This works no matter what - if there is already an ac it is a nop; if the context is not passed in, then it creates one.\n\t\tvar startTime = activeAudioContext().currentTime;\n\t\tself.debugCallback = options.debugCallback;\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"init called\");\n\t\tself.audioBufferPossible = self._deviceCapable();\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject({ status: \"NotSupported\", message: notSupportedMessage});\n\t\tvar params = options.options ? options.options : {};\n\t\tself.soundFontUrl = params.soundFontUrl ? params.soundFontUrl : defaultSoundFontUrl;\n\t\tif (self.soundFontUrl[self.soundFontUrl.length-1] !== '/')\n\t\t\tself.soundFontUrl += '/';\n\t\tif (params.soundFontVolumeMultiplier || params.soundFontVolumeMultiplier === 0)\n\t\t\tself.soundFontVolumeMultiplier = params.soundFontVolumeMultiplier;\n\t\telse if (self.soundFontUrl === defaultSoundFontUrl || self.soundFontUrl === alternateSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 3.0;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 0.4;\n\t\telse\n\t\t\tself.soundFontVolumeMultiplier = 1.0;\n\t\tif (params.programOffsets)\n\t\t\tself.programOffsets = params.programOffsets;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.programOffsets = {\n\t\t\t\t\"bright_acoustic_piano\": 20,\n\t\t\t\t\"honkytonk_piano\": 20,\n\t\t\t\t\"electric_piano_1\": 30,\n\t\t\t\t\"electric_piano_2\": 30,\n\t\t\t\t\"harpsichord\": 40,\n\t\t\t\t\"clavinet\": 20,\n\t\t\t\t\"celesta\": 20,\n\t\t\t\t\"glockenspiel\": 40,\n\t\t\t\t\"vibraphone\": 30,\n\t\t\t\t\"marimba\": 35,\n\t\t\t\t\"xylophone\": 30,\n\t\t\t\t\"tubular_bells\": 35,\n\t\t\t\t\"dulcimer\": 30,\n\t\t\t\t\"drawbar_organ\": 20,\n\t\t\t\t\"percussive_organ\": 25,\n\t\t\t\t\"rock_organ\": 20,\n\t\t\t\t\"church_organ\": 40,\n\t\t\t\t\"reed_organ\": 40,\n\t\t\t\t\"accordion\": 40,\n\t\t\t\t\"harmonica\": 40,\n\t\t\t\t\"acoustic_guitar_nylon\": 20,\n\t\t\t\t\"acoustic_guitar_steel\": 30,\n\t\t\t\t\"electric_guitar_jazz\": 25,\n\t\t\t\t\"electric_guitar_clean\": 15,\n\t\t\t\t\"electric_guitar_muted\": 35,\n\t\t\t\t\"overdriven_guitar\": 25,\n\t\t\t\t\"distortion_guitar\": 20,\n\t\t\t\t\"guitar_harmonics\": 30,\n\t\t\t\t\"electric_bass_finger\": 15,\n\t\t\t\t\"electric_bass_pick\": 30,\n\t\t\t\t\"fretless_bass\": 40,\n\t\t\t\t\"violin\": 105,\n\t\t\t\t\"viola\": 50,\n\t\t\t\t\"cello\": 40,\n\t\t\t\t\"contrabass\": 60,\n\t\t\t\t\"trumpet\": 10,\n\t\t\t\t\"trombone\": 90,\n\t\t\t\t\"alto_sax\": 20,\n\t\t\t\t\"tenor_sax\": 20,\n\t\t\t\t\"clarinet\": 20,\n\t\t\t\t\"flute\": 50,\n\t\t\t\t\"banjo\": 50,\n\t\t\t\t\"woodblock\": 20,\n\t\t\t};\n\t\telse\n\t\t\tself.programOffsets = {};\n\t\tvar p = params.fadeLength !== undefined ? parseInt(params.fadeLength,10) : NaN;\n\t\tself.fadeLength = isNaN(p) ? 200 : p;\n\t\tp = params.noteEnd !== undefined ? parseInt(params.noteEnd,10) : NaN;\n\t\tself.noteEnd = isNaN(p) ? 0 : p;\n\n\t\tself.pan = params.pan;\n\t\tself.meterSize = 1;\n\t\tif (options.visualObj) {\n\t\t\tself.flattened = options.visualObj.setUpAudio(params);\n\t\t\tvar meter = options.visualObj.getMeterFraction();\n\t\t\tif (meter.den)\n\t\t\t\tself.meterSize = options.visualObj.getMeterFraction().num / options.visualObj.getMeterFraction().den;\n\t\t\tself.pickupLength = options.visualObj.getPickupLength()\n\t\t} else if (options.sequence)\n\t\t\tself.flattened = options.sequence;\n\t\telse\n\t\t\treturn Promise.reject(new Error(\"Must pass in either a visualObj or a sequence\"));\n\t\tself.millisecondsPerMeasure = options.millisecondsPerMeasure ? options.millisecondsPerMeasure : (options.visualObj ? options.visualObj.millisecondsPerMeasure(self.flattened.tempo) : 1000);\n\t\tself.beatsPerMeasure = options.visualObj ? options.visualObj.getBeatsPerMeasure() : 4;\n\t\tself.sequenceCallback = params.sequenceCallback;\n\t\tself.callbackContext = params.callbackContext;\n\t\tself.onEnded = params.onEnded;\n\t\tself.meterFraction = options.visualObj ? options.visualObj.getMeterFraction() : {den: 1} // If we are given a sequence instead of a regular visual obj, then don't do the swing\n\n\t\tvar allNotes = {};\n\t\tvar cached = [];\n\t\tvar errorNotes = [];\n\t\tvar currentInstrument = instrumentIndexToName[0];\n\t\tself.flattened.tracks.forEach(function(track) {\n\t\t\ttrack.forEach(function(event) {\n\t\t\t\tif (event.cmd === \"program\" && instrumentIndexToName[event.instrument])\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[event.instrument];\n\t\t\t\tif (event.pitch !== undefined) {\n\t\t\t\t\tvar pitchNumber = event.pitch;\n\t\t\t\t\tvar noteName = pitchToNoteName[pitchNumber];\n\t\t\t\t\tvar inst = event.instrument !== undefined ? instrumentIndexToName[event.instrument] : currentInstrument\n\t\t\t\t\tif (noteName) {\n\t\t\t\t\t\tif (!allNotes[inst])\n\t\t\t\t\t\t\tallNotes[inst] = {};\n\t\t\t\t\t\tif (!soundsCache[inst] || !soundsCache[inst][noteName])\n\t\t\t\t\t\t\tallNotes[inst][noteName] = true;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar label2 = inst+\":\"+noteName\n\t\t\t\t\t\t\tif (cached.indexOf(label2) < 0)\n\t\t\t\t\t\t\t\tcached.push(label2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar label = inst+\":\"+noteName\n\t\t\t\t\t\tconsole.log(\"Can't find note: \", pitchNumber, label);\n\t\t\t\t\t\tif (errorNotes.indexOf(label) < 0)\n\t\t\t\t\t\t\terrorNotes.push(label)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"note gathering time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\tstartTime = activeAudioContext().currentTime;\n\n\t\tvar notes = [];\n\t\tObject.keys(allNotes).forEach(function(instrument) {\n\t\t\tObject.keys(allNotes[instrument]).forEach(function(note) {\n\t\t\t\tnotes.push({ instrument: instrument, note: note });\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"notes \"+JSON.stringify(notes));\n\n\t\t// If there are lots of notes, load them in batches\n\t\tvar batches = [];\n\t\tvar CHUNK = 256;\n\t\tfor (var i=0; i < notes.length; i += CHUNK) {\n\t\t\tbatches.push(notes.slice(i, i + CHUNK));\n\t\t}\n\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tvar results = {\n\t\t\t\tcached: cached,\n\t\t\t\terror: errorNotes,\n\t\t\t\tloaded: []\n\t\t\t};\n\n\t\t\tvar index = 0;\n\t\t\tvar next = function() {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch idx=\"+index+ \" len=\"+batches.length);\n\t\n\t\t\t\tif (index < batches.length) {\n\t\t\t\t\tself._loadBatch(batches[index], self.soundFontUrl, startTime).then(function(data) {\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch then\");\n\t\t\t\t\t\tstartTime = activeAudioContext().currentTime;\n\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\tif (data.error)\n\t\t\t\t\t\t\t\tresults.error = results.error.concat(data.error);\n\t\t\t\t\t\t\tif (data.loaded)\n\t\t\t\t\t\t\t\tresults.loaded = results.loaded.concat(data.loaded);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tnext();\n\t\t\t\t\t}, reject);\n\t\t\t\t} else {\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"resolve init\");\n\t\t\n\t\t\t\t\tresolve(results);\n\t\t\t\t}\n\t\t\t};\n\t\t\tnext();\n\t\t});\n\t};\n\n\tself._loadBatch = (function(batch, soundFontUrl, startTime, delay) {\n\t\t// This is called recursively to see if the sounds have loaded. The \"delay\" parameter is how long it has been since the original call.\n\t\tvar promises = [];\n\t\tbatch.forEach(function(item) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"getNote \" + item.instrument+':'+item.note);\n\t\t\tpromises.push(getNote(soundFontUrl, item.instrument, item.note, activeAudioContext()));\n\t\t});\n\t\treturn Promise.all(promises).then(function(response) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"mp3 load time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\t\tvar loaded = [];\n\t\t\tvar cached = [];\n\t\t\tvar pending = [];\n\t\t\tvar error = [];\n\t\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\t\tvar oneResponse = response[i];\n\t\t\t\tvar which = oneResponse.instrument + \":\" + oneResponse.name;\n\t\t\t\tif (oneResponse.status === \"loaded\")\n\t\t\t\t\tloaded.push(which);\n\t\t\t\telse if (oneResponse.status === \"pending\")\n\t\t\t\t\tpending.push(which);\n\t\t\t\telse if (oneResponse.status === \"cached\")\n\t\t\t\t\tcached.push(which);\n\t\t\t\telse\n\t\t\t\t\terror.push(which + ' ' + oneResponse.message);\n\t\t\t}\n\t\t\tif (pending.length > 0) {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"pending \" + JSON.stringify(pending));\n\t\t\t\t// There was probably a second call for notes before the first one finished, so just retry a few times to see if they stop being pending.\n\t\t\t\t// Retry quickly at first so that there isn't an unnecessary delay, but increase the delay each time.\n\t\t\t\tif (!delay)\n\t\t\t\t\tdelay = 50;\n\t\t\t\telse\n\t\t\t\t\tdelay = delay * 2;\n\t\t\t\tif (delay < 90000) {\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tvar newBatch = [];\n\t\t\t\t\t\t\tfor (i = 0; i < pending.length; i++) {\n\t\t\t\t\t\t\t\twhich = pending[i].split(\":\");\n\t\t\t\t\t\t\t\tnewBatch.push({instrument: which[0], note: which[1]});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\t\tself.debugCallback(\"retry \" + JSON.stringify(newBatch));\n\t\t\t\t\t\t\t\t\tself._loadBatch(newBatch, soundFontUrl, startTime, delay).then(function (response) {\n\t\t\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, delay);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar list = [];\n\t\t\t\t\tfor (var j = 0; j < batch.length; j++)\n\t\t\t\t\t\tlist.push(batch[j].instrument+'/'+batch[j].note)\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch timeout\")\n\t\t\t\t\t\treturn Promise.reject(new Error(\"timeout attempting to load: \" + list.join(\", \")));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch resolve\")\n\t\t\t\treturn Promise.resolve({loaded: loaded, cached: cached, error: error});\n\t\t\t}\n\t\t}).catch(function (error) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"loadBatch catch \"+error.message)\n\t\t});\n\t});\n\n\tself.prime = function() {\n\t\t// At this point all of the notes are loaded. This function writes them into the output buffer.\n\t\t// Most music has a lot of repeating notes. If a note is the same pitch, volume, length, etc. as another one,\n\t\t// It saves a lot of time to just create it once and place it repeatedly where ever it needs to be.\n\t\tvar fadeTimeSec = self.fadeLength/1000;\n\t\tself.isRunning = false;\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject(new Error(notSupportedMessage));\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"prime called\");\n\t\treturn new Promise(function(resolve) {\n\t\t\tvar startTime = activeAudioContext().currentTime;\n\t\t\tvar tempoMultiplier = self.millisecondsPerMeasure / 1000 / self.meterSize;\n\t\t\tself.duration = self.flattened.totalDuration * tempoMultiplier;\n\t\t\tif(self.duration <= 0) {\n\t\t\t\tself.audioBuffers = [];\n\t\t\t\treturn resolve({ status: \"empty\", seconds: 0});\n\t\t\t}\n\t\t\tself.duration += fadeTimeSec;\n\t\t\tvar totalSamples = Math.floor(activeAudioContext().sampleRate * self.duration);\n\n\t\t\t// There might be a previous run that needs to be turned off.\n\t\t\tself.stop();\n\n\t\t\tvar noteMapTracks = createNoteMap(self.flattened);\n\n\t\t\tif (self.options.swing)\n\t\t\t\taddSwing(noteMapTracks, self.options.swing, self.meterFraction, self.pickupLength)\n\n\t\t\tif (self.sequenceCallback)\n\t\t\t\tself.sequenceCallback(noteMapTracks, self.callbackContext);\n\n\t\t\tvar panDistances = setPan(noteMapTracks.length, self.pan);\n\n\t\t\t// Create a simple list of all the unique sounds in this music and where they should be placed.\n\t\t\t// There appears to be a limit on how many audio buffers can be created at once so this technique limits the number needed.\n\t\t\tvar uniqueSounds = {};\n\t\t\tnoteMapTracks.forEach(function(noteMap, trackNumber) {\n\t\t\t\tvar panDistance = panDistances && panDistances.length > trackNumber ? panDistances[trackNumber] : 0;\n\t\t\t\tnoteMap.forEach(function(note) {\n\t\t\t\t\tvar key = note.instrument + ':' + note.pitch + ':' +note.volume + ':' + Math.round((note.end-note.start)*1000)/1000 + ':' + panDistance + ':' + tempoMultiplier + ':' + (note.cents ? note.cents : 0);\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"noteMapTrack \"+key)\n\t\t\t\t\tif (!uniqueSounds[key])\n\t\t\t\t\t\tuniqueSounds[key] = [];\n\t\t\t\t\tuniqueSounds[key].push(note.start);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Now that we know what we are trying to create, construct the audio buffer by creating each sound and placing it.\n\t\t\tvar allPromises = [];\n\t\t\tvar audioBuffer = activeAudioContext().createBuffer(2, totalSamples, activeAudioContext().sampleRate);\n\t\t\tfor (var key2 = 0; key2 < Object.keys(uniqueSounds).length; key2++) {\n\t\t\t\tvar k = Object.keys(uniqueSounds)[key2];\n\t\t\t\tvar parts = k.split(\":\");\n\t\t\t\tvar cents = parts[6] !== undefined ? parseFloat(parts[6]) : 0;\n\t\t\t\tparts = {instrument: parts[0], pitch: parseInt(parts[1], 10), volume: parseInt(parts[2], 10), len: parseFloat(parts[3]), pan: parseFloat(parts[4]), tempoMultiplier: parseFloat(parts[5]), cents: cents};\n\t\t\t\tallPromises.push(placeNote(audioBuffer, activeAudioContext().sampleRate, parts, uniqueSounds[k], self.soundFontVolumeMultiplier, self.programOffsets[parts.instrument], fadeTimeSec, self.noteEnd/1000, self.debugCallback));\n\t\t\t}\n\t\t\tself.audioBuffers = [audioBuffer];\n\n\t\t\tif (self.debugCallback) {\n\t\t\t\tself.debugCallback(\"sampleRate = \" + activeAudioContext().sampleRate);\n\t\t\t\tself.debugCallback(\"totalSamples = \" + totalSamples);\n\t\t\t\tself.debugCallback(\"creationTime = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000) + \"ms\");\n\t\t\t}\n\t\t\tfunction resolveData(me) {\n\t\t\t\tvar duration = me && me.audioBuffers && me.audioBuffers.length > 0 ? me.audioBuffers[0].duration : 0;\n\t\t\t\treturn { status: activeAudioContext().state, duration: duration}\n\t\t\t}\n\t\t\tPromise.all(allPromises).then(function() {\n\t\t\t\t// Safari iOS can mess with the audioContext state, so resume if needed.\n\t\t\t\tif (activeAudioContext().state === \"suspended\") {\n\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t})\n\t\t\t\t} else if (activeAudioContext().state === \"interrupted\") {\n\t\t\t\t\tactiveAudioContext().suspend().then(function () {\n\t\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tfunction setPan(numTracks, panParam) {\n\t\t// panParam, if it is set, can be either a number representing the separation between each track,\n\t\t// or an array, which is the absolute pan position for each track.\n\t\tif (panParam === null || panParam === undefined)\n\t\t\treturn null;\n\n\t\tvar panDistances = [];\n\t\tif (panParam.length) {\n\t\t\t// We received an array. If there are the same number of items in the pan array as the number of tracks,\n\t\t\t// it all lines up perfectly. If there are more items in the pan array than the tracks then the excess items are ignored.\n\t\t\t// If there are more tracks than items in the pan array then the remaining tracks are placed in the middle.\n\t\t\t// If any of the pan numbers are out of range then they are adjusted.\n\t\t\tfor (var pp = 0; pp < numTracks; pp++) {\n\t\t\t\tif (pp < panParam.length) {\n\t\t\t\t\tvar x = parseFloat(panParam[pp]);\n\t\t\t\t\tif (x < -1)\n\t\t\t\t\t\tx = -1;\n\t\t\t\t\telse if (x > 1)\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\tpanDistances.push(x);\n\t\t\t\t} else\n\t\t\t\t\tpanDistances.push(0)\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t} else {\n\t\t\tvar panNumber = parseFloat(panParam);\n\t\t\t// the separation needs to be no further than 2 (i.e. -1 to 1) so test to see if there are too many tracks for the passed in distance\n\t\t\tif (panNumber*(numTracks-1) > 2)\n\t\t\t\treturn null;\n\n\t\t\t// If there are an even number of tracks, then offset so that the first two are centered around the middle\n\t\t\tvar even = numTracks % 2 === 0;\n\t\t\tvar currLow = even ? 0 - panNumber/2 : 0;\n\t\t\tvar currHigh = currLow+panNumber;\n\t\t\t// Now add the tracks to either side\n\t\t\tfor (var p = 0; p < numTracks; p++) {\n\t\t\t\teven = p % 2 === 0;\n\t\t\t\tif (even) {\n\t\t\t\t\tpanDistances.push(currLow);\n\t\t\t\t\tcurrLow -= panNumber;\n\t\t\t\t} else {\n\t\t\t\t\tpanDistances.push(currHigh);\n\t\t\t\t\tcurrHigh += panNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t}\n\t\t// There was either no panning, or the parameters were illegal\n\t\treturn null;\n\t}\n\n\t// This is called after everything is set up, so it can quickly make sound\n\tself.start = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"start called\");\n\n\t\tvar resumePosition = self.pausedTimeSec ? self.pausedTimeSec : 0;\n\t\tself._kickOffSound(resumePosition);\n\t\tself.startTimeSec = activeAudioContext().currentTime - resumePosition;\n\t\tself.pausedTimeSec = undefined;\n\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"MIDI STARTED\", self.startTimeSec);\n\t};\n\n\tself.pause = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"pause called\");\n\n\t\tself.pausedTimeSec = self.stop();\n\t\treturn self.pausedTimeSec;\n\t};\n\n\tself.resume = function() {\n\t\tself.start();\n\t};\n\n\tself.seek = function(position, units) {\n\t\tvar offset;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\toffset = position;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\toffset = position * self.millisecondsPerMeasure / self.beatsPerMeasure / 1000;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\toffset = (self.duration-self.fadeLength/1000) * position;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// TODO-PER: can seek when paused or when playing\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"seek called sec=\" + offset);\n\n\t\tif (self.isRunning) {\n\t\t\tself.stop();\n\t\t\tself._kickOffSound(offset);\n\t\t} else {\n\t\t\tself.pausedTimeSec = offset;\n\t\t}\n\t\tself.pausedTimeSec = offset;\n\t};\n\n\tself.stop = function() {\n\t\tself.isRunning = false;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.directSource.forEach(function(source) {\n\t\t\ttry {\n\t\t\t\tsource.stop();\n\t\t\t} catch (error) {\n\t\t\t\t// We don't care if self succeeds: it might fail if something else turned off the sound or it ended for some reason.\n\t\t\t\tconsole.log(\"direct source didn't stop:\", error)\n\t\t\t}\n\t\t});\n\t\tself.directSource = [];\n\t\tvar elapsed = activeAudioContext().currentTime - self.startTimeSec;\n\t\treturn elapsed;\n\t};\n\tself.finished = function() {\n\t\tself.startTimeSec = undefined;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.isRunning = false;\n\t};\n\n\tself.download = function() {\n\t\treturn downloadBuffer(self);\n\t};\n\n\tself.getAudioBuffer = function() {\n\t\treturn self.audioBuffers[0];\n\t};\n\n\tself.getIsRunning = function() {\n\t\treturn self.isRunning;\n\t}\n\n\t/////////////// Private functions //////////////\n\n\tself._deviceCapable = function() {\n\t\tif (!supportsAudio()) {\n\t\t\tconsole.warn(notSupportedMessage);\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(notSupportedMessage);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tself._kickOffSound = function(seconds) {\n\t\tself.isRunning = true;\n\t\tself.directSource = [];\n\t\tself.audioBuffers.forEach(function(audioBuffer, trackNum) {\n\t\t\tself.directSource[trackNum] = activeAudioContext().createBufferSource(); // creates a sound source\n\t\t\tself.directSource[trackNum].buffer = audioBuffer; // tell the source which sound to play\n\t\t\tself.directSource[trackNum].connect(activeAudioContext().destination); // connect the source to the context's destination (the speakers)\n\t\t});\n\t\tself.directSource.forEach(function(source) {\n\t\t\tsource.start(0, seconds);\n\t\t});\n\t\tif (self.onEnded) {\n\t\t\tself.directSource[0].onended = function () {\n\t\t\t\tself.onEnded(self.callbackContext);\n\t\t\t};\n\t\t}\n\t};\n\n\tfunction addSwing(noteMapTracks, swing, meterFraction, pickupLength) {\n\n\t\t// we can only swing in X/4 and X/8 meters.\n\t\tif (meterFraction.den != 4 && meterFraction.den != 8)\n\t\t\treturn;\n\n\t\tswing = parseFloat(swing);\n\n\t\t// 50 (or less) is no swing, \n\t\tif (isNaN(swing) || swing <= 50)\n\t\t\treturn;\n\n\t\t// 66 is triplet swing 2:1, and \n\t\t// 60 is swing with a ratio of 3:2. \n\t\t// 75 is the maximum swing where the first eight is played as a dotted eight and the second as a sixteenth. \n\t\tif (swing > 75)\n\t\t\tswing = 75;\n\n\t\t// convert the swing percentage to a percentage of increase for the first half of the beat\n\t\tswing = swing/50 - 1;\n\n\t\t// The volume of the swung notes is increased by this factor\n\t\t// could be also in the settings. Try out values such 0.1, 0.2\n\t\tvar volumeIncrease = 0.0;\n\n\t\t// the beatLength in X/8 meters\n\t\tvar beatLength = 0.25; \n\n\t\t// in X/8 meters the 16s swing so the beatLength is halved\n\t\tif (meterFraction.den === 8) \n\t\t\tbeatLength = beatLength/2; \n\n\t\t// duration of a half beat\n\t\tvar halfbeatLength = beatLength/2;\n\n\t\t// the extra duration of the first swung notes and the delay of the second notes\n\t\tvar swingDuration = halfbeatLength * swing;\n\n\t\tfor (var t = 0; t < noteMapTracks.length; t++) {\n\t\t\tvar track = noteMapTracks[t];\n\t\t\tfor (var i = 0; i < track.length; i++) {\n\t\t\t\tvar event = track[i];\n\t\t\t\tif (\n\t\t\t\t\t// is halfbeat\n\t\t\t\t\t(event.start-pickupLength) % halfbeatLength == 0 && (event.start-pickupLength) % beatLength != 0 \n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the previous note is on the beat or before OR there is no previous note \n\t\t\t\t\t\ti == 0 \n\t\t\t\t\t\t|| track[i-1].start <= track[i].start - halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the next note is on the beat or after OR there is no next note\n\t\t\t\t\t\ti == track.length - 1 \n\t\t\t\t\t\t|| track[i+1].start >= track[i].start + halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tvar oldEventStart = event.start;\n\n\t\t\t\t\tevent.start += swingDuration;\n\n\t\t\t\t\t// Increase volume of swung notes\n\t\t\t\t\tevent.volume *= 1 + volumeIncrease;\n\n\t\t\t\t\t// if there is a previous note ending at the start of this note, extend its end\n\t\t\t\t\t// and decrease its volume\n\t\t\t\t\tif (i > 0 && track[i-1].end == oldEventStart) {\n\t\t\t\t\t\ttrack[i-1].end = event.start;\n\t\t\t\t\t\ttrack[i-1].volume *= 1 - volumeIncrease;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n\nmodule.exports = CreateSynth;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/create-synth.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/download-buffer.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/download-buffer.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var downloadBuffer = function(buffer) {\n\treturn window.URL.createObjectURL(bufferToWave(buffer.audioBuffers));\n};\n\n// Convert an AudioBuffer to a Blob using WAVE representation\nfunction bufferToWave(audioBuffers) {\n\tvar audioBuffer = audioBuffers[0];\n\tvar numOfChan = audioBuffer.numberOfChannels;\n\tvar length = audioBuffer.length * numOfChan * 2 + 44;\n\tvar buffer = new ArrayBuffer(length);\n\tvar view = new DataView(buffer);\n\tvar channels = [];\n\tvar i;\n\tvar sample;\n\tvar offset = 0;\n\tvar pos = 0;\n\n\t// write WAVE header\n\tsetUint32(0x46464952);                         // \"RIFF\"\n\tsetUint32(length - 8);                         // file length - 8\n\tsetUint32(0x45564157);                         // \"WAVE\"\n\n\tsetUint32(0x20746d66);                         // \"fmt \" chunk\n\tsetUint32(16);                                 // length = 16\n\tsetUint16(1);                                  // PCM (uncompressed)\n\tsetUint16(numOfChan);\n\tsetUint32(audioBuffer.sampleRate);\n\tsetUint32(audioBuffer.sampleRate * 2 * numOfChan); // avg. bytes/sec\n\tsetUint16(numOfChan * 2);                      // block-align\n\tsetUint16(16);                                 // 16-bit (hardcoded in this demo)\n\n\tsetUint32(0x61746164);                         // \"data\" - chunk\n\tsetUint32(length - pos - 4);                   // chunk length\n\n\t// write interleaved data\n\tfor(i = 0; i < numOfChan; i++)\n\t\tchannels.push(audioBuffer.getChannelData(i));\n\n\twhile(pos < length) {\n\t\tfor(i = 0; i < channels.length; i++) {             // interleave channels\n\t\t\tsample = Math.max(-1, Math.min(1, channels[i][offset])); // clamp\n\t\t\tsample = (0.5 + sample < 0 ? sample * 32768 : sample * 32767)|0; // scale to 16-bit signed int\n\t\t\tview.setInt16(pos, sample, true);          // write 16-bit sample\n\t\t\tpos += 2;\n\t\t}\n\t\toffset++; // next source sample\n\t}\n\n\t// create Blob\n\treturn new Blob([buffer], {type: \"audio/wav\"});\n\n\tfunction setUint16(data) {\n\t\tview.setUint16(pos, data, true);\n\t\tpos += 2;\n\t}\n\n\tfunction setUint32(data) {\n\t\tview.setUint32(pos, data, true);\n\t\tpos += 4;\n\t}\n}\n\nmodule.exports = downloadBuffer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/download-buffer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/get-midi-file.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/synth/get-midi-file.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var tunebook = __webpack_require__(/*! ../api/abc_tunebook */ \"./node_modules/abcjs/src/api/abc_tunebook.js\");\nvar midiCreate = __webpack_require__(/*! ../midi/abc_midi_create */ \"./node_modules/abcjs/src/midi/abc_midi_create.js\");\n\nvar getMidiFile = function(source, options) {\n\tvar params = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tparams[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tparams.generateInline = false;\n\n\tfunction callback(div, tune, index) {\n\t\tvar downloadMidi = midiCreate(tune, params);\n\t\tswitch (params.midiOutputType) {\n\t\t\tcase \"encoded\":\n\t\t\t\treturn downloadMidi;\n\t\t\tcase \"binary\":\n\t\t\t\tvar decoded = downloadMidi.replace(\"data:audio/midi,\", \"\");\n\t\t\t\tdecoded = decoded.replace(/MThd/g,\"%4d%54%68%64\");\n\t\t\t\tdecoded = decoded.replace(/MTrk/g,\"%4d%54%72%6b\");\n\t\t\t\tvar buffer = new ArrayBuffer(decoded.length/3);\n\t\t\t\tvar output = new Uint8Array(buffer);\n\t\t\t\tfor (var i = 0; i < decoded.length/3; i++) {\n\t\t\t\t\tvar p = i*3+1;\n\t\t\t\t\tvar d = parseInt(decoded.substring(p, p+2), 16);\n\t\t\t\t\toutput[i] = d;\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\tcase \"link\":\n\t\t\tdefault:\n\t\t\t\treturn generateMidiDownloadLink(tune, params, downloadMidi, index);\n\t\t}\n\t}\n\n\tif (typeof source === \"string\")\n\t\treturn tunebook.renderEngine(callback, \"*\", source, params);\n\telse\n\t\treturn callback(null, source, 0);\n};\n\nfunction isFunction(functionToCheck) {\n\tvar getType = {};\n\treturn functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\nvar generateMidiDownloadLink = function(tune, midiParams, midi, index) {\n\tvar divClasses = ['abcjs-download-midi', 'abcjs-midi-' + index]\n\tif (midiParams.downloadClass)\n\t\tdivClasses.push(midiParams.downloadClass)\n\tvar html = '<div class=\"' + divClasses.join(' ') + '\">';\n\tif (midiParams.preTextDownload)\n\t\thtml += midiParams.preTextDownload;\n\tvar title = tune.metaText && tune.metaText.title ? tune.metaText.title : 'Untitled';\n\tvar label;\n\tif (midiParams.downloadLabel && isFunction(midiParams.downloadLabel))\n\t\tlabel = midiParams.downloadLabel(tune, index);\n\telse if (midiParams.downloadLabel)\n\t\tlabel = midiParams.downloadLabel.replace(/%T/, title);\n\telse\n\t\tlabel = \"Download MIDI for \\\"\" + title + \"\\\"\";\n\ttitle = title.toLowerCase().replace(/'/g, '').replace(/\\W/g, '_').replace(/__/g, '_');\n\tvar filename = (midiParams.fileName) ? midiParams.fileName :  title + '.midi';\n\thtml += '<a download=\"' + filename + '\" href=\"' + midi + '\">' + label + '</a>';\n\tif (midiParams.postTextDownload)\n\t\thtml += midiParams.postTextDownload;\n\treturn html + \"</div>\";\n};\n\n\nmodule.exports = getMidiFile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/get-midi-file.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/images/loading.svg.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/images/loading.svg.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var svg = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" class=\"abcjs-loading-svg\">\n    <circle cx=\"50\" cy=\"50\" fill=\"none\" stroke-width=\"20\" r=\"35\" stroke-dasharray=\"160 55\"></circle>\n</svg>\n`\n\nmodule.exports = svg\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/images/loading.svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/images/loop.svg.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/images/loop.svg.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var svg = `\n<svg version=\"1.0\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 700 700\" preserveAspectRatio=\"xMidYMid meet\">\n\t<g transform=\"translate(0,700) scale(0.1,-0.1)\" >\n\t<path d=\"M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55\n\t-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128\n\t-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79\n\t-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60\n\t-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507\n\t-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21\n\t-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12\n\t-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33\n\t-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0\n\t-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51\n\t153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48\n\t107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57\n\t74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52\n\t100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45\n\t143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29\n\t165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34\n\t115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33\n\t-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90\n\t-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138\n\t115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191\n\t50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21\n\t7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17\n\t-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10\n\t-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66\n\t50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73\n\t39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53\n\t-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43\n\t-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339\n\t-19z\"></path>\n\t<path d=\"M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0\n\t-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72\n\tl69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279\n\t268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74\n\t-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19\n\t-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31\n\t93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59\n\t62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89\n\t89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146\n\t67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56\n\t31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64\n\t48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22\n\t25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14\n\t18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50\n\t47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138\n\t-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10\n\t-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20\n\t-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19\n\t-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25\n\t-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18\n\t-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11\n\t-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168\n\t16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71\n\t37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108\n\t63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65\n\t61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86\n\t12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030\n\t0 -1086 -11z\"></path>\n\t</g>\n</svg>\n`\n\nmodule.exports = svg\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/images/loop.svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/images/pause.svg.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/images/pause.svg.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var svg = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" class=\"abcjs-pause-svg\">\n  <g>\n    <rect width=\"8.23\" height=\"25\"/>\n    <rect width=\"8.23\" height=\"25\" x=\"17\"/>\n  </g>\n</svg>\n`\n\nmodule.exports = svg\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/images/pause.svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/images/play.svg.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/images/play.svg.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var svg = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" class=\"abcjs-play-svg\">\n    <g>\n    <polygon points=\"4 0 23 12.5 4 25\"/>\n    </g>\n</svg>\n`\n\nmodule.exports = svg\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/images/play.svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/images/reset.svg.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/images/reset.svg.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var svg = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\">\n  <g>\n    <polygon points=\"5 12.5 24 0 24 25\"/>\n    <rect width=\"3\" height=\"25\" x=\"0\" y=\"0\"/>\n  </g>\n</svg>\n`\n\nmodule.exports = svg\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/images/reset.svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/instrument-index-to-name.js":
/*!******************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/instrument-index-to-name.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var instrumentIndexToName = [\n\t\"acoustic_grand_piano\",\n\t\"bright_acoustic_piano\",\n\t\"electric_grand_piano\",\n\t\"honkytonk_piano\",\n\t\"electric_piano_1\",\n\t\"electric_piano_2\",\n\t\"harpsichord\",\n\t\"clavinet\",\n\n\t\"celesta\",\n\t\"glockenspiel\",\n\t\"music_box\",\n\t\"vibraphone\",\n\t\"marimba\",\n\t\"xylophone\",\n\t\"tubular_bells\",\n\t\"dulcimer\",\n\n\t\"drawbar_organ\",\n\t\"percussive_organ\",\n\t\"rock_organ\",\n\t\"church_organ\",\n\t\"reed_organ\",\n\t\"accordion\",\n\t\"harmonica\",\n\t\"tango_accordion\",\n\n\t\"acoustic_guitar_nylon\",\n\t\"acoustic_guitar_steel\",\n\t\"electric_guitar_jazz\",\n\t\"electric_guitar_clean\",\n\t\"electric_guitar_muted\",\n\t\"overdriven_guitar\",\n\t\"distortion_guitar\",\n\t\"guitar_harmonics\",\n\n\t\"acoustic_bass\",\n\t\"electric_bass_finger\",\n\t\"electric_bass_pick\",\n\t\"fretless_bass\",\n\t\"slap_bass_1\",\n\t\"slap_bass_2\",\n\t\"synth_bass_1\",\n\t\"synth_bass_2\",\n\n\t\"violin\",\n\t\"viola\",\n\t\"cello\",\n\t\"contrabass\",\n\t\"tremolo_strings\",\n\t\"pizzicato_strings\",\n\t\"orchestral_harp\",\n\t\"timpani\",\n\n\t\"string_ensemble_1\",\n\t\"string_ensemble_2\",\n\t\"synth_strings_1\",\n\t\"synth_strings_2\",\n\t\"choir_aahs\",\n\t\"voice_oohs\",\n\t\"synth_choir\",\n\t\"orchestra_hit\",\n\n\t\"trumpet\",\n\t\"trombone\",\n\t\"tuba\",\n\t\"muted_trumpet\",\n\t\"french_horn\",\n\t\"brass_section\",\n\t\"synth_brass_1\",\n\t\"synth_brass_2\",\n\n\t\"soprano_sax\",\n\t\"alto_sax\",\n\t\"tenor_sax\",\n\t\"baritone_sax\",\n\t\"oboe\",\n\t\"english_horn\",\n\t\"bassoon\",\n\t\"clarinet\",\n\n\t\"piccolo\",\n\t\"flute\",\n\t\"recorder\",\n\t\"pan_flute\",\n\t\"blown_bottle\",\n\t\"shakuhachi\",\n\t\"whistle\",\n\t\"ocarina\",\n\n\t\"lead_1_square\",\n\t\"lead_2_sawtooth\",\n\t\"lead_3_calliope\",\n\t\"lead_4_chiff\",\n\t\"lead_5_charang\",\n\t\"lead_6_voice\",\n\t\"lead_7_fifths\",\n\t\"lead_8_bass_lead\",\n\n\t\"pad_1_new_age\",\n\t\"pad_2_warm\",\n\t\"pad_3_polysynth\",\n\t\"pad_4_choir\",\n\t\"pad_5_bowed\",\n\t\"pad_6_metallic\",\n\t\"pad_7_halo\",\n\t\"pad_8_sweep\",\n\n\t\"fx_1_rain\",\n\t\"fx_2_soundtrack\",\n\t\"fx_3_crystal\",\n\t\"fx_4_atmosphere\",\n\t\"fx_5_brightness\",\n\t\"fx_6_goblins\",\n\t\"fx_7_echoes\",\n\t\"fx_8_scifi\",\n\n\t\"sitar\",\n\t\"banjo\",\n\t\"shamisen\",\n\t\"koto\",\n\t\"kalimba\",\n\t\"bagpipe\",\n\t\"fiddle\",\n\t\"shanai\",\n\n\t\"tinkle_bell\",\n\t\"agogo\",\n\t\"steel_drums\",\n\t\"woodblock\",\n\t\"taiko_drum\",\n\t\"melodic_tom\",\n\t\"synth_drum\",\n\t\"reverse_cymbal\",\n\n\t\"guitar_fret_noise\",\n\t\"breath_noise\",\n\t\"seashore\",\n\t\"bird_tweet\",\n\t\"telephone_ring\",\n\t\"helicopter\",\n\t\"applause\",\n\t\"gunshot\",\n\n\t\"percussion\"\n];\n\nmodule.exports = instrumentIndexToName;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/instrument-index-to-name.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/load-note.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/synth/load-note.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// Load one mp3 file for one note.\n// url = the base url for the soundfont\n// instrument = the instrument name (e.g. \"acoustic_grand_piano\")\n// name = the pitch name (e.g. \"A3\")\nvar soundsCache = __webpack_require__(/*! ./sounds-cache */ \"./node_modules/abcjs/src/synth/sounds-cache.js\");\n\nvar getNote = function (url, instrument, name, audioContext) {\n\tif (!soundsCache[instrument]) soundsCache[instrument] = {};\n\tvar instrumentCache = soundsCache[instrument];\n\n\tif (!instrumentCache[name])\n\t\tinstrumentCache[name] = new Promise(function (resolve, reject) {\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\tlet noteUrl = url + instrument + \"-mp3/\" + name + \".mp3\";\n\t\t\txhr.open(\"GET\", noteUrl, true);\n\t\t\txhr.responseType = \"arraybuffer\";\n\t\t\txhr.onload = function () {\n\t\t\t\tif (xhr.status !== 200) {\n\t\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl + ' status=' + xhr.status));\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvar noteDecoded = function(audioBuffer) {\n\t\t\t\t\tresolve({instrument: instrument, name: name, status: \"loaded\", audioBuffer: audioBuffer})\n\t\t\t\t}\n\t\t\t\tvar maybePromise = audioContext.decodeAudioData(xhr.response, noteDecoded, function () {\n\t\t\t\t\treject(Error(\"Can't decode sound at \" + noteUrl));\n\t\t\t\t});\n\t\t\t\t// In older browsers `BaseAudioContext.decodeAudio()` did not return a promise\n\t\t\t\tif (maybePromise && typeof maybePromise.catch === \"function\") maybePromise.catch(reject);\n\t\t\t};\n\t\t\txhr.onerror = function () {\n\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl));\n\t\t\t};\n\t\t\txhr.send();\n\t\t})\n\t\t\t.catch(err => {\n\t\t\t\tconsole.error(\"Didn't load note\", instrument, name, \":\", err.message);\n\t\t\t\tthrow err;\n\t\t\t});\n\n\treturn instrumentCache[name];\n};\n\nmodule.exports = getNote;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/load-note.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/note-to-midi.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/synth/note-to-midi.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var accidentals = {\n\t\"__\": -2,\n\t\"_\": -1,\n\t\"_/\": -0.5,\n\t\"=\": 0,\n\t\"\": 0,\n\t\"^/\": 0.5,\n\t\"^\": 1,\n\t\"^^\": 2\n}\n\nvar notesInOrder = ['C', '-', 'D', '-', 'E', 'F', '-', 'G', '-', 'A', '-', 'B', 'c', '-', 'd', '-', 'e', 'f', '-', 'g', '-', 'a', '-', 'b']\n\nfunction noteToMidi(note) {\n\tvar reg = note.match(/([_^\\/]*)([ABCDEFGabcdefg])(,*)('*)/)\n\tif (reg && reg.length === 5) {\n\t\tvar acc = accidentals[reg[1]]\n\t\tvar pitch = notesInOrder.indexOf(reg[2])\n\t\tvar octave = reg[4].length - reg[3].length\n\t\treturn 48 + pitch + acc + octave * 12;\n\t}\n\treturn 0;\n}\n\nfunction midiToNote(midi) {\n\tmidi = parseInt(midi, 10) // TODO-PER: not sure how to handle quarter sharps and flats, so strip them for now.\n\tvar octave = Math.floor(midi / 12)\n\tvar pitch = midi % 12\n\tvar name = notesInOrder[pitch]\n\tif (name === '-') {\n\t\tname = '^' + notesInOrder[pitch-1]\n\t}\n\t\n\tif (octave > 4) {\n\t\tname = name.toLowerCase()\n\t\toctave -= 5\n\t\twhile (octave > 0) {\n\t\t\tname += \"'\"\n\t\t\toctave--\n\t\t}\n\t} else {\n\t\twhile (octave < 4) {\n\t\t\tname += ','\n\t\t\toctave++\n\t\t}\n\t}\t\n\treturn name\n}\n\nmodule.exports = {noteToMidi: noteToMidi, midiToNote: midiToNote};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/note-to-midi.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/pitch-to-note-name.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/pitch-to-note-name.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var pitchToNoteName = {\n\t21: 'A0',\n\t22: 'Bb0',\n\t23: 'B0',\n\t24: 'C1',\n\t25: 'Db1',\n\t26: 'D1',\n\t27: 'Eb1',\n\t28: 'E1',\n\t29: 'F1',\n\t30: 'Gb1',\n\t31: 'G1',\n\t32: 'Ab1',\n\t33: 'A1',\n\t34: 'Bb1',\n\t35: 'B1',\n\t36: 'C2',\n\t37: 'Db2',\n\t38: 'D2',\n\t39: 'Eb2',\n\t40: 'E2',\n\t41: 'F2',\n\t42: 'Gb2',\n\t43: 'G2',\n\t44: 'Ab2',\n\t45: 'A2',\n\t46: 'Bb2',\n\t47: 'B2',\n\t48: 'C3',\n\t49: 'Db3',\n\t50: 'D3',\n\t51: 'Eb3',\n\t52: 'E3',\n\t53: 'F3',\n\t54: 'Gb3',\n\t55: 'G3',\n\t56: 'Ab3',\n\t57: 'A3',\n\t58: 'Bb3',\n\t59: 'B3',\n\t60: 'C4',\n\t61: 'Db4',\n\t62: 'D4',\n\t63: 'Eb4',\n\t64: 'E4',\n\t65: 'F4',\n\t66: 'Gb4',\n\t67: 'G4',\n\t68: 'Ab4',\n\t69: 'A4',\n\t70: 'Bb4',\n\t71: 'B4',\n\t72: 'C5',\n\t73: 'Db5',\n\t74: 'D5',\n\t75: 'Eb5',\n\t76: 'E5',\n\t77: 'F5',\n\t78: 'Gb5',\n\t79: 'G5',\n\t80: 'Ab5',\n\t81: 'A5',\n\t82: 'Bb5',\n\t83: 'B5',\n\t84: 'C6',\n\t85: 'Db6',\n\t86: 'D6',\n\t87: 'Eb6',\n\t88: 'E6',\n\t89: 'F6',\n\t90: 'Gb6',\n\t91: 'G6',\n\t92: 'Ab6',\n\t93: 'A6',\n\t94: 'Bb6',\n\t95: 'B6',\n\t96: 'C7',\n\t97: 'Db7',\n\t98: 'D7',\n\t99: 'Eb7',\n\t100: 'E7',\n\t101: 'F7',\n\t102: 'Gb7',\n\t103: 'G7',\n\t104: 'Ab7',\n\t105: 'A7',\n\t106: 'Bb7',\n\t107: 'B7',\n\t108: 'C8',\n\t109: 'Db8',\n\t110: 'D8',\n\t111: 'Eb8',\n\t112: 'E8',\n\t113: 'F8',\n\t114: 'Gb8',\n\t115: 'G8',\n\t116: 'Ab8',\n\t117: 'A8',\n\t118: 'Bb8',\n\t119: 'B8',\n\t120: 'C9',\n\t121: 'Db9'\n};\n\nmodule.exports = pitchToNoteName;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/pitch-to-note-name.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/pitches-to-perc.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/pitches-to-perc.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var pitchMap = {\n\tf0: \"_C\",\n\tn0: \"=C\",\n\ts0: \"^C\",\n\tx0: \"C\",\n\tf1: \"_D\",\n\tn1: \"=D\",\n\ts1: \"^D\",\n\tx1: \"D\",\n\tf2: \"_E\",\n\tn2: \"=E\",\n\ts2: \"^E\",\n\tx2: \"E\",\n\tf3: \"_F\",\n\tn3: \"=F\",\n\ts3: \"^F\",\n\tx3: \"F\",\n\tf4: \"_G\",\n\tn4: \"=G\",\n\ts4: \"^G\",\n\tx4: \"G\",\n\tf5: \"_A\",\n\tn5: \"=A\",\n\ts5: \"^A\",\n\tx5: \"A\",\n\tf6: \"_B\",\n\tn6: \"=B\",\n\ts6: \"^B\",\n\tx6: \"B\",\n\tf7: \"_c\",\n\tn7: \"=c\",\n\ts7: \"^c\",\n\tx7: \"c\",\n\tf8: \"_d\",\n\tn8: \"=d\",\n\ts8: \"^d\",\n\tx8: \"d\",\n\tf9: \"_e\",\n\tn9: \"=e\",\n\ts9: \"^e\",\n\tx9: \"e\",\n\tf10: \"_f\",\n\tn10: \"=f\",\n\ts10: \"^f\",\n\tx10: \"f\",\n\tf11: \"_g\",\n\tn11: \"=g\",\n\ts11: \"^g\",\n\tx11: \"g\",\n\tf12: \"_a\",\n\tn12: \"=a\",\n\ts12: \"^a\",\n\tx12: \"a\",\n\tf13: \"_b\",\n\tn13: \"=b\",\n\ts13: \"^b\",\n\tx13: \"b\",\n\tf14: \"_c'\",\n\tn14: \"=c'\",\n\ts14: \"^c'\",\n\tx14: \"c'\",\n\tf15: \"_d'\",\n\tn15: \"=d'\",\n\ts15: \"^d'\",\n\tx15: \"d'\",\n\tf16: \"_e'\",\n\tn16: \"=e'\",\n\ts16: \"^e'\",\n\tx16: \"e'\",\n}\n\nfunction pitchesToPerc(pitchObj) {\n\tvar pitch = (pitchObj.accidental ? pitchObj.accidental[0] : 'x') + pitchObj.verticalPos;\n\treturn pitchMap[pitch];\n}\nmodule.exports = pitchesToPerc;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/pitches-to-perc.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/place-note.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/synth/place-note.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var soundsCache = __webpack_require__(/*! ./sounds-cache */ \"./node_modules/abcjs/src/synth/sounds-cache.js\");\nvar pitchToNoteName = __webpack_require__(/*! ./pitch-to-note-name */ \"./node_modules/abcjs/src/synth/pitch-to-note-name.js\");\nvar centsToFactor = __webpack_require__(/*! ./cents-to-factor */ \"./node_modules/abcjs/src/synth/cents-to-factor.js\");\n\nfunction placeNote(outputAudioBuffer, sampleRate, sound, startArray, volumeMultiplier, ofsMs, fadeTimeSec, noteEndSec, debugCallback) {\n\t// sound contains { instrument, pitch, volume, len, pan, tempoMultiplier\n\t// len is in whole notes. Multiply by tempoMultiplier to get seconds.\n\t// ofsMs is an offset to subtract from the note to line up programs that have different length onsets.\n\tvar OfflineAC = window.OfflineAudioContext ||\n\t\twindow.webkitOfflineAudioContext;\n\n\tvar len = sound.len * sound.tempoMultiplier;\n\tif (ofsMs)\n\t\tlen +=ofsMs/1000;\n\tlen -= noteEndSec;\n\tif (len < 0)\n\t\tlen = 0.005; // Have some small audible length no matter how short the note is.\n\tvar offlineCtx = new OfflineAC(2,Math.floor((len+fadeTimeSec)*sampleRate),sampleRate);\n\tvar noteName = pitchToNoteName[sound.pitch];\n\tif (!soundsCache[sound.instrument]) {\n\t\t// It shouldn't happen that the entire instrument cache wasn't created, but this has been seen in practice, so guard against it.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped (instrument empty): '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\tvar noteBufferPromise = soundsCache[sound.instrument][noteName];\n\n\tif (!noteBufferPromise) {\n\t\t// if the note isn't present then just skip it - it will leave a blank spot in the audio.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped: '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\n\treturn noteBufferPromise\n\t\t.then(function (response) {\n\t\t\t// create audio buffer\n\t\t\tvar source = offlineCtx.createBufferSource();\n\t\t\tsource.buffer = response.audioBuffer;\n\n\t\t\t// add gain\n\t\t\t// volume can be between 1 to 127. This translation to gain is just trial and error.\n\t\t\t// The smaller the first number, the more dynamic range between the quietest to loudest.\n\t\t\t// The larger the second number, the louder it will be in general.\n\t\t\tvar volume = (sound.volume / 96) * volumeMultiplier;\n\t\t\tsource.gainNode = offlineCtx.createGain();\n\n\t\t\t// add pan if supported and present\n\t\t\tif (sound.pan && offlineCtx.createStereoPanner) {\n\t\t\t\tsource.panNode = offlineCtx.createStereoPanner();\n\t\t\t\tsource.panNode.pan.setValueAtTime(sound.pan, 0);\n\t\t\t}\n\t\t\tsource.gainNode.gain.value = volume; // Math.min(2, Math.max(0, volume));\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(source.gainNode.gain.value, len);\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(0.0, len + fadeTimeSec);\n\n\t\t\tif (sound.cents) {\n\t\t\t\tsource.playbackRate.value = centsToFactor(sound.cents);\n\t\t\t}\n\n\t\t\t// connect all the nodes\n\t\t\tif (source.panNode) {\n\t\t\t\tsource.panNode.connect(offlineCtx.destination);\n\t\t\t\tsource.gainNode.connect(source.panNode);\n\t\t\t} else {\n\t\t\t\tsource.gainNode.connect(offlineCtx.destination);\n\t\t\t}\n\t\t\tsource.connect(source.gainNode);\n\n\t\t\t// Do the process of creating the sound and placing it in the buffer\n\t\t\tsource.start(0);\n\n\t\t\tif (source.noteOff) {\n\t\t\t\tsource.noteOff(len + fadeTimeSec);\n\t\t\t} else {\n\t\t\t\tsource.stop(len + fadeTimeSec);\n\t\t\t}\n\t\t\tvar fnResolve;\n\t\t\tofflineCtx.oncomplete = function(e) {\n\t\t\t\tif (e.renderedBuffer && e.renderedBuffer.getChannelData) { // If the system gets overloaded or there are network problems then this can start failing. Just drop the note if so.\n\t\t\t\t\tfor (var i = 0; i < startArray.length; i++) {\n\t\t\t\t\t\t//Math.floor(startArray[i] * sound.tempoMultiplier * sampleRate)\n\t\t\t\t\t\tvar start = startArray[i] * sound.tempoMultiplier;\n\t\t\t\t\t\tif (ofsMs)\n\t\t\t\t\t\t\tstart -=ofsMs/1000;\n\t\t\t\t\t\tif (start < 0)\n\t\t\t\t\t\t\tstart = 0; // If the item that is moved back is at the very beginning of the buffer then don't move it back. To do that would be to push everything else forward. TODO-PER: this should probably be done at some point but then it would change timing in existing apps.\n\t\t\t\t\t\tstart = Math.floor(start*sampleRate);\n\t\t\t\t\t\tcopyToChannel(outputAudioBuffer, e.renderedBuffer, start);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (debugCallback)\n\t\t\t\t\tdebugCallback('placeNote: '+sound.instrument+':'+noteName)\n\t\t\t\tfnResolve();\n\t\t\t};\n\t\t\tofflineCtx.startRendering();\n\t\t\treturn new Promise(function(resolve) {\n\t\t\t\tfnResolve = resolve;\n\t\t\t});\n\t\t})\n\t\t.catch(function (error) {\n\t\t\tif (debugCallback)\n\t\t\t\tdebugCallback('placeNote catch: '+error.message)\n\t\t\treturn Promise.resolve()\n\t\t});\n}\n\nvar copyToChannel = function(toBuffer, fromBuffer, start) {\n\tfor (var ch = 0; ch < 2; ch++) {\n\t\tvar fromData = fromBuffer.getChannelData(ch);\n\t\tvar toData = toBuffer.getChannelData(ch);\n\n\t\t// Mix the current note into the existing track\n\t\tfor (var n = 0; n < fromData.length; n++) {\n\t\t\ttoData[n + start] += fromData[n];\n\t\t}\n\t}\n};\n\nmodule.exports = placeNote;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/place-note.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/play-event.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/synth/play-event.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var SynthSequence = __webpack_require__(/*! ./synth-sequence */ \"./node_modules/abcjs/src/synth/synth-sequence.js\");\nvar CreateSynth = __webpack_require__(/*! ./create-synth */ \"./node_modules/abcjs/src/synth/create-synth.js\");\nvar activeAudioContext = __webpack_require__(/*! ./active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\n\nfunction playEvent(midiPitches, midiGracePitches, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar sequence = new SynthSequence();\n\n\tfor (var i = 0; i < midiPitches.length; i++) {\n\t\tvar note = midiPitches[i];\n\t\tvar trackNum = sequence.addTrack();\n\t\tsequence.setInstrument(trackNum, note.instrument);\n\t\tif (i === 0 && midiGracePitches) {\n\t\t\tfor (var j = 0; j < midiGracePitches.length; j++) {\n\t\t\t\tvar grace = midiGracePitches[j];\n\t\t\t\tsequence.appendNote(trackNum, grace.pitch, 1 / 64, grace.volume, grace.cents);\n\t\t\t}\n\t\t}\n\t\tsequence.appendNote(trackNum, note.pitch, note.duration, note.volume, note.cents);\n\t}\n\n\tvar ac = activeAudioContext();\n\tif (ac.state === \"suspended\") {\n\t\treturn ac.resume().then(function () {\n\t\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t\t});\n\t} else {\n\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t}\n}\n\nfunction doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar buffer = new CreateSynth();\n\treturn buffer.init({\n\t\tsequence: sequence,\n\t\tmillisecondsPerMeasure: millisecondsPerMeasure,\n\t\toptions: { soundFontUrl: soundFontUrl },\n\t\tdebugCallback: debugCallback,\n\t}).then(function () {\n\t\treturn buffer.prime();\n\t}).then(function () {\n\t\tbuffer.start();\n\t\treturn Promise.resolve();\n\t});\n}\n\nmodule.exports = playEvent;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/play-event.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/register-audio-context.js":
/*!****************************************************************!*\
  !*** ./node_modules/abcjs/src/synth/register-audio-context.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// Call this when it is safe for the abcjs to produce sound. This is after the first user gesture on the page.\n// If you call it with no parameters, then an AudioContext is created and stored.\n// If you call it with a parameter, that is used as an already created AudioContext.\n\nfunction registerAudioContext(ac) {\n\t// If one is passed in, that is the one to use even if there was already one created.\n\tif (ac)\n\t\twindow.abcjsAudioContext = ac;\n\telse {\n\t\t// no audio context passed in, so create it unless there is already one from before.\n\t\tif (!window.abcjsAudioContext) {\n\t\t\tvar AudioContext = window.AudioContext || window.webkitAudioContext;\n\t\t\tif (AudioContext)\n\t\t\t\twindow.abcjsAudioContext = new AudioContext();\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn window.abcjsAudioContext.state !== \"suspended\";\n}\n\nmodule.exports = registerAudioContext;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/register-audio-context.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/sounds-cache.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/synth/sounds-cache.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var soundsCache = {\n};\n\nmodule.exports = soundsCache;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/sounds-cache.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/supports-audio.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/supports-audio.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var activeAudioContext = __webpack_require__(/*! ./active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\n\n//\n// Support for audio depends on three things: support for Promise, support for AudioContext, and support for AudioContext.resume.\n// Unfortunately, AudioContext.resume cannot be detected unless an AudioContext is created, and creating an AudioContext can't\n// be done until a user click, so there is no way to know for sure if audio is supported until the user tries.\n// We can get close, though - we can test for Promises and AudioContext - there are just a few evergreen browsers that supported\n// that before supporting resume, so we'll test what we can.\n\n// The best use of this routine is to call it before doing any audio related stuff to decide whether to bother.\n// But then, call it again after a user interaction to test for resume.\n\nfunction supportsAudio() {\n\tif (!window.Promise)\n\t\treturn false;\n\n\tif (!window.AudioContext &&\n\t\t!window.webkitAudioContext &&\n\t\t!navigator.mozAudioContext &&\n\t\t!navigator.msAudioContext)\n\t\treturn false;\n\n\tvar aac = activeAudioContext();\n\tif (aac)\n\t\treturn aac.resume !== undefined;\n}\n\nmodule.exports = supportsAudio;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/supports-audio.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/synth-controller.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/synth-controller.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var CreateSynthControl = __webpack_require__(/*! ./create-synth-control */ \"./node_modules/abcjs/src/synth/create-synth-control.js\");\nvar CreateSynth = __webpack_require__(/*! ./create-synth */ \"./node_modules/abcjs/src/synth/create-synth.js\");\nvar TimingCallbacks = __webpack_require__(/*! ../api/abc_timing_callbacks */ \"./node_modules/abcjs/src/api/abc_timing_callbacks.js\");\nvar activeAudioContext = __webpack_require__(/*! ./active-audio-context */ \"./node_modules/abcjs/src/synth/active-audio-context.js\");\n\nfunction SynthController() {\n\tvar self = this;\n\tself.warp = 100;\n\tself.cursorControl = null;\n\tself.visualObj = null;\n\tself.timer = null;\n\tself.midiBuffer = null;\n\tself.options = null;\n\tself.currentTempo = null;\n\tself.control = null;\n\tself.isLooping = false;\n\tself.isStarted = false;\n\tself.isLoaded = false;\n\tself.isLoading = false;\n\n\tself.load = function (selector, cursorControl, visualOptions) {\n\t\tif (!visualOptions)\n\t\t\tvisualOptions = {};\n\t\tif (visualOptions.displayPlay === undefined)\n\t\t\tvisualOptions.displayPlay = true\n\t\tif (visualOptions.displayProgress === undefined)\n\t\t\tvisualOptions.displayProgress = true\n\t\tself.control = new CreateSynthControl(selector, {\n\t\t\tloopHandler: visualOptions.displayLoop ? self.toggleLoop : undefined,\n\t\t\trestartHandler: visualOptions.displayRestart ? self.restart : undefined,\n\t\t\tplayPromiseHandler: visualOptions.displayPlay ? self.play : undefined,\n\t\t\tprogressHandler: visualOptions.displayProgress ? self.randomAccess : undefined,\n\t\t\twarpHandler: visualOptions.displayWarp ? self.onWarp : undefined,\n\t\t\tafterResume: self.init\n\t\t});\n\t\tself.cursorControl = cursorControl;\n\t\tself.disable(true);\n\t};\n\n\tself.disable = function(isDisabled) {\n\t\tif (self.control)\n\t\t\tself.control.disable(isDisabled);\n\t};\n\n\tself.setTune = function(visualObj, userAction, audioParams) {\n\t\tself.visualObj = visualObj;\n\t\tself.disable(false);\n\t\tself.options = audioParams ? audioParams : {};\n\n\t\tif (self.control) {\n\t\t\tself.pause();\n\t\t\tself.setProgress(0, 1);\n\t\t\tself.control.resetAll();\n\t\t\tself.restart();\n\t\t\tself.isStarted = false;\n\t\t}\n\t\tself.isLooping = false;\n\n\t\tif (userAction)\n\t\t\treturn self.go();\n\t\telse {\n\t\t\treturn Promise.resolve({status: \"no-audio-context\"});\n\t\t}\n\t};\n\n\tself.go = function () {\n\t\tself.isLoading = true;\n\t\tvar millisecondsPerMeasure = self.visualObj.millisecondsPerMeasure() * 100 / self.warp;\n\t\tself.currentTempo = Math.round(self.visualObj.getBeatsPerMeasure() / millisecondsPerMeasure * 60000);\n\t\tif (self.control)\n\t\t\tself.control.setTempo(self.currentTempo);\n\t\tself.percent = 0;\n\t\tvar loadingResponse;\n\n\t\tif (!self.midiBuffer)\n\t\t\tself.midiBuffer = new CreateSynth();\n\t\treturn activeAudioContext().resume().then(function (response) {\n\t\t\treturn self.midiBuffer.init({\n\t\t\t\tvisualObj: self.visualObj,\n\t\t\t\toptions: self.options,\n\t\t\t\tmillisecondsPerMeasure: millisecondsPerMeasure\n\t\t\t});\n\t\t}).then(function (response) {\n\t\t\tloadingResponse = response;\n\t\t\treturn self.midiBuffer.prime();\n\t\t}).then(function () {\n\t\t\tvar subdivisions = 16;\n\t\t\tif (self.cursorControl &&\n\t\t\t\tself.cursorControl.beatSubdivisions !== undefined &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) >= 1 &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) <= 64)\n\t\t\t\tsubdivisions = parseInt(self.cursorControl.beatSubdivisions, 10);\n\n\t\t\t// Need to create the TimingCallbacks after priming the midi so that the midi data is available for the callbacks.\n\t\t\tself.timer = new TimingCallbacks(self.visualObj, {\n\t\t\t\tbeatCallback: self.beatCallback,\n\t\t\t\teventCallback: self.eventCallback,\n\t\t\t\tlineEndCallback: self.lineEndCallback,\n\t\t\t\tqpm: self.currentTempo,\n\n\t\t\t\textraMeasuresAtBeginning: self.cursorControl ? self.cursorControl.extraMeasuresAtBeginning : undefined,\n\t\t\t\tlineEndAnticipation: self.cursorControl ? self.cursorControl.lineEndAnticipation : 0,\n\t\t\t\tbeatSubdivisions: subdivisions,\n\t\t\t});\n\t\t\tif (self.cursorControl && self.cursorControl.onReady && typeof self.cursorControl.onReady  === 'function')\n\t\t\t\tself.cursorControl.onReady(self);\n\t\t\tself.isLoaded = true;\n\t\t\tself.isLoading = false;\n\t\t\treturn Promise.resolve({ status: \"created\", notesStatus: loadingResponse });\n\t\t});\n\t};\n\n\tself.destroy = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.reset();\n\t\t\tself.timer.stop();\n\t\t\tself.timer = null;\n\t\t}\n\t\tif (self.midiBuffer) {\n\t\t\tself.midiBuffer.stop();\n\t\t\tself.midiBuffer = null;\n\t\t}\n\t\tself.setProgress(0, 1);\n\t\tif (self.control)\n\t\t\tself.control.resetAll();\n\t};\n\n\tself.play = function () {\n\t\treturn self.runWhenReady(self._play, undefined);\n\t};\n\n\tfunction sleep(ms) {\n\t\treturn new Promise(function (resolve) {\n\t\t\tsetTimeout(resolve, ms)\n\t\t});\n\t}\n\n\tself.runWhenReady = function(fn, arg1) {\n\t\tif (!self.visualObj)\n\t\t\treturn Promise.resolve({status: \"loading\"});\n\t\tif (self.isLoading) {\n\t\t\t// Some other promise is waiting for the tune to be loaded, so just wait.\n\t\t\treturn sleep(500).then(function() {\n\t\t\t\tif (self.isLoading)\n\t\t\t\t\treturn self.runWhenReady(fn, arg1);\n\t\t\t\treturn fn(arg1);\n\t\t\t})\n\t\t} else if (!self.isLoaded) {\n\t\t\treturn self.go().then(function () {\n\t\t\t\treturn fn(arg1);\n\t\t\t});\n\t\t} else {\n\t\t\treturn fn(arg1);\n\t\t}\n\t};\n\n\tself._play = function () {\n\t\treturn activeAudioContext().resume().then(function () {\n\t\t\tself.isStarted = !self.isStarted;\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.cursorControl && self.cursorControl.onStart && typeof self.cursorControl.onStart === 'function')\n\t\t\t\t\tself.cursorControl.onStart();\n\t\t\t\tself.midiBuffer.start();\n\t\t\t\tself.timer.start(self.percent);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(true);\n\t\t\t} else {\n\t\t\t\tself.pause();\n\t\t\t}\n\t\t\treturn Promise.resolve({status: \"ok\"});\n\t\t})\n\t};\n\n\tself.pause = function() {\n\t\tif (self.timer) {\n\t\t\tself.timer.pause();\n\t\t\tself.midiBuffer.pause();\n\t\t\tif (self.control)\n\t\t\t\tself.control.pushPlay(false);\n\t\t}\n\t};\n\n\tself.toggleLoop = function () {\n\t\tself.isLooping = !self.isLooping;\n\t\tif (self.control)\n\t\t\tself.control.pushLoop(self.isLooping);\n\t};\n\n\tself.restart = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.setProgress(0);\n\t\t\tself.midiBuffer.seek(0);\n\t\t}\n\t};\n\n\tself.randomAccess = function (ev) {\n\t\treturn self.runWhenReady(self._randomAccess, ev);\n\t};\n\n\tself._randomAccess = function (ev) {\n\t\tvar background = (ev.target.classList.contains('abcjs-midi-progress-indicator')) ? ev.target.parentNode : ev.target;\n\t\tvar percent = (ev.x - background.getBoundingClientRect().left) / background.offsetWidth;\n\t\tif (percent < 0)\n\t\t\tpercent = 0;\n\t\tif (percent > 1)\n\t\t\tpercent = 1;\n\t\tself.seek(percent);\n\t\treturn Promise.resolve({status: \"ok\"});\n\t};\n\n\tself.seek = function (percent, units) {\n\t\tif (self.timer && self.midiBuffer) {\n\t\t\tself.timer.setProgress(percent, units);\n\t\t\tself.midiBuffer.seek(percent, units);\n\t\t}\n\t};\n\n\tself.setWarp = function (newWarp) {\n\t\tif (parseInt(newWarp, 10) > 0) {\n\t\t\tself.warp = parseInt(newWarp, 10);\n\t\t\tvar wasPlaying = self.isStarted;\n\t\t\tvar startPercent = self.percent;\n\t\t\tself.destroy();\n\t\t\tself.isStarted = false;\n\t\t\treturn self.go().then(function () {\n\t\t\t\tself.setProgress(startPercent, self.midiBuffer.duration * 1000);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.setWarp(self.currentTempo, self.warp);\n\t\t\t\tif (wasPlaying) {\n\t\t\t\t\treturn self.play().then(function () {\n\t\t\t\t\t\tself.seek(startPercent);\n\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.seek(startPercent);\n\t\t\t\treturn Promise.resolve();\n\t\t\t});\n\t\t}\n\t\treturn Promise.resolve();\n\t};\n\n\tself.onWarp = function (ev) {\n\t\tvar newWarp = ev.target.value;\n\t\treturn self.setWarp(newWarp);\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tself.percent = percent;\n\t\tif (self.control)\n\t\t\tself.control.setProgress(percent, totalTime);\n\t};\n\n\tself.finished = function () {\n\t\tself.timer.reset();\n\t\tif (self.isLooping) {\n\t\t\tself.timer.start(0);\n\t\t\tself.midiBuffer.finished();\n\t\t\tself.midiBuffer.start();\n\t\t\treturn \"continue\";\n\t\t} else {\n\t\t\tself.timer.stop();\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(false);\n\t\t\t\tself.isStarted = false;\n\t\t\t\tself.midiBuffer.finished();\n\t\t\t\tif (self.cursorControl && self.cursorControl.onFinished && typeof self.cursorControl.onFinished  === 'function')\n\t\t\t\t\tself.cursorControl.onFinished();\n\t\t\t\tself.setProgress(0, 1);\n\t\t\t}\n\t\t}\n\t};\n\n\tself.beatCallback = function (beatNumber, totalBeats, totalTime, position) {\n\t\tvar percent = beatNumber / totalBeats;\n\t\tself.setProgress(percent, totalTime);\n\t\tif (self.cursorControl && self.cursorControl.onBeat && typeof self.cursorControl.onBeat  === 'function')\n\t\t\tself.cursorControl.onBeat(beatNumber, totalBeats, totalTime, position);\n\t};\n\n\tself.eventCallback = function (event) {\n\t\tif (event) {\n\t\t\tif (self.cursorControl && self.cursorControl.onEvent && typeof self.cursorControl.onEvent  === 'function')\n\t\t\t\tself.cursorControl.onEvent(event);\n\t\t} else {\n\t\t\treturn self.finished();\n\t\t}\n\t};\n\n\tself.lineEndCallback = function (lineEvent, leftEvent) {\n\t\tif (self.cursorControl && self.cursorControl.onLineEnd && typeof self.cursorControl.onLineEnd  === 'function')\n\t\t\tself.cursorControl.onLineEnd(lineEvent, leftEvent);\n\t};\n\n\tself.getUrl = function () {\n\t\treturn self.midiBuffer.download();\n\t};\n\n\tself.download = function(fileName) {\n\t\tvar url = self.getUrl();\n\t\tvar link = document.createElement('a');\n\t\tdocument.body.appendChild(link);\n\t\tlink.setAttribute(\"style\",\"display: none;\");\n\t\tlink.href = url;\n\t\tlink.download = fileName ? fileName : 'output.wav';\n\t\tlink.click();\n\t\twindow.URL.revokeObjectURL(url);\n\t\tdocument.body.removeChild(link);\n\t};\n}\n\nmodule.exports = SynthController;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/synth-controller.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/synth/synth-sequence.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/synth/synth-sequence.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var SynthSequence = function() {\n\tvar self = this;\n\tself.tracks = [];\n\tself.totalDuration = 0;\n\tself.currentInstrument = [];\n\tself.starts = [];\n\n\tself.addTrack = function() {\n\t\tself.tracks.push([]);\n\t\tself.currentInstrument.push(0);\n\t\tself.starts.push(0);\n\t\treturn self.tracks.length - 1;\n\t};\n\n\tself.setInstrument = function(trackNumber, instrumentNumber) {\n\t\tself.tracks[trackNumber].push({\n\t\t\tchannel: 0,\n\t\t\tcmd: \"program\",\n\t\t\tinstrument: instrumentNumber\n\t\t});\n\t\tself.currentInstrument[trackNumber] = instrumentNumber;\n\t};\n\n\tself.appendNote = function(trackNumber, pitch, durationInMeasures, volume, cents) {\n\t\tvar note = {\n\t\t\tcmd: \"note\",\n\t\t\tduration: durationInMeasures,\n\t\t\tgap: 0,\n\t\t\tinstrument: self.currentInstrument[trackNumber],\n\t\t\tpitch: pitch,\n\t\t\tstart: self.starts[trackNumber],\n\t\t\tvolume: volume\n\t\t};\n\t\tif (cents)\n\t\t\tnote.cents = cents;\n\t\tself.tracks[trackNumber].push(note);\n\t\tself.starts[trackNumber] += durationInMeasures;\n\n\t\tself.totalDuration = Math.max(self.totalDuration, self.starts[trackNumber]);\n\t};\n};\n\nmodule.exports = SynthSequence;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/synth/synth-sequence.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/abc_tablatures.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/abc_tablatures.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n * Tablature Plugins\n * tablature are defined dynamically and registered inside abcjs\n * by calling abcTablatures.register(plugin) \n * where plugin represents a plugin instance \n * \n */\n\n// This is the only entry point to the tablatures. It is called both after parsing a tune and just before engraving\n\nvar TabString = __webpack_require__(/*! ./instruments/tab-string */ \"./node_modules/abcjs/src/tablatures/instruments/tab-string.js\");\n\n/* extend the table below when adding a new instrument plugin */\n\n// Existing tab classes \nvar pluginTab = {\n\t'violin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'fiddle': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'mandolin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'guitar': { name: 'StringTab', defaultTuning: ['E,', 'A,', 'D', 'G', 'B', 'e'], isTabBig: true, tabSymbolOffset: 0 },\n\t'fiveString': { name: 'StringTab', defaultTuning: ['C,', 'G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: -.95 },\n};\n\nvar abcTablatures = {\n\n\tinited: false,\n\tplugins: {},\n\n\n\t/**\n\t * to be called once per plugin for registration \n\t * @param {*} plugin \n\t */\n\tregister: function (plugin) {\n\t\tvar name = plugin.name;\n\t\tvar tablature = plugin.tablature;\n\t\tthis.plugins[name] = tablature;\n\t},\n\n\tsetError: function (tune, msg) {\n\t\tif (tune.warnings) {\n\t\t\ttune.warning.push(msg);\n\t\t} else {\n\t\t\ttune.warnings = [msg];\n\t\t}\n\t},\n\n\t/**\n\t * handle params for current processed score\n\t * @param {*} tune current tune \n\t * @param {*} tuneNumber number in tune list\n\t * @param {*} params params to be processed for tablature\n\t * @return prepared tablatures plugin instances for current tune\n\t */\n\tpreparePlugins: function (tune, tuneNumber, params) {\n\t\t// Called after parsing a tune and before engraving it\n\t\tif (!this.inited) {\n\t\t\t// TODO-PER: I don't think this is needed - the plugin array can be hard coded, right?\n\t\t\tthis.register(new TabString());\n\t\t\tthis.inited = true;\n\t\t}\n\t\tvar returned = null;\n\t\tvar nbPlugins = 0;\n\t\tif (params.tablature) {\n\t\t\t// validate requested plugins \n\t\t\tvar tabs = params.tablature;\n\t\t\treturned = [];\n\t\t\tfor (var ii = 0; ii < tabs.length; ii++) {\n\t\t\t\tvar args = tabs[ii];\n\t\t\t\tvar instrument = args['instrument'];\n\t\t\t\tif (instrument == null) {\n\t\t\t\t\tthis.setError(tune, \"tablature 'instrument' is missing\");\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t\tvar tabName = pluginTab[instrument];\n\t\t\t\tvar plugin = null;\n\t\t\t\tif (tabName) {\n\t\t\t\t\tplugin = this.plugins[tabName.name];\n\t\t\t\t}\n\t\t\t\tif (plugin) {\n\t\t\t\t\tif (params.visualTranspose != 0) {\n\t\t\t\t\t\t// populate transposition request to tabs\n\t\t\t\t\t\targs.visualTranspose = params.visualTranspose;\n\t\t\t\t\t}\n\t\t\t\t\targs.abcSrc = params.tablature.abcSrc;\n\t\t\t\t\tvar pluginInstance = {\n\t\t\t\t\t\tclassz: plugin,\n\t\t\t\t\t\ttuneNumber: tuneNumber,\n\t\t\t\t\t\tparams: args,\n\t\t\t\t\t\tinstance: null,\n\t\t\t\t\t\ttabType: tabName,\n\t\t\t\t\t};\n\t\t\t\t\t// proceed with tab plugin  init \n\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\treturned.push(pluginInstance);\n\t\t\t\t\tnbPlugins++;\n\t\t\t\t} else if (instrument === '') {\n\t\t\t\t\t// create a placeholder - there is no tab for this staff\n\t\t\t\t\treturned.push(null)\n\t\t\t\t} else {\n\t\t\t\t\t// unknown tab plugin \n\t\t\t\t\t//this.emit_error('Undefined tablature plugin: ' + tabName)\n\t\t\t\t\tthis.setError(tune, 'Undefined tablature plugin: ' + instrument);\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returned;\n\t},\n\n\t/**\n\t * Call requested plugin\n\t * @param {*} renderer \n\t * @param {*} abcTune \n\t */\n\tlayoutTablatures: function layoutTablatures(renderer, abcTune) {\n\t\tvar tabs = abcTune.tablatures;\n\n\t\t// chack tabs request for each staffs\n\t\tvar staffLineCount = 0;\n\n\t\t// Clear the suppression flag\n\t\tif (tabs && (tabs.length > 0)) {\n\t\t\tvar nTabs = tabs.length;\n\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\tif (tabs[kk] && tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\ttabs[kk].params.suppress = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var ii = 0; ii < abcTune.lines.length; ii++) {\n\t\t\tvar line = abcTune.lines[ii];\n\n\t\t\tif (line.staff) {\n\t\t\t\tstaffLineCount++;\n\t\t\t}\n\n\t\t\t// MAE 27Nov2023\n\t\t\t// If tab param \"firstStaffOnly\", remove the tab label after the first staff\n\t\t\tif (staffLineCount > 1) {\n\t\t\t\tif (tabs && (tabs.length > 0)) {\n\t\t\t\t\tvar nTabs = tabs.length;\n\t\t\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\t\t\tif (tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\t\t\t// Set the staff draw suppression flag\n\t\t\t\t\t\t\ttabs[kk].params.suppress = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar curStaff = line.staff;\n\t\t\tif (curStaff) {\n\t\t\t\tvar maxStaves = curStaff.length\n\t\t\t\tfor (var jj = 0; jj < curStaff.length; jj++) {\n\n\t\t\t\t\tif (tabs[jj] && jj < maxStaves) {\n\t\t\t\t\t\t// tablature requested for staff\n\t\t\t\t\t\tvar tabPlugin = tabs[jj];\n\t\t\t\t\t\tif (tabPlugin.instance == null) {\n\t\t\t\t\t\t\t//console.log(\"★★★★ Tab Init line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\t\ttabPlugin.instance = new tabPlugin.classz();\n\t\t\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\t\t\t// call initer first\n\t\t\t\t\t\t\ttabPlugin.instance.init(abcTune,\n\t\t\t\t\t\t\t\ttabPlugin.tuneNumber,\n\t\t\t\t\t\t\t\ttabPlugin.params,\n\t\t\t\t\t\t\t\ttabPlugin.tabType\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// render next\n\t\t\t\t\t\t//console.log(\"★★★★ Tab Render line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\ttabPlugin.instance.render(renderer, line, jj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n};\n\n\nmodule.exports = abcTablatures;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/abc_tablatures.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/instruments/string-patterns.js":
/*!**************************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/instruments/string-patterns.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const { noteToMidi } = __webpack_require__(/*! ../../synth/note-to-midi */ \"./node_modules/abcjs/src/synth/note-to-midi.js\");\nvar TabNote = __webpack_require__(/*! ./tab-note */ \"./node_modules/abcjs/src/tablatures/instruments/tab-note.js\");\nvar tabNotes = __webpack_require__(/*! ./tab-notes */ \"./node_modules/abcjs/src/tablatures/instruments/tab-notes.js\");\n\n\nfunction buildCapo(self) {\n\tvar capoTuning = null;\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\tcapoTuning = [];\n\t\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\t\tvar curNote = new TabNote(tuning[iii]);\n\t\t\tfor (var jjj = 0; jjj < self.capo; jjj++) {\n\t\t\t\tcurNote = curNote.nextNote();\n\t\t\t}\n\t\t\tcapoTuning[iii] = curNote.emit();\n\t\t}\n\t}\n\treturn capoTuning;\n}\n\nfunction buildPatterns(self) {\n\tvar strings = [];\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\ttuning = self.capoTuning;\n\t}\n\tvar pos = tuning.length - 1;\n\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\tvar nextNote = self.highestNote; // highest handled note\n\t\tif (iii != tuning.length - 1) {\n\t\t\tnextNote = tuning[iii + 1];\n\t\t}\n\t\tvar stringNotes = tabNotes(tuning[iii], nextNote);\n\t\tif (stringNotes.error) {\n\t\t\treturn stringNotes;\n\t\t}\n\t\tstrings[pos--] = stringNotes;\n\t}\n\treturn strings;\n}\n\n\nfunction buildSecond(first) {\n\tvar seconds = [];\n\tseconds[0] = [];\n\tvar strings = first.strings;\n\tfor (var iii = 1; iii < strings.length; iii++) {\n\t\tseconds[iii] = strings[iii - 1];\n\t}\n\treturn seconds;\n}\n\nfunction sameString(self, chord) {\n\tfor (var jjjj = 0; jjjj < chord.length - 1; jjjj++) {\n\t\tvar curPos = chord[jjjj];\n\t\tvar nextPos = chord[jjjj + 1];\n\t\tif (curPos.str == nextPos.str) {\n\t\t\t// same String\n\t\t\t// => change lower pos \n\t\t\tif (curPos.str == self.strings.length - 1) {\n\t\t\t\t// Invalid tab Chord position for instrument\n\t\t\t\tcurPos.num = \"?\";\n\t\t\t\tnextPos.num = \"?\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// change lower pitch on lowest string\n\t\t\tif (nextPos.num < curPos.num) {\n\t\t\t\tnextPos.str++;\n\t\t\t\tnextPos = noteToNumber(self,\n\t\t\t\t\tnextPos.note,\n\t\t\t\t\tnextPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[nextPos.str].length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcurPos.str++;\n\t\t\t\tcurPos = noteToNumber(self,\n\t\t\t\t\tcurPos.note,\n\t\t\t\t\tcurPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[curPos.str].length\n\t\t\t\t);\n\t\t\t}\n\t\t\t// update table\n\t\t\tchord[jjjj] = curPos;\n\t\t\tchord[jjjj + 1] = nextPos;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction handleChordNotes(self, notes) {\n\tvar retNotes = [];\n\tfor (var iiii = 0; iiii < notes.length; iiii++) {\n\t\tif (notes[iiii].endTie)\n\t\t\tcontinue;\n\t\tvar note = new TabNote(notes[iiii].name, self.clefTranspose);\n\t\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals)\n\t\tvar curPos = toNumber(self, note);\n\t\tretNotes.push(curPos);\n\t}\n\tsameString(self, retNotes);\n\treturn retNotes;\n}\n\nfunction noteToNumber(self, note, stringNumber, secondPosition, firstSize) {\n\tvar strings = self.strings;\n\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals);\n\tif (secondPosition) {\n\t\tstrings = secondPosition;\n\t}\n\tvar noteName = note.emitNoAccidentals();\n\tvar num = strings[stringNumber].indexOf(noteName);\n\tvar acc = note.acc;\n\tif (num != -1) {\n\t\tif (secondPosition) {\n\t\t\tnum += firstSize;\n\t\t}\n\t\tif ((note.isFlat || note.acc == -1) && (num == 0)) {\n\t\t\t// flat on 0 pos => previous string 7th position\n\t\t\tvar noteEquiv = note.getAccidentalEquiv();\n\t\t\tstringNumber++;\n\t\t\tnum = strings[stringNumber].indexOf(noteEquiv.emit());\n\t\t\tacc = 0;\n\t\t}\n\t\treturn {\n\t\t\tnum: (num + acc),\n\t\t\tstr: stringNumber,\n\t\t\tnote: note\n\t\t};\n\t}\n\treturn null;\n}\n\nfunction toNumber(self, note) {\n\tif (note.isAltered || note.natural) {\n\t\tvar acc;\n\t\tif (note.isFlat) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"__\"\n\t\t\telse\n\t\t\t\tacc = \"_\"\n\t\t} else if (note.isSharp) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"^^\"\n\t\t\telse\n\t\t\t\tacc = \"^\"\n\t\t} else if (note.natural)\n\t\t\tacc = \"=\"\n\t\tself.measureAccidentals[note.name.toUpperCase()] = acc\n\t}\n\tfor (var i = self.stringPitches.length - 1; i >= 0; i--) {\n\t\tif (note.pitch + note.pitchAltered >= self.stringPitches[i]) {\n\t\t\tvar num = note.pitch + note.pitchAltered - self.stringPitches[i]\n\t\t\tif (note.quarter === '^') num -= 0.5\n\t\t\telse if (note.quarter === \"v\") num += 0.5\n\t\t\treturn {\n\t\t\t\tnum: Math.round(num),\n\t\t\t\tstr: self.stringPitches.length - 1 - i, // reverse the strings because string 0 is on the bottom\n\t\t\t\tnote: note\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tnum: \"?\",\n\t\tstr: self.stringPitches.length - 1,\n\t\tnote: note,\n\t};\n}\n\nStringPatterns.prototype.stringToPitch = function (stringNumber) {\n\tvar startingPitch = 5.3;\n\tvar bottom = this.strings.length - 1;\n\treturn startingPitch + ((bottom - stringNumber) * this.linePitch);\n};\n\nfunction invalidNumber(retNotes, note) {\n\tvar number = {\n\t\tnum: \"?\",\n\t\tstr: 0,\n\t\tnote: note\n\t};\n\tretNotes.push(number);\n\tretNotes.error = note.emit() + ': unexpected note for instrument';\n}\n\nStringPatterns.prototype.notesToNumber = function (notes, graces) {\n\tvar note;\n\tvar number;\n\tvar error = null;\n\tvar retNotes = null;\n\tif (notes) {\n\t\tretNotes = [];\n\t\tif (notes.length > 1) {\n\t\t\tretNotes = handleChordNotes(this, notes);\n\t\t\tif (retNotes.error) {\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t} else {\n\t\t\tif (!notes[0].endTie) {\n\t\t\t\tnote = new TabNote(notes[0].name, this.clefTranspose);\n\t\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\t\tnumber = toNumber(this, note);\n\t\t\t\tif (number) {\n\t\t\t\t\tretNotes.push(number);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidNumber(retNotes, note);\n\t\t\t\t\terror = retNotes.error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (error) return retNotes;\n\tvar retGraces = null;\n\tif (graces) {\n\t\tretGraces = [];\n\t\tfor (var iiii = 0; iiii < graces.length; iiii++) {\n\t\t\tnote = new TabNote(graces[iiii].name, this.clefTranspose);\n\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\tnumber = toNumber(this, note);\n\t\t\tif (number) {\n\t\t\t\tretGraces.push(number);\n\t\t\t} else {\n\t\t\t\tinvalidNumber(retGraces, note);\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnotes: retNotes,\n\t\tgraces: retGraces,\n\t\terror: error\n\t};\n};\n\nStringPatterns.prototype.toString = function () {\n\tvar arr = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar str = this.tuning[i].replaceAll(',', '').replaceAll(\"'\", '').toUpperCase();\n\t\tif (str[0] === '_') str = str[1] + 'b '\n\t\telse if (str[0] === '^') str = str[1] + \"# \"\n\t\tarr.push(str)\n\t}\n\treturn arr.join('');\n};\n\nStringPatterns.prototype.tabInfos = function (plugin) {\n\tvar name = plugin.params.label;\n\tif (name) {\n\t\tvar tunePos = name.indexOf('%T');\n\t\tvar tuning = \"\";\n\t\tif (tunePos != -1) {\n\t\t\ttuning = this.toString();\n\t\t\tif (plugin.capo > 0) {\n\t\t\t\ttuning += ' capo:' + plugin.capo;\n\t\t\t}\n\t\t\tname = name.replace('%T', tuning);\n\t\t}\n\t\treturn name;\n\t}\n\treturn '';\n};\n\n// MAE 27 Nov 2023\nStringPatterns.prototype.suppress = function (plugin) {\n\tvar suppress = plugin.params.suppress;\n\tif (suppress) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n// MAE 27 Nov 2023 End\n\n/**\n * Common patterns for all string instruments\n * @param {} plugin\n * @param {} tuning\n * @param {*} capo\n * @param {*} highestNote \n */\nfunction StringPatterns(plugin) {\n\t//console.log(\"INIT StringPatterns constructor\")\n\tvar tuning = plugin.tuning;\n\tvar capo = plugin.capo;\n\tvar highestNote = plugin.params.highestNote;\n\tthis.linePitch = plugin.linePitch;\n\tthis.highestNote = \"a'\";\n\tif (highestNote) {\n\t\t// override default\n\t\tthis.highestNote = highestNote;\n\t}\n\tthis.measureAccidentals = {}\n\tthis.capo = 0;\n\tif (capo) {\n\t\tthis.capo = parseInt(capo, 10);\n\t}\n\tthis.transpose = plugin.transpose ? plugin.transpose : 0\n\tthis.tuning = tuning;\n\tthis.stringPitches = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar pitch = noteToMidi(this.tuning[i]) + this.capo\n\t\tthis.stringPitches.push(pitch)\n\t}\n\tif (this.capo > 0) {\n\t\tthis.capoTuning = buildCapo(this);\n\t}\n\tthis.strings = buildPatterns(this);\n\tif (this.strings.error) {\n\t\tplugin.setError(this.strings.error);\n\t\tplugin.inError = true;\n\t\treturn;\n\t}\n\t// second position pattern per string\n\tthis.secondPos = buildSecond(this);\n}\n\n\n\nmodule.exports = StringPatterns;\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/instruments/string-patterns.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/instruments/string-tablature.js":
/*!***************************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/instruments/string-tablature.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n/**\n * Layout tablature informations for draw\n * @param {*} numLines \n * @param {*} lineSpace \n */\n\nfunction StringTablature(numLines, lineSpace) {\n\t//console.log(\"INIT StringTablature constructor\")\n\tthis.numLines = numLines;\n\tthis.lineSpace = lineSpace;\n\tthis.verticalSize = this.numLines * this.lineSpace;\n\tvar pitch = 3;\n\tthis.bar = {\n\t\tpitch: pitch,\n\t\tpitch2: lineSpace * numLines,\n\t\theight: 5,\n\t};\n}\n\n/**\n * return true if current line should not produce a tab\n * @param {} line \n */\nStringTablature.prototype.bypass = function (line) {\n\t//console.log(\"RENDER StringTablature bypass\")\n\tvar voices = line.staffGroup.voices;\n\tif (voices.length > 0) {\n\t\tif (voices[0].isPercussion) return true;\n\t}\n\treturn false;\n};\n\n\nStringTablature.prototype.setRelative = function (child, relative, first) {\n\t//console.log(\"RENDER StringTablature setRelative\")\n\tswitch (child.type) {\n\t\tcase 'bar':\n\t\t\trelative.pitch = this.bar.pitch;\n\t\t\trelative.pitch2 = this.bar.pitch2;\n\t\t\trelative.height = this.height;\n\t\t\tbreak;\n\t\tcase 'symbol':\n\t\t\tvar top = this.bar.pitch2 / 2;\n\t\t\tif (child.name == 'dots.dot') {\n\t\t\t\tif (first) {\n\t\t\t\t\trelative.pitch = top;\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\trelative.pitch = top + this.lineSpace;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn first;\n};\n\nmodule.exports = StringTablature;\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/instruments/string-tablature.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/instruments/tab-note.js":
/*!*******************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/instruments/tab-note.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var { noteToMidi, midiToNote } = __webpack_require__(/*! ../../synth/note-to-midi */ \"./node_modules/abcjs/src/synth/note-to-midi.js\");\n\n/**\n * \n * Note structure for Tabs\n * \n */\n\n\nfunction TabNote(note, clefTranspose) {\n\t//console.log(\"INIT/RENDER TabNote constructor\")\n\tvar pitch = noteToMidi(note)\n\tif (clefTranspose)\n\t\tpitch += clefTranspose\n\tvar newNote = midiToNote(pitch);\n\tvar isFlat = false;\n\tvar isSharp = false;\n\tvar isAltered = false;\n\tvar natural = null;\n\tvar quarter = null;\n\tvar isDouble = false;\n\tvar acc = 0;\n\n\tif (note.startsWith('_')) {\n\t\tisFlat = true;\n\t\tacc = -1;\n\t\t// check quarter flat\n\t\tif (note[1] == '/') {\n\t\t\tisFlat = false;\n\t\t\tquarter = \"v\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '_') {\n\t\t\t// double flat\n\t\t\tisDouble = true;\n\t\t\tacc -= 1;\n\t\t}\n\t} else if (note.startsWith('^')) {\n\t\tisSharp = true;\n\t\tacc = +1;\n\t\t// check quarter sharp\n\t\tif (note[1] == '/') {\n\t\t\tisSharp = false;\n\t\t\tquarter = \"^\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '^') {\n\t\t\t// double sharp\n\t\t\tisDouble = true;\n\t\t\tacc += 1;\n\t\t}\n\t} else if (note.startsWith('=')) {\n\t\tnatural = true;\n\t\tacc = 0;\n\t}\n\tisAltered = isFlat || isSharp || (quarter != null);\n\tif (isAltered || natural) {\n\t\tif ((quarter != null) || (isDouble)) {\n\t\t\tnewNote = note.slice(2);\n\t\t} else {\n\t\t\tnewNote = note.slice(1);\n\t\t}\n\t}\n\tvar hasComma = (newNote.match(/,/g) || []).length;\n\tvar hasQuote = (newNote.match(/'/g) || []).length;\n\n\tthis.pitch = pitch\n\tthis.pitchAltered = 0\n\tthis.name = newNote;\n\tthis.acc = acc;\n\tthis.isSharp = isSharp;\n\tthis.isKeySharp = false;\n\tthis.isDouble = isDouble;\n\tthis.isAltered = isAltered;\n\tthis.isFlat = isFlat;\n\tthis.isKeyFlat = false;\n\tthis.natural = natural;\n\tthis.quarter = quarter;\n\tthis.isLower = (this.name == this.name.toLowerCase());\n\tthis.name = this.name[0].toUpperCase();\n\tthis.hasComma = hasComma;\n\tthis.isQuoted = hasQuote;\n}\n\nfunction cloneNote(self) {\n\tvar newNote = self.name;\n\tvar newTabNote = new TabNote(newNote);\n\tnewTabNote.pitch = self.pitch;\n\tnewTabNote.hasComma = self.hasComma;\n\tnewTabNote.isLower = self.isLower;\n\tnewTabNote.isQuoted = self.isQuoted;\n\tnewTabNote.isSharp = self.isSharp;\n\tnewTabNote.isKeySharp = self.isKeySharp;\n\tnewTabNote.isFlat = self.isFlat;\n\tnewTabNote.isKeyFlat = self.isKeyFlat;\n\treturn newTabNote;\n}\nTabNote.prototype.sameNoteAs = function (note) {\n\t//console.log(\"INIT TabNote sameNoteAs\")\n\treturn note.pitch === this.pitch\n};\n\nTabNote.prototype.isLowerThan = function (note) {\n\t//console.log(\"INIT TabNote isLowerThan\")\n\treturn note.pitch > this.pitch\n};\n\nTabNote.prototype.checkKeyAccidentals = function (accidentals, measureAccidentals) {\n\t//console.log(\"RENDER TabNote checkKeyAccidentals\")\n\tif (this.isAltered || this.natural)\n\t\treturn\n\tif (measureAccidentals[this.name.toUpperCase()]) {\n\t\tswitch (measureAccidentals[this.name.toUpperCase()]) {\n\t\t\tcase \"__\": this.acc = -2; this.pitchAltered = -2; return;\n\t\t\tcase \"_\": this.acc = -1; this.pitchAltered = -1; return;\n\t\t\tcase \"=\": this.acc = 0; this.pitchAltered = 0; return;\n\t\t\tcase \"^\": this.acc = 1; this.pitchAltered = 1; return;\n\t\t\tcase \"^^\": this.acc = 2; this.pitchAltered = 2; return;\n\t\t}\n\t} else if (accidentals) {\n\t\tvar curNote = this.name;\n\t\tfor (var iii = 0; iii < accidentals.length; iii++) {\n\t\t\tvar curAccidentals = accidentals[iii];\n\t\t\tif (curNote == curAccidentals.note.toUpperCase()) {\n\t\t\t\tif (curAccidentals.acc == 'flat') {\n\t\t\t\t\tthis.acc = -1;\n\t\t\t\t\tthis.isKeyFlat = true;\n\t\t\t\t\tthis.pitchAltered = -1\n\t\t\t\t}\n\t\t\t\tif (curAccidentals.acc == 'sharp') {\n\t\t\t\t\tthis.acc = +1;\n\t\t\t\t\tthis.isKeySharp = true;\n\t\t\t\t\tthis.pitchAltered = 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nTabNote.prototype.getAccidentalEquiv = function () {\n\t//console.log(\"TabNote getAccidentalEquiv\")\n\tvar cloned = cloneNote(this);\n\tif (cloned.isSharp || cloned.isKeySharp) {\n\t\tcloned = cloned.nextNote();\n\t\tcloned.isFlat = true;\n\t\tcloned.isSharp = false;\n\t\tcloned.isKeySharp = false;\n\t} else if (cloned.isFlat || cloned.isKeyFlat) {\n\t\tcloned = cloned.prevNote();\n\t\tcloned.isSharp = true;\n\t\tcloned.isFlat = false;\n\t\tcloned.isKeyFlat = false;\n\t}\n\treturn cloned;\n};\n\n\nTabNote.prototype.nextNote = function () {\n\t//console.log(\"INIT TabNote nextNote\")\n\tvar note = midiToNote(this.pitch + 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.prevNote = function () {\n\t//console.log(\"TabNote prevNote\")\n\tvar note = midiToNote(this.pitch - 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.emitNoAccidentals = function () {\n\t//console.log(\"TabNote emitNoAccidentals\")\n\tvar returned = this.name;\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t}\n\tfor (var ii = 0; ii < this.isQuoted; ii++) {\n\t\treturned += \"'\";\n\t}\n\tfor (var jj = 0; jj < this.hasComma; jj++) {\n\t\treturned += \",\";\n\t}\n\treturn returned;\n};\n\nTabNote.prototype.emit = function () {\n\t//console.log(\"INIT/RENDER TabNote emit\")\n\tvar returned = this.name;\n\tif (this.isSharp || this.isKeySharp) {\n\t\treturned = '^' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '^' + returned;\n\t\t}\n\t}\n\tif (this.isFlat || this.isKeyFlat) {\n\t\treturned = '_' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '_' + returned;\n\t\t}\n\t}\n\tif (this.quarter) {\n\t\tif (this.quarter == \"^\") {\n\t\t\treturned = \"^/\" + returned;\n\t\t} else {\n\t\t\treturned = \"_/\" + returned;\n\t\t}\n\t}\n\tif (this.natural) {\n\t\treturned = '=' + returned;\n\t}\n\tfor (var ii = 1; ii <= this.hasComma; ii++) {\n\t\treturned += ',';\n\t}\n\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t\tfor (var jj = 1; jj <= this.isQuoted; jj++) {\n\t\t\treturned += \"'\";\n\t\t}\n\t}\n\treturn returned;\n};\n\nmodule.exports = TabNote\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/instruments/tab-note.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/instruments/tab-notes.js":
/*!********************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/instruments/tab-notes.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\nvar TabNote = __webpack_require__(/*! ./tab-note */ \"./node_modules/abcjs/src/tablatures/instruments/tab-note.js\");\n\nvar notes = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];\n\nfunction tabNotes(fromNote, toNote) {\n\t//console.log(\"INIT TabNotes\")\n\tvar fromN = new TabNote(fromNote);\n\tvar toN = new TabNote(toNote);\n\t// check that toN is not lower than fromN\n\tif (toN.isLowerThan(fromN)) {\n\t\tvar from = fromN.emit();\n\t\tvar tn = toN.emit();\n\t\treturn {\n\t\t\terror: 'Invalid string Instrument tuning : ' +\n\t\t\t\ttn + ' string lower than ' + from + ' string'\n\t\t};\n\t}\n\tvar buildReturned = [];\n\tvar startIndex = notes.indexOf(fromN.name);\n\tvar toIndex = notes.indexOf(toN.name);\n\tif ((startIndex == -1) || (toIndex == -1)) {\n\t\treturn buildReturned;\n\t}\n\tvar finished = false;\n\twhile (!finished) {\n\t\tbuildReturned.push(fromN.emit());\n\t\tfromN = fromN.nextNote();\n\t\tif (fromN.sameNoteAs(toN)) {\n\t\t\tfinished = true;\n\t\t}\n\t}\n\treturn buildReturned;\n}\n\nmodule.exports = tabNotes;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/instruments/tab-notes.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/instruments/tab-string.js":
/*!*********************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/instruments/tab-string.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\nvar StringTablature = __webpack_require__(/*! ./string-tablature */ \"./node_modules/abcjs/src/tablatures/instruments/string-tablature.js\");\nvar tabRenderer = __webpack_require__(/*! ../render/tab-renderer */ \"./node_modules/abcjs/src/tablatures/render/tab-renderer.js\");\nvar StringPatterns = __webpack_require__(/*! ./string-patterns */ \"./node_modules/abcjs/src/tablatures/instruments/string-patterns.js\");\n\n\n/**\n * upon init mainly store provided instances for later usage\n * @param {*} abcTune  the parsed tune AST tree\n * @param {*} tuneNumber  the parsed tune AST tree\n * @param {*} params  complementary args provided to Tablature Plugin\n */\nPlugin.prototype.init = function (abcTune, tuneNumber, params, tabSettings) {\n\t//console.log(\"INIT AbcStringTab Plugin.init\")\n\tthis.tune = abcTune;\n\tthis.params = params;\n\tthis.tuneNumber = tuneNumber;\n\tthis.inError = false;\n\tthis.abcTune = abcTune;\n\tthis.linePitch = 3;\n\tthis.nbLines = tabSettings.defaultTuning.length;\n\tthis.isTabBig = tabSettings.isTabBig;\n\tthis.tabSymbolOffset = tabSettings.tabSymbolOffset;\n\tthis.capo = params.capo;\n\tthis.transpose = params.visualTranspose;\n\tthis.hideTabSymbol = params.hideTabSymbol;\n\tthis.tablature = new StringTablature(this.nbLines, this.linePitch);\n\tvar tuning = params.tuning;\n\tif (!tuning) {\n\t\ttuning = tabSettings.defaultTuning;\n\t}\n\tthis.tuning = tuning;\n\tthis.semantics = new StringPatterns(this);\n};\n\nPlugin.prototype.setError = function (error) {\n\t//console.log(\"Plugin setError\")\n\tif (error) {\n\t\tthis.error = error;\n\t\tthis.inError = true;\n\t\tif (this.tune.warnings) {\n\t\t\tthis.tune.warnings.push(error);\n\t\t} else {\n\t\t\tthis.tune.warnings = [error];\n\t\t}\n\t}\n};\n\nPlugin.prototype.render = function (renderer, line, staffIndex) {\n\t//console.log(\"RENDER AbcStringTab Plugin.render\")\n\tif (this.inError) return;\n\tif (this.tablature.bypass(line)) return;\n\ttabRenderer(this, renderer, line, staffIndex);\n};\n\nfunction Plugin() { }\n\n//\n// Tablature plugin definition\n//\nvar AbcStringTab = function () {\n\treturn { name: 'StringTab', tablature: Plugin };\n};\n\nmodule.exports = AbcStringTab;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/instruments/tab-string.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/render/tab-absolute-elements.js":
/*!***************************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/render/tab-absolute-elements.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Tablature Absolute elements factory\n */\nvar AbsoluteElement = __webpack_require__(/*! ../../write/creation/elements/absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar RelativeElement = __webpack_require__(/*! ../../write/creation/elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nfunction isObject(a) { return a != null && a.constructor === Object; }\nfunction cloneObject(dest, src) {\n\tfor (var prop in src) {\n\t\tif (src.hasOwnProperty(prop)) {\n\t\t\tif (!(Array.isArray(src[prop]) || isObject(src[prop]))) {\n\t\t\t\tdest[prop] = src[prop];\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction cloneAbsolute(absSrc) {\n\tvar returned = new AbsoluteElement('', 0, 0, '', 0);\n\tcloneObject(returned, absSrc);\n\treturned.top = 0;\n\treturned.bottom = -1;\n\tif (absSrc.abcelem) {\n\t\treturned.abcelem = {};\n\t\tcloneObject(returned.abcelem, absSrc.abcelem);\n\t\tif (returned.abcelem.el_type === \"note\")\n\t\t\treturned.abcelem.el_type = 'tabNumber';\n\t}\n\t// TODO-PER: This fixes the classes because the element isn't created at the right time.\n\tabsSrc.cloned = returned\n\treturn returned;\n}\n\nfunction cloneAbsoluteAndRelatives(absSrc, plugin) {\n\tvar returned = cloneAbsolute(absSrc);\n\tif (plugin) {\n\t\tvar children = absSrc.children;\n\t\t// proceed with relative as well\n\t\tvar first = true;\n\t\tfor (var ii = 0; ii < children.length; ii++) {\n\t\t\tvar child = children[ii];\n\t\t\tvar relative = new RelativeElement('', 0, 0, 0, '');\n\t\t\tcloneObject(relative, child);\n\t\t\tfirst = plugin.tablature.setRelative(child, relative, first);\n\t\t\treturned.children.push(relative);\n\t\t}\n\t}\n\treturn returned;\n}\n\nfunction buildTabAbsolute(plugin, absX, relX) {\n\tvar tabIcon = 'tab.tiny';\n\tvar tabYPos = 7.5;\n\tif (plugin.isTabBig) {\n\t\ttabIcon = 'tab.big';\n\t\ttabYPos = 10;\n\t}\n\tvar element = {\n\t\tel_type: \"tab\",\n\t\ticon: tabIcon,\n\t\tYpos: tabYPos\n\t};\n\n\t// Offset the TAB symbol position if specified in the tab description\n\ttabYPos += plugin.tabSymbolOffset;\n\n\t// For tablature like whistle tab where you want the TAB symbol hidden\n\tif (!plugin.hideTabSymbol) {\n\n\t\tvar tabAbsolute = new AbsoluteElement(element, 0, 0, \"symbol\", 0);\n\t\ttabAbsolute.x = absX;\n\t\tvar tabRelative = new RelativeElement(tabIcon, 0, 0, 7.5, \"tab\");\n\t\ttabRelative.x = relX;\n\t\ttabAbsolute.children.push(tabRelative);\n\t\tif (tabAbsolute.abcelem.el_type == 'tab') {\n\t\t\ttabRelative.pitch = tabYPos;\n\t\t}\n\n\t}\n\treturn tabAbsolute;\n}\n\nfunction lyricsDim(abs) {\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tvar extra = abs.extra[ii];\n\t\t\tif (extra.type == 'lyric') {\n\t\t\t\treturn {\n\t\t\t\t\tbottom: extra.bottom,\n\t\t\t\t\theight: extra.height\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\nfunction TabAbsoluteElements() {\n\t//console.log(\"RENDER TabAbsoluteElements constructor\")\n\tthis.accidentals = null;\n}\n\nfunction getInitialStaffSize(staffGroup) {\n\tvar returned = 0;\n\tfor (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[ii].tabNameInfos) returned++;\n\t}\n\treturn returned;\n}\n\nfunction buildRelativeTabNote(plugin, relX, def, curNote, isGrace) {\n\tvar strNote = curNote.num;\n\tif (curNote.note.quarter != null) {\n\t\t// add tab quarter => needs to string conversion then \n\t\tstrNote = strNote.toString();\n\t\tstrNote += curNote.note.quarter;\n\t}\n\tvar pitch = plugin.semantics.stringToPitch(curNote.str);\n\tdef.notes.push({ num: strNote, str: curNote.str, pitch: curNote.note.emit() });\n\tvar opt = {\n\t\ttype: 'tabNumber'\n\t};\n\tvar tabNoteRelative = new RelativeElement(\n\t\tstrNote, 0, 0, pitch + 0.3, opt);\n\ttabNoteRelative.x = relX;\n\ttabNoteRelative.isGrace = isGrace;\n\ttabNoteRelative.isAltered = curNote.note.isAltered;\n\treturn tabNoteRelative;\n}\n\nfunction getXGrace(abs, index) {\n\tvar found = 0;\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tif (abs.extra[ii].c.indexOf('noteheads') >= 0) {\n\t\t\t\tif (found === index) {\n\t\t\t\t\treturn abs.extra[ii].x + abs.extra[ii].w / 2;\n\t\t\t\t} else {\n\t\t\t\t\tfound++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction graceInRest(absElem) {\n\tif (absElem.abcelem) {\n\t\tvar elem = absElem.abcelem;\n\t\tif (elem.rest) {\n\t\t\treturn elem.gracenotes;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction convertToNumber(plugin, pitches, graceNotes) {\n\tvar tabPos = plugin.semantics.notesToNumber(pitches, graceNotes);\n\tif (tabPos.error) {\n\t\tplugin.setError(tabPos.error);\n\t\treturn tabPos; // give up on error here\n\t}\n\tif (tabPos.graces && tabPos.notes) {\n\t\t// add graces to last note in notes\n\t\tvar posNote = tabPos.notes.length - 1;\n\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t}\n\treturn tabPos;\n}\n\nfunction buildGraceRelativesForRest(plugin, abs, absChild, graceNotes, tabVoice) {\n\tfor (var mm = 0; mm < graceNotes.length; mm++) {\n\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\tvar graceX = getXGrace(absChild, mm);\n\t\tvar curGrace = graceNotes[mm];\n\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\tabs.children.push(tabGraceRelative);\n\t\ttabVoice.push(defGrace);\n\t}\n}\n\n/**\n * Build tab absolutes by scanning current staff line absolute array\n * @param {*} staffAbsolute\n */\nTabAbsoluteElements.prototype.build = function (plugin,\n\tstaffAbsolute,\n\ttabVoice,\n\tvoiceIndex,\n\tstaffIndex,\n\tkeySig,\n\ttabVoiceIndex) {\n\t//console.log(\"RENDER TabAbsoluteElements build\")\n\tvar staffSize = getInitialStaffSize(staffAbsolute);\n\tvar source = staffAbsolute[staffIndex + voiceIndex];\n\tvar dest = staffAbsolute[tabVoiceIndex];\n\tvar tabPos = null;\n\tvar defNote = null;\n\tif (source.children[0].abcelem.el_type != 'clef') {\n\t\t// keysig missing => provide one for tabs\n\t\tif (keySig != 'none') {\n\t\t\tsource.children.splice(0, 0, keySig);\n\t\t}\n\t}\n\tfor (var ii = 0; ii < source.children.length; ii++) {\n\t\tvar absChild = source.children[ii];\n\t\tvar absX = absChild.x;\n\t\tvar relX = absX;\n\t\t// if (absChild.children.length > 0) {\n\t\t//   relX = absChild.children[0].x;\n\t\t// }\n\t\tif ((absChild.isClef)) {\n\t\t\tdest.children.push(buildTabAbsolute(plugin, absX, relX));\n\t\t\tif (absChild.abcelem.type.indexOf('-8') >= 0) plugin.semantics.clefTranspose = -12\n\t\t\tif (absChild.abcelem.type.indexOf('+8') >= 0) plugin.semantics.clefTranspose = 12\n\t\t}\n\t\tswitch (absChild.type) {\n\t\t\tcase 'staff-extra key-signature':\n\t\t\t\t// refresh key accidentals\n\t\t\t\tthis.accidentals = absChild.abcelem.accidentals;\n\t\t\t\tplugin.semantics.accidentals = this.accidentals;\n\t\t\t\tbreak;\n\t\t\tcase 'bar':\n\t\t\t\tplugin.semantics.measureAccidentals = {}\n\t\t\t\tvar lastBar = false;\n\t\t\t\tif (ii === source.children.length - 1) {\n\t\t\t\t\t// used for final line bar drawing\n\t\t\t\t\t// for multi tabs / multi staves\n\t\t\t\t\tlastBar = true;\n\t\t\t\t}\n\t\t\t\tvar cloned = cloneAbsoluteAndRelatives(absChild, plugin);\n\t\t\t\tif (cloned.abcelem.barNumber) {\n\t\t\t\t\tdelete cloned.abcelem.barNumber;\n\t\t\t\t\tfor (var bn = 0; bn < cloned.children.length; bn++) {\n\t\t\t\t\t\tif (cloned.children[bn].type === \"barNumber\") {\n\t\t\t\t\t\t\tcloned.children.splice(bn, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcloned.abcelem.lastBar = lastBar;\n\t\t\t\tdest.children.push(cloned);\n\t\t\t\ttabVoice.push({\n\t\t\t\t\tel_type: absChild.abcelem.el_type,\n\t\t\t\t\ttype: absChild.abcelem.type,\n\t\t\t\t\tendChar: absChild.abcelem.endChar,\n\t\t\t\t\tstartChar: absChild.abcelem.startChar,\n\t\t\t\t\tabselem: cloned\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'rest':\n\t\t\t\tvar restGraces = graceInRest(absChild);\n\t\t\t\tif (restGraces) {\n\t\t\t\t\t// to number conversion \n\t\t\t\t\ttabPos = convertToNumber(plugin, null, restGraces);\n\t\t\t\t\tif (tabPos.error) return;\n\t\t\t\t\t// build relative for grace\n\t\t\t\t\tdefGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\tbuildGraceRelativesForRest(plugin, abs, absChild, tabPos.graces, tabVoice);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'note':\n\t\t\t\tvar abs = cloneAbsolute(absChild);\n\t\t\t\tabs.x = absChild.heads[0].x + absChild.heads[0].w / 2; // center the number\n\t\t\t\tabs.lyricDim = lyricsDim(absChild);\n\t\t\t\tvar pitches = absChild.abcelem.pitches;\n\t\t\t\tvar graceNotes = absChild.abcelem.gracenotes;\n\t\t\t\tabs.type = 'tabNumber';\n\t\t\t\t// to number conversion \n\t\t\t\ttabPos = convertToNumber(plugin, pitches, graceNotes);\n\t\t\t\tif (tabPos.error) return;\n\t\t\t\tif (tabPos.graces) {\n\t\t\t\t\t// add graces to last note in notes\n\t\t\t\t\tvar posNote = tabPos.notes.length - 1;\n\t\t\t\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t\t\t\t}\n\t\t\t\t// build relative\n\t\t\t\tdefNote = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [] };\n\t\t\t\tfor (var ll = 0; ll < tabPos.notes.length; ll++) {\n\t\t\t\t\tvar curNote = tabPos.notes[ll];\n\t\t\t\t\tif (curNote.graces) {\n\t\t\t\t\t\tfor (var mm = 0; mm < curNote.graces.length; mm++) {\n\t\t\t\t\t\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\t\t\tvar graceX = getXGrace(absChild, mm);\n\t\t\t\t\t\t\tvar curGrace = curNote.graces[mm];\n\t\t\t\t\t\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\t\t\t\t\t\tabs.children.push(tabGraceRelative);\n\t\t\t\t\t\t\ttabVoice.push(defGrace);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar tabNoteRelative = buildRelativeTabNote(plugin, abs.x + absChild.heads[ll].dx, defNote, curNote, false);\n\t\t\t\t\tabs.children.push(tabNoteRelative);\n\t\t\t\t}\n\t\t\t\tif (defNote.notes.length > 0) {\n\t\t\t\t\tdefNote.abselem = abs;\n\t\t\t\t\ttabVoice.push(defNote);\n\t\t\t\t\tdest.children.push(abs);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n};\n\nmodule.exports = TabAbsoluteElements;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/render/tab-absolute-elements.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/tablatures/render/tab-renderer.js":
/*!******************************************************************!*\
  !*** ./node_modules/abcjs/src/tablatures/render/tab-renderer.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* eslint-disable no-debugger */\nvar VoiceElement = __webpack_require__(/*! ../../write/creation/elements/voice-element */ \"./node_modules/abcjs/src/write/creation/elements/voice-element.js\");\nvar TabAbsoluteElements = __webpack_require__(/*! ./tab-absolute-elements */ \"./node_modules/abcjs/src/tablatures/render/tab-absolute-elements.js\");\nvar spacing = __webpack_require__(/*! ../../write/helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\n\nfunction initSpecialY() {\n\treturn {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n}\n\nfunction getLyricHeight(voice) {\n\tvar maxLyricHeight = 0;\n\tfor (var ii = 0; ii < voice.children.length; ii++) {\n\t\tvar curAbs = voice.children[ii];\n\t\tif (curAbs.specialY) {\n\t\t\tif (curAbs.specialY.lyricHeightBelow > maxLyricHeight) {\n\t\t\t\tmaxLyricHeight = curAbs.specialY.lyricHeightBelow;\n\t\t\t}\n\t\t}\n\t}\n\treturn maxLyricHeight; // add spacing\n}\n\nfunction buildTabName(plugin, renderer, dest) {\n\tvar stringSemantics = plugin.semantics;\n\tvar textSize = renderer.controller.getTextSize;\n\tvar tabName = stringSemantics.tabInfos(plugin);\n\tvar suppress = stringSemantics.suppress(plugin);\n\tvar doDraw = true;\n\n\tif (suppress) {\n\t\tdoDraw = false\n\t}\n\n\n\tif (doDraw) {\n\t\tvar size = textSize.calc(tabName, 'tablabelfont', 'text instrumentname');\n\t\tdest.tabNameInfos = {\n\t\t\ttextSize: { height: size.height, width: size.width },\n\t\t\tname: tabName\n\t\t};\n\t\treturn size.height;\n\t}\n\treturn 0\n\n}\n\nfunction islastTabInStaff(index, staffGroup) {\n\tif (staffGroup[index].isTabStaff) {\n\t\tif (index === staffGroup.length - 1) return true;\n\t\tif (staffGroup[index + 1].isTabStaff) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getStaffNumbers(staffs) {\n\tvar nbStaffs = 0;\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\tnbStaffs++;\n\t\t}\n\t}\n\treturn nbStaffs;\n}\n\nfunction getParentStaffIndex(staffs, index) {\n\tfor (var ii = index; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn ii;\n\t\t}\n\t}\n\treturn -1;\n}\n\n\nfunction linkStaffAndTabs(staffs) {\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (staffs[ii].isTabStaff) {\n\t\t\t// link to parent staff\n\t\t\tvar parentIndex = getParentStaffIndex(staffs, ii);\n\t\t\tstaffs[ii].hasStaff = staffs[parentIndex];\n\t\t\tif (!staffs[parentIndex].hasTab) staffs[parentIndex].hasTab = [];\n\t\t\tstaffs[parentIndex].hasTab.push(staffs[ii]);\n\t\t}\n\t}\n}\n\nfunction isMultiVoiceSingleStaff(staffs, parent) {\n\tif (getStaffNumbers(staffs) === 1) {\n\t\tif (parent.voices.length > 1) return true;\n\t}\n\treturn false;\n}\n\n\nfunction getNextTabPos(tabIndex, staffGroup) {\n\tvar startIndex = 0;\n\tvar handledVoices = 0;\n\tvar inProgress = true;\n\tvar nbVoices = 0;\n\twhile (inProgress) {\n\t\t//for (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[startIndex])\n\t\t\treturn -1;\n\t\tif (!staffGroup[startIndex].isTabStaff) {\n\t\t\tnbVoices = staffGroup[startIndex].voices.length; // get number of staff voices\n\t\t}\n\t\tif (staffGroup[startIndex].isTabStaff) {\n\t\t\thandledVoices++;\n\t\t\tif (islastTabInStaff(startIndex, staffGroup)) {\n\t\t\t\tif (handledVoices < nbVoices) return startIndex + 1;\n\t\t\t}\n\t\t} else {\n\t\t\thandledVoices = 0;\n\t\t\tif (startIndex >= tabIndex) {\n\t\t\t\tif (startIndex + 1 == staffGroup.length) return startIndex + 1;\n\t\t\t\tif (!staffGroup[startIndex + 1].isTabStaff) return startIndex + 1;\n\t\t\t}\n\t\t}\n\t\tstartIndex++;\n\t\t// out of space case\n\t\tif (startIndex > staffGroup.length) return -1;\n\t}\n}\n\nfunction getLastStaff(staffs, lastTab) {\n\tfor (var ii = lastTab; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn staffs[ii];\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction checkVoiceKeySig(voices, ii) {\n\tvar curVoice = voices[ii];\n\t// on multivoice multistaff only the first voice has key signature\n\t// folling consecutive do not have one => we should provide the first voice key sig back then\n\tvar elem0 = curVoice.children[0].abcelem;\n\tif (elem0.el_type === 'clef') return null;\n\tif (ii == 0) {\n\t\t// not found => clef=none case\n\t\treturn 'none';\n\t}\n\treturn voices[ii - 1].children[0];\n}\n\nfunction tabRenderer(plugin, renderer, line, staffIndex) {\n\t//console.log(\"RENDER tabRenderer\")\n\tvar absolutes = new TabAbsoluteElements();\n\tvar tabStaff = {\n\t\tclef: {\n\t\t\ttype: 'TAB'\n\t\t}\n\t};\n\tvar tabSize = (plugin.linePitch * plugin.nbLines);\n\tvar staffs = line.staff;\n\tif (staffs) {\n\t\t// give up on staffline=0 in key \n\t\tvar firstStaff = staffs[0];\n\t\tif (firstStaff) {\n\t\t\tif (firstStaff.clef) {\n\t\t\t\tif (firstStaff.clef.stafflines == 0) {\n\t\t\t\t\tplugin.setError(\"No tablatures when stafflines=0\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstaffs.splice(\n\t\t\tstaffs.length, 0,\n\t\t\ttabStaff\n\t\t);\n\t}\n\tvar staffGroup = line.staffGroup;\n\n\tvar voices = staffGroup.voices;\n\tvar firstVoice = voices[0];\n\t// take lyrics into account if any\n\tvar lyricsHeight = getLyricHeight(firstVoice);\n\tvar padd = 3;\n\tvar prevIndex = staffIndex;\n\tvar previousStaff = staffGroup.staffs[prevIndex];\n\tvar tabTop = tabSize + padd - previousStaff.bottom - lyricsHeight;\n\tif (previousStaff.isTabStaff) {\n\t\ttabTop = previousStaff.top;\n\t}\n\tvar staffGroupInfos = {\n\t\tbottom: -1,\n\t\tisTabStaff: true,\n\t\tspecialY: initSpecialY(),\n\t\tlines: plugin.nbLines,\n\t\tlinePitch: plugin.linePitch,\n\t\tdy: 0.15,\n\t\ttop: tabTop,\n\t};\n\tvar nextTabPos = getNextTabPos(staffIndex, staffGroup.staffs);\n\tif (nextTabPos === -1)\n\t\treturn;\n\tstaffGroupInfos.parentIndex = nextTabPos - 1;\n\tstaffGroup.staffs.splice(nextTabPos, 0, staffGroupInfos);\n\t// staffGroup.staffs.push(staffGroupInfos);\n\tstaffGroup.height += tabSize + padd;\n\tvar parentStaff = getLastStaff(staffGroup.staffs, nextTabPos);\n\tvar nbVoices = 1;\n\tif (isMultiVoiceSingleStaff(staffGroup.staffs, parentStaff)) {\n\t\tnbVoices = parentStaff.voices.length;\n\t}\n\t// build from staff\n\ttabStaff.voices = [];\n\tfor (var ii = 0; ii < nbVoices; ii++) {\n\t\tvar tabVoice = new VoiceElement(0, 0);\n\t\tif (ii > 0) tabVoice.duplicate = true;\n\t\tvar nameHeight = buildTabName(plugin, renderer, tabVoice) / spacing.STEP;\n\t\tnameHeight = Math.max(nameHeight, 1) // If there is no label for the tab line, then there needs to be a little padding\n\t\t// This was pushing down the top staff by the tab label height\n\t\t//staffGroup.staffs[staffIndex].top += nameHeight;\n\t\tstaffGroup.staffs[staffIndex].top += 1;\n\t\tstaffGroup.height += nameHeight;\n\t\ttabVoice.staff = staffGroupInfos;\n\t\tvar tabVoiceIndex = voices.length\n\t\tvoices.splice(voices.length, 0, tabVoice);\n\t\tvar keySig = checkVoiceKeySig(voices, ii + staffIndex);\n\t\ttabStaff.voices[ii] = [];\n\t\tabsolutes.build(plugin, voices, tabStaff.voices[ii], ii, staffIndex, keySig, tabVoiceIndex);\n\t}\n\tlinkStaffAndTabs(staffGroup.staffs); // crossreference tabs and staff\n}\n\nmodule.exports = tabRenderer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/tablatures/render/tab-renderer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/abstract-engraver.js":
/*!********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/abstract-engraver.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// abc_abstract_engraver.js: Creates a data structure suitable for printing a line of abc\n\nvar AbsoluteElement = __webpack_require__(/*! ./elements/absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar BeamElem = __webpack_require__(/*! ./elements/beam-element */ \"./node_modules/abcjs/src/write/creation/elements/beam-element.js\");\nvar BraceElem = __webpack_require__(/*! ./elements/brace-element */ \"./node_modules/abcjs/src/write/creation/elements/brace-element.js\");\nvar createClef = __webpack_require__(/*! ./create-clef */ \"./node_modules/abcjs/src/write/creation/create-clef.js\");\nvar createKeySignature = __webpack_require__(/*! ./create-key-signature */ \"./node_modules/abcjs/src/write/creation/create-key-signature.js\");\nvar createNoteHead = __webpack_require__(/*! ./create-note-head */ \"./node_modules/abcjs/src/write/creation/create-note-head.js\");\nvar createTimeSignature = __webpack_require__(/*! ./create-time-signature */ \"./node_modules/abcjs/src/write/creation/create-time-signature.js\");\nvar Decoration = __webpack_require__(/*! ./decoration */ \"./node_modules/abcjs/src/write/creation/decoration.js\");\nvar EndingElem = __webpack_require__(/*! ./elements/ending-element */ \"./node_modules/abcjs/src/write/creation/elements/ending-element.js\");\nvar glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar StaffGroupElement = __webpack_require__(/*! ./elements/staff-group-element */ \"./node_modules/abcjs/src/write/creation/elements/staff-group-element.js\");\nvar TempoElement = __webpack_require__(/*! ./elements/tempo-element */ \"./node_modules/abcjs/src/write/creation/elements/tempo-element.js\");\nvar TieElem = __webpack_require__(/*! ./elements/tie-element */ \"./node_modules/abcjs/src/write/creation/elements/tie-element.js\");\nvar TripletElem = __webpack_require__(/*! ./elements/triplet-element */ \"./node_modules/abcjs/src/write/creation/elements/triplet-element.js\");\nvar VoiceElement = __webpack_require__(/*! ./elements/voice-element */ \"./node_modules/abcjs/src/write/creation/elements/voice-element.js\");\nvar addChord = __webpack_require__(/*! ./add-chord */ \"./node_modules/abcjs/src/write/creation/add-chord.js\");\nvar pitchesToPerc = __webpack_require__(/*! ../../synth/pitches-to-perc */ \"./node_modules/abcjs/src/synth/pitches-to-perc.js\")\n\nvar parseCommon = __webpack_require__(/*! ../../parse/abc_common */ \"./node_modules/abcjs/src/parse/abc_common.js\");\n\nvar getDuration = function (elem) {\n\tvar d = 0;\n\tif (elem.duration) {\n\t\td = elem.duration;\n\t}\n\treturn d;\n};\n\nvar hint = false;\n\nvar chartable = {\n\trest: { 0: \"rests.whole\", 1: \"rests.half\", 2: \"rests.quarter\", 3: \"rests.8th\", 4: \"rests.16th\", 5: \"rests.32nd\", 6: \"rests.64th\", 7: \"rests.128th\", \"multi\": \"rests.multimeasure\" },\n\tnote: { \"-1\": \"noteheads.dbl\", 0: \"noteheads.whole\", 1: \"noteheads.half\", 2: \"noteheads.quarter\", 3: \"noteheads.quarter\", 4: \"noteheads.quarter\", 5: \"noteheads.quarter\", 6: \"noteheads.quarter\", 7: \"noteheads.quarter\", 'nostem': \"noteheads.quarter\" },\n\trhythm: { \"-1\": \"noteheads.slash.whole\", 0: \"noteheads.slash.whole\", 1: \"noteheads.slash.whole\", 2: \"noteheads.slash.quarter\", 3: \"noteheads.slash.quarter\", 4: \"noteheads.slash.quarter\", 5: \"noteheads.slash.quarter\", 6: \"noteheads.slash.quarter\", 7: \"noteheads.slash.quarter\", nostem: \"noteheads.slash.nostem\" },\n\tx: { \"-1\": \"noteheads.indeterminate\", 0: \"noteheads.indeterminate\", 1: \"noteheads.indeterminate\", 2: \"noteheads.indeterminate\", 3: \"noteheads.indeterminate\", 4: \"noteheads.indeterminate\", 5: \"noteheads.indeterminate\", 6: \"noteheads.indeterminate\", 7: \"noteheads.indeterminate\", nostem: \"noteheads.indeterminate\" },\n\tharmonic: { \"-1\": \"noteheads.harmonic.quarter\", 0: \"noteheads.harmonic.quarter\", 1: \"noteheads.harmonic.quarter\", 2: \"noteheads.harmonic.quarter\", 3: \"noteheads.harmonic.quarter\", 4: \"noteheads.harmonic.quarter\", 5: \"noteheads.harmonic.quarter\", 6: \"noteheads.harmonic.quarter\", 7: \"noteheads.harmonic.quarter\", nostem: \"noteheads.harmonic.quarter\" },\n\ttriangle: { \"-1\": \"noteheads.triangle.quarter\", 0: \"noteheads.triangle.quarter\", 1: \"noteheads.triangle.quarter\", 2: \"noteheads.triangle.quarter\", 3: \"noteheads.triangle.quarter\", 4: \"noteheads.triangle.quarter\", 5: \"noteheads.triangle.quarter\", 6: \"noteheads.triangle.quarter\", 7: \"noteheads.triangle.quarter\", nostem: \"noteheads.triangle.quarter\" },\n\tuflags: { 3: \"flags.u8th\", 4: \"flags.u16th\", 5: \"flags.u32nd\", 6: \"flags.u64th\" },\n\tdflags: { 3: \"flags.d8th\", 4: \"flags.d16th\", 5: \"flags.d32nd\", 6: \"flags.d64th\" }\n};\n\nvar AbstractEngraver = function (getTextSize, tuneNumber, options) {\n\tthis.decoration = new Decoration();\n\tthis.getTextSize = getTextSize;\n\tthis.tuneNumber = tuneNumber;\n\tthis.isBagpipes = options.bagpipes;\n\tthis.flatBeams = options.flatbeams;\n\tthis.graceSlurs = options.graceSlurs;\n\tthis.percmap = options.percmap;\n\tthis.initialClef = options.initialClef\n\tthis.jazzchords = !!options.jazzchords\n\tthis.accentAbove = !!options.accentAbove\n\tthis.germanAlphabet = !!options.germanAlphabet\n\tthis.reset();\n};\n\nAbstractEngraver.prototype.reset = function () {\n\tthis.slurs = {};\n\tthis.ties = [];\n\tthis.voiceScale = 1;\n\tthis.voiceColor = undefined;\n\tthis.slursbyvoice = {};\n\tthis.tiesbyvoice = {};\n\tthis.endingsbyvoice = {};\n\tthis.scaleByVoice = {};\n\tthis.colorByVoice = {};\n\tthis.tripletmultiplier = 1;\n\n\tthis.abcline = undefined;\n\tthis.accidentalSlot = undefined;\n\tthis.accidentalshiftx = undefined;\n\tthis.dotshiftx = undefined;\n\tthis.hasVocals = false;\n\tthis.minY = undefined;\n\tthis.partstartelem = undefined;\n\tthis.startlimitelem = undefined;\n\tthis.stemdir = undefined;\n};\n\nAbstractEngraver.prototype.setStemHeight = function (heightInPixels) {\n\tthis.stemHeight = Math.round(heightInPixels * 10 / spacing.STEP) / 10;\n};\n\nAbstractEngraver.prototype.getCurrentVoiceId = function (s, v) {\n\treturn \"s\" + s + \"v\" + v;\n};\n\nAbstractEngraver.prototype.pushCrossLineElems = function (s, v) {\n\tthis.slursbyvoice[this.getCurrentVoiceId(s, v)] = this.slurs;\n\tthis.tiesbyvoice[this.getCurrentVoiceId(s, v)] = this.ties;\n\tthis.endingsbyvoice[this.getCurrentVoiceId(s, v)] = this.partstartelem;\n\tthis.scaleByVoice[this.getCurrentVoiceId(s, v)] = this.voiceScale;\n\tif (this.voiceColor)\n\t\tthis.colorByVoice[this.getCurrentVoiceId(s, v)] = this.voiceColor;\n};\n\nAbstractEngraver.prototype.popCrossLineElems = function (s, v) {\n\tthis.slurs = this.slursbyvoice[this.getCurrentVoiceId(s, v)] || {};\n\tthis.ties = this.tiesbyvoice[this.getCurrentVoiceId(s, v)] || [];\n\tthis.partstartelem = this.endingsbyvoice[this.getCurrentVoiceId(s, v)];\n\tthis.voiceScale = this.scaleByVoice[this.getCurrentVoiceId(s, v)];\n\tif (this.voiceScale === undefined) this.voiceScale = 1;\n\tthis.voiceColor = this.colorByVoice[this.getCurrentVoiceId(s, v)];\n};\n\nAbstractEngraver.prototype.containsLyrics = function (staves) {\n\tfor (var i = 0; i < staves.length; i++) {\n\t\tfor (var j = 0; j < staves[i].voices.length; j++) {\n\t\t\tfor (var k = 0; k < staves[i].voices[j].length; k++) {\n\t\t\t\tvar el = staves[i].voices[j][k];\n\t\t\t\tif (el.lyric) {\n\t\t\t\t\t// We just want to see if there are vocals below the music to know where to put the dynamics.\n\t\t\t\t\tif (!el.positioning || el.positioning.vocalPosition === 'below')\n\t\t\t\t\t\tthis.hasVocals = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.createABCLine = function (staffs, tempo, l) {\n\tthis.minY = 2; // PER: This will be the lowest that any note reaches. It will be used to set the dynamics row.\n\t// See if there are any lyrics on this line.\n\tthis.containsLyrics(staffs);\n\tvar staffgroup = new StaffGroupElement(this.getTextSize);\n\tthis.tempoSet = false;\n\tfor (var s = 0; s < staffs.length; s++) {\n\t\tif (hint)\n\t\t\tthis.restoreState();\n\t\thint = false;\n\t\tthis.createABCStaff(staffgroup, staffs[s], tempo, s, l);\n\t}\n\treturn staffgroup;\n};\n\nAbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, tempo, s, l) {\n\t// If the tempo is passed in, then the first element should get the tempo attached to it.\n\tstaffgroup.getTextSize.updateFonts(abcstaff);\n\tfor (var v = 0; v < abcstaff.voices.length; v++) {\n\t\tvar voice = new VoiceElement(v, abcstaff.voices.length);\n\t\tif (v === 0) {\n\t\t\tvoice.barfrom = (abcstaff.connectBarLines === \"start\" || abcstaff.connectBarLines === \"continue\");\n\t\t\tvoice.barto = (abcstaff.connectBarLines === \"continue\" || abcstaff.connectBarLines === \"end\");\n\t\t} else {\n\t\t\tvoice.duplicate = true; // bar lines and other duplicate info need not be created\n\t\t}\n\t\tif (abcstaff.title && abcstaff.title[v]) {\n\t\t\tvoice.header = abcstaff.title[v].replace(/\\\\n/g, \"\\n\");\n\t\t\tvoice.headerPosition = 6 + staffgroup.getTextSize.baselineToCenter(voice.header, \"voicefont\", 'staff-extra voice-name', v, abcstaff.voices.length) / spacing.STEP;\n\t\t}\n\t\tif (abcstaff.clef && abcstaff.clef.type === \"perc\")\n\t\t\tvoice.isPercussion = true;\n\t\tvar clef = (!this.initialClef || l === 0) && createClef(abcstaff.clef, this.tuneNumber);\n\t\tif (clef) {\n\t\t\tif (v === 0 && abcstaff.barNumber) {\n\t\t\t\tthis.addMeasureNumber(abcstaff.barNumber, clef);\n\t\t\t}\n\t\t\tvoice.addChild(clef);\n\t\t\tthis.startlimitelem = clef; // limit ties here\n\t\t}\n\t\tvar keySig = createKeySignature(abcstaff.key, this.tuneNumber);\n\t\tif (keySig) {\n\t\t\tvoice.addChild(keySig);\n\t\t\tthis.startlimitelem = keySig; // limit ties here\n\t\t}\n\t\tif (abcstaff.meter) {\n\t\t\tif (abcstaff.meter.type === 'specified') {\n\t\t\t\tthis.measureLength = abcstaff.meter.value[0].num / abcstaff.meter.value[0].den;\n\t\t\t} else\n\t\t\t\tthis.measureLength = 1;\n\t\t\tvar ts = createTimeSignature(abcstaff.meter, this.tuneNumber);\n\t\t\tvoice.addChild(ts);\n\t\t\tthis.startlimitelem = ts; // limit ties here\n\t\t}\n\t\tif (voice.duplicate)\n\t\t\tvoice.children = []; // we shouldn't reprint the above if we're reusing the same staff. We just created them to get the right spacing.\n\t\tvar staffLines = abcstaff.clef.stafflines || abcstaff.clef.stafflines === 0 ? abcstaff.clef.stafflines : 5;\n\t\tstaffgroup.addVoice(voice, s, staffLines);\n\t\tvar isSingleLineStaff = staffLines === 1;\n\t\tthis.createABCVoice(abcstaff.voices[v], tempo, s, v, isSingleLineStaff, voice);\n\t\tstaffgroup.setStaffLimits(voice);\n\t\tif (v === 0) {\n\t\t\t// only do brace and bracket processing on the first voice, otherwise it would be done twice.\n\t\t\tif (abcstaff.brace === \"start\" || (!staffgroup.brace && abcstaff.brace)) {\n\t\t\t\tif (!staffgroup.brace)\n\t\t\t\t\tstaffgroup.brace = [];\n\t\t\t\tstaffgroup.brace.push(new BraceElem(voice, \"brace\"));\n\t\t\t} else if (abcstaff.brace === \"end\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.brace === \"continue\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].continuing(voice);\n\t\t\t}\n\t\t\tif (abcstaff.bracket === \"start\" || (!staffgroup.bracket && abcstaff.bracket)) {\n\t\t\t\tif (!staffgroup.bracket)\n\t\t\t\t\tstaffgroup.bracket = [];\n\t\t\t\tstaffgroup.bracket.push(new BraceElem(voice, \"bracket\"));\n\t\t\t} else if (abcstaff.bracket === \"end\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.bracket === \"continue\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].continuing(voice);\n\t\t\t}\n\t\t}\n\t}\n};\n\nfunction getBeamGroup(abcline, pos) {\n\t// If there are notes beamed together, they are handled as a group, so find all of them here.\n\tvar elem = abcline[pos];\n\tif (elem.el_type !== 'note' || !elem.startBeam || elem.endBeam)\n\t\treturn { count: 1, elem: elem };\n\n\tvar group = [];\n\twhile (pos < abcline.length && abcline[pos].el_type === 'note') {\n\t\tgroup.push(abcline[pos]);\n\t\tif (abcline[pos].endBeam)\n\t\t\tbreak;\n\t\tpos++;\n\t}\n\treturn { count: group.length, elem: group };\n}\n\nAbstractEngraver.prototype.createABCVoice = function (abcline, tempo, s, v, isSingleLineStaff, voice) {\n\tthis.popCrossLineElems(s, v);\n\tthis.stemdir = (this.isBagpipes) ? \"down\" : null;\n\tthis.abcline = abcline;\n\tif (this.partstartelem) {\n\t\tthis.partstartelem = new EndingElem(\"\", null, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tfor (var slur in this.slurs) {\n\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t// this is already a slur element, but it was created for the last line, so recreate it.\n\t\t\tthis.slurs[slur] = new TieElem({ force: this.slurs[slur].force, voiceNumber: voiceNumber, stemDir: this.slurs[slur].stemDir, style: this.slurs[slur].dotted });\n\t\t\tif (hint) this.slurs[slur].setHint();\n\t\t\tvoice.addOther(this.slurs[slur]);\n\t\t}\n\t}\n\tfor (var i = 0; i < this.ties.length; i++) {\n\t\t// this is already a tie element, but it was created for the last line, so recreate it.\n\t\tthis.ties[i] = new TieElem({ force: this.ties[i].force, stemDir: this.ties[i].stemDir, voiceNumber: voiceNumber, style: this.ties[i].dotted });\n\t\tif (hint) this.ties[i].setHint();\n\t\tvoice.addOther(this.ties[i]);\n\t}\n\n\tfor (var j = 0; j < this.abcline.length; j++) {\n\t\tsetAveragePitch(this.abcline[j]);\n\t\tthis.minY = Math.min(this.abcline[j].minpitch, this.minY);\n\t}\n\n\tvar isFirstStaff = (s === 0);\n\tvar pos = 0;\n\twhile (pos < this.abcline.length) {\n\t\tvar ret = getBeamGroup(this.abcline, pos);\n\t\tvar abselems = this.createABCElement(isFirstStaff, isSingleLineStaff, voice, ret.elem);\n\t\tif (abselems) {\n\t\t\tfor (i = 0; i < abselems.length; i++) {\n\t\t\t\tif (!this.tempoSet && tempo && !tempo.suppress) {\n\t\t\t\t\tthis.tempoSet = true;\n\t\t\t\t\tvar tempoElement = new AbsoluteElement(tempo, 0, 0, \"tempo\", this.tuneNumber, {});\n\t\t\t\t\ttempoElement.addFixedX(new TempoElement(tempo, this.tuneNumber, createNoteHead));\n\t\t\t\t\tvoice.addChild(tempoElement);\n\t\t\t\t}\n\t\t\t\tvoice.addChild(abselems[i]);\n\t\t\t}\n\t\t}\n\t\tpos += ret.count;\n\t}\n\tthis.pushCrossLineElems(s, v);\n};\n\nAbstractEngraver.prototype.saveState = function () {\n\tthis.tiesSave = parseCommon.cloneArray(this.ties);\n\tthis.slursSave = parseCommon.cloneHashOfHash(this.slurs);\n\tthis.slursbyvoiceSave = parseCommon.cloneHashOfHash(this.slursbyvoice);\n\tthis.tiesbyvoiceSave = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoice);\n};\n\nAbstractEngraver.prototype.restoreState = function () {\n\tthis.ties = parseCommon.cloneArray(this.tiesSave);\n\tthis.slurs = parseCommon.cloneHashOfHash(this.slursSave);\n\tthis.slursbyvoice = parseCommon.cloneHashOfHash(this.slursbyvoiceSave);\n\tthis.tiesbyvoice = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoiceSave);\n};\n\n// function writeMeasureWidth(voice) {\n// \tvar width = 0;\n// \tfor (var i = voice.children.length-1; i >= 0; i--) {\n// \t\tvar elem = voice.children[i];\n// \t\tif (elem.abcelem.el_type === 'bar')\n// \t\t\tbreak;\n// \t\twidth += elem.w;\n// \t}\n// \treturn new RelativeElement(width.toFixed(2), -70, 0, undefined, {type:\"debug\"});\n// }\n\n// return an array of AbsoluteElement\nAbstractEngraver.prototype.createABCElement = function (isFirstStaff, isSingleLineStaff, voice, elem) {\n\tvar elemset = [];\n\tswitch (elem.el_type) {\n\t\tcase undefined:\n\t\t\t// it is undefined if we were passed an array in - an array means a set of notes that should be beamed together.\n\t\t\telemset = this.createBeam(isSingleLineStaff, voice, elem);\n\t\t\tbreak;\n\t\tcase \"note\":\n\t\t\telemset[0] = this.createNote(elem, false, isSingleLineStaff, voice);\n\t\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\t\tvoice.addOther(this.triplet);\n\t\t\t\tthis.triplet = null;\n\t\t\t\tthis.tripletmultiplier = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\telemset[0] = this.createBarLine(voice, elem, isFirstStaff);\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\t//\t  elemset[0].addChild(writeMeasureWidth(voice));\n\t\t\tbreak;\n\t\tcase \"meter\":\n\t\t\telemset[0] = createTimeSignature(elem, this.tuneNumber);\n\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"clef\":\n\t\t\telemset[0] = createClef(elem, this.tuneNumber);\n\t\t\tif (!elemset[0]) return null;\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"key\":\n\t\t\tvar absKey = createKeySignature(elem, this.tuneNumber);\n\t\t\tif (absKey) {\n\t\t\t\telemset[0] = absKey;\n\t\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\t}\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"stem\":\n\t\t\tthis.stemdir = elem.direction === \"auto\" ? undefined : elem.direction;\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tvar abselem = new AbsoluteElement(elem, 0, 0, 'part', this.tuneNumber);\n\t\t\tvar dim = this.getTextSize.calc(elem.title, 'partsfont', \"part\");\n\t\t\tabselem.addFixedX(new RelativeElement(elem.title, 0, 0, undefined, { type: \"part\", height: dim.height / spacing.STEP }));\n\t\t\telemset[0] = abselem;\n\t\t\tbreak;\n\t\tcase \"tempo\":\n\t\t\tvar abselem3 = new AbsoluteElement(elem, 0, 0, 'tempo', this.tuneNumber);\n\t\t\tabselem3.addFixedX(new TempoElement(elem, this.tuneNumber, createNoteHead));\n\t\t\telemset[0] = abselem3;\n\t\t\tbreak;\n\t\tcase \"style\":\n\t\t\tif (elem.head === \"normal\")\n\t\t\t\tdelete this.style;\n\t\t\telse\n\t\t\t\tthis.style = elem.head;\n\t\t\tbreak;\n\t\tcase \"hint\":\n\t\t\thint = true;\n\t\t\tthis.saveState();\n\t\t\tbreak;\n\t\tcase \"midi\":\n\t\t\t// This has no effect on the visible music, so just skip it.\n\t\t\tbreak;\n\t\tcase \"scale\":\n\t\t\tthis.voiceScale = elem.size;\n\t\t\tbreak;\n\t\tcase \"color\":\n\t\t\tthis.voiceColor = elem.color;\n\t\t\tvoice.color = this.voiceColor;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tvar abselem2 = new AbsoluteElement(elem, 0, 0, 'unsupported', this.tuneNumber);\n\t\t\tabselem2.addFixed(new RelativeElement(\"element type \" + elem.el_type, 0, 0, undefined, { type: \"debug\" }));\n\t\t\telemset[0] = abselem2;\n\t}\n\n\treturn elemset;\n};\n\nfunction setAveragePitch(elem) {\n\tif (elem.pitches) {\n\t\tsortPitch(elem);\n\t\tvar sum = 0;\n\t\tfor (var p = 0; p < elem.pitches.length; p++) {\n\t\t\tsum += elem.pitches[p].verticalPos;\n\t\t}\n\t\telem.averagepitch = sum / elem.pitches.length;\n\t\telem.minpitch = elem.pitches[0].verticalPos;\n\t\telem.maxpitch = elem.pitches[elem.pitches.length - 1].verticalPos;\n\t}\n}\n\nAbstractEngraver.prototype.createBeam = function (isSingleLineStaff, voice, elems) {\n\tvar abselemset = [];\n\n\tvar beamelem = new BeamElem(this.stemHeight * this.voiceScale, this.stemdir, this.flatBeams, elems[0]);\n\tif (hint) beamelem.setHint();\n\tfor (var i = 0; i < elems.length; i++) {\n\t\t// Do a first pass to figure out the stem direction before creating the notes, so that staccatos and other decorations can be placed correctly.\n\t\tbeamelem.runningDirection(elems[i])\n\t}\n\tbeamelem.setStemDirection()\n\tvar tempStemDir = this.stemdir\n\tthis.stemdir = beamelem.stemsUp ? 'up' : 'down'\n\tfor (i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tvar abselem = this.createNote(elem, true, isSingleLineStaff, voice);\n\t\tabselemset.push(abselem);\n\t\tbeamelem.add(abselem);\n\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\tvoice.addOther(this.triplet);\n\t\t\tthis.triplet = null;\n\t\t\tthis.tripletmultiplier = 1;\n\t\t}\n\t}\n\tbeamelem.calcDir();\n\tvoice.addBeam(beamelem);\n\tthis.stemdir = tempStemDir\n\treturn abselemset;\n};\n\nvar sortPitch = function (elem) {\n\tvar sorted;\n\tdo {\n\t\tsorted = true;\n\t\tfor (var p = 0; p < elem.pitches.length - 1; p++) {\n\t\t\tif (elem.pitches[p].pitch > elem.pitches[p + 1].pitch) {\n\t\t\t\tsorted = false;\n\t\t\t\tvar tmp = elem.pitches[p];\n\t\t\t\telem.pitches[p] = elem.pitches[p + 1];\n\t\t\t\telem.pitches[p + 1] = tmp;\n\t\t\t}\n\t\t}\n\t} while (!sorted);\n};\n\nvar ledgerLines = function (abselem, minPitch, maxPitch, isRest, symbolWidth, additionalLedgers, dir, dx, scale) {\n\tfor (var i = maxPitch; i > 11; i--) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = minPitch; i < 1; i++) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = 0; i < additionalLedgers.length; i++) { // PER: draw additional ledgers\n\t\tvar ofs = symbolWidth;\n\t\tif (dir === 'down') ofs = -ofs;\n\t\tabselem.addFixed(new RelativeElement(null, ofs + dx, (symbolWidth + 4) * scale, additionalLedgers[i], { type: \"ledger\" }));\n\t}\n};\n\nAbstractEngraver.prototype.addGraceNotes = function (elem, voice, abselem, notehead, stemHeight, isBagpipes, roomtaken) {\n\tvar gracescale = 3 / 5;\n\tvar graceScaleStem = 3.5 / 5; // TODO-PER: empirically found constant.\n\tstemHeight = Math.round(stemHeight * graceScaleStem);\n\tvar gracebeam = null;\n\tvar flag;\n\n\tif (elem.gracenotes.length > 1) {\n\t\tgracebeam = new BeamElem(stemHeight, \"grace\", isBagpipes);\n\t\tif (hint) gracebeam.setHint();\n\t\tgracebeam.mainNote = abselem;\t// this gives us a reference back to the note this is attached to so that the stems can be attached somewhere.\n\t}\n\n\tvar i;\n\tvar graceoffsets = [];\n\tfor (i = elem.gracenotes.length - 1; i >= 0; i--) { // figure out where to place each gracenote\n\t\troomtaken += 10;\n\t\tgraceoffsets[i] = roomtaken;\n\t\tif (elem.gracenotes[i].accidental) {\n\t\t\troomtaken += 7;\n\t\t}\n\t}\n\n\tfor (i = 0; i < elem.gracenotes.length; i++) {\n\t\tvar gracepitch = elem.gracenotes[i].verticalPos;\n\n\t\tflag = (gracebeam) ? null : chartable.uflags[(isBagpipes) ? 5 : 3];\n\t\tvar accidentalSlot = [];\n\t\tvar ret = createNoteHead(abselem, \"noteheads.quarter\", elem.gracenotes[i],\n\t\t\t{ dir: \"up\", headx: -graceoffsets[i], extrax: -graceoffsets[i], flag: flag, scale: gracescale * this.voiceScale, accidentalSlot: accidentalSlot });\n\t\tret.notehead.highestVert = ret.notehead.pitch + stemHeight;\n\t\tvar grace = ret.notehead;\n\t\tthis.addSlursAndTies(abselem, elem.gracenotes[i], grace, voice, \"up\", true);\n\n\t\tabselem.addExtra(grace);\n\t\t// PER: added acciaccatura slash\n\t\tif (elem.gracenotes[i].acciaccatura) {\n\t\t\tvar pos = elem.gracenotes[i].verticalPos + 7 * gracescale;        // the same formula that determines the flag position.\n\t\t\tvar dAcciaccatura = gracebeam ? 5 : 6;        // just an offset to make it line up correctly.\n\t\t\tabselem.addRight(new RelativeElement(\"flags.ugrace\", -graceoffsets[i] + dAcciaccatura, 0, pos, { scalex: gracescale, scaley: gracescale }));\n\t\t}\n\t\tif (gracebeam) { // give the beam the necessary info\n\t\t\tvar graceDuration = elem.gracenotes[i].duration / 2;\n\t\t\tif (isBagpipes) graceDuration /= 2;\n\t\t\tvar pseudoabselem = {\n\t\t\t\theads: [grace],\n\t\t\t\tabcelem: { averagepitch: gracepitch, minpitch: gracepitch, maxpitch: gracepitch, duration: graceDuration }\n\t\t\t};\n\t\t\tgracebeam.add(pseudoabselem);\n\t\t} else { // draw the stem\n\t\t\tvar p1 = gracepitch + 1 / 3 * gracescale;\n\t\t\tvar p2 = gracepitch + 7 * gracescale;\n\t\t\tvar dx = grace.dx + grace.w;\n\t\t\tvar width = -0.6;\n\t\t\tabselem.addExtra(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width }));\n\t\t}\n\t\tledgerLines(abselem, gracepitch, gracepitch, false, glyphs.getSymbolWidth(\"noteheads.quarter\"), [], true, grace.dx - 1, 0.6);\n\n\t\t// if this is the first grace note, we might want to start a slur.\n\t\t// there is a slur if graceSlurs is specifically set.\n\t\t// there is no slur if it is bagpipes.\n\t\t// there is not a slur if the element is a spacer or invisible rest.\n\t\tvar isInvisibleRest = elem.rest && (elem.rest.type === \"spacer\" || elem.rest.type === \"invisible\");\n\t\tif (i === 0 && !isBagpipes && this.graceSlurs && !isInvisibleRest) {\n\t\t\t// This is the overall slur that is under the grace notes.\n\t\t\tvoice.addOther(new TieElem({ anchor1: grace, anchor2: notehead, isGrace: true }));\n\t\t}\n\t}\n\n\tif (gracebeam) {\n\t\tgracebeam.calcDir();\n\t\tvoice.addBeam(gracebeam);\n\t}\n\treturn roomtaken;\n};\n\nfunction addRestToAbsElement(abselem, elem, duration, dot, isMultiVoice, stemdir, isSingleLineStaff, durlog, voiceScale) {\n\tvar c;\n\tvar restpitch = 7;\n\tvar noteHead;\n\tvar roomTaken;\n\tvar roomTakenRight;\n\n\tif (isMultiVoice) {\n\t\tif (stemdir === \"down\") restpitch = 3;\n\t\tif (stemdir === \"up\") restpitch = 11;\n\t}\n\t// There is special placement for the percussion staff. If there is one staff line, then move the rest position.\n\tif (isSingleLineStaff) {\n\t\t// The half and whole rests are attached to different lines normally, so we need to tweak their position to get them to both be attached to the same one.\n\t\tif (duration < 0.5)\n\t\t\trestpitch = 7;\n\t\telse if (duration < 1)\n\t\t\trestpitch = 7;\t// half rest\n\t\telse\n\t\t\trestpitch = 5; // whole rest\n\t}\n\tswitch (elem.rest.type) {\n\t\tcase \"whole\":\n\t\t\tc = chartable.rest[0];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tbreak;\n\t\tcase \"rest\":\n\t\t\tif (elem.style === \"rhythm\") // special case for rhythm: rests are a handy way to express the rhythm.\n\t\t\t\tc = chartable.rhythm[-durlog];\n\t\t\telse\n\t\t\t\tc = chartable.rest[-durlog];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"invisible\":\n\t\tcase \"invisible-multimeasure\":\n\t\tcase \"spacer\":\n\t\t\tc = \"\";\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"multimeasure\":\n\t\t\tc = chartable.rest['multi'];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tvar mmWidth = glyphs.getSymbolWidth(c);\n\t\t\tabselem.addHead(new RelativeElement(c, mmWidth, mmWidth * 2, 7));\n\t\t\tvar numMeasures = new RelativeElement(\"\" + elem.rest.text, mmWidth, mmWidth, 16, { type: \"multimeasure-text\" });\n\t\t\tabselem.addExtra(numMeasures);\n\t}\n\tif (elem.rest.type.indexOf(\"multimeasure\") < 0 && elem.rest.type !== \"invisible\") {\n\t\tvar ret = createNoteHead(abselem, c, { verticalPos: restpitch },\n\t\t\t{ dot: dot, scale: voiceScale });\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tabselem.addHead(noteHead);\n\t\t\troomTaken = ret.accidentalshiftx;\n\t\t\troomTakenRight = ret.dotshiftx;\n\t\t}\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\n\nfunction addIfNotExist(arr, item) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (JSON.stringify(arr[i]) === JSON.stringify(item))\n\t\t\treturn;\n\t}\n\tarr.push(item);\n}\n\nAbstractEngraver.prototype.addNoteToAbcElement = function (abselem, elem, dot, stemdir, style, zeroDuration, durlog, nostem, voice) {\n\tvar dotshiftx = 0; // room taken by chords with displaced noteheads which cause dots to shift\n\tvar noteHead;\n\tvar roomTaken = 0;\n\tvar roomTakenRight = 0;\n\tvar min;\n\tvar i;\n\tvar additionalLedgers = [];\n\t// The accidentalSlot will hold a list of all the accidentals on this chord. Each element is a vertical place,\n\t// and contains a pitch, which is the last pitch that contains an accidental in that slot. The slots are numbered\n\t// from closest to the note to farther left. We only need to know the last accidental we placed because\n\t// we know that the pitches are sorted by now.\n\tvar accidentalSlot = [];\n\tvar symbolWidth = 0;\n\n\tvar dir = (elem.averagepitch >= 6) ? \"down\" : \"up\";\n\tif (stemdir) dir = stemdir;\n\n\tstyle = elem.style ? elem.style : style; // get the style of note head.\n\tif (!style || style === \"normal\") style = \"note\";\n\tvar noteSymbol;\n\tif (zeroDuration)\n\t\tnoteSymbol = chartable[style].nostem;\n\telse\n\t\tnoteSymbol = chartable[style][-durlog];\n\tif (!noteSymbol)\n\t\tconsole.log(\"noteSymbol:\", style, durlog, zeroDuration);\n\n\t// determine elements of chords which should be shifted\n\tvar p;\n\tfor (p = (dir === \"down\") ? elem.pitches.length - 2 : 1; (dir === \"down\") ? p >= 0 : p < elem.pitches.length; p = (dir === \"down\") ? p - 1 : p + 1) {\n\t\tvar prev = elem.pitches[(dir === \"down\") ? p + 1 : p - 1];\n\t\tvar curr = elem.pitches[p];\n\t\tvar delta = (dir === \"down\") ? prev.pitch - curr.pitch : curr.pitch - prev.pitch;\n\t\tif (delta <= 1 && !prev.printer_shift) {\n\t\t\tcurr.printer_shift = (delta) ? \"different\" : \"same\";\n\t\t\tif (curr.verticalPos > 11 || curr.verticalPos < 1) {        // PER: add extra ledger line\n\t\t\t\tadditionalLedgers.push(curr.verticalPos - (curr.verticalPos % 2));\n\t\t\t}\n\t\t\tif (dir === \"down\") {\n\t\t\t\troomTaken = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t} else {\n\t\t\t\tdotshiftx = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar pp = elem.pitches.length;\n\tfor (p = 0; p < elem.pitches.length; p++) {\n\n\t\tif (!nostem) {\n\t\t\tvar flag;\n\t\t\tif ((dir === \"down\" && p !== 0) || (dir === \"up\" && p !== pp - 1)) { // not the stemmed elem of the chord\n\t\t\t\tflag = null;\n\t\t\t} else {\n\t\t\t\tflag = chartable[(dir === \"down\") ? \"dflags\" : \"uflags\"][-durlog];\n\t\t\t}\n\t\t}\n\t\tvar c;\n\t\tif (elem.pitches[p].style) { // There is a style for the whole group of pitches, but there could also be an override for a particular pitch.\n\t\t\tc = chartable[elem.pitches[p].style][-durlog];\n\t\t} else if (voice.isPercussion && this.percmap) {\n\t\t\tc = noteSymbol;\n\t\t\tvar percHead = this.percmap[pitchesToPerc(elem.pitches[p])];\n\t\t\tif (percHead && percHead.noteHead) {\n\t\t\t\tif (chartable[percHead.noteHead])\n\t\t\t\t\tc = chartable[percHead.noteHead][-durlog];\n\t\t\t}\n\t\t} else\n\t\t\tc = noteSymbol;\n\t\t// The highest position for the sake of placing slurs is itself if the slur is internal. It is the highest position possible if the slur is for the whole chord.\n\t\t// If the note is the only one in the chord, then any slur it has counts as if it were on the whole chord.\n\t\telem.pitches[p].highestVert = elem.pitches[p].verticalPos;\n\t\tvar isTopWhenStemIsDown = (stemdir === \"up\" || dir === \"up\") && p === 0;\n\t\tvar isBottomWhenStemIsUp = (stemdir === \"down\" || dir === \"down\") && p === pp - 1;\n\t\tif (isTopWhenStemIsDown || isBottomWhenStemIsUp) { // place to put slurs if not already on pitches\n\n\t\t\tif (elem.startSlur || pp === 1) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6;        // If the stem is up, then compensate for the length of the stem\n\t\t\t}\n\t\t\tif (elem.startSlur) {\n\t\t\t\tif (!elem.pitches[p].startSlur) elem.pitches[p].startSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.startSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].startSlur, elem.startSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (elem.endSlur) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6;        // If the stem is up, then compensate for the length of the stem\n\t\t\t\tif (!elem.pitches[p].endSlur) elem.pitches[p].endSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.endSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].endSlur, elem.endSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar hasStem = !nostem && durlog <= -1;\n\t\tvar ret = createNoteHead(abselem, c, elem.pitches[p],\n\t\t\t{ dir: dir, extrax: -roomTaken, flag: flag, dot: dot, dotshiftx: dotshiftx, scale: this.voiceScale, accidentalSlot: accidentalSlot, shouldExtendStem: !stemdir, printAccidentals: !voice.isPercussion });\n\t\tsymbolWidth = Math.max(glyphs.getSymbolWidth(c), symbolWidth);\n\t\tabselem.extraw -= ret.extraLeft;\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tthis.addSlursAndTies(abselem, elem.pitches[p], noteHead, voice, hasStem ? dir : null, false);\n\n\t\t\tif (elem.gracenotes && elem.gracenotes.length > 0)\n\t\t\t\tnoteHead.bottom = noteHead.bottom - 1;\t // If there is a tie to the grace notes, leave a little more room for the note to avoid collisions.\n\t\t\tabselem.addHead(noteHead);\n\t\t}\n\t\troomTaken += ret.accidentalshiftx;\n\t\troomTakenRight = Math.max(roomTakenRight, ret.dotshiftx);\n\t}\n\n\t// draw stem from the furthest note to a pitch above/below the stemmed note\n\tif (hasStem) {\n\t\tvar stemHeight = Math.round(70 * this.voiceScale) / 10;\n\t\tvar p1 = (dir === \"down\") ? elem.minpitch - stemHeight : elem.minpitch + 1 / 3;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p1 > 6 && !stemdir) p1 = 6;\n\t\tvar p2 = (dir === \"down\") ? elem.maxpitch - 1 / 3 : elem.maxpitch + stemHeight;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p2 < 6 && !stemdir) p2 = 6;\n\t\tvar dx = (dir === \"down\" || abselem.heads.length === 0) ? 0 : abselem.heads[0].w;\n\t\tvar width = (dir === \"down\") ? 1 : -1;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (noteHead && noteHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 1;\n\t\t\telse\n\t\t\t\tp1 += 1;\n\t\t}\n\t\tif (noteHead && noteHead.c === 'noteheads.triangle.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 0.7;\n\t\t\telse\n\t\t\t\tp1 -= 1.2;\n\t\t}\n\t\tabselem.addRight(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width, bottom: p1 - 1 }));\n\t\t//var RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\t\tmin = Math.min(p1, p2);\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight, min: min, additionalLedgers: additionalLedgers, dir: dir, symbolWidth: symbolWidth };\n};\n\nAbstractEngraver.prototype.addLyric = function (abselem, elem) {\n\tvar lyricStr = \"\";\n\telem.lyric.forEach(function (ly) {\n\t\tvar div = ly.divider === ' ' ? \"\" : ly.divider;\n\t\tlyricStr += ly.syllable + div + \"\\n\";\n\t});\n\tvar lyricDim = this.getTextSize.calc(lyricStr, 'vocalfont', \"lyric\");\n\tvar position = elem.positioning ? elem.positioning.vocalPosition : 'below';\n\tabselem.addCentered(new RelativeElement(lyricStr, 0, lyricDim.width, undefined, { type: \"lyric\", position: position, height: lyricDim.height / spacing.STEP, dim: this.getTextSize.attr('vocalfont', \"lyric\") }));\n};\n\nAbstractEngraver.prototype.createNote = function (elem, nostem, isSingleLineStaff, voice) { //stem presence: true for drawing stemless notehead\n\tvar notehead = null;\n\tvar roomtaken = 0; // room needed to the left of the note\n\tvar roomtakenright = 0; // room needed to the right of the note\n\tvar symbolWidth = 0;\n\tvar additionalLedgers = []; // PER: handle the case of [bc'], where the b doesn't have a ledger line\n\n\tvar dir;\n\n\tvar duration = getDuration(elem);\n\tvar zeroDuration = false;\n\tif (duration === 0) { zeroDuration = true; duration = 0.25; nostem = true; }        //PER: zero duration will draw a quarter note head.\n\tvar durlog = Math.floor(Math.log(duration) / Math.log(2)); //TODO use getDurlog\n\tvar dot = 0;\n\n\tfor (var tot = Math.pow(2, durlog), inc = tot / 2; tot < duration; dot++, tot += inc, inc /= 2);\n\n\n\tif (elem.startTriplet) {\n\t\tthis.tripletmultiplier = elem.tripletMultiplier;\n\t}\n\n\tvar durationForSpacing = duration * this.tripletmultiplier;\n\tif (elem.rest && elem.rest.type === 'multimeasure')\n\t\tdurationForSpacing = 1;\n\tif (elem.rest && elem.rest.type === 'invisible-multimeasure')\n\t\tdurationForSpacing = this.measureLength * elem.rest.text;\n\tvar absType = elem.rest ? \"rest\" : \"note\";\n\tvar abselem = new AbsoluteElement(elem, durationForSpacing, 1, absType, this.tuneNumber, { durationClassOveride: elem.duration * this.tripletmultiplier });\n\tif (hint) abselem.setHint();\n\n\tif (elem.rest) {\n\t\tif (this.measureLength === duration && elem.rest.type !== 'invisible' && elem.rest.type !== 'spacer' && elem.rest.type.indexOf('multimeasure') < 0)\n\t\t\telem.rest.type = 'whole'; // If the rest is exactly a measure, always use a whole rest\n\t\tvar ret1 = addRestToAbsElement(abselem, elem, duration, dot, voice.voicetotal > 1, this.stemdir, isSingleLineStaff, durlog, this.voiceScale);\n\t\tnotehead = ret1.noteHead;\n\t\troomtaken = ret1.roomTaken;\n\t\troomtakenright = ret1.roomTakenRight;\n\t} else {\n\t\tvar ret2 = this.addNoteToAbcElement(abselem, elem, dot, this.stemdir, this.style, zeroDuration, durlog, nostem, voice);\n\t\tif (ret2.min !== undefined)\n\t\t\tthis.minY = Math.min(ret2.min, this.minY);\n\t\tnotehead = ret2.noteHead;\n\t\troomtaken = ret2.roomTaken;\n\t\troomtakenright = ret2.roomTakenRight;\n\t\tadditionalLedgers = ret2.additionalLedgers;\n\t\tdir = ret2.dir;\n\t\tsymbolWidth = ret2.symbolWidth;\n\t}\n\n\tif (elem.lyric !== undefined) {\n\t\tthis.addLyric(abselem, elem);\n\t}\n\n\tif (elem.gracenotes !== undefined) {\n\t\troomtaken += this.addGraceNotes(elem, voice, abselem, notehead, this.stemHeight * this.voiceScale, this.isBagpipes, roomtaken);\n\t}\n\n\tif (elem.decoration) {\n\t\t// TODO-PER: nostem is true if this is beamed. In that case we don't know where to place the decoration yet so just make a guess. This should be refactored to not place decorations until after the beams are determined.\n\t\t// This should probably be combined with moveDecorations()\n\t\tvar bottom = nostem && dir !== 'up' ? Math.min(-3, abselem.bottom - 6) : abselem.bottom\n\t\tthis.decoration.createDecoration(voice, elem.decoration, abselem.top, (notehead) ? notehead.w : 0, abselem, roomtaken, dir, bottom, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (elem.barNumber) {\n\t\tabselem.addFixed(new RelativeElement(elem.barNumber, -10, 0, 0, { type: \"barNumber\" }));\n\t}\n\n\t// ledger lines\n\tledgerLines(abselem, elem.minpitch, elem.maxpitch, elem.rest, symbolWidth, additionalLedgers, dir, -2, 1);\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, roomtaken, roomtakenright, symbolWidth, this.jazzchords, this.germanAlphabet);\n\t\troomtaken = ret3.roomTaken;\n\t\troomtakenright = ret3.roomTakenRight;\n\t}\n\n\tif (elem.startTriplet) {\n\t\tthis.triplet = new TripletElem(elem.startTriplet, notehead, { flatBeams: this.flatBeams }); // above is opposite from case of slurs\n\t}\n\n\tif (elem.endTriplet && this.triplet) {\n\t\tthis.triplet.setCloseAnchor(notehead);\n\t}\n\n\tif (this.triplet && !elem.startTriplet && !elem.endTriplet && !(elem.rest && elem.rest.type === \"spacer\")) {\n\t\tthis.triplet.middleNote(notehead);\n\t}\n\n\treturn abselem;\n};\n\nAbstractEngraver.prototype.addSlursAndTies = function (abselem, pitchelem, notehead, voice, dir, isGrace) {\n\tif (pitchelem.endTie) {\n\t\tif (this.ties.length > 0) {\n\t\t\t// If there are multiple open ties, find the one that applies by matching the pitch, if possible.\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < this.ties.length; j++) {\n\t\t\t\tif (this.ties[j].anchor1 && this.ties[j].anchor1.pitch === notehead.pitch) {\n\t\t\t\t\tthis.ties[j].setEndAnchor(notehead);\n\t\t\t\t\tvoice.setRange(this.ties[j])\n\t\t\t\t\tthis.ties.splice(j, 1);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tthis.ties[0].setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(this.ties[0])\n\t\t\t\tthis.ties.splice(0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tif (pitchelem.startTie) {\n\t\tvar tie = new TieElem({ anchor1: notehead, force: (this.stemdir === \"down\" || this.stemdir === \"up\"), stemDir: this.stemdir, isGrace: isGrace, voiceNumber: voiceNumber, style: pitchelem.startTie.style });\n\t\tif (hint) tie.setHint();\n\n\t\tthis.ties[this.ties.length] = tie;\n\t\tvoice.addOther(tie);\n\t\t// HACK-PER: For the animation, we need to know if a note is tied to the next one, so here's a flag.\n\t\t// Unfortunately, only some of the notes in the current event might be tied, but this will consider it\n\t\t// tied if any one of them is. That will work for most cases.\n\t\tabselem.startTie = true;\n\t}\n\n\tvar slur;\n\tvar slurid;\n\tif (pitchelem.endSlur) {\n\t\tfor (var i = 0; i < pitchelem.endSlur.length; i++) {\n\t\t\tslurid = pitchelem.endSlur[i];\n\t\t\tif (this.slurs[slurid]) {\n\t\t\t\tslur = this.slurs[slurid];\n\t\t\t\tslur.setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(slur)\n\t\t\t\tdelete this.slurs[slurid];\n\t\t\t} else {\n\t\t\t\tslur = new TieElem({ anchor2: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber });\n\t\t\t\tif (hint) slur.setHint();\n\t\t\t\tvoice.addOther(slur);\n\t\t\t}\n\t\t\tif (this.startlimitelem) {\n\t\t\t\tslur.setStartX(this.startlimitelem);\n\t\t\t}\n\t\t}\n\t} else if (!isGrace) {\n\t\tfor (var s in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(s)) {\n\t\t\t\tthis.slurs[s].addInternalNote(notehead);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pitchelem.startSlur) {\n\t\tfor (i = 0; i < pitchelem.startSlur.length; i++) {\n\t\t\tslurid = pitchelem.startSlur[i].label;\n\t\t\tslur = new TieElem({ anchor1: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber, style: pitchelem.startSlur[i].style });\n\t\t\tif (hint) slur.setHint();\n\t\t\tthis.slurs[slurid] = slur;\n\t\t\tvoice.addOther(slur);\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.addMeasureNumber = function (number, abselem) {\n\tvar measureNumDim = this.getTextSize.calc(number, \"measurefont\", 'bar-number');\n\tvar dx = 0;\n\tif (abselem.isClef) // If this is a clef rather than bar line, then the number shouldn't be centered because it could overlap the left side. This is an easy way to let it be centered but move it over, too.\n\t\tdx += measureNumDim.width / 2\n\t// MAE 1 Oct 2024 - Change 13 to 13.5 since previously bar numbers were very slightly overlapping the top of the clef\n\tvar vert = measureNumDim.width > 10 && abselem.abcelem.type === \"treble\" ? 13.5 : 11\n\tabselem.addFixed(new RelativeElement(number, dx, measureNumDim.width, vert + measureNumDim.height / spacing.STEP, { type: \"barNumber\", dim: this.getTextSize.attr(\"measurefont\", 'bar-number') }));\n};\n\nAbstractEngraver.prototype.createBarLine = function (voice, elem, isFirstStaff) {\n\t// bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'bar', this.tuneNumber);\n\tvar anchor = null; // place to attach part lines\n\tvar dx = 0;\n\n\tif (elem.barNumber) {\n\t\tthis.addMeasureNumber(elem.barNumber, abselem);\n\t}\n\n\n\tvar firstdots = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\tvar firstthin = (elem.type !== \"bar_left_repeat\" && elem.type !== \"bar_thick_thin\" && elem.type !== \"bar_invisible\");\n\tvar thick = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_left_repeat\" ||\n\t\telem.type === \"bar_thin_thick\" || elem.type === \"bar_thick_thin\");\n\tvar secondthin = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_thick_thin\" || elem.type === \"bar_thin_thin\" || elem.type === \"bar_dbl_repeat\");\n\tvar seconddots = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\");\n\n\t// limit positioning of slurs\n\tif (firstdots || seconddots) {\n\t\tfor (var slur in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t\tthis.slurs[slur].setEndX(abselem);\n\t\t\t}\n\t\t}\n\t\tthis.startlimitelem = abselem;\n\t}\n\n\tif (firstdots) {\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t\tdx += 6; //2 hardcoded, twice;\n\t}\n\n\tif (firstthin) {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.type === \"bar_invisible\") {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"none\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.decoration) {\n\t\tthis.decoration.createDecoration(voice, elem.decoration, 12, (thick) ? 3 : 1, abselem, 0, \"down\", 2, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (thick) {\n\t\tdx += 4; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 4, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 4 });\n\t\tabselem.addRight(anchor);\n\t\tdx += 5;\n\t}\n\n\t// if (this.partstartelem && (thick || (firstthin && secondthin))) { // means end of nth part\n\t// this.partstartelem.anchor2=anchor;\n\t// this.partstartelem = null;\n\t// }\n\n\tif (this.partstartelem && elem.endEnding) {\n\t\tthis.partstartelem.anchor2 = anchor;\n\t\tthis.partstartelem = null;\n\t}\n\n\tif (secondthin) {\n\t\tdx += 3; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor); // 3 is hardcoded\n\t}\n\n\tif (seconddots) {\n\t\tdx += 3; //3 hardcoded;\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t} // 2 is hardcoded\n\n\tif (elem.startEnding && isFirstStaff) { // only put the first & second ending marks on the first staff\n\t\tvar textWidth = this.getTextSize.calc(elem.startEnding, \"repeatfont\", '').width;\n\t\tabselem.minspacing += textWidth + 10; // Give plenty of room for the ending number.\n\t\tthis.partstartelem = new EndingElem(elem.startEnding, anchor, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\n\t// Add a little space to the left of the bar line so that nothing can crowd it.\n\tabselem.extraw -= 5;\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, 0, 0, 0, false, this.germanAlphabet);\n\t}\n\n\treturn abselem;\n\n};\n\nmodule.exports = AbstractEngraver;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/abstract-engraver.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/add-chord.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/add-chord.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nconst translateChord = __webpack_require__(/*! ./translate-chord */ \"./node_modules/abcjs/src/write/creation/translate-chord.js\");\n\nvar addChord = function (getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar pos = elem.chord[i].position;\n\t\tvar rel_position = elem.chord[i].rel_position;\n\t\tvar isAnnotation = pos === \"left\" || pos === \"right\" || pos === \"below\" || pos === \"above\" || !!rel_position\n\t\tvar font;\n\t\tvar klass;\n\t\tif (isAnnotation) {\n\t\t\tfont = 'annotationfont';\n\t\t\tklass = \"abcjs-annotation\";\n\t\t} else {\n\t\t\tfont = 'gchordfont';\n\t\t\tklass = \"abcjs-chord\";\n\t\t}\n\t\tvar attr = getTextSize.attr(font, klass);\n\n\t\tvar name = elem.chord[i].name\n\t\tvar ret;\n\t\t//console.log(\"chord\",name)\n\t\tif (typeof name === \"string\") {\n\t\t\tret = chordString(name, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\troomTaken = ret.roomTaken\n\t\t\troomTakenRight = ret.roomTakenRight\n\t\t} else {\n\t\t\tfor (var j = 0; j < name.length; j++) {\n\t\t\t\tret = chordString(name[j].text, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\t\troomTaken = ret.roomTaken\n\t\t\t\troomTakenRight = ret.roomTakenRight\n\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n};\n\nfunction chordString(chordString, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tvar chords = chordString.split(\"\\n\");\n\tfor (var j = chords.length - 1; j >= 0; j--) { // parse these in opposite order because we place them from bottom to top.\n\t\tvar chord = chords[j];\n\t\tvar x = 0;\n\t\tvar y;\n\t\tif (!isAnnotation)\n\t\t\tchord = translateChord(chord, jazzchords, germanAlphabet);\n\t\tvar dim = getTextSize.calc(chord, font, klass);\n\t\tvar chordWidth = dim.width;\n\t\tvar chordHeight = dim.height / spacing.STEP;\n\t\tswitch (pos) {\n\t\t\tcase \"left\":\n\t\t\t\troomTaken += chordWidth + 7;\n\t\t\t\tx = -roomTaken;        // TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addExtra(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"left\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\troomTakenRight += 4;\n\t\t\t\tx = roomTakenRight;// TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addRight(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"right\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"below\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"below\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"above\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (rel_position) {\n\t\t\t\t\tvar relPositionY = rel_position.y + 3 * spacing.STEP; // TODO-PER: this is a fudge factor to make it line up with abcm2ps\n\t\t\t\t\tabselem.addRight(new RelativeElement(chord, x + rel_position.x, 0, elem.minpitch + relPositionY / spacing.STEP, {\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\tdim: attr\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\t\tvar pos2 = 'above';\n\t\t\t\t\tif (elem.positioning && elem.positioning.chordPosition)\n\t\t\t\t\t\tpos2 = elem.positioning.chordPosition;\n\n\t\t\t\t\tif (pos2 !== 'hidden') {\n\t\t\t\t\t\tabselem.addCentered(new RelativeElement(chord, noteheadWidth / 2, chordWidth, undefined, {\n\t\t\t\t\t\t\ttype: \"chord\",\n\t\t\t\t\t\t\tposition: pos2,\n\t\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\t\tdim: attr,\n\t\t\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\nmodule.exports = addChord;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/add-chord.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/add-text-if.js":
/*!**************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/add-text-if.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function addTextIf(rows, params, getTextSize) {\n\tif (!params.text)\n\t\treturn;\n\tif (!params.marginLeft) params.marginLeft = 0;\n\tif (!params.klass) params.klass = '';\n\tif (!params.anchor) params.anchor = 'start';\n\tif (!params.info) params.info = { startChar: -2, endChar: -2 }\n\n\tif (params.marginTop)\n\t\trows.push({ move: params.marginTop });\n\tvar attr = { left: params.marginLeft, text: params.text, font: params.font, anchor: params.anchor, startChar: params.info.startChar, endChar: params.info.endChar, 'dominant-baseline': params['dominant-baseline'] };\n\tif (params.absElemType)\n\t\tattr.absElemType = params.absElemType;\n\tif (!params.inGroup && params.klass)\n\t\tattr.klass = params.klass;\n\tif (params.name)\n\t\tattr.name = params.name;\n\n\trows.push(attr);\n\t// If there are blank lines they won't be counted by getTextSize, so just get the height of one line and multiply\n\tvar size = getTextSize.calc(\"A\", params.font, params.klass);\n\tvar numLines = params.text.split(\"\\n\").length;\n\tif (params.text[params.text.length - 1] === '\\n')\n\t\tnumLines--; // If there is a new line at the end of the string, then an extra line will be counted.\n\tif (!params.noMove) {\n\t\tvar h = (size.height * 1.1) * numLines;\n\t\trows.push({ move: Math.round(h) });\n\t\tif (params.marginBottom)\n\t\t\trows.push({ move: params.marginBottom });\n\t}\n}\n\nmodule.exports = addTextIf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/add-text-if.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/calc-height.js":
/*!**************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/calc-height.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var calcHeight = function (staffGroup) {\n\t// the height is calculated here in a parallel way to the drawing below in hopes that both of these functions will be modified together.\n\t// TODO-PER: also add the space between staves. (That's systemStaffSeparation, which is the minimum distance between the staff LINES.)\n\tvar height = 0;\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar staff = staffGroup.voices[i].staff;\n\t\tif (!staffGroup.voices[i].duplicate) {\n\t\t\theight += staff.top;\n\t\t\t//if (staff.bottom < 0)\n\t\t\theight += -staff.bottom;\n\t\t}\n\t}\n\treturn height;\n};\n\nmodule.exports = calcHeight;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/calc-height.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/create-clef.js":
/*!**************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/create-clef.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_create_clef.js\n\nvar AbsoluteElement = __webpack_require__(/*! ./elements/absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nvar createClef = function (elem, tuneNumber) {\n\tvar clef;\n\tvar octave = 0;\n\telem.el_type = \"clef\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra clef', tuneNumber);\n\tabselem.isClef = true;\n\tswitch (elem.type) {\n\t\tcase \"treble\": clef = \"clefs.G\"; break;\n\t\tcase \"tenor\": clef = \"clefs.C\"; break;\n\t\tcase \"alto\": clef = \"clefs.C\"; break;\n\t\tcase \"bass\": clef = \"clefs.F\"; break;\n\t\tcase 'treble+8': clef = \"clefs.G\"; octave = 1; break;\n\t\tcase 'tenor+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'bass+8': clef = \"clefs.F\"; octave = 1; break;\n\t\tcase 'alto+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'treble-8': clef = \"clefs.G\"; octave = -1; break;\n\t\tcase 'tenor-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'bass-8': clef = \"clefs.F\"; octave = -1; break;\n\t\tcase 'alto-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'none': return null;\n\t\tcase 'perc': clef = \"clefs.perc\"; break;\n\t\tdefault: abselem.addFixed(new RelativeElement(\"clef=\" + elem.type, 0, 0, undefined, { type: \"debug\" }));\n\t}\n\t// if (elem.verticalPos) {\n\t// pitch = elem.verticalPos;\n\t// }\n\tvar dx = 5;\n\tif (clef) {\n\t\tvar height = glyphs.symbolHeightInPitches(clef);\n\t\tvar ofs = clefOffsets(clef);\n\t\tabselem.addRight(new RelativeElement(clef, dx, glyphs.getSymbolWidth(clef), elem.clefPos, { top: height + elem.clefPos + ofs, bottom: elem.clefPos + ofs }));\n\n\t\tif (octave !== 0) {\n\t\t\tvar scale = 2 / 3;\n\t\t\tvar adjustspacing = (glyphs.getSymbolWidth(clef) - glyphs.getSymbolWidth(\"8\") * scale) / 2;\n\t\t\tvar pitch = (octave > 0) ? abselem.top + 3 : abselem.bottom - 1;\n\t\t\tvar top = (octave > 0) ? abselem.top + 3 : abselem.bottom - 3;\n\t\t\tvar bottom = top - 2;\n\t\t\tif (elem.type === \"bass-8\") {\n\t\t\t\t// The placement for bass octave is a little different. It should hug the clef.\n\t\t\t\tpitch = 3;\n\t\t\t\tadjustspacing = 0;\n\t\t\t}\n\t\t\tabselem.addRight(new RelativeElement(\"8\", dx + adjustspacing, glyphs.getSymbolWidth(\"8\") * scale, pitch, {\n\t\t\t\tscalex: scale,\n\t\t\t\tscaley: scale,\n\t\t\t\ttop: top,\n\t\t\t\tbottom: bottom\n\t\t\t}));\n\t\t\t//abselem.top += 2;\n\t\t}\n\t}\n\treturn abselem;\n};\n\nfunction clefOffsets(clef) {\n\tswitch (clef) {\n\t\tcase \"clefs.G\": return -5;\n\t\tcase \"clefs.C\": return -4;\n\t\tcase \"clefs.F\": return -4;\n\t\tcase \"clefs.perc\": return -2;\n\t\tdefault: return 0;\n\t}\n}\n\nmodule.exports = createClef;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/create-clef.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/create-key-signature.js":
/*!***********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/create-key-signature.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_create_key_signature.js\n\nvar AbsoluteElement = __webpack_require__(/*! ./elements/absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nvar createKeySignature = function (elem, tuneNumber) {\n\telem.el_type = \"keySignature\";\n\tif (!elem.accidentals || elem.accidentals.length === 0)\n\t\treturn null;\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra key-signature', tuneNumber);\n\tabselem.isKeySig = true;\n\tvar dx = 0;\n\telem.accidentals.forEach(function (acc) {\n\t\tvar symbol;\n\t\tvar fudge = 0;\n\t\tswitch (acc.acc) {\n\t\t\tcase \"sharp\": symbol = \"accidentals.sharp\"; fudge = -3; break;\n\t\t\tcase \"natural\": symbol = \"accidentals.nat\"; break;\n\t\t\tcase \"flat\": symbol = \"accidentals.flat\"; fudge = -1.2; break;\n\t\t\tcase \"quartersharp\": symbol = \"accidentals.halfsharp\"; fudge = -2.5; break;\n\t\t\tcase \"quarterflat\": symbol = \"accidentals.halfflat\"; fudge = -1.2; break;\n\t\t\tdefault: symbol = \"accidentals.flat\";\n\t\t}\n\t\tabselem.addRight(new RelativeElement(symbol, dx, glyphs.getSymbolWidth(symbol), acc.verticalPos, { thickness: glyphs.symbolHeightInPitches(symbol), top: acc.verticalPos + glyphs.symbolHeightInPitches(symbol) + fudge, bottom: acc.verticalPos + fudge }));\n\t\tdx += glyphs.getSymbolWidth(symbol) + 2;\n\t}, this);\n\treturn abselem;\n};\n\nmodule.exports = createKeySignature;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/create-key-signature.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/create-note-head.js":
/*!*******************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/create-note-head.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nvar createNoteHead = function (abselem, c, pitchelem, options) {\n\tif (!options) options = {};\n\tvar dir = (options.dir !== undefined) ? options.dir : null;\n\tvar headx = (options.headx !== undefined) ? options.headx : 0;\n\tvar extrax = (options.extrax !== undefined) ? options.extrax : 0;\n\tvar flag = (options.flag !== undefined) ? options.flag : null;\n\tvar dot = (options.dot !== undefined) ? options.dot : 0;\n\tvar dotshiftx = (options.dotshiftx !== undefined) ? options.dotshiftx : 0;\n\tvar scale = (options.scale !== undefined) ? options.scale : 1;\n\tvar accidentalSlot = (options.accidentalSlot !== undefined) ? options.accidentalSlot : [];\n\tvar shouldExtendStem = (options.shouldExtendStem !== undefined) ? options.shouldExtendStem : false;\n\tvar printAccidentals = (options.printAccidentals !== undefined) ? options.printAccidentals : true;\n\n\t// TODO scale the dot as well\n\tvar pitch = pitchelem.verticalPos;\n\tvar notehead;\n\tvar accidentalshiftx = 0;\n\tvar newDotShiftX = 0;\n\tvar extraLeft = 0;\n\tif (c === undefined)\n\t\tabselem.addFixed(new RelativeElement(\"pitch is undefined\", 0, 0, 0, { type: \"debug\" }));\n\telse if (c === \"\") {\n\t\tnotehead = new RelativeElement(null, 0, 0, pitch);\n\t} else {\n\t\tvar shiftheadx = headx;\n\t\tif (pitchelem.printer_shift) {\n\t\t\tvar adjust = (pitchelem.printer_shift === \"same\") ? 1 : 0;\n\t\t\tshiftheadx = (dir === \"down\") ? -glyphs.getSymbolWidth(c) * scale + adjust : glyphs.getSymbolWidth(c) * scale - adjust;\n\t\t}\n\t\tvar opts = { scalex: scale, scaley: scale, thickness: glyphs.symbolHeightInPitches(c) * scale, name: pitchelem.name };\n\t\tnotehead = new RelativeElement(c, shiftheadx, glyphs.getSymbolWidth(c) * scale, pitch, opts);\n\t\tnotehead.stemDir = dir;\n\t\tif (flag) {\n\t\t\tvar pos = pitch + ((dir === \"down\") ? -7 : 7) * scale;\n\t\t\t// if this is a regular note, (not grace or tempo indicator) then the stem will have been stretched to the middle line if it is far from the center.\n\t\t\tif (shouldExtendStem) {\n\t\t\t\tif (dir === \"down\" && pos > 6)\n\t\t\t\t\tpos = 6;\n\t\t\t\tif (dir === \"up\" && pos < 6)\n\t\t\t\t\tpos = 6;\n\t\t\t}\n\t\t\t//if (scale===1 && (dir===\"down\")?(pos>6):(pos<6)) pos=6;\n\t\t\tvar xdelta = (dir === \"down\") ? headx : headx + notehead.w - 0.6;\n\t\t\tabselem.addRight(new RelativeElement(flag, xdelta, glyphs.getSymbolWidth(flag) * scale, pos, { scalex: scale, scaley: scale }));\n\t\t}\n\t\tnewDotShiftX = notehead.w + dotshiftx - 2 + 5 * dot;\n\t\tfor (; dot > 0; dot--) {\n\t\t\tvar dotadjusty = (1 - Math.abs(pitch) % 2); //PER: take abs value of the pitch. And the shift still happens on ledger lines.\n\t\t\tabselem.addRight(new RelativeElement(\"dots.dot\", notehead.w + dotshiftx - 2 + 5 * dot, glyphs.getSymbolWidth(\"dots.dot\"), pitch + dotadjusty));\n\t\t}\n\t}\n\tif (notehead)\n\t\tnotehead.highestVert = pitchelem.highestVert;\n\n\tif (printAccidentals && pitchelem.accidental) {\n\t\tvar symb;\n\t\tswitch (pitchelem.accidental) {\n\t\t\tcase \"quartersharp\":\n\t\t\t\tsymb = \"accidentals.halfsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblsharp\":\n\t\t\t\tsymb = \"accidentals.dblsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"sharp\":\n\t\t\t\tsymb = \"accidentals.sharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"quarterflat\":\n\t\t\t\tsymb = \"accidentals.halfflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"flat\":\n\t\t\t\tsymb = \"accidentals.flat\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblflat\":\n\t\t\t\tsymb = \"accidentals.dblflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"natural\":\n\t\t\t\tsymb = \"accidentals.nat\";\n\t\t}\n\t\t// if a note is at least a sixth away, it can share a slot with another accidental\n\t\tvar accSlotFound = false;\n\t\tvar accPlace = extrax;\n\t\tfor (var j = 0; j < accidentalSlot.length; j++) {\n\t\t\tif (pitch - accidentalSlot[j][0] >= 6) {\n\t\t\t\taccidentalSlot[j][0] = pitch;\n\t\t\t\taccPlace = accidentalSlot[j][1];\n\t\t\t\taccSlotFound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (accSlotFound === false) {\n\t\t\taccPlace -= (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t\taccidentalSlot.push([pitch, accPlace]);\n\t\t\taccidentalshiftx = (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t}\n\t\tvar h = glyphs.symbolHeightInPitches(symb);\n\t\tabselem.addExtra(new RelativeElement(symb, accPlace, glyphs.getSymbolWidth(symb), pitch, { scalex: scale, scaley: scale, top: pitch + h / 2, bottom: pitch - h / 2 }));\n\t\textraLeft = glyphs.getSymbolWidth(symb) / 2; // TODO-PER: We need a little extra width if there is an accidental, but I'm not sure why it isn't the full width of the accidental.\n\t}\n\n\treturn { notehead: notehead, accidentalshiftx: accidentalshiftx, dotshiftx: newDotShiftX, extraLeft: extraLeft };\n\n};\n\nmodule.exports = createNoteHead;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/create-note-head.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/create-time-signature.js":
/*!************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/create-time-signature.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_create_time_signature.js\n\nvar AbsoluteElement = __webpack_require__(/*! ./elements/absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nvar createTimeSignature = function (elem, tuneNumber) {\n\telem.el_type = \"timeSignature\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra time-signature', tuneNumber);\n\tif (elem.type === \"specified\") {\n\t\tvar x = 0;\n\t\tfor (var i = 0; i < elem.value.length; i++) {\n\t\t\tif (i !== 0) {\n\t\t\t\tabselem.addRight(new RelativeElement('+', x + 1, glyphs.getSymbolWidth(\"+\"), 6, { thickness: glyphs.symbolHeightInPitches(\"+\") }));\n\t\t\t\tx += glyphs.getSymbolWidth(\"+\") + 2;\n\t\t\t}\n\t\t\tif (elem.value[i].den) {\n\t\t\t\tvar numWidth = 0;\n\t\t\t\tfor (var i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tnumWidth += glyphs.getSymbolWidth(elem.value[i].num[i2]);\n\t\t\t\tvar denWidth = 0;\n\t\t\t\tfor (i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tdenWidth += glyphs.getSymbolWidth(elem.value[i].den[i2]);\n\t\t\t\tvar maxWidth = Math.max(numWidth, denWidth);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x + (maxWidth - numWidth) / 2, numWidth, 8, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].den, x + (maxWidth - denWidth) / 2, denWidth, 4, { thickness: glyphs.symbolHeightInPitches(elem.value[i].den[0]) }));\n\t\t\t\tx += maxWidth\n\t\t\t} else {\n\t\t\t\tvar thisWidth = 0;\n\t\t\t\tfor (var i3 = 0; i3 < elem.value[i].num.length; i3++)\n\t\t\t\t\tthisWidth += glyphs.getSymbolWidth(elem.value[i].num[i3]);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x, thisWidth, 6, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tx += thisWidth;\n\t\t\t}\n\t\t}\n\t} else if (elem.type === \"common_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.common\", 0, glyphs.getSymbolWidth(\"timesig.common\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.common\") }));\n\n\t} else if (elem.type === \"cut_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.cut\", 0, glyphs.getSymbolWidth(\"timesig.cut\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.cut\") }));\n\t} else if (elem.type === \"tempus_imperfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum\") }));\n\t} else if (elem.type === \"tempus_imperfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum2\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum2\") }));\n\t} else if (elem.type === \"tempus_perfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum\", 0, glyphs.getSymbolWidth(\"timesig.perfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum\") }));\n\t} else if (elem.type === \"tempus_perfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum2\", 0, glyphs.getSymbolWidth(\"timesig.perfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum2\") }));\n\t} else {\n\t\tconsole.log(\"time signature:\", elem);\n\t}\n\treturn abselem;\n};\n\nmodule.exports = createTimeSignature;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/create-time-signature.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/decoration.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/decoration.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// abc_decoration.js: Creates a data structure suitable for printing a line of abc\n\nvar DynamicDecoration = __webpack_require__(/*! ./elements/dynamic-decoration */ \"./node_modules/abcjs/src/write/creation/elements/dynamic-decoration.js\");\nvar CrescendoElem = __webpack_require__(/*! ./elements/crescendo-element */ \"./node_modules/abcjs/src/write/creation/elements/crescendo-element.js\");\nvar GlissandoElem = __webpack_require__(/*! ./elements/glissando-element */ \"./node_modules/abcjs/src/write/creation/elements/glissando-element.js\");\nvar glyphs = __webpack_require__(/*! ./glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar RelativeElement = __webpack_require__(/*! ./elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\nvar TieElem = __webpack_require__(/*! ./elements/tie-element */ \"./node_modules/abcjs/src/write/creation/elements/tie-element.js\");\n\nvar Decoration = function Decoration() {\n\tthis.startDiminuendoX = undefined;\n\tthis.startCrescendoX = undefined;\n\tthis.minTop = 12;\t// TODO-PER: this is assuming a 5-line staff. Pass that info in.\n\tthis.minBottom = 0;\n};\n\nvar closeDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove) {\n\tvar yPos;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tif (decoration[i] === \"staccato\" || decoration[i] === \"tenuto\" || (decoration[i] === \"accent\" && !accentAbove)) {\n\t\t\tvar symbol = \"scripts.\" + decoration[i];\n\t\t\tif (decoration[i] === \"accent\") symbol = \"scripts.sforzato\";\n\t\t\tif (yPos === undefined)\n\t\t\t\tyPos = (dir === \"down\") ? pitch + 2 : minPitch - 2;\n\t\t\telse\n\t\t\t\tyPos = (dir === \"down\") ? yPos + 2 : yPos - 2;\n\t\t\tif (decoration[i] === \"accent\") {\n\t\t\t\t// Always place the accent three pitches away, no matter whether that is a line or space.\n\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\telse yPos++;\n\t\t\t} else {\n\t\t\t\t// don't place on a stave line. The stave lines are 2,4,6,8,10\n\t\t\t\tswitch (yPos) {\n\t\t\t\t\tcase 2:\n\t\t\t\t\tcase 4:\n\t\t\t\t\tcase 6:\n\t\t\t\t\tcase 8:\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\t\t\telse yPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pitch > 9) yPos++; // take up some room of those that are above\n\t\t\tvar deltaX = width / 2;\n\t\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t\t}\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), yPos));\n\t\t}\n\t\tif (decoration[i] === \"slide\" && abselem.heads[0]) {\n\t\t\tvar yPos2 = abselem.heads[0].pitch;\n\t\t\tyPos2 -= 2; // TODO-PER: not sure what this fudge factor is.\n\t\t\tvar blank1 = new RelativeElement(\"\", -roomtaken - 15, 0, yPos2 - 1);\n\t\t\tvar blank2 = new RelativeElement(\"\", -roomtaken - 5, 0, yPos2 + 1);\n\t\t\tabselem.addFixedX(blank1);\n\t\t\tabselem.addFixedX(blank2);\n\t\t\tvoice.addOther(new TieElem({ anchor1: blank1, anchor2: blank2, fixedY: true }));\n\t\t}\n\t}\n\tif (yPos === undefined)\n\t\tyPos = pitch;\n\n\treturn { above: yPos, below: abselem.bottom };\n};\n\nvar volumeDecoration = function (voice, decoration, abselem, positioning) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"p\":\n\t\t\tcase \"mp\":\n\t\t\tcase \"pp\":\n\t\t\tcase \"ppp\":\n\t\t\tcase \"pppp\":\n\t\t\tcase \"f\":\n\t\t\tcase \"ff\":\n\t\t\tcase \"fff\":\n\t\t\tcase \"ffff\":\n\t\t\tcase \"sfz\":\n\t\t\tcase \"mf\":\n\t\t\t\tvar elem = new DynamicDecoration(abselem, decoration[i], positioning);\n\t\t\t\tvoice.addOther(elem);\n\t\t}\n\t}\n};\n\nvar compoundDecoration = function (decoration, pitch, width, abselem, dir) {\n\tfunction highestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 10;\t// TODO-PER: I don't know if this can happen, but we'll return the top of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.max(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction lowestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 2;\t// TODO-PER: I don't know if this can happen, but we'll return the bottom of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.min(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction compoundDecoration(symbol, count) {\n\t\tvar placement = (dir === 'down') ? lowestPitch() + 1 : highestPitch() + 9;\n\t\tif (dir !== 'down' && count === 1)\n\t\t\tplacement--;\n\t\tvar deltaX = width / 2;\n\t\tdeltaX += (dir === 'down') ? -5 : 3;\n\t\tfor (var i = 0; i < count; i++) {\n\t\t\tplacement -= 1;\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), placement));\n\t\t}\n\t}\n\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"/\": compoundDecoration(\"flags.ugrace\", 1); break;\n\t\t\tcase \"//\": compoundDecoration(\"flags.ugrace\", 2); break;\n\t\t\tcase \"///\": compoundDecoration(\"flags.ugrace\", 3); break;\n\t\t\tcase \"////\": compoundDecoration(\"flags.ugrace\", 4); break;\n\t\t}\n\t}\n};\n\nvar stackedDecoration = function (decoration, width, abselem, yPos, positioning, minTop, minBottom, accentAbove) {\n\tfunction incrementPlacement(placement, height) {\n\t\tif (placement === 'above')\n\t\t\tyPos.above += height;\n\t\telse\n\t\t\tyPos.below -= height;\n\t}\n\tfunction getPlacement(placement) {\n\t\tvar y;\n\t\tif (placement === 'above') {\n\t\t\ty = yPos.above;\n\t\t\tif (y < minTop)\n\t\t\t\ty = minTop;\n\t\t} else {\n\t\t\ty = yPos.below;\n\t\t\tif (y > minBottom)\n\t\t\t\ty = minBottom;\n\t\t}\n\t\treturn y;\n\t}\n\tfunction textDecoration(text, placement, anchor) {\n\t\tvar y = getPlacement(placement);\n\t\tvar textFudge = 2;\n\t\tvar textHeight = 5;\n\t\t// TODO-PER: Get the height of the current font and use that for the thickness.\n\t\tabselem.addFixedX(new RelativeElement(text, width / 2, 0, y + textFudge, { type: \"decoration\", klass: 'ornament', thickness: 3, anchor: anchor }));\n\n\t\tincrementPlacement(placement, textHeight);\n\t}\n\tfunction symbolDecoration(symbol, placement) {\n\t\tvar deltaX = width / 2;\n\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t}\n\t\tvar height = glyphs.symbolHeightInPitches(symbol) + 1; // adding a little padding so nothing touches.\n\t\tvar y = getPlacement(placement);\n\t\ty = (placement === 'above') ? y + height / 2 : y - height / 2;// Center the element vertically.\n\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), y, { klass: 'ornament', thickness: glyphs.symbolHeightInPitches(symbol), position: placement }));\n\n\t\tincrementPlacement(placement, height);\n\t}\n\n\tvar symbolList = {\n\t\t\"+\": \"scripts.stopped\",\n\t\t\"open\": \"scripts.open\",\n\t\t\"snap\": \"scripts.snap\",\n\t\t\"wedge\": \"scripts.wedge\",\n\t\t\"thumb\": \"scripts.thumb\",\n\t\t\"shortphrase\": \"scripts.shortphrase\",\n\t\t\"mediumphrase\": \"scripts.mediumphrase\",\n\t\t\"longphrase\": \"scripts.longphrase\",\n\t\t\"trill\": \"scripts.trill\",\n\t\t\"roll\": \"scripts.roll\",\n\t\t\"irishroll\": \"scripts.roll\",\n\t\t\"marcato\": \"scripts.umarcato\",\n\t\t\"dmarcato\": \"scripts.dmarcato\",\n\t\t\"umarcato\": \"scripts.umarcato\",\n\t\t\"turn\": \"scripts.turn\",\n\t\t\"uppermordent\": \"scripts.prall\",\n\t\t\"pralltriller\": \"scripts.prall\",\n\t\t\"mordent\": \"scripts.mordent\",\n\t\t\"lowermordent\": \"scripts.mordent\",\n\t\t\"downbow\": \"scripts.downbow\",\n\t\t\"upbow\": \"scripts.upbow\",\n\t\t\"fermata\": \"scripts.ufermata\",\n\t\t\"invertedfermata\": \"scripts.dfermata\",\n\t\t\"breath\": \",\",\n\t\t\"coda\": \"scripts.coda\",\n\t\t\"segno\": \"scripts.segno\"\n\t};\n\n\tvar hasOne = false;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"D.C.\":\n\t\t\tcase \"D.S.\":\n\t\t\t\ttextDecoration(decoration[i], positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alcoda\":\n\t\t\t\ttextDecoration(\"D.C. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alfine\":\n\t\t\t\ttextDecoration(\"D.C. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alcoda\":\n\t\t\t\ttextDecoration(\"D.S. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alfine\":\n\t\t\t\ttextDecoration(\"D.S. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"fine\":\n\t\t\t\ttextDecoration(\"FINE\", positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"+\":\n\t\t\tcase \"open\":\n\t\t\tcase \"snap\":\n\t\t\tcase \"wedge\":\n\t\t\tcase \"thumb\":\n\t\t\tcase \"shortphrase\":\n\t\t\tcase \"mediumphrase\":\n\t\t\tcase \"longphrase\":\n\t\t\tcase \"trill\":\n\t\t\tcase \"roll\":\n\t\t\tcase \"irishroll\":\n\t\t\tcase \"marcato\":\n\t\t\tcase \"dmarcato\":\n\t\t\tcase \"turn\":\n\t\t\tcase \"uppermordent\":\n\t\t\tcase \"pralltriller\":\n\t\t\tcase \"mordent\":\n\t\t\tcase \"lowermordent\":\n\t\t\tcase \"downbow\":\n\t\t\tcase \"upbow\":\n\t\t\tcase \"fermata\":\n\t\t\tcase \"breath\":\n\t\t\tcase \"umarcato\":\n\t\t\tcase \"coda\":\n\t\t\tcase \"segno\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], positioning);\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"invertedfermata\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], 'below');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"mark\":\n\t\t\t\tabselem.klass = \"mark\";\n\t\t\t\tbreak;\n\t\t\tcase \"accent\":\n\t\t\t\tif (accentAbove) {\n\t\t\t\t\tsymbolDecoration(\"scripts.sforzato\", positioning);\n\t\t\t\t\thasOne = true;\n\t\t\t\t}\n\t\t\t\tbreak;\t\n\t\t}\n\t}\n\treturn hasOne;\n};\n\nfunction leftDecoration(decoration, abselem, roomtaken) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"arpeggio\":\n\t\t\t\t// The arpeggio symbol is the height of a note (that is, two Y units). This stacks as many as we need to go from the\n\t\t\t\t// top note to the bottom note. The arpeggio should also be a little taller than the stacked notes, so there is an extra\n\t\t\t\t// one drawn and it is offset by half of a note height (that is, one Y unit).\n\t\t\t\tfor (var j = abselem.abcelem.minpitch - 1; j <= abselem.abcelem.maxpitch; j += 2) {\n\t\t\t\t\tabselem.addExtra(\n\t\t\t\t\t\tnew RelativeElement(\n\t\t\t\t\t\t\t\"scripts.arpeggio\",\n\t\t\t\t\t\t\t-glyphs.getSymbolWidth(\"scripts.arpeggio\") * 2 - roomtaken,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\tj + 2,\n\t\t\t\t\t\t\t{ klass: 'ornament', thickness: glyphs.symbolHeightInPitches(\"scripts.arpeggio\") }\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nDecoration.prototype.dynamicDecoration = function (voice, decoration, abselem, positioning) {\n\tvar diminuendo;\n\tvar crescendo;\n\tvar glissando;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"diminuendo(\":\n\t\t\t\tthis.startDiminuendoX = abselem;\n\t\t\t\tdiminuendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"diminuendo)\":\n\t\t\t\tdiminuendo = { start: this.startDiminuendoX, stop: abselem };\n\t\t\t\tthis.startDiminuendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo(\":\n\t\t\t\tthis.startCrescendoX = abselem;\n\t\t\t\tcrescendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo)\":\n\t\t\t\tcrescendo = { start: this.startCrescendoX, stop: abselem };\n\t\t\t\tthis.startCrescendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~(':\n\t\t\tcase \"glissando(\":\n\t\t\t\tthis.startGlissandoX = abselem;\n\t\t\t\tglissando = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~)':\n\t\t\tcase \"glissando)\":\n\t\t\t\tglissando = { start: this.startGlissandoX, stop: abselem };\n\t\t\t\tthis.startGlissandoX = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (diminuendo) {\n\t\tvoice.addOther(new CrescendoElem(diminuendo.start, diminuendo.stop, \">\", positioning));\n\t}\n\tif (crescendo) {\n\t\tvoice.addOther(new CrescendoElem(crescendo.start, crescendo.stop, \"<\", positioning));\n\t}\n\tif (glissando) {\n\t\tvoice.addOther(new GlissandoElem(glissando.start, glissando.stop));\n\t}\n};\n\nDecoration.prototype.createDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, positioning, hasVocals, accentAbove) {\n\tif (!positioning)\n\t\tpositioning = { ornamentPosition: 'above', volumePosition: hasVocals ? 'above' : 'below', dynamicPosition: hasVocals ? 'above' : 'below' };\n\t// These decorations don't affect the placement of other decorations\n\tvolumeDecoration(voice, decoration, abselem, positioning.volumePosition);\n\tthis.dynamicDecoration(voice, decoration, abselem, positioning.dynamicPosition);\n\tcompoundDecoration(decoration, pitch, width, abselem, dir);\n\n\t// treat staccato, accent, and tenuto first (may need to shift other markers)\n\tvar yPos = closeDecoration(voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove);\n\t// yPos is an object containing 'above' and 'below'. That is the placement of the next symbol on either side.\n\n\tyPos.above = Math.max(yPos.above, this.minTop);\n\tyPos.below = Math.min(yPos.below, minPitch);\n\tvar hasOne = stackedDecoration(decoration, width, abselem, yPos, positioning.ornamentPosition, this.minTop, minPitch, accentAbove);\n\t//if (hasOne) {\n\t\t//\t\t\tabselem.top = Math.max(yPos.above + 3, abselem.top); // TODO-PER: Not sure why we need this fudge factor.\n\t//}\n\tleftDecoration(decoration, abselem, roomtaken);\n};\n\nmodule.exports = Decoration;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/decoration.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/absolute-element.js":
/*!****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/absolute-element.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_absolute_element.js: Definition of the AbsoluteElement class.\n\nvar highlight = __webpack_require__(/*! ../../interactive/highlight */ \"./node_modules/abcjs/src/write/interactive/highlight.js\");\nvar unhighlight = __webpack_require__(/*! ../../interactive/unhighlight */ \"./node_modules/abcjs/src/write/interactive/unhighlight.js\");\n\n// Everything that is placed in the SVG is first created as an absolute element. This is one unit of graphic information.\n// That is, it embodies a concept: a clef, a time signature, a bar line,etc. or most complexly:\n// a note with its accidental, grace note, chord symbol, trill, stem, eighth flags, etc.\n// In the largest sense, these are placed on the page at a particular place that is determined during the layout phase.\n// This object doesn't contain any of the drawing information, though. That information is contained in an array of\n// RelativeElements as the \"children\" of this class.\n// During the layout phase, the width of all the children is calculated and the X coordinate of the absolute element is set.\n//\n// So, after the AbsoluteElement is placed, then its children can be placed relative to that. There are different types of\n// relative elements that are placed with different rules:\n// 1) Fixed - these elements don't move relative to the absolute element's coordinates. These are things like the notehead,\n// any ledger lines, accidentals, etc.\n// 2) Slotted - these elements can move vertically and don't get Y coordinates until after the absolute element is placed.\n// These are things like the chord symbol, many decorations, the lyrics, etc.\n//\n// Relative elements are also classified by how they are related. This could be:\n// 1) Increases the absolute element's width to the left. This doesn't change the center point of\n// the absolute element, so adding a sharp to the note won't move it to the right. However, if the elements\n// are close together then this enforces a minimum distance.\n// 2) Has no effect on the width. Annotations and the tempo act like this. No matter how long they are the width doesn't change.\n// 3) Increases the absolute element's width to the right. This doesn't change the center point,\n// but it will increase the minimum distance.\n// 4) Sets the width on both sides. This is the note heads. They are centered on both sides of the absolute element's X coordinate.\n\n// duration - actual musical duration - different from notehead duration in triplets. refer to abcelem to get the notehead duration\n// minspacing - spacing which must be taken on top of the width defined by the duration\n// type is a meta-type for the element. It is not necessary for drawing, but it is useful to make semantic sense of the element. For instance, it can be used in the element's class name.\nvar AbsoluteElement = function AbsoluteElement(abcelem, duration, minspacing, type, tuneNumber, options) {\n\t//\tconsole.log(\"Absolute:\",abcelem, duration, minspacing, type, tuneNumber, options);\n\tif (!options)\n\t\toptions = {};\n\tthis.tuneNumber = tuneNumber;\n\tthis.abcelem = abcelem;\n\tthis.duration = duration;\n\tthis.durationClass = options.durationClassOveride ? options.durationClassOveride : this.duration;\n\tthis.minspacing = minspacing || 0;\n\tthis.x = 0;\n\tthis.children = [];\n\tthis.heads = [];\n\tthis.extra = [];\n\tthis.extraw = 0;\n\tthis.w = 0;\n\tthis.right = [];\n\tthis.invisible = false;\n\tthis.bottom = undefined;\n\tthis.top = undefined;\n\tthis.type = type;\n\n\t// The following are the dimensions of the fixed part of the element.\n\t// That is, the chord text will be a different height depending on lot of factors, but the 8th flag will always be in the same place.\n\tthis.fixed = { w: 0, t: undefined, b: undefined }; // there is no x-coord here, because that is set later.\n\n\t// these are the heights of all of the vertical elements that can't be placed until the end of the line.\n\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nAbsoluteElement.prototype.getFixedCoords = function () {\n\treturn { x: this.x, w: this.fixed.w, t: this.fixed.t, b: this.fixed.b };\n};\n\nAbsoluteElement.prototype.addExtra = function (extra) {\n\t// used for accidentals, multi-measure rest text,\n\t// left-side decorations, gracenote heads,\n\t// left annotations, gracenote stems.\n\t// if (!(extra.c && extra.c.indexOf(\"accidentals\") >= 0) &&\n\t// \t!(extra.c && extra.c.indexOf(\"arpeggio\") >= 0) &&\n\t// \textra.type !== \"multimeasure-text\" &&\n\t// \t!(extra.c === \"noteheads.quarter\" && (extra.scalex === 0.6 || extra.scalex === 0.36)) &&\n\t// \t!(extra.type === \"stem\" && extra.linewidth === -0.6) &&\n\t// \textra.position !== \"left\"\n\t// )\n\t// \tconsole.log(\"extra\", extra);\n\n\tthis.fixed.w = Math.max(this.fixed.w, extra.dx + extra.w);\n\tif (this.fixed.t === undefined) this.fixed.t = extra.top; else this.fixed.t = Math.max(this.fixed.t, extra.top);\n\tif (this.fixed.b === undefined) this.fixed.b = extra.bottom; else this.fixed.b = Math.min(this.fixed.b, extra.bottom);\n\tif (extra.dx < this.extraw) this.extraw = extra.dx;\n\tthis.extra[this.extra.length] = extra;\n\tthis._addChild(extra);\n};\n\nAbsoluteElement.prototype.addHead = function (head) {\n\tif (head.dx < this.extraw) this.extraw = head.dx;\n\tthis.heads[this.heads.length] = head;\n\tthis.addRight(head);\n};\n\nAbsoluteElement.prototype.addRight = function (right) {\n\t// // used for clefs, note heads, bar lines, stems, key-signature accidentals, non-beamed flags, dots\n\t// if (!(right.c && right.c.indexOf(\"clefs\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"noteheads\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"flags\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"rests\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"dots.dot\") >= 0) &&\n\t// \tright.type !== \"stem\" &&\n\t// \tright.type !== \"bar\" &&\n\t// \tright.type !== \"none\" && // used when an invisible anchor is needed.\n\t// \t!(this.type.indexOf(\"clef\") >= -1 && right.c === \"8\") &&\n\t// \tthis.type.indexOf(\"key-signature\") === -1 &&\n\t// \tthis.type.indexOf(\"time-signature\") === -1 &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"spacer\") &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"invisible\") &&\n\t// \t!(right.type === \"text\" && right.position === \"relative\") &&\n\t// \t!(right.type === \"text\" && right.position === \"right\") &&\n\t// \t!(right.type === \"text\" && right.position === \"above\") &&\n\t// \t!(right.type === \"text\" && right.position === \"below\")\n\t// )\n\t// \tconsole.log(\"right\", right);\n\t// These are the elements that are the fixed part.\n\tthis.fixed.w = Math.max(this.fixed.w, right.dx + right.w);\n\tif (right.top !== undefined) {\n\t\tif (this.fixed.t === undefined) this.fixed.t = right.top; else this.fixed.t = Math.max(this.fixed.t, right.top);\n\t}\n\tif (right.bottom !== undefined) {\n\t\tif (this.fixed.b === undefined) this.fixed.b = right.bottom; else this.fixed.b = Math.min(this.fixed.b, right.bottom);\n\t}\n\t// if (isNaN(this.fixed.t) || isNaN(this.fixed.b))\n\t// \tdebugger;\n\tif (right.dx + right.w > this.w) this.w = right.dx + right.w;\n\tthis.right[this.right.length] = right;\n\tthis._addChild(right);\n};\n\nAbsoluteElement.prototype.addFixed = function (elem) {\n\t// used for elements that can't move relative to other elements after they have been placed.\n\t// used for ledger lines, bar numbers, debug msgs, clef, key sigs, time sigs\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addFixedX = function (elem) {\n\t// used for elements that can't move horizontally relative to other elements after they have been placed.\n\t// used for parts, tempo, decorations\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addCentered = function (elem) {\n\t// // used for chord labels, lyrics\n\t// if (!(elem.type === \"chord\" && elem.position === \"above\") &&\n\t// \t!(elem.type === \"chord\" && elem.position === \"below\") &&\n\t// \telem.type !== 'lyric'\n\t// )\n\t// \tconsole.log(\"centered\", elem);\n\tvar half = elem.w / 2;\n\tif (-half < this.extraw) this.extraw = -half;\n\tthis.extra[this.extra.length] = elem;\n\tif (elem.dx + half > this.w) this.w = elem.dx + half;\n\tthis.right[this.right.length] = elem;\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.setLimit = function (member, child) {\n\tif (!child[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = child[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], child[member]);\n};\n\nAbsoluteElement.prototype._addChild = function (child) {\n  //  console.log(\"Relative:\",child);\n  \n  // MAE 30 Sep 2024 - To avoid extra space for chords if there is only a bar number on the clef\n  var okToPushTop = true;\n  if ((this.abcelem.el_type == \"clef\") && (child.type == \"barNumber\")){\n    okToPushTop = false;\n  }\n\n  child.parent = this;\n  this.children[this.children.length] = child;\n\n  if (okToPushTop){\n    this.pushTop(child.top);\n  }\n  \n  this.pushBottom(child.bottom);\n  this.setLimit('tempoHeightAbove', child);\n  this.setLimit('partHeightAbove', child);\n  this.setLimit('volumeHeightAbove', child);\n  this.setLimit('dynamicHeightAbove', child);\n  this.setLimit('endingHeightAbove', child);\n  this.setLimit('chordHeightAbove', child);\n  this.setLimit('lyricHeightAbove', child);\n  this.setLimit('lyricHeightBelow', child);\n  this.setLimit('chordHeightBelow', child);\n  this.setLimit('volumeHeightBelow', child);\n  this.setLimit('dynamicHeightBelow', child);\n};\n\nAbsoluteElement.prototype.pushTop = function (top) {\n\tif (top !== undefined) {\n\t\tif (this.top === undefined)\n\t\t\tthis.top = top;\n\t\telse\n\t\t\tthis.top = Math.max(top, this.top);\n\t}\n};\n\nAbsoluteElement.prototype.pushBottom = function (bottom) {\n\tif (bottom !== undefined) {\n\t\tif (this.bottom === undefined)\n\t\t\tthis.bottom = bottom;\n\t\telse\n\t\t\tthis.bottom = Math.min(bottom, this.bottom);\n\t}\n};\n\nAbsoluteElement.prototype.setX = function (x) {\n\tthis.x = x;\n\tfor (var i = 0; i < this.children.length; i++)\n\t\tthis.children[i].setX(x);\n};\n\nAbsoluteElement.prototype.center = function (before, after) {\n\t// Used to center whole rests\n\tvar midpoint = (after.x - before.x) / 2 + before.x;\n\tthis.x = midpoint - this.w / 2;\n\tfor (var k = 0; k < this.children.length; k++)\n\t\tthis.children[k].setX(this.x);\n};\n\nAbsoluteElement.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nAbsoluteElement.prototype.highlight = function (klass, color) {\n\thighlight.bind(this)(klass, color);\n};\n\nAbsoluteElement.prototype.unhighlight = function (klass, color) {\n\tunhighlight.bind(this)(klass, color);\n};\n\nmodule.exports = AbsoluteElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/absolute-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/beam-element.js":
/*!************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/beam-element.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_beam_element.js: Definition of the BeamElem class.\n\n// Most elements on the page are related to a particular absolute element -- notes, rests, bars, etc. Beams, however, span multiple elements.\n// This means that beams can't be laid out until the absolute elements are placed. There is the further complication that the stems for beamed\n// notes can't be laid out until the beams are because we don't know how long they will be until we know the slope of the beam and the horizontal\n// spacing of the absolute elements.\n//\n// So, when a beam is detected, a BeamElem is created, then all notes belonging to that beam are added to it. These notes are not given stems at that time.\n// Then, after the horizontal layout is complete, all of the BeamElem are iterated to set the beam position, then all of the notes that are beamed are given\n// stems. After that, we are ready for the drawing step.\n\n// There are three phases: the setup phase, when new elements are being discovered, the layout phase, when everything is calculated, and the drawing phase,\n// when the object is not changed, but is used to put the elements on the page.\n\n//\n// Setup phase\n//\nvar BeamElem = function BeamElem(stemHeight, type, flat, firstElement) {\n\t// type is \"grace\", \"up\", \"down\", or undefined. flat is used to force flat beams, as it commonly found in the grace notes of bagpipe music.\n\tthis.type = \"BeamElem\";\n\tthis.isflat = !!flat;\n\tthis.isgrace = !!(type && type === \"grace\");\n\tthis.forceup = !!(this.isgrace || (type && type === \"up\"));\n\tthis.forcedown = !!(type && type === \"down\");\n\tthis.elems = []; // all the AbsoluteElements that this beam touches. It may include embedded rests.\n\tthis.total = 0;\n\tthis.average = 6; // use middle line as start for average.\n\tthis.allrests = true;\n\tthis.stemHeight = stemHeight;\n\tthis.beams = []; // During the layout phase, this will become a list of the beams that need to be drawn.\n\tif (firstElement && firstElement.duration) {\n\t\tthis.duration = firstElement.duration;\n\t\tif (firstElement.startTriplet) {\n\t\t\tthis.duration *= firstElement.tripletMultiplier;\n\t\t}\n\t\tthis.duration = Math.round(this.duration * 1000) / 1000;\n\t} else\n\t\tthis.duration = 0;\n};\n\nBeamElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nBeamElem.prototype.runningDirection = function (abcelem) {\n\tvar pitch = abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tthis.total = Math.round(this.total + pitch);\n\tif (!this.count)\n\t\tthis.count = 0;\n\tthis.count++\n};\n\nBeamElem.prototype.add = function (abselem) {\n\tvar pitch = abselem.abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tif (!abselem.abcelem.rest)\n\t\tthis.allrests = false;\n\tabselem.beam = this;\n\tthis.elems.push(abselem);\n\tthis.total = Math.round(this.total + pitch);\n\tif (this.min === undefined || abselem.abcelem.minpitch < this.min) {\n\t\tthis.min = abselem.abcelem.minpitch;\n\t}\n\tif (this.max === undefined || abselem.abcelem.maxpitch > this.max) {\n\t\tthis.max = abselem.abcelem.maxpitch;\n\t}\n};\n\nBeamElem.prototype.addBeam = function (beam) {\n\tthis.beams.push(beam);\n};\n\nBeamElem.prototype.setStemDirection = function () {\n\t// Have to figure this out before the notes are placed because placing the notes also places the decorations.\n\tthis.average = calcAverage(this.total, this.count);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tdelete this.count;\n\tthis.total = 0;\n};\n\nBeamElem.prototype.calcDir = function () {\n\tthis.average = calcAverage(this.total, this.elems.length);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tvar dir = this.stemsUp ? 'up' : 'down';\n\tfor (var i = 0; i < this.elems.length; i++) {\n\t\tfor (var j = 0; j < this.elems[i].heads.length; j++) {\n\t\t\tthis.elems[i].heads[j].stemDir = dir;\n\t\t}\n\t}\n};\n\nfunction calcAverage(total, numElements) {\n\tif (!numElements)\n\t\treturn 0;\n\treturn total / numElements;\n}\n\nmodule.exports = BeamElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/beam-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/bottom-text.js":
/*!***********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/bottom-text.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const addTextIf = __webpack_require__(/*! ../add-text-if */ \"./node_modules/abcjs/src/write/creation/add-text-if.js\");\nconst richText = __webpack_require__(/*! ./rich-text */ \"./node_modules/abcjs/src/write/creation/elements/rich-text.js\");\n\nfunction BottomText(metaText, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\tif (metaText.unalignedWords && metaText.unalignedWords.length > 0)\n\t\tthis.unalignedWords(metaText.unalignedWords, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tthis.extraText(metaText, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tif (metaText.footer && isPrint)\n\t\tthis.footer(metaText.footer, width, paddingLeft, getTextSize);\n}\n\nBottomText.prototype.unalignedWords = function (unalignedWords, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\tvar klass = shouldAddClasses ? 'abcjs-unaligned-words' : ''\n\tvar defFont = 'wordsfont';\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\t\n\tthis.rows.push({ move: spacing.words });\n\t\n\taddMultiLine(this.rows, '', unalignedWords, marginLeft, defFont, \"unalignedWords\", \"unalignedWords\", klass, \"unalignedWords\", spacing, shouldAddClasses, getTextSize)\n\tthis.rows.push({ move: space.height });\n}\n\nfunction addSingleLine(rows, preface, text, marginLeft, klass, shouldAddClasses, getTextSize) {\n\tif (text) {\n\t\tif (preface) {\n\t\t\tif (typeof text === 'string')\n\t\t\t\ttext = preface + text\n\t\t\telse\n\t\t\t\ttext = [{text: preface}].concat(text)\n\t\t}\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\trichText(rows, text, 'historyfont', klass, \"description\", marginLeft, {absElemType: \"extraText\", anchor: 'start'}, getTextSize)\n\t}\n\n}\n\nfunction addMultiLine(rows, preface, content, marginLeft, defFont, absElemType, groupName, klass, name, spacing, shouldAddClasses, getTextSize) {\n\tif (content) {\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\tvar size = getTextSize.calc(\"A\", defFont, klass);\n\t\tif (typeof content === 'string') {\n\t\t\tif (preface)\n\t\t\t\tcontent = preface + \"\\n\" + content\n\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: content, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle', klass: klass }, getTextSize);\n\t\t\t//rows.push({move: size.height*3/4})\n\t\t} else {\n\t\t\trows.push({ startGroup: groupName, klass: klass, name: name });\n\t\t\trows.push({move: spacing.info})\n\t\t\tif (preface) {\n\t\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: preface, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle' }, getTextSize);\n\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < content.length; j++) {\n\t\t\t\trichText(rows, content[j], defFont, '', name, marginLeft, {anchor: 'start'}, getTextSize)\n\t\t\t\t// TODO-PER: Hack! the string and rich lines should have used up the same amount of space without this.\n\t\t\t\tif (j < content.length-1 && typeof content[j] === 'string' && typeof content[j+1] !== 'string')\n\t\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\t\t\trows.push({ endGroup: groupName, absElemType: absElemType, startChar: -1, endChar: -1, name: name });\n\t\t\trows.push({move: size.height})\n\t\t}\n\t}\n}\nBottomText.prototype.extraText = function (metaText, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\taddSingleLine(this.rows, \"Book: \", metaText.book, marginLeft, 'abcjs-book', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Source: \", metaText.source, marginLeft, 'abcjs-source', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Discography: \", metaText.discography, marginLeft, 'abcjs-discography', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, 'Notes:', metaText.notes, marginLeft, 'historyfont', \"extraText\", \"notes\", 'abcjs-notes', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Transcription: \", metaText.transcription, marginLeft, 'abcjs-transcription', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, \"History:\", metaText.history, marginLeft, 'historyfont', \"extraText\", \"history\", 'abcjs-history', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Copyright: \", metaText['abc-copyright'], marginLeft, 'abcjs-copyright', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Creator: \", metaText['abc-creator'], marginLeft, 'abcjs-creator', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Edited By: \", metaText['abc-edited-by'], marginLeft, 'abcjs-edited-by', shouldAddClasses, getTextSize)\n\n}\n\nBottomText.prototype.footer = function (footer, width, paddingLeft, getTextSize) {\n\tvar klass = 'header meta-bottom';\n\tvar font = \"footerfont\";\n\tthis.rows.push({ startGroup: \"footer\", klass: klass });\n\t// Note: whether there is a footer or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\taddTextIf(this.rows, { marginLeft: paddingLeft, text: footer.left, font: font, klass: klass, name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: footer.center, font: font, klass: klass, anchor: 'middle', name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: footer.right, font: font, klass: klass, anchor: 'end', name: \"footer\" }, getTextSize);\n}\n\nmodule.exports = BottomText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/bottom-text.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/brace-element.js":
/*!*************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/brace-element.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_brace_element.js: Definition of the BraceElement class.\n\nvar BraceElem = function BraceElem(voice, type) {\n\tthis.startVoice = voice;\n\tthis.type = type;\n};\n\nBraceElem.prototype.setBottomStaff = function (voice) {\n\tthis.endVoice = voice;\n\t// If only the start brace has a name then the name belongs to the brace instead of the staff.\n\tif (this.startVoice.header && !this.endVoice.header) {\n\t\tthis.header = this.startVoice.header;\n\t\tdelete this.startVoice.header;\n\t}\n};\n\nBraceElem.prototype.continuing = function (voice) {\n\t// If the final staff isn't present, then use the last one we saw.\n\tthis.lastContinuedVoice = voice;\n};\n\nBraceElem.prototype.getWidth = function () {\n\treturn 10; // TODO-PER: right now the drawing function doesn't vary the width at all. If it does in the future then this will change.\n};\n\nBraceElem.prototype.isStartVoice = function (voice) {\n\tif (this.startVoice && this.startVoice.staff && this.startVoice.staff.voices.length > 0 && this.startVoice.staff.voices[0] === voice)\n\t\treturn true;\n\treturn false;\n};\n\nmodule.exports = BraceElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/brace-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/crescendo-element.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/crescendo-element.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_crescendo_element.js: Definition of the CrescendoElem class.\n\nvar CrescendoElem = function CrescendoElem(anchor1, anchor2, dir, positioning) {\n\tthis.type = \"CrescendoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.dir = dir; // either \"<\" or \">\"\n\tif (positioning === 'above')\n\t\tthis.dynamicHeightAbove = 6;\n\telse\n\t\tthis.dynamicHeightBelow = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = CrescendoElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/crescendo-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/dynamic-decoration.js":
/*!******************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/dynamic-decoration.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_dynamic_decoration.js: Definition of the DynamicDecoration class.\n\nvar DynamicDecoration = function DynamicDecoration(anchor, dec, position) {\n\tthis.type = \"DynamicDecoration\";\n\tthis.anchor = anchor;\n\tthis.dec = dec;\n\tif (position === 'below')\n\t\tthis.volumeHeightBelow = 6;\n\telse\n\t\tthis.volumeHeightAbove = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = DynamicDecoration;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/dynamic-decoration.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/ending-element.js":
/*!**************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/ending-element.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_ending_element.js: Definition of the EndingElement class.\n\nvar EndingElem = function EndingElem(text, anchor1, anchor2) {\n\tthis.type = \"EndingElem\";\n\tthis.text = text; // text to be displayed top left\n\tthis.anchor1 = anchor1; // must have a .x property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.endingHeightAbove = 5;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = EndingElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/ending-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/free-text.js":
/*!*********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/free-text.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function FreeText(info, vskip, getFontAndAttr, paddingLeft, width, getTextSize) {\n\tvar text = info.text;\n\tthis.rows = [];\n\tvar size;\n\tif (vskip)\n\t\tthis.rows.push({ move: vskip });\n\tvar hash = getFontAndAttr.calc('textfont', 'defined-text');\n\tif (text === \"\") {\t// we do want to print out blank lines if they have been specified.\n\t\tthis.rows.push({ move: hash.attr['font-size'] * 2 }); // move the distance of the line, plus the distance of the margin, which is also one line.\n\t} else if (typeof text === 'string') {\n\t\tthis.rows.push({ move: hash.attr['font-size'] / 2 }); // TODO-PER: move down some - the y location should be the top of the text, but we output text specifying the center line.\n\t\tthis.rows.push({ left: paddingLeft, text: text, font: 'textfont', klass: 'defined-text', anchor: \"start\", startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\tsize = getTextSize.calc(text, 'textfont', 'defined-text');\n\t\tthis.rows.push({ move: size.height });\n\t} else if (text) {\n\t\tvar maxHeight = 0;\n\t\tvar leftSide = paddingLeft;\n\t\tvar currentFont = 'textfont';\n\t\tfor (var i = 0; i < text.length; i++) {\n\t\t\tif (text[i].font) {\n\t\t\t\tcurrentFont = text[i].font;\n\t\t\t} else\n\t\t\t\tcurrentFont = 'textfont';\n\t\t\tthis.rows.push({ left: leftSide, text: text[i].text, font: currentFont, klass: 'defined-text', anchor: 'start', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(text[i].text, getFontAndAttr.calc(currentFont, 'defined-text').font, 'defined-text');\n\t\t\tleftSide += size.width + size.height / 2; // add a little padding to the right side. The height of the font is probably a close enough approximation.\n\t\t\tmaxHeight = Math.max(maxHeight, size.height)\n\t\t}\n\t\tthis.rows.push({ move: maxHeight });\n\t} else {\n\t\t// The structure is wrong here: it requires an array to do centering, but it shouldn't have.\n\t\tif (info.length === 1) {\n\t\t\tvar x = width / 2;\n\t\t\tthis.rows.push({ left: x, text: info[0].text, font: 'textfont', klass: 'defined-text', anchor: 'middle', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(info[0].text, 'textfont', 'defined-text');\n\t\t\tthis.rows.push({ move: size.height });\n\t\t}\n\t}\n}\n\nmodule.exports = FreeText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/free-text.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/glissando-element.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/glissando-element.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var GlissandoElem = function GlissandoElem(anchor1, anchor2) {\n\tthis.type = \"GlissandoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n};\n\nmodule.exports = GlissandoElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/glissando-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/relative-element.js":
/*!****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/relative-element.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_relative_element.js: Definition of the RelativeElement class.\n\nvar RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\topt = opt || {};\n\tthis.x = 0;\n\tthis.c = c;      // character or path or string\n\tthis.dx = dx;    // relative x position\n\tthis.w = w;      // minimum width taken up by this element (can include gratuitous space)\n\tthis.pitch = pitch; // relative y position by pitch\n\tthis.scalex = opt.scalex || 1; // should the character/path be scaled?\n\tthis.scaley = opt.scaley || 1; // should the character/path be scaled?\n\tthis.type = opt.type || \"symbol\"; // cheap types.\n\tthis.pitch2 = opt.pitch2;\n\tthis.linewidth = opt.linewidth;\n\tthis.klass = opt.klass;\n\tthis.anchor = opt.anchor ? opt.anchor : 'middle'\n\tthis.top = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 > this.top) this.top = this.pitch2;\n\tthis.bottom = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 < this.bottom) this.bottom = this.pitch2;\n\tif (opt.thickness) {\n\t\tthis.top += opt.thickness / 2;\n\t\tthis.bottom -= opt.thickness / 2;\n\t}\n\tif (opt.stemHeight) {\n\t\tif (opt.stemHeight > 0)\n\t\t\tthis.top += opt.stemHeight;\n\t\telse\n\t\t\tthis.bottom += opt.stemHeight;\n\t}\n\tif (opt.dim)\n\t\tthis.dim = opt.dim;\n\tif (opt.position)\n\t\tthis.position = opt.position;\n\tthis.height = opt.height ? opt.height : 4; // The +1 is to give a little bit of padding.\n\tif (opt.top)\n\t\tthis.top = opt.top;\n\tif (opt.bottom)\n\t\tthis.bottom = opt.bottom;\n\tif (opt.name)\n\t\tthis.name = opt.name;\n\telse if (this.c)\n\t\tthis.name = this.c;\n\telse\n\t\tthis.name = this.type;\n\tif (opt.realWidth)\n\t\tthis.realWidth = opt.realWidth;\n\telse\n\t\tthis.realWidth = this.w;\n\tthis.centerVertically = false;\n\tswitch (this.type) {\n\t\tcase \"debug\":\n\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.lyricHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.lyricHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tif (this.pitch === undefined) {\n\t\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\t\telse\n\t\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\t} else\n\t\t\t\tthis.centerVertically = true;\n\t\t\tbreak;\n\t\tcase \"part\": this.partHeightAbove = this.height; break;\n\t}\n};\n\nRelativeElement.prototype.getChordDim = function () {\n\tif (this.type === \"debug\")\n\t\treturn null;\n\tif (!this.chordHeightAbove && !this.chordHeightBelow)\n\t\treturn null;\n\t// Chords are centered, annotations are left justified.\n\t// NOTE: the font reports extra space to the left and right anyway, so there is a built in margin.\n\t// We add a little margin so that items can't touch - we use half the font size as the margin, so that is 1/4 on each side.\n\t// if there is only one character that we're printing, use half of that margin.\n\t// var margin = this.dim.font.size/4;\n\t// if (this.c.length === 1)\n\t// \tmargin = margin / 2;\n\tvar margin = 0;\n\n\tvar offset = this.type === \"chord\" ? this.realWidth / 2 : 0;\n\tvar left = this.x - offset - margin;\n\tvar right = left + this.realWidth + margin;\n\treturn { left: left, right: right };\n};\n\nRelativeElement.prototype.invertLane = function (total) {\n\tif (this.lane === undefined)\n\t\tthis.lane = 0;\n\tthis.lane = total - this.lane - 1;\n};\n\nRelativeElement.prototype.putChordInLane = function (i) {\n\tthis.lane = i;\n\t// Add some extra space to account for the character's descenders.\n\tif (this.chordHeightAbove)\n\t\tthis.chordHeightAbove = (this.height * 1.25) * this.lane;\n\telse\n\t\tthis.chordHeightBelow = (this.height * 1.25) * this.lane;\n};\n\nRelativeElement.prototype.getLane = function () {\n\tif (this.lane === undefined)\n\t\treturn 0;\n\treturn this.lane;\n};\n\nRelativeElement.prototype.setX = function (x) {\n\tthis.x = x + this.dx;\n};\n\nmodule.exports = RelativeElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/relative-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/rich-text.js":
/*!*********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/rich-text.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const addTextIf = __webpack_require__(/*! ../add-text-if */ \"./node_modules/abcjs/src/write/creation/add-text-if.js\");\n\nfunction richText(rows, str, defFont, klass, name, paddingLeft, attr, getTextSize) {\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\tif (str === '') {\n\t\trows.push({ move: space.height });\n\t} else {\n\t\tif (typeof str === 'string') {\n\t\t\taddTextIf(rows, { marginLeft: paddingLeft, text: str, font: defFont, klass: klass, marginTop: attr.marginTop, anchor: attr.anchor, absElemType: attr.absElemType, info: attr.info, name: name }, getTextSize);\n\t\t\treturn\n\t\t}\n\t\tif (attr.marginTop)\n\t\t\trows.push({move: attr.marginTop})\n\n\t\tvar largestY = 0;\n\t\tvar gap = 0;\n\t\tvar row = {\n\t\t\tleft: paddingLeft,\n\t\t\tanchor: attr.anchor,\n\t\t\tphrases: []\n\t\t}\n\t\tif (klass)\n\t\t\trow.klass = klass\n\t\trows.push(row)\n\t\tfor (var k = 0; k < str.length; k++) {\n\t\t\tvar thisWord = str[k];\n\t\t\tvar font = (thisWord.font) ? thisWord.font : getTextSize.attr(defFont, klass).font;\n\t\t\tvar phrase = {\n\t\t\t\tcontent: thisWord.text,\n\t\t\t}\n\t\t\tif (font)\n\t\t\t\tphrase.attrs = {\n\t\t\t\t\t\"font-family\": getTextSize.getFamily(font.face),\n\t\t\t\t\t\"font-size\": font.size,\n\t\t\t\t\t\"font-weight\": font.weight,\n\t\t\t\t\t\"font-style\": font.style,\n\t\t\t\t\t\"font-decoration\": font.decoration,\n\t\t\t}\n\t\t\t//if (thisWord.text) {\n\t\t\t\trow.phrases.push(phrase);\n\t\t\t\tvar size = getTextSize.calc(thisWord.text, font, klass);\n\t\t\t\tlargestY = Math.max(largestY, size.height);\n\t\t\t\tif (thisWord.text[thisWord.text.length - 1] === ' ') {\n\t\t\t\t\tgap = space.width\n\t\t\t\t}\n\t\t}\n\t\trows.push({ move: largestY });\n\t}\n}\n\nmodule.exports = richText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/rich-text.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/separator.js":
/*!*********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/separator.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function Separator(spaceAbove, lineLength, spaceBelow) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tthis.rows.push({ separator: lineLength, absElemType: \"separator\" });\n\tif (spaceBelow)\n\t\tthis.rows.push({ move: spaceBelow });\n}\n\nmodule.exports = Separator;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/separator.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/staff-group-element.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/staff-group-element.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_staff_group_element.js: Definition of the StaffGroupElement class.\n\n// StaffGroupElement contains all the elements that go together to make one line of music.\n// That might be multiple staves that are tied together, and it might be multiple voices on one staff.\n//\n// Methods:\n// constructor: some basic initialization\n// addVoice(): Called once for each voice. May add a new staff if needed.\n// finished(): Called only internally by layout()\n// layout(): This does all the layout. It sets the following: spacingunits, startx, minspace, w, and the x-coordinate of each element in each voice.\n// draw(): Calls the underlying methods on the voice objects to do the drawing. Sets y and height.\n//\n// Members:\n// staffs: an array of all the staves in this group. Each staff contains the following elements:\n//    { top, bottom, highest, lowest, y }\n// voices: array of VoiceElement objects. This is mostly passed in, but the VoiceElement objects are modified here.\n//\n// spacingunits: number of relative x-units in the line. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// minspace: smallest space between two notes. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// startx: The left edge, taking the margin and the optional voice name. Used by the draw() method.\n// w: The width of the line. Used by calling function to pass back in as the \"spacing\" input parameter, and the draw() method.\n// TODO-PER: This should actually be passed back as a return value.  (TODO-PER: in pixels or spacing units?)\n// y: The top of the staff group, in pixels. This is set in the draw method.\n// TODO-PER: Where is that used? It looks like it might not be needed.\n// height: Set in the draw() method to the height actually used. Used by the calling function to know where to start the next staff group.\n// TODO-PER: This should actually be set in the layout method and passed back as a return value.\nvar calcHeight = __webpack_require__(/*! ../calc-height */ \"./node_modules/abcjs/src/write/creation/calc-height.js\");\n\nvar StaffGroupElement = function (getTextSize) {\n\tthis.getTextSize = getTextSize;\n\tthis.voices = [];\n\tthis.staffs = [];\n\tthis.brace = undefined; //tony\n\tthis.bracket = undefined;\n};\n\nStaffGroupElement.prototype.setLimit = function (member, voice) {\n\tif (!voice.specialY[member]) return;\n\tif (!voice.staff.specialY[member])\n\t\tvoice.staff.specialY[member] = voice.specialY[member];\n\telse\n\t\tvoice.staff.specialY[member] = Math.max(voice.staff.specialY[member], voice.specialY[member]);\n};\n\nStaffGroupElement.prototype.addVoice = function (voice, staffnumber, stafflines) {\n\tvar voiceNum = this.voices.length;\n\tthis.voices[voiceNum] = voice;\n\tif (this.staffs[staffnumber])\n\t\tthis.staffs[staffnumber].voices.push(voiceNum);\n\telse {\n\t\t// TODO-PER: how does the min/max change when stafflines is not 5?\n\t\tthis.staffs[this.staffs.length] = {\n\t\t\ttop: 10,\n\t\t\tbottom: 2,\n\t\t\tlines: stafflines,\n\t\t\tvoices: [voiceNum],\n\t\t\tspecialY: {\n\t\t\t\ttempoHeightAbove: 0,\n\t\t\t\tpartHeightAbove: 0,\n\t\t\t\tvolumeHeightAbove: 0,\n\t\t\t\tdynamicHeightAbove: 0,\n\t\t\t\tendingHeightAbove: 0,\n\t\t\t\tchordHeightAbove: 0,\n\t\t\t\tlyricHeightAbove: 0,\n\n\t\t\t\tlyricHeightBelow: 0,\n\t\t\t\tchordHeightBelow: 0,\n\t\t\t\tvolumeHeightBelow: 0,\n\t\t\t\tdynamicHeightBelow: 0\n\t\t\t}\n\t\t};\n\t}\n\tvoice.staff = this.staffs[staffnumber];\n};\n\nStaffGroupElement.prototype.setHeight = function () {\n\tthis.height = calcHeight(this);\n};\n\nStaffGroupElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n\tfor (var i = 0; i < this.voices.length; i++) {\n\t\tthis.voices[i].setWidth(width);\n\t}\n};\n\nStaffGroupElement.prototype.setStaffLimits = function (voice) {\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n\tthis.setLimit('tempoHeightAbove', voice);\n\tthis.setLimit('partHeightAbove', voice);\n\tthis.setLimit('volumeHeightAbove', voice);\n\tthis.setLimit('dynamicHeightAbove', voice);\n\tthis.setLimit('endingHeightAbove', voice);\n\tthis.setLimit('chordHeightAbove', voice);\n\tthis.setLimit('lyricHeightAbove', voice);\n\tthis.setLimit('lyricHeightBelow', voice);\n\tthis.setLimit('chordHeightBelow', voice);\n\tthis.setLimit('volumeHeightBelow', voice);\n\tthis.setLimit('dynamicHeightBelow', voice);\n};\n\nmodule.exports = StaffGroupElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/staff-group-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/subtitle.js":
/*!********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/subtitle.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function Subtitle(spaceAbove, formatting, info, center, paddingLeft, getTextSize) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : center;\n\tthis.rows.push({ left: tLeft, text: info.text, font: 'subtitlefont', klass: 'text subtitle', anchor: tAnchor, startChar: info.startChar, endChar: info.endChar, absElemType: \"subtitle\", name: \"subtitle\" });\n\tvar size = getTextSize.calc(info.text, 'subtitlefont', 'text subtitle');\n\tthis.rows.push({ move: size.height });\n}\n\nmodule.exports = Subtitle;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/subtitle.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/tempo-element.js":
/*!*************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/tempo-element.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_tempo_element.js: Definition of the TempoElement class.\n\nvar AbsoluteElement = __webpack_require__(/*! ./absolute-element */ \"./node_modules/abcjs/src/write/creation/elements/absolute-element.js\");\nvar RelativeElement = __webpack_require__(/*! ./relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\n\nvar TempoElement = function TempoElement(tempo, tuneNumber, createNoteHead) {\n\tthis.type = \"TempoElement\";\n\tthis.tempo = tempo;\n\tthis.tempo.type = \"tempo\"; /// TODO-PER: this should be set earlier, in the parser, probably.\n\tthis.tuneNumber = tuneNumber;\n\t// TODO: can these two properties be merged?\n\tthis.totalHeightInPitches = 6;\n\tthis.tempoHeightAbove = this.totalHeightInPitches;\n\tthis.pitch = undefined; // This will be set later\n\tif (this.tempo.duration && !this.tempo.suppressBpm) {\n\t\tthis.note = this.createNote(createNoteHead, tempo, tuneNumber);\n\t}\n};\n\nTempoElement.prototype.setX = function (x) {\n\tthis.x = x;\n};\n\nTempoElement.prototype.createNote = function (createNoteHead, tempo, tuneNumber) {\n\tvar temposcale = 0.75;\n\tvar duration = tempo.duration[0]; // TODO when multiple durations\n\tvar absElem = new AbsoluteElement(tempo, duration, 1, 'tempo', tuneNumber);\n\t// There aren't an infinite number of note values, but we are passed a float, so just in case something is off upstream,\n\t// merge all of the in between points.\n\tvar dot;\n\tvar flag;\n\tvar note;\n\tif (duration <= 1 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u32nd\"; dot = 0; }\n\telse if (duration <= 1 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u16th\"; dot = 0; }\n\telse if (duration <= 3 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u16nd\"; dot = 1; }\n\telse if (duration <= 1 / 8) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 0; }\n\telse if (duration <= 3 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 1; }\n\telse if (duration <= 1 / 4) { note = \"noteheads.quarter\"; dot = 0; }\n\telse if (duration <= 3 / 8) { note = \"noteheads.quarter\"; dot = 1; }\n\telse if (duration <= 1 / 2) { note = \"noteheads.half\"; dot = 0; }\n\telse if (duration <= 3 / 4) { note = \"noteheads.half\"; dot = 1; }\n\telse if (duration <= 1) { note = \"noteheads.whole\"; dot = 0; }\n\telse if (duration <= 1.5) { note = \"noteheads.whole\"; dot = 1; }\n\telse if (duration <= 2) { note = \"noteheads.dbl\"; dot = 0; }\n\telse { note = \"noteheads.dbl\"; dot = 1; }\n\n\tvar ret = createNoteHead(absElem, note, { verticalPos: 0 }, // This is just temporary: we'll offset the vertical positioning when we get the actual vertical spot.\n\t\t{ dir: \"up\", flag: flag, dot: dot, scale: temposcale });\n\tvar tempoNote = ret.notehead;\n\tabsElem.addHead(tempoNote);\n\tvar stem;\n\tif (note !== \"noteheads.whole\" && note !== \"noteheads.dbl\") {\n\t\tvar p1 = 1 / 3 * temposcale;\n\t\tvar p2 = 5 * temposcale;\n\t\tvar dx = tempoNote.dx + tempoNote.w;\n\t\tvar width = -0.6;\n\t\tstem = new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width });\n\t\tabsElem.addRight(stem);\n\t}\n\treturn absElem;\n};\n\nmodule.exports = TempoElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/tempo-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/tie-element.js":
/*!***********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/tie-element.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_tie_element.js: Definition of the TieElement class.\n\nvar TieElem = function TieElem(options) {\n\tthis.type = \"TieElem\";\n\t//\tconsole.log(\"constructor\", options.anchor1 ? options.anchor1.pitch : \"N/A\", options.anchor2 ? options.anchor2.pitch : \"N/A\", options.isTie, options.isGrace);\n\tthis.anchor1 = options.anchor1; // must have a .x and a .pitch, and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = options.anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\tif (options.isGrace)\n\t\tthis.isGrace = true;\n\tif (options.fixedY)\n\t\tthis.fixedY = true;\n\tif (options.stemDir)\n\t\tthis.stemDir = options.stemDir;\n\tif (options.voiceNumber !== undefined)\n\t\tthis.voiceNumber = options.voiceNumber;\n\tif (options.style !== undefined)\n\t\tthis.dotted = true;\n\tthis.internalNotes = [];\n};\n\nTieElem.prototype.addInternalNote = function (note) {\n\tthis.internalNotes.push(note);\n};\n\nTieElem.prototype.setEndAnchor = function (anchor2) {\n\t//\tconsole.log(\"end\", this.anchor1 ? this.anchor1.pitch : \"N/A\", anchor2 ? anchor2.pitch : \"N/A\", this.isTie, this.isGrace);\n\tthis.anchor2 = anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\n\t// we don't really have enough info to know what the vertical extent is yet and we won't until drawing. This will just give it enough\n\t// room on either side (we don't even know if the slur will be above yet). We need to set this so that we can make sure the voice has\n\t// at least enough room that the line doesn't get cut off if the tie or slur is the lowest thing.\n\tif (this.anchor1) {\n\t\tthis.top = Math.max(this.anchor1.pitch, this.anchor2.pitch) + 4\n\t\tthis.bottom = Math.min(this.anchor1.pitch, this.anchor2.pitch) - 4\n\t} else {\n\t\tthis.top = this.anchor2.pitch + 4\n\t\tthis.bottom = this.anchor2.pitch - 4\n\t}\n};\n\n// If we encounter a repeat sign, then we don't want to extend either a tie or a slur past it, so these are called to be a limit.\nTieElem.prototype.setStartX = function (startLimitElem) {\n\tthis.startLimitX = startLimitElem;\n};\n\nTieElem.prototype.setEndX = function (endLimitElem) {\n\tthis.endLimitX = endLimitElem;\n};\n\nTieElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nTieElem.prototype.calcTieDirection = function () {\n\t// The rules:\n\t// 1) If it is in a grace note group, then the direction is always BELOW.\n\t// 2) If it is in a single voice, then the direction is always OPPOSITE of the stem (or where the stem would have been in the case of whole notes.)\n\t// 3) If the stem direction is forced (probably because there are two voices on the same line), then the direction is the SAME as the stem direction.\n\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar referencePitch;\n\t\tif (this.anchor1)\n\t\t\treferencePitch = this.anchor1.pitch;\n\t\telse if (this.anchor2)\n\t\t\treferencePitch = this.anchor2.pitch;\n\t\telse\n\t\t\treferencePitch = 14; // TODO-PER: this can't really happen normally. This would imply that a tie crossed over three lines, something like \"C-\\nz\\nC\"\n\t\t// Put the arc in the opposite direction of the stem. That isn't always the pitch if one or both of the notes are beamed with something that affects its stem.\n\t\tif ((this.anchor1 && this.anchor1.stemDir === 'down') && (this.anchor2 && this.anchor2.stemDir === \"down\"))\n\t\t\tthis.above = true;\n\t\telse if ((this.anchor1 && this.anchor1.stemDir === 'up') && (this.anchor2 && this.anchor2.stemDir === \"up\"))\n\t\t\tthis.above = false;\n\t\telse if (this.anchor1 && this.anchor2)\n\t\t\tthis.above = referencePitch >= 6;\n\t\telse if (this.anchor1)\n\t\t\tthis.above = this.anchor1.stemDir === \"down\";\n\t\telse if (this.anchor2)\n\t\t\tthis.above = this.anchor2.stemDir === \"down\";\n\t\telse\n\t\t\tthis.above = referencePitch >= 6;\n\t}\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) Slurs are placed under the note heads if all stems go up.\n// 2) Slurs are placed over the note heads if all stems go down.\n// 3) If there are both up stems and down stems, prefer placing the slur over.\n// 4) When the staff has opposite stemmed voices, all slurs should be on the stemmed side.\n\nTieElem.prototype.calcSlurDirection = function () {\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar hasDownStem = false;\n\t\tif (this.anchor1 && this.anchor1.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tif (this.anchor2 && this.anchor2.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tvar n = this.internalNotes[i];\n\t\t\tif (n.stemDir === \"down\")\n\t\t\t\thasDownStem = true;\n\t\t}\n\t\tthis.above = hasDownStem;\n\t}\n};\n\nTieElem.prototype.calcX = function (lineStartX, lineEndX) {\n\tif (this.anchor1) {\n\t\tthis.startX = this.anchor1.x; // The normal case where there is a starting element to attach to.\n\t\tif (this.anchor1.scalex < 1) // this is a grace note - don't offset the tie as much.\n\t\t\tthis.startX -= 3;\n\t} else if (this.startLimitX)\n\t\tthis.startX = this.startLimitX.x + this.startLimitX.w; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse {\n\t\tif (this.anchor2)\n\t\t\tthis.startX = this.anchor2.x - 20; // There is no element and no repeat mark: make a small arc\n\t\telse\n\t\t\tthis.startX = lineStartX; // Don't have any guidance, so extend to beginning of line\n\t}\n\tif (!this.anchor1 && this.dotted)\n\t\tthis.startX -= 3; // The arc needs to be long enough to tell that it is dotted.\n\n\tif (this.anchor2)\n\t\tthis.endX = this.anchor2.x; // The normal case where there is a starting element to attach to.\n\telse if (this.endLimitX)\n\t\tthis.endX = this.endLimitX.x; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse\n\t\tthis.endX = lineEndX; // There is no element and no repeat mark: extend to the beginning of the line.\n};\n\nTieElem.prototype.calcTieY = function () {\n\t// If the tie comes from another line, then one or both anchors will be missing.\n\tif (this.anchor1)\n\t\tthis.startY = this.anchor1.pitch;\n\telse if (this.anchor2)\n\t\tthis.startY = this.anchor2.pitch;\n\telse\n\t\tthis.startY = this.above ? 14 : 0;\n\n\tif (this.anchor2)\n\t\tthis.endY = this.anchor2.pitch;\n\telse if (this.anchor1)\n\t\tthis.endY = this.anchor1.pitch;\n\telse\n\t\tthis.endY = this.above ? 14 : 0;\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) If the anchor note is down stem, the slur points to the note head.\n// 2) If the anchor note is up stem, and the slur is over, then point to middle of stem.\n\nTieElem.prototype.calcSlurY = function () {\n\tif (this.anchor1 && this.anchor2) {\n\t\tif (this.above && this.anchor1.stemDir === \"up\" && !this.fixedY) {\n\t\t\tthis.startY = (this.anchor1.highestVert + this.anchor1.pitch) / 2;\n\t\t\tthis.startX += this.anchor1.w / 2; // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.startY = this.anchor1.pitch;\n\n\t\t// If the closing note has an up stem, and it is beamed, and it isn't the first note in the beam, then the beam will get in the way.\n\t\tvar beamInterferes = this.anchor2.parent.beam && this.anchor2.parent.beam.stemsUp && this.anchor2.parent.beam.elems[0] !== this.anchor2.parent;\n\t\tvar midPoint = (this.anchor2.highestVert + this.anchor2.pitch) / 2;\n\t\tif (this.above && this.anchor2.stemDir === \"up\" && !this.fixedY && !beamInterferes && (midPoint < this.startY)) {\n\t\t\tthis.endY = midPoint;\n\t\t\tthis.endX += Math.round(this.anchor2.w / 2); // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.endY = this.above && beamInterferes ? this.anchor2.highestVert : this.anchor2.pitch;\n\n\t\tif (this.anchor1.scalex === 1) { // Need a way to tell if this is a grace note - if so then keep the slur as close as possible. TODO-PER-HACK: this should be more declaratively determined.\n\t\t\tvar hasBeam1 = !!this.anchor1.parent.beam\n\t\t\tvar hasBeam2 = !!this.anchor2.parent.beam\n\t\t\tif (hasBeam1) {\n\t\t\t\tvar isLastInBeam = this.anchor1.parent === this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1]\n\t\t\t\tif (!isLastInBeam) {\n\t\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasBeam2) {\n\t\t\t\tvar isFirstInBeam = this.anchor2.parent === this.anchor2.parent.beam.elems[0]\n\t\t\t\tif (!isFirstInBeam) {\n\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (this.anchor1) {\n\t\tthis.startY = this.endY = this.anchor1.pitch;\n\t} else if (this.anchor2) {\n\t\tthis.startY = this.endY = this.anchor2.pitch;\n\t} else {\n\t\t// This is the case where the slur covers the entire line.\n\t\t// TODO-PER: figure out where the real top and bottom of the line are.\n\t\tthis.startY = this.above ? 14 : 0;\n\t\tthis.endY = this.above ? 14 : 0;\n\t}\n};\n\nTieElem.prototype.avoidCollisionAbove = function () {\n\t// Double check that an interior note in the slur isn't so high that it interferes.\n\tif (this.above) {\n\t\tvar maxInnerHeight = -50;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tif (this.internalNotes[i].highestVert > maxInnerHeight)\n\t\t\t\tmaxInnerHeight = this.internalNotes[i].highestVert;\n\t\t}\n\t\tif (maxInnerHeight > this.startY && maxInnerHeight > this.endY)\n\t\t\tthis.startY = this.endY = maxInnerHeight - 1;\n\t}\n};\n\nTieElem.prototype.getYBounds = function () {\n\tvar lineStartX = 10 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much\n\tvar lineEndX = 1000 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much\n\tif (this.isTie) {\n\t\tthis.calcTieDirection();\n\t\tthis.calcX(lineStartX, lineEndX);\n\t\tthis.calcTieY();\n\n\t} else {\n\t\tthis.calcSlurDirection();\n\t\tthis.calcX(lineStartX, lineEndX);\n\t\tthis.calcSlurY();\n\t}\n\tvar top;\n\tvar bottom;\n\t// TODO-PER: It's hard to tell how far the arc is, so I'm just using 3 as the max\n\tif (this.above) {\n\t\tbottom = Math.min(this.startY, this.endY)\n\t\ttop = bottom + 3\n\t} else {\n\t\ttop = Math.min(this.startY, this.endY)\n\t\tbottom = top - 3\n\t}\n\treturn [ top, bottom ]\n};\n\nmodule.exports = TieElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/tie-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/top-text.js":
/*!********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/top-text.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const addTextIf = __webpack_require__(/*! ../add-text-if */ \"./node_modules/abcjs/src/write/creation/add-text-if.js\");\nconst richText = __webpack_require__(/*! ./rich-text */ \"./node_modules/abcjs/src/write/creation/elements/rich-text.js\");\n\nfunction TopText(metaText, metaTextInfo, formatting, lines, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\n\tif (metaText.header && isPrint) {\n\t\t// Note: whether there is a header or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\t\t// This text goes above the margin, so we'll temporarily move up.\n\t\tvar headerTextHeight = getTextSize.calc(\"X\", \"headerfont\", 'abcjs-header abcjs-meta-top').height;\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.header.left, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: metaText.header.center, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'middle', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: metaText.header.right, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'end', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\n\t\t//\t\tTopText.prototype.addTextIf = function (marginLeft, text, font, klass, marginTop, marginBottom, anchor, getTextSize, absElemType, noMove) {\n\t}\n\tif (isPrint)\n\t\tthis.rows.push({ move: spacing.top });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : paddingLeft + width / 2;\n\tif (metaText.title) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-title' : ''\n\t\trichText(this.rows, metaText.title, \"titlefont\", klass, 'title', tLeft, {marginTop: spacing.title, anchor: tAnchor, absElemType: \"title\", info: metaTextInfo.title},  getTextSize)\n\t}\n\tif (lines.length) {\n\t\tvar index = 0;\n\t\twhile (index < lines.length && lines[index].subtitle) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-text abcjs-subtitle' : ''\n\t\t\trichText(this.rows, lines[index].subtitle.text, \"subtitlefont\", klass, 'subtitle', tLeft, {marginTop: spacing.subtitle, anchor: tAnchor, absElemType: \"subtitle\", info: lines[index].subtitle},  getTextSize)\n\t\t\tindex++;\n\t\t}\n\t}\n\n\tif (metaText.rhythm || metaText.origin || metaText.composer) {\n\t\tthis.rows.push({ move: spacing.composer });\n\t\tif (metaText.rhythm && metaText.rhythm.length > 0) {\n\t\t\tvar noMove = !!(metaText.composer || metaText.origin);\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-rhythm' : ''\n\t\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.rhythm, font: 'infofont', klass: klass, absElemType: \"rhythm\", noMove: noMove, info: metaTextInfo.rhythm, name: \"rhythm\" }, getTextSize);\n\t\t}\n\t\tvar hasSimpleComposerLine = true\n\t\tif (metaText.composer && typeof metaText.composer !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\tif (metaText.origin && typeof metaText.origin !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\t\t\n\t\tvar composerLine = metaText.composer ? metaText.composer : '';\n\t\tif (metaText.origin) {\n\t\t\tif (typeof composerLine === 'string' && typeof metaText.origin === 'string')\n\t\t\t\tcomposerLine += ' (' + metaText.origin + ')';\n\t\t\telse if (typeof composerLine === 'string' && typeof metaText.origin !== 'string') {\n\t\t\t\tcomposerLine = [{text:composerLine}]\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t} else {\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t}\n\t\t}\n\t\tif (composerLine) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-composer' : ''\n\t\t\trichText(this.rows, composerLine, 'composerfont', klass, \"composer\", paddingLeft+width, {anchor: \"end\", absElemType: \"composer\", info: metaTextInfo.composer, ingroup: true}, getTextSize)\n\t\t}\n\t}\n\n\tif (metaText.author && metaText.author.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-author' : ''\n\t\trichText(this.rows, metaText.author, 'composerfont', klass, \"author\", paddingLeft+width, {anchor: \"end\", absElemType: \"author\", info: metaTextInfo.author}, getTextSize)\n\t}\n\n\tif (metaText.partOrder && metaText.partOrder.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-part-order' : ''\n\t\trichText(this.rows, metaText.partOrder, 'partsfont', klass, \"part-order\", paddingLeft, {absElemType: \"partOrder\", info: metaTextInfo.partOrder, anchor: 'start'}, getTextSize)\n\n\t}\n}\n\nmodule.exports = TopText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/top-text.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/triplet-element.js":
/*!***************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/triplet-element.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_triplet_element.js: Definition of the TripletElem class.\n\nvar TripletElem = function TripletElem(number, anchor1, options) {\n\tthis.type = \"TripletElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after key signature)\n\tthis.number = number;\n\tthis.durationClass = ('d' + (Math.round(anchor1.parent.durationClass * 1000) / 1000)).replace(/\\./, '-');\n\tthis.middleElems = []; // This is to calculate the highest interior pitch. It is used to make sure that the drawn bracket never crosses a really high middle note.\n\tthis.flatBeams = options.flatBeams;\n};\n\nTripletElem.prototype.isClosed = function () {\n\treturn !!this.anchor2;\n};\n\nTripletElem.prototype.middleNote = function (elem) {\n\tthis.middleElems.push(elem);\n};\n\nTripletElem.prototype.setCloseAnchor = function (anchor2) {\n\tthis.anchor2 = anchor2;\n\t// TODO-PER: This used to be just for beamed triplets but it looks like bracketed triplets need extra room, too. The only one that doesn't is stem down and beamed\n\t//if (this.anchor1.parent.beam)\n\tif (!this.anchor1.parent.beam || this.anchor1.stemDir === 'up')\n\t\tthis.endingHeightAbove = 4;\n};\n\nmodule.exports = TripletElem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/triplet-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/elements/voice-element.js":
/*!*************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/elements/voice-element.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_voice_element.js: Definition of the VoiceElement class.\n\nvar VoiceElement = function VoiceElement(voicenumber, voicetotal) {\n\tthis.children = [];\n\tthis.beams = [];\n\tthis.otherchildren = []; // ties, slurs, triplets\n\tthis.w = 0;\n\tthis.duplicate = false;\n\tthis.voicenumber = voicenumber; //number of the voice on a given stave (not staffgroup)\n\tthis.voicetotal = voicetotal;\n\tthis.bottom = 7;\n\tthis.top = 7;\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nVoiceElement.prototype.addChild = function (absElem) {\n\t// This is always passed an AbsoluteElement\n\tif (absElem.type === 'bar') {\n\t\tvar firstItem = true;\n\t\tfor (var i = 0; firstItem && i < this.children.length; i++) {\n\t\t\tif (this.children[i].type.indexOf(\"staff-extra\") < 0 && this.children[i].type !== \"tempo\")\n\t\t\t\tfirstItem = false;\n\t\t}\n\t\tif (!firstItem) {\n\t\t\tthis.beams.push(\"bar\");\n\t\t\tthis.otherchildren.push(\"bar\");\n\t\t}\n\t}\n\tthis.children[this.children.length] = absElem;\n\tthis.setRange(absElem);\n};\n\nVoiceElement.prototype.setLimit = function (member, child) {\n\t// Sometimes we get an absolute element in here and sometimes we get some type of relative element.\n\t// If there is a \"specialY\" element, then assume it is an absolute element. If that doesn't exist, look for the\n\t// same members at the top level, because that's where they are in relative elements.\n\tvar specialY = child.specialY;\n\tif (!specialY) specialY = child;\n\tif (!specialY[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = specialY[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], specialY[member]);\n};\n\nVoiceElement.prototype.adjustRange = function (child) {\n\tif (child.bottom !== undefined)\n\t\tthis.bottom = Math.min(this.bottom, child.bottom);\n\tif (child.top !== undefined)\n\t\tthis.top = Math.max(this.top, child.top);\n};\n\nVoiceElement.prototype.setRange = function (child) {\n\tthis.adjustRange(child);\n\tthis.setLimit('tempoHeightAbove', child);\n\tthis.setLimit('partHeightAbove', child);\n\tthis.setLimit('volumeHeightAbove', child);\n\tthis.setLimit('dynamicHeightAbove', child);\n\tthis.setLimit('endingHeightAbove', child);\n\tthis.setLimit('chordHeightAbove', child);\n\tthis.setLimit('lyricHeightAbove', child);\n\tthis.setLimit('lyricHeightBelow', child);\n\tthis.setLimit('chordHeightBelow', child);\n\tthis.setLimit('volumeHeightBelow', child);\n\tthis.setLimit('dynamicHeightBelow', child);\n};\n\nVoiceElement.prototype.addOther = function (child) {\n\tthis.otherchildren.push(child);\n\tthis.setRange(child);\n};\n\nVoiceElement.prototype.addBeam = function (child) {\n\tthis.beams.push(child);\n};\n\nVoiceElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n};\n\nmodule.exports = VoiceElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/elements/voice-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/glyphs.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/glyphs.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\n\n/**\n * Glyphs and some methods to adjust for their x and y baseline\n */\nvar glyphs =\n{\n\t'0': { d: [['M', 4.83, -14.97], ['c', 0.33, -0.03, 1.11, 0.00, 1.47, 0.06], ['c', 1.68, 0.36, 2.97, 1.59, 3.78, 3.60], ['c', 1.20, 2.97, 0.81, 6.96, -0.90, 9.27], ['c', -0.78, 1.08, -1.71, 1.71, -2.91, 1.95], ['c', -0.45, 0.09, -1.32, 0.09, -1.77, 0.00], ['c', -0.81, -0.18, -1.47, -0.51, -2.07, -1.02], ['c', -2.34, -2.07, -3.15, -6.72, -1.74, -10.20], ['c', 0.87, -2.16, 2.28, -3.42, 4.14, -3.66], ['z'], ['m', 1.11, 0.87], ['c', -0.21, -0.06, -0.69, -0.09, -0.87, -0.06], ['c', -0.54, 0.12, -0.87, 0.42, -1.17, 0.99], ['c', -0.36, 0.66, -0.51, 1.56, -0.60, 3.00], ['c', -0.03, 0.75, -0.03, 4.59, 0.00, 5.31], ['c', 0.09, 1.50, 0.27, 2.40, 0.60, 3.06], ['c', 0.24, 0.48, 0.57, 0.78, 0.96, 0.90], ['c', 0.27, 0.09, 0.78, 0.09, 1.05, 0.00], ['c', 0.39, -0.12, 0.72, -0.42, 0.96, -0.90], ['c', 0.33, -0.66, 0.51, -1.56, 0.60, -3.06], ['c', 0.03, -0.72, 0.03, -4.56, 0.00, -5.31], ['c', -0.09, -1.47, -0.27, -2.37, -0.60, -3.03], ['c', -0.24, -0.48, -0.54, -0.78, -0.93, -0.90], ['z']], w: 10.78, h: 14.959 },\n\t'1': { d: [['M', 3.30, -15.06], ['c', 0.06, -0.06, 0.21, -0.03, 0.66, 0.15], ['c', 0.81, 0.39, 1.08, 0.39, 1.83, 0.03], ['c', 0.21, -0.09, 0.39, -0.15, 0.42, -0.15], ['c', 0.12, 0.00, 0.21, 0.09, 0.27, 0.21], ['c', 0.06, 0.12, 0.06, 0.33, 0.06, 5.94], ['c', 0.00, 3.93, 0.00, 5.85, 0.03, 6.03], ['c', 0.06, 0.36, 0.15, 0.69, 0.27, 0.96], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.12, -0.27, 0.21, -0.60, 0.27, -0.96], ['c', 0.03, -0.18, 0.03, -1.59, 0.03, -4.29], ['c', 0.00, -3.87, 0.00, -4.05, -0.06, -4.14], ['c', -0.09, -0.15, -0.18, -0.24, -0.39, -0.24], ['c', -0.12, 0.00, -0.15, 0.03, -0.21, 0.06], ['c', -0.03, 0.06, -0.45, 0.99, -0.96, 2.13], ['c', -0.48, 1.14, -0.90, 2.10, -0.93, 2.16], ['c', -0.06, 0.15, -0.21, 0.24, -0.33, 0.24], ['c', -0.24, 0.00, -0.42, -0.18, -0.42, -0.39], ['c', 0.00, -0.06, 3.27, -7.62, 3.33, -7.74], ['z']], w: 8.94, h: 15.058 },\n\t'2': { d: [['M', 4.23, -14.97], ['c', 0.57, -0.06, 1.68, 0.00, 2.34, 0.18], ['c', 0.69, 0.18, 1.50, 0.54, 2.01, 0.90], ['c', 1.35, 0.96, 1.95, 2.25, 1.77, 3.81], ['c', -0.15, 1.35, -0.66, 2.34, -1.68, 3.15], ['c', -0.60, 0.48, -1.44, 0.93, -3.12, 1.65], ['c', -1.32, 0.57, -1.80, 0.81, -2.37, 1.14], ['c', -0.57, 0.33, -0.57, 0.33, -0.24, 0.27], ['c', 0.39, -0.09, 1.26, -0.09, 1.68, 0.00], ['c', 0.72, 0.15, 1.41, 0.45, 2.10, 0.90], ['c', 0.99, 0.63, 1.86, 0.87, 2.55, 0.75], ['c', 0.24, -0.06, 0.42, -0.15, 0.57, -0.30], ['c', 0.12, -0.09, 0.30, -0.42, 0.30, -0.51], ['c', 0.00, -0.09, 0.12, -0.21, 0.24, -0.24], ['c', 0.18, -0.03, 0.39, 0.12, 0.39, 0.30], ['c', 0.00, 0.12, -0.15, 0.57, -0.30, 0.87], ['c', -0.54, 1.02, -1.56, 1.74, -2.79, 2.01], ['c', -0.42, 0.09, -1.23, 0.09, -1.62, 0.03], ['c', -0.81, -0.18, -1.32, -0.45, -2.01, -1.11], ['c', -0.45, -0.45, -0.63, -0.57, -0.96, -0.69], ['c', -0.84, -0.27, -1.89, 0.12, -2.25, 0.90], ['c', -0.12, 0.21, -0.21, 0.54, -0.21, 0.72], ['c', 0.00, 0.12, -0.12, 0.21, -0.27, 0.24], ['c', -0.15, 0.00, -0.27, -0.03, -0.33, -0.15], ['c', -0.09, -0.21, 0.09, -1.08, 0.33, -1.71], ['c', 0.24, -0.66, 0.66, -1.26, 1.29, -1.89], ['c', 0.45, -0.45, 0.90, -0.81, 1.92, -1.56], ['c', 1.29, -0.93, 1.89, -1.44, 2.34, -1.98], ['c', 0.87, -1.05, 1.26, -2.19, 1.20, -3.63], ['c', -0.06, -1.29, -0.39, -2.31, -0.96, -2.91], ['c', -0.36, -0.33, -0.72, -0.51, -1.17, -0.54], ['c', -0.84, -0.03, -1.53, 0.42, -1.59, 1.05], ['c', -0.03, 0.33, 0.12, 0.60, 0.57, 1.14], ['c', 0.45, 0.54, 0.54, 0.87, 0.42, 1.41], ['c', -0.15, 0.63, -0.54, 1.11, -1.08, 1.38], ['c', -0.63, 0.33, -1.20, 0.33, -1.83, 0.00], ['c', -0.24, -0.12, -0.33, -0.18, -0.54, -0.39], ['c', -0.18, -0.18, -0.27, -0.30, -0.36, -0.51], ['c', -0.24, -0.45, -0.27, -0.84, -0.21, -1.38], ['c', 0.12, -0.75, 0.45, -1.41, 1.02, -1.98], ['c', 0.72, -0.72, 1.74, -1.17, 2.85, -1.32], ['z']], w: 10.764, h: 14.97 },\n\t'3': { d: [['M', 3.78, -14.97], ['c', 0.30, -0.03, 1.41, 0.00, 1.83, 0.06], ['c', 2.22, 0.30, 3.51, 1.32, 3.72, 2.91], ['c', 0.03, 0.33, 0.03, 1.26, -0.03, 1.65], ['c', -0.12, 0.84, -0.48, 1.47, -1.05, 1.77], ['c', -0.27, 0.15, -0.36, 0.24, -0.45, 0.39], ['c', -0.09, 0.21, -0.09, 0.36, 0.00, 0.57], ['c', 0.09, 0.15, 0.18, 0.24, 0.51, 0.39], ['c', 0.75, 0.42, 1.23, 1.14, 1.41, 2.13], ['c', 0.06, 0.42, 0.06, 1.35, 0.00, 1.71], ['c', -0.18, 0.81, -0.48, 1.38, -1.02, 1.95], ['c', -0.75, 0.72, -1.80, 1.20, -3.18, 1.38], ['c', -0.42, 0.06, -1.56, 0.06, -1.95, 0.00], ['c', -1.89, -0.33, -3.18, -1.29, -3.51, -2.64], ['c', -0.03, -0.12, -0.03, -0.33, -0.03, -0.60], ['c', 0.00, -0.36, 0.00, -0.42, 0.06, -0.63], ['c', 0.12, -0.30, 0.27, -0.51, 0.51, -0.75], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.51, 0.36, -0.63, 0.54, -0.60, 0.87], ['c', 0.06, 0.54, 0.54, 0.90, 1.38, 0.99], ['c', 0.36, 0.06, 0.72, 0.03, 0.96, -0.06], ['c', 0.81, -0.27, 1.29, -1.23, 1.44, -2.79], ['c', 0.03, -0.45, 0.03, -1.95, -0.03, -2.37], ['c', -0.09, -0.75, -0.33, -1.23, -0.75, -1.44], ['c', -0.33, -0.18, -0.45, -0.18, -1.98, -0.18], ['c', -1.35, 0.00, -1.41, 0.00, -1.50, -0.06], ['c', -0.18, -0.12, -0.24, -0.39, -0.12, -0.60], ['c', 0.12, -0.15, 0.15, -0.15, 1.68, -0.15], ['c', 1.50, 0.00, 1.62, 0.00, 1.89, -0.15], ['c', 0.18, -0.09, 0.42, -0.36, 0.54, -0.57], ['c', 0.18, -0.42, 0.27, -0.90, 0.30, -1.95], ['c', 0.03, -1.20, -0.06, -1.80, -0.36, -2.37], ['c', -0.24, -0.48, -0.63, -0.81, -1.14, -0.96], ['c', -0.30, -0.06, -1.08, -0.06, -1.38, 0.03], ['c', -0.60, 0.15, -0.90, 0.42, -0.96, 0.84], ['c', -0.03, 0.30, 0.06, 0.45, 0.63, 0.84], ['c', 0.33, 0.24, 0.42, 0.39, 0.45, 0.63], ['c', 0.03, 0.72, -0.57, 1.50, -1.32, 1.65], ['c', -1.05, 0.27, -2.10, -0.57, -2.10, -1.65], ['c', 0.00, -0.45, 0.15, -0.96, 0.39, -1.38], ['c', 0.12, -0.21, 0.54, -0.63, 0.81, -0.81], ['c', 0.57, -0.42, 1.38, -0.69, 2.25, -0.81], ['z']], w: 9.735, h: 14.967 },\n\t'4': { d: [['M', 8.64, -14.94], ['c', 0.27, -0.09, 0.42, -0.12, 0.54, -0.03], ['c', 0.09, 0.06, 0.15, 0.21, 0.15, 0.30], ['c', -0.03, 0.06, -1.92, 2.31, -4.23, 5.04], ['c', -2.31, 2.73, -4.23, 4.98, -4.26, 5.01], ['c', -0.03, 0.06, 0.12, 0.06, 2.55, 0.06], ['l', 2.61, 0.00], ['l', 0.00, -2.37], ['c', 0.00, -2.19, 0.03, -2.37, 0.06, -2.46], ['c', 0.03, -0.06, 0.21, -0.18, 0.57, -0.42], ['c', 1.08, -0.72, 1.38, -1.08, 1.86, -2.16], ['c', 0.12, -0.30, 0.24, -0.54, 0.27, -0.57], ['c', 0.12, -0.12, 0.39, -0.06, 0.45, 0.12], ['c', 0.06, 0.09, 0.06, 0.57, 0.06, 3.96], ['l', 0.00, 3.90], ['l', 1.08, 0.00], ['c', 1.05, 0.00, 1.11, 0.00, 1.20, 0.06], ['c', 0.24, 0.15, 0.24, 0.54, 0.00, 0.69], ['c', -0.09, 0.06, -0.15, 0.06, -1.20, 0.06], ['l', -1.08, 0.00], ['l', 0.00, 0.33], ['c', 0.00, 0.57, 0.09, 1.11, 0.30, 1.53], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.21, -0.42, 0.30, -0.96, 0.30, -1.53], ['l', 0.00, -0.33], ['l', -2.70, 0.00], ['c', -2.91, 0.00, -2.85, 0.00, -3.09, -0.15], ['c', -0.18, -0.12, -0.30, -0.39, -0.27, -0.54], ['c', 0.03, -0.06, 0.18, -0.24, 0.33, -0.45], ['c', 0.75, -0.90, 1.59, -2.07, 2.13, -3.03], ['c', 0.33, -0.54, 0.84, -1.62, 1.05, -2.16], ['c', 0.57, -1.41, 0.84, -2.64, 0.90, -4.05], ['c', 0.03, -0.63, 0.06, -0.72, 0.24, -0.81], ['l', 0.12, -0.06], ['l', 0.45, 0.12], ['c', 0.66, 0.18, 1.02, 0.24, 1.47, 0.27], ['c', 0.60, 0.03, 1.23, -0.09, 2.01, -0.33], ['z']], w: 11.795, h: 14.994 },\n\t'5': { d: [['M', 1.02, -14.94], ['c', 0.12, -0.09, 0.03, -0.09, 1.08, 0.06], ['c', 2.49, 0.36, 4.35, 0.36, 6.96, -0.06], ['c', 0.57, -0.09, 0.66, -0.06, 0.81, 0.06], ['c', 0.15, 0.18, 0.12, 0.24, -0.15, 0.51], ['c', -1.29, 1.26, -3.24, 2.04, -5.58, 2.31], ['c', -0.60, 0.09, -1.20, 0.12, -1.71, 0.12], ['c', -0.39, 0.00, -0.45, 0.00, -0.57, 0.06], ['c', -0.09, 0.06, -0.15, 0.12, -0.21, 0.21], ['l', -0.06, 0.12], ['l', 0.00, 1.65], ['l', 0.00, 1.65], ['l', 0.21, -0.21], ['c', 0.66, -0.57, 1.41, -0.96, 2.19, -1.14], ['c', 0.33, -0.06, 1.41, -0.06, 1.95, 0.00], ['c', 2.61, 0.36, 4.02, 1.74, 4.26, 4.14], ['c', 0.03, 0.45, 0.03, 1.08, -0.03, 1.44], ['c', -0.18, 1.02, -0.78, 2.01, -1.59, 2.70], ['c', -0.72, 0.57, -1.62, 1.02, -2.49, 1.20], ['c', -1.38, 0.27, -3.03, 0.06, -4.20, -0.54], ['c', -1.08, -0.54, -1.71, -1.32, -1.86, -2.28], ['c', -0.09, -0.69, 0.09, -1.29, 0.57, -1.74], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.18, 0.12, -0.36, 0.30, -0.42, 0.33], ['c', -0.36, 0.42, -0.18, 0.99, 0.36, 1.26], ['c', 0.51, 0.27, 1.47, 0.36, 2.01, 0.27], ['c', 0.93, -0.21, 1.47, -1.17, 1.65, -2.91], ['c', 0.06, -0.45, 0.06, -1.89, 0.00, -2.31], ['c', -0.15, -1.20, -0.51, -2.10, -1.05, -2.55], ['c', -0.21, -0.18, -0.54, -0.36, -0.81, -0.39], ['c', -0.30, -0.06, -0.84, -0.03, -1.26, 0.06], ['c', -0.93, 0.18, -1.65, 0.60, -2.16, 1.20], ['c', -0.15, 0.21, -0.27, 0.30, -0.39, 0.30], ['c', -0.15, 0.00, -0.30, -0.09, -0.36, -0.18], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.66], ['c', 0.00, -3.39, 0.00, -3.57, 0.06, -3.66], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.18], ['z']], w: 10.212, h: 14.997 },\n\t'6': { d: [['M', 4.98, -14.97], ['c', 0.36, -0.03, 1.20, 0.00, 1.59, 0.06], ['c', 0.90, 0.15, 1.68, 0.51, 2.25, 1.05], ['c', 0.57, 0.51, 0.87, 1.23, 0.84, 1.98], ['c', -0.03, 0.51, -0.21, 0.90, -0.60, 1.26], ['c', -0.24, 0.24, -0.45, 0.39, -0.75, 0.51], ['c', -0.21, 0.06, -0.27, 0.06, -0.60, 0.06], ['c', -0.33, 0.00, -0.39, 0.00, -0.60, -0.06], ['c', -0.30, -0.12, -0.51, -0.27, -0.75, -0.51], ['c', -0.39, -0.36, -0.57, -0.78, -0.57, -1.26], ['c', 0.00, -0.27, 0.00, -0.30, 0.09, -0.42], ['c', 0.03, -0.09, 0.18, -0.21, 0.30, -0.30], ['c', 0.12, -0.09, 0.30, -0.21, 0.39, -0.27], ['c', 0.09, -0.06, 0.21, -0.18, 0.27, -0.24], ['c', 0.06, -0.12, 0.09, -0.15, 0.09, -0.33], ['c', 0.00, -0.18, -0.03, -0.24, -0.09, -0.36], ['c', -0.24, -0.39, -0.75, -0.60, -1.38, -0.57], ['c', -0.54, 0.03, -0.90, 0.18, -1.23, 0.48], ['c', -0.81, 0.72, -1.08, 2.16, -0.96, 5.37], ['l', 0.00, 0.63], ['l', 0.30, -0.12], ['c', 0.78, -0.27, 1.29, -0.33, 2.10, -0.27], ['c', 1.47, 0.12, 2.49, 0.54, 3.27, 1.29], ['c', 0.48, 0.51, 0.81, 1.11, 0.96, 1.89], ['c', 0.06, 0.27, 0.06, 0.42, 0.06, 0.93], ['c', 0.00, 0.54, 0.00, 0.69, -0.06, 0.96], ['c', -0.15, 0.78, -0.48, 1.38, -0.96, 1.89], ['c', -0.54, 0.51, -1.17, 0.87, -1.98, 1.08], ['c', -1.14, 0.30, -2.40, 0.33, -3.24, 0.03], ['c', -1.50, -0.48, -2.64, -1.89, -3.27, -4.02], ['c', -0.36, -1.23, -0.51, -2.82, -0.42, -4.08], ['c', 0.30, -3.66, 2.28, -6.30, 4.95, -6.66], ['z'], ['m', 0.66, 7.41], ['c', -0.27, -0.09, -0.81, -0.12, -1.08, -0.06], ['c', -0.72, 0.18, -1.08, 0.69, -1.23, 1.71], ['c', -0.06, 0.54, -0.06, 3.00, 0.00, 3.54], ['c', 0.18, 1.26, 0.72, 1.77, 1.80, 1.74], ['c', 0.39, -0.03, 0.63, -0.09, 0.90, -0.27], ['c', 0.66, -0.42, 0.90, -1.32, 0.90, -3.24], ['c', 0.00, -2.22, -0.36, -3.12, -1.29, -3.42], ['z']], w: 9.956, h: 14.982 },\n\t'7': { d: [['M', 0.21, -14.97], ['c', 0.21, -0.06, 0.45, 0.00, 0.54, 0.15], ['c', 0.06, 0.09, 0.06, 0.15, 0.06, 0.39], ['c', 0.00, 0.24, 0.00, 0.33, 0.06, 0.42], ['c', 0.06, 0.12, 0.21, 0.24, 0.27, 0.24], ['c', 0.03, 0.00, 0.12, -0.12, 0.24, -0.21], ['c', 0.96, -1.20, 2.58, -1.35, 3.99, -0.42], ['c', 0.15, 0.12, 0.42, 0.30, 0.54, 0.45], ['c', 0.48, 0.39, 0.81, 0.57, 1.29, 0.60], ['c', 0.69, 0.03, 1.50, -0.30, 2.13, -0.87], ['c', 0.09, -0.09, 0.27, -0.30, 0.39, -0.45], ['c', 0.12, -0.15, 0.24, -0.27, 0.30, -0.30], ['c', 0.18, -0.06, 0.39, 0.03, 0.51, 0.21], ['c', 0.06, 0.18, 0.06, 0.24, -0.27, 0.72], ['c', -0.18, 0.24, -0.54, 0.78, -0.78, 1.17], ['c', -2.37, 3.54, -3.54, 6.27, -3.87, 9.00], ['c', -0.03, 0.33, -0.03, 0.66, -0.03, 1.26], ['c', 0.00, 0.90, 0.00, 1.08, 0.15, 1.89], ['c', 0.06, 0.45, 0.06, 0.48, 0.03, 0.60], ['c', -0.06, 0.09, -0.21, 0.21, -0.30, 0.21], ['c', -0.03, 0.00, -0.27, -0.06, -0.54, -0.15], ['c', -0.84, -0.27, -1.11, -0.30, -1.65, -0.30], ['c', -0.57, 0.00, -0.84, 0.03, -1.56, 0.27], ['c', -0.60, 0.18, -0.69, 0.21, -0.81, 0.15], ['c', -0.12, -0.06, -0.21, -0.18, -0.21, -0.30], ['c', 0.00, -0.15, 0.60, -1.44, 1.20, -2.61], ['c', 1.14, -2.22, 2.73, -4.68, 5.10, -8.01], ['c', 0.21, -0.27, 0.36, -0.48, 0.33, -0.48], ['c', 0.00, 0.00, -0.12, 0.06, -0.27, 0.12], ['c', -0.54, 0.30, -0.99, 0.39, -1.56, 0.39], ['c', -0.75, 0.03, -1.20, -0.18, -1.83, -0.75], ['c', -0.99, -0.90, -1.83, -1.17, -2.31, -0.72], ['c', -0.18, 0.15, -0.36, 0.51, -0.45, 0.84], ['c', -0.06, 0.24, -0.06, 0.33, -0.09, 1.98], ['c', 0.00, 1.62, -0.03, 1.74, -0.06, 1.80], ['c', -0.15, 0.24, -0.54, 0.24, -0.69, 0.00], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.57], ['c', 0.00, -3.42, 0.00, -3.48, 0.06, -3.57], ['c', 0.03, -0.06, 0.09, -0.12, 0.15, -0.15], ['z']], w: 10.561, h: 15.093 },\n\t'8': { d: [['M', 4.98, -14.97], ['c', 0.33, -0.03, 1.02, -0.03, 1.32, 0.00], ['c', 1.32, 0.12, 2.49, 0.60, 3.21, 1.32], ['c', 0.39, 0.39, 0.66, 0.81, 0.78, 1.29], ['c', 0.09, 0.36, 0.09, 1.08, 0.00, 1.44], ['c', -0.21, 0.84, -0.66, 1.59, -1.59, 2.55], ['l', -0.30, 0.30], ['l', 0.27, 0.18], ['c', 1.47, 0.93, 2.31, 2.31, 2.25, 3.75], ['c', -0.03, 0.75, -0.24, 1.35, -0.63, 1.95], ['c', -0.45, 0.66, -1.02, 1.14, -1.83, 1.53], ['c', -1.80, 0.87, -4.20, 0.87, -6.00, 0.03], ['c', -1.62, -0.78, -2.52, -2.16, -2.46, -3.66], ['c', 0.06, -0.99, 0.54, -1.77, 1.80, -2.97], ['c', 0.54, -0.51, 0.54, -0.54, 0.48, -0.57], ['c', -0.39, -0.27, -0.96, -0.78, -1.20, -1.14], ['c', -0.75, -1.11, -0.87, -2.40, -0.30, -3.60], ['c', 0.69, -1.35, 2.25, -2.25, 4.20, -2.40], ['z'], ['m', 1.53, 0.69], ['c', -0.42, -0.09, -1.11, -0.12, -1.38, -0.06], ['c', -0.30, 0.06, -0.60, 0.18, -0.81, 0.30], ['c', -0.21, 0.12, -0.60, 0.51, -0.72, 0.72], ['c', -0.51, 0.87, -0.42, 1.89, 0.21, 2.52], ['c', 0.21, 0.21, 0.36, 0.30, 1.95, 1.23], ['c', 0.96, 0.54, 1.74, 0.99, 1.77, 1.02], ['c', 0.09, 0.00, 0.63, -0.60, 0.99, -1.11], ['c', 0.21, -0.36, 0.48, -0.87, 0.57, -1.23], ['c', 0.06, -0.24, 0.06, -0.36, 0.06, -0.72], ['c', 0.00, -0.45, -0.03, -0.66, -0.15, -0.99], ['c', -0.39, -0.81, -1.29, -1.44, -2.49, -1.68], ['z'], ['m', -1.44, 8.07], ['l', -1.89, -1.08], ['c', -0.03, 0.00, -0.18, 0.15, -0.39, 0.33], ['c', -1.20, 1.08, -1.65, 1.95, -1.59, 3.00], ['c', 0.09, 1.59, 1.35, 2.85, 3.21, 3.24], ['c', 0.33, 0.06, 0.45, 0.06, 0.93, 0.06], ['c', 0.63, 0.00, 0.81, -0.03, 1.29, -0.27], ['c', 0.90, -0.42, 1.47, -1.41, 1.41, -2.40], ['c', -0.06, -0.66, -0.39, -1.29, -0.90, -1.65], ['c', -0.12, -0.09, -1.05, -0.63, -2.07, -1.23], ['z']], w: 10.926, h: 14.989 },\n\t'9': { d: [['M', 4.23, -14.97], ['c', 0.42, -0.03, 1.29, 0.00, 1.62, 0.06], ['c', 0.51, 0.12, 0.93, 0.30, 1.38, 0.57], ['c', 1.53, 1.02, 2.52, 3.24, 2.73, 5.94], ['c', 0.18, 2.55, -0.48, 4.98, -1.83, 6.57], ['c', -1.05, 1.26, -2.40, 1.89, -3.93, 1.83], ['c', -1.23, -0.06, -2.31, -0.45, -3.03, -1.14], ['c', -0.57, -0.51, -0.87, -1.23, -0.84, -1.98], ['c', 0.03, -0.51, 0.21, -0.90, 0.60, -1.26], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.39, 0.36, 0.57, 0.78, 0.57, 1.26], ['c', 0.00, 0.27, 0.00, 0.30, -0.09, 0.42], ['c', -0.03, 0.09, -0.18, 0.21, -0.30, 0.30], ['c', -0.12, 0.09, -0.30, 0.21, -0.39, 0.27], ['c', -0.09, 0.06, -0.21, 0.18, -0.27, 0.24], ['c', -0.06, 0.12, -0.06, 0.15, -0.06, 0.33], ['c', 0.00, 0.18, 0.00, 0.24, 0.06, 0.36], ['c', 0.24, 0.39, 0.75, 0.60, 1.38, 0.57], ['c', 0.54, -0.03, 0.90, -0.18, 1.23, -0.48], ['c', 0.81, -0.72, 1.08, -2.16, 0.96, -5.37], ['l', 0.00, -0.63], ['l', -0.30, 0.12], ['c', -0.78, 0.27, -1.29, 0.33, -2.10, 0.27], ['c', -1.47, -0.12, -2.49, -0.54, -3.27, -1.29], ['c', -0.48, -0.51, -0.81, -1.11, -0.96, -1.89], ['c', -0.06, -0.27, -0.06, -0.42, -0.06, -0.96], ['c', 0.00, -0.51, 0.00, -0.66, 0.06, -0.93], ['c', 0.15, -0.78, 0.48, -1.38, 0.96, -1.89], ['c', 0.15, -0.12, 0.33, -0.27, 0.42, -0.36], ['c', 0.69, -0.51, 1.62, -0.81, 2.76, -0.93], ['z'], ['m', 1.17, 0.66], ['c', -0.21, -0.06, -0.57, -0.06, -0.81, -0.03], ['c', -0.78, 0.12, -1.26, 0.69, -1.41, 1.74], ['c', -0.12, 0.63, -0.15, 1.95, -0.09, 2.79], ['c', 0.12, 1.71, 0.63, 2.40, 1.77, 2.46], ['c', 1.08, 0.03, 1.62, -0.48, 1.80, -1.74], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.54], ['c', -0.15, -1.05, -0.51, -1.53, -1.26, -1.68], ['z']], w: 9.959, h: 14.986 },\n\t'rests.multimeasure': { d: [['M', 0, -4], ['l', 0, 16], ['l', 1, 0], ['l', 0, -5], ['l', 40, 0], ['l', 0, 5], ['l', 1, 0], ['l', 0, -16], ['l', -1, 0], ['l', 0, 5], ['l', -40, 0], ['l', 0, -5], ['z']], w: 42, h: 18 },\n\t'rests.whole': { d: [['M', 0.06, 0.03], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.half': { d: [['M', 0.06, -4.62], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.quarter': { d: [['M', 1.89, -11.82], ['c', 0.12, -0.06, 0.24, -0.06, 0.36, -0.03], ['c', 0.09, 0.06, 4.74, 5.58, 4.86, 5.82], ['c', 0.21, 0.39, 0.15, 0.78, -0.15, 1.26], ['c', -0.24, 0.33, -0.72, 0.81, -1.62, 1.56], ['c', -0.45, 0.36, -0.87, 0.75, -0.96, 0.84], ['c', -0.93, 0.99, -1.14, 2.49, -0.60, 3.63], ['c', 0.18, 0.39, 0.27, 0.48, 1.32, 1.68], ['c', 1.92, 2.25, 1.83, 2.16, 1.83, 2.34], ['c', 0.00, 0.18, -0.18, 0.36, -0.36, 0.39], ['c', -0.15, 0.00, -0.27, -0.06, -0.48, -0.27], ['c', -0.75, -0.75, -2.46, -1.29, -3.39, -1.08], ['c', -0.45, 0.09, -0.69, 0.27, -0.90, 0.69], ['c', -0.12, 0.30, -0.21, 0.66, -0.24, 1.14], ['c', -0.03, 0.66, 0.09, 1.35, 0.30, 2.01], ['c', 0.15, 0.42, 0.24, 0.66, 0.45, 0.96], ['c', 0.18, 0.24, 0.18, 0.33, 0.03, 0.42], ['c', -0.12, 0.06, -0.18, 0.03, -0.45, -0.30], ['c', -1.08, -1.38, -2.07, -3.36, -2.40, -4.83], ['c', -0.27, -1.05, -0.15, -1.77, 0.27, -2.07], ['c', 0.21, -0.12, 0.42, -0.15, 0.87, -0.15], ['c', 0.87, 0.06, 2.10, 0.39, 3.30, 0.90], ['l', 0.39, 0.18], ['l', -1.65, -1.95], ['c', -2.52, -2.97, -2.61, -3.09, -2.70, -3.27], ['c', -0.09, -0.24, -0.12, -0.48, -0.03, -0.75], ['c', 0.15, -0.48, 0.57, -0.96, 1.83, -2.01], ['c', 0.45, -0.36, 0.84, -0.72, 0.93, -0.78], ['c', 0.69, -0.75, 1.02, -1.80, 0.90, -2.79], ['c', -0.06, -0.33, -0.21, -0.84, -0.39, -1.11], ['c', -0.09, -0.15, -0.45, -0.60, -0.81, -1.05], ['c', -0.36, -0.42, -0.69, -0.81, -0.72, -0.87], ['c', -0.09, -0.18, 0.00, -0.42, 0.21, -0.51], ['z']], w: 7.888, h: 21.435 },\n\t'rests.8th': { d: [['M', 1.68, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.39, -0.18, 1.32, -1.29, 1.68, -1.98], ['c', 0.09, -0.21, 0.24, -0.30, 0.39, -0.30], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.27, 1.11, -1.86, 6.42], ['c', -1.02, 3.48, -1.89, 6.39, -1.92, 6.42], ['c', 0.00, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.15, -0.57, 1.68, -4.92], ['c', 0.96, -2.67, 1.74, -4.89, 1.71, -4.89], ['l', -0.51, 0.15], ['c', -1.08, 0.36, -1.74, 0.48, -2.55, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 7.534, h: 13.883 },\n\t'rests.16th': { d: [['M', 3.33, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.87, 0.42], ['c', 0.39, -0.18, 1.20, -1.23, 1.62, -2.07], ['c', 0.06, -0.15, 0.24, -0.24, 0.36, -0.24], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.45, 1.86, -2.67, 10.17], ['c', -1.50, 5.55, -2.73, 10.14, -2.76, 10.17], ['c', -0.03, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.12, -0.57, 1.44, -4.92], ['c', 0.81, -2.67, 1.47, -4.86, 1.47, -4.89], ['c', -0.03, 0.00, -0.27, 0.06, -0.54, 0.15], ['c', -1.08, 0.36, -1.77, 0.48, -2.58, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.33, -0.15, 1.02, -0.93, 1.41, -1.59], ['c', 0.12, -0.21, 0.18, -0.39, 0.39, -1.08], ['c', 0.66, -2.10, 1.17, -3.84, 1.17, -3.87], ['c', 0.00, 0.00, -0.21, 0.06, -0.42, 0.15], ['c', -0.51, 0.15, -1.20, 0.33, -1.68, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 9.724, h: 21.383 },\n\t'rests.32nd': { d: [['M', 4.23, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.27, -0.06], ['c', 0.33, -0.21, 0.99, -1.11, 1.44, -1.98], ['c', 0.09, -0.24, 0.21, -0.33, 0.39, -0.33], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.57, 2.67, -3.21, 13.89], ['c', -1.80, 7.62, -3.30, 13.89, -3.30, 13.92], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.09, -0.57, 1.23, -4.92], ['c', 0.69, -2.67, 1.26, -4.86, 1.29, -4.89], ['c', 0.00, -0.03, -0.12, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.12, 0.09, 0.30, 0.18, 0.48, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.29, -1.29, 1.56, -1.89], ['c', 0.03, -0.12, 1.23, -4.59, 1.23, -4.65], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -0.63, 0.18, -1.20, 0.36, -1.74, 0.45], ['c', -0.39, 0.06, -0.54, 0.06, -1.02, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.18, 0.18, 0.51, 0.27, 0.72, 0.15], ['c', 0.30, -0.12, 0.69, -0.57, 1.08, -1.17], ['c', 0.42, -0.60, 0.39, -0.51, 1.05, -3.03], ['c', 0.33, -1.26, 0.60, -2.31, 0.60, -2.34], ['c', 0.00, 0.00, -0.21, 0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.14, 0.33, -1.62, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 11.373, h: 28.883 },\n\t'rests.64th': { d: [['M', 5.13, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.24, -0.12, 0.63, -0.66, 1.08, -1.56], ['c', 0.33, -0.66, 0.39, -0.72, 0.60, -0.72], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.69, 3.66, -3.54, 17.64], ['c', -1.95, 9.66, -3.57, 17.61, -3.57, 17.64], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.06, -0.57, 1.05, -4.95], ['c', 0.60, -2.70, 1.08, -4.89, 1.08, -4.92], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.15], ['c', -0.66, 0.24, -1.20, 0.36, -1.77, 0.48], ['c', -0.42, 0.06, -0.57, 0.06, -1.05, 0.06], ['c', -0.69, 0.00, -0.87, -0.03, -1.35, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.21, 0.03, 0.39, -0.09, 0.72, -0.42], ['c', 0.45, -0.45, 1.02, -1.26, 1.17, -1.65], ['c', 0.03, -0.09, 0.27, -1.14, 0.54, -2.34], ['c', 0.27, -1.20, 0.48, -2.19, 0.51, -2.22], ['c', 0.00, -0.03, -0.09, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.90, 0.42], ['c', 0.36, -0.18, 1.20, -1.26, 1.47, -1.89], ['c', 0.03, -0.09, 0.30, -1.20, 0.57, -2.43], ['l', 0.51, -2.28], ['l', -0.54, 0.18], ['c', -1.11, 0.36, -1.80, 0.48, -2.61, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.21, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.36, -0.18, 0.93, -0.93, 1.29, -1.68], ['c', 0.12, -0.24, 0.18, -0.48, 0.63, -2.55], ['l', 0.51, -2.31], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -1.14, 0.36, -2.10, 0.54, -2.82, 0.51], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.453, h: 36.383 },\n\t'rests.128th': { d: [['M', 6.03, -21.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.21, 0.00, 0.33, -0.06, 0.54, -0.36], ['c', 0.15, -0.21, 0.54, -0.93, 0.78, -1.47], ['c', 0.15, -0.33, 0.18, -0.39, 0.30, -0.48], ['c', 0.18, -0.09, 0.45, 0.00, 0.51, 0.15], ['c', 0.03, 0.09, -7.11, 42.75, -7.17, 42.84], ['c', -0.03, 0.03, -0.15, 0.09, -0.24, 0.15], ['c', -0.18, 0.06, -0.24, 0.06, -0.45, 0.06], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.03, -0.57, 0.84, -4.98], ['c', 0.51, -2.70, 0.93, -4.92, 0.90, -4.92], ['c', 0.00, 0.00, -0.15, 0.06, -0.36, 0.12], ['c', -0.78, 0.27, -1.62, 0.48, -2.31, 0.57], ['c', -0.15, 0.03, -0.54, 0.03, -0.81, 0.03], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.63, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.14, -1.11, 1.50, -1.83], ['c', 0.12, -0.27, 0.12, -0.27, 0.54, -2.52], ['c', 0.24, -1.23, 0.42, -2.25, 0.39, -2.25], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.18], ['c', -1.26, 0.39, -2.25, 0.57, -3.06, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.51, 0.30, 0.75, 0.18], ['c', 0.36, -0.15, 1.05, -0.99, 1.41, -1.77], ['l', 0.15, -0.30], ['l', 0.42, -2.25], ['c', 0.21, -1.26, 0.42, -2.28, 0.39, -2.28], ['l', -0.51, 0.15], ['c', -1.11, 0.39, -1.89, 0.51, -2.70, 0.51], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.18, 0.48, 0.27, 0.72, 0.21], ['c', 0.33, -0.12, 1.14, -1.26, 1.41, -1.95], ['c', 0.00, -0.09, 0.21, -1.11, 0.45, -2.34], ['c', 0.21, -1.20, 0.39, -2.22, 0.39, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.20, 0.33, -1.71, 0.42], ['c', -0.30, 0.06, -0.51, 0.06, -0.93, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.18, 0.00, 0.36, -0.09, 0.57, -0.33], ['c', 0.33, -0.36, 0.78, -1.14, 0.93, -1.56], ['c', 0.03, -0.12, 0.24, -1.20, 0.45, -2.40], ['c', 0.24, -1.20, 0.42, -2.22, 0.42, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.39, 0.09], ['c', -1.05, 0.36, -1.80, 0.48, -2.58, 0.48], ['c', -0.63, 0.00, -0.84, -0.03, -1.29, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.992, h: 43.883 },\n\t'accidentals.sharp': { d: [['M', 5.73, -11.19], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.31], ['c', 0.00, 1.23, 0.00, 2.22, 0.03, 2.22], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.43], ['c', 0.00, 1.32, 0.00, 2.43, 0.03, 2.43], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.52], ['c', 0.00, 2.28, -0.03, 2.55, -0.06, 2.64], ['c', -0.21, 0.36, -0.72, 0.36, -0.93, 0.00], ['c', -0.03, -0.09, -0.06, -0.33, -0.06, -2.43], ['l', 0.00, -2.31], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.43], ['c', 0.00, 2.58, 0.00, 2.52, -0.15, 2.67], ['c', -0.06, 0.09, -0.27, 0.18, -0.36, 0.18], ['c', -0.12, 0.00, -0.33, -0.09, -0.39, -0.18], ['c', -0.15, -0.15, -0.15, -0.09, -0.15, -2.43], ['c', 0.00, -1.23, 0.00, -2.22, -0.03, -2.22], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.43], ['c', 0.00, -1.32, 0.00, -2.43, -0.03, -2.43], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.52], ['c', 0.00, -2.28, 0.03, -2.55, 0.06, -2.64], ['c', 0.21, -0.36, 0.72, -0.36, 0.93, 0.00], ['c', 0.03, 0.09, 0.06, 0.33, 0.06, 2.43], ['l', 0.03, 2.31], ['l', 1.26, -0.51], ['l', 1.26, -0.51], ['l', 0.00, -2.43], ['c', 0.00, -2.28, 0.00, -2.43, 0.06, -2.55], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z'], ['m', -0.33, 10.65], ['l', 0.00, -2.43], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.46], ['l', 0.00, 2.43], ['l', 0.09, -0.03], ['c', 0.06, -0.03, 0.63, -0.27, 1.29, -0.51], ['l', 1.17, -0.48], ['l', 0.00, -2.46], ['z']], w: 8.25, h: 22.462 },\n\t'accidentals.halfsharp': { d: [['M', 2.43, -10.05], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.01], ['c', 0.00, 1.05, 0.00, 1.89, 0.03, 1.89], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.37], ['c', 0.00, 1.32, 0.00, 2.37, 0.03, 2.37], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.25], ['c', 0.00, 1.95, 0.00, 2.28, -0.06, 2.37], ['c', -0.06, 0.12, -0.12, 0.21, -0.24, 0.27], ['c', -0.27, 0.12, -0.54, 0.03, -0.69, -0.24], ['c', -0.06, -0.12, -0.06, -0.21, -0.06, -2.01], ['c', 0.00, -1.05, 0.00, -1.89, -0.03, -1.89], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.37], ['c', 0.00, -1.32, 0.00, -2.37, -0.03, -2.37], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.25], ['c', 0.00, -2.13, 0.00, -2.28, 0.06, -2.40], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z']], w: 5.25, h: 20.174 },\n\t'accidentals.nat': { d: [['M', 0.21, -11.40], ['c', 0.24, -0.06, 0.78, 0.00, 0.99, 0.15], ['c', 0.03, 0.03, 0.03, 0.48, 0.00, 2.61], ['c', -0.03, 1.44, -0.03, 2.61, -0.03, 2.61], ['c', 0.00, 0.03, 0.75, -0.09, 1.68, -0.24], ['c', 0.96, -0.18, 1.71, -0.27, 1.74, -0.27], ['c', 0.15, 0.03, 0.27, 0.15, 0.36, 0.30], ['l', 0.06, 0.12], ['l', 0.09, 8.67], ['c', 0.09, 6.96, 0.12, 8.67, 0.09, 8.67], ['c', -0.03, 0.03, -0.12, 0.06, -0.21, 0.09], ['c', -0.24, 0.09, -0.72, 0.09, -0.96, 0.00], ['c', -0.09, -0.03, -0.18, -0.06, -0.21, -0.09], ['c', -0.03, -0.03, -0.03, -0.48, 0.00, -2.61], ['c', 0.03, -1.44, 0.03, -2.61, 0.03, -2.61], ['c', 0.00, -0.03, -0.75, 0.09, -1.68, 0.24], ['c', -0.96, 0.18, -1.71, 0.27, -1.74, 0.27], ['c', -0.15, -0.03, -0.27, -0.15, -0.36, -0.30], ['l', -0.06, -0.15], ['l', -0.09, -7.53], ['c', -0.06, -4.14, -0.09, -8.04, -0.12, -8.67], ['l', 0.00, -1.11], ['l', 0.15, -0.06], ['c', 0.09, -0.03, 0.21, -0.06, 0.27, -0.09], ['z'], ['m', 3.75, 8.40], ['c', 0.00, -0.33, 0.00, -0.42, -0.03, -0.42], ['c', -0.12, 0.00, -2.79, 0.45, -2.79, 0.48], ['c', -0.03, 0.00, -0.09, 6.30, -0.09, 6.33], ['c', 0.03, 0.00, 2.79, -0.45, 2.82, -0.48], ['c', 0.00, 0.00, 0.09, -4.53, 0.09, -5.91], ['z']], w: 5.4, h: 22.8 },\n\t'accidentals.flat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 6.75, h: 18.801 },\n\t'accidentals.halfflat': { d: [['M', 4.83, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.60, -0.12, 9.06], ['c', -0.09, 5.55, -0.15, 9.06, -0.18, 9.12], ['c', -0.03, 0.09, -0.09, 0.18, -0.15, 0.27], ['c', -0.24, 0.21, -0.54, 0.24, -0.81, 0.06], ['c', -0.06, -0.03, -0.27, -0.24, -0.45, -0.42], ['c', -0.36, -0.42, -0.66, -0.66, -1.80, -1.44], ['c', -1.23, -0.84, -1.83, -1.32, -2.25, -1.77], ['c', -0.66, -0.78, -0.96, -1.56, -0.93, -2.46], ['c', 0.09, -1.41, 1.11, -2.58, 2.40, -2.79], ['c', 0.30, -0.06, 0.84, -0.03, 1.23, 0.06], ['c', 0.54, 0.12, 1.08, 0.33, 1.53, 0.63], ['c', 0.12, 0.09, 0.24, 0.15, 0.24, 0.12], ['c', 0.00, 0.00, -0.12, -8.37, -0.18, -9.75], ['l', 0.00, -0.66], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', -1.65, 10.95], ['c', -0.60, -0.18, -1.08, 0.09, -1.38, 0.69], ['c', -0.27, 0.60, -0.36, 1.38, -0.18, 2.07], ['c', 0.12, 0.42, 0.42, 0.99, 0.72, 1.41], ['c', 0.30, 0.42, 0.93, 1.05, 1.56, 1.59], ['l', 0.48, 0.39], ['l', 0.00, -0.12], ['c', 0.03, -0.09, 0.03, -0.48, 0.06, -0.90], ['c', 0.03, -0.57, 0.03, -1.08, 0.00, -2.22], ['c', -0.03, -1.62, -0.03, -1.62, -0.24, -2.07], ['c', -0.21, -0.42, -0.60, -0.75, -1.02, -0.84], ['z']], w: 6.728, h: 18.801 },\n\t'accidentals.dblflat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z'], ['m', 3, -11], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 12.1, h: 18.804 },\n\t'accidentals.dblsharp': { d: [['M', -0.18, -3.96], ['c', 0.06, -0.03, 0.12, -0.06, 0.15, -0.06], ['c', 0.09, 0.00, 2.76, 0.27, 2.79, 0.30], ['c', 0.12, 0.03, 0.15, 0.12, 0.15, 0.51], ['c', 0.06, 0.96, 0.24, 1.59, 0.57, 2.10], ['c', 0.06, 0.09, 0.15, 0.21, 0.18, 0.24], ['l', 0.09, 0.06], ['l', 0.09, -0.06], ['c', 0.03, -0.03, 0.12, -0.15, 0.18, -0.24], ['c', 0.33, -0.51, 0.51, -1.14, 0.57, -2.10], ['c', 0.00, -0.39, 0.03, -0.45, 0.12, -0.51], ['c', 0.03, 0.00, 0.66, -0.09, 1.44, -0.15], ['c', 1.47, -0.15, 1.50, -0.15, 1.56, -0.03], ['c', 0.03, 0.06, 0.00, 0.42, -0.09, 1.44], ['c', -0.09, 0.72, -0.15, 1.35, -0.15, 1.38], ['c', 0.00, 0.03, -0.03, 0.09, -0.06, 0.12], ['c', -0.06, 0.06, -0.12, 0.09, -0.51, 0.09], ['c', -1.08, 0.06, -1.80, 0.30, -2.28, 0.75], ['l', -0.12, 0.09], ['l', 0.09, 0.09], ['c', 0.12, 0.15, 0.39, 0.33, 0.63, 0.45], ['c', 0.42, 0.18, 0.96, 0.27, 1.68, 0.33], ['c', 0.39, 0.00, 0.45, 0.03, 0.51, 0.09], ['c', 0.03, 0.03, 0.06, 0.09, 0.06, 0.12], ['c', 0.00, 0.03, 0.06, 0.66, 0.15, 1.38], ['c', 0.09, 1.02, 0.12, 1.38, 0.09, 1.44], ['c', -0.06, 0.12, -0.09, 0.12, -1.56, -0.03], ['c', -0.78, -0.06, -1.41, -0.15, -1.44, -0.15], ['c', -0.09, -0.06, -0.12, -0.12, -0.12, -0.54], ['c', -0.06, -0.93, -0.24, -1.56, -0.57, -2.07], ['c', -0.06, -0.09, -0.15, -0.21, -0.18, -0.24], ['l', -0.09, -0.06], ['l', -0.09, 0.06], ['c', -0.03, 0.03, -0.12, 0.15, -0.18, 0.24], ['c', -0.33, 0.51, -0.51, 1.14, -0.57, 2.07], ['c', 0.00, 0.42, -0.03, 0.48, -0.12, 0.54], ['c', -0.03, 0.00, -0.66, 0.09, -1.44, 0.15], ['c', -1.47, 0.15, -1.50, 0.15, -1.56, 0.03], ['c', -0.03, -0.06, 0.00, -0.42, 0.09, -1.44], ['c', 0.09, -0.72, 0.15, -1.35, 0.15, -1.38], ['c', 0.00, -0.03, 0.03, -0.09, 0.06, -0.12], ['c', 0.06, -0.06, 0.12, -0.09, 0.51, -0.09], ['c', 0.72, -0.06, 1.26, -0.15, 1.68, -0.33], ['c', 0.24, -0.12, 0.51, -0.30, 0.63, -0.45], ['l', 0.09, -0.09], ['l', -0.12, -0.09], ['c', -0.48, -0.45, -1.20, -0.69, -2.28, -0.75], ['c', -0.39, 0.00, -0.45, -0.03, -0.51, -0.09], ['c', -0.03, -0.03, -0.06, -0.09, -0.06, -0.12], ['c', 0.00, -0.03, -0.06, -0.63, -0.12, -1.38], ['c', -0.09, -0.72, -0.15, -1.35, -0.15, -1.38], ['z']], w: 7.95, h: 7.977 },\n\t'dots.dot': { d: [['M', 1.32, -1.68], ['c', 0.09, -0.03, 0.27, -0.06, 0.39, -0.06], ['c', 0.96, 0.00, 1.74, 0.78, 1.74, 1.71], ['c', 0.00, 0.96, -0.78, 1.74, -1.71, 1.74], ['c', -0.96, 0.00, -1.74, -0.78, -1.74, -1.71], ['c', 0.00, -0.78, 0.54, -1.50, 1.32, -1.68], ['z']], w: 3.45, h: 3.45 },\n\t'noteheads.dbl': { d: [['M', -0.69, -4.02], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['c', 0.06, 0.15, 0.06, 0.18, 0.06, 1.41], ['l', 0.00, 1.23], ['l', 0.12, -0.18], ['c', 0.72, -1.26, 2.64, -2.31, 4.86, -2.64], ['c', 0.81, -0.15, 1.11, -0.15, 2.13, -0.15], ['c', 0.99, 0.00, 1.29, 0.00, 2.10, 0.15], ['c', 0.75, 0.12, 1.38, 0.27, 2.04, 0.54], ['c', 1.35, 0.51, 2.34, 1.26, 2.82, 2.10], ['l', 0.12, 0.18], ['l', 0.00, -1.23], ['c', 0.00, -1.20, 0.00, -1.26, 0.06, -1.38], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 3.54], ['l', 0.00, 3.54], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.38], ['l', 0.00, -1.23], ['l', -0.12, 0.18], ['c', -0.48, 0.84, -1.47, 1.59, -2.82, 2.10], ['c', -0.84, 0.33, -1.71, 0.54, -2.85, 0.66], ['c', -0.45, 0.06, -2.16, 0.06, -2.61, 0.00], ['c', -1.14, -0.12, -2.01, -0.33, -2.85, -0.66], ['c', -1.35, -0.51, -2.34, -1.26, -2.82, -2.10], ['l', -0.12, -0.18], ['l', 0.00, 1.23], ['c', 0.00, 1.23, 0.00, 1.26, -0.06, 1.38], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -3.54], ['c', 0.00, -3.48, 0.00, -3.54, 0.06, -3.66], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z'], ['m', 7.71, 0.63], ['c', -0.36, -0.06, -0.90, -0.06, -1.14, 0.00], ['c', -0.30, 0.03, -0.66, 0.24, -0.87, 0.42], ['c', -0.60, 0.54, -0.90, 1.62, -0.75, 2.82], ['c', 0.12, 0.93, 0.51, 1.68, 1.11, 2.31], ['c', 0.75, 0.72, 1.83, 1.20, 2.85, 1.26], ['c', 1.05, 0.06, 1.83, -0.54, 2.10, -1.65], ['c', 0.21, -0.90, 0.12, -1.95, -0.24, -2.82], ['c', -0.36, -0.81, -1.08, -1.53, -1.95, -1.95], ['c', -0.30, -0.15, -0.78, -0.30, -1.11, -0.39], ['z']], w: 16.83, h: 8.145 },\n\t'noteheads.whole': { d: [['M', 6.51, -4.05], ['c', 0.51, -0.03, 2.01, 0.00, 2.52, 0.03], ['c', 1.41, 0.18, 2.64, 0.51, 3.72, 1.08], ['c', 1.20, 0.63, 1.95, 1.41, 2.19, 2.31], ['c', 0.09, 0.33, 0.09, 0.90, 0.00, 1.23], ['c', -0.24, 0.90, -0.99, 1.68, -2.19, 2.31], ['c', -1.08, 0.57, -2.28, 0.90, -3.75, 1.08], ['c', -0.66, 0.06, -2.31, 0.06, -2.97, 0.00], ['c', -1.47, -0.18, -2.67, -0.51, -3.75, -1.08], ['c', -1.20, -0.63, -1.95, -1.41, -2.19, -2.31], ['c', -0.09, -0.33, -0.09, -0.90, 0.00, -1.23], ['c', 0.24, -0.90, 0.99, -1.68, 2.19, -2.31], ['c', 1.20, -0.63, 2.61, -0.99, 4.23, -1.11], ['z'], ['m', 0.57, 0.66], ['c', -0.87, -0.15, -1.53, 0.00, -2.04, 0.51], ['c', -0.15, 0.15, -0.24, 0.27, -0.33, 0.48], ['c', -0.24, 0.51, -0.36, 1.08, -0.33, 1.77], ['c', 0.03, 0.69, 0.18, 1.26, 0.42, 1.77], ['c', 0.60, 1.17, 1.74, 1.98, 3.18, 2.22], ['c', 1.11, 0.21, 1.95, -0.15, 2.34, -0.99], ['c', 0.24, -0.51, 0.36, -1.08, 0.33, -1.80], ['c', -0.06, -1.11, -0.45, -2.04, -1.17, -2.76], ['c', -0.63, -0.63, -1.47, -1.05, -2.40, -1.20], ['z']], w: 14.985, h: 8.097 },\n\t'noteheads.half': { d: [['M', 7.44, -4.05], ['c', 0.06, -0.03, 0.27, -0.03, 0.48, -0.03], ['c', 1.05, 0.00, 1.71, 0.24, 2.10, 0.81], ['c', 0.42, 0.60, 0.45, 1.35, 0.18, 2.40], ['c', -0.42, 1.59, -1.14, 2.73, -2.16, 3.39], ['c', -1.41, 0.93, -3.18, 1.44, -5.40, 1.53], ['c', -1.17, 0.03, -1.89, -0.21, -2.28, -0.81], ['c', -0.42, -0.60, -0.45, -1.35, -0.18, -2.40], ['c', 0.42, -1.59, 1.14, -2.73, 2.16, -3.39], ['c', 0.63, -0.42, 1.23, -0.72, 1.98, -0.96], ['c', 0.90, -0.30, 1.65, -0.42, 3.12, -0.54], ['z'], ['m', 1.29, 0.87], ['c', -0.27, -0.09, -0.63, -0.12, -0.90, -0.03], ['c', -0.72, 0.24, -1.53, 0.69, -3.27, 1.80], ['c', -2.34, 1.50, -3.30, 2.25, -3.57, 2.79], ['c', -0.36, 0.72, -0.06, 1.50, 0.66, 1.77], ['c', 0.24, 0.12, 0.69, 0.09, 0.99, 0.00], ['c', 0.84, -0.30, 1.92, -0.93, 4.14, -2.37], ['c', 1.62, -1.08, 2.37, -1.71, 2.61, -2.19], ['c', 0.36, -0.72, 0.06, -1.50, -0.66, -1.77], ['z']], w: 10.37, h: 8.132 },\n\t'noteheads.quarter': { d: [['M', 6.09, -4.05], ['c', 0.36, -0.03, 1.20, 0.00, 1.53, 0.06], ['c', 1.17, 0.24, 1.89, 0.84, 2.16, 1.83], ['c', 0.06, 0.18, 0.06, 0.30, 0.06, 0.66], ['c', 0.00, 0.45, 0.00, 0.63, -0.15, 1.08], ['c', -0.66, 2.04, -3.06, 3.93, -5.52, 4.38], ['c', -0.54, 0.09, -1.44, 0.09, -1.83, 0.03], ['c', -1.23, -0.27, -1.98, -0.87, -2.25, -1.86], ['c', -0.06, -0.18, -0.06, -0.30, -0.06, -0.66], ['c', 0.00, -0.45, 0.00, -0.63, 0.15, -1.08], ['c', 0.24, -0.78, 0.75, -1.53, 1.44, -2.22], ['c', 1.20, -1.20, 2.85, -2.01, 4.47, -2.22], ['z']], w: 9.81, h: 8.094 },\n\t'noteheads.slash.nostem': { d: [['M', 9.30, -7.77], ['c', 0.06, -0.06, 0.18, -0.06, 1.71, -0.06], ['l', 1.65, 0.00], ['l', 0.09, 0.09], ['c', 0.06, 0.06, 0.06, 0.09, 0.06, 0.15], ['c', -0.03, 0.12, -9.21, 15.24, -9.30, 15.33], ['c', -0.06, 0.06, -0.18, 0.06, -1.71, 0.06], ['l', -1.65, 0.00], ['l', -0.09, -0.09], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.15], ['c', 0.03, -0.12, 9.21, -15.24, 9.30, -15.33], ['z']], w: 12.81, h: 15.63 },\n\t'noteheads.indeterminate': { d: [['M', 0.78, -4.05], ['c', 0.12, -0.03, 0.24, -0.03, 0.36, 0.03], ['c', 0.03, 0.03, 0.93, 0.72, 1.95, 1.56], ['l', 1.86, 1.50], ['l', 1.86, -1.50], ['c', 1.02, -0.84, 1.92, -1.53, 1.95, -1.56], ['c', 0.21, -0.12, 0.33, -0.09, 0.75, 0.24], ['c', 0.30, 0.27, 0.36, 0.36, 0.36, 0.54], ['c', 0.00, 0.03, -0.03, 0.12, -0.06, 0.18], ['c', -0.03, 0.06, -0.90, 0.75, -1.89, 1.56], ['l', -1.80, 1.47], ['c', 0.00, 0.03, 0.81, 0.69, 1.80, 1.50], ['c', 0.99, 0.81, 1.86, 1.50, 1.89, 1.56], ['c', 0.03, 0.06, 0.06, 0.15, 0.06, 0.18], ['c', 0.00, 0.18, -0.06, 0.27, -0.36, 0.54], ['c', -0.42, 0.33, -0.54, 0.36, -0.75, 0.24], ['c', -0.03, -0.03, -0.93, -0.72, -1.95, -1.56], ['l', -1.86, -1.50], ['l', -1.86, 1.50], ['c', -1.02, 0.84, -1.92, 1.53, -1.95, 1.56], ['c', -0.21, 0.12, -0.33, 0.09, -0.75, -0.24], ['c', -0.30, -0.27, -0.36, -0.36, -0.36, -0.54], ['c', 0.00, -0.03, 0.03, -0.12, 0.06, -0.18], ['c', 0.03, -0.06, 0.90, -0.75, 1.89, -1.56], ['l', 1.80, -1.47], ['c', 0.00, -0.03, -0.81, -0.69, -1.80, -1.50], ['c', -0.99, -0.81, -1.86, -1.50, -1.89, -1.56], ['c', -0.06, -0.12, -0.09, -0.21, -0.03, -0.36], ['c', 0.03, -0.09, 0.57, -0.57, 0.72, -0.63], ['z']], w: 9.843, h: 8.139 },\n\t'scripts.ufermata': { d: [['M', -0.75, -10.77], ['c', 0.12, 0.00, 0.45, -0.03, 0.69, -0.03], ['c', 2.91, -0.03, 5.55, 1.53, 7.41, 4.35], ['c', 1.17, 1.71, 1.95, 3.72, 2.43, 6.03], ['c', 0.12, 0.51, 0.12, 0.57, 0.03, 0.69], ['c', -0.12, 0.21, -0.48, 0.27, -0.69, 0.12], ['c', -0.12, -0.09, -0.18, -0.24, -0.27, -0.69], ['c', -0.78, -3.63, -3.42, -6.54, -6.78, -7.38], ['c', -0.78, -0.21, -1.20, -0.24, -2.07, -0.24], ['c', -0.63, 0.00, -0.84, 0.00, -1.20, 0.06], ['c', -1.83, 0.27, -3.42, 1.08, -4.80, 2.37], ['c', -1.41, 1.35, -2.40, 3.21, -2.85, 5.19], ['c', -0.09, 0.45, -0.15, 0.60, -0.27, 0.69], ['c', -0.21, 0.15, -0.57, 0.09, -0.69, -0.12], ['c', -0.09, -0.12, -0.09, -0.18, 0.03, -0.69], ['c', 0.33, -1.62, 0.78, -3.00, 1.47, -4.38], ['c', 1.77, -3.54, 4.44, -5.67, 7.56, -5.97], ['z'], ['m', 0.33, 7.47], ['c', 1.38, -0.30, 2.58, 0.90, 2.31, 2.25], ['c', -0.15, 0.72, -0.78, 1.35, -1.47, 1.50], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.748, h: 11.289 },\n\t'scripts.dfermata': { d: [['M', -9.63, -0.42], ['c', 0.15, -0.09, 0.36, -0.06, 0.51, 0.03], ['c', 0.12, 0.09, 0.18, 0.24, 0.27, 0.66], ['c', 0.78, 3.66, 3.42, 6.57, 6.78, 7.41], ['c', 0.78, 0.21, 1.20, 0.24, 2.07, 0.24], ['c', 0.63, 0.00, 0.84, 0.00, 1.20, -0.06], ['c', 1.83, -0.27, 3.42, -1.08, 4.80, -2.37], ['c', 1.41, -1.35, 2.40, -3.21, 2.85, -5.22], ['c', 0.09, -0.42, 0.15, -0.57, 0.27, -0.66], ['c', 0.21, -0.15, 0.57, -0.09, 0.69, 0.12], ['c', 0.09, 0.12, 0.09, 0.18, -0.03, 0.69], ['c', -0.33, 1.62, -0.78, 3.00, -1.47, 4.38], ['c', -1.92, 3.84, -4.89, 6.00, -8.31, 6.00], ['c', -3.42, 0.00, -6.39, -2.16, -8.31, -6.00], ['c', -0.48, -0.96, -0.84, -1.92, -1.14, -2.97], ['c', -0.18, -0.69, -0.42, -1.74, -0.42, -1.92], ['c', 0.00, -0.12, 0.09, -0.27, 0.24, -0.33], ['z'], ['m', 9.21, 0.00], ['c', 1.20, -0.27, 2.34, 0.63, 2.34, 1.86], ['c', 0.00, 0.90, -0.66, 1.68, -1.50, 1.89], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.744, h: 11.274 },\n\t'scripts.sforzato': { d: [['M', -6.45, -3.69], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.06, 0.00, 2.85, 0.72, 6.24, 1.59], ['l', 6.33, 1.65], ['c', 0.33, 0.06, 0.45, 0.21, 0.45, 0.51], ['c', 0.00, 0.30, -0.12, 0.45, -0.45, 0.51], ['l', -6.33, 1.65], ['c', -3.39, 0.87, -6.18, 1.59, -6.21, 1.59], ['c', -0.21, 0.00, -0.48, -0.24, -0.51, -0.45], ['c', 0.00, -0.15, 0.06, -0.36, 0.18, -0.45], ['c', 0.09, -0.06, 0.87, -0.27, 3.84, -1.05], ['c', 2.04, -0.54, 3.84, -0.99, 4.02, -1.02], ['c', 0.15, -0.06, 1.14, -0.24, 2.22, -0.42], ['c', 1.05, -0.18, 1.92, -0.36, 1.92, -0.36], ['c', 0.00, 0.00, -0.87, -0.18, -1.92, -0.36], ['c', -1.08, -0.18, -2.07, -0.36, -2.22, -0.42], ['c', -0.18, -0.03, -1.98, -0.48, -4.02, -1.02], ['c', -2.97, -0.78, -3.75, -0.99, -3.84, -1.05], ['c', -0.12, -0.09, -0.18, -0.30, -0.18, -0.45], ['c', 0.03, -0.15, 0.15, -0.30, 0.30, -0.39], ['z']], w: 13.5, h: 7.5 },\n\t'scripts.staccato': { d: [['M', -0.36, -1.47], ['c', 0.93, -0.21, 1.86, 0.51, 1.86, 1.47], ['c', 0.00, 0.93, -0.87, 1.65, -1.80, 1.47], ['c', -0.54, -0.12, -1.02, -0.57, -1.14, -1.08], ['c', -0.21, -0.81, 0.27, -1.65, 1.08, -1.86], ['z']], w: 2.989, h: 3.004 },\n\t'scripts.tenuto': { d: [['M', -4.20, -0.48], ['l', 0.12, -0.06], ['l', 4.08, 0.00], ['l', 4.08, 0.00], ['l', 0.12, 0.06], ['c', 0.39, 0.21, 0.39, 0.75, 0.00, 0.96], ['l', -0.12, 0.06], ['l', -4.08, 0.00], ['l', -4.08, 0.00], ['l', -0.12, -0.06], ['c', -0.39, -0.21, -0.39, -0.75, 0.00, -0.96], ['z']], w: 8.985, h: 1.08 },\n\t'scripts.umarcato': { d: [['M', -0.15, -8.19], ['c', 0.15, -0.12, 0.36, -0.03, 0.45, 0.15], ['c', 0.21, 0.42, 3.45, 7.65, 3.45, 7.71], ['c', 0.00, 0.12, -0.12, 0.27, -0.21, 0.30], ['c', -0.03, 0.03, -0.51, 0.03, -1.14, 0.03], ['c', -1.05, 0.00, -1.08, 0.00, -1.17, -0.06], ['c', -0.09, -0.06, -0.24, -0.36, -1.17, -2.40], ['c', -0.57, -1.29, -1.05, -2.34, -1.08, -2.34], ['c', 0.00, -0.03, -0.51, 1.02, -1.08, 2.34], ['c', -0.93, 2.07, -1.08, 2.34, -1.14, 2.40], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.06, 3.24, -7.32, 3.45, -7.71], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.15], ['z']], w: 7.5, h: 8.245 },\n\t'scripts.dmarcato': { d: [['M', -3.57, 0.03], ['c', 0.03, 0.00, 0.57, -0.03, 1.17, -0.03], ['c', 1.05, 0.00, 1.08, 0.00, 1.17, 0.06], ['c', 0.09, 0.06, 0.24, 0.36, 1.17, 2.40], ['c', 0.57, 1.29, 1.05, 2.34, 1.08, 2.34], ['c', 0.00, 0.03, 0.51, -1.02, 1.08, -2.34], ['c', 0.93, -2.07, 1.08, -2.34, 1.14, -2.40], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.15, 0.00, 0.33, 0.18, 0.33, 0.33], ['c', 0.00, 0.09, -3.45, 7.74, -3.54, 7.83], ['c', -0.12, 0.12, -0.30, 0.12, -0.42, 0.00], ['c', -0.09, -0.09, -3.54, -7.74, -3.54, -7.83], ['c', 0.00, -0.09, 0.12, -0.27, 0.18, -0.30], ['z']], w: 7.5, h: 8.25 },\n\t'scripts.stopped': { d: [['M', -0.27, -4.08], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.50], ['l', 0.00, 1.47], ['l', 1.47, 0.00], ['l', 1.50, 0.00], ['l', 0.15, 0.06], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.09, 0.36, 0.00, 0.54], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.12, 0.06, -0.18, 0.06, -1.62, 0.06], ['l', -1.47, 0.00], ['l', 0.00, 1.47], ['l', 0.00, 1.47], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -1.47], ['l', 0.00, -1.47], ['l', -1.47, 0.00], ['c', -1.44, 0.00, -1.50, 0.00, -1.62, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.47, 0.00], ['l', 1.47, 0.00], ['l', 0.00, -1.47], ['c', 0.00, -1.44, 0.00, -1.50, 0.06, -1.62], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.295, h: 8.295 },\n\t'scripts.upbow': { d: [['M', -4.65, -15.54], ['c', 0.12, -0.09, 0.36, -0.06, 0.48, 0.03], ['c', 0.03, 0.03, 0.09, 0.09, 0.12, 0.15], ['c', 0.03, 0.06, 0.66, 2.13, 1.41, 4.62], ['c', 1.35, 4.41, 1.38, 4.56, 2.01, 6.96], ['l', 0.63, 2.46], ['l', 0.63, -2.46], ['c', 0.63, -2.40, 0.66, -2.55, 2.01, -6.96], ['c', 0.75, -2.49, 1.38, -4.56, 1.41, -4.62], ['c', 0.06, -0.15, 0.18, -0.21, 0.36, -0.24], ['c', 0.15, 0.00, 0.30, 0.06, 0.39, 0.18], ['c', 0.15, 0.21, 0.24, -0.18, -2.10, 7.56], ['c', -1.20, 3.96, -2.22, 7.32, -2.25, 7.41], ['c', 0.00, 0.12, -0.06, 0.27, -0.09, 0.30], ['c', -0.12, 0.21, -0.60, 0.21, -0.72, 0.00], ['c', -0.03, -0.03, -0.09, -0.18, -0.09, -0.30], ['c', -0.03, -0.09, -1.05, -3.45, -2.25, -7.41], ['c', -2.34, -7.74, -2.25, -7.35, -2.10, -7.56], ['c', 0.03, -0.03, 0.09, -0.09, 0.15, -0.12], ['z']], w: 9.73, h: 15.608 },\n\t'scripts.downbow': { d: [['M', -5.55, -9.93], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.46, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 4.77], ['c', 0.00, 5.28, 0.00, 4.89, -0.18, 5.01], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -2.97], ['l', 0.00, -2.85], ['l', -4.83, 0.00], ['l', -4.83, 0.00], ['l', 0.00, 2.85], ['c', 0.00, 2.79, 0.00, 2.88, -0.06, 2.97], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.21, -0.06, -4.89], ['l', 0.00, -4.77], ['z']], w: 11.22, h: 9.992 },\n\t'scripts.turn': { d: [['M', -4.77, -3.90], ['c', 0.36, -0.06, 1.05, -0.06, 1.44, 0.03], ['c', 0.78, 0.15, 1.50, 0.51, 2.34, 1.14], ['c', 0.60, 0.45, 1.05, 0.87, 2.22, 2.01], ['c', 1.11, 1.08, 1.62, 1.50, 2.22, 1.86], ['c', 0.60, 0.36, 1.32, 0.57, 1.92, 0.57], ['c', 0.90, 0.00, 1.71, -0.57, 1.89, -1.35], ['c', 0.24, -0.93, -0.39, -1.89, -1.35, -2.10], ['l', -0.15, -0.06], ['l', -0.09, 0.15], ['c', -0.03, 0.09, -0.15, 0.24, -0.24, 0.33], ['c', -0.72, 0.72, -2.04, 0.54, -2.49, -0.36], ['c', -0.48, -0.93, 0.03, -1.86, 1.17, -2.19], ['c', 0.30, -0.09, 1.02, -0.09, 1.35, 0.00], ['c', 0.99, 0.27, 1.74, 0.87, 2.25, 1.83], ['c', 0.69, 1.41, 0.63, 3.00, -0.21, 4.26], ['c', -0.21, 0.30, -0.69, 0.81, -0.99, 1.02], ['c', -0.30, 0.21, -0.84, 0.45, -1.17, 0.54], ['c', -1.23, 0.36, -2.49, 0.15, -3.72, -0.60], ['c', -0.75, -0.48, -1.41, -1.02, -2.85, -2.46], ['c', -1.11, -1.08, -1.62, -1.50, -2.22, -1.86], ['c', -0.60, -0.36, -1.32, -0.57, -1.92, -0.57], ['c', -0.90, 0.00, -1.71, 0.57, -1.89, 1.35], ['c', -0.24, 0.93, 0.39, 1.89, 1.35, 2.10], ['l', 0.15, 0.06], ['l', 0.09, -0.15], ['c', 0.03, -0.09, 0.15, -0.24, 0.24, -0.33], ['c', 0.72, -0.72, 2.04, -0.54, 2.49, 0.36], ['c', 0.48, 0.93, -0.03, 1.86, -1.17, 2.19], ['c', -0.30, 0.09, -1.02, 0.09, -1.35, 0.00], ['c', -0.99, -0.27, -1.74, -0.87, -2.25, -1.83], ['c', -0.69, -1.41, -0.63, -3.00, 0.21, -4.26], ['c', 0.21, -0.30, 0.69, -0.81, 0.99, -1.02], ['c', 0.48, -0.33, 1.11, -0.57, 1.74, -0.66], ['z']], w: 16.366, h: 7.893 },\n\t'scripts.trill': { d: [['M', -0.51, -16.02], ['c', 0.12, -0.09, 0.21, -0.18, 0.21, -0.18], ['l', -0.81, 4.02], ['l', -0.81, 4.02], ['c', 0.03, 0.00, 0.51, -0.27, 1.08, -0.60], ['c', 0.60, -0.30, 1.14, -0.63, 1.26, -0.66], ['c', 1.14, -0.54, 2.31, -0.60, 3.09, -0.18], ['c', 0.27, 0.15, 0.54, 0.36, 0.60, 0.51], ['l', 0.06, 0.12], ['l', 0.21, -0.21], ['c', 0.90, -0.81, 2.22, -0.99, 3.12, -0.42], ['c', 0.60, 0.42, 0.90, 1.14, 0.78, 2.07], ['c', -0.15, 1.29, -1.05, 2.31, -1.95, 2.25], ['c', -0.48, -0.03, -0.78, -0.30, -0.96, -0.81], ['c', -0.09, -0.27, -0.09, -0.90, -0.03, -1.20], ['c', 0.21, -0.75, 0.81, -1.23, 1.59, -1.32], ['l', 0.24, -0.03], ['l', -0.09, -0.12], ['c', -0.51, -0.66, -1.62, -0.63, -2.31, 0.03], ['c', -0.39, 0.42, -0.30, 0.09, -1.23, 4.77], ['l', -0.81, 4.14], ['c', -0.03, 0.00, -0.12, -0.03, -0.21, -0.09], ['c', -0.33, -0.15, -0.54, -0.18, -0.99, -0.18], ['c', -0.42, 0.00, -0.66, 0.03, -1.05, 0.18], ['c', -0.12, 0.06, -0.21, 0.09, -0.21, 0.09], ['c', 0.00, -0.03, 0.36, -1.86, 0.81, -4.11], ['c', 0.90, -4.47, 0.87, -4.26, 0.69, -4.53], ['c', -0.21, -0.36, -0.66, -0.51, -1.17, -0.36], ['c', -0.15, 0.06, -2.22, 1.14, -2.58, 1.38], ['c', -0.12, 0.09, -0.12, 0.09, -0.21, 0.60], ['l', -0.09, 0.51], ['l', 0.21, 0.24], ['c', 0.63, 0.75, 1.02, 1.47, 1.20, 2.19], ['c', 0.06, 0.27, 0.06, 0.36, 0.06, 0.81], ['c', 0.00, 0.42, 0.00, 0.54, -0.06, 0.78], ['c', -0.15, 0.54, -0.33, 0.93, -0.63, 1.35], ['c', -0.18, 0.24, -0.57, 0.63, -0.81, 0.78], ['c', -0.24, 0.15, -0.63, 0.36, -0.84, 0.42], ['c', -0.27, 0.06, -0.66, 0.06, -0.87, 0.03], ['c', -0.81, -0.18, -1.32, -1.05, -1.38, -2.46], ['c', -0.03, -0.60, 0.03, -0.99, 0.33, -2.46], ['c', 0.21, -1.08, 0.24, -1.32, 0.21, -1.29], ['c', -1.20, 0.48, -2.40, 0.75, -3.21, 0.72], ['c', -0.69, -0.06, -1.17, -0.30, -1.41, -0.72], ['c', -0.39, -0.75, -0.12, -1.80, 0.66, -2.46], ['c', 0.24, -0.18, 0.69, -0.42, 1.02, -0.51], ['c', 0.69, -0.18, 1.53, -0.15, 2.31, 0.09], ['c', 0.30, 0.09, 0.75, 0.30, 0.99, 0.45], ['c', 0.12, 0.09, 0.15, 0.09, 0.15, 0.03], ['c', 0.03, -0.03, 0.33, -1.59, 0.72, -3.45], ['c', 0.36, -1.86, 0.66, -3.42, 0.69, -3.45], ['c', 0.00, -0.03, 0.03, -0.03, 0.21, 0.03], ['c', 0.21, 0.06, 0.27, 0.06, 0.48, 0.06], ['c', 0.42, -0.03, 0.78, -0.18, 1.26, -0.48], ['c', 0.15, -0.12, 0.36, -0.27, 0.48, -0.39], ['z'], ['m', -5.73, 7.68], ['c', -0.27, -0.03, -0.96, -0.06, -1.20, -0.03], ['c', -0.81, 0.12, -1.35, 0.57, -1.50, 1.20], ['c', -0.18, 0.66, 0.12, 1.14, 0.75, 1.29], ['c', 0.66, 0.12, 1.92, -0.12, 3.18, -0.66], ['l', 0.33, -0.15], ['l', 0.09, -0.39], ['c', 0.06, -0.21, 0.09, -0.42, 0.09, -0.45], ['c', 0.00, -0.03, -0.45, -0.30, -0.75, -0.45], ['c', -0.27, -0.15, -0.66, -0.27, -0.99, -0.36], ['z'], ['m', 4.29, 3.63], ['c', -0.24, -0.39, -0.51, -0.75, -0.51, -0.69], ['c', -0.06, 0.12, -0.39, 1.92, -0.45, 2.28], ['c', -0.09, 0.54, -0.12, 1.14, -0.06, 1.38], ['c', 0.06, 0.42, 0.21, 0.60, 0.51, 0.57], ['c', 0.39, -0.06, 0.75, -0.48, 0.93, -1.14], ['c', 0.09, -0.33, 0.09, -1.05, 0.00, -1.38], ['c', -0.09, -0.39, -0.24, -0.69, -0.42, -1.02], ['z']], w: 17.963, h: 16.49 },\n\t'scripts.segno': { d: [['M', -3.72, -11.22], ['c', 0.78, -0.09, 1.59, 0.03, 2.31, 0.42], ['c', 1.20, 0.60, 2.01, 1.71, 2.31, 3.09], ['c', 0.09, 0.42, 0.09, 1.20, 0.03, 1.50], ['c', -0.15, 0.45, -0.39, 0.81, -0.66, 0.93], ['c', -0.33, 0.18, -0.84, 0.21, -1.23, 0.15], ['c', -0.81, -0.18, -1.32, -0.93, -1.26, -1.89], ['c', 0.03, -0.36, 0.09, -0.57, 0.24, -0.90], ['c', 0.15, -0.33, 0.45, -0.60, 0.72, -0.75], ['c', 0.12, -0.06, 0.18, -0.09, 0.18, -0.12], ['c', 0.00, -0.03, -0.03, -0.15, -0.09, -0.24], ['c', -0.18, -0.45, -0.54, -0.87, -0.96, -1.08], ['c', -1.11, -0.57, -2.34, -0.18, -2.88, 0.90], ['c', -0.24, 0.51, -0.33, 1.11, -0.24, 1.83], ['c', 0.27, 1.92, 1.50, 3.54, 3.93, 5.13], ['c', 0.48, 0.33, 1.26, 0.78, 1.29, 0.78], ['c', 0.03, 0.00, 1.35, -2.19, 2.94, -4.89], ['l', 2.88, -4.89], ['l', 0.84, 0.00], ['l', 0.87, 0.00], ['l', -0.03, 0.06], ['c', -0.15, 0.21, -6.15, 10.41, -6.15, 10.44], ['c', 0.00, 0.00, 0.21, 0.15, 0.48, 0.27], ['c', 2.61, 1.47, 4.35, 3.03, 5.13, 4.65], ['c', 1.14, 2.34, 0.51, 5.07, -1.44, 6.39], ['c', -0.66, 0.42, -1.32, 0.63, -2.13, 0.69], ['c', -2.01, 0.09, -3.81, -1.41, -4.26, -3.54], ['c', -0.09, -0.42, -0.09, -1.20, -0.03, -1.50], ['c', 0.15, -0.45, 0.39, -0.81, 0.66, -0.93], ['c', 0.33, -0.18, 0.84, -0.21, 1.23, -0.15], ['c', 0.81, 0.18, 1.32, 0.93, 1.26, 1.89], ['c', -0.03, 0.36, -0.09, 0.57, -0.24, 0.90], ['c', -0.15, 0.33, -0.45, 0.60, -0.72, 0.75], ['c', -0.12, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.03, 0.03, 0.15, 0.09, 0.24], ['c', 0.18, 0.45, 0.54, 0.87, 0.96, 1.08], ['c', 1.11, 0.57, 2.34, 0.18, 2.88, -0.90], ['c', 0.24, -0.51, 0.33, -1.11, 0.24, -1.83], ['c', -0.27, -1.92, -1.50, -3.54, -3.93, -5.13], ['c', -0.48, -0.33, -1.26, -0.78, -1.29, -0.78], ['c', -0.03, 0.00, -1.35, 2.19, -2.91, 4.89], ['l', -2.88, 4.89], ['l', -0.87, 0.00], ['l', -0.87, 0.00], ['l', 0.03, -0.06], ['c', 0.15, -0.21, 6.15, -10.41, 6.15, -10.44], ['c', 0.00, 0.00, -0.21, -0.15, -0.48, -0.30], ['c', -2.61, -1.44, -4.35, -3.00, -5.13, -4.62], ['c', -0.90, -1.89, -0.72, -4.02, 0.48, -5.52], ['c', 0.69, -0.84, 1.68, -1.41, 2.73, -1.53], ['z'], ['m', 8.76, 9.09], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z'], ['m', -10.53, 2.61], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z']], w: 15, h: 22.504 },\n\t'scripts.coda': { d: [['M', -0.21, -10.47], ['c', 0.18, -0.12, 0.42, -0.06, 0.54, 0.12], ['c', 0.06, 0.09, 0.06, 0.18, 0.06, 1.50], ['l', 0.00, 1.38], ['l', 0.18, 0.00], ['c', 0.39, 0.06, 0.96, 0.24, 1.38, 0.48], ['c', 1.68, 0.93, 2.82, 3.24, 3.03, 6.12], ['c', 0.03, 0.24, 0.03, 0.45, 0.03, 0.45], ['c', 0.00, 0.03, 0.60, 0.03, 1.35, 0.03], ['c', 1.50, 0.00, 1.47, 0.00, 1.59, 0.18], ['c', 0.09, 0.12, 0.09, 0.30, 0.00, 0.42], ['c', -0.12, 0.18, -0.09, 0.18, -1.59, 0.18], ['c', -0.75, 0.00, -1.35, 0.00, -1.35, 0.03], ['c', 0.00, 0.00, 0.00, 0.21, -0.03, 0.42], ['c', -0.24, 3.15, -1.53, 5.58, -3.45, 6.36], ['c', -0.27, 0.12, -0.72, 0.24, -0.96, 0.27], ['l', -0.18, 0.00], ['l', 0.00, 1.38], ['c', 0.00, 1.32, 0.00, 1.41, -0.06, 1.50], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -1.50], ['l', 0.00, -1.38], ['l', -0.18, 0.00], ['c', -0.39, -0.06, -0.96, -0.24, -1.38, -0.48], ['c', -1.68, -0.93, -2.82, -3.24, -3.03, -6.15], ['c', -0.03, -0.21, -0.03, -0.42, -0.03, -0.42], ['c', 0.00, -0.03, -0.60, -0.03, -1.35, -0.03], ['c', -1.50, 0.00, -1.47, 0.00, -1.59, -0.18], ['c', -0.09, -0.12, -0.09, -0.30, 0.00, -0.42], ['c', 0.12, -0.18, 0.09, -0.18, 1.59, -0.18], ['c', 0.75, 0.00, 1.35, 0.00, 1.35, -0.03], ['c', 0.00, 0.00, 0.00, -0.21, 0.03, -0.45], ['c', 0.24, -3.12, 1.53, -5.55, 3.45, -6.33], ['c', 0.27, -0.12, 0.72, -0.24, 0.96, -0.27], ['l', 0.18, 0.00], ['l', 0.00, -1.38], ['c', 0.00, -1.53, 0.00, -1.50, 0.18, -1.62], ['z'], ['m', -0.18, 6.93], ['c', 0.00, -2.97, 0.00, -3.15, -0.06, -3.15], ['c', -0.09, 0.00, -0.51, 0.15, -0.66, 0.21], ['c', -0.87, 0.51, -1.38, 1.62, -1.56, 3.51], ['c', -0.06, 0.54, -0.12, 1.59, -0.12, 2.16], ['l', 0.00, 0.42], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 1.17, -3.06], ['c', -0.09, -0.03, -0.21, -0.06, -0.27, -0.09], ['l', -0.12, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -0.81], ['c', -0.06, -2.40, -0.33, -3.69, -0.93, -4.59], ['c', -0.27, -0.39, -0.66, -0.69, -1.08, -0.81], ['z'], ['m', -1.17, 10.14], ['l', 0.00, -3.15], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 0.81], ['c', 0.03, 0.96, 0.06, 1.47, 0.15, 2.13], ['c', 0.24, 2.04, 0.96, 3.12, 2.13, 3.36], ['l', 0.12, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 3.18, -2.34], ['l', 0.00, -0.81], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 0.12, 0.00], ['c', 1.17, -0.24, 1.89, -1.32, 2.13, -3.36], ['c', 0.09, -0.66, 0.12, -1.17, 0.15, -2.13], ['z']], w: 16.035, h: 21.062 },\n\t'scripts.comma': { d: [['M', 1.14, -4.62], ['c', 0.30, -0.12, 0.69, -0.03, 0.93, 0.15], ['c', 0.12, 0.12, 0.36, 0.45, 0.51, 0.78], ['c', 0.90, 1.77, 0.54, 4.05, -1.08, 6.75], ['c', -0.36, 0.63, -0.87, 1.38, -0.96, 1.44], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.09, -0.18, -0.09, -0.30, 0.12, -0.60], ['c', 0.96, -1.44, 1.44, -2.97, 1.38, -4.35], ['c', -0.06, -0.93, -0.30, -1.68, -0.78, -2.46], ['c', -0.27, -0.39, -0.33, -0.63, -0.24, -0.96], ['c', 0.09, -0.27, 0.36, -0.54, 0.66, -0.63], ['z']], w: 3.042, h: 9.237 },\n\t'scripts.roll': { d: [['M', 1.95, -6.00], ['c', 0.21, -0.09, 0.36, -0.09, 0.57, 0.00], ['c', 0.39, 0.15, 0.63, 0.39, 1.47, 1.35], ['c', 0.66, 0.75, 0.78, 0.87, 1.08, 1.05], ['c', 0.75, 0.45, 1.65, 0.42, 2.40, -0.06], ['c', 0.12, -0.09, 0.27, -0.27, 0.54, -0.60], ['c', 0.42, -0.54, 0.51, -0.63, 0.69, -0.63], ['c', 0.09, 0.00, 0.30, 0.12, 0.36, 0.21], ['c', 0.09, 0.12, 0.12, 0.30, 0.03, 0.42], ['c', -0.06, 0.12, -3.15, 3.90, -3.30, 4.08], ['c', -0.06, 0.06, -0.18, 0.12, -0.27, 0.18], ['c', -0.27, 0.12, -0.60, 0.06, -0.99, -0.27], ['c', -0.27, -0.21, -0.42, -0.39, -1.08, -1.14], ['c', -0.63, -0.72, -0.81, -0.90, -1.17, -1.08], ['c', -0.36, -0.18, -0.57, -0.21, -0.99, -0.21], ['c', -0.39, 0.00, -0.63, 0.03, -0.93, 0.18], ['c', -0.36, 0.15, -0.51, 0.27, -0.90, 0.81], ['c', -0.24, 0.27, -0.45, 0.51, -0.48, 0.54], ['c', -0.12, 0.09, -0.27, 0.06, -0.39, 0.00], ['c', -0.24, -0.15, -0.33, -0.39, -0.21, -0.60], ['c', 0.09, -0.12, 3.18, -3.87, 3.33, -4.02], ['c', 0.06, -0.06, 0.18, -0.15, 0.24, -0.21], ['z']], w: 10.817, h: 6.125 },\n\t'scripts.prall': { d: [['M', -4.38, -3.69], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.57, -0.84, 1.23, -1.83], ['c', 1.14, -1.68, 1.23, -1.83, 1.35, -1.89], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['c', -0.03, 0.00, -0.57, 0.84, -1.23, 1.83], ['c', -1.14, 1.68, -1.23, 1.83, -1.35, 1.89], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['z']], w: 15.011, h: 7.5 },\n\t'scripts.arpeggio': { d: [['M', 1.5, 0], ['c', 1.5, 2, 1.5, 3, 1.5, 3], ['s', 0, 1, -2, 1.5], ['s', -0.5, 3, 1, 5.5], ['l', 1.5, 0], ['s', -1.75, -2, -1.9, -3.25], ['s', 2.15, -0.6, 2.95, -1.6], ['s', 0.45, -1, 0.5, -1.25], ['s', 0, -1, -2, -3.9], ['l', -1.5, 0], ['z']], w: 5, h: 10 },\n\t'scripts.mordent': { d: [['M', -0.21, -4.95], ['c', 0.27, -0.15, 0.63, 0.00, 0.75, 0.27], ['c', 0.06, 0.12, 0.06, 0.24, 0.06, 1.44], ['l', 0.00, 1.29], ['l', 0.57, -0.84], ['c', 0.51, -0.75, 0.57, -0.84, 0.69, -0.90], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.83, -1.89], ['c', -0.81, -0.99, -1.50, -1.80, -1.53, -1.86], ['c', -0.06, -0.03, -0.06, -0.03, -0.12, 0.03], ['c', -0.06, 0.06, -0.06, 0.15, -0.06, 2.28], ['c', 0.00, 1.95, 0.00, 2.25, -0.06, 2.34], ['c', -0.18, 0.45, -0.81, 0.48, -1.05, 0.03], ['c', -0.03, -0.06, -0.06, -0.24, -0.06, -1.41], ['l', 0.00, -1.35], ['l', -0.57, 0.84], ['c', -0.54, 0.78, -0.60, 0.87, -0.72, 0.93], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.06, -0.06, 0.09, -0.09], ['c', 0.06, -0.12, 0.06, -0.15, 0.06, -2.28], ['c', 0.00, -1.92, 0.00, -2.22, 0.06, -2.31], ['c', 0.06, -0.15, 0.15, -0.24, 0.30, -0.30], ['z']], w: 15.011, h: 10.012 },\n\t'flags.u8th': { d: [['M', -0.42, 3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.18], ['c', 0.00, 0.30, 0.06, 0.84, 0.12, 1.23], ['c', 0.24, 1.53, 0.90, 3.12, 2.13, 5.16], ['l', 0.99, 1.59], ['c', 0.87, 1.44, 1.38, 2.34, 1.77, 3.09], ['c', 0.81, 1.68, 1.20, 3.06, 1.26, 4.53], ['c', 0.03, 1.53, -0.21, 3.27, -0.75, 5.01], ['c', -0.21, 0.69, -0.51, 1.50, -0.60, 1.59], ['c', -0.09, 0.12, -0.27, 0.21, -0.42, 0.21], ['c', -0.15, 0.00, -0.42, -0.12, -0.51, -0.21], ['c', -0.15, -0.18, -0.18, -0.42, -0.09, -0.66], ['c', 0.15, -0.33, 0.45, -1.20, 0.57, -1.62], ['c', 0.42, -1.38, 0.60, -2.58, 0.60, -3.90], ['c', 0.00, -0.66, 0.00, -0.81, -0.06, -1.11], ['c', -0.39, -2.07, -1.80, -4.26, -4.59, -7.14], ['l', -0.42, -0.45], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['z']], w: 6.692, h: 22.59 },\n\t'flags.u16th': { d: [['M', -0.42, 7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.39], ['c', 0.06, 1.08, 0.39, 2.19, 0.99, 3.39], ['c', 0.45, 0.90, 0.87, 1.59, 1.95, 3.12], ['c', 1.29, 1.86, 1.77, 2.64, 2.22, 3.57], ['c', 0.45, 0.93, 0.72, 1.80, 0.87, 2.64], ['c', 0.06, 0.51, 0.06, 1.50, 0.00, 1.92], ['c', -0.12, 0.60, -0.30, 1.20, -0.54, 1.71], ['l', -0.09, 0.24], ['l', 0.18, 0.45], ['c', 0.51, 1.20, 0.72, 2.22, 0.69, 3.42], ['c', -0.06, 1.53, -0.39, 3.03, -0.99, 4.53], ['c', -0.30, 0.75, -0.36, 0.81, -0.57, 0.90], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.12, -0.75], ['c', 0.66, -1.41, 1.02, -2.88, 1.08, -4.32], ['c', 0.00, -0.60, -0.03, -1.05, -0.18, -1.59], ['c', -0.30, -1.20, -0.99, -2.40, -2.25, -3.87], ['c', -0.42, -0.48, -1.53, -1.62, -2.19, -2.22], ['l', -0.45, -0.42], ['l', -0.03, 1.11], ['l', 0.00, 1.11], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['z'], ['m', 1.65, 0.09], ['c', -0.30, -0.30, -0.69, -0.72, -0.90, -0.87], ['l', -0.33, -0.33], ['l', 0.00, 0.15], ['c', 0.00, 0.30, 0.06, 0.81, 0.15, 1.26], ['c', 0.27, 1.29, 0.87, 2.61, 2.04, 4.29], ['c', 0.15, 0.24, 0.60, 0.87, 0.96, 1.38], ['l', 1.08, 1.53], ['l', 0.42, 0.63], ['c', 0.03, 0.00, 0.12, -0.36, 0.21, -0.72], ['c', 0.06, -0.33, 0.06, -1.20, 0.00, -1.62], ['c', -0.33, -1.71, -1.44, -3.48, -3.63, -5.70], ['z']], w: 6.693, h: 26.337 },\n\t'flags.u32nd': { d: [['M', -0.42, 11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.09, 1.68, 0.69, 3.27, 2.07, 5.46], ['l', 0.87, 1.35], ['c', 1.02, 1.62, 1.47, 2.37, 1.86, 3.18], ['c', 0.48, 1.02, 0.78, 1.92, 0.93, 2.88], ['c', 0.06, 0.48, 0.06, 1.50, 0.00, 1.89], ['c', -0.09, 0.42, -0.21, 0.87, -0.36, 1.26], ['l', -0.12, 0.30], ['l', 0.15, 0.39], ['c', 0.69, 1.56, 0.84, 2.88, 0.54, 4.38], ['c', -0.09, 0.45, -0.27, 1.08, -0.45, 1.47], ['l', -0.12, 0.24], ['l', 0.18, 0.36], ['c', 0.33, 0.72, 0.57, 1.56, 0.69, 2.34], ['c', 0.12, 1.02, -0.06, 2.52, -0.42, 3.84], ['c', -0.27, 0.93, -0.75, 2.13, -0.93, 2.31], ['c', -0.18, 0.15, -0.45, 0.18, -0.66, 0.09], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.06, -0.60], ['c', 0.21, -0.36, 0.42, -0.90, 0.57, -1.38], ['c', 0.51, -1.41, 0.69, -3.06, 0.48, -4.08], ['c', -0.15, -0.81, -0.57, -1.68, -1.20, -2.55], ['c', -0.72, -0.99, -1.83, -2.13, -3.30, -3.33], ['l', -0.48, -0.42], ['l', -0.03, 1.53], ['l', 0.00, 1.56], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['z'], ['m', 1.26, -3.96], ['c', -0.27, -0.30, -0.54, -0.60, -0.66, -0.72], ['l', -0.18, -0.21], ['l', 0.00, 0.42], ['c', 0.06, 0.87, 0.24, 1.74, 0.66, 2.67], ['c', 0.36, 0.87, 0.96, 1.86, 1.92, 3.18], ['c', 0.21, 0.33, 0.63, 0.87, 0.87, 1.23], ['c', 0.27, 0.39, 0.60, 0.84, 0.75, 1.08], ['l', 0.27, 0.39], ['l', 0.03, -0.12], ['c', 0.12, -0.45, 0.15, -1.05, 0.09, -1.59], ['c', -0.27, -1.86, -1.38, -3.78, -3.75, -6.33], ['z'], ['m', -0.27, 6.09], ['c', -0.27, -0.21, -0.48, -0.42, -0.51, -0.45], ['c', -0.06, -0.03, -0.06, -0.03, -0.06, 0.21], ['c', 0.00, 0.90, 0.30, 2.04, 0.81, 3.09], ['c', 0.48, 1.02, 0.96, 1.77, 2.37, 3.63], ['c', 0.60, 0.78, 1.05, 1.44, 1.29, 1.77], ['c', 0.06, 0.12, 0.15, 0.21, 0.15, 0.18], ['c', 0.03, -0.03, 0.18, -0.57, 0.24, -0.87], ['c', 0.06, -0.45, 0.06, -1.32, -0.03, -1.74], ['c', -0.09, -0.48, -0.24, -0.90, -0.51, -1.44], ['c', -0.66, -1.35, -1.83, -2.70, -3.75, -4.38], ['z']], w: 6.697, h: 32.145 },\n\t'flags.u64th': { d: [['M', -0.42, 15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.06, 1.20, 0.39, 2.37, 1.02, 3.66], ['c', 0.39, 0.81, 0.84, 1.56, 1.80, 3.09], ['c', 0.81, 1.26, 1.05, 1.68, 1.35, 2.22], ['c', 0.87, 1.50, 1.35, 2.79, 1.56, 4.08], ['c', 0.06, 0.54, 0.06, 1.56, -0.03, 2.04], ['c', -0.09, 0.48, -0.21, 0.99, -0.36, 1.35], ['l', -0.12, 0.27], ['l', 0.12, 0.27], ['c', 0.09, 0.15, 0.21, 0.45, 0.27, 0.66], ['c', 0.69, 1.89, 0.63, 3.66, -0.18, 5.46], ['l', -0.18, 0.39], ['l', 0.15, 0.33], ['c', 0.30, 0.66, 0.51, 1.44, 0.63, 2.10], ['c', 0.06, 0.48, 0.06, 1.35, 0.00, 1.71], ['c', -0.15, 0.57, -0.42, 1.20, -0.78, 1.68], ['l', -0.21, 0.27], ['l', 0.18, 0.33], ['c', 0.57, 1.05, 0.93, 2.13, 1.02, 3.18], ['c', 0.06, 0.72, 0.00, 1.83, -0.21, 2.79], ['c', -0.18, 1.02, -0.63, 2.34, -1.02, 3.09], ['c', -0.15, 0.33, -0.48, 0.45, -0.78, 0.30], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.03, -0.54], ['c', 0.75, -1.50, 1.23, -3.45, 1.17, -4.89], ['c', -0.06, -1.02, -0.42, -2.01, -1.17, -3.15], ['c', -0.48, -0.72, -1.02, -1.35, -1.89, -2.22], ['c', -0.57, -0.57, -1.56, -1.50, -1.92, -1.77], ['l', -0.12, -0.09], ['l', 0.00, 1.68], ['l', 0.00, 1.68], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['z'], ['m', 0.93, -8.07], ['c', -0.27, -0.30, -0.48, -0.54, -0.51, -0.54], ['c', 0.00, 0.00, 0.00, 0.69, 0.03, 1.02], ['c', 0.15, 1.47, 0.75, 2.94, 2.04, 4.83], ['l', 1.08, 1.53], ['c', 0.39, 0.57, 0.84, 1.20, 0.99, 1.44], ['c', 0.15, 0.24, 0.30, 0.45, 0.30, 0.45], ['c', 0.00, 0.00, 0.03, -0.09, 0.06, -0.21], ['c', 0.36, -1.59, -0.15, -3.33, -1.47, -5.40], ['c', -0.63, -0.93, -1.35, -1.83, -2.52, -3.12], ['z'], ['m', 0.06, 6.72], ['c', -0.24, -0.21, -0.48, -0.42, -0.51, -0.45], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.20, 0.30, 2.34, 0.93, 3.60], ['c', 0.45, 0.90, 0.96, 1.68, 2.25, 3.51], ['c', 0.39, 0.54, 0.84, 1.17, 1.02, 1.44], ['c', 0.21, 0.33, 0.33, 0.51, 0.33, 0.48], ['c', 0.06, -0.09, 0.21, -0.63, 0.30, -0.99], ['c', 0.06, -0.33, 0.06, -0.45, 0.06, -0.96], ['c', 0.00, -0.60, -0.03, -0.84, -0.18, -1.35], ['c', -0.30, -1.08, -1.02, -2.28, -2.13, -3.57], ['c', -0.39, -0.45, -1.44, -1.47, -2.01, -1.98], ['z'], ['m', 0.00, 6.72], ['c', -0.24, -0.21, -0.48, -0.39, -0.51, -0.42], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.41, 0.45, 2.82, 1.38, 4.35], ['c', 0.42, 0.72, 0.72, 1.14, 1.86, 2.73], ['c', 0.36, 0.45, 0.75, 0.99, 0.87, 1.20], ['c', 0.15, 0.21, 0.30, 0.36, 0.30, 0.36], ['c', 0.06, 0.00, 0.30, -0.48, 0.39, -0.75], ['c', 0.09, -0.36, 0.12, -0.63, 0.12, -1.05], ['c', -0.06, -1.05, -0.45, -2.04, -1.20, -3.18], ['c', -0.57, -0.87, -1.11, -1.53, -2.07, -2.49], ['c', -0.36, -0.33, -0.84, -0.78, -1.08, -1.02], ['z']], w: 6.682, h: 39.694 },\n\t'flags.d8th': { d: [['M', 5.67, -21.63], ['c', 0.24, -0.12, 0.54, -0.06, 0.69, 0.15], ['c', 0.06, 0.06, 0.21, 0.36, 0.39, 0.66], ['c', 0.84, 1.77, 1.26, 3.36, 1.32, 5.10], ['c', 0.03, 1.29, -0.21, 2.37, -0.81, 3.63], ['c', -0.60, 1.23, -1.26, 2.13, -3.21, 4.38], ['c', -1.35, 1.53, -1.86, 2.19, -2.40, 2.97], ['c', -0.63, 0.93, -1.11, 1.92, -1.38, 2.79], ['c', -0.15, 0.54, -0.27, 1.35, -0.27, 1.80], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.48, -0.30], ['c', 1.83, -1.11, 3.12, -2.10, 4.17, -3.12], ['c', 0.78, -0.81, 1.32, -1.53, 1.71, -2.31], ['c', 0.45, -0.93, 0.60, -1.74, 0.51, -2.88], ['c', -0.12, -1.56, -0.63, -3.18, -1.47, -4.68], ['c', -0.12, -0.21, -0.15, -0.33, -0.06, -0.51], ['c', 0.06, -0.15, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.492, h: 21.691 },\n\t'flags.ugrace': { d: [['M', 6.03, 6.93], ['c', 0.15, -0.09, 0.33, -0.06, 0.51, 0.00], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.06, 0.39, -0.03, 0.54], ['c', -0.06, 0.15, -10.89, 8.88, -11.07, 8.97], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.39, 0.03, -0.54], ['c', 0.06, -0.15, 10.89, -8.88, 11.07, -8.97], ['z']], w: 12.019, h: 9.954 },\n\t'flags.dgrace': { d: [['M', -6.06, -15.93], ['c', 0.18, -0.09, 0.33, -0.12, 0.48, -0.06], ['c', 0.18, 0.09, 14.01, 8.04, 14.10, 8.10], ['c', 0.12, 0.12, 0.18, 0.33, 0.18, 0.51], ['c', -0.03, 0.21, -0.15, 0.39, -0.36, 0.48], ['c', -0.18, 0.09, -0.33, 0.12, -0.48, 0.06], ['c', -0.18, -0.09, -14.01, -8.04, -14.10, -8.10], ['c', -0.12, -0.12, -0.18, -0.33, -0.18, -0.51], ['c', 0.03, -0.21, 0.15, -0.39, 0.36, -0.48], ['z']], w: 15.12, h: 9.212 },\n\t'flags.d16th': { d: [['M', 6.84, -22.53], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.15, 0.15, 0.33, 0.87, 0.45, 1.56], ['c', 0.06, 0.33, 0.06, 1.35, 0.00, 1.65], ['c', -0.06, 0.33, -0.15, 0.78, -0.27, 1.11], ['c', -0.12, 0.33, -0.45, 0.96, -0.66, 1.32], ['l', -0.18, 0.27], ['l', 0.09, 0.18], ['c', 0.48, 1.02, 0.72, 2.25, 0.69, 3.30], ['c', -0.06, 1.23, -0.42, 2.28, -1.26, 3.45], ['c', -0.57, 0.87, -0.99, 1.32, -3.00, 3.39], ['c', -1.56, 1.56, -2.22, 2.40, -2.76, 3.45], ['c', -0.42, 0.84, -0.66, 1.80, -0.66, 2.55], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.14], ['l', 0.00, 1.11], ['l', 0.27, -0.15], ['c', 1.11, -0.57, 1.77, -0.99, 2.52, -1.47], ['c', 2.37, -1.56, 3.69, -3.15, 4.05, -4.83], ['c', 0.03, -0.18, 0.03, -0.39, 0.03, -0.78], ['c', 0.00, -0.60, -0.03, -0.93, -0.24, -1.50], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.50], ['c', -0.06, -0.18, -0.15, -0.36, -0.15, -0.36], ['c', -0.03, 0.00, -0.03, 0.03, -0.06, 0.06], ['c', -0.06, 0.12, -0.96, 1.02, -1.95, 1.98], ['c', -0.63, 0.57, -1.26, 1.17, -1.44, 1.35], ['c', -1.53, 1.62, -2.28, 2.85, -2.55, 4.32], ['c', -0.03, 0.18, -0.03, 0.54, -0.06, 0.99], ['l', 0.00, 0.69], ['l', 0.18, -0.09], ['c', 0.93, -0.54, 2.10, -1.29, 2.82, -1.83], ['c', 0.69, -0.51, 1.02, -0.81, 1.53, -1.29], ['c', 1.86, -1.89, 2.37, -3.66, 1.68, -5.82], ['z']], w: 8.475, h: 22.591 },\n\t'flags.d32nd': { d: [['M', 6.84, -29.13], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.12, 0.12, 0.27, 0.63, 0.36, 1.11], ['c', 0.33, 1.59, 0.06, 3.06, -0.81, 4.47], ['l', -0.18, 0.27], ['l', 0.09, 0.15], ['c', 0.12, 0.24, 0.33, 0.69, 0.45, 1.05], ['c', 0.63, 1.83, 0.45, 3.57, -0.57, 5.22], ['l', -0.18, 0.30], ['l', 0.15, 0.27], ['c', 0.42, 0.87, 0.60, 1.71, 0.57, 2.61], ['c', -0.06, 1.29, -0.48, 2.46, -1.35, 3.78], ['c', -0.54, 0.81, -0.93, 1.29, -2.46, 3.00], ['c', -0.51, 0.54, -1.05, 1.17, -1.26, 1.41], ['c', -1.56, 1.86, -2.25, 3.36, -2.37, 5.01], ['l', 0.00, 0.33], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.35], ['l', 0.03, 1.35], ['l', 0.78, -0.39], ['c', 1.38, -0.69, 2.34, -1.26, 3.24, -1.92], ['c', 1.38, -1.02, 2.28, -2.13, 2.64, -3.21], ['c', 0.15, -0.48, 0.18, -0.72, 0.18, -1.29], ['c', 0.00, -0.57, -0.06, -0.90, -0.24, -1.47], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.20], ['c', -0.09, -0.18, -0.12, -0.21, -0.12, -0.15], ['c', -0.03, 0.09, -1.02, 1.08, -2.04, 2.04], ['c', -1.17, 1.08, -1.65, 1.56, -2.07, 2.04], ['c', -0.84, 0.96, -1.38, 1.86, -1.68, 2.76], ['c', -0.21, 0.57, -0.27, 0.99, -0.30, 1.65], ['l', 0.00, 0.54], ['l', 0.66, -0.33], ['c', 3.57, -1.86, 5.49, -3.69, 5.94, -5.70], ['c', 0.06, -0.39, 0.06, -1.20, -0.03, -1.65], ['c', -0.06, -0.39, -0.24, -0.90, -0.36, -1.20], ['z'], ['m', -0.06, 7.20], ['c', -0.06, -0.15, -0.12, -0.33, -0.15, -0.45], ['l', -0.06, -0.18], ['l', -0.18, 0.21], ['l', -1.83, 1.83], ['c', -0.87, 0.90, -1.77, 1.80, -1.95, 2.01], ['c', -1.08, 1.29, -1.62, 2.31, -1.89, 3.51], ['c', -0.06, 0.30, -0.06, 0.51, -0.09, 0.93], ['l', 0.00, 0.57], ['l', 0.09, -0.06], ['c', 0.75, -0.45, 1.89, -1.26, 2.52, -1.74], ['c', 0.81, -0.66, 1.74, -1.53, 2.22, -2.16], ['c', 1.26, -1.53, 1.68, -3.06, 1.32, -4.47], ['z']], w: 8.385, h: 29.191 },\n\t'flags.d64th': { d: [['M', 7.08, -32.88], ['c', 0.30, -0.12, 0.66, -0.03, 0.78, 0.24], ['c', 0.18, 0.33, 0.27, 2.10, 0.15, 2.64], ['c', -0.09, 0.39, -0.21, 0.78, -0.39, 1.08], ['l', -0.15, 0.30], ['l', 0.09, 0.27], ['c', 0.03, 0.12, 0.09, 0.45, 0.12, 0.69], ['c', 0.27, 1.44, 0.18, 2.55, -0.30, 3.60], ['l', -0.12, 0.33], ['l', 0.06, 0.42], ['c', 0.27, 1.35, 0.33, 2.82, 0.21, 3.63], ['c', -0.12, 0.60, -0.30, 1.23, -0.57, 1.80], ['l', -0.15, 0.27], ['l', 0.03, 0.42], ['c', 0.06, 1.02, 0.06, 2.70, 0.03, 3.06], ['c', -0.15, 1.47, -0.66, 2.76, -1.74, 4.41], ['c', -0.45, 0.69, -0.75, 1.11, -1.74, 2.37], ['c', -1.05, 1.38, -1.50, 1.98, -1.95, 2.73], ['c', -0.93, 1.50, -1.38, 2.82, -1.44, 4.20], ['l', 0.00, 0.42], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.86], ['l', 0.00, 1.89], ['c', 0.00, 0.00, 0.21, -0.03, 0.45, -0.09], ['c', 2.22, -0.39, 4.08, -1.11, 5.19, -2.01], ['c', 0.63, -0.54, 1.02, -1.14, 1.20, -1.80], ['c', 0.06, -0.30, 0.06, -1.14, -0.03, -1.65], ['c', -0.03, -0.18, -0.06, -0.39, -0.09, -0.48], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.45, 6.15], ['c', -0.03, -0.18, -0.06, -0.42, -0.06, -0.54], ['l', -0.03, -0.18], ['l', -0.33, 0.30], ['c', -0.42, 0.36, -0.87, 0.72, -1.68, 1.29], ['c', -1.98, 1.38, -2.25, 1.59, -2.85, 2.16], ['c', -0.75, 0.69, -1.23, 1.44, -1.47, 2.19], ['c', -0.15, 0.45, -0.18, 0.63, -0.21, 1.35], ['l', 0.00, 0.66], ['l', 0.39, -0.18], ['c', 1.83, -0.90, 3.45, -1.95, 4.47, -2.91], ['c', 0.93, -0.90, 1.53, -1.83, 1.74, -2.82], ['c', 0.06, -0.33, 0.06, -0.87, 0.03, -1.32], ['z'], ['m', -0.27, 4.86], ['c', -0.03, -0.21, -0.06, -0.36, -0.06, -0.36], ['c', 0.00, -0.03, -0.12, 0.09, -0.24, 0.24], ['c', -0.39, 0.48, -0.99, 1.08, -2.16, 2.19], ['c', -1.47, 1.38, -1.92, 1.83, -2.46, 2.49], ['c', -0.66, 0.87, -1.08, 1.74, -1.29, 2.58], ['c', -0.09, 0.42, -0.15, 0.87, -0.15, 1.44], ['l', 0.00, 0.54], ['l', 0.48, -0.33], ['c', 1.50, -1.02, 2.58, -1.89, 3.51, -2.82], ['c', 1.47, -1.47, 2.25, -2.85, 2.40, -4.26], ['c', 0.03, -0.39, 0.03, -1.17, -0.03, -1.71], ['z'], ['m', -0.66, 7.68], ['c', 0.03, -0.15, 0.03, -0.60, 0.03, -0.99], ['l', 0.00, -0.72], ['l', -0.27, 0.33], ['l', -1.74, 1.98], ['c', -1.77, 1.92, -2.43, 2.76, -2.97, 3.90], ['c', -0.51, 1.02, -0.72, 1.77, -0.75, 2.91], ['c', 0.00, 0.63, 0.00, 0.63, 0.06, 0.60], ['c', 0.03, -0.03, 0.30, -0.27, 0.63, -0.54], ['c', 0.66, -0.60, 1.86, -1.80, 2.31, -2.31], ['c', 1.65, -1.89, 2.52, -3.54, 2.70, -5.16], ['z']], w: 8.485, h: 32.932 },\n\t'clefs.C': { d: [['M', 0.06, -14.94], ['l', 0.09, -0.06], ['l', 1.92, 0.00], ['l', 1.92, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 14.85], ['l', 0.00, 14.82], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.92, 0.00], ['l', -1.92, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z'], ['m', 5.37, 0.00], ['c', 0.09, -0.06, 0.09, -0.06, 0.57, -0.06], ['c', 0.45, 0.00, 0.45, 0.00, 0.54, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.14], ['l', 0.00, 7.11], ['l', 0.09, -0.06], ['c', 0.18, -0.18, 0.72, -0.84, 0.96, -1.20], ['c', 0.30, -0.45, 0.66, -1.17, 0.84, -1.65], ['c', 0.36, -0.90, 0.57, -1.83, 0.60, -2.79], ['c', 0.03, -0.48, 0.03, -0.54, 0.09, -0.63], ['c', 0.12, -0.18, 0.36, -0.21, 0.54, -0.12], ['c', 0.18, 0.09, 0.21, 0.15, 0.24, 0.66], ['c', 0.06, 0.87, 0.21, 1.56, 0.57, 2.22], ['c', 0.51, 1.02, 1.26, 1.68, 2.22, 1.92], ['c', 0.21, 0.06, 0.33, 0.06, 0.78, 0.06], ['c', 0.45, 0.00, 0.57, 0.00, 0.84, -0.06], ['c', 0.45, -0.12, 0.81, -0.33, 1.08, -0.60], ['c', 0.57, -0.57, 0.87, -1.41, 0.99, -2.88], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.57], ['c', -0.21, -2.58, -0.84, -3.87, -2.16, -4.50], ['c', -0.48, -0.21, -1.17, -0.36, -1.77, -0.36], ['c', -0.69, 0.00, -1.29, 0.27, -1.50, 0.72], ['c', -0.06, 0.15, -0.06, 0.21, -0.06, 0.42], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.24, 0.24, 0.39, 0.63, 0.66], ['c', 0.42, 0.30, 0.57, 0.48, 0.69, 0.72], ['c', 0.06, 0.15, 0.06, 0.21, 0.06, 0.48], ['c', 0.00, 0.39, -0.03, 0.63, -0.21, 0.96], ['c', -0.30, 0.60, -0.87, 1.08, -1.50, 1.26], ['c', -0.27, 0.06, -0.87, 0.06, -1.14, 0.00], ['c', -0.78, -0.24, -1.44, -0.87, -1.65, -1.68], ['c', -0.12, -0.42, -0.09, -1.17, 0.09, -1.71], ['c', 0.51, -1.65, 1.98, -2.82, 3.81, -3.09], ['c', 0.84, -0.09, 2.46, 0.03, 3.51, 0.27], ['c', 2.22, 0.57, 3.69, 1.80, 4.44, 3.75], ['c', 0.36, 0.93, 0.57, 2.13, 0.57, 3.36], ['c', 0.00, 1.44, -0.48, 2.73, -1.38, 3.81], ['c', -1.26, 1.50, -3.27, 2.43, -5.28, 2.43], ['c', -0.48, 0.00, -0.51, 0.00, -0.75, -0.09], ['c', -0.15, -0.03, -0.48, -0.21, -0.78, -0.36], ['c', -0.69, -0.36, -0.87, -0.42, -1.26, -0.42], ['c', -0.27, 0.00, -0.30, 0.00, -0.51, 0.09], ['c', -0.57, 0.30, -0.81, 0.90, -0.81, 2.10], ['c', 0.00, 1.23, 0.24, 1.83, 0.81, 2.13], ['c', 0.21, 0.09, 0.24, 0.09, 0.51, 0.09], ['c', 0.39, 0.00, 0.57, -0.06, 1.26, -0.42], ['c', 0.30, -0.15, 0.63, -0.33, 0.78, -0.36], ['c', 0.24, -0.09, 0.27, -0.09, 0.75, -0.09], ['c', 2.01, 0.00, 4.02, 0.93, 5.28, 2.40], ['c', 0.90, 1.11, 1.38, 2.40, 1.38, 3.84], ['c', 0.00, 1.50, -0.30, 2.88, -0.84, 3.96], ['c', -0.78, 1.59, -2.19, 2.64, -4.17, 3.15], ['c', -1.05, 0.24, -2.67, 0.36, -3.51, 0.27], ['c', -1.83, -0.27, -3.30, -1.44, -3.81, -3.09], ['c', -0.18, -0.54, -0.21, -1.29, -0.09, -1.74], ['c', 0.15, -0.60, 0.63, -1.20, 1.23, -1.47], ['c', 0.36, -0.18, 0.57, -0.21, 0.99, -0.21], ['c', 0.42, 0.00, 0.63, 0.03, 1.02, 0.21], ['c', 0.42, 0.21, 0.84, 0.63, 1.05, 1.05], ['c', 0.18, 0.36, 0.21, 0.60, 0.21, 0.96], ['c', 0.00, 0.30, 0.00, 0.36, -0.06, 0.51], ['c', -0.12, 0.24, -0.27, 0.42, -0.69, 0.72], ['c', -0.57, 0.42, -0.69, 0.63, -0.69, 1.08], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.21, 0.30, 0.39, 0.57, 0.54], ['c', 0.42, 0.18, 0.87, 0.21, 1.53, 0.15], ['c', 1.08, -0.15, 1.80, -0.57, 2.34, -1.32], ['c', 0.54, -0.75, 0.84, -1.83, 0.99, -3.51], ['c', 0.06, -0.57, 0.06, -3.03, 0.00, -3.57], ['c', -0.12, -1.47, -0.42, -2.31, -0.99, -2.88], ['c', -0.27, -0.27, -0.63, -0.48, -1.08, -0.60], ['c', -0.27, -0.06, -0.39, -0.06, -0.84, -0.06], ['c', -0.45, 0.00, -0.57, 0.00, -0.78, 0.06], ['c', -1.14, 0.27, -2.01, 1.17, -2.46, 2.49], ['c', -0.21, 0.57, -0.30, 0.99, -0.33, 1.65], ['c', -0.03, 0.51, -0.06, 0.57, -0.24, 0.66], ['c', -0.12, 0.06, -0.27, 0.06, -0.39, 0.00], ['c', -0.21, -0.09, -0.21, -0.15, -0.24, -0.75], ['c', -0.09, -1.92, -0.78, -3.72, -2.01, -5.19], ['c', -0.18, -0.21, -0.36, -0.42, -0.39, -0.45], ['l', -0.09, -0.06], ['l', 0.00, 7.11], ['l', 0.00, 7.14], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.54, 0.06], ['c', -0.48, 0.00, -0.48, 0.00, -0.57, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z']], w: 20.31, h: 29.97 },\n\t'clefs.F': { d: [['M', 6.30, -7.80], ['c', 0.36, -0.03, 1.65, 0.00, 2.13, 0.03], ['c', 3.60, 0.42, 6.03, 2.10, 6.93, 4.86], ['c', 0.27, 0.84, 0.36, 1.50, 0.36, 2.58], ['c', 0.00, 0.90, -0.03, 1.35, -0.18, 2.16], ['c', -0.78, 3.78, -3.54, 7.08, -8.37, 9.96], ['c', -1.74, 1.05, -3.87, 2.13, -6.18, 3.12], ['c', -0.39, 0.18, -0.75, 0.33, -0.81, 0.36], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.15, 0.06, -0.21, 0.51, -0.48], ['c', 3.00, -1.77, 5.13, -3.21, 6.84, -4.74], ['c', 0.51, -0.45, 1.59, -1.50, 1.95, -1.95], ['c', 1.89, -2.19, 2.88, -4.32, 3.15, -6.78], ['c', 0.06, -0.42, 0.06, -1.77, 0.00, -2.19], ['c', -0.24, -2.01, -0.93, -3.63, -2.04, -4.71], ['c', -0.63, -0.63, -1.29, -1.02, -2.07, -1.20], ['c', -1.62, -0.39, -3.36, 0.15, -4.56, 1.44], ['c', -0.54, 0.60, -1.05, 1.47, -1.32, 2.22], ['l', -0.09, 0.21], ['l', 0.24, -0.12], ['c', 0.39, -0.21, 0.63, -0.24, 1.11, -0.24], ['c', 0.30, 0.00, 0.45, 0.00, 0.66, 0.06], ['c', 1.92, 0.48, 2.85, 2.55, 1.95, 4.38], ['c', -0.45, 0.99, -1.41, 1.62, -2.46, 1.71], ['c', -1.47, 0.09, -2.91, -0.87, -3.39, -2.25], ['c', -0.18, -0.57, -0.21, -1.32, -0.03, -2.28], ['c', 0.39, -2.25, 1.83, -4.20, 3.81, -5.19], ['c', 0.69, -0.36, 1.59, -0.60, 2.37, -0.69], ['z'], ['m', 11.58, 2.52], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.30, 1.17, -0.72, 2.19, -1.89, 1.89], ['c', -0.99, -0.21, -1.50, -1.32, -1.02, -2.25], ['c', 0.18, -0.39, 0.60, -0.69, 1.02, -0.78], ['z'], ['m', 0.00, 7.50], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.21, 0.87, -0.30, 1.71, -1.14, 1.89], ['c', -0.87, 0.21, -1.71, -0.30, -1.89, -1.14], ['c', -0.21, -0.84, 0.30, -1.71, 1.14, -1.89], ['z']], w: 20.153, h: 23.142 },\n\t'clefs.G': { d: [['M', 9.69, -37.41], ['c', 0.09, -0.09, 0.24, -0.06, 0.36, 0.00], ['c', 0.12, 0.09, 0.57, 0.60, 0.96, 1.11], ['c', 1.77, 2.34, 3.21, 5.85, 3.57, 8.73], ['c', 0.21, 1.56, 0.03, 3.27, -0.45, 4.86], ['c', -0.69, 2.31, -1.92, 4.47, -4.23, 7.44], ['c', -0.30, 0.39, -0.57, 0.72, -0.60, 0.75], ['c', -0.03, 0.06, 0.00, 0.15, 0.18, 0.78], ['c', 0.54, 1.68, 1.38, 4.44, 1.68, 5.49], ['l', 0.09, 0.42], ['l', 0.39, 0.00], ['c', 1.47, 0.09, 2.76, 0.51, 3.96, 1.29], ['c', 1.83, 1.23, 3.06, 3.21, 3.39, 5.52], ['c', 0.09, 0.45, 0.12, 1.29, 0.06, 1.74], ['c', -0.09, 1.02, -0.33, 1.83, -0.75, 2.73], ['c', -0.84, 1.71, -2.28, 3.06, -4.02, 3.72], ['l', -0.33, 0.12], ['l', 0.03, 1.26], ['c', 0.00, 1.74, -0.06, 3.63, -0.21, 4.62], ['c', -0.45, 3.06, -2.19, 5.49, -4.47, 6.21], ['c', -0.57, 0.18, -0.90, 0.21, -1.59, 0.21], ['c', -0.69, 0.00, -1.02, -0.03, -1.65, -0.21], ['c', -1.14, -0.27, -2.13, -0.84, -2.94, -1.65], ['c', -0.99, -0.99, -1.56, -2.16, -1.71, -3.54], ['c', -0.09, -0.81, 0.06, -1.53, 0.45, -2.13], ['c', 0.63, -0.99, 1.83, -1.56, 3.00, -1.53], ['c', 1.50, 0.09, 2.64, 1.32, 2.73, 2.94], ['c', 0.06, 1.47, -0.93, 2.70, -2.37, 2.97], ['c', -0.45, 0.06, -0.84, 0.03, -1.29, -0.09], ['l', -0.21, -0.09], ['l', 0.09, 0.12], ['c', 0.39, 0.54, 0.78, 0.93, 1.32, 1.26], ['c', 1.35, 0.87, 3.06, 1.02, 4.35, 0.36], ['c', 1.44, -0.72, 2.52, -2.28, 2.97, -4.35], ['c', 0.15, -0.66, 0.24, -1.50, 0.30, -3.03], ['c', 0.03, -0.84, 0.03, -2.94, 0.00, -3.00], ['c', -0.03, 0.00, -0.18, 0.00, -0.36, 0.03], ['c', -0.66, 0.12, -0.99, 0.12, -1.83, 0.12], ['c', -1.05, 0.00, -1.71, -0.06, -2.61, -0.30], ['c', -4.02, -0.99, -7.11, -4.35, -7.80, -8.46], ['c', -0.12, -0.66, -0.12, -0.99, -0.12, -1.83], ['c', 0.00, -0.84, 0.00, -1.14, 0.15, -1.92], ['c', 0.36, -2.28, 1.41, -4.62, 3.30, -7.29], ['l', 2.79, -3.60], ['c', 0.54, -0.66, 0.96, -1.20, 0.96, -1.23], ['c', 0.00, -0.03, -0.09, -0.33, -0.18, -0.69], ['c', -0.96, -3.21, -1.41, -5.28, -1.59, -7.68], ['c', -0.12, -1.38, -0.15, -3.09, -0.06, -3.96], ['c', 0.33, -2.67, 1.38, -5.07, 3.12, -7.08], ['c', 0.36, -0.42, 0.99, -1.05, 1.17, -1.14], ['z'], ['m', 2.01, 4.71], ['c', -0.15, -0.30, -0.30, -0.54, -0.30, -0.54], ['c', -0.03, 0.00, -0.18, 0.09, -0.30, 0.21], ['c', -2.40, 1.74, -3.87, 4.20, -4.26, 7.11], ['c', -0.06, 0.54, -0.06, 1.41, -0.03, 1.89], ['c', 0.09, 1.29, 0.48, 3.12, 1.08, 5.22], ['c', 0.15, 0.42, 0.24, 0.78, 0.24, 0.81], ['c', 0.00, 0.03, 0.84, -1.11, 1.23, -1.68], ['c', 1.89, -2.73, 2.88, -5.07, 3.15, -7.53], ['c', 0.09, -0.57, 0.12, -1.74, 0.06, -2.37], ['c', -0.09, -1.23, -0.27, -1.92, -0.87, -3.12], ['z'], ['m', -2.94, 20.70], ['c', -0.21, -0.72, -0.39, -1.32, -0.42, -1.32], ['c', 0.00, 0.00, -1.20, 1.47, -1.86, 2.37], ['c', -2.79, 3.63, -4.02, 6.30, -4.35, 9.30], ['c', -0.03, 0.21, -0.03, 0.69, -0.03, 1.08], ['c', 0.00, 0.69, 0.00, 0.75, 0.06, 1.11], ['c', 0.12, 0.54, 0.27, 0.99, 0.51, 1.47], ['c', 0.69, 1.38, 1.83, 2.55, 3.42, 3.42], ['c', 0.96, 0.54, 2.07, 0.90, 3.21, 1.08], ['c', 0.78, 0.12, 2.04, 0.12, 2.94, -0.03], ['c', 0.51, -0.06, 0.45, -0.03, 0.42, -0.30], ['c', -0.24, -3.33, -0.72, -6.33, -1.62, -10.08], ['c', -0.09, -0.39, -0.18, -0.75, -0.18, -0.78], ['c', -0.03, -0.03, -0.42, 0.00, -0.81, 0.09], ['c', -0.90, 0.18, -1.65, 0.57, -2.22, 1.14], ['c', -0.72, 0.72, -1.08, 1.65, -1.05, 2.64], ['c', 0.06, 0.96, 0.48, 1.83, 1.23, 2.58], ['c', 0.36, 0.36, 0.72, 0.63, 1.17, 0.90], ['c', 0.33, 0.18, 0.36, 0.21, 0.42, 0.33], ['c', 0.18, 0.42, -0.18, 0.90, -0.60, 0.87], ['c', -0.18, -0.03, -0.84, -0.36, -1.26, -0.63], ['c', -0.78, -0.51, -1.38, -1.11, -1.86, -1.83], ['c', -1.77, -2.70, -0.99, -6.42, 1.71, -8.19], ['c', 0.30, -0.21, 0.81, -0.48, 1.17, -0.63], ['c', 0.30, -0.09, 1.02, -0.30, 1.14, -0.30], ['c', 0.06, 0.00, 0.09, 0.00, 0.09, -0.03], ['c', 0.03, -0.03, -0.51, -1.92, -1.23, -4.26], ['z'], ['m', 3.78, 7.41], ['c', -0.18, -0.03, -0.36, -0.06, -0.39, -0.06], ['c', -0.03, 0.00, 0.00, 0.21, 0.18, 1.02], ['c', 0.75, 3.18, 1.26, 6.30, 1.50, 9.09], ['c', 0.06, 0.72, 0.00, 0.69, 0.51, 0.42], ['c', 0.78, -0.36, 1.44, -0.96, 1.98, -1.77], ['c', 1.08, -1.62, 1.20, -3.69, 0.30, -5.55], ['c', -0.81, -1.62, -2.31, -2.79, -4.08, -3.15], ['z']], w: 19.051, h: 57.057 },\n\t'clefs.perc': { d: [['M', 5.07, -7.44], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z'], ['m', 6.63, 0.00], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z']], w: 21, h: 14.97 },\n\t'tab.big': { d: [['M', 20.16, -21.66], ['c', 0.24, -0.09, 0.66, 0.09, 0.78, 0.36], ['c', 0.09, 0.21, 0.09, 0.24, -0.18, 0.54], ['c', -0.78, 0.81, -1.86, 1.44, -2.94, 1.71], ['c', -0.87, 0.24, -1.71, 0.24, -2.55, 0.03], ['l', -0.06, -0.03], ['l', -0.18, 0.99], ['c', -0.33, 1.98, -0.75, 4.26, -0.96, 5.04], ['c', -0.42, 1.65, -1.26, 3.18, -2.28, 4.14], ['c', -0.57, 0.57, -1.17, 0.90, -1.86, 1.08], ['c', -0.18, 0.06, -0.33, 0.06, -0.66, 0.06], ['c', -0.54, 0.00, -0.78, -0.03, -1.23, -0.27], ['c', -0.39, -0.18, -0.66, -0.39, -1.38, -0.99], ['c', -0.30, -0.24, -0.66, -0.51, -0.75, -0.57], ['c', -0.21, -0.15, -0.27, -0.24, -0.24, -0.45], ['c', 0.06, -0.27, 0.36, -0.60, 0.60, -0.66], ['c', 0.18, -0.03, 0.33, 0.06, 0.90, 0.57], ['c', 0.48, 0.42, 0.72, 0.57, 0.93, 0.69], ['c', 0.66, 0.33, 1.38, 0.21, 1.95, -0.36], ['c', 0.63, -0.60, 1.05, -1.62, 1.23, -3.00], ['c', 0.03, -0.18, 0.09, -0.66, 0.09, -1.11], ['c', 0.09, -1.56, 0.33, -3.81, 0.57, -5.49], ['c', 0.06, -0.33, 0.09, -0.63, 0.09, -0.63], ['c', -0.03, -0.03, -0.81, -0.12, -1.02, -0.12], ['c', -0.57, 0.00, -1.32, 0.12, -1.80, 0.33], ['c', -0.87, 0.30, -1.35, 0.78, -1.50, 1.41], ['c', -0.18, 0.63, 0.09, 1.26, 0.66, 1.65], ['c', 0.12, 0.06, 0.15, 0.12, 0.18, 0.24], ['c', 0.09, 0.27, 0.06, 0.57, -0.09, 0.75], ['c', -0.03, 0.06, -0.12, 0.09, -0.27, 0.15], ['c', -0.72, 0.21, -1.44, 0.15, -2.10, -0.18], ['c', -0.54, -0.27, -0.96, -0.66, -1.20, -1.14], ['c', -0.39, -0.75, -0.33, -1.74, 0.15, -2.52], ['c', 0.27, -0.42, 0.84, -0.93, 1.41, -1.23], ['c', 1.17, -0.57, 2.88, -0.90, 4.80, -0.90], ['c', 0.69, 0.00, 0.78, 0.00, 1.08, 0.06], ['c', 0.45, 0.09, 1.11, 0.30, 2.07, 0.60], ['c', 1.47, 0.48, 1.83, 0.57, 2.55, 0.54], ['c', 1.02, -0.06, 2.04, -0.45, 2.94, -1.11], ['c', 0.12, -0.09, 0.24, -0.18, 0.27, -0.18], ['z'], ['m', -5.88, 13.05], ['c', 0.21, -0.03, 0.81, 0.00, 1.08, 0.06], ['c', 0.48, 0.12, 0.90, 0.42, 0.99, 0.69], ['c', 0.03, 0.09, 0.03, 0.15, 0.00, 0.27], ['c', 0.00, 0.09, -0.03, 0.57, -0.06, 1.08], ['c', -0.09, 2.19, -0.24, 5.76, -0.39, 8.28], ['c', -0.06, 1.53, -0.06, 1.77, 0.03, 2.01], ['c', 0.09, 0.18, 0.15, 0.24, 0.30, 0.30], ['c', 0.24, 0.12, 0.54, 0.06, 1.23, -0.27], ['c', 0.57, -0.27, 0.66, -0.30, 0.75, -0.24], ['c', 0.09, 0.06, 0.18, 0.30, 0.18, 0.45], ['c', 0.00, 0.33, -0.15, 0.51, -0.45, 0.63], ['c', -0.12, 0.03, -0.39, 0.15, -0.60, 0.27], ['c', -1.17, 0.60, -1.38, 0.69, -1.80, 0.72], ['c', -0.45, 0.03, -0.78, -0.09, -1.08, -0.39], ['c', -0.39, -0.42, -0.66, -1.20, -1.02, -3.12], ['c', -0.24, -1.23, -0.36, -2.07, -0.54, -3.75], ['l', 0.00, -0.18], ['l', -0.36, 0.45], ['c', -0.60, 0.75, -1.32, 1.59, -1.95, 2.25], ['c', -0.15, 0.18, -0.27, 0.30, -0.27, 0.33], ['c', 0.00, 0.00, 0.06, 0.09, 0.15, 0.18], ['c', 0.24, 0.33, 0.60, 0.57, 1.05, 0.69], ['c', 0.18, 0.06, 0.30, 0.06, 0.69, 0.06], ['l', 0.48, 0.03], ['l', 0.06, 0.12], ['c', 0.15, 0.27, 0.03, 0.72, -0.21, 0.90], ['c', -0.18, 0.12, -0.93, 0.27, -1.41, 0.27], ['c', -0.84, 0.00, -1.59, -0.30, -1.98, -0.84], ['l', -0.12, -0.15], ['l', -0.45, 0.42], ['c', -0.99, 0.87, -1.53, 1.32, -2.16, 1.74], ['c', -0.78, 0.51, -1.50, 0.84, -2.10, 0.93], ['c', -0.69, 0.12, -1.20, 0.03, -1.95, -0.42], ['c', -0.21, -0.12, -0.51, -0.27, -0.66, -0.36], ['c', -0.24, -0.12, -0.30, -0.18, -0.33, -0.24], ['c', -0.12, -0.27, 0.15, -0.78, 0.45, -0.93], ['c', 0.24, -0.12, 0.33, -0.09, 0.90, 0.18], ['c', 0.60, 0.30, 0.84, 0.39, 1.20, 0.36], ['c', 0.87, -0.09, 1.77, -0.69, 3.24, -2.31], ['c', 2.67, -2.85, 4.59, -5.94, 5.70, -9.15], ['c', 0.15, -0.45, 0.24, -0.63, 0.42, -0.81], ['c', 0.21, -0.24, 0.60, -0.45, 0.99, -0.51], ['z'], ['m', -3.99, 16.05], ['c', 0.18, 0.00, 0.69, -0.03, 1.17, 0.00], ['c', 3.27, 0.03, 5.37, 0.75, 6.00, 2.07], ['c', 0.45, 0.99, 0.12, 2.40, -0.81, 3.42], ['c', -0.24, 0.27, -0.57, 0.57, -0.84, 0.75], ['c', -0.09, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.00, 0.18, 0.03, 0.42, 0.09], ['c', 1.23, 0.30, 2.01, 0.81, 2.37, 1.59], ['c', 0.27, 0.54, 0.30, 1.32, 0.09, 2.10], ['c', -0.12, 0.36, -0.45, 1.05, -0.69, 1.35], ['c', -0.87, 1.17, -2.10, 1.92, -3.54, 2.25], ['c', -0.36, 0.06, -0.48, 0.06, -0.96, 0.06], ['c', -0.45, 0.00, -0.66, 0.00, -0.84, -0.03], ['c', -0.84, -0.18, -1.47, -0.51, -2.07, -1.11], ['c', -0.33, -0.33, -0.45, -0.51, -0.45, -0.63], ['c', 0.00, -0.06, 0.03, -0.15, 0.06, -0.24], ['c', 0.18, -0.33, 0.69, -0.60, 0.93, -0.48], ['c', 0.03, 0.03, 0.15, 0.12, 0.27, 0.24], ['c', 0.39, 0.42, 0.99, 0.57, 1.62, 0.45], ['c', 1.05, -0.21, 1.98, -1.02, 2.31, -2.01], ['c', 0.48, -1.53, -0.48, -2.55, -2.58, -2.67], ['c', -0.21, 0.00, -0.36, -0.03, -0.42, -0.06], ['c', -0.15, -0.09, -0.21, -0.51, -0.06, -0.78], ['c', 0.12, -0.27, 0.24, -0.33, 0.60, -0.36], ['c', 0.57, -0.06, 1.11, -0.42, 1.50, -0.99], ['c', 0.48, -0.72, 0.54, -1.59, 0.18, -2.31], ['c', -0.12, -0.21, -0.45, -0.54, -0.69, -0.69], ['c', -0.33, -0.21, -0.93, -0.45, -1.35, -0.51], ['l', -0.12, -0.03], ['l', -0.06, 0.48], ['c', -0.54, 2.94, -1.14, 6.24, -1.29, 6.75], ['c', -0.33, 1.35, -0.93, 2.61, -1.65, 3.60], ['c', -0.30, 0.36, -0.81, 0.90, -1.14, 1.14], ['c', -0.30, 0.24, -0.84, 0.48, -1.14, 0.57], ['c', -0.33, 0.09, -0.96, 0.09, -1.26, 0.03], ['c', -0.45, -0.12, -0.87, -0.39, -1.53, -0.96], ['c', -0.24, -0.15, -0.51, -0.39, -0.63, -0.48], ['c', -0.30, -0.21, -0.33, -0.33, -0.21, -0.63], ['c', 0.12, -0.18, 0.27, -0.36, 0.42, -0.45], ['c', 0.27, -0.12, 0.36, -0.09, 0.87, 0.33], ['c', 0.78, 0.60, 1.08, 0.75, 1.65, 0.72], ['c', 0.45, -0.03, 0.81, -0.21, 1.17, -0.54], ['c', 0.87, -0.90, 1.38, -2.85, 1.38, -5.37], ['c', 0.00, -0.60, 0.03, -1.11, 0.12, -2.04], ['c', 0.06, -0.69, 0.24, -2.01, 0.33, -2.58], ['c', 0.06, -0.24, 0.06, -0.42, 0.06, -0.42], ['c', 0.00, 0.00, -0.12, 0.03, -0.21, 0.09], ['c', -1.44, 0.57, -2.16, 1.65, -1.74, 2.55], ['c', 0.09, 0.15, 0.18, 0.24, 0.27, 0.33], ['c', 0.24, 0.21, 0.30, 0.27, 0.33, 0.39], ['c', 0.06, 0.24, 0.00, 0.63, -0.15, 0.78], ['c', -0.09, 0.12, -0.54, 0.21, -0.96, 0.24], ['c', -1.02, 0.03, -2.01, -0.48, -2.43, -1.32], ['c', -0.21, -0.45, -0.27, -0.90, -0.15, -1.44], ['c', 0.06, -0.27, 0.21, -0.66, 0.39, -0.93], ['c', 0.87, -1.29, 3.00, -2.22, 5.64, -2.43], ['z']], w: 19.643, h: 43.325 },\n\t'tab.tiny': { d: [['M', 16.02, -17.25], ['c', 0.12, -0.09, 0.15, -0.09, 0.27, -0.09], ['c', 0.21, 0.03, 0.51, 0.30, 0.51, 0.45], ['c', 0.00, 0.06, -0.12, 0.18, -0.30, 0.36], ['c', -1.11, 1.08, -2.55, 1.59, -3.84, 1.41], ['c', -0.15, -0.03, -0.33, -0.06, -0.39, -0.09], ['c', -0.06, -0.03, -0.09, -0.03, -0.12, -0.03], ['c', 0.00, 0.00, -0.06, 0.42, -0.15, 0.93], ['c', -0.33, 2.01, -0.66, 3.69, -0.84, 4.26], ['c', -0.42, 1.41, -1.23, 2.67, -2.16, 3.33], ['c', -0.27, 0.18, -0.75, 0.42, -0.99, 0.48], ['c', -0.30, 0.09, -0.72, 0.09, -1.02, 0.06], ['c', -0.45, -0.09, -0.84, -0.33, -1.53, -0.90], ['c', -0.21, -0.18, -0.51, -0.39, -0.63, -0.48], ['c', -0.27, -0.21, -0.30, -0.24, -0.30, -0.36], ['c', 0.00, -0.12, 0.09, -0.36, 0.18, -0.45], ['c', 0.09, -0.09, 0.27, -0.18, 0.36, -0.18], ['c', 0.12, 0.00, 0.30, 0.12, 0.66, 0.45], ['c', 0.57, 0.51, 0.87, 0.69, 1.23, 0.72], ['c', 0.93, 0.06, 1.68, -0.78, 1.98, -2.37], ['c', 0.09, -0.39, 0.15, -0.75, 0.18, -1.53], ['c', 0.06, -0.99, 0.24, -2.79, 0.42, -4.05], ['c', 0.03, -0.30, 0.06, -0.57, 0.06, -0.60], ['c', 0.00, -0.06, -0.03, -0.09, -0.15, -0.12], ['c', -0.90, -0.18, -2.13, 0.06, -2.76, 0.57], ['c', -0.36, 0.30, -0.51, 0.60, -0.51, 1.02], ['c', 0.00, 0.45, 0.15, 0.75, 0.48, 0.99], ['c', 0.06, 0.06, 0.15, 0.18, 0.18, 0.24], ['c', 0.12, 0.24, 0.03, 0.63, -0.15, 0.69], ['c', -0.24, 0.12, -0.60, 0.15, -0.90, 0.15], ['c', -0.36, -0.03, -0.57, -0.09, -0.87, -0.24], ['c', -0.78, -0.36, -1.23, -1.11, -1.20, -1.92], ['c', 0.12, -1.53, 1.74, -2.49, 4.62, -2.70], ['c', 1.20, -0.09, 1.47, -0.03, 3.33, 0.57], ['c', 0.90, 0.30, 1.14, 0.36, 1.56, 0.39], ['c', 0.45, 0.00, 0.93, -0.06, 1.38, -0.21], ['c', 0.51, -0.18, 0.81, -0.33, 1.41, -0.75], ['z'], ['m', -4.68, 10.38], ['c', 0.39, -0.06, 0.84, 0.00, 1.20, 0.15], ['c', 0.24, 0.12, 0.36, 0.21, 0.45, 0.36], ['l', 0.09, 0.09], ['l', -0.06, 1.41], ['c', -0.09, 2.19, -0.18, 3.96, -0.27, 5.49], ['c', -0.03, 0.78, -0.06, 1.59, -0.06, 1.86], ['c', 0.00, 0.42, 0.00, 0.48, 0.06, 0.57], ['c', 0.06, 0.18, 0.18, 0.24, 0.36, 0.27], ['c', 0.18, 0.00, 0.39, -0.06, 0.84, -0.27], ['c', 0.45, -0.21, 0.54, -0.24, 0.63, -0.18], ['c', 0.12, 0.12, 0.15, 0.54, 0.03, 0.69], ['c', -0.03, 0.03, -0.15, 0.12, -0.27, 0.18], ['c', -0.15, 0.03, -0.30, 0.12, -0.36, 0.15], ['c', -0.87, 0.45, -1.02, 0.51, -1.26, 0.57], ['c', -0.33, 0.09, -0.60, 0.06, -0.84, -0.06], ['c', -0.42, -0.18, -0.63, -0.60, -0.87, -1.44], ['c', -0.30, -1.23, -0.57, -2.97, -0.66, -4.08], ['c', 0.00, -0.18, -0.03, -0.30, -0.03, -0.33], ['l', -0.06, 0.06], ['c', -0.18, 0.27, -1.11, 1.38, -1.68, 2.01], ['l', -0.33, 0.33], ['l', 0.06, 0.09], ['c', 0.06, 0.15, 0.27, 0.33, 0.48, 0.42], ['c', 0.27, 0.18, 0.51, 0.24, 0.96, 0.27], ['l', 0.39, 0.00], ['l', 0.03, 0.12], ['c', 0.12, 0.21, 0.03, 0.57, -0.15, 0.69], ['c', -0.03, 0.03, -0.21, 0.09, -0.36, 0.15], ['c', -0.27, 0.06, -0.39, 0.06, -0.75, 0.06], ['c', -0.48, 0.00, -0.75, -0.03, -1.08, -0.21], ['c', -0.21, -0.12, -0.51, -0.36, -0.57, -0.48], ['l', -0.03, -0.09], ['l', -0.39, 0.36], ['c', -1.47, 1.35, -2.49, 1.98, -3.42, 2.13], ['c', -0.54, 0.09, -0.96, -0.03, -1.62, -0.39], ['c', -0.21, -0.15, -0.45, -0.27, -0.54, -0.30], ['c', -0.18, -0.09, -0.21, -0.21, -0.12, -0.45], ['c', 0.06, -0.27, 0.33, -0.48, 0.54, -0.48], ['c', 0.03, 0.00, 0.27, 0.09, 0.48, 0.21], ['c', 0.48, 0.24, 0.69, 0.27, 0.99, 0.27], ['c', 0.60, -0.06, 1.17, -0.42, 2.10, -1.35], ['c', 2.22, -2.22, 4.02, -4.98, 4.95, -7.59], ['c', 0.21, -0.57, 0.30, -0.78, 0.48, -0.93], ['c', 0.15, -0.15, 0.42, -0.27, 0.66, -0.33], ['z'], ['m', -3.06, 12.84], ['c', 0.27, -0.03, 1.68, 0.00, 2.01, 0.03], ['c', 1.92, 0.18, 3.15, 0.69, 3.63, 1.50], ['c', 0.18, 0.33, 0.24, 0.51, 0.21, 0.93], ['c', 0.00, 0.45, -0.06, 0.72, -0.24, 1.11], ['c', -0.24, 0.51, -0.69, 1.02, -1.17, 1.35], ['c', -0.21, 0.15, -0.21, 0.15, -0.12, 0.18], ['c', 0.72, 0.15, 1.11, 0.30, 1.50, 0.57], ['c', 0.39, 0.24, 0.63, 0.57, 0.75, 0.96], ['c', 0.09, 0.30, 0.09, 0.96, 0.00, 1.29], ['c', -0.15, 0.57, -0.39, 1.05, -0.78, 1.50], ['c', -0.66, 0.75, -1.62, 1.32, -2.61, 1.53], ['c', -0.27, 0.06, -0.42, 0.06, -0.84, 0.06], ['c', -0.48, 0.00, -0.57, 0.00, -0.81, -0.06], ['c', -0.60, -0.18, -1.05, -0.42, -1.47, -0.81], ['c', -0.36, -0.39, -0.42, -0.51, -0.30, -0.75], ['c', 0.12, -0.21, 0.39, -0.39, 0.60, -0.39], ['c', 0.09, 0.00, 0.15, 0.03, 0.33, 0.18], ['c', 0.12, 0.12, 0.27, 0.24, 0.36, 0.27], ['c', 0.96, 0.48, 2.46, -0.33, 2.82, -1.50], ['c', 0.24, -0.81, -0.03, -1.44, -0.69, -1.77], ['c', -0.39, -0.21, -1.02, -0.33, -1.53, -0.33], ['c', -0.18, 0.00, -0.21, 0.00, -0.27, -0.09], ['c', -0.06, -0.09, -0.06, -0.30, -0.03, -0.48], ['c', 0.06, -0.18, 0.18, -0.36, 0.33, -0.36], ['c', 0.39, -0.06, 0.51, -0.09, 0.72, -0.18], ['c', 0.69, -0.36, 1.11, -1.23, 0.99, -2.01], ['c', -0.09, -0.51, -0.42, -0.90, -0.93, -1.17], ['c', -0.24, -0.12, -0.60, -0.27, -0.87, -0.30], ['c', -0.09, -0.03, -0.09, -0.03, -0.12, 0.12], ['c', 0.00, 0.09, -0.21, 1.11, -0.42, 2.25], ['c', -0.66, 3.75, -0.72, 3.99, -1.26, 5.07], ['c', -0.90, 1.89, -2.25, 2.85, -3.48, 2.61], ['c', -0.39, -0.09, -0.69, -0.27, -1.38, -0.84], ['c', -0.63, -0.51, -0.63, -0.48, -0.63, -0.60], ['c', 0.00, -0.18, 0.18, -0.48, 0.39, -0.57], ['c', 0.21, -0.12, 0.30, -0.09, 0.81, 0.33], ['c', 0.15, 0.15, 0.39, 0.30, 0.54, 0.36], ['c', 0.18, 0.12, 0.27, 0.12, 0.48, 0.15], ['c', 0.99, 0.06, 1.71, -0.78, 2.04, -2.46], ['c', 0.12, -0.66, 0.18, -1.14, 0.21, -2.22], ['c', 0.03, -1.23, 0.12, -2.25, 0.36, -3.63], ['c', 0.03, -0.24, 0.06, -0.45, 0.06, -0.48], ['c', -0.06, -0.03, -0.66, 0.27, -0.90, 0.42], ['c', -0.06, 0.06, -0.21, 0.18, -0.33, 0.30], ['c', -0.57, 0.57, -0.60, 1.35, -0.06, 1.74], ['c', 0.18, 0.12, 0.24, 0.24, 0.21, 0.51], ['c', -0.03, 0.30, -0.15, 0.42, -0.57, 0.48], ['c', -1.11, 0.24, -2.22, -0.42, -2.43, -1.38], ['c', -0.09, -0.45, 0.03, -1.02, 0.30, -1.47], ['c', 0.18, -0.24, 0.60, -0.63, 0.90, -0.84], ['c', 0.90, -0.60, 2.28, -1.02, 3.69, -1.11], ['z']], w: 15.709, h: 34.656 },\n\t'timesig.common': { d: [['M', 6.66, -7.83], ['c', 0.72, -0.06, 1.41, -0.03, 1.98, 0.09], ['c', 1.20, 0.27, 2.34, 0.96, 3.09, 1.92], ['c', 0.63, 0.81, 1.08, 1.86, 1.14, 2.73], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, 0.00, -0.09, -0.12, -0.24, -0.27], ['c', -1.02, -1.11, -2.55, -1.68, -4.08, -1.50], ['c', -1.29, 0.15, -2.04, 0.69, -2.40, 1.74], ['c', -0.36, 0.93, -0.42, 1.89, -0.42, 5.37], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.63, 1.68, 1.41, 2.07], ['c', 0.81, 0.39, 2.16, 0.45, 3.18, 0.09], ['c', 1.29, -0.45, 2.37, -1.53, 3.03, -2.97], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.06, 0.39, -0.42, 1.38, -0.69, 1.89], ['c', -0.96, 1.80, -2.49, 2.94, -4.23, 3.18], ['c', -0.99, 0.12, -2.58, -0.06, -3.63, -0.45], ['c', -0.96, -0.36, -1.71, -0.84, -2.40, -1.50], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.90, -3.45, 2.01, -4.56], ['c', 0.69, -0.66, 1.44, -1.11, 2.37, -1.47], ['c', 0.63, -0.24, 1.47, -0.42, 2.22, -0.48], ['z']], w: 13.038, h: 15.689 },\n\t'timesig.cut': { d: [['M', 6.24, -10.44], ['c', 0.09, -0.06, 0.09, -0.06, 0.48, -0.06], ['c', 0.36, 0.00, 0.36, 0.00, 0.45, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 1.23], ['l', 0.00, 1.26], ['l', 0.27, 0.00], ['c', 1.26, 0.00, 2.49, 0.45, 3.48, 1.29], ['c', 1.05, 0.87, 1.80, 2.28, 1.89, 3.48], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, -0.03, -0.45, -0.51, -0.66, -0.69], ['c', -0.87, -0.69, -1.83, -1.05, -2.94, -1.11], ['l', -0.42, 0.00], ['l', 0.00, 7.17], ['l', 0.00, 7.14], ['l', 0.42, 0.00], ['c', 0.69, -0.03, 1.23, -0.18, 1.86, -0.51], ['c', 1.05, -0.51, 1.89, -1.47, 2.46, -2.70], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.03, 0.24, -0.21, 0.78, -0.39, 1.20], ['c', -0.96, 2.37, -2.94, 3.90, -5.13, 3.90], ['l', -0.30, 0.00], ['l', 0.00, 1.26], ['l', 0.00, 1.23], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.45, 0.06], ['c', -0.39, 0.00, -0.39, 0.00, -0.48, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['l', -0.21, -0.03], ['c', -1.23, -0.21, -2.31, -0.63, -3.21, -1.29], ['c', -0.15, -0.09, -0.45, -0.36, -0.66, -0.57], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.93, -3.45, 2.04, -4.59], ['c', 0.42, -0.39, 0.78, -0.66, 1.26, -0.93], ['c', 0.75, -0.45, 1.65, -0.75, 2.61, -0.90], ['l', 0.21, -0.03], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['z'], ['m', -0.06, 10.44], ['c', 0.00, -5.58, 0.00, -6.99, -0.03, -6.99], ['c', -0.15, 0.00, -0.63, 0.27, -0.87, 0.45], ['c', -0.45, 0.36, -0.75, 0.93, -0.93, 1.77], ['c', -0.18, 0.81, -0.24, 1.80, -0.24, 4.74], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.66, 1.68, 1.41, 2.07], ['c', 0.12, 0.06, 0.30, 0.12, 0.33, 0.15], ['l', 0.09, 0.00], ['l', 0.00, -6.96], ['z']], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'f': { d: [['M', 9.93, -14.28], ['c', 1.53, -0.18, 2.88, 0.45, 3.12, 1.50], ['c', 0.12, 0.51, 0.00, 1.32, -0.27, 1.86], ['c', -0.15, 0.30, -0.42, 0.57, -0.63, 0.69], ['c', -0.69, 0.36, -1.56, 0.03, -1.83, -0.69], ['c', -0.09, -0.24, -0.09, -0.69, 0.00, -0.87], ['c', 0.06, -0.12, 0.21, -0.24, 0.45, -0.42], ['c', 0.42, -0.24, 0.57, -0.45, 0.60, -0.72], ['c', 0.03, -0.33, -0.09, -0.39, -0.63, -0.42], ['c', -0.30, 0.00, -0.45, 0.00, -0.60, 0.03], ['c', -0.81, 0.21, -1.35, 0.93, -1.74, 2.46], ['c', -0.06, 0.27, -0.48, 2.25, -0.48, 2.31], ['c', 0.00, 0.03, 0.39, 0.03, 0.90, 0.03], ['c', 0.72, 0.00, 0.90, 0.00, 0.99, 0.06], ['c', 0.42, 0.15, 0.45, 0.72, 0.03, 0.90], ['c', -0.12, 0.06, -0.24, 0.06, -1.17, 0.06], ['l', -1.05, 0.00], ['l', -0.78, 2.55], ['c', -0.45, 1.41, -0.87, 2.79, -0.96, 3.06], ['c', -0.87, 2.37, -2.37, 4.74, -3.78, 5.91], ['c', -1.05, 0.90, -2.04, 1.23, -3.09, 1.08], ['c', -1.11, -0.18, -1.89, -0.78, -2.04, -1.59], ['c', -0.12, -0.66, 0.15, -1.71, 0.54, -2.19], ['c', 0.69, -0.75, 1.86, -0.54, 2.22, 0.39], ['c', 0.06, 0.15, 0.09, 0.27, 0.09, 0.48], ['c', 0.00, 0.24, -0.03, 0.27, -0.12, 0.42], ['c', -0.03, 0.09, -0.15, 0.18, -0.27, 0.27], ['c', -0.09, 0.06, -0.27, 0.21, -0.36, 0.27], ['c', -0.24, 0.18, -0.36, 0.36, -0.39, 0.60], ['c', -0.03, 0.33, 0.09, 0.39, 0.63, 0.42], ['c', 0.42, 0.00, 0.63, -0.03, 0.90, -0.15], ['c', 0.60, -0.30, 0.96, -0.96, 1.38, -2.64], ['c', 0.09, -0.42, 0.63, -2.55, 1.17, -4.77], ['l', 1.02, -4.08], ['c', 0.00, -0.03, -0.36, -0.03, -0.81, -0.03], ['c', -0.72, 0.00, -0.81, 0.00, -0.93, -0.06], ['c', -0.42, -0.18, -0.39, -0.75, 0.03, -0.90], ['c', 0.09, -0.06, 0.27, -0.06, 1.05, -0.06], ['l', 0.96, 0.00], ['l', 0.00, -0.09], ['c', 0.06, -0.18, 0.30, -0.72, 0.51, -1.17], ['c', 1.20, -2.46, 3.30, -4.23, 5.34, -4.50], ['z']], w: 16.155, h: 19.445 },\n\t'm': { d: [['M', 2.79, -8.91], ['c', 0.09, 0.00, 0.30, -0.03, 0.45, -0.03], ['c', 0.24, 0.03, 0.30, 0.03, 0.45, 0.12], ['c', 0.36, 0.15, 0.63, 0.54, 0.75, 1.02], ['l', 0.03, 0.21], ['l', 0.33, -0.30], ['c', 0.69, -0.69, 1.38, -1.02, 2.07, -1.02], ['c', 0.27, 0.00, 0.33, 0.00, 0.48, 0.06], ['c', 0.21, 0.09, 0.48, 0.36, 0.63, 0.60], ['c', 0.03, 0.09, 0.12, 0.27, 0.18, 0.42], ['c', 0.03, 0.15, 0.09, 0.27, 0.12, 0.27], ['c', 0.00, 0.00, 0.09, -0.09, 0.18, -0.21], ['c', 0.33, -0.39, 0.87, -0.81, 1.29, -0.99], ['c', 0.78, -0.33, 1.47, -0.21, 2.01, 0.33], ['c', 0.30, 0.33, 0.48, 0.69, 0.60, 1.14], ['c', 0.09, 0.42, 0.06, 0.54, -0.54, 3.06], ['c', -0.33, 1.29, -0.57, 2.40, -0.57, 2.43], ['c', 0.00, 0.12, 0.09, 0.21, 0.21, 0.21], ['c', 0.24, 0.00, 0.75, -0.30, 1.20, -0.72], ['c', 0.45, -0.39, 0.60, -0.45, 0.78, -0.27], ['c', 0.18, 0.18, 0.09, 0.36, -0.45, 0.87], ['c', -1.05, 0.96, -1.83, 1.47, -2.58, 1.71], ['c', -0.93, 0.33, -1.53, 0.21, -1.80, -0.33], ['c', -0.06, -0.15, -0.06, -0.21, -0.06, -0.45], ['c', 0.00, -0.24, 0.03, -0.48, 0.60, -2.82], ['c', 0.42, -1.71, 0.60, -2.64, 0.63, -2.79], ['c', 0.03, -0.57, -0.30, -0.75, -0.84, -0.48], ['c', -0.24, 0.12, -0.54, 0.39, -0.66, 0.63], ['c', -0.03, 0.09, -0.42, 1.38, -0.90, 3.00], ['c', -0.90, 3.15, -0.84, 3.00, -1.14, 3.15], ['l', -0.15, 0.09], ['l', -0.78, 0.00], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.36, -1.38, 0.84, -2.97], ['c', 0.57, -2.04, 0.81, -2.97, 0.84, -3.12], ['c', 0.03, -0.54, -0.30, -0.72, -0.84, -0.45], ['c', -0.24, 0.12, -0.57, 0.42, -0.66, 0.63], ['c', -0.06, 0.09, -0.51, 1.44, -1.05, 2.97], ['c', -0.51, 1.56, -0.99, 2.85, -0.99, 2.91], ['c', -0.06, 0.12, -0.21, 0.24, -0.36, 0.30], ['c', -0.12, 0.06, -0.21, 0.06, -0.90, 0.06], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.45, -1.38, 0.99, -2.97], ['c', 1.05, -3.18, 1.05, -3.18, 0.93, -3.45], ['c', -0.12, -0.27, -0.39, -0.30, -0.72, -0.15], ['c', -0.54, 0.27, -1.14, 1.17, -1.56, 2.40], ['c', -0.06, 0.15, -0.15, 0.30, -0.18, 0.36], ['c', -0.21, 0.21, -0.57, 0.27, -0.72, 0.09], ['c', -0.09, -0.09, -0.06, -0.21, 0.06, -0.63], ['c', 0.48, -1.26, 1.26, -2.46, 2.01, -3.21], ['c', 0.57, -0.54, 1.20, -0.87, 1.83, -1.02], ['z']], w: 14.687, h: 9.126 },\n\t'p': { d: [['M', 1.92, -8.70], ['c', 0.27, -0.09, 0.81, -0.06, 1.11, 0.03], ['c', 0.54, 0.18, 0.93, 0.51, 1.17, 0.99], ['c', 0.09, 0.15, 0.15, 0.33, 0.18, 0.36], ['l', 0.00, 0.12], ['l', 0.30, -0.27], ['c', 0.66, -0.60, 1.35, -1.02, 2.13, -1.20], ['c', 0.21, -0.06, 0.33, -0.06, 0.78, -0.06], ['c', 0.45, 0.00, 0.51, 0.00, 0.84, 0.09], ['c', 1.29, 0.33, 2.07, 1.32, 2.25, 2.79], ['c', 0.09, 0.81, -0.09, 2.01, -0.45, 2.79], ['c', -0.54, 1.26, -1.86, 2.55, -3.18, 3.03], ['c', -0.45, 0.18, -0.81, 0.24, -1.29, 0.24], ['c', -0.69, -0.03, -1.35, -0.18, -1.86, -0.45], ['c', -0.30, -0.15, -0.51, -0.18, -0.69, -0.09], ['c', -0.09, 0.03, -0.18, 0.09, -0.18, 0.12], ['c', -0.09, 0.12, -1.05, 2.94, -1.05, 3.06], ['c', 0.00, 0.24, 0.18, 0.48, 0.51, 0.63], ['c', 0.18, 0.06, 0.54, 0.15, 0.75, 0.15], ['c', 0.21, 0.00, 0.36, 0.06, 0.42, 0.18], ['c', 0.12, 0.18, 0.06, 0.42, -0.12, 0.54], ['c', -0.09, 0.03, -0.15, 0.03, -0.78, 0.00], ['c', -1.98, -0.15, -3.81, -0.15, -5.79, 0.00], ['c', -0.63, 0.03, -0.69, 0.03, -0.78, 0.00], ['c', -0.24, -0.15, -0.24, -0.57, 0.03, -0.66], ['c', 0.06, -0.03, 0.48, -0.09, 0.99, -0.12], ['c', 0.87, -0.06, 1.11, -0.09, 1.35, -0.21], ['c', 0.18, -0.06, 0.33, -0.18, 0.39, -0.30], ['c', 0.06, -0.12, 3.24, -9.42, 3.27, -9.60], ['c', 0.06, -0.33, 0.03, -0.57, -0.15, -0.69], ['c', -0.09, -0.06, -0.12, -0.06, -0.30, -0.06], ['c', -0.69, 0.06, -1.53, 1.02, -2.28, 2.61], ['c', -0.09, 0.21, -0.21, 0.45, -0.27, 0.51], ['c', -0.09, 0.12, -0.33, 0.24, -0.48, 0.24], ['c', -0.18, 0.00, -0.36, -0.15, -0.36, -0.30], ['c', 0.00, -0.24, 0.78, -1.83, 1.26, -2.55], ['c', 0.72, -1.11, 1.47, -1.74, 2.28, -1.92], ['z'], ['m', 5.37, 1.47], ['c', -0.27, -0.12, -0.75, -0.03, -1.14, 0.21], ['c', -0.75, 0.48, -1.47, 1.68, -1.89, 3.15], ['c', -0.45, 1.47, -0.42, 2.34, 0.00, 2.70], ['c', 0.45, 0.39, 1.26, 0.21, 1.83, -0.36], ['c', 0.51, -0.51, 0.99, -1.68, 1.38, -3.27], ['c', 0.30, -1.17, 0.33, -1.74, 0.15, -2.13], ['c', -0.09, -0.15, -0.15, -0.21, -0.33, -0.30], ['z']], w: 14.689, h: 13.127 },\n\t'r': { d: [['M', 6.33, -9.12], ['c', 0.27, -0.03, 0.93, 0.00, 1.20, 0.06], ['c', 0.84, 0.21, 1.23, 0.81, 1.02, 1.53], ['c', -0.24, 0.75, -0.90, 1.17, -1.56, 0.96], ['c', -0.33, -0.09, -0.51, -0.30, -0.66, -0.75], ['c', -0.03, -0.12, -0.09, -0.24, -0.12, -0.30], ['c', -0.09, -0.15, -0.30, -0.24, -0.48, -0.24], ['c', -0.57, 0.00, -1.38, 0.54, -1.65, 1.08], ['c', -0.06, 0.15, -0.33, 1.17, -0.90, 3.27], ['c', -0.57, 2.31, -0.81, 3.12, -0.87, 3.21], ['c', -0.03, 0.06, -0.12, 0.15, -0.18, 0.21], ['l', -0.12, 0.06], ['l', -0.81, 0.03], ['c', -0.69, 0.00, -0.81, 0.00, -0.90, -0.03], ['c', -0.09, -0.06, -0.18, -0.21, -0.18, -0.30], ['c', 0.00, -0.06, 0.39, -1.62, 0.90, -3.51], ['c', 0.84, -3.24, 0.87, -3.45, 0.87, -3.72], ['c', 0.00, -0.21, 0.00, -0.27, -0.03, -0.36], ['c', -0.12, -0.15, -0.21, -0.24, -0.42, -0.24], ['c', -0.24, 0.00, -0.45, 0.15, -0.78, 0.42], ['c', -0.33, 0.36, -0.45, 0.54, -0.72, 1.14], ['c', -0.03, 0.12, -0.21, 0.24, -0.36, 0.27], ['c', -0.12, 0.00, -0.15, 0.00, -0.24, -0.06], ['c', -0.18, -0.12, -0.18, -0.21, -0.06, -0.54], ['c', 0.21, -0.57, 0.42, -0.93, 0.78, -1.32], ['c', 0.54, -0.51, 1.20, -0.81, 1.95, -0.87], ['c', 0.81, -0.03, 1.53, 0.30, 1.92, 0.87], ['l', 0.12, 0.18], ['l', 0.09, -0.09], ['c', 0.57, -0.45, 1.41, -0.84, 2.19, -0.96], ['z']], w: 9.41, h: 9.132 },\n\t's': { d: [['M', 4.47, -8.73], ['c', 0.09, 0.00, 0.36, -0.03, 0.57, -0.03], ['c', 0.75, 0.03, 1.29, 0.24, 1.71, 0.63], ['c', 0.51, 0.54, 0.66, 1.26, 0.36, 1.83], ['c', -0.24, 0.42, -0.63, 0.57, -1.11, 0.42], ['c', -0.33, -0.09, -0.60, -0.36, -0.60, -0.57], ['c', 0.00, -0.03, 0.06, -0.21, 0.15, -0.39], ['c', 0.12, -0.21, 0.15, -0.33, 0.18, -0.48], ['c', 0.00, -0.24, -0.06, -0.48, -0.15, -0.60], ['c', -0.15, -0.21, -0.42, -0.24, -0.75, -0.15], ['c', -0.27, 0.06, -0.48, 0.18, -0.69, 0.36], ['c', -0.39, 0.39, -0.51, 0.96, -0.33, 1.38], ['c', 0.09, 0.21, 0.42, 0.51, 0.78, 0.72], ['c', 1.11, 0.69, 1.59, 1.11, 1.89, 1.68], ['c', 0.21, 0.39, 0.24, 0.78, 0.15, 1.29], ['c', -0.18, 1.20, -1.17, 2.16, -2.52, 2.52], ['c', -1.02, 0.24, -1.95, 0.12, -2.70, -0.42], ['c', -0.72, -0.51, -0.99, -1.47, -0.60, -2.19], ['c', 0.24, -0.48, 0.72, -0.63, 1.17, -0.42], ['c', 0.33, 0.18, 0.54, 0.45, 0.57, 0.81], ['c', 0.00, 0.21, -0.03, 0.30, -0.33, 0.51], ['c', -0.33, 0.24, -0.39, 0.42, -0.27, 0.69], ['c', 0.06, 0.15, 0.21, 0.27, 0.45, 0.33], ['c', 0.30, 0.09, 0.87, 0.09, 1.20, 0.00], ['c', 0.75, -0.21, 1.23, -0.72, 1.29, -1.35], ['c', 0.03, -0.42, -0.15, -0.81, -0.54, -1.20], ['c', -0.24, -0.24, -0.48, -0.42, -1.41, -1.02], ['c', -0.69, -0.42, -1.05, -0.93, -1.05, -1.47], ['c', 0.00, -0.39, 0.12, -0.87, 0.30, -1.23], ['c', 0.27, -0.57, 0.78, -1.05, 1.38, -1.35], ['c', 0.24, -0.12, 0.63, -0.27, 0.90, -0.30], ['z']], w: 6.632, h: 8.758 },\n\t'z': { d: [['M', 2.64, -7.95], ['c', 0.36, -0.09, 0.81, -0.03, 1.71, 0.27], ['c', 0.78, 0.21, 0.96, 0.27, 1.74, 0.30], ['c', 0.87, 0.06, 1.02, 0.03, 1.38, -0.21], ['c', 0.21, -0.15, 0.33, -0.15, 0.48, -0.06], ['c', 0.15, 0.09, 0.21, 0.30, 0.15, 0.45], ['c', -0.03, 0.06, -1.26, 1.26, -2.76, 2.67], ['l', -2.73, 2.55], ['l', 0.54, 0.03], ['c', 0.54, 0.03, 0.72, 0.03, 2.01, 0.15], ['c', 0.36, 0.03, 0.90, 0.06, 1.20, 0.09], ['c', 0.66, 0.00, 0.81, -0.03, 1.02, -0.24], ['c', 0.30, -0.30, 0.39, -0.72, 0.27, -1.23], ['c', -0.06, -0.27, -0.06, -0.27, -0.03, -0.39], ['c', 0.15, -0.30, 0.54, -0.27, 0.69, 0.03], ['c', 0.15, 0.33, 0.27, 1.02, 0.27, 1.50], ['c', 0.00, 1.47, -1.11, 2.70, -2.52, 2.79], ['c', -0.57, 0.03, -1.02, -0.09, -2.01, -0.51], ['c', -1.02, -0.42, -1.23, -0.48, -2.13, -0.54], ['c', -0.81, -0.06, -0.96, -0.03, -1.26, 0.18], ['c', -0.12, 0.06, -0.24, 0.12, -0.27, 0.12], ['c', -0.27, 0.00, -0.45, -0.30, -0.36, -0.51], ['c', 0.03, -0.06, 1.32, -1.32, 2.91, -2.79], ['l', 2.88, -2.73], ['c', -0.03, 0.00, -0.21, 0.03, -0.42, 0.06], ['c', -0.21, 0.03, -0.78, 0.09, -1.23, 0.12], ['c', -1.11, 0.12, -1.23, 0.15, -1.95, 0.27], ['c', -0.72, 0.15, -1.17, 0.18, -1.29, 0.09], ['c', -0.27, -0.18, -0.21, -0.75, 0.12, -1.26], ['c', 0.39, -0.60, 0.93, -1.02, 1.59, -1.20], ['z']], w: 8.573, h: 8.743 },\n\t'+': { d: [['M', 3.48, -9.3], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.29], ['l', 0.00, 1.29], ['l', 1.29, 0.00], ['c', 1.23, 0.00, 1.29, 0.00, 1.41, 0.06], ['c', 0.06, 0.03, 0.15, 0.09, 0.18, 0.12], ['c', 0.12, 0.09, 0.21, 0.33, 0.21, 0.48], ['c', 0.00, 0.15, -0.09, 0.39, -0.21, 0.48], ['c', -0.03, 0.03, -0.12, 0.09, -0.18, 0.12], ['c', -0.12, 0.06, -0.18, 0.06, -1.41, 0.06], ['l', -1.29, 0.00], ['l', 0.00, 1.29], ['c', 0.00, 1.23, 0.00, 1.29, -0.06, 1.41], ['c', -0.09, 0.18, -0.15, 0.24, -0.30, 0.33], ['c', -0.21, 0.09, -0.39, 0.09, -0.57, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.41], ['l', 0.00, -1.29], ['l', -1.29, 0.00], ['c', -1.23, 0.00, -1.29, 0.00, -1.41, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.26, 0.00], ['l', 1.29, 0.00], ['l', 0.00, -1.29], ['c', 0.00, -1.23, 0.00, -1.29, 0.06, -1.41], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 7.507, h: 7.515 },\n\t',': { d: [['M', 1.85, -3.36], ['c', 0.57, -0.15, 1.17, 0.03, 1.59, 0.45], ['c', 0.45, 0.45, 0.60, 0.96, 0.51, 1.89], ['c', -0.09, 1.23, -0.42, 2.46, -0.99, 3.93], ['c', -0.30, 0.72, -0.72, 1.62, -0.78, 1.68], ['c', -0.18, 0.21, -0.51, 0.18, -0.66, -0.06], ['c', -0.03, -0.06, -0.06, -0.15, -0.06, -0.18], ['c', 0.00, -0.06, 0.12, -0.33, 0.24, -0.63], ['c', 0.84, -1.80, 1.02, -2.61, 0.69, -3.24], ['c', -0.12, -0.24, -0.27, -0.36, -0.75, -0.60], ['c', -0.36, -0.15, -0.42, -0.21, -0.60, -0.39], ['c', -0.69, -0.69, -0.69, -1.71, 0.00, -2.40], ['c', 0.21, -0.21, 0.51, -0.39, 0.81, -0.45], ['z']], w: 3.452, h: 8.143 },\n\t'-': { d: [['M', 0.18, -5.34], ['c', 0.09, -0.06, 0.15, -0.06, 2.31, -0.06], ['c', 2.46, 0.00, 2.37, 0.00, 2.46, 0.21], ['c', 0.12, 0.21, 0.03, 0.42, -0.15, 0.54], ['c', -0.09, 0.06, -0.15, 0.06, -2.28, 0.06], ['c', -2.16, 0.00, -2.22, 0.00, -2.31, -0.06], ['c', -0.27, -0.15, -0.27, -0.54, -0.03, -0.69], ['z']], w: 5.001, h: 0.81 },\n\t'.': { d: [['M', 1.32, -3.36], ['c', 1.05, -0.27, 2.10, 0.57, 2.10, 1.65], ['c', 0.00, 1.08, -1.05, 1.92, -2.10, 1.65], ['c', -0.90, -0.21, -1.50, -1.14, -1.26, -2.04], ['c', 0.12, -0.63, 0.63, -1.11, 1.26, -1.26], ['z']], w: 3.413, h: 3.402 },\n\t'scripts.wedge': { d: [['M', -3.66, -7.44], ['c', 0.06, -0.09, 0.00, -0.09, 0.81, 0.03], ['c', 1.86, 0.30, 3.84, 0.30, 5.73, 0.00], ['c', 0.78, -0.12, 0.72, -0.12, 0.78, -0.03], ['c', 0.15, 0.15, 0.12, 0.24, -0.24, 0.60], ['c', -0.93, 0.93, -1.98, 2.76, -2.67, 4.62], ['c', -0.30, 0.78, -0.51, 1.71, -0.51, 2.13], ['c', 0.00, 0.15, 0.00, 0.18, -0.06, 0.27], ['c', -0.12, 0.09, -0.24, 0.09, -0.36, 0.00], ['c', -0.06, -0.09, -0.06, -0.12, -0.06, -0.27], ['c', 0.00, -0.42, -0.21, -1.35, -0.51, -2.13], ['c', -0.69, -1.86, -1.74, -3.69, -2.67, -4.62], ['c', -0.36, -0.36, -0.39, -0.45, -0.24, -0.60], ['z']], w: 7.49, h: 7.752 },\n\t'scripts.thumb': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.27, 1.41, -1.08, 2.43, -2.16, 2.73], ['l', -0.18, 0.06], ['l', 0.00, 0.12], ['c', 0.03, 0.06, 0.06, 0.45, 0.09, 0.87], ['c', 0.03, 0.57, 0.03, 0.78, 0.00, 0.84], ['c', -0.09, 0.27, -0.39, 0.48, -0.66, 0.48], ['c', -0.27, 0.00, -0.57, -0.21, -0.66, -0.48], ['c', -0.03, -0.06, -0.03, -0.27, 0.00, -0.84], ['c', 0.03, -0.42, 0.06, -0.81, 0.09, -0.87], ['l', 0.00, -0.12], ['l', -0.18, -0.06], ['c', -1.08, -0.30, -1.89, -1.32, -2.16, -2.73], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.05, 0.90], ['c', -0.15, -0.09, -0.21, -0.09, -0.45, -0.12], ['c', -0.15, 0.00, -0.30, 0.03, -0.39, 0.03], ['c', -0.57, 0.18, -0.90, 0.72, -1.08, 1.74], ['c', -0.06, 0.48, -0.06, 1.80, 0.00, 2.28], ['c', 0.15, 0.90, 0.42, 1.44, 0.90, 1.65], ['c', 0.18, 0.09, 0.21, 0.09, 0.51, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.51, -0.09], ['c', 0.48, -0.21, 0.75, -0.75, 0.90, -1.65], ['c', 0.03, -0.27, 0.03, -0.54, 0.03, -1.14], ['c', 0.00, -0.60, 0.00, -0.87, -0.03, -1.14], ['c', -0.15, -0.90, -0.45, -1.44, -0.90, -1.65], ['z']], w: 5.955, h: 9.75 },\n\t'scripts.open': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.33, 1.74, -1.47, 2.85, -2.91, 2.85], ['c', -1.44, 0.00, -2.58, -1.11, -2.91, -2.85], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.11, 0.90], ['c', -0.21, -0.09, -0.27, -0.09, -0.51, -0.12], ['c', -0.30, 0.00, -0.42, 0.03, -0.66, 0.15], ['c', -0.24, 0.12, -0.51, 0.39, -0.66, 0.63], ['c', -0.54, 0.93, -0.63, 2.64, -0.21, 3.81], ['c', 0.21, 0.54, 0.51, 0.90, 0.93, 1.11], ['c', 0.21, 0.09, 0.24, 0.09, 0.54, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.54, -0.09], ['c', 0.42, -0.21, 0.72, -0.57, 0.93, -1.11], ['c', 0.36, -0.99, 0.36, -2.37, 0.00, -3.36], ['c', -0.21, -0.54, -0.51, -0.90, -0.90, -1.11], ['z']], w: 5.955, h: 7.5 },\n\t'scripts.longphrase': { d: [['M', 1.47, -15.09], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.54, 0.06, 11.25], ['l', 0.00, 11.25], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -3.39, -0.03, -11.25], ['l', 0.00, -11.25], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 23.04 },\n\t'scripts.mediumphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.39, 0.06, 7.50], ['l', 0.00, 7.50], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -2.28, -0.03, -7.50], ['l', 0.00, -7.50], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 15.54 },\n\t'scripts.shortphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.21, 0.06, 3.75], ['l', 0.00, 3.75], ['l', -0.42, 0.09], ['c', -0.57, 0.18, -1.65, 0.45, -1.71, 0.45], ['c', -0.03, 0.00, -0.03, -0.72, -0.03, -3.75], ['l', 0.00, -3.75], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 8.04 },\n\t'scripts.snap': { d: [['M', 4.50, -3.39], ['c', 0.36, -0.03, 0.96, -0.03, 1.35, 0.00], ['c', 1.56, 0.15, 3.15, 0.90, 4.20, 2.01], ['c', 0.24, 0.27, 0.33, 0.42, 0.33, 0.60], ['c', 0.00, 0.27, 0.03, 0.24, -2.46, 2.22], ['c', -1.29, 1.02, -2.40, 1.86, -2.49, 1.92], ['c', -0.18, 0.09, -0.30, 0.09, -0.48, 0.00], ['c', -0.09, -0.06, -1.20, -0.90, -2.49, -1.92], ['c', -2.49, -1.98, -2.46, -1.95, -2.46, -2.22], ['c', 0.00, -0.18, 0.09, -0.33, 0.33, -0.60], ['c', 1.05, -1.08, 2.64, -1.86, 4.17, -2.01], ['z'], ['m', 1.29, 1.17], ['c', -1.47, -0.15, -2.97, 0.30, -4.14, 1.20], ['l', -0.18, 0.15], ['l', 0.06, 0.09], ['c', 0.15, 0.12, 3.63, 2.85, 3.66, 2.85], ['c', 0.03, 0.00, 3.51, -2.73, 3.66, -2.85], ['l', 0.06, -0.09], ['l', -0.18, -0.15], ['c', -0.84, -0.66, -1.89, -1.08, -2.94, -1.20], ['z']], w: 10.38, h: 6.84 }\n};\n\n// Custom characters that weren't generated from the font:\nglyphs['noteheads.slash.whole'] = { d: [['M', 5, -5], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', 4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z'], ['m', 0, -2], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', -4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z']], w: 10.81, h: 15.63 };\n\nglyphs['noteheads.slash.quarter'] = { d: [['M', 9, -6], ['l', 0, 4], ['l', -9, 9], ['l', 0, -4], ['z']], w: 9, h: 9 };\n\nglyphs['noteheads.harmonic.quarter'] = { d: [['M', 3.63, -4.02], ['c', 0.09, -0.06, 0.18, -0.09, 0.24, -0.03], ['c', 0.03, 0.03, 0.87, 0.93, 1.83, 2.01], ['c', 1.50, 1.65, 1.80, 1.98, 1.80, 2.04], ['c', 0.00, 0.06, -0.30, 0.39, -1.80, 2.04], ['c', -0.96, 1.08, -1.80, 1.98, -1.83, 2.01], ['c', -0.06, 0.06, -0.15, 0.03, -0.24, -0.03], ['c', -0.12, -0.09, -3.54, -3.84, -3.60, -3.93], ['c', -0.03, -0.03, -0.03, -0.09, -0.03, -0.15], ['c', 0.03, -0.06, 3.45, -3.84, 3.63, -3.96], ['z']], w: 7.5, h: 8.165 };\n\nglyphs['noteheads.triangle.quarter'] = { d: [['M', 0, 4], ['l', 9, 0], ['l', -4.5, -9], ['z']], w: 9, h: 9 };\n\nvar pathClone = function (pathArray) {\n\tvar res = [];\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tres[i] = [];\n\t\tfor (var j = 0, jj = pathArray[i].length; j < jj; j++) {\n\t\t\tres[i][j] = pathArray[i][j];\n\t\t}\n\t}\n\treturn res;\n};\n\nvar pathScale = function (pathArray, kx, ky) {\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tvar p = pathArray[i];\n\t\tvar j, jj;\n\t\tfor (j = 1, jj = p.length; j < jj; j++) {\n\t\t\tp[j] *= (j % 2) ? kx : ky;\n\t\t}\n\t}\n};\n\nvar Glyphs = {\n\tprintSymbol: function (x, y, symb, paper, attrs) {\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\t\tvar path = \"\";\n\t\tfor (var i = 0; i < pathArray.length; i++)\n\t\t\tpath += pathArray[i].join(\" \");\n\t\tattrs.path = path;\n\t\treturn paper.path(attrs);\n\t},\n\n\tgetPathForSymbol: function (x, y, symb, scalex, scaley) {\n\t\tscalex = scalex || 1;\n\t\tscaley = scaley || 1;\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tif (scalex !== 1 || scaley !== 1) pathScale(pathArray, scalex, scaley);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\n\t\treturn pathArray;\n\t},\n\n\tgetSymbolWidth: function (symbol) {\n\t\tif (glyphs[symbol]) return glyphs[symbol].w;\n\t\treturn 0;\n\t},\n\n\tsymbolHeightInPitches: function (symbol) {\n\t\tvar height = glyphs[symbol] ? glyphs[symbol].h : 0;\n\t\treturn height / spacing.STEP;\n\t},\n\n\tgetSymbolAlign: function (symbol) {\n\t\tif (symbol.substring(0, 7) === \"scripts\" &&\n\t\t\tsymbol !== \"scripts.roll\") {\n\t\t\treturn \"center\";\n\t\t}\n\t\treturn \"left\";\n\t},\n\n\tgetYCorr: function (symbol) {\n\t\tswitch (symbol) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"6\":\n\t\t\tcase \"7\":\n\t\t\tcase \"8\":\n\t\t\tcase \"9\":\n\t\t\tcase \"+\": return -2;\n\t\t\tcase \"timesig.common\":\n\t\t\tcase \"timesig.cut\": return 0;\n\t\t\tcase \"flags.d32nd\": return -1;\n\t\t\tcase \"flags.d64th\": return -2;\n\t\t\tcase \"flags.u32nd\": return 1;\n\t\t\tcase \"flags.u64th\": return 3;\n\t\t\tcase \"rests.whole\": return 1;\n\t\t\tcase \"rests.half\": return -1;\n\t\t\tcase \"rests.8th\": return -1;\n\t\t\tcase \"rests.quarter\": return -1;\n\t\t\tcase \"rests.16th\": return -1;\n\t\t\tcase \"rests.32nd\": return -1;\n\t\t\tcase \"rests.64th\": return -1;\n\t\t\tcase \"f\":\n\t\t\tcase \"m\":\n\t\t\tcase \"p\":\n\t\t\tcase \"s\":\n\t\t\tcase \"z\":\n\t\t\t\treturn -4;\n\t\t\tcase \"scripts.trill\":\n\t\t\tcase \"scripts.upbow\":\n\t\t\tcase \"scripts.downbow\":\n\t\t\t\treturn -2;\n\t\t\tcase \"scripts.ufermata\":\n\t\t\tcase \"scripts.wedge\":\n\t\t\tcase \"scripts.roll\":\n\t\t\tcase \"scripts.shortphrase\":\n\t\t\tcase \"scripts.longphrase\":\n\t\t\t\treturn -1;\n\t\t\tcase \"scripts.dfermata\":\n\t\t\t\treturn 1;\n\t\t\tdefault: return 0;\n\t\t}\n\t},\n\tsetSymbol: function (name, path) {\n\t\tglyphs[name] = path;\n\t}\n};\n\nmodule.exports = Glyphs; // we need the glyphs for layout information\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/glyphs.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/creation/translate-chord.js":
/*!******************************************************************!*\
  !*** ./node_modules/abcjs/src/write/creation/translate-chord.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function germanNote(note) {\n\tswitch (note) {\n\t\tcase \"B#\": return \"H#\";\n\t\tcase \"B♯\": return \"H♯\";\n\t\tcase \"B\": return \"H\";\n\t\tcase \"Bb\": return \"B\";\n\t\tcase \"B♭\": return \"B\";\n\t}\n\treturn note;\n}\n\nfunction translateChord(chordString, jazzchords, germanAlphabet) {\n\tvar lines = chordString.split(\"\\n\");\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tlet chord = lines[i];\n\t\t// If the chord isn't in a recognizable format then just skip it.\n\t\tlet reg = chord.match(/^([ABCDEFG][♯♭]?)?([^\\/]+)?(\\/([ABCDEFG][#b♯♭]?))?/);\n\t\tif (!reg) {\n\t\t\tcontinue;\n\t\t}\n\t\tlet baseChord = reg[1] || \"\";\n\t\tlet modifier = reg[2] || \"\";\n\t\tlet bassNote = reg[4] || \"\";\n\t\tif (germanAlphabet) {\n\t\t\tbaseChord = germanNote(baseChord);\n\t\t\tbassNote = germanNote(bassNote);\n\t\t}\n\t\t// This puts markers in the pieces of the chord that are read by the svg creator.\n\t\t// After the main part of the chord (the letter, a sharp or flat, and \"m\") a marker is added. Before a slash a marker is added.\n\t\tconst marker = jazzchords ? \"\\x03\" : \"\";\n\t\tconst bass = bassNote ? \"/\" + bassNote : \"\";\n\t\tlines[i] = [baseChord, modifier, bass].join(marker);\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nmodule.exports = translateChord;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/creation/translate-chord.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/absolute.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/absolute.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var drawTempo = __webpack_require__(/*! ./tempo */ \"./node_modules/abcjs/src/write/draw/tempo.js\");\nvar drawRelativeElement = __webpack_require__(/*! ./relative */ \"./node_modules/abcjs/src/write/draw/relative.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar setClass = __webpack_require__(/*! ../helpers/set-class */ \"./node_modules/abcjs/src/write/helpers/set-class.js\");\nvar elementGroup = __webpack_require__(/*! ./group-elements */ \"./node_modules/abcjs/src/write/draw/group-elements.js\");\n\nfunction drawAbsolute(renderer, params, bartop, selectables, staffPos) {\n\tif (params.invisible) return;\n\tvar isTempo = params.children.length > 0 && params.children[0].type === \"TempoElement\";\n\tparams.elemset = [];\n\telementGroup.beginGroup(renderer.paper, renderer.controller);\n\tfor (var i = 0; i < params.children.length; i++) {\n\t\tvar child = params.children[i];\n\t\tswitch (child.type) {\n\t\t\tcase \"TempoElement\":\n\t\t\t\tdrawTempo(renderer, child);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar el = drawRelativeElement(renderer, child, bartop);\n\t\t\t\tif (child.type === \"symbol\" && child.c && child.c.indexOf('notehead') >= 0) {\n\t\t\t\t\tel.setAttribute('class', 'abcjs-notehead')\n\t\t\t\t}\n\t\t}\n\t}\n\tvar klass = params.type;\n\tif (params.type === 'note' || params.type === 'rest') {\n\t\tparams.counters = renderer.controller.classes.getCurrent();\n\t\tklass += ' d' + Math.round(params.durationClass * 1000) / 1000;\n\t\tklass = klass.replace(/\\./g, '-');\n\t\tif (params.abcelem.pitches) {\n\t\t\tfor (var j = 0; j < params.abcelem.pitches.length; j++) {\n\t\t\t\tklass += ' p' + params.abcelem.pitches[j].pitch;\n\t\t\t}\n\t\t}\n\t}\n\tvar g = elementGroup.endGroup(klass, params.type);\n\tif (g) {\n\t\t// TODO-PER-HACK! This corrects the classes because the tablature is not being created at the right time.\n\t\tif (params.cloned) {\n\t\t\tparams.cloned.overrideClasses = g.className.baseVal\n\t\t}\n\t\tif (params.overrideClasses) {\n\t\t\tvar type = g.classList && g.classList.length > 0 ? g.classList[0] + ' ' : ''\n\t\t\tg.setAttribute(\"class\", type + params.overrideClasses)\n\t\t}\n\t\tif (isTempo) {\n\t\t\tparams.startChar = params.abcelem.startChar;\n\t\t\tparams.endChar = params.abcelem.endChar;\n\t\t\tselectables.add(params, g, false, staffPos);\n\t\t} else {\n\t\t\tparams.elemset.push(g);\n\t\t\tvar isSelectable = false;\n\t\t\tif (params.type === 'note' || params.type === 'tabNumber') {\n\t\t\t\tisSelectable = true;\n\t\t\t}\n\t\t\tselectables.add(params, g, isSelectable, staffPos);\n\t\t}\n\t} else if (params.elemset.length > 0)\n\t\tselectables.add(params, params.elemset[0], params.type === 'note', staffPos);\n\t// If there was no output, then don't add to the selectables. This happens when using the \"y\" spacer, for instance.\n\n\tif (params.klass)\n\t\tsetClass(params.elemset, \"mark\", \"\", \"#00ff00\");\n\tif (params.hint)\n\t\tsetClass(params.elemset, \"abcjs-hint\", \"\", null);\n\tparams.abcelem.abselem = params;\n\n\tif (params.heads && params.heads.length > 0) {\n\t\tparams.notePositions = [];\n\t\tfor (var jj = 0; jj < params.heads.length; jj++) {\n\t\t\tparams.notePositions.push({\n\t\t\t\tx: params.heads[jj].x + params.heads[jj].w / 2,\n\t\t\t\ty: staffPos.zero - params.heads[jj].pitch * spacing.STEP\n\t\t\t});\n\t\t}\n\t}\n}\n\nmodule.exports = drawAbsolute;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/absolute.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/beam.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/beam.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var printPath = __webpack_require__(/*! ./print-path */ \"./node_modules/abcjs/src/write/draw/print-path.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawBeam(renderer, params) {\n\tif (params.beams.length === 0) return;\n\n\tvar pathString = \"\";\n\tfor (var i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam.split) {\n\t\t\tvar slope = getSlope(renderer, beam.startX, beam.startY, beam.endX, beam.endY);\n\t\t\tvar xes = [];\n\t\t\tfor (var j = 0; j < beam.split.length; j += 2) {\n\t\t\t\txes.push([beam.split[j], beam.split[j + 1]]);\n\t\t\t}\n\t\t\tfor (j = 0; j < xes.length; j++) {\n\t\t\t\tvar y1 = getY(beam.startX, beam.startY, slope, xes[j][0]);\n\t\t\t\tvar y2 = getY(beam.startX, beam.startY, slope, xes[j][1]);\n\t\t\t\tpathString += draw(renderer, xes[j][0], y1, xes[j][1], y2, beam.dy);\n\t\t\t}\n\t\t} else\n\t\t\tpathString += draw(renderer, beam.startX, beam.startY, beam.endX, beam.endY, beam.dy);\n\t}\n\tvar durationClass = (\"abcjs-d\" + params.duration).replace(/\\./g, \"-\");\n\tvar klasses = renderer.controller.classes.generate('beam-elem ' + durationClass);\n\tvar el = printPath(renderer, {\n\t\tpath: pathString,\n\t\tstroke: \"none\",\n\t\tfill: renderer.foregroundColor,\n\t\t'class': klasses\n\t});\n\treturn [el];\n}\n\nfunction draw(renderer, startX, startY, endX, endY, dy) {\n\t// the X coordinates are actual coordinates, but the Y coordinates are in pitches.\n\tstartY = roundNumber(renderer.calcY(startY));\n\tendY = roundNumber(renderer.calcY(endY));\n\tstartX = roundNumber(startX);\n\tendX = roundNumber(endX);\n\tvar startY2 = roundNumber(startY + dy);\n\tvar endY2 = roundNumber(endY + dy);\n\treturn \"M\" + startX + \" \" + startY + \" L\" + endX + \" \" + endY +\n\t\t\"L\" + endX + \" \" + endY2 + \" L\" + startX + \" \" + startY2 + \"z\";\n}\n\nfunction getSlope(renderer, startX, startY, endX, endY) {\n\treturn (endY - startY) / (endX - startX);\n}\n\nfunction getY(startX, startY, slope, currentX) {\n\tvar x = currentX - startX;\n\treturn startY + x * slope;\n}\n\nmodule.exports = drawBeam;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/beam.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/brace.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/brace.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\n\nfunction drawBrace(renderer, params, selectables) {\n\t// The absoluteY number is the spot where the note on the first ledger line is drawn (i.e. middle C if treble clef)\n\t// The STEP offset here moves it to the top and bottom lines\n\tvar startY = params.startVoice.staff.absoluteY - spacing.STEP * 10;\n\tif (params.endVoice && params.endVoice.staff)\n\t\tparams.endY = params.endVoice.staff.absoluteY - spacing.STEP * 2;\n\telse if (params.lastContinuedVoice && params.lastContinuedVoice.staff)\n\t\tparams.endY = params.lastContinuedVoice.staff.absoluteY - spacing.STEP * 2;\n\telse\n\t\tparams.endY = params.startVoice.staff.absoluteY - spacing.STEP * 2;\n\treturn draw(renderer, params.x, startY, params.endY, params.type, params.header, selectables);\n}\n\nfunction straightPath(renderer, xLeft, yTop, yBottom, type) {\n\txLeft += spacing.STEP;\n\tvar xLineWidth = spacing.STEP * 0.75;\n\tvar yOverlap = spacing.STEP * 0.75;\n\tvar height = yBottom - yTop;\n\t// Straight line\n\tvar pathString = sprintf(\"M %f %f l %f %f l %f %f l %f %f z\",\n\t\txLeft, yTop - yOverlap, // top left line\n\t\t0, height + yOverlap * 2, // bottom left line\n\t\txLineWidth, 0, // bottom right line\n\t\t0, - (height + yOverlap * 2) // top right line\n\t);\n\t// Top arm\n\tvar wCurve = spacing.STEP * 2;\n\tvar hCurve = spacing.STEP;\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop - yOverlap, // top left arm\n\t\twCurve * 0.6, hCurve * 0.2,\n\t\twCurve, -hCurve, // right point\n\t\t-wCurve * 0.1, hCurve * 0.3,\n\t\t-wCurve, hCurve + spacing.STEP // left bottom\n\t);\n\t// Bottom arm\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop + yOverlap + height, // bottom left arm\n\t\twCurve * 0.6, -hCurve * 0.2,\n\t\twCurve, hCurve, // right point\n\t\t-wCurve * 0.1, -hCurve * 0.3,\n\t\t-wCurve, -hCurve - spacing.STEP // left bottom\n\t);\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curvyPath(renderer, xLeft, yTop, yBottom, type) {\n\tvar yHeight = yBottom - yTop;\n\n\tvar pathString = curve(xLeft,\n\t\tyTop,\n\t\t[7.5, -8, 21, 0, 18.5, -10.5, 7.5],\n\t\t[0, yHeight / 5.5, yHeight / 3.14, yHeight / 2, yHeight / 2.93, yHeight / 4.88, 0]);\n\n\tpathString += curve(xLeft,\n\t\tyTop,\n\t\t[0, 17.5, -7.5, 6.6, -5, 20, 0],\n\t\t[yHeight / 2, yHeight / 1.46, yHeight / 1.22, yHeight, yHeight / 1.19, yHeight / 1.42, yHeight / 2]);\n\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curve(xLeft, yTop, xCurve, yCurve) {\n\treturn sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\",\n\t\txLeft + xCurve[0], yTop + yCurve[0],\n\t\txLeft + xCurve[1], yTop + yCurve[1],\n\t\txLeft + xCurve[2], yTop + yCurve[2],\n\t\txLeft + xCurve[3], yTop + yCurve[3],\n\t\txLeft + xCurve[4], yTop + yCurve[4],\n\t\txLeft + xCurve[5], yTop + yCurve[5],\n\t\txLeft + xCurve[6], yTop + yCurve[6]);\n}\n\nvar draw = function (renderer, xLeft, yTop, yBottom, type, header, selectables) {//Tony\n\tvar ret;\n\tif (header) {\n\t\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"staff-extra voice-name\"), \"data-name\": type });\n\t\tvar position = yTop + (yBottom - yTop) / 2;\n\t\tposition = position - renderer.controller.getTextSize.baselineToCenter(header, \"voicefont\", 'staff-extra voice-name', 0, 1);\n\n\t\trenderText(renderer, {\n\t\t\tx: renderer.padding.left,\n\t\t\ty: position,\n\t\t\ttext: header,\n\t\t\ttype: 'voicefont',\n\t\t\tklass: 'staff-extra voice-name',\n\t\t\tanchor: 'start',\n\t\t\tcenterVertically: true\n\t\t});\n\t}\n\tif (type === \"brace\")\n\t\tret = curvyPath(renderer, xLeft, yTop, yBottom, type);\n\telse if (type === \"bracket\")\n\t\tret = straightPath(renderer, xLeft, yTop, yBottom, type);\n\tif (header) {\n\t\tret = renderer.paper.closeGroup();\n\t}\n\tselectables.wrapSvgEl({ el_type: type, startChar: -1, endChar: -1 }, ret);\n\n\treturn ret;\n};\nmodule.exports = drawBrace;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/brace.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/crescendo.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/crescendo.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar printPath = __webpack_require__(/*! ./print-path */ \"./node_modules/abcjs/src/write/draw/print-path.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawCrescendo(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Crescendo Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch) + 4; // This is the top pixel to use (it is offset a little so that it looks good with the volume marks.)\n\tvar height = 8;\n\n\t// TODO-PER: This is just a quick hack to make the dynamic marks not crash if they are mismatched. See the slur treatment for the way to get the beginning and end.\n\tvar left = params.anchor1 ? params.anchor1.x : 0;\n\tvar right = params.anchor2 ? params.anchor2.x : 800;\n\n\tvar el;\n\tif (params.dir === \"<\") {\n\t\tel = drawLine(renderer, y + height / 2, y, y + height / 2, y + height, left, right);\n\t} else {\n\t\tel = drawLine(renderer, y, y + height / 2, y + height, y + height / 2, left, right);\n\t}\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nvar drawLine = function (renderer, y1, y2, y3, y4, left, right) {\n\ty1 = roundNumber(y1);\n\ty2 = roundNumber(y2);\n\ty3 = roundNumber(y3);\n\ty4 = roundNumber(y4);\n\tleft = roundNumber(left);\n\tright = roundNumber(right);\n\n\tvar pathString = sprintf(\"M %f %f L %f %f M %f %f L %f %f\",\n\t\tleft, y1, right, y2, left, y3, right, y4);\n\treturn printPath(renderer, { path: pathString, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('dynamics decoration'), \"data-name\": \"dynamics\" });\n};\n\nmodule.exports = drawCrescendo;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/crescendo.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/debug-box.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/debug-box.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function printDebugBox(renderer, attr, comment) {\n\tvar box = renderer.paper.rectBeneath(attr);\n\tif (comment)\n\t\trenderer.paper.text(comment, { x: 0, y: attr.y + 7, \"text-anchor\": \"start\", \"font-size\": \"14px\", fill: \"rgba(0,0,255,.4)\", stroke: \"rgba(0,0,255,.4)\" });\n\treturn box;\n}\n\nmodule.exports = printDebugBox;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/debug-box.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/draw.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/draw.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var drawStaffGroup = __webpack_require__(/*! ./staff-group */ \"./node_modules/abcjs/src/write/draw/staff-group.js\");\nvar setPaperSize = __webpack_require__(/*! ./set-paper-size */ \"./node_modules/abcjs/src/write/draw/set-paper-size.js\");\nvar nonMusic = __webpack_require__(/*! ./non-music */ \"./node_modules/abcjs/src/write/draw/non-music.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar Selectables = __webpack_require__(/*! ./selectables */ \"./node_modules/abcjs/src/write/draw/selectables.js\");\n\nfunction draw(renderer, classes, abcTune, width, maxWidth, responsive, scale, selectTypes, tuneNumber, lineOffset) {\n\tvar selectables = new Selectables(renderer.paper, selectTypes, tuneNumber);\n\tvar groupClasses = {}\n\tif (classes.shouldAddClasses)\n\t\tgroupClasses.klass = \"abcjs-meta-top\"\n\trenderer.paper.openGroup(groupClasses)\n\trenderer.moveY(renderer.padding.top);\n\tnonMusic(renderer, abcTune.topText, selectables);\n\trenderer.paper.closeGroup()\n\trenderer.moveY(renderer.spacing.music);\n\tvar staffgroups = [];\n\tfor (var line = 0; line < abcTune.lines.length; line++) {\n\t\tclasses.incrLine();\n\t\tvar abcLine = abcTune.lines[line];\n\t\tif (abcLine.staff) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-staff-wrapper abcjs-l\" + classes.lineNumber\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tif (abcLine.vskip) {\n\t\t\t\trenderer.moveY(abcLine.vskip);\n\t\t\t}\n\t\t\tif (staffgroups.length >= 1)\n\t\t\t\taddStaffPadding(renderer, renderer.spacing.staffSeparation, staffgroups[staffgroups.length - 1], abcLine.staffGroup);\n\t\t\tvar staffgroup = engraveStaffLine(renderer, abcLine.staffGroup, selectables, line);\n\t\t\tstaffgroup.line = lineOffset + line; // If there are non-music lines then the staffgroup array won't line up with the line array, so this keeps track.\n\t\t\tstaffgroups.push(staffgroup);\n\t\t\trenderer.paper.closeGroup()\n\t\t} else if (abcLine.nonMusic) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-non-music\"\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tnonMusic(renderer, abcLine.nonMusic, selectables);\n\t\t\trenderer.paper.closeGroup()\n\t\t}\n\t}\n\n\tclasses.reset();\n\tif (abcTune.bottomText && abcTune.bottomText.rows && abcTune.bottomText.rows.length > 0) {\n\t\tif (classes.shouldAddClasses)\n\t\t\tgroupClasses.klass = \"abcjs-meta-bottom\"\n\t\trenderer.paper.openGroup(groupClasses)\n\t\trenderer.moveY(24); // TODO-PER: Empirically discovered. What variable should this be?\n\t\tnonMusic(renderer, abcTune.bottomText, selectables);\n\t\trenderer.paper.closeGroup()\n\t}\n\tsetPaperSize(renderer, maxWidth, scale, responsive);\n\treturn { staffgroups: staffgroups, selectables: selectables.getElements() };\n}\n\nfunction engraveStaffLine(renderer, staffGroup, selectables, lineNumber) {\n\tdrawStaffGroup(renderer, staffGroup, selectables, lineNumber);\n\tvar height = staffGroup.height * spacing.STEP;\n\trenderer.y += height;\n\treturn staffGroup;\n}\n\nfunction addStaffPadding(renderer, staffSeparation, lastStaffGroup, thisStaffGroup) {\n\tvar lastStaff = lastStaffGroup.staffs[lastStaffGroup.staffs.length - 1];\n\tvar lastBottomLine = -(lastStaff.bottom - 2); // The 2 is because the scale goes to 2 below the last line.\n\tvar nextTopLine = thisStaffGroup.staffs[0].top - 10; // Because 10 represents the top line.\n\tvar naturalSeparation = nextTopLine + lastBottomLine; // This is how far apart they'd be without extra spacing\n\tvar separationInPixels = naturalSeparation * spacing.STEP;\n\tif (separationInPixels < staffSeparation)\n\t\trenderer.moveY(staffSeparation - separationInPixels);\n}\n\nmodule.exports = draw;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/draw.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/dynamics.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/dynamics.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var printSymbol = __webpack_require__(/*! ./print-symbol */ \"./node_modules/abcjs/src/write/draw/print-symbol.js\");\n\nfunction drawDynamics(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Dynamic Element y-coordinate not set.\");\n\tvar scalex = 1;\n\tvar scaley = 1;\n\tvar el = printSymbol(renderer, params.anchor.x, params.pitch, params.dec, {\n\t\tscalex: scalex,\n\t\tscaley: scaley,\n\t\tklass: renderer.controller.classes.generate('decoration dynamics'),\n\t\tfill: renderer.foregroundColor,\n\t\tstroke: \"none\",\n\t\tname: \"dynamics\"\n\t});\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1, decoration: params.dec }, el);\n\treturn [el];\n}\n\nmodule.exports = drawDynamics;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/dynamics.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/ending.js":
/*!*****************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/ending.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\nvar printPath = __webpack_require__(/*! ./print-path */ \"./node_modules/abcjs/src/write/draw/print-path.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawEnding(renderer, params, linestartx, lineendx, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Ending Element y-coordinate not set.\");\n\tvar y = roundNumber(renderer.calcY(params.pitch));\n\tvar height = 20;\n\tvar pathString = '';\n\n\tif (params.anchor1) {\n\t\tlinestartx = roundNumber(params.anchor1.x + params.anchor1.w);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlinestartx, y, linestartx, roundNumber(y + height));\n\t}\n\n\tif (params.anchor2) {\n\t\tlineendx = roundNumber(params.anchor2.x);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlineendx, y, lineendx, roundNumber(y + height));\n\t}\n\n\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\tlinestartx, y, lineendx, y);\n\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"ending\"), \"data-name\": \"ending\" });\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, \"data-name\": \"line\" });\n\tif (params.anchor1)\n\t\trenderText(renderer, {\n\t\t\tx: roundNumber(linestartx + 5),\n\t\t\ty: roundNumber(renderer.calcY(params.pitch - 0.5)),\n\t\t\ttext: params.text,\n\t\t\ttype: 'repeatfont',\n\t\t\tklass: 'ending',\n\t\t\tanchor: \"start\",\n\t\t\tnoClass: true,\n\t\t\tname: params.text\n\t\t});\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"ending\", startChar: -1, endChar: -1 }, g);\n\treturn [g];\n}\n\nmodule.exports = drawEnding;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/ending.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/glissando.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/glissando.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar printPath = __webpack_require__(/*! ./print-path */ \"./node_modules/abcjs/src/write/draw/print-path.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawGlissando(renderer, params, selectables) {\n\tif (!params.anchor1 || !params.anchor2 || !params.anchor1.heads || !params.anchor2.heads || params.anchor1.heads.length === 0 || params.anchor2.heads.length === 0)\n\t\twindow.console.error(\"Glissando Element not set.\");\n\n\tvar margin = 4;\n\tvar leftY = renderer.calcY(params.anchor1.heads[0].pitch)\n\tvar rightY = renderer.calcY(params.anchor2.heads[0].pitch)\n\tvar leftX = params.anchor1.x + params.anchor1.w / 2\n\tvar rightX = params.anchor2.x + params.anchor2.w / 2\n\t\n\tvar len = lineLength(leftX, leftY, rightX, rightY)\n\tvar marginLeft = params.anchor1.w / 2 + margin\n\tvar marginRight = params.anchor2.w / 2 + margin\n\tvar s = slope(leftX, leftY, rightX, rightY)\n\tvar leftYAdj = getY(leftY, s, marginLeft)\n\tvar rightYAdj = getY(rightY, s, -marginRight)\n\tvar num = numSquigglies(len - marginLeft - marginRight)\n\n\tvar el = drawSquiggly(renderer, leftX + marginLeft, leftYAdj, num, s)\n\tselectables.wrapSvgEl({ el_type: \"glissando\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nfunction lineLength(leftX, leftY, rightX, rightY) {\n\t// The length from notehead center to notehead center.\n\tvar w = rightX - leftX\n\tvar h = rightY - leftY\n\treturn Math.sqrt(w * w + h * h)\n}\n\nfunction slope(leftX, leftY, rightX, rightY) {\n\treturn (rightY - leftY) / (rightX - leftX)\n}\n\nfunction getY(y, slope, xOfs) {\n\treturn roundNumber(y + (xOfs) * slope);\n}\n\nfunction numSquigglies(length) {\n\tvar endLen = 5; // The width of the end - that is, the non repeating part\n\treturn Math.max(2, Math.floor((length - endLen * 2) / 6));\n}\n\nvar leftStart = [[3.5, -4.8]]\nvar right = [[1.5, -1], [.3, -.3], [-3.5, 3.8]]\nvar leftEnd = [[-1.5, 2]]\nvar top = [[3, 4], [3, -4]]\nvar bottom = [[-3, 4], [-3, -4]]\n\nfunction segment(arr, slope) {\n\tvar ret = \"\";\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tret += 'l' + arr[i][0] + ' ' + getY(arr[i][1], slope, arr[i][0])\n\t}\n\treturn ret\n}\n\nvar drawSquiggly = function (renderer, x, y, num, slope) {\n\tvar p = sprintf(\"M %f %f\", x, y);\n\tp += segment(leftStart, slope)\n\tvar i\n\tfor (i = 0; i < num; i++) {\n\t\tp += segment(top, slope)\n\t}\n\tp += segment(right, slope)\n\tfor (i = 0; i < num; i++)\n\t\tp += segment(bottom, slope)\n\tp += segment(leftEnd, slope) + 'z'\n\treturn printPath(renderer, { path: p, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('decoration'), \"data-name\": \"glissando\" });\n}\n\nmodule.exports = drawGlissando;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/glissando.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/group-elements.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/group-elements.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Begin a group of glyphs that will always be moved, scaled and highlighted together\n */\n\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction Group() {\n\tthis.ingroup = false;\n}\n\nGroup.prototype.beginGroup = function (paper, controller) {\n\tthis.paper = paper;\n\tthis.controller = controller;\n\tthis.path = [];\n\tthis.lastM = [0, 0];\n\tthis.ingroup = true;\n\tthis.paper.openGroup();\n};\n\nGroup.prototype.isInGroup = function () {\n\treturn this.ingroup;\n}\n\nGroup.prototype.addPath = function (path) {\n\tpath = path || [];\n\tif (path.length === 0) return;\n\tpath[0][0] = \"m\";\n\tpath[0][1] = roundNumber(path[0][1] - this.lastM[0]);\n\tpath[0][2] = roundNumber(path[0][2] - this.lastM[1]);\n\tthis.lastM[0] += path[0][1];\n\tthis.lastM[1] += path[0][2];\n\tthis.path.push(path[0]);\n\tfor (var i = 1, ii = path.length; i < ii; i++) {\n\t\tif (path[i][0] === \"m\") {\n\t\t\tthis.lastM[0] += path[i][1];\n\t\t\tthis.lastM[1] += path[i][2];\n\t\t}\n\t\tthis.path.push(path[i]);\n\t}\n};\n\n/**\n * End a group of glyphs that will always be moved, scaled and highlighted together\n */\nGroup.prototype.endGroup = function (klass, name) {\n\tthis.ingroup = false;\n\t//if (this.path.length === 0) return null;\n\tvar path = \"\";\n\tfor (var i = 0; i < this.path.length; i++)\n\t\tpath += this.path[i].join(\" \");\n\tthis.path = [];\n\n\tvar ret = this.paper.closeGroup();\n\tif (ret) {\n\t\tret.setAttribute(\"class\", this.controller.classes.generate(klass))\n\t\tret.setAttribute(\"fill\", this.controller.renderer.foregroundColor)\n\t\tret.setAttribute(\"stroke\", \"none\")\n\t\tret.setAttribute(\"data-name\", name)\n\t}\n\treturn ret;\n};\n\n// There is just a singleton of this object.\nvar elementGroup = new Group();\n\nmodule.exports = elementGroup;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/group-elements.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/non-music.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/non-music.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var drawSeparator = __webpack_require__(/*! ./separator */ \"./node_modules/abcjs/src/write/draw/separator.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\n\nfunction nonMusic(renderer, obj, selectables) {\n\tfor (var i = 0; i < obj.rows.length; i++) {\n\t\tvar row = obj.rows[i];\n\t\tif (row.absmove) {\n\t\t\trenderer.absolutemoveY(row.absmove);\n\t\t} else if (row.move) {\n\t\t\trenderer.moveY(row.move);\n\t\t} else if (row.text || row.phrases) {\n\t\t\tvar x = row.left ? row.left : 0;\n\t\t\tvar el = renderText(renderer, {\n\t\t\t\tx: x,\n\t\t\t\ty: renderer.y,\n\t\t\t\ttext: row.text,\n\t\t\t\tphrases: row.phrases,\n\t\t\t\t'dominant-baseline': row['dominant-baseline'],\n\t\t\t\ttype: row.font,\n\t\t\t\tklass: row.klass,\n\t\t\t\tname: row.name,\n\t\t\t\tanchor: row.anchor\n\t\t\t});\n\t\t\tif (row.absElemType) {\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: row.text\n\t\t\t\t}, el);\n\t\t\t}\n\t\t} else if (row.separator) {\n\t\t\tdrawSeparator(renderer, row.separator)\n\t\t} else if (row.startGroup) {\n\t\t\trenderer.paper.openGroup({ klass: row.klass, \"data-name\": row.name });\n\t\t} else if (row.endGroup) {\n\t\t\t// TODO-PER: also create a history element with the title \"row.endGroup\"\n\t\t\tvar g = renderer.paper.closeGroup();\n\t\t\tif (row.absElemType)\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: \"\"\n\t\t\t\t}, g);\n\t\t}\n\t}\n}\n\nmodule.exports = nonMusic;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/non-music.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/print-line.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/print-line.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction printLine(renderer, x1, x2, y, klass, name, dy) {\n\tvar fill = renderer.foregroundColor;\n\tx1 = roundNumber(x1);\n\tx2 = roundNumber(x2);\n\tvar y1 = roundNumber(y - dy);\n\tvar y2 = roundNumber(y + dy);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\ty += dy / 2; // Because the y coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x1,\n\t\t\tx2: x2,\n\t\t\ty1: y,\n\t\t\ty2: y,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dy*2)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\n\tvar pathString = sprintf(\"M %f %f L %f %f L %f %f L %f %f z\", x1, y1, x2, y1,\n\t\tx2, y2, x1, y2);\n\tvar options = { path: pathString, stroke: \"none\", fill: fill };\n\tif (name)\n\t\toptions['data-name'] = name;\n\tif (klass)\n\t\toptions['class'] = klass;\n\tvar ret = renderer.paper.pathToBack(options);\n\n\treturn ret;\n}\n\nmodule.exports = printLine;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/print-line.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/print-path.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/print-path.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function printPath(renderer, attrs, params) {\n\tvar ret = renderer.paper.path(attrs);\n\n\treturn ret;\n}\n\nmodule.exports = printPath;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/print-path.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/print-stem.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/print-stem.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var elementGroup = __webpack_require__(/*! ./group-elements */ \"./node_modules/abcjs/src/write/draw/group-elements.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction printStem(renderer, x, dx, y1, y2, klass, name) {\n\tif (dx < 0 || y1 < y2) { // correct path \"handedness\" for intersection with other elements\n\t\tvar tmp = roundNumber(y2);\n\t\ty2 = roundNumber(y1);\n\t\ty1 = tmp;\n\t} else {\n\t\ty1 = roundNumber(y1);\n\t\ty2 = roundNumber(y2);\n\t}\n\tx = roundNumber(x);\n\tvar x2 = roundNumber(x + dx);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\tx += dx / 2; // Because the x coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x,\n\t\t\tx2: x,\n\t\t\ty1: y1,\n\t\t\ty2: y2,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dx)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\tvar pathArray = [[\"M\", x, y1], [\"L\", x, y2], [\"L\", x2, y2], [\"L\", x2, y1], [\"z\"]];\n\tvar attr = { path: \"\" };\n\tfor (var i = 0; i < pathArray.length; i++)\n\t\tattr.path += pathArray[i].join(\" \");\n\tif (klass)\n\t\tattr['class'] = klass;\n\tif (name)\n\t\tattr['data-name'] = name;\n\tif (!elementGroup.isInGroup()) {\n\t\tattr.stroke = \"none\";\n\t\tattr.fill = renderer.foregroundColor;\n\t}\n\treturn renderer.paper.pathToBack(attr);\n}\n\nmodule.exports = printStem;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/print-stem.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/print-symbol.js":
/*!***********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/print-symbol.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\nvar glyphs = __webpack_require__(/*! ../creation/glyphs */ \"./node_modules/abcjs/src/write/creation/glyphs.js\");\nvar elementGroup = __webpack_require__(/*! ./group-elements */ \"./node_modules/abcjs/src/write/draw/group-elements.js\");\n\n/**\n * assumes this.y is set appropriately\n * if symbol is a multichar string without a . (as in scripts.staccato) 1 symbol per char is assumed\n * not scaled if not in printgroup\n */\nfunction printSymbol(renderer, x, offset, symbol, options) {\n\t// TODO-PER: what happened to scalex, and scaley? That might have been a bug introduced in refactoring\n\tvar el;\n\tvar ycorr;\n\tif (!symbol) return null;\n\tif (symbol.length > 1 && symbol.indexOf(\".\") < 0) {\n\t\tvar groupClass = elementGroup.isInGroup() ? '' : options.klass // If this is already in a group then don't repeat the classes for the sub-group)\n\t\trenderer.paper.openGroup({ \"data-name\": options.name, klass: groupClass });\n\t\tvar dx = 0;\n\t\tfor (var i = 0; i < symbol.length; i++) {\n\t\t\tvar s = symbol[i];\n\t\t\tycorr = glyphs.getYCorr(s);\n\t\t\tel = glyphs.printSymbol(x + dx, renderer.calcY(offset + ycorr), s, renderer.paper, { stroke: options.stroke, fill: options.fill });\n\t\t\tif (el) {\n\t\t\t\tif (i < symbol.length - 1)\n\t\t\t\t\tdx += kernSymbols(s, symbol[i + 1], glyphs.getSymbolWidth(s));\n\t\t\t} else {\n\t\t\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\t\t}\n\t\t}\n\t\tvar g = renderer.paper.closeGroup();\n\t\treturn g;\n\t} else {\n\t\tycorr = glyphs.getYCorr(symbol);\n\t\tif (elementGroup.isInGroup()) {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { \"data-name\": options.name });\n\t\t} else {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { klass: options.klass, stroke: options.stroke, fill: options.fill, \"data-name\": options.name });\n\t\t}\n\t\tif (el) {\n\t\t\treturn el;\n\t\t}\n\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\treturn null;\n\t}\n}\n\nfunction kernSymbols(lastSymbol, thisSymbol, lastSymbolWidth) {\n\t// This is just some adjustments to make it look better.\n\tvar width = lastSymbolWidth;\n\tif (lastSymbol === 'f' && thisSymbol === 'f')\n\t\twidth = width * 2 / 3;\n\tif (lastSymbol === 'p' && thisSymbol === 'p')\n\t\twidth = width * 5 / 6;\n\tif (lastSymbol === 'f' && thisSymbol === 'z')\n\t\twidth = width * 5 / 8;\n\treturn width;\n}\n\nmodule.exports = printSymbol;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/print-symbol.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/relative.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/relative.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\nvar printStem = __webpack_require__(/*! ./print-stem */ \"./node_modules/abcjs/src/write/draw/print-stem.js\");\nvar printStaffLine = __webpack_require__(/*! ./staff-line */ \"./node_modules/abcjs/src/write/draw/staff-line.js\");\nvar printSymbol = __webpack_require__(/*! ./print-symbol */ \"./node_modules/abcjs/src/write/draw/print-symbol.js\");\n\nfunction drawRelativeElement(renderer, params, bartop) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(params.type + \" Relative Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch);\n\tswitch (params.type) {\n\t\tcase \"symbol\":\n\t\t\tif (params.c === null) return null;\n\t\t\tvar klass = \"symbol\";\n\t\t\tif (params.klass) klass += \" \" + params.klass;\n\t\t\tparams.graphelem = printSymbol(renderer, params.x, params.pitch, params.c, {\n\t\t\t\tscalex: params.scalex,\n\t\t\t\tscaley: params.scaley,\n\t\t\t\tklass: renderer.controller.classes.generate(klass),\n\t\t\t\t//\t\t\t\tfill:\"none\",\n\t\t\t\t//\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\tname: params.name\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: renderer.calcY(15), text: \"\" + params.c, type: \"debugfont\", klass: renderer.controller.classes.generate('debug-msg'), anchor: 'start', centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"tabNumber\":\n\t\t\tvar hAnchor = \"middle\";\n\t\t\tvar tabFont = \"tabnumberfont\";\n\t\t\tvar tabClass = 'abcjs-tab-number';\n\t\t\tif (params.isGrace) {\n\t\t\t\ttabFont = \"tabgracefont\";\n\t\t\t\ty += 2.5;\n\t\t\t\ttabClass = 'tab-grace'\n\t\t\t}\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: tabFont, klass: renderer.controller.classes.generate(tabClass), anchor: hAnchor, centerVertically: false, dim: params.dim, cursor: 'default' }, false);\n\t\t\tbreak;\n\t\tcase \"barNumber\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: \"measurefont\", klass: renderer.controller.classes.generate('bar-number'), anchor: \"middle\", dim: params.dim, name: \"bar-number\" }, true);\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: \"vocalfont\", klass: renderer.controller.classes.generate('lyric'), anchor: \"middle\", dim: params.dim, name: \"lyric\" }, false);\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'gchordfont', klass: renderer.controller.classes.generate(\"chord\"), anchor: \"middle\", dim: params.dim, lane: params.getLane(), name: \"chord\" }, false);\n\t\t\tbreak;\n\t\tcase \"decoration\":\n\t\t\t// The +6 is to compensate for the placement of text in svg: to be on the same row as symbols, the y-coord needs to compensate for the center line.\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y + 6, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: params.anchor, centerVertically: true, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: \"start\", centerVertically: params.centerVertically, dim: params.dim, lane: params.getLane(), name: \"annotation\" }, false);\n\t\t\tbreak;\n\t\tcase \"multimeasure-text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x + params.w / 2, y: y, text: params.c, type: 'tempofont', klass: renderer.controller.classes.generate(\"rest\"), anchor: \"middle\", centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'partsfont', klass: renderer.controller.classes.generate(\"part\"), anchor: \"start\", dim: params.dim, name: params.c }, true);\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\tparams.graphelem = printStem(renderer, params.x, params.linewidth + renderer.lineThickness, y, (bartop) ? bartop : renderer.calcY(params.pitch2), null, \"bar\"); break; // bartop can't be 0\n\t\tcase \"stem\":\n\t\t\tvar stemWidth = params.linewidth > 0 ? params.linewidth + renderer.lineThickness : params.linewidth - renderer.lineThickness\n\t\t\tparams.graphelem = printStem(renderer, params.x, stemWidth, y, renderer.calcY(params.pitch2), 'abcjs-stem', 'stem'); break;\n\t\tcase \"ledger\":\n\t\t\tparams.graphelem = printStaffLine(renderer, params.x, params.x + params.w, params.pitch, \"abcjs-ledger\", \"ledger\", 0.35 + renderer.lineThickness); break;\n\t}\n\tif (params.scalex !== 1 && params.graphelem) {\n\t\tscaleExistingElem(renderer.paper, params.graphelem, params.scalex, params.scaley, params.x, y);\n\t}\n\treturn params.graphelem;\n}\n\nfunction scaleExistingElem(paper, elem, scaleX, scaleY, x, y) {\n\tpaper.setAttributeOnElement(elem, { style: \"transform:scale(\" + scaleX + \",\" + scaleY + \");transform-origin:\" + x + \"px \" + y + \"px;\" });\n}\n\nmodule.exports = drawRelativeElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/relative.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/round-number.js":
/*!***********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/round-number.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function roundNumber(x) {\n\treturn parseFloat(x.toFixed(2));\n}\n\nmodule.exports = roundNumber;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/round-number.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/selectables.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/selectables.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var highlight = __webpack_require__(/*! ../interactive/highlight */ \"./node_modules/abcjs/src/write/interactive/highlight.js\");\nvar unhighlight = __webpack_require__(/*! ../interactive/unhighlight */ \"./node_modules/abcjs/src/write/interactive/unhighlight.js\");\n\nfunction Selectables(paper, selectTypes, tuneNumber) {\n\tthis.elements = [];\n\tthis.paper = paper;\n\tthis.tuneNumber = tuneNumber;\n\tthis.selectTypes = selectTypes;\n}\n\nSelectables.prototype.getElements = function () {\n\treturn this.elements;\n};\n\nSelectables.prototype.add = function (absEl, svgEl, isNoteOrTabNumber, staffPos) {\n\tif (!this.canSelect(absEl))\n\t\treturn;\n\tvar params;\n\tif (this.selectTypes === undefined)\n\t\tparams = { selectable: false, \"data-index\": this.elements.length }; // This is the old behavior.\n\telse\n\t\tparams = { selectable: true, tabindex: 0, \"data-index\": this.elements.length };\n\tthis.paper.setAttributeOnElement(svgEl, params);\n\tvar sel = { absEl: absEl, svgEl: svgEl, isDraggable: isNoteOrTabNumber };\n\tif (staffPos !== undefined)\n\t\tsel.staffPos = staffPos;\n\tthis.elements.push(sel);\n\n};\n\nSelectables.prototype.canSelect = function (absEl) {\n\tif (this.selectTypes === false)\n\t\treturn false;\n\tif (!absEl || !absEl.abcelem)\n\t\treturn false;\n\tif (this.selectTypes === true)\n\t\treturn true;\n\tif (this.selectTypes === undefined) {\n\t\t// by default, only notes and tab numbers can be clicked.\n\t\tif (absEl.abcelem.el_type === 'note' || absEl.abcelem.el_type === 'tabNumber') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\treturn this.selectTypes.indexOf(absEl.abcelem.el_type) >= 0;\n};\n\nSelectables.prototype.wrapSvgEl = function (abcelem, el) {\n\tvar absEl = {\n\t\ttuneNumber: this.tuneNumber,\n\t\tabcelem: abcelem,\n\t\telemset: [el],\n\t\thighlight: highlight,\n\t\tunhighlight: unhighlight\n\t};\n\tthis.add(absEl, el, false);\n};\n\nmodule.exports = Selectables;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/selectables.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/separator.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/separator.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function drawSeparator(renderer, width) {\n\tvar fill = \"rgba(0,0,0,255)\";\n\tvar stroke = \"rgba(0,0,0,0)\";\n\tvar y = Math.round(renderer.y);\n\tvar staffWidth = renderer.controller.width;\n\tvar x1 = (staffWidth - width) / 2;\n\tvar x2 = x1 + width;\n\tvar pathString = 'M ' + x1 + ' ' + y +\n\t\t' L ' + x2 + ' ' + y +\n\t\t' L ' + x2 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + y + ' z';\n\trenderer.paper.pathToBack({ path: pathString, stroke: stroke, fill: fill, 'class': renderer.controller.classes.generate('defined-text') });\n}\n\nmodule.exports = drawSeparator;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/separator.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/set-paper-size.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/set-paper-size.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function setPaperSize(renderer, maxwidth, scale, responsive) {\n\tvar w = (maxwidth + renderer.padding.left + renderer.padding.right) * scale;\n\tvar h = (renderer.y + renderer.padding.bottom) * scale;\n\tif (renderer.isPrint)\n\t\th = Math.max(h, 1056); // 11in x 72pt/in x 1.33px/pt\n\t// TODO-PER: We are letting the page get as long as it needs now, but eventually that should go to a second page.\n\n\t// for accessibility\n\tif (renderer.ariaLabel !== '') {\n\t\tvar text = \"Sheet Music\";\n\t\tif (renderer.abctune && renderer.abctune.metaText && renderer.abctune.metaText.title)\n\t\t\ttext += \" for \\\"\" + renderer.abctune.metaText.title + '\"';\n\t\trenderer.paper.setTitle(text);\n\t\tvar label = renderer.ariaLabel ? renderer.ariaLabel : text;\n\t\trenderer.paper.setAttribute(\"aria-label\", label);\n\t}\n\n\t// for dragging - don't select during drag\n\tvar styles = [\n\t\t\"-webkit-touch-callout: none;\",\n\t\t\"-webkit-user-select: none;\",\n\t\t\"-khtml-user-select: none;\",\n\t\t\"-moz-user-select: none;\",\n\t\t\"-ms-user-select: none;\",\n\t\t\"user-select: none;\"\n\t];\n\trenderer.paper.insertStyles(\".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {\" + styles.join(\" \") + \"}\");\n\n\tvar parentStyles = { overflow: \"hidden\" };\n\tif (responsive === 'resize') {\n\t\trenderer.paper.setResponsiveWidth(w, h);\n\t} else {\n\t\tparentStyles.width = \"\";\n\t\tparentStyles.height = h + \"px\";\n\t\tif (scale < 1) {\n\t\t\tparentStyles.width = w + \"px\";\n\t\t\trenderer.paper.setSize(w / scale, h / scale);\n\t\t} else\n\t\t\trenderer.paper.setSize(w, h);\n\t}\n\trenderer.paper.setScale(scale);\n\trenderer.paper.setParentStyles(parentStyles);\n}\n\nmodule.exports = setPaperSize;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/set-paper-size.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/sprintf.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/sprintf.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * sprintf() for JavaScript v.0.4\n *\n Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of this software nor the names of its contributors may be\n used to endorse or promote products derived from this software without\n specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n//function str_repeat(i, m) { for (var o = []; m > 0; o[--m] = i); return(o.join('')); }\n\nvar sprintf = function () {\n\tvar i = 0, a, f = arguments[i++], o = [], m, p, c, x;\n\twhile (f) {\n\t\tif (m = /^[^\\x25]+/.exec(f)) o.push(m[0]);\n\t\telse if (m = /^\\x25{2}/.exec(f)) o.push('%');\n\t\telse if (m = /^\\x25(?:(\\d+)\\$)?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosuxX])/.exec(f)) {\n\t\t\tif (((a = arguments[m[1] || i++]) == null) || (a == undefined)) throw (\"Too few arguments.\");\n\t\t\tif (/[^s]/.test(m[7]) && (typeof (a) != 'number'))\n\t\t\t\tthrow (\"Expecting number but found \" + typeof (a));\n\t\t\tswitch (m[7]) {\n\t\t\t\tcase 'b': a = a.toString(2); break;\n\t\t\t\tcase 'c': a = String.fromCharCode(a); break;\n\t\t\t\tcase 'd': a = parseInt(a); break;\n\t\t\t\tcase 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;\n\t\t\t\tcase 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;\n\t\t\t\tcase 'o': a = a.toString(8); break;\n\t\t\t\tcase 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;\n\t\t\t\tcase 'u': a = Math.abs(a); break;\n\t\t\t\tcase 'x': a = a.toString(16); break;\n\t\t\t\tcase 'X': a = a.toString(16).toUpperCase(); break;\n\t\t\t}\n\t\t\ta = (/[def]/.test(m[7]) && m[2] && a > 0 ? '+' + a : a);\n\t\t\tc = m[3] ? m[3] == '0' ? '0' : m[3][1] : ' ';\n\t\t\tx = m[5] - String(a).length;\n\t\t\tp = m[5] ? str_repeat(c, x) : '';\n\t\t\to.push(m[4] ? a + p : p + a);\n\t\t}\n\t\telse throw (\"Huh ?!\");\n\t\tf = f.substring(m[0].length);\n\t}\n\treturn o.join('');\n};\n\nmodule.exports = sprintf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/sprintf.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/staff-group.js":
/*!**********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/staff-group.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar drawBrace = __webpack_require__(/*! ./brace */ \"./node_modules/abcjs/src/write/draw/brace.js\");\nvar drawVoice = __webpack_require__(/*! ./voice */ \"./node_modules/abcjs/src/write/draw/voice.js\");\nvar printStaff = __webpack_require__(/*! ./staff */ \"./node_modules/abcjs/src/write/draw/staff.js\");\nvar printDebugBox = __webpack_require__(/*! ./debug-box */ \"./node_modules/abcjs/src/write/draw/debug-box.js\");\nvar printStem = __webpack_require__(/*! ./print-stem */ \"./node_modules/abcjs/src/write/draw/print-stem.js\");\nvar nonMusic = __webpack_require__(/*! ./non-music */ \"./node_modules/abcjs/src/write/draw/non-music.js\");\n\nfunction drawStaffGroup(renderer, params, selectables, lineNumber) {\n\t// We enter this method with renderer.y pointing to the topmost coordinate that we're allowed to draw.\n\t// All of the children that will be drawn have a relative \"pitch\" set, where zero is the first ledger line below the staff.\n\t// renderer.y will be offset at the beginning of each staff by the amount required to make the relative pitch work.\n\t// If there are multiple staves, then renderer.y will be incremented for each new staff.\n\n\tvar colorIndex;\n\n\t// An invisible marker is useful to be able to find where each system starts.\n\t//addInvisibleMarker(renderer, \"abcjs-top-of-system\");\n\n\tvar startY = renderer.y; // So that it can be restored after we're done.\n\t// Set the absolute Y position for each staff here, so the voice drawing below can just use if.\n\tfor (var j = 0; j < params.staffs.length; j++) {\n\t\tvar staff1 = params.staffs[j];\n\t\t//renderer.printHorizontalLine(50, renderer.y, \"start\");\n\t\trenderer.moveY(spacing.STEP, staff1.top);\n\t\tstaff1.absoluteY = renderer.y;\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"box\") >= 0 && staff1.voices) {\n\t\t\t\tboxAllElements(renderer, params.voices, staff1.voices);\n\t\t\t}\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({ x1: renderer.padding.left, x2: renderer.padding.left + renderer.controller.width, y1: startY, y2: startY, stroke: \"#0000ff\" });\n\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t{\n\t\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\t\ty: renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\t\theight: renderer.calcY(staff1.originalBottom) - renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\tfill: renderer.foregroundColor,\n\t\t\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\t\t\t\"fill-opacity\": 0.1,\n\t\t\t\t\t\t\"stroke-opacity\": 0.1\n\t\t\t\t\t});\n\t\t\t\tcolorIndex = 0;\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'endingHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'partHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'tempoHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightBelow');\n\t\t\t}\n\t\t}\n\t\trenderer.moveY(spacing.STEP, -staff1.bottom);\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({\n\t\t\t\t\tx1: renderer.padding.left,\n\t\t\t\t\tx2: renderer.padding.left + renderer.controller.width,\n\t\t\t\t\ty1: renderer.y,\n\t\t\t\t\ty2: renderer.y,\n\t\t\t\t\tstroke: \"#0000aa\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tvar topLine; // these are to connect multiple staves. We need to remember where they are.\n\tvar bottomLine;\n\n\tvar linePitch = 2;\n\tvar bartop = 0;\n\tfor (var i = 0; i < params.voices.length; i++) {\n\t\tvar staff = params.voices[i].staff;\n\t\tvar tabName = params.voices[i].tabNameInfos;\n\t\trenderer.y = staff.absoluteY;\n\t\trenderer.controller.classes.incrVoice();\n\t\t//renderer.y = staff.y;\n\t\t// offset for starting the counting at middle C\n\t\tif (!params.voices[i].duplicate) {\n\t\t\t//\t\t\trenderer.moveY(spacing.STEP, staff.top);\n\t\t\tif (!topLine) topLine = renderer.calcY(10);\n\t\t\tbottomLine = renderer.calcY(linePitch);\n\t\t\tif (staff.lines !== 0) {\n\t\t\t\tif (staff.linePitch) {\n\t\t\t\t\tlinePitch = staff.linePitch;\n\t\t\t\t}\n\t\t\t\trenderer.controller.classes.newMeasure();\n\t\t\t\tvar lines = printStaff(renderer, params.startx, params.w, staff.lines, staff.linePitch, 0.35);\n\t\t\t\tbottomLine = lines[1];\n\t\t\t\tstaff.bottomLine = bottomLine;\n\t\t\t\tstaff.topLine = lines[0];\n\t\t\t\t// rework bartop when tabs are present with current staff\n\t\t\t\tif (staff.hasTab) {\n\t\t\t\t\t// do not link to staff above  (ugly looking)\n\t\t\t\t\tbartop = staff.topLine;\n\t\t\t\t}\n\t\t\t\tif (staff.hasStaff) {\n\t\t\t\t\t// this is a tab\n\t\t\t\t\tbartop = staff.hasStaff.topLine;\n\t\t\t\t\tparams.voices[i].barto = true;\n\t\t\t\t\tparams.voices[i].topLine = topLine;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tprintBrace(renderer, staff.absoluteY, params.brace, i, selectables);\n\t\t\tprintBrace(renderer, staff.absoluteY, params.bracket, i, selectables);\n\t\t}\n\t\tdrawVoice(renderer, params.voices[i], bartop, selectables, {\n\t\t\ttop: startY,\n\t\t\tzero: renderer.y,\n\t\t\theight: params.height * spacing.STEP\n\t\t});\n\t\tvar tabNameHeight = 0;\n\t\tif (tabName) {\n\t\t\t// print tab infos on staffBottom\n\t\t\tvar r = { rows: [] };\n\t\t\tr.rows.push({ absmove: bottomLine + 2 });\n\t\t\tvar leftMargin = 8;\n\t\t\tr.rows.push({ left: params.startx + leftMargin, text: tabName.name, font: 'tablabelfont', klass: 'text instrument-name', anchor: 'start' });\n\t\t\tr.rows.push({ move: tabName.textSize.height });\n\t\t\tnonMusic(renderer, r);\n\t\t\ttabNameHeight = tabName.textSize.height;\n\t\t}\n\n\t\trenderer.controller.classes.newMeasure();\n\t\tif (!params.voices[i].duplicate) {\n\t\t\tbartop = renderer.calcY(2 + tabNameHeight); // This connects the bar lines between two different staves.\n\t\t\t//\t\t\tif (staff.bottom < 0)\n\t\t\t//\t\t\t\trenderer.moveY(spacing.STEP, -staff.bottom);\n\t\t}\n\t}\n\trenderer.controller.classes.newMeasure();\n\n\t// connect all the staves together with a vertical line\n\tvar staffSize = params.staffs.length;\n\tif (staffSize > 1) {\n\t\ttopLine = params.staffs[0].topLine;\n\t\tbottomLine = params.staffs[staffSize - 1].bottomLine;\n\t\tprintStem(renderer, params.startx, 0.6, topLine, bottomLine, null);\n\t}\n\trenderer.y = startY;\n\n\tfunction debugPrintGridItem(staff, key) {\n\t\tvar colors = [\"rgb(207,27,36)\", \"rgb(168,214,80)\", \"rgb(110,161,224)\", \"rgb(191,119,218)\", \"rgb(195,30,151)\",\n\t\t\t\"rgb(31,170,177)\", \"rgb(220,166,142)\"];\n\t\tif (staff.positionY && staff.positionY[key]) {\n\t\t\tvar height = staff.specialY[key] * spacing.STEP;\n\t\t\tif (key === \"chordHeightAbove\" && staff.specialY.chordLines && staff.specialY.chordLines.above)\n\t\t\t\theight *= staff.specialY.chordLines.above;\n\t\t\tif (key === \"chordHeightBelow\" && staff.specialY.chordLines && staff.specialY.chordLines.below)\n\t\t\t\theight *= staff.specialY.chordLines.below;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\ty: renderer.calcY(staff.positionY[key]),\n\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: colors[colorIndex],\n\t\t\t\t\tstroke: colors[colorIndex],\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\t\"stroke-opacity\": 0.4\n\t\t\t\t},\n\t\t\t\tkey.substr(0, 4));\n\t\t\tcolorIndex += 1; if (colorIndex > 6) colorIndex = 0;\n\t\t}\n\t}\n}\n\nfunction printBrace(renderer, absoluteY, brace, index, selectables) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].isStartVoice(index)) {\n\t\t\t\tbrace[i].startY = absoluteY - spacing.STEP * 10;\n\t\t\t\tbrace[i].elemset = drawBrace(renderer, brace[i], selectables);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// function addInvisibleMarker(renderer, className) {\n// \tvar y = Math.round(renderer.y);\n// \trenderer.paper.pathToBack({path:\"M 0 \" + y + \" L 0 0\", stroke:\"none\", fill:\"none\", \"stroke-opacity\": 0, \"fill-opacity\": 0, 'class': renderer.controller.classes.generate(className), 'data-vertical': y });\n// }\n\nfunction boxAllElements(renderer, voices, which) {\n\tfor (var i = 0; i < which.length; i++) {\n\t\tvar children = voices[which[i]].children;\n\t\tfor (var j = 0; j < children.length; j++) {\n\t\t\tvar elem = children[j];\n\t\t\tvar coords = elem.getFixedCoords();\n\t\t\tif (elem.invisible || coords.t === undefined || coords.b === undefined)\n\t\t\t\tcontinue;\n\t\t\tvar height = (coords.t - coords.b) * spacing.STEP;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: coords.x,\n\t\t\t\t\ty: renderer.calcY(coords.t),\n\t\t\t\t\twidth: coords.w,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: \"#88e888\",\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t});\n\n\t\t\tfor (var k = 0; k < elem.children.length; k++) {\n\t\t\t\tvar relElem = elem.children[k];\n\t\t\t\tvar chord = relElem.getChordDim();\n\t\t\t\tif (chord) {\n\t\t\t\t\tvar y = renderer.calcY(relElem.pitch);\n\t\t\t\t\ty += relElem.dim.font.size * relElem.getLane();\n\t\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: chord.left,\n\t\t\t\t\t\t\ty: y,\n\t\t\t\t\t\t\twidth: chord.right - chord.left,\n\t\t\t\t\t\t\theight: relElem.dim.font.size,\n\t\t\t\t\t\t\tfill: \"none\",\n\t\t\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = drawStaffGroup;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/staff-group.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/staff-line.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/staff-line.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var printLine = __webpack_require__(/*! ./print-line */ \"./node_modules/abcjs/src/write/draw/print-line.js\");\n\nfunction printStaffLine(renderer, x1, x2, pitch, klass, name, dy) {\n\tvar y = renderer.calcY(pitch);\n\treturn printLine(renderer, x1, x2, y, klass, name, dy);\n}\n\nmodule.exports = printStaffLine;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/staff-line.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/staff.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/staff.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var printStaffLine = __webpack_require__(/*! ./staff-line */ \"./node_modules/abcjs/src/write/draw/staff-line.js\");\n\nfunction printStaff(renderer, startx, endx, numLines, linePitch, dy) {\n\tvar klass = \"abcjs-top-line\";\n\tvar pitch = 2;\n\tif (linePitch) {\n\t\tpitch = linePitch;\n\t}\n\trenderer.paper.openGroup({ prepend: true, klass: renderer.controller.classes.generate(\"abcjs-staff\") });\n\t// If there is one line, it is the B line. Otherwise, the bottom line is the E line.\n\tvar firstYLine = 0;\n\tvar lastYLine = 0;\n\tif (numLines === 1) {\n\t\tprintStaffLine(renderer, startx, endx, 6, klass, null, dy + renderer.lineThickness);\n\t\tfirstYLine = renderer.calcY(10);\n\t\tlastYLine = renderer.calcY(2);\n\t} else {\n\n\t\tfor (var i = numLines - 1; i >= 0; i--) {\n\t\t\tvar curpitch = (i + 1) * pitch;\n\t\t\tlastYLine = renderer.calcY(curpitch);\n\t\t\tif (firstYLine === 0) {\n\t\t\t\tfirstYLine = lastYLine;\n\t\t\t}\n\t\t\tprintStaffLine(renderer, startx, endx, curpitch, klass, null, dy + renderer.lineThickness);\n\t\t\tklass = undefined;\n\t\t}\n\t}\n\trenderer.paper.closeGroup();\n\treturn [firstYLine, lastYLine];\n}\n\nmodule.exports = printStaff;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/staff.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/tempo.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/tempo.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var drawRelativeElement = __webpack_require__(/*! ./relative */ \"./node_modules/abcjs/src/write/draw/relative.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\n\nfunction drawTempo(renderer, params) {\n\tvar x = params.x;\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Tempo Element y-coordinate not set.\");\n\n\t//var tempoGroup;\n\tparams.tempo.el_type = \"tempo\";\n\t//\trenderer.wrapInAbsElem(params.tempo, \"abcjs-tempo\", function () {\n\t//renderer.paper.openGroup({klass: renderer.controller.classes.generate(\"tempo wha\")});\n\t// The text is aligned with extra room for descenders but numbers look like they are a little too high, so bump it a little.\n\tvar descenderHeight = 2;\n\tvar y = renderer.calcY(params.pitch) + 2;\n\tvar text;\n\tvar size;\n\tif (params.tempo.preString) {\n\t\ttext = renderText(renderer, { x: x, y: y, text: params.tempo.preString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"pre\" }, true);\n\t\tsize = renderer.controller.getTextSize.calc(params.tempo.preString, 'tempofont', 'tempo', text);\n\t\tvar preWidth = size.width;\n\t\tvar charWidth = preWidth / params.tempo.preString.length; // Just get some average number to increase the spacing.\n\t\tx += preWidth + charWidth;\n\t}\n\tif (params.note) {\n\t\tparams.note.setX(x);\n\t\tfor (var i = 0; i < params.note.children.length; i++)\n\t\t\tdrawRelativeElement(renderer, params.note.children[i], x);\n\t\tx += (params.note.w + 5);\n\t\tvar str = \"= \" + params.tempo.bpm;\n\t\ttext = renderText(renderer, { x: x, y: y, text: str, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"beats\" });\n\t\tsize = renderer.controller.getTextSize.calc(str, 'tempofont', 'tempo', text);\n\t\tvar postWidth = size.width;\n\t\tvar charWidth2 = postWidth / str.length; // Just get some average number to increase the spacing.\n\t\tx += postWidth + charWidth2;\n\t}\n\tif (params.tempo.postString) {\n\t\trenderText(renderer, { x: x, y: y, text: params.tempo.postString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"post\" }, true);\n\t}\n\t//tempoGroup = renderer.paper.closeGroup();\n\t//\t});\n\t//return [tempoGroup];\n}\n\nmodule.exports = drawTempo;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/tempo.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/text.js":
/*!***************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/text.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction renderText(renderer, params, alreadyInGroup) {\n\tvar y = params.y;\n\n\t// TODO-PER: Probably need to merge the regular text and rich text better. At the least, rich text loses the font box.\n\tif (params.phrases) {\n\t\t//richTextLine = function (phrases, x, y, klass, anchor, target)\n\t\tvar elem = renderer.paper.richTextLine(params.phrases, params.x, params.y, params.klass, params.anchor);\n\t\treturn elem;\n\t}\n\n\tif (params.lane) {\n\t\tvar laneMargin = params.dim.font.size * 0.25;\n\t\ty += (params.dim.font.size + laneMargin) * params.lane;\n\t}\n\n\tvar hash;\n\tif (params.dim) {\n\t\thash = params.dim;\n\t\thash.attr.class = params.klass;\n\t} else\n\t\thash = renderer.controller.getFontAndAttr.calc(params.type, params.klass);\n\tif (params.anchor)\n\t\thash.attr[\"text-anchor\"] = params.anchor;\n\tif (params['dominant-baseline'])\n\t\thash.attr[\"dominant-baseline\"] = params['dominant-baseline'];\n\thash.attr.x = params.x;\n\thash.attr.y = y;\n\tif (!params.centerVertically)\n\t\thash.attr.y += hash.font.size;\n\tif (params.type === 'debugfont') {\n\t\tconsole.log(\"Debug msg: \" + params.text);\n\t\thash.attr.stroke = \"#ff0000\";\n\t}\n\tif (params.cursor) {\n\t\thash.attr.cursor = params.cursor;\n\t}\n\n\tvar text = params.text.replace(/\\n\\n/g, \"\\n \\n\");\n\ttext = text.replace(/^\\n/, \"\\xA0\\n\");\n\n\tif (hash.font.box) {\n\t\tif (!alreadyInGroup)\n\t\t\trenderer.paper.openGroup({ klass: hash.attr['class'], fill: renderer.foregroundColor, \"data-name\": params.name });\n\t\tif (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\thash.attr.x -= hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"start\") {\n\t\t\thash.attr.x += hash.font.padding;\n\t\t}\n\t\thash.attr.y += hash.font.padding;\n\t\tdelete hash.attr['class'];\n\t}\n\tif (params.noClass)\n\t\tdelete hash.attr['class'];\n\thash.attr.x = roundNumber(hash.attr.x);\n\thash.attr.y = roundNumber(hash.attr.y);\n\tif (params.name)\n\t\thash.attr[\"data-name\"] = params.name;\n\tvar elem = renderer.paper.text(text, hash.attr);\n\tif (hash.font.box) {\n\t\tvar size = elem.getBBox();\n\n\t\tvar delta = 0;\n\t\tif (hash.attr[\"text-anchor\"] === \"middle\") {\n\t\t\tdelta = size.width / 2 + hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\tdelta = size.width + hash.font.padding * 2;\n\t\t}\n\t\tvar deltaY = 0;\n\t\tif (params.centerVertically) {\n\t\t\tdeltaY = size.height - hash.font.padding;\n\t\t}\n\t\trenderer.paper.rect({ \"data-name\": \"box\", x: Math.round(params.x - delta), y: Math.round(y - deltaY), width: Math.round(size.width + hash.font.padding * 2), height: Math.round(size.height + hash.font.padding * 2) });\n\t\tif (!alreadyInGroup)\n\t\t\telem = renderer.paper.closeGroup();\n\t}\n\treturn elem;\n}\n\nmodule.exports = renderText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/text.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/tie.js":
/*!**************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/tie.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawTie(renderer, params, linestartx, lineendx, selectables) {\n\tlayout(params, linestartx, lineendx);\n\n\tvar klass = '';\n\tif (params.anchor1) {\n\t\tklass += 'abcjs-start-m' + params.anchor1.parent.counters.measure + '-n' + params.anchor1.parent.counters.note;\n\t} else\n\t\tklass += 'abcjs-start-edge';\n\tif (params.anchor2) {\n\t\tklass += ' abcjs-end-m' + params.anchor2.parent.counters.measure + '-n' + params.anchor2.parent.counters.note;\n\t} else\n\t\tklass += ' abcjs-end-edge';\n\tif (params.hint)\n\t\tklass = \"abcjs-hint\";\n\tvar fudgeY = params.fixedY ? 1.5 : 0; // TODO-PER: This just compensates for drawArc, which contains too much knowledge of ties and slurs.\n\tvar el = drawArc(renderer, params.startX, params.endX, params.startY + fudgeY, params.endY + fudgeY, params.above, klass, params.isTie, params.dotted);\n\tvar startChar = -1\n\t// This gets the start and end points of the contents of the slur. We assume that the parenthesis are just to the outside of that.\n\tif (params.anchor1 && !params.isTie)\n\t\tstartChar = params.anchor1.parent.abcelem.startChar - 1\n\tvar endChar = -1\n\tif (params.anchor2 && !params.isTie)\n\t\tendChar = params.anchor2.parent.abcelem.endChar + 1\n\n\tselectables.wrapSvgEl({ el_type: \"slur\", startChar: startChar, endChar: endChar }, el);\n\treturn [el];\n}\n\n// TODO-PER: I think params part should have been done earlier in the layout pass.\nvar layout = function (params, lineStartX, lineEndX) {\n\t// We now have all of the input variables set, so we can figure out the start and ending x,y coordinates, and finalize the direction of the arc.\n\n\t// Ties and slurs are handled a little differently, so do calculations for them separately.\n\tif (!params.anchor1 || !params.anchor2)\n\t\tparams.isTie = true; // if the slur goes off the end of the line, then draw it like a tie\n\telse if (params.anchor1.pitch === params.anchor2.pitch && params.internalNotes.length === 0)\n\t\tparams.isTie = true;\n\telse\n\t\tparams.isTie = false;\n\n\tif (params.isTie) {\n\t\tparams.calcTieDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcTieY();\n\n\t} else {\n\t\tparams.calcSlurDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcSlurY();\n\t}\n\tparams.avoidCollisionAbove();\n};\n\nvar drawArc = function (renderer, x1, x2, pitch1, pitch2, above, klass, isTie, dotted) {\n\t// If it is a tie vs. a slur, draw it shallower.\n\tvar spacing = isTie ? 1.2 : 1.5;\n\n\tx1 = roundNumber(x1 + 6);\n\tx2 = roundNumber(x2 + 4);\n\tpitch1 = pitch1 + ((above) ? spacing : -spacing);\n\tpitch2 = pitch2 + ((above) ? spacing : -spacing);\n\tvar y1 = roundNumber(renderer.calcY(pitch1));\n\tvar y2 = roundNumber(renderer.calcY(pitch2));\n\n\t//unit direction vector\n\tvar dx = x2 - x1;\n\tvar dy = y2 - y1;\n\tvar norm = Math.sqrt(dx * dx + dy * dy);\n\tvar ux = dx / norm;\n\tvar uy = dy / norm;\n\n\tvar flatten = norm / 3.5;\n\tvar maxFlatten = isTie ? 10 : 25;  // If it is a tie vs. a slur, draw it shallower.\n\tvar curve = ((above) ? -1 : 1) * Math.min(maxFlatten, Math.max(4, flatten));\n\n\tvar controlx1 = roundNumber(x1 + flatten * ux - curve * uy);\n\tvar controly1 = roundNumber(y1 + flatten * uy + curve * ux);\n\tvar controlx2 = roundNumber(x2 - flatten * ux - curve * uy);\n\tvar controly2 = roundNumber(y2 - flatten * uy + curve * ux);\n\tvar thickness = 2;\n\tif (klass)\n\t\tklass += ' slur';\n\telse\n\t\tklass = 'slur';\n\tklass += isTie ? ' tie' : ' legato';\n\tvar ret;\n\tif (dotted) {\n\t\tklass += ' dotted';\n\t\tvar pathString2 = sprintf(\"M %f %f C %f %f %f %f %f %f\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2);\n\t\tret = renderer.paper.path({ path: pathString2, stroke: renderer.foregroundColor, fill: \"none\", 'stroke-dasharray': \"5 5\", 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t} else {\n\t\tvar pathString = sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2,\n\t\t\troundNumber(controlx2 - thickness * uy), roundNumber(controly2 + thickness * ux), roundNumber(controlx1 - thickness * uy), roundNumber(controly1 + thickness * ux), x1, y1);\n\t\tret = renderer.paper.path({ path: pathString, stroke: \"none\", fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t}\n\n\treturn ret;\n};\n\nmodule.exports = drawTie;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/tie.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/triplet.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/triplet.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var sprintf = __webpack_require__(/*! ./sprintf */ \"./node_modules/abcjs/src/write/draw/sprintf.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\nvar printPath = __webpack_require__(/*! ./print-path */ \"./node_modules/abcjs/src/write/draw/print-path.js\");\nvar roundNumber = __webpack_require__(/*! ./round-number */ \"./node_modules/abcjs/src/write/draw/round-number.js\");\n\nfunction drawTriplet(renderer, params, selectables) {\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate('triplet ' + params.durationClass), \"data-name\": \"triplet\" });\n\tif (!params.hasBeam) {\n\t\tdrawBracket(renderer, params.anchor1.x, params.startNote, params.anchor2.x + params.anchor2.w, params.endNote);\n\t}\n\t// HACK: adjust the position of \"3\". It is too high in all cases so we fudge it by subtracting 1 here.\n\trenderText(renderer, { x: params.xTextPos, y: renderer.calcY(params.yTextPos - 1), text: \"\" + params.number, type: 'tripletfont', anchor: \"middle\", centerVertically: true, noClass: true, name: \"\" + params.number }, true);\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"triplet\", startChar: -1, endChar: -1 }, g);\n\treturn g;\n}\n\nfunction drawLine(l, t, r, b) {\n\treturn sprintf(\"M %f %f L %f %f\", roundNumber(l), roundNumber(t), roundNumber(r), roundNumber(b));\n}\n\nfunction drawBracket(renderer, x1, y1, x2, y2) {\n\ty1 = renderer.calcY(y1);\n\ty2 = renderer.calcY(y2);\n\tvar bracketHeight = 5;\n\n\t// Draw vertical lines at the beginning and end\n\tvar pathString = \"\";\n\tpathString += drawLine(x1, y1, x1, y1 + bracketHeight);\n\tpathString += drawLine(x2, y2, x2, y2 + bracketHeight);\n\n\t// figure out midpoints to draw the broken line.\n\tvar midX = x1 + (x2 - x1) / 2;\n\t//var midY = y1 + (y2-y1)/2;\n\tvar gapWidth = 8;\n\tvar slope = (y2 - y1) / (x2 - x1);\n\tvar leftEndX = midX - gapWidth;\n\tvar leftEndY = y1 + (leftEndX - x1) * slope;\n\tpathString += drawLine(x1, y1, leftEndX, leftEndY);\n\tvar rightStartX = midX + gapWidth;\n\tvar rightStartY = y1 + (rightStartX - x1) * slope;\n\tpathString += drawLine(rightStartX, rightStartY, x2, y2);\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, \"data-name\": \"triplet-bracket\" });\n}\n\nmodule.exports = drawTriplet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/triplet.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/draw/voice.js":
/*!****************************************************!*\
  !*** ./node_modules/abcjs/src/write/draw/voice.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var drawGlissando = __webpack_require__(/*! ./glissando */ \"./node_modules/abcjs/src/write/draw/glissando.js\");\nvar drawCrescendo = __webpack_require__(/*! ./crescendo */ \"./node_modules/abcjs/src/write/draw/crescendo.js\");\nvar drawDynamics = __webpack_require__(/*! ./dynamics */ \"./node_modules/abcjs/src/write/draw/dynamics.js\");\nvar drawTriplet = __webpack_require__(/*! ./triplet */ \"./node_modules/abcjs/src/write/draw/triplet.js\");\nvar drawEnding = __webpack_require__(/*! ./ending */ \"./node_modules/abcjs/src/write/draw/ending.js\");\nvar drawTie = __webpack_require__(/*! ./tie */ \"./node_modules/abcjs/src/write/draw/tie.js\");\nvar drawBeam = __webpack_require__(/*! ./beam */ \"./node_modules/abcjs/src/write/draw/beam.js\");\nvar renderText = __webpack_require__(/*! ./text */ \"./node_modules/abcjs/src/write/draw/text.js\");\nvar drawAbsolute = __webpack_require__(/*! ./absolute */ \"./node_modules/abcjs/src/write/draw/absolute.js\");\n\nfunction drawVoice(renderer, params, bartop, selectables, staffPos) {\n\tvar width = params.w - 1;\n\trenderer.staffbottom = params.staff.bottom;\n\tvar saveColor = renderer.foregroundColor\n\tif (params.color)\n\t\trenderer.foregroundColor = params.color\n\n\tif (params.header) { // print voice name\n\t\tvar textEl = renderText(renderer, { x: renderer.padding.left, y: renderer.calcY(params.headerPosition), text: params.header, type: 'voicefont', klass: 'staff-extra voice-name', anchor: 'start', centerVertically: true, name: \"voice-name\" }, true);\n\t\tselectables.wrapSvgEl({ el_type: \"voiceName\", startChar: -1, endChar: -1, text: params.header }, textEl);\n\t}\n\n\tvar i;\n\tvar child;\n\tvar foundNote = false;\n\tfor (i = 0; i < params.children.length; i++) {\n\t\tchild = params.children[i];\n\t\tif (child.type === 'note' || child.type === 'rest')\n\t\t\tfoundNote = true;\n\t\tvar justInitializedMeasureNumber = false;\n\t\tif (child.type !== 'staff-extra' && !renderer.controller.classes.isInMeasure()) {\n\t\t\trenderer.controller.classes.startMeasure();\n\t\t\tjustInitializedMeasureNumber = true;\n\t\t}\n\t\tif (params.staff.isTabStaff) {\n\t\t\tchild.invisible = false;\n\t\t\tif (child.type == 'bar') {\n\t\t\t\tif (child.abcelem.lastBar) {\n\t\t\t\t\tbartop = params.topLine;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdrawAbsolute(renderer, child, (params.barto || i === params.children.length - 1) ? bartop : 0, selectables, staffPos);\n\n\t\tif (child.type === 'note' || isNonSpacerRest(child))\n\t\t\trenderer.controller.classes.incrNote();\n\t\tif (child.type === 'bar' && !justInitializedMeasureNumber && foundNote) {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t}\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\n\tfor (i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else\n\t\t\tdrawBeam(renderer, beam, selectables); // beams must be drawn first for proper printing of triplets, slurs and ties.\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\tfor (i = 0; i < params.otherchildren.length; i++) {\n\t\tchild = params.otherchildren[i];\n\t\tif (child === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else {\n\t\t\tswitch (child.type) {\n\t\t\t\tcase \"GlissandoElem\":\n\t\t\t\t\tchild.elemset = drawGlissando(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CrescendoElem\":\n\t\t\t\t\tchild.elemset = drawCrescendo(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DynamicDecoration\":\n\t\t\t\t\tchild.elemset = drawDynamics(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TripletElem\":\n\t\t\t\t\tdrawTriplet(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EndingElem\":\n\t\t\t\t\tchild.elemset = drawEnding(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TieElem\":\n\t\t\t\t\tchild.elemset = drawTie(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.log(child);\n\t\t\t\t\tdrawAbsolute(renderer, child, params.startx + 10, width, selectables, staffPos);\n\t\t\t}\n\t\t}\n\t}\n\trenderer.foregroundColor = saveColor\n\n}\n\nfunction isNonSpacerRest(elem) {\n\tif (elem.type !== 'rest')\n\t\treturn false;\n\tif (elem.abcelem && elem.abcelem.rest && elem.abcelem.rest.type !== 'spacer')\n\t\treturn true;\n\treturn false;\n}\n\nmodule.exports = drawVoice;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/draw/voice.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/engraver-controller.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/write/engraver-controller.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_engraver_controller.js: Controls the engraving process of an ABCJS abstract syntax tree as produced by ABCJS/parse\n\n/*global Math */\n\nvar spacing = __webpack_require__(/*! ./helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar AbstractEngraver = __webpack_require__(/*! ./creation/abstract-engraver */ \"./node_modules/abcjs/src/write/creation/abstract-engraver.js\");\nvar Renderer = __webpack_require__(/*! ./renderer */ \"./node_modules/abcjs/src/write/renderer.js\");\nvar FreeText = __webpack_require__(/*! ./creation/elements/free-text */ \"./node_modules/abcjs/src/write/creation/elements/free-text.js\");\nvar Separator = __webpack_require__(/*! ./creation/elements/separator */ \"./node_modules/abcjs/src/write/creation/elements/separator.js\");\nvar Subtitle = __webpack_require__(/*! ./creation/elements/subtitle */ \"./node_modules/abcjs/src/write/creation/elements/subtitle.js\");\nvar TopText = __webpack_require__(/*! ./creation/elements/top-text */ \"./node_modules/abcjs/src/write/creation/elements/top-text.js\");\nvar BottomText = __webpack_require__(/*! ./creation/elements/bottom-text */ \"./node_modules/abcjs/src/write/creation/elements/bottom-text.js\");\nvar setupSelection = __webpack_require__(/*! ./interactive/selection */ \"./node_modules/abcjs/src/write/interactive/selection.js\");\nvar layout = __webpack_require__(/*! ./layout/layout */ \"./node_modules/abcjs/src/write/layout/layout.js\");\nvar Classes = __webpack_require__(/*! ./helpers/classes */ \"./node_modules/abcjs/src/write/helpers/classes.js\");\nvar GetFontAndAttr = __webpack_require__(/*! ./helpers/get-font-and-attr */ \"./node_modules/abcjs/src/write/helpers/get-font-and-attr.js\");\nvar GetTextSize = __webpack_require__(/*! ./helpers/get-text-size */ \"./node_modules/abcjs/src/write/helpers/get-text-size.js\");\nvar draw = __webpack_require__(/*! ./draw/draw */ \"./node_modules/abcjs/src/write/draw/draw.js\");\nvar tablatures = __webpack_require__(/*! ../tablatures/abc_tablatures */ \"./node_modules/abcjs/src/tablatures/abc_tablatures.js\");\nvar findSelectableElement = __webpack_require__(/*! ./interactive/find-selectable-element */ \"./node_modules/abcjs/src/write/interactive/find-selectable-element.js\");\n\n/**\n * @class\n * Controls the engraving process, from ABCJS Abstract Syntax Tree (ABCJS AST) to rendered score sheet\n *\n * Call engraveABC to run the process. This creates a graphelems ABCJS Abstract Engraving Structure (ABCJS AES) that can be accessed through this.staffgroups\n * this data structure is first laid out (giving the graphelems x and y coordinates) and then drawn onto the renderer\n * each ABCJS AES represents a single staffgroup - all elements that are not in a staffgroup are rendered directly by the controller\n *\n * elements in ABCJS AES know their \"source data\" in the ABCJS AST, and their \"target shape\"\n * in the renderer for highlighting purposes\n *\n */\nvar EngraverController = function (paper, params) {\n\tparams = params || {};\n\tthis.findSelectableElement = findSelectableElement;\n\tthis.oneSvgPerLine = params.oneSvgPerLine;\n\tthis.selectionColor = params.selectionColor;\n\tthis.dragColor = params.dragColor ? params.dragColor : params.selectionColor;\n\tthis.dragging = !!params.dragging;\n\tthis.selectTypes = params.selectTypes;\n\tthis.responsive = params.responsive;\n\tthis.space = 3 * spacing.SPACE;\n\tthis.initialClef = params.initialClef;\n\tthis.timeBasedLayout = params.timeBasedLayout;\n\tthis.expandToWidest = !!params.expandToWidest;\n\tthis.scale = params.scale ? parseFloat(params.scale) : 0;\n\tthis.classes = new Classes({ shouldAddClasses: params.add_classes });\n\tif (!(this.scale > 0.1))\n\t\tthis.scale = undefined;\n\n\tif (params.staffwidth) {\n\t\t// Note: Normally all measurements to the engraver are in POINTS. However, if a person is formatting for the\n\t\t// screen and directly inputting the width, then it is more logical to have the measurement in pixels.\n\t\tthis.staffwidthScreen = params.staffwidth;\n\t\tthis.staffwidthPrint = params.staffwidth;\n\t} else {\n\t\tthis.staffwidthScreen = 740; // TODO-PER: Not sure where this number comes from, but this is how it's always been.\n\t\tthis.staffwidthPrint = 680; // The number of pixels in 8.5\", after 1cm of margin has been removed.\n\t}\n\tthis.listeners = [];\n\tif (params.clickListener)\n\t\tthis.addSelectListener(params.clickListener);\n\n\tthis.renderer = new Renderer(paper);\n\tthis.renderer.setPaddingOverride(params);\n\tif (params.showDebug)\n\t\tthis.renderer.showDebug = params.showDebug;\n\tif (params.jazzchords)\n\t\tthis.jazzchords = params.jazzchords;\n\tif (params.accentAbove)\n\t\tthis.accentAbove = params.accentAbove;\n\tif (params.germanAlphabet)\n\t\tthis.germanAlphabet = params.germanAlphabet;\n\tif (params.lineThickness)\n\t\tthis.lineThickness = params.lineThickness;\n\tthis.renderer.controller = this; // TODO-GD needed for highlighting\n\tthis.renderer.foregroundColor = params.foregroundColor ? params.foregroundColor : \"currentColor\";\n\tif (params.ariaLabel !== undefined)\n\t\tthis.renderer.ariaLabel = params.ariaLabel;\n\tthis.renderer.minPadding = params.minPadding ? params.minPadding : 0;\n\n\tthis.reset();\n};\n\nEngraverController.prototype.reset = function () {\n\tthis.selected = [];\n\tthis.staffgroups = [];\n\tif (this.engraver)\n\t\tthis.engraver.reset();\n\tthis.engraver = null;\n\tthis.renderer.reset();\n\tthis.dragTarget = null;\n\tthis.dragIndex = -1;\n\tthis.dragMouseStart = { x: -1, y: -1 };\n\tthis.dragYStep = 0;\n\tif (this.lineThickness)\n\t\tthis.renderer.setLineThickness(this.lineThickness)\n};\n\n/**\n * run the engraving process\n */\nEngraverController.prototype.engraveABC = function (abctunes, tuneNumber, lineOffset) {\n\tif (abctunes[0] === undefined) {\n\t\tabctunes = [abctunes];\n\t}\n\tthis.reset();\n\n\tfor (var i = 0; i < abctunes.length; i++) {\n\t\tif (tuneNumber === undefined)\n\t\t\ttuneNumber = i;\n\t\tthis.getFontAndAttr = new GetFontAndAttr(abctunes[i].formatting, this.classes);\n\t\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\t\tthis.engraveTune(abctunes[i], tuneNumber, lineOffset);\n\t}\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n */\nEngraverController.prototype.adjustNonScaledItems = function (scale) {\n\tthis.width /= scale;\n\tthis.renderer.adjustNonScaledItems(scale);\n};\n\nEngraverController.prototype.getMeasureWidths = function (abcTune) {\n\tthis.reset();\n\tthis.getFontAndAttr = new GetFontAndAttr(abcTune.formatting, this.classes);\n\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\tvar origJazzChords = this.jazzchords\n\n\tthis.setupTune(abcTune, 0);\n\tthis.constructTuneElements(abcTune);\n\t// layout() sets the x-coordinate of the abcTune element here:\n\t// abcTune.lines[0].staffGroup.voices[0].children[0].x\n\tlayout(this.renderer, abcTune, 0, this.space, this.timeBasedLayout);\n\n\tvar ret = [];\n\tvar section;\n\n\tvar needNewSection = true;\n\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\tvar abcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\tif (needNewSection) {\n\t\t\t\tsection = {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tmeasureWidths: [],\n\t\t\t\t\t//height: this.renderer.padding.top + this.renderer.spacing.music + this.renderer.padding.bottom + 24, // the 24 is the empirical value added to the bottom of all tunes.\n\t\t\t\t\ttotal: 0\n\t\t\t\t};\n\t\t\t\tret.push(section);\n\t\t\t\tneedNewSection = false;\n\t\t\t}\n\t\t\t// At this point, the voices are laid out so that the bar lines are even with each other. So we just need to get the placement of the first voice.\n\t\t\tif (abcLine.staffGroup.voices.length > 0) {\n\t\t\t\tvar voice = abcLine.staffGroup.voices[0];\n\t\t\t\tvar foundNotStaffExtra = false;\n\t\t\t\tvar lastXPosition = 0;\n\t\t\t\tfor (var k = 0; k < voice.children.length; k++) {\n\t\t\t\t\tvar child = voice.children[k];\n\t\t\t\t\tif (!foundNotStaffExtra && !child.isClef && !child.isKeySig) {\n\t\t\t\t\t\tfoundNotStaffExtra = true;\n\t\t\t\t\t\tsection.left = child.x;\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t\tif (child.type === 'bar') {\n\t\t\t\t\t\tsection.measureWidths.push(child.x - lastXPosition);\n\t\t\t\t\t\tsection.total += (child.x - lastXPosition);\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//section.height += calcHeight(abcLine.staffGroup) * spacing.STEP;\n\t\t} else\n\t\t\tneedNewSection = true;\n\t}\n\tthis.jazzchords = origJazzChords\n\treturn ret;\n};\n\nEngraverController.prototype.setupTune = function (abcTune, tuneNumber) {\n\tthis.classes.reset();\n\n\tif (abcTune.formatting.jazzchords !== undefined)\n\t\tthis.jazzchords = abcTune.formatting.jazzchords;\n\tif (abcTune.formatting.accentAbove !== undefined)\n\t\tthis.accentAbove = abcTune.formatting.accentAbove;\n\n\tthis.renderer.newTune(abcTune);\n\tthis.engraver = new AbstractEngraver(this.getTextSize, tuneNumber, {\n\t\tbagpipes: abcTune.formatting.bagpipes,\n\t\tflatbeams: abcTune.formatting.flatbeams,\n\t\tgraceSlurs: abcTune.formatting.graceSlurs !== false, // undefined is the default, which is true\n\t\tpercmap: abcTune.formatting.percmap,\n\t\tinitialClef: this.initialClef,\n\t\tjazzchords: this.jazzchords,\n\t\ttimeBasedLayout: this.timeBasedLayout,\n\t\taccentAbove: this.accentAbove,\n\t\tgermanAlphabet: this.germanAlphabet\n\t});\n\tthis.engraver.setStemHeight(this.renderer.spacing.stemHeight);\n\tthis.engraver.measureLength = abcTune.getMeterFraction().num / abcTune.getMeterFraction().den;\n\tif (abcTune.formatting.staffwidth) {\n\t\tthis.width = abcTune.formatting.staffwidth * 1.33; // The width is expressed in pt; convert to px.\n\t} else {\n\t\tthis.width = this.renderer.isPrint ? this.staffwidthPrint : this.staffwidthScreen;\n\t}\n\n\tvar scale = abcTune.formatting.scale ? abcTune.formatting.scale : this.scale;\n\tif (this.responsive === \"resize\") // The resizing will mess with the scaling, so just don't do it explicitly.\n\t\tscale = undefined;\n\tif (scale === undefined) scale = this.renderer.isPrint ? 0.75 : 1;\n\tthis.adjustNonScaledItems(scale);\n\treturn scale;\n};\n\nEngraverController.prototype.constructTuneElements = function (abcTune) {\n\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n\n\t// Generate the raw staff line data\n\tvar i;\n\tvar abcLine;\n\tvar hasPrintedTempo = false;\n\tvar hasSeenNonSubtitle = false;\n\tfor (i = 0; i < abcTune.lines.length; i++) {\n\t\tabcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.staffGroup = this.engraver.createABCLine(abcLine.staff, !hasPrintedTempo ? abcTune.metaText.tempo : null, i);\n\t\t\thasPrintedTempo = true;\n\t\t} else if (abcLine.subtitle) {\n\t\t\t// If the subtitle is at the top, then it was already accounted for. So skip all subtitles until the first non-subtitle line.\n\t\t\tif (hasSeenNonSubtitle) {\n\t\t\t\tvar center = this.width / 2 + this.renderer.padding.left;\n\t\t\t\tabcLine.nonMusic = new Subtitle(this.renderer.spacing.subtitle, abcTune.formatting, abcLine.subtitle, center, this.renderer.padding.left, this.getTextSize);\n\t\t\t}\n\t\t} else if (abcLine.text !== undefined) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new FreeText(abcLine.text, abcLine.vskip, this.getFontAndAttr, this.renderer.padding.left, this.width, this.getTextSize);\n\t\t} else if (abcLine.separator !== undefined && abcLine.separator.lineLength) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new Separator(abcLine.separator.spaceAbove, abcLine.separator.lineLength, abcLine.separator.spaceBelow);\n\t\t}\n\t}\n\tabcTune.bottomText = new BottomText(abcTune.metaText, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n};\n\nEngraverController.prototype.engraveTune = function (abcTune, tuneNumber, lineOffset) {\n\n\tvar origJazzChords = this.jazzchords\n\tvar scale = this.setupTune(abcTune, tuneNumber);\n  \n\t// Create all of the element objects that will appear on the page.\n\tthis.constructTuneElements(abcTune);\n  \n\t//Set the top text now that we know the width\n  \n\t// Do all the positioning, both horizontally and vertically\n\tvar maxWidth = layout(this.renderer, abcTune, this.width, this.space, this.expandToWidest, this.timeBasedLayout);\n  \n\t//Set the top text now that we know the width\n\tif (this.expandToWidest && maxWidth > this.width + 1) {\n  \n\t\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, maxWidth, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n  \n\t\tif ((abcTune.lines)&&(abcTune.lines.length > 0)){\n\t\t\tvar nlines = abcTune.lines.length;\n\n\t\t\tfor (var i=0;i<nlines;++i){\n\t\t\t\tvar entry = abcTune.lines[i];\n\t\t\t\tif (entry.nonMusic){\n\t\t\t\t\tif ((entry.nonMusic.rows) && (entry.nonMusic.rows.length > 0)){\n\t\t\t\t\t\tvar nRows = entry.nonMusic.rows.length;\n\t\t\t\t\t\tfor (var j=0;j<nRows;++j){\n\t\t\t\t\t\t\tvar thisRow = entry.nonMusic.rows[j];\n\t\t\t\t\t\t\t// Recenter the element if it's a subtitle or centered text \n\t\t\t\t\t\t\tif (thisRow.left){\n\t\t\t\t\t\t\t\tif (entry.subtitle){\n\t\t\t\t\t\t\t\t\tthisRow.left = (maxWidth/2) + this.renderer.padding.left;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ((entry.text)&&(entry.text.length>0)){\n\t\t\t\t\t\t\t\t\t\tif (entry.text[0].center){\n\t\t\t\t\t\t\t\t\t\t\tthisRow.left = (maxWidth/2) + this.renderer.padding.left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Deal with tablature for staff\n\tif (abcTune.tablatures) {\n\t  tablatures.layoutTablatures(this.renderer, abcTune);\n\t}\n  \n\t// Do all the writing to the SVG\n\tvar ret = draw(this.renderer, this.classes, abcTune, this.width, maxWidth, this.responsive, scale, this.selectTypes, tuneNumber, lineOffset);\n\tthis.staffgroups = ret.staffgroups;\n\tthis.selectables = ret.selectables;\n\tif (this.oneSvgPerLine) {\n\t  var div = this.renderer.paper.svg.parentNode;\n\t  this.svgs = splitSvgIntoLines(this.renderer, div, abcTune.metaText.title, this.responsive, scale);\n\t} else {\n\t  this.svgs = [this.renderer.paper.svg];\n\t}\n\tsetupSelection(this, this.svgs);\n\t\n\tthis.jazzchords = origJazzChords\n};\n\nfunction splitSvgIntoLines(renderer, output, title, responsive, scale) {\n\t// Each line is a top level <g> in the svg. To split it into separate\n\t// svgs iterate through each of those and put them in a new svg. Since\n\t// they are placed absolutely, the viewBox needs to be manipulated to\n\t// get the correct vertical positioning.\n\t// We copy all the attributes from the original svg except for the aria-label\n\t// since we want that to include a count. And the height is now a fraction of the original svg.\n\tif (!title) title = \"Untitled\"\n\tvar source = output.querySelector(\"svg\")\n\tif (responsive === 'resize')\n\t\toutput.style.paddingBottom = ''\n\tvar style = source.querySelector(\"style\")\n\tvar width = responsive === 'resize' ? source.viewBox.baseVal.width : source.getAttribute(\"width\")\n\tvar sections = output.querySelectorAll(\"svg > g\") // each section is a line, or the top matter or the bottom matter, or text that has been inserted.\n\tvar nextTop = 0 // There are often gaps between the elements for spacing, so the actual top and height needs to be inferred.\n\tvar wrappers = [] // Create all the elements and place them at once because we use the current svg to get data. It would disappear after placing the first line.\n\tvar svgs = []\n\tfor (var i = 0; i < sections.length; i++) {\n\t\tvar section = sections[i]\n\t\tvar box = section.getBBox()\n\t\tvar gapBetweenLines = box.y - nextTop // take the margin into account\n\t\tvar height = box.height + gapBetweenLines;\n\t\tvar wrapper = document.createElement(\"div\");\n\t\tvar divStyles = \"overflow: hidden;\"\n\t\tif (responsive !== 'resize')\n\t\t\tdivStyles += \"height:\" + (height * scale) + \"px;\"\n\t\twrapper.setAttribute(\"style\", divStyles)\n\t\tvar svg = duplicateSvg(source)\n\t\tvar fullTitle = \"Sheet Music for \\\"\" + title + \"\\\" section \" + (i + 1)\n\t\tsvg.setAttribute(\"aria-label\", fullTitle)\n\t\tif (responsive !== 'resize')\n\t\t\tsvg.setAttribute(\"height\", height)\n\t\tif (responsive === 'resize')\n\t\t\tsvg.style.position = ''\n\t\t// TODO-PER: Hack! Not sure why this is needed.\n\t\tvar viewBoxHeight = renderer.firefox112 ? height+1 : height\n\t\tsvg.setAttribute(\"viewBox\", \"0 \" + nextTop + \" \" + width + \" \" + viewBoxHeight)\n\t\tsvg.appendChild(style.cloneNode(true))\n\t\tvar titleEl = document.createElement(\"title\")\n\t\ttitleEl.innerText = fullTitle\n\t\tsvg.appendChild(titleEl)\n\t\tsvg.appendChild(section)\n\n\t\twrapper.appendChild(svg)\n\t\tsvgs.push(svg)\n\t\toutput.appendChild(wrapper)\n\t\t//wrappers.push(wrapper)\n\t\tnextTop = box.y + box.height\n\t}\n\t// for (i = 0; i < wrappers.length; i++)\n\t// \toutput.appendChild(wrappers[i])\n\toutput.removeChild(source)\n\treturn svgs;\n}\n\nfunction duplicateSvg(source) {\n\tvar svgNS = \"http://www.w3.org/2000/svg\";\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tfor (var i = 0; i < source.attributes.length; i++) {\n\t\tvar attr = source.attributes[i];\n\t\tif (attr.name !== \"height\" && attr.name != \"aria-label\")\n\t\t\tsvg.setAttribute(attr.name, attr.value)\n\t}\n\treturn svg;\n}\n\nEngraverController.prototype.getDim = function (historyEl) {\n\t// Get the dimensions on demand because the getBBox call is expensive.\n\tif (!historyEl.dim) {\n\t\tvar box = historyEl.svgEl.getBBox();\n\t\thistoryEl.dim = { left: Math.round(box.x), top: Math.round(box.y), right: Math.round(box.x + box.width), bottom: Math.round(box.y + box.height) };\n\t}\n\treturn historyEl.dim;\n};\n\nEngraverController.prototype.addSelectListener = function (clickListener) {\n\tthis.listeners[this.listeners.length] = clickListener;\n};\n\nmodule.exports = EngraverController;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/engraver-controller.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/helpers/classes.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/helpers/classes.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var Classes = function Classes(options) {\n\tthis.shouldAddClasses = options.shouldAddClasses;\n\tthis.reset();\n}\n\nClasses.prototype.reset = function () {\n\tthis.lineNumber = null;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.measureTotalPerLine = [];\n\tthis.noteNumber = null;\n}\n\nClasses.prototype.incrLine = function () {\n\tif (this.lineNumber === null)\n\t\tthis.lineNumber = 0;\n\telse\n\t\tthis.lineNumber++;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.incrVoice = function () {\n\tif (this.voiceNumber === null)\n\t\tthis.voiceNumber = 0;\n\telse\n\t\tthis.voiceNumber++;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.isInMeasure = function () {\n\treturn this.measureNumber !== null;\n};\n\nClasses.prototype.newMeasure = function () {\n\tif (this.measureNumber)\n\t\tthis.measureTotalPerLine[this.lineNumber] = this.measureNumber;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.startMeasure = function () {\n\tthis.measureNumber = 0;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrMeasure = function () {\n\tthis.measureNumber++;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrNote = function () {\n\tthis.noteNumber++;\n};\n\nClasses.prototype.measureTotal = function () {\n\tvar total = 0;\n\tfor (var i = 0; i < this.lineNumber; i++)\n\t\ttotal += this.measureTotalPerLine[i] ? this.measureTotalPerLine[i] : 0; // This can be null when non-music things are present.\n\tif (this.measureNumber)\n\t\ttotal += this.measureNumber;\n\treturn total;\n};\n\nClasses.prototype.getCurrent = function (c) {\n\treturn {\n\t\tline: this.lineNumber,\n\t\tmeasure: this.measureNumber,\n\t\tmeasureTotal: this.measureTotal(),\n\t\tvoice: this.voiceNumber,\n\t\tnote: this.noteNumber\n\t};\n};\n\nClasses.prototype.generate = function (c) {\n\tif (!this.shouldAddClasses)\n\t\treturn \"\";\n\tvar ret = [];\n\tif (c && c.length > 0) ret.push(c);\n\tif (c === \"abcjs-tab-number\") // TODO-PER-HACK! straighten out the tablature\n\t\treturn ret.join(' ')\n\tif (c === \"text instrument-name\")\n\t\treturn \"abcjs-text abcjs-instrument-name\"\n\tif (this.lineNumber !== null) ret.push(\"l\" + this.lineNumber);\n\tif (this.measureNumber !== null) ret.push(\"m\" + this.measureNumber);\n\tif (this.measureNumber !== null) ret.push(\"mm\" + this.measureTotal()); // measureNumber is null between measures so this is still the test for measureTotal\n\tif (this.voiceNumber !== null) ret.push(\"v\" + this.voiceNumber);\n\tif (c && (c.indexOf('note') >= 0 || c.indexOf('rest') >= 0 || c.indexOf('lyric') >= 0) && this.noteNumber !== null) ret.push(\"n\" + this.noteNumber);\n\t// add a prefix to all classes that abcjs adds.\n\tif (ret.length > 0) {\n\t\tret = ret.join(' '); // Some strings are compound classes - that is, specify more than one class in a string.\n\t\tret = ret.split(' ');\n\t\tfor (var i = 0; i < ret.length; i++) {\n\t\t\tif (ret[i].indexOf('abcjs-') !== 0 && ret[i].length > 0) // if the prefix doesn't already exist and the class is not blank.\n\t\t\t\tret[i] = 'abcjs-' + ret[i];\n\t\t}\n\t}\n\treturn ret.join(' ');\n};\n\n\nmodule.exports = Classes;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/helpers/classes.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/helpers/get-font-and-attr.js":
/*!*******************************************************************!*\
  !*** ./node_modules/abcjs/src/write/helpers/get-font-and-attr.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var GetFontAndAttr = function GetFontAndAttr(formatting, classes) {\n\tthis.formatting = formatting;\n\tthis.classes = classes;\n};\n\nGetFontAndAttr.prototype.updateFonts = function (fontOverrides) {\n\tif (fontOverrides.gchordfont)\n\t\tthis.formatting.gchordfont = fontOverrides.gchordfont;\n\tif (fontOverrides.tripletfont)\n\t\tthis.formatting.tripletfont = fontOverrides.tripletfont;\n\tif (fontOverrides.annotationfont)\n\t\tthis.formatting.annotationfont = fontOverrides.annotationfont;\n\tif (fontOverrides.vocalfont)\n\t\tthis.formatting.vocalfont = fontOverrides.vocalfont;\n};\n\nGetFontAndAttr.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetFontAndAttr.prototype.calc = function (type, klass) {\n\tvar font;\n\tif (typeof type === 'string') {\n\t\tfont = this.formatting[type];\n\t\t// Raphael deliberately changes the font units to pixels for some reason, so we need to change points to pixels here.\n\t\tif (font)\n\t\t\tfont = { face: font.face, size: Math.round(font.size * 4 / 3), decoration: font.decoration, style: font.style, weight: font.weight, box: font.box };\n\t\telse\n\t\t\tfont = { face: \"Arial\", size: Math.round(12 * 4 / 3), decoration: \"underline\", style: \"normal\", weight: \"normal\" };\n\t} else\n\t\tfont = { face: type.face, size: Math.round(type.size * 4 / 3), decoration: type.decoration, style: type.style, weight: type.weight, box: type.box };\n\tvar paddingPercent = this.formatting.fontboxpadding ? this.formatting.fontboxpadding : 0.1\n\tfont.padding = font.size * paddingPercent;\n\n\tvar attr = {\n\t\t\"font-size\": font.size, 'font-style': font.style,\n\t\t\"font-family\": this.getFamily(font.face), 'font-weight': font.weight, 'text-decoration': font.decoration,\n\t\t'class': this.classes.generate(klass)\n\t};\n\treturn { font: font, attr: attr };\n};\n\nmodule.exports = GetFontAndAttr;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/helpers/get-font-and-attr.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/helpers/get-text-size.js":
/*!***************************************************************!*\
  !*** ./node_modules/abcjs/src/write/helpers/get-text-size.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var GetTextSize = function GetTextSize(getFontAndAttr, svg) {\n\tthis.getFontAndAttr = getFontAndAttr;\n\tthis.svg = svg;\n};\n\nGetTextSize.prototype.updateFonts = function (fontOverrides) {\n\tthis.getFontAndAttr.updateFonts(fontOverrides);\n};\n\nGetTextSize.prototype.attr = function (type, klass) {\n\treturn this.getFontAndAttr.calc(type, klass);\n};\n\nGetTextSize.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetTextSize.prototype.calc = function (text, type, klass, el) {\n\tvar hash;\n\t// This can be passed in either a string or a font. If it is a string it names one of the standard fonts.\n\tif (typeof type === 'string')\n\t\thash = this.attr(type, klass);\n\telse {\n\t\thash = {\n\t\t\tfont: {\n\t\t\t\tface: type.face,\n\t\t\t\tsize: type.size,\n\t\t\t\tdecoration: type.decoration,\n\t\t\t\tstyle: type.style,\n\t\t\t\tweight: type.weight\n\t\t\t},\n\t\t\tattr: {\n\t\t\t\t\"font-size\": type.size,\n\t\t\t\t\"font-style\": type.style,\n\t\t\t\t\"font-family\": this.getFamily(type.face),\n\t\t\t\t\"font-weight\": type.weight,\n\t\t\t\t\"text-decoration\": type.decoration,\n\t\t\t\t\"class\": this.getFontAndAttr.classes.generate(klass)\n\t\t\t}\n\t\t}\n\t}\n\tvar size = this.svg.getTextSize(text, hash.attr, el);\n\tif (hash.font.box) {\n\t\t// Add padding and an equal margin to each side.\n\t\treturn { height: size.height + hash.font.padding * 4, width: size.width + hash.font.padding * 4 };\n\t}\n\treturn size;\n};\n\nGetTextSize.prototype.baselineToCenter = function (text, type, klass, index, total) {\n\t// This is for the case where SVG wants to use the baseline of the first line as the Y coordinate.\n\t// If there are multiple lines of text or there is an array of text then that will not be centered so this adjusts it.\n\tvar height = this.calc(text, type, klass).height;\n\tvar fontHeight = this.attr(type, klass).font.size;\n\n\treturn height * 0.5 + (total - index - 2) * fontHeight;\n};\n\n\nmodule.exports = GetTextSize;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/helpers/get-text-size.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/helpers/set-class.js":
/*!***********************************************************!*\
  !*** ./node_modules/abcjs/src/write/helpers/set-class.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var setClass = function (elemset, addClass, removeClass, color) {\n\tif (!elemset)\n\t\treturn;\n\tfor (var i = 0; i < elemset.length; i++) {\n\t\tvar el = elemset[i];\n\t\tvar attr = el.getAttribute(\"highlight\");\n\t\tif (!attr) attr = \"fill\";\n\t\tel.setAttribute(attr, color);\n\t\tvar kls = el.getAttribute(\"class\");\n\t\tif (!kls) kls = \"\";\n\t\tkls = kls.replace(removeClass, \"\");\n\t\tkls = kls.replace(addClass, \"\");\n\t\tif (addClass.length > 0) {\n\t\t\tif (kls.length > 0 && kls[kls.length - 1] !== ' ') kls += \" \";\n\t\t\tkls += addClass;\n\t\t}\n\t\tel.setAttribute(\"class\", kls);\n\t}\n};\n\nmodule.exports = setClass;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/helpers/set-class.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/helpers/spacing.js":
/*!*********************************************************!*\
  !*** ./node_modules/abcjs/src/write/helpers/spacing.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var spacing = {};\n\nspacing.FONTEM = 360;\nspacing.FONTSIZE = 30;\nspacing.STEP = spacing.FONTSIZE * 93 / 720;\nspacing.SPACE = 10;\nspacing.TOPNOTE = 15;\nspacing.STAVEHEIGHT = 100;\nspacing.INDENT = 50;\n\nmodule.exports = spacing;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/helpers/spacing.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/interactive/create-analysis.js":
/*!*********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/interactive/create-analysis.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function findNumber(klass, match, target, name) {\n\tif (klass.indexOf(match) === 0) {\n\t\tvar value = klass.replace(match, '');\n\t\tvar num = parseInt(value, 10);\n\t\tif ('' + num === value)\n\t\t\ttarget[name] = num;\n\t}\n}\n\nfunction createAnalysis(target, ev) {\n\tvar classes = [];\n\tif (target.absEl.elemset) {\n\t\tvar classObj = {};\n\t\tfor (var j = 0; j < target.absEl.elemset.length; j++) {\n\t\t\tvar es = target.absEl.elemset[j];\n\t\t\tif (es) {\n\t\t\t\tvar klass = es.getAttribute(\"class\").split(' ');\n\t\t\t\tfor (var k = 0; k < klass.length; k++)\n\t\t\t\t\tclassObj[klass[k]] = true;\n\t\t\t}\n\t\t}\n\t\tfor (var kk = 0; kk < Object.keys(classObj).length; kk++)\n\t\t\tclasses.push(Object.keys(classObj)[kk]);\n\t}\n\tvar analysis = {};\n\tfor (var ii = 0; ii < classes.length; ii++) {\n\t\tfindNumber(classes[ii], \"abcjs-v\", analysis, \"voice\");\n\t\tfindNumber(classes[ii], \"abcjs-l\", analysis, \"line\");\n\t\tfindNumber(classes[ii], \"abcjs-m\", analysis, \"measure\");\n\t}\n\tif (target.staffPos)\n\t\tanalysis.staffPos = target.staffPos;\n\tvar closest = ev.target;\n\twhile (closest && closest.dataset && !closest.dataset.name && closest.tagName.toLowerCase() !== 'svg')\n\t\tclosest = closest.parentNode;\n\tvar parent = ev.target;\n\twhile (parent && parent.dataset && !parent.dataset.index && parent.tagName.toLowerCase() !== 'svg')\n\t\tparent = parent.parentNode;\n\tif (parent && parent.dataset) {\n\t\tanalysis.name = parent.dataset.name;\n\t\tanalysis.clickedName = closest.dataset.name;\n\t\tanalysis.parentClasses = parent.classList;\n\t}\n\tif (closest && closest.classList)\n\t\tanalysis.clickedClasses = closest.classList;\n\tanalysis.selectableElement = target.svgEl;\n\treturn {classes: classes, analysis: analysis}\n}\n\nmodule.exports = createAnalysis;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/interactive/create-analysis.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/interactive/find-selectable-element.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/interactive/find-selectable-element.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var createAnalysis = __webpack_require__(/*! ./create-analysis */ \"./node_modules/abcjs/src/write/interactive/create-analysis.js\");\n\nfunction findSelectableElement(event) {\n\tvar selectable = event\n\twhile (selectable && selectable.attributes && selectable.tagName.toLowerCase() !== 'svg' && !selectable.attributes.selectable) {\n\t\tselectable = selectable.parentNode\n\t}\n\tif (selectable && selectable.attributes && selectable.attributes.selectable) {\n\t\tvar index = selectable.attributes['data-index'].nodeValue\n\t\tif (index) {\n\t\t\tindex = parseInt(index, 10)\n\t\t\tif (index >= 0 && index < this.selectables.length) {\n\t\t\t\tvar element = this.selectables[index]\n\t\t\t\tvar ret = createAnalysis(element, event)\n\t\t\t\tret.index = index\n\t\t\t\tret.element = element\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\t}\n\treturn null\n}\n\nmodule.exports = findSelectableElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/interactive/find-selectable-element.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/interactive/highlight.js":
/*!***************************************************************!*\
  !*** ./node_modules/abcjs/src/write/interactive/highlight.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var setClass = __webpack_require__(/*! ../helpers/set-class */ \"./node_modules/abcjs/src/write/helpers/set-class.js\");\n\nvar highlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#ff0000\";\n\tsetClass(this.elemset, klass, \"\", color);\n};\n\nmodule.exports = highlight;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/interactive/highlight.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/interactive/selection.js":
/*!***************************************************************!*\
  !*** ./node_modules/abcjs/src/write/interactive/selection.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar createAnalysis = __webpack_require__(/*! ./create-analysis */ \"./node_modules/abcjs/src/write/interactive/create-analysis.js\");\n\nfunction setupSelection(engraver, svgs) {\n\tengraver.rangeHighlight = rangeHighlight;\n\tif (engraver.dragging) {\n\t\tfor (var h = 0; h < engraver.selectables.length; h++) {\n\t\t\tvar hist = engraver.selectables[h];\n\t\t\tif (hist.svgEl.getAttribute(\"selectable\") === \"true\") {\n\t\t\t\thist.svgEl.setAttribute(\"tabindex\", 0);\n\t\t\t\thist.svgEl.setAttribute(\"data-index\", h);\n\t\t\t\thist.svgEl.addEventListener(\"keydown\", keyboardDown.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"keyup\", keyboardSelection.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"focus\", elementFocused.bind(engraver));\n\t\t\t}\n\t\t}\n\t}\n\tfor (var i = 0; i < svgs.length; i++) {\n\t\tsvgs[i].addEventListener('touchstart', mouseDown.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchmove', mouseMove.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchend', mouseUp.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('mousedown', mouseDown.bind(engraver));\n\t\tsvgs[i].addEventListener('mousemove', mouseMove.bind(engraver));\n\t\tsvgs[i].addEventListener('mouseup', mouseUp.bind(engraver));\n\t}\n}\n\nfunction getCoord(ev) {\n\tvar scaleX = 1;\n\tvar scaleY = 1;\n\tvar svg = ev.target.closest('svg')\n\tvar yOffset = 0\n\n\t// when renderer.options.responsive === 'resize' the click coords are in relation to the HTML\n\t// element, we need to convert to the SVG viewBox coords\n\tif (svg && svg.viewBox && svg.viewBox.baseVal) { // Firefox passes null to this when no viewBox is given\n\t\t// Chrome makes these values null when no viewBox is given.\n\t\tif (svg.viewBox.baseVal.width !== 0)\n\t\t\tscaleX = svg.viewBox.baseVal.width / svg.clientWidth\n\t\tif (svg.viewBox.baseVal.height !== 0)\n\t\t\tscaleY = svg.viewBox.baseVal.height / svg.clientHeight\n\t\tyOffset = svg.viewBox.baseVal.y\n\t}\n\n\tvar svgClicked = ev.target && ev.target.tagName === \"svg\";\n\tvar x;\n\tvar y;\n\tif (svgClicked) {\n\t\tx = ev.offsetX;\n\t\ty = ev.offsetY;\n\t} else {\n\t\tx = ev.layerX;\n\t\ty = ev.layerY;\n\t}\n\n\tx = x * scaleX;\n\ty = y * scaleY;\n\t//console.log(x, y)\n\n\treturn [x, y + yOffset];\n}\n\nfunction elementFocused(ev) {\n\t// If there had been another element focused and is being dragged, then report that before setting the new element up.\n\tif (this.dragMechanism === \"keyboard\" && this.dragYStep !== 0 && this.dragTarget)\n\t\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, ev);\n\n\tthis.dragYStep = 0;\n}\n\nfunction keyboardDown(ev) {\n\t// Swallow the up and down arrow events - they will be used for dragging with the keyboard\n\tswitch (ev.keyCode) {\n\t\tcase 38:\n\t\tcase 40:\n\t\t\tev.preventDefault();\n\t}\n}\n\nfunction keyboardSelection(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar handled = false;\n\tvar index = ev.target.dataset.index;\n\tswitch (ev.keyCode) {\n\t\tcase 13:\n\t\tcase 32:\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tmouseUp.bind(this)(ev);\n\t\t\tbreak;\n\t\tcase 38: // arrow up\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep--;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 40: // arrow down\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep++;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 9: // tab\n\t\t\t// This is losing focus - if there had been dragging, then do the callback\n\t\t\tif (this.dragYStep !== 0) {\n\t\t\t\tmouseUp.bind(this)(ev);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//console.log(ev);\n\t\t\tbreak;\n\t}\n\tif (handled)\n\t\tev.preventDefault();\n}\n\nfunction findElementInHistory(selectables, el) {\n\tif (!el)\n\t\treturn -1;\n\tfor (var i = 0; i < selectables.length; i++) {\n\t\tif (el.dataset.index === selectables[i].svgEl.dataset.index)\n\t\t\treturn i;\n\t}\n\treturn -1;\n}\n\nfunction findElementByCoord(self, x, y) {\n\tvar minDistance = 9999999;\n\tvar closestIndex = -1;\n\tfor (var i = 0; i < self.selectables.length && minDistance > 0; i++) {\n\t\tvar el = self.selectables[i];\n\n\t\tself.getDim(el);\n\t\tif (el.dim.left < x && el.dim.right > x && el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is a direct hit on an element - if so, definitely take it (there are no overlapping elements)\n\t\t\tclosestIndex = i;\n\t\t\tminDistance = 0;\n\t\t} else if (el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is the same vertical as the element. Then the distance is the x difference\n\t\t\tvar horiz = Math.min(Math.abs(el.dim.left - x), Math.abs(el.dim.right - x));\n\t\t\tif (horiz < minDistance) {\n\t\t\t\tminDistance = horiz;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else if (el.dim.left < x && el.dim.right > x) {\n\t\t\t// See if it is the same horizontal as the element. Then the distance is the y difference\n\t\t\tvar vert = Math.min(Math.abs(el.dim.top - y), Math.abs(el.dim.bottom - y));\n\t\t\tif (vert < minDistance) {\n\t\t\t\tminDistance = vert;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else {\n\t\t\t// figure out the distance to this element.\n\t\t\tvar dx = Math.abs(x - el.dim.left) > Math.abs(x - el.dim.right) ? Math.abs(x - el.dim.right) : Math.abs(x - el.dim.left);\n\t\t\tvar dy = Math.abs(y - el.dim.top) > Math.abs(y - el.dim.bottom) ? Math.abs(y - el.dim.bottom) : Math.abs(y - el.dim.top);\n\t\t\tvar hypotenuse = Math.sqrt(dx * dx + dy * dy);\n\t\t\tif (hypotenuse < minDistance) {\n\t\t\t\tminDistance = hypotenuse;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t}\n\t}\n\treturn (closestIndex >= 0 && minDistance <= 12) ? closestIndex : -1;\n}\n\nfunction getBestMatchCoordinates(dim, ev, scale) {\n\t// Different browsers have conflicting meanings for the coordinates that are returned.\n\t// If the item we want is clicked on directly, then we will just see what is the best match.\n\t// This seems like less of a hack than browser sniffing.\n\tif (dim.x <= ev.offsetX && dim.x + dim.width >= ev.offsetX &&\n\t\tdim.y <= ev.offsetY && dim.y + dim.height >= ev.offsetY)\n\t\treturn [ev.offsetX, ev.offsetY];\n\t// Firefox returns a weird value for offset, but layer is correct.\n\t// Safari and Chrome return the correct value for offset, but layer is multiplied by the scale (that is, if it were rendered with { scale: 2 })\n\t// For instance (if scale is 2):\n\t// Firefox: { offsetY: 5, layerY: 335 }\n\t// Others: {offsetY: 335, layerY: 670} (there could be a little rounding, so the number might not be exactly 2x)\n\t// So, if layerY/scale is approx. offsetY, then use offsetY, otherwise use layerY\n\tvar epsilon = Math.abs(ev.layerY / scale - ev.offsetY);\n\tif (epsilon < 3)\n\t\treturn [ev.offsetX, ev.offsetY];\n\telse\n\t\treturn [ev.layerX, ev.layerY];\n}\n\nfunction getTarget(target) {\n\t// This searches up the dom for the first item containing the attribute \"selectable\", or stopping at the SVG.\n\tif (!target)\n\t\treturn null;\n\tif (target.tagName === \"svg\")\n\t\treturn target;\n\n\tif (!target.getAttribute)\n\t\treturn null;\t\n\tvar found = target.getAttribute(\"selectable\");\n\twhile (!found) {\n\t\tif (!target.parentElement)\n\t\t\tfound = true;\n\t\telse {\n\t\t\ttarget = target.parentElement;\n\t\t\tif (target.tagName === \"svg\")\n\t\t\t\tfound = true;\n\t\t\telse\n\t\t\t\tfound = target.getAttribute(\"selectable\");\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction getMousePosition(self, ev) {\n\t// if the user clicked exactly on an element that we're interested in, then we already have the answer.\n\t// This is more reliable than the calculations because firefox returns different coords for offsetX, offsetY\n\tvar x;\n\tvar y;\n\tvar box;\n\tvar clickedOn = findElementInHistory(self.selectables, getTarget(ev.target));\n\tif (clickedOn >= 0) {\n\t\t// There was a direct hit on an element.\n\t\tbox = getBestMatchCoordinates(self.selectables[clickedOn].svgEl.getBBox(), ev, self.scale);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\t//console.log(\"clicked on\", clickedOn, x, y, self.selectables[clickedOn].svgEl.getBBox(), ev.target.getBBox());\n\t} else {\n\t\t// See if they clicked close to an element.\n\t\tbox = getCoord(ev);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\tclickedOn = findElementByCoord(self, x, y);\n\t\t//console.log(\"clicked near\", clickedOn, x, y, printEl(ev.target));\n\t}\n\treturn { x: x, y: y, clickedOn: clickedOn };\n}\n\nfunction attachMissingTouchEventAttributes(touchEv) {\n\tif (!touchEv || !touchEv.target || !touchEv.touches || touchEv.touches.length < 1)\n\t\treturn\n\tvar rect = touchEv.target.getBoundingClientRect();\n\tvar offsetX = touchEv.touches[0].pageX - rect.left;\n\tvar offsetY = touchEv.touches[0].pageY - rect.top;\n\n\ttouchEv.touches[0].offsetX = offsetX;\n\ttouchEv.touches[0].offsetY = offsetY;\n\n\ttouchEv.touches[0].layerX = touchEv.touches[0].pageX;\n\ttouchEv.touches[0].layerY = touchEv.touches[0].pageY;\n}\n\nfunction mouseDown(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchstart') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\t// Only start dragging if the user clicked close enough to an element and clicked with the main mouse button.\n\tif (positioning.clickedOn >= 0 && (ev.type === 'touchstart' || ev.button === 0) && this.selectables[positioning.clickedOn]) {\n\t\tthis.dragTarget = this.selectables[positioning.clickedOn];\n\t\tthis.dragIndex = positioning.clickedOn;\n\t\tthis.dragMechanism = \"mouse\";\n\t\tthis.dragMouseStart = { x: positioning.x, y: positioning.y };\n\t\tif (this.dragging && this.dragTarget.isDraggable) {\n\t\t\taddGlobalClass(this.renderer.paper, \"abcjs-dragging-in-progress\");\n\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t}\n\t}\n}\n\nfunction mouseMove(ev) {\n\tvar _ev = ev;\n\tif (ev.type === 'touchmove') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\tthis.lastTouchMove = ev;\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\n\tif (!this.dragTarget || !this.dragging || !this.dragTarget.isDraggable || this.dragMechanism !== 'mouse' || !this.dragMouseStart)\n\t\treturn;\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\tvar yDist = Math.round((positioning.y - this.dragMouseStart.y) / spacing.STEP);\n\tif (yDist !== this.dragYStep) {\n\t\tthis.dragYStep = yDist;\n\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (yDist * spacing.STEP) + \")\");\n\t}\n}\n\nfunction mouseUp(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchend' && this.lastTouchMove) {\n\t\tattachMissingTouchEventAttributes(this.lastTouchMove);\n\t\tif (this.lastTouchMove && this.lastTouchMove.touches && this.lastTouchMove.touches.length > 0)\n\t\t\t_ev = this.lastTouchMove.touches[0];\n\t}\n\n\tif (!this.dragTarget)\n\t\treturn;\n\n\tclearSelection.bind(this)();\n\tif (this.dragTarget.absEl && this.dragTarget.absEl.highlight) {\n\t\tthis.selected = [this.dragTarget.absEl];\n\t\tthis.dragTarget.absEl.highlight(undefined, this.selectionColor);\n\t}\n\n\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, _ev);\n\tif (this.dragTarget.svgEl && this.dragTarget.svgEl.focus) {\n\t\tthis.dragTarget.svgEl.focus();\n\t\tthis.dragTarget = null;\n\t\tthis.dragIndex = -1;\n\t}\n\tremoveGlobalClass(this.renderer.svg, \"abcjs-dragging-in-progress\");\n}\n\nfunction setSelection(dragIndex) {\n\tif (dragIndex >= 0 && dragIndex < this.selectables.length) {\n\t\tthis.dragTarget = this.selectables[dragIndex];\n\t\tthis.dragIndex = dragIndex;\n\t\tthis.dragMechanism = \"keyboard\";\n\t\tmouseUp.bind(this)({ target: this.dragTarget.svgEl });\n\t}\n}\n\n\nfunction notifySelect(target, dragStep, dragMax, dragIndex, ev) {\n\tvar ret = createAnalysis(target, ev)\n\tvar classes = ret.classes\n\tvar analysis = ret.analysis\n\n\tfor (var i = 0; i < this.listeners.length; i++) {\n\t\tthis.listeners[i](target.absEl.abcelem, target.absEl.tuneNumber, classes.join(' '), analysis, { step: dragStep, max: dragMax, index: dragIndex, setSelection: setSelection.bind(this) }, ev);\n\t}\n}\n\nfunction clearSelection() {\n\tfor (var i = 0; i < this.selected.length; i++) {\n\t\tthis.selected[i].unhighlight(undefined, this.renderer.foregroundColor);\n\t}\n\tthis.selected = [];\n}\n\nfunction rangeHighlight(start, end) {\n\tclearSelection.bind(this)();\n\tfor (var line = 0; line < this.staffgroups.length; line++) {\n\t\tvar voices = this.staffgroups[line].voices;\n\t\tfor (var voice = 0; voice < voices.length; voice++) {\n\t\t\tvar elems = voices[voice].children;\n\t\t\tfor (var elem = 0; elem < elems.length; elem++) {\n\t\t\t\t// Since the user can highlight more than an element, or part of an element, a hit is if any of the endpoints\n\t\t\t\t// is inside the other range.\n\t\t\t\tvar elStart = elems[elem].abcelem.startChar;\n\t\t\t\tvar elEnd = elems[elem].abcelem.endChar;\n\t\t\t\tif ((end > elStart && start < elEnd) || ((end === start) && end === elEnd)) {\n\t\t\t\t\t//\t\tif (elems[elem].abcelem.startChar>=start && elems[elem].abcelem.endChar<=end) {\n\t\t\t\t\tthis.selected[this.selected.length] = elems[elem];\n\t\t\t\t\telems[elem].highlight(undefined, this.selectionColor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getClassSet(el) {\n\tvar oldClass = el.getAttribute('class');\n\tif (!oldClass)\n\t\toldClass = \"\";\n\tvar klasses = oldClass.split(\" \");\n\tvar obj = {};\n\tfor (var i = 0; i < klasses.length; i++)\n\t\tobj[klasses[i]] = true;\n\treturn obj;\n}\n\nfunction setClassSet(el, klassSet) {\n\tvar klasses = [];\n\tfor (var key in klassSet) {\n\t\tif (klassSet.hasOwnProperty(key))\n\t\t\tklasses.push(key);\n\t}\n\tel.setAttribute('class', klasses.join(' '));\n}\n\nfunction addGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tobj[klass] = true;\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nfunction removeGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tdelete obj[klass];\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nmodule.exports = setupSelection;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/interactive/selection.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/interactive/unhighlight.js":
/*!*****************************************************************!*\
  !*** ./node_modules/abcjs/src/write/interactive/unhighlight.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var setClass = __webpack_require__(/*! ../helpers/set-class */ \"./node_modules/abcjs/src/write/helpers/set-class.js\");\n\nvar unhighlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#000000\";\n\tsetClass(this.elemset, \"\", klass, color);\n};\n\nmodule.exports = unhighlight;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/interactive/unhighlight.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/beam.js":
/*!*****************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/beam.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var RelativeElement = __webpack_require__(/*! ../creation/elements/relative-element */ \"./node_modules/abcjs/src/write/creation/elements/relative-element.js\");\nvar spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar getBarYAt = __webpack_require__(/*! ./get-bar-y-at */ \"./node_modules/abcjs/src/write/layout/get-bar-y-at.js\");\n\nvar layoutBeam = function (beam) {\n\tif (beam.elems.length === 0 || beam.allrests) return;\n\n\tvar dy = calcDy(beam.stemsUp, beam.isgrace); // This is the width of the beam line.\n\n\t// create the main beam\n\tvar firstElement = beam.elems[0];\n\tvar lastElement = beam.elems[beam.elems.length - 1];\n\tvar minStemHeight = 0; // The following is to leave space for \"!///!\" marks.\n\tvar referencePitch = beam.stemsUp ? firstElement.abcelem.maxpitch : firstElement.abcelem.minpitch;\n\tminStemHeight = minStem(firstElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = minStem(lastElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = Math.max(beam.stemHeight, minStemHeight + 3); // TODO-PER: The 3 is the width of a 16th beam. The actual height of the beam should be used instead.\n\tvar yPos = calcYPos(beam.average, beam.elems.length, minStemHeight, beam.stemsUp, firstElement.abcelem.averagepitch, lastElement.abcelem.averagepitch, beam.isflat, beam.min, beam.max, beam.isgrace);\n\tvar xPos = calcXPos(beam.stemsUp, firstElement, lastElement);\n\tbeam.addBeam({ startX: xPos[0], endX: xPos[1], startY: yPos[0], endY: yPos[1], dy: dy });\n\n\t// create the rest of the beams (in the case of 1/16th notes, etc.\n\tvar beams = createAdditionalBeams(beam.elems, beam.stemsUp, beam.beams[0], beam.isgrace, dy);\n\tfor (var i = 0; i < beams.length; i++)\n\t\tbeam.addBeam(beams[i]);\n\n\t// Now that the main beam is defined, we know how tall the stems should be, so create them and attach them to the original notes.\n\tcreateStems(beam.elems, beam.stemsUp, beam.beams[0], dy, beam.mainNote);\n};\n\nvar getDurlog = function (duration) {\n\t// TODO-PER: This is a hack to prevent a Chrome lockup. Duration should have been defined already,\n\t// but there's definitely a case where it isn't. [Probably something to do with triplets.]\n\tif (duration === undefined) {\n\t\treturn 0;\n\t}\n\t//        console.log(\"getDurlog: \" + duration);\n\treturn Math.floor(Math.log(duration) / Math.log(2));\n};\n\n//\n// private functions\n//\nfunction minStem(element, stemsUp, referencePitch, minStemHeight) {\n\tif (!element.children)\n\t\treturn minStemHeight;\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar elem = element.children[i];\n\t\tif (stemsUp && elem.top !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, elem.top - referencePitch);\n\t\telse if (!stemsUp && elem.bottom !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, referencePitch - elem.bottom + 7); // The extra 7 is because we are measuring the slash from the top.\n\t}\n\treturn minStemHeight;\n}\n\nfunction calcSlant(leftAveragePitch, rightAveragePitch, numStems, isFlat) {\n\tif (isFlat)\n\t\treturn 0;\n\tvar slant = leftAveragePitch - rightAveragePitch;\n\tvar maxSlant = numStems / 2;\n\n\tif (slant > maxSlant) slant = maxSlant;\n\tif (slant < -maxSlant) slant = -maxSlant;\n\treturn slant;\n}\n\nfunction calcDy(asc, isGrace) {\n\tvar dy = (asc) ? spacing.STEP : -spacing.STEP;\n\tif (isGrace) dy = dy * 0.4;\n\treturn dy;\n}\n\nfunction calcXPos(asc, firstElement, lastElement) {\n\tvar starthead = firstElement.heads[asc ? 0 : firstElement.heads.length - 1];\n\tvar endhead = lastElement.heads[asc ? 0 : lastElement.heads.length - 1];\n\tvar startX = starthead.x;\n\tif (asc) startX += starthead.w - 0.6;\n\tvar endX = endhead.x;\n\tendX += (asc) ? endhead.w : 0.6;\n\treturn [startX, endX];\n}\n\nfunction calcYPos(average, numElements, stemHeight, asc, firstAveragePitch, lastAveragePitch, isFlat, minPitch, maxPitch, isGrace) {\n\tvar barpos = stemHeight - 2; // (isGrace)? 5:7;\n\tvar barminpos = stemHeight - 2;\n\tvar pos = Math.round(asc ? Math.max(average + barpos, maxPitch + barminpos) : Math.min(average - barpos, minPitch - barminpos));\n\n\tvar slant = calcSlant(firstAveragePitch, lastAveragePitch, numElements, isFlat);\n\tvar startY = pos + Math.floor(slant / 2);\n\tvar endY = pos + Math.floor(-slant / 2);\n\n\t// If the notes are too high or too low, make the beam go down to the middle\n\tif (!isGrace) {\n\t\tif (asc && pos < 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t} else if (!asc && pos > 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t}\n\t}\n\n\treturn [startY, endY];\n}\n\nfunction createStems(elems, asc, beam, dy, mainNote) {\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\t// TODO-PER: This is odd. If it is a regular beam then elems is an array of AbsoluteElements, if it is a grace beam then it is an array of objects , so we directly attach the element to the parent. We tell it if is a grace note because they are passed in as a generic object instead of an AbsoluteElement.\n\t\tvar isGrace = elem.addExtra ? false : true;\n\t\tvar parent = isGrace ? mainNote : elem;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar ovalDelta = 1 / 5;//(isGrace)?1/3:1/5;\n\t\tvar pitch = furthestHead.pitch + ((asc) ? ovalDelta : -ovalDelta);\n\t\tvar dx = asc ? furthestHead.w : 0; // down-pointing stems start on the left side of the note, up-pointing stems start on the right side, so we offset by the note width.\n\t\tif (!isGrace)\n\t\t\tdx += furthestHead.dx;\n\t\tvar x = furthestHead.x + dx; // this is now the actual x location in pixels.\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\t\tvar lineWidth = (asc) ? -0.6 : 0.6;\n\t\tif (!asc)\n\t\t\tbary -= (dy / 2) / spacing.STEP;\t// TODO-PER: This is just a fudge factor so the down-pointing stems don't overlap.\n\t\tif (isGrace)\n\t\t\tdx += elem.heads[0].dx;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (furthestHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (asc)\n\t\t\t\tpitch += 1;\n\t\t\telse\n\t\t\t\tpitch -= 1;\n\t\t}\n\t\tvar stem = new RelativeElement(null, dx, 0, pitch, {\n\t\t\t\"type\": \"stem\",\n\t\t\t\"pitch2\": bary,\n\t\t\tlinewidth: lineWidth\n\t\t});\n\t\tstem.setX(parent.x); // This is after the x coordinates were set, so we have to set it directly.\n\t\tparent.addRight(stem);\n\t}\n\n}\n\nfunction createAdditionalBeams(elems, asc, beam, isGrace, dy) {\n\tvar beams = [];\n\tvar auxBeams = [];  // auxbeam will be {x, y, durlog, single} auxbeam[0] should match with durlog=-4 (16th) (j=-4-durlog)\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar x = furthestHead.x + ((asc) ? furthestHead.w : 0);\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\n\t\tvar sy = (asc) ? -1.5 : 1.5;\n\t\tif (isGrace) sy = sy * 2 / 3; // This makes the second beam on grace notes closer to the first one.\n\t\tvar duration = elem.abcelem.duration; // get the duration via abcelem because of triplets\n\t\tif (duration === 0) duration = 0.25; // if this is stemless, then we use quarter note as the duration.\n\t\tfor (var durlog = getDurlog(duration); durlog < -3; durlog++) {\n\t\t\tvar index = -4 - durlog;\n\t\t\tif (auxBeams[index]) {\n\t\t\t\tauxBeams[index].single = false;\n\t\t\t} else {\n\t\t\t\tauxBeams[index] = {\n\t\t\t\t\tx: x + ((asc) ? -0.6 : 0), y: bary + sy * (index + 1),\n\t\t\t\t\tdurlog: durlog, single: true\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (i > 0 && elem.abcelem.beambr && elem.abcelem.beambr <= (index + 1)) {\n\t\t\t\tif (!auxBeams[index].split)\n\t\t\t\t\tauxBeams[index].split = [auxBeams[index].x];\n\t\t\t\tvar xPos = calcXPos(asc, elems[i - 1], elem);\n\t\t\t\tif (auxBeams[index].split[auxBeams[index].split.length - 1] >= xPos[0]) {\n\t\t\t\t\t// the reduction in beams leaves a note unattached so create a small flag for it.\n\t\t\t\t\txPos[0] += elem.w;\n\t\t\t\t}\n\t\t\t\tauxBeams[index].split.push(xPos[0]);\n\t\t\t\tauxBeams[index].split.push(xPos[1]);\n\t\t\t}\n\t\t}\n\n\t\tfor (var j = auxBeams.length - 1; j >= 0; j--) {\n\t\t\tif (i === elems.length - 1 || getDurlog(elems[i + 1].abcelem.duration) > (-j - 4)) {\n\n\t\t\t\tvar auxBeamEndX = x;\n\t\t\t\tvar auxBeamEndY = bary + sy * (j + 1);\n\n\n\t\t\t\tif (auxBeams[j].single) {\n\t\t\t\t\tauxBeamEndX = (i === 0) ? x + 5 : x - 5;\n\t\t\t\t\tauxBeamEndY = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, auxBeamEndX) + sy * (j + 1);\n\t\t\t\t}\n\t\t\t\tvar b = { startX: auxBeams[j].x, endX: auxBeamEndX, startY: auxBeams[j].y, endY: auxBeamEndY, dy: dy }\n\t\t\t\tif (auxBeams[j].split !== undefined) {\n\t\t\t\t\tvar split = auxBeams[j].split;\n\t\t\t\t\tif (b.endX <= split[split.length - 1]) {\n\t\t\t\t\t\t// the reduction in beams leaves the last note by itself, so create a little flag for it\n\t\t\t\t\t\tsplit[split.length - 1] -= elem.w;\n\t\t\t\t\t}\n\t\t\t\t\tsplit.push(b.endX);\n\t\t\t\t\tb.split = auxBeams[j].split;\n\t\t\t\t}\n\t\t\t\tbeams.push(b);\n\t\t\t\tauxBeams = auxBeams.slice(0, j);\n\t\t\t}\n\t\t}\n\t}\n\treturn beams;\n}\n\nmodule.exports = layoutBeam;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/beam.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/get-bar-y-at.js":
/*!*************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/get-bar-y-at.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function getBarYAt(startx, starty, endx, endy, x) {\n\treturn starty + (endy - starty) / (endx - startx) * (x - startx);\n}\n\nmodule.exports = getBarYAt;\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/get-bar-y-at.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/get-left-edge-of-staff.js":
/*!***********************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/get-left-edge-of-staff.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function getLeftEdgeOfStaff(renderer, getTextSize, voices, brace, bracket) {\n\tvar x = renderer.padding.left;\n\n\t// find out how much space will be taken up by voice headers\n\tvar voiceheaderw = 0;\n\tvar i;\n\tvar size;\n\tfor (i = 0; i < voices.length; i++) {\n\t\tif (voices[i].header) {\n\t\t\tsize = getTextSize.calc(voices[i].header, 'voicefont', '');\n\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t}\n\t}\n\tvoiceheaderw = addBraceSize(voiceheaderw, brace, getTextSize);\n\tvoiceheaderw = addBraceSize(voiceheaderw, bracket, getTextSize);\n\n\tif (voiceheaderw) {\n\t\t// Give enough spacing to the right - we use the width of an A for the amount of spacing.\n\t\tvar sizeW = getTextSize.calc(\"A\", 'voicefont', '');\n\t\tvoiceheaderw += sizeW.width;\n\t}\n\tx += voiceheaderw;\n\n\tvar ofs = 0;\n\tofs = setBraceLocation(brace, x, ofs);\n\tofs = setBraceLocation(bracket, x, ofs);\n\treturn x + ofs;\n}\n\nfunction addBraceSize(voiceheaderw, brace, getTextSize) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].header) {\n\t\t\t\tvar size = getTextSize.calc(brace[i].header, 'voicefont', '');\n\t\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t\t}\n\t\t}\n\t}\n\treturn voiceheaderw;\n}\n\nfunction setBraceLocation(brace, x, ofs) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tsetLocation(x, brace[i]);\n\t\t\tofs = Math.max(ofs, brace[i].getWidth());\n\t\t}\n\t}\n\treturn ofs;\n}\n\nfunction setLocation(x, element) {\n\telement.x = x;\n}\n\nmodule.exports = getLeftEdgeOfStaff;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/get-left-edge-of-staff.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/layout-in-grid.js":
/*!***************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/layout-in-grid.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getLeftEdgeOfStaff = __webpack_require__(/*! ./get-left-edge-of-staff */ \"./node_modules/abcjs/src/write/layout/get-left-edge-of-staff.js\");\n\nfunction layoutInGrid(renderer, staffGroup, timeBasedLayout) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar ret = getTotalDuration(staffGroup, timeBasedLayout.minPadding)\n\tvar totalDuration = ret.totalDuration\n\tvar minSpacing = ret.minSpacing\n\tvar totalWidth = minSpacing * totalDuration\n\tif (timeBasedLayout.minWidth)\n\t\ttotalWidth = Math.max(totalWidth, timeBasedLayout.minWidth)\n\tvar leftAlignPadding = timeBasedLayout.minPadding ? timeBasedLayout.minPadding/2 : 2 // If the padding isn't specified still give it some\n\n\tstaffGroup.startx = leftEdge\n\tstaffGroup.w = totalWidth + leftEdge\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar voice = staffGroup.voices[i]\n\t\tvoice.startx = leftEdge\n\t\tvoice.w = totalWidth + leftEdge\n\n\t\tvar x = leftEdge\n\t\tvar afterFixedLeft = false\n\t\tvar durationUnit = 0\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar child = voice.children[j]\n\t\t\tif (!afterFixedLeft) {\n\t\t\t\tif (child.duration !== 0) {\n\t\t\t\t\t// We got to the first music element on the line\n\t\t\t\t\tafterFixedLeft = true\n\t\t\t\t\tdurationUnit = (totalWidth + leftEdge - x) / totalDuration\n\t\t\t\t\tstaffGroup.gridStart = x\n\t\t\t\t} else {\n\t\t\t\t\t// We are still doing the preliminary stuff - clef, time sig, etc.\n\t\t\t\t\tchild.x = x\n\t\t\t\t\tx += child.w + child.minspacing\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (afterFixedLeft) {\n\t\t\t\tif (timeBasedLayout.align === 'center')\n\t\t\t\t\tchild.x = x + (child.duration * durationUnit) / 2 - child.w / 2\n\t\t\t\telse {\n\t\t\t\t\t// left align with padding - but no padding for barlines, they should be right aligned.\n\t\t\t\t\t// TODO-PER: it looks better to move bar lines one pixel to right. Not sure why.\n\t\t\t\t\tif (child.duration === 0) {\n\t\t\t\t\t\tchild.x = x + 1 - child.w\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// child.extraw has the width of the accidentals - push the note to the right to take that into consideration. It will be 0 if there is nothing to the left.\n\t\t\t\t\t\tchild.x = x + leftAlignPadding - child.extraw\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tx += child.duration * durationUnit\n\t\t\t}\n\t\t\tfor (var k = 0; k < child.children.length; k++) {\n\t\t\t\tvar grandchild = child.children[k]\n\t\t\t\t// some elements don't have a dx - Tempo, for instance\n\t\t\t\tvar dx = grandchild.dx ? grandchild.dx : 0\n\t\t\t\tgrandchild.x = child.x + dx\n\t\t\t}\n\t\t}\n\t\tstaffGroup.gridEnd = x\n\t}\n\treturn totalWidth\n}\n\nfunction getTotalDuration(staffGroup, timeBasedLayout) {\n\tvar maxSpacing = 0\n\tvar maxCount = 0\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar count = 0\n\t\tvar voice = staffGroup.voices[i]\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar element = voice.children[j]\n\t\t\tcount += element.duration\n\t\t\tif (element.duration) {\n\t\t\t\tvar width = (element.w+timeBasedLayout) / element.duration\n\t\t\t\tmaxSpacing = Math.max(maxSpacing, width)\n\t\t\t}\n\t\t}\n\t\tmaxCount = Math.max(maxCount, count)\n\t}\n\treturn { totalDuration: maxCount, minSpacing: maxSpacing}\n}\n\nmodule.exports = layoutInGrid;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/layout-in-grid.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/layout.js":
/*!*******************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/layout.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var layoutVoice = __webpack_require__(/*! ./voice */ \"./node_modules/abcjs/src/write/layout/voice.js\");\nvar setUpperAndLowerElements = __webpack_require__(/*! ./set-upper-and-lower-elements */ \"./node_modules/abcjs/src/write/layout/set-upper-and-lower-elements.js\");\nvar layoutStaffGroup = __webpack_require__(/*! ./staff-group */ \"./node_modules/abcjs/src/write/layout/staff-group.js\");\nvar getLeftEdgeOfStaff = __webpack_require__(/*! ./get-left-edge-of-staff */ \"./node_modules/abcjs/src/write/layout/get-left-edge-of-staff.js\");\nvar layoutInGrid = __webpack_require__(/*! ./layout-in-grid */ \"./node_modules/abcjs/src/write/layout/layout-in-grid.js\");\n\n// This sets the \"x\" attribute on all the children in abctune.lines\n// It also sets the \"w\" and \"startx\" attributes on \"voices\"\n// It also sets the \"w\" and \"startx\" attributes on \"voices.children\"\nvar layout = function (renderer, abctune, width, space, expandToWidest, timeBasedLayout) {\n\tvar i;\n\tvar abcLine;\n\t// Adjust the x-coordinates to their absolute positions\n\tvar maxWidth = width;\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\t// console.log(\"=== line\", i)\n\t\t\tvar thisWidth;\n\t\t\tif (timeBasedLayout !== undefined)\n\t\t\t\tthisWidth = layoutInGrid(renderer, abcLine.staffGroup, timeBasedLayout);\n\t\t\telse\n\t\t\t\tthisWidth = setXSpacing(renderer, maxWidth, space, abcLine.staffGroup, abctune.formatting, i === abctune.lines.length - 1, false);\n\t\t\t// console.log(thisWidth, maxWidth)\n\t\t\tif (Math.round(thisWidth) > Math.round(maxWidth)) { // to take care of floating point weirdness\n\t\t\t\tmaxWidth = thisWidth\n\t\t\t\tif (expandToWidest)\n\t\t\t\t\ti = -1 // do the calculations over with the new width\n\t\t\t}\n\t\t}\n\t}\n\n\t// Layout the beams and add the stems to the beamed notes.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup && abcLine.staffGroup.voices) {\n\t\t\tfor (var j = 0; j < abcLine.staffGroup.voices.length; j++)\n\t\t\t\tlayoutVoice(abcLine.staffGroup.voices[j]);\n\t\t\tsetUpperAndLowerElements(renderer, abcLine.staffGroup);\n\t\t}\n\t}\n\n\t// Set the staff spacing\n\t// TODO-PER: we should have been able to do this by the time we called setUpperAndLowerElements, but for some reason the \"bottom\" element seems to be set as a side effect of setting the X spacing.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup) {\n\t\t\tabcLine.staffGroup.setHeight();\n\t\t}\n\t}\n\treturn maxWidth;\n}\n// Do the x-axis positioning for a single line (a group of related staffs)\nvar setXSpacing = function (renderer, width, space, staffGroup, formatting, isLastLine, debug) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar newspace = space;\n\t//dumpGroup(\"before\", staffGroup)\n\tfor (var it = 0; it < 8; it++) { // TODO-PER: shouldn't need multiple passes, but each pass gets it closer to the right spacing. (Only affects long lines: normal lines break out of this loop quickly.)\n\t\t// console.log(\"iteration\", it)\n\t\tvar ret = layoutStaffGroup(newspace, renderer.minPadding, debug, staffGroup, leftEdge);\n\t\tnewspace = calcHorizontalSpacing(isLastLine, formatting.stretchlast, width + renderer.padding.left, staffGroup.w, newspace, ret.spacingUnits, ret.minSpace, renderer.padding.left + renderer.padding.right);\n\t\tif (debug)\n\t\t\tconsole.log(\"setXSpace\", it, staffGroup.w, newspace, staffGroup.minspace);\n\t\tif (newspace === null) break;\n\t}\n\t//dumpGroup(\"after\",staffGroup)\n\tcenterWholeRests(staffGroup.voices);\n\treturn staffGroup.w - leftEdge\n};\n\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'parent') {\n\t\treturn 'parent';\n\t}\n\tif (key === 'beam') {\n\t\treturn 'beam';\n\t}\n\treturn value;\n}\n\nfunction dumpGroup(label, staffGroup) {\n\tconsole.log(\"=================== \" + label + \" =========================\")\n\tconsole.log(staffGroup)\n\tconsole.log(JSON.stringify(staffGroup, replacer, \"\\t\"))\n}\n\nfunction calcHorizontalSpacing(isLastLine, stretchLast, targetWidth, lineWidth, spacing, spacingUnits, minSpace, padding) {\n\tif (isLastLine) {\n\t\tif (stretchLast === undefined) {\n\t\t\tif (lineWidth / targetWidth < 0.66) return null; // keep this for backward compatibility. The break isn't quite the same for some reason.\n\t\t} else {\n\t\t\t// \"Stretch the last music line of a tune when it lacks less than the float fraction of the page width.\"\n\t\t\tvar lack = 1 - (lineWidth + padding) / targetWidth;\n\t\t\tvar stretch = lack < stretchLast;\n\t\t\tif (!stretch) return null; // don't stretch last line too much\n\t\t}\n\t}\n\tif (Math.abs(targetWidth - lineWidth) < 2) return null; // if we are already near the target width, we're done.\n\tvar relSpace = spacingUnits * spacing;\n\tvar constSpace = lineWidth - relSpace;\n\tif (spacingUnits > 0) {\n\t\tspacing = (targetWidth - constSpace) / spacingUnits;\n\t\tif (spacing * minSpace > 50) {\n\t\t\tspacing = 50 / minSpace;\n\t\t}\n\t\treturn spacing;\n\t}\n\treturn null;\n}\n\nfunction centerWholeRests(voices) {\n\t// whole rests are a special case: if they are by themselves in a measure, then they should be centered.\n\t// (If they are not by themselves, that is probably a user error, but we'll just center it between the two items to either side of it.)\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar voice = voices[i];\n\t\t// Look through all of the elements except for the first and last. If the whole note appears there then there isn't anything to center it between anyway.\n\t\tfor (var j = 1; j < voice.children.length - 1; j++) {\n\t\t\tvar absElem = voice.children[j];\n\t\t\tif (absElem.abcelem.rest && (absElem.abcelem.rest.type === 'whole' || absElem.abcelem.rest.type === 'multimeasure')) {\n\t\t\t\tvar before = voice.children[j - 1];\n\t\t\t\tvar after = voice.children[j + 1];\n\t\t\t\tabsElem.center(before, after);\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = layout;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/layout.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/set-upper-and-lower-elements.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/set-upper-and-lower-elements.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var spacing = __webpack_require__(/*! ../helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\n\nvar setUpperAndLowerElements = function (renderer, staffGroup) {\n\t// Each staff already has the top and bottom set, now we see if there are elements that are always on top and bottom, and resolve their pitch.\n\t// Also, get the overall height of all the staves in this group.\n\tvar lastStaffBottom;\n\tfor (var i = 0; i < staffGroup.staffs.length; i++) {\n\t\tvar staff = staffGroup.staffs[i];\n\t\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\t\tvar positionY = {\n\t\t\ttempoHeightAbove: 0,\n\t\t\tpartHeightAbove: 0,\n\t\t\tvolumeHeightAbove: 0,\n\t\t\tdynamicHeightAbove: 0,\n\t\t\tendingHeightAbove: 0,\n\t\t\tchordHeightAbove: 0,\n\t\t\tlyricHeightAbove: 0,\n\n\t\t\tlyricHeightBelow: 0,\n\t\t\tchordHeightBelow: 0,\n\t\t\tvolumeHeightBelow: 0,\n\t\t\tdynamicHeightBelow: 0\n\t\t};\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0) {\n\t\t\tstaff.originalTop = staff.top; // This is just being stored for debugging purposes.\n\t\t\tstaff.originalBottom = staff.bottom; // This is just being stored for debugging purposes.\n\t\t}\n\n\t\tincTop(staff, positionY, 'lyricHeightAbove');\n\t\tincTop(staff, positionY, 'chordHeightAbove', staff.specialY.chordLines.above);\n\t\tif (staff.specialY.endingHeightAbove) {\n\t\t\tif (staff.specialY.chordHeightAbove)\n\t\t\t\tstaff.top += 2;\n\t\t\telse\n\t\t\t\tstaff.top += staff.specialY.endingHeightAbove + margin;\n\t\t\tpositionY.endingHeightAbove = staff.top;\n\t\t}\n\t\tif (staff.specialY.dynamicHeightAbove && staff.specialY.volumeHeightAbove) {\n\t\t\tstaff.top += Math.max(staff.specialY.dynamicHeightAbove, staff.specialY.volumeHeightAbove) + margin;\n\t\t\tpositionY.dynamicHeightAbove = staff.top;\n\t\t\tpositionY.volumeHeightAbove = staff.top;\n\t\t} else {\n\t\t\tincTop(staff, positionY, 'dynamicHeightAbove');\n\t\t\tincTop(staff, positionY, 'volumeHeightAbove');\n\t\t}\n\t\tincTop(staff, positionY, 'partHeightAbove');\n\t\tincTop(staff, positionY, 'tempoHeightAbove');\n\n\t\tif (staff.specialY.lyricHeightBelow) {\n\t\t\tstaff.specialY.lyricHeightBelow += renderer.spacing.vocal / spacing.STEP;\n\t\t\tpositionY.lyricHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (staff.specialY.lyricHeightBelow + margin);\n\t\t}\n\t\tif (staff.specialY.chordHeightBelow) {\n\t\t\tpositionY.chordHeightBelow = staff.bottom;\n\t\t\tvar hgt = staff.specialY.chordHeightBelow;\n\t\t\tif (staff.specialY.chordLines.below)\n\t\t\t\thgt *= staff.specialY.chordLines.below;\n\t\t\tstaff.bottom -= (hgt + margin);\n\t\t}\n\t\tif (staff.specialY.volumeHeightBelow && staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom;\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (Math.max(staff.specialY.volumeHeightBelow, staff.specialY.dynamicHeightBelow) + margin);\n\t\t} else if (staff.specialY.volumeHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.volumeHeightBelow + margin);\n\t\t} else if (staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.dynamicHeightBelow + margin);\n\t\t}\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0)\n\t\t\tstaff.positionY = positionY; // This is just being stored for debugging purposes.\n\n\t\tfor (var j = 0; j < staff.voices.length; j++) {\n\t\t\tvar voice = staffGroup.voices[staff.voices[j]];\n\t\t\tsetUpperAndLowerVoiceElements(positionY, voice, renderer.spacing);\n\t\t}\n\t\t// We might need a little space in between staves if the staves haven't been pushed far enough apart by notes or extra vertical stuff.\n\t\t// Only try to put in extra space if this isn't the top staff.\n\t\tif (lastStaffBottom !== undefined) {\n\t\t\tvar thisStaffTop = staff.top - 10;\n\t\t\tvar forcedSpacingBetween = lastStaffBottom + thisStaffTop;\n\t\t\tvar minSpacingInPitches = renderer.spacing.systemStaffSeparation / spacing.STEP;\n\t\t\tvar addedSpace = minSpacingInPitches - forcedSpacingBetween;\n\t\t\tif (addedSpace > 0)\n\t\t\t\tstaff.top += addedSpace;\n\t\t}\n\t\tstaff.top += renderer.spacing.staffTopMargin / spacing.STEP\n\n\t\tlastStaffBottom = 2 - staff.bottom; // the staff starts at position 2 and the bottom variable is negative. Therefore to find out how large the bottom is, we reverse the sign of the bottom, and add the 2 in.\n\n\t\t// Now we need a little margin on the top, so we'll just throw that in.\n\t\t//staff.top += 4;\n\t\t//console.log(\"Staff Y: \",i,heightInPitches,staff.top,staff.bottom);\n\t}\n\t//console.log(\"Staff Height: \",heightInPitches,this.height);\n};\n\nvar margin = 1;\nfunction incTop(staff, positionY, item, count) {\n\tif (staff.specialY[item]) {\n\t\tvar height = staff.specialY[item];\n\t\tif (count)\n\t\t\theight *= count;\n\t\tstaff.top += height + margin;\n\t\tpositionY[item] = staff.top;\n\t}\n}\n\nfunction setUpperAndLowerVoiceElements(positionY, voice, spacing) {\n\tvar i;\n\tvar abselem;\n\tfor (i = 0; i < voice.children.length; i++) {\n\t\tabselem = voice.children[i];\n\t\tsetUpperAndLowerAbsoluteElements(positionY, abselem, spacing);\n\t}\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tabselem = voice.otherchildren[i];\n\t\tswitch (abselem.type) {\n\t\t\tcase 'CrescendoElem':\n\t\t\t\tsetUpperAndLowerCrescendoElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'DynamicDecoration':\n\t\t\t\tsetUpperAndLowerDynamicElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'EndingElem':\n\t\t\t\tsetUpperAndLowerEndingElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'TieElem':\n\t\t\t\t// If a tie element is the highest or lowest thing then space might need to make room for it.\n\t\t\t\tvar yBounds = abselem.getYBounds()\n\t\t\t\tvoice.staff.top = Math.max(voice.staff.top, yBounds[0])\n\t\t\t\tvoice.staff.top = Math.max(voice.staff.top, yBounds[1])\n\t\t\t\tvoice.staff.bottom = Math.min(voice.staff.bottom, yBounds[0])\n\t\t\t\tvoice.staff.bottom = Math.min(voice.staff.bottom, yBounds[1])\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// For each of the relative elements that can't be placed in advance (because their vertical placement depends on everything\n// else on the line), this iterates through them and sets their pitch. By the time this is called, specialYResolved contains a\n// hash with the vertical placement (in pitch units) for each type.\n// TODO-PER: I think this needs to be separated by \"above\" and \"below\". How do we know that for dynamics at the point where they are being defined, though? We need a pass through all the relative elements to set \"above\" and \"below\".\nfunction setUpperAndLowerAbsoluteElements(specialYResolved, element, spacing) {\n\t// specialYResolved contains the actual pitch for each of the classes of elements.\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar child = element.children[i];\n\t\tfor (var key in element.specialY) { // for each class of element that needs to be placed vertically\n\t\t\tif (element.specialY.hasOwnProperty(key)) {\n\t\t\t\tif (child[key]) { // If this relative element has defined a height for this class of element\n\t\t\t\t\tchild.pitch = specialYResolved[key];\n\t\t\t\t\tif (child.top === undefined) { // TODO-PER: HACK! Not sure this is the right place to do this.\n\t\t\t\t\t\tif (child.type === 'TempoElement') {\n\t\t\t\t\t\t\tsetUpperAndLowerTempoElement(specialYResolved, child);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetUpperAndLowerRelativeElements(specialYResolved, child, spacing);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement.pushTop(child.top);\n\t\t\t\t\t\telement.pushBottom(child.bottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerCrescendoElements(positionY, element) {\n\tif (element.dynamicHeightAbove)\n\t\telement.pitch = positionY.dynamicHeightAbove;\n\telse\n\t\telement.pitch = positionY.dynamicHeightBelow;\n}\n\nfunction setUpperAndLowerDynamicElements(positionY, element) {\n\tif (element.volumeHeightAbove)\n\t\telement.pitch = positionY.volumeHeightAbove;\n\telse\n\t\telement.pitch = positionY.volumeHeightBelow;\n}\n\nfunction setUpperAndLowerEndingElements(positionY, element) {\n\telement.pitch = positionY.endingHeightAbove - 2;\n}\n\nfunction setUpperAndLowerTempoElement(positionY, element) {\n\telement.pitch = positionY.tempoHeightAbove;\n\telement.top = positionY.tempoHeightAbove;\n\telement.bottom = positionY.tempoHeightAbove;\n\tif (element.note) {\n\t\tvar tempoPitch = element.pitch - element.totalHeightInPitches + 1; // The pitch we receive is the top of the allotted area: change that to practically the bottom.\n\t\telement.note.top = tempoPitch;\n\t\telement.note.bottom = tempoPitch;\n\t\tfor (var i = 0; i < element.note.children.length; i++) {\n\t\t\tvar child = element.note.children[i];\n\t\t\tchild.top += tempoPitch;\n\t\t\tchild.bottom += tempoPitch;\n\t\t\tchild.pitch += tempoPitch;\n\t\t\tif (child.pitch2 !== undefined)\n\t\t\t\tchild.pitch2 += tempoPitch;\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerRelativeElements(positionY, element, renderSpacing) {\n\tswitch (element.type) {\n\t\tcase \"part\":\n\t\t\telement.top = positionY.partHeightAbove + element.height;\n\t\t\telement.bottom = positionY.partHeightAbove;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\tcase \"chord\":\n\t\t\tif (element.chordHeightAbove) {\n\t\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.chordHeightBelow;\n\t\t\t\telement.bottom = positionY.chordHeightBelow;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (element.lyricHeightAbove) {\n\t\t\t\telement.top = positionY.lyricHeightAbove;\n\t\t\t\telement.bottom = positionY.lyricHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.bottom = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.pitch -= renderSpacing.vocal / spacing.STEP;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\tbreak;\n\t}\n\tif (element.pitch === undefined || element.top === undefined)\n\t\tconsole.error(\"RelativeElement position not set.\", element.type, element.pitch, element.top, positionY);\n}\n\nmodule.exports = setUpperAndLowerElements;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/set-upper-and-lower-elements.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/staff-group.js":
/*!************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/staff-group.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var layoutVoiceElements = __webpack_require__(/*! ./voice-elements */ \"./node_modules/abcjs/src/write/layout/voice-elements.js\");\n\nfunction checkLastBarX(voices) {\n\tvar maxX = 0;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar curVoice = voices[i];\n\t\tif (curVoice.children.length > 0) {\n\t\t\tvar lastChild = curVoice.children.length - 1;\n\t\t\tvar maxChild = curVoice.children[lastChild];\n\t\t\tif (maxChild.abcelem.el_type === 'bar') {\n\t\t\t\tvar barX = maxChild.children[0].x;\n\t\t\t\tif (barX > maxX) {\n\t\t\t\t\tmaxX = barX;\n\t\t\t\t} else {\n\t\t\t\t\tmaxChild.children[0].x = maxX;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvar layoutStaffGroup = function (spacing, minPadding, debug, staffGroup, leftEdge) {\n\tvar epsilon = 0.0000001; // Fudging for inexactness of floating point math.\n\tvar spacingunits = 0; // number of times we will have ended up using the spacing distance (as opposed to fixed width distances)\n\tvar minspace = 1000; // a big number to start off with - used to find out what the smallest space between two notes is -- GD 2014.1.7\n\n\tvar x = leftEdge;\n\tstaffGroup.startx = x;\n\tvar i;\n\n\tvar currentduration = 0;\n\tif (debug) console.log(\"init layout\", spacing);\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tlayoutVoiceElements.beginLayout(x, staffGroup.voices[i]);\n\t}\n\n\tvar spacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\twhile (!finished(staffGroup.voices)) {\n\t\t// find first duration level to be laid out among candidates across voices\n\t\tcurrentduration = null; // candidate smallest duration level\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tif (!layoutVoiceElements.layoutEnded(staffGroup.voices[i]) && (!currentduration || getDurationIndex(staffGroup.voices[i]) < currentduration))\n\t\t\t\tcurrentduration = getDurationIndex(staffGroup.voices[i]);\n\t\t}\n\n\n\t\t// isolate voices at current duration level\n\t\tvar currentvoices = [];\n\t\tvar othervoices = [];\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tvar durationIndex = getDurationIndex(staffGroup.voices[i]);\n\t\t\t// PER: Because of the inexactness of JS floating point math, we just get close.\n\t\t\tif (durationIndex - currentduration > epsilon) {\n\t\t\t\tothervoices.push(staffGroup.voices[i]);\n\t\t\t\t//console.log(\"out: voice \",i);\n\t\t\t} else {\n\t\t\t\tcurrentvoices.push(staffGroup.voices[i]);\n\t\t\t\t//if (debug) console.log(\"in: voice \",i);\n\t\t\t}\n\t\t}\n\n\t\t// among the current duration level find the one which needs starting furthest right\n\t\tspacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\t\tvar spacingduration = 0;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\t//console.log(\"greatest spacing unit\", x, layoutVoiceElements.getNextX(currentvoices[i]), layoutVoiceElements.getSpacingUnits(currentvoices[i]), currentvoices[i].spacingduration);\n\t\t\tif (layoutVoiceElements.getNextX(currentvoices[i]) > x) {\n\t\t\t\tx = layoutVoiceElements.getNextX(currentvoices[i]);\n\t\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(currentvoices[i]);\n\t\t\t\tspacingduration = currentvoices[i].spacingduration;\n\t\t\t}\n\t\t}\n\t\tspacingunits += spacingunit;\n\t\tminspace = Math.min(minspace, spacingunit);\n\t\tif (debug) console.log(\"currentduration: \", currentduration, spacingunits, minspace);\n\n\t\tvar lastTopVoice = undefined;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar v = currentvoices[i];\n\t\t\tif (v.voicenumber === 0)\n\t\t\t\tlastTopVoice = i;\n\t\t\tvar topVoice = (lastTopVoice !== undefined && currentvoices[lastTopVoice].voicenumber !== v.voicenumber) ? currentvoices[lastTopVoice] : undefined;\n\t\t\tif (!isSameStaff(v, topVoice))\n\t\t\t\ttopVoice = undefined;\n\t\t\tvar voicechildx = layoutVoiceElements.layoutOneItem(x, spacing, v, minPadding, topVoice);\n\t\t\tvar dx = voicechildx - x;\n\t\t\tif (dx > 0) {\n\t\t\t\tx = voicechildx; //update x\n\t\t\t\tfor (var j = 0; j < i; j++) { // shift over all previously laid out elements\n\t\t\t\t\tlayoutVoiceElements.shiftRight(dx, currentvoices[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove the value of already counted spacing units in other voices (e.g. if a voice had planned to use up 5 spacing units but is not in line to be laid out at this duration level - where we've used 2 spacing units - then we must use up 3 spacing units, not 5)\n\t\tfor (i = 0; i < othervoices.length; i++) {\n\t\t\tothervoices[i].spacingduration -= spacingduration;\n\t\t\tlayoutVoiceElements.updateNextX(x, spacing, othervoices[i]); // adjust other voices expectations\n\t\t}\n\n\t\t// update indexes of currently laid out elems\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar voice = currentvoices[i];\n\t\t\tlayoutVoiceElements.updateIndices(voice);\n\t\t}\n\t} // finished laying out\n\n\n\t// find the greatest remaining x as a base for the width\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tif (layoutVoiceElements.getNextX(staffGroup.voices[i]) > x) {\n\t\t\tx = layoutVoiceElements.getNextX(staffGroup.voices[i]);\n\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(staffGroup.voices[i]);\n\t\t}\n\t}\n\n\t// adjust lastBar when needed (multi staves)\n\tcheckLastBarX(staffGroup.voices);\n\t//console.log(\"greatest remaining\",spacingunit,x);\n\tspacingunits += spacingunit;\n\tstaffGroup.setWidth(x);\n\n\treturn { spacingUnits: spacingunits, minSpace: minspace };\n};\n\n\nfunction finished(voices) {\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tif (!layoutVoiceElements.layoutEnded(voices[i])) return false;\n\t}\n\treturn true;\n}\n\nfunction getDurationIndex(element) {\n\treturn element.durationindex - (element.children[element.i] && (element.children[element.i].duration > 0) ? 0 : 0.0000005); // if the ith element doesn't have a duration (is not a note), its duration index is fractionally before. This enables CLEF KEYSIG TIMESIG PART, etc. to be laid out before we get to the first note of other voices\n}\n\nfunction isSameStaff(voice1, voice2) {\n\tif (!voice1 || !voice1.staff || !voice1.staff.voices || voice1.staff.voices.length === 0)\n\t\treturn false;\n\tif (!voice2 || !voice2.staff || !voice2.staff.voices || voice2.staff.voices.length === 0)\n\t\treturn false;\n\treturn (voice1.staff.voices[0] === voice2.staff.voices[0]);\n}\n\nmodule.exports = layoutStaffGroup;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/staff-group.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/triplet.js":
/*!********************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/triplet.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getBarYAt = __webpack_require__(/*! ./get-bar-y-at */ \"./node_modules/abcjs/src/write/layout/get-bar-y-at.js\");\n\nfunction layoutTriplet(element) {\n\t// TODO end and beginning of line (PER: P.S. I'm not sure this can happen: I think the parser will always specify both the start and end points.)\n\tif (element.anchor1 && element.anchor2) {\n\t\telement.hasBeam = !!element.anchor1.parent.beam && element.anchor1.parent.beam === element.anchor2.parent.beam;\n\t\tvar beam = element.anchor1.parent.beam;\n\t\t// if hasBeam is true, then the first and last element in the triplet have the same beam.\n\t\t// We also need to check if the beam doesn't contain other notes so that `(3 dcdcc` will do a bracket.\n\t\tif (element.hasBeam && (beam.elems[0] !== element.anchor1.parent || beam.elems[beam.elems.length - 1] !== element.anchor2.parent))\n\t\t\telement.hasBeam = false;\n\n\t\tif (element.hasBeam) {\n\t\t\t// If there is a beam then we don't need to draw anything except the text. The beam could either be above or below.\n\t\t\tvar left = isAbove(beam) ? element.anchor1.x + element.anchor1.w : element.anchor1.x;\n\t\t\telement.yTextPos = heightAtMidpoint(left, element.anchor2.x, beam);\n\t\t\telement.yTextPos += isAbove(beam) ? 3 : -2; // This creates some space between the beam and the number.\n\t\t\telement.xTextPos = xAtMidpoint(left, element.anchor2.x);\n\t\t\telement.top = element.yTextPos + 1;\n\t\t\telement.bottom = element.yTextPos - 2;\n\t\t\tif (isAbove(beam))\n\t\t\t\telement.endingHeightAbove = 4;\n\t\t} else {\n\t\t\t// If there isn't a beam, then we need to draw the bracket and the text. The bracket is always above.\n\t\t\t// The bracket is never lower than the 'a' line, but is 4 pitches above the first and last notes. If there is\n\t\t\t// a tall note in the middle, the bracket is horizontal and above the highest note.\n\t\t\telement.startNote = Math.max(element.anchor1.parent.top, 9) + 4;\n\t\t\telement.endNote = Math.max(element.anchor2.parent.top, 9) + 4;\n\t\t\t// If it starts or ends on a rest, make the beam horizontal\n\t\t\tif (element.anchor1.parent.type === \"rest\" && element.anchor2.parent.type !== \"rest\")\n\t\t\t\telement.startNote = element.endNote;\n\t\t\telse if (element.anchor2.parent.type === \"rest\" && element.anchor1.parent.type !== \"rest\")\n\t\t\t\telement.endNote = element.startNote;\n\t\t\t// See if the middle note is really high.\n\t\t\tvar max = 0;\n\t\t\tfor (var i = 0; i < element.middleElems.length; i++) {\n\t\t\t\tmax = Math.max(max, element.middleElems[i].top);\n\t\t\t}\n\t\t\tmax += 4;\n\t\t\tif (max > element.startNote || max > element.endNote) {\n\t\t\t\telement.startNote = max;\n\t\t\t\telement.endNote = max;\n\t\t\t}\n\t\t\tif (element.flatBeams) {\n\t\t\t\telement.startNote = Math.max(element.startNote, element.endNote);\n\t\t\t\telement.endNote = Math.max(element.startNote, element.endNote);\n\t\t\t}\n\n\t\t\telement.yTextPos = element.startNote + (element.endNote - element.startNote) / 2;\n\t\t\telement.xTextPos = element.anchor1.x + (element.anchor2.x + element.anchor2.w - element.anchor1.x) / 2;\n\t\t\telement.top = element.yTextPos + 1;\n\t\t}\n\t}\n\tdelete element.middleElems;\n\tdelete element.flatBeams;\n}\n\nfunction isAbove(beam) {\n\treturn beam.stemsUp;\n}\n\n// We can't just use the entire beam for the calculation. The range has to be passed in, because the beam might extend into some unrelated notes. for instance, (3_a'f'e'f'2 when L:16\nfunction heightAtMidpoint(startX, endX, beam) {\n\tif (beam.beams.length === 0)\n\t\treturn 0;\n\tbeam = beam.beams[0];\n\tvar midPoint = startX + (endX - startX) / 2;\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, midPoint);\n}\n\nfunction xAtMidpoint(startX, endX) {\n\treturn startX + (endX - startX) / 2;\n}\n\nmodule.exports = layoutTriplet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/triplet.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/voice-elements.js":
/*!***************************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/voice-elements.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var VoiceElement = function VoiceElements() { }\n\nVoiceElement.beginLayout = function (startx, voice) {\n\tvoice.i = 0;\n\tvoice.durationindex = 0;\n\t//this.ii=this.children.length;\n\tvoice.startx = startx;\n\tvoice.minx = startx; // furthest left to where negatively positioned elements are allowed to go\n\tvoice.nextx = startx; // x position where the next element of this voice should be placed assuming no other voices and no fixed width constraints\n\tvoice.spacingduration = 0; // duration left to be laid out in current iteration (omitting additional spacing due to other aspects, such as bars, dots, sharps and flats)\n};\n\nVoiceElement.layoutEnded = function (voice) {\n\treturn (voice.i >= voice.children.length);\n};\n\nVoiceElement.getNextX = function (voice) {\n\treturn Math.max(voice.minx, voice.nextx);\n};\n\n// number of spacing units expected for next positioning\nVoiceElement.getSpacingUnits = function (voice) {\n\treturn Math.sqrt(voice.spacingduration * 8);\n};\n\n// Try to layout the element at index this.i\n// x - position to try to layout the element at\n// spacing - base spacing\n// can't call this function more than once per iteration\nVoiceElement.layoutOneItem = function (x, spacing, voice, minPadding, firstVoice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return 0;\n\tvar er = x - voice.minx; // available extrawidth to the left\n\tvar pad = voice.durationindex + child.duration > 0 ? minPadding : 0; // only add padding to the items that aren't fixed to the left edge.\n\t// See if this item overlaps the item in the first voice. If firstVoice is undefined then there's nothing to compare.\n\tif (child.abcelem.el_type === \"note\" && !child.abcelem.rest && voice.voicenumber !== 0 && firstVoice) {\n\t\tvar firstChild = firstVoice.children[firstVoice.i];\n\t\t// It overlaps if the either the child's top or bottom is inside the firstChild's or at least within 1\n\t\t// A special case is if the element is on the same line then it can share a note head, if the notehead is the same\n\t\tvar overlaps = firstChild &&\n\t\t\t((child.abcelem.maxpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.maxpitch >= firstChild.abcelem.minpitch - 1) ||\n\t\t\t\t(child.abcelem.minpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.minpitch >= firstChild.abcelem.minpitch - 1))\n\t\t// See if they can share a note head\n\t\tif (overlaps && child.abcelem.minpitch === firstChild.abcelem.minpitch && child.abcelem.maxpitch === firstChild.abcelem.maxpitch &&\n\t\t\tfirstChild.heads && firstChild.heads.length > 0 && child.heads && child.heads.length > 0 &&\n\t\t\tfirstChild.heads[0].c === child.heads[0].c)\n\t\t\toverlaps = false;\n\t\t// If this note overlaps the note in the first voice and we haven't moved the note yet (this can be called multiple times)\n\t\tif (overlaps) {\n\t\t\t// I think that firstChild should always have at least one note head, but defensively make sure.\n\t\t\t// There was a problem with this being called more than once so if a value is adjusted then it is saved so it is only adjusted once.\n\t\t\tvar firstChildNoteWidth = firstChild.heads && firstChild.heads.length > 0 ? firstChild.heads[0].realWidth : firstChild.fixed.w;\n\t\t\tif (!child.adjustedWidth)\n\t\t\t\tchild.adjustedWidth = firstChildNoteWidth + child.w;\n\t\t\tchild.w = child.adjustedWidth\n\t\t\tfor (var j = 0; j < child.children.length; j++) {\n\t\t\t\tvar relativeChild = child.children[j];\n\t\t\t\tif (relativeChild.name.indexOf(\"accidental\") < 0) {\n\t\t\t\t\tif (!relativeChild.adjustedWidth)\n\t\t\t\t\t\trelativeChild.adjustedWidth = relativeChild.dx + firstChildNoteWidth;\n\t\t\t\t\trelativeChild.dx = relativeChild.adjustedWidth\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\tvar extraWidth = getExtraWidth(child, pad);\n\tif (er < extraWidth) { // shift right by needed amount\n\t\t// There's an exception if a bar element is after a Part element, there is no shift.\n\t\tif (voice.i === 0 || child.type !== 'bar' || (voice.children[voice.i - 1].type !== 'part' && voice.children[voice.i - 1].type !== 'tempo'))\n\t\t\tx += extraWidth - er;\n\t}\n\tchild.setX(x);\n\n\tvoice.spacingduration = child.duration;\n\t//update minx\n\tvoice.minx = x + getMinWidth(child); // add necessary layout space\n\tif (voice.i !== voice.children.length - 1) voice.minx += child.minspacing; // add minimumspacing except on last elem\n\n\tthis.updateNextX(x, spacing, voice);\n\n\t// contribute to staff y position\n\t//this.staff.top = Math.max(child.top,this.staff.top);\n\t//this.staff.bottom = Math.min(child.bottom,this.staff.bottom);\n\n\treturn x; // where we end up having placed the child\n};\n\nVoiceElement.shiftRight = function (dx, voice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return;\n\tchild.setX(child.x + dx);\n\tvoice.minx += dx;\n\tvoice.nextx += dx;\n};\n\n// call when spacingduration has been updated\nVoiceElement.updateNextX = function (x, spacing, voice) {\n\tvoice.nextx = x + (spacing * this.getSpacingUnits(voice));\n};\n\nVoiceElement.updateIndices = function (voice) {\n\tif (!this.layoutEnded(voice)) {\n\t\tvoice.durationindex += voice.children[voice.i].duration;\n\t\tif (voice.children[voice.i].type === 'bar') voice.durationindex = Math.round(voice.durationindex * 64) / 64; // everytime we meet a barline, do rounding to nearest 64th\n\t\tvoice.i++;\n\t}\n};\n\nfunction getExtraWidth(child, minPadding) { // space needed to the left of the note\n\tvar padding = 0;\n\tif (child.type === 'note' || child.type === 'bar')\n\t\tpadding = minPadding;\n\treturn -child.extraw + padding;\n}\n\nfunction getMinWidth(child) { // absolute space taken to the right of the note\n\treturn child.w;\n}\n\nmodule.exports = VoiceElement;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/voice-elements.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/layout/voice.js":
/*!******************************************************!*\
  !*** ./node_modules/abcjs/src/write/layout/voice.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var layoutBeam = __webpack_require__(/*! ./beam */ \"./node_modules/abcjs/src/write/layout/beam.js\");\nvar getBarYAt = __webpack_require__(/*! ./get-bar-y-at */ \"./node_modules/abcjs/src/write/layout/get-bar-y-at.js\");\nvar layoutTriplet = __webpack_require__(/*! ./triplet */ \"./node_modules/abcjs/src/write/layout/triplet.js\");\n\nvar layoutVoice = function (voice) {\n\tfor (var i = 0; i < voice.beams.length; i++) {\n\t\tif (voice.beams[i].type === 'BeamElem') {\n\t\t\tlayoutBeam(voice.beams[i]);\n\t\t\tmoveDecorations(voice.beams[i]);\n\t\t\t// The above will change the top and bottom of the abselem children, so see if we need to expand our range.\n\t\t\tfor (var j = 0; j < voice.beams[i].elems.length; j++) {\n\t\t\t\tvoice.adjustRange(voice.beams[i].elems[j]);\n\t\t\t}\n\t\t}\n\t}\n\tvoice.staff.specialY.chordLines = setLaneForChord(voice.children);\n\n\t// Now we can layout the triplets\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tvar child = voice.otherchildren[i];\n\t\tif (child.type === 'TripletElem') {\n\t\t\tlayoutTriplet(child);\n\t\t\tvoice.adjustRange(child);\n\t\t}\n\t}\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n};\n\nfunction moveDecorations(beam) {\n\tvar padding = 1.5; // This is the vertical padding between elements, in pitches.\n\tfor (var ch = 0; ch < beam.elems.length; ch++) {\n\t\tvar child = beam.elems[ch];\n\t\tif (child.top) {\n\t\t\t// We now know where the ornaments should have been placed, so move them if they would overlap.\n\t\t\tvar top = yAtNote(child, beam);\n\t\t\tfor (var i = 0; i < child.children.length; i++) {\n\t\t\t\tvar el = child.children[i];\n\t\t\t\tif (el.klass === 'ornament' && el.position !== 'below') {\n\t\t\t\t\tif (el.bottom - padding < top) {\n\t\t\t\t\t\tvar distance = top - el.bottom + padding; // Find the distance that it needs to move and add a little margin so the element doesn't touch the beam.\n\t\t\t\t\t\tel.bottom += distance;\n\t\t\t\t\t\tel.top += distance;\n\t\t\t\t\t\tel.pitch += distance;\n\t\t\t\t\t\ttop = child.top = el.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction placeInLane(rightMost, relElem) {\n\t// These items are centered so figure the coordinates accordingly.\n\t// The font reports some extra space so the margin is built in.\n\tvar xCoords = relElem.getChordDim();\n\tif (xCoords) {\n\t\tfor (var i = 0; i < rightMost.length; i++) {\n\t\t\tvar fits = rightMost[i] < xCoords.left;\n\t\t\tif (fits) {\n\t\t\t\tif (i > 0)\n\t\t\t\t\trelElem.putChordInLane(i);\n\t\t\t\trightMost[i] = xCoords.right;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// If we didn't return early, then we need a new row\n\t\trightMost.push(xCoords.right);\n\t\trelElem.putChordInLane(rightMost.length - 1);\n\t}\n}\n\nfunction setLaneForChord(absElems) {\n\t// Criteria:\n\t// 1) lane numbers start from the bottom so that as many items as possible are in lane 0, closest to the music.\n\t// 2) a chord can have more than one line (for instance \"C\\nD\") each line is a lane.\n\t// 3) if two adjoining items would touch then push the second one to the next lane.\n\t// 4) use as many lanes as is necessary to get everything to not touch.\n\t// 5) leave a margin between items, so use another lane if the chords would have less than a character's width.\n\t// 6) if the chord only has one character, allow it to be closer than if the chord has more than one character.\n\tvar rightMostAbove = [0];\n\tvar rightMostBelow = [0];\n\tvar i;\n\tvar j;\n\tvar relElem;\n\tfor (i = 0; i < absElems.length; i++) {\n\t\tfor (j = 0; j < absElems[i].children.length; j++) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\tplaceInLane(rightMostAbove, relElem);\n\t\t\t}\n\t\t}\n\t\tfor (j = absElems[i].children.length - 1; j >= 0; j--) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightBelow) {\n\t\t\t\tplaceInLane(rightMostBelow, relElem);\n\t\t\t}\n\t\t}\n\t}\n\t// If we used a second line, then we need to go back and set the first lines.\n\t// Also we need to flip the indexes of the names so that we can count from the top line.\n\tif (rightMostAbove.length > 1 || rightMostBelow.length > 1)\n\t\tsetLane(absElems, rightMostAbove.length, rightMostBelow.length);\n\treturn { above: rightMostAbove.length, below: rightMostBelow.length };\n}\n\nfunction numAnnotationsBelow(absElem) {\n\tvar count = 0;\n\tfor (var j = 0; j < absElem.children.length; j++) {\n\t\tvar relElem = absElem.children[j];\n\t\tif (relElem.chordHeightBelow)\n\t\t\tcount++;\n\t}\n\treturn count;\n}\n\nfunction setLane(absElems, numLanesAbove, numLanesBelow) {\n\tfor (var i = 0; i < absElems.length; i++) {\n\t\tvar below = numAnnotationsBelow(absElems[i]);\n\t\tfor (var j = 0; j < absElems[i].children.length; j++) {\n\t\t\tvar relElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\trelElem.invertLane(numLanesAbove);\n\t\t\t\t// } else if (relElem.chordHeightBelow) {\n\t\t\t\t// \trelElem.invertLane(below);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction yAtNote(element, beam) {\n\tbeam = beam.beams[0];\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, element.x);\n}\n\n\nmodule.exports = layoutVoice;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/layout/voice.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/renderer.js":
/*!**************************************************!*\
  !*** ./node_modules/abcjs/src/write/renderer.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//    abc_renderer.js: API to render to SVG/Raphael/whatever rendering engine\n\n/*global Math */\n\nvar spacing = __webpack_require__(/*! ./helpers/spacing */ \"./node_modules/abcjs/src/write/helpers/spacing.js\");\nvar Svg = __webpack_require__(/*! ./svg */ \"./node_modules/abcjs/src/write/svg.js\");\n\n/**\n * Implements the API for rendering ABCJS Abstract Rendering Structure to a canvas/paper (e.g. SVG, Raphael, etc)\n * @param {Object} paper\n */\nvar Renderer = function (paper) {\n\tthis.paper = new Svg(paper);\n\tthis.controller = null;\n\n\tthis.space = 3 * spacing.SPACE;\n\tthis.padding = {}; // renderer's padding is managed by the controller\n\tthis.reset();\n\tthis.firefox112 = navigator.userAgent.indexOf('Firefox/112.0') >= 0\n};\n\nRenderer.prototype.reset = function () {\n\n\tthis.paper.clear();\n\tthis.y = 0;\n\tthis.abctune = null;\n\tthis.path = null;\n\tthis.isPrint = false;\n\tthis.lineThickness = 0;\n\tthis.initVerticalSpace();\n};\n\nRenderer.prototype.newTune = function (abcTune) {\n\tthis.abctune = abcTune; // TODO-PER: this is just to get the font info.\n\tthis.setVerticalSpace(abcTune.formatting);\n\t//this.measureNumber = null;\n\t//this.noteNumber = null;\n\tthis.isPrint = abcTune.media === 'print';\n\tthis.setPadding(abcTune);\n};\n\nRenderer.prototype.setLineThickness = function (lineThickness) {\n\tthis.lineThickness = lineThickness\n};\n\nRenderer.prototype.setPaddingOverride = function (params) {\n\tthis.paddingOverride = {\n\t\ttop: params.paddingtop, bottom: params.paddingbottom,\n\t\tright: params.paddingright, left: params.paddingleft\n\t};\n};\n\nRenderer.prototype.setPadding = function (abctune) {\n\t// If the padding is set in the tune, then use that.\n\t// Otherwise, if the padding is set in the override, use that.\n\t// Otherwise, use the defaults (there are a different set of defaults for screen and print.)\n\tfunction setPaddingVariable(self, paddingKey, formattingKey, printDefault, screenDefault) {\n\t\tif (abctune.formatting[formattingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = abctune.formatting[formattingKey];\n\t\telse if (self.paddingOverride[paddingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = self.paddingOverride[paddingKey];\n\t\telse if (self.isPrint)\n\t\t\tself.padding[paddingKey] = printDefault;\n\t\telse\n\t\t\tself.padding[paddingKey] = screenDefault;\n\t}\n\t// 1cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 38px\n\t// 1.8cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 68px\n\tsetPaddingVariable(this, 'top', 'topmargin', 38, 15);\n\tsetPaddingVariable(this, 'bottom', 'botmargin', 38, 15);\n\tsetPaddingVariable(this, 'left', 'leftmargin', 68, 15);\n\tsetPaddingVariable(this, 'right', 'rightmargin', 68, 15);\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n * @param {float} scale\n */\nRenderer.prototype.adjustNonScaledItems = function (scale) {\n\tthis.padding.top /= scale;\n\tthis.padding.bottom /= scale;\n\tthis.padding.left /= scale;\n\tthis.padding.right /= scale;\n\tthis.abctune.formatting.headerfont.size /= scale;\n\tthis.abctune.formatting.footerfont.size /= scale;\n};\n\n/**\n * Set the the values for all the configurable vertical space options.\n */\nRenderer.prototype.initVerticalSpace = function () {\n\t// conversion: 37.7953 = conversion factor for cm to px.\n\t// All of the following values are in px.\n\tthis.spacing = {\n\t\tcomposer: 7.56, // Set the vertical space above the composer.\n\t\tgraceBefore: 8.67, // Define the space before, inside and after the grace notes.\n\t\tgraceInside: 10.67,\n\t\tgraceAfter: 16,\n\t\tinfo: 0, // Set the vertical space above the infoline.\n\t\tlineSkipFactor: 1.1, // Set the factor for spacing between lines of text. (multiply this by the font size)\n\t\tmusic: 7.56, // Set the vertical space above the first staff.\n\t\tparagraphSkipFactor: 0.4, // Set the factor for spacing between text paragraphs. (multiply this by the font size)\n\t\tparts: 11.33, // Set the vertical space above a new part.\n\t\tslurHeight: 1.0, // Set the slur height factor.\n\t\tstaffSeparation: 61.33, // Do not put a staff system closer than <unit> from the previous system.\n\t\tstaffTopMargin: 0,\n\t\tstemHeight: 26.67 + 10, // Set the stem height.\n\t\tsubtitle: 3.78, // Set the vertical space above the subtitle.\n\t\tsystemStaffSeparation: 48, // Do not place the staves closer than <unit> inside a system. * This values applies to all staves when in the tune header. Otherwise, it applies to the next staff\n\t\ttext: 18.9, // Set the vertical space above the history.\n\t\ttitle: 7.56, // Set the vertical space above the title.\n\t\ttop: 30.24, //Set the vertical space above the tunes and on the top of the continuation pages.\n\t\tvocal: 0, // Set the vertical space above the lyrics under the staves.\n\t\twords: 0 // Set the vertical space above the lyrics at the end of the tune.\n\t};\n\t/*\n\tTODO-PER: Handle the x-coordinate spacing items, too.\nmaxshrink <float>Default: 0.65\nSet how much to compress horizontally when music line breaks\nare automatic.\n<float> must be between 0 (natural spacing)\nand 1 (max shrinking).\n\n// This next value is used to compute the natural spacing of\n// the notes. The base spacing of the crotchet is always\n// 40 pts. When the duration of a note type is twice the\n// duration of an other note type, its spacing is multiplied\n// by this factor.\n// The default value causes the note spacing to be multiplied\n// by 2 when its duration is multiplied by 4, i.e. the\n// space of the semibreve is 80 pts and the space of the\n// semiquaver is 20 pts.\n// Setting this value to 1 sets all note spacing to 40 pts.\nnoteSpacingFactor: 1.414, // Set the note spacing factor to <float> (range 1..2).\n\nscale <float> Default: 0.75 Set the page scale factor. Note that the header and footer are not scaled.\n\nstretchlast <float>Default: 0.8\nStretch the last music line of a tune when it exceeds\nthe <float> fraction of the page width.\n<float> range is 0.0 to 1.0.\n\t */\n};\n\nRenderer.prototype.setVerticalSpace = function (formatting) {\n\t// conversion from pts to px 4/3\n\tif (formatting.staffsep !== undefined)\n\t\tthis.spacing.staffSeparation = formatting.staffsep * 4 / 3;\n\tif (formatting.composerspace !== undefined)\n\t\tthis.spacing.composer = formatting.composerspace * 4 / 3;\n\tif (formatting.partsspace !== undefined)\n\t\tthis.spacing.parts = formatting.partsspace * 4 / 3;\n\tif (formatting.textspace !== undefined)\n\t\tthis.spacing.text = formatting.textspace * 4 / 3;\n\tif (formatting.musicspace !== undefined)\n\t\tthis.spacing.music = formatting.musicspace * 4 / 3;\n\tif (formatting.titlespace !== undefined)\n\t\tthis.spacing.title = formatting.titlespace * 4 / 3;\n\tif (formatting.sysstaffsep !== undefined)\n\t\tthis.spacing.systemStaffSeparation = formatting.sysstaffsep * 4 / 3;\n\tif (formatting.stafftopmargin !== undefined)\n\t\tthis.spacing.staffTopMargin = formatting.stafftopmargin * 4 / 3;\n\tif (formatting.subtitlespace !== undefined)\n\t\tthis.spacing.subtitle = formatting.subtitlespace * 4 / 3;\n\tif (formatting.topspace !== undefined)\n\t\tthis.spacing.top = formatting.topspace * 4 / 3;\n\tif (formatting.vocalspace !== undefined)\n\t\tthis.spacing.vocal = formatting.vocalspace * 4 / 3;\n\tif (formatting.wordsspace !== undefined)\n\t\tthis.spacing.words = formatting.wordsspace * 4 / 3;\n};\n\n\n/**\n * Calculates the y for a given pitch value (relative to the stave the renderer is currently printing)\n * @param {number} ofs pitch value (bottom C on a G clef = 0, D=1, etc.)\n */\nRenderer.prototype.calcY = function (ofs) {\n\treturn this.y - ofs * spacing.STEP;\n};\n\nRenderer.prototype.moveY = function (em, numLines) {\n\tif (numLines === undefined) numLines = 1;\n\tthis.y += em * numLines;\n};\n\nRenderer.prototype.absolutemoveY = function (y) {\n\tthis.y = y;\n};\n\nmodule.exports = Renderer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/renderer.js?");

/***/ }),

/***/ "./node_modules/abcjs/src/write/svg.js":
/*!*********************************************!*\
  !*** ./node_modules/abcjs/src/write/svg.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("//    abc_voice_element.js: Definition of the VoiceElement class.\n\n/*global module */\n\nvar svgNS = \"http://www.w3.org/2000/svg\";\n\nfunction Svg(wrapper) {\n\tthis.svg = createSvg();\n\tthis.currentGroup = [];\n\twrapper.appendChild(this.svg);\n}\n\nSvg.prototype.clear = function () {\n\tif (this.svg) {\n\t\tvar wrapper = this.svg.parentNode;\n\t\tthis.svg = createSvg();\n\t\tthis.currentGroup = [];\n\t\tif (wrapper) {\n\t\t\t// TODO-PER: If the wrapper is not present, then the underlying div was pulled out from under this instance. It's possible that is still useful (for creating the music off page?)\n\t\t\twrapper.innerHTML = \"\";\n\t\t\twrapper.appendChild(this.svg);\n\t\t}\n\t}\n};\n\nSvg.prototype.setTitle = function (title) {\n\tvar titleEl = document.createElement(\"title\");\n\tvar titleNode = document.createTextNode(title);\n\ttitleEl.appendChild(titleNode);\n\tthis.svg.insertBefore(titleEl, this.svg.firstChild);\n};\n\nSvg.prototype.setResponsiveWidth = function (w, h) {\n\t// this technique is from: http://thenewcode.com/744/Make-SVG-Responsive, thx to https://github.com/iantresman\n\tthis.svg.setAttribute(\"viewBox\", \"0 0 \" + w + \" \" + h);\n\tthis.svg.setAttribute(\"preserveAspectRatio\", \"xMinYMin meet\");\n\tthis.svg.removeAttribute(\"height\");\n\tthis.svg.removeAttribute(\"width\");\n\tthis.svg.style['display'] = \"inline-block\";\n\tthis.svg.style['position'] = \"absolute\";\n\tthis.svg.style['top'] = \"0\";\n\tthis.svg.style['left'] = \"0\";\n\n\tif (this.svg.parentNode) {\n\t\tvar cls = this.svg.parentNode.getAttribute(\"class\");\n\t\tif (!cls)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", \"abcjs-container\");\n\t\telse if (cls.indexOf(\"abcjs-container\") < 0)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", cls + \" abcjs-container\");\n\t\tthis.svg.parentNode.style['display'] = \"inline-block\";\n\t\tthis.svg.parentNode.style['position'] = \"relative\";\n\t\tthis.svg.parentNode.style['width'] = \"100%\";\n\t\t// PER: I changed the padding from 100% to this through trial and error.\n\t\t// The example was using a square image, but this music might be either wider or taller.\n\t\tvar padding = h / w * 100;\n\t\tthis.svg.parentNode.style['padding-bottom'] = padding + \"%\";\n\t\tthis.svg.parentNode.style['vertical-align'] = \"middle\";\n\t\tthis.svg.parentNode.style['overflow'] = \"hidden\";\n\t}\n};\n\nSvg.prototype.setSize = function (w, h) {\n\tthis.svg.setAttribute('width', w);\n\tthis.svg.setAttribute('height', h);\n};\n\nSvg.prototype.setAttribute = function (attr, value) {\n\tthis.svg.setAttribute(attr, value);\n};\n\nSvg.prototype.setScale = function (scale) {\n\tif (scale !== 1) {\n\t\tthis.svg.style.transform = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-ms-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-webkit-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['transform-origin'] = \"0 0\";\n\t\tthis.svg.style['-ms-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-ms-transform-origin-y'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-y'] = \"0\";\n\t} else {\n\t\tthis.svg.style.transform = \"\";\n\t\tthis.svg.style['-ms-transform'] = \"\";\n\t\tthis.svg.style['-webkit-transform'] = \"\";\n\t}\n};\n\nSvg.prototype.insertStyles = function (styles) {\n\tvar el = document.createElementNS(svgNS, \"style\");\n\tel.textContent = styles;\n\tthis.svg.insertBefore(el, this.svg.firstChild); // prepend is not available on older browsers.\n\t//\tthis.svg.prepend(el);\n};\n\nSvg.prototype.setParentStyles = function (attr) {\n\t// This is needed to get the size right when there is scaling involved.\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (this.svg.parentNode)\n\t\t\t\tthis.svg.parentNode.style[key] = attr[key];\n\t\t}\n\t}\n\t// This is the last thing that gets called, so delete the temporary SVG if one was created\n\tif (this.dummySvg) {\n\t\tvar body = document.querySelector('body');\n\t\tbody.removeChild(this.dummySvg);\n\t\tthis.dummySvg = null;\n\t}\n\n};\n\nfunction constructHLine(x1, y1, x2) {\n\tvar len = x2 - x1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + len + ' ' + 0 +\n\t\t\" l \" + 0 + \" \" + 1 + \" \" +\n\t\t\" l \" + (-len) + \" \" + 0 + \" \" + \" z \";\n}\n\nfunction constructVLine(x1, y1, y2) {\n\tvar len = y2 - y1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + 0 + ' ' + len +\n\t\t\" l \" + 1 + \" \" + 0 + \" \" +\n\t\t\" l \" + 0 + \" \" + (-len) + \" \" + \" z \";\n}\n\nSvg.prototype.rect = function (attr) {\n\t// This uses path instead of rect so that it can be hollow and the color changes with \"fill\" instead of \"stroke\".\n\tvar lines = [];\n\tvar x1 = attr.x;\n\tvar y1 = attr.y;\n\tvar x2 = attr.x + attr.width;\n\tvar y2 = attr.y + attr.height;\n\tlines.push(constructHLine(x1, y1, x2));\n\tlines.push(constructHLine(x1, y2, x2));\n\tlines.push(constructVLine(x2, y1, y2));\n\tlines.push(constructVLine(x1, y2, y1));\n\n\treturn this.path({ path: lines.join(\" \"), stroke: \"none\", \"data-name\": attr[\"data-name\"] });\n};\n\nSvg.prototype.dottedLine = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tel.setAttribute(\"x1\", attr.x1);\n\tel.setAttribute(\"x2\", attr.x2);\n\tel.setAttribute(\"y1\", attr.y1);\n\tel.setAttribute(\"y2\", attr.y2);\n\tel.setAttribute(\"stroke\", attr.stroke);\n\tel.setAttribute(\"stroke-dasharray\", \"5,5\");\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.rectBeneath = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'rect');\n\tel.setAttribute(\"x\", attr.x);\n\tel.setAttribute(\"width\", attr.width);\n\tel.setAttribute(\"y\", attr.y);\n\tel.setAttribute(\"height\", attr.height);\n\tif (attr.stroke)\n\t\tel.setAttribute(\"stroke\", attr.stroke);\n\tif (attr['stroke-opacity'])\n\t\tel.setAttribute(\"stroke-opacity\", attr['stroke-opacity']);\n\tif (attr.fill)\n\t\tel.setAttribute(\"fill\", attr.fill);\n\tif (attr['fill-opacity'])\n\t\tel.setAttribute(\"fill-opacity\", attr['fill-opacity']);\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.text = function (text, attr, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttribute(key, attr[key]);\n\t\t}\n\t}\n\tvar lines = (\"\" + text).split(\"\\n\");\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = document.createElementNS(svgNS, 'tspan');\n\t\tline.setAttribute(\"x\", attr.x ? attr.x : 0);\n\t\tif (i !== 0)\n\t\t\tline.setAttribute(\"dy\", \"1.2em\");\n\t\tif (lines[i].indexOf(\"\\x03\") !== -1) {\n\t\t\tvar parts = lines[i].split('\\x03')\n\t\t\tline.textContent = parts[0];\n\t\t\tif (parts[1]) {\n\t\t\t\tvar ts2 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts2.setAttribute(\"dy\", \"-0.3em\");\n\t\t\t\tts2.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts2.textContent = parts[1];\n\t\t\t\tline.appendChild(ts2);\n\t\t\t}\n\t\t\tif (parts[2]) {\n\t\t\t\tvar dist = parts[1] ? \"0.4em\" : \"0.1em\";\n\t\t\t\tvar ts3 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts3.setAttribute(\"dy\", dist);\n\t\t\t\tts3.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts3.textContent = parts[2];\n\t\t\t\tline.appendChild(ts3);\n\t\t\t}\n\t\t} else\n\t\t\tline.textContent = lines[i];\n\t\tel.appendChild(line);\n\t}\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.richTextLine = function (phrases, x, y, klass, anchor, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tel.setAttribute(\"class\", klass);\n\tel.setAttribute(\"x\", x);\n\tel.setAttribute(\"y\", y);\n\tel.setAttribute(\"text-anchor\", anchor);\n\tel.setAttribute(\"dominant-baseline\", \"middle\");\n\n\tfor (var i = 0; i < phrases.length; i++) {\n\t\tvar phrase = phrases[i]\n\t\tvar tspan = document.createElementNS(svgNS, 'tspan');\n\t\tvar attrs = Object.keys(phrase.attrs)\n\t\tfor (var j = 0; j < attrs.length; j++) {\n\t\t\tvar value = phrase.attrs[attrs[j]]\n\t\t\tif (value !== '')\n\t\t\t\ttspan.setAttribute(attrs[j], value)\n\t\t}\n\t\ttspan.textContent = phrase.content;\n\n\t\tel.appendChild(tspan);\n\t}\n\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n}\n\nSvg.prototype.guessWidth = function (text, attr) {\n\tvar svg = this.createDummySvg();\n\tvar el = this.text(text, attr, svg);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height) // TODO-PER: I don't think this can happen unless there isn't a browser at all.\n\t\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t}\n\tsvg.removeChild(el);\n\treturn size;\n};\n\nSvg.prototype.createDummySvg = function () {\n\tif (!this.dummySvg) {\n\t\tthis.dummySvg = createSvg();\n\t\tvar styles = [\n\t\t\t\"display: block !important;\",\n\t\t\t\"height: 1px;\",\n\t\t\t\"width: 1px;\",\n\t\t\t\"position: absolute;\"\n\t\t];\n\t\tthis.dummySvg.setAttribute('style', styles.join(\"\"));\n\t\tvar body = document.querySelector('body');\n\t\tbody.appendChild(this.dummySvg);\n\t}\n\n\treturn this.dummySvg;\n};\n\nvar sizeCache = {};\n\nSvg.prototype.getTextSize = function (text, attr, el) {\n\tif (typeof text === 'number')\n\t\ttext = '' + text;\n\tif (!text || text.match(/^\\s+$/))\n\t\treturn { width: 0, height: 0 };\n\tvar key;\n\tif (text.length < 20) {\n\t\t// The short text tends to be repetitive and getBBox is really slow, so lets cache.\n\t\tkey = text + JSON.stringify(attr);\n\t\tif (sizeCache[key])\n\t\t\treturn sizeCache[key];\n\t}\n\tvar removeLater = !el;\n\tif (!el)\n\t\tel = this.text(text, attr);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height)\n\t\t\tsize = this.guessWidth(text, attr);\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = this.guessWidth(text, attr);\n\t}\n\tif (removeLater) {\n\t\tif (this.currentGroup.length > 0)\n\t\t\tthis.currentGroup[0].removeChild(el);\n\t\telse\n\t\t\tthis.svg.removeChild(el);\n\t}\n\tif (key)\n\t\tsizeCache[key] = size;\n\treturn size;\n};\n\nSvg.prototype.openGroup = function (options) {\n\toptions = options ? options : {};\n\tvar el = document.createElementNS(svgNS, \"g\");\n\tif (options.klass)\n\t\tel.setAttribute(\"class\", options.klass);\n\tif (options.fill)\n\t\tel.setAttribute(\"fill\", options.fill);\n\tif (options.stroke)\n\t\tel.setAttribute(\"stroke\", options.stroke);\n\tif (options['data-name'])\n\t\tel.setAttribute(\"data-name\", options['data-name']);\n\n\tif (options.prepend)\n\t\tthis.prepend(el);\n\telse\n\t\tthis.append(el);\n\tthis.currentGroup.unshift(el);\n\treturn el;\n};\n\nSvg.prototype.closeGroup = function () {\n\tvar g = this.currentGroup.shift();\n\tif (g && g.children.length === 0) {\n\t\t// If nothing was added to the group it is because all the elements were invisible. We don't need the group, then.\n\t\tg.parentElement.removeChild(g);\n\t\treturn null;\n\t}\n\treturn g;\n};\n\nSvg.prototype.path = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse if (attr[key] !== undefined)\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.pathToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.prepend(el);\n\treturn el;\n};\n\nSvg.prototype.lineToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tvar keys = Object.keys(attr)\n\tfor (var i = 0; i < keys.length; i++)\n\t\tel.setAttribute(keys[i], attr[keys[i]]);\n\tthis.prepend(el);\n\treturn el;\n};\n\n\nSvg.prototype.append = function (el) {\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.appendChild(el);\n};\n\nSvg.prototype.prepend = function (el) {\n\t// The entire group is prepended, so don't prepend the individual elements.\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.setAttributeOnElement = function (el, attr) {\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n};\n\nSvg.prototype.moveElementToChild = function (parent, child) {\n\tparent.appendChild(child);\n};\n\nfunction createSvg() {\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tsvg.setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xlink\", \"http://www.w3.org/1999/xlink\");\n\tsvg.setAttribute('role', 'img');    // for accessibility\n\tsvg.setAttribute('fill', 'currentColor');    // for automatically picking up dark mode and high contrast\n\tsvg.setAttribute('stroke', 'currentColor');    // for automatically picking up dark mode and high contrast\n\treturn svg;\n}\n\n\nmodule.exports = Svg;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/src/write/svg.js?");

/***/ }),

/***/ "./node_modules/abcjs/version.js":
/*!***************************************!*\
  !*** ./node_modules/abcjs/version.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var version = '6.4.4';\n\nmodule.exports = version;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/abcjs/version.js?");

/***/ }),

/***/ "./node_modules/after/index.js":
/*!*************************************!*\
  !*** ./node_modules/after/index.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = after\n\nfunction after(count, callback, err_cb) {\n    var bail = false\n    err_cb = err_cb || noop\n    proxy.count = count\n\n    return (count === 0) ? callback() : proxy\n\n    function proxy(err, result) {\n        if (proxy.count <= 0) {\n            throw new Error('after called too many times')\n        }\n        --proxy.count\n\n        // after first error, rest are passed to err_cb\n        if (err) {\n            bail = true\n            callback(err)\n            // future error callbacks will go to error handler\n            callback = err_cb\n        } else if (proxy.count === 0 && !bail) {\n            callback(null, result)\n        }\n    }\n}\n\nfunction noop() {}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/after/index.js?");

/***/ }),

/***/ "./node_modules/animate.css/animate.css":
/*!**********************************************!*\
  !*** ./node_modules/animate.css/animate.css ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/animate.css/animate.css?");

/***/ }),

/***/ "./node_modules/arraybuffer.slice/index.js":
/*!*************************************************!*\
  !*** ./node_modules/arraybuffer.slice/index.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * An abstraction for slicing an arraybuffer even when\n * ArrayBuffer.prototype.slice is not supported\n *\n * @api public\n */\n\nmodule.exports = function(arraybuffer, start, end) {\n  var bytes = arraybuffer.byteLength;\n  start = start || 0;\n  end = end || bytes;\n\n  if (arraybuffer.slice) { return arraybuffer.slice(start, end); }\n\n  if (start < 0) { start += bytes; }\n  if (end < 0) { end += bytes; }\n  if (end > bytes) { end = bytes; }\n\n  if (start >= bytes || start >= end || bytes === 0) {\n    return new ArrayBuffer(0);\n  }\n\n  var abv = new Uint8Array(arraybuffer);\n  var result = new Uint8Array(end - start);\n  for (var i = start, ii = 0; i < end; i++, ii++) {\n    result[ii] = abv[i];\n  }\n  return result.buffer;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/arraybuffer.slice/index.js?");

/***/ }),

/***/ "./node_modules/axios/index.js":
/*!*************************************!*\
  !*** ./node_modules/axios/index.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"./node_modules/axios/lib/axios.js\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/index.js?");

/***/ }),

/***/ "./node_modules/axios/lib/adapters/xhr.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/adapters/xhr.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"./node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    var requestData = config.data;\n    var requestHeaders = config.headers;\n\n    if (utils.isFormData(requestData)) {\n      delete requestHeaders['Content-Type']; // Let the browser set it\n    }\n\n    var request = new XMLHttpRequest();\n\n    // HTTP basic authentication\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n    }\n\n    var fullPath = buildFullPath(config.baseURL, config.url);\n    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n    // Set the request timeout in MS\n    request.timeout = config.timeout;\n\n    // Listen for ready state\n    request.onreadystatechange = function handleLoad() {\n      if (!request || request.readyState !== 4) {\n        return;\n      }\n\n      // The request errored out and we didn't get a response, this will be\n      // handled by onerror instead\n      // With one exception: request that using file: protocol, most browsers\n      // will return status as 0 even though it's a successful request\n      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n        return;\n      }\n\n      // Prepare the response\n      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n      var response = {\n        data: responseData,\n        status: request.status,\n        statusText: request.statusText,\n        headers: responseHeaders,\n        config: config,\n        request: request\n      };\n\n      settle(resolve, reject, response);\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle browser request cancellation (as opposed to a manual cancellation)\n    request.onabort = function handleAbort() {\n      if (!request) {\n        return;\n      }\n\n      reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(createError('Network Error', config, null, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n      if (config.timeoutErrorMessage) {\n        timeoutErrorMessage = config.timeoutErrorMessage;\n      }\n      reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Add xsrf header\n    // This is only done if running in a standard browser environment.\n    // Specifically not if we're in a web worker, or react-native.\n    if (utils.isStandardBrowserEnv()) {\n      var cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\n\n      // Add xsrf header\n      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n        cookies.read(config.xsrfCookieName) :\n        undefined;\n\n      if (xsrfValue) {\n        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n      }\n    }\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n          // Remove Content-Type if data is undefined\n          delete requestHeaders[key];\n        } else {\n          // Otherwise add header to the request\n          request.setRequestHeader(key, val);\n        }\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (!utils.isUndefined(config.withCredentials)) {\n      request.withCredentials = !!config.withCredentials;\n    }\n\n    // Add responseType to request if needed\n    if (config.responseType) {\n      try {\n        request.responseType = config.responseType;\n      } catch (e) {\n        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n        if (config.responseType !== 'json') {\n          throw e;\n        }\n      }\n    }\n\n    // Handle progress if needed\n    if (typeof config.onDownloadProgress === 'function') {\n      request.addEventListener('progress', config.onDownloadProgress);\n    }\n\n    // Not all browsers support upload events\n    if (typeof config.onUploadProgress === 'function' && request.upload) {\n      request.upload.addEventListener('progress', config.onUploadProgress);\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (!request) {\n          return;\n        }\n\n        request.abort();\n        reject(cancel);\n        // Clean up request\n        request = null;\n      });\n    }\n\n    if (requestData === undefined) {\n      requestData = null;\n    }\n\n    // Send the request\n    request.send(requestData);\n  });\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/adapters/xhr.js?");

/***/ }),

/***/ "./node_modules/axios/lib/axios.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/axios.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  var context = new Axios(defaultConfig);\n  var instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context);\n\n  // Copy context to instance\n  utils.extend(instance, context);\n\n  return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n  return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/axios.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/Cancel.js":
/*!*************************************************!*\
  !*** ./node_modules/axios/lib/cancel/Cancel.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n  this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n  return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/cancel/Cancel.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/CancelToken.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n  if (typeof executor !== 'function') {\n    throw new TypeError('executor must be a function.');\n  }\n\n  var resolvePromise;\n  this.promise = new Promise(function promiseExecutor(resolve) {\n    resolvePromise = resolve;\n  });\n\n  var token = this;\n  executor(function cancel(message) {\n    if (token.reason) {\n      // Cancellation has already been requested\n      return;\n    }\n\n    token.reason = new Cancel(message);\n    resolvePromise(token.reason);\n  });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n  if (this.reason) {\n    throw this.reason;\n  }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n  var cancel;\n  var token = new CancelToken(function executor(c) {\n    cancel = c;\n  });\n  return {\n    token: token,\n    cancel: cancel\n  };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/cancel/CancelToken.js?");

/***/ }),

/***/ "./node_modules/axios/lib/cancel/isCancel.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/cancel/isCancel.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/Axios.js":
/*!**********************************************!*\
  !*** ./node_modules/axios/lib/core/Axios.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n  this.defaults = instanceConfig;\n  this.interceptors = {\n    request: new InterceptorManager(),\n    response: new InterceptorManager()\n  };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n  /*eslint no-param-reassign:0*/\n  // Allow for axios('example/url'[, config]) a la fetch API\n  if (typeof config === 'string') {\n    config = arguments[1] || {};\n    config.url = arguments[0];\n  } else {\n    config = config || {};\n  }\n\n  config = mergeConfig(this.defaults, config);\n\n  // Set config.method\n  if (config.method) {\n    config.method = config.method.toLowerCase();\n  } else if (this.defaults.method) {\n    config.method = this.defaults.method.toLowerCase();\n  } else {\n    config.method = 'get';\n  }\n\n  // Hook up interceptors middleware\n  var chain = [dispatchRequest, undefined];\n  var promise = Promise.resolve(config);\n\n  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n    chain.unshift(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n    chain.push(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  while (chain.length) {\n    promise = promise.then(chain.shift(), chain.shift());\n  }\n\n  return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n  config = mergeConfig(this.defaults, config);\n  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, data, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url,\n      data: data\n    }));\n  };\n});\n\nmodule.exports = Axios;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/Axios.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/InterceptorManager.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n  this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n  this.handlers.push({\n    fulfilled: fulfilled,\n    rejected: rejected\n  });\n  return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n  if (this.handlers[id]) {\n    this.handlers[id] = null;\n  }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n  utils.forEach(this.handlers, function forEachHandler(h) {\n    if (h !== null) {\n      fn(h);\n    }\n  });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/InterceptorManager.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/buildFullPath.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/core/buildFullPath.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ \"./node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ \"./node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n  if (baseURL && !isAbsoluteURL(requestedURL)) {\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/buildFullPath.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/createError.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/core/createError.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"./node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n  var error = new Error(message);\n  return enhanceError(error, config, code, request, response);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/createError.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/dispatchRequest.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  // Ensure headers exist\n  config.headers = config.headers || {};\n\n  // Transform request data\n  config.data = transformData(\n    config.data,\n    config.headers,\n    config.transformRequest\n  );\n\n  // Flatten headers\n  config.headers = utils.merge(\n    config.headers.common || {},\n    config.headers[config.method] || {},\n    config.headers\n  );\n\n  utils.forEach(\n    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n    function cleanHeaderConfig(method) {\n      delete config.headers[method];\n    }\n  );\n\n  var adapter = config.adapter || defaults.adapter;\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData(\n      response.data,\n      response.headers,\n      config.transformResponse\n    );\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData(\n          reason.response.data,\n          reason.response.headers,\n          config.transformResponse\n        );\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/dispatchRequest.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/enhanceError.js":
/*!*****************************************************!*\
  !*** ./node_modules/axios/lib/core/enhanceError.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n  error.config = config;\n  if (code) {\n    error.code = code;\n  }\n\n  error.request = request;\n  error.response = response;\n  error.isAxiosError = true;\n\n  error.toJSON = function() {\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: this.config,\n      code: this.code\n    };\n  };\n  return error;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/enhanceError.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/mergeConfig.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/core/mergeConfig.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config2 = config2 || {};\n  var config = {};\n\n  var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n  var defaultToConfig2Keys = [\n    'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n    'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n    'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n    'httpsAgent', 'cancelToken', 'socketPath'\n  ];\n\n  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    }\n  });\n\n  utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n    if (utils.isObject(config2[prop])) {\n      config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n    } else if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (utils.isObject(config1[prop])) {\n      config[prop] = utils.deepMerge(config1[prop]);\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  var axiosKeys = valueFromConfig2Keys\n    .concat(mergeDeepPropertiesKeys)\n    .concat(defaultToConfig2Keys);\n\n  var otherKeys = Object\n    .keys(config2)\n    .filter(function filterAxiosKeys(key) {\n      return axiosKeys.indexOf(key) === -1;\n    });\n\n  utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  return config;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/mergeConfig.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/settle.js":
/*!***********************************************!*\
  !*** ./node_modules/axios/lib/core/settle.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"./node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n  var validateStatus = response.config.validateStatus;\n  if (!validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(createError(\n      'Request failed with status code ' + response.status,\n      response.config,\n      null,\n      response.request,\n      response\n    ));\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/settle.js?");

/***/ }),

/***/ "./node_modules/axios/lib/core/transformData.js":
/*!******************************************************!*\
  !*** ./node_modules/axios/lib/core/transformData.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n  /*eslint no-param-reassign:0*/\n  utils.forEach(fns, function transform(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/core/transformData.js?");

/***/ }),

/***/ "./node_modules/axios/lib/defaults.js":
/*!********************************************!*\
  !*** ./node_modules/axios/lib/defaults.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n  'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n    headers['Content-Type'] = value;\n  }\n}\n\nfunction getDefaultAdapter() {\n  var adapter;\n  if (typeof XMLHttpRequest !== 'undefined') {\n    // For browsers use XHR adapter\n    adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n    // For node use HTTP adapter\n    adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n  }\n  return adapter;\n}\n\nvar defaults = {\n  adapter: getDefaultAdapter(),\n\n  transformRequest: [function transformRequest(data, headers) {\n    normalizeHeaderName(headers, 'Accept');\n    normalizeHeaderName(headers, 'Content-Type');\n    if (utils.isFormData(data) ||\n      utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n      return data.toString();\n    }\n    if (utils.isObject(data)) {\n      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n      return JSON.stringify(data);\n    }\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    /*eslint no-param-reassign:0*/\n    if (typeof data === 'string') {\n      try {\n        data = JSON.parse(data);\n      } catch (e) { /* Ignore */ }\n    }\n    return data;\n  }],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\n\ndefaults.headers = {\n  common: {\n    'Accept': 'application/json, text/plain, */*'\n  }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n  defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/defaults.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/bind.js":
/*!************************************************!*\
  !*** ./node_modules/axios/lib/helpers/bind.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function bind(fn, thisArg) {\n  return function wrap() {\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n    return fn.apply(thisArg, args);\n  };\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/bind.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/buildURL.js":
/*!****************************************************!*\
  !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%40/gi, '@').\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n\n  var serializedParams;\n  if (paramsSerializer) {\n    serializedParams = paramsSerializer(params);\n  } else if (utils.isURLSearchParams(params)) {\n    serializedParams = params.toString();\n  } else {\n    var parts = [];\n\n    utils.forEach(params, function serialize(val, key) {\n      if (val === null || typeof val === 'undefined') {\n        return;\n      }\n\n      if (utils.isArray(val)) {\n        key = key + '[]';\n      } else {\n        val = [val];\n      }\n\n      utils.forEach(val, function parseValue(v) {\n        if (utils.isDate(v)) {\n          v = v.toISOString();\n        } else if (utils.isObject(v)) {\n          v = JSON.stringify(v);\n        }\n        parts.push(encode(key) + '=' + encode(v));\n      });\n    });\n\n    serializedParams = parts.join('&');\n  }\n\n  if (serializedParams) {\n    var hashmarkIndex = url.indexOf('#');\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/buildURL.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/combineURLs.js":
/*!*******************************************************!*\
  !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/combineURLs.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/cookies.js":
/*!***************************************************!*\
  !*** ./node_modules/axios/lib/helpers/cookies.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs support document.cookie\n    (function standardBrowserEnv() {\n      return {\n        write: function write(name, value, expires, path, domain, secure) {\n          var cookie = [];\n          cookie.push(name + '=' + encodeURIComponent(value));\n\n          if (utils.isNumber(expires)) {\n            cookie.push('expires=' + new Date(expires).toGMTString());\n          }\n\n          if (utils.isString(path)) {\n            cookie.push('path=' + path);\n          }\n\n          if (utils.isString(domain)) {\n            cookie.push('domain=' + domain);\n          }\n\n          if (secure === true) {\n            cookie.push('secure');\n          }\n\n          document.cookie = cookie.join('; ');\n        },\n\n        read: function read(name) {\n          var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n          return (match ? decodeURIComponent(match[3]) : null);\n        },\n\n        remove: function remove(name) {\n          this.write(name, '', Date.now() - 86400000);\n        }\n      };\n    })() :\n\n  // Non standard browser env (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return {\n        write: function write() {},\n        read: function read() { return null; },\n        remove: function remove() {}\n      };\n    })()\n);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/cookies.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
/*!*********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/isAbsoluteURL.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
/*!***********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs have full support of the APIs needed to test\n  // whether the request URL is of the same origin as current location.\n    (function standardBrowserEnv() {\n      var msie = /(msie|trident)/i.test(navigator.userAgent);\n      var urlParsingNode = document.createElement('a');\n      var originURL;\n\n      /**\n    * Parse a URL to discover it's components\n    *\n    * @param {String} url The URL to be parsed\n    * @returns {Object}\n    */\n      function resolveURL(url) {\n        var href = url;\n\n        if (msie) {\n        // IE needs attribute set twice to normalize properties\n          urlParsingNode.setAttribute('href', href);\n          href = urlParsingNode.href;\n        }\n\n        urlParsingNode.setAttribute('href', href);\n\n        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n        return {\n          href: urlParsingNode.href,\n          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n          host: urlParsingNode.host,\n          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n          hostname: urlParsingNode.hostname,\n          port: urlParsingNode.port,\n          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n            urlParsingNode.pathname :\n            '/' + urlParsingNode.pathname\n        };\n      }\n\n      originURL = resolveURL(window.location.href);\n\n      /**\n    * Determine if a URL shares the same origin as the current location\n    *\n    * @param {String} requestURL The URL to test\n    * @returns {boolean} True if URL shares the same origin, otherwise false\n    */\n      return function isURLSameOrigin(requestURL) {\n        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n        return (parsed.protocol === originURL.protocol &&\n            parsed.host === originURL.host);\n      };\n    })() :\n\n  // Non standard browser envs (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return function isURLSameOrigin() {\n        return true;\n      };\n    })()\n);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/isURLSameOrigin.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
/*!***************************************************************!*\
  !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n  utils.forEach(headers, function processHeader(value, name) {\n    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n      headers[normalizedName] = value;\n      delete headers[name];\n    }\n  });\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/normalizeHeaderName.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
/*!********************************************************!*\
  !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n  'age', 'authorization', 'content-length', 'content-type', 'etag',\n  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n  'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n  var parsed = {};\n  var key;\n  var val;\n  var i;\n\n  if (!headers) { return parsed; }\n\n  utils.forEach(headers.split('\\n'), function parser(line) {\n    i = line.indexOf(':');\n    key = utils.trim(line.substr(0, i)).toLowerCase();\n    val = utils.trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n        return;\n      }\n      if (key === 'set-cookie') {\n        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n      } else {\n        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n      }\n    }\n  });\n\n  return parsed;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/parseHeaders.js?");

/***/ }),

/***/ "./node_modules/axios/lib/helpers/spread.js":
/*!**************************************************!*\
  !*** ./node_modules/axios/lib/helpers/spread.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/helpers/spread.js?");

/***/ }),

/***/ "./node_modules/axios/lib/utils.js":
/*!*****************************************!*\
  !*** ./node_modules/axios/lib/utils.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n  return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n  return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n  return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n  return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  var result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n  return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n  return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n  return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n  return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n  return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n  return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n  return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n  return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n  return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n                                           navigator.product === 'NativeScript' ||\n                                           navigator.product === 'NS')) {\n    return false;\n  }\n  return (\n    typeof window !== 'undefined' &&\n    typeof document !== 'undefined'\n  );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (var i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    for (var key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        fn.call(null, obj[key], key, obj);\n      }\n    }\n  }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = merge(result[key], val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = deepMerge(result[key], val);\n    } else if (typeof val === 'object') {\n      result[key] = deepMerge({}, val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  deepMerge: deepMerge,\n  extend: extend,\n  trim: trim\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/axios/lib/utils.js?");

/***/ }),

/***/ "./node_modules/backo2/index.js":
/*!**************************************!*\
  !*** ./node_modules/backo2/index.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n/**\n * Expose `Backoff`.\n */\n\nmodule.exports = Backoff;\n\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction Backoff(opts) {\n  opts = opts || {};\n  this.ms = opts.min || 100;\n  this.max = opts.max || 10000;\n  this.factor = opts.factor || 2;\n  this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n  this.attempts = 0;\n}\n\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\n\nBackoff.prototype.duration = function(){\n  var ms = this.ms * Math.pow(this.factor, this.attempts++);\n  if (this.jitter) {\n    var rand =  Math.random();\n    var deviation = Math.floor(rand * this.jitter * ms);\n    ms = (Math.floor(rand * 10) & 1) == 0  ? ms - deviation : ms + deviation;\n  }\n  return Math.min(ms, this.max) | 0;\n};\n\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\n\nBackoff.prototype.reset = function(){\n  this.attempts = 0;\n};\n\n/**\n * Set the minimum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMin = function(min){\n  this.ms = min;\n};\n\n/**\n * Set the maximum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMax = function(max){\n  this.max = max;\n};\n\n/**\n * Set the jitter\n *\n * @api public\n */\n\nBackoff.prototype.setJitter = function(jitter){\n  this.jitter = jitter;\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/backo2/index.js?");

/***/ }),

/***/ "./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js":
/*!*******************************************************************!*\
  !*** ./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n(function(chars){\n  \"use strict\";\n\n  exports.encode = function(arraybuffer) {\n    var bytes = new Uint8Array(arraybuffer),\n    i, len = bytes.length, base64 = \"\";\n\n    for (i = 0; i < len; i+=3) {\n      base64 += chars[bytes[i] >> 2];\n      base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n      base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n      base64 += chars[bytes[i + 2] & 63];\n    }\n\n    if ((len % 3) === 2) {\n      base64 = base64.substring(0, base64.length - 1) + \"=\";\n    } else if (len % 3 === 1) {\n      base64 = base64.substring(0, base64.length - 2) + \"==\";\n    }\n\n    return base64;\n  };\n\n  exports.decode =  function(base64) {\n    var bufferLength = base64.length * 0.75,\n    len = base64.length, i, p = 0,\n    encoded1, encoded2, encoded3, encoded4;\n\n    if (base64[base64.length - 1] === \"=\") {\n      bufferLength--;\n      if (base64[base64.length - 2] === \"=\") {\n        bufferLength--;\n      }\n    }\n\n    var arraybuffer = new ArrayBuffer(bufferLength),\n    bytes = new Uint8Array(arraybuffer);\n\n    for (i = 0; i < len; i+=4) {\n      encoded1 = chars.indexOf(base64[i]);\n      encoded2 = chars.indexOf(base64[i+1]);\n      encoded3 = chars.indexOf(base64[i+2]);\n      encoded4 = chars.indexOf(base64[i+3]);\n\n      bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n      bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n      bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n    }\n\n    return arraybuffer;\n  };\n})(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js?");

/***/ }),

/***/ "./node_modules/blob/index.js":
/*!************************************!*\
  !*** ./node_modules/blob/index.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\r\n * Create a blob builder even when vendor prefixes exist\r\n */\r\n\r\nvar BlobBuilder = typeof BlobBuilder !== 'undefined' ? BlobBuilder :\r\n  typeof WebKitBlobBuilder !== 'undefined' ? WebKitBlobBuilder :\r\n  typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder :\r\n  typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : \r\n  false;\r\n\r\n/**\r\n * Check if Blob constructor is supported\r\n */\r\n\r\nvar blobSupported = (function() {\r\n  try {\r\n    var a = new Blob(['hi']);\r\n    return a.size === 2;\r\n  } catch(e) {\r\n    return false;\r\n  }\r\n})();\r\n\r\n/**\r\n * Check if Blob constructor supports ArrayBufferViews\r\n * Fails in Safari 6, so we need to map to ArrayBuffers there.\r\n */\r\n\r\nvar blobSupportsArrayBufferView = blobSupported && (function() {\r\n  try {\r\n    var b = new Blob([new Uint8Array([1,2])]);\r\n    return b.size === 2;\r\n  } catch(e) {\r\n    return false;\r\n  }\r\n})();\r\n\r\n/**\r\n * Check if BlobBuilder is supported\r\n */\r\n\r\nvar blobBuilderSupported = BlobBuilder\r\n  && BlobBuilder.prototype.append\r\n  && BlobBuilder.prototype.getBlob;\r\n\r\n/**\r\n * Helper function that maps ArrayBufferViews to ArrayBuffers\r\n * Used by BlobBuilder constructor and old browsers that didn't\r\n * support it in the Blob constructor.\r\n */\r\n\r\nfunction mapArrayBufferViews(ary) {\r\n  return ary.map(function(chunk) {\r\n    if (chunk.buffer instanceof ArrayBuffer) {\r\n      var buf = chunk.buffer;\r\n\r\n      // if this is a subarray, make a copy so we only\r\n      // include the subarray region from the underlying buffer\r\n      if (chunk.byteLength !== buf.byteLength) {\r\n        var copy = new Uint8Array(chunk.byteLength);\r\n        copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));\r\n        buf = copy.buffer;\r\n      }\r\n\r\n      return buf;\r\n    }\r\n\r\n    return chunk;\r\n  });\r\n}\r\n\r\nfunction BlobBuilderConstructor(ary, options) {\r\n  options = options || {};\r\n\r\n  var bb = new BlobBuilder();\r\n  mapArrayBufferViews(ary).forEach(function(part) {\r\n    bb.append(part);\r\n  });\r\n\r\n  return (options.type) ? bb.getBlob(options.type) : bb.getBlob();\r\n};\r\n\r\nfunction BlobConstructor(ary, options) {\r\n  return new Blob(mapArrayBufferViews(ary), options || {});\r\n};\r\n\r\nif (typeof Blob !== 'undefined') {\r\n  BlobBuilderConstructor.prototype = Blob.prototype;\r\n  BlobConstructor.prototype = Blob.prototype;\r\n}\r\n\r\nmodule.exports = (function() {\r\n  if (blobSupported) {\r\n    return blobSupportsArrayBufferView ? Blob : BlobConstructor;\r\n  } else if (blobBuilderSupported) {\r\n    return BlobBuilderConstructor;\r\n  } else {\r\n    return undefined;\r\n  }\r\n})();\r\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/blob/index.js?");

/***/ }),

/***/ "./node_modules/bowser/es5.js":
/*!************************************!*\
  !*** ./node_modules/bowser/es5.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("!function(e,t){ true?module.exports=t():undefined}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=90)}({17:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||\"\"},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||\"\"},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case\"NT\":return\"NT\";case\"XP\":return\"XP\";case\"NT 5.0\":return\"2000\";case\"NT 5.1\":return\"XP\";case\"NT 5.2\":return\"2003\";case\"NT 6.0\":return\"Vista\";case\"NT 6.1\":return\"7\";case\"NT 6.2\":return\"8\";case\"NT 6.3\":return\"8.1\";case\"NT 10.0\":return\"10\";default:return}},e.getMacOSVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return\"Leopard\";case 6:return\"Snow Leopard\";case 7:return\"Lion\";case 8:return\"Mountain Lion\";case 9:return\"Mavericks\";case 10:return\"Yosemite\";case 11:return\"El Capitan\";case 12:return\"Sierra\";case 13:return\"High Sierra\";case 14:return\"Mojave\";case 15:return\"Catalina\";default:return}},e.getAndroidVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?\"Cupcake\":1===t[0]&&t[1]>=6?\"Donut\":2===t[0]&&t[1]<2?\"Eclair\":2===t[0]&&2===t[1]?\"Froyo\":2===t[0]&&t[1]>2?\"Gingerbread\":3===t[0]?\"Honeycomb\":4===t[0]&&t[1]<1?\"Ice Cream Sandwich\":4===t[0]&&t[1]<4?\"Jelly Bean\":4===t[0]&&t[1]>=4?\"KitKat\":5===t[0]?\"Lollipop\":6===t[0]?\"Marshmallow\":7===t[0]?\"Nougat\":8===t[0]?\"Oreo\":9===t[0]?\"Pie\":void 0},e.getVersionPrecision=function(e){return e.split(\".\").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(\".0\");return e.map(n.split(\".\"),(function(e){return new Array(20-e.length).join(\"0\")+e})).reverse()}));for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var o=function(){var e=s[t];\"object\"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=s.length;t<r;t+=1)o();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||\"\"},e}();t.default=i,e.exports=t.default},18:function(e,t,r){\"use strict\";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0;t.BROWSER_ALIASES_MAP={\"Amazon Silk\":\"amazon_silk\",\"Android Browser\":\"android\",Bada:\"bada\",BlackBerry:\"blackberry\",Chrome:\"chrome\",Chromium:\"chromium\",Electron:\"electron\",Epiphany:\"epiphany\",Firefox:\"firefox\",Focus:\"focus\",Generic:\"generic\",\"Google Search\":\"google_search\",Googlebot:\"googlebot\",\"Internet Explorer\":\"ie\",\"K-Meleon\":\"k_meleon\",Maxthon:\"maxthon\",\"Microsoft Edge\":\"edge\",\"MZ Browser\":\"mz\",\"NAVER Whale Browser\":\"naver\",Opera:\"opera\",\"Opera Coast\":\"opera_coast\",PhantomJS:\"phantomjs\",Puffin:\"puffin\",QupZilla:\"qupzilla\",QQ:\"qq\",QQLite:\"qqlite\",Safari:\"safari\",Sailfish:\"sailfish\",\"Samsung Internet for Android\":\"samsung_internet\",SeaMonkey:\"seamonkey\",Sleipnir:\"sleipnir\",Swing:\"swing\",Tizen:\"tizen\",\"UC Browser\":\"uc\",Vivaldi:\"vivaldi\",\"WebOS Browser\":\"webos\",WeChat:\"wechat\",\"Yandex Browser\":\"yandex\",Roku:\"roku\"};t.BROWSER_MAP={amazon_silk:\"Amazon Silk\",android:\"Android Browser\",bada:\"Bada\",blackberry:\"BlackBerry\",chrome:\"Chrome\",chromium:\"Chromium\",electron:\"Electron\",epiphany:\"Epiphany\",firefox:\"Firefox\",focus:\"Focus\",generic:\"Generic\",googlebot:\"Googlebot\",google_search:\"Google Search\",ie:\"Internet Explorer\",k_meleon:\"K-Meleon\",maxthon:\"Maxthon\",edge:\"Microsoft Edge\",mz:\"MZ Browser\",naver:\"NAVER Whale Browser\",opera:\"Opera\",opera_coast:\"Opera Coast\",phantomjs:\"PhantomJS\",puffin:\"Puffin\",qupzilla:\"QupZilla\",qq:\"QQ Browser\",qqlite:\"QQ Browser Lite\",safari:\"Safari\",sailfish:\"Sailfish\",samsung_internet:\"Samsung Internet for Android\",seamonkey:\"SeaMonkey\",sleipnir:\"Sleipnir\",swing:\"Swing\",tizen:\"Tizen\",uc:\"UC Browser\",vivaldi:\"Vivaldi\",webos:\"WebOS Browser\",wechat:\"WeChat\",yandex:\"Yandex Browser\"};t.PLATFORMS_MAP={tablet:\"tablet\",mobile:\"mobile\",desktop:\"desktop\",tv:\"tv\"};t.OS_MAP={WindowsPhone:\"Windows Phone\",Windows:\"Windows\",MacOS:\"macOS\",iOS:\"iOS\",Android:\"Android\",WebOS:\"WebOS\",BlackBerry:\"BlackBerry\",Bada:\"Bada\",Tizen:\"Tizen\",Linux:\"Linux\",ChromeOS:\"Chrome OS\",PlayStation4:\"PlayStation 4\",Roku:\"Roku\"};t.ENGINE_MAP={EdgeHTML:\"EdgeHTML\",Blink:\"Blink\",Trident:\"Trident\",Presto:\"Presto\",Gecko:\"Gecko\",WebKit:\"WebKit\"}},90:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},s=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(){}var t,r,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),\"string\"!=typeof e)throw new Error(\"UserAgent should be a string\");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:\"BROWSER_MAP\",get:function(){return s.BROWSER_MAP}},{key:\"ENGINE_MAP\",get:function(){return s.ENGINE_MAP}},{key:\"OS_MAP\",get:function(){return s.OS_MAP}},{key:\"PLATFORMS_MAP\",get:function(){return s.PLATFORMS_MAP}}],(r=null)&&a(t.prototype,r),n&&a(t,n),e}();t.default=o,e.exports=t.default},91:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),s=u(r(94)),a=u(r(95)),o=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||\"\"===e)throw new Error(\"UserAgent parameter can't be empty\");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o.default.find(n.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||\"\":this.getBrowser().name||\"\"},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o.default.find(i.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||\"\":t||\"\"},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||\"\":t||\"\"},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o.default.find(s.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||\"\":this.getEngine().name||\"\"},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o.default.find(a.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return o.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},s=0;if(Object.keys(e).forEach((function(t){var a=e[t];\"string\"==typeof a?(i[t]=a,s+=1):\"object\"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=o.default.find(a,(function(e){return t.isOS(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}var c=o.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}}if(s>0){var l=Object.keys(i),h=o.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if(\"string\"==typeof i)return\">\"===e[0]||\"<\"===e[0]?(r=e.substr(1),\"=\"===e[1]?(n=!0,r=e.substr(2)):t=[],\">\"===e[0]?t.push(1):t.push(-1)):\"=\"===e[0]?r=e.substr(1):\"~\"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n};var s=/version\\/(\\d+(\\.?_?\\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:\"Googlebot\"},r=i.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\\/|opios/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:\"Samsung Internet for Android\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:\"NAVER Whale Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:\"MZ Browser\"},r=i.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:\"Focus\"},r=i.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:\"Swing\"},r=i.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:\"Opera Coast\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\\/\\d+(?:.?_?\\d+)+/i],describe:function(e){var t={name:\"Opera Touch\"},r=i.default.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:\"Yandex Browser\"},r=i.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:\"UC Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:\"Maxthon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:\"Epiphany\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:\"Puffin\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:\"Sleipnir\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:\"K-Meleon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:\"WeChat\"},r=i.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?\"QQ Browser Lite\":\"QQ Browser\"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:\"Internet Explorer\"},r=i.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\\sedg\\//i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:\"Vivaldi\"},r=i.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:\"SeaMonkey\"},r=i.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:\"Sailfish\"},r=i.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:\"Amazon Silk\"},r=i.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:\"PhantomJS\"},r=i.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:\"SlimerJS\"},r=i.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t={name:\"BlackBerry\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:\"WebOS Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:\"Bada\"},r=i.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:\"Tizen\"},r=i.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:\"QupZilla\"},r=i.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:\"Firefox\"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:\"Electron\"},r=i.default.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:\"Miui\"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:\"Chromium\"},r=i.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:\"Chrome\"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:\"Google Search\"},r=i.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:\"Android Browser\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:\"PlayStation 4\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:\"Safari\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search(\"\\\\(\")?/^(.*)\\/(.*)[ \\t]\\((.*)/:/^(.*)\\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/Roku\\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(e){var t={name:s.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i,e).replace(/[_\\s]/g,\".\"),r=i.default.getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i,e).replace(/[_\\s]/g,\".\");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i,e)||i.default.getFirstMatch(/\\bbb(\\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/googlebot/i],describe:function(){return{type:\"bot\",vendor:\"Google\"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&\"Nova\",r={type:s.PLATFORMS_MAP.mobile,vendor:\"Huawei\"};return t&&(r.model=t),r}},{test:[/nexus\\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Nexus\"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\",model:\"Kindle Fire HD 7\"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:\"Apple\",model:t}}},{test:[/nexus\\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Nexus\"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"blackberry\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"BlackBerry\"}}},{test:function(e){return\"bada\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"windows phone\"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Microsoft\"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(\".\")[0]);return\"android\"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return\"android\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"macos\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:\"Apple\"}}},{test:function(e){return\"windows\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"linux\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"playstation 4\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return\"roku\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:function(e){return\"microsoft edge\"===e.getBrowserName(!0)},describe:function(e){if(/\\sedg\\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\\/537\\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}));\n\n//# sourceURL=webpack://futureBooks/./node_modules/bowser/es5.js?");

/***/ }),

/***/ "./node_modules/buffer/index.js":
/*!**************************************!*\
  !*** ./node_modules/buffer/index.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/buffer/node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/buffer/node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/buffer/index.js?");

/***/ }),

/***/ "./node_modules/buffer/node_modules/base64-js/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/buffer/node_modules/base64-js/index.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/buffer/node_modules/base64-js/index.js?");

/***/ }),

/***/ "./node_modules/buffer/node_modules/isarray/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/buffer/node_modules/isarray/index.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/buffer/node_modules/isarray/index.js?");

/***/ }),

/***/ "./node_modules/chart.js/dist/Chart.js":
/*!*********************************************!*\
  !*** ./node_modules/chart.js/dist/Chart.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\n true ? module.exports = factory(function() { try { return __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"); } catch(e) { } }()) :\nundefined;\n}(this, (function (moment) { 'use strict';\n\nmoment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nfunction getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n\nvar colorName = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\nvar conversions = createCommonjsModule(function (module) {\n/* MIT license */\n\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n//       values that give correct `typeof` results).\n//       do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in colorName) {\n\tif (colorName.hasOwnProperty(key)) {\n\t\treverseKeywords[colorName[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in colorName) {\n\t\tif (colorName.hasOwnProperty(keyword)) {\n\t\t\tvar value = colorName[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn colorName[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n});\nvar conversions_1 = conversions.rgb;\nvar conversions_2 = conversions.hsl;\nvar conversions_3 = conversions.hsv;\nvar conversions_4 = conversions.hwb;\nvar conversions_5 = conversions.cmyk;\nvar conversions_6 = conversions.xyz;\nvar conversions_7 = conversions.lab;\nvar conversions_8 = conversions.lch;\nvar conversions_9 = conversions.hex;\nvar conversions_10 = conversions.keyword;\nvar conversions_11 = conversions.ansi16;\nvar conversions_12 = conversions.ansi256;\nvar conversions_13 = conversions.hcg;\nvar conversions_14 = conversions.apple;\nvar conversions_15 = conversions.gray;\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nvar route = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nvar colorConvert = convert;\n\nvar colorName$1 = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\n/* MIT license */\n\n\nvar colorString = {\n   getRgba: getRgba,\n   getHsla: getHsla,\n   getRgb: getRgb,\n   getHsl: getHsl,\n   getHwb: getHwb,\n   getAlpha: getAlpha,\n\n   hexString: hexString,\n   rgbString: rgbString,\n   rgbaString: rgbaString,\n   percentString: percentString,\n   percentaString: percentaString,\n   hslString: hslString,\n   hslaString: hslaString,\n   hwbString: hwbString,\n   keyword: keyword\n};\n\nfunction getRgba(string) {\n   if (!string) {\n      return;\n   }\n   var abbr =  /^#([a-fA-F0-9]{3,4})$/i,\n       hex =  /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n       rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n       per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n       keyword = /(\\w+)/;\n\n   var rgb = [0, 0, 0],\n       a = 1,\n       match = string.match(abbr),\n       hexAlpha = \"\";\n   if (match) {\n      match = match[1];\n      hexAlpha = match[3];\n      for (var i = 0; i < rgb.length; i++) {\n         rgb[i] = parseInt(match[i] + match[i], 16);\n      }\n      if (hexAlpha) {\n         a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n      }\n   }\n   else if (match = string.match(hex)) {\n      hexAlpha = match[2];\n      match = match[1];\n      for (var i = 0; i < rgb.length; i++) {\n         rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n      }\n      if (hexAlpha) {\n         a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n      }\n   }\n   else if (match = string.match(rgba)) {\n      for (var i = 0; i < rgb.length; i++) {\n         rgb[i] = parseInt(match[i + 1]);\n      }\n      a = parseFloat(match[4]);\n   }\n   else if (match = string.match(per)) {\n      for (var i = 0; i < rgb.length; i++) {\n         rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n      }\n      a = parseFloat(match[4]);\n   }\n   else if (match = string.match(keyword)) {\n      if (match[1] == \"transparent\") {\n         return [0, 0, 0, 0];\n      }\n      rgb = colorName$1[match[1]];\n      if (!rgb) {\n         return;\n      }\n   }\n\n   for (var i = 0; i < rgb.length; i++) {\n      rgb[i] = scale(rgb[i], 0, 255);\n   }\n   if (!a && a != 0) {\n      a = 1;\n   }\n   else {\n      a = scale(a, 0, 1);\n   }\n   rgb[3] = a;\n   return rgb;\n}\n\nfunction getHsla(string) {\n   if (!string) {\n      return;\n   }\n   var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n   var match = string.match(hsl);\n   if (match) {\n      var alpha = parseFloat(match[4]);\n      var h = scale(parseInt(match[1]), 0, 360),\n          s = scale(parseFloat(match[2]), 0, 100),\n          l = scale(parseFloat(match[3]), 0, 100),\n          a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n      return [h, s, l, a];\n   }\n}\n\nfunction getHwb(string) {\n   if (!string) {\n      return;\n   }\n   var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n   var match = string.match(hwb);\n   if (match) {\n    var alpha = parseFloat(match[4]);\n      var h = scale(parseInt(match[1]), 0, 360),\n          w = scale(parseFloat(match[2]), 0, 100),\n          b = scale(parseFloat(match[3]), 0, 100),\n          a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n      return [h, w, b, a];\n   }\n}\n\nfunction getRgb(string) {\n   var rgba = getRgba(string);\n   return rgba && rgba.slice(0, 3);\n}\n\nfunction getHsl(string) {\n  var hsla = getHsla(string);\n  return hsla && hsla.slice(0, 3);\n}\n\nfunction getAlpha(string) {\n   var vals = getRgba(string);\n   if (vals) {\n      return vals[3];\n   }\n   else if (vals = getHsla(string)) {\n      return vals[3];\n   }\n   else if (vals = getHwb(string)) {\n      return vals[3];\n   }\n}\n\n// generators\nfunction hexString(rgba, a) {\n   var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];\n   return \"#\" + hexDouble(rgba[0]) \n              + hexDouble(rgba[1])\n              + hexDouble(rgba[2])\n              + (\n                 (a >= 0 && a < 1)\n                 ? hexDouble(Math.round(a * 255))\n                 : \"\"\n              );\n}\n\nfunction rgbString(rgba, alpha) {\n   if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n      return rgbaString(rgba, alpha);\n   }\n   return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n}\n\nfunction rgbaString(rgba, alpha) {\n   if (alpha === undefined) {\n      alpha = (rgba[3] !== undefined ? rgba[3] : 1);\n   }\n   return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\n           + \", \" + alpha + \")\";\n}\n\nfunction percentString(rgba, alpha) {\n   if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n      return percentaString(rgba, alpha);\n   }\n   var r = Math.round(rgba[0]/255 * 100),\n       g = Math.round(rgba[1]/255 * 100),\n       b = Math.round(rgba[2]/255 * 100);\n\n   return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n}\n\nfunction percentaString(rgba, alpha) {\n   var r = Math.round(rgba[0]/255 * 100),\n       g = Math.round(rgba[1]/255 * 100),\n       b = Math.round(rgba[2]/255 * 100);\n   return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n}\n\nfunction hslString(hsla, alpha) {\n   if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\n      return hslaString(hsla, alpha);\n   }\n   return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n}\n\nfunction hslaString(hsla, alpha) {\n   if (alpha === undefined) {\n      alpha = (hsla[3] !== undefined ? hsla[3] : 1);\n   }\n   return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\n           + alpha + \")\";\n}\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\nfunction hwbString(hwb, alpha) {\n   if (alpha === undefined) {\n      alpha = (hwb[3] !== undefined ? hwb[3] : 1);\n   }\n   return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\n           + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n}\n\nfunction keyword(rgb) {\n  return reverseNames[rgb.slice(0, 3)];\n}\n\n// helpers\nfunction scale(num, min, max) {\n   return Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n  var str = num.toString(16).toUpperCase();\n  return (str.length < 2) ? \"0\" + str : str;\n}\n\n\n//create a list of reverse color names\nvar reverseNames = {};\nfor (var name in colorName$1) {\n   reverseNames[colorName$1[name]] = name;\n}\n\n/* MIT license */\n\n\n\nvar Color = function (obj) {\n\tif (obj instanceof Color) {\n\t\treturn obj;\n\t}\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj);\n\t}\n\n\tthis.valid = false;\n\tthis.values = {\n\t\trgb: [0, 0, 0],\n\t\thsl: [0, 0, 0],\n\t\thsv: [0, 0, 0],\n\t\thwb: [0, 0, 0],\n\t\tcmyk: [0, 0, 0, 0],\n\t\talpha: 1\n\t};\n\n\t// parse Color() argument\n\tvar vals;\n\tif (typeof obj === 'string') {\n\t\tvals = colorString.getRgba(obj);\n\t\tif (vals) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals = colorString.getHsla(obj)) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals = colorString.getHwb(obj)) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t}\n\t} else if (typeof obj === 'object') {\n\t\tvals = obj;\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\n\t\t\tthis.setValues('hsv', vals);\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\n\t\t\tthis.setValues('cmyk', vals);\n\t\t}\n\t}\n};\n\nColor.prototype = {\n\tisValid: function () {\n\t\treturn this.valid;\n\t},\n\trgb: function () {\n\t\treturn this.setSpace('rgb', arguments);\n\t},\n\thsl: function () {\n\t\treturn this.setSpace('hsl', arguments);\n\t},\n\thsv: function () {\n\t\treturn this.setSpace('hsv', arguments);\n\t},\n\thwb: function () {\n\t\treturn this.setSpace('hwb', arguments);\n\t},\n\tcmyk: function () {\n\t\treturn this.setSpace('cmyk', arguments);\n\t},\n\n\trgbArray: function () {\n\t\treturn this.values.rgb;\n\t},\n\thslArray: function () {\n\t\treturn this.values.hsl;\n\t},\n\thsvArray: function () {\n\t\treturn this.values.hsv;\n\t},\n\thwbArray: function () {\n\t\tvar values = this.values;\n\t\tif (values.alpha !== 1) {\n\t\t\treturn values.hwb.concat([values.alpha]);\n\t\t}\n\t\treturn values.hwb;\n\t},\n\tcmykArray: function () {\n\t\treturn this.values.cmyk;\n\t},\n\trgbaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.rgb.concat([values.alpha]);\n\t},\n\thslaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.hsl.concat([values.alpha]);\n\t},\n\talpha: function (val) {\n\t\tif (val === undefined) {\n\t\t\treturn this.values.alpha;\n\t\t}\n\t\tthis.setValues('alpha', val);\n\t\treturn this;\n\t},\n\n\tred: function (val) {\n\t\treturn this.setChannel('rgb', 0, val);\n\t},\n\tgreen: function (val) {\n\t\treturn this.setChannel('rgb', 1, val);\n\t},\n\tblue: function (val) {\n\t\treturn this.setChannel('rgb', 2, val);\n\t},\n\thue: function (val) {\n\t\tif (val) {\n\t\t\tval %= 360;\n\t\t\tval = val < 0 ? 360 + val : val;\n\t\t}\n\t\treturn this.setChannel('hsl', 0, val);\n\t},\n\tsaturation: function (val) {\n\t\treturn this.setChannel('hsl', 1, val);\n\t},\n\tlightness: function (val) {\n\t\treturn this.setChannel('hsl', 2, val);\n\t},\n\tsaturationv: function (val) {\n\t\treturn this.setChannel('hsv', 1, val);\n\t},\n\twhiteness: function (val) {\n\t\treturn this.setChannel('hwb', 1, val);\n\t},\n\tblackness: function (val) {\n\t\treturn this.setChannel('hwb', 2, val);\n\t},\n\tvalue: function (val) {\n\t\treturn this.setChannel('hsv', 2, val);\n\t},\n\tcyan: function (val) {\n\t\treturn this.setChannel('cmyk', 0, val);\n\t},\n\tmagenta: function (val) {\n\t\treturn this.setChannel('cmyk', 1, val);\n\t},\n\tyellow: function (val) {\n\t\treturn this.setChannel('cmyk', 2, val);\n\t},\n\tblack: function (val) {\n\t\treturn this.setChannel('cmyk', 3, val);\n\t},\n\n\thexString: function () {\n\t\treturn colorString.hexString(this.values.rgb);\n\t},\n\trgbString: function () {\n\t\treturn colorString.rgbString(this.values.rgb, this.values.alpha);\n\t},\n\trgbaString: function () {\n\t\treturn colorString.rgbaString(this.values.rgb, this.values.alpha);\n\t},\n\tpercentString: function () {\n\t\treturn colorString.percentString(this.values.rgb, this.values.alpha);\n\t},\n\thslString: function () {\n\t\treturn colorString.hslString(this.values.hsl, this.values.alpha);\n\t},\n\thslaString: function () {\n\t\treturn colorString.hslaString(this.values.hsl, this.values.alpha);\n\t},\n\thwbString: function () {\n\t\treturn colorString.hwbString(this.values.hwb, this.values.alpha);\n\t},\n\tkeyword: function () {\n\t\treturn colorString.keyword(this.values.rgb, this.values.alpha);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.values.rgb;\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.values.rgb;\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tdark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.values.rgb;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tlight: function () {\n\t\treturn !this.dark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = [];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb[i] = 255 - this.values.rgb[i];\n\t\t}\n\t\tthis.setValues('rgb', rgb);\n\t\treturn this;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] += hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] -= hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] += hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] -= hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[1] += hwb[1] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[2] += hwb[2] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tgreyscale: function () {\n\t\tvar rgb = this.values.rgb;\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\tthis.setValues('rgb', [val, val, val]);\n\t\treturn this;\n\t},\n\n\tclearer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\n\t\treturn this;\n\t},\n\n\topaquer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\n\t\treturn this;\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.values.hsl;\n\t\tvar hue = (hsl[0] + degrees) % 360;\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\t/**\n\t * Ported from sass implementation in C\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t */\n\tmix: function (mixinColor, weight) {\n\t\tvar color1 = this;\n\t\tvar color2 = mixinColor;\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn this\n\t\t\t.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\n\t\t\t)\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n\n\ttoJSON: function () {\n\t\treturn this.rgb();\n\t},\n\n\tclone: function () {\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\n\t\t// except 'alpha' which is a number.\n\t\tvar result = new Color();\n\t\tvar source = this.values;\n\t\tvar target = result.values;\n\t\tvar value, type;\n\n\t\tfor (var prop in source) {\n\t\t\tif (source.hasOwnProperty(prop)) {\n\t\t\t\tvalue = source[prop];\n\t\t\t\ttype = ({}).toString.call(value);\n\t\t\t\tif (type === '[object Array]') {\n\t\t\t\t\ttarget[prop] = value.slice(0);\n\t\t\t\t} else if (type === '[object Number]') {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('unexpected color value:', value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nColor.prototype.spaces = {\n\trgb: ['red', 'green', 'blue'],\n\thsl: ['hue', 'saturation', 'lightness'],\n\thsv: ['hue', 'saturation', 'value'],\n\thwb: ['hue', 'whiteness', 'blackness'],\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\n};\n\nColor.prototype.maxes = {\n\trgb: [255, 255, 255],\n\thsl: [360, 100, 100],\n\thsv: [360, 100, 100],\n\thwb: [360, 100, 100],\n\tcmyk: [100, 100, 100, 100]\n};\n\nColor.prototype.getValues = function (space) {\n\tvar values = this.values;\n\tvar vals = {};\n\n\tfor (var i = 0; i < space.length; i++) {\n\t\tvals[space.charAt(i)] = values[space][i];\n\t}\n\n\tif (values.alpha !== 1) {\n\t\tvals.a = values.alpha;\n\t}\n\n\t// {r: 255, g: 255, b: 255, a: 0.4}\n\treturn vals;\n};\n\nColor.prototype.setValues = function (space, vals) {\n\tvar values = this.values;\n\tvar spaces = this.spaces;\n\tvar maxes = this.maxes;\n\tvar alpha = 1;\n\tvar i;\n\n\tthis.valid = true;\n\n\tif (space === 'alpha') {\n\t\talpha = vals;\n\t} else if (vals.length) {\n\t\t// [10, 10, 10]\n\t\tvalues[space] = vals.slice(0, space.length);\n\t\talpha = vals[space.length];\n\t} else if (vals[space.charAt(0)] !== undefined) {\n\t\t// {r: 10, g: 10, b: 10}\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\n\t\t}\n\n\t\talpha = vals.a;\n\t} else if (vals[spaces[space][0]] !== undefined) {\n\t\t// {red: 10, green: 10, blue: 10}\n\t\tvar chans = spaces[space];\n\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[chans[i]];\n\t\t}\n\n\t\talpha = vals.alpha;\n\t}\n\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\n\n\tif (space === 'alpha') {\n\t\treturn false;\n\t}\n\n\tvar capped;\n\n\t// cap values of the space prior converting all values\n\tfor (i = 0; i < space.length; i++) {\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n\t\tvalues[space][i] = Math.round(capped);\n\t}\n\n\t// convert to all the other color spaces\n\tfor (var sname in spaces) {\n\t\tif (sname !== space) {\n\t\t\tvalues[sname] = colorConvert[space][sname](values[space]);\n\t\t}\n\t}\n\n\treturn true;\n};\n\nColor.prototype.setSpace = function (space, args) {\n\tvar vals = args[0];\n\n\tif (vals === undefined) {\n\t\t// color.rgb()\n\t\treturn this.getValues(space);\n\t}\n\n\t// color.rgb(10, 10, 10)\n\tif (typeof vals === 'number') {\n\t\tvals = Array.prototype.slice.call(args);\n\t}\n\n\tthis.setValues(space, vals);\n\treturn this;\n};\n\nColor.prototype.setChannel = function (space, index, val) {\n\tvar svalues = this.values[space];\n\tif (val === undefined) {\n\t\t// color.red()\n\t\treturn svalues[index];\n\t} else if (val === svalues[index]) {\n\t\t// color.red(color.red())\n\t\treturn this;\n\t}\n\n\t// color.red(100)\n\tsvalues[index] = val;\n\tthis.setValues(space, svalues);\n\n\treturn this;\n};\n\nif (typeof window !== 'undefined') {\n\twindow.Color = Color;\n}\n\nvar chartjsColor = Color;\n\nfunction isValidKey(key) {\r\n\treturn ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\r\n}\r\n\r\n/**\r\n * @namespace Chart.helpers\r\n */\r\nvar helpers = {\r\n\t/**\r\n\t * An empty function that can be used, for example, for optional callback.\r\n\t */\r\n\tnoop: function() {},\r\n\r\n\t/**\r\n\t * Returns a unique id, sequentially generated from a global variable.\r\n\t * @returns {number}\r\n\t * @function\r\n\t */\r\n\tuid: (function() {\r\n\t\tvar id = 0;\r\n\t\treturn function() {\r\n\t\t\treturn id++;\r\n\t\t};\r\n\t}()),\r\n\r\n\t/**\r\n\t * Returns true if `value` is neither null nor undefined, else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisNullOrUndef: function(value) {\r\n\t\treturn value === null || typeof value === 'undefined';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an array (including typed arrays), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @function\r\n\t */\r\n\tisArray: function(value) {\r\n\t\tif (Array.isArray && Array.isArray(value)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar type = Object.prototype.toString.call(value);\r\n\t\tif (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an object (excluding null), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisObject: function(value) {\r\n\t\treturn value !== null && Object.prototype.toString.call(value) === '[object Object]';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is a finite number, else returns false\r\n\t * @param {*} value  - The value to test.\r\n\t * @returns {boolean}\r\n\t */\r\n\tisFinite: function(value) {\r\n\t\treturn (typeof value === 'number' || value instanceof Number) && isFinite(value);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns `value` if defined, else returns `defaultValue`.\r\n\t * @param {*} value - The value to return if defined.\r\n\t * @param {*} defaultValue - The value to return if `value` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueOrDefault: function(value, defaultValue) {\r\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns value at the given `index` in array if defined, else returns `defaultValue`.\r\n\t * @param {Array} value - The array to lookup for value at `index`.\r\n\t * @param {number} index - The index in `value` to lookup for value.\r\n\t * @param {*} defaultValue - The value to return if `value[index]` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueAtIndexOrDefault: function(value, index, defaultValue) {\r\n\t\treturn helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\r\n\t * value returned by `fn`. If `fn` is not a function, this method returns undefined.\r\n\t * @param {function} fn - The function to call.\r\n\t * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @returns {*}\r\n\t */\r\n\tcallback: function(fn, args, thisArg) {\r\n\t\tif (fn && typeof fn.call === 'function') {\r\n\t\t\treturn fn.apply(thisArg, args);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Note(SB) for performance sake, this method should only be used when loopable type\r\n\t * is unknown or in none intensive code (not called often and small loopable). Else\r\n\t * it's preferable to use a regular for() loop and save extra function calls.\r\n\t * @param {object|Array} loopable - The object or array to be iterated.\r\n\t * @param {function} fn - The function to call for each item.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @param {boolean} [reverse] - If true, iterates backward on the loopable.\r\n\t */\r\n\teach: function(loopable, fn, thisArg, reverse) {\r\n\t\tvar i, len, keys;\r\n\t\tif (helpers.isArray(loopable)) {\r\n\t\t\tlen = loopable.length;\r\n\t\t\tif (reverse) {\r\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (helpers.isObject(loopable)) {\r\n\t\t\tkeys = Object.keys(loopable);\r\n\t\t\tlen = keys.length;\r\n\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\tfn.call(thisArg, loopable[keys[i]], keys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\r\n\t * @see https://stackoverflow.com/a/14853974\r\n\t * @param {Array} a0 - The array to compare\r\n\t * @param {Array} a1 - The array to compare\r\n\t * @returns {boolean}\r\n\t */\r\n\tarrayEquals: function(a0, a1) {\r\n\t\tvar i, ilen, v0, v1;\r\n\r\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = a0.length; i < ilen; ++i) {\r\n\t\t\tv0 = a0[i];\r\n\t\t\tv1 = a1[i];\r\n\r\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\r\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (v0 !== v1) {\r\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a deep copy of `source` without keeping references on objects and arrays.\r\n\t * @param {*} source - The value to clone.\r\n\t * @returns {*}\r\n\t */\r\n\tclone: function(source) {\r\n\t\tif (helpers.isArray(source)) {\r\n\t\t\treturn source.map(helpers.clone);\r\n\t\t}\r\n\r\n\t\tif (helpers.isObject(source)) {\r\n\t\t\tvar target = Object.create(source);\r\n\t\t\tvar keys = Object.keys(source);\r\n\t\t\tvar klen = keys.length;\r\n\t\t\tvar k = 0;\r\n\r\n\t\t\tfor (; k < klen; ++k) {\r\n\t\t\t\ttarget[keys[k]] = helpers.clone(source[keys[k]]);\r\n\t\t\t}\r\n\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\treturn source;\r\n\t},\r\n\r\n\t/**\r\n\t * The default merger when Chart.helpers.merge is called without merger option.\r\n\t * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\r\n\t * @private\r\n\t */\r\n\t_merger: function(key, target, source, options) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.merge(tval, sval, options);\r\n\t\t} else {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Merges source[key] in target[key] only if target[key] is undefined.\r\n\t * @private\r\n\t */\r\n\t_mergerIf: function(key, target, source) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.mergeIf(tval, sval);\r\n\t\t} else if (!target.hasOwnProperty(key)) {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` with the given `options`.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @param {object} [options] - Merging options:\r\n\t * @param {function} [options.merger] - The merge method (key, target, source, options)\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmerge: function(target, source, options) {\r\n\t\tvar sources = helpers.isArray(source) ? source : [source];\r\n\t\tvar ilen = sources.length;\r\n\t\tvar merge, i, keys, klen, k;\r\n\r\n\t\tif (!helpers.isObject(target)) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\toptions = options || {};\r\n\t\tmerge = options.merger || helpers._merger;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!helpers.isObject(source)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tkeys = Object.keys(source);\r\n\t\t\tfor (k = 0, klen = keys.length; k < klen; ++k) {\r\n\t\t\t\tmerge(keys[k], target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` *only* if not defined in target.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmergeIf: function(target, source) {\r\n\t\treturn helpers.merge(target, source, {merger: helpers._mergerIf});\r\n\t},\r\n\r\n\t/**\r\n\t * Applies the contents of two or more objects together into the first object.\r\n\t * @param {object} target - The target object in which all objects are merged into.\r\n\t * @param {object} arg1 - Object containing additional properties to merge in target.\r\n\t * @param {object} argN - Additional objects containing properties to merge in target.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\textend: Object.assign || function(target) {\r\n\t\treturn helpers.merge(target, [].slice.call(arguments, 1), {\r\n\t\t\tmerger: function(key, dst, src) {\r\n\t\t\t\tdst[key] = src[key];\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Basic javascript inheritance based on the model created in Backbone.js\r\n\t */\r\n\tinherits: function(extensions) {\r\n\t\tvar me = this;\r\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\r\n\t\t\treturn me.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tvar Surrogate = function() {\r\n\t\t\tthis.constructor = ChartElement;\r\n\t\t};\r\n\r\n\t\tSurrogate.prototype = me.prototype;\r\n\t\tChartElement.prototype = new Surrogate();\r\n\t\tChartElement.extend = helpers.inherits;\r\n\r\n\t\tif (extensions) {\r\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\r\n\t\t}\r\n\r\n\t\tChartElement.__super__ = me.prototype;\r\n\t\treturn ChartElement;\r\n\t},\r\n\r\n\t_deprecated: function(scope, value, previous, current) {\r\n\t\tif (value !== undefined) {\r\n\t\t\tconsole.warn(scope + ': \"' + previous +\r\n\t\t\t\t'\" is deprecated. Please use \"' + current + '\" instead');\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar helpers_core = helpers;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.callback instead.\r\n * @function Chart.helpers.callCallback\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.callCallback = helpers.callback;\r\n\r\n/**\r\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\r\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\r\n * @function Chart.helpers.indexOf\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.indexOf = function(array, item, fromIndex) {\r\n\treturn Array.prototype.indexOf.call(array, item, fromIndex);\r\n};\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\r\n * @function Chart.helpers.getValueOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueOrDefault = helpers.valueOrDefault;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\r\n * @function Chart.helpers.getValueAtIndexOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n\n/**\r\n * Easing functions adapted from Robert Penner's easing equations.\r\n * @namespace Chart.helpers.easingEffects\r\n * @see http://www.robertpenner.com/easing/\r\n */\r\nvar effects = {\r\n\tlinear: function(t) {\r\n\t\treturn t;\r\n\t},\r\n\r\n\teaseInQuad: function(t) {\r\n\t\treturn t * t;\r\n\t},\r\n\r\n\teaseOutQuad: function(t) {\r\n\t\treturn -t * (t - 2);\r\n\t},\r\n\r\n\teaseInOutQuad: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((--t) * (t - 2) - 1);\r\n\t},\r\n\r\n\teaseInCubic: function(t) {\r\n\t\treturn t * t * t;\r\n\t},\r\n\r\n\teaseOutCubic: function(t) {\r\n\t\treturn (t = t - 1) * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutCubic: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t + 2);\r\n\t},\r\n\r\n\teaseInQuart: function(t) {\r\n\t\treturn t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuart: function(t) {\r\n\t\treturn -((t = t - 1) * t * t * t - 1);\r\n\t},\r\n\r\n\teaseInOutQuart: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((t -= 2) * t * t * t - 2);\r\n\t},\r\n\r\n\teaseInQuint: function(t) {\r\n\t\treturn t * t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuint: function(t) {\r\n\t\treturn (t = t - 1) * t * t * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutQuint: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\r\n\t},\r\n\r\n\teaseInSine: function(t) {\r\n\t\treturn -Math.cos(t * (Math.PI / 2)) + 1;\r\n\t},\r\n\r\n\teaseOutSine: function(t) {\r\n\t\treturn Math.sin(t * (Math.PI / 2));\r\n\t},\r\n\r\n\teaseInOutSine: function(t) {\r\n\t\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\r\n\t},\r\n\r\n\teaseInExpo: function(t) {\r\n\t\treturn (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));\r\n\t},\r\n\r\n\teaseOutExpo: function(t) {\r\n\t\treturn (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;\r\n\t},\r\n\r\n\teaseInOutExpo: function(t) {\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * Math.pow(2, 10 * (t - 1));\r\n\t\t}\r\n\t\treturn 0.5 * (-Math.pow(2, -10 * --t) + 2);\r\n\t},\r\n\r\n\teaseInCirc: function(t) {\r\n\t\tif (t >= 1) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\t\treturn -(Math.sqrt(1 - t * t) - 1);\r\n\t},\r\n\r\n\teaseOutCirc: function(t) {\r\n\t\treturn Math.sqrt(1 - (t = t - 1) * t);\r\n\t},\r\n\r\n\teaseInOutCirc: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n\t\t}\r\n\t\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n\t},\r\n\r\n\teaseInElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t},\r\n\r\n\teaseOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\r\n\t},\r\n\r\n\teaseInOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif ((t /= 0.5) === 2) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.45;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\tif (t < 1) {\r\n\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\r\n\t},\r\n\teaseInBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn t * t * ((s + 1) * t - s);\r\n\t},\r\n\r\n\teaseOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn (t = t - 1) * t * ((s + 1) * t + s) + 1;\r\n\t},\r\n\r\n\teaseInOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\r\n\t},\r\n\r\n\teaseInBounce: function(t) {\r\n\t\treturn 1 - effects.easeOutBounce(1 - t);\r\n\t},\r\n\r\n\teaseOutBounce: function(t) {\r\n\t\tif (t < (1 / 2.75)) {\r\n\t\t\treturn 7.5625 * t * t;\r\n\t\t}\r\n\t\tif (t < (2 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\r\n\t\t}\r\n\t\tif (t < (2.5 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\r\n\t\t}\r\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\r\n\t},\r\n\r\n\teaseInOutBounce: function(t) {\r\n\t\tif (t < 0.5) {\r\n\t\t\treturn effects.easeInBounce(t * 2) * 0.5;\r\n\t\t}\r\n\t\treturn effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\r\n\t}\r\n};\r\n\r\nvar helpers_easing = {\r\n\teffects: effects\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\r\n * @function Chart.helpers.easingEffects\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.easingEffects = effects;\n\nvar PI = Math.PI;\r\nvar RAD_PER_DEG = PI / 180;\r\nvar DOUBLE_PI = PI * 2;\r\nvar HALF_PI = PI / 2;\r\nvar QUARTER_PI = PI / 4;\r\nvar TWO_THIRDS_PI = PI * 2 / 3;\r\n\r\n/**\r\n * @namespace Chart.helpers.canvas\r\n */\r\nvar exports$1 = {\r\n\t/**\r\n\t * Clears the entire canvas associated to the given `chart`.\r\n\t * @param {Chart} chart - The chart for which to clear the canvas.\r\n\t */\r\n\tclear: function(chart) {\r\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\r\n\t},\r\n\r\n\t/**\r\n\t * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\r\n\t * given size (width, height) and the same `radius` for all corners.\r\n\t * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\r\n\t * @param {number} x - The x axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} y - The y axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} width - The rectangle's width.\r\n\t * @param {number} height - The rectangle's height.\r\n\t * @param {number} radius - The rounded amount (in pixels) for the four corners.\r\n\t * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\r\n\t */\r\n\troundedRect: function(ctx, x, y, width, height, radius) {\r\n\t\tif (radius) {\r\n\t\t\tvar r = Math.min(radius, height / 2, width / 2);\r\n\t\t\tvar left = x + r;\r\n\t\t\tvar top = y + r;\r\n\t\t\tvar right = x + width - r;\r\n\t\t\tvar bottom = y + height - r;\r\n\r\n\t\t\tctx.moveTo(x, top);\r\n\t\t\tif (left < right && top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, -HALF_PI);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, 0);\r\n\t\t\t\tctx.arc(right, bottom, r, 0, HALF_PI);\r\n\t\t\t\tctx.arc(left, bottom, r, HALF_PI, PI);\r\n\t\t\t} else if (left < right) {\r\n\t\t\t\tctx.moveTo(left, y);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, HALF_PI);\r\n\t\t\t\tctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\r\n\t\t\t} else if (top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, 0);\r\n\t\t\t\tctx.arc(left, bottom, r, 0, PI);\r\n\t\t\t} else {\r\n\t\t\t\tctx.arc(left, top, r, -PI, PI);\r\n\t\t\t}\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t} else {\r\n\t\t\tctx.rect(x, y, width, height);\r\n\t\t}\r\n\t},\r\n\r\n\tdrawPoint: function(ctx, style, radius, x, y, rotation) {\r\n\t\tvar type, xOffset, yOffset, size, cornerRadius;\r\n\t\tvar rad = (rotation || 0) * RAD_PER_DEG;\r\n\r\n\t\tif (style && typeof style === 'object') {\r\n\t\t\ttype = style.toString();\r\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.translate(x, y);\r\n\t\t\t\tctx.rotate(rad);\r\n\t\t\t\tctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\r\n\t\t\t\tctx.restore();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isNaN(radius) || radius <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\r\n\t\tswitch (style) {\r\n\t\t// Default includes circle\r\n\t\tdefault:\r\n\t\t\tctx.arc(x, y, radius, 0, DOUBLE_PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'triangle':\r\n\t\t\tctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rectRounded':\r\n\t\t\t// NOTE: the rounded rect implementation changed to use `arc` instead of\r\n\t\t\t// `quadraticCurveTo` since it generates better results when rect is\r\n\t\t\t// almost a circle. 0.516 (instead of 0.5) produces results with visually\r\n\t\t\t// closer proportion to the previous impl and it is inscribed in the\r\n\t\t\t// circle with `radius`. For more details, see the following PRs:\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5597\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5858\r\n\t\t\tcornerRadius = radius * 0.516;\r\n\t\t\tsize = radius - cornerRadius;\r\n\t\t\txOffset = Math.cos(rad + QUARTER_PI) * size;\r\n\t\t\tyOffset = Math.sin(rad + QUARTER_PI) * size;\r\n\t\t\tctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\r\n\t\t\tctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\r\n\t\t\tctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\r\n\t\t\tctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rect':\r\n\t\t\tif (!rotation) {\r\n\t\t\t\tsize = Math.SQRT1_2 * radius;\r\n\t\t\t\tctx.rect(x - size, y - size, 2 * size, 2 * size);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'rectRot':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'crossRot':\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'cross':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'star':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'line':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'dash':\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t\tctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tctx.fill();\r\n\t\tctx.stroke();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the point is inside the rectangle\r\n\t * @param {object} point - The point to test\r\n\t * @param {object} area - The rectangle\r\n\t * @returns {boolean}\r\n\t * @private\r\n\t */\r\n\t_isPointInArea: function(point, area) {\r\n\t\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\r\n\t\treturn point.x > area.left - epsilon && point.x < area.right + epsilon &&\r\n\t\t\tpoint.y > area.top - epsilon && point.y < area.bottom + epsilon;\r\n\t},\r\n\r\n\tclipArea: function(ctx, area) {\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\r\n\t\tctx.clip();\r\n\t},\r\n\r\n\tunclipArea: function(ctx) {\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tlineTo: function(ctx, previous, target, flip) {\r\n\t\tvar stepped = target.steppedLine;\r\n\t\tif (stepped) {\r\n\t\t\tif (stepped === 'middle') {\r\n\t\t\t\tvar midpoint = (previous.x + target.x) / 2.0;\r\n\t\t\t\tctx.lineTo(midpoint, flip ? target.y : previous.y);\r\n\t\t\t\tctx.lineTo(midpoint, flip ? previous.y : target.y);\r\n\t\t\t} else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {\r\n\t\t\t\tctx.lineTo(previous.x, target.y);\r\n\t\t\t} else {\r\n\t\t\t\tctx.lineTo(target.x, previous.y);\r\n\t\t\t}\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!target.tension) {\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.bezierCurveTo(\r\n\t\t\tflip ? previous.controlPointPreviousX : previous.controlPointNextX,\r\n\t\t\tflip ? previous.controlPointPreviousY : previous.controlPointNextY,\r\n\t\t\tflip ? target.controlPointNextX : target.controlPointPreviousX,\r\n\t\t\tflip ? target.controlPointNextY : target.controlPointPreviousY,\r\n\t\t\ttarget.x,\r\n\t\t\ttarget.y);\r\n\t}\r\n};\r\n\r\nvar helpers_canvas = exports$1;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\r\n * @namespace Chart.helpers.clear\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.clear = exports$1.clear;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\r\n * @namespace Chart.helpers.drawRoundedRectangle\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.drawRoundedRectangle = function(ctx) {\r\n\tctx.beginPath();\r\n\texports$1.roundedRect.apply(exports$1, arguments);\r\n};\n\nvar defaults = {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_set: function(scope, values) {\r\n\t\treturn helpers_core.merge(this[scope] || (this[scope] = {}), values);\r\n\t}\r\n};\r\n\r\n// TODO(v3): remove 'global' from namespace.  all default are global and\r\n// there's inconsistency around which options are under 'global'\r\ndefaults._set('global', {\r\n\tdefaultColor: 'rgba(0,0,0,0.1)',\r\n\tdefaultFontColor: '#666',\r\n\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\r\n\tdefaultFontSize: 12,\r\n\tdefaultFontStyle: 'normal',\r\n\tdefaultLineHeight: 1.2,\r\n\tshowLines: true\r\n});\r\n\r\nvar core_defaults = defaults;\n\nvar valueOrDefault = helpers_core.valueOrDefault;\r\n\r\n/**\r\n * Converts the given font object into a CSS font string.\r\n * @param {object} font - A font object.\r\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n * @private\r\n */\r\nfunction toFontString(font) {\r\n\tif (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (font.style ? font.style + ' ' : '')\r\n\t\t+ (font.weight ? font.weight + ' ' : '')\r\n\t\t+ font.size + 'px '\r\n\t\t+ font.family;\r\n}\r\n\r\n/**\r\n * @alias Chart.helpers.options\r\n * @namespace\r\n */\r\nvar helpers_options = {\r\n\t/**\r\n\t * Converts the given line height `value` in pixels for a specific font `size`.\r\n\t * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\r\n\t * @param {number} size - The font size (in pixels) used to resolve relative `value`.\r\n\t * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\r\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoLineHeight: function(value, size) {\r\n\t\tvar matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\r\n\t\tif (!matches || matches[1] === 'normal') {\r\n\t\t\treturn size * 1.2;\r\n\t\t}\r\n\r\n\t\tvalue = +matches[2];\r\n\r\n\t\tswitch (matches[3]) {\r\n\t\tcase 'px':\r\n\t\t\treturn value;\r\n\t\tcase '%':\r\n\t\t\tvalue /= 100;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn size * value;\r\n\t},\r\n\r\n\t/**\r\n\t * Converts the given value into a padding object with pre-computed width/height.\r\n\t * @param {number|object} value - If a number, set the value to all TRBL component,\r\n\t *  else, if and object, use defined properties and sets undefined ones to 0.\r\n\t * @returns {object} The padding values (top, right, bottom, left, width, height)\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoPadding: function(value) {\r\n\t\tvar t, r, b, l;\r\n\r\n\t\tif (helpers_core.isObject(value)) {\r\n\t\t\tt = +value.top || 0;\r\n\t\t\tr = +value.right || 0;\r\n\t\t\tb = +value.bottom || 0;\r\n\t\t\tl = +value.left || 0;\r\n\t\t} else {\r\n\t\t\tt = r = b = l = +value || 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttop: t,\r\n\t\t\tright: r,\r\n\t\t\tbottom: b,\r\n\t\t\tleft: l,\r\n\t\t\theight: t + b,\r\n\t\t\twidth: l + r\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Parses font options and returns the font object.\r\n\t * @param {object} options - A object that contains font options to be parsed.\r\n\t * @return {object} The font object.\r\n\t * @todo Support font.* options and renamed to toFont().\r\n\t * @private\r\n\t */\r\n\t_parseFont: function(options) {\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\r\n\t\tvar font = {\r\n\t\t\tfamily: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\tlineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\r\n\t\t\tsize: size,\r\n\t\t\tstyle: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\tweight: null,\r\n\t\t\tstring: ''\r\n\t\t};\r\n\r\n\t\tfont.string = toFontString(font);\r\n\t\treturn font;\r\n\t},\r\n\r\n\t/**\r\n\t * Evaluates the given `inputs` sequentially and returns the first defined value.\r\n\t * @param {Array} inputs - An array of values, falling back to the last value.\r\n\t * @param {object} [context] - If defined and the current value is a function, the value\r\n\t * is called with `context` as first argument and the result becomes the new input.\r\n\t * @param {number} [index] - If defined and the current value is an array, the value\r\n\t * at `index` become the new input.\r\n\t * @param {object} [info] - object to return information about resolution in\r\n\t * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.\r\n\t * @since 2.7.0\r\n\t */\r\n\tresolve: function(inputs, context, index, info) {\r\n\t\tvar cacheable = true;\r\n\t\tvar i, ilen, value;\r\n\r\n\t\tfor (i = 0, ilen = inputs.length; i < ilen; ++i) {\r\n\t\t\tvalue = inputs[i];\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (context !== undefined && typeof value === 'function') {\r\n\t\t\t\tvalue = value(context);\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (index !== undefined && helpers_core.isArray(value)) {\r\n\t\t\t\tvalue = value[index];\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (value !== undefined) {\r\n\t\t\t\tif (info && !cacheable) {\r\n\t\t\t\t\tinfo.cacheable = false;\r\n\t\t\t\t}\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\n/**\r\n * @alias Chart.helpers.math\r\n * @namespace\r\n */\r\nvar exports$2 = {\r\n\t/**\r\n\t * Returns an array of factors sorted from 1 to sqrt(value)\r\n\t * @private\r\n\t */\r\n\t_factorize: function(value) {\r\n\t\tvar result = [];\r\n\t\tvar sqrt = Math.sqrt(value);\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 1; i < sqrt; i++) {\r\n\t\t\tif (value % i === 0) {\r\n\t\t\t\tresult.push(i);\r\n\t\t\t\tresult.push(value / i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sqrt === (sqrt | 0)) { // if value is a square number\r\n\t\t\tresult.push(sqrt);\r\n\t\t}\r\n\r\n\t\tresult.sort(function(a, b) {\r\n\t\t\treturn a - b;\r\n\t\t}).pop();\r\n\t\treturn result;\r\n\t},\r\n\r\n\tlog10: Math.log10 || function(x) {\r\n\t\tvar exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\r\n\t\t// Check for whole powers of 10,\r\n\t\t// which due to floating point rounding error should be corrected.\r\n\t\tvar powerOf10 = Math.round(exponent);\r\n\t\tvar isPowerOf10 = x === Math.pow(10, powerOf10);\r\n\r\n\t\treturn isPowerOf10 ? powerOf10 : exponent;\r\n\t}\r\n};\r\n\r\nvar helpers_math = exports$2;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.math.log10 instead.\r\n * @namespace Chart.helpers.log10\r\n * @deprecated since version 2.9.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.log10 = exports$2.log10;\n\nvar getRtlAdapter = function(rectX, width) {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn rectX + rectX + width - x;\r\n\t\t},\r\n\t\tsetWidth: function(w) {\r\n\t\t\twidth = w;\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\tif (align === 'center') {\r\n\t\t\t\treturn align;\r\n\t\t\t}\r\n\t\t\treturn align === 'right' ? 'left' : 'right';\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x - value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, itemWidth) {\r\n\t\t\treturn x - itemWidth;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getLtrAdapter = function() {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn x;\r\n\t\t},\r\n\t\tsetWidth: function(w) { // eslint-disable-line no-unused-vars\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\treturn align;\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x + value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars\r\n\t\t\treturn x;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getAdapter = function(rtl, rectX, width) {\r\n\treturn rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();\r\n};\r\n\r\nvar overrideTextDirection = function(ctx, direction) {\r\n\tvar style, original;\r\n\tif (direction === 'ltr' || direction === 'rtl') {\r\n\t\tstyle = ctx.canvas.style;\r\n\t\toriginal = [\r\n\t\t\tstyle.getPropertyValue('direction'),\r\n\t\t\tstyle.getPropertyPriority('direction'),\r\n\t\t];\r\n\r\n\t\tstyle.setProperty('direction', direction, 'important');\r\n\t\tctx.prevTextDirection = original;\r\n\t}\r\n};\r\n\r\nvar restoreTextDirection = function(ctx) {\r\n\tvar original = ctx.prevTextDirection;\r\n\tif (original !== undefined) {\r\n\t\tdelete ctx.prevTextDirection;\r\n\t\tctx.canvas.style.setProperty('direction', original[0], original[1]);\r\n\t}\r\n};\r\n\r\nvar helpers_rtl = {\r\n\tgetRtlAdapter: getAdapter,\r\n\toverrideTextDirection: overrideTextDirection,\r\n\trestoreTextDirection: restoreTextDirection,\r\n};\n\nvar helpers$1 = helpers_core;\r\nvar easing = helpers_easing;\r\nvar canvas = helpers_canvas;\r\nvar options = helpers_options;\r\nvar math = helpers_math;\r\nvar rtl = helpers_rtl;\nhelpers$1.easing = easing;\nhelpers$1.canvas = canvas;\nhelpers$1.options = options;\nhelpers$1.math = math;\nhelpers$1.rtl = rtl;\n\nfunction interpolate(start, view, model, ease) {\r\n\tvar keys = Object.keys(model);\r\n\tvar i, ilen, key, actual, origin, target, type, c0, c1;\r\n\r\n\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\tkey = keys[i];\r\n\r\n\t\ttarget = model[key];\r\n\r\n\t\t// if a value is added to the model after pivot() has been called, the view\r\n\t\t// doesn't contain it, so let's initialize the view to the target value.\r\n\t\tif (!view.hasOwnProperty(key)) {\r\n\t\t\tview[key] = target;\r\n\t\t}\r\n\r\n\t\tactual = view[key];\r\n\r\n\t\tif (actual === target || key[0] === '_') {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!start.hasOwnProperty(key)) {\r\n\t\t\tstart[key] = actual;\r\n\t\t}\r\n\r\n\t\torigin = start[key];\r\n\r\n\t\ttype = typeof target;\r\n\r\n\t\tif (type === typeof origin) {\r\n\t\t\tif (type === 'string') {\r\n\t\t\t\tc0 = chartjsColor(origin);\r\n\t\t\t\tif (c0.valid) {\r\n\t\t\t\t\tc1 = chartjsColor(target);\r\n\t\t\t\t\tif (c1.valid) {\r\n\t\t\t\t\t\tview[key] = c1.mix(c0, ease).rgbString();\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\r\n\t\t\t\tview[key] = origin + (target - origin) * ease;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tview[key] = target;\r\n\t}\r\n}\r\n\r\nvar Element = function(configuration) {\r\n\thelpers$1.extend(this, configuration);\r\n\tthis.initialize.apply(this, arguments);\r\n};\r\n\r\nhelpers$1.extend(Element.prototype, {\r\n\t_type: undefined,\r\n\r\n\tinitialize: function() {\r\n\t\tthis.hidden = false;\r\n\t},\r\n\r\n\tpivot: function() {\r\n\t\tvar me = this;\r\n\t\tif (!me._view) {\r\n\t\t\tme._view = helpers$1.extend({}, me._model);\r\n\t\t}\r\n\t\tme._start = {};\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttransition: function(ease) {\r\n\t\tvar me = this;\r\n\t\tvar model = me._model;\r\n\t\tvar start = me._start;\r\n\t\tvar view = me._view;\r\n\r\n\t\t// No animation -> No Transition\r\n\t\tif (!model || ease === 1) {\r\n\t\t\tme._view = helpers$1.extend({}, model);\r\n\t\t\tme._start = null;\r\n\t\t\treturn me;\r\n\t\t}\r\n\r\n\t\tif (!view) {\r\n\t\t\tview = me._view = {};\r\n\t\t}\r\n\r\n\t\tif (!start) {\r\n\t\t\tstart = me._start = {};\r\n\t\t}\r\n\r\n\t\tinterpolate(start, view, model, ease);\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\treturn {\r\n\t\t\tx: this._model.x,\r\n\t\t\ty: this._model.y\r\n\t\t};\r\n\t},\r\n\r\n\thasValue: function() {\r\n\t\treturn helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\r\n\t}\r\n});\r\n\r\nElement.extend = helpers$1.inherits;\r\n\r\nvar core_element = Element;\n\nvar exports$3 = core_element.extend({\r\n\tchart: null, // the animation associated chart instance\r\n\tcurrentStep: 0, // the current animation step\r\n\tnumSteps: 60, // default number of steps\r\n\teasing: '', // the easing to use for this animation\r\n\trender: null, // render function used by the animation service\r\n\r\n\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\r\n\tonAnimationComplete: null, // user specified callback to fire when the animation finishes\r\n});\r\n\r\nvar core_animation = exports$3;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation instead\r\n * @prop Chart.Animation#animationObject\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'animationObject', {\r\n\tget: function() {\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation#chart instead\r\n * @prop Chart.Animation#chartInstance\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'chartInstance', {\r\n\tget: function() {\r\n\t\treturn this.chart;\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.chart = value;\r\n\t}\r\n});\n\ncore_defaults._set('global', {\r\n\tanimation: {\r\n\t\tduration: 1000,\r\n\t\teasing: 'easeOutQuart',\r\n\t\tonProgress: helpers$1.noop,\r\n\t\tonComplete: helpers$1.noop\r\n\t}\r\n});\r\n\r\nvar core_animations = {\r\n\tanimations: [],\r\n\trequest: null,\r\n\r\n\t/**\r\n\t * @param {Chart} chart - The chart to animate.\r\n\t * @param {Chart.Animation} animation - The animation that we will animate.\r\n\t * @param {number} duration - The animation duration in ms.\r\n\t * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\r\n\t */\r\n\taddAnimation: function(chart, animation, duration, lazy) {\r\n\t\tvar animations = this.animations;\r\n\t\tvar i, ilen;\r\n\r\n\t\tanimation.chart = chart;\r\n\t\tanimation.startTime = Date.now();\r\n\t\tanimation.duration = duration;\r\n\r\n\t\tif (!lazy) {\r\n\t\t\tchart.animating = true;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = animations.length; i < ilen; ++i) {\r\n\t\t\tif (animations[i].chart === chart) {\r\n\t\t\t\tanimations[i] = animation;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tanimations.push(animation);\r\n\r\n\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\r\n\t\tif (animations.length === 1) {\r\n\t\t\tthis.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\tcancelAnimation: function(chart) {\r\n\t\tvar index = helpers$1.findIndex(this.animations, function(animation) {\r\n\t\t\treturn animation.chart === chart;\r\n\t\t});\r\n\r\n\t\tif (index !== -1) {\r\n\t\t\tthis.animations.splice(index, 1);\r\n\t\t\tchart.animating = false;\r\n\t\t}\r\n\t},\r\n\r\n\trequestAnimationFrame: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.request === null) {\r\n\t\t\t// Skip animation frame requests until the active one is executed.\r\n\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\r\n\t\t\t// and 'mouseout' events will trigger multiple renders.\r\n\t\t\tme.request = helpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tme.request = null;\r\n\t\t\t\tme.startDigest();\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tstartDigest: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tme.advance();\r\n\r\n\t\t// Do we have more stuff to animate?\r\n\t\tif (me.animations.length > 0) {\r\n\t\t\tme.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tadvance: function() {\r\n\t\tvar animations = this.animations;\r\n\t\tvar animation, chart, numSteps, nextStep;\r\n\t\tvar i = 0;\r\n\r\n\t\t// 1 animation per chart, so we are looping charts here\r\n\t\twhile (i < animations.length) {\r\n\t\t\tanimation = animations[i];\r\n\t\t\tchart = animation.chart;\r\n\t\t\tnumSteps = animation.numSteps;\r\n\r\n\t\t\t// Make sure that currentStep starts at 1\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/6104\r\n\t\t\tnextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\r\n\t\t\tanimation.currentStep = Math.min(nextStep, numSteps);\r\n\r\n\t\t\thelpers$1.callback(animation.render, [chart, animation], chart);\r\n\t\t\thelpers$1.callback(animation.onAnimationProgress, [animation], chart);\r\n\r\n\t\t\tif (animation.currentStep >= numSteps) {\r\n\t\t\t\thelpers$1.callback(animation.onAnimationComplete, [animation], chart);\r\n\t\t\t\tchart.animating = false;\r\n\t\t\t\tanimations.splice(i, 1);\r\n\t\t\t} else {\r\n\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar resolve = helpers$1.options.resolve;\r\n\r\nvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\r\n\r\n/**\r\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\r\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\r\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\r\n */\r\nfunction listenArrayEvents(array, listener) {\r\n\tif (array._chartjs) {\r\n\t\tarray._chartjs.listeners.push(listener);\r\n\t\treturn;\r\n\t}\r\n\r\n\tObject.defineProperty(array, '_chartjs', {\r\n\t\tconfigurable: true,\r\n\t\tenumerable: false,\r\n\t\tvalue: {\r\n\t\t\tlisteners: [listener]\r\n\t\t}\r\n\t});\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\r\n\t\tvar base = array[key];\r\n\r\n\t\tObject.defineProperty(array, key, {\r\n\t\t\tconfigurable: true,\r\n\t\t\tenumerable: false,\r\n\t\t\tvalue: function() {\r\n\t\t\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\t\t\tvar res = base.apply(this, args);\r\n\r\n\t\t\t\thelpers$1.each(array._chartjs.listeners, function(object) {\r\n\t\t\t\t\tif (typeof object[method] === 'function') {\r\n\t\t\t\t\t\tobject[method].apply(object, args);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Removes the given array event listener and cleanup extra attached properties (such as\r\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\r\n */\r\nfunction unlistenArrayEvents(array, listener) {\r\n\tvar stub = array._chartjs;\r\n\tif (!stub) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar listeners = stub.listeners;\r\n\tvar index = listeners.indexOf(listener);\r\n\tif (index !== -1) {\r\n\t\tlisteners.splice(index, 1);\r\n\t}\r\n\r\n\tif (listeners.length > 0) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tdelete array[key];\r\n\t});\r\n\r\n\tdelete array._chartjs;\r\n}\r\n\r\n// Base class for all dataset controllers (line, bar, etc)\r\nvar DatasetController = function(chart, datasetIndex) {\r\n\tthis.initialize(chart, datasetIndex);\r\n};\r\n\r\nhelpers$1.extend(DatasetController.prototype, {\r\n\r\n\t/**\r\n\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdatasetElementType: null,\r\n\r\n\t/**\r\n\t * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdataElementType: null,\r\n\r\n\t/**\r\n\t * Dataset element option keys to be resolved in _resolveDatasetElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth'\r\n\t],\r\n\r\n\t/**\r\n\t * Data element option keys to be resolved in _resolveDataElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'pointStyle'\r\n\t],\r\n\r\n\tinitialize: function(chart, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tme.chart = chart;\r\n\t\tme.index = datasetIndex;\r\n\t\tme.linkScales();\r\n\t\tme.addElements();\r\n\t\tme._type = me.getMeta().type;\r\n\t},\r\n\r\n\tupdateIndex: function(datasetIndex) {\r\n\t\tthis.index = datasetIndex;\r\n\t},\r\n\r\n\tlinkScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar chart = me.chart;\r\n\t\tvar scales = chart.scales;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scalesOpts = chart.options.scales;\r\n\r\n\t\tif (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {\r\n\t\t\tmeta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;\r\n\t\t}\r\n\t\tif (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {\r\n\t\t\tmeta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;\r\n\t\t}\r\n\t},\r\n\r\n\tgetDataset: function() {\r\n\t\treturn this.chart.data.datasets[this.index];\r\n\t},\r\n\r\n\tgetMeta: function() {\r\n\t\treturn this.chart.getDatasetMeta(this.index);\r\n\t},\r\n\r\n\tgetScaleForId: function(scaleID) {\r\n\t\treturn this.chart.scales[scaleID];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScale: function() {\r\n\t\treturn this.getScaleForId(this._getValueScaleId());\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScale: function() {\r\n\t\treturn this.getScaleForId(this._getIndexScaleId());\r\n\t},\r\n\r\n\treset: function() {\r\n\t\tthis._update(true);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroy: function() {\r\n\t\tif (this._data) {\r\n\t\t\tunlistenArrayEvents(this._data, this);\r\n\t\t}\r\n\t},\r\n\r\n\tcreateMetaDataset: function() {\r\n\t\tvar me = this;\r\n\t\tvar type = me.datasetElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index\r\n\t\t});\r\n\t},\r\n\r\n\tcreateMetaData: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar type = me.dataElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index\r\n\t\t});\r\n\t},\r\n\r\n\taddElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data || [];\r\n\t\tvar metaData = meta.data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = data.length; i < ilen; ++i) {\r\n\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\r\n\t\t}\r\n\r\n\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\r\n\t},\r\n\r\n\taddElementAndReset: function(index) {\r\n\t\tvar element = this.createMetaData(index);\r\n\t\tthis.getMeta().data.splice(index, 0, element);\r\n\t\tthis.updateElement(element, index, true);\r\n\t},\r\n\r\n\tbuildOrUpdateElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar data = dataset.data || (dataset.data = []);\r\n\r\n\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\r\n\t\t// real-time charts), we need to monitor these data modifications and synchronize\r\n\t\t// the internal meta data accordingly.\r\n\t\tif (me._data !== data) {\r\n\t\t\tif (me._data) {\r\n\t\t\t\t// This case happens when the user replaced the data array instance.\r\n\t\t\t\tunlistenArrayEvents(me._data, me);\r\n\t\t\t}\r\n\r\n\t\t\tif (data && Object.isExtensible(data)) {\r\n\t\t\t\tlistenArrayEvents(data, me);\r\n\t\t\t}\r\n\t\t\tme._data = data;\r\n\t\t}\r\n\r\n\t\t// Re-sync meta data in case the user replaced the data array or if we missed\r\n\t\t// any updates and so make sure that we handle number of datapoints changing.\r\n\t\tme.resyncElements();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the merged user-supplied and default dataset-level options\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tme._config = helpers$1.merge(Object.create(null), [\r\n\t\t\tme.chart.options.datasets[me._type],\r\n\t\t\tme.getDataset(),\r\n\t\t], {\r\n\t\t\tmerger: function(key, target, source) {\r\n\t\t\t\tif (key !== '_meta' && key !== 'data') {\r\n\t\t\t\t\thelpers$1._merger(key, target, source);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t_update: function(reset) {\r\n\t\tvar me = this;\r\n\t\tme._configure();\r\n\t\tme._cachedDataOpts = null;\r\n\t\tme.update(reset);\r\n\t},\r\n\r\n\tupdate: helpers$1.noop,\r\n\r\n\ttransition: function(easingValue) {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].transition(easingValue);\r\n\t\t}\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.transition(easingValue);\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.draw();\r\n\t\t}\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].draw();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a set of predefined style properties that should be used to represent the dataset\r\n\t * or the data if the index is specified\r\n\t * @param {number} index - data index\r\n\t * @return {IStyleInterface} style object\r\n\t */\r\n\tgetStyle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = meta.dataset;\r\n\t\tvar style;\r\n\r\n\t\tme._configure();\r\n\t\tif (dataset && index === undefined) {\r\n\t\t\tstyle = me._resolveDatasetElementOptions(dataset || {});\r\n\t\t} else {\r\n\t\t\tindex = index || 0;\r\n\t\t\tstyle = me._resolveDataElementOptions(meta.data[index] || {}, index);\r\n\t\t}\r\n\r\n\t\tif (style.fill === false || style.fill === null) {\r\n\t\t\tstyle.backgroundColor = style.borderColor;\r\n\t\t}\r\n\r\n\t\treturn style;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element, hover) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = chart.options.elements[me.datasetElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._datasetElementOptions;\r\n\t\tvar values = {};\r\n\t\tvar i, ilen, key, readKey;\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index,\r\n\t\t\thover: hover\r\n\t\t};\r\n\r\n\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\tkey = elementOptions[i];\r\n\t\t\treadKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;\r\n\t\t\tvalues[key] = resolve([\r\n\t\t\t\tcustom[readKey],\r\n\t\t\t\tdatasetOpts[readKey],\r\n\t\t\t\toptions[readKey]\r\n\t\t\t], context);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(element, index) {\r\n\t\tvar me = this;\r\n\t\tvar custom = element && element.custom;\r\n\t\tvar cached = me._cachedDataOpts;\r\n\t\tif (cached && !custom) {\r\n\t\t\treturn cached;\r\n\t\t}\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar options = chart.options.elements[me.dataElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._dataElementOptions;\r\n\t\tvar values = {};\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// `resolve` sets cacheable to `false` if any option is indexed or scripted\r\n\t\tvar info = {cacheable: !custom};\r\n\r\n\t\tvar keys, i, ilen, key;\r\n\r\n\t\tcustom = custom || {};\r\n\r\n\t\tif (helpers$1.isArray(elementOptions)) {\r\n\t\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\t\tkey = elementOptions[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkeys = Object.keys(elementOptions);\r\n\t\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\t\tkey = keys[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[elementOptions[key]],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (info.cacheable) {\r\n\t\t\tme._cachedDataOpts = Object.freeze(values);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tremoveHoverStyle: function(element) {\r\n\t\thelpers$1.merge(element._model, element.$previousStyle || {});\r\n\t\tdelete element.$previousStyle;\r\n\t},\r\n\r\n\tsetHoverStyle: function(element) {\r\n\t\tvar dataset = this.chart.data.datasets[element._datasetIndex];\r\n\t\tvar index = element._index;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar model = element._model;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\telement.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\r\n\t\tmodel.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\r\n\t\tmodel.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_removeDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\r\n\t\tif (element) {\r\n\t\t\tthis.removeHoverStyle(element);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_setDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\t\tvar prev = {};\r\n\t\tvar i, ilen, key, keys, hoverOptions, model;\r\n\r\n\t\tif (!element) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodel = element._model;\r\n\t\thoverOptions = this._resolveDatasetElementOptions(element, true);\r\n\r\n\t\tkeys = Object.keys(hoverOptions);\r\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\tkey = keys[i];\r\n\t\t\tprev[key] = model[key];\r\n\t\t\tmodel[key] = hoverOptions[key];\r\n\t\t}\r\n\r\n\t\telement.$previousStyle = prev;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tresyncElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data;\r\n\t\tvar numMeta = meta.data.length;\r\n\t\tvar numData = data.length;\r\n\r\n\t\tif (numData < numMeta) {\r\n\t\t\tmeta.data.splice(numData, numMeta - numData);\r\n\t\t} else if (numData > numMeta) {\r\n\t\t\tme.insertElements(numMeta, numData - numMeta);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinsertElements: function(start, count) {\r\n\t\tfor (var i = 0; i < count; ++i) {\r\n\t\t\tthis.addElementAndReset(start + i);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPush: function() {\r\n\t\tvar count = arguments.length;\r\n\t\tthis.insertElements(this.getDataset().data.length - count, count);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPop: function() {\r\n\t\tthis.getMeta().data.pop();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataShift: function() {\r\n\t\tthis.getMeta().data.shift();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataSplice: function(start, count) {\r\n\t\tthis.getMeta().data.splice(start, count);\r\n\t\tthis.insertElements(start, arguments.length - 2);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataUnshift: function() {\r\n\t\tthis.insertElements(0, arguments.length);\r\n\t}\r\n});\r\n\r\nDatasetController.extend = helpers$1.inherits;\r\n\r\nvar core_datasetController = DatasetController;\n\nvar TAU = Math.PI * 2;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tarc: {\r\n\t\t\tbackgroundColor: core_defaults.global.defaultColor,\r\n\t\t\tborderColor: '#fff',\r\n\t\t\tborderWidth: 2,\r\n\t\t\tborderAlign: 'center'\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction clipArc(ctx, arc) {\r\n\tvar startAngle = arc.startAngle;\r\n\tvar endAngle = arc.endAngle;\r\n\tvar pixelMargin = arc.pixelMargin;\r\n\tvar angleMargin = pixelMargin / arc.outerRadius;\r\n\tvar x = arc.x;\r\n\tvar y = arc.y;\r\n\r\n\t// Draw an inner border by cliping the arc and drawing a double-width border\r\n\t// Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\r\n\tctx.beginPath();\r\n\tctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);\r\n\tif (arc.innerRadius > pixelMargin) {\r\n\t\tangleMargin = pixelMargin / arc.innerRadius;\r\n\t\tctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);\r\n\t} else {\r\n\t\tctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);\r\n\t}\r\n\tctx.closePath();\r\n\tctx.clip();\r\n}\r\n\r\nfunction drawFullCircleBorders(ctx, vm, arc, inner) {\r\n\tvar endAngle = arc.endAngle;\r\n\tvar i;\r\n\r\n\tif (inner) {\r\n\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\tclipArc(ctx, arc);\r\n\t\tarc.endAngle = endAngle;\r\n\t\tif (arc.endAngle === arc.startAngle && arc.fullCircles) {\r\n\t\t\tarc.endAngle += TAU;\r\n\t\t\tarc.fullCircles--;\r\n\t\t}\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n}\r\n\r\nfunction drawBorder(ctx, vm, arc) {\r\n\tvar inner = vm.borderAlign === 'inner';\r\n\r\n\tif (inner) {\r\n\t\tctx.lineWidth = vm.borderWidth * 2;\r\n\t\tctx.lineJoin = 'round';\r\n\t} else {\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tctx.lineJoin = 'bevel';\r\n\t}\r\n\r\n\tif (arc.fullCircles) {\r\n\t\tdrawFullCircleBorders(ctx, vm, arc, inner);\r\n\t}\r\n\r\n\tif (inner) {\r\n\t\tclipArc(ctx, arc);\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n}\r\n\r\nvar element_arc = core_element.extend({\r\n\t_type: 'arc',\r\n\r\n\tinLabelRange: function(mouseX) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tinRange: function(chartX, chartY) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\tvar pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});\r\n\t\t\tvar angle = pointRelativePosition.angle;\r\n\t\t\tvar distance = pointRelativePosition.distance;\r\n\r\n\t\t\t// Sanitise angle range\r\n\t\t\tvar startAngle = vm.startAngle;\r\n\t\t\tvar endAngle = vm.endAngle;\r\n\t\t\twhile (endAngle < startAngle) {\r\n\t\t\t\tendAngle += TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle > endAngle) {\r\n\t\t\t\tangle -= TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle < startAngle) {\r\n\t\t\t\tangle += TAU;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if within the range of the open/close angle\r\n\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle);\r\n\t\t\tvar withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\r\n\r\n\t\t\treturn (betweenAngles && withinRadius);\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\r\n\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\r\n\t\treturn {\r\n\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\r\n\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);\r\n\t\tvar rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\r\n\r\n\t\treturn {\r\n\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\r\n\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;\r\n\t\tvar arc = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tinnerRadius: vm.innerRadius,\r\n\t\t\touterRadius: Math.max(vm.outerRadius - pixelMargin, 0),\r\n\t\t\tpixelMargin: pixelMargin,\r\n\t\t\tstartAngle: vm.startAngle,\r\n\t\t\tendAngle: vm.endAngle,\r\n\t\t\tfullCircles: Math.floor(vm.circumference / TAU)\r\n\t\t};\r\n\t\tvar i;\r\n\r\n\t\tctx.save();\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\r\n\t\tif (arc.fullCircles) {\r\n\t\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\t\tctx.closePath();\r\n\t\t\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\t\t\tctx.fill();\r\n\t\t\t}\r\n\t\t\tarc.endAngle = arc.startAngle + vm.circumference % TAU;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\tctx.closePath();\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth) {\r\n\t\t\tdrawBorder(ctx, vm, arc);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$1 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tline: {\r\n\t\t\ttension: 0.4,\r\n\t\t\tbackgroundColor: defaultColor,\r\n\t\t\tborderWidth: 3,\r\n\t\t\tborderColor: defaultColor,\r\n\t\t\tborderCapStyle: 'butt',\r\n\t\t\tborderDash: [],\r\n\t\t\tborderDashOffset: 0.0,\r\n\t\t\tborderJoinStyle: 'miter',\r\n\t\t\tcapBezierPoints: true,\r\n\t\t\tfill: true, // do we fill in the area between the line and its base axis\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar element_line = core_element.extend({\r\n\t_type: 'line',\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar vm = me._view;\r\n\t\tvar ctx = me._chart.ctx;\r\n\t\tvar spanGaps = vm.spanGaps;\r\n\t\tvar points = me._children.slice(); // clone array\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar globalOptionLineElements = globalDefaults.elements.line;\r\n\t\tvar lastDrawnIndex = -1;\r\n\t\tvar closePath = me._loop;\r\n\t\tvar index, previous, currentVM;\r\n\r\n\t\tif (!points.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (me._loop) {\r\n\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\tprevious = helpers$1.previousItem(points, index);\r\n\t\t\t\t// If the line has an open path, shift the point array\r\n\t\t\t\tif (!points[index]._view.skip && previous._view.skip) {\r\n\t\t\t\t\tpoints = points.slice(index).concat(points.slice(0, index));\r\n\t\t\t\t\tclosePath = spanGaps;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the line has a close path, add the first point again\r\n\t\t\tif (closePath) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\r\n\t\t// Stroke Line Options\r\n\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\r\n\r\n\t\t// IE 9 and 10 do not support line dash\r\n\t\tif (ctx.setLineDash) {\r\n\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\r\n\t\t}\r\n\r\n\t\tctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\r\n\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\r\n\t\tctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\r\n\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\r\n\r\n\t\t// Stroke Line\r\n\t\tctx.beginPath();\r\n\r\n\t\t// First point moves to it's starting position no matter what\r\n\t\tcurrentVM = points[0]._view;\r\n\t\tif (!currentVM.skip) {\r\n\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\tlastDrawnIndex = 0;\r\n\t\t}\r\n\r\n\t\tfor (index = 1; index < points.length; ++index) {\r\n\t\t\tcurrentVM = points[index]._view;\r\n\t\t\tprevious = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];\r\n\r\n\t\t\tif (!currentVM.skip) {\r\n\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\r\n\t\t\t\t\t// There was a gap and this is the first point after the gap\r\n\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Line to next point\r\n\t\t\t\t\thelpers$1.canvas.lineTo(ctx, previous._view, currentVM);\r\n\t\t\t\t}\r\n\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (closePath) {\r\n\t\t\tctx.closePath();\r\n\t\t}\r\n\r\n\t\tctx.stroke();\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$2 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor$1 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tpoint: {\r\n\t\t\tradius: 3,\r\n\t\t\tpointStyle: 'circle',\r\n\t\t\tbackgroundColor: defaultColor$1,\r\n\t\t\tborderColor: defaultColor$1,\r\n\t\t\tborderWidth: 1,\r\n\t\t\t// Hover\r\n\t\t\thitRadius: 1,\r\n\t\t\thoverRadius: 4,\r\n\t\t\thoverBorderWidth: 1\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction xRange(mouseX) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nfunction yRange(mouseY) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nvar element_point = core_element.extend({\r\n\t_type: 'point',\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\r\n\t},\r\n\r\n\tinLabelRange: xRange,\r\n\tinXRange: xRange,\r\n\tinYRange: yRange,\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\treturn Math.PI * Math.pow(this._view.radius, 2);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tpadding: vm.radius + vm.borderWidth\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar vm = this._view;\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar pointStyle = vm.pointStyle;\r\n\t\tvar rotation = vm.rotation;\r\n\t\tvar radius = vm.radius;\r\n\t\tvar x = vm.x;\r\n\t\tvar y = vm.y;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\r\n\r\n\t\tif (vm.skip) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Clipping for Points.\r\n\t\tif (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\r\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\r\n\t\t\tctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\r\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\r\n\t\t\thelpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\r\n\t\t}\r\n\t}\r\n});\n\nvar defaultColor$2 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tbackgroundColor: defaultColor$2,\r\n\t\t\tborderColor: defaultColor$2,\r\n\t\t\tborderSkipped: 'bottom',\r\n\t\t\tborderWidth: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction isVertical(vm) {\r\n\treturn vm && vm.width !== undefined;\r\n}\r\n\r\n/**\r\n * Helper function to get the bounds of the bar regardless of the orientation\r\n * @param bar {Chart.Element.Rectangle} the bar\r\n * @return {Bounds} bounds of the bar\r\n * @private\r\n */\r\nfunction getBarBounds(vm) {\r\n\tvar x1, x2, y1, y2, half;\r\n\r\n\tif (isVertical(vm)) {\r\n\t\thalf = vm.width / 2;\r\n\t\tx1 = vm.x - half;\r\n\t\tx2 = vm.x + half;\r\n\t\ty1 = Math.min(vm.y, vm.base);\r\n\t\ty2 = Math.max(vm.y, vm.base);\r\n\t} else {\r\n\t\thalf = vm.height / 2;\r\n\t\tx1 = Math.min(vm.x, vm.base);\r\n\t\tx2 = Math.max(vm.x, vm.base);\r\n\t\ty1 = vm.y - half;\r\n\t\ty2 = vm.y + half;\r\n\t}\r\n\r\n\treturn {\r\n\t\tleft: x1,\r\n\t\ttop: y1,\r\n\t\tright: x2,\r\n\t\tbottom: y2\r\n\t};\r\n}\r\n\r\nfunction swap(orig, v1, v2) {\r\n\treturn orig === v1 ? v2 : orig === v2 ? v1 : orig;\r\n}\r\n\r\nfunction parseBorderSkipped(vm) {\r\n\tvar edge = vm.borderSkipped;\r\n\tvar res = {};\r\n\r\n\tif (!edge) {\r\n\t\treturn res;\r\n\t}\r\n\r\n\tif (vm.horizontal) {\r\n\t\tif (vm.base > vm.x) {\r\n\t\t\tedge = swap(edge, 'left', 'right');\r\n\t\t}\r\n\t} else if (vm.base < vm.y) {\r\n\t\tedge = swap(edge, 'bottom', 'top');\r\n\t}\r\n\r\n\tres[edge] = true;\r\n\treturn res;\r\n}\r\n\r\nfunction parseBorderWidth(vm, maxW, maxH) {\r\n\tvar value = vm.borderWidth;\r\n\tvar skip = parseBorderSkipped(vm);\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = +value.top || 0;\r\n\t\tr = +value.right || 0;\r\n\t\tb = +value.bottom || 0;\r\n\t\tl = +value.left || 0;\r\n\t} else {\r\n\t\tt = r = b = l = +value || 0;\r\n\t}\r\n\r\n\treturn {\r\n\t\tt: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,\r\n\t\tr: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,\r\n\t\tb: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,\r\n\t\tl: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l\r\n\t};\r\n}\r\n\r\nfunction boundingRects(vm) {\r\n\tvar bounds = getBarBounds(vm);\r\n\tvar width = bounds.right - bounds.left;\r\n\tvar height = bounds.bottom - bounds.top;\r\n\tvar border = parseBorderWidth(vm, width / 2, height / 2);\r\n\r\n\treturn {\r\n\t\touter: {\r\n\t\t\tx: bounds.left,\r\n\t\t\ty: bounds.top,\r\n\t\t\tw: width,\r\n\t\t\th: height\r\n\t\t},\r\n\t\tinner: {\r\n\t\t\tx: bounds.left + border.l,\r\n\t\t\ty: bounds.top + border.t,\r\n\t\t\tw: width - border.l - border.r,\r\n\t\t\th: height - border.t - border.b\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction inRange(vm, x, y) {\r\n\tvar skipX = x === null;\r\n\tvar skipY = y === null;\r\n\tvar bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);\r\n\r\n\treturn bounds\r\n\t\t&& (skipX || x >= bounds.left && x <= bounds.right)\r\n\t\t&& (skipY || y >= bounds.top && y <= bounds.bottom);\r\n}\r\n\r\nvar element_rectangle = core_element.extend({\r\n\t_type: 'rectangle',\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar rects = boundingRects(vm);\r\n\t\tvar outer = rects.outer;\r\n\t\tvar inner = rects.inner;\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.fillRect(outer.x, outer.y, outer.w, outer.h);\r\n\r\n\t\tif (outer.w === inner.w && outer.h === inner.h) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(outer.x, outer.y, outer.w, outer.h);\r\n\t\tctx.clip();\r\n\t\tctx.fillStyle = vm.borderColor;\r\n\t\tctx.rect(inner.x, inner.y, inner.w, inner.h);\r\n\t\tctx.fill('evenodd');\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\theight: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm.base - vm.y;\r\n\t},\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\treturn inRange(this._view, mouseX, mouseY);\r\n\t},\r\n\r\n\tinLabelRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn isVertical(vm)\r\n\t\t\t? inRange(vm, mouseX, null)\r\n\t\t\t: inRange(vm, null, mouseY);\r\n\t},\r\n\r\n\tinXRange: function(mouseX) {\r\n\t\treturn inRange(this._view, mouseX, null);\r\n\t},\r\n\r\n\tinYRange: function(mouseY) {\r\n\t\treturn inRange(this._view, null, mouseY);\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar x, y;\r\n\t\tif (isVertical(vm)) {\r\n\t\t\tx = vm.x;\r\n\t\t\ty = (vm.y + vm.base) / 2;\r\n\t\t} else {\r\n\t\t\tx = (vm.x + vm.base) / 2;\r\n\t\t\ty = vm.y;\r\n\t\t}\r\n\r\n\t\treturn {x: x, y: y};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\r\n\t\treturn isVertical(vm)\r\n\t\t\t? vm.width * Math.abs(vm.y - vm.base)\r\n\t\t\t: vm.height * Math.abs(vm.x - vm.base);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t}\r\n});\n\nvar elements = {};\r\nvar Arc = element_arc;\r\nvar Line = element_line;\r\nvar Point = element_point;\r\nvar Rectangle = element_rectangle;\nelements.Arc = Arc;\nelements.Line = Line;\nelements.Point = Point;\nelements.Rectangle = Rectangle;\n\nvar deprecated = helpers$1._deprecated;\r\nvar valueOrDefault$3 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('bar', {\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tbar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\r\n * @private\r\n */\r\nfunction computeMinSampleSize(scale, pixels) {\r\n\tvar min = scale._length;\r\n\tvar prev, curr, i, ilen;\r\n\r\n\tfor (i = 1, ilen = pixels.length; i < ilen; ++i) {\r\n\t\tmin = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\r\n\t}\r\n\r\n\tfor (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {\r\n\t\tcurr = scale.getPixelForTick(i);\r\n\t\tmin = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;\r\n\t\tprev = curr;\r\n\t}\r\n\r\n\treturn min;\r\n}\r\n\r\n/**\r\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\r\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\r\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\r\n * @private\r\n */\r\nfunction computeFitCategoryTraits(index, ruler, options) {\r\n\tvar thickness = options.barThickness;\r\n\tvar count = ruler.stackCount;\r\n\tvar curr = ruler.pixels[index];\r\n\tvar min = helpers$1.isNullOrUndef(thickness)\r\n\t\t? computeMinSampleSize(ruler.scale, ruler.pixels)\r\n\t\t: -1;\r\n\tvar size, ratio;\r\n\r\n\tif (helpers$1.isNullOrUndef(thickness)) {\r\n\t\tsize = min * options.categoryPercentage;\r\n\t\tratio = options.barPercentage;\r\n\t} else {\r\n\t\t// When bar thickness is enforced, category and bar percentages are ignored.\r\n\t\t// Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\r\n\t\t// and deprecate barPercentage since this value is ignored when thickness is absolute.\r\n\t\tsize = thickness * count;\r\n\t\tratio = 1;\r\n\t}\r\n\r\n\treturn {\r\n\t\tchunk: size / count,\r\n\t\tratio: ratio,\r\n\t\tstart: curr - (size / 2)\r\n\t};\r\n}\r\n\r\n/**\r\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\r\n * percentage options are 1), based on the previous and following categories. This mode\r\n * generates bars with different widths when data are not evenly spaced.\r\n * @private\r\n */\r\nfunction computeFlexCategoryTraits(index, ruler, options) {\r\n\tvar pixels = ruler.pixels;\r\n\tvar curr = pixels[index];\r\n\tvar prev = index > 0 ? pixels[index - 1] : null;\r\n\tvar next = index < pixels.length - 1 ? pixels[index + 1] : null;\r\n\tvar percent = options.categoryPercentage;\r\n\tvar start, size;\r\n\r\n\tif (prev === null) {\r\n\t\t// first data: its size is double based on the next point or,\r\n\t\t// if it's also the last data, we use the scale size.\r\n\t\tprev = curr - (next === null ? ruler.end - ruler.start : next - curr);\r\n\t}\r\n\r\n\tif (next === null) {\r\n\t\t// last data: its size is also double based on the previous point.\r\n\t\tnext = curr + curr - prev;\r\n\t}\r\n\r\n\tstart = curr - (curr - Math.min(prev, next)) / 2 * percent;\r\n\tsize = Math.abs(next - prev) / 2 * percent;\r\n\r\n\treturn {\r\n\t\tchunk: size / ruler.stackCount,\r\n\t\tratio: options.barPercentage,\r\n\t\tstart: start\r\n\t};\r\n}\r\n\r\nvar controller_bar = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Rectangle,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderSkipped',\r\n\t\t'borderWidth',\r\n\t\t'barPercentage',\r\n\t\t'barThickness',\r\n\t\t'categoryPercentage',\r\n\t\t'maxBarThickness',\r\n\t\t'minBarLength'\r\n\t],\r\n\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta, scaleOpts;\r\n\r\n\t\tcore_datasetController.prototype.initialize.apply(me, arguments);\r\n\r\n\t\tmeta = me.getMeta();\r\n\t\tmeta.stack = me.getDataset().stack;\r\n\t\tmeta.bar = true;\r\n\r\n\t\tscaleOpts = me._getIndexScale().options;\r\n\t\tdeprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');\r\n\t\tdeprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');\r\n\t\tdeprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');\r\n\t\tdeprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');\r\n\t\tdeprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._ruler = me.getRuler();\r\n\r\n\t\tfor (i = 0, ilen = rects.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(rects[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(rectangle, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar options = me._resolveDataElementOptions(rectangle, index);\r\n\r\n\t\trectangle._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\trectangle._yScale = me.getScaleForId(meta.yAxisID);\r\n\t\trectangle._datasetIndex = me.index;\r\n\t\trectangle._index = index;\r\n\t\trectangle._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderSkipped: options.borderSkipped,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\tdatasetLabel: dataset.label,\r\n\t\t\tlabel: me.chart.data.labels[index]\r\n\t\t};\r\n\r\n\t\tif (helpers$1.isArray(dataset.data[index])) {\r\n\t\t\trectangle._model.borderSkipped = null;\r\n\t\t}\r\n\r\n\t\tme._updateElementGeometry(rectangle, index, reset, options);\r\n\r\n\t\trectangle.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateElementGeometry: function(rectangle, index, reset, options) {\r\n\t\tvar me = this;\r\n\t\tvar model = rectangle._model;\r\n\t\tvar vscale = me._getValueScale();\r\n\t\tvar base = vscale.getBasePixel();\r\n\t\tvar horizontal = vscale.isHorizontal();\r\n\t\tvar ruler = me._ruler || me.getRuler();\r\n\t\tvar vpixels = me.calculateBarValuePixels(me.index, index, options);\r\n\t\tvar ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);\r\n\r\n\t\tmodel.horizontal = horizontal;\r\n\t\tmodel.base = reset ? base : vpixels.base;\r\n\t\tmodel.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\r\n\t\tmodel.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\r\n\t\tmodel.height = horizontal ? ipixels.size : undefined;\r\n\t\tmodel.width = horizontal ? undefined : ipixels.size;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stacks based on groups and bar visibility.\r\n\t * @param {number} [last] - The dataset index\r\n\t * @returns {string[]} The list of stack IDs\r\n\t * @private\r\n\t */\r\n\t_getStacks: function(last) {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar stacks = [];\r\n\t\tvar i, meta;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\t// stacked   | meta.stack\r\n\t\t\t//           | found | not found | undefined\r\n\t\t\t// false     |   x   |     x     |     x\r\n\t\t\t// true      |       |     x     |\r\n\t\t\t// undefined |       |     x     |     x\r\n\t\t\tif (stacked === false || stacks.indexOf(meta.stack) === -1 ||\r\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\r\n\t\t\t\tstacks.push(meta.stack);\r\n\t\t\t}\r\n\t\t\tif (meta.index === last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn stacks;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the effective number of stacks based on groups and bar visibility.\r\n\t * @private\r\n\t */\r\n\tgetStackCount: function() {\r\n\t\treturn this._getStacks().length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\r\n\t * @param {number} [datasetIndex] - The dataset index\r\n\t * @param {string} [name] - The stack name to find\r\n\t * @returns {number} The stack index\r\n\t * @private\r\n\t */\r\n\tgetStackIndex: function(datasetIndex, name) {\r\n\t\tvar stacks = this._getStacks(datasetIndex);\r\n\t\tvar index = (name !== undefined)\r\n\t\t\t? stacks.indexOf(name)\r\n\t\t\t: -1; // indexOf returns -1 if element is not present\r\n\r\n\t\treturn (index === -1)\r\n\t\t\t? stacks.length - 1\r\n\t\t\t: index;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetRuler: function() {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar pixels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\r\n\t\t\tpixels.push(scale.getPixelForValue(null, i, me.index));\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tpixels: pixels,\r\n\t\t\tstart: scale._startPixel,\r\n\t\t\tend: scale._endPixel,\r\n\t\t\tstackCount: me.getStackCount(),\r\n\t\t\tscale: scale\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Note: pixel values are not clamped to the scale area.\r\n\t * @private\r\n\t */\r\n\tcalculateBarValuePixels: function(datasetIndex, index, options) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar isHorizontal = scale.isHorizontal();\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar value = scale._parseValue(datasets[datasetIndex].data[index]);\r\n\t\tvar minBarLength = options.minBarLength;\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar stack = me.getMeta().stack;\r\n\t\tvar start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;\r\n\t\tvar length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, imeta, ivalue, base, head, size, stackLength;\r\n\r\n\t\tif (stacked || (stacked === undefined && stack !== undefined)) {\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\timeta = metasets[i];\r\n\r\n\t\t\t\tif (imeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (imeta.stack === stack) {\r\n\t\t\t\t\tstackLength = scale._parseValue(datasets[imeta.index].data[index]);\r\n\t\t\t\t\tivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;\r\n\r\n\t\t\t\t\tif ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) {\r\n\t\t\t\t\t\tstart += ivalue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbase = scale.getPixelForValue(start);\r\n\t\thead = scale.getPixelForValue(start + length);\r\n\t\tsize = head - base;\r\n\r\n\t\tif (minBarLength !== undefined && Math.abs(size) < minBarLength) {\r\n\t\t\tsize = minBarLength;\r\n\t\t\tif (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {\r\n\t\t\t\thead = base - minBarLength;\r\n\t\t\t} else {\r\n\t\t\t\thead = base + minBarLength;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tsize: size,\r\n\t\t\tbase: base,\r\n\t\t\thead: head,\r\n\t\t\tcenter: head + size / 2\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tcalculateBarIndexPixels: function(datasetIndex, index, ruler, options) {\r\n\t\tvar me = this;\r\n\t\tvar range = options.barThickness === 'flex'\r\n\t\t\t? computeFlexCategoryTraits(index, ruler, options)\r\n\t\t\t: computeFitCategoryTraits(index, ruler, options);\r\n\r\n\t\tvar stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\r\n\t\tvar center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\r\n\t\tvar size = Math.min(\r\n\t\t\tvalueOrDefault$3(options.maxBarThickness, Infinity),\r\n\t\t\trange.chunk * range.ratio);\r\n\r\n\t\treturn {\r\n\t\t\tbase: center - size / 2,\r\n\t\t\thead: center + size / 2,\r\n\t\t\tcenter: center,\r\n\t\t\tsize: size\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar ilen = rects.length;\r\n\t\tvar i = 0;\r\n\r\n\t\thelpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tvar val = scale._parseValue(dataset.data[i]);\r\n\t\t\tif (!isNaN(val.min) && !isNaN(val.max)) {\r\n\t\t\t\trects[i].draw();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));\r\n\t\tvar indexOpts = me._getIndexScale().options;\r\n\t\tvar valueOpts = me._getValueScale().options;\r\n\r\n\t\tvalues.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);\r\n\t\tvalues.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);\r\n\t\tvalues.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);\r\n\t\tvalues.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);\r\n\t\tvalues.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n});\n\nvar valueOrDefault$4 = helpers$1.valueOrDefault;\r\nvar resolve$1 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('bubble', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\r\n\t\t\tposition: 'bottom',\r\n\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\tvar datasetLabel = data.datasets[item.datasetIndex].label || '';\r\n\t\t\t\tvar dataPoint = data.datasets[item.datasetIndex].data[item.index];\r\n\t\t\t\treturn datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_bubble = core_datasetController.extend({\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t\t'hoverRadius',\r\n\t\t'hitRadius',\r\n\t\t'pointStyle',\r\n\t\t'rotation'\r\n\t],\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data;\r\n\r\n\t\t// Update Points\r\n\t\thelpers$1.each(points, function(point, index) {\r\n\t\t\tme.updateElement(point, index, reset);\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar data = me.getDataset().data[index];\r\n\t\tvar dsIndex = me.index;\r\n\r\n\t\tvar x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);\r\n\t\tvar y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\r\n\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = dsIndex;\r\n\t\tpoint._index = index;\r\n\t\tpoint._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\thitRadius: options.hitRadius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tradius: reset ? 0 : options.radius,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t};\r\n\r\n\t\tpoint.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = options.radius + options.hoverRadius;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(point, index) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar data = dataset.data[index] || {};\r\n\t\tvar values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments);\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// In case values were cached (and thus frozen), we need to clone the values\r\n\t\tif (me._cachedDataOpts === values) {\r\n\t\t\tvalues = helpers$1.extend({}, values);\r\n\t\t}\r\n\r\n\t\t// Custom radius resolution\r\n\t\tvalues.radius = resolve$1([\r\n\t\t\tcustom.radius,\r\n\t\t\tdata.r,\r\n\t\t\tme._config.radius,\r\n\t\t\tchart.options.elements.point.radius\r\n\t\t], context, index);\r\n\r\n\t\treturn values;\r\n\t}\r\n});\n\nvar valueOrDefault$5 = helpers$1.valueOrDefault;\r\n\r\nvar PI$1 = Math.PI;\r\nvar DOUBLE_PI$1 = PI$1 * 2;\r\nvar HALF_PI$1 = PI$1 / 2;\r\n\r\ncore_defaults._set('doughnut', {\r\n\tanimation: {\r\n\t\t// Boolean - Whether we animate the rotation of the Doughnut\r\n\t\tanimateRotate: true,\r\n\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\r\n\t\tanimateScale: false\r\n\t},\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t// toggle visibility of index if exists\r\n\t\t\t\tif (meta.data[index]) {\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// The percentage of the chart that we cut out of the middle.\r\n\tcutoutPercentage: 50,\r\n\r\n\t// The rotation of the chart, where the first data arc begins.\r\n\trotation: -HALF_PI$1,\r\n\r\n\t// The total circumference of the chart.\r\n\tcircumference: DOUBLE_PI$1,\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\r\n\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\r\n\t\t\t\tif (helpers$1.isArray(dataLabel)) {\r\n\t\t\t\t\t// show value on first line of multiline label\r\n\t\t\t\t\t// need to clone because we are changing the value\r\n\t\t\t\t\tdataLabel = dataLabel.slice();\r\n\t\t\t\t\tdataLabel[0] += value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataLabel += value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dataLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_doughnut = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\r\n\tgetRingIndex: function(datasetIndex) {\r\n\t\tvar ringIndex = 0;\r\n\r\n\t\tfor (var j = 0; j < datasetIndex; ++j) {\r\n\t\t\tif (this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t++ringIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringIndex;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar ratioX = 1;\r\n\t\tvar ratioY = 1;\r\n\t\tvar offsetX = 0;\r\n\t\tvar offsetY = 0;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar arcs = meta.data;\r\n\t\tvar cutout = opts.cutoutPercentage / 100 || 0;\r\n\t\tvar circumference = opts.circumference;\r\n\t\tvar chartWeight = me._getRingWeight(me.index);\r\n\t\tvar maxWidth, maxHeight, i, ilen;\r\n\r\n\t\t// If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\r\n\t\tif (circumference < DOUBLE_PI$1) {\r\n\t\t\tvar startAngle = opts.rotation % DOUBLE_PI$1;\r\n\t\t\tstartAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;\r\n\t\t\tvar endAngle = startAngle + circumference;\r\n\t\t\tvar startX = Math.cos(startAngle);\r\n\t\t\tvar startY = Math.sin(startAngle);\r\n\t\t\tvar endX = Math.cos(endAngle);\r\n\t\t\tvar endY = Math.sin(endAngle);\r\n\t\t\tvar contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1;\r\n\t\t\tvar contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1;\r\n\t\t\tvar contains180 = startAngle === -PI$1 || endAngle >= PI$1;\r\n\t\t\tvar contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1;\r\n\t\t\tvar minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tvar maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tratioX = (maxX - minX) / 2;\r\n\t\t\tratioY = (maxY - minY) / 2;\r\n\t\t\toffsetX = -(maxX + minX) / 2;\r\n\t\t\toffsetY = -(maxY + minY) / 2;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t}\r\n\r\n\t\tchart.borderWidth = me.getMaxBorderWidth();\r\n\t\tmaxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;\r\n\t\tmaxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;\r\n\t\tchart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\r\n\t\tchart.innerRadius = Math.max(chart.outerRadius * cutout, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\r\n\t\tchart.offsetX = offsetX * chart.outerRadius;\r\n\t\tchart.offsetY = offsetY * chart.outerRadius;\r\n\r\n\t\tmeta.total = me.calculateTotal();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\r\n\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar centerX = (chartArea.left + chartArea.right) / 2;\r\n\t\tvar centerY = (chartArea.top + chartArea.bottom) / 2;\r\n\t\tvar startAngle = opts.rotation; // non reset case handled later\r\n\t\tvar endAngle = opts.rotation; // non reset case handled later\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);\r\n\t\tvar innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\r\n\t\tvar outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX + chart.offsetX,\r\n\t\t\t\ty: centerY + chart.offsetY,\r\n\t\t\t\tstartAngle: startAngle,\r\n\t\t\t\tendAngle: endAngle,\r\n\t\t\t\tcircumference: circumference,\r\n\t\t\t\touterRadius: outerRadius,\r\n\t\t\t\tinnerRadius: innerRadius,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar model = arc._model;\r\n\r\n\t\t// Set correct angles if not resetting\r\n\t\tif (!reset || !animationOpts.animateRotate) {\r\n\t\t\tif (index === 0) {\r\n\t\t\t\tmodel.startAngle = opts.rotation;\r\n\t\t\t} else {\r\n\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\r\n\t\t\t}\r\n\r\n\t\t\tmodel.endAngle = model.startAngle + model.circumference;\r\n\t\t}\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcalculateTotal: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar total = 0;\r\n\t\tvar value;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tvalue = dataset.data[index];\r\n\t\t\tif (!isNaN(value) && !element.hidden) {\r\n\t\t\t\ttotal += Math.abs(value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t/* if (total === 0) {\r\n\t\t\ttotal = NaN;\r\n\t\t}*/\r\n\r\n\t\treturn total;\r\n\t},\r\n\r\n\tcalculateCircumference: function(value) {\r\n\t\tvar total = this.getMeta().total;\r\n\t\tif (total > 0 && !isNaN(value)) {\r\n\t\t\treturn DOUBLE_PI$1 * (Math.abs(value) / total);\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// gets the max border or hover width to properly scale pie charts\r\n\tgetMaxBorderWidth: function(arcs) {\r\n\t\tvar me = this;\r\n\t\tvar max = 0;\r\n\t\tvar chart = me.chart;\r\n\t\tvar i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\r\n\r\n\t\tif (!arcs) {\r\n\t\t\t// Find the outmost visible dataset\r\n\t\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tarcs = meta.data;\r\n\t\t\t\t\tif (i !== me.index) {\r\n\t\t\t\t\t\tcontroller = meta.controller;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!arcs) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarc = arcs[i];\r\n\t\t\tif (controller) {\r\n\t\t\t\tcontroller._configure();\r\n\t\t\t\toptions = controller._resolveDataElementOptions(arc, i);\r\n\t\t\t} else {\r\n\t\t\t\toptions = arc._options;\r\n\t\t\t}\r\n\t\t\tif (options.borderAlign !== 'inner') {\r\n\t\t\t\tborderWidth = options.borderWidth;\r\n\t\t\t\thoverWidth = options.hoverBorderWidth;\r\n\r\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\r\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\r\n\t * @private\r\n\t */\r\n\t_getRingWeightOffset: function(datasetIndex) {\r\n\t\tvar ringWeightOffset = 0;\r\n\r\n\t\tfor (var i = 0; i < datasetIndex; ++i) {\r\n\t\t\tif (this.chart.isDatasetVisible(i)) {\r\n\t\t\t\tringWeightOffset += this._getRingWeight(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringWeightOffset;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getRingWeight: function(dataSetIndex) {\r\n\t\treturn Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the sum of all visibile data set weights.  This value can be 0.\r\n\t * @private\r\n\t */\r\n\t_getVisibleDatasetWeightTotal: function() {\r\n\t\treturn this._getRingWeightOffset(this.chart.data.datasets.length);\r\n\t}\r\n});\n\ncore_defaults._set('horizontalBar', {\r\n\thover: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tposition: 'left',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}]\r\n\t},\r\n\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tborderSkipped: 'left'\r\n\t\t}\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\thorizontalBar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_horizontalBar = controller_bar.extend({\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t}\r\n});\n\nvar valueOrDefault$6 = helpers$1.valueOrDefault;\r\nvar resolve$2 = helpers$1.options.resolve;\r\nvar isPointInArea = helpers$1.canvas._isPointInArea;\r\n\r\ncore_defaults._set('line', {\r\n\tshowLines: true,\r\n\tspanGaps: false,\r\n\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tid: 'x-axis-0'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\nfunction scaleClip(scale, halfBorderWidth) {\r\n\tvar tickOpts = scale && scale.options.ticks || {};\r\n\tvar reverse = tickOpts.reverse;\r\n\tvar min = tickOpts.min === undefined ? halfBorderWidth : 0;\r\n\tvar max = tickOpts.max === undefined ? halfBorderWidth : 0;\r\n\treturn {\r\n\t\tstart: reverse ? max : min,\r\n\t\tend: reverse ? min : max\r\n\t};\r\n}\r\n\r\nfunction defaultClip(xScale, yScale, borderWidth) {\r\n\tvar halfBorderWidth = borderWidth / 2;\r\n\tvar x = scaleClip(xScale, halfBorderWidth);\r\n\tvar y = scaleClip(yScale, halfBorderWidth);\r\n\r\n\treturn {\r\n\t\ttop: y.end,\r\n\t\tright: x.end,\r\n\t\tbottom: y.start,\r\n\t\tleft: x.start\r\n\t};\r\n}\r\n\r\nfunction toClip(value) {\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = value.top;\r\n\t\tr = value.right;\r\n\t\tb = value.bottom;\r\n\t\tl = value.left;\r\n\t} else {\r\n\t\tt = r = b = l = value;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttop: t,\r\n\t\tright: r,\r\n\t\tbottom: b,\r\n\t\tleft: l\r\n\t};\r\n}\r\n\r\n\r\nvar controller_line = core_datasetController.extend({\r\n\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth',\r\n\t\t'cubicInterpolationMode',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar options = me.chart.options;\r\n\t\tvar config = me._config;\r\n\t\tvar showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tme._yScale = me.getScaleForId(meta.yAxisID);\r\n\r\n\t\t// Update Line\r\n\t\tif (showLine) {\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\t\tconfig.lineTension = config.tension;\r\n\t\t\t}\r\n\r\n\t\t\t// Utility\r\n\t\t\tline._scale = me._yScale;\r\n\t\t\tline._datasetIndex = me.index;\r\n\t\t\t// Data\r\n\t\t\tline._children = points;\r\n\t\t\t// Model\r\n\t\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\t\tline.pivot();\r\n\t\t}\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\tif (showLine && line._model.tension !== 0) {\r\n\t\t\tme.updateBezierControlPoints();\r\n\t\t}\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar datasetIndex = me.index;\r\n\t\tvar value = dataset.data[index];\r\n\t\tvar xScale = me._xScale;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar x, y;\r\n\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\r\n\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);\r\n\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\r\n\r\n\t\t// Utility\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = datasetIndex;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\r\n\t\t\tsteppedLine: lineModel ? lineModel.steppedLine : false,\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element) {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = me.chart.options;\r\n\t\tvar lineOptions = options.elements.line;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\t// The default behavior of lines is to break at null values, according\r\n\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\r\n\t\t// This option gives lines the ability to span gaps\r\n\t\tvalues.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);\r\n\t\tvalues.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);\r\n\t\tvalues.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tcalculatePointY: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar sumPos = 0;\r\n\t\tvar sumNeg = 0;\r\n\t\tvar i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;\r\n\r\n\t\tif (yScale.options.stacked) {\r\n\t\t\trightValue = +yScale.getRightValue(value);\r\n\t\t\tmetasets = chart._getSortedVisibleDatasetMetas();\r\n\t\t\tilen = metasets.length;\r\n\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\tdsMeta = metasets[i];\r\n\t\t\t\tif (dsMeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tds = chart.data.datasets[dsMeta.index];\r\n\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {\r\n\t\t\t\t\tstackedRightValue = +yScale.getRightValue(ds.data[index]);\r\n\t\t\t\t\tif (stackedRightValue < 0) {\r\n\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsumPos += stackedRightValue || 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (rightValue < 0) {\r\n\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\r\n\t\t\t}\r\n\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\r\n\t\t}\r\n\t\treturn yScale.getPixelForValue(value);\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (lineModel.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tif (lineModel.cubicInterpolationMode === 'monotone') {\r\n\t\t\thelpers$1.splineCurveMonotone(points);\r\n\t\t} else {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\t\thelpers$1.previousItem(points, i)._model,\r\n\t\t\t\t\tmodel,\r\n\t\t\t\t\thelpers$1.nextItem(points, i)._model,\r\n\t\t\t\t\tlineModel.tension\r\n\t\t\t\t);\r\n\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\r\n\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\r\n\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\r\n\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (chart.options.elements.line.capBezierPoints) {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tif (isPointInArea(model, area)) {\r\n\t\t\t\t\tif (i > 0 && isPointInArea(points[i - 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data || [];\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar i = 0;\r\n\t\tvar ilen = points.length;\r\n\t\tvar clip;\r\n\r\n\t\tif (me._showLine) {\r\n\t\t\tclip = meta.dataset._model.clip;\r\n\r\n\t\t\thelpers$1.canvas.clipArea(chart.ctx, {\r\n\t\t\t\tleft: clip.left === false ? 0 : area.left - clip.left,\r\n\t\t\t\tright: clip.right === false ? canvas.width : area.right + clip.right,\r\n\t\t\t\ttop: clip.top === false ? 0 : area.top - clip.top,\r\n\t\t\t\tbottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom\r\n\t\t\t});\r\n\r\n\t\t\tmeta.dataset.draw();\r\n\r\n\t\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t\t}\r\n\r\n\t\t// Draw the points\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tpoints[i].draw(area);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$6(options.hoverRadius, options.radius);\r\n\t},\r\n});\n\nvar resolve$3 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('polarArea', {\r\n\tscale: {\r\n\t\ttype: 'radialLinear',\r\n\t\tangleLines: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tgridLines: {\r\n\t\t\tcircular: true\r\n\t\t},\r\n\t\tpointLabels: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tticks: {\r\n\t\t\tbeginAtZero: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Boolean - Whether to animate the rotation of the chart\r\n\tanimation: {\r\n\t\tanimateRotate: true,\r\n\t\tanimateScale: true\r\n\t},\r\n\r\n\tstartAngle: -0.5 * Math.PI,\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\treturn data.labels[item.index] + ': ' + item.yLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_polarArea = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar start = me.chart.options.startAngle || 0;\r\n\t\tvar starts = me._starts = [];\r\n\t\tvar angles = me._angles = [];\r\n\t\tvar arcs = meta.data;\r\n\t\tvar i, ilen, angle;\r\n\r\n\t\tme._updateRadius();\r\n\r\n\t\tmeta.count = me.countVisibleElements();\r\n\r\n\t\tfor (i = 0, ilen = dataset.data.length; i < ilen; i++) {\r\n\t\t\tstarts[i] = start;\r\n\t\t\tangle = me._computeAngle(i);\r\n\t\t\tangles[i] = angle;\r\n\t\t\tstart += angle;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateRadius: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\r\n\r\n\t\tchart.outerRadius = Math.max(minSize / 2, 0);\r\n\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\r\n\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar scale = chart.scale;\r\n\t\tvar labels = chart.data.labels;\r\n\r\n\t\tvar centerX = scale.xCenter;\r\n\t\tvar centerY = scale.yCenter;\r\n\r\n\t\t// var negHalfPI = -0.5 * Math.PI;\r\n\t\tvar datasetStartAngle = opts.startAngle;\r\n\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar startAngle = me._starts[index];\r\n\t\tvar endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\r\n\r\n\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\t\t\t_scale: scale,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX,\r\n\t\t\t\ty: centerY,\r\n\t\t\t\tinnerRadius: 0,\r\n\t\t\t\touterRadius: reset ? resetRadius : distance,\r\n\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\r\n\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcountVisibleElements: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar count = 0;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn count;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\t\tvar valueOrDefault = helpers$1.valueOrDefault;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeAngle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar count = this.getMeta().count;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\r\n\t\tif (isNaN(dataset.data[index]) || meta.data[index].hidden) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: me.chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\treturn resolve$3([\r\n\t\t\tme.chart.options.elements.arc.angle,\r\n\t\t\t(2 * Math.PI) / count\r\n\t\t], context, index);\r\n\t}\r\n});\n\ncore_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\r\ncore_defaults._set('pie', {\r\n\tcutoutPercentage: 0\r\n});\r\n\r\n// Pie charts are Doughnut chart with different defaults\r\nvar controller_pie = controller_doughnut;\n\nvar valueOrDefault$7 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('radar', {\r\n\tspanGaps: false,\r\n\tscale: {\r\n\t\ttype: 'radialLinear'\r\n\t},\r\n\telements: {\r\n\t\tline: {\r\n\t\t\tfill: 'start',\r\n\t\t\ttension: 0 // no bezier in radar\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_radar = core_datasetController.extend({\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderWidth',\r\n\t\t'borderColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar config = me._config;\r\n\t\tvar i, ilen;\r\n\r\n\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\tconfig.lineTension = config.tension;\r\n\t\t}\r\n\r\n\t\t// Utility\r\n\t\tline._scale = scale;\r\n\t\tline._datasetIndex = me.index;\r\n\t\t// Data\r\n\t\tline._children = points;\r\n\t\tline._loop = true;\r\n\t\t// Model\r\n\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\tline.pivot();\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\t// Update bezier control points\r\n\t\tme.updateBezierControlPoints();\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar lineModel = me.getMeta().dataset._model;\r\n\t\tvar x = reset ? scale.xCenter : pointPosition.x;\r\n\t\tvar y = reset ? scale.yCenter : pointPosition.y;\r\n\r\n\t\t// Utility\r\n\t\tpoint._scale = scale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = me.index;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x, // value not used in dataset scale, but we want a consistent API between scales\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),\r\n\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar options = me.chart.options;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\tvalues.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar area = me.chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (meta.dataset._model.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tmodel = points[i]._model;\r\n\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\thelpers$1.previousItem(points, i, true)._model,\r\n\t\t\t\tmodel,\r\n\t\t\t\thelpers$1.nextItem(points, i, true)._model,\r\n\t\t\t\tmodel.tension\r\n\t\t\t);\r\n\r\n\t\t\t// Prevent the bezier going outside of the bounds of the graph\r\n\t\t\tmodel.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\r\n\t\t\tmodel.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\r\n\t\t\tmodel.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\r\n\t\t\tmodel.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$7(options.hoverRadius, options.radius);\r\n\t}\r\n});\n\ncore_defaults._set('scatter', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\tid: 'x-axis-1',    // need an ID so datasets can reference the scale\r\n\t\t\ttype: 'linear',    // scatter should not use a category axis\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\tid: 'y-axis-1',\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';     // doesn't make sense for scatter since data are formatted as a point\r\n\t\t\t},\r\n\t\t\tlabel: function(item) {\r\n\t\t\t\treturn '(' + item.xLabel + ', ' + item.yLabel + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tscatter: {\r\n\t\t\tshowLine: false\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Scatter charts use line controllers\r\nvar controller_scatter = controller_line;\n\n// NOTE export a map in which the key represents the controller type, not\r\n// the class, and so must be CamelCase in order to be correctly retrieved\r\n// by the controller in core.controller.js (`controllers[meta.type]`).\r\n\r\nvar controllers = {\r\n\tbar: controller_bar,\r\n\tbubble: controller_bubble,\r\n\tdoughnut: controller_doughnut,\r\n\thorizontalBar: controller_horizontalBar,\r\n\tline: controller_line,\r\n\tpolarArea: controller_polarArea,\r\n\tpie: controller_pie,\r\n\tradar: controller_radar,\r\n\tscatter: controller_scatter\r\n};\n\n/**\r\n * Helper function to get relative position for an event\r\n * @param {Event|IEvent} event - The event to get the position for\r\n * @param {Chart} chart - The chart\r\n * @returns {object} the event position\r\n */\r\nfunction getRelativePosition(e, chart) {\r\n\tif (e.native) {\r\n\t\treturn {\r\n\t\t\tx: e.x,\r\n\t\t\ty: e.y\r\n\t\t};\r\n\t}\r\n\r\n\treturn helpers$1.getRelativePosition(e, chart);\r\n}\r\n\r\n/**\r\n * Helper function to traverse all of the visible elements in the chart\r\n * @param {Chart} chart - the chart\r\n * @param {function} handler - the callback to execute for each visible item\r\n */\r\nfunction parseVisibleItems(chart, handler) {\r\n\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\tvar metadata, i, j, ilen, jlen, element;\r\n\r\n\tfor (i = 0, ilen = metasets.length; i < ilen; ++i) {\r\n\t\tmetadata = metasets[i].data;\r\n\t\tfor (j = 0, jlen = metadata.length; j < jlen; ++j) {\r\n\t\t\telement = metadata[j];\r\n\t\t\tif (!element._view.skip) {\r\n\t\t\t\thandler(element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Helper function to get the items that intersect the event position\r\n * @param {ChartElement[]} items - elements to filter\r\n * @param {object} position - the point to be nearest to\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getIntersectItems(chart, position) {\r\n\tvar elements = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\r\n * @param {Chart} chart - the chart to look at elements from\r\n * @param {object} position - the point to be nearest to\r\n * @param {boolean} intersect - if true, only consider items that intersect the position\r\n * @param {function} distanceMetric - function to provide the distance between points\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getNearestItems(chart, position, intersect, distanceMetric) {\r\n\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\tvar nearestItems = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (intersect && !element.inRange(position.x, position.y)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar center = element.getCenterPoint();\r\n\t\tvar distance = distanceMetric(position, center);\r\n\t\tif (distance < minDistance) {\r\n\t\t\tnearestItems = [element];\r\n\t\t\tminDistance = distance;\r\n\t\t} else if (distance === minDistance) {\r\n\t\t\t// Can have multiple items at the same distance in which case we sort by size\r\n\t\t\tnearestItems.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn nearestItems;\r\n}\r\n\r\n/**\r\n * Get a distance metric function for two points based on the\r\n * axis mode setting\r\n * @param {string} axis - the axis mode. x|y|xy\r\n */\r\nfunction getDistanceMetricForAxis(axis) {\r\n\tvar useX = axis.indexOf('x') !== -1;\r\n\tvar useY = axis.indexOf('y') !== -1;\r\n\r\n\treturn function(pt1, pt2) {\r\n\t\tvar deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\r\n\t\tvar deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\r\n\t\treturn Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\r\n\t};\r\n}\r\n\r\nfunction indexMode(chart, e, options) {\r\n\tvar position = getRelativePosition(e, chart);\r\n\t// Default axis for index mode is 'x' to match old behaviour\r\n\toptions.axis = options.axis || 'x';\r\n\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\tvar elements = [];\r\n\r\n\tif (!items.length) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tchart._getSortedVisibleDatasetMetas().forEach(function(meta) {\r\n\t\tvar element = meta.data[items[0]._index];\r\n\r\n\t\t// don't count items that are skipped (null data)\r\n\t\tif (element && !element._view.skip) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * @interface IInteractionOptions\r\n */\r\n/**\r\n * If true, only consider items that intersect the point\r\n * @name IInterfaceOptions#boolean\r\n * @type Boolean\r\n */\r\n\r\n/**\r\n * Contains interaction related functions\r\n * @namespace Chart.Interaction\r\n */\r\nvar core_interaction = {\r\n\t// Helper function for different modes\r\n\tmodes: {\r\n\t\tsingle: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar elements = [];\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\telements.push(element);\r\n\t\t\t\t\treturn elements;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn elements.slice(0, 1);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.label\r\n\t\t * @deprecated since version 2.4.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tlabel: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\r\n\t\t * @function Chart.Interaction.modes.index\r\n\t\t * @since v2.4.0\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tindex: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\r\n\t\t * @function Chart.Interaction.modes.dataset\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tdataset: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\r\n\t\t\tif (items.length > 0) {\r\n\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\r\n\t\t\t}\r\n\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.x-axis\r\n\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\t'x-axis': function(chart, e) {\r\n\t\t\treturn indexMode(chart, e, {intersect: false});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Point mode returns all elements that hit test based on the event position\r\n\t\t * of the event\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tpoint: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\treturn getIntersectItems(chart, position);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * nearest mode returns the element closest to the point\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tnearest: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\treturn getNearestItems(chart, position, options.intersect, distanceMetric);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * x mode returns the elements that hit-test at the current x coordinate\r\n\t\t * @function Chart.Interaction.modes.x\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tx: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inXRange(position.x)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * y mode returns the elements that hit-test at the current y coordinate\r\n\t\t * @function Chart.Interaction.modes.y\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\ty: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inYRange(position.y)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t}\r\n\t}\r\n};\n\nvar extend = helpers$1.extend;\r\n\r\nfunction filterByPosition(array, position) {\r\n\treturn helpers$1.where(array, function(v) {\r\n\t\treturn v.pos === position;\r\n\t});\r\n}\r\n\r\nfunction sortByWeight(array, reverse) {\r\n\treturn array.sort(function(a, b) {\r\n\t\tvar v0 = reverse ? b : a;\r\n\t\tvar v1 = reverse ? a : b;\r\n\t\treturn v0.weight === v1.weight ?\r\n\t\t\tv0.index - v1.index :\r\n\t\t\tv0.weight - v1.weight;\r\n\t});\r\n}\r\n\r\nfunction wrapBoxes(boxes) {\r\n\tvar layoutBoxes = [];\r\n\tvar i, ilen, box;\r\n\r\n\tfor (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\r\n\t\tbox = boxes[i];\r\n\t\tlayoutBoxes.push({\r\n\t\t\tindex: i,\r\n\t\t\tbox: box,\r\n\t\t\tpos: box.position,\r\n\t\t\thorizontal: box.isHorizontal(),\r\n\t\t\tweight: box.weight\r\n\t\t});\r\n\t}\r\n\treturn layoutBoxes;\r\n}\r\n\r\nfunction setLayoutDims(layouts, params) {\r\n\tvar i, ilen, layout;\r\n\tfor (i = 0, ilen = layouts.length; i < ilen; ++i) {\r\n\t\tlayout = layouts[i];\r\n\t\t// store width used instead of chartArea.w in fitBoxes\r\n\t\tlayout.width = layout.horizontal\r\n\t\t\t? layout.box.fullWidth && params.availableWidth\r\n\t\t\t: params.vBoxMaxWidth;\r\n\t\t// store height used instead of chartArea.h in fitBoxes\r\n\t\tlayout.height = layout.horizontal && params.hBoxMaxHeight;\r\n\t}\r\n}\r\n\r\nfunction buildLayoutBoxes(boxes) {\r\n\tvar layoutBoxes = wrapBoxes(boxes);\r\n\tvar left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\r\n\tvar right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\r\n\tvar top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\r\n\tvar bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\r\n\r\n\treturn {\r\n\t\tleftAndTop: left.concat(top),\r\n\t\trightAndBottom: right.concat(bottom),\r\n\t\tchartArea: filterByPosition(layoutBoxes, 'chartArea'),\r\n\t\tvertical: left.concat(right),\r\n\t\thorizontal: top.concat(bottom)\r\n\t};\r\n}\r\n\r\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\r\n\treturn Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\r\n}\r\n\r\nfunction updateDims(chartArea, params, layout) {\r\n\tvar box = layout.box;\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\tvar newWidth, newHeight;\r\n\r\n\tif (layout.size) {\r\n\t\t// this layout was already counted for, lets first reduce old size\r\n\t\tchartArea[layout.pos] -= layout.size;\r\n\t}\r\n\tlayout.size = layout.horizontal ? box.height : box.width;\r\n\tchartArea[layout.pos] += layout.size;\r\n\r\n\tif (box.getPadding) {\r\n\t\tvar boxPadding = box.getPadding();\r\n\t\tmaxPadding.top = Math.max(maxPadding.top, boxPadding.top);\r\n\t\tmaxPadding.left = Math.max(maxPadding.left, boxPadding.left);\r\n\t\tmaxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\r\n\t\tmaxPadding.right = Math.max(maxPadding.right, boxPadding.right);\r\n\t}\r\n\r\n\tnewWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');\r\n\tnewHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');\r\n\r\n\tif (newWidth !== chartArea.w || newHeight !== chartArea.h) {\r\n\t\tchartArea.w = newWidth;\r\n\t\tchartArea.h = newHeight;\r\n\r\n\t\t// return true if chart area changed in layout's direction\r\n\t\tvar sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];\r\n\t\treturn sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));\r\n\t}\r\n}\r\n\r\nfunction handleMaxPadding(chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction updatePos(pos) {\r\n\t\tvar change = Math.max(maxPadding[pos] - chartArea[pos], 0);\r\n\t\tchartArea[pos] += change;\r\n\t\treturn change;\r\n\t}\r\n\tchartArea.y += updatePos('top');\r\n\tchartArea.x += updatePos('left');\r\n\tupdatePos('right');\r\n\tupdatePos('bottom');\r\n}\r\n\r\nfunction getMargins(horizontal, chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction marginForPositions(positions) {\r\n\t\tvar margin = {left: 0, top: 0, right: 0, bottom: 0};\r\n\t\tpositions.forEach(function(pos) {\r\n\t\t\tmargin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\r\n\t\t});\r\n\t\treturn margin;\r\n\t}\r\n\r\n\treturn horizontal\r\n\t\t? marginForPositions(['left', 'right'])\r\n\t\t: marginForPositions(['top', 'bottom']);\r\n}\r\n\r\nfunction fitBoxes(boxes, chartArea, params) {\r\n\tvar refitBoxes = [];\r\n\tvar i, ilen, layout, box, refit, changed;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\r\n\t\tbox.update(\r\n\t\t\tlayout.width || chartArea.w,\r\n\t\t\tlayout.height || chartArea.h,\r\n\t\t\tgetMargins(layout.horizontal, chartArea)\r\n\t\t);\r\n\t\tif (updateDims(chartArea, params, layout)) {\r\n\t\t\tchanged = true;\r\n\t\t\tif (refitBoxes.length) {\r\n\t\t\t\t// Dimensions changed and there were non full width boxes before this\r\n\t\t\t\t// -> we have to refit those\r\n\t\t\t\trefit = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case\r\n\t\t\trefitBoxes.push(layout);\r\n\t\t}\r\n\t}\r\n\r\n\treturn refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;\r\n}\r\n\r\nfunction placeBoxes(boxes, chartArea, params) {\r\n\tvar userPadding = params.padding;\r\n\tvar x = chartArea.x;\r\n\tvar y = chartArea.y;\r\n\tvar i, ilen, layout, box;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\t\tif (layout.horizontal) {\r\n\t\t\tbox.left = box.fullWidth ? userPadding.left : chartArea.left;\r\n\t\t\tbox.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;\r\n\t\t\tbox.top = y;\r\n\t\t\tbox.bottom = y + box.height;\r\n\t\t\tbox.width = box.right - box.left;\r\n\t\t\ty = box.bottom;\r\n\t\t} else {\r\n\t\t\tbox.left = x;\r\n\t\t\tbox.right = x + box.width;\r\n\t\t\tbox.top = chartArea.top;\r\n\t\t\tbox.bottom = chartArea.top + chartArea.h;\r\n\t\t\tbox.height = box.bottom - box.top;\r\n\t\t\tx = box.right;\r\n\t\t}\r\n\t}\r\n\r\n\tchartArea.x = x;\r\n\tchartArea.y = y;\r\n}\r\n\r\ncore_defaults._set('global', {\r\n\tlayout: {\r\n\t\tpadding: {\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * @interface ILayoutItem\r\n * @prop {string} position - The position of the item in the chart layout. Possible values are\r\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\r\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\r\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\r\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\r\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\r\n * @prop {function} getPadding -  Returns an object with padding on the edges\r\n * @prop {number} width - Width of item. Must be valid after update()\r\n * @prop {number} height - Height of item. Must be valid after update()\r\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\r\n */\r\n\r\n// The layout service is very self explanatory.  It's responsible for the layout within a chart.\r\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\r\n// It is this service's responsibility of carrying out that layout.\r\nvar core_layouts = {\r\n\tdefaults: {},\r\n\r\n\t/**\r\n\t * Register a box to a chart.\r\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\r\n\t * @param {Chart} chart - the chart to use\r\n\t * @param {ILayoutItem} item - the item to add to be layed out\r\n\t */\r\n\taddBox: function(chart, item) {\r\n\t\tif (!chart.boxes) {\r\n\t\t\tchart.boxes = [];\r\n\t\t}\r\n\r\n\t\t// initialize item with default values\r\n\t\titem.fullWidth = item.fullWidth || false;\r\n\t\titem.position = item.position || 'top';\r\n\t\titem.weight = item.weight || 0;\r\n\t\titem._layers = item._layers || function() {\r\n\t\t\treturn [{\r\n\t\t\t\tz: 0,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\titem.draw.apply(item, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t};\r\n\r\n\t\tchart.boxes.push(item);\r\n\t},\r\n\r\n\t/**\r\n\t * Remove a layoutItem from a chart\r\n\t * @param {Chart} chart - the chart to remove the box from\r\n\t * @param {ILayoutItem} layoutItem - the item to remove from the layout\r\n\t */\r\n\tremoveBox: function(chart, layoutItem) {\r\n\t\tvar index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\r\n\t\tif (index !== -1) {\r\n\t\t\tchart.boxes.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Sets (or updates) options on the given `item`.\r\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\r\n\t * @param {ILayoutItem} item - the item to configure with the given options\r\n\t * @param {object} options - the new item options.\r\n\t */\r\n\tconfigure: function(chart, item, options) {\r\n\t\tvar props = ['fullWidth', 'position', 'weight'];\r\n\t\tvar ilen = props.length;\r\n\t\tvar i = 0;\r\n\t\tvar prop;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tprop = props[i];\r\n\t\t\tif (options.hasOwnProperty(prop)) {\r\n\t\t\t\titem[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Fits boxes of the given chart into the given size by having each box measure itself\r\n\t * then running a fitting algorithm\r\n\t * @param {Chart} chart - the chart\r\n\t * @param {number} width - the width to fit into\r\n\t * @param {number} height - the height to fit into\r\n\t */\r\n\tupdate: function(chart, width, height) {\r\n\t\tif (!chart) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar layoutOptions = chart.options.layout || {};\r\n\t\tvar padding = helpers$1.options.toPadding(layoutOptions.padding);\r\n\r\n\t\tvar availableWidth = width - padding.width;\r\n\t\tvar availableHeight = height - padding.height;\r\n\t\tvar boxes = buildLayoutBoxes(chart.boxes);\r\n\t\tvar verticalBoxes = boxes.vertical;\r\n\t\tvar horizontalBoxes = boxes.horizontal;\r\n\r\n\t\t// Essentially we now have any number of boxes on each of the 4 sides.\r\n\t\t// Our canvas looks like the following.\r\n\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\r\n\t\t// B1 is the bottom axis\r\n\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\r\n\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\r\n\t\t// an error will be thrown.\r\n\t\t//\r\n\t\t// |----------------------------------------------------|\r\n\t\t// |                  T1 (Full Width)                   |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// |    |    |                 T2                  |    |\r\n\t\t// |    |----|-------------------------------------|----|\r\n\t\t// |    |    | C1 |                           | C2 |    |\r\n\t\t// |    |    |----|                           |----|    |\r\n\t\t// |    |    |                                     |    |\r\n\t\t// | L1 | L2 |           ChartArea (C0)            | R1 |\r\n\t\t// |    |    |                                     |    |\r\n\t\t// |    |    |----|                           |----|    |\r\n\t\t// |    |    | C3 |                           | C4 |    |\r\n\t\t// |    |----|-------------------------------------|----|\r\n\t\t// |    |    |                 B1                  |    |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// |                  B2 (Full Width)                   |\r\n\t\t// |----------------------------------------------------|\r\n\t\t//\r\n\r\n\t\tvar params = Object.freeze({\r\n\t\t\touterWidth: width,\r\n\t\t\touterHeight: height,\r\n\t\t\tpadding: padding,\r\n\t\t\tavailableWidth: availableWidth,\r\n\t\t\tvBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,\r\n\t\t\thBoxMaxHeight: availableHeight / 2\r\n\t\t});\r\n\t\tvar chartArea = extend({\r\n\t\t\tmaxPadding: extend({}, padding),\r\n\t\t\tw: availableWidth,\r\n\t\t\th: availableHeight,\r\n\t\t\tx: padding.left,\r\n\t\t\ty: padding.top\r\n\t\t}, padding);\r\n\r\n\t\tsetLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\r\n\r\n\t\t// First fit vertical boxes\r\n\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\r\n\t\t// Then fit horizontal boxes\r\n\t\tif (fitBoxes(horizontalBoxes, chartArea, params)) {\r\n\t\t\t// if the area changed, re-fit vertical boxes\r\n\t\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\t\t}\r\n\r\n\t\thandleMaxPadding(chartArea);\r\n\r\n\t\t// Finally place the boxes to correct coordinates\r\n\t\tplaceBoxes(boxes.leftAndTop, chartArea, params);\r\n\r\n\t\t// Move to opposite side of chart\r\n\t\tchartArea.x += chartArea.w;\r\n\t\tchartArea.y += chartArea.h;\r\n\r\n\t\tplaceBoxes(boxes.rightAndBottom, chartArea, params);\r\n\r\n\t\tchart.chartArea = {\r\n\t\t\tleft: chartArea.left,\r\n\t\t\ttop: chartArea.top,\r\n\t\t\tright: chartArea.left + chartArea.w,\r\n\t\t\tbottom: chartArea.top + chartArea.h\r\n\t\t};\r\n\r\n\t\t// Finally update boxes in chartArea (radial scale for example)\r\n\t\thelpers$1.each(boxes.chartArea, function(layout) {\r\n\t\t\tvar box = layout.box;\r\n\t\t\textend(box, chart.chartArea);\r\n\t\t\tbox.update(chartArea.w, chartArea.h);\r\n\t\t});\r\n\t}\r\n};\n\n/**\r\n * Platform fallback implementation (minimal).\r\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\r\n */\r\n\r\nvar platform_basic = {\r\n\tacquireContext: function(item) {\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\treturn item && item.getContext('2d') || null;\r\n\t}\r\n};\n\nvar platform_dom = \"/*\\r\\n * DOM element rendering detection\\r\\n * https://davidwalsh.name/detect-node-insertion\\r\\n */\\r\\n@keyframes chartjs-render-animation {\\r\\n\\tfrom { opacity: 0.99; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n\\r\\n.chartjs-render-monitor {\\r\\n\\tanimation: chartjs-render-animation 0.001s;\\r\\n}\\r\\n\\r\\n/*\\r\\n * DOM element resizing detection\\r\\n * https://github.com/marcj/css-element-queries\\r\\n */\\r\\n.chartjs-size-monitor,\\r\\n.chartjs-size-monitor-expand,\\r\\n.chartjs-size-monitor-shrink {\\r\\n\\tposition: absolute;\\r\\n\\tdirection: ltr;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tbottom: 0;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\tvisibility: hidden;\\r\\n\\tz-index: -1;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-expand > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 1000000px;\\r\\n\\theight: 1000000px;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-shrink > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 200%;\\r\\n\\theight: 200%;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\";\n\nvar platform_dom$1 = /*#__PURE__*/Object.freeze({\n__proto__: null,\n'default': platform_dom\n});\n\nvar stylesheet = getCjsExportFromNamespace(platform_dom$1);\n\nvar EXPANDO_KEY = '$chartjs';\r\nvar CSS_PREFIX = 'chartjs-';\r\nvar CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\r\nvar CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\r\nvar CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\r\nvar ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\r\n\r\n/**\r\n * DOM event types -> Chart.js event types.\r\n * Note: only events with different types are mapped.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\r\n */\r\nvar EVENT_TYPES = {\r\n\ttouchstart: 'mousedown',\r\n\ttouchmove: 'mousemove',\r\n\ttouchend: 'mouseup',\r\n\tpointerenter: 'mouseenter',\r\n\tpointerdown: 'mousedown',\r\n\tpointermove: 'mousemove',\r\n\tpointerup: 'mouseup',\r\n\tpointerleave: 'mouseout',\r\n\tpointerout: 'mouseout'\r\n};\r\n\r\n/**\r\n * The \"used\" size is the final value of a dimension property after all calculations have\r\n * been performed. This method uses the computed style of `element` but returns undefined\r\n * if the computed style is not expressed in pixels. That can happen in some cases where\r\n * `element` has a size relative to its parent and this last one is not yet displayed,\r\n * for example because of `display: none` on a parent node.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\r\n * @returns {number} Size in pixels or undefined if unknown.\r\n */\r\nfunction readUsedSize(element, property) {\r\n\tvar value = helpers$1.getStyle(element, property);\r\n\tvar matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\r\n\treturn matches ? Number(matches[1]) : undefined;\r\n}\r\n\r\n/**\r\n * Initializes the canvas style and render size without modifying the canvas display size,\r\n * since responsiveness is handled by the controller.resize() method. The config is used\r\n * to determine the aspect ratio to apply in case no explicit height has been specified.\r\n */\r\nfunction initCanvas(canvas, config) {\r\n\tvar style = canvas.style;\r\n\r\n\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\r\n\t// returns null or '' if no explicit value has been set to the canvas attribute.\r\n\tvar renderHeight = canvas.getAttribute('height');\r\n\tvar renderWidth = canvas.getAttribute('width');\r\n\r\n\t// Chart.js modifies some canvas values that we want to restore on destroy\r\n\tcanvas[EXPANDO_KEY] = {\r\n\t\tinitial: {\r\n\t\t\theight: renderHeight,\r\n\t\t\twidth: renderWidth,\r\n\t\t\tstyle: {\r\n\t\t\t\tdisplay: style.display,\r\n\t\t\t\theight: style.height,\r\n\t\t\t\twidth: style.width\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Force canvas to display as block to avoid extra space caused by inline\r\n\t// elements, which would interfere with the responsive resize process.\r\n\t// https://github.com/chartjs/Chart.js/issues/2538\r\n\tstyle.display = style.display || 'block';\r\n\r\n\tif (renderWidth === null || renderWidth === '') {\r\n\t\tvar displayWidth = readUsedSize(canvas, 'width');\r\n\t\tif (displayWidth !== undefined) {\r\n\t\t\tcanvas.width = displayWidth;\r\n\t\t}\r\n\t}\r\n\r\n\tif (renderHeight === null || renderHeight === '') {\r\n\t\tif (canvas.style.height === '') {\r\n\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\r\n\t\t\t// which one can be specified by the user but also by charts as default option\r\n\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\r\n\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\r\n\t\t} else {\r\n\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\r\n\t\t\tif (displayWidth !== undefined) {\r\n\t\t\t\tcanvas.height = displayHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn canvas;\r\n}\r\n\r\n/**\r\n * Detects support for options object argument in addEventListener.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\r\n * @private\r\n */\r\nvar supportsEventListenerOptions = (function() {\r\n\tvar supports = false;\r\n\ttry {\r\n\t\tvar options = Object.defineProperty({}, 'passive', {\r\n\t\t\t// eslint-disable-next-line getter-return\r\n\t\t\tget: function() {\r\n\t\t\t\tsupports = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('e', null, options);\r\n\t} catch (e) {\r\n\t\t// continue regardless of error\r\n\t}\r\n\treturn supports;\r\n}());\r\n\r\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\r\n// https://github.com/chartjs/Chart.js/issues/4287\r\nvar eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\r\n\r\nfunction addListener(node, type, listener) {\r\n\tnode.addEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction removeListener(node, type, listener) {\r\n\tnode.removeEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction createEvent(type, chart, x, y, nativeEvent) {\r\n\treturn {\r\n\t\ttype: type,\r\n\t\tchart: chart,\r\n\t\tnative: nativeEvent || null,\r\n\t\tx: x !== undefined ? x : null,\r\n\t\ty: y !== undefined ? y : null,\r\n\t};\r\n}\r\n\r\nfunction fromNativeEvent(event, chart) {\r\n\tvar type = EVENT_TYPES[event.type] || event.type;\r\n\tvar pos = helpers$1.getRelativePosition(event, chart);\r\n\treturn createEvent(type, chart, pos.x, pos.y, event);\r\n}\r\n\r\nfunction throttled(fn, thisArg) {\r\n\tvar ticking = false;\r\n\tvar args = [];\r\n\r\n\treturn function() {\r\n\t\targs = Array.prototype.slice.call(arguments);\r\n\t\tthisArg = thisArg || this;\r\n\r\n\t\tif (!ticking) {\r\n\t\t\tticking = true;\r\n\t\t\thelpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tticking = false;\r\n\t\t\t\tfn.apply(thisArg, args);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction createDiv(cls) {\r\n\tvar el = document.createElement('div');\r\n\tel.className = cls || '';\r\n\treturn el;\r\n}\r\n\r\n// Implementation based on https://github.com/marcj/css-element-queries\r\nfunction createResizer(handler) {\r\n\tvar maxSize = 1000000;\r\n\r\n\t// NOTE(SB) Don't use innerHTML because it could be considered unsafe.\r\n\t// https://github.com/chartjs/Chart.js/issues/5902\r\n\tvar resizer = createDiv(CSS_SIZE_MONITOR);\r\n\tvar expand = createDiv(CSS_SIZE_MONITOR + '-expand');\r\n\tvar shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\r\n\r\n\texpand.appendChild(createDiv());\r\n\tshrink.appendChild(createDiv());\r\n\r\n\tresizer.appendChild(expand);\r\n\tresizer.appendChild(shrink);\r\n\tresizer._reset = function() {\r\n\t\texpand.scrollLeft = maxSize;\r\n\t\texpand.scrollTop = maxSize;\r\n\t\tshrink.scrollLeft = maxSize;\r\n\t\tshrink.scrollTop = maxSize;\r\n\t};\r\n\r\n\tvar onScroll = function() {\r\n\t\tresizer._reset();\r\n\t\thandler();\r\n\t};\r\n\r\n\taddListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\r\n\taddListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\r\n\r\n\treturn resizer;\r\n}\r\n\r\n// https://davidwalsh.name/detect-node-insertion\r\nfunction watchForRender(node, handler) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\tvar proxy = expando.renderProxy = function(e) {\r\n\t\tif (e.animationName === CSS_RENDER_ANIMATION) {\r\n\t\t\thandler();\r\n\t\t}\r\n\t};\r\n\r\n\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\taddListener(node, type, proxy);\r\n\t});\r\n\r\n\t// #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\r\n\t// is removed then added back immediately (same animation frame?). Accessing the\r\n\t// `offsetParent` property will force a reflow and re-evaluate the CSS animation.\r\n\t// https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\r\n\t// https://github.com/chartjs/Chart.js/issues/4737\r\n\texpando.reflow = !!node.offsetParent;\r\n\r\n\tnode.classList.add(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction unwatchForRender(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar proxy = expando.renderProxy;\r\n\r\n\tif (proxy) {\r\n\t\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\t\tremoveListener(node, type, proxy);\r\n\t\t});\r\n\r\n\t\tdelete expando.renderProxy;\r\n\t}\r\n\r\n\tnode.classList.remove(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction addResizeListener(node, listener, chart) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\r\n\t// Let's keep track of this added resizer and thus avoid DOM query when removing it.\r\n\tvar resizer = expando.resizer = createResizer(throttled(function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = chart.options.maintainAspectRatio && node.parentNode;\r\n\t\t\tvar w = container ? container.clientWidth : 0;\r\n\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\tif (container && container.clientWidth < w && chart.canvas) {\r\n\t\t\t\t// If the container size shrank during chart resize, let's assume\r\n\t\t\t\t// scrollbar appeared. So we resize again with the scrollbar visible -\r\n\t\t\t\t// effectively making chart smaller and the scrollbar hidden again.\r\n\t\t\t\t// Because we are inside `throttled`, and currently `ticking`, scroll\r\n\t\t\t\t// events are ignored during this whole 2 resize process.\r\n\t\t\t\t// If we assumed wrong and something else happened, we are resizing\r\n\t\t\t\t// twice in a frame (potential performance issue)\r\n\t\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\t}\r\n\t\t}\r\n\t}));\r\n\r\n\t// The resizer needs to be attached to the node parent, so we first need to be\r\n\t// sure that `node` is attached to the DOM before injecting the resizer element.\r\n\twatchForRender(node, function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = node.parentNode;\r\n\t\t\tif (container && container !== resizer.parentNode) {\r\n\t\t\t\tcontainer.insertBefore(resizer, container.firstChild);\r\n\t\t\t}\r\n\r\n\t\t\t// The container size might have changed, let's reset the resizer state.\r\n\t\t\tresizer._reset();\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction removeResizeListener(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar resizer = expando.resizer;\r\n\r\n\tdelete expando.resizer;\r\n\tunwatchForRender(node);\r\n\r\n\tif (resizer && resizer.parentNode) {\r\n\t\tresizer.parentNode.removeChild(resizer);\r\n\t}\r\n}\r\n\r\n/**\r\n * Injects CSS styles inline if the styles are not already present.\r\n * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the <style>.\r\n * @param {string} css - the CSS to be injected.\r\n */\r\nfunction injectCSS(rootNode, css) {\r\n\t// https://stackoverflow.com/q/3922139\r\n\tvar expando = rootNode[EXPANDO_KEY] || (rootNode[EXPANDO_KEY] = {});\r\n\tif (!expando.containsStyles) {\r\n\t\texpando.containsStyles = true;\r\n\t\tcss = '/* Chart.js */\\n' + css;\r\n\t\tvar style = document.createElement('style');\r\n\t\tstyle.setAttribute('type', 'text/css');\r\n\t\tstyle.appendChild(document.createTextNode(css));\r\n\t\trootNode.appendChild(style);\r\n\t}\r\n}\r\n\r\nvar platform_dom$2 = {\r\n\t/**\r\n\t * When `true`, prevents the automatic injection of the stylesheet required to\r\n\t * correctly detect when the chart is added to the DOM and then resized. This\r\n\t * switch has been added to allow external stylesheet (`dist/Chart(.min)?.js`)\r\n\t * to be manually imported to make this library compatible with any CSP.\r\n\t * See https://github.com/chartjs/Chart.js/issues/5208\r\n\t */\r\n\tdisableCSSInjection: false,\r\n\r\n\t/**\r\n\t * This property holds whether this platform is enabled for the current environment.\r\n\t * Currently used by platform.js to select the proper implementation.\r\n\t * @private\r\n\t */\r\n\t_enabled: typeof window !== 'undefined' && typeof document !== 'undefined',\r\n\r\n\t/**\r\n\t * Initializes resources that depend on platform options.\r\n\t * @param {HTMLCanvasElement} canvas - The Canvas element.\r\n\t * @private\r\n\t */\r\n\t_ensureLoaded: function(canvas) {\r\n\t\tif (!this.disableCSSInjection) {\r\n\t\t\t// If the canvas is in a shadow DOM, then the styles must also be inserted\r\n\t\t\t// into the same shadow DOM.\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5763\r\n\t\t\tvar root = canvas.getRootNode ? canvas.getRootNode() : document;\r\n\t\t\tvar targetNode = root.host ? root : document.head;\r\n\t\t\tinjectCSS(targetNode, stylesheet);\r\n\t\t}\r\n\t},\r\n\r\n\tacquireContext: function(item, config) {\r\n\t\tif (typeof item === 'string') {\r\n\t\t\titem = document.getElementById(item);\r\n\t\t} else if (item.length) {\r\n\t\t\t// Support for array based queries (such as jQuery)\r\n\t\t\titem = item[0];\r\n\t\t}\r\n\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\t// To prevent canvas fingerprinting, some add-ons undefine the getContext\r\n\t\t// method, for example: https://github.com/kkapsner/CanvasBlocker\r\n\t\t// https://github.com/chartjs/Chart.js/issues/2807\r\n\t\tvar context = item && item.getContext && item.getContext('2d');\r\n\r\n\t\t// `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is\r\n\t\t// inside an iframe or when running in a protected environment. We could guess the\r\n\t\t// types from their toString() value but let's keep things flexible and assume it's\r\n\t\t// a sufficient condition if the item has a context2D which has item as `canvas`.\r\n\t\t// https://github.com/chartjs/Chart.js/issues/3887\r\n\t\t// https://github.com/chartjs/Chart.js/issues/4102\r\n\t\t// https://github.com/chartjs/Chart.js/issues/4152\r\n\t\tif (context && context.canvas === item) {\r\n\t\t\t// Load platform resources on first chart creation, to make it possible to\r\n\t\t\t// import the library before setting platform options.\r\n\t\t\tthis._ensureLoaded(item);\r\n\t\t\tinitCanvas(item, config);\r\n\t\t\treturn context;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\treleaseContext: function(context) {\r\n\t\tvar canvas = context.canvas;\r\n\t\tif (!canvas[EXPANDO_KEY]) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar initial = canvas[EXPANDO_KEY].initial;\r\n\t\t['height', 'width'].forEach(function(prop) {\r\n\t\t\tvar value = initial[prop];\r\n\t\t\tif (helpers$1.isNullOrUndef(value)) {\r\n\t\t\t\tcanvas.removeAttribute(prop);\r\n\t\t\t} else {\r\n\t\t\t\tcanvas.setAttribute(prop, value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.each(initial.style || {}, function(value, key) {\r\n\t\t\tcanvas.style[key] = value;\r\n\t\t});\r\n\r\n\t\t// The canvas render size might have been changed (and thus the state stack discarded),\r\n\t\t// we can't use save() and restore() to restore the initial state. So make sure that at\r\n\t\t// least the canvas context is reset to the default state by setting the canvas width.\r\n\t\t// https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html\r\n\t\t// eslint-disable-next-line no-self-assign\r\n\t\tcanvas.width = canvas.width;\r\n\r\n\t\tdelete canvas[EXPANDO_KEY];\r\n\t},\r\n\r\n\taddEventListener: function(chart, type, listener) {\r\n\t\tvar canvas = chart.canvas;\r\n\t\tif (type === 'resize') {\r\n\t\t\t// Note: the resize event is not supported on all browsers.\r\n\t\t\taddResizeListener(canvas, listener, chart);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar expando = listener[EXPANDO_KEY] || (listener[EXPANDO_KEY] = {});\r\n\t\tvar proxies = expando.proxies || (expando.proxies = {});\r\n\t\tvar proxy = proxies[chart.id + '_' + type] = function(event) {\r\n\t\t\tlistener(fromNativeEvent(event, chart));\r\n\t\t};\r\n\r\n\t\taddListener(canvas, type, proxy);\r\n\t},\r\n\r\n\tremoveEventListener: function(chart, type, listener) {\r\n\t\tvar canvas = chart.canvas;\r\n\t\tif (type === 'resize') {\r\n\t\t\t// Note: the resize event is not supported on all browsers.\r\n\t\t\tremoveResizeListener(canvas);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar expando = listener[EXPANDO_KEY] || {};\r\n\t\tvar proxies = expando.proxies || {};\r\n\t\tvar proxy = proxies[chart.id + '_' + type];\r\n\t\tif (!proxy) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tremoveListener(canvas, type, proxy);\r\n\t}\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use EventTarget.addEventListener instead.\r\n * EventTarget.addEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\r\n * @function Chart.helpers.addEvent\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.addEvent = addListener;\r\n\r\n/**\r\n * Provided for backward compatibility, use EventTarget.removeEventListener instead.\r\n * EventTarget.removeEventListener compatibility: Chrome, Opera 7, Safari, FF1.5+, IE9+\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener\r\n * @function Chart.helpers.removeEvent\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.removeEvent = removeListener;\n\n// @TODO Make possible to select another platform at build time.\r\nvar implementation = platform_dom$2._enabled ? platform_dom$2 : platform_basic;\r\n\r\n/**\r\n * @namespace Chart.platform\r\n * @see https://chartjs.gitbooks.io/proposals/content/Platform.html\r\n * @since 2.4.0\r\n */\r\nvar platform = helpers$1.extend({\r\n\t/**\r\n\t * @since 2.7.0\r\n\t */\r\n\tinitialize: function() {},\r\n\r\n\t/**\r\n\t * Called at chart construction time, returns a context2d instance implementing\r\n\t * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.\r\n\t * @param {*} item - The native item from which to acquire context (platform specific)\r\n\t * @param {object} options - The chart options\r\n\t * @returns {CanvasRenderingContext2D} context2d instance\r\n\t */\r\n\tacquireContext: function() {},\r\n\r\n\t/**\r\n\t * Called at chart destruction time, releases any resources associated to the context\r\n\t * previously returned by the acquireContext() method.\r\n\t * @param {CanvasRenderingContext2D} context - The context2d instance\r\n\t * @returns {boolean} true if the method succeeded, else false\r\n\t */\r\n\treleaseContext: function() {},\r\n\r\n\t/**\r\n\t * Registers the specified listener on the given chart.\r\n\t * @param {Chart} chart - Chart from which to listen for event\r\n\t * @param {string} type - The ({@link IEvent}) type to listen for\r\n\t * @param {function} listener - Receives a notification (an object that implements\r\n\t * the {@link IEvent} interface) when an event of the specified type occurs.\r\n\t */\r\n\taddEventListener: function() {},\r\n\r\n\t/**\r\n\t * Removes the specified listener previously registered with addEventListener.\r\n\t * @param {Chart} chart - Chart from which to remove the listener\r\n\t * @param {string} type - The ({@link IEvent}) type to remove\r\n\t * @param {function} listener - The listener function to remove from the event target.\r\n\t */\r\n\tremoveEventListener: function() {}\r\n\r\n}, implementation);\n\ncore_defaults._set('global', {\r\n\tplugins: {}\r\n});\r\n\r\n/**\r\n * The plugin service singleton\r\n * @namespace Chart.plugins\r\n * @since 2.1.0\r\n */\r\nvar core_plugins = {\r\n\t/**\r\n\t * Globally registered plugins.\r\n\t * @private\r\n\t */\r\n\t_plugins: [],\r\n\r\n\t/**\r\n\t * This identifier is used to invalidate the descriptors cache attached to each chart\r\n\t * when a global plugin is registered or unregistered. In this case, the cache ID is\r\n\t * incremented and descriptors are regenerated during following API calls.\r\n\t * @private\r\n\t */\r\n\t_cacheId: 0,\r\n\r\n\t/**\r\n\t * Registers the given plugin(s) if not already registered.\r\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\r\n\t */\r\n\tregister: function(plugins) {\r\n\t\tvar p = this._plugins;\r\n\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\tif (p.indexOf(plugin) === -1) {\r\n\t\t\t\tp.push(plugin);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Unregisters the given plugin(s) only if registered.\r\n\t * @param {IPlugin[]|IPlugin} plugins plugin instance(s).\r\n\t */\r\n\tunregister: function(plugins) {\r\n\t\tvar p = this._plugins;\r\n\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\tvar idx = p.indexOf(plugin);\r\n\t\t\tif (idx !== -1) {\r\n\t\t\t\tp.splice(idx, 1);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Remove all registered plugins.\r\n\t * @since 2.1.5\r\n\t */\r\n\tclear: function() {\r\n\t\tthis._plugins = [];\r\n\t\tthis._cacheId++;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the number of registered plugins?\r\n\t * @returns {number}\r\n\t * @since 2.1.5\r\n\t */\r\n\tcount: function() {\r\n\t\treturn this._plugins.length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns all registered plugin instances.\r\n\t * @returns {IPlugin[]} array of plugin objects.\r\n\t * @since 2.1.5\r\n\t */\r\n\tgetAll: function() {\r\n\t\treturn this._plugins;\r\n\t},\r\n\r\n\t/**\r\n\t * Calls enabled plugins for `chart` on the specified hook and with the given args.\r\n\t * This method immediately returns as soon as a plugin explicitly returns false. The\r\n\t * returned value can be used, for instance, to interrupt the current action.\r\n\t * @param {Chart} chart - The chart instance for which plugins should be called.\r\n\t * @param {string} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\r\n\t * @param {Array} [args] - Extra arguments to apply to the hook call.\r\n\t * @returns {boolean} false if any of the plugins return false, else returns true.\r\n\t */\r\n\tnotify: function(chart, hook, args) {\r\n\t\tvar descriptors = this.descriptors(chart);\r\n\t\tvar ilen = descriptors.length;\r\n\t\tvar i, descriptor, plugin, params, method;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tdescriptor = descriptors[i];\r\n\t\t\tplugin = descriptor.plugin;\r\n\t\t\tmethod = plugin[hook];\r\n\t\t\tif (typeof method === 'function') {\r\n\t\t\t\tparams = [chart].concat(args || []);\r\n\t\t\t\tparams.push(descriptor.options);\r\n\t\t\t\tif (method.apply(plugin, params) === false) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns descriptors of enabled plugins for the given chart.\r\n\t * @returns {object[]} [{ plugin, options }]\r\n\t * @private\r\n\t */\r\n\tdescriptors: function(chart) {\r\n\t\tvar cache = chart.$plugins || (chart.$plugins = {});\r\n\t\tif (cache.id === this._cacheId) {\r\n\t\t\treturn cache.descriptors;\r\n\t\t}\r\n\r\n\t\tvar plugins = [];\r\n\t\tvar descriptors = [];\r\n\t\tvar config = (chart && chart.config) || {};\r\n\t\tvar options = (config.options && config.options.plugins) || {};\r\n\r\n\t\tthis._plugins.concat(config.plugins || []).forEach(function(plugin) {\r\n\t\t\tvar idx = plugins.indexOf(plugin);\r\n\t\t\tif (idx !== -1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar id = plugin.id;\r\n\t\t\tvar opts = options[id];\r\n\t\t\tif (opts === false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (opts === true) {\r\n\t\t\t\topts = helpers$1.clone(core_defaults.global.plugins[id]);\r\n\t\t\t}\r\n\r\n\t\t\tplugins.push(plugin);\r\n\t\t\tdescriptors.push({\r\n\t\t\t\tplugin: plugin,\r\n\t\t\t\toptions: opts || {}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tcache.descriptors = descriptors;\r\n\t\tcache.id = this._cacheId;\r\n\t\treturn descriptors;\r\n\t},\r\n\r\n\t/**\r\n\t * Invalidates cache for the given chart: descriptors hold a reference on plugin option,\r\n\t * but in some cases, this reference can be changed by the user when updating options.\r\n\t * https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\r\n\t * @private\r\n\t */\r\n\t_invalidate: function(chart) {\r\n\t\tdelete chart.$plugins;\r\n\t}\r\n};\n\nvar core_scaleService = {\r\n\t// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then\r\n\t// use the new chart options to grab the correct scale\r\n\tconstructors: {},\r\n\t// Use a registration function so that we can move to an ES6 map when we no longer need to support\r\n\t// old browsers\r\n\r\n\t// Scale config defaults\r\n\tdefaults: {},\r\n\tregisterScaleType: function(type, scaleConstructor, scaleDefaults) {\r\n\t\tthis.constructors[type] = scaleConstructor;\r\n\t\tthis.defaults[type] = helpers$1.clone(scaleDefaults);\r\n\t},\r\n\tgetScaleConstructor: function(type) {\r\n\t\treturn this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;\r\n\t},\r\n\tgetScaleDefaults: function(type) {\r\n\t\t// Return the scale defaults merged with the global settings so that we always use the latest ones\r\n\t\treturn this.defaults.hasOwnProperty(type) ? helpers$1.merge(Object.create(null), [core_defaults.scale, this.defaults[type]]) : {};\r\n\t},\r\n\tupdateScaleDefaults: function(type, additions) {\r\n\t\tvar me = this;\r\n\t\tif (me.defaults.hasOwnProperty(type)) {\r\n\t\t\tme.defaults[type] = helpers$1.extend(me.defaults[type], additions);\r\n\t\t}\r\n\t},\r\n\taddScalesToLayout: function(chart) {\r\n\t\t// Adds each scale to the chart.boxes array to be sized accordingly\r\n\t\thelpers$1.each(chart.scales, function(scale) {\r\n\t\t\t// Set ILayoutItem parameters for backwards compatibility\r\n\t\t\tscale.fullWidth = scale.options.fullWidth;\r\n\t\t\tscale.position = scale.options.position;\r\n\t\t\tscale.weight = scale.options.weight;\r\n\t\t\tcore_layouts.addBox(chart, scale);\r\n\t\t});\r\n\t}\r\n};\n\nvar valueOrDefault$8 = helpers$1.valueOrDefault;\r\nvar getRtlHelper = helpers$1.rtl.getRtlAdapter;\r\n\r\ncore_defaults._set('global', {\r\n\ttooltips: {\r\n\t\tenabled: true,\r\n\t\tcustom: null,\r\n\t\tmode: 'nearest',\r\n\t\tposition: 'average',\r\n\t\tintersect: true,\r\n\t\tbackgroundColor: 'rgba(0,0,0,0.8)',\r\n\t\ttitleFontStyle: 'bold',\r\n\t\ttitleSpacing: 2,\r\n\t\ttitleMarginBottom: 6,\r\n\t\ttitleFontColor: '#fff',\r\n\t\ttitleAlign: 'left',\r\n\t\tbodySpacing: 2,\r\n\t\tbodyFontColor: '#fff',\r\n\t\tbodyAlign: 'left',\r\n\t\tfooterFontStyle: 'bold',\r\n\t\tfooterSpacing: 2,\r\n\t\tfooterMarginTop: 6,\r\n\t\tfooterFontColor: '#fff',\r\n\t\tfooterAlign: 'left',\r\n\t\tyPadding: 6,\r\n\t\txPadding: 6,\r\n\t\tcaretPadding: 2,\r\n\t\tcaretSize: 5,\r\n\t\tcornerRadius: 6,\r\n\t\tmultiKeyBackground: '#fff',\r\n\t\tdisplayColors: true,\r\n\t\tborderColor: 'rgba(0,0,0,0)',\r\n\t\tborderWidth: 0,\r\n\t\tcallbacks: {\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeTitle: helpers$1.noop,\r\n\t\t\ttitle: function(tooltipItems, data) {\r\n\t\t\t\tvar title = '';\r\n\t\t\t\tvar labels = data.labels;\r\n\t\t\t\tvar labelCount = labels ? labels.length : 0;\r\n\r\n\t\t\t\tif (tooltipItems.length > 0) {\r\n\t\t\t\t\tvar item = tooltipItems[0];\r\n\t\t\t\t\tif (item.label) {\r\n\t\t\t\t\t\ttitle = item.label;\r\n\t\t\t\t\t} else if (item.xLabel) {\r\n\t\t\t\t\t\ttitle = item.xLabel;\r\n\t\t\t\t\t} else if (labelCount > 0 && item.index < labelCount) {\r\n\t\t\t\t\t\ttitle = labels[item.index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn title;\r\n\t\t\t},\r\n\t\t\tafterTitle: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeBody: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItem, data)\r\n\t\t\tbeforeLabel: helpers$1.noop,\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar label = data.datasets[tooltipItem.datasetIndex].label || '';\r\n\r\n\t\t\t\tif (label) {\r\n\t\t\t\t\tlabel += ': ';\r\n\t\t\t\t}\r\n\t\t\t\tif (!helpers$1.isNullOrUndef(tooltipItem.value)) {\r\n\t\t\t\t\tlabel += tooltipItem.value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlabel += tooltipItem.yLabel;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t},\r\n\t\t\tlabelColor: function(tooltipItem, chart) {\r\n\t\t\t\tvar meta = chart.getDatasetMeta(tooltipItem.datasetIndex);\r\n\t\t\t\tvar activeElement = meta.data[tooltipItem.index];\r\n\t\t\t\tvar view = activeElement._view;\r\n\t\t\t\treturn {\r\n\t\t\t\t\tborderColor: view.borderColor,\r\n\t\t\t\t\tbackgroundColor: view.backgroundColor\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tlabelTextColor: function() {\r\n\t\t\t\treturn this._options.bodyFontColor;\r\n\t\t\t},\r\n\t\t\tafterLabel: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tafterBody: helpers$1.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeFooter: helpers$1.noop,\r\n\t\t\tfooter: helpers$1.noop,\r\n\t\t\tafterFooter: helpers$1.noop\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar positioners = {\r\n\t/**\r\n\t * Average mode places the tooltip at the average position of the elements shown\r\n\t * @function Chart.Tooltip.positioners.average\r\n\t * @param elements {ChartElement[]} the elements being displayed in the tooltip\r\n\t * @returns {object} tooltip position\r\n\t */\r\n\taverage: function(elements) {\r\n\t\tif (!elements.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar i, len;\r\n\t\tvar x = 0;\r\n\t\tvar y = 0;\r\n\t\tvar count = 0;\r\n\r\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\r\n\t\t\tvar el = elements[i];\r\n\t\t\tif (el && el.hasValue()) {\r\n\t\t\t\tvar pos = el.tooltipPosition();\r\n\t\t\t\tx += pos.x;\r\n\t\t\t\ty += pos.y;\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tx: x / count,\r\n\t\t\ty: y / count\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the tooltip position nearest of the item nearest to the event position\r\n\t * @function Chart.Tooltip.positioners.nearest\r\n\t * @param elements {Chart.Element[]} the tooltip elements\r\n\t * @param eventPosition {object} the position of the event in canvas coordinates\r\n\t * @returns {object} the tooltip position\r\n\t */\r\n\tnearest: function(elements, eventPosition) {\r\n\t\tvar x = eventPosition.x;\r\n\t\tvar y = eventPosition.y;\r\n\t\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\t\tvar i, len, nearestElement;\r\n\r\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\r\n\t\t\tvar el = elements[i];\r\n\t\t\tif (el && el.hasValue()) {\r\n\t\t\t\tvar center = el.getCenterPoint();\r\n\t\t\t\tvar d = helpers$1.distanceBetweenPoints(eventPosition, center);\r\n\r\n\t\t\t\tif (d < minDistance) {\r\n\t\t\t\t\tminDistance = d;\r\n\t\t\t\t\tnearestElement = el;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (nearestElement) {\r\n\t\t\tvar tp = nearestElement.tooltipPosition();\r\n\t\t\tx = tp.x;\r\n\t\t\ty = tp.y;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tx: x,\r\n\t\t\ty: y\r\n\t\t};\r\n\t}\r\n};\r\n\r\n// Helper to push or concat based on if the 2nd parameter is an array or not\r\nfunction pushOrConcat(base, toPush) {\r\n\tif (toPush) {\r\n\t\tif (helpers$1.isArray(toPush)) {\r\n\t\t\t// base = base.concat(toPush);\r\n\t\t\tArray.prototype.push.apply(base, toPush);\r\n\t\t} else {\r\n\t\t\tbase.push(toPush);\r\n\t\t}\r\n\t}\r\n\r\n\treturn base;\r\n}\r\n\r\n/**\r\n * Returns array of strings split by newline\r\n * @param {string} value - The value to split by newline.\r\n * @returns {string[]} value if newline present - Returned from String split() method\r\n * @function\r\n */\r\nfunction splitNewlines(str) {\r\n\tif ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\r\n\t\treturn str.split('\\n');\r\n\t}\r\n\treturn str;\r\n}\r\n\r\n\r\n/**\r\n * Private helper to create a tooltip item model\r\n * @param element - the chart element (point, arc, bar) to create the tooltip item for\r\n * @return new tooltip item\r\n */\r\nfunction createTooltipItem(element) {\r\n\tvar xScale = element._xScale;\r\n\tvar yScale = element._yScale || element._scale; // handle radar || polarArea charts\r\n\tvar index = element._index;\r\n\tvar datasetIndex = element._datasetIndex;\r\n\tvar controller = element._chart.getDatasetMeta(datasetIndex).controller;\r\n\tvar indexScale = controller._getIndexScale();\r\n\tvar valueScale = controller._getValueScale();\r\n\r\n\treturn {\r\n\t\txLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tyLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tlabel: indexScale ? '' + indexScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tvalue: valueScale ? '' + valueScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\tindex: index,\r\n\t\tdatasetIndex: datasetIndex,\r\n\t\tx: element._model.x,\r\n\t\ty: element._model.y\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the reset model for the tooltip\r\n * @param tooltipOpts {object} the tooltip options\r\n */\r\nfunction getBaseModel(tooltipOpts) {\r\n\tvar globalDefaults = core_defaults.global;\r\n\r\n\treturn {\r\n\t\t// Positioning\r\n\t\txPadding: tooltipOpts.xPadding,\r\n\t\tyPadding: tooltipOpts.yPadding,\r\n\t\txAlign: tooltipOpts.xAlign,\r\n\t\tyAlign: tooltipOpts.yAlign,\r\n\r\n\t\t// Drawing direction and text direction\r\n\t\trtl: tooltipOpts.rtl,\r\n\t\ttextDirection: tooltipOpts.textDirection,\r\n\r\n\t\t// Body\r\n\t\tbodyFontColor: tooltipOpts.bodyFontColor,\r\n\t\t_bodyFontFamily: valueOrDefault$8(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_bodyFontStyle: valueOrDefault$8(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),\r\n\t\t_bodyAlign: tooltipOpts.bodyAlign,\r\n\t\tbodyFontSize: valueOrDefault$8(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),\r\n\t\tbodySpacing: tooltipOpts.bodySpacing,\r\n\r\n\t\t// Title\r\n\t\ttitleFontColor: tooltipOpts.titleFontColor,\r\n\t\t_titleFontFamily: valueOrDefault$8(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_titleFontStyle: valueOrDefault$8(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),\r\n\t\ttitleFontSize: valueOrDefault$8(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),\r\n\t\t_titleAlign: tooltipOpts.titleAlign,\r\n\t\ttitleSpacing: tooltipOpts.titleSpacing,\r\n\t\ttitleMarginBottom: tooltipOpts.titleMarginBottom,\r\n\r\n\t\t// Footer\r\n\t\tfooterFontColor: tooltipOpts.footerFontColor,\r\n\t\t_footerFontFamily: valueOrDefault$8(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t_footerFontStyle: valueOrDefault$8(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),\r\n\t\tfooterFontSize: valueOrDefault$8(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),\r\n\t\t_footerAlign: tooltipOpts.footerAlign,\r\n\t\tfooterSpacing: tooltipOpts.footerSpacing,\r\n\t\tfooterMarginTop: tooltipOpts.footerMarginTop,\r\n\r\n\t\t// Appearance\r\n\t\tcaretSize: tooltipOpts.caretSize,\r\n\t\tcornerRadius: tooltipOpts.cornerRadius,\r\n\t\tbackgroundColor: tooltipOpts.backgroundColor,\r\n\t\topacity: 0,\r\n\t\tlegendColorBackground: tooltipOpts.multiKeyBackground,\r\n\t\tdisplayColors: tooltipOpts.displayColors,\r\n\t\tborderColor: tooltipOpts.borderColor,\r\n\t\tborderWidth: tooltipOpts.borderWidth\r\n\t};\r\n}\r\n\r\n/**\r\n * Get the size of the tooltip\r\n */\r\nfunction getTooltipSize(tooltip, model) {\r\n\tvar ctx = tooltip._chart.ctx;\r\n\r\n\tvar height = model.yPadding * 2; // Tooltip Padding\r\n\tvar width = 0;\r\n\r\n\t// Count of all lines in the body\r\n\tvar body = model.body;\r\n\tvar combinedBodyLength = body.reduce(function(count, bodyItem) {\r\n\t\treturn count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;\r\n\t}, 0);\r\n\tcombinedBodyLength += model.beforeBody.length + model.afterBody.length;\r\n\r\n\tvar titleLineCount = model.title.length;\r\n\tvar footerLineCount = model.footer.length;\r\n\tvar titleFontSize = model.titleFontSize;\r\n\tvar bodyFontSize = model.bodyFontSize;\r\n\tvar footerFontSize = model.footerFontSize;\r\n\r\n\theight += titleLineCount * titleFontSize; // Title Lines\r\n\theight += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing\r\n\theight += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin\r\n\theight += combinedBodyLength * bodyFontSize; // Body Lines\r\n\theight += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing\r\n\theight += footerLineCount ? model.footerMarginTop : 0; // Footer Margin\r\n\theight += footerLineCount * (footerFontSize); // Footer Lines\r\n\theight += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing\r\n\r\n\t// Title width\r\n\tvar widthPadding = 0;\r\n\tvar maxLineWidth = function(line) {\r\n\t\twidth = Math.max(width, ctx.measureText(line).width + widthPadding);\r\n\t};\r\n\r\n\tctx.font = helpers$1.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);\r\n\thelpers$1.each(model.title, maxLineWidth);\r\n\r\n\t// Body width\r\n\tctx.font = helpers$1.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);\r\n\thelpers$1.each(model.beforeBody.concat(model.afterBody), maxLineWidth);\r\n\r\n\t// Body lines may include some extra width due to the color box\r\n\twidthPadding = model.displayColors ? (bodyFontSize + 2) : 0;\r\n\thelpers$1.each(body, function(bodyItem) {\r\n\t\thelpers$1.each(bodyItem.before, maxLineWidth);\r\n\t\thelpers$1.each(bodyItem.lines, maxLineWidth);\r\n\t\thelpers$1.each(bodyItem.after, maxLineWidth);\r\n\t});\r\n\r\n\t// Reset back to 0\r\n\twidthPadding = 0;\r\n\r\n\t// Footer width\r\n\tctx.font = helpers$1.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);\r\n\thelpers$1.each(model.footer, maxLineWidth);\r\n\r\n\t// Add padding\r\n\twidth += 2 * model.xPadding;\r\n\r\n\treturn {\r\n\t\twidth: width,\r\n\t\theight: height\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the alignment of a tooltip given the size\r\n */\r\nfunction determineAlignment(tooltip, size) {\r\n\tvar model = tooltip._model;\r\n\tvar chart = tooltip._chart;\r\n\tvar chartArea = tooltip._chart.chartArea;\r\n\tvar xAlign = 'center';\r\n\tvar yAlign = 'center';\r\n\r\n\tif (model.y < size.height) {\r\n\t\tyAlign = 'top';\r\n\t} else if (model.y > (chart.height - size.height)) {\r\n\t\tyAlign = 'bottom';\r\n\t}\r\n\r\n\tvar lf, rf; // functions to determine left, right alignment\r\n\tvar olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart\r\n\tvar yf; // function to get the y alignment if the tooltip goes outside of the left or right edges\r\n\tvar midX = (chartArea.left + chartArea.right) / 2;\r\n\tvar midY = (chartArea.top + chartArea.bottom) / 2;\r\n\r\n\tif (yAlign === 'center') {\r\n\t\tlf = function(x) {\r\n\t\t\treturn x <= midX;\r\n\t\t};\r\n\t\trf = function(x) {\r\n\t\t\treturn x > midX;\r\n\t\t};\r\n\t} else {\r\n\t\tlf = function(x) {\r\n\t\t\treturn x <= (size.width / 2);\r\n\t\t};\r\n\t\trf = function(x) {\r\n\t\t\treturn x >= (chart.width - (size.width / 2));\r\n\t\t};\r\n\t}\r\n\r\n\tolf = function(x) {\r\n\t\treturn x + size.width + model.caretSize + model.caretPadding > chart.width;\r\n\t};\r\n\torf = function(x) {\r\n\t\treturn x - size.width - model.caretSize - model.caretPadding < 0;\r\n\t};\r\n\tyf = function(y) {\r\n\t\treturn y <= midY ? 'top' : 'bottom';\r\n\t};\r\n\r\n\tif (lf(model.x)) {\r\n\t\txAlign = 'left';\r\n\r\n\t\t// Is tooltip too wide and goes over the right side of the chart.?\r\n\t\tif (olf(model.x)) {\r\n\t\t\txAlign = 'center';\r\n\t\t\tyAlign = yf(model.y);\r\n\t\t}\r\n\t} else if (rf(model.x)) {\r\n\t\txAlign = 'right';\r\n\r\n\t\t// Is tooltip too wide and goes outside left edge of canvas?\r\n\t\tif (orf(model.x)) {\r\n\t\t\txAlign = 'center';\r\n\t\t\tyAlign = yf(model.y);\r\n\t\t}\r\n\t}\r\n\r\n\tvar opts = tooltip._options;\r\n\treturn {\r\n\t\txAlign: opts.xAlign ? opts.xAlign : xAlign,\r\n\t\tyAlign: opts.yAlign ? opts.yAlign : yAlign\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment\r\n */\r\nfunction getBackgroundPoint(vm, size, alignment, chart) {\r\n\t// Background Position\r\n\tvar x = vm.x;\r\n\tvar y = vm.y;\r\n\r\n\tvar caretSize = vm.caretSize;\r\n\tvar caretPadding = vm.caretPadding;\r\n\tvar cornerRadius = vm.cornerRadius;\r\n\tvar xAlign = alignment.xAlign;\r\n\tvar yAlign = alignment.yAlign;\r\n\tvar paddingAndSize = caretSize + caretPadding;\r\n\tvar radiusAndPadding = cornerRadius + caretPadding;\r\n\r\n\tif (xAlign === 'right') {\r\n\t\tx -= size.width;\r\n\t} else if (xAlign === 'center') {\r\n\t\tx -= (size.width / 2);\r\n\t\tif (x + size.width > chart.width) {\r\n\t\t\tx = chart.width - size.width;\r\n\t\t}\r\n\t\tif (x < 0) {\r\n\t\t\tx = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tif (yAlign === 'top') {\r\n\t\ty += paddingAndSize;\r\n\t} else if (yAlign === 'bottom') {\r\n\t\ty -= size.height + paddingAndSize;\r\n\t} else {\r\n\t\ty -= (size.height / 2);\r\n\t}\r\n\r\n\tif (yAlign === 'center') {\r\n\t\tif (xAlign === 'left') {\r\n\t\t\tx += paddingAndSize;\r\n\t\t} else if (xAlign === 'right') {\r\n\t\t\tx -= paddingAndSize;\r\n\t\t}\r\n\t} else if (xAlign === 'left') {\r\n\t\tx -= radiusAndPadding;\r\n\t} else if (xAlign === 'right') {\r\n\t\tx += radiusAndPadding;\r\n\t}\r\n\r\n\treturn {\r\n\t\tx: x,\r\n\t\ty: y\r\n\t};\r\n}\r\n\r\nfunction getAlignedX(vm, align) {\r\n\treturn align === 'center'\r\n\t\t? vm.x + vm.width / 2\r\n\t\t: align === 'right'\r\n\t\t\t? vm.x + vm.width - vm.xPadding\r\n\t\t\t: vm.x + vm.xPadding;\r\n}\r\n\r\n/**\r\n * Helper to build before and after body lines\r\n */\r\nfunction getBeforeAfterBodyLines(callback) {\r\n\treturn pushOrConcat([], splitNewlines(callback));\r\n}\r\n\r\nvar exports$4 = core_element.extend({\r\n\tinitialize: function() {\r\n\t\tthis._model = getBaseModel(this._options);\r\n\t\tthis._lastActive = [];\r\n\t},\r\n\r\n\t// Get the title\r\n\t// Args are: (tooltipItem, data)\r\n\tgetTitle: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me._options;\r\n\t\tvar callbacks = opts.callbacks;\r\n\r\n\t\tvar beforeTitle = callbacks.beforeTitle.apply(me, arguments);\r\n\t\tvar title = callbacks.title.apply(me, arguments);\r\n\t\tvar afterTitle = callbacks.afterTitle.apply(me, arguments);\r\n\r\n\t\tvar lines = [];\r\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeTitle));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(title));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(afterTitle));\r\n\r\n\t\treturn lines;\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetBeforeBody: function() {\r\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.beforeBody.apply(this, arguments));\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetBody: function(tooltipItems, data) {\r\n\t\tvar me = this;\r\n\t\tvar callbacks = me._options.callbacks;\r\n\t\tvar bodyItems = [];\r\n\r\n\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\r\n\t\t\tvar bodyItem = {\r\n\t\t\t\tbefore: [],\r\n\t\t\t\tlines: [],\r\n\t\t\t\tafter: []\r\n\t\t\t};\r\n\t\t\tpushOrConcat(bodyItem.before, splitNewlines(callbacks.beforeLabel.call(me, tooltipItem, data)));\r\n\t\t\tpushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));\r\n\t\t\tpushOrConcat(bodyItem.after, splitNewlines(callbacks.afterLabel.call(me, tooltipItem, data)));\r\n\r\n\t\t\tbodyItems.push(bodyItem);\r\n\t\t});\r\n\r\n\t\treturn bodyItems;\r\n\t},\r\n\r\n\t// Args are: (tooltipItem, data)\r\n\tgetAfterBody: function() {\r\n\t\treturn getBeforeAfterBodyLines(this._options.callbacks.afterBody.apply(this, arguments));\r\n\t},\r\n\r\n\t// Get the footer and beforeFooter and afterFooter lines\r\n\t// Args are: (tooltipItem, data)\r\n\tgetFooter: function() {\r\n\t\tvar me = this;\r\n\t\tvar callbacks = me._options.callbacks;\r\n\r\n\t\tvar beforeFooter = callbacks.beforeFooter.apply(me, arguments);\r\n\t\tvar footer = callbacks.footer.apply(me, arguments);\r\n\t\tvar afterFooter = callbacks.afterFooter.apply(me, arguments);\r\n\r\n\t\tvar lines = [];\r\n\t\tlines = pushOrConcat(lines, splitNewlines(beforeFooter));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(footer));\r\n\t\tlines = pushOrConcat(lines, splitNewlines(afterFooter));\r\n\r\n\t\treturn lines;\r\n\t},\r\n\r\n\tupdate: function(changed) {\r\n\t\tvar me = this;\r\n\t\tvar opts = me._options;\r\n\r\n\t\t// Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition\r\n\t\t// that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time\r\n\t\t// which breaks any animations.\r\n\t\tvar existingModel = me._model;\r\n\t\tvar model = me._model = getBaseModel(opts);\r\n\t\tvar active = me._active;\r\n\r\n\t\tvar data = me._data;\r\n\r\n\t\t// In the case where active.length === 0 we need to keep these at existing values for good animations\r\n\t\tvar alignment = {\r\n\t\t\txAlign: existingModel.xAlign,\r\n\t\t\tyAlign: existingModel.yAlign\r\n\t\t};\r\n\t\tvar backgroundPoint = {\r\n\t\t\tx: existingModel.x,\r\n\t\t\ty: existingModel.y\r\n\t\t};\r\n\t\tvar tooltipSize = {\r\n\t\t\twidth: existingModel.width,\r\n\t\t\theight: existingModel.height\r\n\t\t};\r\n\t\tvar tooltipPosition = {\r\n\t\t\tx: existingModel.caretX,\r\n\t\t\ty: existingModel.caretY\r\n\t\t};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (active.length) {\r\n\t\t\tmodel.opacity = 1;\r\n\r\n\t\t\tvar labelColors = [];\r\n\t\t\tvar labelTextColors = [];\r\n\t\t\ttooltipPosition = positioners[opts.position].call(me, active, me._eventPosition);\r\n\r\n\t\t\tvar tooltipItems = [];\r\n\t\t\tfor (i = 0, len = active.length; i < len; ++i) {\r\n\t\t\t\ttooltipItems.push(createTooltipItem(active[i]));\r\n\t\t\t}\r\n\r\n\t\t\t// If the user provided a filter function, use it to modify the tooltip items\r\n\t\t\tif (opts.filter) {\r\n\t\t\t\ttooltipItems = tooltipItems.filter(function(a) {\r\n\t\t\t\t\treturn opts.filter(a, data);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// If the user provided a sorting function, use it to modify the tooltip items\r\n\t\t\tif (opts.itemSort) {\r\n\t\t\t\ttooltipItems = tooltipItems.sort(function(a, b) {\r\n\t\t\t\t\treturn opts.itemSort(a, b, data);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Determine colors for boxes\r\n\t\t\thelpers$1.each(tooltipItems, function(tooltipItem) {\r\n\t\t\t\tlabelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, me._chart));\r\n\t\t\t\tlabelTextColors.push(opts.callbacks.labelTextColor.call(me, tooltipItem, me._chart));\r\n\t\t\t});\r\n\r\n\r\n\t\t\t// Build the Text Lines\r\n\t\t\tmodel.title = me.getTitle(tooltipItems, data);\r\n\t\t\tmodel.beforeBody = me.getBeforeBody(tooltipItems, data);\r\n\t\t\tmodel.body = me.getBody(tooltipItems, data);\r\n\t\t\tmodel.afterBody = me.getAfterBody(tooltipItems, data);\r\n\t\t\tmodel.footer = me.getFooter(tooltipItems, data);\r\n\r\n\t\t\t// Initial positioning and colors\r\n\t\t\tmodel.x = tooltipPosition.x;\r\n\t\t\tmodel.y = tooltipPosition.y;\r\n\t\t\tmodel.caretPadding = opts.caretPadding;\r\n\t\t\tmodel.labelColors = labelColors;\r\n\t\t\tmodel.labelTextColors = labelTextColors;\r\n\r\n\t\t\t// data points\r\n\t\t\tmodel.dataPoints = tooltipItems;\r\n\r\n\t\t\t// We need to determine alignment of the tooltip\r\n\t\t\ttooltipSize = getTooltipSize(this, model);\r\n\t\t\talignment = determineAlignment(this, tooltipSize);\r\n\t\t\t// Final Size and Position\r\n\t\t\tbackgroundPoint = getBackgroundPoint(model, tooltipSize, alignment, me._chart);\r\n\t\t} else {\r\n\t\t\tmodel.opacity = 0;\r\n\t\t}\r\n\r\n\t\tmodel.xAlign = alignment.xAlign;\r\n\t\tmodel.yAlign = alignment.yAlign;\r\n\t\tmodel.x = backgroundPoint.x;\r\n\t\tmodel.y = backgroundPoint.y;\r\n\t\tmodel.width = tooltipSize.width;\r\n\t\tmodel.height = tooltipSize.height;\r\n\r\n\t\t// Point where the caret on the tooltip points to\r\n\t\tmodel.caretX = tooltipPosition.x;\r\n\t\tmodel.caretY = tooltipPosition.y;\r\n\r\n\t\tme._model = model;\r\n\r\n\t\tif (changed && opts.custom) {\r\n\t\t\topts.custom.call(me, model);\r\n\t\t}\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tdrawCaret: function(tooltipPoint, size) {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar caretPosition = this.getCaretPosition(tooltipPoint, size, vm);\r\n\r\n\t\tctx.lineTo(caretPosition.x1, caretPosition.y1);\r\n\t\tctx.lineTo(caretPosition.x2, caretPosition.y2);\r\n\t\tctx.lineTo(caretPosition.x3, caretPosition.y3);\r\n\t},\r\n\tgetCaretPosition: function(tooltipPoint, size, vm) {\r\n\t\tvar x1, x2, x3, y1, y2, y3;\r\n\t\tvar caretSize = vm.caretSize;\r\n\t\tvar cornerRadius = vm.cornerRadius;\r\n\t\tvar xAlign = vm.xAlign;\r\n\t\tvar yAlign = vm.yAlign;\r\n\t\tvar ptX = tooltipPoint.x;\r\n\t\tvar ptY = tooltipPoint.y;\r\n\t\tvar width = size.width;\r\n\t\tvar height = size.height;\r\n\r\n\t\tif (yAlign === 'center') {\r\n\t\t\ty2 = ptY + (height / 2);\r\n\r\n\t\t\tif (xAlign === 'left') {\r\n\t\t\t\tx1 = ptX;\r\n\t\t\t\tx2 = x1 - caretSize;\r\n\t\t\t\tx3 = x1;\r\n\r\n\t\t\t\ty1 = y2 + caretSize;\r\n\t\t\t\ty3 = y2 - caretSize;\r\n\t\t\t} else {\r\n\t\t\t\tx1 = ptX + width;\r\n\t\t\t\tx2 = x1 + caretSize;\r\n\t\t\t\tx3 = x1;\r\n\r\n\t\t\t\ty1 = y2 - caretSize;\r\n\t\t\t\ty3 = y2 + caretSize;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (xAlign === 'left') {\r\n\t\t\t\tx2 = ptX + cornerRadius + (caretSize);\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t} else if (xAlign === 'right') {\r\n\t\t\t\tx2 = ptX + width - cornerRadius - caretSize;\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t} else {\r\n\t\t\t\tx2 = vm.caretX;\r\n\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t}\r\n\t\t\tif (yAlign === 'top') {\r\n\t\t\t\ty1 = ptY;\r\n\t\t\t\ty2 = y1 - caretSize;\r\n\t\t\t\ty3 = y1;\r\n\t\t\t} else {\r\n\t\t\t\ty1 = ptY + height;\r\n\t\t\t\ty2 = y1 + caretSize;\r\n\t\t\t\ty3 = y1;\r\n\t\t\t\t// invert drawing order\r\n\t\t\t\tvar tmp = x3;\r\n\t\t\t\tx3 = x1;\r\n\t\t\t\tx1 = tmp;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3};\r\n\t},\r\n\r\n\tdrawTitle: function(pt, vm, ctx) {\r\n\t\tvar title = vm.title;\r\n\t\tvar length = title.length;\r\n\t\tvar titleFontSize, titleSpacing, i;\r\n\r\n\t\tif (length) {\r\n\t\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\t\tpt.x = getAlignedX(vm, vm._titleAlign);\r\n\r\n\t\t\tctx.textAlign = rtlHelper.textAlign(vm._titleAlign);\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\ttitleFontSize = vm.titleFontSize;\r\n\t\t\ttitleSpacing = vm.titleSpacing;\r\n\r\n\t\t\tctx.fillStyle = vm.titleFontColor;\r\n\t\t\tctx.font = helpers$1.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\r\n\r\n\t\t\tfor (i = 0; i < length; ++i) {\r\n\t\t\t\tctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFontSize / 2);\r\n\t\t\t\tpt.y += titleFontSize + titleSpacing; // Line Height and spacing\r\n\r\n\t\t\t\tif (i + 1 === length) {\r\n\t\t\t\t\tpt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdrawBody: function(pt, vm, ctx) {\r\n\t\tvar bodyFontSize = vm.bodyFontSize;\r\n\t\tvar bodySpacing = vm.bodySpacing;\r\n\t\tvar bodyAlign = vm._bodyAlign;\r\n\t\tvar body = vm.body;\r\n\t\tvar drawColorBoxes = vm.displayColors;\r\n\t\tvar xLinePadding = 0;\r\n\t\tvar colorX = drawColorBoxes ? getAlignedX(vm, 'left') : 0;\r\n\r\n\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\tvar fillLineOfText = function(line) {\r\n\t\t\tctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyFontSize / 2);\r\n\t\t\tpt.y += bodyFontSize + bodySpacing;\r\n\t\t};\r\n\r\n\t\tvar bodyItem, textColor, labelColors, lines, i, j, ilen, jlen;\r\n\t\tvar bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\r\n\r\n\t\tctx.textAlign = bodyAlign;\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.font = helpers$1.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\r\n\r\n\t\tpt.x = getAlignedX(vm, bodyAlignForCalculation);\r\n\r\n\t\t// Before body lines\r\n\t\tctx.fillStyle = vm.bodyFontColor;\r\n\t\thelpers$1.each(vm.beforeBody, fillLineOfText);\r\n\r\n\t\txLinePadding = drawColorBoxes && bodyAlignForCalculation !== 'right'\r\n\t\t\t? bodyAlign === 'center' ? (bodyFontSize / 2 + 1) : (bodyFontSize + 2)\r\n\t\t\t: 0;\r\n\r\n\t\t// Draw body lines now\r\n\t\tfor (i = 0, ilen = body.length; i < ilen; ++i) {\r\n\t\t\tbodyItem = body[i];\r\n\t\t\ttextColor = vm.labelTextColors[i];\r\n\t\t\tlabelColors = vm.labelColors[i];\r\n\r\n\t\t\tctx.fillStyle = textColor;\r\n\t\t\thelpers$1.each(bodyItem.before, fillLineOfText);\r\n\r\n\t\t\tlines = bodyItem.lines;\r\n\t\t\tfor (j = 0, jlen = lines.length; j < jlen; ++j) {\r\n\t\t\t\t// Draw Legend-like boxes if needed\r\n\t\t\t\tif (drawColorBoxes) {\r\n\t\t\t\t\tvar rtlColorX = rtlHelper.x(colorX);\r\n\r\n\t\t\t\t\t// Fill a white rect so that colours merge nicely if the opacity is < 1\r\n\t\t\t\t\tctx.fillStyle = vm.legendColorBackground;\r\n\t\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t// Border\r\n\t\t\t\t\tctx.lineWidth = 1;\r\n\t\t\t\t\tctx.strokeStyle = labelColors.borderColor;\r\n\t\t\t\t\tctx.strokeRect(rtlHelper.leftForLtr(rtlColorX, bodyFontSize), pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t// Inner square\r\n\t\t\t\t\tctx.fillStyle = labelColors.backgroundColor;\r\n\t\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), bodyFontSize - 2), pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);\r\n\t\t\t\t\tctx.fillStyle = textColor;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfillLineOfText(lines[j]);\r\n\t\t\t}\r\n\r\n\t\t\thelpers$1.each(bodyItem.after, fillLineOfText);\r\n\t\t}\r\n\r\n\t\t// Reset back to 0 for after body\r\n\t\txLinePadding = 0;\r\n\r\n\t\t// After body lines\r\n\t\thelpers$1.each(vm.afterBody, fillLineOfText);\r\n\t\tpt.y -= bodySpacing; // Remove last body spacing\r\n\t},\r\n\r\n\tdrawFooter: function(pt, vm, ctx) {\r\n\t\tvar footer = vm.footer;\r\n\t\tvar length = footer.length;\r\n\t\tvar footerFontSize, i;\r\n\r\n\t\tif (length) {\r\n\t\t\tvar rtlHelper = getRtlHelper(vm.rtl, vm.x, vm.width);\r\n\r\n\t\t\tpt.x = getAlignedX(vm, vm._footerAlign);\r\n\t\t\tpt.y += vm.footerMarginTop;\r\n\r\n\t\t\tctx.textAlign = rtlHelper.textAlign(vm._footerAlign);\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\tfooterFontSize = vm.footerFontSize;\r\n\r\n\t\t\tctx.fillStyle = vm.footerFontColor;\r\n\t\t\tctx.font = helpers$1.fontString(footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\r\n\r\n\t\t\tfor (i = 0; i < length; ++i) {\r\n\t\t\t\tctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFontSize / 2);\r\n\t\t\t\tpt.y += footerFontSize + vm.footerSpacing;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdrawBackground: function(pt, vm, ctx, tooltipSize) {\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tvar xAlign = vm.xAlign;\r\n\t\tvar yAlign = vm.yAlign;\r\n\t\tvar x = pt.x;\r\n\t\tvar y = pt.y;\r\n\t\tvar width = tooltipSize.width;\r\n\t\tvar height = tooltipSize.height;\r\n\t\tvar radius = vm.cornerRadius;\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.moveTo(x + radius, y);\r\n\t\tif (yAlign === 'top') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + width - radius, y);\r\n\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\r\n\t\tif (yAlign === 'center' && xAlign === 'right') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + width, y + height - radius);\r\n\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\r\n\t\tif (yAlign === 'bottom') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x + radius, y + height);\r\n\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\r\n\t\tif (yAlign === 'center' && xAlign === 'left') {\r\n\t\t\tthis.drawCaret(pt, tooltipSize);\r\n\t\t}\r\n\t\tctx.lineTo(x, y + radius);\r\n\t\tctx.quadraticCurveTo(x, y, x + radius, y);\r\n\t\tctx.closePath();\r\n\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth > 0) {\r\n\t\t\tctx.stroke();\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm.opacity === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tooltipSize = {\r\n\t\t\twidth: vm.width,\r\n\t\t\theight: vm.height\r\n\t\t};\r\n\t\tvar pt = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\r\n\t\t// IE11/Edge does not like very small opacities, so snap to 0\r\n\t\tvar opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;\r\n\r\n\t\t// Truthy/falsey value for empty tooltip\r\n\t\tvar hasTooltipContent = vm.title.length || vm.beforeBody.length || vm.body.length || vm.afterBody.length || vm.footer.length;\r\n\r\n\t\tif (this._options.enabled && hasTooltipContent) {\r\n\t\t\tctx.save();\r\n\t\t\tctx.globalAlpha = opacity;\r\n\r\n\t\t\t// Draw Background\r\n\t\t\tthis.drawBackground(pt, vm, ctx, tooltipSize);\r\n\r\n\t\t\t// Draw Title, Body, and Footer\r\n\t\t\tpt.y += vm.yPadding;\r\n\r\n\t\t\thelpers$1.rtl.overrideTextDirection(ctx, vm.textDirection);\r\n\r\n\t\t\t// Titles\r\n\t\t\tthis.drawTitle(pt, vm, ctx);\r\n\r\n\t\t\t// Body\r\n\t\t\tthis.drawBody(pt, vm, ctx);\r\n\r\n\t\t\t// Footer\r\n\t\t\tthis.drawFooter(pt, vm, ctx);\r\n\r\n\t\t\thelpers$1.rtl.restoreTextDirection(ctx, vm.textDirection);\r\n\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event - The event to handle\r\n\t * @returns {boolean} true if the tooltip changed\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar options = me._options;\r\n\t\tvar changed = false;\r\n\r\n\t\tme._lastActive = me._lastActive || [];\r\n\r\n\t\t// Find Active Elements for tooltips\r\n\t\tif (e.type === 'mouseout') {\r\n\t\t\tme._active = [];\r\n\t\t} else {\r\n\t\t\tme._active = me._chart.getElementsAtEventForMode(e, options.mode, options);\r\n\t\t\tif (options.reverse) {\r\n\t\t\t\tme._active.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remember Last Actives\r\n\t\tchanged = !helpers$1.arrayEquals(me._active, me._lastActive);\r\n\r\n\t\t// Only handle target event on tooltip change\r\n\t\tif (changed) {\r\n\t\t\tme._lastActive = me._active;\r\n\r\n\t\t\tif (options.enabled || options.custom) {\r\n\t\t\t\tme._eventPosition = {\r\n\t\t\t\t\tx: e.x,\r\n\t\t\t\t\ty: e.y\r\n\t\t\t\t};\r\n\r\n\t\t\t\tme.update(true);\r\n\t\t\t\tme.pivot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn changed;\r\n\t}\r\n});\r\n\r\n/**\r\n * @namespace Chart.Tooltip.positioners\r\n */\r\nvar positioners_1 = positioners;\r\n\r\nvar core_tooltip = exports$4;\ncore_tooltip.positioners = positioners_1;\n\nvar valueOrDefault$9 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {},\r\n\tevents: [\r\n\t\t'mousemove',\r\n\t\t'mouseout',\r\n\t\t'click',\r\n\t\t'touchstart',\r\n\t\t'touchmove'\r\n\t],\r\n\thover: {\r\n\t\tonHover: null,\r\n\t\tmode: 'nearest',\r\n\t\tintersect: true,\r\n\t\tanimationDuration: 400\r\n\t},\r\n\tonClick: null,\r\n\tmaintainAspectRatio: true,\r\n\tresponsive: true,\r\n\tresponsiveAnimationDuration: 0\r\n});\r\n\r\n/**\r\n * Recursively merge the given config objects representing the `scales` option\r\n * by incorporating scale defaults in `xAxes` and `yAxes` array items, then\r\n * returns a deep copy of the result, thus doesn't alter inputs.\r\n */\r\nfunction mergeScaleConfig(/* config objects ... */) {\r\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\r\n\t\tmerger: function(key, target, source, options) {\r\n\t\t\tif (key === 'xAxes' || key === 'yAxes') {\r\n\t\t\t\tvar slen = source[key].length;\r\n\t\t\t\tvar i, type, scale;\r\n\r\n\t\t\t\tif (!target[key]) {\r\n\t\t\t\t\ttarget[key] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (i = 0; i < slen; ++i) {\r\n\t\t\t\t\tscale = source[key][i];\r\n\t\t\t\t\ttype = valueOrDefault$9(scale.type, key === 'xAxes' ? 'category' : 'linear');\r\n\r\n\t\t\t\t\tif (i >= target[key].length) {\r\n\t\t\t\t\t\ttarget[key].push({});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!target[key][i].type || (scale.type && scale.type !== target[key][i].type)) {\r\n\t\t\t\t\t\t// new/untyped scale or type changed: let's apply the new defaults\r\n\t\t\t\t\t\t// then merge source scale to correctly overwrite the defaults.\r\n\t\t\t\t\t\thelpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// scales type are the same\r\n\t\t\t\t\t\thelpers$1.merge(target[key][i], scale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\thelpers$1._merger(key, target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Recursively merge the given config objects as the root options by handling\r\n * default scale options for the `scales` and `scale` properties, then returns\r\n * a deep copy of the result, thus doesn't alter inputs.\r\n */\r\nfunction mergeConfig(/* config objects ... */) {\r\n\treturn helpers$1.merge(Object.create(null), [].slice.call(arguments), {\r\n\t\tmerger: function(key, target, source, options) {\r\n\t\t\tvar tval = target[key] || Object.create(null);\r\n\t\t\tvar sval = source[key];\r\n\r\n\t\t\tif (key === 'scales') {\r\n\t\t\t\t// scale config merging is complex. Add our own function here for that\r\n\t\t\t\ttarget[key] = mergeScaleConfig(tval, sval);\r\n\t\t\t} else if (key === 'scale') {\r\n\t\t\t\t// used in polar area & radar charts since there is only one scale\r\n\t\t\t\ttarget[key] = helpers$1.merge(tval, [core_scaleService.getScaleDefaults(sval.type), sval]);\r\n\t\t\t} else {\r\n\t\t\t\thelpers$1._merger(key, target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction initConfig(config) {\r\n\tconfig = config || Object.create(null);\r\n\r\n\t// Do NOT use mergeConfig for the data object because this method merges arrays\r\n\t// and so would change references to labels and datasets, preventing data updates.\r\n\tvar data = config.data = config.data || {};\r\n\tdata.datasets = data.datasets || [];\r\n\tdata.labels = data.labels || [];\r\n\r\n\tconfig.options = mergeConfig(\r\n\t\tcore_defaults.global,\r\n\t\tcore_defaults[config.type],\r\n\t\tconfig.options || {});\r\n\r\n\treturn config;\r\n}\r\n\r\nfunction updateConfig(chart) {\r\n\tvar newOptions = chart.options;\r\n\r\n\thelpers$1.each(chart.scales, function(scale) {\r\n\t\tcore_layouts.removeBox(chart, scale);\r\n\t});\r\n\r\n\tnewOptions = mergeConfig(\r\n\t\tcore_defaults.global,\r\n\t\tcore_defaults[chart.config.type],\r\n\t\tnewOptions);\r\n\r\n\tchart.options = chart.config.options = newOptions;\r\n\tchart.ensureScalesHaveIDs();\r\n\tchart.buildOrUpdateScales();\r\n\r\n\t// Tooltip\r\n\tchart.tooltip._options = newOptions.tooltips;\r\n\tchart.tooltip.initialize();\r\n}\r\n\r\nfunction nextAvailableScaleId(axesOpts, prefix, index) {\r\n\tvar id;\r\n\tvar hasId = function(obj) {\r\n\t\treturn obj.id === id;\r\n\t};\r\n\r\n\tdo {\r\n\t\tid = prefix + index++;\r\n\t} while (helpers$1.findIndex(axesOpts, hasId) >= 0);\r\n\r\n\treturn id;\r\n}\r\n\r\nfunction positionIsHorizontal(position) {\r\n\treturn position === 'top' || position === 'bottom';\r\n}\r\n\r\nfunction compare2Level(l1, l2) {\r\n\treturn function(a, b) {\r\n\t\treturn a[l1] === b[l1]\r\n\t\t\t? a[l2] - b[l2]\r\n\t\t\t: a[l1] - b[l1];\r\n\t};\r\n}\r\n\r\nvar Chart = function(item, config) {\r\n\tthis.construct(item, config);\r\n\treturn this;\r\n};\r\n\r\nhelpers$1.extend(Chart.prototype, /** @lends Chart */ {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tconstruct: function(item, config) {\r\n\t\tvar me = this;\r\n\r\n\t\tconfig = initConfig(config);\r\n\r\n\t\tvar context = platform.acquireContext(item, config);\r\n\t\tvar canvas = context && context.canvas;\r\n\t\tvar height = canvas && canvas.height;\r\n\t\tvar width = canvas && canvas.width;\r\n\r\n\t\tme.id = helpers$1.uid();\r\n\t\tme.ctx = context;\r\n\t\tme.canvas = canvas;\r\n\t\tme.config = config;\r\n\t\tme.width = width;\r\n\t\tme.height = height;\r\n\t\tme.aspectRatio = height ? width / height : null;\r\n\t\tme.options = config.options;\r\n\t\tme._bufferedRender = false;\r\n\t\tme._layers = [];\r\n\r\n\t\t/**\r\n\t\t * Provided for backward compatibility, Chart and Chart.Controller have been merged,\r\n\t\t * the \"instance\" still need to be defined since it might be called from plugins.\r\n\t\t * @prop Chart#chart\r\n\t\t * @deprecated since version 2.6.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tme.chart = me;\r\n\t\tme.controller = me; // chart.chart.controller #inception\r\n\r\n\t\t// Add the chart instance to the global namespace\r\n\t\tChart.instances[me.id] = me;\r\n\r\n\t\t// Define alias to the config data: `chart.data === chart.config.data`\r\n\t\tObject.defineProperty(me, 'data', {\r\n\t\t\tget: function() {\r\n\t\t\t\treturn me.config.data;\r\n\t\t\t},\r\n\t\t\tset: function(value) {\r\n\t\t\t\tme.config.data = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (!context || !canvas) {\r\n\t\t\t// The given item is not a compatible context2d element, let's return before finalizing\r\n\t\t\t// the chart initialization but after setting basic chart / controller properties that\r\n\t\t\t// can help to figure out that the chart is not valid (e.g chart.canvas !== null);\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/2807\r\n\t\t\tconsole.error(\"Failed to create chart: can't acquire context from the given item\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme.initialize();\r\n\t\tme.update();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\r\n\t\t// Before init plugin notification\r\n\t\tcore_plugins.notify(me, 'beforeInit');\r\n\r\n\t\thelpers$1.retinaScale(me, me.options.devicePixelRatio);\r\n\r\n\t\tme.bindEvents();\r\n\r\n\t\tif (me.options.responsive) {\r\n\t\t\t// Initial resize before chart draws (must be silent to preserve initial animations).\r\n\t\t\tme.resize(true);\r\n\t\t}\r\n\r\n\t\tme.initToolTip();\r\n\r\n\t\t// After init plugin notification\r\n\t\tcore_plugins.notify(me, 'afterInit');\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tclear: function() {\r\n\t\thelpers$1.canvas.clear(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tstop: function() {\r\n\t\t// Stops any current animation loop occurring\r\n\t\tcore_animations.cancelAnimation(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tresize: function(silent) {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar canvas = me.canvas;\r\n\t\tvar aspectRatio = (options.maintainAspectRatio && me.aspectRatio) || null;\r\n\r\n\t\t// the canvas render width and height will be casted to integers so make sure that\r\n\t\t// the canvas display style uses the same integer values to avoid blurring effect.\r\n\r\n\t\t// Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed\r\n\t\tvar newWidth = Math.max(0, Math.floor(helpers$1.getMaximumWidth(canvas)));\r\n\t\tvar newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : helpers$1.getMaximumHeight(canvas)));\r\n\r\n\t\tif (me.width === newWidth && me.height === newHeight) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcanvas.width = me.width = newWidth;\r\n\t\tcanvas.height = me.height = newHeight;\r\n\t\tcanvas.style.width = newWidth + 'px';\r\n\t\tcanvas.style.height = newHeight + 'px';\r\n\r\n\t\thelpers$1.retinaScale(me, options.devicePixelRatio);\r\n\r\n\t\tif (!silent) {\r\n\t\t\t// Notify any plugins about the resize\r\n\t\t\tvar newSize = {width: newWidth, height: newHeight};\r\n\t\t\tcore_plugins.notify(me, 'resize', [newSize]);\r\n\r\n\t\t\t// Notify of resize\r\n\t\t\tif (options.onResize) {\r\n\t\t\t\toptions.onResize(me, newSize);\r\n\t\t\t}\r\n\r\n\t\t\tme.stop();\r\n\t\t\tme.update({\r\n\t\t\t\tduration: options.responsiveAnimationDuration\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tensureScalesHaveIDs: function() {\r\n\t\tvar options = this.options;\r\n\t\tvar scalesOptions = options.scales || {};\r\n\t\tvar scaleOptions = options.scale;\r\n\r\n\t\thelpers$1.each(scalesOptions.xAxes, function(xAxisOptions, index) {\r\n\t\t\tif (!xAxisOptions.id) {\r\n\t\t\t\txAxisOptions.id = nextAvailableScaleId(scalesOptions.xAxes, 'x-axis-', index);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.each(scalesOptions.yAxes, function(yAxisOptions, index) {\r\n\t\t\tif (!yAxisOptions.id) {\r\n\t\t\t\tyAxisOptions.id = nextAvailableScaleId(scalesOptions.yAxes, 'y-axis-', index);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (scaleOptions) {\r\n\t\t\tscaleOptions.id = scaleOptions.id || 'scale';\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Builds a map of scale ID to scale object for future lookup.\r\n\t */\r\n\tbuildOrUpdateScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar scales = me.scales || {};\r\n\t\tvar items = [];\r\n\t\tvar updated = Object.keys(scales).reduce(function(obj, id) {\r\n\t\t\tobj[id] = false;\r\n\t\t\treturn obj;\r\n\t\t}, {});\r\n\r\n\t\tif (options.scales) {\r\n\t\t\titems = items.concat(\r\n\t\t\t\t(options.scales.xAxes || []).map(function(xAxisOptions) {\r\n\t\t\t\t\treturn {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};\r\n\t\t\t\t}),\r\n\t\t\t\t(options.scales.yAxes || []).map(function(yAxisOptions) {\r\n\t\t\t\t\treturn {options: yAxisOptions, dtype: 'linear', dposition: 'left'};\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (options.scale) {\r\n\t\t\titems.push({\r\n\t\t\t\toptions: options.scale,\r\n\t\t\t\tdtype: 'radialLinear',\r\n\t\t\t\tisDefault: true,\r\n\t\t\t\tdposition: 'chartArea'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\thelpers$1.each(items, function(item) {\r\n\t\t\tvar scaleOptions = item.options;\r\n\t\t\tvar id = scaleOptions.id;\r\n\t\t\tvar scaleType = valueOrDefault$9(scaleOptions.type, item.dtype);\r\n\r\n\t\t\tif (positionIsHorizontal(scaleOptions.position) !== positionIsHorizontal(item.dposition)) {\r\n\t\t\t\tscaleOptions.position = item.dposition;\r\n\t\t\t}\r\n\r\n\t\t\tupdated[id] = true;\r\n\t\t\tvar scale = null;\r\n\t\t\tif (id in scales && scales[id].type === scaleType) {\r\n\t\t\t\tscale = scales[id];\r\n\t\t\t\tscale.options = scaleOptions;\r\n\t\t\t\tscale.ctx = me.ctx;\r\n\t\t\t\tscale.chart = me;\r\n\t\t\t} else {\r\n\t\t\t\tvar scaleClass = core_scaleService.getScaleConstructor(scaleType);\r\n\t\t\t\tif (!scaleClass) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tscale = new scaleClass({\r\n\t\t\t\t\tid: id,\r\n\t\t\t\t\ttype: scaleType,\r\n\t\t\t\t\toptions: scaleOptions,\r\n\t\t\t\t\tctx: me.ctx,\r\n\t\t\t\t\tchart: me\r\n\t\t\t\t});\r\n\t\t\t\tscales[scale.id] = scale;\r\n\t\t\t}\r\n\r\n\t\t\tscale.mergeTicksOptions();\r\n\r\n\t\t\t// TODO(SB): I think we should be able to remove this custom case (options.scale)\r\n\t\t\t// and consider it as a regular scale part of the \"scales\"\" map only! This would\r\n\t\t\t// make the logic easier and remove some useless? custom code.\r\n\t\t\tif (item.isDefault) {\r\n\t\t\t\tme.scale = scale;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// clear up discarded scales\r\n\t\thelpers$1.each(updated, function(hasUpdated, id) {\r\n\t\t\tif (!hasUpdated) {\r\n\t\t\t\tdelete scales[id];\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tme.scales = scales;\r\n\r\n\t\tcore_scaleService.addScalesToLayout(this);\r\n\t},\r\n\r\n\tbuildOrUpdateControllers: function() {\r\n\t\tvar me = this;\r\n\t\tvar newControllers = [];\r\n\t\tvar datasets = me.data.datasets;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; i++) {\r\n\t\t\tvar dataset = datasets[i];\r\n\t\t\tvar meta = me.getDatasetMeta(i);\r\n\t\t\tvar type = dataset.type || me.config.type;\r\n\r\n\t\t\tif (meta.type && meta.type !== type) {\r\n\t\t\t\tme.destroyDatasetMeta(i);\r\n\t\t\t\tmeta = me.getDatasetMeta(i);\r\n\t\t\t}\r\n\t\t\tmeta.type = type;\r\n\t\t\tmeta.order = dataset.order || 0;\r\n\t\t\tmeta.index = i;\r\n\r\n\t\t\tif (meta.controller) {\r\n\t\t\t\tmeta.controller.updateIndex(i);\r\n\t\t\t\tmeta.controller.linkScales();\r\n\t\t\t} else {\r\n\t\t\t\tvar ControllerClass = controllers[meta.type];\r\n\t\t\t\tif (ControllerClass === undefined) {\r\n\t\t\t\t\tthrow new Error('\"' + meta.type + '\" is not a chart type.');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmeta.controller = new ControllerClass(me, i);\r\n\t\t\t\tnewControllers.push(meta.controller);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn newControllers;\r\n\t},\r\n\r\n\t/**\r\n\t * Reset the elements of all datasets\r\n\t * @private\r\n\t */\r\n\tresetElements: function() {\r\n\t\tvar me = this;\r\n\t\thelpers$1.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\tme.getDatasetMeta(datasetIndex).controller.reset();\r\n\t\t}, me);\r\n\t},\r\n\r\n\t/**\r\n\t* Resets the chart back to it's state before the initial animation\r\n\t*/\r\n\treset: function() {\r\n\t\tthis.resetElements();\r\n\t\tthis.tooltip.initialize();\r\n\t},\r\n\r\n\tupdate: function(config) {\r\n\t\tvar me = this;\r\n\t\tvar i, ilen;\r\n\r\n\t\tif (!config || typeof config !== 'object') {\r\n\t\t\t// backwards compatibility\r\n\t\t\tconfig = {\r\n\t\t\t\tduration: config,\r\n\t\t\t\tlazy: arguments[1]\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tupdateConfig(me);\r\n\r\n\t\t// plugins options references might have change, let's invalidate the cache\r\n\t\t// https://github.com/chartjs/Chart.js/issues/5111#issuecomment-355934167\r\n\t\tcore_plugins._invalidate(me);\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeUpdate') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// In case the entire data object changed\r\n\t\tme.tooltip._data = me.data;\r\n\r\n\t\t// Make sure dataset controllers are updated and new controllers are reset\r\n\t\tvar newControllers = me.buildOrUpdateControllers();\r\n\r\n\t\t// Make sure all dataset controllers have correct meta data counts\r\n\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; i++) {\r\n\t\t\tme.getDatasetMeta(i).controller.buildOrUpdateElements();\r\n\t\t}\r\n\r\n\t\tme.updateLayout();\r\n\r\n\t\t// Can only reset the new controllers after the scales have been updated\r\n\t\tif (me.options.animation && me.options.animation.duration) {\r\n\t\t\thelpers$1.each(newControllers, function(controller) {\r\n\t\t\t\tcontroller.reset();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tme.updateDatasets();\r\n\r\n\t\t// Need to reset tooltip in case it is displayed with elements that are removed\r\n\t\t// after update.\r\n\t\tme.tooltip.initialize();\r\n\r\n\t\t// Last active contains items that were previously in the tooltip.\r\n\t\t// When we reset the tooltip, we need to clear it\r\n\t\tme.lastActive = [];\r\n\r\n\t\t// Do this before render so that any plugins that need final scale updates can use it\r\n\t\tcore_plugins.notify(me, 'afterUpdate');\r\n\r\n\t\tme._layers.sort(compare2Level('z', '_idx'));\r\n\r\n\t\tif (me._bufferedRender) {\r\n\t\t\tme._bufferedRequest = {\r\n\t\t\t\tduration: config.duration,\r\n\t\t\t\teasing: config.easing,\r\n\t\t\t\tlazy: config.lazy\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tme.render(config);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`\r\n\t * hook, in which case, plugins will not be called on `afterLayout`.\r\n\t * @private\r\n\t */\r\n\tupdateLayout: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeLayout') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcore_layouts.update(this, this.width, this.height);\r\n\r\n\t\tme._layers = [];\r\n\t\thelpers$1.each(me.boxes, function(box) {\r\n\t\t\t// _configure is called twice, once in core.scale.update and once here.\r\n\t\t\t// Here the boxes are fully updated and at their final positions.\r\n\t\t\tif (box._configure) {\r\n\t\t\t\tbox._configure();\r\n\t\t\t}\r\n\t\t\tme._layers.push.apply(me._layers, box._layers());\r\n\t\t}, me);\r\n\r\n\t\tme._layers.forEach(function(item, index) {\r\n\t\t\titem._idx = index;\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Provided for backward compatibility, use `afterLayout` instead.\r\n\t\t * @method IPlugin#afterScaleUpdate\r\n\t\t * @deprecated since version 2.5.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tcore_plugins.notify(me, 'afterScaleUpdate');\r\n\t\tcore_plugins.notify(me, 'afterLayout');\r\n\t},\r\n\r\n\t/**\r\n\t * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.\r\n\t * @private\r\n\t */\r\n\tupdateDatasets: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetsUpdate') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tme.updateDataset(i);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetsUpdate');\r\n\t},\r\n\r\n\t/**\r\n\t * Updates dataset at index unless a plugin returns `false` to the `beforeDatasetUpdate`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetUpdate`.\r\n\t * @private\r\n\t */\r\n\tupdateDataset: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getDatasetMeta(index);\r\n\t\tvar args = {\r\n\t\t\tmeta: meta,\r\n\t\t\tindex: index\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetUpdate', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmeta.controller._update();\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetUpdate', [args]);\r\n\t},\r\n\r\n\trender: function(config) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (!config || typeof config !== 'object') {\r\n\t\t\t// backwards compatibility\r\n\t\t\tconfig = {\r\n\t\t\t\tduration: config,\r\n\t\t\t\tlazy: arguments[1]\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar animationOptions = me.options.animation;\r\n\t\tvar duration = valueOrDefault$9(config.duration, animationOptions && animationOptions.duration);\r\n\t\tvar lazy = config.lazy;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeRender') === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar onComplete = function(animation) {\r\n\t\t\tcore_plugins.notify(me, 'afterRender');\r\n\t\t\thelpers$1.callback(animationOptions && animationOptions.onComplete, [animation], me);\r\n\t\t};\r\n\r\n\t\tif (animationOptions && duration) {\r\n\t\t\tvar animation = new core_animation({\r\n\t\t\t\tnumSteps: duration / 16.66, // 60 fps\r\n\t\t\t\teasing: config.easing || animationOptions.easing,\r\n\r\n\t\t\t\trender: function(chart, animationObject) {\r\n\t\t\t\t\tvar easingFunction = helpers$1.easing.effects[animationObject.easing];\r\n\t\t\t\t\tvar currentStep = animationObject.currentStep;\r\n\t\t\t\t\tvar stepDecimal = currentStep / animationObject.numSteps;\r\n\r\n\t\t\t\t\tchart.draw(easingFunction(stepDecimal), stepDecimal, currentStep);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonAnimationProgress: animationOptions.onProgress,\r\n\t\t\t\tonAnimationComplete: onComplete\r\n\t\t\t});\r\n\r\n\t\t\tcore_animations.addAnimation(me, animation, duration, lazy);\r\n\t\t} else {\r\n\t\t\tme.draw();\r\n\r\n\t\t\t// See https://github.com/chartjs/Chart.js/issues/3781\r\n\t\t\tonComplete(new core_animation({numSteps: 0, chart: me}));\r\n\t\t}\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\tdraw: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar i, layers;\r\n\r\n\t\tme.clear();\r\n\r\n\t\tif (helpers$1.isNullOrUndef(easingValue)) {\r\n\t\t\teasingValue = 1;\r\n\t\t}\r\n\r\n\t\tme.transition(easingValue);\r\n\r\n\t\tif (me.width <= 0 || me.height <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDraw', [easingValue]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Because of plugin hooks (before/afterDatasetsDraw), datasets can't\r\n\t\t// currently be part of layers. Instead, we draw\r\n\t\t// layers <= 0 before(default, backward compat), and the rest after\r\n\t\tlayers = me._layers;\r\n\t\tfor (i = 0; i < layers.length && layers[i].z <= 0; ++i) {\r\n\t\t\tlayers[i].draw(me.chartArea);\r\n\t\t}\r\n\r\n\t\tme.drawDatasets(easingValue);\r\n\r\n\t\t// Rest of layers\r\n\t\tfor (; i < layers.length; ++i) {\r\n\t\t\tlayers[i].draw(me.chartArea);\r\n\t\t}\r\n\r\n\t\tme._drawTooltip(easingValue);\r\n\r\n\t\tcore_plugins.notify(me, 'afterDraw', [easingValue]);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\ttransition: function(easingValue) {\r\n\t\tvar me = this;\r\n\r\n\t\tfor (var i = 0, ilen = (me.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\tif (me.isDatasetVisible(i)) {\r\n\t\t\t\tme.getDatasetMeta(i).controller.transition(easingValue);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.tooltip.transition(easingValue);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getSortedDatasetMetas: function(filterVisible) {\r\n\t\tvar me = this;\r\n\t\tvar datasets = me.data.datasets || [];\r\n\t\tvar result = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; ++i) {\r\n\t\t\tif (!filterVisible || me.isDatasetVisible(i)) {\r\n\t\t\t\tresult.push(me.getDatasetMeta(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresult.sort(compare2Level('order', 'index'));\r\n\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getSortedVisibleDatasetMetas: function() {\r\n\t\treturn this._getSortedDatasetMetas(true);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetsDraw`.\r\n\t * @private\r\n\t */\r\n\tdrawDatasets: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar metasets, i;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmetasets = me._getSortedVisibleDatasetMetas();\r\n\t\tfor (i = metasets.length - 1; i >= 0; --i) {\r\n\t\t\tme.drawDataset(metasets[i], easingValue);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetsDraw', [easingValue]);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw`\r\n\t * hook, in which case, plugins will not be called on `afterDatasetDraw`.\r\n\t * @private\r\n\t */\r\n\tdrawDataset: function(meta, easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar args = {\r\n\t\t\tmeta: meta,\r\n\t\t\tindex: meta.index,\r\n\t\t\teasingValue: easingValue\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeDatasetDraw', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmeta.controller.draw(easingValue);\r\n\r\n\t\tcore_plugins.notify(me, 'afterDatasetDraw', [args]);\r\n\t},\r\n\r\n\t/**\r\n\t * Draws tooltip unless a plugin returns `false` to the `beforeTooltipDraw`\r\n\t * hook, in which case, plugins will not be called on `afterTooltipDraw`.\r\n\t * @private\r\n\t */\r\n\t_drawTooltip: function(easingValue) {\r\n\t\tvar me = this;\r\n\t\tvar tooltip = me.tooltip;\r\n\t\tvar args = {\r\n\t\t\ttooltip: tooltip,\r\n\t\t\teasingValue: easingValue\r\n\t\t};\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ttooltip.draw();\r\n\r\n\t\tcore_plugins.notify(me, 'afterTooltipDraw', [args]);\r\n\t},\r\n\r\n\t/**\r\n\t * Get the single element that was clicked on\r\n\t * @return An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw\r\n\t */\r\n\tgetElementAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.single(this, e);\r\n\t},\r\n\r\n\tgetElementsAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.label(this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetElementsAtXAxis: function(e) {\r\n\t\treturn core_interaction.modes['x-axis'](this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetElementsAtEventForMode: function(e, mode, options) {\r\n\t\tvar method = core_interaction.modes[mode];\r\n\t\tif (typeof method === 'function') {\r\n\t\t\treturn method(this, e, options);\r\n\t\t}\r\n\r\n\t\treturn [];\r\n\t},\r\n\r\n\tgetDatasetAtEvent: function(e) {\r\n\t\treturn core_interaction.modes.dataset(this, e, {intersect: true});\r\n\t},\r\n\r\n\tgetDatasetMeta: function(datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.data.datasets[datasetIndex];\r\n\t\tif (!dataset._meta) {\r\n\t\t\tdataset._meta = {};\r\n\t\t}\r\n\r\n\t\tvar meta = dataset._meta[me.id];\r\n\t\tif (!meta) {\r\n\t\t\tmeta = dataset._meta[me.id] = {\r\n\t\t\t\ttype: null,\r\n\t\t\t\tdata: [],\r\n\t\t\t\tdataset: null,\r\n\t\t\t\tcontroller: null,\r\n\t\t\t\thidden: null,\t\t\t// See isDatasetVisible() comment\r\n\t\t\t\txAxisID: null,\r\n\t\t\t\tyAxisID: null,\r\n\t\t\t\torder: dataset.order || 0,\r\n\t\t\t\tindex: datasetIndex\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn meta;\r\n\t},\r\n\r\n\tgetVisibleDatasetCount: function() {\r\n\t\tvar count = 0;\r\n\t\tfor (var i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tif (this.isDatasetVisible(i)) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t},\r\n\r\n\tisDatasetVisible: function(datasetIndex) {\r\n\t\tvar meta = this.getDatasetMeta(datasetIndex);\r\n\r\n\t\t// meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\r\n\t\t// the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\r\n\t\treturn typeof meta.hidden === 'boolean' ? !meta.hidden : !this.data.datasets[datasetIndex].hidden;\r\n\t},\r\n\r\n\tgenerateLegend: function() {\r\n\t\treturn this.options.legendCallback(this);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroyDatasetMeta: function(datasetIndex) {\r\n\t\tvar id = this.id;\r\n\t\tvar dataset = this.data.datasets[datasetIndex];\r\n\t\tvar meta = dataset._meta && dataset._meta[id];\r\n\r\n\t\tif (meta) {\r\n\t\t\tmeta.controller.destroy();\r\n\t\t\tdelete dataset._meta[id];\r\n\t\t}\r\n\t},\r\n\r\n\tdestroy: function() {\r\n\t\tvar me = this;\r\n\t\tvar canvas = me.canvas;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme.stop();\r\n\r\n\t\t// dataset controllers need to cleanup associated data\r\n\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tme.destroyDatasetMeta(i);\r\n\t\t}\r\n\r\n\t\tif (canvas) {\r\n\t\t\tme.unbindEvents();\r\n\t\t\thelpers$1.canvas.clear(me);\r\n\t\t\tplatform.releaseContext(me.ctx);\r\n\t\t\tme.canvas = null;\r\n\t\t\tme.ctx = null;\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'destroy');\r\n\r\n\t\tdelete Chart.instances[me.id];\r\n\t},\r\n\r\n\ttoBase64Image: function() {\r\n\t\treturn this.canvas.toDataURL.apply(this.canvas, arguments);\r\n\t},\r\n\r\n\tinitToolTip: function() {\r\n\t\tvar me = this;\r\n\t\tme.tooltip = new core_tooltip({\r\n\t\t\t_chart: me,\r\n\t\t\t_chartInstance: me, // deprecated, backward compatibility\r\n\t\t\t_data: me.data,\r\n\t\t\t_options: me.options.tooltips\r\n\t\t}, me);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tbindEvents: function() {\r\n\t\tvar me = this;\r\n\t\tvar listeners = me._listeners = {};\r\n\t\tvar listener = function() {\r\n\t\t\tme.eventHandler.apply(me, arguments);\r\n\t\t};\r\n\r\n\t\thelpers$1.each(me.options.events, function(type) {\r\n\t\t\tplatform.addEventListener(me, type, listener);\r\n\t\t\tlisteners[type] = listener;\r\n\t\t});\r\n\r\n\t\t// Elements used to detect size change should not be injected for non responsive charts.\r\n\t\t// See https://github.com/chartjs/Chart.js/issues/2210\r\n\t\tif (me.options.responsive) {\r\n\t\t\tlistener = function() {\r\n\t\t\t\tme.resize();\r\n\t\t\t};\r\n\r\n\t\t\tplatform.addEventListener(me, 'resize', listener);\r\n\t\t\tlisteners.resize = listener;\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tunbindEvents: function() {\r\n\t\tvar me = this;\r\n\t\tvar listeners = me._listeners;\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tdelete me._listeners;\r\n\t\thelpers$1.each(listeners, function(listener, type) {\r\n\t\t\tplatform.removeEventListener(me, type, listener);\r\n\t\t});\r\n\t},\r\n\r\n\tupdateHoverStyle: function(elements, mode, enabled) {\r\n\t\tvar prefix = enabled ? 'set' : 'remove';\r\n\t\tvar element, i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = elements.length; i < ilen; ++i) {\r\n\t\t\telement = elements[i];\r\n\t\t\tif (element) {\r\n\t\t\t\tthis.getDatasetMeta(element._datasetIndex).controller[prefix + 'HoverStyle'](element);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (mode === 'dataset') {\r\n\t\t\tthis.getDatasetMeta(elements[0]._datasetIndex).controller['_' + prefix + 'DatasetHoverStyle']();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\teventHandler: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar tooltip = me.tooltip;\r\n\r\n\t\tif (core_plugins.notify(me, 'beforeEvent', [e]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Buffer any update calls so that renders do not occur\r\n\t\tme._bufferedRender = true;\r\n\t\tme._bufferedRequest = null;\r\n\r\n\t\tvar changed = me.handleEvent(e);\r\n\t\t// for smooth tooltip animations issue #4989\r\n\t\t// the tooltip should be the source of change\r\n\t\t// Animation check workaround:\r\n\t\t// tooltip._start will be null when tooltip isn't animating\r\n\t\tif (tooltip) {\r\n\t\t\tchanged = tooltip._start\r\n\t\t\t\t? tooltip.handleEvent(e)\r\n\t\t\t\t: changed | tooltip.handleEvent(e);\r\n\t\t}\r\n\r\n\t\tcore_plugins.notify(me, 'afterEvent', [e]);\r\n\r\n\t\tvar bufferedRequest = me._bufferedRequest;\r\n\t\tif (bufferedRequest) {\r\n\t\t\t// If we have an update that was triggered, we need to do a normal render\r\n\t\t\tme.render(bufferedRequest);\r\n\t\t} else if (changed && !me.animating) {\r\n\t\t\t// If entering, leaving, or changing elements, animate the change via pivot\r\n\t\t\tme.stop();\r\n\r\n\t\t\t// We only need to render at this point. Updating will cause scales to be\r\n\t\t\t// recomputed generating flicker & using more memory than necessary.\r\n\t\t\tme.render({\r\n\t\t\t\tduration: me.options.hover.animationDuration,\r\n\t\t\t\tlazy: true\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tme._bufferedRender = false;\r\n\t\tme._bufferedRequest = null;\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event the event to handle\r\n\t * @return {boolean} true if the chart needs to re-render\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options || {};\r\n\t\tvar hoverOptions = options.hover;\r\n\t\tvar changed = false;\r\n\r\n\t\tme.lastActive = me.lastActive || [];\r\n\r\n\t\t// Find Active Elements for hover and tooltips\r\n\t\tif (e.type === 'mouseout') {\r\n\t\t\tme.active = [];\r\n\t\t} else {\r\n\t\t\tme.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);\r\n\t\t}\r\n\r\n\t\t// Invoke onHover hook\r\n\t\t// Need to call with native event here to not break backwards compatibility\r\n\t\thelpers$1.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);\r\n\r\n\t\tif (e.type === 'mouseup' || e.type === 'click') {\r\n\t\t\tif (options.onClick) {\r\n\t\t\t\t// Use e.native here for backwards compatibility\r\n\t\t\t\toptions.onClick.call(me, e.native, me.active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove styling for last active (even if it may still be active)\r\n\t\tif (me.lastActive.length) {\r\n\t\t\tme.updateHoverStyle(me.lastActive, hoverOptions.mode, false);\r\n\t\t}\r\n\r\n\t\t// Built in hover styling\r\n\t\tif (me.active.length && hoverOptions.mode) {\r\n\t\t\tme.updateHoverStyle(me.active, hoverOptions.mode, true);\r\n\t\t}\r\n\r\n\t\tchanged = !helpers$1.arrayEquals(me.active, me.lastActive);\r\n\r\n\t\t// Remember Last Actives\r\n\t\tme.lastActive = me.active;\r\n\r\n\t\treturn changed;\r\n\t}\r\n});\r\n\r\n/**\r\n * NOTE(SB) We actually don't use this container anymore but we need to keep it\r\n * for backward compatibility. Though, it can still be useful for plugins that\r\n * would need to work on multiple charts?!\r\n */\r\nChart.instances = {};\r\n\r\nvar core_controller = Chart;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart instead.\r\n * @class Chart.Controller\r\n * @deprecated since version 2.6\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nChart.Controller = Chart;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart\r\n * @deprecated since version 2.8\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nChart.types = {};\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.helpers.configMerge\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.configMerge = mergeConfig;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.helpers.scaleMerge\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers$1.scaleMerge = mergeScaleConfig;\n\nvar core_helpers = function() {\r\n\r\n\t// -- Basic js utility methods\r\n\r\n\thelpers$1.where = function(collection, filterCallback) {\r\n\t\tif (helpers$1.isArray(collection) && Array.prototype.filter) {\r\n\t\t\treturn collection.filter(filterCallback);\r\n\t\t}\r\n\t\tvar filtered = [];\r\n\r\n\t\thelpers$1.each(collection, function(item) {\r\n\t\t\tif (filterCallback(item)) {\r\n\t\t\t\tfiltered.push(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn filtered;\r\n\t};\r\n\thelpers$1.findIndex = Array.prototype.findIndex ?\r\n\t\tfunction(array, callback, scope) {\r\n\t\t\treturn array.findIndex(callback, scope);\r\n\t\t} :\r\n\t\tfunction(array, callback, scope) {\r\n\t\t\tscope = scope === undefined ? array : scope;\r\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\r\n\t\t\t\tif (callback.call(scope, array[i], i, array)) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t};\r\n\thelpers$1.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to start of the array\r\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\r\n\t\t\tstartIndex = -1;\r\n\t\t}\r\n\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers$1.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to end of the array\r\n\t\tif (helpers$1.isNullOrUndef(startIndex)) {\r\n\t\t\tstartIndex = arrayToSearch.length;\r\n\t\t}\r\n\t\tfor (var i = startIndex - 1; i >= 0; i--) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// -- Math methods\r\n\thelpers$1.isNumber = function(n) {\r\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\r\n\t};\r\n\thelpers$1.almostEquals = function(x, y, epsilon) {\r\n\t\treturn Math.abs(x - y) < epsilon;\r\n\t};\r\n\thelpers$1.almostWhole = function(x, epsilon) {\r\n\t\tvar rounded = Math.round(x);\r\n\t\treturn ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);\r\n\t};\r\n\thelpers$1.max = function(array) {\r\n\t\treturn array.reduce(function(max, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.max(max, value);\r\n\t\t\t}\r\n\t\t\treturn max;\r\n\t\t}, Number.NEGATIVE_INFINITY);\r\n\t};\r\n\thelpers$1.min = function(array) {\r\n\t\treturn array.reduce(function(min, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.min(min, value);\r\n\t\t\t}\r\n\t\t\treturn min;\r\n\t\t}, Number.POSITIVE_INFINITY);\r\n\t};\r\n\thelpers$1.sign = Math.sign ?\r\n\t\tfunction(x) {\r\n\t\t\treturn Math.sign(x);\r\n\t\t} :\r\n\t\tfunction(x) {\r\n\t\t\tx = +x; // convert to a number\r\n\t\t\tif (x === 0 || isNaN(x)) {\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t\treturn x > 0 ? 1 : -1;\r\n\t\t};\r\n\thelpers$1.toRadians = function(degrees) {\r\n\t\treturn degrees * (Math.PI / 180);\r\n\t};\r\n\thelpers$1.toDegrees = function(radians) {\r\n\t\treturn radians * (180 / Math.PI);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the number of decimal places\r\n\t * i.e. the number of digits after the decimal point, of the value of this Number.\r\n\t * @param {number} x - A number.\r\n\t * @returns {number} The number of decimal places.\r\n\t * @private\r\n\t */\r\n\thelpers$1._decimalPlaces = function(x) {\r\n\t\tif (!helpers$1.isFinite(x)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar e = 1;\r\n\t\tvar p = 0;\r\n\t\twhile (Math.round(x * e) / e !== x) {\r\n\t\t\te *= 10;\r\n\t\t\tp++;\r\n\t\t}\r\n\t\treturn p;\r\n\t};\r\n\r\n\t// Gets the angle from vertical upright to the point about a centre.\r\n\thelpers$1.getAngleFromPoint = function(centrePoint, anglePoint) {\r\n\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x;\r\n\t\tvar distanceFromYCenter = anglePoint.y - centrePoint.y;\r\n\t\tvar radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\r\n\r\n\t\tvar angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\r\n\r\n\t\tif (angle < (-0.5 * Math.PI)) {\r\n\t\t\tangle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tangle: angle,\r\n\t\t\tdistance: radialDistanceFromCenter\r\n\t\t};\r\n\t};\r\n\thelpers$1.distanceBetweenPoints = function(pt1, pt2) {\r\n\t\treturn Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\r\n\t};\r\n\r\n\t/**\r\n\t * Provided for backward compatibility, not available anymore\r\n\t * @function Chart.helpers.aliasPixel\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t */\r\n\thelpers$1.aliasPixel = function(pixelWidth) {\r\n\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the aligned pixel value to avoid anti-aliasing blur\r\n\t * @param {Chart} chart - The chart instance.\r\n\t * @param {number} pixel - A pixel value.\r\n\t * @param {number} width - The width of the element.\r\n\t * @returns {number} The aligned pixel value.\r\n\t * @private\r\n\t */\r\n\thelpers$1._alignPixel = function(chart, pixel, width) {\r\n\t\tvar devicePixelRatio = chart.currentDevicePixelRatio;\r\n\t\tvar halfWidth = width / 2;\r\n\t\treturn Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\r\n\t};\r\n\r\n\thelpers$1.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {\r\n\t\t// Props to Rob Spencer at scaled innovation for his post on splining between points\r\n\t\t// http://scaledinnovation.com/analytics/splines/aboutSplines.html\r\n\r\n\t\t// This function must also respect \"skipped\" points\r\n\r\n\t\tvar previous = firstPoint.skip ? middlePoint : firstPoint;\r\n\t\tvar current = middlePoint;\r\n\t\tvar next = afterPoint.skip ? middlePoint : afterPoint;\r\n\r\n\t\tvar d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));\r\n\t\tvar d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));\r\n\r\n\t\tvar s01 = d01 / (d01 + d12);\r\n\t\tvar s12 = d12 / (d01 + d12);\r\n\r\n\t\t// If all points are the same, s01 & s02 will be inf\r\n\t\ts01 = isNaN(s01) ? 0 : s01;\r\n\t\ts12 = isNaN(s12) ? 0 : s12;\r\n\r\n\t\tvar fa = t * s01; // scaling factor for triangle Ta\r\n\t\tvar fb = t * s12;\r\n\r\n\t\treturn {\r\n\t\t\tprevious: {\r\n\t\t\t\tx: current.x - fa * (next.x - previous.x),\r\n\t\t\t\ty: current.y - fa * (next.y - previous.y)\r\n\t\t\t},\r\n\t\t\tnext: {\r\n\t\t\t\tx: current.x + fb * (next.x - previous.x),\r\n\t\t\t\ty: current.y + fb * (next.y - previous.y)\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\thelpers$1.EPSILON = Number.EPSILON || 1e-14;\r\n\thelpers$1.splineCurveMonotone = function(points) {\r\n\t\t// This function calculates Bézier control points in a similar way than |splineCurve|,\r\n\t\t// but preserves monotonicity of the provided data and ensures no local extremums are added\r\n\t\t// between the dataset discrete points due to the interpolation.\r\n\t\t// See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\r\n\r\n\t\tvar pointsWithTangents = (points || []).map(function(point) {\r\n\t\t\treturn {\r\n\t\t\t\tmodel: point._model,\r\n\t\t\t\tdeltaK: 0,\r\n\t\t\t\tmK: 0\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\t// Calculate slopes (deltaK) and initialize tangents (mK)\r\n\t\tvar pointsLen = pointsWithTangents.length;\r\n\t\tvar i, pointBefore, pointCurrent, pointAfter;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tvar slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);\r\n\r\n\t\t\t\t// In the case of two points that appear at the same x pixel, slopeDeltaX is 0\r\n\t\t\t\tpointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (!pointBefore || pointBefore.model.skip) {\r\n\t\t\t\tpointCurrent.mK = pointCurrent.deltaK;\r\n\t\t\t} else if (!pointAfter || pointAfter.model.skip) {\r\n\t\t\t\tpointCurrent.mK = pointBefore.deltaK;\r\n\t\t\t} else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {\r\n\t\t\t\tpointCurrent.mK = 0;\r\n\t\t\t} else {\r\n\t\t\t\tpointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Adjust tangents to ensure monotonic properties\r\n\t\tvar alphaK, betaK, tauK, squaredMagnitude;\r\n\t\tfor (i = 0; i < pointsLen - 1; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tpointAfter = pointsWithTangents[i + 1];\r\n\t\t\tif (pointCurrent.model.skip || pointAfter.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (helpers$1.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {\r\n\t\t\t\tpointCurrent.mK = pointAfter.mK = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\talphaK = pointCurrent.mK / pointCurrent.deltaK;\r\n\t\t\tbetaK = pointAfter.mK / pointCurrent.deltaK;\r\n\t\t\tsquaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\r\n\t\t\tif (squaredMagnitude <= 9) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\ttauK = 3 / Math.sqrt(squaredMagnitude);\r\n\t\t\tpointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;\r\n\t\t\tpointAfter.mK = betaK * tauK * pointCurrent.deltaK;\r\n\t\t}\r\n\r\n\t\t// Compute control points\r\n\t\tvar deltaX;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointBefore && !pointBefore.model.skip) {\r\n\t\t\t\tdeltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tdeltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers$1.nextItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index >= collection.length - 1 ? collection[0] : collection[index + 1];\r\n\t\t}\r\n\t\treturn index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];\r\n\t};\r\n\thelpers$1.previousItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index <= 0 ? collection[collection.length - 1] : collection[index - 1];\r\n\t\t}\r\n\t\treturn index <= 0 ? collection[0] : collection[index - 1];\r\n\t};\r\n\t// Implementation of the nice number algorithm used in determining where axis labels will go\r\n\thelpers$1.niceNum = function(range, round) {\r\n\t\tvar exponent = Math.floor(helpers$1.log10(range));\r\n\t\tvar fraction = range / Math.pow(10, exponent);\r\n\t\tvar niceFraction;\r\n\r\n\t\tif (round) {\r\n\t\t\tif (fraction < 1.5) {\r\n\t\t\t\tniceFraction = 1;\r\n\t\t\t} else if (fraction < 3) {\r\n\t\t\t\tniceFraction = 2;\r\n\t\t\t} else if (fraction < 7) {\r\n\t\t\t\tniceFraction = 5;\r\n\t\t\t} else {\r\n\t\t\t\tniceFraction = 10;\r\n\t\t\t}\r\n\t\t} else if (fraction <= 1.0) {\r\n\t\t\tniceFraction = 1;\r\n\t\t} else if (fraction <= 2) {\r\n\t\t\tniceFraction = 2;\r\n\t\t} else if (fraction <= 5) {\r\n\t\t\tniceFraction = 5;\r\n\t\t} else {\r\n\t\t\tniceFraction = 10;\r\n\t\t}\r\n\r\n\t\treturn niceFraction * Math.pow(10, exponent);\r\n\t};\r\n\t// Request animation polyfill - https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\thelpers$1.requestAnimFrame = (function() {\r\n\t\tif (typeof window === 'undefined') {\r\n\t\t\treturn function(callback) {\r\n\t\t\t\tcallback();\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn window.requestAnimationFrame ||\r\n\t\t\twindow.webkitRequestAnimationFrame ||\r\n\t\t\twindow.mozRequestAnimationFrame ||\r\n\t\t\twindow.oRequestAnimationFrame ||\r\n\t\t\twindow.msRequestAnimationFrame ||\r\n\t\t\tfunction(callback) {\r\n\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\r\n\t\t\t};\r\n\t}());\r\n\t// -- DOM methods\r\n\thelpers$1.getRelativePosition = function(evt, chart) {\r\n\t\tvar mouseX, mouseY;\r\n\t\tvar e = evt.originalEvent || evt;\r\n\t\tvar canvas = evt.target || evt.srcElement;\r\n\t\tvar boundingRect = canvas.getBoundingClientRect();\r\n\r\n\t\tvar touches = e.touches;\r\n\t\tif (touches && touches.length > 0) {\r\n\t\t\tmouseX = touches[0].clientX;\r\n\t\t\tmouseY = touches[0].clientY;\r\n\r\n\t\t} else {\r\n\t\t\tmouseX = e.clientX;\r\n\t\t\tmouseY = e.clientY;\r\n\t\t}\r\n\r\n\t\t// Scale mouse coordinates into canvas coordinates\r\n\t\t// by following the pattern laid out by 'jerryj' in the comments of\r\n\t\t// https://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/\r\n\t\tvar paddingLeft = parseFloat(helpers$1.getStyle(canvas, 'padding-left'));\r\n\t\tvar paddingTop = parseFloat(helpers$1.getStyle(canvas, 'padding-top'));\r\n\t\tvar paddingRight = parseFloat(helpers$1.getStyle(canvas, 'padding-right'));\r\n\t\tvar paddingBottom = parseFloat(helpers$1.getStyle(canvas, 'padding-bottom'));\r\n\t\tvar width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;\r\n\t\tvar height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;\r\n\r\n\t\t// We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However\r\n\t\t// the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here\r\n\t\tmouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);\r\n\t\tmouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);\r\n\r\n\t\treturn {\r\n\t\t\tx: mouseX,\r\n\t\t\ty: mouseY\r\n\t\t};\r\n\r\n\t};\r\n\r\n\t// Private helper function to convert max-width/max-height values that may be percentages into a number\r\n\tfunction parseMaxStyle(styleValue, node, parentProperty) {\r\n\t\tvar valueInPixels;\r\n\t\tif (typeof styleValue === 'string') {\r\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\r\n\r\n\t\t\tif (styleValue.indexOf('%') !== -1) {\r\n\t\t\t\t// percentage * size in dimension\r\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalueInPixels = styleValue;\r\n\t\t}\r\n\r\n\t\treturn valueInPixels;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns if the given value contains an effective constraint.\r\n\t * @private\r\n\t */\r\n\tfunction isConstrainedValue(value) {\r\n\t\treturn value !== undefined && value !== null && value !== 'none';\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the max width or height of the given DOM node in a cross-browser compatible fashion\r\n\t * @param {HTMLElement} domNode - the node to check the constraint on\r\n\t * @param {string} maxStyle - the style that defines the maximum for the direction we are using ('max-width' / 'max-height')\r\n\t * @param {string} percentageProperty - property of parent to use when calculating width as a percentage\r\n\t * @see {@link https://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser}\r\n\t */\r\n\tfunction getConstraintDimension(domNode, maxStyle, percentageProperty) {\r\n\t\tvar view = document.defaultView;\r\n\t\tvar parentNode = helpers$1._getParentNode(domNode);\r\n\t\tvar constrainedNode = view.getComputedStyle(domNode)[maxStyle];\r\n\t\tvar constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];\r\n\t\tvar hasCNode = isConstrainedValue(constrainedNode);\r\n\t\tvar hasCContainer = isConstrainedValue(constrainedContainer);\r\n\t\tvar infinity = Number.POSITIVE_INFINITY;\r\n\r\n\t\tif (hasCNode || hasCContainer) {\r\n\t\t\treturn Math.min(\r\n\t\t\t\thasCNode ? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,\r\n\t\t\t\thasCContainer ? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);\r\n\t\t}\r\n\r\n\t\treturn 'none';\r\n\t}\r\n\t// returns Number or undefined if no constraint\r\n\thelpers$1.getConstraintWidth = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-width', 'clientWidth');\r\n\t};\r\n\t// returns Number or undefined if no constraint\r\n\thelpers$1.getConstraintHeight = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-height', 'clientHeight');\r\n\t};\r\n\t/**\r\n\t * @private\r\n \t */\r\n\thelpers$1._calculatePadding = function(container, padding, parentDimension) {\r\n\t\tpadding = helpers$1.getStyle(container, padding);\r\n\r\n\t\treturn padding.indexOf('%') > -1 ? parentDimension * parseInt(padding, 10) / 100 : parseInt(padding, 10);\r\n\t};\r\n\t/**\r\n\t * @private\r\n\t */\r\n\thelpers$1._getParentNode = function(domNode) {\r\n\t\tvar parent = domNode.parentNode;\r\n\t\tif (parent && parent.toString() === '[object ShadowRoot]') {\r\n\t\t\tparent = parent.host;\r\n\t\t}\r\n\t\treturn parent;\r\n\t};\r\n\thelpers$1.getMaximumWidth = function(domNode) {\r\n\t\tvar container = helpers$1._getParentNode(domNode);\r\n\t\tif (!container) {\r\n\t\t\treturn domNode.clientWidth;\r\n\t\t}\r\n\r\n\t\tvar clientWidth = container.clientWidth;\r\n\t\tvar paddingLeft = helpers$1._calculatePadding(container, 'padding-left', clientWidth);\r\n\t\tvar paddingRight = helpers$1._calculatePadding(container, 'padding-right', clientWidth);\r\n\r\n\t\tvar w = clientWidth - paddingLeft - paddingRight;\r\n\t\tvar cw = helpers$1.getConstraintWidth(domNode);\r\n\t\treturn isNaN(cw) ? w : Math.min(w, cw);\r\n\t};\r\n\thelpers$1.getMaximumHeight = function(domNode) {\r\n\t\tvar container = helpers$1._getParentNode(domNode);\r\n\t\tif (!container) {\r\n\t\t\treturn domNode.clientHeight;\r\n\t\t}\r\n\r\n\t\tvar clientHeight = container.clientHeight;\r\n\t\tvar paddingTop = helpers$1._calculatePadding(container, 'padding-top', clientHeight);\r\n\t\tvar paddingBottom = helpers$1._calculatePadding(container, 'padding-bottom', clientHeight);\r\n\r\n\t\tvar h = clientHeight - paddingTop - paddingBottom;\r\n\t\tvar ch = helpers$1.getConstraintHeight(domNode);\r\n\t\treturn isNaN(ch) ? h : Math.min(h, ch);\r\n\t};\r\n\thelpers$1.getStyle = function(el, property) {\r\n\t\treturn el.currentStyle ?\r\n\t\t\tel.currentStyle[property] :\r\n\t\t\tdocument.defaultView.getComputedStyle(el, null).getPropertyValue(property);\r\n\t};\r\n\thelpers$1.retinaScale = function(chart, forceRatio) {\r\n\t\tvar pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1;\r\n\t\tif (pixelRatio === 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar height = chart.height;\r\n\t\tvar width = chart.width;\r\n\r\n\t\tcanvas.height = height * pixelRatio;\r\n\t\tcanvas.width = width * pixelRatio;\r\n\t\tchart.ctx.scale(pixelRatio, pixelRatio);\r\n\r\n\t\t// If no style has been set on the canvas, the render size is used as display size,\r\n\t\t// making the chart visually bigger, so let's enforce it to the \"correct\" values.\r\n\t\t// See https://github.com/chartjs/Chart.js/issues/3575\r\n\t\tif (!canvas.style.height && !canvas.style.width) {\r\n\t\t\tcanvas.style.height = height + 'px';\r\n\t\t\tcanvas.style.width = width + 'px';\r\n\t\t}\r\n\t};\r\n\t// -- Canvas methods\r\n\thelpers$1.fontString = function(pixelSize, fontStyle, fontFamily) {\r\n\t\treturn fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\r\n\t};\r\n\thelpers$1.longestText = function(ctx, font, arrayOfThings, cache) {\r\n\t\tcache = cache || {};\r\n\t\tvar data = cache.data = cache.data || {};\r\n\t\tvar gc = cache.garbageCollect = cache.garbageCollect || [];\r\n\r\n\t\tif (cache.font !== font) {\r\n\t\t\tdata = cache.data = {};\r\n\t\t\tgc = cache.garbageCollect = [];\r\n\t\t\tcache.font = font;\r\n\t\t}\r\n\r\n\t\tctx.font = font;\r\n\t\tvar longest = 0;\r\n\t\tvar ilen = arrayOfThings.length;\r\n\t\tvar i, j, jlen, thing, nestedThing;\r\n\t\tfor (i = 0; i < ilen; i++) {\r\n\t\t\tthing = arrayOfThings[i];\r\n\r\n\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\tif (thing !== undefined && thing !== null && helpers$1.isArray(thing) !== true) {\r\n\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, thing);\r\n\t\t\t} else if (helpers$1.isArray(thing)) {\r\n\t\t\t\t// if it is an array lets measure each element\r\n\t\t\t\t// to do maybe simplify this function a bit so we can do this more recursively?\r\n\t\t\t\tfor (j = 0, jlen = thing.length; j < jlen; j++) {\r\n\t\t\t\t\tnestedThing = thing[j];\r\n\t\t\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\t\t\tif (nestedThing !== undefined && nestedThing !== null && !helpers$1.isArray(nestedThing)) {\r\n\t\t\t\t\t\tlongest = helpers$1.measureText(ctx, data, gc, longest, nestedThing);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar gcLen = gc.length / 2;\r\n\t\tif (gcLen > arrayOfThings.length) {\r\n\t\t\tfor (i = 0; i < gcLen; i++) {\r\n\t\t\t\tdelete data[gc[i]];\r\n\t\t\t}\r\n\t\t\tgc.splice(0, gcLen);\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\thelpers$1.measureText = function(ctx, data, gc, longest, string) {\r\n\t\tvar textWidth = data[string];\r\n\t\tif (!textWidth) {\r\n\t\t\ttextWidth = data[string] = ctx.measureText(string).width;\r\n\t\t\tgc.push(string);\r\n\t\t}\r\n\t\tif (textWidth > longest) {\r\n\t\t\tlongest = textWidth;\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\r\n\t/**\r\n\t * @deprecated\r\n\t */\r\n\thelpers$1.numberOfLabelLines = function(arrayOfThings) {\r\n\t\tvar numberOfLines = 1;\r\n\t\thelpers$1.each(arrayOfThings, function(thing) {\r\n\t\t\tif (helpers$1.isArray(thing)) {\r\n\t\t\t\tif (thing.length > numberOfLines) {\r\n\t\t\t\t\tnumberOfLines = thing.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn numberOfLines;\r\n\t};\r\n\r\n\thelpers$1.color = !chartjsColor ?\r\n\t\tfunction(value) {\r\n\t\t\tconsole.error('Color.js not found!');\r\n\t\t\treturn value;\r\n\t\t} :\r\n\t\tfunction(value) {\r\n\t\t\t/* global CanvasGradient */\r\n\t\t\tif (value instanceof CanvasGradient) {\r\n\t\t\t\tvalue = core_defaults.global.defaultColor;\r\n\t\t\t}\r\n\r\n\t\t\treturn chartjsColor(value);\r\n\t\t};\r\n\r\n\thelpers$1.getHoverColor = function(colorValue) {\r\n\t\t/* global CanvasPattern */\r\n\t\treturn (colorValue instanceof CanvasPattern || colorValue instanceof CanvasGradient) ?\r\n\t\t\tcolorValue :\r\n\t\t\thelpers$1.color(colorValue).saturate(0.5).darken(0.1).rgbString();\r\n\t};\r\n};\n\nfunction abstract() {\r\n\tthrow new Error(\r\n\t\t'This method is not implemented: either no adapter can ' +\r\n\t\t'be found or an incomplete integration was provided.'\r\n\t);\r\n}\r\n\r\n/**\r\n * Date adapter (current used by the time scale)\r\n * @namespace Chart._adapters._date\r\n * @memberof Chart._adapters\r\n * @private\r\n */\r\n\r\n/**\r\n * Currently supported unit string values.\r\n * @typedef {('millisecond'|'second'|'minute'|'hour'|'day'|'week'|'month'|'quarter'|'year')}\r\n * @memberof Chart._adapters._date\r\n * @name Unit\r\n */\r\n\r\n/**\r\n * @class\r\n */\r\nfunction DateAdapter(options) {\r\n\tthis.options = options || {};\r\n}\r\n\r\nhelpers$1.extend(DateAdapter.prototype, /** @lends DateAdapter */ {\r\n\t/**\r\n\t * Returns a map of time formats for the supported formatting units defined\r\n\t * in Unit as well as 'datetime' representing a detailed date/time string.\r\n\t * @returns {{string: string}}\r\n\t */\r\n\tformats: abstract,\r\n\r\n\t/**\r\n\t * Parses the given `value` and return the associated timestamp.\r\n\t * @param {any} value - the value to parse (usually comes from the data)\r\n\t * @param {string} [format] - the expected data format\r\n\t * @returns {(number|null)}\r\n\t * @function\r\n\t */\r\n\tparse: abstract,\r\n\r\n\t/**\r\n\t * Returns the formatted date in the specified `format` for a given `timestamp`.\r\n\t * @param {number} timestamp - the timestamp to format\r\n\t * @param {string} format - the date/time token\r\n\t * @return {string}\r\n\t * @function\r\n\t */\r\n\tformat: abstract,\r\n\r\n\t/**\r\n\t * Adds the specified `amount` of `unit` to the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {number} amount - the amount to add\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @return {number}\r\n\t * @function\r\n\t */\r\n\tadd: abstract,\r\n\r\n\t/**\r\n\t * Returns the number of `unit` between the given timestamps.\r\n\t * @param {number} max - the input timestamp (reference)\r\n\t * @param {number} min - the timestamp to substract\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @return {number}\r\n\t * @function\r\n\t */\r\n\tdiff: abstract,\r\n\r\n\t/**\r\n\t * Returns start of `unit` for the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @param {number} [weekday] - the ISO day of the week with 1 being Monday\r\n\t * and 7 being Sunday (only needed if param *unit* is `isoWeek`).\r\n\t * @function\r\n\t */\r\n\tstartOf: abstract,\r\n\r\n\t/**\r\n\t * Returns end of `unit` for the given `timestamp`.\r\n\t * @param {number} timestamp - the input timestamp\r\n\t * @param {Unit} unit - the unit as string\r\n\t * @function\r\n\t */\r\n\tendOf: abstract,\r\n\r\n\t// DEPRECATIONS\r\n\r\n\t/**\r\n\t * Provided for backward compatibility for scale.getValueForPixel(),\r\n\t * this method should be overridden only by the moment adapter.\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t * @private\r\n\t */\r\n\t_create: function(value) {\r\n\t\treturn value;\r\n\t}\r\n});\r\n\r\nDateAdapter.override = function(members) {\r\n\thelpers$1.extend(DateAdapter.prototype, members);\r\n};\r\n\r\nvar _date = DateAdapter;\n\nvar core_adapters = {\n\t_date: _date\n};\n\n/**\r\n * Namespace to hold static tick generation functions\r\n * @namespace Chart.Ticks\r\n */\r\nvar core_ticks = {\r\n\t/**\r\n\t * Namespace to hold formatters for different types of ticks\r\n\t * @namespace Chart.Ticks.formatters\r\n\t */\r\n\tformatters: {\r\n\t\t/**\r\n\t\t * Formatter for value labels\r\n\t\t * @method Chart.Ticks.formatters.values\r\n\t\t * @param value the value to display\r\n\t\t * @return {string|string[]} the label to display\r\n\t\t */\r\n\t\tvalues: function(value) {\r\n\t\t\treturn helpers$1.isArray(value) ? value : '' + value;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Formatter for linear numeric ticks\r\n\t\t * @method Chart.Ticks.formatters.linear\r\n\t\t * @param tickValue {number} the value to be formatted\r\n\t\t * @param index {number} the position of the tickValue parameter in the ticks array\r\n\t\t * @param ticks {number[]} the list of ticks being converted\r\n\t\t * @return {string} string representation of the tickValue parameter\r\n\t\t */\r\n\t\tlinear: function(tickValue, index, ticks) {\r\n\t\t\t// If we have lots of ticks, don't use the ones\r\n\t\t\tvar delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];\r\n\r\n\t\t\t// If we have a number like 2.5 as the delta, figure out how many decimal places we need\r\n\t\t\tif (Math.abs(delta) > 1) {\r\n\t\t\t\tif (tickValue !== Math.floor(tickValue)) {\r\n\t\t\t\t\t// not an integer\r\n\t\t\t\t\tdelta = tickValue - Math.floor(tickValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar logDelta = helpers$1.log10(Math.abs(delta));\r\n\t\t\tvar tickString = '';\r\n\r\n\t\t\tif (tickValue !== 0) {\r\n\t\t\t\tvar maxTick = Math.max(Math.abs(ticks[0]), Math.abs(ticks[ticks.length - 1]));\r\n\t\t\t\tif (maxTick < 1e-4) { // all ticks are small numbers; use scientific notation\r\n\t\t\t\t\tvar logTick = helpers$1.log10(Math.abs(tickValue));\r\n\t\t\t\t\tvar numExponential = Math.floor(logTick) - Math.floor(logDelta);\r\n\t\t\t\t\tnumExponential = Math.max(Math.min(numExponential, 20), 0);\r\n\t\t\t\t\ttickString = tickValue.toExponential(numExponential);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar numDecimal = -1 * Math.floor(logDelta);\r\n\t\t\t\t\tnumDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places\r\n\t\t\t\t\ttickString = tickValue.toFixed(numDecimal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttickString = '0'; // never show decimal places for 0\r\n\t\t\t}\r\n\r\n\t\t\treturn tickString;\r\n\t\t},\r\n\r\n\t\tlogarithmic: function(tickValue, index, ticks) {\r\n\t\t\tvar remain = tickValue / (Math.pow(10, Math.floor(helpers$1.log10(tickValue))));\r\n\r\n\t\t\tif (tickValue === 0) {\r\n\t\t\t\treturn '0';\r\n\t\t\t} else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {\r\n\t\t\t\treturn tickValue.toExponential();\r\n\t\t\t}\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}\r\n};\n\nvar isArray = helpers$1.isArray;\r\nvar isNullOrUndef = helpers$1.isNullOrUndef;\r\nvar valueOrDefault$a = helpers$1.valueOrDefault;\r\nvar valueAtIndexOrDefault = helpers$1.valueAtIndexOrDefault;\r\n\r\ncore_defaults._set('scale', {\r\n\tdisplay: true,\r\n\tposition: 'left',\r\n\toffset: false,\r\n\r\n\t// grid line settings\r\n\tgridLines: {\r\n\t\tdisplay: true,\r\n\t\tcolor: 'rgba(0,0,0,0.1)',\r\n\t\tlineWidth: 1,\r\n\t\tdrawBorder: true,\r\n\t\tdrawOnChartArea: true,\r\n\t\tdrawTicks: true,\r\n\t\ttickMarkLength: 10,\r\n\t\tzeroLineWidth: 1,\r\n\t\tzeroLineColor: 'rgba(0,0,0,0.25)',\r\n\t\tzeroLineBorderDash: [],\r\n\t\tzeroLineBorderDashOffset: 0.0,\r\n\t\toffsetGridLines: false,\r\n\t\tborderDash: [],\r\n\t\tborderDashOffset: 0.0\r\n\t},\r\n\r\n\t// scale label\r\n\tscaleLabel: {\r\n\t\t// display property\r\n\t\tdisplay: false,\r\n\r\n\t\t// actual label\r\n\t\tlabelString: '',\r\n\r\n\t\t// top/bottom padding\r\n\t\tpadding: {\r\n\t\t\ttop: 4,\r\n\t\t\tbottom: 4\r\n\t\t}\r\n\t},\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\tbeginAtZero: false,\r\n\t\tminRotation: 0,\r\n\t\tmaxRotation: 50,\r\n\t\tmirror: false,\r\n\t\tpadding: 0,\r\n\t\treverse: false,\r\n\t\tdisplay: true,\r\n\t\tautoSkip: true,\r\n\t\tautoSkipPadding: 0,\r\n\t\tlabelOffset: 0,\r\n\t\t// We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\r\n\t\tcallback: core_ticks.formatters.values,\r\n\t\tminor: {},\r\n\t\tmajor: {}\r\n\t}\r\n});\r\n\r\n/** Returns a new array containing numItems from arr */\r\nfunction sample(arr, numItems) {\r\n\tvar result = [];\r\n\tvar increment = arr.length / numItems;\r\n\tvar i = 0;\r\n\tvar len = arr.length;\r\n\r\n\tfor (; i < len; i += increment) {\r\n\t\tresult.push(arr[Math.floor(i)]);\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\r\n\tvar length = scale.getTicks().length;\r\n\tvar validIndex = Math.min(index, length - 1);\r\n\tvar lineValue = scale.getPixelForTick(validIndex);\r\n\tvar start = scale._startPixel;\r\n\tvar end = scale._endPixel;\r\n\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\tvar offset;\r\n\r\n\tif (offsetGridLines) {\r\n\t\tif (length === 1) {\r\n\t\t\toffset = Math.max(lineValue - start, end - lineValue);\r\n\t\t} else if (index === 0) {\r\n\t\t\toffset = (scale.getPixelForTick(1) - lineValue) / 2;\r\n\t\t} else {\r\n\t\t\toffset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\r\n\t\t}\r\n\t\tlineValue += validIndex < index ? offset : -offset;\r\n\r\n\t\t// Return undefined if the pixel is out of the range\r\n\t\tif (lineValue < start - epsilon || lineValue > end + epsilon) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\treturn lineValue;\r\n}\r\n\r\nfunction garbageCollect(caches, length) {\r\n\thelpers$1.each(caches, function(cache) {\r\n\t\tvar gc = cache.gc;\r\n\t\tvar gcLen = gc.length / 2;\r\n\t\tvar i;\r\n\t\tif (gcLen > length) {\r\n\t\t\tfor (i = 0; i < gcLen; ++i) {\r\n\t\t\t\tdelete cache.data[gc[i]];\r\n\t\t\t}\r\n\t\t\tgc.splice(0, gcLen);\r\n\t\t}\r\n\t});\r\n}\r\n\r\n/**\r\n * Returns {width, height, offset} objects for the first, last, widest, highest tick\r\n * labels where offset indicates the anchor point offset from the top in pixels.\r\n */\r\nfunction computeLabelSizes(ctx, tickFonts, ticks, caches) {\r\n\tvar length = ticks.length;\r\n\tvar widths = [];\r\n\tvar heights = [];\r\n\tvar offsets = [];\r\n\tvar widestLabelSize = 0;\r\n\tvar highestLabelSize = 0;\r\n\tvar i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel, widest, highest;\r\n\r\n\tfor (i = 0; i < length; ++i) {\r\n\t\tlabel = ticks[i].label;\r\n\t\ttickFont = ticks[i].major ? tickFonts.major : tickFonts.minor;\r\n\t\tctx.font = fontString = tickFont.string;\r\n\t\tcache = caches[fontString] = caches[fontString] || {data: {}, gc: []};\r\n\t\tlineHeight = tickFont.lineHeight;\r\n\t\twidth = height = 0;\r\n\t\t// Undefined labels and arrays should not be measured\r\n\t\tif (!isNullOrUndef(label) && !isArray(label)) {\r\n\t\t\twidth = helpers$1.measureText(ctx, cache.data, cache.gc, width, label);\r\n\t\t\theight = lineHeight;\r\n\t\t} else if (isArray(label)) {\r\n\t\t\t// if it is an array let's measure each element\r\n\t\t\tfor (j = 0, jlen = label.length; j < jlen; ++j) {\r\n\t\t\t\tnestedLabel = label[j];\r\n\t\t\t\t// Undefined labels and arrays should not be measured\r\n\t\t\t\tif (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\r\n\t\t\t\t\twidth = helpers$1.measureText(ctx, cache.data, cache.gc, width, nestedLabel);\r\n\t\t\t\t\theight += lineHeight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twidths.push(width);\r\n\t\theights.push(height);\r\n\t\toffsets.push(lineHeight / 2);\r\n\t\twidestLabelSize = Math.max(width, widestLabelSize);\r\n\t\thighestLabelSize = Math.max(height, highestLabelSize);\r\n\t}\r\n\tgarbageCollect(caches, length);\r\n\r\n\twidest = widths.indexOf(widestLabelSize);\r\n\thighest = heights.indexOf(highestLabelSize);\r\n\r\n\tfunction valueAt(idx) {\r\n\t\treturn {\r\n\t\t\twidth: widths[idx] || 0,\r\n\t\t\theight: heights[idx] || 0,\r\n\t\t\toffset: offsets[idx] || 0\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tfirst: valueAt(0),\r\n\t\tlast: valueAt(length - 1),\r\n\t\twidest: valueAt(widest),\r\n\t\thighest: valueAt(highest)\r\n\t};\r\n}\r\n\r\nfunction getTickMarkLength(options) {\r\n\treturn options.drawTicks ? options.tickMarkLength : 0;\r\n}\r\n\r\nfunction getScaleLabelHeight(options) {\r\n\tvar font, padding;\r\n\r\n\tif (!options.display) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tfont = helpers$1.options._parseFont(options);\r\n\tpadding = helpers$1.options.toPadding(options.padding);\r\n\r\n\treturn font.lineHeight + padding.height;\r\n}\r\n\r\nfunction parseFontOptions(options, nestedOpts) {\r\n\treturn helpers$1.extend(helpers$1.options._parseFont({\r\n\t\tfontFamily: valueOrDefault$a(nestedOpts.fontFamily, options.fontFamily),\r\n\t\tfontSize: valueOrDefault$a(nestedOpts.fontSize, options.fontSize),\r\n\t\tfontStyle: valueOrDefault$a(nestedOpts.fontStyle, options.fontStyle),\r\n\t\tlineHeight: valueOrDefault$a(nestedOpts.lineHeight, options.lineHeight)\r\n\t}), {\r\n\t\tcolor: helpers$1.options.resolve([nestedOpts.fontColor, options.fontColor, core_defaults.global.defaultFontColor])\r\n\t});\r\n}\r\n\r\nfunction parseTickFontOptions(options) {\r\n\tvar minor = parseFontOptions(options, options.minor);\r\n\tvar major = options.major.enabled ? parseFontOptions(options, options.major) : minor;\r\n\r\n\treturn {minor: minor, major: major};\r\n}\r\n\r\nfunction nonSkipped(ticksToFilter) {\r\n\tvar filtered = [];\r\n\tvar item, index, len;\r\n\tfor (index = 0, len = ticksToFilter.length; index < len; ++index) {\r\n\t\titem = ticksToFilter[index];\r\n\t\tif (typeof item._index !== 'undefined') {\r\n\t\t\tfiltered.push(item);\r\n\t\t}\r\n\t}\r\n\treturn filtered;\r\n}\r\n\r\nfunction getEvenSpacing(arr) {\r\n\tvar len = arr.length;\r\n\tvar i, diff;\r\n\r\n\tif (len < 2) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfor (diff = arr[0], i = 1; i < len; ++i) {\r\n\t\tif (arr[i] - arr[i - 1] !== diff) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn diff;\r\n}\r\n\r\nfunction calculateSpacing(majorIndices, ticks, axisLength, ticksLimit) {\r\n\tvar evenMajorSpacing = getEvenSpacing(majorIndices);\r\n\tvar spacing = (ticks.length - 1) / ticksLimit;\r\n\tvar factors, factor, i, ilen;\r\n\r\n\t// If the major ticks are evenly spaced apart, place the minor ticks\r\n\t// so that they divide the major ticks into even chunks\r\n\tif (!evenMajorSpacing) {\r\n\t\treturn Math.max(spacing, 1);\r\n\t}\r\n\r\n\tfactors = helpers$1.math._factorize(evenMajorSpacing);\r\n\tfor (i = 0, ilen = factors.length - 1; i < ilen; i++) {\r\n\t\tfactor = factors[i];\r\n\t\tif (factor > spacing) {\r\n\t\t\treturn factor;\r\n\t\t}\r\n\t}\r\n\treturn Math.max(spacing, 1);\r\n}\r\n\r\nfunction getMajorIndices(ticks) {\r\n\tvar result = [];\r\n\tvar i, ilen;\r\n\tfor (i = 0, ilen = ticks.length; i < ilen; i++) {\r\n\t\tif (ticks[i].major) {\r\n\t\t\tresult.push(i);\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction skipMajors(ticks, majorIndices, spacing) {\r\n\tvar count = 0;\r\n\tvar next = majorIndices[0];\r\n\tvar i, tick;\r\n\r\n\tspacing = Math.ceil(spacing);\r\n\tfor (i = 0; i < ticks.length; i++) {\r\n\t\ttick = ticks[i];\r\n\t\tif (i === next) {\r\n\t\t\ttick._index = i;\r\n\t\t\tcount++;\r\n\t\t\tnext = majorIndices[count * spacing];\r\n\t\t} else {\r\n\t\t\tdelete tick.label;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction skip(ticks, spacing, majorStart, majorEnd) {\r\n\tvar start = valueOrDefault$a(majorStart, 0);\r\n\tvar end = Math.min(valueOrDefault$a(majorEnd, ticks.length), ticks.length);\r\n\tvar count = 0;\r\n\tvar length, i, tick, next;\r\n\r\n\tspacing = Math.ceil(spacing);\r\n\tif (majorEnd) {\r\n\t\tlength = majorEnd - majorStart;\r\n\t\tspacing = length / Math.floor(length / spacing);\r\n\t}\r\n\r\n\tnext = start;\r\n\r\n\twhile (next < 0) {\r\n\t\tcount++;\r\n\t\tnext = Math.round(start + count * spacing);\r\n\t}\r\n\r\n\tfor (i = Math.max(start, 0); i < end; i++) {\r\n\t\ttick = ticks[i];\r\n\t\tif (i === next) {\r\n\t\t\ttick._index = i;\r\n\t\t\tcount++;\r\n\t\t\tnext = Math.round(start + count * spacing);\r\n\t\t} else {\r\n\t\t\tdelete tick.label;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar Scale = core_element.extend({\r\n\r\n\tzeroLineIndex: 0,\r\n\r\n\t/**\r\n\t * Get the padding needed for the scale\r\n\t * @method getPadding\r\n\t * @private\r\n\t * @returns {Padding} the necessary padding\r\n\t */\r\n\tgetPadding: function() {\r\n\t\tvar me = this;\r\n\t\treturn {\r\n\t\t\tleft: me.paddingLeft || 0,\r\n\t\t\ttop: me.paddingTop || 0,\r\n\t\t\tright: me.paddingRight || 0,\r\n\t\t\tbottom: me.paddingBottom || 0\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the scale tick objects ({label, major})\r\n\t * @since 2.7\r\n\t */\r\n\tgetTicks: function() {\r\n\t\treturn this._ticks;\r\n\t},\r\n\r\n\t/**\r\n\t* @private\r\n\t*/\r\n\t_getLabels: function() {\r\n\t\tvar data = this.chart.data;\r\n\t\treturn this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\r\n\t},\r\n\r\n\t// These methods are ordered by lifecyle. Utilities then follow.\r\n\t// Any function defined here is inherited by all scale types.\r\n\t// Any function can be extended by the scale type\r\n\r\n\t/**\r\n\t * Provided for backward compatibility, not available anymore\r\n\t * @function Chart.Scale.mergeTicksOptions\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t */\r\n\tmergeTicksOptions: function() {\r\n\t\t// noop\r\n\t},\r\n\r\n\tbeforeUpdate: function() {\r\n\t\thelpers$1.callback(this.options.beforeUpdate, [this]);\r\n\t},\r\n\r\n\t/**\r\n\t * @param {number} maxWidth - the max width in pixels\r\n\t * @param {number} maxHeight - the max height in pixels\r\n\t * @param {object} margins - the space between the edge of the other scales and edge of the chart\r\n\t *   This space comes from two sources:\r\n\t *     - padding - space that's required to show the labels at the edges of the scale\r\n\t *     - thickness of scales or legends in another orientation\r\n\t */\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar sampleSize = tickOpts.sampleSize;\r\n\t\tvar i, ilen, labels, ticks, samplingEnabled;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = helpers$1.extend({\r\n\t\t\tleft: 0,\r\n\t\t\tright: 0,\r\n\t\t\ttop: 0,\r\n\t\t\tbottom: 0\r\n\t\t}, margins);\r\n\r\n\t\tme._ticks = null;\r\n\t\tme.ticks = null;\r\n\t\tme._labelSizes = null;\r\n\t\tme._maxLabelLines = 0;\r\n\t\tme.longestLabelWidth = 0;\r\n\t\tme.longestTextCache = me.longestTextCache || {};\r\n\t\tme._gridLineItems = null;\r\n\t\tme._labelItems = null;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\r\n\t\t// Data min/max\r\n\t\tme.beforeDataLimits();\r\n\t\tme.determineDataLimits();\r\n\t\tme.afterDataLimits();\r\n\r\n\t\t// Ticks - `this.ticks` is now DEPRECATED!\r\n\t\t// Internal ticks are now stored as objects in the PRIVATE `this._ticks` member\r\n\t\t// and must not be accessed directly from outside this class. `this.ticks` being\r\n\t\t// around for long time and not marked as private, we can't change its structure\r\n\t\t// without unexpected breaking changes. If you need to access the scale ticks,\r\n\t\t// use scale.getTicks() instead.\r\n\r\n\t\tme.beforeBuildTicks();\r\n\r\n\t\t// New implementations should return an array of objects but for BACKWARD COMPAT,\r\n\t\t// we still support no return (`this.ticks` internally set by calling this method).\r\n\t\tticks = me.buildTicks() || [];\r\n\r\n\t\t// Allow modification of ticks in callback.\r\n\t\tticks = me.afterBuildTicks(ticks) || ticks;\r\n\r\n\t\t// Ensure ticks contains ticks in new tick format\r\n\t\tif ((!ticks || !ticks.length) && me.ticks) {\r\n\t\t\tticks = [];\r\n\t\t\tfor (i = 0, ilen = me.ticks.length; i < ilen; ++i) {\r\n\t\t\t\tticks.push({\r\n\t\t\t\t\tvalue: me.ticks[i],\r\n\t\t\t\t\tmajor: false\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme._ticks = ticks;\r\n\r\n\t\t// Compute tick rotation and fit using a sampled subset of labels\r\n\t\t// We generally don't need to compute the size of every single label for determining scale size\r\n\t\tsamplingEnabled = sampleSize < ticks.length;\r\n\t\tlabels = me._convertTicksToLabels(samplingEnabled ? sample(ticks, sampleSize) : ticks);\r\n\r\n\t\t// _configure is called twice, once here, once from core.controller.updateLayout.\r\n\t\t// Here we haven't been positioned yet, but dimensions are correct.\r\n\t\t// Variables set in _configure are needed for calculateTickRotation, and\r\n\t\t// it's ok that coordinates are not correct there, only dimensions matter.\r\n\t\tme._configure();\r\n\r\n\t\t// Tick Rotation\r\n\t\tme.beforeCalculateTickRotation();\r\n\t\tme.calculateTickRotation();\r\n\t\tme.afterCalculateTickRotation();\r\n\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\r\n\t\t// Auto-skip\r\n\t\tme._ticksToDraw = tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto') ? me._autoSkip(ticks) : ticks;\r\n\r\n\t\tif (samplingEnabled) {\r\n\t\t\t// Generate labels using all non-skipped ticks\r\n\t\t\tlabels = me._convertTicksToLabels(me._ticksToDraw);\r\n\t\t}\r\n\r\n\t\tme.ticks = labels;   // BACKWARD COMPATIBILITY\r\n\r\n\t\t// IMPORTANT: after this point, we consider that `this.ticks` will NEVER change!\r\n\r\n\t\tme.afterUpdate();\r\n\r\n\t\t// TODO(v3): remove minSize as a public property and return value from all layout boxes. It is unused\r\n\t\t// make maxWidth and maxHeight private\r\n\t\treturn me.minSize;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar reversePixels = me.options.ticks.reverse;\r\n\t\tvar startPixel, endPixel;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\tstartPixel = me.left;\r\n\t\t\tendPixel = me.right;\r\n\t\t} else {\r\n\t\t\tstartPixel = me.top;\r\n\t\t\tendPixel = me.bottom;\r\n\t\t\t// by default vertical scales are from bottom to top, so pixels are reversed\r\n\t\t\treversePixels = !reversePixels;\r\n\t\t}\r\n\t\tme._startPixel = startPixel;\r\n\t\tme._endPixel = endPixel;\r\n\t\tme._reversePixels = reversePixels;\r\n\t\tme._length = endPixel - startPixel;\r\n\t},\r\n\r\n\tafterUpdate: function() {\r\n\t\thelpers$1.callback(this.options.afterUpdate, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: function() {\r\n\t\thelpers$1.callback(this.options.beforeSetDimensions, [this]);\r\n\t},\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\t},\r\n\tafterSetDimensions: function() {\r\n\t\thelpers$1.callback(this.options.afterSetDimensions, [this]);\r\n\t},\r\n\r\n\t// Data limits\r\n\tbeforeDataLimits: function() {\r\n\t\thelpers$1.callback(this.options.beforeDataLimits, [this]);\r\n\t},\r\n\tdetermineDataLimits: helpers$1.noop,\r\n\tafterDataLimits: function() {\r\n\t\thelpers$1.callback(this.options.afterDataLimits, [this]);\r\n\t},\r\n\r\n\t//\r\n\tbeforeBuildTicks: function() {\r\n\t\thelpers$1.callback(this.options.beforeBuildTicks, [this]);\r\n\t},\r\n\tbuildTicks: helpers$1.noop,\r\n\tafterBuildTicks: function(ticks) {\r\n\t\tvar me = this;\r\n\t\t// ticks is empty for old axis implementations here\r\n\t\tif (isArray(ticks) && ticks.length) {\r\n\t\t\treturn helpers$1.callback(me.options.afterBuildTicks, [me, ticks]);\r\n\t\t}\r\n\t\t// Support old implementations (that modified `this.ticks` directly in buildTicks)\r\n\t\tme.ticks = helpers$1.callback(me.options.afterBuildTicks, [me, me.ticks]) || me.ticks;\r\n\t\treturn ticks;\r\n\t},\r\n\r\n\tbeforeTickToLabelConversion: function() {\r\n\t\thelpers$1.callback(this.options.beforeTickToLabelConversion, [this]);\r\n\t},\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\t\t// Convert ticks to strings\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tme.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback, this);\r\n\t},\r\n\tafterTickToLabelConversion: function() {\r\n\t\thelpers$1.callback(this.options.afterTickToLabelConversion, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeCalculateTickRotation: function() {\r\n\t\thelpers$1.callback(this.options.beforeCalculateTickRotation, [this]);\r\n\t},\r\n\tcalculateTickRotation: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar numTicks = me.getTicks().length;\r\n\t\tvar minRotation = tickOpts.minRotation || 0;\r\n\t\tvar maxRotation = tickOpts.maxRotation;\r\n\t\tvar labelRotation = minRotation;\r\n\t\tvar labelSizes, maxLabelWidth, maxLabelHeight, maxWidth, tickWidth, maxHeight, maxLabelDiagonal;\r\n\r\n\t\tif (!me._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !me.isHorizontal()) {\r\n\t\t\tme.labelRotation = minRotation;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlabelSizes = me._getLabelSizes();\r\n\t\tmaxLabelWidth = labelSizes.widest.width;\r\n\t\tmaxLabelHeight = labelSizes.highest.height - labelSizes.highest.offset;\r\n\r\n\t\t// Estimate the width of each grid based on the canvas width, the maximum\r\n\t\t// label width and the number of tick intervals\r\n\t\tmaxWidth = Math.min(me.maxWidth, me.chart.width - maxLabelWidth);\r\n\t\ttickWidth = options.offset ? me.maxWidth / numTicks : maxWidth / (numTicks - 1);\r\n\r\n\t\t// Allow 3 pixels x2 padding either side for label readability\r\n\t\tif (maxLabelWidth + 6 > tickWidth) {\r\n\t\t\ttickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\r\n\t\t\tmaxHeight = me.maxHeight - getTickMarkLength(options.gridLines)\r\n\t\t\t\t- tickOpts.padding - getScaleLabelHeight(options.scaleLabel);\r\n\t\t\tmaxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\r\n\t\t\tlabelRotation = helpers$1.toDegrees(Math.min(\r\n\t\t\t\tMath.asin(Math.min((labelSizes.highest.height + 6) / tickWidth, 1)),\r\n\t\t\t\tMath.asin(Math.min(maxHeight / maxLabelDiagonal, 1)) - Math.asin(maxLabelHeight / maxLabelDiagonal)\r\n\t\t\t));\r\n\t\t\tlabelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\r\n\t\t}\r\n\r\n\t\tme.labelRotation = labelRotation;\r\n\t},\r\n\tafterCalculateTickRotation: function() {\r\n\t\thelpers$1.callback(this.options.afterCalculateTickRotation, [this]);\r\n\t},\r\n\r\n\t//\r\n\r\n\tbeforeFit: function() {\r\n\t\thelpers$1.callback(this.options.beforeFit, [this]);\r\n\t},\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\t// Reset\r\n\t\tvar minSize = me.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\r\n\t\tvar chart = me.chart;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\t\tvar scaleLabelOpts = opts.scaleLabel;\r\n\t\tvar gridLineOpts = opts.gridLines;\r\n\t\tvar display = me._isVisible();\r\n\t\tvar isBottom = opts.position === 'bottom';\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t// Width\r\n\t\tif (isHorizontal) {\r\n\t\t\tminSize.width = me.maxWidth;\r\n\t\t} else if (display) {\r\n\t\t\tminSize.width = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);\r\n\t\t}\r\n\r\n\t\t// height\r\n\t\tif (!isHorizontal) {\r\n\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t} else if (display) {\r\n\t\t\tminSize.height = getTickMarkLength(gridLineOpts) + getScaleLabelHeight(scaleLabelOpts);\r\n\t\t}\r\n\r\n\t\t// Don't bother fitting the ticks if we are not showing the labels\r\n\t\tif (tickOpts.display && display) {\r\n\t\t\tvar tickFonts = parseTickFontOptions(tickOpts);\r\n\t\t\tvar labelSizes = me._getLabelSizes();\r\n\t\t\tvar firstLabelSize = labelSizes.first;\r\n\t\t\tvar lastLabelSize = labelSizes.last;\r\n\t\t\tvar widestLabelSize = labelSizes.widest;\r\n\t\t\tvar highestLabelSize = labelSizes.highest;\r\n\t\t\tvar lineSpace = tickFonts.minor.lineHeight * 0.4;\r\n\t\t\tvar tickPadding = tickOpts.padding;\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\t// A horizontal axis is more constrained by the height.\r\n\t\t\t\tvar isRotated = me.labelRotation !== 0;\r\n\t\t\t\tvar angleRadians = helpers$1.toRadians(me.labelRotation);\r\n\t\t\t\tvar cosRotation = Math.cos(angleRadians);\r\n\t\t\t\tvar sinRotation = Math.sin(angleRadians);\r\n\r\n\t\t\t\tvar labelHeight = sinRotation * widestLabelSize.width\r\n\t\t\t\t\t+ cosRotation * (highestLabelSize.height - (isRotated ? highestLabelSize.offset : 0))\r\n\t\t\t\t\t+ (isRotated ? 0 : lineSpace); // padding\r\n\r\n\t\t\t\tminSize.height = Math.min(me.maxHeight, minSize.height + labelHeight + tickPadding);\r\n\r\n\t\t\t\tvar offsetLeft = me.getPixelForTick(0) - me.left;\r\n\t\t\t\tvar offsetRight = me.right - me.getPixelForTick(me.getTicks().length - 1);\r\n\t\t\t\tvar paddingLeft, paddingRight;\r\n\r\n\t\t\t\t// Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned\r\n\t\t\t\t// which means that the right padding is dominated by the font height\r\n\t\t\t\tif (isRotated) {\r\n\t\t\t\t\tpaddingLeft = isBottom ?\r\n\t\t\t\t\t\tcosRotation * firstLabelSize.width + sinRotation * firstLabelSize.offset :\r\n\t\t\t\t\t\tsinRotation * (firstLabelSize.height - firstLabelSize.offset);\r\n\t\t\t\t\tpaddingRight = isBottom ?\r\n\t\t\t\t\t\tsinRotation * (lastLabelSize.height - lastLabelSize.offset) :\r\n\t\t\t\t\t\tcosRotation * lastLabelSize.width + sinRotation * lastLabelSize.offset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpaddingLeft = firstLabelSize.width / 2;\r\n\t\t\t\t\tpaddingRight = lastLabelSize.width / 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Adjust padding taking into account changes in offsets\r\n\t\t\t\t// and add 3 px to move away from canvas edges\r\n\t\t\t\tme.paddingLeft = Math.max((paddingLeft - offsetLeft) * me.width / (me.width - offsetLeft), 0) + 3;\r\n\t\t\t\tme.paddingRight = Math.max((paddingRight - offsetRight) * me.width / (me.width - offsetRight), 0) + 3;\r\n\t\t\t} else {\r\n\t\t\t\t// A vertical axis is more constrained by the width. Labels are the\r\n\t\t\t\t// dominant factor here, so get that length first and account for padding\r\n\t\t\t\tvar labelWidth = tickOpts.mirror ? 0 :\r\n\t\t\t\t\t// use lineSpace for consistency with horizontal axis\r\n\t\t\t\t\t// tickPadding is not implemented for horizontal\r\n\t\t\t\t\twidestLabelSize.width + tickPadding + lineSpace;\r\n\r\n\t\t\t\tminSize.width = Math.min(me.maxWidth, minSize.width + labelWidth);\r\n\r\n\t\t\t\tme.paddingTop = firstLabelSize.height / 2;\r\n\t\t\t\tme.paddingBottom = lastLabelSize.height / 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.handleMargins();\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\tme.width = me._length = chart.width - me.margins.left - me.margins.right;\r\n\t\t\tme.height = minSize.height;\r\n\t\t} else {\r\n\t\t\tme.width = minSize.width;\r\n\t\t\tme.height = me._length = chart.height - me.margins.top - me.margins.bottom;\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Handle margins and padding interactions\r\n\t * @private\r\n\t */\r\n\thandleMargins: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.margins) {\r\n\t\t\tme.margins.left = Math.max(me.paddingLeft, me.margins.left);\r\n\t\t\tme.margins.top = Math.max(me.paddingTop, me.margins.top);\r\n\t\t\tme.margins.right = Math.max(me.paddingRight, me.margins.right);\r\n\t\t\tme.margins.bottom = Math.max(me.paddingBottom, me.margins.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tafterFit: function() {\r\n\t\thelpers$1.callback(this.options.afterFit, [this]);\r\n\t},\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\tvar pos = this.options.position;\r\n\t\treturn pos === 'top' || pos === 'bottom';\r\n\t},\r\n\tisFullWidth: function() {\r\n\t\treturn this.options.fullWidth;\r\n\t},\r\n\r\n\t// Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not\r\n\tgetRightValue: function(rawValue) {\r\n\t\t// Null and undefined values first\r\n\t\tif (isNullOrUndef(rawValue)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\t\t// isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values\r\n\t\tif ((typeof rawValue === 'number' || rawValue instanceof Number) && !isFinite(rawValue)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\r\n\t\t// If it is in fact an object, dive in one more level\r\n\t\tif (rawValue) {\r\n\t\t\tif (this.isHorizontal()) {\r\n\t\t\t\tif (rawValue.x !== undefined) {\r\n\t\t\t\t\treturn this.getRightValue(rawValue.x);\r\n\t\t\t\t}\r\n\t\t\t} else if (rawValue.y !== undefined) {\r\n\t\t\t\treturn this.getRightValue(rawValue.y);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Value is good, return it\r\n\t\treturn rawValue;\r\n\t},\r\n\r\n\t_convertTicksToLabels: function(ticks) {\r\n\t\tvar me = this;\r\n\t\tvar labels, i, ilen;\r\n\r\n\t\tme.ticks = ticks.map(function(tick) {\r\n\t\t\treturn tick.value;\r\n\t\t});\r\n\r\n\t\tme.beforeTickToLabelConversion();\r\n\r\n\t\t// New implementations should return the formatted tick labels but for BACKWARD\r\n\t\t// COMPAT, we still support no return (`this.ticks` internally changed by calling\r\n\t\t// this method and supposed to contain only string values).\r\n\t\tlabels = me.convertTicksToLabels(ticks) || me.ticks;\r\n\r\n\t\tme.afterTickToLabelConversion();\r\n\r\n\t\t// BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`)\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\tticks[i].label = labels[i];\r\n\t\t}\r\n\r\n\t\treturn labels;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLabelSizes: function() {\r\n\t\tvar me = this;\r\n\t\tvar labelSizes = me._labelSizes;\r\n\r\n\t\tif (!labelSizes) {\r\n\t\t\tme._labelSizes = labelSizes = computeLabelSizes(me.ctx, parseTickFontOptions(me.options.ticks), me.getTicks(), me.longestTextCache);\r\n\t\t\tme.longestLabelWidth = labelSizes.widest.width;\r\n\t\t}\r\n\r\n\t\treturn labelSizes;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_parseValue: function(value) {\r\n\t\tvar start, end, min, max;\r\n\r\n\t\tif (isArray(value)) {\r\n\t\t\tstart = +this.getRightValue(value[0]);\r\n\t\t\tend = +this.getRightValue(value[1]);\r\n\t\t\tmin = Math.min(start, end);\r\n\t\t\tmax = Math.max(start, end);\r\n\t\t} else {\r\n\t\t\tvalue = +this.getRightValue(value);\r\n\t\t\tstart = undefined;\r\n\t\t\tend = value;\r\n\t\t\tmin = value;\r\n\t\t\tmax = value;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tmin: min,\r\n\t\t\tmax: max,\r\n\t\t\tstart: start,\r\n\t\t\tend: end\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t* @private\r\n\t*/\r\n\t_getScaleLabel: function(rawValue) {\r\n\t\tvar v = this._parseValue(rawValue);\r\n\t\tif (v.start !== undefined) {\r\n\t\t\treturn '[' + v.start + ', ' + v.end + ']';\r\n\t\t}\r\n\r\n\t\treturn +this.getRightValue(rawValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Used to get the value to display in the tooltip for the data at the given index\r\n\t * @param index\r\n\t * @param datasetIndex\r\n\t */\r\n\tgetLabelForIndex: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Returns the location of the given data point. Value can either be an index or a numerical value\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t * @param value\r\n\t * @param index\r\n\t * @param datasetIndex\r\n\t */\r\n\tgetPixelForValue: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Used to get the data value from a given pixel. This is the inverse of getPixelForValue\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t * @param pixel\r\n\t */\r\n\tgetValueForPixel: helpers$1.noop,\r\n\r\n\t/**\r\n\t * Returns the location of the tick at the given index\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar offset = me.options.offset;\r\n\t\tvar numTicks = me._ticks.length;\r\n\t\tvar tickWidth = 1 / Math.max(numTicks - (offset ? 0 : 1), 1);\r\n\r\n\t\treturn index < 0 || index > numTicks - 1\r\n\t\t\t? null\r\n\t\t\t: me.getPixelForDecimal(index * tickWidth + (offset ? tickWidth / 2 : 0));\r\n\t},\r\n\r\n\t/**\r\n\t * Utility for getting the pixel location of a percentage of scale\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetPixelForDecimal: function(decimal) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (me._reversePixels) {\r\n\t\t\tdecimal = 1 - decimal;\r\n\t\t}\r\n\r\n\t\treturn me._startPixel + decimal * me._length;\r\n\t},\r\n\r\n\tgetDecimalForPixel: function(pixel) {\r\n\t\tvar decimal = (pixel - this._startPixel) / this._length;\r\n\t\treturn this._reversePixels ? 1 - decimal : decimal;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the pixel for the minimum chart value\r\n\t * The coordinate (0, 0) is at the upper-left corner of the canvas\r\n\t */\r\n\tgetBasePixel: function() {\r\n\t\treturn this.getPixelForValue(this.getBaseValue());\r\n\t},\r\n\r\n\tgetBaseValue: function() {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\r\n\t\treturn me.beginAtZero ? 0 :\r\n\t\t\tmin < 0 && max < 0 ? max :\r\n\t\t\tmin > 0 && max > 0 ? min :\r\n\t\t\t0;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a subset of ticks to be plotted to avoid overlapping labels.\r\n\t * @private\r\n\t */\r\n\t_autoSkip: function(ticks) {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar axisLength = me._length;\r\n\t\tvar ticksLimit = tickOpts.maxTicksLimit || axisLength / me._tickSize() + 1;\r\n\t\tvar majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\r\n\t\tvar numMajorIndices = majorIndices.length;\r\n\t\tvar first = majorIndices[0];\r\n\t\tvar last = majorIndices[numMajorIndices - 1];\r\n\t\tvar i, ilen, spacing, avgMajorSpacing;\r\n\r\n\t\t// If there are too many major ticks to display them all\r\n\t\tif (numMajorIndices > ticksLimit) {\r\n\t\t\tskipMajors(ticks, majorIndices, numMajorIndices / ticksLimit);\r\n\t\t\treturn nonSkipped(ticks);\r\n\t\t}\r\n\r\n\t\tspacing = calculateSpacing(majorIndices, ticks, axisLength, ticksLimit);\r\n\r\n\t\tif (numMajorIndices > 0) {\r\n\t\t\tfor (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {\r\n\t\t\t\tskip(ticks, spacing, majorIndices[i], majorIndices[i + 1]);\r\n\t\t\t}\r\n\t\t\tavgMajorSpacing = numMajorIndices > 1 ? (last - first) / (numMajorIndices - 1) : null;\r\n\t\t\tskip(ticks, spacing, helpers$1.isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\r\n\t\t\tskip(ticks, spacing, last, helpers$1.isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\r\n\t\t\treturn nonSkipped(ticks);\r\n\t\t}\r\n\t\tskip(ticks, spacing);\r\n\t\treturn nonSkipped(ticks);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_tickSize: function() {\r\n\t\tvar me = this;\r\n\t\tvar optionTicks = me.options.ticks;\r\n\r\n\t\t// Calculate space needed by label in axis direction.\r\n\t\tvar rot = helpers$1.toRadians(me.labelRotation);\r\n\t\tvar cos = Math.abs(Math.cos(rot));\r\n\t\tvar sin = Math.abs(Math.sin(rot));\r\n\r\n\t\tvar labelSizes = me._getLabelSizes();\r\n\t\tvar padding = optionTicks.autoSkipPadding || 0;\r\n\t\tvar w = labelSizes ? labelSizes.widest.width + padding : 0;\r\n\t\tvar h = labelSizes ? labelSizes.highest.height + padding : 0;\r\n\r\n\t\t// Calculate space needed for 1 tick in axis direction.\r\n\t\treturn me.isHorizontal()\r\n\t\t\t? h * cos > w * sin ? w / cos : h / sin\r\n\t\t\t: h * sin < w * cos ? h / cos : w / sin;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_isVisible: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar display = me.options.display;\r\n\t\tvar i, ilen, meta;\r\n\r\n\t\tif (display !== 'auto') {\r\n\t\t\treturn !!display;\r\n\t\t}\r\n\r\n\t\t// When 'auto', the scale is visible if at least one associated dataset is visible.\r\n\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tif (meta.xAxisID === me.id || meta.yAxisID === me.id) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeGridLineItems: function(chartArea) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar options = me.options;\r\n\t\tvar gridLines = options.gridLines;\r\n\t\tvar position = options.position;\r\n\t\tvar offsetGridLines = gridLines.offsetGridLines;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar ticks = me._ticksToDraw;\r\n\t\tvar ticksLength = ticks.length + (offsetGridLines ? 1 : 0);\r\n\r\n\t\tvar tl = getTickMarkLength(gridLines);\r\n\t\tvar items = [];\r\n\t\tvar axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;\r\n\t\tvar axisHalfWidth = axisWidth / 2;\r\n\t\tvar alignPixel = helpers$1._alignPixel;\r\n\t\tvar alignBorderValue = function(pixel) {\r\n\t\t\treturn alignPixel(chart, pixel, axisWidth);\r\n\t\t};\r\n\t\tvar borderValue, i, tick, lineValue, alignedLineValue;\r\n\t\tvar tx1, ty1, tx2, ty2, x1, y1, x2, y2, lineWidth, lineColor, borderDash, borderDashOffset;\r\n\r\n\t\tif (position === 'top') {\r\n\t\t\tborderValue = alignBorderValue(me.bottom);\r\n\t\t\tty1 = me.bottom - tl;\r\n\t\t\tty2 = borderValue - axisHalfWidth;\r\n\t\t\ty1 = alignBorderValue(chartArea.top) + axisHalfWidth;\r\n\t\t\ty2 = chartArea.bottom;\r\n\t\t} else if (position === 'bottom') {\r\n\t\t\tborderValue = alignBorderValue(me.top);\r\n\t\t\ty1 = chartArea.top;\r\n\t\t\ty2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\r\n\t\t\tty1 = borderValue + axisHalfWidth;\r\n\t\t\tty2 = me.top + tl;\r\n\t\t} else if (position === 'left') {\r\n\t\t\tborderValue = alignBorderValue(me.right);\r\n\t\t\ttx1 = me.right - tl;\r\n\t\t\ttx2 = borderValue - axisHalfWidth;\r\n\t\t\tx1 = alignBorderValue(chartArea.left) + axisHalfWidth;\r\n\t\t\tx2 = chartArea.right;\r\n\t\t} else {\r\n\t\t\tborderValue = alignBorderValue(me.left);\r\n\t\t\tx1 = chartArea.left;\r\n\t\t\tx2 = alignBorderValue(chartArea.right) - axisHalfWidth;\r\n\t\t\ttx1 = borderValue + axisHalfWidth;\r\n\t\t\ttx2 = me.left + tl;\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < ticksLength; ++i) {\r\n\t\t\ttick = ticks[i] || {};\r\n\r\n\t\t\t// autoskipper skipped this tick (#4635)\r\n\t\t\tif (isNullOrUndef(tick.label) && i < ticks.length) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (i === me.zeroLineIndex && options.offset === offsetGridLines) {\r\n\t\t\t\t// Draw the first index specially\r\n\t\t\t\tlineWidth = gridLines.zeroLineWidth;\r\n\t\t\t\tlineColor = gridLines.zeroLineColor;\r\n\t\t\t\tborderDash = gridLines.zeroLineBorderDash || [];\r\n\t\t\t\tborderDashOffset = gridLines.zeroLineBorderDashOffset || 0.0;\r\n\t\t\t} else {\r\n\t\t\t\tlineWidth = valueAtIndexOrDefault(gridLines.lineWidth, i, 1);\r\n\t\t\t\tlineColor = valueAtIndexOrDefault(gridLines.color, i, 'rgba(0,0,0,0.1)');\r\n\t\t\t\tborderDash = gridLines.borderDash || [];\r\n\t\t\t\tborderDashOffset = gridLines.borderDashOffset || 0.0;\r\n\t\t\t}\r\n\r\n\t\t\tlineValue = getPixelForGridLine(me, tick._index || i, offsetGridLines);\r\n\r\n\t\t\t// Skip if the pixel is out of the range\r\n\t\t\tif (lineValue === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\talignedLineValue = alignPixel(chart, lineValue, lineWidth);\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\ttx1 = tx2 = x1 = x2 = alignedLineValue;\r\n\t\t\t} else {\r\n\t\t\t\tty1 = ty2 = y1 = y2 = alignedLineValue;\r\n\t\t\t}\r\n\r\n\t\t\titems.push({\r\n\t\t\t\ttx1: tx1,\r\n\t\t\t\tty1: ty1,\r\n\t\t\t\ttx2: tx2,\r\n\t\t\t\tty2: ty2,\r\n\t\t\t\tx1: x1,\r\n\t\t\t\ty1: y1,\r\n\t\t\t\tx2: x2,\r\n\t\t\t\ty2: y2,\r\n\t\t\t\twidth: lineWidth,\r\n\t\t\t\tcolor: lineColor,\r\n\t\t\t\tborderDash: borderDash,\r\n\t\t\t\tborderDashOffset: borderDashOffset,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\titems.ticksLength = ticksLength;\r\n\t\titems.borderValue = borderValue;\r\n\r\n\t\treturn items;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeLabelItems: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar optionTicks = options.ticks;\r\n\t\tvar position = options.position;\r\n\t\tvar isMirrored = optionTicks.mirror;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar ticks = me._ticksToDraw;\r\n\t\tvar fonts = parseTickFontOptions(optionTicks);\r\n\t\tvar tickPadding = optionTicks.padding;\r\n\t\tvar tl = getTickMarkLength(options.gridLines);\r\n\t\tvar rotation = -helpers$1.toRadians(me.labelRotation);\r\n\t\tvar items = [];\r\n\t\tvar i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\r\n\r\n\t\tif (position === 'top') {\r\n\t\t\ty = me.bottom - tl - tickPadding;\r\n\t\t\ttextAlign = !rotation ? 'center' : 'left';\r\n\t\t} else if (position === 'bottom') {\r\n\t\t\ty = me.top + tl + tickPadding;\r\n\t\t\ttextAlign = !rotation ? 'center' : 'right';\r\n\t\t} else if (position === 'left') {\r\n\t\t\tx = me.right - (isMirrored ? 0 : tl) - tickPadding;\r\n\t\t\ttextAlign = isMirrored ? 'left' : 'right';\r\n\t\t} else {\r\n\t\t\tx = me.left + (isMirrored ? 0 : tl) + tickPadding;\r\n\t\t\ttextAlign = isMirrored ? 'right' : 'left';\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\ttick = ticks[i];\r\n\t\t\tlabel = tick.label;\r\n\r\n\t\t\t// autoskipper skipped this tick (#4635)\r\n\t\t\tif (isNullOrUndef(label)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpixel = me.getPixelForTick(tick._index || i) + optionTicks.labelOffset;\r\n\t\t\tfont = tick.major ? fonts.major : fonts.minor;\r\n\t\t\tlineHeight = font.lineHeight;\r\n\t\t\tlineCount = isArray(label) ? label.length : 1;\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tx = pixel;\r\n\t\t\t\ttextOffset = position === 'top'\r\n\t\t\t\t\t? ((!rotation ? 0.5 : 1) - lineCount) * lineHeight\r\n\t\t\t\t\t: (!rotation ? 0.5 : 0) * lineHeight;\r\n\t\t\t} else {\r\n\t\t\t\ty = pixel;\r\n\t\t\t\ttextOffset = (1 - lineCount) * lineHeight / 2;\r\n\t\t\t}\r\n\r\n\t\t\titems.push({\r\n\t\t\t\tx: x,\r\n\t\t\t\ty: y,\r\n\t\t\t\trotation: rotation,\r\n\t\t\t\tlabel: label,\r\n\t\t\t\tfont: font,\r\n\t\t\t\ttextOffset: textOffset,\r\n\t\t\t\ttextAlign: textAlign\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn items;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawGrid: function(chartArea) {\r\n\t\tvar me = this;\r\n\t\tvar gridLines = me.options.gridLines;\r\n\r\n\t\tif (!gridLines.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar chart = me.chart;\r\n\t\tvar alignPixel = helpers$1._alignPixel;\r\n\t\tvar axisWidth = gridLines.drawBorder ? valueAtIndexOrDefault(gridLines.lineWidth, 0, 0) : 0;\r\n\t\tvar items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));\r\n\t\tvar width, color, i, ilen, item;\r\n\r\n\t\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\t\titem = items[i];\r\n\t\t\twidth = item.width;\r\n\t\t\tcolor = item.color;\r\n\r\n\t\t\tif (width && color) {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.lineWidth = width;\r\n\t\t\t\tctx.strokeStyle = color;\r\n\t\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\t\tctx.setLineDash(item.borderDash);\r\n\t\t\t\t\tctx.lineDashOffset = item.borderDashOffset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.beginPath();\r\n\r\n\t\t\t\tif (gridLines.drawTicks) {\r\n\t\t\t\t\tctx.moveTo(item.tx1, item.ty1);\r\n\t\t\t\t\tctx.lineTo(item.tx2, item.ty2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (gridLines.drawOnChartArea) {\r\n\t\t\t\t\tctx.moveTo(item.x1, item.y1);\r\n\t\t\t\t\tctx.lineTo(item.x2, item.y2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.stroke();\r\n\t\t\t\tctx.restore();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (axisWidth) {\r\n\t\t\t// Draw the line at the edge of the axis\r\n\t\t\tvar firstLineWidth = axisWidth;\r\n\t\t\tvar lastLineWidth = valueAtIndexOrDefault(gridLines.lineWidth, items.ticksLength - 1, 1);\r\n\t\t\tvar borderValue = items.borderValue;\r\n\t\t\tvar x1, x2, y1, y2;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tx1 = alignPixel(chart, me.left, firstLineWidth) - firstLineWidth / 2;\r\n\t\t\t\tx2 = alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;\r\n\t\t\t\ty1 = y2 = borderValue;\r\n\t\t\t} else {\r\n\t\t\t\ty1 = alignPixel(chart, me.top, firstLineWidth) - firstLineWidth / 2;\r\n\t\t\t\ty2 = alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;\r\n\t\t\t\tx1 = x2 = borderValue;\r\n\t\t\t}\r\n\r\n\t\t\tctx.lineWidth = axisWidth;\r\n\t\t\tctx.strokeStyle = valueAtIndexOrDefault(gridLines.color, 0);\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x1, y1);\r\n\t\t\tctx.lineTo(x2, y2);\r\n\t\t\tctx.stroke();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar optionTicks = me.options.ticks;\r\n\r\n\t\tif (!optionTicks.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar items = me._labelItems || (me._labelItems = me._computeLabelItems());\r\n\t\tvar i, j, ilen, jlen, item, tickFont, label, y;\r\n\r\n\t\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\t\titem = items[i];\r\n\t\t\ttickFont = item.font;\r\n\r\n\t\t\t// Make sure we draw text in the correct color and font\r\n\t\t\tctx.save();\r\n\t\t\tctx.translate(item.x, item.y);\r\n\t\t\tctx.rotate(item.rotation);\r\n\t\t\tctx.font = tickFont.string;\r\n\t\t\tctx.fillStyle = tickFont.color;\r\n\t\t\tctx.textBaseline = 'middle';\r\n\t\t\tctx.textAlign = item.textAlign;\r\n\r\n\t\t\tlabel = item.label;\r\n\t\t\ty = item.textOffset;\r\n\t\t\tif (isArray(label)) {\r\n\t\t\t\tfor (j = 0, jlen = label.length; j < jlen; ++j) {\r\n\t\t\t\t\t// We just make sure the multiline element is a string here..\r\n\t\t\t\t\tctx.fillText('' + label[j], 0, y);\r\n\t\t\t\t\ty += tickFont.lineHeight;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tctx.fillText(label, 0, y);\r\n\t\t\t}\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawTitle: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar options = me.options;\r\n\t\tvar scaleLabel = options.scaleLabel;\r\n\r\n\t\tif (!scaleLabel.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar scaleLabelFontColor = valueOrDefault$a(scaleLabel.fontColor, core_defaults.global.defaultFontColor);\r\n\t\tvar scaleLabelFont = helpers$1.options._parseFont(scaleLabel);\r\n\t\tvar scaleLabelPadding = helpers$1.options.toPadding(scaleLabel.padding);\r\n\t\tvar halfLineHeight = scaleLabelFont.lineHeight / 2;\r\n\t\tvar position = options.position;\r\n\t\tvar rotation = 0;\r\n\t\tvar scaleLabelX, scaleLabelY;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\tscaleLabelX = me.left + me.width / 2; // midpoint of the width\r\n\t\t\tscaleLabelY = position === 'bottom'\r\n\t\t\t\t? me.bottom - halfLineHeight - scaleLabelPadding.bottom\r\n\t\t\t\t: me.top + halfLineHeight + scaleLabelPadding.top;\r\n\t\t} else {\r\n\t\t\tvar isLeft = position === 'left';\r\n\t\t\tscaleLabelX = isLeft\r\n\t\t\t\t? me.left + halfLineHeight + scaleLabelPadding.top\r\n\t\t\t\t: me.right - halfLineHeight - scaleLabelPadding.top;\r\n\t\t\tscaleLabelY = me.top + me.height / 2;\r\n\t\t\trotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(scaleLabelX, scaleLabelY);\r\n\t\tctx.rotate(rotation);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.fillStyle = scaleLabelFontColor; // render in correct colour\r\n\t\tctx.font = scaleLabelFont.string;\r\n\t\tctx.fillText(scaleLabel.labelString, 0, 0);\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (!me._isVisible()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme._drawGrid(chartArea);\r\n\t\tme._drawTitle();\r\n\t\tme._drawLabels();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_layers: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tz = opts.ticks && opts.ticks.z || 0;\r\n\t\tvar gz = opts.gridLines && opts.gridLines.z || 0;\r\n\r\n\t\tif (!me._isVisible() || tz === gz || me.draw !== me._draw) {\r\n\t\t\t// backward compatibility: draw has been overridden by custom scale\r\n\t\t\treturn [{\r\n\t\t\t\tz: tz,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\tme.draw.apply(me, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t}\r\n\r\n\t\treturn [{\r\n\t\t\tz: gz,\r\n\t\t\tdraw: function() {\r\n\t\t\t\tme._drawGrid.apply(me, arguments);\r\n\t\t\t\tme._drawTitle.apply(me, arguments);\r\n\t\t\t}\r\n\t\t}, {\r\n\t\t\tz: tz,\r\n\t\t\tdraw: function() {\r\n\t\t\t\tme._drawLabels.apply(me, arguments);\r\n\t\t\t}\r\n\t\t}];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getMatchingVisibleMetas: function(type) {\r\n\t\tvar me = this;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\treturn me.chart._getSortedVisibleDatasetMetas()\r\n\t\t\t.filter(function(meta) {\r\n\t\t\t\treturn (!type || meta.type === type)\r\n\t\t\t\t\t&& (isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id);\r\n\t\t\t});\r\n\t}\r\n});\r\n\r\nScale.prototype._draw = Scale.prototype.draw;\r\n\r\nvar core_scale = Scale;\n\nvar isNullOrUndef$1 = helpers$1.isNullOrUndef;\r\n\r\nvar defaultConfig = {\r\n\tposition: 'bottom'\r\n};\r\n\r\nvar scale_category = core_scale.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar labels = me._getLabels();\r\n\t\tvar ticksOpts = me.options.ticks;\r\n\t\tvar min = ticksOpts.min;\r\n\t\tvar max = ticksOpts.max;\r\n\t\tvar minIndex = 0;\r\n\t\tvar maxIndex = labels.length - 1;\r\n\t\tvar findIndex;\r\n\r\n\t\tif (min !== undefined) {\r\n\t\t\t// user specified min value\r\n\t\t\tfindIndex = labels.indexOf(min);\r\n\t\t\tif (findIndex >= 0) {\r\n\t\t\t\tminIndex = findIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (max !== undefined) {\r\n\t\t\t// user specified max value\r\n\t\t\tfindIndex = labels.indexOf(max);\r\n\t\t\tif (findIndex >= 0) {\r\n\t\t\t\tmaxIndex = findIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.minIndex = minIndex;\r\n\t\tme.maxIndex = maxIndex;\r\n\t\tme.min = labels[minIndex];\r\n\t\tme.max = labels[maxIndex];\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar labels = me._getLabels();\r\n\t\tvar minIndex = me.minIndex;\r\n\t\tvar maxIndex = me.maxIndex;\r\n\r\n\t\t// If we are viewing some subset of labels, slice the original array\r\n\t\tme.ticks = (minIndex === 0 && maxIndex === labels.length - 1) ? labels : labels.slice(minIndex, maxIndex + 1);\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\r\n\t\tif (chart.getDatasetMeta(datasetIndex).controller._getValueScaleId() === me.id) {\r\n\t\t\treturn me.getRightValue(chart.data.datasets[datasetIndex].data[index]);\r\n\t\t}\r\n\r\n\t\treturn me._getLabels()[index];\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar offset = me.options.offset;\r\n\t\tvar ticks = me.ticks;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (!me.isHorizontal()) {\r\n\t\t\t// For backward compatibility, vertical category scale reverse is inverted.\r\n\t\t\tme._reversePixels = !me._reversePixels;\r\n\t\t}\r\n\r\n\t\tif (!ticks) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tme._startValue = me.minIndex - (offset ? 0.5 : 0);\r\n\t\tme._valueRange = Math.max(ticks.length - (offset ? 0 : 1), 1);\r\n\t},\r\n\r\n\t// Used to get data value locations.  Value can either be an index or a numerical value\r\n\tgetPixelForValue: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar valueCategory, labels, idx;\r\n\r\n\t\tif (!isNullOrUndef$1(index) && !isNullOrUndef$1(datasetIndex)) {\r\n\t\t\tvalue = me.chart.data.datasets[datasetIndex].data[index];\r\n\t\t}\r\n\r\n\t\t// If value is a data object, then index is the index in the data array,\r\n\t\t// not the index of the scale. We need to change that.\r\n\t\tif (!isNullOrUndef$1(value)) {\r\n\t\t\tvalueCategory = me.isHorizontal() ? value.x : value.y;\r\n\t\t}\r\n\t\tif (valueCategory !== undefined || (value !== undefined && isNaN(index))) {\r\n\t\t\tlabels = me._getLabels();\r\n\t\t\tvalue = helpers$1.valueOrDefault(valueCategory, value);\r\n\t\t\tidx = labels.indexOf(value);\r\n\t\t\tindex = idx !== -1 ? idx : index;\r\n\t\t\tif (isNaN(index)) {\r\n\t\t\t\tindex = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn me.getPixelForDecimal((index - me._startValue) / me._valueRange);\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.ticks;\r\n\t\treturn index < 0 || index > ticks.length - 1\r\n\t\t\t? null\r\n\t\t\t: this.getPixelForValue(ticks[index], index + this.minIndex);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar value = Math.round(me._startValue + me.getDecimalForPixel(pixel) * me._valueRange);\r\n\t\treturn Math.min(Math.max(value, 0), me.ticks.length - 1);\r\n\t},\r\n\r\n\tgetBasePixel: function() {\r\n\t\treturn this.bottom;\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults = defaultConfig;\nscale_category._defaults = _defaults;\n\nvar noop = helpers$1.noop;\r\nvar isNullOrUndef$2 = helpers$1.isNullOrUndef;\r\n\r\n/**\r\n * Generate a set of linear ticks\r\n * @param generationOptions the options used to generate the ticks\r\n * @param dataRange the range of the data\r\n * @returns {number[]} array of tick values\r\n */\r\nfunction generateTicks(generationOptions, dataRange) {\r\n\tvar ticks = [];\r\n\t// To get a \"nice\" value for the tick spacing, we will use the appropriately named\r\n\t// \"nice number\" algorithm. See https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\r\n\t// for details.\r\n\r\n\tvar MIN_SPACING = 1e-14;\r\n\tvar stepSize = generationOptions.stepSize;\r\n\tvar unit = stepSize || 1;\r\n\tvar maxNumSpaces = generationOptions.maxTicks - 1;\r\n\tvar min = generationOptions.min;\r\n\tvar max = generationOptions.max;\r\n\tvar precision = generationOptions.precision;\r\n\tvar rmin = dataRange.min;\r\n\tvar rmax = dataRange.max;\r\n\tvar spacing = helpers$1.niceNum((rmax - rmin) / maxNumSpaces / unit) * unit;\r\n\tvar factor, niceMin, niceMax, numSpaces;\r\n\r\n\t// Beyond MIN_SPACING floating point numbers being to lose precision\r\n\t// such that we can't do the math necessary to generate ticks\r\n\tif (spacing < MIN_SPACING && isNullOrUndef$2(min) && isNullOrUndef$2(max)) {\r\n\t\treturn [rmin, rmax];\r\n\t}\r\n\r\n\tnumSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\r\n\tif (numSpaces > maxNumSpaces) {\r\n\t\t// If the calculated num of spaces exceeds maxNumSpaces, recalculate it\r\n\t\tspacing = helpers$1.niceNum(numSpaces * spacing / maxNumSpaces / unit) * unit;\r\n\t}\r\n\r\n\tif (stepSize || isNullOrUndef$2(precision)) {\r\n\t\t// If a precision is not specified, calculate factor based on spacing\r\n\t\tfactor = Math.pow(10, helpers$1._decimalPlaces(spacing));\r\n\t} else {\r\n\t\t// If the user specified a precision, round to that number of decimal places\r\n\t\tfactor = Math.pow(10, precision);\r\n\t\tspacing = Math.ceil(spacing * factor) / factor;\r\n\t}\r\n\r\n\tniceMin = Math.floor(rmin / spacing) * spacing;\r\n\tniceMax = Math.ceil(rmax / spacing) * spacing;\r\n\r\n\t// If min, max and stepSize is set and they make an evenly spaced scale use it.\r\n\tif (stepSize) {\r\n\t\t// If very close to our whole number, use it.\r\n\t\tif (!isNullOrUndef$2(min) && helpers$1.almostWhole(min / spacing, spacing / 1000)) {\r\n\t\t\tniceMin = min;\r\n\t\t}\r\n\t\tif (!isNullOrUndef$2(max) && helpers$1.almostWhole(max / spacing, spacing / 1000)) {\r\n\t\t\tniceMax = max;\r\n\t\t}\r\n\t}\r\n\r\n\tnumSpaces = (niceMax - niceMin) / spacing;\r\n\t// If very close to our rounded value, use it.\r\n\tif (helpers$1.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\r\n\t\tnumSpaces = Math.round(numSpaces);\r\n\t} else {\r\n\t\tnumSpaces = Math.ceil(numSpaces);\r\n\t}\r\n\r\n\tniceMin = Math.round(niceMin * factor) / factor;\r\n\tniceMax = Math.round(niceMax * factor) / factor;\r\n\tticks.push(isNullOrUndef$2(min) ? niceMin : min);\r\n\tfor (var j = 1; j < numSpaces; ++j) {\r\n\t\tticks.push(Math.round((niceMin + j * spacing) * factor) / factor);\r\n\t}\r\n\tticks.push(isNullOrUndef$2(max) ? niceMax : max);\r\n\r\n\treturn ticks;\r\n}\r\n\r\nvar scale_linearbase = core_scale.extend({\r\n\tgetRightValue: function(value) {\r\n\t\tif (typeof value === 'string') {\r\n\t\t\treturn +value;\r\n\t\t}\r\n\t\treturn core_scale.prototype.getRightValue.call(this, value);\r\n\t},\r\n\r\n\thandleTickRangeOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t// If we are forcing it to begin at 0, but 0 will already be rendered on the chart,\r\n\t\t// do nothing since that would make the chart weird. If the user really wants a weird chart\r\n\t\t// axis, they can manually override it\r\n\t\tif (tickOpts.beginAtZero) {\r\n\t\t\tvar minSign = helpers$1.sign(me.min);\r\n\t\t\tvar maxSign = helpers$1.sign(me.max);\r\n\r\n\t\t\tif (minSign < 0 && maxSign < 0) {\r\n\t\t\t\t// move the top up to 0\r\n\t\t\t\tme.max = 0;\r\n\t\t\t} else if (minSign > 0 && maxSign > 0) {\r\n\t\t\t\t// move the bottom down to 0\r\n\t\t\t\tme.min = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;\r\n\t\tvar setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;\r\n\r\n\t\tif (tickOpts.min !== undefined) {\r\n\t\t\tme.min = tickOpts.min;\r\n\t\t} else if (tickOpts.suggestedMin !== undefined) {\r\n\t\t\tif (me.min === null) {\r\n\t\t\t\tme.min = tickOpts.suggestedMin;\r\n\t\t\t} else {\r\n\t\t\t\tme.min = Math.min(me.min, tickOpts.suggestedMin);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tickOpts.max !== undefined) {\r\n\t\t\tme.max = tickOpts.max;\r\n\t\t} else if (tickOpts.suggestedMax !== undefined) {\r\n\t\t\tif (me.max === null) {\r\n\t\t\t\tme.max = tickOpts.suggestedMax;\r\n\t\t\t} else {\r\n\t\t\t\tme.max = Math.max(me.max, tickOpts.suggestedMax);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (setMin !== setMax) {\r\n\t\t\t// We set the min or the max but not both.\r\n\t\t\t// So ensure that our range is good\r\n\t\t\t// Inverted or 0 length range can happen when\r\n\t\t\t// ticks.min is set, and no datasets are visible\r\n\t\t\tif (me.min >= me.max) {\r\n\t\t\t\tif (setMin) {\r\n\t\t\t\t\tme.max = me.min + 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tme.min = me.max - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (me.min === me.max) {\r\n\t\t\tme.max++;\r\n\r\n\t\t\tif (!tickOpts.beginAtZero) {\r\n\t\t\t\tme.min--;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetTickLimit: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar stepSize = tickOpts.stepSize;\r\n\t\tvar maxTicksLimit = tickOpts.maxTicksLimit;\r\n\t\tvar maxTicks;\r\n\r\n\t\tif (stepSize) {\r\n\t\t\tmaxTicks = Math.ceil(me.max / stepSize) - Math.floor(me.min / stepSize) + 1;\r\n\t\t} else {\r\n\t\t\tmaxTicks = me._computeTickLimit();\r\n\t\t\tmaxTicksLimit = maxTicksLimit || 11;\r\n\t\t}\r\n\r\n\t\tif (maxTicksLimit) {\r\n\t\t\tmaxTicks = Math.min(maxTicksLimit, maxTicks);\r\n\t\t}\r\n\r\n\t\treturn maxTicks;\r\n\t},\r\n\r\n\t_computeTickLimit: function() {\r\n\t\treturn Number.POSITIVE_INFINITY;\r\n\t},\r\n\r\n\thandleDirectionalChanges: noop,\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t// Figure out what the max number of ticks we can support it is based on the size of\r\n\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 40\r\n\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\r\n\t\t// the graph. Make sure we always have at least 2 ticks\r\n\t\tvar maxTicks = me.getTickLimit();\r\n\t\tmaxTicks = Math.max(2, maxTicks);\r\n\r\n\t\tvar numericGeneratorOptions = {\r\n\t\t\tmaxTicks: maxTicks,\r\n\t\t\tmin: tickOpts.min,\r\n\t\t\tmax: tickOpts.max,\r\n\t\t\tprecision: tickOpts.precision,\r\n\t\t\tstepSize: helpers$1.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)\r\n\t\t};\r\n\t\tvar ticks = me.ticks = generateTicks(numericGeneratorOptions, me);\r\n\r\n\t\tme.handleDirectionalChanges();\r\n\r\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t// range of the scale\r\n\t\tme.max = helpers$1.max(ticks);\r\n\t\tme.min = helpers$1.min(ticks);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\tticks.reverse();\r\n\r\n\t\t\tme.start = me.max;\r\n\t\t\tme.end = me.min;\r\n\t\t} else {\r\n\t\t\tme.start = me.min;\r\n\t\t\tme.end = me.max;\r\n\t\t}\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\t\tme.ticksAsNumbers = me.ticks.slice();\r\n\t\tme.zeroLineIndex = me.ticks.indexOf(0);\r\n\r\n\t\tcore_scale.prototype.convertTicksToLabels.call(me);\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar ticks = me.getTicks();\r\n\t\tvar start = me.min;\r\n\t\tvar end = me.max;\r\n\t\tvar offset;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (me.options.offset && ticks.length) {\r\n\t\t\toffset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\r\n\t\t\tstart -= offset;\r\n\t\t\tend += offset;\r\n\t\t}\r\n\t\tme._startValue = start;\r\n\t\tme._endValue = end;\r\n\t\tme._valueRange = end - start;\r\n\t}\r\n});\n\nvar defaultConfig$1 = {\r\n\tposition: 'left',\r\n\tticks: {\r\n\t\tcallback: core_ticks.formatters.linear\r\n\t}\r\n};\r\n\r\nvar DEFAULT_MIN = 0;\r\nvar DEFAULT_MAX = 1;\r\n\r\nfunction getOrCreateStack(stacks, stacked, meta) {\r\n\tvar key = [\r\n\t\tmeta.type,\r\n\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\r\n\t\tstacked === undefined && meta.stack === undefined ? meta.index : '',\r\n\t\tmeta.stack\r\n\t].join('.');\r\n\r\n\tif (stacks[key] === undefined) {\r\n\t\tstacks[key] = {\r\n\t\t\tpos: [],\r\n\t\t\tneg: []\r\n\t\t};\r\n\t}\r\n\r\n\treturn stacks[key];\r\n}\r\n\r\nfunction stackData(scale, stacks, meta, data) {\r\n\tvar opts = scale.options;\r\n\tvar stacked = opts.stacked;\r\n\tvar stack = getOrCreateStack(stacks, stacked, meta);\r\n\tvar pos = stack.pos;\r\n\tvar neg = stack.neg;\r\n\tvar ilen = data.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = scale._parseValue(data[i]);\r\n\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tpos[i] = pos[i] || 0;\r\n\t\tneg[i] = neg[i] || 0;\r\n\r\n\t\tif (opts.relativePoints) {\r\n\t\t\tpos[i] = 100;\r\n\t\t} else if (value.min < 0 || value.max < 0) {\r\n\t\t\tneg[i] += value.min;\r\n\t\t} else {\r\n\t\t\tpos[i] += value.max;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction updateMinMax(scale, meta, data) {\r\n\tvar ilen = data.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = scale._parseValue(data[i]);\r\n\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tscale.min = Math.min(scale.min, value.min);\r\n\t\tscale.max = Math.max(scale.max, value.max);\r\n\t}\r\n}\r\n\r\nvar scale_linear = scale_linearbase.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = me._getMatchingVisibleMetas();\r\n\t\tvar hasStacks = opts.stacked;\r\n\t\tvar stacks = {};\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, meta, data, values;\r\n\r\n\t\tme.min = Number.POSITIVE_INFINITY;\r\n\t\tme.max = Number.NEGATIVE_INFINITY;\r\n\r\n\t\tif (hasStacks === undefined) {\r\n\t\t\tfor (i = 0; !hasStacks && i < ilen; ++i) {\r\n\t\t\t\tmeta = metasets[i];\r\n\t\t\t\thasStacks = meta.stack !== undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\tdata = datasets[meta.index].data;\r\n\t\t\tif (hasStacks) {\r\n\t\t\t\tstackData(me, stacks, meta, data);\r\n\t\t\t} else {\r\n\t\t\t\tupdateMinMax(me, meta, data);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.each(stacks, function(stackValues) {\r\n\t\t\tvalues = stackValues.pos.concat(stackValues.neg);\r\n\t\t\tme.min = Math.min(me.min, helpers$1.min(values));\r\n\t\t\tme.max = Math.max(me.max, helpers$1.max(values));\r\n\t\t});\r\n\r\n\t\tme.min = helpers$1.isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;\r\n\t\tme.max = helpers$1.isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\tme.handleTickRangeOptions();\r\n\t},\r\n\r\n\t// Returns the maximum number of ticks based on the scale dimension\r\n\t_computeTickLimit: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickFont;\r\n\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\treturn Math.ceil(me.width / 40);\r\n\t\t}\r\n\t\ttickFont = helpers$1.options._parseFont(me.options.ticks);\r\n\t\treturn Math.ceil(me.height / tickFont.lineHeight);\r\n\t},\r\n\r\n\t// Called after the ticks are built. We need\r\n\thandleDirectionalChanges: function() {\r\n\t\tif (!this.isHorizontal()) {\r\n\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\r\n\t\t\tthis.ticks.reverse();\r\n\t\t}\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\t// Utils\r\n\tgetPixelForValue: function(value) {\r\n\t\tvar me = this;\r\n\t\treturn me.getPixelForDecimal((+me.getRightValue(value) - me._startValue) / me._valueRange);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\treturn this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.ticksAsNumbers;\r\n\t\tif (index < 0 || index > ticks.length - 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.getPixelForValue(ticks[index]);\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$1 = defaultConfig$1;\nscale_linear._defaults = _defaults$1;\n\nvar valueOrDefault$b = helpers$1.valueOrDefault;\r\nvar log10 = helpers$1.math.log10;\r\n\r\n/**\r\n * Generate a set of logarithmic ticks\r\n * @param generationOptions the options used to generate the ticks\r\n * @param dataRange the range of the data\r\n * @returns {number[]} array of tick values\r\n */\r\nfunction generateTicks$1(generationOptions, dataRange) {\r\n\tvar ticks = [];\r\n\r\n\tvar tickVal = valueOrDefault$b(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));\r\n\r\n\tvar endExp = Math.floor(log10(dataRange.max));\r\n\tvar endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\r\n\tvar exp, significand;\r\n\r\n\tif (tickVal === 0) {\r\n\t\texp = Math.floor(log10(dataRange.minNotZero));\r\n\t\tsignificand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));\r\n\r\n\t\tticks.push(tickVal);\r\n\t\ttickVal = significand * Math.pow(10, exp);\r\n\t} else {\r\n\t\texp = Math.floor(log10(tickVal));\r\n\t\tsignificand = Math.floor(tickVal / Math.pow(10, exp));\r\n\t}\r\n\tvar precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\r\n\r\n\tdo {\r\n\t\tticks.push(tickVal);\r\n\r\n\t\t++significand;\r\n\t\tif (significand === 10) {\r\n\t\t\tsignificand = 1;\r\n\t\t\t++exp;\r\n\t\t\tprecision = exp >= 0 ? 1 : precision;\r\n\t\t}\r\n\r\n\t\ttickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;\r\n\t} while (exp < endExp || (exp === endExp && significand < endSignificand));\r\n\r\n\tvar lastTick = valueOrDefault$b(generationOptions.max, tickVal);\r\n\tticks.push(lastTick);\r\n\r\n\treturn ticks;\r\n}\r\n\r\nvar defaultConfig$2 = {\r\n\tposition: 'left',\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\tcallback: core_ticks.formatters.logarithmic\r\n\t}\r\n};\r\n\r\n// TODO(v3): change this to positiveOrDefault\r\nfunction nonNegativeOrDefault(value, defaultValue) {\r\n\treturn helpers$1.isFinite(value) && value >= 0 ? value : defaultValue;\r\n}\r\n\r\nvar scale_logarithmic = core_scale.extend({\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tfunction IDMatches(meta) {\r\n\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\r\n\t\t}\r\n\t\tvar datasetIndex, meta, value, data, i, ilen;\r\n\r\n\t\t// Calculate Range\r\n\t\tme.min = Number.POSITIVE_INFINITY;\r\n\t\tme.max = Number.NEGATIVE_INFINITY;\r\n\t\tme.minNotZero = Number.POSITIVE_INFINITY;\r\n\r\n\t\tvar hasStacks = opts.stacked;\r\n\t\tif (hasStacks === undefined) {\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\r\n\t\t\t\t\tmeta.stack !== undefined) {\r\n\t\t\t\t\thasStacks = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (opts.stacked || hasStacks) {\r\n\t\t\tvar valuesPerStack = {};\r\n\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tvar key = [\r\n\t\t\t\t\tmeta.type,\r\n\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\r\n\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\r\n\t\t\t\t\tmeta.stack\r\n\t\t\t\t].join('.');\r\n\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\tif (valuesPerStack[key] === undefined) {\r\n\t\t\t\t\t\tvaluesPerStack[key] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdata = datasets[datasetIndex].data;\r\n\t\t\t\t\tfor (i = 0, ilen = data.length; i < ilen; i++) {\r\n\t\t\t\t\t\tvar values = valuesPerStack[key];\r\n\t\t\t\t\t\tvalue = me._parseValue(data[i]);\r\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\r\n\t\t\t\t\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalues[i] = values[i] || 0;\r\n\t\t\t\t\t\tvalues[i] += value.max;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\thelpers$1.each(valuesPerStack, function(valuesForType) {\r\n\t\t\t\tif (valuesForType.length > 0) {\r\n\t\t\t\t\tvar minVal = helpers$1.min(valuesForType);\r\n\t\t\t\t\tvar maxVal = helpers$1.max(valuesForType);\r\n\t\t\t\t\tme.min = Math.min(me.min, minVal);\r\n\t\t\t\t\tme.max = Math.max(me.max, maxVal);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t} else {\r\n\t\t\tfor (datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\tdata = datasets[datasetIndex].data;\r\n\t\t\t\t\tfor (i = 0, ilen = data.length; i < ilen; i++) {\r\n\t\t\t\t\t\tvalue = me._parseValue(data[i]);\r\n\t\t\t\t\t\t// invalid, hidden and negative values are ignored\r\n\t\t\t\t\t\tif (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tme.min = Math.min(value.min, me.min);\r\n\t\t\t\t\t\tme.max = Math.max(value.max, me.max);\r\n\r\n\t\t\t\t\t\tif (value.min !== 0) {\r\n\t\t\t\t\t\t\tme.minNotZero = Math.min(value.min, me.minNotZero);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.min = helpers$1.isFinite(me.min) ? me.min : null;\r\n\t\tme.max = helpers$1.isFinite(me.max) ? me.max : null;\r\n\t\tme.minNotZero = helpers$1.isFinite(me.minNotZero) ? me.minNotZero : null;\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max\r\n\t\tthis.handleTickRangeOptions();\r\n\t},\r\n\r\n\thandleTickRangeOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar DEFAULT_MIN = 1;\r\n\t\tvar DEFAULT_MAX = 10;\r\n\r\n\t\tme.min = nonNegativeOrDefault(tickOpts.min, me.min);\r\n\t\tme.max = nonNegativeOrDefault(tickOpts.max, me.max);\r\n\r\n\t\tif (me.min === me.max) {\r\n\t\t\tif (me.min !== 0 && me.min !== null) {\r\n\t\t\t\tme.min = Math.pow(10, Math.floor(log10(me.min)) - 1);\r\n\t\t\t\tme.max = Math.pow(10, Math.floor(log10(me.max)) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tme.min = DEFAULT_MIN;\r\n\t\t\t\tme.max = DEFAULT_MAX;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (me.min === null) {\r\n\t\t\tme.min = Math.pow(10, Math.floor(log10(me.max)) - 1);\r\n\t\t}\r\n\t\tif (me.max === null) {\r\n\t\t\tme.max = me.min !== 0\r\n\t\t\t\t? Math.pow(10, Math.floor(log10(me.min)) + 1)\r\n\t\t\t\t: DEFAULT_MAX;\r\n\t\t}\r\n\t\tif (me.minNotZero === null) {\r\n\t\t\tif (me.min > 0) {\r\n\t\t\t\tme.minNotZero = me.min;\r\n\t\t\t} else if (me.max < 1) {\r\n\t\t\t\tme.minNotZero = Math.pow(10, Math.floor(log10(me.max)));\r\n\t\t\t} else {\r\n\t\t\t\tme.minNotZero = DEFAULT_MIN;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar tickOpts = me.options.ticks;\r\n\t\tvar reverse = !me.isHorizontal();\r\n\r\n\t\tvar generationOptions = {\r\n\t\t\tmin: nonNegativeOrDefault(tickOpts.min),\r\n\t\t\tmax: nonNegativeOrDefault(tickOpts.max)\r\n\t\t};\r\n\t\tvar ticks = me.ticks = generateTicks$1(generationOptions, me);\r\n\r\n\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t// range of the scale\r\n\t\tme.max = helpers$1.max(ticks);\r\n\t\tme.min = helpers$1.min(ticks);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\treverse = !reverse;\r\n\t\t\tme.start = me.max;\r\n\t\t\tme.end = me.min;\r\n\t\t} else {\r\n\t\t\tme.start = me.min;\r\n\t\t\tme.end = me.max;\r\n\t\t}\r\n\t\tif (reverse) {\r\n\t\t\tticks.reverse();\r\n\t\t}\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tthis.tickValues = this.ticks.slice();\r\n\r\n\t\tcore_scale.prototype.convertTicksToLabels.call(this);\r\n\t},\r\n\r\n\t// Get the correct tooltip label\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn this._getScaleLabel(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.tickValues;\r\n\t\tif (index < 0 || index > ticks.length - 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.getPixelForValue(ticks[index]);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the value of the first tick.\r\n\t * @param {number} value - The minimum not zero value.\r\n\t * @return {number} The first tick value.\r\n\t * @private\r\n\t */\r\n\t_getFirstTickValue: function(value) {\r\n\t\tvar exp = Math.floor(log10(value));\r\n\t\tvar significand = Math.floor(value / Math.pow(10, exp));\r\n\r\n\t\treturn significand * Math.pow(10, exp);\r\n\t},\r\n\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tvar start = me.min;\r\n\t\tvar offset = 0;\r\n\r\n\t\tcore_scale.prototype._configure.call(me);\r\n\r\n\t\tif (start === 0) {\r\n\t\t\tstart = me._getFirstTickValue(me.minNotZero);\r\n\t\t\toffset = valueOrDefault$b(me.options.ticks.fontSize, core_defaults.global.defaultFontSize) / me._length;\r\n\t\t}\r\n\r\n\t\tme._startValue = log10(start);\r\n\t\tme._valueOffset = offset;\r\n\t\tme._valueRange = (log10(me.max) - log10(start)) / (1 - offset);\r\n\t},\r\n\r\n\tgetPixelForValue: function(value) {\r\n\t\tvar me = this;\r\n\t\tvar decimal = 0;\r\n\r\n\t\tvalue = +me.getRightValue(value);\r\n\r\n\t\tif (value > me.min && value > 0) {\r\n\t\t\tdecimal = (log10(value) - me._startValue) / me._valueRange + me._valueOffset;\r\n\t\t}\r\n\t\treturn me.getPixelForDecimal(decimal);\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar decimal = me.getDecimalForPixel(pixel);\r\n\t\treturn decimal === 0 && me.min === 0\r\n\t\t\t? 0\r\n\t\t\t: Math.pow(10, me._startValue + (decimal - me._valueOffset) * me._valueRange);\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$2 = defaultConfig$2;\nscale_logarithmic._defaults = _defaults$2;\n\nvar valueOrDefault$c = helpers$1.valueOrDefault;\r\nvar valueAtIndexOrDefault$1 = helpers$1.valueAtIndexOrDefault;\r\nvar resolve$4 = helpers$1.options.resolve;\r\n\r\nvar defaultConfig$3 = {\r\n\tdisplay: true,\r\n\r\n\t// Boolean - Whether to animate scaling the chart from the centre\r\n\tanimate: true,\r\n\tposition: 'chartArea',\r\n\r\n\tangleLines: {\r\n\t\tdisplay: true,\r\n\t\tcolor: 'rgba(0,0,0,0.1)',\r\n\t\tlineWidth: 1,\r\n\t\tborderDash: [],\r\n\t\tborderDashOffset: 0.0\r\n\t},\r\n\r\n\tgridLines: {\r\n\t\tcircular: false\r\n\t},\r\n\r\n\t// label settings\r\n\tticks: {\r\n\t\t// Boolean - Show a backdrop to the scale label\r\n\t\tshowLabelBackdrop: true,\r\n\r\n\t\t// String - The colour of the label backdrop\r\n\t\tbackdropColor: 'rgba(255,255,255,0.75)',\r\n\r\n\t\t// Number - The backdrop padding above & below the label in pixels\r\n\t\tbackdropPaddingY: 2,\r\n\r\n\t\t// Number - The backdrop padding to the side of the label in pixels\r\n\t\tbackdropPaddingX: 2,\r\n\r\n\t\tcallback: core_ticks.formatters.linear\r\n\t},\r\n\r\n\tpointLabels: {\r\n\t\t// Boolean - if true, show point labels\r\n\t\tdisplay: true,\r\n\r\n\t\t// Number - Point label font size in pixels\r\n\t\tfontSize: 10,\r\n\r\n\t\t// Function - Used to convert point labels\r\n\t\tcallback: function(label) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction getTickBackdropHeight(opts) {\r\n\tvar tickOpts = opts.ticks;\r\n\r\n\tif (tickOpts.display && opts.display) {\r\n\t\treturn valueOrDefault$c(tickOpts.fontSize, core_defaults.global.defaultFontSize) + tickOpts.backdropPaddingY * 2;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nfunction measureLabelSize(ctx, lineHeight, label) {\r\n\tif (helpers$1.isArray(label)) {\r\n\t\treturn {\r\n\t\t\tw: helpers$1.longestText(ctx, ctx.font, label),\r\n\t\t\th: label.length * lineHeight\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tw: ctx.measureText(label).width,\r\n\t\th: lineHeight\r\n\t};\r\n}\r\n\r\nfunction determineLimits(angle, pos, size, min, max) {\r\n\tif (angle === min || angle === max) {\r\n\t\treturn {\r\n\t\t\tstart: pos - (size / 2),\r\n\t\t\tend: pos + (size / 2)\r\n\t\t};\r\n\t} else if (angle < min || angle > max) {\r\n\t\treturn {\r\n\t\t\tstart: pos - size,\r\n\t\t\tend: pos\r\n\t\t};\r\n\t}\r\n\r\n\treturn {\r\n\t\tstart: pos,\r\n\t\tend: pos + size\r\n\t};\r\n}\r\n\r\n/**\r\n * Helper function to fit a radial linear scale with point labels\r\n */\r\nfunction fitWithPointLabels(scale) {\r\n\r\n\t// Right, this is really confusing and there is a lot of maths going on here\r\n\t// The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\r\n\t//\r\n\t// Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\r\n\t//\r\n\t// Solution:\r\n\t//\r\n\t// We assume the radius of the polygon is half the size of the canvas at first\r\n\t// at each index we check if the text overlaps.\r\n\t//\r\n\t// Where it does, we store that angle and that index.\r\n\t//\r\n\t// After finding the largest index and angle we calculate how much we need to remove\r\n\t// from the shape radius to move the point inwards by that x.\r\n\t//\r\n\t// We average the left and right distances to get the maximum shape radius that can fit in the box\r\n\t// along with labels.\r\n\t//\r\n\t// Once we have that, we can find the centre point for the chart, by taking the x text protrusion\r\n\t// on each side, removing that from the size, halving it and adding the left x protrusion width.\r\n\t//\r\n\t// This will mean we have a shape fitted to the canvas, as large as it can be with the labels\r\n\t// and position it in the most space efficient manner\r\n\t//\r\n\t// https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\r\n\r\n\tvar plFont = helpers$1.options._parseFont(scale.options.pointLabels);\r\n\r\n\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\r\n\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\r\n\tvar furthestLimits = {\r\n\t\tl: 0,\r\n\t\tr: scale.width,\r\n\t\tt: 0,\r\n\t\tb: scale.height - scale.paddingTop\r\n\t};\r\n\tvar furthestAngles = {};\r\n\tvar i, textSize, pointPosition;\r\n\r\n\tscale.ctx.font = plFont.string;\r\n\tscale._pointLabelSizes = [];\r\n\r\n\tvar valueCount = scale.chart.data.labels.length;\r\n\tfor (i = 0; i < valueCount; i++) {\r\n\t\tpointPosition = scale.getPointPosition(i, scale.drawingArea + 5);\r\n\t\ttextSize = measureLabelSize(scale.ctx, plFont.lineHeight, scale.pointLabels[i]);\r\n\t\tscale._pointLabelSizes[i] = textSize;\r\n\r\n\t\t// Add quarter circle to make degree 0 mean top of circle\r\n\t\tvar angleRadians = scale.getIndexAngle(i);\r\n\t\tvar angle = helpers$1.toDegrees(angleRadians) % 360;\r\n\t\tvar hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\r\n\t\tvar vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\r\n\r\n\t\tif (hLimits.start < furthestLimits.l) {\r\n\t\t\tfurthestLimits.l = hLimits.start;\r\n\t\t\tfurthestAngles.l = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (hLimits.end > furthestLimits.r) {\r\n\t\t\tfurthestLimits.r = hLimits.end;\r\n\t\t\tfurthestAngles.r = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (vLimits.start < furthestLimits.t) {\r\n\t\t\tfurthestLimits.t = vLimits.start;\r\n\t\t\tfurthestAngles.t = angleRadians;\r\n\t\t}\r\n\r\n\t\tif (vLimits.end > furthestLimits.b) {\r\n\t\t\tfurthestLimits.b = vLimits.end;\r\n\t\t\tfurthestAngles.b = angleRadians;\r\n\t\t}\r\n\t}\r\n\r\n\tscale.setReductions(scale.drawingArea, furthestLimits, furthestAngles);\r\n}\r\n\r\nfunction getTextAlignForAngle(angle) {\r\n\tif (angle === 0 || angle === 180) {\r\n\t\treturn 'center';\r\n\t} else if (angle < 180) {\r\n\t\treturn 'left';\r\n\t}\r\n\r\n\treturn 'right';\r\n}\r\n\r\nfunction fillText(ctx, text, position, lineHeight) {\r\n\tvar y = position.y + lineHeight / 2;\r\n\tvar i, ilen;\r\n\r\n\tif (helpers$1.isArray(text)) {\r\n\t\tfor (i = 0, ilen = text.length; i < ilen; ++i) {\r\n\t\t\tctx.fillText(text[i], position.x, y);\r\n\t\t\ty += lineHeight;\r\n\t\t}\r\n\t} else {\r\n\t\tctx.fillText(text, position.x, y);\r\n\t}\r\n}\r\n\r\nfunction adjustPointPositionForLabelHeight(angle, textSize, position) {\r\n\tif (angle === 90 || angle === 270) {\r\n\t\tposition.y -= (textSize.h / 2);\r\n\t} else if (angle > 270 || angle < 90) {\r\n\t\tposition.y -= textSize.h;\r\n\t}\r\n}\r\n\r\nfunction drawPointLabels(scale) {\r\n\tvar ctx = scale.ctx;\r\n\tvar opts = scale.options;\r\n\tvar pointLabelOpts = opts.pointLabels;\r\n\tvar tickBackdropHeight = getTickBackdropHeight(opts);\r\n\tvar outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);\r\n\tvar plFont = helpers$1.options._parseFont(pointLabelOpts);\r\n\r\n\tctx.save();\r\n\r\n\tctx.font = plFont.string;\r\n\tctx.textBaseline = 'middle';\r\n\r\n\tfor (var i = scale.chart.data.labels.length - 1; i >= 0; i--) {\r\n\t\t// Extra pixels out for some label spacing\r\n\t\tvar extra = (i === 0 ? tickBackdropHeight / 2 : 0);\r\n\t\tvar pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + 5);\r\n\r\n\t\t// Keep this in loop since we may support array properties here\r\n\t\tvar pointLabelFontColor = valueAtIndexOrDefault$1(pointLabelOpts.fontColor, i, core_defaults.global.defaultFontColor);\r\n\t\tctx.fillStyle = pointLabelFontColor;\r\n\r\n\t\tvar angleRadians = scale.getIndexAngle(i);\r\n\t\tvar angle = helpers$1.toDegrees(angleRadians);\r\n\t\tctx.textAlign = getTextAlignForAngle(angle);\r\n\t\tadjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);\r\n\t\tfillText(ctx, scale.pointLabels[i], pointLabelPosition, plFont.lineHeight);\r\n\t}\r\n\tctx.restore();\r\n}\r\n\r\nfunction drawRadiusLine(scale, gridLineOpts, radius, index) {\r\n\tvar ctx = scale.ctx;\r\n\tvar circular = gridLineOpts.circular;\r\n\tvar valueCount = scale.chart.data.labels.length;\r\n\tvar lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);\r\n\tvar lineWidth = valueAtIndexOrDefault$1(gridLineOpts.lineWidth, index - 1);\r\n\tvar pointPosition;\r\n\r\n\tif ((!circular && !valueCount) || !lineColor || !lineWidth) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tctx.save();\r\n\tctx.strokeStyle = lineColor;\r\n\tctx.lineWidth = lineWidth;\r\n\tif (ctx.setLineDash) {\r\n\t\tctx.setLineDash(gridLineOpts.borderDash || []);\r\n\t\tctx.lineDashOffset = gridLineOpts.borderDashOffset || 0.0;\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tif (circular) {\r\n\t\t// Draw circular arcs between the points\r\n\t\tctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);\r\n\t} else {\r\n\t\t// Draw straight lines connecting each index\r\n\t\tpointPosition = scale.getPointPosition(0, radius);\r\n\t\tctx.moveTo(pointPosition.x, pointPosition.y);\r\n\r\n\t\tfor (var i = 1; i < valueCount; i++) {\r\n\t\t\tpointPosition = scale.getPointPosition(i, radius);\r\n\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\r\n\t\t}\r\n\t}\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n\tctx.restore();\r\n}\r\n\r\nfunction numberOrZero(param) {\r\n\treturn helpers$1.isNumber(param) ? param : 0;\r\n}\r\n\r\nvar scale_radialLinear = scale_linearbase.extend({\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tme.width = me.maxWidth;\r\n\t\tme.height = me.maxHeight;\r\n\t\tme.paddingTop = getTickBackdropHeight(me.options) / 2;\r\n\t\tme.xCenter = Math.floor(me.width / 2);\r\n\t\tme.yCenter = Math.floor((me.height - me.paddingTop) / 2);\r\n\t\tme.drawingArea = Math.min(me.height - me.paddingTop, me.width) / 2;\r\n\t},\r\n\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar min = Number.POSITIVE_INFINITY;\r\n\t\tvar max = Number.NEGATIVE_INFINITY;\r\n\r\n\t\thelpers$1.each(chart.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\r\n\t\t\t\thelpers$1.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tmin = Math.min(value, min);\r\n\t\t\t\t\tmax = Math.max(value, max);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tme.min = (min === Number.POSITIVE_INFINITY ? 0 : min);\r\n\t\tme.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);\r\n\r\n\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\tme.handleTickRangeOptions();\r\n\t},\r\n\r\n\t// Returns the maximum number of ticks based on the scale dimension\r\n\t_computeTickLimit: function() {\r\n\t\treturn Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\r\n\t},\r\n\r\n\tconvertTicksToLabels: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tscale_linearbase.prototype.convertTicksToLabels.call(me);\r\n\r\n\t\t// Point labels\r\n\t\tme.pointLabels = me.chart.data.labels.map(function() {\r\n\t\t\tvar label = helpers$1.callback(me.options.pointLabels.callback, arguments, me);\r\n\t\t\treturn label || label === 0 ? label : '';\r\n\t\t});\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t},\r\n\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\r\n\t\tif (opts.display && opts.pointLabels.display) {\r\n\t\t\tfitWithPointLabels(me);\r\n\t\t} else {\r\n\t\t\tme.setCenterPoint(0, 0, 0, 0);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Set radius reductions and determine new radius and center point\r\n\t * @private\r\n\t */\r\n\tsetReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {\r\n\t\tvar me = this;\r\n\t\tvar radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);\r\n\t\tvar radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);\r\n\t\tvar radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);\r\n\t\tvar radiusReductionBottom = -Math.max(furthestLimits.b - (me.height - me.paddingTop), 0) / Math.cos(furthestAngles.b);\r\n\r\n\t\tradiusReductionLeft = numberOrZero(radiusReductionLeft);\r\n\t\tradiusReductionRight = numberOrZero(radiusReductionRight);\r\n\t\tradiusReductionTop = numberOrZero(radiusReductionTop);\r\n\t\tradiusReductionBottom = numberOrZero(radiusReductionBottom);\r\n\r\n\t\tme.drawingArea = Math.min(\r\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),\r\n\t\t\tMath.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));\r\n\t\tme.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);\r\n\t},\r\n\r\n\tsetCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {\r\n\t\tvar me = this;\r\n\t\tvar maxRight = me.width - rightMovement - me.drawingArea;\r\n\t\tvar maxLeft = leftMovement + me.drawingArea;\r\n\t\tvar maxTop = topMovement + me.drawingArea;\r\n\t\tvar maxBottom = (me.height - me.paddingTop) - bottomMovement - me.drawingArea;\r\n\r\n\t\tme.xCenter = Math.floor(((maxLeft + maxRight) / 2) + me.left);\r\n\t\tme.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);\r\n\t},\r\n\r\n\tgetIndexAngle: function(index) {\r\n\t\tvar chart = this.chart;\r\n\t\tvar angleMultiplier = 360 / chart.data.labels.length;\r\n\t\tvar options = chart.options || {};\r\n\t\tvar startAngle = options.startAngle || 0;\r\n\r\n\t\t// Start from the top instead of right, so remove a quarter of the circle\r\n\t\tvar angle = (index * angleMultiplier + startAngle) % 360;\r\n\r\n\t\treturn (angle < 0 ? angle + 360 : angle) * Math.PI * 2 / 360;\r\n\t},\r\n\r\n\tgetDistanceFromCenterForValue: function(value) {\r\n\t\tvar me = this;\r\n\r\n\t\tif (helpers$1.isNullOrUndef(value)) {\r\n\t\t\treturn NaN;\r\n\t\t}\r\n\r\n\t\t// Take into account half font size + the yPadding of the top value\r\n\t\tvar scalingFactor = me.drawingArea / (me.max - me.min);\r\n\t\tif (me.options.ticks.reverse) {\r\n\t\t\treturn (me.max - value) * scalingFactor;\r\n\t\t}\r\n\t\treturn (value - me.min) * scalingFactor;\r\n\t},\r\n\r\n\tgetPointPosition: function(index, distanceFromCenter) {\r\n\t\tvar me = this;\r\n\t\tvar thisAngle = me.getIndexAngle(index) - (Math.PI / 2);\r\n\t\treturn {\r\n\t\t\tx: Math.cos(thisAngle) * distanceFromCenter + me.xCenter,\r\n\t\t\ty: Math.sin(thisAngle) * distanceFromCenter + me.yCenter\r\n\t\t};\r\n\t},\r\n\r\n\tgetPointPositionForValue: function(index, value) {\r\n\t\treturn this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\r\n\t},\r\n\r\n\tgetBasePosition: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\r\n\t\treturn me.getPointPositionForValue(index || 0,\r\n\t\t\tme.beginAtZero ? 0 :\r\n\t\t\tmin < 0 && max < 0 ? max :\r\n\t\t\tmin > 0 && max > 0 ? min :\r\n\t\t\t0);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawGrid: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\t\tvar gridLineOpts = opts.gridLines;\r\n\t\tvar angleLineOpts = opts.angleLines;\r\n\t\tvar lineWidth = valueOrDefault$c(angleLineOpts.lineWidth, gridLineOpts.lineWidth);\r\n\t\tvar lineColor = valueOrDefault$c(angleLineOpts.color, gridLineOpts.color);\r\n\t\tvar i, offset, position;\r\n\r\n\t\tif (opts.pointLabels.display) {\r\n\t\t\tdrawPointLabels(me);\r\n\t\t}\r\n\r\n\t\tif (gridLineOpts.display) {\r\n\t\t\thelpers$1.each(me.ticks, function(label, index) {\r\n\t\t\t\tif (index !== 0) {\r\n\t\t\t\t\toffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\r\n\t\t\t\t\tdrawRadiusLine(me, gridLineOpts, offset, index);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (angleLineOpts.display && lineWidth && lineColor) {\r\n\t\t\tctx.save();\r\n\t\t\tctx.lineWidth = lineWidth;\r\n\t\t\tctx.strokeStyle = lineColor;\r\n\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\tctx.setLineDash(resolve$4([angleLineOpts.borderDash, gridLineOpts.borderDash, []]));\r\n\t\t\t\tctx.lineDashOffset = resolve$4([angleLineOpts.borderDashOffset, gridLineOpts.borderDashOffset, 0.0]);\r\n\t\t\t}\r\n\r\n\t\t\tfor (i = me.chart.data.labels.length - 1; i >= 0; i--) {\r\n\t\t\t\toffset = me.getDistanceFromCenterForValue(opts.ticks.reverse ? me.min : me.max);\r\n\t\t\t\tposition = me.getPointPosition(i, offset);\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.moveTo(me.xCenter, me.yCenter);\r\n\t\t\t\tctx.lineTo(position.x, position.y);\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\tif (!tickOpts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar startAngle = me.getIndexAngle(0);\r\n\t\tvar tickFont = helpers$1.options._parseFont(tickOpts);\r\n\t\tvar tickFontColor = valueOrDefault$c(tickOpts.fontColor, core_defaults.global.defaultFontColor);\r\n\t\tvar offset, width;\r\n\r\n\t\tctx.save();\r\n\t\tctx.font = tickFont.string;\r\n\t\tctx.translate(me.xCenter, me.yCenter);\r\n\t\tctx.rotate(startAngle);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\r\n\t\thelpers$1.each(me.ticks, function(label, index) {\r\n\t\t\tif (index === 0 && !tickOpts.reverse) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\toffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\r\n\r\n\t\t\tif (tickOpts.showLabelBackdrop) {\r\n\t\t\t\twidth = ctx.measureText(label).width;\r\n\t\t\t\tctx.fillStyle = tickOpts.backdropColor;\r\n\r\n\t\t\t\tctx.fillRect(\r\n\t\t\t\t\t-width / 2 - tickOpts.backdropPaddingX,\r\n\t\t\t\t\t-offset - tickFont.size / 2 - tickOpts.backdropPaddingY,\r\n\t\t\t\t\twidth + tickOpts.backdropPaddingX * 2,\r\n\t\t\t\t\ttickFont.size + tickOpts.backdropPaddingY * 2\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tctx.fillStyle = tickFontColor;\r\n\t\t\tctx.fillText(label, 0, -offset);\r\n\t\t});\r\n\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_drawTitle: helpers$1.noop\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$3 = defaultConfig$3;\nscale_radialLinear._defaults = _defaults$3;\n\nvar deprecated$1 = helpers$1._deprecated;\r\nvar resolve$5 = helpers$1.options.resolve;\r\nvar valueOrDefault$d = helpers$1.valueOrDefault;\r\n\r\n// Integer constants are from the ES6 spec.\r\nvar MIN_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;\r\nvar MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\r\n\r\nvar INTERVALS = {\r\n\tmillisecond: {\r\n\t\tcommon: true,\r\n\t\tsize: 1,\r\n\t\tsteps: 1000\r\n\t},\r\n\tsecond: {\r\n\t\tcommon: true,\r\n\t\tsize: 1000,\r\n\t\tsteps: 60\r\n\t},\r\n\tminute: {\r\n\t\tcommon: true,\r\n\t\tsize: 60000,\r\n\t\tsteps: 60\r\n\t},\r\n\thour: {\r\n\t\tcommon: true,\r\n\t\tsize: 3600000,\r\n\t\tsteps: 24\r\n\t},\r\n\tday: {\r\n\t\tcommon: true,\r\n\t\tsize: 86400000,\r\n\t\tsteps: 30\r\n\t},\r\n\tweek: {\r\n\t\tcommon: false,\r\n\t\tsize: 604800000,\r\n\t\tsteps: 4\r\n\t},\r\n\tmonth: {\r\n\t\tcommon: true,\r\n\t\tsize: 2.628e9,\r\n\t\tsteps: 12\r\n\t},\r\n\tquarter: {\r\n\t\tcommon: false,\r\n\t\tsize: 7.884e9,\r\n\t\tsteps: 4\r\n\t},\r\n\tyear: {\r\n\t\tcommon: true,\r\n\t\tsize: 3.154e10\r\n\t}\r\n};\r\n\r\nvar UNITS = Object.keys(INTERVALS);\r\n\r\nfunction sorter(a, b) {\r\n\treturn a - b;\r\n}\r\n\r\nfunction arrayUnique(items) {\r\n\tvar hash = {};\r\n\tvar out = [];\r\n\tvar i, ilen, item;\r\n\r\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\titem = items[i];\r\n\t\tif (!hash[item]) {\r\n\t\t\thash[item] = true;\r\n\t\t\tout.push(item);\r\n\t\t}\r\n\t}\r\n\r\n\treturn out;\r\n}\r\n\r\nfunction getMin(options) {\r\n\treturn helpers$1.valueOrDefault(options.time.min, options.ticks.min);\r\n}\r\n\r\nfunction getMax(options) {\r\n\treturn helpers$1.valueOrDefault(options.time.max, options.ticks.max);\r\n}\r\n\r\n/**\r\n * Returns an array of {time, pos} objects used to interpolate a specific `time` or position\r\n * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is\r\n * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other\r\n * extremity (left + width or top + height). Note that it would be more optimized to directly\r\n * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need\r\n * to create the lookup table. The table ALWAYS contains at least two items: min and max.\r\n *\r\n * @param {number[]} timestamps - timestamps sorted from lowest to highest.\r\n * @param {string} distribution - If 'linear', timestamps will be spread linearly along the min\r\n * and max range, so basically, the table will contains only two items: {min, 0} and {max, 1}.\r\n * If 'series', timestamps will be positioned at the same distance from each other. In this\r\n * case, only timestamps that break the time linearity are registered, meaning that in the\r\n * best case, all timestamps are linear, the table contains only min and max.\r\n */\r\nfunction buildLookupTable(timestamps, min, max, distribution) {\r\n\tif (distribution === 'linear' || !timestamps.length) {\r\n\t\treturn [\r\n\t\t\t{time: min, pos: 0},\r\n\t\t\t{time: max, pos: 1}\r\n\t\t];\r\n\t}\r\n\r\n\tvar table = [];\r\n\tvar items = [min];\r\n\tvar i, ilen, prev, curr, next;\r\n\r\n\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\r\n\t\tcurr = timestamps[i];\r\n\t\tif (curr > min && curr < max) {\r\n\t\t\titems.push(curr);\r\n\t\t}\r\n\t}\r\n\r\n\titems.push(max);\r\n\r\n\tfor (i = 0, ilen = items.length; i < ilen; ++i) {\r\n\t\tnext = items[i + 1];\r\n\t\tprev = items[i - 1];\r\n\t\tcurr = items[i];\r\n\r\n\t\t// only add points that breaks the scale linearity\r\n\t\tif (prev === undefined || next === undefined || Math.round((next + prev) / 2) !== curr) {\r\n\t\t\ttable.push({time: curr, pos: i / (ilen - 1)});\r\n\t\t}\r\n\t}\r\n\r\n\treturn table;\r\n}\r\n\r\n// @see adapted from https://www.anujgakhar.com/2014/03/01/binary-search-in-javascript/\r\nfunction lookup(table, key, value) {\r\n\tvar lo = 0;\r\n\tvar hi = table.length - 1;\r\n\tvar mid, i0, i1;\r\n\r\n\twhile (lo >= 0 && lo <= hi) {\r\n\t\tmid = (lo + hi) >> 1;\r\n\t\ti0 = table[mid - 1] || null;\r\n\t\ti1 = table[mid];\r\n\r\n\t\tif (!i0) {\r\n\t\t\t// given value is outside table (before first item)\r\n\t\t\treturn {lo: null, hi: i1};\r\n\t\t} else if (i1[key] < value) {\r\n\t\t\tlo = mid + 1;\r\n\t\t} else if (i0[key] > value) {\r\n\t\t\thi = mid - 1;\r\n\t\t} else {\r\n\t\t\treturn {lo: i0, hi: i1};\r\n\t\t}\r\n\t}\r\n\r\n\t// given value is outside table (after last item)\r\n\treturn {lo: i1, hi: null};\r\n}\r\n\r\n/**\r\n * Linearly interpolates the given source `value` using the table items `skey` values and\r\n * returns the associated `tkey` value. For example, interpolate(table, 'time', 42, 'pos')\r\n * returns the position for a timestamp equal to 42. If value is out of bounds, values at\r\n * index [0, 1] or [n - 1, n] are used for the interpolation.\r\n */\r\nfunction interpolate$1(table, skey, sval, tkey) {\r\n\tvar range = lookup(table, skey, sval);\r\n\r\n\t// Note: the lookup table ALWAYS contains at least 2 items (min and max)\r\n\tvar prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;\r\n\tvar next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;\r\n\r\n\tvar span = next[skey] - prev[skey];\r\n\tvar ratio = span ? (sval - prev[skey]) / span : 0;\r\n\tvar offset = (next[tkey] - prev[tkey]) * ratio;\r\n\r\n\treturn prev[tkey] + offset;\r\n}\r\n\r\nfunction toTimestamp(scale, input) {\r\n\tvar adapter = scale._adapter;\r\n\tvar options = scale.options.time;\r\n\tvar parser = options.parser;\r\n\tvar format = parser || options.format;\r\n\tvar value = input;\r\n\r\n\tif (typeof parser === 'function') {\r\n\t\tvalue = parser(value);\r\n\t}\r\n\r\n\t// Only parse if its not a timestamp already\r\n\tif (!helpers$1.isFinite(value)) {\r\n\t\tvalue = typeof format === 'string'\r\n\t\t\t? adapter.parse(value, format)\r\n\t\t\t: adapter.parse(value);\r\n\t}\r\n\r\n\tif (value !== null) {\r\n\t\treturn +value;\r\n\t}\r\n\r\n\t// Labels are in an incompatible format and no `parser` has been provided.\r\n\t// The user might still use the deprecated `format` option for parsing.\r\n\tif (!parser && typeof format === 'function') {\r\n\t\tvalue = format(input);\r\n\r\n\t\t// `format` could return something else than a timestamp, if so, parse it\r\n\t\tif (!helpers$1.isFinite(value)) {\r\n\t\t\tvalue = adapter.parse(value);\r\n\t\t}\r\n\t}\r\n\r\n\treturn value;\r\n}\r\n\r\nfunction parse(scale, input) {\r\n\tif (helpers$1.isNullOrUndef(input)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar options = scale.options.time;\r\n\tvar value = toTimestamp(scale, scale.getRightValue(input));\r\n\tif (value === null) {\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif (options.round) {\r\n\t\tvalue = +scale._adapter.startOf(value, options.round);\r\n\t}\r\n\r\n\treturn value;\r\n}\r\n\r\n/**\r\n * Figures out what unit results in an appropriate number of auto-generated ticks\r\n */\r\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\r\n\tvar ilen = UNITS.length;\r\n\tvar i, interval, factor;\r\n\r\n\tfor (i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\r\n\t\tinterval = INTERVALS[UNITS[i]];\r\n\t\tfactor = interval.steps ? interval.steps : MAX_INTEGER;\r\n\r\n\t\tif (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\r\n\t\t\treturn UNITS[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[ilen - 1];\r\n}\r\n\r\n/**\r\n * Figures out what unit to format a set of ticks with\r\n */\r\nfunction determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\r\n\tvar i, unit;\r\n\r\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\r\n\t\tunit = UNITS[i];\r\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\r\n\t\t\treturn unit;\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\r\n}\r\n\r\nfunction determineMajorUnit(unit) {\r\n\tfor (var i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\r\n\t\tif (INTERVALS[UNITS[i]].common) {\r\n\t\t\treturn UNITS[i];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Generates a maximum of `capacity` timestamps between min and max, rounded to the\r\n * `minor` unit using the given scale time `options`.\r\n * Important: this method can return ticks outside the min and max range, it's the\r\n * responsibility of the calling code to clamp values if needed.\r\n */\r\nfunction generate(scale, min, max, capacity) {\r\n\tvar adapter = scale._adapter;\r\n\tvar options = scale.options;\r\n\tvar timeOpts = options.time;\r\n\tvar minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);\r\n\tvar stepSize = resolve$5([timeOpts.stepSize, timeOpts.unitStepSize, 1]);\r\n\tvar weekday = minor === 'week' ? timeOpts.isoWeekday : false;\r\n\tvar first = min;\r\n\tvar ticks = [];\r\n\tvar time;\r\n\r\n\t// For 'week' unit, handle the first day of week option\r\n\tif (weekday) {\r\n\t\tfirst = +adapter.startOf(first, 'isoWeek', weekday);\r\n\t}\r\n\r\n\t// Align first ticks on unit\r\n\tfirst = +adapter.startOf(first, weekday ? 'day' : minor);\r\n\r\n\t// Prevent browser from freezing in case user options request millions of milliseconds\r\n\tif (adapter.diff(max, min, minor) > 100000 * stepSize) {\r\n\t\tthrow min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor;\r\n\t}\r\n\r\n\tfor (time = first; time < max; time = +adapter.add(time, stepSize, minor)) {\r\n\t\tticks.push(time);\r\n\t}\r\n\r\n\tif (time === max || options.bounds === 'ticks') {\r\n\t\tticks.push(time);\r\n\t}\r\n\r\n\treturn ticks;\r\n}\r\n\r\n/**\r\n * Returns the start and end offsets from edges in the form of {start, end}\r\n * where each value is a relative width to the scale and ranges between 0 and 1.\r\n * They add extra margins on the both sides by scaling down the original scale.\r\n * Offsets are added when the `offset` option is true.\r\n */\r\nfunction computeOffsets(table, ticks, min, max, options) {\r\n\tvar start = 0;\r\n\tvar end = 0;\r\n\tvar first, last;\r\n\r\n\tif (options.offset && ticks.length) {\r\n\t\tfirst = interpolate$1(table, 'time', ticks[0], 'pos');\r\n\t\tif (ticks.length === 1) {\r\n\t\t\tstart = 1 - first;\r\n\t\t} else {\r\n\t\t\tstart = (interpolate$1(table, 'time', ticks[1], 'pos') - first) / 2;\r\n\t\t}\r\n\t\tlast = interpolate$1(table, 'time', ticks[ticks.length - 1], 'pos');\r\n\t\tif (ticks.length === 1) {\r\n\t\t\tend = last;\r\n\t\t} else {\r\n\t\t\tend = (last - interpolate$1(table, 'time', ticks[ticks.length - 2], 'pos')) / 2;\r\n\t\t}\r\n\t}\r\n\r\n\treturn {start: start, end: end, factor: 1 / (start + 1 + end)};\r\n}\r\n\r\nfunction setMajorTicks(scale, ticks, map, majorUnit) {\r\n\tvar adapter = scale._adapter;\r\n\tvar first = +adapter.startOf(ticks[0].value, majorUnit);\r\n\tvar last = ticks[ticks.length - 1].value;\r\n\tvar major, index;\r\n\r\n\tfor (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {\r\n\t\tindex = map[major];\r\n\t\tif (index >= 0) {\r\n\t\t\tticks[index].major = true;\r\n\t\t}\r\n\t}\r\n\treturn ticks;\r\n}\r\n\r\nfunction ticksFromTimestamps(scale, values, majorUnit) {\r\n\tvar ticks = [];\r\n\tvar map = {};\r\n\tvar ilen = values.length;\r\n\tvar i, value;\r\n\r\n\tfor (i = 0; i < ilen; ++i) {\r\n\t\tvalue = values[i];\r\n\t\tmap[value] = i;\r\n\r\n\t\tticks.push({\r\n\t\t\tvalue: value,\r\n\t\t\tmajor: false\r\n\t\t});\r\n\t}\r\n\r\n\t// We set the major ticks separately from the above loop because calling startOf for every tick\r\n\t// is expensive when there is a large number of ticks\r\n\treturn (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\r\n}\r\n\r\nvar defaultConfig$4 = {\r\n\tposition: 'bottom',\r\n\r\n\t/**\r\n\t * Data distribution along the scale:\r\n\t * - 'linear': data are spread according to their time (distances can vary),\r\n\t * - 'series': data are spread at the same distance from each other.\r\n\t * @see https://github.com/chartjs/Chart.js/pull/4507\r\n\t * @since 2.7.0\r\n\t */\r\n\tdistribution: 'linear',\r\n\r\n\t/**\r\n\t * Scale boundary strategy (bypassed by min/max time options)\r\n\t * - `data`: make sure data are fully visible, ticks outside are removed\r\n\t * - `ticks`: make sure ticks are fully visible, data outside are truncated\r\n\t * @see https://github.com/chartjs/Chart.js/pull/4556\r\n\t * @since 2.7.0\r\n\t */\r\n\tbounds: 'data',\r\n\r\n\tadapters: {},\r\n\ttime: {\r\n\t\tparser: false, // false == a pattern string from https://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment\r\n\t\tunit: false, // false == automatic or override with week, month, year, etc.\r\n\t\tround: false, // none, or override with week, month, year, etc.\r\n\t\tdisplayFormat: false, // DEPRECATED\r\n\t\tisoWeekday: false, // override week start day - see https://momentjs.com/docs/#/get-set/iso-weekday/\r\n\t\tminUnit: 'millisecond',\r\n\t\tdisplayFormats: {}\r\n\t},\r\n\tticks: {\r\n\t\tautoSkip: false,\r\n\r\n\t\t/**\r\n\t\t * Ticks generation input values:\r\n\t\t * - 'auto': generates \"optimal\" ticks based on scale size and time options.\r\n\t\t * - 'data': generates ticks from data (including labels from data {t|x|y} objects).\r\n\t\t * - 'labels': generates ticks from user given `data.labels` values ONLY.\r\n\t\t * @see https://github.com/chartjs/Chart.js/pull/4507\r\n\t\t * @since 2.7.0\r\n\t\t */\r\n\t\tsource: 'auto',\r\n\r\n\t\tmajor: {\r\n\t\t\tenabled: false\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar scale_time = core_scale.extend({\r\n\tinitialize: function() {\r\n\t\tthis.mergeTicksOptions();\r\n\t\tcore_scale.prototype.initialize.call(this);\r\n\t},\r\n\r\n\tupdate: function() {\r\n\t\tvar me = this;\r\n\t\tvar options = me.options;\r\n\t\tvar time = options.time || (options.time = {});\r\n\t\tvar adapter = me._adapter = new core_adapters._date(options.adapters.date);\r\n\r\n\t\t// DEPRECATIONS: output a message only one time per update\r\n\t\tdeprecated$1('time scale', time.format, 'time.format', 'time.parser');\r\n\t\tdeprecated$1('time scale', time.min, 'time.min', 'ticks.min');\r\n\t\tdeprecated$1('time scale', time.max, 'time.max', 'ticks.max');\r\n\r\n\t\t// Backward compatibility: before introducing adapter, `displayFormats` was\r\n\t\t// supposed to contain *all* unit/string pairs but this can't be resolved\r\n\t\t// when loading the scale (adapters are loaded afterward), so let's populate\r\n\t\t// missing formats on update\r\n\t\thelpers$1.mergeIf(time.displayFormats, adapter.formats());\r\n\r\n\t\treturn core_scale.prototype.update.apply(me, arguments);\r\n\t},\r\n\r\n\t/**\r\n\t * Allows data to be referenced via 't' attribute\r\n\t */\r\n\tgetRightValue: function(rawValue) {\r\n\t\tif (rawValue && rawValue.t !== undefined) {\r\n\t\t\trawValue = rawValue.t;\r\n\t\t}\r\n\t\treturn core_scale.prototype.getRightValue.call(this, rawValue);\r\n\t},\r\n\r\n\tdetermineDataLimits: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar options = me.options;\r\n\t\tvar unit = options.time.unit || 'day';\r\n\t\tvar min = MAX_INTEGER;\r\n\t\tvar max = MIN_INTEGER;\r\n\t\tvar timestamps = [];\r\n\t\tvar datasets = [];\r\n\t\tvar labels = [];\r\n\t\tvar i, j, ilen, jlen, data, timestamp, labelsAdded;\r\n\t\tvar dataLabels = me._getLabels();\r\n\r\n\t\tfor (i = 0, ilen = dataLabels.length; i < ilen; ++i) {\r\n\t\t\tlabels.push(parse(me, dataLabels[i]));\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\tdata = chart.data.datasets[i].data;\r\n\r\n\t\t\t\t// Let's consider that all data have the same format.\r\n\t\t\t\tif (helpers$1.isObject(data[0])) {\r\n\t\t\t\t\tdatasets[i] = [];\r\n\r\n\t\t\t\t\tfor (j = 0, jlen = data.length; j < jlen; ++j) {\r\n\t\t\t\t\t\ttimestamp = parse(me, data[j]);\r\n\t\t\t\t\t\ttimestamps.push(timestamp);\r\n\t\t\t\t\t\tdatasets[i][j] = timestamp;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdatasets[i] = labels.slice(0);\r\n\t\t\t\t\tif (!labelsAdded) {\r\n\t\t\t\t\t\ttimestamps = timestamps.concat(labels);\r\n\t\t\t\t\t\tlabelsAdded = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdatasets[i] = [];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (labels.length) {\r\n\t\t\tmin = Math.min(min, labels[0]);\r\n\t\t\tmax = Math.max(max, labels[labels.length - 1]);\r\n\t\t}\r\n\r\n\t\tif (timestamps.length) {\r\n\t\t\ttimestamps = ilen > 1 ? arrayUnique(timestamps).sort(sorter) : timestamps.sort(sorter);\r\n\t\t\tmin = Math.min(min, timestamps[0]);\r\n\t\t\tmax = Math.max(max, timestamps[timestamps.length - 1]);\r\n\t\t}\r\n\r\n\t\tmin = parse(me, getMin(options)) || min;\r\n\t\tmax = parse(me, getMax(options)) || max;\r\n\r\n\t\t// In case there is no valid min/max, set limits based on unit time option\r\n\t\tmin = min === MAX_INTEGER ? +adapter.startOf(Date.now(), unit) : min;\r\n\t\tmax = max === MIN_INTEGER ? +adapter.endOf(Date.now(), unit) + 1 : max;\r\n\r\n\t\t// Make sure that max is strictly higher than min (required by the lookup table)\r\n\t\tme.min = Math.min(min, max);\r\n\t\tme.max = Math.max(min + 1, max);\r\n\r\n\t\t// PRIVATE\r\n\t\tme._table = [];\r\n\t\tme._timestamps = {\r\n\t\t\tdata: timestamps,\r\n\t\t\tdatasets: datasets,\r\n\t\t\tlabels: labels\r\n\t\t};\r\n\t},\r\n\r\n\tbuildTicks: function() {\r\n\t\tvar me = this;\r\n\t\tvar min = me.min;\r\n\t\tvar max = me.max;\r\n\t\tvar options = me.options;\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar timeOpts = options.time;\r\n\t\tvar timestamps = me._timestamps;\r\n\t\tvar ticks = [];\r\n\t\tvar capacity = me.getLabelCapacity(min);\r\n\t\tvar source = tickOpts.source;\r\n\t\tvar distribution = options.distribution;\r\n\t\tvar i, ilen, timestamp;\r\n\r\n\t\tif (source === 'data' || (source === 'auto' && distribution === 'series')) {\r\n\t\t\ttimestamps = timestamps.data;\r\n\t\t} else if (source === 'labels') {\r\n\t\t\ttimestamps = timestamps.labels;\r\n\t\t} else {\r\n\t\t\ttimestamps = generate(me, min, max, capacity);\r\n\t\t}\r\n\r\n\t\tif (options.bounds === 'ticks' && timestamps.length) {\r\n\t\t\tmin = timestamps[0];\r\n\t\t\tmax = timestamps[timestamps.length - 1];\r\n\t\t}\r\n\r\n\t\t// Enforce limits with user min/max options\r\n\t\tmin = parse(me, getMin(options)) || min;\r\n\t\tmax = parse(me, getMax(options)) || max;\r\n\r\n\t\t// Remove ticks outside the min/max range\r\n\t\tfor (i = 0, ilen = timestamps.length; i < ilen; ++i) {\r\n\t\t\ttimestamp = timestamps[i];\r\n\t\t\tif (timestamp >= min && timestamp <= max) {\r\n\t\t\t\tticks.push(timestamp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tme.min = min;\r\n\t\tme.max = max;\r\n\r\n\t\t// PRIVATE\r\n\t\t// determineUnitForFormatting relies on the number of ticks so we don't use it when\r\n\t\t// autoSkip is enabled because we don't yet know what the final number of ticks will be\r\n\t\tme._unit = timeOpts.unit || (tickOpts.autoSkip\r\n\t\t\t? determineUnitForAutoTicks(timeOpts.minUnit, me.min, me.max, capacity)\r\n\t\t\t: determineUnitForFormatting(me, ticks.length, timeOpts.minUnit, me.min, me.max));\r\n\t\tme._majorUnit = !tickOpts.major.enabled || me._unit === 'year' ? undefined\r\n\t\t\t: determineMajorUnit(me._unit);\r\n\t\tme._table = buildLookupTable(me._timestamps.data, min, max, distribution);\r\n\t\tme._offsets = computeOffsets(me._table, ticks, min, max, options);\r\n\r\n\t\tif (tickOpts.reverse) {\r\n\t\t\tticks.reverse();\r\n\t\t}\r\n\r\n\t\treturn ticksFromTimestamps(me, ticks, me._majorUnit);\r\n\t},\r\n\r\n\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar data = me.chart.data;\r\n\t\tvar timeOpts = me.options.time;\r\n\t\tvar label = data.labels && index < data.labels.length ? data.labels[index] : '';\r\n\t\tvar value = data.datasets[datasetIndex].data[index];\r\n\r\n\t\tif (helpers$1.isObject(value)) {\r\n\t\t\tlabel = me.getRightValue(value);\r\n\t\t}\r\n\t\tif (timeOpts.tooltipFormat) {\r\n\t\t\treturn adapter.format(toTimestamp(me, label), timeOpts.tooltipFormat);\r\n\t\t}\r\n\t\tif (typeof label === 'string') {\r\n\t\t\treturn label;\r\n\t\t}\r\n\t\treturn adapter.format(toTimestamp(me, label), timeOpts.displayFormats.datetime);\r\n\t},\r\n\r\n\t/**\r\n\t * Function to format an individual tick mark\r\n\t * @private\r\n\t */\r\n\ttickFormatFunction: function(time, index, ticks, format) {\r\n\t\tvar me = this;\r\n\t\tvar adapter = me._adapter;\r\n\t\tvar options = me.options;\r\n\t\tvar formats = options.time.displayFormats;\r\n\t\tvar minorFormat = formats[me._unit];\r\n\t\tvar majorUnit = me._majorUnit;\r\n\t\tvar majorFormat = formats[majorUnit];\r\n\t\tvar tick = ticks[index];\r\n\t\tvar tickOpts = options.ticks;\r\n\t\tvar major = majorUnit && majorFormat && tick && tick.major;\r\n\t\tvar label = adapter.format(time, format ? format : major ? majorFormat : minorFormat);\r\n\t\tvar nestedTickOpts = major ? tickOpts.major : tickOpts.minor;\r\n\t\tvar formatter = resolve$5([\r\n\t\t\tnestedTickOpts.callback,\r\n\t\t\tnestedTickOpts.userCallback,\r\n\t\t\ttickOpts.callback,\r\n\t\t\ttickOpts.userCallback\r\n\t\t]);\r\n\r\n\t\treturn formatter ? formatter(label, index, ticks) : label;\r\n\t},\r\n\r\n\tconvertTicksToLabels: function(ticks) {\r\n\t\tvar labels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = ticks.length; i < ilen; ++i) {\r\n\t\t\tlabels.push(this.tickFormatFunction(ticks[i].value, i, ticks));\r\n\t\t}\r\n\r\n\t\treturn labels;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetPixelForOffset: function(time) {\r\n\t\tvar me = this;\r\n\t\tvar offsets = me._offsets;\r\n\t\tvar pos = interpolate$1(me._table, 'time', time, 'pos');\r\n\t\treturn me.getPixelForDecimal((offsets.start + pos) * offsets.factor);\r\n\t},\r\n\r\n\tgetPixelForValue: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar time = null;\r\n\r\n\t\tif (index !== undefined && datasetIndex !== undefined) {\r\n\t\t\ttime = me._timestamps.datasets[datasetIndex][index];\r\n\t\t}\r\n\r\n\t\tif (time === null) {\r\n\t\t\ttime = parse(me, value);\r\n\t\t}\r\n\r\n\t\tif (time !== null) {\r\n\t\t\treturn me.getPixelForOffset(time);\r\n\t\t}\r\n\t},\r\n\r\n\tgetPixelForTick: function(index) {\r\n\t\tvar ticks = this.getTicks();\r\n\t\treturn index >= 0 && index < ticks.length ?\r\n\t\t\tthis.getPixelForOffset(ticks[index].value) :\r\n\t\t\tnull;\r\n\t},\r\n\r\n\tgetValueForPixel: function(pixel) {\r\n\t\tvar me = this;\r\n\t\tvar offsets = me._offsets;\r\n\t\tvar pos = me.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\r\n\t\tvar time = interpolate$1(me._table, 'pos', pos, 'time');\r\n\r\n\t\t// DEPRECATION, we should return time directly\r\n\t\treturn me._adapter._create(time);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLabelSize: function(label) {\r\n\t\tvar me = this;\r\n\t\tvar ticksOpts = me.options.ticks;\r\n\t\tvar tickLabelWidth = me.ctx.measureText(label).width;\r\n\t\tvar angle = helpers$1.toRadians(me.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\r\n\t\tvar cosRotation = Math.cos(angle);\r\n\t\tvar sinRotation = Math.sin(angle);\r\n\t\tvar tickFontSize = valueOrDefault$d(ticksOpts.fontSize, core_defaults.global.defaultFontSize);\r\n\r\n\t\treturn {\r\n\t\t\tw: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),\r\n\t\t\th: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Crude approximation of what the label width might be\r\n\t * @private\r\n\t */\r\n\tgetLabelWidth: function(label) {\r\n\t\treturn this._getLabelSize(label).w;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetLabelCapacity: function(exampleTime) {\r\n\t\tvar me = this;\r\n\t\tvar timeOpts = me.options.time;\r\n\t\tvar displayFormats = timeOpts.displayFormats;\r\n\r\n\t\t// pick the longest format (milliseconds) for guestimation\r\n\t\tvar format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\r\n\t\tvar exampleLabel = me.tickFormatFunction(exampleTime, 0, ticksFromTimestamps(me, [exampleTime], me._majorUnit), format);\r\n\t\tvar size = me._getLabelSize(exampleLabel);\r\n\t\tvar capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);\r\n\r\n\t\tif (me.options.offset) {\r\n\t\t\tcapacity--;\r\n\t\t}\r\n\r\n\t\treturn capacity > 0 ? capacity : 1;\r\n\t}\r\n});\r\n\r\n// INTERNAL: static default options, registered in src/index.js\r\nvar _defaults$4 = defaultConfig$4;\nscale_time._defaults = _defaults$4;\n\nvar scales = {\r\n\tcategory: scale_category,\r\n\tlinear: scale_linear,\r\n\tlogarithmic: scale_logarithmic,\r\n\tradialLinear: scale_radialLinear,\r\n\ttime: scale_time\r\n};\n\nvar FORMATS = {\r\n\tdatetime: 'MMM D, YYYY, h:mm:ss a',\r\n\tmillisecond: 'h:mm:ss.SSS a',\r\n\tsecond: 'h:mm:ss a',\r\n\tminute: 'h:mm a',\r\n\thour: 'hA',\r\n\tday: 'MMM D',\r\n\tweek: 'll',\r\n\tmonth: 'MMM YYYY',\r\n\tquarter: '[Q]Q - YYYY',\r\n\tyear: 'YYYY'\r\n};\r\n\r\ncore_adapters._date.override(typeof moment === 'function' ? {\r\n\t_id: 'moment', // DEBUG ONLY\r\n\r\n\tformats: function() {\r\n\t\treturn FORMATS;\r\n\t},\r\n\r\n\tparse: function(value, format) {\r\n\t\tif (typeof value === 'string' && typeof format === 'string') {\r\n\t\t\tvalue = moment(value, format);\r\n\t\t} else if (!(value instanceof moment)) {\r\n\t\t\tvalue = moment(value);\r\n\t\t}\r\n\t\treturn value.isValid() ? value.valueOf() : null;\r\n\t},\r\n\r\n\tformat: function(time, format) {\r\n\t\treturn moment(time).format(format);\r\n\t},\r\n\r\n\tadd: function(time, amount, unit) {\r\n\t\treturn moment(time).add(amount, unit).valueOf();\r\n\t},\r\n\r\n\tdiff: function(max, min, unit) {\r\n\t\treturn moment(max).diff(moment(min), unit);\r\n\t},\r\n\r\n\tstartOf: function(time, unit, weekday) {\r\n\t\ttime = moment(time);\r\n\t\tif (unit === 'isoWeek') {\r\n\t\t\treturn time.isoWeekday(weekday).valueOf();\r\n\t\t}\r\n\t\treturn time.startOf(unit).valueOf();\r\n\t},\r\n\r\n\tendOf: function(time, unit) {\r\n\t\treturn moment(time).endOf(unit).valueOf();\r\n\t},\r\n\r\n\t// DEPRECATIONS\r\n\r\n\t/**\r\n\t * Provided for backward compatibility with scale.getValueForPixel().\r\n\t * @deprecated since version 2.8.0\r\n\t * @todo remove at version 3\r\n\t * @private\r\n\t */\r\n\t_create: function(time) {\r\n\t\treturn moment(time);\r\n\t},\r\n} : {});\n\ncore_defaults._set('global', {\r\n\tplugins: {\r\n\t\tfiller: {\r\n\t\t\tpropagate: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar mappers = {\r\n\tdataset: function(source) {\r\n\t\tvar index = source.fill;\r\n\t\tvar chart = source.chart;\r\n\t\tvar meta = chart.getDatasetMeta(index);\r\n\t\tvar visible = meta && chart.isDatasetVisible(index);\r\n\t\tvar points = (visible && meta.dataset._children) || [];\r\n\t\tvar length = points.length || 0;\r\n\r\n\t\treturn !length ? null : function(point, i) {\r\n\t\t\treturn (i < length && points[i]._view) || null;\r\n\t\t};\r\n\t},\r\n\r\n\tboundary: function(source) {\r\n\t\tvar boundary = source.boundary;\r\n\t\tvar x = boundary ? boundary.x : null;\r\n\t\tvar y = boundary ? boundary.y : null;\r\n\r\n\t\tif (helpers$1.isArray(boundary)) {\r\n\t\t\treturn function(point, i) {\r\n\t\t\t\treturn boundary[i];\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn function(point) {\r\n\t\t\treturn {\r\n\t\t\t\tx: x === null ? point.x : x,\r\n\t\t\t\ty: y === null ? point.y : y,\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n};\r\n\r\n// @todo if (fill[0] === '#')\r\nfunction decodeFill(el, index, count) {\r\n\tvar model = el._model || {};\r\n\tvar fill = model.fill;\r\n\tvar target;\r\n\r\n\tif (fill === undefined) {\r\n\t\tfill = !!model.backgroundColor;\r\n\t}\r\n\r\n\tif (fill === false || fill === null) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif (fill === true) {\r\n\t\treturn 'origin';\r\n\t}\r\n\r\n\ttarget = parseFloat(fill, 10);\r\n\tif (isFinite(target) && Math.floor(target) === target) {\r\n\t\tif (fill[0] === '-' || fill[0] === '+') {\r\n\t\t\ttarget = index + target;\r\n\t\t}\r\n\r\n\t\tif (target === index || target < 0 || target >= count) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}\r\n\r\n\tswitch (fill) {\r\n\t// compatibility\r\n\tcase 'bottom':\r\n\t\treturn 'start';\r\n\tcase 'top':\r\n\t\treturn 'end';\r\n\tcase 'zero':\r\n\t\treturn 'origin';\r\n\t// supported boundaries\r\n\tcase 'origin':\r\n\tcase 'start':\r\n\tcase 'end':\r\n\t\treturn fill;\r\n\t// invalid fill values\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction computeLinearBoundary(source) {\r\n\tvar model = source.el._model || {};\r\n\tvar scale = source.el._scale || {};\r\n\tvar fill = source.fill;\r\n\tvar target = null;\r\n\tvar horizontal;\r\n\r\n\tif (isFinite(fill)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Backward compatibility: until v3, we still need to support boundary values set on\r\n\t// the model (scaleTop, scaleBottom and scaleZero) because some external plugins and\r\n\t// controllers might still use it (e.g. the Smith chart).\r\n\r\n\tif (fill === 'start') {\r\n\t\ttarget = model.scaleBottom === undefined ? scale.bottom : model.scaleBottom;\r\n\t} else if (fill === 'end') {\r\n\t\ttarget = model.scaleTop === undefined ? scale.top : model.scaleTop;\r\n\t} else if (model.scaleZero !== undefined) {\r\n\t\ttarget = model.scaleZero;\r\n\t} else if (scale.getBasePixel) {\r\n\t\ttarget = scale.getBasePixel();\r\n\t}\r\n\r\n\tif (target !== undefined && target !== null) {\r\n\t\tif (target.x !== undefined && target.y !== undefined) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\tif (helpers$1.isFinite(target)) {\r\n\t\t\thorizontal = scale.isHorizontal();\r\n\t\t\treturn {\r\n\t\t\t\tx: horizontal ? target : null,\r\n\t\t\t\ty: horizontal ? null : target\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n\r\nfunction computeCircularBoundary(source) {\r\n\tvar scale = source.el._scale;\r\n\tvar options = scale.options;\r\n\tvar length = scale.chart.data.labels.length;\r\n\tvar fill = source.fill;\r\n\tvar target = [];\r\n\tvar start, end, center, i, point;\r\n\r\n\tif (!length) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tstart = options.ticks.reverse ? scale.max : scale.min;\r\n\tend = options.ticks.reverse ? scale.min : scale.max;\r\n\tcenter = scale.getPointPositionForValue(0, start);\r\n\tfor (i = 0; i < length; ++i) {\r\n\t\tpoint = fill === 'start' || fill === 'end'\r\n\t\t\t? scale.getPointPositionForValue(i, fill === 'start' ? start : end)\r\n\t\t\t: scale.getBasePosition(i);\r\n\t\tif (options.gridLines.circular) {\r\n\t\t\tpoint.cx = center.x;\r\n\t\t\tpoint.cy = center.y;\r\n\t\t\tpoint.angle = scale.getIndexAngle(i) - Math.PI / 2;\r\n\t\t}\r\n\t\ttarget.push(point);\r\n\t}\r\n\treturn target;\r\n}\r\n\r\nfunction computeBoundary(source) {\r\n\tvar scale = source.el._scale || {};\r\n\r\n\tif (scale.getPointPositionForValue) {\r\n\t\treturn computeCircularBoundary(source);\r\n\t}\r\n\treturn computeLinearBoundary(source);\r\n}\r\n\r\nfunction resolveTarget(sources, index, propagate) {\r\n\tvar source = sources[index];\r\n\tvar fill = source.fill;\r\n\tvar visited = [index];\r\n\tvar target;\r\n\r\n\tif (!propagate) {\r\n\t\treturn fill;\r\n\t}\r\n\r\n\twhile (fill !== false && visited.indexOf(fill) === -1) {\r\n\t\tif (!isFinite(fill)) {\r\n\t\t\treturn fill;\r\n\t\t}\r\n\r\n\t\ttarget = sources[fill];\r\n\t\tif (!target) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (target.visible) {\r\n\t\t\treturn fill;\r\n\t\t}\r\n\r\n\t\tvisited.push(fill);\r\n\t\tfill = target.fill;\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\nfunction createMapper(source) {\r\n\tvar fill = source.fill;\r\n\tvar type = 'dataset';\r\n\r\n\tif (fill === false) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif (!isFinite(fill)) {\r\n\t\ttype = 'boundary';\r\n\t}\r\n\r\n\treturn mappers[type](source);\r\n}\r\n\r\nfunction isDrawable(point) {\r\n\treturn point && !point.skip;\r\n}\r\n\r\nfunction drawArea(ctx, curve0, curve1, len0, len1) {\r\n\tvar i, cx, cy, r;\r\n\r\n\tif (!len0 || !len1) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// building first area curve (normal)\r\n\tctx.moveTo(curve0[0].x, curve0[0].y);\r\n\tfor (i = 1; i < len0; ++i) {\r\n\t\thelpers$1.canvas.lineTo(ctx, curve0[i - 1], curve0[i]);\r\n\t}\r\n\r\n\tif (curve1[0].angle !== undefined) {\r\n\t\tcx = curve1[0].cx;\r\n\t\tcy = curve1[0].cy;\r\n\t\tr = Math.sqrt(Math.pow(curve1[0].x - cx, 2) + Math.pow(curve1[0].y - cy, 2));\r\n\t\tfor (i = len1 - 1; i > 0; --i) {\r\n\t\t\tctx.arc(cx, cy, r, curve1[i].angle, curve1[i - 1].angle, true);\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// joining the two area curves\r\n\tctx.lineTo(curve1[len1 - 1].x, curve1[len1 - 1].y);\r\n\r\n\t// building opposite area curve (reverse)\r\n\tfor (i = len1 - 1; i > 0; --i) {\r\n\t\thelpers$1.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true);\r\n\t}\r\n}\r\n\r\nfunction doFill(ctx, points, mapper, view, color, loop) {\r\n\tvar count = points.length;\r\n\tvar span = view.spanGaps;\r\n\tvar curve0 = [];\r\n\tvar curve1 = [];\r\n\tvar len0 = 0;\r\n\tvar len1 = 0;\r\n\tvar i, ilen, index, p0, p1, d0, d1, loopOffset;\r\n\r\n\tctx.beginPath();\r\n\r\n\tfor (i = 0, ilen = count; i < ilen; ++i) {\r\n\t\tindex = i % count;\r\n\t\tp0 = points[index]._view;\r\n\t\tp1 = mapper(p0, index, view);\r\n\t\td0 = isDrawable(p0);\r\n\t\td1 = isDrawable(p1);\r\n\r\n\t\tif (loop && loopOffset === undefined && d0) {\r\n\t\t\tloopOffset = i + 1;\r\n\t\t\tilen = count + loopOffset;\r\n\t\t}\r\n\r\n\t\tif (d0 && d1) {\r\n\t\t\tlen0 = curve0.push(p0);\r\n\t\t\tlen1 = curve1.push(p1);\r\n\t\t} else if (len0 && len1) {\r\n\t\t\tif (!span) {\r\n\t\t\t\tdrawArea(ctx, curve0, curve1, len0, len1);\r\n\t\t\t\tlen0 = len1 = 0;\r\n\t\t\t\tcurve0 = [];\r\n\t\t\t\tcurve1 = [];\r\n\t\t\t} else {\r\n\t\t\t\tif (d0) {\r\n\t\t\t\t\tcurve0.push(p0);\r\n\t\t\t\t}\r\n\t\t\t\tif (d1) {\r\n\t\t\t\t\tcurve1.push(p1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdrawArea(ctx, curve0, curve1, len0, len1);\r\n\r\n\tctx.closePath();\r\n\tctx.fillStyle = color;\r\n\tctx.fill();\r\n}\r\n\r\nvar plugin_filler = {\r\n\tid: 'filler',\r\n\r\n\tafterDatasetsUpdate: function(chart, options) {\r\n\t\tvar count = (chart.data.datasets || []).length;\r\n\t\tvar propagate = options.propagate;\r\n\t\tvar sources = [];\r\n\t\tvar meta, i, el, source;\r\n\r\n\t\tfor (i = 0; i < count; ++i) {\r\n\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\tel = meta.dataset;\r\n\t\t\tsource = null;\r\n\r\n\t\t\tif (el && el._model && el instanceof elements.Line) {\r\n\t\t\t\tsource = {\r\n\t\t\t\t\tvisible: chart.isDatasetVisible(i),\r\n\t\t\t\t\tfill: decodeFill(el, i, count),\r\n\t\t\t\t\tchart: chart,\r\n\t\t\t\t\tel: el\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tmeta.$filler = source;\r\n\t\t\tsources.push(source);\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < count; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!source) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tsource.fill = resolveTarget(sources, i, propagate);\r\n\t\t\tsource.boundary = computeBoundary(source);\r\n\t\t\tsource.mapper = createMapper(source);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeDatasetsDraw: function(chart) {\r\n\t\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\t\tvar ctx = chart.ctx;\r\n\t\tvar meta, i, el, view, points, mapper, color;\r\n\r\n\t\tfor (i = metasets.length - 1; i >= 0; --i) {\r\n\t\t\tmeta = metasets[i].$filler;\r\n\r\n\t\t\tif (!meta || !meta.visible) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tel = meta.el;\r\n\t\t\tview = el._view;\r\n\t\t\tpoints = el._children || [];\r\n\t\t\tmapper = meta.mapper;\r\n\t\t\tcolor = view.backgroundColor || core_defaults.global.defaultColor;\r\n\r\n\t\t\tif (mapper && color && points.length) {\r\n\t\t\t\thelpers$1.canvas.clipArea(ctx, chart.chartArea);\r\n\t\t\t\tdoFill(ctx, points, mapper, view, color, el._loop);\r\n\t\t\t\thelpers$1.canvas.unclipArea(ctx);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar getRtlHelper$1 = helpers$1.rtl.getRtlAdapter;\r\nvar noop$1 = helpers$1.noop;\r\nvar valueOrDefault$e = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('global', {\r\n\tlegend: {\r\n\t\tdisplay: true,\r\n\t\tposition: 'top',\r\n\t\talign: 'center',\r\n\t\tfullWidth: true,\r\n\t\treverse: false,\r\n\t\tweight: 1000,\r\n\r\n\t\t// a callback that will handle\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.datasetIndex;\r\n\t\t\tvar ci = this.chart;\r\n\t\t\tvar meta = ci.getDatasetMeta(index);\r\n\r\n\t\t\t// See controller.isDatasetVisible comment\r\n\t\t\tmeta.hidden = meta.hidden === null ? !ci.data.datasets[index].hidden : null;\r\n\r\n\t\t\t// We hid a dataset ... rerender the chart\r\n\t\t\tci.update();\r\n\t\t},\r\n\r\n\t\tonHover: null,\r\n\t\tonLeave: null,\r\n\r\n\t\tlabels: {\r\n\t\t\tboxWidth: 40,\r\n\t\t\tpadding: 10,\r\n\t\t\t// Generates labels shown in the legend\r\n\t\t\t// Valid properties to return:\r\n\t\t\t// text : text to display\r\n\t\t\t// fillStyle : fill of coloured box\r\n\t\t\t// strokeStyle: stroke of coloured box\r\n\t\t\t// hidden : if this legend item refers to a hidden item\r\n\t\t\t// lineCap : cap style for line\r\n\t\t\t// lineDash\r\n\t\t\t// lineDashOffset :\r\n\t\t\t// lineJoin :\r\n\t\t\t// lineWidth :\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar datasets = chart.data.datasets;\r\n\t\t\t\tvar options = chart.options.legend || {};\r\n\t\t\t\tvar usePointStyle = options.labels && options.labels.usePointStyle;\r\n\r\n\t\t\t\treturn chart._getSortedDatasetMetas().map(function(meta) {\r\n\t\t\t\t\tvar style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\r\n\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttext: datasets[meta.index].label,\r\n\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\thidden: !chart.isDatasetVisible(meta.index),\r\n\t\t\t\t\t\tlineCap: style.borderCapStyle,\r\n\t\t\t\t\t\tlineDash: style.borderDash,\r\n\t\t\t\t\t\tlineDashOffset: style.borderDashOffset,\r\n\t\t\t\t\t\tlineJoin: style.borderJoinStyle,\r\n\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\tpointStyle: style.pointStyle,\r\n\t\t\t\t\t\trotation: style.rotation,\r\n\r\n\t\t\t\t\t\t// Below is extra data used for toggling the datasets\r\n\t\t\t\t\t\tdatasetIndex: meta.index\r\n\t\t\t\t\t};\r\n\t\t\t\t}, this);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\r\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; i++) {\r\n\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\tlistItemSpan.style.backgroundColor = datasets[i].backgroundColor;\r\n\t\t\tif (datasets[i].label) {\r\n\t\t\t\tlistItem.appendChild(document.createTextNode(datasets[i].label));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t}\r\n});\r\n\r\n/**\r\n * Helper function to get the box width based on the usePointStyle option\r\n * @param {object} labelopts - the label options on the legend\r\n * @param {number} fontSize - the label font size\r\n * @return {number} width of the color box area\r\n */\r\nfunction getBoxWidth(labelOpts, fontSize) {\r\n\treturn labelOpts.usePointStyle && labelOpts.boxWidth > fontSize ?\r\n\t\tfontSize :\r\n\t\tlabelOpts.boxWidth;\r\n}\r\n\r\n/**\r\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\r\n */\r\nvar Legend = core_element.extend({\r\n\r\n\tinitialize: function(config) {\r\n\t\tvar me = this;\r\n\t\thelpers$1.extend(me, config);\r\n\r\n\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\tme.legendHitBoxes = [];\r\n\r\n\t\t/**\r\n \t\t * @private\r\n \t\t */\r\n\t\tme._hoveredItem = null;\r\n\r\n\t\t// Are we in doughnut mode which has a different data type\r\n\t\tme.doughnutMode = false;\r\n\t},\r\n\r\n\t// These methods are ordered by lifecycle. Utilities then follow.\r\n\t// Any function defined here is inherited by all legend types.\r\n\t// Any function can be extended by the legend type\r\n\r\n\tbeforeUpdate: noop$1,\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = margins;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\t\t// Labels\r\n\t\tme.beforeBuildLabels();\r\n\t\tme.buildLabels();\r\n\t\tme.afterBuildLabels();\r\n\r\n\t\t// Fit\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\t\t//\r\n\t\tme.afterUpdate();\r\n\r\n\t\treturn me.minSize;\r\n\t},\r\n\tafterUpdate: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: noop$1,\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\r\n\t\t// Reset minSize\r\n\t\tme.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\t},\r\n\tafterSetDimensions: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeBuildLabels: noop$1,\r\n\tbuildLabels: function() {\r\n\t\tvar me = this;\r\n\t\tvar labelOpts = me.options.labels || {};\r\n\t\tvar legendItems = helpers$1.callback(labelOpts.generateLabels, [me.chart], me) || [];\r\n\r\n\t\tif (labelOpts.filter) {\r\n\t\t\tlegendItems = legendItems.filter(function(item) {\r\n\t\t\t\treturn labelOpts.filter(item, me.chart.data);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (me.options.reverse) {\r\n\t\t\tlegendItems.reverse();\r\n\t\t}\r\n\r\n\t\tme.legendItems = legendItems;\r\n\t},\r\n\tafterBuildLabels: noop$1,\r\n\r\n\t//\r\n\r\n\tbeforeFit: noop$1,\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar labelOpts = opts.labels;\r\n\t\tvar display = opts.display;\r\n\r\n\t\tvar ctx = me.ctx;\r\n\r\n\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\r\n\t\tvar fontSize = labelFont.size;\r\n\r\n\t\t// Reset hit boxes\r\n\t\tvar hitboxes = me.legendHitBoxes = [];\r\n\r\n\t\tvar minSize = me.minSize;\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\tminSize.width = me.maxWidth; // fill all the width\r\n\t\t\tminSize.height = display ? 10 : 0;\r\n\t\t} else {\r\n\t\t\tminSize.width = display ? 10 : 0;\r\n\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t}\r\n\r\n\t\t// Increase sizes here\r\n\t\tif (!display) {\r\n\t\t\tme.width = minSize.width = me.height = minSize.height = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tctx.font = labelFont.string;\r\n\r\n\t\tif (isHorizontal) {\r\n\t\t\t// Labels\r\n\r\n\t\t\t// Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\r\n\t\t\tvar lineWidths = me.lineWidths = [0];\r\n\t\t\tvar totalHeight = 0;\r\n\r\n\t\t\tctx.textAlign = 'left';\r\n\t\t\tctx.textBaseline = 'middle';\r\n\r\n\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\t\t\tvar width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\r\n\t\t\t\tif (i === 0 || lineWidths[lineWidths.length - 1] + width + 2 * labelOpts.padding > minSize.width) {\r\n\t\t\t\t\ttotalHeight += fontSize + labelOpts.padding;\r\n\t\t\t\t\tlineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: 0,\r\n\t\t\t\t\twidth: width,\r\n\t\t\t\t\theight: fontSize\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlineWidths[lineWidths.length - 1] += width + labelOpts.padding;\r\n\t\t\t});\r\n\r\n\t\t\tminSize.height += totalHeight;\r\n\r\n\t\t} else {\r\n\t\t\tvar vPadding = labelOpts.padding;\r\n\t\t\tvar columnWidths = me.columnWidths = [];\r\n\t\t\tvar columnHeights = me.columnHeights = [];\r\n\t\t\tvar totalWidth = labelOpts.padding;\r\n\t\t\tvar currentColWidth = 0;\r\n\t\t\tvar currentColHeight = 0;\r\n\r\n\t\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\t\t\tvar itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\r\n\t\t\t\t// If too tall, go to new column\r\n\t\t\t\tif (i > 0 && currentColHeight + fontSize + 2 * vPadding > minSize.height) {\r\n\t\t\t\t\ttotalWidth += currentColWidth + labelOpts.padding;\r\n\t\t\t\t\tcolumnWidths.push(currentColWidth); // previous column width\r\n\t\t\t\t\tcolumnHeights.push(currentColHeight);\r\n\t\t\t\t\tcurrentColWidth = 0;\r\n\t\t\t\t\tcurrentColHeight = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get max width\r\n\t\t\t\tcurrentColWidth = Math.max(currentColWidth, itemWidth);\r\n\t\t\t\tcurrentColHeight += fontSize + vPadding;\r\n\r\n\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: 0,\r\n\t\t\t\t\twidth: itemWidth,\r\n\t\t\t\t\theight: fontSize\r\n\t\t\t\t};\r\n\t\t\t});\r\n\r\n\t\t\ttotalWidth += currentColWidth;\r\n\t\t\tcolumnWidths.push(currentColWidth);\r\n\t\t\tcolumnHeights.push(currentColHeight);\r\n\t\t\tminSize.width += totalWidth;\r\n\t\t}\r\n\r\n\t\tme.width = minSize.width;\r\n\t\tme.height = minSize.height;\r\n\t},\r\n\tafterFit: noop$1,\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\r\n\t},\r\n\r\n\t// Actually draw the legend on the canvas\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar labelOpts = opts.labels;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor;\r\n\t\tvar lineDefault = globalDefaults.elements.line;\r\n\t\tvar legendHeight = me.height;\r\n\t\tvar columnHeights = me.columnHeights;\r\n\t\tvar legendWidth = me.width;\r\n\t\tvar lineWidths = me.lineWidths;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar rtlHelper = getRtlHelper$1(opts.rtl, me.left, me.minSize.width);\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar fontColor = valueOrDefault$e(labelOpts.fontColor, globalDefaults.defaultFontColor);\r\n\t\tvar labelFont = helpers$1.options._parseFont(labelOpts);\r\n\t\tvar fontSize = labelFont.size;\r\n\t\tvar cursor;\r\n\r\n\t\t// Canvas setup\r\n\t\tctx.textAlign = rtlHelper.textAlign('left');\r\n\t\tctx.textBaseline = 'middle';\r\n\t\tctx.lineWidth = 0.5;\r\n\t\tctx.strokeStyle = fontColor; // for strikethrough effect\r\n\t\tctx.fillStyle = fontColor; // render in correct colour\r\n\t\tctx.font = labelFont.string;\r\n\r\n\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\r\n\t\tvar hitboxes = me.legendHitBoxes;\r\n\r\n\t\t// current position\r\n\t\tvar drawLegendBox = function(x, y, legendItem) {\r\n\t\t\tif (isNaN(boxWidth) || boxWidth <= 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Set the ctx for the box\r\n\t\t\tctx.save();\r\n\r\n\t\t\tvar lineWidth = valueOrDefault$e(legendItem.lineWidth, lineDefault.borderWidth);\r\n\t\t\tctx.fillStyle = valueOrDefault$e(legendItem.fillStyle, defaultColor);\r\n\t\t\tctx.lineCap = valueOrDefault$e(legendItem.lineCap, lineDefault.borderCapStyle);\r\n\t\t\tctx.lineDashOffset = valueOrDefault$e(legendItem.lineDashOffset, lineDefault.borderDashOffset);\r\n\t\t\tctx.lineJoin = valueOrDefault$e(legendItem.lineJoin, lineDefault.borderJoinStyle);\r\n\t\t\tctx.lineWidth = lineWidth;\r\n\t\t\tctx.strokeStyle = valueOrDefault$e(legendItem.strokeStyle, defaultColor);\r\n\r\n\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\t// IE 9 and 10 do not support line dash\r\n\t\t\t\tctx.setLineDash(valueOrDefault$e(legendItem.lineDash, lineDefault.borderDash));\r\n\t\t\t}\r\n\r\n\t\t\tif (labelOpts && labelOpts.usePointStyle) {\r\n\t\t\t\t// Recalculate x and y for drawPoint() because its expecting\r\n\t\t\t\t// x and y to be center of figure (instead of top left)\r\n\t\t\t\tvar radius = boxWidth * Math.SQRT2 / 2;\r\n\t\t\t\tvar centerX = rtlHelper.xPlus(x, boxWidth / 2);\r\n\t\t\t\tvar centerY = y + fontSize / 2;\r\n\r\n\t\t\t\t// Draw pointStyle as legend symbol\r\n\t\t\t\thelpers$1.canvas.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY, legendItem.rotation);\r\n\t\t\t} else {\r\n\t\t\t\t// Draw box as legend symbol\r\n\t\t\t\tctx.fillRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);\r\n\t\t\t\tif (lineWidth !== 0) {\r\n\t\t\t\t\tctx.strokeRect(rtlHelper.leftForLtr(x, boxWidth), y, boxWidth, fontSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tctx.restore();\r\n\t\t};\r\n\r\n\t\tvar fillText = function(x, y, legendItem, textWidth) {\r\n\t\t\tvar halfFontSize = fontSize / 2;\r\n\t\t\tvar xLeft = rtlHelper.xPlus(x, boxWidth + halfFontSize);\r\n\t\t\tvar yMiddle = y + halfFontSize;\r\n\r\n\t\t\tctx.fillText(legendItem.text, xLeft, yMiddle);\r\n\r\n\t\t\tif (legendItem.hidden) {\r\n\t\t\t\t// Strikethrough the text if hidden\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.lineWidth = 2;\r\n\t\t\t\tctx.moveTo(xLeft, yMiddle);\r\n\t\t\t\tctx.lineTo(rtlHelper.xPlus(xLeft, textWidth), yMiddle);\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar alignmentOffset = function(dimension, blockSize) {\r\n\t\t\tswitch (opts.align) {\r\n\t\t\tcase 'start':\r\n\t\t\t\treturn labelOpts.padding;\r\n\t\t\tcase 'end':\r\n\t\t\t\treturn dimension - blockSize;\r\n\t\t\tdefault: // center\r\n\t\t\t\treturn (dimension - blockSize + labelOpts.padding) / 2;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Horizontal\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tif (isHorizontal) {\r\n\t\t\tcursor = {\r\n\t\t\t\tx: me.left + alignmentOffset(legendWidth, lineWidths[0]),\r\n\t\t\t\ty: me.top + labelOpts.padding,\r\n\t\t\t\tline: 0\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tcursor = {\r\n\t\t\t\tx: me.left + labelOpts.padding,\r\n\t\t\t\ty: me.top + alignmentOffset(legendHeight, columnHeights[0]),\r\n\t\t\t\tline: 0\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\thelpers$1.rtl.overrideTextDirection(me.ctx, opts.textDirection);\r\n\r\n\t\tvar itemHeight = fontSize + labelOpts.padding;\r\n\t\thelpers$1.each(me.legendItems, function(legendItem, i) {\r\n\t\t\tvar textWidth = ctx.measureText(legendItem.text).width;\r\n\t\t\tvar width = boxWidth + (fontSize / 2) + textWidth;\r\n\t\t\tvar x = cursor.x;\r\n\t\t\tvar y = cursor.y;\r\n\r\n\t\t\trtlHelper.setWidth(me.minSize.width);\r\n\r\n\t\t\t// Use (me.left + me.minSize.width) and (me.top + me.minSize.height)\r\n\t\t\t// instead of me.right and me.bottom because me.width and me.height\r\n\t\t\t// may have been changed since me.minSize was calculated\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tif (i > 0 && x + width + labelOpts.padding > me.left + me.minSize.width) {\r\n\t\t\t\t\ty = cursor.y += itemHeight;\r\n\t\t\t\t\tcursor.line++;\r\n\t\t\t\t\tx = cursor.x = me.left + alignmentOffset(legendWidth, lineWidths[cursor.line]);\r\n\t\t\t\t}\r\n\t\t\t} else if (i > 0 && y + itemHeight > me.top + me.minSize.height) {\r\n\t\t\t\tx = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;\r\n\t\t\t\tcursor.line++;\r\n\t\t\t\ty = cursor.y = me.top + alignmentOffset(legendHeight, columnHeights[cursor.line]);\r\n\t\t\t}\r\n\r\n\t\t\tvar realX = rtlHelper.x(x);\r\n\r\n\t\t\tdrawLegendBox(realX, y, legendItem);\r\n\r\n\t\t\thitboxes[i].left = rtlHelper.leftForLtr(realX, hitboxes[i].width);\r\n\t\t\thitboxes[i].top = y;\r\n\r\n\t\t\t// Fill the actual label\r\n\t\t\tfillText(realX, y, legendItem, textWidth);\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tcursor.x += width + labelOpts.padding;\r\n\t\t\t} else {\r\n\t\t\t\tcursor.y += itemHeight;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\thelpers$1.rtl.restoreTextDirection(me.ctx, opts.textDirection);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getLegendItemAt: function(x, y) {\r\n\t\tvar me = this;\r\n\t\tvar i, hitBox, lh;\r\n\r\n\t\tif (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {\r\n\t\t\t// See if we are touching one of the dataset boxes\r\n\t\t\tlh = me.legendHitBoxes;\r\n\t\t\tfor (i = 0; i < lh.length; ++i) {\r\n\t\t\t\thitBox = lh[i];\r\n\r\n\t\t\t\tif (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {\r\n\t\t\t\t\t// Touching an element\r\n\t\t\t\t\treturn me.legendItems[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\t/**\r\n\t * Handle an event\r\n\t * @private\r\n\t * @param {IEvent} event - The event to handle\r\n\t */\r\n\thandleEvent: function(e) {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar type = e.type === 'mouseup' ? 'click' : e.type;\r\n\t\tvar hoveredItem;\r\n\r\n\t\tif (type === 'mousemove') {\r\n\t\t\tif (!opts.onHover && !opts.onLeave) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else if (type === 'click') {\r\n\t\t\tif (!opts.onClick) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Chart event already has relative position in it\r\n\t\thoveredItem = me._getLegendItemAt(e.x, e.y);\r\n\r\n\t\tif (type === 'click') {\r\n\t\t\tif (hoveredItem && opts.onClick) {\r\n\t\t\t\t// use e.native for backwards compatibility\r\n\t\t\t\topts.onClick.call(me, e.native, hoveredItem);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (opts.onLeave && hoveredItem !== me._hoveredItem) {\r\n\t\t\t\tif (me._hoveredItem) {\r\n\t\t\t\t\topts.onLeave.call(me, e.native, me._hoveredItem);\r\n\t\t\t\t}\r\n\t\t\t\tme._hoveredItem = hoveredItem;\r\n\t\t\t}\r\n\r\n\t\t\tif (opts.onHover && hoveredItem) {\r\n\t\t\t\t// use e.native for backwards compatibility\r\n\t\t\t\topts.onHover.call(me, e.native, hoveredItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction createNewLegendAndAttach(chart, legendOpts) {\r\n\tvar legend = new Legend({\r\n\t\tctx: chart.ctx,\r\n\t\toptions: legendOpts,\r\n\t\tchart: chart\r\n\t});\r\n\r\n\tcore_layouts.configure(chart, legend, legendOpts);\r\n\tcore_layouts.addBox(chart, legend);\r\n\tchart.legend = legend;\r\n}\r\n\r\nvar plugin_legend = {\r\n\tid: 'legend',\r\n\r\n\t/**\r\n\t * Backward compatibility: since 2.1.5, the legend is registered as a plugin, making\r\n\t * Chart.Legend obsolete. To avoid a breaking change, we export the Legend as part of\r\n\t * the plugin, which one will be re-exposed in the chart.js file.\r\n\t * https://github.com/chartjs/Chart.js/pull/2640\r\n\t * @private\r\n\t */\r\n\t_element: Legend,\r\n\r\n\tbeforeInit: function(chart) {\r\n\t\tvar legendOpts = chart.options.legend;\r\n\r\n\t\tif (legendOpts) {\r\n\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeUpdate: function(chart) {\r\n\t\tvar legendOpts = chart.options.legend;\r\n\t\tvar legend = chart.legend;\r\n\r\n\t\tif (legendOpts) {\r\n\t\t\thelpers$1.mergeIf(legendOpts, core_defaults.global.legend);\r\n\r\n\t\t\tif (legend) {\r\n\t\t\t\tcore_layouts.configure(chart, legend, legendOpts);\r\n\t\t\t\tlegend.options = legendOpts;\r\n\t\t\t} else {\r\n\t\t\t\tcreateNewLegendAndAttach(chart, legendOpts);\r\n\t\t\t}\r\n\t\t} else if (legend) {\r\n\t\t\tcore_layouts.removeBox(chart, legend);\r\n\t\t\tdelete chart.legend;\r\n\t\t}\r\n\t},\r\n\r\n\tafterEvent: function(chart, e) {\r\n\t\tvar legend = chart.legend;\r\n\t\tif (legend) {\r\n\t\t\tlegend.handleEvent(e);\r\n\t\t}\r\n\t}\r\n};\n\nvar noop$2 = helpers$1.noop;\r\n\r\ncore_defaults._set('global', {\r\n\ttitle: {\r\n\t\tdisplay: false,\r\n\t\tfontStyle: 'bold',\r\n\t\tfullWidth: true,\r\n\t\tpadding: 10,\r\n\t\tposition: 'top',\r\n\t\ttext: '',\r\n\t\tweight: 2000         // by default greater than legend (1000) to be above\r\n\t}\r\n});\r\n\r\n/**\r\n * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required!\r\n */\r\nvar Title = core_element.extend({\r\n\tinitialize: function(config) {\r\n\t\tvar me = this;\r\n\t\thelpers$1.extend(me, config);\r\n\r\n\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\tme.legendHitBoxes = [];\r\n\t},\r\n\r\n\t// These methods are ordered by lifecycle. Utilities then follow.\r\n\r\n\tbeforeUpdate: noop$2,\r\n\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\tvar me = this;\r\n\r\n\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\tme.beforeUpdate();\r\n\r\n\t\t// Absorb the master measurements\r\n\t\tme.maxWidth = maxWidth;\r\n\t\tme.maxHeight = maxHeight;\r\n\t\tme.margins = margins;\r\n\r\n\t\t// Dimensions\r\n\t\tme.beforeSetDimensions();\r\n\t\tme.setDimensions();\r\n\t\tme.afterSetDimensions();\r\n\t\t// Labels\r\n\t\tme.beforeBuildLabels();\r\n\t\tme.buildLabels();\r\n\t\tme.afterBuildLabels();\r\n\r\n\t\t// Fit\r\n\t\tme.beforeFit();\r\n\t\tme.fit();\r\n\t\tme.afterFit();\r\n\t\t//\r\n\t\tme.afterUpdate();\r\n\r\n\t\treturn me.minSize;\r\n\r\n\t},\r\n\tafterUpdate: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeSetDimensions: noop$2,\r\n\tsetDimensions: function() {\r\n\t\tvar me = this;\r\n\t\t// Set the unconstrained dimension before label rotation\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.left = 0;\r\n\t\t\tme.right = me.width;\r\n\t\t} else {\r\n\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t// Reset position before calculating rotation\r\n\t\t\tme.top = 0;\r\n\t\t\tme.bottom = me.height;\r\n\t\t}\r\n\r\n\t\t// Reset padding\r\n\t\tme.paddingLeft = 0;\r\n\t\tme.paddingTop = 0;\r\n\t\tme.paddingRight = 0;\r\n\t\tme.paddingBottom = 0;\r\n\r\n\t\t// Reset minSize\r\n\t\tme.minSize = {\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t};\r\n\t},\r\n\tafterSetDimensions: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeBuildLabels: noop$2,\r\n\tbuildLabels: noop$2,\r\n\tafterBuildLabels: noop$2,\r\n\r\n\t//\r\n\r\n\tbeforeFit: noop$2,\r\n\tfit: function() {\r\n\t\tvar me = this;\r\n\t\tvar opts = me.options;\r\n\t\tvar minSize = me.minSize = {};\r\n\t\tvar isHorizontal = me.isHorizontal();\r\n\t\tvar lineCount, textSize;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\tme.width = minSize.width = me.height = minSize.height = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlineCount = helpers$1.isArray(opts.text) ? opts.text.length : 1;\r\n\t\ttextSize = lineCount * helpers$1.options._parseFont(opts).lineHeight + opts.padding * 2;\r\n\r\n\t\tme.width = minSize.width = isHorizontal ? me.maxWidth : textSize;\r\n\t\tme.height = minSize.height = isHorizontal ? textSize : me.maxHeight;\r\n\t},\r\n\tafterFit: noop$2,\r\n\r\n\t// Shared Methods\r\n\tisHorizontal: function() {\r\n\t\tvar pos = this.options.position;\r\n\t\treturn pos === 'top' || pos === 'bottom';\r\n\t},\r\n\r\n\t// Actually draw the title block on the canvas\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar ctx = me.ctx;\r\n\t\tvar opts = me.options;\r\n\r\n\t\tif (!opts.display) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar fontOpts = helpers$1.options._parseFont(opts);\r\n\t\tvar lineHeight = fontOpts.lineHeight;\r\n\t\tvar offset = lineHeight / 2 + opts.padding;\r\n\t\tvar rotation = 0;\r\n\t\tvar top = me.top;\r\n\t\tvar left = me.left;\r\n\t\tvar bottom = me.bottom;\r\n\t\tvar right = me.right;\r\n\t\tvar maxWidth, titleX, titleY;\r\n\r\n\t\tctx.fillStyle = helpers$1.valueOrDefault(opts.fontColor, core_defaults.global.defaultFontColor); // render in correct colour\r\n\t\tctx.font = fontOpts.string;\r\n\r\n\t\t// Horizontal\r\n\t\tif (me.isHorizontal()) {\r\n\t\t\ttitleX = left + ((right - left) / 2); // midpoint of the width\r\n\t\t\ttitleY = top + offset;\r\n\t\t\tmaxWidth = right - left;\r\n\t\t} else {\r\n\t\t\ttitleX = opts.position === 'left' ? left + offset : right - offset;\r\n\t\t\ttitleY = top + ((bottom - top) / 2);\r\n\t\t\tmaxWidth = bottom - top;\r\n\t\t\trotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(titleX, titleY);\r\n\t\tctx.rotate(rotation);\r\n\t\tctx.textAlign = 'center';\r\n\t\tctx.textBaseline = 'middle';\r\n\r\n\t\tvar text = opts.text;\r\n\t\tif (helpers$1.isArray(text)) {\r\n\t\t\tvar y = 0;\r\n\t\t\tfor (var i = 0; i < text.length; ++i) {\r\n\t\t\t\tctx.fillText(text[i], 0, y, maxWidth);\r\n\t\t\t\ty += lineHeight;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tctx.fillText(text, 0, 0, maxWidth);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\r\n\r\nfunction createNewTitleBlockAndAttach(chart, titleOpts) {\r\n\tvar title = new Title({\r\n\t\tctx: chart.ctx,\r\n\t\toptions: titleOpts,\r\n\t\tchart: chart\r\n\t});\r\n\r\n\tcore_layouts.configure(chart, title, titleOpts);\r\n\tcore_layouts.addBox(chart, title);\r\n\tchart.titleBlock = title;\r\n}\r\n\r\nvar plugin_title = {\r\n\tid: 'title',\r\n\r\n\t/**\r\n\t * Backward compatibility: since 2.1.5, the title is registered as a plugin, making\r\n\t * Chart.Title obsolete. To avoid a breaking change, we export the Title as part of\r\n\t * the plugin, which one will be re-exposed in the chart.js file.\r\n\t * https://github.com/chartjs/Chart.js/pull/2640\r\n\t * @private\r\n\t */\r\n\t_element: Title,\r\n\r\n\tbeforeInit: function(chart) {\r\n\t\tvar titleOpts = chart.options.title;\r\n\r\n\t\tif (titleOpts) {\r\n\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\r\n\t\t}\r\n\t},\r\n\r\n\tbeforeUpdate: function(chart) {\r\n\t\tvar titleOpts = chart.options.title;\r\n\t\tvar titleBlock = chart.titleBlock;\r\n\r\n\t\tif (titleOpts) {\r\n\t\t\thelpers$1.mergeIf(titleOpts, core_defaults.global.title);\r\n\r\n\t\t\tif (titleBlock) {\r\n\t\t\t\tcore_layouts.configure(chart, titleBlock, titleOpts);\r\n\t\t\t\ttitleBlock.options = titleOpts;\r\n\t\t\t} else {\r\n\t\t\t\tcreateNewTitleBlockAndAttach(chart, titleOpts);\r\n\t\t\t}\r\n\t\t} else if (titleBlock) {\r\n\t\t\tcore_layouts.removeBox(chart, titleBlock);\r\n\t\t\tdelete chart.titleBlock;\r\n\t\t}\r\n\t}\r\n};\n\nvar plugins = {};\r\nvar filler = plugin_filler;\r\nvar legend = plugin_legend;\r\nvar title = plugin_title;\nplugins.filler = filler;\nplugins.legend = legend;\nplugins.title = title;\n\n/**\r\n * @namespace Chart\r\n */\r\n\r\n\r\ncore_controller.helpers = helpers$1;\r\n\r\n// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!\r\ncore_helpers();\r\n\r\ncore_controller._adapters = core_adapters;\r\ncore_controller.Animation = core_animation;\r\ncore_controller.animationService = core_animations;\r\ncore_controller.controllers = controllers;\r\ncore_controller.DatasetController = core_datasetController;\r\ncore_controller.defaults = core_defaults;\r\ncore_controller.Element = core_element;\r\ncore_controller.elements = elements;\r\ncore_controller.Interaction = core_interaction;\r\ncore_controller.layouts = core_layouts;\r\ncore_controller.platform = platform;\r\ncore_controller.plugins = core_plugins;\r\ncore_controller.Scale = core_scale;\r\ncore_controller.scaleService = core_scaleService;\r\ncore_controller.Ticks = core_ticks;\r\ncore_controller.Tooltip = core_tooltip;\r\n\r\n// Register built-in scales\r\n\r\ncore_controller.helpers.each(scales, function(scale, type) {\r\n\tcore_controller.scaleService.registerScaleType(type, scale, scale._defaults);\r\n});\r\n\r\n// Load to register built-in adapters (as side effects)\r\n\r\n\r\n// Loading built-in plugins\r\n\r\nfor (var k in plugins) {\r\n\tif (plugins.hasOwnProperty(k)) {\r\n\t\tcore_controller.plugins.register(plugins[k]);\r\n\t}\r\n}\r\n\r\ncore_controller.platform.initialize();\r\n\r\nvar src = core_controller;\r\nif (typeof window !== 'undefined') {\r\n\twindow.Chart = core_controller;\r\n}\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Chart\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Chart = core_controller;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Legend\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Legend = plugins.legend._element;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore\r\n * @namespace Chart.Title\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.Title = plugins.title._element;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.plugins instead\r\n * @namespace Chart.pluginService\r\n * @deprecated since version 2.1.5\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.pluginService = core_controller.plugins;\r\n\r\n/**\r\n * Provided for backward compatibility, inheriting from Chart.PlugingBase has no\r\n * effect, instead simply create/register plugins via plain JavaScript objects.\r\n * @interface Chart.PluginBase\r\n * @deprecated since version 2.5.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.PluginBase = core_controller.Element.extend({});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas instead.\r\n * @namespace Chart.canvasHelpers\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.canvasHelpers = core_controller.helpers.canvas;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.layouts instead.\r\n * @namespace Chart.layoutService\r\n * @deprecated since version 2.7.3\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.layoutService = core_controller.layouts;\r\n\r\n/**\r\n * Provided for backward compatibility, not available anymore.\r\n * @namespace Chart.LinearScaleBase\r\n * @deprecated since version 2.8\r\n * @todo remove at version 3\r\n * @private\r\n */\r\ncore_controller.LinearScaleBase = scale_linearbase;\r\n\r\n/**\r\n * Provided for backward compatibility, instead we should create a new Chart\r\n * by setting the type in the config (`new Chart(id, {type: '{chart-type}'}`).\r\n * @deprecated since version 2.8.0\r\n * @todo remove at version 3\r\n */\r\ncore_controller.helpers.each(\r\n\t[\r\n\t\t'Bar',\r\n\t\t'Bubble',\r\n\t\t'Doughnut',\r\n\t\t'Line',\r\n\t\t'PolarArea',\r\n\t\t'Radar',\r\n\t\t'Scatter'\r\n\t],\r\n\tfunction(klass) {\r\n\t\tcore_controller[klass] = function(ctx, cfg) {\r\n\t\t\treturn new core_controller(ctx, core_controller.helpers.merge(cfg || {}, {\r\n\t\t\t\ttype: klass.charAt(0).toLowerCase() + klass.slice(1)\r\n\t\t\t}));\r\n\t\t};\r\n\t}\r\n);\n\nreturn src;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/chart.js/dist/Chart.js?");

/***/ }),

/***/ "./node_modules/color-name/index.js":
/*!******************************************!*\
  !*** ./node_modules/color-name/index.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/color-name/index.js?");

/***/ }),

/***/ "./node_modules/component-bind/index.js":
/*!**********************************************!*\
  !*** ./node_modules/component-bind/index.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Slice reference.\n */\n\nvar slice = [].slice;\n\n/**\n * Bind `obj` to `fn`.\n *\n * @param {Object} obj\n * @param {Function|String} fn or string\n * @return {Function}\n * @api public\n */\n\nmodule.exports = function(obj, fn){\n  if ('string' == typeof fn) fn = obj[fn];\n  if ('function' != typeof fn) throw new Error('bind() requires a function');\n  var args = slice.call(arguments, 2);\n  return function(){\n    return fn.apply(obj, args.concat(slice.call(arguments)));\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/component-bind/index.js?");

/***/ }),

/***/ "./node_modules/component-emitter/index.js":
/*!*************************************************!*\
  !*** ./node_modules/component-emitter/index.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (true) {\r\n  module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n  if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n  for (var key in Emitter.prototype) {\r\n    obj[key] = Emitter.prototype[key];\r\n  }\r\n  return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n  this._callbacks = this._callbacks || {};\r\n  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n    .push(fn);\r\n  return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n  function on() {\r\n    this.off(event, on);\r\n    fn.apply(this, arguments);\r\n  }\r\n\r\n  on.fn = fn;\r\n  this.on(event, on);\r\n  return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n  this._callbacks = this._callbacks || {};\r\n\r\n  // all\r\n  if (0 == arguments.length) {\r\n    this._callbacks = {};\r\n    return this;\r\n  }\r\n\r\n  // specific event\r\n  var callbacks = this._callbacks['$' + event];\r\n  if (!callbacks) return this;\r\n\r\n  // remove all handlers\r\n  if (1 == arguments.length) {\r\n    delete this._callbacks['$' + event];\r\n    return this;\r\n  }\r\n\r\n  // remove specific handler\r\n  var cb;\r\n  for (var i = 0; i < callbacks.length; i++) {\r\n    cb = callbacks[i];\r\n    if (cb === fn || cb.fn === fn) {\r\n      callbacks.splice(i, 1);\r\n      break;\r\n    }\r\n  }\r\n\r\n  // Remove event specific arrays for event types that no\r\n  // one is subscribed for to avoid memory leak.\r\n  if (callbacks.length === 0) {\r\n    delete this._callbacks['$' + event];\r\n  }\r\n\r\n  return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n  this._callbacks = this._callbacks || {};\r\n\r\n  var args = new Array(arguments.length - 1)\r\n    , callbacks = this._callbacks['$' + event];\r\n\r\n  for (var i = 1; i < arguments.length; i++) {\r\n    args[i - 1] = arguments[i];\r\n  }\r\n\r\n  if (callbacks) {\r\n    callbacks = callbacks.slice(0);\r\n    for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n      callbacks[i].apply(this, args);\r\n    }\r\n  }\r\n\r\n  return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n  this._callbacks = this._callbacks || {};\r\n  return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n  return !! this.listeners(event).length;\r\n};\r\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/component-emitter/index.js?");

/***/ }),

/***/ "./node_modules/component-inherit/index.js":
/*!*************************************************!*\
  !*** ./node_modules/component-inherit/index.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\nmodule.exports = function(a, b){\n  var fn = function(){};\n  fn.prototype = b.prototype;\n  a.prototype = new fn;\n  a.prototype.constructor = a;\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/component-inherit/index.js?");

/***/ }),

/***/ "./node_modules/deepmerge/dist/cjs.js":
/*!********************************************!*\
  !*** ./node_modules/deepmerge/dist/cjs.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/deepmerge/dist/cjs.js?");

/***/ }),

/***/ "./node_modules/desandro-matches-selector/matches-selector.js":
/*!********************************************************************!*\
  !*** ./node_modules/desandro-matches-selector/matches-selector.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * matchesSelector v2.0.2\n * matchesSelector( element, '.selector' )\n * MIT license\n */\n\n/*jshint browser: true, strict: true, undef: true, unused: true */\n\n( function( window, factory ) {\n  /*global define: false, module: false */\n  'use strict';\n  // universal module definition\n  if ( true ) {\n    // AMD\n    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( window, function factory() {\n  'use strict';\n\n  var matchesMethod = ( function() {\n    var ElemProto = window.Element.prototype;\n    // check for the standard method name first\n    if ( ElemProto.matches ) {\n      return 'matches';\n    }\n    // check un-prefixed\n    if ( ElemProto.matchesSelector ) {\n      return 'matchesSelector';\n    }\n    // check vendor prefixes\n    var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];\n\n    for ( var i=0; i < prefixes.length; i++ ) {\n      var prefix = prefixes[i];\n      var method = prefix + 'MatchesSelector';\n      if ( ElemProto[ method ] ) {\n        return method;\n      }\n    }\n  })();\n\n  return function matchesSelector( elem, selector ) {\n    return elem[ matchesMethod ]( selector );\n  };\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/desandro-matches-selector/matches-selector.js?");

/***/ }),

/***/ "./node_modules/diff/dist/diff.js":
/*!****************************************!*\
  !*** ./node_modules/diff/dist/diff.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*!\n\n diff v5.1.0\n\nSoftware License Agreement (BSD License)\n\nCopyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>\n\nAll rights reserved.\n\nRedistribution and use of this software in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above\n  copyright notice, this list of conditions and the\n  following disclaimer.\n\n* Redistributions in binary form must reproduce the above\n  copyright notice, this list of conditions and the\n  following disclaimer in the documentation and/or other\n  materials provided with the distribution.\n\n* Neither the name of Kevin Decker nor the names of its\n  contributors may be used to endorse or promote products\n  derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\nIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n@license\n*/\n(function (global, factory) {\n   true ? factory(exports) :\n  undefined;\n}(this, (function (exports) { 'use strict';\n\n  function Diff() {}\n  Diff.prototype = {\n    diff: function diff(oldString, newString) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var callback = options.callback;\n\n      if (typeof options === 'function') {\n        callback = options;\n        options = {};\n      }\n\n      this.options = options;\n      var self = this;\n\n      function done(value) {\n        if (callback) {\n          setTimeout(function () {\n            callback(undefined, value);\n          }, 0);\n          return true;\n        } else {\n          return value;\n        }\n      } // Allow subclasses to massage the input prior to running\n\n\n      oldString = this.castInput(oldString);\n      newString = this.castInput(newString);\n      oldString = this.removeEmpty(this.tokenize(oldString));\n      newString = this.removeEmpty(this.tokenize(newString));\n      var newLen = newString.length,\n          oldLen = oldString.length;\n      var editLength = 1;\n      var maxEditLength = newLen + oldLen;\n\n      if (options.maxEditLength) {\n        maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n      }\n\n      var bestPath = [{\n        newPos: -1,\n        components: []\n      }]; // Seed editLength = 0, i.e. the content starts with the same values\n\n      var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);\n\n      if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n        // Identity per the equality and tokenizer\n        return done([{\n          value: this.join(newString),\n          count: newString.length\n        }]);\n      } // Main worker method. checks all permutations of a given edit length for acceptance.\n\n\n      function execEditLength() {\n        for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n          var basePath = void 0;\n\n          var addPath = bestPath[diagonalPath - 1],\n              removePath = bestPath[diagonalPath + 1],\n              _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n\n          if (addPath) {\n            // No one else is going to attempt to use this value, clear it\n            bestPath[diagonalPath - 1] = undefined;\n          }\n\n          var canAdd = addPath && addPath.newPos + 1 < newLen,\n              canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;\n\n          if (!canAdd && !canRemove) {\n            // If this path is a terminal then prune\n            bestPath[diagonalPath] = undefined;\n            continue;\n          } // Select the diagonal that we want to branch from. We select the prior\n          // path whose position in the new string is the farthest from the origin\n          // and does not pass the bounds of the diff graph\n\n\n          if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {\n            basePath = clonePath(removePath);\n            self.pushComponent(basePath.components, undefined, true);\n          } else {\n            basePath = addPath; // No need to clone, we've pulled it from the list\n\n            basePath.newPos++;\n            self.pushComponent(basePath.components, true, undefined);\n          }\n\n          _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done\n\n          if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {\n            return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));\n          } else {\n            // Otherwise track this path as a potential candidate and continue.\n            bestPath[diagonalPath] = basePath;\n          }\n        }\n\n        editLength++;\n      } // Performs the length of edit iteration. Is a bit fugly as this has to support the\n      // sync and async mode which is never fun. Loops over execEditLength until a value\n      // is produced, or until the edit length exceeds options.maxEditLength (if given),\n      // in which case it will return undefined.\n\n\n      if (callback) {\n        (function exec() {\n          setTimeout(function () {\n            if (editLength > maxEditLength) {\n              return callback();\n            }\n\n            if (!execEditLength()) {\n              exec();\n            }\n          }, 0);\n        })();\n      } else {\n        while (editLength <= maxEditLength) {\n          var ret = execEditLength();\n\n          if (ret) {\n            return ret;\n          }\n        }\n      }\n    },\n    pushComponent: function pushComponent(components, added, removed) {\n      var last = components[components.length - 1];\n\n      if (last && last.added === added && last.removed === removed) {\n        // We need to clone here as the component clone operation is just\n        // as shallow array clone\n        components[components.length - 1] = {\n          count: last.count + 1,\n          added: added,\n          removed: removed\n        };\n      } else {\n        components.push({\n          count: 1,\n          added: added,\n          removed: removed\n        });\n      }\n    },\n    extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {\n      var newLen = newString.length,\n          oldLen = oldString.length,\n          newPos = basePath.newPos,\n          oldPos = newPos - diagonalPath,\n          commonCount = 0;\n\n      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {\n        newPos++;\n        oldPos++;\n        commonCount++;\n      }\n\n      if (commonCount) {\n        basePath.components.push({\n          count: commonCount\n        });\n      }\n\n      basePath.newPos = newPos;\n      return oldPos;\n    },\n    equals: function equals(left, right) {\n      if (this.options.comparator) {\n        return this.options.comparator(left, right);\n      } else {\n        return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();\n      }\n    },\n    removeEmpty: function removeEmpty(array) {\n      var ret = [];\n\n      for (var i = 0; i < array.length; i++) {\n        if (array[i]) {\n          ret.push(array[i]);\n        }\n      }\n\n      return ret;\n    },\n    castInput: function castInput(value) {\n      return value;\n    },\n    tokenize: function tokenize(value) {\n      return value.split('');\n    },\n    join: function join(chars) {\n      return chars.join('');\n    }\n  };\n\n  function buildValues(diff, components, newString, oldString, useLongestToken) {\n    var componentPos = 0,\n        componentLen = components.length,\n        newPos = 0,\n        oldPos = 0;\n\n    for (; componentPos < componentLen; componentPos++) {\n      var component = components[componentPos];\n\n      if (!component.removed) {\n        if (!component.added && useLongestToken) {\n          var value = newString.slice(newPos, newPos + component.count);\n          value = value.map(function (value, i) {\n            var oldValue = oldString[oldPos + i];\n            return oldValue.length > value.length ? oldValue : value;\n          });\n          component.value = diff.join(value);\n        } else {\n          component.value = diff.join(newString.slice(newPos, newPos + component.count));\n        }\n\n        newPos += component.count; // Common case\n\n        if (!component.added) {\n          oldPos += component.count;\n        }\n      } else {\n        component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));\n        oldPos += component.count; // Reverse add and remove so removes are output first to match common convention\n        // The diffing algorithm is tied to add then remove output and this is the simplest\n        // route to get the desired output with minimal overhead.\n\n        if (componentPos && components[componentPos - 1].added) {\n          var tmp = components[componentPos - 1];\n          components[componentPos - 1] = components[componentPos];\n          components[componentPos] = tmp;\n        }\n      }\n    } // Special case handle for when one terminal is ignored (i.e. whitespace).\n    // For this case we merge the terminal into the prior string and drop the change.\n    // This is only available for string mode.\n\n\n    var lastComponent = components[componentLen - 1];\n\n    if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {\n      components[componentLen - 2].value += lastComponent.value;\n      components.pop();\n    }\n\n    return components;\n  }\n\n  function clonePath(path) {\n    return {\n      newPos: path.newPos,\n      components: path.components.slice(0)\n    };\n  }\n\n  var characterDiff = new Diff();\n  function diffChars(oldStr, newStr, options) {\n    return characterDiff.diff(oldStr, newStr, options);\n  }\n\n  function generateOptions(options, defaults) {\n    if (typeof options === 'function') {\n      defaults.callback = options;\n    } else if (options) {\n      for (var name in options) {\n        /* istanbul ignore else */\n        if (options.hasOwnProperty(name)) {\n          defaults[name] = options[name];\n        }\n      }\n    }\n\n    return defaults;\n  }\n\n  //\n  // Ranges and exceptions:\n  // Latin-1 Supplement, 0080–00FF\n  //  - U+00D7  × Multiplication sign\n  //  - U+00F7  ÷ Division sign\n  // Latin Extended-A, 0100–017F\n  // Latin Extended-B, 0180–024F\n  // IPA Extensions, 0250–02AF\n  // Spacing Modifier Letters, 02B0–02FF\n  //  - U+02C7  ˇ &#711;  Caron\n  //  - U+02D8  ˘ &#728;  Breve\n  //  - U+02D9  ˙ &#729;  Dot Above\n  //  - U+02DA  ˚ &#730;  Ring Above\n  //  - U+02DB  ˛ &#731;  Ogonek\n  //  - U+02DC  ˜ &#732;  Small Tilde\n  //  - U+02DD  ˝ &#733;  Double Acute Accent\n  // Latin Extended Additional, 1E00–1EFF\n\n  var extendedWordChars = /^[A-Za-z\\xC0-\\u02C6\\u02C8-\\u02D7\\u02DE-\\u02FF\\u1E00-\\u1EFF]+$/;\n  var reWhitespace = /\\S/;\n  var wordDiff = new Diff();\n\n  wordDiff.equals = function (left, right) {\n    if (this.options.ignoreCase) {\n      left = left.toLowerCase();\n      right = right.toLowerCase();\n    }\n\n    return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);\n  };\n\n  wordDiff.tokenize = function (value) {\n    // All whitespace symbols except newline group into one token, each newline - in separate token\n    var tokens = value.split(/([^\\S\\r\\n]+|[()[\\]{}'\"\\r\\n]|\\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.\n\n    for (var i = 0; i < tokens.length - 1; i++) {\n      // If we have an empty string in the next field and we have only word chars before and after, merge\n      if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {\n        tokens[i] += tokens[i + 2];\n        tokens.splice(i + 1, 2);\n        i--;\n      }\n    }\n\n    return tokens;\n  };\n\n  function diffWords(oldStr, newStr, options) {\n    options = generateOptions(options, {\n      ignoreWhitespace: true\n    });\n    return wordDiff.diff(oldStr, newStr, options);\n  }\n  function diffWordsWithSpace(oldStr, newStr, options) {\n    return wordDiff.diff(oldStr, newStr, options);\n  }\n\n  var lineDiff = new Diff();\n\n  lineDiff.tokenize = function (value) {\n    var retLines = [],\n        linesAndNewlines = value.split(/(\\n|\\r\\n)/); // Ignore the final empty token that occurs if the string ends with a new line\n\n    if (!linesAndNewlines[linesAndNewlines.length - 1]) {\n      linesAndNewlines.pop();\n    } // Merge the content and line separators into single tokens\n\n\n    for (var i = 0; i < linesAndNewlines.length; i++) {\n      var line = linesAndNewlines[i];\n\n      if (i % 2 && !this.options.newlineIsToken) {\n        retLines[retLines.length - 1] += line;\n      } else {\n        if (this.options.ignoreWhitespace) {\n          line = line.trim();\n        }\n\n        retLines.push(line);\n      }\n    }\n\n    return retLines;\n  };\n\n  function diffLines(oldStr, newStr, callback) {\n    return lineDiff.diff(oldStr, newStr, callback);\n  }\n  function diffTrimmedLines(oldStr, newStr, callback) {\n    var options = generateOptions(callback, {\n      ignoreWhitespace: true\n    });\n    return lineDiff.diff(oldStr, newStr, options);\n  }\n\n  var sentenceDiff = new Diff();\n\n  sentenceDiff.tokenize = function (value) {\n    return value.split(/(\\S.+?[.!?])(?=\\s+|$)/);\n  };\n\n  function diffSentences(oldStr, newStr, callback) {\n    return sentenceDiff.diff(oldStr, newStr, callback);\n  }\n\n  var cssDiff = new Diff();\n\n  cssDiff.tokenize = function (value) {\n    return value.split(/([{}:;,]|\\s+)/);\n  };\n\n  function diffCss(oldStr, newStr, callback) {\n    return cssDiff.diff(oldStr, newStr, callback);\n  }\n\n  function _typeof(obj) {\n    \"@babel/helpers - typeof\";\n\n    if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n      _typeof = function (obj) {\n        return typeof obj;\n      };\n    } else {\n      _typeof = function (obj) {\n        return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n      };\n    }\n\n    return _typeof(obj);\n  }\n\n  function _toConsumableArray(arr) {\n    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n  }\n\n  function _arrayWithoutHoles(arr) {\n    if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n  }\n\n  function _iterableToArray(iter) {\n    if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n  }\n\n  function _unsupportedIterableToArray(o, minLen) {\n    if (!o) return;\n    if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n    var n = Object.prototype.toString.call(o).slice(8, -1);\n    if (n === \"Object\" && o.constructor) n = o.constructor.name;\n    if (n === \"Map\" || n === \"Set\") return Array.from(o);\n    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n  }\n\n  function _arrayLikeToArray(arr, len) {\n    if (len == null || len > arr.length) len = arr.length;\n\n    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n    return arr2;\n  }\n\n  function _nonIterableSpread() {\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  var objectPrototypeToString = Object.prototype.toString;\n  var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a\n  // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:\n\n  jsonDiff.useLongestToken = true;\n  jsonDiff.tokenize = lineDiff.tokenize;\n\n  jsonDiff.castInput = function (value) {\n    var _this$options = this.options,\n        undefinedReplacement = _this$options.undefinedReplacement,\n        _this$options$stringi = _this$options.stringifyReplacer,\n        stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {\n      return typeof v === 'undefined' ? undefinedReplacement : v;\n    } : _this$options$stringi;\n    return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');\n  };\n\n  jsonDiff.equals = function (left, right) {\n    return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\\r\\n])/g, '$1'), right.replace(/,([\\r\\n])/g, '$1'));\n  };\n\n  function diffJson(oldObj, newObj, options) {\n    return jsonDiff.diff(oldObj, newObj, options);\n  } // This function handles the presence of circular references by bailing out when encountering an\n  // object that is already on the \"stack\" of items being processed. Accepts an optional replacer\n\n  function canonicalize(obj, stack, replacementStack, replacer, key) {\n    stack = stack || [];\n    replacementStack = replacementStack || [];\n\n    if (replacer) {\n      obj = replacer(key, obj);\n    }\n\n    var i;\n\n    for (i = 0; i < stack.length; i += 1) {\n      if (stack[i] === obj) {\n        return replacementStack[i];\n      }\n    }\n\n    var canonicalizedObj;\n\n    if ('[object Array]' === objectPrototypeToString.call(obj)) {\n      stack.push(obj);\n      canonicalizedObj = new Array(obj.length);\n      replacementStack.push(canonicalizedObj);\n\n      for (i = 0; i < obj.length; i += 1) {\n        canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n      }\n\n      stack.pop();\n      replacementStack.pop();\n      return canonicalizedObj;\n    }\n\n    if (obj && obj.toJSON) {\n      obj = obj.toJSON();\n    }\n\n    if (_typeof(obj) === 'object' && obj !== null) {\n      stack.push(obj);\n      canonicalizedObj = {};\n      replacementStack.push(canonicalizedObj);\n\n      var sortedKeys = [],\n          _key;\n\n      for (_key in obj) {\n        /* istanbul ignore else */\n        if (obj.hasOwnProperty(_key)) {\n          sortedKeys.push(_key);\n        }\n      }\n\n      sortedKeys.sort();\n\n      for (i = 0; i < sortedKeys.length; i += 1) {\n        _key = sortedKeys[i];\n        canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n      }\n\n      stack.pop();\n      replacementStack.pop();\n    } else {\n      canonicalizedObj = obj;\n    }\n\n    return canonicalizedObj;\n  }\n\n  var arrayDiff = new Diff();\n\n  arrayDiff.tokenize = function (value) {\n    return value.slice();\n  };\n\n  arrayDiff.join = arrayDiff.removeEmpty = function (value) {\n    return value;\n  };\n\n  function diffArrays(oldArr, newArr, callback) {\n    return arrayDiff.diff(oldArr, newArr, callback);\n  }\n\n  function parsePatch(uniDiff) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var diffstr = uniDiff.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n        delimiters = uniDiff.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n        list = [],\n        i = 0;\n\n    function parseIndex() {\n      var index = {};\n      list.push(index); // Parse diff metadata\n\n      while (i < diffstr.length) {\n        var line = diffstr[i]; // File header found, end parsing diff metadata\n\n        if (/^(\\-\\-\\-|\\+\\+\\+|@@)\\s/.test(line)) {\n          break;\n        } // Diff index\n\n\n        var header = /^(?:Index:|diff(?: -r \\w+)+)\\s+(.+?)\\s*$/.exec(line);\n\n        if (header) {\n          index.index = header[1];\n        }\n\n        i++;\n      } // Parse file headers if they are defined. Unified diff requires them, but\n      // there's no technical issues to have an isolated hunk without file header\n\n\n      parseFileHeader(index);\n      parseFileHeader(index); // Parse hunks\n\n      index.hunks = [];\n\n      while (i < diffstr.length) {\n        var _line = diffstr[i];\n\n        if (/^(Index:|diff|\\-\\-\\-|\\+\\+\\+)\\s/.test(_line)) {\n          break;\n        } else if (/^@@/.test(_line)) {\n          index.hunks.push(parseHunk());\n        } else if (_line && options.strict) {\n          // Ignore unexpected content unless in strict mode\n          throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));\n        } else {\n          i++;\n        }\n      }\n    } // Parses the --- and +++ headers, if none are found, no lines\n    // are consumed.\n\n\n    function parseFileHeader(index) {\n      var fileHeader = /^(---|\\+\\+\\+)\\s+(.*)$/.exec(diffstr[i]);\n\n      if (fileHeader) {\n        var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';\n        var data = fileHeader[2].split('\\t', 2);\n        var fileName = data[0].replace(/\\\\\\\\/g, '\\\\');\n\n        if (/^\".*\"$/.test(fileName)) {\n          fileName = fileName.substr(1, fileName.length - 2);\n        }\n\n        index[keyPrefix + 'FileName'] = fileName;\n        index[keyPrefix + 'Header'] = (data[1] || '').trim();\n        i++;\n      }\n    } // Parses a hunk\n    // This assumes that we are at the start of a hunk.\n\n\n    function parseHunk() {\n      var chunkHeaderIndex = i,\n          chunkHeaderLine = diffstr[i++],\n          chunkHeader = chunkHeaderLine.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/);\n      var hunk = {\n        oldStart: +chunkHeader[1],\n        oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],\n        newStart: +chunkHeader[3],\n        newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],\n        lines: [],\n        linedelimiters: []\n      }; // Unified Diff Format quirk: If the chunk size is 0,\n      // the first number is one lower than one would expect.\n      // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n\n      if (hunk.oldLines === 0) {\n        hunk.oldStart += 1;\n      }\n\n      if (hunk.newLines === 0) {\n        hunk.newStart += 1;\n      }\n\n      var addCount = 0,\n          removeCount = 0;\n\n      for (; i < diffstr.length; i++) {\n        // Lines starting with '---' could be mistaken for the \"remove line\" operation\n        // But they could be the header for the next file. Therefore prune such cases out.\n        if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {\n          break;\n        }\n\n        var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];\n\n        if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\\\') {\n          hunk.lines.push(diffstr[i]);\n          hunk.linedelimiters.push(delimiters[i] || '\\n');\n\n          if (operation === '+') {\n            addCount++;\n          } else if (operation === '-') {\n            removeCount++;\n          } else if (operation === ' ') {\n            addCount++;\n            removeCount++;\n          }\n        } else {\n          break;\n        }\n      } // Handle the empty block count case\n\n\n      if (!addCount && hunk.newLines === 1) {\n        hunk.newLines = 0;\n      }\n\n      if (!removeCount && hunk.oldLines === 1) {\n        hunk.oldLines = 0;\n      } // Perform optional sanity checking\n\n\n      if (options.strict) {\n        if (addCount !== hunk.newLines) {\n          throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n        }\n\n        if (removeCount !== hunk.oldLines) {\n          throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n        }\n      }\n\n      return hunk;\n    }\n\n    while (i < diffstr.length) {\n      parseIndex();\n    }\n\n    return list;\n  }\n\n  // Iterator that traverses in the range of [min, max], stepping\n  // by distance from a given start position. I.e. for [0, 4], with\n  // start of 2, this will iterate 2, 3, 1, 4, 0.\n  function distanceIterator (start, minLine, maxLine) {\n    var wantForward = true,\n        backwardExhausted = false,\n        forwardExhausted = false,\n        localOffset = 1;\n    return function iterator() {\n      if (wantForward && !forwardExhausted) {\n        if (backwardExhausted) {\n          localOffset++;\n        } else {\n          wantForward = false;\n        } // Check if trying to fit beyond text length, and if not, check it fits\n        // after offset location (or desired location on first iteration)\n\n\n        if (start + localOffset <= maxLine) {\n          return localOffset;\n        }\n\n        forwardExhausted = true;\n      }\n\n      if (!backwardExhausted) {\n        if (!forwardExhausted) {\n          wantForward = true;\n        } // Check if trying to fit before text beginning, and if not, check it fits\n        // before offset location\n\n\n        if (minLine <= start - localOffset) {\n          return -localOffset++;\n        }\n\n        backwardExhausted = true;\n        return iterator();\n      } // We tried to fit hunk before text beginning and beyond text length, then\n      // hunk can't fit on the text. Return undefined\n\n    };\n  }\n\n  function applyPatch(source, uniDiff) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n    if (typeof uniDiff === 'string') {\n      uniDiff = parsePatch(uniDiff);\n    }\n\n    if (Array.isArray(uniDiff)) {\n      if (uniDiff.length > 1) {\n        throw new Error('applyPatch only works with a single input.');\n      }\n\n      uniDiff = uniDiff[0];\n    } // Apply the diff to the input\n\n\n    var lines = source.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n        delimiters = source.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n        hunks = uniDiff.hunks,\n        compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {\n      return line === patchContent;\n    },\n        errorCount = 0,\n        fuzzFactor = options.fuzzFactor || 0,\n        minLine = 0,\n        offset = 0,\n        removeEOFNL,\n        addEOFNL;\n    /**\n     * Checks if the hunk exactly fits on the provided location\n     */\n\n\n    function hunkFits(hunk, toPos) {\n      for (var j = 0; j < hunk.lines.length; j++) {\n        var line = hunk.lines[j],\n            operation = line.length > 0 ? line[0] : ' ',\n            content = line.length > 0 ? line.substr(1) : line;\n\n        if (operation === ' ' || operation === '-') {\n          // Context sanity check\n          if (!compareLine(toPos + 1, lines[toPos], operation, content)) {\n            errorCount++;\n\n            if (errorCount > fuzzFactor) {\n              return false;\n            }\n          }\n\n          toPos++;\n        }\n      }\n\n      return true;\n    } // Search best fit offsets for each hunk based on the previous ones\n\n\n    for (var i = 0; i < hunks.length; i++) {\n      var hunk = hunks[i],\n          maxLine = lines.length - hunk.oldLines,\n          localOffset = 0,\n          toPos = offset + hunk.oldStart - 1;\n      var iterator = distanceIterator(toPos, minLine, maxLine);\n\n      for (; localOffset !== undefined; localOffset = iterator()) {\n        if (hunkFits(hunk, toPos + localOffset)) {\n          hunk.offset = offset += localOffset;\n          break;\n        }\n      }\n\n      if (localOffset === undefined) {\n        return false;\n      } // Set lower text limit to end of the current hunk, so next ones don't try\n      // to fit over already patched text\n\n\n      minLine = hunk.offset + hunk.oldStart + hunk.oldLines;\n    } // Apply patch hunks\n\n\n    var diffOffset = 0;\n\n    for (var _i = 0; _i < hunks.length; _i++) {\n      var _hunk = hunks[_i],\n          _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;\n\n      diffOffset += _hunk.newLines - _hunk.oldLines;\n\n      for (var j = 0; j < _hunk.lines.length; j++) {\n        var line = _hunk.lines[j],\n            operation = line.length > 0 ? line[0] : ' ',\n            content = line.length > 0 ? line.substr(1) : line,\n            delimiter = _hunk.linedelimiters[j];\n\n        if (operation === ' ') {\n          _toPos++;\n        } else if (operation === '-') {\n          lines.splice(_toPos, 1);\n          delimiters.splice(_toPos, 1);\n          /* istanbul ignore else */\n        } else if (operation === '+') {\n          lines.splice(_toPos, 0, content);\n          delimiters.splice(_toPos, 0, delimiter);\n          _toPos++;\n        } else if (operation === '\\\\') {\n          var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;\n\n          if (previousOperation === '+') {\n            removeEOFNL = true;\n          } else if (previousOperation === '-') {\n            addEOFNL = true;\n          }\n        }\n      }\n    } // Handle EOFNL insertion/removal\n\n\n    if (removeEOFNL) {\n      while (!lines[lines.length - 1]) {\n        lines.pop();\n        delimiters.pop();\n      }\n    } else if (addEOFNL) {\n      lines.push('');\n      delimiters.push('\\n');\n    }\n\n    for (var _k = 0; _k < lines.length - 1; _k++) {\n      lines[_k] = lines[_k] + delimiters[_k];\n    }\n\n    return lines.join('');\n  } // Wrapper that supports multiple file patches via callbacks.\n\n  function applyPatches(uniDiff, options) {\n    if (typeof uniDiff === 'string') {\n      uniDiff = parsePatch(uniDiff);\n    }\n\n    var currentIndex = 0;\n\n    function processIndex() {\n      var index = uniDiff[currentIndex++];\n\n      if (!index) {\n        return options.complete();\n      }\n\n      options.loadFile(index, function (err, data) {\n        if (err) {\n          return options.complete(err);\n        }\n\n        var updatedContent = applyPatch(data, index, options);\n        options.patched(index, updatedContent, function (err) {\n          if (err) {\n            return options.complete(err);\n          }\n\n          processIndex();\n        });\n      });\n    }\n\n    processIndex();\n  }\n\n  function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n    if (!options) {\n      options = {};\n    }\n\n    if (typeof options.context === 'undefined') {\n      options.context = 4;\n    }\n\n    var diff = diffLines(oldStr, newStr, options);\n\n    if (!diff) {\n      return;\n    }\n\n    diff.push({\n      value: '',\n      lines: []\n    }); // Append an empty value to make cleanup easier\n\n    function contextLines(lines) {\n      return lines.map(function (entry) {\n        return ' ' + entry;\n      });\n    }\n\n    var hunks = [];\n    var oldRangeStart = 0,\n        newRangeStart = 0,\n        curRange = [],\n        oldLine = 1,\n        newLine = 1;\n\n    var _loop = function _loop(i) {\n      var current = diff[i],\n          lines = current.lines || current.value.replace(/\\n$/, '').split('\\n');\n      current.lines = lines;\n\n      if (current.added || current.removed) {\n        var _curRange;\n\n        // If we have previous context, start with that\n        if (!oldRangeStart) {\n          var prev = diff[i - 1];\n          oldRangeStart = oldLine;\n          newRangeStart = newLine;\n\n          if (prev) {\n            curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];\n            oldRangeStart -= curRange.length;\n            newRangeStart -= curRange.length;\n          }\n        } // Output our changes\n\n\n        (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {\n          return (current.added ? '+' : '-') + entry;\n        }))); // Track the updated file position\n\n\n        if (current.added) {\n          newLine += lines.length;\n        } else {\n          oldLine += lines.length;\n        }\n      } else {\n        // Identical context lines. Track line changes\n        if (oldRangeStart) {\n          // Close out any changes that have been output (or join overlapping)\n          if (lines.length <= options.context * 2 && i < diff.length - 2) {\n            var _curRange2;\n\n            // Overlapping\n            (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));\n          } else {\n            var _curRange3;\n\n            // end the range and output\n            var contextSize = Math.min(lines.length, options.context);\n\n            (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));\n\n            var hunk = {\n              oldStart: oldRangeStart,\n              oldLines: oldLine - oldRangeStart + contextSize,\n              newStart: newRangeStart,\n              newLines: newLine - newRangeStart + contextSize,\n              lines: curRange\n            };\n\n            if (i >= diff.length - 2 && lines.length <= options.context) {\n              // EOF is inside this hunk\n              var oldEOFNewline = /\\n$/.test(oldStr);\n              var newEOFNewline = /\\n$/.test(newStr);\n              var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;\n\n              if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {\n                // special case: old has no eol and no trailing context; no-nl can end up before adds\n                // however, if the old file is empty, do not output the no-nl line\n                curRange.splice(hunk.oldLines, 0, '\\\\ No newline at end of file');\n              }\n\n              if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {\n                curRange.push('\\\\ No newline at end of file');\n              }\n            }\n\n            hunks.push(hunk);\n            oldRangeStart = 0;\n            newRangeStart = 0;\n            curRange = [];\n          }\n        }\n\n        oldLine += lines.length;\n        newLine += lines.length;\n      }\n    };\n\n    for (var i = 0; i < diff.length; i++) {\n      _loop(i);\n    }\n\n    return {\n      oldFileName: oldFileName,\n      newFileName: newFileName,\n      oldHeader: oldHeader,\n      newHeader: newHeader,\n      hunks: hunks\n    };\n  }\n  function formatPatch(diff) {\n    var ret = [];\n\n    if (diff.oldFileName == diff.newFileName) {\n      ret.push('Index: ' + diff.oldFileName);\n    }\n\n    ret.push('===================================================================');\n    ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\\t' + diff.oldHeader));\n    ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\\t' + diff.newHeader));\n\n    for (var i = 0; i < diff.hunks.length; i++) {\n      var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,\n      // the first number is one lower than one would expect.\n      // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n\n      if (hunk.oldLines === 0) {\n        hunk.oldStart -= 1;\n      }\n\n      if (hunk.newLines === 0) {\n        hunk.newStart -= 1;\n      }\n\n      ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');\n      ret.push.apply(ret, hunk.lines);\n    }\n\n    return ret.join('\\n') + '\\n';\n  }\n  function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n    return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));\n  }\n  function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {\n    return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);\n  }\n\n  function arrayEqual(a, b) {\n    if (a.length !== b.length) {\n      return false;\n    }\n\n    return arrayStartsWith(a, b);\n  }\n  function arrayStartsWith(array, start) {\n    if (start.length > array.length) {\n      return false;\n    }\n\n    for (var i = 0; i < start.length; i++) {\n      if (start[i] !== array[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  function calcLineCount(hunk) {\n    var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),\n        oldLines = _calcOldNewLineCount.oldLines,\n        newLines = _calcOldNewLineCount.newLines;\n\n    if (oldLines !== undefined) {\n      hunk.oldLines = oldLines;\n    } else {\n      delete hunk.oldLines;\n    }\n\n    if (newLines !== undefined) {\n      hunk.newLines = newLines;\n    } else {\n      delete hunk.newLines;\n    }\n  }\n  function merge(mine, theirs, base) {\n    mine = loadPatch(mine, base);\n    theirs = loadPatch(theirs, base);\n    var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.\n    // Leaving sanity checks on this to the API consumer that may know more about the\n    // meaning in their own context.\n\n    if (mine.index || theirs.index) {\n      ret.index = mine.index || theirs.index;\n    }\n\n    if (mine.newFileName || theirs.newFileName) {\n      if (!fileNameChanged(mine)) {\n        // No header or no change in ours, use theirs (and ours if theirs does not exist)\n        ret.oldFileName = theirs.oldFileName || mine.oldFileName;\n        ret.newFileName = theirs.newFileName || mine.newFileName;\n        ret.oldHeader = theirs.oldHeader || mine.oldHeader;\n        ret.newHeader = theirs.newHeader || mine.newHeader;\n      } else if (!fileNameChanged(theirs)) {\n        // No header or no change in theirs, use ours\n        ret.oldFileName = mine.oldFileName;\n        ret.newFileName = mine.newFileName;\n        ret.oldHeader = mine.oldHeader;\n        ret.newHeader = mine.newHeader;\n      } else {\n        // Both changed... figure it out\n        ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);\n        ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);\n        ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);\n        ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);\n      }\n    }\n\n    ret.hunks = [];\n    var mineIndex = 0,\n        theirsIndex = 0,\n        mineOffset = 0,\n        theirsOffset = 0;\n\n    while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {\n      var mineCurrent = mine.hunks[mineIndex] || {\n        oldStart: Infinity\n      },\n          theirsCurrent = theirs.hunks[theirsIndex] || {\n        oldStart: Infinity\n      };\n\n      if (hunkBefore(mineCurrent, theirsCurrent)) {\n        // This patch does not overlap with any of the others, yay.\n        ret.hunks.push(cloneHunk(mineCurrent, mineOffset));\n        mineIndex++;\n        theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;\n      } else if (hunkBefore(theirsCurrent, mineCurrent)) {\n        // This patch does not overlap with any of the others, yay.\n        ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));\n        theirsIndex++;\n        mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;\n      } else {\n        // Overlap, merge as best we can\n        var mergedHunk = {\n          oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),\n          oldLines: 0,\n          newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),\n          newLines: 0,\n          lines: []\n        };\n        mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);\n        theirsIndex++;\n        mineIndex++;\n        ret.hunks.push(mergedHunk);\n      }\n    }\n\n    return ret;\n  }\n\n  function loadPatch(param, base) {\n    if (typeof param === 'string') {\n      if (/^@@/m.test(param) || /^Index:/m.test(param)) {\n        return parsePatch(param)[0];\n      }\n\n      if (!base) {\n        throw new Error('Must provide a base reference or pass in a patch');\n      }\n\n      return structuredPatch(undefined, undefined, base, param);\n    }\n\n    return param;\n  }\n\n  function fileNameChanged(patch) {\n    return patch.newFileName && patch.newFileName !== patch.oldFileName;\n  }\n\n  function selectField(index, mine, theirs) {\n    if (mine === theirs) {\n      return mine;\n    } else {\n      index.conflict = true;\n      return {\n        mine: mine,\n        theirs: theirs\n      };\n    }\n  }\n\n  function hunkBefore(test, check) {\n    return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;\n  }\n\n  function cloneHunk(hunk, offset) {\n    return {\n      oldStart: hunk.oldStart,\n      oldLines: hunk.oldLines,\n      newStart: hunk.newStart + offset,\n      newLines: hunk.newLines,\n      lines: hunk.lines\n    };\n  }\n\n  function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {\n    // This will generally result in a conflicted hunk, but there are cases where the context\n    // is the only overlap where we can successfully merge the content here.\n    var mine = {\n      offset: mineOffset,\n      lines: mineLines,\n      index: 0\n    },\n        their = {\n      offset: theirOffset,\n      lines: theirLines,\n      index: 0\n    }; // Handle any leading content\n\n    insertLeading(hunk, mine, their);\n    insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.\n\n    while (mine.index < mine.lines.length && their.index < their.lines.length) {\n      var mineCurrent = mine.lines[mine.index],\n          theirCurrent = their.lines[their.index];\n\n      if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {\n        // Both modified ...\n        mutualChange(hunk, mine, their);\n      } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {\n        var _hunk$lines;\n\n        // Mine inserted\n        (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));\n      } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {\n        var _hunk$lines2;\n\n        // Theirs inserted\n        (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));\n      } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {\n        // Mine removed or edited\n        removal(hunk, mine, their);\n      } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {\n        // Their removed or edited\n        removal(hunk, their, mine, true);\n      } else if (mineCurrent === theirCurrent) {\n        // Context identity\n        hunk.lines.push(mineCurrent);\n        mine.index++;\n        their.index++;\n      } else {\n        // Context mismatch\n        conflict(hunk, collectChange(mine), collectChange(their));\n      }\n    } // Now push anything that may be remaining\n\n\n    insertTrailing(hunk, mine);\n    insertTrailing(hunk, their);\n    calcLineCount(hunk);\n  }\n\n  function mutualChange(hunk, mine, their) {\n    var myChanges = collectChange(mine),\n        theirChanges = collectChange(their);\n\n    if (allRemoves(myChanges) && allRemoves(theirChanges)) {\n      // Special case for remove changes that are supersets of one another\n      if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {\n        var _hunk$lines3;\n\n        (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));\n\n        return;\n      } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {\n        var _hunk$lines4;\n\n        (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));\n\n        return;\n      }\n    } else if (arrayEqual(myChanges, theirChanges)) {\n      var _hunk$lines5;\n\n      (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));\n\n      return;\n    }\n\n    conflict(hunk, myChanges, theirChanges);\n  }\n\n  function removal(hunk, mine, their, swap) {\n    var myChanges = collectChange(mine),\n        theirChanges = collectContext(their, myChanges);\n\n    if (theirChanges.merged) {\n      var _hunk$lines6;\n\n      (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));\n    } else {\n      conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);\n    }\n  }\n\n  function conflict(hunk, mine, their) {\n    hunk.conflict = true;\n    hunk.lines.push({\n      conflict: true,\n      mine: mine,\n      theirs: their\n    });\n  }\n\n  function insertLeading(hunk, insert, their) {\n    while (insert.offset < their.offset && insert.index < insert.lines.length) {\n      var line = insert.lines[insert.index++];\n      hunk.lines.push(line);\n      insert.offset++;\n    }\n  }\n\n  function insertTrailing(hunk, insert) {\n    while (insert.index < insert.lines.length) {\n      var line = insert.lines[insert.index++];\n      hunk.lines.push(line);\n    }\n  }\n\n  function collectChange(state) {\n    var ret = [],\n        operation = state.lines[state.index][0];\n\n    while (state.index < state.lines.length) {\n      var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one \"atomic\" modify change.\n\n      if (operation === '-' && line[0] === '+') {\n        operation = '+';\n      }\n\n      if (operation === line[0]) {\n        ret.push(line);\n        state.index++;\n      } else {\n        break;\n      }\n    }\n\n    return ret;\n  }\n\n  function collectContext(state, matchChanges) {\n    var changes = [],\n        merged = [],\n        matchIndex = 0,\n        contextChanges = false,\n        conflicted = false;\n\n    while (matchIndex < matchChanges.length && state.index < state.lines.length) {\n      var change = state.lines[state.index],\n          match = matchChanges[matchIndex]; // Once we've hit our add, then we are done\n\n      if (match[0] === '+') {\n        break;\n      }\n\n      contextChanges = contextChanges || change[0] !== ' ';\n      merged.push(match);\n      matchIndex++; // Consume any additions in the other block as a conflict to attempt\n      // to pull in the remaining context after this\n\n      if (change[0] === '+') {\n        conflicted = true;\n\n        while (change[0] === '+') {\n          changes.push(change);\n          change = state.lines[++state.index];\n        }\n      }\n\n      if (match.substr(1) === change.substr(1)) {\n        changes.push(change);\n        state.index++;\n      } else {\n        conflicted = true;\n      }\n    }\n\n    if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {\n      conflicted = true;\n    }\n\n    if (conflicted) {\n      return changes;\n    }\n\n    while (matchIndex < matchChanges.length) {\n      merged.push(matchChanges[matchIndex++]);\n    }\n\n    return {\n      merged: merged,\n      changes: changes\n    };\n  }\n\n  function allRemoves(changes) {\n    return changes.reduce(function (prev, change) {\n      return prev && change[0] === '-';\n    }, true);\n  }\n\n  function skipRemoveSuperset(state, removeChanges, delta) {\n    for (var i = 0; i < delta; i++) {\n      var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);\n\n      if (state.lines[state.index + i] !== ' ' + changeContent) {\n        return false;\n      }\n    }\n\n    state.index += delta;\n    return true;\n  }\n\n  function calcOldNewLineCount(lines) {\n    var oldLines = 0;\n    var newLines = 0;\n    lines.forEach(function (line) {\n      if (typeof line !== 'string') {\n        var myCount = calcOldNewLineCount(line.mine);\n        var theirCount = calcOldNewLineCount(line.theirs);\n\n        if (oldLines !== undefined) {\n          if (myCount.oldLines === theirCount.oldLines) {\n            oldLines += myCount.oldLines;\n          } else {\n            oldLines = undefined;\n          }\n        }\n\n        if (newLines !== undefined) {\n          if (myCount.newLines === theirCount.newLines) {\n            newLines += myCount.newLines;\n          } else {\n            newLines = undefined;\n          }\n        }\n      } else {\n        if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {\n          newLines++;\n        }\n\n        if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {\n          oldLines++;\n        }\n      }\n    });\n    return {\n      oldLines: oldLines,\n      newLines: newLines\n    };\n  }\n\n  // See: http://code.google.com/p/google-diff-match-patch/wiki/API\n  function convertChangesToDMP(changes) {\n    var ret = [],\n        change,\n        operation;\n\n    for (var i = 0; i < changes.length; i++) {\n      change = changes[i];\n\n      if (change.added) {\n        operation = 1;\n      } else if (change.removed) {\n        operation = -1;\n      } else {\n        operation = 0;\n      }\n\n      ret.push([operation, change.value]);\n    }\n\n    return ret;\n  }\n\n  function convertChangesToXML(changes) {\n    var ret = [];\n\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n\n      if (change.added) {\n        ret.push('<ins>');\n      } else if (change.removed) {\n        ret.push('<del>');\n      }\n\n      ret.push(escapeHTML(change.value));\n\n      if (change.added) {\n        ret.push('</ins>');\n      } else if (change.removed) {\n        ret.push('</del>');\n      }\n    }\n\n    return ret.join('');\n  }\n\n  function escapeHTML(s) {\n    var n = s;\n    n = n.replace(/&/g, '&amp;');\n    n = n.replace(/</g, '&lt;');\n    n = n.replace(/>/g, '&gt;');\n    n = n.replace(/\"/g, '&quot;');\n    return n;\n  }\n\n  exports.Diff = Diff;\n  exports.applyPatch = applyPatch;\n  exports.applyPatches = applyPatches;\n  exports.canonicalize = canonicalize;\n  exports.convertChangesToDMP = convertChangesToDMP;\n  exports.convertChangesToXML = convertChangesToXML;\n  exports.createPatch = createPatch;\n  exports.createTwoFilesPatch = createTwoFilesPatch;\n  exports.diffArrays = diffArrays;\n  exports.diffChars = diffChars;\n  exports.diffCss = diffCss;\n  exports.diffJson = diffJson;\n  exports.diffLines = diffLines;\n  exports.diffSentences = diffSentences;\n  exports.diffTrimmedLines = diffTrimmedLines;\n  exports.diffWords = diffWords;\n  exports.diffWordsWithSpace = diffWordsWithSpace;\n  exports.merge = merge;\n  exports.parsePatch = parsePatch;\n  exports.structuredPatch = structuredPatch;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/diff/dist/diff.js?");

/***/ }),

/***/ "./node_modules/dom7/dist/dom7.module.js":
/*!***********************************************************!*\
  !*** ./node_modules/dom7/dist/dom7.module.js + 1 modules ***!
  \***********************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js\nvar createClass = __webpack_require__(\"./node_modules/@babel/runtime/helpers/createClass.js\");\nvar createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js\nvar classCallCheck = __webpack_require__(\"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\nvar classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js\nvar helpers_typeof = __webpack_require__(\"./node_modules/@babel/runtime/helpers/typeof.js\");\nvar typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);\n\n// CONCATENATED MODULE: ./node_modules/dom7/node_modules/ssr-window/dist/ssr-window.esm.js\n\n/**\n * SSR Window 2.0.0\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2020, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: May 12, 2020\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n  return obj !== null && typeof_default()(obj) === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n  if (target === void 0) {\n    target = {};\n  }\n  if (src === void 0) {\n    src = {};\n  }\n  Object.keys(src).forEach(function (key) {\n    if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n      extend(target[key], src[key]);\n    }\n  });\n}\nvar doc = typeof document !== 'undefined' ? document : {};\nvar ssrDocument = {\n  body: {},\n  addEventListener: function addEventListener() {},\n  removeEventListener: function removeEventListener() {},\n  activeElement: {\n    blur: function blur() {},\n    nodeName: ''\n  },\n  querySelector: function querySelector() {\n    return null;\n  },\n  querySelectorAll: function querySelectorAll() {\n    return [];\n  },\n  getElementById: function getElementById() {\n    return null;\n  },\n  createEvent: function createEvent() {\n    return {\n      initEvent: function initEvent() {}\n    };\n  },\n  createElement: function createElement() {\n    return {\n      children: [],\n      childNodes: [],\n      style: {},\n      setAttribute: function setAttribute() {},\n      getElementsByTagName: function getElementsByTagName() {\n        return [];\n      }\n    };\n  },\n  createElementNS: function createElementNS() {\n    return {};\n  },\n  importNode: function importNode() {\n    return null;\n  },\n  location: {\n    hash: '',\n    host: '',\n    hostname: '',\n    href: '',\n    origin: '',\n    pathname: '',\n    protocol: '',\n    search: ''\n  }\n};\nextend(doc, ssrDocument);\nvar win = typeof window !== 'undefined' ? window : {};\nvar ssrWindow = {\n  document: ssrDocument,\n  navigator: {\n    userAgent: ''\n  },\n  location: {\n    hash: '',\n    host: '',\n    hostname: '',\n    href: '',\n    origin: '',\n    pathname: '',\n    protocol: '',\n    search: ''\n  },\n  history: {\n    replaceState: function replaceState() {},\n    pushState: function pushState() {},\n    go: function go() {},\n    back: function back() {}\n  },\n  CustomEvent: function CustomEvent() {\n    return this;\n  },\n  addEventListener: function addEventListener() {},\n  removeEventListener: function removeEventListener() {},\n  getComputedStyle: function getComputedStyle() {\n    return {\n      getPropertyValue: function getPropertyValue() {\n        return '';\n      }\n    };\n  },\n  Image: function Image() {},\n  Date: function Date() {},\n  screen: {},\n  setTimeout: function setTimeout() {},\n  clearTimeout: function clearTimeout() {},\n  matchMedia: function matchMedia() {\n    return {};\n  }\n};\nextend(win, ssrWindow);\n\n// CONCATENATED MODULE: ./node_modules/dom7/dist/dom7.module.js\n\n\n/**\n * Dom7 2.1.5\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * http://framework7.io/docs/dom.html\n *\n * Copyright 2020, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: May 15, 2020\n */\n\nvar dom7_module_Dom7 = /*#__PURE__*/createClass_default()(function Dom7(arr) {\n  classCallCheck_default()(this, Dom7);\n  var self = this;\n  // Create array-like object\n  for (var i = 0; i < arr.length; i += 1) {\n    self[i] = arr[i];\n  }\n  self.length = arr.length;\n  // Return collection with methods\n  return this;\n});\nfunction $(selector, context) {\n  var arr = [];\n  var i = 0;\n  if (selector && !context) {\n    if (selector instanceof dom7_module_Dom7) {\n      return selector;\n    }\n  }\n  if (selector) {\n    // String\n    if (typeof selector === 'string') {\n      var els;\n      var tempParent;\n      var _html = selector.trim();\n      if (_html.indexOf('<') >= 0 && _html.indexOf('>') >= 0) {\n        var toCreate = 'div';\n        if (_html.indexOf('<li') === 0) toCreate = 'ul';\n        if (_html.indexOf('<tr') === 0) toCreate = 'tbody';\n        if (_html.indexOf('<td') === 0 || _html.indexOf('<th') === 0) toCreate = 'tr';\n        if (_html.indexOf('<tbody') === 0) toCreate = 'table';\n        if (_html.indexOf('<option') === 0) toCreate = 'select';\n        tempParent = doc.createElement(toCreate);\n        tempParent.innerHTML = _html;\n        for (i = 0; i < tempParent.childNodes.length; i += 1) {\n          arr.push(tempParent.childNodes[i]);\n        }\n      } else {\n        if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {\n          // Pure ID selector\n          els = [doc.getElementById(selector.trim().split('#')[1])];\n        } else {\n          // Other selectors\n          els = (context || doc).querySelectorAll(selector.trim());\n        }\n        for (i = 0; i < els.length; i += 1) {\n          if (els[i]) arr.push(els[i]);\n        }\n      }\n    } else if (selector.nodeType || selector === win || selector === doc) {\n      // Node/element\n      arr.push(selector);\n    } else if (selector.length > 0 && selector[0].nodeType) {\n      // Array of elements or instance of Dom\n      for (i = 0; i < selector.length; i += 1) {\n        arr.push(selector[i]);\n      }\n    }\n  }\n  return new dom7_module_Dom7(arr);\n}\n$.fn = dom7_module_Dom7.prototype;\n$.Class = dom7_module_Dom7;\n$.Dom7 = dom7_module_Dom7;\nfunction unique(arr) {\n  var uniqueArray = [];\n  for (var i = 0; i < arr.length; i += 1) {\n    if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n  }\n  return uniqueArray;\n}\nfunction toCamelCase(string) {\n  return string.toLowerCase().replace(/-(.)/g, function (match, group1) {\n    return group1.toUpperCase();\n  });\n}\nfunction requestAnimationFrame(callback) {\n  if (win.requestAnimationFrame) return win.requestAnimationFrame(callback);else if (win.webkitRequestAnimationFrame) return win.webkitRequestAnimationFrame(callback);\n  return win.setTimeout(callback, 1000 / 60);\n}\nfunction cancelAnimationFrame(id) {\n  if (win.cancelAnimationFrame) return win.cancelAnimationFrame(id);else if (win.webkitCancelAnimationFrame) return win.webkitCancelAnimationFrame(id);\n  return win.clearTimeout(id);\n}\n\n// Classes and attributes\nfunction addClass(className) {\n  if (typeof className === 'undefined') {\n    return this;\n  }\n  var classes = className.split(' ');\n  for (var i = 0; i < classes.length; i += 1) {\n    for (var j = 0; j < this.length; j += 1) {\n      if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.add(classes[i]);\n    }\n  }\n  return this;\n}\nfunction removeClass(className) {\n  var classes = className.split(' ');\n  for (var i = 0; i < classes.length; i += 1) {\n    for (var j = 0; j < this.length; j += 1) {\n      if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.remove(classes[i]);\n    }\n  }\n  return this;\n}\nfunction hasClass(className) {\n  if (!this[0]) return false;\n  return this[0].classList.contains(className);\n}\nfunction toggleClass(className) {\n  var classes = className.split(' ');\n  for (var i = 0; i < classes.length; i += 1) {\n    for (var j = 0; j < this.length; j += 1) {\n      if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.toggle(classes[i]);\n    }\n  }\n  return this;\n}\nfunction attr(attrs, value) {\n  if (arguments.length === 1 && typeof attrs === 'string') {\n    // Get attr\n    if (this[0]) return this[0].getAttribute(attrs);\n    return undefined;\n  }\n\n  // Set attrs\n  for (var i = 0; i < this.length; i += 1) {\n    if (arguments.length === 2) {\n      // String\n      this[i].setAttribute(attrs, value);\n    } else {\n      // Object\n      // eslint-disable-next-line\n      for (var attrName in attrs) {\n        this[i][attrName] = attrs[attrName];\n        this[i].setAttribute(attrName, attrs[attrName]);\n      }\n    }\n  }\n  return this;\n}\n// eslint-disable-next-line\nfunction removeAttr(attr) {\n  for (var i = 0; i < this.length; i += 1) {\n    this[i].removeAttribute(attr);\n  }\n  return this;\n}\n// eslint-disable-next-line\nfunction dom7_module_prop(props, value) {\n  if (arguments.length === 1 && typeof props === 'string') {\n    // Get prop\n    if (this[0]) return this[0][props];\n  } else {\n    // Set props\n    for (var i = 0; i < this.length; i += 1) {\n      if (arguments.length === 2) {\n        // String\n        this[i][props] = value;\n      } else {\n        // Object\n        // eslint-disable-next-line\n        for (var propName in props) {\n          this[i][propName] = props[propName];\n        }\n      }\n    }\n    return this;\n  }\n}\nfunction data(key, value) {\n  var el;\n  if (typeof value === 'undefined') {\n    el = this[0];\n    // Get value\n    if (el) {\n      if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n        return el.dom7ElementDataStorage[key];\n      }\n      var dataKey = el.getAttribute(\"data-\".concat(key));\n      if (dataKey) {\n        return dataKey;\n      }\n      return undefined;\n    }\n    return undefined;\n  }\n\n  // Set value\n  for (var i = 0; i < this.length; i += 1) {\n    el = this[i];\n    if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n    el.dom7ElementDataStorage[key] = value;\n  }\n  return this;\n}\nfunction removeData(key) {\n  for (var i = 0; i < this.length; i += 1) {\n    var el = this[i];\n    if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n      el.dom7ElementDataStorage[key] = null;\n      delete el.dom7ElementDataStorage[key];\n    }\n  }\n}\nfunction dataset() {\n  var el = this[0];\n  if (!el) return undefined;\n  var dataset = {}; // eslint-disable-line\n  if (el.dataset) {\n    // eslint-disable-next-line\n    for (var dataKey in el.dataset) {\n      dataset[dataKey] = el.dataset[dataKey];\n    }\n  } else {\n    for (var i = 0; i < el.attributes.length; i += 1) {\n      // eslint-disable-next-line\n      var _attr = el.attributes[i];\n      if (_attr.name.indexOf('data-') >= 0) {\n        dataset[toCamelCase(_attr.name.split('data-')[1])] = _attr.value;\n      }\n    }\n  }\n  // eslint-disable-next-line\n  for (var key in dataset) {\n    if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n  }\n  return dataset;\n}\nfunction val(value) {\n  var dom = this;\n  if (typeof value === 'undefined') {\n    if (dom[0]) {\n      if (dom[0].multiple && dom[0].nodeName.toLowerCase() === 'select') {\n        var values = [];\n        for (var i = 0; i < dom[0].selectedOptions.length; i += 1) {\n          values.push(dom[0].selectedOptions[i].value);\n        }\n        return values;\n      }\n      return dom[0].value;\n    }\n    return undefined;\n  }\n  for (var _i = 0; _i < dom.length; _i += 1) {\n    var el = dom[_i];\n    if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n      for (var j = 0; j < el.options.length; j += 1) {\n        el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n      }\n    } else {\n      el.value = value;\n    }\n  }\n  return dom;\n}\n// Transforms\n// eslint-disable-next-line\nfunction transform(transform) {\n  for (var i = 0; i < this.length; i += 1) {\n    var elStyle = this[i].style;\n    elStyle.webkitTransform = transform;\n    elStyle.transform = transform;\n  }\n  return this;\n}\nfunction transition(duration) {\n  if (typeof duration !== 'string') {\n    duration = \"\".concat(duration, \"ms\"); // eslint-disable-line\n  }\n  for (var i = 0; i < this.length; i += 1) {\n    var elStyle = this[i].style;\n    elStyle.webkitTransitionDuration = duration;\n    elStyle.transitionDuration = duration;\n  }\n  return this;\n}\n// Events\nfunction on() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  var eventType = args[0],\n    targetSelector = args[1],\n    listener = args[2],\n    capture = args[3];\n  if (typeof args[1] === 'function') {\n    eventType = args[0];\n    listener = args[1];\n    capture = args[2];\n    targetSelector = undefined;\n  }\n  if (!capture) capture = false;\n  function handleLiveEvent(e) {\n    var target = e.target;\n    if (!target) return;\n    var eventData = e.target.dom7EventData || [];\n    if (eventData.indexOf(e) < 0) {\n      eventData.unshift(e);\n    }\n    if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n      var _parents = $(target).parents(); // eslint-disable-line\n      for (var k = 0; k < _parents.length; k += 1) {\n        if ($(_parents[k]).is(targetSelector)) listener.apply(_parents[k], eventData);\n      }\n    }\n  }\n  function handleEvent(e) {\n    var eventData = e && e.target ? e.target.dom7EventData || [] : [];\n    if (eventData.indexOf(e) < 0) {\n      eventData.unshift(e);\n    }\n    listener.apply(this, eventData);\n  }\n  var events = eventType.split(' ');\n  var j;\n  for (var i = 0; i < this.length; i += 1) {\n    var el = this[i];\n    if (!targetSelector) {\n      for (j = 0; j < events.length; j += 1) {\n        var event = events[j];\n        if (!el.dom7Listeners) el.dom7Listeners = {};\n        if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n        el.dom7Listeners[event].push({\n          listener: listener,\n          proxyListener: handleEvent\n        });\n        el.addEventListener(event, handleEvent, capture);\n      }\n    } else {\n      // Live events\n      for (j = 0; j < events.length; j += 1) {\n        var _event = events[j];\n        if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n        if (!el.dom7LiveListeners[_event]) el.dom7LiveListeners[_event] = [];\n        el.dom7LiveListeners[_event].push({\n          listener: listener,\n          proxyListener: handleLiveEvent\n        });\n        el.addEventListener(_event, handleLiveEvent, capture);\n      }\n    }\n  }\n  return this;\n}\nfunction off() {\n  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    args[_key2] = arguments[_key2];\n  }\n  var eventType = args[0],\n    targetSelector = args[1],\n    listener = args[2],\n    capture = args[3];\n  if (typeof args[1] === 'function') {\n    eventType = args[0];\n    listener = args[1];\n    capture = args[2];\n    targetSelector = undefined;\n  }\n  if (!capture) capture = false;\n  var events = eventType.split(' ');\n  for (var i = 0; i < events.length; i += 1) {\n    var event = events[i];\n    for (var j = 0; j < this.length; j += 1) {\n      var el = this[j];\n      var handlers = void 0;\n      if (!targetSelector && el.dom7Listeners) {\n        handlers = el.dom7Listeners[event];\n      } else if (targetSelector && el.dom7LiveListeners) {\n        handlers = el.dom7LiveListeners[event];\n      }\n      if (handlers && handlers.length) {\n        for (var k = handlers.length - 1; k >= 0; k -= 1) {\n          var handler = handlers[k];\n          if (listener && handler.listener === listener) {\n            el.removeEventListener(event, handler.proxyListener, capture);\n            handlers.splice(k, 1);\n          } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n            el.removeEventListener(event, handler.proxyListener, capture);\n            handlers.splice(k, 1);\n          } else if (!listener) {\n            el.removeEventListener(event, handler.proxyListener, capture);\n            handlers.splice(k, 1);\n          }\n        }\n      }\n    }\n  }\n  return this;\n}\nfunction once() {\n  var dom = this;\n  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n    args[_key3] = arguments[_key3];\n  }\n  var eventName = args[0],\n    targetSelector = args[1],\n    listener = args[2],\n    capture = args[3];\n  if (typeof args[1] === 'function') {\n    eventName = args[0];\n    listener = args[1];\n    capture = args[2];\n    targetSelector = undefined;\n  }\n  function onceHandler() {\n    for (var _len4 = arguments.length, eventArgs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      eventArgs[_key4] = arguments[_key4];\n    }\n    listener.apply(this, eventArgs);\n    dom.off(eventName, targetSelector, onceHandler, capture);\n    if (onceHandler.dom7proxy) {\n      delete onceHandler.dom7proxy;\n    }\n  }\n  onceHandler.dom7proxy = listener;\n  return dom.on(eventName, targetSelector, onceHandler, capture);\n}\nfunction trigger() {\n  for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n    args[_key5] = arguments[_key5];\n  }\n  var events = args[0].split(' ');\n  var eventData = args[1];\n  for (var i = 0; i < events.length; i += 1) {\n    var event = events[i];\n    for (var j = 0; j < this.length; j += 1) {\n      var el = this[j];\n      var evt = void 0;\n      try {\n        evt = new win.CustomEvent(event, {\n          detail: eventData,\n          bubbles: true,\n          cancelable: true\n        });\n      } catch (e) {\n        evt = doc.createEvent('Event');\n        evt.initEvent(event, true, true);\n        evt.detail = eventData;\n      }\n      // eslint-disable-next-line\n      el.dom7EventData = args.filter(function (data, dataIndex) {\n        return dataIndex > 0;\n      });\n      el.dispatchEvent(evt);\n      el.dom7EventData = [];\n      delete el.dom7EventData;\n    }\n  }\n  return this;\n}\nfunction transitionEnd(callback) {\n  var events = ['webkitTransitionEnd', 'transitionend'];\n  var dom = this;\n  var i;\n  function fireCallBack(e) {\n    /* jshint validthis:true */\n    if (e.target !== this) return;\n    callback.call(this, e);\n    for (i = 0; i < events.length; i += 1) {\n      dom.off(events[i], fireCallBack);\n    }\n  }\n  if (callback) {\n    for (i = 0; i < events.length; i += 1) {\n      dom.on(events[i], fireCallBack);\n    }\n  }\n  return this;\n}\nfunction animationEnd(callback) {\n  var events = ['webkitAnimationEnd', 'animationend'];\n  var dom = this;\n  var i;\n  function fireCallBack(e) {\n    if (e.target !== this) return;\n    callback.call(this, e);\n    for (i = 0; i < events.length; i += 1) {\n      dom.off(events[i], fireCallBack);\n    }\n  }\n  if (callback) {\n    for (i = 0; i < events.length; i += 1) {\n      dom.on(events[i], fireCallBack);\n    }\n  }\n  return this;\n}\n// Sizing/Styles\nfunction width() {\n  if (this[0] === win) {\n    return win.innerWidth;\n  }\n  if (this.length > 0) {\n    return parseFloat(this.css('width'));\n  }\n  return null;\n}\nfunction dom7_module_outerWidth(includeMargins) {\n  if (this.length > 0) {\n    if (includeMargins) {\n      // eslint-disable-next-line\n      var _styles = this.styles();\n      return this[0].offsetWidth + parseFloat(_styles.getPropertyValue('margin-right')) + parseFloat(_styles.getPropertyValue('margin-left'));\n    }\n    return this[0].offsetWidth;\n  }\n  return null;\n}\nfunction height() {\n  if (this[0] === win) {\n    return win.innerHeight;\n  }\n  if (this.length > 0) {\n    return parseFloat(this.css('height'));\n  }\n  return null;\n}\nfunction dom7_module_outerHeight(includeMargins) {\n  if (this.length > 0) {\n    if (includeMargins) {\n      // eslint-disable-next-line\n      var _styles2 = this.styles();\n      return this[0].offsetHeight + parseFloat(_styles2.getPropertyValue('margin-top')) + parseFloat(_styles2.getPropertyValue('margin-bottom'));\n    }\n    return this[0].offsetHeight;\n  }\n  return null;\n}\nfunction offset() {\n  if (this.length > 0) {\n    var el = this[0];\n    var box = el.getBoundingClientRect();\n    var body = doc.body;\n    var clientTop = el.clientTop || body.clientTop || 0;\n    var clientLeft = el.clientLeft || body.clientLeft || 0;\n    var _scrollTop = el === win ? win.scrollY : el.scrollTop;\n    var _scrollLeft = el === win ? win.scrollX : el.scrollLeft;\n    return {\n      top: box.top + _scrollTop - clientTop,\n      left: box.left + _scrollLeft - clientLeft\n    };\n  }\n  return null;\n}\nfunction hide() {\n  for (var i = 0; i < this.length; i += 1) {\n    this[i].style.display = 'none';\n  }\n  return this;\n}\nfunction show() {\n  for (var i = 0; i < this.length; i += 1) {\n    var el = this[i];\n    if (el.style.display === 'none') {\n      el.style.display = '';\n    }\n    if (win.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n      // Still not visible\n      el.style.display = 'block';\n    }\n  }\n  return this;\n}\nfunction styles() {\n  if (this[0]) return win.getComputedStyle(this[0], null);\n  return {};\n}\nfunction css(props, value) {\n  var i;\n  if (arguments.length === 1) {\n    if (typeof props === 'string') {\n      if (this[0]) return win.getComputedStyle(this[0], null).getPropertyValue(props);\n    } else {\n      for (i = 0; i < this.length; i += 1) {\n        // eslint-disable-next-line\n        for (var _prop in props) {\n          this[i].style[_prop] = props[_prop];\n        }\n      }\n      return this;\n    }\n  }\n  if (arguments.length === 2 && typeof props === 'string') {\n    for (i = 0; i < this.length; i += 1) {\n      this[i].style[props] = value;\n    }\n    return this;\n  }\n  return this;\n}\n\n// Dom manipulation\nfunction toArray() {\n  var arr = [];\n  for (var i = 0; i < this.length; i += 1) {\n    arr.push(this[i]);\n  }\n  return arr;\n}\n// Iterate over the collection passing elements to `callback`\nfunction each(callback) {\n  // Don't bother continuing without a callback\n  if (!callback) return this;\n  // Iterate over the current collection\n  for (var i = 0; i < this.length; i += 1) {\n    // If the callback returns false\n    if (callback.call(this[i], i, this[i]) === false) {\n      // End the loop early\n      return this;\n    }\n  }\n  // Return `this` to allow chained DOM operations\n  return this;\n}\nfunction forEach(callback) {\n  // Don't bother continuing without a callback\n  if (!callback) return this;\n  // Iterate over the current collection\n  for (var i = 0; i < this.length; i += 1) {\n    // If the callback returns false\n    if (callback.call(this[i], this[i], i) === false) {\n      // End the loop early\n      return this;\n    }\n  }\n  // Return `this` to allow chained DOM operations\n  return this;\n}\nfunction filter(callback) {\n  var matchedItems = [];\n  var dom = this;\n  for (var i = 0; i < dom.length; i += 1) {\n    if (callback.call(dom[i], i, dom[i])) matchedItems.push(dom[i]);\n  }\n  return new dom7_module_Dom7(matchedItems);\n}\nfunction map(callback) {\n  var modifiedItems = [];\n  var dom = this;\n  for (var i = 0; i < dom.length; i += 1) {\n    modifiedItems.push(callback.call(dom[i], i, dom[i]));\n  }\n  return new dom7_module_Dom7(modifiedItems);\n}\n// eslint-disable-next-line\nfunction html(html) {\n  if (typeof html === 'undefined') {\n    return this[0] ? this[0].innerHTML : undefined;\n  }\n  for (var i = 0; i < this.length; i += 1) {\n    this[i].innerHTML = html;\n  }\n  return this;\n}\n// eslint-disable-next-line\nfunction dom7_module_text(text) {\n  if (typeof text === 'undefined') {\n    if (this[0]) {\n      return this[0].textContent.trim();\n    }\n    return null;\n  }\n  for (var i = 0; i < this.length; i += 1) {\n    this[i].textContent = text;\n  }\n  return this;\n}\nfunction is(selector) {\n  var el = this[0];\n  var compareWith;\n  var i;\n  if (!el || typeof selector === 'undefined') return false;\n  if (typeof selector === 'string') {\n    if (el.matches) return el.matches(selector);else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n    compareWith = $(selector);\n    for (i = 0; i < compareWith.length; i += 1) {\n      if (compareWith[i] === el) return true;\n    }\n    return false;\n  } else if (selector === doc) return el === doc;else if (selector === win) return el === win;\n  if (selector.nodeType || selector instanceof dom7_module_Dom7) {\n    compareWith = selector.nodeType ? [selector] : selector;\n    for (i = 0; i < compareWith.length; i += 1) {\n      if (compareWith[i] === el) return true;\n    }\n    return false;\n  }\n  return false;\n}\nfunction indexOf(el) {\n  for (var i = 0; i < this.length; i += 1) {\n    if (this[i] === el) return i;\n  }\n  return -1;\n}\nfunction dom7_module_index() {\n  var child = this[0];\n  var i;\n  if (child) {\n    i = 0;\n    // eslint-disable-next-line\n    while ((child = child.previousSibling) !== null) {\n      if (child.nodeType === 1) i += 1;\n    }\n    return i;\n  }\n  return undefined;\n}\n// eslint-disable-next-line\nfunction eq(index) {\n  if (typeof index === 'undefined') return this;\n  var length = this.length;\n  var returnIndex;\n  if (index > length - 1) {\n    return new dom7_module_Dom7([]);\n  }\n  if (index < 0) {\n    returnIndex = length + index;\n    if (returnIndex < 0) return new dom7_module_Dom7([]);\n    return new dom7_module_Dom7([this[returnIndex]]);\n  }\n  return new dom7_module_Dom7([this[index]]);\n}\nfunction append() {\n  var newChild;\n  for (var k = 0; k < arguments.length; k += 1) {\n    newChild = k < 0 || arguments.length <= k ? undefined : arguments[k];\n    for (var i = 0; i < this.length; i += 1) {\n      if (typeof newChild === 'string') {\n        var tempDiv = doc.createElement('div');\n        tempDiv.innerHTML = newChild;\n        while (tempDiv.firstChild) {\n          this[i].appendChild(tempDiv.firstChild);\n        }\n      } else if (newChild instanceof dom7_module_Dom7) {\n        for (var j = 0; j < newChild.length; j += 1) {\n          this[i].appendChild(newChild[j]);\n        }\n      } else {\n        this[i].appendChild(newChild);\n      }\n    }\n  }\n  return this;\n}\n// eslint-disable-next-line\nfunction appendTo(parent) {\n  $(parent).append(this);\n  return this;\n}\nfunction prepend(newChild) {\n  var i;\n  var j;\n  for (i = 0; i < this.length; i += 1) {\n    if (typeof newChild === 'string') {\n      var tempDiv = doc.createElement('div');\n      tempDiv.innerHTML = newChild;\n      for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n        this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n      }\n    } else if (newChild instanceof dom7_module_Dom7) {\n      for (j = 0; j < newChild.length; j += 1) {\n        this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n      }\n    } else {\n      this[i].insertBefore(newChild, this[i].childNodes[0]);\n    }\n  }\n  return this;\n}\n// eslint-disable-next-line\nfunction prependTo(parent) {\n  $(parent).prepend(this);\n  return this;\n}\nfunction insertBefore(selector) {\n  var before = $(selector);\n  for (var i = 0; i < this.length; i += 1) {\n    if (before.length === 1) {\n      before[0].parentNode.insertBefore(this[i], before[0]);\n    } else if (before.length > 1) {\n      for (var j = 0; j < before.length; j += 1) {\n        before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n      }\n    }\n  }\n}\nfunction insertAfter(selector) {\n  var after = $(selector);\n  for (var i = 0; i < this.length; i += 1) {\n    if (after.length === 1) {\n      after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n    } else if (after.length > 1) {\n      for (var j = 0; j < after.length; j += 1) {\n        after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n      }\n    }\n  }\n}\nfunction next(selector) {\n  if (this.length > 0) {\n    if (selector) {\n      if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n        return new dom7_module_Dom7([this[0].nextElementSibling]);\n      }\n      return new dom7_module_Dom7([]);\n    }\n    if (this[0].nextElementSibling) return new dom7_module_Dom7([this[0].nextElementSibling]);\n    return new dom7_module_Dom7([]);\n  }\n  return new dom7_module_Dom7([]);\n}\nfunction nextAll(selector) {\n  var nextEls = [];\n  var el = this[0];\n  if (!el) return new dom7_module_Dom7([]);\n  while (el.nextElementSibling) {\n    var _next = el.nextElementSibling; // eslint-disable-line\n    if (selector) {\n      if ($(_next).is(selector)) nextEls.push(_next);\n    } else nextEls.push(_next);\n    el = _next;\n  }\n  return new dom7_module_Dom7(nextEls);\n}\nfunction prev(selector) {\n  if (this.length > 0) {\n    var el = this[0];\n    if (selector) {\n      if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n        return new dom7_module_Dom7([el.previousElementSibling]);\n      }\n      return new dom7_module_Dom7([]);\n    }\n    if (el.previousElementSibling) return new dom7_module_Dom7([el.previousElementSibling]);\n    return new dom7_module_Dom7([]);\n  }\n  return new dom7_module_Dom7([]);\n}\nfunction prevAll(selector) {\n  var prevEls = [];\n  var el = this[0];\n  if (!el) return new dom7_module_Dom7([]);\n  while (el.previousElementSibling) {\n    var _prev = el.previousElementSibling; // eslint-disable-line\n    if (selector) {\n      if ($(_prev).is(selector)) prevEls.push(_prev);\n    } else prevEls.push(_prev);\n    el = _prev;\n  }\n  return new dom7_module_Dom7(prevEls);\n}\nfunction siblings(selector) {\n  return this.nextAll(selector).add(this.prevAll(selector));\n}\nfunction dom7_module_parent(selector) {\n  var parents = []; // eslint-disable-line\n  for (var i = 0; i < this.length; i += 1) {\n    if (this[i].parentNode !== null) {\n      if (selector) {\n        if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n      } else {\n        parents.push(this[i].parentNode);\n      }\n    }\n  }\n  return $(unique(parents));\n}\nfunction parents(selector) {\n  var parents = []; // eslint-disable-line\n  for (var i = 0; i < this.length; i += 1) {\n    var _parent = this[i].parentNode; // eslint-disable-line\n    while (_parent) {\n      if (selector) {\n        if ($(_parent).is(selector)) parents.push(_parent);\n      } else {\n        parents.push(_parent);\n      }\n      _parent = _parent.parentNode;\n    }\n  }\n  return $(unique(parents));\n}\nfunction closest(selector) {\n  var closest = this; // eslint-disable-line\n  if (typeof selector === 'undefined') {\n    return new dom7_module_Dom7([]);\n  }\n  if (!closest.is(selector)) {\n    closest = closest.parents(selector).eq(0);\n  }\n  return closest;\n}\nfunction find(selector) {\n  var foundElements = [];\n  for (var i = 0; i < this.length; i += 1) {\n    var found = this[i].querySelectorAll(selector);\n    for (var j = 0; j < found.length; j += 1) {\n      foundElements.push(found[j]);\n    }\n  }\n  return new dom7_module_Dom7(foundElements);\n}\nfunction children(selector) {\n  var children = []; // eslint-disable-line\n  for (var i = 0; i < this.length; i += 1) {\n    var childNodes = this[i].childNodes;\n    for (var j = 0; j < childNodes.length; j += 1) {\n      if (!selector) {\n        if (childNodes[j].nodeType === 1) children.push(childNodes[j]);\n      } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {\n        children.push(childNodes[j]);\n      }\n    }\n  }\n  return new dom7_module_Dom7(unique(children));\n}\nfunction remove() {\n  for (var i = 0; i < this.length; i += 1) {\n    if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n  }\n  return this;\n}\nfunction detach() {\n  return this.remove();\n}\nfunction add() {\n  var dom = this;\n  var i;\n  var j;\n  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n    args[_key6] = arguments[_key6];\n  }\n  for (i = 0; i < args.length; i += 1) {\n    var toAdd = $(args[i]);\n    for (j = 0; j < toAdd.length; j += 1) {\n      dom[dom.length] = toAdd[j];\n      dom.length += 1;\n    }\n  }\n  return dom;\n}\nfunction empty() {\n  for (var i = 0; i < this.length; i += 1) {\n    var el = this[i];\n    if (el.nodeType === 1) {\n      for (var j = 0; j < el.childNodes.length; j += 1) {\n        if (el.childNodes[j].parentNode) {\n          el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n        }\n      }\n      el.textContent = '';\n    }\n  }\n  return this;\n}\nvar Methods = /*#__PURE__*/Object.freeze({\n  addClass: addClass,\n  removeClass: removeClass,\n  hasClass: hasClass,\n  toggleClass: toggleClass,\n  attr: attr,\n  removeAttr: removeAttr,\n  prop: dom7_module_prop,\n  data: data,\n  removeData: removeData,\n  dataset: dataset,\n  val: val,\n  transform: transform,\n  transition: transition,\n  on: on,\n  off: off,\n  once: once,\n  trigger: trigger,\n  transitionEnd: transitionEnd,\n  animationEnd: animationEnd,\n  width: width,\n  outerWidth: dom7_module_outerWidth,\n  height: height,\n  outerHeight: dom7_module_outerHeight,\n  offset: offset,\n  hide: hide,\n  show: show,\n  styles: styles,\n  css: css,\n  toArray: toArray,\n  each: each,\n  forEach: forEach,\n  filter: filter,\n  map: map,\n  html: html,\n  text: dom7_module_text,\n  is: is,\n  indexOf: indexOf,\n  index: dom7_module_index,\n  eq: eq,\n  append: append,\n  appendTo: appendTo,\n  prepend: prepend,\n  prependTo: prependTo,\n  insertBefore: insertBefore,\n  insertAfter: insertAfter,\n  next: next,\n  nextAll: nextAll,\n  prev: prev,\n  prevAll: prevAll,\n  siblings: siblings,\n  parent: dom7_module_parent,\n  parents: parents,\n  closest: closest,\n  find: find,\n  children: children,\n  remove: remove,\n  detach: detach,\n  add: add,\n  empty: empty\n});\nfunction scrollTo() {\n  for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n    args[_key7] = arguments[_key7];\n  }\n  var left = args[0],\n    top = args[1],\n    duration = args[2],\n    easing = args[3],\n    callback = args[4];\n  if (args.length === 4 && typeof easing === 'function') {\n    callback = easing;\n    left = args[0];\n    top = args[1];\n    duration = args[2];\n    callback = args[3];\n    easing = args[4];\n  }\n  if (typeof easing === 'undefined') easing = 'swing';\n  return this.each(function animate() {\n    var el = this;\n    var currentTop;\n    var currentLeft;\n    var maxTop;\n    var maxLeft;\n    var newTop;\n    var newLeft;\n    var scrollTop; // eslint-disable-line\n    var scrollLeft; // eslint-disable-line\n    var animateTop = top > 0 || top === 0;\n    var animateLeft = left > 0 || left === 0;\n    if (typeof easing === 'undefined') {\n      easing = 'swing';\n    }\n    if (animateTop) {\n      currentTop = el.scrollTop;\n      if (!duration) {\n        el.scrollTop = top;\n      }\n    }\n    if (animateLeft) {\n      currentLeft = el.scrollLeft;\n      if (!duration) {\n        el.scrollLeft = left;\n      }\n    }\n    if (!duration) return;\n    if (animateTop) {\n      maxTop = el.scrollHeight - el.offsetHeight;\n      newTop = Math.max(Math.min(top, maxTop), 0);\n    }\n    if (animateLeft) {\n      maxLeft = el.scrollWidth - el.offsetWidth;\n      newLeft = Math.max(Math.min(left, maxLeft), 0);\n    }\n    var startTime = null;\n    if (animateTop && newTop === currentTop) animateTop = false;\n    if (animateLeft && newLeft === currentLeft) animateLeft = false;\n    function render() {\n      var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date().getTime();\n      if (startTime === null) {\n        startTime = time;\n      }\n      var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n      var easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n      var done;\n      if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n      if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n      if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n        el.scrollTop = newTop;\n        done = true;\n      }\n      if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n        el.scrollTop = newTop;\n        done = true;\n      }\n      if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n        el.scrollLeft = newLeft;\n        done = true;\n      }\n      if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n        el.scrollLeft = newLeft;\n        done = true;\n      }\n      if (done) {\n        if (callback) callback();\n        return;\n      }\n      if (animateTop) el.scrollTop = scrollTop;\n      if (animateLeft) el.scrollLeft = scrollLeft;\n      requestAnimationFrame(render);\n    }\n    requestAnimationFrame(render);\n  });\n}\n// scrollTop(top, duration, easing, callback) {\nfunction scrollTop() {\n  for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n    args[_key8] = arguments[_key8];\n  }\n  var top = args[0],\n    duration = args[1],\n    easing = args[2],\n    callback = args[3];\n  if (args.length === 3 && typeof easing === 'function') {\n    top = args[0];\n    duration = args[1];\n    callback = args[2];\n    easing = args[3];\n  }\n  var dom = this;\n  if (typeof top === 'undefined') {\n    if (dom.length > 0) return dom[0].scrollTop;\n    return null;\n  }\n  return dom.scrollTo(undefined, top, duration, easing, callback);\n}\nfunction scrollLeft() {\n  for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n    args[_key9] = arguments[_key9];\n  }\n  var left = args[0],\n    duration = args[1],\n    easing = args[2],\n    callback = args[3];\n  if (args.length === 3 && typeof easing === 'function') {\n    left = args[0];\n    duration = args[1];\n    callback = args[2];\n    easing = args[3];\n  }\n  var dom = this;\n  if (typeof left === 'undefined') {\n    if (dom.length > 0) return dom[0].scrollLeft;\n    return null;\n  }\n  return dom.scrollTo(left, undefined, duration, easing, callback);\n}\nvar Scroll = /*#__PURE__*/Object.freeze({\n  scrollTo: scrollTo,\n  scrollTop: scrollTop,\n  scrollLeft: scrollLeft\n});\nfunction dom7_module_animate(initialProps, initialParams) {\n  var els = this;\n  var a = {\n    props: Object.assign({}, initialProps),\n    params: Object.assign({\n      duration: 300,\n      easing: 'swing' // or 'linear'\n      /* Callbacks\n      begin(elements)\n      complete(elements)\n      progress(elements, complete, remaining, start, tweenValue)\n      */\n    }, initialParams),\n    elements: els,\n    animating: false,\n    que: [],\n    easingProgress: function easingProgress(easing, progress) {\n      if (easing === 'swing') {\n        return 0.5 - Math.cos(progress * Math.PI) / 2;\n      }\n      if (typeof easing === 'function') {\n        return easing(progress);\n      }\n      return progress;\n    },\n    stop: function stop() {\n      if (a.frameId) {\n        cancelAnimationFrame(a.frameId);\n      }\n      a.animating = false;\n      a.elements.each(function (index, el) {\n        var element = el;\n        delete element.dom7AnimateInstance;\n      });\n      a.que = [];\n    },\n    done: function done(complete) {\n      a.animating = false;\n      a.elements.each(function (index, el) {\n        var element = el;\n        delete element.dom7AnimateInstance;\n      });\n      if (complete) complete(els);\n      if (a.que.length > 0) {\n        var que = a.que.shift();\n        a.animate(que[0], que[1]);\n      }\n    },\n    animate: function animate(props, params) {\n      if (a.animating) {\n        a.que.push([props, params]);\n        return a;\n      }\n      var elements = [];\n\n      // Define & Cache Initials & Units\n      a.elements.each(function (index, el) {\n        var initialFullValue;\n        var initialValue;\n        var unit;\n        var finalValue;\n        var finalFullValue;\n        if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n        elements[index] = {\n          container: el\n        };\n        Object.keys(props).forEach(function (prop) {\n          initialFullValue = win.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n          initialValue = parseFloat(initialFullValue);\n          unit = initialFullValue.replace(initialValue, '');\n          finalValue = parseFloat(props[prop]);\n          finalFullValue = props[prop] + unit;\n          elements[index][prop] = {\n            initialFullValue: initialFullValue,\n            initialValue: initialValue,\n            unit: unit,\n            finalValue: finalValue,\n            finalFullValue: finalFullValue,\n            currentValue: initialValue\n          };\n        });\n      });\n      var startTime = null;\n      var time;\n      var elementsDone = 0;\n      var propsDone = 0;\n      var done;\n      var began = false;\n      a.animating = true;\n      function render() {\n        time = new Date().getTime();\n        var progress;\n        var easeProgress;\n        // let el;\n        if (!began) {\n          began = true;\n          if (params.begin) params.begin(els);\n        }\n        if (startTime === null) {\n          startTime = time;\n        }\n        if (params.progress) {\n          // eslint-disable-next-line\n          params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n        }\n        elements.forEach(function (element) {\n          var el = element;\n          if (done || el.done) return;\n          Object.keys(props).forEach(function (prop) {\n            if (done || el.done) return;\n            progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n            easeProgress = a.easingProgress(params.easing, progress);\n            var _el$prop = el[prop],\n              initialValue = _el$prop.initialValue,\n              finalValue = _el$prop.finalValue,\n              unit = _el$prop.unit;\n            el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n            var currentValue = el[prop].currentValue;\n            if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n              el.container.style[prop] = finalValue + unit;\n              propsDone += 1;\n              if (propsDone === Object.keys(props).length) {\n                el.done = true;\n                elementsDone += 1;\n              }\n              if (elementsDone === elements.length) {\n                done = true;\n              }\n            }\n            if (done) {\n              a.done(params.complete);\n              return;\n            }\n            el.container.style[prop] = currentValue + unit;\n          });\n        });\n        if (done) return;\n        // Then call\n        a.frameId = requestAnimationFrame(render);\n      }\n      a.frameId = requestAnimationFrame(render);\n      return a;\n    }\n  };\n  if (a.elements.length === 0) {\n    return els;\n  }\n  var animateInstance;\n  for (var i = 0; i < a.elements.length; i += 1) {\n    if (a.elements[i].dom7AnimateInstance) {\n      animateInstance = a.elements[i].dom7AnimateInstance;\n    } else a.elements[i].dom7AnimateInstance = a;\n  }\n  if (!animateInstance) {\n    animateInstance = a;\n  }\n  if (initialProps === 'stop') {\n    animateInstance.stop();\n  } else {\n    animateInstance.animate(a.props, a.params);\n  }\n  return els;\n}\nfunction stop() {\n  var els = this;\n  for (var i = 0; i < els.length; i += 1) {\n    if (els[i].dom7AnimateInstance) {\n      els[i].dom7AnimateInstance.stop();\n    }\n  }\n}\nvar Animate = /*#__PURE__*/Object.freeze({\n  animate: dom7_module_animate,\n  stop: stop\n});\nvar noTrigger = 'resize scroll'.split(' ');\nfunction eventShortcut(name) {\n  for (var _len0 = arguments.length, args = new Array(_len0 > 1 ? _len0 - 1 : 0), _key0 = 1; _key0 < _len0; _key0++) {\n    args[_key0 - 1] = arguments[_key0];\n  }\n  if (typeof args[0] === 'undefined') {\n    for (var i = 0; i < this.length; i += 1) {\n      if (noTrigger.indexOf(name) < 0) {\n        if (name in this[i]) this[i][name]();else {\n          $(this[i]).trigger(name);\n        }\n      }\n    }\n    return this;\n  }\n  return this.on.apply(this, [name].concat(args));\n}\nfunction click() {\n  for (var _len1 = arguments.length, args = new Array(_len1), _key1 = 0; _key1 < _len1; _key1++) {\n    args[_key1] = arguments[_key1];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['click'].concat(args));\n}\nfunction dom7_module_blur() {\n  for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n    args[_key10] = arguments[_key10];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['blur'].concat(args));\n}\nfunction dom7_module_focus() {\n  for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\n    args[_key11] = arguments[_key11];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['focus'].concat(args));\n}\nfunction focusin() {\n  for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {\n    args[_key12] = arguments[_key12];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['focusin'].concat(args));\n}\nfunction focusout() {\n  for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {\n    args[_key13] = arguments[_key13];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['focusout'].concat(args));\n}\nfunction keyup() {\n  for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {\n    args[_key14] = arguments[_key14];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['keyup'].concat(args));\n}\nfunction keydown() {\n  for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {\n    args[_key15] = arguments[_key15];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['keydown'].concat(args));\n}\nfunction keypress() {\n  for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {\n    args[_key16] = arguments[_key16];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['keypress'].concat(args));\n}\nfunction dom7_module_submit() {\n  for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {\n    args[_key17] = arguments[_key17];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['submit'].concat(args));\n}\nfunction change() {\n  for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {\n    args[_key18] = arguments[_key18];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['change'].concat(args));\n}\nfunction mousedown() {\n  for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {\n    args[_key19] = arguments[_key19];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mousedown'].concat(args));\n}\nfunction mousemove() {\n  for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {\n    args[_key20] = arguments[_key20];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mousemove'].concat(args));\n}\nfunction mouseup() {\n  for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {\n    args[_key21] = arguments[_key21];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mouseup'].concat(args));\n}\nfunction mouseenter() {\n  for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {\n    args[_key22] = arguments[_key22];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mouseenter'].concat(args));\n}\nfunction mouseleave() {\n  for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {\n    args[_key23] = arguments[_key23];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mouseleave'].concat(args));\n}\nfunction mouseout() {\n  for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {\n    args[_key24] = arguments[_key24];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mouseout'].concat(args));\n}\nfunction mouseover() {\n  for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {\n    args[_key25] = arguments[_key25];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['mouseover'].concat(args));\n}\nfunction touchstart() {\n  for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {\n    args[_key26] = arguments[_key26];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['touchstart'].concat(args));\n}\nfunction touchend() {\n  for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {\n    args[_key27] = arguments[_key27];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['touchend'].concat(args));\n}\nfunction touchmove() {\n  for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) {\n    args[_key28] = arguments[_key28];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['touchmove'].concat(args));\n}\nfunction resize() {\n  for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) {\n    args[_key29] = arguments[_key29];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['resize'].concat(args));\n}\nfunction dom7_module_scroll() {\n  for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) {\n    args[_key30] = arguments[_key30];\n  }\n  return eventShortcut.bind(this).apply(void 0, ['scroll'].concat(args));\n}\nvar eventShortcuts = /*#__PURE__*/Object.freeze({\n  click: click,\n  blur: dom7_module_blur,\n  focus: dom7_module_focus,\n  focusin: focusin,\n  focusout: focusout,\n  keyup: keyup,\n  keydown: keydown,\n  keypress: keypress,\n  submit: dom7_module_submit,\n  change: change,\n  mousedown: mousedown,\n  mousemove: mousemove,\n  mouseup: mouseup,\n  mouseenter: mouseenter,\n  mouseleave: mouseleave,\n  mouseout: mouseout,\n  mouseover: mouseover,\n  touchstart: touchstart,\n  touchend: touchend,\n  touchmove: touchmove,\n  resize: resize,\n  scroll: dom7_module_scroll\n});\n[Methods, Scroll, Animate, eventShortcuts].forEach(function (group) {\n  Object.keys(group).forEach(function (methodName) {\n    $.fn[methodName] = group[methodName];\n  });\n});\n/* harmony default export */ var dom7_module = __webpack_exports__[\"default\"] = ($);\n\n//# sourceURL=webpack://futureBooks/./node_modules/dom7/dist/dom7.module.js_+_1_modules?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/globalThis.browser.js":
/*!*****************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/globalThis.browser.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = (function () {\n  if (typeof self !== 'undefined') {\n    return self;\n  } else if (typeof window !== 'undefined') {\n    return window;\n  } else {\n    return Function('return this')(); // eslint-disable-line no-new-func\n  }\n})();\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/globalThis.browser.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/index.js":
/*!****************************************************!*\
  !*** ./node_modules/engine.io-client/lib/index.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\nmodule.exports = __webpack_require__(/*! ./socket */ \"./node_modules/engine.io-client/lib/socket.js\");\n\n/**\n * Exports parser\n *\n * @api public\n *\n */\nmodule.exports.parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/index.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/socket.js":
/*!*****************************************************!*\
  !*** ./node_modules/engine.io-client/lib/socket.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module dependencies.\n */\n\nvar transports = __webpack_require__(/*! ./transports/index */ \"./node_modules/engine.io-client/lib/transports/index.js\");\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/engine.io-client/node_modules/debug/src/browser.js\")('engine.io-client:socket');\nvar index = __webpack_require__(/*! indexof */ \"./node_modules/indexof/index.js\");\nvar parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\nvar parseuri = __webpack_require__(/*! parseuri */ \"./node_modules/parseuri/index.js\");\nvar parseqs = __webpack_require__(/*! parseqs */ \"./node_modules/parseqs/index.js\");\n\n/**\n * Module exports.\n */\n\nmodule.exports = Socket;\n\n/**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} options\n * @api public\n */\n\nfunction Socket (uri, opts) {\n  if (!(this instanceof Socket)) return new Socket(uri, opts);\n\n  opts = opts || {};\n\n  if (uri && 'object' === typeof uri) {\n    opts = uri;\n    uri = null;\n  }\n\n  if (uri) {\n    uri = parseuri(uri);\n    opts.hostname = uri.host;\n    opts.secure = uri.protocol === 'https' || uri.protocol === 'wss';\n    opts.port = uri.port;\n    if (uri.query) opts.query = uri.query;\n  } else if (opts.host) {\n    opts.hostname = parseuri(opts.host).host;\n  }\n\n  this.secure = null != opts.secure ? opts.secure\n    : (typeof location !== 'undefined' && 'https:' === location.protocol);\n\n  if (opts.hostname && !opts.port) {\n    // if no port is specified manually, use the protocol default\n    opts.port = this.secure ? '443' : '80';\n  }\n\n  this.agent = opts.agent || false;\n  this.hostname = opts.hostname ||\n    (typeof location !== 'undefined' ? location.hostname : 'localhost');\n  this.port = opts.port || (typeof location !== 'undefined' && location.port\n      ? location.port\n      : (this.secure ? 443 : 80));\n  this.query = opts.query || {};\n  if ('string' === typeof this.query) this.query = parseqs.decode(this.query);\n  this.upgrade = false !== opts.upgrade;\n  this.path = (opts.path || '/engine.io').replace(/\\/$/, '') + '/';\n  this.forceJSONP = !!opts.forceJSONP;\n  this.jsonp = false !== opts.jsonp;\n  this.forceBase64 = !!opts.forceBase64;\n  this.enablesXDR = !!opts.enablesXDR;\n  this.withCredentials = false !== opts.withCredentials;\n  this.timestampParam = opts.timestampParam || 't';\n  this.timestampRequests = opts.timestampRequests;\n  this.transports = opts.transports || ['polling', 'websocket'];\n  this.transportOptions = opts.transportOptions || {};\n  this.readyState = '';\n  this.writeBuffer = [];\n  this.prevBufferLen = 0;\n  this.policyPort = opts.policyPort || 843;\n  this.rememberUpgrade = opts.rememberUpgrade || false;\n  this.binaryType = null;\n  this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades;\n  this.perMessageDeflate = false !== opts.perMessageDeflate ? (opts.perMessageDeflate || {}) : false;\n\n  if (true === this.perMessageDeflate) this.perMessageDeflate = {};\n  if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) {\n    this.perMessageDeflate.threshold = 1024;\n  }\n\n  // SSL options for Node.js client\n  this.pfx = opts.pfx || undefined;\n  this.key = opts.key || undefined;\n  this.passphrase = opts.passphrase || undefined;\n  this.cert = opts.cert || undefined;\n  this.ca = opts.ca || undefined;\n  this.ciphers = opts.ciphers || undefined;\n  this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? true : opts.rejectUnauthorized;\n  this.forceNode = !!opts.forceNode;\n\n  // detect ReactNative environment\n  this.isReactNative = (typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative');\n\n  // other options for Node.js or ReactNative client\n  if (typeof self === 'undefined' || this.isReactNative) {\n    if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) {\n      this.extraHeaders = opts.extraHeaders;\n    }\n\n    if (opts.localAddress) {\n      this.localAddress = opts.localAddress;\n    }\n  }\n\n  // set on handshake\n  this.id = null;\n  this.upgrades = null;\n  this.pingInterval = null;\n  this.pingTimeout = null;\n\n  // set on heartbeat\n  this.pingIntervalTimer = null;\n  this.pingTimeoutTimer = null;\n\n  this.open();\n}\n\nSocket.priorWebsocketSuccess = false;\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Socket.prototype);\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nSocket.protocol = parser.protocol; // this is an int\n\n/**\n * Expose deps for legacy compatibility\n * and standalone browser access.\n */\n\nSocket.Socket = Socket;\nSocket.Transport = __webpack_require__(/*! ./transport */ \"./node_modules/engine.io-client/lib/transport.js\");\nSocket.transports = __webpack_require__(/*! ./transports/index */ \"./node_modules/engine.io-client/lib/transports/index.js\");\nSocket.parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\n\n/**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n\nSocket.prototype.createTransport = function (name) {\n  debug('creating transport \"%s\"', name);\n  var query = clone(this.query);\n\n  // append engine.io protocol identifier\n  query.EIO = parser.protocol;\n\n  // transport name\n  query.transport = name;\n\n  // per-transport options\n  var options = this.transportOptions[name] || {};\n\n  // session id if we already have one\n  if (this.id) query.sid = this.id;\n\n  var transport = new transports[name]({\n    query: query,\n    socket: this,\n    agent: options.agent || this.agent,\n    hostname: options.hostname || this.hostname,\n    port: options.port || this.port,\n    secure: options.secure || this.secure,\n    path: options.path || this.path,\n    forceJSONP: options.forceJSONP || this.forceJSONP,\n    jsonp: options.jsonp || this.jsonp,\n    forceBase64: options.forceBase64 || this.forceBase64,\n    enablesXDR: options.enablesXDR || this.enablesXDR,\n    withCredentials: options.withCredentials || this.withCredentials,\n    timestampRequests: options.timestampRequests || this.timestampRequests,\n    timestampParam: options.timestampParam || this.timestampParam,\n    policyPort: options.policyPort || this.policyPort,\n    pfx: options.pfx || this.pfx,\n    key: options.key || this.key,\n    passphrase: options.passphrase || this.passphrase,\n    cert: options.cert || this.cert,\n    ca: options.ca || this.ca,\n    ciphers: options.ciphers || this.ciphers,\n    rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized,\n    perMessageDeflate: options.perMessageDeflate || this.perMessageDeflate,\n    extraHeaders: options.extraHeaders || this.extraHeaders,\n    forceNode: options.forceNode || this.forceNode,\n    localAddress: options.localAddress || this.localAddress,\n    requestTimeout: options.requestTimeout || this.requestTimeout,\n    protocols: options.protocols || void (0),\n    isReactNative: this.isReactNative\n  });\n\n  return transport;\n};\n\nfunction clone (obj) {\n  var o = {};\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) {\n      o[i] = obj[i];\n    }\n  }\n  return o;\n}\n\n/**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\nSocket.prototype.open = function () {\n  var transport;\n  if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) {\n    transport = 'websocket';\n  } else if (0 === this.transports.length) {\n    // Emit error on next tick so it can be listened to\n    var self = this;\n    setTimeout(function () {\n      self.emit('error', 'No transports available');\n    }, 0);\n    return;\n  } else {\n    transport = this.transports[0];\n  }\n  this.readyState = 'opening';\n\n  // Retry with the next transport if the transport is disabled (jsonp: false)\n  try {\n    transport = this.createTransport(transport);\n  } catch (e) {\n    this.transports.shift();\n    this.open();\n    return;\n  }\n\n  transport.open();\n  this.setTransport(transport);\n};\n\n/**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n\nSocket.prototype.setTransport = function (transport) {\n  debug('setting transport %s', transport.name);\n  var self = this;\n\n  if (this.transport) {\n    debug('clearing existing transport %s', this.transport.name);\n    this.transport.removeAllListeners();\n  }\n\n  // set up transport\n  this.transport = transport;\n\n  // set up transport listeners\n  transport\n  .on('drain', function () {\n    self.onDrain();\n  })\n  .on('packet', function (packet) {\n    self.onPacket(packet);\n  })\n  .on('error', function (e) {\n    self.onError(e);\n  })\n  .on('close', function () {\n    self.onClose('transport close');\n  });\n};\n\n/**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n\nSocket.prototype.probe = function (name) {\n  debug('probing transport \"%s\"', name);\n  var transport = this.createTransport(name, { probe: 1 });\n  var failed = false;\n  var self = this;\n\n  Socket.priorWebsocketSuccess = false;\n\n  function onTransportOpen () {\n    if (self.onlyBinaryUpgrades) {\n      var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary;\n      failed = failed || upgradeLosesBinary;\n    }\n    if (failed) return;\n\n    debug('probe transport \"%s\" opened', name);\n    transport.send([{ type: 'ping', data: 'probe' }]);\n    transport.once('packet', function (msg) {\n      if (failed) return;\n      if ('pong' === msg.type && 'probe' === msg.data) {\n        debug('probe transport \"%s\" pong', name);\n        self.upgrading = true;\n        self.emit('upgrading', transport);\n        if (!transport) return;\n        Socket.priorWebsocketSuccess = 'websocket' === transport.name;\n\n        debug('pausing current transport \"%s\"', self.transport.name);\n        self.transport.pause(function () {\n          if (failed) return;\n          if ('closed' === self.readyState) return;\n          debug('changing transport and sending upgrade packet');\n\n          cleanup();\n\n          self.setTransport(transport);\n          transport.send([{ type: 'upgrade' }]);\n          self.emit('upgrade', transport);\n          transport = null;\n          self.upgrading = false;\n          self.flush();\n        });\n      } else {\n        debug('probe transport \"%s\" failed', name);\n        var err = new Error('probe error');\n        err.transport = transport.name;\n        self.emit('upgradeError', err);\n      }\n    });\n  }\n\n  function freezeTransport () {\n    if (failed) return;\n\n    // Any callback called by transport should be ignored since now\n    failed = true;\n\n    cleanup();\n\n    transport.close();\n    transport = null;\n  }\n\n  // Handle any error that happens while probing\n  function onerror (err) {\n    var error = new Error('probe error: ' + err);\n    error.transport = transport.name;\n\n    freezeTransport();\n\n    debug('probe transport \"%s\" failed because of error: %s', name, err);\n\n    self.emit('upgradeError', error);\n  }\n\n  function onTransportClose () {\n    onerror('transport closed');\n  }\n\n  // When the socket is closed while we're probing\n  function onclose () {\n    onerror('socket closed');\n  }\n\n  // When the socket is upgraded while we're probing\n  function onupgrade (to) {\n    if (transport && to.name !== transport.name) {\n      debug('\"%s\" works - aborting \"%s\"', to.name, transport.name);\n      freezeTransport();\n    }\n  }\n\n  // Remove all listeners on the transport and on self\n  function cleanup () {\n    transport.removeListener('open', onTransportOpen);\n    transport.removeListener('error', onerror);\n    transport.removeListener('close', onTransportClose);\n    self.removeListener('close', onclose);\n    self.removeListener('upgrading', onupgrade);\n  }\n\n  transport.once('open', onTransportOpen);\n  transport.once('error', onerror);\n  transport.once('close', onTransportClose);\n\n  this.once('close', onclose);\n  this.once('upgrading', onupgrade);\n\n  transport.open();\n};\n\n/**\n * Called when connection is deemed open.\n *\n * @api public\n */\n\nSocket.prototype.onOpen = function () {\n  debug('socket open');\n  this.readyState = 'open';\n  Socket.priorWebsocketSuccess = 'websocket' === this.transport.name;\n  this.emit('open');\n  this.flush();\n\n  // we check for `readyState` in case an `open`\n  // listener already closed the socket\n  if ('open' === this.readyState && this.upgrade && this.transport.pause) {\n    debug('starting upgrade probes');\n    for (var i = 0, l = this.upgrades.length; i < l; i++) {\n      this.probe(this.upgrades[i]);\n    }\n  }\n};\n\n/**\n * Handles a packet.\n *\n * @api private\n */\n\nSocket.prototype.onPacket = function (packet) {\n  if ('opening' === this.readyState || 'open' === this.readyState ||\n      'closing' === this.readyState) {\n    debug('socket receive: type \"%s\", data \"%s\"', packet.type, packet.data);\n\n    this.emit('packet', packet);\n\n    // Socket is live - any packet counts\n    this.emit('heartbeat');\n\n    switch (packet.type) {\n      case 'open':\n        this.onHandshake(JSON.parse(packet.data));\n        break;\n\n      case 'pong':\n        this.setPing();\n        this.emit('pong');\n        break;\n\n      case 'error':\n        var err = new Error('server error');\n        err.code = packet.data;\n        this.onError(err);\n        break;\n\n      case 'message':\n        this.emit('data', packet.data);\n        this.emit('message', packet.data);\n        break;\n    }\n  } else {\n    debug('packet received with socket readyState \"%s\"', this.readyState);\n  }\n};\n\n/**\n * Called upon handshake completion.\n *\n * @param {Object} handshake obj\n * @api private\n */\n\nSocket.prototype.onHandshake = function (data) {\n  this.emit('handshake', data);\n  this.id = data.sid;\n  this.transport.query.sid = data.sid;\n  this.upgrades = this.filterUpgrades(data.upgrades);\n  this.pingInterval = data.pingInterval;\n  this.pingTimeout = data.pingTimeout;\n  this.onOpen();\n  // In case open handler closes socket\n  if ('closed' === this.readyState) return;\n  this.setPing();\n\n  // Prolong liveness of socket on heartbeat\n  this.removeListener('heartbeat', this.onHeartbeat);\n  this.on('heartbeat', this.onHeartbeat);\n};\n\n/**\n * Resets ping timeout.\n *\n * @api private\n */\n\nSocket.prototype.onHeartbeat = function (timeout) {\n  clearTimeout(this.pingTimeoutTimer);\n  var self = this;\n  self.pingTimeoutTimer = setTimeout(function () {\n    if ('closed' === self.readyState) return;\n    self.onClose('ping timeout');\n  }, timeout || (self.pingInterval + self.pingTimeout));\n};\n\n/**\n * Pings server every `this.pingInterval` and expects response\n * within `this.pingTimeout` or closes connection.\n *\n * @api private\n */\n\nSocket.prototype.setPing = function () {\n  var self = this;\n  clearTimeout(self.pingIntervalTimer);\n  self.pingIntervalTimer = setTimeout(function () {\n    debug('writing ping packet - expecting pong within %sms', self.pingTimeout);\n    self.ping();\n    self.onHeartbeat(self.pingTimeout);\n  }, self.pingInterval);\n};\n\n/**\n* Sends a ping packet.\n*\n* @api private\n*/\n\nSocket.prototype.ping = function () {\n  var self = this;\n  this.sendPacket('ping', function () {\n    self.emit('ping');\n  });\n};\n\n/**\n * Called on `drain` event\n *\n * @api private\n */\n\nSocket.prototype.onDrain = function () {\n  this.writeBuffer.splice(0, this.prevBufferLen);\n\n  // setting prevBufferLen = 0 is very important\n  // for example, when upgrading, upgrade packet is sent over,\n  // and a nonzero prevBufferLen could cause problems on `drain`\n  this.prevBufferLen = 0;\n\n  if (0 === this.writeBuffer.length) {\n    this.emit('drain');\n  } else {\n    this.flush();\n  }\n};\n\n/**\n * Flush write buffers.\n *\n * @api private\n */\n\nSocket.prototype.flush = function () {\n  if ('closed' !== this.readyState && this.transport.writable &&\n    !this.upgrading && this.writeBuffer.length) {\n    debug('flushing %d packets in socket', this.writeBuffer.length);\n    this.transport.send(this.writeBuffer);\n    // keep track of current length of writeBuffer\n    // splice writeBuffer and callbackBuffer on `drain`\n    this.prevBufferLen = this.writeBuffer.length;\n    this.emit('flush');\n  }\n};\n\n/**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n\nSocket.prototype.write =\nSocket.prototype.send = function (msg, options, fn) {\n  this.sendPacket('message', msg, options, fn);\n  return this;\n};\n\n/**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n\nSocket.prototype.sendPacket = function (type, data, options, fn) {\n  if ('function' === typeof data) {\n    fn = data;\n    data = undefined;\n  }\n\n  if ('function' === typeof options) {\n    fn = options;\n    options = null;\n  }\n\n  if ('closing' === this.readyState || 'closed' === this.readyState) {\n    return;\n  }\n\n  options = options || {};\n  options.compress = false !== options.compress;\n\n  var packet = {\n    type: type,\n    data: data,\n    options: options\n  };\n  this.emit('packetCreate', packet);\n  this.writeBuffer.push(packet);\n  if (fn) this.once('flush', fn);\n  this.flush();\n};\n\n/**\n * Closes the connection.\n *\n * @api private\n */\n\nSocket.prototype.close = function () {\n  if ('opening' === this.readyState || 'open' === this.readyState) {\n    this.readyState = 'closing';\n\n    var self = this;\n\n    if (this.writeBuffer.length) {\n      this.once('drain', function () {\n        if (this.upgrading) {\n          waitForUpgrade();\n        } else {\n          close();\n        }\n      });\n    } else if (this.upgrading) {\n      waitForUpgrade();\n    } else {\n      close();\n    }\n  }\n\n  function close () {\n    self.onClose('forced close');\n    debug('socket closing - telling transport to close');\n    self.transport.close();\n  }\n\n  function cleanupAndClose () {\n    self.removeListener('upgrade', cleanupAndClose);\n    self.removeListener('upgradeError', cleanupAndClose);\n    close();\n  }\n\n  function waitForUpgrade () {\n    // wait for upgrade to finish since we can't send packets while pausing a transport\n    self.once('upgrade', cleanupAndClose);\n    self.once('upgradeError', cleanupAndClose);\n  }\n\n  return this;\n};\n\n/**\n * Called upon transport error\n *\n * @api private\n */\n\nSocket.prototype.onError = function (err) {\n  debug('socket error %j', err);\n  Socket.priorWebsocketSuccess = false;\n  this.emit('error', err);\n  this.onClose('transport error', err);\n};\n\n/**\n * Called upon transport close.\n *\n * @api private\n */\n\nSocket.prototype.onClose = function (reason, desc) {\n  if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {\n    debug('socket close with reason: \"%s\"', reason);\n    var self = this;\n\n    // clear timers\n    clearTimeout(this.pingIntervalTimer);\n    clearTimeout(this.pingTimeoutTimer);\n\n    // stop event from firing again for transport\n    this.transport.removeAllListeners('close');\n\n    // ensure transport won't stay open\n    this.transport.close();\n\n    // ignore further transport communication\n    this.transport.removeAllListeners();\n\n    // set ready state\n    this.readyState = 'closed';\n\n    // clear session id\n    this.id = null;\n\n    // emit close event\n    this.emit('close', reason, desc);\n\n    // clean buffers after, so users can still\n    // grab the buffers on `close` event\n    self.writeBuffer = [];\n    self.prevBufferLen = 0;\n  }\n};\n\n/**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n\nSocket.prototype.filterUpgrades = function (upgrades) {\n  var filteredUpgrades = [];\n  for (var i = 0, j = upgrades.length; i < j; i++) {\n    if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);\n  }\n  return filteredUpgrades;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/socket.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transport.js":
/*!********************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transport.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module dependencies.\n */\n\nvar parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\n\n/**\n * Module exports.\n */\n\nmodule.exports = Transport;\n\n/**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n\nfunction Transport (opts) {\n  this.path = opts.path;\n  this.hostname = opts.hostname;\n  this.port = opts.port;\n  this.secure = opts.secure;\n  this.query = opts.query;\n  this.timestampParam = opts.timestampParam;\n  this.timestampRequests = opts.timestampRequests;\n  this.readyState = '';\n  this.agent = opts.agent || false;\n  this.socket = opts.socket;\n  this.enablesXDR = opts.enablesXDR;\n  this.withCredentials = opts.withCredentials;\n\n  // SSL options for Node.js client\n  this.pfx = opts.pfx;\n  this.key = opts.key;\n  this.passphrase = opts.passphrase;\n  this.cert = opts.cert;\n  this.ca = opts.ca;\n  this.ciphers = opts.ciphers;\n  this.rejectUnauthorized = opts.rejectUnauthorized;\n  this.forceNode = opts.forceNode;\n\n  // results of ReactNative environment detection\n  this.isReactNative = opts.isReactNative;\n\n  // other options for Node.js client\n  this.extraHeaders = opts.extraHeaders;\n  this.localAddress = opts.localAddress;\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Transport.prototype);\n\n/**\n * Emits an error.\n *\n * @param {String} str\n * @return {Transport} for chaining\n * @api public\n */\n\nTransport.prototype.onError = function (msg, desc) {\n  var err = new Error(msg);\n  err.type = 'TransportError';\n  err.description = desc;\n  this.emit('error', err);\n  return this;\n};\n\n/**\n * Opens the transport.\n *\n * @api public\n */\n\nTransport.prototype.open = function () {\n  if ('closed' === this.readyState || '' === this.readyState) {\n    this.readyState = 'opening';\n    this.doOpen();\n  }\n\n  return this;\n};\n\n/**\n * Closes the transport.\n *\n * @api private\n */\n\nTransport.prototype.close = function () {\n  if ('opening' === this.readyState || 'open' === this.readyState) {\n    this.doClose();\n    this.onClose();\n  }\n\n  return this;\n};\n\n/**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api private\n */\n\nTransport.prototype.send = function (packets) {\n  if ('open' === this.readyState) {\n    this.write(packets);\n  } else {\n    throw new Error('Transport not open');\n  }\n};\n\n/**\n * Called upon open\n *\n * @api private\n */\n\nTransport.prototype.onOpen = function () {\n  this.readyState = 'open';\n  this.writable = true;\n  this.emit('open');\n};\n\n/**\n * Called with data.\n *\n * @param {String} data\n * @api private\n */\n\nTransport.prototype.onData = function (data) {\n  var packet = parser.decodePacket(data, this.socket.binaryType);\n  this.onPacket(packet);\n};\n\n/**\n * Called with a decoded packet.\n */\n\nTransport.prototype.onPacket = function (packet) {\n  this.emit('packet', packet);\n};\n\n/**\n * Called upon close.\n *\n * @api private\n */\n\nTransport.prototype.onClose = function () {\n  this.readyState = 'closed';\n  this.emit('close');\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transport.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/index.js":
/*!***************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/index.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module dependencies\n */\n\nvar XMLHttpRequest = __webpack_require__(/*! ./xmlhttprequest */ \"./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js\");\nvar XHR = __webpack_require__(/*! ./polling-xhr */ \"./node_modules/engine.io-client/lib/transports/polling-xhr.js\");\nvar JSONP = __webpack_require__(/*! ./polling-jsonp */ \"./node_modules/engine.io-client/lib/transports/polling-jsonp.js\");\nvar websocket = __webpack_require__(/*! ./websocket */ \"./node_modules/engine.io-client/lib/transports/websocket.js\");\n\n/**\n * Export transports.\n */\n\nexports.polling = polling;\nexports.websocket = websocket;\n\n/**\n * Polling transport polymorphic constructor.\n * Decides on xhr vs jsonp based on feature detection.\n *\n * @api private\n */\n\nfunction polling (opts) {\n  var xhr;\n  var xd = false;\n  var xs = false;\n  var jsonp = false !== opts.jsonp;\n\n  if (typeof location !== 'undefined') {\n    var isSSL = 'https:' === location.protocol;\n    var port = location.port;\n\n    // some user agents have empty `location.port`\n    if (!port) {\n      port = isSSL ? 443 : 80;\n    }\n\n    xd = opts.hostname !== location.hostname || port !== opts.port;\n    xs = opts.secure !== isSSL;\n  }\n\n  opts.xdomain = xd;\n  opts.xscheme = xs;\n  xhr = new XMLHttpRequest(opts);\n\n  if ('open' in xhr && !opts.forceJSONP) {\n    return new XHR(opts);\n  } else {\n    if (!jsonp) throw new Error('JSONP disabled');\n    return new JSONP(opts);\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/index.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/polling-jsonp.js":
/*!***********************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/polling-jsonp.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module requirements.\n */\n\nvar Polling = __webpack_require__(/*! ./polling */ \"./node_modules/engine.io-client/lib/transports/polling.js\");\nvar inherit = __webpack_require__(/*! component-inherit */ \"./node_modules/component-inherit/index.js\");\nvar globalThis = __webpack_require__(/*! ../globalThis */ \"./node_modules/engine.io-client/lib/globalThis.browser.js\");\n\n/**\n * Module exports.\n */\n\nmodule.exports = JSONPPolling;\n\n/**\n * Cached regular expressions.\n */\n\nvar rNewline = /\\n/g;\nvar rEscapedNewline = /\\\\n/g;\n\n/**\n * Global JSONP callbacks.\n */\n\nvar callbacks;\n\n/**\n * Noop.\n */\n\nfunction empty () { }\n\n/**\n * JSONP Polling constructor.\n *\n * @param {Object} opts.\n * @api public\n */\n\nfunction JSONPPolling (opts) {\n  Polling.call(this, opts);\n\n  this.query = this.query || {};\n\n  // define global callbacks array if not present\n  // we do this here (lazily) to avoid unneeded global pollution\n  if (!callbacks) {\n    // we need to consider multiple engines in the same page\n    callbacks = globalThis.___eio = (globalThis.___eio || []);\n  }\n\n  // callback identifier\n  this.index = callbacks.length;\n\n  // add callback to jsonp global\n  var self = this;\n  callbacks.push(function (msg) {\n    self.onData(msg);\n  });\n\n  // append to query string\n  this.query.j = this.index;\n\n  // prevent spurious errors from being emitted when the window is unloaded\n  if (typeof addEventListener === 'function') {\n    addEventListener('beforeunload', function () {\n      if (self.script) self.script.onerror = empty;\n    }, false);\n  }\n}\n\n/**\n * Inherits from Polling.\n */\n\ninherit(JSONPPolling, Polling);\n\n/*\n * JSONP only supports binary as base64 encoded strings\n */\n\nJSONPPolling.prototype.supportsBinary = false;\n\n/**\n * Closes the socket.\n *\n * @api private\n */\n\nJSONPPolling.prototype.doClose = function () {\n  if (this.script) {\n    this.script.parentNode.removeChild(this.script);\n    this.script = null;\n  }\n\n  if (this.form) {\n    this.form.parentNode.removeChild(this.form);\n    this.form = null;\n    this.iframe = null;\n  }\n\n  Polling.prototype.doClose.call(this);\n};\n\n/**\n * Starts a poll cycle.\n *\n * @api private\n */\n\nJSONPPolling.prototype.doPoll = function () {\n  var self = this;\n  var script = document.createElement('script');\n\n  if (this.script) {\n    this.script.parentNode.removeChild(this.script);\n    this.script = null;\n  }\n\n  script.async = true;\n  script.src = this.uri();\n  script.onerror = function (e) {\n    self.onError('jsonp poll error', e);\n  };\n\n  var insertAt = document.getElementsByTagName('script')[0];\n  if (insertAt) {\n    insertAt.parentNode.insertBefore(script, insertAt);\n  } else {\n    (document.head || document.body).appendChild(script);\n  }\n  this.script = script;\n\n  var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent);\n\n  if (isUAgecko) {\n    setTimeout(function () {\n      var iframe = document.createElement('iframe');\n      document.body.appendChild(iframe);\n      document.body.removeChild(iframe);\n    }, 100);\n  }\n};\n\n/**\n * Writes with a hidden iframe.\n *\n * @param {String} data to send\n * @param {Function} called upon flush.\n * @api private\n */\n\nJSONPPolling.prototype.doWrite = function (data, fn) {\n  var self = this;\n\n  if (!this.form) {\n    var form = document.createElement('form');\n    var area = document.createElement('textarea');\n    var id = this.iframeId = 'eio_iframe_' + this.index;\n    var iframe;\n\n    form.className = 'socketio';\n    form.style.position = 'absolute';\n    form.style.top = '-1000px';\n    form.style.left = '-1000px';\n    form.target = id;\n    form.method = 'POST';\n    form.setAttribute('accept-charset', 'utf-8');\n    area.name = 'd';\n    form.appendChild(area);\n    document.body.appendChild(form);\n\n    this.form = form;\n    this.area = area;\n  }\n\n  this.form.action = this.uri();\n\n  function complete () {\n    initIframe();\n    fn();\n  }\n\n  function initIframe () {\n    if (self.iframe) {\n      try {\n        self.form.removeChild(self.iframe);\n      } catch (e) {\n        self.onError('jsonp polling iframe removal error', e);\n      }\n    }\n\n    try {\n      // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n      var html = '<iframe src=\"javascript:0\" name=\"' + self.iframeId + '\">';\n      iframe = document.createElement(html);\n    } catch (e) {\n      iframe = document.createElement('iframe');\n      iframe.name = self.iframeId;\n      iframe.src = 'javascript:0';\n    }\n\n    iframe.id = self.iframeId;\n\n    self.form.appendChild(iframe);\n    self.iframe = iframe;\n  }\n\n  initIframe();\n\n  // escape \\n to prevent it from being converted into \\r\\n by some UAs\n  // double escaping is required for escaped new lines because unescaping of new lines can be done safely on server-side\n  data = data.replace(rEscapedNewline, '\\\\\\n');\n  this.area.value = data.replace(rNewline, '\\\\n');\n\n  try {\n    this.form.submit();\n  } catch (e) {}\n\n  if (this.iframe.attachEvent) {\n    this.iframe.onreadystatechange = function () {\n      if (self.iframe.readyState === 'complete') {\n        complete();\n      }\n    };\n  } else {\n    this.iframe.onload = complete;\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/polling-jsonp.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/polling-xhr.js":
/*!*********************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/polling-xhr.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* global attachEvent */\n\n/**\n * Module requirements.\n */\n\nvar XMLHttpRequest = __webpack_require__(/*! ./xmlhttprequest */ \"./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js\");\nvar Polling = __webpack_require__(/*! ./polling */ \"./node_modules/engine.io-client/lib/transports/polling.js\");\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\nvar inherit = __webpack_require__(/*! component-inherit */ \"./node_modules/component-inherit/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/engine.io-client/node_modules/debug/src/browser.js\")('engine.io-client:polling-xhr');\nvar globalThis = __webpack_require__(/*! ../globalThis */ \"./node_modules/engine.io-client/lib/globalThis.browser.js\");\n\n/**\n * Module exports.\n */\n\nmodule.exports = XHR;\nmodule.exports.Request = Request;\n\n/**\n * Empty function\n */\n\nfunction empty () {}\n\n/**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction XHR (opts) {\n  Polling.call(this, opts);\n  this.requestTimeout = opts.requestTimeout;\n  this.extraHeaders = opts.extraHeaders;\n\n  if (typeof location !== 'undefined') {\n    var isSSL = 'https:' === location.protocol;\n    var port = location.port;\n\n    // some user agents have empty `location.port`\n    if (!port) {\n      port = isSSL ? 443 : 80;\n    }\n\n    this.xd = (typeof location !== 'undefined' && opts.hostname !== location.hostname) ||\n      port !== opts.port;\n    this.xs = opts.secure !== isSSL;\n  }\n}\n\n/**\n * Inherits from Polling.\n */\n\ninherit(XHR, Polling);\n\n/**\n * XHR supports binary\n */\n\nXHR.prototype.supportsBinary = true;\n\n/**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n\nXHR.prototype.request = function (opts) {\n  opts = opts || {};\n  opts.uri = this.uri();\n  opts.xd = this.xd;\n  opts.xs = this.xs;\n  opts.agent = this.agent || false;\n  opts.supportsBinary = this.supportsBinary;\n  opts.enablesXDR = this.enablesXDR;\n  opts.withCredentials = this.withCredentials;\n\n  // SSL options for Node.js client\n  opts.pfx = this.pfx;\n  opts.key = this.key;\n  opts.passphrase = this.passphrase;\n  opts.cert = this.cert;\n  opts.ca = this.ca;\n  opts.ciphers = this.ciphers;\n  opts.rejectUnauthorized = this.rejectUnauthorized;\n  opts.requestTimeout = this.requestTimeout;\n\n  // other options for Node.js client\n  opts.extraHeaders = this.extraHeaders;\n\n  return new Request(opts);\n};\n\n/**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n\nXHR.prototype.doWrite = function (data, fn) {\n  var isBinary = typeof data !== 'string' && data !== undefined;\n  var req = this.request({ method: 'POST', data: data, isBinary: isBinary });\n  var self = this;\n  req.on('success', fn);\n  req.on('error', function (err) {\n    self.onError('xhr post error', err);\n  });\n  this.sendXhr = req;\n};\n\n/**\n * Starts a poll cycle.\n *\n * @api private\n */\n\nXHR.prototype.doPoll = function () {\n  debug('xhr poll');\n  var req = this.request();\n  var self = this;\n  req.on('data', function (data) {\n    self.onData(data);\n  });\n  req.on('error', function (err) {\n    self.onError('xhr poll error', err);\n  });\n  this.pollXhr = req;\n};\n\n/**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n\nfunction Request (opts) {\n  this.method = opts.method || 'GET';\n  this.uri = opts.uri;\n  this.xd = !!opts.xd;\n  this.xs = !!opts.xs;\n  this.async = false !== opts.async;\n  this.data = undefined !== opts.data ? opts.data : null;\n  this.agent = opts.agent;\n  this.isBinary = opts.isBinary;\n  this.supportsBinary = opts.supportsBinary;\n  this.enablesXDR = opts.enablesXDR;\n  this.withCredentials = opts.withCredentials;\n  this.requestTimeout = opts.requestTimeout;\n\n  // SSL options for Node.js client\n  this.pfx = opts.pfx;\n  this.key = opts.key;\n  this.passphrase = opts.passphrase;\n  this.cert = opts.cert;\n  this.ca = opts.ca;\n  this.ciphers = opts.ciphers;\n  this.rejectUnauthorized = opts.rejectUnauthorized;\n\n  // other options for Node.js client\n  this.extraHeaders = opts.extraHeaders;\n\n  this.create();\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Request.prototype);\n\n/**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n\nRequest.prototype.create = function () {\n  var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };\n\n  // SSL options for Node.js client\n  opts.pfx = this.pfx;\n  opts.key = this.key;\n  opts.passphrase = this.passphrase;\n  opts.cert = this.cert;\n  opts.ca = this.ca;\n  opts.ciphers = this.ciphers;\n  opts.rejectUnauthorized = this.rejectUnauthorized;\n\n  var xhr = this.xhr = new XMLHttpRequest(opts);\n  var self = this;\n\n  try {\n    debug('xhr open %s: %s', this.method, this.uri);\n    xhr.open(this.method, this.uri, this.async);\n    try {\n      if (this.extraHeaders) {\n        xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n        for (var i in this.extraHeaders) {\n          if (this.extraHeaders.hasOwnProperty(i)) {\n            xhr.setRequestHeader(i, this.extraHeaders[i]);\n          }\n        }\n      }\n    } catch (e) {}\n\n    if ('POST' === this.method) {\n      try {\n        if (this.isBinary) {\n          xhr.setRequestHeader('Content-type', 'application/octet-stream');\n        } else {\n          xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');\n        }\n      } catch (e) {}\n    }\n\n    try {\n      xhr.setRequestHeader('Accept', '*/*');\n    } catch (e) {}\n\n    // ie6 check\n    if ('withCredentials' in xhr) {\n      xhr.withCredentials = this.withCredentials;\n    }\n\n    if (this.requestTimeout) {\n      xhr.timeout = this.requestTimeout;\n    }\n\n    if (this.hasXDR()) {\n      xhr.onload = function () {\n        self.onLoad();\n      };\n      xhr.onerror = function () {\n        self.onError(xhr.responseText);\n      };\n    } else {\n      xhr.onreadystatechange = function () {\n        if (xhr.readyState === 2) {\n          try {\n            var contentType = xhr.getResponseHeader('Content-Type');\n            if (self.supportsBinary && contentType === 'application/octet-stream' || contentType === 'application/octet-stream; charset=UTF-8') {\n              xhr.responseType = 'arraybuffer';\n            }\n          } catch (e) {}\n        }\n        if (4 !== xhr.readyState) return;\n        if (200 === xhr.status || 1223 === xhr.status) {\n          self.onLoad();\n        } else {\n          // make sure the `error` event handler that's user-set\n          // does not throw in the same tick and gets caught here\n          setTimeout(function () {\n            self.onError(typeof xhr.status === 'number' ? xhr.status : 0);\n          }, 0);\n        }\n      };\n    }\n\n    debug('xhr data %s', this.data);\n    xhr.send(this.data);\n  } catch (e) {\n    // Need to defer since .create() is called directly fhrom the constructor\n    // and thus the 'error' event can only be only bound *after* this exception\n    // occurs.  Therefore, also, we cannot throw here at all.\n    setTimeout(function () {\n      self.onError(e);\n    }, 0);\n    return;\n  }\n\n  if (typeof document !== 'undefined') {\n    this.index = Request.requestsCount++;\n    Request.requests[this.index] = this;\n  }\n};\n\n/**\n * Called upon successful response.\n *\n * @api private\n */\n\nRequest.prototype.onSuccess = function () {\n  this.emit('success');\n  this.cleanup();\n};\n\n/**\n * Called if we have data.\n *\n * @api private\n */\n\nRequest.prototype.onData = function (data) {\n  this.emit('data', data);\n  this.onSuccess();\n};\n\n/**\n * Called upon error.\n *\n * @api private\n */\n\nRequest.prototype.onError = function (err) {\n  this.emit('error', err);\n  this.cleanup(true);\n};\n\n/**\n * Cleans up house.\n *\n * @api private\n */\n\nRequest.prototype.cleanup = function (fromError) {\n  if ('undefined' === typeof this.xhr || null === this.xhr) {\n    return;\n  }\n  // xmlhttprequest\n  if (this.hasXDR()) {\n    this.xhr.onload = this.xhr.onerror = empty;\n  } else {\n    this.xhr.onreadystatechange = empty;\n  }\n\n  if (fromError) {\n    try {\n      this.xhr.abort();\n    } catch (e) {}\n  }\n\n  if (typeof document !== 'undefined') {\n    delete Request.requests[this.index];\n  }\n\n  this.xhr = null;\n};\n\n/**\n * Called upon load.\n *\n * @api private\n */\n\nRequest.prototype.onLoad = function () {\n  var data;\n  try {\n    var contentType;\n    try {\n      contentType = this.xhr.getResponseHeader('Content-Type');\n    } catch (e) {}\n    if (contentType === 'application/octet-stream' || contentType === 'application/octet-stream; charset=UTF-8') {\n      data = this.xhr.response || this.xhr.responseText;\n    } else {\n      data = this.xhr.responseText;\n    }\n  } catch (e) {\n    this.onError(e);\n  }\n  if (null != data) {\n    this.onData(data);\n  }\n};\n\n/**\n * Check if it has XDomainRequest.\n *\n * @api private\n */\n\nRequest.prototype.hasXDR = function () {\n  return typeof XDomainRequest !== 'undefined' && !this.xs && this.enablesXDR;\n};\n\n/**\n * Aborts the request.\n *\n * @api public\n */\n\nRequest.prototype.abort = function () {\n  this.cleanup();\n};\n\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\n\nRequest.requestsCount = 0;\nRequest.requests = {};\n\nif (typeof document !== 'undefined') {\n  if (typeof attachEvent === 'function') {\n    attachEvent('onunload', unloadHandler);\n  } else if (typeof addEventListener === 'function') {\n    var terminationEvent = 'onpagehide' in globalThis ? 'pagehide' : 'unload';\n    addEventListener(terminationEvent, unloadHandler, false);\n  }\n}\n\nfunction unloadHandler () {\n  for (var i in Request.requests) {\n    if (Request.requests.hasOwnProperty(i)) {\n      Request.requests[i].abort();\n    }\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/polling-xhr.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/polling.js":
/*!*****************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/polling.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module dependencies.\n */\n\nvar Transport = __webpack_require__(/*! ../transport */ \"./node_modules/engine.io-client/lib/transport.js\");\nvar parseqs = __webpack_require__(/*! parseqs */ \"./node_modules/parseqs/index.js\");\nvar parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\nvar inherit = __webpack_require__(/*! component-inherit */ \"./node_modules/component-inherit/index.js\");\nvar yeast = __webpack_require__(/*! yeast */ \"./node_modules/yeast/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/engine.io-client/node_modules/debug/src/browser.js\")('engine.io-client:polling');\n\n/**\n * Module exports.\n */\n\nmodule.exports = Polling;\n\n/**\n * Is XHR2 supported?\n */\n\nvar hasXHR2 = (function () {\n  var XMLHttpRequest = __webpack_require__(/*! ./xmlhttprequest */ \"./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js\");\n  var xhr = new XMLHttpRequest({ xdomain: false });\n  return null != xhr.responseType;\n})();\n\n/**\n * Polling interface.\n *\n * @param {Object} opts\n * @api private\n */\n\nfunction Polling (opts) {\n  var forceBase64 = (opts && opts.forceBase64);\n  if (!hasXHR2 || forceBase64) {\n    this.supportsBinary = false;\n  }\n  Transport.call(this, opts);\n}\n\n/**\n * Inherits from Transport.\n */\n\ninherit(Polling, Transport);\n\n/**\n * Transport name.\n */\n\nPolling.prototype.name = 'polling';\n\n/**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n\nPolling.prototype.doOpen = function () {\n  this.poll();\n};\n\n/**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n\nPolling.prototype.pause = function (onPause) {\n  var self = this;\n\n  this.readyState = 'pausing';\n\n  function pause () {\n    debug('paused');\n    self.readyState = 'paused';\n    onPause();\n  }\n\n  if (this.polling || !this.writable) {\n    var total = 0;\n\n    if (this.polling) {\n      debug('we are currently polling - waiting to pause');\n      total++;\n      this.once('pollComplete', function () {\n        debug('pre-pause polling complete');\n        --total || pause();\n      });\n    }\n\n    if (!this.writable) {\n      debug('we are currently writing - waiting to pause');\n      total++;\n      this.once('drain', function () {\n        debug('pre-pause writing complete');\n        --total || pause();\n      });\n    }\n  } else {\n    pause();\n  }\n};\n\n/**\n * Starts polling cycle.\n *\n * @api public\n */\n\nPolling.prototype.poll = function () {\n  debug('polling');\n  this.polling = true;\n  this.doPoll();\n  this.emit('poll');\n};\n\n/**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n\nPolling.prototype.onData = function (data) {\n  var self = this;\n  debug('polling got data %s', data);\n  var callback = function (packet, index, total) {\n    // if its the first message we consider the transport open\n    if ('opening' === self.readyState && packet.type === 'open') {\n      self.onOpen();\n    }\n\n    // if its a close packet, we close the ongoing requests\n    if ('close' === packet.type) {\n      self.onClose();\n      return false;\n    }\n\n    // otherwise bypass onData and handle the message\n    self.onPacket(packet);\n  };\n\n  // decode payload\n  parser.decodePayload(data, this.socket.binaryType, callback);\n\n  // if an event did not trigger closing\n  if ('closed' !== this.readyState) {\n    // if we got data we're not polling\n    this.polling = false;\n    this.emit('pollComplete');\n\n    if ('open' === this.readyState) {\n      this.poll();\n    } else {\n      debug('ignoring poll - transport state \"%s\"', this.readyState);\n    }\n  }\n};\n\n/**\n * For polling, send a close packet.\n *\n * @api private\n */\n\nPolling.prototype.doClose = function () {\n  var self = this;\n\n  function close () {\n    debug('writing close packet');\n    self.write([{ type: 'close' }]);\n  }\n\n  if ('open' === this.readyState) {\n    debug('transport open - closing');\n    close();\n  } else {\n    // in case we're trying to close while\n    // handshaking is in progress (GH-164)\n    debug('transport not open - deferring close');\n    this.once('open', close);\n  }\n};\n\n/**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n\nPolling.prototype.write = function (packets) {\n  var self = this;\n  this.writable = false;\n  var callbackfn = function () {\n    self.writable = true;\n    self.emit('drain');\n  };\n\n  parser.encodePayload(packets, this.supportsBinary, function (data) {\n    self.doWrite(data, callbackfn);\n  });\n};\n\n/**\n * Generates uri for connection.\n *\n * @api private\n */\n\nPolling.prototype.uri = function () {\n  var query = this.query || {};\n  var schema = this.secure ? 'https' : 'http';\n  var port = '';\n\n  // cache busting is forced\n  if (false !== this.timestampRequests) {\n    query[this.timestampParam] = yeast();\n  }\n\n  if (!this.supportsBinary && !query.sid) {\n    query.b64 = 1;\n  }\n\n  query = parseqs.encode(query);\n\n  // avoid port if default for schema\n  if (this.port && (('https' === schema && Number(this.port) !== 443) ||\n     ('http' === schema && Number(this.port) !== 80))) {\n    port = ':' + this.port;\n  }\n\n  // prepend ? to query\n  if (query.length) {\n    query = '?' + query;\n  }\n\n  var ipv6 = this.hostname.indexOf(':') !== -1;\n  return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/polling.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/websocket.js":
/*!*******************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/websocket.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/**\n * Module dependencies.\n */\n\nvar Transport = __webpack_require__(/*! ../transport */ \"./node_modules/engine.io-client/lib/transport.js\");\nvar parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js\");\nvar parseqs = __webpack_require__(/*! parseqs */ \"./node_modules/parseqs/index.js\");\nvar inherit = __webpack_require__(/*! component-inherit */ \"./node_modules/component-inherit/index.js\");\nvar yeast = __webpack_require__(/*! yeast */ \"./node_modules/yeast/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/engine.io-client/node_modules/debug/src/browser.js\")('engine.io-client:websocket');\n\nvar BrowserWebSocket, NodeWebSocket;\n\nif (typeof WebSocket !== 'undefined') {\n  BrowserWebSocket = WebSocket;\n} else if (typeof self !== 'undefined') {\n  BrowserWebSocket = self.WebSocket || self.MozWebSocket;\n}\n\nif (typeof window === 'undefined') {\n  try {\n    NodeWebSocket = __webpack_require__(/*! ws */ 0);\n  } catch (e) { }\n}\n\n/**\n * Get either the `WebSocket` or `MozWebSocket` globals\n * in the browser or try to resolve WebSocket-compatible\n * interface exposed by `ws` for Node-like environment.\n */\n\nvar WebSocketImpl = BrowserWebSocket || NodeWebSocket;\n\n/**\n * Module exports.\n */\n\nmodule.exports = WS;\n\n/**\n * WebSocket transport constructor.\n *\n * @api {Object} connection options\n * @api public\n */\n\nfunction WS (opts) {\n  var forceBase64 = (opts && opts.forceBase64);\n  if (forceBase64) {\n    this.supportsBinary = false;\n  }\n  this.perMessageDeflate = opts.perMessageDeflate;\n  this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode;\n  this.protocols = opts.protocols;\n  if (!this.usingBrowserWebSocket) {\n    WebSocketImpl = NodeWebSocket;\n  }\n  Transport.call(this, opts);\n}\n\n/**\n * Inherits from Transport.\n */\n\ninherit(WS, Transport);\n\n/**\n * Transport name.\n *\n * @api public\n */\n\nWS.prototype.name = 'websocket';\n\n/*\n * WebSockets support binary\n */\n\nWS.prototype.supportsBinary = true;\n\n/**\n * Opens socket.\n *\n * @api private\n */\n\nWS.prototype.doOpen = function () {\n  if (!this.check()) {\n    // let probe timeout\n    return;\n  }\n\n  var uri = this.uri();\n  var protocols = this.protocols;\n\n  var opts = {};\n\n  if (!this.isReactNative) {\n    opts.agent = this.agent;\n    opts.perMessageDeflate = this.perMessageDeflate;\n\n    // SSL options for Node.js client\n    opts.pfx = this.pfx;\n    opts.key = this.key;\n    opts.passphrase = this.passphrase;\n    opts.cert = this.cert;\n    opts.ca = this.ca;\n    opts.ciphers = this.ciphers;\n    opts.rejectUnauthorized = this.rejectUnauthorized;\n  }\n\n  if (this.extraHeaders) {\n    opts.headers = this.extraHeaders;\n  }\n  if (this.localAddress) {\n    opts.localAddress = this.localAddress;\n  }\n\n  try {\n    this.ws =\n      this.usingBrowserWebSocket && !this.isReactNative\n        ? protocols\n          ? new WebSocketImpl(uri, protocols)\n          : new WebSocketImpl(uri)\n        : new WebSocketImpl(uri, protocols, opts);\n  } catch (err) {\n    return this.emit('error', err);\n  }\n\n  if (this.ws.binaryType === undefined) {\n    this.supportsBinary = false;\n  }\n\n  if (this.ws.supports && this.ws.supports.binary) {\n    this.supportsBinary = true;\n    this.ws.binaryType = 'nodebuffer';\n  } else {\n    this.ws.binaryType = 'arraybuffer';\n  }\n\n  this.addEventListeners();\n};\n\n/**\n * Adds event listeners to the socket\n *\n * @api private\n */\n\nWS.prototype.addEventListeners = function () {\n  var self = this;\n\n  this.ws.onopen = function () {\n    self.onOpen();\n  };\n  this.ws.onclose = function () {\n    self.onClose();\n  };\n  this.ws.onmessage = function (ev) {\n    self.onData(ev.data);\n  };\n  this.ws.onerror = function (e) {\n    self.onError('websocket error', e);\n  };\n};\n\n/**\n * Writes data to socket.\n *\n * @param {Array} array of packets.\n * @api private\n */\n\nWS.prototype.write = function (packets) {\n  var self = this;\n  this.writable = false;\n\n  // encodePacket efficient as it uses WS framing\n  // no need for encodePayload\n  var total = packets.length;\n  for (var i = 0, l = total; i < l; i++) {\n    (function (packet) {\n      parser.encodePacket(packet, self.supportsBinary, function (data) {\n        if (!self.usingBrowserWebSocket) {\n          // always create a new object (GH-437)\n          var opts = {};\n          if (packet.options) {\n            opts.compress = packet.options.compress;\n          }\n\n          if (self.perMessageDeflate) {\n            var len = 'string' === typeof data ? Buffer.byteLength(data) : data.length;\n            if (len < self.perMessageDeflate.threshold) {\n              opts.compress = false;\n            }\n          }\n        }\n\n        // Sometimes the websocket has already been closed but the browser didn't\n        // have a chance of informing us about it yet, in that case send will\n        // throw an error\n        try {\n          if (self.usingBrowserWebSocket) {\n            // TypeError is thrown when passing the second argument on Safari\n            self.ws.send(data);\n          } else {\n            self.ws.send(data, opts);\n          }\n        } catch (e) {\n          debug('websocket closed before onclose event');\n        }\n\n        --total || done();\n      });\n    })(packets[i]);\n  }\n\n  function done () {\n    self.emit('flush');\n\n    // fake drain\n    // defer to next tick to allow Socket to clear writeBuffer\n    setTimeout(function () {\n      self.writable = true;\n      self.emit('drain');\n    }, 0);\n  }\n};\n\n/**\n * Called upon close\n *\n * @api private\n */\n\nWS.prototype.onClose = function () {\n  Transport.prototype.onClose.call(this);\n};\n\n/**\n * Closes socket.\n *\n * @api private\n */\n\nWS.prototype.doClose = function () {\n  if (typeof this.ws !== 'undefined') {\n    this.ws.onerror = function () {};\n    this.ws.close();\n  }\n};\n\n/**\n * Generates uri for connection.\n *\n * @api private\n */\n\nWS.prototype.uri = function () {\n  var query = this.query || {};\n  var schema = this.secure ? 'wss' : 'ws';\n  var port = '';\n\n  // avoid port if default for schema\n  if (this.port && (('wss' === schema && Number(this.port) !== 443) ||\n    ('ws' === schema && Number(this.port) !== 80))) {\n    port = ':' + this.port;\n  }\n\n  // append timestamp to URI\n  if (this.timestampRequests) {\n    query[this.timestampParam] = yeast();\n  }\n\n  // communicate binary support capabilities\n  if (!this.supportsBinary) {\n    query.b64 = 1;\n  }\n\n  query = parseqs.encode(query);\n\n  // prepend ? to query\n  if (query.length) {\n    query = '?' + query;\n  }\n\n  var ipv6 = this.hostname.indexOf(':') !== -1;\n  return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;\n};\n\n/**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @api public\n */\n\nWS.prototype.check = function () {\n  return !!WebSocketImpl && !('__initialize' in WebSocketImpl && this.name === WS.prototype.name);\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/websocket.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js":
/*!********************************************************************************!*\
  !*** ./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// browser shim for xmlhttprequest module\n\nvar hasCORS = __webpack_require__(/*! has-cors */ \"./node_modules/has-cors/index.js\");\nvar globalThis = __webpack_require__(/*! ../globalThis */ \"./node_modules/engine.io-client/lib/globalThis.browser.js\");\n\nmodule.exports = function (opts) {\n  var xdomain = opts.xdomain;\n\n  // scheme must be same when usign XDomainRequest\n  // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n  var xscheme = opts.xscheme;\n\n  // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.\n  // https://github.com/Automattic/engine.io-client/pull/217\n  var enablesXDR = opts.enablesXDR;\n\n  // XMLHttpRequest can be disabled on IE\n  try {\n    if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n      return new XMLHttpRequest();\n    }\n  } catch (e) { }\n\n  // Use XDomainRequest for IE8 if enablesXDR is true\n  // because loading bar keeps flashing when using jsonp-polling\n  // https://github.com/yujiosaka/socke.io-ie8-loading-example\n  try {\n    if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) {\n      return new XDomainRequest();\n    }\n  } catch (e) { }\n\n  if (!xdomain) {\n    try {\n      return new globalThis[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');\n    } catch (e) { }\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/lib/transports/xmlhttprequest.browser.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/debug/src/browser.js":
/*!*************************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/debug/src/browser.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = __webpack_require__(/*! ./debug */ \"./node_modules/engine.io-client/node_modules/debug/src/debug.js\");\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n               && 'undefined' != typeof chrome.storage\n                  ? chrome.storage.local\n                  : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',\n  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',\n  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',\n  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',\n  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',\n  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',\n  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',\n  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',\n  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',\n  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',\n  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n  // NB: In an Electron preload script, document will be defined but not fully\n  // initialized. Since we know we're in Chrome, we'll just detect this case\n  // explicitly\n  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n    return true;\n  }\n\n  // Internet Explorer and Edge do not support colors.\n  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n    return false;\n  }\n\n  // is webkit? http://stackoverflow.com/a/16459606/376773\n  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n    // is firebug? http://stackoverflow.com/a/398120/376773\n    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n    // is firefox >= v31?\n    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n    // double check webkit in userAgent just in case we are in a worker\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n  try {\n    return JSON.stringify(v);\n  } catch (err) {\n    return '[UnexpectedJSONParseError]: ' + err.message;\n  }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n  var useColors = this.useColors;\n\n  args[0] = (useColors ? '%c' : '')\n    + this.namespace\n    + (useColors ? ' %c' : ' ')\n    + args[0]\n    + (useColors ? '%c ' : ' ')\n    + '+' + exports.humanize(this.diff);\n\n  if (!useColors) return;\n\n  var c = 'color: ' + this.color;\n  args.splice(1, 0, c, 'color: inherit')\n\n  // the final \"%c\" is somewhat tricky, because there could be other\n  // arguments passed either before or after the %c, so we need to\n  // figure out the correct index to insert the CSS into\n  var index = 0;\n  var lastC = 0;\n  args[0].replace(/%[a-zA-Z%]/g, function(match) {\n    if ('%%' === match) return;\n    index++;\n    if ('%c' === match) {\n      // we only are interested in the *last* %c\n      // (the user may have provided their own)\n      lastC = index;\n    }\n  });\n\n  args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n  // this hackery is required for IE8/9, where\n  // the `console.log` function doesn't have 'apply'\n  return 'object' === typeof console\n    && console.log\n    && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n  try {\n    if (null == namespaces) {\n      exports.storage.removeItem('debug');\n    } else {\n      exports.storage.debug = namespaces;\n    }\n  } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n  var r;\n  try {\n    r = exports.storage.debug;\n  } catch(e) {}\n\n  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n  if (!r && typeof process !== 'undefined' && 'env' in process) {\n    r = process.env.DEBUG;\n  }\n\n  return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n  try {\n    return window.localStorage;\n  } catch (e) {}\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/debug/src/browser.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/debug/src/debug.js":
/*!***********************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/debug/src/debug.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = __webpack_require__(/*! ms */ \"./node_modules/engine.io-client/node_modules/ms/index.js\");\n\n/**\n * Active `debug` instances.\n */\nexports.instances = [];\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n  var hash = 0, i;\n\n  for (i in namespace) {\n    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);\n    hash |= 0; // Convert to 32bit integer\n  }\n\n  return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n  var prevTime;\n\n  function debug() {\n    // disabled?\n    if (!debug.enabled) return;\n\n    var self = debug;\n\n    // set `diff` timestamp\n    var curr = +new Date();\n    var ms = curr - (prevTime || curr);\n    self.diff = ms;\n    self.prev = prevTime;\n    self.curr = curr;\n    prevTime = curr;\n\n    // turn the `arguments` into a proper Array\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n\n    args[0] = exports.coerce(args[0]);\n\n    if ('string' !== typeof args[0]) {\n      // anything else let's inspect with %O\n      args.unshift('%O');\n    }\n\n    // apply any `formatters` transformations\n    var index = 0;\n    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n      // if we encounter an escaped % then don't increase the array index\n      if (match === '%%') return match;\n      index++;\n      var formatter = exports.formatters[format];\n      if ('function' === typeof formatter) {\n        var val = args[index];\n        match = formatter.call(self, val);\n\n        // now we need to remove `args[index]` since it's inlined in the `format`\n        args.splice(index, 1);\n        index--;\n      }\n      return match;\n    });\n\n    // apply env-specific formatting (colors, etc.)\n    exports.formatArgs.call(self, args);\n\n    var logFn = debug.log || exports.log || console.log.bind(console);\n    logFn.apply(self, args);\n  }\n\n  debug.namespace = namespace;\n  debug.enabled = exports.enabled(namespace);\n  debug.useColors = exports.useColors();\n  debug.color = selectColor(namespace);\n  debug.destroy = destroy;\n\n  // env-specific initialization logic for debug instances\n  if ('function' === typeof exports.init) {\n    exports.init(debug);\n  }\n\n  exports.instances.push(debug);\n\n  return debug;\n}\n\nfunction destroy () {\n  var index = exports.instances.indexOf(this);\n  if (index !== -1) {\n    exports.instances.splice(index, 1);\n    return true;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n  exports.save(namespaces);\n\n  exports.names = [];\n  exports.skips = [];\n\n  var i;\n  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n  var len = split.length;\n\n  for (i = 0; i < len; i++) {\n    if (!split[i]) continue; // ignore empty strings\n    namespaces = split[i].replace(/\\*/g, '.*?');\n    if (namespaces[0] === '-') {\n      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n    } else {\n      exports.names.push(new RegExp('^' + namespaces + '$'));\n    }\n  }\n\n  for (i = 0; i < exports.instances.length; i++) {\n    var instance = exports.instances[i];\n    instance.enabled = exports.enabled(instance.namespace);\n  }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n  exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n  if (name[name.length - 1] === '*') {\n    return true;\n  }\n  var i, len;\n  for (i = 0, len = exports.skips.length; i < len; i++) {\n    if (exports.skips[i].test(name)) {\n      return false;\n    }\n  }\n  for (i = 0, len = exports.names.length; i < len; i++) {\n    if (exports.names[i].test(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n  if (val instanceof Error) return val.stack || val.message;\n  return val;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/debug/src/debug.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js":
/*!************************************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Module dependencies.\n */\n\nvar keys = __webpack_require__(/*! ./keys */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/keys.js\");\nvar hasBinary = __webpack_require__(/*! has-binary2 */ \"./node_modules/has-binary2/index.js\");\nvar sliceBuffer = __webpack_require__(/*! arraybuffer.slice */ \"./node_modules/arraybuffer.slice/index.js\");\nvar after = __webpack_require__(/*! after */ \"./node_modules/after/index.js\");\nvar utf8 = __webpack_require__(/*! ./utf8 */ \"./node_modules/engine.io-client/node_modules/engine.io-parser/lib/utf8.js\");\n\nvar base64encoder;\nif (typeof ArrayBuffer !== 'undefined') {\n  base64encoder = __webpack_require__(/*! base64-arraybuffer */ \"./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js\");\n}\n\n/**\n * Check if we are running an android browser. That requires us to use\n * ArrayBuffer with polling transports...\n *\n * http://ghinda.net/jpeg-blob-ajax-android/\n */\n\nvar isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\n/**\n * Check if we are running in PhantomJS.\n * Uploading a Blob with PhantomJS does not work correctly, as reported here:\n * https://github.com/ariya/phantomjs/issues/11395\n * @type boolean\n */\nvar isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent);\n\n/**\n * When true, avoids using Blobs to encode payloads.\n * @type boolean\n */\nvar dontSendBlobs = isAndroid || isPhantomJS;\n\n/**\n * Current protocol version.\n */\n\nexports.protocol = 3;\n\n/**\n * Packet types.\n */\n\nvar packets = exports.packets = {\n    open:     0    // non-ws\n  , close:    1    // non-ws\n  , ping:     2\n  , pong:     3\n  , message:  4\n  , upgrade:  5\n  , noop:     6\n};\n\nvar packetslist = keys(packets);\n\n/**\n * Premade error packet.\n */\n\nvar err = { type: 'error', data: 'parser error' };\n\n/**\n * Create a blob api even for blob builder when vendor prefixes exist\n */\n\nvar Blob = __webpack_require__(/*! blob */ \"./node_modules/blob/index.js\");\n\n/**\n * Encodes a packet.\n *\n *     <packet type id> [ <data> ]\n *\n * Example:\n *\n *     5hello world\n *     3\n *     4\n *\n * Binary is encoded in an identical principle\n *\n * @api private\n */\n\nexports.encodePacket = function (packet, supportsBinary, utf8encode, callback) {\n  if (typeof supportsBinary === 'function') {\n    callback = supportsBinary;\n    supportsBinary = false;\n  }\n\n  if (typeof utf8encode === 'function') {\n    callback = utf8encode;\n    utf8encode = null;\n  }\n\n  var data = (packet.data === undefined)\n    ? undefined\n    : packet.data.buffer || packet.data;\n\n  if (typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) {\n    return encodeArrayBuffer(packet, supportsBinary, callback);\n  } else if (typeof Blob !== 'undefined' && data instanceof Blob) {\n    return encodeBlob(packet, supportsBinary, callback);\n  }\n\n  // might be an object with { base64: true, data: dataAsBase64String }\n  if (data && data.base64) {\n    return encodeBase64Object(packet, callback);\n  }\n\n  // Sending data as a utf-8 string\n  var encoded = packets[packet.type];\n\n  // data fragment is optional\n  if (undefined !== packet.data) {\n    encoded += utf8encode ? utf8.encode(String(packet.data), { strict: false }) : String(packet.data);\n  }\n\n  return callback('' + encoded);\n\n};\n\nfunction encodeBase64Object(packet, callback) {\n  // packet data is an object { base64: true, data: dataAsBase64String }\n  var message = 'b' + exports.packets[packet.type] + packet.data.data;\n  return callback(message);\n}\n\n/**\n * Encode packet helpers for binary types\n */\n\nfunction encodeArrayBuffer(packet, supportsBinary, callback) {\n  if (!supportsBinary) {\n    return exports.encodeBase64Packet(packet, callback);\n  }\n\n  var data = packet.data;\n  var contentArray = new Uint8Array(data);\n  var resultBuffer = new Uint8Array(1 + data.byteLength);\n\n  resultBuffer[0] = packets[packet.type];\n  for (var i = 0; i < contentArray.length; i++) {\n    resultBuffer[i+1] = contentArray[i];\n  }\n\n  return callback(resultBuffer.buffer);\n}\n\nfunction encodeBlobAsArrayBuffer(packet, supportsBinary, callback) {\n  if (!supportsBinary) {\n    return exports.encodeBase64Packet(packet, callback);\n  }\n\n  var fr = new FileReader();\n  fr.onload = function() {\n    exports.encodePacket({ type: packet.type, data: fr.result }, supportsBinary, true, callback);\n  };\n  return fr.readAsArrayBuffer(packet.data);\n}\n\nfunction encodeBlob(packet, supportsBinary, callback) {\n  if (!supportsBinary) {\n    return exports.encodeBase64Packet(packet, callback);\n  }\n\n  if (dontSendBlobs) {\n    return encodeBlobAsArrayBuffer(packet, supportsBinary, callback);\n  }\n\n  var length = new Uint8Array(1);\n  length[0] = packets[packet.type];\n  var blob = new Blob([length.buffer, packet.data]);\n\n  return callback(blob);\n}\n\n/**\n * Encodes a packet with binary data in a base64 string\n *\n * @param {Object} packet, has `type` and `data`\n * @return {String} base64 encoded message\n */\n\nexports.encodeBase64Packet = function(packet, callback) {\n  var message = 'b' + exports.packets[packet.type];\n  if (typeof Blob !== 'undefined' && packet.data instanceof Blob) {\n    var fr = new FileReader();\n    fr.onload = function() {\n      var b64 = fr.result.split(',')[1];\n      callback(message + b64);\n    };\n    return fr.readAsDataURL(packet.data);\n  }\n\n  var b64data;\n  try {\n    b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data));\n  } catch (e) {\n    // iPhone Safari doesn't let you apply with typed arrays\n    var typed = new Uint8Array(packet.data);\n    var basic = new Array(typed.length);\n    for (var i = 0; i < typed.length; i++) {\n      basic[i] = typed[i];\n    }\n    b64data = String.fromCharCode.apply(null, basic);\n  }\n  message += btoa(b64data);\n  return callback(message);\n};\n\n/**\n * Decodes a packet. Changes format to Blob if requested.\n *\n * @return {Object} with `type` and `data` (if any)\n * @api private\n */\n\nexports.decodePacket = function (data, binaryType, utf8decode) {\n  if (data === undefined) {\n    return err;\n  }\n  // String data\n  if (typeof data === 'string') {\n    if (data.charAt(0) === 'b') {\n      return exports.decodeBase64Packet(data.substr(1), binaryType);\n    }\n\n    if (utf8decode) {\n      data = tryDecode(data);\n      if (data === false) {\n        return err;\n      }\n    }\n    var type = data.charAt(0);\n\n    if (Number(type) != type || !packetslist[type]) {\n      return err;\n    }\n\n    if (data.length > 1) {\n      return { type: packetslist[type], data: data.substring(1) };\n    } else {\n      return { type: packetslist[type] };\n    }\n  }\n\n  var asArray = new Uint8Array(data);\n  var type = asArray[0];\n  var rest = sliceBuffer(data, 1);\n  if (Blob && binaryType === 'blob') {\n    rest = new Blob([rest]);\n  }\n  return { type: packetslist[type], data: rest };\n};\n\nfunction tryDecode(data) {\n  try {\n    data = utf8.decode(data, { strict: false });\n  } catch (e) {\n    return false;\n  }\n  return data;\n}\n\n/**\n * Decodes a packet encoded in a base64 string\n *\n * @param {String} base64 encoded message\n * @return {Object} with `type` and `data` (if any)\n */\n\nexports.decodeBase64Packet = function(msg, binaryType) {\n  var type = packetslist[msg.charAt(0)];\n  if (!base64encoder) {\n    return { type: type, data: { base64: true, data: msg.substr(1) } };\n  }\n\n  var data = base64encoder.decode(msg.substr(1));\n\n  if (binaryType === 'blob' && Blob) {\n    data = new Blob([data]);\n  }\n\n  return { type: type, data: data };\n};\n\n/**\n * Encodes multiple messages (payload).\n *\n *     <length>:data\n *\n * Example:\n *\n *     11:hello world2:hi\n *\n * If any contents are binary, they will be encoded as base64 strings. Base64\n * encoded strings are marked with a b before the length specifier\n *\n * @param {Array} packets\n * @api private\n */\n\nexports.encodePayload = function (packets, supportsBinary, callback) {\n  if (typeof supportsBinary === 'function') {\n    callback = supportsBinary;\n    supportsBinary = null;\n  }\n\n  var isBinary = hasBinary(packets);\n\n  if (supportsBinary && isBinary) {\n    if (Blob && !dontSendBlobs) {\n      return exports.encodePayloadAsBlob(packets, callback);\n    }\n\n    return exports.encodePayloadAsArrayBuffer(packets, callback);\n  }\n\n  if (!packets.length) {\n    return callback('0:');\n  }\n\n  function setLengthHeader(message) {\n    return message.length + ':' + message;\n  }\n\n  function encodeOne(packet, doneCallback) {\n    exports.encodePacket(packet, !isBinary ? false : supportsBinary, false, function(message) {\n      doneCallback(null, setLengthHeader(message));\n    });\n  }\n\n  map(packets, encodeOne, function(err, results) {\n    return callback(results.join(''));\n  });\n};\n\n/**\n * Async array map using after\n */\n\nfunction map(ary, each, done) {\n  var result = new Array(ary.length);\n  var next = after(ary.length, done);\n\n  var eachWithIndex = function(i, el, cb) {\n    each(el, function(error, msg) {\n      result[i] = msg;\n      cb(error, result);\n    });\n  };\n\n  for (var i = 0; i < ary.length; i++) {\n    eachWithIndex(i, ary[i], next);\n  }\n}\n\n/*\n * Decodes data when a payload is maybe expected. Possible binary contents are\n * decoded from their base64 representation\n *\n * @param {String} data, callback method\n * @api public\n */\n\nexports.decodePayload = function (data, binaryType, callback) {\n  if (typeof data !== 'string') {\n    return exports.decodePayloadAsBinary(data, binaryType, callback);\n  }\n\n  if (typeof binaryType === 'function') {\n    callback = binaryType;\n    binaryType = null;\n  }\n\n  var packet;\n  if (data === '') {\n    // parser error - ignoring payload\n    return callback(err, 0, 1);\n  }\n\n  var length = '', n, msg;\n\n  for (var i = 0, l = data.length; i < l; i++) {\n    var chr = data.charAt(i);\n\n    if (chr !== ':') {\n      length += chr;\n      continue;\n    }\n\n    if (length === '' || (length != (n = Number(length)))) {\n      // parser error - ignoring payload\n      return callback(err, 0, 1);\n    }\n\n    msg = data.substr(i + 1, n);\n\n    if (length != msg.length) {\n      // parser error - ignoring payload\n      return callback(err, 0, 1);\n    }\n\n    if (msg.length) {\n      packet = exports.decodePacket(msg, binaryType, false);\n\n      if (err.type === packet.type && err.data === packet.data) {\n        // parser error in individual packet - ignoring payload\n        return callback(err, 0, 1);\n      }\n\n      var ret = callback(packet, i + n, l);\n      if (false === ret) return;\n    }\n\n    // advance cursor\n    i += n;\n    length = '';\n  }\n\n  if (length !== '') {\n    // parser error - ignoring payload\n    return callback(err, 0, 1);\n  }\n\n};\n\n/**\n * Encodes multiple messages (payload) as binary.\n *\n * <1 = binary, 0 = string><number from 0-9><number from 0-9>[...]<number\n * 255><data>\n *\n * Example:\n * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers\n *\n * @param {Array} packets\n * @return {ArrayBuffer} encoded payload\n * @api private\n */\n\nexports.encodePayloadAsArrayBuffer = function(packets, callback) {\n  if (!packets.length) {\n    return callback(new ArrayBuffer(0));\n  }\n\n  function encodeOne(packet, doneCallback) {\n    exports.encodePacket(packet, true, true, function(data) {\n      return doneCallback(null, data);\n    });\n  }\n\n  map(packets, encodeOne, function(err, encodedPackets) {\n    var totalLength = encodedPackets.reduce(function(acc, p) {\n      var len;\n      if (typeof p === 'string'){\n        len = p.length;\n      } else {\n        len = p.byteLength;\n      }\n      return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2\n    }, 0);\n\n    var resultArray = new Uint8Array(totalLength);\n\n    var bufferIndex = 0;\n    encodedPackets.forEach(function(p) {\n      var isString = typeof p === 'string';\n      var ab = p;\n      if (isString) {\n        var view = new Uint8Array(p.length);\n        for (var i = 0; i < p.length; i++) {\n          view[i] = p.charCodeAt(i);\n        }\n        ab = view.buffer;\n      }\n\n      if (isString) { // not true binary\n        resultArray[bufferIndex++] = 0;\n      } else { // true binary\n        resultArray[bufferIndex++] = 1;\n      }\n\n      var lenStr = ab.byteLength.toString();\n      for (var i = 0; i < lenStr.length; i++) {\n        resultArray[bufferIndex++] = parseInt(lenStr[i]);\n      }\n      resultArray[bufferIndex++] = 255;\n\n      var view = new Uint8Array(ab);\n      for (var i = 0; i < view.length; i++) {\n        resultArray[bufferIndex++] = view[i];\n      }\n    });\n\n    return callback(resultArray.buffer);\n  });\n};\n\n/**\n * Encode as Blob\n */\n\nexports.encodePayloadAsBlob = function(packets, callback) {\n  function encodeOne(packet, doneCallback) {\n    exports.encodePacket(packet, true, true, function(encoded) {\n      var binaryIdentifier = new Uint8Array(1);\n      binaryIdentifier[0] = 1;\n      if (typeof encoded === 'string') {\n        var view = new Uint8Array(encoded.length);\n        for (var i = 0; i < encoded.length; i++) {\n          view[i] = encoded.charCodeAt(i);\n        }\n        encoded = view.buffer;\n        binaryIdentifier[0] = 0;\n      }\n\n      var len = (encoded instanceof ArrayBuffer)\n        ? encoded.byteLength\n        : encoded.size;\n\n      var lenStr = len.toString();\n      var lengthAry = new Uint8Array(lenStr.length + 1);\n      for (var i = 0; i < lenStr.length; i++) {\n        lengthAry[i] = parseInt(lenStr[i]);\n      }\n      lengthAry[lenStr.length] = 255;\n\n      if (Blob) {\n        var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]);\n        doneCallback(null, blob);\n      }\n    });\n  }\n\n  map(packets, encodeOne, function(err, results) {\n    return callback(new Blob(results));\n  });\n};\n\n/*\n * Decodes data when a payload is maybe expected. Strings are decoded by\n * interpreting each byte as a key code for entries marked to start with 0. See\n * description of encodePayloadAsBinary\n *\n * @param {ArrayBuffer} data, callback method\n * @api public\n */\n\nexports.decodePayloadAsBinary = function (data, binaryType, callback) {\n  if (typeof binaryType === 'function') {\n    callback = binaryType;\n    binaryType = null;\n  }\n\n  var bufferTail = data;\n  var buffers = [];\n\n  while (bufferTail.byteLength > 0) {\n    var tailArray = new Uint8Array(bufferTail);\n    var isString = tailArray[0] === 0;\n    var msgLength = '';\n\n    for (var i = 1; ; i++) {\n      if (tailArray[i] === 255) break;\n\n      // 310 = char length of Number.MAX_VALUE\n      if (msgLength.length > 310) {\n        return callback(err, 0, 1);\n      }\n\n      msgLength += tailArray[i];\n    }\n\n    bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length);\n    msgLength = parseInt(msgLength);\n\n    var msg = sliceBuffer(bufferTail, 0, msgLength);\n    if (isString) {\n      try {\n        msg = String.fromCharCode.apply(null, new Uint8Array(msg));\n      } catch (e) {\n        // iPhone Safari doesn't let you apply to typed arrays\n        var typed = new Uint8Array(msg);\n        msg = '';\n        for (var i = 0; i < typed.length; i++) {\n          msg += String.fromCharCode(typed[i]);\n        }\n      }\n    }\n\n    buffers.push(msg);\n    bufferTail = sliceBuffer(bufferTail, msgLength);\n  }\n\n  var total = buffers.length;\n  buffers.forEach(function(buffer, i) {\n    callback(exports.decodePacket(buffer, binaryType, true), i, total);\n  });\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/engine.io-parser/lib/browser.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/engine.io-parser/lib/keys.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/engine.io-parser/lib/keys.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n/**\n * Gets the keys for an object.\n *\n * @return {Array} keys\n * @api private\n */\n\nmodule.exports = Object.keys || function keys (obj){\n  var arr = [];\n  var has = Object.prototype.hasOwnProperty;\n\n  for (var i in obj) {\n    if (has.call(obj, i)) {\n      arr.push(i);\n    }\n  }\n  return arr;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/engine.io-parser/lib/keys.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/engine.io-parser/lib/utf8.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/engine.io-parser/lib/utf8.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*! https://mths.be/utf8js v2.1.2 by @mathias */\n\nvar stringFromCharCode = String.fromCharCode;\n\n// Taken from https://mths.be/punycode\nfunction ucs2decode(string) {\n\tvar output = [];\n\tvar counter = 0;\n\tvar length = string.length;\n\tvar value;\n\tvar extra;\n\twhile (counter < length) {\n\t\tvalue = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// high surrogate, and there is a next character\n\t\t\textra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n// Taken from https://mths.be/punycode\nfunction ucs2encode(array) {\n\tvar length = array.length;\n\tvar index = -1;\n\tvar value;\n\tvar output = '';\n\twhile (++index < length) {\n\t\tvalue = array[index];\n\t\tif (value > 0xFFFF) {\n\t\t\tvalue -= 0x10000;\n\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t}\n\t\toutput += stringFromCharCode(value);\n\t}\n\treturn output;\n}\n\nfunction checkScalarValue(codePoint, strict) {\n\tif (codePoint >= 0xD800 && codePoint <= 0xDFFF) {\n\t\tif (strict) {\n\t\t\tthrow Error(\n\t\t\t\t'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +\n\t\t\t\t' is not a scalar value'\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n/*--------------------------------------------------------------------------*/\n\nfunction createByte(codePoint, shift) {\n\treturn stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);\n}\n\nfunction encodeCodePoint(codePoint, strict) {\n\tif ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence\n\t\treturn stringFromCharCode(codePoint);\n\t}\n\tvar symbol = '';\n\tif ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence\n\t\tsymbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);\n\t}\n\telse if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence\n\t\tif (!checkScalarValue(codePoint, strict)) {\n\t\t\tcodePoint = 0xFFFD;\n\t\t}\n\t\tsymbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);\n\t\tsymbol += createByte(codePoint, 6);\n\t}\n\telse if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence\n\t\tsymbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);\n\t\tsymbol += createByte(codePoint, 12);\n\t\tsymbol += createByte(codePoint, 6);\n\t}\n\tsymbol += stringFromCharCode((codePoint & 0x3F) | 0x80);\n\treturn symbol;\n}\n\nfunction utf8encode(string, opts) {\n\topts = opts || {};\n\tvar strict = false !== opts.strict;\n\n\tvar codePoints = ucs2decode(string);\n\tvar length = codePoints.length;\n\tvar index = -1;\n\tvar codePoint;\n\tvar byteString = '';\n\twhile (++index < length) {\n\t\tcodePoint = codePoints[index];\n\t\tbyteString += encodeCodePoint(codePoint, strict);\n\t}\n\treturn byteString;\n}\n\n/*--------------------------------------------------------------------------*/\n\nfunction readContinuationByte() {\n\tif (byteIndex >= byteCount) {\n\t\tthrow Error('Invalid byte index');\n\t}\n\n\tvar continuationByte = byteArray[byteIndex] & 0xFF;\n\tbyteIndex++;\n\n\tif ((continuationByte & 0xC0) == 0x80) {\n\t\treturn continuationByte & 0x3F;\n\t}\n\n\t// If we end up here, it’s not a continuation byte\n\tthrow Error('Invalid continuation byte');\n}\n\nfunction decodeSymbol(strict) {\n\tvar byte1;\n\tvar byte2;\n\tvar byte3;\n\tvar byte4;\n\tvar codePoint;\n\n\tif (byteIndex > byteCount) {\n\t\tthrow Error('Invalid byte index');\n\t}\n\n\tif (byteIndex == byteCount) {\n\t\treturn false;\n\t}\n\n\t// Read first byte\n\tbyte1 = byteArray[byteIndex] & 0xFF;\n\tbyteIndex++;\n\n\t// 1-byte sequence (no continuation bytes)\n\tif ((byte1 & 0x80) == 0) {\n\t\treturn byte1;\n\t}\n\n\t// 2-byte sequence\n\tif ((byte1 & 0xE0) == 0xC0) {\n\t\tbyte2 = readContinuationByte();\n\t\tcodePoint = ((byte1 & 0x1F) << 6) | byte2;\n\t\tif (codePoint >= 0x80) {\n\t\t\treturn codePoint;\n\t\t} else {\n\t\t\tthrow Error('Invalid continuation byte');\n\t\t}\n\t}\n\n\t// 3-byte sequence (may include unpaired surrogates)\n\tif ((byte1 & 0xF0) == 0xE0) {\n\t\tbyte2 = readContinuationByte();\n\t\tbyte3 = readContinuationByte();\n\t\tcodePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;\n\t\tif (codePoint >= 0x0800) {\n\t\t\treturn checkScalarValue(codePoint, strict) ? codePoint : 0xFFFD;\n\t\t} else {\n\t\t\tthrow Error('Invalid continuation byte');\n\t\t}\n\t}\n\n\t// 4-byte sequence\n\tif ((byte1 & 0xF8) == 0xF0) {\n\t\tbyte2 = readContinuationByte();\n\t\tbyte3 = readContinuationByte();\n\t\tbyte4 = readContinuationByte();\n\t\tcodePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) |\n\t\t\t(byte3 << 0x06) | byte4;\n\t\tif (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\n\t\t\treturn codePoint;\n\t\t}\n\t}\n\n\tthrow Error('Invalid UTF-8 detected');\n}\n\nvar byteArray;\nvar byteCount;\nvar byteIndex;\nfunction utf8decode(byteString, opts) {\n\topts = opts || {};\n\tvar strict = false !== opts.strict;\n\n\tbyteArray = ucs2decode(byteString);\n\tbyteCount = byteArray.length;\n\tbyteIndex = 0;\n\tvar codePoints = [];\n\tvar tmp;\n\twhile ((tmp = decodeSymbol(strict)) !== false) {\n\t\tcodePoints.push(tmp);\n\t}\n\treturn ucs2encode(codePoints);\n}\n\nmodule.exports = {\n\tversion: '2.1.2',\n\tencode: utf8encode,\n\tdecode: utf8decode\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/engine.io-parser/lib/utf8.js?");

/***/ }),

/***/ "./node_modules/engine.io-client/node_modules/ms/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/engine.io-client/node_modules/ms/index.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isNaN(val) === false) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  if (ms >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (ms >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (ms >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (ms >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  return plural(ms, d, 'day') ||\n    plural(ms, h, 'hour') ||\n    plural(ms, m, 'minute') ||\n    plural(ms, s, 'second') ||\n    ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n  if (ms < n) {\n    return;\n  }\n  if (ms < n * 1.5) {\n    return Math.floor(ms / n) + ' ' + name;\n  }\n  return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/engine.io-client/node_modules/ms/index.js?");

/***/ }),

/***/ "./node_modules/ev-emitter/ev-emitter.js":
/*!***********************************************!*\
  !*** ./node_modules/ev-emitter/ev-emitter.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n  // universal module definition\n  /* jshint strict: false */ /* globals define, module, window */\n  if ( true ) {\n    // AMD - RequireJS\n    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n  if ( !eventName || !listener ) {\n    return;\n  }\n  // set events hash\n  var events = this._events = this._events || {};\n  // set listeners array\n  var listeners = events[ eventName ] = events[ eventName ] || [];\n  // only add once\n  if ( listeners.indexOf( listener ) == -1 ) {\n    listeners.push( listener );\n  }\n\n  return this;\n};\n\nproto.once = function( eventName, listener ) {\n  if ( !eventName || !listener ) {\n    return;\n  }\n  // add event\n  this.on( eventName, listener );\n  // set once flag\n  // set onceEvents hash\n  var onceEvents = this._onceEvents = this._onceEvents || {};\n  // set onceListeners object\n  var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n  // set flag\n  onceListeners[ listener ] = true;\n\n  return this;\n};\n\nproto.off = function( eventName, listener ) {\n  var listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) {\n    return;\n  }\n  var index = listeners.indexOf( listener );\n  if ( index != -1 ) {\n    listeners.splice( index, 1 );\n  }\n\n  return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n  var listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) {\n    return;\n  }\n  // copy over to avoid interference if .off() in listener\n  listeners = listeners.slice(0);\n  args = args || [];\n  // once stuff\n  var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n  for ( var i=0; i < listeners.length; i++ ) {\n    var listener = listeners[i]\n    var isOnce = onceListeners && onceListeners[ listener ];\n    if ( isOnce ) {\n      // remove listener\n      // remove before trigger to prevent recursion\n      this.off( eventName, listener );\n      // unset once flag\n      delete onceListeners[ listener ];\n    }\n    // trigger listener\n    listener.apply( this, args );\n  }\n\n  return this;\n};\n\nproto.allOff = function() {\n  delete this._events;\n  delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/ev-emitter/ev-emitter.js?");

/***/ }),

/***/ "./node_modules/exports-loader/index.js?Hammer!./node_modules/jquery-hammerjs/jquery.hammer-full.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/exports-loader?Hammer!./node_modules/jquery-hammerjs/jquery.hammer-full.js ***!
  \*************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! jQuery plugin for Hammer.JS - v1.1.3 - 2014-05-20\n * http://eightmedia.github.com/hammer.js\n *\n * Copyright (c) 2014 Jorik Tangelder <j.tangelder@gmail.com>;\n * Licensed under the MIT license */\n(function(window, undefined) {\n  'use strict';\n\n/**\n * @main\n * @module hammer\n *\n * @class Hammer\n * @static\n */\n\n/**\n * Hammer, use this to create instances\n * ````\n * var hammertime = new Hammer(myElement);\n * ````\n *\n * @method Hammer\n * @param {HTMLElement} element\n * @param {Object} [options={}]\n * @return {Hammer.Instance}\n */\nvar Hammer = function Hammer(element, options) {\n    return new Hammer.Instance(element, options || {});\n};\n\n/**\n * version, as defined in package.json\n * the value will be set at each build\n * @property VERSION\n * @final\n * @type {String}\n */\nHammer.VERSION = '1.1.3';\n\n/**\n * default settings.\n * more settings are defined per gesture at `/gestures`. Each gesture can be disabled/enabled\n * by setting it's name (like `swipe`) to false.\n * You can set the defaults for all instances by changing this object before creating an instance.\n * @example\n * ````\n *  Hammer.defaults.drag = false;\n *  Hammer.defaults.behavior.touchAction = 'pan-y';\n *  delete Hammer.defaults.behavior.userSelect;\n * ````\n * @property defaults\n * @type {Object}\n */\nHammer.defaults = {\n    /**\n     * this setting object adds styles and attributes to the element to prevent the browser from doing\n     * its native behavior. The css properties are auto prefixed for the browsers when needed.\n     * @property defaults.behavior\n     * @type {Object}\n     */\n    behavior: {\n        /**\n         * Disables text selection to improve the dragging gesture. When the value is `none` it also sets\n         * `onselectstart=false` for IE on the element. Mainly for desktop browsers.\n         * @property defaults.behavior.userSelect\n         * @type {String}\n         * @default 'none'\n         */\n        userSelect: 'none',\n\n        /**\n         * Specifies whether and how a given region can be manipulated by the user (for instance, by panning or zooming).\n         * Used by Chrome 35> and IE10>. By default this makes the element blocking any touch event.\n         * @property defaults.behavior.touchAction\n         * @type {String}\n         * @default: 'pan-y'\n         */\n        touchAction: 'pan-y',\n\n        /**\n         * Disables the default callout shown when you touch and hold a touch target.\n         * On iOS, when you touch and hold a touch target such as a link, Safari displays\n         * a callout containing information about the link. This property allows you to disable that callout.\n         * @property defaults.behavior.touchCallout\n         * @type {String}\n         * @default 'none'\n         */\n        touchCallout: 'none',\n\n        /**\n         * Specifies whether zooming is enabled. Used by IE10>\n         * @property defaults.behavior.contentZooming\n         * @type {String}\n         * @default 'none'\n         */\n        contentZooming: 'none',\n\n        /**\n         * Specifies that an entire element should be draggable instead of its contents.\n         * Mainly for desktop browsers.\n         * @property defaults.behavior.userDrag\n         * @type {String}\n         * @default 'none'\n         */\n        userDrag: 'none',\n\n        /**\n         * Overrides the highlight color shown when the user taps a link or a JavaScript\n         * clickable element in Safari on iPhone. This property obeys the alpha value, if specified.\n         *\n         * If you don't specify an alpha value, Safari on iPhone applies a default alpha value\n         * to the color. To disable tap highlighting, set the alpha value to 0 (invisible).\n         * If you set the alpha value to 1.0 (opaque), the element is not visible when tapped.\n         * @property defaults.behavior.tapHighlightColor\n         * @type {String}\n         * @default 'rgba(0,0,0,0)'\n         */\n        tapHighlightColor: 'rgba(0,0,0,0)'\n    }\n};\n\n/**\n * hammer document where the base events are added at\n * @property DOCUMENT\n * @type {HTMLElement}\n * @default window.document\n */\nHammer.DOCUMENT = document;\n\n/**\n * detect support for pointer events\n * @property HAS_POINTEREVENTS\n * @type {Boolean}\n */\nHammer.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled;\n\n/**\n * detect support for touch events\n * @property HAS_TOUCHEVENTS\n * @type {Boolean}\n */\nHammer.HAS_TOUCHEVENTS = ('ontouchstart' in window);\n\n/**\n * detect mobile browsers\n * @property IS_MOBILE\n * @type {Boolean}\n */\nHammer.IS_MOBILE = /mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);\n\n/**\n * detect if we want to support mouseevents at all\n * @property NO_MOUSEEVENTS\n * @type {Boolean}\n */\nHammer.NO_MOUSEEVENTS = (Hammer.HAS_TOUCHEVENTS && Hammer.IS_MOBILE) || Hammer.HAS_POINTEREVENTS;\n\n/**\n * interval in which Hammer recalculates current velocity/direction/angle in ms\n * @property CALCULATE_INTERVAL\n * @type {Number}\n * @default 25\n */\nHammer.CALCULATE_INTERVAL = 25;\n\n/**\n * eventtypes per touchevent (start, move, end) are filled by `Event.determineEventTypes` on `setup`\n * the object contains the DOM event names per type (`EVENT_START`, `EVENT_MOVE`, `EVENT_END`)\n * @property EVENT_TYPES\n * @private\n * @writeOnce\n * @type {Object}\n */\nvar EVENT_TYPES = {};\n\n/**\n * direction strings, for safe comparisons\n * @property DIRECTION_DOWN|LEFT|UP|RIGHT\n * @final\n * @type {String}\n * @default 'down' 'left' 'up' 'right'\n */\nvar DIRECTION_DOWN = Hammer.DIRECTION_DOWN = 'down';\nvar DIRECTION_LEFT = Hammer.DIRECTION_LEFT = 'left';\nvar DIRECTION_UP = Hammer.DIRECTION_UP = 'up';\nvar DIRECTION_RIGHT = Hammer.DIRECTION_RIGHT = 'right';\n\n/**\n * pointertype strings, for safe comparisons\n * @property POINTER_MOUSE|TOUCH|PEN\n * @final\n * @type {String}\n * @default 'mouse' 'touch' 'pen'\n */\nvar POINTER_MOUSE = Hammer.POINTER_MOUSE = 'mouse';\nvar POINTER_TOUCH = Hammer.POINTER_TOUCH = 'touch';\nvar POINTER_PEN = Hammer.POINTER_PEN = 'pen';\n\n/**\n * eventtypes\n * @property EVENT_START|MOVE|END|RELEASE|TOUCH\n * @final\n * @type {String}\n * @default 'start' 'change' 'move' 'end' 'release' 'touch'\n */\nvar EVENT_START = Hammer.EVENT_START = 'start';\nvar EVENT_MOVE = Hammer.EVENT_MOVE = 'move';\nvar EVENT_END = Hammer.EVENT_END = 'end';\nvar EVENT_RELEASE = Hammer.EVENT_RELEASE = 'release';\nvar EVENT_TOUCH = Hammer.EVENT_TOUCH = 'touch';\n\n/**\n * if the window events are set...\n * @property READY\n * @writeOnce\n * @type {Boolean}\n * @default false\n */\nHammer.READY = false;\n\n/**\n * plugins namespace\n * @property plugins\n * @type {Object}\n */\nHammer.plugins = Hammer.plugins || {};\n\n/**\n * gestures namespace\n * see `/gestures` for the definitions\n * @property gestures\n * @type {Object}\n */\nHammer.gestures = Hammer.gestures || {};\n\n/**\n * setup events to detect gestures on the document\n * this function is called when creating an new instance\n * @private\n */\nfunction setup() {\n    if(Hammer.READY) {\n        return;\n    }\n\n    // find what eventtypes we add listeners to\n    Event.determineEventTypes();\n\n    // Register all gestures inside Hammer.gestures\n    Utils.each(Hammer.gestures, function(gesture) {\n        Detection.register(gesture);\n    });\n\n    // Add touch events on the document\n    Event.onTouch(Hammer.DOCUMENT, EVENT_MOVE, Detection.detect);\n    Event.onTouch(Hammer.DOCUMENT, EVENT_END, Detection.detect);\n\n    // Hammer is ready...!\n    Hammer.READY = true;\n}\n\n/**\n * @module hammer\n *\n * @class Utils\n * @static\n */\nvar Utils = Hammer.utils = {\n    /**\n     * extend method, could also be used for cloning when `dest` is an empty object.\n     * changes the dest object\n     * @method extend\n     * @param {Object} dest\n     * @param {Object} src\n     * @param {Boolean} [merge=false]  do a merge\n     * @return {Object} dest\n     */\n    extend: function extend(dest, src, merge) {\n        for(var key in src) {\n            if(!src.hasOwnProperty(key) || (dest[key] !== undefined && merge)) {\n                continue;\n            }\n            dest[key] = src[key];\n        }\n        return dest;\n    },\n\n    /**\n     * simple addEventListener wrapper\n     * @method on\n     * @param {HTMLElement} element\n     * @param {String} type\n     * @param {Function} handler\n     */\n    on: function on(element, type, handler) {\n        element.addEventListener(type, handler, false);\n    },\n\n    /**\n     * simple removeEventListener wrapper\n     * @method off\n     * @param {HTMLElement} element\n     * @param {String} type\n     * @param {Function} handler\n     */\n    off: function off(element, type, handler) {\n        element.removeEventListener(type, handler, false);\n    },\n\n    /**\n     * forEach over arrays and objects\n     * @method each\n     * @param {Object|Array} obj\n     * @param {Function} iterator\n     * @param {any} iterator.item\n     * @param {Number} iterator.index\n     * @param {Object|Array} iterator.obj the source object\n     * @param {Object} context value to use as `this` in the iterator\n     */\n    each: function each(obj, iterator, context) {\n        var i, len;\n\n        // native forEach on arrays\n        if('forEach' in obj) {\n            obj.forEach(iterator, context);\n        // arrays\n        } else if(obj.length !== undefined) {\n            for(i = 0, len = obj.length; i < len; i++) {\n                if(iterator.call(context, obj[i], i, obj) === false) {\n                    return;\n                }\n            }\n        // objects\n        } else {\n            for(i in obj) {\n                if(obj.hasOwnProperty(i) &&\n                    iterator.call(context, obj[i], i, obj) === false) {\n                    return;\n                }\n            }\n        }\n    },\n\n    /**\n     * find if a string contains the string using indexOf\n     * @method inStr\n     * @param {String} src\n     * @param {String} find\n     * @return {Boolean} found\n     */\n    inStr: function inStr(src, find) {\n        return src.indexOf(find) > -1;\n    },\n\n    /**\n     * find if a array contains the object using indexOf or a simple polyfill\n     * @method inArray\n     * @param {String} src\n     * @param {String} find\n     * @return {Boolean|Number} false when not found, or the index\n     */\n    inArray: function inArray(src, find) {\n        if(src.indexOf) {\n            var index = src.indexOf(find);\n            return (index === -1) ? false : index;\n        } else {\n            for(var i = 0, len = src.length; i < len; i++) {\n                if(src[i] === find) {\n                    return i;\n                }\n            }\n            return false;\n        }\n    },\n\n    /**\n     * convert an array-like object (`arguments`, `touchlist`) to an array\n     * @method toArray\n     * @param {Object} obj\n     * @return {Array}\n     */\n    toArray: function toArray(obj) {\n        return Array.prototype.slice.call(obj, 0);\n    },\n\n    /**\n     * find if a node is in the given parent\n     * @method hasParent\n     * @param {HTMLElement} node\n     * @param {HTMLElement} parent\n     * @return {Boolean} found\n     */\n    hasParent: function hasParent(node, parent) {\n        while(node) {\n            if(node == parent) {\n                return true;\n            }\n            node = node.parentNode;\n        }\n        return false;\n    },\n\n    /**\n     * get the center of all the touches\n     * @method getCenter\n     * @param {Array} touches\n     * @return {Object} center contains `pageX`, `pageY`, `clientX` and `clientY` properties\n     */\n    getCenter: function getCenter(touches) {\n        var pageX = [],\n            pageY = [],\n            clientX = [],\n            clientY = [],\n            min = Math.min,\n            max = Math.max;\n\n        // no need to loop when only one touch\n        if(touches.length === 1) {\n            return {\n                pageX: touches[0].pageX,\n                pageY: touches[0].pageY,\n                clientX: touches[0].clientX,\n                clientY: touches[0].clientY\n            };\n        }\n\n        Utils.each(touches, function(touch) {\n            pageX.push(touch.pageX);\n            pageY.push(touch.pageY);\n            clientX.push(touch.clientX);\n            clientY.push(touch.clientY);\n        });\n\n        return {\n            pageX: (min.apply(Math, pageX) + max.apply(Math, pageX)) / 2,\n            pageY: (min.apply(Math, pageY) + max.apply(Math, pageY)) / 2,\n            clientX: (min.apply(Math, clientX) + max.apply(Math, clientX)) / 2,\n            clientY: (min.apply(Math, clientY) + max.apply(Math, clientY)) / 2\n        };\n    },\n\n    /**\n     * calculate the velocity between two points. unit is in px per ms.\n     * @method getVelocity\n     * @param {Number} deltaTime\n     * @param {Number} deltaX\n     * @param {Number} deltaY\n     * @return {Object} velocity `x` and `y`\n     */\n    getVelocity: function getVelocity(deltaTime, deltaX, deltaY) {\n        return {\n            x: Math.abs(deltaX / deltaTime) || 0,\n            y: Math.abs(deltaY / deltaTime) || 0\n        };\n    },\n\n    /**\n     * calculate the angle between two coordinates\n     * @method getAngle\n     * @param {Touch} touch1\n     * @param {Touch} touch2\n     * @return {Number} angle\n     */\n    getAngle: function getAngle(touch1, touch2) {\n        var x = touch2.clientX - touch1.clientX,\n            y = touch2.clientY - touch1.clientY;\n\n        return Math.atan2(y, x) * 180 / Math.PI;\n    },\n\n    /**\n     * do a small comparision to get the direction between two touches.\n     * @method getDirection\n     * @param {Touch} touch1\n     * @param {Touch} touch2\n     * @return {String} direction matches `DIRECTION_LEFT|RIGHT|UP|DOWN`\n     */\n    getDirection: function getDirection(touch1, touch2) {\n        var x = Math.abs(touch1.clientX - touch2.clientX),\n            y = Math.abs(touch1.clientY - touch2.clientY);\n\n        if(x >= y) {\n            return touch1.clientX - touch2.clientX > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n        }\n        return touch1.clientY - touch2.clientY > 0 ? DIRECTION_UP : DIRECTION_DOWN;\n    },\n\n    /**\n     * calculate the distance between two touches\n     * @method getDistance\n     * @param {Touch}touch1\n     * @param {Touch} touch2\n     * @return {Number} distance\n     */\n    getDistance: function getDistance(touch1, touch2) {\n        var x = touch2.clientX - touch1.clientX,\n            y = touch2.clientY - touch1.clientY;\n\n        return Math.sqrt((x * x) + (y * y));\n    },\n\n    /**\n     * calculate the scale factor between two touchLists\n     * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n     * @method getScale\n     * @param {Array} start array of touches\n     * @param {Array} end array of touches\n     * @return {Number} scale\n     */\n    getScale: function getScale(start, end) {\n        // need two fingers...\n        if(start.length >= 2 && end.length >= 2) {\n            return this.getDistance(end[0], end[1]) / this.getDistance(start[0], start[1]);\n        }\n        return 1;\n    },\n\n    /**\n     * calculate the rotation degrees between two touchLists\n     * @method getRotation\n     * @param {Array} start array of touches\n     * @param {Array} end array of touches\n     * @return {Number} rotation\n     */\n    getRotation: function getRotation(start, end) {\n        // need two fingers\n        if(start.length >= 2 && end.length >= 2) {\n            return this.getAngle(end[1], end[0]) - this.getAngle(start[1], start[0]);\n        }\n        return 0;\n    },\n\n    /**\n     * find out if the direction is vertical   *\n     * @method isVertical\n     * @param {String} direction matches `DIRECTION_UP|DOWN`\n     * @return {Boolean} is_vertical\n     */\n    isVertical: function isVertical(direction) {\n        return direction == DIRECTION_UP || direction == DIRECTION_DOWN;\n    },\n\n    /**\n     * set css properties with their prefixes\n     * @param {HTMLElement} element\n     * @param {String} prop\n     * @param {String} value\n     * @param {Boolean} [toggle=true]\n     * @return {Boolean}\n     */\n    setPrefixedCss: function setPrefixedCss(element, prop, value, toggle) {\n        var prefixes = ['', 'Webkit', 'Moz', 'O', 'ms'];\n        prop = Utils.toCamelCase(prop);\n\n        for(var i = 0; i < prefixes.length; i++) {\n            var p = prop;\n            // prefixes\n            if(prefixes[i]) {\n                p = prefixes[i] + p.slice(0, 1).toUpperCase() + p.slice(1);\n            }\n\n            // test the style\n            if(p in element.style) {\n                element.style[p] = (toggle == null || toggle) && value || '';\n                break;\n            }\n        }\n    },\n\n    /**\n     * toggle browser default behavior by setting css properties.\n     * `userSelect='none'` also sets `element.onselectstart` to false\n     * `userDrag='none'` also sets `element.ondragstart` to false\n     *\n     * @method toggleBehavior\n     * @param {HtmlElement} element\n     * @param {Object} props\n     * @param {Boolean} [toggle=true]\n     */\n    toggleBehavior: function toggleBehavior(element, props, toggle) {\n        if(!props || !element || !element.style) {\n            return;\n        }\n\n        // set the css properties\n        Utils.each(props, function(value, prop) {\n            Utils.setPrefixedCss(element, prop, value, toggle);\n        });\n\n        var falseFn = toggle && function() {\n            return false;\n        };\n\n        // also the disable onselectstart\n        if(props.userSelect == 'none') {\n            element.onselectstart = falseFn;\n        }\n        // and disable ondragstart\n        if(props.userDrag == 'none') {\n            element.ondragstart = falseFn;\n        }\n    },\n\n    /**\n     * convert a string with underscores to camelCase\n     * so prevent_default becomes preventDefault\n     * @param {String} str\n     * @return {String} camelCaseStr\n     */\n    toCamelCase: function toCamelCase(str) {\n        return str.replace(/[_-]([a-z])/g, function(s) {\n            return s[1].toUpperCase();\n        });\n    }\n};\n\n\n/**\n * @module hammer\n */\n\n/**\n * create new hammer instance\n * all methods should return the instance itself, so it is chainable.\n *\n * @class Instance\n * @constructor\n * @param {HTMLElement} element\n * @param {Object} [options={}] options are merged with `Hammer.defaults`\n * @return {Hammer.Instance}\n */\nHammer.Instance = function(element, options) {\n    var self = this;\n\n    // setup HammerJS window events and register all gestures\n    // this also sets up the default options\n    setup();\n\n    /**\n     * @property element\n     * @type {HTMLElement}\n     */\n    this.element = element;\n\n    /**\n     * @property enabled\n     * @type {Boolean}\n     * @protected\n     */\n    this.enabled = true;\n\n    /**\n     * options, merged with the defaults\n     * options with an _ are converted to camelCase\n     * @property options\n     * @type {Object}\n     */\n    Utils.each(options, function(value, name) {\n        delete options[name];\n        options[Utils.toCamelCase(name)] = value;\n    });\n\n    this.options = Utils.extend(Utils.extend({}, Hammer.defaults), options || {});\n\n    // add some css to the element to prevent the browser from doing its native behavoir\n    if(this.options.behavior) {\n        Utils.toggleBehavior(this.element, this.options.behavior, true);\n    }\n\n    /**\n     * event start handler on the element to start the detection\n     * @property eventStartHandler\n     * @type {Object}\n     */\n    this.eventStartHandler = Event.onTouch(element, EVENT_START, function(ev) {\n        if(self.enabled && ev.eventType == EVENT_START) {\n            Detection.startDetect(self, ev);\n        } else if(ev.eventType == EVENT_TOUCH) {\n            Detection.detect(ev);\n        }\n    });\n\n    /**\n     * keep a list of user event handlers which needs to be removed when calling 'dispose'\n     * @property eventHandlers\n     * @type {Array}\n     */\n    this.eventHandlers = [];\n};\n\nHammer.Instance.prototype = {\n    /**\n     * bind events to the instance\n     * @method on\n     * @chainable\n     * @param {String} gestures multiple gestures by splitting with a space\n     * @param {Function} handler\n     * @param {Object} handler.ev event object\n     */\n    on: function onEvent(gestures, handler) {\n        var self = this;\n        Event.on(self.element, gestures, handler, function(type) {\n            self.eventHandlers.push({ gesture: type, handler: handler });\n        });\n        return self;\n    },\n\n    /**\n     * unbind events to the instance\n     * @method off\n     * @chainable\n     * @param {String} gestures\n     * @param {Function} handler\n     */\n    off: function offEvent(gestures, handler) {\n        var self = this;\n\n        Event.off(self.element, gestures, handler, function(type) {\n            var index = Utils.inArray({ gesture: type, handler: handler });\n            if(index !== false) {\n                self.eventHandlers.splice(index, 1);\n            }\n        });\n        return self;\n    },\n\n    /**\n     * trigger gesture event\n     * @method trigger\n     * @chainable\n     * @param {String} gesture\n     * @param {Object} [eventData]\n     */\n    trigger: function triggerEvent(gesture, eventData) {\n        // optional\n        if(!eventData) {\n            eventData = {};\n        }\n\n        // create DOM event\n        var event = Hammer.DOCUMENT.createEvent('Event');\n        event.initEvent(gesture, true, true);\n        event.gesture = eventData;\n\n        // trigger on the target if it is in the instance element,\n        // this is for event delegation tricks\n        var element = this.element;\n        if(Utils.hasParent(eventData.target, element)) {\n            element = eventData.target;\n        }\n\n        element.dispatchEvent(event);\n        return this;\n    },\n\n    /**\n     * enable of disable hammer.js detection\n     * @method enable\n     * @chainable\n     * @param {Boolean} state\n     */\n    enable: function enable(state) {\n        this.enabled = state;\n        return this;\n    },\n\n    /**\n     * dispose this hammer instance\n     * @method dispose\n     * @return {Null}\n     */\n    dispose: function dispose() {\n        var i, eh;\n\n        // undo all changes made by stop_browser_behavior\n        Utils.toggleBehavior(this.element, this.options.behavior, false);\n\n        // unbind all custom event handlers\n        for(i = -1; (eh = this.eventHandlers[++i]);) {\n            Utils.off(this.element, eh.gesture, eh.handler);\n        }\n\n        this.eventHandlers = [];\n\n        // unbind the start event listener\n        Event.off(this.element, EVENT_TYPES[EVENT_START], this.eventStartHandler);\n\n        return null;\n    }\n};\n\n\n/**\n * @module hammer\n */\n/**\n * @class Event\n * @static\n */\nvar Event = Hammer.event = {\n    /**\n     * when touch events have been fired, this is true\n     * this is used to stop mouse events\n     * @property prevent_mouseevents\n     * @private\n     * @type {Boolean}\n     */\n    preventMouseEvents: false,\n\n    /**\n     * if EVENT_START has been fired\n     * @property started\n     * @private\n     * @type {Boolean}\n     */\n    started: false,\n\n    /**\n     * when the mouse is hold down, this is true\n     * @property should_detect\n     * @private\n     * @type {Boolean}\n     */\n    shouldDetect: false,\n\n    /**\n     * simple event binder with a hook and support for multiple types\n     * @method on\n     * @param {HTMLElement} element\n     * @param {String} type\n     * @param {Function} handler\n     * @param {Function} [hook]\n     * @param {Object} hook.type\n     */\n    on: function on(element, type, handler, hook) {\n        var types = type.split(' ');\n        Utils.each(types, function(type) {\n            Utils.on(element, type, handler);\n            hook && hook(type);\n        });\n    },\n\n    /**\n     * simple event unbinder with a hook and support for multiple types\n     * @method off\n     * @param {HTMLElement} element\n     * @param {String} type\n     * @param {Function} handler\n     * @param {Function} [hook]\n     * @param {Object} hook.type\n     */\n    off: function off(element, type, handler, hook) {\n        var types = type.split(' ');\n        Utils.each(types, function(type) {\n            Utils.off(element, type, handler);\n            hook && hook(type);\n        });\n    },\n\n    /**\n     * the core touch event handler.\n     * this finds out if we should to detect gestures\n     * @method onTouch\n     * @param {HTMLElement} element\n     * @param {String} eventType matches `EVENT_START|MOVE|END`\n     * @param {Function} handler\n     * @return onTouchHandler {Function} the core event handler\n     */\n    onTouch: function onTouch(element, eventType, handler) {\n        var self = this;\n\n        var onTouchHandler = function onTouchHandler(ev) {\n            var srcType = ev.type.toLowerCase(),\n                isPointer = Hammer.HAS_POINTEREVENTS,\n                isMouse = Utils.inStr(srcType, 'mouse'),\n                triggerType;\n\n            // if we are in a mouseevent, but there has been a touchevent triggered in this session\n            // we want to do nothing. simply break out of the event.\n            if(isMouse && self.preventMouseEvents) {\n                return;\n\n            // mousebutton must be down\n            } else if(isMouse && eventType == EVENT_START && ev.button === 0) {\n                self.preventMouseEvents = false;\n                self.shouldDetect = true;\n            } else if(isPointer && eventType == EVENT_START) {\n                self.shouldDetect = (ev.buttons === 1 || PointerEvent.matchType(POINTER_TOUCH, ev));\n            // just a valid start event, but no mouse\n            } else if(!isMouse && eventType == EVENT_START) {\n                self.preventMouseEvents = true;\n                self.shouldDetect = true;\n            }\n\n            // update the pointer event before entering the detection\n            if(isPointer && eventType != EVENT_END) {\n                PointerEvent.updatePointer(eventType, ev);\n            }\n\n            // we are in a touch/down state, so allowed detection of gestures\n            if(self.shouldDetect) {\n                triggerType = self.doDetect.call(self, ev, eventType, element, handler);\n            }\n\n            // ...and we are done with the detection\n            // so reset everything to start each detection totally fresh\n            if(triggerType == EVENT_END) {\n                self.preventMouseEvents = false;\n                self.shouldDetect = false;\n                PointerEvent.reset();\n            // update the pointerevent object after the detection\n            }\n\n            if(isPointer && eventType == EVENT_END) {\n                PointerEvent.updatePointer(eventType, ev);\n            }\n        };\n\n        this.on(element, EVENT_TYPES[eventType], onTouchHandler);\n        return onTouchHandler;\n    },\n\n    /**\n     * the core detection method\n     * this finds out what hammer-touch-events to trigger\n     * @method doDetect\n     * @param {Object} ev\n     * @param {String} eventType matches `EVENT_START|MOVE|END`\n     * @param {HTMLElement} element\n     * @param {Function} handler\n     * @return {String} triggerType matches `EVENT_START|MOVE|END`\n     */\n    doDetect: function doDetect(ev, eventType, element, handler) {\n        var touchList = this.getTouchList(ev, eventType);\n        var touchListLength = touchList.length;\n        var triggerType = eventType;\n        var triggerChange = touchList.trigger; // used by fakeMultitouch plugin\n        var changedLength = touchListLength;\n\n        // at each touchstart-like event we want also want to trigger a TOUCH event...\n        if(eventType == EVENT_START) {\n            triggerChange = EVENT_TOUCH;\n        // ...the same for a touchend-like event\n        } else if(eventType == EVENT_END) {\n            triggerChange = EVENT_RELEASE;\n\n            // keep track of how many touches have been removed\n            changedLength = touchList.length - ((ev.changedTouches) ? ev.changedTouches.length : 1);\n        }\n\n        // after there are still touches on the screen,\n        // we just want to trigger a MOVE event. so change the START or END to a MOVE\n        // but only after detection has been started, the first time we actualy want a START\n        if(changedLength > 0 && this.started) {\n            triggerType = EVENT_MOVE;\n        }\n\n        // detection has been started, we keep track of this, see above\n        this.started = true;\n\n        // generate some event data, some basic information\n        var evData = this.collectEventData(element, triggerType, touchList, ev);\n\n        // trigger the triggerType event before the change (TOUCH, RELEASE) events\n        // but the END event should be at last\n        if(eventType != EVENT_END) {\n            handler.call(Detection, evData);\n        }\n\n        // trigger a change (TOUCH, RELEASE) event, this means the length of the touches changed\n        if(triggerChange) {\n            evData.changedLength = changedLength;\n            evData.eventType = triggerChange;\n\n            handler.call(Detection, evData);\n\n            evData.eventType = triggerType;\n            delete evData.changedLength;\n        }\n\n        // trigger the END event\n        if(triggerType == EVENT_END) {\n            handler.call(Detection, evData);\n\n            // ...and we are done with the detection\n            // so reset everything to start each detection totally fresh\n            this.started = false;\n        }\n\n        return triggerType;\n    },\n\n    /**\n     * we have different events for each device/browser\n     * determine what we need and set them in the EVENT_TYPES constant\n     * the `onTouch` method is bind to these properties.\n     * @method determineEventTypes\n     * @return {Object} events\n     */\n    determineEventTypes: function determineEventTypes() {\n        var types;\n        if(Hammer.HAS_POINTEREVENTS) {\n            if(window.PointerEvent) {\n                types = [\n                    'pointerdown',\n                    'pointermove',\n                    'pointerup pointercancel lostpointercapture'\n                ];\n            } else {\n                types = [\n                    'MSPointerDown',\n                    'MSPointerMove',\n                    'MSPointerUp MSPointerCancel MSLostPointerCapture'\n                ];\n            }\n        } else if(Hammer.NO_MOUSEEVENTS) {\n            types = [\n                'touchstart',\n                'touchmove',\n                'touchend touchcancel'\n            ];\n        } else {\n            types = [\n                'touchstart mousedown',\n                'touchmove mousemove',\n                'touchend touchcancel mouseup'\n            ];\n        }\n\n        EVENT_TYPES[EVENT_START] = types[0];\n        EVENT_TYPES[EVENT_MOVE] = types[1];\n        EVENT_TYPES[EVENT_END] = types[2];\n        return EVENT_TYPES;\n    },\n\n    /**\n     * create touchList depending on the event\n     * @method getTouchList\n     * @param {Object} ev\n     * @param {String} eventType\n     * @return {Array} touches\n     */\n    getTouchList: function getTouchList(ev, eventType) {\n        // get the fake pointerEvent touchlist\n        if(Hammer.HAS_POINTEREVENTS) {\n            return PointerEvent.getTouchList();\n        }\n\n        // get the touchlist\n        if(ev.touches) {\n            if(eventType == EVENT_MOVE) {\n                return ev.touches;\n            }\n\n            var identifiers = [];\n            var concat = [].concat(Utils.toArray(ev.touches), Utils.toArray(ev.changedTouches));\n            var touchList = [];\n\n            Utils.each(concat, function(touch) {\n                if(Utils.inArray(identifiers, touch.identifier) === false) {\n                    touchList.push(touch);\n                }\n                identifiers.push(touch.identifier);\n            });\n\n            return touchList;\n        }\n\n        // make fake touchList from mouse position\n        ev.identifier = 1;\n        return [ev];\n    },\n\n    /**\n     * collect basic event data\n     * @method collectEventData\n     * @param {HTMLElement} element\n     * @param {String} eventType matches `EVENT_START|MOVE|END`\n     * @param {Array} touches\n     * @param {Object} ev\n     * @return {Object} ev\n     */\n    collectEventData: function collectEventData(element, eventType, touches, ev) {\n        // find out pointerType\n        var pointerType = POINTER_TOUCH;\n        if(Utils.inStr(ev.type, 'mouse') || PointerEvent.matchType(POINTER_MOUSE, ev)) {\n            pointerType = POINTER_MOUSE;\n        } else if(PointerEvent.matchType(POINTER_PEN, ev)) {\n            pointerType = POINTER_PEN;\n        }\n\n        return {\n            center: Utils.getCenter(touches),\n            timeStamp: Date.now(),\n            target: ev.target,\n            touches: touches,\n            eventType: eventType,\n            pointerType: pointerType,\n            srcEvent: ev,\n\n            /**\n             * prevent the browser default actions\n             * mostly used to disable scrolling of the browser\n             */\n            preventDefault: function() {\n                var srcEvent = this.srcEvent;\n                srcEvent.preventManipulation && srcEvent.preventManipulation();\n                srcEvent.preventDefault && srcEvent.preventDefault();\n            },\n\n            /**\n             * stop bubbling the event up to its parents\n             */\n            stopPropagation: function() {\n                this.srcEvent.stopPropagation();\n            },\n\n            /**\n             * immediately stop gesture detection\n             * might be useful after a swipe was detected\n             * @return {*}\n             */\n            stopDetect: function() {\n                return Detection.stopDetect();\n            }\n        };\n    }\n};\n\n\n/**\n * @module hammer\n *\n * @class PointerEvent\n * @static\n */\nvar PointerEvent = Hammer.PointerEvent = {\n    /**\n     * holds all pointers, by `identifier`\n     * @property pointers\n     * @type {Object}\n     */\n    pointers: {},\n\n    /**\n     * get the pointers as an array\n     * @method getTouchList\n     * @return {Array} touchlist\n     */\n    getTouchList: function getTouchList() {\n        var touchlist = [];\n        // we can use forEach since pointerEvents only is in IE10\n        Utils.each(this.pointers, function(pointer) {\n            touchlist.push(pointer);\n        });\n        return touchlist;\n    },\n\n    /**\n     * update the position of a pointer\n     * @method updatePointer\n     * @param {String} eventType matches `EVENT_START|MOVE|END`\n     * @param {Object} pointerEvent\n     */\n    updatePointer: function updatePointer(eventType, pointerEvent) {\n        if(eventType == EVENT_END || (eventType != EVENT_END && pointerEvent.buttons !== 1)) {\n            delete this.pointers[pointerEvent.pointerId];\n        } else {\n            pointerEvent.identifier = pointerEvent.pointerId;\n            this.pointers[pointerEvent.pointerId] = pointerEvent;\n        }\n    },\n\n    /**\n     * check if ev matches pointertype\n     * @method matchType\n     * @param {String} pointerType matches `POINTER_MOUSE|TOUCH|PEN`\n     * @param {PointerEvent} ev\n     */\n    matchType: function matchType(pointerType, ev) {\n        if(!ev.pointerType) {\n            return false;\n        }\n\n        var pt = ev.pointerType,\n            types = {};\n\n        types[POINTER_MOUSE] = (pt === (ev.MSPOINTER_TYPE_MOUSE || POINTER_MOUSE));\n        types[POINTER_TOUCH] = (pt === (ev.MSPOINTER_TYPE_TOUCH || POINTER_TOUCH));\n        types[POINTER_PEN] = (pt === (ev.MSPOINTER_TYPE_PEN || POINTER_PEN));\n        return types[pointerType];\n    },\n\n    /**\n     * reset the stored pointers\n     * @method reset\n     */\n    reset: function resetList() {\n        this.pointers = {};\n    }\n};\n\n\n/**\n * @module hammer\n *\n * @class Detection\n * @static\n */\nvar Detection = Hammer.detection = {\n    // contains all registred Hammer.gestures in the correct order\n    gestures: [],\n\n    // data of the current Hammer.gesture detection session\n    current: null,\n\n    // the previous Hammer.gesture session data\n    // is a full clone of the previous gesture.current object\n    previous: null,\n\n    // when this becomes true, no gestures are fired\n    stopped: false,\n\n    /**\n     * start Hammer.gesture detection\n     * @method startDetect\n     * @param {Hammer.Instance} inst\n     * @param {Object} eventData\n     */\n    startDetect: function startDetect(inst, eventData) {\n        // already busy with a Hammer.gesture detection on an element\n        if(this.current) {\n            return;\n        }\n\n        this.stopped = false;\n\n        // holds current session\n        this.current = {\n            inst: inst, // reference to HammerInstance we're working for\n            startEvent: Utils.extend({}, eventData), // start eventData for distances, timing etc\n            lastEvent: false, // last eventData\n            lastCalcEvent: false, // last eventData for calculations.\n            futureCalcEvent: false, // last eventData for calculations.\n            lastCalcData: {}, // last lastCalcData\n            name: '' // current gesture we're in/detected, can be 'tap', 'hold' etc\n        };\n\n        this.detect(eventData);\n    },\n\n    /**\n     * Hammer.gesture detection\n     * @method detect\n     * @param {Object} eventData\n     * @return {any}\n     */\n    detect: function detect(eventData) {\n        if(!this.current || this.stopped) {\n            return;\n        }\n\n        // extend event data with calculations about scale, distance etc\n        eventData = this.extendEventData(eventData);\n\n        // hammer instance and instance options\n        var inst = this.current.inst,\n            instOptions = inst.options;\n\n        // call Hammer.gesture handlers\n        Utils.each(this.gestures, function triggerGesture(gesture) {\n            // only when the instance options have enabled this gesture\n            if(!this.stopped && inst.enabled && instOptions[gesture.name]) {\n                gesture.handler.call(gesture, eventData, inst);\n            }\n        }, this);\n\n        // store as previous event event\n        if(this.current) {\n            this.current.lastEvent = eventData;\n        }\n\n        if(eventData.eventType == EVENT_END) {\n            this.stopDetect();\n        }\n\n        return eventData;\n    },\n\n    /**\n     * clear the Hammer.gesture vars\n     * this is called on endDetect, but can also be used when a final Hammer.gesture has been detected\n     * to stop other Hammer.gestures from being fired\n     * @method stopDetect\n     */\n    stopDetect: function stopDetect() {\n        // clone current data to the store as the previous gesture\n        // used for the double tap gesture, since this is an other gesture detect session\n        this.previous = Utils.extend({}, this.current);\n\n        // reset the current\n        this.current = null;\n        this.stopped = true;\n    },\n\n    /**\n     * calculate velocity, angle and direction\n     * @method getVelocityData\n     * @param {Object} ev\n     * @param {Object} center\n     * @param {Number} deltaTime\n     * @param {Number} deltaX\n     * @param {Number} deltaY\n     */\n    getCalculatedData: function getCalculatedData(ev, center, deltaTime, deltaX, deltaY) {\n        var cur = this.current,\n            recalc = false,\n            calcEv = cur.lastCalcEvent,\n            calcData = cur.lastCalcData;\n\n        if(calcEv && ev.timeStamp - calcEv.timeStamp > Hammer.CALCULATE_INTERVAL) {\n            center = calcEv.center;\n            deltaTime = ev.timeStamp - calcEv.timeStamp;\n            deltaX = ev.center.clientX - calcEv.center.clientX;\n            deltaY = ev.center.clientY - calcEv.center.clientY;\n            recalc = true;\n        }\n\n        if(ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {\n            cur.futureCalcEvent = ev;\n        }\n\n        if(!cur.lastCalcEvent || recalc) {\n            calcData.velocity = Utils.getVelocity(deltaTime, deltaX, deltaY);\n            calcData.angle = Utils.getAngle(center, ev.center);\n            calcData.direction = Utils.getDirection(center, ev.center);\n\n            cur.lastCalcEvent = cur.futureCalcEvent || ev;\n            cur.futureCalcEvent = ev;\n        }\n\n        ev.velocityX = calcData.velocity.x;\n        ev.velocityY = calcData.velocity.y;\n        ev.interimAngle = calcData.angle;\n        ev.interimDirection = calcData.direction;\n    },\n\n    /**\n     * extend eventData for Hammer.gestures\n     * @method extendEventData\n     * @param {Object} ev\n     * @return {Object} ev\n     */\n    extendEventData: function extendEventData(ev) {\n        var cur = this.current,\n            startEv = cur.startEvent,\n            lastEv = cur.lastEvent || startEv;\n\n        // update the start touchlist to calculate the scale/rotation\n        if(ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {\n            startEv.touches = [];\n            Utils.each(ev.touches, function(touch) {\n                startEv.touches.push({\n                    clientX: touch.clientX,\n                    clientY: touch.clientY\n                });\n            });\n        }\n\n        var deltaTime = ev.timeStamp - startEv.timeStamp,\n            deltaX = ev.center.clientX - startEv.center.clientX,\n            deltaY = ev.center.clientY - startEv.center.clientY;\n\n        this.getCalculatedData(ev, lastEv.center, deltaTime, deltaX, deltaY);\n\n        Utils.extend(ev, {\n            startEvent: startEv,\n\n            deltaTime: deltaTime,\n            deltaX: deltaX,\n            deltaY: deltaY,\n\n            distance: Utils.getDistance(startEv.center, ev.center),\n            angle: Utils.getAngle(startEv.center, ev.center),\n            direction: Utils.getDirection(startEv.center, ev.center),\n            scale: Utils.getScale(startEv.touches, ev.touches),\n            rotation: Utils.getRotation(startEv.touches, ev.touches)\n        });\n\n        return ev;\n    },\n\n    /**\n     * register new gesture\n     * @method register\n     * @param {Object} gesture object, see `gestures/` for documentation\n     * @return {Array} gestures\n     */\n    register: function register(gesture) {\n        // add an enable gesture options if there is no given\n        var options = gesture.defaults || {};\n        if(options[gesture.name] === undefined) {\n            options[gesture.name] = true;\n        }\n\n        // extend Hammer default options with the Hammer.gesture options\n        Utils.extend(Hammer.defaults, options, true);\n\n        // set its index\n        gesture.index = gesture.index || 1000;\n\n        // add Hammer.gesture to the list\n        this.gestures.push(gesture);\n\n        // sort the list by index\n        this.gestures.sort(function(a, b) {\n            if(a.index < b.index) {\n                return -1;\n            }\n            if(a.index > b.index) {\n                return 1;\n            }\n            return 0;\n        });\n\n        return this.gestures;\n    }\n};\n\n\n/**\n * @module gestures\n */\n/**\n * Move with x fingers (default 1) around on the page.\n * Preventing the default browser behavior is a good way to improve feel and working.\n * ````\n *  hammertime.on(\"drag\", function(ev) {\n *    console.log(ev);\n *    ev.gesture.preventDefault();\n *  });\n * ````\n *\n * @class Drag\n * @static\n */\n/**\n * @event drag\n * @param {Object} ev\n */\n/**\n * @event dragstart\n * @param {Object} ev\n */\n/**\n * @event dragend\n * @param {Object} ev\n */\n/**\n * @event drapleft\n * @param {Object} ev\n */\n/**\n * @event dragright\n * @param {Object} ev\n */\n/**\n * @event dragup\n * @param {Object} ev\n */\n/**\n * @event dragdown\n * @param {Object} ev\n */\n\n/**\n * @param {String} name\n */\n(function(name) {\n    var triggered = false;\n\n    function dragGesture(ev, inst) {\n        var cur = Detection.current;\n\n        // max touches\n        if(inst.options.dragMaxTouches > 0 &&\n            ev.touches.length > inst.options.dragMaxTouches) {\n            return;\n        }\n\n        switch(ev.eventType) {\n            case EVENT_START:\n                triggered = false;\n                break;\n\n            case EVENT_MOVE:\n                // when the distance we moved is too small we skip this gesture\n                // or we can be already in dragging\n                if(ev.distance < inst.options.dragMinDistance &&\n                    cur.name != name) {\n                    return;\n                }\n\n                var startCenter = cur.startEvent.center;\n\n                // we are dragging!\n                if(cur.name != name) {\n                    cur.name = name;\n                    if(inst.options.dragDistanceCorrection && ev.distance > 0) {\n                        // When a drag is triggered, set the event center to dragMinDistance pixels from the original event center.\n                        // Without this correction, the dragged distance would jumpstart at dragMinDistance pixels instead of at 0.\n                        // It might be useful to save the original start point somewhere\n                        var factor = Math.abs(inst.options.dragMinDistance / ev.distance);\n                        startCenter.pageX += ev.deltaX * factor;\n                        startCenter.pageY += ev.deltaY * factor;\n                        startCenter.clientX += ev.deltaX * factor;\n                        startCenter.clientY += ev.deltaY * factor;\n\n                        // recalculate event data using new start point\n                        ev = Detection.extendEventData(ev);\n                    }\n                }\n\n                // lock drag to axis?\n                if(cur.lastEvent.dragLockToAxis ||\n                    ( inst.options.dragLockToAxis &&\n                        inst.options.dragLockMinDistance <= ev.distance\n                        )) {\n                    ev.dragLockToAxis = true;\n                }\n\n                // keep direction on the axis that the drag gesture started on\n                var lastDirection = cur.lastEvent.direction;\n                if(ev.dragLockToAxis && lastDirection !== ev.direction) {\n                    if(Utils.isVertical(lastDirection)) {\n                        ev.direction = (ev.deltaY < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n                    } else {\n                        ev.direction = (ev.deltaX < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n                    }\n                }\n\n                // first time, trigger dragstart event\n                if(!triggered) {\n                    inst.trigger(name + 'start', ev);\n                    triggered = true;\n                }\n\n                // trigger events\n                inst.trigger(name, ev);\n                inst.trigger(name + ev.direction, ev);\n\n                var isVertical = Utils.isVertical(ev.direction);\n\n                // block the browser events\n                if((inst.options.dragBlockVertical && isVertical) ||\n                    (inst.options.dragBlockHorizontal && !isVertical)) {\n                    ev.preventDefault();\n                }\n                break;\n\n            case EVENT_RELEASE:\n                if(triggered && ev.changedLength <= inst.options.dragMaxTouches) {\n                    inst.trigger(name + 'end', ev);\n                    triggered = false;\n                }\n                break;\n\n            case EVENT_END:\n                triggered = false;\n                break;\n        }\n    }\n\n    Hammer.gestures.Drag = {\n        name: name,\n        index: 50,\n        handler: dragGesture,\n        defaults: {\n            /**\n             * minimal movement that have to be made before the drag event gets triggered\n             * @property dragMinDistance\n             * @type {Number}\n             * @default 10\n             */\n            dragMinDistance: 10,\n\n            /**\n             * Set dragDistanceCorrection to true to make the starting point of the drag\n             * be calculated from where the drag was triggered, not from where the touch started.\n             * Useful to avoid a jerk-starting drag, which can make fine-adjustments\n             * through dragging difficult, and be visually unappealing.\n             * @property dragDistanceCorrection\n             * @type {Boolean}\n             * @default true\n             */\n            dragDistanceCorrection: true,\n\n            /**\n             * set 0 for unlimited, but this can conflict with transform\n             * @property dragMaxTouches\n             * @type {Number}\n             * @default 1\n             */\n            dragMaxTouches: 1,\n\n            /**\n             * prevent default browser behavior when dragging occurs\n             * be careful with it, it makes the element a blocking element\n             * when you are using the drag gesture, it is a good practice to set this true\n             * @property dragBlockHorizontal\n             * @type {Boolean}\n             * @default false\n             */\n            dragBlockHorizontal: false,\n\n            /**\n             * same as `dragBlockHorizontal`, but for vertical movement\n             * @property dragBlockVertical\n             * @type {Boolean}\n             * @default false\n             */\n            dragBlockVertical: false,\n\n            /**\n             * dragLockToAxis keeps the drag gesture on the axis that it started on,\n             * It disallows vertical directions if the initial direction was horizontal, and vice versa.\n             * @property dragLockToAxis\n             * @type {Boolean}\n             * @default false\n             */\n            dragLockToAxis: false,\n\n            /**\n             * drag lock only kicks in when distance > dragLockMinDistance\n             * This way, locking occurs only when the distance has become large enough to reliably determine the direction\n             * @property dragLockMinDistance\n             * @type {Number}\n             * @default 25\n             */\n            dragLockMinDistance: 25\n        }\n    };\n})('drag');\n\n/**\n * @module gestures\n */\n/**\n * trigger a simple gesture event, so you can do anything in your handler.\n * only usable if you know what your doing...\n *\n * @class Gesture\n * @static\n */\n/**\n * @event gesture\n * @param {Object} ev\n */\nHammer.gestures.Gesture = {\n    name: 'gesture',\n    index: 1337,\n    handler: function releaseGesture(ev, inst) {\n        inst.trigger(this.name, ev);\n    }\n};\n\n/**\n * @module gestures\n */\n/**\n * Touch stays at the same place for x time\n *\n * @class Hold\n * @static\n */\n/**\n * @event hold\n * @param {Object} ev\n */\n\n/**\n * @param {String} name\n */\n(function(name) {\n    var timer;\n\n    function holdGesture(ev, inst) {\n        var options = inst.options,\n            current = Detection.current;\n\n        switch(ev.eventType) {\n            case EVENT_START:\n                clearTimeout(timer);\n\n                // set the gesture so we can check in the timeout if it still is\n                current.name = name;\n\n                // set timer and if after the timeout it still is hold,\n                // we trigger the hold event\n                timer = setTimeout(function() {\n                    if(current && current.name == name) {\n                        inst.trigger(name, ev);\n                    }\n                }, options.holdTimeout);\n                break;\n\n            case EVENT_MOVE:\n                if(ev.distance > options.holdThreshold) {\n                    clearTimeout(timer);\n                }\n                break;\n\n            case EVENT_RELEASE:\n                clearTimeout(timer);\n                break;\n        }\n    }\n\n    Hammer.gestures.Hold = {\n        name: name,\n        index: 10,\n        defaults: {\n            /**\n             * @property holdTimeout\n             * @type {Number}\n             * @default 500\n             */\n            holdTimeout: 500,\n\n            /**\n             * movement allowed while holding\n             * @property holdThreshold\n             * @type {Number}\n             * @default 2\n             */\n            holdThreshold: 2\n        },\n        handler: holdGesture\n    };\n})('hold');\n\n/**\n * @module gestures\n */\n/**\n * when a touch is being released from the page\n *\n * @class Release\n * @static\n */\n/**\n * @event release\n * @param {Object} ev\n */\nHammer.gestures.Release = {\n    name: 'release',\n    index: Infinity,\n    handler: function releaseGesture(ev, inst) {\n        if(ev.eventType == EVENT_RELEASE) {\n            inst.trigger(this.name, ev);\n        }\n    }\n};\n\n/**\n * @module gestures\n */\n/**\n * triggers swipe events when the end velocity is above the threshold\n * for best usage, set `preventDefault` (on the drag gesture) to `true`\n * ````\n *  hammertime.on(\"dragleft swipeleft\", function(ev) {\n *    console.log(ev);\n *    ev.gesture.preventDefault();\n *  });\n * ````\n *\n * @class Swipe\n * @static\n */\n/**\n * @event swipe\n * @param {Object} ev\n */\n/**\n * @event swipeleft\n * @param {Object} ev\n */\n/**\n * @event swiperight\n * @param {Object} ev\n */\n/**\n * @event swipeup\n * @param {Object} ev\n */\n/**\n * @event swipedown\n * @param {Object} ev\n */\nHammer.gestures.Swipe = {\n    name: 'swipe',\n    index: 40,\n    defaults: {\n        /**\n         * @property swipeMinTouches\n         * @type {Number}\n         * @default 1\n         */\n        swipeMinTouches: 1,\n\n        /**\n         * @property swipeMaxTouches\n         * @type {Number}\n         * @default 1\n         */\n        swipeMaxTouches: 1,\n\n        /**\n         * horizontal swipe velocity\n         * @property swipeVelocityX\n         * @type {Number}\n         * @default 0.6\n         */\n        swipeVelocityX: 0.6,\n\n        /**\n         * vertical swipe velocity\n         * @property swipeVelocityY\n         * @type {Number}\n         * @default 0.6\n         */\n        swipeVelocityY: 0.6\n    },\n\n    handler: function swipeGesture(ev, inst) {\n        if(ev.eventType == EVENT_RELEASE) {\n            var touches = ev.touches.length,\n                options = inst.options;\n\n            // max touches\n            if(touches < options.swipeMinTouches ||\n                touches > options.swipeMaxTouches) {\n                return;\n            }\n\n            // when the distance we moved is too small we skip this gesture\n            // or we can be already in dragging\n            if(ev.velocityX > options.swipeVelocityX ||\n                ev.velocityY > options.swipeVelocityY) {\n                // trigger swipe events\n                inst.trigger(this.name, ev);\n                inst.trigger(this.name + ev.direction, ev);\n            }\n        }\n    }\n};\n\n/**\n * @module gestures\n */\n/**\n * Single tap and a double tap on a place\n *\n * @class Tap\n * @static\n */\n/**\n * @event tap\n * @param {Object} ev\n */\n/**\n * @event doubletap\n * @param {Object} ev\n */\n\n/**\n * @param {String} name\n */\n(function(name) {\n    var hasMoved = false;\n\n    function tapGesture(ev, inst) {\n        var options = inst.options,\n            current = Detection.current,\n            prev = Detection.previous,\n            sincePrev,\n            didDoubleTap;\n\n        switch(ev.eventType) {\n            case EVENT_START:\n                hasMoved = false;\n                break;\n\n            case EVENT_MOVE:\n                hasMoved = hasMoved || (ev.distance > options.tapMaxDistance);\n                break;\n\n            case EVENT_END:\n                if(!Utils.inStr(ev.srcEvent.type, 'cancel') && ev.deltaTime < options.tapMaxTime && !hasMoved) {\n                    // previous gesture, for the double tap since these are two different gesture detections\n                    sincePrev = prev && prev.lastEvent && ev.timeStamp - prev.lastEvent.timeStamp;\n                    didDoubleTap = false;\n\n                    // check if double tap\n                    if(prev && prev.name == name &&\n                        (sincePrev && sincePrev < options.doubleTapInterval) &&\n                        ev.distance < options.doubleTapDistance) {\n                        inst.trigger('doubletap', ev);\n                        didDoubleTap = true;\n                    }\n\n                    // do a single tap\n                    if(!didDoubleTap || options.tapAlways) {\n                        current.name = name;\n                        inst.trigger(current.name, ev);\n                    }\n                }\n                break;\n        }\n    }\n\n    Hammer.gestures.Tap = {\n        name: name,\n        index: 100,\n        handler: tapGesture,\n        defaults: {\n            /**\n             * max time of a tap, this is for the slow tappers\n             * @property tapMaxTime\n             * @type {Number}\n             * @default 250\n             */\n            tapMaxTime: 250,\n\n            /**\n             * max distance of movement of a tap, this is for the slow tappers\n             * @property tapMaxDistance\n             * @type {Number}\n             * @default 10\n             */\n            tapMaxDistance: 10,\n\n            /**\n             * always trigger the `tap` event, even while double-tapping\n             * @property tapAlways\n             * @type {Boolean}\n             * @default true\n             */\n            tapAlways: true,\n\n            /**\n             * max distance between two taps\n             * @property doubleTapDistance\n             * @type {Number}\n             * @default 20\n             */\n            doubleTapDistance: 20,\n\n            /**\n             * max time between two taps\n             * @property doubleTapInterval\n             * @type {Number}\n             * @default 300\n             */\n            doubleTapInterval: 300\n        }\n    };\n})('tap');\n\n/**\n * @module gestures\n */\n/**\n * when a touch is being touched at the page\n *\n * @class Touch\n * @static\n */\n/**\n * @event touch\n * @param {Object} ev\n */\nHammer.gestures.Touch = {\n    name: 'touch',\n    index: -Infinity,\n    defaults: {\n        /**\n         * call preventDefault at touchstart, and makes the element blocking by disabling the scrolling of the page,\n         * but it improves gestures like transforming and dragging.\n         * be careful with using this, it can be very annoying for users to be stuck on the page\n         * @property preventDefault\n         * @type {Boolean}\n         * @default false\n         */\n        preventDefault: false,\n\n        /**\n         * disable mouse events, so only touch (or pen!) input triggers events\n         * @property preventMouse\n         * @type {Boolean}\n         * @default false\n         */\n        preventMouse: false\n    },\n    handler: function touchGesture(ev, inst) {\n        if(inst.options.preventMouse && ev.pointerType == POINTER_MOUSE) {\n            ev.stopDetect();\n            return;\n        }\n\n        if(inst.options.preventDefault) {\n            ev.preventDefault();\n        }\n\n        if(ev.eventType == EVENT_TOUCH) {\n            inst.trigger('touch', ev);\n        }\n    }\n};\n\n/**\n * @module gestures\n */\n/**\n * User want to scale or rotate with 2 fingers\n * Preventing the default browser behavior is a good way to improve feel and working. This can be done with the\n * `preventDefault` option.\n *\n * @class Transform\n * @static\n */\n/**\n * @event transform\n * @param {Object} ev\n */\n/**\n * @event transformstart\n * @param {Object} ev\n */\n/**\n * @event transformend\n * @param {Object} ev\n */\n/**\n * @event pinchin\n * @param {Object} ev\n */\n/**\n * @event pinchout\n * @param {Object} ev\n */\n/**\n * @event rotate\n * @param {Object} ev\n */\n\n/**\n * @param {String} name\n */\n(function(name) {\n    var triggered = false;\n\n    function transformGesture(ev, inst) {\n        switch(ev.eventType) {\n            case EVENT_START:\n                triggered = false;\n                break;\n\n            case EVENT_MOVE:\n                // at least multitouch\n                if(ev.touches.length < 2) {\n                    return;\n                }\n\n                var scaleThreshold = Math.abs(1 - ev.scale);\n                var rotationThreshold = Math.abs(ev.rotation);\n\n                // when the distance we moved is too small we skip this gesture\n                // or we can be already in dragging\n                if(scaleThreshold < inst.options.transformMinScale &&\n                    rotationThreshold < inst.options.transformMinRotation) {\n                    return;\n                }\n\n                // we are transforming!\n                Detection.current.name = name;\n\n                // first time, trigger dragstart event\n                if(!triggered) {\n                    inst.trigger(name + 'start', ev);\n                    triggered = true;\n                }\n\n                inst.trigger(name, ev); // basic transform event\n\n                // trigger rotate event\n                if(rotationThreshold > inst.options.transformMinRotation) {\n                    inst.trigger('rotate', ev);\n                }\n\n                // trigger pinch event\n                if(scaleThreshold > inst.options.transformMinScale) {\n                    inst.trigger('pinch', ev);\n                    inst.trigger('pinch' + (ev.scale < 1 ? 'in' : 'out'), ev);\n                }\n                break;\n\n            case EVENT_RELEASE:\n                if(triggered && ev.changedLength < 2) {\n                    inst.trigger(name + 'end', ev);\n                    triggered = false;\n                }\n                break;\n        }\n    }\n\n    Hammer.gestures.Transform = {\n        name: name,\n        index: 45,\n        defaults: {\n            /**\n             * minimal scale factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1\n             * @property transformMinScale\n             * @type {Number}\n             * @default 0.01\n             */\n            transformMinScale: 0.01,\n\n            /**\n             * rotation in degrees\n             * @property transformMinRotation\n             * @type {Number}\n             * @default 1\n             */\n            transformMinRotation: 1\n        },\n\n        handler: transformGesture\n    };\n})('transform');\n\nwindow.Hammer = Hammer;\n\nif( true && module.exports) {\n    module.exports = Hammer;\n}\n\nfunction setupPlugin(Hammer, $) {\n    // provide polyfill for Date.now()\n    // browser support: http://kangax.github.io/es5-compat-table/#Date.now\n    if(!Date.now) {\n        Date.now = function now() {\n            return new Date().getTime();\n        };\n    }\n\n    /**\n     * the methods on/off are called by the instance, but with the jquery plugin\n     * we use the jquery event methods instead.\n     * @this    {Hammer.Instance}\n     * @return  {jQuery}\n     */\n    Hammer.utils.each(['on', 'off'], function(method) {\n        Hammer.utils[method] = function(element, type, handler) {\n            $(element)[method](type, function($ev) {\n                // append the jquery fixed properties/methods\n                var data = $.extend({}, $ev.originalEvent, $ev);\n                if(data.button === undefined) {\n                    data.button = $ev.which - 1;\n                }\n                handler.call(this, data);\n            });\n        };\n    });\n\n    /**\n     * trigger events\n     * this is called by the gestures to trigger an event like 'tap'\n     * @this    {Hammer.Instance}\n     * @param   {String}    gesture\n     * @param   {Object}    eventData\n     * @return  {jQuery}\n     */\n    Hammer.Instance.prototype.trigger = function(gesture, eventData) {\n        var el = $(this.element);\n        if(el.has(eventData.target).length) {\n            el = $(eventData.target);\n        }\n\n        return el.trigger({\n            type: gesture,\n            gesture: eventData\n        });\n    };\n\n    /**\n     * jQuery plugin\n     * create instance of Hammer and watch for gestures,\n     * and when called again you can change the options\n     * @param   {Object}    [options={}]\n     * @return  {jQuery}\n     */\n    $.fn.hammer = function(options) {\n        return this.each(function() {\n            var el = $(this);\n            var inst = el.data('hammer');\n\n            // start new hammer instance\n            if(!inst) {\n                el.data('hammer', new Hammer(this, options || {}));\n                // change the options\n            } else if(inst && options) {\n                Hammer.utils.extend(inst.options, options);\n            }\n        });\n    };\n}\n\n\n// AMD\nif(true) {\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function($) {\n        return setupPlugin(window.Hammer, $);\n    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n} else {}\n\n})(window);\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = Hammer;\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-hammerjs/jquery.hammer-full.js?./node_modules/exports-loader?Hammer");

/***/ }),

/***/ "./node_modules/fizzy-ui-utils/utils.js":
/*!**********************************************!*\
  !*** ./node_modules/fizzy-ui-utils/utils.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Fizzy UI utils v2.0.7\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n  // universal module definition\n  /*jshint strict: false */ /*globals define, module, require */\n\n  if ( true ) {\n    // AMD\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n      __webpack_require__(/*! desandro-matches-selector/matches-selector */ \"./node_modules/desandro-matches-selector/matches-selector.js\")\n    ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) {\n      return factory( window, matchesSelector );\n    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( window, function factory( window, matchesSelector ) {\n\n'use strict';\n\nvar utils = {};\n\n// ----- extend ----- //\n\n// extends objects\nutils.extend = function( a, b ) {\n  for ( var prop in b ) {\n    a[ prop ] = b[ prop ];\n  }\n  return a;\n};\n\n// ----- modulo ----- //\n\nutils.modulo = function( num, div ) {\n  return ( ( num % div ) + div ) % div;\n};\n\n// ----- makeArray ----- //\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nutils.makeArray = function( obj ) {\n  if ( Array.isArray( obj ) ) {\n    // use object if already an array\n    return obj;\n  }\n  // return empty array if undefined or null. #6\n  if ( obj === null || obj === undefined ) {\n    return [];\n  }\n\n  var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n  if ( isArrayLike ) {\n    // convert nodeList to array\n    return arraySlice.call( obj );\n  }\n\n  // array of single index\n  return [ obj ];\n};\n\n// ----- removeFrom ----- //\n\nutils.removeFrom = function( ary, obj ) {\n  var index = ary.indexOf( obj );\n  if ( index != -1 ) {\n    ary.splice( index, 1 );\n  }\n};\n\n// ----- getParent ----- //\n\nutils.getParent = function( elem, selector ) {\n  while ( elem.parentNode && elem != document.body ) {\n    elem = elem.parentNode;\n    if ( matchesSelector( elem, selector ) ) {\n      return elem;\n    }\n  }\n};\n\n// ----- getQueryElement ----- //\n\n// use element as selector string\nutils.getQueryElement = function( elem ) {\n  if ( typeof elem == 'string' ) {\n    return document.querySelector( elem );\n  }\n  return elem;\n};\n\n// ----- handleEvent ----- //\n\n// enable .ontype to trigger from .addEventListener( elem, 'type' )\nutils.handleEvent = function( event ) {\n  var method = 'on' + event.type;\n  if ( this[ method ] ) {\n    this[ method ]( event );\n  }\n};\n\n// ----- filterFindElements ----- //\n\nutils.filterFindElements = function( elems, selector ) {\n  // make array of elems\n  elems = utils.makeArray( elems );\n  var ffElems = [];\n\n  elems.forEach( function( elem ) {\n    // check that elem is an actual element\n    if ( !( elem instanceof HTMLElement ) ) {\n      return;\n    }\n    // add elem if no selector\n    if ( !selector ) {\n      ffElems.push( elem );\n      return;\n    }\n    // filter & find items if we have a selector\n    // filter\n    if ( matchesSelector( elem, selector ) ) {\n      ffElems.push( elem );\n    }\n    // find children\n    var childElems = elem.querySelectorAll( selector );\n    // concat childElems to filterFound array\n    for ( var i=0; i < childElems.length; i++ ) {\n      ffElems.push( childElems[i] );\n    }\n  });\n\n  return ffElems;\n};\n\n// ----- debounceMethod ----- //\n\nutils.debounceMethod = function( _class, methodName, threshold ) {\n  threshold = threshold || 100;\n  // original method\n  var method = _class.prototype[ methodName ];\n  var timeoutName = methodName + 'Timeout';\n\n  _class.prototype[ methodName ] = function() {\n    var timeout = this[ timeoutName ];\n    clearTimeout( timeout );\n\n    var args = arguments;\n    var _this = this;\n    this[ timeoutName ] = setTimeout( function() {\n      method.apply( _this, args );\n      delete _this[ timeoutName ];\n    }, threshold );\n  };\n};\n\n// ----- docReady ----- //\n\nutils.docReady = function( callback ) {\n  var readyState = document.readyState;\n  if ( readyState == 'complete' || readyState == 'interactive' ) {\n    // do async to allow for other scripts to run. metafizzy/flickity#441\n    setTimeout( callback );\n  } else {\n    document.addEventListener( 'DOMContentLoaded', callback );\n  }\n};\n\n// ----- htmlInit ----- //\n\n// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/\nutils.toDashed = function( str ) {\n  return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {\n    return $1 + '-' + $2;\n  }).toLowerCase();\n};\n\nvar console = window.console;\n/**\n * allow user to initialize classes via [data-namespace] or .js-namespace class\n * htmlInit( Widget, 'widgetName' )\n * options are parsed from data-namespace-options\n */\nutils.htmlInit = function( WidgetClass, namespace ) {\n  utils.docReady( function() {\n    var dashedNamespace = utils.toDashed( namespace );\n    var dataAttr = 'data-' + dashedNamespace;\n    var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );\n    var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );\n    var elems = utils.makeArray( dataAttrElems )\n      .concat( utils.makeArray( jsDashElems ) );\n    var dataOptionsAttr = dataAttr + '-options';\n    var jQuery = window.jQuery;\n\n    elems.forEach( function( elem ) {\n      var attr = elem.getAttribute( dataAttr ) ||\n        elem.getAttribute( dataOptionsAttr );\n      var options;\n      try {\n        options = attr && JSON.parse( attr );\n      } catch ( error ) {\n        // log error, do not initialize\n        if ( console ) {\n          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +\n          ': ' + error );\n        }\n        return;\n      }\n      // initialize\n      var instance = new WidgetClass( elem, options );\n      // make available via $().data('namespace')\n      if ( jQuery ) {\n        jQuery.data( elem, namespace, instance );\n      }\n    });\n\n  });\n};\n\n// -----  ----- //\n\nreturn utils;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/fizzy-ui-utils/utils.js?");

/***/ }),

/***/ "./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js ***!
  \*************************************************************************************/
/*! exports provided: document, extend, window */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"document\", function() { return doc; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"window\", function() { return win; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * SSR Window 2.0.0\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2020, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: May 12, 2020\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n  return obj !== null && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(obj) === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n  if (target === void 0) {\n    target = {};\n  }\n  if (src === void 0) {\n    src = {};\n  }\n  Object.keys(src).forEach(function (key) {\n    if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n      extend(target[key], src[key]);\n    }\n  });\n}\nvar doc = typeof document !== 'undefined' ? document : {};\nvar ssrDocument = {\n  body: {},\n  addEventListener: function addEventListener() {},\n  removeEventListener: function removeEventListener() {},\n  activeElement: {\n    blur: function blur() {},\n    nodeName: ''\n  },\n  querySelector: function querySelector() {\n    return null;\n  },\n  querySelectorAll: function querySelectorAll() {\n    return [];\n  },\n  getElementById: function getElementById() {\n    return null;\n  },\n  createEvent: function createEvent() {\n    return {\n      initEvent: function initEvent() {}\n    };\n  },\n  createElement: function createElement() {\n    return {\n      children: [],\n      childNodes: [],\n      style: {},\n      setAttribute: function setAttribute() {},\n      getElementsByTagName: function getElementsByTagName() {\n        return [];\n      }\n    };\n  },\n  createElementNS: function createElementNS() {\n    return {};\n  },\n  importNode: function importNode() {\n    return null;\n  },\n  location: {\n    hash: '',\n    host: '',\n    hostname: '',\n    href: '',\n    origin: '',\n    pathname: '',\n    protocol: '',\n    search: ''\n  }\n};\nextend(doc, ssrDocument);\nvar win = typeof window !== 'undefined' ? window : {};\nvar ssrWindow = {\n  document: ssrDocument,\n  navigator: {\n    userAgent: ''\n  },\n  location: {\n    hash: '',\n    host: '',\n    hostname: '',\n    href: '',\n    origin: '',\n    pathname: '',\n    protocol: '',\n    search: ''\n  },\n  history: {\n    replaceState: function replaceState() {},\n    pushState: function pushState() {},\n    go: function go() {},\n    back: function back() {}\n  },\n  CustomEvent: function CustomEvent() {\n    return this;\n  },\n  addEventListener: function addEventListener() {},\n  removeEventListener: function removeEventListener() {},\n  getComputedStyle: function getComputedStyle() {\n    return {\n      getPropertyValue: function getPropertyValue() {\n        return '';\n      }\n    };\n  },\n  Image: function Image() {},\n  Date: function Date() {},\n  screen: {},\n  setTimeout: function setTimeout() {},\n  clearTimeout: function clearTimeout() {},\n  matchMedia: function matchMedia() {\n    return {};\n  }\n};\nextend(win, ssrWindow);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js?");

/***/ }),

/***/ "./node_modules/framework7-v575/utils/device.js":
/*!******************************************************!*\
  !*** ./node_modules/framework7-v575/utils/device.js ***!
  \******************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (process) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ \"./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js\");\n/* harmony import */ var _support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./support */ \"./node_modules/framework7-v575/utils/support.js\");\n\n\nvar Device = function Device() {\n  var platform = ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].navigator.platform;\n  var ua = ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].navigator.userAgent;\n  var device = {\n    ios: false,\n    android: false,\n    androidChrome: false,\n    desktop: false,\n    iphone: false,\n    ipod: false,\n    ipad: false,\n    edge: false,\n    ie: false,\n    firefox: false,\n    macos: false,\n    windows: false,\n    cordova: !!(ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].cordova || ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].phonegap),\n    phonegap: !!(ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].cordova || ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].phonegap),\n    electron: false,\n    nwjs: false\n  };\n  var screenWidth = ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].screen.width;\n  var screenHeight = ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].screen.height;\n  var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n  var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n  var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n  var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n  var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\n  var edge = ua.indexOf('Edge/') >= 0;\n  var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0;\n  var windows = platform === 'Win32';\n  var electron = ua.toLowerCase().indexOf('electron') >= 0;\n  var nwjs = typeof nw !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.nw !== 'undefined';\n  var macos = platform === 'MacIntel';\n\n  // iPadOs 13 fix\n  var iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n  if (!ipad && macos && _support__WEBPACK_IMPORTED_MODULE_1__[\"default\"].touch && iPadScreens.indexOf(\"\".concat(screenWidth, \"x\").concat(screenHeight)) >= 0) {\n    ipad = ua.match(/(Version)\\/([\\d.]+)/);\n    if (!ipad) ipad = [0, 1, '13_0_0'];\n    macos = false;\n  }\n  device.ie = ie;\n  device.edge = edge;\n  device.firefox = firefox;\n\n  // Android\n  if (android && !windows) {\n    device.os = 'android';\n    device.osVersion = android[2];\n    device.android = true;\n    device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;\n  }\n  if (ipad || iphone || ipod) {\n    device.os = 'ios';\n    device.ios = true;\n  }\n  // iOS\n  if (iphone && !ipod) {\n    device.osVersion = iphone[2].replace(/_/g, '.');\n    device.iphone = true;\n  }\n  if (ipad) {\n    device.osVersion = ipad[2].replace(/_/g, '.');\n    device.ipad = true;\n  }\n  if (ipod) {\n    device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n    device.ipod = true;\n  }\n  // iOS 8+ changed UA\n  if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {\n    if (device.osVersion.split('.')[0] === '10') {\n      device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];\n    }\n  }\n\n  // Webview\n  device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].navigator.standalone)) || ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia && ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia('(display-mode: standalone)').matches;\n  device.webview = device.webView;\n  device.standalone = device.webView;\n\n  // Desktop\n  device.desktop = !(device.ios || device.android) || electron || nwjs;\n  if (device.desktop) {\n    device.electron = electron;\n    device.nwjs = nwjs;\n    device.macos = macos;\n    device.windows = windows;\n    if (device.macos) {\n      device.os = 'macos';\n    }\n    if (device.windows) {\n      device.os = 'windows';\n    }\n  }\n\n  // Pixel Ratio\n  device.pixelRatio = ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].devicePixelRatio || 1;\n\n  // Color Scheme\n  var DARK = '(prefers-color-scheme: dark)';\n  var LIGHT = '(prefers-color-scheme: light)';\n  device.prefersColorScheme = function prefersColorTheme() {\n    var theme;\n    if (ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia && ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia(LIGHT).matches) {\n      theme = 'light';\n    }\n    if (ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia && ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].matchMedia(DARK).matches) {\n      theme = 'dark';\n    }\n    return theme;\n  };\n\n  // Export object\n  return device;\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Device);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/framework7-v575/utils/device.js?");

/***/ }),

/***/ "./node_modules/framework7-v575/utils/support.js":
/*!*******************************************************!*\
  !*** ./node_modules/framework7-v575/utils/support.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ \"./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js\");\n\nvar Support = function Support() {\n  return {\n    touch: !!('ontouchstart' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"] || ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].DocumentTouch && ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"document\"] instanceof ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].DocumentTouch),\n    pointerEvents: !!ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].PointerEvent && 'maxTouchPoints' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].navigator && ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].navigator.maxTouchPoints >= 0,\n    observer: function checkObserver() {\n      return 'MutationObserver' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"] || 'WebkitMutationObserver' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"];\n    }(),\n    passiveListener: function checkPassiveListener() {\n      var supportsPassive = false;\n      try {\n        var opts = Object.defineProperty({}, 'passive', {\n          // eslint-disable-next-line\n          get: function get() {\n            supportsPassive = true;\n          }\n        });\n        ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"].addEventListener('testPassiveListener', null, opts);\n      } catch (e) {\n        // No support\n      }\n      return supportsPassive;\n    }(),\n    gestures: function checkGestures() {\n      return 'ongesturestart' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"];\n    }(),\n    intersectionObserver: function checkObserver() {\n      return 'IntersectionObserver' in ssr_window__WEBPACK_IMPORTED_MODULE_0__[\"window\"];\n    }()\n  };\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Support);\n\n//# sourceURL=webpack://futureBooks/./node_modules/framework7-v575/utils/support.js?");

/***/ }),

/***/ "./node_modules/framework7-v575/utils/utils.js":
/*!*****************************************************!*\
  !*** ./node_modules/framework7-v575/utils/utils.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ssr-window */ \"./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js\");\n\n\n/* eslint no-control-regex: \"off\" */\n\n\n// Remove Diacritics\nvar defaultDiacriticsRemovalap = [{\n  base: 'A',\n  letters: \"A\\u24B6\\uFF21\\xC0\\xC1\\xC2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\xC3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\xC4\\u01DE\\u1EA2\\xC5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F\"\n}, {\n  base: 'AA',\n  letters: \"\\uA732\"\n}, {\n  base: 'AE',\n  letters: \"\\xC6\\u01FC\\u01E2\"\n}, {\n  base: 'AO',\n  letters: \"\\uA734\"\n}, {\n  base: 'AU',\n  letters: \"\\uA736\"\n}, {\n  base: 'AV',\n  letters: \"\\uA738\\uA73A\"\n}, {\n  base: 'AY',\n  letters: \"\\uA73C\"\n}, {\n  base: 'B',\n  letters: \"B\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181\"\n}, {\n  base: 'C',\n  letters: \"C\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\xC7\\u1E08\\u0187\\u023B\\uA73E\"\n}, {\n  base: 'D',\n  letters: \"D\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\"\n}, {\n  base: 'DZ',\n  letters: \"\\u01F1\\u01C4\"\n}, {\n  base: 'Dz',\n  letters: \"\\u01F2\\u01C5\"\n}, {\n  base: 'E',\n  letters: \"E\\u24BA\\uFF25\\xC8\\xC9\\xCA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\xCB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E\"\n}, {\n  base: 'F',\n  letters: \"F\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B\"\n}, {\n  base: 'G',\n  letters: \"G\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E\"\n}, {\n  base: 'H',\n  letters: \"H\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D\"\n}, {\n  base: 'I',\n  letters: \"I\\u24BE\\uFF29\\xCC\\xCD\\xCE\\u0128\\u012A\\u012C\\u0130\\xCF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197\"\n}, {\n  base: 'J',\n  letters: \"J\\u24BF\\uFF2A\\u0134\\u0248\"\n}, {\n  base: 'K',\n  letters: \"K\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2\"\n}, {\n  base: 'L',\n  letters: \"L\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780\"\n}, {\n  base: 'LJ',\n  letters: \"\\u01C7\"\n}, {\n  base: 'Lj',\n  letters: \"\\u01C8\"\n}, {\n  base: 'M',\n  letters: \"M\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C\"\n}, {\n  base: 'N',\n  letters: \"N\\u24C3\\uFF2E\\u01F8\\u0143\\xD1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4\"\n}, {\n  base: 'NJ',\n  letters: \"\\u01CA\"\n}, {\n  base: 'Nj',\n  letters: \"\\u01CB\"\n}, {\n  base: 'O',\n  letters: \"O\\u24C4\\uFF2F\\xD2\\xD3\\xD4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\xD5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\xD6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\xD8\\u01FE\\u0186\\u019F\\uA74A\\uA74C\"\n}, {\n  base: 'OI',\n  letters: \"\\u01A2\"\n}, {\n  base: 'OO',\n  letters: \"\\uA74E\"\n}, {\n  base: 'OU',\n  letters: \"\\u0222\"\n}, {\n  base: 'OE',\n  letters: \"\\x8C\\u0152\"\n}, {\n  base: 'oe',\n  letters: \"\\x9C\\u0153\"\n}, {\n  base: 'P',\n  letters: \"P\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754\"\n}, {\n  base: 'Q',\n  letters: \"Q\\u24C6\\uFF31\\uA756\\uA758\\u024A\"\n}, {\n  base: 'R',\n  letters: \"R\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782\"\n}, {\n  base: 'S',\n  letters: \"S\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784\"\n}, {\n  base: 'T',\n  letters: \"T\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786\"\n}, {\n  base: 'TZ',\n  letters: \"\\uA728\"\n}, {\n  base: 'U',\n  letters: \"U\\u24CA\\uFF35\\xD9\\xDA\\xDB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\xDC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244\"\n}, {\n  base: 'V',\n  letters: \"V\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245\"\n}, {\n  base: 'VY',\n  letters: \"\\uA760\"\n}, {\n  base: 'W',\n  letters: \"W\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72\"\n}, {\n  base: 'X',\n  letters: \"X\\u24CD\\uFF38\\u1E8A\\u1E8C\"\n}, {\n  base: 'Y',\n  letters: \"Y\\u24CE\\uFF39\\u1EF2\\xDD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE\"\n}, {\n  base: 'Z',\n  letters: \"Z\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762\"\n}, {\n  base: 'a',\n  letters: \"a\\u24D0\\uFF41\\u1E9A\\xE0\\xE1\\xE2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\xE3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\xE4\\u01DF\\u1EA3\\xE5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250\"\n}, {\n  base: 'aa',\n  letters: \"\\uA733\"\n}, {\n  base: 'ae',\n  letters: \"\\xE6\\u01FD\\u01E3\"\n}, {\n  base: 'ao',\n  letters: \"\\uA735\"\n}, {\n  base: 'au',\n  letters: \"\\uA737\"\n}, {\n  base: 'av',\n  letters: \"\\uA739\\uA73B\"\n}, {\n  base: 'ay',\n  letters: \"\\uA73D\"\n}, {\n  base: 'b',\n  letters: \"b\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253\"\n}, {\n  base: 'c',\n  letters: \"c\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\xE7\\u1E09\\u0188\\u023C\\uA73F\\u2184\"\n}, {\n  base: 'd',\n  letters: \"d\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A\"\n}, {\n  base: 'dz',\n  letters: \"\\u01F3\\u01C6\"\n}, {\n  base: 'e',\n  letters: \"e\\u24D4\\uFF45\\xE8\\xE9\\xEA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\xEB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD\"\n}, {\n  base: 'f',\n  letters: \"f\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C\"\n}, {\n  base: 'g',\n  letters: \"g\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F\"\n}, {\n  base: 'h',\n  letters: \"h\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265\"\n}, {\n  base: 'hv',\n  letters: \"\\u0195\"\n}, {\n  base: 'i',\n  letters: \"i\\u24D8\\uFF49\\xEC\\xED\\xEE\\u0129\\u012B\\u012D\\xEF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131\"\n}, {\n  base: 'j',\n  letters: \"j\\u24D9\\uFF4A\\u0135\\u01F0\\u0249\"\n}, {\n  base: 'k',\n  letters: \"k\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3\"\n}, {\n  base: 'l',\n  letters: \"l\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747\"\n}, {\n  base: 'lj',\n  letters: \"\\u01C9\"\n}, {\n  base: 'm',\n  letters: \"m\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F\"\n}, {\n  base: 'n',\n  letters: \"n\\u24DD\\uFF4E\\u01F9\\u0144\\xF1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5\"\n}, {\n  base: 'nj',\n  letters: \"\\u01CC\"\n}, {\n  base: 'o',\n  letters: \"o\\u24DE\\uFF4F\\xF2\\xF3\\xF4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\xF5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\xF6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\xF8\\u01FF\\u0254\\uA74B\\uA74D\\u0275\"\n}, {\n  base: 'oi',\n  letters: \"\\u01A3\"\n}, {\n  base: 'ou',\n  letters: \"\\u0223\"\n}, {\n  base: 'oo',\n  letters: \"\\uA74F\"\n}, {\n  base: 'p',\n  letters: \"p\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755\"\n}, {\n  base: 'q',\n  letters: \"q\\u24E0\\uFF51\\u024B\\uA757\\uA759\"\n}, {\n  base: 'r',\n  letters: \"r\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783\"\n}, {\n  base: 's',\n  letters: \"s\\u24E2\\uFF53\\xDF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B\"\n}, {\n  base: 't',\n  letters: \"t\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787\"\n}, {\n  base: 'tz',\n  letters: \"\\uA729\"\n}, {\n  base: 'u',\n  letters: \"u\\u24E4\\uFF55\\xF9\\xFA\\xFB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\xFC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289\"\n}, {\n  base: 'v',\n  letters: \"v\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C\"\n}, {\n  base: 'vy',\n  letters: \"\\uA761\"\n}, {\n  base: 'w',\n  letters: \"w\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73\"\n}, {\n  base: 'x',\n  letters: \"x\\u24E7\\uFF58\\u1E8B\\u1E8D\"\n}, {\n  base: 'y',\n  letters: \"y\\u24E8\\uFF59\\u1EF3\\xFD\\u0177\\u1EF9\\u0233\\u1E8F\\xFF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF\"\n}, {\n  base: 'z',\n  letters: \"z\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763\"\n}];\nvar diacriticsMap = {};\nfor (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) {\n  var letters = defaultDiacriticsRemovalap[i].letters;\n  for (var j = 0; j < letters.length; j += 1) {\n    diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base;\n  }\n}\nvar _uniqueNumber = 1;\nvar Utils = {\n  uniqueNumber: function uniqueNumber() {\n    _uniqueNumber += 1;\n    return _uniqueNumber;\n  },\n  id: function id() {\n    var mask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'xxxxxxxxxx';\n    var map = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0123456789abcdef';\n    var length = map.length;\n    return mask.replace(/x/g, function () {\n      return map[Math.floor(Math.random() * length)];\n    });\n  },\n  mdPreloaderContent: \"\\n    <span class=\\\"preloader-inner\\\">\\n      <span class=\\\"preloader-inner-gap\\\"></span>\\n      <span class=\\\"preloader-inner-left\\\">\\n          <span class=\\\"preloader-inner-half-circle\\\"></span>\\n      </span>\\n      <span class=\\\"preloader-inner-right\\\">\\n          <span class=\\\"preloader-inner-half-circle\\\"></span>\\n      </span>\\n    </span>\\n  \".trim(),\n  iosPreloaderContent: \"\\n    <span class=\\\"preloader-inner\\\">\\n      \".concat([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(function () {\n    return '<span class=\"preloader-inner-line\"></span>';\n  }).join(''), \"\\n    </span>\\n  \").trim(),\n  auroraPreloaderContent: \"\\n    <span class=\\\"preloader-inner\\\">\\n      <span class=\\\"preloader-inner-circle\\\"></span>\\n    </span>\\n  \",\n  eventNameToColonCase: function eventNameToColonCase(eventName) {\n    var hasColon;\n    return eventName.split('').map(function (char, index) {\n      if (char.match(/[A-Z]/) && index !== 0 && !hasColon) {\n        hasColon = true;\n        return \":\".concat(char.toLowerCase());\n      }\n      return char.toLowerCase();\n    }).join('');\n  },\n  deleteProps: function deleteProps(obj) {\n    var object = obj;\n    Object.keys(object).forEach(function (key) {\n      try {\n        object[key] = null;\n      } catch (e) {\n        // no setter for object\n      }\n      try {\n        delete object[key];\n      } catch (e) {\n        // something got wrong\n      }\n    });\n  },\n  nextTick: function nextTick(callback) {\n    var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    return setTimeout(callback, delay);\n  },\n  nextFrame: function nextFrame(callback) {\n    return Utils.requestAnimationFrame(function () {\n      Utils.requestAnimationFrame(callback);\n    });\n  },\n  now: function now() {\n    return Date.now();\n  },\n  requestAnimationFrame: function requestAnimationFrame(callback) {\n    return ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].requestAnimationFrame(callback);\n  },\n  cancelAnimationFrame: function cancelAnimationFrame(id) {\n    return ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].cancelAnimationFrame(id);\n  },\n  removeDiacritics: function removeDiacritics(str) {\n    return str.replace(/[^\\u0000-\\u007E]/g, function (a) {\n      return diacriticsMap[a] || a;\n    });\n  },\n  parseUrlQuery: function parseUrlQuery(url) {\n    var query = {};\n    var urlToParse = url || ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].location.href;\n    var i;\n    var params;\n    var param;\n    var length;\n    if (typeof urlToParse === 'string' && urlToParse.length) {\n      urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\\S*\\?/, '') : '';\n      params = urlToParse.split('&').filter(function (paramsPart) {\n        return paramsPart !== '';\n      });\n      length = params.length;\n      for (i = 0; i < length; i += 1) {\n        param = params[i].replace(/#\\S+/g, '').split('=');\n        query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param.slice(1).join('=')) || '';\n      }\n    }\n    return query;\n  },\n  getTranslate: function getTranslate(el) {\n    var axis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n    var matrix;\n    var curTransform;\n    var transformMatrix;\n    var curStyle = ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].getComputedStyle(el, null);\n    if (ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].WebKitCSSMatrix) {\n      curTransform = curStyle.transform || curStyle.webkitTransform;\n      if (curTransform.split(',').length > 6) {\n        curTransform = curTransform.split(', ').map(function (a) {\n          return a.replace(',', '.');\n        }).join(', ');\n      }\n      // Some old versions of Webkit choke when 'none' is passed; pass\n      // empty string instead in this case\n      transformMatrix = new ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n    } else {\n      transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n      matrix = transformMatrix.toString().split(',');\n    }\n    if (axis === 'x') {\n      // Latest Chrome and webkits Fix\n      if (ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].WebKitCSSMatrix) curTransform = transformMatrix.m41;\n      // Crazy IE10 Matrix\n      else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n      // Normal Browsers\n      else curTransform = parseFloat(matrix[4]);\n    }\n    if (axis === 'y') {\n      // Latest Chrome and webkits Fix\n      if (ssr_window__WEBPACK_IMPORTED_MODULE_2__[\"window\"].WebKitCSSMatrix) curTransform = transformMatrix.m42;\n      // Crazy IE10 Matrix\n      else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n      // Normal Browsers\n      else curTransform = parseFloat(matrix[5]);\n    }\n    return curTransform || 0;\n  },\n  serializeObject: function serializeObject(obj) {\n    var parents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    if (typeof obj === 'string') return obj;\n    var resultArray = [];\n    var separator = '&';\n    var newParents;\n    function varName(name) {\n      if (parents.length > 0) {\n        var parentParts = '';\n        for (var _j = 0; _j < parents.length; _j += 1) {\n          if (_j === 0) parentParts += parents[_j];else parentParts += \"[\".concat(encodeURIComponent(parents[_j]), \"]\");\n        }\n        return \"\".concat(parentParts, \"[\").concat(encodeURIComponent(name), \"]\");\n      }\n      return encodeURIComponent(name);\n    }\n    function varValue(value) {\n      return encodeURIComponent(value);\n    }\n    Object.keys(obj).forEach(function (prop) {\n      var toPush;\n      if (Array.isArray(obj[prop])) {\n        toPush = [];\n        for (var _i = 0; _i < obj[prop].length; _i += 1) {\n          if (!Array.isArray(obj[prop][_i]) && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(obj[prop][_i]) === 'object') {\n            newParents = parents.slice();\n            newParents.push(prop);\n            newParents.push(String(_i));\n            toPush.push(Utils.serializeObject(obj[prop][_i], newParents));\n          } else {\n            toPush.push(\"\".concat(varName(prop), \"[]=\").concat(varValue(obj[prop][_i])));\n          }\n        }\n        if (toPush.length > 0) resultArray.push(toPush.join(separator));\n      } else if (obj[prop] === null || obj[prop] === '') {\n        resultArray.push(\"\".concat(varName(prop), \"=\"));\n      } else if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(obj[prop]) === 'object') {\n        // Object, convert to named array\n        newParents = parents.slice();\n        newParents.push(prop);\n        toPush = Utils.serializeObject(obj[prop], newParents);\n        if (toPush !== '') resultArray.push(toPush);\n      } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') {\n        // Should be string or plain value\n        resultArray.push(\"\".concat(varName(prop), \"=\").concat(varValue(obj[prop])));\n      } else if (obj[prop] === '') resultArray.push(varName(prop));\n    });\n    return resultArray.join(separator);\n  },\n  isObject: function isObject(o) {\n    return _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(o) === 'object' && o !== null && o.constructor && o.constructor === Object;\n  },\n  merge: function merge() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    var to = args[0];\n    args.splice(0, 1);\n    var from = args;\n    for (var _i2 = 0; _i2 < from.length; _i2 += 1) {\n      var nextSource = args[_i2];\n      if (nextSource !== undefined && nextSource !== null) {\n        var keysArray = Object.keys(Object(nextSource));\n        for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n          var nextKey = keysArray[nextIndex];\n          var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n          if (desc !== undefined && desc.enumerable) {\n            to[nextKey] = nextSource[nextKey];\n          }\n        }\n      }\n    }\n    return to;\n  },\n  extend: function extend() {\n    var deep = true;\n    var to;\n    var from;\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n    if (typeof args[0] === 'boolean') {\n      deep = args[0];\n      to = args[1];\n      args.splice(0, 2);\n      from = args;\n    } else {\n      to = args[0];\n      args.splice(0, 1);\n      from = args;\n    }\n    for (var _i3 = 0; _i3 < from.length; _i3 += 1) {\n      var nextSource = args[_i3];\n      if (nextSource !== undefined && nextSource !== null) {\n        var keysArray = Object.keys(Object(nextSource));\n        for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n          var nextKey = keysArray[nextIndex];\n          var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n          if (desc !== undefined && desc.enumerable) {\n            if (!deep) {\n              to[nextKey] = nextSource[nextKey];\n            } else if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {\n              Utils.extend(to[nextKey], nextSource[nextKey]);\n            } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {\n              to[nextKey] = {};\n              Utils.extend(to[nextKey], nextSource[nextKey]);\n            } else {\n              to[nextKey] = nextSource[nextKey];\n            }\n          }\n        }\n      }\n    }\n    return to;\n  },\n  colorHexToRgb: function colorHexToRgb(hex) {\n    var h = hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b) {\n      return r + r + g + g + b + b;\n    });\n    var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(h);\n    return result ? result.slice(1).map(function (n) {\n      return parseInt(n, 16);\n    }) : null;\n  },\n  colorRgbToHex: function colorRgbToHex(r, g, b) {\n    var result = [r, g, b].map(function (n) {\n      var hex = n.toString(16);\n      return hex.length === 1 ? \"0\".concat(hex) : hex;\n    }).join('');\n    return \"#\".concat(result);\n  },\n  colorRgbToHsl: function colorRgbToHsl(r, g, b) {\n    r /= 255; // eslint-disable-line\n    g /= 255; // eslint-disable-line\n    b /= 255; // eslint-disable-line\n    var max = Math.max(r, g, b);\n    var min = Math.min(r, g, b);\n    var d = max - min;\n    var h;\n    if (d === 0) h = 0;else if (max === r) h = (g - b) / d % 6;else if (max === g) h = (b - r) / d + 2;else if (max === b) h = (r - g) / d + 4;\n    var l = (min + max) / 2;\n    var s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));\n    if (h < 0) h = 360 / 60 + h;\n    return [h * 60, s, l];\n  },\n  colorHslToRgb: function colorHslToRgb(h, s, l) {\n    var c = (1 - Math.abs(2 * l - 1)) * s;\n    var hp = h / 60;\n    var x = c * (1 - Math.abs(hp % 2 - 1));\n    var rgb1;\n    if (Number.isNaN(h) || typeof h === 'undefined') {\n      rgb1 = [0, 0, 0];\n    } else if (hp <= 1) rgb1 = [c, x, 0];else if (hp <= 2) rgb1 = [x, c, 0];else if (hp <= 3) rgb1 = [0, c, x];else if (hp <= 4) rgb1 = [0, x, c];else if (hp <= 5) rgb1 = [x, 0, c];else if (hp <= 6) rgb1 = [c, 0, x];\n    var m = l - c / 2;\n    return rgb1.map(function (n) {\n      return Math.max(0, Math.min(255, Math.round(255 * (n + m))));\n    });\n  },\n  colorHsbToHsl: function colorHsbToHsl(h, s, b) {\n    var HSL = {\n      h: h,\n      s: 0,\n      l: 0\n    };\n    var HSB = {\n      h: h,\n      s: s,\n      b: b\n    };\n    HSL.l = (2 - HSB.s) * HSB.b / 2;\n    HSL.s = HSL.l && HSL.l < 1 ? HSB.s * HSB.b / (HSL.l < 0.5 ? HSL.l * 2 : 2 - HSL.l * 2) : HSL.s;\n    return [HSL.h, HSL.s, HSL.l];\n  },\n  colorHslToHsb: function colorHslToHsb(h, s, l) {\n    var HSB = {\n      h: h,\n      s: 0,\n      b: 0\n    };\n    var HSL = {\n      h: h,\n      s: s,\n      l: l\n    };\n    var t = HSL.s * (HSL.l < 0.5 ? HSL.l : 1 - HSL.l);\n    HSB.b = HSL.l + t;\n    HSB.s = HSL.l > 0 ? 2 * t / HSB.b : HSB.s;\n    return [HSB.h, HSB.s, HSB.b];\n  },\n  colorThemeCSSProperties: function colorThemeCSSProperties() {\n    var hex;\n    var rgb;\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n    if (args.length === 1) {\n      hex = args[0];\n      rgb = Utils.colorHexToRgb(hex);\n    } else if (args.length === 3) {\n      rgb = args;\n      hex = Utils.colorRgbToHex.apply(Utils, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(rgb));\n    }\n    if (!rgb) return {};\n    var hsl = Utils.colorRgbToHsl.apply(Utils, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(rgb));\n    var hslShade = [hsl[0], hsl[1], Math.max(0, hsl[2] - 0.08)];\n    var hslTint = [hsl[0], hsl[1], Math.max(0, hsl[2] + 0.08)];\n    var shade = Utils.colorRgbToHex.apply(Utils, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Utils.colorHslToRgb.apply(Utils, hslShade)));\n    var tint = Utils.colorRgbToHex.apply(Utils, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Utils.colorHslToRgb.apply(Utils, hslTint)));\n    return {\n      '--f7-theme-color': hex,\n      '--f7-theme-color-rgb': rgb.join(', '),\n      '--f7-theme-color-shade': shade,\n      '--f7-theme-color-tint': tint\n    };\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Utils);\n\n//# sourceURL=webpack://futureBooks/./node_modules/framework7-v575/utils/utils.js?");

/***/ }),

/***/ "./node_modules/get-size/get-size.js":
/*!*******************************************!*\
  !*** ./node_modules/get-size/get-size.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * getSize v2.0.3\n * measure size of elements\n * MIT license\n */\n\n/* jshint browser: true, strict: true, undef: true, unused: true */\n/* globals console: false */\n\n( function( window, factory ) {\n  /* jshint strict: false */ /* globals define, module */\n  if ( true ) {\n    // AMD\n    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n})( window, function factory() {\n'use strict';\n\n// -------------------------- helpers -------------------------- //\n\n// get a number from a string, not a percentage\nfunction getStyleSize( value ) {\n  var num = parseFloat( value );\n  // not a percent like '100%', and a number\n  var isValid = value.indexOf('%') == -1 && !isNaN( num );\n  return isValid && num;\n}\n\nfunction noop() {}\n\nvar logError = typeof console == 'undefined' ? noop :\n  function( message ) {\n    console.error( message );\n  };\n\n// -------------------------- measurements -------------------------- //\n\nvar measurements = [\n  'paddingLeft',\n  'paddingRight',\n  'paddingTop',\n  'paddingBottom',\n  'marginLeft',\n  'marginRight',\n  'marginTop',\n  'marginBottom',\n  'borderLeftWidth',\n  'borderRightWidth',\n  'borderTopWidth',\n  'borderBottomWidth'\n];\n\nvar measurementsLength = measurements.length;\n\nfunction getZeroSize() {\n  var size = {\n    width: 0,\n    height: 0,\n    innerWidth: 0,\n    innerHeight: 0,\n    outerWidth: 0,\n    outerHeight: 0\n  };\n  for ( var i=0; i < measurementsLength; i++ ) {\n    var measurement = measurements[i];\n    size[ measurement ] = 0;\n  }\n  return size;\n}\n\n// -------------------------- getStyle -------------------------- //\n\n/**\n * getStyle, get style of element, check for Firefox bug\n * https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction getStyle( elem ) {\n  var style = getComputedStyle( elem );\n  if ( !style ) {\n    logError( 'Style returned ' + style +\n      '. Are you running this code in a hidden iframe on Firefox? ' +\n      'See https://bit.ly/getsizebug1' );\n  }\n  return style;\n}\n\n// -------------------------- setup -------------------------- //\n\nvar isSetup = false;\n\nvar isBoxSizeOuter;\n\n/**\n * setup\n * check isBoxSizerOuter\n * do on first getSize() rather than on page load for Firefox bug\n */\nfunction setup() {\n  // setup once\n  if ( isSetup ) {\n    return;\n  }\n  isSetup = true;\n\n  // -------------------------- box sizing -------------------------- //\n\n  /**\n   * Chrome & Safari measure the outer-width on style.width on border-box elems\n   * IE11 & Firefox<29 measures the inner-width\n   */\n  var div = document.createElement('div');\n  div.style.width = '200px';\n  div.style.padding = '1px 2px 3px 4px';\n  div.style.borderStyle = 'solid';\n  div.style.borderWidth = '1px 2px 3px 4px';\n  div.style.boxSizing = 'border-box';\n\n  var body = document.body || document.documentElement;\n  body.appendChild( div );\n  var style = getStyle( div );\n  // round value for browser zoom. desandro/masonry#928\n  isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n  getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n  body.removeChild( div );\n}\n\n// -------------------------- getSize -------------------------- //\n\nfunction getSize( elem ) {\n  setup();\n\n  // use querySeletor if elem is string\n  if ( typeof elem == 'string' ) {\n    elem = document.querySelector( elem );\n  }\n\n  // do not proceed on non-objects\n  if ( !elem || typeof elem != 'object' || !elem.nodeType ) {\n    return;\n  }\n\n  var style = getStyle( elem );\n\n  // if hidden, everything is 0\n  if ( style.display == 'none' ) {\n    return getZeroSize();\n  }\n\n  var size = {};\n  size.width = elem.offsetWidth;\n  size.height = elem.offsetHeight;\n\n  var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';\n\n  // get all measurements\n  for ( var i=0; i < measurementsLength; i++ ) {\n    var measurement = measurements[i];\n    var value = style[ measurement ];\n    var num = parseFloat( value );\n    // any 'auto', 'medium' value will be 0\n    size[ measurement ] = !isNaN( num ) ? num : 0;\n  }\n\n  var paddingWidth = size.paddingLeft + size.paddingRight;\n  var paddingHeight = size.paddingTop + size.paddingBottom;\n  var marginWidth = size.marginLeft + size.marginRight;\n  var marginHeight = size.marginTop + size.marginBottom;\n  var borderWidth = size.borderLeftWidth + size.borderRightWidth;\n  var borderHeight = size.borderTopWidth + size.borderBottomWidth;\n\n  var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;\n\n  // overwrite width and height if we can get it from style\n  var styleWidth = getStyleSize( style.width );\n  if ( styleWidth !== false ) {\n    size.width = styleWidth +\n      // add padding and border unless it's already including it\n      ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );\n  }\n\n  var styleHeight = getStyleSize( style.height );\n  if ( styleHeight !== false ) {\n    size.height = styleHeight +\n      // add padding and border unless it's already including it\n      ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );\n  }\n\n  size.innerWidth = size.width - ( paddingWidth + borderWidth );\n  size.innerHeight = size.height - ( paddingHeight + borderHeight );\n\n  size.outerWidth = size.width + marginWidth;\n  size.outerHeight = size.height + marginHeight;\n\n  return size;\n}\n\nreturn getSize;\n\n});\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/get-size/get-size.js?");

/***/ }),

/***/ "./node_modules/global/document.js":
/*!*****************************************!*\
  !*** ./node_modules/global/document.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :\n    typeof window !== 'undefined' ? window : {}\nvar minDoc = __webpack_require__(/*! min-document */ 8);\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n    doccy = document;\n} else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n    if (!doccy) {\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n}\n\nmodule.exports = doccy;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/global/document.js?");

/***/ }),

/***/ "./node_modules/global/window.js":
/*!***************************************!*\
  !*** ./node_modules/global/window.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n    win = window;\n} else if (typeof global !== \"undefined\") {\n    win = global;\n} else if (typeof self !== \"undefined\"){\n    win = self;\n} else {\n    win = {};\n}\n\nmodule.exports = win;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/global/window.js?");

/***/ }),

/***/ "./node_modules/has-binary2/index.js":
/*!*******************************************!*\
  !*** ./node_modules/has-binary2/index.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* global Blob File */\n\n/*\n * Module requirements.\n */\n\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\n\nvar toString = Object.prototype.toString;\nvar withNativeBlob = typeof Blob === 'function' ||\n                        typeof Blob !== 'undefined' && toString.call(Blob) === '[object BlobConstructor]';\nvar withNativeFile = typeof File === 'function' ||\n                        typeof File !== 'undefined' && toString.call(File) === '[object FileConstructor]';\n\n/**\n * Module exports.\n */\n\nmodule.exports = hasBinary;\n\n/**\n * Checks for binary data.\n *\n * Supports Buffer, ArrayBuffer, Blob and File.\n *\n * @param {Object} anything\n * @api public\n */\n\nfunction hasBinary (obj) {\n  if (!obj || typeof obj !== 'object') {\n    return false;\n  }\n\n  if (isArray(obj)) {\n    for (var i = 0, l = obj.length; i < l; i++) {\n      if (hasBinary(obj[i])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  if ((typeof Buffer === 'function' && Buffer.isBuffer && Buffer.isBuffer(obj)) ||\n    (typeof ArrayBuffer === 'function' && obj instanceof ArrayBuffer) ||\n    (withNativeBlob && obj instanceof Blob) ||\n    (withNativeFile && obj instanceof File)\n  ) {\n    return true;\n  }\n\n  // see: https://github.com/Automattic/has-binary/pull/4\n  if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) {\n    return hasBinary(obj.toJSON(), true);\n  }\n\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/has-binary2/index.js?");

/***/ }),

/***/ "./node_modules/has-cors/index.js":
/*!****************************************!*\
  !*** ./node_modules/has-cors/index.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n/**\n * Module exports.\n *\n * Logic borrowed from Modernizr:\n *\n *   - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js\n */\n\ntry {\n  module.exports = typeof XMLHttpRequest !== 'undefined' &&\n    'withCredentials' in new XMLHttpRequest();\n} catch (err) {\n  // if XMLHttp support is disabled in IE then it will throw\n  // when trying to create\n  module.exports = false;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/has-cors/index.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/anchor.js":
/*!************************************************!*\
  !*** ./node_modules/headbreaker/src/anchor.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const between = __webpack_require__(/*! ./between */ \"./node_modules/headbreaker/src/between.js\");\nconst Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\")\nconst {vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\")\n\n/**\n * An Anchor is a mutable 2D point that\n * is used to locate pieces and pieces inserts\n */\nclass Anchor {\n  /**\n   *\n   * @param {number} x\n   * @param {number} y\n   */\n  constructor(x, y) {\n    this.x = x;\n    this.y = y;\n  }\n\n  /**\n   * @param {Anchor} other\n   * @returns {boolean}\n   */\n  equal(other) {\n    return this.isAt(other.x, other.y);\n  }\n\n  /**\n   * @param {number} x\n   * @param {number} y\n   * @returns {boolean}\n   */\n  isAt(x, y) {\n    return Pair.equal(this.x, this.y, x, y);\n  }\n\n  /**\n   * Creates a translated copy of this Anchor\n   * according to a vector\n   *\n   * @param {number} dx\n   * @param {number} dy\n   * @returns {Anchor}\n   */\n  translated(dx, dy) {\n    return this.copy().translate(dx, dy);\n  }\n\n  /**\n   * Translates this anchor given to a vector\n   *\n   * @param {number} dx\n   * @param {number} dy\n   */\n  translate(dx, dy) {\n    this.x += dx;\n    this.y += dy;\n    return this;\n  }\n\n  /**\n   * Answers whether this Anchor is near to another given a tolerance\n   *\n   * @param {Anchor} other\n   * @param {number} tolerance the max distance within its radius is considered to be \"close\"\n   * @returns {boolean}\n   */\n  closeTo(other, tolerance) {\n    return between(this.x, other.x-tolerance, other.x + tolerance) && between(this.y, other.y-tolerance, other.y + tolerance)\n  }\n\n  /**\n   * @returns {Anchor}\n   */\n  copy() {\n    return new Anchor(this.x, this.y);\n  }\n\n  /**\n   * Calculates the difference between this anchor and another\n   *\n   * @param {Anchor} other\n   * @returns {import('./pair').Pair}\n   */\n  diff(other) {\n    return Pair.diff(this.x, this.y, other.x, other.y)\n  }\n\n  /**\n   * Converts this anchor into a point\n   *\n   * @returns {import('./pair').Pair}\n   */\n  asPair() {\n    return [this.x, this.y];\n  }\n\n  /**\n   * Converts this anchor into a vector\n   *\n   * @returns {import('./vector').Vector}\n   */\n  asVector() {\n    return vector(this.x, this.y);\n  }\n\n  /**\n   * @returns {import('./vector').Vector}\n   */\n  export() {\n    return this.asVector();\n  }\n\n  /**\n   * @param {number} maxX\n   * @param {number} maxY\n   * @returns {Anchor}\n   */\n  static atRandom(maxX, maxY) {\n    return new Anchor(Math.random() * maxX, Math.random() * maxY);\n  }\n\n  /**\n   *\n   * @param {import('./vector').Vector} vector\n   * @returns {Anchor}\n   */\n  static import(vector) {\n    return anchor(vector.x, vector.y);\n  }\n}\n\n/**\n * Creates a new {@link Anchor}\n *\n * @param {number} x\n * @param {number} y\n * @returns {Anchor}\n */\nfunction anchor(x, y) {\n  return new Anchor(x, y);\n}\n\nmodule.exports = {\n  anchor,\n  Anchor\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/anchor.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/axis.js":
/*!**********************************************!*\
  !*** ./node_modules/headbreaker/src/axis.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n\n/**\n * @typedef {Vertical|Horizontal} Axis\n */\n\nconst Vertical = {\n  /**\n   * @param {import(\"./vector\").Vector} vector\n   * @returns {number}\n   */\n  atVector(vector) {\n    return vector.y\n  },\n\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement} image\n   * @returns {number}\n   */\n  atDimension(image) {\n    return image.height;\n  }\n}\n\nconst Horizontal = {\n  /**\n   * @param {import(\"./vector\").Vector} vector\n   * @returns {number}\n   */\n  atVector(vector) {\n    return vector.x\n  },\n\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement} image\n   * @returns {number}\n   */\n  atDimension(image) {\n    return image.width;\n  }\n}\n\nmodule.exports = {\n  Vertical,\n  Horizontal\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/axis.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/between.js":
/*!*************************************************!*\
  !*** ./node_modules/headbreaker/src/between.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * @private\n * @module between\n * */\n\n/**\n * @param {number} value\n * @param {number} min\n * @param {number} max\n * @returns {boolean}\n */\nfunction between(value, min, max) {\n  return min <= value && value <= max;\n}\n\nmodule.exports = between;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/between.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/canvas.js":
/*!************************************************!*\
  !*** ./node_modules/headbreaker/src/canvas.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst Puzzle = __webpack_require__(/*! ./puzzle */ \"./node_modules/headbreaker/src/puzzle.js\");\nconst Manufacturer = __webpack_require__(/*! ../src/manufacturer */ \"./node_modules/headbreaker/src/manufacturer.js\");\nconst {twoAndTwo} = __webpack_require__(/*! ./sequence */ \"./node_modules/headbreaker/src/sequence.js\");\nconst Structure = __webpack_require__(/*! ./structure */ \"./node_modules/headbreaker/src/structure.js\");\nconst ImageMetadata = __webpack_require__(/*! ./image-metadata */ \"./node_modules/headbreaker/src/image-metadata.js\");\nconst {vector, ...Vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\nconst Metadata = __webpack_require__(/*! ./metadata */ \"./node_modules/headbreaker/src/metadata.js\");\nconst SpatialMetadata = __webpack_require__(/*! ./spatial-metadata */ \"./node_modules/headbreaker/src/spatial-metadata.js\");\nconst {PuzzleValidator, PieceValidator} = __webpack_require__(/*! ./validator */ \"./node_modules/headbreaker/src/validator.js\");\nconst {Horizontal, Vertical} = __webpack_require__(/*! ./axis */ \"./node_modules/headbreaker/src/axis.js\");\nconst Shuffler = __webpack_require__(/*! ./shuffler */ \"./node_modules/headbreaker/src/shuffler.js\");\nconst {diameter} = __webpack_require__(/*! ./size */ \"./node_modules/headbreaker/src/size.js\");\nconst {itself} = __webpack_require__(/*! ./prelude */ \"./node_modules/headbreaker/src/prelude.js\");\nconst {Classic} = __webpack_require__(/*! ./outline */ \"./node_modules/headbreaker/src/outline.js\");\n\n/**\n * @typedef {object} Shape\n * @typedef {object} Group\n * @typedef {object} Label\n */\n\n/**\n * @typedef {object} Figure\n * @property {Shape} shape\n * @property {Group} group\n * @property {Label} [label]\n */\n\n/**\n * @callback CanvasConnectionListener\n * @param {Piece} piece the connecting piece\n * @param {Figure} figure the visual representation of the connecting piece\n * @param {Piece} targetPiece the target connected piece\n * @param {Figure} targetFigure the visual representation of the target connected\n */\n\n/**\n * @callback CanvasTranslationListener\n * @param {Piece} piece the translated piece\n * @param {Figure} figure the visual representation of the translated piece\n * @param {number} dx the horizontal displacement\n * @param {number} dy the vertical displacement\n*/\n\n/**\n * @typedef {object} LabelMetadata\n * @property {string} [text]\n * @property {number} [fontSize]\n * @property {number} [x]\n * @property {number} [y]\n */\n\n/**\n * @typedef {object} CanvasMetadata\n * @property {string} [id]\n * @property {import('./vector').Vector} [targetPosition]\n * @property {import('./vector').Vector} [currentPosition]\n * @property {string} [color]\n * @property {boolean} [fixed]\n * @property {string} [strokeColor]\n * @property {import('./image-metadata').ImageLike} [image]\n * @property {LabelMetadata} [label]\n */\n\n/**\n * @typedef {object} Template\n * @property {import('./structure').StructureLike} structure\n * @property {import('./size').Size} [size]\n * @property {CanvasMetadata} metadata\n */\n\n /**\n  * An HTML graphical area where puzzles and pieces can be rendered. No assumption of the rendering backend is done - it may be\n  * and be a plain HTML SVG or canvas element, or a higher-level library - and this task is fully delegated to {@link Painter}\n  */\nclass Canvas {\n\n  /**\n   * @private\n   * @typedef {import('./painter')} Painter\n   */\n\n  /**\n   * @param {string} id  the html id of the element where to place the canvas\n   * @param {object} options\n   * @param {number} options.width\n   * @param {number} options.height\n   * @param {import('./vector').Vector|number} [options.pieceSize] the piece size expresed as it edge-to-edge diameter\n   * @param {number} [options.proximity]\n   * @param {import('./vector').Vector|number} [options.borderFill] the broder fill of the pieces, expresed in pixels. 0 means no border fill, 0.5 * pieceSize means full fill\n   * @param {number} [options.strokeWidth]\n   * @param {string} [options.strokeColor]\n   * @param {number} [options.lineSoftness] how soft the line will be\n   * @param {boolean} [options.preventOffstageDrag] whether dragging out of canvas is prevented\n   * @param {import('./image-metadata').ImageLike} [options.image] an optional background image for the puzzle that will be split across all pieces.\n   * @param {boolean} [options.fixed] whether the canvas can is fixed or can be dragged\n   * @param {Painter} [options.painter] the Painter object used to actually draw figures in canvas\n   * @param {import('./vector').Vector|number} [options.puzzleDiameter] the puzzle diameter used to calculate the maximal width and height\n   *                                                                    You only need to specify this option when pieces are manually sketched and images must be adjusted\n   * @param {import('./vector').Vector|number} [options.maxPiecesCount] the maximal amount of pieces used to calculate the maximal width and height.\n   *                                                                    You only need to specify this option when pieces are manually sketched and images must be adjusted\n   * @param {import('./outline').Outline} [options.outline]\n   */\n  constructor(id, {\n      width,\n      height,\n      pieceSize = 50,\n      proximity = 10,\n      borderFill = 0,\n      strokeWidth = 3,\n      strokeColor = 'black',\n      lineSoftness = 0,\n      preventOffstageDrag = false,\n      image = null,\n      fixed = false,\n      painter = null,\n      puzzleDiameter = null,\n      maxPiecesCount = null,\n      outline = null\n    }) {\n    this.width = width;\n    this.height = height;\n    this.pieceSize = diameter(pieceSize);\n    this.borderFill = Vector.cast(borderFill);\n    this.imageMetadata = ImageMetadata.asImageMetadata(image);\n    this.strokeWidth = strokeWidth;\n    this.strokeColor = strokeColor;\n    this.lineSoftness = lineSoftness;\n    this.preventOffstageDrag = preventOffstageDrag;\n    this.proximity = proximity;\n    this.fixed = fixed;\n    /** @type {Painter} */\n    this._painter = painter || new window['headbreaker']['painters']['Konva']();\n    this._initialize();\n    this._painter.initialize(this, id);\n    /** @type {import('./vector').Vector} */\n    this._maxPiecesCount = Vector.cast(maxPiecesCount);\n    /** @type {import('./vector').Vector} */\n    this._puzzleDiameter = Vector.cast(puzzleDiameter);\n    /** @type {(image: import('./image-metadata').ImageMetadata) => import('./image-metadata').ImageMetadata} */\n    this._imageAdjuster = itself;\n    this._outline = outline || Classic;\n  }\n\n  _initialize() {\n    /** @type {Puzzle} */\n    this._puzzle = null;\n    /** @type {Object<string, Figure>} */\n    this.figures = {};\n    /** @type {Object<string, Template>} */\n    this.templates = {};\n  }\n\n  /**\n   * Creates and renders a piece using a template, that is ready to be rendered by calling {@link Canvas#draw}\n   *\n   * @param {Template} options\n   */\n  sketchPiece({structure, size = null, metadata}) {\n    SpatialMetadata.initialize(metadata, Vector.zero())\n    this.renderPiece(this._newPiece(structure, size, metadata));\n  }\n\n  /**\n   * Renders a previously created piece object\n   *\n   * @param {Piece} piece\n   */\n  renderPiece(piece) {\n    /** @type {Figure} */\n    const figure = {label: null, group: null, shape: null};\n    this.figures[piece.metadata.id] = figure;\n\n    this._painter.sketch(this, piece, figure, this._outline);\n\n    /** @type {LabelMetadata} */\n    const label = piece.metadata.label;\n    if (label && label.text) {\n      label.fontSize = label.fontSize || piece.diameter.y * 0.55;\n      label.y = label.y || (piece.diameter.y - label.fontSize) / 2;\n      this._painter.label(this, piece, figure);\n    }\n\n    this._bindGroupToPiece(figure.group, piece);\n    this._bindPieceToGroup(piece, figure.group);\n  }\n\n  /**\n   * Renders many previously created piece objects\n   *\n   * @param {Piece[]} pieces\n   */\n  renderPieces(pieces) {\n    pieces.forEach((it) => {\n      this._annotatePiecePosition(it);\n      this.renderPiece(it);\n    });\n  }\n\n  /**\n   * Renders a previously created puzzle object. This method\n   * overrides this canvas' {@link Canvas#pieceDiameter} and {@link Canvas#proximity}\n   *\n   * @param {Puzzle} puzzle\n   */\n  renderPuzzle(puzzle) {\n    this.pieceSize = puzzle.pieceSize;\n    this.proximity = puzzle.proximity * 2;\n    this._puzzle = puzzle;\n    this.renderPieces(puzzle.pieces);\n  }\n\n  /**\n   * Automatically creates and renders pieces given some configuration paramters\n   *\n   * @param {object} options\n   * @param {number} [options.horizontalPiecesCount]\n   * @param {number} [options.verticalPiecesCount]\n   * @param {import('./sequence').InsertsGenerator} [options.insertsGenerator]\n   * @param {CanvasMetadata[]} [options.metadata] optional list of metadata that will be attached to each generated piece\n   */\n  autogenerate({horizontalPiecesCount = 5, verticalPiecesCount = 5, insertsGenerator = twoAndTwo, metadata = []} = {}) {\n    const manufacturer = new Manufacturer();\n    manufacturer.withDimmensions(horizontalPiecesCount, verticalPiecesCount);\n    manufacturer.withInsertsGenerator(insertsGenerator);\n    manufacturer.withMetadata(metadata);\n    this.autogenerateWithManufacturer(manufacturer);\n  }\n\n  /**\n   * @param {Manufacturer} manufacturer\n   */\n  autogenerateWithManufacturer(manufacturer) {\n    manufacturer.withStructure(this.settings);\n    this._puzzle = manufacturer.build();\n    this._maxPiecesCount = vector(manufacturer.width, manufacturer.height);\n    this.renderPieces(this.puzzle.pieces);\n  }\n\n  /**\n   * Creates a name piece template, that can be later instantiated using {@link Canvas#sketchPieceUsingTemplate}\n   *\n   * @param {string} name\n   * @param {Template} template\n   */\n  defineTemplate(name, template) {\n    this.templates[name] = template;\n  }\n\n  /**\n   * Creates a new Piece with given id using a named template\n   * defined with {@link Canvas#defineTemplate}\n   *\n   * @param {string} id\n   * @param {string} templateName\n   */\n  sketchPieceUsingTemplate(id, templateName) {\n    const options = this.templates[templateName];\n    if (!options) {\n      throw new Error(`Unknown template ${id}`);\n    }\n    const metadata = Metadata.copy(options.metadata);\n    metadata.id = id;\n    this.sketchPiece({structure: options.structure, metadata: metadata})\n  }\n\n  /**\n   * @param {number} farness from 0 to 1, how far pieces will be placed from x = pieceDiameter.x, y = pieceDiameter.y\n   */\n  shuffle(farness = 1) {\n    const offset = this.pieceRadio;\n    this.puzzle.shuffle(farness * (this.width - offset.x), farness * (this.height - offset.y))\n    this.puzzle.translate(offset.x, offset.y);\n    this.autoconnected = true;\n  }\n\n  /**\n   * **Warning**: this method requires {@code maxPiecesCount} to be set.\n   *\n   * @param {number} farness\n   */\n  shuffleColumns(farness = 1) {\n    this._shuffleSolution(farness, Shuffler.columns);\n  }\n\n  /**\n   * **Warning**: this method requires {@code maxPiecesCount} to be set.\n   *\n   * @param {number} farness\n   */\n  shuffleGrid(farness = 1) {\n    this._shuffleSolution(farness, Shuffler.grid);\n  }\n\n  /**\n   * @private\n   * @param {number} farness\n   * @param {import('./shuffler').Shuffler} shuffler\n   */\n  _shuffleSolution(farness, shuffler) {\n    this.solve();\n    this.puzzle.shuffleWith(Shuffler.padder(this.proximity * 3, this.maxPiecesCount.x, this.maxPiecesCount.y));\n    this.puzzle.shuffleWith(shuffler)\n    this.puzzle.shuffleWith(Shuffler.noise(Vector.cast(this.proximity * farness / 2)))\n    this.autoconnected = true;\n  }\n\n  solve() {\n    this.puzzle.pieces.forEach(it => {\n      const {x, y} = it.metadata.targetPosition;\n      it.relocateTo(x, y);\n    });\n    this.autoconnect();\n  }\n\n  autoconnect() {\n    this.puzzle.autoconnect();\n    this.autoconnected = true;\n  }\n\n  /**\n   * Draws this canvas for the first time\n   */\n  draw() {\n    if (!this.autoconnected) {\n      this.autoconnect();\n    }\n    this.puzzle.updateValidity();\n    this.autoconnected = false;\n    this.redraw();\n  }\n\n  /**\n   * Re-draws this canvas. This method is useful when the canvas {@link Figure}s have\n   * being modified and you need changes to become visible\n   */\n  redraw() {\n    this._painter.draw(this);\n  }\n\n  /**\n   * Refreshes image metadata.\n   *\n   * Use this method in order adjuster updates and image changes after initial draw\n   * to make effect.\n   **/\n  refill() {\n    this.puzzle.pieces.forEach(piece => {\n      this._painter.fill(this, piece, this.getFigure(piece));\n    });\n  }\n\n  /**\n   * Clears the canvas, clearing the rendering backend and discarding all the created templates, figures, and pieces\n   */\n  clear() {\n    this._initialize();\n    this._painter.reinitialize(this);\n  }\n\n  /**\n   * Sets a validator for the canvas' puzzle. Only one validator\n   * can be attached, so subsequent calls of this method will override the previously\n   * attached validator\n   *\n   * @param {import('./validator').Validator} validator\n   */\n  attachValidator(validator) {\n    this.puzzle.attachValidator(validator);\n  }\n\n  /**\n   * Sets a validator that will report when puzzle has been solved,\n   * overriding any previously configured validator\n   */\n  attachSolvedValidator() {\n    this.puzzle.attachValidator(new PuzzleValidator(SpatialMetadata.solved));\n  }\n\n  /**\n   * Sets a validator that will report when puzzle pieces are in their expected relative\n   * positions, overriding any previously configured validator\n   */\n  attachRelativePositionValidator() {\n    this.puzzle.attachValidator(new PuzzleValidator(SpatialMetadata.relativePosition));\n  }\n\n  /**\n   * Sets a validator that will report when puzzle are at the expected given\n   * relative refs\n   *\n   * @param {[number, number][]} expected\n   */\n  attachRelativeRefsValidator(expected) {\n    this.puzzle.attachValidator(new PuzzleValidator(PuzzleValidator.relativeRefs(expected)));\n  }\n\n  /**\n   * Sets a validator that will report when puzzle pieces are in their expected absolute\n   * positions, overriding any previously configured validator\n   */\n  attachAbsolutePositionValidator() {\n    this.puzzle.attachValidator(new PieceValidator(SpatialMetadata.absolutePosition));\n  }\n\n  /**\n   * Registers a listener for connect events\n   *\n   * @param {CanvasConnectionListener} f\n   */\n  onConnect(f) {\n    this.puzzle.onConnect((piece, target) => {\n      f(piece, this.getFigure(piece), target, this.getFigure(target));\n    });\n  }\n\n  /**\n   * Registers a listener for disconnect events\n   *\n   * @param {CanvasConnectionListener} f\n   */\n  onDisconnect(f) {\n    this.puzzle.onDisconnect((piece, target) => {\n      f(piece, this.getFigure(piece), target, this.getFigure(target));\n    });\n  }\n\n  /**\n   * @param {CanvasTranslationListener} f\n   */\n  onTranslate(f) {\n    this.puzzle.onTranslate((piece, dx, dy) => {\n      f(piece, this.getFigure(piece), dx, dy);\n    });\n  }\n\n  /**\n   * @param {import('./validator').ValidationListener} f\n   */\n  onValid(f) {\n    this.puzzle.onValid(f);\n  }\n\n  /**\n   * Returns the current validation status\n   *\n   * @type {boolean}\n   */\n  get valid() {\n    return this.puzzle.valid;\n  }\n\n  /**\n   * Answers the visual representation for the given piece.\n   * This method uses piece's id.\n   *\n   * @param {Piece} piece\n   * @returns {Figure}\n   */\n  getFigure(piece) {\n    return this.getFigureById(piece.metadata.id);\n  }\n\n  /**\n   * Answers the visual representation for the given piece id.\n   *\n   * @param {string} id\n   * @returns {Figure}\n   */\n  getFigureById(id) {\n    return this.figures[id];\n  }\n\n  /**\n   * Sets the new width and height of the canvas\n   *\n   * @param {number} width\n   * @param {number} height\n   */\n  resize(width, height) {\n    this.width = width;\n    this.height = height;\n    this._painter.resize(this, width, height);\n  }\n\n  /**\n   * Scales the canvas contents to the given factor\n   * @param {import('./vector').Vector|number} factor\n   */\n  scale(factor) {\n    this._painter.scale(this, Vector.cast(factor));\n  }\n\n  /**\n   * @param {Piece} piece\n   */\n  _annotatePiecePosition(piece) {\n    const p = piece.centralAnchor.asVector();\n    SpatialMetadata.initialize(piece.metadata, p, Vector.copy(p));\n  }\n\n  /**\n   * Configures updates from piece into group\n   * @param {Group} group\n   * @param {Piece} piece\n   */\n  _bindGroupToPiece(group, piece) {\n    piece.onTranslate((_dx, _dy) => {\n      this._painter.physicalTranslate(this, group, piece);\n      this._painter.logicalTranslate(this, piece, group);\n    });\n  }\n\n  /**\n   * * Configures updates from group into piece\n   * @param {Piece} piece\n   * @param {Group} group\n   */\n  _bindPieceToGroup(piece, group) {\n    this._painter.onDrag(this, piece, group, (dx, dy) => {\n      if (!Pair.isNull(dx, dy)) {\n        piece.drag(dx, dy, true);\n        this._painter.logicalTranslate(this, piece, group);\n        this.redraw();\n      }\n    });\n    this._painter.onDragEnd(this, piece, group, () => {\n      piece.drop();\n      this.puzzle.validate();\n      this.redraw();\n    })\n  }\n\n  /**\n   * @param {Piece} piece\n   * @returns {import('./image-metadata').ImageMetadata}\n   */\n  _baseImageMetadataFor(piece) {\n    if (this.imageMetadata) {\n      const scale = piece.metadata.scale || this.imageMetadata.scale || 1;\n      const offset = Vector.plus(\n        piece.metadata.targetPosition || Vector.zero(),\n        this.imageMetadata.offset || Vector.zero());\n      return { content: this.imageMetadata.content, offset, scale };\n    } else {\n      return ImageMetadata.asImageMetadata(piece.metadata.image);\n    }\n  }\n\n  /**\n   * @param {Piece} piece\n   *\n   * @returns {import('./image-metadata').ImageMetadata}\n   */\n  imageMetadataFor(piece) {\n    return this._imageAdjuster(this._baseImageMetadataFor(piece));\n  }\n\n  /**\n   * Configures canvas to adjust images axis to puzzle's axis.\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   *\n   * @param {import('./axis').Axis} axis\n   */\n  adjustImagesToPuzzle(axis) {\n    this._imageAdjuster = (image) => {\n      const scale = axis.atVector(this.puzzleDiameter) / axis.atDimension(image.content);\n      const offset = Vector.plus(image.offset, Vector.minus(this.borderFill, this.pieceDiameter));\n      return { content: image.content, scale, offset };\n    };\n  }\n\n  /**\n   * Configures canvas to adjust images width to puzzle's width\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   */\n  adjustImagesToPuzzleWidth() {\n    this.adjustImagesToPuzzle(Horizontal);\n  }\n\n  /**\n   * Configures canvas to adjust images height to puzzle's height\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   */\n  adjustImagesToPuzzleHeight() {\n    this.adjustImagesToPuzzle(Vertical);\n  }\n\n  /**\n   * Configures canvas to adjust images axis to pieces's axis\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   *\n   * @param {import('./axis').Axis} axis\n   */\n  adjustImagesToPiece(axis) {\n    this._imageAdjuster = (image) => {\n      const scale = axis.atVector(this.pieceDiameter) / axis.atDimension(image.content);\n      const offset = Vector.plus(image.offset, this.borderFill);\n      return { content: image.content, scale, offset };\n    }\n  }\n\n  /**\n   * Configures canvas to adjust images width to pieces's width\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   */\n  adjustImagesToPieceWidth() {\n    this.adjustImagesToPiece(Horizontal);\n  }\n\n  /**\n   * Configures canvas to adjust images height to pieces's height\n   *\n   * **Warning**: this method requires {@code maxPiecesCount} or {@code puzzleDiameter} to be set.\n   */\n  adjustImagesToPieceHeight() {\n    this.adjustImagesToPiece(Vertical);\n  }\n\n\n  _initializeEmptyPuzzle() {\n    this._puzzle = new Puzzle(this.settings);\n  }\n\n  /**\n   * @param {import('./structure').StructureLike} structureLike the piece structure\n   * @param {import('./size').Size} size\n   * @param {CanvasMetadata} metadata\n   */\n  _newPiece(structureLike, size, metadata) {\n    let piece = this.puzzle.newPiece(\n      Structure.asStructure(structureLike),\n      { centralAnchor: vector(metadata.currentPosition.x, metadata.currentPosition.y), metadata, size });\n    return piece;\n  }\n\n  /**\n   * The puzzle diameter, using the\n   * configured puzzle diameter or the estimated one, if the first is not available.\n   *\n   * @type {import('./vector').Vector}\n   * */\n  get puzzleDiameter() {\n    return this._puzzleDiameter || this.estimatedPuzzleDiameter;\n  }\n\n  /**\n   * The estimated puzzle diameter calculated using the the max pieces count.\n   *\n   * @type {import('./vector').Vector}\n   * */\n  get estimatedPuzzleDiameter() {\n    return Vector.plus(Vector.multiply(this.pieceDiameter, this.maxPiecesCount), this.strokeWidth * 2)\n  }\n\n  get maxPiecesCount() {\n    if (!this._maxPiecesCount) {\n      throw new Error(\"max pieces count was not specified\");\n    }\n    return this._maxPiecesCount;\n  }\n\n  /**\n   * @type {import('./vector').Vector}\n   */\n  get pieceRadio() {\n    return this.pieceSize.radio;\n  }\n\n  /**\n   * @type {import('./vector').Vector}\n   */\n  get pieceDiameter() {\n    return this.pieceSize.diameter;\n  }\n\n  /**\n   * The puzzle rendered by this canvas\n   *\n   * @type {Puzzle}\n   */\n  get puzzle() {\n    if (!this._puzzle) {\n      this._initializeEmptyPuzzle();\n    }\n    return this._puzzle;\n  }\n\n  /**\n   * @type {import('./puzzle').Settings}\n   */\n  get settings() {\n    return {pieceRadio: this.pieceRadio, proximity: this.proximity}\n  }\n}\n\nmodule.exports = Canvas\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/canvas.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/connector.js":
/*!***************************************************!*\
  !*** ./node_modules/headbreaker/src/connector.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * @private\n * @module Connector\n */\nconst {pivot} = __webpack_require__(/*! ./prelude */ \"./node_modules/headbreaker/src/prelude.js\");\n\n/**\n * @private\n */\nclass Connector {\n\n  /**\n   * @param {\"x\" | \"y\"} axis\n   * @param {\"right\" | \"down\"} forward\n   * @param {\"left\" | \"up\"} backward\n   */\n  constructor(axis, forward, backward) {\n\n    this.axis = axis;\n\n    this.forward = forward;\n    this.backward = backward;\n\n    this.forwardAnchor = `${forward}Anchor`;\n    this.backwardAnchor = `${backward}Anchor`;\n\n    this.forwardConnection = `${forward}Connection`;\n    this.backwardConnection = `${backward}Connection`;\n  }\n\n  /**\n   * @param {boolean} [back]\n   */\n  attract(one, other, back = false) {\n    const [iron, magnet] = pivot(one, other, back);\n    let dx, dy;\n    if (magnet.centralAnchor[this.axis] > iron.centralAnchor[this.axis]) {\n      [dx, dy] = magnet[this.backwardAnchor].diff(iron[this.forwardAnchor])\n    } else {\n      [dx, dy] = magnet[this.forwardAnchor].diff(iron[this.backwardAnchor])\n    }\n    iron.push(dx, dy);\n  }\n\n\n   /**\n   * @param {number} delta\n   * @returns {boolean}\n   */\n  openMovement(one, delta) {\n    return (delta > 0 && !one[this.forwardConnection]) || (delta < 0 && !one[this.backwardConnection]) || delta == 0;\n  }\n\n  /**\n   * @param {number} proximity\n   * @returns {boolean}\n   */\n  canConnectWith(one, other, proximity) {\n    return this.closeTo(one, other, proximity) && this.match(one, other);\n  }\n\n  /**\n   *\n   * @param {number} proximity\n   * @returns {boolean}\n   */\n  closeTo(one, other, proximity) {\n    return one[this.forwardAnchor].closeTo(other[this.backwardAnchor], proximity);\n  }\n\n  /**\n   * @returns {boolean}\n   */\n  match(one, other) {\n    return one[this.forward].match(other[this.backward]);\n  }\n\n  /**\n   * @param {import('./piece')} one\n   * @param {*} other\n   * @param {number} proximity\n   * @param {boolean} back\n   */\n  connectWith(one, other, proximity, back) {\n    if (!this.canConnectWith(one, other, proximity)) {\n      throw new Error(`can not connect ${this.forward}!`);\n    }\n    if (one[this.forwardConnection] !== other) {\n      this.attract(other, one, back);\n      one[this.forwardConnection] = other;\n      other[this.backwardConnection] = one;\n      one.fireConnect(other);\n    }\n  }\n}\n\nmodule.exports = {\n  horizontal: new Connector(\"x\", \"right\", \"left\"),\n  vertical: new Connector(\"y\", \"down\", \"up\")\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/connector.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/dummy-painter.js":
/*!*******************************************************!*\
  !*** ./node_modules/headbreaker/src/dummy-painter.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Canvas = __webpack_require__(/*! ./canvas */ \"./node_modules/headbreaker/src/canvas.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst Painter = __webpack_require__(/*! ./painter */ \"./node_modules/headbreaker/src/painter.js\");\n\n/**\n * A {@link Painter} for testing purpouses that does not perform rendering\n *\n * @implements {Painter}\n */\nclass DummyPainter extends Painter {\n  /**\n   * @param {Canvas} canvas\n   * @param {string} id\n   */\n  initialize(canvas, id) {\n    canvas['__nullLayer__'] = {drawn: false, figures: 0};\n  }\n\n  /**\n   * @param {Canvas} canvas\n   */\n  draw(canvas) {\n    canvas['__nullLayer__'].drawn = true;\n  }\n\n  /**\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} _piece\n   * @param {import('./canvas').Figure} _figure\n   * @param {import('./outline').Outline} outline\n   */\n  sketch(canvas, _piece, _figure, outline) {\n    canvas['__nullLayer__'].figures++;\n  }\n}\n\nmodule.exports = DummyPainter;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/dummy-painter.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/image-metadata.js":
/*!********************************************************!*\
  !*** ./node_modules/headbreaker/src/image-metadata.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const {vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\n\n/**\n * @typedef {object} ImageMetadata\n * @property {HTMLImageElement|HTMLCanvasElement}    content\n * @property {import('./vector').Vector} [offset]\n * @property {number}   [scale]\n */\n\n/**\n * @typedef {HTMLImageElement|HTMLCanvasElement|ImageMetadata} ImageLike\n */\n\n/**\n * @module ImageMetadata\n */\n\n/**\n * Converts an image-like object into a true {@link ImageMetadata} object\n *\n * @param {ImageLike} imageLike\n * @returns {ImageMetadata}\n */\nfunction asImageMetadata(imageLike) {\n  if (imageLike instanceof HTMLImageElement || imageLike instanceof HTMLCanvasElement) {\n    return {\n      content: imageLike,\n      offset: vector(1, 1),\n      scale: 1\n    };\n  }\n  return imageLike;\n}\n\nmodule.exports = {\n  asImageMetadata\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/image-metadata.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/index.js":
/*!***********************************************!*\
  !*** ./node_modules/headbreaker/src/index.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\")\nconst {anchor, Anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\")\nconst Puzzle = __webpack_require__(/*! ./puzzle */ \"./node_modules/headbreaker/src/puzzle.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst {Tab, Slot, None} = __webpack_require__(/*! ./insert */ \"./node_modules/headbreaker/src/insert.js\");\nconst {NullValidator, PieceValidator, PuzzleValidator} = __webpack_require__(/*! ./validator */ \"./node_modules/headbreaker/src/validator.js\");\nconst {Horizontal, Vertical} = __webpack_require__(/*! ./axis */ \"./node_modules/headbreaker/src/axis.js\");\nconst Structure = __webpack_require__(/*! ./structure */ \"./node_modules/headbreaker/src/structure.js\");\nconst Outline = __webpack_require__(/*! ./outline */ \"./node_modules/headbreaker/src/outline.js\");\nconst Canvas = __webpack_require__(/*! ./canvas */ \"./node_modules/headbreaker/src/canvas.js\");\nconst Manufacturer = __webpack_require__(/*! ./manufacturer */ \"./node_modules/headbreaker/src/manufacturer.js\");\nconst {InsertSequence, ...generators} = __webpack_require__(/*! ./sequence */ \"./node_modules/headbreaker/src/sequence.js\");\nconst Metadata = __webpack_require__(/*! ./metadata */ \"./node_modules/headbreaker/src/metadata.js\");\nconst SpatialMetadata = __webpack_require__(/*! ./spatial-metadata */ \"./node_modules/headbreaker/src/spatial-metadata.js\");\nconst {vector, ...Vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\nconst {radio, diameter} = __webpack_require__(/*! ./size */ \"./node_modules/headbreaker/src/size.js\");\nconst Shuffler = __webpack_require__(/*! ./shuffler */ \"./node_modules/headbreaker/src/shuffler.js\");\nconst outline = __webpack_require__(/*! ./outline */ \"./node_modules/headbreaker/src/outline.js\");\n\n/**\n * @module headbreaker\n */\nmodule.exports = {\n  anchor,\n  vector,\n  radio,\n  diameter,\n  Anchor,\n  Puzzle,\n  Piece,\n  Canvas,\n  Manufacturer,\n  InsertSequence,\n  PieceValidator,\n  PuzzleValidator,\n  NullValidator,\n  Horizontal,\n  Vertical,\n  Tab,\n  Slot,\n  None,\n  Pair,\n  Metadata,\n  SpatialMetadata,\n  Outline,\n  Structure,\n  Vector,\n  Shuffler,\n  generators,\n  outline,\n  painters: {\n    Dummy: __webpack_require__(/*! ./dummy-painter */ \"./node_modules/headbreaker/src/dummy-painter.js\"),\n    Konva: __webpack_require__(/*! ./konva-painter */ \"./node_modules/headbreaker/src/konva-painter.js\")\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/index.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/insert.js":
/*!************************************************!*\
  !*** ./node_modules/headbreaker/src/insert.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A connection element of a piece\n *\n * @typedef {(Tab|Slot|None)} Insert\n */\n\nconst Tab = {\n  isSlot: () => false,\n  isTab:  () => true,\n  isNone:  () => false,\n  match: (other) => other.isSlot(),\n  toString: () => \"Tab\",\n  complement: () => Slot,\n  serialize: () => 'T'\n}\n\nconst Slot = {\n  isSlot: () => true,\n  isTab:  () => false,\n  isNone:  () => false,\n  match: (other) => other.isTab(),\n  toString: () => \"Slot\",\n  complement: () => Tab,\n  serialize: () => 'S'\n}\n\nconst None = {\n  isSlot: () => false,\n  isTab:  () => false,\n  isNone:  () => true,\n  match: (other) => false,\n  toString: () => \"None\",\n  complement: () => None,\n  serialize: () => '-'\n}\n\nmodule.exports = {\n  None,\n  Slot,\n  Tab\n};\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/insert.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/konva-painter.js":
/*!*******************************************************!*\
  !*** ./node_modules/headbreaker/src/konva-painter.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("let Konva;\ntry {\n  // @ts-ignore\n  Konva = __webpack_require__(/*! konva */ \"./node_modules/konva/lib/index.js\");\n} catch (e) {\n  Konva = {\n    Stage: class {\n      constructor(_options) {\n        throw new Error(\"Konva not loaded\");\n      }\n    }\n  };\n}\n\nconst Canvas = __webpack_require__(/*! ./canvas */ \"./node_modules/headbreaker/src/canvas.js\");\nconst Outline = __webpack_require__(/*! ./outline */ \"./node_modules/headbreaker/src/outline.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\nconst {vector, ...Vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\nconst Painter = __webpack_require__(/*! ./painter */ \"./node_modules/headbreaker/src/painter.js\");\n\n\n/**\n * @private\n * @param {Piece} model\n * @param {*} group\n */\nfunction currentPositionDiff(model, group) {\n  return Pair.diff(group.x(),group.y(), model.metadata.currentPosition.x, model.metadata.currentPosition.y);\n}\n\n/**\n * A {@link Painter} that uses Konva.js as rendering backend\n * @implements {Painter}\n */\nclass KonvaPainter extends Painter {\n  /** @typedef {import('./canvas').Figure} Figure */\n  /** @typedef {import('./canvas').Group} Group */\n\n  /**\n   * @param {Canvas} canvas\n   * @param {string} id\n   */\n  initialize(canvas, id) {\n    var stage = new Konva.Stage({\n      container: id,\n      width: canvas.width,\n      height: canvas.height,\n      draggable: !canvas.fixed,\n    });\n\n    this._initializeLayer(stage, canvas);\n  }\n\n  _initializeLayer(stage, canvas) {\n    var layer = new Konva.Layer();\n    stage.add(layer);\n    canvas['__konvaLayer__'] = layer;\n  }\n\n  /**\n   * @param {Canvas} canvas\n   */\n  draw(canvas) {\n    canvas['__konvaLayer__'].draw();\n  }\n\n  /**\n   * @param {Canvas} canvas\n   */\n  reinitialize(canvas) {\n    const layer = canvas['__konvaLayer__'];\n    const stage = layer.getStage();\n    layer.destroy();\n\n    this._initializeLayer(stage, canvas);\n  }\n\n  /**\n   * @param {Canvas} canvas\n   * @param {number} width\n   * @param {number} height\n   */\n  resize(canvas, width, height) {\n    const layer = canvas['__konvaLayer__'];\n    const stage = layer.getStage();\n\n    stage.width(width);\n    stage.height(height);\n  }\n\n  /**\n   * @param {Canvas} canvas\n   * @param {import('./vector').Vector} factor\n   */\n  scale(canvas, factor) {\n    canvas['__konvaLayer__'].getStage().scale(factor);\n  }\n\n  /**\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {Figure} figure\n   * @param {import('./outline').Outline} outline\n   */\n  sketch(canvas, piece, figure, outline) {\n    figure.group = new Konva.Group({\n      x: piece.metadata.currentPosition.x,\n      y: piece.metadata.currentPosition.y,\n      draggable: !piece.metadata.fixed,\n      dragBoundFunc: canvas.preventOffstageDrag ? (position) => {\n        const furthermost = Vector.minus(vector(canvas.width, canvas.height), piece.size.radio);\n        return Vector.max(Vector.min(position, furthermost), piece.size.radio);\n      } : null,\n    });\n\n    figure.shape = new Konva.Line({\n      points: outline.draw(piece, piece.diameter, canvas.borderFill),\n      bezier: outline.isBezier(),\n      tension: outline.isBezier() ? null : canvas.lineSoftness,\n      stroke: piece.metadata.strokeColor || canvas.strokeColor,\n      strokeWidth: canvas.strokeWidth,\n      closed: true,\n      ...Vector.multiply(piece.radio, -1),\n    });\n    this.fill(canvas, piece, figure);\n    figure.group.add(figure.shape);\n\n    canvas['__konvaLayer__'].add(figure.group);\n  }\n\n  /**\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {Figure} figure\n   */\n  fill(canvas, piece, figure) {\n    const image = canvas.imageMetadataFor(piece);\n    figure.shape.fill(!image ? piece.metadata.color || 'black' : null);\n    figure.shape.fillPatternImage(image && image.content);\n    figure.shape.fillPatternScale(image && {x: image.scale, y: image.scale});\n    figure.shape.fillPatternOffset(image && Vector.divide(image.offset, image.scale));\n  }\n\n  /**\n   *\n   * @param {Canvas} _canvas\n   * @param {Piece} piece\n   * @param {Figure} figure\n   */\n  label(_canvas, piece, figure) {\n    figure.label = new Konva.Text({\n      ...Vector.minus({\n        x: piece.metadata.label.x || (figure.group.width() / 2),\n        y: piece.metadata.label.y || (figure.group.height() / 2),\n      }, piece.radio),\n      text:     piece.metadata.label.text,\n      fontSize: piece.metadata.label.fontSize,\n      fontFamily: piece.metadata.label.fontFamily || 'Sans Serif',\n      fill: piece.metadata.label.color || 'white',\n    });\n    figure.group.add(figure.label);\n  }\n\n  /**\n   *\n   * @param {Canvas} _canvas\n   * @param {Group} group\n   * @param {Piece} piece\n   */\n  physicalTranslate(_canvas, group, piece) {\n    group.x(piece.centralAnchor.x);\n    group.y(piece.centralAnchor.y);\n  }\n\n  /**\n   * @param {Canvas} _canvas\n   * @param {Piece} piece\n   * @param {*} group\n   */\n  logicalTranslate(_canvas, piece, group) {\n    Vector.update(piece.metadata.currentPosition, group.x(), group.y());\n  }\n\n  /**\n   * @param {Canvas} _canvas\n   * @param {Piece} piece\n   * @param {Group} group\n   * @param {import('./painter').VectorAction} f\n   */\n  onDrag(_canvas, piece, group, f) {\n    group.on('mouseover', () => {\n      document.body.style.cursor = 'pointer';\n    });\n    group.on('mouseout', () => {\n      document.body.style.cursor = 'default';\n    });\n    group.on('dragmove', () => {\n      let [dx, dy] = currentPositionDiff(piece, group);\n      f(dx, dy);\n    });\n  }\n\n  /**\n   * @param {Canvas} _canvas\n   * @param {Piece} _piece\n   * @param {Group} group\n   * @param {import('./painter').Action} f\n   */\n  onDragEnd(_canvas, _piece, group, f) {\n    group.on('dragend', () => {\n      f()\n    });\n  }\n}\n\nmodule.exports = KonvaPainter;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/konva-painter.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/manufacturer.js":
/*!******************************************************!*\
  !*** ./node_modules/headbreaker/src/manufacturer.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Puzzle = __webpack_require__(/*! ./puzzle */ \"./node_modules/headbreaker/src/puzzle.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst {Anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\");\nconst {anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\");\nconst {fixed, InsertSequence} = __webpack_require__(/*! ./sequence */ \"./node_modules/headbreaker/src/sequence.js\")\nconst Metadata = __webpack_require__(/*! ./metadata */ \"./node_modules/headbreaker/src/metadata.js\");\n\n/**\n * A manufacturer allows to create rectangular\n * puzzles by automatically generating inserts\n */\nclass Manufacturer {\n  constructor() {\n    this.insertsGenerator = fixed;\n    this.metadata = [];\n    /** @type {Anchor} */\n    this.headAnchor = null;\n  }\n\n  /**\n   * Attach metadata to each piece\n   *\n   * @param {object[]} metadata list of metadata that will be attached to each generated piece\n   */\n  withMetadata(metadata) {\n    this.metadata = metadata;\n  }\n\n  /**\n   * @param {import('./sequence').InsertsGenerator} generator\n   */\n  withInsertsGenerator(generator) {\n    this.insertsGenerator = generator || this.insertsGenerator;\n  }\n\n  /**\n   * Sets the central anchor. If not specified, puzzle will be positioned\n   * at the distance of a whole piece from the origin\n   *\n   * @param {Anchor} anchor\n   */\n  withHeadAt(anchor) {\n    this.headAnchor = anchor;\n  }\n\n  /**\n   * If nothing is configured, default Puzzle structured is assumed\n   *\n   * @param {import('../src/puzzle').Settings} structure\n   */\n  withStructure(structure) {\n    this.structure = structure\n  }\n\n  /**\n   *\n   * @param {number} width\n   * @param {number} height\n   */\n  withDimmensions(width, height) {\n    this.width = width;\n    this.height = height;\n  }\n\n   /**\n   * @returns {Puzzle}\n   */\n  build() {\n    const puzzle = new Puzzle(this.structure);\n    const positioner = new Positioner(puzzle, this.headAnchor);\n\n    let verticalSequence = this._newSequence();\n    let horizontalSequence;\n\n    for (let y = 0; y < this.height; y++) {\n      horizontalSequence = this._newSequence();\n      verticalSequence.next();\n\n      for (let x = 0; x < this.width; x++) {\n        horizontalSequence.next();\n        const piece = this._buildPiece(puzzle, horizontalSequence, verticalSequence);\n        piece.centerAround(positioner.naturalAnchor(x, y));\n      }\n    }\n    this._annotateAll(puzzle.pieces);\n    return puzzle;\n  }\n\n  /**\n   * @param {Piece[]} pieces\n   */\n  _annotateAll(pieces) {\n    pieces.forEach((piece, index) => this._annotate(piece, index));\n  }\n\n  /**\n   * @param {Piece} piece\n   * @param {number} index\n   */\n  _annotate(piece, index) {\n    const baseMetadata = this.metadata[index];\n    const metadata = baseMetadata ? Metadata.copy(baseMetadata) : {};\n    metadata.id = metadata.id || String(index + 1);\n    piece.annotate(metadata);\n  }\n\n  _newSequence() {\n    return new InsertSequence(this.insertsGenerator);\n  }\n\n  /**\n   * @param {Puzzle} puzzle\n   * @param {InsertSequence} horizontalSequence\n   * @param {InsertSequence} verticalSequence\n   */\n  _buildPiece(puzzle, horizontalSequence, verticalSequence) {\n    return puzzle.newPiece({\n      left: horizontalSequence.previousComplement(),\n      up: verticalSequence.previousComplement(),\n      right: horizontalSequence.current(this.width),\n      down: verticalSequence.current(this.height)\n    });\n  }\n}\n\nclass Positioner {\n  /**\n   *\n   * @param {Puzzle} puzzle\n   * @param {Anchor} headAnchor\n   */\n  constructor(puzzle, headAnchor) {\n    this.puzzle = puzzle;\n    this.initializeOffset(headAnchor);\n  }\n\n  /**\n   * @param {Anchor} headAnchor\n   */\n  initializeOffset(headAnchor) {\n    if (headAnchor) {\n      /** @type {import('./vector').Vector} */\n      this.offset = headAnchor.asVector();\n    }\n    else {\n      this.offset = this.pieceDiameter;\n    }\n  }\n\n  get pieceDiameter() {\n    return this.puzzle.pieceDiameter;\n  }\n\n    /**\n   * @param {number} x\n   * @param {number} y\n   */\n  naturalAnchor(x, y) {\n    return anchor(\n      x * this.pieceDiameter.x + this.offset.x,\n      y * this.pieceDiameter.y + this.offset.y);\n  }\n}\n\nmodule.exports = Manufacturer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/manufacturer.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/metadata.js":
/*!**************************************************!*\
  !*** ./node_modules/headbreaker/src/metadata.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This module exposes metadata-handling functions you can override to have better performance\n *\n * @module Metadata\n */\n\n/**\n * Copies a metadata object. The default implementation uses {@link JSON#parse}. Override it to have better performance\n *\n * @template T\n * @param {T} metadata\n * @returns {T}\n */\nfunction copy(metadata) {\n  return JSON.parse(JSON.stringify(metadata));\n}\n\nmodule.exports = {\n  copy\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/metadata.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/outline.js":
/*!*************************************************!*\
  !*** ./node_modules/headbreaker/src/outline.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst {vector, ...Vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\n\n/**\n * @typedef {Squared|Rounded} Outline\n */\n\n\n/**\n * This module contains the draw function. Override it change pieces drawing strategy\n *\n * @module Outline\n */\n\n/**\n * @template T\n * @param {import('./insert').Insert} insert\n * @param {T} t\n * @param {T} s\n * @param {T} n\n * @returns {T}\n */\nfunction select(insert, t, s, n) {\n  return insert.isTab() ? t : insert.isSlot() ? s : n;\n}\n\nconst sl = (p, t, s, n) => select(p.left, t, s, n);\nconst sr = (p, t, s, n) => select(p.right, t, s, n);\nconst su = (p, t, s, n) => select(p.up, t, s, n);\nconst sd = (p, t, s, n) => select(p.down, t, s, n);\n\nclass Squared {\n  /**\n   * @param {Piece} piece\n   * @param {import('./vector').Vector|number} [size]\n   * @param {import('./vector').Vector|number} [borderFill]\n   * @returns {number[]}\n   */\n  draw(piece, size = 50, borderFill = 0) {\n    const sizeVector = Vector.cast(size);\n    const offset = Vector.divide(Vector.multiply(borderFill, 5), sizeVector);\n    return [\n      (0 - offset.x),                                                  (0 - offset.y),\n      1,                                                               (0 - offset.y),\n      2,                                                               select(piece.up, (-1 - offset.y), (1 - offset.y), (0 - offset.y)),\n      3,                                                               (0 - offset.y),\n      (4 + offset.x),                                                  (0 - offset.y),\n      (4 + offset.x),                                                  1,\n      sr(piece, (5 + offset.x), (3 + offset.x), (4 + offset.x)),       2,\n      (4 + offset.x),                                                  3,\n      (4 + offset.x),                                                  (4 + offset.y),\n      3,                                                               (4 + offset.y),\n      2,                                                               select(piece.down, (5 + offset.y), (3 + offset.y), (4 + offset.y)),\n      1,                                                               (4 + offset.y),\n      (0 - offset.x),                                                  (4 + offset.y),\n      (0 - offset.x),                                                  3,\n      sl(piece, (-1 - offset.x), (1 - offset.x), (0 - offset.x)),      2,\n      (0 - offset.x),                                                  1\n    ].map((it, index) => it * (index % 2 === 0 ? sizeVector.x : sizeVector.y) / 5 )\n  }\n\n  isBezier() {\n    return false;\n  }\n}\n\nclass Rounded {\n  constructor({\n    bezelize = false,\n    bezelDepth = 2/5,\n    insertDepth = 4/5,\n    borderLength = 1/3,\n    referenceInsertAxis = null} = {}) {\n    this.bezelize = bezelize;\n    this.bezelDepth = bezelDepth;\n    this.insertDepth = insertDepth;\n    this.borderLength = borderLength;\n    /** @type {import('./axis').Axis} */\n    this.referenceInsertAxis = referenceInsertAxis;\n  }\n\n  /**\n   * @param {import('./vector').Vector} fullSize\n   * @return {number}\n   */\n  referenceInsertAxisLength(fullSize) {\n    return this.referenceInsertAxis ? this.referenceInsertAxis.atVector(fullSize) : Vector.inner.min(fullSize);\n  }\n\n  /**\n   * @param {Piece} p\n   * @param {import('./vector').Vector|number} [size]\n   * @param {import('./vector').Vector|number} [borderFill]\n   * @returns {number[]}\n   */\n  draw(p, size = 150, borderFill = 0) {\n    /** full piece size, from edge to edge */\n    const fullSize = Vector.cast(size);\n\n    /** insert external diameter */\n    const r = Math.trunc(this.referenceInsertAxisLength(fullSize) * (1 - 2 * this.borderLength) * 100) / 100;\n\n    /** edge length, from vertex to insert start */\n    const s = Vector.divide(Vector.minus(fullSize, r), 2);\n\n    /** insert internal radio, from center to insert end */\n    const o = Vector.multiply(r, this.insertDepth);\n\n    /** bezel radio */\n    const b = Vector.multiply(Vector.inner.min(s), this.bezelDepth);\n\n    /** the four bezel flags, starting at up-left corner */\n    const [b0, b1, b2, b3] = this.bezels(p);\n\n    const nx = (c) => c ? b.x : 0;\n    const ny = (c) => c ? b.y : 0;\n\n    const rsy  = r + s.y;\n    const rsx  = r + s.x;\n    const r2sy = r + 2 * s.y;\n    const r2sx = r + 2 * s.x;\n\n\n    return [\n      /** col:  */ //               0                                         1                                      2\n      /** start: */  nx(b0)          , 0               ,\n      ...(b0 ?\n      /** bezel: */  [0              , 0               ,         0             , 0             ,         0             , b.y         ] :\n      /**        */  [                                                                                                               ]),\n      /** edge:  */  0               , ny(b0)          ,         0             , s.y           ,         0             , s.y           ,\n      ...sl(p,\n      /** insert: */ [-o.x           , s.y             ,         -o.x          , rsy],\n      /**         */ [o.x            , s.y             ,         o.x           , rsy],\n      /**         */ [0              , s.y             ,         0             , rsy])\n      /**         */                                                                           ,         0              , rsy          ,\n      /** edge:   */ 0               , rsy             ,         0             , r2sy          ,         0              , r2sy - ny(b1),\n      ...(b1 ?\n      /** bezel: */  [0              , r2sy            ,         0             , r2sy          ,         b.x            , r2sy        ] :\n      /**        */  [                                                                                                                ]),\n      /** edge:   */ nx(b1)          , r2sy            ,         s.x           , r2sy          ,         s.x            , r2sy          ,\n      ...sd(p,\n      /** insert: */ [s.x            , r2sy + o.y      ,         rsx           , r2sy + o.y   ],\n      /**         */ [s.x            , r2sy - o.y      ,         rsx           , r2sy - o.y   ],\n      /**         */ [s.x            , r2sy            ,         rsx           , r2sy   ])\n      /**         */                                                                          ,         rsx             , r2sy          ,\n      /** edge:   */ rsx             , r2sy            ,         r2sx          , r2sy         ,         r2sx - nx(b2)   , r2sy          ,\n      ...(b2 ?\n      /** bezel: */  [r2sx           , r2sy            ,         r2sx          , r2sy         ,         r2sx            , r2sy    - b.y]:\n      /**        */  [                                                                                                                 ]),\n      /** edge:   */ r2sx            , r2sy - ny(b2)   ,         r2sx          , rsy          ,         r2sx            , rsy            ,\n      ...sr(p,\n      /** insert: */ [r2sx + o.x     , rsy             ,         r2sx + o.x    , s.y],\n      /**         */ [r2sx - o.x     , rsy             ,         r2sx - o.x    , s.y],\n      /**         */ [r2sx           , rsy             ,         r2sx          , s.y])\n      /**         */                                                                          ,         r2sx            , s.y    ,\n      /** edge:   */ r2sx            , s.y             ,         r2sx          , 0            ,         r2sx            , ny(b3) ,\n      ...(b3 ?\n      /** bezel:  */ [r2sx           , 0               ,         r2sx          , 0            ,         r2sx    - b.x   , 0] :\n      /**         */ [                                                                                                     ]),\n      /** edge:   */ r2sx - nx(b3)   , 0               ,         rsx           , 0            ,         rsx             , 0      ,\n      ...su(p,\n      /** insert: */ [rsx            , -o.y            ,         s.x           , -o.y],\n      /**         */ [rsx            , o.y             ,         s.x           , o.y],\n      /**         */ [rsx            , 0               ,         s.x           , 0])\n      /**         */                                                                          ,         s.x             , 0      ,\n      /** edge:   */ s.x             , 0               ,         0             , 0            ,         (b0 ? b.x : 0)  , 0\n    ]\n  }\n\n\n  bezels(p) {\n    if (this.bezelize) {\n      return [\n        p.left.isNone() && p.up.isNone(),\n        p.left.isNone() && p.down.isNone(),\n        p.right.isNone() && p.down.isNone(),\n        p.right.isNone() && p.up.isNone()\n      ];\n    } else {\n      return [false, false, false, false];\n    }\n  }\n\n  isBezier() {\n    return true;\n  }\n}\n\nmodule.exports = {\n  Classic: new Squared(),\n  Squared,\n  Rounded\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/outline.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/painter.js":
/*!*************************************************!*\
  !*** ./node_modules/headbreaker/src/painter.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Canvas = __webpack_require__(/*! ./canvas */ \"./node_modules/headbreaker/src/canvas.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\n\n/**\n * @callback VectorAction\n * @param {number} dx\n * @param {number} dy\n */\n\n /**\n  * @callback Action\n  */\n\n/**\n * An interface for a a rendering backend for a {@link Canvas}, that can be implemented in\n * order to create UI representations of a puzzle.\n *\n * @interface Painter\n */\nclass Painter {\n  /**\n   * @param {Canvas} canvas\n   * @param {number} width\n   * @param {number} height\n   */\n  resize(canvas, width, height) {}\n\n  /**\n   * Creates the rendering backend, initializig all its contents.\n   * After this call, painter is ready to receive any other messages\n   *\n   * @param {Canvas} canvas\n   * @param {string} id\n   */\n  initialize(canvas, id) { }\n\n  /**\n   * Recreates the rendering backend, clearing all its contents\n   * After this call, painter is ready to receive any other messages\n   * as it had been just initialized.\n   *\n   * @param {Canvas} canvas\n   */\n  reinitialize(canvas) { }\n\n  /**\n   * Draws the canvas figures in the rendering backend\n   *\n   * @param {Canvas} canvas\n   */\n  draw(canvas) { }\n\n  /**\n   * Scales the canvas contents\n   *\n   * @param {Canvas} canvas\n   * @param {import('./vector').Vector} factor\n   */\n  scale(canvas, factor) { }\n\n  /**\n   * Adds a piece to the rendering backend, so that it is ready to be drawn\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Figure} figure the rendering backend information for this piece. This method may mutate it if necessary\n   * @param {import('./outline').Outline} outline\n   */\n  sketch(canvas, piece, figure, outline) { }\n\n  /**\n   * Fills a piece using the canvas image information\n   * assigned for it\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Figure} figure\n   */\n  fill(canvas, piece, figure) { }\n\n  /**\n   * Adds piece's label to the given figure in the rendering backend\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Figure} figure the rendering backend information for this piece. This method may mutate it if necessary\n   */\n  label(canvas, piece, figure) { }\n\n  /**\n   * Translates th given piece\n   * @param {Canvas} canvas\n   * @param {import('./canvas').Group} group\n   * @param {Piece} piece\n   */\n  physicalTranslate(canvas, group, piece) { }\n\n  /**\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Group} group\n   */\n  logicalTranslate(canvas, piece, group) { }\n\n  /**\n   * Registers a drag-start callback\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Group} group\n   * @param {VectorAction} f\n   *\n   */\n  onDrag(canvas, piece, group, f) { }\n\n  /**\n   * Registers a drag-end callback\n   *\n   * @param {Canvas} canvas\n   * @param {Piece} piece\n   * @param {import('./canvas').Group} group\n   * @param {Action} f\n   */\n  onDragEnd(canvas, piece, group, f) { }\n}\n\nmodule.exports = Painter;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/painter.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/pair.js":
/*!**********************************************!*\
  !*** ./node_modules/headbreaker/src/pair.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * @typedef {[number, number]} Pair\n */\n\n/**\n * Utilities for handling 2D vectors, expressed a two-elements list\n *\n * @module Pair\n */\n\n/**\n * Tells whether this pair is (0, 0)\n *\n * @param {number} x\n * @param {number} y\n * @returns {boolean}\n */\nfunction isNull(x, y) {\n  return equal(x, y, 0, 0);\n}\n\n/**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} [delta] tolerance in comparison\n * @returns {boolean}\n */\nfunction equal(x1, y1, x2, y2, delta = 0) {\n  return Math.abs(x1 - x2) <= delta && Math.abs(y1 - y2) <= delta;\n}\n\n/**\n * Calculates the difference of two vectors\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @returns {Pair}\n */\nfunction diff(x1, y1, x2, y2) {\n  return [x1 - x2, y1 - y2];\n}\n\nmodule.exports = {\n  isNull,\n  diff,\n  equal\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/pair.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/piece.js":
/*!***********************************************!*\
  !*** ./node_modules/headbreaker/src/piece.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\nconst {anchor, Anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\");\nconst {None} = __webpack_require__(/*! ./insert */ \"./node_modules/headbreaker/src/insert.js\")\nconst connector = __webpack_require__(/*! ./connector */ \"./node_modules/headbreaker/src/connector.js\")\nconst Structure = __webpack_require__(/*! ./structure */ \"./node_modules/headbreaker/src/structure.js\");\nconst {itself, orthogonalTransform} = __webpack_require__(/*! ./prelude */ \"./node_modules/headbreaker/src/prelude.js\");\n\n/**\n * @callback TranslationListener\n * @param {Piece} piece\n * @param {number} dx\n * @param {number} dy\n */\n\n/**\n * @callback ConnectionListener\n * @param {Piece} piece\n * @param {Piece} target\n */\n\n /**\n  * @typedef {Object} PieceConfig\n  * @property {import('./vector').Vector} [centralAnchor]\n  * @property {import('./size').Size} [size]\n  * @property {any} [metadata]\n  */\n\n/**\n * A piece primitive representation that can be easily stringified, exchanged and persisted\n *\n * @typedef {object} PieceDump\n * @property {import('./vector').Vector} centralAnchor\n * @property {import('./size').Size} [size]\n * @property {any} metadata\n * @property {import('./prelude').Orthogonal<object>} [connections]\n * @property {string} structure\n */\n\n /**\n  * A jigsaw piece\n  */\n class Piece {\n\n   /**\n    * @param {import('./structure').Structure} [structure]\n    * @param {PieceConfig} [config]\n    */\n   constructor({up = None, down = None, left = None, right = None} = {}, config = {}) {\n      this.up = up;\n      this.down = down;\n      this.left = left;\n      this.right = right;\n      /** @type {any} */\n      this.metadata = {};\n      /** @type {Anchor} */\n      this.centralAnchor = null;\n      /** @type {import('./size').Size} */\n      this._size = null;\n      this._initializeListeners();\n      this.configure(config);\n    }\n\n  _initializeListeners() {\n    /** @type {TranslationListener[]} */\n    this.translateListeners = [];\n    /** @type {ConnectionListener[]} */\n    this.connectListeners = [];\n    /** @type {ConnectionListener[]} */\n    this.disconnectListeners = [];\n  }\n\n  /**\n   * Runs positining, sizing and metadata configurations\n   * in a single step\n   *\n   * @param {PieceConfig} config\n   */\n  configure(config) {\n    if (config.centralAnchor) {\n      this.centerAround(Anchor.import(config.centralAnchor));\n    }\n\n    if (config.metadata) {\n      this.annotate(config.metadata);\n    }\n\n    if (config.size) {\n      this.resize(config.size)\n    }\n  }\n\n\n  /**\n   * Adds unestructured user-defined metadata on this piece.\n   *\n   * @param {object} metadata\n   */\n  annotate(metadata) {\n    Object.assign(this.metadata, metadata);\n  }\n\n  /**\n   * Sets unestructured user-defined metadata on this piece.\n   *\n   * This object has no strong requirement, but it is recommended to have an\n   * id property.\n   *\n   * @param {object} metadata\n   */\n  reannotate(metadata) {\n    this.metadata = metadata;\n  }\n\n  /**\n   * @param {import('./puzzle')} puzzle\n   */\n  belongTo(puzzle) {\n    this.puzzle = puzzle;\n  }\n\n  /**\n   * @type {Piece[]}\n   */\n  get presentConnections() {\n    return this.connections.filter(itself);\n  }\n\n  /**\n   * @type {Piece[]}\n   */\n  get connections() {\n    return [\n      this.rightConnection,\n      this.downConnection,\n      this.leftConnection,\n      this.upConnection\n    ];\n  }\n\n  /**\n   * @type {import('./insert').Insert[]}\n   */\n  get inserts() {\n    return [\n      this.right,\n      this.down,\n      this.left,\n      this.up\n    ];\n  }\n\n  /**\n   * @param {TranslationListener} f the callback\n   */\n  onTranslate(f) {\n    this.translateListeners.push(f);\n  }\n\n  /**\n   * @param {ConnectionListener} f the callback\n   */\n  onConnect(f) {\n    this.connectListeners.push(f);\n  }\n\n  /**\n   * @param {ConnectionListener} f the callback\n   */\n  onDisconnect(f) {\n    this.disconnectListeners.push(f);\n  }\n\n  /**\n   * @param {number} dx\n   * @param {number} dy\n   */\n  fireTranslate(dx, dy) {\n    this.translateListeners.forEach(it => it(this, dx, dy));\n  }\n\n  /**\n   * @param {Piece} other\n   */\n  fireConnect(other) {\n    this.connectListeners.forEach(it => it(this, other));\n  }\n\n    /**\n   * @param {Piece[]} others\n   */\n  fireDisconnect(others) {\n    others.forEach(other => {\n      this.disconnectListeners.forEach(it => it(this, other));\n    });\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @param {boolean} [back]\n   */\n  connectVerticallyWith(other, back = false) {\n    connector.vertical.connectWith(this, other, this.proximity, back);\n  }\n\n  /**\n   * @param {Piece} other\n   */\n  attractVertically(other, back = false) {\n    connector.vertical.attract(this, other, back);\n  }\n\n  /**\n   * @param {Piece} other\n   * @param {boolean} [back]\n   */\n  connectHorizontallyWith(other, back = false) {\n    connector.horizontal.connectWith(this, other, this.proximity, back);\n  }\n\n  /**\n   * @param {Piece} other\n   */\n  attractHorizontally(other, back = false) {\n    connector.horizontal.attract(this, other, back);\n  }\n\n  /**\n   * @param {Piece} other\n   * @param {boolean} [back]\n   */\n  tryConnectWith(other, back = false) {\n    this.tryConnectHorizontallyWith(other, back);\n    this.tryConnectVerticallyWith(other, back);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @param {boolean} [back]\n   */\n  tryConnectHorizontallyWith(other, back = false) {\n    if (this.canConnectHorizontallyWith(other)) {\n      this.connectHorizontallyWith(other, back);\n    }\n  }\n  /**\n   *\n   * @param {Piece} other\n   * @param {boolean} [back]\n   */\n  tryConnectVerticallyWith(other, back = false) {\n    if (this.canConnectVerticallyWith(other)) {\n      this.connectVerticallyWith(other, back);\n    }\n  }\n\n  disconnect() {\n    if (!this.connected) {\n      return;\n    }\n    const connections = this.presentConnections;\n\n    if (this.upConnection) {\n      this.upConnection.downConnection = null;\n      /** @type {Piece} */\n      this.upConnection = null;\n    }\n\n    if (this.downConnection) {\n      this.downConnection.upConnection = null;\n      this.downConnection = null;\n    }\n\n    if (this.leftConnection) {\n      this.leftConnection.rightConnection = null;\n      /** @type {Piece} */\n      this.leftConnection = null;\n    }\n\n    if (this.rightConnection) {\n      this.rightConnection.leftConnection = null;\n      this.rightConnection = null;\n    }\n\n    this.fireDisconnect(connections);\n  }\n\n  /**\n   * Sets the centralAnchor for this piece.\n   *\n   * @param {Anchor} anchor\n   */\n  centerAround(anchor) {\n    if (this.centralAnchor) {\n      throw new Error(\"this pieces has already being centered. Use recenterAround instead\");\n    }\n    this.centralAnchor = anchor;\n  }\n\n\n  /**\n   * Sets the initial position of this piece. This method is similar to {@link Piece#centerAround},\n   * but takes a pair instead of an anchor.\n   *\n   * @param {number} x\n   * @param {number} y\n   */\n  locateAt(x, y) {\n    this.centerAround(anchor(x, y));\n  }\n\n  /**\n   * Tells whether this piece central anchor is at given point\n   *\n   * @param {number} x\n   * @param {number} y\n   * @return {boolean}\n   */\n  isAt(x, y) {\n    return this.centralAnchor.isAt(x, y);\n  }\n\n  /**\n   * Moves this piece to the given position, firing translation events.\n   * Piece must be already centered.\n   *\n   * @param {Anchor} anchor the new central anchor\n   * @param {boolean} [quiet] indicates whether events should be suppressed\n   */\n  recenterAround(anchor, quiet = false) {\n    const [dx, dy] = anchor.diff(this.centralAnchor);\n    this.translate(dx, dy, quiet);\n  }\n\n  /**\n   * Moves this piece to the given position, firing translation events.\n   * Piece must be already centered. This method is similar to {@link Piece#recenterAround},\n   * but takes a pair instead of an anchor.\n   *\n   * @param {number} x the final x position\n   * @param {number} y the final y position\n   * @param {boolean} [quiet] indicates whether events should be suppressed\n   */\n  relocateTo(x, y, quiet = false) {\n    this.recenterAround(anchor(x, y), quiet);\n  }\n\n  /**\n   * Move this piece a given distance, firing translation events\n   *\n   * @param {number} dx the x distance\n   * @param {number} dy the y distance\n   * @param {boolean} [quiet] indicates whether events should be suppressed\n   */\n  translate(dx, dy, quiet = false) {\n    if (!Pair.isNull(dx, dy)) {\n      this.centralAnchor.translate(dx, dy);\n      if (!quiet) {\n        this.fireTranslate(dx, dy);\n      }\n    }\n  }\n\n  /**\n   *\n   * @param {number} dx\n   * @param {number} dy\n   * @param {boolean} [quiet]\n   * @param {Piece[]} [pushedPieces]\n   */\n  push(dx, dy, quiet = false, pushedPieces = [this]) {\n    this.translate(dx, dy, quiet);\n\n    const stationaries = this.presentConnections.filter(it => pushedPieces.indexOf(it) === -1);\n    pushedPieces.push(...stationaries);\n    stationaries.forEach(it => it.push(dx, dy, false, pushedPieces));\n  }\n\n  /**\n   *\n   * @param {number} dx\n   * @param {number} dy\n   */\n  drag(dx, dy, quiet = false) {\n    if (Pair.isNull(dx, dy)) return;\n\n    if (this.horizontallyOpenMovement(dx) && this.vericallyOpenMovement(dy)) {\n      this.disconnect();\n      this.translate(dx, dy, quiet);\n    } else {\n      this.push(dx, dy, quiet);\n    }\n  }\n\n  drop() {\n    this.puzzle.autoconnectWith(this);\n  }\n\n  dragAndDrop(dx, dy) {\n    this.drag(dx, dy);\n    this.drop();\n  }\n\n  /**\n   *\n   * @param {number} dy\n   * @returns {boolean}\n   */\n  vericallyOpenMovement(dy) {\n    return connector.vertical.openMovement(this, dy);\n  }\n\n  /**\n   *\n   * @param {number} dx\n   * @returns {boolean}\n   */\n  horizontallyOpenMovement(dx) {\n    return connector.horizontal.openMovement(this, dx);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  canConnectHorizontallyWith(other) {\n    return connector.horizontal.canConnectWith(this, other, this.proximity);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  canConnectVerticallyWith(other) {\n    return connector.vertical.canConnectWith(this, other, this.proximity);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  verticallyCloseTo(other) {\n    return connector.vertical.closeTo(this, other, this.proximity);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  horizontallyCloseTo(other) {\n    return connector.horizontal.closeTo(this, other, this.proximity);\n  }\n\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  verticallyMatch(other) {\n    return connector.vertical.match(this, other);\n  }\n\n  /**\n   *\n   * @param {Piece} other\n   * @returns {boolean}\n   */\n  horizontallyMatch(other) {\n    return connector.horizontal.match(this, other);\n  }\n\n  get connected() {\n    return !!(this.upConnection || this.downConnection || this.leftConnection || this.rightConnection);\n  }\n\n  /**\n   *@type {Anchor}\n   */\n  get downAnchor() {\n    return this.centralAnchor.translated(0, this.radio.y);\n  }\n\n  /**\n   *@type {Anchor}\n   */\n  get rightAnchor() {\n    return this.centralAnchor.translated(this.radio.x, 0);\n  }\n\n  /**\n   *@type {Anchor}\n   */\n  get upAnchor() {\n    return this.centralAnchor.translated(0, -this.radio.y);\n  }\n\n  /**\n   *@type {Anchor}\n   */\n  get leftAnchor() {\n    return this.centralAnchor.translated(-this.radio.x, 0);\n  }\n\n  /**\n   * Defines this piece's own dimmension, overriding puzzle's\n   * default dimmension\n   *\n   * @param {import('./size').Size} size\n   */\n  resize(size) {\n    this._size = size;\n  }\n\n  /**\n   * @type {import('./vector').Vector}\n   */\n  get radio() {\n    return this.size.radio;\n  }\n\n  /**\n   * The double of the radio\n   *\n   * @type {import('./vector').Vector}\n   */\n  get diameter() {\n    return this.size.diameter;\n  }\n\n  get size() {\n    return this._size || this.puzzle.pieceSize;\n  }\n\n  /**\n   * @type {number}\n   */\n  get proximity() {\n    return this.puzzle.proximity;\n  }\n\n  /**\n   * This piece id. It is extracted from metadata\n   *\n   * @type {string}\n   */\n  get id() {\n    return this.metadata.id;\n  }\n\n  /**\n   * Converts this piece into a plain, stringify-ready object.\n   * Connections should have ids\n   *\n   * @param {object} options\n   * @param {boolean} [options.compact]\n   * @returns {PieceDump}\n   */\n  export({compact = false} = {}) {\n    const base = {\n      centralAnchor: this.centralAnchor && this.centralAnchor.export(),\n      structure: Structure.serialize(this),\n      metadata: this.metadata\n    };\n    if (this._size) {\n      base.size = {radio: this._size.radio };\n    }\n    return compact ? base : Object.assign(base, {\n      connections: orthogonalTransform(this.connections, it => ({id: it.id}))\n    })\n  }\n\n  /**\n   * Converts this piece back from a dump. Connections are not restored. {@link Puzzle#autoconnect} method should be used\n   * after importing all them\n   *\n   * @param {PieceDump} dump\n   * @returns {Piece}\n   */\n  static import(dump) {\n    return new Piece(\n      Structure.deserialize(dump.structure),\n      {centralAnchor: dump.centralAnchor, metadata: dump.metadata, size: dump.size});\n  }\n}\n\nmodule.exports = Piece;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/piece.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/prelude.js":
/*!*************************************************!*\
  !*** ./node_modules/headbreaker/src/prelude.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * @template A\n * @typedef {Object} Orthogonal\n * @property {A} up\n * @property {A} down\n * @property {A} left\n * @property {A} right\n */\n\n/**\n * @template A\n * @template B\n *\n * @callback Mapper\n * @param {A} value\n * @returns {B}\n */\n\n/**\n * Misc generic functions\n *\n * @module Prelude\n */\n\n/**\n * @template T\n * @param {T} one\n * @param {T} other\n * @param {boolean} [back]\n * @returns {[T, T]}\n */\nfunction pivot(one, other, back = false) {\n  return back ? [one, other] : [other, one];\n}\n\n/**\n * @template A\n * @template B\n *\n * @param {A[]} values\n * @param {Mapper<A, B>} mapper\n * @param {A} replacement\n * @returns {B[]}\n */\nfunction orthogonalMap(values, mapper, replacement = null) {\n  return values.map(it => {\n    const value = it || replacement;\n    return value && mapper(value)\n  });\n}\n\n/**\n * @template A\n * @template B\n * @param {A[]} values\n * @param {Mapper<A, B>} mapper\n * @param {A} replacement\n * @returns {Orthogonal<B>}\n */\nfunction orthogonalTransform(values, mapper, replacement = null) {\n  const [right, down, left, up] = orthogonalMap(values, mapper, replacement)\n  return {right, down, left, up};\n}\n\n/**\n * @template A\n * @param {A} arg\n * @returns {A}\n */\nfunction itself(arg) {\n  return arg;\n}\n\nmodule.exports = {\n  pivot,\n  itself,\n  orthogonalMap,\n  orthogonalTransform\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/prelude.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/puzzle.js":
/*!************************************************!*\
  !*** ./node_modules/headbreaker/src/puzzle.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const {Anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst {NullValidator} = __webpack_require__(/*! ./validator */ \"./node_modules/headbreaker/src/validator.js\");\nconst {vector, ...Vector} = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\")\nconst {radio} = __webpack_require__(/*! ./size */ \"./node_modules/headbreaker/src/size.js\")\nconst Shuffler = __webpack_require__(/*! ./shuffler */ \"./node_modules/headbreaker/src/shuffler.js\");\n\n/**\n * A puzzle primitive representation that can be easily stringified, exchanged and persisted\n *\n * @typedef {object} PuzzleDump\n * @property {import('./vector').Vector} pieceRadio\n * @property {number} proximity\n * @property {import('./piece').PieceDump[]} pieces\n */\n\n/**\n * @typedef {object} Settings\n * @property {import('./vector').Vector|number} [pieceRadio]\n * @property {number} [proximity]\n */\n\n\n /**\n  * A set of a {@link Piece}s that can be manipulated as a whole, and that can be\n  * used as a pieces factory\n  */\nclass Puzzle {\n\n  /**\n   * @param {Settings} [options]\n   */\n  constructor({pieceRadio = 2, proximity = 1} = {}) {\n    this.pieceSize = radio(pieceRadio);\n    this.proximity = proximity;\n    /** @type {Piece[]} */\n    this.pieces = [];\n    /** @type {import('./validator').Validator} */\n    this.validator = new NullValidator();\n  }\n\n  /**\n   * Creates and adds to this puzzle a new piece\n   *\n   * @param {import('./structure').Structure} [structure] the piece structure\n   * @param {import('./piece').PieceConfig} [config] the piece config\n   * @returns {Piece} the new piece\n   */\n  newPiece(structure = {}, config = {}) {\n    const piece = new Piece(structure, config);\n    this.addPiece(piece);\n    return piece;\n  }\n\n  /**\n   * @param {Piece} piece\n   */\n  addPiece(piece) {\n    this.pieces.push(piece);\n    piece.belongTo(this);\n  }\n\n  /**\n   * @param {Piece[]} pieces\n   */\n  addPieces(pieces) {\n    pieces.forEach(it => this.addPiece(it));\n  }\n\n  /**\n   * Annotates all the pieces with the given list of metadata\n   *\n   * @param {object[]} metadata\n   */\n  annotate(metadata) {\n    this.pieces.forEach((piece, index) => piece.annotate(metadata[index]));\n  }\n\n   /**\n   * Relocates all the pieces to the given list of points\n   *\n   * @param {import('./pair').Pair[]} points\n   */\n  relocateTo(points) {\n    this.pieces.forEach((piece, index) => piece.relocateTo(...points[index]));\n  }\n\n  /**\n   * Tries to connect pieces in their current positions\n   * This method is O(n^2)\n   */\n  autoconnect() {\n    this.pieces.forEach(it => this.autoconnectWith(it));\n  }\n\n  /**\n   * Disconnects all pieces\n   */\n  disconnect() {\n    this.pieces.forEach(it => it.disconnect());\n  }\n\n  /**\n   * Tries to connect the given piece to the rest of the set\n   * This method is O(n)\n   * @param {Piece} piece\n   */\n  autoconnectWith(piece) {\n    this.pieces.filter(it => it !== piece).forEach(other => {\n      piece.tryConnectWith(other);\n      other.tryConnectWith(piece, true);\n    })\n  }\n\n  /**\n   * @param {number} maxX\n   * @param {number} maxY\n   */\n  shuffle(maxX, maxY) {\n    this.shuffleWith(Shuffler.random(maxX, maxY));\n  }\n\n  /**\n   * @param {import('./shuffler').Shuffler} shuffler\n   */\n  shuffleWith(shuffler) {\n    this.disconnect();\n    shuffler(this.pieces).forEach(({x, y}, index) => {\n      this.pieces[index].relocateTo(x, y);\n    });\n    this.autoconnect();\n  }\n\n  /**\n   * @param {number} dx\n   * @param {number} dy\n   */\n  translate(dx, dy) {\n    this.pieces.forEach(it => it.translate(dx, dy));\n  }\n  /**\n   * @param {import('./piece').TranslationListener} f\n   */\n  onTranslate(f) {\n    this.pieces.forEach(it => it.onTranslate(f));\n  }\n\n  /**\n   * @param {import('./piece').ConnectionListener} f\n   */\n  onConnect(f) {\n    this.pieces.forEach(it => it.onConnect(f));\n  }\n\n  /**\n   * @param {import('./piece').ConnectionListener} f\n   */\n  onDisconnect(f) {\n    this.pieces.forEach(it => it.onDisconnect(f));\n  }\n\n  /**\n   * @param {import('./validator').ValidationListener} f\n   */\n  onValid(f) {\n    this.validator.onValid(f);\n  }\n\n  /**\n   * Answers the list of points where\n   * central anchors of pieces are located\n   *\n   * @type {import('./pair').Pair[]}\n   */\n  get points() {\n    return this.pieces.map(it => it.centralAnchor.asPair());\n  }\n\n  /**\n   * Answers a list of points whose coordinates are scaled\n   * to the {@link Puzzle#pieceWidth}\n   *\n   * @type {import('./pair').Pair[]}\n   */\n  get refs() {\n    return this.points.map(([x, y], index) => {\n      const diameter = this.pieces[index].diameter;\n      return [x / diameter.x, y / diameter.y]\n    })\n  }\n\n  /**\n   * @type {any[]}\n   */\n  get metadata() {\n    return this.pieces.map(it => it.metadata);\n  }\n\n  /**\n   * Returns the first piece\n   *\n   * @type {Piece}\n   */\n  get head() {\n    return this.pieces[0];\n  }\n\n  /**\n   * Returns the central anchor of the first piece\n   *\n   * @type {Anchor}\n   */\n  get headAnchor() {\n    return this.head.centralAnchor;\n  }\n\n  /**\n   * @param {import('./validator').Validator} validator\n   */\n  attachValidator(validator) {\n    this.validator = validator;\n  }\n\n  /**\n   * Checks whether this puzzle is valid.\n   *\n   * Calling this method will not fire any validation listeners nor update the\n   * valid property.\n   *\n   * @returns {boolean}\n   */\n  isValid() {\n    return this.validator.isValid(this);\n  }\n\n  /**\n   * Returns the current validation status\n   *\n   * Calling this property will not fire any validation listeners.\n   *\n   * @type {boolean}\n   */\n  get valid() {\n    return this.validator.valid;\n  }\n\n  /**\n   * Checks whether this puzzle is valid, updating valid property\n   * and firing validation listeners if becomes valid\n   */\n  validate() {\n    this.validator.validate(this);\n  }\n\n  /**\n   * Checks whether this puzzle is valid, updating valid property.\n   *\n   * Validations listeners are NOT fired.\n   */\n  updateValidity() {\n    this.validator.validate(this);\n  }\n\n  /**\n   * Wether all the pieces in this puzzle are connected\n   *\n   * @type {boolean}\n   */\n  get connected() {\n    return this.pieces.every(it => it.connected);\n  }\n\n  /**\n   * The piece width, from edge to edge.\n   * This is the double of the {@link Puzzle#pieceRadio}\n   *\n   * @type {import('./vector').Vector}\n   */\n  get pieceDiameter() {\n    return this.pieceSize.diameter;\n  }\n\n  /**\n   * The piece width, from center to edge\n   *\n   * @type {import('./vector').Vector}\n   */\n  get pieceRadio() {\n    return this.pieceSize.radio;\n  }\n\n  /**\n   * Converts this piece into a plain, stringify-ready object.\n   * Pieces should have ids\n   *\n   * @param {object} options config options for export\n   * @param {boolean} [options.compact] if connection information must be omitted\n   * @returns {PuzzleDump}\n   */\n  export(options = {}) {\n    return {\n      pieceRadio: this.pieceRadio,\n      proximity: this.proximity,\n      pieces: this.pieces.map(it => it.export(options))\n    }\n  }\n\n  /**\n   * @param {PuzzleDump} dump\n   * @returns {Puzzle}\n   */\n  static import(dump) {\n    const puzzle = new Puzzle({pieceRadio: dump.pieceRadio, proximity: dump.proximity});\n    puzzle.addPieces(dump.pieces.map(it => Piece.import(it)));\n    puzzle.autoconnect();\n    return puzzle;\n  }\n}\n\nmodule.exports = Puzzle;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/puzzle.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/sequence.js":
/*!**************************************************!*\
  !*** ./node_modules/headbreaker/src/sequence.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const {Tab, Slot, None} = __webpack_require__(/*! ./insert */ \"./node_modules/headbreaker/src/insert.js\");\n\n/**\n * A function for generating {@link Insert}s sequentially\n *\n * @callback InsertsGenerator\n * @param {number} index the position of the element to be generated in the sequence\n * @returns {import('./insert').Insert}\n */\n\n/**\n * This module exports several {@link Insert}s sequences strategies: {@link fixed}, {@link flipflop}, {@link twoAndTwo} and {@link random}\n *\n * @module sequence\n */\n\n/**\n * @type {InsertsGenerator}\n */\nfunction fixed(_n) {\n  return Tab;\n}\n\n/**\n * Generates slots and tabs alternately\n *\n * @type {InsertsGenerator}\n */\nfunction flipflop(n) {\n  return n % 2 === 0 ? Tab : Slot;\n}\n\n/**\n * Generates sequences of two slots and then two tabs\n *\n * @type {InsertsGenerator}\n */\nfunction twoAndTwo(n) {\n  return n % 4 < 2 ? Tab : Slot;\n}\n\n/**\n * Generates tabs and slots in a psuedo-random way\n *\n * @type {InsertsGenerator}\n */\nfunction random(_) {\n  return Math.random() < 0.5 ? Tab : Slot;\n}\n\n/**\n * An InsertSequence is a statefull object that\n * allows to generate {@link Insert}s sequences using an {@link InsertsGenerator} as strategy\n */\nclass InsertSequence {\n  /**\n   * @param {InsertsGenerator} generator the generator used by this sequence to produce inserts\n   */\n  constructor(generator) {\n    this.generator = generator;\n    this.n = 0\n    this._previous;\n    this._current = None;\n  }\n\n  /**\n   * The previously generated insert\n   *\n   * @returns {import('./insert').Insert}\n   */\n  previousComplement() {\n    return this._previous.complement();\n  }\n\n  /**\n   * Answers the last Insert generated by {@link InsertSequence#next}\n   *\n   * @returns {import('./insert').Insert}\n   */\n  current(max) {\n    if (this.n == max) {\n      return None\n    }\n    return this._current;\n  }\n\n  /**\n   * @returns {import('./insert').Insert}\n   **/\n  next() {\n    this._previous = this._current;\n    this._current = this.generator(this.n++);\n    return this._current;\n  }\n}\n\nmodule.exports = {\n  InsertSequence,\n  fixed,\n  flipflop,\n  twoAndTwo,\n  random\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/sequence.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/shuffler.js":
/*!**************************************************!*\
  !*** ./node_modules/headbreaker/src/shuffler.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const {Anchor} = __webpack_require__(/*! ./anchor */ \"./node_modules/headbreaker/src/anchor.js\");\n\n/**\n * @typedef {(pieces: import(\"./piece\")[]) => import(\"./vector\").Vector[]} Shuffler\n */\n\n/**\n * @private\n */\nfunction sampleIndex(list) {\n  return Math.round(Math.random() * (list.length - 1));\n}\n\n/**\n * @param {number} maxX\n * @param {number} maxY\n *\n * @returns {Shuffler}\n */\nfunction random(maxX, maxY) {\n  return (pieces) => pieces.map(_it => Anchor.atRandom(maxX, maxY));\n}\n\n/**\n * @type {Shuffler}\n * */\nconst grid = (pieces) => {\n  const destinations = pieces.map(it => it.centralAnchor.asVector());\n  for (let i = 0; i < destinations.length; i++) {\n    const j = sampleIndex(destinations);\n    const temp = destinations[j];\n    destinations[j] = destinations[i];\n    destinations[i] = temp;\n  }\n  return destinations;\n};\n\n/**\n * @type {Shuffler}\n * */\nconst columns = (pieces) => {\n  const destinations = pieces.map(it => it.centralAnchor.asVector());\n  const columns = [];\n\n  for (let destination of destinations) {\n    if (!columns[destination.x]) {\n      columns[destination.x] = destinations.filter(it => it.x == destination.x);\n    }\n    const column = columns[destination.x];\n\n    const j = sampleIndex(column);\n    const temp = column[j].y\n    column[j].y = destination.y;\n    destination.y = temp;\n  }\n  return destinations;\n};\n\n\n/**\n * @param {number} padding\n * @param {number} width\n * @param {number} height\n * @returns {Shuffler}\n * */\nfunction padder(padding, width, height) {\n  return (pieces) => {\n    const destinations = pieces.map(it => it.centralAnchor.asVector());\n    let dx = 0;\n    let dy = 0;\n    for (let j = 0; j < height; j++) {\n      for (let i = 0; i < width; i++) {\n        const destination = destinations[i + width * j];\n        destination.x += dx;\n        destination.y += dy;\n\n        dx += padding;\n      }\n      dx = 0;\n      dy += padding;\n    }\n    return destinations;\n  }\n}\n\n/**\n * @param {import('./vector').Vector} maxDistance\n * @returns {Shuffler}\n */\nfunction noise(maxDistance) {\n  return (pieces) => {\n    return pieces.map(it =>\n      Anchor\n        .atRandom(2 * maxDistance.x, 2 * maxDistance.y)\n        .translate(-maxDistance.x, -maxDistance.y)\n        .translate(it.centralAnchor.x, it.centralAnchor.y)\n        .asVector());\n  }\n}\n\n/**\n * @type {Shuffler}\n * */\nconst noop = (pieces) => pieces.map(it => it.centralAnchor);\n\nmodule.exports = {\n  random,\n  grid,\n  columns,\n  noop,\n  padder,\n  noise\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/shuffler.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/size.js":
/*!**********************************************!*\
  !*** ./node_modules/headbreaker/src/size.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Vector = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\n\n/**\n * @typedef {Object} Size\n * @property {import('./vector').Vector} radio\n * @property {import('./vector').Vector} diameter\n **/\n\n\n/**\n * @param {import('./vector').Vector|number} value\n * @returns {Size}\n */\nfunction radio(value) {\n  const vector = Vector.cast(value)\n  return {\n    radio: vector,\n    diameter: Vector.multiply(vector, 2)\n  };\n}\n\n/**\n * @param {import('./vector').Vector|number} value\n * @returns {Size}\n */\nfunction diameter(value) {\n  const vector = Vector.cast(value)\n  return {\n    radio: Vector.multiply(vector, 0.5),\n    diameter: vector\n  };\n}\n\nmodule.exports = {\n  radio,\n  diameter\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/size.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/spatial-metadata.js":
/*!**********************************************************!*\
  !*** ./node_modules/headbreaker/src/spatial-metadata.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Vector = __webpack_require__(/*! ./vector */ \"./node_modules/headbreaker/src/vector.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\nconst {PuzzleValidator} = __webpack_require__(/*! ./validator */ \"./node_modules/headbreaker/src/validator.js\");\n\n/**\n * @typedef {object} SpatialMetadata\n * @property {import('./vector').Vector} [targetPosition]\n * @property {import('./vector').Vector} [currentPosition]\n */\n\n/**\n * Functions for handling spatial metadata\n * and pieces and puzzles that are annotated with it\n *\n * @module SpatialMetadata\n */\n\n /**\n  *\n  * @param {Piece} piece\n  */\nfunction diffToTarget(piece) {\n  return Vector.diff(piece.metadata.targetPosition, piece.centralAnchor.asVector());\n}\n\n/**\n * @type {import('../src/validator').PuzzleCondition}\n */\nconst solved = (puzzle) => relativePosition(puzzle) && PuzzleValidator.connected(puzzle);\n\n/**\n * @type {import('../src/validator').PuzzleCondition}\n */\nconst relativePosition = (puzzle) => {\n  const diff0 = diffToTarget(puzzle.head);\n  return puzzle.pieces.every(piece => PuzzleValidator.equalDiffs(diff0, diffToTarget(piece)));\n}\n\n/**\n *@type {import('../src/validator').PieceCondition}\n */\nconst absolutePosition = (piece) => Vector.equal(piece.centralAnchor.asVector(), piece.metadata.targetPosition);\n\n\n/**\n * @param {SpatialMetadata} metadata\n * @param {import('./vector').Vector} target\n * @param {import('./vector').Vector} [current]\n */\nfunction initialize(metadata, target, current) {\n  metadata.targetPosition = metadata.targetPosition || target;\n  metadata.currentPosition = metadata.currentPosition || current || Vector.copy(metadata.targetPosition);\n}\n\nmodule.exports = {\n  initialize,\n  solved,\n  relativePosition,\n  absolutePosition\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/spatial-metadata.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/structure.js":
/*!***************************************************!*\
  !*** ./node_modules/headbreaker/src/structure.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const {Slot, Tab, None} = __webpack_require__(/*! ./insert */ \"./node_modules/headbreaker/src/insert.js\");\nconst {orthogonalMap} = __webpack_require__(/*! ./prelude */ \"./node_modules/headbreaker/src/prelude.js\");\n\n/**\n * @typedef {object} Structure\n * @property {import('./insert').Insert} [up]\n * @property {import('./insert').Insert} [left]\n * @property {import('./insert').Insert} [down]\n * @property {import('./insert').Insert} [right]\n */\n\n/**\n * @module Structure\n */\n\n/**\n * @private\n * @param {string} insert\n * @returns {import('./insert').Insert}\n */\nfunction parseInsert(insert) {\n  return insert === 'S' ? Slot : insert === 'T' ? Tab : None;\n}\n\n/**\n *\n * @param {Structure} structure\n * @returns {string}\n */\nfunction serialize(structure) {\n  return orthogonalMap([structure.right, structure.down, structure.left, structure.up], it => it.serialize(), None).join('');\n}\n\n/**\n *\n * @param {string} string\n * @returns {Structure}\n */\nfunction deserialize(string) {\n\n  if (string.length !== 4) {\n    throw new Error(\"structure string must be 4-chars long\");\n  }\n\n  return {\n    right: parseInsert(string[0]),\n    down: parseInsert(string[1]),\n    left: parseInsert(string[2]),\n    up: parseInsert(string[3]),\n  };\n}\n\n/**\n * @typedef {Structure|string} StructureLike\n */\n\n/**\n * @param {StructureLike} structureLike\n * @returns {Structure}\n */\nfunction asStructure(structureLike) {\n  if (typeof(structureLike) === 'string') {\n    return deserialize(structureLike);\n  }\n  return structureLike;\n}\n\nmodule.exports = {\n  serialize,\n  deserialize,\n  asStructure\n};\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/structure.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/validator.js":
/*!***************************************************!*\
  !*** ./node_modules/headbreaker/src/validator.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Puzzle = __webpack_require__(/*! ./puzzle */ \"./node_modules/headbreaker/src/puzzle.js\");\nconst Piece = __webpack_require__(/*! ./piece */ \"./node_modules/headbreaker/src/piece.js\");\nconst Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\n\n/**\n * @typedef {PieceValidator | PuzzleValidator | NullValidator} Validator\n **/\n\n/**\n * @callback ValidationListener\n * @param {Puzzle} puzzle\n */\n\n/** An abstract base validator */\nclass AbstractValidator {\n\n  constructor() {\n    /** @type {ValidationListener[]} */\n    this.validListeners = [];\n    this._valid = undefined;\n  }\n\n  /**\n   * Validates the puzzle, updating the validity state and\n   * firing validation events\n   *\n   * @param {Puzzle} puzzle\n   */\n  validate(puzzle) {\n    const wasValid = this._valid;\n    this.updateValidity(puzzle);\n    if (this._valid && !wasValid) {\n      this.fireValid(puzzle);\n    }\n  }\n\n  /**\n   * Updates the valid state.\n   *\n   * @param {Puzzle} puzzle\n   */\n  updateValidity(puzzle) {\n    // @ts-ignore\n    this._valid = this.isValid(puzzle);\n  }\n\n  /**\n   * @param {Puzzle} puzzle\n   */\n  fireValid(puzzle) {\n    this.validListeners.forEach(it => it(puzzle));\n  }\n\n  /**\n   * Registers a validation listener\n   *\n   * @param {ValidationListener} f\n   */\n  onValid(f) {\n    this.validListeners.push(f);\n  }\n\n  /**\n   * Answers the current validity status of this validator. This\n   * property neither alters the current status nor triggers new validity checks\n   *\n   * @type {boolean}\n   */\n  get valid() {\n    return this._valid;\n  }\n\n  /**\n   * Answers wether this is the {@link NullValidator}\n   *\n   * @type {boolean}\n   */\n  get isNull() {\n    return false;\n  }\n}\n\n/**\n * @callback PieceCondition\n * @param {Piece} puzzle\n * @returns {boolean}\n */\n\n\n/**\n * @callback PuzzleCondition\n * @param {Puzzle} puzzle\n * @returns {boolean}\n */\n\n/** A validator that evaluates each piece independently */\nclass PieceValidator extends AbstractValidator {\n\n  /**\n   * @param {PieceCondition} f\n   */\n  constructor(f) {\n    super();\n    this.condition = f;\n  }\n\n  /**\n   * @param {Puzzle} puzzle\n   * @returns {boolean}\n   */\n  isValid(puzzle) {\n    return puzzle.pieces.every(it => this.condition(it));\n  }\n}\n\n/** A validator that evaluates the whole puzzle */\nclass PuzzleValidator extends AbstractValidator {\n\n  /**\n   * @param {PuzzleCondition} f\n   */\n  constructor(f) {\n    super();\n    this.condition = f;\n  }\n\n  /**\n   * @param {Puzzle} puzzle\n   */\n  isValid(puzzle) {\n    return this.condition(puzzle);\n  }\n\n  /**\n   * Compares two pairs\n   *\n   * @param {import('./pair').Pair} param0\n   * @param {import('./pair').Pair} param1\n   *\n   * @returns {boolean}\n   */\n  static equalDiffs([dx0, dy0], [dx, dy]) {\n    return Pair.equal(dx0, dy0, dx, dy, PuzzleValidator.DIFF_DELTA);\n  }\n}\n\n/** A validator that always is invalid */\nclass NullValidator extends AbstractValidator {\n\n  /**\n   * @param {Puzzle} puzzle\n   */\n  isValid(puzzle) {\n    return false;\n  }\n\n  /**\n   * @type {boolean}\n   */\n  get isNull() {\n    return true;\n  }\n};\n\n/**\n * The delta used to compare distances\n *\n * @type {number}\n */\nPuzzleValidator.DIFF_DELTA = 0.01;\n\n/**\n* @type {PuzzleCondition}\n*/\nPuzzleValidator.connected = (puzzle) => puzzle.connected;\n\n/**\n * @param {import('./pair').Pair[]} expected the expected relative refs\n * @returns {PuzzleCondition}\n */\nPuzzleValidator.relativeRefs = (expected) => {\n  return (puzzle) => {\n    function diff(x, y, index) {\n      return Pair.diff(x, y, ...expected[index]);\n    }\n    const refs = puzzle.refs;\n    const [x0, y0] = refs[0];\n    const diff0 = diff(x0, y0, 0);\n    return refs.every(([x, y], index) => PuzzleValidator.equalDiffs(diff0, diff(x, y, index)));\n  };\n};\n\nmodule.exports = {\n  PuzzleValidator,\n  PieceValidator,\n  NullValidator\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/validator.js?");

/***/ }),

/***/ "./node_modules/headbreaker/src/vector.js":
/*!************************************************!*\
  !*** ./node_modules/headbreaker/src/vector.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Pair = __webpack_require__(/*! ./pair */ \"./node_modules/headbreaker/src/pair.js\");\n\n/**\n * @typedef {object} Vector\n * @property {number} x\n * @property {number} y\n */\n\n/**\n *\n * @param {number} x\n * @param {number} y\n *\n * @returns {Vector}\n */\nfunction vector(x, y) {\n  return { x, y };\n}\n\n/**\n * @param {Vector|number} value\n * @returns {Vector}\n */\nfunction cast(value) {\n  if (typeof value === 'number') {\n    return vector(value, value);\n  } else {\n    return value;\n  }\n}\n\n /**\n  * This module contains functions for dealing with objects with x and y\n  * coordinates that represent or include point data\n  *\n  * @module Vector\n  */\n\n/**\n * Returns a new (0, 0) vector\n *\n * @returns {Vector}\n */\nfunction zero() {\n  return vector(0, 0);\n}\n\n/**\n * Compares two points\n *\n * @param {Vector} one\n * @param {Vector} other\n * @param {number} [delta] the tolance in comparison\n * @returns {boolean}\n */\nfunction equal(one, other, delta = 0) {\n  return Pair.equal(one.x, one.y, other.x, other.y, delta);\n}\n\n/**\n * Creates a copy of the given point\n *\n * @param {Vector} one\n * @returns {Vector}\n */\nfunction copy({x, y}) {\n  return {x, y}\n}\n\n/**\n * @param {Vector} vector\n * @param {any} x\n * @param {any} y\n */\nfunction update(vector, x, y) {\n  vector.x = x;\n  vector.y = y;\n}\n\n/**\n * @param {Vector} one\n * @param {Vector} other\n * @returns {import('./pair').Pair};\n */\nfunction diff(one, other) {\n  return Pair.diff(one.x, one.y, other.x, other.y);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction multiply(one, other) {\n  return apply(one, other, (v1, v2) => v1 * v2);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction divide(one, other) {\n  return apply(one, other, (v1, v2) => v1 / v2);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction plus(one, other) {\n  return apply(one, other, (v1, v2) => v1 + v2);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction minus(one, other) {\n  return apply(one, other, (v1, v2) => v1 - v2);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction min(one, other) {\n  return apply(one, other, Math.min);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n *\n * @returns {Vector}\n */\nfunction max(one, other) {\n  return apply(one, other, Math.max);\n}\n\n/**\n * @param {Vector|number} one\n * @param {Vector|number} other\n * @param {(one: number, other: number) => number} f\n *\n * @returns {Vector}\n */\nfunction apply(one, other, f) {\n  const first = cast(one);\n  const second = cast(other);\n  return {x: f(first.x, second.x), y: f(first.y, second.y)};\n}\n\nconst inner = {\n  /**\n   * @param {Vector} one\n   *\n   * @returns {number}\n   */\n  min(one) {\n    return this.apply(one, Math.min);\n  },\n\n  /**\n   * @param {Vector} one\n   *\n   * @returns {number}\n   */\n  max(one) {\n    return this.apply(one, Math.max);\n  },\n\n  /**\n   * @param {Vector} one\n   * @param {(one: number, other: number) => number} f\n   * @return {number}\n   */\n  apply(one, f) {\n    return f(one.x, one.y)\n  }\n}\n\nmodule.exports = {\n  cast,\n  vector,\n  copy,\n  equal,\n  zero,\n  update,\n  diff,\n  multiply,\n  divide,\n  plus,\n  minus,\n  apply,\n  min,\n  max,\n  inner\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/headbreaker/src/vector.js?");

/***/ }),

/***/ "./node_modules/hex-and-rgba/index.js":
/*!********************************************!*\
  !*** ./node_modules/hex-and-rgba/index.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("var __WEBPACK_AMD_DEFINE_RESULT__;\r\n\r\n\r\n// Note: it is not '#?' , because I want all HEX code strings to contain the leading hash char.\r\nvar validHex = new RegExp(/^#([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i);\r\n\r\n// array to rgba string converter\r\nvar rgbaArrToString = function() { \r\n    return 'rgba(' + this[0] + ',' + this[1] + ','+ this[2] + ','+ this[3].toFixed(1) + ')';\r\n};\r\n\r\n// global Object for export\r\nvar hexAndRgba = {},\r\n    self = hexAndRgba;\r\n\r\n/**\r\n * Check an RGBA value set for validity\r\n * @param {number} r    from 0 to 255\r\n * @param {number} g    from 0 to 255 \r\n * @param {number} b    from 0 to 255\r\n * @param {float}  [a]  from 0.0 to 1.0\r\n * @returns {boolean}\r\n */\r\nhexAndRgba.isValidRgba = function isValidRgba(r,g,b,a)\r\n{\r\n    return !!self.rgbaToHex.apply(self, arguments);\r\n}\r\n\r\n/**\r\n * Check a HEX/aHex code for validity\r\n * @param {string} hex  a HEX/aHex code string to check\r\n * @returns {boolean}\r\n */\r\nhexAndRgba.isValidHex = function isValidHex(hex)\r\n{\r\n    return validHex.test(hex);\r\n}\r\n\r\n/**\r\n * convert a RGBA value set to a HEX code string\r\n * @param {number} r    from 0 to 255\r\n * @param {number} g    from 0 to 255 \r\n * @param {number} b    from 0 to 255\r\n * @param {float}  [a]  from 0.0 to 1.0\r\n * @param {Array}  r    array with the RGBA values\r\n * @returns {string|false}  HEX code string in lowercase\r\n */\r\nhexAndRgba.rgbaToHex = function rgbaToHex(r,g,b,a)\r\n{\r\n    if (arguments.length == 1 && Array.isArray(arguments[0]))\r\n        return self.rgbaToHex.apply(null, arguments[0]);    // allow array as params substitution\r\n\r\n    if (arguments.length < 3 || arguments.length > 4)       // arguments length check\r\n        return false;\r\n\r\n    var args = Array.prototype.slice.call(arguments);       // Arguments to Array conversion\r\n    \r\n    if (args.length == 4)                                   // is with optional alpha value\r\n        args[3] = Math.floor(255 * args[3]);                // opacity float to 255-based value\r\n\r\n    var parts = args.map(function(e){ var r = (+e).toString(16); r.length==1 && (r='0'+r); return r; }, []);\r\n    \r\n    return (!~parts.indexOf('NaN'))                         // if a part could not be converted to an int, there is a 'NaN'\r\n        ? '#' + parts.join('')\r\n        : false;\r\n}\r\n\r\n/**\r\n * convert a HEXa code string to a RGBA value set\r\n * @param {string} hex  a HEXa code string to check\r\n * @returns {Array|false}\r\n */\r\nhexAndRgba.hexToRgba = function hexToRgba(hex)\r\n{\r\n    if (! self.isValidHex(hex))\r\n        return false;\r\n\r\n    var code = hex.match(validHex)[1];\r\n\r\n    if (code.length == 3 || code.length == 4)               // fix 3 and 4 letter codes\r\n        code = code.match(/./g).reduce( function(i,e) { return i+e+e; }, '');\r\n                                                            // convert to int from hex\r\n    var codePairs = code.match(/.{1,2}/g).map( function(e) { return parseInt(e, 16); });\r\n\r\n    if (codePairs.length == 4)\r\n        codePairs[3] = +(codePairs[3] / 255).toPrecision(3);\r\n    else\r\n        codePairs[3] = 1.0;\r\n\r\n    // allow string access\r\n    codePairs.toString = rgbaArrToString;\r\n\r\n    return codePairs;\r\n}\r\n\r\n/**\r\n * convert a RGBA value set to a aHEX code string\r\n * @param {number} r    from 0 to 255\r\n * @param {number} g    from 0 to 255 \r\n * @param {number} b    from 0 to 255\r\n * @param {float}  [a]  from 0.0 to 1.0\r\n * @param {Array}  r    array with the RGBA values\r\n * @returns {string|false}  aHEX code string in lowercase\r\n */\r\nhexAndRgba.rgbaToAHex = function rgbaToAHex(r,g,b,a)\r\n{\r\n    if (arguments.length == 1 && Array.isArray(arguments[0]))\r\n        return self.rgbaToAHex.apply(null, arguments[0]);    // allow array as params substitution\r\n\r\n    if (arguments.length < 3 || arguments.length > 4)       // arguments length check\r\n        return false;\r\n\r\n    var args = Array.prototype.slice.call(arguments);       // Arguments to Array conversion\r\n    \r\n    if (args.length == 4) {                                 // is with optional alpha value\r\n        args[3] = Math.floor(255 * args[3]);                // opacity float to 255-based value\r\n        var part = args.splice(3, 1)[0];                    // remove alpha part\r\n        args.unshift(part);                                 // prepend alpha for aHEX\r\n    }\r\n\r\n    var parts = args.map(function(e){ var r = (+e).toString(16); r.length==1 && (r='0'+r); return r; }, []);\r\n    \r\n    return (!~parts.indexOf('NaN'))                         // if a part could not be converted to an int, there is a 'NaN'\r\n        ? '#' + parts.join('')\r\n        : false;\r\n}\r\n\r\n/**\r\n * convert a aHEX code string to a RGBA value set\r\n * @param {string} ahex  an aHEX code string to check (ARGB, AARRGGBB)\r\n * @returns {Array|false}\r\n */\r\nhexAndRgba.aHexToRgba = function aHexToRgba(ahex)\r\n{\r\n    if (! self.isValidHex(ahex))\r\n        return false;\r\n\r\n    var code = ahex.match(validHex)[1];\r\n\r\n    if (code.length == 3 || code.length == 4)               // fix 3 and 4 letter codes\r\n        code = code.match(/./g).reduce( function(i,e) { return i+e+e; }, '');\r\n                                                            // convert to int from hex\r\n    var codePairs = code.match(/.{1,2}/g).map( function(e) { return parseInt(e, 16); });\r\n\r\n    if (codePairs.length == 4) {\r\n        codePairs[0] = +(codePairs[0] / 255).toPrecision(3);\r\n        var part = codePairs.shift();\r\n        codePairs.push(part);\r\n    }\r\n    else\r\n        codePairs.push(1.0);\r\n\r\n    // allow string access\r\n    codePairs.toString = rgbaArrToString;\r\n\r\n    return codePairs;\r\n}\r\n\r\n/**\r\n * get the RGBA values from an rgba String\r\n * @param {string} rgba\r\n * @returns {Array|false}\r\n */\r\nhexAndRgba.rgbaToArray = function rgbaToArray(rgba)\r\n{\r\n                                                            // convert string to int\r\n    var codePairs = rgba.match(/([0-9\\.]+)/g).map( function(e) { return +e; });\r\n\r\n\r\n    if (codePairs.length < 3 || codePairs.length > 4)       // arguments length check\r\n        return false;\r\n\r\n    // allow string access\r\n    codePairs.toString = rgbaArrToString;\r\n\r\n    return codePairs;\r\n}\r\n\r\n\r\n// AMD, CommonJS, Browser\r\nif (true) {\r\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\r\n        return hexAndRgba;\r\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n}\r\nelse {}\n\n//# sourceURL=webpack://futureBooks/./node_modules/hex-and-rgba/index.js?");

/***/ }),

/***/ "./node_modules/ieee754/index.js":
/*!***************************************!*\
  !*** ./node_modules/ieee754/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/ieee754/index.js?");

/***/ }),

/***/ "./node_modules/indexof/index.js":
/*!***************************************!*\
  !*** ./node_modules/indexof/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\nvar indexOf = [].indexOf;\n\nmodule.exports = function(arr, obj){\n  if (indexOf) return arr.indexOf(obj);\n  for (var i = 0; i < arr.length; ++i) {\n    if (arr[i] === obj) return i;\n  }\n  return -1;\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/indexof/index.js?");

/***/ }),

/***/ "./node_modules/ip-regex/index.js":
/*!****************************************!*\
  !*** ./node_modules/ip-regex/index.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst word = '[a-fA-F\\\\d:]';\nconst b = options => options && options.includeBoundaries ?\n\t`(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))` :\n\t'';\n\nconst v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n\nconst v6seg = '[a-fA-F\\\\d]{1,4}';\nconst v6 = `\n(?:\n(?:${v6seg}:){7}(?:${v6seg}|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n`.replace(/\\s*\\/\\/.*$/gm, '').replace(/\\n/g, '').trim();\n\n// Pre-compile only the exact regexes because adding a global flag make regexes stateful\nconst v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);\nconst v4exact = new RegExp(`^${v4}$`);\nconst v6exact = new RegExp(`^${v6}$`);\n\nconst ip = options => options && options.exact ?\n\tv46Exact :\n\tnew RegExp(`(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(options)})`, 'g');\n\nip.v4 = options => options && options.exact ? v4exact : new RegExp(`${b(options)}${v4}${b(options)}`, 'g');\nip.v6 = options => options && options.exact ? v6exact : new RegExp(`${b(options)}${v6}${b(options)}`, 'g');\n\nmodule.exports = ip;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/ip-regex/index.js?");

/***/ }),

/***/ "./node_modules/is-function/index.js":
/*!*******************************************!*\
  !*** ./node_modules/is-function/index.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n  if (!fn) {\n    return false\n  }\n  var string = toString.call(fn)\n  return string === '[object Function]' ||\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\n    (typeof window !== 'undefined' &&\n     // IE8 and below\n     (fn === window.setTimeout ||\n      fn === window.alert ||\n      fn === window.confirm ||\n      fn === window.prompt))\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/is-function/index.js?");

/***/ }),

/***/ "./node_modules/is-plain-object/dist/is-plain-object.mjs":
/*!***************************************************************!*\
  !*** ./node_modules/is-plain-object/dist/is-plain-object.mjs ***!
  \***************************************************************/
/*! exports provided: isPlainObject */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/sanitize-html/index.js (referenced with cjs require) */
/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isPlainObject\", function() { return isPlainObject; });\n/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n  return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n  var ctor,prot;\n\n  if (isObject(o) === false) return false;\n\n  // If has modified constructor\n  ctor = o.constructor;\n  if (ctor === undefined) return true;\n\n  // If has modified prototype\n  prot = ctor.prototype;\n  if (isObject(prot) === false) return false;\n\n  // If constructor does not have an Object-specific method\n  if (prot.hasOwnProperty('isPrototypeOf') === false) {\n    return false;\n  }\n\n  // Most likely a plain Object\n  return true;\n}\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/is-plain-object/dist/is-plain-object.mjs?");

/***/ }),

/***/ "./node_modules/is-url-superb/index.js":
/*!*********************************************!*\
  !*** ./node_modules/is-url-superb/index.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nconst urlRegex = __webpack_require__(/*! url-regex */ \"./node_modules/url-regex/index.js\")({exact: true});\n\nmodule.exports = url => {\n\tif (typeof url !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn urlRegex.test(url.trim());\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/is-url-superb/index.js?");

/***/ }),

/***/ "./node_modules/isarray/index.js":
/*!***************************************!*\
  !*** ./node_modules/isarray/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/isarray/index.js?");

/***/ }),

/***/ "./node_modules/isnumeric/isNumeric.js":
/*!*********************************************!*\
  !*** ./node_modules/isnumeric/isNumeric.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isNumeric = function (obj) {\r\n    obj = typeof(obj) === \"string\" ? obj.replace(/,/g, \"\") : obj;\r\n    return !isNaN(parseFloat(obj)) && isFinite(obj) && Object.prototype.toString.call(obj).toLowerCase() !== \"[object array]\";\r\n};\r\n\r\nif (true) {\r\n    if ( true && module.exports) {\r\n        exports = module.exports = isNumeric;\r\n    }\r\n    exports.isNumeric = isNumeric;\r\n}\r\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/isnumeric/isNumeric.js?");

/***/ }),

/***/ "./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js":
/*!*********************************************************************!*\
  !*** ./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(jQuery) {/*!\n * jQuery UI Touch Punch 0.2.3\n *\n * Copyright 2011–2014, Dave Furfero\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n * Depends:\n *  jquery.ui.widget.js\n *  jquery.ui.mouse.js\n */\n(function ($) {\n\n  // Detect touch support\n  $.support.touch = 'ontouchend' in document;\n\n  // Ignore browsers without touch support\n  if (!$.support.touch) {\n    return;\n  }\n\n  var mouseProto = $.ui.mouse.prototype,\n      _mouseInit = mouseProto._mouseInit,\n      _mouseDestroy = mouseProto._mouseDestroy,\n      touchHandled;\n\n  /**\n   * Simulate a mouse event based on a corresponding touch event\n   * @param {Object} event A touch event\n   * @param {String} simulatedType The corresponding mouse event\n   */\n  function simulateMouseEvent (event, simulatedType) {\n\n    // Ignore multi-touch events\n    if (event.originalEvent.touches.length > 1) {\n      return;\n    }\n\n    event.preventDefault();\n\n    var touch = event.originalEvent.changedTouches[0],\n        simulatedEvent = document.createEvent('MouseEvents');\n    \n    // Initialize the simulated mouse event using the touch event's coordinates\n    simulatedEvent.initMouseEvent(\n      simulatedType,    // type\n      true,             // bubbles                    \n      true,             // cancelable                 \n      window,           // view                       \n      1,                // detail                     \n      touch.screenX,    // screenX                    \n      touch.screenY,    // screenY                    \n      touch.clientX,    // clientX                    \n      touch.clientY,    // clientY                    \n      false,            // ctrlKey                    \n      false,            // altKey                     \n      false,            // shiftKey                   \n      false,            // metaKey                    \n      0,                // button                     \n      null              // relatedTarget              \n    );\n\n    // Dispatch the simulated event to the target element\n    event.target.dispatchEvent(simulatedEvent);\n  }\n\n  /**\n   * Handle the jQuery UI widget's touchstart events\n   * @param {Object} event The widget element's touchstart event\n   */\n  mouseProto._touchStart = function (event) {\n\n    var self = this;\n\n    // Ignore the event if another widget is already being handled\n    if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {\n      return;\n    }\n\n    // Set the flag to prevent other widgets from inheriting the touch event\n    touchHandled = true;\n\n    // Track movement to determine if interaction was a click\n    self._touchMoved = false;\n\n    // Simulate the mouseover event\n    simulateMouseEvent(event, 'mouseover');\n\n    // Simulate the mousemove event\n    simulateMouseEvent(event, 'mousemove');\n\n    // Simulate the mousedown event\n    simulateMouseEvent(event, 'mousedown');\n  };\n\n  /**\n   * Handle the jQuery UI widget's touchmove events\n   * @param {Object} event The document's touchmove event\n   */\n  mouseProto._touchMove = function (event) {\n\n    // Ignore event if not handled\n    if (!touchHandled) {\n      return;\n    }\n\n    // Interaction was not a click\n    this._touchMoved = true;\n\n    // Simulate the mousemove event\n    simulateMouseEvent(event, 'mousemove');\n  };\n\n  /**\n   * Handle the jQuery UI widget's touchend events\n   * @param {Object} event The document's touchend event\n   */\n  mouseProto._touchEnd = function (event) {\n\n    // Ignore event if not handled\n    if (!touchHandled) {\n      return;\n    }\n\n    // Simulate the mouseup event\n    simulateMouseEvent(event, 'mouseup');\n\n    // Simulate the mouseout event\n    simulateMouseEvent(event, 'mouseout');\n\n    // If the touch interaction did not move, it should trigger a click\n    if (!this._touchMoved) {\n\n      // Simulate the click event\n      simulateMouseEvent(event, 'click');\n    }\n\n    // Unset the flag to allow other widgets to inherit the touch event\n    touchHandled = false;\n  };\n\n  /**\n   * A duck punch of the $.ui.mouse _mouseInit method to support touch events.\n   * This method extends the widget with bound touch event handlers that\n   * translate touch events to mouse events and pass them to the widget's\n   * original mouse event handling methods.\n   */\n  mouseProto._mouseInit = function () {\n    \n    var self = this;\n\n    // Delegate the touch handlers to the widget's element\n    self.element.bind({\n      touchstart: $.proxy(self, '_touchStart'),\n      touchmove: $.proxy(self, '_touchMove'),\n      touchend: $.proxy(self, '_touchEnd')\n    });\n\n    // Call the original $.ui.mouse init method\n    _mouseInit.call(self);\n  };\n\n  /**\n   * Remove the touch event handlers\n   */\n  mouseProto._mouseDestroy = function () {\n    \n    var self = this;\n\n    // Delegate the touch handlers to the widget's element\n    self.element.unbind({\n      touchstart: $.proxy(self, '_touchStart'),\n      touchmove: $.proxy(self, '_touchMove'),\n      touchend: $.proxy(self, '_touchEnd')\n    });\n\n    // Call the original $.ui.mouse destroy method\n    _mouseDestroy.call(self);\n  };\n\n})(jQuery);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/themes/base/core.css":
/*!*****************************************************!*\
  !*** ./node_modules/jquery-ui/themes/base/core.css ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/themes/base/core.css?");

/***/ }),

/***/ "./node_modules/jquery-ui/themes/base/draggable.css":
/*!**********************************************************!*\
  !*** ./node_modules/jquery-ui/themes/base/draggable.css ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/themes/base/draggable.css?");

/***/ }),

/***/ "./node_modules/jquery-ui/themes/base/resizable.css":
/*!**********************************************************!*\
  !*** ./node_modules/jquery-ui/themes/base/resizable.css ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/themes/base/resizable.css?");

/***/ }),

/***/ "./node_modules/jquery-ui/themes/base/selectable.css":
/*!***********************************************************!*\
  !*** ./node_modules/jquery-ui/themes/base/selectable.css ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/themes/base/selectable.css?");

/***/ }),

/***/ "./node_modules/jquery-ui/themes/base/sortable.css":
/*!*********************************************************!*\
  !*** ./node_modules/jquery-ui/themes/base/sortable.css ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/themes/base/sortable.css?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/data.js":
/*!*******************************************!*\
  !*** ./node_modules/jquery-ui/ui/data.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI :data 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: :data Selector\n//>>group: Core\n//>>description: Selects elements which have data stored under the specified key.\n//>>docs: https://api.jqueryui.com/data-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./version */ \"./node_modules/jquery-ui/ui/version.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\tdata: $.expr.createPseudo( function( dataName ) {\n\t\treturn function( elem ) {\n\t\t\treturn !!$.data( elem, dataName );\n\t\t};\n\t} )\n} );\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/data.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/disable-selection.js":
/*!********************************************************!*\
  !*** ./node_modules/jquery-ui/ui/disable-selection.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Disable Selection 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: disableSelection\n//>>group: Core\n//>>description: Disable selection of text content within the set of matched elements.\n//>>docs: https://api.jqueryui.com/disableSelection/\n\n// This file is deprecated\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./version */ \"./node_modules/jquery-ui/ui/version.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tdisableSelection: ( function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.on( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tenableSelection: function() {\n\t\treturn this.off( \".ui-disableSelection\" );\n\t}\n} );\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/disable-selection.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/plugin.js":
/*!*********************************************!*\
  !*** ./node_modules/jquery-ui/ui/plugin.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./version */ \"./node_modules/jquery-ui/ui/version.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\nreturn $.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||\n\t\t\t\tinstance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/plugin.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/scroll-parent.js":
/*!****************************************************!*\
  !*** ./node_modules/jquery-ui/ui/scroll-parent.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Scroll Parent 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: https://api.jqueryui.com/scrollParent/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./version */ \"./node_modules/jquery-ui/ui/version.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/scroll-parent.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/version.js":
/*!**********************************************!*\
  !*** ./node_modules/jquery-ui/ui/version.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\n$.ui = $.ui || {};\n\nreturn $.ui.version = \"1.14.1\";\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/version.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widget.js":
/*!*********************************************!*\
  !*** ./node_modules/jquery-ui/ui/widget.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Widget 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: https://api.jqueryui.com/jQuery.widget/\n//>>demos: https://jqueryui.com/widget/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./version */ \"./node_modules/jquery-ui/ui/version.js\") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nvar widgetUuid = 0;\nvar widgetHasOwnProperty = Array.prototype.hasOwnProperty;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\n\t\t\t// Only trigger remove when necessary to save time\n\t\t\tevents = $._data( elem, \"events\" );\n\t\t\tif ( events && events.remove ) {\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tif ( name === \"__proto__\" || name === \"constructor\" ) {\n\t\treturn $.error( \"Invalid widget name: \" + name );\n\t}\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( Array.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this || !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( typeof value !== \"function\" ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof instance[ options ] !== \"function\" ||\n\t\t\t\t\t\toptions.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction bindRemoveEvent() {\n\t\t\tvar nodesToBind = [];\n\n\t\t\toptions.element.each( function( _, element ) {\n\t\t\t\tvar isTracked = $.map( that.classesElementLookup, function( elements ) {\n\t\t\t\t\treturn elements;\n\t\t\t\t} )\n\t\t\t\t\t.some( function( elements ) {\n\t\t\t\t\t\treturn elements.is( element );\n\t\t\t\t\t} );\n\n\t\t\t\tif ( !isTracked ) {\n\t\t\t\t\tnodesToBind.push( element );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthat._on( $( nodesToBind ), {\n\t\t\t\tremove: \"_untrackClassesElement\"\n\t\t\t} );\n\t\t}\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tbindRemoveEvent();\n\t\t\t\t\tcurrent = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\n\t\tthis._off( $( event.target ) );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( typeof callback === \"function\" &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t} else if ( options === true ) {\n\t\t\toptions = {};\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nreturn $.widget;\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widget.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/draggable.js":
/*!********************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/draggable.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Draggable 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Draggable\n//>>group: Interactions\n//>>description: Enables dragging functionality for any element.\n//>>docs: https://api.jqueryui.com/draggable/\n//>>demos: https://jqueryui.com/draggable/\n//>>css.structure: ../../themes/base/draggable.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ./mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\"),\n\t\t\t__webpack_require__(/*! ../data */ \"./node_modules/jquery-ui/ui/data.js\"),\n\t\t\t__webpack_require__(/*! ../plugin */ \"./node_modules/jquery-ui/ui/plugin.js\"),\n\t\t\t__webpack_require__(/*! ../scroll-parent */ \"./node_modules/jquery-ui/ui/scroll-parent.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.14.1\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// Callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif ( this.options.helper === \"original\" ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\t\tif ( this.options.addClasses ) {\n\t\t\tthis._addClass( \"ui-draggable\" );\n\t\t}\n\t\tthis._setHandleClassName();\n\n\t\tthis._mouseInit();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._removeHandleClassName();\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tif ( ( this.helper || this.element ).is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis.destroyOnClear = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._removeHandleClassName();\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar o = this.options;\n\n\t\t// Among others, prevent a drag on a resizable-handle\n\t\tif ( this.helper || o.disabled ||\n\t\t\t\t$( event.target ).closest( \".ui-resizable-handle\" ).length > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle( event );\n\t\tif ( !this.handle ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._blurActiveElement( event );\n\n\t\tthis._blockFrames( o.iframeFix === true ? \"iframe\" : o.iframeFix );\n\n\t\treturn true;\n\n\t},\n\n\t_blockFrames: function( selector ) {\n\t\tthis.iframeBlocks = this.document.find( selector ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( \"position\", \"absolute\" )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.outerWidth( iframe.outerWidth() )\n\t\t\t\t.outerHeight( iframe.outerHeight() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_blurActiveElement: function( event ) {\n\t\tvar activeElement = this.document[ 0 ].activeElement,\n\t\t\ttarget = $( event.target );\n\n\t\t// Don't blur if the event occurred on an element that is within\n\t\t// the currently focused element\n\t\t// See #10527, #12472\n\t\tif ( target.closest( activeElement ).length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur any element that currently has focus, see #4261\n\t\t$( activeElement ).trigger( \"blur\" );\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\tthis._addClass( this.helper, \"ui-draggable-dragging\" );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent( true );\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.hasFixedAncestor = this.helper.parents().filter( function() {\n\t\t\t\treturn $( this ).css( \"position\" ) === \"fixed\";\n\t\t\t} ).length > 0;\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.positionAbs = this.element.offset();\n\t\tthis._refreshOffsets( event );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition( event, false );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\tif ( o.cursorAt ) {\n\t\t\tthis._adjustOffsetFromHelper( o.cursorAt );\n\t\t}\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif ( this._trigger( \"start\", event ) === false ) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\t// Execute the drag once - this causes the helper not to be visible before getting its\n\t\t// correct position\n\t\tthis._mouseDrag( event, true );\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has started\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart( this, event );\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_refreshOffsets: function( event ) {\n\t\tthis.offset = {\n\t\t\ttop: this.positionAbs.top - this.margins.top,\n\t\t\tleft: this.positionAbs.left - this.margins.left,\n\t\t\tscroll: false,\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset()\n\t\t};\n\n\t\tthis.offset.click = {\n\t\t\tleft: event.pageX - this.offset.left,\n\t\t\ttop: event.pageY - this.offset.top\n\t\t};\n\t},\n\n\t_mouseDrag: function( event, noPropagation ) {\n\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.hasFixedAncestor ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event, true );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif ( !noPropagation ) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif ( this._trigger( \"drag\", event, ui ) === false ) {\n\t\t\t\tthis._mouseUp( new $.Event( \"mouseup\", event ) );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\tdropped = $.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif ( this.dropped ) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\tif ( ( this.options.revert === \"invalid\" && !dropped ) ||\n\t\t\t\t( this.options.revert === \"valid\" && dropped ) ||\n\t\t\t\tthis.options.revert === true || ( typeof this.options.revert === \"function\" &&\n\t\t\t\tthis.options.revert.call( this.element, dropped ) )\n\t\t) {\n\t\t\t$( this.helper ).animate(\n\t\t\t\tthis.originalPosition,\n\t\t\t\tparseInt( this.options.revertDuration, 10 ),\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( that._trigger( \"stop\", event ) !== false ) {\n\t\t\t\t\t\tthat._clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tif ( this._trigger( \"stop\", event ) !== false ) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis._unblockFrames();\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has stopped\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop( this, event );\n\t\t}\n\n\t\t// Only need to focus if the event occurred on the draggable itself, see #10527\n\t\tif ( this.handleElement.is( event.target ) ) {\n\n\t\t\t// The interaction is over; whether or not the click resulted in a drag,\n\t\t\t// focus the element\n\t\t\tthis.element.trigger( \"focus\" );\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call( this, event );\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.helper.is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: this.element[ 0 ] } ) );\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function( event ) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.handleElement = this.options.handle ?\n\t\t\tthis.element.find( this.options.handle ) : this.element;\n\t\tthis._addClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_removeHandleClassName: function() {\n\t\tthis._removeClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelperIsFunction = typeof o.helper === \"function\",\n\t\t\thelper = helperIsFunction ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ?\n\t\t\t\t\tthis.element.clone().removeAttr( \"id\" ) :\n\t\t\t\t\tthis.element );\n\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\thelper.appendTo( ( o.appendTo === \"parent\" ?\n\t\t\t\tthis.element[ 0 ].parentNode :\n\t\t\t\to.appendTo ) );\n\t\t}\n\n\t\t// https://bugs.jqueryui.com/ticket/9446\n\t\t// a helper function can return the original element\n\t\t// which wouldn't have been set to relative in _create\n\t\tif ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\n\t\tif ( helper[ 0 ] !== this.element[ 0 ] &&\n\t\t\t\t!( /(fixed|absolute)/ ).test( helper.css( \"position\" ) ) ) {\n\t\t\thelper.css( \"position\", \"absolute\" );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_setPositionRelative: function() {\n\t\tif ( !( /^(?:r|a|f)/ ).test( this.element.css( \"position\" ) ) ) {\n\t\t\tthis.element[ 0 ].style.position = \"relative\";\n\t\t}\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( Array.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_isRootNode: function( element ) {\n\t\treturn ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset(),\n\t\t\tdocument = this.document[ 0 ];\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== document &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif ( this._isRootNode( this.offsetParent[ 0 ] ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\t\tif ( this.cssPosition !== \"relative\" ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\tvar p = this.element.position(),\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),\n\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )\n\t\t};\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.element.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.element.css( \"marginTop\" ), 10 ) || 0 ),\n\t\t\tright: ( parseInt( this.element.css( \"marginRight\" ), 10 ) || 0 ),\n\t\t\tbottom: ( parseInt( this.element.css( \"marginBottom\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar isUserScrollable, c, ce,\n\t\t\to = this.options,\n\t\t\tdocument = this.document[ 0 ];\n\n\t\tthis.relativeContainer = null;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() +\n\t\t\t\t\t( $( window ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUserScrollable = /(scroll|auto)/.test( c.css( \"overflow\" ) );\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ),\n\t\t\t( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.width -\n\t\t\t\tthis.margins.left -\n\t\t\t\tthis.margins.right,\n\t\t\t( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.height -\n\t\t\t\tthis.margins.top -\n\t\t\t\tthis.margins.bottom\n\t\t];\n\t\tthis.relativeContainer = c;\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event, constrainPosition ) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t// Cache the scroll\n\t\tif ( !scrollIsRootNode || !this.offset.scroll ) {\n\t\t\tthis.offset.scroll = {\n\t\t\t\ttop: this.scrollParent.scrollTop(),\n\t\t\t\tleft: this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( constrainPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relativeContainer ) {\n\t\t\t\t\tco = this.relativeContainer.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif ( event.pageX - this.offset.click.left < containment[ 0 ] ) {\n\t\t\t\t\tpageX = containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < containment[ 1 ] ) {\n\t\t\t\t\tpageY = containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > containment[ 2 ] ) {\n\t\t\t\t\tpageX = containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > containment[ 3 ] ) {\n\t\t\t\t\tpageY = containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid\n\t\t\t\t// argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -\n\t\t\t\t\tthis.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;\n\t\t\t\tpageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||\n\t\t\t\t\ttop - this.offset.click.top > containment[ 3 ] ) ?\n\t\t\t\t\t\ttop :\n\t\t\t\t\t\t( ( top - this.offset.click.top >= containment[ 1 ] ) ?\n\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;\n\n\t\t\t\tleft = o.grid[ 0 ] ? this.originalPageX +\n\t\t\t\t\tMath.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :\n\t\t\t\t\tthis.originalPageX;\n\t\t\t\tpageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||\n\t\t\t\t\tleft - this.offset.click.left > containment[ 2 ] ) ?\n\t\t\t\t\t\tleft :\n\t\t\t\t\t\t( ( left - this.offset.click.left >= containment[ 0 ] ) ?\n\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"y\" ) {\n\t\t\t\tpageX = this.originalPageX;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"x\" ) {\n\t\t\t\tpageY = this.originalPageY;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis._removeClass( this.helper, \"ui-draggable-dragging\" );\n\t\tif ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t\tif ( this.destroyOnClear ) {\n\t\t\tthis.destroy();\n\t\t}\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function( type, event, ui ) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call( this, type, [ event, ui, this ], true );\n\n\t\t// Absolute position and offset (see #6884 ) have to be recalculated after plugins\n\t\tif ( /^(drag|start|stop)/.test( type ) ) {\n\t\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\t\t\tui.offset = this.positionAbs;\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call( this, type, event, ui );\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n} );\n\n$.ui.plugin.add( \"draggable\", \"connectToSortable\", {\n\tstart: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.sortables = [];\n\t\t$( draggable.options.connectToSortable ).each( function() {\n\t\t\tvar sortable = $( this ).sortable( \"instance\" );\n\n\t\t\tif ( sortable && !sortable.options.disabled ) {\n\t\t\t\tdraggable.sortables.push( sortable );\n\n\t\t\t\t// RefreshPositions is called at drag start to refresh the containerCache\n\t\t\t\t// which is used in drag. This ensures it's initialized and synchronized\n\t\t\t\t// with any changes that might have happened on the page since initialization.\n\t\t\t\tsortable.refreshPositions();\n\t\t\t\tsortable._trigger( \"activate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tstop: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.cancelHelperRemoval = false;\n\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar sortable = this;\n\n\t\t\tif ( sortable.isOver ) {\n\t\t\t\tsortable.isOver = 0;\n\n\t\t\t\t// Allow this sortable to handle removing the helper\n\t\t\t\tdraggable.cancelHelperRemoval = true;\n\t\t\t\tsortable.cancelHelperRemoval = false;\n\n\t\t\t\t// Use _storedCSS To restore properties in the sortable,\n\t\t\t\t// as this also handles revert (#9675) since the draggable\n\t\t\t\t// may have modified them in unexpected ways (#8809)\n\t\t\t\tsortable._storedCSS = {\n\t\t\t\t\tposition: sortable.placeholder.css( \"position\" ),\n\t\t\t\t\ttop: sortable.placeholder.css( \"top\" ),\n\t\t\t\t\tleft: sortable.placeholder.css( \"left\" )\n\t\t\t\t};\n\n\t\t\t\tsortable._mouseStop( event );\n\n\t\t\t\t// Once drag has ended, the sortable should return to using\n\t\t\t\t// its original helper, not the shared helper from draggable\n\t\t\t\tsortable.options.helper = sortable.options._helper;\n\t\t\t} else {\n\n\t\t\t\t// Prevent this Sortable from removing the helper.\n\t\t\t\t// However, don't set the draggable to remove the helper\n\t\t\t\t// either as another connected Sortable may yet handle the removal.\n\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\tsortable._trigger( \"deactivate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( event, ui, draggable ) {\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tsortable = this;\n\n\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\tsortable.positionAbs = draggable.positionAbs;\n\t\t\tsortable.helperProportions = draggable.helperProportions;\n\t\t\tsortable.offset.click = draggable.offset.click;\n\n\t\t\tif ( sortable._intersectsWith( sortable.containerCache ) ) {\n\t\t\t\tinnermostIntersecting = true;\n\n\t\t\t\t$.each( draggable.sortables, function() {\n\n\t\t\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\t\t\tthis.positionAbs = draggable.positionAbs;\n\t\t\t\t\tthis.helperProportions = draggable.helperProportions;\n\t\t\t\t\tthis.offset.click = draggable.offset.click;\n\n\t\t\t\t\tif ( this !== sortable &&\n\t\t\t\t\t\t\tthis._intersectsWith( this.containerCache ) &&\n\t\t\t\t\t\t\t$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( innermostIntersecting ) {\n\n\t\t\t\t// If it intersects, we use a little isOver variable and set it once,\n\t\t\t\t// so that the move-in stuff gets fired only once.\n\t\t\t\tif ( !sortable.isOver ) {\n\t\t\t\t\tsortable.isOver = 1;\n\n\t\t\t\t\t// Store draggable's parent in case we need to reappend to it later.\n\t\t\t\t\tdraggable._parent = ui.helper.parent();\n\n\t\t\t\t\tsortable.currentItem = ui.helper\n\t\t\t\t\t\t.appendTo( sortable.element )\n\t\t\t\t\t\t.data( \"ui-sortable-item\", true );\n\n\t\t\t\t\t// Store helper option to later restore it\n\t\t\t\t\tsortable.options._helper = sortable.options.helper;\n\n\t\t\t\t\tsortable.options.helper = function() {\n\t\t\t\t\t\treturn ui.helper[ 0 ];\n\t\t\t\t\t};\n\n\t\t\t\t\t// Fire the start events of the sortable with our passed browser event,\n\t\t\t\t\t// and our own helper (so it doesn't create a new one)\n\t\t\t\t\tevent.target = sortable.currentItem[ 0 ];\n\t\t\t\t\tsortable._mouseCapture( event, true );\n\t\t\t\t\tsortable._mouseStart( event, true, true );\n\n\t\t\t\t\t// Because the browser event is way off the new appended portlet,\n\t\t\t\t\t// modify necessary variables to reflect the changes\n\t\t\t\t\tsortable.offset.click.top = draggable.offset.click.top;\n\t\t\t\t\tsortable.offset.click.left = draggable.offset.click.left;\n\t\t\t\t\tsortable.offset.parent.left -= draggable.offset.parent.left -\n\t\t\t\t\t\tsortable.offset.parent.left;\n\t\t\t\t\tsortable.offset.parent.top -= draggable.offset.parent.top -\n\t\t\t\t\t\tsortable.offset.parent.top;\n\n\t\t\t\t\tdraggable._trigger( \"toSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is in a valid drop zone,\n\t\t\t\t\t// used solely in the revert option to handle \"valid/invalid\".\n\t\t\t\t\tdraggable.dropped = sortable.element;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables in the case that\n\t\t\t\t\t// adding to one sortable changes the location of the other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Hack so receive/update callbacks work (mostly)\n\t\t\t\t\tdraggable.currentItem = draggable.element;\n\t\t\t\t\tsortable.fromOutside = draggable;\n\t\t\t\t}\n\n\t\t\t\tif ( sortable.currentItem ) {\n\t\t\t\t\tsortable._mouseDrag( event );\n\n\t\t\t\t\t// Copy the sortable's position because the draggable's can potentially reflect\n\t\t\t\t\t// a relative position, while sortable is always absolute, which the dragged\n\t\t\t\t\t// element has now become. (#8809)\n\t\t\t\t\tui.position = sortable.position;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t// we fake the drag stop of the sortable, but make sure it doesn't remove\n\t\t\t\t// the helper by using cancelHelperRemoval.\n\t\t\t\tif ( sortable.isOver ) {\n\n\t\t\t\t\tsortable.isOver = 0;\n\t\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\t\t// Calling sortable's mouseStop would trigger a revert,\n\t\t\t\t\t// so revert must be temporarily false until after mouseStop is called.\n\t\t\t\t\tsortable.options._revert = sortable.options.revert;\n\t\t\t\t\tsortable.options.revert = false;\n\n\t\t\t\t\tsortable._trigger( \"out\", event, sortable._uiHash( sortable ) );\n\t\t\t\t\tsortable._mouseStop( event, true );\n\n\t\t\t\t\t// Restore sortable behaviors that were modfied\n\t\t\t\t\t// when the draggable entered the sortable area (#9481)\n\t\t\t\t\tsortable.options.revert = sortable.options._revert;\n\t\t\t\t\tsortable.options.helper = sortable.options._helper;\n\n\t\t\t\t\tif ( sortable.placeholder ) {\n\t\t\t\t\t\tsortable.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore and recalculate the draggable's offset considering the sortable\n\t\t\t\t\t// may have modified them in unexpected ways. (#8809, #10669)\n\t\t\t\t\tui.helper.appendTo( draggable._parent );\n\t\t\t\t\tdraggable._refreshOffsets( event );\n\t\t\t\t\tui.position = draggable._generatePosition( event, true );\n\n\t\t\t\t\tdraggable._trigger( \"fromSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is no longer in a valid drop zone\n\t\t\t\t\tdraggable.dropped = false;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables just in case removing\n\t\t\t\t\t// from one sortable changes the location of other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"cursor\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( \"body\" ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"cursor\" ) ) {\n\t\t\to._cursor = t.css( \"cursor\" );\n\t\t}\n\t\tt.css( \"cursor\", o.cursor );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._cursor ) {\n\t\t\t$( \"body\" ).css( \"cursor\", o._cursor );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"opacity\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\t\tif ( t.css( \"opacity\" ) ) {\n\t\t\to._opacity = t.css( \"opacity\" );\n\t\t}\n\t\tt.css( \"opacity\", o.opacity );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._opacity ) {\n\t\t\t$( ui.helper ).css( \"opacity\", o._opacity );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"scroll\", {\n\tstart: function( event, ui, i ) {\n\t\tif ( !i.scrollParentNotHidden ) {\n\t\t\ti.scrollParentNotHidden = i.helper.scrollParent( false );\n\t\t}\n\n\t\tif ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&\n\t\t\t\ti.scrollParentNotHidden[ 0 ].tagName !== \"HTML\" ) {\n\t\t\ti.overflowOffset = i.scrollParentNotHidden.offset();\n\t\t}\n\t},\n\tdrag: function( event, ui, i  ) {\n\n\t\tvar o = i.options,\n\t\t\tscrolled = false,\n\t\t\tscrollParent = i.scrollParentNotHidden[ 0 ],\n\t\t\tdocument = i.document[ 0 ];\n\n\t\tif ( scrollParent !== document && scrollParent.tagName !== \"HTML\" ) {\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );\n\t\t\t\t} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() - o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() + o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( i, event );\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"snap\", {\n\tstart: function( event, ui, i ) {\n\n\t\tvar o = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$( o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap )\n\t\t\t.each( function() {\n\t\t\t\tvar $t = $( this ),\n\t\t\t\t\t$o = $t.offset();\n\t\t\t\tif ( this !== i.element[ 0 ] ) {\n\t\t\t\t\ti.snapElements.push( {\n\t\t\t\t\t\titem: this,\n\t\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t},\n\tdrag: function( event, ui, inst ) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor ( i = inst.snapElements.length - 1; i >= 0; i-- ) {\n\n\t\t\tl = inst.snapElements[ i ].left - inst.margins.left;\n\t\t\tr = l + inst.snapElements[ i ].width;\n\t\t\tt = inst.snapElements[ i ].top - inst.margins.top;\n\t\t\tb = t + inst.snapElements[ i ].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||\n\t\t\t\t\t!$.contains( inst.snapElements[ i ].item.ownerDocument,\n\t\t\t\t\tinst.snapElements[ i ].item ) ) {\n\t\t\t\tif ( inst.snapElements[ i ].snapping ) {\n\t\t\t\t\tif ( inst.options.snap.release ) {\n\t\t\t\t\t\tinst.options.snap.release.call(\n\t\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinst.snapElements[ i ].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( o.snapMode !== \"inner\" ) {\n\t\t\t\tts = Math.abs( t - y2 ) <= d;\n\t\t\t\tbs = Math.abs( b - y1 ) <= d;\n\t\t\t\tls = Math.abs( l - x2 ) <= d;\n\t\t\t\trs = Math.abs( r - x1 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = ( ts || bs || ls || rs );\n\n\t\t\tif ( o.snapMode !== \"outer\" ) {\n\t\t\t\tts = Math.abs( t - y1 ) <= d;\n\t\t\t\tbs = Math.abs( b - y2 ) <= d;\n\t\t\t\tls = Math.abs( l - x1 ) <= d;\n\t\t\t\trs = Math.abs( r - x2 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {\n\t\t\t\tif ( inst.options.snap.snap ) {\n\t\t\t\t\tinst.options.snap.snap.call(\n\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\t$.extend( inst._uiHash(), {\n\t\t\t\t\t\t\tsnapItem: inst.snapElements[ i ].item\n\t\t\t\t\t\t} ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tinst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );\n\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"stack\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar min,\n\t\t\to = instance.options,\n\t\t\tgroup = $.makeArray( $( o.stack ) ).sort( function( a, b ) {\n\t\t\t\treturn ( parseInt( $( a ).css( \"zIndex\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( b ).css( \"zIndex\" ), 10 ) || 0 );\n\t\t\t} );\n\n\t\tif ( !group.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmin = parseInt( $( group[ 0 ] ).css( \"zIndex\" ), 10 ) || 0;\n\t\t$( group ).each( function( i ) {\n\t\t\t$( this ).css( \"zIndex\", min + i );\n\t\t} );\n\t\tthis.css( \"zIndex\", ( min + group.length ) );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"zIndex\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"zIndex\" ) ) {\n\t\t\to._zIndex = t.css( \"zIndex\" );\n\t\t}\n\t\tt.css( \"zIndex\", o.zIndex );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\n\t\tif ( o._zIndex ) {\n\t\t\t$( ui.helper ).css( \"zIndex\", o._zIndex );\n\t\t}\n\t}\n} );\n\nreturn $.ui.draggable;\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/draggable.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/droppable.js":
/*!********************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/droppable.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Droppable 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Droppable\n//>>group: Interactions\n//>>description: Enables drop targets for draggable elements.\n//>>docs: https://api.jqueryui.com/droppable/\n//>>demos: https://jqueryui.com/droppable/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ./draggable */ \"./node_modules/jquery-ui/ui/widgets/draggable.js\"),\n\t\t\t__webpack_require__(/*! ./mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.droppable\", {\n\tversion: \"1.14.1\",\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: \"*\",\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tdeactivate: null,\n\t\tdrop: null,\n\t\tout: null,\n\t\tover: null\n\t},\n\t_create: function() {\n\n\t\tvar proportions,\n\t\t\to = this.options,\n\t\t\taccept = o.accept;\n\n\t\tthis.isover = false;\n\t\tthis.isout = true;\n\n\t\tthis.accept = typeof accept === \"function\" ? accept : function( d ) {\n\t\t\treturn d.is( accept );\n\t\t};\n\n\t\tthis.proportions = function( /* valueToWrite */ ) {\n\t\t\tif ( arguments.length ) {\n\n\t\t\t\t// Store the droppable's proportions\n\t\t\t\tproportions = arguments[ 0 ];\n\t\t\t} else {\n\n\t\t\t\t// Retrieve or derive the droppable's proportions\n\t\t\t\treturn proportions ?\n\t\t\t\t\tproportions :\n\t\t\t\t\tproportions = {\n\t\t\t\t\t\twidth: this.element[ 0 ].offsetWidth,\n\t\t\t\t\t\theight: this.element[ 0 ].offsetHeight\n\t\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tthis._addToManager( o.scope );\n\n\t\tif ( o.addClasses ) {\n\t\t\tthis._addClass( \"ui-droppable\" );\n\t\t}\n\n\t},\n\n\t_addToManager: function( scope ) {\n\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];\n\t\t$.ui.ddmanager.droppables[ scope ].push( this );\n\t},\n\n\t_splice: function( drop ) {\n\t\tvar i = 0;\n\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\tif ( drop[ i ] === this ) {\n\t\t\t\tdrop.splice( i, 1 );\n\t\t\t}\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\tthis._splice( drop );\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\tif ( key === \"accept\" ) {\n\t\t\tthis.accept = typeof value === \"function\" ? value : function( d ) {\n\t\t\t\treturn d.is( value );\n\t\t\t};\n\t\t} else if ( key === \"scope\" ) {\n\t\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\t\tthis._splice( drop );\n\t\t\tthis._addToManager( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_activate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\tthis._addActiveClass();\n\t\tif ( draggable ) {\n\t\t\tthis._trigger( \"activate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_deactivate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\tthis._removeActiveClass();\n\t\tif ( draggable ) {\n\t\t\tthis._trigger( \"deactivate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_over: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||\n\t\t\t\tdraggable.element ) ) ) {\n\t\t\tthis._addHoverClass();\n\t\t\tthis._trigger( \"over\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_out: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||\n\t\t\t\tdraggable.element ) ) ) {\n\t\t\tthis._removeHoverClass();\n\t\t\tthis._trigger( \"out\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_drop: function( event, custom ) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\tchildrenIntersection = false;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.element\n\t\t\t.find( \":data(ui-droppable)\" )\n\t\t\t.not( \".ui-draggable-dragging\" )\n\t\t\t.each( function() {\n\t\t\t\tvar inst = $( this ).droppable( \"instance\" );\n\t\t\t\tif (\n\t\t\t\t\tinst.options.greedy &&\n\t\t\t\t\t!inst.options.disabled &&\n\t\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\t\tinst.accept.call(\n\t\t\t\t\t\tinst.element[ 0 ], ( draggable.currentItem || draggable.element )\n\t\t\t\t\t) &&\n\t\t\t\t\t$.ui.intersect(\n\t\t\t\t\t\tdraggable,\n\t\t\t\t\t\t$.extend( inst, { offset: inst.element.offset() } ),\n\t\t\t\t\t\tinst.options.tolerance, event\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tchildrenIntersection = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\tif ( childrenIntersection ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ],\n\t\t\t\t( draggable.currentItem || draggable.element ) ) ) {\n\t\t\tthis._removeActiveClass();\n\t\t\tthis._removeHoverClass();\n\n\t\t\tthis._trigger( \"drop\", event, this.ui( draggable ) );\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function( c ) {\n\t\treturn {\n\t\t\tdraggable: ( c.currentItem || c.element ),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t},\n\n\t// Extension points just to make backcompat sane and avoid duplicating logic\n\t// TODO: Remove in 1.14 along with call to it below\n\t_addHoverClass: function() {\n\t\tthis._addClass( \"ui-droppable-hover\" );\n\t},\n\n\t_removeHoverClass: function() {\n\t\tthis._removeClass( \"ui-droppable-hover\" );\n\t},\n\n\t_addActiveClass: function() {\n\t\tthis._addClass( \"ui-droppable-active\" );\n\t},\n\n\t_removeActiveClass: function() {\n\t\tthis._removeClass( \"ui-droppable-active\" );\n\t}\n} );\n\n$.ui.intersect = ( function() {\n\tfunction isOverAxis( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t}\n\n\treturn function( draggable, droppable, toleranceMode, event ) {\n\n\t\tif ( !droppable.offset ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar x1 = ( draggable.positionAbs ||\n\t\t\t\tdraggable.position.absolute ).left + draggable.margins.left,\n\t\t\ty1 = ( draggable.positionAbs ||\n\t\t\t\tdraggable.position.absolute ).top + draggable.margins.top,\n\t\t\tx2 = x1 + draggable.helperProportions.width,\n\t\t\ty2 = y1 + draggable.helperProportions.height,\n\t\t\tl = droppable.offset.left,\n\t\t\tt = droppable.offset.top,\n\t\t\tr = l + droppable.proportions().width,\n\t\t\tb = t + droppable.proportions().height;\n\n\t\tswitch ( toleranceMode ) {\n\t\tcase \"fit\":\n\t\t\treturn ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );\n\t\tcase \"intersect\":\n\t\t\treturn ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half\n\t\tcase \"pointer\":\n\t\t\treturn isOverAxis( event.pageY, t, droppable.proportions().height ) &&\n\t\t\t\tisOverAxis( event.pageX, l, droppable.proportions().width );\n\t\tcase \"touch\":\n\t\t\treturn (\n\t\t\t\t( y1 >= t && y1 <= b ) || // Top edge touching\n\t\t\t\t( y2 >= t && y2 <= b ) || // Bottom edge touching\n\t\t\t\t( y1 < t && y2 > b ) // Surrounded vertically\n\t\t\t) && (\n\t\t\t\t( x1 >= l && x1 <= r ) || // Left edge touching\n\t\t\t\t( x2 >= l && x2 <= r ) || // Right edge touching\n\t\t\t\t( x1 < l && x2 > r ) // Surrounded horizontally\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t};\n} )();\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { \"default\": [] },\n\tprepareOffsets: function( t, event ) {\n\n\t\tvar i, j,\n\t\t\tm = $.ui.ddmanager.droppables[ t.options.scope ] || [],\n\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\tlist = ( t.currentItem || t.element ).find( \":data(ui-droppable)\" ).addBack();\n\n\t\tdroppablesLoop: for ( i = 0; i < m.length; i++ ) {\n\n\t\t\t// No disabled and non-accepted\n\t\t\tif ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],\n\t\t\t\t\t( t.currentItem || t.element ) ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Filter out elements in the current dragged item\n\t\t\tfor ( j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === m[ i ].element[ 0 ] ) {\n\t\t\t\t\tm[ i ].proportions().height = 0;\n\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tm[ i ].visible = m[ i ].element.css( \"display\" ) !== \"none\";\n\t\t\tif ( !m[ i ].visible ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Activate the droppable if used directly from draggables\n\t\t\tif ( type === \"mousedown\" ) {\n\t\t\t\tm[ i ]._activate.call( m[ i ], event );\n\t\t\t}\n\n\t\t\tm[ i ].offset = m[ i ].element.offset();\n\t\t\tm[ i ].proportions( {\n\t\t\t\twidth: m[ i ].element[ 0 ].offsetWidth,\n\t\t\t\theight: m[ i ].element[ 0 ].offsetHeight\n\t\t\t} );\n\n\t\t}\n\n\t},\n\tdrop: function( draggable, event ) {\n\n\t\tvar dropped = false;\n\n\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {\n\n\t\t\tif ( !this.options ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.options.disabled && this.visible &&\n\t\t\t\t\t$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {\n\t\t\t\tdropped = this._drop.call( this, event ) || dropped;\n\t\t\t}\n\n\t\t\tif ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],\n\t\t\t\t\t( draggable.currentItem || draggable.element ) ) ) {\n\t\t\t\tthis.isout = true;\n\t\t\t\tthis.isover = false;\n\t\t\t\tthis._deactivate.call( this, event );\n\t\t\t}\n\n\t\t} );\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\n\t\t// Listen for scrolling so that if the dragging causes scrolling the position of the\n\t\t// droppables can be recalculated (see #5003)\n\t\tdraggable.element.parentsUntil( \"body\" ).on( \"scroll.droppable\", function() {\n\t\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( draggable, event ) {\n\n\t\t// If you have a highly dynamic page, you might try this option. It renders positions\n\t\t// every time you move the mouse.\n\t\tif ( draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\n\t\t// Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {\n\n\t\t\tif ( this.options.disabled || this.greedyChild || !this.visible ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar parentInstance, scope, parent,\n\t\t\t\tintersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),\n\t\t\t\tc = !intersects && this.isover ?\n\t\t\t\t\t\"isout\" :\n\t\t\t\t\t( intersects && !this.isover ? \"isover\" : null );\n\t\t\tif ( !c ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.options.greedy ) {\n\n\t\t\t\t// find droppable parents with same scope\n\t\t\t\tscope = this.options.scope;\n\t\t\t\tparent = this.element.parents( \":data(ui-droppable)\" ).filter( function() {\n\t\t\t\t\treturn $( this ).droppable( \"instance\" ).options.scope === scope;\n\t\t\t\t} );\n\n\t\t\t\tif ( parent.length ) {\n\t\t\t\t\tparentInstance = $( parent[ 0 ] ).droppable( \"instance\" );\n\t\t\t\t\tparentInstance.greedyChild = ( c === \"isover\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We just moved into a greedy child\n\t\t\tif ( parentInstance && c === \"isover\" ) {\n\t\t\t\tparentInstance.isover = false;\n\t\t\t\tparentInstance.isout = true;\n\t\t\t\tparentInstance._out.call( parentInstance, event );\n\t\t\t}\n\n\t\t\tthis[ c ] = true;\n\t\t\tthis[ c === \"isout\" ? \"isover\" : \"isout\" ] = false;\n\t\t\tthis[ c === \"isover\" ? \"_over\" : \"_out\" ].call( this, event );\n\n\t\t\t// We just moved out of a greedy child\n\t\t\tif ( parentInstance && c === \"isout\" ) {\n\t\t\t\tparentInstance.isout = false;\n\t\t\t\tparentInstance.isover = true;\n\t\t\t\tparentInstance._over.call( parentInstance, event );\n\t\t\t}\n\t\t} );\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parentsUntil( \"body\" ).off( \"scroll.droppable\" );\n\n\t\t// Call prepareOffsets one final time since IE does not fire return scroll events when\n\t\t// overflow was caused by drag (see #5003)\n\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\t}\n};\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat === true ) {\n\n\t// Backcompat for activeClass and hoverClass options\n\t$.widget( \"ui.droppable\", $.ui.droppable, {\n\t\toptions: {\n\t\t\thoverClass: false,\n\t\t\tactiveClass: false\n\t\t},\n\t\t_addActiveClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.activeClass ) {\n\t\t\t\tthis.element.addClass( this.options.activeClass );\n\t\t\t}\n\t\t},\n\t\t_removeActiveClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.activeClass ) {\n\t\t\t\tthis.element.removeClass( this.options.activeClass );\n\t\t\t}\n\t\t},\n\t\t_addHoverClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.addClass( this.options.hoverClass );\n\t\t\t}\n\t\t},\n\t\t_removeHoverClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.removeClass( this.options.hoverClass );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nreturn $.ui.droppable;\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/droppable.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/mouse.js":
/*!****************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/mouse.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Mouse 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Mouse\n//>>group: Widgets\n//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.\n//>>docs: https://api.jqueryui.com/mouse/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nvar mouseHandled = false;\n$( document ).on( \"mouseup\", function() {\n\tmouseHandled = false;\n} );\n\nreturn $.widget( \"ui.mouse\", {\n\tversion: \"1.14.1\",\n\toptions: {\n\t\tcancel: \"input, textarea, button, select, option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.on( \"mousedown.\" + this.widgetName, function( event ) {\n\t\t\t\treturn that._mouseDown( event );\n\t\t\t} )\n\t\t\t.on( \"click.\" + this.widgetName, function( event ) {\n\t\t\t\tif ( true === $.data( event.target, that.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t\t\t$.removeData( event.target, that.widgetName + \".preventClickEvent\" );\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.off( \".\" + this.widgetName );\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\tthis.document\n\t\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\t\t}\n\t},\n\n\t_mouseDown: function( event ) {\n\n\t\t// don't let more than one widget handle mouseStart\n\t\tif ( mouseHandled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoved = false;\n\n\t\t// We may have missed mouseup (out of window)\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseUp( event );\n\t\t}\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = event.which === 1,\n\t\t\telIsCancel = typeof this.options.cancel === \"string\" ?\n\t\t\t\t$( event.target ).closest( this.options.cancel ).length :\n\t\t\t\tfalse;\n\t\tif ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif ( !this.mouseDelayMet ) {\n\t\t\tthis._mouseDelayTimer = setTimeout( function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay );\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted = ( this._mouseStart( event ) !== false );\n\t\t\tif ( !this._mouseStarted ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif ( true === $.data( event.target, this.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t$.removeData( event.target, this.widgetName + \".preventClickEvent\" );\n\t\t}\n\n\t\t// These delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function( event ) {\n\t\t\treturn that._mouseMove( event );\n\t\t};\n\t\tthis._mouseUpDelegate = function( event ) {\n\t\t\treturn that._mouseUp( event );\n\t\t};\n\n\t\tthis.document\n\t\t\t.on( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.on( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function( event ) {\n\n\t\t// Only check for mouseups outside the document if you've moved inside the document\n\t\t// at least once.\n\t\tif ( this._mouseMoved && !event.which ) {\n\n\t\t\t// Support: Safari <=8 - 9\n\t\t\t// Safari sets which to 0 if you press any of the following keys\n\t\t\t// during a drag (#14461)\n\t\t\tif ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||\n\t\t\t\t\tevent.originalEvent.metaKey || event.originalEvent.shiftKey ) {\n\t\t\t\tthis.ignoreMissingWhich = true;\n\t\t\t} else if ( !this.ignoreMissingWhich ) {\n\t\t\t\treturn this._mouseUp( event );\n\t\t\t}\n\t\t}\n\n\t\tif ( event.which || event.button ) {\n\t\t\tthis._mouseMoved = true;\n\t\t}\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseDrag( event );\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t( this._mouseStart( this._mouseDownEvent, event ) !== false );\n\t\t\tif ( this._mouseStarted ) {\n\t\t\t\tthis._mouseDrag( event );\n\t\t\t} else {\n\t\t\t\tthis._mouseUp( event );\n\t\t\t}\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis.document\n\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif ( event.target === this._mouseDownEvent.target ) {\n\t\t\t\t$.data( event.target, this.widgetName + \".preventClickEvent\", true );\n\t\t\t}\n\n\t\t\tthis._mouseStop( event );\n\t\t}\n\n\t\tif ( this._mouseDelayTimer ) {\n\t\t\tclearTimeout( this._mouseDelayTimer );\n\t\t\tdelete this._mouseDelayTimer;\n\t\t}\n\n\t\tthis.ignoreMissingWhich = false;\n\t\tmouseHandled = false;\n\t\tevent.preventDefault();\n\t},\n\n\t_mouseDistanceMet: function( event ) {\n\t\treturn ( Math.max(\n\t\t\t\tMath.abs( this._mouseDownEvent.pageX - event.pageX ),\n\t\t\t\tMath.abs( this._mouseDownEvent.pageY - event.pageY )\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function( /* event */ ) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function( /* event */ ) {},\n\t_mouseDrag: function( /* event */ ) {},\n\t_mouseStop: function( /* event */ ) {},\n\t_mouseCapture: function( /* event */ ) {\n\t\treturn true;\n\t}\n} );\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/mouse.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/resizable.js":
/*!********************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/resizable.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Resizable 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Resizable\n//>>group: Interactions\n//>>description: Enables resize functionality for any element.\n//>>docs: https://api.jqueryui.com/resizable/\n//>>demos: https://jqueryui.com/resizable/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/resizable.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ./mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\"),\n\t\t\t__webpack_require__(/*! ../disable-selection */ \"./node_modules/jquery-ui/ui/disable-selection.js\"),\n\t\t\t__webpack_require__(/*! ../plugin */ \"./node_modules/jquery-ui/ui/plugin.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.14.1\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tclasses: {\n\t\t\t\"ui-resizable-se\": \"ui-icon ui-icon-gripsmall-diagonal-se\"\n\t\t},\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// Callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_num: function( value ) {\n\t\treturn parseFloat( value ) || 0;\n\t},\n\n\t_isNumber: function( value ) {\n\t\treturn !isNaN( parseFloat( value ) );\n\t},\n\n\t_hasScroll: function( el, a ) {\n\n\t\tvar scroll,\n\t\t\thas = false,\n\t\t\toverflow = $( el ).css( \"overflow\" );\n\n\t\tif ( overflow === \"hidden\" ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( overflow === \"scroll\" ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tscroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\";\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\ttry {\n\t\t\tel[ scroll ] = 1;\n\t\t\thas = ( el[ scroll ] > 0 );\n\t\t\tel[ scroll ] = 0;\n\t\t} catch ( e ) {\n\n\t\t\t// `el` might be a string, then setting `scroll` will throw\n\t\t\t// an error in strict mode; ignore it.\n\t\t}\n\t\treturn has;\n\t},\n\n\t_create: function() {\n\n\t\tvar margins,\n\t\t\to = this.options,\n\t\t\tthat = this;\n\t\tthis._addClass( \"ui-resizable\" );\n\n\t\t$.extend( this, {\n\t\t\t_aspectRatio: !!( o.aspectRatio ),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t} );\n\n\t\t// Wrap the element if it cannot hold child nodes\n\t\tif ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {\n\n\t\t\tthis.element.wrap(\n\t\t\t\t$( \"<div class='ui-wrapper'></div>\" ).css( {\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\tposition: this.element.css( \"position\" ),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css( \"top\" ),\n\t\t\t\t\tleft: this.element.css( \"left\" )\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.resizable( \"instance\" )\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\tmargins = {\n\t\t\t\tmarginTop: this.originalElement.css( \"marginTop\" ),\n\t\t\t\tmarginRight: this.originalElement.css( \"marginRight\" ),\n\t\t\t\tmarginBottom: this.originalElement.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: this.originalElement.css( \"marginLeft\" )\n\t\t\t};\n\n\t\t\tthis.element.css( margins );\n\n\t\t\t// Support: Safari\n\t\t\t// Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css( \"resize\" );\n\t\t\tthis.originalElement.css( \"resize\", \"none\" );\n\n\t\t\tthis._proportionallyResizeElements.push( this.originalElement.css( {\n\t\t\t\tposition: \"static\",\n\t\t\t\tzoom: 1,\n\t\t\t\tdisplay: \"block\"\n\t\t\t} ) );\n\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tthis._setupHandles();\n\n\t\tif ( o.autoHide ) {\n\t\t\t$( this.element )\n\t\t\t\t.on( \"mouseenter\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthat._removeClass( \"ui-resizable-autohide\" );\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t} )\n\t\t\t\t.on( \"mouseleave\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !that.resizing ) {\n\t\t\t\t\t\tthat._addClass( \"ui-resizable-autohide\" );\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\n\t\tthis._mouseInit();\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\t\tthis._addedHandles.remove();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function( exp ) {\n\t\t\t\t$( exp )\n\t\t\t\t\t.removeData( \"resizable\" )\n\t\t\t\t\t.removeData( \"ui-resizable\" )\n\t\t\t\t\t.off( \".resizable\" );\n\t\t\t};\n\n\t\t// TODO: Unwrap at same DOM position\n\t\tif ( this.elementIsWrapper ) {\n\t\t\t_destroy( this.element );\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css( {\n\t\t\t\tposition: wrapper.css( \"position\" ),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css( \"top\" ),\n\t\t\t\tleft: wrapper.css( \"left\" )\n\t\t\t} ).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css( \"resize\", this.originalResizeStyle );\n\t\t_destroy( this.originalElement );\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\tcase \"handles\":\n\t\t\tthis._removeHandles();\n\t\t\tthis._setupHandles();\n\t\t\tbreak;\n\t\tcase \"aspectRatio\":\n\t\t\tthis._aspectRatio = !!value;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setupHandles: function() {\n\t\tvar o = this.options, handle, i, n, hname, axis, that = this;\n\t\tthis.handles = o.handles ||\n\t\t\t( !$( \".ui-resizable-handle\", this.element ).length ?\n\t\t\t\t\"e,s,se\" : {\n\t\t\t\t\tn: \".ui-resizable-n\",\n\t\t\t\t\te: \".ui-resizable-e\",\n\t\t\t\t\ts: \".ui-resizable-s\",\n\t\t\t\t\tw: \".ui-resizable-w\",\n\t\t\t\t\tse: \".ui-resizable-se\",\n\t\t\t\t\tsw: \".ui-resizable-sw\",\n\t\t\t\t\tne: \".ui-resizable-ne\",\n\t\t\t\t\tnw: \".ui-resizable-nw\"\n\t\t\t\t} );\n\n\t\tthis._handles = $();\n\t\tthis._addedHandles = $();\n\t\tif ( this.handles.constructor === String ) {\n\n\t\t\tif ( this.handles === \"all\" ) {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split( \",\" );\n\t\t\tthis.handles = {};\n\n\t\t\tfor ( i = 0; i < n.length; i++ ) {\n\n\t\t\t\thandle = String.prototype.trim.call( n[ i ] );\n\t\t\t\thname = \"ui-resizable-\" + handle;\n\t\t\t\taxis = $( \"<div>\" );\n\t\t\t\tthis._addClass( axis, \"ui-resizable-handle \" + hname );\n\n\t\t\t\taxis.css( { zIndex: o.zIndex } );\n\n\t\t\t\tthis.handles[ handle ] = \".ui-resizable-\" + handle;\n\t\t\t\tif ( !this.element.children( this.handles[ handle ] ).length ) {\n\t\t\t\t\tthis.element.append( axis );\n\t\t\t\t\tthis._addedHandles = this._addedHandles.add( axis );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function( target ) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor ( i in this.handles ) {\n\n\t\t\t\tif ( this.handles[ i ].constructor === String ) {\n\t\t\t\t\tthis.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();\n\t\t\t\t} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {\n\t\t\t\t\tthis.handles[ i ] = $( this.handles[ i ] );\n\t\t\t\t\tthis._on( this.handles[ i ], { \"mousedown\": that._mouseDown } );\n\t\t\t\t}\n\n\t\t\t\tif ( this.elementIsWrapper &&\n\t\t\t\t\t\tthis.originalElement[ 0 ]\n\t\t\t\t\t\t\t.nodeName\n\t\t\t\t\t\t\t.match( /^(textarea|input|select|button)$/i ) ) {\n\t\t\t\t\taxis = $( this.handles[ i ], this.element );\n\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test( i ) ?\n\t\t\t\t\t\taxis.outerHeight() :\n\t\t\t\t\t\taxis.outerWidth();\n\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test( i ) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test( i ) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test( i ) ? \"Right\" : \"Left\" ].join( \"\" );\n\n\t\t\t\t\ttarget.css( padPos, padWrapper );\n\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\n\t\t\t\tthis._handles = this._handles.add( this.handles[ i ] );\n\t\t\t}\n\t\t};\n\n\t\t// TODO: make renderAxis a prototype function\n\t\tthis._renderAxis( this.element );\n\n\t\tthis._handles = this._handles.add( this.element.find( \".ui-resizable-handle\" ) );\n\t\tthis._handles.disableSelection();\n\n\t\tthis._handles.on( \"mouseover\", function() {\n\t\t\tif ( !that.resizing ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\taxis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );\n\t\t\t\t}\n\t\t\t\tthat.axis = axis && axis[ 1 ] ? axis[ 1 ] : \"se\";\n\t\t\t}\n\t\t} );\n\n\t\tif ( o.autoHide ) {\n\t\t\tthis._handles.hide();\n\t\t\tthis._addClass( \"ui-resizable-autohide\" );\n\t\t}\n\t},\n\n\t_removeHandles: function() {\n\t\tthis._addedHandles.remove();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor ( i in this.handles ) {\n\t\t\thandle = $( this.handles[ i ] )[ 0 ];\n\t\t\tif ( handle === event.target || $.contains( handle, event.target ) ) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar curleft, curtop, cursor, calculatedSize,\n\t\t\to = this.options,\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = this._num( this.helper.css( \"left\" ) );\n\t\tcurtop = this._num( this.helper.css( \"top\" ) );\n\n\t\tif ( o.containment ) {\n\t\t\tcurleft += $( o.containment ).scrollLeft() || 0;\n\t\t\tcurtop += $( o.containment ).scrollTop() || 0;\n\t\t}\n\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\n\t\tif ( !this._helper ) {\n\t\t\tcalculatedSize = this._calculateAdjustedElementDimensions( el );\n\t\t}\n\n\t\tthis.size = this._helper ? {\n\t\t\t\twidth: this.helper.width(),\n\t\t\t\theight: this.helper.height()\n\t\t\t} : {\n\t\t\t\twidth: calculatedSize.width,\n\t\t\t\theight: calculatedSize.height\n\t\t\t};\n\n\t\tthis.originalSize = this._helper ? {\n\t\t\t\twidth: el.outerWidth(),\n\t\t\t\theight: el.outerHeight()\n\t\t\t} : {\n\t\t\t\twidth: calculatedSize.width,\n\t\t\t\theight: calculatedSize.height\n\t\t\t};\n\n\t\tthis.sizeDiff = {\n\t\t\twidth: el.outerWidth() - el.width(),\n\t\t\theight: el.outerHeight() - el.height()\n\t\t};\n\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\tthis.aspectRatio = ( typeof o.aspectRatio === \"number\" ) ?\n\t\t\to.aspectRatio :\n\t\t\t( ( this.originalSize.width / this.originalSize.height ) || 1 );\n\n\t\tcursor = $( \".ui-resizable-\" + this.axis ).css( \"cursor\" );\n\t\t$( \"body\" ).css( \"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor );\n\n\t\tthis._addClass( \"ui-resizable-resizing\" );\n\t\tthis._propagate( \"start\", event );\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tvar data, props,\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tdx = ( event.pageX - smp.left ) || 0,\n\t\t\tdy = ( event.pageY - smp.top ) || 0,\n\t\t\ttrigger = this._change[ a ];\n\n\t\tthis._updatePrevProperties();\n\n\t\tif ( !trigger ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdata = trigger.apply( this, [ event, dx, dy ] );\n\n\t\tthis._updateVirtualBoundaries( event.shiftKey );\n\t\tif ( this._aspectRatio || event.shiftKey ) {\n\t\t\tdata = this._updateRatio( data, event );\n\t\t}\n\n\t\tdata = this._respectSize( data, event );\n\n\t\tthis._updateCache( data );\n\n\t\tthis._propagate( \"resize\", event );\n\n\t\tprops = this._applyChanges();\n\n\t\tif ( !this._helper && this._proportionallyResizeElements.length ) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tif ( !$.isEmptyObject( props ) ) {\n\t\t\tthis._updatePrevProperties();\n\t\t\tthis._trigger( \"resize\", event, this.ui() );\n\t\t\tthis._applyChanges();\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif ( this._helper ) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );\n\t\t\tsoffseth = ista && this._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = {\n\t\t\t\twidth: ( that.helper.width()  - soffsetw ),\n\t\t\t\theight: ( that.helper.height() - soffseth )\n\t\t\t};\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null;\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\t\tif ( !o.animate ) {\n\t\t\t\tthis.element.css( $.extend( s, { top: top, left: left } ) );\n\t\t\t}\n\n\t\t\tthat.helper.height( that.size.height );\n\t\t\tthat.helper.width( that.size.width );\n\n\t\t\tif ( this._helper && !o.animate ) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$( \"body\" ).css( \"cursor\", \"auto\" );\n\n\t\tthis._removeClass( \"ui-resizable-resizing\" );\n\n\t\tthis._propagate( \"stop\", event );\n\n\t\tif ( this._helper ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updatePrevProperties: function() {\n\t\tthis.prevPosition = {\n\t\t\ttop: this.position.top,\n\t\t\tleft: this.position.left\n\t\t};\n\t\tthis.prevSize = {\n\t\t\twidth: this.size.width,\n\t\t\theight: this.size.height\n\t\t};\n\t},\n\n\t_applyChanges: function() {\n\t\tvar props = {};\n\n\t\tif ( this.position.top !== this.prevPosition.top ) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif ( this.position.left !== this.prevPosition.left ) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\n\t\tthis.helper.css( props );\n\n\t\tif ( this.size.width !== this.prevSize.width ) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t\tthis.helper.width( props.width );\n\t\t}\n\t\tif ( this.size.height !== this.prevSize.height ) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t\tthis.helper.height( props.height );\n\t\t}\n\n\t\treturn props;\n\t},\n\n\t_updateVirtualBoundaries: function( forceAspectRatio ) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,\n\t\t\tmaxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,\n\t\t\tminHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,\n\t\t\tmaxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif ( this._aspectRatio || forceAspectRatio ) {\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif ( pMinWidth > b.minWidth ) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif ( pMinHeight > b.minHeight ) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif ( pMaxWidth < b.maxWidth ) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif ( pMaxHeight < b.maxHeight ) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function( data ) {\n\t\tthis.offset = this.helper.offset();\n\t\tif ( this._isNumber( data.left ) ) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif ( this._isNumber( data.top ) ) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif ( this._isNumber( data.width ) ) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tdata.width = ( data.height * this.aspectRatio );\n\t\t} else if ( this._isNumber( data.width ) ) {\n\t\t\tdata.height = ( data.width / this.aspectRatio );\n\t\t}\n\n\t\tif ( a === \"sw\" ) {\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t\tdata.top = null;\n\t\t}\n\t\tif ( a === \"nw\" ) {\n\t\t\tdata.top = cpos.top + ( csize.height - data.height );\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),\n\t\t\tismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),\n\t\t\tisminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),\n\t\t\tisminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.originalPosition.top + this.originalSize.height,\n\t\t\tcw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );\n\t\tif ( isminw ) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif ( isminh ) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif ( ismaxw ) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif ( ismaxh ) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif ( isminw && cw ) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif ( ismaxw && cw ) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif ( isminh && ch ) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif ( ismaxh && ch ) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// Fixing jump error on top/left - bug #2330\n\t\tif ( !data.width && !data.height && !data.left && data.top ) {\n\t\t\tdata.top = null;\n\t\t} else if ( !data.width && !data.height && !data.top && data.left ) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_getPaddingPlusBorderDimensions: function( element ) {\n\t\tvar i = 0,\n\t\t\twidths = [],\n\t\t\tborders = [\n\t\t\t\telement.css( \"borderTopWidth\" ),\n\t\t\t\telement.css( \"borderRightWidth\" ),\n\t\t\t\telement.css( \"borderBottomWidth\" ),\n\t\t\t\telement.css( \"borderLeftWidth\" )\n\t\t\t],\n\t\t\tpaddings = [\n\t\t\t\telement.css( \"paddingTop\" ),\n\t\t\t\telement.css( \"paddingRight\" ),\n\t\t\t\telement.css( \"paddingBottom\" ),\n\t\t\t\telement.css( \"paddingLeft\" )\n\t\t\t];\n\n\t\tfor ( ; i < 4; i++ ) {\n\t\t\twidths[ i ] = ( parseFloat( borders[ i ] ) || 0 );\n\t\t\twidths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );\n\t\t}\n\n\t\treturn {\n\t\t\theight: widths[ 0 ] + widths[ 2 ],\n\t\t\twidth: widths[ 1 ] + widths[ 3 ]\n\t\t};\n\t},\n\n\t_calculateAdjustedElementDimensions: function( element ) {\n\t\tvar elWidth, elHeight, paddingBorder,\n\t\t\tce = element.get( 0 );\n\n\t\tif ( element.css( \"box-sizing\" ) !== \"content-box\" ||\n\t\t\t( !this._hasScroll( ce ) && !this._hasScroll( ce, \"left\" ) ) ) {\n\t\t\t\treturn {\n\t\t\t\t\theight: parseFloat( element.css( \"height\" ) ),\n\t\t\t\t\twidth: parseFloat( element.css( \"width\" ) )\n\t\t\t\t};\n\t\t}\n\n\t\t// Check if CSS inline styles are set and use those (usually from previous resizes)\n\t\telWidth = parseFloat( ce.style.width );\n\t\telHeight = parseFloat( ce.style.height );\n\n\t\tpaddingBorder = this._getPaddingPlusBorderDimensions( element );\n\t\telWidth = isNaN( elWidth ) ?\n\t\t\tthis._getElementTheoreticalSize( element, paddingBorder, \"width\" ) :\n\t\t\telWidth;\n\t\telHeight = isNaN( elHeight ) ?\n\t\t\tthis._getElementTheoreticalSize( element, paddingBorder, \"height\" ) :\n\t\t\telHeight;\n\n\t\treturn {\n\t\t\theight: elHeight,\n\t\t\twidth: elWidth\n\t\t};\n\t},\n\n\t_getElementTheoreticalSize: function( element, extraSize, dimension ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\tvar size = Math.max( 0, Math.ceil(\n\t\t\telement.get( 0 )[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\textraSize[ dimension ] -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine theoretical size.\n\t\t// Use an explicit zero to avoid NaN.\n\t\t// See https://github.com/jquery/jquery/issues/3964\n\t\t) ) || 0;\n\n\t\treturn size;\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif ( !this._proportionallyResizeElements.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar prel,\n\t\t\ti = 0,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( ; i < this._proportionallyResizeElements.length; i++ ) {\n\n\t\t\tprel = this._proportionallyResizeElements[ i ];\n\n\t\t\t// TODO: Seems like a bug to cache this.outerDimensions\n\t\t\t// considering that we are in a loop.\n\t\t\tif ( !this.outerDimensions ) {\n\t\t\t\tthis.outerDimensions = this._getPaddingPlusBorderDimensions( prel );\n\t\t\t}\n\n\t\t\tprel.css( {\n\t\t\t\theight: ( element.height() - this.outerDimensions.height ) || 0,\n\t\t\t\twidth: ( element.width() - this.outerDimensions.width ) || 0\n\t\t\t} );\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif ( this._helper ) {\n\n\t\t\tthis.helper = this.helper || $( \"<div></div>\" ).css( { overflow: \"hidden\" } );\n\n\t\t\tthis._addClass( this.helper, this._helper );\n\t\t\tthis.helper.css( {\n\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left + \"px\",\n\t\t\t\ttop: this.elementOffset.top + \"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t} );\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function( event, dx ) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function( event, dx ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function( event, dx, dy ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function( event, dx, dy ) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tsw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tne: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tnw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t}\n\t},\n\n\t_propagate: function( n, event ) {\n\t\t$.ui.plugin.call( this, n, [ event, this.ui() ] );\n\t\tif ( n !== \"resize\" ) {\n\t\t\tthis._trigger( n, event, this.ui() );\n\t\t}\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n} );\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add( \"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),\n\t\t\tsoffseth = ista && that._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = {\n\t\t\t\twidth: ( that.size.width - soffsetw ),\n\t\t\t\theight: ( that.size.height - soffseth )\n\t\t\t},\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null,\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend( style, top && left ? { top: top, left: left } : {} ), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseFloat( that.element.css( \"width\" ) ),\n\t\t\t\t\t\theight: parseFloat( that.element.css( \"height\" ) ),\n\t\t\t\t\t\ttop: parseFloat( that.element.css( \"top\" ) ),\n\t\t\t\t\t\tleft: parseFloat( that.element.css( \"left\" ) )\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( pr && pr.length ) {\n\t\t\t\t\t\t$( pr[ 0 ] ).css( { width: data.width, height: data.height } );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache( data );\n\t\t\t\t\tthat._propagate( \"resize\", event );\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = ( oc instanceof $ ) ?\n\t\t\t\toc.get( 0 ) :\n\t\t\t\t( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $( ce );\n\n\t\tif ( /document/.test( oc ) || oc === document ) {\n\t\t\tthat.containerOffset = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\t\t\tthat.containerPosition = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $( document ),\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\twidth: $( document ).width(),\n\t\t\t\theight: $( document ).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t} else {\n\t\t\telement = $( ce );\n\t\t\tp = [];\n\t\t\t$( [ \"Top\", \"Right\", \"Left\", \"Bottom\" ] ).each( function( i, name ) {\n\t\t\t\tp[ i ] = that._num( element.css( \"padding\" + name ) );\n\t\t\t} );\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = {\n\t\t\t\theight: ( element.innerHeight() - p[ 3 ] ),\n\t\t\t\twidth: ( element.innerWidth() - p[ 1 ] )\n\t\t\t};\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ( that._hasScroll( ce, \"left\" ) ? ce.scrollWidth : cw );\n\t\t\theight = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce,\n\t\t\t\tleft: co.left,\n\t\t\t\ttop: co.top,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\tce = that.containerElement,\n\t\t\tcontinueResize = true;\n\n\t\tif ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif ( cp.left < ( that._helper ? co.left : 0 ) ) {\n\t\t\tthat.size.width = that.size.width +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.left - co.left ) :\n\t\t\t\t\t( that.position.left - cop.left ) );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif ( cp.top < ( that._helper ? co.top : 0 ) ) {\n\t\t\tthat.size.height = that.size.height +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.top - co.top ) :\n\t\t\t\t\tthat.position.top );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tisParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );\n\t\tisOffsetRelative = /relative|absolute/.test( that.containerElement.css( \"position\" ) );\n\n\t\tif ( isParent && isOffsetRelative ) {\n\t\t\tthat.offset.left = that.parentData.left + that.position.left;\n\t\t\tthat.offset.top = that.parentData.top + that.position.top;\n\t\t} else {\n\t\t\tthat.offset.left = that.element.offset().left;\n\t\t\tthat.offset.top = that.element.offset().top;\n\t\t}\n\n\t\twoset = Math.abs( that.sizeDiff.width +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.left - cop.left :\n\t\t\t\t( that.offset.left - co.left ) ) );\n\n\t\thoset = Math.abs( that.sizeDiff.height +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.top - cop.top :\n\t\t\t\t( that.offset.top - co.top ) ) );\n\n\t\tif ( woset + that.size.width >= that.parentData.width ) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( hoset + that.size.height >= that.parentData.height ) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( !continueResize ) {\n\t\t\tthat.position.left = that.prevPosition.left;\n\t\t\tthat.position.top = that.prevPosition.top;\n\t\t\tthat.size.width = that.prevSize.width;\n\t\t\tthat.size.height = that.prevSize.height;\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $( that.helper ),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif ( that._helper && !o.animate && ( /relative/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\n\t\tif ( that._helper && !o.animate && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"alsoResize\", {\n\n\tstart: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options;\n\n\t\t$( o.alsoResize ).each( function() {\n\t\t\tvar el = $( this ),\n\t\t\t\telSize = that._calculateAdjustedElementDimensions( el );\n\n\t\t\tel.data( \"ui-resizable-alsoresize\", {\n\t\t\t\twidth: elSize.width, height: elSize.height,\n\t\t\t\tleft: parseFloat( el.css( \"left\" ) ), top: parseFloat( el.css( \"top\" ) )\n\t\t\t} );\n\t\t} );\n\t},\n\n\tresize: function( event, ui ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: ( that.size.height - os.height ) || 0,\n\t\t\t\twidth: ( that.size.width - os.width ) || 0,\n\t\t\t\ttop: ( that.position.top - op.top ) || 0,\n\t\t\t\tleft: ( that.position.left - op.left ) || 0\n\t\t\t};\n\n\t\t\t$( o.alsoResize ).each( function() {\n\t\t\t\tvar el = $( this ), start = $( this ).data( \"ui-resizable-alsoresize\" ), style = {},\n\t\t\t\t\tcss = el.parents( ui.originalElement[ 0 ] ).length ?\n\t\t\t\t\t\t\t[ \"width\", \"height\" ] :\n\t\t\t\t\t\t\t[ \"width\", \"height\", \"top\", \"left\" ];\n\n\t\t\t\t$.each( css, function( i, prop ) {\n\t\t\t\t\tvar sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );\n\t\t\t\t\tif ( sum && sum >= 0 ) {\n\t\t\t\t\t\tstyle[ prop ] = sum || null;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tel.css( style );\n\t\t\t} );\n\t},\n\n\tstop: function() {\n\t\t$( this ).removeData( \"ui-resizable-alsoresize\" );\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $( this ).resizable( \"instance\" ), cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost.css( {\n\t\t\topacity: 0.25,\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"relative\",\n\t\t\theight: cs.height,\n\t\t\twidth: cs.width,\n\t\t\tmargin: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0\n\t\t} );\n\n\t\tthat._addClass( that.ghost, \"ui-resizable-ghost\" );\n\n\t\t// DEPRECATED\n\t\t// TODO: remove after 1.12\n\t\tif ( $.uiBackCompat === true && typeof that.options.ghost === \"string\" ) {\n\n\t\t\t// Ghost option\n\t\t\tthat.ghost.addClass( this.options.ghost );\n\t\t}\n\n\t\tthat.ghost.appendTo( that.helper );\n\n\t},\n\n\tresize: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost ) {\n\t\t\tthat.ghost.css( {\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: that.size.height,\n\t\t\t\twidth: that.size.width\n\t\t\t} );\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost && that.helper ) {\n\t\t\tthat.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );\n\t\t}\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar outerDimensions,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [ o.grid, o.grid ] : o.grid,\n\t\t\tgridX = ( grid[ 0 ] || 1 ),\n\t\t\tgridY = ( grid[ 1 ] || 1 ),\n\t\t\tox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,\n\t\t\toy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),\n\t\t\tisMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),\n\t\t\tisMinWidth = o.minWidth && ( o.minWidth > newWidth ),\n\t\t\tisMinHeight = o.minHeight && ( o.minHeight > newHeight );\n\n\t\to.grid = grid;\n\n\t\tif ( isMinWidth ) {\n\t\t\tnewWidth += gridX;\n\t\t}\n\t\tif ( isMinHeight ) {\n\t\t\tnewHeight += gridY;\n\t\t}\n\t\tif ( isMaxWidth ) {\n\t\t\tnewWidth -= gridX;\n\t\t}\n\t\tif ( isMaxHeight ) {\n\t\t\tnewHeight -= gridY;\n\t\t}\n\n\t\tif ( /^(se|s|e)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if ( /^(ne)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if ( /^(sw)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tif ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {\n\t\t\t\touterDimensions = that._getPaddingPlusBorderDimensions( this );\n\t\t\t}\n\n\t\t\tif ( newHeight - gridY > 0 ) {\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else {\n\t\t\t\tnewHeight = gridY - outerDimensions.height;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top + os.height - newHeight;\n\t\t\t}\n\t\t\tif ( newWidth - gridX > 0 ) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tnewWidth = gridX - outerDimensions.width;\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left + os.width - newWidth;\n\t\t\t}\n\t\t}\n\t}\n\n} );\n\nreturn $.ui.resizable;\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/resizable.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/selectable.js":
/*!*********************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/selectable.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Selectable 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Selectable\n//>>group: Interactions\n//>>description: Allows groups of elements to be selected with the mouse.\n//>>docs: https://api.jqueryui.com/selectable/\n//>>demos: https://jqueryui.com/selectable/\n//>>css.structure: ../../themes/base/selectable.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ./mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.widget( \"ui.selectable\", $.ui.mouse, {\n\tversion: \"1.14.1\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: \"*\",\n\t\ttolerance: \"touch\",\n\n\t\t// Callbacks\n\t\tselected: null,\n\t\tselecting: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tunselected: null,\n\t\tunselecting: null\n\t},\n\t_create: function() {\n\t\tvar that = this;\n\n\t\tthis._addClass( \"ui-selectable\" );\n\n\t\tthis.dragged = false;\n\n\t\t// Cache selectee children based on filter\n\t\tthis.refresh = function() {\n\t\t\tthat.elementPos = $( that.element[ 0 ] ).offset();\n\t\t\tthat.selectees = $( that.options.filter, that.element[ 0 ] );\n\t\t\tthat._addClass( that.selectees, \"ui-selectee\" );\n\t\t\tthat.selectees.each( function() {\n\t\t\t\tvar $this = $( this ),\n\t\t\t\t\tselecteeOffset = $this.offset(),\n\t\t\t\t\tpos = {\n\t\t\t\t\t\tleft: selecteeOffset.left - that.elementPos.left,\n\t\t\t\t\t\ttop: selecteeOffset.top - that.elementPos.top\n\t\t\t\t\t};\n\t\t\t\t$.data( this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass( \"ui-selected\" ),\n\t\t\t\t\tselecting: $this.hasClass( \"ui-selecting\" ),\n\t\t\t\t\tunselecting: $this.hasClass( \"ui-unselecting\" )\n\t\t\t\t} );\n\t\t\t} );\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $( \"<div>\" );\n\t\tthis._addClass( this.helper, \"ui-selectable-helper\" );\n\t},\n\n\t_destroy: function() {\n\t\tthis.selectees.removeData( \"selectable-item\" );\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseStart: function( event ) {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.opos = [ event.pageX, event.pageY ];\n\t\tthis.elementPos = $( this.element[ 0 ] ).offset();\n\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectees = $( options.filter, this.element[ 0 ] );\n\n\t\tthis._trigger( \"start\", event );\n\n\t\t$( options.appendTo ).append( this.helper );\n\n\t\t// position helper (lasso)\n\t\tthis.helper.css( {\n\t\t\t\"left\": event.pageX,\n\t\t\t\"top\": event.pageY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t} );\n\n\t\tif ( options.autoRefresh ) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter( \".ui-selected\" ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tselectee.startselected = true;\n\t\t\tif ( !event.metaKey && !event.ctrlKey ) {\n\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\tselectee.selected = false;\n\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\tselectee.unselecting = true;\n\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t$( event.target ).parents().addBack().each( function() {\n\t\t\tvar doSelect,\n\t\t\t\tselectee = $.data( this, \"selectable-item\" );\n\t\t\tif ( selectee ) {\n\t\t\t\tdoSelect = ( !event.metaKey && !event.ctrlKey ) ||\n\t\t\t\t\t!selectee.$element.hasClass( \"ui-selected\" );\n\t\t\t\tthat._removeClass( selectee.$element, doSelect ? \"ui-unselecting\" : \"ui-selected\" )\n\t\t\t\t\t._addClass( selectee.$element, doSelect ? \"ui-selecting\" : \"ui-unselecting\" );\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif ( doSelect ) {\n\t\t\t\t\tthat._trigger( \"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tthis.dragged = true;\n\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tmp,\n\t\t\tthat = this,\n\t\t\toptions = this.options,\n\t\t\tx1 = this.opos[ 0 ],\n\t\t\ty1 = this.opos[ 1 ],\n\t\t\tx2 = event.pageX,\n\t\t\ty2 = event.pageY;\n\n\t\tif ( x1 > x2 ) {\n\t\t\ttmp = x2; x2 = x1; x1 = tmp;\n\t\t}\n\t\tif ( y1 > y2 ) {\n\t\t\ttmp = y2; y2 = y1; y1 = tmp;\n\t\t}\n\t\tthis.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );\n\n\t\tthis.selectees.each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" ),\n\t\t\t\thit = false,\n\t\t\t\toffset = {};\n\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif ( !selectee || selectee.element === that.element[ 0 ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\toffset.left   = selectee.left   + that.elementPos.left;\n\t\t\toffset.right  = selectee.right  + that.elementPos.left;\n\t\t\toffset.top    = selectee.top    + that.elementPos.top;\n\t\t\toffset.bottom = selectee.bottom + that.elementPos.top;\n\n\t\t\tif ( options.tolerance === \"touch\" ) {\n\t\t\t\thit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||\n                    offset.bottom < y1 ) );\n\t\t\t} else if ( options.tolerance === \"fit\" ) {\n\t\t\t\thit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&\n                    offset.bottom < y2 );\n\t\t\t}\n\n\t\t\tif ( hit ) {\n\n\t\t\t\t// SELECT\n\t\t\t\tif ( selectee.selected ) {\n\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif ( selectee.unselecting ) {\n\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif ( !selectee.selecting ) {\n\t\t\t\t\tthat._addClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\tselectee.selecting = true;\n\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tthat._trigger( \"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// UNSELECT\n\t\t\t\tif ( selectee.selecting ) {\n\t\t\t\t\tif ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif ( selectee.startselected ) {\n\t\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( selectee.selected ) {\n\t\t\t\t\tif ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\t\tselectee.unselecting = true;\n\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tvar that = this;\n\n\t\tthis.dragged = false;\n\n\t\t$( \".ui-unselecting\", this.element[ 0 ] ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tthat._removeClass( selectee.$element, \"ui-unselecting\" );\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tthat._trigger( \"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t} );\n\t\t} );\n\t\t$( \".ui-selecting\", this.element[ 0 ] ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" )\n\t\t\t\t._addClass( selectee.$element, \"ui-selected\" );\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tthat._trigger( \"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t} );\n\t\t} );\n\t\tthis._trigger( \"stop\", event );\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n} );\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/selectable.js?");

/***/ }),

/***/ "./node_modules/jquery-ui/ui/widgets/sortable.js":
/*!*******************************************************!*\
  !*** ./node_modules/jquery-ui/ui/widgets/sortable.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery UI Sortable 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Sortable\n//>>group: Interactions\n//>>description: Enables items in a list to be sorted using the mouse.\n//>>docs: https://api.jqueryui.com/sortable/\n//>>demos: https://jqueryui.com/sortable/\n//>>css.structure: ../../themes/base/sortable.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( true ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t\t\t__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n\t\t\t__webpack_require__(/*! ./mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\"),\n\t\t\t__webpack_require__(/*! ../data */ \"./node_modules/jquery-ui/ui/data.js\"),\n\t\t\t__webpack_require__(/*! ../scroll-parent */ \"./node_modules/jquery-ui/ui/scroll-parent.js\"),\n\t\t\t__webpack_require__(/*! ../version */ \"./node_modules/jquery-ui/ui/version.js\"),\n\t\t\t__webpack_require__(/*! ../widget */ \"./node_modules/jquery-ui/ui/widget.js\")\n\t\t], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.widget( \"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.14.1\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\n\t_isOverAxis: function( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t},\n\n\t_isFloating: function( item ) {\n\t\treturn ( /left|right/ ).test( item.css( \"float\" ) ) ||\n\t\t\t( /inline|table-cell/ ).test( item.css( \"display\" ) );\n\t},\n\n\t_create: function() {\n\t\tthis.containerCache = {};\n\t\tthis._addClass( \"ui-sortable\" );\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\tthis._setHandleClassName();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_setHandleClassName: function() {\n\t\tvar that = this;\n\t\tthis._removeClass( this.element.find( \".ui-sortable-handle\" ), \"ui-sortable-handle\" );\n\t\t$.each( this.items, function() {\n\t\t\tthat._addClass(\n\t\t\t\tthis.instance.options.handle ?\n\t\t\t\t\tthis.item.find( this.instance.options.handle ) :\n\t\t\t\t\tthis.item,\n\t\t\t\t\"ui-sortable-handle\"\n\t\t\t);\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[ i ].item.removeData( this.widgetName + \"-item\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function( event, overrideHandle ) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif ( this.reverting ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.options.disabled || this.options.type === \"static\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems( event );\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$( event.target ).parents().each( function() {\n\t\t\tif ( $.data( this, that.widgetName + \"-item\" ) === that ) {\n\t\t\t\tcurrentItem = $( this );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t\tif ( $.data( event.target, that.widgetName + \"-item\" ) === that ) {\n\t\t\tcurrentItem = $( event.target );\n\t\t}\n\n\t\tif ( !currentItem ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( this.options.handle && !overrideHandle ) {\n\t\t\t$( this.options.handle, currentItem ).find( \"*\" ).addBack().each( function() {\n\t\t\t\tif ( this === event.target ) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tif ( !validHandle ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function( event, overrideHandle, noActivation ) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to\n\t\t// mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Prepare the dragged items parent\n\t\tthis.appendTo = $( o.appendTo !== \"parent\" ?\n\t\t\t\to.appendTo :\n\t\t\t\tthis.currentItem.parent() );\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend( this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\n\t\t\t// This is a relative to absolute position minus the actual position calculation -\n\t\t\t// only used for relative positioned helper\n\t\t\trelative: this._getRelativeOffset()\n\t\t} );\n\n\t\t// After we get the helper offset, but before we get the parent offset we can\n\t\t// change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css( \"position\", \"absolute\" );\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\tif ( o.cursorAt ) {\n\t\t\tthis._adjustOffsetFromHelper( o.cursorAt );\n\t\t}\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = {\n\t\t\tprev: this.currentItem.prev()[ 0 ],\n\t\t\tparent: this.currentItem.parent()[ 0 ]\n\t\t};\n\n\t\t// If the helper is not the original, hide the original so it's not playing any role during\n\t\t// the drag, won't cause anything bad this way\n\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.placeholder.scrollParent();\n\n\t\t$.extend( this.offset, {\n\t\t\tparent: this._getParentOffset()\n\t\t} );\n\n\t\t//Set a containment if given in the options\n\t\tif ( o.containment ) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif ( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\tthis._storedStylesheet =\n\t\t\t\t$( \"<style>*{ cursor: \" + o.cursor + \" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\t// We need to make sure to grab the zIndex before setting the\n\t\t// opacity, because setting the opacity to anything lower than 1\n\t\t// causes the zIndex to change from \"auto\" to 0.\n\t\tif ( o.zIndex ) { // zIndex option\n\t\t\tif ( this.helper.css( \"zIndex\" ) ) {\n\t\t\t\tthis._storedZIndex = this.helper.css( \"zIndex\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"zIndex\", o.zIndex );\n\t\t}\n\n\t\tif ( o.opacity ) { // opacity option\n\t\t\tif ( this.helper.css( \"opacity\" ) ) {\n\t\t\t\tthis._storedOpacity = this.helper.css( \"opacity\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"opacity\", o.opacity );\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"start\", event, this._uiHash() );\n\n\t\t//Recache the helper size\n\t\tif ( !this._preserveHelperProportions ) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif ( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis._addClass( this.helper, \"ui-sortable-helper\" );\n\n\t\t//Move the helper, if needed\n\t\tif ( !this.helper.parent().is( this.appendTo ) ) {\n\t\t\tthis.helper.detach().appendTo( this.appendTo );\n\n\t\t\t//Update position\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Generate the original position\n\t\tthis.position = this.originalPosition = this._generatePosition( event );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\t\tthis.lastPositionAbs = this.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\tthis._mouseDrag( event );\n\n\t\treturn true;\n\n\t},\n\n\t_scroll: function( event ) {\n\t\tvar o = this.options,\n\t\t\tscrolled = false;\n\n\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\n\t\t\tif ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -\n\t\t\t\t\tevent.pageY < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;\n\t\t\t} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;\n\t\t\t}\n\n\t\t\tif ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -\n\t\t\t\t\tevent.pageX < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;\n\t\t\t} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );\n\t\t\t} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <\n\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );\n\t\t\t}\n\n\t\t\tif ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\tthis.document.scrollLeft() - o.scrollSpeed\n\t\t\t\t);\n\t\t\t} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <\n\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\tthis.document.scrollLeft() + o.scrollSpeed\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\n\t\treturn scrolled;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Set the helper position\n\t\tif ( !this.options.axis || this.options.axis !== \"y\" ) {\n\t\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( !this.options.axis || this.options.axis !== \"x\" ) {\n\t\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\t\t}\n\n\t\t//Do scrolling\n\t\tif ( o.scroll ) {\n\t\t\tif ( this._scroll( event ) !== false ) {\n\n\t\t\t\t//Update item positions used in position checks\n\t\t\t\tthis._refreshItemPositions( true );\n\n\t\t\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.dragDirection = {\n\t\t\tvertical: this._getDragVerticalDirection(),\n\t\t\thorizontal: this._getDragHorizontalDirection()\n\t\t};\n\n\t\t//Rearrange\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[ i ];\n\t\t\titemElement = item.item[ 0 ];\n\t\t\tintersection = this._intersectsWithPointer( item );\n\t\t\tif ( !intersection ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items from other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this, moving items in \"sub-sortables\" can cause\n\t\t\t// the placeholder to jitter between the outer and inner container.\n\t\t\tif ( item.instance !== this.currentContainer ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif ( itemElement !== this.currentItem[ 0 ] &&\n\t\t\t\tthis.placeholder[ intersection === 1 ?\n\t\t\t\t\"next\" : \"prev\" ]()[ 0 ] !== itemElement &&\n\t\t\t\t!$.contains( this.placeholder[ 0 ], itemElement ) &&\n\t\t\t\t( this.options.type === \"semi-dynamic\" ?\n\t\t\t\t\t!$.contains( this.element[ 0 ], itemElement ) :\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\t\t\t\tthis._intersectsWithSides( item ) ) {\n\t\t\t\t\tthis._rearrange( event, item );\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers( event );\n\n\t\t//Interconnect with droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"sort\", event, this._uiHash() );\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function( event, noPropagation ) {\n\n\t\tif ( !event ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\tif ( this.options.revert ) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollLeft\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollTop\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$( this.helper ).animate(\n\t\t\t\tanimation,\n\t\t\t\tparseInt( this.options.revert, 10 ) || 500,\n\t\t\t\tfunction() {\n\t\t\t\t\tthat._clear( event );\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis._clear( event, noPropagation );\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.dragging ) {\n\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: null } ) );\n\n\t\t\tif ( this.options.helper === \"original\" ) {\n\t\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor ( var i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"deactivate\", null, this._uiHash( this ) );\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", null, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.placeholder ) {\n\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t\t// it unbinds ALL events from the original node!\n\t\t\tif ( this.placeholder[ 0 ].parentNode ) {\n\t\t\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\t\t\t}\n\t\t\tif ( this.options.helper !== \"original\" && this.helper &&\n\t\t\t\t\tthis.helper[ 0 ].parentNode ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend( this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t} );\n\n\t\t\tif ( this.domPosition.prev ) {\n\t\t\t\t$( this.domPosition.prev ).after( this.currentItem );\n\t\t\t} else {\n\t\t\t\t$( this.domPosition.parent ).prepend( this.currentItem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$( items ).each( function() {\n\t\t\tvar res = ( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" )\n\t\t\t\t.match( o.expression || ( /(.+)[\\-=_](.+)/ ) );\n\t\t\tif ( res ) {\n\t\t\t\tstr.push(\n\t\t\t\t\t( o.key || res[ 1 ] + \"[]\" ) +\n\t\t\t\t\t\"=\" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );\n\t\t\t}\n\t\t} );\n\n\t\tif ( !str.length && o.key ) {\n\t\t\tstr.push( o.key + \"=\" );\n\t\t}\n\n\t\treturn str.join( \"&\" );\n\n\t},\n\n\ttoArray: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each( function() {\n\t\t\tret.push( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" );\n\t\t} );\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function( item ) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t &&\n\t\t\t\t( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l &&\n\t\t\t\t( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t( this.options.tolerance !== \"pointer\" &&\n\t\t\t\tthis.helperProportions[ this.floating ? \"width\" : \"height\" ] >\n\t\t\t\titem[ this.floating ? \"width\" : \"height\" ] )\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( this.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( this.helperProportions.height / 2 ) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function( item ) {\n\t\tvar verticalDirection, horizontalDirection,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.top + this.offset.click.top, item.top, item.height ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.left + this.offset.click.left, item.left, item.width ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( !isOverElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tverticalDirection = this.dragDirection.vertical;\n\t\thorizontalDirection = this.dragDirection.horizontal;\n\n\t\treturn this.floating ?\n\t\t\t( ( horizontalDirection === \"right\" || verticalDirection === \"down\" ) ? 2 : 1 ) :\n\t\t\t( verticalDirection && ( verticalDirection === \"down\" ? 2 : 1 ) );\n\n\t},\n\n\t_intersectsWithSides: function( item ) {\n\n\t\tvar isOverBottomHalf = this._isOverAxis( this.positionAbs.top +\n\t\t\t\tthis.offset.click.top, item.top + ( item.height / 2 ), item.height ),\n\t\t\tisOverRightHalf = this._isOverAxis( this.positionAbs.left +\n\t\t\t\tthis.offset.click.left, item.left + ( item.width / 2 ), item.width ),\n\t\t\tverticalDirection = this.dragDirection.vertical,\n\t\t\thorizontalDirection = this.dragDirection.horizontal;\n\n\t\tif ( this.floating && horizontalDirection ) {\n\t\t\treturn ( ( horizontalDirection === \"right\" && isOverRightHalf ) ||\n\t\t\t\t( horizontalDirection === \"left\" && !isOverRightHalf ) );\n\t\t} else {\n\t\t\treturn verticalDirection && ( ( verticalDirection === \"down\" && isOverBottomHalf ) ||\n\t\t\t\t( verticalDirection === \"up\" && !isOverBottomHalf ) );\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && ( delta > 0 ? \"down\" : \"up\" );\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && ( delta > 0 ? \"right\" : \"left\" );\n\t},\n\n\trefresh: function( event ) {\n\t\tthis._refreshItems( event );\n\t\tthis._setHandleClassName();\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ?\n\t\t\t[ options.connectWith ] :\n\t\t\toptions.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function( connected ) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif ( connectWith && connected ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ typeof inst.options.items === \"function\" ?\n\t\t\t\t\t\t\tinst.options.items.call( inst.element ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-placeholder\" ), inst ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push( [ typeof this.options.items === \"function\" ?\n\t\t\tthis.options.items\n\t\t\t\t.call( this.element, null, { options: this.options, item: this.currentItem } ) :\n\t\t\t$( this.options.items, this.element )\n\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t.not( \".ui-sortable-placeholder\" ), this ] );\n\n\t\tfunction addItems() {\n\t\t\titems.push( this );\n\t\t}\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\tqueries[ i ][ 0 ].each( addItems );\n\t\t}\n\n\t\treturn $( items );\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find( \":data(\" + this.widgetName + \"-item)\" );\n\n\t\tthis.items = $.grep( this.items, function( item ) {\n\t\t\tfor ( var j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === item.item[ 0 ] ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} );\n\n\t},\n\n\t_refreshItems: function( event ) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [ this ];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [ [ typeof this.options.items === \"function\" ?\n\t\t\t\tthis.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t$( this.options.items, this.element ), this ] ],\n\t\t\tconnectWith = this._connectWith();\n\n\t\t//Shouldn't be run the first time through due to massive slow-down\n\t\tif ( connectWith && this.ready ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ typeof inst.options.items === \"function\" ?\n\t\t\t\t\t\t\tinst.options.items\n\t\t\t\t\t\t\t\t.call( inst.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element ), inst ] );\n\t\t\t\t\t\tthis.containers.push( inst );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\ttargetData = queries[ i ][ 1 ];\n\t\t\t_queries = queries[ i ][ 0 ];\n\n\t\t\tfor ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {\n\t\t\t\titem = $( _queries[ j ] );\n\n\t\t\t\t// Data for target checking (mouse manager)\n\t\t\t\titem.data( this.widgetName + \"-item\", targetData );\n\n\t\t\t\titems.push( {\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t},\n\n\t_refreshItemPositions: function( fast ) {\n\t\tvar i, item, t, p;\n\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\titem = this.items[ i ];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif ( this.currentContainer && item.instance !== this.currentContainer &&\n\t\t\t\t\titem.item[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ?\n\t\t\t\t$( this.options.toleranceElement, item.item ) :\n\t\t\t\titem.item;\n\n\t\t\tif ( !fast ) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\t},\n\n\trefreshPositions: function( fast ) {\n\n\t\t// Determine whether items are being displayed horizontally\n\t\tthis.floating = this.items.length ?\n\t\t\tthis.options.axis === \"x\" || this._isFloating( this.items[ 0 ].item ) :\n\t\t\tfalse;\n\n\t\t// This has to be redone because due to the item being moved out/into the offsetParent,\n\t\t// the offsetParent's position will change\n\t\tif ( this.offsetParent && this.helper ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tthis._refreshItemPositions( fast );\n\n\t\tvar i, p;\n\n\t\tif ( this.options.custom && this.options.custom.refreshContainers ) {\n\t\t\tthis.options.custom.refreshContainers.call( this );\n\t\t} else {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tp = this.containers[ i ].element.offset();\n\t\t\t\tthis.containers[ i ].containerCache.left = p.left;\n\t\t\t\tthis.containers[ i ].containerCache.top = p.top;\n\t\t\t\tthis.containers[ i ].containerCache.width =\n\t\t\t\t\tthis.containers[ i ].element.outerWidth();\n\t\t\t\tthis.containers[ i ].containerCache.height =\n\t\t\t\t\tthis.containers[ i ].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function( that ) {\n\t\tthat = that || this;\n\t\tvar className, nodeName,\n\t\t\to = that.options;\n\n\t\tif ( !o.placeholder || o.placeholder.constructor === String ) {\n\t\t\tclassName = o.placeholder;\n\t\t\tnodeName = that.currentItem[ 0 ].nodeName.toLowerCase();\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar element = $( \"<\" + nodeName + \">\", that.document[ 0 ] );\n\n\t\t\t\t\tthat._addClass( element, \"ui-sortable-placeholder\",\n\t\t\t\t\t\t\tclassName || that.currentItem[ 0 ].className )\n\t\t\t\t\t\t._removeClass( element, \"ui-sortable-helper\" );\n\n\t\t\t\t\tif ( nodeName === \"tbody\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder(\n\t\t\t\t\t\t\tthat.currentItem.find( \"tr\" ).eq( 0 ),\n\t\t\t\t\t\t\t$( \"<tr>\", that.document[ 0 ] ).appendTo( element )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder( that.currentItem, element );\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function( container, p ) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes -\n\t\t\t\t\t// the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a\n\t\t\t\t\t// class name is specified\n\t\t\t\t\tif ( className && !o.forcePlaceholderSize ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the element doesn't have a actual height or width by itself (without\n\t\t\t\t\t// styles coming from a stylesheet), it receives the inline height and width\n\t\t\t\t\t// from the dragged item. Or, if it's a tbody or tr, it's going to have a height\n\t\t\t\t\t// anyway since we're populating them with <td>s above, but they're unlikely to\n\t\t\t\t\t// be the correct height on their own if the row heights are dynamic, so we'll\n\t\t\t\t\t// always assign the height of the dragged item given forcePlaceholderSize\n\t\t\t\t\t// is true.\n\t\t\t\t\tif ( !p.height() || ( o.forcePlaceholderSize &&\n\t\t\t\t\t\t\t( nodeName === \"tbody\" || nodeName === \"tr\" ) ) ) {\n\t\t\t\t\t\tp.height(\n\t\t\t\t\t\t\tthat.currentItem.innerHeight() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingTop\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingBottom\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t\tif ( !p.width() ) {\n\t\t\t\t\t\tp.width(\n\t\t\t\t\t\t\tthat.currentItem.innerWidth() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingLeft\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingRight\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after( that.placeholder );\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update( that, that.placeholder );\n\n\t},\n\n\t_createTrPlaceholder: function( sourceTr, targetTr ) {\n\t\tvar that = this;\n\n\t\tsourceTr.children().each( function() {\n\t\t\t$( \"<td>&#160;</td>\", that.document[ 0 ] )\n\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t.appendTo( targetTr );\n\t\t} );\n\t},\n\n\t_contactContainers: function( event ) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,\n\t\t\tfloating, axis,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// Get innermost container that intersects with item\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\n\t\t\t// Never consider a container that's located within the item itself\n\t\t\tif ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( this._intersectsWith( this.containers[ i ].containerCache ) ) {\n\n\t\t\t\t// If we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif ( innermostContainer &&\n\t\t\t\t\t\t$.contains(\n\t\t\t\t\t\t\tthis.containers[ i ].element[ 0 ],\n\t\t\t\t\t\t\tinnermostContainer.element[ 0 ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[ i ];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", event, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// If no intersecting containers found, return\n\t\tif ( !innermostContainer ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Move the item into the container if it's not there already\n\t\tif ( this.containers.length === 1 ) {\n\t\t\tif ( !this.containers[ innermostIndex ].containerCache.over ) {\n\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// When entering a new container, we will find the item with the least distance and\n\t\t\t// append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || this._isFloating( this.currentItem );\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\taxis = floating ? \"pageX\" : \"pageY\";\n\n\t\t\tfor ( j = this.items.length - 1; j >= 0; j-- ) {\n\t\t\t\tif ( !$.contains(\n\t\t\t\t\t\tthis.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcur = this.items[ j ].item.offset()[ posProperty ];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t}\n\n\t\t\t\tif ( Math.abs( event[ axis ] - cur ) < dist ) {\n\t\t\t\t\tdist = Math.abs( event[ axis ] - cur );\n\t\t\t\t\titemWithLeastDistance = this.items[ j ];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\" : \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.currentContainer === this.containers[ innermostIndex ] ) {\n\t\t\t\tif ( !this.currentContainer.containerCache.over ) {\n\t\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash() );\n\t\t\t\t\tthis.currentContainer.containerCache.over = 1;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( itemWithLeastDistance ) {\n\t\t\t\tthis._rearrange( event, itemWithLeastDistance, null, true );\n\t\t\t} else {\n\t\t\t\tthis._rearrange( event, null, this.containers[ innermostIndex ].element, true );\n\t\t\t}\n\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"change\", event, this._uiHash( this ) );\n\t\t\tthis.currentContainer = this.containers[ innermostIndex ];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update( this.currentContainer, this.placeholder );\n\n\t\t\t//Update scrollParent\n\t\t\tthis.scrollParent = this.placeholder.scrollParent();\n\n\t\t\t//Update overflowOffset\n\t\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\t\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t\t}\n\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t}\n\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelper = typeof o.helper === \"function\" ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem );\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\tthis.appendTo[ 0 ].appendChild( helper[ 0 ] );\n\t\t}\n\n\t\tif ( helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tthis._storedCSS = {\n\t\t\t\twidth: this.currentItem[ 0 ].style.width,\n\t\t\t\theight: this.currentItem[ 0 ].style.height,\n\t\t\t\tposition: this.currentItem.css( \"position\" ),\n\t\t\t\ttop: this.currentItem.css( \"top\" ),\n\t\t\t\tleft: this.currentItem.css( \"left\" )\n\t\t\t};\n\t\t}\n\n\t\tif ( !helper[ 0 ].style.width || o.forceHelperSize ) {\n\t\t\thelper.width( this.currentItem.width() );\n\t\t}\n\t\tif ( !helper[ 0 ].style.height || o.forceHelperSize ) {\n\t\t\thelper.height( this.currentItem.height() );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( Array.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes\n\t\t// this information.\n\t\tif ( this.offsetParent[ 0 ] === this.document[ 0 ].body ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif ( this.cssPosition === \"relative\" ) {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.currentItem.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.currentItem.css( \"marginTop\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\t\tif ( o.containment === \"document\" || o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\to.containment === \"document\" ?\n\t\t\t\t\tthis.document.width() :\n\t\t\t\t\tthis.window.width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( o.containment === \"document\" ?\n\t\t\t\t\t( this.document.height() || document.body.parentNode.scrollHeight ) :\n\t\t\t\t\tthis.window.height() || this.document[ 0 ].body.parentNode.scrollHeight\n\t\t\t\t) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {\n\t\t\tce = $( o.containment )[ 0 ];\n\t\t\tco = $( o.containment ).offset();\n\t\t\tover = ( $( ce ).css( \"overflow\" ) !== \"hidden\" );\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + ( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingLeft\" ), 10 ) || 0 ) - this.margins.left,\n\t\t\t\tco.top + ( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingTop\" ), 10 ) || 0 ) - this.margins.top,\n\t\t\t\tco.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\tco.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :\n\t\t\t\t\tscroll.scrollLeft() ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event ) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif ( this.cssPosition === \"relative\" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif ( this.originalPosition ) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {\n\t\t\t\t\tpageX = this.containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {\n\t\t\t\t\tpageY = this.containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {\n\t\t\t\t\tpageX = this.containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {\n\t\t\t\t\tpageY = this.containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\t\t\t\ttop = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /\n\t\t\t\t\to.grid[ 1 ] ) * o.grid[ 1 ];\n\t\t\t\tpageY = this.containment ?\n\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] &&\n\t\t\t\t\t\ttop - this.offset.click.top <= this.containment[ 3 ] ) ?\n\t\t\t\t\t\t\ttop :\n\t\t\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?\n\t\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :\n\t\t\t\t\t\t\t\ttop;\n\n\t\t\t\tleft = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /\n\t\t\t\t\to.grid[ 0 ] ) * o.grid[ 0 ];\n\t\t\t\tpageX = this.containment ?\n\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] &&\n\t\t\t\t\t\tleft - this.offset.click.left <= this.containment[ 2 ] ) ?\n\t\t\t\t\t\t\tleft :\n\t\t\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?\n\t\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :\n\t\t\t\t\t\t\t\tleft;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() :\n\t\t\t\t\tscrollIsRootNode ? 0 : scroll.scrollLeft() ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function( event, i, a, hardRefresh ) {\n\n\t\tif ( a ) {\n\t\t\ta[ 0 ].appendChild( this.placeholder[ 0 ] );\n\t\t} else {\n\t\t\ti.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],\n\t\t\t\t( this.direction === \"down\" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );\n\t\t}\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout,\n\t\t// if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay( function() {\n\t\t\tif ( counter === this.counter ) {\n\n\t\t\t\t//Precompute after each DOM insertion, NOT on mousemove\n\t\t\t\tthis.refreshPositions( !hardRefresh );\n\t\t\t}\n\t\t} );\n\n\t},\n\n\t_clear: function( event, noPropagation ) {\n\n\t\tthis.reverting = false;\n\n\t\t// We delay all events that have to be triggered to after the point where the placeholder\n\t\t// has been removed and everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets\n\t\t// reappended (see #4088)\n\t\tif ( !this._noFinalSort && this.currentItem.parent().length ) {\n\t\t\tthis.placeholder.before( this.currentItem );\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tfor ( i in this._storedCSS ) {\n\t\t\t\tif ( this._storedCSS[ i ] === \"auto\" || this._storedCSS[ i ] === \"static\" ) {\n\t\t\t\t\tthis._storedCSS[ i ] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif ( this.fromOutside && !noPropagation ) {\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"receive\", event, this._uiHash( this.fromOutside ) );\n\t\t\t} );\n\t\t}\n\t\tif ( ( this.fromOutside ||\n\t\t\t\tthis.domPosition.prev !==\n\t\t\t\tthis.currentItem.prev().not( \".ui-sortable-helper\" )[ 0 ] ||\n\t\t\t\tthis.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {\n\n\t\t\t// Trigger update callback if the DOM position has changed\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"update\", event, this._uiHash() );\n\t\t\t} );\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif ( this !== this.currentContainer ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\t\tthis._trigger( \"remove\", event, this._uiHash() );\n\t\t\t\t} );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"receive\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"update\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tfunction delayEvent( type, instance, container ) {\n\t\t\treturn function( event ) {\n\t\t\t\tcontainer._trigger( type, event, instance._uiHash( instance ) );\n\t\t\t};\n\t\t}\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"deactivate\", this, this.containers[ i ] ) );\n\t\t\t}\n\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"out\", this, this.containers[ i ] ) );\n\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this._storedStylesheet ) {\n\t\t\tthis._storedStylesheet.remove();\n\t\t\tthis._storedStylesheet = null;\n\t\t}\n\t\tif ( this._storedOpacity ) {\n\t\t\tthis.helper.css( \"opacity\", this._storedOpacity );\n\t\t}\n\t\tif ( this._storedZIndex ) {\n\t\t\tthis.helper.css( \"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex );\n\t\t}\n\n\t\tthis.dragging = false;\n\n\t\tif ( !noPropagation ) {\n\t\t\tthis._trigger( \"beforeStop\", event, this._uiHash() );\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t// it unbinds ALL events from the original node!\n\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\n\t\tif ( !this.cancelHelperRemoval ) {\n\t\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\t}\n\n\t\tif ( !noPropagation ) {\n\t\t\tfor ( i = 0; i < delayedTriggers.length; i++ ) {\n\n\t\t\t\t// Trigger all delayed events\n\t\t\t\tdelayedTriggers[ i ].call( this, event );\n\t\t\t}\n\t\t\tthis._trigger( \"stop\", event, this._uiHash() );\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn !this.cancelHelperRemoval;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function( _inst ) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $( [] ),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n} );\n\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery-ui/ui/widgets/sortable.js?");

/***/ }),

/***/ "./node_modules/jquery/dist/jquery.js":
/*!********************************************!*\
  !*** ./node_modules/jquery/dist/jquery.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif (  true && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( true ) {\n\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\treturn jQuery;\n\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jquery/dist/jquery.js?");

/***/ }),

/***/ "./node_modules/jwt-decode/lib/atob.js":
/*!*********************************************!*\
  !*** ./node_modules/jwt-decode/lib/atob.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The code was extracted from:\n * https://github.com/davidchambers/Base64.js\n */\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction InvalidCharacterError(message) {\n  this.message = message;\n}\n\nInvalidCharacterError.prototype = new Error();\nInvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\nfunction polyfill (input) {\n  var str = String(input).replace(/=+$/, '');\n  if (str.length % 4 == 1) {\n    throw new InvalidCharacterError(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n  }\n  for (\n    // initialize result and counters\n    var bc = 0, bs, buffer, idx = 0, output = '';\n    // get next character\n    buffer = str.charAt(idx++);\n    // character found in table? initialize bit storage and add its ascii value;\n    ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n      // and if not first of each 4 characters,\n      // convert the first 8 bits to one ascii character\n      bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n  ) {\n    // try to find character in table (0-63, not found => -1)\n    buffer = chars.indexOf(buffer);\n  }\n  return output;\n}\n\n\nmodule.exports = typeof window !== 'undefined' && window.atob && window.atob.bind(window) || polyfill;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jwt-decode/lib/atob.js?");

/***/ }),

/***/ "./node_modules/jwt-decode/lib/base64_url_decode.js":
/*!**********************************************************!*\
  !*** ./node_modules/jwt-decode/lib/base64_url_decode.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var atob = __webpack_require__(/*! ./atob */ \"./node_modules/jwt-decode/lib/atob.js\");\n\nfunction b64DecodeUnicode(str) {\n  return decodeURIComponent(atob(str).replace(/(.)/g, function (m, p) {\n    var code = p.charCodeAt(0).toString(16).toUpperCase();\n    if (code.length < 2) {\n      code = '0' + code;\n    }\n    return '%' + code;\n  }));\n}\n\nmodule.exports = function(str) {\n  var output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n  switch (output.length % 4) {\n    case 0:\n      break;\n    case 2:\n      output += \"==\";\n      break;\n    case 3:\n      output += \"=\";\n      break;\n    default:\n      throw \"Illegal base64url string!\";\n  }\n\n  try{\n    return b64DecodeUnicode(output);\n  } catch (err) {\n    return atob(output);\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jwt-decode/lib/base64_url_decode.js?");

/***/ }),

/***/ "./node_modules/jwt-decode/lib/index.js":
/*!**********************************************!*\
  !*** ./node_modules/jwt-decode/lib/index.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar base64_url_decode = __webpack_require__(/*! ./base64_url_decode */ \"./node_modules/jwt-decode/lib/base64_url_decode.js\");\n\nfunction InvalidTokenError(message) {\n  this.message = message;\n}\n\nInvalidTokenError.prototype = new Error();\nInvalidTokenError.prototype.name = 'InvalidTokenError';\n\nmodule.exports = function (token,options) {\n  if (typeof token !== 'string') {\n    throw new InvalidTokenError('Invalid token specified');\n  }\n\n  options = options || {};\n  var pos = options.header === true ? 0 : 1;\n  try {\n    return JSON.parse(base64_url_decode(token.split('.')[pos]));\n  } catch (e) {\n    throw new InvalidTokenError('Invalid token specified: ' + e.message);\n  }\n};\n\nmodule.exports.InvalidTokenError = InvalidTokenError;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/jwt-decode/lib/index.js?");

/***/ }),

/***/ "./node_modules/katex/dist/katex.css":
/*!*******************************************!*\
  !*** ./node_modules/katex/dist/katex.css ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/katex/dist/katex.css?");

/***/ }),

/***/ "./node_modules/katex/dist/katex.js":
/*!******************************************!*\
  !*** ./node_modules/katex/dist/katex.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./src/katex.less\nvar katex = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./src/SourceLocation.js\n/**\n * Lexing or parsing positional information for error reporting.\n * This object is immutable.\n */\nvar SourceLocation =\n/*#__PURE__*/\nfunction () {\n  // The + prefix indicates that these fields aren't writeable\n  // Lexer holding the input string.\n  // Start offset, zero-based inclusive.\n  // End offset, zero-based exclusive.\n  function SourceLocation(lexer, start, end) {\n    this.lexer = void 0;\n    this.start = void 0;\n    this.end = void 0;\n    this.lexer = lexer;\n    this.start = start;\n    this.end = end;\n  }\n  /**\n   * Merges two `SourceLocation`s from location providers, given they are\n   * provided in order of appearance.\n   * - Returns the first one's location if only the first is provided.\n   * - Returns a merged range of the first and the last if both are provided\n   *   and their lexers match.\n   * - Otherwise, returns null.\n   */\n\n\n  SourceLocation.range = function range(first, second) {\n    if (!second) {\n      return first && first.loc;\n    } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {\n      return null;\n    } else {\n      return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);\n    }\n  };\n\n  return SourceLocation;\n}();\n\n\n// CONCATENATED MODULE: ./src/Token.js\n\n/**\n * Interface required to break circular dependency between Token, Lexer, and\n * ParseError.\n */\n\n/**\n * The resulting token returned from `lex`.\n *\n * It consists of the token text plus some position information.\n * The position information is essentially a range in an input string,\n * but instead of referencing the bare input string, we refer to the lexer.\n * That way it is possible to attach extra metadata to the input string,\n * like for example a file name or similar.\n *\n * The position information is optional, so it is OK to construct synthetic\n * tokens if appropriate. Not providing available position information may\n * lead to degraded error reporting, though.\n */\nvar Token_Token =\n/*#__PURE__*/\nfunction () {\n  function Token(text, // the text of this token\n  loc) {\n    this.text = void 0;\n    this.loc = void 0;\n    this.text = text;\n    this.loc = loc;\n  }\n  /**\n   * Given a pair of tokens (this and endToken), compute a `Token` encompassing\n   * the whole input range enclosed by these two.\n   */\n\n\n  var _proto = Token.prototype;\n\n  _proto.range = function range(endToken, // last token of the range, inclusive\n  text) // the text of the newly constructed token\n  {\n    return new Token(text, SourceLocation.range(this, endToken));\n  };\n\n  return Token;\n}();\n// CONCATENATED MODULE: ./src/ParseError.js\n\n\n/**\n * This is the ParseError class, which is the main error thrown by KaTeX\n * functions when something has gone wrong. This is used to distinguish internal\n * errors from errors in the expression that the user provided.\n *\n * If possible, a caller should provide a Token or ParseNode with information\n * about where in the source string the problem occurred.\n */\nvar ParseError = // Error position based on passed-in Token or ParseNode.\nfunction ParseError(message, // The error message\ntoken) // An object providing position information\n{\n  this.position = void 0;\n  var error = \"KaTeX parse error: \" + message;\n  var start;\n  var loc = token && token.loc;\n\n  if (loc && loc.start <= loc.end) {\n    // If we have the input and a position, make the error a bit fancier\n    // Get the input\n    var input = loc.lexer.input; // Prepend some information\n\n    start = loc.start;\n    var end = loc.end;\n\n    if (start === input.length) {\n      error += \" at end of input: \";\n    } else {\n      error += \" at position \" + (start + 1) + \": \";\n    } // Underline token in question using combining underscores\n\n\n    var underlined = input.slice(start, end).replace(/[^]/g, \"$&\\u0332\"); // Extract some context from the input and add it to the error\n\n    var left;\n\n    if (start > 15) {\n      left = \"…\" + input.slice(start - 15, start);\n    } else {\n      left = input.slice(0, start);\n    }\n\n    var right;\n\n    if (end + 15 < input.length) {\n      right = input.slice(end, end + 15) + \"…\";\n    } else {\n      right = input.slice(end);\n    }\n\n    error += left + underlined + right;\n  } // Some hackery to make ParseError a prototype of Error\n  // See http://stackoverflow.com/a/8460753\n\n\n  var self = new Error(error);\n  self.name = \"ParseError\"; // $FlowFixMe\n\n  self.__proto__ = ParseError.prototype; // $FlowFixMe\n\n  self.position = start;\n  return self;\n}; // $FlowFixMe More hackery\n\n\nParseError.prototype.__proto__ = Error.prototype;\n/* harmony default export */ var src_ParseError = (ParseError);\n// CONCATENATED MODULE: ./src/utils.js\n/**\n * This file contains a list of utility functions which are useful in other\n * files.\n */\n\n/**\n * Return whether an element is contained in a list\n */\nvar contains = function contains(list, elem) {\n  return list.indexOf(elem) !== -1;\n};\n/**\n * Provide a default value if a setting is undefined\n * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022.\n */\n\n\nvar deflt = function deflt(setting, defaultIfUndefined) {\n  return setting === undefined ? defaultIfUndefined : setting;\n}; // hyphenate and escape adapted from Facebook's React under Apache 2 license\n\n\nvar uppercase = /([A-Z])/g;\n\nvar hyphenate = function hyphenate(str) {\n  return str.replace(uppercase, \"-$1\").toLowerCase();\n};\n\nvar ESCAPE_LOOKUP = {\n  \"&\": \"&amp;\",\n  \">\": \"&gt;\",\n  \"<\": \"&lt;\",\n  \"\\\"\": \"&quot;\",\n  \"'\": \"&#x27;\"\n};\nvar ESCAPE_REGEX = /[&><\"']/g;\n/**\n * Escapes text to prevent scripting attacks.\n */\n\nfunction utils_escape(text) {\n  return String(text).replace(ESCAPE_REGEX, function (match) {\n    return ESCAPE_LOOKUP[match];\n  });\n}\n/**\n * Sometimes we want to pull out the innermost element of a group. In most\n * cases, this will just be the group itself, but when ordgroups and colors have\n * a single element, we want to pull that out.\n */\n\n\nvar getBaseElem = function getBaseElem(group) {\n  if (group.type === \"ordgroup\") {\n    if (group.body.length === 1) {\n      return getBaseElem(group.body[0]);\n    } else {\n      return group;\n    }\n  } else if (group.type === \"color\") {\n    if (group.body.length === 1) {\n      return getBaseElem(group.body[0]);\n    } else {\n      return group;\n    }\n  } else if (group.type === \"font\") {\n    return getBaseElem(group.body);\n  } else {\n    return group;\n  }\n};\n/**\n * TeXbook algorithms often reference \"character boxes\", which are simply groups\n * with a single character in them. To decide if something is a character box,\n * we find its innermost group, and see if it is a single character.\n */\n\n\nvar utils_isCharacterBox = function isCharacterBox(group) {\n  var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters\n\n  return baseElem.type === \"mathord\" || baseElem.type === \"textord\" || baseElem.type === \"atom\";\n};\n\nvar assert = function assert(value) {\n  if (!value) {\n    throw new Error('Expected non-null, but got ' + String(value));\n  }\n\n  return value;\n};\n/* harmony default export */ var utils = ({\n  contains: contains,\n  deflt: deflt,\n  escape: utils_escape,\n  hyphenate: hyphenate,\n  getBaseElem: getBaseElem,\n  isCharacterBox: utils_isCharacterBox\n});\n// CONCATENATED MODULE: ./src/Settings.js\n/* eslint no-console:0 */\n\n/**\n * This is a module for storing settings passed into KaTeX. It correctly handles\n * default settings.\n */\n\n\n\n\n/**\n * The main Settings object\n *\n * The current options stored are:\n *  - displayMode: Whether the expression should be typeset as inline math\n *                 (false, the default), meaning that the math starts in\n *                 \\textstyle and is placed in an inline-block); or as display\n *                 math (true), meaning that the math starts in \\displaystyle\n *                 and is placed in a block with vertical margin.\n */\nvar Settings_Settings =\n/*#__PURE__*/\nfunction () {\n  function Settings(options) {\n    this.displayMode = void 0;\n    this.leqno = void 0;\n    this.fleqn = void 0;\n    this.throwOnError = void 0;\n    this.errorColor = void 0;\n    this.macros = void 0;\n    this.colorIsTextColor = void 0;\n    this.strict = void 0;\n    this.maxSize = void 0;\n    this.maxExpand = void 0;\n    this.allowedProtocols = void 0;\n    // allow null options\n    options = options || {};\n    this.displayMode = utils.deflt(options.displayMode, false);\n    this.leqno = utils.deflt(options.leqno, false);\n    this.fleqn = utils.deflt(options.fleqn, false);\n    this.throwOnError = utils.deflt(options.throwOnError, true);\n    this.errorColor = utils.deflt(options.errorColor, \"#cc0000\");\n    this.macros = options.macros || {};\n    this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);\n    this.strict = utils.deflt(options.strict, \"warn\");\n    this.maxSize = Math.max(0, utils.deflt(options.maxSize, Infinity));\n    this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1000));\n    this.allowedProtocols = utils.deflt(options.allowedProtocols, [\"http\", \"https\", \"mailto\", \"_relative\"]);\n  }\n  /**\n   * Report nonstrict (non-LaTeX-compatible) input.\n   * Can safely not be called if `this.strict` is false in JavaScript.\n   */\n\n\n  var _proto = Settings.prototype;\n\n  _proto.reportNonstrict = function reportNonstrict(errorCode, errorMsg, token) {\n    var strict = this.strict;\n\n    if (typeof strict === \"function\") {\n      // Allow return value of strict function to be boolean or string\n      // (or null/undefined, meaning no further processing).\n      strict = strict(errorCode, errorMsg, token);\n    }\n\n    if (!strict || strict === \"ignore\") {\n      return;\n    } else if (strict === true || strict === \"error\") {\n      throw new src_ParseError(\"LaTeX-incompatible input and strict mode is set to 'error': \" + (errorMsg + \" [\" + errorCode + \"]\"), token);\n    } else if (strict === \"warn\") {\n      typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n    } else {\n      // won't happen in type-safe code\n      typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n    }\n  }\n  /**\n   * Check whether to apply strict (LaTeX-adhering) behavior for unusual\n   * input (like `\\\\`).  Unlike `nonstrict`, will not throw an error;\n   * instead, \"error\" translates to a return value of `true`, while \"ignore\"\n   * translates to a return value of `false`.  May still print a warning:\n   * \"warn\" prints a warning and returns `false`.\n   * This is for the second category of `errorCode`s listed in the README.\n   */\n  ;\n\n  _proto.useStrictBehavior = function useStrictBehavior(errorCode, errorMsg, token) {\n    var strict = this.strict;\n\n    if (typeof strict === \"function\") {\n      // Allow return value of strict function to be boolean or string\n      // (or null/undefined, meaning no further processing).\n      // But catch any exceptions thrown by function, treating them\n      // like \"error\".\n      try {\n        strict = strict(errorCode, errorMsg, token);\n      } catch (error) {\n        strict = \"error\";\n      }\n    }\n\n    if (!strict || strict === \"ignore\") {\n      return false;\n    } else if (strict === true || strict === \"error\") {\n      return true;\n    } else if (strict === \"warn\") {\n      typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n      return false;\n    } else {\n      // won't happen in type-safe code\n      typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n      return false;\n    }\n  };\n\n  return Settings;\n}();\n\n/* harmony default export */ var src_Settings = (Settings_Settings);\n// CONCATENATED MODULE: ./src/Style.js\n/**\n * This file contains information and classes for the various kinds of styles\n * used in TeX. It provides a generic `Style` class, which holds information\n * about a specific style. It then provides instances of all the different kinds\n * of styles possible, and provides functions to move between them and get\n * information about them.\n */\n\n/**\n * The main style class. Contains a unique id for the style, a size (which is\n * the same for cramped and uncramped version of a style), and a cramped flag.\n */\nvar Style =\n/*#__PURE__*/\nfunction () {\n  function Style(id, size, cramped) {\n    this.id = void 0;\n    this.size = void 0;\n    this.cramped = void 0;\n    this.id = id;\n    this.size = size;\n    this.cramped = cramped;\n  }\n  /**\n   * Get the style of a superscript given a base in the current style.\n   */\n\n\n  var _proto = Style.prototype;\n\n  _proto.sup = function sup() {\n    return Style_styles[_sup[this.id]];\n  }\n  /**\n   * Get the style of a subscript given a base in the current style.\n   */\n  ;\n\n  _proto.sub = function sub() {\n    return Style_styles[_sub[this.id]];\n  }\n  /**\n   * Get the style of a fraction numerator given the fraction in the current\n   * style.\n   */\n  ;\n\n  _proto.fracNum = function fracNum() {\n    return Style_styles[_fracNum[this.id]];\n  }\n  /**\n   * Get the style of a fraction denominator given the fraction in the current\n   * style.\n   */\n  ;\n\n  _proto.fracDen = function fracDen() {\n    return Style_styles[_fracDen[this.id]];\n  }\n  /**\n   * Get the cramped version of a style (in particular, cramping a cramped style\n   * doesn't change the style).\n   */\n  ;\n\n  _proto.cramp = function cramp() {\n    return Style_styles[_cramp[this.id]];\n  }\n  /**\n   * Get a text or display version of this style.\n   */\n  ;\n\n  _proto.text = function text() {\n    return Style_styles[_text[this.id]];\n  }\n  /**\n   * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)\n   */\n  ;\n\n  _proto.isTight = function isTight() {\n    return this.size >= 2;\n  };\n\n  return Style;\n}(); // Export an interface for type checking, but don't expose the implementation.\n// This way, no more styles can be generated.\n\n\n// IDs of the different styles\nvar D = 0;\nvar Dc = 1;\nvar T = 2;\nvar Tc = 3;\nvar S = 4;\nvar Sc = 5;\nvar SS = 6;\nvar SSc = 7; // Instances of the different styles\n\nvar Style_styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another\n\nvar _sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];\nvar _sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar _fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];\nvar _fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar _cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];\nvar _text = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles.\n\n/* harmony default export */ var src_Style = ({\n  DISPLAY: Style_styles[D],\n  TEXT: Style_styles[T],\n  SCRIPT: Style_styles[S],\n  SCRIPTSCRIPT: Style_styles[SS]\n});\n// CONCATENATED MODULE: ./src/unicodeScripts.js\n/*\n * This file defines the Unicode scripts and script families that we\n * support. To add new scripts or families, just add a new entry to the\n * scriptData array below. Adding scripts to the scriptData array allows\n * characters from that script to appear in \\text{} environments.\n */\n\n/**\n * Each script or script family has a name and an array of blocks.\n * Each block is an array of two numbers which specify the start and\n * end points (inclusive) of a block of Unicode codepoints.\n */\n\n/**\n * Unicode block data for the families of scripts we support in \\text{}.\n * Scripts only need to appear here if they do not have font metrics.\n */\nvar scriptData = [{\n  // Latin characters beyond the Latin-1 characters we have metrics for.\n  // Needed for Czech, Hungarian and Turkish text, for example.\n  name: 'latin',\n  blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B\n  [0x0300, 0x036f]]\n}, {\n  // The Cyrillic script used by Russian and related languages.\n  // A Cyrillic subset used to be supported as explicitly defined\n  // symbols in symbols.js\n  name: 'cyrillic',\n  blocks: [[0x0400, 0x04ff]]\n}, {\n  // The Brahmic scripts of South and Southeast Asia\n  // Devanagari (0900–097F)\n  // Bengali (0980–09FF)\n  // Gurmukhi (0A00–0A7F)\n  // Gujarati (0A80–0AFF)\n  // Oriya (0B00–0B7F)\n  // Tamil (0B80–0BFF)\n  // Telugu (0C00–0C7F)\n  // Kannada (0C80–0CFF)\n  // Malayalam (0D00–0D7F)\n  // Sinhala (0D80–0DFF)\n  // Thai (0E00–0E7F)\n  // Lao (0E80–0EFF)\n  // Tibetan (0F00–0FFF)\n  // Myanmar (1000–109F)\n  name: 'brahmic',\n  blocks: [[0x0900, 0x109F]]\n}, {\n  name: 'georgian',\n  blocks: [[0x10A0, 0x10ff]]\n}, {\n  // Chinese and Japanese.\n  // The \"k\" in cjk is for Korean, but we've separated Korean out\n  name: \"cjk\",\n  blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana\n  [0x4E00, 0x9FAF], // CJK ideograms\n  [0xFF00, 0xFF60]]\n}, {\n  // Korean\n  name: 'hangul',\n  blocks: [[0xAC00, 0xD7AF]]\n}];\n/**\n * Given a codepoint, return the name of the script or script family\n * it is from, or null if it is not part of a known block\n */\n\nfunction scriptFromCodepoint(codepoint) {\n  for (var i = 0; i < scriptData.length; i++) {\n    var script = scriptData[i];\n\n    for (var _i = 0; _i < script.blocks.length; _i++) {\n      var block = script.blocks[_i];\n\n      if (codepoint >= block[0] && codepoint <= block[1]) {\n        return script.name;\n      }\n    }\n  }\n\n  return null;\n}\n/**\n * A flattened version of all the supported blocks in a single array.\n * This is an optimization to make supportedCodepoint() fast.\n */\n\nvar allBlocks = [];\nscriptData.forEach(function (s) {\n  return s.blocks.forEach(function (b) {\n    return allBlocks.push.apply(allBlocks, b);\n  });\n});\n/**\n * Given a codepoint, return true if it falls within one of the\n * scripts or script families defined above and false otherwise.\n *\n * Micro benchmarks shows that this is faster than\n * /[\\u3000-\\u30FF\\u4E00-\\u9FAF\\uFF00-\\uFF60\\uAC00-\\uD7AF\\u0900-\\u109F]/.test()\n * in Firefox, Chrome and Node.\n */\n\nfunction supportedCodepoint(codepoint) {\n  for (var i = 0; i < allBlocks.length; i += 2) {\n    if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) {\n      return true;\n    }\n  }\n\n  return false;\n}\n// CONCATENATED MODULE: ./src/svgGeometry.js\n/**\n * This file provides support to domTree.js\n * It's a storehouse of path geometry for SVG images.\n */\n// In all paths below, the viewBox-to-em scale is 1000:1.\nvar hLinePad = 80; // padding above a sqrt viniculum.\n\nvar svgGeometry_path = {\n  // sqrtMain path geometry is from glyph U221A in the font KaTeX Main\n  // All surds have 80 units padding above the viniculumn.\n  sqrtMain: \"M95,\" + (622 + hLinePad) + \"c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,\\n-10,-9.5,-14c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54c44.2,-33.3,65.8,\\n-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10s173,378,173,378c0.7,0,\\n35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429c69,-144,104.5,-217.7,106.5,\\n-221c5.3,-9.3,12,-14,20,-14H400000v40H845.2724s-225.272,467,-225.272,467\\ns-235,486,-235,486c-2.7,4.7,-9,7,-19,7c-6,0,-10,-1,-12,-3s-194,-422,-194,-422\\ns-65,47,-65,47z M834 \" + hLinePad + \"H400000v40H845z\",\n  // size1 is from glyph U221A in the font KaTeX_Size1-Regular\n  sqrtSize1: \"M263,\" + (601 + hLinePad) + \"c0.7,0,18,39.7,52,119c34,79.3,68.167,\\n158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120c340,-704.7,510.7,-1060.3,512,-1067\\nc4.7,-7.3,11,-11,19,-11H40000v40H1012.3s-271.3,567,-271.3,567c-38.7,80.7,-84,\\n175,-136,283c-52,108,-89.167,185.3,-111.5,232c-22.3,46.7,-33.8,70.3,-34.5,71\\nc-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1s-109,-253,-109,-253c-72.7,-168,-109.3,\\n-252,-110,-252c-10.7,8,-22,16.7,-34,26c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26\\ns76,-59,76,-59s76,-60,76,-60z M1001 \" + hLinePad + \"H40000v40H1012z\",\n  // size2 is from glyph U221A in the font KaTeX_Size2-Regular\n  // The 80 units padding is most obvious here. Note start node at M1001 80.\n  sqrtSize2: \"M1001,\" + hLinePad + \"H400000v40H1013.1s-83.4,268,-264.1,840c-180.7,\\n572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,\\n-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744c-10,12,-21,25,-33,39s-32,39,-32,39\\nc-6,-5.3,-15,-14,-27,-26s25,-30,25,-30c26.7,-32.7,52,-63,76,-91s52,-60,52,-60\\ns208,722,208,722c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,\\n-658.5c53.7,-170.3,84.5,-266.8,92.5,-289.5c4,-6.7,10,-10,18,-10z\\nM1001 \" + hLinePad + \"H400000v40H1013z\",\n  // size3 is from glyph U221A in the font KaTeX_Size3-Regular\n  sqrtSize3: \"M424,\" + (2398 + hLinePad) + \"c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,\\n-342,-109.8,-513.3,-110.5,-514c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,\\n25c-5.7,9.3,-9.8,16,-12.5,20s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,\\n-13s76,-122,76,-122s77,-121,77,-121s209,968,209,968c0,-2,84.7,-361.7,254,-1079\\nc169.3,-717.3,254.7,-1077.7,256,-1081c4,-6.7,10,-10,18,-10H400000v40H1014.6\\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185c-2,6,-10,9,-24,9\\nc-8,0,-12,-0.7,-12,-2z M1001 \" + hLinePad + \"H400000v40H1014z\",\n  // size4 is from glyph U221A in the font KaTeX_Size4-Regular\n  sqrtSize4: \"M473,\" + (2713 + hLinePad) + \"c339.3,-1799.3,509.3,-2700,510,-2702\\nc3.3,-7.3,9.3,-11,18,-11H400000v40H1017.7s-90.5,478,-276.2,1466c-185.7,988,\\n-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,\\n-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200c0,-1.3,-5.3,8.7,-16,30c-10.7,\\n21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26s76,-153,76,-153s77,-151,\\n77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,606z\\nM1001 \" + hLinePad + \"H400000v40H1017z\",\n  // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main\n  doubleleftarrow: \"M262 157\\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\\nm8 0v40h399730v-40zm0 194v40h399730v-40z\",\n  // doublerightarrow is from glyph U+21D2 in font KaTeX Main\n  doublerightarrow: \"M399738 392l\\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z\",\n  // leftarrow is from glyph U+2190 in font KaTeX Main\n  leftarrow: \"M400000 241H110l3-3c68.7-52.7 113.7-120\\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\\n l-3-3h399890zM100 241v40h399900v-40z\",\n  // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular\n  leftbrace: \"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z\",\n  leftbraceunder: \"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z\",\n  // overgroup is from the MnSymbol package (public domain)\n  leftgroup: \"M400000 80\\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\\n 435 0h399565z\",\n  leftgroupunder: \"M400000 262\\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\\n 435 219h399565z\",\n  // Harpoons are from glyph U+21BD in font KaTeX Main\n  leftharpoon: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z\",\n  leftharpoonplus: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\\nm0 0v40h400000v-40z\",\n  leftharpoondown: \"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z\",\n  leftharpoondownplus: \"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z\",\n  // hook is from glyph U+21A9 in font KaTeX Main\n  lefthook: \"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\\n 71.5 23h399859zM103 281v-40h399897v40z\",\n  leftlinesegment: \"M40 281 V428 H0 V94 H40 V241 H400000 v40z\\nM40 281 V428 H0 V94 H40 V241 H400000 v40z\",\n  leftmapsto: \"M40 281 V448H0V74H40V241H400000v40z\\nM40 281 V448H0V74H40V241H400000v40z\",\n  // tofrom is from glyph U+21C4 in font KaTeX AMS Regular\n  leftToFrom: \"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z\",\n  longequal: \"M0 50 h400000 v40H0z m0 194h40000v40H0z\\nM0 50 h400000 v40H0z m0 194h40000v40H0z\",\n  midbrace: \"M200428 334\\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z\",\n  midbraceunder: \"M199572 214\\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z\",\n  oiintSize1: \"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z\",\n  oiintSize2: \"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\\nc0 110 84 276 504 276s502.4-166 502.4-276z\",\n  oiiintSize1: \"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z\",\n  oiiintSize2: \"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z\",\n  rightarrow: \"M0 241v40h399891c-47.3 35.3-84 78-110 128\\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n 151.7 139 205zm0 0v40h399900v-40z\",\n  rightbrace: \"M400000 542l\\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z\",\n  rightbraceunder: \"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z\",\n  rightgroup: \"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\\n 3-1 3-3v-38c-76-158-257-219-435-219H0z\",\n  rightgroupunder: \"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z\",\n  rightharpoon: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\\n 69.2 92 94.5zm0 0v40h399900v-40z\",\n  rightharpoonplus: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z\",\n  rightharpoondown: \"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z\",\n  rightharpoondownplus: \"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\\nm0-194v40h400000v-40zm0 0v40h400000v-40z\",\n  righthook: \"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z\",\n  rightlinesegment: \"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z\",\n  rightToFrom: \"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z\",\n  // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular\n  twoheadleftarrow: \"M0 167c68 40\\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z\",\n  twoheadrightarrow: \"M400000 167\\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z\",\n  // tilde1 is a modified version of a glyph from the MnSymbol package\n  tilde1: \"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\\n-68.267.847-113-73.952-191-73.952z\",\n  // ditto tilde2, tilde3, & tilde4\n  tilde2: \"M344 55.266c-142 0-300.638 81.316-311.5 86.418\\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z\",\n  tilde3: \"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\\n -338 0-409-156.573-744-156.573z\",\n  tilde4: \"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\\n -175.236-744-175.236z\",\n  // vec is from glyph U+20D7 in font KaTeX Main\n  vec: \"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\\nc-16-25.333-24-45-24-59z\",\n  // widehat1 is a modified version of a glyph from the MnSymbol package\n  widehat1: \"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z\",\n  // ditto widehat2, widehat3, & widehat4\n  widehat2: \"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n  widehat3: \"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n  widehat4: \"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n  // widecheck paths are all inverted versions of widehat\n  widecheck1: \"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z\",\n  widecheck2: \"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n  widecheck3: \"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n  widecheck4: \"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n  // The next ten paths support reaction arrows from the mhchem package.\n  // Arrows for \\ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX\n  // baraboveleftarrow is mostly from from glyph U+2190 in font KaTeX Main\n  baraboveleftarrow: \"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z\",\n  // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main\n  rightarrowabovebar: \"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z\",\n  // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.\n  // Ref from mhchem.sty: \\rlap{\\raisebox{-.22ex}{$\\kern0.5em\n  baraboveshortleftharpoon: \"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z\",\n  rightharpoonaboveshortbar: \"M0,241 l0,40c399126,0,399993,0,399993,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z\",\n  shortbaraboveleftharpoon: \"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z\",\n  shortrightharpoonabovebar: \"M53,241l0,40c398570,0,399437,0,399437,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z\"\n};\n/* harmony default export */ var svgGeometry = ({\n  path: svgGeometry_path\n});\n// CONCATENATED MODULE: ./src/tree.js\n\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. It only contains\n * children and doesn't have any DOM node properties.\n */\nvar tree_DocumentFragment =\n/*#__PURE__*/\nfunction () {\n  // HtmlDomNode\n  // Never used; needed for satisfying interface.\n  function DocumentFragment(children) {\n    this.children = void 0;\n    this.classes = void 0;\n    this.height = void 0;\n    this.depth = void 0;\n    this.maxFontSize = void 0;\n    this.style = void 0;\n    this.children = children;\n    this.classes = [];\n    this.height = 0;\n    this.depth = 0;\n    this.maxFontSize = 0;\n    this.style = {};\n  }\n\n  var _proto = DocumentFragment.prototype;\n\n  _proto.hasClass = function hasClass(className) {\n    return utils.contains(this.classes, className);\n  }\n  /** Convert the fragment into a node. */\n  ;\n\n  _proto.toNode = function toNode() {\n    var frag = document.createDocumentFragment();\n\n    for (var i = 0; i < this.children.length; i++) {\n      frag.appendChild(this.children[i].toNode());\n    }\n\n    return frag;\n  }\n  /** Convert the fragment into HTML markup. */\n  ;\n\n  _proto.toMarkup = function toMarkup() {\n    var markup = \"\"; // Simply concatenate the markup for the children together.\n\n    for (var i = 0; i < this.children.length; i++) {\n      markup += this.children[i].toMarkup();\n    }\n\n    return markup;\n  }\n  /**\n   * Converts the math node into a string, similar to innerText. Applies to\n   * MathDomNode's only.\n   */\n  ;\n\n  _proto.toText = function toText() {\n    // To avoid this, we would subclass documentFragment separately for\n    // MathML, but polyfills for subclassing is expensive per PR 1469.\n    // $FlowFixMe: Only works for ChildType = MathDomNode.\n    var toText = function toText(child) {\n      return child.toText();\n    };\n\n    return this.children.map(toText).join(\"\");\n  };\n\n  return DocumentFragment;\n}();\n// CONCATENATED MODULE: ./src/domTree.js\n/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n *\n * TODO: refactor `span` and `anchor` into common superclass when\n * target environments support class inheritance\n */\n\n\n\n\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove empty classes.\n */\nvar createClass = function createClass(classes) {\n  return classes.filter(function (cls) {\n    return cls;\n  }).join(\" \");\n};\n\nvar initNode = function initNode(classes, options, style) {\n  this.classes = classes || [];\n  this.attributes = {};\n  this.height = 0;\n  this.depth = 0;\n  this.maxFontSize = 0;\n  this.style = style || {};\n\n  if (options) {\n    if (options.style.isTight()) {\n      this.classes.push(\"mtight\");\n    }\n\n    var color = options.getColor();\n\n    if (color) {\n      this.style.color = color;\n    }\n  }\n};\n/**\n * Convert into an HTML node\n */\n\n\nvar _toNode = function toNode(tagName) {\n  var node = document.createElement(tagName); // Apply the class\n\n  node.className = createClass(this.classes); // Apply inline styles\n\n  for (var style in this.style) {\n    if (this.style.hasOwnProperty(style)) {\n      // $FlowFixMe Flow doesn't seem to understand span.style's type.\n      node.style[style] = this.style[style];\n    }\n  } // Apply attributes\n\n\n  for (var attr in this.attributes) {\n    if (this.attributes.hasOwnProperty(attr)) {\n      node.setAttribute(attr, this.attributes[attr]);\n    }\n  } // Append the children, also as HTML nodes\n\n\n  for (var i = 0; i < this.children.length; i++) {\n    node.appendChild(this.children[i].toNode());\n  }\n\n  return node;\n};\n/**\n * Convert into an HTML markup string\n */\n\n\nvar _toMarkup = function toMarkup(tagName) {\n  var markup = \"<\" + tagName; // Add the class\n\n  if (this.classes.length) {\n    markup += \" class=\\\"\" + utils.escape(createClass(this.classes)) + \"\\\"\";\n  }\n\n  var styles = \"\"; // Add the styles, after hyphenation\n\n  for (var style in this.style) {\n    if (this.style.hasOwnProperty(style)) {\n      styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n    }\n  }\n\n  if (styles) {\n    markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n  } // Add the attributes\n\n\n  for (var attr in this.attributes) {\n    if (this.attributes.hasOwnProperty(attr)) {\n      markup += \" \" + attr + \"=\\\"\" + utils.escape(this.attributes[attr]) + \"\\\"\";\n    }\n  }\n\n  markup += \">\"; // Add the markup of the children, also as markup\n\n  for (var i = 0; i < this.children.length; i++) {\n    markup += this.children[i].toMarkup();\n  }\n\n  markup += \"</\" + tagName + \">\";\n  return markup;\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n// This type does not include all CSS properties. Additional properties should\n// be added as needed.\n\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style. It also contains information about its height, depth, and\n * maxFontSize.\n *\n * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan\n * otherwise. This typesafety is important when HTML builders access a span's\n * children.\n */\nvar domTree_Span =\n/*#__PURE__*/\nfunction () {\n  function Span(classes, children, options, style) {\n    this.children = void 0;\n    this.attributes = void 0;\n    this.classes = void 0;\n    this.height = void 0;\n    this.depth = void 0;\n    this.width = void 0;\n    this.maxFontSize = void 0;\n    this.style = void 0;\n    initNode.call(this, classes, options, style);\n    this.children = children || [];\n  }\n  /**\n   * Sets an arbitrary attribute on the span. Warning: use this wisely. Not\n   * all browsers support attributes the same, and having too many custom\n   * attributes is probably bad.\n   */\n\n\n  var _proto = Span.prototype;\n\n  _proto.setAttribute = function setAttribute(attribute, value) {\n    this.attributes[attribute] = value;\n  };\n\n  _proto.hasClass = function hasClass(className) {\n    return utils.contains(this.classes, className);\n  };\n\n  _proto.toNode = function toNode() {\n    return _toNode.call(this, \"span\");\n  };\n\n  _proto.toMarkup = function toMarkup() {\n    return _toMarkup.call(this, \"span\");\n  };\n\n  return Span;\n}();\n/**\n * This node represents an anchor (<a>) element with a hyperlink.  See `span`\n * for further details.\n */\n\nvar domTree_Anchor =\n/*#__PURE__*/\nfunction () {\n  function Anchor(href, classes, children, options) {\n    this.children = void 0;\n    this.attributes = void 0;\n    this.classes = void 0;\n    this.height = void 0;\n    this.depth = void 0;\n    this.maxFontSize = void 0;\n    this.style = void 0;\n    initNode.call(this, classes, options);\n    this.children = children || [];\n    this.setAttribute('href', href);\n  }\n\n  var _proto2 = Anchor.prototype;\n\n  _proto2.setAttribute = function setAttribute(attribute, value) {\n    this.attributes[attribute] = value;\n  };\n\n  _proto2.hasClass = function hasClass(className) {\n    return utils.contains(this.classes, className);\n  };\n\n  _proto2.toNode = function toNode() {\n    return _toNode.call(this, \"a\");\n  };\n\n  _proto2.toMarkup = function toMarkup() {\n    return _toMarkup.call(this, \"a\");\n  };\n\n  return Anchor;\n}();\n/**\n * This node represents an image embed (<img>) element.\n */\n\nvar domTree_Img =\n/*#__PURE__*/\nfunction () {\n  function Img(src, alt, style) {\n    this.src = void 0;\n    this.alt = void 0;\n    this.classes = void 0;\n    this.height = void 0;\n    this.depth = void 0;\n    this.maxFontSize = void 0;\n    this.style = void 0;\n    this.alt = alt;\n    this.src = src;\n    this.classes = [\"mord\"];\n    this.style = style;\n  }\n\n  var _proto3 = Img.prototype;\n\n  _proto3.hasClass = function hasClass(className) {\n    return utils.contains(this.classes, className);\n  };\n\n  _proto3.toNode = function toNode() {\n    var node = document.createElement(\"img\");\n    node.src = this.src;\n    node.alt = this.alt;\n    node.className = \"mord\"; // Apply inline styles\n\n    for (var style in this.style) {\n      if (this.style.hasOwnProperty(style)) {\n        // $FlowFixMe\n        node.style[style] = this.style[style];\n      }\n    }\n\n    return node;\n  };\n\n  _proto3.toMarkup = function toMarkup() {\n    var markup = \"<img  src='\" + this.src + \" 'alt='\" + this.alt + \"' \"; // Add the styles, after hyphenation\n\n    var styles = \"\";\n\n    for (var style in this.style) {\n      if (this.style.hasOwnProperty(style)) {\n        styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n      }\n    }\n\n    if (styles) {\n      markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n    }\n\n    markup += \"'/>\";\n    return markup;\n  };\n\n  return Img;\n}();\nvar iCombinations = {\n  'î': \"\\u0131\\u0302\",\n  'ï': \"\\u0131\\u0308\",\n  'í': \"\\u0131\\u0301\",\n  // 'ī': '\\u0131\\u0304', // enable when we add Extended Latin\n  'ì': \"\\u0131\\u0300\"\n};\n/**\n * A symbol node contains information about a single symbol. It either renders\n * to a single text node, or a span with a single text node in it, depending on\n * whether it has CSS classes, styles, or needs italic correction.\n */\n\nvar domTree_SymbolNode =\n/*#__PURE__*/\nfunction () {\n  function SymbolNode(text, height, depth, italic, skew, width, classes, style) {\n    this.text = void 0;\n    this.height = void 0;\n    this.depth = void 0;\n    this.italic = void 0;\n    this.skew = void 0;\n    this.width = void 0;\n    this.maxFontSize = void 0;\n    this.classes = void 0;\n    this.style = void 0;\n    this.text = text;\n    this.height = height || 0;\n    this.depth = depth || 0;\n    this.italic = italic || 0;\n    this.skew = skew || 0;\n    this.width = width || 0;\n    this.classes = classes || [];\n    this.style = style || {};\n    this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we\n    // can specify which fonts to use.  This allows us to render these\n    // characters with a serif font in situations where the browser would\n    // either default to a sans serif or render a placeholder character.\n    // We use CSS class names like cjk_fallback, hangul_fallback and\n    // brahmic_fallback. See ./unicodeScripts.js for the set of possible\n    // script names\n\n    var script = scriptFromCodepoint(this.text.charCodeAt(0));\n\n    if (script) {\n      this.classes.push(script + \"_fallback\");\n    }\n\n    if (/[îïíì]/.test(this.text)) {\n      // add ī when we add Extended Latin\n      this.text = iCombinations[this.text];\n    }\n  }\n\n  var _proto4 = SymbolNode.prototype;\n\n  _proto4.hasClass = function hasClass(className) {\n    return utils.contains(this.classes, className);\n  }\n  /**\n   * Creates a text node or span from a symbol node. Note that a span is only\n   * created if it is needed.\n   */\n  ;\n\n  _proto4.toNode = function toNode() {\n    var node = document.createTextNode(this.text);\n    var span = null;\n\n    if (this.italic > 0) {\n      span = document.createElement(\"span\");\n      span.style.marginRight = this.italic + \"em\";\n    }\n\n    if (this.classes.length > 0) {\n      span = span || document.createElement(\"span\");\n      span.className = createClass(this.classes);\n    }\n\n    for (var style in this.style) {\n      if (this.style.hasOwnProperty(style)) {\n        span = span || document.createElement(\"span\"); // $FlowFixMe Flow doesn't seem to understand span.style's type.\n\n        span.style[style] = this.style[style];\n      }\n    }\n\n    if (span) {\n      span.appendChild(node);\n      return span;\n    } else {\n      return node;\n    }\n  }\n  /**\n   * Creates markup for a symbol node.\n   */\n  ;\n\n  _proto4.toMarkup = function toMarkup() {\n    // TODO(alpert): More duplication than I'd like from\n    // span.prototype.toMarkup and symbolNode.prototype.toNode...\n    var needsSpan = false;\n    var markup = \"<span\";\n\n    if (this.classes.length) {\n      needsSpan = true;\n      markup += \" class=\\\"\";\n      markup += utils.escape(createClass(this.classes));\n      markup += \"\\\"\";\n    }\n\n    var styles = \"\";\n\n    if (this.italic > 0) {\n      styles += \"margin-right:\" + this.italic + \"em;\";\n    }\n\n    for (var style in this.style) {\n      if (this.style.hasOwnProperty(style)) {\n        styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n      }\n    }\n\n    if (styles) {\n      needsSpan = true;\n      markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n    }\n\n    var escaped = utils.escape(this.text);\n\n    if (needsSpan) {\n      markup += \">\";\n      markup += escaped;\n      markup += \"</span>\";\n      return markup;\n    } else {\n      return escaped;\n    }\n  };\n\n  return SymbolNode;\n}();\n/**\n * SVG nodes are used to render stretchy wide elements.\n */\n\nvar SvgNode =\n/*#__PURE__*/\nfunction () {\n  function SvgNode(children, attributes) {\n    this.children = void 0;\n    this.attributes = void 0;\n    this.children = children || [];\n    this.attributes = attributes || {};\n  }\n\n  var _proto5 = SvgNode.prototype;\n\n  _proto5.toNode = function toNode() {\n    var svgNS = \"http://www.w3.org/2000/svg\";\n    var node = document.createElementNS(svgNS, \"svg\"); // Apply attributes\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        node.setAttribute(attr, this.attributes[attr]);\n      }\n    }\n\n    for (var i = 0; i < this.children.length; i++) {\n      node.appendChild(this.children[i].toNode());\n    }\n\n    return node;\n  };\n\n  _proto5.toMarkup = function toMarkup() {\n    var markup = \"<svg\"; // Apply attributes\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        markup += \" \" + attr + \"='\" + this.attributes[attr] + \"'\";\n      }\n    }\n\n    markup += \">\";\n\n    for (var i = 0; i < this.children.length; i++) {\n      markup += this.children[i].toMarkup();\n    }\n\n    markup += \"</svg>\";\n    return markup;\n  };\n\n  return SvgNode;\n}();\nvar domTree_PathNode =\n/*#__PURE__*/\nfunction () {\n  function PathNode(pathName, alternate) {\n    this.pathName = void 0;\n    this.alternate = void 0;\n    this.pathName = pathName;\n    this.alternate = alternate; // Used only for tall \\sqrt\n  }\n\n  var _proto6 = PathNode.prototype;\n\n  _proto6.toNode = function toNode() {\n    var svgNS = \"http://www.w3.org/2000/svg\";\n    var node = document.createElementNS(svgNS, \"path\");\n\n    if (this.alternate) {\n      node.setAttribute(\"d\", this.alternate);\n    } else {\n      node.setAttribute(\"d\", svgGeometry.path[this.pathName]);\n    }\n\n    return node;\n  };\n\n  _proto6.toMarkup = function toMarkup() {\n    if (this.alternate) {\n      return \"<path d='\" + this.alternate + \"'/>\";\n    } else {\n      return \"<path d='\" + svgGeometry.path[this.pathName] + \"'/>\";\n    }\n  };\n\n  return PathNode;\n}();\nvar LineNode =\n/*#__PURE__*/\nfunction () {\n  function LineNode(attributes) {\n    this.attributes = void 0;\n    this.attributes = attributes || {};\n  }\n\n  var _proto7 = LineNode.prototype;\n\n  _proto7.toNode = function toNode() {\n    var svgNS = \"http://www.w3.org/2000/svg\";\n    var node = document.createElementNS(svgNS, \"line\"); // Apply attributes\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        node.setAttribute(attr, this.attributes[attr]);\n      }\n    }\n\n    return node;\n  };\n\n  _proto7.toMarkup = function toMarkup() {\n    var markup = \"<line\";\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        markup += \" \" + attr + \"='\" + this.attributes[attr] + \"'\";\n      }\n    }\n\n    markup += \"/>\";\n    return markup;\n  };\n\n  return LineNode;\n}();\nfunction assertSymbolDomNode(group) {\n  if (group instanceof domTree_SymbolNode) {\n    return group;\n  } else {\n    throw new Error(\"Expected symbolNode but got \" + String(group) + \".\");\n  }\n}\nfunction assertSpan(group) {\n  if (group instanceof domTree_Span) {\n    return group;\n  } else {\n    throw new Error(\"Expected span<HtmlDomNode> but got \" + String(group) + \".\");\n  }\n}\n// CONCATENATED MODULE: ./submodules/katex-fonts/fontMetricsData.js\n// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.\n/* harmony default export */ var fontMetricsData = ({\n  \"AMS-Regular\": {\n    \"65\": [0, 0.68889, 0, 0, 0.72222],\n    \"66\": [0, 0.68889, 0, 0, 0.66667],\n    \"67\": [0, 0.68889, 0, 0, 0.72222],\n    \"68\": [0, 0.68889, 0, 0, 0.72222],\n    \"69\": [0, 0.68889, 0, 0, 0.66667],\n    \"70\": [0, 0.68889, 0, 0, 0.61111],\n    \"71\": [0, 0.68889, 0, 0, 0.77778],\n    \"72\": [0, 0.68889, 0, 0, 0.77778],\n    \"73\": [0, 0.68889, 0, 0, 0.38889],\n    \"74\": [0.16667, 0.68889, 0, 0, 0.5],\n    \"75\": [0, 0.68889, 0, 0, 0.77778],\n    \"76\": [0, 0.68889, 0, 0, 0.66667],\n    \"77\": [0, 0.68889, 0, 0, 0.94445],\n    \"78\": [0, 0.68889, 0, 0, 0.72222],\n    \"79\": [0.16667, 0.68889, 0, 0, 0.77778],\n    \"80\": [0, 0.68889, 0, 0, 0.61111],\n    \"81\": [0.16667, 0.68889, 0, 0, 0.77778],\n    \"82\": [0, 0.68889, 0, 0, 0.72222],\n    \"83\": [0, 0.68889, 0, 0, 0.55556],\n    \"84\": [0, 0.68889, 0, 0, 0.66667],\n    \"85\": [0, 0.68889, 0, 0, 0.72222],\n    \"86\": [0, 0.68889, 0, 0, 0.72222],\n    \"87\": [0, 0.68889, 0, 0, 1.0],\n    \"88\": [0, 0.68889, 0, 0, 0.72222],\n    \"89\": [0, 0.68889, 0, 0, 0.72222],\n    \"90\": [0, 0.68889, 0, 0, 0.66667],\n    \"107\": [0, 0.68889, 0, 0, 0.55556],\n    \"165\": [0, 0.675, 0.025, 0, 0.75],\n    \"174\": [0.15559, 0.69224, 0, 0, 0.94666],\n    \"240\": [0, 0.68889, 0, 0, 0.55556],\n    \"295\": [0, 0.68889, 0, 0, 0.54028],\n    \"710\": [0, 0.825, 0, 0, 2.33334],\n    \"732\": [0, 0.9, 0, 0, 2.33334],\n    \"770\": [0, 0.825, 0, 0, 2.33334],\n    \"771\": [0, 0.9, 0, 0, 2.33334],\n    \"989\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"1008\": [0, 0.43056, 0.04028, 0, 0.66667],\n    \"8245\": [0, 0.54986, 0, 0, 0.275],\n    \"8463\": [0, 0.68889, 0, 0, 0.54028],\n    \"8487\": [0, 0.68889, 0, 0, 0.72222],\n    \"8498\": [0, 0.68889, 0, 0, 0.55556],\n    \"8502\": [0, 0.68889, 0, 0, 0.66667],\n    \"8503\": [0, 0.68889, 0, 0, 0.44445],\n    \"8504\": [0, 0.68889, 0, 0, 0.66667],\n    \"8513\": [0, 0.68889, 0, 0, 0.63889],\n    \"8592\": [-0.03598, 0.46402, 0, 0, 0.5],\n    \"8594\": [-0.03598, 0.46402, 0, 0, 0.5],\n    \"8602\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8603\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8606\": [0.01354, 0.52239, 0, 0, 1.0],\n    \"8608\": [0.01354, 0.52239, 0, 0, 1.0],\n    \"8610\": [0.01354, 0.52239, 0, 0, 1.11111],\n    \"8611\": [0.01354, 0.52239, 0, 0, 1.11111],\n    \"8619\": [0, 0.54986, 0, 0, 1.0],\n    \"8620\": [0, 0.54986, 0, 0, 1.0],\n    \"8621\": [-0.13313, 0.37788, 0, 0, 1.38889],\n    \"8622\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8624\": [0, 0.69224, 0, 0, 0.5],\n    \"8625\": [0, 0.69224, 0, 0, 0.5],\n    \"8630\": [0, 0.43056, 0, 0, 1.0],\n    \"8631\": [0, 0.43056, 0, 0, 1.0],\n    \"8634\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8635\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8638\": [0.19444, 0.69224, 0, 0, 0.41667],\n    \"8639\": [0.19444, 0.69224, 0, 0, 0.41667],\n    \"8642\": [0.19444, 0.69224, 0, 0, 0.41667],\n    \"8643\": [0.19444, 0.69224, 0, 0, 0.41667],\n    \"8644\": [0.1808, 0.675, 0, 0, 1.0],\n    \"8646\": [0.1808, 0.675, 0, 0, 1.0],\n    \"8647\": [0.1808, 0.675, 0, 0, 1.0],\n    \"8648\": [0.19444, 0.69224, 0, 0, 0.83334],\n    \"8649\": [0.1808, 0.675, 0, 0, 1.0],\n    \"8650\": [0.19444, 0.69224, 0, 0, 0.83334],\n    \"8651\": [0.01354, 0.52239, 0, 0, 1.0],\n    \"8652\": [0.01354, 0.52239, 0, 0, 1.0],\n    \"8653\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8654\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8655\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8666\": [0.13667, 0.63667, 0, 0, 1.0],\n    \"8667\": [0.13667, 0.63667, 0, 0, 1.0],\n    \"8669\": [-0.13313, 0.37788, 0, 0, 1.0],\n    \"8672\": [-0.064, 0.437, 0, 0, 1.334],\n    \"8674\": [-0.064, 0.437, 0, 0, 1.334],\n    \"8705\": [0, 0.825, 0, 0, 0.5],\n    \"8708\": [0, 0.68889, 0, 0, 0.55556],\n    \"8709\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8717\": [0, 0.43056, 0, 0, 0.42917],\n    \"8722\": [-0.03598, 0.46402, 0, 0, 0.5],\n    \"8724\": [0.08198, 0.69224, 0, 0, 0.77778],\n    \"8726\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8733\": [0, 0.69224, 0, 0, 0.77778],\n    \"8736\": [0, 0.69224, 0, 0, 0.72222],\n    \"8737\": [0, 0.69224, 0, 0, 0.72222],\n    \"8738\": [0.03517, 0.52239, 0, 0, 0.72222],\n    \"8739\": [0.08167, 0.58167, 0, 0, 0.22222],\n    \"8740\": [0.25142, 0.74111, 0, 0, 0.27778],\n    \"8741\": [0.08167, 0.58167, 0, 0, 0.38889],\n    \"8742\": [0.25142, 0.74111, 0, 0, 0.5],\n    \"8756\": [0, 0.69224, 0, 0, 0.66667],\n    \"8757\": [0, 0.69224, 0, 0, 0.66667],\n    \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n    \"8765\": [-0.13313, 0.37788, 0, 0, 0.77778],\n    \"8769\": [-0.13313, 0.36687, 0, 0, 0.77778],\n    \"8770\": [-0.03625, 0.46375, 0, 0, 0.77778],\n    \"8774\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n    \"8778\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8782\": [0.06062, 0.54986, 0, 0, 0.77778],\n    \"8783\": [0.06062, 0.54986, 0, 0, 0.77778],\n    \"8785\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8786\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8787\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8790\": [0, 0.69224, 0, 0, 0.77778],\n    \"8791\": [0.22958, 0.72958, 0, 0, 0.77778],\n    \"8796\": [0.08198, 0.91667, 0, 0, 0.77778],\n    \"8806\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"8807\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"8808\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"8809\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"8812\": [0.25583, 0.75583, 0, 0, 0.5],\n    \"8814\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8815\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8816\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8817\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8818\": [0.22958, 0.72958, 0, 0, 0.77778],\n    \"8819\": [0.22958, 0.72958, 0, 0, 0.77778],\n    \"8822\": [0.1808, 0.675, 0, 0, 0.77778],\n    \"8823\": [0.1808, 0.675, 0, 0, 0.77778],\n    \"8828\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8829\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8830\": [0.22958, 0.72958, 0, 0, 0.77778],\n    \"8831\": [0.22958, 0.72958, 0, 0, 0.77778],\n    \"8832\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8833\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8840\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8841\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8842\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8843\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8847\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8848\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8858\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8859\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8861\": [0.08198, 0.58198, 0, 0, 0.77778],\n    \"8862\": [0, 0.675, 0, 0, 0.77778],\n    \"8863\": [0, 0.675, 0, 0, 0.77778],\n    \"8864\": [0, 0.675, 0, 0, 0.77778],\n    \"8865\": [0, 0.675, 0, 0, 0.77778],\n    \"8872\": [0, 0.69224, 0, 0, 0.61111],\n    \"8873\": [0, 0.69224, 0, 0, 0.72222],\n    \"8874\": [0, 0.69224, 0, 0, 0.88889],\n    \"8876\": [0, 0.68889, 0, 0, 0.61111],\n    \"8877\": [0, 0.68889, 0, 0, 0.61111],\n    \"8878\": [0, 0.68889, 0, 0, 0.72222],\n    \"8879\": [0, 0.68889, 0, 0, 0.72222],\n    \"8882\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8883\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8884\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8885\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8888\": [0, 0.54986, 0, 0, 1.11111],\n    \"8890\": [0.19444, 0.43056, 0, 0, 0.55556],\n    \"8891\": [0.19444, 0.69224, 0, 0, 0.61111],\n    \"8892\": [0.19444, 0.69224, 0, 0, 0.61111],\n    \"8901\": [0, 0.54986, 0, 0, 0.27778],\n    \"8903\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8905\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8906\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"8907\": [0, 0.69224, 0, 0, 0.77778],\n    \"8908\": [0, 0.69224, 0, 0, 0.77778],\n    \"8909\": [-0.03598, 0.46402, 0, 0, 0.77778],\n    \"8910\": [0, 0.54986, 0, 0, 0.76042],\n    \"8911\": [0, 0.54986, 0, 0, 0.76042],\n    \"8912\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8913\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"8914\": [0, 0.54986, 0, 0, 0.66667],\n    \"8915\": [0, 0.54986, 0, 0, 0.66667],\n    \"8916\": [0, 0.69224, 0, 0, 0.66667],\n    \"8918\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8919\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8920\": [0.03517, 0.54986, 0, 0, 1.33334],\n    \"8921\": [0.03517, 0.54986, 0, 0, 1.33334],\n    \"8922\": [0.38569, 0.88569, 0, 0, 0.77778],\n    \"8923\": [0.38569, 0.88569, 0, 0, 0.77778],\n    \"8926\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8927\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"8928\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8929\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8934\": [0.23222, 0.74111, 0, 0, 0.77778],\n    \"8935\": [0.23222, 0.74111, 0, 0, 0.77778],\n    \"8936\": [0.23222, 0.74111, 0, 0, 0.77778],\n    \"8937\": [0.23222, 0.74111, 0, 0, 0.77778],\n    \"8938\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8939\": [0.20576, 0.70576, 0, 0, 0.77778],\n    \"8940\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8941\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"8994\": [0.19444, 0.69224, 0, 0, 0.77778],\n    \"8995\": [0.19444, 0.69224, 0, 0, 0.77778],\n    \"9416\": [0.15559, 0.69224, 0, 0, 0.90222],\n    \"9484\": [0, 0.69224, 0, 0, 0.5],\n    \"9488\": [0, 0.69224, 0, 0, 0.5],\n    \"9492\": [0, 0.37788, 0, 0, 0.5],\n    \"9496\": [0, 0.37788, 0, 0, 0.5],\n    \"9585\": [0.19444, 0.68889, 0, 0, 0.88889],\n    \"9586\": [0.19444, 0.74111, 0, 0, 0.88889],\n    \"9632\": [0, 0.675, 0, 0, 0.77778],\n    \"9633\": [0, 0.675, 0, 0, 0.77778],\n    \"9650\": [0, 0.54986, 0, 0, 0.72222],\n    \"9651\": [0, 0.54986, 0, 0, 0.72222],\n    \"9654\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"9660\": [0, 0.54986, 0, 0, 0.72222],\n    \"9661\": [0, 0.54986, 0, 0, 0.72222],\n    \"9664\": [0.03517, 0.54986, 0, 0, 0.77778],\n    \"9674\": [0.11111, 0.69224, 0, 0, 0.66667],\n    \"9733\": [0.19444, 0.69224, 0, 0, 0.94445],\n    \"10003\": [0, 0.69224, 0, 0, 0.83334],\n    \"10016\": [0, 0.69224, 0, 0, 0.83334],\n    \"10731\": [0.11111, 0.69224, 0, 0, 0.66667],\n    \"10846\": [0.19444, 0.75583, 0, 0, 0.61111],\n    \"10877\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"10878\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"10885\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"10886\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"10887\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"10888\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"10889\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10890\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10891\": [0.48256, 0.98256, 0, 0, 0.77778],\n    \"10892\": [0.48256, 0.98256, 0, 0, 0.77778],\n    \"10901\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"10902\": [0.13667, 0.63667, 0, 0, 0.77778],\n    \"10933\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"10934\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"10935\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10936\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10937\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10938\": [0.26167, 0.75726, 0, 0, 0.77778],\n    \"10949\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"10950\": [0.25583, 0.75583, 0, 0, 0.77778],\n    \"10955\": [0.28481, 0.79383, 0, 0, 0.77778],\n    \"10956\": [0.28481, 0.79383, 0, 0, 0.77778],\n    \"57350\": [0.08167, 0.58167, 0, 0, 0.22222],\n    \"57351\": [0.08167, 0.58167, 0, 0, 0.38889],\n    \"57352\": [0.08167, 0.58167, 0, 0, 0.77778],\n    \"57353\": [0, 0.43056, 0.04028, 0, 0.66667],\n    \"57356\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57357\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57358\": [0.41951, 0.91951, 0, 0, 0.77778],\n    \"57359\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"57360\": [0.30274, 0.79383, 0, 0, 0.77778],\n    \"57361\": [0.41951, 0.91951, 0, 0, 0.77778],\n    \"57366\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57367\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57368\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57369\": [0.25142, 0.75726, 0, 0, 0.77778],\n    \"57370\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"57371\": [0.13597, 0.63597, 0, 0, 0.77778]\n  },\n  \"Caligraphic-Regular\": {\n    \"48\": [0, 0.43056, 0, 0, 0.5],\n    \"49\": [0, 0.43056, 0, 0, 0.5],\n    \"50\": [0, 0.43056, 0, 0, 0.5],\n    \"51\": [0.19444, 0.43056, 0, 0, 0.5],\n    \"52\": [0.19444, 0.43056, 0, 0, 0.5],\n    \"53\": [0.19444, 0.43056, 0, 0, 0.5],\n    \"54\": [0, 0.64444, 0, 0, 0.5],\n    \"55\": [0.19444, 0.43056, 0, 0, 0.5],\n    \"56\": [0, 0.64444, 0, 0, 0.5],\n    \"57\": [0.19444, 0.43056, 0, 0, 0.5],\n    \"65\": [0, 0.68333, 0, 0.19445, 0.79847],\n    \"66\": [0, 0.68333, 0.03041, 0.13889, 0.65681],\n    \"67\": [0, 0.68333, 0.05834, 0.13889, 0.52653],\n    \"68\": [0, 0.68333, 0.02778, 0.08334, 0.77139],\n    \"69\": [0, 0.68333, 0.08944, 0.11111, 0.52778],\n    \"70\": [0, 0.68333, 0.09931, 0.11111, 0.71875],\n    \"71\": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],\n    \"72\": [0, 0.68333, 0.00965, 0.11111, 0.84452],\n    \"73\": [0, 0.68333, 0.07382, 0, 0.54452],\n    \"74\": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],\n    \"75\": [0, 0.68333, 0.01445, 0.05556, 0.76195],\n    \"76\": [0, 0.68333, 0, 0.13889, 0.68972],\n    \"77\": [0, 0.68333, 0, 0.13889, 1.2009],\n    \"78\": [0, 0.68333, 0.14736, 0.08334, 0.82049],\n    \"79\": [0, 0.68333, 0.02778, 0.11111, 0.79611],\n    \"80\": [0, 0.68333, 0.08222, 0.08334, 0.69556],\n    \"81\": [0.09722, 0.68333, 0, 0.11111, 0.81667],\n    \"82\": [0, 0.68333, 0, 0.08334, 0.8475],\n    \"83\": [0, 0.68333, 0.075, 0.13889, 0.60556],\n    \"84\": [0, 0.68333, 0.25417, 0, 0.54464],\n    \"85\": [0, 0.68333, 0.09931, 0.08334, 0.62583],\n    \"86\": [0, 0.68333, 0.08222, 0, 0.61278],\n    \"87\": [0, 0.68333, 0.08222, 0.08334, 0.98778],\n    \"88\": [0, 0.68333, 0.14643, 0.13889, 0.7133],\n    \"89\": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],\n    \"90\": [0, 0.68333, 0.07944, 0.13889, 0.72473]\n  },\n  \"Fraktur-Regular\": {\n    \"33\": [0, 0.69141, 0, 0, 0.29574],\n    \"34\": [0, 0.69141, 0, 0, 0.21471],\n    \"38\": [0, 0.69141, 0, 0, 0.73786],\n    \"39\": [0, 0.69141, 0, 0, 0.21201],\n    \"40\": [0.24982, 0.74947, 0, 0, 0.38865],\n    \"41\": [0.24982, 0.74947, 0, 0, 0.38865],\n    \"42\": [0, 0.62119, 0, 0, 0.27764],\n    \"43\": [0.08319, 0.58283, 0, 0, 0.75623],\n    \"44\": [0, 0.10803, 0, 0, 0.27764],\n    \"45\": [0.08319, 0.58283, 0, 0, 0.75623],\n    \"46\": [0, 0.10803, 0, 0, 0.27764],\n    \"47\": [0.24982, 0.74947, 0, 0, 0.50181],\n    \"48\": [0, 0.47534, 0, 0, 0.50181],\n    \"49\": [0, 0.47534, 0, 0, 0.50181],\n    \"50\": [0, 0.47534, 0, 0, 0.50181],\n    \"51\": [0.18906, 0.47534, 0, 0, 0.50181],\n    \"52\": [0.18906, 0.47534, 0, 0, 0.50181],\n    \"53\": [0.18906, 0.47534, 0, 0, 0.50181],\n    \"54\": [0, 0.69141, 0, 0, 0.50181],\n    \"55\": [0.18906, 0.47534, 0, 0, 0.50181],\n    \"56\": [0, 0.69141, 0, 0, 0.50181],\n    \"57\": [0.18906, 0.47534, 0, 0, 0.50181],\n    \"58\": [0, 0.47534, 0, 0, 0.21606],\n    \"59\": [0.12604, 0.47534, 0, 0, 0.21606],\n    \"61\": [-0.13099, 0.36866, 0, 0, 0.75623],\n    \"63\": [0, 0.69141, 0, 0, 0.36245],\n    \"65\": [0, 0.69141, 0, 0, 0.7176],\n    \"66\": [0, 0.69141, 0, 0, 0.88397],\n    \"67\": [0, 0.69141, 0, 0, 0.61254],\n    \"68\": [0, 0.69141, 0, 0, 0.83158],\n    \"69\": [0, 0.69141, 0, 0, 0.66278],\n    \"70\": [0.12604, 0.69141, 0, 0, 0.61119],\n    \"71\": [0, 0.69141, 0, 0, 0.78539],\n    \"72\": [0.06302, 0.69141, 0, 0, 0.7203],\n    \"73\": [0, 0.69141, 0, 0, 0.55448],\n    \"74\": [0.12604, 0.69141, 0, 0, 0.55231],\n    \"75\": [0, 0.69141, 0, 0, 0.66845],\n    \"76\": [0, 0.69141, 0, 0, 0.66602],\n    \"77\": [0, 0.69141, 0, 0, 1.04953],\n    \"78\": [0, 0.69141, 0, 0, 0.83212],\n    \"79\": [0, 0.69141, 0, 0, 0.82699],\n    \"80\": [0.18906, 0.69141, 0, 0, 0.82753],\n    \"81\": [0.03781, 0.69141, 0, 0, 0.82699],\n    \"82\": [0, 0.69141, 0, 0, 0.82807],\n    \"83\": [0, 0.69141, 0, 0, 0.82861],\n    \"84\": [0, 0.69141, 0, 0, 0.66899],\n    \"85\": [0, 0.69141, 0, 0, 0.64576],\n    \"86\": [0, 0.69141, 0, 0, 0.83131],\n    \"87\": [0, 0.69141, 0, 0, 1.04602],\n    \"88\": [0, 0.69141, 0, 0, 0.71922],\n    \"89\": [0.18906, 0.69141, 0, 0, 0.83293],\n    \"90\": [0.12604, 0.69141, 0, 0, 0.60201],\n    \"91\": [0.24982, 0.74947, 0, 0, 0.27764],\n    \"93\": [0.24982, 0.74947, 0, 0, 0.27764],\n    \"94\": [0, 0.69141, 0, 0, 0.49965],\n    \"97\": [0, 0.47534, 0, 0, 0.50046],\n    \"98\": [0, 0.69141, 0, 0, 0.51315],\n    \"99\": [0, 0.47534, 0, 0, 0.38946],\n    \"100\": [0, 0.62119, 0, 0, 0.49857],\n    \"101\": [0, 0.47534, 0, 0, 0.40053],\n    \"102\": [0.18906, 0.69141, 0, 0, 0.32626],\n    \"103\": [0.18906, 0.47534, 0, 0, 0.5037],\n    \"104\": [0.18906, 0.69141, 0, 0, 0.52126],\n    \"105\": [0, 0.69141, 0, 0, 0.27899],\n    \"106\": [0, 0.69141, 0, 0, 0.28088],\n    \"107\": [0, 0.69141, 0, 0, 0.38946],\n    \"108\": [0, 0.69141, 0, 0, 0.27953],\n    \"109\": [0, 0.47534, 0, 0, 0.76676],\n    \"110\": [0, 0.47534, 0, 0, 0.52666],\n    \"111\": [0, 0.47534, 0, 0, 0.48885],\n    \"112\": [0.18906, 0.52396, 0, 0, 0.50046],\n    \"113\": [0.18906, 0.47534, 0, 0, 0.48912],\n    \"114\": [0, 0.47534, 0, 0, 0.38919],\n    \"115\": [0, 0.47534, 0, 0, 0.44266],\n    \"116\": [0, 0.62119, 0, 0, 0.33301],\n    \"117\": [0, 0.47534, 0, 0, 0.5172],\n    \"118\": [0, 0.52396, 0, 0, 0.5118],\n    \"119\": [0, 0.52396, 0, 0, 0.77351],\n    \"120\": [0.18906, 0.47534, 0, 0, 0.38865],\n    \"121\": [0.18906, 0.47534, 0, 0, 0.49884],\n    \"122\": [0.18906, 0.47534, 0, 0, 0.39054],\n    \"8216\": [0, 0.69141, 0, 0, 0.21471],\n    \"8217\": [0, 0.69141, 0, 0, 0.21471],\n    \"58112\": [0, 0.62119, 0, 0, 0.49749],\n    \"58113\": [0, 0.62119, 0, 0, 0.4983],\n    \"58114\": [0.18906, 0.69141, 0, 0, 0.33328],\n    \"58115\": [0.18906, 0.69141, 0, 0, 0.32923],\n    \"58116\": [0.18906, 0.47534, 0, 0, 0.50343],\n    \"58117\": [0, 0.69141, 0, 0, 0.33301],\n    \"58118\": [0, 0.62119, 0, 0, 0.33409],\n    \"58119\": [0, 0.47534, 0, 0, 0.50073]\n  },\n  \"Main-Bold\": {\n    \"33\": [0, 0.69444, 0, 0, 0.35],\n    \"34\": [0, 0.69444, 0, 0, 0.60278],\n    \"35\": [0.19444, 0.69444, 0, 0, 0.95833],\n    \"36\": [0.05556, 0.75, 0, 0, 0.575],\n    \"37\": [0.05556, 0.75, 0, 0, 0.95833],\n    \"38\": [0, 0.69444, 0, 0, 0.89444],\n    \"39\": [0, 0.69444, 0, 0, 0.31944],\n    \"40\": [0.25, 0.75, 0, 0, 0.44722],\n    \"41\": [0.25, 0.75, 0, 0, 0.44722],\n    \"42\": [0, 0.75, 0, 0, 0.575],\n    \"43\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"44\": [0.19444, 0.15556, 0, 0, 0.31944],\n    \"45\": [0, 0.44444, 0, 0, 0.38333],\n    \"46\": [0, 0.15556, 0, 0, 0.31944],\n    \"47\": [0.25, 0.75, 0, 0, 0.575],\n    \"48\": [0, 0.64444, 0, 0, 0.575],\n    \"49\": [0, 0.64444, 0, 0, 0.575],\n    \"50\": [0, 0.64444, 0, 0, 0.575],\n    \"51\": [0, 0.64444, 0, 0, 0.575],\n    \"52\": [0, 0.64444, 0, 0, 0.575],\n    \"53\": [0, 0.64444, 0, 0, 0.575],\n    \"54\": [0, 0.64444, 0, 0, 0.575],\n    \"55\": [0, 0.64444, 0, 0, 0.575],\n    \"56\": [0, 0.64444, 0, 0, 0.575],\n    \"57\": [0, 0.64444, 0, 0, 0.575],\n    \"58\": [0, 0.44444, 0, 0, 0.31944],\n    \"59\": [0.19444, 0.44444, 0, 0, 0.31944],\n    \"60\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"61\": [-0.10889, 0.39111, 0, 0, 0.89444],\n    \"62\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"63\": [0, 0.69444, 0, 0, 0.54305],\n    \"64\": [0, 0.69444, 0, 0, 0.89444],\n    \"65\": [0, 0.68611, 0, 0, 0.86944],\n    \"66\": [0, 0.68611, 0, 0, 0.81805],\n    \"67\": [0, 0.68611, 0, 0, 0.83055],\n    \"68\": [0, 0.68611, 0, 0, 0.88194],\n    \"69\": [0, 0.68611, 0, 0, 0.75555],\n    \"70\": [0, 0.68611, 0, 0, 0.72361],\n    \"71\": [0, 0.68611, 0, 0, 0.90416],\n    \"72\": [0, 0.68611, 0, 0, 0.9],\n    \"73\": [0, 0.68611, 0, 0, 0.43611],\n    \"74\": [0, 0.68611, 0, 0, 0.59444],\n    \"75\": [0, 0.68611, 0, 0, 0.90138],\n    \"76\": [0, 0.68611, 0, 0, 0.69166],\n    \"77\": [0, 0.68611, 0, 0, 1.09166],\n    \"78\": [0, 0.68611, 0, 0, 0.9],\n    \"79\": [0, 0.68611, 0, 0, 0.86388],\n    \"80\": [0, 0.68611, 0, 0, 0.78611],\n    \"81\": [0.19444, 0.68611, 0, 0, 0.86388],\n    \"82\": [0, 0.68611, 0, 0, 0.8625],\n    \"83\": [0, 0.68611, 0, 0, 0.63889],\n    \"84\": [0, 0.68611, 0, 0, 0.8],\n    \"85\": [0, 0.68611, 0, 0, 0.88472],\n    \"86\": [0, 0.68611, 0.01597, 0, 0.86944],\n    \"87\": [0, 0.68611, 0.01597, 0, 1.18888],\n    \"88\": [0, 0.68611, 0, 0, 0.86944],\n    \"89\": [0, 0.68611, 0.02875, 0, 0.86944],\n    \"90\": [0, 0.68611, 0, 0, 0.70277],\n    \"91\": [0.25, 0.75, 0, 0, 0.31944],\n    \"92\": [0.25, 0.75, 0, 0, 0.575],\n    \"93\": [0.25, 0.75, 0, 0, 0.31944],\n    \"94\": [0, 0.69444, 0, 0, 0.575],\n    \"95\": [0.31, 0.13444, 0.03194, 0, 0.575],\n    \"97\": [0, 0.44444, 0, 0, 0.55902],\n    \"98\": [0, 0.69444, 0, 0, 0.63889],\n    \"99\": [0, 0.44444, 0, 0, 0.51111],\n    \"100\": [0, 0.69444, 0, 0, 0.63889],\n    \"101\": [0, 0.44444, 0, 0, 0.52708],\n    \"102\": [0, 0.69444, 0.10903, 0, 0.35139],\n    \"103\": [0.19444, 0.44444, 0.01597, 0, 0.575],\n    \"104\": [0, 0.69444, 0, 0, 0.63889],\n    \"105\": [0, 0.69444, 0, 0, 0.31944],\n    \"106\": [0.19444, 0.69444, 0, 0, 0.35139],\n    \"107\": [0, 0.69444, 0, 0, 0.60694],\n    \"108\": [0, 0.69444, 0, 0, 0.31944],\n    \"109\": [0, 0.44444, 0, 0, 0.95833],\n    \"110\": [0, 0.44444, 0, 0, 0.63889],\n    \"111\": [0, 0.44444, 0, 0, 0.575],\n    \"112\": [0.19444, 0.44444, 0, 0, 0.63889],\n    \"113\": [0.19444, 0.44444, 0, 0, 0.60694],\n    \"114\": [0, 0.44444, 0, 0, 0.47361],\n    \"115\": [0, 0.44444, 0, 0, 0.45361],\n    \"116\": [0, 0.63492, 0, 0, 0.44722],\n    \"117\": [0, 0.44444, 0, 0, 0.63889],\n    \"118\": [0, 0.44444, 0.01597, 0, 0.60694],\n    \"119\": [0, 0.44444, 0.01597, 0, 0.83055],\n    \"120\": [0, 0.44444, 0, 0, 0.60694],\n    \"121\": [0.19444, 0.44444, 0.01597, 0, 0.60694],\n    \"122\": [0, 0.44444, 0, 0, 0.51111],\n    \"123\": [0.25, 0.75, 0, 0, 0.575],\n    \"124\": [0.25, 0.75, 0, 0, 0.31944],\n    \"125\": [0.25, 0.75, 0, 0, 0.575],\n    \"126\": [0.35, 0.34444, 0, 0, 0.575],\n    \"168\": [0, 0.69444, 0, 0, 0.575],\n    \"172\": [0, 0.44444, 0, 0, 0.76666],\n    \"176\": [0, 0.69444, 0, 0, 0.86944],\n    \"177\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"184\": [0.17014, 0, 0, 0, 0.51111],\n    \"198\": [0, 0.68611, 0, 0, 1.04166],\n    \"215\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"216\": [0.04861, 0.73472, 0, 0, 0.89444],\n    \"223\": [0, 0.69444, 0, 0, 0.59722],\n    \"230\": [0, 0.44444, 0, 0, 0.83055],\n    \"247\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"248\": [0.09722, 0.54167, 0, 0, 0.575],\n    \"305\": [0, 0.44444, 0, 0, 0.31944],\n    \"338\": [0, 0.68611, 0, 0, 1.16944],\n    \"339\": [0, 0.44444, 0, 0, 0.89444],\n    \"567\": [0.19444, 0.44444, 0, 0, 0.35139],\n    \"710\": [0, 0.69444, 0, 0, 0.575],\n    \"711\": [0, 0.63194, 0, 0, 0.575],\n    \"713\": [0, 0.59611, 0, 0, 0.575],\n    \"714\": [0, 0.69444, 0, 0, 0.575],\n    \"715\": [0, 0.69444, 0, 0, 0.575],\n    \"728\": [0, 0.69444, 0, 0, 0.575],\n    \"729\": [0, 0.69444, 0, 0, 0.31944],\n    \"730\": [0, 0.69444, 0, 0, 0.86944],\n    \"732\": [0, 0.69444, 0, 0, 0.575],\n    \"733\": [0, 0.69444, 0, 0, 0.575],\n    \"915\": [0, 0.68611, 0, 0, 0.69166],\n    \"916\": [0, 0.68611, 0, 0, 0.95833],\n    \"920\": [0, 0.68611, 0, 0, 0.89444],\n    \"923\": [0, 0.68611, 0, 0, 0.80555],\n    \"926\": [0, 0.68611, 0, 0, 0.76666],\n    \"928\": [0, 0.68611, 0, 0, 0.9],\n    \"931\": [0, 0.68611, 0, 0, 0.83055],\n    \"933\": [0, 0.68611, 0, 0, 0.89444],\n    \"934\": [0, 0.68611, 0, 0, 0.83055],\n    \"936\": [0, 0.68611, 0, 0, 0.89444],\n    \"937\": [0, 0.68611, 0, 0, 0.83055],\n    \"8211\": [0, 0.44444, 0.03194, 0, 0.575],\n    \"8212\": [0, 0.44444, 0.03194, 0, 1.14999],\n    \"8216\": [0, 0.69444, 0, 0, 0.31944],\n    \"8217\": [0, 0.69444, 0, 0, 0.31944],\n    \"8220\": [0, 0.69444, 0, 0, 0.60278],\n    \"8221\": [0, 0.69444, 0, 0, 0.60278],\n    \"8224\": [0.19444, 0.69444, 0, 0, 0.51111],\n    \"8225\": [0.19444, 0.69444, 0, 0, 0.51111],\n    \"8242\": [0, 0.55556, 0, 0, 0.34444],\n    \"8407\": [0, 0.72444, 0.15486, 0, 0.575],\n    \"8463\": [0, 0.69444, 0, 0, 0.66759],\n    \"8465\": [0, 0.69444, 0, 0, 0.83055],\n    \"8467\": [0, 0.69444, 0, 0, 0.47361],\n    \"8472\": [0.19444, 0.44444, 0, 0, 0.74027],\n    \"8476\": [0, 0.69444, 0, 0, 0.83055],\n    \"8501\": [0, 0.69444, 0, 0, 0.70277],\n    \"8592\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8593\": [0.19444, 0.69444, 0, 0, 0.575],\n    \"8594\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8595\": [0.19444, 0.69444, 0, 0, 0.575],\n    \"8596\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8597\": [0.25, 0.75, 0, 0, 0.575],\n    \"8598\": [0.19444, 0.69444, 0, 0, 1.14999],\n    \"8599\": [0.19444, 0.69444, 0, 0, 1.14999],\n    \"8600\": [0.19444, 0.69444, 0, 0, 1.14999],\n    \"8601\": [0.19444, 0.69444, 0, 0, 1.14999],\n    \"8636\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8637\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8640\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8641\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8656\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8657\": [0.19444, 0.69444, 0, 0, 0.70277],\n    \"8658\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8659\": [0.19444, 0.69444, 0, 0, 0.70277],\n    \"8660\": [-0.10889, 0.39111, 0, 0, 1.14999],\n    \"8661\": [0.25, 0.75, 0, 0, 0.70277],\n    \"8704\": [0, 0.69444, 0, 0, 0.63889],\n    \"8706\": [0, 0.69444, 0.06389, 0, 0.62847],\n    \"8707\": [0, 0.69444, 0, 0, 0.63889],\n    \"8709\": [0.05556, 0.75, 0, 0, 0.575],\n    \"8711\": [0, 0.68611, 0, 0, 0.95833],\n    \"8712\": [0.08556, 0.58556, 0, 0, 0.76666],\n    \"8715\": [0.08556, 0.58556, 0, 0, 0.76666],\n    \"8722\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8723\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8725\": [0.25, 0.75, 0, 0, 0.575],\n    \"8726\": [0.25, 0.75, 0, 0, 0.575],\n    \"8727\": [-0.02778, 0.47222, 0, 0, 0.575],\n    \"8728\": [-0.02639, 0.47361, 0, 0, 0.575],\n    \"8729\": [-0.02639, 0.47361, 0, 0, 0.575],\n    \"8730\": [0.18, 0.82, 0, 0, 0.95833],\n    \"8733\": [0, 0.44444, 0, 0, 0.89444],\n    \"8734\": [0, 0.44444, 0, 0, 1.14999],\n    \"8736\": [0, 0.69224, 0, 0, 0.72222],\n    \"8739\": [0.25, 0.75, 0, 0, 0.31944],\n    \"8741\": [0.25, 0.75, 0, 0, 0.575],\n    \"8743\": [0, 0.55556, 0, 0, 0.76666],\n    \"8744\": [0, 0.55556, 0, 0, 0.76666],\n    \"8745\": [0, 0.55556, 0, 0, 0.76666],\n    \"8746\": [0, 0.55556, 0, 0, 0.76666],\n    \"8747\": [0.19444, 0.69444, 0.12778, 0, 0.56875],\n    \"8764\": [-0.10889, 0.39111, 0, 0, 0.89444],\n    \"8768\": [0.19444, 0.69444, 0, 0, 0.31944],\n    \"8771\": [0.00222, 0.50222, 0, 0, 0.89444],\n    \"8776\": [0.02444, 0.52444, 0, 0, 0.89444],\n    \"8781\": [0.00222, 0.50222, 0, 0, 0.89444],\n    \"8801\": [0.00222, 0.50222, 0, 0, 0.89444],\n    \"8804\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8805\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8810\": [0.08556, 0.58556, 0, 0, 1.14999],\n    \"8811\": [0.08556, 0.58556, 0, 0, 1.14999],\n    \"8826\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"8827\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"8834\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"8835\": [0.08556, 0.58556, 0, 0, 0.89444],\n    \"8838\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8839\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8846\": [0, 0.55556, 0, 0, 0.76666],\n    \"8849\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8850\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"8851\": [0, 0.55556, 0, 0, 0.76666],\n    \"8852\": [0, 0.55556, 0, 0, 0.76666],\n    \"8853\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8854\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8855\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8856\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8857\": [0.13333, 0.63333, 0, 0, 0.89444],\n    \"8866\": [0, 0.69444, 0, 0, 0.70277],\n    \"8867\": [0, 0.69444, 0, 0, 0.70277],\n    \"8868\": [0, 0.69444, 0, 0, 0.89444],\n    \"8869\": [0, 0.69444, 0, 0, 0.89444],\n    \"8900\": [-0.02639, 0.47361, 0, 0, 0.575],\n    \"8901\": [-0.02639, 0.47361, 0, 0, 0.31944],\n    \"8902\": [-0.02778, 0.47222, 0, 0, 0.575],\n    \"8968\": [0.25, 0.75, 0, 0, 0.51111],\n    \"8969\": [0.25, 0.75, 0, 0, 0.51111],\n    \"8970\": [0.25, 0.75, 0, 0, 0.51111],\n    \"8971\": [0.25, 0.75, 0, 0, 0.51111],\n    \"8994\": [-0.13889, 0.36111, 0, 0, 1.14999],\n    \"8995\": [-0.13889, 0.36111, 0, 0, 1.14999],\n    \"9651\": [0.19444, 0.69444, 0, 0, 1.02222],\n    \"9657\": [-0.02778, 0.47222, 0, 0, 0.575],\n    \"9661\": [0.19444, 0.69444, 0, 0, 1.02222],\n    \"9667\": [-0.02778, 0.47222, 0, 0, 0.575],\n    \"9711\": [0.19444, 0.69444, 0, 0, 1.14999],\n    \"9824\": [0.12963, 0.69444, 0, 0, 0.89444],\n    \"9825\": [0.12963, 0.69444, 0, 0, 0.89444],\n    \"9826\": [0.12963, 0.69444, 0, 0, 0.89444],\n    \"9827\": [0.12963, 0.69444, 0, 0, 0.89444],\n    \"9837\": [0, 0.75, 0, 0, 0.44722],\n    \"9838\": [0.19444, 0.69444, 0, 0, 0.44722],\n    \"9839\": [0.19444, 0.69444, 0, 0, 0.44722],\n    \"10216\": [0.25, 0.75, 0, 0, 0.44722],\n    \"10217\": [0.25, 0.75, 0, 0, 0.44722],\n    \"10815\": [0, 0.68611, 0, 0, 0.9],\n    \"10927\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"10928\": [0.19667, 0.69667, 0, 0, 0.89444],\n    \"57376\": [0.19444, 0.69444, 0, 0, 0]\n  },\n  \"Main-BoldItalic\": {\n    \"33\": [0, 0.69444, 0.11417, 0, 0.38611],\n    \"34\": [0, 0.69444, 0.07939, 0, 0.62055],\n    \"35\": [0.19444, 0.69444, 0.06833, 0, 0.94444],\n    \"37\": [0.05556, 0.75, 0.12861, 0, 0.94444],\n    \"38\": [0, 0.69444, 0.08528, 0, 0.88555],\n    \"39\": [0, 0.69444, 0.12945, 0, 0.35555],\n    \"40\": [0.25, 0.75, 0.15806, 0, 0.47333],\n    \"41\": [0.25, 0.75, 0.03306, 0, 0.47333],\n    \"42\": [0, 0.75, 0.14333, 0, 0.59111],\n    \"43\": [0.10333, 0.60333, 0.03306, 0, 0.88555],\n    \"44\": [0.19444, 0.14722, 0, 0, 0.35555],\n    \"45\": [0, 0.44444, 0.02611, 0, 0.41444],\n    \"46\": [0, 0.14722, 0, 0, 0.35555],\n    \"47\": [0.25, 0.75, 0.15806, 0, 0.59111],\n    \"48\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"49\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"50\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"51\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"52\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n    \"53\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"54\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"55\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n    \"56\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"57\": [0, 0.64444, 0.13167, 0, 0.59111],\n    \"58\": [0, 0.44444, 0.06695, 0, 0.35555],\n    \"59\": [0.19444, 0.44444, 0.06695, 0, 0.35555],\n    \"61\": [-0.10889, 0.39111, 0.06833, 0, 0.88555],\n    \"63\": [0, 0.69444, 0.11472, 0, 0.59111],\n    \"64\": [0, 0.69444, 0.09208, 0, 0.88555],\n    \"65\": [0, 0.68611, 0, 0, 0.86555],\n    \"66\": [0, 0.68611, 0.0992, 0, 0.81666],\n    \"67\": [0, 0.68611, 0.14208, 0, 0.82666],\n    \"68\": [0, 0.68611, 0.09062, 0, 0.87555],\n    \"69\": [0, 0.68611, 0.11431, 0, 0.75666],\n    \"70\": [0, 0.68611, 0.12903, 0, 0.72722],\n    \"71\": [0, 0.68611, 0.07347, 0, 0.89527],\n    \"72\": [0, 0.68611, 0.17208, 0, 0.8961],\n    \"73\": [0, 0.68611, 0.15681, 0, 0.47166],\n    \"74\": [0, 0.68611, 0.145, 0, 0.61055],\n    \"75\": [0, 0.68611, 0.14208, 0, 0.89499],\n    \"76\": [0, 0.68611, 0, 0, 0.69777],\n    \"77\": [0, 0.68611, 0.17208, 0, 1.07277],\n    \"78\": [0, 0.68611, 0.17208, 0, 0.8961],\n    \"79\": [0, 0.68611, 0.09062, 0, 0.85499],\n    \"80\": [0, 0.68611, 0.0992, 0, 0.78721],\n    \"81\": [0.19444, 0.68611, 0.09062, 0, 0.85499],\n    \"82\": [0, 0.68611, 0.02559, 0, 0.85944],\n    \"83\": [0, 0.68611, 0.11264, 0, 0.64999],\n    \"84\": [0, 0.68611, 0.12903, 0, 0.7961],\n    \"85\": [0, 0.68611, 0.17208, 0, 0.88083],\n    \"86\": [0, 0.68611, 0.18625, 0, 0.86555],\n    \"87\": [0, 0.68611, 0.18625, 0, 1.15999],\n    \"88\": [0, 0.68611, 0.15681, 0, 0.86555],\n    \"89\": [0, 0.68611, 0.19803, 0, 0.86555],\n    \"90\": [0, 0.68611, 0.14208, 0, 0.70888],\n    \"91\": [0.25, 0.75, 0.1875, 0, 0.35611],\n    \"93\": [0.25, 0.75, 0.09972, 0, 0.35611],\n    \"94\": [0, 0.69444, 0.06709, 0, 0.59111],\n    \"95\": [0.31, 0.13444, 0.09811, 0, 0.59111],\n    \"97\": [0, 0.44444, 0.09426, 0, 0.59111],\n    \"98\": [0, 0.69444, 0.07861, 0, 0.53222],\n    \"99\": [0, 0.44444, 0.05222, 0, 0.53222],\n    \"100\": [0, 0.69444, 0.10861, 0, 0.59111],\n    \"101\": [0, 0.44444, 0.085, 0, 0.53222],\n    \"102\": [0.19444, 0.69444, 0.21778, 0, 0.4],\n    \"103\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n    \"104\": [0, 0.69444, 0.09426, 0, 0.59111],\n    \"105\": [0, 0.69326, 0.11387, 0, 0.35555],\n    \"106\": [0.19444, 0.69326, 0.1672, 0, 0.35555],\n    \"107\": [0, 0.69444, 0.11111, 0, 0.53222],\n    \"108\": [0, 0.69444, 0.10861, 0, 0.29666],\n    \"109\": [0, 0.44444, 0.09426, 0, 0.94444],\n    \"110\": [0, 0.44444, 0.09426, 0, 0.64999],\n    \"111\": [0, 0.44444, 0.07861, 0, 0.59111],\n    \"112\": [0.19444, 0.44444, 0.07861, 0, 0.59111],\n    \"113\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n    \"114\": [0, 0.44444, 0.11111, 0, 0.50167],\n    \"115\": [0, 0.44444, 0.08167, 0, 0.48694],\n    \"116\": [0, 0.63492, 0.09639, 0, 0.385],\n    \"117\": [0, 0.44444, 0.09426, 0, 0.62055],\n    \"118\": [0, 0.44444, 0.11111, 0, 0.53222],\n    \"119\": [0, 0.44444, 0.11111, 0, 0.76777],\n    \"120\": [0, 0.44444, 0.12583, 0, 0.56055],\n    \"121\": [0.19444, 0.44444, 0.105, 0, 0.56166],\n    \"122\": [0, 0.44444, 0.13889, 0, 0.49055],\n    \"126\": [0.35, 0.34444, 0.11472, 0, 0.59111],\n    \"163\": [0, 0.69444, 0, 0, 0.86853],\n    \"168\": [0, 0.69444, 0.11473, 0, 0.59111],\n    \"176\": [0, 0.69444, 0, 0, 0.94888],\n    \"184\": [0.17014, 0, 0, 0, 0.53222],\n    \"198\": [0, 0.68611, 0.11431, 0, 1.02277],\n    \"216\": [0.04861, 0.73472, 0.09062, 0, 0.88555],\n    \"223\": [0.19444, 0.69444, 0.09736, 0, 0.665],\n    \"230\": [0, 0.44444, 0.085, 0, 0.82666],\n    \"248\": [0.09722, 0.54167, 0.09458, 0, 0.59111],\n    \"305\": [0, 0.44444, 0.09426, 0, 0.35555],\n    \"338\": [0, 0.68611, 0.11431, 0, 1.14054],\n    \"339\": [0, 0.44444, 0.085, 0, 0.82666],\n    \"567\": [0.19444, 0.44444, 0.04611, 0, 0.385],\n    \"710\": [0, 0.69444, 0.06709, 0, 0.59111],\n    \"711\": [0, 0.63194, 0.08271, 0, 0.59111],\n    \"713\": [0, 0.59444, 0.10444, 0, 0.59111],\n    \"714\": [0, 0.69444, 0.08528, 0, 0.59111],\n    \"715\": [0, 0.69444, 0, 0, 0.59111],\n    \"728\": [0, 0.69444, 0.10333, 0, 0.59111],\n    \"729\": [0, 0.69444, 0.12945, 0, 0.35555],\n    \"730\": [0, 0.69444, 0, 0, 0.94888],\n    \"732\": [0, 0.69444, 0.11472, 0, 0.59111],\n    \"733\": [0, 0.69444, 0.11472, 0, 0.59111],\n    \"915\": [0, 0.68611, 0.12903, 0, 0.69777],\n    \"916\": [0, 0.68611, 0, 0, 0.94444],\n    \"920\": [0, 0.68611, 0.09062, 0, 0.88555],\n    \"923\": [0, 0.68611, 0, 0, 0.80666],\n    \"926\": [0, 0.68611, 0.15092, 0, 0.76777],\n    \"928\": [0, 0.68611, 0.17208, 0, 0.8961],\n    \"931\": [0, 0.68611, 0.11431, 0, 0.82666],\n    \"933\": [0, 0.68611, 0.10778, 0, 0.88555],\n    \"934\": [0, 0.68611, 0.05632, 0, 0.82666],\n    \"936\": [0, 0.68611, 0.10778, 0, 0.88555],\n    \"937\": [0, 0.68611, 0.0992, 0, 0.82666],\n    \"8211\": [0, 0.44444, 0.09811, 0, 0.59111],\n    \"8212\": [0, 0.44444, 0.09811, 0, 1.18221],\n    \"8216\": [0, 0.69444, 0.12945, 0, 0.35555],\n    \"8217\": [0, 0.69444, 0.12945, 0, 0.35555],\n    \"8220\": [0, 0.69444, 0.16772, 0, 0.62055],\n    \"8221\": [0, 0.69444, 0.07939, 0, 0.62055]\n  },\n  \"Main-Italic\": {\n    \"33\": [0, 0.69444, 0.12417, 0, 0.30667],\n    \"34\": [0, 0.69444, 0.06961, 0, 0.51444],\n    \"35\": [0.19444, 0.69444, 0.06616, 0, 0.81777],\n    \"37\": [0.05556, 0.75, 0.13639, 0, 0.81777],\n    \"38\": [0, 0.69444, 0.09694, 0, 0.76666],\n    \"39\": [0, 0.69444, 0.12417, 0, 0.30667],\n    \"40\": [0.25, 0.75, 0.16194, 0, 0.40889],\n    \"41\": [0.25, 0.75, 0.03694, 0, 0.40889],\n    \"42\": [0, 0.75, 0.14917, 0, 0.51111],\n    \"43\": [0.05667, 0.56167, 0.03694, 0, 0.76666],\n    \"44\": [0.19444, 0.10556, 0, 0, 0.30667],\n    \"45\": [0, 0.43056, 0.02826, 0, 0.35778],\n    \"46\": [0, 0.10556, 0, 0, 0.30667],\n    \"47\": [0.25, 0.75, 0.16194, 0, 0.51111],\n    \"48\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"49\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"50\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"51\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"52\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n    \"53\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"54\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"55\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n    \"56\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"57\": [0, 0.64444, 0.13556, 0, 0.51111],\n    \"58\": [0, 0.43056, 0.0582, 0, 0.30667],\n    \"59\": [0.19444, 0.43056, 0.0582, 0, 0.30667],\n    \"61\": [-0.13313, 0.36687, 0.06616, 0, 0.76666],\n    \"63\": [0, 0.69444, 0.1225, 0, 0.51111],\n    \"64\": [0, 0.69444, 0.09597, 0, 0.76666],\n    \"65\": [0, 0.68333, 0, 0, 0.74333],\n    \"66\": [0, 0.68333, 0.10257, 0, 0.70389],\n    \"67\": [0, 0.68333, 0.14528, 0, 0.71555],\n    \"68\": [0, 0.68333, 0.09403, 0, 0.755],\n    \"69\": [0, 0.68333, 0.12028, 0, 0.67833],\n    \"70\": [0, 0.68333, 0.13305, 0, 0.65277],\n    \"71\": [0, 0.68333, 0.08722, 0, 0.77361],\n    \"72\": [0, 0.68333, 0.16389, 0, 0.74333],\n    \"73\": [0, 0.68333, 0.15806, 0, 0.38555],\n    \"74\": [0, 0.68333, 0.14028, 0, 0.525],\n    \"75\": [0, 0.68333, 0.14528, 0, 0.76888],\n    \"76\": [0, 0.68333, 0, 0, 0.62722],\n    \"77\": [0, 0.68333, 0.16389, 0, 0.89666],\n    \"78\": [0, 0.68333, 0.16389, 0, 0.74333],\n    \"79\": [0, 0.68333, 0.09403, 0, 0.76666],\n    \"80\": [0, 0.68333, 0.10257, 0, 0.67833],\n    \"81\": [0.19444, 0.68333, 0.09403, 0, 0.76666],\n    \"82\": [0, 0.68333, 0.03868, 0, 0.72944],\n    \"83\": [0, 0.68333, 0.11972, 0, 0.56222],\n    \"84\": [0, 0.68333, 0.13305, 0, 0.71555],\n    \"85\": [0, 0.68333, 0.16389, 0, 0.74333],\n    \"86\": [0, 0.68333, 0.18361, 0, 0.74333],\n    \"87\": [0, 0.68333, 0.18361, 0, 0.99888],\n    \"88\": [0, 0.68333, 0.15806, 0, 0.74333],\n    \"89\": [0, 0.68333, 0.19383, 0, 0.74333],\n    \"90\": [0, 0.68333, 0.14528, 0, 0.61333],\n    \"91\": [0.25, 0.75, 0.1875, 0, 0.30667],\n    \"93\": [0.25, 0.75, 0.10528, 0, 0.30667],\n    \"94\": [0, 0.69444, 0.06646, 0, 0.51111],\n    \"95\": [0.31, 0.12056, 0.09208, 0, 0.51111],\n    \"97\": [0, 0.43056, 0.07671, 0, 0.51111],\n    \"98\": [0, 0.69444, 0.06312, 0, 0.46],\n    \"99\": [0, 0.43056, 0.05653, 0, 0.46],\n    \"100\": [0, 0.69444, 0.10333, 0, 0.51111],\n    \"101\": [0, 0.43056, 0.07514, 0, 0.46],\n    \"102\": [0.19444, 0.69444, 0.21194, 0, 0.30667],\n    \"103\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n    \"104\": [0, 0.69444, 0.07671, 0, 0.51111],\n    \"105\": [0, 0.65536, 0.1019, 0, 0.30667],\n    \"106\": [0.19444, 0.65536, 0.14467, 0, 0.30667],\n    \"107\": [0, 0.69444, 0.10764, 0, 0.46],\n    \"108\": [0, 0.69444, 0.10333, 0, 0.25555],\n    \"109\": [0, 0.43056, 0.07671, 0, 0.81777],\n    \"110\": [0, 0.43056, 0.07671, 0, 0.56222],\n    \"111\": [0, 0.43056, 0.06312, 0, 0.51111],\n    \"112\": [0.19444, 0.43056, 0.06312, 0, 0.51111],\n    \"113\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n    \"114\": [0, 0.43056, 0.10764, 0, 0.42166],\n    \"115\": [0, 0.43056, 0.08208, 0, 0.40889],\n    \"116\": [0, 0.61508, 0.09486, 0, 0.33222],\n    \"117\": [0, 0.43056, 0.07671, 0, 0.53666],\n    \"118\": [0, 0.43056, 0.10764, 0, 0.46],\n    \"119\": [0, 0.43056, 0.10764, 0, 0.66444],\n    \"120\": [0, 0.43056, 0.12042, 0, 0.46389],\n    \"121\": [0.19444, 0.43056, 0.08847, 0, 0.48555],\n    \"122\": [0, 0.43056, 0.12292, 0, 0.40889],\n    \"126\": [0.35, 0.31786, 0.11585, 0, 0.51111],\n    \"163\": [0, 0.69444, 0, 0, 0.76909],\n    \"168\": [0, 0.66786, 0.10474, 0, 0.51111],\n    \"176\": [0, 0.69444, 0, 0, 0.83129],\n    \"184\": [0.17014, 0, 0, 0, 0.46],\n    \"198\": [0, 0.68333, 0.12028, 0, 0.88277],\n    \"216\": [0.04861, 0.73194, 0.09403, 0, 0.76666],\n    \"223\": [0.19444, 0.69444, 0.10514, 0, 0.53666],\n    \"230\": [0, 0.43056, 0.07514, 0, 0.71555],\n    \"248\": [0.09722, 0.52778, 0.09194, 0, 0.51111],\n    \"305\": [0, 0.43056, 0, 0.02778, 0.32246],\n    \"338\": [0, 0.68333, 0.12028, 0, 0.98499],\n    \"339\": [0, 0.43056, 0.07514, 0, 0.71555],\n    \"567\": [0.19444, 0.43056, 0, 0.08334, 0.38403],\n    \"710\": [0, 0.69444, 0.06646, 0, 0.51111],\n    \"711\": [0, 0.62847, 0.08295, 0, 0.51111],\n    \"713\": [0, 0.56167, 0.10333, 0, 0.51111],\n    \"714\": [0, 0.69444, 0.09694, 0, 0.51111],\n    \"715\": [0, 0.69444, 0, 0, 0.51111],\n    \"728\": [0, 0.69444, 0.10806, 0, 0.51111],\n    \"729\": [0, 0.66786, 0.11752, 0, 0.30667],\n    \"730\": [0, 0.69444, 0, 0, 0.83129],\n    \"732\": [0, 0.66786, 0.11585, 0, 0.51111],\n    \"733\": [0, 0.69444, 0.1225, 0, 0.51111],\n    \"915\": [0, 0.68333, 0.13305, 0, 0.62722],\n    \"916\": [0, 0.68333, 0, 0, 0.81777],\n    \"920\": [0, 0.68333, 0.09403, 0, 0.76666],\n    \"923\": [0, 0.68333, 0, 0, 0.69222],\n    \"926\": [0, 0.68333, 0.15294, 0, 0.66444],\n    \"928\": [0, 0.68333, 0.16389, 0, 0.74333],\n    \"931\": [0, 0.68333, 0.12028, 0, 0.71555],\n    \"933\": [0, 0.68333, 0.11111, 0, 0.76666],\n    \"934\": [0, 0.68333, 0.05986, 0, 0.71555],\n    \"936\": [0, 0.68333, 0.11111, 0, 0.76666],\n    \"937\": [0, 0.68333, 0.10257, 0, 0.71555],\n    \"8211\": [0, 0.43056, 0.09208, 0, 0.51111],\n    \"8212\": [0, 0.43056, 0.09208, 0, 1.02222],\n    \"8216\": [0, 0.69444, 0.12417, 0, 0.30667],\n    \"8217\": [0, 0.69444, 0.12417, 0, 0.30667],\n    \"8220\": [0, 0.69444, 0.1685, 0, 0.51444],\n    \"8221\": [0, 0.69444, 0.06961, 0, 0.51444],\n    \"8463\": [0, 0.68889, 0, 0, 0.54028]\n  },\n  \"Main-Regular\": {\n    \"32\": [0, 0, 0, 0, 0.25],\n    \"33\": [0, 0.69444, 0, 0, 0.27778],\n    \"34\": [0, 0.69444, 0, 0, 0.5],\n    \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n    \"36\": [0.05556, 0.75, 0, 0, 0.5],\n    \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n    \"38\": [0, 0.69444, 0, 0, 0.77778],\n    \"39\": [0, 0.69444, 0, 0, 0.27778],\n    \"40\": [0.25, 0.75, 0, 0, 0.38889],\n    \"41\": [0.25, 0.75, 0, 0, 0.38889],\n    \"42\": [0, 0.75, 0, 0, 0.5],\n    \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"44\": [0.19444, 0.10556, 0, 0, 0.27778],\n    \"45\": [0, 0.43056, 0, 0, 0.33333],\n    \"46\": [0, 0.10556, 0, 0, 0.27778],\n    \"47\": [0.25, 0.75, 0, 0, 0.5],\n    \"48\": [0, 0.64444, 0, 0, 0.5],\n    \"49\": [0, 0.64444, 0, 0, 0.5],\n    \"50\": [0, 0.64444, 0, 0, 0.5],\n    \"51\": [0, 0.64444, 0, 0, 0.5],\n    \"52\": [0, 0.64444, 0, 0, 0.5],\n    \"53\": [0, 0.64444, 0, 0, 0.5],\n    \"54\": [0, 0.64444, 0, 0, 0.5],\n    \"55\": [0, 0.64444, 0, 0, 0.5],\n    \"56\": [0, 0.64444, 0, 0, 0.5],\n    \"57\": [0, 0.64444, 0, 0, 0.5],\n    \"58\": [0, 0.43056, 0, 0, 0.27778],\n    \"59\": [0.19444, 0.43056, 0, 0, 0.27778],\n    \"60\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"61\": [-0.13313, 0.36687, 0, 0, 0.77778],\n    \"62\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"63\": [0, 0.69444, 0, 0, 0.47222],\n    \"64\": [0, 0.69444, 0, 0, 0.77778],\n    \"65\": [0, 0.68333, 0, 0, 0.75],\n    \"66\": [0, 0.68333, 0, 0, 0.70834],\n    \"67\": [0, 0.68333, 0, 0, 0.72222],\n    \"68\": [0, 0.68333, 0, 0, 0.76389],\n    \"69\": [0, 0.68333, 0, 0, 0.68056],\n    \"70\": [0, 0.68333, 0, 0, 0.65278],\n    \"71\": [0, 0.68333, 0, 0, 0.78472],\n    \"72\": [0, 0.68333, 0, 0, 0.75],\n    \"73\": [0, 0.68333, 0, 0, 0.36111],\n    \"74\": [0, 0.68333, 0, 0, 0.51389],\n    \"75\": [0, 0.68333, 0, 0, 0.77778],\n    \"76\": [0, 0.68333, 0, 0, 0.625],\n    \"77\": [0, 0.68333, 0, 0, 0.91667],\n    \"78\": [0, 0.68333, 0, 0, 0.75],\n    \"79\": [0, 0.68333, 0, 0, 0.77778],\n    \"80\": [0, 0.68333, 0, 0, 0.68056],\n    \"81\": [0.19444, 0.68333, 0, 0, 0.77778],\n    \"82\": [0, 0.68333, 0, 0, 0.73611],\n    \"83\": [0, 0.68333, 0, 0, 0.55556],\n    \"84\": [0, 0.68333, 0, 0, 0.72222],\n    \"85\": [0, 0.68333, 0, 0, 0.75],\n    \"86\": [0, 0.68333, 0.01389, 0, 0.75],\n    \"87\": [0, 0.68333, 0.01389, 0, 1.02778],\n    \"88\": [0, 0.68333, 0, 0, 0.75],\n    \"89\": [0, 0.68333, 0.025, 0, 0.75],\n    \"90\": [0, 0.68333, 0, 0, 0.61111],\n    \"91\": [0.25, 0.75, 0, 0, 0.27778],\n    \"92\": [0.25, 0.75, 0, 0, 0.5],\n    \"93\": [0.25, 0.75, 0, 0, 0.27778],\n    \"94\": [0, 0.69444, 0, 0, 0.5],\n    \"95\": [0.31, 0.12056, 0.02778, 0, 0.5],\n    \"97\": [0, 0.43056, 0, 0, 0.5],\n    \"98\": [0, 0.69444, 0, 0, 0.55556],\n    \"99\": [0, 0.43056, 0, 0, 0.44445],\n    \"100\": [0, 0.69444, 0, 0, 0.55556],\n    \"101\": [0, 0.43056, 0, 0, 0.44445],\n    \"102\": [0, 0.69444, 0.07778, 0, 0.30556],\n    \"103\": [0.19444, 0.43056, 0.01389, 0, 0.5],\n    \"104\": [0, 0.69444, 0, 0, 0.55556],\n    \"105\": [0, 0.66786, 0, 0, 0.27778],\n    \"106\": [0.19444, 0.66786, 0, 0, 0.30556],\n    \"107\": [0, 0.69444, 0, 0, 0.52778],\n    \"108\": [0, 0.69444, 0, 0, 0.27778],\n    \"109\": [0, 0.43056, 0, 0, 0.83334],\n    \"110\": [0, 0.43056, 0, 0, 0.55556],\n    \"111\": [0, 0.43056, 0, 0, 0.5],\n    \"112\": [0.19444, 0.43056, 0, 0, 0.55556],\n    \"113\": [0.19444, 0.43056, 0, 0, 0.52778],\n    \"114\": [0, 0.43056, 0, 0, 0.39167],\n    \"115\": [0, 0.43056, 0, 0, 0.39445],\n    \"116\": [0, 0.61508, 0, 0, 0.38889],\n    \"117\": [0, 0.43056, 0, 0, 0.55556],\n    \"118\": [0, 0.43056, 0.01389, 0, 0.52778],\n    \"119\": [0, 0.43056, 0.01389, 0, 0.72222],\n    \"120\": [0, 0.43056, 0, 0, 0.52778],\n    \"121\": [0.19444, 0.43056, 0.01389, 0, 0.52778],\n    \"122\": [0, 0.43056, 0, 0, 0.44445],\n    \"123\": [0.25, 0.75, 0, 0, 0.5],\n    \"124\": [0.25, 0.75, 0, 0, 0.27778],\n    \"125\": [0.25, 0.75, 0, 0, 0.5],\n    \"126\": [0.35, 0.31786, 0, 0, 0.5],\n    \"160\": [0, 0, 0, 0, 0.25],\n    \"167\": [0.19444, 0.69444, 0, 0, 0.44445],\n    \"168\": [0, 0.66786, 0, 0, 0.5],\n    \"172\": [0, 0.43056, 0, 0, 0.66667],\n    \"176\": [0, 0.69444, 0, 0, 0.75],\n    \"177\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"182\": [0.19444, 0.69444, 0, 0, 0.61111],\n    \"184\": [0.17014, 0, 0, 0, 0.44445],\n    \"198\": [0, 0.68333, 0, 0, 0.90278],\n    \"215\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"216\": [0.04861, 0.73194, 0, 0, 0.77778],\n    \"223\": [0, 0.69444, 0, 0, 0.5],\n    \"230\": [0, 0.43056, 0, 0, 0.72222],\n    \"247\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"248\": [0.09722, 0.52778, 0, 0, 0.5],\n    \"305\": [0, 0.43056, 0, 0, 0.27778],\n    \"338\": [0, 0.68333, 0, 0, 1.01389],\n    \"339\": [0, 0.43056, 0, 0, 0.77778],\n    \"567\": [0.19444, 0.43056, 0, 0, 0.30556],\n    \"710\": [0, 0.69444, 0, 0, 0.5],\n    \"711\": [0, 0.62847, 0, 0, 0.5],\n    \"713\": [0, 0.56778, 0, 0, 0.5],\n    \"714\": [0, 0.69444, 0, 0, 0.5],\n    \"715\": [0, 0.69444, 0, 0, 0.5],\n    \"728\": [0, 0.69444, 0, 0, 0.5],\n    \"729\": [0, 0.66786, 0, 0, 0.27778],\n    \"730\": [0, 0.69444, 0, 0, 0.75],\n    \"732\": [0, 0.66786, 0, 0, 0.5],\n    \"733\": [0, 0.69444, 0, 0, 0.5],\n    \"915\": [0, 0.68333, 0, 0, 0.625],\n    \"916\": [0, 0.68333, 0, 0, 0.83334],\n    \"920\": [0, 0.68333, 0, 0, 0.77778],\n    \"923\": [0, 0.68333, 0, 0, 0.69445],\n    \"926\": [0, 0.68333, 0, 0, 0.66667],\n    \"928\": [0, 0.68333, 0, 0, 0.75],\n    \"931\": [0, 0.68333, 0, 0, 0.72222],\n    \"933\": [0, 0.68333, 0, 0, 0.77778],\n    \"934\": [0, 0.68333, 0, 0, 0.72222],\n    \"936\": [0, 0.68333, 0, 0, 0.77778],\n    \"937\": [0, 0.68333, 0, 0, 0.72222],\n    \"8211\": [0, 0.43056, 0.02778, 0, 0.5],\n    \"8212\": [0, 0.43056, 0.02778, 0, 1.0],\n    \"8216\": [0, 0.69444, 0, 0, 0.27778],\n    \"8217\": [0, 0.69444, 0, 0, 0.27778],\n    \"8220\": [0, 0.69444, 0, 0, 0.5],\n    \"8221\": [0, 0.69444, 0, 0, 0.5],\n    \"8224\": [0.19444, 0.69444, 0, 0, 0.44445],\n    \"8225\": [0.19444, 0.69444, 0, 0, 0.44445],\n    \"8230\": [0, 0.12, 0, 0, 1.172],\n    \"8242\": [0, 0.55556, 0, 0, 0.275],\n    \"8407\": [0, 0.71444, 0.15382, 0, 0.5],\n    \"8463\": [0, 0.68889, 0, 0, 0.54028],\n    \"8465\": [0, 0.69444, 0, 0, 0.72222],\n    \"8467\": [0, 0.69444, 0, 0.11111, 0.41667],\n    \"8472\": [0.19444, 0.43056, 0, 0.11111, 0.63646],\n    \"8476\": [0, 0.69444, 0, 0, 0.72222],\n    \"8501\": [0, 0.69444, 0, 0, 0.61111],\n    \"8592\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8593\": [0.19444, 0.69444, 0, 0, 0.5],\n    \"8594\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8595\": [0.19444, 0.69444, 0, 0, 0.5],\n    \"8596\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8597\": [0.25, 0.75, 0, 0, 0.5],\n    \"8598\": [0.19444, 0.69444, 0, 0, 1.0],\n    \"8599\": [0.19444, 0.69444, 0, 0, 1.0],\n    \"8600\": [0.19444, 0.69444, 0, 0, 1.0],\n    \"8601\": [0.19444, 0.69444, 0, 0, 1.0],\n    \"8614\": [0.011, 0.511, 0, 0, 1.0],\n    \"8617\": [0.011, 0.511, 0, 0, 1.126],\n    \"8618\": [0.011, 0.511, 0, 0, 1.126],\n    \"8636\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8637\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8640\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8641\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8652\": [0.011, 0.671, 0, 0, 1.0],\n    \"8656\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8657\": [0.19444, 0.69444, 0, 0, 0.61111],\n    \"8658\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8659\": [0.19444, 0.69444, 0, 0, 0.61111],\n    \"8660\": [-0.13313, 0.36687, 0, 0, 1.0],\n    \"8661\": [0.25, 0.75, 0, 0, 0.61111],\n    \"8704\": [0, 0.69444, 0, 0, 0.55556],\n    \"8706\": [0, 0.69444, 0.05556, 0.08334, 0.5309],\n    \"8707\": [0, 0.69444, 0, 0, 0.55556],\n    \"8709\": [0.05556, 0.75, 0, 0, 0.5],\n    \"8711\": [0, 0.68333, 0, 0, 0.83334],\n    \"8712\": [0.0391, 0.5391, 0, 0, 0.66667],\n    \"8715\": [0.0391, 0.5391, 0, 0, 0.66667],\n    \"8722\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8723\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8725\": [0.25, 0.75, 0, 0, 0.5],\n    \"8726\": [0.25, 0.75, 0, 0, 0.5],\n    \"8727\": [-0.03472, 0.46528, 0, 0, 0.5],\n    \"8728\": [-0.05555, 0.44445, 0, 0, 0.5],\n    \"8729\": [-0.05555, 0.44445, 0, 0, 0.5],\n    \"8730\": [0.2, 0.8, 0, 0, 0.83334],\n    \"8733\": [0, 0.43056, 0, 0, 0.77778],\n    \"8734\": [0, 0.43056, 0, 0, 1.0],\n    \"8736\": [0, 0.69224, 0, 0, 0.72222],\n    \"8739\": [0.25, 0.75, 0, 0, 0.27778],\n    \"8741\": [0.25, 0.75, 0, 0, 0.5],\n    \"8743\": [0, 0.55556, 0, 0, 0.66667],\n    \"8744\": [0, 0.55556, 0, 0, 0.66667],\n    \"8745\": [0, 0.55556, 0, 0, 0.66667],\n    \"8746\": [0, 0.55556, 0, 0, 0.66667],\n    \"8747\": [0.19444, 0.69444, 0.11111, 0, 0.41667],\n    \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n    \"8768\": [0.19444, 0.69444, 0, 0, 0.27778],\n    \"8771\": [-0.03625, 0.46375, 0, 0, 0.77778],\n    \"8773\": [-0.022, 0.589, 0, 0, 1.0],\n    \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n    \"8781\": [-0.03625, 0.46375, 0, 0, 0.77778],\n    \"8784\": [-0.133, 0.67, 0, 0, 0.778],\n    \"8801\": [-0.03625, 0.46375, 0, 0, 0.77778],\n    \"8804\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8805\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8810\": [0.0391, 0.5391, 0, 0, 1.0],\n    \"8811\": [0.0391, 0.5391, 0, 0, 1.0],\n    \"8826\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8827\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8834\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8835\": [0.0391, 0.5391, 0, 0, 0.77778],\n    \"8838\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8839\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8846\": [0, 0.55556, 0, 0, 0.66667],\n    \"8849\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8850\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"8851\": [0, 0.55556, 0, 0, 0.66667],\n    \"8852\": [0, 0.55556, 0, 0, 0.66667],\n    \"8853\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8854\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8855\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8856\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8857\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"8866\": [0, 0.69444, 0, 0, 0.61111],\n    \"8867\": [0, 0.69444, 0, 0, 0.61111],\n    \"8868\": [0, 0.69444, 0, 0, 0.77778],\n    \"8869\": [0, 0.69444, 0, 0, 0.77778],\n    \"8872\": [0.249, 0.75, 0, 0, 0.867],\n    \"8900\": [-0.05555, 0.44445, 0, 0, 0.5],\n    \"8901\": [-0.05555, 0.44445, 0, 0, 0.27778],\n    \"8902\": [-0.03472, 0.46528, 0, 0, 0.5],\n    \"8904\": [0.005, 0.505, 0, 0, 0.9],\n    \"8942\": [0.03, 0.9, 0, 0, 0.278],\n    \"8943\": [-0.19, 0.31, 0, 0, 1.172],\n    \"8945\": [-0.1, 0.82, 0, 0, 1.282],\n    \"8968\": [0.25, 0.75, 0, 0, 0.44445],\n    \"8969\": [0.25, 0.75, 0, 0, 0.44445],\n    \"8970\": [0.25, 0.75, 0, 0, 0.44445],\n    \"8971\": [0.25, 0.75, 0, 0, 0.44445],\n    \"8994\": [-0.14236, 0.35764, 0, 0, 1.0],\n    \"8995\": [-0.14236, 0.35764, 0, 0, 1.0],\n    \"9136\": [0.244, 0.744, 0, 0, 0.412],\n    \"9137\": [0.244, 0.744, 0, 0, 0.412],\n    \"9651\": [0.19444, 0.69444, 0, 0, 0.88889],\n    \"9657\": [-0.03472, 0.46528, 0, 0, 0.5],\n    \"9661\": [0.19444, 0.69444, 0, 0, 0.88889],\n    \"9667\": [-0.03472, 0.46528, 0, 0, 0.5],\n    \"9711\": [0.19444, 0.69444, 0, 0, 1.0],\n    \"9824\": [0.12963, 0.69444, 0, 0, 0.77778],\n    \"9825\": [0.12963, 0.69444, 0, 0, 0.77778],\n    \"9826\": [0.12963, 0.69444, 0, 0, 0.77778],\n    \"9827\": [0.12963, 0.69444, 0, 0, 0.77778],\n    \"9837\": [0, 0.75, 0, 0, 0.38889],\n    \"9838\": [0.19444, 0.69444, 0, 0, 0.38889],\n    \"9839\": [0.19444, 0.69444, 0, 0, 0.38889],\n    \"10216\": [0.25, 0.75, 0, 0, 0.38889],\n    \"10217\": [0.25, 0.75, 0, 0, 0.38889],\n    \"10222\": [0.244, 0.744, 0, 0, 0.412],\n    \"10223\": [0.244, 0.744, 0, 0, 0.412],\n    \"10229\": [0.011, 0.511, 0, 0, 1.609],\n    \"10230\": [0.011, 0.511, 0, 0, 1.638],\n    \"10231\": [0.011, 0.511, 0, 0, 1.859],\n    \"10232\": [0.024, 0.525, 0, 0, 1.609],\n    \"10233\": [0.024, 0.525, 0, 0, 1.638],\n    \"10234\": [0.024, 0.525, 0, 0, 1.858],\n    \"10236\": [0.011, 0.511, 0, 0, 1.638],\n    \"10815\": [0, 0.68333, 0, 0, 0.75],\n    \"10927\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"10928\": [0.13597, 0.63597, 0, 0, 0.77778],\n    \"57376\": [0.19444, 0.69444, 0, 0, 0]\n  },\n  \"Math-BoldItalic\": {\n    \"65\": [0, 0.68611, 0, 0, 0.86944],\n    \"66\": [0, 0.68611, 0.04835, 0, 0.8664],\n    \"67\": [0, 0.68611, 0.06979, 0, 0.81694],\n    \"68\": [0, 0.68611, 0.03194, 0, 0.93812],\n    \"69\": [0, 0.68611, 0.05451, 0, 0.81007],\n    \"70\": [0, 0.68611, 0.15972, 0, 0.68889],\n    \"71\": [0, 0.68611, 0, 0, 0.88673],\n    \"72\": [0, 0.68611, 0.08229, 0, 0.98229],\n    \"73\": [0, 0.68611, 0.07778, 0, 0.51111],\n    \"74\": [0, 0.68611, 0.10069, 0, 0.63125],\n    \"75\": [0, 0.68611, 0.06979, 0, 0.97118],\n    \"76\": [0, 0.68611, 0, 0, 0.75555],\n    \"77\": [0, 0.68611, 0.11424, 0, 1.14201],\n    \"78\": [0, 0.68611, 0.11424, 0, 0.95034],\n    \"79\": [0, 0.68611, 0.03194, 0, 0.83666],\n    \"80\": [0, 0.68611, 0.15972, 0, 0.72309],\n    \"81\": [0.19444, 0.68611, 0, 0, 0.86861],\n    \"82\": [0, 0.68611, 0.00421, 0, 0.87235],\n    \"83\": [0, 0.68611, 0.05382, 0, 0.69271],\n    \"84\": [0, 0.68611, 0.15972, 0, 0.63663],\n    \"85\": [0, 0.68611, 0.11424, 0, 0.80027],\n    \"86\": [0, 0.68611, 0.25555, 0, 0.67778],\n    \"87\": [0, 0.68611, 0.15972, 0, 1.09305],\n    \"88\": [0, 0.68611, 0.07778, 0, 0.94722],\n    \"89\": [0, 0.68611, 0.25555, 0, 0.67458],\n    \"90\": [0, 0.68611, 0.06979, 0, 0.77257],\n    \"97\": [0, 0.44444, 0, 0, 0.63287],\n    \"98\": [0, 0.69444, 0, 0, 0.52083],\n    \"99\": [0, 0.44444, 0, 0, 0.51342],\n    \"100\": [0, 0.69444, 0, 0, 0.60972],\n    \"101\": [0, 0.44444, 0, 0, 0.55361],\n    \"102\": [0.19444, 0.69444, 0.11042, 0, 0.56806],\n    \"103\": [0.19444, 0.44444, 0.03704, 0, 0.5449],\n    \"104\": [0, 0.69444, 0, 0, 0.66759],\n    \"105\": [0, 0.69326, 0, 0, 0.4048],\n    \"106\": [0.19444, 0.69326, 0.0622, 0, 0.47083],\n    \"107\": [0, 0.69444, 0.01852, 0, 0.6037],\n    \"108\": [0, 0.69444, 0.0088, 0, 0.34815],\n    \"109\": [0, 0.44444, 0, 0, 1.0324],\n    \"110\": [0, 0.44444, 0, 0, 0.71296],\n    \"111\": [0, 0.44444, 0, 0, 0.58472],\n    \"112\": [0.19444, 0.44444, 0, 0, 0.60092],\n    \"113\": [0.19444, 0.44444, 0.03704, 0, 0.54213],\n    \"114\": [0, 0.44444, 0.03194, 0, 0.5287],\n    \"115\": [0, 0.44444, 0, 0, 0.53125],\n    \"116\": [0, 0.63492, 0, 0, 0.41528],\n    \"117\": [0, 0.44444, 0, 0, 0.68102],\n    \"118\": [0, 0.44444, 0.03704, 0, 0.56666],\n    \"119\": [0, 0.44444, 0.02778, 0, 0.83148],\n    \"120\": [0, 0.44444, 0, 0, 0.65903],\n    \"121\": [0.19444, 0.44444, 0.03704, 0, 0.59028],\n    \"122\": [0, 0.44444, 0.04213, 0, 0.55509],\n    \"915\": [0, 0.68611, 0.15972, 0, 0.65694],\n    \"916\": [0, 0.68611, 0, 0, 0.95833],\n    \"920\": [0, 0.68611, 0.03194, 0, 0.86722],\n    \"923\": [0, 0.68611, 0, 0, 0.80555],\n    \"926\": [0, 0.68611, 0.07458, 0, 0.84125],\n    \"928\": [0, 0.68611, 0.08229, 0, 0.98229],\n    \"931\": [0, 0.68611, 0.05451, 0, 0.88507],\n    \"933\": [0, 0.68611, 0.15972, 0, 0.67083],\n    \"934\": [0, 0.68611, 0, 0, 0.76666],\n    \"936\": [0, 0.68611, 0.11653, 0, 0.71402],\n    \"937\": [0, 0.68611, 0.04835, 0, 0.8789],\n    \"945\": [0, 0.44444, 0, 0, 0.76064],\n    \"946\": [0.19444, 0.69444, 0.03403, 0, 0.65972],\n    \"947\": [0.19444, 0.44444, 0.06389, 0, 0.59003],\n    \"948\": [0, 0.69444, 0.03819, 0, 0.52222],\n    \"949\": [0, 0.44444, 0, 0, 0.52882],\n    \"950\": [0.19444, 0.69444, 0.06215, 0, 0.50833],\n    \"951\": [0.19444, 0.44444, 0.03704, 0, 0.6],\n    \"952\": [0, 0.69444, 0.03194, 0, 0.5618],\n    \"953\": [0, 0.44444, 0, 0, 0.41204],\n    \"954\": [0, 0.44444, 0, 0, 0.66759],\n    \"955\": [0, 0.69444, 0, 0, 0.67083],\n    \"956\": [0.19444, 0.44444, 0, 0, 0.70787],\n    \"957\": [0, 0.44444, 0.06898, 0, 0.57685],\n    \"958\": [0.19444, 0.69444, 0.03021, 0, 0.50833],\n    \"959\": [0, 0.44444, 0, 0, 0.58472],\n    \"960\": [0, 0.44444, 0.03704, 0, 0.68241],\n    \"961\": [0.19444, 0.44444, 0, 0, 0.6118],\n    \"962\": [0.09722, 0.44444, 0.07917, 0, 0.42361],\n    \"963\": [0, 0.44444, 0.03704, 0, 0.68588],\n    \"964\": [0, 0.44444, 0.13472, 0, 0.52083],\n    \"965\": [0, 0.44444, 0.03704, 0, 0.63055],\n    \"966\": [0.19444, 0.44444, 0, 0, 0.74722],\n    \"967\": [0.19444, 0.44444, 0, 0, 0.71805],\n    \"968\": [0.19444, 0.69444, 0.03704, 0, 0.75833],\n    \"969\": [0, 0.44444, 0.03704, 0, 0.71782],\n    \"977\": [0, 0.69444, 0, 0, 0.69155],\n    \"981\": [0.19444, 0.69444, 0, 0, 0.7125],\n    \"982\": [0, 0.44444, 0.03194, 0, 0.975],\n    \"1009\": [0.19444, 0.44444, 0, 0, 0.6118],\n    \"1013\": [0, 0.44444, 0, 0, 0.48333]\n  },\n  \"Math-Italic\": {\n    \"65\": [0, 0.68333, 0, 0.13889, 0.75],\n    \"66\": [0, 0.68333, 0.05017, 0.08334, 0.75851],\n    \"67\": [0, 0.68333, 0.07153, 0.08334, 0.71472],\n    \"68\": [0, 0.68333, 0.02778, 0.05556, 0.82792],\n    \"69\": [0, 0.68333, 0.05764, 0.08334, 0.7382],\n    \"70\": [0, 0.68333, 0.13889, 0.08334, 0.64306],\n    \"71\": [0, 0.68333, 0, 0.08334, 0.78625],\n    \"72\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n    \"73\": [0, 0.68333, 0.07847, 0.11111, 0.43958],\n    \"74\": [0, 0.68333, 0.09618, 0.16667, 0.55451],\n    \"75\": [0, 0.68333, 0.07153, 0.05556, 0.84931],\n    \"76\": [0, 0.68333, 0, 0.02778, 0.68056],\n    \"77\": [0, 0.68333, 0.10903, 0.08334, 0.97014],\n    \"78\": [0, 0.68333, 0.10903, 0.08334, 0.80347],\n    \"79\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n    \"80\": [0, 0.68333, 0.13889, 0.08334, 0.64201],\n    \"81\": [0.19444, 0.68333, 0, 0.08334, 0.79056],\n    \"82\": [0, 0.68333, 0.00773, 0.08334, 0.75929],\n    \"83\": [0, 0.68333, 0.05764, 0.08334, 0.6132],\n    \"84\": [0, 0.68333, 0.13889, 0.08334, 0.58438],\n    \"85\": [0, 0.68333, 0.10903, 0.02778, 0.68278],\n    \"86\": [0, 0.68333, 0.22222, 0, 0.58333],\n    \"87\": [0, 0.68333, 0.13889, 0, 0.94445],\n    \"88\": [0, 0.68333, 0.07847, 0.08334, 0.82847],\n    \"89\": [0, 0.68333, 0.22222, 0, 0.58056],\n    \"90\": [0, 0.68333, 0.07153, 0.08334, 0.68264],\n    \"97\": [0, 0.43056, 0, 0, 0.52859],\n    \"98\": [0, 0.69444, 0, 0, 0.42917],\n    \"99\": [0, 0.43056, 0, 0.05556, 0.43276],\n    \"100\": [0, 0.69444, 0, 0.16667, 0.52049],\n    \"101\": [0, 0.43056, 0, 0.05556, 0.46563],\n    \"102\": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],\n    \"103\": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],\n    \"104\": [0, 0.69444, 0, 0, 0.57616],\n    \"105\": [0, 0.65952, 0, 0, 0.34451],\n    \"106\": [0.19444, 0.65952, 0.05724, 0, 0.41181],\n    \"107\": [0, 0.69444, 0.03148, 0, 0.5206],\n    \"108\": [0, 0.69444, 0.01968, 0.08334, 0.29838],\n    \"109\": [0, 0.43056, 0, 0, 0.87801],\n    \"110\": [0, 0.43056, 0, 0, 0.60023],\n    \"111\": [0, 0.43056, 0, 0.05556, 0.48472],\n    \"112\": [0.19444, 0.43056, 0, 0.08334, 0.50313],\n    \"113\": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],\n    \"114\": [0, 0.43056, 0.02778, 0.05556, 0.45116],\n    \"115\": [0, 0.43056, 0, 0.05556, 0.46875],\n    \"116\": [0, 0.61508, 0, 0.08334, 0.36111],\n    \"117\": [0, 0.43056, 0, 0.02778, 0.57246],\n    \"118\": [0, 0.43056, 0.03588, 0.02778, 0.48472],\n    \"119\": [0, 0.43056, 0.02691, 0.08334, 0.71592],\n    \"120\": [0, 0.43056, 0, 0.02778, 0.57153],\n    \"121\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],\n    \"122\": [0, 0.43056, 0.04398, 0.05556, 0.46505],\n    \"915\": [0, 0.68333, 0.13889, 0.08334, 0.61528],\n    \"916\": [0, 0.68333, 0, 0.16667, 0.83334],\n    \"920\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n    \"923\": [0, 0.68333, 0, 0.16667, 0.69445],\n    \"926\": [0, 0.68333, 0.07569, 0.08334, 0.74236],\n    \"928\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n    \"931\": [0, 0.68333, 0.05764, 0.08334, 0.77986],\n    \"933\": [0, 0.68333, 0.13889, 0.05556, 0.58333],\n    \"934\": [0, 0.68333, 0, 0.08334, 0.66667],\n    \"936\": [0, 0.68333, 0.11, 0.05556, 0.61222],\n    \"937\": [0, 0.68333, 0.05017, 0.08334, 0.7724],\n    \"945\": [0, 0.43056, 0.0037, 0.02778, 0.6397],\n    \"946\": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],\n    \"947\": [0.19444, 0.43056, 0.05556, 0, 0.51773],\n    \"948\": [0, 0.69444, 0.03785, 0.05556, 0.44444],\n    \"949\": [0, 0.43056, 0, 0.08334, 0.46632],\n    \"950\": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],\n    \"951\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],\n    \"952\": [0, 0.69444, 0.02778, 0.08334, 0.46944],\n    \"953\": [0, 0.43056, 0, 0.05556, 0.35394],\n    \"954\": [0, 0.43056, 0, 0, 0.57616],\n    \"955\": [0, 0.69444, 0, 0, 0.58334],\n    \"956\": [0.19444, 0.43056, 0, 0.02778, 0.60255],\n    \"957\": [0, 0.43056, 0.06366, 0.02778, 0.49398],\n    \"958\": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],\n    \"959\": [0, 0.43056, 0, 0.05556, 0.48472],\n    \"960\": [0, 0.43056, 0.03588, 0, 0.57003],\n    \"961\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n    \"962\": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],\n    \"963\": [0, 0.43056, 0.03588, 0, 0.57141],\n    \"964\": [0, 0.43056, 0.1132, 0.02778, 0.43715],\n    \"965\": [0, 0.43056, 0.03588, 0.02778, 0.54028],\n    \"966\": [0.19444, 0.43056, 0, 0.08334, 0.65417],\n    \"967\": [0.19444, 0.43056, 0, 0.05556, 0.62569],\n    \"968\": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],\n    \"969\": [0, 0.43056, 0.03588, 0, 0.62245],\n    \"977\": [0, 0.69444, 0, 0.08334, 0.59144],\n    \"981\": [0.19444, 0.69444, 0, 0.08334, 0.59583],\n    \"982\": [0, 0.43056, 0.02778, 0, 0.82813],\n    \"1009\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n    \"1013\": [0, 0.43056, 0, 0.05556, 0.4059]\n  },\n  \"Math-Regular\": {\n    \"65\": [0, 0.68333, 0, 0.13889, 0.75],\n    \"66\": [0, 0.68333, 0.05017, 0.08334, 0.75851],\n    \"67\": [0, 0.68333, 0.07153, 0.08334, 0.71472],\n    \"68\": [0, 0.68333, 0.02778, 0.05556, 0.82792],\n    \"69\": [0, 0.68333, 0.05764, 0.08334, 0.7382],\n    \"70\": [0, 0.68333, 0.13889, 0.08334, 0.64306],\n    \"71\": [0, 0.68333, 0, 0.08334, 0.78625],\n    \"72\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n    \"73\": [0, 0.68333, 0.07847, 0.11111, 0.43958],\n    \"74\": [0, 0.68333, 0.09618, 0.16667, 0.55451],\n    \"75\": [0, 0.68333, 0.07153, 0.05556, 0.84931],\n    \"76\": [0, 0.68333, 0, 0.02778, 0.68056],\n    \"77\": [0, 0.68333, 0.10903, 0.08334, 0.97014],\n    \"78\": [0, 0.68333, 0.10903, 0.08334, 0.80347],\n    \"79\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n    \"80\": [0, 0.68333, 0.13889, 0.08334, 0.64201],\n    \"81\": [0.19444, 0.68333, 0, 0.08334, 0.79056],\n    \"82\": [0, 0.68333, 0.00773, 0.08334, 0.75929],\n    \"83\": [0, 0.68333, 0.05764, 0.08334, 0.6132],\n    \"84\": [0, 0.68333, 0.13889, 0.08334, 0.58438],\n    \"85\": [0, 0.68333, 0.10903, 0.02778, 0.68278],\n    \"86\": [0, 0.68333, 0.22222, 0, 0.58333],\n    \"87\": [0, 0.68333, 0.13889, 0, 0.94445],\n    \"88\": [0, 0.68333, 0.07847, 0.08334, 0.82847],\n    \"89\": [0, 0.68333, 0.22222, 0, 0.58056],\n    \"90\": [0, 0.68333, 0.07153, 0.08334, 0.68264],\n    \"97\": [0, 0.43056, 0, 0, 0.52859],\n    \"98\": [0, 0.69444, 0, 0, 0.42917],\n    \"99\": [0, 0.43056, 0, 0.05556, 0.43276],\n    \"100\": [0, 0.69444, 0, 0.16667, 0.52049],\n    \"101\": [0, 0.43056, 0, 0.05556, 0.46563],\n    \"102\": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],\n    \"103\": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],\n    \"104\": [0, 0.69444, 0, 0, 0.57616],\n    \"105\": [0, 0.65952, 0, 0, 0.34451],\n    \"106\": [0.19444, 0.65952, 0.05724, 0, 0.41181],\n    \"107\": [0, 0.69444, 0.03148, 0, 0.5206],\n    \"108\": [0, 0.69444, 0.01968, 0.08334, 0.29838],\n    \"109\": [0, 0.43056, 0, 0, 0.87801],\n    \"110\": [0, 0.43056, 0, 0, 0.60023],\n    \"111\": [0, 0.43056, 0, 0.05556, 0.48472],\n    \"112\": [0.19444, 0.43056, 0, 0.08334, 0.50313],\n    \"113\": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],\n    \"114\": [0, 0.43056, 0.02778, 0.05556, 0.45116],\n    \"115\": [0, 0.43056, 0, 0.05556, 0.46875],\n    \"116\": [0, 0.61508, 0, 0.08334, 0.36111],\n    \"117\": [0, 0.43056, 0, 0.02778, 0.57246],\n    \"118\": [0, 0.43056, 0.03588, 0.02778, 0.48472],\n    \"119\": [0, 0.43056, 0.02691, 0.08334, 0.71592],\n    \"120\": [0, 0.43056, 0, 0.02778, 0.57153],\n    \"121\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],\n    \"122\": [0, 0.43056, 0.04398, 0.05556, 0.46505],\n    \"915\": [0, 0.68333, 0.13889, 0.08334, 0.61528],\n    \"916\": [0, 0.68333, 0, 0.16667, 0.83334],\n    \"920\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n    \"923\": [0, 0.68333, 0, 0.16667, 0.69445],\n    \"926\": [0, 0.68333, 0.07569, 0.08334, 0.74236],\n    \"928\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n    \"931\": [0, 0.68333, 0.05764, 0.08334, 0.77986],\n    \"933\": [0, 0.68333, 0.13889, 0.05556, 0.58333],\n    \"934\": [0, 0.68333, 0, 0.08334, 0.66667],\n    \"936\": [0, 0.68333, 0.11, 0.05556, 0.61222],\n    \"937\": [0, 0.68333, 0.05017, 0.08334, 0.7724],\n    \"945\": [0, 0.43056, 0.0037, 0.02778, 0.6397],\n    \"946\": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],\n    \"947\": [0.19444, 0.43056, 0.05556, 0, 0.51773],\n    \"948\": [0, 0.69444, 0.03785, 0.05556, 0.44444],\n    \"949\": [0, 0.43056, 0, 0.08334, 0.46632],\n    \"950\": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],\n    \"951\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],\n    \"952\": [0, 0.69444, 0.02778, 0.08334, 0.46944],\n    \"953\": [0, 0.43056, 0, 0.05556, 0.35394],\n    \"954\": [0, 0.43056, 0, 0, 0.57616],\n    \"955\": [0, 0.69444, 0, 0, 0.58334],\n    \"956\": [0.19444, 0.43056, 0, 0.02778, 0.60255],\n    \"957\": [0, 0.43056, 0.06366, 0.02778, 0.49398],\n    \"958\": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],\n    \"959\": [0, 0.43056, 0, 0.05556, 0.48472],\n    \"960\": [0, 0.43056, 0.03588, 0, 0.57003],\n    \"961\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n    \"962\": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],\n    \"963\": [0, 0.43056, 0.03588, 0, 0.57141],\n    \"964\": [0, 0.43056, 0.1132, 0.02778, 0.43715],\n    \"965\": [0, 0.43056, 0.03588, 0.02778, 0.54028],\n    \"966\": [0.19444, 0.43056, 0, 0.08334, 0.65417],\n    \"967\": [0.19444, 0.43056, 0, 0.05556, 0.62569],\n    \"968\": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],\n    \"969\": [0, 0.43056, 0.03588, 0, 0.62245],\n    \"977\": [0, 0.69444, 0, 0.08334, 0.59144],\n    \"981\": [0.19444, 0.69444, 0, 0.08334, 0.59583],\n    \"982\": [0, 0.43056, 0.02778, 0, 0.82813],\n    \"1009\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n    \"1013\": [0, 0.43056, 0, 0.05556, 0.4059]\n  },\n  \"SansSerif-Bold\": {\n    \"33\": [0, 0.69444, 0, 0, 0.36667],\n    \"34\": [0, 0.69444, 0, 0, 0.55834],\n    \"35\": [0.19444, 0.69444, 0, 0, 0.91667],\n    \"36\": [0.05556, 0.75, 0, 0, 0.55],\n    \"37\": [0.05556, 0.75, 0, 0, 1.02912],\n    \"38\": [0, 0.69444, 0, 0, 0.83056],\n    \"39\": [0, 0.69444, 0, 0, 0.30556],\n    \"40\": [0.25, 0.75, 0, 0, 0.42778],\n    \"41\": [0.25, 0.75, 0, 0, 0.42778],\n    \"42\": [0, 0.75, 0, 0, 0.55],\n    \"43\": [0.11667, 0.61667, 0, 0, 0.85556],\n    \"44\": [0.10556, 0.13056, 0, 0, 0.30556],\n    \"45\": [0, 0.45833, 0, 0, 0.36667],\n    \"46\": [0, 0.13056, 0, 0, 0.30556],\n    \"47\": [0.25, 0.75, 0, 0, 0.55],\n    \"48\": [0, 0.69444, 0, 0, 0.55],\n    \"49\": [0, 0.69444, 0, 0, 0.55],\n    \"50\": [0, 0.69444, 0, 0, 0.55],\n    \"51\": [0, 0.69444, 0, 0, 0.55],\n    \"52\": [0, 0.69444, 0, 0, 0.55],\n    \"53\": [0, 0.69444, 0, 0, 0.55],\n    \"54\": [0, 0.69444, 0, 0, 0.55],\n    \"55\": [0, 0.69444, 0, 0, 0.55],\n    \"56\": [0, 0.69444, 0, 0, 0.55],\n    \"57\": [0, 0.69444, 0, 0, 0.55],\n    \"58\": [0, 0.45833, 0, 0, 0.30556],\n    \"59\": [0.10556, 0.45833, 0, 0, 0.30556],\n    \"61\": [-0.09375, 0.40625, 0, 0, 0.85556],\n    \"63\": [0, 0.69444, 0, 0, 0.51945],\n    \"64\": [0, 0.69444, 0, 0, 0.73334],\n    \"65\": [0, 0.69444, 0, 0, 0.73334],\n    \"66\": [0, 0.69444, 0, 0, 0.73334],\n    \"67\": [0, 0.69444, 0, 0, 0.70278],\n    \"68\": [0, 0.69444, 0, 0, 0.79445],\n    \"69\": [0, 0.69444, 0, 0, 0.64167],\n    \"70\": [0, 0.69444, 0, 0, 0.61111],\n    \"71\": [0, 0.69444, 0, 0, 0.73334],\n    \"72\": [0, 0.69444, 0, 0, 0.79445],\n    \"73\": [0, 0.69444, 0, 0, 0.33056],\n    \"74\": [0, 0.69444, 0, 0, 0.51945],\n    \"75\": [0, 0.69444, 0, 0, 0.76389],\n    \"76\": [0, 0.69444, 0, 0, 0.58056],\n    \"77\": [0, 0.69444, 0, 0, 0.97778],\n    \"78\": [0, 0.69444, 0, 0, 0.79445],\n    \"79\": [0, 0.69444, 0, 0, 0.79445],\n    \"80\": [0, 0.69444, 0, 0, 0.70278],\n    \"81\": [0.10556, 0.69444, 0, 0, 0.79445],\n    \"82\": [0, 0.69444, 0, 0, 0.70278],\n    \"83\": [0, 0.69444, 0, 0, 0.61111],\n    \"84\": [0, 0.69444, 0, 0, 0.73334],\n    \"85\": [0, 0.69444, 0, 0, 0.76389],\n    \"86\": [0, 0.69444, 0.01528, 0, 0.73334],\n    \"87\": [0, 0.69444, 0.01528, 0, 1.03889],\n    \"88\": [0, 0.69444, 0, 0, 0.73334],\n    \"89\": [0, 0.69444, 0.0275, 0, 0.73334],\n    \"90\": [0, 0.69444, 0, 0, 0.67223],\n    \"91\": [0.25, 0.75, 0, 0, 0.34306],\n    \"93\": [0.25, 0.75, 0, 0, 0.34306],\n    \"94\": [0, 0.69444, 0, 0, 0.55],\n    \"95\": [0.35, 0.10833, 0.03056, 0, 0.55],\n    \"97\": [0, 0.45833, 0, 0, 0.525],\n    \"98\": [0, 0.69444, 0, 0, 0.56111],\n    \"99\": [0, 0.45833, 0, 0, 0.48889],\n    \"100\": [0, 0.69444, 0, 0, 0.56111],\n    \"101\": [0, 0.45833, 0, 0, 0.51111],\n    \"102\": [0, 0.69444, 0.07639, 0, 0.33611],\n    \"103\": [0.19444, 0.45833, 0.01528, 0, 0.55],\n    \"104\": [0, 0.69444, 0, 0, 0.56111],\n    \"105\": [0, 0.69444, 0, 0, 0.25556],\n    \"106\": [0.19444, 0.69444, 0, 0, 0.28611],\n    \"107\": [0, 0.69444, 0, 0, 0.53056],\n    \"108\": [0, 0.69444, 0, 0, 0.25556],\n    \"109\": [0, 0.45833, 0, 0, 0.86667],\n    \"110\": [0, 0.45833, 0, 0, 0.56111],\n    \"111\": [0, 0.45833, 0, 0, 0.55],\n    \"112\": [0.19444, 0.45833, 0, 0, 0.56111],\n    \"113\": [0.19444, 0.45833, 0, 0, 0.56111],\n    \"114\": [0, 0.45833, 0.01528, 0, 0.37222],\n    \"115\": [0, 0.45833, 0, 0, 0.42167],\n    \"116\": [0, 0.58929, 0, 0, 0.40417],\n    \"117\": [0, 0.45833, 0, 0, 0.56111],\n    \"118\": [0, 0.45833, 0.01528, 0, 0.5],\n    \"119\": [0, 0.45833, 0.01528, 0, 0.74445],\n    \"120\": [0, 0.45833, 0, 0, 0.5],\n    \"121\": [0.19444, 0.45833, 0.01528, 0, 0.5],\n    \"122\": [0, 0.45833, 0, 0, 0.47639],\n    \"126\": [0.35, 0.34444, 0, 0, 0.55],\n    \"168\": [0, 0.69444, 0, 0, 0.55],\n    \"176\": [0, 0.69444, 0, 0, 0.73334],\n    \"180\": [0, 0.69444, 0, 0, 0.55],\n    \"184\": [0.17014, 0, 0, 0, 0.48889],\n    \"305\": [0, 0.45833, 0, 0, 0.25556],\n    \"567\": [0.19444, 0.45833, 0, 0, 0.28611],\n    \"710\": [0, 0.69444, 0, 0, 0.55],\n    \"711\": [0, 0.63542, 0, 0, 0.55],\n    \"713\": [0, 0.63778, 0, 0, 0.55],\n    \"728\": [0, 0.69444, 0, 0, 0.55],\n    \"729\": [0, 0.69444, 0, 0, 0.30556],\n    \"730\": [0, 0.69444, 0, 0, 0.73334],\n    \"732\": [0, 0.69444, 0, 0, 0.55],\n    \"733\": [0, 0.69444, 0, 0, 0.55],\n    \"915\": [0, 0.69444, 0, 0, 0.58056],\n    \"916\": [0, 0.69444, 0, 0, 0.91667],\n    \"920\": [0, 0.69444, 0, 0, 0.85556],\n    \"923\": [0, 0.69444, 0, 0, 0.67223],\n    \"926\": [0, 0.69444, 0, 0, 0.73334],\n    \"928\": [0, 0.69444, 0, 0, 0.79445],\n    \"931\": [0, 0.69444, 0, 0, 0.79445],\n    \"933\": [0, 0.69444, 0, 0, 0.85556],\n    \"934\": [0, 0.69444, 0, 0, 0.79445],\n    \"936\": [0, 0.69444, 0, 0, 0.85556],\n    \"937\": [0, 0.69444, 0, 0, 0.79445],\n    \"8211\": [0, 0.45833, 0.03056, 0, 0.55],\n    \"8212\": [0, 0.45833, 0.03056, 0, 1.10001],\n    \"8216\": [0, 0.69444, 0, 0, 0.30556],\n    \"8217\": [0, 0.69444, 0, 0, 0.30556],\n    \"8220\": [0, 0.69444, 0, 0, 0.55834],\n    \"8221\": [0, 0.69444, 0, 0, 0.55834]\n  },\n  \"SansSerif-Italic\": {\n    \"33\": [0, 0.69444, 0.05733, 0, 0.31945],\n    \"34\": [0, 0.69444, 0.00316, 0, 0.5],\n    \"35\": [0.19444, 0.69444, 0.05087, 0, 0.83334],\n    \"36\": [0.05556, 0.75, 0.11156, 0, 0.5],\n    \"37\": [0.05556, 0.75, 0.03126, 0, 0.83334],\n    \"38\": [0, 0.69444, 0.03058, 0, 0.75834],\n    \"39\": [0, 0.69444, 0.07816, 0, 0.27778],\n    \"40\": [0.25, 0.75, 0.13164, 0, 0.38889],\n    \"41\": [0.25, 0.75, 0.02536, 0, 0.38889],\n    \"42\": [0, 0.75, 0.11775, 0, 0.5],\n    \"43\": [0.08333, 0.58333, 0.02536, 0, 0.77778],\n    \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n    \"45\": [0, 0.44444, 0.01946, 0, 0.33333],\n    \"46\": [0, 0.08333, 0, 0, 0.27778],\n    \"47\": [0.25, 0.75, 0.13164, 0, 0.5],\n    \"48\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"49\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"50\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"51\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"52\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"53\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"54\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"55\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"56\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"57\": [0, 0.65556, 0.11156, 0, 0.5],\n    \"58\": [0, 0.44444, 0.02502, 0, 0.27778],\n    \"59\": [0.125, 0.44444, 0.02502, 0, 0.27778],\n    \"61\": [-0.13, 0.37, 0.05087, 0, 0.77778],\n    \"63\": [0, 0.69444, 0.11809, 0, 0.47222],\n    \"64\": [0, 0.69444, 0.07555, 0, 0.66667],\n    \"65\": [0, 0.69444, 0, 0, 0.66667],\n    \"66\": [0, 0.69444, 0.08293, 0, 0.66667],\n    \"67\": [0, 0.69444, 0.11983, 0, 0.63889],\n    \"68\": [0, 0.69444, 0.07555, 0, 0.72223],\n    \"69\": [0, 0.69444, 0.11983, 0, 0.59722],\n    \"70\": [0, 0.69444, 0.13372, 0, 0.56945],\n    \"71\": [0, 0.69444, 0.11983, 0, 0.66667],\n    \"72\": [0, 0.69444, 0.08094, 0, 0.70834],\n    \"73\": [0, 0.69444, 0.13372, 0, 0.27778],\n    \"74\": [0, 0.69444, 0.08094, 0, 0.47222],\n    \"75\": [0, 0.69444, 0.11983, 0, 0.69445],\n    \"76\": [0, 0.69444, 0, 0, 0.54167],\n    \"77\": [0, 0.69444, 0.08094, 0, 0.875],\n    \"78\": [0, 0.69444, 0.08094, 0, 0.70834],\n    \"79\": [0, 0.69444, 0.07555, 0, 0.73611],\n    \"80\": [0, 0.69444, 0.08293, 0, 0.63889],\n    \"81\": [0.125, 0.69444, 0.07555, 0, 0.73611],\n    \"82\": [0, 0.69444, 0.08293, 0, 0.64584],\n    \"83\": [0, 0.69444, 0.09205, 0, 0.55556],\n    \"84\": [0, 0.69444, 0.13372, 0, 0.68056],\n    \"85\": [0, 0.69444, 0.08094, 0, 0.6875],\n    \"86\": [0, 0.69444, 0.1615, 0, 0.66667],\n    \"87\": [0, 0.69444, 0.1615, 0, 0.94445],\n    \"88\": [0, 0.69444, 0.13372, 0, 0.66667],\n    \"89\": [0, 0.69444, 0.17261, 0, 0.66667],\n    \"90\": [0, 0.69444, 0.11983, 0, 0.61111],\n    \"91\": [0.25, 0.75, 0.15942, 0, 0.28889],\n    \"93\": [0.25, 0.75, 0.08719, 0, 0.28889],\n    \"94\": [0, 0.69444, 0.0799, 0, 0.5],\n    \"95\": [0.35, 0.09444, 0.08616, 0, 0.5],\n    \"97\": [0, 0.44444, 0.00981, 0, 0.48056],\n    \"98\": [0, 0.69444, 0.03057, 0, 0.51667],\n    \"99\": [0, 0.44444, 0.08336, 0, 0.44445],\n    \"100\": [0, 0.69444, 0.09483, 0, 0.51667],\n    \"101\": [0, 0.44444, 0.06778, 0, 0.44445],\n    \"102\": [0, 0.69444, 0.21705, 0, 0.30556],\n    \"103\": [0.19444, 0.44444, 0.10836, 0, 0.5],\n    \"104\": [0, 0.69444, 0.01778, 0, 0.51667],\n    \"105\": [0, 0.67937, 0.09718, 0, 0.23889],\n    \"106\": [0.19444, 0.67937, 0.09162, 0, 0.26667],\n    \"107\": [0, 0.69444, 0.08336, 0, 0.48889],\n    \"108\": [0, 0.69444, 0.09483, 0, 0.23889],\n    \"109\": [0, 0.44444, 0.01778, 0, 0.79445],\n    \"110\": [0, 0.44444, 0.01778, 0, 0.51667],\n    \"111\": [0, 0.44444, 0.06613, 0, 0.5],\n    \"112\": [0.19444, 0.44444, 0.0389, 0, 0.51667],\n    \"113\": [0.19444, 0.44444, 0.04169, 0, 0.51667],\n    \"114\": [0, 0.44444, 0.10836, 0, 0.34167],\n    \"115\": [0, 0.44444, 0.0778, 0, 0.38333],\n    \"116\": [0, 0.57143, 0.07225, 0, 0.36111],\n    \"117\": [0, 0.44444, 0.04169, 0, 0.51667],\n    \"118\": [0, 0.44444, 0.10836, 0, 0.46111],\n    \"119\": [0, 0.44444, 0.10836, 0, 0.68334],\n    \"120\": [0, 0.44444, 0.09169, 0, 0.46111],\n    \"121\": [0.19444, 0.44444, 0.10836, 0, 0.46111],\n    \"122\": [0, 0.44444, 0.08752, 0, 0.43472],\n    \"126\": [0.35, 0.32659, 0.08826, 0, 0.5],\n    \"168\": [0, 0.67937, 0.06385, 0, 0.5],\n    \"176\": [0, 0.69444, 0, 0, 0.73752],\n    \"184\": [0.17014, 0, 0, 0, 0.44445],\n    \"305\": [0, 0.44444, 0.04169, 0, 0.23889],\n    \"567\": [0.19444, 0.44444, 0.04169, 0, 0.26667],\n    \"710\": [0, 0.69444, 0.0799, 0, 0.5],\n    \"711\": [0, 0.63194, 0.08432, 0, 0.5],\n    \"713\": [0, 0.60889, 0.08776, 0, 0.5],\n    \"714\": [0, 0.69444, 0.09205, 0, 0.5],\n    \"715\": [0, 0.69444, 0, 0, 0.5],\n    \"728\": [0, 0.69444, 0.09483, 0, 0.5],\n    \"729\": [0, 0.67937, 0.07774, 0, 0.27778],\n    \"730\": [0, 0.69444, 0, 0, 0.73752],\n    \"732\": [0, 0.67659, 0.08826, 0, 0.5],\n    \"733\": [0, 0.69444, 0.09205, 0, 0.5],\n    \"915\": [0, 0.69444, 0.13372, 0, 0.54167],\n    \"916\": [0, 0.69444, 0, 0, 0.83334],\n    \"920\": [0, 0.69444, 0.07555, 0, 0.77778],\n    \"923\": [0, 0.69444, 0, 0, 0.61111],\n    \"926\": [0, 0.69444, 0.12816, 0, 0.66667],\n    \"928\": [0, 0.69444, 0.08094, 0, 0.70834],\n    \"931\": [0, 0.69444, 0.11983, 0, 0.72222],\n    \"933\": [0, 0.69444, 0.09031, 0, 0.77778],\n    \"934\": [0, 0.69444, 0.04603, 0, 0.72222],\n    \"936\": [0, 0.69444, 0.09031, 0, 0.77778],\n    \"937\": [0, 0.69444, 0.08293, 0, 0.72222],\n    \"8211\": [0, 0.44444, 0.08616, 0, 0.5],\n    \"8212\": [0, 0.44444, 0.08616, 0, 1.0],\n    \"8216\": [0, 0.69444, 0.07816, 0, 0.27778],\n    \"8217\": [0, 0.69444, 0.07816, 0, 0.27778],\n    \"8220\": [0, 0.69444, 0.14205, 0, 0.5],\n    \"8221\": [0, 0.69444, 0.00316, 0, 0.5]\n  },\n  \"SansSerif-Regular\": {\n    \"33\": [0, 0.69444, 0, 0, 0.31945],\n    \"34\": [0, 0.69444, 0, 0, 0.5],\n    \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n    \"36\": [0.05556, 0.75, 0, 0, 0.5],\n    \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n    \"38\": [0, 0.69444, 0, 0, 0.75834],\n    \"39\": [0, 0.69444, 0, 0, 0.27778],\n    \"40\": [0.25, 0.75, 0, 0, 0.38889],\n    \"41\": [0.25, 0.75, 0, 0, 0.38889],\n    \"42\": [0, 0.75, 0, 0, 0.5],\n    \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n    \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n    \"45\": [0, 0.44444, 0, 0, 0.33333],\n    \"46\": [0, 0.08333, 0, 0, 0.27778],\n    \"47\": [0.25, 0.75, 0, 0, 0.5],\n    \"48\": [0, 0.65556, 0, 0, 0.5],\n    \"49\": [0, 0.65556, 0, 0, 0.5],\n    \"50\": [0, 0.65556, 0, 0, 0.5],\n    \"51\": [0, 0.65556, 0, 0, 0.5],\n    \"52\": [0, 0.65556, 0, 0, 0.5],\n    \"53\": [0, 0.65556, 0, 0, 0.5],\n    \"54\": [0, 0.65556, 0, 0, 0.5],\n    \"55\": [0, 0.65556, 0, 0, 0.5],\n    \"56\": [0, 0.65556, 0, 0, 0.5],\n    \"57\": [0, 0.65556, 0, 0, 0.5],\n    \"58\": [0, 0.44444, 0, 0, 0.27778],\n    \"59\": [0.125, 0.44444, 0, 0, 0.27778],\n    \"61\": [-0.13, 0.37, 0, 0, 0.77778],\n    \"63\": [0, 0.69444, 0, 0, 0.47222],\n    \"64\": [0, 0.69444, 0, 0, 0.66667],\n    \"65\": [0, 0.69444, 0, 0, 0.66667],\n    \"66\": [0, 0.69444, 0, 0, 0.66667],\n    \"67\": [0, 0.69444, 0, 0, 0.63889],\n    \"68\": [0, 0.69444, 0, 0, 0.72223],\n    \"69\": [0, 0.69444, 0, 0, 0.59722],\n    \"70\": [0, 0.69444, 0, 0, 0.56945],\n    \"71\": [0, 0.69444, 0, 0, 0.66667],\n    \"72\": [0, 0.69444, 0, 0, 0.70834],\n    \"73\": [0, 0.69444, 0, 0, 0.27778],\n    \"74\": [0, 0.69444, 0, 0, 0.47222],\n    \"75\": [0, 0.69444, 0, 0, 0.69445],\n    \"76\": [0, 0.69444, 0, 0, 0.54167],\n    \"77\": [0, 0.69444, 0, 0, 0.875],\n    \"78\": [0, 0.69444, 0, 0, 0.70834],\n    \"79\": [0, 0.69444, 0, 0, 0.73611],\n    \"80\": [0, 0.69444, 0, 0, 0.63889],\n    \"81\": [0.125, 0.69444, 0, 0, 0.73611],\n    \"82\": [0, 0.69444, 0, 0, 0.64584],\n    \"83\": [0, 0.69444, 0, 0, 0.55556],\n    \"84\": [0, 0.69444, 0, 0, 0.68056],\n    \"85\": [0, 0.69444, 0, 0, 0.6875],\n    \"86\": [0, 0.69444, 0.01389, 0, 0.66667],\n    \"87\": [0, 0.69444, 0.01389, 0, 0.94445],\n    \"88\": [0, 0.69444, 0, 0, 0.66667],\n    \"89\": [0, 0.69444, 0.025, 0, 0.66667],\n    \"90\": [0, 0.69444, 0, 0, 0.61111],\n    \"91\": [0.25, 0.75, 0, 0, 0.28889],\n    \"93\": [0.25, 0.75, 0, 0, 0.28889],\n    \"94\": [0, 0.69444, 0, 0, 0.5],\n    \"95\": [0.35, 0.09444, 0.02778, 0, 0.5],\n    \"97\": [0, 0.44444, 0, 0, 0.48056],\n    \"98\": [0, 0.69444, 0, 0, 0.51667],\n    \"99\": [0, 0.44444, 0, 0, 0.44445],\n    \"100\": [0, 0.69444, 0, 0, 0.51667],\n    \"101\": [0, 0.44444, 0, 0, 0.44445],\n    \"102\": [0, 0.69444, 0.06944, 0, 0.30556],\n    \"103\": [0.19444, 0.44444, 0.01389, 0, 0.5],\n    \"104\": [0, 0.69444, 0, 0, 0.51667],\n    \"105\": [0, 0.67937, 0, 0, 0.23889],\n    \"106\": [0.19444, 0.67937, 0, 0, 0.26667],\n    \"107\": [0, 0.69444, 0, 0, 0.48889],\n    \"108\": [0, 0.69444, 0, 0, 0.23889],\n    \"109\": [0, 0.44444, 0, 0, 0.79445],\n    \"110\": [0, 0.44444, 0, 0, 0.51667],\n    \"111\": [0, 0.44444, 0, 0, 0.5],\n    \"112\": [0.19444, 0.44444, 0, 0, 0.51667],\n    \"113\": [0.19444, 0.44444, 0, 0, 0.51667],\n    \"114\": [0, 0.44444, 0.01389, 0, 0.34167],\n    \"115\": [0, 0.44444, 0, 0, 0.38333],\n    \"116\": [0, 0.57143, 0, 0, 0.36111],\n    \"117\": [0, 0.44444, 0, 0, 0.51667],\n    \"118\": [0, 0.44444, 0.01389, 0, 0.46111],\n    \"119\": [0, 0.44444, 0.01389, 0, 0.68334],\n    \"120\": [0, 0.44444, 0, 0, 0.46111],\n    \"121\": [0.19444, 0.44444, 0.01389, 0, 0.46111],\n    \"122\": [0, 0.44444, 0, 0, 0.43472],\n    \"126\": [0.35, 0.32659, 0, 0, 0.5],\n    \"168\": [0, 0.67937, 0, 0, 0.5],\n    \"176\": [0, 0.69444, 0, 0, 0.66667],\n    \"184\": [0.17014, 0, 0, 0, 0.44445],\n    \"305\": [0, 0.44444, 0, 0, 0.23889],\n    \"567\": [0.19444, 0.44444, 0, 0, 0.26667],\n    \"710\": [0, 0.69444, 0, 0, 0.5],\n    \"711\": [0, 0.63194, 0, 0, 0.5],\n    \"713\": [0, 0.60889, 0, 0, 0.5],\n    \"714\": [0, 0.69444, 0, 0, 0.5],\n    \"715\": [0, 0.69444, 0, 0, 0.5],\n    \"728\": [0, 0.69444, 0, 0, 0.5],\n    \"729\": [0, 0.67937, 0, 0, 0.27778],\n    \"730\": [0, 0.69444, 0, 0, 0.66667],\n    \"732\": [0, 0.67659, 0, 0, 0.5],\n    \"733\": [0, 0.69444, 0, 0, 0.5],\n    \"915\": [0, 0.69444, 0, 0, 0.54167],\n    \"916\": [0, 0.69444, 0, 0, 0.83334],\n    \"920\": [0, 0.69444, 0, 0, 0.77778],\n    \"923\": [0, 0.69444, 0, 0, 0.61111],\n    \"926\": [0, 0.69444, 0, 0, 0.66667],\n    \"928\": [0, 0.69444, 0, 0, 0.70834],\n    \"931\": [0, 0.69444, 0, 0, 0.72222],\n    \"933\": [0, 0.69444, 0, 0, 0.77778],\n    \"934\": [0, 0.69444, 0, 0, 0.72222],\n    \"936\": [0, 0.69444, 0, 0, 0.77778],\n    \"937\": [0, 0.69444, 0, 0, 0.72222],\n    \"8211\": [0, 0.44444, 0.02778, 0, 0.5],\n    \"8212\": [0, 0.44444, 0.02778, 0, 1.0],\n    \"8216\": [0, 0.69444, 0, 0, 0.27778],\n    \"8217\": [0, 0.69444, 0, 0, 0.27778],\n    \"8220\": [0, 0.69444, 0, 0, 0.5],\n    \"8221\": [0, 0.69444, 0, 0, 0.5]\n  },\n  \"Script-Regular\": {\n    \"65\": [0, 0.7, 0.22925, 0, 0.80253],\n    \"66\": [0, 0.7, 0.04087, 0, 0.90757],\n    \"67\": [0, 0.7, 0.1689, 0, 0.66619],\n    \"68\": [0, 0.7, 0.09371, 0, 0.77443],\n    \"69\": [0, 0.7, 0.18583, 0, 0.56162],\n    \"70\": [0, 0.7, 0.13634, 0, 0.89544],\n    \"71\": [0, 0.7, 0.17322, 0, 0.60961],\n    \"72\": [0, 0.7, 0.29694, 0, 0.96919],\n    \"73\": [0, 0.7, 0.19189, 0, 0.80907],\n    \"74\": [0.27778, 0.7, 0.19189, 0, 1.05159],\n    \"75\": [0, 0.7, 0.31259, 0, 0.91364],\n    \"76\": [0, 0.7, 0.19189, 0, 0.87373],\n    \"77\": [0, 0.7, 0.15981, 0, 1.08031],\n    \"78\": [0, 0.7, 0.3525, 0, 0.9015],\n    \"79\": [0, 0.7, 0.08078, 0, 0.73787],\n    \"80\": [0, 0.7, 0.08078, 0, 1.01262],\n    \"81\": [0, 0.7, 0.03305, 0, 0.88282],\n    \"82\": [0, 0.7, 0.06259, 0, 0.85],\n    \"83\": [0, 0.7, 0.19189, 0, 0.86767],\n    \"84\": [0, 0.7, 0.29087, 0, 0.74697],\n    \"85\": [0, 0.7, 0.25815, 0, 0.79996],\n    \"86\": [0, 0.7, 0.27523, 0, 0.62204],\n    \"87\": [0, 0.7, 0.27523, 0, 0.80532],\n    \"88\": [0, 0.7, 0.26006, 0, 0.94445],\n    \"89\": [0, 0.7, 0.2939, 0, 0.70961],\n    \"90\": [0, 0.7, 0.24037, 0, 0.8212]\n  },\n  \"Size1-Regular\": {\n    \"40\": [0.35001, 0.85, 0, 0, 0.45834],\n    \"41\": [0.35001, 0.85, 0, 0, 0.45834],\n    \"47\": [0.35001, 0.85, 0, 0, 0.57778],\n    \"91\": [0.35001, 0.85, 0, 0, 0.41667],\n    \"92\": [0.35001, 0.85, 0, 0, 0.57778],\n    \"93\": [0.35001, 0.85, 0, 0, 0.41667],\n    \"123\": [0.35001, 0.85, 0, 0, 0.58334],\n    \"125\": [0.35001, 0.85, 0, 0, 0.58334],\n    \"710\": [0, 0.72222, 0, 0, 0.55556],\n    \"732\": [0, 0.72222, 0, 0, 0.55556],\n    \"770\": [0, 0.72222, 0, 0, 0.55556],\n    \"771\": [0, 0.72222, 0, 0, 0.55556],\n    \"8214\": [-0.00099, 0.601, 0, 0, 0.77778],\n    \"8593\": [1e-05, 0.6, 0, 0, 0.66667],\n    \"8595\": [1e-05, 0.6, 0, 0, 0.66667],\n    \"8657\": [1e-05, 0.6, 0, 0, 0.77778],\n    \"8659\": [1e-05, 0.6, 0, 0, 0.77778],\n    \"8719\": [0.25001, 0.75, 0, 0, 0.94445],\n    \"8720\": [0.25001, 0.75, 0, 0, 0.94445],\n    \"8721\": [0.25001, 0.75, 0, 0, 1.05556],\n    \"8730\": [0.35001, 0.85, 0, 0, 1.0],\n    \"8739\": [-0.00599, 0.606, 0, 0, 0.33333],\n    \"8741\": [-0.00599, 0.606, 0, 0, 0.55556],\n    \"8747\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n    \"8748\": [0.306, 0.805, 0.19445, 0, 0.47222],\n    \"8749\": [0.306, 0.805, 0.19445, 0, 0.47222],\n    \"8750\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n    \"8896\": [0.25001, 0.75, 0, 0, 0.83334],\n    \"8897\": [0.25001, 0.75, 0, 0, 0.83334],\n    \"8898\": [0.25001, 0.75, 0, 0, 0.83334],\n    \"8899\": [0.25001, 0.75, 0, 0, 0.83334],\n    \"8968\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"8969\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"8970\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"8971\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"9168\": [-0.00099, 0.601, 0, 0, 0.66667],\n    \"10216\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"10217\": [0.35001, 0.85, 0, 0, 0.47222],\n    \"10752\": [0.25001, 0.75, 0, 0, 1.11111],\n    \"10753\": [0.25001, 0.75, 0, 0, 1.11111],\n    \"10754\": [0.25001, 0.75, 0, 0, 1.11111],\n    \"10756\": [0.25001, 0.75, 0, 0, 0.83334],\n    \"10758\": [0.25001, 0.75, 0, 0, 0.83334]\n  },\n  \"Size2-Regular\": {\n    \"40\": [0.65002, 1.15, 0, 0, 0.59722],\n    \"41\": [0.65002, 1.15, 0, 0, 0.59722],\n    \"47\": [0.65002, 1.15, 0, 0, 0.81111],\n    \"91\": [0.65002, 1.15, 0, 0, 0.47222],\n    \"92\": [0.65002, 1.15, 0, 0, 0.81111],\n    \"93\": [0.65002, 1.15, 0, 0, 0.47222],\n    \"123\": [0.65002, 1.15, 0, 0, 0.66667],\n    \"125\": [0.65002, 1.15, 0, 0, 0.66667],\n    \"710\": [0, 0.75, 0, 0, 1.0],\n    \"732\": [0, 0.75, 0, 0, 1.0],\n    \"770\": [0, 0.75, 0, 0, 1.0],\n    \"771\": [0, 0.75, 0, 0, 1.0],\n    \"8719\": [0.55001, 1.05, 0, 0, 1.27778],\n    \"8720\": [0.55001, 1.05, 0, 0, 1.27778],\n    \"8721\": [0.55001, 1.05, 0, 0, 1.44445],\n    \"8730\": [0.65002, 1.15, 0, 0, 1.0],\n    \"8747\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n    \"8748\": [0.862, 1.36, 0.44445, 0, 0.55556],\n    \"8749\": [0.862, 1.36, 0.44445, 0, 0.55556],\n    \"8750\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n    \"8896\": [0.55001, 1.05, 0, 0, 1.11111],\n    \"8897\": [0.55001, 1.05, 0, 0, 1.11111],\n    \"8898\": [0.55001, 1.05, 0, 0, 1.11111],\n    \"8899\": [0.55001, 1.05, 0, 0, 1.11111],\n    \"8968\": [0.65002, 1.15, 0, 0, 0.52778],\n    \"8969\": [0.65002, 1.15, 0, 0, 0.52778],\n    \"8970\": [0.65002, 1.15, 0, 0, 0.52778],\n    \"8971\": [0.65002, 1.15, 0, 0, 0.52778],\n    \"10216\": [0.65002, 1.15, 0, 0, 0.61111],\n    \"10217\": [0.65002, 1.15, 0, 0, 0.61111],\n    \"10752\": [0.55001, 1.05, 0, 0, 1.51112],\n    \"10753\": [0.55001, 1.05, 0, 0, 1.51112],\n    \"10754\": [0.55001, 1.05, 0, 0, 1.51112],\n    \"10756\": [0.55001, 1.05, 0, 0, 1.11111],\n    \"10758\": [0.55001, 1.05, 0, 0, 1.11111]\n  },\n  \"Size3-Regular\": {\n    \"40\": [0.95003, 1.45, 0, 0, 0.73611],\n    \"41\": [0.95003, 1.45, 0, 0, 0.73611],\n    \"47\": [0.95003, 1.45, 0, 0, 1.04445],\n    \"91\": [0.95003, 1.45, 0, 0, 0.52778],\n    \"92\": [0.95003, 1.45, 0, 0, 1.04445],\n    \"93\": [0.95003, 1.45, 0, 0, 0.52778],\n    \"123\": [0.95003, 1.45, 0, 0, 0.75],\n    \"125\": [0.95003, 1.45, 0, 0, 0.75],\n    \"710\": [0, 0.75, 0, 0, 1.44445],\n    \"732\": [0, 0.75, 0, 0, 1.44445],\n    \"770\": [0, 0.75, 0, 0, 1.44445],\n    \"771\": [0, 0.75, 0, 0, 1.44445],\n    \"8730\": [0.95003, 1.45, 0, 0, 1.0],\n    \"8968\": [0.95003, 1.45, 0, 0, 0.58334],\n    \"8969\": [0.95003, 1.45, 0, 0, 0.58334],\n    \"8970\": [0.95003, 1.45, 0, 0, 0.58334],\n    \"8971\": [0.95003, 1.45, 0, 0, 0.58334],\n    \"10216\": [0.95003, 1.45, 0, 0, 0.75],\n    \"10217\": [0.95003, 1.45, 0, 0, 0.75]\n  },\n  \"Size4-Regular\": {\n    \"40\": [1.25003, 1.75, 0, 0, 0.79167],\n    \"41\": [1.25003, 1.75, 0, 0, 0.79167],\n    \"47\": [1.25003, 1.75, 0, 0, 1.27778],\n    \"91\": [1.25003, 1.75, 0, 0, 0.58334],\n    \"92\": [1.25003, 1.75, 0, 0, 1.27778],\n    \"93\": [1.25003, 1.75, 0, 0, 0.58334],\n    \"123\": [1.25003, 1.75, 0, 0, 0.80556],\n    \"125\": [1.25003, 1.75, 0, 0, 0.80556],\n    \"710\": [0, 0.825, 0, 0, 1.8889],\n    \"732\": [0, 0.825, 0, 0, 1.8889],\n    \"770\": [0, 0.825, 0, 0, 1.8889],\n    \"771\": [0, 0.825, 0, 0, 1.8889],\n    \"8730\": [1.25003, 1.75, 0, 0, 1.0],\n    \"8968\": [1.25003, 1.75, 0, 0, 0.63889],\n    \"8969\": [1.25003, 1.75, 0, 0, 0.63889],\n    \"8970\": [1.25003, 1.75, 0, 0, 0.63889],\n    \"8971\": [1.25003, 1.75, 0, 0, 0.63889],\n    \"9115\": [0.64502, 1.155, 0, 0, 0.875],\n    \"9116\": [1e-05, 0.6, 0, 0, 0.875],\n    \"9117\": [0.64502, 1.155, 0, 0, 0.875],\n    \"9118\": [0.64502, 1.155, 0, 0, 0.875],\n    \"9119\": [1e-05, 0.6, 0, 0, 0.875],\n    \"9120\": [0.64502, 1.155, 0, 0, 0.875],\n    \"9121\": [0.64502, 1.155, 0, 0, 0.66667],\n    \"9122\": [-0.00099, 0.601, 0, 0, 0.66667],\n    \"9123\": [0.64502, 1.155, 0, 0, 0.66667],\n    \"9124\": [0.64502, 1.155, 0, 0, 0.66667],\n    \"9125\": [-0.00099, 0.601, 0, 0, 0.66667],\n    \"9126\": [0.64502, 1.155, 0, 0, 0.66667],\n    \"9127\": [1e-05, 0.9, 0, 0, 0.88889],\n    \"9128\": [0.65002, 1.15, 0, 0, 0.88889],\n    \"9129\": [0.90001, 0, 0, 0, 0.88889],\n    \"9130\": [0, 0.3, 0, 0, 0.88889],\n    \"9131\": [1e-05, 0.9, 0, 0, 0.88889],\n    \"9132\": [0.65002, 1.15, 0, 0, 0.88889],\n    \"9133\": [0.90001, 0, 0, 0, 0.88889],\n    \"9143\": [0.88502, 0.915, 0, 0, 1.05556],\n    \"10216\": [1.25003, 1.75, 0, 0, 0.80556],\n    \"10217\": [1.25003, 1.75, 0, 0, 0.80556],\n    \"57344\": [-0.00499, 0.605, 0, 0, 1.05556],\n    \"57345\": [-0.00499, 0.605, 0, 0, 1.05556],\n    \"57680\": [0, 0.12, 0, 0, 0.45],\n    \"57681\": [0, 0.12, 0, 0, 0.45],\n    \"57682\": [0, 0.12, 0, 0, 0.45],\n    \"57683\": [0, 0.12, 0, 0, 0.45]\n  },\n  \"Typewriter-Regular\": {\n    \"32\": [0, 0, 0, 0, 0.525],\n    \"33\": [0, 0.61111, 0, 0, 0.525],\n    \"34\": [0, 0.61111, 0, 0, 0.525],\n    \"35\": [0, 0.61111, 0, 0, 0.525],\n    \"36\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"37\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"38\": [0, 0.61111, 0, 0, 0.525],\n    \"39\": [0, 0.61111, 0, 0, 0.525],\n    \"40\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"41\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"42\": [0, 0.52083, 0, 0, 0.525],\n    \"43\": [-0.08056, 0.53055, 0, 0, 0.525],\n    \"44\": [0.13889, 0.125, 0, 0, 0.525],\n    \"45\": [-0.08056, 0.53055, 0, 0, 0.525],\n    \"46\": [0, 0.125, 0, 0, 0.525],\n    \"47\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"48\": [0, 0.61111, 0, 0, 0.525],\n    \"49\": [0, 0.61111, 0, 0, 0.525],\n    \"50\": [0, 0.61111, 0, 0, 0.525],\n    \"51\": [0, 0.61111, 0, 0, 0.525],\n    \"52\": [0, 0.61111, 0, 0, 0.525],\n    \"53\": [0, 0.61111, 0, 0, 0.525],\n    \"54\": [0, 0.61111, 0, 0, 0.525],\n    \"55\": [0, 0.61111, 0, 0, 0.525],\n    \"56\": [0, 0.61111, 0, 0, 0.525],\n    \"57\": [0, 0.61111, 0, 0, 0.525],\n    \"58\": [0, 0.43056, 0, 0, 0.525],\n    \"59\": [0.13889, 0.43056, 0, 0, 0.525],\n    \"60\": [-0.05556, 0.55556, 0, 0, 0.525],\n    \"61\": [-0.19549, 0.41562, 0, 0, 0.525],\n    \"62\": [-0.05556, 0.55556, 0, 0, 0.525],\n    \"63\": [0, 0.61111, 0, 0, 0.525],\n    \"64\": [0, 0.61111, 0, 0, 0.525],\n    \"65\": [0, 0.61111, 0, 0, 0.525],\n    \"66\": [0, 0.61111, 0, 0, 0.525],\n    \"67\": [0, 0.61111, 0, 0, 0.525],\n    \"68\": [0, 0.61111, 0, 0, 0.525],\n    \"69\": [0, 0.61111, 0, 0, 0.525],\n    \"70\": [0, 0.61111, 0, 0, 0.525],\n    \"71\": [0, 0.61111, 0, 0, 0.525],\n    \"72\": [0, 0.61111, 0, 0, 0.525],\n    \"73\": [0, 0.61111, 0, 0, 0.525],\n    \"74\": [0, 0.61111, 0, 0, 0.525],\n    \"75\": [0, 0.61111, 0, 0, 0.525],\n    \"76\": [0, 0.61111, 0, 0, 0.525],\n    \"77\": [0, 0.61111, 0, 0, 0.525],\n    \"78\": [0, 0.61111, 0, 0, 0.525],\n    \"79\": [0, 0.61111, 0, 0, 0.525],\n    \"80\": [0, 0.61111, 0, 0, 0.525],\n    \"81\": [0.13889, 0.61111, 0, 0, 0.525],\n    \"82\": [0, 0.61111, 0, 0, 0.525],\n    \"83\": [0, 0.61111, 0, 0, 0.525],\n    \"84\": [0, 0.61111, 0, 0, 0.525],\n    \"85\": [0, 0.61111, 0, 0, 0.525],\n    \"86\": [0, 0.61111, 0, 0, 0.525],\n    \"87\": [0, 0.61111, 0, 0, 0.525],\n    \"88\": [0, 0.61111, 0, 0, 0.525],\n    \"89\": [0, 0.61111, 0, 0, 0.525],\n    \"90\": [0, 0.61111, 0, 0, 0.525],\n    \"91\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"92\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"93\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"94\": [0, 0.61111, 0, 0, 0.525],\n    \"95\": [0.09514, 0, 0, 0, 0.525],\n    \"96\": [0, 0.61111, 0, 0, 0.525],\n    \"97\": [0, 0.43056, 0, 0, 0.525],\n    \"98\": [0, 0.61111, 0, 0, 0.525],\n    \"99\": [0, 0.43056, 0, 0, 0.525],\n    \"100\": [0, 0.61111, 0, 0, 0.525],\n    \"101\": [0, 0.43056, 0, 0, 0.525],\n    \"102\": [0, 0.61111, 0, 0, 0.525],\n    \"103\": [0.22222, 0.43056, 0, 0, 0.525],\n    \"104\": [0, 0.61111, 0, 0, 0.525],\n    \"105\": [0, 0.61111, 0, 0, 0.525],\n    \"106\": [0.22222, 0.61111, 0, 0, 0.525],\n    \"107\": [0, 0.61111, 0, 0, 0.525],\n    \"108\": [0, 0.61111, 0, 0, 0.525],\n    \"109\": [0, 0.43056, 0, 0, 0.525],\n    \"110\": [0, 0.43056, 0, 0, 0.525],\n    \"111\": [0, 0.43056, 0, 0, 0.525],\n    \"112\": [0.22222, 0.43056, 0, 0, 0.525],\n    \"113\": [0.22222, 0.43056, 0, 0, 0.525],\n    \"114\": [0, 0.43056, 0, 0, 0.525],\n    \"115\": [0, 0.43056, 0, 0, 0.525],\n    \"116\": [0, 0.55358, 0, 0, 0.525],\n    \"117\": [0, 0.43056, 0, 0, 0.525],\n    \"118\": [0, 0.43056, 0, 0, 0.525],\n    \"119\": [0, 0.43056, 0, 0, 0.525],\n    \"120\": [0, 0.43056, 0, 0, 0.525],\n    \"121\": [0.22222, 0.43056, 0, 0, 0.525],\n    \"122\": [0, 0.43056, 0, 0, 0.525],\n    \"123\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"124\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"125\": [0.08333, 0.69444, 0, 0, 0.525],\n    \"126\": [0, 0.61111, 0, 0, 0.525],\n    \"127\": [0, 0.61111, 0, 0, 0.525],\n    \"160\": [0, 0, 0, 0, 0.525],\n    \"176\": [0, 0.61111, 0, 0, 0.525],\n    \"184\": [0.19445, 0, 0, 0, 0.525],\n    \"305\": [0, 0.43056, 0, 0, 0.525],\n    \"567\": [0.22222, 0.43056, 0, 0, 0.525],\n    \"711\": [0, 0.56597, 0, 0, 0.525],\n    \"713\": [0, 0.56555, 0, 0, 0.525],\n    \"714\": [0, 0.61111, 0, 0, 0.525],\n    \"715\": [0, 0.61111, 0, 0, 0.525],\n    \"728\": [0, 0.61111, 0, 0, 0.525],\n    \"730\": [0, 0.61111, 0, 0, 0.525],\n    \"770\": [0, 0.61111, 0, 0, 0.525],\n    \"771\": [0, 0.61111, 0, 0, 0.525],\n    \"776\": [0, 0.61111, 0, 0, 0.525],\n    \"915\": [0, 0.61111, 0, 0, 0.525],\n    \"916\": [0, 0.61111, 0, 0, 0.525],\n    \"920\": [0, 0.61111, 0, 0, 0.525],\n    \"923\": [0, 0.61111, 0, 0, 0.525],\n    \"926\": [0, 0.61111, 0, 0, 0.525],\n    \"928\": [0, 0.61111, 0, 0, 0.525],\n    \"931\": [0, 0.61111, 0, 0, 0.525],\n    \"933\": [0, 0.61111, 0, 0, 0.525],\n    \"934\": [0, 0.61111, 0, 0, 0.525],\n    \"936\": [0, 0.61111, 0, 0, 0.525],\n    \"937\": [0, 0.61111, 0, 0, 0.525],\n    \"8216\": [0, 0.61111, 0, 0, 0.525],\n    \"8217\": [0, 0.61111, 0, 0, 0.525],\n    \"8242\": [0, 0.61111, 0, 0, 0.525],\n    \"9251\": [0.11111, 0.21944, 0, 0, 0.525]\n  }\n});\n// CONCATENATED MODULE: ./src/fontMetrics.js\n\n\n/**\n * This file contains metrics regarding fonts and individual symbols. The sigma\n * and xi variables, as well as the metricMap map contain data extracted from\n * TeX, TeX font metrics, and the TTF files. These data are then exposed via the\n * `metrics` variable and the getCharacterMetrics function.\n */\n// In TeX, there are actually three sets of dimensions, one for each of\n// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:\n// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt).  These are\n// provided in the the arrays below, in that order.\n//\n// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.\n// This was determined by running the following script:\n//\n//     latex -interaction=nonstopmode \\\n//     '\\documentclass{article}\\usepackage{amsmath}\\begin{document}' \\\n//     '$a$ \\expandafter\\show\\the\\textfont2' \\\n//     '\\expandafter\\show\\the\\scriptfont2' \\\n//     '\\expandafter\\show\\the\\scriptscriptfont2' \\\n//     '\\stop'\n//\n// The metrics themselves were retreived using the following commands:\n//\n//     tftopl cmsy10\n//     tftopl cmsy7\n//     tftopl cmsy5\n//\n// The output of each of these commands is quite lengthy.  The only part we\n// care about is the FONTDIMEN section. Each value is measured in EMs.\nvar sigmasAndXis = {\n  slant: [0.250, 0.250, 0.250],\n  // sigma1\n  space: [0.000, 0.000, 0.000],\n  // sigma2\n  stretch: [0.000, 0.000, 0.000],\n  // sigma3\n  shrink: [0.000, 0.000, 0.000],\n  // sigma4\n  xHeight: [0.431, 0.431, 0.431],\n  // sigma5\n  quad: [1.000, 1.171, 1.472],\n  // sigma6\n  extraSpace: [0.000, 0.000, 0.000],\n  // sigma7\n  num1: [0.677, 0.732, 0.925],\n  // sigma8\n  num2: [0.394, 0.384, 0.387],\n  // sigma9\n  num3: [0.444, 0.471, 0.504],\n  // sigma10\n  denom1: [0.686, 0.752, 1.025],\n  // sigma11\n  denom2: [0.345, 0.344, 0.532],\n  // sigma12\n  sup1: [0.413, 0.503, 0.504],\n  // sigma13\n  sup2: [0.363, 0.431, 0.404],\n  // sigma14\n  sup3: [0.289, 0.286, 0.294],\n  // sigma15\n  sub1: [0.150, 0.143, 0.200],\n  // sigma16\n  sub2: [0.247, 0.286, 0.400],\n  // sigma17\n  supDrop: [0.386, 0.353, 0.494],\n  // sigma18\n  subDrop: [0.050, 0.071, 0.100],\n  // sigma19\n  delim1: [2.390, 1.700, 1.980],\n  // sigma20\n  delim2: [1.010, 1.157, 1.420],\n  // sigma21\n  axisHeight: [0.250, 0.250, 0.250],\n  // sigma22\n  // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;\n  // they correspond to the font parameters of the extension fonts (family 3).\n  // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to\n  // match cmex7, we'd use cmex7.tfm values for script and scriptscript\n  // values.\n  defaultRuleThickness: [0.04, 0.049, 0.049],\n  // xi8; cmex7: 0.049\n  bigOpSpacing1: [0.111, 0.111, 0.111],\n  // xi9\n  bigOpSpacing2: [0.166, 0.166, 0.166],\n  // xi10\n  bigOpSpacing3: [0.2, 0.2, 0.2],\n  // xi11\n  bigOpSpacing4: [0.6, 0.611, 0.611],\n  // xi12; cmex7: 0.611\n  bigOpSpacing5: [0.1, 0.143, 0.143],\n  // xi13; cmex7: 0.143\n  // The \\sqrt rule width is taken from the height of the surd character.\n  // Since we use the same font at all sizes, this thickness doesn't scale.\n  sqrtRuleThickness: [0.04, 0.04, 0.04],\n  // This value determines how large a pt is, for metrics which are defined\n  // in terms of pts.\n  // This value is also used in katex.less; if you change it make sure the\n  // values match.\n  ptPerEm: [10.0, 10.0, 10.0],\n  // The space between adjacent `|` columns in an array definition. From\n  // `\\showthe\\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.\n  doubleRuleSep: [0.2, 0.2, 0.2]\n}; // This map contains a mapping from font name and character code to character\n// metrics, including height, depth, italic correction, and skew (kern from the\n// character to the corresponding \\skewchar)\n// This map is generated via `make metrics`. It should not be changed manually.\n\n // These are very rough approximations.  We default to Times New Roman which\n// should have Latin-1 and Cyrillic characters, but may not depending on the\n// operating system.  The metrics do not account for extra height from the\n// accents.  In the case of Cyrillic characters which have both ascenders and\n// descenders we prefer approximations with ascenders, primarily to prevent\n// the fraction bar or root line from intersecting the glyph.\n// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.\n\nvar extraCharacterMap = {\n  // Latin-1\n  'Å': 'A',\n  'Ç': 'C',\n  'Ð': 'D',\n  'Þ': 'o',\n  'å': 'a',\n  'ç': 'c',\n  'ð': 'd',\n  'þ': 'o',\n  // Cyrillic\n  'А': 'A',\n  'Б': 'B',\n  'В': 'B',\n  'Г': 'F',\n  'Д': 'A',\n  'Е': 'E',\n  'Ж': 'K',\n  'З': '3',\n  'И': 'N',\n  'Й': 'N',\n  'К': 'K',\n  'Л': 'N',\n  'М': 'M',\n  'Н': 'H',\n  'О': 'O',\n  'П': 'N',\n  'Р': 'P',\n  'С': 'C',\n  'Т': 'T',\n  'У': 'y',\n  'Ф': 'O',\n  'Х': 'X',\n  'Ц': 'U',\n  'Ч': 'h',\n  'Ш': 'W',\n  'Щ': 'W',\n  'Ъ': 'B',\n  'Ы': 'X',\n  'Ь': 'B',\n  'Э': '3',\n  'Ю': 'X',\n  'Я': 'R',\n  'а': 'a',\n  'б': 'b',\n  'в': 'a',\n  'г': 'r',\n  'д': 'y',\n  'е': 'e',\n  'ж': 'm',\n  'з': 'e',\n  'и': 'n',\n  'й': 'n',\n  'к': 'n',\n  'л': 'n',\n  'м': 'm',\n  'н': 'n',\n  'о': 'o',\n  'п': 'n',\n  'р': 'p',\n  'с': 'c',\n  'т': 'o',\n  'у': 'y',\n  'ф': 'b',\n  'х': 'x',\n  'ц': 'n',\n  'ч': 'n',\n  'ш': 'w',\n  'щ': 'w',\n  'ъ': 'a',\n  'ы': 'm',\n  'ь': 'a',\n  'э': 'e',\n  'ю': 'm',\n  'я': 'r'\n};\n\n/**\n * This function adds new font metrics to default metricMap\n * It can also override existing metrics\n */\nfunction setFontMetrics(fontName, metrics) {\n  fontMetricsData[fontName] = metrics;\n}\n/**\n * This function is a convenience function for looking up information in the\n * metricMap table. It takes a character as a string, and a font.\n *\n * Note: the `width` property may be undefined if fontMetricsData.js wasn't\n * built using `Make extended_metrics`.\n */\n\nfunction getCharacterMetrics(character, font, mode) {\n  if (!fontMetricsData[font]) {\n    throw new Error(\"Font metrics not found for font: \" + font + \".\");\n  }\n\n  var ch = character.charCodeAt(0);\n  var metrics = fontMetricsData[font][ch];\n\n  if (!metrics && character[0] in extraCharacterMap) {\n    ch = extraCharacterMap[character[0]].charCodeAt(0);\n    metrics = fontMetricsData[font][ch];\n  }\n\n  if (!metrics && mode === 'text') {\n    // We don't typically have font metrics for Asian scripts.\n    // But since we support them in text mode, we need to return\n    // some sort of metrics.\n    // So if the character is in a script we support but we\n    // don't have metrics for it, just use the metrics for\n    // the Latin capital letter M. This is close enough because\n    // we (currently) only care about the height of the glpyh\n    // not its width.\n    if (supportedCodepoint(ch)) {\n      metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M'\n    }\n  }\n\n  if (metrics) {\n    return {\n      depth: metrics[0],\n      height: metrics[1],\n      italic: metrics[2],\n      skew: metrics[3],\n      width: metrics[4]\n    };\n  }\n}\nvar fontMetricsBySizeIndex = {};\n/**\n * Get the font metrics for a given size.\n */\n\nfunction getGlobalMetrics(size) {\n  var sizeIndex;\n\n  if (size >= 5) {\n    sizeIndex = 0;\n  } else if (size >= 3) {\n    sizeIndex = 1;\n  } else {\n    sizeIndex = 2;\n  }\n\n  if (!fontMetricsBySizeIndex[sizeIndex]) {\n    var metrics = fontMetricsBySizeIndex[sizeIndex] = {\n      cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18\n    };\n\n    for (var key in sigmasAndXis) {\n      if (sigmasAndXis.hasOwnProperty(key)) {\n        metrics[key] = sigmasAndXis[key][sizeIndex];\n      }\n    }\n  }\n\n  return fontMetricsBySizeIndex[sizeIndex];\n}\n// CONCATENATED MODULE: ./src/symbols.js\n/**\n * This file holds a list of all no-argument functions and single-character\n * symbols (like 'a' or ';').\n *\n * For each of the symbols, there are three properties they can have:\n * - font (required): the font to be used for this symbol. Either \"main\" (the\n     normal font), or \"ams\" (the ams fonts).\n * - group (required): the ParseNode group type the symbol should have (i.e.\n     \"textord\", \"mathord\", etc).\n     See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types\n * - replace: the character that this symbol or function should be\n *   replaced with (i.e. \"\\phi\" has a replace value of \"\\u03d5\", the phi\n *   character in the main font).\n *\n * The outermost map in the table indicates what mode the symbols should be\n * accepted in (e.g. \"math\" or \"text\").\n */\n// Some of these have a \"-token\" suffix since these are also used as `ParseNode`\n// types for raw text tokens, and we want to avoid conflicts with higher-level\n// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by\n// looking up the `symbols` map.\nvar ATOMS = {\n  \"bin\": 1,\n  \"close\": 1,\n  \"inner\": 1,\n  \"open\": 1,\n  \"punct\": 1,\n  \"rel\": 1\n};\nvar NON_ATOMS = {\n  \"accent-token\": 1,\n  \"mathord\": 1,\n  \"op-token\": 1,\n  \"spacing\": 1,\n  \"textord\": 1\n};\nvar symbols = {\n  \"math\": {},\n  \"text\": {}\n};\n/* harmony default export */ var src_symbols = (symbols);\n/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */\n\nfunction defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {\n  symbols[mode][name] = {\n    font: font,\n    group: group,\n    replace: replace\n  };\n\n  if (acceptUnicodeChar && replace) {\n    symbols[mode][replace] = symbols[mode][name];\n  }\n} // Some abbreviations for commonly used strings.\n// This helps minify the code, and also spotting typos using jshint.\n// modes:\n\nvar symbols_math = \"math\";\nvar symbols_text = \"text\"; // fonts:\n\nvar main = \"main\";\nvar ams = \"ams\"; // groups:\n\nvar symbols_accent = \"accent-token\";\nvar bin = \"bin\";\nvar symbols_close = \"close\";\nvar symbols_inner = \"inner\";\nvar mathord = \"mathord\";\nvar op = \"op-token\";\nvar symbols_open = \"open\";\nvar punct = \"punct\";\nvar rel = \"rel\";\nvar symbols_spacing = \"spacing\";\nvar symbols_textord = \"textord\"; // Now comes the symbol table\n// Relation Symbols\n\ndefineSymbol(symbols_math, main, rel, \"\\u2261\", \"\\\\equiv\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u227A\", \"\\\\prec\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u227B\", \"\\\\succ\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u223C\", \"\\\\sim\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u22A5\", \"\\\\perp\");\ndefineSymbol(symbols_math, main, rel, \"\\u2AAF\", \"\\\\preceq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2AB0\", \"\\\\succeq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2243\", \"\\\\simeq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2223\", \"\\\\mid\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u226A\", \"\\\\ll\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u226B\", \"\\\\gg\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u224D\", \"\\\\asymp\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2225\", \"\\\\parallel\");\ndefineSymbol(symbols_math, main, rel, \"\\u22C8\", \"\\\\bowtie\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2323\", \"\\\\smile\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2291\", \"\\\\sqsubseteq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2292\", \"\\\\sqsupseteq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2250\", \"\\\\doteq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2322\", \"\\\\frown\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u220B\", \"\\\\ni\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u221D\", \"\\\\propto\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u22A2\", \"\\\\vdash\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u22A3\", \"\\\\dashv\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u220B\", \"\\\\owns\"); // Punctuation\n\ndefineSymbol(symbols_math, main, punct, \".\", \"\\\\ldotp\");\ndefineSymbol(symbols_math, main, punct, \"\\u22C5\", \"\\\\cdotp\"); // Misc Symbols\n\ndefineSymbol(symbols_math, main, symbols_textord, \"#\", \"\\\\#\");\ndefineSymbol(symbols_text, main, symbols_textord, \"#\", \"\\\\#\");\ndefineSymbol(symbols_math, main, symbols_textord, \"&\", \"\\\\&\");\ndefineSymbol(symbols_text, main, symbols_textord, \"&\", \"\\\\&\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2135\", \"\\\\aleph\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2200\", \"\\\\forall\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u210F\", \"\\\\hbar\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2203\", \"\\\\exists\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2207\", \"\\\\nabla\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u266D\", \"\\\\flat\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2113\", \"\\\\ell\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u266E\", \"\\\\natural\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2663\", \"\\\\clubsuit\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2118\", \"\\\\wp\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u266F\", \"\\\\sharp\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2662\", \"\\\\diamondsuit\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u211C\", \"\\\\Re\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2661\", \"\\\\heartsuit\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2111\", \"\\\\Im\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2660\", \"\\\\spadesuit\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xA7\", \"\\\\S\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xB6\", \"\\\\P\", true); // Math and Text\n\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2020\", \"\\\\textdagger\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2021\", \"\\\\textdaggerdbl\"); // Large Delimiters\n\ndefineSymbol(symbols_math, main, symbols_close, \"\\u23B1\", \"\\\\rmoustache\", true);\ndefineSymbol(symbols_math, main, symbols_open, \"\\u23B0\", \"\\\\lmoustache\", true);\ndefineSymbol(symbols_math, main, symbols_close, \"\\u27EF\", \"\\\\rgroup\", true);\ndefineSymbol(symbols_math, main, symbols_open, \"\\u27EE\", \"\\\\lgroup\", true); // Binary Operators\n\ndefineSymbol(symbols_math, main, bin, \"\\u2213\", \"\\\\mp\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2296\", \"\\\\ominus\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u228E\", \"\\\\uplus\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2293\", \"\\\\sqcap\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2217\", \"\\\\ast\");\ndefineSymbol(symbols_math, main, bin, \"\\u2294\", \"\\\\sqcup\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u25EF\", \"\\\\bigcirc\");\ndefineSymbol(symbols_math, main, bin, \"\\u2219\", \"\\\\bullet\");\ndefineSymbol(symbols_math, main, bin, \"\\u2021\", \"\\\\ddagger\");\ndefineSymbol(symbols_math, main, bin, \"\\u2240\", \"\\\\wr\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2A3F\", \"\\\\amalg\");\ndefineSymbol(symbols_math, main, bin, \"&\", \"\\\\And\"); // from amsmath\n// Arrow Symbols\n\ndefineSymbol(symbols_math, main, rel, \"\\u27F5\", \"\\\\longleftarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D0\", \"\\\\Leftarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27F8\", \"\\\\Longleftarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27F6\", \"\\\\longrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D2\", \"\\\\Rightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27F9\", \"\\\\Longrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2194\", \"\\\\leftrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27F7\", \"\\\\longleftrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D4\", \"\\\\Leftrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27FA\", \"\\\\Longleftrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21A6\", \"\\\\mapsto\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u27FC\", \"\\\\longmapsto\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2197\", \"\\\\nearrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21A9\", \"\\\\hookleftarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21AA\", \"\\\\hookrightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2198\", \"\\\\searrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21BC\", \"\\\\leftharpoonup\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21C0\", \"\\\\rightharpoonup\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2199\", \"\\\\swarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21BD\", \"\\\\leftharpoondown\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21C1\", \"\\\\rightharpoondown\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2196\", \"\\\\nwarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21CC\", \"\\\\rightleftharpoons\", true); // AMS Negated Binary Relations\n\ndefineSymbol(symbols_math, ams, rel, \"\\u226E\", \"\\\\nless\", true); // Symbol names preceeded by \"@\" each have a corresponding macro.\n\ndefineSymbol(symbols_math, ams, rel, \"\\uE010\", \"\\\\@nleqslant\");\ndefineSymbol(symbols_math, ams, rel, \"\\uE011\", \"\\\\@nleqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2A87\", \"\\\\lneq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2268\", \"\\\\lneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE00C\", \"\\\\@lvertneqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22E6\", \"\\\\lnsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A89\", \"\\\\lnapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2280\", \"\\\\nprec\", true); // unicode-math maps \\u22e0 to \\npreccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u22E0\", \"\\\\npreceq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22E8\", \"\\\\precnsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AB9\", \"\\\\precnapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2241\", \"\\\\nsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE006\", \"\\\\@nshortmid\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2224\", \"\\\\nmid\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22AC\", \"\\\\nvdash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22AD\", \"\\\\nvDash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22EA\", \"\\\\ntriangleleft\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22EC\", \"\\\\ntrianglelefteq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u228A\", \"\\\\subsetneq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE01A\", \"\\\\@varsubsetneq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2ACB\", \"\\\\subsetneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE017\", \"\\\\@varsubsetneqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u226F\", \"\\\\ngtr\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE00F\", \"\\\\@ngeqslant\");\ndefineSymbol(symbols_math, ams, rel, \"\\uE00E\", \"\\\\@ngeqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2A88\", \"\\\\gneq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2269\", \"\\\\gneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE00D\", \"\\\\@gvertneqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22E7\", \"\\\\gnsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A8A\", \"\\\\gnapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2281\", \"\\\\nsucc\", true); // unicode-math maps \\u22e1 to \\nsucccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u22E1\", \"\\\\nsucceq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22E9\", \"\\\\succnsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2ABA\", \"\\\\succnapprox\", true); // unicode-math maps \\u2246 to \\simneqq. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u2246\", \"\\\\ncong\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE007\", \"\\\\@nshortparallel\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2226\", \"\\\\nparallel\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22AF\", \"\\\\nVDash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22EB\", \"\\\\ntriangleright\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22ED\", \"\\\\ntrianglerighteq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE018\", \"\\\\@nsupseteqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u228B\", \"\\\\supsetneq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE01B\", \"\\\\@varsupsetneq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2ACC\", \"\\\\supsetneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE019\", \"\\\\@varsupsetneqq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22AE\", \"\\\\nVdash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AB5\", \"\\\\precneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AB6\", \"\\\\succneqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\uE016\", \"\\\\@nsubseteqq\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22B4\", \"\\\\unlhd\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22B5\", \"\\\\unrhd\"); // AMS Negated Arrows\n\ndefineSymbol(symbols_math, ams, rel, \"\\u219A\", \"\\\\nleftarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u219B\", \"\\\\nrightarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21CD\", \"\\\\nLeftarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21CF\", \"\\\\nRightarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21AE\", \"\\\\nleftrightarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21CE\", \"\\\\nLeftrightarrow\", true); // AMS Misc\n\ndefineSymbol(symbols_math, ams, rel, \"\\u25B3\", \"\\\\vartriangle\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u210F\", \"\\\\hslash\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25BD\", \"\\\\triangledown\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25CA\", \"\\\\lozenge\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u24C8\", \"\\\\circledS\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\xAE\", \"\\\\circledR\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"\\xAE\", \"\\\\circledR\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2221\", \"\\\\measuredangle\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2204\", \"\\\\nexists\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2127\", \"\\\\mho\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2132\", \"\\\\Finv\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2141\", \"\\\\Game\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2035\", \"\\\\backprime\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25B2\", \"\\\\blacktriangle\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25BC\", \"\\\\blacktriangledown\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25A0\", \"\\\\blacksquare\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u29EB\", \"\\\\blacklozenge\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2605\", \"\\\\bigstar\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2222\", \"\\\\sphericalangle\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2201\", \"\\\\complement\", true); // unicode-math maps U+F0 (ð) to \\matheth. We map to AMS function \\eth\n\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\xF0\", \"\\\\eth\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2571\", \"\\\\diagup\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2572\", \"\\\\diagdown\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25A1\", \"\\\\square\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25A1\", \"\\\\Box\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u25CA\", \"\\\\Diamond\"); // unicode-math maps U+A5 to \\mathyen. We map to AMS function \\yen\n\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\xA5\", \"\\\\yen\", true);\ndefineSymbol(symbols_text, ams, symbols_textord, \"\\xA5\", \"\\\\yen\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2713\", \"\\\\checkmark\", true);\ndefineSymbol(symbols_text, ams, symbols_textord, \"\\u2713\", \"\\\\checkmark\"); // AMS Hebrew\n\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2136\", \"\\\\beth\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2138\", \"\\\\daleth\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2137\", \"\\\\gimel\", true); // AMS Greek\n\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u03DD\", \"\\\\digamma\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u03F0\", \"\\\\varkappa\"); // AMS Delimiters\n\ndefineSymbol(symbols_math, ams, symbols_open, \"\\u250C\", \"\\\\ulcorner\", true);\ndefineSymbol(symbols_math, ams, symbols_close, \"\\u2510\", \"\\\\urcorner\", true);\ndefineSymbol(symbols_math, ams, symbols_open, \"\\u2514\", \"\\\\llcorner\", true);\ndefineSymbol(symbols_math, ams, symbols_close, \"\\u2518\", \"\\\\lrcorner\", true); // AMS Binary Relations\n\ndefineSymbol(symbols_math, ams, rel, \"\\u2266\", \"\\\\leqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A7D\", \"\\\\leqslant\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A95\", \"\\\\eqslantless\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2272\", \"\\\\lesssim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A85\", \"\\\\lessapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u224A\", \"\\\\approxeq\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22D6\", \"\\\\lessdot\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22D8\", \"\\\\lll\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2276\", \"\\\\lessgtr\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22DA\", \"\\\\lesseqgtr\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A8B\", \"\\\\lesseqqgtr\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2251\", \"\\\\doteqdot\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2253\", \"\\\\risingdotseq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2252\", \"\\\\fallingdotseq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u223D\", \"\\\\backsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22CD\", \"\\\\backsimeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AC5\", \"\\\\subseteqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22D0\", \"\\\\Subset\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u228F\", \"\\\\sqsubset\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u227C\", \"\\\\preccurlyeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22DE\", \"\\\\curlyeqprec\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u227E\", \"\\\\precsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AB7\", \"\\\\precapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22B2\", \"\\\\vartriangleleft\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22B4\", \"\\\\trianglelefteq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22A8\", \"\\\\vDash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22AA\", \"\\\\Vvdash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2323\", \"\\\\smallsmile\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2322\", \"\\\\smallfrown\");\ndefineSymbol(symbols_math, ams, rel, \"\\u224F\", \"\\\\bumpeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u224E\", \"\\\\Bumpeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2267\", \"\\\\geqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A7E\", \"\\\\geqslant\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A96\", \"\\\\eqslantgtr\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2273\", \"\\\\gtrsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A86\", \"\\\\gtrapprox\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22D7\", \"\\\\gtrdot\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22D9\", \"\\\\ggg\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2277\", \"\\\\gtrless\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22DB\", \"\\\\gtreqless\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2A8C\", \"\\\\gtreqqless\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2256\", \"\\\\eqcirc\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2257\", \"\\\\circeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u225C\", \"\\\\triangleq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u223C\", \"\\\\thicksim\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2248\", \"\\\\thickapprox\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2AC6\", \"\\\\supseteqq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22D1\", \"\\\\Supset\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2290\", \"\\\\sqsupset\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u227D\", \"\\\\succcurlyeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22DF\", \"\\\\curlyeqsucc\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u227F\", \"\\\\succsim\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2AB8\", \"\\\\succapprox\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22B3\", \"\\\\vartriangleright\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22B5\", \"\\\\trianglerighteq\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22A9\", \"\\\\Vdash\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2223\", \"\\\\shortmid\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2225\", \"\\\\shortparallel\");\ndefineSymbol(symbols_math, ams, rel, \"\\u226C\", \"\\\\between\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22D4\", \"\\\\pitchfork\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u221D\", \"\\\\varpropto\");\ndefineSymbol(symbols_math, ams, rel, \"\\u25C0\", \"\\\\blacktriangleleft\"); // unicode-math says that \\therefore is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u2234\", \"\\\\therefore\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u220D\", \"\\\\backepsilon\");\ndefineSymbol(symbols_math, ams, rel, \"\\u25B6\", \"\\\\blacktriangleright\"); // unicode-math says that \\because is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u2235\", \"\\\\because\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22D8\", \"\\\\llless\");\ndefineSymbol(symbols_math, ams, rel, \"\\u22D9\", \"\\\\gggtr\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22B2\", \"\\\\lhd\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22B3\", \"\\\\rhd\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2242\", \"\\\\eqsim\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u22C8\", \"\\\\Join\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2251\", \"\\\\Doteq\", true); // AMS Binary Operators\n\ndefineSymbol(symbols_math, ams, bin, \"\\u2214\", \"\\\\dotplus\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u2216\", \"\\\\smallsetminus\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22D2\", \"\\\\Cap\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22D3\", \"\\\\Cup\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u2A5E\", \"\\\\doublebarwedge\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u229F\", \"\\\\boxminus\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u229E\", \"\\\\boxplus\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22C7\", \"\\\\divideontimes\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22C9\", \"\\\\ltimes\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22CA\", \"\\\\rtimes\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22CB\", \"\\\\leftthreetimes\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22CC\", \"\\\\rightthreetimes\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22CF\", \"\\\\curlywedge\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22CE\", \"\\\\curlyvee\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u229D\", \"\\\\circleddash\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u229B\", \"\\\\circledast\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22C5\", \"\\\\centerdot\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22BA\", \"\\\\intercal\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22D2\", \"\\\\doublecap\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22D3\", \"\\\\doublecup\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22A0\", \"\\\\boxtimes\", true); // AMS Arrows\n// Note: unicode-math maps \\u21e2 to their own function \\rightdasharrow.\n// We'll map it to AMS function \\dashrightarrow. It produces the same atom.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u21E2\", \"\\\\dashrightarrow\", true); // unicode-math maps \\u21e0 to \\leftdasharrow. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u21E0\", \"\\\\dashleftarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C7\", \"\\\\leftleftarrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C6\", \"\\\\leftrightarrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21DA\", \"\\\\Lleftarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u219E\", \"\\\\twoheadleftarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21A2\", \"\\\\leftarrowtail\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21AB\", \"\\\\looparrowleft\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21CB\", \"\\\\leftrightharpoons\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21B6\", \"\\\\curvearrowleft\", true); // unicode-math maps \\u21ba to \\acwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u21BA\", \"\\\\circlearrowleft\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21B0\", \"\\\\Lsh\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C8\", \"\\\\upuparrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21BF\", \"\\\\upharpoonleft\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C3\", \"\\\\downharpoonleft\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u22B8\", \"\\\\multimap\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21AD\", \"\\\\leftrightsquigarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C9\", \"\\\\rightrightarrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C4\", \"\\\\rightleftarrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21A0\", \"\\\\twoheadrightarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21A3\", \"\\\\rightarrowtail\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21AC\", \"\\\\looparrowright\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21B7\", \"\\\\curvearrowright\", true); // unicode-math maps \\u21bb to \\cwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(symbols_math, ams, rel, \"\\u21BB\", \"\\\\circlearrowright\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21B1\", \"\\\\Rsh\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21CA\", \"\\\\downdownarrows\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21BE\", \"\\\\upharpoonright\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21C2\", \"\\\\downharpoonright\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21DD\", \"\\\\rightsquigarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21DD\", \"\\\\leadsto\");\ndefineSymbol(symbols_math, ams, rel, \"\\u21DB\", \"\\\\Rrightarrow\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u21BE\", \"\\\\restriction\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2018\", \"`\");\ndefineSymbol(symbols_math, main, symbols_textord, \"$\", \"\\\\$\");\ndefineSymbol(symbols_text, main, symbols_textord, \"$\", \"\\\\$\");\ndefineSymbol(symbols_text, main, symbols_textord, \"$\", \"\\\\textdollar\");\ndefineSymbol(symbols_math, main, symbols_textord, \"%\", \"\\\\%\");\ndefineSymbol(symbols_text, main, symbols_textord, \"%\", \"\\\\%\");\ndefineSymbol(symbols_math, main, symbols_textord, \"_\", \"\\\\_\");\ndefineSymbol(symbols_text, main, symbols_textord, \"_\", \"\\\\_\");\ndefineSymbol(symbols_text, main, symbols_textord, \"_\", \"\\\\textunderscore\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2220\", \"\\\\angle\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u221E\", \"\\\\infty\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2032\", \"\\\\prime\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u25B3\", \"\\\\triangle\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u039B\", \"\\\\Lambda\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u039E\", \"\\\\Xi\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A0\", \"\\\\Pi\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A3\", \"\\\\Sigma\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A5\", \"\\\\Upsilon\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A6\", \"\\\\Phi\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A8\", \"\\\\Psi\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u03A9\", \"\\\\Omega\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"A\", \"\\u0391\");\ndefineSymbol(symbols_math, main, symbols_textord, \"B\", \"\\u0392\");\ndefineSymbol(symbols_math, main, symbols_textord, \"E\", \"\\u0395\");\ndefineSymbol(symbols_math, main, symbols_textord, \"Z\", \"\\u0396\");\ndefineSymbol(symbols_math, main, symbols_textord, \"H\", \"\\u0397\");\ndefineSymbol(symbols_math, main, symbols_textord, \"I\", \"\\u0399\");\ndefineSymbol(symbols_math, main, symbols_textord, \"K\", \"\\u039A\");\ndefineSymbol(symbols_math, main, symbols_textord, \"M\", \"\\u039C\");\ndefineSymbol(symbols_math, main, symbols_textord, \"N\", \"\\u039D\");\ndefineSymbol(symbols_math, main, symbols_textord, \"O\", \"\\u039F\");\ndefineSymbol(symbols_math, main, symbols_textord, \"P\", \"\\u03A1\");\ndefineSymbol(symbols_math, main, symbols_textord, \"T\", \"\\u03A4\");\ndefineSymbol(symbols_math, main, symbols_textord, \"X\", \"\\u03A7\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\xAC\", \"\\\\neg\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\xAC\", \"\\\\lnot\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u22A4\", \"\\\\top\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u22A5\", \"\\\\bot\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2205\", \"\\\\emptyset\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2205\", \"\\\\varnothing\");\ndefineSymbol(symbols_math, main, mathord, \"\\u03B1\", \"\\\\alpha\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B2\", \"\\\\beta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B3\", \"\\\\gamma\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B4\", \"\\\\delta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03F5\", \"\\\\epsilon\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B6\", \"\\\\zeta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B7\", \"\\\\eta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B8\", \"\\\\theta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B9\", \"\\\\iota\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BA\", \"\\\\kappa\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BB\", \"\\\\lambda\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BC\", \"\\\\mu\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BD\", \"\\\\nu\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BE\", \"\\\\xi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03BF\", \"\\\\omicron\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C0\", \"\\\\pi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C1\", \"\\\\rho\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C3\", \"\\\\sigma\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C4\", \"\\\\tau\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C5\", \"\\\\upsilon\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03D5\", \"\\\\phi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C7\", \"\\\\chi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C8\", \"\\\\psi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C9\", \"\\\\omega\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03B5\", \"\\\\varepsilon\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03D1\", \"\\\\vartheta\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03D6\", \"\\\\varpi\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03F1\", \"\\\\varrho\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C2\", \"\\\\varsigma\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u03C6\", \"\\\\varphi\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2217\", \"*\");\ndefineSymbol(symbols_math, main, bin, \"+\", \"+\");\ndefineSymbol(symbols_math, main, bin, \"\\u2212\", \"-\");\ndefineSymbol(symbols_math, main, bin, \"\\u22C5\", \"\\\\cdot\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2218\", \"\\\\circ\");\ndefineSymbol(symbols_math, main, bin, \"\\xF7\", \"\\\\div\", true);\ndefineSymbol(symbols_math, main, bin, \"\\xB1\", \"\\\\pm\", true);\ndefineSymbol(symbols_math, main, bin, \"\\xD7\", \"\\\\times\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2229\", \"\\\\cap\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u222A\", \"\\\\cup\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2216\", \"\\\\setminus\");\ndefineSymbol(symbols_math, main, bin, \"\\u2227\", \"\\\\land\");\ndefineSymbol(symbols_math, main, bin, \"\\u2228\", \"\\\\lor\");\ndefineSymbol(symbols_math, main, bin, \"\\u2227\", \"\\\\wedge\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2228\", \"\\\\vee\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u221A\", \"\\\\surd\");\ndefineSymbol(symbols_math, main, symbols_open, \"(\", \"(\");\ndefineSymbol(symbols_math, main, symbols_open, \"[\", \"[\");\ndefineSymbol(symbols_math, main, symbols_open, \"\\u27E8\", \"\\\\langle\", true);\ndefineSymbol(symbols_math, main, symbols_open, \"\\u2223\", \"\\\\lvert\");\ndefineSymbol(symbols_math, main, symbols_open, \"\\u2225\", \"\\\\lVert\");\ndefineSymbol(symbols_math, main, symbols_close, \")\", \")\");\ndefineSymbol(symbols_math, main, symbols_close, \"]\", \"]\");\ndefineSymbol(symbols_math, main, symbols_close, \"?\", \"?\");\ndefineSymbol(symbols_math, main, symbols_close, \"!\", \"!\");\ndefineSymbol(symbols_math, main, symbols_close, \"\\u27E9\", \"\\\\rangle\", true);\ndefineSymbol(symbols_math, main, symbols_close, \"\\u2223\", \"\\\\rvert\");\ndefineSymbol(symbols_math, main, symbols_close, \"\\u2225\", \"\\\\rVert\");\ndefineSymbol(symbols_math, main, rel, \"=\", \"=\");\ndefineSymbol(symbols_math, main, rel, \"<\", \"<\");\ndefineSymbol(symbols_math, main, rel, \">\", \">\");\ndefineSymbol(symbols_math, main, rel, \":\", \":\");\ndefineSymbol(symbols_math, main, rel, \"\\u2248\", \"\\\\approx\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2245\", \"\\\\cong\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2265\", \"\\\\ge\");\ndefineSymbol(symbols_math, main, rel, \"\\u2265\", \"\\\\geq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2190\", \"\\\\gets\");\ndefineSymbol(symbols_math, main, rel, \">\", \"\\\\gt\");\ndefineSymbol(symbols_math, main, rel, \"\\u2208\", \"\\\\in\", true);\ndefineSymbol(symbols_math, main, rel, \"\\uE020\", \"\\\\@not\");\ndefineSymbol(symbols_math, main, rel, \"\\u2282\", \"\\\\subset\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2283\", \"\\\\supset\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2286\", \"\\\\subseteq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2287\", \"\\\\supseteq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2288\", \"\\\\nsubseteq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2289\", \"\\\\nsupseteq\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u22A8\", \"\\\\models\");\ndefineSymbol(symbols_math, main, rel, \"\\u2190\", \"\\\\leftarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2264\", \"\\\\le\");\ndefineSymbol(symbols_math, main, rel, \"\\u2264\", \"\\\\leq\", true);\ndefineSymbol(symbols_math, main, rel, \"<\", \"\\\\lt\");\ndefineSymbol(symbols_math, main, rel, \"\\u2192\", \"\\\\rightarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2192\", \"\\\\to\");\ndefineSymbol(symbols_math, ams, rel, \"\\u2271\", \"\\\\ngeq\", true);\ndefineSymbol(symbols_math, ams, rel, \"\\u2270\", \"\\\\nleq\", true);\ndefineSymbol(symbols_math, main, symbols_spacing, \"\\xA0\", \"\\\\ \");\ndefineSymbol(symbols_math, main, symbols_spacing, \"\\xA0\", \"~\");\ndefineSymbol(symbols_math, main, symbols_spacing, \"\\xA0\", \"\\\\space\"); // Ref: LaTeX Source 2e: \\DeclareRobustCommand{\\nobreakspace}{%\n\ndefineSymbol(symbols_math, main, symbols_spacing, \"\\xA0\", \"\\\\nobreakspace\");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"\\\\ \");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"~\");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"\\\\space\");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"\\\\nobreakspace\");\ndefineSymbol(symbols_math, main, symbols_spacing, null, \"\\\\nobreak\");\ndefineSymbol(symbols_math, main, symbols_spacing, null, \"\\\\allowbreak\");\ndefineSymbol(symbols_math, main, punct, \",\", \",\");\ndefineSymbol(symbols_math, main, punct, \";\", \";\");\ndefineSymbol(symbols_math, ams, bin, \"\\u22BC\", \"\\\\barwedge\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22BB\", \"\\\\veebar\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2299\", \"\\\\odot\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2295\", \"\\\\oplus\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2297\", \"\\\\otimes\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2202\", \"\\\\partial\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u2298\", \"\\\\oslash\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u229A\", \"\\\\circledcirc\", true);\ndefineSymbol(symbols_math, ams, bin, \"\\u22A1\", \"\\\\boxdot\", true);\ndefineSymbol(symbols_math, main, bin, \"\\u25B3\", \"\\\\bigtriangleup\");\ndefineSymbol(symbols_math, main, bin, \"\\u25BD\", \"\\\\bigtriangledown\");\ndefineSymbol(symbols_math, main, bin, \"\\u2020\", \"\\\\dagger\");\ndefineSymbol(symbols_math, main, bin, \"\\u22C4\", \"\\\\diamond\");\ndefineSymbol(symbols_math, main, bin, \"\\u22C6\", \"\\\\star\");\ndefineSymbol(symbols_math, main, bin, \"\\u25C3\", \"\\\\triangleleft\");\ndefineSymbol(symbols_math, main, bin, \"\\u25B9\", \"\\\\triangleright\");\ndefineSymbol(symbols_math, main, symbols_open, \"{\", \"\\\\{\");\ndefineSymbol(symbols_text, main, symbols_textord, \"{\", \"\\\\{\");\ndefineSymbol(symbols_text, main, symbols_textord, \"{\", \"\\\\textbraceleft\");\ndefineSymbol(symbols_math, main, symbols_close, \"}\", \"\\\\}\");\ndefineSymbol(symbols_text, main, symbols_textord, \"}\", \"\\\\}\");\ndefineSymbol(symbols_text, main, symbols_textord, \"}\", \"\\\\textbraceright\");\ndefineSymbol(symbols_math, main, symbols_open, \"{\", \"\\\\lbrace\");\ndefineSymbol(symbols_math, main, symbols_close, \"}\", \"\\\\rbrace\");\ndefineSymbol(symbols_math, main, symbols_open, \"[\", \"\\\\lbrack\");\ndefineSymbol(symbols_text, main, symbols_textord, \"[\", \"\\\\lbrack\");\ndefineSymbol(symbols_math, main, symbols_close, \"]\", \"\\\\rbrack\");\ndefineSymbol(symbols_text, main, symbols_textord, \"]\", \"\\\\rbrack\");\ndefineSymbol(symbols_math, main, symbols_open, \"(\", \"\\\\lparen\");\ndefineSymbol(symbols_math, main, symbols_close, \")\", \"\\\\rparen\");\ndefineSymbol(symbols_text, main, symbols_textord, \"<\", \"\\\\textless\"); // in T1 fontenc\n\ndefineSymbol(symbols_text, main, symbols_textord, \">\", \"\\\\textgreater\"); // in T1 fontenc\n\ndefineSymbol(symbols_math, main, symbols_open, \"\\u230A\", \"\\\\lfloor\", true);\ndefineSymbol(symbols_math, main, symbols_close, \"\\u230B\", \"\\\\rfloor\", true);\ndefineSymbol(symbols_math, main, symbols_open, \"\\u2308\", \"\\\\lceil\", true);\ndefineSymbol(symbols_math, main, symbols_close, \"\\u2309\", \"\\\\rceil\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\\\\", \"\\\\backslash\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2223\", \"|\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2223\", \"\\\\vert\");\ndefineSymbol(symbols_text, main, symbols_textord, \"|\", \"\\\\textbar\"); // in T1 fontenc\n\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2225\", \"\\\\|\");\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u2225\", \"\\\\Vert\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2225\", \"\\\\textbardbl\");\ndefineSymbol(symbols_text, main, symbols_textord, \"~\", \"\\\\textasciitilde\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\\\\", \"\\\\textbackslash\");\ndefineSymbol(symbols_text, main, symbols_textord, \"^\", \"\\\\textasciicircum\");\ndefineSymbol(symbols_math, main, rel, \"\\u2191\", \"\\\\uparrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D1\", \"\\\\Uparrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2193\", \"\\\\downarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D3\", \"\\\\Downarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u2195\", \"\\\\updownarrow\", true);\ndefineSymbol(symbols_math, main, rel, \"\\u21D5\", \"\\\\Updownarrow\", true);\ndefineSymbol(symbols_math, main, op, \"\\u2210\", \"\\\\coprod\");\ndefineSymbol(symbols_math, main, op, \"\\u22C1\", \"\\\\bigvee\");\ndefineSymbol(symbols_math, main, op, \"\\u22C0\", \"\\\\bigwedge\");\ndefineSymbol(symbols_math, main, op, \"\\u2A04\", \"\\\\biguplus\");\ndefineSymbol(symbols_math, main, op, \"\\u22C2\", \"\\\\bigcap\");\ndefineSymbol(symbols_math, main, op, \"\\u22C3\", \"\\\\bigcup\");\ndefineSymbol(symbols_math, main, op, \"\\u222B\", \"\\\\int\");\ndefineSymbol(symbols_math, main, op, \"\\u222B\", \"\\\\intop\");\ndefineSymbol(symbols_math, main, op, \"\\u222C\", \"\\\\iint\");\ndefineSymbol(symbols_math, main, op, \"\\u222D\", \"\\\\iiint\");\ndefineSymbol(symbols_math, main, op, \"\\u220F\", \"\\\\prod\");\ndefineSymbol(symbols_math, main, op, \"\\u2211\", \"\\\\sum\");\ndefineSymbol(symbols_math, main, op, \"\\u2A02\", \"\\\\bigotimes\");\ndefineSymbol(symbols_math, main, op, \"\\u2A01\", \"\\\\bigoplus\");\ndefineSymbol(symbols_math, main, op, \"\\u2A00\", \"\\\\bigodot\");\ndefineSymbol(symbols_math, main, op, \"\\u222E\", \"\\\\oint\");\ndefineSymbol(symbols_math, main, op, \"\\u222F\", \"\\\\oiint\");\ndefineSymbol(symbols_math, main, op, \"\\u2230\", \"\\\\oiiint\");\ndefineSymbol(symbols_math, main, op, \"\\u2A06\", \"\\\\bigsqcup\");\ndefineSymbol(symbols_math, main, op, \"\\u222B\", \"\\\\smallint\");\ndefineSymbol(symbols_text, main, symbols_inner, \"\\u2026\", \"\\\\textellipsis\");\ndefineSymbol(symbols_math, main, symbols_inner, \"\\u2026\", \"\\\\mathellipsis\");\ndefineSymbol(symbols_text, main, symbols_inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(symbols_math, main, symbols_inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(symbols_math, main, symbols_inner, \"\\u22EF\", \"\\\\@cdots\", true);\ndefineSymbol(symbols_math, main, symbols_inner, \"\\u22F1\", \"\\\\ddots\", true);\ndefineSymbol(symbols_math, main, symbols_textord, \"\\u22EE\", \"\\\\varvdots\"); // \\vdots is a macro\n\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02CA\", \"\\\\acute\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02CB\", \"\\\\grave\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\xA8\", \"\\\\ddot\");\ndefineSymbol(symbols_math, main, symbols_accent, \"~\", \"\\\\tilde\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02C9\", \"\\\\bar\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02D8\", \"\\\\breve\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02C7\", \"\\\\check\");\ndefineSymbol(symbols_math, main, symbols_accent, \"^\", \"\\\\hat\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u20D7\", \"\\\\vec\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02D9\", \"\\\\dot\");\ndefineSymbol(symbols_math, main, symbols_accent, \"\\u02DA\", \"\\\\mathring\");\ndefineSymbol(symbols_math, main, mathord, \"\\u0131\", \"\\\\imath\", true);\ndefineSymbol(symbols_math, main, mathord, \"\\u0237\", \"\\\\jmath\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u0131\", \"\\\\i\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u0237\", \"\\\\j\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xDF\", \"\\\\ss\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xE6\", \"\\\\ae\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xE6\", \"\\\\ae\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u0153\", \"\\\\oe\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xF8\", \"\\\\o\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xC6\", \"\\\\AE\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u0152\", \"\\\\OE\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xD8\", \"\\\\O\", true);\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02CA\", \"\\\\'\"); // acute\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02CB\", \"\\\\`\"); // grave\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02C6\", \"\\\\^\"); // circumflex\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02DC\", \"\\\\~\"); // tilde\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02C9\", \"\\\\=\"); // macron\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02D8\", \"\\\\u\"); // breve\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02D9\", \"\\\\.\"); // dot above\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02DA\", \"\\\\r\"); // ring above\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02C7\", \"\\\\v\"); // caron\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\xA8\", '\\\\\"'); // diaresis\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u02DD\", \"\\\\H\"); // double acute\n\ndefineSymbol(symbols_text, main, symbols_accent, \"\\u25EF\", \"\\\\textcircled\"); // \\bigcirc glyph\n// These ligatures are detected and created in Parser.js's `formLigatures`.\n\nvar ligatures = {\n  \"--\": true,\n  \"---\": true,\n  \"``\": true,\n  \"''\": true\n};\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2013\", \"--\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2013\", \"\\\\textendash\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2014\", \"---\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2014\", \"\\\\textemdash\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2018\", \"`\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2018\", \"\\\\textquoteleft\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2019\", \"'\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2019\", \"\\\\textquoteright\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201C\", \"``\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201C\", \"\\\\textquotedblleft\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201D\", \"''\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201D\", \"\\\\textquotedblright\"); //  \\degree from gensymb package\n\ndefineSymbol(symbols_math, main, symbols_textord, \"\\xB0\", \"\\\\degree\", true);\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xB0\", \"\\\\degree\"); // \\textdegree from inputenc package\n\ndefineSymbol(symbols_text, main, symbols_textord, \"\\xB0\", \"\\\\textdegree\", true); // TODO: In LaTeX, \\pounds can generate a different character in text and math\n// mode, but among our fonts, only Main-Italic defines this character \"163\".\n\ndefineSymbol(symbols_math, main, mathord, \"\\xA3\", \"\\\\pounds\");\ndefineSymbol(symbols_math, main, mathord, \"\\xA3\", \"\\\\mathsterling\", true);\ndefineSymbol(symbols_text, main, mathord, \"\\xA3\", \"\\\\pounds\");\ndefineSymbol(symbols_text, main, mathord, \"\\xA3\", \"\\\\textsterling\", true);\ndefineSymbol(symbols_math, ams, symbols_textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"\\\\ \");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \" \");\ndefineSymbol(symbols_text, main, symbols_spacing, \"\\xA0\", \"~\"); // There are lots of symbols which are the same, so we add them in afterwards.\n// All of these are textords in math mode\n\nvar mathTextSymbols = \"0123456789/@.\\\"\";\n\nfor (var symbols_i = 0; symbols_i < mathTextSymbols.length; symbols_i++) {\n  var symbols_ch = mathTextSymbols.charAt(symbols_i);\n  defineSymbol(symbols_math, main, symbols_textord, symbols_ch, symbols_ch);\n} // All of these are textords in text mode\n\n\nvar textSymbols = \"0123456789!@*()-=+[]<>|\\\";:?/.,\";\n\nfor (var src_symbols_i = 0; src_symbols_i < textSymbols.length; src_symbols_i++) {\n  var _ch = textSymbols.charAt(src_symbols_i);\n\n  defineSymbol(symbols_text, main, symbols_textord, _ch, _ch);\n} // All of these are textords in text mode, and mathords in math mode\n\n\nvar letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\nfor (var symbols_i2 = 0; symbols_i2 < letters.length; symbols_i2++) {\n  var _ch2 = letters.charAt(symbols_i2);\n\n  defineSymbol(symbols_math, main, mathord, _ch2, _ch2);\n  defineSymbol(symbols_text, main, symbols_textord, _ch2, _ch2);\n} // Blackboard bold and script letters in Unicode range\n\n\ndefineSymbol(symbols_math, ams, symbols_textord, \"C\", \"\\u2102\"); // blackboard bold\n\ndefineSymbol(symbols_text, ams, symbols_textord, \"C\", \"\\u2102\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"H\", \"\\u210D\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"H\", \"\\u210D\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"N\", \"\\u2115\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"N\", \"\\u2115\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"P\", \"\\u2119\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"P\", \"\\u2119\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"Q\", \"\\u211A\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"Q\", \"\\u211A\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"R\", \"\\u211D\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"R\", \"\\u211D\");\ndefineSymbol(symbols_math, ams, symbols_textord, \"Z\", \"\\u2124\");\ndefineSymbol(symbols_text, ams, symbols_textord, \"Z\", \"\\u2124\");\ndefineSymbol(symbols_math, main, mathord, \"h\", \"\\u210E\"); // italic h, Planck constant\n\ndefineSymbol(symbols_text, main, mathord, \"h\", \"\\u210E\"); // The next loop loads wide (surrogate pair) characters.\n// We support some letters in the Unicode range U+1D400 to U+1D7FF,\n// Mathematical Alphanumeric Symbols.\n// Some editors do not deal well with wide characters. So don't write the\n// string into this file. Instead, create the string from the surrogate pair.\n\nvar symbols_wideChar = \"\";\n\nfor (var symbols_i3 = 0; symbols_i3 < letters.length; symbols_i3++) {\n  var _ch3 = letters.charAt(symbols_i3); // The hex numbers in the next line are a surrogate pair.\n  // 0xD835 is the high surrogate for all letters in the range we support.\n  // 0xDC00 is the low surrogate for bold A.\n\n\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDC00 + symbols_i3); // A-Z a-z bold\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDC34 + symbols_i3); // A-Z a-z italic\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDC68 + symbols_i3); // A-Z a-z bold italic\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDD04 + symbols_i3); // A-Z a-z Fractur\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDDA0 + symbols_i3); // A-Z a-z sans-serif\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDDD4 + symbols_i3); // A-Z a-z sans bold\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDE08 + symbols_i3); // A-Z a-z sans italic\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDE70 + symbols_i3); // A-Z a-z monospace\n\n  defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n\n  if (symbols_i3 < 26) {\n    // KaTeX fonts have only capital letters for blackboard bold and script.\n    // See exception for k below.\n    symbols_wideChar = String.fromCharCode(0xD835, 0xDD38 + symbols_i3); // A-Z double struck\n\n    defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n    defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n    symbols_wideChar = String.fromCharCode(0xD835, 0xDC9C + symbols_i3); // A-Z script\n\n    defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);\n    defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);\n  } // TODO: Add bold script when it is supported by a KaTeX font.\n\n} // \"k\" is the only double struck lower case letter in the KaTeX fonts.\n\n\nsymbols_wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck\n\ndefineSymbol(symbols_math, main, mathord, \"k\", symbols_wideChar);\ndefineSymbol(symbols_text, main, symbols_textord, \"k\", symbols_wideChar); // Next, some wide character numerals\n\nfor (var symbols_i4 = 0; symbols_i4 < 10; symbols_i4++) {\n  var _ch4 = symbols_i4.toString();\n\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDFCE + symbols_i4); // 0-9 bold\n\n  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDFE2 + symbols_i4); // 0-9 sans serif\n\n  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDFEC + symbols_i4); // 0-9 bold sans\n\n  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);\n  symbols_wideChar = String.fromCharCode(0xD835, 0xDFF6 + symbols_i4); // 0-9 monospace\n\n  defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);\n  defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);\n} // We add these Latin-1 letters as symbols for backwards-compatibility,\n// but they are not actually in the font, nor are they supported by the\n// Unicode accent mechanism, so they fall back to Times font and look ugly.\n// TODO(edemaine): Fix this.\n\n\nvar extraLatin = \"ÇÐÞçþ\";\n\nfor (var _i5 = 0; _i5 < extraLatin.length; _i5++) {\n  var _ch5 = extraLatin.charAt(_i5);\n\n  defineSymbol(symbols_math, main, mathord, _ch5, _ch5);\n  defineSymbol(symbols_text, main, symbols_textord, _ch5, _ch5);\n}\n\ndefineSymbol(symbols_text, main, symbols_textord, \"ð\", \"ð\"); // Unicode versions of existing characters\n\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2013\", \"–\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2014\", \"—\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2018\", \"‘\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u2019\", \"’\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201C\", \"“\");\ndefineSymbol(symbols_text, main, symbols_textord, \"\\u201D\", \"”\");\n// CONCATENATED MODULE: ./src/wide-character.js\n/**\n * This file provides support for Unicode range U+1D400 to U+1D7FF,\n * Mathematical Alphanumeric Symbols.\n *\n * Function wideCharacterFont takes a wide character as input and returns\n * the font information necessary to render it properly.\n */\n\n/**\n * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf\n * That document sorts characters into groups by font type, say bold or italic.\n *\n * In the arrays below, each subarray consists three elements:\n *      * The CSS class of that group when in math mode.\n *      * The CSS class of that group when in text mode.\n *      * The font name, so that KaTeX can get font metrics.\n */\n\nvar wideLatinLetterData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // A-Z bold upright\n[\"mathbf\", \"textbf\", \"Main-Bold\"], // a-z bold upright\n[\"mathdefault\", \"textit\", \"Math-Italic\"], // A-Z italic\n[\"mathdefault\", \"textit\", \"Math-Italic\"], // a-z italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // A-Z bold italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // a-z bold italic\n// Map fancy A-Z letters to script, not calligraphic.\n// This aligns with unicode-math and math fonts (except Cambria Math).\n[\"mathscr\", \"textscr\", \"Script-Regular\"], // A-Z script\n[\"\", \"\", \"\"], // a-z script.  No font\n[\"\", \"\", \"\"], // A-Z bold script. No font\n[\"\", \"\", \"\"], // a-z bold script. No font\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // A-Z Fraktur\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // a-z Fraktur\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // A-Z double-struck\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // k double-struck\n[\"\", \"\", \"\"], // A-Z bold Fraktur No font metrics\n[\"\", \"\", \"\"], // a-z bold Fraktur.   No font.\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // A-Z sans-serif\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // a-z sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // A-Z bold sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // a-z bold sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // A-Z italic sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // a-z italic sans-serif\n[\"\", \"\", \"\"], // A-Z bold italic sans. No font\n[\"\", \"\", \"\"], // a-z bold italic sans. No font\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"], // A-Z monospace\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"]];\nvar wideNumeralData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // 0-9 bold\n[\"\", \"\", \"\"], // 0-9 double-struck. No KaTeX font.\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // 0-9 sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // 0-9 bold sans-serif\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"]];\nvar wide_character_wideCharacterFont = function wideCharacterFont(wideChar, mode) {\n  // IE doesn't support codePointAt(). So work with the surrogate pair.\n  var H = wideChar.charCodeAt(0); // high surrogate\n\n  var L = wideChar.charCodeAt(1); // low surrogate\n\n  var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000;\n  var j = mode === \"math\" ? 0 : 1; // column index for CSS class.\n\n  if (0x1D400 <= codePoint && codePoint < 0x1D6A4) {\n    // wideLatinLetterData contains exactly 26 chars on each row.\n    // So we can calculate the relevant row. No traverse necessary.\n    var i = Math.floor((codePoint - 0x1D400) / 26);\n    return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]];\n  } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) {\n    // Numerals, ten per row.\n    var _i = Math.floor((codePoint - 0x1D7CE) / 10);\n\n    return [wideNumeralData[_i][2], wideNumeralData[_i][j]];\n  } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) {\n    // dotless i or j\n    return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]];\n  } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) {\n    // Greek letters. Not supported, yet.\n    return [\"\", \"\"];\n  } else {\n    // We don't support any wide characters outside 1D400–1D7FF.\n    throw new src_ParseError(\"Unsupported character: \" + wideChar);\n  }\n};\n// CONCATENATED MODULE: ./src/Options.js\n/**\n * This file contains information about the options that the Parser carries\n * around with it while parsing. Data is held in an `Options` object, and when\n * recursing, a new `Options` object can be created with the `.with*` and\n * `.reset` functions.\n */\n\nvar sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize].\n// The size mappings are taken from TeX with \\normalsize=10pt.\n[1, 1, 1], // size1: [5, 5, 5]              \\tiny\n[2, 1, 1], // size2: [6, 5, 5]\n[3, 1, 1], // size3: [7, 5, 5]              \\scriptsize\n[4, 2, 1], // size4: [8, 6, 5]              \\footnotesize\n[5, 2, 1], // size5: [9, 6, 5]              \\small\n[6, 3, 1], // size6: [10, 7, 5]             \\normalsize\n[7, 4, 2], // size7: [12, 8, 6]             \\large\n[8, 6, 3], // size8: [14.4, 10, 7]          \\Large\n[9, 7, 6], // size9: [17.28, 12, 10]        \\LARGE\n[10, 8, 7], // size10: [20.74, 14.4, 12]     \\huge\n[11, 10, 9]];\nvar sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if\n// you change size indexes, change that function.\n0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];\n\nvar sizeAtStyle = function sizeAtStyle(size, style) {\n  return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];\n}; // In these types, \"\" (empty string) means \"no change\".\n\n\n/**\n * This is the main options class. It contains the current style, size, color,\n * and font.\n *\n * Options objects should not be modified. To create a new Options with\n * different properties, call a `.having*` method.\n */\nvar Options_Options =\n/*#__PURE__*/\nfunction () {\n  // A font family applies to a group of fonts (i.e. SansSerif), while a font\n  // represents a specific font (i.e. SansSerif Bold).\n  // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm\n\n  /**\n   * The base size index.\n   */\n  function Options(data) {\n    this.style = void 0;\n    this.color = void 0;\n    this.size = void 0;\n    this.textSize = void 0;\n    this.phantom = void 0;\n    this.font = void 0;\n    this.fontFamily = void 0;\n    this.fontWeight = void 0;\n    this.fontShape = void 0;\n    this.sizeMultiplier = void 0;\n    this.maxSize = void 0;\n    this._fontMetrics = void 0;\n    this.style = data.style;\n    this.color = data.color;\n    this.size = data.size || Options.BASESIZE;\n    this.textSize = data.textSize || this.size;\n    this.phantom = !!data.phantom;\n    this.font = data.font || \"\";\n    this.fontFamily = data.fontFamily || \"\";\n    this.fontWeight = data.fontWeight || '';\n    this.fontShape = data.fontShape || '';\n    this.sizeMultiplier = sizeMultipliers[this.size - 1];\n    this.maxSize = data.maxSize;\n    this._fontMetrics = undefined;\n  }\n  /**\n   * Returns a new options object with the same properties as \"this\".  Properties\n   * from \"extension\" will be copied to the new options object.\n   */\n\n\n  var _proto = Options.prototype;\n\n  _proto.extend = function extend(extension) {\n    var data = {\n      style: this.style,\n      size: this.size,\n      textSize: this.textSize,\n      color: this.color,\n      phantom: this.phantom,\n      font: this.font,\n      fontFamily: this.fontFamily,\n      fontWeight: this.fontWeight,\n      fontShape: this.fontShape,\n      maxSize: this.maxSize\n    };\n\n    for (var key in extension) {\n      if (extension.hasOwnProperty(key)) {\n        data[key] = extension[key];\n      }\n    }\n\n    return new Options(data);\n  }\n  /**\n   * Return an options object with the given style. If `this.style === style`,\n   * returns `this`.\n   */\n  ;\n\n  _proto.havingStyle = function havingStyle(style) {\n    if (this.style === style) {\n      return this;\n    } else {\n      return this.extend({\n        style: style,\n        size: sizeAtStyle(this.textSize, style)\n      });\n    }\n  }\n  /**\n   * Return an options object with a cramped version of the current style. If\n   * the current style is cramped, returns `this`.\n   */\n  ;\n\n  _proto.havingCrampedStyle = function havingCrampedStyle() {\n    return this.havingStyle(this.style.cramp());\n  }\n  /**\n   * Return an options object with the given size and in at least `\\textstyle`.\n   * Returns `this` if appropriate.\n   */\n  ;\n\n  _proto.havingSize = function havingSize(size) {\n    if (this.size === size && this.textSize === size) {\n      return this;\n    } else {\n      return this.extend({\n        style: this.style.text(),\n        size: size,\n        textSize: size,\n        sizeMultiplier: sizeMultipliers[size - 1]\n      });\n    }\n  }\n  /**\n   * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,\n   * changes to at least `\\textstyle`.\n   */\n  ;\n\n  _proto.havingBaseStyle = function havingBaseStyle(style) {\n    style = style || this.style.text();\n    var wantSize = sizeAtStyle(Options.BASESIZE, style);\n\n    if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {\n      return this;\n    } else {\n      return this.extend({\n        style: style,\n        size: wantSize\n      });\n    }\n  }\n  /**\n   * Remove the effect of sizing changes such as \\Huge.\n   * Keep the effect of the current style, such as \\scriptstyle.\n   */\n  ;\n\n  _proto.havingBaseSizing = function havingBaseSizing() {\n    var size;\n\n    switch (this.style.id) {\n      case 4:\n      case 5:\n        size = 3; // normalsize in scriptstyle\n\n        break;\n\n      case 6:\n      case 7:\n        size = 1; // normalsize in scriptscriptstyle\n\n        break;\n\n      default:\n        size = 6;\n      // normalsize in textstyle or displaystyle\n    }\n\n    return this.extend({\n      style: this.style.text(),\n      size: size\n    });\n  }\n  /**\n   * Create a new options object with the given color.\n   */\n  ;\n\n  _proto.withColor = function withColor(color) {\n    return this.extend({\n      color: color\n    });\n  }\n  /**\n   * Create a new options object with \"phantom\" set to true.\n   */\n  ;\n\n  _proto.withPhantom = function withPhantom() {\n    return this.extend({\n      phantom: true\n    });\n  }\n  /**\n   * Creates a new options object with the given math font or old text font.\n   * @type {[type]}\n   */\n  ;\n\n  _proto.withFont = function withFont(font) {\n    return this.extend({\n      font: font\n    });\n  }\n  /**\n   * Create a new options objects with the given fontFamily.\n   */\n  ;\n\n  _proto.withTextFontFamily = function withTextFontFamily(fontFamily) {\n    return this.extend({\n      fontFamily: fontFamily,\n      font: \"\"\n    });\n  }\n  /**\n   * Creates a new options object with the given font weight\n   */\n  ;\n\n  _proto.withTextFontWeight = function withTextFontWeight(fontWeight) {\n    return this.extend({\n      fontWeight: fontWeight,\n      font: \"\"\n    });\n  }\n  /**\n   * Creates a new options object with the given font weight\n   */\n  ;\n\n  _proto.withTextFontShape = function withTextFontShape(fontShape) {\n    return this.extend({\n      fontShape: fontShape,\n      font: \"\"\n    });\n  }\n  /**\n   * Return the CSS sizing classes required to switch from enclosing options\n   * `oldOptions` to `this`. Returns an array of classes.\n   */\n  ;\n\n  _proto.sizingClasses = function sizingClasses(oldOptions) {\n    if (oldOptions.size !== this.size) {\n      return [\"sizing\", \"reset-size\" + oldOptions.size, \"size\" + this.size];\n    } else {\n      return [];\n    }\n  }\n  /**\n   * Return the CSS sizing classes required to switch to the base size. Like\n   * `this.havingSize(BASESIZE).sizingClasses(this)`.\n   */\n  ;\n\n  _proto.baseSizingClasses = function baseSizingClasses() {\n    if (this.size !== Options.BASESIZE) {\n      return [\"sizing\", \"reset-size\" + this.size, \"size\" + Options.BASESIZE];\n    } else {\n      return [];\n    }\n  }\n  /**\n   * Return the font metrics for this size.\n   */\n  ;\n\n  _proto.fontMetrics = function fontMetrics() {\n    if (!this._fontMetrics) {\n      this._fontMetrics = getGlobalMetrics(this.size);\n    }\n\n    return this._fontMetrics;\n  }\n  /**\n   * Gets the CSS color of the current options object\n   */\n  ;\n\n  _proto.getColor = function getColor() {\n    if (this.phantom) {\n      return \"transparent\";\n    } else {\n      return this.color;\n    }\n  };\n\n  return Options;\n}();\n\nOptions_Options.BASESIZE = 6;\n/* harmony default export */ var src_Options = (Options_Options);\n// CONCATENATED MODULE: ./src/units.js\n/**\n * This file does conversion between units.  In particular, it provides\n * calculateSize to convert other units into ems.\n */\n\n // This table gives the number of TeX pts in one of each *absolute* TeX unit.\n// Thus, multiplying a length by this number converts the length from units\n// into pts.  Dividing the result by ptPerEm gives the number of ems\n// *assuming* a font size of ptPerEm (normal size, normal style).\n\nvar ptPerUnit = {\n  // https://en.wikibooks.org/wiki/LaTeX/Lengths and\n  // https://tex.stackexchange.com/a/8263\n  \"pt\": 1,\n  // TeX point\n  \"mm\": 7227 / 2540,\n  // millimeter\n  \"cm\": 7227 / 254,\n  // centimeter\n  \"in\": 72.27,\n  // inch\n  \"bp\": 803 / 800,\n  // big (PostScript) points\n  \"pc\": 12,\n  // pica\n  \"dd\": 1238 / 1157,\n  // didot\n  \"cc\": 14856 / 1157,\n  // cicero (12 didot)\n  \"nd\": 685 / 642,\n  // new didot\n  \"nc\": 1370 / 107,\n  // new cicero (12 new didot)\n  \"sp\": 1 / 65536,\n  // scaled point (TeX's internal smallest unit)\n  // https://tex.stackexchange.com/a/41371\n  \"px\": 803 / 800 // \\pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX\n\n}; // Dictionary of relative units, for fast validity testing.\n\nvar relativeUnit = {\n  \"ex\": true,\n  \"em\": true,\n  \"mu\": true\n};\n\n/**\n * Determine whether the specified unit (either a string defining the unit\n * or a \"size\" parse node containing a unit field) is valid.\n */\nvar validUnit = function validUnit(unit) {\n  if (typeof unit !== \"string\") {\n    unit = unit.unit;\n  }\n\n  return unit in ptPerUnit || unit in relativeUnit || unit === \"ex\";\n};\n/*\n * Convert a \"size\" parse node (with numeric \"number\" and string \"unit\" fields,\n * as parsed by functions.js argType \"size\") into a CSS em value for the\n * current style/scale.  `options` gives the current options.\n */\n\nvar units_calculateSize = function calculateSize(sizeValue, options) {\n  var scale;\n\n  if (sizeValue.unit in ptPerUnit) {\n    // Absolute units\n    scale = ptPerUnit[sizeValue.unit] // Convert unit to pt\n    / options.fontMetrics().ptPerEm // Convert pt to CSS em\n    / options.sizeMultiplier; // Unscale to make absolute units\n  } else if (sizeValue.unit === \"mu\") {\n    // `mu` units scale with scriptstyle/scriptscriptstyle.\n    scale = options.fontMetrics().cssEmPerMu;\n  } else {\n    // Other relative units always refer to the *textstyle* font\n    // in the current size.\n    var unitOptions;\n\n    if (options.style.isTight()) {\n      // isTight() means current style is script/scriptscript.\n      unitOptions = options.havingStyle(options.style.text());\n    } else {\n      unitOptions = options;\n    } // TODO: In TeX these units are relative to the quad of the current\n    // *text* font, e.g. cmr10. KaTeX instead uses values from the\n    // comparably-sized *Computer Modern symbol* font. At 10pt, these\n    // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;\n    // cmr5=1.361133, cmsy5=1.472241. Consider $\\scriptsize a\\kern1emb$.\n    // TeX \\showlists shows a kern of 1.13889 * fontsize;\n    // KaTeX shows a kern of 1.171 * fontsize.\n\n\n    if (sizeValue.unit === \"ex\") {\n      scale = unitOptions.fontMetrics().xHeight;\n    } else if (sizeValue.unit === \"em\") {\n      scale = unitOptions.fontMetrics().quad;\n    } else {\n      throw new src_ParseError(\"Invalid unit: '\" + sizeValue.unit + \"'\");\n    }\n\n    if (unitOptions !== options) {\n      scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;\n    }\n  }\n\n  return Math.min(sizeValue.number * scale, options.maxSize);\n};\n// CONCATENATED MODULE: ./src/buildCommon.js\n/* eslint no-console:0 */\n\n/**\n * This module contains general functions that can be used for building\n * different kinds of domTree nodes in a consistent manner.\n */\n\n\n\n\n\n\n\n// The following have to be loaded from Main-Italic font, using class mathit\nvar mathitLetters = [\"\\\\imath\", \"ı\", // dotless i\n\"\\\\jmath\", \"ȷ\", // dotless j\n\"\\\\pounds\", \"\\\\mathsterling\", \"\\\\textsterling\", \"£\"];\n/**\n * Looks up the given symbol in fontMetrics, after applying any symbol\n * replacements defined in symbol.js\n */\n\nvar buildCommon_lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.\nfontName, mode) {\n  // Replace the value with its replaced value from symbol.js\n  if (src_symbols[mode][value] && src_symbols[mode][value].replace) {\n    value = src_symbols[mode][value].replace;\n  }\n\n  return {\n    value: value,\n    metrics: getCharacterMetrics(value, fontName, mode)\n  };\n};\n/**\n * Makes a symbolNode after translation via the list of symbols in symbols.js.\n * Correctly pulls out metrics for the character, and optionally takes a list of\n * classes to be attached to the node.\n *\n * TODO: make argument order closer to makeSpan\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n * TODO(#953): Make `options` mandatory and always pass it in.\n */\n\n\nvar buildCommon_makeSymbol = function makeSymbol(value, fontName, mode, options, classes) {\n  var lookup = buildCommon_lookupSymbol(value, fontName, mode);\n  var metrics = lookup.metrics;\n  value = lookup.value;\n  var symbolNode;\n\n  if (metrics) {\n    var italic = metrics.italic;\n\n    if (mode === \"text\" || options && options.font === \"mathit\") {\n      italic = 0;\n    }\n\n    symbolNode = new domTree_SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes);\n  } else {\n    // TODO(emily): Figure out a good way to only print this in development\n    typeof console !== \"undefined\" && console.warn(\"No character metrics for '\" + value + \"' in style '\" + fontName + \"'\");\n    symbolNode = new domTree_SymbolNode(value, 0, 0, 0, 0, 0, classes);\n  }\n\n  if (options) {\n    symbolNode.maxFontSize = options.sizeMultiplier;\n\n    if (options.style.isTight()) {\n      symbolNode.classes.push(\"mtight\");\n    }\n\n    var color = options.getColor();\n\n    if (color) {\n      symbolNode.style.color = color;\n    }\n  }\n\n  return symbolNode;\n};\n/**\n * Makes a symbol in Main-Regular or AMS-Regular.\n * Used for rel, bin, open, close, inner, and punct.\n *\n * TODO(#953): Make `options` mandatory and always pass it in.\n */\n\n\nvar buildCommon_mathsym = function mathsym(value, mode, options, classes) {\n  if (classes === void 0) {\n    classes = [];\n  }\n\n  // Decide what font to render the symbol in by its entry in the symbols\n  // table.\n  // Have a special case for when the value = \\ because the \\ is used as a\n  // textord in unsupported command errors but cannot be parsed as a regular\n  // text ordinal and is therefore not present as a symbol in the symbols\n  // table for text, as well as a special case for boldsymbol because it\n  // can be used for bold + and -\n  if (options && options.font && options.font === \"boldsymbol\" && buildCommon_lookupSymbol(value, \"Main-Bold\", mode).metrics) {\n    return buildCommon_makeSymbol(value, \"Main-Bold\", mode, options, classes.concat([\"mathbf\"]));\n  } else if (value === \"\\\\\" || src_symbols[mode][value].font === \"main\") {\n    return buildCommon_makeSymbol(value, \"Main-Regular\", mode, options, classes);\n  } else {\n    return buildCommon_makeSymbol(value, \"AMS-Regular\", mode, options, classes.concat([\"amsrm\"]));\n  }\n};\n/**\n * Determines which of the two font names (Main-Italic and Math-Italic) and\n * corresponding style tags (maindefault or mathit) to use for default math font,\n * depending on the symbol.\n */\n\n\nvar buildCommon_mathdefault = function mathdefault(value, mode, options, classes) {\n  if (/[0-9]/.test(value.charAt(0)) || // glyphs for \\imath and \\jmath do not exist in Math-Italic so we\n  // need to use Main-Italic instead\n  utils.contains(mathitLetters, value)) {\n    return {\n      fontName: \"Main-Italic\",\n      fontClass: \"mathit\"\n    };\n  } else {\n    return {\n      fontName: \"Math-Italic\",\n      fontClass: \"mathdefault\"\n    };\n  }\n};\n/**\n * Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)\n * and corresponding style tags (mathit, mathdefault, or mathcal) to use for font\n * \"mathnormal\", depending on the symbol.  Use this function instead of fontMap for\n * font \"mathnormal\".\n */\n\n\nvar buildCommon_mathnormal = function mathnormal(value, mode, options, classes) {\n  if (utils.contains(mathitLetters, value)) {\n    return {\n      fontName: \"Main-Italic\",\n      fontClass: \"mathit\"\n    };\n  } else if (/[0-9]/.test(value.charAt(0))) {\n    return {\n      fontName: \"Caligraphic-Regular\",\n      fontClass: \"mathcal\"\n    };\n  } else {\n    return {\n      fontName: \"Math-Italic\",\n      fontClass: \"mathdefault\"\n    };\n  }\n};\n/**\n * Determines which of the two font names (Main-Bold and Math-BoldItalic) and\n * corresponding style tags (mathbf or boldsymbol) to use for font \"boldsymbol\",\n * depending on the symbol.  Use this function instead of fontMap for font\n * \"boldsymbol\".\n */\n\n\nvar boldsymbol = function boldsymbol(value, mode, options, classes) {\n  if (buildCommon_lookupSymbol(value, \"Math-BoldItalic\", mode).metrics) {\n    return {\n      fontName: \"Math-BoldItalic\",\n      fontClass: \"boldsymbol\"\n    };\n  } else {\n    // Some glyphs do not exist in Math-BoldItalic so we need to use\n    // Main-Bold instead.\n    return {\n      fontName: \"Main-Bold\",\n      fontClass: \"mathbf\"\n    };\n  }\n};\n/**\n * Makes either a mathord or textord in the correct font and color.\n */\n\n\nvar buildCommon_makeOrd = function makeOrd(group, options, type) {\n  var mode = group.mode;\n  var text = group.text;\n  var classes = [\"mord\"]; // Math mode or Old font (i.e. \\rm)\n\n  var isFont = mode === \"math\" || mode === \"text\" && options.font;\n  var fontOrFamily = isFont ? options.font : options.fontFamily;\n\n  if (text.charCodeAt(0) === 0xD835) {\n    // surrogate pairs get special treatment\n    var _wideCharacterFont = wide_character_wideCharacterFont(text, mode),\n        wideFontName = _wideCharacterFont[0],\n        wideFontClass = _wideCharacterFont[1];\n\n    return buildCommon_makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));\n  } else if (fontOrFamily) {\n    var fontName;\n    var fontClasses;\n\n    if (fontOrFamily === \"boldsymbol\" || fontOrFamily === \"mathnormal\") {\n      var fontData = fontOrFamily === \"boldsymbol\" ? boldsymbol(text, mode, options, classes) : buildCommon_mathnormal(text, mode, options, classes);\n      fontName = fontData.fontName;\n      fontClasses = [fontData.fontClass];\n    } else if (utils.contains(mathitLetters, text)) {\n      fontName = \"Main-Italic\";\n      fontClasses = [\"mathit\"];\n    } else if (isFont) {\n      fontName = fontMap[fontOrFamily].fontName;\n      fontClasses = [fontOrFamily];\n    } else {\n      fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape);\n      fontClasses = [fontOrFamily, options.fontWeight, options.fontShape];\n    }\n\n    if (buildCommon_lookupSymbol(text, fontName, mode).metrics) {\n      return buildCommon_makeSymbol(text, fontName, mode, options, classes.concat(fontClasses));\n    } else if (ligatures.hasOwnProperty(text) && fontName.substr(0, 10) === \"Typewriter\") {\n      // Deconstruct ligatures in monospace fonts (\\texttt, \\tt).\n      var parts = [];\n\n      for (var i = 0; i < text.length; i++) {\n        parts.push(buildCommon_makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses)));\n      }\n\n      return buildCommon_makeFragment(parts);\n    }\n  } // Makes a symbol in the default font for mathords and textords.\n\n\n  if (type === \"mathord\") {\n    var fontLookup = buildCommon_mathdefault(text, mode, options, classes);\n    return buildCommon_makeSymbol(text, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass]));\n  } else if (type === \"textord\") {\n    var font = src_symbols[mode][text] && src_symbols[mode][text].font;\n\n    if (font === \"ams\") {\n      var _fontName = retrieveTextFontName(\"amsrm\", options.fontWeight, options.fontShape);\n\n      return buildCommon_makeSymbol(text, _fontName, mode, options, classes.concat(\"amsrm\", options.fontWeight, options.fontShape));\n    } else if (font === \"main\" || !font) {\n      var _fontName2 = retrieveTextFontName(\"textrm\", options.fontWeight, options.fontShape);\n\n      return buildCommon_makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape));\n    } else {\n      // fonts added by plugins\n      var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class\n\n\n      return buildCommon_makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape));\n    }\n  } else {\n    throw new Error(\"unexpected type: \" + type + \" in makeOrd\");\n  }\n};\n/**\n * Returns true if subsequent symbolNodes have the same classes, skew, maxFont,\n * and styles.\n */\n\n\nvar buildCommon_canCombine = function canCombine(prev, next) {\n  if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) {\n    return false;\n  }\n\n  for (var style in prev.style) {\n    if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {\n      return false;\n    }\n  }\n\n  for (var _style in next.style) {\n    if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) {\n      return false;\n    }\n  }\n\n  return true;\n};\n/**\n * Combine consequetive domTree.symbolNodes into a single symbolNode.\n * Note: this function mutates the argument.\n */\n\n\nvar buildCommon_tryCombineChars = function tryCombineChars(chars) {\n  for (var i = 0; i < chars.length - 1; i++) {\n    var prev = chars[i];\n    var next = chars[i + 1];\n\n    if (prev instanceof domTree_SymbolNode && next instanceof domTree_SymbolNode && buildCommon_canCombine(prev, next)) {\n      prev.text += next.text;\n      prev.height = Math.max(prev.height, next.height);\n      prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use\n      // it to add padding to the right of the span created from\n      // the combined characters.\n\n      prev.italic = next.italic;\n      chars.splice(i + 1, 1);\n      i--;\n    }\n  }\n\n  return chars;\n};\n/**\n * Calculate the height, depth, and maxFontSize of an element based on its\n * children.\n */\n\n\nvar sizeElementFromChildren = function sizeElementFromChildren(elem) {\n  var height = 0;\n  var depth = 0;\n  var maxFontSize = 0;\n\n  for (var i = 0; i < elem.children.length; i++) {\n    var child = elem.children[i];\n\n    if (child.height > height) {\n      height = child.height;\n    }\n\n    if (child.depth > depth) {\n      depth = child.depth;\n    }\n\n    if (child.maxFontSize > maxFontSize) {\n      maxFontSize = child.maxFontSize;\n    }\n  }\n\n  elem.height = height;\n  elem.depth = depth;\n  elem.maxFontSize = maxFontSize;\n};\n/**\n * Makes a span with the given list of classes, list of children, and options.\n *\n * TODO(#953): Ensure that `options` is always provided (currently some call\n * sites don't pass it) and make the type below mandatory.\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n */\n\n\nvar buildCommon_makeSpan = function makeSpan(classes, children, options, style) {\n  var span = new domTree_Span(classes, children, options, style);\n  sizeElementFromChildren(span);\n  return span;\n}; // SVG one is simpler -- doesn't require height, depth, max-font setting.\n// This is also a separate method for typesafety.\n\n\nvar buildCommon_makeSvgSpan = function makeSvgSpan(classes, children, options, style) {\n  return new domTree_Span(classes, children, options, style);\n};\n\nvar makeLineSpan = function makeLineSpan(className, options, thickness) {\n  var line = buildCommon_makeSpan([className], [], options);\n  line.height = thickness || options.fontMetrics().defaultRuleThickness;\n  line.style.borderBottomWidth = line.height + \"em\";\n  line.maxFontSize = 1.0;\n  return line;\n};\n/**\n * Makes an anchor with the given href, list of classes, list of children,\n * and options.\n */\n\n\nvar buildCommon_makeAnchor = function makeAnchor(href, classes, children, options) {\n  var anchor = new domTree_Anchor(href, classes, children, options);\n  sizeElementFromChildren(anchor);\n  return anchor;\n};\n/**\n * Makes a document fragment with the given list of children.\n */\n\n\nvar buildCommon_makeFragment = function makeFragment(children) {\n  var fragment = new tree_DocumentFragment(children);\n  sizeElementFromChildren(fragment);\n  return fragment;\n};\n/**\n * Wraps group in a span if it's a document fragment, allowing to apply classes\n * and styles\n */\n\n\nvar buildCommon_wrapFragment = function wrapFragment(group, options) {\n  if (group instanceof tree_DocumentFragment) {\n    return buildCommon_makeSpan([], [group], options);\n  }\n\n  return group;\n}; // These are exact object types to catch typos in the names of the optional fields.\n\n\n// Computes the updated `children` list and the overall depth.\n//\n// This helper function for makeVList makes it easier to enforce type safety by\n// allowing early exits (returns) in the logic.\nvar getVListChildrenAndDepth = function getVListChildrenAndDepth(params) {\n  if (params.positionType === \"individualShift\") {\n    var oldChildren = params.children;\n    var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be\n    // shifted to the correct specified shift\n\n    var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth;\n\n    var currPos = _depth;\n\n    for (var i = 1; i < oldChildren.length; i++) {\n      var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;\n      var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);\n      currPos = currPos + diff;\n      children.push({\n        type: \"kern\",\n        size: size\n      });\n      children.push(oldChildren[i]);\n    }\n\n    return {\n      children: children,\n      depth: _depth\n    };\n  }\n\n  var depth;\n\n  if (params.positionType === \"top\") {\n    // We always start at the bottom, so calculate the bottom by adding up\n    // all the sizes\n    var bottom = params.positionData;\n\n    for (var _i = 0; _i < params.children.length; _i++) {\n      var child = params.children[_i];\n      bottom -= child.type === \"kern\" ? child.size : child.elem.height + child.elem.depth;\n    }\n\n    depth = bottom;\n  } else if (params.positionType === \"bottom\") {\n    depth = -params.positionData;\n  } else {\n    var firstChild = params.children[0];\n\n    if (firstChild.type !== \"elem\") {\n      throw new Error('First child must have type \"elem\".');\n    }\n\n    if (params.positionType === \"shift\") {\n      depth = -firstChild.elem.depth - params.positionData;\n    } else if (params.positionType === \"firstBaseline\") {\n      depth = -firstChild.elem.depth;\n    } else {\n      throw new Error(\"Invalid positionType \" + params.positionType + \".\");\n    }\n  }\n\n  return {\n    children: params.children,\n    depth: depth\n  };\n};\n/**\n * Makes a vertical list by stacking elements and kerns on top of each other.\n * Allows for many different ways of specifying the positioning method.\n *\n * See VListParam documentation above.\n */\n\n\nvar buildCommon_makeVList = function makeVList(params, options) {\n  var _getVListChildrenAndD = getVListChildrenAndDepth(params),\n      children = _getVListChildrenAndD.children,\n      depth = _getVListChildrenAndD.depth; // Create a strut that is taller than any list item. The strut is added to\n  // each item, where it will determine the item's baseline. Since it has\n  // `overflow:hidden`, the strut's top edge will sit on the item's line box's\n  // top edge and the strut's bottom edge will sit on the item's baseline,\n  // with no additional line-height spacing. This allows the item baseline to\n  // be positioned precisely without worrying about font ascent and\n  // line-height.\n\n\n  var pstrutSize = 0;\n\n  for (var i = 0; i < children.length; i++) {\n    var child = children[i];\n\n    if (child.type === \"elem\") {\n      var elem = child.elem;\n      pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height);\n    }\n  }\n\n  pstrutSize += 2;\n  var pstrut = buildCommon_makeSpan([\"pstrut\"], []);\n  pstrut.style.height = pstrutSize + \"em\"; // Create a new list of actual children at the correct offsets\n\n  var realChildren = [];\n  var minPos = depth;\n  var maxPos = depth;\n  var currPos = depth;\n\n  for (var _i2 = 0; _i2 < children.length; _i2++) {\n    var _child = children[_i2];\n\n    if (_child.type === \"kern\") {\n      currPos += _child.size;\n    } else {\n      var _elem = _child.elem;\n      var classes = _child.wrapperClasses || [];\n      var style = _child.wrapperStyle || {};\n      var childWrap = buildCommon_makeSpan(classes, [pstrut, _elem], undefined, style);\n      childWrap.style.top = -pstrutSize - currPos - _elem.depth + \"em\";\n\n      if (_child.marginLeft) {\n        childWrap.style.marginLeft = _child.marginLeft;\n      }\n\n      if (_child.marginRight) {\n        childWrap.style.marginRight = _child.marginRight;\n      }\n\n      realChildren.push(childWrap);\n      currPos += _elem.height + _elem.depth;\n    }\n\n    minPos = Math.min(minPos, currPos);\n    maxPos = Math.max(maxPos, currPos);\n  } // The vlist contents go in a table-cell with `vertical-align:bottom`.\n  // This cell's bottom edge will determine the containing table's baseline\n  // without overly expanding the containing line-box.\n\n\n  var vlist = buildCommon_makeSpan([\"vlist\"], realChildren);\n  vlist.style.height = maxPos + \"em\"; // A second row is used if necessary to represent the vlist's depth.\n\n  var rows;\n\n  if (minPos < 0) {\n    // We will define depth in an empty span with display: table-cell.\n    // It should render with the height that we define. But Chrome, in\n    // contenteditable mode only, treats that span as if it contains some\n    // text content. And that min-height over-rides our desired height.\n    // So we put another empty span inside the depth strut span.\n    var emptySpan = buildCommon_makeSpan([], []);\n    var depthStrut = buildCommon_makeSpan([\"vlist\"], [emptySpan]);\n    depthStrut.style.height = -minPos + \"em\"; // Safari wants the first row to have inline content; otherwise it\n    // puts the bottom of the *second* row on the baseline.\n\n    var topStrut = buildCommon_makeSpan([\"vlist-s\"], [new domTree_SymbolNode(\"\\u200B\")]);\n    rows = [buildCommon_makeSpan([\"vlist-r\"], [vlist, topStrut]), buildCommon_makeSpan([\"vlist-r\"], [depthStrut])];\n  } else {\n    rows = [buildCommon_makeSpan([\"vlist-r\"], [vlist])];\n  }\n\n  var vtable = buildCommon_makeSpan([\"vlist-t\"], rows);\n\n  if (rows.length === 2) {\n    vtable.classes.push(\"vlist-t2\");\n  }\n\n  vtable.height = maxPos;\n  vtable.depth = -minPos;\n  return vtable;\n}; // Glue is a concept from TeX which is a flexible space between elements in\n// either a vertical or horizontal list. In KaTeX, at least for now, it's\n// static space between elements in a horizontal layout.\n\n\nvar buildCommon_makeGlue = function makeGlue(measurement, options) {\n  // Make an empty span for the space\n  var rule = buildCommon_makeSpan([\"mspace\"], [], options);\n  var size = units_calculateSize(measurement, options);\n  rule.style.marginRight = size + \"em\";\n  return rule;\n}; // Takes font options, and returns the appropriate fontLookup name\n\n\nvar retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) {\n  var baseFontName = \"\";\n\n  switch (fontFamily) {\n    case \"amsrm\":\n      baseFontName = \"AMS\";\n      break;\n\n    case \"textrm\":\n      baseFontName = \"Main\";\n      break;\n\n    case \"textsf\":\n      baseFontName = \"SansSerif\";\n      break;\n\n    case \"texttt\":\n      baseFontName = \"Typewriter\";\n      break;\n\n    default:\n      baseFontName = fontFamily;\n    // use fonts added by a plugin\n  }\n\n  var fontStylesName;\n\n  if (fontWeight === \"textbf\" && fontShape === \"textit\") {\n    fontStylesName = \"BoldItalic\";\n  } else if (fontWeight === \"textbf\") {\n    fontStylesName = \"Bold\";\n  } else if (fontWeight === \"textit\") {\n    fontStylesName = \"Italic\";\n  } else {\n    fontStylesName = \"Regular\";\n  }\n\n  return baseFontName + \"-\" + fontStylesName;\n};\n/**\n * Maps TeX font commands to objects containing:\n * - variant: string used for \"mathvariant\" attribute in buildMathML.js\n * - fontName: the \"style\" parameter to fontMetrics.getCharacterMetrics\n */\n// A map between tex font commands an MathML mathvariant attribute values\n\n\nvar fontMap = {\n  // styles\n  \"mathbf\": {\n    variant: \"bold\",\n    fontName: \"Main-Bold\"\n  },\n  \"mathrm\": {\n    variant: \"normal\",\n    fontName: \"Main-Regular\"\n  },\n  \"textit\": {\n    variant: \"italic\",\n    fontName: \"Main-Italic\"\n  },\n  \"mathit\": {\n    variant: \"italic\",\n    fontName: \"Main-Italic\"\n  },\n  // Default math font, \"mathnormal\" and \"boldsymbol\" are missing because they\n  // require the use of several fonts: Main-Italic and Math-Italic for default\n  // math font, Main-Italic, Math-Italic, Caligraphic for \"mathnormal\", and\n  // Math-BoldItalic and Main-Bold for \"boldsymbol\".  This is handled by a\n  // special case in makeOrd which ends up calling mathdefault, mathnormal,\n  // and boldsymbol.\n  // families\n  \"mathbb\": {\n    variant: \"double-struck\",\n    fontName: \"AMS-Regular\"\n  },\n  \"mathcal\": {\n    variant: \"script\",\n    fontName: \"Caligraphic-Regular\"\n  },\n  \"mathfrak\": {\n    variant: \"fraktur\",\n    fontName: \"Fraktur-Regular\"\n  },\n  \"mathscr\": {\n    variant: \"script\",\n    fontName: \"Script-Regular\"\n  },\n  \"mathsf\": {\n    variant: \"sans-serif\",\n    fontName: \"SansSerif-Regular\"\n  },\n  \"mathtt\": {\n    variant: \"monospace\",\n    fontName: \"Typewriter-Regular\"\n  }\n};\nvar svgData = {\n  //   path, width, height\n  vec: [\"vec\", 0.471, 0.714],\n  // values from the font glyph\n  oiintSize1: [\"oiintSize1\", 0.957, 0.499],\n  // oval to overlay the integrand\n  oiintSize2: [\"oiintSize2\", 1.472, 0.659],\n  oiiintSize1: [\"oiiintSize1\", 1.304, 0.499],\n  oiiintSize2: [\"oiiintSize2\", 1.98, 0.659]\n};\n\nvar buildCommon_staticSvg = function staticSvg(value, options) {\n  // Create a span with inline SVG for the element.\n  var _svgData$value = svgData[value],\n      pathName = _svgData$value[0],\n      width = _svgData$value[1],\n      height = _svgData$value[2];\n  var path = new domTree_PathNode(pathName);\n  var svgNode = new SvgNode([path], {\n    \"width\": width + \"em\",\n    \"height\": height + \"em\",\n    // Override CSS rule `.katex svg { width: 100% }`\n    \"style\": \"width:\" + width + \"em\",\n    \"viewBox\": \"0 0 \" + 1000 * width + \" \" + 1000 * height,\n    \"preserveAspectRatio\": \"xMinYMin\"\n  });\n  var span = buildCommon_makeSvgSpan([\"overlay\"], [svgNode], options);\n  span.height = height;\n  span.style.height = height + \"em\";\n  span.style.width = width + \"em\";\n  return span;\n};\n\n/* harmony default export */ var buildCommon = ({\n  fontMap: fontMap,\n  makeSymbol: buildCommon_makeSymbol,\n  mathsym: buildCommon_mathsym,\n  makeSpan: buildCommon_makeSpan,\n  makeSvgSpan: buildCommon_makeSvgSpan,\n  makeLineSpan: makeLineSpan,\n  makeAnchor: buildCommon_makeAnchor,\n  makeFragment: buildCommon_makeFragment,\n  wrapFragment: buildCommon_wrapFragment,\n  makeVList: buildCommon_makeVList,\n  makeOrd: buildCommon_makeOrd,\n  makeGlue: buildCommon_makeGlue,\n  staticSvg: buildCommon_staticSvg,\n  svgData: svgData,\n  tryCombineChars: buildCommon_tryCombineChars\n});\n// CONCATENATED MODULE: ./src/parseNode.js\n\n\n/**\n * Asserts that the node is of the given type and returns it with stricter\n * typing. Throws if the node's type does not match.\n */\nfunction assertNodeType(node, type) {\n  var typedNode = checkNodeType(node, type);\n\n  if (!typedNode) {\n    throw new Error(\"Expected node of type \" + type + \", but got \" + (node ? \"node of type \" + node.type : String(node)));\n  } // $FlowFixMe: Unsure why.\n\n\n  return typedNode;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction checkNodeType(node, type) {\n  if (node && node.type === type) {\n    // The definition of ParseNode<TYPE> doesn't communicate to flow that\n    // `type: TYPE` (as that's not explicitly mentioned anywhere), though that\n    // happens to be true for all our value types.\n    // $FlowFixMe\n    return node;\n  }\n\n  return null;\n}\n/**\n * Asserts that the node is of the given type and returns it with stricter\n * typing. Throws if the node's type does not match.\n */\n\nfunction assertAtomFamily(node, family) {\n  var typedNode = checkAtomFamily(node, family);\n\n  if (!typedNode) {\n    throw new Error(\"Expected node of type \\\"atom\\\" and family \\\"\" + family + \"\\\", but got \" + (node ? node.type === \"atom\" ? \"atom of family \" + node.family : \"node of type \" + node.type : String(node)));\n  }\n\n  return typedNode;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction checkAtomFamily(node, family) {\n  return node && node.type === \"atom\" && node.family === family ? node : null;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction assertSymbolNodeType(node) {\n  var typedNode = checkSymbolNodeType(node);\n\n  if (!typedNode) {\n    throw new Error(\"Expected node of symbol group type, but got \" + (node ? \"node of type \" + node.type : String(node)));\n  }\n\n  return typedNode;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction checkSymbolNodeType(node) {\n  if (node && (node.type === \"atom\" || NON_ATOMS.hasOwnProperty(node.type))) {\n    // $FlowFixMe\n    return node;\n  }\n\n  return null;\n}\n// CONCATENATED MODULE: ./src/spacingData.js\n/**\n * Describes spaces between different classes of atoms.\n */\nvar thinspace = {\n  number: 3,\n  unit: \"mu\"\n};\nvar mediumspace = {\n  number: 4,\n  unit: \"mu\"\n};\nvar thickspace = {\n  number: 5,\n  unit: \"mu\"\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n\n// Spacing relationships for display and text styles\nvar spacings = {\n  mord: {\n    mop: thinspace,\n    mbin: mediumspace,\n    mrel: thickspace,\n    minner: thinspace\n  },\n  mop: {\n    mord: thinspace,\n    mop: thinspace,\n    mrel: thickspace,\n    minner: thinspace\n  },\n  mbin: {\n    mord: mediumspace,\n    mop: mediumspace,\n    mopen: mediumspace,\n    minner: mediumspace\n  },\n  mrel: {\n    mord: thickspace,\n    mop: thickspace,\n    mopen: thickspace,\n    minner: thickspace\n  },\n  mopen: {},\n  mclose: {\n    mop: thinspace,\n    mbin: mediumspace,\n    mrel: thickspace,\n    minner: thinspace\n  },\n  mpunct: {\n    mord: thinspace,\n    mop: thinspace,\n    mrel: thickspace,\n    mopen: thinspace,\n    mclose: thinspace,\n    mpunct: thinspace,\n    minner: thinspace\n  },\n  minner: {\n    mord: thinspace,\n    mop: thinspace,\n    mbin: mediumspace,\n    mrel: thickspace,\n    mopen: thinspace,\n    mpunct: thinspace,\n    minner: thinspace\n  }\n}; // Spacing relationships for script and scriptscript styles\n\nvar tightSpacings = {\n  mord: {\n    mop: thinspace\n  },\n  mop: {\n    mord: thinspace,\n    mop: thinspace\n  },\n  mbin: {},\n  mrel: {},\n  mopen: {},\n  mclose: {\n    mop: thinspace\n  },\n  mpunct: {},\n  minner: {\n    mop: thinspace\n  }\n};\n// CONCATENATED MODULE: ./src/defineFunction.js\n\n\n/**\n * All registered functions.\n * `functions.js` just exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary.\n */\nvar _functions = {};\n/**\n * All HTML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _htmlGroupBuilders = {};\n/**\n * All MathML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _mathmlGroupBuilders = {};\nfunction defineFunction(_ref) {\n  var type = _ref.type,\n      nodeType = _ref.nodeType,\n      names = _ref.names,\n      props = _ref.props,\n      handler = _ref.handler,\n      htmlBuilder = _ref.htmlBuilder,\n      mathmlBuilder = _ref.mathmlBuilder;\n  // Set default values of functions\n  var data = {\n    type: type,\n    numArgs: props.numArgs,\n    argTypes: props.argTypes,\n    greediness: props.greediness === undefined ? 1 : props.greediness,\n    allowedInText: !!props.allowedInText,\n    allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,\n    numOptionalArgs: props.numOptionalArgs || 0,\n    infix: !!props.infix,\n    consumeMode: props.consumeMode,\n    handler: handler\n  };\n\n  for (var i = 0; i < names.length; ++i) {\n    // TODO: The value type of _functions should be a type union of all\n    // possible `FunctionSpec<>` possibilities instead of `FunctionSpec<*>`,\n    // which is an existential type.\n    // $FlowFixMe\n    _functions[names[i]] = data;\n  }\n\n  if (type) {\n    if (htmlBuilder) {\n      _htmlGroupBuilders[type] = htmlBuilder;\n    }\n\n    if (mathmlBuilder) {\n      _mathmlGroupBuilders[type] = mathmlBuilder;\n    }\n  }\n}\n/**\n * Use this to register only the HTML and MathML builders for a function (e.g.\n * if the function's ParseNode is generated in Parser.js rather than via a\n * stand-alone handler provided to `defineFunction`).\n */\n\nfunction defineFunctionBuilders(_ref2) {\n  var type = _ref2.type,\n      htmlBuilder = _ref2.htmlBuilder,\n      mathmlBuilder = _ref2.mathmlBuilder;\n  defineFunction({\n    type: type,\n    names: [],\n    props: {\n      numArgs: 0\n    },\n    handler: function handler() {\n      throw new Error('Should never be called.');\n    },\n    htmlBuilder: htmlBuilder,\n    mathmlBuilder: mathmlBuilder\n  });\n} // Since the corresponding buildHTML/buildMathML function expects a\n// list of elements, we normalize for different kinds of arguments\n\nvar defineFunction_ordargument = function ordargument(arg) {\n  var node = checkNodeType(arg, \"ordgroup\");\n  return node ? node.body : [arg];\n};\n// CONCATENATED MODULE: ./src/buildHTML.js\n/**\n * This file does the main work of building a domTree structure from a parse\n * tree. The entry point is the `buildHTML` function, which takes a parse tree.\n * Then, the buildExpression, buildGroup, and various groupBuilders functions\n * are called, to produce a final HTML tree.\n */\n\n\n\n\n\n\n\n\n\nvar buildHTML_makeSpan = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)\n// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,\n// and the text before Rule 19.\n\nvar binLeftCanceller = [\"leftmost\", \"mbin\", \"mopen\", \"mrel\", \"mop\", \"mpunct\"];\nvar binRightCanceller = [\"rightmost\", \"mrel\", \"mclose\", \"mpunct\"];\nvar buildHTML_styleMap = {\n  \"display\": src_Style.DISPLAY,\n  \"text\": src_Style.TEXT,\n  \"script\": src_Style.SCRIPT,\n  \"scriptscript\": src_Style.SCRIPTSCRIPT\n};\nvar DomEnum = {\n  mord: \"mord\",\n  mop: \"mop\",\n  mbin: \"mbin\",\n  mrel: \"mrel\",\n  mopen: \"mopen\",\n  mclose: \"mclose\",\n  mpunct: \"mpunct\",\n  minner: \"minner\"\n};\n\n/**\n * Take a list of nodes, build them in order, and return a list of the built\n * nodes. documentFragments are flattened into their contents, so the\n * returned list contains no fragments. `isRealGroup` is true if `expression`\n * is a real group (no atoms will be added on either side), as opposed to\n * a partial group (e.g. one created by \\color). `surrounding` is an array\n * consisting type of nodes that will be added to the left and right.\n */\nvar buildHTML_buildExpression = function buildExpression(expression, options, isRealGroup, surrounding) {\n  if (surrounding === void 0) {\n    surrounding = [null, null];\n  }\n\n  // Parse expressions into `groups`.\n  var groups = [];\n\n  for (var i = 0; i < expression.length; i++) {\n    var output = buildHTML_buildGroup(expression[i], options);\n\n    if (output instanceof tree_DocumentFragment) {\n      var children = output.children;\n      groups.push.apply(groups, children);\n    } else {\n      groups.push(output);\n    }\n  } // If `expression` is a partial group, let the parent handle spacings\n  // to avoid processing groups multiple times.\n\n\n  if (!isRealGroup) {\n    return groups;\n  }\n\n  var glueOptions = options;\n\n  if (expression.length === 1) {\n    var node = checkNodeType(expression[0], \"sizing\") || checkNodeType(expression[0], \"styling\");\n\n    if (!node) {// No match.\n    } else if (node.type === \"sizing\") {\n      glueOptions = options.havingSize(node.size);\n    } else if (node.type === \"styling\") {\n      glueOptions = options.havingStyle(buildHTML_styleMap[node.style]);\n    }\n  } // Dummy spans for determining spacings between surrounding atoms.\n  // If `expression` has no atoms on the left or right, class \"leftmost\"\n  // or \"rightmost\", respectively, is used to indicate it.\n\n\n  var dummyPrev = buildHTML_makeSpan([surrounding[0] || \"leftmost\"], [], options);\n  var dummyNext = buildHTML_makeSpan([surrounding[1] || \"rightmost\"], [], options); // TODO: These code assumes that a node's math class is the first element\n  // of its `classes` array. A later cleanup should ensure this, for\n  // instance by changing the signature of `makeSpan`.\n  // Before determining what spaces to insert, perform bin cancellation.\n  // Binary operators change to ordinary symbols in some contexts.\n\n  traverseNonSpaceNodes(groups, function (node, prev) {\n    var prevType = prev.classes[0];\n    var type = node.classes[0];\n\n    if (prevType === \"mbin\" && utils.contains(binRightCanceller, type)) {\n      prev.classes[0] = \"mord\";\n    } else if (type === \"mbin\" && utils.contains(binLeftCanceller, prevType)) {\n      node.classes[0] = \"mord\";\n    }\n  }, {\n    node: dummyPrev\n  }, dummyNext);\n  traverseNonSpaceNodes(groups, function (node, prev) {\n    var prevType = getTypeOfDomTree(prev);\n    var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.\n\n    var space = prevType && type ? node.hasClass(\"mtight\") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;\n\n    if (space) {\n      // Insert glue (spacing) after the `prev`.\n      return buildCommon.makeGlue(space, glueOptions);\n    }\n  }, {\n    node: dummyPrev\n  }, dummyNext);\n  return groups;\n}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and\n// previous node as arguments, optionally returning a node to insert after the\n// previous node. `prev` is an object with the previous node and `insertAfter`\n// function to insert after it. `next` is a node that will be added to the right.\n// Used for bin cancellation and inserting spacings.\n\nvar traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next) {\n  if (next) {\n    // temporarily append the right node, if exists\n    nodes.push(next);\n  }\n\n  var i = 0;\n\n  for (; i < nodes.length; i++) {\n    var node = nodes[i];\n    var partialGroup = buildHTML_checkPartialGroup(node);\n\n    if (partialGroup) {\n      // Recursive DFS\n      traverseNonSpaceNodes(partialGroup.children, callback, prev);\n      continue;\n    } // Ignore explicit spaces (e.g., \\;, \\,) when determining what implicit\n    // spacing should go between atoms of different classes\n\n\n    if (node.classes[0] === \"mspace\") {\n      continue;\n    }\n\n    var result = callback(node, prev.node);\n\n    if (result) {\n      if (prev.insertAfter) {\n        prev.insertAfter(result);\n      } else {\n        // insert at front\n        nodes.unshift(result);\n        i++;\n      }\n    }\n\n    prev.node = node;\n\n    prev.insertAfter = function (index) {\n      return function (n) {\n        nodes.splice(index + 1, 0, n);\n        i++;\n      };\n    }(i);\n  }\n\n  if (next) {\n    nodes.pop();\n  }\n}; // Check if given node is a partial group, i.e., does not affect spacing around.\n\n\nvar buildHTML_checkPartialGroup = function checkPartialGroup(node) {\n  if (node instanceof tree_DocumentFragment || node instanceof domTree_Anchor) {\n    return node;\n  }\n\n  return null;\n}; // Return the outermost node of a domTree.\n\n\nvar getOutermostNode = function getOutermostNode(node, side) {\n  var partialGroup = buildHTML_checkPartialGroup(node);\n\n  if (partialGroup) {\n    var children = partialGroup.children;\n\n    if (children.length) {\n      if (side === \"right\") {\n        return getOutermostNode(children[children.length - 1], \"right\");\n      } else if (side === \"left\") {\n        return getOutermostNode(children[0], \"left\");\n      }\n    }\n  }\n\n  return node;\n}; // Return math atom class (mclass) of a domTree.\n// If `side` is given, it will get the type of the outermost node at given side.\n\n\nvar getTypeOfDomTree = function getTypeOfDomTree(node, side) {\n  if (!node) {\n    return null;\n  }\n\n  if (side) {\n    node = getOutermostNode(node, side);\n  } // This makes a lot of assumptions as to where the type of atom\n  // appears.  We should do a better job of enforcing this.\n\n\n  return DomEnum[node.classes[0]] || null;\n};\nvar makeNullDelimiter = function makeNullDelimiter(options, classes) {\n  var moreClasses = [\"nulldelimiter\"].concat(options.baseSizingClasses());\n  return buildHTML_makeSpan(classes.concat(moreClasses));\n};\n/**\n * buildGroup is the function that takes a group and calls the correct groupType\n * function for it. It also handles the interaction of size and style changes\n * between parents and children.\n */\n\nvar buildHTML_buildGroup = function buildGroup(group, options, baseOptions) {\n  if (!group) {\n    return buildHTML_makeSpan();\n  }\n\n  if (_htmlGroupBuilders[group.type]) {\n    // Call the groupBuilders function\n    var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account\n    // for that size difference.\n\n    if (baseOptions && options.size !== baseOptions.size) {\n      groupNode = buildHTML_makeSpan(options.sizingClasses(baseOptions), [groupNode], options);\n      var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;\n      groupNode.height *= multiplier;\n      groupNode.depth *= multiplier;\n    }\n\n    return groupNode;\n  } else {\n    throw new src_ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n  }\n};\n/**\n * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)\n * into an unbreakable HTML node of class .base, with proper struts to\n * guarantee correct vertical extent.  `buildHTML` calls this repeatedly to\n * make up the entire expression as a sequence of unbreakable units.\n */\n\nfunction buildHTMLUnbreakable(children, options) {\n  // Compute height and depth of this chunk.\n  var body = buildHTML_makeSpan([\"base\"], children, options); // Add strut, which ensures that the top of the HTML element falls at\n  // the height of the expression, and the bottom of the HTML element\n  // falls at the depth of the expression.\n  // We used to have separate top and bottom struts, where the bottom strut\n  // would like to use `vertical-align: top`, but in IE 9 this lowers the\n  // baseline of the box to the bottom of this strut (instead of staying in\n  // the normal place) so we use an absolute value for vertical-align instead.\n\n  var strut = buildHTML_makeSpan([\"strut\"]);\n  strut.style.height = body.height + body.depth + \"em\";\n  strut.style.verticalAlign = -body.depth + \"em\";\n  body.children.unshift(strut);\n  return body;\n}\n/**\n * Take an entire parse tree, and build it into an appropriate set of HTML\n * nodes.\n */\n\n\nfunction buildHTML(tree, options) {\n  // Strip off outer tag wrapper for processing below.\n  var tag = null;\n\n  if (tree.length === 1 && tree[0].type === \"tag\") {\n    tag = tree[0].tag;\n    tree = tree[0].body;\n  } // Build the expression contained in the tree\n\n\n  var expression = buildHTML_buildExpression(tree, options, true);\n  var children = []; // Create one base node for each chunk between potential line breaks.\n  // The TeXBook [p.173] says \"A formula will be broken only after a\n  // relation symbol like $=$ or $<$ or $\\rightarrow$, or after a binary\n  // operation symbol like $+$ or $-$ or $\\times$, where the relation or\n  // binary operation is on the ``outer level'' of the formula (i.e., not\n  // enclosed in {...} and not part of an \\over construction).\"\n\n  var parts = [];\n\n  for (var i = 0; i < expression.length; i++) {\n    parts.push(expression[i]);\n\n    if (expression[i].hasClass(\"mbin\") || expression[i].hasClass(\"mrel\") || expression[i].hasClass(\"allowbreak\")) {\n      // Put any post-operator glue on same line as operator.\n      // Watch for \\nobreak along the way, and stop at \\newline.\n      var nobreak = false;\n\n      while (i < expression.length - 1 && expression[i + 1].hasClass(\"mspace\") && !expression[i + 1].hasClass(\"newline\")) {\n        i++;\n        parts.push(expression[i]);\n\n        if (expression[i].hasClass(\"nobreak\")) {\n          nobreak = true;\n        }\n      } // Don't allow break if \\nobreak among the post-operator glue.\n\n\n      if (!nobreak) {\n        children.push(buildHTMLUnbreakable(parts, options));\n        parts = [];\n      }\n    } else if (expression[i].hasClass(\"newline\")) {\n      // Write the line except the newline\n      parts.pop();\n\n      if (parts.length > 0) {\n        children.push(buildHTMLUnbreakable(parts, options));\n        parts = [];\n      } // Put the newline at the top level\n\n\n      children.push(expression[i]);\n    }\n  }\n\n  if (parts.length > 0) {\n    children.push(buildHTMLUnbreakable(parts, options));\n  } // Now, if there was a tag, build it too and append it as a final child.\n\n\n  var tagChild;\n\n  if (tag) {\n    tagChild = buildHTMLUnbreakable(buildHTML_buildExpression(tag, options, true));\n    tagChild.classes = [\"tag\"];\n    children.push(tagChild);\n  }\n\n  var htmlNode = buildHTML_makeSpan([\"katex-html\"], children);\n  htmlNode.setAttribute(\"aria-hidden\", \"true\"); // Adjust the strut of the tag to be the maximum height of all children\n  // (the height of the enclosing htmlNode) for proper vertical alignment.\n\n  if (tagChild) {\n    var strut = tagChild.children[0];\n    strut.style.height = htmlNode.height + htmlNode.depth + \"em\";\n    strut.style.verticalAlign = -htmlNode.depth + \"em\";\n  }\n\n  return htmlNode;\n}\n// CONCATENATED MODULE: ./src/mathMLTree.js\n/**\n * These objects store data about MathML nodes. This is the MathML equivalent\n * of the types in domTree.js. Since MathML handles its own rendering, and\n * since we're mainly using MathML to improve accessibility, we don't manage\n * any of the styling state that the plain DOM nodes do.\n *\n * The `toNode` and `toMarkup` functions work simlarly to how they do in\n * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.\n */\n\n\nfunction newDocumentFragment(children) {\n  return new tree_DocumentFragment(children);\n}\n/**\n * This node represents a general purpose MathML node of any type. The\n * constructor requires the type of node to create (for example, `\"mo\"` or\n * `\"mspace\"`, corresponding to `<mo>` and `<mspace>` tags).\n */\n\nvar mathMLTree_MathNode =\n/*#__PURE__*/\nfunction () {\n  function MathNode(type, children) {\n    this.type = void 0;\n    this.attributes = void 0;\n    this.children = void 0;\n    this.type = type;\n    this.attributes = {};\n    this.children = children || [];\n  }\n  /**\n   * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n   * semantic content, so this is used heavily.\n   */\n\n\n  var _proto = MathNode.prototype;\n\n  _proto.setAttribute = function setAttribute(name, value) {\n    this.attributes[name] = value;\n  }\n  /**\n   * Gets an attribute on a MathML node.\n   */\n  ;\n\n  _proto.getAttribute = function getAttribute(name) {\n    return this.attributes[name];\n  }\n  /**\n   * Converts the math node into a MathML-namespaced DOM element.\n   */\n  ;\n\n  _proto.toNode = function toNode() {\n    var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        node.setAttribute(attr, this.attributes[attr]);\n      }\n    }\n\n    for (var i = 0; i < this.children.length; i++) {\n      node.appendChild(this.children[i].toNode());\n    }\n\n    return node;\n  }\n  /**\n   * Converts the math node into an HTML markup string.\n   */\n  ;\n\n  _proto.toMarkup = function toMarkup() {\n    var markup = \"<\" + this.type; // Add the attributes\n\n    for (var attr in this.attributes) {\n      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n        markup += \" \" + attr + \"=\\\"\";\n        markup += utils.escape(this.attributes[attr]);\n        markup += \"\\\"\";\n      }\n    }\n\n    markup += \">\";\n\n    for (var i = 0; i < this.children.length; i++) {\n      markup += this.children[i].toMarkup();\n    }\n\n    markup += \"</\" + this.type + \">\";\n    return markup;\n  }\n  /**\n   * Converts the math node into a string, similar to innerText, but escaped.\n   */\n  ;\n\n  _proto.toText = function toText() {\n    return this.children.map(function (child) {\n      return child.toText();\n    }).join(\"\");\n  };\n\n  return MathNode;\n}();\n/**\n * This node represents a piece of text.\n */\n\nvar mathMLTree_TextNode =\n/*#__PURE__*/\nfunction () {\n  function TextNode(text) {\n    this.text = void 0;\n    this.text = text;\n  }\n  /**\n   * Converts the text node into a DOM text node.\n   */\n\n\n  var _proto2 = TextNode.prototype;\n\n  _proto2.toNode = function toNode() {\n    return document.createTextNode(this.text);\n  }\n  /**\n   * Converts the text node into escaped HTML markup\n   * (representing the text itself).\n   */\n  ;\n\n  _proto2.toMarkup = function toMarkup() {\n    return utils.escape(this.toText());\n  }\n  /**\n   * Converts the text node into a string\n   * (representing the text iteself).\n   */\n  ;\n\n  _proto2.toText = function toText() {\n    return this.text;\n  };\n\n  return TextNode;\n}();\n/**\n * This node represents a space, but may render as <mspace.../> or as text,\n * depending on the width.\n */\n\nvar SpaceNode =\n/*#__PURE__*/\nfunction () {\n  /**\n   * Create a Space node with width given in CSS ems.\n   */\n  function SpaceNode(width) {\n    this.width = void 0;\n    this.character = void 0;\n    this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html\n    // for a table of space-like characters.  We use Unicode\n    // representations instead of &LongNames; as it's not clear how to\n    // make the latter via document.createTextNode.\n\n    if (width >= 0.05555 && width <= 0.05556) {\n      this.character = \"\\u200A\"; // &VeryThinSpace;\n    } else if (width >= 0.1666 && width <= 0.1667) {\n      this.character = \"\\u2009\"; // &ThinSpace;\n    } else if (width >= 0.2222 && width <= 0.2223) {\n      this.character = \"\\u2005\"; // &MediumSpace;\n    } else if (width >= 0.2777 && width <= 0.2778) {\n      this.character = \"\\u2005\\u200A\"; // &ThickSpace;\n    } else if (width >= -0.05556 && width <= -0.05555) {\n      this.character = \"\\u200A\\u2063\"; // &NegativeVeryThinSpace;\n    } else if (width >= -0.1667 && width <= -0.1666) {\n      this.character = \"\\u2009\\u2063\"; // &NegativeThinSpace;\n    } else if (width >= -0.2223 && width <= -0.2222) {\n      this.character = \"\\u205F\\u2063\"; // &NegativeMediumSpace;\n    } else if (width >= -0.2778 && width <= -0.2777) {\n      this.character = \"\\u2005\\u2063\"; // &NegativeThickSpace;\n    } else {\n      this.character = null;\n    }\n  }\n  /**\n   * Converts the math node into a MathML-namespaced DOM element.\n   */\n\n\n  var _proto3 = SpaceNode.prototype;\n\n  _proto3.toNode = function toNode() {\n    if (this.character) {\n      return document.createTextNode(this.character);\n    } else {\n      var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"mspace\");\n      node.setAttribute(\"width\", this.width + \"em\");\n      return node;\n    }\n  }\n  /**\n   * Converts the math node into an HTML markup string.\n   */\n  ;\n\n  _proto3.toMarkup = function toMarkup() {\n    if (this.character) {\n      return \"<mtext>\" + this.character + \"</mtext>\";\n    } else {\n      return \"<mspace width=\\\"\" + this.width + \"em\\\"/>\";\n    }\n  }\n  /**\n   * Converts the math node into a string, similar to innerText.\n   */\n  ;\n\n  _proto3.toText = function toText() {\n    if (this.character) {\n      return this.character;\n    } else {\n      return \" \";\n    }\n  };\n\n  return SpaceNode;\n}();\n\n/* harmony default export */ var mathMLTree = ({\n  MathNode: mathMLTree_MathNode,\n  TextNode: mathMLTree_TextNode,\n  SpaceNode: SpaceNode,\n  newDocumentFragment: newDocumentFragment\n});\n// CONCATENATED MODULE: ./src/buildMathML.js\n/**\n * This file converts a parse tree into a cooresponding MathML tree. The main\n * entry point is the `buildMathML` function, which takes a parse tree from the\n * parser.\n */\n\n\n\n\n\n\n\n\n\n/**\n * Takes a symbol and converts it into a MathML text node after performing\n * optional replacement from symbols.js.\n */\nvar buildMathML_makeText = function makeText(text, mode, options) {\n  if (src_symbols[mode][text] && src_symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.substr(4, 2) === \"tt\" || options.font && options.font.substr(4, 2) === \"tt\"))) {\n    text = src_symbols[mode][text].replace;\n  }\n\n  return new mathMLTree.TextNode(text);\n};\n/**\n * Wrap the given array of nodes in an <mrow> node if needed, i.e.,\n * unless the array has length 1.  Always returns a single node.\n */\n\nvar buildMathML_makeRow = function makeRow(body) {\n  if (body.length === 1) {\n    return body[0];\n  } else {\n    return new mathMLTree.MathNode(\"mrow\", body);\n  }\n};\n/**\n * Returns the math variant as a string or null if none is required.\n */\n\nvar buildMathML_getVariant = function getVariant(group, options) {\n  // Handle \\text... font specifiers as best we can.\n  // MathML has a limited list of allowable mathvariant specifiers; see\n  // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt\n  if (options.fontFamily === \"texttt\") {\n    return \"monospace\";\n  } else if (options.fontFamily === \"textsf\") {\n    if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n      return \"sans-serif-bold-italic\";\n    } else if (options.fontShape === \"textit\") {\n      return \"sans-serif-italic\";\n    } else if (options.fontWeight === \"textbf\") {\n      return \"bold-sans-serif\";\n    } else {\n      return \"sans-serif\";\n    }\n  } else if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n    return \"bold-italic\";\n  } else if (options.fontShape === \"textit\") {\n    return \"italic\";\n  } else if (options.fontWeight === \"textbf\") {\n    return \"bold\";\n  }\n\n  var font = options.font;\n\n  if (!font || font === \"mathnormal\") {\n    return null;\n  }\n\n  var mode = group.mode;\n\n  if (font === \"mathit\") {\n    return \"italic\";\n  } else if (font === \"boldsymbol\") {\n    return \"bold-italic\";\n  }\n\n  var text = group.text;\n\n  if (utils.contains([\"\\\\imath\", \"\\\\jmath\"], text)) {\n    return null;\n  }\n\n  if (src_symbols[mode][text] && src_symbols[mode][text].replace) {\n    text = src_symbols[mode][text].replace;\n  }\n\n  var fontName = buildCommon.fontMap[font].fontName;\n\n  if (getCharacterMetrics(text, fontName, mode)) {\n    return buildCommon.fontMap[font].variant;\n  }\n\n  return null;\n};\n/**\n * Takes a list of nodes, builds them, and returns a list of the generated\n * MathML nodes.  Also combine consecutive <mtext> outputs into a single\n * <mtext> tag.\n */\n\nvar buildMathML_buildExpression = function buildExpression(expression, options) {\n  var groups = [];\n  var lastGroup;\n\n  for (var i = 0; i < expression.length; i++) {\n    var group = buildMathML_buildGroup(expression[i], options);\n\n    if (group instanceof mathMLTree_MathNode && lastGroup instanceof mathMLTree_MathNode) {\n      // Concatenate adjacent <mtext>s\n      if (group.type === 'mtext' && lastGroup.type === 'mtext' && group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) {\n        var _lastGroup$children;\n\n        (_lastGroup$children = lastGroup.children).push.apply(_lastGroup$children, group.children);\n\n        continue; // Concatenate adjacent <mn>s\n      } else if (group.type === 'mn' && lastGroup.type === 'mn') {\n        var _lastGroup$children2;\n\n        (_lastGroup$children2 = lastGroup.children).push.apply(_lastGroup$children2, group.children);\n\n        continue; // Concatenate <mn>...</mn> followed by <mi>.</mi>\n      } else if (group.type === 'mi' && group.children.length === 1 && lastGroup.type === 'mn') {\n        var child = group.children[0];\n\n        if (child instanceof mathMLTree_TextNode && child.text === '.') {\n          var _lastGroup$children3;\n\n          (_lastGroup$children3 = lastGroup.children).push.apply(_lastGroup$children3, group.children);\n\n          continue;\n        }\n      } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {\n        var lastChild = lastGroup.children[0];\n\n        if (lastChild instanceof mathMLTree_TextNode && lastChild.text === \"\\u0338\" && (group.type === 'mo' || group.type === 'mi' || group.type === 'mn')) {\n          var _child = group.children[0];\n\n          if (_child instanceof mathMLTree_TextNode && _child.text.length > 0) {\n            // Overlay with combining character long solidus\n            _child.text = _child.text.slice(0, 1) + \"\\u0338\" + _child.text.slice(1);\n            groups.pop();\n          }\n        }\n      }\n    }\n\n    groups.push(group);\n    lastGroup = group;\n  }\n\n  return groups;\n};\n/**\n * Equivalent to buildExpression, but wraps the elements in an <mrow>\n * if there's more than one.  Returns a single node instead of an array.\n */\n\nvar buildExpressionRow = function buildExpressionRow(expression, options) {\n  return buildMathML_makeRow(buildMathML_buildExpression(expression, options));\n};\n/**\n * Takes a group from the parser and calls the appropriate groupBuilders function\n * on it to produce a MathML node.\n */\n\nvar buildMathML_buildGroup = function buildGroup(group, options) {\n  if (!group) {\n    return new mathMLTree.MathNode(\"mrow\");\n  }\n\n  if (_mathmlGroupBuilders[group.type]) {\n    // Call the groupBuilders function\n    var result = _mathmlGroupBuilders[group.type](group, options);\n    return result;\n  } else {\n    throw new src_ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n  }\n};\n/**\n * Takes a full parse tree and settings and builds a MathML representation of\n * it. In particular, we put the elements from building the parse tree into a\n * <semantics> tag so we can also include that TeX source as an annotation.\n *\n * Note that we actually return a domTree element with a `<math>` inside it so\n * we can do appropriate styling.\n */\n\nfunction buildMathML(tree, texExpression, options) {\n  var expression = buildMathML_buildExpression(tree, options); // Wrap up the expression in an mrow so it is presented in the semantics\n  // tag correctly, unless it's a single <mrow> or <mtable>.\n\n  var wrapper;\n\n  if (expression.length === 1 && expression[0] instanceof mathMLTree_MathNode && utils.contains([\"mrow\", \"mtable\"], expression[0].type)) {\n    wrapper = expression[0];\n  } else {\n    wrapper = new mathMLTree.MathNode(\"mrow\", expression);\n  } // Build a TeX annotation of the source\n\n\n  var annotation = new mathMLTree.MathNode(\"annotation\", [new mathMLTree.TextNode(texExpression)]);\n  annotation.setAttribute(\"encoding\", \"application/x-tex\");\n  var semantics = new mathMLTree.MathNode(\"semantics\", [wrapper, annotation]);\n  var math = new mathMLTree.MathNode(\"math\", [semantics]); // You can't style <math> nodes, so we wrap the node in a span.\n  // NOTE: The span class is not typed to have <math> nodes as children, and\n  // we don't want to make the children type more generic since the children\n  // of span are expected to have more fields in `buildHtml` contexts.\n  // $FlowFixMe\n\n  return buildCommon.makeSpan([\"katex-mathml\"], [math]);\n}\n// CONCATENATED MODULE: ./src/buildTree.js\n\n\n\n\n\n\n\nvar buildTree_optionsFromSettings = function optionsFromSettings(settings) {\n  return new src_Options({\n    style: settings.displayMode ? src_Style.DISPLAY : src_Style.TEXT,\n    maxSize: settings.maxSize\n  });\n};\n\nvar buildTree_displayWrap = function displayWrap(node, settings) {\n  if (settings.displayMode) {\n    var classes = [\"katex-display\"];\n\n    if (settings.leqno) {\n      classes.push(\"leqno\");\n    }\n\n    if (settings.fleqn) {\n      classes.push(\"fleqn\");\n    }\n\n    node = buildCommon.makeSpan(classes, [node]);\n  }\n\n  return node;\n};\n\nvar buildTree_buildTree = function buildTree(tree, expression, settings) {\n  var options = buildTree_optionsFromSettings(settings);\n  var mathMLNode = buildMathML(tree, expression, options);\n  var htmlNode = buildHTML(tree, options);\n  var katexNode = buildCommon.makeSpan([\"katex\"], [mathMLNode, htmlNode]);\n  return buildTree_displayWrap(katexNode, settings);\n};\nvar buildTree_buildHTMLTree = function buildHTMLTree(tree, expression, settings) {\n  var options = buildTree_optionsFromSettings(settings);\n  var htmlNode = buildHTML(tree, options);\n  var katexNode = buildCommon.makeSpan([\"katex\"], [htmlNode]);\n  return buildTree_displayWrap(katexNode, settings);\n};\n/* harmony default export */ var src_buildTree = (buildTree_buildTree);\n// CONCATENATED MODULE: ./src/stretchy.js\n/**\n * This file provides support to buildMathML.js and buildHTML.js\n * for stretchy wide elements rendered from SVG files\n * and other CSS trickery.\n */\n\n\n\n\nvar stretchyCodePoint = {\n  widehat: \"^\",\n  widecheck: \"ˇ\",\n  widetilde: \"~\",\n  utilde: \"~\",\n  overleftarrow: \"\\u2190\",\n  underleftarrow: \"\\u2190\",\n  xleftarrow: \"\\u2190\",\n  overrightarrow: \"\\u2192\",\n  underrightarrow: \"\\u2192\",\n  xrightarrow: \"\\u2192\",\n  underbrace: \"\\u23DF\",\n  overbrace: \"\\u23DE\",\n  overgroup: \"\\u23E0\",\n  undergroup: \"\\u23E1\",\n  overleftrightarrow: \"\\u2194\",\n  underleftrightarrow: \"\\u2194\",\n  xleftrightarrow: \"\\u2194\",\n  Overrightarrow: \"\\u21D2\",\n  xRightarrow: \"\\u21D2\",\n  overleftharpoon: \"\\u21BC\",\n  xleftharpoonup: \"\\u21BC\",\n  overrightharpoon: \"\\u21C0\",\n  xrightharpoonup: \"\\u21C0\",\n  xLeftarrow: \"\\u21D0\",\n  xLeftrightarrow: \"\\u21D4\",\n  xhookleftarrow: \"\\u21A9\",\n  xhookrightarrow: \"\\u21AA\",\n  xmapsto: \"\\u21A6\",\n  xrightharpoondown: \"\\u21C1\",\n  xleftharpoondown: \"\\u21BD\",\n  xrightleftharpoons: \"\\u21CC\",\n  xleftrightharpoons: \"\\u21CB\",\n  xtwoheadleftarrow: \"\\u219E\",\n  xtwoheadrightarrow: \"\\u21A0\",\n  xlongequal: \"=\",\n  xtofrom: \"\\u21C4\",\n  xrightleftarrows: \"\\u21C4\",\n  xrightequilibrium: \"\\u21CC\",\n  // Not a perfect match.\n  xleftequilibrium: \"\\u21CB\" // None better available.\n\n};\n\nvar stretchy_mathMLnode = function mathMLnode(label) {\n  var node = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(stretchyCodePoint[label.substr(1)])]);\n  node.setAttribute(\"stretchy\", \"true\");\n  return node;\n}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts.\n// Copyright (c) 2009-2010, Design Science, Inc. (<www.mathjax.org>)\n// Copyright (c) 2014-2017 Khan Academy (<www.khanacademy.org>)\n// Licensed under the SIL Open Font License, Version 1.1.\n// See \\nhttp://scripts.sil.org/OFL\n// Very Long SVGs\n//    Many of the KaTeX stretchy wide elements use a long SVG image and an\n//    overflow: hidden tactic to achieve a stretchy image while avoiding\n//    distortion of arrowheads or brace corners.\n//    The SVG typically contains a very long (400 em) arrow.\n//    The SVG is in a container span that has overflow: hidden, so the span\n//    acts like a window that exposes only part of the  SVG.\n//    The SVG always has a longer, thinner aspect ratio than the container span.\n//    After the SVG fills 100% of the height of the container span,\n//    there is a long arrow shaft left over. That left-over shaft is not shown.\n//    Instead, it is sliced off because the span's CSS has overflow: hidden.\n//    Thus, the reader sees an arrow that matches the subject matter width\n//    without distortion.\n//    Some functions, such as \\cancel, need to vary their aspect ratio. These\n//    functions do not get the overflow SVG treatment.\n// Second Brush Stroke\n//    Low resolution monitors struggle to display images in fine detail.\n//    So browsers apply anti-aliasing. A long straight arrow shaft therefore\n//    will sometimes appear as if it has a blurred edge.\n//    To mitigate this, these SVG files contain a second \"brush-stroke\" on the\n//    arrow shafts. That is, a second long thin rectangular SVG path has been\n//    written directly on top of each arrow shaft. This reinforcement causes\n//    some of the screen pixels to display as black instead of the anti-aliased\n//    gray pixel that a  single path would generate. So we get arrow shafts\n//    whose edges appear to be sharper.\n// In the katexImagesData object just below, the dimensions all\n// correspond to path geometry inside the relevant SVG.\n// For example, \\overrightarrow uses the same arrowhead as glyph U+2192\n// from the KaTeX Main font. The scaling factor is 1000.\n// That is, inside the font, that arrowhead is 522 units tall, which\n// corresponds to 0.522 em inside the document.\n\n\nvar katexImagesData = {\n  //   path(s), minWidth, height, align\n  overrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n  overleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n  underrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n  underleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n  xrightarrow: [[\"rightarrow\"], 1.469, 522, \"xMaxYMin\"],\n  xleftarrow: [[\"leftarrow\"], 1.469, 522, \"xMinYMin\"],\n  Overrightarrow: [[\"doublerightarrow\"], 0.888, 560, \"xMaxYMin\"],\n  xRightarrow: [[\"doublerightarrow\"], 1.526, 560, \"xMaxYMin\"],\n  xLeftarrow: [[\"doubleleftarrow\"], 1.526, 560, \"xMinYMin\"],\n  overleftharpoon: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n  xleftharpoonup: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n  xleftharpoondown: [[\"leftharpoondown\"], 0.888, 522, \"xMinYMin\"],\n  overrightharpoon: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n  xrightharpoonup: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n  xrightharpoondown: [[\"rightharpoondown\"], 0.888, 522, \"xMaxYMin\"],\n  xlongequal: [[\"longequal\"], 0.888, 334, \"xMinYMin\"],\n  xtwoheadleftarrow: [[\"twoheadleftarrow\"], 0.888, 334, \"xMinYMin\"],\n  xtwoheadrightarrow: [[\"twoheadrightarrow\"], 0.888, 334, \"xMaxYMin\"],\n  overleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n  overbrace: [[\"leftbrace\", \"midbrace\", \"rightbrace\"], 1.6, 548],\n  underbrace: [[\"leftbraceunder\", \"midbraceunder\", \"rightbraceunder\"], 1.6, 548],\n  underleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n  xleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 1.75, 522],\n  xLeftrightarrow: [[\"doubleleftarrow\", \"doublerightarrow\"], 1.75, 560],\n  xrightleftharpoons: [[\"leftharpoondownplus\", \"rightharpoonplus\"], 1.75, 716],\n  xleftrightharpoons: [[\"leftharpoonplus\", \"rightharpoondownplus\"], 1.75, 716],\n  xhookleftarrow: [[\"leftarrow\", \"righthook\"], 1.08, 522],\n  xhookrightarrow: [[\"lefthook\", \"rightarrow\"], 1.08, 522],\n  overlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n  underlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n  overgroup: [[\"leftgroup\", \"rightgroup\"], 0.888, 342],\n  undergroup: [[\"leftgroupunder\", \"rightgroupunder\"], 0.888, 342],\n  xmapsto: [[\"leftmapsto\", \"rightarrow\"], 1.5, 522],\n  xtofrom: [[\"leftToFrom\", \"rightToFrom\"], 1.75, 528],\n  // The next three arrows are from the mhchem package.\n  // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the\n  // document as \\xrightarrow or \\xrightleftharpoons. Those have\n  // min-length = 1.75em, so we set min-length on these next three to match.\n  xrightleftarrows: [[\"baraboveleftarrow\", \"rightarrowabovebar\"], 1.75, 901],\n  xrightequilibrium: [[\"baraboveshortleftharpoon\", \"rightharpoonaboveshortbar\"], 1.75, 716],\n  xleftequilibrium: [[\"shortbaraboveleftharpoon\", \"shortrightharpoonabovebar\"], 1.75, 716]\n};\n\nvar groupLength = function groupLength(arg) {\n  if (arg.type === \"ordgroup\") {\n    return arg.body.length;\n  } else {\n    return 1;\n  }\n};\n\nvar stretchy_svgSpan = function svgSpan(group, options) {\n  // Create a span with inline SVG for the element.\n  function buildSvgSpan_() {\n    var viewBoxWidth = 400000; // default\n\n    var label = group.label.substr(1);\n\n    if (utils.contains([\"widehat\", \"widecheck\", \"widetilde\", \"utilde\"], label)) {\n      // Each type in the `if` statement corresponds to one of the ParseNode\n      // types below. This narrowing is required to access `grp.base`.\n      var grp = group; // There are four SVG images available for each function.\n      // Choose a taller image when there are more characters.\n\n      var numChars = groupLength(grp.base);\n      var viewBoxHeight;\n      var pathName;\n\n      var _height;\n\n      if (numChars > 5) {\n        if (label === \"widehat\" || label === \"widecheck\") {\n          viewBoxHeight = 420;\n          viewBoxWidth = 2364;\n          _height = 0.42;\n          pathName = label + \"4\";\n        } else {\n          viewBoxHeight = 312;\n          viewBoxWidth = 2340;\n          _height = 0.34;\n          pathName = \"tilde4\";\n        }\n      } else {\n        var imgIndex = [1, 1, 2, 2, 3, 3][numChars];\n\n        if (label === \"widehat\" || label === \"widecheck\") {\n          viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex];\n          viewBoxHeight = [0, 239, 300, 360, 420][imgIndex];\n          _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex];\n          pathName = label + imgIndex;\n        } else {\n          viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex];\n          viewBoxHeight = [0, 260, 286, 306, 312][imgIndex];\n          _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex];\n          pathName = \"tilde\" + imgIndex;\n        }\n      }\n\n      var path = new domTree_PathNode(pathName);\n      var svgNode = new SvgNode([path], {\n        \"width\": \"100%\",\n        \"height\": _height + \"em\",\n        \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight,\n        \"preserveAspectRatio\": \"none\"\n      });\n      return {\n        span: buildCommon.makeSvgSpan([], [svgNode], options),\n        minWidth: 0,\n        height: _height\n      };\n    } else {\n      var spans = [];\n      var data = katexImagesData[label];\n      var paths = data[0],\n          _minWidth = data[1],\n          _viewBoxHeight = data[2];\n\n      var _height2 = _viewBoxHeight / 1000;\n\n      var numSvgChildren = paths.length;\n      var widthClasses;\n      var aligns;\n\n      if (numSvgChildren === 1) {\n        // $FlowFixMe: All these cases must be of the 4-tuple type.\n        var align1 = data[3];\n        widthClasses = [\"hide-tail\"];\n        aligns = [align1];\n      } else if (numSvgChildren === 2) {\n        widthClasses = [\"halfarrow-left\", \"halfarrow-right\"];\n        aligns = [\"xMinYMin\", \"xMaxYMin\"];\n      } else if (numSvgChildren === 3) {\n        widthClasses = [\"brace-left\", \"brace-center\", \"brace-right\"];\n        aligns = [\"xMinYMin\", \"xMidYMin\", \"xMaxYMin\"];\n      } else {\n        throw new Error(\"Correct katexImagesData or update code here to support\\n                    \" + numSvgChildren + \" children.\");\n      }\n\n      for (var i = 0; i < numSvgChildren; i++) {\n        var _path = new domTree_PathNode(paths[i]);\n\n        var _svgNode = new SvgNode([_path], {\n          \"width\": \"400em\",\n          \"height\": _height2 + \"em\",\n          \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + _viewBoxHeight,\n          \"preserveAspectRatio\": aligns[i] + \" slice\"\n        });\n\n        var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options);\n\n        if (numSvgChildren === 1) {\n          return {\n            span: _span,\n            minWidth: _minWidth,\n            height: _height2\n          };\n        } else {\n          _span.style.height = _height2 + \"em\";\n          spans.push(_span);\n        }\n      }\n\n      return {\n        span: buildCommon.makeSpan([\"stretchy\"], spans, options),\n        minWidth: _minWidth,\n        height: _height2\n      };\n    }\n  } // buildSvgSpan_()\n\n\n  var _buildSvgSpan_ = buildSvgSpan_(),\n      span = _buildSvgSpan_.span,\n      minWidth = _buildSvgSpan_.minWidth,\n      height = _buildSvgSpan_.height; // Note that we are returning span.depth = 0.\n  // Any adjustments relative to the baseline must be done in buildHTML.\n\n\n  span.height = height;\n  span.style.height = height + \"em\";\n\n  if (minWidth > 0) {\n    span.style.minWidth = minWidth + \"em\";\n  }\n\n  return span;\n};\n\nvar stretchy_encloseSpan = function encloseSpan(inner, label, pad, options) {\n  // Return an image span for \\cancel, \\bcancel, \\xcancel, or \\fbox\n  var img;\n  var totalHeight = inner.height + inner.depth + 2 * pad;\n\n  if (/fbox|color/.test(label)) {\n    img = buildCommon.makeSpan([\"stretchy\", label], [], options);\n\n    if (label === \"fbox\") {\n      var color = options.color && options.getColor();\n\n      if (color) {\n        img.style.borderColor = color;\n      }\n    }\n  } else {\n    // \\cancel, \\bcancel, or \\xcancel\n    // Since \\cancel's SVG is inline and it omits the viewBox attribute,\n    // its stroke-width will not vary with span area.\n    var lines = [];\n\n    if (/^[bx]cancel$/.test(label)) {\n      lines.push(new LineNode({\n        \"x1\": \"0\",\n        \"y1\": \"0\",\n        \"x2\": \"100%\",\n        \"y2\": \"100%\",\n        \"stroke-width\": \"0.046em\"\n      }));\n    }\n\n    if (/^x?cancel$/.test(label)) {\n      lines.push(new LineNode({\n        \"x1\": \"0\",\n        \"y1\": \"100%\",\n        \"x2\": \"100%\",\n        \"y2\": \"0\",\n        \"stroke-width\": \"0.046em\"\n      }));\n    }\n\n    var svgNode = new SvgNode(lines, {\n      \"width\": \"100%\",\n      \"height\": totalHeight + \"em\"\n    });\n    img = buildCommon.makeSvgSpan([], [svgNode], options);\n  }\n\n  img.height = totalHeight;\n  img.style.height = totalHeight + \"em\";\n  return img;\n};\n\n/* harmony default export */ var stretchy = ({\n  encloseSpan: stretchy_encloseSpan,\n  mathMLnode: stretchy_mathMLnode,\n  svgSpan: stretchy_svgSpan\n});\n// CONCATENATED MODULE: ./src/functions/accent.js\n\n\n\n\n\n\n\n\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"accent\", but\nvar accent_htmlBuilder = function htmlBuilder(grp, options) {\n  // Accents are handled in the TeXbook pg. 443, rule 12.\n  var base;\n  var group;\n  var supSub = checkNodeType(grp, \"supsub\");\n  var supSubGroup;\n\n  if (supSub) {\n    // If our base is a character box, and we have superscripts and\n    // subscripts, the supsub will defer to us. In particular, we want\n    // to attach the superscripts and subscripts to the inner body (so\n    // that the position of the superscripts and subscripts won't be\n    // affected by the height of the accent). We accomplish this by\n    // sticking the base of the accent into the base of the supsub, and\n    // rendering that, while keeping track of where the accent is.\n    // The real accent group is the base of the supsub group\n    group = assertNodeType(supSub.base, \"accent\"); // The character box is the base of the accent group\n\n    base = group.base; // Stick the character box into the base of the supsub group\n\n    supSub.base = base; // Rerender the supsub group with its new base, and store that\n    // result.\n\n    supSubGroup = assertSpan(buildHTML_buildGroup(supSub, options)); // reset original base\n\n    supSub.base = group;\n  } else {\n    group = assertNodeType(grp, \"accent\");\n    base = group.base;\n  } // Build the base group\n\n\n  var body = buildHTML_buildGroup(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character?\n\n  var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line \"If the\n  // nucleus is not a single character, let s = 0; otherwise set s to the\n  // kern amount for the nucleus followed by the \\skewchar of its font.\"\n  // Note that our skew metrics are just the kern between each character\n  // and the skewchar.\n\n  var skew = 0;\n\n  if (mustShift) {\n    // If the base is a character box, then we want the skew of the\n    // innermost character. To do that, we find the innermost character:\n    var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it\n\n    var baseGroup = buildHTML_buildGroup(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol.\n\n    skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we\n    // removed with getBaseElem might contain things like \\color which\n    // we can't get rid of.\n    // TODO(emily): Find a better way to get the skew\n  } // calculate the amount of space between the body and the accent\n\n\n  var clearance = Math.min(body.height, options.fontMetrics().xHeight); // Build the accent\n\n  var accentBody;\n\n  if (!group.isStretchy) {\n    var accent;\n    var width;\n\n    if (group.label === \"\\\\vec\") {\n      // Before version 0.9, \\vec used the combining font glyph U+20D7.\n      // But browsers, especially Safari, are not consistent in how they\n      // render combining characters when not preceded by a character.\n      // So now we use an SVG.\n      // If Safari reforms, we should consider reverting to the glyph.\n      accent = buildCommon.staticSvg(\"vec\", options);\n      width = buildCommon.svgData.vec[1];\n    } else {\n      accent = buildCommon.makeSymbol(group.label, \"Main-Regular\", group.mode, options); // Remove the italic correction of the accent, because it only serves to\n      // shift the accent over to a place we don't want.\n\n      accent.italic = 0;\n      width = accent.width;\n    }\n\n    accentBody = buildCommon.makeSpan([\"accent-body\"], [accent]); // \"Full\" accents expand the width of the resulting symbol to be\n    // at least the width of the accent, and overlap directly onto the\n    // character without any vertical offset.\n\n    var accentFull = group.label === \"\\\\textcircled\";\n\n    if (accentFull) {\n      accentBody.classes.push('accent-full');\n      clearance = body.height;\n    } // Shift the accent over by the skew.\n\n\n    var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }`\n    // so that the accent doesn't contribute to the bounding box.\n    // We need to shift the character by its width (effectively half\n    // its width) to compensate.\n\n    if (!accentFull) {\n      left -= width / 2;\n    }\n\n    accentBody.style.left = left + \"em\"; // \\textcircled uses the \\bigcirc glyph, so it needs some\n    // vertical adjustment to match LaTeX.\n\n    if (group.label === \"\\\\textcircled\") {\n      accentBody.style.top = \".2em\";\n    }\n\n    accentBody = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: body\n      }, {\n        type: \"kern\",\n        size: -clearance\n      }, {\n        type: \"elem\",\n        elem: accentBody\n      }]\n    }, options);\n  } else {\n    accentBody = stretchy.svgSpan(group, options);\n    accentBody = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: body\n      }, {\n        type: \"elem\",\n        elem: accentBody,\n        wrapperClasses: [\"svg-align\"],\n        wrapperStyle: skew > 0 ? {\n          width: \"calc(100% - \" + 2 * skew + \"em)\",\n          marginLeft: 2 * skew + \"em\"\n        } : undefined\n      }]\n    }, options);\n  }\n\n  var accentWrap = buildCommon.makeSpan([\"mord\", \"accent\"], [accentBody], options);\n\n  if (supSubGroup) {\n    // Here, we replace the \"base\" child of the supsub with our newly\n    // generated accent.\n    supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the\n    // accent, we manually recalculate height.\n\n    supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not.\n\n    supSubGroup.classes[0] = \"mord\";\n    return supSubGroup;\n  } else {\n    return accentWrap;\n  }\n};\n\nvar accent_mathmlBuilder = function mathmlBuilder(group, options) {\n  var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode(\"mo\", [buildMathML_makeText(group.label, group.mode)]);\n  var node = new mathMLTree.MathNode(\"mover\", [buildMathML_buildGroup(group.base, options), accentNode]);\n  node.setAttribute(\"accent\", \"true\");\n  return node;\n};\n\nvar NON_STRETCHY_ACCENT_REGEX = new RegExp([\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\"].map(function (accent) {\n  return \"\\\\\" + accent;\n}).join(\"|\")); // Accents\n\ndefineFunction({\n  type: \"accent\",\n  names: [\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\", \"\\\\widecheck\", \"\\\\widehat\", \"\\\\widetilde\", \"\\\\overrightarrow\", \"\\\\overleftarrow\", \"\\\\Overrightarrow\", \"\\\\overleftrightarrow\", \"\\\\overgroup\", \"\\\\overlinesegment\", \"\\\\overleftharpoon\", \"\\\\overrightharpoon\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    var base = args[0];\n    var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName);\n    var isShifty = !isStretchy || context.funcName === \"\\\\widehat\" || context.funcName === \"\\\\widetilde\" || context.funcName === \"\\\\widecheck\";\n    return {\n      type: \"accent\",\n      mode: context.parser.mode,\n      label: context.funcName,\n      isStretchy: isStretchy,\n      isShifty: isShifty,\n      base: base\n    };\n  },\n  htmlBuilder: accent_htmlBuilder,\n  mathmlBuilder: accent_mathmlBuilder\n}); // Text-mode accents\n\ndefineFunction({\n  type: \"accent\",\n  names: [\"\\\\'\", \"\\\\`\", \"\\\\^\", \"\\\\~\", \"\\\\=\", \"\\\\u\", \"\\\\.\", '\\\\\"', \"\\\\r\", \"\\\\H\", \"\\\\v\", \"\\\\textcircled\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true,\n    allowedInMath: false\n  },\n  handler: function handler(context, args) {\n    var base = args[0];\n    return {\n      type: \"accent\",\n      mode: context.parser.mode,\n      label: context.funcName,\n      isStretchy: false,\n      isShifty: true,\n      base: base\n    };\n  },\n  htmlBuilder: accent_htmlBuilder,\n  mathmlBuilder: accent_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/accentunder.js\n// Horizontal overlap functions\n\n\n\n\n\n\ndefineFunction({\n  type: \"accentUnder\",\n  names: [\"\\\\underleftarrow\", \"\\\\underrightarrow\", \"\\\\underleftrightarrow\", \"\\\\undergroup\", \"\\\\underlinesegment\", \"\\\\utilde\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var base = args[0];\n    return {\n      type: \"accentUnder\",\n      mode: parser.mode,\n      label: funcName,\n      base: base\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Treat under accents much like underlines.\n    var innerGroup = buildHTML_buildGroup(group.base, options);\n    var accentBody = stretchy.svgSpan(group, options);\n    var kern = group.label === \"\\\\utilde\" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns\n\n    var vlist = buildCommon.makeVList({\n      positionType: \"bottom\",\n      positionData: accentBody.height + kern,\n      children: [{\n        type: \"elem\",\n        elem: accentBody,\n        wrapperClasses: [\"svg-align\"]\n      }, {\n        type: \"kern\",\n        size: kern\n      }, {\n        type: \"elem\",\n        elem: innerGroup\n      }]\n    }, options);\n    return buildCommon.makeSpan([\"mord\", \"accentunder\"], [vlist], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var accentNode = stretchy.mathMLnode(group.label);\n    var node = new mathMLTree.MathNode(\"munder\", [buildMathML_buildGroup(group.base, options), accentNode]);\n    node.setAttribute(\"accentunder\", \"true\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/arrow.js\n\n\n\n\n\n\n\n// Helper function\nvar arrow_paddedNode = function paddedNode(group) {\n  var node = new mathMLTree.MathNode(\"mpadded\", group ? [group] : []);\n  node.setAttribute(\"width\", \"+0.6em\");\n  node.setAttribute(\"lspace\", \"0.3em\");\n  return node;\n}; // Stretchy arrows with an optional argument\n\n\ndefineFunction({\n  type: \"xArrow\",\n  names: [\"\\\\xleftarrow\", \"\\\\xrightarrow\", \"\\\\xLeftarrow\", \"\\\\xRightarrow\", \"\\\\xleftrightarrow\", \"\\\\xLeftrightarrow\", \"\\\\xhookleftarrow\", \"\\\\xhookrightarrow\", \"\\\\xmapsto\", \"\\\\xrightharpoondown\", \"\\\\xrightharpoonup\", \"\\\\xleftharpoondown\", \"\\\\xleftharpoonup\", \"\\\\xrightleftharpoons\", \"\\\\xleftrightharpoons\", \"\\\\xlongequal\", \"\\\\xtwoheadrightarrow\", \"\\\\xtwoheadleftarrow\", \"\\\\xtofrom\", // The next 3 functions are here to support the mhchem extension.\n  // Direct use of these functions is discouraged and may break someday.\n  \"\\\\xrightleftarrows\", \"\\\\xrightequilibrium\", \"\\\\xleftequilibrium\"],\n  props: {\n    numArgs: 1,\n    numOptionalArgs: 1\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    return {\n      type: \"xArrow\",\n      mode: parser.mode,\n      label: funcName,\n      body: args[0],\n      below: optArgs[0]\n    };\n  },\n  // Flow is unable to correctly infer the type of `group`, even though it's\n  // unamibiguously determined from the passed-in `type` above.\n  htmlBuilder: function htmlBuilder(group, options) {\n    var style = options.style; // Build the argument groups in the appropriate style.\n    // Ref: amsmath.dtx:   \\hbox{$\\scriptstyle\\mkern#3mu{#6}\\mkern#4mu$}%\n    // Some groups can return document fragments.  Handle those by wrapping\n    // them in a span.\n\n    var newOptions = options.havingStyle(style.sup());\n    var upperGroup = buildCommon.wrapFragment(buildHTML_buildGroup(group.body, newOptions, options), options);\n    upperGroup.classes.push(\"x-arrow-pad\");\n    var lowerGroup;\n\n    if (group.below) {\n      // Build the lower group\n      newOptions = options.havingStyle(style.sub());\n      lowerGroup = buildCommon.wrapFragment(buildHTML_buildGroup(group.below, newOptions, options), options);\n      lowerGroup.classes.push(\"x-arrow-pad\");\n    }\n\n    var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0.\n    // The point we want on the math axis is at 0.5 * arrowBody.height.\n\n    var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\\if0#2\\else\\mkern#2mu\\fi\n\n    var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu\n\n    if (upperGroup.depth > 0.25 || group.label === \"\\\\xleftequilibrium\") {\n      upperShift -= upperGroup.depth; // shift up if depth encroaches\n    } // Generate the vlist\n\n\n    var vlist;\n\n    if (lowerGroup) {\n      var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111;\n      vlist = buildCommon.makeVList({\n        positionType: \"individualShift\",\n        children: [{\n          type: \"elem\",\n          elem: upperGroup,\n          shift: upperShift\n        }, {\n          type: \"elem\",\n          elem: arrowBody,\n          shift: arrowShift\n        }, {\n          type: \"elem\",\n          elem: lowerGroup,\n          shift: lowerShift\n        }]\n      }, options);\n    } else {\n      vlist = buildCommon.makeVList({\n        positionType: \"individualShift\",\n        children: [{\n          type: \"elem\",\n          elem: upperGroup,\n          shift: upperShift\n        }, {\n          type: \"elem\",\n          elem: arrowBody,\n          shift: arrowShift\n        }]\n      }, options);\n    } // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n\n    vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n    return buildCommon.makeSpan([\"mrel\", \"x-arrow\"], [vlist], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var arrowNode = stretchy.mathMLnode(group.label);\n    var node;\n\n    if (group.body) {\n      var upperNode = arrow_paddedNode(buildMathML_buildGroup(group.body, options));\n\n      if (group.below) {\n        var lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));\n        node = new mathMLTree.MathNode(\"munderover\", [arrowNode, lowerNode, upperNode]);\n      } else {\n        node = new mathMLTree.MathNode(\"mover\", [arrowNode, upperNode]);\n      }\n    } else if (group.below) {\n      var _lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));\n\n      node = new mathMLTree.MathNode(\"munder\", [arrowNode, _lowerNode]);\n    } else {\n      // This should never happen.\n      // Parser.js throws an error if there is no argument.\n      node = arrow_paddedNode();\n      node = new mathMLTree.MathNode(\"mover\", [arrowNode, node]);\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/char.js\n\n\n // \\@char is an internal function that takes a grouped decimal argument like\n// {123} and converts into symbol with code 123.  It is used by the *macro*\n// \\char defined in macros.js.\n\ndefineFunction({\n  type: \"textord\",\n  names: [\"\\\\@char\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var arg = assertNodeType(args[0], \"ordgroup\");\n    var group = arg.body;\n    var number = \"\";\n\n    for (var i = 0; i < group.length; i++) {\n      var node = assertNodeType(group[i], \"textord\");\n      number += node.text;\n    }\n\n    var code = parseInt(number);\n\n    if (isNaN(code)) {\n      throw new src_ParseError(\"\\\\@char has non-numeric argument \" + number);\n    }\n\n    return {\n      type: \"textord\",\n      mode: parser.mode,\n      text: String.fromCharCode(code)\n    };\n  }\n});\n// CONCATENATED MODULE: ./src/functions/color.js\n\n\n\n\n\n\n\nvar color_htmlBuilder = function htmlBuilder(group, options) {\n  var elements = buildHTML_buildExpression(group.body, options.withColor(group.color), false); // \\color isn't supposed to affect the type of the elements it contains.\n  // To accomplish this, we wrap the results in a fragment, so the inner\n  // elements will be able to directly interact with their neighbors. For\n  // example, `\\color{red}{2 +} 3` has the same spacing as `2 + 3`\n\n  return buildCommon.makeFragment(elements);\n};\n\nvar color_mathmlBuilder = function mathmlBuilder(group, options) {\n  var inner = buildMathML_buildExpression(group.body, options.withColor(group.color));\n  var node = new mathMLTree.MathNode(\"mstyle\", inner);\n  node.setAttribute(\"mathcolor\", group.color);\n  return node;\n};\n\ndefineFunction({\n  type: \"color\",\n  names: [\"\\\\textcolor\"],\n  props: {\n    numArgs: 2,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\", \"original\"]\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var color = assertNodeType(args[0], \"color-token\").color;\n    var body = args[1];\n    return {\n      type: \"color\",\n      mode: parser.mode,\n      color: color,\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: color_htmlBuilder,\n  mathmlBuilder: color_mathmlBuilder\n});\ndefineFunction({\n  type: \"color\",\n  names: [\"\\\\color\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\"]\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser,\n        breakOnTokenText = _ref2.breakOnTokenText;\n    var color = assertNodeType(args[0], \"color-token\").color; // If we see a styling function, parse out the implicit body\n\n    var body = parser.parseExpression(true, breakOnTokenText);\n    return {\n      type: \"color\",\n      mode: parser.mode,\n      color: color,\n      body: body\n    };\n  },\n  htmlBuilder: color_htmlBuilder,\n  mathmlBuilder: color_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/cr.js\n// Row breaks within tabular environments, and line breaks at top level\n\n\n\n\n\n // \\\\ is a macro mapping to either \\cr or \\newline.  Because they have the\n// same signature, we implement them as one megafunction, with newRow\n// indicating whether we're in the \\cr case, and newLine indicating whether\n// to break the line in the \\newline case.\n\ndefineFunction({\n  type: \"cr\",\n  names: [\"\\\\cr\", \"\\\\newline\"],\n  props: {\n    numArgs: 0,\n    numOptionalArgs: 1,\n    argTypes: [\"size\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var size = optArgs[0];\n    var newRow = funcName === \"\\\\cr\";\n    var newLine = false;\n\n    if (!newRow) {\n      if (parser.settings.displayMode && parser.settings.useStrictBehavior(\"newLineInDisplayMode\", \"In LaTeX, \\\\\\\\ or \\\\newline \" + \"does nothing in display mode\")) {\n        newLine = false;\n      } else {\n        newLine = true;\n      }\n    }\n\n    return {\n      type: \"cr\",\n      mode: parser.mode,\n      newLine: newLine,\n      newRow: newRow,\n      size: size && assertNodeType(size, \"size\").value\n    };\n  },\n  // The following builders are called only at the top level,\n  // not within tabular/array environments.\n  htmlBuilder: function htmlBuilder(group, options) {\n    if (group.newRow) {\n      throw new src_ParseError(\"\\\\cr valid only within a tabular/array environment\");\n    }\n\n    var span = buildCommon.makeSpan([\"mspace\"], [], options);\n\n    if (group.newLine) {\n      span.classes.push(\"newline\");\n\n      if (group.size) {\n        span.style.marginTop = units_calculateSize(group.size, options) + \"em\";\n      }\n    }\n\n    return span;\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node = new mathMLTree.MathNode(\"mspace\");\n\n    if (group.newLine) {\n      node.setAttribute(\"linebreak\", \"newline\");\n\n      if (group.size) {\n        node.setAttribute(\"height\", units_calculateSize(group.size, options) + \"em\");\n      }\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/delimiter.js\n/**\n * This file deals with creating delimiters of various sizes. The TeXbook\n * discusses these routines on page 441-442, in the \"Another subroutine sets box\n * x to a specified variable delimiter\" paragraph.\n *\n * There are three main routines here. `makeSmallDelim` makes a delimiter in the\n * normal font, but in either text, script, or scriptscript style.\n * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,\n * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of\n * smaller pieces that are stacked on top of one another.\n *\n * The functions take a parameter `center`, which determines if the delimiter\n * should be centered around the axis.\n *\n * Then, there are three exposed functions. `sizedDelim` makes a delimiter in\n * one of the given sizes. This is used for things like `\\bigl`.\n * `customSizedDelim` makes a delimiter with a given total height+depth. It is\n * called in places like `\\sqrt`. `leftRightDelim` makes an appropriate\n * delimiter which surrounds an expression of a given height an depth. It is\n * used in `\\left` and `\\right`.\n */\n\n\n\n\n\n\n\n\n/**\n * Get the metrics for a given symbol and font, after transformation (i.e.\n * after following replacement from symbols.js)\n */\nvar delimiter_getMetrics = function getMetrics(symbol, font, mode) {\n  var replace = src_symbols.math[symbol] && src_symbols.math[symbol].replace;\n  var metrics = getCharacterMetrics(replace || symbol, font, mode);\n\n  if (!metrics) {\n    throw new Error(\"Unsupported symbol \" + symbol + \" and font size \" + font + \".\");\n  }\n\n  return metrics;\n};\n/**\n * Puts a delimiter span in a given style, and adds appropriate height, depth,\n * and maxFontSizes.\n */\n\n\nvar delimiter_styleWrap = function styleWrap(delim, toStyle, options, classes) {\n  var newOptions = options.havingBaseStyle(toStyle);\n  var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options);\n  var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;\n  span.height *= delimSizeMultiplier;\n  span.depth *= delimSizeMultiplier;\n  span.maxFontSize = newOptions.sizeMultiplier;\n  return span;\n};\n\nvar centerSpan = function centerSpan(span, options, style) {\n  var newOptions = options.havingBaseStyle(style);\n  var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;\n  span.classes.push(\"delimcenter\");\n  span.style.top = shift + \"em\";\n  span.height -= shift;\n  span.depth += shift;\n};\n/**\n * Makes a small delimiter. This is a delimiter that comes in the Main-Regular\n * font, but is restyled to either be in textstyle, scriptstyle, or\n * scriptscriptstyle.\n */\n\n\nvar delimiter_makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) {\n  var text = buildCommon.makeSymbol(delim, \"Main-Regular\", mode, options);\n  var span = delimiter_styleWrap(text, style, options, classes);\n\n  if (center) {\n    centerSpan(span, options, style);\n  }\n\n  return span;\n};\n/**\n * Builds a symbol in the given font size (note size is an integer)\n */\n\n\nvar delimiter_mathrmSize = function mathrmSize(value, size, mode, options) {\n  return buildCommon.makeSymbol(value, \"Size\" + size + \"-Regular\", mode, options);\n};\n/**\n * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,\n * Size3, or Size4 fonts. It is always rendered in textstyle.\n */\n\n\nvar delimiter_makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) {\n  var inner = delimiter_mathrmSize(delim, size, mode, options);\n  var span = delimiter_styleWrap(buildCommon.makeSpan([\"delimsizing\", \"size\" + size], [inner], options), src_Style.TEXT, options, classes);\n\n  if (center) {\n    centerSpan(span, options, src_Style.TEXT);\n  }\n\n  return span;\n};\n/**\n * Make an inner span with the given offset and in the given font. This is used\n * in `makeStackedDelim` to make the stacking pieces for the delimiter.\n */\n\n\nvar delimiter_makeInner = function makeInner(symbol, font, mode) {\n  var sizeClass; // Apply the correct CSS class to choose the right font.\n\n  if (font === \"Size1-Regular\") {\n    sizeClass = \"delim-size1\";\n  } else\n    /* if (font === \"Size4-Regular\") */\n    {\n      sizeClass = \"delim-size4\";\n    }\n\n  var inner = buildCommon.makeSpan([\"delimsizinginner\", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element\n  // in the appropriate tag that VList uses.\n\n  return {\n    type: \"elem\",\n    elem: inner\n  };\n};\n/**\n * Make a stacked delimiter out of a given delimiter, with the total height at\n * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.\n */\n\n\nvar delimiter_makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) {\n  // There are four parts, the top, an optional middle, a repeated part, and a\n  // bottom.\n  var top;\n  var middle;\n  var repeat;\n  var bottom;\n  top = repeat = bottom = delim;\n  middle = null; // Also keep track of what font the delimiters are in\n\n  var font = \"Size1-Regular\"; // We set the parts and font based on the symbol. Note that we use\n  // '\\u23d0' instead of '|' and '\\u2016' instead of '\\\\|' for the\n  // repeats of the arrows\n\n  if (delim === \"\\\\uparrow\") {\n    repeat = bottom = \"\\u23D0\";\n  } else if (delim === \"\\\\Uparrow\") {\n    repeat = bottom = \"\\u2016\";\n  } else if (delim === \"\\\\downarrow\") {\n    top = repeat = \"\\u23D0\";\n  } else if (delim === \"\\\\Downarrow\") {\n    top = repeat = \"\\u2016\";\n  } else if (delim === \"\\\\updownarrow\") {\n    top = \"\\\\uparrow\";\n    repeat = \"\\u23D0\";\n    bottom = \"\\\\downarrow\";\n  } else if (delim === \"\\\\Updownarrow\") {\n    top = \"\\\\Uparrow\";\n    repeat = \"\\u2016\";\n    bottom = \"\\\\Downarrow\";\n  } else if (delim === \"[\" || delim === \"\\\\lbrack\") {\n    top = \"\\u23A1\";\n    repeat = \"\\u23A2\";\n    bottom = \"\\u23A3\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"]\" || delim === \"\\\\rbrack\") {\n    top = \"\\u23A4\";\n    repeat = \"\\u23A5\";\n    bottom = \"\\u23A6\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\lfloor\" || delim === \"\\u230A\") {\n    repeat = top = \"\\u23A2\";\n    bottom = \"\\u23A3\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\lceil\" || delim === \"\\u2308\") {\n    top = \"\\u23A1\";\n    repeat = bottom = \"\\u23A2\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\rfloor\" || delim === \"\\u230B\") {\n    repeat = top = \"\\u23A5\";\n    bottom = \"\\u23A6\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\rceil\" || delim === \"\\u2309\") {\n    top = \"\\u23A4\";\n    repeat = bottom = \"\\u23A5\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"(\" || delim === \"\\\\lparen\") {\n    top = \"\\u239B\";\n    repeat = \"\\u239C\";\n    bottom = \"\\u239D\";\n    font = \"Size4-Regular\";\n  } else if (delim === \")\" || delim === \"\\\\rparen\") {\n    top = \"\\u239E\";\n    repeat = \"\\u239F\";\n    bottom = \"\\u23A0\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\{\" || delim === \"\\\\lbrace\") {\n    top = \"\\u23A7\";\n    middle = \"\\u23A8\";\n    bottom = \"\\u23A9\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\}\" || delim === \"\\\\rbrace\") {\n    top = \"\\u23AB\";\n    middle = \"\\u23AC\";\n    bottom = \"\\u23AD\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\lgroup\" || delim === \"\\u27EE\") {\n    top = \"\\u23A7\";\n    bottom = \"\\u23A9\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\rgroup\" || delim === \"\\u27EF\") {\n    top = \"\\u23AB\";\n    bottom = \"\\u23AD\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\lmoustache\" || delim === \"\\u23B0\") {\n    top = \"\\u23A7\";\n    bottom = \"\\u23AD\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } else if (delim === \"\\\\rmoustache\" || delim === \"\\u23B1\") {\n    top = \"\\u23AB\";\n    bottom = \"\\u23A9\";\n    repeat = \"\\u23AA\";\n    font = \"Size4-Regular\";\n  } // Get the metrics of the four sections\n\n\n  var topMetrics = delimiter_getMetrics(top, font, mode);\n  var topHeightTotal = topMetrics.height + topMetrics.depth;\n  var repeatMetrics = delimiter_getMetrics(repeat, font, mode);\n  var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;\n  var bottomMetrics = delimiter_getMetrics(bottom, font, mode);\n  var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;\n  var middleHeightTotal = 0;\n  var middleFactor = 1;\n\n  if (middle !== null) {\n    var middleMetrics = delimiter_getMetrics(middle, font, mode);\n    middleHeightTotal = middleMetrics.height + middleMetrics.depth;\n    middleFactor = 2; // repeat symmetrically above and below middle\n  } // Calcuate the minimal height that the delimiter can have.\n  // It is at least the size of the top, bottom, and optional middle combined.\n\n\n  var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need\n\n  var repeatCount = Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal)); // Compute the total height of the delimiter including all the symbols\n\n  var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note\n  // that in this context, \"center\" means that the delimiter should be\n  // centered around the axis in the current style, while normally it is\n  // centered around the axis in textstyle.\n\n  var axisHeight = options.fontMetrics().axisHeight;\n\n  if (center) {\n    axisHeight *= options.sizeMultiplier;\n  } // Calculate the depth\n\n\n  var depth = realHeightTotal / 2 - axisHeight; // Now, we start building the pieces that will go into the vlist\n  // Keep a list of the inner pieces\n\n  var inners = []; // Add the bottom symbol\n\n  inners.push(delimiter_makeInner(bottom, font, mode));\n\n  if (middle === null) {\n    // Add that many symbols\n    for (var i = 0; i < repeatCount; i++) {\n      inners.push(delimiter_makeInner(repeat, font, mode));\n    }\n  } else {\n    // When there is a middle bit, we need the middle part and two repeated\n    // sections\n    for (var _i = 0; _i < repeatCount; _i++) {\n      inners.push(delimiter_makeInner(repeat, font, mode));\n    }\n\n    inners.push(delimiter_makeInner(middle, font, mode));\n\n    for (var _i2 = 0; _i2 < repeatCount; _i2++) {\n      inners.push(delimiter_makeInner(repeat, font, mode));\n    }\n  } // Add the top symbol\n\n\n  inners.push(delimiter_makeInner(top, font, mode)); // Finally, build the vlist\n\n  var newOptions = options.havingBaseStyle(src_Style.TEXT);\n  var inner = buildCommon.makeVList({\n    positionType: \"bottom\",\n    positionData: depth,\n    children: inners\n  }, newOptions);\n  return delimiter_styleWrap(buildCommon.makeSpan([\"delimsizing\", \"mult\"], [inner], newOptions), src_Style.TEXT, options, classes);\n}; // All surds have 0.08em padding above the viniculum inside the SVG.\n// That keeps browser span height rounding error from pinching the line.\n\n\nvar vbPad = 80; // padding above the surd, measured inside the viewBox.\n\nvar emPad = 0.08; // padding, in ems, measured in the document.\n\nvar delimiter_sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, options) {\n  var alternate;\n\n  if (sqrtName === \"sqrtTall\") {\n    // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular\n    // One path edge has a variable length. It runs from the viniculumn\n    // to a point near (14 units) the bottom of the surd. The viniculum\n    // is 40 units thick. So the length of the line in question is:\n    var vertSegment = viewBoxHeight - 54 - vbPad;\n    alternate = \"M702 \" + vbPad + \"H400000v40H742v\" + vertSegment + \"l-4 4-4 4c-.667.7\\n-2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1h-12l-28-84c-16.667-52-96.667\\n-294.333-240-727l-212 -643 -85 170c-4-3.333-8.333-7.667-13 -13l-13-13l77-155\\n 77-156c66 199.333 139 419.667 219 661 l218 661zM702 \" + vbPad + \"H400000v40H742z\";\n  }\n\n  var pathNode = new domTree_PathNode(sqrtName, alternate);\n  var svg = new SvgNode([pathNode], {\n    // Note: 1000:1 ratio of viewBox to document em width.\n    \"width\": \"400em\",\n    \"height\": height + \"em\",\n    \"viewBox\": \"0 0 400000 \" + viewBoxHeight,\n    \"preserveAspectRatio\": \"xMinYMin slice\"\n  });\n  return buildCommon.makeSvgSpan([\"hide-tail\"], [svg], options);\n};\n/**\n * Make a sqrt image of the given height,\n */\n\n\nvar makeSqrtImage = function makeSqrtImage(height, options) {\n  // Define a newOptions that removes the effect of size changes such as \\Huge.\n  // We don't pick different a height surd for \\Huge. For it, we scale up.\n  var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds.\n\n  var delim = traverseSequence(\"\\\\surd\", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions);\n  var sizeMultiplier = newOptions.sizeMultiplier; // default\n  // Create a span containing an SVG image of a sqrt symbol.\n\n  var span;\n  var spanHeight = 0;\n  var texHeight = 0;\n  var viewBoxHeight = 0;\n  var advanceWidth; // We create viewBoxes with 80 units of \"padding\" above each surd.\n  // Then browser rounding error on the parent span height will not\n  // encroach on the ink of the viniculum. But that padding is not\n  // included in the TeX-like `height` used for calculation of\n  // vertical alignment. So texHeight = span.height < span.style.height.\n\n  if (delim.type === \"small\") {\n    // Get an SVG that is derived from glyph U+221A in font KaTeX-Main.\n    viewBoxHeight = 1000 + vbPad; // 1000 unit glyph height.\n\n    if (height < 1.0) {\n      sizeMultiplier = 1.0; // mimic a \\textfont radical\n    } else if (height < 1.4) {\n      sizeMultiplier = 0.7; // mimic a \\scriptfont radical\n    }\n\n    spanHeight = (1.0 + emPad) / sizeMultiplier;\n    texHeight = 1.00 / sizeMultiplier;\n    span = delimiter_sqrtSvg(\"sqrtMain\", spanHeight, viewBoxHeight, options);\n    span.style.minWidth = \"0.853em\";\n    advanceWidth = 0.833 / sizeMultiplier; // from the font.\n  } else if (delim.type === \"large\") {\n    // These SVGs come from fonts: KaTeX_Size1, _Size2, etc.\n    viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size];\n    texHeight = sizeToMaxHeight[delim.size] / sizeMultiplier;\n    spanHeight = (sizeToMaxHeight[delim.size] + emPad) / sizeMultiplier;\n    span = delimiter_sqrtSvg(\"sqrtSize\" + delim.size, spanHeight, viewBoxHeight, options);\n    span.style.minWidth = \"1.02em\";\n    advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font.\n  } else {\n    // Tall sqrt. In TeX, this would be stacked using multiple glyphs.\n    // We'll use a single SVG to accomplish the same thing.\n    spanHeight = height + emPad;\n    texHeight = height;\n    viewBoxHeight = Math.floor(1000 * height) + vbPad;\n    span = delimiter_sqrtSvg(\"sqrtTall\", spanHeight, viewBoxHeight, options);\n    span.style.minWidth = \"0.742em\";\n    advanceWidth = 1.056;\n  }\n\n  span.height = texHeight;\n  span.style.height = spanHeight + \"em\";\n  return {\n    span: span,\n    advanceWidth: advanceWidth,\n    // Calculate the actual line width.\n    // This actually should depend on the chosen font -- e.g. \\boldmath\n    // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and\n    // have thicker rules.\n    ruleWidth: options.fontMetrics().sqrtRuleThickness * sizeMultiplier\n  };\n}; // There are three kinds of delimiters, delimiters that stack when they become\n// too large\n\n\nvar stackLargeDelimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230A\", \"\\u230B\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"\\\\surd\"]; // delimiters that always stack\n\nvar stackAlwaysDelimiters = [\"\\\\uparrow\", \"\\\\downarrow\", \"\\\\updownarrow\", \"\\\\Uparrow\", \"\\\\Downarrow\", \"\\\\Updownarrow\", \"|\", \"\\\\|\", \"\\\\vert\", \"\\\\Vert\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27EE\", \"\\u27EF\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23B0\", \"\\u23B1\"]; // and delimiters that never stack\n\nvar stackNeverDelimiters = [\"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"/\", \"\\\\backslash\", \"\\\\lt\", \"\\\\gt\"]; // Metrics of the different sizes. Found by looking at TeX's output of\n// $\\bigl| // \\Bigl| \\biggl| \\Biggl| \\showlists$\n// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.\n\nvar sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];\n/**\n * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.\n */\n\nvar delimiter_makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) {\n  // < and > turn into \\langle and \\rangle in delimiters\n  if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27E8\") {\n    delim = \"\\\\langle\";\n  } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27E9\") {\n    delim = \"\\\\rangle\";\n  } // Sized delimiters are never centered.\n\n\n  if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) {\n    return delimiter_makeLargeDelim(delim, size, false, options, mode, classes);\n  } else if (utils.contains(stackAlwaysDelimiters, delim)) {\n    return delimiter_makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);\n  } else {\n    throw new src_ParseError(\"Illegal delimiter: '\" + delim + \"'\");\n  }\n};\n/**\n * There are three different sequences of delimiter sizes that the delimiters\n * follow depending on the kind of delimiter. This is used when creating custom\n * sized delimiters to decide whether to create a small, large, or stacked\n * delimiter.\n *\n * In real TeX, these sequences aren't explicitly defined, but are instead\n * defined inside the font metrics. Since there are only three sequences that\n * are possible for the delimiters that TeX defines, it is easier to just encode\n * them explicitly here.\n */\n\n\n// Delimiters that never stack try small delimiters and large delimiters only\nvar stackNeverDelimiterSequence = [{\n  type: \"small\",\n  style: src_Style.SCRIPTSCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.SCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.TEXT\n}, {\n  type: \"large\",\n  size: 1\n}, {\n  type: \"large\",\n  size: 2\n}, {\n  type: \"large\",\n  size: 3\n}, {\n  type: \"large\",\n  size: 4\n}]; // Delimiters that always stack try the small delimiters first, then stack\n\nvar stackAlwaysDelimiterSequence = [{\n  type: \"small\",\n  style: src_Style.SCRIPTSCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.SCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.TEXT\n}, {\n  type: \"stack\"\n}]; // Delimiters that stack when large try the small and then large delimiters, and\n// stack afterwards\n\nvar stackLargeDelimiterSequence = [{\n  type: \"small\",\n  style: src_Style.SCRIPTSCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.SCRIPT\n}, {\n  type: \"small\",\n  style: src_Style.TEXT\n}, {\n  type: \"large\",\n  size: 1\n}, {\n  type: \"large\",\n  size: 2\n}, {\n  type: \"large\",\n  size: 3\n}, {\n  type: \"large\",\n  size: 4\n}, {\n  type: \"stack\"\n}];\n/**\n * Get the font used in a delimiter based on what kind of delimiter it is.\n * TODO(#963) Use more specific font family return type once that is introduced.\n */\n\nvar delimTypeToFont = function delimTypeToFont(type) {\n  if (type.type === \"small\") {\n    return \"Main-Regular\";\n  } else if (type.type === \"large\") {\n    return \"Size\" + type.size + \"-Regular\";\n  } else if (type.type === \"stack\") {\n    return \"Size4-Regular\";\n  } else {\n    throw new Error(\"Add support for delim type '\" + type.type + \"' here.\");\n  }\n};\n/**\n * Traverse a sequence of types of delimiters to decide what kind of delimiter\n * should be used to create a delimiter of the given height+depth.\n */\n\n\nvar traverseSequence = function traverseSequence(delim, height, sequence, options) {\n  // Here, we choose the index we should start at in the sequences. In smaller\n  // sizes (which correspond to larger numbers in style.size) we start earlier\n  // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts\n  // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2\n  var start = Math.min(2, 3 - options.style.size);\n\n  for (var i = start; i < sequence.length; i++) {\n    if (sequence[i].type === \"stack\") {\n      // This is always the last delimiter, so we just break the loop now.\n      break;\n    }\n\n    var metrics = delimiter_getMetrics(delim, delimTypeToFont(sequence[i]), \"math\");\n    var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we\n    // account for the style change size.\n\n    if (sequence[i].type === \"small\") {\n      var newOptions = options.havingBaseStyle(sequence[i].style);\n      heightDepth *= newOptions.sizeMultiplier;\n    } // Check if the delimiter at this size works for the given height.\n\n\n    if (heightDepth > height) {\n      return sequence[i];\n    }\n  } // If we reached the end of the sequence, return the last sequence element.\n\n\n  return sequence[sequence.length - 1];\n};\n/**\n * Make a delimiter of a given height+depth, with optional centering. Here, we\n * traverse the sequences, and create a delimiter that the sequence tells us to.\n */\n\n\nvar delimiter_makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) {\n  if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27E8\") {\n    delim = \"\\\\langle\";\n  } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27E9\") {\n    delim = \"\\\\rangle\";\n  } // Decide what sequence to use\n\n\n  var sequence;\n\n  if (utils.contains(stackNeverDelimiters, delim)) {\n    sequence = stackNeverDelimiterSequence;\n  } else if (utils.contains(stackLargeDelimiters, delim)) {\n    sequence = stackLargeDelimiterSequence;\n  } else {\n    sequence = stackAlwaysDelimiterSequence;\n  } // Look through the sequence\n\n\n  var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs.\n  // Depending on the sequence element we decided on, call the\n  // appropriate function.\n\n  if (delimType.type === \"small\") {\n    return delimiter_makeSmallDelim(delim, delimType.style, center, options, mode, classes);\n  } else if (delimType.type === \"large\") {\n    return delimiter_makeLargeDelim(delim, delimType.size, center, options, mode, classes);\n  } else\n    /* if (delimType.type === \"stack\") */\n    {\n      return delimiter_makeStackedDelim(delim, height, center, options, mode, classes);\n    }\n};\n/**\n * Make a delimiter for use with `\\left` and `\\right`, given a height and depth\n * of an expression that the delimiters surround.\n */\n\n\nvar makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) {\n  // We always center \\left/\\right delimiters, so the axis is always shifted\n  var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right\n\n  var delimiterFactor = 901;\n  var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm;\n  var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight);\n  var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are\n  // 65536 per pt, or 655360 per em. So, the division here truncates in\n  // TeX but doesn't here, producing different results. If we wanted to\n  // exactly match TeX's calculation, we could do\n  //   Math.floor(655360 * maxDistFromAxis / 500) *\n  //    delimiterFactor / 655360\n  // (To see the difference, compare\n  //    x^{x^{\\left(\\rule{0.1em}{0.68em}\\right)}}\n  // in TeX and KaTeX)\n  maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total\n  // height\n\n  return delimiter_makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes);\n};\n\n/* harmony default export */ var delimiter = ({\n  sqrtImage: makeSqrtImage,\n  sizedDelim: delimiter_makeSizedDelim,\n  customSizedDelim: delimiter_makeCustomSizedDelim,\n  leftRightDelim: makeLeftRightDelim\n});\n// CONCATENATED MODULE: ./src/functions/delimsizing.js\n\n\n\n\n\n\n\n\n\n// Extra data needed for the delimiter handler down below\nvar delimiterSizes = {\n  \"\\\\bigl\": {\n    mclass: \"mopen\",\n    size: 1\n  },\n  \"\\\\Bigl\": {\n    mclass: \"mopen\",\n    size: 2\n  },\n  \"\\\\biggl\": {\n    mclass: \"mopen\",\n    size: 3\n  },\n  \"\\\\Biggl\": {\n    mclass: \"mopen\",\n    size: 4\n  },\n  \"\\\\bigr\": {\n    mclass: \"mclose\",\n    size: 1\n  },\n  \"\\\\Bigr\": {\n    mclass: \"mclose\",\n    size: 2\n  },\n  \"\\\\biggr\": {\n    mclass: \"mclose\",\n    size: 3\n  },\n  \"\\\\Biggr\": {\n    mclass: \"mclose\",\n    size: 4\n  },\n  \"\\\\bigm\": {\n    mclass: \"mrel\",\n    size: 1\n  },\n  \"\\\\Bigm\": {\n    mclass: \"mrel\",\n    size: 2\n  },\n  \"\\\\biggm\": {\n    mclass: \"mrel\",\n    size: 3\n  },\n  \"\\\\Biggm\": {\n    mclass: \"mrel\",\n    size: 4\n  },\n  \"\\\\big\": {\n    mclass: \"mord\",\n    size: 1\n  },\n  \"\\\\Big\": {\n    mclass: \"mord\",\n    size: 2\n  },\n  \"\\\\bigg\": {\n    mclass: \"mord\",\n    size: 3\n  },\n  \"\\\\Bigg\": {\n    mclass: \"mord\",\n    size: 4\n  }\n};\nvar delimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230A\", \"\\u230B\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"<\", \">\", \"\\\\langle\", \"\\u27E8\", \"\\\\rangle\", \"\\u27E9\", \"\\\\lt\", \"\\\\gt\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27EE\", \"\\u27EF\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23B0\", \"\\u23B1\", \"/\", \"\\\\backslash\", \"|\", \"\\\\vert\", \"\\\\|\", \"\\\\Vert\", \"\\\\uparrow\", \"\\\\Uparrow\", \"\\\\downarrow\", \"\\\\Downarrow\", \"\\\\updownarrow\", \"\\\\Updownarrow\", \".\"];\n\n// Delimiter functions\nfunction checkDelimiter(delim, context) {\n  var symDelim = checkSymbolNodeType(delim);\n\n  if (symDelim && utils.contains(delimiters, symDelim.text)) {\n    return symDelim;\n  } else {\n    throw new src_ParseError(\"Invalid delimiter: '\" + (symDelim ? symDelim.text : JSON.stringify(delim)) + \"' after '\" + context.funcName + \"'\", delim);\n  }\n}\n\ndefineFunction({\n  type: \"delimsizing\",\n  names: [\"\\\\bigl\", \"\\\\Bigl\", \"\\\\biggl\", \"\\\\Biggl\", \"\\\\bigr\", \"\\\\Bigr\", \"\\\\biggr\", \"\\\\Biggr\", \"\\\\bigm\", \"\\\\Bigm\", \"\\\\biggm\", \"\\\\Biggm\", \"\\\\big\", \"\\\\Big\", \"\\\\bigg\", \"\\\\Bigg\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    var delim = checkDelimiter(args[0], context);\n    return {\n      type: \"delimsizing\",\n      mode: context.parser.mode,\n      size: delimiterSizes[context.funcName].size,\n      mclass: delimiterSizes[context.funcName].mclass,\n      delim: delim.text\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    if (group.delim === \".\") {\n      // Empty delimiters still count as elements, even though they don't\n      // show anything.\n      return buildCommon.makeSpan([group.mclass]);\n    } // Use delimiter.sizedDelim to generate the delimiter.\n\n\n    return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]);\n  },\n  mathmlBuilder: function mathmlBuilder(group) {\n    var children = [];\n\n    if (group.delim !== \".\") {\n      children.push(buildMathML_makeText(group.delim, group.mode));\n    }\n\n    var node = new mathMLTree.MathNode(\"mo\", children);\n\n    if (group.mclass === \"mopen\" || group.mclass === \"mclose\") {\n      // Only some of the delimsizing functions act as fences, and they\n      // return \"mopen\" or \"mclose\" mclass.\n      node.setAttribute(\"fence\", \"true\");\n    } else {\n      // Explicitly disable fencing if it's not a fence, to override the\n      // defaults.\n      node.setAttribute(\"fence\", \"false\");\n    }\n\n    return node;\n  }\n});\n\nfunction assertParsed(group) {\n  if (!group.body) {\n    throw new Error(\"Bug: The leftright ParseNode wasn't fully parsed.\");\n  }\n}\n\ndefineFunction({\n  type: \"leftright-right\",\n  names: [\"\\\\right\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    // \\left case below triggers parsing of \\right in\n    //   `const right = parser.parseFunction();`\n    // uses this return value.\n    return {\n      type: \"leftright-right\",\n      mode: context.parser.mode,\n      delim: checkDelimiter(args[0], context).text\n    };\n  }\n});\ndefineFunction({\n  type: \"leftright\",\n  names: [\"\\\\left\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    var delim = checkDelimiter(args[0], context);\n    var parser = context.parser; // Parse out the implicit body\n\n    ++parser.leftrightDepth; // parseExpression stops before '\\\\right'\n\n    var body = parser.parseExpression(false);\n    --parser.leftrightDepth; // Check the next token\n\n    parser.expect(\"\\\\right\", false);\n    var right = assertNodeType(parser.parseFunction(), \"leftright-right\");\n    return {\n      type: \"leftright\",\n      mode: parser.mode,\n      body: body,\n      left: delim.text,\n      right: right.delim\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    assertParsed(group); // Build the inner expression\n\n    var inner = buildHTML_buildExpression(group.body, options, true, [\"mopen\", \"mclose\"]);\n    var innerHeight = 0;\n    var innerDepth = 0;\n    var hadMiddle = false; // Calculate its height and depth\n\n    for (var i = 0; i < inner.length; i++) {\n      // Property `isMiddle` not defined on `span`. See comment in\n      // \"middle\"'s htmlBuilder.\n      // $FlowFixMe\n      if (inner[i].isMiddle) {\n        hadMiddle = true;\n      } else {\n        innerHeight = Math.max(inner[i].height, innerHeight);\n        innerDepth = Math.max(inner[i].depth, innerDepth);\n      }\n    } // The size of delimiters is the same, regardless of what style we are\n    // in. Thus, to correctly calculate the size of delimiter we need around\n    // a group, we scale down the inner size based on the size.\n\n\n    innerHeight *= options.sizeMultiplier;\n    innerDepth *= options.sizeMultiplier;\n    var leftDelim;\n\n    if (group.left === \".\") {\n      // Empty delimiters in \\left and \\right make null delimiter spaces.\n      leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n    } else {\n      // Otherwise, use leftRightDelim to generate the correct sized\n      // delimiter.\n      leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, [\"mopen\"]);\n    } // Add it to the beginning of the expression\n\n\n    inner.unshift(leftDelim); // Handle middle delimiters\n\n    if (hadMiddle) {\n      for (var _i = 1; _i < inner.length; _i++) {\n        var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in\n        // \"middle\"'s htmlBuilder.\n        // $FlowFixMe\n\n        var isMiddle = middleDelim.isMiddle;\n\n        if (isMiddle) {\n          // Apply the options that were active when \\middle was called\n          inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []);\n        }\n      }\n    }\n\n    var rightDelim; // Same for the right delimiter\n\n    if (group.right === \".\") {\n      rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n    } else {\n      rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, options, group.mode, [\"mclose\"]);\n    } // Add it to the end of the expression.\n\n\n    inner.push(rightDelim);\n    return buildCommon.makeSpan([\"minner\"], inner, options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    assertParsed(group);\n    var inner = buildMathML_buildExpression(group.body, options);\n\n    if (group.left !== \".\") {\n      var leftNode = new mathMLTree.MathNode(\"mo\", [buildMathML_makeText(group.left, group.mode)]);\n      leftNode.setAttribute(\"fence\", \"true\");\n      inner.unshift(leftNode);\n    }\n\n    if (group.right !== \".\") {\n      var rightNode = new mathMLTree.MathNode(\"mo\", [buildMathML_makeText(group.right, group.mode)]);\n      rightNode.setAttribute(\"fence\", \"true\");\n      inner.push(rightNode);\n    }\n\n    return buildMathML_makeRow(inner);\n  }\n});\ndefineFunction({\n  type: \"middle\",\n  names: [\"\\\\middle\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    var delim = checkDelimiter(args[0], context);\n\n    if (!context.parser.leftrightDepth) {\n      throw new src_ParseError(\"\\\\middle without preceding \\\\left\", delim);\n    }\n\n    return {\n      type: \"middle\",\n      mode: context.parser.mode,\n      delim: delim.text\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var middleDelim;\n\n    if (group.delim === \".\") {\n      middleDelim = makeNullDelimiter(options, []);\n    } else {\n      middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []);\n      var isMiddle = {\n        delim: group.delim,\n        options: options\n      }; // Property `isMiddle` not defined on `span`. It is only used in\n      // this file above.\n      // TODO: Fix this violation of the `span` type and possibly rename\n      // things since `isMiddle` sounds like a boolean, but is a struct.\n      // $FlowFixMe\n\n      middleDelim.isMiddle = isMiddle;\n    }\n\n    return middleDelim;\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    // A Firefox \\middle will strech a character vertically only if it\n    // is in the fence part of the operator dictionary at:\n    // https://www.w3.org/TR/MathML3/appendixc.html.\n    // So we need to avoid U+2223 and use plain \"|\" instead.\n    var textNode = group.delim === \"\\\\vert\" || group.delim === \"|\" ? buildMathML_makeText(\"|\", \"text\") : buildMathML_makeText(group.delim, group.mode);\n    var middleNode = new mathMLTree.MathNode(\"mo\", [textNode]);\n    middleNode.setAttribute(\"fence\", \"true\"); // MathML gives 5/18em spacing to each <mo> element.\n    // \\middle should get delimiter spacing instead.\n\n    middleNode.setAttribute(\"lspace\", \"0.05em\");\n    middleNode.setAttribute(\"rspace\", \"0.05em\");\n    return middleNode;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/enclose.js\n\n\n\n\n\n\n\n\n\nvar enclose_htmlBuilder = function htmlBuilder(group, options) {\n  // \\cancel, \\bcancel, \\xcancel, \\sout, \\fbox, \\colorbox, \\fcolorbox\n  // Some groups can return document fragments.  Handle those by wrapping\n  // them in a span.\n  var inner = buildCommon.wrapFragment(buildHTML_buildGroup(group.body, options), options);\n  var label = group.label.substr(1);\n  var scale = options.sizeMultiplier;\n  var img;\n  var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different\n  // depending on whether the subject is wider than it is tall, or vice versa.\n  // We don't know the width of a group, so as a proxy, we test if\n  // the subject is a single character. This captures most of the\n  // subjects that should get the \"tall\" treatment.\n\n  var isSingleChar = utils.isCharacterBox(group.body);\n\n  if (label === \"sout\") {\n    img = buildCommon.makeSpan([\"stretchy\", \"sout\"]);\n    img.height = options.fontMetrics().defaultRuleThickness / scale;\n    imgShift = -0.5 * options.fontMetrics().xHeight;\n  } else {\n    // Add horizontal padding\n    if (/cancel/.test(label)) {\n      if (!isSingleChar) {\n        inner.classes.push(\"cancel-pad\");\n      }\n    } else {\n      inner.classes.push(\"boxpad\");\n    } // Add vertical padding\n\n\n    var vertPad = 0; // ref: LaTeX source2e: \\fboxsep = 3pt;  \\fboxrule = .4pt\n    // ref: cancel package: \\advance\\totalheight2\\p@ % \"+2\"\n\n    if (/box/.test(label)) {\n      vertPad = label === \"colorbox\" ? 0.3 : 0.34;\n    } else {\n      vertPad = isSingleChar ? 0.2 : 0;\n    }\n\n    img = stretchy.encloseSpan(inner, label, vertPad, options);\n    imgShift = inner.depth + vertPad;\n\n    if (group.backgroundColor) {\n      img.style.backgroundColor = group.backgroundColor;\n\n      if (group.borderColor) {\n        img.style.borderColor = group.borderColor;\n      }\n    }\n  }\n\n  var vlist;\n\n  if (group.backgroundColor) {\n    vlist = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: [// Put the color background behind inner;\n      {\n        type: \"elem\",\n        elem: img,\n        shift: imgShift\n      }, {\n        type: \"elem\",\n        elem: inner,\n        shift: 0\n      }]\n    }, options);\n  } else {\n    vlist = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: [// Write the \\cancel stroke on top of inner.\n      {\n        type: \"elem\",\n        elem: inner,\n        shift: 0\n      }, {\n        type: \"elem\",\n        elem: img,\n        shift: imgShift,\n        wrapperClasses: /cancel/.test(label) ? [\"svg-align\"] : []\n      }]\n    }, options);\n  }\n\n  if (/cancel/.test(label)) {\n    // The cancel package documentation says that cancel lines add their height\n    // to the expression, but tests show that isn't how it actually works.\n    vlist.height = inner.height;\n    vlist.depth = inner.depth;\n  }\n\n  if (/cancel/.test(label) && !isSingleChar) {\n    // cancel does not create horiz space for its line extension.\n    return buildCommon.makeSpan([\"mord\", \"cancel-lap\"], [vlist], options);\n  } else {\n    return buildCommon.makeSpan([\"mord\"], [vlist], options);\n  }\n};\n\nvar enclose_mathmlBuilder = function mathmlBuilder(group, options) {\n  var node = new mathMLTree.MathNode(group.label.indexOf(\"colorbox\") > -1 ? \"mpadded\" : \"menclose\", [buildMathML_buildGroup(group.body, options)]);\n\n  switch (group.label) {\n    case \"\\\\cancel\":\n      node.setAttribute(\"notation\", \"updiagonalstrike\");\n      break;\n\n    case \"\\\\bcancel\":\n      node.setAttribute(\"notation\", \"downdiagonalstrike\");\n      break;\n\n    case \"\\\\sout\":\n      node.setAttribute(\"notation\", \"horizontalstrike\");\n      break;\n\n    case \"\\\\fbox\":\n      node.setAttribute(\"notation\", \"box\");\n      break;\n\n    case \"\\\\fcolorbox\":\n    case \"\\\\colorbox\":\n      // <menclose> doesn't have a good notation option. So use <mpadded>\n      // instead. Set some attributes that come included with <menclose>.\n      node.setAttribute(\"width\", \"+6pt\");\n      node.setAttribute(\"height\", \"+6pt\");\n      node.setAttribute(\"lspace\", \"3pt\"); // LaTeX source2e: \\fboxsep = 3pt\n\n      node.setAttribute(\"voffset\", \"3pt\");\n\n      if (group.label === \"\\\\fcolorbox\") {\n        var thk = options.fontMetrics().defaultRuleThickness;\n        node.setAttribute(\"style\", \"border: \" + thk + \"em solid \" + String(group.borderColor));\n      }\n\n      break;\n\n    case \"\\\\xcancel\":\n      node.setAttribute(\"notation\", \"updiagonalstrike downdiagonalstrike\");\n      break;\n  }\n\n  if (group.backgroundColor) {\n    node.setAttribute(\"mathbackground\", group.backgroundColor);\n  }\n\n  return node;\n};\n\ndefineFunction({\n  type: \"enclose\",\n  names: [\"\\\\colorbox\"],\n  props: {\n    numArgs: 2,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\", \"text\"]\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var color = assertNodeType(args[0], \"color-token\").color;\n    var body = args[1];\n    return {\n      type: \"enclose\",\n      mode: parser.mode,\n      label: funcName,\n      backgroundColor: color,\n      body: body\n    };\n  },\n  htmlBuilder: enclose_htmlBuilder,\n  mathmlBuilder: enclose_mathmlBuilder\n});\ndefineFunction({\n  type: \"enclose\",\n  names: [\"\\\\fcolorbox\"],\n  props: {\n    numArgs: 3,\n    allowedInText: true,\n    greediness: 3,\n    argTypes: [\"color\", \"color\", \"text\"]\n  },\n  handler: function handler(_ref2, args, optArgs) {\n    var parser = _ref2.parser,\n        funcName = _ref2.funcName;\n    var borderColor = assertNodeType(args[0], \"color-token\").color;\n    var backgroundColor = assertNodeType(args[1], \"color-token\").color;\n    var body = args[2];\n    return {\n      type: \"enclose\",\n      mode: parser.mode,\n      label: funcName,\n      backgroundColor: backgroundColor,\n      borderColor: borderColor,\n      body: body\n    };\n  },\n  htmlBuilder: enclose_htmlBuilder,\n  mathmlBuilder: enclose_mathmlBuilder\n});\ndefineFunction({\n  type: \"enclose\",\n  names: [\"\\\\fbox\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"text\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref3, args) {\n    var parser = _ref3.parser;\n    return {\n      type: \"enclose\",\n      mode: parser.mode,\n      label: \"\\\\fbox\",\n      body: args[0]\n    };\n  }\n});\ndefineFunction({\n  type: \"enclose\",\n  names: [\"\\\\cancel\", \"\\\\bcancel\", \"\\\\xcancel\", \"\\\\sout\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref4, args, optArgs) {\n    var parser = _ref4.parser,\n        funcName = _ref4.funcName;\n    var body = args[0];\n    return {\n      type: \"enclose\",\n      mode: parser.mode,\n      label: funcName,\n      body: body\n    };\n  },\n  htmlBuilder: enclose_htmlBuilder,\n  mathmlBuilder: enclose_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/defineEnvironment.js\n\n\n/**\n * All registered environments.\n * `environments.js` exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary via `environments.js`.\n */\nvar _environments = {};\nfunction defineEnvironment(_ref) {\n  var type = _ref.type,\n      names = _ref.names,\n      props = _ref.props,\n      handler = _ref.handler,\n      htmlBuilder = _ref.htmlBuilder,\n      mathmlBuilder = _ref.mathmlBuilder;\n  // Set default values of environments.\n  var data = {\n    type: type,\n    numArgs: props.numArgs || 0,\n    greediness: 1,\n    allowedInText: false,\n    numOptionalArgs: 0,\n    handler: handler\n  };\n\n  for (var i = 0; i < names.length; ++i) {\n    // TODO: The value type of _environments should be a type union of all\n    // possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is\n    // an existential type.\n    // $FlowFixMe\n    _environments[names[i]] = data;\n  }\n\n  if (htmlBuilder) {\n    _htmlGroupBuilders[type] = htmlBuilder;\n  }\n\n  if (mathmlBuilder) {\n    _mathmlGroupBuilders[type] = mathmlBuilder;\n  }\n}\n// CONCATENATED MODULE: ./src/environments/array.js\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getHLines(parser) {\n  // Return an array. The array length = number of hlines.\n  // Each element in the array tells if the line is dashed.\n  var hlineInfo = [];\n  parser.consumeSpaces();\n  var nxt = parser.nextToken.text;\n\n  while (nxt === \"\\\\hline\" || nxt === \"\\\\hdashline\") {\n    parser.consume();\n    hlineInfo.push(nxt === \"\\\\hdashline\");\n    parser.consumeSpaces();\n    nxt = parser.nextToken.text;\n  }\n\n  return hlineInfo;\n}\n/**\n * Parse the body of the environment, with rows delimited by \\\\ and\n * columns delimited by &, and create a nested list in row-major order\n * with one group per cell.  If given an optional argument style\n * (\"text\", \"display\", etc.), then each cell is cast into that style.\n */\n\n\nfunction parseArray(parser, _ref, style) {\n  var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,\n      addJot = _ref.addJot,\n      cols = _ref.cols,\n      arraystretch = _ref.arraystretch,\n      colSeparationType = _ref.colSeparationType;\n  // Parse body of array with \\\\ temporarily mapped to \\cr\n  parser.gullet.beginGroup();\n  parser.gullet.macros.set(\"\\\\\\\\\", \"\\\\cr\"); // Get current arraystretch if it's not set by the environment\n\n  if (!arraystretch) {\n    var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n    if (stretch == null) {\n      // Default \\arraystretch from lttab.dtx\n      arraystretch = 1;\n    } else {\n      arraystretch = parseFloat(stretch);\n\n      if (!arraystretch || arraystretch < 0) {\n        throw new src_ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n      }\n    }\n  }\n\n  var row = [];\n  var body = [row];\n  var rowGaps = [];\n  var hLinesBeforeRow = []; // Test for \\hline at the top of the array.\n\n  hLinesBeforeRow.push(getHLines(parser));\n\n  while (true) {\n    // eslint-disable-line no-constant-condition\n    var cell = parser.parseExpression(false, \"\\\\cr\");\n    cell = {\n      type: \"ordgroup\",\n      mode: parser.mode,\n      body: cell\n    };\n\n    if (style) {\n      cell = {\n        type: \"styling\",\n        mode: parser.mode,\n        style: style,\n        body: [cell]\n      };\n    }\n\n    row.push(cell);\n    var next = parser.nextToken.text;\n\n    if (next === \"&\") {\n      parser.consume();\n    } else if (next === \"\\\\end\") {\n      // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n      // the last line is empty.\n      // NOTE: Currently, `cell` is the last item added into `row`.\n      if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0) {\n        body.pop();\n      }\n\n      if (hLinesBeforeRow.length < body.length + 1) {\n        hLinesBeforeRow.push([]);\n      }\n\n      break;\n    } else if (next === \"\\\\cr\") {\n      var cr = assertNodeType(parser.parseFunction(), \"cr\");\n      rowGaps.push(cr.size); // check for \\hline(s) following the row separator\n\n      hLinesBeforeRow.push(getHLines(parser));\n      row = [];\n      body.push(row);\n    } else {\n      throw new src_ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n    }\n  }\n\n  parser.gullet.endGroup();\n  return {\n    type: \"array\",\n    mode: parser.mode,\n    addJot: addJot,\n    arraystretch: arraystretch,\n    body: body,\n    cols: cols,\n    rowGaps: rowGaps,\n    hskipBeforeAndAfter: hskipBeforeAndAfter,\n    hLinesBeforeRow: hLinesBeforeRow,\n    colSeparationType: colSeparationType\n  };\n} // Decides on a style for cells in an array according to whether the given\n// environment name starts with the letter 'd'.\n\n\nfunction dCellStyle(envName) {\n  if (envName.substr(0, 1) === \"d\") {\n    return \"display\";\n  } else {\n    return \"text\";\n  }\n}\n\nvar array_htmlBuilder = function htmlBuilder(group, options) {\n  var r;\n  var c;\n  var nr = group.body.length;\n  var hLinesBeforeRow = group.hLinesBeforeRow;\n  var nc = 0;\n  var body = new Array(nr);\n  var hlines = []; // Horizontal spacing\n\n  var pt = 1 / options.fontMetrics().ptPerEm;\n  var arraycolsep = 5 * pt; // \\arraycolsep in article.cls\n  // Vertical spacing\n\n  var baselineskip = 12 * pt; // see size10.clo\n  // Default \\jot from ltmath.dtx\n  // TODO(edemaine): allow overriding \\jot via \\setlength (#687)\n\n  var jot = 3 * pt;\n  var arrayskip = group.arraystretch * baselineskip;\n  var arstrutHeight = 0.7 * arrayskip; // \\strutbox in ltfsstrc.dtx and\n\n  var arstrutDepth = 0.3 * arrayskip; // \\@arstrutbox in lttab.dtx\n\n  var totalHeight = 0; // Set a position for \\hline(s) at the top of the array, if any.\n\n  function setHLinePos(hlinesInGap) {\n    for (var i = 0; i < hlinesInGap.length; ++i) {\n      if (i > 0) {\n        totalHeight += 0.25;\n      }\n\n      hlines.push({\n        pos: totalHeight,\n        isDashed: hlinesInGap[i]\n      });\n    }\n  }\n\n  setHLinePos(hLinesBeforeRow[0]);\n\n  for (r = 0; r < group.body.length; ++r) {\n    var inrow = group.body[r];\n    var height = arstrutHeight; // \\@array adds an \\@arstrut\n\n    var depth = arstrutDepth; // to each tow (via the template)\n\n    if (nc < inrow.length) {\n      nc = inrow.length;\n    }\n\n    var outrow = new Array(inrow.length);\n\n    for (c = 0; c < inrow.length; ++c) {\n      var elt = buildHTML_buildGroup(inrow[c], options);\n\n      if (depth < elt.depth) {\n        depth = elt.depth;\n      }\n\n      if (height < elt.height) {\n        height = elt.height;\n      }\n\n      outrow[c] = elt;\n    }\n\n    var rowGap = group.rowGaps[r];\n    var gap = 0;\n\n    if (rowGap) {\n      gap = units_calculateSize(rowGap, options);\n\n      if (gap > 0) {\n        // \\@argarraycr\n        gap += arstrutDepth;\n\n        if (depth < gap) {\n          depth = gap; // \\@xargarraycr\n        }\n\n        gap = 0;\n      }\n    } // In AMS multiline environments such as aligned and gathered, rows\n    // correspond to lines that have additional \\jot added to the\n    // \\baselineskip via \\openup.\n\n\n    if (group.addJot) {\n      depth += jot;\n    }\n\n    outrow.height = height;\n    outrow.depth = depth;\n    totalHeight += height;\n    outrow.pos = totalHeight;\n    totalHeight += depth + gap; // \\@yargarraycr\n\n    body[r] = outrow; // Set a position for \\hline(s), if any.\n\n    setHLinePos(hLinesBeforeRow[r + 1]);\n  }\n\n  var offset = totalHeight / 2 + options.fontMetrics().axisHeight;\n  var colDescriptions = group.cols || [];\n  var cols = [];\n  var colSep;\n  var colDescrNum;\n\n  for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column\n  // descriptions, so trailing separators don't get lost.\n  c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {\n    var colDescr = colDescriptions[colDescrNum] || {};\n    var firstSeparator = true;\n\n    while (colDescr.type === \"separator\") {\n      // If there is more than one separator in a row, add a space\n      // between them.\n      if (!firstSeparator) {\n        colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n        colSep.style.width = options.fontMetrics().doubleRuleSep + \"em\";\n        cols.push(colSep);\n      }\n\n      if (colDescr.separator === \"|\") {\n        var separator = buildCommon.makeSpan([\"vertical-separator\"], [], options);\n        separator.style.height = totalHeight + \"em\";\n        separator.style.verticalAlign = -(totalHeight - offset) + \"em\";\n        cols.push(separator);\n      } else if (colDescr.separator === \":\") {\n        var _separator = buildCommon.makeSpan([\"vertical-separator\", \"vs-dashed\"], [], options);\n\n        _separator.style.height = totalHeight + \"em\";\n        _separator.style.verticalAlign = -(totalHeight - offset) + \"em\";\n        cols.push(_separator);\n      } else {\n        throw new src_ParseError(\"Invalid separator type: \" + colDescr.separator);\n      }\n\n      colDescrNum++;\n      colDescr = colDescriptions[colDescrNum] || {};\n      firstSeparator = false;\n    }\n\n    if (c >= nc) {\n      continue;\n    }\n\n    var sepwidth = void 0;\n\n    if (c > 0 || group.hskipBeforeAndAfter) {\n      sepwidth = utils.deflt(colDescr.pregap, arraycolsep);\n\n      if (sepwidth !== 0) {\n        colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n        colSep.style.width = sepwidth + \"em\";\n        cols.push(colSep);\n      }\n    }\n\n    var col = [];\n\n    for (r = 0; r < nr; ++r) {\n      var row = body[r];\n      var elem = row[c];\n\n      if (!elem) {\n        continue;\n      }\n\n      var shift = row.pos - offset;\n      elem.depth = row.depth;\n      elem.height = row.height;\n      col.push({\n        type: \"elem\",\n        elem: elem,\n        shift: shift\n      });\n    }\n\n    col = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: col\n    }, options);\n    col = buildCommon.makeSpan([\"col-align-\" + (colDescr.align || \"c\")], [col]);\n    cols.push(col);\n\n    if (c < nc - 1 || group.hskipBeforeAndAfter) {\n      sepwidth = utils.deflt(colDescr.postgap, arraycolsep);\n\n      if (sepwidth !== 0) {\n        colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n        colSep.style.width = sepwidth + \"em\";\n        cols.push(colSep);\n      }\n    }\n  }\n\n  body = buildCommon.makeSpan([\"mtable\"], cols); // Add \\hline(s), if any.\n\n  if (hlines.length > 0) {\n    var line = buildCommon.makeLineSpan(\"hline\", options, 0.05);\n    var dashes = buildCommon.makeLineSpan(\"hdashline\", options, 0.05);\n    var vListElems = [{\n      type: \"elem\",\n      elem: body,\n      shift: 0\n    }];\n\n    while (hlines.length > 0) {\n      var hline = hlines.pop();\n      var lineShift = hline.pos - offset;\n\n      if (hline.isDashed) {\n        vListElems.push({\n          type: \"elem\",\n          elem: dashes,\n          shift: lineShift\n        });\n      } else {\n        vListElems.push({\n          type: \"elem\",\n          elem: line,\n          shift: lineShift\n        });\n      }\n    }\n\n    body = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: vListElems\n    }, options);\n  }\n\n  return buildCommon.makeSpan([\"mord\"], [body], options);\n};\n\nvar alignMap = {\n  c: \"center \",\n  l: \"left \",\n  r: \"right \"\n};\n\nvar array_mathmlBuilder = function mathmlBuilder(group, options) {\n  var table = new mathMLTree.MathNode(\"mtable\", group.body.map(function (row) {\n    return new mathMLTree.MathNode(\"mtr\", row.map(function (cell) {\n      return new mathMLTree.MathNode(\"mtd\", [buildMathML_buildGroup(cell, options)]);\n    }));\n  })); // Set column alignment, row spacing, column spacing, and\n  // array lines by setting attributes on the table element.\n  // Set the row spacing. In MathML, we specify a gap distance.\n  // We do not use rowGap[] because MathML automatically increases\n  // cell height with the height/depth of the element content.\n  // LaTeX \\arraystretch multiplies the row baseline-to-baseline distance.\n  // We simulate this by adding (arraystretch - 1)em to the gap. This\n  // does a reasonable job of adjusting arrays containing 1 em tall content.\n  // The 0.16 and 0.09 values are found emprically. They produce an array\n  // similar to LaTeX and in which content does not interfere with \\hines.\n\n  var gap = 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);\n  table.setAttribute(\"rowspacing\", gap + \"em\"); // MathML table lines go only between cells.\n  // To place a line on an edge we'll use <menclose>, if necessary.\n\n  var menclose = \"\";\n  var align = \"\";\n\n  if (group.cols) {\n    // Find column alignment, column spacing, and  vertical lines.\n    var cols = group.cols;\n    var columnLines = \"\";\n    var prevTypeWasAlign = false;\n    var iStart = 0;\n    var iEnd = cols.length;\n\n    if (cols[0].type === \"separator\") {\n      menclose += \"top \";\n      iStart = 1;\n    }\n\n    if (cols[cols.length - 1].type === \"separator\") {\n      menclose += \"bottom \";\n      iEnd -= 1;\n    }\n\n    for (var i = iStart; i < iEnd; i++) {\n      if (cols[i].type === \"align\") {\n        align += alignMap[cols[i].align];\n\n        if (prevTypeWasAlign) {\n          columnLines += \"none \";\n        }\n\n        prevTypeWasAlign = true;\n      } else if (cols[i].type === \"separator\") {\n        // MathML accepts only single lines between cells.\n        // So we read only the first of consecutive separators.\n        if (prevTypeWasAlign) {\n          columnLines += cols[i].separator === \"|\" ? \"solid \" : \"dashed \";\n          prevTypeWasAlign = false;\n        }\n      }\n    }\n\n    table.setAttribute(\"columnalign\", align.trim());\n\n    if (/[sd]/.test(columnLines)) {\n      table.setAttribute(\"columnlines\", columnLines.trim());\n    }\n  } // Set column spacing.\n\n\n  if (group.colSeparationType === \"align\") {\n    var _cols = group.cols || [];\n\n    var spacing = \"\";\n\n    for (var _i = 1; _i < _cols.length; _i++) {\n      spacing += _i % 2 ? \"0em \" : \"1em \";\n    }\n\n    table.setAttribute(\"columnspacing\", spacing.trim());\n  } else if (group.colSeparationType === \"alignat\") {\n    table.setAttribute(\"columnspacing\", \"0em\");\n  } else {\n    table.setAttribute(\"columnspacing\", \"1em\");\n  } // Address \\hline and \\hdashline\n\n\n  var rowLines = \"\";\n  var hlines = group.hLinesBeforeRow;\n  menclose += hlines[0].length > 0 ? \"left \" : \"\";\n  menclose += hlines[hlines.length - 1].length > 0 ? \"right \" : \"\";\n\n  for (var _i2 = 1; _i2 < hlines.length - 1; _i2++) {\n    rowLines += hlines[_i2].length === 0 ? \"none \" // MathML accepts only a single line between rows. Read one element.\n    : hlines[_i2][0] ? \"dashed \" : \"solid \";\n  }\n\n  if (/[sd]/.test(rowLines)) {\n    table.setAttribute(\"rowlines\", rowLines.trim());\n  }\n\n  if (menclose === \"\") {\n    return table;\n  } else {\n    var wrapper = new mathMLTree.MathNode(\"menclose\", [table]);\n    wrapper.setAttribute(\"notation\", menclose.trim());\n    return wrapper;\n  }\n}; // Convenience function for aligned and alignedat environments.\n\n\nvar array_alignedHandler = function alignedHandler(context, args) {\n  var cols = [];\n  var res = parseArray(context.parser, {\n    cols: cols,\n    addJot: true\n  }, \"display\"); // Determining number of columns.\n  // 1. If the first argument is given, we use it as a number of columns,\n  //    and makes sure that each row doesn't exceed that number.\n  // 2. Otherwise, just count number of columns = maximum number\n  //    of cells in each row (\"aligned\" mode -- isAligned will be true).\n  //\n  // At the same time, prepend empty group {} at beginning of every second\n  // cell in each row (starting with second cell) so that operators become\n  // binary.  This behavior is implemented in amsmath's \\start@aligned.\n\n  var numMaths;\n  var numCols = 0;\n  var emptyGroup = {\n    type: \"ordgroup\",\n    mode: context.mode,\n    body: []\n  };\n  var ordgroup = checkNodeType(args[0], \"ordgroup\");\n\n  if (ordgroup) {\n    var arg0 = \"\";\n\n    for (var i = 0; i < ordgroup.body.length; i++) {\n      var textord = assertNodeType(ordgroup.body[i], \"textord\");\n      arg0 += textord.text;\n    }\n\n    numMaths = Number(arg0);\n    numCols = numMaths * 2;\n  }\n\n  var isAligned = !numCols;\n  res.body.forEach(function (row) {\n    for (var _i3 = 1; _i3 < row.length; _i3 += 2) {\n      // Modify ordgroup node within styling node\n      var styling = assertNodeType(row[_i3], \"styling\");\n\n      var _ordgroup = assertNodeType(styling.body[0], \"ordgroup\");\n\n      _ordgroup.body.unshift(emptyGroup);\n    }\n\n    if (!isAligned) {\n      // Case 1\n      var curMaths = row.length / 2;\n\n      if (numMaths < curMaths) {\n        throw new src_ParseError(\"Too many math in a row: \" + (\"expected \" + numMaths + \", but got \" + curMaths), row[0]);\n      }\n    } else if (numCols < row.length) {\n      // Case 2\n      numCols = row.length;\n    }\n  }); // Adjusting alignment.\n  // In aligned mode, we add one \\qquad between columns;\n  // otherwise we add nothing.\n\n  for (var _i4 = 0; _i4 < numCols; ++_i4) {\n    var align = \"r\";\n    var pregap = 0;\n\n    if (_i4 % 2 === 1) {\n      align = \"l\";\n    } else if (_i4 > 0 && isAligned) {\n      // \"aligned\" mode.\n      pregap = 1; // add one \\quad\n    }\n\n    cols[_i4] = {\n      type: \"align\",\n      align: align,\n      pregap: pregap,\n      postgap: 0\n    };\n  }\n\n  res.colSeparationType = isAligned ? \"align\" : \"alignat\";\n  return res;\n}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation\n// is part of the source2e.pdf file of LaTeX2e source documentation.\n// {darray} is an {array} environment where cells are set in \\displaystyle,\n// as defined in nccmath.sty.\n\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"array\", \"darray\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(context, args) {\n    // Since no types are specified above, the two possibilities are\n    // - The argument is wrapped in {} or [], in which case Parser's\n    //   parseGroup() returns an \"ordgroup\" wrapping some symbol node.\n    // - The argument is a bare symbol node.\n    var symNode = checkSymbolNodeType(args[0]);\n    var colalign = symNode ? [args[0]] : assertNodeType(args[0], \"ordgroup\").body;\n    var cols = colalign.map(function (nde) {\n      var node = assertSymbolNodeType(nde);\n      var ca = node.text;\n\n      if (\"lcr\".indexOf(ca) !== -1) {\n        return {\n          type: \"align\",\n          align: ca\n        };\n      } else if (ca === \"|\") {\n        return {\n          type: \"separator\",\n          separator: \"|\"\n        };\n      } else if (ca === \":\") {\n        return {\n          type: \"separator\",\n          separator: \":\"\n        };\n      }\n\n      throw new src_ParseError(\"Unknown column alignment: \" + ca, nde);\n    });\n    var res = {\n      cols: cols,\n      hskipBeforeAndAfter: true // \\@preamble in lttab.dtx\n\n    };\n    return parseArray(context.parser, res, dCellStyle(context.envName));\n  },\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // The matrix environments of amsmath builds on the array environment\n// of LaTeX, which is discussed above.\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"matrix\", \"pmatrix\", \"bmatrix\", \"Bmatrix\", \"vmatrix\", \"Vmatrix\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(context) {\n    var delimiters = {\n      \"matrix\": null,\n      \"pmatrix\": [\"(\", \")\"],\n      \"bmatrix\": [\"[\", \"]\"],\n      \"Bmatrix\": [\"\\\\{\", \"\\\\}\"],\n      \"vmatrix\": [\"|\", \"|\"],\n      \"Vmatrix\": [\"\\\\Vert\", \"\\\\Vert\"]\n    }[context.envName]; // \\hskip -\\arraycolsep in amsmath\n\n    var payload = {\n      hskipBeforeAndAfter: false\n    };\n    var res = parseArray(context.parser, payload, dCellStyle(context.envName));\n    return delimiters ? {\n      type: \"leftright\",\n      mode: context.mode,\n      body: [res],\n      left: delimiters[0],\n      right: delimiters[1]\n    } : res;\n  },\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // A cases environment (in amsmath.sty) is almost equivalent to\n// \\def\\arraystretch{1.2}%\n// \\left\\{\\begin{array}{@{}l@{\\quad}l@{}} … \\end{array}\\right.\n// {dcases} is a {cases} environment where cells are set in \\displaystyle,\n// as defined in mathtools.sty.\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"cases\", \"dcases\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(context) {\n    var payload = {\n      arraystretch: 1.2,\n      cols: [{\n        type: \"align\",\n        align: \"l\",\n        pregap: 0,\n        // TODO(kevinb) get the current style.\n        // For now we use the metrics for TEXT style which is what we were\n        // doing before.  Before attempting to get the current style we\n        // should look at TeX's behavior especially for \\over and matrices.\n        postgap: 1.0\n        /* 1em quad */\n\n      }, {\n        type: \"align\",\n        align: \"l\",\n        pregap: 0,\n        postgap: 0\n      }]\n    };\n    var res = parseArray(context.parser, payload, dCellStyle(context.envName));\n    return {\n      type: \"leftright\",\n      mode: context.mode,\n      body: [res],\n      left: \"\\\\{\",\n      right: \".\"\n    };\n  },\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // An aligned environment is like the align* environment\n// except it operates within math mode.\n// Note that we assume \\nomallineskiplimit to be zero,\n// so that \\strut@ is the same as \\strut.\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"aligned\"],\n  props: {\n    numArgs: 0\n  },\n  handler: array_alignedHandler,\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // A gathered environment is like an array environment with one centered\n// column, but where rows are considered lines so get \\jot line spacing\n// and contents are set in \\displaystyle.\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"gathered\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(context) {\n    var res = {\n      cols: [{\n        type: \"align\",\n        align: \"c\"\n      }],\n      addJot: true\n    };\n    return parseArray(context.parser, res, \"display\");\n  },\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // alignat environment is like an align environment, but one must explicitly\n// specify maximum number of columns in each row, and can adjust spacing between\n// each columns.\n\ndefineEnvironment({\n  type: \"array\",\n  names: [\"alignedat\"],\n  // One for numbered and for unnumbered;\n  // but, KaTeX doesn't supports math numbering yet,\n  // they make no difference for now.\n  props: {\n    numArgs: 1\n  },\n  handler: array_alignedHandler,\n  htmlBuilder: array_htmlBuilder,\n  mathmlBuilder: array_mathmlBuilder\n}); // Catch \\hline outside array environment\n\ndefineFunction({\n  type: \"text\",\n  // Doesn't matter what this is.\n  names: [\"\\\\hline\", \"\\\\hdashline\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true,\n    allowedInMath: true\n  },\n  handler: function handler(context, args) {\n    throw new src_ParseError(context.funcName + \" valid only within array environment\");\n  }\n});\n// CONCATENATED MODULE: ./src/environments.js\n\nvar environments = _environments;\n/* harmony default export */ var src_environments = (environments); // All environment definitions should be imported below\n\n\n// CONCATENATED MODULE: ./src/functions/environment.js\n\n\n\n // Environment delimiters. HTML/MathML rendering is defined in the corresponding\n// defineEnvironment definitions.\n// $FlowFixMe, \"environment\" handler returns an environment ParseNode\n\ndefineFunction({\n  type: \"environment\",\n  names: [\"\\\\begin\", \"\\\\end\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"text\"]\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var nameGroup = args[0];\n\n    if (nameGroup.type !== \"ordgroup\") {\n      throw new src_ParseError(\"Invalid environment name\", nameGroup);\n    }\n\n    var envName = \"\";\n\n    for (var i = 0; i < nameGroup.body.length; ++i) {\n      envName += assertNodeType(nameGroup.body[i], \"textord\").text;\n    }\n\n    if (funcName === \"\\\\begin\") {\n      // begin...end is similar to left...right\n      if (!src_environments.hasOwnProperty(envName)) {\n        throw new src_ParseError(\"No such environment: \" + envName, nameGroup);\n      } // Build the environment object. Arguments and other information will\n      // be made available to the begin and end methods using properties.\n\n\n      var env = src_environments[envName];\n\n      var _parser$parseArgument = parser.parseArguments(\"\\\\begin{\" + envName + \"}\", env),\n          _args = _parser$parseArgument.args,\n          optArgs = _parser$parseArgument.optArgs;\n\n      var context = {\n        mode: parser.mode,\n        envName: envName,\n        parser: parser\n      };\n      var result = env.handler(context, _args, optArgs);\n      parser.expect(\"\\\\end\", false);\n      var endNameToken = parser.nextToken;\n      var end = assertNodeType(parser.parseFunction(), \"environment\");\n\n      if (end.name !== envName) {\n        throw new src_ParseError(\"Mismatch: \\\\begin{\" + envName + \"} matched by \\\\end{\" + end.name + \"}\", endNameToken);\n      }\n\n      return result;\n    }\n\n    return {\n      type: \"environment\",\n      mode: parser.mode,\n      name: envName,\n      nameGroup: nameGroup\n    };\n  }\n});\n// CONCATENATED MODULE: ./src/functions/mclass.js\n\n\n\n\n\nvar mclass_makeSpan = buildCommon.makeSpan;\n\nfunction mclass_htmlBuilder(group, options) {\n  var elements = buildHTML_buildExpression(group.body, options, true);\n  return mclass_makeSpan([group.mclass], elements, options);\n}\n\nfunction mclass_mathmlBuilder(group, options) {\n  var inner = buildMathML_buildExpression(group.body, options);\n  return mathMLTree.newDocumentFragment(inner);\n} // Math class commands except \\mathop\n\n\ndefineFunction({\n  type: \"mclass\",\n  names: [\"\\\\mathord\", \"\\\\mathbin\", \"\\\\mathrel\", \"\\\\mathopen\", \"\\\\mathclose\", \"\\\\mathpunct\", \"\\\\mathinner\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var body = args[0];\n    return {\n      type: \"mclass\",\n      mode: parser.mode,\n      mclass: \"m\" + funcName.substr(5),\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: mclass_htmlBuilder,\n  mathmlBuilder: mclass_mathmlBuilder\n});\nvar binrelClass = function binrelClass(arg) {\n  // \\binrel@ spacing varies with (bin|rel|ord) of the atom in the argument.\n  // (by rendering separately and with {}s before and after, and measuring\n  // the change in spacing).  We'll do roughly the same by detecting the\n  // atom type directly.\n  var atom = arg.type === \"ordgroup\" && arg.body.length ? arg.body[0] : arg;\n\n  if (atom.type === \"atom\" && (atom.family === \"bin\" || atom.family === \"rel\")) {\n    return \"m\" + atom.family;\n  } else {\n    return \"mord\";\n  }\n}; // \\@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord.\n// This is equivalent to \\binrel@{x}\\binrel@@{y} in AMSTeX.\n\ndefineFunction({\n  type: \"mclass\",\n  names: [\"\\\\@binrel\"],\n  props: {\n    numArgs: 2\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser;\n    return {\n      type: \"mclass\",\n      mode: parser.mode,\n      mclass: binrelClass(args[0]),\n      body: [args[1]]\n    };\n  }\n}); // Build a relation or stacked op by placing one symbol on top of another\n\ndefineFunction({\n  type: \"mclass\",\n  names: [\"\\\\stackrel\", \"\\\\overset\", \"\\\\underset\"],\n  props: {\n    numArgs: 2\n  },\n  handler: function handler(_ref3, args) {\n    var parser = _ref3.parser,\n        funcName = _ref3.funcName;\n    var baseArg = args[1];\n    var shiftedArg = args[0];\n    var mclass;\n\n    if (funcName !== \"\\\\stackrel\") {\n      // LaTeX applies \\binrel spacing to \\overset and \\underset.\n      mclass = binrelClass(baseArg);\n    } else {\n      mclass = \"mrel\"; // for \\stackrel\n    }\n\n    var baseOp = {\n      type: \"op\",\n      mode: baseArg.mode,\n      limits: true,\n      alwaysHandleSupSub: true,\n      parentIsSupSub: false,\n      symbol: false,\n      suppressBaseShift: funcName !== \"\\\\stackrel\",\n      body: defineFunction_ordargument(baseArg)\n    };\n    var supsub = {\n      type: \"supsub\",\n      mode: shiftedArg.mode,\n      base: baseOp,\n      sup: funcName === \"\\\\underset\" ? null : shiftedArg,\n      sub: funcName === \"\\\\underset\" ? shiftedArg : null\n    };\n    return {\n      type: \"mclass\",\n      mode: parser.mode,\n      mclass: mclass,\n      body: [supsub]\n    };\n  },\n  htmlBuilder: mclass_htmlBuilder,\n  mathmlBuilder: mclass_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/font.js\n// TODO(kevinb): implement \\\\sl and \\\\sc\n\n\n\n\n\nvar font_htmlBuilder = function htmlBuilder(group, options) {\n  var font = group.font;\n  var newOptions = options.withFont(font);\n  return buildHTML_buildGroup(group.body, newOptions);\n};\n\nvar font_mathmlBuilder = function mathmlBuilder(group, options) {\n  var font = group.font;\n  var newOptions = options.withFont(font);\n  return buildMathML_buildGroup(group.body, newOptions);\n};\n\nvar fontAliases = {\n  \"\\\\Bbb\": \"\\\\mathbb\",\n  \"\\\\bold\": \"\\\\mathbf\",\n  \"\\\\frak\": \"\\\\mathfrak\",\n  \"\\\\bm\": \"\\\\boldsymbol\"\n};\ndefineFunction({\n  type: \"font\",\n  names: [// styles, except \\boldsymbol defined below\n  \"\\\\mathrm\", \"\\\\mathit\", \"\\\\mathbf\", \"\\\\mathnormal\", // families\n  \"\\\\mathbb\", \"\\\\mathcal\", \"\\\\mathfrak\", \"\\\\mathscr\", \"\\\\mathsf\", \"\\\\mathtt\", // aliases, except \\bm defined below\n  \"\\\\Bbb\", \"\\\\bold\", \"\\\\frak\"],\n  props: {\n    numArgs: 1,\n    greediness: 2\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var body = args[0];\n    var func = funcName;\n\n    if (func in fontAliases) {\n      func = fontAliases[func];\n    }\n\n    return {\n      type: \"font\",\n      mode: parser.mode,\n      font: func.slice(1),\n      body: body\n    };\n  },\n  htmlBuilder: font_htmlBuilder,\n  mathmlBuilder: font_mathmlBuilder\n});\ndefineFunction({\n  type: \"mclass\",\n  names: [\"\\\\boldsymbol\", \"\\\\bm\"],\n  props: {\n    numArgs: 1,\n    greediness: 2\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser;\n    var body = args[0]; // amsbsy.sty's \\boldsymbol uses \\binrel spacing to inherit the\n    // argument's bin|rel|ord status\n\n    return {\n      type: \"mclass\",\n      mode: parser.mode,\n      mclass: binrelClass(body),\n      body: [{\n        type: \"font\",\n        mode: parser.mode,\n        font: \"boldsymbol\",\n        body: body\n      }]\n    };\n  }\n}); // Old font changing functions\n\ndefineFunction({\n  type: \"font\",\n  names: [\"\\\\rm\", \"\\\\sf\", \"\\\\tt\", \"\\\\bf\", \"\\\\it\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true\n  },\n  handler: function handler(_ref3, args) {\n    var parser = _ref3.parser,\n        funcName = _ref3.funcName,\n        breakOnTokenText = _ref3.breakOnTokenText;\n    var mode = parser.mode;\n    var body = parser.parseExpression(true, breakOnTokenText);\n    var style = \"math\" + funcName.slice(1);\n    return {\n      type: \"font\",\n      mode: mode,\n      font: style,\n      body: {\n        type: \"ordgroup\",\n        mode: parser.mode,\n        body: body\n      }\n    };\n  },\n  htmlBuilder: font_htmlBuilder,\n  mathmlBuilder: font_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/genfrac.js\n\n\n\n\n\n\n\n\n\n\n\nvar genfrac_adjustStyle = function adjustStyle(size, originalStyle) {\n  // Figure out what style this fraction should be in based on the\n  // function used\n  var style = originalStyle;\n\n  if (size === \"display\") {\n    // Get display style as a default.\n    // If incoming style is sub/sup, use style.text() to get correct size.\n    style = style.id >= src_Style.SCRIPT.id ? style.text() : src_Style.DISPLAY;\n  } else if (size === \"text\" && style.size === src_Style.DISPLAY.size) {\n    // We're in a \\tfrac but incoming style is displaystyle, so:\n    style = src_Style.TEXT;\n  } else if (size === \"script\") {\n    style = src_Style.SCRIPT;\n  } else if (size === \"scriptscript\") {\n    style = src_Style.SCRIPTSCRIPT;\n  }\n\n  return style;\n};\n\nvar genfrac_htmlBuilder = function htmlBuilder(group, options) {\n  // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).\n  var style = genfrac_adjustStyle(group.size, options.style);\n  var nstyle = style.fracNum();\n  var dstyle = style.fracDen();\n  var newOptions;\n  newOptions = options.havingStyle(nstyle);\n  var numerm = buildHTML_buildGroup(group.numer, newOptions, options);\n\n  if (group.continued) {\n    // \\cfrac inserts a \\strut into the numerator.\n    // Get \\strut dimensions from TeXbook page 353.\n    var hStrut = 8.5 / options.fontMetrics().ptPerEm;\n    var dStrut = 3.5 / options.fontMetrics().ptPerEm;\n    numerm.height = numerm.height < hStrut ? hStrut : numerm.height;\n    numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth;\n  }\n\n  newOptions = options.havingStyle(dstyle);\n  var denomm = buildHTML_buildGroup(group.denom, newOptions, options);\n  var rule;\n  var ruleWidth;\n  var ruleSpacing;\n\n  if (group.hasBarLine) {\n    if (group.barSize) {\n      ruleWidth = units_calculateSize(group.barSize, options);\n      rule = buildCommon.makeLineSpan(\"frac-line\", options, ruleWidth);\n    } else {\n      rule = buildCommon.makeLineSpan(\"frac-line\", options);\n    }\n\n    ruleWidth = rule.height;\n    ruleSpacing = rule.height;\n  } else {\n    rule = null;\n    ruleWidth = 0;\n    ruleSpacing = options.fontMetrics().defaultRuleThickness;\n  } // Rule 15b\n\n\n  var numShift;\n  var clearance;\n  var denomShift;\n\n  if (style.size === src_Style.DISPLAY.size || group.size === \"display\") {\n    numShift = options.fontMetrics().num1;\n\n    if (ruleWidth > 0) {\n      clearance = 3 * ruleSpacing;\n    } else {\n      clearance = 7 * ruleSpacing;\n    }\n\n    denomShift = options.fontMetrics().denom1;\n  } else {\n    if (ruleWidth > 0) {\n      numShift = options.fontMetrics().num2;\n      clearance = ruleSpacing;\n    } else {\n      numShift = options.fontMetrics().num3;\n      clearance = 3 * ruleSpacing;\n    }\n\n    denomShift = options.fontMetrics().denom2;\n  }\n\n  var frac;\n\n  if (!rule) {\n    // Rule 15c\n    var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);\n\n    if (candidateClearance < clearance) {\n      numShift += 0.5 * (clearance - candidateClearance);\n      denomShift += 0.5 * (clearance - candidateClearance);\n    }\n\n    frac = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: [{\n        type: \"elem\",\n        elem: denomm,\n        shift: denomShift\n      }, {\n        type: \"elem\",\n        elem: numerm,\n        shift: -numShift\n      }]\n    }, options);\n  } else {\n    // Rule 15d\n    var axisHeight = options.fontMetrics().axisHeight;\n\n    if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {\n      numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));\n    }\n\n    if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {\n      denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));\n    }\n\n    var midShift = -(axisHeight - 0.5 * ruleWidth);\n    frac = buildCommon.makeVList({\n      positionType: \"individualShift\",\n      children: [{\n        type: \"elem\",\n        elem: denomm,\n        shift: denomShift\n      }, {\n        type: \"elem\",\n        elem: rule,\n        shift: midShift\n      }, {\n        type: \"elem\",\n        elem: numerm,\n        shift: -numShift\n      }]\n    }, options);\n  } // Since we manually change the style sometimes (with \\dfrac or \\tfrac),\n  // account for the possible size change here.\n\n\n  newOptions = options.havingStyle(style);\n  frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;\n  frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e\n\n  var delimSize;\n\n  if (style.size === src_Style.DISPLAY.size) {\n    delimSize = options.fontMetrics().delim1;\n  } else {\n    delimSize = options.fontMetrics().delim2;\n  }\n\n  var leftDelim;\n  var rightDelim;\n\n  if (group.leftDelim == null) {\n    leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n  } else {\n    leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mopen\"]);\n  }\n\n  if (group.continued) {\n    rightDelim = buildCommon.makeSpan([]); // zero width for \\cfrac\n  } else if (group.rightDelim == null) {\n    rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n  } else {\n    rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mclose\"]);\n  }\n\n  return buildCommon.makeSpan([\"mord\"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan([\"mfrac\"], [frac]), rightDelim], options);\n};\n\nvar genfrac_mathmlBuilder = function mathmlBuilder(group, options) {\n  var node = new mathMLTree.MathNode(\"mfrac\", [buildMathML_buildGroup(group.numer, options), buildMathML_buildGroup(group.denom, options)]);\n\n  if (!group.hasBarLine) {\n    node.setAttribute(\"linethickness\", \"0px\");\n  } else if (group.barSize) {\n    var ruleWidth = units_calculateSize(group.barSize, options);\n    node.setAttribute(\"linethickness\", ruleWidth + \"em\");\n  }\n\n  var style = genfrac_adjustStyle(group.size, options.style);\n\n  if (style.size !== options.style.size) {\n    node = new mathMLTree.MathNode(\"mstyle\", [node]);\n    var isDisplay = style.size === src_Style.DISPLAY.size ? \"true\" : \"false\";\n    node.setAttribute(\"displaystyle\", isDisplay);\n    node.setAttribute(\"scriptlevel\", \"0\");\n  }\n\n  if (group.leftDelim != null || group.rightDelim != null) {\n    var withDelims = [];\n\n    if (group.leftDelim != null) {\n      var leftOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.leftDelim.replace(\"\\\\\", \"\"))]);\n      leftOp.setAttribute(\"fence\", \"true\");\n      withDelims.push(leftOp);\n    }\n\n    withDelims.push(node);\n\n    if (group.rightDelim != null) {\n      var rightOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.rightDelim.replace(\"\\\\\", \"\"))]);\n      rightOp.setAttribute(\"fence\", \"true\");\n      withDelims.push(rightOp);\n    }\n\n    return buildMathML_makeRow(withDelims);\n  }\n\n  return node;\n};\n\ndefineFunction({\n  type: \"genfrac\",\n  names: [\"\\\\cfrac\", \"\\\\dfrac\", \"\\\\frac\", \"\\\\tfrac\", \"\\\\dbinom\", \"\\\\binom\", \"\\\\tbinom\", \"\\\\\\\\atopfrac\", // can’t be entered directly\n  \"\\\\\\\\bracefrac\", \"\\\\\\\\brackfrac\"],\n  props: {\n    numArgs: 2,\n    greediness: 2\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var numer = args[0];\n    var denom = args[1];\n    var hasBarLine;\n    var leftDelim = null;\n    var rightDelim = null;\n    var size = \"auto\";\n\n    switch (funcName) {\n      case \"\\\\cfrac\":\n      case \"\\\\dfrac\":\n      case \"\\\\frac\":\n      case \"\\\\tfrac\":\n        hasBarLine = true;\n        break;\n\n      case \"\\\\\\\\atopfrac\":\n        hasBarLine = false;\n        break;\n\n      case \"\\\\dbinom\":\n      case \"\\\\binom\":\n      case \"\\\\tbinom\":\n        hasBarLine = false;\n        leftDelim = \"(\";\n        rightDelim = \")\";\n        break;\n\n      case \"\\\\\\\\bracefrac\":\n        hasBarLine = false;\n        leftDelim = \"\\\\{\";\n        rightDelim = \"\\\\}\";\n        break;\n\n      case \"\\\\\\\\brackfrac\":\n        hasBarLine = false;\n        leftDelim = \"[\";\n        rightDelim = \"]\";\n        break;\n\n      default:\n        throw new Error(\"Unrecognized genfrac command\");\n    }\n\n    switch (funcName) {\n      case \"\\\\cfrac\":\n      case \"\\\\dfrac\":\n      case \"\\\\dbinom\":\n        size = \"display\";\n        break;\n\n      case \"\\\\tfrac\":\n      case \"\\\\tbinom\":\n        size = \"text\";\n        break;\n    }\n\n    return {\n      type: \"genfrac\",\n      mode: parser.mode,\n      continued: funcName === \"\\\\cfrac\",\n      numer: numer,\n      denom: denom,\n      hasBarLine: hasBarLine,\n      leftDelim: leftDelim,\n      rightDelim: rightDelim,\n      size: size,\n      barSize: null\n    };\n  },\n  htmlBuilder: genfrac_htmlBuilder,\n  mathmlBuilder: genfrac_mathmlBuilder\n}); // Infix generalized fractions -- these are not rendered directly, but replaced\n// immediately by one of the variants above.\n\ndefineFunction({\n  type: \"infix\",\n  names: [\"\\\\over\", \"\\\\choose\", \"\\\\atop\", \"\\\\brace\", \"\\\\brack\"],\n  props: {\n    numArgs: 0,\n    infix: true\n  },\n  handler: function handler(_ref2) {\n    var parser = _ref2.parser,\n        funcName = _ref2.funcName,\n        token = _ref2.token;\n    var replaceWith;\n\n    switch (funcName) {\n      case \"\\\\over\":\n        replaceWith = \"\\\\frac\";\n        break;\n\n      case \"\\\\choose\":\n        replaceWith = \"\\\\binom\";\n        break;\n\n      case \"\\\\atop\":\n        replaceWith = \"\\\\\\\\atopfrac\";\n        break;\n\n      case \"\\\\brace\":\n        replaceWith = \"\\\\\\\\bracefrac\";\n        break;\n\n      case \"\\\\brack\":\n        replaceWith = \"\\\\\\\\brackfrac\";\n        break;\n\n      default:\n        throw new Error(\"Unrecognized infix genfrac command\");\n    }\n\n    return {\n      type: \"infix\",\n      mode: parser.mode,\n      replaceWith: replaceWith,\n      token: token\n    };\n  }\n});\nvar stylArray = [\"display\", \"text\", \"script\", \"scriptscript\"];\n\nvar delimFromValue = function delimFromValue(delimString) {\n  var delim = null;\n\n  if (delimString.length > 0) {\n    delim = delimString;\n    delim = delim === \".\" ? null : delim;\n  }\n\n  return delim;\n};\n\ndefineFunction({\n  type: \"genfrac\",\n  names: [\"\\\\genfrac\"],\n  props: {\n    numArgs: 6,\n    greediness: 6,\n    argTypes: [\"math\", \"math\", \"size\", \"text\", \"math\", \"math\"]\n  },\n  handler: function handler(_ref3, args) {\n    var parser = _ref3.parser;\n    var numer = args[4];\n    var denom = args[5]; // Look into the parse nodes to get the desired delimiters.\n\n    var leftNode = checkNodeType(args[0], \"atom\");\n\n    if (leftNode) {\n      leftNode = assertAtomFamily(args[0], \"open\");\n    }\n\n    var leftDelim = leftNode ? delimFromValue(leftNode.text) : null;\n    var rightNode = checkNodeType(args[1], \"atom\");\n\n    if (rightNode) {\n      rightNode = assertAtomFamily(args[1], \"close\");\n    }\n\n    var rightDelim = rightNode ? delimFromValue(rightNode.text) : null;\n    var barNode = assertNodeType(args[2], \"size\");\n    var hasBarLine;\n    var barSize = null;\n\n    if (barNode.isBlank) {\n      // \\genfrac acts differently than \\above.\n      // \\genfrac treats an empty size group as a signal to use a\n      // standard bar size. \\above would see size = 0 and omit the bar.\n      hasBarLine = true;\n    } else {\n      barSize = barNode.value;\n      hasBarLine = barSize.number > 0;\n    } // Find out if we want displaystyle, textstyle, etc.\n\n\n    var size = \"auto\";\n    var styl = checkNodeType(args[3], \"ordgroup\");\n\n    if (styl) {\n      if (styl.body.length > 0) {\n        var textOrd = assertNodeType(styl.body[0], \"textord\");\n        size = stylArray[Number(textOrd.text)];\n      }\n    } else {\n      styl = assertNodeType(args[3], \"textord\");\n      size = stylArray[Number(styl.text)];\n    }\n\n    return {\n      type: \"genfrac\",\n      mode: parser.mode,\n      numer: numer,\n      denom: denom,\n      continued: false,\n      hasBarLine: hasBarLine,\n      barSize: barSize,\n      leftDelim: leftDelim,\n      rightDelim: rightDelim,\n      size: size\n    };\n  },\n  htmlBuilder: genfrac_htmlBuilder,\n  mathmlBuilder: genfrac_mathmlBuilder\n}); // \\above is an infix fraction that also defines a fraction bar size.\n\ndefineFunction({\n  type: \"infix\",\n  names: [\"\\\\above\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"size\"],\n    infix: true\n  },\n  handler: function handler(_ref4, args) {\n    var parser = _ref4.parser,\n        funcName = _ref4.funcName,\n        token = _ref4.token;\n    return {\n      type: \"infix\",\n      mode: parser.mode,\n      replaceWith: \"\\\\\\\\abovefrac\",\n      size: assertNodeType(args[0], \"size\").value,\n      token: token\n    };\n  }\n});\ndefineFunction({\n  type: \"genfrac\",\n  names: [\"\\\\\\\\abovefrac\"],\n  props: {\n    numArgs: 3,\n    argTypes: [\"math\", \"size\", \"math\"]\n  },\n  handler: function handler(_ref5, args) {\n    var parser = _ref5.parser,\n        funcName = _ref5.funcName;\n    var numer = args[0];\n    var barSize = assert(assertNodeType(args[1], \"infix\").size);\n    var denom = args[2];\n    var hasBarLine = barSize.number > 0;\n    return {\n      type: \"genfrac\",\n      mode: parser.mode,\n      numer: numer,\n      denom: denom,\n      continued: false,\n      hasBarLine: hasBarLine,\n      barSize: barSize,\n      leftDelim: null,\n      rightDelim: null,\n      size: \"auto\"\n    };\n  },\n  htmlBuilder: genfrac_htmlBuilder,\n  mathmlBuilder: genfrac_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/horizBrace.js\n\n\n\n\n\n\n\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"horizBrace\", but\nvar horizBrace_htmlBuilder = function htmlBuilder(grp, options) {\n  var style = options.style; // Pull out the `ParseNode<\"horizBrace\">` if `grp` is a \"supsub\" node.\n\n  var supSubGroup;\n  var group;\n  var supSub = checkNodeType(grp, \"supsub\");\n\n  if (supSub) {\n    // Ref: LaTeX source2e: }}}}\\limits}\n    // i.e. LaTeX treats the brace similar to an op and passes it\n    // with \\limits, so we need to assign supsub style.\n    supSubGroup = supSub.sup ? buildHTML_buildGroup(supSub.sup, options.havingStyle(style.sup()), options) : buildHTML_buildGroup(supSub.sub, options.havingStyle(style.sub()), options);\n    group = assertNodeType(supSub.base, \"horizBrace\");\n  } else {\n    group = assertNodeType(grp, \"horizBrace\");\n  } // Build the base group\n\n\n  var body = buildHTML_buildGroup(group.base, options.havingBaseStyle(src_Style.DISPLAY)); // Create the stretchy element\n\n  var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns        ┏━━━━━━━━┓\n  // This first vlist contains the content and the brace:   equation\n\n  var vlist;\n\n  if (group.isOver) {\n    vlist = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: body\n      }, {\n        type: \"kern\",\n        size: 0.1\n      }, {\n        type: \"elem\",\n        elem: braceBody\n      }]\n    }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n    vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n  } else {\n    vlist = buildCommon.makeVList({\n      positionType: \"bottom\",\n      positionData: body.depth + 0.1 + braceBody.height,\n      children: [{\n        type: \"elem\",\n        elem: braceBody\n      }, {\n        type: \"kern\",\n        size: 0.1\n      }, {\n        type: \"elem\",\n        elem: body\n      }]\n    }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n    vlist.children[0].children[0].children[0].classes.push(\"svg-align\");\n  }\n\n  if (supSubGroup) {\n    // To write the supsub, wrap the first vlist in another vlist:\n    // They can't all go in the same vlist, because the note might be\n    // wider than the equation. We want the equation to control the\n    // brace width.\n    //      note          long note           long note\n    //   ┏━━━━━━━━┓   or    ┏━━━┓     not    ┏━━━━━━━━━┓\n    //    equation           eqn                 eqn\n    var vSpan = buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n\n    if (group.isOver) {\n      vlist = buildCommon.makeVList({\n        positionType: \"firstBaseline\",\n        children: [{\n          type: \"elem\",\n          elem: vSpan\n        }, {\n          type: \"kern\",\n          size: 0.2\n        }, {\n          type: \"elem\",\n          elem: supSubGroup\n        }]\n      }, options);\n    } else {\n      vlist = buildCommon.makeVList({\n        positionType: \"bottom\",\n        positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth,\n        children: [{\n          type: \"elem\",\n          elem: supSubGroup\n        }, {\n          type: \"kern\",\n          size: 0.2\n        }, {\n          type: \"elem\",\n          elem: vSpan\n        }]\n      }, options);\n    }\n  }\n\n  return buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n};\n\nvar horizBrace_mathmlBuilder = function mathmlBuilder(group, options) {\n  var accentNode = stretchy.mathMLnode(group.label);\n  return new mathMLTree.MathNode(group.isOver ? \"mover\" : \"munder\", [buildMathML_buildGroup(group.base, options), accentNode]);\n}; // Horizontal stretchy braces\n\n\ndefineFunction({\n  type: \"horizBrace\",\n  names: [\"\\\\overbrace\", \"\\\\underbrace\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    return {\n      type: \"horizBrace\",\n      mode: parser.mode,\n      label: funcName,\n      isOver: /^\\\\over/.test(funcName),\n      base: args[0]\n    };\n  },\n  htmlBuilder: horizBrace_htmlBuilder,\n  mathmlBuilder: horizBrace_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/href.js\n\n\n\n\n\n\ndefineFunction({\n  type: \"href\",\n  names: [\"\\\\href\"],\n  props: {\n    numArgs: 2,\n    argTypes: [\"url\", \"original\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var body = args[1];\n    var href = assertNodeType(args[0], \"url\").url;\n    return {\n      type: \"href\",\n      mode: parser.mode,\n      href: href,\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var elements = buildHTML_buildExpression(group.body, options, false);\n    return buildCommon.makeAnchor(group.href, [], elements, options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var math = buildExpressionRow(group.body, options);\n\n    if (!(math instanceof mathMLTree_MathNode)) {\n      math = new mathMLTree_MathNode(\"mrow\", [math]);\n    }\n\n    math.setAttribute(\"href\", group.href);\n    return math;\n  }\n});\ndefineFunction({\n  type: \"href\",\n  names: [\"\\\\url\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"url\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser;\n    var href = assertNodeType(args[0], \"url\").url;\n    var chars = [];\n\n    for (var i = 0; i < href.length; i++) {\n      var c = href[i];\n\n      if (c === \"~\") {\n        c = \"\\\\textasciitilde\";\n      }\n\n      chars.push({\n        type: \"textord\",\n        mode: \"text\",\n        text: c\n      });\n    }\n\n    var body = {\n      type: \"text\",\n      mode: parser.mode,\n      font: \"\\\\texttt\",\n      body: chars\n    };\n    return {\n      type: \"href\",\n      mode: parser.mode,\n      href: href,\n      body: defineFunction_ordargument(body)\n    };\n  }\n});\n// CONCATENATED MODULE: ./src/functions/htmlmathml.js\n\n\n\n\ndefineFunction({\n  type: \"htmlmathml\",\n  names: [\"\\\\html@mathml\"],\n  props: {\n    numArgs: 2,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    return {\n      type: \"htmlmathml\",\n      mode: parser.mode,\n      html: defineFunction_ordargument(args[0]),\n      mathml: defineFunction_ordargument(args[1])\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var elements = buildHTML_buildExpression(group.html, options, false);\n    return buildCommon.makeFragment(elements);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    return buildExpressionRow(group.mathml, options);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/kern.js\n// Horizontal spacing commands\n\n\n\n\n // TODO: \\hskip and \\mskip should support plus and minus in lengths\n\ndefineFunction({\n  type: \"kern\",\n  names: [\"\\\\kern\", \"\\\\mkern\", \"\\\\hskip\", \"\\\\mskip\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"size\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var size = assertNodeType(args[0], \"size\");\n\n    if (parser.settings.strict) {\n      var mathFunction = funcName[1] === 'm'; // \\mkern, \\mskip\n\n      var muUnit = size.value.unit === 'mu';\n\n      if (mathFunction) {\n        if (!muUnit) {\n          parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" supports only mu units, \" + (\"not \" + size.value.unit + \" units\"));\n        }\n\n        if (parser.mode !== \"math\") {\n          parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" works only in math mode\");\n        }\n      } else {\n        // !mathFunction\n        if (muUnit) {\n          parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" doesn't support mu units\");\n        }\n      }\n    }\n\n    return {\n      type: \"kern\",\n      mode: parser.mode,\n      dimension: size.value\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    return buildCommon.makeGlue(group.dimension, options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var dimension = units_calculateSize(group.dimension, options);\n    return new mathMLTree.SpaceNode(dimension);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/lap.js\n// Horizontal overlap functions\n\n\n\n\n\ndefineFunction({\n  type: \"lap\",\n  names: [\"\\\\mathllap\", \"\\\\mathrlap\", \"\\\\mathclap\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var body = args[0];\n    return {\n      type: \"lap\",\n      mode: parser.mode,\n      alignment: funcName.slice(5),\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // mathllap, mathrlap, mathclap\n    var inner;\n\n    if (group.alignment === \"clap\") {\n      // ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/\n      inner = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span\n\n      inner = buildCommon.makeSpan([\"inner\"], [inner], options);\n    } else {\n      inner = buildCommon.makeSpan([\"inner\"], [buildHTML_buildGroup(group.body, options)]);\n    }\n\n    var fix = buildCommon.makeSpan([\"fix\"], []);\n    var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the\n    // two items involved in the lap.\n    // Next, use a strut to set the height of the HTML bounding box.\n    // Otherwise, a tall argument may be misplaced.\n\n    var strut = buildCommon.makeSpan([\"strut\"]);\n    strut.style.height = node.height + node.depth + \"em\";\n    strut.style.verticalAlign = -node.depth + \"em\";\n    node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall.\n\n    node = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: node\n      }]\n    }, options); // Get the horizontal spacing correct relative to adjacent items.\n\n    return buildCommon.makeSpan([\"mord\"], [node], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    // mathllap, mathrlap, mathclap\n    var node = new mathMLTree.MathNode(\"mpadded\", [buildMathML_buildGroup(group.body, options)]);\n\n    if (group.alignment !== \"rlap\") {\n      var offset = group.alignment === \"llap\" ? \"-1\" : \"-0.5\";\n      node.setAttribute(\"lspace\", offset + \"width\");\n    }\n\n    node.setAttribute(\"width\", \"0px\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/math.js\n\n // Switching from text mode back to math mode\n\ndefineFunction({\n  type: \"styling\",\n  names: [\"\\\\(\", \"$\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true,\n    allowedInMath: false,\n    consumeMode: \"math\"\n  },\n  handler: function handler(_ref, args) {\n    var funcName = _ref.funcName,\n        parser = _ref.parser;\n    var outerMode = parser.mode;\n    parser.switchMode(\"math\");\n    var close = funcName === \"\\\\(\" ? \"\\\\)\" : \"$\";\n    var body = parser.parseExpression(false, close); // We can't expand the next symbol after the closing $ until after\n    // switching modes back.  So don't consume within expect.\n\n    parser.expect(close, false);\n    parser.switchMode(outerMode);\n    parser.consume();\n    return {\n      type: \"styling\",\n      mode: parser.mode,\n      style: \"text\",\n      body: body\n    };\n  }\n}); // Check for extra closing math delimiters\n\ndefineFunction({\n  type: \"text\",\n  // Doesn't matter what this is.\n  names: [\"\\\\)\", \"\\\\]\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true,\n    allowedInMath: false\n  },\n  handler: function handler(context, args) {\n    throw new src_ParseError(\"Mismatched \" + context.funcName);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/mathchoice.js\n\n\n\n\n\n\nvar mathchoice_chooseMathStyle = function chooseMathStyle(group, options) {\n  switch (options.style.size) {\n    case src_Style.DISPLAY.size:\n      return group.display;\n\n    case src_Style.TEXT.size:\n      return group.text;\n\n    case src_Style.SCRIPT.size:\n      return group.script;\n\n    case src_Style.SCRIPTSCRIPT.size:\n      return group.scriptscript;\n\n    default:\n      return group.text;\n  }\n};\n\ndefineFunction({\n  type: \"mathchoice\",\n  names: [\"\\\\mathchoice\"],\n  props: {\n    numArgs: 4\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    return {\n      type: \"mathchoice\",\n      mode: parser.mode,\n      display: defineFunction_ordargument(args[0]),\n      text: defineFunction_ordargument(args[1]),\n      script: defineFunction_ordargument(args[2]),\n      scriptscript: defineFunction_ordargument(args[3])\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var body = mathchoice_chooseMathStyle(group, options);\n    var elements = buildHTML_buildExpression(body, options, false);\n    return buildCommon.makeFragment(elements);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var body = mathchoice_chooseMathStyle(group, options);\n    return buildExpressionRow(body, options);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/op.js\n// Limits, symbols\n\n\n\n\n\n\n\n\n\n// Most operators have a large successor symbol, but these don't.\nvar noSuccessor = [\"\\\\smallint\"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only \"op\", but also\n// \"supsub\" since some of them (like \\int) can affect super/subscripting.\n\nvar op_htmlBuilder = function htmlBuilder(grp, options) {\n  // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n  var supGroup;\n  var subGroup;\n  var hasLimits = false;\n  var group;\n  var supSub = checkNodeType(grp, \"supsub\");\n\n  if (supSub) {\n    // If we have limits, supsub will pass us its group to handle. Pull\n    // out the superscript and subscript and set the group to the op in\n    // its base.\n    supGroup = supSub.sup;\n    subGroup = supSub.sub;\n    group = assertNodeType(supSub.base, \"op\");\n    hasLimits = true;\n  } else {\n    group = assertNodeType(grp, \"op\");\n  }\n\n  var style = options.style;\n  var large = false;\n\n  if (style.size === src_Style.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {\n    // Most symbol operators get larger in displaystyle (rule 13)\n    large = true;\n  }\n\n  var base;\n\n  if (group.symbol) {\n    // If this is a symbol, create the symbol.\n    var fontName = large ? \"Size2-Regular\" : \"Size1-Regular\";\n    var stash = \"\";\n\n    if (group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") {\n      // No font glyphs yet, so use a glyph w/o the oval.\n      // TODO: When font glyphs are available, delete this code.\n      stash = group.name.substr(1); // $FlowFixMe\n\n      group.name = stash === \"oiint\" ? \"\\\\iint\" : \"\\\\iiint\";\n    }\n\n    base = buildCommon.makeSymbol(group.name, fontName, \"math\", options, [\"mop\", \"op-symbol\", large ? \"large-op\" : \"small-op\"]);\n\n    if (stash.length > 0) {\n      // We're in \\oiint or \\oiiint. Overlay the oval.\n      // TODO: When font glyphs are available, delete this code.\n      var italic = base.italic;\n      var oval = buildCommon.staticSvg(stash + \"Size\" + (large ? \"2\" : \"1\"), options);\n      base = buildCommon.makeVList({\n        positionType: \"individualShift\",\n        children: [{\n          type: \"elem\",\n          elem: base,\n          shift: 0\n        }, {\n          type: \"elem\",\n          elem: oval,\n          shift: large ? 0.08 : 0\n        }]\n      }, options); // $FlowFixMe\n\n      group.name = \"\\\\\" + stash;\n      base.classes.unshift(\"mop\"); // $FlowFixMe\n\n      base.italic = italic;\n    }\n  } else if (group.body) {\n    // If this is a list, compose that list.\n    var inner = buildHTML_buildExpression(group.body, options, true);\n\n    if (inner.length === 1 && inner[0] instanceof domTree_SymbolNode) {\n      base = inner[0];\n      base.classes[0] = \"mop\"; // replace old mclass\n    } else {\n      base = buildCommon.makeSpan([\"mop\"], buildCommon.tryCombineChars(inner), options);\n    }\n  } else {\n    // Otherwise, this is a text operator. Build the text from the\n    // operator's name.\n    // TODO(emily): Add a space in the middle of some of these\n    // operators, like \\limsup\n    var output = [];\n\n    for (var i = 1; i < group.name.length; i++) {\n      output.push(buildCommon.mathsym(group.name[i], group.mode));\n    }\n\n    base = buildCommon.makeSpan([\"mop\"], output, options);\n  } // If content of op is a single symbol, shift it vertically.\n\n\n  var baseShift = 0;\n  var slant = 0;\n\n  if ((base instanceof domTree_SymbolNode || group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") && !group.suppressBaseShift) {\n    // We suppress the shift of the base of \\overset and \\underset. Otherwise,\n    // shift the symbol so its center lies on the axis (rule 13). It\n    // appears that our fonts have the centers of the symbols already\n    // almost on the axis, so these numbers are very small. Note we\n    // don't actually apply this here, but instead it is used either in\n    // the vlist creation or separately when there are no limits.\n    baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction.\n    // $FlowFixMe\n\n    slant = base.italic;\n  }\n\n  if (hasLimits) {\n    // IE 8 clips \\int if it is in a display: inline-block. We wrap it\n    // in a new span so it is an inline, and works.\n    base = buildCommon.makeSpan([], [base]);\n    var sub;\n    var sup; // We manually have to handle the superscripts and subscripts. This,\n    // aside from the kern calculations, is copied from supsub.\n\n    if (supGroup) {\n      var elem = buildHTML_buildGroup(supGroup, options.havingStyle(style.sup()), options);\n      sup = {\n        elem: elem,\n        kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth)\n      };\n    }\n\n    if (subGroup) {\n      var _elem = buildHTML_buildGroup(subGroup, options.havingStyle(style.sub()), options);\n\n      sub = {\n        elem: _elem,\n        kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height)\n      };\n    } // Build the final group as a vlist of the possible subscript, base,\n    // and possible superscript.\n\n\n    var finalGroup;\n\n    if (sup && sub) {\n      var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift;\n      finalGroup = buildCommon.makeVList({\n        positionType: \"bottom\",\n        positionData: bottom,\n        children: [{\n          type: \"kern\",\n          size: options.fontMetrics().bigOpSpacing5\n        }, {\n          type: \"elem\",\n          elem: sub.elem,\n          marginLeft: -slant + \"em\"\n        }, {\n          type: \"kern\",\n          size: sub.kern\n        }, {\n          type: \"elem\",\n          elem: base\n        }, {\n          type: \"kern\",\n          size: sup.kern\n        }, {\n          type: \"elem\",\n          elem: sup.elem,\n          marginLeft: slant + \"em\"\n        }, {\n          type: \"kern\",\n          size: options.fontMetrics().bigOpSpacing5\n        }]\n      }, options);\n    } else if (sub) {\n      var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note\n      // that we are supposed to shift the limits by 1/2 of the slant,\n      // but since we are centering the limits adding a full slant of\n      // margin will shift by 1/2 that.\n\n      finalGroup = buildCommon.makeVList({\n        positionType: \"top\",\n        positionData: top,\n        children: [{\n          type: \"kern\",\n          size: options.fontMetrics().bigOpSpacing5\n        }, {\n          type: \"elem\",\n          elem: sub.elem,\n          marginLeft: -slant + \"em\"\n        }, {\n          type: \"kern\",\n          size: sub.kern\n        }, {\n          type: \"elem\",\n          elem: base\n        }]\n      }, options);\n    } else if (sup) {\n      var _bottom = base.depth + baseShift;\n\n      finalGroup = buildCommon.makeVList({\n        positionType: \"bottom\",\n        positionData: _bottom,\n        children: [{\n          type: \"elem\",\n          elem: base\n        }, {\n          type: \"kern\",\n          size: sup.kern\n        }, {\n          type: \"elem\",\n          elem: sup.elem,\n          marginLeft: slant + \"em\"\n        }, {\n          type: \"kern\",\n          size: options.fontMetrics().bigOpSpacing5\n        }]\n      }, options);\n    } else {\n      // This case probably shouldn't occur (this would mean the\n      // supsub was sending us a group with no superscript or\n      // subscript) but be safe.\n      return base;\n    }\n\n    return buildCommon.makeSpan([\"mop\", \"op-limits\"], [finalGroup], options);\n  } else {\n    if (baseShift) {\n      base.style.position = \"relative\";\n      base.style.top = baseShift + \"em\";\n    }\n\n    return base;\n  }\n};\n\nvar op_mathmlBuilder = function mathmlBuilder(group, options) {\n  var node;\n\n  if (group.symbol) {\n    // This is a symbol. Just add the symbol.\n    node = new mathMLTree_MathNode(\"mo\", [buildMathML_makeText(group.name, group.mode)]);\n\n    if (utils.contains(noSuccessor, group.name)) {\n      node.setAttribute(\"largeop\", \"false\");\n    }\n  } else if (group.body) {\n    // This is an operator with children. Add them.\n    node = new mathMLTree_MathNode(\"mo\", buildMathML_buildExpression(group.body, options));\n  } else {\n    // This is a text operator. Add all of the characters from the\n    // operator's name.\n    // TODO(emily): Add a space in the middle of some of these\n    // operators, like \\limsup.\n    node = new mathMLTree_MathNode(\"mi\", [new mathMLTree_TextNode(group.name.slice(1))]); // Append an <mo>&ApplyFunction;</mo>.\n    // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4\n\n    var operator = new mathMLTree_MathNode(\"mo\", [buildMathML_makeText(\"\\u2061\", \"text\")]);\n\n    if (group.parentIsSupSub) {\n      node = new mathMLTree_MathNode(\"mo\", [node, operator]);\n    } else {\n      node = newDocumentFragment([node, operator]);\n    }\n  }\n\n  return node;\n};\n\nvar singleCharBigOps = {\n  \"\\u220F\": \"\\\\prod\",\n  \"\\u2210\": \"\\\\coprod\",\n  \"\\u2211\": \"\\\\sum\",\n  \"\\u22C0\": \"\\\\bigwedge\",\n  \"\\u22C1\": \"\\\\bigvee\",\n  \"\\u22C2\": \"\\\\bigcap\",\n  \"\\u22C3\": \"\\\\bigcup\",\n  \"\\u2A00\": \"\\\\bigodot\",\n  \"\\u2A01\": \"\\\\bigoplus\",\n  \"\\u2A02\": \"\\\\bigotimes\",\n  \"\\u2A04\": \"\\\\biguplus\",\n  \"\\u2A06\": \"\\\\bigsqcup\"\n};\ndefineFunction({\n  type: \"op\",\n  names: [\"\\\\coprod\", \"\\\\bigvee\", \"\\\\bigwedge\", \"\\\\biguplus\", \"\\\\bigcap\", \"\\\\bigcup\", \"\\\\intop\", \"\\\\prod\", \"\\\\sum\", \"\\\\bigotimes\", \"\\\\bigoplus\", \"\\\\bigodot\", \"\\\\bigsqcup\", \"\\\\smallint\", \"\\u220F\", \"\\u2210\", \"\\u2211\", \"\\u22C0\", \"\\u22C1\", \"\\u22C2\", \"\\u22C3\", \"\\u2A00\", \"\\u2A01\", \"\\u2A02\", \"\\u2A04\", \"\\u2A06\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var fName = funcName;\n\n    if (fName.length === 1) {\n      fName = singleCharBigOps[fName];\n    }\n\n    return {\n      type: \"op\",\n      mode: parser.mode,\n      limits: true,\n      parentIsSupSub: false,\n      symbol: true,\n      name: fName\n    };\n  },\n  htmlBuilder: op_htmlBuilder,\n  mathmlBuilder: op_mathmlBuilder\n}); // Note: calling defineFunction with a type that's already been defined only\n// works because the same htmlBuilder and mathmlBuilder are being used.\n\ndefineFunction({\n  type: \"op\",\n  names: [\"\\\\mathop\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser;\n    var body = args[0];\n    return {\n      type: \"op\",\n      mode: parser.mode,\n      limits: false,\n      parentIsSupSub: false,\n      symbol: false,\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: op_htmlBuilder,\n  mathmlBuilder: op_mathmlBuilder\n}); // There are 2 flags for operators; whether they produce limits in\n// displaystyle, and whether they are symbols and should grow in\n// displaystyle. These four groups cover the four possible choices.\n\nvar singleCharIntegrals = {\n  \"\\u222B\": \"\\\\int\",\n  \"\\u222C\": \"\\\\iint\",\n  \"\\u222D\": \"\\\\iiint\",\n  \"\\u222E\": \"\\\\oint\",\n  \"\\u222F\": \"\\\\oiint\",\n  \"\\u2230\": \"\\\\oiiint\"\n}; // No limits, not symbols\n\ndefineFunction({\n  type: \"op\",\n  names: [\"\\\\arcsin\", \"\\\\arccos\", \"\\\\arctan\", \"\\\\arctg\", \"\\\\arcctg\", \"\\\\arg\", \"\\\\ch\", \"\\\\cos\", \"\\\\cosec\", \"\\\\cosh\", \"\\\\cot\", \"\\\\cotg\", \"\\\\coth\", \"\\\\csc\", \"\\\\ctg\", \"\\\\cth\", \"\\\\deg\", \"\\\\dim\", \"\\\\exp\", \"\\\\hom\", \"\\\\ker\", \"\\\\lg\", \"\\\\ln\", \"\\\\log\", \"\\\\sec\", \"\\\\sin\", \"\\\\sinh\", \"\\\\sh\", \"\\\\tan\", \"\\\\tanh\", \"\\\\tg\", \"\\\\th\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(_ref3) {\n    var parser = _ref3.parser,\n        funcName = _ref3.funcName;\n    return {\n      type: \"op\",\n      mode: parser.mode,\n      limits: false,\n      parentIsSupSub: false,\n      symbol: false,\n      name: funcName\n    };\n  },\n  htmlBuilder: op_htmlBuilder,\n  mathmlBuilder: op_mathmlBuilder\n}); // Limits, not symbols\n\ndefineFunction({\n  type: \"op\",\n  names: [\"\\\\det\", \"\\\\gcd\", \"\\\\inf\", \"\\\\lim\", \"\\\\max\", \"\\\\min\", \"\\\\Pr\", \"\\\\sup\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(_ref4) {\n    var parser = _ref4.parser,\n        funcName = _ref4.funcName;\n    return {\n      type: \"op\",\n      mode: parser.mode,\n      limits: true,\n      parentIsSupSub: false,\n      symbol: false,\n      name: funcName\n    };\n  },\n  htmlBuilder: op_htmlBuilder,\n  mathmlBuilder: op_mathmlBuilder\n}); // No limits, symbols\n\ndefineFunction({\n  type: \"op\",\n  names: [\"\\\\int\", \"\\\\iint\", \"\\\\iiint\", \"\\\\oint\", \"\\\\oiint\", \"\\\\oiiint\", \"\\u222B\", \"\\u222C\", \"\\u222D\", \"\\u222E\", \"\\u222F\", \"\\u2230\"],\n  props: {\n    numArgs: 0\n  },\n  handler: function handler(_ref5) {\n    var parser = _ref5.parser,\n        funcName = _ref5.funcName;\n    var fName = funcName;\n\n    if (fName.length === 1) {\n      fName = singleCharIntegrals[fName];\n    }\n\n    return {\n      type: \"op\",\n      mode: parser.mode,\n      limits: false,\n      parentIsSupSub: false,\n      symbol: true,\n      name: fName\n    };\n  },\n  htmlBuilder: op_htmlBuilder,\n  mathmlBuilder: op_mathmlBuilder\n});\n// CONCATENATED MODULE: ./src/functions/operatorname.js\n\n\n\n\n\n // \\operatorname\n// amsopn.dtx: \\mathop{#1\\kern\\z@\\operator@font#3}\\newmcodes@\n\ndefineFunction({\n  type: \"operatorname\",\n  names: [\"\\\\operatorname\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var body = args[0];\n    return {\n      type: \"operatorname\",\n      mode: parser.mode,\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    if (group.body.length > 0) {\n      var body = group.body.map(function (child) {\n        // $FlowFixMe: Check if the node has a string `text` property.\n        var childText = child.text;\n\n        if (typeof childText === \"string\") {\n          return {\n            type: \"textord\",\n            mode: child.mode,\n            text: childText\n          };\n        } else {\n          return child;\n        }\n      }); // Consolidate function names into symbol characters.\n\n      var expression = buildHTML_buildExpression(body, options.withFont(\"mathrm\"), true);\n\n      for (var i = 0; i < expression.length; i++) {\n        var child = expression[i];\n\n        if (child instanceof domTree_SymbolNode) {\n          // Per amsopn package,\n          // change minus to hyphen and \\ast to asterisk\n          child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n        }\n      }\n\n      return buildCommon.makeSpan([\"mop\"], expression, options);\n    } else {\n      return buildCommon.makeSpan([\"mop\"], [], options);\n    }\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    // The steps taken here are similar to the html version.\n    var expression = buildMathML_buildExpression(group.body, options.withFont(\"mathrm\")); // Is expression a string or has it something like a fraction?\n\n    var isAllString = true; // default\n\n    for (var i = 0; i < expression.length; i++) {\n      var node = expression[i];\n\n      if (node instanceof mathMLTree.SpaceNode) {// Do nothing\n      } else if (node instanceof mathMLTree.MathNode) {\n        switch (node.type) {\n          case \"mi\":\n          case \"mn\":\n          case \"ms\":\n          case \"mspace\":\n          case \"mtext\":\n            break;\n          // Do nothing yet.\n\n          case \"mo\":\n            {\n              var child = node.children[0];\n\n              if (node.children.length === 1 && child instanceof mathMLTree.TextNode) {\n                child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n              } else {\n                isAllString = false;\n              }\n\n              break;\n            }\n\n          default:\n            isAllString = false;\n        }\n      } else {\n        isAllString = false;\n      }\n    }\n\n    if (isAllString) {\n      // Write a single TextNode instead of multiple nested tags.\n      var word = expression.map(function (node) {\n        return node.toText();\n      }).join(\"\");\n      expression = [new mathMLTree.TextNode(word)];\n    }\n\n    var identifier = new mathMLTree.MathNode(\"mi\", expression);\n    identifier.setAttribute(\"mathvariant\", \"normal\"); // \\u2061 is the same as &ApplyFunction;\n    // ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp\n\n    var operator = new mathMLTree.MathNode(\"mo\", [buildMathML_makeText(\"\\u2061\", \"text\")]);\n    return mathMLTree.newDocumentFragment([identifier, operator]);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/ordgroup.js\n\n\n\n\ndefineFunctionBuilders({\n  type: \"ordgroup\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    if (group.semisimple) {\n      return buildCommon.makeFragment(buildHTML_buildExpression(group.body, options, false));\n    }\n\n    return buildCommon.makeSpan([\"mord\"], buildHTML_buildExpression(group.body, options, true), options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    return buildExpressionRow(group.body, options);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/overline.js\n\n\n\n\n\ndefineFunction({\n  type: \"overline\",\n  names: [\"\\\\overline\"],\n  props: {\n    numArgs: 1\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var body = args[0];\n    return {\n      type: \"overline\",\n      mode: parser.mode,\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Overlines are handled in the TeXbook pg 443, Rule 9.\n    // Build the inner group in the cramped style.\n    var innerGroup = buildHTML_buildGroup(group.body, options.havingCrampedStyle()); // Create the line above the body\n\n    var line = buildCommon.makeLineSpan(\"overline-line\", options); // Generate the vlist, with the appropriate kerns\n\n    var vlist = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: innerGroup\n      }, {\n        type: \"kern\",\n        size: 3 * line.height\n      }, {\n        type: \"elem\",\n        elem: line\n      }, {\n        type: \"kern\",\n        size: line.height\n      }]\n    }, options);\n    return buildCommon.makeSpan([\"mord\", \"overline\"], [vlist], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203E\")]);\n    operator.setAttribute(\"stretchy\", \"true\");\n    var node = new mathMLTree.MathNode(\"mover\", [buildMathML_buildGroup(group.body, options), operator]);\n    node.setAttribute(\"accent\", \"true\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/phantom.js\n\n\n\n\n\ndefineFunction({\n  type: \"phantom\",\n  names: [\"\\\\phantom\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var body = args[0];\n    return {\n      type: \"phantom\",\n      mode: parser.mode,\n      body: defineFunction_ordargument(body)\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var elements = buildHTML_buildExpression(group.body, options.withPhantom(), false); // \\phantom isn't supposed to affect the elements it contains.\n    // See \"color\" for more details.\n\n    return buildCommon.makeFragment(elements);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var inner = buildMathML_buildExpression(group.body, options);\n    return new mathMLTree.MathNode(\"mphantom\", inner);\n  }\n});\ndefineFunction({\n  type: \"hphantom\",\n  names: [\"\\\\hphantom\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref2, args) {\n    var parser = _ref2.parser;\n    var body = args[0];\n    return {\n      type: \"hphantom\",\n      mode: parser.mode,\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var node = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options.withPhantom())]);\n    node.height = 0;\n    node.depth = 0;\n\n    if (node.children) {\n      for (var i = 0; i < node.children.length; i++) {\n        node.children[i].height = 0;\n        node.children[i].depth = 0;\n      }\n    } // See smash for comment re: use of makeVList\n\n\n    node = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: node\n      }]\n    }, options); // For spacing, TeX treats \\smash as a math group (same spacing as ord).\n\n    return buildCommon.makeSpan([\"mord\"], [node], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);\n    var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n    var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n    node.setAttribute(\"height\", \"0px\");\n    node.setAttribute(\"depth\", \"0px\");\n    return node;\n  }\n});\ndefineFunction({\n  type: \"vphantom\",\n  names: [\"\\\\vphantom\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref3, args) {\n    var parser = _ref3.parser;\n    var body = args[0];\n    return {\n      type: \"vphantom\",\n      mode: parser.mode,\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var inner = buildCommon.makeSpan([\"inner\"], [buildHTML_buildGroup(group.body, options.withPhantom())]);\n    var fix = buildCommon.makeSpan([\"fix\"], []);\n    return buildCommon.makeSpan([\"mord\", \"rlap\"], [inner, fix], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);\n    var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n    var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n    node.setAttribute(\"width\", \"0px\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/sizing.js\n\n\n\n\n\nfunction sizingGroup(value, options, baseOptions) {\n  var inner = buildHTML_buildExpression(value, options, false);\n  var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize\n  // manually. Handle nested size changes.\n\n  for (var i = 0; i < inner.length; i++) {\n    var pos = inner[i].classes.indexOf(\"sizing\");\n\n    if (pos < 0) {\n      Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));\n    } else if (inner[i].classes[pos + 1] === \"reset-size\" + options.size) {\n      // This is a nested size change: e.g., inner[i] is the \"b\" in\n      // `\\Huge a \\small b`. Override the old size (the `reset-` class)\n      // but not the new size.\n      inner[i].classes[pos + 1] = \"reset-size\" + baseOptions.size;\n    }\n\n    inner[i].height *= multiplier;\n    inner[i].depth *= multiplier;\n  }\n\n  return buildCommon.makeFragment(inner);\n}\nvar sizeFuncs = [\"\\\\tiny\", \"\\\\sixptsize\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\", \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\"];\nvar sizing_htmlBuilder = function htmlBuilder(group, options) {\n  // Handle sizing operators like \\Huge. Real TeX doesn't actually allow\n  // these functions inside of math expressions, so we do some special\n  // handling.\n  var newOptions = options.havingSize(group.size);\n  return sizingGroup(group.body, newOptions, options);\n};\ndefineFunction({\n  type: \"sizing\",\n  names: sizeFuncs,\n  props: {\n    numArgs: 0,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var breakOnTokenText = _ref.breakOnTokenText,\n        funcName = _ref.funcName,\n        parser = _ref.parser;\n    var body = parser.parseExpression(false, breakOnTokenText);\n    return {\n      type: \"sizing\",\n      mode: parser.mode,\n      // Figure out what size to use based on the list of functions above\n      size: sizeFuncs.indexOf(funcName) + 1,\n      body: body\n    };\n  },\n  htmlBuilder: sizing_htmlBuilder,\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var newOptions = options.havingSize(group.size);\n    var inner = buildMathML_buildExpression(group.body, newOptions);\n    var node = new mathMLTree.MathNode(\"mstyle\", inner); // TODO(emily): This doesn't produce the correct size for nested size\n    // changes, because we don't keep state of what style we're currently\n    // in, so we can't reset the size to normal before changing it.  Now\n    // that we're passing an options parameter we should be able to fix\n    // this.\n\n    node.setAttribute(\"mathsize\", newOptions.sizeMultiplier + \"em\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/raisebox.js\n\n\n\n\n\n\n // Box manipulation\n\ndefineFunction({\n  type: \"raisebox\",\n  names: [\"\\\\raisebox\"],\n  props: {\n    numArgs: 2,\n    argTypes: [\"size\", \"text\"],\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    var amount = assertNodeType(args[0], \"size\").value;\n    var body = args[1];\n    return {\n      type: \"raisebox\",\n      mode: parser.mode,\n      dy: amount,\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var text = {\n      type: \"text\",\n      mode: group.mode,\n      body: defineFunction_ordargument(group.body),\n      font: \"mathrm\" // simulate \\textrm\n\n    };\n    var sizedText = {\n      type: \"sizing\",\n      mode: group.mode,\n      body: [text],\n      size: 6 // simulate \\normalsize\n\n    };\n    var body = sizing_htmlBuilder(sizedText, options);\n    var dy = units_calculateSize(group.dy, options);\n    return buildCommon.makeVList({\n      positionType: \"shift\",\n      positionData: -dy,\n      children: [{\n        type: \"elem\",\n        elem: body\n      }]\n    }, options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node = new mathMLTree.MathNode(\"mpadded\", [buildMathML_buildGroup(group.body, options)]);\n    var dy = group.dy.number + group.dy.unit;\n    node.setAttribute(\"voffset\", dy);\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/rule.js\n\n\n\n\n\ndefineFunction({\n  type: \"rule\",\n  names: [\"\\\\rule\"],\n  props: {\n    numArgs: 2,\n    numOptionalArgs: 1,\n    argTypes: [\"size\", \"size\", \"size\"]\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser;\n    var shift = optArgs[0];\n    var width = assertNodeType(args[0], \"size\");\n    var height = assertNodeType(args[1], \"size\");\n    return {\n      type: \"rule\",\n      mode: parser.mode,\n      shift: shift && assertNodeType(shift, \"size\").value,\n      width: width.value,\n      height: height.value\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Make an empty span for the rule\n    var rule = buildCommon.makeSpan([\"mord\", \"rule\"], [], options); // Calculate the shift, width, and height of the rule, and account for units\n\n    var width = units_calculateSize(group.width, options);\n    var height = units_calculateSize(group.height, options);\n    var shift = group.shift ? units_calculateSize(group.shift, options) : 0; // Style the rule to the right size\n\n    rule.style.borderRightWidth = width + \"em\";\n    rule.style.borderTopWidth = height + \"em\";\n    rule.style.bottom = shift + \"em\"; // Record the height and width\n\n    rule.width = width;\n    rule.height = height + shift;\n    rule.depth = -shift; // Font size is the number large enough that the browser will\n    // reserve at least `absHeight` space above the baseline.\n    // The 1.125 factor was empirically determined\n\n    rule.maxFontSize = height * 1.125 * options.sizeMultiplier;\n    return rule;\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var width = units_calculateSize(group.width, options);\n    var height = units_calculateSize(group.height, options);\n    var shift = group.shift ? units_calculateSize(group.shift, options) : 0;\n    var color = options.color && options.getColor() || \"black\";\n    var rule = new mathMLTree.MathNode(\"mspace\");\n    rule.setAttribute(\"mathbackground\", color);\n    rule.setAttribute(\"width\", width + \"em\");\n    rule.setAttribute(\"height\", height + \"em\");\n    var wrapper = new mathMLTree.MathNode(\"mpadded\", [rule]);\n\n    if (shift >= 0) {\n      wrapper.setAttribute(\"height\", \"+\" + shift + \"em\");\n    } else {\n      wrapper.setAttribute(\"height\", shift + \"em\");\n      wrapper.setAttribute(\"depth\", \"+\" + -shift + \"em\");\n    }\n\n    wrapper.setAttribute(\"voffset\", shift + \"em\");\n    return wrapper;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/smash.js\n// smash, with optional [tb], as in AMS\n\n\n\n\n\n\ndefineFunction({\n  type: \"smash\",\n  names: [\"\\\\smash\"],\n  props: {\n    numArgs: 1,\n    numOptionalArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser;\n    var smashHeight = false;\n    var smashDepth = false;\n    var tbArg = optArgs[0] && assertNodeType(optArgs[0], \"ordgroup\");\n\n    if (tbArg) {\n      // Optional [tb] argument is engaged.\n      // ref: amsmath: \\renewcommand{\\smash}[1][tb]{%\n      //               def\\mb@t{\\ht}\\def\\mb@b{\\dp}\\def\\mb@tb{\\ht\\z@\\z@\\dp}%\n      var letter = \"\";\n\n      for (var i = 0; i < tbArg.body.length; ++i) {\n        var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n        letter = node.text;\n\n        if (letter === \"t\") {\n          smashHeight = true;\n        } else if (letter === \"b\") {\n          smashDepth = true;\n        } else {\n          smashHeight = false;\n          smashDepth = false;\n          break;\n        }\n      }\n    } else {\n      smashHeight = true;\n      smashDepth = true;\n    }\n\n    var body = args[0];\n    return {\n      type: \"smash\",\n      mode: parser.mode,\n      body: body,\n      smashHeight: smashHeight,\n      smashDepth: smashDepth\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var node = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options)]);\n\n    if (!group.smashHeight && !group.smashDepth) {\n      return node;\n    }\n\n    if (group.smashHeight) {\n      node.height = 0; // In order to influence makeVList, we have to reset the children.\n\n      if (node.children) {\n        for (var i = 0; i < node.children.length; i++) {\n          node.children[i].height = 0;\n        }\n      }\n    }\n\n    if (group.smashDepth) {\n      node.depth = 0;\n\n      if (node.children) {\n        for (var _i = 0; _i < node.children.length; _i++) {\n          node.children[_i].depth = 0;\n        }\n      }\n    } // At this point, we've reset the TeX-like height and depth values.\n    // But the span still has an HTML line height.\n    // makeVList applies \"display: table-cell\", which prevents the browser\n    // from acting on that line height. So we'll call makeVList now.\n\n\n    var smashedNode = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: node\n      }]\n    }, options); // For spacing, TeX treats \\hphantom as a math group (same spacing as ord).\n\n    return buildCommon.makeSpan([\"mord\"], [smashedNode], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node = new mathMLTree.MathNode(\"mpadded\", [buildMathML_buildGroup(group.body, options)]);\n\n    if (group.smashHeight) {\n      node.setAttribute(\"height\", \"0px\");\n    }\n\n    if (group.smashDepth) {\n      node.setAttribute(\"depth\", \"0px\");\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/sqrt.js\n\n\n\n\n\n\n\ndefineFunction({\n  type: \"sqrt\",\n  names: [\"\\\\sqrt\"],\n  props: {\n    numArgs: 1,\n    numOptionalArgs: 1\n  },\n  handler: function handler(_ref, args, optArgs) {\n    var parser = _ref.parser;\n    var index = optArgs[0];\n    var body = args[0];\n    return {\n      type: \"sqrt\",\n      mode: parser.mode,\n      body: body,\n      index: index\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Square roots are handled in the TeXbook pg. 443, Rule 11.\n    // First, we do the same steps as in overline to build the inner group\n    // and line\n    var inner = buildHTML_buildGroup(group.body, options.havingCrampedStyle());\n\n    if (inner.height === 0) {\n      // Render a small surd.\n      inner.height = options.fontMetrics().xHeight;\n    } // Some groups can return document fragments.  Handle those by wrapping\n    // them in a span.\n\n\n    inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \\surd delimiter\n\n    var metrics = options.fontMetrics();\n    var theta = metrics.defaultRuleThickness;\n    var phi = theta;\n\n    if (options.style.id < src_Style.TEXT.id) {\n      phi = options.fontMetrics().xHeight;\n    } // Calculate the clearance between the body and line\n\n\n    var lineClearance = theta + phi / 4;\n    var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size\n\n    var _delimiter$sqrtImage = delimiter.sqrtImage(minDelimiterHeight, options),\n        img = _delimiter$sqrtImage.span,\n        ruleWidth = _delimiter$sqrtImage.ruleWidth,\n        advanceWidth = _delimiter$sqrtImage.advanceWidth;\n\n    var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size\n\n    if (delimDepth > inner.height + inner.depth + lineClearance) {\n      lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;\n    } // Shift the sqrt image\n\n\n    var imgShift = img.height - inner.height - lineClearance - ruleWidth;\n    inner.style.paddingLeft = advanceWidth + \"em\"; // Overlay the image and the argument.\n\n    var body = buildCommon.makeVList({\n      positionType: \"firstBaseline\",\n      children: [{\n        type: \"elem\",\n        elem: inner,\n        wrapperClasses: [\"svg-align\"]\n      }, {\n        type: \"kern\",\n        size: -(inner.height + imgShift)\n      }, {\n        type: \"elem\",\n        elem: img\n      }, {\n        type: \"kern\",\n        size: ruleWidth\n      }]\n    }, options);\n\n    if (!group.index) {\n      return buildCommon.makeSpan([\"mord\", \"sqrt\"], [body], options);\n    } else {\n      // Handle the optional root index\n      // The index is always in scriptscript style\n      var newOptions = options.havingStyle(src_Style.SCRIPTSCRIPT);\n      var rootm = buildHTML_buildGroup(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX\n      // source, in the definition of `\\r@@t`.\n\n      var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly\n\n      var rootVList = buildCommon.makeVList({\n        positionType: \"shift\",\n        positionData: -toShift,\n        children: [{\n          type: \"elem\",\n          elem: rootm\n        }]\n      }, options); // Add a class surrounding it so we can add on the appropriate\n      // kerning\n\n      var rootVListWrap = buildCommon.makeSpan([\"root\"], [rootVList]);\n      return buildCommon.makeSpan([\"mord\", \"sqrt\"], [rootVListWrap, body], options);\n    }\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var body = group.body,\n        index = group.index;\n    return index ? new mathMLTree.MathNode(\"mroot\", [buildMathML_buildGroup(body, options), buildMathML_buildGroup(index, options)]) : new mathMLTree.MathNode(\"msqrt\", [buildMathML_buildGroup(body, options)]);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/styling.js\n\n\n\n\n\nvar styling_styleMap = {\n  \"display\": src_Style.DISPLAY,\n  \"text\": src_Style.TEXT,\n  \"script\": src_Style.SCRIPT,\n  \"scriptscript\": src_Style.SCRIPTSCRIPT\n};\ndefineFunction({\n  type: \"styling\",\n  names: [\"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\", \"\\\\scriptscriptstyle\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var breakOnTokenText = _ref.breakOnTokenText,\n        funcName = _ref.funcName,\n        parser = _ref.parser;\n    // parse out the implicit body\n    var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g.\n    // here and in buildHTML and de-dupe the enumeration of all the styles).\n    // $FlowFixMe: The names above exactly match the styles.\n\n    var style = funcName.slice(1, funcName.length - 5);\n    return {\n      type: \"styling\",\n      mode: parser.mode,\n      // Figure out what style to use by pulling out the style from\n      // the function name\n      style: style,\n      body: body\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Style changes are handled in the TeXbook on pg. 442, Rule 3.\n    var newStyle = styling_styleMap[group.style];\n    var newOptions = options.havingStyle(newStyle).withFont('');\n    return sizingGroup(group.body, newOptions, options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    // Figure out what style we're changing to.\n    // TODO(kevinb): dedupe this with buildHTML.js\n    // This will be easier of handling of styling nodes is in the same file.\n    var styleMap = {\n      \"display\": src_Style.DISPLAY,\n      \"text\": src_Style.TEXT,\n      \"script\": src_Style.SCRIPT,\n      \"scriptscript\": src_Style.SCRIPTSCRIPT\n    };\n    var newStyle = styleMap[group.style];\n    var newOptions = options.havingStyle(newStyle);\n    var inner = buildMathML_buildExpression(group.body, newOptions);\n    var node = new mathMLTree.MathNode(\"mstyle\", inner);\n    var styleAttributes = {\n      \"display\": [\"0\", \"true\"],\n      \"text\": [\"0\", \"false\"],\n      \"script\": [\"1\", \"false\"],\n      \"scriptscript\": [\"2\", \"false\"]\n    };\n    var attr = styleAttributes[group.style];\n    node.setAttribute(\"scriptlevel\", attr[0]);\n    node.setAttribute(\"displaystyle\", attr[1]);\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/supsub.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Sometimes, groups perform special rules when they have superscripts or\n * subscripts attached to them. This function lets the `supsub` group know that\n * Sometimes, groups perform special rules when they have superscripts or\n * its inner element should handle the superscripts and subscripts instead of\n * handling them itself.\n */\nvar supsub_htmlBuilderDelegate = function htmlBuilderDelegate(group, options) {\n  var base = group.base;\n\n  if (!base) {\n    return null;\n  } else if (base.type === \"op\") {\n    // Operators handle supsubs differently when they have limits\n    // (e.g. `\\displaystyle\\sum_2^3`)\n    var delegate = base.limits && (options.style.size === src_Style.DISPLAY.size || base.alwaysHandleSupSub);\n    return delegate ? op_htmlBuilder : null;\n  } else if (base.type === \"accent\") {\n    return utils.isCharacterBox(base.base) ? accent_htmlBuilder : null;\n  } else if (base.type === \"horizBrace\") {\n    var isSup = !group.sub;\n    return isSup === base.isOver ? horizBrace_htmlBuilder : null;\n  } else {\n    return null;\n  }\n}; // Super scripts and subscripts, whose precise placement can depend on other\n// functions that precede them.\n\n\ndefineFunctionBuilders({\n  type: \"supsub\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Superscript and subscripts are handled in the TeXbook on page\n    // 445-446, rules 18(a-f).\n    // Here is where we defer to the inner group if it should handle\n    // superscripts and subscripts itself.\n    var builderDelegate = supsub_htmlBuilderDelegate(group, options);\n\n    if (builderDelegate) {\n      return builderDelegate(group, options);\n    }\n\n    var valueBase = group.base,\n        valueSup = group.sup,\n        valueSub = group.sub;\n    var base = buildHTML_buildGroup(valueBase, options);\n    var supm;\n    var subm;\n    var metrics = options.fontMetrics(); // Rule 18a\n\n    var supShift = 0;\n    var subShift = 0;\n    var isCharacterBox = valueBase && utils.isCharacterBox(valueBase);\n\n    if (valueSup) {\n      var newOptions = options.havingStyle(options.style.sup());\n      supm = buildHTML_buildGroup(valueSup, newOptions, options);\n\n      if (!isCharacterBox) {\n        supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;\n      }\n    }\n\n    if (valueSub) {\n      var _newOptions = options.havingStyle(options.style.sub());\n\n      subm = buildHTML_buildGroup(valueSub, _newOptions, options);\n\n      if (!isCharacterBox) {\n        subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier;\n      }\n    } // Rule 18c\n\n\n    var minSupShift;\n\n    if (options.style === src_Style.DISPLAY) {\n      minSupShift = metrics.sup1;\n    } else if (options.style.cramped) {\n      minSupShift = metrics.sup3;\n    } else {\n      minSupShift = metrics.sup2;\n    } // scriptspace is a font-size-independent size, so scale it\n    // appropriately for use as the marginRight.\n\n\n    var multiplier = options.sizeMultiplier;\n    var marginRight = 0.5 / metrics.ptPerEm / multiplier + \"em\";\n    var marginLeft = null;\n\n    if (subm) {\n      // Subscripts shouldn't be shifted by the base's italic correction.\n      // Account for that by shifting the subscript back the appropriate\n      // amount. Note we only do this when the base is a single symbol.\n      var isOiint = group.base && group.base.type === \"op\" && group.base.name && (group.base.name === \"\\\\oiint\" || group.base.name === \"\\\\oiiint\");\n\n      if (base instanceof domTree_SymbolNode || isOiint) {\n        // $FlowFixMe\n        marginLeft = -base.italic + \"em\";\n      }\n    }\n\n    var supsub;\n\n    if (supm && subm) {\n      supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n      subShift = Math.max(subShift, metrics.sub2);\n      var ruleWidth = metrics.defaultRuleThickness; // Rule 18e\n\n      var maxWidth = 4 * ruleWidth;\n\n      if (supShift - supm.depth - (subm.height - subShift) < maxWidth) {\n        subShift = maxWidth - (supShift - supm.depth) + subm.height;\n        var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);\n\n        if (psi > 0) {\n          supShift += psi;\n          subShift -= psi;\n        }\n      }\n\n      var vlistElem = [{\n        type: \"elem\",\n        elem: subm,\n        shift: subShift,\n        marginRight: marginRight,\n        marginLeft: marginLeft\n      }, {\n        type: \"elem\",\n        elem: supm,\n        shift: -supShift,\n        marginRight: marginRight\n      }];\n      supsub = buildCommon.makeVList({\n        positionType: \"individualShift\",\n        children: vlistElem\n      }, options);\n    } else if (subm) {\n      // Rule 18b\n      subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);\n      var _vlistElem = [{\n        type: \"elem\",\n        elem: subm,\n        marginLeft: marginLeft,\n        marginRight: marginRight\n      }];\n      supsub = buildCommon.makeVList({\n        positionType: \"shift\",\n        positionData: subShift,\n        children: _vlistElem\n      }, options);\n    } else if (supm) {\n      // Rule 18c, d\n      supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n      supsub = buildCommon.makeVList({\n        positionType: \"shift\",\n        positionData: -supShift,\n        children: [{\n          type: \"elem\",\n          elem: supm,\n          marginRight: marginRight\n        }]\n      }, options);\n    } else {\n      throw new Error(\"supsub must have either sup or sub.\");\n    } // Wrap the supsub vlist in a span.msupsub to reset text-align.\n\n\n    var mclass = getTypeOfDomTree(base, \"right\") || \"mord\";\n    return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan([\"msupsub\"], [supsub])], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    // Is the inner group a relevant horizonal brace?\n    var isBrace = false;\n    var isOver;\n    var isSup;\n    var horizBrace = checkNodeType(group.base, \"horizBrace\");\n\n    if (horizBrace) {\n      isSup = !!group.sup;\n\n      if (isSup === horizBrace.isOver) {\n        isBrace = true;\n        isOver = horizBrace.isOver;\n      }\n    }\n\n    if (group.base && group.base.type === \"op\") {\n      group.base.parentIsSupSub = true;\n    }\n\n    var children = [buildMathML_buildGroup(group.base, options)];\n\n    if (group.sub) {\n      children.push(buildMathML_buildGroup(group.sub, options));\n    }\n\n    if (group.sup) {\n      children.push(buildMathML_buildGroup(group.sup, options));\n    }\n\n    var nodeType;\n\n    if (isBrace) {\n      nodeType = isOver ? \"mover\" : \"munder\";\n    } else if (!group.sub) {\n      var base = group.base;\n\n      if (base && base.type === \"op\" && base.limits && (options.style === src_Style.DISPLAY || base.alwaysHandleSupSub)) {\n        nodeType = \"mover\";\n      } else {\n        nodeType = \"msup\";\n      }\n    } else if (!group.sup) {\n      var _base = group.base;\n\n      if (_base && _base.type === \"op\" && _base.limits && (options.style === src_Style.DISPLAY || _base.alwaysHandleSupSub)) {\n        nodeType = \"munder\";\n      } else {\n        nodeType = \"msub\";\n      }\n    } else {\n      var _base2 = group.base;\n\n      if (_base2 && _base2.type === \"op\" && _base2.limits && options.style === src_Style.DISPLAY) {\n        nodeType = \"munderover\";\n      } else {\n        nodeType = \"msubsup\";\n      }\n    }\n\n    var node = new mathMLTree.MathNode(nodeType, children);\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/symbolsOp.js\n\n\n\n // Operator ParseNodes created in Parser.js from symbol Groups in src/symbols.js.\n\ndefineFunctionBuilders({\n  type: \"atom\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    return buildCommon.mathsym(group.text, group.mode, options, [\"m\" + group.family]);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node = new mathMLTree.MathNode(\"mo\", [buildMathML_makeText(group.text, group.mode)]);\n\n    if (group.family === \"bin\") {\n      var variant = buildMathML_getVariant(group, options);\n\n      if (variant === \"bold-italic\") {\n        node.setAttribute(\"mathvariant\", variant);\n      }\n    } else if (group.family === \"punct\") {\n      node.setAttribute(\"separator\", \"true\");\n    } else if (group.family === \"open\" || group.family === \"close\") {\n      // Delims built here should not stretch vertically.\n      // See delimsizing.js for stretchy delims.\n      node.setAttribute(\"stretchy\", \"false\");\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/symbolsOrd.js\n\n\n\n\n// \"mathord\" and \"textord\" ParseNodes created in Parser.js from symbol Groups in\nvar defaultVariant = {\n  \"mi\": \"italic\",\n  \"mn\": \"normal\",\n  \"mtext\": \"normal\"\n};\ndefineFunctionBuilders({\n  type: \"mathord\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    return buildCommon.makeOrd(group, options, \"mathord\");\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node = new mathMLTree.MathNode(\"mi\", [buildMathML_makeText(group.text, group.mode, options)]);\n    var variant = buildMathML_getVariant(group, options) || \"italic\";\n\n    if (variant !== defaultVariant[node.type]) {\n      node.setAttribute(\"mathvariant\", variant);\n    }\n\n    return node;\n  }\n});\ndefineFunctionBuilders({\n  type: \"textord\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    return buildCommon.makeOrd(group, options, \"textord\");\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var text = buildMathML_makeText(group.text, group.mode, options);\n    var variant = buildMathML_getVariant(group, options) || \"normal\";\n    var node;\n\n    if (group.mode === 'text') {\n      node = new mathMLTree.MathNode(\"mtext\", [text]);\n    } else if (/[0-9]/.test(group.text)) {\n      // TODO(kevinb) merge adjacent <mn> nodes\n      // do it as a post processing step\n      node = new mathMLTree.MathNode(\"mn\", [text]);\n    } else if (group.text === \"\\\\prime\") {\n      node = new mathMLTree.MathNode(\"mo\", [text]);\n    } else {\n      node = new mathMLTree.MathNode(\"mi\", [text]);\n    }\n\n    if (variant !== defaultVariant[node.type]) {\n      node.setAttribute(\"mathvariant\", variant);\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/symbolsSpacing.js\n\n\n\n // A map of CSS-based spacing functions to their CSS class.\n\nvar cssSpace = {\n  \"\\\\nobreak\": \"nobreak\",\n  \"\\\\allowbreak\": \"allowbreak\"\n}; // A lookup table to determine whether a spacing function/symbol should be\n// treated like a regular space character.  If a symbol or command is a key\n// in this table, then it should be a regular space character.  Furthermore,\n// the associated value may have a `className` specifying an extra CSS class\n// to add to the created `span`.\n\nvar regularSpace = {\n  \" \": {},\n  \"\\\\ \": {},\n  \"~\": {\n    className: \"nobreak\"\n  },\n  \"\\\\space\": {},\n  \"\\\\nobreakspace\": {\n    className: \"nobreak\"\n  }\n}; // ParseNode<\"spacing\"> created in Parser.js from the \"spacing\" symbol Groups in\n// src/symbols.js.\n\ndefineFunctionBuilders({\n  type: \"spacing\",\n  htmlBuilder: function htmlBuilder(group, options) {\n    if (regularSpace.hasOwnProperty(group.text)) {\n      var className = regularSpace[group.text].className || \"\"; // Spaces are generated by adding an actual space. Each of these\n      // things has an entry in the symbols table, so these will be turned\n      // into appropriate outputs.\n\n      if (group.mode === \"text\") {\n        var ord = buildCommon.makeOrd(group, options, \"textord\");\n        ord.classes.push(className);\n        return ord;\n      } else {\n        return buildCommon.makeSpan([\"mspace\", className], [buildCommon.mathsym(group.text, group.mode, options)], options);\n      }\n    } else if (cssSpace.hasOwnProperty(group.text)) {\n      // Spaces based on just a CSS class.\n      return buildCommon.makeSpan([\"mspace\", cssSpace[group.text]], [], options);\n    } else {\n      throw new src_ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n    }\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var node;\n\n    if (regularSpace.hasOwnProperty(group.text)) {\n      node = new mathMLTree.MathNode(\"mtext\", [new mathMLTree.TextNode(\"\\xA0\")]);\n    } else if (cssSpace.hasOwnProperty(group.text)) {\n      // CSS-based MathML spaces (\\nobreak, \\allowbreak) are ignored\n      return new mathMLTree.MathNode(\"mspace\");\n    } else {\n      throw new src_ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n    }\n\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/tag.js\n\n\n\n\nvar tag_pad = function pad() {\n  var padNode = new mathMLTree.MathNode(\"mtd\", []);\n  padNode.setAttribute(\"width\", \"50%\");\n  return padNode;\n};\n\ndefineFunctionBuilders({\n  type: \"tag\",\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var table = new mathMLTree.MathNode(\"mtable\", [new mathMLTree.MathNode(\"mtr\", [tag_pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.body, options)]), tag_pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.tag, options)])])]);\n    table.setAttribute(\"width\", \"100%\");\n    return table; // TODO: Left-aligned tags.\n    // Currently, the group and options passed here do not contain\n    // enough info to set tag alignment. `leqno` is in Settings but it is\n    // not passed to Options. On the HTML side, leqno is\n    // set by a CSS class applied in buildTree.js. That would have worked\n    // in MathML if browsers supported <mlabeledtr>. Since they don't, we\n    // need to rewrite the way this function is called.\n  }\n});\n// CONCATENATED MODULE: ./src/functions/text.js\n\n\n\n // Non-mathy text, possibly in a font\n\nvar textFontFamilies = {\n  \"\\\\text\": undefined,\n  \"\\\\textrm\": \"textrm\",\n  \"\\\\textsf\": \"textsf\",\n  \"\\\\texttt\": \"texttt\",\n  \"\\\\textnormal\": \"textrm\"\n};\nvar textFontWeights = {\n  \"\\\\textbf\": \"textbf\",\n  \"\\\\textmd\": \"textmd\"\n};\nvar textFontShapes = {\n  \"\\\\textit\": \"textit\",\n  \"\\\\textup\": \"textup\"\n};\n\nvar optionsWithFont = function optionsWithFont(group, options) {\n  var font = group.font; // Checks if the argument is a font family or a font style.\n\n  if (!font) {\n    return options;\n  } else if (textFontFamilies[font]) {\n    return options.withTextFontFamily(textFontFamilies[font]);\n  } else if (textFontWeights[font]) {\n    return options.withTextFontWeight(textFontWeights[font]);\n  } else {\n    return options.withTextFontShape(textFontShapes[font]);\n  }\n};\n\ndefineFunction({\n  type: \"text\",\n  names: [// Font families\n  \"\\\\text\", \"\\\\textrm\", \"\\\\textsf\", \"\\\\texttt\", \"\\\\textnormal\", // Font weights\n  \"\\\\textbf\", \"\\\\textmd\", // Font Shapes\n  \"\\\\textit\", \"\\\\textup\"],\n  props: {\n    numArgs: 1,\n    argTypes: [\"text\"],\n    greediness: 2,\n    allowedInText: true,\n    consumeMode: \"text\"\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser,\n        funcName = _ref.funcName;\n    var body = args[0];\n    return {\n      type: \"text\",\n      mode: parser.mode,\n      body: defineFunction_ordargument(body),\n      font: funcName\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var newOptions = optionsWithFont(group, options);\n    var inner = buildHTML_buildExpression(group.body, newOptions, true);\n    return buildCommon.makeSpan([\"mord\", \"text\"], buildCommon.tryCombineChars(inner), newOptions);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var newOptions = optionsWithFont(group, options);\n    return buildExpressionRow(group.body, newOptions);\n  }\n});\n// CONCATENATED MODULE: ./src/functions/underline.js\n\n\n\n\n\ndefineFunction({\n  type: \"underline\",\n  names: [\"\\\\underline\"],\n  props: {\n    numArgs: 1,\n    allowedInText: true\n  },\n  handler: function handler(_ref, args) {\n    var parser = _ref.parser;\n    return {\n      type: \"underline\",\n      mode: parser.mode,\n      body: args[0]\n    };\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    // Underlines are handled in the TeXbook pg 443, Rule 10.\n    // Build the inner group.\n    var innerGroup = buildHTML_buildGroup(group.body, options); // Create the line to go below the body\n\n    var line = buildCommon.makeLineSpan(\"underline-line\", options); // Generate the vlist, with the appropriate kerns\n\n    var vlist = buildCommon.makeVList({\n      positionType: \"top\",\n      positionData: innerGroup.height,\n      children: [{\n        type: \"kern\",\n        size: line.height\n      }, {\n        type: \"elem\",\n        elem: line\n      }, {\n        type: \"kern\",\n        size: 3 * line.height\n      }, {\n        type: \"elem\",\n        elem: innerGroup\n      }]\n    }, options);\n    return buildCommon.makeSpan([\"mord\", \"underline\"], [vlist], options);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203E\")]);\n    operator.setAttribute(\"stretchy\", \"true\");\n    var node = new mathMLTree.MathNode(\"munder\", [buildMathML_buildGroup(group.body, options), operator]);\n    node.setAttribute(\"accentunder\", \"true\");\n    return node;\n  }\n});\n// CONCATENATED MODULE: ./src/functions/verb.js\n\n\n\n\ndefineFunction({\n  type: \"verb\",\n  names: [\"\\\\verb\"],\n  props: {\n    numArgs: 0,\n    allowedInText: true\n  },\n  handler: function handler(context, args, optArgs) {\n    // \\verb and \\verb* are dealt with directly in Parser.js.\n    // If we end up here, it's because of a failure to match the two delimiters\n    // in the regex in Lexer.js.  LaTeX raises the following error when \\verb is\n    // terminated by end of line (or file).\n    throw new src_ParseError(\"\\\\verb ended by end of line instead of matching delimiter\");\n  },\n  htmlBuilder: function htmlBuilder(group, options) {\n    var text = makeVerb(group);\n    var body = []; // \\verb enters text mode and therefore is sized like \\textstyle\n\n    var newOptions = options.havingStyle(options.style.text());\n\n    for (var i = 0; i < text.length; i++) {\n      var c = text[i];\n\n      if (c === '~') {\n        c = '\\\\textasciitilde';\n      }\n\n      body.push(buildCommon.makeSymbol(c, \"Typewriter-Regular\", group.mode, newOptions, [\"mord\", \"texttt\"]));\n    }\n\n    return buildCommon.makeSpan([\"mord\", \"text\"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions);\n  },\n  mathmlBuilder: function mathmlBuilder(group, options) {\n    var text = new mathMLTree.TextNode(makeVerb(group));\n    var node = new mathMLTree.MathNode(\"mtext\", [text]);\n    node.setAttribute(\"mathvariant\", \"monospace\");\n    return node;\n  }\n});\n/**\n * Converts verb group into body string.\n *\n * \\verb* replaces each space with an open box \\u2423\n * \\verb replaces each space with a no-break space \\xA0\n */\n\nvar makeVerb = function makeVerb(group) {\n  return group.body.replace(/ /g, group.star ? \"\\u2423\" : '\\xA0');\n};\n// CONCATENATED MODULE: ./src/functions.js\n/** Include this to ensure that all functions are defined. */\n\nvar functions = _functions;\n/* harmony default export */ var src_functions = (functions); // TODO(kevinb): have functions return an object and call defineFunction with\n// that object in this file instead of relying on side-effects.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Disabled until https://github.com/KaTeX/KaTeX/pull/1794 is merged.\n// import \"./functions/includegraphics\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// CONCATENATED MODULE: ./src/Lexer.js\n/**\n * The Lexer class handles tokenizing the input in various ways. Since our\n * parser expects us to be able to backtrack, the lexer allows lexing from any\n * given starting point.\n *\n * Its main exposed function is the `lex` function, which takes a position to\n * lex from and a type of token to lex. It defers to the appropriate `_innerLex`\n * function.\n *\n * The various `_innerLex` functions perform the actual lexing of different\n * kinds.\n */\n\n\n\n\n/* The following tokenRegex\n * - matches typical whitespace (but not NBSP etc.) using its first group\n * - does not match any control character \\x00-\\x1f except whitespace\n * - does not match a bare backslash\n * - matches any ASCII character except those just mentioned\n * - does not match the BMP private use area \\uE000-\\uF8FF\n * - does not match bare surrogate code units\n * - matches any BMP character except for those just described\n * - matches any valid Unicode surrogate pair\n * - matches a backslash followed by one or more letters\n * - matches a backslash followed by any BMP character, including newline\n * Just because the Lexer matches something doesn't mean it's valid input:\n * If there is no matching function or symbol definition, the Parser will\n * still reject the input.\n */\nvar spaceRegexString = \"[ \\r\\n\\t]\";\nvar controlWordRegexString = \"\\\\\\\\[a-zA-Z@]+\";\nvar controlSymbolRegexString = \"\\\\\\\\[^\\uD800-\\uDFFF]\";\nvar controlWordWhitespaceRegexString = \"\" + controlWordRegexString + spaceRegexString + \"*\";\nvar controlWordWhitespaceRegex = new RegExp(\"^(\" + controlWordRegexString + \")\" + spaceRegexString + \"*$\");\nvar combiningDiacriticalMarkString = \"[\\u0300-\\u036F]\";\nvar combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + \"+$\");\nvar tokenRegexString = \"(\" + spaceRegexString + \"+)|\" + // whitespace\n\"([!-\\\\[\\\\]-\\u2027\\u202A-\\uD7FF\\uF900-\\uFFFF]\" + ( // single codepoint\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\" + ( // surrogate pair\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|\\\\\\\\verb\\\\*([^]).*?\\\\3\" + // \\verb*\n\"|\\\\\\\\verb([^*a-zA-Z]).*?\\\\4\" + ( // \\verb unstarred\n\"|\" + controlWordWhitespaceRegexString) + ( // \\macroName + spaces\n\"|\" + controlSymbolRegexString + \")\"); // \\\\, \\', etc.\n\n/** Main Lexer class */\n\nvar Lexer_Lexer =\n/*#__PURE__*/\nfunction () {\n  // category codes, only supports comment characters (14) for now\n  function Lexer(input, settings) {\n    this.input = void 0;\n    this.settings = void 0;\n    this.tokenRegex = void 0;\n    this.catcodes = void 0;\n    // Separate accents from characters\n    this.input = input;\n    this.settings = settings;\n    this.tokenRegex = new RegExp(tokenRegexString, 'g');\n    this.catcodes = {\n      \"%\": 14 // comment character\n\n    };\n  }\n\n  var _proto = Lexer.prototype;\n\n  _proto.setCatcode = function setCatcode(char, code) {\n    this.catcodes[char] = code;\n  }\n  /**\n   * This function lexes a single token.\n   */\n  ;\n\n  _proto.lex = function lex() {\n    var input = this.input;\n    var pos = this.tokenRegex.lastIndex;\n\n    if (pos === input.length) {\n      return new Token_Token(\"EOF\", new SourceLocation(this, pos, pos));\n    }\n\n    var match = this.tokenRegex.exec(input);\n\n    if (match === null || match.index !== pos) {\n      throw new src_ParseError(\"Unexpected character: '\" + input[pos] + \"'\", new Token_Token(input[pos], new SourceLocation(this, pos, pos + 1)));\n    }\n\n    var text = match[2] || \" \";\n\n    if (this.catcodes[text] === 14) {\n      // comment character\n      var nlIndex = input.indexOf('\\n', this.tokenRegex.lastIndex);\n\n      if (nlIndex === -1) {\n        this.tokenRegex.lastIndex = input.length; // EOF\n\n        this.settings.reportNonstrict(\"commentAtEnd\", \"% comment has no terminating newline; LaTeX would \" + \"fail because of commenting the end of math mode (e.g. $)\");\n      } else {\n        this.tokenRegex.lastIndex = nlIndex + 1;\n      }\n\n      return this.lex();\n    } // Trim any trailing whitespace from control word match\n\n\n    var controlMatch = text.match(controlWordWhitespaceRegex);\n\n    if (controlMatch) {\n      text = controlMatch[1];\n    }\n\n    return new Token_Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex));\n  };\n\n  return Lexer;\n}();\n\n\n// CONCATENATED MODULE: ./src/Namespace.js\n/**\n * A `Namespace` refers to a space of nameable things like macros or lengths,\n * which can be `set` either globally or local to a nested group, using an\n * undo stack similar to how TeX implements this functionality.\n * Performance-wise, `get` and local `set` take constant time, while global\n * `set` takes time proportional to the depth of group nesting.\n */\n\n\nvar Namespace_Namespace =\n/*#__PURE__*/\nfunction () {\n  /**\n   * Both arguments are optional.  The first argument is an object of\n   * built-in mappings which never change.  The second argument is an object\n   * of initial (global-level) mappings, which will constantly change\n   * according to any global/top-level `set`s done.\n   */\n  function Namespace(builtins, globalMacros) {\n    if (builtins === void 0) {\n      builtins = {};\n    }\n\n    if (globalMacros === void 0) {\n      globalMacros = {};\n    }\n\n    this.current = void 0;\n    this.builtins = void 0;\n    this.undefStack = void 0;\n    this.current = globalMacros;\n    this.builtins = builtins;\n    this.undefStack = [];\n  }\n  /**\n   * Start a new nested group, affecting future local `set`s.\n   */\n\n\n  var _proto = Namespace.prototype;\n\n  _proto.beginGroup = function beginGroup() {\n    this.undefStack.push({});\n  }\n  /**\n   * End current nested group, restoring values before the group began.\n   */\n  ;\n\n  _proto.endGroup = function endGroup() {\n    if (this.undefStack.length === 0) {\n      throw new src_ParseError(\"Unbalanced namespace destruction: attempt \" + \"to pop global namespace; please report this as a bug\");\n    }\n\n    var undefs = this.undefStack.pop();\n\n    for (var undef in undefs) {\n      if (undefs.hasOwnProperty(undef)) {\n        if (undefs[undef] === undefined) {\n          delete this.current[undef];\n        } else {\n          this.current[undef] = undefs[undef];\n        }\n      }\n    }\n  }\n  /**\n   * Detect whether `name` has a definition.  Equivalent to\n   * `get(name) != null`.\n   */\n  ;\n\n  _proto.has = function has(name) {\n    return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name);\n  }\n  /**\n   * Get the current value of a name, or `undefined` if there is no value.\n   *\n   * Note: Do not use `if (namespace.get(...))` to detect whether a macro\n   * is defined, as the definition may be the empty string which evaluates\n   * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or\n   * `if (namespace.has(...))`.\n   */\n  ;\n\n  _proto.get = function get(name) {\n    if (this.current.hasOwnProperty(name)) {\n      return this.current[name];\n    } else {\n      return this.builtins[name];\n    }\n  }\n  /**\n   * Set the current value of a name, and optionally set it globally too.\n   * Local set() sets the current value and (when appropriate) adds an undo\n   * operation to the undo stack.  Global set() may change the undo\n   * operation at every level, so takes time linear in their number.\n   */\n  ;\n\n  _proto.set = function set(name, value, global) {\n    if (global === void 0) {\n      global = false;\n    }\n\n    if (global) {\n      // Global set is equivalent to setting in all groups.  Simulate this\n      // by destroying any undos currently scheduled for this name,\n      // and adding an undo with the *new* value (in case it later gets\n      // locally reset within this environment).\n      for (var i = 0; i < this.undefStack.length; i++) {\n        delete this.undefStack[i][name];\n      }\n\n      if (this.undefStack.length > 0) {\n        this.undefStack[this.undefStack.length - 1][name] = value;\n      }\n    } else {\n      // Undo this set at end of this group (possibly to `undefined`),\n      // unless an undo is already in place, in which case that older\n      // value is the correct one.\n      var top = this.undefStack[this.undefStack.length - 1];\n\n      if (top && !top.hasOwnProperty(name)) {\n        top[name] = this.current[name];\n      }\n    }\n\n    this.current[name] = value;\n  };\n\n  return Namespace;\n}();\n\n\n// CONCATENATED MODULE: ./src/macros.js\n/**\n * Predefined macros for KaTeX.\n * This can be used to define some commands in terms of others.\n */\n\n\n\n\n\nvar builtinMacros = {};\n/* harmony default export */ var macros = (builtinMacros); // This function might one day accept an additional argument and do more things.\n\nfunction defineMacro(name, body) {\n  builtinMacros[name] = body;\n} //////////////////////////////////////////////////////////////////////\n// macro tools\n// LaTeX's \\@firstoftwo{#1}{#2} expands to #1, skipping #2\n// TeX source: \\long\\def\\@firstoftwo#1#2{#1}\n\ndefineMacro(\"\\\\@firstoftwo\", function (context) {\n  var args = context.consumeArgs(2);\n  return {\n    tokens: args[0],\n    numArgs: 0\n  };\n}); // LaTeX's \\@secondoftwo{#1}{#2} expands to #2, skipping #1\n// TeX source: \\long\\def\\@secondoftwo#1#2{#2}\n\ndefineMacro(\"\\\\@secondoftwo\", function (context) {\n  var args = context.consumeArgs(2);\n  return {\n    tokens: args[1],\n    numArgs: 0\n  };\n}); // LaTeX's \\@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)\n// symbol.  If it matches #1, then the macro expands to #2; otherwise, #3.\n// Note, however, that it does not consume the next symbol in either case.\n\ndefineMacro(\"\\\\@ifnextchar\", function (context) {\n  var args = context.consumeArgs(3); // symbol, if, else\n\n  var nextToken = context.future();\n\n  if (args[0].length === 1 && args[0][0].text === nextToken.text) {\n    return {\n      tokens: args[1],\n      numArgs: 0\n    };\n  } else {\n    return {\n      tokens: args[2],\n      numArgs: 0\n    };\n  }\n}); // LaTeX's \\@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol.\n// If it is `*`, then it consumes the symbol, and the macro expands to #1;\n// otherwise, the macro expands to #2 (without consuming the symbol).\n// TeX source: \\def\\@ifstar#1{\\@ifnextchar *{\\@firstoftwo{#1}}}\n\ndefineMacro(\"\\\\@ifstar\", \"\\\\@ifnextchar *{\\\\@firstoftwo{#1}}\"); // LaTeX's \\TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode\n\ndefineMacro(\"\\\\TextOrMath\", function (context) {\n  var args = context.consumeArgs(2);\n\n  if (context.mode === 'text') {\n    return {\n      tokens: args[0],\n      numArgs: 0\n    };\n  } else {\n    return {\n      tokens: args[1],\n      numArgs: 0\n    };\n  }\n}); // Lookup table for parsing numbers in base 8 through 16\n\nvar digitToNumber = {\n  \"0\": 0,\n  \"1\": 1,\n  \"2\": 2,\n  \"3\": 3,\n  \"4\": 4,\n  \"5\": 5,\n  \"6\": 6,\n  \"7\": 7,\n  \"8\": 8,\n  \"9\": 9,\n  \"a\": 10,\n  \"A\": 10,\n  \"b\": 11,\n  \"B\": 11,\n  \"c\": 12,\n  \"C\": 12,\n  \"d\": 13,\n  \"D\": 13,\n  \"e\": 14,\n  \"E\": 14,\n  \"f\": 15,\n  \"F\": 15\n}; // TeX \\char makes a literal character (catcode 12) using the following forms:\n// (see The TeXBook, p. 43)\n//   \\char123  -- decimal\n//   \\char'123 -- octal\n//   \\char\"123 -- hex\n//   \\char`x   -- character that can be written (i.e. isn't active)\n//   \\char`\\x  -- character that cannot be written (e.g. %)\n// These all refer to characters from the font, so we turn them into special\n// calls to a function \\@char dealt with in the Parser.\n\ndefineMacro(\"\\\\char\", function (context) {\n  var token = context.popToken();\n  var base;\n  var number = '';\n\n  if (token.text === \"'\") {\n    base = 8;\n    token = context.popToken();\n  } else if (token.text === '\"') {\n    base = 16;\n    token = context.popToken();\n  } else if (token.text === \"`\") {\n    token = context.popToken();\n\n    if (token.text[0] === \"\\\\\") {\n      number = token.text.charCodeAt(1);\n    } else if (token.text === \"EOF\") {\n      throw new src_ParseError(\"\\\\char` missing argument\");\n    } else {\n      number = token.text.charCodeAt(0);\n    }\n  } else {\n    base = 10;\n  }\n\n  if (base) {\n    // Parse a number in the given base, starting with first `token`.\n    number = digitToNumber[token.text];\n\n    if (number == null || number >= base) {\n      throw new src_ParseError(\"Invalid base-\" + base + \" digit \" + token.text);\n    }\n\n    var digit;\n\n    while ((digit = digitToNumber[context.future().text]) != null && digit < base) {\n      number *= base;\n      number += digit;\n      context.popToken();\n    }\n  }\n\n  return \"\\\\@char{\" + number + \"}\";\n}); // Basic support for macro definitions:\n//     \\def\\macro{expansion}\n//     \\def\\macro#1{expansion}\n//     \\def\\macro#1#2{expansion}\n//     \\def\\macro#1#2#3#4#5#6#7#8#9{expansion}\n// Also the \\gdef and \\global\\def equivalents\n\nvar macros_def = function def(context, global) {\n  var arg = context.consumeArgs(1)[0];\n\n  if (arg.length !== 1) {\n    throw new src_ParseError(\"\\\\gdef's first argument must be a macro name\");\n  }\n\n  var name = arg[0].text; // Count argument specifiers, and check they are in the order #1 #2 ...\n\n  var numArgs = 0;\n  arg = context.consumeArgs(1)[0];\n\n  while (arg.length === 1 && arg[0].text === \"#\") {\n    arg = context.consumeArgs(1)[0];\n\n    if (arg.length !== 1) {\n      throw new src_ParseError(\"Invalid argument number length \\\"\" + arg.length + \"\\\"\");\n    }\n\n    if (!/^[1-9]$/.test(arg[0].text)) {\n      throw new src_ParseError(\"Invalid argument number \\\"\" + arg[0].text + \"\\\"\");\n    }\n\n    numArgs++;\n\n    if (parseInt(arg[0].text) !== numArgs) {\n      throw new src_ParseError(\"Argument number \\\"\" + arg[0].text + \"\\\" out of order\");\n    }\n\n    arg = context.consumeArgs(1)[0];\n  } // Final arg is the expansion of the macro\n\n\n  context.macros.set(name, {\n    tokens: arg,\n    numArgs: numArgs\n  }, global);\n  return '';\n};\n\ndefineMacro(\"\\\\gdef\", function (context) {\n  return macros_def(context, true);\n});\ndefineMacro(\"\\\\def\", function (context) {\n  return macros_def(context, false);\n});\ndefineMacro(\"\\\\global\", function (context) {\n  var next = context.consumeArgs(1)[0];\n\n  if (next.length !== 1) {\n    throw new src_ParseError(\"Invalid command after \\\\global\");\n  }\n\n  var command = next[0].text; // TODO: Should expand command\n\n  if (command === \"\\\\def\") {\n    // \\global\\def is equivalent to \\gdef\n    return macros_def(context, true);\n  } else {\n    throw new src_ParseError(\"Invalid command '\" + command + \"' after \\\\global\");\n  }\n}); // \\newcommand{\\macro}[args]{definition}\n// \\renewcommand{\\macro}[args]{definition}\n// TODO: Optional arguments: \\newcommand{\\macro}[args][default]{definition}\n\nvar macros_newcommand = function newcommand(context, existsOK, nonexistsOK) {\n  var arg = context.consumeArgs(1)[0];\n\n  if (arg.length !== 1) {\n    throw new src_ParseError(\"\\\\newcommand's first argument must be a macro name\");\n  }\n\n  var name = arg[0].text;\n  var exists = context.isDefined(name);\n\n  if (exists && !existsOK) {\n    throw new src_ParseError(\"\\\\newcommand{\" + name + \"} attempting to redefine \" + (name + \"; use \\\\renewcommand\"));\n  }\n\n  if (!exists && !nonexistsOK) {\n    throw new src_ParseError(\"\\\\renewcommand{\" + name + \"} when command \" + name + \" \" + \"does not yet exist; use \\\\newcommand\");\n  }\n\n  var numArgs = 0;\n  arg = context.consumeArgs(1)[0];\n\n  if (arg.length === 1 && arg[0].text === \"[\") {\n    var argText = '';\n    var token = context.expandNextToken();\n\n    while (token.text !== \"]\" && token.text !== \"EOF\") {\n      // TODO: Should properly expand arg, e.g., ignore {}s\n      argText += token.text;\n      token = context.expandNextToken();\n    }\n\n    if (!argText.match(/^\\s*[0-9]+\\s*$/)) {\n      throw new src_ParseError(\"Invalid number of arguments: \" + argText);\n    }\n\n    numArgs = parseInt(argText);\n    arg = context.consumeArgs(1)[0];\n  } // Final arg is the expansion of the macro\n\n\n  context.macros.set(name, {\n    tokens: arg,\n    numArgs: numArgs\n  });\n  return '';\n};\n\ndefineMacro(\"\\\\newcommand\", function (context) {\n  return macros_newcommand(context, false, true);\n});\ndefineMacro(\"\\\\renewcommand\", function (context) {\n  return macros_newcommand(context, true, false);\n});\ndefineMacro(\"\\\\providecommand\", function (context) {\n  return macros_newcommand(context, true, true);\n}); //////////////////////////////////////////////////////////////////////\n// Grouping\n// \\let\\bgroup={ \\let\\egroup=}\n\ndefineMacro(\"\\\\bgroup\", \"{\");\ndefineMacro(\"\\\\egroup\", \"}\"); // Symbols from latex.ltx:\n// \\def\\lq{`}\n// \\def\\rq{'}\n// \\def \\aa {\\r a}\n// \\def \\AA {\\r A}\n\ndefineMacro(\"\\\\lq\", \"`\");\ndefineMacro(\"\\\\rq\", \"'\");\ndefineMacro(\"\\\\aa\", \"\\\\r a\");\ndefineMacro(\"\\\\AA\", \"\\\\r A\"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML.\n// \\DeclareTextCommandDefault{\\textcopyright}{\\textcircled{c}}\n// \\DeclareTextCommandDefault{\\textregistered}{\\textcircled{%\n//      \\check@mathfonts\\fontsize\\sf@size\\z@\\math@fontsfalse\\selectfont R}}\n// \\DeclareRobustCommand{\\copyright}{%\n//    \\ifmmode{\\nfss@text{\\textcopyright}}\\else\\textcopyright\\fi}\n\ndefineMacro(\"\\\\textcopyright\", \"\\\\html@mathml{\\\\textcircled{c}}{\\\\char`©}\");\ndefineMacro(\"\\\\copyright\", \"\\\\TextOrMath{\\\\textcopyright}{\\\\text{\\\\textcopyright}}\");\ndefineMacro(\"\\\\textregistered\", \"\\\\html@mathml{\\\\textcircled{\\\\scriptsize R}}{\\\\char`®}\"); // Characters omitted from Unicode range 1D400–1D7FF\n\ndefineMacro(\"\\u212C\", \"\\\\mathscr{B}\"); // script\n\ndefineMacro(\"\\u2130\", \"\\\\mathscr{E}\");\ndefineMacro(\"\\u2131\", \"\\\\mathscr{F}\");\ndefineMacro(\"\\u210B\", \"\\\\mathscr{H}\");\ndefineMacro(\"\\u2110\", \"\\\\mathscr{I}\");\ndefineMacro(\"\\u2112\", \"\\\\mathscr{L}\");\ndefineMacro(\"\\u2133\", \"\\\\mathscr{M}\");\ndefineMacro(\"\\u211B\", \"\\\\mathscr{R}\");\ndefineMacro(\"\\u212D\", \"\\\\mathfrak{C}\"); // Fraktur\n\ndefineMacro(\"\\u210C\", \"\\\\mathfrak{H}\");\ndefineMacro(\"\\u2128\", \"\\\\mathfrak{Z}\"); // Define \\Bbbk with a macro that works in both HTML and MathML.\n\ndefineMacro(\"\\\\Bbbk\", \"\\\\Bbb{k}\"); // Unicode middle dot\n// The KaTeX fonts do not contain U+00B7. Instead, \\cdotp displays\n// the dot at U+22C5 and gives it punct spacing.\n\ndefineMacro(\"\\xB7\", \"\\\\cdotp\"); // \\llap and \\rlap render their contents in text mode\n\ndefineMacro(\"\\\\llap\", \"\\\\mathllap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\rlap\", \"\\\\mathrlap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\clap\", \"\\\\mathclap{\\\\textrm{#1}}\"); // \\not is defined by base/fontmath.ltx via\n// \\DeclareMathSymbol{\\not}{\\mathrel}{symbols}{\"36}\n// It's thus treated like a \\mathrel, but defined by a symbol that has zero\n// width but extends to the right.  We use \\rlap to get that spacing.\n// For MathML we write U+0338 here. buildMathML.js will then do the overlay.\n\ndefineMacro(\"\\\\not\", '\\\\html@mathml{\\\\mathrel{\\\\mathrlap\\\\@not}}{\\\\char\"338}'); // Negated symbols from base/fontmath.ltx:\n// \\def\\neq{\\not=} \\let\\ne=\\neq\n// \\DeclareRobustCommand\n//   \\notin{\\mathrel{\\m@th\\mathpalette\\c@ncel\\in}}\n// \\def\\c@ncel#1#2{\\m@th\\ooalign{$\\hfil#1\\mkern1mu/\\hfil$\\crcr$#1#2$}}\n\ndefineMacro(\"\\\\neq\", \"\\\\html@mathml{\\\\mathrel{\\\\not=}}{\\\\mathrel{\\\\char`≠}}\");\ndefineMacro(\"\\\\ne\", \"\\\\neq\");\ndefineMacro(\"\\u2260\", \"\\\\neq\");\ndefineMacro(\"\\\\notin\", \"\\\\html@mathml{\\\\mathrel{{\\\\in}\\\\mathllap{/\\\\mskip1mu}}}\" + \"{\\\\mathrel{\\\\char`∉}}\");\ndefineMacro(\"\\u2209\", \"\\\\notin\"); // Unicode stacked relations\n\ndefineMacro(\"\\u2258\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\kern{-1em}\\\\raisebox{0.4em}{$\\\\scriptsize\\\\frown$}}\" + \"}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u2259\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\wedge}{=}}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u225A\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\vee}{=}}{\\\\mathrel{\\\\char`\\u225A}}\");\ndefineMacro(\"\\u225B\", \"\\\\html@mathml{\\\\stackrel{\\\\scriptsize\\\\star}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225B}}\");\ndefineMacro(\"\\u225D\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{def}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225D}}\");\ndefineMacro(\"\\u225E\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{m}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225E}}\");\ndefineMacro(\"\\u225F\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny?}{=}}{\\\\mathrel{\\\\char`\\u225F}}\"); // Misc Unicode\n\ndefineMacro(\"\\u27C2\", \"\\\\perp\");\ndefineMacro(\"\\u203C\", \"\\\\mathclose{!\\\\mkern-0.8mu!}\");\ndefineMacro(\"\\u220C\", \"\\\\notni\");\ndefineMacro(\"\\u231C\", \"\\\\ulcorner\");\ndefineMacro(\"\\u231D\", \"\\\\urcorner\");\ndefineMacro(\"\\u231E\", \"\\\\llcorner\");\ndefineMacro(\"\\u231F\", \"\\\\lrcorner\");\ndefineMacro(\"\\xA9\", \"\\\\copyright\");\ndefineMacro(\"\\xAE\", \"\\\\textregistered\");\ndefineMacro(\"\\uFE0F\", \"\\\\textregistered\"); //////////////////////////////////////////////////////////////////////\n// LaTeX_2ε\n// \\vdots{\\vbox{\\baselineskip4\\p@  \\lineskiplimit\\z@\n// \\kern6\\p@\\hbox{.}\\hbox{.}\\hbox{.}}}\n// We'll call \\varvdots, which gets a glyph from symbols.js.\n// The zero-width rule gets us an equivalent to the vertical 6pt kern.\n\ndefineMacro(\"\\\\vdots\", \"\\\\mathord{\\\\varvdots\\\\rule{0pt}{15pt}}\");\ndefineMacro(\"\\u22EE\", \"\\\\vdots\"); //////////////////////////////////////////////////////////////////////\n// amsmath.sty\n// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf\n// Italic Greek capital letters.  AMS defines these with \\DeclareMathSymbol,\n// but they are equivalent to \\mathit{\\Letter}.\n\ndefineMacro(\"\\\\varGamma\", \"\\\\mathit{\\\\Gamma}\");\ndefineMacro(\"\\\\varDelta\", \"\\\\mathit{\\\\Delta}\");\ndefineMacro(\"\\\\varTheta\", \"\\\\mathit{\\\\Theta}\");\ndefineMacro(\"\\\\varLambda\", \"\\\\mathit{\\\\Lambda}\");\ndefineMacro(\"\\\\varXi\", \"\\\\mathit{\\\\Xi}\");\ndefineMacro(\"\\\\varPi\", \"\\\\mathit{\\\\Pi}\");\ndefineMacro(\"\\\\varSigma\", \"\\\\mathit{\\\\Sigma}\");\ndefineMacro(\"\\\\varUpsilon\", \"\\\\mathit{\\\\Upsilon}\");\ndefineMacro(\"\\\\varPhi\", \"\\\\mathit{\\\\Phi}\");\ndefineMacro(\"\\\\varPsi\", \"\\\\mathit{\\\\Psi}\");\ndefineMacro(\"\\\\varOmega\", \"\\\\mathit{\\\\Omega}\"); // \\renewcommand{\\colon}{\\nobreak\\mskip2mu\\mathpunct{}\\nonscript\n// \\mkern-\\thinmuskip{:}\\mskip6muplus1mu\\relax}\n\ndefineMacro(\"\\\\colon\", \"\\\\nobreak\\\\mskip2mu\\\\mathpunct{}\" + \"\\\\mathchoice{\\\\mkern-3mu}{\\\\mkern-3mu}{}{}{:}\\\\mskip6mu\"); // \\newcommand{\\boxed}[1]{\\fbox{\\m@th$\\displaystyle#1$}}\n\ndefineMacro(\"\\\\boxed\", \"\\\\fbox{$\\\\displaystyle{#1}$}\"); // \\def\\iff{\\DOTSB\\;\\Longleftrightarrow\\;}\n// \\def\\implies{\\DOTSB\\;\\Longrightarrow\\;}\n// \\def\\impliedby{\\DOTSB\\;\\Longleftarrow\\;}\n\ndefineMacro(\"\\\\iff\", \"\\\\DOTSB\\\\;\\\\Longleftrightarrow\\\\;\");\ndefineMacro(\"\\\\implies\", \"\\\\DOTSB\\\\;\\\\Longrightarrow\\\\;\");\ndefineMacro(\"\\\\impliedby\", \"\\\\DOTSB\\\\;\\\\Longleftarrow\\\\;\"); // AMSMath's automatic \\dots, based on \\mdots@@ macro.\n\nvar dotsByToken = {\n  ',': '\\\\dotsc',\n  '\\\\not': '\\\\dotsb',\n  // \\keybin@ checks for the following:\n  '+': '\\\\dotsb',\n  '=': '\\\\dotsb',\n  '<': '\\\\dotsb',\n  '>': '\\\\dotsb',\n  '-': '\\\\dotsb',\n  '*': '\\\\dotsb',\n  ':': '\\\\dotsb',\n  // Symbols whose definition starts with \\DOTSB:\n  '\\\\DOTSB': '\\\\dotsb',\n  '\\\\coprod': '\\\\dotsb',\n  '\\\\bigvee': '\\\\dotsb',\n  '\\\\bigwedge': '\\\\dotsb',\n  '\\\\biguplus': '\\\\dotsb',\n  '\\\\bigcap': '\\\\dotsb',\n  '\\\\bigcup': '\\\\dotsb',\n  '\\\\prod': '\\\\dotsb',\n  '\\\\sum': '\\\\dotsb',\n  '\\\\bigotimes': '\\\\dotsb',\n  '\\\\bigoplus': '\\\\dotsb',\n  '\\\\bigodot': '\\\\dotsb',\n  '\\\\bigsqcup': '\\\\dotsb',\n  '\\\\And': '\\\\dotsb',\n  '\\\\longrightarrow': '\\\\dotsb',\n  '\\\\Longrightarrow': '\\\\dotsb',\n  '\\\\longleftarrow': '\\\\dotsb',\n  '\\\\Longleftarrow': '\\\\dotsb',\n  '\\\\longleftrightarrow': '\\\\dotsb',\n  '\\\\Longleftrightarrow': '\\\\dotsb',\n  '\\\\mapsto': '\\\\dotsb',\n  '\\\\longmapsto': '\\\\dotsb',\n  '\\\\hookrightarrow': '\\\\dotsb',\n  '\\\\doteq': '\\\\dotsb',\n  // Symbols whose definition starts with \\mathbin:\n  '\\\\mathbin': '\\\\dotsb',\n  // Symbols whose definition starts with \\mathrel:\n  '\\\\mathrel': '\\\\dotsb',\n  '\\\\relbar': '\\\\dotsb',\n  '\\\\Relbar': '\\\\dotsb',\n  '\\\\xrightarrow': '\\\\dotsb',\n  '\\\\xleftarrow': '\\\\dotsb',\n  // Symbols whose definition starts with \\DOTSI:\n  '\\\\DOTSI': '\\\\dotsi',\n  '\\\\int': '\\\\dotsi',\n  '\\\\oint': '\\\\dotsi',\n  '\\\\iint': '\\\\dotsi',\n  '\\\\iiint': '\\\\dotsi',\n  '\\\\iiiint': '\\\\dotsi',\n  '\\\\idotsint': '\\\\dotsi',\n  // Symbols whose definition starts with \\DOTSX:\n  '\\\\DOTSX': '\\\\dotsx'\n};\ndefineMacro(\"\\\\dots\", function (context) {\n  // TODO: If used in text mode, should expand to \\textellipsis.\n  // However, in KaTeX, \\textellipsis and \\ldots behave the same\n  // (in text mode), and it's unlikely we'd see any of the math commands\n  // that affect the behavior of \\dots when in text mode.  So fine for now\n  // (until we support \\ifmmode ... \\else ... \\fi).\n  var thedots = '\\\\dotso';\n  var next = context.expandAfterFuture().text;\n\n  if (next in dotsByToken) {\n    thedots = dotsByToken[next];\n  } else if (next.substr(0, 4) === '\\\\not') {\n    thedots = '\\\\dotsb';\n  } else if (next in src_symbols.math) {\n    if (utils.contains(['bin', 'rel'], src_symbols.math[next].group)) {\n      thedots = '\\\\dotsb';\n    }\n  }\n\n  return thedots;\n});\nvar spaceAfterDots = {\n  // \\rightdelim@ checks for the following:\n  ')': true,\n  ']': true,\n  '\\\\rbrack': true,\n  '\\\\}': true,\n  '\\\\rbrace': true,\n  '\\\\rangle': true,\n  '\\\\rceil': true,\n  '\\\\rfloor': true,\n  '\\\\rgroup': true,\n  '\\\\rmoustache': true,\n  '\\\\right': true,\n  '\\\\bigr': true,\n  '\\\\biggr': true,\n  '\\\\Bigr': true,\n  '\\\\Biggr': true,\n  // \\extra@ also tests for the following:\n  '$': true,\n  // \\extrap@ checks for the following:\n  ';': true,\n  '.': true,\n  ',': true\n};\ndefineMacro(\"\\\\dotso\", function (context) {\n  var next = context.future().text;\n\n  if (next in spaceAfterDots) {\n    return \"\\\\ldots\\\\,\";\n  } else {\n    return \"\\\\ldots\";\n  }\n});\ndefineMacro(\"\\\\dotsc\", function (context) {\n  var next = context.future().text; // \\dotsc uses \\extra@ but not \\extrap@, instead specially checking for\n  // ';' and '.', but doesn't check for ','.\n\n  if (next in spaceAfterDots && next !== ',') {\n    return \"\\\\ldots\\\\,\";\n  } else {\n    return \"\\\\ldots\";\n  }\n});\ndefineMacro(\"\\\\cdots\", function (context) {\n  var next = context.future().text;\n\n  if (next in spaceAfterDots) {\n    return \"\\\\@cdots\\\\,\";\n  } else {\n    return \"\\\\@cdots\";\n  }\n});\ndefineMacro(\"\\\\dotsb\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsm\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsi\", \"\\\\!\\\\cdots\"); // amsmath doesn't actually define \\dotsx, but \\dots followed by a macro\n// starting with \\DOTSX implies \\dotso, and then \\extra@ detects this case\n// and forces the added `\\,`.\n\ndefineMacro(\"\\\\dotsx\", \"\\\\ldots\\\\,\"); // \\let\\DOTSI\\relax\n// \\let\\DOTSB\\relax\n// \\let\\DOTSX\\relax\n\ndefineMacro(\"\\\\DOTSI\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSB\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSX\", \"\\\\relax\"); // Spacing, based on amsmath.sty's override of LaTeX defaults\n// \\DeclareRobustCommand{\\tmspace}[3]{%\n//   \\ifmmode\\mskip#1#2\\else\\kern#1#3\\fi\\relax}\n\ndefineMacro(\"\\\\tmspace\", \"\\\\TextOrMath{\\\\kern#1#3}{\\\\mskip#1#2}\\\\relax\"); // \\renewcommand{\\,}{\\tmspace+\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\,\", \"\\\\tmspace+{3mu}{.1667em}\"); // \\let\\thinspace\\,\n\ndefineMacro(\"\\\\thinspace\", \"\\\\,\"); // \\def\\>{\\mskip\\medmuskip}\n// \\renewcommand{\\:}{\\tmspace+\\medmuskip{.2222em}}\n// TODO: \\> and math mode of \\: should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\>\", \"\\\\mskip{4mu}\");\ndefineMacro(\"\\\\:\", \"\\\\tmspace+{4mu}{.2222em}\"); // \\let\\medspace\\:\n\ndefineMacro(\"\\\\medspace\", \"\\\\:\"); // \\renewcommand{\\;}{\\tmspace+\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip = 5mu plus 5mu\n\ndefineMacro(\"\\\\;\", \"\\\\tmspace+{5mu}{.2777em}\"); // \\let\\thickspace\\;\n\ndefineMacro(\"\\\\thickspace\", \"\\\\;\"); // \\renewcommand{\\!}{\\tmspace-\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\!\", \"\\\\tmspace-{3mu}{.1667em}\"); // \\let\\negthinspace\\!\n\ndefineMacro(\"\\\\negthinspace\", \"\\\\!\"); // \\newcommand{\\negmedspace}{\\tmspace-\\medmuskip{.2222em}}\n// TODO: math mode should use \\medmuskip\n\ndefineMacro(\"\\\\negmedspace\", \"\\\\tmspace-{4mu}{.2222em}\"); // \\newcommand{\\negthickspace}{\\tmspace-\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip\n\ndefineMacro(\"\\\\negthickspace\", \"\\\\tmspace-{5mu}{.277em}\"); // \\def\\enspace{\\kern.5em }\n\ndefineMacro(\"\\\\enspace\", \"\\\\kern.5em \"); // \\def\\enskip{\\hskip.5em\\relax}\n\ndefineMacro(\"\\\\enskip\", \"\\\\hskip.5em\\\\relax\"); // \\def\\quad{\\hskip1em\\relax}\n\ndefineMacro(\"\\\\quad\", \"\\\\hskip1em\\\\relax\"); // \\def\\qquad{\\hskip2em\\relax}\n\ndefineMacro(\"\\\\qquad\", \"\\\\hskip2em\\\\relax\"); // \\tag@in@display form of \\tag\n\ndefineMacro(\"\\\\tag\", \"\\\\@ifstar\\\\tag@literal\\\\tag@paren\");\ndefineMacro(\"\\\\tag@paren\", \"\\\\tag@literal{({#1})}\");\ndefineMacro(\"\\\\tag@literal\", function (context) {\n  if (context.macros.get(\"\\\\df@tag\")) {\n    throw new src_ParseError(\"Multiple \\\\tag\");\n  }\n\n  return \"\\\\gdef\\\\df@tag{\\\\text{#1}}\";\n}); // \\renewcommand{\\bmod}{\\nonscript\\mskip-\\medmuskip\\mkern5mu\\mathbin\n//   {\\operator@font mod}\\penalty900\n//   \\mkern5mu\\nonscript\\mskip-\\medmuskip}\n// \\newcommand{\\pod}[1]{\\allowbreak\n//   \\if@display\\mkern18mu\\else\\mkern8mu\\fi(#1)}\n// \\renewcommand{\\pmod}[1]{\\pod{{\\operator@font mod}\\mkern6mu#1}}\n// \\newcommand{\\mod}[1]{\\allowbreak\\if@display\\mkern18mu\n//   \\else\\mkern12mu\\fi{\\operator@font mod}\\,\\,#1}\n// TODO: math mode should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\bmod\", \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\" + \"\\\\mathbin{\\\\rm mod}\" + \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\");\ndefineMacro(\"\\\\pod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern8mu}{\\\\mkern8mu}{\\\\mkern8mu}(#1)\");\ndefineMacro(\"\\\\pmod\", \"\\\\pod{{\\\\rm mod}\\\\mkern6mu#1}\");\ndefineMacro(\"\\\\mod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern12mu}{\\\\mkern12mu}{\\\\mkern12mu}\" + \"{\\\\rm mod}\\\\,\\\\,#1\"); // \\pmb    --   A simulation of bold.\n// It works by typesetting three copies of the argument with small offsets.\n// Ref: a rather lengthy macro in ambsy.sty\n\ndefineMacro(\"\\\\pmb\", \"\\\\html@mathml{\\\\@binrel{#1}{\" + \"\\\\mathrlap{#1}\" + \"\\\\mathrlap{\\\\mkern0.4mu\\\\raisebox{0.4mu}{$#1$}}\" + \"{\\\\mkern0.8mu#1}\" + \"}}{\\\\mathbf{#1}}\"); //////////////////////////////////////////////////////////////////////\n// LaTeX source2e\n// \\\\ defaults to \\newline, but changes to \\cr within array environment\n\ndefineMacro(\"\\\\\\\\\", \"\\\\newline\"); // \\def\\TeX{T\\kern-.1667em\\lower.5ex\\hbox{E}\\kern-.125emX\\@}\n// TODO: Doesn't normally work in math mode because \\@ fails.  KaTeX doesn't\n// support \\@ yet, so that's omitted, and we add \\text so that the result\n// doesn't look funny in math mode.\n\ndefineMacro(\"\\\\TeX\", \"\\\\textrm{\\\\html@mathml{\" + \"T\\\\kern-.1667em\\\\raisebox{-.5ex}{E}\\\\kern-.125emX\" + \"}{TeX}}\"); // \\DeclareRobustCommand{\\LaTeX}{L\\kern-.36em%\n//         {\\sbox\\z@ T%\n//          \\vbox to\\ht\\z@{\\hbox{\\check@mathfonts\n//                               \\fontsize\\sf@size\\z@\n//                               \\math@fontsfalse\\selectfont\n//                               A}%\n//                         \\vss}%\n//         }%\n//         \\kern-.15em%\n//         \\TeX}\n// This code aligns the top of the A with the T (from the perspective of TeX's\n// boxes, though visually the A appears to extend above slightly).\n// We compute the corresponding \\raisebox when A is rendered at \\scriptsize,\n// which is size3, which has a scale factor of 0.7 (see Options.js).\n\nvar latexRaiseA = fontMetricsData['Main-Regular'][\"T\".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular'][\"A\".charCodeAt(0)][1] + \"em\";\ndefineMacro(\"\\\\LaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"L\\\\kern-.36em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptsize A}\") + \"\\\\kern-.15em\\\\TeX}{LaTeX}}\"); // New KaTeX logo based on tweaking LaTeX logo\n\ndefineMacro(\"\\\\KaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"K\\\\kern-.17em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptsize A}\") + \"\\\\kern-.15em\\\\TeX}{KaTeX}}\"); // \\DeclareRobustCommand\\hspace{\\@ifstar\\@hspacer\\@hspace}\n// \\def\\@hspace#1{\\hskip  #1\\relax}\n// \\def\\@hspacer#1{\\vrule \\@width\\z@\\nobreak\n//                 \\hskip #1\\hskip \\z@skip}\n\ndefineMacro(\"\\\\hspace\", \"\\\\@ifstar\\\\@hspacer\\\\@hspace\");\ndefineMacro(\"\\\\@hspace\", \"\\\\hskip #1\\\\relax\");\ndefineMacro(\"\\\\@hspacer\", \"\\\\rule{0pt}{0pt}\\\\hskip #1\\\\relax\"); //////////////////////////////////////////////////////////////////////\n// mathtools.sty\n//\\providecommand\\ordinarycolon{:}\n\ndefineMacro(\"\\\\ordinarycolon\", \":\"); //\\def\\vcentcolon{\\mathrel{\\mathop\\ordinarycolon}}\n//TODO(edemaine): Not yet centered. Fix via \\raisebox or #726\n\ndefineMacro(\"\\\\vcentcolon\", \"\\\\mathrel{\\\\mathop\\\\ordinarycolon}\"); // \\providecommand*\\dblcolon{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}\n\ndefineMacro(\"\\\\dblcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-.9mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2237}}\"); // \\providecommand*\\coloneqq{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2254}}\"); // ≔\n// \\providecommand*\\Coloneqq{\\dblcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\Coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"3d}}\"); // \\providecommand*\\coloneq{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2212}}\"); // \\providecommand*\\Coloneq{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\Coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2212}}\"); // \\providecommand*\\eqqcolon{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2255}}\"); // ≕\n// \\providecommand*\\Eqqcolon{=\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"3d\\\\char\\\"2237}}\"); // \\providecommand*\\eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2239}}\"); // \\providecommand*\\Eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"2212\\\\char\\\"2237}}\"); // \\providecommand*\\colonapprox{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2248}}\"); // \\providecommand*\\Colonapprox{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\Colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2248}}\"); // \\providecommand*\\colonsim{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"223c}}\"); // \\providecommand*\\Colonsim{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\Colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"223c}}\"); // Some Unicode characters are implemented with macros to mathtools functions.\n\ndefineMacro(\"\\u2237\", \"\\\\dblcolon\"); // ::\n\ndefineMacro(\"\\u2239\", \"\\\\eqcolon\"); // -:\n\ndefineMacro(\"\\u2254\", \"\\\\coloneqq\"); // :=\n\ndefineMacro(\"\\u2255\", \"\\\\eqqcolon\"); // =:\n\ndefineMacro(\"\\u2A74\", \"\\\\Coloneqq\"); // ::=\n//////////////////////////////////////////////////////////////////////\n// colonequals.sty\n// Alternate names for mathtools's macros:\n\ndefineMacro(\"\\\\ratio\", \"\\\\vcentcolon\");\ndefineMacro(\"\\\\coloncolon\", \"\\\\dblcolon\");\ndefineMacro(\"\\\\colonequals\", \"\\\\coloneqq\");\ndefineMacro(\"\\\\coloncolonequals\", \"\\\\Coloneqq\");\ndefineMacro(\"\\\\equalscolon\", \"\\\\eqqcolon\");\ndefineMacro(\"\\\\equalscoloncolon\", \"\\\\Eqqcolon\");\ndefineMacro(\"\\\\colonminus\", \"\\\\coloneq\");\ndefineMacro(\"\\\\coloncolonminus\", \"\\\\Coloneq\");\ndefineMacro(\"\\\\minuscolon\", \"\\\\eqcolon\");\ndefineMacro(\"\\\\minuscoloncolon\", \"\\\\Eqcolon\"); // \\colonapprox name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonapprox\", \"\\\\Colonapprox\"); // \\colonsim name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonsim\", \"\\\\Colonsim\"); // Additional macros, implemented by analogy with mathtools definitions:\n\ndefineMacro(\"\\\\simcolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\simcoloncolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\");\ndefineMacro(\"\\\\approxcolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\approxcoloncolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\"); // Present in newtxmath, pxfonts and txfonts\n\ndefineMacro(\"\\\\notni\", \"\\\\html@mathml{\\\\not\\\\ni}{\\\\mathrel{\\\\char`\\u220C}}\");\ndefineMacro(\"\\\\limsup\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{lim\\\\,sup}}\\\\limits\");\ndefineMacro(\"\\\\liminf\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{lim\\\\,inf}}\\\\limits\"); //////////////////////////////////////////////////////////////////////\n// MathML alternates for KaTeX glyphs in the Unicode private area\n\ndefineMacro(\"\\\\gvertneqq\", \"\\\\html@mathml{\\\\@gvertneqq}{\\u2269}\");\ndefineMacro(\"\\\\lvertneqq\", \"\\\\html@mathml{\\\\@lvertneqq}{\\u2268}\");\ndefineMacro(\"\\\\ngeqq\", \"\\\\html@mathml{\\\\@ngeqq}{\\u2271}\");\ndefineMacro(\"\\\\ngeqslant\", \"\\\\html@mathml{\\\\@ngeqslant}{\\u2271}\");\ndefineMacro(\"\\\\nleqq\", \"\\\\html@mathml{\\\\@nleqq}{\\u2270}\");\ndefineMacro(\"\\\\nleqslant\", \"\\\\html@mathml{\\\\@nleqslant}{\\u2270}\");\ndefineMacro(\"\\\\nshortmid\", \"\\\\html@mathml{\\\\@nshortmid}{∤}\");\ndefineMacro(\"\\\\nshortparallel\", \"\\\\html@mathml{\\\\@nshortparallel}{∦}\");\ndefineMacro(\"\\\\nsubseteqq\", \"\\\\html@mathml{\\\\@nsubseteqq}{\\u2288}\");\ndefineMacro(\"\\\\nsupseteqq\", \"\\\\html@mathml{\\\\@nsupseteqq}{\\u2289}\");\ndefineMacro(\"\\\\varsubsetneq\", \"\\\\html@mathml{\\\\@varsubsetneq}{⊊}\");\ndefineMacro(\"\\\\varsubsetneqq\", \"\\\\html@mathml{\\\\@varsubsetneqq}{⫋}\");\ndefineMacro(\"\\\\varsupsetneq\", \"\\\\html@mathml{\\\\@varsupsetneq}{⊋}\");\ndefineMacro(\"\\\\varsupsetneqq\", \"\\\\html@mathml{\\\\@varsupsetneqq}{⫌}\"); //////////////////////////////////////////////////////////////////////\n// stmaryrd and semantic\n// The stmaryrd and semantic packages render the next four items by calling a\n// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.\n\ndefineMacro(\"\\\\llbracket\", \"\\\\html@mathml{\" + \"\\\\mathopen{[\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u27E6}}\");\ndefineMacro(\"\\\\rrbracket\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu]}}\" + \"{\\\\mathclose{\\\\char`\\u27E7}}\");\ndefineMacro(\"\\u27E6\", \"\\\\llbracket\"); // blackboard bold [\n\ndefineMacro(\"\\u27E7\", \"\\\\rrbracket\"); // blackboard bold ]\n\ndefineMacro(\"\\\\lBrace\", \"\\\\html@mathml{\" + \"\\\\mathopen{\\\\{\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u2983}}\");\ndefineMacro(\"\\\\rBrace\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu\\\\}}}\" + \"{\\\\mathclose{\\\\char`\\u2984}}\");\ndefineMacro(\"\\u2983\", \"\\\\lBrace\"); // blackboard bold {\n\ndefineMacro(\"\\u2984\", \"\\\\rBrace\"); // blackboard bold }\n// TODO: Create variable sized versions of the last two items. I believe that\n// will require new font glyphs.\n//////////////////////////////////////////////////////////////////////\n// texvc.sty\n// The texvc package contains macros available in mediawiki pages.\n// We omit the functions deprecated at\n// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax\n// We also omit texvc's \\O, which conflicts with \\text{\\O}\n\ndefineMacro(\"\\\\darr\", \"\\\\downarrow\");\ndefineMacro(\"\\\\dArr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\Darr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\lang\", \"\\\\langle\");\ndefineMacro(\"\\\\rang\", \"\\\\rangle\");\ndefineMacro(\"\\\\uarr\", \"\\\\uparrow\");\ndefineMacro(\"\\\\uArr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\Uarr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\N\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\R\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Z\", \"\\\\mathbb{Z}\");\ndefineMacro(\"\\\\alef\", \"\\\\aleph\");\ndefineMacro(\"\\\\alefsym\", \"\\\\aleph\");\ndefineMacro(\"\\\\Alpha\", \"\\\\mathrm{A}\");\ndefineMacro(\"\\\\Beta\", \"\\\\mathrm{B}\");\ndefineMacro(\"\\\\bull\", \"\\\\bullet\");\ndefineMacro(\"\\\\Chi\", \"\\\\mathrm{X}\");\ndefineMacro(\"\\\\clubs\", \"\\\\clubsuit\");\ndefineMacro(\"\\\\cnums\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Complex\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Dagger\", \"\\\\ddagger\");\ndefineMacro(\"\\\\diamonds\", \"\\\\diamondsuit\");\ndefineMacro(\"\\\\empty\", \"\\\\emptyset\");\ndefineMacro(\"\\\\Epsilon\", \"\\\\mathrm{E}\");\ndefineMacro(\"\\\\Eta\", \"\\\\mathrm{H}\");\ndefineMacro(\"\\\\exist\", \"\\\\exists\");\ndefineMacro(\"\\\\harr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\hArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Harr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\hearts\", \"\\\\heartsuit\");\ndefineMacro(\"\\\\image\", \"\\\\Im\");\ndefineMacro(\"\\\\infin\", \"\\\\infty\");\ndefineMacro(\"\\\\Iota\", \"\\\\mathrm{I}\");\ndefineMacro(\"\\\\isin\", \"\\\\in\");\ndefineMacro(\"\\\\Kappa\", \"\\\\mathrm{K}\");\ndefineMacro(\"\\\\larr\", \"\\\\leftarrow\");\ndefineMacro(\"\\\\lArr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\Larr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\lrarr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\lrArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Lrarr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Mu\", \"\\\\mathrm{M}\");\ndefineMacro(\"\\\\natnums\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\Nu\", \"\\\\mathrm{N}\");\ndefineMacro(\"\\\\Omicron\", \"\\\\mathrm{O}\");\ndefineMacro(\"\\\\plusmn\", \"\\\\pm\");\ndefineMacro(\"\\\\rarr\", \"\\\\rightarrow\");\ndefineMacro(\"\\\\rArr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\Rarr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\real\", \"\\\\Re\");\ndefineMacro(\"\\\\reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Rho\", \"\\\\mathrm{P}\");\ndefineMacro(\"\\\\sdot\", \"\\\\cdot\");\ndefineMacro(\"\\\\sect\", \"\\\\S\");\ndefineMacro(\"\\\\spades\", \"\\\\spadesuit\");\ndefineMacro(\"\\\\sub\", \"\\\\subset\");\ndefineMacro(\"\\\\sube\", \"\\\\subseteq\");\ndefineMacro(\"\\\\supe\", \"\\\\supseteq\");\ndefineMacro(\"\\\\Tau\", \"\\\\mathrm{T}\");\ndefineMacro(\"\\\\thetasym\", \"\\\\vartheta\"); // TODO: defineMacro(\"\\\\varcoppa\", \"\\\\\\mbox{\\\\coppa}\");\n\ndefineMacro(\"\\\\weierp\", \"\\\\wp\");\ndefineMacro(\"\\\\Zeta\", \"\\\\mathrm{Z}\"); //////////////////////////////////////////////////////////////////////\n// statmath.sty\n// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf\n\ndefineMacro(\"\\\\argmin\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{arg\\\\,min}}\\\\limits\");\ndefineMacro(\"\\\\argmax\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{arg\\\\,max}}\\\\limits\"); // Custom Khan Academy colors, should be moved to an optional package\n\ndefineMacro(\"\\\\blue\", \"\\\\textcolor{##6495ed}{#1}\");\ndefineMacro(\"\\\\orange\", \"\\\\textcolor{##ffa500}{#1}\");\ndefineMacro(\"\\\\pink\", \"\\\\textcolor{##ff00af}{#1}\");\ndefineMacro(\"\\\\red\", \"\\\\textcolor{##df0030}{#1}\");\ndefineMacro(\"\\\\green\", \"\\\\textcolor{##28ae7b}{#1}\");\ndefineMacro(\"\\\\gray\", \"\\\\textcolor{gray}{##1}\");\ndefineMacro(\"\\\\purple\", \"\\\\textcolor{##9d38bd}{#1}\");\ndefineMacro(\"\\\\blueA\", \"\\\\textcolor{##ccfaff}{#1}\");\ndefineMacro(\"\\\\blueB\", \"\\\\textcolor{##80f6ff}{#1}\");\ndefineMacro(\"\\\\blueC\", \"\\\\textcolor{##63d9ea}{#1}\");\ndefineMacro(\"\\\\blueD\", \"\\\\textcolor{##11accd}{#1}\");\ndefineMacro(\"\\\\blueE\", \"\\\\textcolor{##0c7f99}{#1}\");\ndefineMacro(\"\\\\tealA\", \"\\\\textcolor{##94fff5}{#1}\");\ndefineMacro(\"\\\\tealB\", \"\\\\textcolor{##26edd5}{#1}\");\ndefineMacro(\"\\\\tealC\", \"\\\\textcolor{##01d1c1}{#1}\");\ndefineMacro(\"\\\\tealD\", \"\\\\textcolor{##01a995}{#1}\");\ndefineMacro(\"\\\\tealE\", \"\\\\textcolor{##208170}{#1}\");\ndefineMacro(\"\\\\greenA\", \"\\\\textcolor{##b6ffb0}{#1}\");\ndefineMacro(\"\\\\greenB\", \"\\\\textcolor{##8af281}{#1}\");\ndefineMacro(\"\\\\greenC\", \"\\\\textcolor{##74cf70}{#1}\");\ndefineMacro(\"\\\\greenD\", \"\\\\textcolor{##1fab54}{#1}\");\ndefineMacro(\"\\\\greenE\", \"\\\\textcolor{##0d923f}{#1}\");\ndefineMacro(\"\\\\goldA\", \"\\\\textcolor{##ffd0a9}{#1}\");\ndefineMacro(\"\\\\goldB\", \"\\\\textcolor{##ffbb71}{#1}\");\ndefineMacro(\"\\\\goldC\", \"\\\\textcolor{##ff9c39}{#1}\");\ndefineMacro(\"\\\\goldD\", \"\\\\textcolor{##e07d10}{#1}\");\ndefineMacro(\"\\\\goldE\", \"\\\\textcolor{##a75a05}{#1}\");\ndefineMacro(\"\\\\redA\", \"\\\\textcolor{##fca9a9}{#1}\");\ndefineMacro(\"\\\\redB\", \"\\\\textcolor{##ff8482}{#1}\");\ndefineMacro(\"\\\\redC\", \"\\\\textcolor{##f9685d}{#1}\");\ndefineMacro(\"\\\\redD\", \"\\\\textcolor{##e84d39}{#1}\");\ndefineMacro(\"\\\\redE\", \"\\\\textcolor{##bc2612}{#1}\");\ndefineMacro(\"\\\\maroonA\", \"\\\\textcolor{##ffbde0}{#1}\");\ndefineMacro(\"\\\\maroonB\", \"\\\\textcolor{##ff92c6}{#1}\");\ndefineMacro(\"\\\\maroonC\", \"\\\\textcolor{##ed5fa6}{#1}\");\ndefineMacro(\"\\\\maroonD\", \"\\\\textcolor{##ca337c}{#1}\");\ndefineMacro(\"\\\\maroonE\", \"\\\\textcolor{##9e034e}{#1}\");\ndefineMacro(\"\\\\purpleA\", \"\\\\textcolor{##ddd7ff}{#1}\");\ndefineMacro(\"\\\\purpleB\", \"\\\\textcolor{##c6b9fc}{#1}\");\ndefineMacro(\"\\\\purpleC\", \"\\\\textcolor{##aa87ff}{#1}\");\ndefineMacro(\"\\\\purpleD\", \"\\\\textcolor{##7854ab}{#1}\");\ndefineMacro(\"\\\\purpleE\", \"\\\\textcolor{##543b78}{#1}\");\ndefineMacro(\"\\\\mintA\", \"\\\\textcolor{##f5f9e8}{#1}\");\ndefineMacro(\"\\\\mintB\", \"\\\\textcolor{##edf2df}{#1}\");\ndefineMacro(\"\\\\mintC\", \"\\\\textcolor{##e0e5cc}{#1}\");\ndefineMacro(\"\\\\grayA\", \"\\\\textcolor{##f6f7f7}{#1}\");\ndefineMacro(\"\\\\grayB\", \"\\\\textcolor{##f0f1f2}{#1}\");\ndefineMacro(\"\\\\grayC\", \"\\\\textcolor{##e3e5e6}{#1}\");\ndefineMacro(\"\\\\grayD\", \"\\\\textcolor{##d6d8da}{#1}\");\ndefineMacro(\"\\\\grayE\", \"\\\\textcolor{##babec2}{#1}\");\ndefineMacro(\"\\\\grayF\", \"\\\\textcolor{##888d93}{#1}\");\ndefineMacro(\"\\\\grayG\", \"\\\\textcolor{##626569}{#1}\");\ndefineMacro(\"\\\\grayH\", \"\\\\textcolor{##3b3e40}{#1}\");\ndefineMacro(\"\\\\grayI\", \"\\\\textcolor{##21242c}{#1}\");\ndefineMacro(\"\\\\kaBlue\", \"\\\\textcolor{##314453}{#1}\");\ndefineMacro(\"\\\\kaGreen\", \"\\\\textcolor{##71B307}{#1}\");\n// CONCATENATED MODULE: ./src/MacroExpander.js\n/**\n * This file contains the “gullet” where macros are expanded\n * until only non-macro tokens remain.\n */\n\n\n\n\n\n\n\n// List of commands that act like macros but aren't defined as a macro,\n// function, or symbol.  Used in `isDefined`.\nvar implicitCommands = {\n  \"\\\\relax\": true,\n  // MacroExpander.js\n  \"^\": true,\n  // Parser.js\n  \"_\": true,\n  // Parser.js\n  \"\\\\limits\": true,\n  // Parser.js\n  \"\\\\nolimits\": true // Parser.js\n\n};\n\nvar MacroExpander_MacroExpander =\n/*#__PURE__*/\nfunction () {\n  function MacroExpander(input, settings, mode) {\n    this.settings = void 0;\n    this.expansionCount = void 0;\n    this.lexer = void 0;\n    this.macros = void 0;\n    this.stack = void 0;\n    this.mode = void 0;\n    this.settings = settings;\n    this.expansionCount = 0;\n    this.feed(input); // Make new global namespace\n\n    this.macros = new Namespace_Namespace(macros, settings.macros);\n    this.mode = mode;\n    this.stack = []; // contains tokens in REVERSE order\n  }\n  /**\n   * Feed a new input string to the same MacroExpander\n   * (with existing macros etc.).\n   */\n\n\n  var _proto = MacroExpander.prototype;\n\n  _proto.feed = function feed(input) {\n    this.lexer = new Lexer_Lexer(input, this.settings);\n  }\n  /**\n   * Switches between \"text\" and \"math\" modes.\n   */\n  ;\n\n  _proto.switchMode = function switchMode(newMode) {\n    this.mode = newMode;\n  }\n  /**\n   * Start a new group nesting within all namespaces.\n   */\n  ;\n\n  _proto.beginGroup = function beginGroup() {\n    this.macros.beginGroup();\n  }\n  /**\n   * End current group nesting within all namespaces.\n   */\n  ;\n\n  _proto.endGroup = function endGroup() {\n    this.macros.endGroup();\n  }\n  /**\n   * Returns the topmost token on the stack, without expanding it.\n   * Similar in behavior to TeX's `\\futurelet`.\n   */\n  ;\n\n  _proto.future = function future() {\n    if (this.stack.length === 0) {\n      this.pushToken(this.lexer.lex());\n    }\n\n    return this.stack[this.stack.length - 1];\n  }\n  /**\n   * Remove and return the next unexpanded token.\n   */\n  ;\n\n  _proto.popToken = function popToken() {\n    this.future(); // ensure non-empty stack\n\n    return this.stack.pop();\n  }\n  /**\n   * Add a given token to the token stack.  In particular, this get be used\n   * to put back a token returned from one of the other methods.\n   */\n  ;\n\n  _proto.pushToken = function pushToken(token) {\n    this.stack.push(token);\n  }\n  /**\n   * Append an array of tokens to the token stack.\n   */\n  ;\n\n  _proto.pushTokens = function pushTokens(tokens) {\n    var _this$stack;\n\n    (_this$stack = this.stack).push.apply(_this$stack, tokens);\n  }\n  /**\n   * Consume all following space tokens, without expansion.\n   */\n  ;\n\n  _proto.consumeSpaces = function consumeSpaces() {\n    for (;;) {\n      var token = this.future();\n\n      if (token.text === \" \") {\n        this.stack.pop();\n      } else {\n        break;\n      }\n    }\n  }\n  /**\n   * Consume the specified number of arguments from the token stream,\n   * and return the resulting array of arguments.\n   */\n  ;\n\n  _proto.consumeArgs = function consumeArgs(numArgs) {\n    var args = []; // obtain arguments, either single token or balanced {…} group\n\n    for (var i = 0; i < numArgs; ++i) {\n      this.consumeSpaces(); // ignore spaces before each argument\n\n      var startOfArg = this.popToken();\n\n      if (startOfArg.text === \"{\") {\n        var arg = [];\n        var depth = 1;\n\n        while (depth !== 0) {\n          var tok = this.popToken();\n          arg.push(tok);\n\n          if (tok.text === \"{\") {\n            ++depth;\n          } else if (tok.text === \"}\") {\n            --depth;\n          } else if (tok.text === \"EOF\") {\n            throw new src_ParseError(\"End of input in macro argument\", startOfArg);\n          }\n        }\n\n        arg.pop(); // remove last }\n\n        arg.reverse(); // like above, to fit in with stack order\n\n        args[i] = arg;\n      } else if (startOfArg.text === \"EOF\") {\n        throw new src_ParseError(\"End of input expecting macro argument\");\n      } else {\n        args[i] = [startOfArg];\n      }\n    }\n\n    return args;\n  }\n  /**\n   * Expand the next token only once if possible.\n   *\n   * If the token is expanded, the resulting tokens will be pushed onto\n   * the stack in reverse order and will be returned as an array,\n   * also in reverse order.\n   *\n   * If not, the next token will be returned without removing it\n   * from the stack.  This case can be detected by a `Token` return value\n   * instead of an `Array` return value.\n   *\n   * In either case, the next token will be on the top of the stack,\n   * or the stack will be empty.\n   *\n   * Used to implement `expandAfterFuture` and `expandNextToken`.\n   *\n   * At the moment, macro expansion doesn't handle delimited macros,\n   * i.e. things like those defined by \\def\\foo#1\\end{…}.\n   * See the TeX book page 202ff. for details on how those should behave.\n   */\n  ;\n\n  _proto.expandOnce = function expandOnce() {\n    var topToken = this.popToken();\n    var name = topToken.text;\n\n    var expansion = this._getExpansion(name);\n\n    if (expansion == null) {\n      // mainly checking for undefined here\n      // Fully expanded\n      this.pushToken(topToken);\n      return topToken;\n    }\n\n    this.expansionCount++;\n\n    if (this.expansionCount > this.settings.maxExpand) {\n      throw new src_ParseError(\"Too many expansions: infinite loop or \" + \"need to increase maxExpand setting\");\n    }\n\n    var tokens = expansion.tokens;\n\n    if (expansion.numArgs) {\n      var args = this.consumeArgs(expansion.numArgs); // paste arguments in place of the placeholders\n\n      tokens = tokens.slice(); // make a shallow copy\n\n      for (var i = tokens.length - 1; i >= 0; --i) {\n        var tok = tokens[i];\n\n        if (tok.text === \"#\") {\n          if (i === 0) {\n            throw new src_ParseError(\"Incomplete placeholder at end of macro body\", tok);\n          }\n\n          tok = tokens[--i]; // next token on stack\n\n          if (tok.text === \"#\") {\n            // ## → #\n            tokens.splice(i + 1, 1); // drop first #\n          } else if (/^[1-9]$/.test(tok.text)) {\n            var _tokens;\n\n            // replace the placeholder with the indicated argument\n            (_tokens = tokens).splice.apply(_tokens, [i, 2].concat(args[+tok.text - 1]));\n          } else {\n            throw new src_ParseError(\"Not a valid argument number\", tok);\n          }\n        }\n      }\n    } // Concatenate expansion onto top of stack.\n\n\n    this.pushTokens(tokens);\n    return tokens;\n  }\n  /**\n   * Expand the next token only once (if possible), and return the resulting\n   * top token on the stack (without removing anything from the stack).\n   * Similar in behavior to TeX's `\\expandafter\\futurelet`.\n   * Equivalent to expandOnce() followed by future().\n   */\n  ;\n\n  _proto.expandAfterFuture = function expandAfterFuture() {\n    this.expandOnce();\n    return this.future();\n  }\n  /**\n   * Recursively expand first token, then return first non-expandable token.\n   */\n  ;\n\n  _proto.expandNextToken = function expandNextToken() {\n    for (;;) {\n      var expanded = this.expandOnce(); // expandOnce returns Token if and only if it's fully expanded.\n\n      if (expanded instanceof Token_Token) {\n        // \\relax stops the expansion, but shouldn't get returned (a\n        // null return value couldn't get implemented as a function).\n        if (expanded.text === \"\\\\relax\") {\n          this.stack.pop();\n        } else {\n          return this.stack.pop(); // === expanded\n        }\n      }\n    } // Flow unable to figure out that this pathway is impossible.\n    // https://github.com/facebook/flow/issues/4808\n\n\n    throw new Error(); // eslint-disable-line no-unreachable\n  }\n  /**\n   * Fully expand the given macro name and return the resulting list of\n   * tokens, or return `undefined` if no such macro is defined.\n   */\n  ;\n\n  _proto.expandMacro = function expandMacro(name) {\n    if (!this.macros.get(name)) {\n      return undefined;\n    }\n\n    var output = [];\n    var oldStackLength = this.stack.length;\n    this.pushToken(new Token_Token(name));\n\n    while (this.stack.length > oldStackLength) {\n      var expanded = this.expandOnce(); // expandOnce returns Token if and only if it's fully expanded.\n\n      if (expanded instanceof Token_Token) {\n        output.push(this.stack.pop());\n      }\n    }\n\n    return output;\n  }\n  /**\n   * Fully expand the given macro name and return the result as a string,\n   * or return `undefined` if no such macro is defined.\n   */\n  ;\n\n  _proto.expandMacroAsText = function expandMacroAsText(name) {\n    var tokens = this.expandMacro(name);\n\n    if (tokens) {\n      return tokens.map(function (token) {\n        return token.text;\n      }).join(\"\");\n    } else {\n      return tokens;\n    }\n  }\n  /**\n   * Returns the expanded macro as a reversed array of tokens and a macro\n   * argument count.  Or returns `null` if no such macro.\n   */\n  ;\n\n  _proto._getExpansion = function _getExpansion(name) {\n    var definition = this.macros.get(name);\n\n    if (definition == null) {\n      // mainly checking for undefined here\n      return definition;\n    }\n\n    var expansion = typeof definition === \"function\" ? definition(this) : definition;\n\n    if (typeof expansion === \"string\") {\n      var numArgs = 0;\n\n      if (expansion.indexOf(\"#\") !== -1) {\n        var stripped = expansion.replace(/##/g, \"\");\n\n        while (stripped.indexOf(\"#\" + (numArgs + 1)) !== -1) {\n          ++numArgs;\n        }\n      }\n\n      var bodyLexer = new Lexer_Lexer(expansion, this.settings);\n      var tokens = [];\n      var tok = bodyLexer.lex();\n\n      while (tok.text !== \"EOF\") {\n        tokens.push(tok);\n        tok = bodyLexer.lex();\n      }\n\n      tokens.reverse(); // to fit in with stack using push and pop\n\n      var expanded = {\n        tokens: tokens,\n        numArgs: numArgs\n      };\n      return expanded;\n    }\n\n    return expansion;\n  }\n  /**\n   * Determine whether a command is currently \"defined\" (has some\n   * functionality), meaning that it's a macro (in the current group),\n   * a function, a symbol, or one of the special commands listed in\n   * `implicitCommands`.\n   */\n  ;\n\n  _proto.isDefined = function isDefined(name) {\n    return this.macros.has(name) || src_functions.hasOwnProperty(name) || src_symbols.math.hasOwnProperty(name) || src_symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name);\n  };\n\n  return MacroExpander;\n}();\n\n\n// CONCATENATED MODULE: ./src/unicodeAccents.js\n// Mapping of Unicode accent characters to their LaTeX equivalent in text and\n// math mode (when they exist).\n/* harmony default export */ var unicodeAccents = ({\n  \"\\u0301\": {\n    text: \"\\\\'\",\n    math: '\\\\acute'\n  },\n  \"\\u0300\": {\n    text: '\\\\`',\n    math: '\\\\grave'\n  },\n  \"\\u0308\": {\n    text: '\\\\\"',\n    math: '\\\\ddot'\n  },\n  \"\\u0303\": {\n    text: '\\\\~',\n    math: '\\\\tilde'\n  },\n  \"\\u0304\": {\n    text: '\\\\=',\n    math: '\\\\bar'\n  },\n  \"\\u0306\": {\n    text: \"\\\\u\",\n    math: '\\\\breve'\n  },\n  \"\\u030C\": {\n    text: '\\\\v',\n    math: '\\\\check'\n  },\n  \"\\u0302\": {\n    text: '\\\\^',\n    math: '\\\\hat'\n  },\n  \"\\u0307\": {\n    text: '\\\\.',\n    math: '\\\\dot'\n  },\n  \"\\u030A\": {\n    text: '\\\\r',\n    math: '\\\\mathring'\n  },\n  \"\\u030B\": {\n    text: '\\\\H'\n  }\n});\n// CONCATENATED MODULE: ./src/unicodeSymbols.js\n// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.\n/* harmony default export */ var unicodeSymbols = ({\n  \"\\xE1\": \"a\\u0301\",\n  // á = \\'{a}\n  \"\\xE0\": \"a\\u0300\",\n  // à = \\`{a}\n  \"\\xE4\": \"a\\u0308\",\n  // ä = \\\"{a}\n  \"\\u01DF\": \"a\\u0308\\u0304\",\n  // ǟ = \\\"\\={a}\n  \"\\xE3\": \"a\\u0303\",\n  // ã = \\~{a}\n  \"\\u0101\": \"a\\u0304\",\n  // ā = \\={a}\n  \"\\u0103\": \"a\\u0306\",\n  // ă = \\u{a}\n  \"\\u1EAF\": \"a\\u0306\\u0301\",\n  // ắ = \\u\\'{a}\n  \"\\u1EB1\": \"a\\u0306\\u0300\",\n  // ằ = \\u\\`{a}\n  \"\\u1EB5\": \"a\\u0306\\u0303\",\n  // ẵ = \\u\\~{a}\n  \"\\u01CE\": \"a\\u030C\",\n  // ǎ = \\v{a}\n  \"\\xE2\": \"a\\u0302\",\n  // â = \\^{a}\n  \"\\u1EA5\": \"a\\u0302\\u0301\",\n  // ấ = \\^\\'{a}\n  \"\\u1EA7\": \"a\\u0302\\u0300\",\n  // ầ = \\^\\`{a}\n  \"\\u1EAB\": \"a\\u0302\\u0303\",\n  // ẫ = \\^\\~{a}\n  \"\\u0227\": \"a\\u0307\",\n  // ȧ = \\.{a}\n  \"\\u01E1\": \"a\\u0307\\u0304\",\n  // ǡ = \\.\\={a}\n  \"\\xE5\": \"a\\u030A\",\n  // å = \\r{a}\n  \"\\u01FB\": \"a\\u030A\\u0301\",\n  // ǻ = \\r\\'{a}\n  \"\\u1E03\": \"b\\u0307\",\n  // ḃ = \\.{b}\n  \"\\u0107\": \"c\\u0301\",\n  // ć = \\'{c}\n  \"\\u010D\": \"c\\u030C\",\n  // č = \\v{c}\n  \"\\u0109\": \"c\\u0302\",\n  // ĉ = \\^{c}\n  \"\\u010B\": \"c\\u0307\",\n  // ċ = \\.{c}\n  \"\\u010F\": \"d\\u030C\",\n  // ď = \\v{d}\n  \"\\u1E0B\": \"d\\u0307\",\n  // ḋ = \\.{d}\n  \"\\xE9\": \"e\\u0301\",\n  // é = \\'{e}\n  \"\\xE8\": \"e\\u0300\",\n  // è = \\`{e}\n  \"\\xEB\": \"e\\u0308\",\n  // ë = \\\"{e}\n  \"\\u1EBD\": \"e\\u0303\",\n  // ẽ = \\~{e}\n  \"\\u0113\": \"e\\u0304\",\n  // ē = \\={e}\n  \"\\u1E17\": \"e\\u0304\\u0301\",\n  // ḗ = \\=\\'{e}\n  \"\\u1E15\": \"e\\u0304\\u0300\",\n  // ḕ = \\=\\`{e}\n  \"\\u0115\": \"e\\u0306\",\n  // ĕ = \\u{e}\n  \"\\u011B\": \"e\\u030C\",\n  // ě = \\v{e}\n  \"\\xEA\": \"e\\u0302\",\n  // ê = \\^{e}\n  \"\\u1EBF\": \"e\\u0302\\u0301\",\n  // ế = \\^\\'{e}\n  \"\\u1EC1\": \"e\\u0302\\u0300\",\n  // ề = \\^\\`{e}\n  \"\\u1EC5\": \"e\\u0302\\u0303\",\n  // ễ = \\^\\~{e}\n  \"\\u0117\": \"e\\u0307\",\n  // ė = \\.{e}\n  \"\\u1E1F\": \"f\\u0307\",\n  // ḟ = \\.{f}\n  \"\\u01F5\": \"g\\u0301\",\n  // ǵ = \\'{g}\n  \"\\u1E21\": \"g\\u0304\",\n  // ḡ = \\={g}\n  \"\\u011F\": \"g\\u0306\",\n  // ğ = \\u{g}\n  \"\\u01E7\": \"g\\u030C\",\n  // ǧ = \\v{g}\n  \"\\u011D\": \"g\\u0302\",\n  // ĝ = \\^{g}\n  \"\\u0121\": \"g\\u0307\",\n  // ġ = \\.{g}\n  \"\\u1E27\": \"h\\u0308\",\n  // ḧ = \\\"{h}\n  \"\\u021F\": \"h\\u030C\",\n  // ȟ = \\v{h}\n  \"\\u0125\": \"h\\u0302\",\n  // ĥ = \\^{h}\n  \"\\u1E23\": \"h\\u0307\",\n  // ḣ = \\.{h}\n  \"\\xED\": \"i\\u0301\",\n  // í = \\'{i}\n  \"\\xEC\": \"i\\u0300\",\n  // ì = \\`{i}\n  \"\\xEF\": \"i\\u0308\",\n  // ï = \\\"{i}\n  \"\\u1E2F\": \"i\\u0308\\u0301\",\n  // ḯ = \\\"\\'{i}\n  \"\\u0129\": \"i\\u0303\",\n  // ĩ = \\~{i}\n  \"\\u012B\": \"i\\u0304\",\n  // ī = \\={i}\n  \"\\u012D\": \"i\\u0306\",\n  // ĭ = \\u{i}\n  \"\\u01D0\": \"i\\u030C\",\n  // ǐ = \\v{i}\n  \"\\xEE\": \"i\\u0302\",\n  // î = \\^{i}\n  \"\\u01F0\": \"j\\u030C\",\n  // ǰ = \\v{j}\n  \"\\u0135\": \"j\\u0302\",\n  // ĵ = \\^{j}\n  \"\\u1E31\": \"k\\u0301\",\n  // ḱ = \\'{k}\n  \"\\u01E9\": \"k\\u030C\",\n  // ǩ = \\v{k}\n  \"\\u013A\": \"l\\u0301\",\n  // ĺ = \\'{l}\n  \"\\u013E\": \"l\\u030C\",\n  // ľ = \\v{l}\n  \"\\u1E3F\": \"m\\u0301\",\n  // ḿ = \\'{m}\n  \"\\u1E41\": \"m\\u0307\",\n  // ṁ = \\.{m}\n  \"\\u0144\": \"n\\u0301\",\n  // ń = \\'{n}\n  \"\\u01F9\": \"n\\u0300\",\n  // ǹ = \\`{n}\n  \"\\xF1\": \"n\\u0303\",\n  // ñ = \\~{n}\n  \"\\u0148\": \"n\\u030C\",\n  // ň = \\v{n}\n  \"\\u1E45\": \"n\\u0307\",\n  // ṅ = \\.{n}\n  \"\\xF3\": \"o\\u0301\",\n  // ó = \\'{o}\n  \"\\xF2\": \"o\\u0300\",\n  // ò = \\`{o}\n  \"\\xF6\": \"o\\u0308\",\n  // ö = \\\"{o}\n  \"\\u022B\": \"o\\u0308\\u0304\",\n  // ȫ = \\\"\\={o}\n  \"\\xF5\": \"o\\u0303\",\n  // õ = \\~{o}\n  \"\\u1E4D\": \"o\\u0303\\u0301\",\n  // ṍ = \\~\\'{o}\n  \"\\u1E4F\": \"o\\u0303\\u0308\",\n  // ṏ = \\~\\\"{o}\n  \"\\u022D\": \"o\\u0303\\u0304\",\n  // ȭ = \\~\\={o}\n  \"\\u014D\": \"o\\u0304\",\n  // ō = \\={o}\n  \"\\u1E53\": \"o\\u0304\\u0301\",\n  // ṓ = \\=\\'{o}\n  \"\\u1E51\": \"o\\u0304\\u0300\",\n  // ṑ = \\=\\`{o}\n  \"\\u014F\": \"o\\u0306\",\n  // ŏ = \\u{o}\n  \"\\u01D2\": \"o\\u030C\",\n  // ǒ = \\v{o}\n  \"\\xF4\": \"o\\u0302\",\n  // ô = \\^{o}\n  \"\\u1ED1\": \"o\\u0302\\u0301\",\n  // ố = \\^\\'{o}\n  \"\\u1ED3\": \"o\\u0302\\u0300\",\n  // ồ = \\^\\`{o}\n  \"\\u1ED7\": \"o\\u0302\\u0303\",\n  // ỗ = \\^\\~{o}\n  \"\\u022F\": \"o\\u0307\",\n  // ȯ = \\.{o}\n  \"\\u0231\": \"o\\u0307\\u0304\",\n  // ȱ = \\.\\={o}\n  \"\\u0151\": \"o\\u030B\",\n  // ő = \\H{o}\n  \"\\u1E55\": \"p\\u0301\",\n  // ṕ = \\'{p}\n  \"\\u1E57\": \"p\\u0307\",\n  // ṗ = \\.{p}\n  \"\\u0155\": \"r\\u0301\",\n  // ŕ = \\'{r}\n  \"\\u0159\": \"r\\u030C\",\n  // ř = \\v{r}\n  \"\\u1E59\": \"r\\u0307\",\n  // ṙ = \\.{r}\n  \"\\u015B\": \"s\\u0301\",\n  // ś = \\'{s}\n  \"\\u1E65\": \"s\\u0301\\u0307\",\n  // ṥ = \\'\\.{s}\n  \"\\u0161\": \"s\\u030C\",\n  // š = \\v{s}\n  \"\\u1E67\": \"s\\u030C\\u0307\",\n  // ṧ = \\v\\.{s}\n  \"\\u015D\": \"s\\u0302\",\n  // ŝ = \\^{s}\n  \"\\u1E61\": \"s\\u0307\",\n  // ṡ = \\.{s}\n  \"\\u1E97\": \"t\\u0308\",\n  // ẗ = \\\"{t}\n  \"\\u0165\": \"t\\u030C\",\n  // ť = \\v{t}\n  \"\\u1E6B\": \"t\\u0307\",\n  // ṫ = \\.{t}\n  \"\\xFA\": \"u\\u0301\",\n  // ú = \\'{u}\n  \"\\xF9\": \"u\\u0300\",\n  // ù = \\`{u}\n  \"\\xFC\": \"u\\u0308\",\n  // ü = \\\"{u}\n  \"\\u01D8\": \"u\\u0308\\u0301\",\n  // ǘ = \\\"\\'{u}\n  \"\\u01DC\": \"u\\u0308\\u0300\",\n  // ǜ = \\\"\\`{u}\n  \"\\u01D6\": \"u\\u0308\\u0304\",\n  // ǖ = \\\"\\={u}\n  \"\\u01DA\": \"u\\u0308\\u030C\",\n  // ǚ = \\\"\\v{u}\n  \"\\u0169\": \"u\\u0303\",\n  // ũ = \\~{u}\n  \"\\u1E79\": \"u\\u0303\\u0301\",\n  // ṹ = \\~\\'{u}\n  \"\\u016B\": \"u\\u0304\",\n  // ū = \\={u}\n  \"\\u1E7B\": \"u\\u0304\\u0308\",\n  // ṻ = \\=\\\"{u}\n  \"\\u016D\": \"u\\u0306\",\n  // ŭ = \\u{u}\n  \"\\u01D4\": \"u\\u030C\",\n  // ǔ = \\v{u}\n  \"\\xFB\": \"u\\u0302\",\n  // û = \\^{u}\n  \"\\u016F\": \"u\\u030A\",\n  // ů = \\r{u}\n  \"\\u0171\": \"u\\u030B\",\n  // ű = \\H{u}\n  \"\\u1E7D\": \"v\\u0303\",\n  // ṽ = \\~{v}\n  \"\\u1E83\": \"w\\u0301\",\n  // ẃ = \\'{w}\n  \"\\u1E81\": \"w\\u0300\",\n  // ẁ = \\`{w}\n  \"\\u1E85\": \"w\\u0308\",\n  // ẅ = \\\"{w}\n  \"\\u0175\": \"w\\u0302\",\n  // ŵ = \\^{w}\n  \"\\u1E87\": \"w\\u0307\",\n  // ẇ = \\.{w}\n  \"\\u1E98\": \"w\\u030A\",\n  // ẘ = \\r{w}\n  \"\\u1E8D\": \"x\\u0308\",\n  // ẍ = \\\"{x}\n  \"\\u1E8B\": \"x\\u0307\",\n  // ẋ = \\.{x}\n  \"\\xFD\": \"y\\u0301\",\n  // ý = \\'{y}\n  \"\\u1EF3\": \"y\\u0300\",\n  // ỳ = \\`{y}\n  \"\\xFF\": \"y\\u0308\",\n  // ÿ = \\\"{y}\n  \"\\u1EF9\": \"y\\u0303\",\n  // ỹ = \\~{y}\n  \"\\u0233\": \"y\\u0304\",\n  // ȳ = \\={y}\n  \"\\u0177\": \"y\\u0302\",\n  // ŷ = \\^{y}\n  \"\\u1E8F\": \"y\\u0307\",\n  // ẏ = \\.{y}\n  \"\\u1E99\": \"y\\u030A\",\n  // ẙ = \\r{y}\n  \"\\u017A\": \"z\\u0301\",\n  // ź = \\'{z}\n  \"\\u017E\": \"z\\u030C\",\n  // ž = \\v{z}\n  \"\\u1E91\": \"z\\u0302\",\n  // ẑ = \\^{z}\n  \"\\u017C\": \"z\\u0307\",\n  // ż = \\.{z}\n  \"\\xC1\": \"A\\u0301\",\n  // Á = \\'{A}\n  \"\\xC0\": \"A\\u0300\",\n  // À = \\`{A}\n  \"\\xC4\": \"A\\u0308\",\n  // Ä = \\\"{A}\n  \"\\u01DE\": \"A\\u0308\\u0304\",\n  // Ǟ = \\\"\\={A}\n  \"\\xC3\": \"A\\u0303\",\n  // Ã = \\~{A}\n  \"\\u0100\": \"A\\u0304\",\n  // Ā = \\={A}\n  \"\\u0102\": \"A\\u0306\",\n  // Ă = \\u{A}\n  \"\\u1EAE\": \"A\\u0306\\u0301\",\n  // Ắ = \\u\\'{A}\n  \"\\u1EB0\": \"A\\u0306\\u0300\",\n  // Ằ = \\u\\`{A}\n  \"\\u1EB4\": \"A\\u0306\\u0303\",\n  // Ẵ = \\u\\~{A}\n  \"\\u01CD\": \"A\\u030C\",\n  // Ǎ = \\v{A}\n  \"\\xC2\": \"A\\u0302\",\n  // Â = \\^{A}\n  \"\\u1EA4\": \"A\\u0302\\u0301\",\n  // Ấ = \\^\\'{A}\n  \"\\u1EA6\": \"A\\u0302\\u0300\",\n  // Ầ = \\^\\`{A}\n  \"\\u1EAA\": \"A\\u0302\\u0303\",\n  // Ẫ = \\^\\~{A}\n  \"\\u0226\": \"A\\u0307\",\n  // Ȧ = \\.{A}\n  \"\\u01E0\": \"A\\u0307\\u0304\",\n  // Ǡ = \\.\\={A}\n  \"\\xC5\": \"A\\u030A\",\n  // Å = \\r{A}\n  \"\\u01FA\": \"A\\u030A\\u0301\",\n  // Ǻ = \\r\\'{A}\n  \"\\u1E02\": \"B\\u0307\",\n  // Ḃ = \\.{B}\n  \"\\u0106\": \"C\\u0301\",\n  // Ć = \\'{C}\n  \"\\u010C\": \"C\\u030C\",\n  // Č = \\v{C}\n  \"\\u0108\": \"C\\u0302\",\n  // Ĉ = \\^{C}\n  \"\\u010A\": \"C\\u0307\",\n  // Ċ = \\.{C}\n  \"\\u010E\": \"D\\u030C\",\n  // Ď = \\v{D}\n  \"\\u1E0A\": \"D\\u0307\",\n  // Ḋ = \\.{D}\n  \"\\xC9\": \"E\\u0301\",\n  // É = \\'{E}\n  \"\\xC8\": \"E\\u0300\",\n  // È = \\`{E}\n  \"\\xCB\": \"E\\u0308\",\n  // Ë = \\\"{E}\n  \"\\u1EBC\": \"E\\u0303\",\n  // Ẽ = \\~{E}\n  \"\\u0112\": \"E\\u0304\",\n  // Ē = \\={E}\n  \"\\u1E16\": \"E\\u0304\\u0301\",\n  // Ḗ = \\=\\'{E}\n  \"\\u1E14\": \"E\\u0304\\u0300\",\n  // Ḕ = \\=\\`{E}\n  \"\\u0114\": \"E\\u0306\",\n  // Ĕ = \\u{E}\n  \"\\u011A\": \"E\\u030C\",\n  // Ě = \\v{E}\n  \"\\xCA\": \"E\\u0302\",\n  // Ê = \\^{E}\n  \"\\u1EBE\": \"E\\u0302\\u0301\",\n  // Ế = \\^\\'{E}\n  \"\\u1EC0\": \"E\\u0302\\u0300\",\n  // Ề = \\^\\`{E}\n  \"\\u1EC4\": \"E\\u0302\\u0303\",\n  // Ễ = \\^\\~{E}\n  \"\\u0116\": \"E\\u0307\",\n  // Ė = \\.{E}\n  \"\\u1E1E\": \"F\\u0307\",\n  // Ḟ = \\.{F}\n  \"\\u01F4\": \"G\\u0301\",\n  // Ǵ = \\'{G}\n  \"\\u1E20\": \"G\\u0304\",\n  // Ḡ = \\={G}\n  \"\\u011E\": \"G\\u0306\",\n  // Ğ = \\u{G}\n  \"\\u01E6\": \"G\\u030C\",\n  // Ǧ = \\v{G}\n  \"\\u011C\": \"G\\u0302\",\n  // Ĝ = \\^{G}\n  \"\\u0120\": \"G\\u0307\",\n  // Ġ = \\.{G}\n  \"\\u1E26\": \"H\\u0308\",\n  // Ḧ = \\\"{H}\n  \"\\u021E\": \"H\\u030C\",\n  // Ȟ = \\v{H}\n  \"\\u0124\": \"H\\u0302\",\n  // Ĥ = \\^{H}\n  \"\\u1E22\": \"H\\u0307\",\n  // Ḣ = \\.{H}\n  \"\\xCD\": \"I\\u0301\",\n  // Í = \\'{I}\n  \"\\xCC\": \"I\\u0300\",\n  // Ì = \\`{I}\n  \"\\xCF\": \"I\\u0308\",\n  // Ï = \\\"{I}\n  \"\\u1E2E\": \"I\\u0308\\u0301\",\n  // Ḯ = \\\"\\'{I}\n  \"\\u0128\": \"I\\u0303\",\n  // Ĩ = \\~{I}\n  \"\\u012A\": \"I\\u0304\",\n  // Ī = \\={I}\n  \"\\u012C\": \"I\\u0306\",\n  // Ĭ = \\u{I}\n  \"\\u01CF\": \"I\\u030C\",\n  // Ǐ = \\v{I}\n  \"\\xCE\": \"I\\u0302\",\n  // Î = \\^{I}\n  \"\\u0130\": \"I\\u0307\",\n  // İ = \\.{I}\n  \"\\u0134\": \"J\\u0302\",\n  // Ĵ = \\^{J}\n  \"\\u1E30\": \"K\\u0301\",\n  // Ḱ = \\'{K}\n  \"\\u01E8\": \"K\\u030C\",\n  // Ǩ = \\v{K}\n  \"\\u0139\": \"L\\u0301\",\n  // Ĺ = \\'{L}\n  \"\\u013D\": \"L\\u030C\",\n  // Ľ = \\v{L}\n  \"\\u1E3E\": \"M\\u0301\",\n  // Ḿ = \\'{M}\n  \"\\u1E40\": \"M\\u0307\",\n  // Ṁ = \\.{M}\n  \"\\u0143\": \"N\\u0301\",\n  // Ń = \\'{N}\n  \"\\u01F8\": \"N\\u0300\",\n  // Ǹ = \\`{N}\n  \"\\xD1\": \"N\\u0303\",\n  // Ñ = \\~{N}\n  \"\\u0147\": \"N\\u030C\",\n  // Ň = \\v{N}\n  \"\\u1E44\": \"N\\u0307\",\n  // Ṅ = \\.{N}\n  \"\\xD3\": \"O\\u0301\",\n  // Ó = \\'{O}\n  \"\\xD2\": \"O\\u0300\",\n  // Ò = \\`{O}\n  \"\\xD6\": \"O\\u0308\",\n  // Ö = \\\"{O}\n  \"\\u022A\": \"O\\u0308\\u0304\",\n  // Ȫ = \\\"\\={O}\n  \"\\xD5\": \"O\\u0303\",\n  // Õ = \\~{O}\n  \"\\u1E4C\": \"O\\u0303\\u0301\",\n  // Ṍ = \\~\\'{O}\n  \"\\u1E4E\": \"O\\u0303\\u0308\",\n  // Ṏ = \\~\\\"{O}\n  \"\\u022C\": \"O\\u0303\\u0304\",\n  // Ȭ = \\~\\={O}\n  \"\\u014C\": \"O\\u0304\",\n  // Ō = \\={O}\n  \"\\u1E52\": \"O\\u0304\\u0301\",\n  // Ṓ = \\=\\'{O}\n  \"\\u1E50\": \"O\\u0304\\u0300\",\n  // Ṑ = \\=\\`{O}\n  \"\\u014E\": \"O\\u0306\",\n  // Ŏ = \\u{O}\n  \"\\u01D1\": \"O\\u030C\",\n  // Ǒ = \\v{O}\n  \"\\xD4\": \"O\\u0302\",\n  // Ô = \\^{O}\n  \"\\u1ED0\": \"O\\u0302\\u0301\",\n  // Ố = \\^\\'{O}\n  \"\\u1ED2\": \"O\\u0302\\u0300\",\n  // Ồ = \\^\\`{O}\n  \"\\u1ED6\": \"O\\u0302\\u0303\",\n  // Ỗ = \\^\\~{O}\n  \"\\u022E\": \"O\\u0307\",\n  // Ȯ = \\.{O}\n  \"\\u0230\": \"O\\u0307\\u0304\",\n  // Ȱ = \\.\\={O}\n  \"\\u0150\": \"O\\u030B\",\n  // Ő = \\H{O}\n  \"\\u1E54\": \"P\\u0301\",\n  // Ṕ = \\'{P}\n  \"\\u1E56\": \"P\\u0307\",\n  // Ṗ = \\.{P}\n  \"\\u0154\": \"R\\u0301\",\n  // Ŕ = \\'{R}\n  \"\\u0158\": \"R\\u030C\",\n  // Ř = \\v{R}\n  \"\\u1E58\": \"R\\u0307\",\n  // Ṙ = \\.{R}\n  \"\\u015A\": \"S\\u0301\",\n  // Ś = \\'{S}\n  \"\\u1E64\": \"S\\u0301\\u0307\",\n  // Ṥ = \\'\\.{S}\n  \"\\u0160\": \"S\\u030C\",\n  // Š = \\v{S}\n  \"\\u1E66\": \"S\\u030C\\u0307\",\n  // Ṧ = \\v\\.{S}\n  \"\\u015C\": \"S\\u0302\",\n  // Ŝ = \\^{S}\n  \"\\u1E60\": \"S\\u0307\",\n  // Ṡ = \\.{S}\n  \"\\u0164\": \"T\\u030C\",\n  // Ť = \\v{T}\n  \"\\u1E6A\": \"T\\u0307\",\n  // Ṫ = \\.{T}\n  \"\\xDA\": \"U\\u0301\",\n  // Ú = \\'{U}\n  \"\\xD9\": \"U\\u0300\",\n  // Ù = \\`{U}\n  \"\\xDC\": \"U\\u0308\",\n  // Ü = \\\"{U}\n  \"\\u01D7\": \"U\\u0308\\u0301\",\n  // Ǘ = \\\"\\'{U}\n  \"\\u01DB\": \"U\\u0308\\u0300\",\n  // Ǜ = \\\"\\`{U}\n  \"\\u01D5\": \"U\\u0308\\u0304\",\n  // Ǖ = \\\"\\={U}\n  \"\\u01D9\": \"U\\u0308\\u030C\",\n  // Ǚ = \\\"\\v{U}\n  \"\\u0168\": \"U\\u0303\",\n  // Ũ = \\~{U}\n  \"\\u1E78\": \"U\\u0303\\u0301\",\n  // Ṹ = \\~\\'{U}\n  \"\\u016A\": \"U\\u0304\",\n  // Ū = \\={U}\n  \"\\u1E7A\": \"U\\u0304\\u0308\",\n  // Ṻ = \\=\\\"{U}\n  \"\\u016C\": \"U\\u0306\",\n  // Ŭ = \\u{U}\n  \"\\u01D3\": \"U\\u030C\",\n  // Ǔ = \\v{U}\n  \"\\xDB\": \"U\\u0302\",\n  // Û = \\^{U}\n  \"\\u016E\": \"U\\u030A\",\n  // Ů = \\r{U}\n  \"\\u0170\": \"U\\u030B\",\n  // Ű = \\H{U}\n  \"\\u1E7C\": \"V\\u0303\",\n  // Ṽ = \\~{V}\n  \"\\u1E82\": \"W\\u0301\",\n  // Ẃ = \\'{W}\n  \"\\u1E80\": \"W\\u0300\",\n  // Ẁ = \\`{W}\n  \"\\u1E84\": \"W\\u0308\",\n  // Ẅ = \\\"{W}\n  \"\\u0174\": \"W\\u0302\",\n  // Ŵ = \\^{W}\n  \"\\u1E86\": \"W\\u0307\",\n  // Ẇ = \\.{W}\n  \"\\u1E8C\": \"X\\u0308\",\n  // Ẍ = \\\"{X}\n  \"\\u1E8A\": \"X\\u0307\",\n  // Ẋ = \\.{X}\n  \"\\xDD\": \"Y\\u0301\",\n  // Ý = \\'{Y}\n  \"\\u1EF2\": \"Y\\u0300\",\n  // Ỳ = \\`{Y}\n  \"\\u0178\": \"Y\\u0308\",\n  // Ÿ = \\\"{Y}\n  \"\\u1EF8\": \"Y\\u0303\",\n  // Ỹ = \\~{Y}\n  \"\\u0232\": \"Y\\u0304\",\n  // Ȳ = \\={Y}\n  \"\\u0176\": \"Y\\u0302\",\n  // Ŷ = \\^{Y}\n  \"\\u1E8E\": \"Y\\u0307\",\n  // Ẏ = \\.{Y}\n  \"\\u0179\": \"Z\\u0301\",\n  // Ź = \\'{Z}\n  \"\\u017D\": \"Z\\u030C\",\n  // Ž = \\v{Z}\n  \"\\u1E90\": \"Z\\u0302\",\n  // Ẑ = \\^{Z}\n  \"\\u017B\": \"Z\\u0307\",\n  // Ż = \\.{Z}\n  \"\\u03AC\": \"\\u03B1\\u0301\",\n  // ά = \\'{α}\n  \"\\u1F70\": \"\\u03B1\\u0300\",\n  // ὰ = \\`{α}\n  \"\\u1FB1\": \"\\u03B1\\u0304\",\n  // ᾱ = \\={α}\n  \"\\u1FB0\": \"\\u03B1\\u0306\",\n  // ᾰ = \\u{α}\n  \"\\u03AD\": \"\\u03B5\\u0301\",\n  // έ = \\'{ε}\n  \"\\u1F72\": \"\\u03B5\\u0300\",\n  // ὲ = \\`{ε}\n  \"\\u03AE\": \"\\u03B7\\u0301\",\n  // ή = \\'{η}\n  \"\\u1F74\": \"\\u03B7\\u0300\",\n  // ὴ = \\`{η}\n  \"\\u03AF\": \"\\u03B9\\u0301\",\n  // ί = \\'{ι}\n  \"\\u1F76\": \"\\u03B9\\u0300\",\n  // ὶ = \\`{ι}\n  \"\\u03CA\": \"\\u03B9\\u0308\",\n  // ϊ = \\\"{ι}\n  \"\\u0390\": \"\\u03B9\\u0308\\u0301\",\n  // ΐ = \\\"\\'{ι}\n  \"\\u1FD2\": \"\\u03B9\\u0308\\u0300\",\n  // ῒ = \\\"\\`{ι}\n  \"\\u1FD1\": \"\\u03B9\\u0304\",\n  // ῑ = \\={ι}\n  \"\\u1FD0\": \"\\u03B9\\u0306\",\n  // ῐ = \\u{ι}\n  \"\\u03CC\": \"\\u03BF\\u0301\",\n  // ό = \\'{ο}\n  \"\\u1F78\": \"\\u03BF\\u0300\",\n  // ὸ = \\`{ο}\n  \"\\u03CD\": \"\\u03C5\\u0301\",\n  // ύ = \\'{υ}\n  \"\\u1F7A\": \"\\u03C5\\u0300\",\n  // ὺ = \\`{υ}\n  \"\\u03CB\": \"\\u03C5\\u0308\",\n  // ϋ = \\\"{υ}\n  \"\\u03B0\": \"\\u03C5\\u0308\\u0301\",\n  // ΰ = \\\"\\'{υ}\n  \"\\u1FE2\": \"\\u03C5\\u0308\\u0300\",\n  // ῢ = \\\"\\`{υ}\n  \"\\u1FE1\": \"\\u03C5\\u0304\",\n  // ῡ = \\={υ}\n  \"\\u1FE0\": \"\\u03C5\\u0306\",\n  // ῠ = \\u{υ}\n  \"\\u03CE\": \"\\u03C9\\u0301\",\n  // ώ = \\'{ω}\n  \"\\u1F7C\": \"\\u03C9\\u0300\",\n  // ὼ = \\`{ω}\n  \"\\u038E\": \"\\u03A5\\u0301\",\n  // Ύ = \\'{Υ}\n  \"\\u1FEA\": \"\\u03A5\\u0300\",\n  // Ὺ = \\`{Υ}\n  \"\\u03AB\": \"\\u03A5\\u0308\",\n  // Ϋ = \\\"{Υ}\n  \"\\u1FE9\": \"\\u03A5\\u0304\",\n  // Ῡ = \\={Υ}\n  \"\\u1FE8\": \"\\u03A5\\u0306\",\n  // Ῠ = \\u{Υ}\n  \"\\u038F\": \"\\u03A9\\u0301\",\n  // Ώ = \\'{Ω}\n  \"\\u1FFA\": \"\\u03A9\\u0300\" // Ὼ = \\`{Ω}\n\n});\n// CONCATENATED MODULE: ./src/Parser.js\n/* eslint no-constant-condition:0 */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * This file contains the parser used to parse out a TeX expression from the\n * input. Since TeX isn't context-free, standard parsers don't work particularly\n * well.\n *\n * The strategy of this parser is as such:\n *\n * The main functions (the `.parse...` ones) take a position in the current\n * parse string to parse tokens from. The lexer (found in Lexer.js, stored at\n * this.gullet.lexer) also supports pulling out tokens at arbitrary places. When\n * individual tokens are needed at a position, the lexer is called to pull out a\n * token, which is then used.\n *\n * The parser has a property called \"mode\" indicating the mode that\n * the parser is currently in. Currently it has to be one of \"math\" or\n * \"text\", which denotes whether the current environment is a math-y\n * one or a text-y one (e.g. inside \\text). Currently, this serves to\n * limit the functions which can be used in text mode.\n *\n * The main functions then return an object which contains the useful data that\n * was parsed at its given point, and a new position at the end of the parsed\n * data. The main functions can call each other and continue the parsing by\n * using the returned position as a new starting point.\n *\n * There are also extra `.handle...` functions, which pull out some reused\n * functionality into self-contained functions.\n *\n * The functions return ParseNodes.\n */\nvar Parser_Parser =\n/*#__PURE__*/\nfunction () {\n  function Parser(input, settings) {\n    this.mode = void 0;\n    this.gullet = void 0;\n    this.settings = void 0;\n    this.leftrightDepth = void 0;\n    this.nextToken = void 0;\n    // Start in math mode\n    this.mode = \"math\"; // Create a new macro expander (gullet) and (indirectly via that) also a\n    // new lexer (mouth) for this parser (stomach, in the language of TeX)\n\n    this.gullet = new MacroExpander_MacroExpander(input, settings, this.mode); // Store the settings for use in parsing\n\n    this.settings = settings; // Count leftright depth (for \\middle errors)\n\n    this.leftrightDepth = 0;\n  }\n  /**\n   * Checks a result to make sure it has the right type, and throws an\n   * appropriate error otherwise.\n   */\n\n\n  var _proto = Parser.prototype;\n\n  _proto.expect = function expect(text, consume) {\n    if (consume === void 0) {\n      consume = true;\n    }\n\n    if (this.nextToken.text !== text) {\n      throw new src_ParseError(\"Expected '\" + text + \"', got '\" + this.nextToken.text + \"'\", this.nextToken);\n    }\n\n    if (consume) {\n      this.consume();\n    }\n  }\n  /**\n   * Considers the current look ahead token as consumed,\n   * and fetches the one after that as the new look ahead.\n   */\n  ;\n\n  _proto.consume = function consume() {\n    this.nextToken = this.gullet.expandNextToken();\n  }\n  /**\n   * Switches between \"text\" and \"math\" modes.\n   */\n  ;\n\n  _proto.switchMode = function switchMode(newMode) {\n    this.mode = newMode;\n    this.gullet.switchMode(newMode);\n  }\n  /**\n   * Main parsing function, which parses an entire input.\n   */\n  ;\n\n  _proto.parse = function parse() {\n    // Create a group namespace for the math expression.\n    // (LaTeX creates a new group for every $...$, $$...$$, \\[...\\].)\n    this.gullet.beginGroup(); // Use old \\color behavior (same as LaTeX's \\textcolor) if requested.\n    // We do this within the group for the math expression, so it doesn't\n    // pollute settings.macros.\n\n    if (this.settings.colorIsTextColor) {\n      this.gullet.macros.set(\"\\\\color\", \"\\\\textcolor\");\n    } // Try to parse the input\n\n\n    this.consume();\n    var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end\n\n    this.expect(\"EOF\", false); // End the group namespace for the expression\n\n    this.gullet.endGroup();\n    return parse;\n  };\n\n  _proto.parseExpression = function parseExpression(breakOnInfix, breakOnTokenText) {\n    var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either\n    // we reached the end, a }, or a \\right)\n\n    while (true) {\n      // Ignore spaces in math mode\n      if (this.mode === \"math\") {\n        this.consumeSpaces();\n      }\n\n      var lex = this.nextToken;\n\n      if (Parser.endOfExpression.indexOf(lex.text) !== -1) {\n        break;\n      }\n\n      if (breakOnTokenText && lex.text === breakOnTokenText) {\n        break;\n      }\n\n      if (breakOnInfix && src_functions[lex.text] && src_functions[lex.text].infix) {\n        break;\n      }\n\n      var atom = this.parseAtom(breakOnTokenText);\n\n      if (!atom) {\n        break;\n      }\n\n      body.push(atom);\n    }\n\n    if (this.mode === \"text\") {\n      this.formLigatures(body);\n    }\n\n    return this.handleInfixNodes(body);\n  }\n  /**\n   * Rewrites infix operators such as \\over with corresponding commands such\n   * as \\frac.\n   *\n   * There can only be one infix operator per group.  If there's more than one\n   * then the expression is ambiguous.  This can be resolved by adding {}.\n   */\n  ;\n\n  _proto.handleInfixNodes = function handleInfixNodes(body) {\n    var overIndex = -1;\n    var funcName;\n\n    for (var i = 0; i < body.length; i++) {\n      var node = checkNodeType(body[i], \"infix\");\n\n      if (node) {\n        if (overIndex !== -1) {\n          throw new src_ParseError(\"only one infix operator per group\", node.token);\n        }\n\n        overIndex = i;\n        funcName = node.replaceWith;\n      }\n    }\n\n    if (overIndex !== -1 && funcName) {\n      var numerNode;\n      var denomNode;\n      var numerBody = body.slice(0, overIndex);\n      var denomBody = body.slice(overIndex + 1);\n\n      if (numerBody.length === 1 && numerBody[0].type === \"ordgroup\") {\n        numerNode = numerBody[0];\n      } else {\n        numerNode = {\n          type: \"ordgroup\",\n          mode: this.mode,\n          body: numerBody\n        };\n      }\n\n      if (denomBody.length === 1 && denomBody[0].type === \"ordgroup\") {\n        denomNode = denomBody[0];\n      } else {\n        denomNode = {\n          type: \"ordgroup\",\n          mode: this.mode,\n          body: denomBody\n        };\n      }\n\n      var _node;\n\n      if (funcName === \"\\\\\\\\abovefrac\") {\n        _node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);\n      } else {\n        _node = this.callFunction(funcName, [numerNode, denomNode], []);\n      }\n\n      return [_node];\n    } else {\n      return body;\n    }\n  } // The greediness of a superscript or subscript\n  ;\n\n  /**\n   * Handle a subscript or superscript with nice errors.\n   */\n  _proto.handleSupSubscript = function handleSupSubscript(name) {\n    var symbolToken = this.nextToken;\n    var symbol = symbolToken.text;\n    this.consume();\n    this.consumeSpaces(); // ignore spaces before sup/subscript argument\n\n    var group = this.parseGroup(name, false, Parser.SUPSUB_GREEDINESS);\n\n    if (!group) {\n      throw new src_ParseError(\"Expected group after '\" + symbol + \"'\", symbolToken);\n    }\n\n    return group;\n  }\n  /**\n   * Converts the textual input of an unsupported command into a text node\n   * contained within a color node whose color is determined by errorColor\n   */\n  ;\n\n  _proto.handleUnsupportedCmd = function handleUnsupportedCmd() {\n    var text = this.nextToken.text;\n    var textordArray = [];\n\n    for (var i = 0; i < text.length; i++) {\n      textordArray.push({\n        type: \"textord\",\n        mode: \"text\",\n        text: text[i]\n      });\n    }\n\n    var textNode = {\n      type: \"text\",\n      mode: this.mode,\n      body: textordArray\n    };\n    var colorNode = {\n      type: \"color\",\n      mode: this.mode,\n      color: this.settings.errorColor,\n      body: [textNode]\n    };\n    this.consume();\n    return colorNode;\n  }\n  /**\n   * Parses a group with optional super/subscripts.\n   */\n  ;\n\n  _proto.parseAtom = function parseAtom(breakOnTokenText) {\n    // The body of an atom is an implicit group, so that things like\n    // \\left(x\\right)^2 work correctly.\n    var base = this.parseGroup(\"atom\", false, null, breakOnTokenText); // In text mode, we don't have superscripts or subscripts\n\n    if (this.mode === \"text\") {\n      return base;\n    } // Note that base may be empty (i.e. null) at this point.\n\n\n    var superscript;\n    var subscript;\n\n    while (true) {\n      // Guaranteed in math mode, so eat any spaces first.\n      this.consumeSpaces(); // Lex the first token\n\n      var lex = this.nextToken;\n\n      if (lex.text === \"\\\\limits\" || lex.text === \"\\\\nolimits\") {\n        // We got a limit control\n        var opNode = checkNodeType(base, \"op\");\n\n        if (opNode) {\n          var limits = lex.text === \"\\\\limits\";\n          opNode.limits = limits;\n          opNode.alwaysHandleSupSub = true;\n        } else {\n          throw new src_ParseError(\"Limit controls must follow a math operator\", lex);\n        }\n\n        this.consume();\n      } else if (lex.text === \"^\") {\n        // We got a superscript start\n        if (superscript) {\n          throw new src_ParseError(\"Double superscript\", lex);\n        }\n\n        superscript = this.handleSupSubscript(\"superscript\");\n      } else if (lex.text === \"_\") {\n        // We got a subscript start\n        if (subscript) {\n          throw new src_ParseError(\"Double subscript\", lex);\n        }\n\n        subscript = this.handleSupSubscript(\"subscript\");\n      } else if (lex.text === \"'\") {\n        // We got a prime\n        if (superscript) {\n          throw new src_ParseError(\"Double superscript\", lex);\n        }\n\n        var prime = {\n          type: \"textord\",\n          mode: this.mode,\n          text: \"\\\\prime\"\n        }; // Many primes can be grouped together, so we handle this here\n\n        var primes = [prime];\n        this.consume(); // Keep lexing tokens until we get something that's not a prime\n\n        while (this.nextToken.text === \"'\") {\n          // For each one, add another prime to the list\n          primes.push(prime);\n          this.consume();\n        } // If there's a superscript following the primes, combine that\n        // superscript in with the primes.\n\n\n        if (this.nextToken.text === \"^\") {\n          primes.push(this.handleSupSubscript(\"superscript\"));\n        } // Put everything into an ordgroup as the superscript\n\n\n        superscript = {\n          type: \"ordgroup\",\n          mode: this.mode,\n          body: primes\n        };\n      } else {\n        // If it wasn't ^, _, or ', stop parsing super/subscripts\n        break;\n      }\n    } // Base must be set if superscript or subscript are set per logic above,\n    // but need to check here for type check to pass.\n\n\n    if (superscript || subscript) {\n      // If we got either a superscript or subscript, create a supsub\n      return {\n        type: \"supsub\",\n        mode: this.mode,\n        base: base,\n        sup: superscript,\n        sub: subscript\n      };\n    } else {\n      // Otherwise return the original body\n      return base;\n    }\n  }\n  /**\n   * Parses an entire function, including its base and all of its arguments.\n   */\n  ;\n\n  _proto.parseFunction = function parseFunction(breakOnTokenText, name, // For error reporting.\n  greediness) {\n    var token = this.nextToken;\n    var func = token.text;\n    var funcData = src_functions[func];\n\n    if (!funcData) {\n      return null;\n    }\n\n    if (greediness != null && funcData.greediness <= greediness) {\n      throw new src_ParseError(\"Got function '\" + func + \"' with no arguments\" + (name ? \" as \" + name : \"\"), token);\n    } else if (this.mode === \"text\" && !funcData.allowedInText) {\n      throw new src_ParseError(\"Can't use function '\" + func + \"' in text mode\", token);\n    } else if (this.mode === \"math\" && funcData.allowedInMath === false) {\n      throw new src_ParseError(\"Can't use function '\" + func + \"' in math mode\", token);\n    } // hyperref package sets the catcode of % as an active character\n\n\n    if (funcData.argTypes && funcData.argTypes[0] === \"url\") {\n      this.gullet.lexer.setCatcode(\"%\", 13);\n    } // Consume the command token after possibly switching to the\n    // mode specified by the function (for instant mode switching),\n    // and then immediately switch back.\n\n\n    if (funcData.consumeMode) {\n      var oldMode = this.mode;\n      this.switchMode(funcData.consumeMode);\n      this.consume();\n      this.switchMode(oldMode);\n    } else {\n      this.consume();\n    }\n\n    var _this$parseArguments = this.parseArguments(func, funcData),\n        args = _this$parseArguments.args,\n        optArgs = _this$parseArguments.optArgs;\n\n    return this.callFunction(func, args, optArgs, token, breakOnTokenText);\n  }\n  /**\n   * Call a function handler with a suitable context and arguments.\n   */\n  ;\n\n  _proto.callFunction = function callFunction(name, args, optArgs, token, breakOnTokenText) {\n    var context = {\n      funcName: name,\n      parser: this,\n      token: token,\n      breakOnTokenText: breakOnTokenText\n    };\n    var func = src_functions[name];\n\n    if (func && func.handler) {\n      return func.handler(context, args, optArgs);\n    } else {\n      throw new src_ParseError(\"No function handler for \" + name);\n    }\n  }\n  /**\n   * Parses the arguments of a function or environment\n   */\n  ;\n\n  _proto.parseArguments = function parseArguments(func, // Should look like \"\\name\" or \"\\begin{name}\".\n  funcData) {\n    var totalArgs = funcData.numArgs + funcData.numOptionalArgs;\n\n    if (totalArgs === 0) {\n      return {\n        args: [],\n        optArgs: []\n      };\n    }\n\n    var baseGreediness = funcData.greediness;\n    var args = [];\n    var optArgs = [];\n\n    for (var i = 0; i < totalArgs; i++) {\n      var argType = funcData.argTypes && funcData.argTypes[i];\n      var isOptional = i < funcData.numOptionalArgs; // Ignore spaces between arguments.  As the TeXbook says:\n      // \"After you have said ‘\\def\\row#1#2{...}’, you are allowed to\n      //  put spaces between the arguments (e.g., ‘\\row x n’), because\n      //  TeX doesn’t use single spaces as undelimited arguments.\"\n\n      if (i > 0 && !isOptional) {\n        this.consumeSpaces();\n      } // Also consume leading spaces in math mode, as parseSymbol\n      // won't know what to do with them.  This can only happen with\n      // macros, e.g. \\frac\\foo\\foo where \\foo expands to a space symbol.\n      // In LaTeX, the \\foo's get treated as (blank) arguments).\n      // In KaTeX, for now, both spaces will get consumed.\n      // TODO(edemaine)\n\n\n      if (i === 0 && !isOptional && this.mode === \"math\") {\n        this.consumeSpaces();\n      }\n\n      var nextToken = this.nextToken;\n      var arg = this.parseGroupOfType(\"argument to '\" + func + \"'\", argType, isOptional, baseGreediness);\n\n      if (!arg) {\n        if (isOptional) {\n          optArgs.push(null);\n          continue;\n        }\n\n        throw new src_ParseError(\"Expected group after '\" + func + \"'\", nextToken);\n      }\n\n      (isOptional ? optArgs : args).push(arg);\n    }\n\n    return {\n      args: args,\n      optArgs: optArgs\n    };\n  }\n  /**\n   * Parses a group when the mode is changing.\n   */\n  ;\n\n  _proto.parseGroupOfType = function parseGroupOfType(name, type, optional, greediness) {\n    switch (type) {\n      case \"color\":\n        return this.parseColorGroup(optional);\n\n      case \"size\":\n        return this.parseSizeGroup(optional);\n\n      case \"url\":\n        return this.parseUrlGroup(optional);\n\n      case \"math\":\n      case \"text\":\n        return this.parseGroup(name, optional, greediness, undefined, type);\n\n      case \"raw\":\n        {\n          if (optional && this.nextToken.text === \"{\") {\n            return null;\n          }\n\n          var token = this.parseStringGroup(\"raw\", optional, true);\n\n          if (token) {\n            return {\n              type: \"raw\",\n              mode: \"text\",\n              string: token.text\n            };\n          } else {\n            throw new src_ParseError(\"Expected raw group\", this.nextToken);\n          }\n        }\n\n      case \"original\":\n      case null:\n      case undefined:\n        return this.parseGroup(name, optional, greediness);\n\n      default:\n        throw new src_ParseError(\"Unknown group type as \" + name, this.nextToken);\n    }\n  };\n\n  _proto.consumeSpaces = function consumeSpaces() {\n    while (this.nextToken.text === \" \") {\n      this.consume();\n    }\n  }\n  /**\n   * Parses a group, essentially returning the string formed by the\n   * brace-enclosed tokens plus some position information.\n   */\n  ;\n\n  _proto.parseStringGroup = function parseStringGroup(modeName, // Used to describe the mode in error messages.\n  optional, raw) {\n    var groupBegin = optional ? \"[\" : \"{\";\n    var groupEnd = optional ? \"]\" : \"}\";\n    var nextToken = this.nextToken;\n\n    if (nextToken.text !== groupBegin) {\n      if (optional) {\n        return null;\n      } else if (raw && nextToken.text !== \"EOF\" && /[^{}[\\]]/.test(nextToken.text)) {\n        // allow a single character in raw string group\n        this.gullet.lexer.setCatcode(\"%\", 14); // reset the catcode of %\n\n        this.consume();\n        return nextToken;\n      }\n    }\n\n    var outerMode = this.mode;\n    this.mode = \"text\";\n    this.expect(groupBegin);\n    var str = \"\";\n    var firstToken = this.nextToken;\n    var nested = 0; // allow nested braces in raw string group\n\n    var lastToken = firstToken;\n\n    while (raw && nested > 0 || this.nextToken.text !== groupEnd) {\n      switch (this.nextToken.text) {\n        case \"EOF\":\n          throw new src_ParseError(\"Unexpected end of input in \" + modeName, firstToken.range(lastToken, str));\n\n        case groupBegin:\n          nested++;\n          break;\n\n        case groupEnd:\n          nested--;\n          break;\n      }\n\n      lastToken = this.nextToken;\n      str += lastToken.text;\n      this.consume();\n    }\n\n    this.mode = outerMode;\n    this.gullet.lexer.setCatcode(\"%\", 14); // reset the catcode of %\n\n    this.expect(groupEnd);\n    return firstToken.range(lastToken, str);\n  }\n  /**\n   * Parses a regex-delimited group: the largest sequence of tokens\n   * whose concatenated strings match `regex`. Returns the string\n   * formed by the tokens plus some position information.\n   */\n  ;\n\n  _proto.parseRegexGroup = function parseRegexGroup(regex, modeName) {\n    var outerMode = this.mode;\n    this.mode = \"text\";\n    var firstToken = this.nextToken;\n    var lastToken = firstToken;\n    var str = \"\";\n\n    while (this.nextToken.text !== \"EOF\" && regex.test(str + this.nextToken.text)) {\n      lastToken = this.nextToken;\n      str += lastToken.text;\n      this.consume();\n    }\n\n    if (str === \"\") {\n      throw new src_ParseError(\"Invalid \" + modeName + \": '\" + firstToken.text + \"'\", firstToken);\n    }\n\n    this.mode = outerMode;\n    return firstToken.range(lastToken, str);\n  }\n  /**\n   * Parses a color description.\n   */\n  ;\n\n  _proto.parseColorGroup = function parseColorGroup(optional) {\n    var res = this.parseStringGroup(\"color\", optional);\n\n    if (!res) {\n      return null;\n    }\n\n    var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);\n\n    if (!match) {\n      throw new src_ParseError(\"Invalid color: '\" + res.text + \"'\", res);\n    }\n\n    var color = match[0];\n\n    if (/^[0-9a-f]{6}$/i.test(color)) {\n      // We allow a 6-digit HTML color spec without a leading \"#\".\n      // This follows the xcolor package's HTML color model.\n      // Predefined color names are all missed by this RegEx pattern.\n      color = \"#\" + color;\n    }\n\n    return {\n      type: \"color-token\",\n      mode: this.mode,\n      color: color\n    };\n  }\n  /**\n   * Parses a size specification, consisting of magnitude and unit.\n   */\n  ;\n\n  _proto.parseSizeGroup = function parseSizeGroup(optional) {\n    var res;\n    var isBlank = false;\n\n    if (!optional && this.nextToken.text !== \"{\") {\n      res = this.parseRegexGroup(/^[-+]? *(?:$|\\d+|\\d+\\.\\d*|\\.\\d*) *[a-z]{0,2} *$/, \"size\");\n    } else {\n      res = this.parseStringGroup(\"size\", optional);\n    }\n\n    if (!res) {\n      return null;\n    }\n\n    if (!optional && res.text.length === 0) {\n      // Because we've tested for what is !optional, this block won't\n      // affect \\kern, \\hspace, etc. It will capture the mandatory arguments\n      // to \\genfrac and \\above.\n      res.text = \"0pt\"; // Enable \\above{}\n\n      isBlank = true; // This is here specifically for \\genfrac\n    }\n\n    var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(res.text);\n\n    if (!match) {\n      throw new src_ParseError(\"Invalid size: '\" + res.text + \"'\", res);\n    }\n\n    var data = {\n      number: +(match[1] + match[2]),\n      // sign + magnitude, cast to number\n      unit: match[3]\n    };\n\n    if (!validUnit(data)) {\n      throw new src_ParseError(\"Invalid unit: '\" + data.unit + \"'\", res);\n    }\n\n    return {\n      type: \"size\",\n      mode: this.mode,\n      value: data,\n      isBlank: isBlank\n    };\n  }\n  /**\n   * Parses an URL, checking escaped letters and allowed protocols.\n   */\n  ;\n\n  _proto.parseUrlGroup = function parseUrlGroup(optional) {\n    var res = this.parseStringGroup(\"url\", optional, true); // get raw string\n\n    if (!res) {\n      return null;\n    } // hyperref package allows backslashes alone in href, but doesn't\n    // generate valid links in such cases; we interpret this as\n    // \"undefined\" behaviour, and keep them as-is. Some browser will\n    // replace backslashes with forward slashes.\n\n\n    var url = res.text.replace(/\\\\([#$%&~_^{}])/g, '$1');\n    var protocol = /^\\s*([^\\\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(url);\n    protocol = protocol != null ? protocol[1] : \"_relative\";\n    var allowed = this.settings.allowedProtocols;\n\n    if (!utils.contains(allowed, \"*\") && !utils.contains(allowed, protocol)) {\n      throw new src_ParseError(\"Forbidden protocol '\" + protocol + \"'\", res);\n    }\n\n    return {\n      type: \"url\",\n      mode: this.mode,\n      url: url\n    };\n  }\n  /**\n   * If `optional` is false or absent, this parses an ordinary group,\n   * which is either a single nucleus (like \"x\") or an expression\n   * in braces (like \"{x+y}\") or an implicit group, a group that starts\n   * at the current position, and ends right before a higher explicit\n   * group ends, or at EOF.\n   * If `optional` is true, it parses either a bracket-delimited expression\n   * (like \"[x+y]\") or returns null to indicate the absence of a\n   * bracket-enclosed group.\n   * If `mode` is present, switches to that mode while parsing the group,\n   * and switches back after.\n   */\n  ;\n\n  _proto.parseGroup = function parseGroup(name, // For error reporting.\n  optional, greediness, breakOnTokenText, mode) {\n    var outerMode = this.mode;\n    var firstToken = this.nextToken;\n    var text = firstToken.text; // Switch to specified mode\n\n    if (mode) {\n      this.switchMode(mode);\n    }\n\n    var groupEnd;\n    var result; // Try to parse an open brace or \\begingroup\n\n    if (optional ? text === \"[\" : text === \"{\" || text === \"\\\\begingroup\") {\n      groupEnd = Parser.endOfGroup[text]; // Start a new group namespace\n\n      this.gullet.beginGroup(); // If we get a brace, parse an expression\n\n      this.consume();\n      var expression = this.parseExpression(false, groupEnd);\n      var lastToken = this.nextToken; // End group namespace before consuming symbol after close brace\n\n      this.gullet.endGroup();\n      result = {\n        type: \"ordgroup\",\n        mode: this.mode,\n        loc: SourceLocation.range(firstToken, lastToken),\n        body: expression,\n        // A group formed by \\begingroup...\\endgroup is a semi-simple group\n        // which doesn't affect spacing in math mode, i.e., is transparent.\n        // https://tex.stackexchange.com/questions/1930/when-should-one-\n        // use-begingroup-instead-of-bgroup\n        semisimple: text === \"\\\\begingroup\" || undefined\n      };\n    } else if (optional) {\n      // Return nothing for an optional group\n      result = null;\n    } else {\n      // If there exists a function with this name, parse the function.\n      // Otherwise, just return a nucleus\n      result = this.parseFunction(breakOnTokenText, name, greediness) || this.parseSymbol();\n\n      if (result == null && text[0] === \"\\\\\" && !implicitCommands.hasOwnProperty(text)) {\n        if (this.settings.throwOnError) {\n          throw new src_ParseError(\"Undefined control sequence: \" + text, firstToken);\n        }\n\n        result = this.handleUnsupportedCmd();\n      }\n    } // Switch mode back\n\n\n    if (mode) {\n      this.switchMode(outerMode);\n    } // Make sure we got a close brace\n\n\n    if (groupEnd) {\n      this.expect(groupEnd);\n    }\n\n    return result;\n  }\n  /**\n   * Form ligature-like combinations of characters for text mode.\n   * This includes inputs like \"--\", \"---\", \"``\" and \"''\".\n   * The result will simply replace multiple textord nodes with a single\n   * character in each value by a single textord node having multiple\n   * characters in its value.  The representation is still ASCII source.\n   * The group will be modified in place.\n   */\n  ;\n\n  _proto.formLigatures = function formLigatures(group) {\n    var n = group.length - 1;\n\n    for (var i = 0; i < n; ++i) {\n      var a = group[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n      var v = a.text;\n\n      if (v === \"-\" && group[i + 1].text === \"-\") {\n        if (i + 1 < n && group[i + 2].text === \"-\") {\n          group.splice(i, 3, {\n            type: \"textord\",\n            mode: \"text\",\n            loc: SourceLocation.range(a, group[i + 2]),\n            text: \"---\"\n          });\n          n -= 2;\n        } else {\n          group.splice(i, 2, {\n            type: \"textord\",\n            mode: \"text\",\n            loc: SourceLocation.range(a, group[i + 1]),\n            text: \"--\"\n          });\n          n -= 1;\n        }\n      }\n\n      if ((v === \"'\" || v === \"`\") && group[i + 1].text === v) {\n        group.splice(i, 2, {\n          type: \"textord\",\n          mode: \"text\",\n          loc: SourceLocation.range(a, group[i + 1]),\n          text: v + v\n        });\n        n -= 1;\n      }\n    }\n  }\n  /**\n   * Parse a single symbol out of the string. Here, we handle single character\n   * symbols and special functions like verbatim\n   */\n  ;\n\n  _proto.parseSymbol = function parseSymbol() {\n    var nucleus = this.nextToken;\n    var text = nucleus.text;\n\n    if (/^\\\\verb[^a-zA-Z]/.test(text)) {\n      this.consume();\n      var arg = text.slice(5);\n      var star = arg.charAt(0) === \"*\";\n\n      if (star) {\n        arg = arg.slice(1);\n      } // Lexer's tokenRegex is constructed to always have matching\n      // first/last characters.\n\n\n      if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) {\n        throw new src_ParseError(\"\\\\verb assertion failed --\\n                    please report what input caused this bug\");\n      }\n\n      arg = arg.slice(1, -1); // remove first and last char\n\n      return {\n        type: \"verb\",\n        mode: \"text\",\n        body: arg,\n        star: star\n      };\n    } // At this point, we should have a symbol, possibly with accents.\n    // First expand any accented base symbol according to unicodeSymbols.\n\n\n    if (unicodeSymbols.hasOwnProperty(text[0]) && !src_symbols[this.mode][text[0]]) {\n      // This behavior is not strict (XeTeX-compatible) in math mode.\n      if (this.settings.strict && this.mode === \"math\") {\n        this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Accented Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n      }\n\n      text = unicodeSymbols[text[0]] + text.substr(1);\n    } // Strip off any combining characters\n\n\n    var match = combiningDiacriticalMarksEndRegex.exec(text);\n\n    if (match) {\n      text = text.substring(0, match.index);\n\n      if (text === 'i') {\n        text = \"\\u0131\"; // dotless i, in math and text mode\n      } else if (text === 'j') {\n        text = \"\\u0237\"; // dotless j, in math and text mode\n      }\n    } // Recognize base symbol\n\n\n    var symbol;\n\n    if (src_symbols[this.mode][text]) {\n      if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) {\n        this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Latin-1/Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n      }\n\n      var group = src_symbols[this.mode][text].group;\n      var loc = SourceLocation.range(nucleus);\n      var s;\n\n      if (ATOMS.hasOwnProperty(group)) {\n        // $FlowFixMe\n        var family = group;\n        s = {\n          type: \"atom\",\n          mode: this.mode,\n          family: family,\n          loc: loc,\n          text: text\n        };\n      } else {\n        // $FlowFixMe\n        s = {\n          type: group,\n          mode: this.mode,\n          loc: loc,\n          text: text\n        };\n      }\n\n      symbol = s;\n    } else if (text.charCodeAt(0) >= 0x80) {\n      // no symbol for e.g. ^\n      if (this.settings.strict) {\n        if (!supportedCodepoint(text.charCodeAt(0))) {\n          this.settings.reportNonstrict(\"unknownSymbol\", \"Unrecognized Unicode character \\\"\" + text[0] + \"\\\"\" + (\" (\" + text.charCodeAt(0) + \")\"), nucleus);\n        } else if (this.mode === \"math\") {\n          this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Unicode text character \\\"\" + text[0] + \"\\\" used in math mode\", nucleus);\n        }\n      }\n\n      symbol = {\n        type: \"textord\",\n        mode: this.mode,\n        loc: SourceLocation.range(nucleus),\n        text: text\n      };\n    } else {\n      return null; // EOF, ^, _, {, }, etc.\n    }\n\n    this.consume(); // Transform combining characters into accents\n\n    if (match) {\n      for (var i = 0; i < match[0].length; i++) {\n        var accent = match[0][i];\n\n        if (!unicodeAccents[accent]) {\n          throw new src_ParseError(\"Unknown accent ' \" + accent + \"'\", nucleus);\n        }\n\n        var command = unicodeAccents[accent][this.mode];\n\n        if (!command) {\n          throw new src_ParseError(\"Accent \" + accent + \" unsupported in \" + this.mode + \" mode\", nucleus);\n        }\n\n        symbol = {\n          type: \"accent\",\n          mode: this.mode,\n          loc: SourceLocation.range(nucleus),\n          label: command,\n          isStretchy: false,\n          isShifty: true,\n          base: symbol\n        };\n      }\n    }\n\n    return symbol;\n  };\n\n  return Parser;\n}();\n\nParser_Parser.endOfExpression = [\"}\", \"\\\\endgroup\", \"\\\\end\", \"\\\\right\", \"&\"];\nParser_Parser.endOfGroup = {\n  \"[\": \"]\",\n  \"{\": \"}\",\n  \"\\\\begingroup\": \"\\\\endgroup\"\n  /**\n   * Parses an \"expression\", which is a list of atoms.\n   *\n   * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This\n   *                 happens when functions have higher precendence han infix\n   *                 nodes in implicit parses.\n   *\n   * `breakOnTokenText`: The text of the token that the expression should end\n   *                     with, or `null` if something else should end the\n   *                     expression.\n   */\n\n};\nParser_Parser.SUPSUB_GREEDINESS = 1;\n\n// CONCATENATED MODULE: ./src/parseTree.js\n/**\n * Provides a single function for parsing an expression using a Parser\n * TODO(emily): Remove this\n */\n\n\n\n/**\n * Parses an expression using a Parser, then returns the parsed result.\n */\nvar parseTree_parseTree = function parseTree(toParse, settings) {\n  if (!(typeof toParse === 'string' || toParse instanceof String)) {\n    throw new TypeError('KaTeX can only parse string typed expression');\n  }\n\n  var parser = new Parser_Parser(toParse, settings); // Blank out any \\df@tag to avoid spurious \"Duplicate \\tag\" errors\n\n  delete parser.gullet.macros.current[\"\\\\df@tag\"];\n  var tree = parser.parse(); // If the input used \\tag, it will set the \\df@tag macro to the tag.\n  // In this case, we separately parse the tag and wrap the tree.\n\n  if (parser.gullet.macros.get(\"\\\\df@tag\")) {\n    if (!settings.displayMode) {\n      throw new src_ParseError(\"\\\\tag works only in display equations\");\n    }\n\n    parser.gullet.feed(\"\\\\df@tag\");\n    tree = [{\n      type: \"tag\",\n      mode: \"text\",\n      body: tree,\n      tag: parser.parse()\n    }];\n  }\n\n  return tree;\n};\n\n/* harmony default export */ var src_parseTree = (parseTree_parseTree);\n// CONCATENATED MODULE: ./katex.js\n/* eslint no-console:0 */\n\n/**\n * This is the main entry point for KaTeX. Here, we expose functions for\n * rendering expressions either to DOM nodes or to markup strings.\n *\n * We also expose the ParseError class to check if errors thrown from KaTeX are\n * errors in the expression, or errors in javascript handling.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Parse and build an expression, and place that expression in the DOM node\n * given.\n */\nvar katex_render = function render(expression, baseNode, options) {\n  baseNode.textContent = \"\";\n  var node = katex_renderToDomTree(expression, options).toNode();\n  baseNode.appendChild(node);\n}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and\n// disable rendering.\n\n\nif (typeof document !== \"undefined\") {\n  if (document.compatMode !== \"CSS1Compat\") {\n    typeof console !== \"undefined\" && console.warn(\"Warning: KaTeX doesn't work in quirks mode. Make sure your \" + \"website has a suitable doctype.\");\n\n    katex_render = function render() {\n      throw new src_ParseError(\"KaTeX doesn't work in quirks mode.\");\n    };\n  }\n}\n/**\n * Parse and build an expression, and return the markup for that.\n */\n\n\nvar renderToString = function renderToString(expression, options) {\n  var markup = katex_renderToDomTree(expression, options).toMarkup();\n  return markup;\n};\n/**\n * Parse an expression and return the parse tree.\n */\n\n\nvar katex_generateParseTree = function generateParseTree(expression, options) {\n  var settings = new src_Settings(options);\n  return src_parseTree(expression, settings);\n};\n/**\n * If the given error is a KaTeX ParseError and options.throwOnError is false,\n * renders the invalid LaTeX as a span with hover title giving the KaTeX\n * error message.  Otherwise, simply throws the error.\n */\n\n\nvar katex_renderError = function renderError(error, expression, options) {\n  if (options.throwOnError || !(error instanceof src_ParseError)) {\n    throw error;\n  }\n\n  var node = buildCommon.makeSpan([\"katex-error\"], [new domTree_SymbolNode(expression)]);\n  node.setAttribute(\"title\", error.toString());\n  node.setAttribute(\"style\", \"color:\" + options.errorColor);\n  return node;\n};\n/**\n * Generates and returns the katex build tree. This is used for advanced\n * use cases (like rendering to custom output).\n */\n\n\nvar katex_renderToDomTree = function renderToDomTree(expression, options) {\n  var settings = new src_Settings(options);\n\n  try {\n    var tree = src_parseTree(expression, settings);\n    return buildTree_buildTree(tree, expression, settings);\n  } catch (error) {\n    return katex_renderError(error, expression, settings);\n  }\n};\n/**\n * Generates and returns the katex build tree, with just HTML (no MathML).\n * This is used for advanced use cases (like rendering to custom output).\n */\n\n\nvar katex_renderToHTMLTree = function renderToHTMLTree(expression, options) {\n  var settings = new src_Settings(options);\n\n  try {\n    var tree = src_parseTree(expression, settings);\n    return buildTree_buildHTMLTree(tree, expression, settings);\n  } catch (error) {\n    return katex_renderError(error, expression, settings);\n  }\n};\n\n/* harmony default export */ var katex_0 = ({\n  /**\n   * Current KaTeX version\n   */\n  version: \"0.10.2\",\n\n  /**\n   * Renders the given LaTeX into an HTML+MathML combination, and adds\n   * it as a child to the specified DOM node.\n   */\n  render: katex_render,\n\n  /**\n   * Renders the given LaTeX into an HTML+MathML combination string,\n   * for sending to the client.\n   */\n  renderToString: renderToString,\n\n  /**\n   * KaTeX error, usually during parsing.\n   */\n  ParseError: src_ParseError,\n\n  /**\n   * Parses the given LaTeX into KaTeX's internal parse tree structure,\n   * without rendering to HTML or MathML.\n   *\n   * NOTE: This method is not currently recommended for public use.\n   * The internal tree representation is unstable and is very likely\n   * to change. Use at your own risk.\n   */\n  __parse: katex_generateParseTree,\n\n  /**\n   * Renders the given LaTeX into an HTML+MathML internal DOM tree\n   * representation, without flattening that representation to a string.\n   *\n   * NOTE: This method is not currently recommended for public use.\n   * The internal tree representation is unstable and is very likely\n   * to change. Use at your own risk.\n   */\n  __renderToDomTree: katex_renderToDomTree,\n\n  /**\n   * Renders the given LaTeX into an HTML internal DOM tree representation,\n   * without MathML and without flattening that representation to a string.\n   *\n   * NOTE: This method is not currently recommended for public use.\n   * The internal tree representation is unstable and is very likely\n   * to change. Use at your own risk.\n   */\n  __renderToHTMLTree: katex_renderToHTMLTree,\n\n  /**\n   * extends internal font metrics object with a new object\n   * each key in the new object represents a font name\n  */\n  __setFontMetrics: setFontMetrics,\n\n  /**\n   * adds a new symbol to builtin symbols table\n   */\n  __defineSymbol: defineSymbol,\n\n  /**\n   * adds a new macro to builtin macro list\n   */\n  __defineMacro: defineMacro,\n\n  /**\n   * Expose the dom tree node types, which can be useful for type checking nodes.\n   *\n   * NOTE: This method is not currently recommended for public use.\n   * The internal tree representation is unstable and is very likely\n   * to change. Use at your own risk.\n   */\n  __domTree: {\n    Span: domTree_Span,\n    Anchor: domTree_Anchor,\n    SymbolNode: domTree_SymbolNode,\n    SvgNode: SvgNode,\n    PathNode: domTree_PathNode,\n    LineNode: LineNode\n  }\n});\n// CONCATENATED MODULE: ./katex.webpack.js\n/**\n * This is the webpack entry point for KaTeX. As ECMAScript, flow[1] and jest[2]\n * doesn't support CSS modules natively, a separate entry point is used and\n * it is not flowtyped.\n *\n * [1] https://gist.github.com/lambdahands/d19e0da96285b749f0ef\n * [2] https://facebook.github.io/jest/docs/en/webpack.html\n */\n\n\n/* harmony default export */ var katex_webpack = __webpack_exports__[\"default\"] = (katex_0);\n\n/***/ })\n/******/ ])[\"default\"];\n});\n\n//# sourceURL=webpack://futureBooks/./node_modules/katex/dist/katex.js?");

/***/ }),

/***/ "./node_modules/keycode/index.js":
/*!***************************************!*\
  !*** ./node_modules/keycode/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n  // Keyboard Events\n  if (searchInput && 'object' === typeof searchInput) {\n    var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n    if (hasKeyCode) searchInput = hasKeyCode\n  }\n\n  // Numbers\n  if ('number' === typeof searchInput) return names[searchInput]\n\n  // Everything else (cast to string)\n  var search = String(searchInput)\n\n  // check codes\n  var foundNamedKey = codes[search.toLowerCase()]\n  if (foundNamedKey) return foundNamedKey\n\n  // check aliases\n  var foundNamedKey = aliases[search.toLowerCase()]\n  if (foundNamedKey) return foundNamedKey\n\n  // weird character?\n  if (search.length === 1) return search.charCodeAt(0)\n\n  return undefined\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n  if (event && 'object' === typeof event) {\n    var keyCode = event.which || event.keyCode || event.charCode\n    if (keyCode === null || keyCode === undefined) { return false; }\n    if (typeof nameOrCode === 'string') {\n      // check codes\n      var foundNamedKey = codes[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    \n      // check aliases\n      var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    } else if (typeof nameOrCode === 'number') {\n      return nameOrCode === keyCode;\n    }\n    return false;\n  }\n}\n\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n *   exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n  'backspace': 8,\n  'tab': 9,\n  'enter': 13,\n  'shift': 16,\n  'ctrl': 17,\n  'alt': 18,\n  'pause/break': 19,\n  'caps lock': 20,\n  'esc': 27,\n  'space': 32,\n  'page up': 33,\n  'page down': 34,\n  'end': 35,\n  'home': 36,\n  'left': 37,\n  'up': 38,\n  'right': 39,\n  'down': 40,\n  'insert': 45,\n  'delete': 46,\n  'command': 91,\n  'left command': 91,\n  'right command': 93,\n  'numpad *': 106,\n  'numpad +': 107,\n  'numpad -': 109,\n  'numpad .': 110,\n  'numpad /': 111,\n  'num lock': 144,\n  'scroll lock': 145,\n  'my computer': 182,\n  'my calculator': 183,\n  ';': 186,\n  '=': 187,\n  ',': 188,\n  '-': 189,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '[': 219,\n  '\\\\': 220,\n  ']': 221,\n  \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n  'windows': 91,\n  '⇧': 16,\n  '⌥': 18,\n  '⌃': 17,\n  '⌘': 91,\n  'ctl': 17,\n  'control': 17,\n  'option': 18,\n  'pause': 19,\n  'break': 19,\n  'caps': 20,\n  'return': 13,\n  'escape': 27,\n  'spc': 32,\n  'spacebar': 32,\n  'pgup': 33,\n  'pgdn': 34,\n  'ins': 45,\n  'del': 46,\n  'cmd': 91\n}\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n *   exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n  codes[alias] = aliases[alias]\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/keycode/index.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Animation.js":
/*!*********************************************!*\
  !*** ./node_modules/konva/lib/Animation.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar now = (function () {\n    if (Global_1.glob.performance && Global_1.glob.performance.now) {\n        return function () {\n            return Global_1.glob.performance.now();\n        };\n    }\n    return function () {\n        return new Date().getTime();\n    };\n})();\nvar Animation = (function () {\n    function Animation(func, layers) {\n        this.id = Animation.animIdCounter++;\n        this.frame = {\n            time: 0,\n            timeDiff: 0,\n            lastTime: now(),\n            frameRate: 0\n        };\n        this.func = func;\n        this.setLayers(layers);\n    }\n    Animation.prototype.setLayers = function (layers) {\n        var lays = [];\n        if (!layers) {\n            lays = [];\n        }\n        else if (layers.length > 0) {\n            lays = layers;\n        }\n        else {\n            lays = [layers];\n        }\n        this.layers = lays;\n        return this;\n    };\n    Animation.prototype.getLayers = function () {\n        return this.layers;\n    };\n    Animation.prototype.addLayer = function (layer) {\n        var layers = this.layers, len = layers.length, n;\n        for (n = 0; n < len; n++) {\n            if (layers[n]._id === layer._id) {\n                return false;\n            }\n        }\n        this.layers.push(layer);\n        return true;\n    };\n    Animation.prototype.isRunning = function () {\n        var a = Animation, animations = a.animations, len = animations.length, n;\n        for (n = 0; n < len; n++) {\n            if (animations[n].id === this.id) {\n                return true;\n            }\n        }\n        return false;\n    };\n    Animation.prototype.start = function () {\n        this.stop();\n        this.frame.timeDiff = 0;\n        this.frame.lastTime = now();\n        Animation._addAnimation(this);\n        return this;\n    };\n    Animation.prototype.stop = function () {\n        Animation._removeAnimation(this);\n        return this;\n    };\n    Animation.prototype._updateFrameObject = function (time) {\n        this.frame.timeDiff = time - this.frame.lastTime;\n        this.frame.lastTime = time;\n        this.frame.time += this.frame.timeDiff;\n        this.frame.frameRate = 1000 / this.frame.timeDiff;\n    };\n    Animation._addAnimation = function (anim) {\n        this.animations.push(anim);\n        this._handleAnimation();\n    };\n    Animation._removeAnimation = function (anim) {\n        var id = anim.id, animations = this.animations, len = animations.length, n;\n        for (n = 0; n < len; n++) {\n            if (animations[n].id === id) {\n                this.animations.splice(n, 1);\n                break;\n            }\n        }\n    };\n    Animation._runFrames = function () {\n        var layerHash = {}, animations = this.animations, anim, layers, func, n, i, layersLen, layer, key, needRedraw;\n        for (n = 0; n < animations.length; n++) {\n            anim = animations[n];\n            layers = anim.layers;\n            func = anim.func;\n            anim._updateFrameObject(now());\n            layersLen = layers.length;\n            if (func) {\n                needRedraw = func.call(anim, anim.frame) !== false;\n            }\n            else {\n                needRedraw = true;\n            }\n            if (!needRedraw) {\n                continue;\n            }\n            for (i = 0; i < layersLen; i++) {\n                layer = layers[i];\n                if (layer._id !== undefined) {\n                    layerHash[layer._id] = layer;\n                }\n            }\n        }\n        for (key in layerHash) {\n            if (!layerHash.hasOwnProperty(key)) {\n                continue;\n            }\n            layerHash[key].draw();\n        }\n    };\n    Animation._animationLoop = function () {\n        var Anim = Animation;\n        if (Anim.animations.length) {\n            Anim._runFrames();\n            requestAnimationFrame(Anim._animationLoop);\n        }\n        else {\n            Anim.animRunning = false;\n        }\n    };\n    Animation._handleAnimation = function () {\n        if (!this.animRunning) {\n            this.animRunning = true;\n            requestAnimationFrame(this._animationLoop);\n        }\n    };\n    Animation.animations = [];\n    Animation.animIdCounter = 0;\n    Animation.animRunning = false;\n    return Animation;\n}());\nexports.Animation = Animation;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Animation.js?");

/***/ }),

/***/ "./node_modules/konva/lib/BaseLayer.js":
/*!*********************************************!*\
  !*** ./node_modules/konva/lib/BaseLayer.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar Node_1 = __webpack_require__(/*! ./Node */ \"./node_modules/konva/lib/Node.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Canvas_1 = __webpack_require__(/*! ./Canvas */ \"./node_modules/konva/lib/Canvas.js\");\nvar BaseLayer = (function (_super) {\n    __extends(BaseLayer, _super);\n    function BaseLayer(config) {\n        var _this = _super.call(this, config) || this;\n        _this.canvas = new Canvas_1.SceneCanvas();\n        _this._waitingForDraw = false;\n        _this.on('visibleChange', _this._checkVisibility);\n        _this._checkVisibility();\n        _this.on('imageSmoothingEnabledChange', _this._setSmoothEnabled);\n        _this._setSmoothEnabled();\n        return _this;\n    }\n    BaseLayer.prototype.createPNGStream = function () {\n        var c = this.canvas._canvas;\n        return c.createPNGStream();\n    };\n    BaseLayer.prototype.getCanvas = function () {\n        return this.canvas;\n    };\n    BaseLayer.prototype.getHitCanvas = function () {\n        return this.hitCanvas;\n    };\n    BaseLayer.prototype.getContext = function () {\n        return this.getCanvas().getContext();\n    };\n    BaseLayer.prototype.clear = function (bounds) {\n        this.getContext().clear(bounds);\n        return this;\n    };\n    BaseLayer.prototype.setZIndex = function (index) {\n        _super.prototype.setZIndex.call(this, index);\n        var stage = this.getStage();\n        if (stage) {\n            stage.content.removeChild(this.getCanvas()._canvas);\n            if (index < stage.children.length - 1) {\n                stage.content.insertBefore(this.getCanvas()._canvas, stage.children[index + 1].getCanvas()._canvas);\n            }\n            else {\n                stage.content.appendChild(this.getCanvas()._canvas);\n            }\n        }\n        return this;\n    };\n    BaseLayer.prototype.moveToTop = function () {\n        Node_1.Node.prototype.moveToTop.call(this);\n        var stage = this.getStage();\n        if (stage) {\n            stage.content.removeChild(this.getCanvas()._canvas);\n            stage.content.appendChild(this.getCanvas()._canvas);\n        }\n        return true;\n    };\n    BaseLayer.prototype.moveUp = function () {\n        var moved = Node_1.Node.prototype.moveUp.call(this);\n        if (!moved) {\n            return false;\n        }\n        var stage = this.getStage();\n        if (!stage) {\n            return false;\n        }\n        stage.content.removeChild(this.getCanvas()._canvas);\n        if (this.index < stage.children.length - 1) {\n            stage.content.insertBefore(this.getCanvas()._canvas, stage.children[this.index + 1].getCanvas()._canvas);\n        }\n        else {\n            stage.content.appendChild(this.getCanvas()._canvas);\n        }\n        return true;\n    };\n    BaseLayer.prototype.moveDown = function () {\n        if (Node_1.Node.prototype.moveDown.call(this)) {\n            var stage = this.getStage();\n            if (stage) {\n                var children = stage.children;\n                stage.content.removeChild(this.getCanvas()._canvas);\n                stage.content.insertBefore(this.getCanvas()._canvas, children[this.index + 1].getCanvas()._canvas);\n            }\n            return true;\n        }\n        return false;\n    };\n    BaseLayer.prototype.moveToBottom = function () {\n        if (Node_1.Node.prototype.moveToBottom.call(this)) {\n            var stage = this.getStage();\n            if (stage) {\n                var children = stage.children;\n                stage.content.removeChild(this.getCanvas()._canvas);\n                stage.content.insertBefore(this.getCanvas()._canvas, children[1].getCanvas()._canvas);\n            }\n            return true;\n        }\n        return false;\n    };\n    BaseLayer.prototype.getLayer = function () {\n        return this;\n    };\n    BaseLayer.prototype.hitGraphEnabled = function () {\n        return true;\n    };\n    BaseLayer.prototype.remove = function () {\n        var _canvas = this.getCanvas()._canvas;\n        Node_1.Node.prototype.remove.call(this);\n        if (_canvas && _canvas.parentNode && Util_1.Util._isInDocument(_canvas)) {\n            _canvas.parentNode.removeChild(_canvas);\n        }\n        return this;\n    };\n    BaseLayer.prototype.getStage = function () {\n        return this.parent;\n    };\n    BaseLayer.prototype.setSize = function (_a) {\n        var width = _a.width, height = _a.height;\n        this.canvas.setSize(width, height);\n        this._setSmoothEnabled();\n        return this;\n    };\n    BaseLayer.prototype._toKonvaCanvas = function (config) {\n        config = config || {};\n        config.width = config.width || this.getWidth();\n        config.height = config.height || this.getHeight();\n        config.x = config.x !== undefined ? config.x : this.x();\n        config.y = config.y !== undefined ? config.y : this.y();\n        return Node_1.Node.prototype._toKonvaCanvas.call(this, config);\n    };\n    BaseLayer.prototype._checkVisibility = function () {\n        var visible = this.visible();\n        if (visible) {\n            this.canvas._canvas.style.display = 'block';\n        }\n        else {\n            this.canvas._canvas.style.display = 'none';\n        }\n    };\n    BaseLayer.prototype._setSmoothEnabled = function () {\n        this.getContext()._context.imageSmoothingEnabled = this.imageSmoothingEnabled();\n    };\n    BaseLayer.prototype.getWidth = function () {\n        if (this.parent) {\n            return this.parent.width();\n        }\n    };\n    BaseLayer.prototype.setWidth = function () {\n        Util_1.Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n    };\n    BaseLayer.prototype.getHeight = function () {\n        if (this.parent) {\n            return this.parent.height();\n        }\n    };\n    BaseLayer.prototype.setHeight = function () {\n        Util_1.Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n    };\n    BaseLayer.prototype.getIntersection = function (pos, selector) {\n        return null;\n    };\n    BaseLayer.prototype.batchDraw = function () {\n        var _this = this;\n        if (!this._waitingForDraw) {\n            this._waitingForDraw = true;\n            Util_1.Util.requestAnimFrame(function () {\n                _this.draw();\n                _this._waitingForDraw = false;\n            });\n        }\n        return this;\n    };\n    BaseLayer.prototype._applyTransform = function (shape, context, top) {\n        var m = shape.getAbsoluteTransform(top).getMatrix();\n        context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n    };\n    return BaseLayer;\n}(Container_1.Container));\nexports.BaseLayer = BaseLayer;\nBaseLayer.prototype.nodeType = 'BaseLayer';\nFactory_1.Factory.addGetterSetter(BaseLayer, 'imageSmoothingEnabled', true);\nFactory_1.Factory.addGetterSetter(BaseLayer, 'clearBeforeDraw', true);\nUtil_1.Collection.mapMethods(BaseLayer);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/BaseLayer.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Canvas.js":
/*!******************************************!*\
  !*** ./node_modules/konva/lib/Canvas.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Context_1 = __webpack_require__(/*! ./Context */ \"./node_modules/konva/lib/Context.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar _pixelRatio;\nfunction getDevicePixelRatio() {\n    if (_pixelRatio) {\n        return _pixelRatio;\n    }\n    var canvas = Util_1.Util.createCanvasElement();\n    var context = canvas.getContext('2d');\n    _pixelRatio = (function () {\n        var devicePixelRatio = Global_1.Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n            context.mozBackingStorePixelRatio ||\n            context.msBackingStorePixelRatio ||\n            context.oBackingStorePixelRatio ||\n            context.backingStorePixelRatio ||\n            1;\n        return devicePixelRatio / backingStoreRatio;\n    })();\n    return _pixelRatio;\n}\nvar Canvas = (function () {\n    function Canvas(config) {\n        this.pixelRatio = 1;\n        this.width = 0;\n        this.height = 0;\n        this.isCache = false;\n        var conf = config || {};\n        var pixelRatio = conf.pixelRatio || Global_1.Konva.pixelRatio || getDevicePixelRatio();\n        this.pixelRatio = pixelRatio;\n        this._canvas = Util_1.Util.createCanvasElement();\n        this._canvas.style.padding = '0';\n        this._canvas.style.margin = '0';\n        this._canvas.style.border = '0';\n        this._canvas.style.background = 'transparent';\n        this._canvas.style.position = 'absolute';\n        this._canvas.style.top = '0';\n        this._canvas.style.left = '0';\n    }\n    Canvas.prototype.getContext = function () {\n        return this.context;\n    };\n    Canvas.prototype.getPixelRatio = function () {\n        return this.pixelRatio;\n    };\n    Canvas.prototype.setPixelRatio = function (pixelRatio) {\n        var previousRatio = this.pixelRatio;\n        this.pixelRatio = pixelRatio;\n        this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n    };\n    Canvas.prototype.setWidth = function (width) {\n        this.width = this._canvas.width = width * this.pixelRatio;\n        this._canvas.style.width = width + 'px';\n        var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n        _context.scale(pixelRatio, pixelRatio);\n    };\n    Canvas.prototype.setHeight = function (height) {\n        this.height = this._canvas.height = height * this.pixelRatio;\n        this._canvas.style.height = height + 'px';\n        var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n        _context.scale(pixelRatio, pixelRatio);\n    };\n    Canvas.prototype.getWidth = function () {\n        return this.width;\n    };\n    Canvas.prototype.getHeight = function () {\n        return this.height;\n    };\n    Canvas.prototype.setSize = function (width, height) {\n        this.setWidth(width || 0);\n        this.setHeight(height || 0);\n    };\n    Canvas.prototype.toDataURL = function (mimeType, quality) {\n        try {\n            return this._canvas.toDataURL(mimeType, quality);\n        }\n        catch (e) {\n            try {\n                return this._canvas.toDataURL();\n            }\n            catch (err) {\n                Util_1.Util.error('Unable to get data URL. ' +\n                    err.message +\n                    ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n                return '';\n            }\n        }\n    };\n    return Canvas;\n}());\nexports.Canvas = Canvas;\nFactory_1.Factory.addGetterSetter(Canvas, 'pixelRatio', undefined, Validators_1.getNumberValidator());\nvar SceneCanvas = (function (_super) {\n    __extends(SceneCanvas, _super);\n    function SceneCanvas(config) {\n        if (config === void 0) { config = { width: 0, height: 0 }; }\n        var _this = _super.call(this, config) || this;\n        _this.context = new Context_1.SceneContext(_this);\n        _this.setSize(config.width, config.height);\n        return _this;\n    }\n    return SceneCanvas;\n}(Canvas));\nexports.SceneCanvas = SceneCanvas;\nvar HitCanvas = (function (_super) {\n    __extends(HitCanvas, _super);\n    function HitCanvas(config) {\n        if (config === void 0) { config = { width: 0, height: 0 }; }\n        var _this = _super.call(this, config) || this;\n        _this.hitCanvas = true;\n        _this.context = new Context_1.HitContext(_this);\n        _this.setSize(config.width, config.height);\n        return _this;\n    }\n    return HitCanvas;\n}(Canvas));\nexports.HitCanvas = HitCanvas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Canvas.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Container.js":
/*!*********************************************!*\
  !*** ./node_modules/konva/lib/Container.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ./Node */ \"./node_modules/konva/lib/Node.js\");\nvar DragAndDrop_1 = __webpack_require__(/*! ./DragAndDrop */ \"./node_modules/konva/lib/DragAndDrop.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Container = (function (_super) {\n    __extends(Container, _super);\n    function Container() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.children = new Util_1.Collection();\n        return _this;\n    }\n    Container.prototype.getChildren = function (filterFunc) {\n        if (!filterFunc) {\n            return this.children;\n        }\n        var results = new Util_1.Collection();\n        this.children.each(function (child) {\n            if (filterFunc(child)) {\n                results.push(child);\n            }\n        });\n        return results;\n    };\n    Container.prototype.hasChildren = function () {\n        return this.getChildren().length > 0;\n    };\n    Container.prototype.removeChildren = function () {\n        var child;\n        for (var i = 0; i < this.children.length; i++) {\n            child = this.children[i];\n            child.parent = null;\n            child.index = 0;\n            child.remove();\n        }\n        this.children = new Util_1.Collection();\n        return this;\n    };\n    Container.prototype.destroyChildren = function () {\n        var child;\n        for (var i = 0; i < this.children.length; i++) {\n            child = this.children[i];\n            child.parent = null;\n            child.index = 0;\n            child.destroy();\n        }\n        this.children = new Util_1.Collection();\n        return this;\n    };\n    Container.prototype.add = function () {\n        var children = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            children[_i] = arguments[_i];\n        }\n        if (arguments.length > 1) {\n            for (var i = 0; i < arguments.length; i++) {\n                this.add(arguments[i]);\n            }\n            return this;\n        }\n        var child = children[0];\n        if (child.getParent()) {\n            child.moveTo(this);\n            return this;\n        }\n        var _children = this.children;\n        this._validateAdd(child);\n        child._clearCaches();\n        child.index = _children.length;\n        child.parent = this;\n        _children.push(child);\n        this._fire('add', {\n            child: child\n        });\n        return this;\n    };\n    Container.prototype.destroy = function () {\n        if (this.hasChildren()) {\n            this.destroyChildren();\n        }\n        _super.prototype.destroy.call(this);\n        return this;\n    };\n    Container.prototype.find = function (selector) {\n        return this._generalFind(selector, false);\n    };\n    Container.prototype.get = function (selector) {\n        Util_1.Util.warn('collection.get() method is deprecated. Please use collection.find() instead.');\n        return this.find(selector);\n    };\n    Container.prototype.findOne = function (selector) {\n        var result = this._generalFind(selector, true);\n        return result.length > 0 ? result[0] : undefined;\n    };\n    Container.prototype._generalFind = function (selector, findOne) {\n        var retArr = [];\n        this._descendants(function (node) {\n            var valid = node._isMatch(selector);\n            if (valid) {\n                retArr.push(node);\n            }\n            if (valid && findOne) {\n                return true;\n            }\n            return false;\n        });\n        return Util_1.Collection.toCollection(retArr);\n    };\n    Container.prototype._descendants = function (fn) {\n        var shouldStop = false;\n        for (var i = 0; i < this.children.length; i++) {\n            var child = this.children[i];\n            shouldStop = fn(child);\n            if (shouldStop) {\n                return true;\n            }\n            if (!child.hasChildren()) {\n                continue;\n            }\n            shouldStop = child._descendants(fn);\n            if (shouldStop) {\n                return true;\n            }\n        }\n        return false;\n    };\n    Container.prototype.toObject = function () {\n        var obj = Node_1.Node.prototype.toObject.call(this);\n        obj.children = [];\n        var children = this.getChildren();\n        var len = children.length;\n        for (var n = 0; n < len; n++) {\n            var child = children[n];\n            obj.children.push(child.toObject());\n        }\n        return obj;\n    };\n    Container.prototype.isAncestorOf = function (node) {\n        var parent = node.getParent();\n        while (parent) {\n            if (parent._id === this._id) {\n                return true;\n            }\n            parent = parent.getParent();\n        }\n        return false;\n    };\n    Container.prototype.clone = function (obj) {\n        var node = Node_1.Node.prototype.clone.call(this, obj);\n        this.getChildren().each(function (no) {\n            node.add(no.clone());\n        });\n        return node;\n    };\n    Container.prototype.getAllIntersections = function (pos) {\n        var arr = [];\n        this.find('Shape').each(function (shape) {\n            if (shape.isVisible() && shape.intersects(pos)) {\n                arr.push(shape);\n            }\n        });\n        return arr;\n    };\n    Container.prototype._setChildrenIndices = function () {\n        this.children.each(function (child, n) {\n            child.index = n;\n        });\n    };\n    Container.prototype.drawScene = function (can, top, caching) {\n        var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n        if (this.isVisible() || caching) {\n            if (!caching && cachedSceneCanvas) {\n                context.save();\n                layer._applyTransform(this, context, top);\n                this._drawCachedSceneCanvas(context);\n                context.restore();\n            }\n            else {\n                this._drawChildren(canvas, 'drawScene', top, false, caching, caching);\n            }\n        }\n        return this;\n    };\n    Container.prototype.drawHit = function (can, top, caching) {\n        var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n        if (this.shouldDrawHit(canvas) || caching) {\n            if (!caching && cachedHitCanvas) {\n                context.save();\n                layer._applyTransform(this, context, top);\n                this._drawCachedHitCanvas(context);\n                context.restore();\n            }\n            else {\n                this._drawChildren(canvas, 'drawHit', top, false, caching, caching);\n            }\n        }\n        return this;\n    };\n    Container.prototype._drawChildren = function (canvas, drawMethod, top, caching, skipBuffer, skipComposition) {\n        var layer = this.getLayer(), context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (clipWidth && clipHeight) || clipFunc, clipX, clipY;\n        if (hasClip && layer) {\n            context.save();\n            var transform = this.getAbsoluteTransform(top);\n            var m = transform.getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            context.beginPath();\n            if (clipFunc) {\n                clipFunc.call(this, context, this);\n            }\n            else {\n                clipX = this.clipX();\n                clipY = this.clipY();\n                context.rect(clipX, clipY, clipWidth, clipHeight);\n            }\n            context.clip();\n            m = transform\n                .copy()\n                .invert()\n                .getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n        }\n        var hasComposition = this.globalCompositeOperation() !== 'source-over' &&\n            !skipComposition &&\n            drawMethod === 'drawScene';\n        if (hasComposition && layer) {\n            context.save();\n            context._applyGlobalCompositeOperation(this);\n        }\n        this.children.each(function (child) {\n            child[drawMethod](canvas, top, caching, skipBuffer);\n        });\n        if (hasComposition && layer) {\n            context.restore();\n        }\n        if (hasClip && layer) {\n            context.restore();\n        }\n    };\n    Container.prototype.shouldDrawHit = function (canvas) {\n        if (canvas && canvas.isCache) {\n            return true;\n        }\n        var layer = this.getLayer();\n        var layerUnderDrag = false;\n        DragAndDrop_1.DD._dragElements.forEach(function (elem) {\n            if (elem.dragStatus === 'dragging' && elem.node.getLayer() === layer) {\n                layerUnderDrag = true;\n            }\n        });\n        var dragSkip = !Global_1.Konva.hitOnDragEnabled && layerUnderDrag;\n        return layer && layer.hitGraphEnabled() && this.isVisible() && !dragSkip;\n    };\n    Container.prototype.getClientRect = function (config) {\n        config = config || {};\n        var skipTransform = config.skipTransform;\n        var relativeTo = config.relativeTo;\n        var minX, minY, maxX, maxY;\n        var selfRect = {\n            x: Infinity,\n            y: Infinity,\n            width: 0,\n            height: 0\n        };\n        var that = this;\n        this.children.each(function (child) {\n            if (!child.visible()) {\n                return;\n            }\n            var rect = child.getClientRect({\n                relativeTo: that,\n                skipShadow: config.skipShadow,\n                skipStroke: config.skipStroke\n            });\n            if (rect.width === 0 && rect.height === 0) {\n                return;\n            }\n            if (minX === undefined) {\n                minX = rect.x;\n                minY = rect.y;\n                maxX = rect.x + rect.width;\n                maxY = rect.y + rect.height;\n            }\n            else {\n                minX = Math.min(minX, rect.x);\n                minY = Math.min(minY, rect.y);\n                maxX = Math.max(maxX, rect.x + rect.width);\n                maxY = Math.max(maxY, rect.y + rect.height);\n            }\n        });\n        var shapes = this.find('Shape');\n        var hasVisible = false;\n        for (var i = 0; i < shapes.length; i++) {\n            var shape = shapes[i];\n            if (shape._isVisible(this)) {\n                hasVisible = true;\n                break;\n            }\n        }\n        if (hasVisible && minX !== undefined) {\n            selfRect = {\n                x: minX,\n                y: minY,\n                width: maxX - minX,\n                height: maxY - minY\n            };\n        }\n        else {\n            selfRect = {\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0\n            };\n        }\n        if (!skipTransform) {\n            return this._transformedRect(selfRect, relativeTo);\n        }\n        return selfRect;\n    };\n    return Container;\n}(Node_1.Node));\nexports.Container = Container;\nFactory_1.Factory.addComponentsGetterSetter(Container, 'clip', [\n    'x',\n    'y',\n    'width',\n    'height'\n]);\nFactory_1.Factory.addGetterSetter(Container, 'clipX', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipY', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipWidth', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipHeight', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipFunc');\nUtil_1.Collection.mapMethods(Container);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Container.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Context.js":
/*!*******************************************!*\
  !*** ./node_modules/konva/lib/Context.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n    'arc',\n    'arcTo',\n    'beginPath',\n    'bezierCurveTo',\n    'clearRect',\n    'clip',\n    'closePath',\n    'createLinearGradient',\n    'createPattern',\n    'createRadialGradient',\n    'drawImage',\n    'ellipse',\n    'fill',\n    'fillText',\n    'getImageData',\n    'createImageData',\n    'lineTo',\n    'moveTo',\n    'putImageData',\n    'quadraticCurveTo',\n    'rect',\n    'restore',\n    'rotate',\n    'save',\n    'scale',\n    'setLineDash',\n    'setTransform',\n    'stroke',\n    'strokeText',\n    'transform',\n    'translate'\n];\nvar CONTEXT_PROPERTIES = [\n    'fillStyle',\n    'strokeStyle',\n    'shadowColor',\n    'shadowBlur',\n    'shadowOffsetX',\n    'shadowOffsetY',\n    'lineCap',\n    'lineDashOffset',\n    'lineJoin',\n    'lineWidth',\n    'miterLimit',\n    'font',\n    'textAlign',\n    'textBaseline',\n    'globalAlpha',\n    'globalCompositeOperation',\n    'imageSmoothingEnabled'\n];\nvar traceArrMax = 100;\nvar Context = (function () {\n    function Context(canvas) {\n        this.canvas = canvas;\n        this._context = canvas._canvas.getContext('2d');\n        if (Global_1.Konva.enableTrace) {\n            this.traceArr = [];\n            this._enableTrace();\n        }\n    }\n    Context.prototype.fillShape = function (shape) {\n        if (shape.fillEnabled()) {\n            this._fill(shape);\n        }\n    };\n    Context.prototype._fill = function (shape) {\n    };\n    Context.prototype.strokeShape = function (shape) {\n        if (shape.hasStroke()) {\n            this._stroke(shape);\n        }\n    };\n    Context.prototype._stroke = function (shape) {\n    };\n    Context.prototype.fillStrokeShape = function (shape) {\n        this.fillShape(shape);\n        this.strokeShape(shape);\n    };\n    Context.prototype.getTrace = function (relaxed) {\n        var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n        for (n = 0; n < len; n++) {\n            trace = traceArr[n];\n            method = trace.method;\n            if (method) {\n                args = trace.args;\n                str += method;\n                if (relaxed) {\n                    str += DOUBLE_PAREN;\n                }\n                else {\n                    if (Util_1.Util._isArray(args[0])) {\n                        str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n                    }\n                    else {\n                        str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n                    }\n                }\n            }\n            else {\n                str += trace.property;\n                if (!relaxed) {\n                    str += EQUALS + trace.val;\n                }\n            }\n            str += SEMICOLON;\n        }\n        return str;\n    };\n    Context.prototype.clearTrace = function () {\n        this.traceArr = [];\n    };\n    Context.prototype._trace = function (str) {\n        var traceArr = this.traceArr, len;\n        traceArr.push(str);\n        len = traceArr.length;\n        if (len >= traceArrMax) {\n            traceArr.shift();\n        }\n    };\n    Context.prototype.reset = function () {\n        var pixelRatio = this.getCanvas().getPixelRatio();\n        this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n    };\n    Context.prototype.getCanvas = function () {\n        return this.canvas;\n    };\n    Context.prototype.clear = function (bounds) {\n        var canvas = this.getCanvas();\n        if (bounds) {\n            this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n        }\n        else {\n            this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n        }\n    };\n    Context.prototype._applyLineCap = function (shape) {\n        var lineCap = shape.getLineCap();\n        if (lineCap) {\n            this.setAttr('lineCap', lineCap);\n        }\n    };\n    Context.prototype._applyOpacity = function (shape) {\n        var absOpacity = shape.getAbsoluteOpacity();\n        if (absOpacity !== 1) {\n            this.setAttr('globalAlpha', absOpacity);\n        }\n    };\n    Context.prototype._applyLineJoin = function (shape) {\n        var lineJoin = shape.getLineJoin();\n        if (lineJoin) {\n            this.setAttr('lineJoin', lineJoin);\n        }\n    };\n    Context.prototype.setAttr = function (attr, val) {\n        this._context[attr] = val;\n    };\n    Context.prototype.arc = function (a0, a1, a2, a3, a4, a5) {\n        this._context.arc(a0, a1, a2, a3, a4, a5);\n    };\n    Context.prototype.arcTo = function (a0, a1, a2, a3, a4) {\n        this._context.arcTo(a0, a1, a2, a3, a4);\n    };\n    Context.prototype.beginPath = function () {\n        this._context.beginPath();\n    };\n    Context.prototype.bezierCurveTo = function (a0, a1, a2, a3, a4, a5) {\n        this._context.bezierCurveTo(a0, a1, a2, a3, a4, a5);\n    };\n    Context.prototype.clearRect = function (a0, a1, a2, a3) {\n        this._context.clearRect(a0, a1, a2, a3);\n    };\n    Context.prototype.clip = function () {\n        this._context.clip();\n    };\n    Context.prototype.closePath = function () {\n        this._context.closePath();\n    };\n    Context.prototype.createImageData = function (a0, a1) {\n        var a = arguments;\n        if (a.length === 2) {\n            return this._context.createImageData(a0, a1);\n        }\n        else if (a.length === 1) {\n            return this._context.createImageData(a0);\n        }\n    };\n    Context.prototype.createLinearGradient = function (a0, a1, a2, a3) {\n        return this._context.createLinearGradient(a0, a1, a2, a3);\n    };\n    Context.prototype.createPattern = function (a0, a1) {\n        return this._context.createPattern(a0, a1);\n    };\n    Context.prototype.createRadialGradient = function (a0, a1, a2, a3, a4, a5) {\n        return this._context.createRadialGradient(a0, a1, a2, a3, a4, a5);\n    };\n    Context.prototype.drawImage = function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n        var a = arguments, _context = this._context;\n        if (a.length === 3) {\n            _context.drawImage(a0, a1, a2);\n        }\n        else if (a.length === 5) {\n            _context.drawImage(a0, a1, a2, a3, a4);\n        }\n        else if (a.length === 9) {\n            _context.drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8);\n        }\n    };\n    Context.prototype.ellipse = function (a0, a1, a2, a3, a4, a5, a6, a7) {\n        this._context.ellipse(a0, a1, a2, a3, a4, a5, a6, a7);\n    };\n    Context.prototype.isPointInPath = function (x, y) {\n        return this._context.isPointInPath(x, y);\n    };\n    Context.prototype.fill = function () {\n        this._context.fill();\n    };\n    Context.prototype.fillRect = function (x, y, width, height) {\n        this._context.fillRect(x, y, width, height);\n    };\n    Context.prototype.strokeRect = function (x, y, width, height) {\n        this._context.strokeRect(x, y, width, height);\n    };\n    Context.prototype.fillText = function (a0, a1, a2) {\n        this._context.fillText(a0, a1, a2);\n    };\n    Context.prototype.measureText = function (text) {\n        return this._context.measureText(text);\n    };\n    Context.prototype.getImageData = function (a0, a1, a2, a3) {\n        return this._context.getImageData(a0, a1, a2, a3);\n    };\n    Context.prototype.lineTo = function (a0, a1) {\n        this._context.lineTo(a0, a1);\n    };\n    Context.prototype.moveTo = function (a0, a1) {\n        this._context.moveTo(a0, a1);\n    };\n    Context.prototype.rect = function (a0, a1, a2, a3) {\n        this._context.rect(a0, a1, a2, a3);\n    };\n    Context.prototype.putImageData = function (a0, a1, a2) {\n        this._context.putImageData(a0, a1, a2);\n    };\n    Context.prototype.quadraticCurveTo = function (a0, a1, a2, a3) {\n        this._context.quadraticCurveTo(a0, a1, a2, a3);\n    };\n    Context.prototype.restore = function () {\n        this._context.restore();\n    };\n    Context.prototype.rotate = function (a0) {\n        this._context.rotate(a0);\n    };\n    Context.prototype.save = function () {\n        this._context.save();\n    };\n    Context.prototype.scale = function (a0, a1) {\n        this._context.scale(a0, a1);\n    };\n    Context.prototype.setLineDash = function (a0) {\n        if (this._context.setLineDash) {\n            this._context.setLineDash(a0);\n        }\n        else if ('mozDash' in this._context) {\n            this._context['mozDash'] = a0;\n        }\n        else if ('webkitLineDash' in this._context) {\n            this._context['webkitLineDash'] = a0;\n        }\n    };\n    Context.prototype.getLineDash = function () {\n        return this._context.getLineDash();\n    };\n    Context.prototype.setTransform = function (a0, a1, a2, a3, a4, a5) {\n        this._context.setTransform(a0, a1, a2, a3, a4, a5);\n    };\n    Context.prototype.stroke = function () {\n        this._context.stroke();\n    };\n    Context.prototype.strokeText = function (a0, a1, a2, a3) {\n        this._context.strokeText(a0, a1, a2, a3);\n    };\n    Context.prototype.transform = function (a0, a1, a2, a3, a4, a5) {\n        this._context.transform(a0, a1, a2, a3, a4, a5);\n    };\n    Context.prototype.translate = function (a0, a1) {\n        this._context.translate(a0, a1);\n    };\n    Context.prototype._enableTrace = function () {\n        var that = this, len = CONTEXT_METHODS.length, _simplifyArray = Util_1.Util._simplifyArray, origSetter = this.setAttr, n, args;\n        var func = function (methodName) {\n            var origMethod = that[methodName], ret;\n            that[methodName] = function () {\n                args = _simplifyArray(Array.prototype.slice.call(arguments, 0));\n                ret = origMethod.apply(that, arguments);\n                that._trace({\n                    method: methodName,\n                    args: args\n                });\n                return ret;\n            };\n        };\n        for (n = 0; n < len; n++) {\n            func(CONTEXT_METHODS[n]);\n        }\n        that.setAttr = function () {\n            origSetter.apply(that, arguments);\n            var prop = arguments[0];\n            var val = arguments[1];\n            if (prop === 'shadowOffsetX' ||\n                prop === 'shadowOffsetY' ||\n                prop === 'shadowBlur') {\n                val = val / this.canvas.getPixelRatio();\n            }\n            that._trace({\n                property: prop,\n                val: val\n            });\n        };\n    };\n    Context.prototype._applyGlobalCompositeOperation = function (node) {\n        var globalCompositeOperation = node.getGlobalCompositeOperation();\n        if (globalCompositeOperation !== 'source-over') {\n            this.setAttr('globalCompositeOperation', globalCompositeOperation);\n        }\n    };\n    return Context;\n}());\nexports.Context = Context;\nCONTEXT_PROPERTIES.forEach(function (prop) {\n    Object.defineProperty(Context.prototype, prop, {\n        get: function () {\n            return this._context[prop];\n        },\n        set: function (val) {\n            this._context[prop] = val;\n        }\n    });\n});\nvar SceneContext = (function (_super) {\n    __extends(SceneContext, _super);\n    function SceneContext() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    SceneContext.prototype._fillColor = function (shape) {\n        var fill = shape.fill();\n        this.setAttr('fillStyle', fill);\n        shape._fillFunc(this);\n    };\n    SceneContext.prototype._fillPattern = function (shape) {\n        var fillPatternX = shape.getFillPatternX(), fillPatternY = shape.getFillPatternY(), fillPatternRotation = Global_1.Konva.getAngle(shape.getFillPatternRotation()), fillPatternOffsetX = shape.getFillPatternOffsetX(), fillPatternOffsetY = shape.getFillPatternOffsetY(), fillPatternScaleX = shape.getFillPatternScaleX(), fillPatternScaleY = shape.getFillPatternScaleY();\n        if (fillPatternX || fillPatternY) {\n            this.translate(fillPatternX || 0, fillPatternY || 0);\n        }\n        if (fillPatternRotation) {\n            this.rotate(fillPatternRotation);\n        }\n        if (fillPatternScaleX || fillPatternScaleY) {\n            this.scale(fillPatternScaleX, fillPatternScaleY);\n        }\n        if (fillPatternOffsetX || fillPatternOffsetY) {\n            this.translate(-1 * fillPatternOffsetX, -1 * fillPatternOffsetY);\n        }\n        this.setAttr('fillStyle', shape._getFillPattern());\n        shape._fillFunc(this);\n    };\n    SceneContext.prototype._fillLinearGradient = function (shape) {\n        var grd = shape._getLinearGradient();\n        if (grd) {\n            this.setAttr('fillStyle', grd);\n            shape._fillFunc(this);\n        }\n    };\n    SceneContext.prototype._fillRadialGradient = function (shape) {\n        var grd = shape._getRadialGradient();\n        if (grd) {\n            this.setAttr('fillStyle', grd);\n            shape._fillFunc(this);\n        }\n    };\n    SceneContext.prototype._fill = function (shape) {\n        var hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n        if (hasColor && fillPriority === 'color') {\n            this._fillColor(shape);\n            return;\n        }\n        var hasPattern = shape.getFillPatternImage();\n        if (hasPattern && fillPriority === 'pattern') {\n            this._fillPattern(shape);\n            return;\n        }\n        var hasLinearGradient = shape.getFillLinearGradientColorStops();\n        if (hasLinearGradient && fillPriority === 'linear-gradient') {\n            this._fillLinearGradient(shape);\n            return;\n        }\n        var hasRadialGradient = shape.getFillRadialGradientColorStops();\n        if (hasRadialGradient && fillPriority === 'radial-gradient') {\n            this._fillRadialGradient(shape);\n            return;\n        }\n        if (hasColor) {\n            this._fillColor(shape);\n        }\n        else if (hasPattern) {\n            this._fillPattern(shape);\n        }\n        else if (hasLinearGradient) {\n            this._fillLinearGradient(shape);\n        }\n        else if (hasRadialGradient) {\n            this._fillRadialGradient(shape);\n        }\n    };\n    SceneContext.prototype._strokeLinearGradient = function (shape) {\n        var start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n        if (colorStops) {\n            for (var n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            this.setAttr('strokeStyle', grd);\n        }\n    };\n    SceneContext.prototype._stroke = function (shape) {\n        var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n        if (shape.hasStroke()) {\n            if (!strokeScaleEnabled) {\n                this.save();\n                var pixelRatio = this.getCanvas().getPixelRatio();\n                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n            }\n            this._applyLineCap(shape);\n            if (dash && shape.dashEnabled()) {\n                this.setLineDash(dash);\n                this.setAttr('lineDashOffset', shape.dashOffset());\n            }\n            this.setAttr('lineWidth', shape.strokeWidth());\n            if (!shape.getShadowForStrokeEnabled()) {\n                this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n            }\n            var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n            if (hasLinearGradient) {\n                this._strokeLinearGradient(shape);\n            }\n            else {\n                this.setAttr('strokeStyle', shape.stroke());\n            }\n            shape._strokeFunc(this);\n            if (!strokeScaleEnabled) {\n                this.restore();\n            }\n        }\n    };\n    SceneContext.prototype._applyShadow = function (shape) {\n        var util = Util_1.Util, color = util.get(shape.getShadowRGBA(), 'black'), blur = util.get(shape.getShadowBlur(), 5), offset = util.get(shape.getShadowOffset(), {\n            x: 0,\n            y: 0\n        }), scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n        this.setAttr('shadowColor', color);\n        this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n        this.setAttr('shadowOffsetX', offset.x * scaleX);\n        this.setAttr('shadowOffsetY', offset.y * scaleY);\n    };\n    return SceneContext;\n}(Context));\nexports.SceneContext = SceneContext;\nvar HitContext = (function (_super) {\n    __extends(HitContext, _super);\n    function HitContext() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    HitContext.prototype._fill = function (shape) {\n        this.save();\n        this.setAttr('fillStyle', shape.colorKey);\n        shape._fillFuncHit(this);\n        this.restore();\n    };\n    HitContext.prototype.strokeShape = function (shape) {\n        if (shape.hasHitStroke()) {\n            this._stroke(shape);\n        }\n    };\n    HitContext.prototype._stroke = function (shape) {\n        if (shape.hasHitStroke()) {\n            var strokeScaleEnabled = shape.getStrokeScaleEnabled();\n            if (!strokeScaleEnabled) {\n                this.save();\n                var pixelRatio = this.getCanvas().getPixelRatio();\n                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n            }\n            this._applyLineCap(shape);\n            var hitStrokeWidth = shape.hitStrokeWidth();\n            var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n            this.setAttr('lineWidth', strokeWidth);\n            this.setAttr('strokeStyle', shape.colorKey);\n            shape._strokeFuncHit(this);\n            if (!strokeScaleEnabled) {\n                this.restore();\n            }\n        }\n    };\n    return HitContext;\n}(Context));\nexports.HitContext = HitContext;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Context.js?");

/***/ }),

/***/ "./node_modules/konva/lib/DragAndDrop.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/DragAndDrop.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nexports.DD = {\n    get isDragging() {\n        var flag = false;\n        exports.DD._dragElements.forEach(function (elem) {\n            if (elem.dragStatus === 'dragging') {\n                flag = true;\n            }\n        });\n        return flag;\n    },\n    justDragged: false,\n    get node() {\n        var node;\n        exports.DD._dragElements.forEach(function (elem) {\n            node = elem.node;\n        });\n        return node;\n    },\n    _dragElements: new Map(),\n    _drag: function (evt) {\n        exports.DD._dragElements.forEach(function (elem, key) {\n            var node = elem.node;\n            var stage = node.getStage();\n            stage.setPointersPositions(evt);\n            if (elem.pointerId === undefined) {\n                elem.pointerId = Util_1.Util._getFirstPointerId(evt);\n            }\n            var pos = stage._changedPointerPositions.find(function (pos) { return pos.id === elem.pointerId; });\n            if (!pos) {\n                return;\n            }\n            if (elem.dragStatus !== 'dragging') {\n                var dragDistance = node.dragDistance();\n                var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n                if (distance < dragDistance) {\n                    return;\n                }\n                node.startDrag({ evt: evt });\n                if (!node.isDragging()) {\n                    return;\n                }\n            }\n            node._setDragPosition(evt, elem);\n            node.fire('dragmove', {\n                type: 'dragmove',\n                target: node,\n                evt: evt\n            }, true);\n        });\n    },\n    _endDragBefore: function (evt) {\n        exports.DD._dragElements.forEach(function (elem, key) {\n            var node = elem.node;\n            var stage = node.getStage();\n            if (evt) {\n                stage.setPointersPositions(evt);\n            }\n            var pos = stage._changedPointerPositions.find(function (pos) { return pos.id === elem.pointerId; });\n            if (!pos) {\n                return;\n            }\n            if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n                exports.DD.justDragged = true;\n                Global_1.Konva.listenClickTap = false;\n                elem.dragStatus = 'stopped';\n            }\n            var drawNode = elem.node.getLayer() ||\n                (elem.node instanceof Global_1.Konva['Stage'] && elem.node);\n            if (drawNode) {\n                drawNode.draw();\n            }\n        });\n    },\n    _endDragAfter: function (evt) {\n        exports.DD._dragElements.forEach(function (elem, key) {\n            if (elem.dragStatus === 'stopped') {\n                elem.node.fire('dragend', {\n                    type: 'dragend',\n                    target: elem.node,\n                    evt: evt\n                }, true);\n            }\n            if (elem.dragStatus !== 'dragging') {\n                exports.DD._dragElements.delete(key);\n            }\n        });\n    }\n};\nif (Global_1.Konva.isBrowser) {\n    window.addEventListener('mouseup', exports.DD._endDragBefore, true);\n    window.addEventListener('touchend', exports.DD._endDragBefore, true);\n    window.addEventListener('mousemove', exports.DD._drag);\n    window.addEventListener('touchmove', exports.DD._drag);\n    window.addEventListener('mouseup', exports.DD._endDragAfter, false);\n    window.addEventListener('touchend', exports.DD._endDragAfter, false);\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/DragAndDrop.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Factory.js":
/*!*******************************************!*\
  !*** ./node_modules/konva/lib/Factory.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar GET = 'get', SET = 'set';\nexports.Factory = {\n    addGetterSetter: function (constructor, attr, def, validator, after) {\n        this.addGetter(constructor, attr, def);\n        this.addSetter(constructor, attr, validator, after);\n        this.addOverloadedGetterSetter(constructor, attr);\n    },\n    addGetter: function (constructor, attr, def) {\n        var method = GET + Util_1.Util._capitalize(attr);\n        constructor.prototype[method] =\n            constructor.prototype[method] ||\n                function () {\n                    var val = this.attrs[attr];\n                    return val === undefined ? def : val;\n                };\n    },\n    addSetter: function (constructor, attr, validator, after) {\n        var method = SET + Util_1.Util._capitalize(attr);\n        if (!constructor.prototype[method]) {\n            exports.Factory.overWriteSetter(constructor, attr, validator, after);\n        }\n    },\n    overWriteSetter: function (constructor, attr, validator, after) {\n        var method = SET + Util_1.Util._capitalize(attr);\n        constructor.prototype[method] = function (val) {\n            if (validator && val !== undefined && val !== null) {\n                val = validator.call(this, val, attr);\n            }\n            this._setAttr(attr, val);\n            if (after) {\n                after.call(this);\n            }\n            return this;\n        };\n    },\n    addComponentsGetterSetter: function (constructor, attr, components, validator, after) {\n        var len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;\n        constructor.prototype[getter] = function () {\n            var ret = {};\n            for (n = 0; n < len; n++) {\n                component = components[n];\n                ret[component] = this.getAttr(attr + capitalize(component));\n            }\n            return ret;\n        };\n        var basicValidator = Validators_1.getComponentValidator(components);\n        constructor.prototype[setter] = function (val) {\n            var oldVal = this.attrs[attr], key;\n            if (validator) {\n                val = validator.call(this, val);\n            }\n            if (basicValidator) {\n                basicValidator.call(this, val, attr);\n            }\n            for (key in val) {\n                if (!val.hasOwnProperty(key)) {\n                    continue;\n                }\n                this._setAttr(attr + capitalize(key), val[key]);\n            }\n            this._fireChangeEvent(attr, oldVal, val);\n            if (after) {\n                after.call(this);\n            }\n            return this;\n        };\n        this.addOverloadedGetterSetter(constructor, attr);\n    },\n    addOverloadedGetterSetter: function (constructor, attr) {\n        var capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;\n        constructor.prototype[attr] = function () {\n            if (arguments.length) {\n                this[setter](arguments[0]);\n                return this;\n            }\n            return this[getter]();\n        };\n    },\n    addDeprecatedGetterSetter: function (constructor, attr, def, validator) {\n        Util_1.Util.error('Adding deprecated ' + attr);\n        var method = GET + Util_1.Util._capitalize(attr);\n        var message = attr +\n            ' property is deprecated and will be removed soon. Look at Konva change log for more information.';\n        constructor.prototype[method] = function () {\n            Util_1.Util.error(message);\n            var val = this.attrs[attr];\n            return val === undefined ? def : val;\n        };\n        this.addSetter(constructor, attr, validator, function () {\n            Util_1.Util.error(message);\n        });\n        this.addOverloadedGetterSetter(constructor, attr);\n    },\n    backCompat: function (constructor, methods) {\n        Util_1.Util.each(methods, function (oldMethodName, newMethodName) {\n            var method = constructor.prototype[newMethodName];\n            var oldGetter = GET + Util_1.Util._capitalize(oldMethodName);\n            var oldSetter = SET + Util_1.Util._capitalize(oldMethodName);\n            function deprecated() {\n                method.apply(this, arguments);\n                Util_1.Util.error('\"' +\n                    oldMethodName +\n                    '\" method is deprecated and will be removed soon. Use \"\"' +\n                    newMethodName +\n                    '\" instead.');\n            }\n            constructor.prototype[oldMethodName] = deprecated;\n            constructor.prototype[oldGetter] = deprecated;\n            constructor.prototype[oldSetter] = deprecated;\n        });\n    },\n    afterSetFilter: function () {\n        this._filterUpToDate = false;\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Factory.js?");

/***/ }),

/***/ "./node_modules/konva/lib/FastLayer.js":
/*!*********************************************!*\
  !*** ./node_modules/konva/lib/FastLayer.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar BaseLayer_1 = __webpack_require__(/*! ./BaseLayer */ \"./node_modules/konva/lib/BaseLayer.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar FastLayer = (function (_super) {\n    __extends(FastLayer, _super);\n    function FastLayer() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    FastLayer.prototype._validateAdd = function (child) {\n        var type = child.getType();\n        if (type !== 'Shape') {\n            Util_1.Util.throw('You may only add shapes to a fast layer.');\n        }\n    };\n    FastLayer.prototype.hitGraphEnabled = function () {\n        return false;\n    };\n    FastLayer.prototype.drawScene = function (can) {\n        var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n        if (this.clearBeforeDraw()) {\n            canvas.getContext().clear();\n        }\n        Container_1.Container.prototype.drawScene.call(this, canvas);\n        return this;\n    };\n    FastLayer.prototype.draw = function () {\n        this.drawScene();\n        return this;\n    };\n    return FastLayer;\n}(BaseLayer_1.BaseLayer));\nexports.FastLayer = FastLayer;\nFastLayer.prototype.nodeType = 'FastLayer';\nGlobal_1._registerNode(FastLayer);\nUtil_1.Collection.mapMethods(FastLayer);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/FastLayer.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Global.js":
/*!******************************************!*\
  !*** ./node_modules/konva/lib/Global.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(global) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PI_OVER_180 = Math.PI / 180;\nfunction detectBrowser() {\n    return (typeof window !== 'undefined' &&\n        ({}.toString.call(window) === '[object Window]' ||\n            {}.toString.call(window) === '[object global]'));\n}\nvar _detectIE = function (ua) {\n    var msie = ua.indexOf('msie ');\n    if (msie > 0) {\n        return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n    }\n    var trident = ua.indexOf('trident/');\n    if (trident > 0) {\n        var rv = ua.indexOf('rv:');\n        return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n    }\n    var edge = ua.indexOf('edge/');\n    if (edge > 0) {\n        return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n    }\n    return false;\n};\nexports._parseUA = function (userAgent) {\n    var ua = userAgent.toLowerCase(), match = /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n        /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n        /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n        /(msie) ([\\w.]+)/.exec(ua) ||\n        (ua.indexOf('compatible') < 0 &&\n            /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua)) ||\n        [], mobile = !!userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i), ieMobile = !!userAgent.match(/IEMobile/i);\n    return {\n        browser: match[1] || '',\n        version: match[2] || '0',\n        isIE: _detectIE(ua),\n        mobile: mobile,\n        ieMobile: ieMobile\n    };\n};\nexports.glob = typeof global !== 'undefined'\n    ? global\n    : typeof window !== 'undefined'\n        ? window\n        : typeof WorkerGlobalScope !== 'undefined'\n            ? self\n            : {};\nexports.Konva = {\n    _global: exports.glob,\n    version: '6.0.0',\n    isBrowser: detectBrowser(),\n    isUnminified: /param/.test(function (param) { }.toString()),\n    dblClickWindow: 400,\n    getAngle: function (angle) {\n        return exports.Konva.angleDeg ? angle * PI_OVER_180 : angle;\n    },\n    enableTrace: false,\n    _pointerEventsEnabled: false,\n    hitOnDragEnabled: false,\n    captureTouchEventsEnabled: false,\n    listenClickTap: false,\n    inDblClickWindow: false,\n    pixelRatio: undefined,\n    dragDistance: 3,\n    angleDeg: true,\n    showWarnings: true,\n    dragButtons: [0, 1],\n    isDragging: function () {\n        return exports.Konva['DD'].isDragging;\n    },\n    isDragReady: function () {\n        return !!exports.Konva['DD'].node;\n    },\n    UA: exports._parseUA((exports.glob.navigator && exports.glob.navigator.userAgent) || ''),\n    document: exports.glob.document,\n    _injectGlobal: function (Konva) {\n        exports.glob.Konva = Konva;\n    },\n    _parseUA: exports._parseUA\n};\nexports._NODES_REGISTRY = {};\nexports._registerNode = function (NodeClass) {\n    exports._NODES_REGISTRY[NodeClass.prototype.getClassName()] = NodeClass;\n    exports.Konva[NodeClass.prototype.getClassName()] = NodeClass;\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Global.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Group.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/Group.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Group = (function (_super) {\n    __extends(Group, _super);\n    function Group() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Group.prototype._validateAdd = function (child) {\n        var type = child.getType();\n        if (type !== 'Group' && type !== 'Shape') {\n            Util_1.Util.throw('You may only add groups and shapes to groups.');\n        }\n    };\n    return Group;\n}(Container_1.Container));\nexports.Group = Group;\nGroup.prototype.nodeType = 'Group';\nGlobal_1._registerNode(Group);\nUtil_1.Collection.mapMethods(Group);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Group.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Layer.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/Layer.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar BaseLayer_1 = __webpack_require__(/*! ./BaseLayer */ \"./node_modules/konva/lib/BaseLayer.js\");\nvar Canvas_1 = __webpack_require__(/*! ./Canvas */ \"./node_modules/konva/lib/Canvas.js\");\nvar Shape_1 = __webpack_require__(/*! ./Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n    { x: 0, y: 0 },\n    { x: -1, y: -1 },\n    { x: 1, y: -1 },\n    { x: 1, y: 1 },\n    { x: -1, y: 1 }\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nvar Layer = (function (_super) {\n    __extends(Layer, _super);\n    function Layer() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.hitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: 1\n        });\n        return _this;\n    }\n    Layer.prototype.setSize = function (_a) {\n        var width = _a.width, height = _a.height;\n        _super.prototype.setSize.call(this, { width: width, height: height });\n        this.hitCanvas.setSize(width, height);\n        return this;\n    };\n    Layer.prototype._validateAdd = function (child) {\n        var type = child.getType();\n        if (type !== 'Group' && type !== 'Shape') {\n            Util_1.Util.throw('You may only add groups and shapes to a layer.');\n        }\n    };\n    Layer.prototype.getIntersection = function (pos, selector) {\n        var obj, i, intersectionOffset, shape;\n        if (!this.hitGraphEnabled() || !this.isVisible()) {\n            return null;\n        }\n        var spiralSearchDistance = 1;\n        var continueSearch = false;\n        while (true) {\n            for (i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n                intersectionOffset = INTERSECTION_OFFSETS[i];\n                obj = this._getIntersection({\n                    x: pos.x + intersectionOffset.x * spiralSearchDistance,\n                    y: pos.y + intersectionOffset.y * spiralSearchDistance\n                });\n                shape = obj.shape;\n                if (shape && selector) {\n                    return shape.findAncestor(selector, true);\n                }\n                else if (shape) {\n                    return shape;\n                }\n                continueSearch = !!obj.antialiased;\n                if (!obj.antialiased) {\n                    break;\n                }\n            }\n            if (continueSearch) {\n                spiralSearchDistance += 1;\n            }\n            else {\n                return null;\n            }\n        }\n    };\n    Layer.prototype._getIntersection = function (pos) {\n        var ratio = this.hitCanvas.pixelRatio;\n        var p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data, p3 = p[3], colorKey, shape;\n        if (p3 === 255) {\n            colorKey = Util_1.Util._rgbToHex(p[0], p[1], p[2]);\n            shape = Shape_1.shapes[HASH + colorKey];\n            if (shape) {\n                return {\n                    shape: shape\n                };\n            }\n            return {\n                antialiased: true\n            };\n        }\n        else if (p3 > 0) {\n            return {\n                antialiased: true\n            };\n        }\n        return {};\n    };\n    Layer.prototype.drawScene = function (can, top) {\n        var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n        this._fire(BEFORE_DRAW, {\n            node: this\n        });\n        if (this.clearBeforeDraw()) {\n            canvas.getContext().clear();\n        }\n        Container_1.Container.prototype.drawScene.call(this, canvas, top);\n        this._fire(DRAW, {\n            node: this\n        });\n        return this;\n    };\n    Layer.prototype.drawHit = function (can, top) {\n        var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n        if (layer && layer.clearBeforeDraw()) {\n            layer\n                .getHitCanvas()\n                .getContext()\n                .clear();\n        }\n        Container_1.Container.prototype.drawHit.call(this, canvas, top);\n        return this;\n    };\n    Layer.prototype.clear = function (bounds) {\n        BaseLayer_1.BaseLayer.prototype.clear.call(this, bounds);\n        this.getHitCanvas()\n            .getContext()\n            .clear(bounds);\n        return this;\n    };\n    Layer.prototype.enableHitGraph = function () {\n        this.hitGraphEnabled(true);\n        return this;\n    };\n    Layer.prototype.disableHitGraph = function () {\n        this.hitGraphEnabled(false);\n        return this;\n    };\n    Layer.prototype.toggleHitCanvas = function () {\n        if (!this.parent) {\n            return;\n        }\n        var parent = this.parent;\n        var added = !!this.hitCanvas._canvas.parentNode;\n        if (added) {\n            parent.content.removeChild(this.hitCanvas._canvas);\n        }\n        else {\n            parent.content.appendChild(this.hitCanvas._canvas);\n        }\n    };\n    return Layer;\n}(BaseLayer_1.BaseLayer));\nexports.Layer = Layer;\nLayer.prototype.nodeType = 'Layer';\nGlobal_1._registerNode(Layer);\nFactory_1.Factory.addGetterSetter(Layer, 'hitGraphEnabled', true, Validators_1.getBooleanValidator());\nUtil_1.Collection.mapMethods(Layer);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Layer.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Node.js":
/*!****************************************!*\
  !*** ./node_modules/konva/lib/Node.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Canvas_1 = __webpack_require__(/*! ./Canvas */ \"./node_modules/konva/lib/Canvas.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar DragAndDrop_1 = __webpack_require__(/*! ./DragAndDrop */ \"./node_modules/konva/lib/DragAndDrop.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.ids = {};\nexports.names = {};\nvar _addId = function (node, id) {\n    if (!id) {\n        return;\n    }\n    exports.ids[id] = node;\n};\nexports._removeId = function (id, node) {\n    if (!id) {\n        return;\n    }\n    if (exports.ids[id] !== node) {\n        return;\n    }\n    delete exports.ids[id];\n};\nexports._addName = function (node, name) {\n    if (name) {\n        if (!exports.names[name]) {\n            exports.names[name] = [];\n        }\n        exports.names[name].push(node);\n    }\n};\nexports._removeName = function (name, _id) {\n    if (!name) {\n        return;\n    }\n    var nodes = exports.names[name];\n    if (!nodes) {\n        return;\n    }\n    for (var n = 0; n < nodes.length; n++) {\n        var no = nodes[n];\n        if (no._id === _id) {\n            nodes.splice(n, 1);\n        }\n    }\n    if (nodes.length === 0) {\n        delete exports.names[name];\n    }\n};\nvar ABSOLUTE_OPACITY = 'absoluteOpacity', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [\n    'xChange.konva',\n    'yChange.konva',\n    'scaleXChange.konva',\n    'scaleYChange.konva',\n    'skewXChange.konva',\n    'skewYChange.konva',\n    'rotationChange.konva',\n    'offsetXChange.konva',\n    'offsetYChange.konva',\n    'transformsEnabledChange.konva',\n].join(SPACE), SCALE_CHANGE_STR = ['scaleXChange.konva', 'scaleYChange.konva'].join(SPACE);\nvar emptyChildren = new Util_1.Collection();\nvar idCounter = 1;\nvar Node = (function () {\n    function Node(config) {\n        var _this = this;\n        this._id = idCounter++;\n        this.eventListeners = {};\n        this.attrs = {};\n        this.index = 0;\n        this.parent = null;\n        this._cache = new Map();\n        this._lastPos = null;\n        this._batchingTransformChange = false;\n        this._needClearTransformCache = false;\n        this._filterUpToDate = false;\n        this._isUnderCache = false;\n        this.children = emptyChildren;\n        this._dragEventId = null;\n        this.setAttrs(config);\n        this.on(TRANSFORM_CHANGE_STR, function () {\n            if (_this._batchingTransformChange) {\n                _this._needClearTransformCache = true;\n                return;\n            }\n            _this._clearCache(TRANSFORM);\n            _this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n        });\n        this.on('visibleChange.konva', function () {\n            _this._clearSelfAndDescendantCache(VISIBLE);\n        });\n        this.on('listeningChange.konva', function () {\n            _this._clearSelfAndDescendantCache(LISTENING);\n        });\n        this.on('opacityChange.konva', function () {\n            _this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n        });\n    }\n    Node.prototype.hasChildren = function () {\n        return false;\n    };\n    Node.prototype.getChildren = function () {\n        return emptyChildren;\n    };\n    Node.prototype._clearCache = function (attr) {\n        if (attr) {\n            this._cache.delete(attr);\n        }\n        else {\n            this._cache.clear();\n        }\n    };\n    Node.prototype._getCache = function (attr, privateGetter) {\n        var cache = this._cache.get(attr);\n        if (cache === undefined) {\n            cache = privateGetter.call(this);\n            this._cache.set(attr, cache);\n        }\n        return cache;\n    };\n    Node.prototype._getCanvasCache = function () {\n        return this._cache.get(CANVAS);\n    };\n    Node.prototype._clearSelfAndDescendantCache = function (attr, forceEvent) {\n        this._clearCache(attr);\n        if (forceEvent && attr === ABSOLUTE_TRANSFORM) {\n            this.fire('_clearTransformCache');\n        }\n        if (this.isCached()) {\n            return;\n        }\n        if (this.children) {\n            this.children.each(function (node) {\n                node._clearSelfAndDescendantCache(attr, true);\n            });\n        }\n    };\n    Node.prototype.clearCache = function () {\n        this._cache.delete(CANVAS);\n        this._clearSelfAndDescendantCache();\n        return this;\n    };\n    Node.prototype.cache = function (config) {\n        var conf = config || {};\n        var rect = {};\n        if (conf.x === undefined ||\n            conf.y === undefined ||\n            conf.width === undefined ||\n            conf.height === undefined) {\n            rect = this.getClientRect({\n                skipTransform: true,\n                relativeTo: this.getParent(),\n            });\n        }\n        var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? rect.x : conf.x, y = conf.y === undefined ? rect.y : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false;\n        if (!width || !height) {\n            Util_1.Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');\n            return;\n        }\n        width += offset * 2;\n        height += offset * 2;\n        x -= offset;\n        y -= offset;\n        var cachedSceneCanvas = new Canvas_1.SceneCanvas({\n            pixelRatio: pixelRatio,\n            width: width,\n            height: height,\n        }), cachedFilterCanvas = new Canvas_1.SceneCanvas({\n            pixelRatio: pixelRatio,\n            width: 0,\n            height: 0,\n        }), cachedHitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: 1,\n            width: width,\n            height: height,\n        }), sceneContext = cachedSceneCanvas.getContext(), hitContext = cachedHitCanvas.getContext();\n        cachedHitCanvas.isCache = true;\n        this._cache.delete('canvas');\n        this._filterUpToDate = false;\n        if (conf.imageSmoothingEnabled === false) {\n            cachedSceneCanvas.getContext()._context.imageSmoothingEnabled = false;\n            cachedFilterCanvas.getContext()._context.imageSmoothingEnabled = false;\n        }\n        sceneContext.save();\n        hitContext.save();\n        sceneContext.translate(-x, -y);\n        hitContext.translate(-x, -y);\n        this._isUnderCache = true;\n        this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n        this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n        this.drawScene(cachedSceneCanvas, this, true);\n        this.drawHit(cachedHitCanvas, this, true);\n        this._isUnderCache = false;\n        sceneContext.restore();\n        hitContext.restore();\n        if (drawBorder) {\n            sceneContext.save();\n            sceneContext.beginPath();\n            sceneContext.rect(0, 0, width, height);\n            sceneContext.closePath();\n            sceneContext.setAttr('strokeStyle', 'red');\n            sceneContext.setAttr('lineWidth', 5);\n            sceneContext.stroke();\n            sceneContext.restore();\n        }\n        this._cache.set(CANVAS, {\n            scene: cachedSceneCanvas,\n            filter: cachedFilterCanvas,\n            hit: cachedHitCanvas,\n            x: x,\n            y: y,\n        });\n        return this;\n    };\n    Node.prototype.isCached = function () {\n        return this._cache.has('canvas');\n    };\n    Node.prototype.getClientRect = function (config) {\n        throw new Error('abstract \"getClientRect\" method call');\n    };\n    Node.prototype._transformedRect = function (rect, top) {\n        var points = [\n            { x: rect.x, y: rect.y },\n            { x: rect.x + rect.width, y: rect.y },\n            { x: rect.x + rect.width, y: rect.y + rect.height },\n            { x: rect.x, y: rect.y + rect.height },\n        ];\n        var minX, minY, maxX, maxY;\n        var trans = this.getAbsoluteTransform(top);\n        points.forEach(function (point) {\n            var transformed = trans.point(point);\n            if (minX === undefined) {\n                minX = maxX = transformed.x;\n                minY = maxY = transformed.y;\n            }\n            minX = Math.min(minX, transformed.x);\n            minY = Math.min(minY, transformed.y);\n            maxX = Math.max(maxX, transformed.x);\n            maxY = Math.max(maxY, transformed.y);\n        });\n        return {\n            x: minX,\n            y: minY,\n            width: maxX - minX,\n            height: maxY - minY,\n        };\n    };\n    Node.prototype._drawCachedSceneCanvas = function (context) {\n        context.save();\n        context._applyOpacity(this);\n        context._applyGlobalCompositeOperation(this);\n        var canvasCache = this._getCanvasCache();\n        context.translate(canvasCache.x, canvasCache.y);\n        var cacheCanvas = this._getCachedSceneCanvas();\n        var ratio = cacheCanvas.pixelRatio;\n        context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);\n        context.restore();\n    };\n    Node.prototype._drawCachedHitCanvas = function (context) {\n        var canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;\n        context.save();\n        context.translate(canvasCache.x, canvasCache.y);\n        context.drawImage(hitCanvas._canvas, 0, 0);\n        context.restore();\n    };\n    Node.prototype._getCachedSceneCanvas = function () {\n        var filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;\n        if (filters) {\n            if (!this._filterUpToDate) {\n                var ratio = sceneCanvas.pixelRatio;\n                filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);\n                try {\n                    len = filters.length;\n                    filterContext.clear();\n                    filterContext.drawImage(sceneCanvas._canvas, 0, 0, sceneCanvas.getWidth() / ratio, sceneCanvas.getHeight() / ratio);\n                    imageData = filterContext.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());\n                    for (n = 0; n < len; n++) {\n                        filter = filters[n];\n                        if (typeof filter !== 'function') {\n                            Util_1.Util.error('Filter should be type of function, but got ' +\n                                typeof filter +\n                                ' instead. Please check correct filters');\n                            continue;\n                        }\n                        filter.call(this, imageData);\n                        filterContext.putImageData(imageData, 0, 0);\n                    }\n                }\n                catch (e) {\n                    Util_1.Util.error('Unable to apply filter. ' +\n                        e.message +\n                        ' This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n                }\n                this._filterUpToDate = true;\n            }\n            return filterCanvas;\n        }\n        return sceneCanvas;\n    };\n    Node.prototype.on = function (evtStr, handler) {\n        if (arguments.length === 3) {\n            return this._delegate.apply(this, arguments);\n        }\n        var events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;\n        for (n = 0; n < len; n++) {\n            event = events[n];\n            parts = event.split('.');\n            baseEvent = parts[0];\n            name = parts[1] || '';\n            if (!this.eventListeners[baseEvent]) {\n                this.eventListeners[baseEvent] = [];\n            }\n            this.eventListeners[baseEvent].push({\n                name: name,\n                handler: handler,\n            });\n        }\n        return this;\n    };\n    Node.prototype.off = function (evtStr, callback) {\n        var events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;\n        if (!evtStr) {\n            for (t in this.eventListeners) {\n                this._off(t);\n            }\n        }\n        for (n = 0; n < len; n++) {\n            event = events[n];\n            parts = event.split('.');\n            baseEvent = parts[0];\n            name = parts[1];\n            if (baseEvent) {\n                if (this.eventListeners[baseEvent]) {\n                    this._off(baseEvent, name, callback);\n                }\n            }\n            else {\n                for (t in this.eventListeners) {\n                    this._off(t, name, callback);\n                }\n            }\n        }\n        return this;\n    };\n    Node.prototype.dispatchEvent = function (evt) {\n        var e = {\n            target: this,\n            type: evt.type,\n            evt: evt,\n        };\n        this.fire(evt.type, e);\n        return this;\n    };\n    Node.prototype.addEventListener = function (type, handler) {\n        this.on(type, function (evt) {\n            handler.call(this, evt.evt);\n        });\n        return this;\n    };\n    Node.prototype.removeEventListener = function (type) {\n        this.off(type);\n        return this;\n    };\n    Node.prototype._delegate = function (event, selector, handler) {\n        var stopNode = this;\n        this.on(event, function (evt) {\n            var targets = evt.target.findAncestors(selector, true, stopNode);\n            for (var i = 0; i < targets.length; i++) {\n                evt = Util_1.Util.cloneObject(evt);\n                evt.currentTarget = targets[i];\n                handler.call(targets[i], evt);\n            }\n        });\n    };\n    Node.prototype.remove = function () {\n        if (this.isDragging()) {\n            this.stopDrag();\n        }\n        DragAndDrop_1.DD._dragElements.delete(this._id);\n        this._remove();\n        return this;\n    };\n    Node.prototype._clearCaches = function () {\n        this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n        this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n        this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n        this._clearSelfAndDescendantCache(STAGE);\n        this._clearSelfAndDescendantCache(VISIBLE);\n        this._clearSelfAndDescendantCache(LISTENING);\n    };\n    Node.prototype._remove = function () {\n        this._clearCaches();\n        var parent = this.getParent();\n        if (parent && parent.children) {\n            parent.children.splice(this.index, 1);\n            parent._setChildrenIndices();\n            this.parent = null;\n        }\n    };\n    Node.prototype.destroy = function () {\n        exports._removeId(this.id(), this);\n        var names = (this.name() || '').split(/\\s/g);\n        for (var i = 0; i < names.length; i++) {\n            var subname = names[i];\n            exports._removeName(subname, this._id);\n        }\n        this.remove();\n        return this;\n    };\n    Node.prototype.getAttr = function (attr) {\n        var method = 'get' + Util_1.Util._capitalize(attr);\n        if (Util_1.Util._isFunction(this[method])) {\n            return this[method]();\n        }\n        return this.attrs[attr];\n    };\n    Node.prototype.getAncestors = function () {\n        var parent = this.getParent(), ancestors = new Util_1.Collection();\n        while (parent) {\n            ancestors.push(parent);\n            parent = parent.getParent();\n        }\n        return ancestors;\n    };\n    Node.prototype.getAttrs = function () {\n        return this.attrs || {};\n    };\n    Node.prototype.setAttrs = function (config) {\n        var key, method;\n        if (!config) {\n            return this;\n        }\n        for (key in config) {\n            if (key === CHILDREN) {\n                continue;\n            }\n            method = SET + Util_1.Util._capitalize(key);\n            if (Util_1.Util._isFunction(this[method])) {\n                this[method](config[key]);\n            }\n            else {\n                this._setAttr(key, config[key]);\n            }\n        }\n        return this;\n    };\n    Node.prototype.isListening = function () {\n        return this._getCache(LISTENING, this._isListening);\n    };\n    Node.prototype._isListening = function () {\n        var listening = this.listening(), parent = this.getParent();\n        if (listening === 'inherit') {\n            if (parent) {\n                return parent.isListening();\n            }\n            else {\n                return true;\n            }\n        }\n        else {\n            return listening;\n        }\n    };\n    Node.prototype.isVisible = function () {\n        return this._getCache(VISIBLE, this._isVisible);\n    };\n    Node.prototype._isVisible = function (relativeTo) {\n        var visible = this.visible(), parent = this.getParent();\n        if (visible === 'inherit') {\n            if (parent && parent !== relativeTo) {\n                return parent._isVisible(relativeTo);\n            }\n            else {\n                return true;\n            }\n        }\n        else if (relativeTo && relativeTo !== parent) {\n            return visible && parent._isVisible(relativeTo);\n        }\n        else {\n            return visible;\n        }\n    };\n    Node.prototype.shouldDrawHit = function () {\n        var layer = this.getLayer();\n        return ((!layer && this.isListening() && this.isVisible()) ||\n            (layer &&\n                layer.hitGraphEnabled() &&\n                this.isListening() &&\n                this.isVisible()));\n    };\n    Node.prototype.show = function () {\n        this.visible(true);\n        return this;\n    };\n    Node.prototype.hide = function () {\n        this.visible(false);\n        return this;\n    };\n    Node.prototype.getZIndex = function () {\n        return this.index || 0;\n    };\n    Node.prototype.getAbsoluteZIndex = function () {\n        var depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;\n        function addChildren(children) {\n            nodes = [];\n            len = children.length;\n            for (n = 0; n < len; n++) {\n                child = children[n];\n                index++;\n                if (child.nodeType !== SHAPE) {\n                    nodes = nodes.concat(child.getChildren().toArray());\n                }\n                if (child._id === that._id) {\n                    n = len;\n                }\n            }\n            if (nodes.length > 0 && nodes[0].getDepth() <= depth) {\n                addChildren(nodes);\n            }\n        }\n        if (that.nodeType !== UPPER_STAGE) {\n            addChildren(that.getStage().getChildren());\n        }\n        return index;\n    };\n    Node.prototype.getDepth = function () {\n        var depth = 0, parent = this.parent;\n        while (parent) {\n            depth++;\n            parent = parent.parent;\n        }\n        return depth;\n    };\n    Node.prototype._batchTransformChanges = function (func) {\n        this._batchingTransformChange = true;\n        func();\n        this._batchingTransformChange = false;\n        if (this._needClearTransformCache) {\n            this._clearCache(TRANSFORM);\n            this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM, true);\n        }\n        this._needClearTransformCache = false;\n    };\n    Node.prototype.setPosition = function (pos) {\n        var _this = this;\n        this._batchTransformChanges(function () {\n            _this.x(pos.x);\n            _this.y(pos.y);\n        });\n        return this;\n    };\n    Node.prototype.getPosition = function () {\n        return {\n            x: this.x(),\n            y: this.y(),\n        };\n    };\n    Node.prototype.getAbsolutePosition = function (top) {\n        var haveCachedParent = false;\n        var parent = this.parent;\n        while (parent) {\n            if (parent.isCached()) {\n                haveCachedParent = true;\n                break;\n            }\n            parent = parent.parent;\n        }\n        if (haveCachedParent && !top) {\n            top = true;\n        }\n        var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Util_1.Transform(), offset = this.offset();\n        absoluteTransform.m = absoluteMatrix.slice();\n        absoluteTransform.translate(offset.x, offset.y);\n        return absoluteTransform.getTranslation();\n    };\n    Node.prototype.setAbsolutePosition = function (pos) {\n        var origTrans = this._clearTransform(), it;\n        this.attrs.x = origTrans.x;\n        this.attrs.y = origTrans.y;\n        delete origTrans.x;\n        delete origTrans.y;\n        this._clearCache(TRANSFORM);\n        it = this._getAbsoluteTransform();\n        it.invert();\n        it.translate(pos.x, pos.y);\n        pos = {\n            x: this.attrs.x + it.getTranslation().x,\n            y: this.attrs.y + it.getTranslation().y,\n        };\n        this._setTransform(origTrans);\n        this.setPosition({ x: pos.x, y: pos.y });\n        return this;\n    };\n    Node.prototype._setTransform = function (trans) {\n        var key;\n        for (key in trans) {\n            this.attrs[key] = trans[key];\n        }\n    };\n    Node.prototype._clearTransform = function () {\n        var trans = {\n            x: this.x(),\n            y: this.y(),\n            rotation: this.rotation(),\n            scaleX: this.scaleX(),\n            scaleY: this.scaleY(),\n            offsetX: this.offsetX(),\n            offsetY: this.offsetY(),\n            skewX: this.skewX(),\n            skewY: this.skewY(),\n        };\n        this.attrs.x = 0;\n        this.attrs.y = 0;\n        this.attrs.rotation = 0;\n        this.attrs.scaleX = 1;\n        this.attrs.scaleY = 1;\n        this.attrs.offsetX = 0;\n        this.attrs.offsetY = 0;\n        this.attrs.skewX = 0;\n        this.attrs.skewY = 0;\n        return trans;\n    };\n    Node.prototype.move = function (change) {\n        var changeX = change.x, changeY = change.y, x = this.x(), y = this.y();\n        if (changeX !== undefined) {\n            x += changeX;\n        }\n        if (changeY !== undefined) {\n            y += changeY;\n        }\n        this.setPosition({ x: x, y: y });\n        return this;\n    };\n    Node.prototype._eachAncestorReverse = function (func, top) {\n        var family = [], parent = this.getParent(), len, n;\n        if (top && top._id === this._id) {\n            func(this);\n            return;\n        }\n        family.unshift(this);\n        while (parent && (!top || parent._id !== top._id)) {\n            family.unshift(parent);\n            parent = parent.parent;\n        }\n        len = family.length;\n        for (n = 0; n < len; n++) {\n            func(family[n]);\n        }\n    };\n    Node.prototype.rotate = function (theta) {\n        this.rotation(this.rotation() + theta);\n        return this;\n    };\n    Node.prototype.moveToTop = function () {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveToTop function is ignored.');\n            return false;\n        }\n        var index = this.index;\n        this.parent.children.splice(index, 1);\n        this.parent.children.push(this);\n        this.parent._setChildrenIndices();\n        return true;\n    };\n    Node.prototype.moveUp = function () {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveUp function is ignored.');\n            return false;\n        }\n        var index = this.index, len = this.parent.getChildren().length;\n        if (index < len - 1) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.splice(index + 1, 0, this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    };\n    Node.prototype.moveDown = function () {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveDown function is ignored.');\n            return false;\n        }\n        var index = this.index;\n        if (index > 0) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.splice(index - 1, 0, this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    };\n    Node.prototype.moveToBottom = function () {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveToBottom function is ignored.');\n            return false;\n        }\n        var index = this.index;\n        if (index > 0) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.unshift(this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    };\n    Node.prototype.setZIndex = function (zIndex) {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. zIndex parameter is ignored.');\n            return this;\n        }\n        if (zIndex < 0 || zIndex >= this.parent.children.length) {\n            Util_1.Util.warn('Unexpected value ' +\n                zIndex +\n                ' for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to ' +\n                (this.parent.children.length - 1) +\n                '.');\n        }\n        var index = this.index;\n        this.parent.children.splice(index, 1);\n        this.parent.children.splice(zIndex, 0, this);\n        this.parent._setChildrenIndices();\n        return this;\n    };\n    Node.prototype.getAbsoluteOpacity = function () {\n        return this._getCache(ABSOLUTE_OPACITY, this._getAbsoluteOpacity);\n    };\n    Node.prototype._getAbsoluteOpacity = function () {\n        var absOpacity = this.opacity();\n        var parent = this.getParent();\n        if (parent && !parent._isUnderCache) {\n            absOpacity *= parent.getAbsoluteOpacity();\n        }\n        return absOpacity;\n    };\n    Node.prototype.moveTo = function (newContainer) {\n        if (this.getParent() !== newContainer) {\n            this._remove();\n            newContainer.add(this);\n        }\n        return this;\n    };\n    Node.prototype.toObject = function () {\n        var obj = {}, attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;\n        obj.attrs = {};\n        for (key in attrs) {\n            val = attrs[key];\n            nonPlainObject =\n                Util_1.Util.isObject(val) && !Util_1.Util._isPlainObject(val) && !Util_1.Util._isArray(val);\n            if (nonPlainObject) {\n                continue;\n            }\n            getter = typeof this[key] === 'function' && this[key];\n            delete attrs[key];\n            defaultValue = getter ? getter.call(this) : null;\n            attrs[key] = val;\n            if (defaultValue !== val) {\n                obj.attrs[key] = val;\n            }\n        }\n        obj.className = this.getClassName();\n        return Util_1.Util._prepareToStringify(obj);\n    };\n    Node.prototype.toJSON = function () {\n        return JSON.stringify(this.toObject());\n    };\n    Node.prototype.getParent = function () {\n        return this.parent;\n    };\n    Node.prototype.findAncestors = function (selector, includeSelf, stopNode) {\n        var res = [];\n        if (includeSelf && this._isMatch(selector)) {\n            res.push(this);\n        }\n        var ancestor = this.parent;\n        while (ancestor) {\n            if (ancestor === stopNode) {\n                return res;\n            }\n            if (ancestor._isMatch(selector)) {\n                res.push(ancestor);\n            }\n            ancestor = ancestor.parent;\n        }\n        return res;\n    };\n    Node.prototype.isAncestorOf = function (node) {\n        return false;\n    };\n    Node.prototype.findAncestor = function (selector, includeSelf, stopNode) {\n        return this.findAncestors(selector, includeSelf, stopNode)[0];\n    };\n    Node.prototype._isMatch = function (selector) {\n        if (!selector) {\n            return false;\n        }\n        if (typeof selector === 'function') {\n            return selector(this);\n        }\n        var selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;\n        for (n = 0; n < len; n++) {\n            sel = selectorArr[n];\n            if (!Util_1.Util.isValidSelector(sel)) {\n                Util_1.Util.warn('Selector \"' +\n                    sel +\n                    '\" is invalid. Allowed selectors examples are \"#foo\", \".bar\" or \"Group\".');\n                Util_1.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like \"Triangle\".');\n                Util_1.Util.warn('Konva is awesome, right?');\n            }\n            if (sel.charAt(0) === '#') {\n                if (this.id() === sel.slice(1)) {\n                    return true;\n                }\n            }\n            else if (sel.charAt(0) === '.') {\n                if (this.hasName(sel.slice(1))) {\n                    return true;\n                }\n            }\n            else if (this.className === sel || this.nodeType === sel) {\n                return true;\n            }\n        }\n        return false;\n    };\n    Node.prototype.getLayer = function () {\n        var parent = this.getParent();\n        return parent ? parent.getLayer() : null;\n    };\n    Node.prototype.getStage = function () {\n        return this._getCache(STAGE, this._getStage);\n    };\n    Node.prototype._getStage = function () {\n        var parent = this.getParent();\n        if (parent) {\n            return parent.getStage();\n        }\n        else {\n            return undefined;\n        }\n    };\n    Node.prototype.fire = function (eventType, evt, bubble) {\n        if (evt === void 0) { evt = {}; }\n        evt.target = evt.target || this;\n        if (bubble) {\n            this._fireAndBubble(eventType, evt);\n        }\n        else {\n            this._fire(eventType, evt);\n        }\n        return this;\n    };\n    Node.prototype.getAbsoluteTransform = function (top) {\n        if (top) {\n            return this._getAbsoluteTransform(top);\n        }\n        else {\n            return this._getCache(ABSOLUTE_TRANSFORM, this._getAbsoluteTransform);\n        }\n    };\n    Node.prototype._getAbsoluteTransform = function (top) {\n        var at;\n        if (top) {\n            at = new Util_1.Transform();\n            this._eachAncestorReverse(function (node) {\n                var transformsEnabled = node.transformsEnabled();\n                if (transformsEnabled === 'all') {\n                    at.multiply(node.getTransform());\n                }\n                else if (transformsEnabled === 'position') {\n                    at.translate(node.x() - node.offsetX(), node.y() - node.offsetY());\n                }\n            }, top);\n            return at;\n        }\n        else {\n            if (this.parent) {\n                at = this.parent.getAbsoluteTransform().copy();\n            }\n            else {\n                at = new Util_1.Transform();\n            }\n            var transformsEnabled = this.transformsEnabled();\n            if (transformsEnabled === 'all') {\n                at.multiply(this.getTransform());\n            }\n            else if (transformsEnabled === 'position') {\n                at.translate(this.x() - this.offsetX(), this.y() - this.offsetY());\n            }\n            return at;\n        }\n    };\n    Node.prototype.getAbsoluteScale = function (top) {\n        var parent = this;\n        while (parent) {\n            if (parent._isUnderCache) {\n                top = parent;\n            }\n            parent = parent.getParent();\n        }\n        var transform = this.getAbsoluteTransform(top);\n        var attrs = transform.decompose();\n        return {\n            x: attrs.scaleX,\n            y: attrs.scaleY,\n        };\n    };\n    Node.prototype.getAbsoluteRotation = function () {\n        return this.getAbsoluteTransform().decompose().rotation;\n    };\n    Node.prototype.getTransform = function () {\n        return this._getCache(TRANSFORM, this._getTransform);\n    };\n    Node.prototype._getTransform = function () {\n        var m = new Util_1.Transform(), x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = this.scaleX(), scaleY = this.scaleY(), skewX = this.skewX(), skewY = this.skewY(), offsetX = this.offsetX(), offsetY = this.offsetY();\n        if (x !== 0 || y !== 0) {\n            m.translate(x, y);\n        }\n        if (rotation !== 0) {\n            m.rotate(rotation);\n        }\n        if (skewX !== 0 || skewY !== 0) {\n            m.skew(skewX, skewY);\n        }\n        if (scaleX !== 1 || scaleY !== 1) {\n            m.scale(scaleX, scaleY);\n        }\n        if (offsetX !== 0 || offsetY !== 0) {\n            m.translate(-1 * offsetX, -1 * offsetY);\n        }\n        return m;\n    };\n    Node.prototype.clone = function (obj) {\n        var attrs = Util_1.Util.cloneObject(this.attrs), key, allListeners, len, n, listener;\n        for (key in obj) {\n            attrs[key] = obj[key];\n        }\n        var node = new this.constructor(attrs);\n        for (key in this.eventListeners) {\n            allListeners = this.eventListeners[key];\n            len = allListeners.length;\n            for (n = 0; n < len; n++) {\n                listener = allListeners[n];\n                if (listener.name.indexOf(KONVA) < 0) {\n                    if (!node.eventListeners[key]) {\n                        node.eventListeners[key] = [];\n                    }\n                    node.eventListeners[key].push(listener);\n                }\n            }\n        }\n        return node;\n    };\n    Node.prototype._toKonvaCanvas = function (config) {\n        config = config || {};\n        var box = this.getClientRect();\n        var stage = this.getStage(), x = config.x !== undefined ? config.x : box.x, y = config.y !== undefined ? config.y : box.y, pixelRatio = config.pixelRatio || 1, canvas = new Canvas_1.SceneCanvas({\n            width: config.width || box.width || (stage ? stage.width() : 0),\n            height: config.height || box.height || (stage ? stage.height() : 0),\n            pixelRatio: pixelRatio,\n        }), context = canvas.getContext();\n        context.save();\n        if (x || y) {\n            context.translate(-1 * x, -1 * y);\n        }\n        this.drawScene(canvas);\n        context.restore();\n        return canvas;\n    };\n    Node.prototype.toCanvas = function (config) {\n        return this._toKonvaCanvas(config)._canvas;\n    };\n    Node.prototype.toDataURL = function (config) {\n        config = config || {};\n        var mimeType = config.mimeType || null, quality = config.quality || null;\n        var url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);\n        if (config.callback) {\n            config.callback(url);\n        }\n        return url;\n    };\n    Node.prototype.toImage = function (config) {\n        if (!config || !config.callback) {\n            throw 'callback required for toImage method config argument';\n        }\n        var callback = config.callback;\n        delete config.callback;\n        Util_1.Util._urlToImage(this.toDataURL(config), function (img) {\n            callback(img);\n        });\n    };\n    Node.prototype.setSize = function (size) {\n        this.width(size.width);\n        this.height(size.height);\n        return this;\n    };\n    Node.prototype.getSize = function () {\n        return {\n            width: this.width(),\n            height: this.height(),\n        };\n    };\n    Node.prototype.getClassName = function () {\n        return this.className || this.nodeType;\n    };\n    Node.prototype.getType = function () {\n        return this.nodeType;\n    };\n    Node.prototype.getDragDistance = function () {\n        if (this.attrs.dragDistance !== undefined) {\n            return this.attrs.dragDistance;\n        }\n        else if (this.parent) {\n            return this.parent.getDragDistance();\n        }\n        else {\n            return Global_1.Konva.dragDistance;\n        }\n    };\n    Node.prototype._off = function (type, name, callback) {\n        var evtListeners = this.eventListeners[type], i, evtName, handler;\n        for (i = 0; i < evtListeners.length; i++) {\n            evtName = evtListeners[i].name;\n            handler = evtListeners[i].handler;\n            if ((evtName !== 'konva' || name === 'konva') &&\n                (!name || evtName === name) &&\n                (!callback || callback === handler)) {\n                evtListeners.splice(i, 1);\n                if (evtListeners.length === 0) {\n                    delete this.eventListeners[type];\n                    break;\n                }\n                i--;\n            }\n        }\n    };\n    Node.prototype._fireChangeEvent = function (attr, oldVal, newVal) {\n        this._fire(attr + CHANGE, {\n            oldVal: oldVal,\n            newVal: newVal,\n        });\n    };\n    Node.prototype.setId = function (id) {\n        var oldId = this.id();\n        exports._removeId(oldId, this);\n        _addId(this, id);\n        this._setAttr('id', id);\n        return this;\n    };\n    Node.prototype.setName = function (name) {\n        var oldNames = (this.name() || '').split(/\\s/g);\n        var newNames = (name || '').split(/\\s/g);\n        var subname, i;\n        for (i = 0; i < oldNames.length; i++) {\n            subname = oldNames[i];\n            if (newNames.indexOf(subname) === -1 && subname) {\n                exports._removeName(subname, this._id);\n            }\n        }\n        for (i = 0; i < newNames.length; i++) {\n            subname = newNames[i];\n            if (oldNames.indexOf(subname) === -1 && subname) {\n                exports._addName(this, subname);\n            }\n        }\n        this._setAttr(NAME, name);\n        return this;\n    };\n    Node.prototype.addName = function (name) {\n        if (!this.hasName(name)) {\n            var oldName = this.name();\n            var newName = oldName ? oldName + ' ' + name : name;\n            this.setName(newName);\n        }\n        return this;\n    };\n    Node.prototype.hasName = function (name) {\n        if (!name) {\n            return false;\n        }\n        var fullName = this.name();\n        if (!fullName) {\n            return false;\n        }\n        var names = (fullName || '').split(/\\s/g);\n        return names.indexOf(name) !== -1;\n    };\n    Node.prototype.removeName = function (name) {\n        var names = (this.name() || '').split(/\\s/g);\n        var index = names.indexOf(name);\n        if (index !== -1) {\n            names.splice(index, 1);\n            this.setName(names.join(' '));\n        }\n        return this;\n    };\n    Node.prototype.setAttr = function (attr, val) {\n        var func = this[SET + Util_1.Util._capitalize(attr)];\n        if (Util_1.Util._isFunction(func)) {\n            func.call(this, val);\n        }\n        else {\n            this._setAttr(attr, val);\n        }\n        return this;\n    };\n    Node.prototype._setAttr = function (key, val) {\n        var oldVal = this.attrs[key];\n        if (oldVal === val && !Util_1.Util.isObject(val)) {\n            return;\n        }\n        if (val === undefined || val === null) {\n            delete this.attrs[key];\n        }\n        else {\n            this.attrs[key] = val;\n        }\n        this._fireChangeEvent(key, oldVal, val);\n    };\n    Node.prototype._setComponentAttr = function (key, component, val) {\n        var oldVal;\n        if (val !== undefined) {\n            oldVal = this.attrs[key];\n            if (!oldVal) {\n                this.attrs[key] = this.getAttr(key);\n            }\n            this.attrs[key][component] = val;\n            this._fireChangeEvent(key, oldVal, val);\n        }\n    };\n    Node.prototype._fireAndBubble = function (eventType, evt, compareShape) {\n        if (evt && this.nodeType === SHAPE) {\n            evt.target = this;\n        }\n        var shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n            ((compareShape &&\n                (this === compareShape ||\n                    (this.isAncestorOf && this.isAncestorOf(compareShape)))) ||\n                (this.nodeType === 'Stage' && !compareShape));\n        if (!shouldStop) {\n            this._fire(eventType, evt);\n            var stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n                compareShape &&\n                compareShape.isAncestorOf &&\n                compareShape.isAncestorOf(this) &&\n                !compareShape.isAncestorOf(this.parent);\n            if (((evt && !evt.cancelBubble) || !evt) &&\n                this.parent &&\n                this.parent.isListening() &&\n                !stopBubble) {\n                if (compareShape && compareShape.parent) {\n                    this._fireAndBubble.call(this.parent, eventType, evt, compareShape);\n                }\n                else {\n                    this._fireAndBubble.call(this.parent, eventType, evt);\n                }\n            }\n        }\n    };\n    Node.prototype._fire = function (eventType, evt) {\n        var events = this.eventListeners[eventType], i;\n        if (events) {\n            evt = evt || {};\n            evt.currentTarget = this;\n            evt.type = eventType;\n            for (i = 0; i < events.length; i++) {\n                events[i].handler.call(this, evt);\n            }\n        }\n    };\n    Node.prototype.draw = function () {\n        this.drawScene();\n        this.drawHit();\n        return this;\n    };\n    Node.prototype._createDragElement = function (evt) {\n        var pointerId = evt ? evt.pointerId : undefined;\n        var stage = this.getStage();\n        var ap = this.getAbsolutePosition();\n        var pos = stage._getPointerById(pointerId) ||\n            stage._changedPointerPositions[0] ||\n            ap;\n        DragAndDrop_1.DD._dragElements.set(this._id, {\n            node: this,\n            startPointerPos: pos,\n            offset: {\n                x: pos.x - ap.x,\n                y: pos.y - ap.y,\n            },\n            dragStatus: 'ready',\n            pointerId: pointerId,\n        });\n    };\n    Node.prototype.startDrag = function (evt) {\n        if (!DragAndDrop_1.DD._dragElements.has(this._id)) {\n            this._createDragElement(evt);\n        }\n        var elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        elem.dragStatus = 'dragging';\n        this.fire('dragstart', {\n            type: 'dragstart',\n            target: this,\n            evt: evt && evt.evt,\n        }, true);\n    };\n    Node.prototype._setDragPosition = function (evt, elem) {\n        var pos = this.getStage()._getPointerById(elem.pointerId);\n        if (!pos) {\n            return;\n        }\n        var newNodePos = {\n            x: pos.x - elem.offset.x,\n            y: pos.y - elem.offset.y,\n        };\n        var dbf = this.dragBoundFunc();\n        if (dbf !== undefined) {\n            var bounded = dbf.call(this, newNodePos, evt);\n            if (!bounded) {\n                Util_1.Util.warn('dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.');\n            }\n            else {\n                newNodePos = bounded;\n            }\n        }\n        if (!this._lastPos ||\n            this._lastPos.x !== newNodePos.x ||\n            this._lastPos.y !== newNodePos.y) {\n            this.setAbsolutePosition(newNodePos);\n            if (this.getLayer()) {\n                this.getLayer().batchDraw();\n            }\n            else if (this.getStage()) {\n                this.getStage().batchDraw();\n            }\n        }\n        this._lastPos = newNodePos;\n    };\n    Node.prototype.stopDrag = function (evt) {\n        var elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        if (elem) {\n            elem.dragStatus = 'stopped';\n        }\n        DragAndDrop_1.DD._endDragBefore(evt);\n        DragAndDrop_1.DD._endDragAfter(evt);\n    };\n    Node.prototype.setDraggable = function (draggable) {\n        this._setAttr('draggable', draggable);\n        this._dragChange();\n    };\n    Node.prototype.isDragging = function () {\n        var elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        return elem ? elem.dragStatus === 'dragging' : false;\n    };\n    Node.prototype._listenDrag = function () {\n        this._dragCleanup();\n        this.on('mousedown.konva touchstart.konva', function (evt) {\n            var _this = this;\n            var shouldCheckButton = evt.evt['button'] !== undefined;\n            var canDrag = !shouldCheckButton || Global_1.Konva.dragButtons.indexOf(evt.evt['button']) >= 0;\n            if (!canDrag) {\n                return;\n            }\n            if (this.isDragging()) {\n                return;\n            }\n            var hasDraggingChild = false;\n            DragAndDrop_1.DD._dragElements.forEach(function (elem) {\n                if (_this.isAncestorOf(elem.node)) {\n                    hasDraggingChild = true;\n                }\n            });\n            if (!hasDraggingChild) {\n                this._createDragElement(evt);\n            }\n        });\n    };\n    Node.prototype._dragChange = function () {\n        if (this.attrs.draggable) {\n            this._listenDrag();\n        }\n        else {\n            this._dragCleanup();\n            var stage = this.getStage();\n            if (stage && DragAndDrop_1.DD._dragElements.has(this._id)) {\n                this.stopDrag();\n            }\n        }\n    };\n    Node.prototype._dragCleanup = function () {\n        this.off('mousedown.konva');\n        this.off('touchstart.konva');\n    };\n    Node.create = function (data, container) {\n        if (Util_1.Util._isString(data)) {\n            data = JSON.parse(data);\n        }\n        return this._createNode(data, container);\n    };\n    Node._createNode = function (obj, container) {\n        var className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;\n        if (container) {\n            obj.attrs.container = container;\n        }\n        if (!Global_1._NODES_REGISTRY[className]) {\n            Util_1.Util.warn('Can not find a node with class name \"' +\n                className +\n                '\". Fallback to \"Shape\".');\n            className = 'Shape';\n        }\n        var Class = Global_1._NODES_REGISTRY[className];\n        no = new Class(obj.attrs);\n        if (children) {\n            len = children.length;\n            for (n = 0; n < len; n++) {\n                no.add(Node._createNode(children[n]));\n            }\n        }\n        return no;\n    };\n    return Node;\n}());\nexports.Node = Node;\nNode.prototype.nodeType = 'Node';\nNode.prototype._attrsAffectingSize = [];\nFactory_1.Factory.addGetterSetter(Node, 'zIndex');\nFactory_1.Factory.addGetterSetter(Node, 'absolutePosition');\nFactory_1.Factory.addGetterSetter(Node, 'position');\nFactory_1.Factory.addGetterSetter(Node, 'x', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'y', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'globalCompositeOperation', 'source-over', Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Node, 'opacity', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'name', '', Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Node, 'id', '', Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Node, 'rotation', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Node, 'scaleX', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'scaleY', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Node, 'skewX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'skewY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Node, 'offsetX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'offsetY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'dragDistance', null, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'width', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'height', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Node, 'listening', 'inherit', function (val) {\n    var isValid = val === true || val === false || val === 'inherit';\n    if (!isValid) {\n        Util_1.Util.warn(val +\n            ' is a not valid value for \"listening\" attribute. The value may be true, false or \"inherit\".');\n    }\n    return val;\n});\nFactory_1.Factory.addGetterSetter(Node, 'preventDefault', true, Validators_1.getBooleanValidator());\nFactory_1.Factory.addGetterSetter(Node, 'filters', null, function (val) {\n    this._filterUpToDate = false;\n    return val;\n});\nFactory_1.Factory.addGetterSetter(Node, 'visible', 'inherit', function (val) {\n    var isValid = val === true || val === false || val === 'inherit';\n    if (!isValid) {\n        Util_1.Util.warn(val +\n            ' is a not valid value for \"visible\" attribute. The value may be true, false or \"inherit\".');\n    }\n    return val;\n});\nFactory_1.Factory.addGetterSetter(Node, 'transformsEnabled', 'all', Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Node, 'size');\nFactory_1.Factory.addGetterSetter(Node, 'dragBoundFunc');\nFactory_1.Factory.addGetterSetter(Node, 'draggable', false, Validators_1.getBooleanValidator());\nFactory_1.Factory.backCompat(Node, {\n    rotateDeg: 'rotate',\n    setRotationDeg: 'setRotation',\n    getRotationDeg: 'getRotation',\n});\nUtil_1.Collection.mapMethods(Node);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Node.js?");

/***/ }),

/***/ "./node_modules/konva/lib/PointerEvents.js":
/*!*************************************************!*\
  !*** ./node_modules/konva/lib/PointerEvents.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Captures = new Map();\nvar SUPPORT_POINTER_EVENTS = Global_1.Konva._global['PointerEvent'] !== undefined;\nfunction getCapturedShape(pointerId) {\n    return Captures.get(pointerId);\n}\nexports.getCapturedShape = getCapturedShape;\nfunction createEvent(evt) {\n    return {\n        evt: evt,\n        pointerId: evt.pointerId\n    };\n}\nexports.createEvent = createEvent;\nfunction hasPointerCapture(pointerId, shape) {\n    return Captures.get(pointerId) === shape;\n}\nexports.hasPointerCapture = hasPointerCapture;\nfunction setPointerCapture(pointerId, shape) {\n    releaseCapture(pointerId);\n    var stage = shape.getStage();\n    if (!stage)\n        return;\n    Captures.set(pointerId, shape);\n    if (SUPPORT_POINTER_EVENTS) {\n        shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n    }\n}\nexports.setPointerCapture = setPointerCapture;\nfunction releaseCapture(pointerId, target) {\n    var shape = Captures.get(pointerId);\n    if (!shape)\n        return;\n    var stage = shape.getStage();\n    if (stage && stage.content) {\n    }\n    Captures.delete(pointerId);\n    if (SUPPORT_POINTER_EVENTS) {\n        shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n    }\n}\nexports.releaseCapture = releaseCapture;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/PointerEvents.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Shape.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/Shape.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ./Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ./Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar PointerEvents = __webpack_require__(/*! ./PointerEvents */ \"./node_modules/konva/lib/PointerEvents.js\");\nvar HAS_SHADOW = 'hasShadow';\nvar SHADOW_RGBA = 'shadowRGBA';\nvar patternImage = 'patternImage';\nvar linearGradient = 'linearGradient';\nvar radialGradient = 'radialGradient';\nvar dummyContext;\nfunction getDummyContext() {\n    if (dummyContext) {\n        return dummyContext;\n    }\n    dummyContext = Util_1.Util.createCanvasElement().getContext('2d');\n    return dummyContext;\n}\nexports.shapes = {};\nfunction _fillFunc(context) {\n    context.fill();\n}\nfunction _strokeFunc(context) {\n    context.stroke();\n}\nfunction _fillFuncHit(context) {\n    context.fill();\n}\nfunction _strokeFuncHit(context) {\n    context.stroke();\n}\nfunction _clearHasShadowCache() {\n    this._clearCache(HAS_SHADOW);\n}\nfunction _clearGetShadowRGBACache() {\n    this._clearCache(SHADOW_RGBA);\n}\nfunction _clearFillPatternCache() {\n    this._clearCache(patternImage);\n}\nfunction _clearLinearGradientCache() {\n    this._clearCache(linearGradient);\n}\nfunction _clearRadialGradientCache() {\n    this._clearCache(radialGradient);\n}\nvar Shape = (function (_super) {\n    __extends(Shape, _super);\n    function Shape(config) {\n        var _this = _super.call(this, config) || this;\n        var key;\n        while (true) {\n            key = Util_1.Util.getRandomColor();\n            if (key && !(key in exports.shapes)) {\n                break;\n            }\n        }\n        _this.colorKey = key;\n        exports.shapes[key] = _this;\n        _this.on('shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearHasShadowCache);\n        _this.on('shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearGetShadowRGBACache);\n        _this.on('fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva', _clearFillPatternCache);\n        _this.on('fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva', _clearLinearGradientCache);\n        _this.on('fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva', _clearRadialGradientCache);\n        return _this;\n    }\n    Shape.prototype.getContext = function () {\n        return this.getLayer().getContext();\n    };\n    Shape.prototype.getCanvas = function () {\n        return this.getLayer().getCanvas();\n    };\n    Shape.prototype.getSceneFunc = function () {\n        return this.attrs.sceneFunc || this['_sceneFunc'];\n    };\n    Shape.prototype.getHitFunc = function () {\n        return this.attrs.hitFunc || this['_hitFunc'];\n    };\n    Shape.prototype.hasShadow = function () {\n        return this._getCache(HAS_SHADOW, this._hasShadow);\n    };\n    Shape.prototype._hasShadow = function () {\n        return (this.shadowEnabled() &&\n            this.shadowOpacity() !== 0 &&\n            !!(this.shadowColor() ||\n                this.shadowBlur() ||\n                this.shadowOffsetX() ||\n                this.shadowOffsetY()));\n    };\n    Shape.prototype._getFillPattern = function () {\n        return this._getCache(patternImage, this.__getFillPattern);\n    };\n    Shape.prototype.__getFillPattern = function () {\n        if (this.fillPatternImage()) {\n            var ctx = getDummyContext();\n            var pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');\n            return pattern;\n        }\n    };\n    Shape.prototype._getLinearGradient = function () {\n        return this._getCache(linearGradient, this.__getLinearGradient);\n    };\n    Shape.prototype.__getLinearGradient = function () {\n        var colorStops = this.fillLinearGradientColorStops();\n        if (colorStops) {\n            var ctx = getDummyContext();\n            var start = this.fillLinearGradientStartPoint();\n            var end = this.fillLinearGradientEndPoint();\n            var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n            for (var n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            return grd;\n        }\n    };\n    Shape.prototype._getRadialGradient = function () {\n        return this._getCache(radialGradient, this.__getRadialGradient);\n    };\n    Shape.prototype.__getRadialGradient = function () {\n        var colorStops = this.fillRadialGradientColorStops();\n        if (colorStops) {\n            var ctx = getDummyContext();\n            var start = this.fillRadialGradientStartPoint();\n            var end = this.fillRadialGradientEndPoint();\n            var grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());\n            for (var n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            return grd;\n        }\n    };\n    Shape.prototype.getShadowRGBA = function () {\n        return this._getCache(SHADOW_RGBA, this._getShadowRGBA);\n    };\n    Shape.prototype._getShadowRGBA = function () {\n        if (this.hasShadow()) {\n            var rgba = Util_1.Util.colorToRGBA(this.shadowColor());\n            return ('rgba(' +\n                rgba.r +\n                ',' +\n                rgba.g +\n                ',' +\n                rgba.b +\n                ',' +\n                rgba.a * (this.shadowOpacity() || 1) +\n                ')');\n        }\n    };\n    Shape.prototype.hasFill = function () {\n        return (this.fillEnabled() &&\n            !!(this.fill() ||\n                this.fillPatternImage() ||\n                this.fillLinearGradientColorStops() ||\n                this.fillRadialGradientColorStops()));\n    };\n    Shape.prototype.hasStroke = function () {\n        return (this.strokeEnabled() &&\n            this.strokeWidth() &&\n            !!(this.stroke() || this.strokeLinearGradientColorStops()));\n    };\n    Shape.prototype.hasHitStroke = function () {\n        var width = this.hitStrokeWidth();\n        if (width === 'auto') {\n            return this.hasStroke();\n        }\n        return this.strokeEnabled() && !!width;\n    };\n    Shape.prototype.intersects = function (point) {\n        var stage = this.getStage(), bufferHitCanvas = stage.bufferHitCanvas, p;\n        bufferHitCanvas.getContext().clear();\n        this.drawHit(bufferHitCanvas);\n        p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;\n        return p[3] > 0;\n    };\n    Shape.prototype.destroy = function () {\n        Node_1.Node.prototype.destroy.call(this);\n        delete exports.shapes[this.colorKey];\n        delete this.colorKey;\n        return this;\n    };\n    Shape.prototype._useBufferCanvas = function (caching) {\n        return !!((!caching || this.hasShadow()) &&\n            this.perfectDrawEnabled() &&\n            this.getAbsoluteOpacity() !== 1 &&\n            this.hasFill() &&\n            this.hasStroke() &&\n            this.getStage());\n    };\n    Shape.prototype.setStrokeHitEnabled = function (val) {\n        Util_1.Util.warn('strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.');\n        if (val) {\n            this.hitStrokeWidth('auto');\n        }\n        else {\n            this.hitStrokeWidth(0);\n        }\n    };\n    Shape.prototype.getStrokeHitEnabled = function () {\n        if (this.hitStrokeWidth() === 0) {\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    Shape.prototype.getSelfRect = function () {\n        var size = this.size();\n        return {\n            x: this._centroid ? -size.width / 2 : 0,\n            y: this._centroid ? -size.height / 2 : 0,\n            width: size.width,\n            height: size.height\n        };\n    };\n    Shape.prototype.getClientRect = function (attrs) {\n        attrs = attrs || {};\n        var skipTransform = attrs.skipTransform;\n        var relativeTo = attrs.relativeTo;\n        var fillRect = this.getSelfRect();\n        var applyStroke = !attrs.skipStroke && this.hasStroke();\n        var strokeWidth = (applyStroke && this.strokeWidth()) || 0;\n        var fillAndStrokeWidth = fillRect.width + strokeWidth;\n        var fillAndStrokeHeight = fillRect.height + strokeWidth;\n        var applyShadow = !attrs.skipShadow && this.hasShadow();\n        var shadowOffsetX = applyShadow ? this.shadowOffsetX() : 0;\n        var shadowOffsetY = applyShadow ? this.shadowOffsetY() : 0;\n        var preWidth = fillAndStrokeWidth + Math.abs(shadowOffsetX);\n        var preHeight = fillAndStrokeHeight + Math.abs(shadowOffsetY);\n        var blurRadius = (applyShadow && this.shadowBlur()) || 0;\n        var width = preWidth + blurRadius * 2;\n        var height = preHeight + blurRadius * 2;\n        var roundingOffset = 0;\n        if (Math.round(strokeWidth / 2) !== strokeWidth / 2) {\n            roundingOffset = 1;\n        }\n        var rect = {\n            width: width + roundingOffset,\n            height: height + roundingOffset,\n            x: -Math.round(strokeWidth / 2 + blurRadius) +\n                Math.min(shadowOffsetX, 0) +\n                fillRect.x,\n            y: -Math.round(strokeWidth / 2 + blurRadius) +\n                Math.min(shadowOffsetY, 0) +\n                fillRect.y\n        };\n        if (!skipTransform) {\n            return this._transformedRect(rect, relativeTo);\n        }\n        return rect;\n    };\n    Shape.prototype.drawScene = function (can, top, caching, skipBuffer) {\n        var layer = this.getLayer(), canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.sceneFunc(), hasShadow = this.hasShadow(), hasStroke = this.hasStroke(), stage, bufferCanvas, bufferContext;\n        if (!this.isVisible() && !caching) {\n            return this;\n        }\n        if (cachedCanvas) {\n            context.save();\n            layer._applyTransform(this, context, top);\n            this._drawCachedSceneCanvas(context);\n            context.restore();\n            return this;\n        }\n        if (!drawFunc) {\n            return this;\n        }\n        context.save();\n        if (this._useBufferCanvas(caching) && !skipBuffer) {\n            stage = this.getStage();\n            bufferCanvas = stage.bufferCanvas;\n            bufferContext = bufferCanvas.getContext();\n            bufferContext.clear();\n            bufferContext.save();\n            bufferContext._applyLineJoin(this);\n            if (!caching) {\n                if (layer) {\n                    layer._applyTransform(this, bufferContext, top);\n                }\n                else {\n                    var m = this.getAbsoluteTransform(top).getMatrix();\n                    context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n                }\n            }\n            drawFunc.call(this, bufferContext, this);\n            bufferContext.restore();\n            var ratio = bufferCanvas.pixelRatio;\n            if (hasShadow && !canvas.hitCanvas) {\n                context.save();\n                context._applyShadow(this);\n                context._applyOpacity(this);\n                context._applyGlobalCompositeOperation(this);\n                context.drawImage(bufferCanvas._canvas, 0, 0, bufferCanvas.width / ratio, bufferCanvas.height / ratio);\n                context.restore();\n            }\n            else {\n                context._applyOpacity(this);\n                context._applyGlobalCompositeOperation(this);\n                context.drawImage(bufferCanvas._canvas, 0, 0, bufferCanvas.width / ratio, bufferCanvas.height / ratio);\n            }\n        }\n        else {\n            context._applyLineJoin(this);\n            if (!caching) {\n                if (layer) {\n                    layer._applyTransform(this, context, top);\n                }\n                else {\n                    var o = this.getAbsoluteTransform(top).getMatrix();\n                    context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n                }\n            }\n            if (hasShadow && hasStroke && !canvas.hitCanvas) {\n                context.save();\n                if (!caching) {\n                    context._applyOpacity(this);\n                    context._applyGlobalCompositeOperation(this);\n                }\n                context._applyShadow(this);\n                drawFunc.call(this, context, this);\n                context.restore();\n                if (this.hasFill() && this.shadowForStrokeEnabled()) {\n                    drawFunc.call(this, context, this);\n                }\n            }\n            else if (hasShadow && !canvas.hitCanvas) {\n                context.save();\n                if (!caching) {\n                    context._applyOpacity(this);\n                    context._applyGlobalCompositeOperation(this);\n                }\n                context._applyShadow(this);\n                drawFunc.call(this, context, this);\n                context.restore();\n            }\n            else {\n                if (!caching) {\n                    context._applyOpacity(this);\n                    context._applyGlobalCompositeOperation(this);\n                }\n                drawFunc.call(this, context, this);\n            }\n        }\n        context.restore();\n        return this;\n    };\n    Shape.prototype.drawHit = function (can, top, caching) {\n        var layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n        if (!this.colorKey) {\n            console.log(this);\n            Util_1.Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. See the shape in logs above. If you want to reuse shape you should call remove() instead of destroy()');\n        }\n        if (!this.shouldDrawHit() && !caching) {\n            return this;\n        }\n        if (cachedHitCanvas) {\n            context.save();\n            layer._applyTransform(this, context, top);\n            this._drawCachedHitCanvas(context);\n            context.restore();\n            return this;\n        }\n        if (!drawFunc) {\n            return this;\n        }\n        context.save();\n        context._applyLineJoin(this);\n        if (!caching) {\n            if (layer) {\n                layer._applyTransform(this, context, top);\n            }\n            else {\n                var o = this.getAbsoluteTransform(top).getMatrix();\n                context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n            }\n        }\n        drawFunc.call(this, context, this);\n        context.restore();\n        return this;\n    };\n    Shape.prototype.drawHitFromCache = function (alphaThreshold) {\n        if (alphaThreshold === void 0) { alphaThreshold = 0; }\n        var cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;\n        hitContext.clear();\n        hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);\n        try {\n            hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);\n            hitData = hitImageData.data;\n            len = hitData.length;\n            rgbColorKey = Util_1.Util._hexToRgb(this.colorKey);\n            for (i = 0; i < len; i += 4) {\n                alpha = hitData[i + 3];\n                if (alpha > alphaThreshold) {\n                    hitData[i] = rgbColorKey.r;\n                    hitData[i + 1] = rgbColorKey.g;\n                    hitData[i + 2] = rgbColorKey.b;\n                    hitData[i + 3] = 255;\n                }\n                else {\n                    hitData[i + 3] = 0;\n                }\n            }\n            hitContext.putImageData(hitImageData, 0, 0);\n        }\n        catch (e) {\n            Util_1.Util.error('Unable to draw hit graph from cached scene canvas. ' + e.message);\n        }\n        return this;\n    };\n    Shape.prototype.hasPointerCapture = function (pointerId) {\n        return PointerEvents.hasPointerCapture(pointerId, this);\n    };\n    Shape.prototype.setPointerCapture = function (pointerId) {\n        PointerEvents.setPointerCapture(pointerId, this);\n    };\n    Shape.prototype.releaseCapture = function (pointerId) {\n        PointerEvents.releaseCapture(pointerId, this);\n    };\n    return Shape;\n}(Node_1.Node));\nexports.Shape = Shape;\nShape.prototype._fillFunc = _fillFunc;\nShape.prototype._strokeFunc = _strokeFunc;\nShape.prototype._fillFuncHit = _fillFuncHit;\nShape.prototype._strokeFuncHit = _strokeFuncHit;\nShape.prototype._centroid = false;\nShape.prototype.nodeType = 'Shape';\nGlobal_1._registerNode(Shape);\nFactory_1.Factory.addGetterSetter(Shape, 'stroke', undefined, Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'strokeWidth', 2, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'hitStrokeWidth', 'auto', Validators_1.getNumberOrAutoValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'strokeHitEnabled', true, Validators_1.getBooleanValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'perfectDrawEnabled', true, Validators_1.getBooleanValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowForStrokeEnabled', true, Validators_1.getBooleanValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'lineJoin');\nFactory_1.Factory.addGetterSetter(Shape, 'lineCap');\nFactory_1.Factory.addGetterSetter(Shape, 'sceneFunc');\nFactory_1.Factory.addGetterSetter(Shape, 'hitFunc');\nFactory_1.Factory.addGetterSetter(Shape, 'dash');\nFactory_1.Factory.addGetterSetter(Shape, 'dashOffset', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowColor', undefined, Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowBlur', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOpacity', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOffsetX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOffsetY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternImage');\nFactory_1.Factory.addGetterSetter(Shape, 'fill', undefined, Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartRadius', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndRadius', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');\nFactory_1.Factory.addGetterSetter(Shape, 'fillEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'shadowEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'dashEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeScaleEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPriority', 'color');\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternOffsetX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternOffsetY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternScaleX', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternScaleY', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientStartPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientStartPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientEndPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientEndPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [\n    'x',\n    'y'\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternRotation', 0);\nFactory_1.Factory.backCompat(Shape, {\n    dashArray: 'dash',\n    getDashArray: 'getDash',\n    setDashArray: 'getDash',\n    drawFunc: 'sceneFunc',\n    getDrawFunc: 'getSceneFunc',\n    setDrawFunc: 'setSceneFunc',\n    drawHitFunc: 'hitFunc',\n    getDrawHitFunc: 'getHitFunc',\n    setDrawHitFunc: 'setHitFunc'\n});\nUtil_1.Collection.mapMethods(Shape);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Shape.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Stage.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/Stage.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ./Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Canvas_1 = __webpack_require__(/*! ./Canvas */ \"./node_modules/konva/lib/Canvas.js\");\nvar DragAndDrop_1 = __webpack_require__(/*! ./DragAndDrop */ \"./node_modules/konva/lib/DragAndDrop.js\");\nvar Global_2 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar PointerEvents = __webpack_require__(/*! ./PointerEvents */ \"./node_modules/konva/lib/PointerEvents.js\");\nvar STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', CONTEXTMENU = 'contextmenu', CLICK = 'click', DBL_CLICK = 'dblclick', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TAP = 'tap', DBL_TAP = 'dbltap', TOUCHMOVE = 'touchmove', WHEEL = 'wheel', CONTENT_MOUSEOUT = 'contentMouseout', CONTENT_MOUSEOVER = 'contentMouseover', CONTENT_MOUSEMOVE = 'contentMousemove', CONTENT_MOUSEDOWN = 'contentMousedown', CONTENT_MOUSEUP = 'contentMouseup', CONTENT_CONTEXTMENU = 'contentContextmenu', CONTENT_CLICK = 'contentClick', CONTENT_DBL_CLICK = 'contentDblclick', CONTENT_TOUCHSTART = 'contentTouchstart', CONTENT_TOUCHEND = 'contentTouchend', CONTENT_DBL_TAP = 'contentDbltap', CONTENT_TAP = 'contentTap', CONTENT_TOUCHMOVE = 'contentTouchmove', CONTENT_POINTERMOVE = 'contentPointermove', CONTENT_POINTERDOWN = 'contentPointerdown', CONTENT_POINTERUP = 'contentPointerup', CONTENT_WHEEL = 'contentWheel', RELATIVE = 'relative', KONVA_CONTENT = 'konvajs-content', SPACE = ' ', UNDERSCORE = '_', CONTAINER = 'container', MAX_LAYERS_NUMBER = 5, EMPTY_STRING = '', EVENTS = [\n    MOUSEENTER,\n    MOUSEDOWN,\n    MOUSEMOVE,\n    MOUSEUP,\n    MOUSEOUT,\n    TOUCHSTART,\n    TOUCHMOVE,\n    TOUCHEND,\n    MOUSEOVER,\n    WHEEL,\n    CONTEXTMENU,\n    POINTERDOWN,\n    POINTERMOVE,\n    POINTERUP,\n    POINTERCANCEL,\n    LOSTPOINTERCAPTURE\n], eventsLength = EVENTS.length;\nfunction addEvent(ctx, eventName) {\n    ctx.content.addEventListener(eventName, function (evt) {\n        ctx[UNDERSCORE + eventName](evt);\n    }, false);\n}\nvar NO_POINTERS_MESSAGE = \"Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);\";\nexports.stages = [];\nfunction checkNoClip(attrs) {\n    if (attrs === void 0) { attrs = {}; }\n    if (attrs.clipFunc || attrs.clipWidth || attrs.clipHeight) {\n        Util_1.Util.warn('Stage does not support clipping. Please use clip for Layers or Groups.');\n    }\n    return attrs;\n}\nvar Stage = (function (_super) {\n    __extends(Stage, _super);\n    function Stage(config) {\n        var _this = _super.call(this, checkNoClip(config)) || this;\n        _this._pointerPositions = [];\n        _this._changedPointerPositions = [];\n        _this._buildDOM();\n        _this._bindContentEvents();\n        exports.stages.push(_this);\n        _this.on('widthChange.konva heightChange.konva', _this._resizeDOM);\n        _this.on('visibleChange.konva', _this._checkVisibility);\n        _this.on('clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva', function () {\n            checkNoClip(_this.attrs);\n        });\n        _this._checkVisibility();\n        return _this;\n    }\n    Stage.prototype._validateAdd = function (child) {\n        var isLayer = child.getType() === 'Layer';\n        var isFastLayer = child.getType() === 'FastLayer';\n        var valid = isLayer || isFastLayer;\n        if (!valid) {\n            Util_1.Util.throw('You may only add layers to the stage.');\n        }\n    };\n    Stage.prototype._checkVisibility = function () {\n        if (!this.content) {\n            return;\n        }\n        var style = this.visible() ? '' : 'none';\n        this.content.style.display = style;\n    };\n    Stage.prototype.setContainer = function (container) {\n        if (typeof container === STRING) {\n            if (container.charAt(0) === '.') {\n                var className = container.slice(1);\n                container = document.getElementsByClassName(className)[0];\n            }\n            else {\n                var id;\n                if (container.charAt(0) !== '#') {\n                    id = container;\n                }\n                else {\n                    id = container.slice(1);\n                }\n                container = document.getElementById(id);\n            }\n            if (!container) {\n                throw 'Can not find container in document with id ' + id;\n            }\n        }\n        this._setAttr(CONTAINER, container);\n        if (this.content) {\n            if (this.content.parentElement) {\n                this.content.parentElement.removeChild(this.content);\n            }\n            container.appendChild(this.content);\n        }\n        return this;\n    };\n    Stage.prototype.shouldDrawHit = function () {\n        return true;\n    };\n    Stage.prototype.clear = function () {\n        var layers = this.children, len = layers.length, n;\n        for (n = 0; n < len; n++) {\n            layers[n].clear();\n        }\n        return this;\n    };\n    Stage.prototype.clone = function (obj) {\n        if (!obj) {\n            obj = {};\n        }\n        obj.container = document.createElement('div');\n        return Container_1.Container.prototype.clone.call(this, obj);\n    };\n    Stage.prototype.destroy = function () {\n        _super.prototype.destroy.call(this);\n        var content = this.content;\n        if (content && Util_1.Util._isInDocument(content)) {\n            this.container().removeChild(content);\n        }\n        var index = exports.stages.indexOf(this);\n        if (index > -1) {\n            exports.stages.splice(index, 1);\n        }\n        return this;\n    };\n    Stage.prototype.getPointerPosition = function () {\n        var pos = this._pointerPositions[0] || this._changedPointerPositions[0];\n        if (!pos) {\n            Util_1.Util.warn(NO_POINTERS_MESSAGE);\n            return null;\n        }\n        return {\n            x: pos.x,\n            y: pos.y\n        };\n    };\n    Stage.prototype._getPointerById = function (id) {\n        return this._pointerPositions.find(function (p) { return p.id === id; });\n    };\n    Stage.prototype.getPointersPositions = function () {\n        return this._pointerPositions;\n    };\n    Stage.prototype.getStage = function () {\n        return this;\n    };\n    Stage.prototype.getContent = function () {\n        return this.content;\n    };\n    Stage.prototype._toKonvaCanvas = function (config) {\n        config = config || {};\n        var x = config.x || 0, y = config.y || 0, canvas = new Canvas_1.SceneCanvas({\n            width: config.width || this.width(),\n            height: config.height || this.height(),\n            pixelRatio: config.pixelRatio || 1\n        }), _context = canvas.getContext()._context, layers = this.children;\n        if (x || y) {\n            _context.translate(-1 * x, -1 * y);\n        }\n        layers.each(function (layer) {\n            if (!layer.isVisible()) {\n                return;\n            }\n            var layerCanvas = layer._toKonvaCanvas(config);\n            _context.drawImage(layerCanvas._canvas, x, y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());\n        });\n        return canvas;\n    };\n    Stage.prototype.getIntersection = function (pos, selector) {\n        if (!pos) {\n            return null;\n        }\n        var layers = this.children, len = layers.length, end = len - 1, n, shape;\n        for (n = end; n >= 0; n--) {\n            shape = layers[n].getIntersection(pos, selector);\n            if (shape) {\n                return shape;\n            }\n        }\n        return null;\n    };\n    Stage.prototype._resizeDOM = function () {\n        var width = this.width();\n        var height = this.height();\n        if (this.content) {\n            this.content.style.width = width + PX;\n            this.content.style.height = height + PX;\n        }\n        this.bufferCanvas.setSize(width, height);\n        this.bufferHitCanvas.setSize(width, height);\n        this.children.each(function (layer) {\n            layer.setSize({ width: width, height: height });\n            layer.draw();\n        });\n    };\n    Stage.prototype.add = function (layer) {\n        if (arguments.length > 1) {\n            for (var i = 0; i < arguments.length; i++) {\n                this.add(arguments[i]);\n            }\n            return this;\n        }\n        _super.prototype.add.call(this, layer);\n        var length = this.children.length;\n        if (length > MAX_LAYERS_NUMBER) {\n            Util_1.Util.warn('The stage has ' +\n                length +\n                ' layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.');\n        }\n        layer.setSize({ width: this.width(), height: this.height() });\n        layer.draw();\n        if (Global_1.Konva.isBrowser) {\n            this.content.appendChild(layer.canvas._canvas);\n        }\n        return this;\n    };\n    Stage.prototype.getParent = function () {\n        return null;\n    };\n    Stage.prototype.getLayer = function () {\n        return null;\n    };\n    Stage.prototype.hasPointerCapture = function (pointerId) {\n        return PointerEvents.hasPointerCapture(pointerId, this);\n    };\n    Stage.prototype.setPointerCapture = function (pointerId) {\n        PointerEvents.setPointerCapture(pointerId, this);\n    };\n    Stage.prototype.releaseCapture = function (pointerId) {\n        PointerEvents.releaseCapture(pointerId, this);\n    };\n    Stage.prototype.getLayers = function () {\n        return this.getChildren();\n    };\n    Stage.prototype._bindContentEvents = function () {\n        if (!Global_1.Konva.isBrowser) {\n            return;\n        }\n        for (var n = 0; n < eventsLength; n++) {\n            addEvent(this, EVENTS[n]);\n        }\n    };\n    Stage.prototype._mouseenter = function (evt) {\n        this.setPointersPositions(evt);\n        this._fire(MOUSEENTER, { evt: evt, target: this, currentTarget: this });\n    };\n    Stage.prototype._mouseover = function (evt) {\n        this.setPointersPositions(evt);\n        this._fire(CONTENT_MOUSEOVER, { evt: evt });\n        this._fire(MOUSEOVER, { evt: evt, target: this, currentTarget: this });\n    };\n    Stage.prototype._mouseout = function (evt) {\n        var _a;\n        this.setPointersPositions(evt);\n        var targetShape = ((_a = this.targetShape) === null || _a === void 0 ? void 0 : _a.getStage()) ? this.targetShape : null;\n        var eventsEnabled = !DragAndDrop_1.DD.isDragging || Global_1.Konva.hitOnDragEnabled;\n        if (targetShape && eventsEnabled) {\n            targetShape._fireAndBubble(MOUSEOUT, { evt: evt });\n            targetShape._fireAndBubble(MOUSELEAVE, { evt: evt });\n            this._fire(MOUSELEAVE, { evt: evt, target: this, currentTarget: this });\n            this.targetShape = null;\n        }\n        else if (eventsEnabled) {\n            this._fire(MOUSELEAVE, {\n                evt: evt,\n                target: this,\n                currentTarget: this\n            });\n            this._fire(MOUSEOUT, {\n                evt: evt,\n                target: this,\n                currentTarget: this\n            });\n        }\n        this.pointerPos = undefined;\n        this._pointerPositions = [];\n        this._fire(CONTENT_MOUSEOUT, { evt: evt });\n    };\n    Stage.prototype._mousemove = function (evt) {\n        var _a;\n        if (Global_1.Konva.UA.ieMobile) {\n            return this._touchmove(evt);\n        }\n        this.setPointersPositions(evt);\n        var pointerId = Util_1.Util._getFirstPointerId(evt);\n        var shape;\n        var targetShape = ((_a = this.targetShape) === null || _a === void 0 ? void 0 : _a.getStage()) ? this.targetShape : null;\n        var eventsEnabled = !DragAndDrop_1.DD.isDragging || Global_1.Konva.hitOnDragEnabled;\n        if (eventsEnabled) {\n            shape = this.getIntersection(this.getPointerPosition());\n            if (shape && shape.isListening()) {\n                var differentTarget = targetShape !== shape;\n                if (eventsEnabled && differentTarget) {\n                    if (targetShape) {\n                        targetShape._fireAndBubble(MOUSEOUT, { evt: evt, pointerId: pointerId }, shape);\n                        targetShape._fireAndBubble(MOUSELEAVE, { evt: evt, pointerId: pointerId }, shape);\n                    }\n                    shape._fireAndBubble(MOUSEOVER, { evt: evt, pointerId: pointerId }, targetShape);\n                    shape._fireAndBubble(MOUSEENTER, { evt: evt, pointerId: pointerId }, targetShape);\n                    shape._fireAndBubble(MOUSEMOVE, { evt: evt, pointerId: pointerId });\n                    this.targetShape = shape;\n                }\n                else {\n                    shape._fireAndBubble(MOUSEMOVE, { evt: evt, pointerId: pointerId });\n                }\n            }\n            else {\n                if (targetShape && eventsEnabled) {\n                    targetShape._fireAndBubble(MOUSEOUT, { evt: evt, pointerId: pointerId });\n                    targetShape._fireAndBubble(MOUSELEAVE, { evt: evt, pointerId: pointerId });\n                    this._fire(MOUSEOVER, {\n                        evt: evt,\n                        target: this,\n                        currentTarget: this,\n                        pointerId: pointerId\n                    });\n                    this.targetShape = null;\n                }\n                this._fire(MOUSEMOVE, {\n                    evt: evt,\n                    target: this,\n                    currentTarget: this,\n                    pointerId: pointerId\n                });\n            }\n            this._fire(CONTENT_MOUSEMOVE, { evt: evt });\n        }\n        if (evt.cancelable) {\n            evt.preventDefault();\n        }\n    };\n    Stage.prototype._mousedown = function (evt) {\n        if (Global_1.Konva.UA.ieMobile) {\n            return this._touchstart(evt);\n        }\n        this.setPointersPositions(evt);\n        var pointerId = Util_1.Util._getFirstPointerId(evt);\n        var shape = this.getIntersection(this.getPointerPosition());\n        DragAndDrop_1.DD.justDragged = false;\n        Global_1.Konva.listenClickTap = true;\n        if (shape && shape.isListening()) {\n            this.clickStartShape = shape;\n            shape._fireAndBubble(MOUSEDOWN, { evt: evt, pointerId: pointerId });\n        }\n        else {\n            this._fire(MOUSEDOWN, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: pointerId\n            });\n        }\n        this._fire(CONTENT_MOUSEDOWN, { evt: evt });\n    };\n    Stage.prototype._mouseup = function (evt) {\n        if (Global_1.Konva.UA.ieMobile) {\n            return this._touchend(evt);\n        }\n        this.setPointersPositions(evt);\n        var pointerId = Util_1.Util._getFirstPointerId(evt);\n        var shape = this.getIntersection(this.getPointerPosition()), clickStartShape = this.clickStartShape, clickEndShape = this.clickEndShape, fireDblClick = false;\n        if (Global_1.Konva.inDblClickWindow) {\n            fireDblClick = true;\n            clearTimeout(this.dblTimeout);\n        }\n        else if (!DragAndDrop_1.DD.justDragged) {\n            Global_1.Konva.inDblClickWindow = true;\n            clearTimeout(this.dblTimeout);\n        }\n        this.dblTimeout = setTimeout(function () {\n            Global_1.Konva.inDblClickWindow = false;\n        }, Global_1.Konva.dblClickWindow);\n        if (shape && shape.isListening()) {\n            this.clickEndShape = shape;\n            shape._fireAndBubble(MOUSEUP, { evt: evt, pointerId: pointerId });\n            if (Global_1.Konva.listenClickTap &&\n                clickStartShape &&\n                clickStartShape._id === shape._id) {\n                shape._fireAndBubble(CLICK, { evt: evt, pointerId: pointerId });\n                if (fireDblClick && clickEndShape && clickEndShape === shape) {\n                    shape._fireAndBubble(DBL_CLICK, { evt: evt, pointerId: pointerId });\n                }\n            }\n        }\n        else {\n            this._fire(MOUSEUP, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: pointerId\n            });\n            if (Global_1.Konva.listenClickTap) {\n                this._fire(CLICK, {\n                    evt: evt,\n                    target: this,\n                    currentTarget: this,\n                    pointerId: pointerId\n                });\n            }\n            if (fireDblClick) {\n                this._fire(DBL_CLICK, {\n                    evt: evt,\n                    target: this,\n                    currentTarget: this,\n                    pointerId: pointerId\n                });\n            }\n        }\n        this._fire(CONTENT_MOUSEUP, { evt: evt });\n        if (Global_1.Konva.listenClickTap) {\n            this._fire(CONTENT_CLICK, { evt: evt });\n            if (fireDblClick) {\n                this._fire(CONTENT_DBL_CLICK, { evt: evt });\n            }\n        }\n        Global_1.Konva.listenClickTap = false;\n        if (evt.cancelable) {\n            evt.preventDefault();\n        }\n    };\n    Stage.prototype._contextmenu = function (evt) {\n        this.setPointersPositions(evt);\n        var shape = this.getIntersection(this.getPointerPosition());\n        if (shape && shape.isListening()) {\n            shape._fireAndBubble(CONTEXTMENU, { evt: evt });\n        }\n        else {\n            this._fire(CONTEXTMENU, {\n                evt: evt,\n                target: this,\n                currentTarget: this\n            });\n        }\n        this._fire(CONTENT_CONTEXTMENU, { evt: evt });\n    };\n    Stage.prototype._touchstart = function (evt) {\n        var _this = this;\n        this.setPointersPositions(evt);\n        var triggeredOnShape = false;\n        this._changedPointerPositions.forEach(function (pos) {\n            var shape = _this.getIntersection(pos);\n            Global_1.Konva.listenClickTap = true;\n            DragAndDrop_1.DD.justDragged = false;\n            var hasShape = shape && shape.isListening();\n            if (!hasShape) {\n                return;\n            }\n            if (Global_1.Konva.captureTouchEventsEnabled) {\n                shape.setPointerCapture(pos.id);\n            }\n            _this.tapStartShape = shape;\n            shape._fireAndBubble(TOUCHSTART, { evt: evt, pointerId: pos.id }, _this);\n            triggeredOnShape = true;\n            if (shape.isListening() && shape.preventDefault() && evt.cancelable) {\n                evt.preventDefault();\n            }\n        });\n        if (!triggeredOnShape) {\n            this._fire(TOUCHSTART, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id\n            });\n        }\n        this._fire(CONTENT_TOUCHSTART, { evt: evt });\n    };\n    Stage.prototype._touchmove = function (evt) {\n        var _this = this;\n        this.setPointersPositions(evt);\n        var eventsEnabled = !DragAndDrop_1.DD.isDragging || Global_1.Konva.hitOnDragEnabled;\n        if (eventsEnabled) {\n            var triggeredOnShape = false;\n            var processedShapesIds = {};\n            this._changedPointerPositions.forEach(function (pos) {\n                var shape = PointerEvents.getCapturedShape(pos.id) || _this.getIntersection(pos);\n                var hasShape = shape && shape.isListening();\n                if (!hasShape) {\n                    return;\n                }\n                if (processedShapesIds[shape._id]) {\n                    return;\n                }\n                processedShapesIds[shape._id] = true;\n                shape._fireAndBubble(TOUCHMOVE, { evt: evt, pointerId: pos.id });\n                triggeredOnShape = true;\n                if (shape.isListening() && shape.preventDefault() && evt.cancelable) {\n                    evt.preventDefault();\n                }\n            });\n            if (!triggeredOnShape) {\n                this._fire(TOUCHMOVE, {\n                    evt: evt,\n                    target: this,\n                    currentTarget: this,\n                    pointerId: this._changedPointerPositions[0].id\n                });\n            }\n            this._fire(CONTENT_TOUCHMOVE, { evt: evt });\n        }\n        if (DragAndDrop_1.DD.isDragging && DragAndDrop_1.DD.node.preventDefault() && evt.cancelable) {\n            evt.preventDefault();\n        }\n    };\n    Stage.prototype._touchend = function (evt) {\n        var _this = this;\n        this.setPointersPositions(evt);\n        var clickEndShape = this.clickEndShape, fireDblClick = false;\n        if (Global_1.Konva.inDblClickWindow) {\n            fireDblClick = true;\n            clearTimeout(this.dblTimeout);\n        }\n        else if (!DragAndDrop_1.DD.justDragged) {\n            Global_1.Konva.inDblClickWindow = true;\n            clearTimeout(this.dblTimeout);\n        }\n        this.dblTimeout = setTimeout(function () {\n            Global_1.Konva.inDblClickWindow = false;\n        }, Global_1.Konva.dblClickWindow);\n        var triggeredOnShape = false;\n        var processedShapesIds = {};\n        var tapTriggered = false;\n        var dblTapTriggered = false;\n        this._changedPointerPositions.forEach(function (pos) {\n            var shape = PointerEvents.getCapturedShape(pos.id) ||\n                _this.getIntersection(pos);\n            if (shape) {\n                shape.releaseCapture(pos.id);\n            }\n            var hasShape = shape && shape.isListening();\n            if (!hasShape) {\n                return;\n            }\n            if (processedShapesIds[shape._id]) {\n                return;\n            }\n            processedShapesIds[shape._id] = true;\n            _this.clickEndShape = shape;\n            shape._fireAndBubble(TOUCHEND, { evt: evt, pointerId: pos.id });\n            triggeredOnShape = true;\n            if (Global_1.Konva.listenClickTap && shape === _this.tapStartShape) {\n                tapTriggered = true;\n                shape._fireAndBubble(TAP, { evt: evt, pointerId: pos.id });\n                if (fireDblClick && clickEndShape && clickEndShape === shape) {\n                    dblTapTriggered = true;\n                    shape._fireAndBubble(DBL_TAP, { evt: evt, pointerId: pos.id });\n                }\n            }\n            if (shape.isListening() && shape.preventDefault() && evt.cancelable) {\n                evt.preventDefault();\n            }\n        });\n        if (!triggeredOnShape) {\n            this._fire(TOUCHEND, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id\n            });\n        }\n        if (Global_1.Konva.listenClickTap && !tapTriggered) {\n            this._fire(TAP, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id\n            });\n        }\n        if (fireDblClick && !dblTapTriggered) {\n            this._fire(DBL_TAP, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id\n            });\n        }\n        this._fire(CONTENT_TOUCHEND, { evt: evt });\n        if (Global_1.Konva.listenClickTap) {\n            this._fire(CONTENT_TAP, { evt: evt });\n            if (fireDblClick) {\n                this._fire(CONTENT_DBL_TAP, { evt: evt });\n            }\n        }\n        Global_1.Konva.listenClickTap = false;\n    };\n    Stage.prototype._wheel = function (evt) {\n        this.setPointersPositions(evt);\n        var shape = this.getIntersection(this.getPointerPosition());\n        if (shape && shape.isListening()) {\n            shape._fireAndBubble(WHEEL, { evt: evt });\n        }\n        else {\n            this._fire(WHEEL, {\n                evt: evt,\n                target: this,\n                currentTarget: this\n            });\n        }\n        this._fire(CONTENT_WHEEL, { evt: evt });\n    };\n    Stage.prototype._pointerdown = function (evt) {\n        if (!Global_1.Konva._pointerEventsEnabled) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        var shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n            this.getIntersection(this.getPointerPosition());\n        if (shape) {\n            shape._fireAndBubble(POINTERDOWN, PointerEvents.createEvent(evt));\n        }\n    };\n    Stage.prototype._pointermove = function (evt) {\n        if (!Global_1.Konva._pointerEventsEnabled) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        var shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n            this.getIntersection(this.getPointerPosition());\n        if (shape) {\n            shape._fireAndBubble(POINTERMOVE, PointerEvents.createEvent(evt));\n        }\n    };\n    Stage.prototype._pointerup = function (evt) {\n        if (!Global_1.Konva._pointerEventsEnabled) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        var shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n            this.getIntersection(this.getPointerPosition());\n        if (shape) {\n            shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n        }\n        PointerEvents.releaseCapture(evt.pointerId);\n    };\n    Stage.prototype._pointercancel = function (evt) {\n        if (!Global_1.Konva._pointerEventsEnabled) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        var shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n            this.getIntersection(this.getPointerPosition());\n        if (shape) {\n            shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n        }\n        PointerEvents.releaseCapture(evt.pointerId);\n    };\n    Stage.prototype._lostpointercapture = function (evt) {\n        PointerEvents.releaseCapture(evt.pointerId);\n    };\n    Stage.prototype.setPointersPositions = function (evt) {\n        var _this = this;\n        var contentPosition = this._getContentPosition(), x = null, y = null;\n        evt = evt ? evt : window.event;\n        if (evt.touches !== undefined) {\n            this._pointerPositions = [];\n            this._changedPointerPositions = [];\n            Util_1.Collection.prototype.each.call(evt.touches, function (touch) {\n                _this._pointerPositions.push({\n                    id: touch.identifier,\n                    x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n                    y: (touch.clientY - contentPosition.top) / contentPosition.scaleY\n                });\n            });\n            Util_1.Collection.prototype.each.call(evt.changedTouches || evt.touches, function (touch) {\n                _this._changedPointerPositions.push({\n                    id: touch.identifier,\n                    x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n                    y: (touch.clientY - contentPosition.top) / contentPosition.scaleY\n                });\n            });\n        }\n        else {\n            x = (evt.clientX - contentPosition.left) / contentPosition.scaleX;\n            y = (evt.clientY - contentPosition.top) / contentPosition.scaleY;\n            this.pointerPos = {\n                x: x,\n                y: y\n            };\n            this._pointerPositions = [{ x: x, y: y, id: Util_1.Util._getFirstPointerId(evt) }];\n            this._changedPointerPositions = [\n                { x: x, y: y, id: Util_1.Util._getFirstPointerId(evt) }\n            ];\n        }\n    };\n    Stage.prototype._setPointerPosition = function (evt) {\n        Util_1.Util.warn('Method _setPointerPosition is deprecated. Use \"stage.setPointersPositions(event)\" instead.');\n        this.setPointersPositions(evt);\n    };\n    Stage.prototype._getContentPosition = function () {\n        if (!this.content || !this.content.getBoundingClientRect) {\n            return {\n                top: 0,\n                left: 0,\n                scaleX: 1,\n                scaleY: 1\n            };\n        }\n        var rect = this.content.getBoundingClientRect();\n        return {\n            top: rect.top,\n            left: rect.left,\n            scaleX: rect.width / this.content.clientWidth || 1,\n            scaleY: rect.height / this.content.clientHeight || 1\n        };\n    };\n    Stage.prototype._buildDOM = function () {\n        this.bufferCanvas = new Canvas_1.SceneCanvas({\n            width: this.width(),\n            height: this.height()\n        });\n        this.bufferHitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: 1,\n            width: this.width(),\n            height: this.height()\n        });\n        if (!Global_1.Konva.isBrowser) {\n            return;\n        }\n        var container = this.container();\n        if (!container) {\n            throw 'Stage has no container. A container is required.';\n        }\n        container.innerHTML = EMPTY_STRING;\n        this.content = document.createElement('div');\n        this.content.style.position = RELATIVE;\n        this.content.style.userSelect = 'none';\n        this.content.className = KONVA_CONTENT;\n        this.content.setAttribute('role', 'presentation');\n        container.appendChild(this.content);\n        this._resizeDOM();\n    };\n    Stage.prototype.cache = function () {\n        Util_1.Util.warn('Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.');\n        return this;\n    };\n    Stage.prototype.clearCache = function () {\n        return this;\n    };\n    Stage.prototype.batchDraw = function () {\n        this.children.each(function (layer) {\n            layer.batchDraw();\n        });\n        return this;\n    };\n    return Stage;\n}(Container_1.Container));\nexports.Stage = Stage;\nStage.prototype.nodeType = STAGE;\nGlobal_2._registerNode(Stage);\nFactory_1.Factory.addGetterSetter(Stage, 'container');\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Stage.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Tween.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/Tween.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Animation_1 = __webpack_require__(/*! ./Animation */ \"./node_modules/konva/lib/Animation.js\");\nvar Node_1 = __webpack_require__(/*! ./Node */ \"./node_modules/konva/lib/Node.js\");\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar blacklist = {\n    node: 1,\n    duration: 1,\n    easing: 1,\n    onFinish: 1,\n    yoyo: 1\n}, PAUSED = 1, PLAYING = 2, REVERSING = 3, idCounter = 0, colorAttrs = ['fill', 'stroke', 'shadowColor'];\nvar TweenEngine = (function () {\n    function TweenEngine(prop, propFunc, func, begin, finish, duration, yoyo) {\n        this.prop = prop;\n        this.propFunc = propFunc;\n        this.begin = begin;\n        this._pos = begin;\n        this.duration = duration;\n        this._change = 0;\n        this.prevPos = 0;\n        this.yoyo = yoyo;\n        this._time = 0;\n        this._position = 0;\n        this._startTime = 0;\n        this._finish = 0;\n        this.func = func;\n        this._change = finish - this.begin;\n        this.pause();\n    }\n    TweenEngine.prototype.fire = function (str) {\n        var handler = this[str];\n        if (handler) {\n            handler();\n        }\n    };\n    TweenEngine.prototype.setTime = function (t) {\n        if (t > this.duration) {\n            if (this.yoyo) {\n                this._time = this.duration;\n                this.reverse();\n            }\n            else {\n                this.finish();\n            }\n        }\n        else if (t < 0) {\n            if (this.yoyo) {\n                this._time = 0;\n                this.play();\n            }\n            else {\n                this.reset();\n            }\n        }\n        else {\n            this._time = t;\n            this.update();\n        }\n    };\n    TweenEngine.prototype.getTime = function () {\n        return this._time;\n    };\n    TweenEngine.prototype.setPosition = function (p) {\n        this.prevPos = this._pos;\n        this.propFunc(p);\n        this._pos = p;\n    };\n    TweenEngine.prototype.getPosition = function (t) {\n        if (t === undefined) {\n            t = this._time;\n        }\n        return this.func(t, this.begin, this._change, this.duration);\n    };\n    TweenEngine.prototype.play = function () {\n        this.state = PLAYING;\n        this._startTime = this.getTimer() - this._time;\n        this.onEnterFrame();\n        this.fire('onPlay');\n    };\n    TweenEngine.prototype.reverse = function () {\n        this.state = REVERSING;\n        this._time = this.duration - this._time;\n        this._startTime = this.getTimer() - this._time;\n        this.onEnterFrame();\n        this.fire('onReverse');\n    };\n    TweenEngine.prototype.seek = function (t) {\n        this.pause();\n        this._time = t;\n        this.update();\n        this.fire('onSeek');\n    };\n    TweenEngine.prototype.reset = function () {\n        this.pause();\n        this._time = 0;\n        this.update();\n        this.fire('onReset');\n    };\n    TweenEngine.prototype.finish = function () {\n        this.pause();\n        this._time = this.duration;\n        this.update();\n        this.fire('onFinish');\n    };\n    TweenEngine.prototype.update = function () {\n        this.setPosition(this.getPosition(this._time));\n    };\n    TweenEngine.prototype.onEnterFrame = function () {\n        var t = this.getTimer() - this._startTime;\n        if (this.state === PLAYING) {\n            this.setTime(t);\n        }\n        else if (this.state === REVERSING) {\n            this.setTime(this.duration - t);\n        }\n    };\n    TweenEngine.prototype.pause = function () {\n        this.state = PAUSED;\n        this.fire('onPause');\n    };\n    TweenEngine.prototype.getTimer = function () {\n        return new Date().getTime();\n    };\n    return TweenEngine;\n}());\nvar Tween = (function () {\n    function Tween(config) {\n        var that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || exports.Easings.Linear, yoyo = !!config.yoyo, key;\n        if (typeof config.duration === 'undefined') {\n            duration = 0.3;\n        }\n        else if (config.duration === 0) {\n            duration = 0.001;\n        }\n        else {\n            duration = config.duration;\n        }\n        this.node = node;\n        this._id = idCounter++;\n        var layers = node.getLayer() ||\n            (node instanceof Global_1.Konva['Stage'] ? node.getLayers() : null);\n        if (!layers) {\n            Util_1.Util.error('Tween constructor have `node` that is not in a layer. Please add node into layer first.');\n        }\n        this.anim = new Animation_1.Animation(function () {\n            that.tween.onEnterFrame();\n        }, layers);\n        this.tween = new TweenEngine(key, function (i) {\n            that._tweenFunc(i);\n        }, easing, 0, 1, duration * 1000, yoyo);\n        this._addListeners();\n        if (!Tween.attrs[nodeId]) {\n            Tween.attrs[nodeId] = {};\n        }\n        if (!Tween.attrs[nodeId][this._id]) {\n            Tween.attrs[nodeId][this._id] = {};\n        }\n        if (!Tween.tweens[nodeId]) {\n            Tween.tweens[nodeId] = {};\n        }\n        for (key in config) {\n            if (blacklist[key] === undefined) {\n                this._addAttr(key, config[key]);\n            }\n        }\n        this.reset();\n        this.onFinish = config.onFinish;\n        this.onReset = config.onReset;\n    }\n    Tween.prototype._addAttr = function (key, end) {\n        var node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;\n        tweenId = Tween.tweens[nodeId][key];\n        if (tweenId) {\n            delete Tween.attrs[nodeId][tweenId][key];\n        }\n        start = node.getAttr(key);\n        if (Util_1.Util._isArray(end)) {\n            diff = [];\n            len = Math.max(end.length, start.length);\n            if (key === 'points' && end.length !== start.length) {\n                if (end.length > start.length) {\n                    trueStart = start;\n                    start = Util_1.Util._prepareArrayForTween(start, end, node.closed());\n                }\n                else {\n                    trueEnd = end;\n                    end = Util_1.Util._prepareArrayForTween(end, start, node.closed());\n                }\n            }\n            if (key.indexOf('fill') === 0) {\n                for (n = 0; n < len; n++) {\n                    if (n % 2 === 0) {\n                        diff.push(end[n] - start[n]);\n                    }\n                    else {\n                        var startRGBA = Util_1.Util.colorToRGBA(start[n]);\n                        endRGBA = Util_1.Util.colorToRGBA(end[n]);\n                        start[n] = startRGBA;\n                        diff.push({\n                            r: endRGBA.r - startRGBA.r,\n                            g: endRGBA.g - startRGBA.g,\n                            b: endRGBA.b - startRGBA.b,\n                            a: endRGBA.a - startRGBA.a\n                        });\n                    }\n                }\n            }\n            else {\n                for (n = 0; n < len; n++) {\n                    diff.push(end[n] - start[n]);\n                }\n            }\n        }\n        else if (colorAttrs.indexOf(key) !== -1) {\n            start = Util_1.Util.colorToRGBA(start);\n            endRGBA = Util_1.Util.colorToRGBA(end);\n            diff = {\n                r: endRGBA.r - start.r,\n                g: endRGBA.g - start.g,\n                b: endRGBA.b - start.b,\n                a: endRGBA.a - start.a\n            };\n        }\n        else {\n            diff = end - start;\n        }\n        Tween.attrs[nodeId][this._id][key] = {\n            start: start,\n            diff: diff,\n            end: end,\n            trueEnd: trueEnd,\n            trueStart: trueStart\n        };\n        Tween.tweens[nodeId][key] = this._id;\n    };\n    Tween.prototype._tweenFunc = function (i) {\n        var node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;\n        for (key in attrs) {\n            attr = attrs[key];\n            start = attr.start;\n            diff = attr.diff;\n            end = attr.end;\n            if (Util_1.Util._isArray(start)) {\n                newVal = [];\n                len = Math.max(start.length, end.length);\n                if (key.indexOf('fill') === 0) {\n                    for (n = 0; n < len; n++) {\n                        if (n % 2 === 0) {\n                            newVal.push((start[n] || 0) + diff[n] * i);\n                        }\n                        else {\n                            newVal.push('rgba(' +\n                                Math.round(start[n].r + diff[n].r * i) +\n                                ',' +\n                                Math.round(start[n].g + diff[n].g * i) +\n                                ',' +\n                                Math.round(start[n].b + diff[n].b * i) +\n                                ',' +\n                                (start[n].a + diff[n].a * i) +\n                                ')');\n                        }\n                    }\n                }\n                else {\n                    for (n = 0; n < len; n++) {\n                        newVal.push((start[n] || 0) + diff[n] * i);\n                    }\n                }\n            }\n            else if (colorAttrs.indexOf(key) !== -1) {\n                newVal =\n                    'rgba(' +\n                        Math.round(start.r + diff.r * i) +\n                        ',' +\n                        Math.round(start.g + diff.g * i) +\n                        ',' +\n                        Math.round(start.b + diff.b * i) +\n                        ',' +\n                        (start.a + diff.a * i) +\n                        ')';\n            }\n            else {\n                newVal = start + diff * i;\n            }\n            node.setAttr(key, newVal);\n        }\n    };\n    Tween.prototype._addListeners = function () {\n        var _this = this;\n        this.tween.onPlay = function () {\n            _this.anim.start();\n        };\n        this.tween.onReverse = function () {\n            _this.anim.start();\n        };\n        this.tween.onPause = function () {\n            _this.anim.stop();\n        };\n        this.tween.onFinish = function () {\n            var node = _this.node;\n            var attrs = Tween.attrs[node._id][_this._id];\n            if (attrs.points && attrs.points.trueEnd) {\n                node.setAttr('points', attrs.points.trueEnd);\n            }\n            if (_this.onFinish) {\n                _this.onFinish.call(_this);\n            }\n        };\n        this.tween.onReset = function () {\n            var node = _this.node;\n            var attrs = Tween.attrs[node._id][_this._id];\n            if (attrs.points && attrs.points.trueStart) {\n                node.points(attrs.points.trueStart);\n            }\n            if (_this.onReset) {\n                _this.onReset();\n            }\n        };\n    };\n    Tween.prototype.play = function () {\n        this.tween.play();\n        return this;\n    };\n    Tween.prototype.reverse = function () {\n        this.tween.reverse();\n        return this;\n    };\n    Tween.prototype.reset = function () {\n        this.tween.reset();\n        return this;\n    };\n    Tween.prototype.seek = function (t) {\n        this.tween.seek(t * 1000);\n        return this;\n    };\n    Tween.prototype.pause = function () {\n        this.tween.pause();\n        return this;\n    };\n    Tween.prototype.finish = function () {\n        this.tween.finish();\n        return this;\n    };\n    Tween.prototype.destroy = function () {\n        var nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;\n        this.pause();\n        for (key in attrs) {\n            delete Tween.tweens[nodeId][key];\n        }\n        delete Tween.attrs[nodeId][thisId];\n    };\n    Tween.attrs = {};\n    Tween.tweens = {};\n    return Tween;\n}());\nexports.Tween = Tween;\nNode_1.Node.prototype.to = function (params) {\n    var onFinish = params.onFinish;\n    params.node = this;\n    params.onFinish = function () {\n        this.destroy();\n        if (onFinish) {\n            onFinish();\n        }\n    };\n    var tween = new Tween(params);\n    tween.play();\n};\nexports.Easings = {\n    BackEaseIn: function (t, b, c, d) {\n        var s = 1.70158;\n        return c * (t /= d) * t * ((s + 1) * t - s) + b;\n    },\n    BackEaseOut: function (t, b, c, d) {\n        var s = 1.70158;\n        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n    },\n    BackEaseInOut: function (t, b, c, d) {\n        var s = 1.70158;\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n        }\n        return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n    },\n    ElasticEaseIn: function (t, b, c, d, a, p) {\n        var s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d) === 1) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * 0.3;\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        return (-(a *\n            Math.pow(2, 10 * (t -= 1)) *\n            Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + b);\n    },\n    ElasticEaseOut: function (t, b, c, d, a, p) {\n        var s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d) === 1) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * 0.3;\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        return (a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) +\n            c +\n            b);\n    },\n    ElasticEaseInOut: function (t, b, c, d, a, p) {\n        var s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d / 2) === 2) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * (0.3 * 1.5);\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        if (t < 1) {\n            return (-0.5 *\n                (a *\n                    Math.pow(2, 10 * (t -= 1)) *\n                    Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +\n                b);\n        }\n        return (a *\n            Math.pow(2, -10 * (t -= 1)) *\n            Math.sin(((t * d - s) * (2 * Math.PI)) / p) *\n            0.5 +\n            c +\n            b);\n    },\n    BounceEaseOut: function (t, b, c, d) {\n        if ((t /= d) < 1 / 2.75) {\n            return c * (7.5625 * t * t) + b;\n        }\n        else if (t < 2 / 2.75) {\n            return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n        }\n        else if (t < 2.5 / 2.75) {\n            return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n        }\n        else {\n            return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n        }\n    },\n    BounceEaseIn: function (t, b, c, d) {\n        return c - exports.Easings.BounceEaseOut(d - t, 0, c, d) + b;\n    },\n    BounceEaseInOut: function (t, b, c, d) {\n        if (t < d / 2) {\n            return exports.Easings.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n        }\n        else {\n            return exports.Easings.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n        }\n    },\n    EaseIn: function (t, b, c, d) {\n        return c * (t /= d) * t + b;\n    },\n    EaseOut: function (t, b, c, d) {\n        return -c * (t /= d) * (t - 2) + b;\n    },\n    EaseInOut: function (t, b, c, d) {\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * t * t + b;\n        }\n        return (-c / 2) * (--t * (t - 2) - 1) + b;\n    },\n    StrongEaseIn: function (t, b, c, d) {\n        return c * (t /= d) * t * t * t * t + b;\n    },\n    StrongEaseOut: function (t, b, c, d) {\n        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n    },\n    StrongEaseInOut: function (t, b, c, d) {\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * t * t * t * t * t + b;\n        }\n        return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;\n    },\n    Linear: function (t, b, c, d) {\n        return (c * t) / d + b;\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Tween.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Util.js":
/*!****************************************!*\
  !*** ./node_modules/konva/lib/Util.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Collection = (function () {\n    function Collection() {\n    }\n    Collection.toCollection = function (arr) {\n        var collection = new Collection(), len = arr.length, n;\n        for (n = 0; n < len; n++) {\n            collection.push(arr[n]);\n        }\n        return collection;\n    };\n    Collection._mapMethod = function (methodName) {\n        Collection.prototype[methodName] = function () {\n            var len = this.length, i;\n            var args = [].slice.call(arguments);\n            for (i = 0; i < len; i++) {\n                this[i][methodName].apply(this[i], args);\n            }\n            return this;\n        };\n    };\n    Collection.mapMethods = function (constructor) {\n        var prot = constructor.prototype;\n        for (var methodName in prot) {\n            Collection._mapMethod(methodName);\n        }\n    };\n    return Collection;\n}());\nexports.Collection = Collection;\nCollection.prototype = [];\nCollection.prototype.each = function (func) {\n    for (var n = 0; n < this.length; n++) {\n        func(this[n], n);\n    }\n};\nCollection.prototype.toArray = function () {\n    var arr = [], len = this.length, n;\n    for (n = 0; n < len; n++) {\n        arr.push(this[n]);\n    }\n    return arr;\n};\nvar Transform = (function () {\n    function Transform(m) {\n        if (m === void 0) { m = [1, 0, 0, 1, 0, 0]; }\n        this.m = (m && m.slice()) || [1, 0, 0, 1, 0, 0];\n    }\n    Transform.prototype.copy = function () {\n        return new Transform(this.m);\n    };\n    Transform.prototype.point = function (point) {\n        var m = this.m;\n        return {\n            x: m[0] * point.x + m[2] * point.y + m[4],\n            y: m[1] * point.x + m[3] * point.y + m[5]\n        };\n    };\n    Transform.prototype.translate = function (x, y) {\n        this.m[4] += this.m[0] * x + this.m[2] * y;\n        this.m[5] += this.m[1] * x + this.m[3] * y;\n        return this;\n    };\n    Transform.prototype.scale = function (sx, sy) {\n        this.m[0] *= sx;\n        this.m[1] *= sx;\n        this.m[2] *= sy;\n        this.m[3] *= sy;\n        return this;\n    };\n    Transform.prototype.rotate = function (rad) {\n        var c = Math.cos(rad);\n        var s = Math.sin(rad);\n        var m11 = this.m[0] * c + this.m[2] * s;\n        var m12 = this.m[1] * c + this.m[3] * s;\n        var m21 = this.m[0] * -s + this.m[2] * c;\n        var m22 = this.m[1] * -s + this.m[3] * c;\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        return this;\n    };\n    Transform.prototype.getTranslation = function () {\n        return {\n            x: this.m[4],\n            y: this.m[5]\n        };\n    };\n    Transform.prototype.skew = function (sx, sy) {\n        var m11 = this.m[0] + this.m[2] * sy;\n        var m12 = this.m[1] + this.m[3] * sy;\n        var m21 = this.m[2] + this.m[0] * sx;\n        var m22 = this.m[3] + this.m[1] * sx;\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        return this;\n    };\n    Transform.prototype.multiply = function (matrix) {\n        var m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];\n        var m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];\n        var m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];\n        var m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];\n        var dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];\n        var dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        this.m[4] = dx;\n        this.m[5] = dy;\n        return this;\n    };\n    Transform.prototype.invert = function () {\n        var d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);\n        var m0 = this.m[3] * d;\n        var m1 = -this.m[1] * d;\n        var m2 = -this.m[2] * d;\n        var m3 = this.m[0] * d;\n        var m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);\n        var m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);\n        this.m[0] = m0;\n        this.m[1] = m1;\n        this.m[2] = m2;\n        this.m[3] = m3;\n        this.m[4] = m4;\n        this.m[5] = m5;\n        return this;\n    };\n    Transform.prototype.getMatrix = function () {\n        return this.m;\n    };\n    Transform.prototype.setAbsolutePosition = function (x, y) {\n        var m0 = this.m[0], m1 = this.m[1], m2 = this.m[2], m3 = this.m[3], m4 = this.m[4], m5 = this.m[5], yt = (m0 * (y - m5) - m1 * (x - m4)) / (m0 * m3 - m1 * m2), xt = (x - m4 - m2 * yt) / m0;\n        return this.translate(xt, yt);\n    };\n    Transform.prototype.decompose = function () {\n        var a = this.m[0];\n        var b = this.m[1];\n        var c = this.m[2];\n        var d = this.m[3];\n        var e = this.m[4];\n        var f = this.m[5];\n        var delta = a * d - b * c;\n        var result = {\n            x: e,\n            y: f,\n            rotation: 0,\n            scaleX: 0,\n            scaleY: 0,\n            skewX: 0,\n            skewY: 0\n        };\n        if (a != 0 || b != 0) {\n            var r = Math.sqrt(a * a + b * b);\n            result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);\n            result.scaleX = r;\n            result.scaleY = delta / r;\n            result.skewX = (a * c + b * d) / delta;\n            result.skewY = 0;\n        }\n        else if (c != 0 || d != 0) {\n            var s = Math.sqrt(c * c + d * d);\n            result.rotation =\n                Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n            result.scaleX = delta / s;\n            result.scaleY = s;\n            result.skewX = 0;\n            result.skewY = (a * c + b * d) / delta;\n        }\n        else {\n        }\n        result.rotation = exports.Util._getRotation(result.rotation);\n        return result;\n    };\n    return Transform;\n}());\nexports.Transform = Transform;\nvar OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {\n    aliceblue: [240, 248, 255],\n    antiquewhite: [250, 235, 215],\n    aqua: [0, 255, 255],\n    aquamarine: [127, 255, 212],\n    azure: [240, 255, 255],\n    beige: [245, 245, 220],\n    bisque: [255, 228, 196],\n    black: [0, 0, 0],\n    blanchedalmond: [255, 235, 205],\n    blue: [0, 0, 255],\n    blueviolet: [138, 43, 226],\n    brown: [165, 42, 42],\n    burlywood: [222, 184, 135],\n    cadetblue: [95, 158, 160],\n    chartreuse: [127, 255, 0],\n    chocolate: [210, 105, 30],\n    coral: [255, 127, 80],\n    cornflowerblue: [100, 149, 237],\n    cornsilk: [255, 248, 220],\n    crimson: [220, 20, 60],\n    cyan: [0, 255, 255],\n    darkblue: [0, 0, 139],\n    darkcyan: [0, 139, 139],\n    darkgoldenrod: [184, 132, 11],\n    darkgray: [169, 169, 169],\n    darkgreen: [0, 100, 0],\n    darkgrey: [169, 169, 169],\n    darkkhaki: [189, 183, 107],\n    darkmagenta: [139, 0, 139],\n    darkolivegreen: [85, 107, 47],\n    darkorange: [255, 140, 0],\n    darkorchid: [153, 50, 204],\n    darkred: [139, 0, 0],\n    darksalmon: [233, 150, 122],\n    darkseagreen: [143, 188, 143],\n    darkslateblue: [72, 61, 139],\n    darkslategray: [47, 79, 79],\n    darkslategrey: [47, 79, 79],\n    darkturquoise: [0, 206, 209],\n    darkviolet: [148, 0, 211],\n    deeppink: [255, 20, 147],\n    deepskyblue: [0, 191, 255],\n    dimgray: [105, 105, 105],\n    dimgrey: [105, 105, 105],\n    dodgerblue: [30, 144, 255],\n    firebrick: [178, 34, 34],\n    floralwhite: [255, 255, 240],\n    forestgreen: [34, 139, 34],\n    fuchsia: [255, 0, 255],\n    gainsboro: [220, 220, 220],\n    ghostwhite: [248, 248, 255],\n    gold: [255, 215, 0],\n    goldenrod: [218, 165, 32],\n    gray: [128, 128, 128],\n    green: [0, 128, 0],\n    greenyellow: [173, 255, 47],\n    grey: [128, 128, 128],\n    honeydew: [240, 255, 240],\n    hotpink: [255, 105, 180],\n    indianred: [205, 92, 92],\n    indigo: [75, 0, 130],\n    ivory: [255, 255, 240],\n    khaki: [240, 230, 140],\n    lavender: [230, 230, 250],\n    lavenderblush: [255, 240, 245],\n    lawngreen: [124, 252, 0],\n    lemonchiffon: [255, 250, 205],\n    lightblue: [173, 216, 230],\n    lightcoral: [240, 128, 128],\n    lightcyan: [224, 255, 255],\n    lightgoldenrodyellow: [250, 250, 210],\n    lightgray: [211, 211, 211],\n    lightgreen: [144, 238, 144],\n    lightgrey: [211, 211, 211],\n    lightpink: [255, 182, 193],\n    lightsalmon: [255, 160, 122],\n    lightseagreen: [32, 178, 170],\n    lightskyblue: [135, 206, 250],\n    lightslategray: [119, 136, 153],\n    lightslategrey: [119, 136, 153],\n    lightsteelblue: [176, 196, 222],\n    lightyellow: [255, 255, 224],\n    lime: [0, 255, 0],\n    limegreen: [50, 205, 50],\n    linen: [250, 240, 230],\n    magenta: [255, 0, 255],\n    maroon: [128, 0, 0],\n    mediumaquamarine: [102, 205, 170],\n    mediumblue: [0, 0, 205],\n    mediumorchid: [186, 85, 211],\n    mediumpurple: [147, 112, 219],\n    mediumseagreen: [60, 179, 113],\n    mediumslateblue: [123, 104, 238],\n    mediumspringgreen: [0, 250, 154],\n    mediumturquoise: [72, 209, 204],\n    mediumvioletred: [199, 21, 133],\n    midnightblue: [25, 25, 112],\n    mintcream: [245, 255, 250],\n    mistyrose: [255, 228, 225],\n    moccasin: [255, 228, 181],\n    navajowhite: [255, 222, 173],\n    navy: [0, 0, 128],\n    oldlace: [253, 245, 230],\n    olive: [128, 128, 0],\n    olivedrab: [107, 142, 35],\n    orange: [255, 165, 0],\n    orangered: [255, 69, 0],\n    orchid: [218, 112, 214],\n    palegoldenrod: [238, 232, 170],\n    palegreen: [152, 251, 152],\n    paleturquoise: [175, 238, 238],\n    palevioletred: [219, 112, 147],\n    papayawhip: [255, 239, 213],\n    peachpuff: [255, 218, 185],\n    peru: [205, 133, 63],\n    pink: [255, 192, 203],\n    plum: [221, 160, 203],\n    powderblue: [176, 224, 230],\n    purple: [128, 0, 128],\n    rebeccapurple: [102, 51, 153],\n    red: [255, 0, 0],\n    rosybrown: [188, 143, 143],\n    royalblue: [65, 105, 225],\n    saddlebrown: [139, 69, 19],\n    salmon: [250, 128, 114],\n    sandybrown: [244, 164, 96],\n    seagreen: [46, 139, 87],\n    seashell: [255, 245, 238],\n    sienna: [160, 82, 45],\n    silver: [192, 192, 192],\n    skyblue: [135, 206, 235],\n    slateblue: [106, 90, 205],\n    slategray: [119, 128, 144],\n    slategrey: [119, 128, 144],\n    snow: [255, 255, 250],\n    springgreen: [0, 255, 127],\n    steelblue: [70, 130, 180],\n    tan: [210, 180, 140],\n    teal: [0, 128, 128],\n    thistle: [216, 191, 216],\n    transparent: [255, 255, 255, 0],\n    tomato: [255, 99, 71],\n    turquoise: [64, 224, 208],\n    violet: [238, 130, 238],\n    wheat: [245, 222, 179],\n    white: [255, 255, 255],\n    whitesmoke: [245, 245, 245],\n    yellow: [255, 255, 0],\n    yellowgreen: [154, 205, 5]\n}, RGB_REGEX = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/, animQueue = [];\nexports.Util = {\n    _isElement: function (obj) {\n        return !!(obj && obj.nodeType == 1);\n    },\n    _isFunction: function (obj) {\n        return !!(obj && obj.constructor && obj.call && obj.apply);\n    },\n    _isPlainObject: function (obj) {\n        return !!obj && obj.constructor === Object;\n    },\n    _isArray: function (obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_ARRAY;\n    },\n    _isNumber: function (obj) {\n        return (Object.prototype.toString.call(obj) === OBJECT_NUMBER &&\n            !isNaN(obj) &&\n            isFinite(obj));\n    },\n    _isString: function (obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_STRING;\n    },\n    _isBoolean: function (obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_BOOLEAN;\n    },\n    isObject: function (val) {\n        return val instanceof Object;\n    },\n    isValidSelector: function (selector) {\n        if (typeof selector !== 'string') {\n            return false;\n        }\n        var firstChar = selector[0];\n        return (firstChar === '#' ||\n            firstChar === '.' ||\n            firstChar === firstChar.toUpperCase());\n    },\n    _sign: function (number) {\n        if (number === 0) {\n            return 0;\n        }\n        if (number > 0) {\n            return 1;\n        }\n        else {\n            return -1;\n        }\n    },\n    requestAnimFrame: function (callback) {\n        animQueue.push(callback);\n        if (animQueue.length === 1) {\n            requestAnimationFrame(function () {\n                var queue = animQueue;\n                animQueue = [];\n                queue.forEach(function (cb) {\n                    cb();\n                });\n            });\n        }\n    },\n    createCanvasElement: function () {\n        var canvas = document.createElement('canvas');\n        try {\n            canvas.style = canvas.style || {};\n        }\n        catch (e) { }\n        return canvas;\n    },\n    createImageElement: function () {\n        return document.createElement('img');\n    },\n    _isInDocument: function (el) {\n        while ((el = el.parentNode)) {\n            if (el == document) {\n                return true;\n            }\n        }\n        return false;\n    },\n    _simplifyArray: function (arr) {\n        var retArr = [], len = arr.length, util = exports.Util, n, val;\n        for (n = 0; n < len; n++) {\n            val = arr[n];\n            if (util._isNumber(val)) {\n                val = Math.round(val * 1000) / 1000;\n            }\n            else if (!util._isString(val)) {\n                val = val.toString();\n            }\n            retArr.push(val);\n        }\n        return retArr;\n    },\n    _urlToImage: function (url, callback) {\n        var imageObj = new Global_1.glob.Image();\n        imageObj.onload = function () {\n            callback(imageObj);\n        };\n        imageObj.src = url;\n    },\n    _rgbToHex: function (r, g, b) {\n        return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n    },\n    _hexToRgb: function (hex) {\n        hex = hex.replace(HASH, EMPTY_STRING);\n        var bigint = parseInt(hex, 16);\n        return {\n            r: (bigint >> 16) & 255,\n            g: (bigint >> 8) & 255,\n            b: bigint & 255\n        };\n    },\n    getRandomColor: function () {\n        var randColor = ((Math.random() * 0xffffff) << 0).toString(16);\n        while (randColor.length < 6) {\n            randColor = ZERO + randColor;\n        }\n        return HASH + randColor;\n    },\n    get: function (val, def) {\n        if (val === undefined) {\n            return def;\n        }\n        else {\n            return val;\n        }\n    },\n    getRGB: function (color) {\n        var rgb;\n        if (color in COLORS) {\n            rgb = COLORS[color];\n            return {\n                r: rgb[0],\n                g: rgb[1],\n                b: rgb[2]\n            };\n        }\n        else if (color[0] === HASH) {\n            return this._hexToRgb(color.substring(1));\n        }\n        else if (color.substr(0, 4) === RGB_PAREN) {\n            rgb = RGB_REGEX.exec(color.replace(/ /g, ''));\n            return {\n                r: parseInt(rgb[1], 10),\n                g: parseInt(rgb[2], 10),\n                b: parseInt(rgb[3], 10)\n            };\n        }\n        else {\n            return {\n                r: 0,\n                g: 0,\n                b: 0\n            };\n        }\n    },\n    colorToRGBA: function (str) {\n        str = str || 'black';\n        return (exports.Util._namedColorToRBA(str) ||\n            exports.Util._hex3ColorToRGBA(str) ||\n            exports.Util._hex6ColorToRGBA(str) ||\n            exports.Util._rgbColorToRGBA(str) ||\n            exports.Util._rgbaColorToRGBA(str) ||\n            exports.Util._hslColorToRGBA(str));\n    },\n    _namedColorToRBA: function (str) {\n        var c = COLORS[str.toLowerCase()];\n        if (!c) {\n            return null;\n        }\n        return {\n            r: c[0],\n            g: c[1],\n            b: c[2],\n            a: 1\n        };\n    },\n    _rgbColorToRGBA: function (str) {\n        if (str.indexOf('rgb(') === 0) {\n            str = str.match(/rgb\\(([^)]+)\\)/)[1];\n            var parts = str.split(/ *, */).map(Number);\n            return {\n                r: parts[0],\n                g: parts[1],\n                b: parts[2],\n                a: 1\n            };\n        }\n    },\n    _rgbaColorToRGBA: function (str) {\n        if (str.indexOf('rgba(') === 0) {\n            str = str.match(/rgba\\(([^)]+)\\)/)[1];\n            var parts = str.split(/ *, */).map(Number);\n            return {\n                r: parts[0],\n                g: parts[1],\n                b: parts[2],\n                a: parts[3]\n            };\n        }\n    },\n    _hex6ColorToRGBA: function (str) {\n        if (str[0] === '#' && str.length === 7) {\n            return {\n                r: parseInt(str.slice(1, 3), 16),\n                g: parseInt(str.slice(3, 5), 16),\n                b: parseInt(str.slice(5, 7), 16),\n                a: 1\n            };\n        }\n    },\n    _hex3ColorToRGBA: function (str) {\n        if (str[0] === '#' && str.length === 4) {\n            return {\n                r: parseInt(str[1] + str[1], 16),\n                g: parseInt(str[2] + str[2], 16),\n                b: parseInt(str[3] + str[3], 16),\n                a: 1\n            };\n        }\n    },\n    _hslColorToRGBA: function (str) {\n        if (/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.test(str)) {\n            var _a = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(str), _ = _a[0], hsl = _a.slice(1);\n            var h = Number(hsl[0]) / 360;\n            var s = Number(hsl[1]) / 100;\n            var l = Number(hsl[2]) / 100;\n            var t2 = void 0;\n            var t3 = void 0;\n            var val = void 0;\n            if (s === 0) {\n                val = l * 255;\n                return {\n                    r: Math.round(val),\n                    g: Math.round(val),\n                    b: Math.round(val),\n                    a: 1\n                };\n            }\n            if (l < 0.5) {\n                t2 = l * (1 + s);\n            }\n            else {\n                t2 = l + s - l * s;\n            }\n            var t1 = 2 * l - t2;\n            var rgb = [0, 0, 0];\n            for (var i = 0; i < 3; i++) {\n                t3 = h + (1 / 3) * -(i - 1);\n                if (t3 < 0) {\n                    t3++;\n                }\n                if (t3 > 1) {\n                    t3--;\n                }\n                if (6 * t3 < 1) {\n                    val = t1 + (t2 - t1) * 6 * t3;\n                }\n                else if (2 * t3 < 1) {\n                    val = t2;\n                }\n                else if (3 * t3 < 2) {\n                    val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n                }\n                else {\n                    val = t1;\n                }\n                rgb[i] = val * 255;\n            }\n            return {\n                r: Math.round(rgb[0]),\n                g: Math.round(rgb[1]),\n                b: Math.round(rgb[2]),\n                a: 1\n            };\n        }\n    },\n    haveIntersection: function (r1, r2) {\n        return !(r2.x > r1.x + r1.width ||\n            r2.x + r2.width < r1.x ||\n            r2.y > r1.y + r1.height ||\n            r2.y + r2.height < r1.y);\n    },\n    cloneObject: function (obj) {\n        var retObj = {};\n        for (var key in obj) {\n            if (this._isPlainObject(obj[key])) {\n                retObj[key] = this.cloneObject(obj[key]);\n            }\n            else if (this._isArray(obj[key])) {\n                retObj[key] = this.cloneArray(obj[key]);\n            }\n            else {\n                retObj[key] = obj[key];\n            }\n        }\n        return retObj;\n    },\n    cloneArray: function (arr) {\n        return arr.slice(0);\n    },\n    _degToRad: function (deg) {\n        return deg * PI_OVER_DEG180;\n    },\n    _radToDeg: function (rad) {\n        return rad * DEG180_OVER_PI;\n    },\n    _getRotation: function (radians) {\n        return Global_1.Konva.angleDeg ? exports.Util._radToDeg(radians) : radians;\n    },\n    _capitalize: function (str) {\n        return str.charAt(0).toUpperCase() + str.slice(1);\n    },\n    throw: function (str) {\n        throw new Error(KONVA_ERROR + str);\n    },\n    error: function (str) {\n        console.error(KONVA_ERROR + str);\n    },\n    warn: function (str) {\n        if (!Global_1.Konva.showWarnings) {\n            return;\n        }\n        console.warn(KONVA_WARNING + str);\n    },\n    extend: function (child, parent) {\n        function Ctor() {\n            this.constructor = child;\n        }\n        Ctor.prototype = parent.prototype;\n        var oldProto = child.prototype;\n        child.prototype = new Ctor();\n        for (var key in oldProto) {\n            if (oldProto.hasOwnProperty(key)) {\n                child.prototype[key] = oldProto[key];\n            }\n        }\n        child.__super__ = parent.prototype;\n        child.super = parent;\n    },\n    _getControlPoints: function (x0, y0, x1, y1, x2, y2, t) {\n        var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n        return [p1x, p1y, p2x, p2y];\n    },\n    _expandPoints: function (p, tension) {\n        var len = p.length, allPoints = [], n, cp;\n        for (n = 2; n < len - 2; n += 2) {\n            cp = exports.Util._getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n            allPoints.push(cp[0]);\n            allPoints.push(cp[1]);\n            allPoints.push(p[n]);\n            allPoints.push(p[n + 1]);\n            allPoints.push(cp[2]);\n            allPoints.push(cp[3]);\n        }\n        return allPoints;\n    },\n    each: function (obj, func) {\n        for (var key in obj) {\n            func(key, obj[key]);\n        }\n    },\n    _inRange: function (val, left, right) {\n        return left <= val && val < right;\n    },\n    _getProjectionToSegment: function (x1, y1, x2, y2, x3, y3) {\n        var x, y, dist;\n        var pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);\n        if (pd2 == 0) {\n            x = x1;\n            y = y1;\n            dist = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);\n        }\n        else {\n            var u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;\n            if (u < 0) {\n                x = x1;\n                y = y1;\n                dist = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);\n            }\n            else if (u > 1.0) {\n                x = x2;\n                y = y2;\n                dist = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);\n            }\n            else {\n                x = x1 + u * (x2 - x1);\n                y = y1 + u * (y2 - y1);\n                dist = (x - x3) * (x - x3) + (y - y3) * (y - y3);\n            }\n        }\n        return [x, y, dist];\n    },\n    _getProjectionToLine: function (pt, line, isClosed) {\n        var pc = exports.Util.cloneObject(pt);\n        var dist = Number.MAX_VALUE;\n        line.forEach(function (p1, i) {\n            if (!isClosed && i === line.length - 1) {\n                return;\n            }\n            var p2 = line[(i + 1) % line.length];\n            var proj = exports.Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);\n            var px = proj[0], py = proj[1], pdist = proj[2];\n            if (pdist < dist) {\n                pc.x = px;\n                pc.y = py;\n                dist = pdist;\n            }\n        });\n        return pc;\n    },\n    _prepareArrayForTween: function (startArray, endArray, isClosed) {\n        var n, start = [], end = [];\n        if (startArray.length > endArray.length) {\n            var temp = endArray;\n            endArray = startArray;\n            startArray = temp;\n        }\n        for (n = 0; n < startArray.length; n += 2) {\n            start.push({\n                x: startArray[n],\n                y: startArray[n + 1]\n            });\n        }\n        for (n = 0; n < endArray.length; n += 2) {\n            end.push({\n                x: endArray[n],\n                y: endArray[n + 1]\n            });\n        }\n        var newStart = [];\n        end.forEach(function (point) {\n            var pr = exports.Util._getProjectionToLine(point, start, isClosed);\n            newStart.push(pr.x);\n            newStart.push(pr.y);\n        });\n        return newStart;\n    },\n    _prepareToStringify: function (obj) {\n        var desc;\n        obj.visitedByCircularReferenceRemoval = true;\n        for (var key in obj) {\n            if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {\n                continue;\n            }\n            desc = Object.getOwnPropertyDescriptor(obj, key);\n            if (obj[key].visitedByCircularReferenceRemoval ||\n                exports.Util._isElement(obj[key])) {\n                if (desc.configurable) {\n                    delete obj[key];\n                }\n                else {\n                    return null;\n                }\n            }\n            else if (exports.Util._prepareToStringify(obj[key]) === null) {\n                if (desc.configurable) {\n                    delete obj[key];\n                }\n                else {\n                    return null;\n                }\n            }\n        }\n        delete obj.visitedByCircularReferenceRemoval;\n        return obj;\n    },\n    _assign: function (target, source) {\n        for (var key in source) {\n            target[key] = source[key];\n        }\n        return target;\n    },\n    _getFirstPointerId: function (evt) {\n        if (!evt.touches) {\n            return 999;\n        }\n        else {\n            return evt.changedTouches[0].identifier;\n        }\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Util.js?");

/***/ }),

/***/ "./node_modules/konva/lib/Validators.js":
/*!**********************************************!*\
  !*** ./node_modules/konva/lib/Validators.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nfunction _formatValue(val) {\n    if (Util_1.Util._isString(val)) {\n        return '\"' + val + '\"';\n    }\n    if (Object.prototype.toString.call(val) === '[object Number]') {\n        return val;\n    }\n    if (Util_1.Util._isBoolean(val)) {\n        return val;\n    }\n    return Object.prototype.toString.call(val);\n}\nfunction RGBComponent(val) {\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    return Math.round(val);\n}\nexports.RGBComponent = RGBComponent;\nfunction alphaComponent(val) {\n    if (val > 1) {\n        return 1;\n    }\n    else if (val < 0.0001) {\n        return 0.0001;\n    }\n    return val;\n}\nexports.alphaComponent = alphaComponent;\nfunction getNumberValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isNumber(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a number.');\n            }\n            return val;\n        };\n    }\n}\nexports.getNumberValidator = getNumberValidator;\nfunction getNumberOrAutoValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            var isNumber = Util_1.Util._isNumber(val);\n            var isAuto = val === 'auto';\n            if (!(isNumber || isAuto)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a number or \"auto\".');\n            }\n            return val;\n        };\n    }\n}\nexports.getNumberOrAutoValidator = getNumberOrAutoValidator;\nfunction getStringValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isString(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a string.');\n            }\n            return val;\n        };\n    }\n}\nexports.getStringValidator = getStringValidator;\nfunction getFunctionValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isFunction(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a function.');\n            }\n            return val;\n        };\n    }\n}\nexports.getFunctionValidator = getFunctionValidator;\nfunction getNumberArrayValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isArray(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a array of numbers.');\n            }\n            else {\n                val.forEach(function (item) {\n                    if (!Util_1.Util._isNumber(item)) {\n                        Util_1.Util.warn('\"' +\n                            attr +\n                            '\" attribute has non numeric element ' +\n                            item +\n                            '. Make sure that all elements are numbers.');\n                    }\n                });\n            }\n            return val;\n        };\n    }\n}\nexports.getNumberArrayValidator = getNumberArrayValidator;\nfunction getBooleanValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            var isBool = val === true || val === false;\n            if (!isBool) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a boolean.');\n            }\n            return val;\n        };\n    }\n}\nexports.getBooleanValidator = getBooleanValidator;\nfunction getComponentValidator(components) {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util.isObject(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be an object with properties ' +\n                    components);\n            }\n            return val;\n        };\n    }\n}\nexports.getComponentValidator = getComponentValidator;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/Validators.js?");

/***/ }),

/***/ "./node_modules/konva/lib/_CoreInternals.js":
/*!**************************************************!*\
  !*** ./node_modules/konva/lib/_CoreInternals.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Global_1 = __webpack_require__(/*! ./Global */ \"./node_modules/konva/lib/Global.js\");\nvar Util_1 = __webpack_require__(/*! ./Util */ \"./node_modules/konva/lib/Util.js\");\nvar Node_1 = __webpack_require__(/*! ./Node */ \"./node_modules/konva/lib/Node.js\");\nvar Container_1 = __webpack_require__(/*! ./Container */ \"./node_modules/konva/lib/Container.js\");\nvar Stage_1 = __webpack_require__(/*! ./Stage */ \"./node_modules/konva/lib/Stage.js\");\nvar Layer_1 = __webpack_require__(/*! ./Layer */ \"./node_modules/konva/lib/Layer.js\");\nvar FastLayer_1 = __webpack_require__(/*! ./FastLayer */ \"./node_modules/konva/lib/FastLayer.js\");\nvar Group_1 = __webpack_require__(/*! ./Group */ \"./node_modules/konva/lib/Group.js\");\nvar DragAndDrop_1 = __webpack_require__(/*! ./DragAndDrop */ \"./node_modules/konva/lib/DragAndDrop.js\");\nvar Shape_1 = __webpack_require__(/*! ./Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Animation_1 = __webpack_require__(/*! ./Animation */ \"./node_modules/konva/lib/Animation.js\");\nvar Tween_1 = __webpack_require__(/*! ./Tween */ \"./node_modules/konva/lib/Tween.js\");\nvar Context_1 = __webpack_require__(/*! ./Context */ \"./node_modules/konva/lib/Context.js\");\nvar Canvas_1 = __webpack_require__(/*! ./Canvas */ \"./node_modules/konva/lib/Canvas.js\");\nexports.Konva = Util_1.Util._assign(Global_1.Konva, {\n    Collection: Util_1.Collection,\n    Util: Util_1.Util,\n    Transform: Util_1.Transform,\n    Node: Node_1.Node,\n    ids: Node_1.ids,\n    names: Node_1.names,\n    Container: Container_1.Container,\n    Stage: Stage_1.Stage,\n    stages: Stage_1.stages,\n    Layer: Layer_1.Layer,\n    FastLayer: FastLayer_1.FastLayer,\n    Group: Group_1.Group,\n    DD: DragAndDrop_1.DD,\n    Shape: Shape_1.Shape,\n    shapes: Shape_1.shapes,\n    Animation: Animation_1.Animation,\n    Tween: Tween_1.Tween,\n    Easings: Tween_1.Easings,\n    Context: Context_1.Context,\n    Canvas: Canvas_1.Canvas\n});\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/_CoreInternals.js?");

/***/ }),

/***/ "./node_modules/konva/lib/_FullInternals.js":
/*!**************************************************!*\
  !*** ./node_modules/konva/lib/_FullInternals.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _CoreInternals_1 = __webpack_require__(/*! ./_CoreInternals */ \"./node_modules/konva/lib/_CoreInternals.js\");\nvar Arc_1 = __webpack_require__(/*! ./shapes/Arc */ \"./node_modules/konva/lib/shapes/Arc.js\");\nvar Arrow_1 = __webpack_require__(/*! ./shapes/Arrow */ \"./node_modules/konva/lib/shapes/Arrow.js\");\nvar Circle_1 = __webpack_require__(/*! ./shapes/Circle */ \"./node_modules/konva/lib/shapes/Circle.js\");\nvar Ellipse_1 = __webpack_require__(/*! ./shapes/Ellipse */ \"./node_modules/konva/lib/shapes/Ellipse.js\");\nvar Image_1 = __webpack_require__(/*! ./shapes/Image */ \"./node_modules/konva/lib/shapes/Image.js\");\nvar Label_1 = __webpack_require__(/*! ./shapes/Label */ \"./node_modules/konva/lib/shapes/Label.js\");\nvar Line_1 = __webpack_require__(/*! ./shapes/Line */ \"./node_modules/konva/lib/shapes/Line.js\");\nvar Path_1 = __webpack_require__(/*! ./shapes/Path */ \"./node_modules/konva/lib/shapes/Path.js\");\nvar Rect_1 = __webpack_require__(/*! ./shapes/Rect */ \"./node_modules/konva/lib/shapes/Rect.js\");\nvar RegularPolygon_1 = __webpack_require__(/*! ./shapes/RegularPolygon */ \"./node_modules/konva/lib/shapes/RegularPolygon.js\");\nvar Ring_1 = __webpack_require__(/*! ./shapes/Ring */ \"./node_modules/konva/lib/shapes/Ring.js\");\nvar Sprite_1 = __webpack_require__(/*! ./shapes/Sprite */ \"./node_modules/konva/lib/shapes/Sprite.js\");\nvar Star_1 = __webpack_require__(/*! ./shapes/Star */ \"./node_modules/konva/lib/shapes/Star.js\");\nvar Text_1 = __webpack_require__(/*! ./shapes/Text */ \"./node_modules/konva/lib/shapes/Text.js\");\nvar TextPath_1 = __webpack_require__(/*! ./shapes/TextPath */ \"./node_modules/konva/lib/shapes/TextPath.js\");\nvar Transformer_1 = __webpack_require__(/*! ./shapes/Transformer */ \"./node_modules/konva/lib/shapes/Transformer.js\");\nvar Wedge_1 = __webpack_require__(/*! ./shapes/Wedge */ \"./node_modules/konva/lib/shapes/Wedge.js\");\nvar Blur_1 = __webpack_require__(/*! ./filters/Blur */ \"./node_modules/konva/lib/filters/Blur.js\");\nvar Brighten_1 = __webpack_require__(/*! ./filters/Brighten */ \"./node_modules/konva/lib/filters/Brighten.js\");\nvar Contrast_1 = __webpack_require__(/*! ./filters/Contrast */ \"./node_modules/konva/lib/filters/Contrast.js\");\nvar Emboss_1 = __webpack_require__(/*! ./filters/Emboss */ \"./node_modules/konva/lib/filters/Emboss.js\");\nvar Enhance_1 = __webpack_require__(/*! ./filters/Enhance */ \"./node_modules/konva/lib/filters/Enhance.js\");\nvar Grayscale_1 = __webpack_require__(/*! ./filters/Grayscale */ \"./node_modules/konva/lib/filters/Grayscale.js\");\nvar HSL_1 = __webpack_require__(/*! ./filters/HSL */ \"./node_modules/konva/lib/filters/HSL.js\");\nvar HSV_1 = __webpack_require__(/*! ./filters/HSV */ \"./node_modules/konva/lib/filters/HSV.js\");\nvar Invert_1 = __webpack_require__(/*! ./filters/Invert */ \"./node_modules/konva/lib/filters/Invert.js\");\nvar Kaleidoscope_1 = __webpack_require__(/*! ./filters/Kaleidoscope */ \"./node_modules/konva/lib/filters/Kaleidoscope.js\");\nvar Mask_1 = __webpack_require__(/*! ./filters/Mask */ \"./node_modules/konva/lib/filters/Mask.js\");\nvar Noise_1 = __webpack_require__(/*! ./filters/Noise */ \"./node_modules/konva/lib/filters/Noise.js\");\nvar Pixelate_1 = __webpack_require__(/*! ./filters/Pixelate */ \"./node_modules/konva/lib/filters/Pixelate.js\");\nvar Posterize_1 = __webpack_require__(/*! ./filters/Posterize */ \"./node_modules/konva/lib/filters/Posterize.js\");\nvar RGB_1 = __webpack_require__(/*! ./filters/RGB */ \"./node_modules/konva/lib/filters/RGB.js\");\nvar RGBA_1 = __webpack_require__(/*! ./filters/RGBA */ \"./node_modules/konva/lib/filters/RGBA.js\");\nvar Sepia_1 = __webpack_require__(/*! ./filters/Sepia */ \"./node_modules/konva/lib/filters/Sepia.js\");\nvar Solarize_1 = __webpack_require__(/*! ./filters/Solarize */ \"./node_modules/konva/lib/filters/Solarize.js\");\nvar Threshold_1 = __webpack_require__(/*! ./filters/Threshold */ \"./node_modules/konva/lib/filters/Threshold.js\");\nexports.Konva = _CoreInternals_1.Konva.Util._assign(_CoreInternals_1.Konva, {\n    Arc: Arc_1.Arc,\n    Arrow: Arrow_1.Arrow,\n    Circle: Circle_1.Circle,\n    Ellipse: Ellipse_1.Ellipse,\n    Image: Image_1.Image,\n    Label: Label_1.Label,\n    Tag: Label_1.Tag,\n    Line: Line_1.Line,\n    Path: Path_1.Path,\n    Rect: Rect_1.Rect,\n    RegularPolygon: RegularPolygon_1.RegularPolygon,\n    Ring: Ring_1.Ring,\n    Sprite: Sprite_1.Sprite,\n    Star: Star_1.Star,\n    Text: Text_1.Text,\n    TextPath: TextPath_1.TextPath,\n    Transformer: Transformer_1.Transformer,\n    Wedge: Wedge_1.Wedge,\n    Filters: {\n        Blur: Blur_1.Blur,\n        Brighten: Brighten_1.Brighten,\n        Contrast: Contrast_1.Contrast,\n        Emboss: Emboss_1.Emboss,\n        Enhance: Enhance_1.Enhance,\n        Grayscale: Grayscale_1.Grayscale,\n        HSL: HSL_1.HSL,\n        HSV: HSV_1.HSV,\n        Invert: Invert_1.Invert,\n        Kaleidoscope: Kaleidoscope_1.Kaleidoscope,\n        Mask: Mask_1.Mask,\n        Noise: Noise_1.Noise,\n        Pixelate: Pixelate_1.Pixelate,\n        Posterize: Posterize_1.Posterize,\n        RGB: RGB_1.RGB,\n        RGBA: RGBA_1.RGBA,\n        Sepia: Sepia_1.Sepia,\n        Solarize: Solarize_1.Solarize,\n        Threshold: Threshold_1.Threshold\n    }\n});\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/_FullInternals.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Blur.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/filters/Blur.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nfunction BlurStack() {\n    this.r = 0;\n    this.g = 0;\n    this.b = 0;\n    this.a = 0;\n    this.next = null;\n}\nvar mul_table = [\n    512,\n    512,\n    456,\n    512,\n    328,\n    456,\n    335,\n    512,\n    405,\n    328,\n    271,\n    456,\n    388,\n    335,\n    292,\n    512,\n    454,\n    405,\n    364,\n    328,\n    298,\n    271,\n    496,\n    456,\n    420,\n    388,\n    360,\n    335,\n    312,\n    292,\n    273,\n    512,\n    482,\n    454,\n    428,\n    405,\n    383,\n    364,\n    345,\n    328,\n    312,\n    298,\n    284,\n    271,\n    259,\n    496,\n    475,\n    456,\n    437,\n    420,\n    404,\n    388,\n    374,\n    360,\n    347,\n    335,\n    323,\n    312,\n    302,\n    292,\n    282,\n    273,\n    265,\n    512,\n    497,\n    482,\n    468,\n    454,\n    441,\n    428,\n    417,\n    405,\n    394,\n    383,\n    373,\n    364,\n    354,\n    345,\n    337,\n    328,\n    320,\n    312,\n    305,\n    298,\n    291,\n    284,\n    278,\n    271,\n    265,\n    259,\n    507,\n    496,\n    485,\n    475,\n    465,\n    456,\n    446,\n    437,\n    428,\n    420,\n    412,\n    404,\n    396,\n    388,\n    381,\n    374,\n    367,\n    360,\n    354,\n    347,\n    341,\n    335,\n    329,\n    323,\n    318,\n    312,\n    307,\n    302,\n    297,\n    292,\n    287,\n    282,\n    278,\n    273,\n    269,\n    265,\n    261,\n    512,\n    505,\n    497,\n    489,\n    482,\n    475,\n    468,\n    461,\n    454,\n    447,\n    441,\n    435,\n    428,\n    422,\n    417,\n    411,\n    405,\n    399,\n    394,\n    389,\n    383,\n    378,\n    373,\n    368,\n    364,\n    359,\n    354,\n    350,\n    345,\n    341,\n    337,\n    332,\n    328,\n    324,\n    320,\n    316,\n    312,\n    309,\n    305,\n    301,\n    298,\n    294,\n    291,\n    287,\n    284,\n    281,\n    278,\n    274,\n    271,\n    268,\n    265,\n    262,\n    259,\n    257,\n    507,\n    501,\n    496,\n    491,\n    485,\n    480,\n    475,\n    470,\n    465,\n    460,\n    456,\n    451,\n    446,\n    442,\n    437,\n    433,\n    428,\n    424,\n    420,\n    416,\n    412,\n    408,\n    404,\n    400,\n    396,\n    392,\n    388,\n    385,\n    381,\n    377,\n    374,\n    370,\n    367,\n    363,\n    360,\n    357,\n    354,\n    350,\n    347,\n    344,\n    341,\n    338,\n    335,\n    332,\n    329,\n    326,\n    323,\n    320,\n    318,\n    315,\n    312,\n    310,\n    307,\n    304,\n    302,\n    299,\n    297,\n    294,\n    292,\n    289,\n    287,\n    285,\n    282,\n    280,\n    278,\n    275,\n    273,\n    271,\n    269,\n    267,\n    265,\n    263,\n    261,\n    259\n];\nvar shg_table = [\n    9,\n    11,\n    12,\n    13,\n    13,\n    14,\n    14,\n    15,\n    15,\n    15,\n    15,\n    16,\n    16,\n    16,\n    16,\n    17,\n    17,\n    17,\n    17,\n    17,\n    17,\n    17,\n    18,\n    18,\n    18,\n    18,\n    18,\n    18,\n    18,\n    18,\n    18,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    19,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    20,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    21,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    22,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    23,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24,\n    24\n];\nfunction filterGaussBlurRGBA(imageData, radius) {\n    var pixels = imageData.data, width = imageData.width, height = imageData.height;\n    var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;\n    var div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];\n    for (i = 1; i < div; i++) {\n        stack = stack.next = new BlurStack();\n        if (i === radiusPlus1) {\n            stackEnd = stack;\n        }\n    }\n    stack.next = stackStart;\n    yw = yi = 0;\n    for (y = 0; y < height; y++) {\n        r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;\n        r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n        g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n        b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n        a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n        r_sum += sumFactor * pr;\n        g_sum += sumFactor * pg;\n        b_sum += sumFactor * pb;\n        a_sum += sumFactor * pa;\n        stack = stackStart;\n        for (i = 0; i < radiusPlus1; i++) {\n            stack.r = pr;\n            stack.g = pg;\n            stack.b = pb;\n            stack.a = pa;\n            stack = stack.next;\n        }\n        for (i = 1; i < radiusPlus1; i++) {\n            p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);\n            r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);\n            g_sum += (stack.g = pg = pixels[p + 1]) * rbs;\n            b_sum += (stack.b = pb = pixels[p + 2]) * rbs;\n            a_sum += (stack.a = pa = pixels[p + 3]) * rbs;\n            r_in_sum += pr;\n            g_in_sum += pg;\n            b_in_sum += pb;\n            a_in_sum += pa;\n            stack = stack.next;\n        }\n        stackIn = stackStart;\n        stackOut = stackEnd;\n        for (x = 0; x < width; x++) {\n            pixels[yi + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n            if (pa !== 0) {\n                pa = 255 / pa;\n                pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\n                pixels[yi + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n                pixels[yi + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n            }\n            else {\n                pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n            }\n            r_sum -= r_out_sum;\n            g_sum -= g_out_sum;\n            b_sum -= b_out_sum;\n            a_sum -= a_out_sum;\n            r_out_sum -= stackIn.r;\n            g_out_sum -= stackIn.g;\n            b_out_sum -= stackIn.b;\n            a_out_sum -= stackIn.a;\n            p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;\n            r_in_sum += stackIn.r = pixels[p];\n            g_in_sum += stackIn.g = pixels[p + 1];\n            b_in_sum += stackIn.b = pixels[p + 2];\n            a_in_sum += stackIn.a = pixels[p + 3];\n            r_sum += r_in_sum;\n            g_sum += g_in_sum;\n            b_sum += b_in_sum;\n            a_sum += a_in_sum;\n            stackIn = stackIn.next;\n            r_out_sum += pr = stackOut.r;\n            g_out_sum += pg = stackOut.g;\n            b_out_sum += pb = stackOut.b;\n            a_out_sum += pa = stackOut.a;\n            r_in_sum -= pr;\n            g_in_sum -= pg;\n            b_in_sum -= pb;\n            a_in_sum -= pa;\n            stackOut = stackOut.next;\n            yi += 4;\n        }\n        yw += width;\n    }\n    for (x = 0; x < width; x++) {\n        g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\n        yi = x << 2;\n        r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n        g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n        b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n        a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n        r_sum += sumFactor * pr;\n        g_sum += sumFactor * pg;\n        b_sum += sumFactor * pb;\n        a_sum += sumFactor * pa;\n        stack = stackStart;\n        for (i = 0; i < radiusPlus1; i++) {\n            stack.r = pr;\n            stack.g = pg;\n            stack.b = pb;\n            stack.a = pa;\n            stack = stack.next;\n        }\n        yp = width;\n        for (i = 1; i <= radius; i++) {\n            yi = (yp + x) << 2;\n            r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);\n            g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;\n            b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;\n            a_sum += (stack.a = pa = pixels[yi + 3]) * rbs;\n            r_in_sum += pr;\n            g_in_sum += pg;\n            b_in_sum += pb;\n            a_in_sum += pa;\n            stack = stack.next;\n            if (i < heightMinus1) {\n                yp += width;\n            }\n        }\n        yi = x;\n        stackIn = stackStart;\n        stackOut = stackEnd;\n        for (y = 0; y < height; y++) {\n            p = yi << 2;\n            pixels[p + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n            if (pa > 0) {\n                pa = 255 / pa;\n                pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;\n                pixels[p + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n                pixels[p + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n            }\n            else {\n                pixels[p] = pixels[p + 1] = pixels[p + 2] = 0;\n            }\n            r_sum -= r_out_sum;\n            g_sum -= g_out_sum;\n            b_sum -= b_out_sum;\n            a_sum -= a_out_sum;\n            r_out_sum -= stackIn.r;\n            g_out_sum -= stackIn.g;\n            b_out_sum -= stackIn.b;\n            a_out_sum -= stackIn.a;\n            p =\n                (x +\n                    ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width) <<\n                    2;\n            r_sum += r_in_sum += stackIn.r = pixels[p];\n            g_sum += g_in_sum += stackIn.g = pixels[p + 1];\n            b_sum += b_in_sum += stackIn.b = pixels[p + 2];\n            a_sum += a_in_sum += stackIn.a = pixels[p + 3];\n            stackIn = stackIn.next;\n            r_out_sum += pr = stackOut.r;\n            g_out_sum += pg = stackOut.g;\n            b_out_sum += pb = stackOut.b;\n            a_out_sum += pa = stackOut.a;\n            r_in_sum -= pr;\n            g_in_sum -= pg;\n            b_in_sum -= pb;\n            a_in_sum -= pa;\n            stackOut = stackOut.next;\n            yi += width;\n        }\n    }\n}\nexports.Blur = function Blur(imageData) {\n    var radius = Math.round(this.blurRadius());\n    if (radius > 0) {\n        filterGaussBlurRGBA(imageData, radius);\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'blurRadius', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Blur.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Brighten.js":
/*!****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Brighten.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Brighten = function (imageData) {\n    var brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;\n    for (i = 0; i < len; i += 4) {\n        data[i] += brightness;\n        data[i + 1] += brightness;\n        data[i + 2] += brightness;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'brightness', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Brighten.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Contrast.js":
/*!****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Contrast.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Contrast = function (imageData) {\n    var adjust = Math.pow((this.contrast() + 100) / 100, 2);\n    var data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;\n    for (i = 0; i < nPixels; i += 4) {\n        red = data[i];\n        green = data[i + 1];\n        blue = data[i + 2];\n        red /= 255;\n        red -= 0.5;\n        red *= adjust;\n        red += 0.5;\n        red *= 255;\n        green /= 255;\n        green -= 0.5;\n        green *= adjust;\n        green += 0.5;\n        green *= 255;\n        blue /= 255;\n        blue -= 0.5;\n        blue *= adjust;\n        blue += 0.5;\n        blue *= 255;\n        red = red < 0 ? 0 : red > 255 ? 255 : red;\n        green = green < 0 ? 0 : green > 255 ? 255 : green;\n        blue = blue < 0 ? 0 : blue > 255 ? 255 : blue;\n        data[i] = red;\n        data[i + 1] = green;\n        data[i + 2] = blue;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'contrast', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Contrast.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Emboss.js":
/*!**************************************************!*\
  !*** ./node_modules/konva/lib/filters/Emboss.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Emboss = function (imageData) {\n    var strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n    switch (direction) {\n        case 'top-left':\n            dirY = -1;\n            dirX = -1;\n            break;\n        case 'top':\n            dirY = -1;\n            dirX = 0;\n            break;\n        case 'top-right':\n            dirY = -1;\n            dirX = 1;\n            break;\n        case 'right':\n            dirY = 0;\n            dirX = 1;\n            break;\n        case 'bottom-right':\n            dirY = 1;\n            dirX = 1;\n            break;\n        case 'bottom':\n            dirY = 1;\n            dirX = 0;\n            break;\n        case 'bottom-left':\n            dirY = 1;\n            dirX = -1;\n            break;\n        case 'left':\n            dirY = 0;\n            dirX = -1;\n            break;\n        default:\n            Util_1.Util.error('Unknown emboss direction: ' + direction);\n    }\n    do {\n        var offsetY = (y - 1) * w4;\n        var otherY = dirY;\n        if (y + otherY < 1) {\n            otherY = 0;\n        }\n        if (y + otherY > h) {\n            otherY = 0;\n        }\n        var offsetYOther = (y - 1 + otherY) * w * 4;\n        var x = w;\n        do {\n            var offset = offsetY + (x - 1) * 4;\n            var otherX = dirX;\n            if (x + otherX < 1) {\n                otherX = 0;\n            }\n            if (x + otherX > w) {\n                otherX = 0;\n            }\n            var offsetOther = offsetYOther + (x - 1 + otherX) * 4;\n            var dR = data[offset] - data[offsetOther];\n            var dG = data[offset + 1] - data[offsetOther + 1];\n            var dB = data[offset + 2] - data[offsetOther + 2];\n            var dif = dR;\n            var absDif = dif > 0 ? dif : -dif;\n            var absG = dG > 0 ? dG : -dG;\n            var absB = dB > 0 ? dB : -dB;\n            if (absG > absDif) {\n                dif = dG;\n            }\n            if (absB > absDif) {\n                dif = dB;\n            }\n            dif *= strength;\n            if (blend) {\n                var r = data[offset] + dif;\n                var g = data[offset + 1] + dif;\n                var b = data[offset + 2] + dif;\n                data[offset] = r > 255 ? 255 : r < 0 ? 0 : r;\n                data[offset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;\n                data[offset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;\n            }\n            else {\n                var grey = greyLevel - dif;\n                if (grey < 0) {\n                    grey = 0;\n                }\n                else if (grey > 255) {\n                    grey = 255;\n                }\n                data[offset] = data[offset + 1] = data[offset + 2] = grey;\n            }\n        } while (--x);\n    } while (--y);\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'embossStrength', 0.5, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'embossWhiteLevel', 0.5, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'embossDirection', 'top-left', null, Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'embossBlend', false, null, Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Emboss.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Enhance.js":
/*!***************************************************!*\
  !*** ./node_modules/konva/lib/filters/Enhance.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nfunction remap(fromValue, fromMin, fromMax, toMin, toMax) {\n    var fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;\n    if (fromRange === 0) {\n        return toMin + toRange / 2;\n    }\n    if (toRange === 0) {\n        return toMin;\n    }\n    toValue = (fromValue - fromMin) / fromRange;\n    toValue = toRange * toValue + toMin;\n    return toValue;\n}\nexports.Enhance = function (imageData) {\n    var data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;\n    var enhanceAmount = this.enhance();\n    if (enhanceAmount === 0) {\n        return;\n    }\n    for (i = 0; i < nSubPixels; i += 4) {\n        r = data[i + 0];\n        if (r < rMin) {\n            rMin = r;\n        }\n        else if (r > rMax) {\n            rMax = r;\n        }\n        g = data[i + 1];\n        if (g < gMin) {\n            gMin = g;\n        }\n        else if (g > gMax) {\n            gMax = g;\n        }\n        b = data[i + 2];\n        if (b < bMin) {\n            bMin = b;\n        }\n        else if (b > bMax) {\n            bMax = b;\n        }\n    }\n    if (rMax === rMin) {\n        rMax = 255;\n        rMin = 0;\n    }\n    if (gMax === gMin) {\n        gMax = 255;\n        gMin = 0;\n    }\n    if (bMax === bMin) {\n        bMax = 255;\n        bMin = 0;\n    }\n    var rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;\n    if (enhanceAmount > 0) {\n        rGoalMax = rMax + enhanceAmount * (255 - rMax);\n        rGoalMin = rMin - enhanceAmount * (rMin - 0);\n        gGoalMax = gMax + enhanceAmount * (255 - gMax);\n        gGoalMin = gMin - enhanceAmount * (gMin - 0);\n        bGoalMax = bMax + enhanceAmount * (255 - bMax);\n        bGoalMin = bMin - enhanceAmount * (bMin - 0);\n    }\n    else {\n        rMid = (rMax + rMin) * 0.5;\n        rGoalMax = rMax + enhanceAmount * (rMax - rMid);\n        rGoalMin = rMin + enhanceAmount * (rMin - rMid);\n        gMid = (gMax + gMin) * 0.5;\n        gGoalMax = gMax + enhanceAmount * (gMax - gMid);\n        gGoalMin = gMin + enhanceAmount * (gMin - gMid);\n        bMid = (bMax + bMin) * 0.5;\n        bGoalMax = bMax + enhanceAmount * (bMax - bMid);\n        bGoalMin = bMin + enhanceAmount * (bMin - bMid);\n    }\n    for (i = 0; i < nSubPixels; i += 4) {\n        data[i + 0] = remap(data[i + 0], rMin, rMax, rGoalMin, rGoalMax);\n        data[i + 1] = remap(data[i + 1], gMin, gMax, gGoalMin, gGoalMax);\n        data[i + 2] = remap(data[i + 2], bMin, bMax, bGoalMin, bGoalMax);\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'enhance', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Enhance.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Grayscale.js":
/*!*****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Grayscale.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Grayscale = function (imageData) {\n    var data = imageData.data, len = data.length, i, brightness;\n    for (i = 0; i < len; i += 4) {\n        brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];\n        data[i] = brightness;\n        data[i + 1] = brightness;\n        data[i + 2] = brightness;\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Grayscale.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/HSL.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/filters/HSL.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'hue', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'saturation', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'luminance', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nexports.HSL = function (imageData) {\n    var data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;\n    var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n    var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n    var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n    var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n    var r, g, b, a;\n    for (i = 0; i < nPixels; i += 4) {\n        r = data[i + 0];\n        g = data[i + 1];\n        b = data[i + 2];\n        a = data[i + 3];\n        data[i + 0] = rr * r + rg * g + rb * b + l;\n        data[i + 1] = gr * r + gg * g + gb * b + l;\n        data[i + 2] = br * r + bg * g + bb * b + l;\n        data[i + 3] = a;\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/HSL.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/HSV.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/filters/HSV.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.HSV = function (imageData) {\n    var data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, i;\n    var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n    var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n    var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n    var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n    var r, g, b, a;\n    for (i = 0; i < nPixels; i += 4) {\n        r = data[i + 0];\n        g = data[i + 1];\n        b = data[i + 2];\n        a = data[i + 3];\n        data[i + 0] = rr * r + rg * g + rb * b;\n        data[i + 1] = gr * r + gg * g + gb * b;\n        data[i + 2] = br * r + bg * g + bb * b;\n        data[i + 3] = a;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'hue', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'saturation', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'value', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/HSV.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Invert.js":
/*!**************************************************!*\
  !*** ./node_modules/konva/lib/filters/Invert.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Invert = function (imageData) {\n    var data = imageData.data, len = data.length, i;\n    for (i = 0; i < len; i += 4) {\n        data[i] = 255 - data[i];\n        data[i + 1] = 255 - data[i + 1];\n        data[i + 2] = 255 - data[i + 2];\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Invert.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Kaleidoscope.js":
/*!********************************************************!*\
  !*** ./node_modules/konva/lib/filters/Kaleidoscope.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar ToPolar = function (src, dst, opt) {\n    var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;\n    var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n    x = xSize - xMid;\n    y = ySize - yMid;\n    rad = Math.sqrt(x * x + y * y);\n    rMax = rad > rMax ? rad : rMax;\n    var rSize = ySize, tSize = xSize, radius, theta;\n    var conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;\n    for (theta = 0; theta < tSize; theta += 1) {\n        sin = Math.sin(theta * conversion);\n        cos = Math.cos(theta * conversion);\n        for (radius = 0; radius < rSize; radius += 1) {\n            x = Math.floor(xMid + ((rMax * radius) / rSize) * cos);\n            y = Math.floor(yMid + ((rMax * radius) / rSize) * sin);\n            i = (y * xSize + x) * 4;\n            r = srcPixels[i + 0];\n            g = srcPixels[i + 1];\n            b = srcPixels[i + 2];\n            a = srcPixels[i + 3];\n            i = (theta + radius * xSize) * 4;\n            dstPixels[i + 0] = r;\n            dstPixels[i + 1] = g;\n            dstPixels[i + 2] = b;\n            dstPixels[i + 3] = a;\n        }\n    }\n};\nvar FromPolar = function (src, dst, opt) {\n    var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;\n    var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n    x = xSize - xMid;\n    y = ySize - yMid;\n    rad = Math.sqrt(x * x + y * y);\n    rMax = rad > rMax ? rad : rMax;\n    var rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;\n    var x1, y1;\n    for (x = 0; x < xSize; x += 1) {\n        for (y = 0; y < ySize; y += 1) {\n            dx = x - xMid;\n            dy = y - yMid;\n            radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;\n            theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;\n            theta = (theta * tSize) / 360;\n            x1 = Math.floor(theta);\n            y1 = Math.floor(radius);\n            i = (y1 * xSize + x1) * 4;\n            r = srcPixels[i + 0];\n            g = srcPixels[i + 1];\n            b = srcPixels[i + 2];\n            a = srcPixels[i + 3];\n            i = (y * xSize + x) * 4;\n            dstPixels[i + 0] = r;\n            dstPixels[i + 1] = g;\n            dstPixels[i + 2] = b;\n            dstPixels[i + 3] = a;\n        }\n    }\n};\nexports.Kaleidoscope = function (imageData) {\n    var xSize = imageData.width, ySize = imageData.height;\n    var x, y, xoff, i, r, g, b, a, srcPos, dstPos;\n    var power = Math.round(this.kaleidoscopePower());\n    var angle = Math.round(this.kaleidoscopeAngle());\n    var offset = Math.floor((xSize * (angle % 360)) / 360);\n    if (power < 1) {\n        return;\n    }\n    var tempCanvas = Util_1.Util.createCanvasElement();\n    tempCanvas.width = xSize;\n    tempCanvas.height = ySize;\n    var scratchData = tempCanvas\n        .getContext('2d')\n        .getImageData(0, 0, xSize, ySize);\n    ToPolar(imageData, scratchData, {\n        polarCenterX: xSize / 2,\n        polarCenterY: ySize / 2\n    });\n    var minSectionSize = xSize / Math.pow(2, power);\n    while (minSectionSize <= 8) {\n        minSectionSize = minSectionSize * 2;\n        power -= 1;\n    }\n    minSectionSize = Math.ceil(minSectionSize);\n    var sectionSize = minSectionSize;\n    var xStart = 0, xEnd = sectionSize, xDelta = 1;\n    if (offset + minSectionSize > xSize) {\n        xStart = sectionSize;\n        xEnd = 0;\n        xDelta = -1;\n    }\n    for (y = 0; y < ySize; y += 1) {\n        for (x = xStart; x !== xEnd; x += xDelta) {\n            xoff = Math.round(x + offset) % xSize;\n            srcPos = (xSize * y + xoff) * 4;\n            r = scratchData.data[srcPos + 0];\n            g = scratchData.data[srcPos + 1];\n            b = scratchData.data[srcPos + 2];\n            a = scratchData.data[srcPos + 3];\n            dstPos = (xSize * y + x) * 4;\n            scratchData.data[dstPos + 0] = r;\n            scratchData.data[dstPos + 1] = g;\n            scratchData.data[dstPos + 2] = b;\n            scratchData.data[dstPos + 3] = a;\n        }\n    }\n    for (y = 0; y < ySize; y += 1) {\n        sectionSize = Math.floor(minSectionSize);\n        for (i = 0; i < power; i += 1) {\n            for (x = 0; x < sectionSize + 1; x += 1) {\n                srcPos = (xSize * y + x) * 4;\n                r = scratchData.data[srcPos + 0];\n                g = scratchData.data[srcPos + 1];\n                b = scratchData.data[srcPos + 2];\n                a = scratchData.data[srcPos + 3];\n                dstPos = (xSize * y + sectionSize * 2 - x - 1) * 4;\n                scratchData.data[dstPos + 0] = r;\n                scratchData.data[dstPos + 1] = g;\n                scratchData.data[dstPos + 2] = b;\n                scratchData.data[dstPos + 3] = a;\n            }\n            sectionSize *= 2;\n        }\n    }\n    FromPolar(scratchData, imageData, { polarRotation: 0 });\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'kaleidoscopePower', 2, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'kaleidoscopeAngle', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Kaleidoscope.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Mask.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/filters/Mask.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nfunction pixelAt(idata, x, y) {\n    var idx = (y * idata.width + x) * 4;\n    var d = [];\n    d.push(idata.data[idx++], idata.data[idx++], idata.data[idx++], idata.data[idx++]);\n    return d;\n}\nfunction rgbDistance(p1, p2) {\n    return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +\n        Math.pow(p1[1] - p2[1], 2) +\n        Math.pow(p1[2] - p2[2], 2));\n}\nfunction rgbMean(pTab) {\n    var m = [0, 0, 0];\n    for (var i = 0; i < pTab.length; i++) {\n        m[0] += pTab[i][0];\n        m[1] += pTab[i][1];\n        m[2] += pTab[i][2];\n    }\n    m[0] /= pTab.length;\n    m[1] /= pTab.length;\n    m[2] /= pTab.length;\n    return m;\n}\nfunction backgroundMask(idata, threshold) {\n    var rgbv_no = pixelAt(idata, 0, 0);\n    var rgbv_ne = pixelAt(idata, idata.width - 1, 0);\n    var rgbv_so = pixelAt(idata, 0, idata.height - 1);\n    var rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);\n    var thres = threshold || 10;\n    if (rgbDistance(rgbv_no, rgbv_ne) < thres &&\n        rgbDistance(rgbv_ne, rgbv_se) < thres &&\n        rgbDistance(rgbv_se, rgbv_so) < thres &&\n        rgbDistance(rgbv_so, rgbv_no) < thres) {\n        var mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);\n        var mask = [];\n        for (var i = 0; i < idata.width * idata.height; i++) {\n            var d = rgbDistance(mean, [\n                idata.data[i * 4],\n                idata.data[i * 4 + 1],\n                idata.data[i * 4 + 2]\n            ]);\n            mask[i] = d < thres ? 0 : 255;\n        }\n        return mask;\n    }\n}\nfunction applyMask(idata, mask) {\n    for (var i = 0; i < idata.width * idata.height; i++) {\n        idata.data[4 * i + 3] = mask[i];\n    }\n}\nfunction erodeMask(mask, sw, sh) {\n    var weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];\n    var side = Math.round(Math.sqrt(weights.length));\n    var halfSide = Math.floor(side / 2);\n    var maskResult = [];\n    for (var y = 0; y < sh; y++) {\n        for (var x = 0; x < sw; x++) {\n            var so = y * sw + x;\n            var a = 0;\n            for (var cy = 0; cy < side; cy++) {\n                for (var cx = 0; cx < side; cx++) {\n                    var scy = y + cy - halfSide;\n                    var scx = x + cx - halfSide;\n                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n                        var srcOff = scy * sw + scx;\n                        var wt = weights[cy * side + cx];\n                        a += mask[srcOff] * wt;\n                    }\n                }\n            }\n            maskResult[so] = a === 255 * 8 ? 255 : 0;\n        }\n    }\n    return maskResult;\n}\nfunction dilateMask(mask, sw, sh) {\n    var weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];\n    var side = Math.round(Math.sqrt(weights.length));\n    var halfSide = Math.floor(side / 2);\n    var maskResult = [];\n    for (var y = 0; y < sh; y++) {\n        for (var x = 0; x < sw; x++) {\n            var so = y * sw + x;\n            var a = 0;\n            for (var cy = 0; cy < side; cy++) {\n                for (var cx = 0; cx < side; cx++) {\n                    var scy = y + cy - halfSide;\n                    var scx = x + cx - halfSide;\n                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n                        var srcOff = scy * sw + scx;\n                        var wt = weights[cy * side + cx];\n                        a += mask[srcOff] * wt;\n                    }\n                }\n            }\n            maskResult[so] = a >= 255 * 4 ? 255 : 0;\n        }\n    }\n    return maskResult;\n}\nfunction smoothEdgeMask(mask, sw, sh) {\n    var weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];\n    var side = Math.round(Math.sqrt(weights.length));\n    var halfSide = Math.floor(side / 2);\n    var maskResult = [];\n    for (var y = 0; y < sh; y++) {\n        for (var x = 0; x < sw; x++) {\n            var so = y * sw + x;\n            var a = 0;\n            for (var cy = 0; cy < side; cy++) {\n                for (var cx = 0; cx < side; cx++) {\n                    var scy = y + cy - halfSide;\n                    var scx = x + cx - halfSide;\n                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n                        var srcOff = scy * sw + scx;\n                        var wt = weights[cy * side + cx];\n                        a += mask[srcOff] * wt;\n                    }\n                }\n            }\n            maskResult[so] = a;\n        }\n    }\n    return maskResult;\n}\nexports.Mask = function (imageData) {\n    var threshold = this.threshold(), mask = backgroundMask(imageData, threshold);\n    if (mask) {\n        mask = erodeMask(mask, imageData.width, imageData.height);\n        mask = dilateMask(mask, imageData.width, imageData.height);\n        mask = smoothEdgeMask(mask, imageData.width, imageData.height);\n        applyMask(imageData, mask);\n    }\n    return imageData;\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'threshold', 0, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Mask.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Noise.js":
/*!*************************************************!*\
  !*** ./node_modules/konva/lib/filters/Noise.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Noise = function (imageData) {\n    var amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2, i;\n    for (i = 0; i < nPixels; i += 4) {\n        data[i + 0] += half - 2 * half * Math.random();\n        data[i + 1] += half - 2 * half * Math.random();\n        data[i + 2] += half - 2 * half * Math.random();\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'noise', 0.2, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Noise.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Pixelate.js":
/*!****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Pixelate.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Pixelate = function (imageData) {\n    var pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;\n    if (pixelSize <= 0) {\n        Util_1.Util.error('pixelSize value can not be <= 0');\n        return;\n    }\n    for (xBin = 0; xBin < nBinsX; xBin += 1) {\n        for (yBin = 0; yBin < nBinsY; yBin += 1) {\n            red = 0;\n            green = 0;\n            blue = 0;\n            alpha = 0;\n            xBinStart = xBin * pixelSize;\n            xBinEnd = xBinStart + pixelSize;\n            yBinStart = yBin * pixelSize;\n            yBinEnd = yBinStart + pixelSize;\n            pixelsInBin = 0;\n            for (x = xBinStart; x < xBinEnd; x += 1) {\n                if (x >= width) {\n                    continue;\n                }\n                for (y = yBinStart; y < yBinEnd; y += 1) {\n                    if (y >= height) {\n                        continue;\n                    }\n                    i = (width * y + x) * 4;\n                    red += data[i + 0];\n                    green += data[i + 1];\n                    blue += data[i + 2];\n                    alpha += data[i + 3];\n                    pixelsInBin += 1;\n                }\n            }\n            red = red / pixelsInBin;\n            green = green / pixelsInBin;\n            blue = blue / pixelsInBin;\n            alpha = alpha / pixelsInBin;\n            for (x = xBinStart; x < xBinEnd; x += 1) {\n                if (x >= width) {\n                    continue;\n                }\n                for (y = yBinStart; y < yBinEnd; y += 1) {\n                    if (y >= height) {\n                        continue;\n                    }\n                    i = (width * y + x) * 4;\n                    data[i + 0] = red;\n                    data[i + 1] = green;\n                    data[i + 2] = blue;\n                    data[i + 3] = alpha;\n                }\n            }\n        }\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'pixelSize', 8, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Pixelate.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Posterize.js":
/*!*****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Posterize.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Posterize = function (imageData) {\n    var levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;\n    for (i = 0; i < len; i += 1) {\n        data[i] = Math.floor(data[i] / scale) * scale;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'levels', 0.5, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Posterize.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/RGB.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/filters/RGB.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.RGB = function (imageData) {\n    var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;\n    for (i = 0; i < nPixels; i += 4) {\n        brightness =\n            (0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;\n        data[i] = brightness * red;\n        data[i + 1] = brightness * green;\n        data[i + 2] = brightness * blue;\n        data[i + 3] = data[i + 3];\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'red', 0, function (val) {\n    this._filterUpToDate = false;\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    else {\n        return Math.round(val);\n    }\n});\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'green', 0, function (val) {\n    this._filterUpToDate = false;\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    else {\n        return Math.round(val);\n    }\n});\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBComponent, Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/RGB.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/RGBA.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/filters/RGBA.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.RGBA = function (imageData) {\n    var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha(), i, ia;\n    for (i = 0; i < nPixels; i += 4) {\n        ia = 1 - alpha;\n        data[i] = red * alpha + data[i] * ia;\n        data[i + 1] = green * alpha + data[i + 1] * ia;\n        data[i + 2] = blue * alpha + data[i + 2] * ia;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'red', 0, function (val) {\n    this._filterUpToDate = false;\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    else {\n        return Math.round(val);\n    }\n});\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'green', 0, function (val) {\n    this._filterUpToDate = false;\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    else {\n        return Math.round(val);\n    }\n});\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBComponent, Factory_1.Factory.afterSetFilter);\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'alpha', 1, function (val) {\n    this._filterUpToDate = false;\n    if (val > 1) {\n        return 1;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    else {\n        return val;\n    }\n});\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/RGBA.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Sepia.js":
/*!*************************************************!*\
  !*** ./node_modules/konva/lib/filters/Sepia.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Sepia = function (imageData) {\n    var data = imageData.data, nPixels = data.length, i, r, g, b;\n    for (i = 0; i < nPixels; i += 4) {\n        r = data[i + 0];\n        g = data[i + 1];\n        b = data[i + 2];\n        data[i + 0] = Math.min(255, r * 0.393 + g * 0.769 + b * 0.189);\n        data[i + 1] = Math.min(255, r * 0.349 + g * 0.686 + b * 0.168);\n        data[i + 2] = Math.min(255, r * 0.272 + g * 0.534 + b * 0.131);\n    }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Sepia.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Solarize.js":
/*!****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Solarize.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Solarize = function (imageData) {\n    var data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n    do {\n        var offsetY = (y - 1) * w4;\n        var x = w;\n        do {\n            var offset = offsetY + (x - 1) * 4;\n            var r = data[offset];\n            var g = data[offset + 1];\n            var b = data[offset + 2];\n            if (r > 127) {\n                r = 255 - r;\n            }\n            if (g > 127) {\n                g = 255 - g;\n            }\n            if (b > 127) {\n                b = 255 - b;\n            }\n            data[offset] = r;\n            data[offset + 1] = g;\n            data[offset + 2] = b;\n        } while (--x);\n    } while (--y);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Solarize.js?");

/***/ }),

/***/ "./node_modules/konva/lib/filters/Threshold.js":
/*!*****************************************************!*\
  !*** ./node_modules/konva/lib/filters/Threshold.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nexports.Threshold = function (imageData) {\n    var level = this.threshold() * 255, data = imageData.data, len = data.length, i;\n    for (i = 0; i < len; i += 1) {\n        data[i] = data[i] < level ? 0 : 255;\n    }\n};\nFactory_1.Factory.addGetterSetter(Node_1.Node, 'threshold', 0.5, Validators_1.getNumberValidator(), Factory_1.Factory.afterSetFilter);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/filters/Threshold.js?");

/***/ }),

/***/ "./node_modules/konva/lib/index.js":
/*!*****************************************!*\
  !*** ./node_modules/konva/lib/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Konva = __webpack_require__(/*! ./_FullInternals */ \"./node_modules/konva/lib/_FullInternals.js\").Konva;\nKonva._injectGlobal(Konva);\nexports['default'] = Konva;\nmodule.exports = exports['default'];\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/index.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Arc.js":
/*!**********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Arc.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_2 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Arc = (function (_super) {\n    __extends(Arc, _super);\n    function Arc() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Arc.prototype._sceneFunc = function (context) {\n        var angle = Global_1.Konva.getAngle(this.angle()), clockwise = this.clockwise();\n        context.beginPath();\n        context.arc(0, 0, this.outerRadius(), 0, angle, clockwise);\n        context.arc(0, 0, this.innerRadius(), angle, 0, !clockwise);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Arc.prototype.getWidth = function () {\n        return this.outerRadius() * 2;\n    };\n    Arc.prototype.getHeight = function () {\n        return this.outerRadius() * 2;\n    };\n    Arc.prototype.setWidth = function (width) {\n        this.outerRadius(width / 2);\n    };\n    Arc.prototype.setHeight = function (height) {\n        this.outerRadius(height / 2);\n    };\n    return Arc;\n}(Shape_1.Shape));\nexports.Arc = Arc;\nArc.prototype._centroid = true;\nArc.prototype.className = 'Arc';\nArc.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\nGlobal_2._registerNode(Arc);\nFactory_1.Factory.addGetterSetter(Arc, 'innerRadius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Arc, 'outerRadius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Arc, 'angle', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Arc, 'clockwise', false, Validators_1.getBooleanValidator());\nUtil_1.Collection.mapMethods(Arc);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Arc.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Arrow.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Arrow.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Line_1 = __webpack_require__(/*! ./Line */ \"./node_modules/konva/lib/shapes/Line.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Arrow = (function (_super) {\n    __extends(Arrow, _super);\n    function Arrow() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Arrow.prototype._sceneFunc = function (ctx) {\n        _super.prototype._sceneFunc.call(this, ctx);\n        var PI2 = Math.PI * 2;\n        var points = this.points();\n        var tp = points;\n        var fromTension = this.tension() !== 0 && points.length > 4;\n        if (fromTension) {\n            tp = this.getTensionPoints();\n        }\n        var n = points.length;\n        var dx, dy;\n        if (fromTension) {\n            dx = points[n - 2] - (tp[tp.length - 2] + tp[tp.length - 4]) / 2;\n            dy = points[n - 1] - (tp[tp.length - 1] + tp[tp.length - 3]) / 2;\n        }\n        else {\n            dx = points[n - 2] - points[n - 4];\n            dy = points[n - 1] - points[n - 3];\n        }\n        var radians = (Math.atan2(dy, dx) + PI2) % PI2;\n        var length = this.pointerLength();\n        var width = this.pointerWidth();\n        ctx.save();\n        ctx.beginPath();\n        ctx.translate(points[n - 2], points[n - 1]);\n        ctx.rotate(radians);\n        ctx.moveTo(0, 0);\n        ctx.lineTo(-length, width / 2);\n        ctx.lineTo(-length, -width / 2);\n        ctx.closePath();\n        ctx.restore();\n        if (this.pointerAtBeginning()) {\n            ctx.save();\n            ctx.translate(points[0], points[1]);\n            if (fromTension) {\n                dx = (tp[0] + tp[2]) / 2 - points[0];\n                dy = (tp[1] + tp[3]) / 2 - points[1];\n            }\n            else {\n                dx = points[2] - points[0];\n                dy = points[3] - points[1];\n            }\n            ctx.rotate((Math.atan2(-dy, -dx) + PI2) % PI2);\n            ctx.moveTo(0, 0);\n            ctx.lineTo(-length, width / 2);\n            ctx.lineTo(-length, -width / 2);\n            ctx.closePath();\n            ctx.restore();\n        }\n        var isDashEnabled = this.dashEnabled();\n        if (isDashEnabled) {\n            this.attrs.dashEnabled = false;\n            ctx.setLineDash([]);\n        }\n        ctx.fillStrokeShape(this);\n        if (isDashEnabled) {\n            this.attrs.dashEnabled = true;\n        }\n    };\n    Arrow.prototype.getSelfRect = function () {\n        var lineRect = _super.prototype.getSelfRect.call(this);\n        var offset = this.pointerWidth() / 2;\n        return {\n            x: lineRect.x - offset,\n            y: lineRect.y - offset,\n            width: lineRect.width + offset * 2,\n            height: lineRect.height + offset * 2\n        };\n    };\n    return Arrow;\n}(Line_1.Line));\nexports.Arrow = Arrow;\nArrow.prototype.className = 'Arrow';\nGlobal_1._registerNode(Arrow);\nFactory_1.Factory.addGetterSetter(Arrow, 'pointerLength', 10, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Arrow, 'pointerWidth', 10, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Arrow, 'pointerAtBeginning', false);\nUtil_1.Collection.mapMethods(Arrow);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Arrow.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Circle.js":
/*!*************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Circle.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Circle = (function (_super) {\n    __extends(Circle, _super);\n    function Circle() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Circle.prototype._sceneFunc = function (context) {\n        context.beginPath();\n        context.arc(0, 0, this.radius(), 0, Math.PI * 2, false);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Circle.prototype.getWidth = function () {\n        return this.radius() * 2;\n    };\n    Circle.prototype.getHeight = function () {\n        return this.radius() * 2;\n    };\n    Circle.prototype.setWidth = function (width) {\n        if (this.radius() !== width / 2) {\n            this.radius(width / 2);\n        }\n    };\n    Circle.prototype.setHeight = function (height) {\n        if (this.radius() !== height / 2) {\n            this.radius(height / 2);\n        }\n    };\n    return Circle;\n}(Shape_1.Shape));\nexports.Circle = Circle;\nCircle.prototype._centroid = true;\nCircle.prototype.className = 'Circle';\nCircle.prototype._attrsAffectingSize = ['radius'];\nGlobal_1._registerNode(Circle);\nFactory_1.Factory.addGetterSetter(Circle, 'radius', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Circle);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Circle.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Ellipse.js":
/*!**************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Ellipse.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Ellipse = (function (_super) {\n    __extends(Ellipse, _super);\n    function Ellipse() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Ellipse.prototype._sceneFunc = function (context) {\n        var rx = this.radiusX(), ry = this.radiusY();\n        context.beginPath();\n        context.save();\n        if (rx !== ry) {\n            context.scale(1, ry / rx);\n        }\n        context.arc(0, 0, rx, 0, Math.PI * 2, false);\n        context.restore();\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Ellipse.prototype.getWidth = function () {\n        return this.radiusX() * 2;\n    };\n    Ellipse.prototype.getHeight = function () {\n        return this.radiusY() * 2;\n    };\n    Ellipse.prototype.setWidth = function (width) {\n        this.radiusX(width / 2);\n    };\n    Ellipse.prototype.setHeight = function (height) {\n        this.radiusY(height / 2);\n    };\n    return Ellipse;\n}(Shape_1.Shape));\nexports.Ellipse = Ellipse;\nEllipse.prototype.className = 'Ellipse';\nEllipse.prototype._centroid = true;\nEllipse.prototype._attrsAffectingSize = ['radiusX', 'radiusY'];\nGlobal_1._registerNode(Ellipse);\nFactory_1.Factory.addComponentsGetterSetter(Ellipse, 'radius', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Ellipse, 'radiusX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Ellipse, 'radiusY', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Ellipse);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Ellipse.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Image.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Image.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Image = (function (_super) {\n    __extends(Image, _super);\n    function Image() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Image.prototype._useBufferCanvas = function () {\n        return !!((this.hasShadow() || this.getAbsoluteOpacity() !== 1) &&\n            this.hasStroke() &&\n            this.getStage());\n    };\n    Image.prototype._sceneFunc = function (context) {\n        var width = this.width(), height = this.height(), image = this.image(), cropWidth, cropHeight, params;\n        if (image) {\n            cropWidth = this.cropWidth();\n            cropHeight = this.cropHeight();\n            if (cropWidth && cropHeight) {\n                params = [\n                    image,\n                    this.cropX(),\n                    this.cropY(),\n                    cropWidth,\n                    cropHeight,\n                    0,\n                    0,\n                    width,\n                    height\n                ];\n            }\n            else {\n                params = [image, 0, 0, width, height];\n            }\n        }\n        if (this.hasFill() || this.hasStroke()) {\n            context.beginPath();\n            context.rect(0, 0, width, height);\n            context.closePath();\n            context.fillStrokeShape(this);\n        }\n        if (image) {\n            context.drawImage.apply(context, params);\n        }\n    };\n    Image.prototype._hitFunc = function (context) {\n        var width = this.width(), height = this.height();\n        context.beginPath();\n        context.rect(0, 0, width, height);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Image.prototype.getWidth = function () {\n        var _a;\n        var image = this.image();\n        return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (image ? image.width : 0);\n    };\n    Image.prototype.getHeight = function () {\n        var _a;\n        var image = this.image();\n        return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (image ? image.height : 0);\n    };\n    Image.fromURL = function (url, callback) {\n        var img = Util_1.Util.createImageElement();\n        img.onload = function () {\n            var image = new Image({\n                image: img\n            });\n            callback(image);\n        };\n        img.crossOrigin = 'Anonymous';\n        img.src = url;\n    };\n    return Image;\n}(Shape_1.Shape));\nexports.Image = Image;\nImage.prototype.className = 'Image';\nGlobal_1._registerNode(Image);\nFactory_1.Factory.addGetterSetter(Image, 'image');\nFactory_1.Factory.addComponentsGetterSetter(Image, 'crop', ['x', 'y', 'width', 'height']);\nFactory_1.Factory.addGetterSetter(Image, 'cropX', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Image, 'cropY', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Image, 'cropWidth', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Image, 'cropHeight', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Image);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Image.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Label.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Label.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Group_1 = __webpack_require__(/*! ../Group */ \"./node_modules/konva/lib/Group.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar ATTR_CHANGE_LIST = [\n    'fontFamily',\n    'fontSize',\n    'fontStyle',\n    'padding',\n    'lineHeight',\n    'text',\n    'width'\n], CHANGE_KONVA = 'Change.konva', NONE = 'none', UP = 'up', RIGHT = 'right', DOWN = 'down', LEFT = 'left', attrChangeListLen = ATTR_CHANGE_LIST.length;\nvar Label = (function (_super) {\n    __extends(Label, _super);\n    function Label(config) {\n        var _this = _super.call(this, config) || this;\n        _this.on('add.konva', function (evt) {\n            this._addListeners(evt.child);\n            this._sync();\n        });\n        return _this;\n    }\n    Label.prototype.getText = function () {\n        return this.find('Text')[0];\n    };\n    Label.prototype.getTag = function () {\n        return this.find('Tag')[0];\n    };\n    Label.prototype._addListeners = function (text) {\n        var that = this, n;\n        var func = function () {\n            that._sync();\n        };\n        for (n = 0; n < attrChangeListLen; n++) {\n            text.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, func);\n        }\n    };\n    Label.prototype.getWidth = function () {\n        return this.getText().width();\n    };\n    Label.prototype.getHeight = function () {\n        return this.getText().height();\n    };\n    Label.prototype._sync = function () {\n        var text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;\n        if (text && tag) {\n            width = text.width();\n            height = text.height();\n            pointerDirection = tag.pointerDirection();\n            pointerWidth = tag.pointerWidth();\n            pointerHeight = tag.pointerHeight();\n            x = 0;\n            y = 0;\n            switch (pointerDirection) {\n                case UP:\n                    x = width / 2;\n                    y = -1 * pointerHeight;\n                    break;\n                case RIGHT:\n                    x = width + pointerWidth;\n                    y = height / 2;\n                    break;\n                case DOWN:\n                    x = width / 2;\n                    y = height + pointerHeight;\n                    break;\n                case LEFT:\n                    x = -1 * pointerWidth;\n                    y = height / 2;\n                    break;\n            }\n            tag.setAttrs({\n                x: -1 * x,\n                y: -1 * y,\n                width: width,\n                height: height\n            });\n            text.setAttrs({\n                x: -1 * x,\n                y: -1 * y\n            });\n        }\n    };\n    return Label;\n}(Group_1.Group));\nexports.Label = Label;\nLabel.prototype.className = 'Label';\nGlobal_1._registerNode(Label);\nUtil_1.Collection.mapMethods(Label);\nvar Tag = (function (_super) {\n    __extends(Tag, _super);\n    function Tag() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Tag.prototype._sceneFunc = function (context) {\n        var width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = Math.min(this.cornerRadius(), width / 2, height / 2);\n        context.beginPath();\n        if (!cornerRadius) {\n            context.moveTo(0, 0);\n        }\n        else {\n            context.moveTo(cornerRadius, 0);\n        }\n        if (pointerDirection === UP) {\n            context.lineTo((width - pointerWidth) / 2, 0);\n            context.lineTo(width / 2, -1 * pointerHeight);\n            context.lineTo((width + pointerWidth) / 2, 0);\n        }\n        if (!cornerRadius) {\n            context.lineTo(width, 0);\n        }\n        else {\n            context.lineTo(width - cornerRadius, 0);\n            context.arc(width - cornerRadius, cornerRadius, cornerRadius, (Math.PI * 3) / 2, 0, false);\n        }\n        if (pointerDirection === RIGHT) {\n            context.lineTo(width, (height - pointerHeight) / 2);\n            context.lineTo(width + pointerWidth, height / 2);\n            context.lineTo(width, (height + pointerHeight) / 2);\n        }\n        if (!cornerRadius) {\n            context.lineTo(width, height);\n        }\n        else {\n            context.lineTo(width, height - cornerRadius);\n            context.arc(width - cornerRadius, height - cornerRadius, cornerRadius, 0, Math.PI / 2, false);\n        }\n        if (pointerDirection === DOWN) {\n            context.lineTo((width + pointerWidth) / 2, height);\n            context.lineTo(width / 2, height + pointerHeight);\n            context.lineTo((width - pointerWidth) / 2, height);\n        }\n        if (!cornerRadius) {\n            context.lineTo(0, height);\n        }\n        else {\n            context.lineTo(cornerRadius, height);\n            context.arc(cornerRadius, height - cornerRadius, cornerRadius, Math.PI / 2, Math.PI, false);\n        }\n        if (pointerDirection === LEFT) {\n            context.lineTo(0, (height + pointerHeight) / 2);\n            context.lineTo(-1 * pointerWidth, height / 2);\n            context.lineTo(0, (height - pointerHeight) / 2);\n        }\n        if (cornerRadius) {\n            context.lineTo(0, cornerRadius);\n            context.arc(cornerRadius, cornerRadius, cornerRadius, Math.PI, (Math.PI * 3) / 2, false);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Tag.prototype.getSelfRect = function () {\n        var x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();\n        if (direction === UP) {\n            y -= pointerHeight;\n            height += pointerHeight;\n        }\n        else if (direction === DOWN) {\n            height += pointerHeight;\n        }\n        else if (direction === LEFT) {\n            x -= pointerWidth * 1.5;\n            width += pointerWidth;\n        }\n        else if (direction === RIGHT) {\n            width += pointerWidth * 1.5;\n        }\n        return {\n            x: x,\n            y: y,\n            width: width,\n            height: height\n        };\n    };\n    return Tag;\n}(Shape_1.Shape));\nexports.Tag = Tag;\nTag.prototype.className = 'Tag';\nGlobal_1._registerNode(Tag);\nFactory_1.Factory.addGetterSetter(Tag, 'pointerDirection', NONE);\nFactory_1.Factory.addGetterSetter(Tag, 'pointerWidth', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Tag, 'pointerHeight', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Tag, 'cornerRadius', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Tag);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Label.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Line.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Line.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Line = (function (_super) {\n    __extends(Line, _super);\n    function Line(config) {\n        var _this = _super.call(this, config) || this;\n        _this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n            this._clearCache('tensionPoints');\n        });\n        return _this;\n    }\n    Line.prototype._sceneFunc = function (context) {\n        var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n        if (!length) {\n            return;\n        }\n        context.beginPath();\n        context.moveTo(points[0], points[1]);\n        if (tension !== 0 && length > 4) {\n            tp = this.getTensionPoints();\n            len = tp.length;\n            n = closed ? 0 : 4;\n            if (!closed) {\n                context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n            }\n            while (n < len - 2) {\n                context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n            }\n            if (!closed) {\n                context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n            }\n        }\n        else if (bezier) {\n            n = 2;\n            while (n < length) {\n                context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n            }\n        }\n        else {\n            for (n = 2; n < length; n += 2) {\n                context.lineTo(points[n], points[n + 1]);\n            }\n        }\n        if (closed) {\n            context.closePath();\n            context.fillStrokeShape(this);\n        }\n        else {\n            context.strokeShape(this);\n        }\n    };\n    Line.prototype.getTensionPoints = function () {\n        return this._getCache('tensionPoints', this._getTensionPoints);\n    };\n    Line.prototype._getTensionPoints = function () {\n        if (this.closed()) {\n            return this._getTensionPointsClosed();\n        }\n        else {\n            return Util_1.Util._expandPoints(this.points(), this.tension());\n        }\n    };\n    Line.prototype._getTensionPointsClosed = function () {\n        var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = Util_1.Util._getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = Util_1.Util._getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = Util_1.Util._expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n            .concat(middle)\n            .concat([\n            lastControlPoints[0],\n            lastControlPoints[1],\n            p[len - 2],\n            p[len - 1],\n            lastControlPoints[2],\n            lastControlPoints[3],\n            firstControlPoints[0],\n            firstControlPoints[1],\n            p[0],\n            p[1]\n        ]);\n        return tp;\n    };\n    Line.prototype.getWidth = function () {\n        return this.getSelfRect().width;\n    };\n    Line.prototype.getHeight = function () {\n        return this.getSelfRect().height;\n    };\n    Line.prototype.getSelfRect = function () {\n        var points = this.points();\n        if (points.length < 4) {\n            return {\n                x: points[0] || 0,\n                y: points[1] || 0,\n                width: 0,\n                height: 0\n            };\n        }\n        if (this.tension() !== 0) {\n            points = __spreadArrays([\n                points[0],\n                points[1]\n            ], this._getTensionPoints(), [\n                points[points.length - 2],\n                points[points.length - 1]\n            ]);\n        }\n        else {\n            points = this.points();\n        }\n        var minX = points[0];\n        var maxX = points[0];\n        var minY = points[1];\n        var maxY = points[1];\n        var x, y;\n        for (var i = 0; i < points.length / 2; i++) {\n            x = points[i * 2];\n            y = points[i * 2 + 1];\n            minX = Math.min(minX, x);\n            maxX = Math.max(maxX, x);\n            minY = Math.min(minY, y);\n            maxY = Math.max(maxY, y);\n        }\n        return {\n            x: minX,\n            y: minY,\n            width: maxX - minX,\n            height: maxY - minY\n        };\n    };\n    return Line;\n}(Shape_1.Shape));\nexports.Line = Line;\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\nGlobal_1._registerNode(Line);\nFactory_1.Factory.addGetterSetter(Line, 'closed', false);\nFactory_1.Factory.addGetterSetter(Line, 'bezier', false);\nFactory_1.Factory.addGetterSetter(Line, 'tension', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Line, 'points', [], Validators_1.getNumberArrayValidator());\nUtil_1.Collection.mapMethods(Line);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Line.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Path.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Path.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Path = (function (_super) {\n    __extends(Path, _super);\n    function Path(config) {\n        var _this = _super.call(this, config) || this;\n        _this.dataArray = [];\n        _this.pathLength = 0;\n        _this.dataArray = Path.parsePathData(_this.data());\n        _this.pathLength = 0;\n        for (var i = 0; i < _this.dataArray.length; ++i) {\n            _this.pathLength += _this.dataArray[i].pathLength;\n        }\n        _this.on('dataChange.konva', function () {\n            this.dataArray = Path.parsePathData(this.data());\n            this.pathLength = 0;\n            for (var i = 0; i < this.dataArray.length; ++i) {\n                this.pathLength += this.dataArray[i].pathLength;\n            }\n        });\n        return _this;\n    }\n    Path.prototype._sceneFunc = function (context) {\n        var ca = this.dataArray;\n        context.beginPath();\n        var isClosed = false;\n        for (var n = 0; n < ca.length; n++) {\n            var c = ca[n].command;\n            var p = ca[n].points;\n            switch (c) {\n                case 'L':\n                    context.lineTo(p[0], p[1]);\n                    break;\n                case 'M':\n                    context.moveTo(p[0], p[1]);\n                    break;\n                case 'C':\n                    context.bezierCurveTo(p[0], p[1], p[2], p[3], p[4], p[5]);\n                    break;\n                case 'Q':\n                    context.quadraticCurveTo(p[0], p[1], p[2], p[3]);\n                    break;\n                case 'A':\n                    var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6], fs = p[7];\n                    var r = rx > ry ? rx : ry;\n                    var scaleX = rx > ry ? 1 : rx / ry;\n                    var scaleY = rx > ry ? ry / rx : 1;\n                    context.translate(cx, cy);\n                    context.rotate(psi);\n                    context.scale(scaleX, scaleY);\n                    context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n                    context.scale(1 / scaleX, 1 / scaleY);\n                    context.rotate(-psi);\n                    context.translate(-cx, -cy);\n                    break;\n                case 'z':\n                    isClosed = true;\n                    context.closePath();\n                    break;\n            }\n        }\n        if (!isClosed && !this.hasFill()) {\n            context.strokeShape(this);\n        }\n        else {\n            context.fillStrokeShape(this);\n        }\n    };\n    Path.prototype.getSelfRect = function () {\n        var points = [];\n        this.dataArray.forEach(function (data) {\n            if (data.command === 'A') {\n                var start = data.points[4];\n                var dTheta = data.points[5];\n                var end = data.points[4] + dTheta;\n                var inc = Math.PI / 180.0;\n                if (Math.abs(start - end) < inc) {\n                    inc = Math.abs(start - end);\n                }\n                if (dTheta < 0) {\n                    for (var t = start - inc; t > end; t -= inc) {\n                        var point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n                        points.push(point.x, point.y);\n                    }\n                }\n                else {\n                    for (var t = start + inc; t < end; t += inc) {\n                        var point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n                        points.push(point.x, point.y);\n                    }\n                }\n            }\n            else if (data.command === 'C') {\n                for (var t = 0.0; t <= 1; t += 0.01) {\n                    var point = Path.getPointOnCubicBezier(t, data.start.x, data.start.y, data.points[0], data.points[1], data.points[2], data.points[3], data.points[4], data.points[5]);\n                    points.push(point.x, point.y);\n                }\n            }\n            else {\n                points = points.concat(data.points);\n            }\n        });\n        var minX = points[0];\n        var maxX = points[0];\n        var minY = points[1];\n        var maxY = points[1];\n        var x, y;\n        for (var i = 0; i < points.length / 2; i++) {\n            x = points[i * 2];\n            y = points[i * 2 + 1];\n            if (!isNaN(x)) {\n                minX = Math.min(minX, x);\n                maxX = Math.max(maxX, x);\n            }\n            if (!isNaN(y)) {\n                minY = Math.min(minY, y);\n                maxY = Math.max(maxY, y);\n            }\n        }\n        return {\n            x: Math.round(minX),\n            y: Math.round(minY),\n            width: Math.round(maxX - minX),\n            height: Math.round(maxY - minY)\n        };\n    };\n    Path.prototype.getLength = function () {\n        return this.pathLength;\n    };\n    Path.prototype.getPointAtLength = function (length) {\n        var point, i = 0, ii = this.dataArray.length;\n        if (!ii) {\n            return null;\n        }\n        while (i < ii && length > this.dataArray[i].pathLength) {\n            length -= this.dataArray[i].pathLength;\n            ++i;\n        }\n        if (i === ii) {\n            point = this.dataArray[i - 1].points.slice(-2);\n            return {\n                x: point[0],\n                y: point[1]\n            };\n        }\n        if (length < 0.01) {\n            point = this.dataArray[i].points.slice(0, 2);\n            return {\n                x: point[0],\n                y: point[1]\n            };\n        }\n        var cp = this.dataArray[i];\n        var p = cp.points;\n        switch (cp.command) {\n            case 'L':\n                return Path.getPointOnLine(length, cp.start.x, cp.start.y, p[0], p[1]);\n            case 'C':\n                return Path.getPointOnCubicBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3], p[4], p[5]);\n            case 'Q':\n                return Path.getPointOnQuadraticBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3]);\n            case 'A':\n                var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6];\n                theta += (dTheta * length) / cp.pathLength;\n                return Path.getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi);\n        }\n        return null;\n    };\n    Path.getLineLength = function (x1, y1, x2, y2) {\n        return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n    };\n    Path.getPointOnLine = function (dist, P1x, P1y, P2x, P2y, fromX, fromY) {\n        if (fromX === undefined) {\n            fromX = P1x;\n        }\n        if (fromY === undefined) {\n            fromY = P1y;\n        }\n        var m = (P2y - P1y) / (P2x - P1x + 0.00000001);\n        var run = Math.sqrt((dist * dist) / (1 + m * m));\n        if (P2x < P1x) {\n            run *= -1;\n        }\n        var rise = m * run;\n        var pt;\n        if (P2x === P1x) {\n            pt = {\n                x: fromX,\n                y: fromY + rise\n            };\n        }\n        else if ((fromY - P1y) / (fromX - P1x + 0.00000001) === m) {\n            pt = {\n                x: fromX + run,\n                y: fromY + rise\n            };\n        }\n        else {\n            var ix, iy;\n            var len = this.getLineLength(P1x, P1y, P2x, P2y);\n            if (len < 0.00000001) {\n                return undefined;\n            }\n            var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);\n            u = u / (len * len);\n            ix = P1x + u * (P2x - P1x);\n            iy = P1y + u * (P2y - P1y);\n            var pRise = this.getLineLength(fromX, fromY, ix, iy);\n            var pRun = Math.sqrt(dist * dist - pRise * pRise);\n            run = Math.sqrt((pRun * pRun) / (1 + m * m));\n            if (P2x < P1x) {\n                run *= -1;\n            }\n            rise = m * run;\n            pt = {\n                x: ix + run,\n                y: iy + rise\n            };\n        }\n        return pt;\n    };\n    Path.getPointOnCubicBezier = function (pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {\n        function CB1(t) {\n            return t * t * t;\n        }\n        function CB2(t) {\n            return 3 * t * t * (1 - t);\n        }\n        function CB3(t) {\n            return 3 * t * (1 - t) * (1 - t);\n        }\n        function CB4(t) {\n            return (1 - t) * (1 - t) * (1 - t);\n        }\n        var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);\n        var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);\n        return {\n            x: x,\n            y: y\n        };\n    };\n    Path.getPointOnQuadraticBezier = function (pct, P1x, P1y, P2x, P2y, P3x, P3y) {\n        function QB1(t) {\n            return t * t;\n        }\n        function QB2(t) {\n            return 2 * t * (1 - t);\n        }\n        function QB3(t) {\n            return (1 - t) * (1 - t);\n        }\n        var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);\n        var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);\n        return {\n            x: x,\n            y: y\n        };\n    };\n    Path.getPointOnEllipticalArc = function (cx, cy, rx, ry, theta, psi) {\n        var cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);\n        var pt = {\n            x: rx * Math.cos(theta),\n            y: ry * Math.sin(theta)\n        };\n        return {\n            x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n            y: cy + (pt.x * sinPsi + pt.y * cosPsi)\n        };\n    };\n    Path.parsePathData = function (data) {\n        if (!data) {\n            return [];\n        }\n        var cs = data;\n        var cc = [\n            'm',\n            'M',\n            'l',\n            'L',\n            'v',\n            'V',\n            'h',\n            'H',\n            'z',\n            'Z',\n            'c',\n            'C',\n            'q',\n            'Q',\n            't',\n            'T',\n            's',\n            'S',\n            'a',\n            'A'\n        ];\n        cs = cs.replace(new RegExp(' ', 'g'), ',');\n        for (var n = 0; n < cc.length; n++) {\n            cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n        }\n        var arr = cs.split('|');\n        var ca = [];\n        var coords = [];\n        var cpx = 0;\n        var cpy = 0;\n        var re = /([-+]?((\\d+\\.\\d+)|((\\d+)|(\\.\\d+)))(?:e[-+]?\\d+)?)/gi;\n        var match;\n        for (n = 1; n < arr.length; n++) {\n            var str = arr[n];\n            var c = str.charAt(0);\n            str = str.slice(1);\n            coords.length = 0;\n            while ((match = re.exec(str))) {\n                coords.push(match[0]);\n            }\n            var p = [];\n            for (var j = 0, jlen = coords.length; j < jlen; j++) {\n                var parsed = parseFloat(coords[j]);\n                if (!isNaN(parsed)) {\n                    p.push(parsed);\n                }\n                else {\n                    p.push(0);\n                }\n            }\n            while (p.length > 0) {\n                if (isNaN(p[0])) {\n                    break;\n                }\n                var cmd = null;\n                var points = [];\n                var startX = cpx, startY = cpy;\n                var prevCmd, ctlPtx, ctlPty;\n                var rx, ry, psi, fa, fs, x1, y1;\n                switch (c) {\n                    case 'l':\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'L';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'L':\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        points.push(cpx, cpy);\n                        break;\n                    case 'm':\n                        var dx = p.shift();\n                        var dy = p.shift();\n                        cpx += dx;\n                        cpy += dy;\n                        cmd = 'M';\n                        if (ca.length > 2 && ca[ca.length - 1].command === 'z') {\n                            for (var idx = ca.length - 2; idx >= 0; idx--) {\n                                if (ca[idx].command === 'M') {\n                                    cpx = ca[idx].points[0] + dx;\n                                    cpy = ca[idx].points[1] + dy;\n                                    break;\n                                }\n                            }\n                        }\n                        points.push(cpx, cpy);\n                        c = 'l';\n                        break;\n                    case 'M':\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        cmd = 'M';\n                        points.push(cpx, cpy);\n                        c = 'L';\n                        break;\n                    case 'h':\n                        cpx += p.shift();\n                        cmd = 'L';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'H':\n                        cpx = p.shift();\n                        cmd = 'L';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'v':\n                        cpy += p.shift();\n                        cmd = 'L';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'V':\n                        cpy = p.shift();\n                        cmd = 'L';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'C':\n                        points.push(p.shift(), p.shift(), p.shift(), p.shift());\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        points.push(cpx, cpy);\n                        break;\n                    case 'c':\n                        points.push(cpx + p.shift(), cpy + p.shift(), cpx + p.shift(), cpy + p.shift());\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'C';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'S':\n                        ctlPtx = cpx;\n                        ctlPty = cpy;\n                        prevCmd = ca[ca.length - 1];\n                        if (prevCmd.command === 'C') {\n                            ctlPtx = cpx + (cpx - prevCmd.points[2]);\n                            ctlPty = cpy + (cpy - prevCmd.points[3]);\n                        }\n                        points.push(ctlPtx, ctlPty, p.shift(), p.shift());\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        cmd = 'C';\n                        points.push(cpx, cpy);\n                        break;\n                    case 's':\n                        ctlPtx = cpx;\n                        ctlPty = cpy;\n                        prevCmd = ca[ca.length - 1];\n                        if (prevCmd.command === 'C') {\n                            ctlPtx = cpx + (cpx - prevCmd.points[2]);\n                            ctlPty = cpy + (cpy - prevCmd.points[3]);\n                        }\n                        points.push(ctlPtx, ctlPty, cpx + p.shift(), cpy + p.shift());\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'C';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'Q':\n                        points.push(p.shift(), p.shift());\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        points.push(cpx, cpy);\n                        break;\n                    case 'q':\n                        points.push(cpx + p.shift(), cpy + p.shift());\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'Q';\n                        points.push(cpx, cpy);\n                        break;\n                    case 'T':\n                        ctlPtx = cpx;\n                        ctlPty = cpy;\n                        prevCmd = ca[ca.length - 1];\n                        if (prevCmd.command === 'Q') {\n                            ctlPtx = cpx + (cpx - prevCmd.points[0]);\n                            ctlPty = cpy + (cpy - prevCmd.points[1]);\n                        }\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        cmd = 'Q';\n                        points.push(ctlPtx, ctlPty, cpx, cpy);\n                        break;\n                    case 't':\n                        ctlPtx = cpx;\n                        ctlPty = cpy;\n                        prevCmd = ca[ca.length - 1];\n                        if (prevCmd.command === 'Q') {\n                            ctlPtx = cpx + (cpx - prevCmd.points[0]);\n                            ctlPty = cpy + (cpy - prevCmd.points[1]);\n                        }\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'Q';\n                        points.push(ctlPtx, ctlPty, cpx, cpy);\n                        break;\n                    case 'A':\n                        rx = p.shift();\n                        ry = p.shift();\n                        psi = p.shift();\n                        fa = p.shift();\n                        fs = p.shift();\n                        x1 = cpx;\n                        y1 = cpy;\n                        cpx = p.shift();\n                        cpy = p.shift();\n                        cmd = 'A';\n                        points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n                        break;\n                    case 'a':\n                        rx = p.shift();\n                        ry = p.shift();\n                        psi = p.shift();\n                        fa = p.shift();\n                        fs = p.shift();\n                        x1 = cpx;\n                        y1 = cpy;\n                        cpx += p.shift();\n                        cpy += p.shift();\n                        cmd = 'A';\n                        points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n                        break;\n                }\n                ca.push({\n                    command: cmd || c,\n                    points: points,\n                    start: {\n                        x: startX,\n                        y: startY\n                    },\n                    pathLength: this.calcLength(startX, startY, cmd || c, points)\n                });\n            }\n            if (c === 'z' || c === 'Z') {\n                ca.push({\n                    command: 'z',\n                    points: [],\n                    start: undefined,\n                    pathLength: 0\n                });\n            }\n        }\n        return ca;\n    };\n    Path.calcLength = function (x, y, cmd, points) {\n        var len, p1, p2, t;\n        var path = Path;\n        switch (cmd) {\n            case 'L':\n                return path.getLineLength(x, y, points[0], points[1]);\n            case 'C':\n                len = 0.0;\n                p1 = path.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n                for (t = 0.01; t <= 1; t += 0.01) {\n                    p2 = path.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n                    len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n                    p1 = p2;\n                }\n                return len;\n            case 'Q':\n                len = 0.0;\n                p1 = path.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n                for (t = 0.01; t <= 1; t += 0.01) {\n                    p2 = path.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n                    len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n                    p1 = p2;\n                }\n                return len;\n            case 'A':\n                len = 0.0;\n                var start = points[4];\n                var dTheta = points[5];\n                var end = points[4] + dTheta;\n                var inc = Math.PI / 180.0;\n                if (Math.abs(start - end) < inc) {\n                    inc = Math.abs(start - end);\n                }\n                p1 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n                if (dTheta < 0) {\n                    for (t = start - inc; t > end; t -= inc) {\n                        p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n                        len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n                        p1 = p2;\n                    }\n                }\n                else {\n                    for (t = start + inc; t < end; t += inc) {\n                        p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n                        len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n                        p1 = p2;\n                    }\n                }\n                p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n                len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n                return len;\n        }\n        return 0;\n    };\n    Path.convertEndpointToCenterParameterization = function (x1, y1, x2, y2, fa, fs, rx, ry, psiDeg) {\n        var psi = psiDeg * (Math.PI / 180.0);\n        var xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;\n        var yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +\n            (Math.cos(psi) * (y1 - y2)) / 2.0;\n        var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n        if (lambda > 1) {\n            rx *= Math.sqrt(lambda);\n            ry *= Math.sqrt(lambda);\n        }\n        var f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /\n            (rx * rx * (yp * yp) + ry * ry * (xp * xp)));\n        if (fa === fs) {\n            f *= -1;\n        }\n        if (isNaN(f)) {\n            f = 0;\n        }\n        var cxp = (f * rx * yp) / ry;\n        var cyp = (f * -ry * xp) / rx;\n        var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n        var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n        var vMag = function (v) {\n            return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n        };\n        var vRatio = function (u, v) {\n            return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n        };\n        var vAngle = function (u, v) {\n            return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n        };\n        var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n        var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n        var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n        var dTheta = vAngle(u, v);\n        if (vRatio(u, v) <= -1) {\n            dTheta = Math.PI;\n        }\n        if (vRatio(u, v) >= 1) {\n            dTheta = 0;\n        }\n        if (fs === 0 && dTheta > 0) {\n            dTheta = dTheta - 2 * Math.PI;\n        }\n        if (fs === 1 && dTheta < 0) {\n            dTheta = dTheta + 2 * Math.PI;\n        }\n        return [cx, cy, rx, ry, theta, dTheta, psi, fs];\n    };\n    return Path;\n}(Shape_1.Shape));\nexports.Path = Path;\nPath.prototype.className = 'Path';\nPath.prototype._attrsAffectingSize = ['data'];\nGlobal_1._registerNode(Path);\nFactory_1.Factory.addGetterSetter(Path, 'data');\nUtil_1.Collection.mapMethods(Path);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Path.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Rect.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Rect.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Rect = (function (_super) {\n    __extends(Rect, _super);\n    function Rect() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Rect.prototype._sceneFunc = function (context) {\n        var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n        context.beginPath();\n        if (!cornerRadius) {\n            context.rect(0, 0, width, height);\n        }\n        else {\n            var topLeft = 0;\n            var topRight = 0;\n            var bottomLeft = 0;\n            var bottomRight = 0;\n            if (typeof cornerRadius === 'number') {\n                topLeft = topRight = bottomLeft = bottomRight = Math.min(cornerRadius, width / 2, height / 2);\n            }\n            else {\n                topLeft = Math.min(cornerRadius[0], width / 2, height / 2);\n                topRight = Math.min(cornerRadius[1], width / 2, height / 2);\n                bottomRight = Math.min(cornerRadius[2], width / 2, height / 2);\n                bottomLeft = Math.min(cornerRadius[3], width / 2, height / 2);\n            }\n            context.moveTo(topLeft, 0);\n            context.lineTo(width - topRight, 0);\n            context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n            context.lineTo(width, height - bottomRight);\n            context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n            context.lineTo(bottomLeft, height);\n            context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n            context.lineTo(0, topLeft);\n            context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    return Rect;\n}(Shape_1.Shape));\nexports.Rect = Rect;\nRect.prototype.className = 'Rect';\nGlobal_1._registerNode(Rect);\nFactory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0);\nUtil_1.Collection.mapMethods(Rect);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Rect.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/RegularPolygon.js":
/*!*********************************************************!*\
  !*** ./node_modules/konva/lib/shapes/RegularPolygon.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar RegularPolygon = (function (_super) {\n    __extends(RegularPolygon, _super);\n    function RegularPolygon() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    RegularPolygon.prototype._sceneFunc = function (context) {\n        var sides = this.sides(), radius = this.radius(), n, x, y;\n        context.beginPath();\n        context.moveTo(0, 0 - radius);\n        for (n = 1; n < sides; n++) {\n            x = radius * Math.sin((n * 2 * Math.PI) / sides);\n            y = -1 * radius * Math.cos((n * 2 * Math.PI) / sides);\n            context.lineTo(x, y);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    RegularPolygon.prototype.getWidth = function () {\n        return this.radius() * 2;\n    };\n    RegularPolygon.prototype.getHeight = function () {\n        return this.radius() * 2;\n    };\n    RegularPolygon.prototype.setWidth = function (width) {\n        this.radius(width / 2);\n    };\n    RegularPolygon.prototype.setHeight = function (height) {\n        this.radius(height / 2);\n    };\n    return RegularPolygon;\n}(Shape_1.Shape));\nexports.RegularPolygon = RegularPolygon;\nRegularPolygon.prototype.className = 'RegularPolygon';\nRegularPolygon.prototype._centroid = true;\nRegularPolygon.prototype._attrsAffectingSize = ['radius'];\nGlobal_1._registerNode(RegularPolygon);\nFactory_1.Factory.addGetterSetter(RegularPolygon, 'radius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(RegularPolygon, 'sides', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(RegularPolygon);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/RegularPolygon.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Ring.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Ring.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar PIx2 = Math.PI * 2;\nvar Ring = (function (_super) {\n    __extends(Ring, _super);\n    function Ring() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Ring.prototype._sceneFunc = function (context) {\n        context.beginPath();\n        context.arc(0, 0, this.innerRadius(), 0, PIx2, false);\n        context.moveTo(this.outerRadius(), 0);\n        context.arc(0, 0, this.outerRadius(), PIx2, 0, true);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Ring.prototype.getWidth = function () {\n        return this.outerRadius() * 2;\n    };\n    Ring.prototype.getHeight = function () {\n        return this.outerRadius() * 2;\n    };\n    Ring.prototype.setWidth = function (width) {\n        this.outerRadius(width / 2);\n    };\n    Ring.prototype.setHeight = function (height) {\n        this.outerRadius(height / 2);\n    };\n    return Ring;\n}(Shape_1.Shape));\nexports.Ring = Ring;\nRing.prototype.className = 'Ring';\nRing.prototype._centroid = true;\nRing.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\nGlobal_1._registerNode(Ring);\nFactory_1.Factory.addGetterSetter(Ring, 'innerRadius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Ring, 'outerRadius', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Ring);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Ring.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Sprite.js":
/*!*************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Sprite.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Animation_1 = __webpack_require__(/*! ../Animation */ \"./node_modules/konva/lib/Animation.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Sprite = (function (_super) {\n    __extends(Sprite, _super);\n    function Sprite(config) {\n        var _this = _super.call(this, config) || this;\n        _this._updated = true;\n        _this.anim = new Animation_1.Animation(function () {\n            var updated = _this._updated;\n            _this._updated = false;\n            return updated;\n        });\n        _this.on('animationChange.konva', function () {\n            this.frameIndex(0);\n        });\n        _this.on('frameIndexChange.konva', function () {\n            this._updated = true;\n        });\n        _this.on('frameRateChange.konva', function () {\n            if (!this.anim.isRunning()) {\n                return;\n            }\n            clearInterval(this.interval);\n            this._setInterval();\n        });\n        return _this;\n    }\n    Sprite.prototype._sceneFunc = function (context) {\n        var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();\n        if (this.hasFill() || this.hasStroke()) {\n            context.beginPath();\n            context.rect(0, 0, width, height);\n            context.closePath();\n            context.fillStrokeShape(this);\n        }\n        if (image) {\n            if (offsets) {\n                var offset = offsets[anim], ix2 = index * 2;\n                context.drawImage(image, x, y, width, height, offset[ix2 + 0], offset[ix2 + 1], width, height);\n            }\n            else {\n                context.drawImage(image, x, y, width, height, 0, 0, width, height);\n            }\n        }\n    };\n    Sprite.prototype._hitFunc = function (context) {\n        var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];\n        context.beginPath();\n        if (offsets) {\n            var offset = offsets[anim];\n            var ix2 = index * 2;\n            context.rect(offset[ix2 + 0], offset[ix2 + 1], width, height);\n        }\n        else {\n            context.rect(0, 0, width, height);\n        }\n        context.closePath();\n        context.fillShape(this);\n    };\n    Sprite.prototype._useBufferCanvas = function () {\n        return ((this.hasShadow() || this.getAbsoluteOpacity() !== 1) && this.hasStroke());\n    };\n    Sprite.prototype._setInterval = function () {\n        var that = this;\n        this.interval = setInterval(function () {\n            that._updateIndex();\n        }, 1000 / this.frameRate());\n    };\n    Sprite.prototype.start = function () {\n        if (this.isRunning()) {\n            return;\n        }\n        var layer = this.getLayer();\n        this.anim.setLayers(layer);\n        this._setInterval();\n        this.anim.start();\n    };\n    Sprite.prototype.stop = function () {\n        this.anim.stop();\n        clearInterval(this.interval);\n    };\n    Sprite.prototype.isRunning = function () {\n        return this.anim.isRunning();\n    };\n    Sprite.prototype._updateIndex = function () {\n        var index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;\n        if (index < len - 1) {\n            this.frameIndex(index + 1);\n        }\n        else {\n            this.frameIndex(0);\n        }\n    };\n    return Sprite;\n}(Shape_1.Shape));\nexports.Sprite = Sprite;\nSprite.prototype.className = 'Sprite';\nGlobal_1._registerNode(Sprite);\nFactory_1.Factory.addGetterSetter(Sprite, 'animation');\nFactory_1.Factory.addGetterSetter(Sprite, 'animations');\nFactory_1.Factory.addGetterSetter(Sprite, 'frameOffsets');\nFactory_1.Factory.addGetterSetter(Sprite, 'image');\nFactory_1.Factory.addGetterSetter(Sprite, 'frameIndex', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Sprite, 'frameRate', 17, Validators_1.getNumberValidator());\nFactory_1.Factory.backCompat(Sprite, {\n    index: 'frameIndex',\n    getIndex: 'getFrameIndex',\n    setIndex: 'setFrameIndex'\n});\nUtil_1.Collection.mapMethods(Sprite);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Sprite.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Star.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Star.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Star = (function (_super) {\n    __extends(Star, _super);\n    function Star() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Star.prototype._sceneFunc = function (context) {\n        var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();\n        context.beginPath();\n        context.moveTo(0, 0 - outerRadius);\n        for (var n = 1; n < numPoints * 2; n++) {\n            var radius = n % 2 === 0 ? outerRadius : innerRadius;\n            var x = radius * Math.sin((n * Math.PI) / numPoints);\n            var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);\n            context.lineTo(x, y);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Star.prototype.getWidth = function () {\n        return this.outerRadius() * 2;\n    };\n    Star.prototype.getHeight = function () {\n        return this.outerRadius() * 2;\n    };\n    Star.prototype.setWidth = function (width) {\n        this.outerRadius(width / 2);\n    };\n    Star.prototype.setHeight = function (height) {\n        this.outerRadius(height / 2);\n    };\n    return Star;\n}(Shape_1.Shape));\nexports.Star = Star;\nStar.prototype.className = 'Star';\nStar.prototype._centroid = true;\nStar.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\nGlobal_1._registerNode(Star);\nFactory_1.Factory.addGetterSetter(Star, 'numPoints', 5, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Star, 'innerRadius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Star, 'outerRadius', 0, Validators_1.getNumberValidator());\nUtil_1.Collection.mapMethods(Star);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Star.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Text.js":
/*!***********************************************!*\
  !*** ./node_modules/konva/lib/shapes/Text.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_2 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar AUTO = 'auto', CENTER = 'center', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n    'fontFamily',\n    'fontSize',\n    'fontStyle',\n    'fontVariant',\n    'padding',\n    'align',\n    'verticalAlign',\n    'lineHeight',\n    'text',\n    'width',\n    'height',\n    'wrap',\n    'ellipsis',\n    'letterSpacing'\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nvar dummyContext;\nfunction getDummyContext() {\n    if (dummyContext) {\n        return dummyContext;\n    }\n    dummyContext = Util_1.Util.createCanvasElement().getContext(CONTEXT_2D);\n    return dummyContext;\n}\nfunction _fillFunc(context) {\n    context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n    context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n    config = config || {};\n    if (!config.fillLinearGradientColorStops &&\n        !config.fillRadialGradientColorStops &&\n        !config.fillPatternImage) {\n        config.fill = config.fill || 'black';\n    }\n    return config;\n}\nvar trimRight = String.prototype.trimRight ||\n    function polyfill() {\n        return this.replace(/[\\s\\xa0]+$/, '');\n    };\nvar Text = (function (_super) {\n    __extends(Text, _super);\n    function Text(config) {\n        var _this = _super.call(this, checkDefaultFill(config)) || this;\n        _this._partialTextX = 0;\n        _this._partialTextY = 0;\n        for (var n = 0; n < attrChangeListLen; n++) {\n            _this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, _this._setTextData);\n        }\n        _this._setTextData();\n        return _this;\n    }\n    Text.prototype._sceneFunc = function (context) {\n        var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, textArr = this.textArr, textArrLen = textArr.length, verticalAlign = this.verticalAlign(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n        var translateY = 0;\n        var translateY = lineHeightPx / 2;\n        var lineTranslateX = 0;\n        var lineTranslateY = 0;\n        context.setAttr('font', this._getContextFont());\n        context.setAttr('textBaseline', MIDDLE);\n        context.setAttr('textAlign', LEFT);\n        if (verticalAlign === MIDDLE) {\n            alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n        }\n        else if (verticalAlign === BOTTOM) {\n            alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n        }\n        context.translate(padding, alignY + padding);\n        for (n = 0; n < textArrLen; n++) {\n            var lineTranslateX = 0;\n            var lineTranslateY = 0;\n            var obj = textArr[n], text = obj.text, width = obj.width, lastLine = n !== textArrLen - 1, spacesNumber, oneWord, lineWidth;\n            context.save();\n            if (align === RIGHT) {\n                lineTranslateX += totalWidth - width - padding * 2;\n            }\n            else if (align === CENTER) {\n                lineTranslateX += (totalWidth - width - padding * 2) / 2;\n            }\n            if (shouldUnderline) {\n                context.save();\n                context.beginPath();\n                context.moveTo(lineTranslateX, translateY + lineTranslateY + Math.round(fontSize / 2));\n                spacesNumber = text.split(' ').length - 1;\n                oneWord = spacesNumber === 0;\n                lineWidth =\n                    align === JUSTIFY && lastLine && !oneWord\n                        ? totalWidth - padding * 2\n                        : width;\n                context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + Math.round(fontSize / 2));\n                context.lineWidth = fontSize / 15;\n                context.strokeStyle = fill;\n                context.stroke();\n                context.restore();\n            }\n            if (shouldLineThrough) {\n                context.save();\n                context.beginPath();\n                context.moveTo(lineTranslateX, translateY + lineTranslateY);\n                spacesNumber = text.split(' ').length - 1;\n                oneWord = spacesNumber === 0;\n                lineWidth =\n                    align === JUSTIFY && lastLine && !oneWord\n                        ? totalWidth - padding * 2\n                        : width;\n                context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY);\n                context.lineWidth = fontSize / 15;\n                context.strokeStyle = fill;\n                context.stroke();\n                context.restore();\n            }\n            if (letterSpacing !== 0 || align === JUSTIFY) {\n                spacesNumber = text.split(' ').length - 1;\n                for (var li = 0; li < text.length; li++) {\n                    var letter = text[li];\n                    if (letter === ' ' && n !== textArrLen - 1 && align === JUSTIFY) {\n                        lineTranslateX += Math.floor((totalWidth - padding * 2 - width) / spacesNumber);\n                    }\n                    this._partialTextX = lineTranslateX;\n                    this._partialTextY = translateY + lineTranslateY;\n                    this._partialText = letter;\n                    context.fillStrokeShape(this);\n                    lineTranslateX +=\n                        Math.round(this.measureSize(letter).width) + letterSpacing;\n                }\n            }\n            else {\n                this._partialTextX = lineTranslateX;\n                this._partialTextY = translateY + lineTranslateY;\n                this._partialText = text;\n                context.fillStrokeShape(this);\n            }\n            context.restore();\n            if (textArrLen > 1) {\n                translateY += lineHeightPx;\n            }\n        }\n    };\n    Text.prototype._hitFunc = function (context) {\n        var width = this.getWidth(), height = this.getHeight();\n        context.beginPath();\n        context.rect(0, 0, width, height);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Text.prototype.setText = function (text) {\n        var str = Util_1.Util._isString(text)\n            ? text\n            : text === null || text === undefined\n                ? ''\n                : text + '';\n        this._setAttr(TEXT, str);\n        return this;\n    };\n    Text.prototype.getWidth = function () {\n        var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n        return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n    };\n    Text.prototype.getHeight = function () {\n        var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n        return isAuto\n            ? this.fontSize() * this.textArr.length * this.lineHeight() +\n                this.padding() * 2\n            : this.attrs.height;\n    };\n    Text.prototype.getTextWidth = function () {\n        return this.textWidth;\n    };\n    Text.prototype.getTextHeight = function () {\n        Util_1.Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n        return this.textHeight;\n    };\n    Text.prototype.measureSize = function (text) {\n        var _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n        _context.save();\n        _context.font = this._getContextFont();\n        metrics = _context.measureText(text);\n        _context.restore();\n        return {\n            width: metrics.width,\n            height: fontSize\n        };\n    };\n    Text.prototype._getContextFont = function () {\n        if (Global_1.Konva.UA.isIE) {\n            return (this.fontStyle() +\n                SPACE +\n                this.fontSize() +\n                PX_SPACE +\n                this.fontFamily());\n        }\n        return (this.fontStyle() +\n            SPACE +\n            this.fontVariant() +\n            SPACE +\n            this.fontSize() +\n            PX_SPACE +\n            this.fontFamily());\n    };\n    Text.prototype._addTextLine = function (line) {\n        if (this.align() === JUSTIFY) {\n            line = line.trim();\n        }\n        var width = this._getTextWidth(line);\n        return this.textArr.push({ text: line, width: width });\n    };\n    Text.prototype._getTextWidth = function (text) {\n        var letterSpacing = this.letterSpacing();\n        var length = text.length;\n        return (getDummyContext().measureText(text).width +\n            (length ? letterSpacing * (length - 1) : 0));\n    };\n    Text.prototype._setTextData = function () {\n        var lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis() && !shouldWrap;\n        this.textArr = [];\n        getDummyContext().font = this._getContextFont();\n        var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;\n        for (var i = 0, max = lines.length; i < max; ++i) {\n            var line = lines[i];\n            var lineWidth = this._getTextWidth(line);\n            if (fixedWidth && lineWidth > maxWidth) {\n                while (line.length > 0) {\n                    var low = 0, high = line.length, match = '', matchWidth = 0;\n                    while (low < high) {\n                        var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;\n                        if (substrWidth <= maxWidth) {\n                            low = mid + 1;\n                            match = substr + (shouldAddEllipsis ? ELLIPSIS : '');\n                            matchWidth = substrWidth;\n                        }\n                        else {\n                            high = mid;\n                        }\n                    }\n                    if (match) {\n                        if (wrapAtWord) {\n                            var wrapIndex;\n                            var nextChar = line[match.length];\n                            var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n                            if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n                                wrapIndex = match.length;\n                            }\n                            else {\n                                wrapIndex =\n                                    Math.max(match.lastIndexOf(SPACE), match.lastIndexOf(DASH)) +\n                                        1;\n                            }\n                            if (wrapIndex > 0) {\n                                low = wrapIndex;\n                                match = match.slice(0, low);\n                                matchWidth = this._getTextWidth(match);\n                            }\n                        }\n                        match = match.trimRight();\n                        this._addTextLine(match);\n                        textWidth = Math.max(textWidth, matchWidth);\n                        currentHeightPx += lineHeightPx;\n                        if (!shouldWrap ||\n                            (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx)) {\n                            break;\n                        }\n                        line = line.slice(low);\n                        line = line.trimLeft();\n                        if (line.length > 0) {\n                            lineWidth = this._getTextWidth(line);\n                            if (lineWidth <= maxWidth) {\n                                this._addTextLine(line);\n                                currentHeightPx += lineHeightPx;\n                                textWidth = Math.max(textWidth, lineWidth);\n                                break;\n                            }\n                        }\n                    }\n                    else {\n                        break;\n                    }\n                }\n            }\n            else {\n                this._addTextLine(line);\n                currentHeightPx += lineHeightPx;\n                textWidth = Math.max(textWidth, lineWidth);\n            }\n            if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n                break;\n            }\n        }\n        this.textHeight = fontSize;\n        this.textWidth = textWidth;\n    };\n    Text.prototype.getStrokeScaleEnabled = function () {\n        return true;\n    };\n    return Text;\n}(Shape_1.Shape));\nexports.Text = Text;\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n    'text',\n    'fontSize',\n    'padding',\n    'wrap',\n    'lineHeight'\n];\nGlobal_2._registerNode(Text);\nFactory_1.Factory.overWriteSetter(Text, 'width', Validators_1.getNumberOrAutoValidator());\nFactory_1.Factory.overWriteSetter(Text, 'height', Validators_1.getNumberOrAutoValidator());\nFactory_1.Factory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory_1.Factory.addGetterSetter(Text, 'fontSize', 12, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'padding', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Text, 'align', LEFT);\nFactory_1.Factory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory_1.Factory.addGetterSetter(Text, 'lineHeight', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Text, 'wrap', WORD);\nFactory_1.Factory.addGetterSetter(Text, 'ellipsis', false);\nFactory_1.Factory.addGetterSetter(Text, 'letterSpacing', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Text, 'text', '', Validators_1.getStringValidator());\nFactory_1.Factory.addGetterSetter(Text, 'textDecoration', '');\nUtil_1.Collection.mapMethods(Text);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Text.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/TextPath.js":
/*!***************************************************!*\
  !*** ./node_modules/konva/lib/shapes/TextPath.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Path_1 = __webpack_require__(/*! ./Path */ \"./node_modules/konva/lib/shapes/Path.js\");\nvar Text_1 = __webpack_require__(/*! ./Text */ \"./node_modules/konva/lib/shapes/Text.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar EMPTY_STRING = '', NORMAL = 'normal';\nfunction _fillFunc(context) {\n    context.fillText(this.partialText, 0, 0);\n}\nfunction _strokeFunc(context) {\n    context.strokeText(this.partialText, 0, 0);\n}\nvar TextPath = (function (_super) {\n    __extends(TextPath, _super);\n    function TextPath(config) {\n        var _this = _super.call(this, config) || this;\n        _this.dummyCanvas = Util_1.Util.createCanvasElement();\n        _this.dataArray = [];\n        _this.dataArray = Path_1.Path.parsePathData(_this.attrs.data);\n        _this.on('dataChange.konva', function () {\n            this.dataArray = Path_1.Path.parsePathData(this.attrs.data);\n            this._setTextData();\n        });\n        _this.on('textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva', _this._setTextData);\n        if (config && config['getKerning']) {\n            Util_1.Util.warn('getKerning TextPath API is deprecated. Please use \"kerningFunc\" instead.');\n            _this.kerningFunc(config['getKerning']);\n        }\n        _this._setTextData();\n        return _this;\n    }\n    TextPath.prototype._sceneFunc = function (context) {\n        context.setAttr('font', this._getContextFont());\n        context.setAttr('textBaseline', this.textBaseline());\n        context.setAttr('textAlign', 'left');\n        context.save();\n        var textDecoration = this.textDecoration();\n        var fill = this.fill();\n        var fontSize = this.fontSize();\n        var glyphInfo = this.glyphInfo;\n        if (textDecoration === 'underline') {\n            context.beginPath();\n        }\n        for (var i = 0; i < glyphInfo.length; i++) {\n            context.save();\n            var p0 = glyphInfo[i].p0;\n            context.translate(p0.x, p0.y);\n            context.rotate(glyphInfo[i].rotation);\n            this.partialText = glyphInfo[i].text;\n            context.fillStrokeShape(this);\n            if (textDecoration === 'underline') {\n                if (i === 0) {\n                    context.moveTo(0, fontSize / 2 + 1);\n                }\n                context.lineTo(fontSize, fontSize / 2 + 1);\n            }\n            context.restore();\n        }\n        if (textDecoration === 'underline') {\n            context.strokeStyle = fill;\n            context.lineWidth = fontSize / 20;\n            context.stroke();\n        }\n        context.restore();\n    };\n    TextPath.prototype._hitFunc = function (context) {\n        context.beginPath();\n        var glyphInfo = this.glyphInfo;\n        if (glyphInfo.length >= 1) {\n            var p0 = glyphInfo[0].p0;\n            context.moveTo(p0.x, p0.y);\n        }\n        for (var i = 0; i < glyphInfo.length; i++) {\n            var p1 = glyphInfo[i].p1;\n            context.lineTo(p1.x, p1.y);\n        }\n        context.setAttr('lineWidth', this.fontSize());\n        context.setAttr('strokeStyle', this.colorKey);\n        context.stroke();\n    };\n    TextPath.prototype.getTextWidth = function () {\n        return this.textWidth;\n    };\n    TextPath.prototype.getTextHeight = function () {\n        Util_1.Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n        return this.textHeight;\n    };\n    TextPath.prototype.setText = function (text) {\n        return Text_1.Text.prototype.setText.call(this, text);\n    };\n    TextPath.prototype._getContextFont = function () {\n        return Text_1.Text.prototype._getContextFont.call(this);\n    };\n    TextPath.prototype._getTextSize = function (text) {\n        var dummyCanvas = this.dummyCanvas;\n        var _context = dummyCanvas.getContext('2d');\n        _context.save();\n        _context.font = this._getContextFont();\n        var metrics = _context.measureText(text);\n        _context.restore();\n        return {\n            width: metrics.width,\n            height: parseInt(this.attrs.fontSize, 10)\n        };\n    };\n    TextPath.prototype._setTextData = function () {\n        var that = this;\n        var size = this._getTextSize(this.attrs.text);\n        var letterSpacing = this.letterSpacing();\n        var align = this.align();\n        var kerningFunc = this.kerningFunc();\n        this.textWidth = size.width;\n        this.textHeight = size.height;\n        var textFullWidth = Math.max(this.textWidth + ((this.attrs.text || '').length - 1) * letterSpacing, 0);\n        this.glyphInfo = [];\n        var fullPathWidth = 0;\n        for (var l = 0; l < that.dataArray.length; l++) {\n            if (that.dataArray[l].pathLength > 0) {\n                fullPathWidth += that.dataArray[l].pathLength;\n            }\n        }\n        var offset = 0;\n        if (align === 'center') {\n            offset = Math.max(0, fullPathWidth / 2 - textFullWidth / 2);\n        }\n        if (align === 'right') {\n            offset = Math.max(0, fullPathWidth - textFullWidth);\n        }\n        var charArr = this.text().split('');\n        var spacesNumber = this.text().split(' ').length - 1;\n        var p0, p1, pathCmd;\n        var pIndex = -1;\n        var currentT = 0;\n        var getNextPathSegment = function () {\n            currentT = 0;\n            var pathData = that.dataArray;\n            for (var j = pIndex + 1; j < pathData.length; j++) {\n                if (pathData[j].pathLength > 0) {\n                    pIndex = j;\n                    return pathData[j];\n                }\n                else if (pathData[j].command === 'M') {\n                    p0 = {\n                        x: pathData[j].points[0],\n                        y: pathData[j].points[1]\n                    };\n                }\n            }\n            return {};\n        };\n        var findSegmentToFitCharacter = function (c) {\n            var glyphWidth = that._getTextSize(c).width + letterSpacing;\n            if (c === ' ' && align === 'justify') {\n                glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n            }\n            var currLen = 0;\n            var attempts = 0;\n            p1 = undefined;\n            while (Math.abs(glyphWidth - currLen) / glyphWidth > 0.01 &&\n                attempts < 25) {\n                attempts++;\n                var cumulativePathLength = currLen;\n                while (pathCmd === undefined) {\n                    pathCmd = getNextPathSegment();\n                    if (pathCmd &&\n                        cumulativePathLength + pathCmd.pathLength < glyphWidth) {\n                        cumulativePathLength += pathCmd.pathLength;\n                        pathCmd = undefined;\n                    }\n                }\n                if (pathCmd === {} || p0 === undefined) {\n                    return undefined;\n                }\n                var needNewSegment = false;\n                switch (pathCmd.command) {\n                    case 'L':\n                        if (Path_1.Path.getLineLength(p0.x, p0.y, pathCmd.points[0], pathCmd.points[1]) > glyphWidth) {\n                            p1 = Path_1.Path.getPointOnLine(glyphWidth, p0.x, p0.y, pathCmd.points[0], pathCmd.points[1], p0.x, p0.y);\n                        }\n                        else {\n                            pathCmd = undefined;\n                        }\n                        break;\n                    case 'A':\n                        var start = pathCmd.points[4];\n                        var dTheta = pathCmd.points[5];\n                        var end = pathCmd.points[4] + dTheta;\n                        if (currentT === 0) {\n                            currentT = start + 0.00000001;\n                        }\n                        else if (glyphWidth > currLen) {\n                            currentT += ((Math.PI / 180.0) * dTheta) / Math.abs(dTheta);\n                        }\n                        else {\n                            currentT -= ((Math.PI / 360.0) * dTheta) / Math.abs(dTheta);\n                        }\n                        if ((dTheta < 0 && currentT < end) ||\n                            (dTheta >= 0 && currentT > end)) {\n                            currentT = end;\n                            needNewSegment = true;\n                        }\n                        p1 = Path_1.Path.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);\n                        break;\n                    case 'C':\n                        if (currentT === 0) {\n                            if (glyphWidth > pathCmd.pathLength) {\n                                currentT = 0.00000001;\n                            }\n                            else {\n                                currentT = glyphWidth / pathCmd.pathLength;\n                            }\n                        }\n                        else if (glyphWidth > currLen) {\n                            currentT += (glyphWidth - currLen) / pathCmd.pathLength;\n                        }\n                        else {\n                            currentT -= (currLen - glyphWidth) / pathCmd.pathLength;\n                        }\n                        if (currentT > 1.0) {\n                            currentT = 1.0;\n                            needNewSegment = true;\n                        }\n                        p1 = Path_1.Path.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);\n                        break;\n                    case 'Q':\n                        if (currentT === 0) {\n                            currentT = glyphWidth / pathCmd.pathLength;\n                        }\n                        else if (glyphWidth > currLen) {\n                            currentT += (glyphWidth - currLen) / pathCmd.pathLength;\n                        }\n                        else {\n                            currentT -= (currLen - glyphWidth) / pathCmd.pathLength;\n                        }\n                        if (currentT > 1.0) {\n                            currentT = 1.0;\n                            needNewSegment = true;\n                        }\n                        p1 = Path_1.Path.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);\n                        break;\n                }\n                if (p1 !== undefined) {\n                    currLen = Path_1.Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n                }\n                if (needNewSegment) {\n                    needNewSegment = false;\n                    pathCmd = undefined;\n                }\n            }\n        };\n        var testChar = 'C';\n        var glyphWidth = that._getTextSize(testChar).width + letterSpacing;\n        var lettersInOffset = offset / glyphWidth - 1;\n        for (var k = 0; k < lettersInOffset; k++) {\n            findSegmentToFitCharacter(testChar);\n            if (p0 === undefined || p1 === undefined) {\n                break;\n            }\n            p0 = p1;\n        }\n        for (var i = 0; i < charArr.length; i++) {\n            findSegmentToFitCharacter(charArr[i]);\n            if (p0 === undefined || p1 === undefined) {\n                break;\n            }\n            var width = Path_1.Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n            var kern = 0;\n            if (kerningFunc) {\n                try {\n                    kern = kerningFunc(charArr[i - 1], charArr[i]) * this.fontSize();\n                }\n                catch (e) {\n                    kern = 0;\n                }\n            }\n            p0.x += kern;\n            p1.x += kern;\n            this.textWidth += kern;\n            var midpoint = Path_1.Path.getPointOnLine(kern + width / 2.0, p0.x, p0.y, p1.x, p1.y);\n            var rotation = Math.atan2(p1.y - p0.y, p1.x - p0.x);\n            this.glyphInfo.push({\n                transposeX: midpoint.x,\n                transposeY: midpoint.y,\n                text: charArr[i],\n                rotation: rotation,\n                p0: p0,\n                p1: p1\n            });\n            p0 = p1;\n        }\n    };\n    TextPath.prototype.getSelfRect = function () {\n        if (!this.glyphInfo.length) {\n            return {\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0\n            };\n        }\n        var points = [];\n        this.glyphInfo.forEach(function (info) {\n            points.push(info.p0.x);\n            points.push(info.p0.y);\n            points.push(info.p1.x);\n            points.push(info.p1.y);\n        });\n        var minX = points[0] || 0;\n        var maxX = points[0] || 0;\n        var minY = points[1] || 0;\n        var maxY = points[1] || 0;\n        var x, y;\n        for (var i = 0; i < points.length / 2; i++) {\n            x = points[i * 2];\n            y = points[i * 2 + 1];\n            minX = Math.min(minX, x);\n            maxX = Math.max(maxX, x);\n            minY = Math.min(minY, y);\n            maxY = Math.max(maxY, y);\n        }\n        var fontSize = this.fontSize();\n        return {\n            x: minX - fontSize / 2,\n            y: minY - fontSize / 2,\n            width: maxX - minX + fontSize,\n            height: maxY - minY + fontSize\n        };\n    };\n    return TextPath;\n}(Shape_1.Shape));\nexports.TextPath = TextPath;\nTextPath.prototype._fillFunc = _fillFunc;\nTextPath.prototype._strokeFunc = _strokeFunc;\nTextPath.prototype._fillFuncHit = _fillFunc;\nTextPath.prototype._strokeFuncHit = _strokeFunc;\nTextPath.prototype.className = 'TextPath';\nTextPath.prototype._attrsAffectingSize = ['text', 'fontSize', 'data'];\nGlobal_1._registerNode(TextPath);\nFactory_1.Factory.addGetterSetter(TextPath, 'data');\nFactory_1.Factory.addGetterSetter(TextPath, 'fontFamily', 'Arial');\nFactory_1.Factory.addGetterSetter(TextPath, 'fontSize', 12, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(TextPath, 'fontStyle', NORMAL);\nFactory_1.Factory.addGetterSetter(TextPath, 'align', 'left');\nFactory_1.Factory.addGetterSetter(TextPath, 'letterSpacing', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(TextPath, 'textBaseline', 'middle');\nFactory_1.Factory.addGetterSetter(TextPath, 'fontVariant', NORMAL);\nFactory_1.Factory.addGetterSetter(TextPath, 'text', EMPTY_STRING);\nFactory_1.Factory.addGetterSetter(TextPath, 'textDecoration', null);\nFactory_1.Factory.addGetterSetter(TextPath, 'kerningFunc', null);\nUtil_1.Collection.mapMethods(TextPath);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/TextPath.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Transformer.js":
/*!******************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Transformer.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Node_1 = __webpack_require__(/*! ../Node */ \"./node_modules/konva/lib/Node.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Rect_1 = __webpack_require__(/*! ./Rect */ \"./node_modules/konva/lib/shapes/Rect.js\");\nvar Group_1 = __webpack_require__(/*! ../Group */ \"./node_modules/konva/lib/Group.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_2 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar EVENTS_NAME = 'tr-konva';\nvar ATTR_CHANGE_LIST = [\n    'resizeEnabledChange',\n    'rotateAnchorOffsetChange',\n    'rotateEnabledChange',\n    'enabledAnchorsChange',\n    'anchorSizeChange',\n    'borderEnabledChange',\n    'borderStrokeChange',\n    'borderStrokeWidthChange',\n    'borderDashChange',\n    'anchorStrokeChange',\n    'anchorStrokeWidthChange',\n    'anchorFillChange',\n    'anchorCornerRadiusChange',\n    'ignoreStrokeChange',\n]\n    .map(function (e) { return e + (\".\" + EVENTS_NAME); })\n    .join(' ');\nvar NODES_RECT = 'nodesRect';\nvar TRANSFORM_CHANGE_STR = [\n    'widthChange',\n    'heightChange',\n    'scaleXChange',\n    'scaleYChange',\n    'skewXChange',\n    'skewYChange',\n    'rotationChange',\n    'offsetXChange',\n    'offsetYChange',\n    'transformsEnabledChange',\n    'strokeWidthChange',\n]\n    .map(function (e) { return e + (\".\" + EVENTS_NAME); })\n    .join(' ');\nvar ANGLES = {\n    'top-left': -45,\n    'top-center': 0,\n    'top-right': 45,\n    'middle-right': -90,\n    'middle-left': 90,\n    'bottom-left': -135,\n    'bottom-center': 180,\n    'bottom-right': 135,\n};\nvar TOUCH_DEVICE = 'ontouchstart' in Global_1.Konva._global;\nfunction getCursor(anchorName, rad) {\n    if (anchorName === 'rotater') {\n        return 'crosshair';\n    }\n    rad += Util_1.Util._degToRad(ANGLES[anchorName] || 0);\n    var angle = ((Util_1.Util._radToDeg(rad) % 360) + 360) % 360;\n    if (Util_1.Util._inRange(angle, 315 + 22.5, 360) || Util_1.Util._inRange(angle, 0, 22.5)) {\n        return 'ns-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 45 - 22.5, 45 + 22.5)) {\n        return 'nesw-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 90 - 22.5, 90 + 22.5)) {\n        return 'ew-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 135 - 22.5, 135 + 22.5)) {\n        return 'nwse-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 180 - 22.5, 180 + 22.5)) {\n        return 'ns-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 225 - 22.5, 225 + 22.5)) {\n        return 'nesw-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 270 - 22.5, 270 + 22.5)) {\n        return 'ew-resize';\n    }\n    else if (Util_1.Util._inRange(angle, 315 - 22.5, 315 + 22.5)) {\n        return 'nwse-resize';\n    }\n    else {\n        Util_1.Util.error('Transformer has unknown angle for cursor detection: ' + angle);\n        return 'pointer';\n    }\n}\nvar ANCHORS_NAMES = [\n    'top-left',\n    'top-center',\n    'top-right',\n    'middle-right',\n    'middle-left',\n    'bottom-left',\n    'bottom-center',\n    'bottom-right',\n];\nvar MAX_SAFE_INTEGER = 100000000;\nfunction getCenter(shape) {\n    return {\n        x: shape.x +\n            (shape.width / 2) * Math.cos(shape.rotation) +\n            (shape.height / 2) * Math.sin(-shape.rotation),\n        y: shape.y +\n            (shape.height / 2) * Math.cos(shape.rotation) +\n            (shape.width / 2) * Math.sin(shape.rotation),\n    };\n}\nfunction rotateAroundPoint(shape, angleRad, point) {\n    var x = point.x +\n        (shape.x - point.x) * Math.cos(angleRad) -\n        (shape.y - point.y) * Math.sin(angleRad);\n    var y = point.y +\n        (shape.x - point.x) * Math.sin(angleRad) +\n        (shape.y - point.y) * Math.cos(angleRad);\n    return __assign(__assign({}, shape), { rotation: shape.rotation + angleRad, x: x,\n        y: y });\n}\nfunction rotateAroundCenter(shape, deltaRad) {\n    var center = getCenter(shape);\n    return rotateAroundPoint(shape, deltaRad, center);\n}\nfunction getSnap(snaps, newRotationRad, tol) {\n    var snapped = newRotationRad;\n    for (var i = 0; i < snaps.length; i++) {\n        var angle = Global_1.Konva.getAngle(snaps[i]);\n        var absDiff = Math.abs(angle - newRotationRad) % (Math.PI * 2);\n        var dif = Math.min(absDiff, Math.PI * 2 - absDiff);\n        if (dif < tol) {\n            snapped = angle;\n        }\n    }\n    return snapped;\n}\nvar Transformer = (function (_super) {\n    __extends(Transformer, _super);\n    function Transformer(config) {\n        var _this = _super.call(this, config) || this;\n        _this._transforming = false;\n        _this._createElements();\n        _this._handleMouseMove = _this._handleMouseMove.bind(_this);\n        _this._handleMouseUp = _this._handleMouseUp.bind(_this);\n        _this.update = _this.update.bind(_this);\n        _this.on(ATTR_CHANGE_LIST, _this.update);\n        if (_this.getNode()) {\n            _this.update();\n        }\n        return _this;\n    }\n    Transformer.prototype.attachTo = function (node) {\n        this.setNode(node);\n        return this;\n    };\n    Transformer.prototype.setNode = function (node) {\n        Util_1.Util.warn('tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.');\n        return this.setNodes([node]);\n    };\n    Transformer.prototype.getNode = function () {\n        return this._nodes && this._nodes[0];\n    };\n    Transformer.prototype.setNodes = function (nodes) {\n        var _this = this;\n        if (nodes === void 0) { nodes = []; }\n        if (this._nodes && this._nodes.length) {\n            this.detach();\n        }\n        this._nodes = nodes;\n        if (nodes.length === 1) {\n            this.rotation(nodes[0].rotation());\n        }\n        else {\n            this.rotation(0);\n        }\n        this._nodes.forEach(function (node) {\n            var additionalEvents = node._attrsAffectingSize\n                .map(function (prop) { return prop + 'Change.' + EVENTS_NAME; })\n                .join(' ');\n            var onChange = function () {\n                _this._resetTransformCache();\n                if (!_this._transforming) {\n                    _this.update();\n                }\n            };\n            node.on(additionalEvents, onChange);\n            node.on(TRANSFORM_CHANGE_STR, onChange);\n            node.on(\"_clearTransformCache.\" + EVENTS_NAME, onChange);\n            node.on(\"xChange.\" + EVENTS_NAME + \" yChange.\" + EVENTS_NAME, onChange);\n            _this._proxyDrag(node);\n        });\n        this._resetTransformCache();\n        var elementsCreated = !!this.findOne('.top-left');\n        if (elementsCreated) {\n            this.update();\n        }\n        return this;\n    };\n    Transformer.prototype._proxyDrag = function (node) {\n        var _this = this;\n        var lastPos;\n        node.on(\"dragstart.\" + EVENTS_NAME, function () {\n            lastPos = node.getAbsolutePosition();\n        });\n        node.on(\"dragmove.\" + EVENTS_NAME, function () {\n            if (!lastPos) {\n                return;\n            }\n            var abs = node.getAbsolutePosition();\n            var dx = abs.x - lastPos.x;\n            var dy = abs.y - lastPos.y;\n            _this.nodes().forEach(function (otherNode) {\n                if (otherNode === node) {\n                    return;\n                }\n                if (otherNode.isDragging()) {\n                    return;\n                }\n                var otherAbs = otherNode.getAbsolutePosition();\n                otherNode.setAbsolutePosition({\n                    x: otherAbs.x + dx,\n                    y: otherAbs.y + dy,\n                });\n                otherNode.startDrag();\n            });\n            lastPos = null;\n        });\n    };\n    Transformer.prototype.getNodes = function () {\n        return this._nodes;\n    };\n    Transformer.prototype.getActiveAnchor = function () {\n        return this._movingAnchorName;\n    };\n    Transformer.prototype.detach = function () {\n        if (this._nodes) {\n            this._nodes.forEach(function (node) {\n                node.off('.' + EVENTS_NAME);\n            });\n        }\n        this._nodes = [];\n        this._resetTransformCache();\n    };\n    Transformer.prototype._resetTransformCache = function () {\n        this._clearCache(NODES_RECT);\n        this._clearCache('transform');\n        this._clearSelfAndDescendantCache('absoluteTransform');\n    };\n    Transformer.prototype._getNodeRect = function () {\n        return this._getCache(NODES_RECT, this.__getNodeRect);\n    };\n    Transformer.prototype.__getNodeShape = function (node, rot, relative) {\n        if (rot === void 0) { rot = this.rotation(); }\n        var rect = node.getClientRect({\n            skipTransform: true,\n            skipShadow: true,\n            skipStroke: this.ignoreStroke(),\n        });\n        var absScale = node.getAbsoluteScale(relative);\n        var absPos = node.getAbsolutePosition(relative);\n        var dx = rect.x * absScale.x - node.offsetX() * absScale.x;\n        var dy = rect.y * absScale.y - node.offsetY() * absScale.y;\n        var rotation = (Global_1.Konva.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %\n            (Math.PI * 2);\n        var box = {\n            x: absPos.x + dx * Math.cos(rotation) + dy * Math.sin(-rotation),\n            y: absPos.y + dy * Math.cos(rotation) + dx * Math.sin(rotation),\n            width: rect.width * absScale.x,\n            height: rect.height * absScale.y,\n            rotation: rotation,\n        };\n        return rotateAroundPoint(box, -Global_1.Konva.getAngle(rot), {\n            x: 0,\n            y: 0,\n        });\n    };\n    Transformer.prototype.__getNodeRect = function () {\n        var _this = this;\n        var node = this.getNode();\n        if (!node) {\n            return {\n                x: -MAX_SAFE_INTEGER,\n                y: -MAX_SAFE_INTEGER,\n                width: 0,\n                height: 0,\n                rotation: 0,\n            };\n        }\n        var totalPoints = [];\n        this.nodes().map(function (node) {\n            var box = node.getClientRect({\n                skipTransform: true,\n                skipShadow: true,\n                skipStroke: _this.ignoreStroke(),\n            });\n            var points = [\n                { x: box.x, y: box.y },\n                { x: box.x + box.width, y: box.y },\n                { x: box.x + box.width, y: box.y + box.height },\n                { x: box.x, y: box.y + box.height },\n            ];\n            var trans = node.getAbsoluteTransform();\n            points.forEach(function (point) {\n                var transformed = trans.point(point);\n                totalPoints.push(transformed);\n            });\n        });\n        var tr = new Util_1.Transform();\n        tr.rotate(-Global_1.Konva.getAngle(this.rotation()));\n        var minX, minY, maxX, maxY;\n        totalPoints.forEach(function (point) {\n            var transformed = tr.point(point);\n            if (minX === undefined) {\n                minX = maxX = transformed.x;\n                minY = maxY = transformed.y;\n            }\n            minX = Math.min(minX, transformed.x);\n            minY = Math.min(minY, transformed.y);\n            maxX = Math.max(maxX, transformed.x);\n            maxY = Math.max(maxY, transformed.y);\n        });\n        tr.invert();\n        var p = tr.point({ x: minX, y: minY });\n        return {\n            x: p.x,\n            y: p.y,\n            width: maxX - minX,\n            height: maxY - minY,\n            rotation: Global_1.Konva.getAngle(this.rotation()),\n        };\n    };\n    Transformer.prototype.getX = function () {\n        return this._getNodeRect().x;\n    };\n    Transformer.prototype.getY = function () {\n        return this._getNodeRect().y;\n    };\n    Transformer.prototype.getWidth = function () {\n        return this._getNodeRect().width;\n    };\n    Transformer.prototype.getHeight = function () {\n        return this._getNodeRect().height;\n    };\n    Transformer.prototype._createElements = function () {\n        this._createBack();\n        ANCHORS_NAMES.forEach(function (name) {\n            this._createAnchor(name);\n        }.bind(this));\n        this._createAnchor('rotater');\n    };\n    Transformer.prototype._createAnchor = function (name) {\n        var _this = this;\n        var anchor = new Rect_1.Rect({\n            stroke: 'rgb(0, 161, 255)',\n            fill: 'white',\n            strokeWidth: 1,\n            name: name + ' _anchor',\n            dragDistance: 0,\n            draggable: true,\n            hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto',\n        });\n        var self = this;\n        anchor.on('mousedown touchstart', function (e) {\n            self._handleMouseDown(e);\n        });\n        anchor.on('dragstart', function (e) {\n            anchor.stopDrag();\n            e.cancelBubble = true;\n        });\n        anchor.on('dragend', function (e) {\n            e.cancelBubble = true;\n        });\n        anchor.on('mouseenter', function () {\n            var rad = Global_1.Konva.getAngle(_this.rotation());\n            var cursor = getCursor(name, rad);\n            anchor.getStage().content.style.cursor = cursor;\n            _this._cursorChange = true;\n        });\n        anchor.on('mouseout', function () {\n            anchor.getStage().content.style.cursor = '';\n            _this._cursorChange = false;\n        });\n        this.add(anchor);\n    };\n    Transformer.prototype._createBack = function () {\n        var _this = this;\n        var back = new Shape_1.Shape({\n            name: 'back',\n            width: 0,\n            height: 0,\n            draggable: true,\n            sceneFunc: function (ctx) {\n                var tr = this.getParent();\n                var padding = tr.padding();\n                ctx.beginPath();\n                ctx.rect(-padding, -padding, this.width() + padding * 2, this.height() + padding * 2);\n                ctx.moveTo(this.width() / 2, -padding);\n                if (tr.rotateEnabled()) {\n                    ctx.lineTo(this.width() / 2, -tr.rotateAnchorOffset() * Util_1.Util._sign(this.height()) - padding);\n                }\n                ctx.fillStrokeShape(this);\n            },\n            hitFunc: function (ctx, shape) {\n                if (!_this.shouldOverdrawWholeArea()) {\n                    return;\n                }\n                var padding = _this.padding();\n                ctx.beginPath();\n                ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);\n                ctx.fillStrokeShape(shape);\n            },\n        });\n        this.add(back);\n        this._proxyDrag(back);\n    };\n    Transformer.prototype._handleMouseDown = function (e) {\n        this._movingAnchorName = e.target.name().split(' ')[0];\n        var attrs = this._getNodeRect();\n        var width = attrs.width;\n        var height = attrs.height;\n        var hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));\n        this.sin = Math.abs(height / hypotenuse);\n        this.cos = Math.abs(width / hypotenuse);\n        window.addEventListener('mousemove', this._handleMouseMove);\n        window.addEventListener('touchmove', this._handleMouseMove);\n        window.addEventListener('mouseup', this._handleMouseUp, true);\n        window.addEventListener('touchend', this._handleMouseUp, true);\n        this._transforming = true;\n        var ap = e.target.getAbsolutePosition();\n        var pos = e.target.getStage().getPointerPosition();\n        this._anchorDragOffset = {\n            x: pos.x - ap.x,\n            y: pos.y - ap.y,\n        };\n        this._fire('transformstart', { evt: e, target: this.getNode() });\n        this.getNode()._fire('transformstart', { evt: e, target: this.getNode() });\n    };\n    Transformer.prototype._handleMouseMove = function (e) {\n        var x, y, newHypotenuse;\n        var anchorNode = this.findOne('.' + this._movingAnchorName);\n        var stage = anchorNode.getStage();\n        stage.setPointersPositions(e);\n        var pp = stage.getPointerPosition();\n        var newNodePos = {\n            x: pp.x - this._anchorDragOffset.x,\n            y: pp.y - this._anchorDragOffset.y,\n        };\n        var oldAbs = anchorNode.getAbsolutePosition();\n        anchorNode.setAbsolutePosition(newNodePos);\n        var newAbs = anchorNode.getAbsolutePosition();\n        if (oldAbs.x === newAbs.x && oldAbs.y === newAbs.y) {\n            return;\n        }\n        if (this._movingAnchorName === 'rotater') {\n            var attrs = this._getNodeRect();\n            x = anchorNode.x() - attrs.width / 2;\n            y = -anchorNode.y() + attrs.height / 2;\n            var delta = Math.atan2(-y, x) + Math.PI / 2;\n            if (attrs.height < 0) {\n                delta -= Math.PI;\n            }\n            var oldRotation = Global_1.Konva.getAngle(this.rotation());\n            var newRotation = oldRotation + delta;\n            var tol = Global_1.Konva.getAngle(this.rotationSnapTolerance());\n            var snappedRot = getSnap(this.rotationSnaps(), newRotation, tol);\n            var diff = snappedRot - attrs.rotation;\n            var shape = rotateAroundCenter(attrs, diff);\n            this._fitNodesInto(shape, e);\n            return;\n        }\n        var keepProportion = this.keepRatio() || e.shiftKey;\n        var centeredScaling = this.centeredScaling() || e.altKey;\n        if (this._movingAnchorName === 'top-left') {\n            if (keepProportion) {\n                var comparePoint = centeredScaling\n                    ? {\n                        x: this.width() / 2,\n                        y: this.height() / 2,\n                    }\n                    : {\n                        x: this.findOne('.bottom-right').x(),\n                        y: this.findOne('.bottom-right').y(),\n                    };\n                newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n                    Math.pow(comparePoint.y - anchorNode.y(), 2));\n                var reverseX = this.findOne('.top-left').x() > comparePoint.x ? -1 : 1;\n                var reverseY = this.findOne('.top-left').y() > comparePoint.y ? -1 : 1;\n                x = newHypotenuse * this.cos * reverseX;\n                y = newHypotenuse * this.sin * reverseY;\n                this.findOne('.top-left').x(comparePoint.x - x);\n                this.findOne('.top-left').y(comparePoint.y - y);\n            }\n        }\n        else if (this._movingAnchorName === 'top-center') {\n            this.findOne('.top-left').y(anchorNode.y());\n        }\n        else if (this._movingAnchorName === 'top-right') {\n            if (keepProportion) {\n                var comparePoint = centeredScaling\n                    ? {\n                        x: this.width() / 2,\n                        y: this.height() / 2,\n                    }\n                    : {\n                        x: this.findOne('.bottom-left').x(),\n                        y: this.findOne('.bottom-left').y(),\n                    };\n                newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n                    Math.pow(comparePoint.y - anchorNode.y(), 2));\n                var reverseX = this.findOne('.top-right').x() < comparePoint.x ? -1 : 1;\n                var reverseY = this.findOne('.top-right').y() > comparePoint.y ? -1 : 1;\n                x = newHypotenuse * this.cos * reverseX;\n                y = newHypotenuse * this.sin * reverseY;\n                this.findOne('.top-right').x(comparePoint.x + x);\n                this.findOne('.top-right').y(comparePoint.y - y);\n            }\n            var pos = anchorNode.position();\n            this.findOne('.top-left').y(pos.y);\n            this.findOne('.bottom-right').x(pos.x);\n        }\n        else if (this._movingAnchorName === 'middle-left') {\n            this.findOne('.top-left').x(anchorNode.x());\n        }\n        else if (this._movingAnchorName === 'middle-right') {\n            this.findOne('.bottom-right').x(anchorNode.x());\n        }\n        else if (this._movingAnchorName === 'bottom-left') {\n            if (keepProportion) {\n                var comparePoint = centeredScaling\n                    ? {\n                        x: this.width() / 2,\n                        y: this.height() / 2,\n                    }\n                    : {\n                        x: this.findOne('.top-right').x(),\n                        y: this.findOne('.top-right').y(),\n                    };\n                newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n                    Math.pow(anchorNode.y() - comparePoint.y, 2));\n                var reverseX = comparePoint.x < anchorNode.x() ? -1 : 1;\n                var reverseY = anchorNode.y() < comparePoint.y ? -1 : 1;\n                x = newHypotenuse * this.cos * reverseX;\n                y = newHypotenuse * this.sin * reverseY;\n                anchorNode.x(comparePoint.x - x);\n                anchorNode.y(comparePoint.y + y);\n            }\n            pos = anchorNode.position();\n            this.findOne('.top-left').x(pos.x);\n            this.findOne('.bottom-right').y(pos.y);\n        }\n        else if (this._movingAnchorName === 'bottom-center') {\n            this.findOne('.bottom-right').y(anchorNode.y());\n        }\n        else if (this._movingAnchorName === 'bottom-right') {\n            if (keepProportion) {\n                var comparePoint = centeredScaling\n                    ? {\n                        x: this.width() / 2,\n                        y: this.height() / 2,\n                    }\n                    : {\n                        x: this.findOne('.top-left').x(),\n                        y: this.findOne('.top-left').y(),\n                    };\n                newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n                    Math.pow(anchorNode.y() - comparePoint.y, 2));\n                var reverseX = this.findOne('.bottom-right').x() < comparePoint.x ? -1 : 1;\n                var reverseY = this.findOne('.bottom-right').y() < comparePoint.y ? -1 : 1;\n                x = newHypotenuse * this.cos * reverseX;\n                y = newHypotenuse * this.sin * reverseY;\n                this.findOne('.bottom-right').x(comparePoint.x + x);\n                this.findOne('.bottom-right').y(comparePoint.y + y);\n            }\n        }\n        else {\n            console.error(new Error('Wrong position argument of selection resizer: ' +\n                this._movingAnchorName));\n        }\n        var centeredScaling = this.centeredScaling() || e.altKey;\n        if (centeredScaling) {\n            var topLeft = this.findOne('.top-left');\n            var bottomRight = this.findOne('.bottom-right');\n            var topOffsetX = topLeft.x();\n            var topOffsetY = topLeft.y();\n            var bottomOffsetX = this.getWidth() - bottomRight.x();\n            var bottomOffsetY = this.getHeight() - bottomRight.y();\n            bottomRight.move({\n                x: -topOffsetX,\n                y: -topOffsetY,\n            });\n            topLeft.move({\n                x: bottomOffsetX,\n                y: bottomOffsetY,\n            });\n        }\n        var absPos = this.findOne('.top-left').getAbsolutePosition();\n        x = absPos.x;\n        y = absPos.y;\n        var width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();\n        var height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();\n        this._fitNodesInto({\n            x: x,\n            y: y,\n            width: width,\n            height: height,\n            rotation: Global_1.Konva.getAngle(this.rotation()),\n        }, e);\n    };\n    Transformer.prototype._handleMouseUp = function (e) {\n        this._removeEvents(e);\n    };\n    Transformer.prototype.getAbsoluteTransform = function () {\n        return this.getTransform();\n    };\n    Transformer.prototype._removeEvents = function (e) {\n        if (this._transforming) {\n            this._transforming = false;\n            window.removeEventListener('mousemove', this._handleMouseMove);\n            window.removeEventListener('touchmove', this._handleMouseMove);\n            window.removeEventListener('mouseup', this._handleMouseUp, true);\n            window.removeEventListener('touchend', this._handleMouseUp, true);\n            var node = this.getNode();\n            this._fire('transformend', { evt: e, target: node });\n            if (node) {\n                node.fire('transformend', { evt: e, target: node });\n            }\n            this._movingAnchorName = null;\n        }\n    };\n    Transformer.prototype._fitNodesInto = function (newAttrs, evt) {\n        var _this = this;\n        var oldAttrs = this._getNodeRect();\n        var minSize = 1;\n        if (Util_1.Util._inRange(newAttrs.width, -this.padding() * 2 - minSize, minSize)) {\n            this.update();\n            return;\n        }\n        if (Util_1.Util._inRange(newAttrs.height, -this.padding() * 2 - minSize, minSize)) {\n            this.update();\n            return;\n        }\n        var allowNegativeScale = true;\n        var t = new Util_1.Transform();\n        t.rotate(Global_1.Konva.getAngle(this.rotation()));\n        if (this._movingAnchorName &&\n            newAttrs.width < 0 &&\n            this._movingAnchorName.indexOf('left') >= 0) {\n            var offset = t.point({\n                x: -this.padding() * 2,\n                y: 0,\n            });\n            newAttrs.x += offset.x;\n            newAttrs.y += offset.y;\n            newAttrs.width += this.padding() * 2;\n            this._movingAnchorName = this._movingAnchorName.replace('left', 'right');\n            this._anchorDragOffset.x -= offset.x;\n            this._anchorDragOffset.y -= offset.y;\n            if (!allowNegativeScale) {\n                this.update();\n                return;\n            }\n        }\n        else if (this._movingAnchorName &&\n            newAttrs.width < 0 &&\n            this._movingAnchorName.indexOf('right') >= 0) {\n            var offset = t.point({\n                x: this.padding() * 2,\n                y: 0,\n            });\n            this._movingAnchorName = this._movingAnchorName.replace('right', 'left');\n            this._anchorDragOffset.x -= offset.x;\n            this._anchorDragOffset.y -= offset.y;\n            newAttrs.width += this.padding() * 2;\n            if (!allowNegativeScale) {\n                this.update();\n                return;\n            }\n        }\n        if (this._movingAnchorName &&\n            newAttrs.height < 0 &&\n            this._movingAnchorName.indexOf('top') >= 0) {\n            var offset = t.point({\n                x: 0,\n                y: -this.padding() * 2,\n            });\n            newAttrs.x += offset.x;\n            newAttrs.y += offset.y;\n            this._movingAnchorName = this._movingAnchorName.replace('top', 'bottom');\n            this._anchorDragOffset.x -= offset.x;\n            this._anchorDragOffset.y -= offset.y;\n            newAttrs.height += this.padding() * 2;\n            if (!allowNegativeScale) {\n                this.update();\n                return;\n            }\n        }\n        else if (this._movingAnchorName &&\n            newAttrs.height < 0 &&\n            this._movingAnchorName.indexOf('bottom') >= 0) {\n            var offset = t.point({\n                x: 0,\n                y: this.padding() * 2,\n            });\n            this._movingAnchorName = this._movingAnchorName.replace('bottom', 'top');\n            this._anchorDragOffset.x -= offset.x;\n            this._anchorDragOffset.y -= offset.y;\n            newAttrs.height += this.padding() * 2;\n            if (!allowNegativeScale) {\n                this.update();\n                return;\n            }\n        }\n        if (this.boundBoxFunc()) {\n            var bounded = this.boundBoxFunc()(oldAttrs, newAttrs);\n            if (bounded) {\n                newAttrs = bounded;\n            }\n            else {\n                Util_1.Util.warn('boundBoxFunc returned falsy. You should return new bound rect from it!');\n            }\n        }\n        var baseSize = 10000000;\n        var oldTr = new Util_1.Transform();\n        oldTr.translate(oldAttrs.x, oldAttrs.y);\n        oldTr.rotate(oldAttrs.rotation);\n        oldTr.scale(oldAttrs.width / baseSize, oldAttrs.height / baseSize);\n        var newTr = new Util_1.Transform();\n        newTr.translate(newAttrs.x, newAttrs.y);\n        newTr.rotate(newAttrs.rotation);\n        newTr.scale(newAttrs.width / baseSize, newAttrs.height / baseSize);\n        var delta = newTr.multiply(oldTr.invert());\n        this._nodes.forEach(function (node) {\n            var parentTransform = node.getParent().getAbsoluteTransform();\n            var localTransform = node.getTransform().copy();\n            localTransform.translate(node.offsetX(), node.offsetY());\n            var newLocalTransform = new Util_1.Transform();\n            newLocalTransform\n                .multiply(parentTransform.copy().invert())\n                .multiply(delta)\n                .multiply(parentTransform)\n                .multiply(localTransform);\n            var attrs = newLocalTransform.decompose();\n            node._batchTransformChanges(function () {\n                node.setAttrs(attrs);\n            });\n            _this._fire('transform', { evt: evt, target: node });\n            node._fire('transform', { evt: evt, target: node });\n        });\n        this.rotation(Util_1.Util._getRotation(newAttrs.rotation));\n        this._resetTransformCache();\n        this.update();\n        this.getLayer().batchDraw();\n    };\n    Transformer.prototype.forceUpdate = function () {\n        this._resetTransformCache();\n        this.update();\n    };\n    Transformer.prototype._batchChangeChild = function (selector, attrs) {\n        var anchor = this.findOne(selector);\n        anchor._batchTransformChanges(function () {\n            anchor.setAttrs(attrs);\n        });\n    };\n    Transformer.prototype.update = function () {\n        var _this = this;\n        var attrs = this._getNodeRect();\n        this.rotation(Util_1.Util._getRotation(attrs.rotation));\n        var width = attrs.width;\n        var height = attrs.height;\n        var enabledAnchors = this.enabledAnchors();\n        var resizeEnabled = this.resizeEnabled();\n        var padding = this.padding();\n        var anchorSize = this.anchorSize();\n        this.find('._anchor').each(function (node) {\n            node._batchTransformChanges(function () {\n                node.setAttrs({\n                    width: anchorSize,\n                    height: anchorSize,\n                    offsetX: anchorSize / 2,\n                    offsetY: anchorSize / 2,\n                    stroke: _this.anchorStroke(),\n                    strokeWidth: _this.anchorStrokeWidth(),\n                    fill: _this.anchorFill(),\n                    cornerRadius: _this.anchorCornerRadius(),\n                });\n            });\n        });\n        this._batchChangeChild('.top-left', {\n            x: 0,\n            y: 0,\n            offsetX: anchorSize / 2 + padding,\n            offsetY: anchorSize / 2 + padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('top-left') >= 0,\n        });\n        this._batchChangeChild('.top-center', {\n            x: width / 2,\n            y: 0,\n            offsetY: anchorSize / 2 + padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('top-center') >= 0,\n        });\n        this._batchChangeChild('.top-right', {\n            x: width,\n            y: 0,\n            offsetX: anchorSize / 2 - padding,\n            offsetY: anchorSize / 2 + padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('top-right') >= 0,\n        });\n        this._batchChangeChild('.middle-left', {\n            x: 0,\n            y: height / 2,\n            offsetX: anchorSize / 2 + padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('middle-left') >= 0,\n        });\n        this._batchChangeChild('.middle-right', {\n            x: width,\n            y: height / 2,\n            offsetX: anchorSize / 2 - padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('middle-right') >= 0,\n        });\n        this._batchChangeChild('.bottom-left', {\n            x: 0,\n            y: height,\n            offsetX: anchorSize / 2 + padding,\n            offsetY: anchorSize / 2 - padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('bottom-left') >= 0,\n        });\n        this._batchChangeChild('.bottom-center', {\n            x: width / 2,\n            y: height,\n            offsetY: anchorSize / 2 - padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('bottom-center') >= 0,\n        });\n        this._batchChangeChild('.bottom-right', {\n            x: width,\n            y: height,\n            offsetX: anchorSize / 2 - padding,\n            offsetY: anchorSize / 2 - padding,\n            visible: resizeEnabled && enabledAnchors.indexOf('bottom-right') >= 0,\n        });\n        this._batchChangeChild('.rotater', {\n            x: width / 2,\n            y: -this.rotateAnchorOffset() * Util_1.Util._sign(height) - padding,\n            visible: this.rotateEnabled(),\n        });\n        this._batchChangeChild('.back', {\n            width: width,\n            height: height,\n            visible: this.borderEnabled(),\n            stroke: this.borderStroke(),\n            strokeWidth: this.borderStrokeWidth(),\n            dash: this.borderDash(),\n            x: 0,\n            y: 0,\n        });\n    };\n    Transformer.prototype.isTransforming = function () {\n        return this._transforming;\n    };\n    Transformer.prototype.stopTransform = function () {\n        if (this._transforming) {\n            this._removeEvents();\n            var anchorNode = this.findOne('.' + this._movingAnchorName);\n            if (anchorNode) {\n                anchorNode.stopDrag();\n            }\n        }\n    };\n    Transformer.prototype.destroy = function () {\n        if (this.getStage() && this._cursorChange) {\n            this.getStage().content.style.cursor = '';\n        }\n        Group_1.Group.prototype.destroy.call(this);\n        this.detach();\n        this._removeEvents();\n        return this;\n    };\n    Transformer.prototype.toObject = function () {\n        return Node_1.Node.prototype.toObject.call(this);\n    };\n    return Transformer;\n}(Group_1.Group));\nexports.Transformer = Transformer;\nfunction validateAnchors(val) {\n    if (!(val instanceof Array)) {\n        Util_1.Util.warn('enabledAnchors value should be an array');\n    }\n    if (val instanceof Array) {\n        val.forEach(function (name) {\n            if (ANCHORS_NAMES.indexOf(name) === -1) {\n                Util_1.Util.warn('Unknown anchor name: ' +\n                    name +\n                    '. Available names are: ' +\n                    ANCHORS_NAMES.join(', '));\n            }\n        });\n    }\n    return val || [];\n}\nTransformer.prototype.className = 'Transformer';\nGlobal_2._registerNode(Transformer);\nFactory_1.Factory.addGetterSetter(Transformer, 'enabledAnchors', ANCHORS_NAMES, validateAnchors);\nFactory_1.Factory.addGetterSetter(Transformer, 'resizeEnabled', true);\nFactory_1.Factory.addGetterSetter(Transformer, 'anchorSize', 10, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'rotateEnabled', true);\nFactory_1.Factory.addGetterSetter(Transformer, 'rotationSnaps', []);\nFactory_1.Factory.addGetterSetter(Transformer, 'rotateAnchorOffset', 50, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'rotationSnapTolerance', 5, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'borderEnabled', true);\nFactory_1.Factory.addGetterSetter(Transformer, 'anchorStroke', 'rgb(0, 161, 255)');\nFactory_1.Factory.addGetterSetter(Transformer, 'anchorStrokeWidth', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'anchorFill', 'white');\nFactory_1.Factory.addGetterSetter(Transformer, 'anchorCornerRadius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'borderStroke', 'rgb(0, 161, 255)');\nFactory_1.Factory.addGetterSetter(Transformer, 'borderStrokeWidth', 1, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'borderDash');\nFactory_1.Factory.addGetterSetter(Transformer, 'keepRatio', true);\nFactory_1.Factory.addGetterSetter(Transformer, 'centeredScaling', false);\nFactory_1.Factory.addGetterSetter(Transformer, 'ignoreStroke', false);\nFactory_1.Factory.addGetterSetter(Transformer, 'padding', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Transformer, 'node');\nFactory_1.Factory.addGetterSetter(Transformer, 'nodes');\nFactory_1.Factory.addGetterSetter(Transformer, 'boundBoxFunc');\nFactory_1.Factory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);\nFactory_1.Factory.backCompat(Transformer, {\n    lineEnabled: 'borderEnabled',\n    rotateHandlerOffset: 'rotateAnchorOffset',\n    enabledHandlers: 'enabledAnchors',\n});\nUtil_1.Collection.mapMethods(Transformer);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Transformer.js?");

/***/ }),

/***/ "./node_modules/konva/lib/shapes/Wedge.js":
/*!************************************************!*\
  !*** ./node_modules/konva/lib/shapes/Wedge.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Util_1 = __webpack_require__(/*! ../Util */ \"./node_modules/konva/lib/Util.js\");\nvar Factory_1 = __webpack_require__(/*! ../Factory */ \"./node_modules/konva/lib/Factory.js\");\nvar Shape_1 = __webpack_require__(/*! ../Shape */ \"./node_modules/konva/lib/Shape.js\");\nvar Global_1 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Validators_1 = __webpack_require__(/*! ../Validators */ \"./node_modules/konva/lib/Validators.js\");\nvar Global_2 = __webpack_require__(/*! ../Global */ \"./node_modules/konva/lib/Global.js\");\nvar Wedge = (function (_super) {\n    __extends(Wedge, _super);\n    function Wedge() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    Wedge.prototype._sceneFunc = function (context) {\n        context.beginPath();\n        context.arc(0, 0, this.radius(), 0, Global_1.Konva.getAngle(this.angle()), this.clockwise());\n        context.lineTo(0, 0);\n        context.closePath();\n        context.fillStrokeShape(this);\n    };\n    Wedge.prototype.getWidth = function () {\n        return this.radius() * 2;\n    };\n    Wedge.prototype.getHeight = function () {\n        return this.radius() * 2;\n    };\n    Wedge.prototype.setWidth = function (width) {\n        this.radius(width / 2);\n    };\n    Wedge.prototype.setHeight = function (height) {\n        this.radius(height / 2);\n    };\n    return Wedge;\n}(Shape_1.Shape));\nexports.Wedge = Wedge;\nWedge.prototype.className = 'Wedge';\nWedge.prototype._centroid = true;\nWedge.prototype._attrsAffectingSize = ['radius'];\nGlobal_2._registerNode(Wedge);\nFactory_1.Factory.addGetterSetter(Wedge, 'radius', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Wedge, 'angle', 0, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Wedge, 'clockwise', false);\nFactory_1.Factory.backCompat(Wedge, {\n    angleDeg: 'angle',\n    getAngleDeg: 'getAngle',\n    setAngleDeg: 'setAngle'\n});\nUtil_1.Collection.mapMethods(Wedge);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/konva/lib/shapes/Wedge.js?");

/***/ }),

/***/ "./node_modules/laravel-echo/dist/echo.js":
/*!************************************************!*\
  !*** ./node_modules/laravel-echo/dist/echo.js ***!
  \************************************************/
/*! exports provided: Channel, default */
/*! ModuleConcatenation bailout: Module uses injected variables (jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Channel\", function() { return Channel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Echo; });\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n  var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n  return function _createSuperInternal() {\n    var Super = _getPrototypeOf(Derived),\n        result;\n\n    if (hasNativeReflectConstruct) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n\n    return _possibleConstructorReturn(this, result);\n  };\n}\n\n/**\r\n * This class represents a basic channel.\r\n */\nvar Channel = /*#__PURE__*/function () {\n  function Channel() {\n    _classCallCheck(this, Channel);\n  }\n\n  _createClass(Channel, [{\n    key: \"listenForWhisper\",\n    value:\n    /**\r\n     * Listen for a whisper event on the channel instance.\r\n     */\n    function listenForWhisper(event, callback) {\n      return this.listen('.client-' + event, callback);\n    }\n    /**\r\n     * Listen for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"notification\",\n    value: function notification(callback) {\n      return this.listen('.Illuminate\\\\Notifications\\\\Events\\\\BroadcastNotificationCreated', callback);\n    }\n    /**\r\n     * Stop listening for a whisper event on the channel instance.\r\n     */\n\n  }, {\n    key: \"stopListeningForWhisper\",\n    value: function stopListeningForWhisper(event, callback) {\n      return this.stopListening('.client-' + event, callback);\n    }\n  }]);\n\n  return Channel;\n}();\n\n/**\r\n * Event name formatter\r\n */\nvar EventFormatter = /*#__PURE__*/function () {\n  /**\r\n   * Create a new class instance.\r\n   */\n  function EventFormatter(namespace) {\n    _classCallCheck(this, EventFormatter);\n\n    this.setNamespace(namespace);\n  }\n  /**\r\n   * Format the given event name.\r\n   */\n\n\n  _createClass(EventFormatter, [{\n    key: \"format\",\n    value: function format(event) {\n      if (event.charAt(0) === '.' || event.charAt(0) === '\\\\') {\n        return event.substr(1);\n      } else if (this.namespace) {\n        event = this.namespace + '.' + event;\n      }\n\n      return event.replace(/\\./g, '\\\\');\n    }\n    /**\r\n     * Set the event namespace.\r\n     */\n\n  }, {\n    key: \"setNamespace\",\n    value: function setNamespace(value) {\n      this.namespace = value;\n    }\n  }]);\n\n  return EventFormatter;\n}();\n\n/**\r\n * This class represents a Pusher channel.\r\n */\n\nvar PusherChannel = /*#__PURE__*/function (_Channel) {\n  _inherits(PusherChannel, _Channel);\n\n  var _super = _createSuper(PusherChannel);\n\n  /**\r\n   * Create a new class instance.\r\n   */\n  function PusherChannel(pusher, name, options) {\n    var _this;\n\n    _classCallCheck(this, PusherChannel);\n\n    _this = _super.call(this);\n    _this.name = name;\n    _this.pusher = pusher;\n    _this.options = options;\n    _this.eventFormatter = new EventFormatter(_this.options.namespace);\n\n    _this.subscribe();\n\n    return _this;\n  }\n  /**\r\n   * Subscribe to a Pusher channel.\r\n   */\n\n\n  _createClass(PusherChannel, [{\n    key: \"subscribe\",\n    value: function subscribe() {\n      this.subscription = this.pusher.subscribe(this.name);\n    }\n    /**\r\n     * Unsubscribe from a Pusher channel.\r\n     */\n\n  }, {\n    key: \"unsubscribe\",\n    value: function unsubscribe() {\n      this.pusher.unsubscribe(this.name);\n    }\n    /**\r\n     * Listen for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(event, callback) {\n      this.on(this.eventFormatter.format(event), callback);\n      return this;\n    }\n    /**\r\n     * Listen for all events on the channel instance.\r\n     */\n\n  }, {\n    key: \"listenToAll\",\n    value: function listenToAll(callback) {\n      var _this2 = this;\n\n      this.subscription.bind_global(function (event, data) {\n        if (event.startsWith('pusher:')) {\n          return;\n        }\n\n        var namespace = _this2.options.namespace.replace(/\\./g, '\\\\');\n\n        var formattedEvent = event.startsWith(namespace) ? event.substring(namespace.length + 1) : '.' + event;\n        callback(formattedEvent, data);\n      });\n      return this;\n    }\n    /**\r\n     * Stop listening for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"stopListening\",\n    value: function stopListening(event, callback) {\n      if (callback) {\n        this.subscription.unbind(this.eventFormatter.format(event), callback);\n      } else {\n        this.subscription.unbind(this.eventFormatter.format(event));\n      }\n\n      return this;\n    }\n    /**\r\n     * Stop listening for all events on the channel instance.\r\n     */\n\n  }, {\n    key: \"stopListeningToAll\",\n    value: function stopListeningToAll(callback) {\n      if (callback) {\n        this.subscription.unbind_global(callback);\n      } else {\n        this.subscription.unbind_global();\n      }\n\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime a subscription succeeds.\r\n     */\n\n  }, {\n    key: \"subscribed\",\n    value: function subscribed(callback) {\n      this.on('pusher:subscription_succeeded', function () {\n        callback();\n      });\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime a subscription error occurs.\r\n     */\n\n  }, {\n    key: \"error\",\n    value: function error(callback) {\n      this.on('pusher:subscription_error', function (status) {\n        callback(status);\n      });\n      return this;\n    }\n    /**\r\n     * Bind a channel to an event.\r\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(event, callback) {\n      this.subscription.bind(event, callback);\n      return this;\n    }\n  }]);\n\n  return PusherChannel;\n}(Channel);\n\n/**\r\n * This class represents a Pusher private channel.\r\n */\n\nvar PusherPrivateChannel = /*#__PURE__*/function (_PusherChannel) {\n  _inherits(PusherPrivateChannel, _PusherChannel);\n\n  var _super = _createSuper(PusherPrivateChannel);\n\n  function PusherPrivateChannel() {\n    _classCallCheck(this, PusherPrivateChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(PusherPrivateChannel, [{\n    key: \"whisper\",\n    value:\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n    function whisper(eventName, data) {\n      this.pusher.channels.channels[this.name].trigger(\"client-\".concat(eventName), data);\n      return this;\n    }\n  }]);\n\n  return PusherPrivateChannel;\n}(PusherChannel);\n\n/**\r\n * This class represents a Pusher private channel.\r\n */\n\nvar PusherEncryptedPrivateChannel = /*#__PURE__*/function (_PusherChannel) {\n  _inherits(PusherEncryptedPrivateChannel, _PusherChannel);\n\n  var _super = _createSuper(PusherEncryptedPrivateChannel);\n\n  function PusherEncryptedPrivateChannel() {\n    _classCallCheck(this, PusherEncryptedPrivateChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(PusherEncryptedPrivateChannel, [{\n    key: \"whisper\",\n    value:\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n    function whisper(eventName, data) {\n      this.pusher.channels.channels[this.name].trigger(\"client-\".concat(eventName), data);\n      return this;\n    }\n  }]);\n\n  return PusherEncryptedPrivateChannel;\n}(PusherChannel);\n\n/**\r\n * This class represents a Pusher presence channel.\r\n */\n\nvar PusherPresenceChannel = /*#__PURE__*/function (_PusherChannel) {\n  _inherits(PusherPresenceChannel, _PusherChannel);\n\n  var _super = _createSuper(PusherPresenceChannel);\n\n  function PusherPresenceChannel() {\n    _classCallCheck(this, PusherPresenceChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(PusherPresenceChannel, [{\n    key: \"here\",\n    value:\n    /**\r\n     * Register a callback to be called anytime the member list changes.\r\n     */\n    function here(callback) {\n      this.on('pusher:subscription_succeeded', function (data) {\n        callback(Object.keys(data.members).map(function (k) {\n          return data.members[k];\n        }));\n      });\n      return this;\n    }\n    /**\r\n     * Listen for someone joining the channel.\r\n     */\n\n  }, {\n    key: \"joining\",\n    value: function joining(callback) {\n      this.on('pusher:member_added', function (member) {\n        callback(member.info);\n      });\n      return this;\n    }\n    /**\r\n     * Listen for someone leaving the channel.\r\n     */\n\n  }, {\n    key: \"leaving\",\n    value: function leaving(callback) {\n      this.on('pusher:member_removed', function (member) {\n        callback(member.info);\n      });\n      return this;\n    }\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n\n  }, {\n    key: \"whisper\",\n    value: function whisper(eventName, data) {\n      this.pusher.channels.channels[this.name].trigger(\"client-\".concat(eventName), data);\n      return this;\n    }\n  }]);\n\n  return PusherPresenceChannel;\n}(PusherChannel);\n\n/**\r\n * This class represents a Socket.io channel.\r\n */\n\nvar SocketIoChannel = /*#__PURE__*/function (_Channel) {\n  _inherits(SocketIoChannel, _Channel);\n\n  var _super = _createSuper(SocketIoChannel);\n\n  /**\r\n   * Create a new class instance.\r\n   */\n  function SocketIoChannel(socket, name, options) {\n    var _this;\n\n    _classCallCheck(this, SocketIoChannel);\n\n    _this = _super.call(this);\n    /**\r\n     * The event callbacks applied to the socket.\r\n     */\n\n    _this.events = {};\n    /**\r\n     * User supplied callbacks for events on this channel.\r\n     */\n\n    _this.listeners = {};\n    _this.name = name;\n    _this.socket = socket;\n    _this.options = options;\n    _this.eventFormatter = new EventFormatter(_this.options.namespace);\n\n    _this.subscribe();\n\n    return _this;\n  }\n  /**\r\n   * Subscribe to a Socket.io channel.\r\n   */\n\n\n  _createClass(SocketIoChannel, [{\n    key: \"subscribe\",\n    value: function subscribe() {\n      this.socket.emit('subscribe', {\n        channel: this.name,\n        auth: this.options.auth || {}\n      });\n    }\n    /**\r\n     * Unsubscribe from channel and ubind event callbacks.\r\n     */\n\n  }, {\n    key: \"unsubscribe\",\n    value: function unsubscribe() {\n      this.unbind();\n      this.socket.emit('unsubscribe', {\n        channel: this.name,\n        auth: this.options.auth || {}\n      });\n    }\n    /**\r\n     * Listen for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(event, callback) {\n      this.on(this.eventFormatter.format(event), callback);\n      return this;\n    }\n    /**\r\n     * Stop listening for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"stopListening\",\n    value: function stopListening(event, callback) {\n      this.unbindEvent(this.eventFormatter.format(event), callback);\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime a subscription succeeds.\r\n     */\n\n  }, {\n    key: \"subscribed\",\n    value: function subscribed(callback) {\n      this.on('connect', function (socket) {\n        callback(socket);\n      });\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime an error occurs.\r\n     */\n\n  }, {\n    key: \"error\",\n    value: function error(callback) {\n      return this;\n    }\n    /**\r\n     * Bind the channel's socket to an event and store the callback.\r\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(event, callback) {\n      var _this2 = this;\n\n      this.listeners[event] = this.listeners[event] || [];\n\n      if (!this.events[event]) {\n        this.events[event] = function (channel, data) {\n          if (_this2.name === channel && _this2.listeners[event]) {\n            _this2.listeners[event].forEach(function (cb) {\n              return cb(data);\n            });\n          }\n        };\n\n        this.socket.on(event, this.events[event]);\n      }\n\n      this.listeners[event].push(callback);\n      return this;\n    }\n    /**\r\n     * Unbind the channel's socket from all stored event callbacks.\r\n     */\n\n  }, {\n    key: \"unbind\",\n    value: function unbind() {\n      var _this3 = this;\n\n      Object.keys(this.events).forEach(function (event) {\n        _this3.unbindEvent(event);\n      });\n    }\n    /**\r\n     * Unbind the listeners for the given event.\r\n     */\n\n  }, {\n    key: \"unbindEvent\",\n    value: function unbindEvent(event, callback) {\n      this.listeners[event] = this.listeners[event] || [];\n\n      if (callback) {\n        this.listeners[event] = this.listeners[event].filter(function (cb) {\n          return cb !== callback;\n        });\n      }\n\n      if (!callback || this.listeners[event].length === 0) {\n        if (this.events[event]) {\n          this.socket.removeListener(event, this.events[event]);\n          delete this.events[event];\n        }\n\n        delete this.listeners[event];\n      }\n    }\n  }]);\n\n  return SocketIoChannel;\n}(Channel);\n\n/**\r\n * This class represents a Socket.io private channel.\r\n */\n\nvar SocketIoPrivateChannel = /*#__PURE__*/function (_SocketIoChannel) {\n  _inherits(SocketIoPrivateChannel, _SocketIoChannel);\n\n  var _super = _createSuper(SocketIoPrivateChannel);\n\n  function SocketIoPrivateChannel() {\n    _classCallCheck(this, SocketIoPrivateChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(SocketIoPrivateChannel, [{\n    key: \"whisper\",\n    value:\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n    function whisper(eventName, data) {\n      this.socket.emit('client event', {\n        channel: this.name,\n        event: \"client-\".concat(eventName),\n        data: data\n      });\n      return this;\n    }\n  }]);\n\n  return SocketIoPrivateChannel;\n}(SocketIoChannel);\n\n/**\r\n * This class represents a Socket.io presence channel.\r\n */\n\nvar SocketIoPresenceChannel = /*#__PURE__*/function (_SocketIoPrivateChann) {\n  _inherits(SocketIoPresenceChannel, _SocketIoPrivateChann);\n\n  var _super = _createSuper(SocketIoPresenceChannel);\n\n  function SocketIoPresenceChannel() {\n    _classCallCheck(this, SocketIoPresenceChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(SocketIoPresenceChannel, [{\n    key: \"here\",\n    value:\n    /**\r\n     * Register a callback to be called anytime the member list changes.\r\n     */\n    function here(callback) {\n      this.on('presence:subscribed', function (members) {\n        callback(members.map(function (m) {\n          return m.user_info;\n        }));\n      });\n      return this;\n    }\n    /**\r\n     * Listen for someone joining the channel.\r\n     */\n\n  }, {\n    key: \"joining\",\n    value: function joining(callback) {\n      this.on('presence:joining', function (member) {\n        return callback(member.user_info);\n      });\n      return this;\n    }\n    /**\r\n     * Listen for someone leaving the channel.\r\n     */\n\n  }, {\n    key: \"leaving\",\n    value: function leaving(callback) {\n      this.on('presence:leaving', function (member) {\n        return callback(member.user_info);\n      });\n      return this;\n    }\n  }]);\n\n  return SocketIoPresenceChannel;\n}(SocketIoPrivateChannel);\n\n/**\r\n * This class represents a null channel.\r\n */\n\nvar NullChannel = /*#__PURE__*/function (_Channel) {\n  _inherits(NullChannel, _Channel);\n\n  var _super = _createSuper(NullChannel);\n\n  function NullChannel() {\n    _classCallCheck(this, NullChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(NullChannel, [{\n    key: \"subscribe\",\n    value:\n    /**\r\n     * Subscribe to a channel.\r\n     */\n    function subscribe() {//\n    }\n    /**\r\n     * Unsubscribe from a channel.\r\n     */\n\n  }, {\n    key: \"unsubscribe\",\n    value: function unsubscribe() {//\n    }\n    /**\r\n     * Listen for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(event, callback) {\n      return this;\n    }\n    /**\r\n     * Listen for all events on the channel instance.\r\n     */\n\n  }, {\n    key: \"listenToAll\",\n    value: function listenToAll(callback) {\n      return this;\n    }\n    /**\r\n     * Stop listening for an event on the channel instance.\r\n     */\n\n  }, {\n    key: \"stopListening\",\n    value: function stopListening(event, callback) {\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime a subscription succeeds.\r\n     */\n\n  }, {\n    key: \"subscribed\",\n    value: function subscribed(callback) {\n      return this;\n    }\n    /**\r\n     * Register a callback to be called anytime an error occurs.\r\n     */\n\n  }, {\n    key: \"error\",\n    value: function error(callback) {\n      return this;\n    }\n    /**\r\n     * Bind a channel to an event.\r\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(event, callback) {\n      return this;\n    }\n  }]);\n\n  return NullChannel;\n}(Channel);\n\n/**\r\n * This class represents a null private channel.\r\n */\n\nvar NullPrivateChannel = /*#__PURE__*/function (_NullChannel) {\n  _inherits(NullPrivateChannel, _NullChannel);\n\n  var _super = _createSuper(NullPrivateChannel);\n\n  function NullPrivateChannel() {\n    _classCallCheck(this, NullPrivateChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(NullPrivateChannel, [{\n    key: \"whisper\",\n    value:\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n    function whisper(eventName, data) {\n      return this;\n    }\n  }]);\n\n  return NullPrivateChannel;\n}(NullChannel);\n\n/**\r\n * This class represents a null presence channel.\r\n */\n\nvar NullPresenceChannel = /*#__PURE__*/function (_NullChannel) {\n  _inherits(NullPresenceChannel, _NullChannel);\n\n  var _super = _createSuper(NullPresenceChannel);\n\n  function NullPresenceChannel() {\n    _classCallCheck(this, NullPresenceChannel);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(NullPresenceChannel, [{\n    key: \"here\",\n    value:\n    /**\r\n     * Register a callback to be called anytime the member list changes.\r\n     */\n    function here(callback) {\n      return this;\n    }\n    /**\r\n     * Listen for someone joining the channel.\r\n     */\n\n  }, {\n    key: \"joining\",\n    value: function joining(callback) {\n      return this;\n    }\n    /**\r\n     * Listen for someone leaving the channel.\r\n     */\n\n  }, {\n    key: \"leaving\",\n    value: function leaving(callback) {\n      return this;\n    }\n    /**\r\n     * Trigger client event on the channel.\r\n     */\n\n  }, {\n    key: \"whisper\",\n    value: function whisper(eventName, data) {\n      return this;\n    }\n  }]);\n\n  return NullPresenceChannel;\n}(NullChannel);\n\nvar Connector = /*#__PURE__*/function () {\n  /**\r\n   * Create a new class instance.\r\n   */\n  function Connector(options) {\n    _classCallCheck(this, Connector);\n\n    /**\r\n     * Default connector options.\r\n     */\n    this._defaultOptions = {\n      auth: {\n        headers: {}\n      },\n      authEndpoint: '/broadcasting/auth',\n      userAuthentication: {\n        endpoint: '/broadcasting/user-auth',\n        headers: {}\n      },\n      broadcaster: 'pusher',\n      csrfToken: null,\n      bearerToken: null,\n      host: null,\n      key: null,\n      namespace: 'App.Events'\n    };\n    this.setOptions(options);\n    this.connect();\n  }\n  /**\r\n   * Merge the custom options with the defaults.\r\n   */\n\n\n  _createClass(Connector, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      this.options = _extends(this._defaultOptions, options);\n      var token = this.csrfToken();\n\n      if (token) {\n        this.options.auth.headers['X-CSRF-TOKEN'] = token;\n        this.options.userAuthentication.headers['X-CSRF-TOKEN'] = token;\n      }\n\n      token = this.options.bearerToken;\n\n      if (token) {\n        this.options.auth.headers['Authorization'] = 'Bearer ' + token;\n        this.options.userAuthentication.headers['Authorization'] = 'Bearer ' + token;\n      }\n\n      return options;\n    }\n    /**\r\n     * Extract the CSRF token from the page.\r\n     */\n\n  }, {\n    key: \"csrfToken\",\n    value: function csrfToken() {\n      var selector;\n\n      if (typeof window !== 'undefined' && window['Laravel'] && window['Laravel'].csrfToken) {\n        return window['Laravel'].csrfToken;\n      } else if (this.options.csrfToken) {\n        return this.options.csrfToken;\n      } else if (typeof document !== 'undefined' && typeof document.querySelector === 'function' && (selector = document.querySelector('meta[name=\"csrf-token\"]'))) {\n        return selector.getAttribute('content');\n      }\n\n      return null;\n    }\n  }]);\n\n  return Connector;\n}();\n\n/**\r\n * This class creates a connector to Pusher.\r\n */\n\nvar PusherConnector = /*#__PURE__*/function (_Connector) {\n  _inherits(PusherConnector, _Connector);\n\n  var _super = _createSuper(PusherConnector);\n\n  function PusherConnector() {\n    var _this;\n\n    _classCallCheck(this, PusherConnector);\n\n    _this = _super.apply(this, arguments);\n    /**\r\n     * All of the subscribed channel names.\r\n     */\n\n    _this.channels = {};\n    return _this;\n  }\n  /**\r\n   * Create a fresh Pusher connection.\r\n   */\n\n\n  _createClass(PusherConnector, [{\n    key: \"connect\",\n    value: function connect() {\n      if (typeof this.options.client !== 'undefined') {\n        this.pusher = this.options.client;\n      } else if (this.options.Pusher) {\n        this.pusher = new this.options.Pusher(this.options.key, this.options);\n      } else {\n        this.pusher = new Pusher(this.options.key, this.options);\n      }\n    }\n    /**\r\n     * Sign in the user via Pusher user authentication (https://pusher.com/docs/channels/using_channels/user-authentication/).\r\n     */\n\n  }, {\n    key: \"signin\",\n    value: function signin() {\n      this.pusher.signin();\n    }\n    /**\r\n     * Listen for an event on a channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(name, event, callback) {\n      return this.channel(name).listen(event, callback);\n    }\n    /**\r\n     * Get a channel instance by name.\r\n     */\n\n  }, {\n    key: \"channel\",\n    value: function channel(name) {\n      if (!this.channels[name]) {\n        this.channels[name] = new PusherChannel(this.pusher, name, this.options);\n      }\n\n      return this.channels[name];\n    }\n    /**\r\n     * Get a private channel instance by name.\r\n     */\n\n  }, {\n    key: \"privateChannel\",\n    value: function privateChannel(name) {\n      if (!this.channels['private-' + name]) {\n        this.channels['private-' + name] = new PusherPrivateChannel(this.pusher, 'private-' + name, this.options);\n      }\n\n      return this.channels['private-' + name];\n    }\n    /**\r\n     * Get a private encrypted channel instance by name.\r\n     */\n\n  }, {\n    key: \"encryptedPrivateChannel\",\n    value: function encryptedPrivateChannel(name) {\n      if (!this.channels['private-encrypted-' + name]) {\n        this.channels['private-encrypted-' + name] = new PusherEncryptedPrivateChannel(this.pusher, 'private-encrypted-' + name, this.options);\n      }\n\n      return this.channels['private-encrypted-' + name];\n    }\n    /**\r\n     * Get a presence channel instance by name.\r\n     */\n\n  }, {\n    key: \"presenceChannel\",\n    value: function presenceChannel(name) {\n      if (!this.channels['presence-' + name]) {\n        this.channels['presence-' + name] = new PusherPresenceChannel(this.pusher, 'presence-' + name, this.options);\n      }\n\n      return this.channels['presence-' + name];\n    }\n    /**\r\n     * Leave the given channel, as well as its private and presence variants.\r\n     */\n\n  }, {\n    key: \"leave\",\n    value: function leave(name) {\n      var _this2 = this;\n\n      var channels = [name, 'private-' + name, 'private-encrypted-' + name, 'presence-' + name];\n      channels.forEach(function (name, index) {\n        _this2.leaveChannel(name);\n      });\n    }\n    /**\r\n     * Leave the given channel.\r\n     */\n\n  }, {\n    key: \"leaveChannel\",\n    value: function leaveChannel(name) {\n      if (this.channels[name]) {\n        this.channels[name].unsubscribe();\n        delete this.channels[name];\n      }\n    }\n    /**\r\n     * Get the socket ID for the connection.\r\n     */\n\n  }, {\n    key: \"socketId\",\n    value: function socketId() {\n      return this.pusher.connection.socket_id;\n    }\n    /**\r\n     * Disconnect Pusher connection.\r\n     */\n\n  }, {\n    key: \"disconnect\",\n    value: function disconnect() {\n      this.pusher.disconnect();\n    }\n  }]);\n\n  return PusherConnector;\n}(Connector);\n\n/**\r\n * This class creates a connnector to a Socket.io server.\r\n */\n\nvar SocketIoConnector = /*#__PURE__*/function (_Connector) {\n  _inherits(SocketIoConnector, _Connector);\n\n  var _super = _createSuper(SocketIoConnector);\n\n  function SocketIoConnector() {\n    var _this;\n\n    _classCallCheck(this, SocketIoConnector);\n\n    _this = _super.apply(this, arguments);\n    /**\r\n     * All of the subscribed channel names.\r\n     */\n\n    _this.channels = {};\n    return _this;\n  }\n  /**\r\n   * Create a fresh Socket.io connection.\r\n   */\n\n\n  _createClass(SocketIoConnector, [{\n    key: \"connect\",\n    value: function connect() {\n      var _this2 = this;\n\n      var io = this.getSocketIO();\n      this.socket = io(this.options.host, this.options);\n      this.socket.on('reconnect', function () {\n        Object.values(_this2.channels).forEach(function (channel) {\n          channel.subscribe();\n        });\n      });\n      return this.socket;\n    }\n    /**\r\n     * Get socket.io module from global scope or options.\r\n     */\n\n  }, {\n    key: \"getSocketIO\",\n    value: function getSocketIO() {\n      if (typeof this.options.client !== 'undefined') {\n        return this.options.client;\n      }\n\n      if (typeof io !== 'undefined') {\n        return io;\n      }\n\n      throw new Error('Socket.io client not found. Should be globally available or passed via options.client');\n    }\n    /**\r\n     * Listen for an event on a channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(name, event, callback) {\n      return this.channel(name).listen(event, callback);\n    }\n    /**\r\n     * Get a channel instance by name.\r\n     */\n\n  }, {\n    key: \"channel\",\n    value: function channel(name) {\n      if (!this.channels[name]) {\n        this.channels[name] = new SocketIoChannel(this.socket, name, this.options);\n      }\n\n      return this.channels[name];\n    }\n    /**\r\n     * Get a private channel instance by name.\r\n     */\n\n  }, {\n    key: \"privateChannel\",\n    value: function privateChannel(name) {\n      if (!this.channels['private-' + name]) {\n        this.channels['private-' + name] = new SocketIoPrivateChannel(this.socket, 'private-' + name, this.options);\n      }\n\n      return this.channels['private-' + name];\n    }\n    /**\r\n     * Get a presence channel instance by name.\r\n     */\n\n  }, {\n    key: \"presenceChannel\",\n    value: function presenceChannel(name) {\n      if (!this.channels['presence-' + name]) {\n        this.channels['presence-' + name] = new SocketIoPresenceChannel(this.socket, 'presence-' + name, this.options);\n      }\n\n      return this.channels['presence-' + name];\n    }\n    /**\r\n     * Leave the given channel, as well as its private and presence variants.\r\n     */\n\n  }, {\n    key: \"leave\",\n    value: function leave(name) {\n      var _this3 = this;\n\n      var channels = [name, 'private-' + name, 'presence-' + name];\n      channels.forEach(function (name) {\n        _this3.leaveChannel(name);\n      });\n    }\n    /**\r\n     * Leave the given channel.\r\n     */\n\n  }, {\n    key: \"leaveChannel\",\n    value: function leaveChannel(name) {\n      if (this.channels[name]) {\n        this.channels[name].unsubscribe();\n        delete this.channels[name];\n      }\n    }\n    /**\r\n     * Get the socket ID for the connection.\r\n     */\n\n  }, {\n    key: \"socketId\",\n    value: function socketId() {\n      return this.socket.id;\n    }\n    /**\r\n     * Disconnect Socketio connection.\r\n     */\n\n  }, {\n    key: \"disconnect\",\n    value: function disconnect() {\n      this.socket.disconnect();\n    }\n  }]);\n\n  return SocketIoConnector;\n}(Connector);\n\n/**\r\n * This class creates a null connector.\r\n */\n\nvar NullConnector = /*#__PURE__*/function (_Connector) {\n  _inherits(NullConnector, _Connector);\n\n  var _super = _createSuper(NullConnector);\n\n  function NullConnector() {\n    var _this;\n\n    _classCallCheck(this, NullConnector);\n\n    _this = _super.apply(this, arguments);\n    /**\r\n     * All of the subscribed channel names.\r\n     */\n\n    _this.channels = {};\n    return _this;\n  }\n  /**\r\n   * Create a fresh connection.\r\n   */\n\n\n  _createClass(NullConnector, [{\n    key: \"connect\",\n    value: function connect() {//\n    }\n    /**\r\n     * Listen for an event on a channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(name, event, callback) {\n      return new NullChannel();\n    }\n    /**\r\n     * Get a channel instance by name.\r\n     */\n\n  }, {\n    key: \"channel\",\n    value: function channel(name) {\n      return new NullChannel();\n    }\n    /**\r\n     * Get a private channel instance by name.\r\n     */\n\n  }, {\n    key: \"privateChannel\",\n    value: function privateChannel(name) {\n      return new NullPrivateChannel();\n    }\n    /**\r\n     * Get a private encrypted channel instance by name.\r\n     */\n\n  }, {\n    key: \"encryptedPrivateChannel\",\n    value: function encryptedPrivateChannel(name) {\n      return new NullPrivateChannel();\n    }\n    /**\r\n     * Get a presence channel instance by name.\r\n     */\n\n  }, {\n    key: \"presenceChannel\",\n    value: function presenceChannel(name) {\n      return new NullPresenceChannel();\n    }\n    /**\r\n     * Leave the given channel, as well as its private and presence variants.\r\n     */\n\n  }, {\n    key: \"leave\",\n    value: function leave(name) {//\n    }\n    /**\r\n     * Leave the given channel.\r\n     */\n\n  }, {\n    key: \"leaveChannel\",\n    value: function leaveChannel(name) {//\n    }\n    /**\r\n     * Get the socket ID for the connection.\r\n     */\n\n  }, {\n    key: \"socketId\",\n    value: function socketId() {\n      return 'fake-socket-id';\n    }\n    /**\r\n     * Disconnect the connection.\r\n     */\n\n  }, {\n    key: \"disconnect\",\n    value: function disconnect() {//\n    }\n  }]);\n\n  return NullConnector;\n}(Connector);\n\n/**\r\n * This class is the primary API for interacting with broadcasting.\r\n */\n\nvar Echo = /*#__PURE__*/function () {\n  /**\r\n   * Create a new class instance.\r\n   */\n  function Echo(options) {\n    _classCallCheck(this, Echo);\n\n    this.options = options;\n    this.connect();\n\n    if (!this.options.withoutInterceptors) {\n      this.registerInterceptors();\n    }\n  }\n  /**\r\n   * Get a channel instance by name.\r\n   */\n\n\n  _createClass(Echo, [{\n    key: \"channel\",\n    value: function channel(_channel) {\n      return this.connector.channel(_channel);\n    }\n    /**\r\n     * Create a new connection.\r\n     */\n\n  }, {\n    key: \"connect\",\n    value: function connect() {\n      if (this.options.broadcaster == 'pusher') {\n        this.connector = new PusherConnector(this.options);\n      } else if (this.options.broadcaster == 'socket.io') {\n        this.connector = new SocketIoConnector(this.options);\n      } else if (this.options.broadcaster == 'null') {\n        this.connector = new NullConnector(this.options);\n      } else if (typeof this.options.broadcaster == 'function') {\n        this.connector = new this.options.broadcaster(this.options);\n      }\n    }\n    /**\r\n     * Disconnect from the Echo server.\r\n     */\n\n  }, {\n    key: \"disconnect\",\n    value: function disconnect() {\n      this.connector.disconnect();\n    }\n    /**\r\n     * Get a presence channel instance by name.\r\n     */\n\n  }, {\n    key: \"join\",\n    value: function join(channel) {\n      return this.connector.presenceChannel(channel);\n    }\n    /**\r\n     * Leave the given channel, as well as its private and presence variants.\r\n     */\n\n  }, {\n    key: \"leave\",\n    value: function leave(channel) {\n      this.connector.leave(channel);\n    }\n    /**\r\n     * Leave the given channel.\r\n     */\n\n  }, {\n    key: \"leaveChannel\",\n    value: function leaveChannel(channel) {\n      this.connector.leaveChannel(channel);\n    }\n    /**\r\n     * Leave all channels.\r\n     */\n\n  }, {\n    key: \"leaveAllChannels\",\n    value: function leaveAllChannels() {\n      for (var channel in this.connector.channels) {\n        this.leaveChannel(channel);\n      }\n    }\n    /**\r\n     * Listen for an event on a channel instance.\r\n     */\n\n  }, {\n    key: \"listen\",\n    value: function listen(channel, event, callback) {\n      return this.connector.listen(channel, event, callback);\n    }\n    /**\r\n     * Get a private channel instance by name.\r\n     */\n\n  }, {\n    key: \"private\",\n    value: function _private(channel) {\n      return this.connector.privateChannel(channel);\n    }\n    /**\r\n     * Get a private encrypted channel instance by name.\r\n     */\n\n  }, {\n    key: \"encryptedPrivate\",\n    value: function encryptedPrivate(channel) {\n      return this.connector.encryptedPrivateChannel(channel);\n    }\n    /**\r\n     * Get the Socket ID for the connection.\r\n     */\n\n  }, {\n    key: \"socketId\",\n    value: function socketId() {\n      return this.connector.socketId();\n    }\n    /**\r\n     * Register 3rd party request interceptiors. These are used to automatically\r\n     * send a connections socket id to a Laravel app with a X-Socket-Id header.\r\n     */\n\n  }, {\n    key: \"registerInterceptors\",\n    value: function registerInterceptors() {\n      if (typeof Vue === 'function' && Vue.http) {\n        this.registerVueRequestInterceptor();\n      }\n\n      if (typeof axios === 'function') {\n        this.registerAxiosRequestInterceptor();\n      }\n\n      if (typeof jQuery === 'function') {\n        this.registerjQueryAjaxSetup();\n      }\n\n      if ((typeof Turbo === \"undefined\" ? \"undefined\" : _typeof(Turbo)) === 'object') {\n        this.registerTurboRequestInterceptor();\n      }\n    }\n    /**\r\n     * Register a Vue HTTP interceptor to add the X-Socket-ID header.\r\n     */\n\n  }, {\n    key: \"registerVueRequestInterceptor\",\n    value: function registerVueRequestInterceptor() {\n      var _this = this;\n\n      Vue.http.interceptors.push(function (request, next) {\n        if (_this.socketId()) {\n          request.headers.set('X-Socket-ID', _this.socketId());\n        }\n\n        next();\n      });\n    }\n    /**\r\n     * Register an Axios HTTP interceptor to add the X-Socket-ID header.\r\n     */\n\n  }, {\n    key: \"registerAxiosRequestInterceptor\",\n    value: function registerAxiosRequestInterceptor() {\n      var _this2 = this;\n\n      axios.interceptors.request.use(function (config) {\n        if (_this2.socketId()) {\n          config.headers['X-Socket-Id'] = _this2.socketId();\n        }\n\n        return config;\n      });\n    }\n    /**\r\n     * Register jQuery AjaxPrefilter to add the X-Socket-ID header.\r\n     */\n\n  }, {\n    key: \"registerjQueryAjaxSetup\",\n    value: function registerjQueryAjaxSetup() {\n      var _this3 = this;\n\n      if (typeof jQuery.ajax != 'undefined') {\n        jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n          if (_this3.socketId()) {\n            xhr.setRequestHeader('X-Socket-Id', _this3.socketId());\n          }\n        });\n      }\n    }\n    /**\r\n     * Register the Turbo Request interceptor to add the X-Socket-ID header.\r\n     */\n\n  }, {\n    key: \"registerTurboRequestInterceptor\",\n    value: function registerTurboRequestInterceptor() {\n      var _this4 = this;\n\n      document.addEventListener('turbo:before-fetch-request', function (event) {\n        event.detail.fetchOptions.headers['X-Socket-Id'] = _this4.socketId();\n      });\n    }\n  }]);\n\n  return Echo;\n}();\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/laravel-echo/dist/echo.js?");

/***/ }),

/***/ "./node_modules/latest-createjs/index.js":
/*!***********************************************!*\
  !*** ./node_modules/latest-createjs/index.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! ./lib/easeljs/easeljs.js */ \"./node_modules/latest-createjs/lib/easeljs/easeljs.js\")\n__webpack_require__(/*! ./lib/tweenjs/tweenjs.js */ \"./node_modules/latest-createjs/lib/tweenjs/tweenjs.js\")\n__webpack_require__(/*! ./lib/soundjs/soundjs.js */ \"./node_modules/latest-createjs/lib/soundjs/soundjs.js\")\n__webpack_require__(/*! ./lib/preloadjs/preloadjs.js */ \"./node_modules/latest-createjs/lib/preloadjs/preloadjs.js\")\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/latest-createjs/index.js?");

/***/ }),

/***/ "./node_modules/latest-createjs/lib/easeljs/easeljs.js":
/*!*************************************************************!*\
  !*** ./node_modules/latest-createjs/lib/easeljs/easeljs.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*!\n* EaselJS\n* Visit http://createjs.com/ for documentation, updates and examples.\n*\n* Copyright (c) 2010 gskinner.com, inc.\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n//##############################################################################\n// extend.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Sets up the prototype chain and constructor property for a new class.\n *\n * This should be called right after creating the class constructor.\n *\n * \tfunction MySubClass() {}\n * \tcreatejs.extend(MySubClass, MySuperClass);\n * \tMySubClass.prototype.doSomething = function() { }\n *\n * \tvar foo = new MySubClass();\n * \tconsole.log(foo instanceof MySuperClass); // true\n * \tconsole.log(foo.prototype.constructor === MySubClass); // true\n *\n * @method extend\n * @param {Function} subclass The subclass.\n * @param {Function} superclass The superclass to extend.\n * @return {Function} Returns the subclass's new prototype.\n */\ncreatejs.extend = function(subclass, superclass) {\n\t\"use strict\";\n\n\tfunction o() { this.constructor = subclass; }\n\to.prototype = superclass.prototype;\n\treturn (subclass.prototype = new o());\n};\n\n//##############################################################################\n// promote.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\n * It is recommended to use the super class's name as the prefix.\n * An alias to the super class's constructor is always added in the format `prefix_constructor`.\n * This allows the subclass to call super class methods without using `function.call`, providing better performance.\n *\n * For example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\n * would add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\n * prototype of `MySubClass` as `MySuperClass_draw`.\n *\n * This should be called after the class's prototype is fully defined.\n *\n * \tfunction ClassA(name) {\n * \t\tthis.name = name;\n * \t}\n * \tClassA.prototype.greet = function() {\n * \t\treturn \"Hello \"+this.name;\n * \t}\n *\n * \tfunction ClassB(name, punctuation) {\n * \t\tthis.ClassA_constructor(name);\n * \t\tthis.punctuation = punctuation;\n * \t}\n * \tcreatejs.extend(ClassB, ClassA);\n * \tClassB.prototype.greet = function() {\n * \t\treturn this.ClassA_greet()+this.punctuation;\n * \t}\n * \tcreatejs.promote(ClassB, \"ClassA\");\n *\n * \tvar foo = new ClassB(\"World\", \"!?!\");\n * \tconsole.log(foo.greet()); // Hello World!?!\n *\n * @method promote\n * @param {Function} subclass The class to promote super class methods on.\n * @param {String} prefix The prefix to add to the promoted method names. Usually the name of the superclass.\n * @return {Function} Returns the subclass.\n */\ncreatejs.promote = function(subclass, prefix) {\n\t\"use strict\";\n\n\tvar subP = subclass.prototype, supP = (Object.getPrototypeOf&&Object.getPrototypeOf(subP))||subP.__proto__;\n\tif (supP) {\n\t\tsubP[(prefix+=\"_\") + \"constructor\"] = supP.constructor; // constructor is not always innumerable\n\t\tfor (var n in supP) {\n\t\t\tif (subP.hasOwnProperty(n) && (typeof supP[n] == \"function\")) { subP[prefix + n] = supP[n]; }\n\t\t}\n\t}\n\treturn subclass;\n};\n\n//##############################################################################\n// indexOf.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of\n * that value.  Returns -1 if value is not found.\n *\n *      var i = createjs.indexOf(myArray, myElementToFind);\n *\n * @method indexOf\n * @param {Array} array Array to search for searchElement\n * @param searchElement Element to find in array.\n * @return {Number} The first index of searchElement in array.\n */\ncreatejs.indexOf = function (array, searchElement){\n\t\"use strict\";\n\n\tfor (var i = 0,l=array.length; i < l; i++) {\n\t\tif (searchElement === array[i]) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n//##############################################################################\n// UID.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Global utility for generating sequential unique ID numbers. The UID class uses a static interface (ex. <code>UID.get()</code>)\n\t * and should not be instantiated.\n\t * @class UID\n\t * @static\n\t **/\n\tfunction UID() {\n\t\tthrow \"UID cannot be instantiated\";\n\t}\n\n\n// private static properties:\n\t/**\n\t * @property _nextID\n\t * @type Number\n\t * @protected\n\t **/\n\tUID._nextID = 0;\n\n\n// public static methods:\n\t/**\n\t * Returns the next unique id.\n\t * @method get\n\t * @return {Number} The next unique id\n\t * @static\n\t **/\n\tUID.get = function() {\n\t\treturn UID._nextID++;\n\t};\n\n\n\tcreatejs.UID = UID;\n}());\n\n//##############################################################################\n// deprecate.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Wraps deprecated methods so they still be used, but throw warnings to developers.\n *\n *\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\n *\n * The recommended approach for deprecated properties is:\n *\n *\ttry {\n *\t\tObj\tect.defineProperties(object, {\n *\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\n *\t\t\treadWriteProp: {\n *\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\n *\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\n *\t\t});\n *\t} catch (e) {}\n *\n * @method deprecate\n * @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how\n * @param {String} [name=null] The name of the method or property to display in the console warning.\n * to deprecate properties.\n * @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after\n * logging the warning in the console.\n */\ncreatejs.deprecate = function(fallbackMethod, name) {\n\t\"use strict\";\n\treturn function() {\n\t\tvar msg = \"Deprecated property or method '\"+name+\"'. See docs for info.\";\n\t\tconsole && (console.warn ? console.warn(msg) : console.log(msg));\n\t\treturn fallbackMethod && fallbackMethod.apply(this, arguments);\n\t}\n};\n\n//##############################################################################\n// Event.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n// constructor:\n\t/**\n\t * Contains properties and methods shared by all events for use with\n\t * {{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\n\t * \n\t * Note that Event objects are often reused, so you should never\n\t * rely on an event object's state outside of the call stack it was received in.\n\t * @class Event\n\t * @param {String} type The event type.\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\n\t * @constructor\n\t **/\n\tfunction Event(type, bubbles, cancelable) {\n\t\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * The type of event.\n\t\t * @property type\n\t\t * @type String\n\t\t **/\n\t\tthis.type = type;\n\t\n\t\t/**\n\t\t * The object that generated an event.\n\t\t * @property target\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.target = null;\n\t\n\t\t/**\n\t\t * The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\n\t\t * always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\n\t\t * is generated from childObj, then a listener on parentObj would receive the event with\n\t\t * target=childObj (the original target) and currentTarget=parentObj (where the listener was added).\n\t\t * @property currentTarget\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.currentTarget = null;\n\t\n\t\t/**\n\t\t * For bubbling events, this indicates the current event phase:<OL>\n\t\t * \t<LI> capture phase: starting from the top parent to the target</LI>\n\t\t * \t<LI> at target phase: currently being dispatched from the target</LI>\n\t\t * \t<LI> bubbling phase: from the target to the top parent</LI>\n\t\t * </OL>\n\t\t * @property eventPhase\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.eventPhase = 0;\n\t\n\t\t/**\n\t\t * Indicates whether the event will bubble through the display list.\n\t\t * @property bubbles\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.bubbles = !!bubbles;\n\t\n\t\t/**\n\t\t * Indicates whether the default behaviour of this event can be cancelled via\n\t\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.\n\t\t * @property cancelable\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.cancelable = !!cancelable;\n\t\n\t\t/**\n\t\t * The epoch time at which this event was created.\n\t\t * @property timeStamp\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.timeStamp = (new Date()).getTime();\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property defaultPrevented\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.defaultPrevented = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.\n\t\t * @property propagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.propagationStopped = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property immediatePropagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.immediatePropagationStopped = false;\n\t\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.\n\t\t * @property removed\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.removed = false;\n\t}\n\tvar p = Event.prototype;\n\n// public methods:\n\t/**\n\t * Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\n\t * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\n\t * cancel the default behaviour associated with the event.\n\t * @method preventDefault\n\t **/\n\tp.preventDefault = function() {\n\t\tthis.defaultPrevented = this.cancelable&&true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopPropagation\n\t **/\n\tp.stopPropagation = function() {\n\t\tthis.propagationStopped = true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\n\t * {{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopImmediatePropagation\n\t **/\n\tp.stopImmediatePropagation = function() {\n\t\tthis.immediatePropagationStopped = this.propagationStopped = true;\n\t};\n\t\n\t/**\n\t * Causes the active listener to be removed via removeEventListener();\n\t * \n\t * \t\tmyBtn.addEventListener(\"click\", function(evt) {\n\t * \t\t\t// do stuff...\n\t * \t\t\tevt.remove(); // removes this listener.\n\t * \t\t});\n\t * \n\t * @method remove\n\t **/\n\tp.remove = function() {\n\t\tthis.removed = true;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Event instance.\n\t * @method clone\n\t * @return {Event} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Event(this.type, this.bubbles, this.cancelable);\n\t};\n\t\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the instance.\n\t * @return {Event} Returns the instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Event (type=\"+this.type+\")]\";\n\t};\n\n\tcreatejs.Event = Event;\n}());\n\n//##############################################################################\n// EventDispatcher.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * EventDispatcher provides methods for managing queues of event listeners and dispatching events.\r\n\t *\r\n\t * You can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\r\n\t * EventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\r\n\t * \r\n\t * Together with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\r\n\t * DOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\r\n\t * bubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\r\n\t * \r\n\t * EventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\r\n\t * to create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \r\n\t * {{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\r\n\t * {{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\r\n\t * \r\n\t * Another addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\r\n\t * method, which can be used to listeners for all events, or listeners for a specific event. The Event object also \r\n\t * includes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * Add EventDispatcher capabilities to the \"MyClass\" class.\r\n\t *\r\n\t *      EventDispatcher.initialize(MyClass.prototype);\r\n\t *\r\n\t * Add an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\r\n\t *\r\n\t *      instance.addEventListener(\"eventName\", handlerMethod);\r\n\t *      function handlerMethod(event) {\r\n\t *          console.log(event.target + \" Was Clicked\");\r\n\t *      }\r\n\t *\r\n\t * <b>Maintaining proper scope</b><br />\r\n\t * Scope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\r\n\t * method to subscribe to events simplifies this.\r\n\t *\r\n\t *      instance.addEventListener(\"click\", function(event) {\r\n\t *          console.log(instance == this); // false, scope is ambiguous.\r\n\t *      });\r\n\t *      \r\n\t *      instance.on(\"click\", function(event) {\r\n\t *          console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\r\n\t *      });\r\n\t * \r\n\t * If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\r\n\t * scope.\r\n\t *\r\n\t * <b>Browser support</b>\r\n\t * The event model in CreateJS can be used separately from the suite in any project, however the inheritance model\r\n\t * requires modern browsers (IE9+).\r\n\t *      \r\n\t *\r\n\t * @class EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction EventDispatcher() {\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _listeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._listeners = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _captureListeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._captureListeners = null;\r\n\t}\r\n\tvar p = EventDispatcher.prototype;\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Static initializer to mix EventDispatcher methods into a target object or prototype.\r\n\t * \r\n\t * \t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\r\n\t * \t\tEventDispatcher.initialize(myObject); // add to a specific instance\r\n\t * \r\n\t * @method initialize\r\n\t * @static\r\n\t * @param {Object} target The target object to inject EventDispatcher methods into. This can be an instance or a\r\n\t * prototype.\r\n\t **/\r\n\tEventDispatcher.initialize = function(target) {\r\n\t\ttarget.addEventListener = p.addEventListener;\r\n\t\ttarget.on = p.on;\r\n\t\ttarget.removeEventListener = target.off =  p.removeEventListener;\r\n\t\ttarget.removeAllEventListeners = p.removeAllEventListeners;\r\n\t\ttarget.hasEventListener = p.hasEventListener;\r\n\t\ttarget.dispatchEvent = p.dispatchEvent;\r\n\t\ttarget._dispatchEvent = p._dispatchEvent;\r\n\t\ttarget.willTrigger = p.willTrigger;\r\n\t};\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds the specified event listener. Note that adding multiple listeners to the same function will result in\r\n\t * multiple callbacks getting fired.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.addEventListener(\"click\", handleClick);\r\n\t *      function handleClick(event) {\r\n\t *         // Click happened.\r\n\t *      }\r\n\t *\r\n\t * @method addEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function | Object} Returns the listener for chaining or assignment.\r\n\t **/\r\n\tp.addEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners;\r\n\t\tif (useCapture) {\r\n\t\t\tlisteners = this._captureListeners = this._captureListeners||{};\r\n\t\t} else {\r\n\t\t\tlisteners = this._listeners = this._listeners||{};\r\n\t\t}\r\n\t\tvar arr = listeners[type];\r\n\t\tif (arr) { this.removeEventListener(type, listener, useCapture); }\r\n\t\tarr = listeners[type]; // remove may have deleted the array\r\n\t\tif (!arr) { listeners[type] = [listener];  }\r\n\t\telse { arr.push(listener); }\r\n\t\treturn listener;\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\r\n\t * only run once, associate arbitrary data with the listener, and remove the listener.\r\n\t * \r\n\t * This method works by creating an anonymous wrapper function and subscribing it with addEventListener.\r\n\t * The wrapper function is returned for use with `removeEventListener` (or `off`).\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\r\n\t * {{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\r\n\t * to `on` with the same params will create multiple listeners.\r\n\t * \r\n\t * <h4>Example</h4>\r\n\t * \r\n\t * \t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\r\n\t * \t\tfunction handleClick(evt, data) {\r\n\t * \t\t\tdata.count -= 1;\r\n\t * \t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\r\n\t * \t\t\tif (data.count == 0) {\r\n\t * \t\t\t\talert(\"clicked 3 times!\");\r\n\t * \t\t\t\tmyBtn.off(\"click\", listener);\r\n\t * \t\t\t\t// alternately: evt.remove();\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t * \r\n\t * @method on\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Object} [scope] The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).\r\n\t * @param {Boolean} [once=false] If true, the listener will remove itself after the first time it is triggered.\r\n\t * @param {*} [data] Arbitrary data that will be included as the second parameter when the listener is called.\r\n\t * @param {Boolean} [useCapture=false] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function} Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.\r\n\t **/\r\n\tp.on = function(type, listener, scope, once, data, useCapture) {\r\n\t\tif (listener.handleEvent) {\r\n\t\t\tscope = scope||listener;\r\n\t\t\tlistener = listener.handleEvent;\r\n\t\t}\r\n\t\tscope = scope||this;\r\n\t\treturn this.addEventListener(type, function(evt) {\r\n\t\t\t\tlistener.call(scope, evt, data);\r\n\t\t\t\tonce&&evt.remove();\r\n\t\t\t}, useCapture);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified event listener.\r\n\t *\r\n\t * <b>Important Note:</b> that you must pass the exact function reference used when the event was added. If a proxy\r\n\t * function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\r\n\t * closure will not work.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.removeEventListener(\"click\", handleClick);\r\n\t *\r\n\t * @method removeEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.removeEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners = useCapture ? this._captureListeners : this._listeners;\r\n\t\tif (!listeners) { return; }\r\n\t\tvar arr = listeners[type];\r\n\t\tif (!arr) { return; }\r\n\t\tfor (var i=0,l=arr.length; i<l; i++) {\r\n\t\t\tif (arr[i] == listener) {\r\n\t\t\t\tif (l==1) { delete(listeners[type]); } // allows for faster checks.\r\n\t\t\t\telse { arr.splice(i,1); }\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the\r\n\t * .on method.\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \r\n\t * {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.\r\n\t *\r\n\t * @method off\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.off = p.removeEventListener;\r\n\r\n\t/**\r\n\t * Removes all listeners for the specified type, or all listeners of all types.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Remove all listeners\r\n\t *      displayObject.removeAllEventListeners();\r\n\t *\r\n\t *      // Remove all click listeners\r\n\t *      displayObject.removeAllEventListeners(\"click\");\r\n\t *\r\n\t * @method removeAllEventListeners\r\n\t * @param {String} [type] The string type of the event. If omitted, all listeners for all types will be removed.\r\n\t **/\r\n\tp.removeAllEventListeners = function(type) {\r\n\t\tif (!type) { this._listeners = this._captureListeners = null; }\r\n\t\telse {\r\n\t\t\tif (this._listeners) { delete(this._listeners[type]); }\r\n\t\t\tif (this._captureListeners) { delete(this._captureListeners[type]); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the specified event to all listeners.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Use a string event\r\n\t *      this.dispatchEvent(\"complete\");\r\n\t *\r\n\t *      // Use an Event instance\r\n\t *      var event = new createjs.Event(\"progress\");\r\n\t *      this.dispatchEvent(event);\r\n\t *\r\n\t * @method dispatchEvent\r\n\t * @param {Object | String | Event} eventObj An object with a \"type\" property, or a string type.\r\n\t * While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\r\n\t * dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\r\n\t * be used to avoid event object instantiation for non-bubbling events that may not have any listeners.\r\n\t * @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.\r\n\t * @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.\r\n\t * @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.\r\n\t **/\r\n\tp.dispatchEvent = function(eventObj, bubbles, cancelable) {\r\n\t\tif (typeof eventObj == \"string\") {\r\n\t\t\t// skip everything if there's no listeners and it doesn't bubble:\r\n\t\t\tvar listeners = this._listeners;\r\n\t\t\tif (!bubbles && (!listeners || !listeners[eventObj])) { return true; }\r\n\t\t\teventObj = new createjs.Event(eventObj, bubbles, cancelable);\r\n\t\t} else if (eventObj.target && eventObj.clone) {\r\n\t\t\t// redispatching an active event object, so clone it:\r\n\t\t\teventObj = eventObj.clone();\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent\r\n\t\ttry { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events\r\n\r\n\t\tif (!eventObj.bubbles || !this.parent) {\r\n\t\t\tthis._dispatchEvent(eventObj, 2);\r\n\t\t} else {\r\n\t\t\tvar top=this, list=[top];\r\n\t\t\twhile (top.parent) { list.push(top = top.parent); }\r\n\t\t\tvar i, l=list.length;\r\n\r\n\t\t\t// capture & atTarget\r\n\t\t\tfor (i=l-1; i>=0 && !eventObj.propagationStopped; i--) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 1+(i==0));\r\n\t\t\t}\r\n\t\t\t// bubbling\r\n\t\t\tfor (i=1; i<l && !eventObj.propagationStopped; i++) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 3);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !eventObj.defaultPrevented;\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type.\r\n\t * @method hasEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns true if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.hasEventListener = function(type) {\r\n\t\tvar listeners = this._listeners, captureListeners = this._captureListeners;\r\n\t\treturn !!((listeners && listeners[type]) || (captureListeners && captureListeners[type]));\r\n\t};\r\n\t\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type on this object or any of its\r\n\t * ancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the\r\n\t * specified type is dispatched from this object, it will trigger at least one listener.\r\n\t * \r\n\t * This is similar to {{#crossLink \"EventDispatcher/hasEventListener\"}}{{/crossLink}}, but it searches the entire\r\n\t * event flow for a listener, not just this object.\r\n\t * @method willTrigger\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns `true` if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.willTrigger = function(type) {\r\n\t\tvar o = this;\r\n\t\twhile (o) {\r\n\t\t\tif (o.hasEventListener(type)) { return true; }\r\n\t\t\to = o.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[EventDispatcher]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _dispatchEvent\r\n\t * @param {Object | Event} eventObj\r\n\t * @param {Object} eventPhase\r\n\t * @protected\r\n\t **/\r\n\tp._dispatchEvent = function(eventObj, eventPhase) {\r\n\t\tvar l, arr, listeners = (eventPhase <= 2) ? this._captureListeners : this._listeners;\r\n\t\tif (eventObj && listeners && (arr = listeners[eventObj.type]) && (l=arr.length)) {\r\n\t\t\ttry { eventObj.currentTarget = this; } catch (e) {}\r\n\t\t\ttry { eventObj.eventPhase = eventPhase|0; } catch (e) {}\r\n\t\t\teventObj.removed = false;\r\n\t\t\t\r\n\t\t\tarr = arr.slice(); // to avoid issues with items being removed or added during the dispatch\r\n\t\t\tfor (var i=0; i<l && !eventObj.immediatePropagationStopped; i++) {\r\n\t\t\t\tvar o = arr[i];\r\n\t\t\t\tif (o.handleEvent) { o.handleEvent(eventObj); }\r\n\t\t\t\telse { o(eventObj); }\r\n\t\t\t\tif (eventObj.removed) {\r\n\t\t\t\t\tthis.off(eventObj.type, o, eventPhase==1);\r\n\t\t\t\t\teventObj.removed = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (eventPhase === 2) { this._dispatchEvent(eventObj, 2.1); }\r\n\t};\r\n\r\n\r\n\tcreatejs.EventDispatcher = EventDispatcher;\r\n}());\n\n//##############################################################################\n// Ticker.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The Ticker provides a centralized tick or heartbeat broadcast at a set interval. Listeners can subscribe to the tick\n\t * event to be notified when a set time interval has elapsed.\n\t *\n\t * Note that the interval that the tick event is called is a target interval, and may be broadcast at a slower interval\n\t * when under high CPU load. The Ticker class uses a static interface (ex. `Ticker.framerate = 30;`) and\n\t * can not be instantiated.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      function handleTick(event) {\n\t *          // Actions carried out each tick (aka frame)\n\t *          if (!event.paused) {\n\t *              // Actions carried out when the Ticker is not paused.\n\t *          }\n\t *      }\n\t *\n\t * @class Ticker\n\t * @uses EventDispatcher\n\t * @static\n\t **/\n\tfunction Ticker() {\n\t\tthrow \"Ticker cannot be instantiated.\";\n\t}\n\n\n// constants:\n\t/**\n\t * In this mode, Ticker uses the requestAnimationFrame API, but attempts to synch the ticks to target framerate. It\n\t * uses a simple heuristic that compares the time of the RAF return to the target time for the current frame and\n\t * dispatches the tick when the time is within a certain threshold.\n\t *\n\t * This mode has a higher variance for time between frames than {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}},\n\t * but does not require that content be time based as with {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}} while\n\t * gaining the benefits of that API (screen synch, background throttling).\n\t *\n\t * Variance is usually lowest for framerates that are a divisor of the RAF frequency. This is usually 60, so\n\t * framerates of 10, 12, 15, 20, and 30 work well.\n\t *\n\t * Falls back to {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\n\t * supported.\n\t * @property RAF_SYNCHED\n\t * @static\n\t * @type {String}\n\t * @default \"synched\"\n\t * @readonly\n\t **/\n\tTicker.RAF_SYNCHED = \"synched\";\n\n\t/**\n\t * In this mode, Ticker passes through the requestAnimationFrame heartbeat, ignoring the target framerate completely.\n\t * Because requestAnimationFrame frequency is not deterministic, any content using this mode should be time based.\n\t * You can leverage {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} and the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\n\t * event object's \"delta\" properties to make this easier.\n\t *\n\t * Falls back on {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\n\t * supported.\n\t * @property RAF\n\t * @static\n\t * @type {String}\n\t * @default \"raf\"\n\t * @readonly\n\t **/\n\tTicker.RAF = \"raf\";\n\n\t/**\n\t * In this mode, Ticker uses the setTimeout API. This provides predictable, adaptive frame timing, but does not\n\t * provide the benefits of requestAnimationFrame (screen synch, background throttling).\n\t * @property TIMEOUT\n\t * @static\n\t * @type {String}\n\t * @default \"timeout\"\n\t * @readonly\n\t **/\n\tTicker.TIMEOUT = \"timeout\";\n\n\n// static events:\n\t/**\n\t * Dispatched each tick. The event will be dispatched to each listener even when the Ticker has been paused using\n\t * {{#crossLink \"Ticker/paused:property\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      function handleTick(event) {\n\t *          console.log(\"Paused:\", event.paused, event.delta);\n\t *      }\n\t *\n\t * @event tick\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {Boolean} paused Indicates whether the ticker is currently paused.\n\t * @param {Number} delta The time elapsed in ms since the last tick.\n\t * @param {Number} time The total time in ms since Ticker was initialized.\n\t * @param {Number} runTime The total time in ms that Ticker was not paused since it was initialized. For example,\n\t * \tyou could determine the amount of time that the Ticker has been paused since initialization with `time-runTime`.\n\t * @since 0.6.0\n\t */\n\n\n// public static properties:\n\t/**\n\t * Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See\n\t * {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}}, {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}}, and\n\t * {{#crossLink \"Ticker/RAF_SYNCHED:property\"}}{{/crossLink}} for mode details.\n\t * @property timingMode\n\t * @static\n\t * @type {String}\n\t * @default Ticker.TIMEOUT\n\t **/\n\tTicker.timingMode = null;\n\n\t/**\n\t * Specifies a maximum value for the delta property in the tick event object. This is useful when building time\n\t * based animations and systems to prevent issues caused by large time gaps caused by background tabs, system sleep,\n\t * alert dialogs, or other blocking routines. Double the expected frame duration is often an effective value\n\t * (ex. maxDelta=50 when running at 40fps).\n\t * \n\t * This does not impact any other values (ex. time, runTime, etc), so you may experience issues if you enable maxDelta\n\t * when using both delta and other values.\n\t * \n\t * If 0, there is no maximum.\n\t * @property maxDelta\n\t * @static\n\t * @type {number}\n\t * @default 0\n\t */\n\tTicker.maxDelta = 0;\n\t\n\t/**\n\t * When the ticker is paused, all listeners will still receive a tick event, but the <code>paused</code> property\n\t * of the event will be `true`. Also, while paused the `runTime` will not increase. See {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}},\n\t * {{#crossLink \"Ticker/getTime\"}}{{/crossLink}}, and {{#crossLink \"Ticker/getEventTime\"}}{{/crossLink}} for more\n\t * info.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      createjs.Ticker.paused = true;\n\t *      function handleTick(event) {\n\t *          console.log(event.paused,\n\t *          \tcreatejs.Ticker.getTime(false),\n\t *          \tcreatejs.Ticker.getTime(true));\n\t *      }\n\t *\n\t * @property paused\n\t * @static\n\t * @type {Boolean}\n\t * @default false\n\t **/\n\tTicker.paused = false;\n\n\n// mix-ins:\n\t// EventDispatcher methods:\n\tTicker.removeEventListener = null;\n\tTicker.removeAllEventListeners = null;\n\tTicker.dispatchEvent = null;\n\tTicker.hasEventListener = null;\n\tTicker._listeners = null;\n\tcreatejs.EventDispatcher.initialize(Ticker); // inject EventDispatcher methods.\n\tTicker._addEventListener = Ticker.addEventListener;\n\tTicker.addEventListener = function() {\n\t\t!Ticker._inited&&Ticker.init();\n\t\treturn Ticker._addEventListener.apply(Ticker, arguments);\n\t};\n\n\n// private static properties:\n\t/**\n\t * @property _inited\n\t * @static\n\t * @type {Boolean}\n\t * @private\n\t **/\n\tTicker._inited = false;\n\n\t/**\n\t * @property _startTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._startTime = 0;\n\n\t/**\n\t * @property _pausedTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._pausedTime=0;\n\n\t/**\n\t * The number of ticks that have passed\n\t * @property _ticks\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._ticks = 0;\n\n\t/**\n\t * The number of ticks that have passed while Ticker has been paused\n\t * @property _pausedTicks\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._pausedTicks = 0;\n\n\t/**\n\t * @property _interval\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._interval = 50;\n\n\t/**\n\t * @property _lastTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._lastTime = 0;\n\n\t/**\n\t * @property _times\n\t * @static\n\t * @type {Array}\n\t * @private\n\t **/\n\tTicker._times = null;\n\n\t/**\n\t * @property _tickTimes\n\t * @static\n\t * @type {Array}\n\t * @private\n\t **/\n\tTicker._tickTimes = null;\n\n\t/**\n\t * Stores the timeout or requestAnimationFrame id.\n\t * @property _timerId\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._timerId = null;\n\t\n\t/**\n\t * True if currently using requestAnimationFrame, false if using setTimeout. This may be different than timingMode\n\t * if that property changed and a tick hasn't fired.\n\t * @property _raf\n\t * @static\n\t * @type {Boolean}\n\t * @private\n\t **/\n\tTicker._raf = true;\n\t\n\n// static getter / setters:\n\t/**\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\n\t * @method _setInterval\n\t * @private\n\t * @static\n\t * @param {Number} interval\n\t **/\n\tTicker._setInterval = function(interval) {\n\t\tTicker._interval = interval;\n\t\tif (!Ticker._inited) { return; }\n\t\tTicker._setupTick();\n\t};\n\t// Ticker.setInterval is @deprecated. Remove for 1.1+\n\tTicker.setInterval = createjs.deprecate(Ticker._setInterval, \"Ticker.setInterval\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\n\t * @method _getInterval\n\t * @private\n\t * @static\n\t * @return {Number}\n\t **/\n\tTicker._getInterval = function() {\n\t\treturn Ticker._interval;\n\t};\n\t// Ticker.getInterval is @deprecated. Remove for 1.1+\n\tTicker.getInterval = createjs.deprecate(Ticker._getInterval, \"Ticker.getInterval\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\n\t * @method _setFPS\n\t * @private\n\t * @static\n\t * @param {Number} value\n\t **/\n\tTicker._setFPS = function(value) {\n\t\tTicker._setInterval(1000/value);\n\t};\n\t// Ticker.setFPS is @deprecated. Remove for 1.1+\n\tTicker.setFPS = createjs.deprecate(Ticker._setFPS, \"Ticker.setFPS\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\n\t * @method _getFPS\n\t * @static\n\t * @private\n\t * @return {Number}\n\t **/\n\tTicker._getFPS = function() {\n\t\treturn 1000/Ticker._interval;\n\t};\n\t// Ticker.getFPS is @deprecated. Remove for 1.1+\n\tTicker.getFPS = createjs.deprecate(Ticker._getFPS, \"Ticker.getFPS\");\n\n\t/**\n\t * Indicates the target time (in milliseconds) between ticks. Default is 50 (20 FPS).\n\t * Note that actual time between ticks may be more than specified depending on CPU load.\n\t * This property is ignored if the ticker is using the `RAF` timing mode.\n\t * @property interval\n\t * @static\n\t * @type {Number}\n\t **/\n\t \n\t/**\n\t * Indicates the target frame rate in frames per second (FPS). Effectively just a shortcut to `interval`, where\n\t * `framerate == 1000/interval`.\n\t * @property framerate\n\t * @static\n\t * @type {Number}\n\t **/\n\ttry {\n\t\tObject.defineProperties(Ticker, {\n\t\t\tinterval: { get: Ticker._getInterval, set: Ticker._setInterval },\n\t\t\tframerate: { get: Ticker._getFPS, set: Ticker._setFPS }\n\t\t});\n\t} catch (e) { console.log(e); }\n\n\n// public static methods:\n\t/**\n\t * Starts the tick. This is called automatically when the first listener is added.\n\t * @method init\n\t * @static\n\t **/\n\tTicker.init = function() {\n\t\tif (Ticker._inited) { return; }\n\t\tTicker._inited = true;\n\t\tTicker._times = [];\n\t\tTicker._tickTimes = [];\n\t\tTicker._startTime = Ticker._getTime();\n\t\tTicker._times.push(Ticker._lastTime = 0);\n\t\tTicker.interval = Ticker._interval;\n\t};\n\t\n\t/**\n\t * Stops the Ticker and removes all listeners. Use init() to restart the Ticker.\n\t * @method reset\n\t * @static\n\t **/\n\tTicker.reset = function() {\n\t\tif (Ticker._raf) {\n\t\t\tvar f = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;\n\t\t\tf&&f(Ticker._timerId);\n\t\t} else {\n\t\t\tclearTimeout(Ticker._timerId);\n\t\t}\n\t\tTicker.removeAllEventListeners(\"tick\");\n\t\tTicker._timerId = Ticker._times = Ticker._tickTimes = null;\n\t\tTicker._startTime = Ticker._lastTime = Ticker._ticks = Ticker._pausedTime = 0;\n\t\tTicker._inited = false;\n\t};\n\n\t/**\n\t * Returns the average time spent within a tick. This can vary significantly from the value provided by getMeasuredFPS\n\t * because it only measures the time spent within the tick execution stack. \n\t * \n\t * Example 1: With a target FPS of 20, getMeasuredFPS() returns 20fps, which indicates an average of 50ms between \n\t * the end of one tick and the end of the next. However, getMeasuredTickTime() returns 15ms. This indicates that \n\t * there may be up to 35ms of \"idle\" time between the end of one tick and the start of the next.\n\t *\n\t * Example 2: With a target FPS of 30, {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} returns 10fps, which\n\t * indicates an average of 100ms between the end of one tick and the end of the next. However, {{#crossLink \"Ticker/getMeasuredTickTime\"}}{{/crossLink}}\n\t * returns 20ms. This would indicate that something other than the tick is using ~80ms (another script, DOM\n\t * rendering, etc).\n\t * @method getMeasuredTickTime\n\t * @static\n\t * @param {Number} [ticks] The number of previous ticks over which to measure the average time spent in a tick.\n\t * Defaults to the number of ticks per second. To get only the last tick's time, pass in 1.\n\t * @return {Number} The average time spent in a tick in milliseconds.\n\t **/\n\tTicker.getMeasuredTickTime = function(ticks) {\n\t\tvar ttl=0, times=Ticker._tickTimes;\n\t\tif (!times || times.length < 1) { return -1; }\n\n\t\t// by default, calculate average for the past ~1 second:\n\t\tticks = Math.min(times.length, ticks||(Ticker._getFPS()|0));\n\t\tfor (var i=0; i<ticks; i++) { ttl += times[i]; }\n\t\treturn ttl/ticks;\n\t};\n\n\t/**\n\t * Returns the actual frames / ticks per second.\n\t * @method getMeasuredFPS\n\t * @static\n\t * @param {Number} [ticks] The number of previous ticks over which to measure the actual frames / ticks per second.\n\t * Defaults to the number of ticks per second.\n\t * @return {Number} The actual frames / ticks per second. Depending on performance, this may differ\n\t * from the target frames per second.\n\t **/\n\tTicker.getMeasuredFPS = function(ticks) {\n\t\tvar times = Ticker._times;\n\t\tif (!times || times.length < 2) { return -1; }\n\n\t\t// by default, calculate fps for the past ~1 second:\n\t\tticks = Math.min(times.length-1, ticks||(Ticker._getFPS()|0));\n\t\treturn 1000/((times[0]-times[ticks])/ticks);\n\t};\n\n\t/**\n\t * Returns the number of milliseconds that have elapsed since Ticker was initialized via {{#crossLink \"Ticker/init\"}}.\n\t * Returns -1 if Ticker has not been initialized. For example, you could use\n\t * this in a time synchronized animation to determine the exact amount of time that has elapsed.\n\t * @method getTime\n\t * @static\n\t * @param {Boolean} [runTime=false] If true only time elapsed while Ticker was not paused will be returned.\n\t * If false, the value returned will be total time elapsed since the first tick event listener was added.\n\t * @return {Number} Number of milliseconds that have elapsed since Ticker was initialized or -1.\n\t **/\n\tTicker.getTime = function(runTime) {\n\t\treturn Ticker._startTime ? Ticker._getTime() - (runTime ? Ticker._pausedTime : 0) : -1;\n\t};\n\n\t/**\n\t * Similar to the {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} method, but returns the time on the most recent {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\n\t * event object.\n\t * @method getEventTime\n\t * @static\n\t * @param runTime {Boolean} [runTime=false] If true, the runTime property will be returned instead of time.\n\t * @returns {number} The time or runTime property from the most recent tick event or -1.\n\t */\n\tTicker.getEventTime = function(runTime) {\n\t\treturn Ticker._startTime ? (Ticker._lastTime || Ticker._startTime) - (runTime ? Ticker._pausedTime : 0) : -1;\n\t};\n\t\n\t/**\n\t * Returns the number of ticks that have been broadcast by Ticker.\n\t * @method getTicks\n\t * @static\n\t * @param {Boolean} pauseable Indicates whether to include ticks that would have been broadcast\n\t * while Ticker was paused. If true only tick events broadcast while Ticker is not paused will be returned.\n\t * If false, tick events that would have been broadcast while Ticker was paused will be included in the return\n\t * value. The default value is false.\n\t * @return {Number} of ticks that have been broadcast.\n\t **/\n\tTicker.getTicks = function(pauseable) {\n\t\treturn  Ticker._ticks - (pauseable ? Ticker._pausedTicks : 0);\n\t};\n\n\n// private static methods:\n\t/**\n\t * @method _handleSynch\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleSynch = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\n\t\t// run if enough time has elapsed, with a little bit of flexibility to be early:\n\t\tif (Ticker._getTime() - Ticker._lastTime >= (Ticker._interval-1)*0.97) {\n\t\t\tTicker._tick();\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleRAF\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleRAF = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\t\tTicker._tick();\n\t};\n\n\t/**\n\t * @method _handleTimeout\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleTimeout = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\t\tTicker._tick();\n\t};\n\n\t/**\n\t * @method _setupTick\n\t * @static\n\t * @private\n\t **/\n\tTicker._setupTick = function() {\n\t\tif (Ticker._timerId != null) { return; } // avoid duplicates\n\n\t\tvar mode = Ticker.timingMode;\n\t\tif (mode == Ticker.RAF_SYNCHED || mode == Ticker.RAF) {\n\t\t\tvar f = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;\n\t\t\tif (f) {\n\t\t\t\tTicker._timerId = f(mode == Ticker.RAF ? Ticker._handleRAF : Ticker._handleSynch);\n\t\t\t\tTicker._raf = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tTicker._raf = false;\n\t\tTicker._timerId = setTimeout(Ticker._handleTimeout, Ticker._interval);\n\t};\n\n\t/**\n\t * @method _tick\n\t * @static\n\t * @private\n\t **/\n\tTicker._tick = function() {\n\t\tvar paused = Ticker.paused;\n\t\tvar time = Ticker._getTime();\n\t\tvar elapsedTime = time-Ticker._lastTime;\n\t\tTicker._lastTime = time;\n\t\tTicker._ticks++;\n\t\t\n\t\tif (paused) {\n\t\t\tTicker._pausedTicks++;\n\t\t\tTicker._pausedTime += elapsedTime;\n\t\t}\n\t\t\n\t\tif (Ticker.hasEventListener(\"tick\")) {\n\t\t\tvar event = new createjs.Event(\"tick\");\n\t\t\tvar maxDelta = Ticker.maxDelta;\n\t\t\tevent.delta = (maxDelta && elapsedTime > maxDelta) ? maxDelta : elapsedTime;\n\t\t\tevent.paused = paused;\n\t\t\tevent.time = time;\n\t\t\tevent.runTime = time-Ticker._pausedTime;\n\t\t\tTicker.dispatchEvent(event);\n\t\t}\n\t\t\n\t\tTicker._tickTimes.unshift(Ticker._getTime()-time);\n\t\twhile (Ticker._tickTimes.length > 100) { Ticker._tickTimes.pop(); }\n\n\t\tTicker._times.unshift(time);\n\t\twhile (Ticker._times.length > 100) { Ticker._times.pop(); }\n\t};\n\n\t/**\n\t * @method _getTime\n\t * @static\n\t * @private\n\t **/\n\tvar w=window, now=w.performance.now || w.performance.mozNow || w.performance.msNow || w.performance.oNow || w.performance.webkitNow;\n\tTicker._getTime = function() {\n\t\treturn ((now&&now.call(w.performance))||(new Date().getTime())) - Ticker._startTime;\n\t};\n\n\n\tcreatejs.Ticker = Ticker;\n}());\n\n//##############################################################################\n// VideoBuffer.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available.\n\t * This can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves\n\t * this issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.\n\t * \n\t * \tvar myBuffer = new createjs.VideoBuffer(myVideo);\n\t * \tvar myBitmap = new Bitmap(myBuffer);\n\t * \n\t * @class VideoBuffer\n\t * @param {HTMLVideoElement} video The HTML video element to buffer.\n\t * @constructor\n\t **/\n\tfunction VideoBuffer(video) {\n\t\t\n\t// private properties:\n\t\t/**\n\t\t * Used by Bitmap to determine when the video buffer is ready to be drawn. Not intended for general use.\n\t\t * @property readyState\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.readyState = video.readyState;\n\t\t\n\t\t/**\n\t\t * @property _video\n\t\t * @protected\n\t\t * @type {HTMLVideoElement}\n\t\t * @default 0\n\t\t **/\n\t\tthis._video = video;\n\t\t\n\t\t/**\n\t\t * @property _canvas\n\t\t * @protected\n\t\t * @type {HTMLCanvasElement}\n\t\t * @default 0\n\t\t **/\n\t\tthis._canvas = null;\n\t\t\n\t\t/**\n\t\t * @property _lastTime\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default -1\n\t\t **/\n\t\tthis._lastTime = -1;\n\t\t\n\t\tif (this.readyState < 2) { video.addEventListener(\"canplaythrough\", this._videoReady.bind(this)); } //once:true isn't supported everywhere, but its a non-critical optimization here.\n\t}\n\tvar p = VideoBuffer.prototype;\n\t\n\t\n// public methods:\n\t/**\n\t * Gets an HTML canvas element showing the current video frame, or the previous frame if in a seek / loop.\n\t * Primarily for use by {{#crossLink \"Bitmap\"}}{{/crossLink}}.\n\t * @method getImage\n\t **/\n\tp.getImage = function() {\n\t\tif (this.readyState < 2) { return; }\n\t\tvar canvas=this._canvas, video = this._video;\n\t\tif (!canvas) {\n\t\t\tcanvas = this._canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\n\t\t\tcanvas.width = video.videoWidth;\n\t\t\tcanvas.height = video.videoHeight;\n\t\t}\n\t\tif (video.readyState >= 2 && video.currentTime !== this._lastTime) {\n\t\t\tvar ctx = canvas.getContext(\"2d\");\n\t\t\tctx.clearRect(0,0,canvas.width,canvas.height);\n\t\t\tctx.drawImage(video,0,0,canvas.width,canvas.height);\n\t\t\tthis._lastTime = video.currentTime;\n\t\t}\n\t\treturn canvas;\n\t};\n\t\n// private methods:\n\t/**\n\t * @method _videoReady\n\t * @protected\n\t **/\n\tp._videoReady = function() {\n\t\tthis.readyState = 2;\n\t};\n\n\n\tcreatejs.VideoBuffer = VideoBuffer;\n}());\n\n//##############################################################################\n// MouseEvent.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Passed as the parameter to all mouse/pointer/touch related events. For a listing of mouse events and their properties,\n\t * see the {{#crossLink \"DisplayObject\"}}{{/crossLink}} and {{#crossLink \"Stage\"}}{{/crossLink}} event listings.\n\t * @class MouseEvent\n\t * @param {String} type The event type.\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\n\t * @param {Number} stageX The normalized x position relative to the stage.\n\t * @param {Number} stageY The normalized y position relative to the stage.\n\t * @param {MouseEvent} nativeEvent The native DOM event related to this mouse event.\n\t * @param {Number} pointerID The unique id for the pointer.\n\t * @param {Boolean} primary Indicates whether this is the primary pointer in a multitouch environment.\n\t * @param {Number} rawX The raw x position relative to the stage.\n\t * @param {Number} rawY The raw y position relative to the stage.\n\t * @param {DisplayObject} relatedTarget The secondary target for the event.\n\t * @extends Event\n\t * @constructor\n\t **/\n\tfunction MouseEvent(type, bubbles, cancelable, stageX, stageY, nativeEvent, pointerID, primary, rawX, rawY, relatedTarget) {\n\t\tthis.Event_constructor(type, bubbles, cancelable);\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The normalized x position on the stage. This will always be within the range 0 to stage width.\n\t\t * @property stageX\n\t\t * @type Number\n\t\t*/\n\t\tthis.stageX = stageX;\n\t\n\t\t/**\n\t\t * The normalized y position on the stage. This will always be within the range 0 to stage height.\n\t\t * @property stageY\n\t\t * @type Number\n\t\t **/\n\t\tthis.stageY = stageY;\n\t\n\t\t/**\n\t\t * The raw x position relative to the stage. Normally this will be the same as the stageX value, unless\n\t\t * stage.mouseMoveOutside is true and the pointer is outside of the stage bounds.\n\t\t * @property rawX\n\t\t * @type Number\n\t\t*/\n\t\tthis.rawX = (rawX==null)?stageX:rawX;\n\t\n\t\t/**\n\t\t * The raw y position relative to the stage. Normally this will be the same as the stageY value, unless\n\t\t * stage.mouseMoveOutside is true and the pointer is outside of the stage bounds.\n\t\t * @property rawY\n\t\t * @type Number\n\t\t*/\n\t\tthis.rawY = (rawY==null)?stageY:rawY;\n\t\n\t\t/**\n\t\t * The native MouseEvent generated by the browser. The properties and API for this\n\t\t * event may differ between browsers. This property will be null if the\n\t\t * EaselJS property was not directly generated from a native MouseEvent.\n\t\t * @property nativeEvent\n\t\t * @type HtmlMouseEvent\n\t\t * @default null\n\t\t **/\n\t\tthis.nativeEvent = nativeEvent;\n\t\n\t\t/**\n\t\t * The unique id for the pointer (touch point or cursor). This will be either -1 for the mouse, or the system\n\t\t * supplied id value.\n\t\t * @property pointerID\n\t\t * @type {Number}\n\t\t */\n\t\tthis.pointerID = pointerID;\n\t\n\t\t/**\n\t\t * Indicates whether this is the primary pointer in a multitouch environment. This will always be true for the mouse.\n\t\t * For touch pointers, the first pointer in the current stack will be considered the primary pointer.\n\t\t * @property primary\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.primary = !!primary;\n\t\t\n\t\t/**\n\t\t * The secondary target for the event, if applicable. This is used for mouseout/rollout\n\t\t * events to indicate the object that the mouse entered from, mouseover/rollover for the object the mouse exited,\n\t\t * and stagemousedown/stagemouseup events for the object that was the under the cursor, if any.\n\t\t * \n\t\t * Only valid interaction targets will be returned (ie. objects with mouse listeners or a cursor set).\n\t\t * @property relatedTarget\n\t\t * @type {DisplayObject}\n\t\t */\n\t\tthis.relatedTarget = relatedTarget;\n\t}\n\tvar p = createjs.extend(MouseEvent, createjs.Event);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\t\n\t\n// getter / setters:\n\t/**\n\t * Returns the x position of the mouse in the local coordinate system of the current target (ie. the dispatcher).\n\t * @property localX\n\t * @type {Number}\n\t * @readonly\n\t */\n\tp._get_localX = function() {\n\t\treturn this.currentTarget.globalToLocal(this.rawX, this.rawY).x;\n\t};\n\t\n\t/**\n\t * Returns the y position of the mouse in the local coordinate system of the current target (ie. the dispatcher).\n\t * @property localY\n\t * @type {Number}\n\t * @readonly\n\t */\n\tp._get_localY = function() {\n\t\treturn this.currentTarget.globalToLocal(this.rawX, this.rawY).y;\n\t};\n\t\n\t/**\n\t * Indicates whether the event was generated by a touch input (versus a mouse input).\n\t * @property isTouch\n\t * @type {Boolean}\n\t * @readonly\n\t */\n\tp._get_isTouch = function() {\n\t\treturn this.pointerID !== -1;\n\t};\n\t\n\t\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tlocalX: { get: p._get_localX },\n\t\t\tlocalY: { get: p._get_localY },\n\t\t\tisTouch: { get: p._get_isTouch }\n\t\t});\n\t} catch (e) {} // TODO: use Log\n\n\n// public methods:\n\t/**\n\t * Returns a clone of the MouseEvent instance.\n\t * @method clone\n\t * @return {MouseEvent} a clone of the MouseEvent instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new MouseEvent(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY);\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[MouseEvent (type=\"+this.type+\" stageX=\"+this.stageX+\" stageY=\"+this.stageY+\")]\";\n\t};\n\n\n\tcreatejs.MouseEvent = createjs.promote(MouseEvent, \"Event\");\n}());\n\n//##############################################################################\n// Matrix2D.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Represents an affine transformation matrix, and provides tools for constructing and concatenating matrices.\n\t *\n\t * This matrix can be visualized as:\n\t *\n\t * \t[ a  c  tx\n\t * \t  b  d  ty\n\t * \t  0  0  1  ]\n\t *\n\t * Note the locations of b and c.\n\t *\n\t * @class Matrix2D\n\t * @param {Number} [a=1] Specifies the a property for the new matrix.\n\t * @param {Number} [b=0] Specifies the b property for the new matrix.\n\t * @param {Number} [c=0] Specifies the c property for the new matrix.\n\t * @param {Number} [d=1] Specifies the d property for the new matrix.\n\t * @param {Number} [tx=0] Specifies the tx property for the new matrix.\n\t * @param {Number} [ty=0] Specifies the ty property for the new matrix.\n\t * @constructor\n\t **/\n\tfunction Matrix2D(a, b, c, d, tx, ty) {\n\t\tthis.setValues(a,b,c,d,tx,ty);\n\t\t\n\t// public properties:\n\t\t// assigned in the setValues method.\n\t\t/**\n\t\t * Position (0, 0) in a 3x3 affine transformation matrix.\n\t\t * @property a\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Position (0, 1) in a 3x3 affine transformation matrix.\n\t\t * @property b\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Position (1, 0) in a 3x3 affine transformation matrix.\n\t\t * @property c\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Position (1, 1) in a 3x3 affine transformation matrix.\n\t\t * @property d\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Position (2, 0) in a 3x3 affine transformation matrix.\n\t\t * @property tx\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Position (2, 1) in a 3x3 affine transformation matrix.\n\t\t * @property ty\n\t\t * @type Number\n\t\t **/\n\t}\n\tvar p = Matrix2D.prototype;\n\n// constants:\n\t/**\n\t * Multiplier for converting degrees to radians. Used internally by Matrix2D.\n\t * @property DEG_TO_RAD\n\t * @static\n\t * @final\n\t * @type Number\n\t * @readonly\n\t **/\n\tMatrix2D.DEG_TO_RAD = Math.PI/180;\n\n\n// static public properties:\n\t/**\n\t * An identity matrix, representing a null transformation.\n\t * @property identity\n\t * @static\n\t * @type Matrix2D\n\t * @readonly\n\t **/\n\tMatrix2D.identity = null; // set at bottom of class definition.\n\t\n\n// public methods:\n\t/**\n\t * Sets the specified values on this instance. \n\t * @method setValues\n\t * @param {Number} [a=1] Specifies the a property for the new matrix.\n\t * @param {Number} [b=0] Specifies the b property for the new matrix.\n\t * @param {Number} [c=0] Specifies the c property for the new matrix.\n\t * @param {Number} [d=1] Specifies the d property for the new matrix.\n\t * @param {Number} [tx=0] Specifies the tx property for the new matrix.\n\t * @param {Number} [ty=0] Specifies the ty property for the new matrix.\n\t * @return {Matrix2D} This instance. Useful for chaining method calls.\n\t*/\n\tp.setValues = function(a, b, c, d, tx, ty) {\n\t\t// don't forget to update docs in the constructor if these change:\n\t\tthis.a = (a == null) ? 1 : a;\n\t\tthis.b = b || 0;\n\t\tthis.c = c || 0;\n\t\tthis.d = (d == null) ? 1 : d;\n\t\tthis.tx = tx || 0;\n\t\tthis.ty = ty || 0;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Appends the specified matrix properties to this matrix. All parameters are required.\n\t * This is the equivalent of multiplying `(this matrix) * (specified matrix)`.\n\t * @method append\n\t * @param {Number} a\n\t * @param {Number} b\n\t * @param {Number} c\n\t * @param {Number} d\n\t * @param {Number} tx\n\t * @param {Number} ty\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.append = function(a, b, c, d, tx, ty) {\n\t\tvar a1 = this.a;\n\t\tvar b1 = this.b;\n\t\tvar c1 = this.c;\n\t\tvar d1 = this.d;\n\t\tif (a != 1 || b != 0 || c != 0 || d != 1) {\n\t\t\tthis.a  = a1*a+c1*b;\n\t\t\tthis.b  = b1*a+d1*b;\n\t\t\tthis.c  = a1*c+c1*d;\n\t\t\tthis.d  = b1*c+d1*d;\n\t\t}\n\t\tthis.tx = a1*tx+c1*ty+this.tx;\n\t\tthis.ty = b1*tx+d1*ty+this.ty;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Prepends the specified matrix properties to this matrix.\n\t * This is the equivalent of multiplying `(specified matrix) * (this matrix)`.\n\t * All parameters are required.\n\t * @method prepend\n\t * @param {Number} a\n\t * @param {Number} b\n\t * @param {Number} c\n\t * @param {Number} d\n\t * @param {Number} tx\n\t * @param {Number} ty\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.prepend = function(a, b, c, d, tx, ty) {\n\t\tvar a1 = this.a;\n\t\tvar c1 = this.c;\n\t\tvar tx1 = this.tx;\n\n\t\tthis.a  = a*a1+c*this.b;\n\t\tthis.b  = b*a1+d*this.b;\n\t\tthis.c  = a*c1+c*this.d;\n\t\tthis.d  = b*c1+d*this.d;\n\t\tthis.tx = a*tx1+c*this.ty+tx;\n\t\tthis.ty = b*tx1+d*this.ty+ty;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Appends the specified matrix to this matrix.\n\t * This is the equivalent of multiplying `(this matrix) * (specified matrix)`.\n\t * @method appendMatrix\n\t * @param {Matrix2D} matrix\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.appendMatrix = function(matrix) {\n\t\treturn this.append(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\n\t};\n\n\t/**\n\t * Prepends the specified matrix to this matrix.\n\t * This is the equivalent of multiplying `(specified matrix) * (this matrix)`.\n\t * For example, you could calculate the combined transformation for a child object using:\n\t * \n\t * \tvar o = myDisplayObject;\n\t * \tvar mtx = o.getMatrix();\n\t * \twhile (o = o.parent) {\n\t * \t\t// prepend each parent's transformation in turn:\n\t * \t\to.prependMatrix(o.getMatrix());\n\t * \t}\n\t * @method prependMatrix\n\t * @param {Matrix2D} matrix\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.prependMatrix = function(matrix) {\n\t\treturn this.prepend(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\n\t};\n\n\t/**\n\t * Generates matrix properties from the specified display object transform properties, and appends them to this matrix.\n\t * For example, you can use this to generate a matrix representing the transformations of a display object:\n\t * \n\t * \tvar mtx = new createjs.Matrix2D();\n\t * \tmtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation);\n\t * @method appendTransform\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} scaleX\n\t * @param {Number} scaleY\n\t * @param {Number} rotation\n\t * @param {Number} skewX\n\t * @param {Number} skewY\n\t * @param {Number} regX Optional.\n\t * @param {Number} regY Optional.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.appendTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\n\t\tif (rotation%360) {\n\t\t\tvar r = rotation*Matrix2D.DEG_TO_RAD;\n\t\t\tvar cos = Math.cos(r);\n\t\t\tvar sin = Math.sin(r);\n\t\t} else {\n\t\t\tcos = 1;\n\t\t\tsin = 0;\n\t\t}\n\n\t\tif (skewX || skewY) {\n\t\t\t// TODO: can this be combined into a single append operation?\n\t\t\tskewX *= Matrix2D.DEG_TO_RAD;\n\t\t\tskewY *= Matrix2D.DEG_TO_RAD;\n\t\t\tthis.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), x, y);\n\t\t\tthis.append(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, 0, 0);\n\t\t} else {\n\t\t\tthis.append(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, x, y);\n\t\t}\n\t\t\n\t\tif (regX || regY) {\n\t\t\t// append the registration offset:\n\t\t\tthis.tx -= regX*this.a+regY*this.c; \n\t\t\tthis.ty -= regX*this.b+regY*this.d;\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Generates matrix properties from the specified display object transform properties, and prepends them to this matrix.\n\t * For example, you could calculate the combined transformation for a child object using:\n\t * \n\t * \tvar o = myDisplayObject;\n\t * \tvar mtx = new createjs.Matrix2D();\n\t * \tdo  {\n\t * \t\t// prepend each parent's transformation in turn:\n\t * \t\tmtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);\n\t * \t} while (o = o.parent);\n\t * \t\n\t * \tNote that the above example would not account for {{#crossLink \"DisplayObject/transformMatrix:property\"}}{{/crossLink}}\n\t * \tvalues. See {{#crossLink \"Matrix2D/prependMatrix\"}}{{/crossLink}} for an example that does.\n\t * @method prependTransform\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} scaleX\n\t * @param {Number} scaleY\n\t * @param {Number} rotation\n\t * @param {Number} skewX\n\t * @param {Number} skewY\n\t * @param {Number} regX Optional.\n\t * @param {Number} regY Optional.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.prependTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\n\t\tif (rotation%360) {\n\t\t\tvar r = rotation*Matrix2D.DEG_TO_RAD;\n\t\t\tvar cos = Math.cos(r);\n\t\t\tvar sin = Math.sin(r);\n\t\t} else {\n\t\t\tcos = 1;\n\t\t\tsin = 0;\n\t\t}\n\n\t\tif (regX || regY) {\n\t\t\t// prepend the registration offset:\n\t\t\tthis.tx -= regX; this.ty -= regY;\n\t\t}\n\t\tif (skewX || skewY) {\n\t\t\t// TODO: can this be combined into a single prepend operation?\n\t\t\tskewX *= Matrix2D.DEG_TO_RAD;\n\t\t\tskewY *= Matrix2D.DEG_TO_RAD;\n\t\t\tthis.prepend(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, 0, 0);\n\t\t\tthis.prepend(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), x, y);\n\t\t} else {\n\t\t\tthis.prepend(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, x, y);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Applies a clockwise rotation transformation to the matrix.\n\t * @method rotate\n\t * @param {Number} angle The angle to rotate by, in degrees. To use a value in radians, multiply it by `180/Math.PI`.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.rotate = function(angle) {\n\t\tangle = angle*Matrix2D.DEG_TO_RAD;\n\t\tvar cos = Math.cos(angle);\n\t\tvar sin = Math.sin(angle);\n\n\t\tvar a1 = this.a;\n\t\tvar b1 = this.b;\n\n\t\tthis.a = a1*cos+this.c*sin;\n\t\tthis.b = b1*cos+this.d*sin;\n\t\tthis.c = -a1*sin+this.c*cos;\n\t\tthis.d = -b1*sin+this.d*cos;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Applies a skew transformation to the matrix.\n\t * @method skew\n\t * @param {Number} skewX The amount to skew horizontally in degrees. To use a value in radians, multiply it by `180/Math.PI`.\n\t * @param {Number} skewY The amount to skew vertically in degrees.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t*/\n\tp.skew = function(skewX, skewY) {\n\t\tskewX = skewX*Matrix2D.DEG_TO_RAD;\n\t\tskewY = skewY*Matrix2D.DEG_TO_RAD;\n\t\tthis.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), 0, 0);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Applies a scale transformation to the matrix.\n\t * @method scale\n\t * @param {Number} x The amount to scale horizontally. E.G. a value of 2 will double the size in the X direction, and 0.5 will halve it.\n\t * @param {Number} y The amount to scale vertically.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.scale = function(x, y) {\n\t\tthis.a *= x;\n\t\tthis.b *= x;\n\t\tthis.c *= y;\n\t\tthis.d *= y;\n\t\t//this.tx *= x;\n\t\t//this.ty *= y;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Translates the matrix on the x and y axes.\n\t * @method translate\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.translate = function(x, y) {\n\t\tthis.tx += this.a*x + this.c*y;\n\t\tthis.ty += this.b*x + this.d*y;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Sets the properties of the matrix to those of an identity matrix (one that applies a null transformation).\n\t * @method identity\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.identity = function() {\n\t\tthis.a = this.d = 1;\n\t\tthis.b = this.c = this.tx = this.ty = 0;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Inverts the matrix, causing it to perform the opposite transformation.\n\t * @method invert\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t **/\n\tp.invert = function() {\n\t\tvar a1 = this.a;\n\t\tvar b1 = this.b;\n\t\tvar c1 = this.c;\n\t\tvar d1 = this.d;\n\t\tvar tx1 = this.tx;\n\t\tvar n = a1*d1-b1*c1;\n\n\t\tthis.a = d1/n;\n\t\tthis.b = -b1/n;\n\t\tthis.c = -c1/n;\n\t\tthis.d = a1/n;\n\t\tthis.tx = (c1*this.ty-d1*tx1)/n;\n\t\tthis.ty = -(a1*this.ty-b1*tx1)/n;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns true if the matrix is an identity matrix.\n\t * @method isIdentity\n\t * @return {Boolean}\n\t **/\n\tp.isIdentity = function() {\n\t\treturn this.tx === 0 && this.ty === 0 && this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1;\n\t};\n\t\n\t/**\n\t * Returns true if this matrix is equal to the specified matrix (all property values are equal).\n\t * @method equals\n\t * @param {Matrix2D} matrix The matrix to compare.\n\t * @return {Boolean}\n\t **/\n\tp.equals = function(matrix) {\n\t\treturn this.tx === matrix.tx && this.ty === matrix.ty && this.a === matrix.a && this.b === matrix.b && this.c === matrix.c && this.d === matrix.d;\n\t};\n\n\t/**\n\t * Transforms a point according to this matrix.\n\t * @method transformPoint\n\t * @param {Number} x The x component of the point to transform.\n\t * @param {Number} y The y component of the point to transform.\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a generic object with x/y properties will be returned.\n\t * @return {Point} This matrix. Useful for chaining method calls.\n\t **/\n\tp.transformPoint = function(x, y, pt) {\n\t\tpt = pt||{};\n\t\tpt.x = x*this.a+y*this.c+this.tx;\n\t\tpt.y = x*this.b+y*this.d+this.ty;\n\t\treturn pt;\n\t};\n\n\t/**\n\t * Decomposes the matrix into transform properties (x, y, scaleX, scaleY, and rotation). Note that these values\n\t * may not match the transform properties you used to generate the matrix, though they will produce the same visual\n\t * results.\n\t * @method decompose\n\t * @param {Object} target The object to apply the transform properties to. If null, then a new object will be returned.\n\t * @return {Object} The target, or a new generic object with the transform properties applied.\n\t*/\n\tp.decompose = function(target) {\n\t\t// TODO: it would be nice to be able to solve for whether the matrix can be decomposed into only scale/rotation even when scale is negative\n\t\tif (target == null) { target = {}; }\n\t\ttarget.x = this.tx;\n\t\ttarget.y = this.ty;\n\t\ttarget.scaleX = Math.sqrt(this.a * this.a + this.b * this.b);\n\t\ttarget.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);\n\n\t\tvar skewX = Math.atan2(-this.c, this.d);\n\t\tvar skewY = Math.atan2(this.b, this.a);\n\n\t\tvar delta = Math.abs(1-skewX/skewY);\n\t\tif (delta < 0.00001) { // effectively identical, can use rotation:\n\t\t\ttarget.rotation = skewY/Matrix2D.DEG_TO_RAD;\n\t\t\tif (this.a < 0 && this.d >= 0) {\n\t\t\t\ttarget.rotation += (target.rotation <= 0) ? 180 : -180;\n\t\t\t}\n\t\t\ttarget.skewX = target.skewY = 0;\n\t\t} else {\n\t\t\ttarget.skewX = skewX/Matrix2D.DEG_TO_RAD;\n\t\t\ttarget.skewY = skewY/Matrix2D.DEG_TO_RAD;\n\t\t}\n\t\treturn target;\n\t};\n\t\n\t/**\n\t * Copies all properties from the specified matrix to this matrix.\n\t * @method copy\n\t * @param {Matrix2D} matrix The matrix to copy properties from.\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\n\t*/\n\tp.copy = function(matrix) {\n\t\treturn this.setValues(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\n\t};\n\n\t/**\n\t * Returns a clone of the Matrix2D instance.\n\t * @method clone\n\t * @return {Matrix2D} a clone of the Matrix2D instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Matrix2D(this.a, this.b, this.c, this.d, this.tx, this.ty);\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Matrix2D (a=\"+this.a+\" b=\"+this.b+\" c=\"+this.c+\" d=\"+this.d+\" tx=\"+this.tx+\" ty=\"+this.ty+\")]\";\n\t};\n\n\t// this has to be populated after the class is defined:\n\tMatrix2D.identity = new Matrix2D();\n\n\n\tcreatejs.Matrix2D = Matrix2D;\n}());\n\n//##############################################################################\n// DisplayProps.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * Used for calculating and encapsulating display related properties.\n\t * @class DisplayProps\n\t * @param {Number} [visible=true] Visible value.\n\t * @param {Number} [alpha=1] Alpha value.\n\t * @param {Number} [shadow=null] A Shadow instance or null.\n\t * @param {Number} [compositeOperation=null] A compositeOperation value or null.\n\t * @param {Number} [matrix] A transformation matrix. Defaults to a new identity matrix.\n\t * @constructor\n\t **/\n\tfunction DisplayProps(visible, alpha, shadow, compositeOperation, matrix) {\n\t\tthis.setValues(visible, alpha, shadow, compositeOperation, matrix);\n\t\t\n\t// public properties:\n\t\t// assigned in the setValues method.\n\t\t/**\n\t\t * Property representing the alpha that will be applied to a display object.\n\t\t * @property alpha\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Property representing the shadow that will be applied to a display object.\n\t\t * @property shadow\n\t\t * @type Shadow\n\t\t **/\n\t\n\t\t/**\n\t\t * Property representing the compositeOperation that will be applied to a display object.\n\t\t * You can find a list of valid composite operations at:\n\t\t * <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing\">https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing</a>\n\t\t * @property compositeOperation\n\t\t * @type String\n\t\t **/\n\t\t\n\t\t/**\n\t\t * Property representing the value for visible that will be applied to a display object.\n\t\t * @property visible\n\t\t * @type Boolean\n\t\t **/\n\t\t\n\t\t/**\n\t\t * The transformation matrix that will be applied to a display object.\n\t\t * @property matrix\n\t\t * @type Matrix2D\n\t\t **/\n\t}\n\tvar p = DisplayProps.prototype;\n\n// initialization:\n\t/**\n\t * Reinitializes the instance with the specified values.\n\t * @method setValues\n\t * @param {Number} [visible=true] Visible value.\n\t * @param {Number} [alpha=1] Alpha value.\n\t * @param {Number} [shadow=null] A Shadow instance or null.\n\t * @param {Number} [compositeOperation=null] A compositeOperation value or null.\n\t * @param {Number} [matrix] A transformation matrix. Defaults to an identity matrix.\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.setValues = function (visible, alpha, shadow, compositeOperation, matrix) {\n\t\tthis.visible = visible == null ? true : !!visible;\n\t\tthis.alpha = alpha == null ? 1 : alpha;\n\t\tthis.shadow = shadow;\n\t\tthis.compositeOperation = compositeOperation;\n\t\tthis.matrix = matrix || (this.matrix&&this.matrix.identity()) || new createjs.Matrix2D();\n\t\treturn this;\n\t};\n\n// public methods:\n\t/**\n\t * Appends the specified display properties. This is generally used to apply a child's properties its parent's.\n\t * @method append\n\t * @param {Boolean} visible desired visible value\n\t * @param {Number} alpha desired alpha value\n\t * @param {Shadow} shadow desired shadow value\n\t * @param {String} compositeOperation desired composite operation value\n\t * @param {Matrix2D} [matrix] a Matrix2D instance\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.append = function(visible, alpha, shadow, compositeOperation, matrix) {\n\t\tthis.alpha *= alpha;\n\t\tthis.shadow = shadow || this.shadow;\n\t\tthis.compositeOperation = compositeOperation || this.compositeOperation;\n\t\tthis.visible = this.visible && visible;\n\t\tmatrix&&this.matrix.appendMatrix(matrix);\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Prepends the specified display properties. This is generally used to apply a parent's properties to a child's.\n\t * For example, to get the combined display properties that would be applied to a child, you could use:\n\t * \n\t * \tvar o = myDisplayObject;\n\t * \tvar props = new createjs.DisplayProps();\n\t * \tdo {\n\t * \t\t// prepend each parent's props in turn:\n\t * \t\tprops.prepend(o.visible, o.alpha, o.shadow, o.compositeOperation, o.getMatrix());\n\t * \t} while (o = o.parent);\n\t * \t\n\t * @method prepend\n\t * @param {Boolean} visible desired visible value\n\t * @param {Number} alpha desired alpha value\n\t * @param {Shadow} shadow desired shadow value\n\t * @param {String} compositeOperation desired composite operation value\n\t * @param {Matrix2D} [matrix] a Matrix2D instance\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.prepend = function(visible, alpha, shadow, compositeOperation, matrix) {\n\t\tthis.alpha *= alpha;\n\t\tthis.shadow = this.shadow || shadow;\n\t\tthis.compositeOperation = this.compositeOperation || compositeOperation;\n\t\tthis.visible = this.visible && visible;\n\t\tmatrix&&this.matrix.prependMatrix(matrix);\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Resets this instance and its matrix to default values.\n\t * @method identity\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.identity = function() {\n\t\tthis.visible = true;\n\t\tthis.alpha = 1;\n\t\tthis.shadow = this.compositeOperation = null;\n\t\tthis.matrix.identity();\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Returns a clone of the DisplayProps instance. Clones the associated matrix.\n\t * @method clone\n\t * @return {DisplayProps} a clone of the DisplayProps instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new DisplayProps(this.alpha, this.shadow, this.compositeOperation, this.visible, this.matrix.clone());\n\t};\n\n// private methods:\n\n\tcreatejs.DisplayProps = DisplayProps;\n})();\n\n//##############################################################################\n// Point.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Represents a point on a 2 dimensional x / y coordinate system.\n\t *\n\t * <h4>Example</h4>\n\t * \n\t *      var point = new createjs.Point(0, 100);\n\t * \n\t * @class Point\n\t * @param {Number} [x=0] X position.\n\t * @param {Number} [y=0] Y position.\n\t * @constructor\n\t **/\n\tfunction Point(x, y) {\n\t \tthis.setValues(x, y);\n\t \t\n\t \t\n\t// public properties:\n\t\t// assigned in the setValues method.\n\t\t/**\n\t\t * X position.\n\t\t * @property x\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Y position.\n\t\t * @property y\n\t\t * @type Number\n\t\t **/\n\t}\n\tvar p = Point.prototype;\n\t\n// public methods:\n\t/** \n\t * Sets the specified values on this instance.\n\t * @method setValues\n\t * @param {Number} [x=0] X position.\n\t * @param {Number} [y=0] Y position.\n\t * @return {Point} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.setValues = function(x, y) {\n\t\tthis.x = x||0;\n\t\tthis.y = y||0;\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Copies all properties from the specified point to this point.\n\t * @method copy\n\t * @param {Point} point The point to copy properties from.\n\t * @return {Point} This point. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.copy = function(point) {\n\t\tthis.x = point.x;\n\t\tthis.y = point.y;\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Point instance.\n\t * @method clone\n\t * @return {Point} a clone of the Point instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Point(this.x, this.y);\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Point (x=\"+this.x+\" y=\"+this.y+\")]\";\n\t};\n\t\n\t\n\tcreatejs.Point = Point;\n}());\n\n//##############################################################################\n// Rectangle.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Represents a rectangle as defined by the points (x, y) and (x+width, y+height).\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var rect = new createjs.Rectangle(0, 0, 100, 100);\n\t *\n\t * @class Rectangle\n\t * @param {Number} [x=0] X position.\n\t * @param {Number} [y=0] Y position.\n\t * @param {Number} [width=0] The width of the Rectangle.\n\t * @param {Number} [height=0] The height of the Rectangle.\n\t * @constructor\n\t **/\n\tfunction Rectangle(x, y, width, height) {\n\t\tthis.setValues(x, y, width, height);\n\t\t\n\t\t\n\t// public properties:\n\t\t// assigned in the setValues method.\n\t\t/**\n\t\t * X position.\n\t\t * @property x\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Y position.\n\t\t * @property y\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Width.\n\t\t * @property width\n\t\t * @type Number\n\t\t **/\n\t\n\t\t/**\n\t\t * Height.\n\t\t * @property height\n\t\t * @type Number\n\t\t **/\n\t}\n\tvar p = Rectangle.prototype;\n\n// public methods:\n\t/** \n\t * Sets the specified values on this instance.\n\t * @method setValues\n\t * @param {Number} [x=0] X position.\n\t * @param {Number} [y=0] Y position.\n\t * @param {Number} [width=0] The width of the Rectangle.\n\t * @param {Number} [height=0] The height of the Rectangle.\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.setValues = function(x, y, width, height) {\n\t\t// don't forget to update docs in the constructor if these change:\n\t\tthis.x = x||0;\n\t\tthis.y = y||0;\n\t\tthis.width = width||0;\n\t\tthis.height = height||0;\n\t\treturn this;\n\t};\n\t\n\t/** \n\t * Extends the rectangle's bounds to include the described point or rectangle.\n\t * @method extend\n\t * @param {Number} x X position of the point or rectangle.\n\t * @param {Number} y Y position of the point or rectangle.\n\t * @param {Number} [width=0] The width of the rectangle.\n\t * @param {Number} [height=0] The height of the rectangle.\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.extend = function(x, y, width, height) {\n\t\twidth = width||0;\n\t\theight = height||0;\n\t\tif (x+width > this.x+this.width) { this.width = x+width-this.x; }\n\t\tif (y+height > this.y+this.height) { this.height = y+height-this.y; }\n\t\tif (x < this.x) { this.width += this.x-x; this.x = x; }\n\t\tif (y < this.y) { this.height += this.y-y; this.y = y; }\n\t\treturn this;\n\t};\n\t\n\t/** \n\t * Adds the specified padding to the rectangle's bounds.\n\t * @method pad\n\t * @param {Number} top\n\t * @param {Number} left\n\t * @param {Number} bottom\n\t * @param {Number} right\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.pad = function(top, left, bottom, right) {\n\t\tthis.x -= left;\n\t\tthis.y -= top;\n\t\tthis.width += left+right;\n\t\tthis.height += top+bottom;\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Copies all properties from the specified rectangle to this rectangle.\n\t * @method copy\n\t * @param {Rectangle} rectangle The rectangle to copy properties from.\n\t * @return {Rectangle} This rectangle. Useful for chaining method calls.\n\t * @chainable\n\t*/\n\tp.copy = function(rectangle) {\n\t\treturn this.setValues(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n\t};\n\t\n\t/** \n\t * Returns true if this rectangle fully encloses the described point or rectangle.\n\t * @method contains\n\t * @param {Number} x X position of the point or rectangle.\n\t * @param {Number} y Y position of the point or rectangle.\n\t * @param {Number} [width=0] The width of the rectangle.\n\t * @param {Number} [height=0] The height of the rectangle.\n\t * @return {Boolean} True if the described point or rectangle is contained within this rectangle.\n\t*/\n\tp.contains = function(x, y, width, height) {\n\t\twidth = width||0;\n\t\theight = height||0;\n\t\treturn (x >= this.x && x+width <= this.x+this.width && y >= this.y && y+height <= this.y+this.height);\n\t};\n\t\n\t/** \n\t * Returns a new rectangle which contains this rectangle and the specified rectangle.\n\t * @method union\n\t * @param {Rectangle} rect The rectangle to calculate a union with.\n\t * @return {Rectangle} A new rectangle describing the union.\n\t*/\n\tp.union = function(rect) {\n\t\treturn this.clone().extend(rect.x, rect.y, rect.width, rect.height);\n\t};\n\t\n\t/** \n\t * Returns a new rectangle which describes the intersection (overlap) of this rectangle and the specified rectangle,\n\t * or null if they do not intersect.\n\t * @method intersection\n\t * @param {Rectangle} rect The rectangle to calculate an intersection with.\n\t * @return {Rectangle} A new rectangle describing the intersection or null.\n\t*/\n\tp.intersection = function(rect) {\n\t\tvar x1 = rect.x, y1 = rect.y, x2 = x1+rect.width, y2 = y1+rect.height;\n\t\tif (this.x > x1) { x1 = this.x; }\n\t\tif (this.y > y1) { y1 = this.y; }\n\t\tif (this.x + this.width < x2) { x2 = this.x + this.width; }\n\t\tif (this.y + this.height < y2) { y2 = this.y + this.height; }\n\t\treturn (x2 <= x1 || y2 <= y1) ? null : new Rectangle(x1, y1, x2-x1, y2-y1);\n\t};\n\t\n\t/** \n\t * Returns true if the specified rectangle intersects (has any overlap) with this rectangle.\n\t * @method intersects\n\t * @param {Rectangle} rect The rectangle to compare.\n\t * @return {Boolean} True if the rectangles intersect.\n\t*/\n\tp.intersects = function(rect) {\n\t\treturn (rect.x <= this.x+this.width && this.x <= rect.x+rect.width && rect.y <= this.y+this.height && this.y <= rect.y + rect.height);\n\t};\n\t\n\t/** \n\t * Returns true if the width or height are equal or less than 0.\n\t * @method isEmpty\n\t * @return {Boolean} True if the rectangle is empty.\n\t*/\n\tp.isEmpty = function() {\n\t\treturn this.width <= 0 || this.height <= 0;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Rectangle instance.\n\t * @method clone\n\t * @return {Rectangle} a clone of the Rectangle instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Rectangle(this.x, this.y, this.width, this.height);\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Rectangle (x=\"+this.x+\" y=\"+this.y+\" width=\"+this.width+\" height=\"+this.height+\")]\";\n\t};\n\t\n\t\n\tcreatejs.Rectangle = Rectangle;\n}());\n\n//##############################################################################\n// ButtonHelper.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The ButtonHelper is a helper class to create interactive buttons from {{#crossLink \"MovieClip\"}}{{/crossLink}} or\n\t * {{#crossLink \"Sprite\"}}{{/crossLink}} instances. This class will intercept mouse events from an object, and\n\t * automatically call {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}},\n\t * to the respective animation labels, add a pointer cursor, and allows the user to define a hit state frame.\n\t *\n\t * The ButtonHelper instance does not need to be added to the stage, but a reference should be maintained to prevent\n\t * garbage collection.\n\t * \n\t * Note that over states will not work unless you call {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var helper = new createjs.ButtonHelper(myInstance, \"out\", \"over\", \"down\", false, myInstance, \"hit\");\n\t *      myInstance.addEventListener(\"click\", handleClick);\n\t *      function handleClick(event) {\n\t *          // Click Happened.\n\t *      }\n\t *\n\t * @class ButtonHelper\n\t * @param {Sprite|MovieClip} target The instance to manage.\n\t * @param {String} [outLabel=\"out\"] The label or animation to go to when the user rolls out of the button.\n\t * @param {String} [overLabel=\"over\"] The label or animation to go to when the user rolls over the button.\n\t * @param {String} [downLabel=\"down\"] The label or animation to go to when the user presses the button.\n\t * @param {Boolean} [play=false] If the helper should call \"gotoAndPlay\" or \"gotoAndStop\" on the button when changing\n\t * states.\n\t * @param {DisplayObject} [hitArea] An optional item to use as the hit state for the button. If this is not defined,\n\t * then the button's visible states will be used instead. Note that the same instance as the \"target\" argument can be\n\t * used for the hitState.\n\t * @param {String} [hitLabel] The label or animation on the hitArea instance that defines the hitArea bounds. If this is\n\t * null, then the default state of the hitArea will be used. *\n\t * @constructor\n\t */\n\tfunction ButtonHelper(target, outLabel, overLabel, downLabel, play, hitArea, hitLabel) {\n\t\tif (!target.addEventListener) { return; }\n\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * The target for this button helper.\n\t\t * @property target\n\t\t * @type MovieClip | Sprite\n\t\t * @readonly\n\t\t **/\n\t\tthis.target = target;\n\t\n\t\t/**\n\t\t * The label name or frame number to display when the user mouses out of the target. Defaults to \"over\".\n\t\t * @property overLabel\n\t\t * @type String | Number\n\t\t **/\n\t\tthis.overLabel = overLabel == null ? \"over\" : overLabel;\n\t\n\t\t/**\n\t\t * The label name or frame number to display when the user mouses over the target. Defaults to \"out\".\n\t\t * @property outLabel\n\t\t * @type String | Number\n\t\t **/\n\t\tthis.outLabel = outLabel == null ? \"out\" : outLabel;\n\t\n\t\t/**\n\t\t * The label name or frame number to display when the user presses on the target. Defaults to \"down\".\n\t\t * @property downLabel\n\t\t * @type String | Number\n\t\t **/\n\t\tthis.downLabel = downLabel == null ? \"down\" : downLabel;\n\t\n\t\t/**\n\t\t * If true, then ButtonHelper will call gotoAndPlay, if false, it will use gotoAndStop. Default is false.\n\t\t * @property play\n\t\t * @default false\n\t\t * @type Boolean\n\t\t **/\n\t\tthis.play = play;\n\t\t\n\t\t\n\t//  private properties\n\t\t/**\n\t\t * @property _isPressed\n\t\t * @type Boolean\n\t\t * @protected\n\t\t **/\n\t\tthis._isPressed = false;\n\t\n\t\t/**\n\t\t * @property _isOver\n\t\t * @type Boolean\n\t\t * @protected\n\t\t **/\n\t\tthis._isOver = false;\n\t\n\t\t/**\n\t\t * @property _enabled\n\t\t * @type Boolean\n\t\t * @protected\n\t\t **/\n\t\tthis._enabled = false;\n\t\t\n\t// setup:\n\t\ttarget.mouseChildren = false; // prevents issues when children are removed from the display list when state changes.\n\t\tthis.enabled = true;\n\t\tthis.handleEvent({});\n\t\tif (hitArea) {\n\t\t\tif (hitLabel) {\n\t\t\t\thitArea.actionsEnabled = false;\n\t\t\t\thitArea.gotoAndStop&&hitArea.gotoAndStop(hitLabel);\n\t\t\t}\n\t\t\ttarget.hitArea = hitArea;\n\t\t}\n\t}\n\tvar p = ButtonHelper.prototype;\n\t\n// getter / setters:\n\t/**\n\t * Use the {{#crossLink \"ButtonHelper/enabled:property\"}}{{/crossLink}} property instead.\n\t * @method setEnabled\n\t * @param {Boolean} value The enabled property to set the instance to.\n\t * @[rptected\n\t * @protected\n\t **/\n\tp._setEnabled = function(value) {\n\t\tif (value == this._enabled) { return; }\n\t\tvar o = this.target;\n\t\tthis._enabled = value;\n\t\tif (value) {\n\t\t\to.cursor = \"pointer\";\n\t\t\to.addEventListener(\"rollover\", this);\n\t\t\to.addEventListener(\"rollout\", this);\n\t\t\to.addEventListener(\"mousedown\", this);\n\t\t\to.addEventListener(\"pressup\", this);\n\t\t\tif (o._reset) { o.__reset = o._reset; o._reset = this._reset;}\n\t\t} else {\n\t\t\to.cursor = null;\n\t\t\to.removeEventListener(\"rollover\", this);\n\t\t\to.removeEventListener(\"rollout\", this);\n\t\t\to.removeEventListener(\"mousedown\", this);\n\t\t\to.removeEventListener(\"pressup\", this);\n\t\t\tif (o.__reset) { o._reset = o.__reset; delete(o.__reset); }\n\t\t}\n\t};\n\t// ButtonHelper.setEnabled is @deprecated. Remove for 1.1+\n\tp.setEnabled = createjs.deprecate(p._setEnabled, \"ButtonHelper.setEnabled\");\n\n\t/**\n\t * Use the {{#crossLink \"ButtonHelper/enabled:property\"}}{{/crossLink}} property instead.\n\t * @method getEnabled\n\t * @protected\n\t * @return {Boolean}\n\t **/\n\tp._getEnabled = function() {\n\t\treturn this._enabled;\n\t};\n\t// ButtonHelper.getEnabled is @deprecated. Remove for 1.1+\n\tp.getEnabled = createjs.deprecate(p._getEnabled, \"ButtonHelper.getEnabled\");\n\n\t/**\n\t * Enables or disables the button functionality on the target.\n\t * @property enabled\n\t * @type {Boolean}\n\t **/\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tenabled: { get: p._getEnabled, set: p._setEnabled }\n\t\t});\n\t} catch (e) {} // TODO: use Log\n\n\n// public methods:\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[ButtonHelper]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * @method handleEvent\n\t * @param {Object} evt The mouse event to handle.\n\t * @protected\n\t **/\n\tp.handleEvent = function(evt) {\n\t\tvar label, t = this.target, type = evt.type;\n\t\tif (type == \"mousedown\") {\n\t\t\tthis._isPressed = true;\n\t\t\tlabel = this.downLabel;\n\t\t} else if (type == \"pressup\") {\n\t\t\tthis._isPressed = false;\n\t\t\tlabel = this._isOver ? this.overLabel : this.outLabel;\n\t\t} else if (type == \"rollover\") {\n\t\t\tthis._isOver = true;\n\t\t\tlabel = this._isPressed ? this.downLabel : this.overLabel;\n\t\t} else { // rollout and default\n\t\t\tthis._isOver = false;\n\t\t\tlabel = this._isPressed ? this.overLabel : this.outLabel;\n\t\t}\n\t\tif (this.play) {\n\t\t\tt.gotoAndPlay&&t.gotoAndPlay(label);\n\t\t} else {\n\t\t\tt.gotoAndStop&&t.gotoAndStop(label);\n\t\t}\n\t};\n\t\n\t/**\n\t * Injected into target. Preserves the paused state through a reset.\n\t * @method _reset\n\t * @protected\n\t **/\n\tp._reset = function() {\n\t\t// TODO: explore better ways to handle this issue. This is hacky & disrupts object signatures.\n\t\tvar p = this.paused;\n\t\tthis.__reset();\n\t\tthis.paused = p;\n\t};\n\n\n\tcreatejs.ButtonHelper = ButtonHelper;\n}());\n\n//##############################################################################\n// Shadow.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * This class encapsulates the properties required to define a shadow to apply to a {{#crossLink \"DisplayObject\"}}{{/crossLink}}\n\t * via its <code>shadow</code> property.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      myImage.shadow = new createjs.Shadow(\"#000000\", 5, 5, 10);\n\t *\n\t * @class Shadow\n\t * @constructor\n\t * @param {String} color The color of the shadow. This can be any valid CSS color value.\n\t * @param {Number} offsetX The x offset of the shadow in pixels.\n\t * @param {Number} offsetY The y offset of the shadow in pixels.\n\t * @param {Number} blur The size of the blurring effect.\n\t **/\n\tfunction Shadow(color, offsetX, offsetY, blur) {\n\t\t\n\t\t\n\t// public properties:\n\t\t/** \n\t\t * The color of the shadow. This can be any valid CSS color value.\n\t\t * @property color\n\t\t * @type String\n\t\t * @default null\n\t\t */\n\t\tthis.color = color||\"black\";\n\t\n\t\t/** The x offset of the shadow.\n\t\t * @property offsetX\n\t\t * @type Number\n\t\t * @default 0\n\t\t */\n\t\tthis.offsetX = offsetX||0;\n\t\n\t\t/** The y offset of the shadow.\n\t\t * @property offsetY\n\t\t * @type Number\n\t\t * @default 0\n\t\t */\n\t\tthis.offsetY = offsetY||0;\n\t\n\t\t/** The blur of the shadow.\n\t\t * @property blur\n\t\t * @type Number\n\t\t * @default 0\n\t\t */\n\t\tthis.blur = blur||0;\n\t}\n\tvar p = Shadow.prototype;\n\n// static public properties:\n\t/**\n\t * An identity shadow object (all properties are set to 0).\n\t * @property identity\n\t * @type Shadow\n\t * @static\n\t * @final\n\t * @readonly\n\t **/\n\tShadow.identity = new Shadow(\"transparent\", 0, 0, 0);\n\n\n// public methods:\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Shadow]\";\n\t};\n\n\t/**\n\t * Returns a clone of this Shadow instance.\n\t * @method clone\n\t * @return {Shadow} A clone of the current Shadow instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Shadow(this.color, this.offsetX, this.offsetY, this.blur);\n\t};\n\t\n\n\tcreatejs.Shadow = Shadow;\n}());\n\n//##############################################################################\n// SpriteSheet.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Encapsulates the properties and methods associated with a sprite sheet. A sprite sheet is a series of images (usually\n\t * animation frames) combined into a larger image (or images). For example, an animation consisting of eight 100x100\n\t * images could be combined into a single 400x200 sprite sheet (4 frames across by 2 high).\n\t *\n\t * The data passed to the SpriteSheet constructor defines:\n\t * <ol>\n\t * \t<li> The source image or images to use.</li>\n\t * \t<li> The positions of individual image frames.</li>\n\t * \t<li> Sequences of frames that form named animations. Optional.</li>\n\t * \t<li> The target playback framerate. Optional.</li>\n\t * </ol>\n\t * <h3>SpriteSheet Format</h3>\n\t * SpriteSheets are an object with two required properties (`images` and `frames`), and two optional properties\n\t * (`framerate` and `animations`). This makes them easy to define in javascript code, or in JSON.\n\t *\n\t * <h4>images</h4>\n\t * An array of source images. Images can be either an HTMlimage\n\t * instance, or a uri to an image. The former is recommended to control preloading.\n\t *\n\t * \timages: [image1, \"path/to/image2.png\"],\n\t *\n\t * <h4>frames</h4>\n\t * Defines the individual frames. There are two supported formats for frame data:\n\t * When all of the frames are the same size (in a grid), use an object with `width`, `height`, `regX`, `regY`,\n\t * and `count` properties.\n\t *\n\t * <ul>\n\t *  <li>`width` & `height` are required and specify the dimensions of the frames</li>\n\t *  <li>`regX` & `regY` indicate the registration point or \"origin\" of the frames</li>\n\t *  <li>`spacing` indicate the spacing between frames</li>\n\t *  <li>`margin` specify the margin around the image(s)</li>\n\t *  <li>`count` allows you to specify the total number of frames in the spritesheet; if omitted, this will\n\t *  be calculated based on the dimensions of the source images and the frames. Frames will be assigned\n\t *  indexes based on their position in the source images (left to right, top to bottom).</li>\n\t * </ul>\n\t *\n\t *  \tframes: {width:64, height:64, count:20, regX: 32, regY:64, spacing:0, margin:0}\n\t *\n\t * If the frames are of different sizes, use an array of frame definitions. Each definition is itself an array\n\t * with 4 required and 3 optional entries, in the order:\n\t *\n\t * <ul>\n\t *  <li>The first four, `x`, `y`, `width`, and `height` are required and define the frame rectangle.</li>\n\t *  <li>The fifth, `imageIndex`, specifies the index of the source image (defaults to 0)</li>\n\t *  <li>The last two, `regX` and `regY` specify the registration point of the frame</li>\n\t * </ul>\n\t *\n\t * \tframes: [\n\t * \t\t// x, y, width, height, imageIndex*, regX*, regY*\n\t * \t\t[64, 0, 96, 64],\n\t * \t\t[0, 0, 64, 64, 1, 32, 32]\n\t * \t\t// etc.\n\t * \t]\n\t *\n\t * <h4>animations</h4>\n\t * Optional. An object defining sequences of frames to play as named animations. Each property corresponds to an\n\t * animation of the same name. Each animation must specify the frames to play, and may\n\t * also include a relative playback `speed` (ex. 2 would playback at double speed, 0.5 at half), and\n\t * the name of the `next` animation to sequence to after it completes.\n\t *\n\t * There are three formats supported for defining the frames in an animation, which can be mixed and matched as appropriate:\n\t * <ol>\n\t * \t<li>for a single frame animation, you can simply specify the frame index\n\t *\n\t * \t\tanimations: {\n\t * \t\t\tsit: 7\n\t * \t\t}\n\t *\n\t * </li>\n\t * <li>\n\t *      for an animation of consecutive frames, you can use an array with two required, and two optional entries\n\t * \t\tin the order: `start`, `end`, `next`, and `speed`. This will play the frames from start to end inclusive.\n\t *\n\t * \t\tanimations: {\n\t * \t\t\t// start, end, next*, speed*\n\t * \t\t\trun: [0, 8],\n\t * \t\t\tjump: [9, 12, \"run\", 2]\n\t * \t\t}\n\t *\n\t *  </li>\n\t *  <li>\n\t *     for non-consecutive frames, you can use an object with a `frames` property defining an array of frame\n\t *     indexes to play in order. The object can also specify `next` and `speed` properties.\n\t *\n\t * \t\tanimations: {\n\t * \t\t\twalk: {\n\t * \t\t\t\tframes: [1,2,3,3,2,1]\n\t * \t\t\t},\n\t * \t\t\tshoot: {\n\t * \t\t\t\tframes: [1,4,5,6],\n\t * \t\t\t\tnext: \"walk\",\n\t * \t\t\t\tspeed: 0.5\n\t * \t\t\t}\n\t * \t\t}\n\t *\n\t *  </li>\n\t * </ol>\n\t * <strong>Note:</strong> the `speed` property was added in EaselJS 0.7.0. Earlier versions had a `frequency`\n\t * property instead, which was the inverse of `speed`. For example, a value of \"4\" would be 1/4 normal speed in\n\t * earlier versions, but is 4x normal speed in EaselJS 0.7.0+.\n\t *\n\t * <h4>framerate</h4>\n\t * Optional. Indicates the default framerate to play this spritesheet at in frames per second. See\n\t * {{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} for more information.\n\t *\n\t * \t\tframerate: 20\n\t *\n\t * Note that the Sprite framerate will only work if the stage update method is provided with the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\n\t * event generated by the {{#crossLink \"Ticker\"}}{{/crossLink}}.\n\t *\n\t * \t\tcreatejs.Ticker.on(\"tick\", handleTick);\n\t * \t\tfunction handleTick(event) {\n\t *\t\t\tstage.update(event);\n\t *\t\t}\n\t *\n\t * <h3>Example</h3>\n\t * To define a simple sprite sheet, with a single image \"sprites.jpg\" arranged in a regular 50x50 grid with three\n\t * animations: \"stand\" showing the first frame, \"run\" looping frame 1-5 inclusive, and \"jump\" playing frame 6-8 and\n\t * sequencing back to run.\n\t *\n\t * \t\tvar data = {\n\t * \t\t\timages: [\"sprites.jpg\"],\n\t * \t\t\tframes: {width:50, height:50},\n\t * \t\t\tanimations: {\n\t * \t\t\t\tstand:0,\n\t * \t\t\t\trun:[1,5],\n\t * \t\t\t\tjump:[6,8,\"run\"]\n\t * \t\t\t}\n\t * \t\t};\n\t * \t\tvar spriteSheet = new createjs.SpriteSheet(data);\n\t * \t\tvar animation = new createjs.Sprite(spriteSheet, \"run\");\n\t *\n\t * <h3>Generating SpriteSheet Images</h3>\n\t * Spritesheets can be created manually by combining images in PhotoShop, and specifying the frame size or\n\t * coordinates manually, however there are a number of tools that facilitate this.\n\t * <ul>\n\t *     <li>Exporting SpriteSheets or HTML5 content from Adobe Flash/Animate supports the EaselJS SpriteSheet format.</li>\n\t *     <li>The popular <a href=\"https://www.codeandweb.com/texturepacker/easeljs\" target=\"_blank\">Texture Packer</a> has\n\t *     EaselJS support.\n\t *     <li>SWF animations in Adobe Flash/Animate can be exported to SpriteSheets using <a href=\"http://createjs.com/zoe\" target=\"_blank\">Zo&euml;</a></li>\n\t * </ul>\n\t *\n\t * <h3>Cross Origin Issues</h3>\n\t * <strong>Warning:</strong> Images loaded cross-origin will throw cross-origin security errors when interacted with\n\t * using:\n\t * <ul>\n\t *     <li>a mouse</li>\n\t *     <li>methods such as {{#crossLink \"Container/getObjectUnderPoint\"}}{{/crossLink}}</li>\n\t *     <li>Filters (see {{#crossLink \"Filter\"}}{{/crossLink}})</li>\n\t *     <li>caching (see {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}})</li>\n\t * </ul>\n\t * You can get around this by setting `crossOrigin` property on your images before passing them to EaselJS, or\n\t * setting the `crossOrigin` property on PreloadJS' LoadQueue or LoadItems.\n\t *\n\t * \t\tvar image = new Image();\n\t * \t\timg.crossOrigin=\"Anonymous\";\n\t * \t\timg.src = \"http://server-with-CORS-support.com/path/to/image.jpg\";\n\t *\n\t * If you pass string paths to SpriteSheets, they will not work cross-origin. The server that stores the image must\n\t * support cross-origin requests, or this will not work. For more information, check out\n\t * <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS\" target=\"_blank\">CORS overview on MDN</a>.\n\t *\n\t * @class SpriteSheet\n\t * @constructor\n\t * @param {Object} data An object describing the SpriteSheet data.\n\t * @extends EventDispatcher\n\t **/\n\tfunction SpriteSheet(data) {\n\t\tthis.EventDispatcher_constructor();\n\n\n\t\t// public properties:\n\t\t/**\n\t\t * Indicates whether all images are finished loading.\n\t\t * @property complete\n\t\t * @type Boolean\n\t\t * @readonly\n\t\t **/\n\t\tthis.complete = true;\n\n\t\t/**\n\t\t * Specifies the framerate to use by default for Sprite instances using the SpriteSheet. See the Sprite class\n\t\t * {{#crossLink \"Sprite/framerate:property\"}}{{/crossLink}} for more information.\n\t\t * @property framerate\n\t\t * @type Number\n\t\t **/\n\t\tthis.framerate = 0;\n\n\n\t\t// private properties:\n\t\t/**\n\t\t * @property _animations\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._animations = null;\n\n\t\t/**\n\t\t * @property _frames\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._frames = null;\n\n\t\t/**\n\t\t * @property _images\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._images = null;\n\n\t\t/**\n\t\t * @property _data\n\t\t * @protected\n\t\t * @type Object\n\t\t **/\n\t\tthis._data = null;\n\n\t\t/**\n\t\t * @property _loadCount\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._loadCount = 0;\n\n\t\t// only used for simple frame defs:\n\t\t/**\n\t\t * @property _frameHeight\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._frameHeight = 0;\n\n\t\t/**\n\t\t * @property _frameWidth\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._frameWidth = 0;\n\n\t\t/**\n\t\t * @property _numFrames\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._numFrames = 0;\n\n\t\t/**\n\t\t * @property _regX\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._regX = 0;\n\n\t\t/**\n\t\t * @property _regY\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._regY = 0;\n\n\t\t/**\n\t\t * @property _spacing\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._spacing = 0;\n\n\t\t/**\n\t\t * @property _margin\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._margin = 0;\n\n\t\t// setup:\n\t\tthis._parseData(data);\n\t}\n\tvar p = createjs.extend(SpriteSheet, createjs.EventDispatcher);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\n// events:\n\t/**\n\t * Dispatched when all images are loaded.  Note that this only fires if the images\n\t * were not fully loaded when the sprite sheet was initialized. You should check the complete property\n\t * to prior to adding a listener. Ex.\n\t *\n\t * \tvar sheet = new createjs.SpriteSheet(data);\n\t * \tif (!sheet.complete) {\n\t * \t\t// not preloaded, listen for the complete event:\n\t * \t\tsheet.addEventListener(\"complete\", handler);\n\t * \t}\n\t *\n\t * @event complete\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * Dispatched when getFrame is called with a valid frame index. This is primarily intended for use by {{#crossLink \"SpriteSheetBuilder\"}}{{/crossLink}}\n\t * when doing on-demand rendering.\n\t * @event getframe\n\t * @param {Number} index The frame index.\n\t * @param {Object} frame The frame object that getFrame will return.\n\t */\n\n\t/**\n\t * Dispatched when an image encounters an error. A SpriteSheet will dispatch an error event for each image that\n\t * encounters an error, and will still dispatch a {{#crossLink \"SpriteSheet/complete:event\"}}{{/crossLink}}\n\t * event once all images are finished processing, even if an error is encountered.\n\t * @event error\n\t * @param {String} src The source of the image that failed to load.\n\t * @since 0.8.2\n\t */\n\n\n// getter / setters:\n\t/**\n\t * Use the {{#crossLink \"SpriteSheet/animations:property\"}}{{/crossLink}} property instead.\n\t * @method _getAnimations\n\t * @protected\n\t * @return {Array}\n\t **/\n\tp._getAnimations = function() {\n\t\treturn this._animations.slice();\n\t};\n\t// SpriteSheet.getAnimations is @deprecated. Remove for 1.1+\n\tp.getAnimations = createjs.deprecate(p._getAnimations, \"SpriteSheet.getAnimations\");\n\n\t/**\n\t * Returns an array of all available animation names available on this sprite sheet as strings.\n\t * @property animations\n\t * @type {Array}\n\t * @readonly\n\t **/\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tanimations: { get: p._getAnimations }\n\t\t});\n\t} catch (e) {}\n\n\n// public methods:\n\t/**\n\t * Returns the total number of frames in the specified animation, or in the whole sprite\n\t * sheet if the animation param is omitted. Returns 0 if the spritesheet relies on calculated frame counts, and\n\t * the images have not been fully loaded.\n\t * @method getNumFrames\n\t * @param {String} animation The name of the animation to get a frame count for.\n\t * @return {Number} The number of frames in the animation, or in the entire sprite sheet if the animation param is omitted.\n\t */\n\tp.getNumFrames = function(animation) {\n\t\tif (animation == null) {\n\t\t\treturn this._frames ? this._frames.length : this._numFrames || 0;\n\t\t} else {\n\t\t\tvar data = this._data[animation];\n\t\t\tif (data == null) { return 0; }\n\t\t\telse { return data.frames.length; }\n\t\t}\n\t};\n\n\t/**\n\t * Returns an object defining the specified animation. The returned object contains:<UL>\n\t * \t<li>frames: an array of the frame ids in the animation</li>\n\t * \t<li>speed: the playback speed for this animation</li>\n\t * \t<li>name: the name of the animation</li>\n\t * \t<li>next: the default animation to play next. If the animation loops, the name and next property will be the\n\t * \tsame.</li>\n\t * </UL>\n\t * @method getAnimation\n\t * @param {String} name The name of the animation to get.\n\t * @return {Object} a generic object with frames, speed, name, and next properties.\n\t **/\n\tp.getAnimation = function(name) {\n\t\treturn this._data[name];\n\t};\n\n\t/**\n\t * Returns an object specifying the image and source rect of the specified frame. The returned object has:<UL>\n\t * \t<li>an image property holding a reference to the image object in which the frame is found</li>\n\t * \t<li>a rect property containing a Rectangle instance which defines the boundaries for the frame within that\n\t * \timage.</li>\n\t * \t<li> A regX and regY property corresponding to the regX/Y values for the frame.\n\t * </UL>\n\t * @method getFrame\n\t * @param {Number} frameIndex The index of the frame.\n\t * @return {Object} a generic object with image and rect properties. Returns null if the frame does not exist.\n\t **/\n\tp.getFrame = function(frameIndex) {\n\t\tvar frame;\n\t\tif (this._frames && (frame=this._frames[frameIndex])) { return frame; }\n\t\treturn null;\n\t};\n\n\t/**\n\t * Returns a {{#crossLink \"Rectangle\"}}{{/crossLink}} instance defining the bounds of the specified frame relative\n\t * to the origin. For example, a 90 x 70 frame with a regX of 50 and a regY of 40 would return:\n\t *\n\t * \t[x=-50, y=-40, width=90, height=70]\n\t *\n\t * @method getFrameBounds\n\t * @param {Number} frameIndex The index of the frame.\n\t * @param {Rectangle} [rectangle] A Rectangle instance to copy the values into. By default a new instance is created.\n\t * @return {Rectangle} A Rectangle instance. Returns null if the frame does not exist, or the image is not fully loaded.\n\t **/\n\tp.getFrameBounds = function(frameIndex, rectangle) {\n\t\tvar frame = this.getFrame(frameIndex);\n\t\treturn frame ? (rectangle||new createjs.Rectangle()).setValues(-frame.regX, -frame.regY, frame.rect.width, frame.rect.height) : null;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[SpriteSheet]\";\n\t};\n\n\t/**\n\t * SpriteSheet cannot be cloned. A SpriteSheet can be shared by multiple Sprite instances without cloning it.\n\t * @method clone\n\t **/\n\tp.clone = function() {\n\t\tthrow(\"SpriteSheet cannot be cloned.\")\n\t};\n\n// private methods:\n\t/**\n\t * @method _parseData\n\t * @param {Object} data An object describing the SpriteSheet data.\n\t * @protected\n\t **/\n\tp._parseData = function(data) {\n\t\tvar i,l,o,a;\n\t\tif (data == null) { return; }\n\n\t\tthis.framerate = data.framerate||0;\n\n\t\t// parse images:\n\t\tif (data.images && (l=data.images.length) > 0) {\n\t\t\ta = this._images = [];\n\t\t\tfor (i=0; i<l; i++) {\n\t\t\t\tvar img = data.images[i];\n\t\t\t\tif (typeof img == \"string\") {\n\t\t\t\t\tvar src = img;\n\t\t\t\t\timg = document.createElement(\"img\");\n\t\t\t\t\timg.src = src;\n\t\t\t\t}\n\t\t\t\ta.push(img);\n\t\t\t\tif (!img.getContext && !img.naturalWidth) {\n\t\t\t\t\tthis._loadCount++;\n\t\t\t\t\tthis.complete = false;\n\t\t\t\t\t(function(o, src) { img.onload = function() { o._handleImageLoad(src); } })(this, src);\n\t\t\t\t\t(function(o, src) { img.onerror = function() { o._handleImageError(src); } })(this, src);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// parse frames:\n\t\tif (data.frames == null) { // nothing\n\t\t} else if (Array.isArray(data.frames)) {\n\t\t\tthis._frames = [];\n\t\t\ta = data.frames;\n\t\t\tfor (i=0,l=a.length;i<l;i++) {\n\t\t\t\tvar arr = a[i];\n\t\t\t\tthis._frames.push({image:this._images[arr[4]?arr[4]:0], rect:new createjs.Rectangle(arr[0],arr[1],arr[2],arr[3]), regX:arr[5]||0, regY:arr[6]||0 });\n\t\t\t}\n\t\t} else {\n\t\t\to = data.frames;\n\t\t\tthis._frameWidth = o.width;\n\t\t\tthis._frameHeight = o.height;\n\t\t\tthis._regX = o.regX||0;\n\t\t\tthis._regY = o.regY||0;\n\t\t\tthis._spacing = o.spacing||0;\n\t\t\tthis._margin = o.margin||0;\n\t\t\tthis._numFrames = o.count;\n\t\t\tif (this._loadCount == 0) { this._calculateFrames(); }\n\t\t}\n\n\t\t// parse animations:\n\t\tthis._animations = [];\n\t\tif ((o=data.animations) != null) {\n\t\t\tthis._data = {};\n\t\t\tvar name;\n\t\t\tfor (name in o) {\n\t\t\t\tvar anim = {name:name};\n\t\t\t\tvar obj = o[name];\n\t\t\t\tif (typeof obj == \"number\") { // single frame\n\t\t\t\t\ta = anim.frames = [obj];\n\t\t\t\t} else if (Array.isArray(obj)) { // simple\n\t\t\t\t\tif (obj.length == 1) { anim.frames = [obj[0]]; }\n\t\t\t\t\telse {\n\t\t\t\t\t\tanim.speed = obj[3];\n\t\t\t\t\t\tanim.next = obj[2];\n\t\t\t\t\t\ta = anim.frames = [];\n\t\t\t\t\t\tfor (i=obj[0];i<=obj[1];i++) {\n\t\t\t\t\t\t\ta.push(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else { // complex\n\t\t\t\t\tanim.speed = obj.speed;\n\t\t\t\t\tanim.next = obj.next;\n\t\t\t\t\tvar frames = obj.frames;\n\t\t\t\t\ta = anim.frames = (typeof frames == \"number\") ? [frames] : frames.slice(0);\n\t\t\t\t}\n\t\t\t\tif (anim.next === true || anim.next === undefined) { anim.next = name; } // loop\n\t\t\t\tif (anim.next === false || (a.length < 2 && anim.next == name)) { anim.next = null; } // stop\n\t\t\t\tif (!anim.speed) { anim.speed = 1; }\n\t\t\t\tthis._animations.push(name);\n\t\t\t\tthis._data[name] = anim;\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleImageLoad\n\t * @protected\n\t **/\n\tp._handleImageLoad = function(src) {\n\t\tif (--this._loadCount == 0) {\n\t\t\tthis._calculateFrames();\n\t\t\tthis.complete = true;\n\t\t\tthis.dispatchEvent(\"complete\");\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleImageError\n\t * @protected\n\t */\n\tp._handleImageError = function (src) {\n\t\tvar errorEvent = new createjs.Event(\"error\");\n\t\terrorEvent.src = src;\n\t\tthis.dispatchEvent(errorEvent);\n\n\t\t// Complete is still dispatched.\n\t\tif (--this._loadCount == 0) {\n\t\t\tthis.dispatchEvent(\"complete\");\n\t\t}\n\t};\n\n\t/**\n\t * @method _calculateFrames\n\t * @protected\n\t **/\n\tp._calculateFrames = function() {\n\t\tif (this._frames || this._frameWidth == 0) { return; }\n\n\t\tthis._frames = [];\n\n\t\tvar maxFrames = this._numFrames || 100000; // if we go over this, something is wrong.\n\t\tvar frameCount = 0, frameWidth = this._frameWidth, frameHeight = this._frameHeight;\n\t\tvar spacing = this._spacing, margin = this._margin;\n\t\t\n\t\timgLoop:\n\t\tfor (var i=0, imgs=this._images; i<imgs.length; i++) {\n\t\t\tvar img = imgs[i], imgW = (img.width||img.naturalWidth), imgH = (img.height||img.naturalHeight);\n\n\t\t\tvar y = margin;\n\t\t\twhile (y <= imgH-margin-frameHeight) {\n\t\t\t\tvar x = margin;\n\t\t\t\twhile (x <= imgW-margin-frameWidth) {\n\t\t\t\t\tif (frameCount >= maxFrames) { break imgLoop; }\n\t\t\t\t\tframeCount++;\n\t\t\t\t\tthis._frames.push({\n\t\t\t\t\t\t\timage: img,\n\t\t\t\t\t\t\trect: new createjs.Rectangle(x, y, frameWidth, frameHeight),\n\t\t\t\t\t\t\tregX: this._regX,\n\t\t\t\t\t\t\tregY: this._regY\n\t\t\t\t\t\t});\n\t\t\t\t\tx += frameWidth+spacing;\n\t\t\t\t}\n\t\t\t\ty += frameHeight+spacing;\n\t\t\t}\n\t\t}\n\t\tthis._numFrames = frameCount;\n\t};\n\n\n\tcreatejs.SpriteSheet = createjs.promote(SpriteSheet, \"EventDispatcher\");\n}());\n\n//##############################################################################\n// Graphics.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The Graphics class exposes an easy to use API for generating vector drawing instructions and drawing them to a\n\t * specified context. Note that you can use Graphics without any dependency on the EaselJS framework by calling {{#crossLink \"Graphics/draw\"}}{{/crossLink}}\n\t * directly, or it can be used with the {{#crossLink \"Shape\"}}{{/crossLink}} object to draw vector graphics within the\n\t * context of an EaselJS display list.\n\t *\n\t * There are two approaches to working with Graphics object: calling methods on a Graphics instance (the \"Graphics API\"), or\n\t * instantiating Graphics command objects and adding them to the graphics queue via {{#crossLink \"Graphics/append\"}}{{/crossLink}}.\n\t * The former abstracts the latter, simplifying beginning and ending paths, fills, and strokes.\n\t *\n\t *      var g = new createjs.Graphics();\n\t *      g.setStrokeStyle(1);\n\t *      g.beginStroke(\"#000000\");\n\t *      g.beginFill(\"red\");\n\t *      g.drawCircle(0,0,30);\n\t *\n\t * All drawing methods in Graphics return the Graphics instance, so they can be chained together. For example,\n\t * the following line of code would generate the instructions to draw a rectangle with a red stroke and blue fill:\n\t *\n\t *      myGraphics.beginStroke(\"red\").beginFill(\"blue\").drawRect(20, 20, 100, 50);\n\t *\n\t * Each graphics API call generates a command object (see below). The last command to be created can be accessed via\n\t * {{#crossLink \"Graphics/command:property\"}}{{/crossLink}}:\n\t *\n\t *      var fillCommand = myGraphics.beginFill(\"red\").command;\n\t *      // ... later, update the fill style/color:\n\t *      fillCommand.style = \"blue\";\n\t *      // or change it to a bitmap fill:\n\t *      fillCommand.bitmap(myImage);\n\t *\n\t * For more direct control of rendering, you can instantiate and append command objects to the graphics queue directly. In this case, you\n\t * need to manage path creation manually, and ensure that fill/stroke is applied to a defined path:\n\t *\n\t *      // start a new path. Graphics.beginCmd is a reusable BeginPath instance:\n\t *      myGraphics.append(createjs.Graphics.beginCmd);\n\t *      // we need to define the path before applying the fill:\n\t *      var circle = new createjs.Graphics.Circle(0,0,30);\n\t *      myGraphics.append(circle);\n\t *      // fill the path we just defined:\n\t *      var fill = new createjs.Graphics.Fill(\"red\");\n\t *      myGraphics.append(fill);\n\t *\n\t * These approaches can be used together, for example to insert a custom command:\n\t *\n\t *      myGraphics.beginFill(\"red\");\n\t *      var customCommand = new CustomSpiralCommand(etc);\n\t *      myGraphics.append(customCommand);\n\t *      myGraphics.beginFill(\"blue\");\n\t *      myGraphics.drawCircle(0, 0, 30);\n\t *\n\t * See {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more info on creating custom commands.\n\t *\n\t * <h4>Tiny API</h4>\n\t * The Graphics class also includes a \"tiny API\", which is one or two-letter methods that are shortcuts for all of the\n\t * Graphics methods. These methods are great for creating compact instructions, and is used by the Toolkit for CreateJS\n\t * to generate readable code. All tiny methods are marked as protected, so you can view them by enabling protected\n\t * descriptions in the docs.\n\t *\n\t * <table>\n\t *     <tr><td><b>Tiny</b></td><td><b>Method</b></td><td><b>Tiny</b></td><td><b>Method</b></td></tr>\n\t *     <tr><td>mt</td><td>{{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} </td>\n\t *     <td>lt</td> <td>{{#crossLink \"Graphics/lineTo\"}}{{/crossLink}}</td></tr>\n\t *     <tr><td>a/at</td><td>{{#crossLink \"Graphics/arc\"}}{{/crossLink}} / {{#crossLink \"Graphics/arcTo\"}}{{/crossLink}} </td>\n\t *     <td>bt</td><td>{{#crossLink \"Graphics/bezierCurveTo\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>qt</td><td>{{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}} (also curveTo)</td>\n\t *     <td>r</td><td>{{#crossLink \"Graphics/rect\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>cp</td><td>{{#crossLink \"Graphics/closePath\"}}{{/crossLink}} </td>\n\t *     <td>c</td><td>{{#crossLink \"Graphics/clear\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>f</td><td>{{#crossLink \"Graphics/beginFill\"}}{{/crossLink}} </td>\n\t *     <td>lf</td><td>{{#crossLink \"Graphics/beginLinearGradientFill\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>rf</td><td>{{#crossLink \"Graphics/beginRadialGradientFill\"}}{{/crossLink}} </td>\n\t *     <td>bf</td><td>{{#crossLink \"Graphics/beginBitmapFill\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>ef</td><td>{{#crossLink \"Graphics/endFill\"}}{{/crossLink}} </td>\n\t *     <td>ss / sd</td><td>{{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} / {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>s</td><td>{{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} </td>\n\t *     <td>ls</td><td>{{#crossLink \"Graphics/beginLinearGradientStroke\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>rs</td><td>{{#crossLink \"Graphics/beginRadialGradientStroke\"}}{{/crossLink}} </td>\n\t *     <td>bs</td><td>{{#crossLink \"Graphics/beginBitmapStroke\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>es</td><td>{{#crossLink \"Graphics/endStroke\"}}{{/crossLink}} </td>\n\t *     <td>dr</td><td>{{#crossLink \"Graphics/drawRect\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>rr</td><td>{{#crossLink \"Graphics/drawRoundRect\"}}{{/crossLink}} </td>\n\t *     <td>rc</td><td>{{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>dc</td><td>{{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} </td>\n\t *     <td>de</td><td>{{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}} </td></tr>\n\t *     <tr><td>dp</td><td>{{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} </td>\n\t *     <td>p</td><td>{{#crossLink \"Graphics/decodePath\"}}{{/crossLink}} </td></tr>\n\t * </table>\n\t *\n\t * Here is the above example, using the tiny API instead.\n\t *\n\t *      myGraphics.s(\"red\").f(\"blue\").r(20, 20, 100, 50);\n\t *\n\t * @class Graphics\n\t * @constructor\n\t **/\n\tfunction Graphics() {\n\n\n\t// public properties\n\t\t/**\n\t\t * Holds a reference to the last command that was created or appended. For example, you could retain a reference\n\t\t * to a Fill command in order to dynamically update the color later by using:\n\t\t *\n\t\t * \t\tvar myFill = myGraphics.beginFill(\"red\").command;\n\t\t * \t\t// update color later:\n\t\t * \t\tmyFill.style = \"yellow\";\n\t\t *\n\t\t * @property command\n\t\t * @type Object\n\t\t **/\n\t\tthis.command = null;\n\n\n\t// private properties\n\t\t/**\n\t\t * @property _stroke\n\t\t * @protected\n\t\t * @type {Stroke}\n\t\t **/\n\t\tthis._stroke = null;\n\n\t\t/**\n\t\t * @property _strokeStyle\n\t\t * @protected\n\t\t * @type {StrokeStyle}\n\t\t **/\n\t\tthis._strokeStyle = null;\n\t\t\n\t\t/**\n\t\t * @property _oldStrokeStyle\n\t\t * @protected\n\t\t * @type {StrokeStyle}\n\t\t **/\n\t\tthis._oldStrokeStyle = null;\n\t\t\n\t\t/**\n\t\t * @property _strokeDash\n\t\t * @protected\n\t\t * @type {StrokeDash}\n\t\t **/\n\t\tthis._strokeDash = null;\n\t\t\n\t\t/**\n\t\t * @property _oldStrokeDash\n\t\t * @protected\n\t\t * @type {StrokeDash}\n\t\t **/\n\t\tthis._oldStrokeDash = null;\n\n\t\t/**\n\t\t * @property _strokeIgnoreScale\n\t\t * @protected\n\t\t * @type Boolean\n\t\t **/\n\t\tthis._strokeIgnoreScale = false;\n\n\t\t/**\n\t\t * @property _fill\n\t\t * @protected\n\t\t * @type {Fill}\n\t\t **/\n\t\tthis._fill = null;\n\n\t\t/**\n\t\t * @property _instructions\n\t\t * @protected\n\t\t * @type {Array}\n\t\t **/\n\t\tthis._instructions = [];\n\n\t\t/**\n\t\t * Indicates the last instruction index that was committed.\n\t\t * @property _commitIndex\n\t\t * @protected\n\t\t * @type {Number}\n\t\t **/\n\t\tthis._commitIndex = 0;\n\n\t\t/**\n\t\t * Uncommitted instructions.\n\t\t * @property _activeInstructions\n\t\t * @protected\n\t\t * @type {Array}\n\t\t **/\n\t\tthis._activeInstructions = [];\n\n\t\t/**\n\t\t * This indicates that there have been changes to the activeInstruction list since the last updateInstructions call.\n\t\t * @property _dirty\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t **/\n\t\tthis._dirty = false;\n\n\t\t/**\n\t\t * Index to draw from if a store operation has happened.\n\t\t * @property _storeIndex\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._storeIndex = 0;\n\n\t// setup:\n\t\tthis.clear();\n\t}\n\tvar p = Graphics.prototype;\n\tvar G = Graphics; // shortcut\n\n// static public methods:\n\t/**\n\t * Returns a CSS compatible color string based on the specified RGB numeric color values in the format\n\t * \"rgba(255,255,255,1.0)\", or if alpha is null then in the format \"rgb(255,255,255)\". For example,\n\t *\n\t *      createjs.Graphics.getRGB(50, 100, 150, 0.5);\n\t *      // Returns \"rgba(50,100,150,0.5)\"\n\t *\n\t * It also supports passing a single hex color value as the first param, and an optional alpha value as the second\n\t * param. For example,\n\t *\n\t *      createjs.Graphics.getRGB(0xFF00FF, 0.2);\n\t *      // Returns \"rgba(255,0,255,0.2)\"\n\t *\n\t * @method getRGB\n\t * @static\n\t * @param {Number} r The red component for the color, between 0 and 0xFF (255).\n\t * @param {Number} g The green component for the color, between 0 and 0xFF (255).\n\t * @param {Number} b The blue component for the color, between 0 and 0xFF (255).\n\t * @param {Number} [alpha] The alpha component for the color where 0 is fully transparent and 1 is fully opaque.\n\t * @return {String} A CSS compatible color string based on the specified RGB numeric color values in the format\n\t * \"rgba(255,255,255,1.0)\", or if alpha is null then in the format \"rgb(255,255,255)\".\n\t **/\n\tGraphics.getRGB = function(r, g, b, alpha) {\n\t\tif (r != null && b == null) {\n\t\t\talpha = g;\n\t\t\tb = r&0xFF;\n\t\t\tg = r>>8&0xFF;\n\t\t\tr = r>>16&0xFF;\n\t\t}\n\t\tif (alpha == null) {\n\t\t\treturn \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\n\t\t} else {\n\t\t\treturn \"rgba(\"+r+\",\"+g+\",\"+b+\",\"+alpha+\")\";\n\t\t}\n\t};\n\n\t/**\n\t * Returns a CSS compatible color string based on the specified HSL numeric color values in the format \"hsla(360,100,100,1.0)\",\n\t * or if alpha is null then in the format \"hsl(360,100,100)\".\n\t *\n\t *      createjs.Graphics.getHSL(150, 100, 70);\n\t *      // Returns \"hsl(150,100,70)\"\n\t *\n\t * @method getHSL\n\t * @static\n\t * @param {Number} hue The hue component for the color, between 0 and 360.\n\t * @param {Number} saturation The saturation component for the color, between 0 and 100.\n\t * @param {Number} lightness The lightness component for the color, between 0 and 100.\n\t * @param {Number} [alpha] The alpha component for the color where 0 is fully transparent and 1 is fully opaque.\n\t * @return {String} A CSS compatible color string based on the specified HSL numeric color values in the format\n\t * \"hsla(360,100,100,1.0)\", or if alpha is null then in the format \"hsl(360,100,100)\".\n\t **/\n\tGraphics.getHSL = function(hue, saturation, lightness, alpha) {\n\t\tif (alpha == null) {\n\t\t\treturn \"hsl(\"+(hue%360)+\",\"+saturation+\"%,\"+lightness+\"%)\";\n\t\t} else {\n\t\t\treturn \"hsla(\"+(hue%360)+\",\"+saturation+\"%,\"+lightness+\"%,\"+alpha+\")\";\n\t\t}\n\t};\n\n\n// static properties:\n\t/**\n\t * A reusable instance of {{#crossLink \"Graphics/BeginPath\"}}{{/crossLink}} to avoid\n\t * unnecessary instantiation.\n\t * @property beginCmd\n\t * @type {Graphics.BeginPath}\n\t * @static\n\t **/\n\t // defined at the bottom of this file.\n\n\t/**\n\t * Map of Base64 characters to values. Used by {{#crossLink \"Graphics/decodePath\"}}{{/crossLink}}.\n\t * @property BASE_64\n\t * @static\n\t * @final\n\t * @readonly\n\t * @type {Object}\n\t **/\n\tGraphics.BASE_64 = {\"A\":0,\"B\":1,\"C\":2,\"D\":3,\"E\":4,\"F\":5,\"G\":6,\"H\":7,\"I\":8,\"J\":9,\"K\":10,\"L\":11,\"M\":12,\"N\":13,\"O\":14,\"P\":15,\"Q\":16,\"R\":17,\"S\":18,\"T\":19,\"U\":20,\"V\":21,\"W\":22,\"X\":23,\"Y\":24,\"Z\":25,\"a\":26,\"b\":27,\"c\":28,\"d\":29,\"e\":30,\"f\":31,\"g\":32,\"h\":33,\"i\":34,\"j\":35,\"k\":36,\"l\":37,\"m\":38,\"n\":39,\"o\":40,\"p\":41,\"q\":42,\"r\":43,\"s\":44,\"t\":45,\"u\":46,\"v\":47,\"w\":48,\"x\":49,\"y\":50,\"z\":51,\"0\":52,\"1\":53,\"2\":54,\"3\":55,\"4\":56,\"5\":57,\"6\":58,\"7\":59,\"8\":60,\"9\":61,\"+\":62,\"/\":63};\n\n\t/**\n\t * Maps numeric values for the caps parameter of {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} to\n\t * corresponding string values. This is primarily for use with the tiny API. The mappings are as follows: 0 to\n\t * \"butt\", 1 to \"round\", and 2 to \"square\".\n\t * For example, to set the line caps to \"square\":\n\t *\n\t *      myGraphics.ss(16, 2);\n\t *\n\t * @property STROKE_CAPS_MAP\n\t * @static\n\t * @final\n\t * @readonly\n\t * @type {Array}\n\t **/\n\tGraphics.STROKE_CAPS_MAP = [\"butt\", \"round\", \"square\"];\n\n\t/**\n\t * Maps numeric values for the joints parameter of {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} to\n\t * corresponding string values. This is primarily for use with the tiny API. The mappings are as follows: 0 to\n\t * \"miter\", 1 to \"round\", and 2 to \"bevel\".\n\t * For example, to set the line joints to \"bevel\":\n\t *\n\t *      myGraphics.ss(16, 0, 2);\n\t *\n\t * @property STROKE_JOINTS_MAP\n\t * @static\n\t * @final\n\t * @readonly\n\t * @type {Array}\n\t **/\n\tGraphics.STROKE_JOINTS_MAP = [\"miter\", \"round\", \"bevel\"];\n\n\t/**\n\t * @property _ctx\n\t * @static\n\t * @protected\n\t * @type {CanvasRenderingContext2D}\n\t **/\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\n\tif (canvas.getContext) {\n\t\tGraphics._ctx = canvas.getContext(\"2d\");\n\t\tcanvas.width = canvas.height = 1;\n\t}\n\n\n// getter / setters:\n\t/**\n\t * Use the {{#crossLink \"Graphics/instructions:property\"}}{{/crossLink}} property instead.\n\t * @method _getInstructions\n\t * @protected\n\t * @return {Array} The instructions array, useful for chaining\n\t **/\n\tp._getInstructions = function() {\n\t\tthis._updateInstructions();\n\t\treturn this._instructions;\n\t};\n\t// Graphics.getInstructions is @deprecated. Remove for 1.1+\n\tp.getInstructions = createjs.deprecate(p._getInstructions, \"Graphics.getInstructions\");\n\n\t/**\n\t * Returns the graphics instructions array. Each entry is a graphics command object (ex. Graphics.Fill, Graphics.Rect)\n\t * Modifying the returned array directly is not recommended, and is likely to result in unexpected behaviour.\n\t *\n\t * This property is mainly intended for introspection of the instructions (ex. for graphics export).\n\t * @property instructions\n\t * @type {Array}\n\t * @readonly\n\t **/\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tinstructions: { get: p._getInstructions }\n\t\t});\n\t} catch (e) {}\n\n\n// public methods:\n\t/**\n\t * Returns true if this Graphics instance has no drawing commands.\n\t * @method isEmpty\n\t * @return {Boolean} Returns true if this Graphics instance has no drawing commands.\n\t **/\n\tp.isEmpty = function() {\n\t\treturn !(this._instructions.length || this._activeInstructions.length);\n\t};\n\n\t/**\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Object} data Optional data that is passed to graphics command exec methods. When called from a Shape instance, the shape passes itself as the data parameter. This can be used by custom graphic commands to insert contextual data.\n\t **/\n\tp.draw = function(ctx, data) {\n\t\tthis._updateInstructions();\n\t\tvar instr = this._instructions;\n\t\tfor (var i=this._storeIndex, l=instr.length; i<l; i++) {\n\t\t\tinstr[i].exec(ctx, data);\n\t\t}\n\t};\n\n\t/**\n\t * Draws only the path described for this Graphics instance, skipping any non-path instructions, including fill and\n\t * stroke descriptions. Used for <code>DisplayObject.mask</code> to draw the clipping path, for example.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method drawAsPath\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t **/\n\tp.drawAsPath = function(ctx) {\n\t\tthis._updateInstructions();\n\t\tvar instr, instrs = this._instructions;\n\t\tfor (var i=this._storeIndex, l=instrs.length; i<l; i++) {\n\t\t\t// the first command is always a beginPath command.\n\t\t\tif ((instr = instrs[i]).path !== false) { instr.exec(ctx); }\n\t\t}\n\t};\n\n\n// public methods that map directly to context 2D calls:\n\t/**\n\t * Moves the drawing point to the specified position. A tiny API method \"mt\" also exists.\n\t * @method moveTo\n\t * @param {Number} x The x coordinate the drawing point should move to.\n\t * @param {Number} y The y coordinate the drawing point should move to.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls).\n\t * @chainable\n\t **/\n\tp.moveTo = function(x, y) {\n\t\treturn this.append(new G.MoveTo(x,y), true);\n\t};\n\n\t/**\n\t * Draws a line from the current drawing point to the specified position, which become the new current drawing\n\t * point. Note that you *must* call {{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} before the first `lineTo()`.\n\t * A tiny API method \"lt\" also exists.\n\t *\n\t * For detailed information, read the\n\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#complex-shapes-(paths)\">\n\t * whatwg spec</a>.\n\t * @method lineTo\n\t * @param {Number} x The x coordinate the drawing point should draw to.\n\t * @param {Number} y The y coordinate the drawing point should draw to.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.lineTo = function(x, y) {\n\t\treturn this.append(new G.LineTo(x,y));\n\t};\n\n\t/**\n\t * Draws an arc with the specified control points and radius.  For detailed information, read the\n\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-arcto\">\n\t * whatwg spec</a>. A tiny API method \"at\" also exists.\n\t * @method arcTo\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @param {Number} x2\n\t * @param {Number} y2\n\t * @param {Number} radius\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.arcTo = function(x1, y1, x2, y2, radius) {\n\t\treturn this.append(new G.ArcTo(x1, y1, x2, y2, radius));\n\t};\n\n\t/**\n\t * Draws an arc defined by the radius, startAngle and endAngle arguments, centered at the position (x, y). For\n\t * example, to draw a full circle with a radius of 20 centered at (100, 100):\n\t *\n\t *      arc(100, 100, 20, 0, Math.PI*2);\n\t *\n\t * For detailed information, read the\n\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-arc\">whatwg spec</a>.\n\t * A tiny API method \"a\" also exists.\n\t * @method arc\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} radius\n\t * @param {Number} startAngle Measured in radians.\n\t * @param {Number} endAngle Measured in radians.\n\t * @param {Boolean} anticlockwise\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.arc = function(x, y, radius, startAngle, endAngle, anticlockwise) {\n\t\treturn this.append(new G.Arc(x, y, radius, startAngle, endAngle, anticlockwise));\n\t};\n\n\t/**\n\t * Draws a quadratic curve from the current drawing point to (x, y) using the control point (cpx, cpy). For detailed\n\t * information, read the <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-quadraticcurveto\">\n\t * whatwg spec</a>. A tiny API method \"qt\" also exists.\n\t * @method quadraticCurveTo\n\t * @param {Number} cpx\n\t * @param {Number} cpy\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.quadraticCurveTo = function(cpx, cpy, x, y) {\n\t\treturn this.append(new G.QuadraticCurveTo(cpx, cpy, x, y));\n\t};\n\n\t/**\n\t * Draws a bezier curve from the current drawing point to (x, y) using the control points (cp1x, cp1y) and (cp2x,\n\t * cp2y). For detailed information, read the\n\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-beziercurveto\">\n\t * whatwg spec</a>. A tiny API method \"bt\" also exists.\n\t * @method bezierCurveTo\n\t * @param {Number} cp1x\n\t * @param {Number} cp1y\n\t * @param {Number} cp2x\n\t * @param {Number} cp2y\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\n\t\treturn this.append(new G.BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y));\n\t};\n\n\t/**\n\t * Draws a rectangle at (x, y) with the specified width and height using the current fill and/or stroke.\n\t * For detailed information, read the\n\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-rect\">\n\t * whatwg spec</a>. A tiny API method \"r\" also exists.\n\t * @method rect\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w Width of the rectangle\n\t * @param {Number} h Height of the rectangle\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.rect = function(x, y, w, h) {\n\t\treturn this.append(new G.Rect(x, y, w, h));\n\t};\n\n\t/**\n\t * Closes the current path, effectively drawing a line from the current drawing point to the first drawing point specified\n\t * since the fill or stroke was last set. A tiny API method \"cp\" also exists.\n\t * @method closePath\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.closePath = function() {\n\t\treturn this._activeInstructions.length ? this.append(new G.ClosePath()) : this;\n\t};\n\n\n// public methods that roughly map to Adobe Flash/Animate graphics APIs:\n\t/**\n\t * Clears all drawing instructions, effectively resetting this Graphics instance. Any line and fill styles will need\n\t * to be redefined to draw shapes following a clear call. A tiny API method \"c\" also exists.\n\t * @method clear\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.clear = function() {\n\t\tthis._instructions.length = this._activeInstructions.length = this._commitIndex = 0;\n\t\tthis._strokeStyle = this._oldStrokeStyle = this._stroke = this._fill = this._strokeDash = this._oldStrokeDash = null;\n\t\tthis._dirty = this._strokeIgnoreScale = false;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Begins a fill with the specified color. This ends the current sub-path. A tiny API method \"f\" also exists.\n\t * @method beginFill\n\t * @param {String} color A CSS compatible color value (ex. \"red\", \"#FF0000\", or \"rgba(255,0,0,0.5)\"). Setting to\n\t * null will result in no fill.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginFill = function(color) {\n\t\treturn this._setFill(color ? new G.Fill(color) : null);\n\t};\n\n\t/**\n\t * Begins a linear gradient fill defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For\n\t * example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a\n\t * square to display it:\n\t *\n\t *      myGraphics.beginLinearGradientFill([\"#000\",\"#FFF\"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);\n\t *\n\t * A tiny API method \"lf\" also exists.\n\t * @method beginLinearGradientFill\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define a gradient\n\t * drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw\n\t * the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginLinearGradientFill = function(colors, ratios, x0, y0, x1, y1) {\n\t\treturn this._setFill(new G.Fill().linearGradient(colors, ratios, x0, y0, x1, y1));\n\t};\n\n\t/**\n\t * Begins a radial gradient fill. This ends the current sub-path. For example, the following code defines a red to\n\t * blue radial gradient centered at (100, 100), with a radius of 50, and draws a circle to display it:\n\t *\n\t *      myGraphics.beginRadialGradientFill([\"#F00\",\"#00F\"], [0, 1], 100, 100, 0, 100, 100, 50).drawCircle(100, 100, 50);\n\t *\n\t * A tiny API method \"rf\" also exists.\n\t * @method beginRadialGradientFill\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginRadialGradientFill = function(colors, ratios, x0, y0, r0, x1, y1, r1) {\n\t\treturn this._setFill(new G.Fill().radialGradient(colors, ratios, x0, y0, r0, x1, y1, r1));\n\t};\n\n\t/**\n\t * Begins a pattern fill using the specified image. This ends the current sub-path. A tiny API method \"bf\" also\n\t * exists.\n\t * @method beginBitmapFill\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\n\t * as the pattern. Must be loaded prior to creating a bitmap fill, or the fill will be empty.\n\t * @param {String} repetition Optional. Indicates whether to repeat the image in the fill area. One of \"repeat\",\n\t * \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\". Note that Firefox does not support \"repeat-x\" or\n\t * \"repeat-y\" (latest tests were in FF 20.0), and will default to \"repeat\".\n\t * @param {Matrix2D} matrix Optional. Specifies a transformation matrix for the bitmap fill. This transformation\n\t * will be applied relative to the parent transform.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginBitmapFill = function(image, repetition, matrix) {\n\t\treturn this._setFill(new G.Fill(null,matrix).bitmap(image, repetition));\n\t};\n\n\t/**\n\t * Ends the current sub-path, and begins a new one with no fill. Functionally identical to <code>beginFill(null)</code>.\n\t * A tiny API method \"ef\" also exists.\n\t * @method endFill\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.endFill = function() {\n\t\treturn this.beginFill();\n\t};\n\n\t/**\n\t * Sets the stroke style. Like all drawing methods, this can be chained, so you can define\n\t * the stroke style and color in a single line of code like so:\n\t *\n\t * \tmyGraphics.setStrokeStyle(8,\"round\").beginStroke(\"#F00\");\n\t *\n\t * A tiny API method \"ss\" also exists.\n\t * @method setStrokeStyle\n\t * @param {Number} thickness The width of the stroke.\n\t * @param {String | Number} [caps=0] Indicates the type of caps to use at the end of lines. One of butt,\n\t * round, or square. Defaults to \"butt\". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with\n\t * the tiny API.\n\t * @param {String | Number} [joints=0] Specifies the type of joints that should be used where two lines meet.\n\t * One of bevel, round, or miter. Defaults to \"miter\". Also accepts the values 0 (miter), 1 (round), and 2 (bevel)\n\t * for use with the tiny API.\n\t * @param {Number} [miterLimit=10] If joints is set to \"miter\", then you can specify a miter limit ratio which\n\t * controls at what point a mitered joint will be clipped.\n\t * @param {Boolean} [ignoreScale=false] If true, the stroke will be drawn at the specified thickness regardless\n\t * of active transformations.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.setStrokeStyle = function(thickness, caps, joints, miterLimit, ignoreScale) {\n\t\tthis._updateInstructions(true);\n\t\tthis._strokeStyle = this.command = new G.StrokeStyle(thickness, caps, joints, miterLimit, ignoreScale);\n\n\t\t// ignoreScale lives on Stroke, not StrokeStyle, so we do a little trickery:\n\t\tif (this._stroke) { this._stroke.ignoreScale = ignoreScale; }\n\t\tthis._strokeIgnoreScale = ignoreScale;\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Sets or clears the stroke dash pattern.\n\t *\n\t * \tmyGraphics.setStrokeDash([20, 10], 0);\n\t *\n\t * A tiny API method `sd` also exists.\n\t * @method setStrokeDash\n\t * @param {Array} [segments] An array specifying the dash pattern, alternating between line and gap.\n\t * For example, `[20,10]` would create a pattern of 20 pixel lines with 10 pixel gaps between them.\n\t * Passing null or an empty array will clear the existing stroke dash.\n\t * @param {Number} [offset=0] The offset of the dash pattern. For example, you could increment this value to create a \"marching ants\" effect.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.setStrokeDash = function(segments, offset) {\n\t\tthis._updateInstructions(true);\n\t\tthis._strokeDash = this.command = new G.StrokeDash(segments, offset);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Begins a stroke with the specified color. This ends the current sub-path. A tiny API method \"s\" also exists.\n\t * @method beginStroke\n\t * @param {String} color A CSS compatible color value (ex. \"#FF0000\", \"red\", or \"rgba(255,0,0,0.5)\"). Setting to\n\t * null will result in no stroke.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginStroke = function(color) {\n\t\treturn this._setStroke(color ? new G.Stroke(color) : null);\n\t};\n\n\t/**\n\t * Begins a linear gradient stroke defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For\n\t * example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a\n\t * square to display it:\n\t *\n\t *      myGraphics.setStrokeStyle(10).\n\t *          beginLinearGradientStroke([\"#000\",\"#FFF\"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);\n\t *\n\t * A tiny API method \"ls\" also exists.\n\t * @method beginLinearGradientStroke\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginLinearGradientStroke = function(colors, ratios, x0, y0, x1, y1) {\n\t\treturn this._setStroke(new G.Stroke().linearGradient(colors, ratios, x0, y0, x1, y1));\n\t};\n\n\t/**\n\t * Begins a radial gradient stroke. This ends the current sub-path. For example, the following code defines a red to\n\t * blue radial gradient centered at (100, 100), with a radius of 50, and draws a rectangle to display it:\n\t *\n\t *      myGraphics.setStrokeStyle(10)\n\t *          .beginRadialGradientStroke([\"#F00\",\"#00F\"], [0, 1], 100, 100, 0, 100, 100, 50)\n\t *          .drawRect(50, 90, 150, 110);\n\t *\n\t * A tiny API method \"rs\" also exists.\n\t * @method beginRadialGradientStroke\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%, then draw the second color\n\t * to 100%.\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginRadialGradientStroke = function(colors, ratios, x0, y0, r0, x1, y1, r1) {\n\t\treturn this._setStroke(new G.Stroke().radialGradient(colors, ratios, x0, y0, r0, x1, y1, r1));\n\t};\n\n\t/**\n\t * Begins a pattern fill using the specified image. This ends the current sub-path. Note that unlike bitmap fills,\n\t * strokes do not currently support a matrix parameter due to limitations in the canvas API. A tiny API method \"bs\"\n\t * also exists.\n\t * @method beginBitmapStroke\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\n\t * as the pattern. Must be loaded prior to creating a bitmap fill, or the fill will be empty.\n\t * @param {String} [repetition=repeat] Optional. Indicates whether to repeat the image in the fill area. One of\n\t * \"repeat\", \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\".\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.beginBitmapStroke = function(image, repetition) {\n\t\t// NOTE: matrix is not supported for stroke because transforms on strokes also affect the drawn stroke width.\n\t\treturn this._setStroke(new G.Stroke().bitmap(image, repetition));\n\t};\n\n\t/**\n\t * Ends the current sub-path, and begins a new one with no stroke. Functionally identical to <code>beginStroke(null)</code>.\n\t * A tiny API method \"es\" also exists.\n\t * @method endStroke\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.endStroke = function() {\n\t\treturn this.beginStroke();\n\t};\n\n\t/**\n\t * Maps the familiar ActionScript <code>curveTo()</code> method to the functionally similar {{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}}\n\t * method.\n\t * @method curveTo\n\t * @param {Number} cpx\n\t * @param {Number} cpy\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.curveTo = p.quadraticCurveTo;\n\n\t/**\n\t *\n\t * Maps the familiar ActionScript <code>drawRect()</code> method to the functionally similar {{#crossLink \"Graphics/rect\"}}{{/crossLink}}\n\t * method.\n\t * @method drawRect\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w Width of the rectangle\n\t * @param {Number} h Height of the rectangle\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawRect = p.rect;\n\n\t/**\n\t * Draws a rounded rectangle with all corners with the specified radius.\n\t * @method drawRoundRect\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w\n\t * @param {Number} h\n\t * @param {Number} radius Corner radius.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawRoundRect = function(x, y, w, h, radius) {\n\t\treturn this.drawRoundRectComplex(x, y, w, h, radius, radius, radius, radius);\n\t};\n\n\t/**\n\t * Draws a rounded rectangle with different corner radii. Supports positive and negative corner radii. A tiny API\n\t * method \"rc\" also exists.\n\t * @method drawRoundRectComplex\n\t * @param {Number} x The horizontal coordinate to draw the round rect.\n\t * @param {Number} y The vertical coordinate to draw the round rect.\n\t * @param {Number} w The width of the round rect.\n\t * @param {Number} h The height of the round rect.\n\t * @param {Number} radiusTL Top left corner radius.\n\t * @param {Number} radiusTR Top right corner radius.\n\t * @param {Number} radiusBR Bottom right corner radius.\n\t * @param {Number} radiusBL Bottom left corner radius.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawRoundRectComplex = function(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL) {\n\t\treturn this.append(new G.RoundRect(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL));\n\t};\n\n\t/**\n\t * Draws a circle with the specified radius at (x, y).\n\t *\n\t *      var g = new createjs.Graphics();\n\t *\t    g.setStrokeStyle(1);\n\t *\t    g.beginStroke(createjs.Graphics.getRGB(0,0,0));\n\t *\t    g.beginFill(createjs.Graphics.getRGB(255,0,0));\n\t *\t    g.drawCircle(0,0,3);\n\t *\n\t *\t    var s = new createjs.Shape(g);\n\t *\t\ts.x = 100;\n\t *\t\ts.y = 100;\n\t *\n\t *\t    stage.addChild(s);\n\t *\t    stage.update();\n\t *\n\t * A tiny API method \"dc\" also exists.\n\t * @method drawCircle\n\t * @param {Number} x x coordinate center point of circle.\n\t * @param {Number} y y coordinate center point of circle.\n\t * @param {Number} radius Radius of circle.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawCircle = function(x, y, radius) {\n\t\treturn this.append(new G.Circle(x, y, radius));\n\t};\n\n\t/**\n\t * Draws an ellipse (oval) with a specified width (w) and height (h). Similar to {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}},\n\t * except the width and height can be different. A tiny API method \"de\" also exists.\n\t * @method drawEllipse\n\t * @param {Number} x The left coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\n\t * which draws from center.\n\t * @param {Number} y The top coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\n\t * which draws from the center.\n\t * @param {Number} w The height (horizontal diameter) of the ellipse. The horizontal radius will be half of this\n\t * number.\n\t * @param {Number} h The width (vertical diameter) of the ellipse. The vertical radius will be half of this number.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawEllipse = function(x, y, w, h) {\n\t\treturn this.append(new G.Ellipse(x, y, w, h));\n\t};\n\n\t/**\n\t * Draws a star if pointSize is greater than 0, or a regular polygon if pointSize is 0 with the specified number of\n\t * points. For example, the following code will draw a familiar 5 pointed star shape centered at 100, 100 and with a\n\t * radius of 50:\n\t *\n\t *      myGraphics.beginFill(\"#FF0\").drawPolyStar(100, 100, 50, 5, 0.6, -90);\n\t *      // Note: -90 makes the first point vertical\n\t *\n\t * A tiny API method \"dp\" also exists.\n\t *\n\t * @method drawPolyStar\n\t * @param {Number} x Position of the center of the shape.\n\t * @param {Number} y Position of the center of the shape.\n\t * @param {Number} radius The outer radius of the shape.\n\t * @param {Number} sides The number of points on the star or sides on the polygon.\n\t * @param {Number} pointSize The depth or \"pointy-ness\" of the star points. A pointSize of 0 will draw a regular\n\t * polygon (no points), a pointSize of 1 will draw nothing because the points are infinitely pointy.\n\t * @param {Number} angle The angle of the first point / corner. For example a value of 0 will draw the first point\n\t * directly to the right of the center.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.drawPolyStar = function(x, y, radius, sides, pointSize, angle) {\n\t\treturn this.append(new G.PolyStar(x, y, radius, sides, pointSize, angle));\n\t};\n\n\t/**\n\t * Appends a graphics command object to the graphics queue. Command objects expose an \"exec\" method\n\t * that accepts two parameters: the Context2D to operate on, and an arbitrary data object passed into\n\t * {{#crossLink \"Graphics/draw\"}}{{/crossLink}}. The latter will usually be the Shape instance that called draw.\n\t *\n\t * This method is used internally by Graphics methods, such as drawCircle, but can also be used directly to insert\n\t * built-in or custom graphics commands. For example:\n\t *\n\t * \t\t// attach data to our shape, so we can access it during the draw:\n\t * \t\tmyShape.color = \"red\";\n\t *\n\t * \t\t// append a Circle command object:\n\t * \t\tmyShape.graphics.append(new createjs.Graphics.Circle(50, 50, 30));\n\t *\n\t * \t\t// append a custom command object with an exec method that sets the fill style\n\t * \t\t// based on the shape's data, and then fills the circle.\n\t * \t\tmyShape.graphics.append({exec:function(ctx, shape) {\n\t * \t\t\tctx.fillStyle = shape.color;\n\t * \t\t\tctx.fill();\n\t * \t\t}});\n\t *\n\t * @method append\n\t * @param {Object} command A graphics command object exposing an \"exec\" method.\n\t * @param {boolean} clean The clean param is primarily for internal use. A value of true indicates that a command does not generate a path that should be stroked or filled.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.append = function(command, clean) {\n\t\tthis._activeInstructions.push(command);\n\t\tthis.command = command;\n\t\tif (!clean) { this._dirty = true; }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Decodes a compact encoded path string into a series of draw instructions.\n\t * This format is not intended to be human readable, and is meant for use by authoring tools.\n\t * The format uses a base64 character set, with each character representing 6 bits, to define a series of draw\n\t * commands.\n\t *\n\t * Each command is comprised of a single \"header\" character followed by a variable number of alternating x and y\n\t * position values. Reading the header bits from left to right (most to least significant): bits 1 to 3 specify the\n\t * type of operation (0-moveTo, 1-lineTo, 2-quadraticCurveTo, 3-bezierCurveTo, 4-closePath, 5-7 unused). Bit 4\n\t * indicates whether position values use 12 bits (2 characters) or 18 bits (3 characters), with a one indicating the\n\t * latter. Bits 5 and 6 are currently unused.\n\t *\n\t * Following the header is a series of 0 (closePath), 2 (moveTo, lineTo), 4 (quadraticCurveTo), or 6 (bezierCurveTo)\n\t * parameters. These parameters are alternating x/y positions represented by 2 or 3 characters (as indicated by the\n\t * 4th bit in the command char). These characters consist of a 1 bit sign (1 is negative, 0 is positive), followed\n\t * by an 11 (2 char) or 17 (3 char) bit integer value. All position values are in tenths of a pixel. Except in the\n\t * case of move operations which are absolute, this value is a delta from the previous x or y position (as\n\t * appropriate).\n\t *\n\t * For example, the string \"A3cAAMAu4AAA\" represents a line starting at -150,0 and ending at 150,0.\n\t * <br />A - bits 000000. First 3 bits (000) indicate a moveTo operation. 4th bit (0) indicates 2 chars per\n\t * parameter.\n\t * <br />n0 - 110111011100. Absolute x position of -150.0px. First bit indicates a negative value, remaining bits\n\t * indicate 1500 tenths of a pixel.\n\t * <br />AA - 000000000000. Absolute y position of 0.\n\t * <br />I - 001100. First 3 bits (001) indicate a lineTo operation. 4th bit (1) indicates 3 chars per parameter.\n\t * <br />Au4 - 000000101110111000. An x delta of 300.0px, which is added to the previous x value of -150.0px to\n\t * provide an absolute position of +150.0px.\n\t * <br />AAA - 000000000000000000. A y delta value of 0.\n\t *\n\t * A tiny API method \"p\" also exists.\n\t * @method decodePath\n\t * @param {String} str The path string to decode.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.decodePath = function(str) {\n\t\tvar instructions = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath];\n\t\tvar paramCount = [2, 2, 4, 6, 0];\n\t\tvar i=0, l=str.length;\n\t\tvar params = [];\n\t\tvar x=0, y=0;\n\t\tvar base64 = Graphics.BASE_64;\n\n\t\twhile (i<l) {\n\t\t\tvar c = str.charAt(i);\n\t\t\tvar n = base64[c];\n\t\t\tvar fi = n>>3; // highest order bits 1-3 code for operation.\n\t\t\tvar f = instructions[fi];\n\t\t\t// check that we have a valid instruction & that the unused bits are empty:\n\t\t\tif (!f || (n&3)) { throw(\"bad path data (@\"+i+\"): \"+c); }\n\t\t\tvar pl = paramCount[fi];\n\t\t\tif (!fi) { x=y=0; } // move operations reset the position.\n\t\t\tparams.length = 0;\n\t\t\ti++;\n\t\t\tvar charCount = (n>>2&1)+2;  // 4th header bit indicates number size for this operation.\n\t\t\tfor (var p=0; p<pl; p++) {\n\t\t\t\tvar num = base64[str.charAt(i)];\n\t\t\t\tvar sign = (num>>5) ? -1 : 1;\n\t\t\t\tnum = ((num&31)<<6)|(base64[str.charAt(i+1)]);\n\t\t\t\tif (charCount == 3) { num = (num<<6)|(base64[str.charAt(i+2)]); }\n\t\t\t\tnum = sign*num/10;\n\t\t\t\tif (p%2) { x = (num += x); }\n\t\t\t\telse { y = (num += y); }\n\t\t\t\tparams[p] = num;\n\t\t\t\ti += charCount;\n\t\t\t}\n\t\t\tf.apply(this,params);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Stores all graphics commands so they won't be executed in future draws. Calling store() a second time adds to\n\t * the existing store. This also affects `drawAsPath()`.\n\t *\n\t * This is useful in cases where you are creating vector graphics in an iterative manner (ex. generative art), so\n\t * that only new graphics need to be drawn (which can provide huge performance benefits), but you wish to retain all\n\t * of the vector instructions for later use (ex. scaling, modifying, or exporting).\n\t *\n\t * Note that calling store() will force the active path (if any) to be ended in a manner similar to changing\n\t * the fill or stroke.\n\t *\n\t * For example, consider a application where the user draws lines with the mouse. As each line segment (or collection of\n\t * segments) are added to a Shape, it can be rasterized using {{#crossLink \"DisplayObject/updateCache\"}}{{/crossLink}},\n\t * and then stored, so that it can be redrawn at a different scale when the application is resized, or exported to SVG.\n\t *\n\t * \t// set up cache:\n\t * \tmyShape.cache(0,0,500,500,scale);\n\t *\n\t * \t// when the user drags, draw a new line:\n\t * \tmyShape.graphics.moveTo(oldX,oldY).lineTo(newX,newY);\n\t * \t// then draw it into the existing cache:\n\t * \tmyShape.updateCache(\"source-over\");\n\t * \t// store the new line, so it isn't redrawn next time:\n\t * \tmyShape.store();\n\t *\n\t * \t// then, when the window resizes, we can re-render at a different scale:\n\t * \t// first, unstore all our lines:\n\t * \tmyShape.unstore();\n\t * \t// then cache using the new scale:\n\t * \tmyShape.cache(0,0,500,500,newScale);\n\t * \t// finally, store the existing commands again:\n\t * \tmyShape.store();\n\t *\n\t * @method store\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.store = function() {\n\t\tthis._updateInstructions(true);\n\t\tthis._storeIndex = this._instructions.length;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Unstores any graphics commands that were previously stored using {{#crossLink \"Graphics/store\"}}{{/crossLink}}\n\t * so that they will be executed in subsequent draw calls.\n\t *\n\t * @method unstore\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.unstore = function() {\n\t\tthis._storeIndex = 0;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a clone of this Graphics instance. Note that the individual command objects are not cloned.\n\t * @method clone\n\t * @return {Graphics} A clone of the current Graphics instance.\n\t **/\n\tp.clone = function() {\n\t\tvar o = new Graphics();\n\t\to.command = this.command;\n\t\to._stroke = this._stroke;\n\t\to._strokeStyle = this._strokeStyle;\n\t\to._strokeDash = this._strokeDash;\n\t\to._strokeIgnoreScale = this._strokeIgnoreScale;\n\t\to._fill = this._fill;\n\t\to._instructions = this._instructions.slice();\n\t\to._commitIndex = this._commitIndex;\n\t\to._activeInstructions = this._activeInstructions.slice();\n\t\to._dirty = this._dirty;\n\t\to._storeIndex = this._storeIndex;\n\t\treturn o;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Graphics]\";\n\t};\n\n\n// tiny API:\n\t/**\n\t * Shortcut to moveTo.\n\t * @method mt\n\t * @param {Number} x The x coordinate the drawing point should move to.\n\t * @param {Number} y The y coordinate the drawing point should move to.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls).\n\t * @chainable\n\t * @protected\n\t **/\n\tp.mt = p.moveTo;\n\n\t/**\n\t * Shortcut to lineTo.\n\t * @method lt\n\t * @param {Number} x The x coordinate the drawing point should draw to.\n\t * @param {Number} y The y coordinate the drawing point should draw to.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.lt = p.lineTo;\n\n\t/**\n\t * Shortcut to arcTo.\n\t * @method at\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @param {Number} x2\n\t * @param {Number} y2\n\t * @param {Number} radius\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.at = p.arcTo;\n\n\t/**\n\t * Shortcut to bezierCurveTo.\n\t * @method bt\n\t * @param {Number} cp1x\n\t * @param {Number} cp1y\n\t * @param {Number} cp2x\n\t * @param {Number} cp2y\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.bt = p.bezierCurveTo;\n\n\t/**\n\t * Shortcut to quadraticCurveTo / curveTo.\n\t * @method qt\n\t * @param {Number} cpx\n\t * @param {Number} cpy\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @protected\n\t * @chainable\n\t **/\n\tp.qt = p.quadraticCurveTo;\n\n\t/**\n\t * Shortcut to arc.\n\t * @method a\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} radius\n\t * @param {Number} startAngle Measured in radians.\n\t * @param {Number} endAngle Measured in radians.\n\t * @param {Boolean} anticlockwise\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @protected\n\t * @chainable\n\t **/\n\tp.a = p.arc;\n\n\t/**\n\t * Shortcut to rect.\n\t * @method r\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w Width of the rectangle\n\t * @param {Number} h Height of the rectangle\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.r = p.rect;\n\n\t/**\n\t * Shortcut to closePath.\n\t * @method cp\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.cp = p.closePath;\n\n\t/**\n\t * Shortcut to clear.\n\t * @method c\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.c = p.clear;\n\n\t/**\n\t * Shortcut to beginFill.\n\t * @method f\n\t * @param {String} color A CSS compatible color value (ex. \"red\", \"#FF0000\", or \"rgba(255,0,0,0.5)\"). Setting to\n\t * null will result in no fill.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.f = p.beginFill;\n\n\t/**\n\t * Shortcut to beginLinearGradientFill.\n\t * @method lf\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define a gradient\n\t * drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw\n\t * the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.lf = p.beginLinearGradientFill;\n\n\t/**\n\t * Shortcut to beginRadialGradientFill.\n\t * @method rf\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.rf = p.beginRadialGradientFill;\n\n\t/**\n\t * Shortcut to beginBitmapFill.\n\t * @method bf\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\n\t * as the pattern.\n\t * @param {String} repetition Optional. Indicates whether to repeat the image in the fill area. One of \"repeat\",\n\t * \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\". Note that Firefox does not support \"repeat-x\" or\n\t * \"repeat-y\" (latest tests were in FF 20.0), and will default to \"repeat\".\n\t * @param {Matrix2D} matrix Optional. Specifies a transformation matrix for the bitmap fill. This transformation\n\t * will be applied relative to the parent transform.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.bf = p.beginBitmapFill;\n\n\t/**\n\t * Shortcut to endFill.\n\t * @method ef\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.ef = p.endFill;\n\n\t/**\n\t * Shortcut to setStrokeStyle.\n\t * @method ss\n\t * @param {Number} thickness The width of the stroke.\n\t * @param {String | Number} [caps=0] Indicates the type of caps to use at the end of lines. One of butt,\n\t * round, or square. Defaults to \"butt\". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with\n\t * the tiny API.\n\t * @param {String | Number} [joints=0] Specifies the type of joints that should be used where two lines meet.\n\t * One of bevel, round, or miter. Defaults to \"miter\". Also accepts the values 0 (miter), 1 (round), and 2 (bevel)\n\t * for use with the tiny API.\n\t * @param {Number} [miterLimit=10] If joints is set to \"miter\", then you can specify a miter limit ratio which\n\t * controls at what point a mitered joint will be clipped.\n\t * @param {Boolean} [ignoreScale=false] If true, the stroke will be drawn at the specified thickness regardless\n\t * of active transformations.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.ss = p.setStrokeStyle;\n\t\n\t/**\n\t * Shortcut to setStrokeDash.\n\t * @method sd\n\t * @param {Array} [segments] An array specifying the dash pattern, alternating between line and gap.\n\t * For example, [20,10] would create a pattern of 20 pixel lines with 10 pixel gaps between them.\n\t * Passing null or an empty array will clear any existing dash.\n\t * @param {Number} [offset=0] The offset of the dash pattern. For example, you could increment this value to create a \"marching ants\" effect.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.sd = p.setStrokeDash;\n\n\t/**\n\t * Shortcut to beginStroke.\n\t * @method s\n\t * @param {String} color A CSS compatible color value (ex. \"#FF0000\", \"red\", or \"rgba(255,0,0,0.5)\"). Setting to\n\t * null will result in no stroke.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.s = p.beginStroke;\n\n\t/**\n\t * Shortcut to beginLinearGradientStroke.\n\t * @method ls\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.ls = p.beginLinearGradientStroke;\n\n\t/**\n\t * Shortcut to beginRadialGradientStroke.\n\t * @method rs\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\n\t * a gradient drawing from red to blue.\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%, then draw the second color\n\t * to 100%.\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.rs = p.beginRadialGradientStroke;\n\n\t/**\n\t * Shortcut to beginBitmapStroke.\n\t * @method bs\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\n\t * as the pattern.\n\t * @param {String} [repetition=repeat] Optional. Indicates whether to repeat the image in the fill area. One of\n\t * \"repeat\", \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\".\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.bs = p.beginBitmapStroke;\n\n\t/**\n\t * Shortcut to endStroke.\n\t * @method es\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.es = p.endStroke;\n\n\t/**\n\t * Shortcut to drawRect.\n\t * @method dr\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w Width of the rectangle\n\t * @param {Number} h Height of the rectangle\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.dr = p.drawRect;\n\n\t/**\n\t * Shortcut to drawRoundRect.\n\t * @method rr\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w\n\t * @param {Number} h\n\t * @param {Number} radius Corner radius.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.rr = p.drawRoundRect;\n\n\t/**\n\t * Shortcut to drawRoundRectComplex.\n\t * @method rc\n\t * @param {Number} x The horizontal coordinate to draw the round rect.\n\t * @param {Number} y The vertical coordinate to draw the round rect.\n\t * @param {Number} w The width of the round rect.\n\t * @param {Number} h The height of the round rect.\n\t * @param {Number} radiusTL Top left corner radius.\n\t * @param {Number} radiusTR Top right corner radius.\n\t * @param {Number} radiusBR Bottom right corner radius.\n\t * @param {Number} radiusBL Bottom left corner radius.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.rc = p.drawRoundRectComplex;\n\n\t/**\n\t * Shortcut to drawCircle.\n\t * @method dc\n\t * @param {Number} x x coordinate center point of circle.\n\t * @param {Number} y y coordinate center point of circle.\n\t * @param {Number} radius Radius of circle.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.dc = p.drawCircle;\n\n\t/**\n\t * Shortcut to drawEllipse.\n\t * @method de\n\t * @param {Number} x The left coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\n\t * which draws from center.\n\t * @param {Number} y The top coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\n\t * which draws from the center.\n\t * @param {Number} w The height (horizontal diameter) of the ellipse. The horizontal radius will be half of this\n\t * number.\n\t * @param {Number} h The width (vertical diameter) of the ellipse. The vertical radius will be half of this number.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.de = p.drawEllipse;\n\n\t/**\n\t * Shortcut to drawPolyStar.\n\t * @method dp\n\t * @param {Number} x Position of the center of the shape.\n\t * @param {Number} y Position of the center of the shape.\n\t * @param {Number} radius The outer radius of the shape.\n\t * @param {Number} sides The number of points on the star or sides on the polygon.\n\t * @param {Number} pointSize The depth or \"pointy-ness\" of the star points. A pointSize of 0 will draw a regular\n\t * polygon (no points), a pointSize of 1 will draw nothing because the points are infinitely pointy.\n\t * @param {Number} angle The angle of the first point / corner. For example a value of 0 will draw the first point\n\t * directly to the right of the center.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.dp = p.drawPolyStar;\n\n\t/**\n\t * Shortcut to decodePath.\n\t * @method p\n\t * @param {String} str The path string to decode.\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t * @protected\n\t **/\n\tp.p = p.decodePath;\n\n\n// private methods:\n\t/**\n\t * @method _updateInstructions\n\t * @param commit\n\t * @protected\n\t **/\n\tp._updateInstructions = function(commit) {\n\t\tvar instr = this._instructions, active = this._activeInstructions, commitIndex = this._commitIndex;\n\n\t\tif (this._dirty && active.length) {\n\t\t\tinstr.length = commitIndex; // remove old, uncommitted commands\n\t\t\tinstr.push(Graphics.beginCmd);\n\n\t\t\tvar l = active.length, ll = instr.length;\n\t\t\tinstr.length = ll+l;\n\t\t\tfor (var i=0; i<l; i++) { instr[i+ll] = active[i]; }\n\n\t\t\tif (this._fill) { instr.push(this._fill); }\n\t\t\tif (this._stroke) {\n\t\t\t\t// doesn't need to be re-applied if it hasn't changed.\n\t\t\t\tif (this._strokeDash !== this._oldStrokeDash) {\n\t\t\t\t\tinstr.push(this._strokeDash);\n\t\t\t\t}\n\t\t\t\tif (this._strokeStyle !== this._oldStrokeStyle) {\n\t\t\t\t\tinstr.push(this._strokeStyle);\n\t\t\t\t}\n\t\t\t\tif (commit) {\n\t\t\t\t\tthis._oldStrokeStyle = this._strokeStyle;\n\t\t\t\t\tthis._oldStrokeDash = this._strokeDash;\n\t\t\t\t}\n\t\t\t\tinstr.push(this._stroke);\n\t\t\t}\n\n\t\t\tthis._dirty = false;\n\t\t}\n\n\t\tif (commit) {\n\t\t\tactive.length = 0;\n\t\t\tthis._commitIndex = instr.length;\n\t\t}\n\t};\n\n\t/**\n\t * @method _setFill\n\t * @param fill\n\t * @protected\n\t **/\n\tp._setFill = function(fill) {\n\t\tthis._updateInstructions(true);\n\t\tthis.command = this._fill = fill;\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method _setStroke\n\t * @param stroke\n\t * @protected\n\t **/\n\tp._setStroke = function(stroke) {\n\t\tthis._updateInstructions(true);\n\t\tif (this.command = this._stroke = stroke) {\n\t\t\tstroke.ignoreScale = this._strokeIgnoreScale;\n\t\t}\n\t\treturn this;\n\t};\n\n// Command Objects:\n\t/**\n\t * @namespace Graphics\n\t */\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/lineTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information. See {{#crossLink \"Graphics\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class LineTo\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.LineTo = function(x, y) {\n\t\tthis.x = x; this.y = y;\n\t}).prototype.exec = function(ctx) { ctx.lineTo(this.x,this.y); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class MoveTo\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx\n\t */\n\t(G.MoveTo = function(x, y) {\n\t\tthis.x = x; this.y = y;\n\t}).prototype.exec = function(ctx) { ctx.moveTo(this.x, this.y); };\n\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/arcTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class ArcTo\n\t * @constructor\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @param {Number} x2\n\t * @param {Number} y2\n\t * @param {Number} radius\n\t **/\n\t/**\n\t * @property x1\n\t * @type Number\n\t */\n\t/**\n\t * @property y1\n\t * @type Number\n\t */\n\t/**\n\t * @property x2\n\t * @type Number\n\t */\n\t/**\n\t * @property y2\n\t * @type Number\n\t */\n\t/**\n\t * @property radius\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.ArcTo = function(x1, y1, x2, y2, radius) {\n\t\tthis.x1 = x1; this.y1 = y1;\n\t\tthis.x2 = x2; this.y2 = y2;\n\t\tthis.radius = radius;\n\t}).prototype.exec = function(ctx) { ctx.arcTo(this.x1, this.y1, this.x2, this.y2, this.radius); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/arc\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Arc\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} radius\n\t * @param {Number} startAngle\n\t * @param {Number} endAngle\n\t * @param {Number} anticlockwise\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property radius\n\t * @type Number\n\t */\n\t/**\n\t * @property startAngle\n\t * @type Number\n\t */\n\t/**\n\t * @property endAngle\n\t * @type Number\n\t */\n\t/**\n\t * @property anticlockwise\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.Arc = function(x, y, radius, startAngle, endAngle, anticlockwise) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.radius = radius;\n\t\tthis.startAngle = startAngle; this.endAngle = endAngle;\n\t\tthis.anticlockwise = !!anticlockwise;\n\t}).prototype.exec = function(ctx) { ctx.arc(this.x, this.y, this.radius, this.startAngle, this.endAngle, this.anticlockwise); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class QuadraticCurveTo\n\t * @constructor\n\t * @param {Number} cpx\n\t * @param {Number} cpy\n\t * @param {Number} x\n\t * @param {Number} y\n\t **/\n\t/**\n\t * @property cpx\n\t * @type Number\n\t */\n\t/**\n\t * @property cpy\n\t * @type Number\n\t */\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.QuadraticCurveTo = function(cpx, cpy, x, y) {\n\t\tthis.cpx = cpx; this.cpy = cpy;\n\t\tthis.x = x; this.y = y;\n\t}).prototype.exec = function(ctx) { ctx.quadraticCurveTo(this.cpx, this.cpy, this.x, this.y); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/bezierCurveTo\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class BezierCurveTo\n\t * @constructor\n\t * @param {Number} cp1x\n\t * @param {Number} cp1y\n\t * @param {Number} cp2x\n\t * @param {Number} cp2y\n\t * @param {Number} x\n\t * @param {Number} y\n\t **/\n\t/**\n\t * @property cp1x\n\t * @type Number\n\t */\n\t/**\n\t * @property cp1y\n\t * @type Number\n\t */\n\t/**\n\t * @property cp2x\n\t * @type Number\n\t */\n\t/**\n\t * @property cp2y\n\t * @type Number\n\t */\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.BezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\n\t\tthis.cp1x = cp1x; this.cp1y = cp1y;\n\t\tthis.cp2x = cp2x; this.cp2y = cp2y;\n\t\tthis.x = x; this.y = y;\n\t}).prototype.exec = function(ctx) { ctx.bezierCurveTo(this.cp1x, this.cp1y, this.cp2x, this.cp2y, this.x, this.y); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/rect\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Rect\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w\n\t * @param {Number} h\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property w\n\t * @type Number\n\t */\n\t/**\n\t * @property h\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.Rect = function(x, y, w, h) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.w = w; this.h = h;\n\t}).prototype.exec = function(ctx) { ctx.rect(this.x, this.y, this.w, this.h); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/closePath\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class ClosePath\n\t * @constructor\n\t **/\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.ClosePath = function() {\n\t}).prototype.exec = function(ctx) { ctx.closePath(); };\n\n\t/**\n\t * Graphics command object to begin a new path. See {{#crossLink \"Graphics\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class BeginPath\n\t * @constructor\n\t **/\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.BeginPath = function() {\n\t}).prototype.exec = function(ctx) { ctx.beginPath(); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/beginFill\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Fill\n\t * @constructor\n\t * @param {Object} style A valid Context2D fillStyle.\n\t * @param {Matrix2D} matrix\n\t **/\n\t/**\n\t * A valid Context2D fillStyle.\n\t * @property style\n\t * @type Object\n\t */\n\t/**\n\t * @property matrix\n\t * @type Matrix2D\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\tp = (G.Fill = function(style, matrix) {\n\t\tthis.style = style;\n\t\tthis.matrix = matrix;\n\t}).prototype;\n\tp.exec = function(ctx) {\n\t\tif (!this.style) { return; }\n\t\tctx.fillStyle = this.style;\n\t\tvar mtx = this.matrix;\n\t\tif (mtx) { ctx.save(); ctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty); }\n\t\tctx.fill();\n\t\tif (mtx) { ctx.restore(); }\n\t};\n\t/**\n\t * Creates a linear gradient style and assigns it to {{#crossLink \"Fill/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginLinearGradientFill\"}}{{/crossLink}} for more information.\n\t * @method linearGradient\n\t * @param {Array} colors\n\t *\n\t * @param {Array} ratios\n\t * @param {Number} x0\n\t * @param {Number} y0\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @return {Fill} Returns this Fill object for chaining or assignment.\n\t */\n\tp.linearGradient = function(colors, ratios, x0, y0, x1, y1) {\n\t\tvar o = this.style =  Graphics._ctx.createLinearGradient(x0, y0, x1, y1);\n\t\tfor (var i=0, l=colors.length; i<l; i++) { o.addColorStop(ratios[i], colors[i]); }\n\t\to.props = {colors:colors, ratios:ratios, x0:x0, y0:y0, x1:x1, y1:y1, type:\"linear\"};\n\t\treturn this;\n\t};\n\t/**\n\t * Creates a radial gradient style and assigns it to {{#crossLink \"Fill/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginRadialGradientFill\"}}{{/crossLink}} for more information.\n\t * @method radialGradient\n\t * @param {Array} colors\n\t * @param {Array} ratios\n\t * @param {Number} x0\n\t * @param {Number} y0\n\t * @param {Number} r0\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @param {Number} r1\n\t * @return {Fill} Returns this Fill object for chaining or assignment.\n\t */\n\tp.radialGradient = function(colors, ratios, x0, y0, r0, x1, y1, r1) {\n\t\tvar o = this.style =  Graphics._ctx.createRadialGradient(x0, y0, r0, x1, y1, r1);\n\t\tfor (var i=0, l=colors.length; i<l; i++) { o.addColorStop(ratios[i], colors[i]); }\n\t\to.props = {colors:colors, ratios:ratios, x0:x0, y0:y0, r0:r0, x1:x1, y1:y1, r1:r1, type:\"radial\"};\n\t\treturn this;\n\t};\n\t/**\n\t * Creates a bitmap fill style and assigns it to the {{#crossLink \"Fill/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginBitmapFill\"}}{{/crossLink}} for more information.\n\t * @method bitmap\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image  Must be loaded prior to creating a bitmap fill, or the fill will be empty.\n\t * @param {String} [repetition] One of: repeat, repeat-x, repeat-y, or no-repeat.\n\t * @return {Fill} Returns this Fill object for chaining or assignment.\n\t */\n\tp.bitmap = function(image, repetition) {\n\t\tif (image.naturalWidth || image.getContext || image.readyState >= 2) {\n\t\t\tvar o = this.style = Graphics._ctx.createPattern(image, repetition || \"\");\n\t\t\to.props = {image: image, repetition: repetition, type: \"bitmap\"};\n\t\t}\n\t\treturn this;\n\t};\n\tp.path = false;\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Stroke\n\t * @constructor\n\t * @param {Object} style A valid Context2D fillStyle.\n\t * @param {Boolean} ignoreScale\n\t **/\n\t/**\n\t * A valid Context2D strokeStyle.\n\t * @property style\n\t * @type Object\n\t */\n\t/**\n\t * @property ignoreScale\n\t * @type Boolean\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\tp = (G.Stroke = function(style, ignoreScale) {\n\t\tthis.style = style;\n\t\tthis.ignoreScale = ignoreScale;\n\t}).prototype;\n\tp.exec = function(ctx) {\n\t\tif (!this.style) { return; }\n\t\tctx.strokeStyle = this.style;\n\t\tif (this.ignoreScale) { ctx.save(); ctx.setTransform(1,0,0,1,0,0); }\n\t\tctx.stroke();\n\t\tif (this.ignoreScale) { ctx.restore(); }\n\t};\n\t/**\n\t * Creates a linear gradient style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginLinearGradientStroke\"}}{{/crossLink}} for more information.\n\t * @method linearGradient\n\t * @param {Array} colors\n\t * @param {Array} ratios\n\t * @param {Number} x0\n\t * @param {Number} y0\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\n\t */\n\tp.linearGradient = G.Fill.prototype.linearGradient;\n\t/**\n\t * Creates a radial gradient style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginRadialGradientStroke\"}}{{/crossLink}} for more information.\n\t * @method radialGradient\n\t * @param {Array} colors\n\t * @param {Array} ratios\n\t * @param {Number} x0\n\t * @param {Number} y0\n\t * @param {Number} r0\n\t * @param {Number} x1\n\t * @param {Number} y1\n\t * @param {Number} r1\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\n\t */\n\tp.radialGradient = G.Fill.prototype.radialGradient;\n\t/**\n\t * Creates a bitmap fill style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\n\t * See {{#crossLink \"Graphics/beginBitmapStroke\"}}{{/crossLink}} for more information.\n\t * @method bitmap\n\t * @param {HTMLImageElement} image\n\t * @param {String} [repetition] One of: repeat, repeat-x, repeat-y, or no-repeat.\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\n\t */\n\tp.bitmap = G.Fill.prototype.bitmap;\n\tp.path = false;\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class StrokeStyle\n\t * @constructor\n\t * @param {Number} width\n\t * @param {String} [caps=butt]\n\t * @param {String} [joints=miter]\n\t * @param {Number} [miterLimit=10]\n\t * @param {Boolean} [ignoreScale=false]\n\t **/\n\t/**\n\t * @property width\n\t * @type Number\n\t */\n\t/**\n\t * One of: butt, round, square\n\t * @property caps\n\t * @type String\n\t */\n\t/**\n\t * One of: round, bevel, miter\n\t * @property joints\n\t * @type String\n\t */\n\t/**\n\t * @property miterLimit\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\tp = (G.StrokeStyle = function(width, caps, joints, miterLimit, ignoreScale) {\n\t\tthis.width = width;\n\t\tthis.caps = caps;\n\t\tthis.joints = joints;\n\t\tthis.miterLimit = miterLimit;\n\t\tthis.ignoreScale = ignoreScale;\n\t}).prototype;\n\tp.exec = function(ctx) {\n\t\tctx.lineWidth = (this.width == null ? \"1\" : this.width);\n\t\tctx.lineCap = (this.caps == null ? \"butt\" : (isNaN(this.caps) ? this.caps : Graphics.STROKE_CAPS_MAP[this.caps]));\n\t\tctx.lineJoin = (this.joints == null ? \"miter\" : (isNaN(this.joints) ? this.joints : Graphics.STROKE_JOINTS_MAP[this.joints]));\n\t\tctx.miterLimit = (this.miterLimit == null ? \"10\" : this.miterLimit);\n\t\tctx.ignoreScale = (this.ignoreScale == null ? false : this.ignoreScale);\n\t};\n\tp.path = false;\n\t\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class StrokeDash\n\t * @constructor\n\t * @param {Array} [segments]\n\t * @param {Number} [offset=0]\n\t **/\n\t/**\n\t * @property segments\n\t * @type Array\n\t */\n\t/**\n\t * @property offset\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.StrokeDash = function(segments, offset) {\n\t\tthis.segments = segments;\n\t\tthis.offset = offset||0;\n\t}).prototype.exec = function(ctx) {\n\t\tif (ctx.setLineDash) { // feature detection.\n\t\t\tctx.setLineDash(this.segments|| G.StrokeDash.EMPTY_SEGMENTS); // instead of [] to reduce churn.\n\t\t\tctx.lineDashOffset = this.offset||0;\n\t\t}\n\t};\n\t/**\n\t * The default value for segments (ie. no dash).\n\t * @property EMPTY_SEGMENTS\n\t * @static\n\t * @final\n\t * @readonly\n\t * @protected\n\t * @type {Array}\n\t **/\n\tG.StrokeDash.EMPTY_SEGMENTS = [];\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class RoundRect\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w\n\t * @param {Number} h\n\t * @param {Number} radiusTL\n\t * @param {Number} radiusTR\n\t * @param {Number} radiusBR\n\t * @param {Number} radiusBL\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property w\n\t * @type Number\n\t */\n\t/**\n\t * @property h\n\t * @type Number\n\t */\n\t/**\n\t * @property radiusTL\n\t * @type Number\n\t */\n\t/**\n\t * @property radiusTR\n\t * @type Number\n\t */\n\t/**\n\t * @property radiusBR\n\t * @type Number\n\t */\n\t/**\n\t * @property radiusBL\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.RoundRect = function(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.w = w; this.h = h;\n\t\tthis.radiusTL = radiusTL; this.radiusTR = radiusTR;\n\t\tthis.radiusBR = radiusBR; this.radiusBL = radiusBL;\n\t}).prototype.exec = function(ctx) {\n\t\tvar max = (w<h?w:h)/2;\n\t\tvar mTL=0, mTR=0, mBR=0, mBL=0;\n\t\tvar x = this.x, y = this.y, w = this.w, h = this.h;\n\t\tvar rTL = this.radiusTL, rTR = this.radiusTR, rBR = this.radiusBR, rBL = this.radiusBL;\n\n\t\tif (rTL < 0) { rTL *= (mTL=-1); }\n\t\tif (rTL > max) { rTL = max; }\n\t\tif (rTR < 0) { rTR *= (mTR=-1); }\n\t\tif (rTR > max) { rTR = max; }\n\t\tif (rBR < 0) { rBR *= (mBR=-1); }\n\t\tif (rBR > max) { rBR = max; }\n\t\tif (rBL < 0) { rBL *= (mBL=-1); }\n\t\tif (rBL > max) { rBL = max; }\n\n\t\tctx.moveTo(x+w-rTR, y);\n\t\tctx.arcTo(x+w+rTR*mTR, y-rTR*mTR, x+w, y+rTR, rTR);\n\t\tctx.lineTo(x+w, y+h-rBR);\n\t\tctx.arcTo(x+w+rBR*mBR, y+h+rBR*mBR, x+w-rBR, y+h, rBR);\n\t\tctx.lineTo(x+rBL, y+h);\n\t\tctx.arcTo(x-rBL*mBL, y+h+rBL*mBL, x, y+h-rBL, rBL);\n\t\tctx.lineTo(x, y+rTL);\n\t\tctx.arcTo(x-rTL*mTL, y-rTL*mTL, x+rTL, y, rTL);\n\t\tctx.closePath();\n\t};\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Circle\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} radius\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property radius\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.Circle = function(x, y, radius) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.radius = radius;\n\t}).prototype.exec = function(ctx) { ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2); };\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class Ellipse\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} w\n\t * @param {Number} h\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property w\n\t * @type Number\n\t */\n\t/**\n\t * @property h\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.Ellipse = function(x, y, w, h) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.w = w; this.h = h;\n\t}).prototype.exec = function(ctx) {\n\t\tvar x = this.x, y = this.y;\n\t\tvar w = this.w, h = this.h;\n\n\t\tvar k = 0.5522848;\n\t\tvar ox = (w / 2) * k;\n\t\tvar oy = (h / 2) * k;\n\t\tvar xe = x + w;\n\t\tvar ye = y + h;\n\t\tvar xm = x + w / 2;\n\t\tvar ym = y + h / 2;\n\n\t\tctx.moveTo(x, ym);\n\t\tctx.bezierCurveTo(x, ym-oy, xm-ox, y, xm, y);\n\t\tctx.bezierCurveTo(xm+ox, y, xe, ym-oy, xe, ym);\n\t\tctx.bezierCurveTo(xe, ym+oy, xm+ox, ye, xm, ye);\n\t\tctx.bezierCurveTo(xm-ox, ye, x, ym+oy, x, ym);\n\t};\n\n\t/**\n\t * Graphics command object. See {{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\n\t * @class PolyStar\n\t * @constructor\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @param {Number} radius\n\t * @param {Number} sides\n\t * @param {Number} pointSize\n\t * @param {Number} angle\n\t **/\n\t/**\n\t * @property x\n\t * @type Number\n\t */\n\t/**\n\t * @property y\n\t * @type Number\n\t */\n\t/**\n\t * @property radius\n\t * @type Number\n\t */\n\t/**\n\t * @property sides\n\t * @type Number\n\t */\n\t/**\n\t * @property pointSize\n\t * @type Number\n\t */\n\t/**\n\t * @property angle\n\t * @type Number\n\t */\n\t/**\n\t * Execute the Graphics command in the provided Canvas context.\n\t * @method exec\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\n\t */\n\t(G.PolyStar = function(x, y, radius, sides, pointSize, angle) {\n\t\tthis.x = x; this.y = y;\n\t\tthis.radius = radius;\n\t\tthis.sides = sides;\n\t\tthis.pointSize = pointSize;\n\t\tthis.angle = angle;\n\t}).prototype.exec = function(ctx) {\n\t\tvar x = this.x, y = this.y;\n\t\tvar radius = this.radius;\n\t\tvar angle = (this.angle||0)/180*Math.PI;\n\t\tvar sides = this.sides;\n\t\tvar ps = 1-(this.pointSize||0);\n\t\tvar a = Math.PI/sides;\n\n\t\tctx.moveTo(x+Math.cos(angle)*radius, y+Math.sin(angle)*radius);\n\t\tfor (var i=0; i<sides; i++) {\n\t\t\tangle += a;\n\t\t\tif (ps != 1) {\n\t\t\t\tctx.lineTo(x+Math.cos(angle)*radius*ps, y+Math.sin(angle)*radius*ps);\n\t\t\t}\n\t\t\tangle += a;\n\t\t\tctx.lineTo(x+Math.cos(angle)*radius, y+Math.sin(angle)*radius);\n\t\t}\n\t\tctx.closePath();\n\t};\n\n\t// docced above.\n\tGraphics.beginCmd = new G.BeginPath(); // so we don't have to instantiate multiple instances.\n\n\n\tcreatejs.Graphics = Graphics;\n}());\n\n//##############################################################################\n// DisplayObject.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * DisplayObject is an abstract class that should not be constructed directly. Instead construct subclasses such as\r\n\t * {{#crossLink \"Container\"}}{{/crossLink}}, {{#crossLink \"Bitmap\"}}{{/crossLink}}, and {{#crossLink \"Shape\"}}{{/crossLink}}.\r\n\t * DisplayObject is the base class for all display classes in the EaselJS library. It defines the core properties and\r\n\t * methods that are shared between all display objects, such as transformation properties (x, y, scaleX, scaleY, etc),\r\n\t * caching, and mouse handlers.\r\n\t * @class DisplayObject\r\n\t * @extends EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction DisplayObject() {\r\n\t\tthis.EventDispatcher_constructor();\r\n\r\n\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The alpha (transparency) for this display object. 0 is fully transparent, 1 is fully opaque.\r\n\t\t * @property alpha\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.alpha = 1;\r\n\r\n\t\t/**\r\n\t\t * If a cache is active, this returns the canvas that holds the image of this display object. See {{#crossLink \"DisplayObject/cache:method\"}}{{/crossLink}}\r\n\t\t * for more information. Use this to display the result of a cache. This will be a HTMLCanvasElement unless special cache rules have been deliberately enabled for this cache.\r\n\t\t * @property cacheCanvas\r\n\t\t * @type {HTMLCanvasElement | Object}\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.cacheCanvas = null;\r\n\r\n\t\t/**\r\n\t\t * If a cache has been made, this returns the class that is managing the cacheCanvas and its properties. See {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * for more information. Use this to control, inspect, and change the cache. In special circumstances this may be a modified or subclassed BitmapCache.\r\n\t\t * @property bitmapCache\r\n\t\t * @type {BitmapCache}\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.bitmapCache = null;\r\n\r\n\t\t/**\r\n\t\t * Unique ID for this display object. Makes display objects easier for some uses.\r\n\t\t * @property id\r\n\t\t * @type {Number}\r\n\t\t * @default -1\r\n\t\t **/\r\n\t\tthis.id = createjs.UID.get();\r\n\r\n\t\t/**\r\n\t\t * Indicates whether to include this object when running mouse interactions. Setting this to `false` for children\r\n\t\t * of a {{#crossLink \"Container\"}}{{/crossLink}} will cause events on the Container to not fire when that child is\r\n\t\t * clicked. Setting this property to `false` does not prevent the {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}}\r\n\t\t * method from returning the child.\r\n\t\t *\r\n\t\t * <strong>Note:</strong> In EaselJS 0.7.0, the mouseEnabled property will not work properly with nested Containers. Please\r\n\t\t * check out the latest NEXT version in <a href=\"https://github.com/CreateJS/EaselJS/tree/master/lib\">GitHub</a> for an updated version with this issue resolved. The fix will be\r\n\t\t * provided in the next release of EaselJS.\r\n\t\t * @property mouseEnabled\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.mouseEnabled = true;\r\n\r\n\t\t/**\r\n\t\t * If false, the tick will not run on this display object (or its children). This can provide some performance benefits.\r\n\t\t * In addition to preventing the \"tick\" event from being dispatched, it will also prevent tick related updates\r\n\t\t * on some display objects (ex. Sprite & MovieClip frame advancing, and DOMElement display properties).\r\n\t\t * @property tickEnabled\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.tickEnabled = true;\r\n\r\n\t\t/**\r\n\t\t * An optional name for this display object. Included in {{#crossLink \"DisplayObject/toString\"}}{{/crossLink}} . Useful for\r\n\t\t * debugging.\r\n\t\t * @property name\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.name = null;\r\n\r\n\t\t/**\r\n\t\t * A reference to the {{#crossLink \"Container\"}}{{/crossLink}} or {{#crossLink \"Stage\"}}{{/crossLink}} object that\r\n\t\t * contains this display object, or null if it has not been added\r\n\t\t * to one.\r\n\t\t * @property parent\r\n\t\t * @final\r\n\t\t * @type {Container}\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.parent = null;\r\n\r\n\t\t/**\r\n\t\t * The left offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate\r\n\t\t * around its center, you would set regX and {{#crossLink \"DisplayObject/regY:property\"}}{{/crossLink}} to 50.\r\n\t\t * Cached object's registration points should be set based on pre-cache conditions, not cached size.\r\n\t\t * @property regX\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.regX = 0;\r\n\r\n\t\t/**\r\n\t\t * The y offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate around\r\n\t\t * its center, you would set {{#crossLink \"DisplayObject/regX:property\"}}{{/crossLink}} and regY to 50.\r\n\t\t * Cached object's registration points should be set based on pre-cache conditions, not cached size.\r\n\t\t * @property regY\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.regY = 0;\r\n\r\n\t\t/**\r\n\t\t * The rotation in degrees for this display object.\r\n\t\t * @property rotation\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.rotation = 0;\r\n\r\n\t\t/**\r\n\t\t * The factor to stretch this display object horizontally. For example, setting scaleX to 2 will stretch the display\r\n\t\t * object to twice its nominal width. To horizontally flip an object, set the scale to a negative number.\r\n\t\t * @property scaleX\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.scaleX = 1;\r\n\r\n\t\t/**\r\n\t\t * The factor to stretch this display object vertically. For example, setting scaleY to 0.5 will stretch the display\r\n\t\t * object to half its nominal height. To vertically flip an object, set the scale to a negative number.\r\n\t\t * @property scaleY\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.scaleY = 1;\r\n\r\n\t\t/**\r\n\t\t * The factor to skew this display object horizontally.\r\n\t\t * @property skewX\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.skewX = 0;\r\n\r\n\t\t/**\r\n\t\t * The factor to skew this display object vertically.\r\n\t\t * @property skewY\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.skewY = 0;\r\n\r\n\t\t/**\r\n\t\t * A shadow object that defines the shadow to render on this display object. Set to `null` to remove a shadow. If\r\n\t\t * null, this property is inherited from the parent container.\r\n\t\t * @property shadow\r\n\t\t * @type {Shadow}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.shadow = null;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether this display object should be rendered to the canvas and included when running the Stage\r\n\t\t * {{#crossLink \"Stage/getObjectsUnderPoint\"}}{{/crossLink}} method.\r\n\t\t * @property visible\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.visible = true;\r\n\r\n\t\t/**\r\n\t\t * The x (horizontal) position of the display object, relative to its parent.\r\n\t\t * @property x\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.x = 0;\r\n\r\n\t\t/** The y (vertical) position of the display object, relative to its parent.\r\n\t\t * @property y\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.y = 0;\r\n\r\n\t\t/**\r\n\t\t * If set, defines the transformation for this display object, overriding all other transformation properties\r\n\t\t * (x, y, rotation, scale, skew).\r\n\t\t * @property transformMatrix\r\n\t\t * @type {Matrix2D}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.transformMatrix = null;\r\n\r\n\t\t/**\r\n\t\t * The composite operation indicates how the pixels of this display object will be composited with the elements\r\n\t\t * behind it. If `null`, this property is inherited from the parent container. For more information, read the\r\n\t\t * <a href=\"https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation\">\r\n\t\t * whatwg spec on compositing</a>. For a list of supported compositeOperation value, visit\r\n\t\t * <a href=\"https://drafts.fxtf.org/compositing/\">the W3C draft on Compositing and Blending</a>.\r\n\t\t * @property compositeOperation\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.compositeOperation = null;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether the display object should be drawn to a whole pixel when\r\n\t\t * {{#crossLink \"Stage/snapToPixelEnabled\"}}{{/crossLink}} is true. To enable/disable snapping on whole\r\n\t\t * categories of display objects, set this value on the prototype (Ex. Text.prototype.snapToPixel = true).\r\n\t\t * @property snapToPixel\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.snapToPixel = true;\r\n\r\n\t\t/**\r\n\t\t * An array of Filter objects to apply to this display object. Filters are only applied / updated when {{#crossLink \"cache\"}}{{/crossLink}}\r\n\t\t * or {{#crossLink \"updateCache\"}}{{/crossLink}} is called on the display object, and only apply to the area that is\r\n\t\t * cached.\r\n\t\t * @property filters\r\n\t\t * @type {Array}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.filters = null;\r\n\r\n\t\t/**\r\n\t\t * A Shape instance that defines a vector mask (clipping path) for this display object.  The shape's transformation\r\n\t\t * will be applied relative to the display object's parent coordinates (as if it were a child of the parent).\r\n\t\t * @property mask\r\n\t\t * @type {Shape}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.mask = null;\r\n\r\n\t\t/**\r\n\t\t * A display object that will be tested when checking mouse interactions or testing {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}}.\r\n\t\t * The hit area will have its transformation applied relative to this display object's coordinate space (as though\r\n\t\t * the hit test object were a child of this display object and relative to its regX/Y). The hitArea will be tested\r\n\t\t * using only its own `alpha` value regardless of the alpha value on the target display object, or the target's\r\n\t\t * ancestors (parents).\r\n\t\t * \r\n\t\t * If set on a {{#crossLink \"Container\"}}{{/crossLink}}, children of the Container will not receive mouse events.\r\n\t\t * This is similar to setting {{#crossLink \"mouseChildren\"}}{{/crossLink}} to false.\r\n\t\t *\r\n\t\t * Note that hitArea is NOT currently used by the `hitTest()` method, nor is it supported for {{#crossLink \"Stage\"}}{{/crossLink}}.\r\n\t\t * @property hitArea\r\n\t\t * @type {DisplayObject}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.hitArea = null;\r\n\r\n\t\t/**\r\n\t\t * A CSS cursor (ex. \"pointer\", \"help\", \"text\", etc) that will be displayed when the user hovers over this display\r\n\t\t * object. You must enable mouseover events using the {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}} method to\r\n\t\t * use this property. Setting a non-null cursor on a Container will override the cursor set on its descendants.\r\n\t\t * @property cursor\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.cursor = null;\r\n\r\n\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheScale\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t * @deprecated\r\n\t\t **/\r\n\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheDataURLID\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @deprecated\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheDataURL\r\n\t\t * @protected\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t * @deprecated\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * @property _props\r\n\t\t * @protected\r\n\t\t * @type {DisplayObject}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._props = new createjs.DisplayProps();\r\n\r\n\t\t/**\r\n\t\t * @property _rectangle\r\n\t\t * @protected\r\n\t\t * @type {Rectangle}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._rectangle = new createjs.Rectangle();\r\n\r\n\t\t/**\r\n\t\t * @property _bounds\r\n\t\t * @protected\r\n\t\t * @type {Rectangle}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._bounds = null;\r\n\r\n\t\t/**\r\n\t\t * Where StageGL should look for required display properties, matters only for leaf display objects. Containers\r\n\t\t * or cached objects won't use this property, it's for native display of terminal elements.\r\n\t\t * @property _webGLRenderStyle\r\n\t\t * @protected\r\n\t\t * @type {number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._webGLRenderStyle = DisplayObject._StageGL_NONE;\r\n\t}\r\n\tvar p = createjs.extend(DisplayObject, createjs.EventDispatcher);\r\n\r\n// static properties:\r\n\t/**\r\n\t * Listing of mouse event names. Used in _hasMouseEventListener.\r\n\t * @property _MOUSE_EVENTS\r\n\t * @protected\r\n\t * @static\r\n\t * @type {Array}\r\n\t **/\r\n\tDisplayObject._MOUSE_EVENTS = [\"click\",\"dblclick\",\"mousedown\",\"mouseout\",\"mouseover\",\"pressmove\",\"pressup\",\"rollout\",\"rollover\"];\r\n\r\n\t/**\r\n\t * Suppresses errors generated when using features like hitTest, mouse events, and {{#crossLink \"getObjectsUnderPoint\"}}{{/crossLink}}\r\n\t * with cross domain content.\r\n\t * @property suppressCrossDomainErrors\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t **/\r\n\tDisplayObject.suppressCrossDomainErrors = false;\r\n\r\n\t/**\r\n\t * @property _snapToPixelEnabled\r\n\t * @protected\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t **/\r\n\tDisplayObject._snapToPixelEnabled = false; // stage.snapToPixelEnabled is temporarily copied here during a draw to provide global access.\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_NONE\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_NONE = 0;\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_SPRITE\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_SPRITE = 1;\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_BITMAP\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_BITMAP = 2;\r\n\r\n\t/**\r\n\t * @property _hitTestCanvas\r\n\t * @type {HTMLCanvasElement | Object}\r\n\t * @static\r\n\t * @protected\r\n\t **/\r\n\t/**\r\n\t * @property _hitTestContext\r\n\t * @type {CanvasRenderingContext2D}\r\n\t * @static\r\n\t * @protected\r\n\t **/\r\n\tvar canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"); // prevent errors on load in browsers without canvas.\r\n\tif (canvas.getContext) {\r\n\t\tDisplayObject._hitTestCanvas = canvas;\r\n\t\tDisplayObject._hitTestContext = canvas.getContext(\"2d\");\r\n\t\tcanvas.width = canvas.height = 1;\r\n\t}\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched when the user presses their left mouse button over the display object. See the \r\n\t * {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mousedown\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user presses their left mouse button and then releases it while over the display object.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event click\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user double clicks their left mouse button over this display object.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event dblclick\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user's mouse enters this display object. This event must be enabled using \r\n\t * {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}. See also {{#crossLink \"DisplayObject/rollover:event\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mouseover\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user's mouse leaves this display object. This event must be enabled using \r\n\t * {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}. See also {{#crossLink \"DisplayObject/rollout:event\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mouseout\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * This event is similar to {{#crossLink \"DisplayObject/mouseover:event\"}}{{/crossLink}}, with the following\r\n\t * differences: it does not bubble, and it considers {{#crossLink \"Container\"}}{{/crossLink}} instances as an\r\n\t * aggregate of their content.\r\n\t * \r\n\t * For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over\r\n\t * shapeA and then directly on to shapeB. With a listener for {{#crossLink \"mouseover:event\"}}{{/crossLink}} on\r\n\t * myContainer, two events would be received, each targeting a child element:<OL>\r\n\t * <LI>when the mouse enters shapeA (target=shapeA)</LI>\r\n\t * <LI>when the mouse enters shapeB (target=shapeB)</LI>\r\n\t * </OL>\r\n\t * However, with a listener for \"rollover\" instead, only a single event is received when the mouse first enters\r\n\t * the aggregate myContainer content (target=myContainer).\r\n\t * \r\n\t * This event must be enabled using {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event rollover\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * This event is similar to {{#crossLink \"DisplayObject/mouseout:event\"}}{{/crossLink}}, with the following\r\n\t * differences: it does not bubble, and it considers {{#crossLink \"Container\"}}{{/crossLink}} instances as an\r\n\t * aggregate of their content.\r\n\t * \r\n\t * For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over\r\n\t * shapeA, then directly on to shapeB, then off both. With a listener for {{#crossLink \"mouseout:event\"}}{{/crossLink}}\r\n\t * on myContainer, two events would be received, each targeting a child element:<OL>\r\n\t * <LI>when the mouse leaves shapeA (target=shapeA)</LI>\r\n\t * <LI>when the mouse leaves shapeB (target=shapeB)</LI>\r\n\t * </OL>\r\n\t * However, with a listener for \"rollout\" instead, only a single event is received when the mouse leaves\r\n\t * the aggregate myContainer content (target=myContainer).\r\n\t * \r\n\t * This event must be enabled using {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event rollout\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * After a {{#crossLink \"DisplayObject/mousedown:event\"}}{{/crossLink}} occurs on a display object, a pressmove\r\n\t * event will be generated on that object whenever the mouse moves until the mouse press is released. This can be\r\n\t * useful for dragging and similar operations.\r\n\t *\r\n\t * **Please note** that if the initial mouse target from a `mousedown` event is removed from the stage after being pressed\r\n\t * (e.g. during a `pressmove` event), a `pressmove` event is still generated. However since it is no longer in the\r\n\t * display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive\r\n\t * the event, and therefore can not re-dispatch it. If you intend to listen for `{{#crossLink \"DisplayObject/pressup:event\"}}{{/crossLink}}`\r\n\t * or `pressmove` on a dynamic object (such as a {{#crossLink \"MovieClip\"}}{{/crossLink}} or {{#crossLink \"Container\"}}{{/crossLink}}),\r\n\t * then ensure you set {{#crossLink \"Container/mouseChildren:property\"}}{{/crossLink}} to `false`.\r\n\t * @event pressmove\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * After a {{#crossLink \"DisplayObject/mousedown:event\"}}{{/crossLink}} occurs on a display object, a pressup event\r\n\t * will be generated on that object when that mouse press is released. This can be useful for dragging and similar\r\n\t * operations.\r\n\t *\r\n\t * **Please note** that if the initial mouse target from a `mousedown` event is removed from the stage after being pressed\r\n\t * (e.g. during a `pressmove` event), a `pressup` event is still generated. However since it is no longer in the\r\n\t * display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive\r\n\t * the event, and therefore can not re-dispatch it. If you intend to listen for `{{#crossLink \"DisplayObject/pressmove:event\"}}{{/crossLink}}`\r\n\t * or `pressup` on a dynamic object (such as a {{#crossLink \"MovieClip\"}}{{/crossLink}} or {{#crossLink \"Container\"}}{{/crossLink}}),\r\n\t * then ensure you set {{#crossLink \"Container/mouseChildren:property\"}}{{/crossLink}} to `false`.\r\n\t * @event pressup\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the display object is added to a parent container.\r\n\t * @event added\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the display object is removed from its parent container.\r\n\t * @event removed\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched on each display object on a stage whenever the stage updates. This occurs immediately before the\r\n\t * rendering (draw) pass. When {{#crossLink \"Stage/update\"}}{{/crossLink}} is called, first all display objects on\r\n\t * the stage dispatch the tick event, then all of the display objects are drawn to stage. Children will have their\r\n\t * {{#crossLink \"tick:event\"}}{{/crossLink}} event dispatched in order of their depth prior to the event being\r\n\t * dispatched on their parent.\r\n\t * @event tick\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {Array} params An array containing any arguments that were passed to the Stage.update() method. For\r\n\t *      example if you called stage.update(\"hello\"), then the params would be [\"hello\"].\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"DisplayObject/stage:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getStage\r\n\t * @protected\r\n\t * @return {Stage}\r\n\t **/\r\n\tp._getStage = function() {\r\n\t\t// uses dynamic access to avoid circular dependencies;\r\n\t\tvar o = this, _Stage = createjs[\"Stage\"];\r\n\t\twhile (o.parent) { o = o.parent; }\r\n\t\tif (o instanceof _Stage) { return o; }\r\n\t\treturn null;\r\n\t};\r\n\t// DisplayObject.getStage is @deprecated. Remove for 1.1+\r\n\tp.getStage = createjs.deprecate(p._getStage, \"DisplayObject.getStage\");\r\n\r\n\t/**\r\n\t * Returns the Stage instance that this display object will be rendered on, or null if it has not been added to one.\r\n\t * @property stage\r\n\t * @type {Stage}\r\n\t * @readonly\r\n\t **/\r\n\r\n\t/**\r\n\t * Returns an ID number that uniquely identifies the current cache for this display object. This can be used to\r\n\t * determine if the cache has changed since a previous check.\r\n\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t * @property cacheID\r\n\t * @deprecated\r\n\t * @type {Number}\r\n\t * @default 0\r\n\t */\r\n\r\n\t/**\r\n\t * Set both the {{#crossLink \"DisplayObject/scaleX:property\"}}{{/crossLink}} and the {{#crossLink \"DisplayObject/scaleY\"}}{{/crossLink}}\r\n\t * property to the same value. Note that when you get the value, if the `scaleX` and `scaleY` are different values,\r\n\t * it will return only the `scaleX`.\r\n\t * @property scaleX\r\n\t * @type {Number}\r\n\t * @default 1\r\n\t */\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tstage: { get: p._getStage },\r\n\t\t\tcacheID: {\r\n\t\t\t\tget: function(){ return this.bitmapCache && this.bitmapCache.cacheID },\r\n\t\t\t\tset: function(a){ this.bitmapCache && (this.bitmapCache.cacheID = a) }\r\n\t\t\t},\r\n\t\t\tscale: {\r\n\t\t\t\tget: function() { return this.scaleX; },\r\n\t\t\t\tset: function(scale) { this.scaleX = this.scaleY = scale; },\r\n\t\t\t}\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns <code>true</code> if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For example,\r\n\t * used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tvar cache = this.bitmapCache;\r\n\t\tif(cache && !ignoreCache) {\r\n\t\t\treturn cache.draw(ctx);\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Applies this display object's transformation, alpha, globalCompositeOperation, clipping path (mask), and shadow\r\n\t * to the specified context. This is typically called prior to {{#crossLink \"DisplayObject/draw\"}}{{/crossLink}}.\r\n\t * @method updateContext\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D to update.\r\n\t **/\r\n\tp.updateContext = function(ctx) {\r\n\t\tvar o=this, mask=o.mask, mtx= o._props.matrix;\r\n\t\t\r\n\t\tif (mask && mask.graphics && !mask.graphics.isEmpty()) {\r\n\t\t\tmask.getMatrix(mtx);\r\n\t\t\tctx.transform(mtx.a,  mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty);\r\n\t\t\t\r\n\t\t\tmask.graphics.drawAsPath(ctx);\r\n\t\t\tctx.clip();\r\n\t\t\t\r\n\t\t\tmtx.invert();\r\n\t\t\tctx.transform(mtx.a,  mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty);\r\n\t\t}\r\n\t\t\r\n\t\tthis.getMatrix(mtx);\r\n\t\tvar tx = mtx.tx, ty = mtx.ty;\r\n\t\tif (DisplayObject._snapToPixelEnabled && o.snapToPixel) {\r\n\t\t\ttx = tx + (tx < 0 ? -0.5 : 0.5) | 0;\r\n\t\t\tty = ty + (ty < 0 ? -0.5 : 0.5) | 0;\r\n\t\t}\r\n\t\tctx.transform(mtx.a,  mtx.b, mtx.c, mtx.d, tx, ty);\r\n\t\tctx.globalAlpha *= o.alpha;\r\n\t\tif (o.compositeOperation) { ctx.globalCompositeOperation = o.compositeOperation; }\r\n\t\tif (o.shadow) { this._applyShadow(ctx, o.shadow); }\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into a new element, which is then used for subsequent draws. Intended for complex content\r\n\t * that does not change frequently (ex. a Container with many children that do not move, or a complex vector Shape),\r\n\t * this can provide for much faster rendering because the content does not need to be re-rendered each tick. The\r\n\t * cached display object can be moved, rotated, faded, etc freely, however if its content changes, you must manually\r\n\t * update the cache by calling <code>updateCache()</code> again. You must specify the cached area via the x, y, w,\r\n\t * and h parameters. This defines the rectangle that will be rendered and cached using this display object's coordinates.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * For example if you defined a Shape that drew a circle at 0, 0 with a radius of 25:\r\n\t *\r\n\t *      var shape = new createjs.Shape();\r\n\t *      shape.graphics.beginFill(\"#ff0000\").drawCircle(0, 0, 25);\r\n\t *      shape.cache(-25, -25, 50, 50);\r\n\t *\r\n\t * Note that filters need to be defined <em>before</em> the cache is applied or you will have to call updateCache after\r\n\t * application. Check out the {{#crossLink \"Filter\"}}{{/crossLink}} class for more information. Some filters\r\n\t * (ex. BlurFilter) may not work as expected in conjunction with the scale param.\r\n\t * \r\n\t * Usually, the resulting cacheCanvas will have the dimensions width * scale, height * scale, however some filters (ex. BlurFilter)\r\n\t * will add padding to the canvas dimensions.\r\n\t *\r\n\t * In previous versions caching was handled on DisplayObject but has since been moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}.\r\n\t * This allows for easier interaction and alternate cache methods like WebGL with {{#crossLink \"StageGL\"}}{{/crossLink}}.\r\n\t * For more information on the options object, see the BitmapCache {{#crossLink \"BitmapCache/define\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method cache\r\n\t * @param {Number} x The x coordinate origin for the cache region.\r\n\t * @param {Number} y The y coordinate origin for the cache region.\r\n\t * @param {Number} width The width of the cache region.\r\n\t * @param {Number} height The height of the cache region.\r\n\t * @param {Number} [scale=1] The scale at which the cache will be created. For example, if you cache a vector shape using\r\n\t * \tmyShape.cache(0,0,100,100,2) then the resulting cacheCanvas will be 200x200 px. This lets you scale and rotate\r\n\t * \tcached elements with greater fidelity. Default is 1.\r\n\t * @param {Object} [options=undefined] Specify additional parameters for the cache logic\r\n\t **/\r\n\tp.cache = function(x, y, width, height, scale, options) {\r\n\t\tif(!this.bitmapCache){\r\n\t\t\tthis.bitmapCache = new createjs.BitmapCache();\r\n\t\t}\r\n\t\tthis.bitmapCache.define(this, x, y, width, height, scale, options);\r\n\t};\r\n\r\n\t/**\r\n\t * Redraws the display object to its cache. Calling updateCache without an active cache will throw an error.\r\n\t * If compositeOperation is null the current cache will be cleared prior to drawing. Otherwise the display object\r\n\t * will be drawn over the existing cache using the specified compositeOperation.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * Clear the current graphics of a cached shape, draw some new instructions, and then update the cache. The new line\r\n\t * will be drawn on top of the old one.\r\n\t *\r\n\t *      // Not shown: Creating the shape, and caching it.\r\n\t *      shapeInstance.clear();\r\n\t *      shapeInstance.setStrokeStyle(3).beginStroke(\"#ff0000\").moveTo(100, 100).lineTo(200,200);\r\n\t *      shapeInstance.updateCache();\r\n\t *\r\n\t * In previous versions caching was handled on DisplayObject but has since been moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}.\r\n\t * This allows for easier interaction and alternate cache methods like WebGL and {{#crossLink \"StageGL\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method updateCache\r\n\t * @param {String} compositeOperation The compositeOperation to use, or null to clear the cache and redraw it.\r\n\t * <a href=\"https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation\">\r\n\t * whatwg spec on compositing</a>.\r\n\t **/\r\n\tp.updateCache = function(compositeOperation) {\r\n\t\tif(!this.bitmapCache) {\r\n\t\t\tthrow \"cache() must be called before updateCache()\";\r\n\t\t}\r\n\t\tthis.bitmapCache.update(compositeOperation);\r\n\t};\r\n\r\n\t/**\r\n\t * Clears the current cache. See {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} for more information.\r\n\t * @method uncache\r\n\t **/\r\n\tp.uncache = function() {\r\n\t\tif(this.bitmapCache) {\r\n\t\t\tthis.bitmapCache.release();\r\n\t\t\tthis.bitmapCache = undefined;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a data URL for the cache, or null if this display object is not cached.\r\n\t * Only generated if the cache has changed, otherwise returns last result.\r\n\t * @method getCacheDataURL\r\n\t * @return {String} The image data url for the cache.\r\n\t **/\r\n\tp.getCacheDataURL = function() {\r\n\t\treturn this.bitmapCache?this.bitmapCache.getDataURL():null;\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the coordinate space of the display object\r\n\t * to the global (stage) coordinate space. For example, this could be used to position an HTML label\r\n\t * over a specific point on a nested display object. Returns a Point instance with x and y properties\r\n\t * correlating to the transformed coordinates on the stage.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.x = 300;\r\n\t *      displayObject.y = 200;\r\n\t *      stage.addChild(displayObject);\r\n\t *      var point = displayObject.localToGlobal(100, 100);\r\n\t *      // Results in x=400, y=300\r\n\t *\r\n\t * @method localToGlobal\r\n\t * @param {Number} x The x position in the source display object to transform.\r\n\t * @param {Number} y The y position in the source display object to transform.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} A Point instance with x and y properties correlating to the transformed coordinates\r\n\t * on the stage.\r\n\t **/\r\n\tp.localToGlobal = function(x, y, pt) {\r\n\t\treturn this.getConcatenatedMatrix(this._props.matrix).transformPoint(x,y, pt||new createjs.Point());\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the global (stage) coordinate space to the\r\n\t * coordinate space of the display object. For example, this could be used to determine\r\n\t * the current mouse position within the display object. Returns a Point instance with x and y properties\r\n\t * correlating to the transformed position in the display object's coordinate space.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.x = 300;\r\n\t *      displayObject.y = 200;\r\n\t *      stage.addChild(displayObject);\r\n\t *      var point = displayObject.globalToLocal(100, 100);\r\n\t *      // Results in x=-200, y=-100\r\n\t *\r\n\t * @method globalToLocal\r\n\t * @param {Number} x The x position on the stage to transform.\r\n\t * @param {Number} y The y position on the stage to transform.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} A Point instance with x and y properties correlating to the transformed position in the\r\n\t * display object's coordinate space.\r\n\t **/\r\n\tp.globalToLocal = function(x, y, pt) {\r\n\t\treturn this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(x,y, pt||new createjs.Point());\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the coordinate space of this display object to the coordinate\r\n\t * space of the target display object. Returns a Point instance with x and y properties correlating to the\r\n\t * transformed position in the target's coordinate space. Effectively the same as using the following code with\r\n\t * {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}} and {{#crossLink \"DisplayObject/globalToLocal\"}}{{/crossLink}}.\r\n\t *\r\n\t *      var pt = this.localToGlobal(x, y);\r\n\t *      pt = target.globalToLocal(pt.x, pt.y);\r\n\t *\r\n\t * @method localToLocal\r\n\t * @param {Number} x The x position in the source display object to transform.\r\n\t * @param {Number} y The y position on the source display object to transform.\r\n\t * @param {DisplayObject} target The target display object to which the coordinates will be transformed.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} Returns a Point instance with x and y properties correlating to the transformed position\r\n\t * in the target's coordinate space.\r\n\t **/\r\n\tp.localToLocal = function(x, y, target, pt) {\r\n\t\tpt = this.localToGlobal(x, y, pt);\r\n\t\treturn target.globalToLocal(pt.x, pt.y, pt);\r\n\t};\r\n\r\n\t/**\r\n\t * Shortcut method to quickly set the transform properties on the display object. All parameters are optional.\r\n\t * Omitted parameters will have the default value set.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.setTransform(100, 100, 2, 2);\r\n\t *\r\n\t * @method setTransform\r\n\t * @param {Number} [x=0] The horizontal translation (x position) in pixels\r\n\t * @param {Number} [y=0] The vertical translation (y position) in pixels\r\n\t * @param {Number} [scaleX=1] The horizontal scale, as a percentage of 1\r\n\t * @param {Number} [scaleY=1] the vertical scale, as a percentage of 1\r\n\t * @param {Number} [rotation=0] The rotation, in degrees\r\n\t * @param {Number} [skewX=0] The horizontal skew factor\r\n\t * @param {Number} [skewY=0] The vertical skew factor\r\n\t * @param {Number} [regX=0] The horizontal registration point in pixels\r\n\t * @param {Number} [regY=0] The vertical registration point in pixels\r\n\t * @return {DisplayObject} Returns this instance. Useful for chaining commands.\r\n\t * @chainable\r\n\t*/\r\n\tp.setTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\r\n\t\tthis.x = x || 0;\r\n\t\tthis.y = y || 0;\r\n\t\tthis.scaleX = scaleX == null ? 1 : scaleX;\r\n\t\tthis.scaleY = scaleY == null ? 1 : scaleY;\r\n\t\tthis.rotation = rotation || 0;\r\n\t\tthis.skewX = skewX || 0;\r\n\t\tthis.skewY = skewY || 0;\r\n\t\tthis.regX = regX || 0;\r\n\t\tthis.regY = regY || 0;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a matrix based on this object's current transform.\r\n\t * @method getMatrix\r\n\t * @param {Matrix2D} matrix Optional. A Matrix2D object to populate with the calculated values. If null, a new\r\n\t * Matrix object is returned.\r\n\t * @return {Matrix2D} A matrix representing this display object's transform.\r\n\t **/\r\n\tp.getMatrix = function(matrix) {\r\n\t\tvar o = this, mtx = matrix&&matrix.identity() || new createjs.Matrix2D();\r\n\t\treturn o.transformMatrix ?  mtx.copy(o.transformMatrix) : mtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);\r\n\t};\r\n\r\n\t/**\r\n\t * Generates a Matrix2D object representing the combined transform of the display object and all of its\r\n\t * parent Containers up to the highest level ancestor (usually the {{#crossLink \"Stage\"}}{{/crossLink}}). This can\r\n\t * be used to transform positions between coordinate spaces, such as with {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"DisplayObject/globalToLocal\"}}{{/crossLink}}.\r\n\t * @method getConcatenatedMatrix\r\n\t * @param {Matrix2D} [matrix] A {{#crossLink \"Matrix2D\"}}{{/crossLink}} object to populate with the calculated values.\r\n\t * If null, a new Matrix2D object is returned.\r\n\t * @return {Matrix2D} The combined matrix.\r\n\t **/\r\n\tp.getConcatenatedMatrix = function(matrix) {\r\n\t\tvar o = this, mtx = this.getMatrix(matrix);\r\n\t\twhile (o = o.parent) {\r\n\t\t\tmtx.prependMatrix(o.getMatrix(o._props.matrix));\r\n\t\t}\r\n\t\treturn mtx;\r\n\t};\r\n\r\n\t/**\r\n\t * Generates a DisplayProps object representing the combined display properties of the  object and all of its\r\n\t * parent Containers up to the highest level ancestor (usually the {{#crossLink \"Stage\"}}{{/crossLink}}).\r\n\t * @method getConcatenatedDisplayProps\r\n\t * @param {DisplayProps} [props] A {{#crossLink \"DisplayProps\"}}{{/crossLink}} object to populate with the calculated values.\r\n\t * If null, a new DisplayProps object is returned.\r\n\t * @return {DisplayProps} The combined display properties.\r\n\t **/\r\n\tp.getConcatenatedDisplayProps = function(props) {\r\n\t\tprops = props ? props.identity() : new createjs.DisplayProps();\r\n\t\tvar o = this, mtx = o.getMatrix(props.matrix); \r\n\t\tdo {\r\n\t\t\tprops.prepend(o.visible, o.alpha, o.shadow, o.compositeOperation);\r\n\t\t\t\r\n\t\t\t// we do this to avoid problems with the matrix being used for both operations when o._props.matrix is passed in as the props param.\r\n\t\t\t// this could be simplified (ie. just done as part of the prepend above) if we switched to using a pool.\r\n\t\t\tif (o != this) { mtx.prependMatrix(o.getMatrix(o._props.matrix)); }\r\n\t\t} while (o = o.parent);\r\n\t\treturn props;\r\n\t};\r\n\r\n\t/**\r\n\t * Tests whether the display object intersects the specified point in local coordinates (ie. draws a pixel with alpha > 0 at\r\n\t * the specified position). This ignores the alpha, shadow, hitArea, mask, and compositeOperation of the display object.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      stage.addEventListener(\"stagemousedown\", handleMouseDown);\r\n\t *      function handleMouseDown(event) {\r\n\t *          var hit = myShape.hitTest(event.stageX, event.stageY);\r\n\t *      }\r\n\t *\r\n\t * Please note that shape-to-shape collision is not currently supported by EaselJS.\r\n\t * @method hitTest\r\n\t * @param {Number} x The x position to check in the display object's local coordinates.\r\n\t * @param {Number} y The y position to check in the display object's local coordinates.\r\n\t * @return {Boolean} A Boolean indicating whether a visible portion of the DisplayObject intersect the specified\r\n\t * local Point.\r\n\t*/\r\n\tp.hitTest = function(x, y) {\r\n\t\tvar ctx = DisplayObject._hitTestContext;\r\n\t\tctx.setTransform(1, 0, 0, 1, -x, -y);\r\n\t\tthis.draw(ctx);\r\n\r\n\t\tvar hit = this._testHit(ctx);\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\treturn hit;\r\n\t};\r\n\r\n\t/**\r\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      var myGraphics = new createjs.Graphics().beginFill(\"#ff0000\").drawCircle(0, 0, 25);\r\n\t *      var shape = stage.addChild(new Shape()).set({graphics:myGraphics, x:100, y:100, alpha:0.5});\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props A generic object containing properties to copy to the DisplayObject instance.\r\n\t * @return {DisplayObject} Returns the instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t*/\r\n\tp.set = function(props) {\r\n\t\tfor (var n in props) { this[n] = props[n]; }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a rectangle representing this object's bounds in its local coordinate system (ie. with no transformation).\r\n\t * Objects that have been cached will return the bounds of the cache.\r\n\t * \r\n\t * Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use \r\n\t * {{#crossLink \"DisplayObject/setBounds\"}}{{/crossLink}} so that they are included when calculating Container\r\n\t * bounds.\r\n\t * \r\n\t * <table>\r\n\t * \t<tr><td><b>All</b></td><td>\r\n\t * \t\tAll display objects support setting bounds manually using setBounds(). Likewise, display objects that\r\n\t * \t\thave been cached using cache() will return the bounds of their cache. Manual and cache bounds will override\r\n\t * \t\tthe automatic calculations listed below.\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>Bitmap</b></td><td>\r\n\t * \t\tReturns the width and height of the sourceRect (if specified) or image, extending from (x=0,y=0).\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>Sprite</b></td><td>\r\n\t * \t\tReturns the bounds of the current frame. May have non-zero x/y if a frame registration point was specified\r\n\t * \t\tin the spritesheet data. See also {{#crossLink \"SpriteSheet/getFrameBounds\"}}{{/crossLink}}\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>Container</b></td><td>\r\n\t * \t\tReturns the aggregate (combined) bounds of all children that return a non-null value from getBounds().\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>Shape</b></td><td>\r\n\t * \t\tDoes not currently support automatic bounds calculations. Use setBounds() to manually define bounds.\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>Text</b></td><td>\r\n\t * \t\tReturns approximate bounds. Horizontal values (x/width) are quite accurate, but vertical values (y/height) are\r\n\t * \t\tnot, especially when using textBaseline values other than \"top\".\r\n\t * \t</td></tr>\r\n\t * \t<tr><td><b>BitmapText</b></td><td>\r\n\t * \t\tReturns approximate bounds. Values will be more accurate if spritesheet frame registration points are close\r\n\t * \t\tto (x=0,y=0).\r\n\t * \t</td></tr>\r\n\t* </table>\r\n\t * \r\n\t * Bounds can be expensive to calculate for some objects (ex. text, or containers with many children), and\r\n\t * are recalculated each time you call getBounds(). You can prevent recalculation on static objects by setting the\r\n\t * bounds explicitly:\r\n\t * \r\n\t * \tvar bounds = obj.getBounds();\r\n\t * \tobj.setBounds(bounds.x, bounds.y, bounds.width, bounds.height);\r\n\t * \t// getBounds will now use the set values, instead of recalculating\r\n\t * \r\n\t * To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its\r\n\t * values if you need to retain it.\r\n\t * \r\n\t * \tvar myBounds = obj.getBounds().clone();\r\n\t * \t// OR:\r\n\t * \tmyRect.copy(obj.getBounds());\r\n\t * \r\n\t * @method getBounds\r\n\t * @return {Rectangle} A Rectangle instance representing the bounds, or null if bounds are not available for this\r\n\t * object.\r\n\t **/\r\n\tp.getBounds = function() {\r\n\t\tif (this._bounds) { return this._rectangle.copy(this._bounds); }\r\n\t\tvar cacheCanvas = this.cacheCanvas;\r\n\t\tif (cacheCanvas) {\r\n\t\t\tvar scale = this._cacheScale;\r\n\t\t\treturn this._rectangle.setValues(this._cacheOffsetX, this._cacheOffsetY, cacheCanvas.width/scale, cacheCanvas.height/scale);\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a rectangle representing this object's bounds in its parent's coordinate system (ie. with transformations applied).\r\n\t * Objects that have been cached will return the transformed bounds of the cache.\r\n\t * \r\n\t * Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use \r\n\t * {{#crossLink \"DisplayObject/setBounds\"}}{{/crossLink}} so that they are included when calculating Container\r\n\t * bounds.\r\n\t * \r\n\t * To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its\r\n\t * values if you need to retain it.\r\n\t * \r\n\t * Container instances calculate aggregate bounds for all children that return bounds via getBounds.\r\n\t * @method getTransformedBounds\r\n\t * @return {Rectangle} A Rectangle instance representing the bounds, or null if bounds are not available for this object.\r\n\t **/\r\n\tp.getTransformedBounds = function() {\r\n\t\treturn this._getBounds();\r\n\t};\r\n\r\n\t/**\r\n\t * Allows you to manually specify the bounds of an object that either cannot calculate their own bounds (ex. Shape &\r\n\t * Text) for future reference, or so the object can be included in Container bounds. Manually set bounds will always\r\n\t * override calculated bounds.\r\n\t * \r\n\t * The bounds should be specified in the object's local (untransformed) coordinates. For example, a Shape instance\r\n\t * with a 25px radius circle centered at 0,0 would have bounds of (-25, -25, 50, 50).\r\n\t * @method setBounds\r\n\t * @param {Number} x The x origin of the bounds. Pass null to remove the manual bounds.\r\n\t * @param {Number} y The y origin of the bounds.\r\n\t * @param {Number} width The width of the bounds.\r\n\t * @param {Number} height The height of the bounds.\r\n\t **/\r\n\tp.setBounds = function(x, y, width, height) {\r\n\t\tif (x == null) { this._bounds = x; return; }\r\n\t\tthis._bounds = (this._bounds || new createjs.Rectangle()).setValues(x, y, width, height);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this DisplayObject. Some properties that are specific to this instance's current context are\r\n\t * reverted to their defaults (for example .parent). Caches are not maintained across clones, and some elements\r\n\t * are copied by reference (masks, individual filter instances, hit area)\r\n\t * @method clone\r\n\t * @return {DisplayObject} A clone of the current DisplayObject instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn this._cloneProps(new DisplayObject());\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[DisplayObject (name=\"+  this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Called before the object gets drawn and is a chance to ensure the display state of the object is correct.\r\n\t * Mostly used by {{#crossLink \"MovieClip\"}}{{/crossLink}} and {{#crossLink \"BitmapText\"}}{{/crossLink}} to\r\n\t * correct their internal state and children prior to being drawn.\r\n\t *\r\n\t * Is manually called via draw in a {{#crossLink \"Stage\"}}{{/crossLink}} but is automatically called when\r\n\t * present in a {{#crossLink \"StageGL\"}}{{/crossLink}} instance.\r\n\t *\r\n\t * @method _updateState\r\n\t * @default null\r\n\t */\r\n\tp._updateState = null;\r\n\r\n\t// separated so it can be used more easily in subclasses:\r\n\t/**\r\n\t * @method _cloneProps\r\n\t * @param {DisplayObject} o The DisplayObject instance which will have properties from the current DisplayObject\r\n\t * instance copied into.\r\n\t * @return {DisplayObject} o\r\n\t * @protected\r\n\t **/\r\n\tp._cloneProps = function(o) {\r\n\t\to.alpha = this.alpha;\r\n\t\to.mouseEnabled = this.mouseEnabled;\r\n\t\to.tickEnabled = this.tickEnabled;\r\n\t\to.name = this.name;\r\n\t\to.regX = this.regX;\r\n\t\to.regY = this.regY;\r\n\t\to.rotation = this.rotation;\r\n\t\to.scaleX = this.scaleX;\r\n\t\to.scaleY = this.scaleY;\r\n\t\to.shadow = this.shadow;\r\n\t\to.skewX = this.skewX;\r\n\t\to.skewY = this.skewY;\r\n\t\to.visible = this.visible;\r\n\t\to.x  = this.x;\r\n\t\to.y = this.y;\r\n\t\to.compositeOperation = this.compositeOperation;\r\n\t\to.snapToPixel = this.snapToPixel;\r\n\t\to.filters = this.filters==null?null:this.filters.slice(0);\r\n\t\to.mask = this.mask;\r\n\t\to.hitArea = this.hitArea;\r\n\t\to.cursor = this.cursor;\r\n\t\to._bounds = this._bounds;\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _applyShadow\r\n\t * @protected\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @param {Shadow} shadow\r\n\t **/\r\n\tp._applyShadow = function(ctx, shadow) {\r\n\t\tshadow = shadow || Shadow.identity;\r\n\t\tctx.shadowColor = shadow.color;\r\n\t\tctx.shadowOffsetX = shadow.offsetX;\r\n\t\tctx.shadowOffsetY = shadow.offsetY;\r\n\t\tctx.shadowBlur = shadow.blur;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * @protected\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\t// because tick can be really performance sensitive, check for listeners before calling dispatchEvent.\r\n\t\tvar ls = this._listeners;\r\n\t\tif (ls && ls[\"tick\"]) {\r\n\t\t\t// reset & reuse the event object to avoid construction / GC costs:\r\n\t\t\tevtObj.target = null;\r\n\t\t\tevtObj.propagationStopped = evtObj.immediatePropagationStopped = false;\r\n\t\t\tthis.dispatchEvent(evtObj);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _testHit\r\n\t * @protected\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp._testHit = function(ctx) {\r\n\t\ttry {\r\n\t\t\tvar hit = ctx.getImageData(0, 0, 1, 1).data[3] > 1;\r\n\t\t} catch (e) {\r\n\t\t\tif (!DisplayObject.suppressCrossDomainErrors) {\r\n\t\t\t\tthrow \"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hit;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getBounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform If true, does not apply this object's transform.\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._getBounds = function(matrix, ignoreTransform){\r\n\t\treturn this._transformBounds(this.getBounds(), matrix, ignoreTransform);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _transformBounds\r\n\t * @param {Rectangle} bounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._transformBounds = function(bounds, matrix, ignoreTransform) {\r\n\t\tif (!bounds) { return bounds; }\r\n\t\tvar x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height, mtx = this._props.matrix;\r\n\t\tmtx = ignoreTransform ? mtx.identity() : this.getMatrix(mtx);\r\n\t\t\r\n\t\tif (x || y) { mtx.appendTransform(0,0,1,1,0,0,0,-x,-y); } // TODO: simplify this.\r\n\t\tif (matrix) { mtx.prependMatrix(matrix); }\r\n\t\t\r\n\t\tvar x_a = width*mtx.a, x_b = width*mtx.b;\r\n\t\tvar y_c = height*mtx.c, y_d = height*mtx.d;\r\n\t\tvar tx = mtx.tx, ty = mtx.ty;\r\n\t\t\r\n\t\tvar minX = tx, maxX = tx, minY = ty, maxY = ty;\r\n\r\n\t\tif ((x = x_a + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\t\tif ((x = x_a + y_c + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\t\tif ((x = y_c + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\r\n\t\tif ((y = x_b + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\t\tif ((y = x_b + y_d + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\t\tif ((y = y_d + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\r\n\t\treturn bounds.setValues(minX, minY, maxX-minX, maxY-minY);\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether the display object has any mouse event listeners or a cursor.\r\n\t * @method _isMouseOpaque\r\n\t * @return {Boolean}\r\n\t * @protected\r\n\t **/\r\n\tp._hasMouseEventListener = function() {\r\n\t\tvar evts = DisplayObject._MOUSE_EVENTS;\r\n\t\tfor (var i= 0, l=evts.length; i<l; i++) {\r\n\t\t\tif (this.hasEventListener(evts[i])) { return true; }\r\n\t\t}\r\n\t\treturn !!this.cursor;\r\n\t};\r\n\r\n\tcreatejs.DisplayObject = createjs.promote(DisplayObject, \"EventDispatcher\");\r\n}());\n\n//##############################################################################\n// Container.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\t\r\n\r\n// constructor:\r\n/**\r\n * A Container is a nestable display list that allows you to work with compound display elements. For  example you could\r\n * group arm, leg, torso and head {{#crossLink \"Bitmap\"}}{{/crossLink}} instances together into a Person Container, and\r\n * transform them as a group, while still being able to move the individual parts relative to each other. Children of\r\n * containers have their <code>transform</code> and <code>alpha</code> properties concatenated with their parent\r\n * Container.\r\n *\r\n * For example, a {{#crossLink \"Shape\"}}{{/crossLink}} with x=100 and alpha=0.5, placed in a Container with <code>x=50</code>\r\n * and <code>alpha=0.7</code> will be rendered to the canvas at <code>x=150</code> and <code>alpha=0.35</code>.\r\n * Containers have some overhead, so you generally shouldn't create a Container to hold a single child.\r\n *\r\n * <h4>Example</h4>\r\n *\r\n *      var container = new createjs.Container();\r\n *      container.addChild(bitmapInstance, shapeInstance);\r\n *      container.x = 100;\r\n *\r\n * @class Container\r\n * @extends DisplayObject\r\n * @constructor\r\n **/\r\n\tfunction Container() {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The array of children in the display list. You should usually use the child management methods such as\r\n\t\t * {{#crossLink \"Container/addChild\"}}{{/crossLink}}, {{#crossLink \"Container/removeChild\"}}{{/crossLink}},\r\n\t\t * {{#crossLink \"Container/swapChildren\"}}{{/crossLink}}, etc, rather than accessing this directly, but it is\r\n\t\t * included for advanced uses.\r\n\t\t * @property children\r\n\t\t * @type Array\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.children = [];\r\n\t\t\r\n\t\t/**\r\n\t\t * Indicates whether the children of this container are independently enabled for mouse/pointer interaction.\r\n\t\t * If false, the children will be aggregated under the container - for example, a click on a child shape would\r\n\t\t * trigger a click event on the container.\r\n\t\t * @property mouseChildren\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.mouseChildren = true;\r\n\t\t\r\n\t\t/**\r\n\t\t * If false, the tick will not be propagated to children of this Container. This can provide some performance benefits.\r\n\t\t * In addition to preventing the \"tick\" event from being dispatched, it will also prevent tick related updates\r\n\t\t * on some display objects (ex. Sprite & MovieClip frame advancing, DOMElement visibility handling).\r\n\t\t * @property tickChildren\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.tickChildren = true;\r\n\t}\r\n\tvar p = createjs.extend(Container, createjs.DisplayObject);\r\n\t\r\n\t\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"Container/numChildren:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getNumChildren\r\n\t * @protected\r\n\t * @return {Number}\r\n\t **/\r\n\tp._getNumChildren = function() {\r\n\t\treturn this.children.length;\r\n\t};\r\n\t// Container.getNumChildren is @deprecated. Remove for 1.1+\r\n\tp.getNumChildren = createjs.deprecate(p._getNumChildren, \"Container.getNumChildren\");\r\n\r\n\t/**\r\n\t * Returns the number of children in the container.\r\n\t * @property numChildren\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tnumChildren: { get: p._getNumChildren }\r\n\t\t});\r\n\t} catch (e) {}\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\r\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\r\n\t * @method initialize\r\n\t * @deprecated in favour of `createjs.promote()`\r\n\t **/\r\n\tp.initialize = Container; // TODO: deprecated.\r\n\t\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || this.children.length;\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\t\r\n\t\t// this ensures we don't have issues with display list changes that occur during a draw:\r\n\t\tvar list = this.children.slice();\r\n\t\tfor (var i=0,l=list.length; i<l; i++) {\r\n\t\t\tvar child = list[i];\r\n\t\t\tif (!child.isVisible()) { continue; }\r\n\t\t\t\r\n\t\t\t// draw the child:\r\n\t\t\tctx.save();\r\n\t\t\tchild.updateContext(ctx);\r\n\t\t\tchild.draw(ctx);\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Adds a child to the top of the display list.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t * \t\tcontainer.addChild(bitmapInstance);\r\n\t *\r\n\t * You can also add multiple children at once:\r\n\t *\r\n\t * \t\tcontainer.addChild(bitmapInstance, shapeInstance, textInstance);\r\n\t *\r\n\t * @method addChild\r\n\t * @param {DisplayObject} child The display object to add.\r\n\t * @return {DisplayObject} The child that was added, or the last child if multiple children were added.\r\n\t **/\r\n\tp.addChild = function(child) {\r\n\t\tif (child == null) { return child; }\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tfor (var i=0; i<l; i++) { this.addChild(arguments[i]); }\r\n\t\t\treturn arguments[l-1];\r\n\t\t}\r\n\t\t// Note: a lot of duplication with addChildAt, but push is WAY faster than splice.\r\n\t\tvar par=child.parent, silent = par === this;\r\n\t\tpar&&par._removeChildAt(createjs.indexOf(par.children, child), silent);\r\n\t\tchild.parent = this;\r\n\t\tthis.children.push(child);\r\n\t\tif (!silent) { child.dispatchEvent(\"added\"); }\r\n\t\treturn child;\r\n\t};\r\n\r\n\t/**\r\n\t * Adds a child to the display list at the specified index, bumping children at equal or greater indexes up one, and\r\n\t * setting its parent to this Container.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      addChildAt(child1, index);\r\n\t *\r\n\t * You can also add multiple children, such as:\r\n\t *\r\n\t *      addChildAt(child1, child2, ..., index);\r\n\t *\r\n\t * The index must be between 0 and numChildren. For example, to add myShape under otherShape in the display list,\r\n\t * you could use:\r\n\t *\r\n\t *      container.addChildAt(myShape, container.getChildIndex(otherShape));\r\n\t *\r\n\t * This would also bump otherShape's index up by one. Fails silently if the index is out of range.\r\n\t *\r\n\t * @method addChildAt\r\n\t * @param {DisplayObject} child The display object to add.\r\n\t * @param {Number} index The index to add the child at.\r\n\t * @return {DisplayObject} Returns the last child that was added, or the last child if multiple children were added.\r\n\t **/\r\n\tp.addChildAt = function(child, index) {\r\n\t\tvar l = arguments.length;\r\n\t\tvar indx = arguments[l-1]; // can't use the same name as the index param or it replaces arguments[1]\r\n\t\tif (indx < 0 || indx > this.children.length) { return arguments[l-2]; }\r\n\t\tif (l > 2) {\r\n\t\t\tfor (var i=0; i<l-1; i++) { this.addChildAt(arguments[i], indx+i); }\r\n\t\t\treturn arguments[l-2];\r\n\t\t}\r\n\t\tvar par=child.parent, silent = par === this;\r\n\t\tpar&&par._removeChildAt(createjs.indexOf(par.children, child), silent);\r\n\t\tchild.parent = this;\r\n\t\tthis.children.splice(index, 0, child);\r\n\t\tif (!silent) { child.dispatchEvent(\"added\"); }\r\n\t\treturn child;\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified child from the display list. Note that it is faster to use removeChildAt() if the index is\r\n\t * already known.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      container.removeChild(child);\r\n\t *\r\n\t * You can also remove multiple children:\r\n\t *\r\n\t *      removeChild(child1, child2, ...);\r\n\t *\r\n\t * Returns true if the child (or children) was removed, or false if it was not in the display list.\r\n\t * @method removeChild\r\n\t * @param {DisplayObject} child The child to remove.\r\n\t * @return {Boolean} true if the child (or children) was removed, or false if it was not in the display list.\r\n\t **/\r\n\tp.removeChild = function(child) {\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tvar good = true;\r\n\t\t\tfor (var i=0; i<l; i++) { good = good && this.removeChild(arguments[i]); }\r\n\t\t\treturn good;\r\n\t\t}\r\n\t\treturn this._removeChildAt(createjs.indexOf(this.children, child));\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the child at the specified index from the display list, and sets its parent to null.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      container.removeChildAt(2);\r\n\t *\r\n\t * You can also remove multiple children:\r\n\t *\r\n\t *      container.removeChild(2, 7, ...)\r\n\t *\r\n\t * Returns true if the child (or children) was removed, or false if any index was out of range.\r\n\t * @method removeChildAt\r\n\t * @param {Number} index The index of the child to remove.\r\n\t * @return {Boolean} true if the child (or children) was removed, or false if any index was out of range.\r\n\t **/\r\n\tp.removeChildAt = function(index) {\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tvar a = [];\r\n\t\t\tfor (var i=0; i<l; i++) { a[i] = arguments[i]; }\r\n\t\t\ta.sort(function(a, b) { return b-a; });\r\n\t\t\tvar good = true;\r\n\t\t\tfor (var i=0; i<l; i++) { good = good && this._removeChildAt(a[i]); }\r\n\t\t\treturn good;\r\n\t\t}\r\n\t\treturn this._removeChildAt(index);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes all children from the display list.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t * \tcontainer.removeAllChildren();\r\n\t *\r\n\t * @method removeAllChildren\r\n\t **/\r\n\tp.removeAllChildren = function() {\r\n\t\tvar kids = this.children;\r\n\t\twhile (kids.length) { this._removeChildAt(0); }\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the child at the specified index.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      container.getChildAt(2);\r\n\t *\r\n\t * @method getChildAt\r\n\t * @param {Number} index The index of the child to return.\r\n\t * @return {DisplayObject} The child at the specified index. Returns null if there is no child at the index.\r\n\t **/\r\n\tp.getChildAt = function(index) {\r\n\t\treturn this.children[index];\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns the child with the specified name.\r\n\t * @method getChildByName\r\n\t * @param {String} name The name of the child to return.\r\n\t * @return {DisplayObject} The child with the specified name.\r\n\t **/\r\n\tp.getChildByName = function(name) {\r\n\t\tvar kids = this.children;\r\n\t\tfor (var i=0,l=kids.length;i<l;i++) {\r\n\t\t\tif(kids[i].name == name) { return kids[i]; }\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Performs an array sort operation on the child list.\r\n\t *\r\n\t * <h4>Example: Display children with a higher y in front.</h4>\r\n\t * \r\n\t *      var sortFunction = function(obj1, obj2, options) {\r\n\t *          if (obj1.y > obj2.y) { return 1; }\r\n\t *          if (obj1.y < obj2.y) { return -1; }\r\n\t *          return 0;\r\n\t *      }\r\n\t *      container.sortChildren(sortFunction);\r\n\t *\r\n\t * @method sortChildren\r\n\t * @param {Function} sortFunction the function to use to sort the child list. See JavaScript's <code>Array.sort</code>\r\n\t * documentation for details.\r\n\t **/\r\n\tp.sortChildren = function(sortFunction) {\r\n\t\tthis.children.sort(sortFunction);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the index of the specified child in the display list, or -1 if it is not in the display list.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      var index = container.getChildIndex(child);\r\n\t *\r\n\t * @method getChildIndex\r\n\t * @param {DisplayObject} child The child to return the index of.\r\n\t * @return {Number} The index of the specified child. -1 if the child is not found.\r\n\t **/\r\n\tp.getChildIndex = function(child) {\r\n\t\treturn createjs.indexOf(this.children, child);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Swaps the children at the specified indexes. Fails silently if either index is out of range.\r\n\t * @method swapChildrenAt\r\n\t * @param {Number} index1\r\n\t * @param {Number} index2\r\n\t **/\r\n\tp.swapChildrenAt = function(index1, index2) {\r\n\t\tvar kids = this.children;\r\n\t\tvar o1 = kids[index1];\r\n\t\tvar o2 = kids[index2];\r\n\t\tif (!o1 || !o2) { return; }\r\n\t\tkids[index1] = o2;\r\n\t\tkids[index2] = o1;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Swaps the specified children's depth in the display list. Fails silently if either child is not a child of this\r\n\t * Container.\r\n\t * @method swapChildren\r\n\t * @param {DisplayObject} child1\r\n\t * @param {DisplayObject} child2\r\n\t **/\r\n\tp.swapChildren = function(child1, child2) {\r\n\t\tvar kids = this.children;\r\n\t\tvar index1,index2;\r\n\t\tfor (var i=0,l=kids.length;i<l;i++) {\r\n\t\t\tif (kids[i] == child1) { index1 = i; }\r\n\t\t\tif (kids[i] == child2) { index2 = i; }\r\n\t\t\tif (index1 != null && index2 != null) { break; }\r\n\t\t}\r\n\t\tif (i==l) { return; } // TODO: throw error?\r\n\t\tkids[index1] = child2;\r\n\t\tkids[index2] = child1;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Changes the depth of the specified child. Fails silently if the child is not a child of this container, or the index is out of range.\r\n\t * @param {DisplayObject} child\r\n\t * @param {Number} index  \r\n\t * @method setChildIndex\r\n\t **/\r\n\tp.setChildIndex = function(child, index) {\r\n\t\tvar kids = this.children, l=kids.length;\r\n\t\tif (child.parent != this || index < 0 || index >= l) { return; }\r\n\t\tfor (var i=0;i<l;i++) {\r\n\t\t\tif (kids[i] == child) { break; }\r\n\t\t}\r\n\t\tif (i==l || i == index) { return; }\r\n\t\tkids.splice(i,1);\r\n\t\tkids.splice(index,0,child);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns true if the specified display object either is this container or is a descendent (child, grandchild, etc)\r\n\t * of this container.\r\n\t * @method contains\r\n\t * @param {DisplayObject} child The DisplayObject to be checked.\r\n\t * @return {Boolean} true if the specified display object either is this container or is a descendent.\r\n\t **/\r\n\tp.contains = function(child) {\r\n\t\twhile (child) {\r\n\t\t\tif (child == this) { return true; }\r\n\t\t\tchild = child.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Tests whether the display object intersects the specified local point (ie. draws a pixel with alpha > 0 at the\r\n\t * specified position). This ignores the alpha, shadow and compositeOperation of the display object, and all\r\n\t * transform properties including regX/Y.\r\n\t * @method hitTest\r\n\t * @param {Number} x The x position to check in the display object's local coordinates.\r\n\t * @param {Number} y The y position to check in the display object's local coordinates.\r\n\t * @return {Boolean} A Boolean indicating whether there is a visible section of a DisplayObject that overlaps the specified\r\n\t * coordinates.\r\n\t **/\r\n\tp.hitTest = function(x, y) {\r\n\t\t// TODO: optimize to use the fast cache check where possible.\r\n\t\treturn (this.getObjectUnderPoint(x, y) != null);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns an array of all display objects under the specified coordinates that are in this container's display\r\n\t * list. This routine ignores any display objects with {{#crossLink \"DisplayObject/mouseEnabled:property\"}}{{/crossLink}}\r\n\t * set to `false`. The array will be sorted in order of visual depth, with the top-most display object at index 0.\r\n\t * This uses shape based hit detection, and can be an expensive operation to run, so it is best to use it carefully.\r\n\t * For example, if testing for objects under the mouse, test on tick (instead of on {{#crossLink \"DisplayObject/mousemove:event\"}}{{/crossLink}}),\r\n\t * and only if the mouse's position has changed.\r\n\t * \r\n\t * <ul>\r\n\t *     <li>By default (mode=0) this method evaluates all display objects.</li>\r\n\t *     <li>By setting the `mode` parameter to `1`, the {{#crossLink \"DisplayObject/mouseEnabled:property\"}}{{/crossLink}}\r\n\t * \t\tand {{#crossLink \"mouseChildren:property\"}}{{/crossLink}} properties will be respected.</li>\r\n\t * \t   <li>Setting the `mode` to `2` additionally excludes display objects that do not have active mouse event\r\n\t * \t   \tlisteners or a {{#crossLink \"DisplayObject:cursor:property\"}}{{/crossLink}} property. That is, only objects\r\n\t * \t   \tthat would normally intercept mouse interaction will be included. This can significantly improve performance\r\n\t * \t   \tin some cases by reducing the number of display objects that need to be tested.</li>\r\n\t * </li>\r\n\t * \r\n\t * This method accounts for both {{#crossLink \"DisplayObject/hitArea:property\"}}{{/crossLink}} and {{#crossLink \"DisplayObject/mask:property\"}}{{/crossLink}}.\r\n\t * @method getObjectsUnderPoint\r\n\t * @param {Number} x The x position in the container to test.\r\n\t * @param {Number} y The y position in the container to test.\r\n\t * @param {Number} [mode=0] The mode to use to determine which display objects to include. 0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.\r\n\t * @return {Array} An Array of DisplayObjects under the specified coordinates.\r\n\t **/\r\n\tp.getObjectsUnderPoint = function(x, y, mode) {\r\n\t\tvar arr = [];\r\n\t\tvar pt = this.localToGlobal(x, y);\r\n\t\tthis._getObjectsUnderPoint(pt.x, pt.y, arr, mode>0, mode==1);\r\n\t\treturn arr;\r\n\t};\r\n\r\n\t/**\r\n\t * Similar to {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}}, but returns only the top-most display\r\n\t * object. This runs significantly faster than <code>getObjectsUnderPoint()</code>, but is still potentially an expensive\r\n\t * operation. See {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}} for more information.\r\n\t * @method getObjectUnderPoint\r\n\t * @param {Number} x The x position in the container to test.\r\n\t * @param {Number} y The y position in the container to test.\r\n\t * @param {Number} mode The mode to use to determine which display objects to include.  0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.\r\n\t * @return {DisplayObject} The top-most display object under the specified coordinates.\r\n\t **/\r\n\tp.getObjectUnderPoint = function(x, y, mode) {\r\n\t\tvar pt = this.localToGlobal(x, y);\r\n\t\treturn this._getObjectsUnderPoint(pt.x, pt.y, null, mode>0, mode==1);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getBounds = function() {\r\n\t\treturn this._getBounds(null, true);\r\n\t};\r\n\t\r\n\t\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getTransformedBounds = function() {\r\n\t\treturn this._getBounds();\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Container. Some properties that are specific to this instance's current context are\r\n\t * reverted to their defaults (for example .parent).\r\n\t * @method clone\r\n\t * @param {Boolean} [recursive=false] If true, all of the descendants of this container will be cloned recursively. If false, the\r\n\t * properties of the container will be cloned, but the new instance will not have any children.\r\n\t * @return {Container} A clone of the current Container instance.\r\n\t **/\r\n\tp.clone = function(recursive) {\r\n\t\tvar o = this._cloneProps(new Container());\r\n\t\tif (recursive) { this._cloneChildren(o); }\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Container (name=\"+  this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * @protected\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\tif (this.tickChildren) {\r\n\t\t\tfor (var i=this.children.length-1; i>=0; i--) {\r\n\t\t\t\tvar child = this.children[i];\r\n\t\t\t\tif (child.tickEnabled && child._tick) { child._tick(evtObj); }\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.DisplayObject__tick(evtObj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Recursively clones all children of this container, and adds them to the target container.\r\n\t * @method cloneChildren\r\n\t * @protected\r\n\t * @param {Container} o The target container.\r\n\t **/\r\n\tp._cloneChildren = function(o) {\r\n\t\tif (o.children.length) { o.removeAllChildren(); }\r\n\t\tvar arr = o.children;\r\n\t\tfor (var i=0, l=this.children.length; i<l; i++) {\r\n\t\t\tvar clone = this.children[i].clone(true);\r\n\t\t\tclone.parent = o;\r\n\t\t\tarr.push(clone);\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * Removes the child at the specified index from the display list, and sets its parent to null.\r\n\t * Used by `removeChildAt`, `addChild`, and `addChildAt`.\r\n\t * @method removeChildAt\r\n\t * @protected\r\n\t * @param {Number} index The index of the child to remove.\r\n\t * @param {Boolean} [silent] Prevents dispatch of `removed` event if true.\r\n\t * @return {Boolean} true if the child (or children) was removed, or false if any index was out of range.\r\n\t **/\r\n\tp._removeChildAt = function(index, silent) {\r\n\t\tif (index < 0 || index > this.children.length-1) { return false; }\r\n\t\tvar child = this.children[index];\r\n\t\tif (child) { child.parent = null; }\r\n\t\tthis.children.splice(index, 1);\r\n\t\tif (!silent) { child.dispatchEvent(\"removed\"); }\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getObjectsUnderPoint\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Array} arr\r\n\t * @param {Boolean} mouse If true, it will respect mouse interaction properties like mouseEnabled, mouseChildren, and active listeners.\r\n\t * @param {Boolean} activeListener If true, there is an active mouse event listener on a parent object.\r\n\t * @param {Number} currentDepth Indicates the current depth of the search.\r\n\t * @return {DisplayObject}\r\n\t * @protected\r\n\t **/\r\n\tp._getObjectsUnderPoint = function(x, y, arr, mouse, activeListener, currentDepth) {\r\n\t\tcurrentDepth = currentDepth || 0;\r\n\t\tif (!currentDepth && !this._testMask(this, x, y)) { return null; }\r\n\t\tvar mtx, ctx = createjs.DisplayObject._hitTestContext;\r\n\t\tactiveListener = activeListener || (mouse&&this._hasMouseEventListener());\r\n\r\n\t\t// draw children one at a time, and check if we get a hit:\r\n\t\tvar children = this.children, l = children.length;\r\n\t\tfor (var i=l-1; i>=0; i--) {\r\n\t\t\tvar child = children[i];\r\n\t\t\tvar hitArea = child.hitArea;\r\n\t\t\tif (!child.visible || (!hitArea && !child.isVisible()) || (mouse && !child.mouseEnabled)) { continue; }\r\n\t\t\tif (!hitArea && !this._testMask(child, x, y)) { continue; }\r\n\t\t\t\r\n\t\t\t// if a child container has a hitArea then we only need to check its hitAre2a, so we can treat it as a normal DO:\r\n\t\t\tif (!hitArea && child instanceof Container) {\r\n\t\t\t\tvar result = child._getObjectsUnderPoint(x, y, arr, mouse, activeListener, currentDepth+1);\r\n\t\t\t\tif (!arr && result) { return (mouse && !this.mouseChildren) ? this : result; }\r\n\t\t\t} else {\r\n\t\t\t\tif (mouse && !activeListener && !child._hasMouseEventListener()) { continue; }\r\n\t\t\t\t\r\n\t\t\t\t// TODO: can we pass displayProps forward, to avoid having to calculate this backwards every time? It's kind of a mixed bag. When we're only hunting for DOs with event listeners, it may not make sense.\r\n\t\t\t\tvar props = child.getConcatenatedDisplayProps(child._props);\r\n\t\t\t\tmtx = props.matrix;\r\n\t\t\t\t\r\n\t\t\t\tif (hitArea) {\r\n\t\t\t\t\tmtx.appendMatrix(hitArea.getMatrix(hitArea._props.matrix));\r\n\t\t\t\t\tprops.alpha = hitArea.alpha;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tctx.globalAlpha = props.alpha;\r\n\t\t\t\tctx.setTransform(mtx.a,  mtx.b, mtx.c, mtx.d, mtx.tx-x, mtx.ty-y);\r\n\t\t\t\t(hitArea||child).draw(ctx);\r\n\t\t\t\tif (!this._testHit(ctx)) { continue; }\r\n\t\t\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\t\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\t\t\tif (arr) { arr.push(child); }\r\n\t\t\t\telse { return (mouse && !this.mouseChildren) ? this : child; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _testMask\r\n\t * @param {DisplayObject} target\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Boolean} Indicates whether the x/y is within the masked region.\r\n\t * @protected\r\n\t **/\r\n\tp._testMask = function(target, x, y) {\r\n\t\tvar mask = target.mask;\r\n\t\tif (!mask || !mask.graphics || mask.graphics.isEmpty()) { return true; }\r\n\t\t\r\n\t\tvar mtx = this._props.matrix, parent = target.parent;\r\n\t\tmtx = parent ? parent.getConcatenatedMatrix(mtx) : mtx.identity();\r\n\t\tmtx = mask.getMatrix(mask._props.matrix).prependMatrix(mtx);\r\n\t\t\r\n\t\tvar ctx = createjs.DisplayObject._hitTestContext;\r\n\t\tctx.setTransform(mtx.a,  mtx.b, mtx.c, mtx.d, mtx.tx-x, mtx.ty-y);\r\n\t\t\r\n\t\t// draw the mask as a solid fill:\r\n\t\tmask.graphics.drawAsPath(ctx);\r\n\t\tctx.fillStyle = \"#000\";\r\n\t\tctx.fill();\r\n\t\t\r\n\t\tif (!this._testHit(ctx)) { return false; }\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\t\r\n\t\treturn true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _getBounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform If true, does not apply this object's transform.\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._getBounds = function(matrix, ignoreTransform) {\r\n\t\tvar bounds = this.DisplayObject_getBounds();\r\n\t\tif (bounds) { return this._transformBounds(bounds, matrix, ignoreTransform); }\r\n\t\t\r\n\t\tvar mtx = this._props.matrix;\r\n\t\tmtx = ignoreTransform ? mtx.identity() : this.getMatrix(mtx);\r\n\t\tif (matrix) { mtx.prependMatrix(matrix); }\r\n\t\t\r\n\t\tvar l = this.children.length, rect=null;\r\n\t\tfor (var i=0; i<l; i++) {\r\n\t\t\tvar child = this.children[i];\r\n\t\t\tif (!child.visible || !(bounds = child._getBounds(mtx))) { continue; }\r\n\t\t\tif (rect) { rect.extend(bounds.x, bounds.y, bounds.width, bounds.height); }\r\n\t\t\telse { rect = bounds.clone(); }\r\n\t\t}\r\n\t\treturn rect;\r\n\t};\r\n\r\n\r\n\tcreatejs.Container = createjs.promote(Container, \"DisplayObject\");\r\n}());\n\n//##############################################################################\n// Stage.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * A stage is the root level {{#crossLink \"Container\"}}{{/crossLink}} for a display list. Each time its {{#crossLink \"Stage/tick\"}}{{/crossLink}}\n\t * method is called, it will render its display list to its target canvas.\n\t *\n\t * <h4>Example</h4>\n\t * This example creates a stage, adds a child to it, then uses {{#crossLink \"Ticker\"}}{{/crossLink}} to update the child\n\t * and redraw the stage using {{#crossLink \"Stage/update\"}}{{/crossLink}}.\n\t *\n\t *      var stage = new createjs.Stage(\"canvasElementId\");\n\t *      var image = new createjs.Bitmap(\"imagePath.png\");\n\t *      stage.addChild(image);\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      function handleTick(event) {\n\t *          image.x += 10;\n\t *          stage.update();\n\t *      }\n\t *\n\t * @class Stage\n\t * @extends Container\n\t * @constructor\n\t * @param {HTMLCanvasElement | String | Object} canvas A canvas object that the Stage will render to, or the string id\n\t * of a canvas object in the current document.\n\t **/\n\tfunction Stage(canvas) {\n\t\tthis.Container_constructor();\n\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * Indicates whether the stage should automatically clear the canvas before each render. You can set this to <code>false</code>\n\t\t * to manually control clearing (for generative art, or when pointing multiple stages at the same canvas for\n\t\t * example).\n\t\t *\n\t\t * <h4>Example</h4>\n\t\t *\n\t\t *      var stage = new createjs.Stage(\"canvasId\");\n\t\t *      stage.autoClear = false;\n\t\t *\n\t\t * @property autoClear\n\t\t * @type Boolean\n\t\t * @default true\n\t\t **/\n\t\tthis.autoClear = true;\n\t\n\t\t/**\n\t\t * The canvas the stage will render to. Multiple stages can share a single canvas, but you must disable autoClear for all but the\n\t\t * first stage that will be ticked (or they will clear each other's render).\n\t\t *\n\t\t * When changing the canvas property you must disable the events on the old canvas, and enable events on the\n\t\t * new canvas or mouse events will not work as expected. For example:\n\t\t *\n\t\t *      myStage.enableDOMEvents(false);\n\t\t *      myStage.canvas = anotherCanvas;\n\t\t *      myStage.enableDOMEvents(true);\n\t\t *\n\t\t * @property canvas\n\t\t * @type HTMLCanvasElement | Object\n\t\t **/\n\t\tthis.canvas = (typeof canvas == \"string\") ? document.getElementById(canvas) : canvas;\n\t\n\t\t/**\n\t\t * The current mouse X position on the canvas. If the mouse leaves the canvas, this will indicate the most recent\n\t\t * position over the canvas, and mouseInBounds will be set to false.\n\t\t * @property mouseX\n\t\t * @type Number\n\t\t * @readonly\n\t\t **/\n\t\tthis.mouseX = 0;\n\t\n\t\t/**\n\t\t * The current mouse Y position on the canvas. If the mouse leaves the canvas, this will indicate the most recent\n\t\t * position over the canvas, and mouseInBounds will be set to false.\n\t\t * @property mouseY\n\t\t * @type Number\n\t\t * @readonly\n\t\t **/\n\t\tthis.mouseY = 0;\n\t\n\t\t/**\n\t\t * Specifies the area of the stage to affect when calling update. This can be use to selectively\n\t\t * re-draw specific regions of the canvas. If null, the whole canvas area is drawn.\n\t\t * @property drawRect\n\t\t * @type {Rectangle}\n\t\t */\n\t\tthis.drawRect = null;\n\t\n\t\t/**\n\t\t * Indicates whether display objects should be rendered on whole pixels. You can set the\n\t\t * {{#crossLink \"DisplayObject/snapToPixel\"}}{{/crossLink}} property of\n\t\t * display objects to false to enable/disable this behaviour on a per instance basis.\n\t\t * @property snapToPixelEnabled\n\t\t * @type Boolean\n\t\t * @default false\n\t\t **/\n\t\tthis.snapToPixelEnabled = false;\n\t\n\t\t/**\n\t\t * Indicates whether the mouse is currently within the bounds of the canvas.\n\t\t * @property mouseInBounds\n\t\t * @type Boolean\n\t\t * @default false\n\t\t **/\n\t\tthis.mouseInBounds = false;\n\t\n\t\t/**\n\t\t * If true, tick callbacks will be called on all display objects on the stage prior to rendering to the canvas.\n\t\t * @property tickOnUpdate\n\t\t * @type Boolean\n\t\t * @default true\n\t\t **/\n\t\tthis.tickOnUpdate = true;\n\t\n\t\t/**\n\t\t * If true, mouse move events will continue to be called when the mouse leaves the target canvas. See\n\t\t * {{#crossLink \"Stage/mouseInBounds:property\"}}{{/crossLink}}, and {{#crossLink \"MouseEvent\"}}{{/crossLink}}\n\t\t * x/y/rawX/rawY.\n\t\t * @property mouseMoveOutside\n\t\t * @type Boolean\n\t\t * @default false\n\t\t **/\n\t\tthis.mouseMoveOutside = false;\n\t\t\n\t\t\n\t\t/**\n\t\t * Prevents selection of other elements in the html page if the user clicks and drags, or double clicks on the canvas.\n\t\t * This works by calling `preventDefault()` on any mousedown events (or touch equivalent) originating on the canvas.\n\t\t * @property preventSelection\n\t\t * @type Boolean\n\t\t * @default true\n\t\t **/\n\t\tthis.preventSelection = true;\n\t\n\t\t/**\n\t\t * The hitArea property is not supported for Stage.\n\t\t * @property hitArea\n\t\t * @type {DisplayObject}\n\t\t * @default null\n\t\t */\n\t\t \n\t\t \n\t// private properties:\n\t\t/**\n\t\t * Holds objects with data for each active pointer id. Each object has the following properties:\n\t\t * x, y, event, target, overTarget, overX, overY, inBounds, posEvtObj (native event that last updated position)\n\t\t * @property _pointerData\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._pointerData = {};\n\t\n\t\t/**\n\t\t * Number of active pointers.\n\t\t * @property _pointerCount\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._pointerCount = 0;\n\t\n\t\t/**\n\t\t * The ID of the primary pointer.\n\t\t * @property _primaryPointerID\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._primaryPointerID = null;\n\t\n\t\t/**\n\t\t * @property _mouseOverIntervalID\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._mouseOverIntervalID = null;\n\t\t\n\t\t/**\n\t\t * @property _nextStage\n\t\t * @protected\n\t\t * @type Stage\n\t\t **/\n\t\tthis._nextStage = null;\n\t\t\n\t\t/**\n\t\t * @property _prevStage\n\t\t * @protected\n\t\t * @type Stage\n\t\t **/\n\t\tthis._prevStage = null;\n\t\t\n\t\t\n\t// initialize:\n\t\tthis.enableDOMEvents(true);\n\t}\n\tvar p = createjs.extend(Stage, createjs.Container);\n\n// events:\n\t/**\n\t * Dispatched when the user moves the mouse over the canvas.\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\n\t * @event stagemousemove\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * Dispatched when the user presses their left mouse button on the canvas. See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\n\t * class for a listing of event properties.\n\t * @event stagemousedown\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * Dispatched when the user the user presses somewhere on the stage, then releases the mouse button anywhere that the page can detect it (this varies slightly between browsers).\n\t * You can use {{#crossLink \"Stage/mouseInBounds:property\"}}{{/crossLink}} to check whether the mouse is currently within the stage bounds.\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\n\t * @event stagemouseup\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * Dispatched when the mouse moves from within the canvas area (mouseInBounds == true) to outside it (mouseInBounds == false).\n\t * This is currently only dispatched for mouse input (not touch). See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\n\t * class for a listing of event properties.\n\t * @event mouseleave\n\t * @since 0.7.0\n\t */\n\n\t/**\n\t * Dispatched when the mouse moves into the canvas area (mouseInBounds == false) from outside it (mouseInBounds == true).\n\t * This is currently only dispatched for mouse input (not touch). See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\n\t * class for a listing of event properties.\n\t * @event mouseenter\n\t * @since 0.7.0\n\t */\n\t \n\t/**\n\t * Dispatched each update immediately before the tick event is propagated through the display list.\n\t * You can call preventDefault on the event object to cancel propagating the tick event.\n\t * @event tickstart\n\t * @since 0.7.0\n\t */\n\t \n\t/**\n\t * Dispatched each update immediately after the tick event is propagated through the display list. Does not fire if\n\t * tickOnUpdate is false. Precedes the \"drawstart\" event.\n\t * @event tickend\n\t * @since 0.7.0\n\t */\n\t \n\t/**\n\t * Dispatched each update immediately before the canvas is cleared and the display list is drawn to it.\n\t * You can call preventDefault on the event object to cancel the draw.\n\t * @event drawstart\n\t * @since 0.7.0\n\t */\n\t \n\t/**\n\t * Dispatched each update immediately after the display list is drawn to the canvas and the canvas context is restored.\n\t * @event drawend\n\t * @since 0.7.0\n\t */\n\n\t \n// getter / setters:\n\t/**\n\t * Specifies a target stage that will have mouse / touch interactions relayed to it after this stage handles them.\n\t * This can be useful in cases where you have multiple layered canvases and want user interactions\n\t * events to pass through. For example, this would relay mouse events from topStage to bottomStage:\n\t *\n\t *      topStage.nextStage = bottomStage;\n\t *\n\t * To disable relaying, set nextStage to null.\n\t * \n\t * MouseOver, MouseOut, RollOver, and RollOut interactions are also passed through using the mouse over settings\n\t * of the top-most stage, but are only processed if the target stage has mouse over interactions enabled.\n\t * Considerations when using roll over in relay targets:<OL>\n\t * <LI> The top-most (first) stage must have mouse over interactions enabled (via enableMouseOver)</LI>\n\t * <LI> All stages that wish to participate in mouse over interaction must enable them via enableMouseOver</LI>\n\t * <LI> All relay targets will share the frequency value of the top-most stage</LI>\n\t * </OL>\n\t * To illustrate, in this example the targetStage would process mouse over interactions at 10hz (despite passing\n\t * 30 as it's desired frequency):\n\t * \ttopStage.nextStage = targetStage;\n\t * \ttopStage.enableMouseOver(10);\n\t * \ttargetStage.enableMouseOver(30);\n\t * \n\t * If the target stage's canvas is completely covered by this stage's canvas, you may also want to disable its\n\t * DOM events using:\n\t * \n\t *\ttargetStage.enableDOMEvents(false);\n\t * \n\t * @property nextStage\n\t * @type {Stage}\n\t **/\n\tp._get_nextStage = function() {\n\t\treturn this._nextStage;\n\t};\n\tp._set_nextStage = function(value) {\n\t\tif (this._nextStage) { this._nextStage._prevStage = null; }\n\t\tif (value) { value._prevStage = this; }\n\t\tthis._nextStage = value;\n\t};\n\t\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tnextStage: { get: p._get_nextStage, set: p._set_nextStage }\n\t\t});\n\t} catch (e) {} // TODO: use Log\n\n\n// public methods:\n\t/**\n\t * Each time the update method is called, the stage will call {{#crossLink \"Stage/tick\"}}{{/crossLink}}\n\t * unless {{#crossLink \"Stage/tickOnUpdate:property\"}}{{/crossLink}} is set to false,\n\t * and then render the display list to the canvas.\n\t *\n\t * @method update\n\t * @param {Object} [props] Props object to pass to `tick()`. Should usually be a {{#crossLink \"Ticker\"}}{{/crossLink}} event object, or similar object with a delta property.\n\t **/\n\tp.update = function(props) {\n\t\tif (!this.canvas) { return; }\n\t\tif (this.tickOnUpdate) { this.tick(props); }\n\t\tif (this.dispatchEvent(\"drawstart\", false, true) === false) { return; }\n\t\tcreatejs.DisplayObject._snapToPixelEnabled = this.snapToPixelEnabled;\n\t\tvar r = this.drawRect, ctx = this.canvas.getContext(\"2d\");\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\n\t\tif (this.autoClear) {\n\t\t\tif (r) { ctx.clearRect(r.x, r.y, r.width, r.height); }\n\t\t\telse { ctx.clearRect(0, 0, this.canvas.width+1, this.canvas.height+1); }\n\t\t}\n\t\tctx.save();\n\t\tif (this.drawRect) {\n\t\t\tctx.beginPath();\n\t\t\tctx.rect(r.x, r.y, r.width, r.height);\n\t\t\tctx.clip();\n\t\t}\n\t\tthis.updateContext(ctx);\n\t\tthis.draw(ctx, false);\n\t\tctx.restore();\n\t\tthis.dispatchEvent(\"drawend\");\n\t};\n\t\n\t/**\n\t * Propagates a tick event through the display list. This is automatically called by {{#crossLink \"Stage/update\"}}{{/crossLink}}\n\t * unless {{#crossLink \"Stage/tickOnUpdate:property\"}}{{/crossLink}} is set to false.\n\t *\n\t * If a props object is passed to `tick()`, then all of its properties will be copied to the event object that is\n\t * propagated to listeners.\n\t *\n\t * Some time-based features in EaselJS (for example {{#crossLink \"Sprite/framerate\"}}{{/crossLink}} require that\n\t * a {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}} event object (or equivalent object with a delta property) be\n\t * passed as the `props` parameter to `tick()`. For example:\n\t *\n\t * \tTicker.on(\"tick\", handleTick);\n\t * \tfunction handleTick(evtObj) {\n\t * \t\t// clone the event object from Ticker, and add some custom data to it:\n\t * \t\tvar evt = evtObj.clone().set({greeting:\"hello\", name:\"world\"});\n\t * \t\t\n\t * \t\t// pass it to stage.update():\n\t * \t\tmyStage.update(evt); // subsequently calls tick() with the same param\n\t * \t}\n\t * \t\n\t * \t// ...\n\t * \tmyDisplayObject.on(\"tick\", handleDisplayObjectTick);\n\t * \tfunction handleDisplayObjectTick(evt) {\n\t * \t\tconsole.log(evt.delta); // the delta property from the Ticker tick event object\n\t * \t\tconsole.log(evt.greeting, evt.name); // custom data: \"hello world\"\n\t * \t}\n\t * \n\t * @method tick\n\t * @param {Object} [props] An object with properties that should be copied to the event object. Should usually be a Ticker event object, or similar object with a delta property.\n\t **/\n\tp.tick = function(props) {\n\t\tif (!this.tickEnabled || this.dispatchEvent(\"tickstart\", false, true) === false) { return; }\n\t\tvar evtObj = new createjs.Event(\"tick\");\n\t\tif (props) {\n\t\t\tfor (var n in props) {\n\t\t\t\tif (props.hasOwnProperty(n)) { evtObj[n] = props[n]; }\n\t\t\t}\n\t\t}\n\t\tthis._tick(evtObj);\n\t\tthis.dispatchEvent(\"tickend\");\n\t};\n\n\t/**\n\t * Default event handler that calls the Stage {{#crossLink \"Stage/update\"}}{{/crossLink}} method when a {{#crossLink \"DisplayObject/tick:event\"}}{{/crossLink}}\n\t * event is received. This allows you to register a Stage instance as a event listener on {{#crossLink \"Ticker\"}}{{/crossLink}}\n\t * directly, using:\n\t *\n\t *      Ticker.addEventListener(\"tick\", myStage);\n\t *\n\t * Note that if you subscribe to ticks using this pattern, then the tick event object will be passed through to\n\t * display object tick handlers, instead of <code>delta</code> and <code>paused</code> parameters.\n\t * @property handleEvent\n\t * @type Function\n\t **/\n\tp.handleEvent = function(evt) {\n\t\tif (evt.type == \"tick\") { this.update(evt); }\n\t};\n\n\t/**\n\t * Clears the target canvas. Useful if {{#crossLink \"Stage/autoClear:property\"}}{{/crossLink}} is set to `false`.\n\t * @method clear\n\t **/\n\tp.clear = function() {\n\t\tif (!this.canvas) { return; }\n\t\tvar ctx = this.canvas.getContext(\"2d\");\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\n\t\tctx.clearRect(0, 0, this.canvas.width+1, this.canvas.height+1);\n\t};\n\n\t/**\n\t * Returns a data url that contains a Base64-encoded image of the contents of the stage. The returned data url can\n\t * be specified as the src value of an image element.\n\t * @method toDataURL\n\t * @param {String} [backgroundColor] The background color to be used for the generated image. Any valid CSS color\n\t * value is allowed. The default value is a transparent background.\n\t * @param {String} [mimeType=\"image/png\"] The MIME type of the image format to be create. The default is \"image/png\". If an unknown MIME type\n\t * is passed in, or if the browser does not support the specified MIME type, the default value will be used.\n\t * @return {String} a Base64 encoded image.\n\t **/\n\tp.toDataURL = function(backgroundColor, mimeType) {\n\t\tvar data, ctx = this.canvas.getContext('2d'), w = this.canvas.width, h = this.canvas.height;\n\n\t\tif (backgroundColor) {\n\t\t\tdata = ctx.getImageData(0, 0, w, h);\n\t\t\tvar compositeOperation = ctx.globalCompositeOperation;\n\t\t\tctx.globalCompositeOperation = \"destination-over\";\n\t\t\t\n\t\t\tctx.fillStyle = backgroundColor;\n\t\t\tctx.fillRect(0, 0, w, h);\n\t\t}\n\n\t\tvar dataURL = this.canvas.toDataURL(mimeType||\"image/png\");\n\n\t\tif(backgroundColor) {\n\t\t\tctx.putImageData(data, 0, 0);\n\t\t\tctx.globalCompositeOperation = compositeOperation;\n\t\t}\n\n\t\treturn dataURL;\n\t};\n\n\t/**\n\t * Enables or disables (by passing a frequency of 0) mouse over ({{#crossLink \"DisplayObject/mouseover:event\"}}{{/crossLink}}\n\t * and {{#crossLink \"DisplayObject/mouseout:event\"}}{{/crossLink}}) and roll over events ({{#crossLink \"DisplayObject/rollover:event\"}}{{/crossLink}}\n\t * and {{#crossLink \"DisplayObject/rollout:event\"}}{{/crossLink}}) for this stage's display list. These events can\n\t * be expensive to generate, so they are disabled by default. The frequency of the events can be controlled\n\t * independently of mouse move events via the optional `frequency` parameter.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var stage = new createjs.Stage(\"canvasId\");\n\t *      stage.enableMouseOver(10); // 10 updates per second\n\t *\n\t * @method enableMouseOver\n\t * @param {Number} [frequency=20] Optional param specifying the maximum number of times per second to broadcast\n\t * mouse over/out events. Set to 0 to disable mouse over events completely. Maximum is 50. A lower frequency is less\n\t * responsive, but uses less CPU.\n\t **/\n\tp.enableMouseOver = function(frequency) {\n\t\tif (this._mouseOverIntervalID) {\n\t\t\tclearInterval(this._mouseOverIntervalID);\n\t\t\tthis._mouseOverIntervalID = null;\n\t\t\tif (frequency == 0) {\n\t\t\t\tthis._testMouseOver(true);\n\t\t\t}\n\t\t}\n\t\tif (frequency == null) { frequency = 20; }\n\t\telse if (frequency <= 0) { return; }\n\t\tvar o = this;\n\t\tthis._mouseOverIntervalID = setInterval(function(){ o._testMouseOver(); }, 1000/Math.min(50,frequency));\n\t};\n\n\t/**\n\t * Enables or disables the event listeners that stage adds to DOM elements (window, document and canvas). It is good\n\t * practice to disable events when disposing of a Stage instance, otherwise the stage will continue to receive\n\t * events from the page.\n\t *\n\t * When changing the canvas property you must disable the events on the old canvas, and enable events on the\n\t * new canvas or mouse events will not work as expected. For example:\n\t *\n\t *      myStage.enableDOMEvents(false);\n\t *      myStage.canvas = anotherCanvas;\n\t *      myStage.enableDOMEvents(true);\n\t *\n\t * @method enableDOMEvents\n\t * @param {Boolean} [enable=true] Indicates whether to enable or disable the events. Default is true.\n\t **/\n\tp.enableDOMEvents = function(enable) {\n\t\tif (enable == null) { enable = true; }\n\t\tvar n, o, ls = this._eventListeners;\n\t\tif (!enable && ls) {\n\t\t\tfor (n in ls) {\n\t\t\t\to = ls[n];\n\t\t\t\to.t.removeEventListener(n, o.f, false);\n\t\t\t}\n\t\t\tthis._eventListeners = null;\n\t\t} else if (enable && !ls && this.canvas) {\n\t\t\tvar t = window.addEventListener ? window : document;\n\t\t\tvar _this = this;\n\t\t\tls = this._eventListeners = {};\n\t\t\tls[\"mouseup\"] = {t:t, f:function(e) { _this._handleMouseUp(e)} };\n\t\t\tls[\"mousemove\"] = {t:t, f:function(e) { _this._handleMouseMove(e)} };\n\t\t\tls[\"dblclick\"] = {t:this.canvas, f:function(e) { _this._handleDoubleClick(e)} };\n\t\t\tls[\"mousedown\"] = {t:this.canvas, f:function(e) { _this._handleMouseDown(e)} };\n\n\t\t\tfor (n in ls) {\n\t\t\t\to = ls[n];\n\t\t\t\to.t.addEventListener(n, o.f, false);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Stage instances cannot be cloned.\n\t * @method clone\n\t **/\n\tp.clone = function() {\n\t\tthrow(\"Stage cannot be cloned.\");\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Stage (name=\"+  this.name +\")]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * @method _getElementRect\n\t * @protected\n\t * @param {HTMLElement} e\n\t **/\n\tp._getElementRect = function(e) {\n\t\tvar bounds;\n\t\ttry { bounds = e.getBoundingClientRect(); } // this can fail on disconnected DOM elements in IE9\n\t\tcatch (err) { bounds = {top: e.offsetTop, left: e.offsetLeft, width:e.offsetWidth, height:e.offsetHeight}; }\n\n\t\tvar offX = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0);\n\t\tvar offY = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop  || document.body.clientTop  || 0);\n\n\t\tvar styles = window.getComputedStyle ? getComputedStyle(e,null) : e.currentStyle; // IE <9 compatibility.\n\t\tvar padL = parseInt(styles.paddingLeft)+parseInt(styles.borderLeftWidth);\n\t\tvar padT = parseInt(styles.paddingTop)+parseInt(styles.borderTopWidth);\n\t\tvar padR = parseInt(styles.paddingRight)+parseInt(styles.borderRightWidth);\n\t\tvar padB = parseInt(styles.paddingBottom)+parseInt(styles.borderBottomWidth);\n\n\t\t// note: in some browsers bounds properties are read only.\n\t\treturn {\n\t\t\tleft: bounds.left+offX+padL,\n\t\t\tright: bounds.right+offX-padR,\n\t\t\ttop: bounds.top+offY+padT,\n\t\t\tbottom: bounds.bottom+offY-padB\n\t\t}\n\t};\n\n\t/**\n\t * @method _getPointerData\n\t * @protected\n\t * @param {Number} id\n\t **/\n\tp._getPointerData = function(id) {\n\t\tvar data = this._pointerData[id];\n\t\tif (!data) { data = this._pointerData[id] = {x:0,y:0}; }\n\t\treturn data;\n\t};\n\n\t/**\n\t * @method _handleMouseMove\n\t * @protected\n\t * @param {MouseEvent} e\n\t **/\n\tp._handleMouseMove = function(e) {\n\t\tif(!e){ e = window.event; }\n\t\tthis._handlePointerMove(-1, e, e.pageX, e.pageY);\n\t};\n\n\t/**\n\t * @method _handlePointerMove\n\t * @protected\n\t * @param {Number} id\n\t * @param {Event} e\n\t * @param {Number} pageX\n\t * @param {Number} pageY\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\n\t **/\n\tp._handlePointerMove = function(id, e, pageX, pageY, owner) {\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\n\t\tif (!this.canvas) { return; }\n\t\tvar nextStage=this._nextStage, o=this._getPointerData(id);\n\n\t\tvar inBounds = o.inBounds;\n\t\tthis._updatePointerPosition(id, e, pageX, pageY);\n\t\tif (inBounds || o.inBounds || this.mouseMoveOutside) {\n\t\t\tif (id === -1 && o.inBounds == !inBounds) {\n\t\t\t\tthis._dispatchMouseEvent(this, (inBounds ? \"mouseleave\" : \"mouseenter\"), false, id, o, e);\n\t\t\t}\n\t\t\t\n\t\t\tthis._dispatchMouseEvent(this, \"stagemousemove\", false, id, o, e);\n\t\t\tthis._dispatchMouseEvent(o.target, \"pressmove\", true, id, o, e);\n\t\t}\n\t\t\n\t\tnextStage&&nextStage._handlePointerMove(id, e, pageX, pageY, null);\n\t};\n\n\t/**\n\t * @method _updatePointerPosition\n\t * @protected\n\t * @param {Number} id\n\t * @param {Event} e\n\t * @param {Number} pageX\n\t * @param {Number} pageY\n\t **/\n\tp._updatePointerPosition = function(id, e, pageX, pageY) {\n\t\tvar rect = this._getElementRect(this.canvas);\n\t\tpageX -= rect.left;\n\t\tpageY -= rect.top;\n\n\t\tvar w = this.canvas.width;\n\t\tvar h = this.canvas.height;\n\t\tpageX /= (rect.right-rect.left)/w;\n\t\tpageY /= (rect.bottom-rect.top)/h;\n\t\tvar o = this._getPointerData(id);\n\t\tif (o.inBounds = (pageX >= 0 && pageY >= 0 && pageX <= w-1 && pageY <= h-1)) {\n\t\t\to.x = pageX;\n\t\t\to.y = pageY;\n\t\t} else if (this.mouseMoveOutside) {\n\t\t\to.x = pageX < 0 ? 0 : (pageX > w-1 ? w-1 : pageX);\n\t\t\to.y = pageY < 0 ? 0 : (pageY > h-1 ? h-1 : pageY);\n\t\t}\n\n\t\to.posEvtObj = e;\n\t\to.rawX = pageX;\n\t\to.rawY = pageY;\n\n\t\tif (id === this._primaryPointerID || id === -1) {\n\t\t\tthis.mouseX = o.x;\n\t\t\tthis.mouseY = o.y;\n\t\t\tthis.mouseInBounds = o.inBounds;\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleMouseUp\n\t * @protected\n\t * @param {MouseEvent} e\n\t **/\n\tp._handleMouseUp = function(e) {\n\t\tthis._handlePointerUp(-1, e, false);\n\t};\n\n\t/**\n\t * @method _handlePointerUp\n\t * @protected\n\t * @param {Number} id\n\t * @param {Event} e\n\t * @param {Boolean} clear\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\n\t **/\n\tp._handlePointerUp = function(id, e, clear, owner) {\n\t\tvar nextStage = this._nextStage, o = this._getPointerData(id);\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\n\t\t\n\t\tvar target=null, oTarget = o.target;\n\t\tif (!owner && (oTarget || nextStage)) { target = this._getObjectsUnderPoint(o.x, o.y, null, true); }\n\t\t\n\t\tif (o.down) { this._dispatchMouseEvent(this, \"stagemouseup\", false, id, o, e, target); o.down = false; }\n\t\t\n\t\tif (target == oTarget) { this._dispatchMouseEvent(oTarget, \"click\", true, id, o, e); }\n\t\tthis._dispatchMouseEvent(oTarget, \"pressup\", true, id, o, e);\n\t\t\n\t\tif (clear) {\n\t\t\tif (id==this._primaryPointerID) { this._primaryPointerID = null; }\n\t\t\tdelete(this._pointerData[id]);\n\t\t} else { o.target = null; }\n\t\t\n\t\tnextStage&&nextStage._handlePointerUp(id, e, clear, owner || target && this);\n\t};\n\n\t/**\n\t * @method _handleMouseDown\n\t * @protected\n\t * @param {MouseEvent} e\n\t **/\n\tp._handleMouseDown = function(e) {\n\t\tthis._handlePointerDown(-1, e, e.pageX, e.pageY);\n\t};\n\n\t/**\n\t * @method _handlePointerDown\n\t * @protected\n\t * @param {Number} id\n\t * @param {Event} e\n\t * @param {Number} pageX\n\t * @param {Number} pageY\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\n\t **/\n\tp._handlePointerDown = function(id, e, pageX, pageY, owner) {\n\t\tif (this.preventSelection) { e.preventDefault(); }\n\t\tif (this._primaryPointerID == null || id === -1) { this._primaryPointerID = id; } // mouse always takes over.\n\t\t\n\t\tif (pageY != null) { this._updatePointerPosition(id, e, pageX, pageY); }\n\t\tvar target = null, nextStage = this._nextStage, o = this._getPointerData(id);\n\t\tif (!owner) { target = o.target = this._getObjectsUnderPoint(o.x, o.y, null, true); }\n\n\t\tif (o.inBounds) { this._dispatchMouseEvent(this, \"stagemousedown\", false, id, o, e, target); o.down = true; }\n\t\tthis._dispatchMouseEvent(target, \"mousedown\", true, id, o, e);\n\t\t\n\t\tnextStage&&nextStage._handlePointerDown(id, e, pageX, pageY, owner || target && this);\n\t};\n\n\t/**\n\t * @method _testMouseOver\n\t * @param {Boolean} clear If true, clears the mouseover / rollover (ie. no target)\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\n\t * @param {Stage} eventTarget The stage that the cursor is actively over.\n\t * @protected\n\t **/\n\tp._testMouseOver = function(clear, owner, eventTarget) {\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\n\t\t\n\t\tvar nextStage = this._nextStage;\n\t\tif (!this._mouseOverIntervalID) {\n\t\t\t// not enabled for mouseover, but should still relay the event.\n\t\t\tnextStage&&nextStage._testMouseOver(clear, owner, eventTarget);\n\t\t\treturn;\n\t\t}\n\t\tvar o = this._getPointerData(-1);\n\t\t// only update if the mouse position has changed. This provides a lot of optimization, but has some trade-offs.\n\t\tif (!o || (!clear && this.mouseX == this._mouseOverX && this.mouseY == this._mouseOverY && this.mouseInBounds)) { return; }\n\t\t\n\t\tvar e = o.posEvtObj;\n\t\tvar isEventTarget = eventTarget || e&&(e.target == this.canvas);\n\t\tvar target=null, common = -1, cursor=\"\", t, i, l;\n\t\t\n\t\tif (!owner && (clear || this.mouseInBounds && isEventTarget)) {\n\t\t\ttarget = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, true);\n\t\t\tthis._mouseOverX = this.mouseX;\n\t\t\tthis._mouseOverY = this.mouseY;\n\t\t}\n\n\t\tvar oldList = this._mouseOverTarget||[];\n\t\tvar oldTarget = oldList[oldList.length-1];\n\t\tvar list = this._mouseOverTarget = [];\n\n\t\t// generate ancestor list and check for cursor:\n\t\tt = target;\n\t\twhile (t) {\n\t\t\tlist.unshift(t);\n\t\t\tif (!cursor) { cursor = t.cursor; }\n\t\t\tt = t.parent;\n\t\t}\n\t\tthis.canvas.style.cursor = cursor;\n\t\tif (!owner && eventTarget) { eventTarget.canvas.style.cursor = cursor; }\n\n\t\t// find common ancestor:\n\t\tfor (i=0,l=list.length; i<l; i++) {\n\t\t\tif (list[i] != oldList[i]) { break; }\n\t\t\tcommon = i;\n\t\t}\n\n\t\tif (oldTarget != target) {\n\t\t\tthis._dispatchMouseEvent(oldTarget, \"mouseout\", true, -1, o, e, target);\n\t\t}\n\n\t\tfor (i=oldList.length-1; i>common; i--) {\n\t\t\tthis._dispatchMouseEvent(oldList[i], \"rollout\", false, -1, o, e, target);\n\t\t}\n\n\t\tfor (i=list.length-1; i>common; i--) {\n\t\t\tthis._dispatchMouseEvent(list[i], \"rollover\", false, -1, o, e, oldTarget);\n\t\t}\n\n\t\tif (oldTarget != target) {\n\t\t\tthis._dispatchMouseEvent(target, \"mouseover\", true, -1, o, e, oldTarget);\n\t\t}\n\t\t\n\t\tnextStage&&nextStage._testMouseOver(clear, owner || target && this, eventTarget || isEventTarget && this);\n\t};\n\n\t/**\n\t * @method _handleDoubleClick\n\t * @protected\n\t * @param {MouseEvent} e\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\n\t **/\n\tp._handleDoubleClick = function(e, owner) {\n\t\tvar target=null, nextStage=this._nextStage, o=this._getPointerData(-1);\n\t\tif (!owner) {\n\t\t\ttarget = this._getObjectsUnderPoint(o.x, o.y, null, true);\n\t\t\tthis._dispatchMouseEvent(target, \"dblclick\", true, -1, o, e);\n\t\t}\n\t\tnextStage&&nextStage._handleDoubleClick(e, owner || target && this);\n\t};\n\n\t/**\n\t * @method _dispatchMouseEvent\n\t * @protected\n\t * @param {DisplayObject} target\n\t * @param {String} type\n\t * @param {Boolean} bubbles\n\t * @param {Number} pointerId\n\t * @param {Object} o\n\t * @param {MouseEvent} [nativeEvent]\n\t * @param {DisplayObject} [relatedTarget]\n\t **/\n\tp._dispatchMouseEvent = function(target, type, bubbles, pointerId, o, nativeEvent, relatedTarget) {\n\t\t// TODO: might be worth either reusing MouseEvent instances, or adding a willTrigger method to avoid GC.\n\t\tif (!target || (!bubbles && !target.hasEventListener(type))) { return; }\n\t\t/*\n\t\t// TODO: account for stage transformations?\n\t\tthis._mtx = this.getConcatenatedMatrix(this._mtx).invert();\n\t\tvar pt = this._mtx.transformPoint(o.x, o.y);\n\t\tvar evt = new createjs.MouseEvent(type, bubbles, false, pt.x, pt.y, nativeEvent, pointerId, pointerId==this._primaryPointerID || pointerId==-1, o.rawX, o.rawY);\n\t\t*/\n\t\tvar evt = new createjs.MouseEvent(type, bubbles, false, o.x, o.y, nativeEvent, pointerId, pointerId === this._primaryPointerID || pointerId === -1, o.rawX, o.rawY, relatedTarget);\n\t\ttarget.dispatchEvent(evt);\n\t};\n\n\n\tcreatejs.Stage = createjs.promote(Stage, \"Container\");\n}());\n\n//##############################################################################\n// StageGL.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/*\n * README IF EDITING:\n * Terminology for developers:\n *\n * Vertex: a point that help defines a shape, 3 per triangle. Usually has an x,y,z but can have more/less info.\n * Vertex Property: a piece of information attached to the vertex like a vector3 containing x,y,z\n * Index/Indices: used in groups of 3 to define a triangle, points to vertices by their index in an array (some render\n * \t\tmodes do not use these)\n * Card: a group of 2 triangles used to display a rectangular image\n * U/V: common names for the [0-1] texture co-ordinates on an image\n * Batch: a single call to the renderer, best done as little as possible so multiple cards are put into a single batch\n * Buffer: WebGL array data\n * Program/Shader: For every vertex we run the Vertex shader. The results are used per pixel by the Fragment shader. When\n * \t\tcombined and paired these are a shader \"program\"\n * Texture: WebGL representation of image data and associated extra information\n * Slot: A space on the GPU into which textures can be loaded for use in a batch, using \"ActiveTexture\" switches texture slot.\n */\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * A StageGL instance is the root level {{#crossLink \"Container\"}}{{/crossLink}} for an WebGL-optimized display list,\n\t * which is used in place of the usual {{#crossLink \"Stage\"}}{{/crossLink}}. This class should behave identically to\n\t * a {{#crossLink \"Stage\"}}{{/crossLink}} except for WebGL-specific functionality.\n\t *\n\t * Each time the {{#crossLink \"Stage/tick\"}}{{/crossLink}} method is called, the display list is rendered to the\n\t * target &lt;canvas/&gt; instance, ignoring non-WebGL-compatible display objects. On devices and browsers that don't\n\t * support WebGL, content will automatically be rendered to canvas 2D context instead.\n\t *\n\t * <h4>Limitations</h4>\n\t * - {{#crossLink \"Shape\"}}{{/crossLink}}, {{#crossLink \"Shadow\"}}{{/crossLink}}, and {{#crossLink \"Text\"}}{{/crossLink}}\n\t * \tare not rendered when added to the display list.\n\t * - To display something StageGL cannot render, {{#crossLink \"displayObject/cache\"}}{{/crossLink}} the object.\n\t *\tCaches can be rendered regardless of source.\n\t * - Images are wrapped as a webGL \"Texture\". Each graphics card has a limit to its concurrent Textures, too many \n\t * Textures will noticeably slow performance.\n\t * - Each cache counts as an individual Texture. As such {{#crossLink \"SpriteSheet\"}}{{/crossLink}} and \n\t * {{#crossLink \"SpriteSheetBuilder\"}}{{/crossLink}} are recommended practices to help keep texture counts low.\n\t * - To use any image node (DOM Image/Canvas Element) between multiple StageGL instances it must be a \n\t * {{#crossLink \"Bitmap/clone\"}}{{/crossLink}}, otherwise the GPU texture loading and tracking will get confused.\n\t * - to avoid an up/down scaled render you must call {{#crossLink \"StageGL/updateViewport\"}}{{/crossLink}} if you\n\t * resize your canvas after making a StageGL instance, this will properly size the WebGL context stored in memory.\n\t * - Best performance in demanding scenarios will come from manual management of texture memory, but it is handled\n\t * automatically by default. See {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}} for details.\n\t *\n\t * <h4>Example</h4>\n\t * This example creates a StageGL instance, adds a child to it, then uses the EaselJS {{#crossLink \"Ticker\"}}{{/crossLink}}\n\t * to update the child and redraw the stage.\n\t *\n\t *      var stage = new createjs.StageGL(\"canvasElementId\");\n\t *\n\t *      var image = new createjs.Bitmap(\"imagePath.png\");\n\t *      stage.addChild(image);\n\t *\n\t *      createjs.Ticker.on(\"tick\", handleTick);\n\t *\n\t *      function handleTick(event) {\n\t *          image.x += 10;\n\t *          stage.update();\n\t *      }\n\t *\n\t * <h4>Notes</h4>\n\t * - StageGL is not currently included in the minified version of EaselJS.\n\t * - {{#crossLink \"SpriteContainer\"}}{{/crossLink}} (the previous approach to WebGL with EaselJS) has been deprecated.\n\t * - Earlier versions of WebGL support in EaselJS (SpriteStage and SpriteContainer) had hard limitations on images\n\t * \tper container, which have been solved.\n\t *\n\t * @class StageGL\n\t * @extends Stage\n\t * @constructor\n\t * @param {HTMLCanvasElement | String | Object} canvas A canvas object that StageGL will render to, or the string id\n\t *  of a canvas object in the current DOM.\n\t * @param {Object} options All the option parameters in a reference object, some are not supported by some browsers.\n\t * @param {Boolean} [options.preserveBuffer=false] If `true`, the canvas is NOT auto-cleared by WebGL (the spec\n\t *  discourages setting this to `true`). This is useful if you want persistent draw effects.\n\t * @param {Boolean} [options.antialias=false] Specifies whether or not the browser's WebGL implementation should try\n\t *  to perform anti-aliasing. This will also enable linear pixel sampling on power-of-two textures (smoother images).\n\t * @param {Boolean} [options.transparent=false] If `true`, the canvas is transparent. This is <strong>very</strong>\n\t * expensive, and should be used with caution.\n\t * @param {Boolean} [options.premultiply=false] Alters color handling. If `true`, this assumes the shader must\n\t * account for pre-multiplied alpha. This can help avoid visual halo effects with some assets, but may also cause\n\t * problems with other assets.\n\t * @param {Integer} [options.autoPurge=1200] How often the system should automatically dump unused textures with\n\t * `purgeTextures(autoPurge)` every `autoPurge/2` draws. See {{#crossLink \"StageGL/purgeTextures\"}}{{/crossLink}} for more\n\t * information.\n\t */\n\tfunction StageGL(canvas, options) {\n\t\tthis.Stage_constructor(canvas);\n\n\t\tif (options !== undefined) {\n\t\t\tif (typeof options !== \"object\"){ throw(\"Invalid options object\"); }\n\t\t\tvar premultiply = options.premultiply;\n\t\t\tvar transparent = options.transparent;\n\t\t\tvar antialias = options.antialias;\n\t\t\tvar preserveBuffer = options.preserveBuffer;\n\t\t\tvar autoPurge = options.autoPurge;\n\t\t}\n\n// public properties:\n\t\t/**\n\t\t * Console log potential issues and problems. This is designed to have <em>minimal</em> performance impact, so\n\t\t * if extensive debugging information is required, this may be inadequate. See {{#crossLink \"WebGLInspector\"}}{{/crossLink}}\n\t\t * @property vocalDebug\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.vocalDebug = false;\n\n// private properties:\n\t\t/**\n\t\t * Specifies whether or not the canvas is auto-cleared by WebGL. The WebGL spec discourages `true`.\n\t\t * If true, the canvas is NOT auto-cleared by WebGL. Used when the canvas context is created and requires\n\t\t * context re-creation to update.\n\t\t * @property _preserveBuffer\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis._preserveBuffer = preserveBuffer||false;\n\n\t\t/**\n\t\t * Specifies whether or not the browser's WebGL implementation should try to perform anti-aliasing.\n\t\t * @property _antialias\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis._antialias = antialias||false;\n\n\t\t/**\n\t\t * Specifies whether or not the browser's WebGL implementation should be transparent.\n\t\t * @property _transparent\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis._transparent = transparent||false;\n\n\t\t/**\n\t\t * Specifies whether or not StageGL is handling colours as premultiplied alpha.\n\t\t * @property _premultiply\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis._premultiply = premultiply||false;\n\n\t\t/**\n\t\t * Internal value of {{#crossLink \"StageGL/autoPurge\"}}{{/crossLink}}\n\t\t * @property _autoPurge\n\t\t * @protected\n\t\t * @type {Integer}\n\t\t * @default null\n\t\t */\n\t\tthis._autoPurge = undefined;\n\t\tthis.autoPurge = autoPurge;\t//getter/setter handles setting the real value and validating\n\n\t\t/**\n\t\t * The width in px of the drawing surface saved in memory.\n\t\t * @property _viewportWidth\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._viewportWidth = 0;\n\n\t\t/**\n\t\t * The height in px of the drawing surface saved in memory.\n\t\t * @property _viewportHeight\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._viewportHeight = 0;\n\n\t\t/**\n\t\t * A 2D projection matrix used to convert WebGL's viewspace into canvas co-ordinates. Regular canvas display\n\t\t * uses Top-Left values of [0,0] where WebGL uses a Center [0,0] Top-Right [1,1] (euclidean) system.\n\t\t * @property _projectionMatrix\n\t\t * @protected\n\t\t * @type {Float32Array}\n\t\t * @default null\n\t\t */\n\t\tthis._projectionMatrix = null;\n\n\t\t/**\n\t\t * The current WebGL canvas context. Often shorthanded to just \"gl\" in many parts of the code.\n\t\t * @property _webGLContext\n\t\t * @protected\n\t\t * @type {WebGLRenderingContext}\n\t\t * @default null\n\t\t */\n\t\tthis._webGLContext = null;\n\n\t\t/**\n\t\t * The color to use when the WebGL canvas has been cleared. May appear as a background color. Defaults to grey.\n\t\t * @property _clearColor\n\t\t * @protected\n\t\t * @type {Object}\n\t\t * @default {r: 0.50, g: 0.50, b: 0.50, a: 0.00}\n\t\t */\n\t\tthis._clearColor = {r: 0.50, g: 0.50, b: 0.50, a: 0.00};\n\n\t\t/**\n\t\t * The maximum number of cards (aka a single sprite) that can be drawn in one draw call. Use getter/setters to\n\t\t * modify otherwise internal buffers may be incorrect sizes.\n\t\t * @property _maxCardsPerBatch\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default StageGL.DEFAULT_MAX_BATCH_SIZE (10000)\n\t\t */\n\t\tthis._maxCardsPerBatch = StageGL.DEFAULT_MAX_BATCH_SIZE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//TODO: write getter/setters for this\n\n\t\t/**\n\t\t * The shader program used to draw the current batch.\n\t\t * @property _activeShader\n\t\t * @protected\n\t\t * @type {WebGLProgram}\n\t\t * @default null\n\t\t */\n\t\tthis._activeShader = null;\n\n\t\t/**\n\t\t * The vertex position data for the current draw call.\n\t\t * @property _vertices\n\t\t * @protected\n\t\t * @type {Float32Array}\n\t\t * @default null\n\t\t */\n\t\tthis._vertices = null;\n\n\t\t/**\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_vertices:property\"}}{{/crossLink}}.\n\t\t * @property _vertexPositionBuffer\n\t\t * @protected\n\t\t * @type {WebGLBuffer}\n\t\t * @default null\n\t\t */\n\t\tthis._vertexPositionBuffer = null;\n\n\t\t/**\n\t\t * The vertex U/V data for the current draw call.\n\t\t * @property _uvs\n\t\t * @protected\n\t\t * @type {Float32Array}\n\t\t * @default null\n\t\t */\n\t\tthis._uvs = null;\n\n\t\t/**\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_uvs:property\"}}{{/crossLink}}.\n\t\t * @property _uvPositionBuffer\n\t\t * @protected\n\t\t * @type {WebGLBuffer}\n\t\t * @default null\n\t\t */\n\t\tthis._uvPositionBuffer = null;\n\n\t\t/**\n\t\t * The vertex indices data for the current draw call.\n\t\t * @property _indices\n\t\t * @protected\n\t\t * @type {Float32Array}\n\t\t * @default null\n\t\t */\n\t\tthis._indices = null;\n\n\t\t/**\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_indices:property\"}}{{/crossLink}}.\n\t\t * @property _textureIndexBuffer\n\t\t * @protected\n\t\t * @type {WebGLBuffer}\n\t\t * @default null\n\t\t */\n\t\tthis._textureIndexBuffer = null;\n\n\t\t/**\n\t\t * The vertices data for the current draw call.\n\t\t * @property _alphas\n\t\t * @protected\n\t\t * @type {Float32Array}\n\t\t * @default null\n\t\t */\n\t\tthis._alphas = null;\n\n\t\t/**\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_alphas:property\"}}{{/crossLink}}.\n\t\t * @property _alphaBuffer\n\t\t * @protected\n\t\t * @type {WebGLBuffer}\n\t\t * @default null\n\t\t */\n\t\tthis._alphaBuffer = null;\n\n\t\t/**\n\t\t * An index based lookup of every WebGL Texture currently in use.\n\t\t * @property _drawTexture\n\t\t * @protected\n\t\t * @type {Array}\n\t\t */\n\t\tthis._textureDictionary = [];\n\n\t\t/**\n\t\t * A string based lookup hash of which index a texture is stored at in the dictionary. The lookup string is\n\t\t * often the src url.\n\t\t * @property _textureIDs\n\t\t * @protected\n\t\t * @type {Object}\n\t\t */\n\t\tthis._textureIDs = {};\n\n\t\t/**\n\t\t * An array of all the textures currently loaded into the GPU. The index in the array matches the GPU index.\n\t\t * @property _batchTextures\n\t\t * @protected\n\t\t * @type {Array}\n\t\t */\n\t\tthis._batchTextures = [];\n\n\t\t/**\n\t\t * An array of all the simple filler textures used to prevent issues with missing textures in a batch.\n\t\t * @property _baseTextures\n\t\t * @protected\n\t\t * @type {Array}\n\t\t */\n\t\tthis._baseTextures = [];\n\n\t\t/**\n\t\t * The number of concurrent textures the GPU can handle. This value is dynamically set from WebGL during initialization\n\t\t * via `gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS)`. The WebGL spec states that the lowest guaranteed value is 8,\n\t\t * but it could be higher. Do not set this value higher than the value returned by the GPU. Setting it lower will\n\t\t * probably reduce performance, but may be advisable to reserve slots for custom filter work.\n\t\t * NOTE: Can also act as a length for {{#crossLink \"StageGL/_batchTextures:property\"}}.\n\t\t * @property _batchTextureCount\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 8\n\t\t */\n\t\tthis._batchTextureCount = 8;\n\n\t\t/**\n\t\t * The location at which the last texture was inserted into a GPU slot in {{#crossLink \"StageGL/_batchTextures:property\"}}{{/crossLink}}.\n\t\t * Manual control of this variable can yield improvements in performance by intelligently replacing textures\n\t\t * inside a batch to reduce texture re-load. It is impossible to write automated general use code, as it requires\n\t\t * display list look ahead inspection and/or render foreknowledge.\n\t\t * @property _lastTextureInsert\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default -1\n\t\t */\n\t\tthis._lastTextureInsert = -1;\n\n\t\t/**\n\t\t * The current batch being drawn, A batch consists of a call to `drawElements` on the GPU. Many of these calls\n\t\t * can occur per draw.\n\t\t * @property _batchId\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._batchID = 0;\n\n\t\t/**\n\t\t * The current draw being performed, may contain multiple batches. Comparing to {{#crossLink \"StageGL/_batchID:property\"}}{{/crossLink}}\n\t\t * can reveal batching efficiency.\n\t\t * @property _drawID\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._drawID = 0;\n\n\t\t/**\n\t\t * Used to prevent textures in certain GPU slots from being replaced by an insert.\n\t\t * @property _slotBlackList\n\t\t * @protected\n\t\t * @type {Array}\n\t\t */\n\t\tthis._slotBlacklist = [];\n\n\t\t/**\n\t\t * Used to prevent nested draw calls from accidentally overwriting drawing information by tracking depth.\n\t\t * @property _isDrawing\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._isDrawing = 0;\n\n\t\t/**\n\t\t * Used to ensure every canvas used as a texture source has a unique ID.\n\t\t * @property _lastTrackedCanvas\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._lastTrackedCanvas = 0;\n\n\t\t/**\n\t\t * Controls whether final rendering output of a {{#crossLink \"cacheDraw\"}}{{/crossLink}} is the canvas or a render\n\t\t * texture. See the {{#crossLink \"cache\"}}{{/crossLink}} function modifications for full implications and discussion.\n\t\t * @property isCacheControlled\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @todo LM: is this supposed to be _isCacheControlled since its private?\n\t\t */\n\t\tthis.isCacheControlled = false;\n\n\t\t/**\n\t\t * Used to counter-position the object being cached so it aligns with the cache surface. Additionally ensures\n\t\t * that all rendering starts with a top level container.\n\t\t * @property _cacheContainer\n\t\t * @protected\n\t\t * @type {Container}\n\t\t * @default An instance of an EaselJS Container.\n\t\t */\n\t\tthis._cacheContainer = new createjs.Container();\n\n\t\t// and begin\n\t\tthis._initializeWebGL();\n\t}\n\tvar p = createjs.extend(StageGL, createjs.Stage);\n\n// static methods:\n\t/**\n\t * Calculate the U/V co-ordinate based info for sprite frames. Instead of pixel count it uses a 0-1 space. Also includes\n\t * the ability to get info back for a specific frame, or only calculate that one frame.\n\t *\n\t *     //generate UV rects for all entries\n\t *     StageGL.buildUVRects( spriteSheetA );\n\t *     //generate all, fetch the first\n\t *     var firstFrame = StageGL.buildUVRects( spriteSheetB, 0 );\n\t *     //generate the rect for just a single frame for performance's sake\n\t *     var newFrame = StageGL.buildUVRects( dynamicSpriteSheet, newFrameIndex, true );\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method buildUVRects\n\t * @param  {SpriteSheet} spritesheet The spritesheet to find the frames on\n\t * @param  {int} [target=-1] The index of the frame to return\n\t * @param  {Boolean} [onlyTarget=false] Whether \"target\" is the only frame that gets calculated\n\t * @static\n\t * @return {Object} the target frame if supplied and present or a generic frame {t, l, b, r}\n\t */\n\tStageGL.buildUVRects = function (spritesheet, target, onlyTarget) {\n\t\tif (!spritesheet || !spritesheet._frames) { return null; }\n\t\tif (target === undefined) { target = -1; }\n\t\tif (onlyTarget === undefined) { onlyTarget = false; }\n\n\t\tvar start = (target != -1 && onlyTarget)?(target):(0);\n\t\tvar end = (target != -1 && onlyTarget)?(target+1):(spritesheet._frames.length);\n\t\tfor (var i=start; i<end; i++) {\n\t\t\tvar f = spritesheet._frames[i];\n\t\t\tif (f.uvRect || f.image.width <= 0 || f.image.height <= 0) { continue; }\n\n\t\t\tvar r = f.rect;\n\t\t\tf.uvRect = {\n\t\t\t\tt: r.y / f.image.height,\n\t\t\t\tl: r.x / f.image.width,\n\t\t\t\tb: (r.y + r.height) / f.image.height,\n\t\t\t\tr: (r.x + r.width) / f.image.width\n\t\t\t};\n\t\t}\n\n\t\treturn spritesheet._frames[(target != -1) ? target : 0].uvRect || {t:0, l:0, b:1, r:1};\n\t};\n\n\t/**\n\t * Test a context to see if it has WebGL enabled on it.\n\t * @method isWebGLActive\n\t * @param {CanvasContext} ctx The context to test\n\t * @static\n\t * @return {Boolean} Whether WebGL is enabled\n\t */\n\tStageGL.isWebGLActive = function (ctx) {\n\t\treturn ctx &&\n\t\t\tctx instanceof WebGLRenderingContext &&\n\t\t\ttypeof WebGLRenderingContext !== 'undefined';\n\t};\n\n// static properties:\n\t/**\n\t * The number of properties defined per vertex (x, y, textureU, textureV, textureIndex, alpha)\n\t * @property VERTEX_PROPERTY_COUNT\n\t * @static\n\t * @final\n\t * @type {Number}\n\t * @default 6\n\t * @readonly\n\t */\n\tStageGL.VERTEX_PROPERTY_COUNT = 6;\n\n\t/**\n\t * The number of triangle indices it takes to form a Card. 3 per triangle, 2 triangles.\n\t * @property INDICIES_PER_CARD\n\t * @static\n\t * @final\n\t * @type {Number}\n\t * @default 6\n\t * @readonly\n\t */\n\tStageGL.INDICIES_PER_CARD = 6;\n\n\t/**\n\t * The default value for the maximum number of cards we want to process in a batch. See\n\t * {{#crossLink \"StageGL/WEBGL_MAX_INDEX_NUM:property\"}}{{/crossLink}} for a hard limit.\n\t * @property DEFAULT_MAX_BATCH_SIZE\n\t * @static\n\t * @final\n\t * @type {Number}\n\t * @default 10000\n\t * @readonly\n\t */\n\tStageGL.DEFAULT_MAX_BATCH_SIZE = 10000;\n\n\t/**\n\t * The maximum size WebGL allows for element index numbers. Uses a 16 bit unsigned integer. It takes 6 indices to\n\t * make a unique card.\n\t * @property WEBGL_MAX_INDEX_NUM\n\t * @static\n\t * @final\n\t * @type {Number}\n\t * @default 65536\n\t * @readonly\n\t */\n\tStageGL.WEBGL_MAX_INDEX_NUM = Math.pow(2, 16);\n\n\t/**\n\t * Default U/V rect for dealing with full coverage from an image source.\n\t * @property UV_RECT\n\t * @static\n\t * @final\n\t * @type {Object}\n\t * @default {t:0, l:0, b:1, r:1}\n\t * @readonly\n\t */\n\tStageGL.UV_RECT = {t:0, l:0, b:1, r:1};\n\n\ttry {\n\t\t/**\n\t\t * Vertex positions for a card that covers the entire render. Used with render targets primarily.\n\t\t * @property COVER_VERT\n\t\t * @static\n\t\t * @final\n\t\t * @type {Float32Array}\n\t\t * @readonly\n\t\t */\n\t\tStageGL.COVER_VERT = new Float32Array([\n\t\t\t-1,\t\t 1,\t\t//TL\n\t\t\t1,\t\t 1,\t\t//TR\n\t\t\t-1,\t\t-1,\t\t//BL\n\t\t\t1,\t\t 1,\t\t//TR\n\t\t\t1,\t\t-1,\t\t//BR\n\t\t\t-1,\t\t-1\t\t//BL\n\t\t]);\n\n\t\t/**\n\t\t * U/V for {{#crossLink \"StageGL/COVER_VERT:property\"}}{{/crossLink}}.\n\t\t * @property COVER_UV\n\t\t * @static\n\t\t * @final\n\t\t * @type {Float32Array}\n\t\t * @readonly\n\t\t */\n\t\tStageGL.COVER_UV = new Float32Array([\n\t\t\t 0,\t\t 0,\t\t//TL\n\t\t\t 1,\t\t 0,\t\t//TR\n\t\t\t 0,\t\t 1,\t\t//BL\n\t\t\t 1,\t\t 0,\t\t//TR\n\t\t\t 1,\t\t 1,\t\t//BR\n\t\t\t 0,\t\t 1\t\t//BL\n\t\t]);\n\n\t\t/**\n\t\t * Flipped U/V for {{#crossLink \"StageGL:COVER_VERT:property\"}}{{/crossLink}}.\n\t\t * @property COVER_UV_FLIP\n\t\t * @static\n\t\t * @final\n\t\t * @type {Float32Array}\n\t\t * @readonly\n\t\t */\n\t\tStageGL.COVER_UV_FLIP = new Float32Array([\n\t\t\t 0,\t\t 1,\t\t//TL\n\t\t\t 1,\t\t 1,\t\t//TR\n\t\t\t 0,\t\t 0,\t\t//BL\n\t\t\t 1,\t\t 1,\t\t//TR\n\t\t\t 1,\t\t 0,\t\t//BR\n\t\t\t 0,\t\t 0\t\t//BL\n\t\t]);\n\t} catch(e) { /* Breaking in older browsers, but those browsers wont run StageGL so no recovery or warning needed */ }\n\n\t/**\n\t * Portion of the shader that contains the \"varying\" properties required in both vertex and fragment shaders. The\n\t * regular shader is designed to render all expected objects. Shader code may contain templates that are replaced\n\t * pre-compile.\n\t * @property REGULAR_VARYING_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.REGULAR_VARYING_HEADER = (\n\t\t\"precision mediump float;\" +\n\t\t\"varying vec2 vTextureCoord;\" +\n\t\t\"varying lowp float indexPicker;\" +\n\t\t\"varying lowp float alphaValue;\"\n\t);\n\n\t/**\n\t * Actual full header for the vertex shader. Includes the varying header. The regular shader is designed to render\n\t * all expected objects. Shader code may contain templates that are replaced pre-compile.\n\t * @property REGULAR_VERTEX_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.REGULAR_VERTEX_HEADER = (\n\t\tStageGL.REGULAR_VARYING_HEADER +\n\t\t\"attribute vec2 vertexPosition;\" +\n\t\t\"attribute vec2 uvPosition;\" +\n\t\t\"attribute lowp float textureIndex;\" +\n\t\t\"attribute lowp float objectAlpha;\" +\n\t\t\"uniform mat4 pMatrix;\"\n\t);\n\n\t/**\n\t * Actual full header for the fragment shader. Includes the varying header. The regular shader is designed to render\n\t * all expected objects. Shader code may contain templates that are replaced pre-compile.\n\t * @property REGULAR_FRAGMENT_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.REGULAR_FRAGMENT_HEADER = (\n\t\tStageGL.REGULAR_VARYING_HEADER +\n\t\t\"uniform sampler2D uSampler[{{count}}];\"\n\t);\n\n\t/**\n\t * Body of the vertex shader. The regular shader is designed to render all expected objects. Shader code may contain\n\t * templates that are replaced pre-compile.\n\t * @property REGULAR_VERTEX_BODY\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.REGULAR_VERTEX_BODY  = (\n\t\t\"void main(void) {\" +\n\t\t\t//DHG TODO: This doesn't work. Must be something wrong with the hand built matrix see js... bypass for now\n\t\t\t//vertexPosition, round if flag\n\t\t\t//\"gl_Position = pMatrix * vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);\" +\n\t\t\t\"gl_Position = vec4(\"+\n\t\t\t\t\"(vertexPosition.x * pMatrix[0][0]) + pMatrix[3][0],\" +\n\t\t\t\t\"(vertexPosition.y * pMatrix[1][1]) + pMatrix[3][1],\" +\n\t\t\t\t\"pMatrix[3][2],\" +\n\t\t\t\t\"1.0\" +\n\t\t\t\");\" +\n\t\t\t\"alphaValue = objectAlpha;\" +\n\t\t\t\"indexPicker = textureIndex;\" +\n\t\t\t\"vTextureCoord = uvPosition;\" +\n\t\t\"}\"\n\t);\n\n\t/**\n\t * Body of the fragment shader. The regular shader is designed to render all expected objects. Shader code may\n\t * contain templates that are replaced pre-compile.\n\t * @property REGULAR_FRAGMENT_BODY\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.REGULAR_FRAGMENT_BODY = (\n\t\t\"void main(void) {\" +\n\t\t\t\"vec4 color = vec4(1.0, 0.0, 0.0, 1.0);\" +\n\n\t\t\t\"if (indexPicker <= 0.5) {\" +\n\t\t\t\t\"color = texture2D(uSampler[0], vTextureCoord);\" +\n\t\t\t\t\"{{alternates}}\" +\n\t\t\t\"}\" +\n\n\t\t\t\"{{fragColor}}\" +\n\t\t\"}\"\n\t);\n\tStageGL.REGULAR_FRAG_COLOR_NORMAL = (\n\t\t\"gl_FragColor = vec4(color.rgb, color.a * alphaValue);\"\n\t);\n\tStageGL.REGULAR_FRAG_COLOR_PREMULTIPLY = (\n\t\t\"if(color.a > 0.0035) {\" +\t\t// 1/255 = 0.0039, so ignore any value below 1 because it's probably noise\n\t\t\t\"gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);\" +\n\t\t\"} else {\" +\n\t\t\t\"gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\" +\n\t\t\"}\"\n\t);\n\n\t//TODO: DHG: a real particle shader\n\t/**\n\t * @property PARTICLE_VERTEX_BODY\n\t * @todo\n\t * @final\n\t * @static\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.PARTICLE_VERTEX_BODY = (\n\t\tStageGL.REGULAR_VERTEX_BODY\n\t);\n\t/**\n\t * @property PARTICLE_FRAGMENT_BODY\n\t * @todo\n\t * @final\n\t * @static\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.PARTICLE_FRAGMENT_BODY = (\n\t\tStageGL.REGULAR_FRAGMENT_BODY\n\t);\n\n\t/**\n\t * Portion of the shader that contains the \"varying\" properties required in both vertex and fragment shaders. The\n\t * cover shader is designed to be a simple vertex/uv only texture render that covers the render surface. Shader\n\t * code may contain templates that are replaced pre-compile.\n\t * @property COVER_VARYING_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.COVER_VARYING_HEADER = (\n\t\t\"precision mediump float;\" +\n\n\t\t\"varying highp vec2 vRenderCoord;\" +\n\t\t\"varying highp vec2 vTextureCoord;\"\n\t);\n\n\t/**\n\t * Actual full header for the vertex shader. Includes the varying header. The cover shader is designed to be a\n\t * simple vertex/uv only texture render that covers the render surface. Shader code may contain templates that are\n\t * replaced pre-compile.\n\t * @property COVER_VERTEX_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.COVER_VERTEX_HEADER = (\n\t\tStageGL.COVER_VARYING_HEADER +\n\t\t\"attribute vec2 vertexPosition;\" +\n\t\t\"attribute vec2 uvPosition;\" +\n\t\t\"uniform float uUpright;\"\n\t);\n\n\t/**\n\t * Actual full header for the fragment shader. Includes the varying header. The cover shader is designed to be a\n\t * simple vertex/uv only texture render that covers the render surface. Shader code may contain templates that are\n\t * replaced pre-compile.\n\t * @property COVER_FRAGMENT_HEADER\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.COVER_FRAGMENT_HEADER = (\n\t\tStageGL.COVER_VARYING_HEADER +\n\t\t\"uniform sampler2D uSampler;\"\n\t);\n\n\t/**\n\t * Body of the vertex shader. The cover shader is designed to be a simple vertex/uv only texture render that covers\n\t * the render surface. Shader code may contain templates that are replaced pre-compile.\n\t * @property COVER_VERTEX_BODY\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.COVER_VERTEX_BODY  = (\n\t\t\"void main(void) {\" +\n\t\t\t\"gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);\" +\n\t\t\t\"vRenderCoord = uvPosition;\" +\n\t\t\t\"vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));\" +\n\t\t\"}\"\n\t);\n\n\t/**\n\t * Body of the fragment shader. The cover shader is designed to be a simple vertex/uv only texture render that\n\t * covers the render surface. Shader code may contain templates that are replaced pre-compile.\n\t * @property COVER_FRAGMENT_BODY\n\t * @static\n\t * @final\n\t * @type {String}\n\t * @readonly\n\t */\n\tStageGL.COVER_FRAGMENT_BODY = (\n\t\t\"void main(void) {\" +\n\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\n\t\t\t\"gl_FragColor = color;\" +\n\t\t\"}\"\n\t);\n\n// events:\n\t/**\n\t * Dispatched each update immediately before the canvas is cleared and the display list is drawn to it. You can call\n\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} on the event to cancel the draw.\n\t * @event drawstart\n\t */\n\n\t/**\n\t * Dispatched each update immediately after the display list is drawn to the canvas and the canvas context is restored.\n\t * @event drawend\n\t */\n\n// getter / setters:\n\tp._get_isWebGL = function () {\n\t\treturn !!this._webGLContext;\n\t};\n\n\tp._set_autoPurge = function (value) {\n\t\tvalue = isNaN(value)?1200:value;\n\t\tif (value != -1) {\n\t\t\tvalue = value<10?10:value;\n\t\t}\n\t\tthis._autoPurge = value;\n\t};\n\tp._get_autoPurge = function () {\n\t\treturn Number(this._autoPurge);\n\t};\n\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\t/**\n\t\t\t * Indicates whether WebGL is being used for rendering. For example, this would be `false` if WebGL is not\n\t\t\t * supported in the browser.\n\t\t\t * @property isWebGL\n\t\t\t * @type {Boolean}\n\t\t\t * @readonly\n\t\t\t */\n\t\t\tisWebGL: { get: p._get_isWebGL },\n\n\t\t\t/**\n\t\t\t * Specifies whether or not StageGL is automatically purging unused textures. Higher numbers purge less\n\t\t\t * often. Values below 10 are upgraded to 10, and -1 disables this feature.\n\t\t\t * @property autoPurge\n\t\t\t * @protected\n\t\t\t * @type {Integer}\n\t\t\t * @default 1000\n\t\t\t */\n\t\t\tautoPurge: { get: p._get_autoPurge, set: p._set_autoPurge }\n\t\t});\n\t} catch (e) {} // TODO: use Log\n\n\n// constructor methods:\n\t/**\n\t * Create and properly initialize the WebGL instance.\n\t * @method _initializeWebGL\n\t * @protected\n\t * @return {WebGLRenderingContext}\n\t */\n\tp._initializeWebGL = function () {\n\t\tif (this.canvas) {\n\t\t\tif (!this._webGLContext || this._webGLContext.canvas !== this.canvas) {\n\t\t\t\t// A context hasn't been defined yet,\n\t\t\t\t// OR the defined context belongs to a different canvas, so reinitialize.\n\n\t\t\t\t// defaults and options\n\t\t\t\tvar options = {\n\t\t\t\t\tdepth: false, // Disable the depth buffer as it isn't used.\n\t\t\t\t\talpha: this._transparent, // Make the canvas background transparent.\n\t\t\t\t\tstencil: true,\n\t\t\t\t\tantialias: this._antialias,\n\t\t\t\t\tpremultipliedAlpha: this._premultiply, // Assume the drawing buffer contains colors with premultiplied alpha.\n\t\t\t\t\tpreserveDrawingBuffer: this._preserveBuffer\n\t\t\t\t};\n\n\t\t\t\tvar gl = this._webGLContext = this._fetchWebGLContext(this.canvas, options);\n\t\t\t\tif (!gl) { return null; }\n\n\t\t\t\tthis.updateSimultaneousTextureCount(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n\t\t\t\tthis._maxTextureSlots = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);\n\t\t\t\tthis._createBuffers(gl);\n\t\t\t\tthis._initTextures(gl);\n\n\t\t\t\tgl.disable(gl.DEPTH_TEST);\n\t\t\t\tgl.enable(gl.BLEND);\n\t\t\t\tgl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n\t\t\t\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiply);\n\t\t\t\t//gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);\n\n\t\t\t\tthis._webGLContext.clearColor(this._clearColor.r, this._clearColor.g, this._clearColor.b, this._clearColor.a);\n\t\t\t\tthis.updateViewport(this._viewportWidth || this.canvas.width, this._viewportHeight || this.canvas.height);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._webGLContext = null;\n\t\t}\n\t\treturn this._webGLContext;\n\t};\n\n// public methods:\n\t/**\n\t * Docced in superclass\n\t */\n\tp.update = function (props) {\n\t\tif (!this.canvas) { return; }\n\t\tif (this.tickOnUpdate) { this.tick(props); }\n\t\tthis.dispatchEvent(\"drawstart\");\n\t\tif (this.autoClear) { this.clear(); }\n\n\t\tif (this._webGLContext) {\n\t\t\t// Use WebGL.\n\t\t\tthis._batchDraw(this, this._webGLContext);\n\t\t\tif (this._autoPurge != -1 && !(this._drawID%((this._autoPurge/2)|0))) {\n\t\t\t\tthis.purgeTextures(this._autoPurge);\n\t\t\t}\n\t\t} else {\n\t\t\t// Use 2D.\n\t\t\tvar ctx = this.canvas.getContext(\"2d\");\n\t\t\tctx.save();\n\t\t\tthis.updateContext(ctx);\n\t\t\tthis.draw(ctx, false);\n\t\t\tctx.restore();\n\t\t}\n\t\tthis.dispatchEvent(\"drawend\");\n\t};\n\n\t/**\n\t * Docced in superclass\n\t */\n\tp.clear = function () {\n\t\tif (!this.canvas) { return; }\n\t\tif (StageGL.isWebGLActive(this._webGLContext)) {\n\t\t\tvar gl = this._webGLContext;\n\t\t\tvar cc = this._clearColor;\n\t\t\tvar adjust = this._transparent ? cc.a : 1.0;\n\t\t\t// Use WebGL settings; adjust for pre multiplied alpha appropriate to scenario\n\t\t\tthis._webGLContext.clearColor(cc.r * adjust, cc.g * adjust, cc.b * adjust, adjust);\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\tthis._webGLContext.clearColor(cc.r, cc.g, cc.b, cc.a);\n\t\t} else {\n\t\t\t// Use 2D.\n\t\t\tthis.Stage_clear();\n\t\t}\n\t};\n\n\t/**\n\t * Draws the stage into the supplied context if possible. Many WebGL properties only exist on their context. As such\n\t * you cannot share contexts among many StageGLs and each context requires a unique StageGL instance. Contexts that\n\t * don't match the context managed by this StageGL will be treated as a 2D context.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D | WebGLRenderingContext} context The context object to draw into.\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For\n\t *  example, used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\n\t * @return {Boolean} If the draw was handled by this function\n\t */\n\tp.draw = function (context, ignoreCache) {\n\t\tif (context === this._webGLContext && StageGL.isWebGLActive(this._webGLContext)) {\n\t\t\tvar gl = this._webGLContext;\n\t\t\tthis._batchDraw(this, gl, ignoreCache);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn this.Stage_draw(context, ignoreCache);\n\t\t}\n\t};\n\n\t/**\n\t * Draws the target into the correct context, be it a canvas or Render Texture using WebGL.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method cacheDraw\n\t * @param {DisplayObject} target The object we're drawing into cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\n\t * @param {Array} filters The filters we're drawing into cache.\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\n\t * @return {Boolean} If the draw was handled by this function\n\t */\n\tp.cacheDraw = function (target, filters, manager) {\n\t\tif (StageGL.isWebGLActive(this._webGLContext)) {\n\t\t\tvar gl = this._webGLContext;\n\t\t\tthis._cacheDraw(gl, target, filters, manager);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Blocks, or frees a texture \"slot\" on the GPU. Can be useful if you are overflowing textures. When overflowing\n\t * textures they are re-uploaded to the GPU every time they're encountered, this can be expensive with large textures.\n\t * By blocking the slot you reduce available slots, potentially increasing draw calls, but mostly you prevent a\n\t * texture being re-uploaded if it would have moved slots due to overflow.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * For example, block the slot a background image is stored in so there is less re-loading of that image.\n\t * @method protectTextureSlot\n\t * @param  {Number} id The slot to be affected\n\t * @param  {Boolean} [lock=false] Whether this slot is the one being locked.\n\t */\n\tp.protectTextureSlot = function (id, lock) {\n\t\tif (id > this._maxTextureSlots || id < 0) {\n\t\t\tthrow \"Slot outside of acceptable range\";\n\t\t}\n\t\tthis._slotBlacklist[id] = !!lock;\n\t};\n\n\t/**\n\t * Render textures can't draw into themselves so any item being used for renderTextures needs two to alternate between.\n\t * This function creates, gets, and toggles the render surface between the two.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method getTargetRenderTexture\n\t * @param  {DisplayObject} target The object associated with the render textures, usually a cached object.\n\t * @param  {Number} w The width to create the texture at.\n\t * @param  {Number} h The height to create the texture at.\n\t * @return {Objet}\n\t * @todo fill in return type\n\t */\n\tp.getTargetRenderTexture = function (target, w, h) {\n\t\tvar result, toggle = false;\n\t\tvar gl = this._webGLContext;\n\t\tif (target.__lastRT !== undefined && target.__lastRT === target.__rtA) { toggle = true; }\n\t\tif (!toggle) {\n\t\t\tif (target.__rtA === undefined) {\n\t\t\t\ttarget.__rtA = this.getRenderBufferTexture(w, h);\n\t\t\t} else {\n\t\t\t\tif (w != target.__rtA._width || h != target.__rtA._height) {\n\t\t\t\t\tthis.resizeTexture(target.__rtA, w, h);\n\t\t\t\t}\n\t\t\t\tthis.setTextureParams(gl);\n\t\t\t}\n\t\t\tresult = target.__rtA;\n\t\t} else {\n\t\t\tif (target.__rtB === undefined) {\n\t\t\t\ttarget.__rtB = this.getRenderBufferTexture(w, h);\n\t\t\t} else {\n\t\t\t\tif (w != target.__rtB._width || h != target.__rtB._height) {\n\t\t\t\t\tthis.resizeTexture(target.__rtB, w, h);\n\t\t\t\t}\n\t\t\t\tthis.setTextureParams(gl);\n\t\t\t}\n\t\t\tresult = target.__rtB;\n\t\t}\n\t\tif (!result) {\n\t\t\tthrow \"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances\";\n\t\t}\n\t\ttarget.__lastRT = result;\n\t\treturn result;\n\t};\n\n\t/**\n\t * For every image encountered StageGL registers and tracks it automatically. This tracking can cause memory leaks \n\t * if not purged. StageGL, by default, automatically purges them. This does have a cost and may unfortunately find\n\t * false positives. This function is for manual management of this memory instead of the automatic system controlled\n\t * by the {{#crossLink \"StageGL/autoPurge:property\"}}{{/crossLink}} property.\n\t *\n\t * This function will recursively remove all textures found on the object, its children, cache, etc. It will uncache \n\t * objects and remove any texture it finds REGARDLESS of whether it is currently in use elsewhere. It is up to the\n\t * developer to ensure that a texture in use is not removed.\n\t *\n\t * Textures in use, or to be used again shortly, should not be removed. This is simply for performance reasons.\n\t * Removing a texture in use will cause the texture to have to be re-uploaded slowing rendering.\n\t * @method releaseTexture\n\t * @param  {DisplayObject | Texture | Image | Canvas} item An object that used the texture to be discarded.\n\t */\n\tp.releaseTexture = function (item) {\n\t\tvar i, l;\n\t\tif (!item) { return; }\n\n\t\t// this is a container object\n\t\tif (item.children) {\n\t\t\tfor (i = 0, l = item.children.length; i < l; i++) {\n\t\t\t\tthis.releaseTexture(item.children[i]);\n\t\t\t}\n\t\t}\n\n\t\t// this has a cache canvas\n\t\tif (item.cacheCanvas) {\n\t\t\titem.uncache();\n\t\t}\n\n\t\tvar foundImage = undefined;\n\t\tif (item._storeID !== undefined) {\n\t\t\t// this is a texture itself\n\t\t\tif (item === this._textureDictionary[item._storeID]) {\n\t\t\t\tthis._killTextureObject(item);\n\t\t\t\titem._storeID = undefined;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// this is an image or canvas\n\t\t\tfoundImage = item;\n\t\t} else if (item._webGLRenderStyle === 2) {\n\t\t\t// this is a Bitmap class\n\t\t\tfoundImage = item.image;\n\t\t} else if (item._webGLRenderStyle === 1) {\n\t\t\t// this is a SpriteSheet, we can't tell which image we used from the list easily so remove them all!\n\t\t\tfor (i = 0, l = item.spriteSheet._images.length; i < l; i++) {\n\t\t\t\tthis.releaseTexture(item.spriteSheet._images[i]);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// did we find anything\n\t\tif (foundImage === undefined) {\n\t\t\tif (this.vocalDebug) {\n\t\t\t\tconsole.log(\"No associated texture found on release\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// remove it\n\t\tthis._killTextureObject(this._textureDictionary[foundImage._storeID]);\n\t\tfoundImage._storeID = undefined;\n\t};\n\n\t/**\n\t * Similar to {{#crossLink \"releaseTexture\"}}{{/crossLink}}, but this function differs by searching for textures to\n\t * release. It works by assuming that it can purge any texture which was last used more than \"count\" draw calls ago.\n\t * Because this process is unaware of the objects and whether they may be used on your stage, false positives can\n\t * occur. It is recommended to manually manage your memory with {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}},\n\t * however, there are many use cases where this is simpler and error-free. This process is also run by default under\n\t * the hood to prevent leaks. To disable it see the {{#crossLink \"StageGL/autoPurge:property\"}}{{/crossLink}} property.\n\t * @method purgeTextures\n\t * @param {Number} [count=100] How many renders ago the texture was last used\n\t */\n\tp.purgeTextures = function (count) {\n\t\tif (count == undefined){ count = 100; }\n\n\t\tvar dict = this._textureDictionary;\n\t\tvar l = dict.length;\n\t\tfor (var i= 0; i<l; i++) {\n\t\t\tvar item = dict[i];\n\t\t\tif (!item) { continue; }\n\t\t\tif (item._drawID + count <= this._drawID) {\t// use draw not batch as draw is more indicative of time\n\t\t\t\tthis._killTextureObject(item);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Try to set the max textures the system can handle. It should default to the hardware maximum, and lower values\n\t * may limit performance. Some devices have been known to mis-report their max textures, or you may need a standard\n\t * baseline cross devices for testing. Barring the previous suggestions, there is little need to call this function\n\t * as the library will automatically try to find the best value.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method updateSimultaneousTextureCount\n\t * @param {Number} [count=1] The number of textures intended for simultaneous loading.\n\t */\n\tp.updateSimultaneousTextureCount = function (count) {\n\t\t// TODO: DHG: make sure API works in all instances, may be some issues with buffers etc I haven't foreseen\n\t\tvar gl = this._webGLContext;\n\t\tvar success = false;\n\n\t\tif (count < 1 || isNaN(count)) { count = 1; }\n\t\tthis._batchTextureCount = count;\n\n\t\twhile (!success) {\n\t\t\ttry {\n\t\t\t\tthis._activeShader = this._fetchShaderProgram(gl);\n\t\t\t\tsuccess = true;\n\t\t\t} catch(e) {\n\t\t\t\tif (this._batchTextureCount == 1) {\n\t\t\t\t\tthrow \"Cannot compile shader \" + e;\n\t\t\t\t}\n\n\t\t\t\tthis._batchTextureCount -= 4;\n\t\t\t\tif (this._batchTextureCount < 1) { this._batchTextureCount = 1; }\n\n\t\t\t\tif (this.vocalDebug) {\n\t\t\t\t\tconsole.log(\"Reducing desired texture count due to errors: \" + this._batchTextureCount);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Update the WebGL viewport. Note that this does <strong>not</strong> update the canvas element's width/height, but\n\t * the render surface's instead. This is necessary after manually resizing the canvas element on the DOM to avoid a\n\t * up/down scaled render.\n\t * @method updateViewport\n\t * @param {Integer} width The width of the render surface in pixels.\n\t * @param {Integer} height The height of the render surface in pixels.\n\t */\n\tp.updateViewport = function (width, height) {\n\t\tthis._viewportWidth = width|0;\n\t\tthis._viewportHeight = height|0;\n\t\tvar gl = this._webGLContext;\n\n\t\tif (gl) {\n\t\t\tgl.viewport(0, 0, this._viewportWidth, this._viewportHeight);\n\n\t\t\t// WebGL works with a -1,1 space on its screen. It also follows Y-Up\n\t\t\t// we need to flip the y, scale and then translate the co-ordinates to match this\n\t\t\t// additionally we offset into they Y so the polygons are inside the camera's \"clipping\" plane\n\t\t\tthis._projectionMatrix = new Float32Array([\n\t\t\t\t2 / this._viewportWidth,\t0,\t\t\t\t\t\t\t\t0,\t\t\t\t\t\t\t0,\n\t\t\t\t0,\t\t\t\t\t\t\t-2 / this._viewportHeight,\t\t1,\t\t\t\t\t\t\t0,\n\t\t\t\t0,\t\t\t\t\t\t\t0,\t\t\t\t\t\t\t\t1,\t\t\t\t\t\t\t0,\n\t\t\t\t-1,\t\t\t\t\t\t\t1,\t\t\t\t\t\t\t\t0.1,\t\t\t\t\t\t0\n\t\t\t]);\n\t\t\t// create the flipped version for use with render texture flipping\n\t\t\t// DHG: this would be a slice/clone but some platforms don't offer them for Float32Array\n\t\t\tthis._projectionMatrixFlip = new Float32Array([0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0]);\n\t\t\tthis._projectionMatrixFlip.set(this._projectionMatrix);\n\t\t\tthis._projectionMatrixFlip[5] *= -1;\n\t\t\tthis._projectionMatrixFlip[13] *= -1;\n\t\t}\n\t};\n\n\t/**\n\t * Fetches the shader compiled and set up to work with the provided filter/object. The shader is compiled on first\n\t * use and returned on subsequent calls.\n\t * @method getFilterShader\n\t * @param  {Filter|Object} filter The object which will provide the information needed to construct the filter shader.\n\t * @return {WebGLProgram}\n\t */\n\tp.getFilterShader = function (filter) {\n\t\tif (!filter) { filter = this; }\n\n\t\tvar gl = this._webGLContext;\n\t\tvar targetShader = this._activeShader;\n\n\t\tif (filter._builtShader) {\n\t\t\ttargetShader = filter._builtShader;\n\t\t\tif (filter.shaderParamSetup) {\n\t\t\t\tgl.useProgram(targetShader);\n\t\t\t\tfilter.shaderParamSetup(gl, this, targetShader);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\ttargetShader = this._fetchShaderProgram(\n\t\t\t\t\tgl, \"filter\",\n\t\t\t\t\tfilter.VTX_SHADER_BODY, filter.FRAG_SHADER_BODY,\n\t\t\t\t\tfilter.shaderParamSetup && filter.shaderParamSetup.bind(filter)\n\t\t\t\t);\n\t\t\t\tfilter._builtShader = targetShader;\n\t\t\t\ttargetShader._name = filter.toString();\n\t\t\t} catch (e) {\n\t\t\t\tconsole && console.log(\"SHADER SWITCH FAILURE\", e);\n\t\t\t}\n\t\t}\n\t\treturn targetShader;\n\t};\n\n\t/**\n\t * Returns a base texture that has no image or data loaded. Not intended for loading images. It may return `null`\n\t * in some error cases, and trying to use a \"null\" texture can cause renders to fail.\n\t * @method getBaseTexture\n\t * @param  {uint} [w=1] The width of the texture in pixels, defaults to 1\n\t * @param  {uint} [h=1] The height of the texture in pixels, defaults to 1\n\t */\n\tp.getBaseTexture = function (w, h) {\n\t\tvar width = Math.ceil(w > 0 ? w : 1) || 1;\n\t\tvar height = Math.ceil(h > 0 ? h : 1) || 1;\n\n\t\tvar gl = this._webGLContext;\n\t\tvar texture = gl.createTexture();\n\t\tthis.resizeTexture(texture, width, height);\n\t\tthis.setTextureParams(gl, false);\n\n\t\treturn texture;\n\t};\n\n\t/**\n\t * Resizes a supplied texture element. May generate invalid textures in some error cases such as; when the texture\n\t * is too large, when an out of texture memory error occurs, or other error scenarios. Trying to use an invalid texture\n\t * can cause renders to hard stop on some devices. Check the WebGL bound texture after running this function.\n\t *\n\t * NOTE: The supplied texture must have been made with the WebGL \"texImage2D\" function, all default APIs in StageGL\n\t * use this, so this note only matters for library developers and plugins.\n\t *\n\t * @protected\n\t * @method resizeTexture\n\t * @param  {WebGLTexture} texture The GL Texture to be modified.\n\t * @param  {uint} [width=1] The width of the texture in pixels, defaults to 1\n\t * @param  {uint} [height=1] The height of the texture in pixels, defaults to 1\n\t */\n\tp.resizeTexture = function (texture, width,height) {\n\t\tvar gl = this._webGLContext;\n\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\t\tgl.texImage2D(\n\t\t\tgl.TEXTURE_2D,\t\t\t\t// target\n\t\t\t0,\t\t\t\t\t\t\t// level of detail\n\t\t\tgl.RGBA,\t\t\t\t\t// internal format\n\t\t\twidth, height, 0,\t\t\t// width, height, border (only for array/null sourced textures)\n\t\t\tgl.RGBA,\t\t\t\t\t// format (match internal format)\n\t\t\tgl.UNSIGNED_BYTE,\t\t\t// type of texture(pixel color depth)\n\t\t\tnull\t\t\t\t\t\t// image data, we can do null because we're doing array data\n\t\t);\n\t\ttexture.width = width;\n\t\ttexture.height = height;\n\t};\n\n\t/**\n\t * Returns a base texture (see {{#crossLink \"StageGL/getBaseTexture\"}}{{/crossLink}}) for details. Also includes an\n\t * attached and linked render buffer in `texture._frameBuffer`. RenderTextures can be thought of as an internal\n\t * canvas on the GPU that can be drawn to.\n\t * @method getRenderBufferTexture\n\t * @param  {Number} w The width of the texture in pixels.\n\t * @param  {Number} h The height of the texture in pixels.\n\t * @return {Texture} the basic texture instance with a render buffer property.\n\t */\n\tp.getRenderBufferTexture = function (w, h) {\n\t\tvar gl = this._webGLContext;\n\n\t\t// get the texture\n\t\tvar renderTexture = this.getBaseTexture(w, h);\n\t\tif (!renderTexture) { return null; }\n\n\t\t// get the frame buffer\n\t\tvar frameBuffer = gl.createFramebuffer();\n\t\tif (!frameBuffer) { return null; }\n\n\t\t// set its width and height for spoofing as an image\n\t\trenderTexture.width = w;\n\t\trenderTexture.height = h;\n\n\t\t// attach frame buffer to texture and provide cross links to look up each other\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n\t\tgl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, renderTexture, 0);\n\t\tframeBuffer._renderTexture = renderTexture;\n\t\trenderTexture._frameBuffer = frameBuffer;\n\n\t\t// these keep track of themselves simply to reduce complexity of some lookup code\n\t\trenderTexture._storeID = this._textureDictionary.length;\n\t\tthis._textureDictionary[renderTexture._storeID] = renderTexture;\n\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\treturn renderTexture;\n\t};\n\n\t/**\n\t * Common utility function used to apply the correct texture processing parameters for the bound texture.\n\t * @method setTextureParams\n\t * @param  {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param  {Boolean} [isPOT=false] Marks whether the texture is \"Power of Two\", this may allow better quality AA.\n\t */\n\tp.setTextureParams = function (gl, isPOT) {\n\t\tif (isPOT && this._antialias) {\n\t\t\t//non POT linear works in some devices, but performance is NOT good, investigate\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\t\t} else {\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n\t\t}\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\t};\n\n\t/**\n\t * Changes the webGL clear, aka \"background\" color to the provided value. A transparent clear is recommended, as\n\t * non-transparent colours may create undesired boxes around some visuals.\n\t *\n\t * The clear color will also be used for filters and other \"render textures\". The stage background will ignore the\n\t * transparency value and display a solid color normally. For the stage to recognize and use transparency it must be\n\t * created with the transparent flag set to `true` (see {{#crossLink \"StageGL/constructor\"}}{{/crossLink}})).\n\t *\n\t * Using \"transparent white\" to demonstrate, the valid data formats are as follows:\n\t * <ul>\n\t *     <li>\"#FFF\"</li>\n\t *     <li>\"#FFFFFF\"</li>\n\t *     <li>\"#FFFFFF00\"</li>\n\t *     <li>\"rgba(255,255,255,0.0)\"</li>\n\t * </ul>\n\t * @method setClearColor\n\t * @param {String|int} [color=0x00000000] The new color to use as the background\n\t */\n\tp.setClearColor = function (color) {\n\t\tvar r, g, b, a, output;\n\n\t\tif (typeof color == \"string\") {\n\t\t\tif (color.indexOf(\"#\") == 0) {\n\t\t\t\tif (color.length == 4) {\n\t\t\t\t\tcolor = \"#\" + color.charAt(1)+color.charAt(1) + color.charAt(2)+color.charAt(2) + color.charAt(3)+color.charAt(3)\n\t\t\t\t}\n\t\t\t\tr = Number(\"0x\"+color.slice(1, 3))/255;\n\t\t\t\tg = Number(\"0x\"+color.slice(3, 5))/255;\n\t\t\t\tb = Number(\"0x\"+color.slice(5, 7))/255;\n\t\t\t\ta = Number(\"0x\"+color.slice(7, 9))/255;\n\t\t\t} else if (color.indexOf(\"rgba(\") == 0) {\n\t\t\t\toutput = color.slice(5, -1).split(\",\");\n\t\t\t\tr = Number(output[0])/255;\n\t\t\t\tg = Number(output[1])/255;\n\t\t\t\tb = Number(output[2])/255;\n\t\t\t\ta = Number(output[3]);\n\t\t\t}\n\t\t} else {\t// >>> is an unsigned shift which is what we want as 0x80000000 and up are negative values\n\t\t\tr = ((color & 0xFF000000) >>> 24)/255;\n\t\t\tg = ((color & 0x00FF0000) >>> 16)/255;\n\t\t\tb = ((color & 0x0000FF00) >>> 8)/255;\n\t\t\ta = (color & 0x000000FF)/255;\n\t\t}\n\n\t\tthis._clearColor.r = r || 0;\n\t\tthis._clearColor.g = g || 0;\n\t\tthis._clearColor.b = b || 0;\n\t\tthis._clearColor.a = a || 0;\n\n\t\tif (!this._webGLContext) { return; }\n\t\tthis._webGLContext.clearColor(this._clearColor.r, this._clearColor.g, this._clearColor.b, this._clearColor.a);\n\t};\n\n\t/**\n\t * docced in subclass\n\t */\n\tp.toString = function () {\n\t\treturn \"[StageGL (name=\"+  this.name +\")]\";\n\t};\n\n// private methods:\n\t/**\n\t * Sets up and returns the WebGL context for the canvas. May return undefined in error scenarios. These can include \n\t * situations where the canvas element already has a context, 2D or GL.\n\t * @param  {Canvas} canvas The DOM canvas element to attach to\n\t * @param  {Object} options The options to be handed into the WebGL object, see WebGL spec\n\t * @method _fetchWebGLContext\n\t * @protected\n\t * @return {WebGLRenderingContext} The WebGL context, may return undefined in error scenarios\n\t */\n\tp._fetchWebGLContext = function (canvas, options) {\n\t\tvar gl;\n\n\t\ttry {\n\t\t\tgl = canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options);\n\t\t} catch (e) {\n\t\t\t// don't do anything in catch, null check will handle it\n\t\t}\n\n\t\tif (!gl) {\n\t\t\tvar msg = \"Could not initialize WebGL\";\n\t\t\tconsole.error?console.error(msg):console.log(msg);\n\t\t} else {\n\t\t\tgl.viewportWidth = canvas.width;\n\t\t\tgl.viewportHeight = canvas.height;\n\t\t}\n\n\t\treturn gl;\n\t};\n\n\t/**\n\t * Create the completed Shader Program from the vertex and fragment shaders. Allows building of custom shaders for\n\t * filters. Once compiled, shaders are saved so. If the Shader code requires dynamic alterations re-run this function\n\t * to generate a new shader.\n\t * @method _fetchShaderProgram\n\t * @param  {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param  {String} [shaderName=\"regular\"] Working values: \"regular\", \"override\", and \"filter\". Which type of shader to build.\n\t * Filter and override both accept the custom params. Regular and override have all features. Filter is a special case reduced feature shader meant to be over-ridden.\n\t * @param  {String} [customVTX] Extra vertex shader information to replace a regular draw, see \n\t * {{#crossLink \"StageGL/COVER_VERTEX_BODY\"}}{{/crossLink}} for default and {{#crossLink \"Filter\"}}{{/crossLink}} for examples.\n\t * @param  {String} [customFRAG] Extra fragment shader information to replace a regular draw, see \n\t * {{#crossLink \"StageGL/COVER_FRAGMENT_BODY\"}}{{/crossLink}} for default and {{#crossLink \"Filter\"}}{{/crossLink}} for examples.\n\t * @param  {Function} [shaderParamSetup] Function to run so custom shader parameters can get applied for the render.\n\t * @protected\n\t * @return {WebGLProgram} The compiled and linked shader\n\t */\n\tp._fetchShaderProgram = function (gl, shaderName, customVTX, customFRAG, shaderParamSetup) {\n\t\tgl.useProgram(null);\t\t// safety to avoid collisions\n\n\t\t// build the correct shader string out of the right headers and bodies\n\t\tvar targetFrag, targetVtx;\n\t\tswitch (shaderName) {\n\t\t\tcase \"filter\":\n\t\t\t\ttargetVtx = StageGL.COVER_VERTEX_HEADER + (customVTX || StageGL.COVER_VERTEX_BODY);\n\t\t\t\ttargetFrag = StageGL.COVER_FRAGMENT_HEADER + (customFRAG || StageGL.COVER_FRAGMENT_BODY);\n\t\t\t\tbreak;\n\t\t\tcase \"particle\": //TODO\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + StageGL.PARTICLE_VERTEX_BODY;\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + StageGL.PARTICLE_FRAGMENT_BODY;\n\t\t\t\tbreak;\n\t\t\tcase \"override\":\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + (customVTX || StageGL.REGULAR_VERTEX_BODY);\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + (customFRAG || StageGL.REGULAR_FRAGMENT_BODY);\n\t\t\t\tbreak;\n\t\t\tcase \"regular\":\n\t\t\tdefault:\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + StageGL.REGULAR_VERTEX_BODY;\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + StageGL.REGULAR_FRAGMENT_BODY;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// create the separate vars\n\t\tvar vertexShader = this._createShader(gl, gl.VERTEX_SHADER, targetVtx);\n\t\tvar fragmentShader = this._createShader(gl, gl.FRAGMENT_SHADER, targetFrag);\n\n\t\t// link them together\n\t\tvar shaderProgram = gl.createProgram();\n\t\tgl.attachShader(shaderProgram, vertexShader);\n\t\tgl.attachShader(shaderProgram, fragmentShader);\n\t\tgl.linkProgram(shaderProgram);\n\t\tshaderProgram._type = shaderName;\n\n\t\t// check compile status\n\t\tif (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n\t\t\tgl.useProgram(this._activeShader);\n\t\t\tthrow gl.getProgramInfoLog(shaderProgram);\n\t\t}\n\n\t\t// set up the parameters on the shader\n\t\tgl.useProgram(shaderProgram);\n\t\tswitch (shaderName) {\n\t\t\tcase \"filter\":\n\t\t\t\t// get the places in memory the shader is stored so we can feed information into them\n\t\t\t\t// then save it off on the shader because it's so tied to the shader itself\n\t\t\t\tshaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"vertexPosition\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\n\n\t\t\t\tshaderProgram.uvPositionAttribute = gl.getAttribLocation(shaderProgram, \"uvPosition\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.uvPositionAttribute);\n\n\t\t\t\tshaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\n\t\t\t\tgl.uniform1i(shaderProgram.samplerUniform, 0);\n\n\t\t\t\tshaderProgram.uprightUniform = gl.getUniformLocation(shaderProgram, \"uUpright\");\n\t\t\t\tgl.uniform1f(shaderProgram.uprightUniform, 0);\n\n\t\t\t\t// if there's some custom attributes be sure to hook them up\n\t\t\t\tif (shaderParamSetup) {\n\t\t\t\t\tshaderParamSetup(gl, this, shaderProgram);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"override\":\n\t\t\tcase \"particle\":\n\t\t\tcase \"regular\":\n\t\t\tdefault:\n\t\t\t\t// get the places in memory the shader is stored so we can feed information into them\n\t\t\t\t// then save it off on the shader because it's so tied to the shader itself\n\t\t\t\tshaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"vertexPosition\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\n\n\t\t\t\tshaderProgram.uvPositionAttribute = gl.getAttribLocation(shaderProgram, \"uvPosition\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.uvPositionAttribute);\n\n\t\t\t\tshaderProgram.textureIndexAttribute = gl.getAttribLocation(shaderProgram, \"textureIndex\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.textureIndexAttribute);\n\n\t\t\t\tshaderProgram.alphaAttribute = gl.getAttribLocation(shaderProgram, \"objectAlpha\");\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.alphaAttribute);\n\n\t\t\t\tvar samplers = [];\n\t\t\t\tfor (var i = 0; i < this._batchTextureCount; i++) {\n\t\t\t\t\tsamplers[i] = i;\n\t\t\t\t}\n\n\t\t\t\tshaderProgram.samplerData = samplers;\n\t\t\t\tshaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\n\t\t\t\tgl.uniform1iv(shaderProgram.samplerUniform, samplers);\n\n\t\t\t\tshaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"pMatrix\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\tgl.useProgram(this._activeShader);\n\t\treturn shaderProgram;\n\t};\n\n\t/**\n\t * Creates a shader from the specified string replacing templates. Template items are defined via `{{` `key` `}}``.\n\t * @method _createShader\n\t * @param  {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param  {Number} type The type of shader to create. gl.VERTEX_SHADER | gl.FRAGMENT_SHADER\n\t * @param  {String} str The definition for the shader.\n\t * @return {WebGLShader}\n\t * @protected\n\t */\n\tp._createShader = function (gl, type, str) {\n\t\t// inject the static number\n\t\tstr = str.replace(/{{count}}/g, this._batchTextureCount);\n\n\t\t// resolve issue with no dynamic samplers by creating correct samplers in if else chain\n\t\t// TODO: WebGL 2.0 does not need this support\n\t\tvar insert = \"\";\n\t\tfor (var i = 1; i<this._batchTextureCount; i++) {\n\t\t\tinsert += \"} else if (indexPicker <= \"+ i +\".5) { color = texture2D(uSampler[\"+ i +\"], vTextureCoord);\";\n\t\t}\n\t\tstr = str.replace(/{{alternates}}/g, insert);\n\t\tstr = str.replace(/{{fragColor}}/g, this._premultiply ? StageGL.REGULAR_FRAG_COLOR_PREMULTIPLY : StageGL.REGULAR_FRAG_COLOR_NORMAL);\n\n\t\t// actually compile the shader\n\t\tvar shader = gl.createShader(type);\n\t\tgl.shaderSource(shader, str);\n\t\tgl.compileShader(shader);\n\n\t\t// check compile status\n\t\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\t\tthrow gl.getShaderInfoLog(shader);\n\t\t}\n\n\t\treturn shader;\n\t};\n\n\t/**\n\t * Sets up the necessary vertex property buffers, including position and U/V.\n\t * @method _createBuffers\n\t * @param {WebGLRenderingContext} gl\n\t * @protected\n\t */\n\tp._createBuffers = function (gl) {\n\t\tvar groupCount = this._maxCardsPerBatch * StageGL.INDICIES_PER_CARD;\n\t\tvar groupSize, i, l;\n\n\t\t// INFO:\n\t\t// all buffers are created using this pattern\n\t\t// create a WebGL buffer\n\t\t// attach it to context\n\t\t// figure out how many parts it has to an entry\n\t\t// fill it with empty data to reserve the memory\n\t\t// attach the empty data to the GPU\n\t\t// track the sizes on the buffer object\n\n\t\t// INFO:\n\t\t// a single buffer may be optimal in some situations and would be approached like this,\n\t\t// currently not implemented due to lack of need and potential complications with drawCover\n\n\t\t// var vertexBuffer = this._vertexBuffer = gl.createBuffer();\n\t\t// gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n\t\t// groupSize = 2 + 2 + 1 + 1; //x/y, u/v, index, alpha\n\t\t// var vertexData = this._vertexData = new Float32Array(groupCount * groupSize);\n\t\t// for (i=0; i<vertexData.length; i+=groupSize) {\n\t\t// \tvertexData[i+0] = vertexData[i+1] = 0;\n\t\t// \tvertexData[i+2] = vertexData[i+3] = 0.5;\n\t\t// \tvertexData[i+4] = 0;\n\t\t// \tvertexData[i+5] = 1;\n\t\t// }\n\t\t// vertexBuffer.itemSize = groupSize;\n\t\t// vertexBuffer.numItems = groupCount;\n\t\t// TODO bechmark and test using unified buffer\n\n\t\t// the actual position information\n\t\tvar vertexPositionBuffer = this._vertexPositionBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\n\t\tgroupSize = 2;\n\t\tvar vertices = this._vertices = new Float32Array(groupCount * groupSize);\n\t\tfor (i=0, l=vertices.length; i<l; i+=groupSize) { vertices[i] = vertices[i+1] = 0; }\n\t\tgl.bufferData(gl.ARRAY_BUFFER, vertices, gl.DYNAMIC_DRAW);\n\t\tvertexPositionBuffer.itemSize = groupSize;\n\t\tvertexPositionBuffer.numItems = groupCount;\n\n\t\t// where on the texture it gets its information\n\t\tvar uvPositionBuffer = this._uvPositionBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, uvPositionBuffer);\n\t\tgroupSize = 2;\n\t\tvar uvs = this._uvs = new Float32Array(groupCount * groupSize);\n\t\tfor (i=0, l=uvs.length; i<l; i+=groupSize) { uvs[i] = uvs[i+1] = 0; }\n\t\tgl.bufferData(gl.ARRAY_BUFFER, uvs, gl.DYNAMIC_DRAW);\n\t\tuvPositionBuffer.itemSize = groupSize;\n\t\tuvPositionBuffer.numItems = groupCount;\n\n\t\t// what texture it should use\n\t\tvar textureIndexBuffer = this._textureIndexBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, textureIndexBuffer);\n\t\tgroupSize = 1;\n\t\tvar indices = this._indices = new Float32Array(groupCount * groupSize);\n\t\tfor (i=0, l=indices.length; i<l; i++) { indices[i] = 0; }\n\t\tgl.bufferData(gl.ARRAY_BUFFER, indices, gl.DYNAMIC_DRAW);\n\t\ttextureIndexBuffer.itemSize = groupSize;\n\t\ttextureIndexBuffer.numItems = groupCount;\n\n\t\t// what alpha it should have\n\t\tvar alphaBuffer = this._alphaBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, alphaBuffer);\n\t\tgroupSize = 1;\n\t\tvar alphas = this._alphas = new Float32Array(groupCount * groupSize);\n\t\tfor (i=0, l=alphas.length; i<l; i++) { alphas[i] = 1; }\n\t\tgl.bufferData(gl.ARRAY_BUFFER, alphas, gl.DYNAMIC_DRAW);\n\t\talphaBuffer.itemSize = groupSize;\n\t\talphaBuffer.numItems = groupCount;\n\t};\n\n\t/**\n\t * Do all the setup steps for textures in the system.\n\t * @method _initTextures\n\t * @protected\n\t */\n\tp._initTextures = function () {\n\t\t//TODO: DHG: add a cleanup routine in here in case this happens mid stream\n\n\t\t// reset counters\n\t\tthis._lastTextureInsert = -1;\n\n\t\t// clear containers\n\t\tthis._textureDictionary = [];\n\t\tthis._textureIDs = {};\n\t\tthis._baseTextures = [];\n\t\tthis._batchTextures = [];\n\n\t\t// fill in blanks as it helps the renderer be stable while textures are loading and reduces need for safety code\n\t\tfor (var i=0; i<this._batchTextureCount;i++) {\n\t\t\tvar tex = this.getBaseTexture();\n\t\t\tthis._baseTextures[i] = this._batchTextures[i] = tex;\n\t\t\tif (!tex) {\n\t\t\t\tthrow \"Problems creating basic textures, known causes include using too much VRAM by not releasing WebGL texture instances\";\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Load a specific texture, accounting for potential delay, as it might not be preloaded.\n\t * @method _loadTextureImage\n\t * @param {WebGLRenderingContext} gl\n\t * @param {Image} image Actual image to be loaded\n\t * @return {WebGLTexture} The resulting Texture object\n\t * @protected\n\t */\n\tp._loadTextureImage = function (gl, image) {\n\t\tvar src = image.src;\n\n\t\tif (!src) {\n\t\t\t// one time canvas property setup\n\t\t\timage._isCanvas = true;\n\t\t\tsrc = image.src = \"canvas_\" + this._lastTrackedCanvas++;\n\t\t}\n\n\t\t// put the texture into our storage system\n\t\tvar storeID = this._textureIDs[src];\n\t\tif (storeID === undefined) {\n\t\t\tstoreID = this._textureIDs[src] = this._textureDictionary.length;\n\t\t}\n\t\tif (this._textureDictionary[storeID] === undefined) {\n\t\t\tthis._textureDictionary[storeID] = this.getBaseTexture();\n\t\t}\n\n\t\tvar texture = this._textureDictionary[storeID];\n\n\t\tif (texture) {\n\t\t\t// get texture params all set up\n\t\t\ttexture._batchID = this._batchID;\n\t\t\ttexture._storeID = storeID;\n\t\t\ttexture._imageData = image;\n\t\t\tthis._insertTextureInBatch(gl, texture);\n\n\t\t\t// get the data into the texture or wait for it to load\n\t\t\timage._storeID = storeID;\n\t\t\tif (image.complete || image.naturalWidth || image._isCanvas) {\t// is it already loaded\n\t\t\t\tthis._updateTextureImageData(gl, image);\n\t\t\t} else  {\n\t\t\t\timage.addEventListener(\"load\", this._updateTextureImageData.bind(this, gl, image));\n\t\t\t}\n\t\t} else {\n\t\t\t// we really really should have a texture, try to recover the error by using a saved empty texture so we don't crash\n\t\t\tvar msg = \"Problem creating desired texture, known causes include using too much VRAM by not releasing WebGL texture instances\";\n\t\t\t(console.error && console.error(msg)) || console.log(msg);\n\n\t\t\ttexture = this._baseTextures[0];\n\t\t\ttexture._batchID = this._batchID;\n\t\t\ttexture._storeID = -1;\n\t\t\ttexture._imageData = texture;\n\t\t\tthis._insertTextureInBatch(gl, texture);\n\t\t}\n\n\t\treturn texture;\n\t};\n\n\t/**\n\t * Necessary to upload the actual image data to the GPU. Without this the texture will be blank. Called automatically\n\t * in most cases due to loading and caching APIs. Flagging an image source with `_invalid = true` will trigger this\n\t * next time the image is rendered.\n\t * @param {WebGLRenderingContext} gl\n\t * @param {Image | Canvas} image The image data to be uploaded\n\t * @protected\n\t */\n\tp._updateTextureImageData = function (gl, image) {\n\t\t// the bitwise & is intentional, cheap exponent 2 check\n\t\tvar isNPOT = (image.width & image.width-1) || (image.height & image.height-1);\n\t\tvar texture = this._textureDictionary[image._storeID];\n\n\t\tgl.activeTexture(gl.TEXTURE0 + texture._activeIndex);\n\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\n\t\ttexture.isPOT = !isNPOT;\n\t\tthis.setTextureParams(gl, texture.isPOT);\n\n\t\ttry {\n\t\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n\t\t} catch(e) {\n\t\t\tvar errString = \"\\nAn error has occurred. This is most likely due to security restrictions on WebGL images with local or cross-domain origins\";\n\t\t\tif(console.error) {\n\t\t\t\t//TODO: LM: I recommend putting this into a log function internally, since you do it so often, and each is implemented differently.\n\t\t\t\tconsole.error(errString);\n\t\t\t\tconsole.error(e);\n\t\t\t} else if (console) {\n\t\t\t\tconsole.log(errString);\n\t\t\t\tconsole.log(e);\n\t\t\t}\n\t\t}\n\n\t\timage._invalid = false;\n\n\t\ttexture._w = image.width;\n\t\ttexture._h = image.height;\n\n\t\tif (this.vocalDebug) {\n\t\t\tif (isNPOT) {\n\t\t\t\tconsole.warn(\"NPOT(Non Power of Two) Texture: \"+ image.src);\n\t\t\t}\n\t\t\tif (image.width > gl.MAX_TEXTURE_SIZE || image.height > gl.MAX_TEXTURE_SIZE){\n\t\t\t\tconsole && console.error(\"Oversized Texture: \"+ image.width+\"x\"+image.height +\" vs \"+ gl.MAX_TEXTURE_SIZE +\"max\");\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Adds the texture to a spot in the current batch, forcing a draw if no spots are free.\n\t * @method _insertTextureInBatch\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param {WebGLTexture} texture The texture to be inserted.\n\t * @protected\n\t */\n\tp._insertTextureInBatch = function (gl, texture) {\n\t\t// if it wasn't used last batch\n\t\tif (this._batchTextures[texture._activeIndex] !== texture) {\n\t\t\t// we've got to find it a a spot.\n\t\t\tvar found = -1;\n\t\t\tvar start = (this._lastTextureInsert+1) % this._batchTextureCount;\n\t\t\tvar look = start;\n\t\t\tdo {\n\t\t\t\tif (this._batchTextures[look]._batchID != this._batchID && !this._slotBlacklist[look]) {\n\t\t\t\t\tfound = look;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlook = (look+1) % this._batchTextureCount;\n\t\t\t} while (look !== start);\n\n\t\t\t// we couldn't find anywhere for it go, meaning we're maxed out\n\t\t\tif (found === -1) {\n\t\t\t\tthis.batchReason = \"textureOverflow\";\n\t\t\t\tthis._drawBuffers(gl);\t\t// <------------------------------------------------------------------------\n\t\t\t\tthis.batchCardCount = 0;\n\t\t\t\tfound = start;\n\t\t\t}\n\n\t\t\t// lets put it into that spot\n\t\t\tthis._batchTextures[found] = texture;\n\t\t\ttexture._activeIndex = found;\n\t\t\tvar image = texture._imageData;\n\t\t\tif (image && image._invalid && texture._drawID !== undefined) {\n\t\t\t\tthis._updateTextureImageData(gl, image);\n\t\t\t} else {\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + found);\n\t\t\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\t\t\t\tthis.setTextureParams(gl);\n\t\t\t}\n\t\t\tthis._lastTextureInsert = found;\n\t\t} else {\n\t\t\tvar image = texture._imageData;\n\t\t\tif (texture._storeID != undefined && image && image._invalid) {\n\t\t\t\tthis._updateTextureImageData(gl, image);\n\t\t\t}\n\t\t}\n\n\t\ttexture._drawID = this._drawID;\n\t\ttexture._batchID = this._batchID;\n\t};\n\n\t/**\n\t * Remove and clean the texture, expects a texture and is inflexible. Mostly for internal use, recommended to call \n\t * {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}} instead as it will call this with the correct texture object(s).\n\t * Note: Testing shows this may not happen immediately, have to wait frames for WebGL to have actually adjust memory.\n\t * @method _killTextureObject\n\t * @param {Texture} tex The texture to be cleaned out\n\t * @protected\n\t */\n\tp._killTextureObject = function (tex) {\n\t\tif (!tex) { return; }\n\t\tvar gl = this._webGLContext;\n\n\t\t// remove linkage\n\t\tif (tex._storeID !== undefined && tex._storeID >= 0) {\n\t\t\tthis._textureDictionary[tex._storeID] = undefined;\n\t\t\tfor (var n in this._textureIDs) {\n\t\t\t\tif (this._textureIDs[n] == tex._storeID) { delete this._textureIDs[n]; }\n\t\t\t}\n\t\t\tif(tex._imageData) { tex._imageData._storeID = undefined; }\n\t\t\ttex._imageData = tex._storeID = undefined;\n\t\t}\n\n\t\t// make sure to drop it out of an active slot\n\t\tif (tex._activeIndex !== undefined && this._batchTextures[tex._activeIndex] === tex) {\n\t\t\tthis._batchTextures[tex._activeIndex] = this._baseTextures[tex._activeIndex];\n\t\t}\n\n\t\t// remove buffers if present\n\t\ttry {\n\t\t\tif (tex._frameBuffer) { gl.deleteFramebuffer(tex._frameBuffer); }\n\t\t\ttex._frameBuffer = undefined;\n\t\t} catch(e) {\n\t\t\t/* suppress delete errors because it's already gone or didn't need deleting probably */\n\t\t\tif (this.vocalDebug) { console.log(e); }\n\t\t}\n\n\t\t// remove entry\n\t\ttry {\n\t\t\tgl.deleteTexture(tex);\n\t\t} catch(e) {\n\t\t\t/* suppress delete errors because it's already gone or didn't need deleting probably */\n\t\t\tif (this.vocalDebug) { console.log(e); }\n\t\t}\n\t};\n\n\t/**\n\t * Store or restore current batch textures into a backup array\n\t * @method _backupBatchTextures\n\t * @param {Boolean} restore Perform a restore instead of a store.\n\t * @param {Array} [target=this._backupTextures] Where to perform the backup, defaults to internal backup.\n\t * @protected\n\t */\n\tp._backupBatchTextures = function (restore, target) {\n\t\tvar gl = this._webGLContext;\n\n\t\tif (!this._backupTextures) { this._backupTextures = []; }\n\t\tif (target === undefined) { target = this._backupTextures; }\n\n\t\tfor (var i=0; i<this._batchTextureCount; i++) {\n\t\t\tgl.activeTexture(gl.TEXTURE0 + i);\n\t\t\tif (restore) {\n\t\t\t\tthis._batchTextures[i] = target[i];\n\t\t\t} else {\n\t\t\t\ttarget[i] = this._batchTextures[i];\n\t\t\t\tthis._batchTextures[i] = this._baseTextures[i];\n\t\t\t}\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, this._batchTextures[i]);\n\t\t\tthis.setTextureParams(gl, this._batchTextures[i].isPOT);\n\t\t}\n\n\t\tif (restore && target === this._backupTextures) { this._backupTextures = []; }\n\t};\n\n\t/**\n\t * Begin the drawing process for a regular render.\n\t * @method _batchDraw\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param {Stage || Container} sceneGraph {{#crossLink \"Container\"}}{{/crossLink}} object with all that needs to rendered, preferably a Stage.\n\t * @param {Boolean} ignoreCache\n\t * @protected\n\t */\n\tp._batchDraw = function (sceneGraph, gl, ignoreCache) {\n\t\tif (this._isDrawing > 0) {\n\t\t\tthis._drawBuffers(gl);\n\t\t}\n\t\tthis._isDrawing++;\n\t\tthis._drawID++;\n\n\t\tthis.batchCardCount = 0;\n\t\tthis.depth = 0;\n\n\t\tthis._appendToBatchGroup(sceneGraph, gl, new createjs.Matrix2D(), this.alpha, ignoreCache);\n\n\t\tthis.batchReason = \"drawFinish\";\n\t\tthis._drawBuffers(gl);\t\t\t\t\t\t\t\t// <--------------------------------------------------------\n\t\tthis._isDrawing--;\n\t};\n\n\t/**\n\t * Perform the drawing process to fill a specific cache texture, including applying filters.\n\t * @method _cacheDraw\n\t * @param {DisplayObject} target The object we're drawing into the cache. For example, used for drawing the cache\n\t * (to prevent it from simply drawing an existing cache back into itself).\n\t * @param {Array} filters The filters we're drawing into cache.\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\n\t * @protected\n\t */\n\tp._cacheDraw = function (gl, target, filters, manager) {\n\t\t/*\n\t\tImplicitly there are 4 modes to this function: filtered-sameContext, filtered-uniqueContext, sameContext, uniqueContext.\n\t\tEach situation must be handled slightly differently as 'sameContext' or 'uniqueContext' define how the output works,\n\t\tone drawing directly into the main context and the other drawing into a stored renderTexture respectively.\n\t\tWhen the draw is a 'filtered' draw, the filters are applied sequentially and will draw into saved textures repeatedly.\n\t\tOnce the final filter is done the final output is treated depending upon whether it is a same or unique context.\n\t\tThe internal complexity comes from reducing over-draw, shared code, and issues like textures needing to be flipped\n\t\tsometimes when written to render textures.\n\t\t*/\n\t\tvar renderTexture;\n\t\tvar shaderBackup = this._activeShader;\n\t\tvar blackListBackup = this._slotBlacklist;\n\t\tvar lastTextureSlot = this._maxTextureSlots-1;\n\t\tvar wBackup = this._viewportWidth, hBackup = this._viewportHeight;\n\n\t\t// protect the last slot so that we have somewhere to bind the renderTextures so it doesn't get upset\n\t\tthis.protectTextureSlot(lastTextureSlot, true);\n\n\t\t// create offset container for drawing item\n\t\tvar mtx = target.getMatrix();\n\t\tmtx = mtx.clone();\n\t\tmtx.scale(1/manager.scale, 1/manager.scale);\n\t\tmtx = mtx.invert();\n\t\tmtx.translate(-manager.offX/manager.scale*target.scaleX, -manager.offY/manager.scale*target.scaleY);\n\t\tvar container = this._cacheContainer;\n\t\tcontainer.children = [target];\n\t\tcontainer.transformMatrix = mtx;\n\n\t\tthis._backupBatchTextures(false);\n\n\t\tif (filters && filters.length) {\n\t\t\tthis._drawFilters(target, filters, manager);\n\t\t} else {\n\t\t\t// is this for another stage or mine?\n\t\t\tif (this.isCacheControlled) {\n\t\t\t\t// draw item to canvas\t\t\t\tI -> C\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\t\tthis._batchDraw(container, gl, true);\n\t\t\t} else {\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\n\t\t\t\ttarget.cacheCanvas = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\n\t\t\t\trenderTexture = target.cacheCanvas;\n\n\t\t\t\t// draw item to render texture\t\tI -> T\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\n\t\t\t\tthis.updateViewport(manager._drawWidth, manager._drawHeight);\n\t\t\t\tthis._projectionMatrix = this._projectionMatrixFlip;\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\t\tthis._batchDraw(container, gl, true);\n\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\t\t\tthis.updateViewport(wBackup, hBackup);\n\t\t\t}\n\t\t}\n\n\t\tthis._backupBatchTextures(true);\n\n\t\tthis.protectTextureSlot(lastTextureSlot, false);\n\t\tthis._activeShader = shaderBackup;\n\t\tthis._slotBlacklist = blackListBackup;\n\t};\n\n\t/**\n\t * Sub portion of _cacheDraw, split off for readability. Do not call independently.\n\t * @method _drawFilters\n\t * @param {DisplayObject} target The object we're drawing with a filter.\n\t * @param {Array} filters The filters we're drawing into cache.\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\n\t */\n\tp._drawFilters = function (target, filters, manager) {\n\t\tvar gl = this._webGLContext;\n\t\tvar renderTexture;\n\t\tvar lastTextureSlot = this._maxTextureSlots-1;\n\t\tvar wBackup = this._viewportWidth, hBackup = this._viewportHeight;\n\n\t\tvar container = this._cacheContainer;\n\t\tvar filterCount = filters.length;\n\n\t\t// we don't know which texture slot we're dealing with previously and we need one out of the way\n\t\t// once we're using that slot activate it so when we make and bind our RenderTexture it's safe there\n\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\n\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\n\n\t\t// draw item to render texture\t\tI -> T\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\n\t\tthis.updateViewport(manager._drawWidth, manager._drawHeight);\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\tthis._batchDraw(container, gl, true);\n\n\t\t// bind the result texture to slot 0 as all filters and cover draws assume original content is in slot 0\n\t\tgl.activeTexture(gl.TEXTURE0);\n\t\tgl.bindTexture(gl.TEXTURE_2D, renderTexture);\n\t\tthis.setTextureParams(gl);\n\n\t\tvar flipY = false;\n\t\tvar i = 0, filter = filters[i];\n\t\tdo { // this is safe because we wouldn't be in apply filters without a filter count of at least 1\n\n\t\t\t// swap to correct shader\n\t\t\tthis._activeShader = this.getFilterShader(filter);\n\t\t\tif (!this._activeShader) { continue; }\n\n\t\t\t// now the old result is stored in slot 0, make a new render texture\n\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\n\t\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\n\n\t\t\t// draw result to render texture\tR -> T\n\t\t\tgl.viewport(0, 0, manager._drawWidth, manager._drawHeight);\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\tthis._drawCover(gl, flipY);\n\n\t\t\t// bind the result texture to slot 0 as all filters and cover draws assume original content is in slot 0\n\t\t\tgl.activeTexture(gl.TEXTURE0);\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, renderTexture);\n\t\t\tthis.setTextureParams(gl);\n\n\t\t\t// use flipping to keep things upright, things already cancel out on a single filter\n\t\t\t// this needs to be here as multiPass is not accurate to _this_ frame until after shader acquisition\n\t\t\tif (filterCount > 1 || filters[0]._multiPass) {\n\t\t\t\tflipY = !flipY;\n\t\t\t}\n\n\t\t\t// work through the multipass if it's there, otherwise move on\n\t\t\tfilter = filter._multiPass !== null ? filter._multiPass : filters[++i];\n\t\t} while (filter);\n\n\t\t// is this for another stage or mine\n\t\tif (this.isCacheControlled) {\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\t\tthis.updateViewport(wBackup, hBackup);\n\n\t\t\t// draw result to canvas\t\t\tR -> C\n\t\t\tthis._activeShader = this.getFilterShader(this);\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\tthis._drawCover(gl, flipY);\n\t\t} else {\n\t\t\t//TODO: DHG: this is less than ideal. A flipped initial render for this circumstance might help. Adjust the perspective matrix?\n\t\t\tif (flipY) {\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\n\t\t\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\n\n\t\t\t\tthis._activeShader = this.getFilterShader(this);\n\t\t\t\tgl.viewport(0, 0, manager._drawWidth, manager._drawHeight);\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\t\tthis._drawCover(gl, !flipY);\n\t\t\t}\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\t\tthis.updateViewport(wBackup, hBackup);\n\n\t\t\t// make sure the last texture is the active thing to draw\n\t\t\ttarget.cacheCanvas = renderTexture;\n\t\t}\n\t};\n\n\t/**\n\t * Add all the contents of a container to the pending buffers, called recursively on each container. This may\n\t * trigger a draw if a buffer runs out of space. This is the main workforce of the render loop.\n\t * @method _appendToBatchGroup\n\t * @param {Container} container The {{#crossLink \"Container\"}}{{/crossLink}} that contains everything to be drawn.\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param {Matrix2D} concatMtx The effective (concatenated) transformation matrix when beginning this container\n\t * @param {Number} concatAlpha The effective (concatenated) alpha when beginning this container\n\t * @param {Boolean} ignoreCache Don't use an element's cache during this draw\n\t * @protected\n\t */\n\tp._appendToBatchGroup = function (container, gl, concatMtx, concatAlpha, ignoreCache) {\n\t\t// sort out shared properties\n\t\tif (!container._glMtx) { container._glMtx = new createjs.Matrix2D(); }\n\t\tvar cMtx = container._glMtx;\n\t\tcMtx.copy(concatMtx);\n\t\tif (container.transformMatrix) {\n\t\t\tcMtx.appendMatrix(container.transformMatrix);\n\t\t} else {\n\t\t\tcMtx.appendTransform(\n\t\t\t\tcontainer.x, container.y,\n\t\t\t\tcontainer.scaleX, container.scaleY,\n\t\t\t\tcontainer.rotation, container.skewX, container.skewY,\n\t\t\t\tcontainer.regX, container.regY\n\t\t\t);\n\t\t}\n\n\t\t// sub components of figuring out the position an object holds\n\t\tvar subL, subT, subR, subB;\n\n\t\t// actually apply its data to the buffers\n\t\tvar l = container.children.length;\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tvar item = container.children[i];\n\n\t\t\tif (!(item.visible && concatAlpha)) { continue; }\n\t\t\tif (!item.cacheCanvas || ignoreCache) {\n\t\t\t\tif (item._updateState){\n\t\t\t\t\titem._updateState();\n\t\t\t\t}\n\t\t\t\tif (item.children) {\n\t\t\t\t\tthis._appendToBatchGroup(item, gl, cMtx, item.alpha * concatAlpha);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check for overflowing batch, if yes then force a render\n\t\t\t// TODO: DHG: consider making this polygon count dependant for things like vector draws\n\t\t\tif (this.batchCardCount+1 > this._maxCardsPerBatch) {\n\t\t\t\tthis.batchReason = \"vertexOverflow\";\n\t\t\t\tthis._drawBuffers(gl);\t\t\t\t\t// <------------------------------------------------------------\n\t\t\t\tthis.batchCardCount = 0;\n\t\t\t}\n\n\t\t\t// keep track of concatenated position\n\t\t\tif (!item._glMtx) { item._glMtx = new createjs.Matrix2D(); }\n\t\t\tvar iMtx = item._glMtx;\n\t\t\tiMtx.copy(cMtx);\n\t\t\tif (item.transformMatrix) {\n\t\t\t\tiMtx.appendMatrix(item.transformMatrix);\n\t\t\t} else {\n\t\t\t\tiMtx.appendTransform(\n\t\t\t\t\titem.x, item.y,\n\t\t\t\t\titem.scaleX, item.scaleY,\n\t\t\t\t\titem.rotation, item.skewX, item.skewY,\n\t\t\t\t\titem.regX, item.regY\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tvar uvRect, texIndex, image, frame, texture, src;\n\t\t\tvar useCache = item.cacheCanvas && !ignoreCache;\n\n\t\t\tif (item._webGLRenderStyle === 2 || useCache) {\t\t\t// BITMAP / Cached Canvas\n\t\t\t\timage = (ignoreCache?false:item.cacheCanvas) || item.image;\n\t\t\t} else if (item._webGLRenderStyle === 1) {\t\t\t\t\t\t\t\t\t\t\t// SPRITE\n\t\t\t\tframe = item.spriteSheet.getFrame(item.currentFrame);\t//TODO: Faster way?\n\t\t\t\tif (frame === null) { continue; }\n\t\t\t\timage = frame.image;\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MISC (DOM objects render themselves later)\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar uvs = this._uvs;\n\t\t\tvar vertices = this._vertices;\n\t\t\tvar texI = this._indices;\n\t\t\tvar alphas = this._alphas;\n\n\t\t\t// calculate texture\n\t\t\tif (!image) { continue; }\n\t\t\tif (image._storeID === undefined) {\n\t\t\t\t// this texture is new to us so load it and add it to the batch\n\t\t\t\ttexture = this._loadTextureImage(gl, image);\n\t\t\t\tthis._insertTextureInBatch(gl, texture);\n\t\t\t} else {\n\t\t\t\t// fetch the texture (render textures know how to look themselves up to simplify this logic)\n\t\t\t\ttexture = this._textureDictionary[image._storeID];\n\t\t\t\tif (!texture){\n\t\t\t\t\tif (this.vocalDebug){ console.log(\"Texture should not be looked up while not being stored.\"); }\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// put it in the batch if needed\n\t\t\t\tif (texture._batchID !== this._batchID) {\n\t\t\t\t\tthis._insertTextureInBatch(gl, texture);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttexIndex = texture._activeIndex;\n\n\t\t\tif (item._webGLRenderStyle === 2 || useCache) {\t\t\t// BITMAP / Cached Canvas\n\t\t\t\tif (!useCache && item.sourceRect) {\n\t\t\t\t\t// calculate uvs\n\t\t\t\t\tif (!item._uvRect) { item._uvRect = {}; }\n\t\t\t\t\tsrc = item.sourceRect;\n\t\t\t\t\tuvRect = item._uvRect;\n\t\t\t\t\tuvRect.t = (src.y)/image.height;\n\t\t\t\t\tuvRect.l = (src.x)/image.width;\n\t\t\t\t\tuvRect.b = (src.y + src.height)/image.height;\n\t\t\t\t\tuvRect.r = (src.x + src.width)/image.width;\n\n\t\t\t\t\t// calculate vertices\n\t\t\t\t\tsubL = 0;\t\t\t\t\t\t\tsubT = 0;\n\t\t\t\t\tsubR = src.width+subL;\t\t\t\tsubB = src.height+subT;\n\t\t\t\t} else {\n\t\t\t\t\t// calculate uvs\n\t\t\t\t\tuvRect = StageGL.UV_RECT;\n\t\t\t\t\t// calculate vertices\n\t\t\t\t\tif (useCache) {\n\t\t\t\t\t\tsrc = item.bitmapCache;\n\t\t\t\t\t\tsubL = src.x+(src._filterOffX/src.scale);\tsubT = src.y+(src._filterOffY/src.scale);\n\t\t\t\t\t\tsubR = (src._drawWidth/src.scale)+subL;\t\tsubB = (src._drawHeight/src.scale)+subT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsubL = 0;\t\t\t\t\t\tsubT = 0;\n\t\t\t\t\t\tsubR = image.width+subL;\t\tsubB = image.height+subT;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (item._webGLRenderStyle === 1) {\t\t\t\t\t\t\t\t\t\t\t// SPRITE\n\t\t\t\tvar rect = frame.rect;\n\n\t\t\t\t// calculate uvs\n\t\t\t\tuvRect = frame.uvRect;\n\t\t\t\tif (!uvRect) {\n\t\t\t\t\tuvRect = StageGL.buildUVRects(item.spriteSheet, item.currentFrame, false);\n\t\t\t\t}\n\n\t\t\t\t// calculate vertices\n\t\t\t\tsubL = -frame.regX;\t\t\t\t\t\t\t\tsubT = -frame.regY;\n\t\t\t\tsubR = rect.width-frame.regX;\t\t\t\t\tsubB = rect.height-frame.regY;\n\t\t\t}\n\n\t\t\t// These must be calculated here else a forced draw might happen after they're set\n\t\t\tvar offV1 = this.batchCardCount*StageGL.INDICIES_PER_CARD;\t\t// offset for 1 component vectors\n\t\t\tvar offV2 = offV1*2;\t\t\t\t\t\t\t\t\t\t\t// offset for 2 component vectors\n\n\t\t\t//DHG: See Matrix2D.transformPoint for why this math specifically\n\t\t\t// apply vertices\n\t\t\tvertices[offV2] =\t\tsubL *iMtx.a + subT *iMtx.c +iMtx.tx;\t\tvertices[offV2+1] =\t\tsubL *iMtx.b + subT *iMtx.d +iMtx.ty;\n\t\t\tvertices[offV2+2] =\t\tsubL *iMtx.a + subB *iMtx.c +iMtx.tx;\t\tvertices[offV2+3] =\t\tsubL *iMtx.b + subB *iMtx.d +iMtx.ty;\n\t\t\tvertices[offV2+4] =\t\tsubR *iMtx.a + subT *iMtx.c +iMtx.tx;\t\tvertices[offV2+5] =\t\tsubR *iMtx.b + subT *iMtx.d +iMtx.ty;\n\t\t\tvertices[offV2+6] =\t\tvertices[offV2+2];\t\t\t\t\t\t\tvertices[offV2+7] =\t\tvertices[offV2+3];\n\t\t\tvertices[offV2+8] =\t\tvertices[offV2+4];\t\t\t\t\t\t\tvertices[offV2+9] =\t\tvertices[offV2+5];\n\t\t\tvertices[offV2+10] =\tsubR *iMtx.a + subB *iMtx.c +iMtx.tx;\t\tvertices[offV2+11] =\tsubR *iMtx.b + subB *iMtx.d +iMtx.ty;\n\n\t\t\t// apply uvs\n\t\t\tuvs[offV2] =\tuvRect.l;\t\t\tuvs[offV2+1] =\tuvRect.t;\n\t\t\tuvs[offV2+2] =\tuvRect.l;\t\t\tuvs[offV2+3] =\tuvRect.b;\n\t\t\tuvs[offV2+4] =\tuvRect.r;\t\t\tuvs[offV2+5] =\tuvRect.t;\n\t\t\tuvs[offV2+6] =\tuvRect.l;\t\t\tuvs[offV2+7] =\tuvRect.b;\n\t\t\tuvs[offV2+8] =\tuvRect.r;\t\t\tuvs[offV2+9] =\tuvRect.t;\n\t\t\tuvs[offV2+10] =\tuvRect.r;\t\t\tuvs[offV2+11] =\tuvRect.b;\n\n\t\t\t// apply texture\n\t\t\ttexI[offV1] = texI[offV1+1] = texI[offV1+2] = texI[offV1+3] = texI[offV1+4] = texI[offV1+5] = texIndex;\n\n\t\t\t// apply alpha\n\t\t\talphas[offV1] = alphas[offV1+1] = alphas[offV1+2] = alphas[offV1+3] = alphas[offV1+4] = alphas[offV1+5] = item.alpha * concatAlpha;\n\n\t\t\tthis.batchCardCount++;\n\t\t}\n\t};\n\n\t/**\n\t * Draws all the currently defined cards in the buffer to the render surface.\n\t * @method _drawBuffers\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @protected\n\t */\n\tp._drawBuffers = function (gl) {\n\t\tif (this.batchCardCount <= 0) { return; }\t// prevents error logs on stages filled with un-renederable content.\n\n\t\tif (this.vocalDebug) {\n\t\t\tconsole.log(\"Draw[\"+ this._drawID +\":\"+ this._batchID +\"] : \"+ this.batchReason);\n\t\t}\n\t\tvar shaderProgram = this._activeShader;\n\t\tvar vertexPositionBuffer = this._vertexPositionBuffer;\n\t\tvar textureIndexBuffer = this._textureIndexBuffer;\n\t\tvar uvPositionBuffer = this._uvPositionBuffer;\n\t\tvar alphaBuffer = this._alphaBuffer;\n\n\t\tgl.useProgram(shaderProgram);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._vertices);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, textureIndexBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.textureIndexAttribute, textureIndexBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._indices);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, uvPositionBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.uvPositionAttribute, uvPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._uvs);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, alphaBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.alphaAttribute, alphaBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._alphas);\n\n\t\tgl.uniformMatrix4fv(shaderProgram.pMatrixUniform, gl.FALSE, this._projectionMatrix);\n\n\t\tfor (var i = 0; i < this._batchTextureCount; i++) {\n\t\t\tvar texture = this._batchTextures[i];\n\t\t\tgl.activeTexture(gl.TEXTURE0 + i);\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\t\t\tthis.setTextureParams(gl, texture.isPOT);\n\t\t}\n\n\t\tgl.drawArrays(gl.TRIANGLES, 0, this.batchCardCount*StageGL.INDICIES_PER_CARD);\n\t\tthis._batchID++;\n\t};\n\n\t/**\n\t * Draws a card that covers the entire render surface. Mainly used for filters.\n\t * @method _drawBuffers\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\n\t * @param {Boolean} flipY Covers are used for things like RenderTextures and because of 3D vs Canvas space this can\n\t * end up meaning the `y` space sometimes requires flipping in the render.\n\t * @protected\n\t */\n\tp._drawCover = function (gl, flipY) {\n\t\tif (this._isDrawing > 0) {\n\t\t\tthis._drawBuffers(gl);\n\t\t}\n\n\t\tif (this.vocalDebug) {\n\t\t\tconsole.log(\"Draw[\"+ this._drawID +\":\"+ this._batchID +\"] : \"+ \"Cover\");\n\t\t}\n\t\tvar shaderProgram = this._activeShader;\n\t\tvar vertexPositionBuffer = this._vertexPositionBuffer;\n\t\tvar uvPositionBuffer = this._uvPositionBuffer;\n\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\tgl.useProgram(shaderProgram);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, StageGL.COVER_VERT);\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, uvPositionBuffer);\n\t\tgl.vertexAttribPointer(shaderProgram.uvPositionAttribute, uvPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, flipY?StageGL.COVER_UV_FLIP:StageGL.COVER_UV);\n\n\t\tgl.uniform1i(shaderProgram.samplerUniform, 0);\n\t\tgl.uniform1f(shaderProgram.uprightUniform, flipY?0:1);\n\n\t\tgl.drawArrays(gl.TRIANGLES, 0, StageGL.INDICIES_PER_CARD);\n\t};\n\n\tcreatejs.StageGL = createjs.promote(StageGL, \"Stage\");\n}());\n\n//##############################################################################\n// Bitmap.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\n\t/**\n\t * A Bitmap represents an Image, Canvas, or Video in the display list. A Bitmap can be instantiated using an existing\n\t * HTML element, or a string.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \tvar bitmap = new createjs.Bitmap(\"imagePath.jpg\");\n\t *\n\t * <strong>Notes:</strong>\n\t * <ol>\n\t * \t<li>When using a video source that may loop or seek, use a {{#crossLink \"VideoBuffer\"}}{{/crossLink}} object to\n\t * \t prevent blinking / flashing.\n\t * \t<li>When a string path or image tag that is not yet loaded is used, the stage may need to be redrawn before it\n\t * \t will be displayed.</li>\n\t * \t<li>Bitmaps with an SVG source currently will not respect an alpha value other than 0 or 1. To get around this,\n\t * \tthe Bitmap can be cached.</li>\n\t * \t<li>Bitmaps with an SVG source will taint the canvas with cross-origin data, which prevents interactivity. This\n\t * \thappens in all browsers except recent Firefox builds.</li>\n\t * \t<li>Images loaded cross-origin will throw cross-origin security errors when interacted with using a mouse, using\n\t * \tmethods such as `getObjectUnderPoint`, or using filters, or caching. You can get around this by setting\n\t * \t`crossOrigin` flags on your images before passing them to EaselJS, eg: `img.crossOrigin=\"Anonymous\";`</li>\n\t * </ol>\n\t *\n\t * @class Bitmap\n\t * @extends DisplayObject\n\t * @constructor\n\t * @param {CanvasImageSource | String | Object} imageOrUri The source image to display. This can be a CanvasImageSource\n\t * (image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\n\t * If the latter, a new Image instance with the URL as its src will be used.\n\t **/\n\tfunction Bitmap(imageOrUri) {\n\t\tthis.DisplayObject_constructor();\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The source image to display. This can be a CanvasImageSource\n\t\t * (image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\n\t\t * If the latter, a new Image instance with the URL as its src will be used.\n\t\t * @property image\n\t\t * @type CanvasImageSource | Object\n\t\t **/\n\t\tif (typeof imageOrUri == \"string\") {\n\t\t\tthis.image = document.createElement(\"img\");\n\t\t\tthis.image.src = imageOrUri;\n\t\t} else {\n\t\t\tthis.image = imageOrUri;\n\t\t}\n\t\n\t\t/**\n\t\t * Specifies an area of the source image to draw. If omitted, the whole image will be drawn.\n\t\t * Notes:\n\t\t * <ul>\n\t\t *     <li>that video sources must have a width / height set to work correctly with `sourceRect`</li>\n\t\t *     <li>Cached objects will ignore the `sourceRect` property</li>\n\t\t * </ul>\n\t\t * @property sourceRect\n\t\t * @type Rectangle\n\t\t * @default null\n\t\t */\n\t\tthis.sourceRect = null;\n\n\t// private properties:\n\t\t/**\n\t\t * Docced in superclass.\n\t\t */\n\t\tthis._webGLRenderStyle = createjs.DisplayObject._StageGL_BITMAP;\n\t}\n\tvar p = createjs.extend(Bitmap, createjs.DisplayObject);\n\t\n\t\n// public methods:\n\t/**\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\n\t * @method initialize\n\t * @deprecated in favour of `createjs.promote()`\n\t **/\n\tp.initialize = Bitmap; // TODO: deprecated.\n\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\tvar image = this.image;\n\t\tvar hasContent = this.cacheCanvas || (image && (image.naturalWidth || image.getContext || image.readyState >= 2));\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\n\t};\n\n\t/**\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t *\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\n\t * into itself).\n\t * @return {Boolean}\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\n\t\tvar img = this.image, rect = this.sourceRect;\n\t\tif (img.getImage) { img = img.getImage(); }\n\t\tif (!img) { return true; }\n\t\tif (rect) {\n\t\t\t// some browsers choke on out of bound values, so we'll fix them:\n\t\t\tvar x1 = rect.x, y1 = rect.y, x2 = x1 + rect.width, y2 = y1 + rect.height, x = 0, y = 0, w = img.width, h = img.height;\n\t\t\tif (x1 < 0) { x -= x1; x1 = 0; }\n\t\t\tif (x2 > w) { x2 = w; }\n\t\t\tif (y1 < 0) { y -= y1; y1 = 0; }\n\t\t\tif (y2 > h) { y2 = h; }\n\t\t\tctx.drawImage(img, x1, y1, x2-x1, y2-y1, x, y, x2-x1, y2-y1);\n\t\t} else {\n\t\t\tctx.drawImage(img, 0, 0);\n\t\t}\n\t\treturn true;\n\t};\n\t\n\t//Note, the doc sections below document using the specified APIs (from DisplayObject)  from\n\t//Bitmap. This is why they have no method implementations.\n\t\n\t/**\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\n\t * You should <b>not</b> cache Bitmap instances as it can degrade performance.\n\t *\n\t * <strong>However: If you want to use a filter on a Bitmap, you <em>MUST</em> cache it, or it will not work.</strong>\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\n\t * method.\n\t * @method cache\n\t **/\n\t\n\t/**\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\n\t * You should <b>not</b> cache Bitmap instances as it can degrade performance.\n\t *\n\t * <strong>However: If you want to use a filter on a Bitmap, you <em>MUST</em> cache it, or it will not work.</strong>\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\n\t * method.\n\t * @method updateCache\n\t **/\n\t\n\t/**\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\n\t * You should <b>not</b> cache Bitmap instances as it can degrade performance.\n\t *\n\t * <strong>However: If you want to use a filter on a Bitmap, you <em>MUST</em> cache it, or it will not work.</strong>\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\n\t * method.\n\t * @method uncache\n\t **/\n\n\t/**\n\t * Docced in superclass.\n\t */\n\tp.getBounds = function() {\n\t\tvar rect = this.DisplayObject_getBounds();\n\t\tif (rect) { return rect; }\n\t\tvar image = this.image, o = this.sourceRect || image;\n\t\tvar hasContent = (image && (image.naturalWidth || image.getContext || image.readyState >= 2));\n\t\treturn hasContent ? this._rectangle.setValues(0, 0, o.width, o.height) : null;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Bitmap instance.\n\t * @method clone\n\t * @param {Boolean} node Whether the underlying dom element should be cloned as well.\n\t * @return {Bitmap} a clone of the Bitmap instance.\n\t **/\n\tp.clone = function(node) {\n\t\tvar image = this.image;\n\t\tif(image && node){ image = image.cloneNode(); }\n\t\tvar o = new Bitmap(image);\n\t\tif (this.sourceRect) { o.sourceRect = this.sourceRect.clone(); }\n\t\tthis._cloneProps(o);\n\t\treturn o;\n\t};\n\t\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Bitmap (name=\"+  this.name +\")]\";\n\t};\n\n\t\n\tcreatejs.Bitmap = createjs.promote(Bitmap, \"DisplayObject\");\n}());\n\n//##############################################################################\n// Sprite.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Displays a frame or sequence of frames (ie. an animation) from a SpriteSheet instance. A sprite sheet is a series of\n\t * images (usually animation frames) combined into a single image. For example, an animation consisting of 8 100x100\n\t * images could be combined into a 400x200 sprite sheet (4 frames across by 2 high). You can display individual frames,\n\t * play frames as an animation, and even sequence animations together.\n\t *\n\t * See the {{#crossLink \"SpriteSheet\"}}{{/crossLink}} class for more information on setting up frames and animations.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var instance = new createjs.Sprite(spriteSheet);\n\t *      instance.gotoAndStop(\"frameName\");\n\t *\n\t * Until {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}} is called,\n\t * only the first defined frame defined in the sprite sheet will be displayed.\n\t *\n\t * @class Sprite\n\t * @extends DisplayObject\n\t * @constructor\n\t * @param {SpriteSheet} spriteSheet The SpriteSheet instance to play back. This includes the source image(s), frame\n\t * dimensions, and frame data. See {{#crossLink \"SpriteSheet\"}}{{/crossLink}} for more information.\n\t * @param {String|Number} [frameOrAnimation] The frame number or animation to play initially.\n\t **/\n\tfunction Sprite(spriteSheet, frameOrAnimation) {\n\t\tthis.DisplayObject_constructor();\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The frame index that will be drawn when draw is called. Note that with some {{#crossLink \"SpriteSheet\"}}{{/crossLink}}\n\t\t * definitions, this will advance non-sequentially. This will always be an integer value.\n\t\t * @property currentFrame\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @readonly\n\t\t **/\n\t\tthis.currentFrame = 0;\n\t\n\t\t/**\n\t\t * Returns the name of the currently playing animation.\n\t\t * @property currentAnimation\n\t\t * @type {String}\n\t\t * @final\n\t\t * @readonly\n\t\t **/\n\t\tthis.currentAnimation = null;\n\t\n\t\t/**\n\t\t * Prevents the animation from advancing each tick automatically. For example, you could create a sprite\n\t\t * sheet of icons, set paused to true, and display the appropriate icon by setting <code>currentFrame</code>.\n\t\t * @property paused\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t **/\n\t\tthis.paused = true;\n\t\n\t\t/**\n\t\t * The SpriteSheet instance to play back. This includes the source image, frame dimensions, and frame\n\t\t * data. See {{#crossLink \"SpriteSheet\"}}{{/crossLink}} for more information.\n\t\t * @property spriteSheet\n\t\t * @type {SpriteSheet}\n\t\t * @readonly\n\t\t **/\n\t\tthis.spriteSheet = spriteSheet;\n\t\n\t\t/**\n\t\t * Specifies the current frame index within the currently playing animation. When playing normally, this will increase\n\t\t * from 0 to n-1, where n is the number of frames in the current animation.\n\t\t *\n\t\t * This could be a non-integer value if\n\t\t * using time-based playback (see {{#crossLink \"Sprite/framerate\"}}{{/crossLink}}, or if the animation's speed is\n\t\t * not an integer.\n\t\t * @property currentAnimationFrame\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.currentAnimationFrame = 0;\n\t\n\t\t/**\n\t\t * By default Sprite instances advance one frame per tick. Specifying a framerate for the Sprite (or its related\n\t\t * SpriteSheet) will cause it to advance based on elapsed time between ticks as appropriate to maintain the target\n\t\t * framerate.\n\t\t *\n\t\t * For example, if a Sprite with a framerate of 10 is placed on a Stage being updated at 40fps, then the Sprite will\n\t\t * advance roughly one frame every 4 ticks. This will not be exact, because the time between each tick will\n\t\t * vary slightly between frames.\n\t\t *\n\t\t * This feature is dependent on the tick event object (or an object with an appropriate \"delta\" property) being\n\t\t * passed into {{#crossLink \"Stage/update\"}}{{/crossLink}}.\n\t\t * @property framerate\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.framerate = 0;\n\t\n\t\n\t// private properties:\n\t\t/**\n\t\t * Current animation object.\n\t\t * @property _animation\n\t\t * @protected\n\t\t * @type {Object}\n\t\t * @default null\n\t\t **/\n\t\tthis._animation = null;\n\t\n\t\t/**\n\t\t * Current frame index.\n\t\t * @property _currentFrame\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default null\n\t\t **/\n\t\tthis._currentFrame = null;\n\t\t\n\t\t/**\n\t\t * Skips the next auto advance. Used by gotoAndPlay to avoid immediately jumping to the next frame\n\t\t * @property _skipAdvance\n\t\t * @protected\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t **/\n\t\tthis._skipAdvance = false;\n\n\t\t/**\n\t\t * Docced in superclass.\n\t\t */\n\t\tthis._webGLRenderStyle = createjs.DisplayObject._StageGL_SPRITE;\n\n\t\tif (frameOrAnimation != null) { this.gotoAndPlay(frameOrAnimation); }\n\t}\n\tvar p = createjs.extend(Sprite, createjs.DisplayObject);\n\n\t/**\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\n\t * @method initialize\n\t * @deprecated in favour of `createjs.promote()`\n\t **/\n\tp.initialize = Sprite; // TODO: Deprecated. This is for backwards support of Flash/Animate spritesheet export.\n\n\n// events:\n\t/**\n\t * Dispatched when an animation reaches its ends.\n\t * @event animationend\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {String} name The name of the animation that just ended.\n\t * @param {String} next The name of the next animation that will be played, or null. This will be the same as name if the animation is looping.\n\t * @since 0.6.0\n\t */\n\t \n\t/**\n\t * Dispatched any time the current frame changes. For example, this could be due to automatic advancement on a tick,\n\t * or calling gotoAndPlay() or gotoAndStop().\n\t * @event change\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t */\n\n\n// public methods:\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\tvar hasContent = this.cacheCanvas || this.spriteSheet.complete;\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\n\t};\n\n\t/**\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\n\t * into itself).\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\n\t\tthis._normalizeFrame();\n\t\tvar o = this.spriteSheet.getFrame(this._currentFrame|0);\n\t\tif (!o) { return false; }\n\t\tvar rect = o.rect;\n\t\tif (rect.width && rect.height) { ctx.drawImage(o.image, rect.x, rect.y, rect.width, rect.height, -o.regX, -o.regY, rect.width, rect.height); }\n\t\treturn true;\n\t};\n\n\t//Note, the doc sections below document using the specified APIs (from DisplayObject)  from\n\t//Bitmap. This is why they have no method implementations.\n\n\t/**\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\n\t * You should not cache Sprite instances as it can degrade performance.\n\t * @method cache\n\t **/\n\n\t/**\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\n\t * You should not cache Sprite instances as it can degrade performance.\n\t * @method updateCache\n\t **/\n\n\t/**\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\n\t * You should not cache Sprite instances as it can degrade performance.\n\t * @method uncache\n\t **/\n\n\t/**\n\t * Play (unpause) the current animation. The Sprite will be paused if either {{#crossLink \"Sprite/stop\"}}{{/crossLink}}\n\t * or {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} is called. Single frame animations will remain\n\t * unchanged.\n\t * @method play\n\t **/\n\tp.play = function() {\n\t\tthis.paused = false;\n\t};\n\n\t/**\n\t * Stop playing a running animation. The Sprite will be playing if {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}}\n\t * is called. Note that calling {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}} or {{#crossLink \"Sprite/play\"}}{{/crossLink}}\n\t * will resume playback.\n\t * @method stop\n\t **/\n\tp.stop = function() {\n\t\tthis.paused = true;\n\t};\n\n\t/**\n\t * Sets paused to false and plays the specified animation name, named frame, or frame number.\n\t * @method gotoAndPlay\n\t * @param {String|Number} frameOrAnimation The frame number or animation name that the playhead should move to\n\t * and begin playing.\n\t **/\n\tp.gotoAndPlay = function(frameOrAnimation) {\n\t\tthis.paused = false;\n\t\tthis._skipAdvance = true;\n\t\tthis._goto(frameOrAnimation);\n\t};\n\n\t/**\n\t * Sets paused to true and seeks to the specified animation name, named frame, or frame number.\n\t * @method gotoAndStop\n\t * @param {String|Number} frameOrAnimation The frame number or animation name that the playhead should move to\n\t * and stop.\n\t **/\n\tp.gotoAndStop = function(frameOrAnimation) {\n\t\tthis.paused = true;\n\t\tthis._goto(frameOrAnimation);\n\t};\n\n\t/**\n\t * Advances the playhead. This occurs automatically each tick by default.\n\t * @param [time] {Number} The amount of time in ms to advance by. Only applicable if framerate is set on the Sprite\n\t * or its SpriteSheet.\n\t * @method advance\n\t*/\n\tp.advance = function(time) {\n\t\tvar fps = this.framerate || this.spriteSheet.framerate;\n\t\tvar t = (fps && time != null) ? time/(1000/fps) : 1;\n\t\tthis._normalizeFrame(t);\n\t};\n\t\n\t/**\n\t * Returns a {{#crossLink \"Rectangle\"}}{{/crossLink}} instance defining the bounds of the current frame relative to\n\t * the origin. For example, a 90 x 70 frame with <code>regX=50</code> and <code>regY=40</code> would return a\n\t * rectangle with [x=-50, y=-40, width=90, height=70]. This ignores transformations on the display object.\n\t *\n\t * Also see the SpriteSheet {{#crossLink \"SpriteSheet/getFrameBounds\"}}{{/crossLink}} method.\n\t * @method getBounds\n\t * @return {Rectangle} A Rectangle instance. Returns null if the frame does not exist, or the image is not fully\n\t * loaded.\n\t **/\n\tp.getBounds = function() {\n\t\t// TODO: should this normalizeFrame?\n\t\treturn this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle);\n\t};\n\n\t/**\n\t * Returns a clone of the Sprite instance. Note that the same SpriteSheet is shared between cloned\n\t * instances.\n\t * @method clone\n\t * @return {Sprite} a clone of the Sprite instance.\n\t **/\n\tp.clone = function() {\n\t\treturn this._cloneProps(new Sprite(this.spriteSheet));\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Sprite (name=\"+  this.name +\")]\";\n\t};\n\n// private methods:\n\t/**\n\t * @method _cloneProps\n\t * @param {Sprite} o\n\t * @return {Sprite} o\n\t * @protected\n\t **/\n\tp._cloneProps = function(o) {\n\t\tthis.DisplayObject__cloneProps(o);\n\t\to.currentFrame = this.currentFrame;\n\t\to.currentAnimation = this.currentAnimation;\n\t\to.paused = this.paused;\n\t\to.currentAnimationFrame = this.currentAnimationFrame;\n\t\to.framerate = this.framerate;\n\t\t\n\t\to._animation = this._animation;\n\t\to._currentFrame = this._currentFrame;\n\t\to._skipAdvance = this._skipAdvance;\n\t\treturn o;\n\t};\n\t\n\t/**\n\t * Advances the <code>currentFrame</code> if paused is not true. This is called automatically when the {{#crossLink \"Stage\"}}{{/crossLink}}\n\t * ticks.\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\n\t * @protected\n\t * @method _tick\n\t **/\n\tp._tick = function(evtObj) {\n\t\tif (!this.paused) {\n\t\t\tif (!this._skipAdvance) { this.advance(evtObj&&evtObj.delta); }\n\t\t\tthis._skipAdvance = false;\n\t\t}\n\t\tthis.DisplayObject__tick(evtObj);\n\t};\n\n\n\t/**\n\t * Normalizes the current frame, advancing animations and dispatching callbacks as appropriate.\n\t * @protected\n\t * @method _normalizeFrame\n\t **/\n\tp._normalizeFrame = function(frameDelta) {\n\t\tframeDelta = frameDelta || 0;\n\t\tvar animation = this._animation;\n\t\tvar paused = this.paused;\n\t\tvar frame = this._currentFrame;\n\t\tvar l;\n\t\t\n\t\tif (animation) {\n\t\t\tvar speed = animation.speed || 1;\n\t\t\tvar animFrame = this.currentAnimationFrame;\n\t\t\tl = animation.frames.length;\n\t\t\tif (animFrame + frameDelta * speed >= l) {\n\t\t\t\tvar next = animation.next;\n\t\t\t\tif (this._dispatchAnimationEnd(animation, frame, paused, next, l - 1)) {\n\t\t\t\t\t// something changed in the event stack, so we shouldn't make any more changes here.\n\t\t\t\t\treturn;\n\t\t\t\t} else if (next) {\n\t\t\t\t\t// sequence. Automatically calls _normalizeFrame again with the remaining frames.\n\t\t\t\t\treturn this._goto(next, frameDelta - (l - animFrame) / speed);\n\t\t\t\t} else {\n\t\t\t\t\t// end.\n\t\t\t\t\tthis.paused = true;\n\t\t\t\t\tanimFrame = animation.frames.length - 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tanimFrame += frameDelta * speed;\n\t\t\t}\n\t\t\tthis.currentAnimationFrame = animFrame;\n\t\t\tthis._currentFrame = animation.frames[animFrame | 0]\n\t\t} else {\n\t\t\tframe = (this._currentFrame += frameDelta);\n\t\t\tl = this.spriteSheet.getNumFrames();\n\t\t\tif (frame >= l && l > 0) {\n\t\t\t\tif (!this._dispatchAnimationEnd(animation, frame, paused, l - 1)) {\n\t\t\t\t\t// looped.\n\t\t\t\t\tif ((this._currentFrame -= l) >= l) { return this._normalizeFrame(); }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tframe = this._currentFrame | 0;\n\t\tif (this.currentFrame != frame) {\n\t\t\tthis.currentFrame = frame;\n\t\t\tthis.dispatchEvent(\"change\");\n\t\t}\n\t};\n\n\t/**\n\t * Dispatches the \"animationend\" event. Returns true if a handler changed the animation (ex. calling {{#crossLink \"Sprite/stop\"}}{{/crossLink}},\n\t * {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}}, etc.)\n\t * @property _dispatchAnimationEnd\n\t * @private\n\t * @type {Function}\n\t **/\n\tp._dispatchAnimationEnd = function(animation, frame, paused, next, end) {\n\t\tvar name = animation ? animation.name : null;\n\t\tif (this.hasEventListener(\"animationend\")) {\n\t\t\tvar evt = new createjs.Event(\"animationend\");\n\t\t\tevt.name = name;\n\t\t\tevt.next = next;\n\t\t\tthis.dispatchEvent(evt);\n\t\t}\n\t\t// did the animation get changed in the event stack?:\n\t\tvar changed = (this._animation != animation || this._currentFrame != frame);\n\t\t// if the animation hasn't changed, but the sprite was paused, then we want to stick to the last frame:\n\t\tif (!changed && !paused && this.paused) { this.currentAnimationFrame = end; changed = true; }\n\t\treturn changed;\n\t};\n\n\t/**\n\t * Moves the playhead to the specified frame number or animation.\n\t * @method _goto\n\t * @param {String|Number} frameOrAnimation The frame number or animation that the playhead should move to.\n\t * @param {Boolean} [frame] The frame of the animation to go to. Defaults to 0.\n\t * @protected\n\t **/\n\tp._goto = function(frameOrAnimation, frame) {\n\t\tthis.currentAnimationFrame = 0;\n\t\tif (isNaN(frameOrAnimation)) {\n\t\t\tvar data = this.spriteSheet.getAnimation(frameOrAnimation);\n\t\t\tif (data) {\n\t\t\t\tthis._animation = data;\n\t\t\t\tthis.currentAnimation = frameOrAnimation;\n\t\t\t\tthis._normalizeFrame(frame);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.currentAnimation = this._animation = null;\n\t\t\tthis._currentFrame = frameOrAnimation;\n\t\t\tthis._normalizeFrame();\n\t\t}\n\t};\n\n\n\tcreatejs.Sprite = createjs.promote(Sprite, \"DisplayObject\");\n}());\n\n//##############################################################################\n// Shape.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * A Shape allows you to display vector art in the display list. It composites a {{#crossLink \"Graphics\"}}{{/crossLink}}\n\t * instance which exposes all of the vector drawing methods. The Graphics instance can be shared between multiple Shape\n\t * instances to display the same vector graphics with different positions or transforms.\n\t *\n\t * If the vector art will not\n\t * change between draws, you may want to use the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method to reduce the\n\t * rendering cost.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var graphics = new createjs.Graphics().beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);\n\t *      var shape = new createjs.Shape(graphics);\n\t *\n\t *      //Alternatively use can also use the graphics property of the Shape class to renderer the same as above.\n\t *      var shape = new createjs.Shape();\n\t *      shape.graphics.beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);\n\t *\n\t * @class Shape\n\t * @extends DisplayObject\n\t * @constructor\n\t * @param {Graphics} graphics Optional. The graphics instance to display. If null, a new Graphics instance will be created.\n\t **/\n\tfunction Shape(graphics) {\n\t\tthis.DisplayObject_constructor();\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The graphics instance to display.\n\t\t * @property graphics\n\t\t * @type Graphics\n\t\t **/\n\t\tthis.graphics = graphics ? graphics : new createjs.Graphics();\n\t}\n\tvar p = createjs.extend(Shape, createjs.DisplayObject);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\n// public methods:\n\t/**\n\t * Returns true or false indicating whether the Shape would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the Shape would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\tvar hasContent = this.cacheCanvas || (this.graphics && !this.graphics.isEmpty());\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\n\t};\n\n\t/**\n\t * Draws the Shape into the specified context ignoring its visible, alpha, shadow, and transform. Returns true if\n\t * the draw was handled (useful for overriding functionality).\n\t *\n\t * <i>NOTE: This method is mainly for internal use, though it may be useful for advanced uses.</i>\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For example,\n\t * used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\n\t * @return {Boolean}\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\n\t\tthis.graphics.draw(ctx, this);\n\t\treturn true;\n\t};\n\n\t/**\n\t * Returns a clone of this Shape. Some properties that are specific to this instance's current context are reverted to\n\t * their defaults (for example .parent).\n\t * @method clone\n\t * @param {Boolean} recursive If true, this Shape's {{#crossLink \"Graphics\"}}{{/crossLink}} instance will also be\n\t * cloned. If false, the Graphics instance will be shared with the new Shape.\n\t **/\n\tp.clone = function(recursive) {\n\t\tvar g = (recursive && this.graphics) ? this.graphics.clone() : this.graphics;\n\t\treturn  this._cloneProps(new Shape(g));\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Shape (name=\"+  this.name +\")]\";\n\t};\n\n\n\tcreatejs.Shape = createjs.promote(Shape, \"DisplayObject\");\n}());\n\n//##############################################################################\n// Text.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Display one or more lines of dynamic text (not user editable) in the display list. Line wrapping support (using the\n\t * lineWidth) is very basic, wrapping on spaces and tabs only. Note that as an alternative to Text, you can position HTML\n\t * text above or below the canvas relative to items in the display list using the {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}}\n\t * method, or using {{#crossLink \"DOMElement\"}}{{/crossLink}}.\n\t *\n\t * <b>Please note that Text does not support HTML text, and can only display one font style at a time.</b> To use\n\t * multiple font styles, you will need to create multiple text instances, and position them manually.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var text = new createjs.Text(\"Hello World\", \"20px Arial\", \"#ff7700\");\n\t *      text.x = 100;\n\t *      text.textBaseline = \"alphabetic\";\n\t *\n\t * CreateJS Text supports web fonts (the same rules as Canvas). The font must be loaded and supported by the browser\n\t * before it can be displayed.\n\t *\n\t * <strong>Note:</strong> Text can be expensive to generate, so cache instances where possible. Be aware that not all\n\t * browsers will render Text exactly the same.\n\t * @class Text\n\t * @extends DisplayObject\n\t * @constructor\n\t * @param {String} [text] The text to display.\n\t * @param {String} [font] The font style to use. Any valid value for the CSS font attribute is acceptable (ex. \"bold\n\t * 36px Arial\").\n\t * @param {String} [color] The color to draw the text in. Any valid value for the CSS color attribute is acceptable (ex.\n\t * \"#F00\", \"red\", or \"#FF0000\").\n\t **/\n\tfunction Text(text, font, color) {\n\t\tthis.DisplayObject_constructor();\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The text to display.\n\t\t * @property text\n\t\t * @type String\n\t\t **/\n\t\tthis.text = text;\n\t\n\t\t/**\n\t\t * The font style to use. Any valid value for the CSS font attribute is acceptable (ex. \"bold 36px Arial\").\n\t\t * @property font\n\t\t * @type String\n\t\t **/\n\t\tthis.font = font;\n\t\n\t\t/**\n\t\t * The color to draw the text in. Any valid value for the CSS color attribute is acceptable (ex. \"#F00\"). Default is \"#000\".\n\t\t * It will also accept valid canvas fillStyle values.\n\t\t * @property color\n\t\t * @type String\n\t\t **/\n\t\tthis.color = color;\n\t\n\t\t/**\n\t\t * The horizontal text alignment. Any of \"start\", \"end\", \"left\", \"right\", and \"center\". For detailed\n\t\t * information view the\n\t\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-styles\">\n\t\t * whatwg spec</a>. Default is \"left\".\n\t\t * @property textAlign\n\t\t * @type String\n\t\t **/\n\t\tthis.textAlign = \"left\";\n\t\n\t\t/**\n\t\t * The vertical alignment point on the font. Any of \"top\", \"hanging\", \"middle\", \"alphabetic\", \"ideographic\", or\n\t\t * \"bottom\". For detailed information view the <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-styles\">\n\t\t * whatwg spec</a>. Default is \"top\".\n\t\t * @property textBaseline\n\t\t * @type String\n\t\t*/\n\t\tthis.textBaseline = \"top\";\n\t\n\t\t/**\n\t\t * The maximum width to draw the text. If maxWidth is specified (not null), the text will be condensed or\n\t\t * shrunk to make it fit in this width. For detailed information view the\n\t\t * <a href=\"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-styles\">\n\t\t * whatwg spec</a>.\n\t\t * @property maxWidth\n\t\t * @type Number\n\t\t*/\n\t\tthis.maxWidth = null;\n\t\n\t\t/**\n\t\t * If greater than 0, the text will be drawn as a stroke (outline) of the specified width.\n\t\t * @property outline\n\t\t * @type Number\n\t\t **/\n\t\tthis.outline = 0;\n\t\n\t\t/**\n\t\t * Indicates the line height (vertical distance between baselines) for multi-line text. If null or 0,\n\t\t * the value of getMeasuredLineHeight is used.\n\t\t * @property lineHeight\n\t\t * @type Number\n\t\t **/\n\t\tthis.lineHeight = 0;\n\t\n\t\t/**\n\t\t * Indicates the maximum width for a line of text before it is wrapped to multiple lines. If null,\n\t\t * the text will not be wrapped.\n\t\t * @property lineWidth\n\t\t * @type Number\n\t\t **/\n\t\tthis.lineWidth = null;\n\t}\n\tvar p = createjs.extend(Text, createjs.DisplayObject);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\t\n// static properties:\n\t/**\n\t * @property _workingContext\n\t * @type CanvasRenderingContext2D\n\t * @private\n\t **/\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\n\tif (canvas.getContext) { Text._workingContext = canvas.getContext(\"2d\"); canvas.width = canvas.height = 1; }\n\t\n\t\n// constants:\n\t/**\n\t * Lookup table for the ratio to offset bounds x calculations based on the textAlign property.\n\t * @property H_OFFSETS\n\t * @type Object\n\t * @protected\n\t * @static\n\t **/\n\tText.H_OFFSETS = {start: 0, left: 0, center: -0.5, end: -1, right: -1};\n\t\n\t/**\n\t * Lookup table for the ratio to offset bounds y calculations based on the textBaseline property.\n\t * @property H_OFFSETS\n\t * @type Object\n\t * @protected\n\t * @static\n\t **/\n\tText.V_OFFSETS = {top: 0, hanging: -0.01, middle: -0.4, alphabetic: -0.8, ideographic: -0.85, bottom: -1};\n\n\n// public methods:\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Whether the display object would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\tvar hasContent = this.cacheCanvas || (this.text != null && this.text !== \"\");\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\n\t};\n\n\t/**\n\t * Draws the Text into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\n\t * into itself).\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\n\n\t\tvar col = this.color || \"#000\";\n\t\tif (this.outline) { ctx.strokeStyle = col; ctx.lineWidth = this.outline*1; }\n\t\telse { ctx.fillStyle = col; }\n\t\t\n\t\tthis._drawText(this._prepContext(ctx));\n\t\treturn true;\n\t};\n\n\t/**\n\t * Returns the measured, untransformed width of the text without wrapping. Use getBounds for a more robust value.\n\t * @method getMeasuredWidth\n\t * @return {Number} The measured, untransformed width of the text.\n\t **/\n\tp.getMeasuredWidth = function() {\n\t\treturn this._getMeasuredWidth(this.text);\n\t};\n\n\t/**\n\t * Returns an approximate line height of the text, ignoring the lineHeight property. This is based on the measured\n\t * width of a \"M\" character multiplied by 1.2, which provides an approximate line height for most fonts.\n\t * @method getMeasuredLineHeight\n\t * @return {Number} an approximate line height of the text, ignoring the lineHeight property. This is\n\t * based on the measured width of a \"M\" character multiplied by 1.2, which approximates em for most fonts.\n\t **/\n\tp.getMeasuredLineHeight = function() {\n\t\treturn this._getMeasuredWidth(\"M\")*1.2;\n\t};\n\n\t/**\n\t * Returns the approximate height of multi-line text by multiplying the number of lines against either the\n\t * <code>lineHeight</code> (if specified) or {{#crossLink \"Text/getMeasuredLineHeight\"}}{{/crossLink}}. Note that\n\t * this operation requires the text flowing logic to run, which has an associated CPU cost.\n\t * @method getMeasuredHeight\n\t * @return {Number} The approximate height of the untransformed multi-line text.\n\t **/\n\tp.getMeasuredHeight = function() {\n\t\treturn this._drawText(null,{}).height;\n\t};\n\n\t/**\n\t * Docced in superclass.\n\t */\n\tp.getBounds = function() {\n\t\tvar rect = this.DisplayObject_getBounds();\n\t\tif (rect) { return rect; }\n\t\tif (this.text == null || this.text === \"\") { return null; }\n\t\tvar o = this._drawText(null, {});\n\t\tvar w = (this.maxWidth && this.maxWidth < o.width) ? this.maxWidth : o.width;\n\t\tvar x = w * Text.H_OFFSETS[this.textAlign||\"left\"];\n\t\tvar lineHeight = this.lineHeight||this.getMeasuredLineHeight();\n\t\tvar y = lineHeight * Text.V_OFFSETS[this.textBaseline||\"top\"];\n\t\treturn this._rectangle.setValues(x, y, w, o.height);\n\t};\n\t\n\t/**\n\t * Returns an object with width, height, and lines properties. The width and height are the visual width and height\n\t * of the drawn text. The lines property contains an array of strings, one for\n\t * each line of text that will be drawn, accounting for line breaks and wrapping. These strings have trailing\n\t * whitespace removed.\n\t * @method getMetrics\n\t * @return {Object} An object with width, height, and lines properties.\n\t **/\n\tp.getMetrics = function() {\n\t\tvar o = {lines:[]};\n\t\to.lineHeight = this.lineHeight || this.getMeasuredLineHeight();\n\t\to.vOffset = o.lineHeight * Text.V_OFFSETS[this.textBaseline||\"top\"];\n\t\treturn this._drawText(null, o, o.lines);\n\t};\n\n\t/**\n\t * Returns a clone of the Text instance.\n\t * @method clone\n\t * @return {Text} a clone of the Text instance.\n\t **/\n\tp.clone = function() {\n\t\treturn this._cloneProps(new Text(this.text, this.font, this.color));\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Text (text=\"+  (this.text.length > 20 ? this.text.substr(0, 17)+\"...\" : this.text) +\")]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * @method _cloneProps\n\t * @param {Text} o\n\t * @protected\n\t * @return {Text} o\n\t **/\n\tp._cloneProps = function(o) {\n\t\tthis.DisplayObject__cloneProps(o);\n\t\to.textAlign = this.textAlign;\n\t\to.textBaseline = this.textBaseline;\n\t\to.maxWidth = this.maxWidth;\n\t\to.outline = this.outline;\n\t\to.lineHeight = this.lineHeight;\n\t\to.lineWidth = this.lineWidth;\n\t\treturn o;\n\t};\n\n\t/**\n\t * @method _getWorkingContext\n\t * @param {CanvasRenderingContext2D} ctx\n\t * @return {CanvasRenderingContext2D}\n\t * @protected\n\t **/\n\tp._prepContext = function(ctx) {\n\t\tctx.font = this.font||\"10px sans-serif\";\n\t\tctx.textAlign = this.textAlign||\"left\";\n\t\tctx.textBaseline = this.textBaseline||\"top\";\n\t\tctx.lineJoin = \"miter\";\n\t\tctx.miterLimit = 2.5;\n\t\treturn ctx;\n\t};\n\n\t/**\n\t * Draws multiline text.\n\t * @method _drawText\n\t * @param {CanvasRenderingContext2D} ctx\n\t * @param {Object} o\n\t * @param {Array} lines\n\t * @return {Object}\n\t * @protected\n\t **/\n\tp._drawText = function(ctx, o, lines) {\n\t\tvar paint = !!ctx;\n\t\tif (!paint) {\n\t\t\tctx = Text._workingContext;\n\t\t\tctx.save();\n\t\t\tthis._prepContext(ctx);\n\t\t}\n\t\tvar lineHeight = this.lineHeight||this.getMeasuredLineHeight();\n\t\t\n\t\tvar maxW = 0, count = 0;\n\t\tvar hardLines = String(this.text).split(/(?:\\r\\n|\\r|\\n)/);\n\t\tfor (var i=0, l=hardLines.length; i<l; i++) {\n\t\t\tvar str = hardLines[i];\n\t\t\tvar w = null;\n\t\t\t\n\t\t\tif (this.lineWidth != null && (w = ctx.measureText(str).width) > this.lineWidth) {\n\t\t\t\t// text wrapping:\n\t\t\t\tvar words = str.split(/(\\s)/);\n\t\t\t\tstr = words[0];\n\t\t\t\tw = ctx.measureText(str).width;\n\t\t\t\t\n\t\t\t\tfor (var j=1, jl=words.length; j<jl; j+=2) {\n\t\t\t\t\t// Line needs to wrap:\n\t\t\t\t\tvar wordW = ctx.measureText(words[j] + words[j+1]).width;\n\t\t\t\t\tif (w + wordW > this.lineWidth) {\n\t\t\t\t\t\tif (paint) { this._drawTextLine(ctx, str, count*lineHeight); }\n\t\t\t\t\t\tif (lines) { lines.push(str); }\n\t\t\t\t\t\tif (w > maxW) { maxW = w; }\n\t\t\t\t\t\tstr = words[j+1];\n\t\t\t\t\t\tw = ctx.measureText(str).width;\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr += words[j] + words[j+1];\n\t\t\t\t\t\tw += wordW;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (paint) { this._drawTextLine(ctx, str, count*lineHeight); }\n\t\t\tif (lines) { lines.push(str); }\n\t\t\tif (o && w == null) { w = ctx.measureText(str).width; }\n\t\t\tif (w > maxW) { maxW = w; }\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tif (o) {\n\t\t\to.width = maxW;\n\t\t\to.height = count*lineHeight;\n\t\t}\n\t\tif (!paint) { ctx.restore(); }\n\t\treturn o;\n\t};\n\n\t/**\n\t * @method _drawTextLine\n\t * @param {CanvasRenderingContext2D} ctx\n\t * @param {String} text\n\t * @param {Number} y\n\t * @protected\n\t **/\n\tp._drawTextLine = function(ctx, text, y) {\n\t\t// Chrome 17 will fail to draw the text if the last param is included but null, so we feed it a large value instead:\n\t\tif (this.outline) { ctx.strokeText(text, 0, y, this.maxWidth||0xFFFF); }\n\t\telse { ctx.fillText(text, 0, y, this.maxWidth||0xFFFF); }\n\t};\n\t\n\t\n\t/**\n\t * @method _getMeasuredWidth\n\t * @param {String} text\n\t * @protected\n\t **/\n\tp._getMeasuredWidth = function(text) {\n\t\tvar ctx = Text._workingContext;\n\t\tctx.save();\n\t\tvar w = this._prepContext(ctx).measureText(text).width;\n\t\tctx.restore();\n\t\treturn w;\n\t};\n\n\n\tcreatejs.Text = createjs.promote(Text, \"DisplayObject\");\n}());\n\n//##############################################################################\n// BitmapText.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Displays text using bitmap glyphs defined in a sprite sheet. Multi-line text is supported using new line characters,\n\t * but automatic wrapping is not supported. See the {{#crossLink \"BitmapText/spriteSheet:property\"}}{{/crossLink}}\n\t * property for more information on defining glyphs.\n\t *\n\t * <strong>Important:</strong> While BitmapText extends Container, it is not designed to be used as one.\n\t * As such, methods like addChild and removeChild are disabled.\n\t *\n\t *\n\t * @class BitmapText\n\t * @extends DisplayObject\n\t * @param {String} [text=\"\"] The text to display.\n\t * @param {SpriteSheet} [spriteSheet=null] The spritesheet that defines the character glyphs.\n\t * @constructor\n\t **/\n\tfunction BitmapText(text, spriteSheet) {\n\t\tthis.Container_constructor();\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The text to display.\n\t\t * @property text\n\t\t * @type String\n\t\t * @default \"\"\n\t\t **/\n\t\tthis.text = text||\"\";\n\t\t\n\t\t/**\n\t\t * A SpriteSheet instance that defines the glyphs for this bitmap text. Each glyph/character\n\t\t * should have a single frame animation defined in the sprite sheet named the same as\n\t\t * corresponding character. For example, the following animation definition:\n\t\t *\n\t\t * \t\t\"A\": {frames: [0]}\n\t\t *\n\t\t * would indicate that the frame at index 0 of the spritesheet should be drawn for the \"A\" character. The short form\n\t\t * is also acceptable:\n\t\t * \n\t\t * \t\t\"A\": 0\n\t\t *\n\t\t * Note that if a character in the text is not found in the sprite sheet, it will also\n\t\t * try to use the alternate case (upper or lower).\n\t\t *\n\t\t * See SpriteSheet for more information on defining sprite sheet data.\n\t\t * @property spriteSheet\n\t\t * @type SpriteSheet\n\t\t * @default null\n\t\t **/\n\t\tthis.spriteSheet = spriteSheet;\n\t\n\t\t/**\n\t\t * The height of each line of text. If 0, then it will use a line height calculated\n\t\t * by checking for the height of the \"1\", \"T\", or \"L\" character (in that order). If\n\t\t * those characters are not defined, it will use the height of the first frame of the\n\t\t * sprite sheet.\n\t\t * @property lineHeight\n\t\t * @type Number\n\t\t * @default 0\n\t\t **/\n\t\tthis.lineHeight = 0;\n\t\n\t\t/**\n\t\t * This spacing (in pixels) will be added after each character in the output.\n\t\t * @property letterSpacing\n\t\t * @type Number\n\t\t * @default 0\n\t\t **/\n\t\tthis.letterSpacing = 0;\n\t\n\t\t/**\n\t\t * If a space character is not defined in the sprite sheet, then empty pixels equal to\n\t\t * spaceWidth will be inserted instead. If 0, then it will use a value calculated\n\t\t * by checking for the width of the \"1\", \"l\", \"E\", or \"A\" character (in that order). If\n\t\t * those characters are not defined, it will use the width of the first frame of the\n\t\t * sprite sheet.\n\t\t * @property spaceWidth\n\t\t * @type Number\n\t\t * @default 0\n\t\t **/\n\t\tthis.spaceWidth = 0;\n\t\t\n\t\t\n\t// private properties:\n\t \t/**\n\t\t * @property _oldProps\n\t\t * @type Object\n\t\t * @protected\n\t\t **/\n\t\tthis._oldProps = {text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0};\n\n\t\t/**\n\t\t * Used to track the object which this class attached listeners to, helps optimize listener attachment.\n\t\t * @property _oldStage\n\t\t * @type Stage\n\t\t * @protected\n\t\t */\n\t\tthis._oldStage = null;\n\t\t/**\n\t\t * The event listener proxy triggered drawing draw for special circumstances.\n\t\t * @property _drawAction\n\t\t * @type function\n\t\t * @protected\n\t\t */\n\t\tthis._drawAction = null;\n\t}\n\tvar p = createjs.extend(BitmapText, createjs.Container);\n\n// static properties:\n\t/**\n\t * BitmapText uses Sprite instances to draw text. To reduce the creation and destruction of instances (and thus garbage collection), it maintains\n\t * an internal object pool of sprite instances to reuse. Increasing this value can cause more sprites to be\n\t * retained, slightly increasing memory use, but reducing instantiation.\n\t * @property maxPoolSize\n\t * @type Number\n\t * @static\n\t * @default 100\n\t **/\n\tBitmapText.maxPoolSize = 100;\n\t\n\t/**\n\t * Sprite object pool.\n\t * @type {Array}\n\t * @static\n\t * @private\n\t */\n\tBitmapText._spritePool = [];\n\n\t\n// public methods:\n\t/**\n\t * Docced in superclass.\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return; }\n\t\tthis._updateState();\n\t\tthis.Container_draw(ctx, ignoreCache);\n\t};\n\t\n\t/**\n\t * Docced in superclass.\n\t **/\n\tp.getBounds = function() {\n\t\tthis._updateText();\n\t\treturn this.Container_getBounds();\n\t};\n\t\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\tvar hasContent = this.cacheCanvas || (this.spriteSheet && this.spriteSheet.complete && this.text);\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX !== 0 && this.scaleY !== 0 && hasContent);\n\t};\n\t\n\tp.clone = function() {\n\t\treturn this._cloneProps(new BitmapText(this.text, this.spriteSheet));\n\t};\n\t\n\t/**\n\t * <strong>Disabled in BitmapText.</strong>\n\t * @method addChild\n\t **/\n\t/**\n\t * <strong>Disabled in BitmapText.</strong>\n\t * @method addChildAt\n\t **/\n\t/**\n\t * <strong>Disabled in BitmapText.</strong>\n\t * @method removeChild\n\t **/\n\t/**\n\t * <strong>Disabled in BitmapText.</strong>\n\t * @method removeChildAt\n\t **/\n\t/**\n\t * <strong>Disabled in BitmapText.</strong>\n\t * @method removeAllChildren\n\t **/\n\tp.addChild = p.addChildAt = p.removeChild = p.removeChildAt = p.removeAllChildren = function() {};\n\n\n// private methods:\n\t/**\n\t * Docced in superclass.\n\t **/\n\tp._updateState = function() {\n\t\tthis._updateText();\n\t};\n\n \t/**\n\t * @method _cloneProps\n\t * @param {BitmapText} o\n\t * @return {BitmapText} o\n\t * @protected\n\t **/\n\tp._cloneProps = function(o) {\n\t\tthis.Container__cloneProps(o);\n\t\to.lineHeight = this.lineHeight;\n\t\to.letterSpacing = this.letterSpacing;\n\t\to.spaceWidth = this.spaceWidth;\n\t\treturn o;\n\t};\n\t\n\t/**\n\t * @method _getFrameIndex\n\t * @param {String} character\n\t * @param {SpriteSheet} spriteSheet\n\t * @return {Number}\n\t * @protected\n\t **/\n\tp._getFrameIndex = function(character, spriteSheet) {\n\t\tvar c, o = spriteSheet.getAnimation(character);\n\t\tif (!o) {\n\t\t\t(character != (c = character.toUpperCase())) || (character != (c = character.toLowerCase())) || (c=null);\n\t\t\tif (c) { o = spriteSheet.getAnimation(c); }\n\t\t}\n\t\treturn o && o.frames[0];\n\t};\n\t\n\t/**\n\t * @method _getFrame\n\t * @param {String} character\n\t * @param {SpriteSheet} spriteSheet\n\t * @return {Object}\n\t * @protected\n\t **/\n\tp._getFrame = function(character, spriteSheet) {\n\t\tvar index = this._getFrameIndex(character, spriteSheet);\n\t\treturn index == null ? index : spriteSheet.getFrame(index);\n\t};\n\n\t/**\n\t * @method _getLineHeight\n\t * @param {SpriteSheet} ss\n\t * @return {Number}\n\t * @protected\n\t **/\n\tp._getLineHeight = function(ss) {\n\t\tvar frame = this._getFrame(\"1\",ss) || this._getFrame(\"T\",ss) || this._getFrame(\"L\",ss) || ss.getFrame(0);\n\t\treturn frame ? frame.rect.height : 1;\n\t};\n\n\t/**\n\t * @method _getSpaceWidth\n\t * @param {SpriteSheet} ss\n\t * @return {Number}\n\t * @protected\n\t **/\n\tp._getSpaceWidth = function(ss) {\n\t\tvar frame = this._getFrame(\"1\",ss) || this._getFrame(\"l\",ss) || this._getFrame(\"e\",ss) || this._getFrame(\"a\",ss) || ss.getFrame(0);\n\t\treturn frame ? frame.rect.width : 1;\n\t};\n\n\t/**\n\t * @method _updateText\n\t * @protected\n\t **/\n\tp._updateText = function() {\n\t\tvar x=0, y=0, o=this._oldProps, change=false, spaceW=this.spaceWidth, lineH=this.lineHeight, ss=this.spriteSheet;\n\t\tvar pool=BitmapText._spritePool, kids=this.children, childIndex=0, numKids=kids.length, sprite;\n\t\t\n\t\tfor (var n in o) {\n\t\t\tif (o[n] != this[n]) {\n\t\t\t\to[n] = this[n];\n\t\t\t\tchange = true;\n\t\t\t}\n\t\t}\n\t\tif (!change) { return; }\n\t\t\n\t\tvar hasSpace = !!this._getFrame(\" \", ss);\n\t\tif (!hasSpace && !spaceW) { spaceW = this._getSpaceWidth(ss); }\n\t\tif (!lineH) { lineH = this._getLineHeight(ss); }\n\t\t\n\t\tfor(var i=0, l=this.text.length; i<l; i++) {\n\t\t\tvar character = this.text.charAt(i);\n\t\t\tif (character == \" \" && !hasSpace) {\n\t\t\t\tx += spaceW;\n\t\t\t\tcontinue;\n\t\t\t} else if (character==\"\\n\" || character==\"\\r\") {\n\t\t\t\tif (character==\"\\r\" && this.text.charAt(i+1) == \"\\n\") { i++; } // crlf\n\t\t\t\tx = 0;\n\t\t\t\ty += lineH;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar index = this._getFrameIndex(character, ss);\n\t\t\tif (index == null) { continue; }\n\t\t\t\n\t\t\tif (childIndex < numKids) {\n\t\t\t\tsprite = kids[childIndex];\n\t\t\t} else {\n\t\t\t\tkids.push(sprite = pool.length ? pool.pop() : new createjs.Sprite());\n\t\t\t\tsprite.parent = this;\n\t\t\t\tnumKids++;\n\t\t\t}\n\t\t\tsprite.spriteSheet = ss;\n\t\t\tsprite.gotoAndStop(index);\n\t\t\tsprite.x = x;\n\t\t\tsprite.y = y;\n\t\t\tchildIndex++;\n\t\t\t\n\t\t\tx += sprite.getBounds().width + this.letterSpacing;\n\t\t}\n\t\twhile (numKids > childIndex) {\n\t\t\t // faster than removeChild.\n\t\t\tpool.push(sprite = kids.pop());\n\t\t\tsprite.parent = null;\n\t\t\tnumKids--;\n\t\t}\n\t\tif (pool.length > BitmapText.maxPoolSize) { pool.length = BitmapText.maxPoolSize; }\n\t};\n\n\n\tcreatejs.BitmapText = createjs.promote(BitmapText, \"Container\");\n}());\n\n//##############################################################################\n// MovieClip.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The MovieClip class associates a TweenJS Timeline with an EaselJS {{#crossLink \"Container\"}}{{/crossLink}}. It allows\n\t * you to create objects which encapsulate timeline animations, state changes, and synched actions. The MovieClip\n\t * class has been included in the EaselJS minified file since 0.7.0.\n\t *\n\t * Currently MovieClip only works properly if it is tick based (as opposed to time based) though some concessions have\n\t * been made to support time-based timelines in the future.\n\t *\n\t * <h4>Example</h4>\n\t * This example animates two shapes back and forth. The grey shape starts on the left, but we jump to a mid-point in\n\t * the animation using {{#crossLink \"MovieClip/gotoAndPlay\"}}{{/crossLink}}.\n\t *\n\t *      var stage = new createjs.Stage(\"canvas\");\n\t *      createjs.Ticker.addEventListener(\"tick\", stage);\n\t *\n\t *      var mc = new createjs.MovieClip({loop:-1, labels:{myLabel:20}});\n\t *      stage.addChild(mc);\n\t *\n\t *      var child1 = new createjs.Shape(\n\t *          new createjs.Graphics().beginFill(\"#999999\")\n\t *              .drawCircle(30,30,30));\n\t *      var child2 = new createjs.Shape(\n\t *          new createjs.Graphics().beginFill(\"#5a9cfb\")\n\t *              .drawCircle(30,30,30));\n\t *\n\t *      mc.timeline.addTween(\n\t *          createjs.Tween.get(child1)\n\t *              .to({x:0}).to({x:60}, 50).to({x:0}, 50));\n\t *      mc.timeline.addTween(\n\t *          createjs.Tween.get(child2)\n\t *              .to({x:60}).to({x:0}, 50).to({x:60}, 50));\n\t *\n\t *      mc.gotoAndPlay(\"start\");\n\t *\n\t * It is recommended to use <code>tween.to()</code> to animate and set properties (use no duration to have it set\n\t * immediately), and the <code>tween.wait()</code> method to create delays between animations. Note that using the\n\t * <code>tween.set()</code> method to affect properties will likely not provide the desired result.\n\t *\n\t * @class MovieClip\n\t * @main MovieClip\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{mode:MovieClip.SYNCHED}`).\n\t * Supported props for the MovieClip are listed below. These props are set on the corresponding instance properties except where\n\t * specified.<UL>\n\t *    <LI> `mode`</LI>\n\t *    <LI> `startPosition`</LI>\n\t *    <LI> `frameBounds`</LI>\n\t * </UL>\n\t * \n\t * This object will also be passed into the Timeline instance associated with this MovieClip. See the documentation\n\t * for Timeline for a list of supported props (ex. `paused`, `labels`, `loop`, `reversed`, etc.)\n\t * @extends Container\n\t * @constructor\n\t **/\n\tfunction MovieClip(props) {\n\t\tthis.Container_constructor();\n\t\t!MovieClip.inited&&MovieClip.init(); // static init\n\t\t\n\t\tvar mode, startPosition, loop, labels;\n\t\t\n\t\t// handle old params (mode, startPosition, loop, labels):\n\t\t// TODO: deprecated param handling:\n\t\tif (props instanceof String || arguments.length > 1) {\n\t\t\tmode = props;\n\t\t\tstartPosition = arguments[1];\n\t\t\tloop = arguments[2];\n\t\t\tlabels = arguments[3];\n\t\t\tif (loop == null) { loop = -1; }\n\t\t\tprops = null;\n\t\t} else if (props) {\n\t\t\tmode = props.mode;\n\t\t\tstartPosition = props.startPosition;\n\t\t\tloop = props.loop;\n\t\t\tlabels = props.labels;\n\t\t}\n\t\tif (!props) { props = {labels:labels}; }\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * Controls how this MovieClip advances its time. Must be one of 0 (INDEPENDENT), 1 (SINGLE_FRAME), or 2 (SYNCHED).\n\t\t * See each constant for a description of the behaviour.\n\t\t * @property mode\n\t\t * @type String\n\t\t * @default null\n\t\t **/\n\t\tthis.mode = mode||MovieClip.INDEPENDENT;\n\t\n\t\t/**\n\t\t * Specifies what the first frame to play in this movieclip, or the only frame to display if mode is SINGLE_FRAME.\n\t\t * @property startPosition\n\t\t * @type Number\n\t\t * @default 0\n\t\t */\n\t\tthis.startPosition = startPosition||0;\n\t\n\t\t/**\n\t\t * Specifies how many times this MovieClip should loop. A value of -1 indicates it should loop indefinitely. A value of\n\t\t * 1 would cause it to loop once (ie. play a total of twice).\n\t\t * @property loop\n\t\t * @type Number\n\t\t * @default -1\n\t\t */\n\t\tthis.loop = loop === true ? -1 : (loop || 0);\n\t\n\t\t/**\n\t\t * The current frame of the movieclip.\n\t\t * @property currentFrame\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t */\n\t\tthis.currentFrame = 0;\n\t\n\t\t/**\n\t\t * If true, the MovieClip's position will not advance when ticked.\n\t\t * @property paused\n\t\t * @type Boolean\n\t\t * @default false\n\t\t */\n\t\tthis.paused = props.paused||false;\n\t\n\t\t/**\n\t\t * If true, actions in this MovieClip's tweens will be run when the playhead advances.\n\t\t * @property actionsEnabled\n\t\t * @type Boolean\n\t\t * @default true\n\t\t */\n\t\tthis.actionsEnabled = true;\n\t\n\t\t/**\n\t\t * If true, the MovieClip will automatically be reset to its first frame whenever the timeline adds\n\t\t * it back onto the display list. This only applies to MovieClip instances with mode=INDEPENDENT.\n\t\t * <br><br>\n\t\t * For example, if you had a character animation with a \"body\" child MovieClip instance\n\t\t * with different costumes on each frame, you could set body.autoReset = false, so that\n\t\t * you can manually change the frame it is on, without worrying that it will be reset\n\t\t * automatically.\n\t\t * @property autoReset\n\t\t * @type Boolean\n\t\t * @default true\n\t\t */\n\t\tthis.autoReset = true;\n\t\t\n\t\t/**\n\t\t * An array of bounds for each frame in the MovieClip. This is mainly intended for tool output.\n\t\t * @property frameBounds\n\t\t * @type Array\n\t\t * @default null\n\t\t */\n\t\tthis.frameBounds = this.frameBounds||props.frameBounds; // frameBounds are set on the prototype in Animate.\n\t\t\n\t\t/**\n\t\t * By default MovieClip instances advance one frame per tick. Specifying a framerate for the MovieClip\n\t\t * will cause it to advance based on elapsed time between ticks as appropriate to maintain the target\n\t\t * framerate.\n\t\t *\n\t\t * For example, if a MovieClip with a framerate of 10 is placed on a Stage being updated at 40fps, then the MovieClip will\n\t\t * advance roughly one frame every 4 ticks. This will not be exact, because the time between each tick will\n\t\t * vary slightly between frames.\n\t\t *\n\t\t * This feature is dependent on the tick event object (or an object with an appropriate \"delta\" property) being\n\t\t * passed into {{#crossLink \"Stage/update\"}}{{/crossLink}}.\n\t\t * @property framerate\n\t\t * @type {Number}\n\t\t * @default null\n\t\t **/\n\t\tthis.framerate = null;\n\t\t\n\t\t// set up the needed props for Timeline:\n\t\tprops.useTicks = props.paused = true;\n\t\t\n\t\t/**\n\t\t * The TweenJS Timeline that is associated with this MovieClip. This is created automatically when the MovieClip\n\t\t * instance is initialized. Animations are created by adding <a href=\"http://tweenjs.com\">TweenJS</a> Tween\n\t\t * instances to the timeline.\n\t\t *\n\t\t * <h4>Example</h4>\n\t\t *\n\t\t *      var tween = createjs.Tween.get(target).to({x:0}).to({x:100}, 30);\n\t\t *      var mc = new createjs.MovieClip();\n\t\t *      mc.timeline.addTween(tween);\n\t\t *\n\t\t * Elements can be added and removed from the timeline by toggling an \"_off\" property\n\t\t * using the <code>tweenInstance.to()</code> method. Note that using <code>Tween.set</code> is not recommended to\n\t\t * create MovieClip animations. The following example will toggle the target off on frame 0, and then back on for\n\t\t * frame 1. You can use the \"visible\" property to achieve the same effect.\n\t\t *\n\t\t *      var tween = createjs.Tween.get(target).to({_off:false})\n\t\t *          .wait(1).to({_off:true})\n\t\t *          .wait(1).to({_off:false});\n\t\t *\n\t\t * @property timeline\n\t\t * @type Timeline\n\t\t * @default null\n\t\t */\n\t\tthis.timeline = new createjs.Timeline(props);\n\t\t\n\t\t\n\t// private properties:\n\t\t/**\n\t\t * @property _synchOffset\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @private\n\t\t */\n\t\tthis._synchOffset = 0;\n\t\n\t\t/**\n\t\t * @property _rawPosition\n\t\t * @type Number\n\t\t * @default -1\n\t\t * @private\n\t\t */\n\t\tthis._rawPosition = -1; // TODO: evaluate using a ._reset Boolean prop instead of -1.\n\t\t\n\t\t/**\n\t\t * @property _bound_resolveState\n\t\t * @type Function\n\t\t * @private\n\t\t */\n\t\tthis._bound_resolveState = this._resolveState.bind(this);\n\t\n\t\n\t\t/**\n\t\t * The time remaining from the previous tick, only applicable when .framerate is set.\n\t\t * @property _t\n\t\t * @type Number\n\t\t * @private\n\t\t */\n\t\tthis._t = 0;\n\t\n\t\t/**\n\t\t * List of display objects that are actively being managed by the MovieClip.\n\t\t * @property _managed\n\t\t * @type Object\n\t\t * @private\n\t\t */\n\t\tthis._managed = {};\n\t}\n\tvar p = createjs.extend(MovieClip, createjs.Container);\n\n\n// constants:\n\t/**\n\t * The MovieClip will advance independently of its parent, even if its parent is paused.\n\t * This is the default mode.\n\t * @property INDEPENDENT\n\t * @static\n\t * @type String\n\t * @default \"independent\"\n\t * @readonly\n\t **/\n\tMovieClip.INDEPENDENT = \"independent\";\n\n\t/**\n\t * The MovieClip will only display a single frame (as determined by the startPosition property).\n\t * @property SINGLE_FRAME\n\t * @static\n\t * @type String\n\t * @default \"single\"\n\t * @readonly\n\t **/\n\tMovieClip.SINGLE_FRAME = \"single\";\n\n\t/**\n\t * The MovieClip will be advanced only when its parent advances and will be synched to the position of\n\t * the parent MovieClip.\n\t * @property SYNCHED\n\t * @static\n\t * @type String\n\t * @default \"synched\"\n\t * @readonly\n\t **/\n\tMovieClip.SYNCHED = \"synched\";\n\t\n\t\n// static properties:\n\tMovieClip.inited = false;\n\t\n\t\n// static methods:\n\tMovieClip.init = function() {\n\t\tif (MovieClip.inited) { return; }\n\t\t// plugins introduce some overhead to Tween, so we only install this if an MC is instantiated.\n\t\tMovieClipPlugin.install();\n\t\tMovieClip.inited = true;\n\t};\n\t\n\t\n// getter / setters:\n\t/**\n\t * Use the {{#crossLink \"MovieClip/labels:property\"}}{{/crossLink}} property instead.\n\t * @method _getLabels\n\t * @protected\n\t * @return {Array}\n\t **/\n\tp._getLabels = function() {\n\t\treturn this.timeline.getLabels();\n\t};\n\t// MovieClip.getLabels is @deprecated. Remove for 1.1+\n\tp.getLabels = createjs.deprecate(p._getLabels, \"MovieClip.getLabels\");\n\n\t/**\n\t * Use the {{#crossLink \"MovieClip/currentLabel:property\"}}{{/crossLink}} property instead.\n\t * @method _getCurrentLabel\n\t * @protected\n\t * @return {String}\n\t **/\n\tp._getCurrentLabel = function() {\n\t\treturn this.timeline.currentLabel;\n\t};\n\t// MovieClip.getCurrentLabel is @deprecated. Remove for 1.1+\n\tp.getCurrentLabel = createjs.deprecate(p._getCurrentLabel, \"MovieClip.getCurrentLabel\");\n\n\t/**\n\t * Use the {{#crossLink \"MovieClip/duration:property\"}}{{/crossLink}} property instead.\n\t * @method _getDuration\n\t * @protected\n\t * @return {Number}\n\t **/\n\tp._getDuration = function() {\n\t\treturn this.timeline.duration;\n\t};\n\t// MovieClip.getDuration is @deprecated. Remove for 1.1+\n\tp.getDuration = createjs.deprecate(p._getDuration, \"MovieClip.getDuration\");\n\n\t/**\n\t * Returns an array of objects with label and position (aka frame) properties, sorted by position.\n\t * @property labels\n\t * @type {Array}\n\t * @readonly\n\t **/\n\t\n\t/**\n\t * Returns the name of the label on or immediately before the current frame.\n\t * @property currentLabel\n\t * @type {String}\n\t * @readonly\n\t **/\n\t\n\t/**\n\t * Returns the duration of this MovieClip in seconds or ticks.\n\t * @property totalFrames\n\t * @type {Number}\n\t * @readonly\n\t **/\n\t\n\t/**\n\t * Returns the duration of this MovieClip in seconds or ticks.\n\t * @property duration\n\t * @type {Number}\n\t * @readonly\n\t **/\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tlabels: { get: p._getLabels },\n\t\t\tcurrentLabel: { get: p._getCurrentLabel },\n\t\t\ttotalFrames: { get: p._getDuration },\n\t\t\tduration: { get: p._getDuration }\n\t\t\t// TODO: can we just proxy .currentFrame to tl.position as well? Ditto for .loop (or just remove entirely).\n\t\t});\n\t} catch (e) {}\n\n\n// public methods:\n\t/**\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\n\t * @method initialize\n\t * @deprecated in favour of `createjs.promote()`\n\t **/\n\tp.initialize = MovieClip; // TODO: Deprecated. This is for backwards support of Adobe Flash/Animate\n\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\n\t **/\n\tp.isVisible = function() {\n\t\t// children are placed in draw, so we can't determine if we have content.\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0);\n\t};\n\n\t/**\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\n\t * into itself).\n\t **/\n\tp.draw = function(ctx, ignoreCache) {\n\t\t// draw to cache first:\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\n\t\tthis._updateState();\n\t\tthis.Container_draw(ctx, ignoreCache);\n\t\treturn true;\n\t};\n\n\t/**\n\t * Sets paused to false.\n\t * @method play\n\t **/\n\tp.play = function() {\n\t\tthis.paused = false;\n\t};\n\t\n\t/**\n\t * Sets paused to true.\n\t * @method stop\n\t **/\n\tp.stop = function() {\n\t\tthis.paused = true;\n\t};\n\t\n\t/**\n\t * Advances this movie clip to the specified position or label and sets paused to false.\n\t * @method gotoAndPlay\n\t * @param {String|Number} positionOrLabel The animation name or frame number to go to.\n\t **/\n\tp.gotoAndPlay = function(positionOrLabel) {\n\t\tthis.paused = false;\n\t\tthis._goto(positionOrLabel);\n\t};\n\t\n\t/**\n\t * Advances this movie clip to the specified position or label and sets paused to true.\n\t * @method gotoAndStop\n\t * @param {String|Number} positionOrLabel The animation or frame name to go to.\n\t **/\n\tp.gotoAndStop = function(positionOrLabel) {\n\t\tthis.paused = true;\n\t\tthis._goto(positionOrLabel);\n\t};\n\t\n\t/**\n\t * Advances the playhead. This occurs automatically each tick by default.\n\t * @param [time] {Number} The amount of time in ms to advance by. Only applicable if framerate is set.\n\t * @method advance\n\t*/\n\tp.advance = function(time) {\n\t\tvar independent = MovieClip.INDEPENDENT;\n\t\tif (this.mode !== independent) { return; } // update happens in draw for synched clips\n\t\t\n\t\t// if this MC doesn't have a framerate, hunt ancestors for one:\n\t\tvar o=this, fps = o.framerate;\n\t\twhile ((o = o.parent) && fps === null) { if (o.mode === independent) { fps = o._framerate; } }\n\t\tthis._framerate = fps;\n\t\t\n\t\tif (this.paused) { return; }\n\t\t\n\t\t// calculate how many frames to advance:\n\t\tvar t = (fps !== null && fps !== -1 && time !== null) ? time/(1000/fps) + this._t : 1;\n\t\tvar frames = t|0;\n\t\tthis._t = t-frames; // leftover time, save to add to next advance.\n\t\t\n\t\twhile (frames--) { this._updateTimeline(this._rawPosition+1, false); }\n\t};\n\t\n\t/**\n\t * MovieClip instances cannot be cloned.\n\t * @method clone\n\t **/\n\tp.clone = function() {\n\t\t// TODO: add support for this? Need to clone the Timeline & retarget tweens - pretty complex.\n\t\tthrow(\"MovieClip cannot be cloned.\");\n\t};\n\t\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[MovieClip (name=\"+  this.name +\")]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * Docced in superclass.\n\t **/\n\tp._updateState = function() {\n\t\tif (this._rawPosition === -1 || this.mode !== MovieClip.INDEPENDENT) { this._updateTimeline(-1); }\n\t};\n\n\t/**\n\t * @method _tick\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\n\t * function.\n\t * @protected\n\t **/\n\tp._tick = function(evtObj) {\n\t\tthis.advance(evtObj&&evtObj.delta);\n\t\tthis.Container__tick(evtObj);\n\t};\n\t\n\t/**\n\t * @method _goto\n\t * @param {String|Number} positionOrLabel The animation name or frame number to go to.\n\t * @protected\n\t **/\n\tp._goto = function(positionOrLabel) {\n\t\tvar pos = this.timeline.resolve(positionOrLabel);\n\t\tif (pos == null) { return; }\n\t\tthis._t = 0;\n\t\tthis._updateTimeline(pos, true);\n\t};\n\t\n\t/**\n\t * @method _reset\n\t * @private\n\t **/\n\tp._reset = function() {\n\t\tthis._rawPosition = -1;\n\t\tthis._t = this.currentFrame = 0;\n\t\tthis.paused = false;\n\t};\n\t\n\t/**\n\t * @method _updateTimeline\n\t * @param {Boolean} jump Indicates whether this update is due to jumping (via gotoAndXX) to a new position.\n\t * @protected\n\t **/\n\tp._updateTimeline = function(rawPosition, jump) {\n\t\tvar synced = this.mode !== MovieClip.INDEPENDENT, tl = this.timeline;\n\t\tif (synced) { rawPosition = this.startPosition + (this.mode===MovieClip.SINGLE_FRAME?0:this._synchOffset); }\n\t\tif (rawPosition < 0) { rawPosition = 0; }\n\t\tif (this._rawPosition === rawPosition && !synced) { return; }\n\t\tthis._rawPosition = rawPosition;\n\t\t\n\t\t// update timeline position, ignoring actions if this is a graphic.\n\t\ttl.loop = this.loop; // TODO: should we maintain this on MovieClip, or just have it on timeline?\n\t\ttl.setPosition(rawPosition, synced || !this.actionsEnabled, jump, this._bound_resolveState);\n\t};\n\t\n\t/**\n\t * Renders position 0 without running actions or updating _rawPosition.\n\t * Primarily used by Animate CC to build out the first frame in the constructor of MC symbols.\n\t * NOTE: not tested when run after the MC advances past the first frame.\n\t * @method _renderFirstFrame\n\t * @protected\n\t **/\n\tp._renderFirstFrame = function() {\n\t\tvar tl = this.timeline, pos = tl.rawPosition;\n\t\ttl.setPosition(0, true, true, this._bound_resolveState);\n\t\ttl.rawPosition = pos;\n\t};\n\t\n\t/**\n\t * Runs via a callback after timeline property updates and before actions.\n\t * @method _resolveState\n\t * @protected\n\t **/\n\tp._resolveState = function() {\n\t\tvar tl = this.timeline;\n\t\tthis.currentFrame = tl.position;\n\t\t\n\t\tfor (var n in this._managed) { this._managed[n] = 1; }\n\n\t\tvar tweens = tl.tweens;\n\t\tfor (var i=0, l=tweens.length; i<l; i++) {\n\t\t\tvar tween = tweens[i],  target = tween.target;\n\t\t\tif (target === this || tween.passive) { continue; } // TODO: this assumes the actions tween from Animate has `this` as the target. There's likely a better approach.\n\t\t\tvar offset = tween._stepPosition;\n\n\t\t\tif (target instanceof createjs.DisplayObject) {\n\t\t\t\t// motion tween.\n\t\t\t\tthis._addManagedChild(target, offset);\n\t\t\t} else {\n\t\t\t\t// state tween.\n\t\t\t\tthis._setState(target.state, offset);\n\t\t\t}\n\t\t}\n\n\t\tvar kids = this.children;\n\t\tfor (i=kids.length-1; i>=0; i--) {\n\t\t\tvar id = kids[i].id;\n\t\t\tif (this._managed[id] === 1) {\n\t\t\t\tthis.removeChildAt(i);\n\t\t\t\tdelete(this._managed[id]);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @method _setState\n\t * @param {Array} state\n\t * @param {Number} offset\n\t * @protected\n\t **/\n\tp._setState = function(state, offset) {\n\t\tif (!state) { return; }\n\t\tfor (var i=state.length-1;i>=0;i--) {\n\t\t\tvar o = state[i];\n\t\t\tvar target = o.t;\n\t\t\tvar props = o.p;\n\t\t\tfor (var n in props) { target[n] = props[n]; }\n\t\t\tthis._addManagedChild(target, offset);\n\t\t}\n\t};\n\n\t/**\n\t * Adds a child to the timeline, and sets it up as a managed child.\n\t * @method _addManagedChild\n\t * @param {MovieClip} child The child MovieClip to manage\n\t * @param {Number} offset\n\t * @private\n\t **/\n\tp._addManagedChild = function(child, offset) {\n\t\tif (child._off) { return; }\n\t\tthis.addChildAt(child,0);\n\n\t\tif (child instanceof MovieClip) {\n\t\t\tchild._synchOffset = offset;\n\t\t\t// TODO: this does not precisely match Adobe Flash/Animate, which loses track of the clip if it is renamed or removed from the timeline, which causes it to reset.\n\t\t\t// TODO: should also reset when MovieClip loops, though that will be a bit tricky to detect.\n\t\t\tif (child.mode === MovieClip.INDEPENDENT && child.autoReset && (!this._managed[child.id])) { child._reset(); }\n\t\t}\n\t\tthis._managed[child.id] = 2;\n\t};\n\t\n\t/**\n\t * @method _getBounds\n\t * @param {Matrix2D} matrix\n\t * @param {Boolean} ignoreTransform\n\t * @return {Rectangle}\n\t * @protected\n\t **/\n\tp._getBounds = function(matrix, ignoreTransform) {\n\t\tvar bounds = this.DisplayObject_getBounds();\n\t\tif (!bounds) {\n\t\t\tif (this.frameBounds) { bounds = this._rectangle.copy(this.frameBounds[this.currentFrame]); }\n\t\t}\n\t\tif (bounds) { return this._transformBounds(bounds, matrix, ignoreTransform); }\n\t\treturn this.Container__getBounds(matrix, ignoreTransform);\n\t};\n\n\n\tcreatejs.MovieClip = createjs.promote(MovieClip, \"Container\");\n\n\n\n// MovieClipPlugin for TweenJS:\n\t/**\n\t * This plugin works with <a href=\"http://tweenjs.com\" target=\"_blank\">TweenJS</a> to prevent the startPosition\n\t * property from tweening.\n\t * @private\n\t * @class MovieClipPlugin\n\t * @constructor\n\t **/\n\tfunction MovieClipPlugin() {\n\t\tthrow(\"MovieClipPlugin cannot be instantiated.\")\n\t}\n\t\n\t/**\n\t * @property priority\n\t * @type {Number}\n\t * @static\n\t * @readonly\n\t **/\n\tMovieClipPlugin.priority = 100; // very high priority, should run first\n\t\n\t/**\n\t * @property ID\n\t * @type {String}\n\t * @static\n\t * @readonly\n\t **/\n\tMovieClipPlugin.ID = \"MovieClip\";\n\n\t/**\n\t * @method install\n\t * @static\n\t **/\n\tMovieClipPlugin.install = function() {\n\t\tcreatejs.Tween._installPlugin(MovieClipPlugin);\n\t};\n\t\n\t/**\n\t * @method init\n\t * @param {Tween} tween\n\t * @param {String} prop\n\t * @param {*} value\n\t * @static\n\t **/\n\tMovieClipPlugin.init = function(tween, prop, value) {\n\t\tif (prop === \"startPosition\" && tween.target instanceof MovieClip) { tween._addPlugin(MovieClipPlugin); }\n\t};\n\t\n\t/**\n\t * @method step\n\t * @param {Tween} tween\n\t * @param {TweenStep} step\n\t * @param {Object} props\n\t * @static\n\t **/\n\tMovieClipPlugin.step = function(tween, step, props) {};\n\n\t/**\n\t * @method change\n\t * @param {Tween} tween\n\t * @param {TweenStep} step\n\t * @param {*} value\n\t * @param {Number} ratio\n\t * @param {Object} end\n\t * @return {*}\n\t * @static\n\t */\n\tMovieClipPlugin.change = function(tween, step, prop, value, ratio, end) {\n\t\tif (prop === \"startPosition\") { return (ratio === 1 ? step.props[prop] : step.prev.props[prop]); }\n\t};\n\n}());\n\n//##############################################################################\n// SpriteSheetUtils.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\t\r\n\t\r\n// constructor:\r\n\t/**\r\n\t * The SpriteSheetUtils class is a collection of static methods for working with {{#crossLink \"SpriteSheet\"}}{{/crossLink}}s.\r\n\t * A sprite sheet is a series of images (usually animation frames) combined into a single image on a regular grid. For\r\n\t * example, an animation consisting of 8 100x100 images could be combined into a 400x200 sprite sheet (4 frames across\r\n\t * by 2 high). The SpriteSheetUtils class uses a static interface and should not be instantiated.\r\n\t * @class SpriteSheetUtils\r\n\t * @static\r\n\t **/\r\n\tfunction SpriteSheetUtils() {\r\n\t\tthrow \"SpriteSheetUtils cannot be instantiated\";\r\n\t}\r\n\r\n\r\n// private static properties:\r\n\t/**\r\n\t * @property _workingCanvas\r\n\t * @static\r\n\t * @type HTMLCanvasElement | Object\r\n\t * @protected\r\n\t*/\r\n\t/**\r\n\t * @property _workingContext\r\n\t * @static\r\n\t * @type CanvasRenderingContext2D\r\n\t * @protected\r\n\t*/\r\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\r\n\tif (canvas.getContext) {\r\n\t\tSpriteSheetUtils._workingCanvas = canvas;\r\n\t\tSpriteSheetUtils._workingContext = canvas.getContext(\"2d\");\r\n\t\tcanvas.width = canvas.height = 1;\r\n\t}\r\n\r\n\r\n// public static methods:\r\n\t/**\r\n\t * Returns a single frame of the specified sprite sheet as a new PNG image. An example of when this may be useful is\r\n\t * to use a spritesheet frame as the source for a bitmap fill.\r\n\t *\r\n\t * <strong>WARNING:</strong> In almost all cases it is better to display a single frame using a {{#crossLink \"Sprite\"}}{{/crossLink}}\r\n\t * with a {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} call than it is to slice out a frame using this\r\n\t * method and display it with a Bitmap instance. You can also crop an image using the {{#crossLink \"Bitmap/sourceRect\"}}{{/crossLink}}\r\n\t * property of {{#crossLink \"Bitmap\"}}{{/crossLink}}.\r\n\t *\r\n\t * The extractFrame method may cause cross-domain warnings since it accesses pixels directly on the canvas.\r\n\t * @method extractFrame\r\n\t * @static\r\n\t * @param {SpriteSheet} spriteSheet The SpriteSheet instance to extract a frame from.\r\n\t * @param {Number|String} frameOrAnimation The frame number or animation name to extract. If an animation\r\n\t * name is specified, only the first frame of the animation will be extracted.\r\n\t * @return {HTMLImageElement} a single frame of the specified sprite sheet as a new PNG image.\r\n\t*/\r\n\tSpriteSheetUtils.extractFrame = function(spriteSheet, frameOrAnimation) {\r\n\t\tif (isNaN(frameOrAnimation)) {\r\n\t\t\tframeOrAnimation = spriteSheet.getAnimation(frameOrAnimation).frames[0];\r\n\t\t}\r\n\t\tvar data = spriteSheet.getFrame(frameOrAnimation);\r\n\t\tif (!data) { return null; }\r\n\t\tvar r = data.rect;\r\n\t\tvar canvas = SpriteSheetUtils._workingCanvas;\r\n\t\tcanvas.width = r.width;\r\n\t\tcanvas.height = r.height;\r\n\t\tSpriteSheetUtils._workingContext.drawImage(data.image, r.x, r.y, r.width, r.height, 0, 0, r.width, r.height);\r\n\t\tvar img = document.createElement(\"img\");\r\n\t\timg.src = canvas.toDataURL(\"image/png\");\r\n\t\treturn img;\r\n\t};\r\n\r\n\t// SpriteSheetUtils.addFlippedFrames is @deprecated. Remove for 1.1+\r\n\tSpriteSheetUtils.addFlippedFrames = createjs.deprecate(null, \"SpriteSheetUtils.addFlippedFrames\");\r\n\r\n\t// SpriteSheetUtils.addFlippedFrames is @deprecated. Remove for 1.1+\r\n\tSpriteSheetUtils.mergeAlpha = createjs.deprecate(null, \"SpriteSheetUtils.mergeAlpha\");\r\n\r\n\t\r\n// private static methods:\r\n\tSpriteSheetUtils._flip = function(spriteSheet, count, h, v) {\r\n\t\tvar imgs = spriteSheet._images;\r\n\t\tvar canvas = SpriteSheetUtils._workingCanvas;\r\n\t\tvar ctx = SpriteSheetUtils._workingContext;\r\n\t\tvar il = imgs.length/count;\r\n\t\tfor (var i=0;i<il;i++) {\r\n\t\t\tvar src = imgs[i];\r\n\t\t\tsrc.__tmp = i; // a bit hacky, but faster than doing indexOf below.\r\n\t\t\tctx.setTransform(1,0,0,1,0,0);\r\n\t\t\tctx.clearRect(0,0,canvas.width+1,canvas.height+1);\r\n\t\t\tcanvas.width = src.width;\r\n\t\t\tcanvas.height = src.height;\r\n\t\t\tctx.setTransform(h?-1:1, 0, 0, v?-1:1, h?src.width:0, v?src.height:0);\r\n\t\t\tctx.drawImage(src,0,0);\r\n\t\t\tvar img = document.createElement(\"img\");\r\n\t\t\timg.src = canvas.toDataURL(\"image/png\");\r\n\t\t\t// work around a strange bug in Safari:\r\n\t\t\timg.width = (src.width||src.naturalWidth);\r\n\t\t\timg.height = (src.height||src.naturalHeight);\r\n\t\t\timgs.push(img);\r\n\t\t}\r\n\r\n\t\tvar frames = spriteSheet._frames;\r\n\t\tvar fl = frames.length/count;\r\n\t\tfor (i=0;i<fl;i++) {\r\n\t\t\tsrc = frames[i];\r\n\t\t\tvar rect = src.rect.clone();\r\n\t\t\timg = imgs[src.image.__tmp+il*count];\r\n\r\n\t\t\tvar frame = {image:img,rect:rect,regX:src.regX,regY:src.regY};\r\n\t\t\tif (h) {\r\n\t\t\t\trect.x = (img.width||img.naturalWidth)-rect.x-rect.width; // update rect\r\n\t\t\t\tframe.regX = rect.width-src.regX; // update registration point\r\n\t\t\t}\r\n\t\t\tif (v) {\r\n\t\t\t\trect.y = (img.height||img.naturalHeight)-rect.y-rect.height;  // update rect\r\n\t\t\t\tframe.regY = rect.height-src.regY; // update registration point\r\n\t\t\t}\r\n\t\t\tframes.push(frame);\r\n\t\t}\r\n\r\n\t\tvar sfx = \"_\"+(h?\"h\":\"\")+(v?\"v\":\"\");\r\n\t\tvar names = spriteSheet._animations;\r\n\t\tvar data = spriteSheet._data;\r\n\t\tvar al = names.length/count;\r\n\t\tfor (i=0;i<al;i++) {\r\n\t\t\tvar name = names[i];\r\n\t\t\tsrc = data[name];\r\n\t\t\tvar anim = {name:name+sfx,speed:src.speed,next:src.next,frames:[]};\r\n\t\t\tif (src.next) { anim.next += sfx; }\r\n\t\t\tframes = src.frames;\r\n\t\t\tfor (var j=0,l=frames.length;j<l;j++) {\r\n\t\t\t\tanim.frames.push(frames[j]+fl*count);\r\n\t\t\t}\r\n\t\t\tdata[anim.name] = anim;\r\n\t\t\tnames.push(anim.name);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tcreatejs.SpriteSheetUtils = SpriteSheetUtils;\r\n}());\n\n//##############################################################################\n// SpriteSheetBuilder.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The SpriteSheetBuilder allows you to generate {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instances at run time\n\t * from any display object. This can allow you to maintain your assets as vector graphics (for low file size), and\n\t * render them at run time as SpriteSheets for better performance.\n\t *\n\t * SpriteSheets can be built either synchronously, or asynchronously, so that large SpriteSheets can be generated\n\t * without locking the UI.\n\t *\n\t * Note that the \"images\" used in the generated SpriteSheet are actually canvas elements, and that they will be\n\t * sized to the nearest power of 2 up to the value of {{#crossLink \"SpriteSheetBuilder/maxWidth:property\"}}{{/crossLink}}\n\t * or {{#crossLink \"SpriteSheetBuilder/maxHeight:property\"}}{{/crossLink}}.\n\t * @class SpriteSheetBuilder\n\t * @param {Number} [framerate=0] The {{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} of\n\t * {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instances that are created.\n\t * @extends EventDispatcher\n\t * @constructor\n\t **/\n\tfunction SpriteSheetBuilder(framerate) {\n\t\tthis.EventDispatcher_constructor();\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The maximum width for the images (not individual frames) in the generated SpriteSheet. It is recommended to\n\t\t * use a power of 2 for this value (ex. 1024, 2048, 4096). If the frames cannot all fit within the max\n\t\t * dimensions, then additional images will be created as needed.\n\t\t * @property maxWidth\n\t\t * @type Number\n\t\t * @default 2048\n\t\t*/\n\t\tthis.maxWidth = 2048;\n\t\n\t\t/**\n\t\t * The maximum height for the images (not individual frames) in the generated SpriteSheet. It is recommended to\n\t\t * use a power of 2 for this value (ex. 1024, 2048, 4096). If the frames cannot all fit within the max\n\t\t * dimensions, then additional images will be created as needed.\n\t\t * @property maxHeight\n\t\t * @type Number\n\t\t * @default 2048\n\t\t **/\n\t\tthis.maxHeight = 2048;\n\t\n\t\t/**\n\t\t * The SpriteSheet that was generated. This will be null before a build is completed successfully.\n\t\t * @property spriteSheet\n\t\t * @type SpriteSheet\n\t\t **/\n\t\tthis.spriteSheet = null;\n\t\n\t\t/**\n\t\t * The scale to apply when drawing all frames to the SpriteSheet. This is multiplied against any scale specified\n\t\t * in the addFrame call. This can be used, for example, to generate a SpriteSheet at run time that is tailored\n\t\t * to the a specific device resolution (ex. tablet vs mobile).\n\t\t * @property scale\n\t\t * @type Number\n\t\t * @default 1\n\t\t **/\n\t\tthis.scale = 1;\n\t\n\t\t/**\n\t\t* The padding to use between frames. This is helpful to preserve antialiasing on drawn vector content.\n\t\t* @property padding\n\t\t* @type Number\n\t\t* @default 1\n\t\t**/\n\t\tthis.padding = 1;\n\t\n\t\t/**\n\t\t * A number from 0.01 to 0.99 that indicates what percentage of time the builder can use. This can be\n\t\t * thought of as the number of seconds per second the builder will use. For example, with a timeSlice value of 0.3,\n\t\t * the builder will run 20 times per second, using approximately 15ms per build (30% of available time, or 0.3s per second).\n\t\t * Defaults to 0.3.\n\t\t * @property timeSlice\n\t\t * @type Number\n\t\t * @default 0.3\n\t\t **/\n\t\tthis.timeSlice = 0.3;\n\t\n\t\t/**\n\t\t * A value between 0 and 1 that indicates the progress of a build, or -1 if a build has not\n\t\t * been initiated.\n\t\t * @property progress\n\t\t * @type Number\n\t\t * @default -1\n\t\t * @readonly\n\t\t */\n\t\tthis.progress = -1;\n\n\t\t/**\n\t\t * A {{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} value that will be passed to new {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instances that are\n\t\t * created. If no framerate is specified (or it is 0), then SpriteSheets will use the {{#crossLink \"Ticker\"}}{{/crossLink}}\n\t\t * framerate.\n\t\t * @property framerate\n\t\t * @type Number\n\t\t * @default 0\n\t\t */\n\t\tthis.framerate = framerate || 0;\n\t\n\t\n\t// private properties:\n\t\t/**\n\t\t * @property _frames\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._frames = [];\n\t\n\t\t/**\n\t\t * @property _animations\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._animations = {};\n\t\n\t\t/**\n\t\t * @property _data\n\t\t * @protected\n\t\t * @type Array\n\t\t **/\n\t\tthis._data = null;\n\t\n\t\t/**\n\t\t * @property _nextFrameIndex\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._nextFrameIndex = 0;\n\t\n\t\t/**\n\t\t * @property _index\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._index = 0;\n\t\n\t\t/**\n\t\t * @property _timerID\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._timerID = null;\n\t\n\t\t/**\n\t\t * @property _scale\n\t\t * @protected\n\t\t * @type Number\n\t\t **/\n\t\tthis._scale = 1;\n\t}\n\tvar p = createjs.extend(SpriteSheetBuilder, createjs.EventDispatcher);\n\n// constants:\n\tSpriteSheetBuilder.ERR_DIMENSIONS = \"frame dimensions exceed max spritesheet dimensions\";\n\tSpriteSheetBuilder.ERR_RUNNING = \"a build is already running\";\n\n// events:\n\t/**\n\t * Dispatched when a build completes.\n\t * @event complete\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * Dispatched when an asynchronous build has progress.\n\t * @event progress\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {Number} progress The current progress value (0-1).\n\t * @since 0.6.0\n\t */\n\n\n// public methods:\n\t/**\n\t * Adds a frame to the {{#crossLink \"SpriteSheet\"}}{{/crossLink}}. Note that the frame will not be drawn until you\n\t * call {{#crossLink \"SpriteSheetBuilder/build\"}}{{/crossLink}} method. The optional setup params allow you to have\n\t * a function run immediately before the draw occurs. For example, this allows you to add a single source multiple\n\t * times, but manipulate it or its children to change it to generate different frames.\n\t *\n\t * Note that the source's transformations (x, y, scale, rotate, alpha) will be ignored, except for regX/Y. To apply\n\t * transforms to a source object and have them captured in the SpriteSheet, simply place it into a {{#crossLink \"Container\"}}{{/crossLink}}\n\t * and pass in the Container as the source.\n\t * @method addFrame\n\t * @param {DisplayObject} source The source {{#crossLink \"DisplayObject\"}}{{/crossLink}}  to draw as the frame.\n\t * @param {Rectangle} [sourceRect] A {{#crossLink \"Rectangle\"}}{{/crossLink}} defining the portion of the\n\t * source to draw to the frame. If not specified, it will look for a `getBounds` method, bounds property, or\n\t * `nominalBounds` property on the source to use. If one is not found, the frame will be skipped.\n\t * @param {Number} [scale=1] Optional. The scale to draw this frame at. Default is 1.\n\t * @param {Function} [setupFunction] A function to call immediately before drawing this frame. It will be called with two parameters: the source, and setupData.\n\t * @param {Object} [setupData] Arbitrary setup data to pass to setupFunction as the second parameter.\n\t * @return {Number} The index of the frame that was just added, or null if a sourceRect could not be determined.\n\t **/\n\tp.addFrame = function(source, sourceRect, scale, setupFunction, setupData) {\n\t\tif (this._data) { throw SpriteSheetBuilder.ERR_RUNNING; }\n\t\tvar rect = sourceRect||source.bounds||source.nominalBounds;\n\t\tif (!rect&&source.getBounds) { rect = source.getBounds(); }\n\t\tif (!rect) { return null; }\n\t\tscale = scale||1;\n\t\treturn this._frames.push({source:source, sourceRect:rect, scale:scale, funct:setupFunction, data:setupData, index:this._frames.length, height:rect.height*scale})-1;\n\t};\n\n\t/**\n\t * Adds an animation that will be included in the created {{#crossLink \"SpriteSheet\"}}{{/crossLink}}.\n\t * @method addAnimation\n\t * @param {String} name The name for the animation.\n\t * @param {Array} frames An array of frame indexes that comprise the animation. Ex. [3,6,5] would describe an animation\n\t * that played frame indexes 3, 6, and 5 in that order.\n\t * @param {String} [next] Specifies the name of the animation to continue to after this animation ends. You can\n\t * also pass false to have the animation stop when it ends. By default it will loop to the start of the same animation.\n\t * @param {Number} [speed] Specifies a frame advance speed for this animation. For example, a value of 0.5 would\n\t * cause the animation to advance every second tick. Note that earlier versions used `frequency` instead, which had\n\t * the opposite effect.\n\t **/\n\tp.addAnimation = function(name, frames, next, speed) {\n\t\tif (this._data) { throw SpriteSheetBuilder.ERR_RUNNING; }\n\t\tthis._animations[name] = {frames:frames, next:next, speed:speed};\n\t};\n\n\t/**\n\t * This will take a {{#crossLink \"MovieClip\"}}{{/crossLink}} instance, and add its frames and labels to this\n\t * builder. Labels will be added as an animation running from the label index to the next label. For example, if\n\t * there is a label named \"foo\" at frame 0 and a label named \"bar\" at frame 10, in a MovieClip with 15 frames, it\n\t * will add an animation named \"foo\" that runs from frame index 0 to 9, and an animation named \"bar\" that runs from\n\t * frame index 10 to 14.\n\t *\n\t * Note that this will iterate through the full MovieClip with {{#crossLink \"MovieClip/actionsEnabled:property\"}}{{/crossLink}}\n\t * set to `false`, ending on the last frame.\n\t * @method addMovieClip\n\t * @param {MovieClip} source The source MovieClip instance to add to the SpriteSheet.\n\t * @param {Rectangle} [sourceRect] A {{#crossLink \"Rectangle\"}}{{/crossLink}} defining the portion of the source to\n\t * draw to the frame. If not specified, it will look for a {{#crossLink \"DisplayObject/getBounds\"}}{{/crossLink}}\n\t * method, `frameBounds` Array, `bounds` property, or `nominalBounds` property on the source to use. If one is not\n\t * found, the MovieClip will be skipped.\n\t * @param {Number} [scale=1] The scale to draw the movie clip at.\n\t * @param {Function} [setupFunction] A function to call immediately before drawing each frame. It will be called\n\t * with three parameters: the source, setupData, and the frame index.\n\t * @param {Object} [setupData] Arbitrary setup data to pass to setupFunction as the second parameter.\n\t * @param {Function} [labelFunction] This method will be called for each MovieClip label that is added with four\n\t * parameters: the label name, the source MovieClip instance, the starting frame index (in the movieclip timeline)\n\t * and the end index. It must return a new name for the label/animation, or `false` to exclude the label.\n\t **/\n\tp.addMovieClip = function(source, sourceRect, scale, setupFunction, setupData, labelFunction) {\n\t\tif (this._data) { throw SpriteSheetBuilder.ERR_RUNNING; }\n\t\tvar rects = source.frameBounds;\n\t\tvar rect = sourceRect||source.bounds||source.nominalBounds;\n\t\tif (!rect&&source.getBounds) { rect = source.getBounds(); }\n\t\tif (!rect && !rects) { return; }\n\n\t\tvar i, l, baseFrameIndex = this._frames.length;\n\t\tvar duration = source.timeline.duration;\n\t\tfor (i=0; i<duration; i++) {\n\t\t\tvar r = (rects&&rects[i]) ? rects[i] : rect;\n\t\t\tthis.addFrame(source, r, scale, this._setupMovieClipFrame, {i:i, f:setupFunction, d:setupData});\n\t\t}\n\t\tvar labels = source.timeline._labels;\n\t\tvar lbls = [];\n\t\tfor (var n in labels) {\n\t\t\tlbls.push({index:labels[n], label:n});\n\t\t}\n\t\tif (lbls.length) {\n\t\t\tlbls.sort(function(a,b){ return a.index-b.index; });\n\t\t\tfor (i=0,l=lbls.length; i<l; i++) {\n\t\t\t\tvar label = lbls[i].label;\n\t\t\t\tvar start = baseFrameIndex+lbls[i].index;\n\t\t\t\tvar end = baseFrameIndex+((i == l-1) ? duration : lbls[i+1].index);\n\t\t\t\tvar frames = [];\n\t\t\t\tfor (var j=start; j<end; j++) { frames.push(j); }\n\t\t\t\tif (labelFunction) {\n\t\t\t\t\tlabel = labelFunction(label, source, start, end);\n\t\t\t\t\tif (!label) { continue; }\n\t\t\t\t}\n\t\t\t\tthis.addAnimation(label, frames, true); // for now, this loops all animations.\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Builds a {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance based on the current frames.\n\t * @method build\n\t * @return {SpriteSheet} The created SpriteSheet instance, or null if a build is already running or an error\n\t * occurred.\n\t **/\n\tp.build = function() {\n\t\tif (this._data) { throw SpriteSheetBuilder.ERR_RUNNING; }\n\t\tthis._startBuild();\n\t\twhile (this._drawNext()) {}\n\t\tthis._endBuild();\n\t\treturn this.spriteSheet;\n\t};\n\n\t/**\n\t * Asynchronously builds a {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance based on the current frames. It will\n\t * run 20 times per second, using an amount of time defined by `timeSlice`. When it is complete it will call the\n\t * specified callback.\n\t * @method buildAsync\n\t * @param {Number} [timeSlice] Sets the timeSlice property on this instance.\n\t **/\n\tp.buildAsync = function(timeSlice) {\n\t\tif (this._data) { throw SpriteSheetBuilder.ERR_RUNNING; }\n\t\tthis.timeSlice = timeSlice;\n\t\tthis._startBuild();\n\t\tvar _this = this;\n\t\tthis._timerID = setTimeout(function() { _this._run(); }, 50-Math.max(0.01, Math.min(0.99, this.timeSlice||0.3))*50);\n\t};\n\n\t/**\n\t * Stops the current asynchronous build.\n\t * @method stopAsync\n\t **/\n\tp.stopAsync = function() {\n\t\tclearTimeout(this._timerID);\n\t\tthis._data = null;\n\t};\n\n\t/**\n\t * SpriteSheetBuilder instances cannot be cloned.\n\t * @method clone\n\t **/\n\tp.clone = function() {\n\t\tthrow(\"SpriteSheetBuilder cannot be cloned.\");\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[SpriteSheetBuilder]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * @method _startBuild\n\t * @protected\n\t **/\n\tp._startBuild = function() {\n\t\tvar pad = this.padding||0;\n\t\tthis.progress = 0;\n\t\tthis.spriteSheet = null;\n\t\tthis._index = 0;\n\t\tthis._scale = this.scale;\n\t\tvar dataFrames = [];\n\t\tthis._data = {\n\t\t\timages: [],\n\t\t\tframes: dataFrames,\n\t\t\tframerate: this.framerate,\n\t\t\tanimations: this._animations // TODO: should we \"clone\" _animations in case someone adds more animations after a build?\n\t\t};\n\n\t\tvar frames = this._frames.slice();\n\t\tframes.sort(function(a,b) { return (a.height<=b.height) ? -1 : 1; });\n\n\t\tif (frames[frames.length-1].height+pad*2 > this.maxHeight) { throw SpriteSheetBuilder.ERR_DIMENSIONS; }\n\t\tvar y=0, x=0;\n\t\tvar img = 0;\n\t\twhile (frames.length) {\n\t\t\tvar o = this._fillRow(frames, y, img, dataFrames, pad);\n\t\t\tif (o.w > x) { x = o.w; }\n\t\t\ty += o.h;\n\t\t\tif (!o.h || !frames.length) {\n\t\t\t\tvar canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\n\t\t\t\tcanvas.width = this._getSize(x,this.maxWidth);\n\t\t\t\tcanvas.height = this._getSize(y,this.maxHeight);\n\t\t\t\tthis._data.images[img] = canvas;\n\t\t\t\tif (!o.h) {\n\t\t\t\t\tx=y=0;\n\t\t\t\t\timg++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t * @method _setupMovieClipFrame\n\t * @protected\n\t * @return {Number} The width & height of the row.\n\t **/\n\tp._setupMovieClipFrame = function(source, data) {\n\t\tvar ae = source.actionsEnabled;\n\t\tsource.actionsEnabled = false;\n\t\tsource.gotoAndStop(data.i);\n\t\tsource.actionsEnabled = ae;\n\t\tdata.f&&data.f(source, data.d, data.i);\n\t};\n\n\t/**\n\t * @method _getSize\n\t * @protected\n\t * @return {Number} The width & height of the row.\n\t **/\n\tp._getSize = function(size,max) {\n\t\tvar pow = 4;\n\t\twhile (Math.pow(2,++pow) < size){}\n\t\treturn Math.min(max,Math.pow(2,pow));\n\t};\n\n\t/**\n\t * @method _fillRow\n\t * @param {Array} frames\n\t * @param {Number} y\n\t * @param {HTMLImageElement} img\n\t * @param {Object} dataFrames\n\t * @param {Number} pad\n\t * @protected\n\t * @return {Number} The width & height of the row.\n\t **/\n\tp._fillRow = function(frames, y, img, dataFrames, pad) {\n\t\tvar w = this.maxWidth;\n\t\tvar maxH = this.maxHeight;\n\t\ty += pad;\n\t\tvar h = maxH-y;\n\t\tvar x = pad;\n\t\tvar height = 0;\n\t\tfor (var i=frames.length-1; i>=0; i--) {\n\t\t\tvar frame = frames[i];\n\t\t\tvar sc = this._scale*frame.scale;\n\t\t\tvar rect = frame.sourceRect;\n\t\t\tvar source = frame.source;\n\t\t\tvar rx = Math.floor(sc*rect.x-pad);\n\t\t\tvar ry = Math.floor(sc*rect.y-pad);\n\t\t\tvar rh = Math.ceil(sc*rect.height+pad*2);\n\t\t\tvar rw = Math.ceil(sc*rect.width+pad*2);\n\t\t\tif (rw > w) { throw SpriteSheetBuilder.ERR_DIMENSIONS; }\n\t\t\tif (rh > h || x+rw > w) { continue; }\n\t\t\tframe.img = img;\n\t\t\tframe.rect = new createjs.Rectangle(x,y,rw,rh);\n\t\t\theight = height || rh;\n\t\t\tframes.splice(i,1);\n\t\t\tdataFrames[frame.index] = [x,y,rw,rh,img,Math.round(-rx+sc*source.regX-pad),Math.round(-ry+sc*source.regY-pad)];\n\t\t\tx += rw;\n\t\t}\n\t\treturn {w:x, h:height};\n\t};\n\n\t/**\n\t * @method _endBuild\n\t * @protected\n\t **/\n\tp._endBuild = function() {\n\t\tthis.spriteSheet = new createjs.SpriteSheet(this._data);\n\t\tthis._data = null;\n\t\tthis.progress = 1;\n\t\tthis.dispatchEvent(\"complete\");\n\t};\n\n\t/**\n\t * @method _run\n\t * @protected\n\t **/\n\tp._run = function() {\n\t\tvar ts = Math.max(0.01, Math.min(0.99, this.timeSlice||0.3))*50;\n\t\tvar t = (new Date()).getTime()+ts;\n\t\tvar complete = false;\n\t\twhile (t > (new Date()).getTime()) {\n\t\t\tif (!this._drawNext()) { complete = true; break; }\n\t\t}\n\t\tif (complete) {\n\t\t\tthis._endBuild();\n\t\t} else {\n\t\t\tvar _this = this;\n\t\t\tthis._timerID = setTimeout(function() { _this._run(); }, 50-ts);\n\t\t}\n\t\tvar p = this.progress = this._index/this._frames.length;\n\t\tif (this.hasEventListener(\"progress\")) {\n\t\t\tvar evt = new createjs.Event(\"progress\");\n\t\t\tevt.progress = p;\n\t\t\tthis.dispatchEvent(evt);\n\t\t}\n\t};\n\n\t/**\n\t * @method _drawNext\n\t * @protected\n\t * @return Boolean Returns false if this is the last draw.\n\t **/\n\tp._drawNext = function() {\n\t\tvar frame = this._frames[this._index];\n\t\tvar sc = frame.scale*this._scale;\n\t\tvar rect = frame.rect;\n\t\tvar sourceRect = frame.sourceRect;\n\t\tvar canvas = this._data.images[frame.img];\n\t\tvar ctx = canvas.getContext(\"2d\");\n\t\tframe.funct&&frame.funct(frame.source, frame.data);\n\t\tctx.save();\n\t\tctx.beginPath();\n\t\tctx.rect(rect.x, rect.y, rect.width, rect.height);\n\t\tctx.clip();\n\t\tctx.translate(Math.ceil(rect.x-sourceRect.x*sc), Math.ceil(rect.y-sourceRect.y*sc));\n\t\tctx.scale(sc,sc);\n\t\tframe.source.draw(ctx); // display object will draw itself.\n\t\tctx.restore();\n\t\treturn (++this._index) < this._frames.length;\n\t};\n\n\n\tcreatejs.SpriteSheetBuilder = createjs.promote(SpriteSheetBuilder, \"EventDispatcher\");\n}());\n\n//##############################################################################\n// DOMElement.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * <b>This class is still experimental, and more advanced use is likely to be buggy. Please report bugs.</b>\n\t *\n\t * A DOMElement allows you to associate a HTMLElement with the display list. It will be transformed\n\t * within the DOM as though it is child of the {{#crossLink \"Container\"}}{{/crossLink}} it is added to. However, it is\n\t * not rendered to canvas, and as such will retain whatever z-index it has relative to the canvas (ie. it will be\n\t * drawn in front of or behind the canvas).\n\t *\n\t * The position of a DOMElement is relative to their parent node in the DOM. It is recommended that\n\t * the DOM Object be added to a div that also contains the canvas so that they share the same position\n\t * on the page.\n\t *\n\t * DOMElement is useful for positioning HTML elements over top of canvas content, and for elements\n\t * that you want to display outside the bounds of the canvas. For example, a tooltip with rich HTML\n\t * content.\n\t *\n\t * <h4>Mouse Interaction</h4>\n\t *\n\t * DOMElement instances are not full EaselJS display objects, and do not participate in EaselJS mouse\n\t * events or support methods like hitTest. To get mouse events from a DOMElement, you must instead add handlers to\n\t * the htmlElement (note, this does not support EventDispatcher)\n\t *\n\t *      var domElement = new createjs.DOMElement(htmlElement);\n\t *      domElement.htmlElement.onclick = function() {\n\t *          console.log(\"clicked\");\n\t *      }\n\t *\n\t * <strong>Important:</strong> This class needs to be notified it is about to be drawn, this will happen automatically\n\t * if you call stage.update, calling stage.draw or disabling tickEnabled will miss important steps and it will render\n\t * stale information.\n\t *\n\t * @class DOMElement\n\t * @extends DisplayObject\n\t * @constructor\n\t * @param {HTMLElement} htmlElement A reference or id for the DOM element to manage.\n\t */\n\tfunction DOMElement(htmlElement) {\n\t\tthis.DisplayObject_constructor();\n\t\t\n\t\tif (typeof(htmlElement)==\"string\") { htmlElement = document.getElementById(htmlElement); }\n\t\tthis.mouseEnabled = false;\n\t\t\n\t\tvar style = htmlElement.style;\n\t\tstyle.position = \"absolute\";\n\t\tstyle.transformOrigin = style.WebkitTransformOrigin = style.msTransformOrigin = style.MozTransformOrigin = style.OTransformOrigin = \"0% 0%\";\n\t\t\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * The DOM object to manage.\n\t\t * @property htmlElement\n\t\t * @type HTMLElement\n\t\t */\n\t\tthis.htmlElement = htmlElement;\n\t\n\t\n\t// private properties:\n\t\t/**\n\t\t * @property _oldMtx\n\t\t * @type Matrix2D\n\t\t * @protected\n\t\t */\n\t\tthis._oldProps = null;\n\n\t\t/**\n\t\t * Used to track the object which this class attached listeners to, helps optimize listener attachment.\n\t\t * @property _oldStage\n\t\t * @type Stage\n\t\t * @protected\n\t\t */\n\t\tthis._oldStage = null;\n\t\t/**\n\t\t * The event listener proxy triggered drawing draw for special circumstances.\n\t\t * @property _drawAction\n\t\t * @type function\n\t\t * @protected\n\t\t */\n\t\tthis._drawAction = null;\n\t}\n\tvar p = createjs.extend(DOMElement, createjs.DisplayObject);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\n// public methods:\n\t/**\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\n\t * This does not account for whether it would be visible within the boundaries of the stage.\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method isVisible\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\n\t */\n\tp.isVisible = function() {\n\t\treturn this.htmlElement != null;\n\t};\n\n\t/**\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\n\t * Returns true if the draw was handled (useful for overriding functionality).\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\n\t * into itself).\n\t * @return {Boolean}\n\t */\n\tp.draw = function(ctx, ignoreCache) {\n\t\t// this relies on the _tick method because draw isn't called if the parent is not visible.\n\t\t// the actual update happens in _handleDrawEnd\n\t\treturn true;\n\t};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method cache\n\t */\n\tp.cache = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method uncache\n\t */\n\tp.uncache = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method updateCache\n\t */\n\tp.updateCache = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method hitTest\n\t */\n\tp.hitTest = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method localToGlobal\n\t */\n\tp.localToGlobal = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method globalToLocal\n\t */\n\tp.globalToLocal = function() {};\n\n\t/**\n\t * Not applicable to DOMElement.\n\t * @method localToLocal\n\t */\n\tp.localToLocal = function() {};\n\n\t/**\n\t * DOMElement cannot be cloned. Throws an error.\n\t * @method clone\n\t */\n\tp.clone = function() {\n\t\tthrow(\"DOMElement cannot be cloned.\")\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t */\n\tp.toString = function() {\n\t\treturn \"[DOMElement (name=\"+  this.name +\")]\";\n\t};\n\n\t/**\n     * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\n\t * are not full EaselJS display objects and do not participate in EaselJS mouse events.\n\t * @event click\n\t */\n\n     /**\n     * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\n \t * are not full EaselJS display objects and do not participate in EaselJS mouse events.\n\t * @event dblClick\n\t */\n\n     /**\n      * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\n \t  * are not full EaselJS display objects and do not participate in EaselJS mouse events.\n\t  * @event mousedown\n\t  */\n\n     /**\n      * The HTMLElement can listen for the mouseover event, not the DOMElement instance.\n      * Since DOMElement instances are not full EaselJS display objects and do not participate in EaselJS mouse events.\n      * @event mouseover\n\t  */\n\n     /**\n      * Not applicable to DOMElement.\n\t  * @event tick\n\t  */\n\n\n// private methods:\n\t/**\n\t * @method _tick\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\n\t * function.\n\t * @protected\n\t */\n\tp._tick = function(evtObj) {\n\t\tvar stage = this.stage;\n\t\tif(stage && stage !== this._oldStage) {\n\t\t\tthis._drawAction && stage.off(\"drawend\", this._drawAction);\n\t\t\tthis._drawAction = stage.on(\"drawend\", this._handleDrawEnd, this);\n\t\t\tthis._oldStage = stage;\n\t\t}\n\t\tthis.DisplayObject__tick(evtObj);\n\t};\n\t\n\t/**\n\t * @method _handleDrawEnd\n\t * @param {Event} evt\n\t * @protected\n\t */\n\tp._handleDrawEnd = function(evt) {\n\t\tvar o = this.htmlElement;\n\t\tif (!o) { return; }\n\t\tvar style = o.style;\n\t\t\n\t\tvar props = this.getConcatenatedDisplayProps(this._props), mtx = props.matrix;\n\t\t\n\t\tvar visibility = props.visible ? \"visible\" : \"hidden\";\n\t\tif (visibility != style.visibility) { style.visibility = visibility; }\n\t\tif (!props.visible) { return; }\n\t\t\n\t\tvar oldProps = this._oldProps, oldMtx = oldProps&&oldProps.matrix;\n\t\tvar n = 10000; // precision\n\t\t\n\t\tif (!oldMtx || !oldMtx.equals(mtx)) {\n\t\t\tvar str = \"matrix(\" + (mtx.a*n|0)/n +\",\"+ (mtx.b*n|0)/n +\",\"+ (mtx.c*n|0)/n +\",\"+ (mtx.d*n|0)/n +\",\"+ (mtx.tx+0.5|0);\n\t\t\tstyle.transform = style.WebkitTransform = style.OTransform = style.msTransform = str +\",\"+ (mtx.ty+0.5|0) +\")\";\n\t\t\tstyle.MozTransform = str +\"px,\"+ (mtx.ty+0.5|0) +\"px)\";\n\t\t\tif (!oldProps) { oldProps = this._oldProps = new createjs.DisplayProps(true, null); }\n\t\t\toldProps.matrix.copy(mtx);\n\t\t}\n\t\t\n\t\tif (oldProps.alpha != props.alpha) {\n\t\t\tstyle.opacity = \"\"+(props.alpha*n|0)/n;\n\t\t\toldProps.alpha = props.alpha;\n\t\t}\n\t};\n\n\n\tcreatejs.DOMElement = createjs.promote(DOMElement, \"DisplayObject\");\n}());\n\n//##############################################################################\n// Filter.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Base class that all filters should inherit from. Filters need to be applied to objects that have been cached using\n\t * the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method. If an object changes, please cache it again, or use\n\t * {{#crossLink \"DisplayObject/updateCache\"}}{{/crossLink}}. Note that the filters must be applied before caching.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      myInstance.filters = [\n\t *          new createjs.ColorFilter(0, 0, 0, 1, 255, 0, 0),\n\t *          new createjs.BlurFilter(5, 5, 10)\n\t *      ];\n\t *      myInstance.cache(0,0, 100, 100);\n\t *\n\t * Note that each filter can implement a {{#crossLink \"Filter/getBounds\"}}{{/crossLink}} method, which returns the\n\t * margins that need to be applied in order to fully display the filter. For example, the {{#crossLink \"BlurFilter\"}}{{/crossLink}}\n\t * will cause an object to feather outwards, resulting in a margin around the shape.\n\t *\n\t * <h4>EaselJS Filters</h4>\n\t * EaselJS comes with a number of pre-built filters:\n\t * <ul><li>{{#crossLink \"AlphaMapFilter\"}}{{/crossLink}} : Map a greyscale image to the alpha channel of a display object</li>\n\t *      <li>{{#crossLink \"AlphaMaskFilter\"}}{{/crossLink}}: Map an image's alpha channel to the alpha channel of a display object</li>\n\t *      <li>{{#crossLink \"BlurFilter\"}}{{/crossLink}}: Apply vertical and horizontal blur to a display object</li>\n\t *      <li>{{#crossLink \"ColorFilter\"}}{{/crossLink}}: Color transform a display object</li>\n\t *      <li>{{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}: Transform an image using a {{#crossLink \"ColorMatrix\"}}{{/crossLink}}</li>\n\t * </ul>\n\t *\n\t * @class Filter\n\t * @constructor\n\t **/\n\tfunction Filter() {\n\t\t/**\n\t\t * A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.\n\t\t * @property usesContext\n\t\t * @type {boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.usesContext = false;\n\n\t\t/**\n\t\t * Another filter that is required to act as part of this filter and created and managed under the hood.\n\t\t * @private\n\t\t * @property _multiPass\n\t\t * @type {Filter}\n\t\t * @default null\n\t\t */\n\t\tthis._multiPass = null;\n\n\t\t/**\n\t\t * Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.\n\t\t * This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR\n\t\t * @property VTX_SHADER\n\t\t * @virtual\n\t\t * @type {String}\n\t\t * @readonly\n\t\t */\n\t\tthis.VTX_SHADER_BODY = null;\n\n\t\t/**\n\t\t * Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.\n\t\t * This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR\n\t\t * @property FRAG_SHADER\n\t\t * @virtual\n\t\t * @type {String}\n\t\t * @readonly\n\t\t */\n\t\tthis.FRAG_SHADER_BODY = null;\n\t}\n\tvar p = Filter.prototype;\n\n// public methods:\n\t/**\n\t * Provides padding values for this filter. That is, how much the filter will extend the visual bounds of an object it is applied to.\n\t * @method getBounds\n\t * @param {Rectangle} [rect] If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.\n\t * @return {Rectangle} If a `rect` param was provided, it is returned. If not, either a new rectangle with the padding values, or null if no padding is required for this filter.\n\t **/\n\tp.getBounds = function(rect) {\n\t\treturn rect;\n\t};\n\n\t/**\n\t * Assign any unique uniforms or other setup functionality here.\n\t * @method shaderParamSetup\n\t * @virtual\n\t * @param {WebGLContext} gl The context associated with the stage performing the render.\n\t * @param {StageGL} stage The stage instance that will be rendering.\n\t * @param {ShaderProgram} shaderProgram The compiled shader that is going to be used to perform the render.\n\t */\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {};\n\n\t/**\n\t * Applies the filter to the specified context.\n\t * @method applyFilter\n\t * @param {CanvasRenderingContext2D} ctx The 2D context to use as the source.\n\t * @param {Number} x The x position to use for the source rect.\n\t * @param {Number} y The y position to use for the source rect.\n\t * @param {Number} width The width to use for the source rect.\n\t * @param {Number} height The height to use for the source rect.\n\t * @param {CanvasRenderingContext2D} [targetCtx] The 2D context to draw the result to. Defaults to the context passed to ctx.\n\t * @param {Number} [targetX] The x position to draw the result to. Defaults to the value passed to x.\n\t * @param {Number} [targetY] The y position to draw the result to. Defaults to the value passed to y.\n\t * @return {Boolean} If the filter was applied successfully.\n\t **/\n\tp.applyFilter = function(ctx, x, y, width, height, targetCtx, targetX, targetY) {\n\t\t// this is the default behaviour because most filters access pixel data. It is overridden when not needed.\n\t\ttargetCtx = targetCtx || ctx;\n\t\tif (targetX == null) { targetX = x; }\n\t\tif (targetY == null) { targetY = y; }\n\t\ttry {\n\t\t\tvar imageData = ctx.getImageData(x, y, width, height);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this._applyFilter(imageData)) {\n\t\t\ttargetCtx.putImageData(imageData, targetX, targetY);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Filter]\";\n\t};\n\n\t/**\n\t * Returns a clone of this Filter instance.\n\t * @method clone\n\t * @return {Filter} A clone of the current Filter instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Filter();\n\t};\n\t\n// private methods:\n\t/**\n\t * @method _applyFilter\n\t * @param {ImageData} imageData Target ImageData instance.\n\t * @return {Boolean}\n\t **/\n\tp._applyFilter = function(imageData) { return true; };\n\n\n\tcreatejs.Filter = Filter;\n}());\n\n//##############################################################################\n// BitmapCache.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The BitmapCache is an internal representation of all the cache properties and logic required in order to \"cache\"\n\t * an object. This information and functionality used to be located on a {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\n\t * method in {{#crossLink \"DisplayObject\"}}{{/crossLink}}, but was moved to its own class.\n\t *\n\t * Caching in this context is purely visual, and will render the DisplayObject out into an image to be used instead\n\t * of the object. The actual cache itself is still stored on the target with the {{#crossLink \"DisplayObject/cacheCanvas:property\"}}{{/crossLink}}.\n\t * Working with a singular image like a {{#crossLink \"Bitmap\"}}{{/crossLink}} there is little benefit to performing \n\t * a cache as it is already a single image. Caching is best done on containers containing multiple complex parts that \n\t * do not move often, so that rendering the image instead will improve overall rendering speed. A cached object will \n\t * not visually update until explicitly told to do so with a call to update, much like a Stage. If a cache is being \n\t * updated every frame it is likely not improving rendering performance. Cache are best used when updates will be sparse.\n\t *\n\t * Caching is also a co-requisite for applying filters to prevent expensive filters running constantly without need, \n\t * and to physically enable some effects. The BitmapCache is also responsible for applying filters to objects and \n\t * reads each {{#crossLink \"Filter\"}}{{/crossLink}} due to this relationship. Real-time Filters are not recommended \n\t * performance wise when dealing with a Context2D canvas. For best performance and to still allow for some visual \n\t * effects use a compositeOperation when possible.\n\t * @class BitmapCache\n\t * @constructor\n\t **/\n\tfunction BitmapCache() {\n\n\t\t// public:\n\t\t/**\n\t\t * Width of the cache relative to the target object.\n\t\t * @property width\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default undefined\n\t\t **/\n\t\tthis.width = undefined;\n\n\t\t/**\n\t\t * Height of the cache relative to the target object.\n\t\t * @property height\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default undefined\n\t\t * @todo Should the width and height be protected?\n\t\t **/\n\t\tthis.height = undefined;\n\n\t\t/**\n\t\t * Horizontal position of the cache relative to the target's origin.\n\t\t * @property x\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default undefined\n\t\t **/\n\t\tthis.x = undefined;\n\n\t\t/**\n\t\t * Vertical position of the cache relative to target's origin.\n\t\t * @property y\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default undefined\n\t\t **/\n\t\tthis.y = undefined;\n\n\t\t/**\n\t\t * The internal scale of the cache image, does not affects display size. This is useful to both increase and\n\t\t * decrease render quality. Objects with increased scales are more likely to look good when scaled up or rotated.\n\t\t * Objects with decreased scales can save on rendering performance.\n\t\t * @property scale\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t **/\n\t\tthis.scale = 1;\n\n\t\t/**\n\t\t * The x offset used for drawing into the cache itself, accounts for both transforms applied.\n\t\t * @property offX\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.offX = 0;\n\n\t\t/**\n\t\t * The y offset used for drawing into the cache itself, accounts for both transforms applied.\n\t\t * @property offY\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.offY = 0;\n\n\t\t/**\n\t\t * Track how many times the cache has been updated, mostly used for preventing duplicate cacheURLs.\n\t\t * This can be useful to see if a cache has been updated.\n\t\t * @property cacheID\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis.cacheID = 0;\n\n\t\t// protected:\n\t\t/**\n\t\t * The relative offset of the filter's x position, used for drawing the cache onto its container.\n\t\t * Re-calculated every update call before drawing.\n\t\t * @property _filterOffY\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._filterOffX = 0;\n\n\t\t/**\n\t\t * The relative offset of the filter's y position, used for drawing the cache onto its container.\n\t\t * Re-calculated every update call before drawing.\n\t\t * @property _filterOffY\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._filterOffY = 0;\n\n\t\t/**\n\t\t * The cacheID when a DataURL was requested.\n\t\t * @property _cacheDataURLID\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._cacheDataURLID = 0;\n\n\t\t/**\n\t\t * The cache's DataURL, generated on-demand using the getter.\n\t\t * @property _cacheDataURL\n\t\t * @protected\n\t\t * @type {String}\n\t\t * @default null\n\t\t **/\n\t\tthis._cacheDataURL = null;\n\n\t\t/**\n\t\t * Internal tracking of final bounding width, approximately width*scale; however, filters can complicate the actual value.\n\t\t * @property _drawWidth\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._drawWidth = 0;\n\n\t\t/**\n\t\t * Internal tracking of final bounding height, approximately height*scale; however, filters can complicate the actual value.\n\t\t * @property _drawHeight\n\t\t * @protected\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t **/\n\t\tthis._drawHeight = 0;\n\t}\n\tvar p = BitmapCache.prototype;\n\n\t/**\n\t * Returns the bounds that surround all applied filters, relies on each filter to describe how it changes bounds.\n\t * @method getFilterBounds\n\t * @param {DisplayObject} target The object to check the filter bounds for.\n\t * @param {Rectangle} [output=null] Optional parameter, if provided then calculated bounds will be applied to that object.\n\t * @return {Rectangle} bounds object representing the bounds with filters.\n\t * @static\n\t **/\n\tBitmapCache.getFilterBounds = function(target, output) {\n\t\tif(!output){ output = new createjs.Rectangle(); }\n\t\tvar filters = target.filters;\n\t\tvar filterCount = filters && filters.length;\n\t\tif (!!filterCount <= 0) { return output; }\n\n\t\tfor(var i=0; i<filterCount; i++) {\n\t\t\tvar f = filters[i];\n\t\t\tif(!f || !f.getBounds){ continue; }\n\t\t\tvar test = f.getBounds();\n\t\t\tif(!test){ continue; }\n\t\t\tif(i==0) {\n\t\t\t\toutput.setValues(test.x, test.y, test.width, test.height);\n\t\t\t} else {\n\t\t\t\toutput.extend(test.x, test.y, test.width, test.height);\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t};\n\n// public methods:\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[BitmapCache]\";\n\t};\n\n\t/**\n\t * Actually create the correct cache surface and properties associated with it. Caching and it's benefits are discussed\n\t * by the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} function and this class description. Here are the detailed\n\t * specifics of how to use the options object.\n\t *\n\t * - If options.useGL is set to \"new\" a StageGL is created and contained on this for use when rendering the cache.\n\t * - If options.useGL is set to \"stage\" if the current stage is a StageGL it will be used. If not then it will default to \"new\".\n\t * - If options.useGL is a StageGL instance it will not create one but use the one provided.\n\t * - If options.useGL is undefined a Context 2D cache will be performed.\n\t *\n\t * This means you can use any combination of StageGL and 2D with either, neither, or both the stage and cache being\n\t * WebGL. Using \"new\" with a StageGL display list is highly unrecommended, but still an option. It should be avoided\n\t * due to negative performance reasons and the Image loading limitation noted in the class complications above.\n\t *\n\t * When \"options.useGL\" is set to the parent stage of the target and WebGL, performance is increased by using\n\t * \"RenderTextures\" instead of canvas elements. These are internal Textures on the graphics card stored in the GPU.\n\t * Because they are no longer canvases you cannot perform operations you could with a regular canvas. The benefit\n\t * is that this avoids the slowdown of copying the texture back and forth from the GPU to a Canvas element.\n\t * This means \"stage\" is the recommended option when available.\n\t *\n\t * A StageGL cache does not infer the ability to draw objects a StageGL cannot currently draw, i.e. do not use a\n\t * WebGL context cache when caching a Shape, Text, etc.\n\t * <h4>WebGL cache with a 2D context</h4>\n\t *\n\t *     var stage = new createjs.Stage();\n\t *     var bmp = new createjs.Bitmap(src);\n\t *     bmp.cache(0, 0, bmp.width, bmp.height, 1, {gl: \"new\"});          // no StageGL to use, so make one\n\t *\n\t *     var shape = new createjs.Shape();\n\t *     shape.graphics.clear().fill(\"red\").drawRect(0,0,20,20);\n\t *     shape.cache(0, 0, 20, 20, 1);                             // cannot use WebGL cache\n\t *\n\t * <h4>WebGL cache with a WebGL context</h4>\n\t *\n\t *     var stageGL = new createjs.StageGL();\n\t *     var bmp = new createjs.Bitmap(src);\n\t *     bmp.cache(0, 0, bmp.width, bmp.height, 1, {gl: \"stage\"});       // use our StageGL to cache\n\t *\n\t *     var shape = new createjs.Shape();\n\t *     shape.graphics.clear().fill(\"red\").drawRect(0,0,20,20);\n\t *     shape.cache(0, 0, 20, 20, 1);                             // cannot use WebGL cache\n\t *\n\t * You may wish to create your own StageGL instance to control factors like clear color, transparency, AA, and\n\t * others. If you do, pass a new instance in instead of \"true\", the library will automatically set the\n\t * {{#crossLink \"StageGL/isCacheControlled\"}}{{/crossLink}} to true on your instance. This will trigger it to behave\n\t * correctly, and not assume your main context is WebGL.\n\t *\n\t * @public\n\t * @method BitmapCache.cache\n\t * @param {Number} x The x coordinate origin for the cache region.\n\t * @param {Number} y The y coordinate origin for the cache region.\n\t * @param {Number} width The width of the cache region.\n\t * @param {Number} height The height of the cache region.\n\t * @param {Number} [scale=1] The scale at which the cache will be created. For example, if you cache a vector shape\n\t * using myShape.cache(0,0,100,100,2) then the resulting cacheCanvas will be 200x200 px. This lets you scale and\n\t * rotate cached elements with greater fidelity. Default is 1.\n\t * @param {Object} [options=undefined] Specify additional parameters for the cache logic\n\t * @param {undefined|\"new\"|\"stage\"|StageGL} [options.useGL=undefined] Select whether to use context 2D, or WebGL rendering, and\n\t * whether to make a new stage instance or use an existing one. See above for extensive details on use.\n\t * @for BitmapCache\n\t */\n\t p.define = function(target, x, y, width, height, scale, options) {\n\t\tif(!target){ throw \"No symbol to cache\"; }\n\t\tthis._options = options;\n\t\tthis.target = target;\n\n\t\tthis.width =\t\twidth >= 1 ? width : 1;\n\t\tthis.height =\t\theight >= 1 ? height : 1;\n\t\tthis.x =\t\t\tx || 0;\n\t\tthis.y =\t\t\ty || 0;\n\t\tthis.scale =\t\tscale || 1;\n\n\t\tthis.update();\n\t};\n\n\t/**\n\t * Directly called via {{#crossLink \"DisplayObject/updateCache:method\"}}{{/crossLink}}, but also internally. This\n\t * has the dual responsibility of making sure the surface is ready to be drawn to, and performing the draw. For\n\t * full details of each behaviour, check the protected functions {{#crossLink \"BitmapCache/_updateSurface\"}}{{/crossLink}}\n\t * and {{#crossLink \"BitmapCache/_drawToCache\"}}{{/crossLink}} respectively.\n\t * @method update\n\t * @param {String} [compositeOperation=null] The DisplayObject this cache is linked to.\n\t **/\n\tp.update = function(compositeOperation) {\n\t\tif(!this.target) { throw \"define() must be called before update()\"; }\n\n\t\tvar filterBounds = BitmapCache.getFilterBounds(this.target);\n\t\tvar surface = this.target.cacheCanvas;\n\n\t\tthis._drawWidth = Math.ceil(this.width*this.scale) + filterBounds.width;\n\t\tthis._drawHeight = Math.ceil(this.height*this.scale) + filterBounds.height;\n\n\t\tif(!surface || this._drawWidth != surface.width || this._drawHeight != surface.height) {\n\t\t\tthis._updateSurface();\n\t\t}\n\n\t\tthis._filterOffX = filterBounds.x;\n\t\tthis._filterOffY = filterBounds.y;\n\t\tthis.offX = this.x*this.scale + this._filterOffX;\n\t\tthis.offY = this.y*this.scale + this._filterOffY;\n\n\t\tthis._drawToCache(compositeOperation);\n\n\t\tthis.cacheID = this.cacheID?this.cacheID+1:1;\n\t};\n\n\t/**\n\t * Reset and release all the properties and memory associated with this cache.\n\t * @method release\n\t **/\n\tp.release = function() {\n\t\tif (this._webGLCache) {\n\t\t\t// if it isn't cache controlled clean up after yourself\n\t\t\tif (!this._webGLCache.isCacheControlled) {\n\t\t\t\tif (this.__lastRT){ this.__lastRT = undefined; }\n\t\t\t\tif (this.__rtA){ this._webGLCache._killTextureObject(this.__rtA); }\n\t\t\t\tif (this.__rtB){ this._webGLCache._killTextureObject(this.__rtB); }\n\t\t\t\tif (this.target && this.target.cacheCanvas){ this._webGLCache._killTextureObject(this.target.cacheCanvas); }\n\t\t\t}\n\t\t\t// set the context to none and let the garbage collector get the rest when the canvas itself gets removed\n\t\t\tthis._webGLCache = false;\n\t\t} else {\n\t\t\tvar stage = this.target.stage;\n\t\t\tif (stage instanceof createjs.StageGL){\n\t\t\t\tstage.releaseTexture(this.target.cacheCanvas);\n\t\t\t}\n\t\t}\n\n\t\tthis.target = this.target.cacheCanvas = null;\n\t\tthis.cacheID = this._cacheDataURLID = this._cacheDataURL = undefined;\n\t\tthis.width = this.height = this.x = this.y = this.offX = this.offY = 0;\n\t\tthis.scale = 1;\n\t};\n\n\t/**\n\t * Returns a data URL for the cache, or `null` if this display object is not cached.\n\t * Uses {{#crossLink \"BitmapCache/cacheID:property\"}}{{/crossLink}} to ensure a new data URL is not generated if the\n\t * cache has not changed.\n\t * @method getCacheDataURL\n\t * @return {String} The image data url for the cache.\n\t **/\n\tp.getCacheDataURL = function() {\n\t\tvar cacheCanvas = this.target && this.target.cacheCanvas;\n\t\tif (!cacheCanvas) { return null; }\n\t\tif (this.cacheID != this._cacheDataURLID) {\n\t\t\tthis._cacheDataURLID = this.cacheID;\n\t\t\tthis._cacheDataURL = cacheCanvas.toDataURL?cacheCanvas.toDataURL():null;\t// incase function is\n\t\t}\n\t\treturn this._cacheDataURL;\n\t};\n\n\t/**\n\t * Use context2D drawing commands to display the cache canvas being used.\n\t * @method draw\n\t * @param {CanvasRenderingContext2D} ctx The context to draw into.\n\t * @return {Boolean} Whether the draw was handled successfully.\n\t **/\n\tp.draw = function(ctx) {\n\t\tif(!this.target) { return false; }\n\t\tctx.drawImage(this.target.cacheCanvas,\n\t\t\tthis.x + (this._filterOffX/this.scale),\t\tthis.y + (this._filterOffY/this.scale),\n\t\t\tthis._drawWidth/this.scale,\t\t\t\t\tthis._drawHeight/this.scale\n\t\t);\n\t\treturn true;\n\t};\n\n// private methods:\n\t/**\n\t * Create or resize the invisible canvas/surface that is needed for the display object(s) to draw to,\n\t * and in turn be used in their stead when drawing. The surface is resized to the size defined\n\t * by the width and height, factoring in scaling and filters. Adjust them to adjust the output size.\n\t * @method _updateSurface\n\t * @protected\n\t **/\n\tp._updateSurface = function() {\n\t\tif (!this._options || !this._options.useGL) {\n\t\t\tvar surface = this.target.cacheCanvas;\n\n\t\t\t// create it if it's missing\n\t\t\tif(!surface) {\n\t\t\t\tsurface = this.target.cacheCanvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\n\t\t\t}\n\n\t\t\t// now size it\n\t\t\tsurface.width = this._drawWidth;\n\t\t\tsurface.height = this._drawHeight;\n\t\t\treturn;\n\t\t}\n\n\t\t// create it if it's missing\n\t\tif (!this._webGLCache) {\n\t\t\tif (this._options.useGL === \"stage\") {\n\t\t\t\tif(!(this.target.stage && this.target.stage.isWebGL)){\n\t\t\t\t\tvar error = \"Cannot use 'stage' for cache because the object's parent stage is \";\n\t\t\t\t\terror += this.target.stage ? \"non WebGL.\" : \"not set, please addChild to the correct stage.\";\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tthis.target.cacheCanvas = true; // will be replaced with RenderTexture, temporary positive value for old \"isCached\" checks\n\t\t\t\tthis._webGLCache = this.target.stage;\n\n\t\t\t} else if(this._options.useGL === \"new\") {\n\t\t\t\tthis.target.cacheCanvas = document.createElement(\"canvas\"); // we can turn off autopurge because we wont be making textures here\n\t\t\t\tthis._webGLCache = new createjs.StageGL(this.target.cacheCanvas, {antialias: true, transparent: true, autoPurge: -1});\n\t\t\t\tthis._webGLCache.isCacheControlled = true;\t// use this flag to control stage sizing and final output\n\n\t\t\t} else if(this._options.useGL instanceof createjs.StageGL) {\n\t\t\t\tthis.target.cacheCanvas = true; // will be replaced with RenderTexture, temporary positive value for old \"isCached\" checks\n\t\t\t\tthis._webGLCache = this._options.useGL;\n\t\t\t\tthis._webGLCache.isCacheControlled = true;\t// use this flag to control stage sizing and final output\n\n\t\t\t} else {\n\t\t\t\tthrow \"Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got \"+ this._options.useGL;\n\t\t\t}\n\t\t}\n\n\t\t// now size render surfaces\n\t\tvar surface = this.target.cacheCanvas;\n\t\tvar stageGL = this._webGLCache;\n\n\t\t// if we have a dedicated stage we've gotta size it\n\t\tif (stageGL.isCacheControlled) {\n\t\t\tsurface.width = this._drawWidth;\n\t\t\tsurface.height = this._drawHeight;\n\t\t\tstageGL.updateViewport(this._drawWidth, this._drawHeight);\n\t\t}\n\t\tif (this.target.filters) {\n\t\t\t// with filters we can't tell how many we'll need but the most we'll ever need is two, so make them now\n\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\n\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\n\t\t} else {\n\t\t\t// without filters then we only need one RenderTexture, and that's only if its not a dedicated stage\n\t\t\tif (!stageGL.isCacheControlled) {\n\t\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Perform the cache draw out for context 2D now that the setup properties have been performed.\n\t * @method _drawToCache\n\t * @protected\n\t **/\n\tp._drawToCache = function(compositeOperation) {\n\t\tvar surface = this.target.cacheCanvas;\n\t\tvar target = this.target;\n\t\tvar webGL = this._webGLCache;\n\n\t\tif (webGL){\n\t\t\t//TODO: auto split blur into an x/y pass\n\t\t\twebGL.cacheDraw(target, target.filters, this);\n\n\t\t\t// we may of swapped around which element the surface is, so we re-fetch it\n\t\t\tsurface = this.target.cacheCanvas;\n\n\t\t\tsurface.width = this._drawWidth;\n\t\t\tsurface.height = this._drawHeight;\n\t\t} else {\n\t\t\tvar ctx = surface.getContext(\"2d\");\n\n\t\t\tif (!compositeOperation) {\n\t\t\t\tctx.clearRect(0, 0, this._drawWidth+1, this._drawHeight+1);\n\t\t\t}\n\n\t\t\tctx.save();\n\t\t\tctx.globalCompositeOperation = compositeOperation;\n\t\t\tctx.setTransform(this.scale,0,0,this.scale, -this._filterOffX,-this._filterOffY);\n\t\t\tctx.translate(-this.x, -this.y);\n\t\t\ttarget.draw(ctx, true);\n\t\t\tctx.restore();\n\n\n\t\t\tif (target.filters && target.filters.length) {\n\t\t\t\tthis._applyFilters(ctx);\n\t\t\t}\n\t\t}\n\t\tsurface._invalid = true;\n\t};\n\n\t/**\n\t * Work through every filter and apply its individual visual transformation.\n\t * @method _applyFilters\n\t * @protected\n\t **/\n\tp._applyFilters = function(ctx) {\n\t\tvar filters = this.target.filters;\n\n\t\tvar w = this._drawWidth;\n\t\tvar h = this._drawHeight;\n\n\t\tvar data;\n\n\t\tvar i = 0, filter = filters[i];\n\t\tdo { // this is safe because we wouldn't be in apply filters without a filter count of at least 1\n\t\t\tif(filter.usesContext){\n\t\t\t\tif(data) {\n\t\t\t\t\tctx.putImageData(data, 0,0);\n\t\t\t\t\tdata = null;\n\t\t\t\t}\n\t\t\t\tfilter.applyFilter(ctx, 0,0, w,h);\n\t\t\t} else {\n\t\t\t\tif(!data) {\n\t\t\t\t\tdata = ctx.getImageData(0,0, w,h);\n\t\t\t\t}\n\t\t\t\tfilter._applyFilter(data);\n\t\t\t}\n\n\t\t\t// work through the multipass if it's there, otherwise move on\n\t\t\tfilter = filter._multiPass !== null ? filter._multiPass : filters[++i];\n\t\t} while (filter);\n\n\t\t//done\n\t\tif(data) {\n\t\t\tctx.putImageData(data, 0,0);\n\t\t}\n\t};\n\n\tcreatejs.BitmapCache = BitmapCache;\n}());\n\n//##############################################################################\n// BlurFilter.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Applies a box blur to DisplayObjects in context 2D and a Gaussian blur in webgl. Note that this filter is fairly\n\t * intensive, particularly if the quality is set higher than 1.\n\t *\n\t * <h4>Example</h4>\n\t * This example creates a red circle, and then applies a 5 pixel blur to it. It uses the {{#crossLink \"Filter/getBounds\"}}{{/crossLink}}\n\t * method to account for the spread that the blur causes.\n\t *\n\t *      var shape = new createjs.Shape().set({x:100,y:100});\n\t *      shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\t *\n\t *      var blurFilter = new createjs.BlurFilter(5, 5, 1);\n\t *      shape.filters = [blurFilter];\n\t *      var bounds = blurFilter.getBounds();\n\t *\n\t *      shape.cache(-50+bounds.x, -50+bounds.y, 100+bounds.width, 100+bounds.height);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\n\t * @class BlurFilter\n\t * @extends Filter\n\t * @constructor\n\t * @param {Number} [blurX=0] The horizontal blur radius in pixels.\n\t * @param {Number} [blurY=0] The vertical blur radius in pixels.\n\t * @param {Number} [quality=1] The number of blur iterations.\n\t **/\n\tfunction BlurFilter( blurX, blurY, quality) {\n\t\tthis.Filter_constructor();\n\n\t\t// public properties:\n\t\t/**\n\t\t * Horizontal blur radius in pixels\n\t\t * @property blurX\n\t\t * @default 0\n\t\t * @type Number\n\t\t **/\n\t\tthis._blurX = blurX;\n\t\tthis._blurXTable = [];\n\t\tthis._lastBlurX = null;\n\n\t\t/**\n\t\t * Vertical blur radius in pixels\n\t\t * @property blurY\n\t\t * @default 0\n\t\t * @type Number\n\t\t **/\n\t\tthis._blurY = blurY;\n\t\tthis._blurYTable = [];\n\t\tthis._lastBlurY = null;\n\n\t\t/**\n\t\t * Number of blur iterations. For example, a value of 1 will produce a rough blur. A value of 2 will produce a\n\t\t * smoother blur, but take twice as long to run.\n\t\t * @property quality\n\t\t * @default 1\n\t\t * @type Number\n\t\t **/\n\t\tthis._quality;\n\t\tthis._lastQuality = null;\n\n\t\t/**\n\t\t * This is a template to generate the shader for {{#crossLink FRAG_SHADER_BODY}}{{/crossLink}}\n\t\t */\n\t\tthis.FRAG_SHADER_TEMPLATE = (\n\t\t\t\"uniform float xWeight[{{blurX}}];\" +\n\t\t\t\"uniform float yWeight[{{blurY}}];\" +\n\t\t\t\"uniform vec2 textureOffset;\" +\n\t\t\t\"void main(void) {\" +\n\t\t\t\t\"vec4 color = vec4(0.0);\" +\n\n\t\t\t\t\"float xAdj = ({{blurX}}.0-1.0)/2.0;\" +\n\t\t\t\t\"float yAdj = ({{blurY}}.0-1.0)/2.0;\" +\n\t\t\t\t\"vec2 sampleOffset;\" +\n\n\t\t\t\t\"for(int i=0; i<{{blurX}}; i++) {\" +\n\t\t\t\t\t\"for(int j=0; j<{{blurY}}; j++) {\" +\n\t\t\t\t\t\t\"sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));\" +\n\t\t\t\t\t\t\"color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);\" +\n\t\t\t\t\t\"}\" +\n\t\t\t\t\"}\" +\n\n\t\t\t\t\"gl_FragColor = color.rgba;\" +\n\t\t\t\"}\"\n\t\t);\n\n\t\t// update the filter using the setters\n\t\tif(isNaN(quality) || quality < 1){ quality = 1; }\n\t\tthis.setQuality(quality|0);\n\t}\n\tvar p = createjs.extend(BlurFilter, createjs.Filter);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\tp.getBlurX = function() { return this._blurX; };\n\tp.getBlurY = function() { return this._blurY; };\n\tp.setBlurX = function(value) {\n\t\tif(isNaN(value) || value < 0){ value = 0; }\n\t\tthis._blurX = value;\n\t};\n\tp.setBlurY = function(value) {\n\t\tif(isNaN(value) || value < 0){ value = 0; }\n\t\tthis._blurY = value;\n\t};\n\tp.getQuality = function() { return this._quality; };\n\tp.setQuality = function(value) {\n\t\tif(isNaN(value) || value < 0){ value = 0; }\n\t\tthis._quality = value | 0;\n\t};\n\tp._getShader = function() {\n\t\tvar xChange = this._lastBlurX !== this._blurX;\n\t\tvar yChange = this._lastBlurY !== this._blurY;\n\t\tvar qChange = this._lastQuality !== this._quality;\n\t\tif(xChange || yChange || qChange) {\n\t\t\tif(xChange || qChange) { this._blurXTable = this._getTable(this._blurX * this._quality); }\n\t\t\tif(yChange || qChange) { this._blurYTable = this._getTable(this._blurY * this._quality); }\n\t\t\tthis._updateShader();\n\t\t\tthis._lastBlurX = this._blurX;\n\t\t\tthis._lastBlurY = this._blurY;\n\t\t\tthis._lastQuality = this._quality;\n\t\t\treturn undefined; // force a rebuild\n\t\t}\n\t\treturn this._compiledShader;\n\t};\n\tp._setShader = function() { this._compiledShader; };\n\n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tblurX: { get: p.getBlurX, set: p.setBlurX },\n\t\t\tblurY: { get: p.getBlurY, set: p.setBlurY },\n\t\t\tquality: { get: p.getQuality, set: p.setQuality },\n\t\t\t_builtShader: { get: p._getShader, set: p._setShader}\n\t\t});\n\t} catch (e) { console.log(e); }\n\n\t/**\n\t * Internal lookup function to create gaussian distribution.\n\t * @method _getTable\n\t * @param {Number} spread How many steps in the curve.\n\t * @return {Array<Number>} An array with Math.ceil(spread*2) entries with appropriately distributed weights.\n\t */\n\tp._getTable = function(spread) {\n\t\tvar EDGE = 4.2;\n\t\tif(spread<=1) { return [1]; }\n\n\t\tvar result = [];\n\t\tvar count = Math.ceil(spread*2);\n\t\tcount += (count%2)?0:1;\n\t\tvar adjust = (count/2)|0;\n\t\tfor(var i = -adjust; i<=adjust; i++) {\n\t\t\tvar x = (i/adjust)*EDGE;\n\t\t\tresult.push(1/Math.sqrt(2*Math.PI) * Math.pow(Math.E, -(Math.pow(x,2)/4)));\n\t\t}\n\t\tvar factor = result.reduce(function(a, b) { return a + b; });\n\t\treturn result.map(function(currentValue, index, array) { return currentValue/factor; });\n\t};\n\n\t/**\n\t * Internal update function to create shader properties.\n\t * @method _updateShader\n\t */\n\tp._updateShader = function() {\n\t\tif(this._blurX === undefined || this._blurY === undefined){ return; }\n\t\tvar result = this.FRAG_SHADER_TEMPLATE;\n\t\tresult = result.replace(/\\{\\{blurX\\}\\}/g, (this._blurXTable.length).toFixed(0));\n\t\tresult = result.replace(/\\{\\{blurY\\}\\}/g, (this._blurYTable.length).toFixed(0));\n\t\tthis.FRAG_SHADER_BODY = result;\n\t};\n\n\t/** docced in super class **/\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\n\t\t// load the normalized gaussian weight tables\n\t\tgl.uniform1fv(\n\t\t\tgl.getUniformLocation(shaderProgram, \"xWeight\"),\n\t\t\tthis._blurXTable\n\t\t);\n\t\tgl.uniform1fv(\n\t\t\tgl.getUniformLocation(shaderProgram, \"yWeight\"),\n\t\t\tthis._blurYTable\n\t\t);\n\n\t\t// what is the size of a single pixel in -1, 1 (webGL) space\n\t\tgl.uniform2f(\n\t\t\tgl.getUniformLocation(shaderProgram, \"textureOffset\"),\n\t\t\t2/(stage._viewportWidth*this._quality), 2/(stage._viewportHeight*this._quality)\n\t\t);\n\t};\n\n// constants:\n\t/**\n\t * Array of multiply values for blur calculations.\n\t * @property MUL_TABLE\n\t * @type Array\n\t * @protected\n\t * @static\n\t **/\n\tBlurFilter.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];\n\n\t/**\n\t * Array of shift values for blur calculations.\n\t * @property SHG_TABLE\n\t * @type Array\n\t * @protected\n\t * @static\n\t **/\n\tBlurFilter.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9];\n\n// public methods:\n\t/** docced in super class **/\n\tp.getBounds = function (rect) {\n\t\tvar x = this.blurX|0, y = this.blurY| 0;\n\t\tif(x <= 0 && y <= 0) { return rect; }\n\t\tvar q = Math.pow(this.quality, 0.2);\n\t\treturn (rect || new createjs.Rectangle()).pad(y*q+1,x*q+1,y*q+1,x*q+1);\n\t};\n\n\t/** docced in super class **/\n\tp.clone = function() {\n\t\treturn new BlurFilter(this.blurX, this.blurY, this.quality);\n\t};\n\n\t/** docced in super class **/\n\tp.toString = function() {\n\t\treturn \"[BlurFilter]\";\n\t};\n\n\n// private methods:\n\n\t/** docced in super class **/\n\tp._applyFilter = function (imageData) {\n\t\tvar radiusX = this._blurX >> 1;\n\t\tif (isNaN(radiusX) || radiusX < 0) return false;\n\t\tvar radiusY = this._blurY >> 1;\n\t\tif (isNaN(radiusY) || radiusY < 0) return false;\n\t\tif (radiusX == 0 && radiusY == 0) return false;\n\n\t\tvar iterations = this.quality;\n\t\tif (isNaN(iterations) || iterations < 1) iterations = 1;\n\t\titerations |= 0;\n\t\tif (iterations > 3) iterations = 3;\n\t\tif (iterations < 1) iterations = 1;\n\n\t\tvar px = imageData.data;\n\t\tvar x=0, y=0, i=0, p=0, yp=0, yi=0, yw=0, r=0, g=0, b=0, a=0, pr=0, pg=0, pb=0, pa=0;\n\n\t\tvar divx = (radiusX + radiusX + 1) | 0;\n\t\tvar divy = (radiusY + radiusY + 1) | 0;\n\t\tvar w = imageData.width | 0;\n\t\tvar h = imageData.height | 0;\n\n\t\tvar w1 = (w - 1) | 0;\n\t\tvar h1 = (h - 1) | 0;\n\t\tvar rxp1 = (radiusX + 1) | 0;\n\t\tvar ryp1 = (radiusY + 1) | 0;\n\n\t\tvar ssx = {r:0,b:0,g:0,a:0};\n\t\tvar sx = ssx;\n\t\tfor ( i = 1; i < divx; i++ )\n\t\t{\n\t\t\tsx = sx.n = {r:0,b:0,g:0,a:0};\n\t\t}\n\t\tsx.n = ssx;\n\n\t\tvar ssy = {r:0,b:0,g:0,a:0};\n\t\tvar sy = ssy;\n\t\tfor ( i = 1; i < divy; i++ )\n\t\t{\n\t\t\tsy = sy.n = {r:0,b:0,g:0,a:0};\n\t\t}\n\t\tsy.n = ssy;\n\n\t\tvar si = null;\n\n\n\t\tvar mtx = BlurFilter.MUL_TABLE[radiusX] | 0;\n\t\tvar stx = BlurFilter.SHG_TABLE[radiusX] | 0;\n\t\tvar mty = BlurFilter.MUL_TABLE[radiusY] | 0;\n\t\tvar sty = BlurFilter.SHG_TABLE[radiusY] | 0;\n\n\t\twhile (iterations-- > 0) {\n\n\t\t\tyw = yi = 0;\n\t\t\tvar ms = mtx;\n\t\t\tvar ss = stx;\n\t\t\tfor (y = h; --y > -1;) {\n\t\t\t\tr = rxp1 * (pr = px[(yi) | 0]);\n\t\t\t\tg = rxp1 * (pg = px[(yi + 1) | 0]);\n\t\t\t\tb = rxp1 * (pb = px[(yi + 2) | 0]);\n\t\t\t\ta = rxp1 * (pa = px[(yi + 3) | 0]);\n\n\t\t\t\tsx = ssx;\n\n\t\t\t\tfor( i = rxp1; --i > -1; )\n\t\t\t\t{\n\t\t\t\t\tsx.r = pr;\n\t\t\t\t\tsx.g = pg;\n\t\t\t\t\tsx.b = pb;\n\t\t\t\t\tsx.a = pa;\n\t\t\t\t\tsx = sx.n;\n\t\t\t\t}\n\n\t\t\t\tfor( i = 1; i < rxp1; i++ )\n\t\t\t\t{\n\t\t\t\t\tp = (yi + ((w1 < i ? w1 : i) << 2)) | 0;\n\t\t\t\t\tr += ( sx.r = px[p]);\n\t\t\t\t\tg += ( sx.g = px[p+1]);\n\t\t\t\t\tb += ( sx.b = px[p+2]);\n\t\t\t\t\ta += ( sx.a = px[p+3]);\n\n\t\t\t\t\tsx = sx.n;\n\t\t\t\t}\n\n\t\t\t\tsi = ssx;\n\t\t\t\tfor ( x = 0; x < w; x++ )\n\t\t\t\t{\n\t\t\t\t\tpx[yi++] = (r * ms) >>> ss;\n\t\t\t\t\tpx[yi++] = (g * ms) >>> ss;\n\t\t\t\t\tpx[yi++] = (b * ms) >>> ss;\n\t\t\t\t\tpx[yi++] = (a * ms) >>> ss;\n\n\t\t\t\t\tp = ((yw + ((p = x + radiusX + 1) < w1 ? p : w1)) << 2);\n\n\t\t\t\t\tr -= si.r - ( si.r = px[p]);\n\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\n\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\n\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\n\n\t\t\t\t\tsi = si.n;\n\n\t\t\t\t}\n\t\t\t\tyw += w;\n\t\t\t}\n\n\t\t\tms = mty;\n\t\t\tss = sty;\n\t\t\tfor (x = 0; x < w; x++) {\n\t\t\t\tyi = (x << 2) | 0;\n\n\t\t\t\tr = (ryp1 * (pr = px[yi])) | 0;\n\t\t\t\tg = (ryp1 * (pg = px[(yi + 1) | 0])) | 0;\n\t\t\t\tb = (ryp1 * (pb = px[(yi + 2) | 0])) | 0;\n\t\t\t\ta = (ryp1 * (pa = px[(yi + 3) | 0])) | 0;\n\n\t\t\t\tsy = ssy;\n\t\t\t\tfor( i = 0; i < ryp1; i++ )\n\t\t\t\t{\n\t\t\t\t\tsy.r = pr;\n\t\t\t\t\tsy.g = pg;\n\t\t\t\t\tsy.b = pb;\n\t\t\t\t\tsy.a = pa;\n\t\t\t\t\tsy = sy.n;\n\t\t\t\t}\n\n\t\t\t\typ = w;\n\n\t\t\t\tfor( i = 1; i <= radiusY; i++ )\n\t\t\t\t{\n\t\t\t\t\tyi = ( yp + x ) << 2;\n\n\t\t\t\t\tr += ( sy.r = px[yi]);\n\t\t\t\t\tg += ( sy.g = px[yi+1]);\n\t\t\t\t\tb += ( sy.b = px[yi+2]);\n\t\t\t\t\ta += ( sy.a = px[yi+3]);\n\n\t\t\t\t\tsy = sy.n;\n\n\t\t\t\t\tif( i < h1 )\n\t\t\t\t\t{\n\t\t\t\t\t\typ += w;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tyi = x;\n\t\t\t\tsi = ssy;\n\t\t\t\tif ( iterations > 0 )\n\t\t\t\t{\n\t\t\t\t\tfor ( y = 0; y < h; y++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tp = yi << 2;\n\t\t\t\t\t\tpx[p+3] = pa =(a * ms) >>> ss;\n\t\t\t\t\t\tif ( pa > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpx[p]   = ((r * ms) >>> ss );\n\t\t\t\t\t\t\tpx[p+1] = ((g * ms) >>> ss );\n\t\t\t\t\t\t\tpx[p+2] = ((b * ms) >>> ss );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpx[p] = px[p+1] = px[p+2] = 0\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp = ( x + (( ( p = y + ryp1) < h1 ? p : h1 ) * w )) << 2;\n\n\t\t\t\t\t\tr -= si.r - ( si.r = px[p]);\n\t\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\n\t\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\n\t\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\n\n\t\t\t\t\t\tsi = si.n;\n\n\t\t\t\t\t\tyi += w;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor ( y = 0; y < h; y++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tp = yi << 2;\n\t\t\t\t\t\tpx[p+3] = pa =(a * ms) >>> ss;\n\t\t\t\t\t\tif ( pa > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpa = 255 / pa;\n\t\t\t\t\t\t\tpx[p]   = ((r * ms) >>> ss ) * pa;\n\t\t\t\t\t\t\tpx[p+1] = ((g * ms) >>> ss ) * pa;\n\t\t\t\t\t\t\tpx[p+2] = ((b * ms) >>> ss ) * pa;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpx[p] = px[p+1] = px[p+2] = 0\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp = ( x + (( ( p = y + ryp1) < h1 ? p : h1 ) * w )) << 2;\n\n\t\t\t\t\t\tr -= si.r - ( si.r = px[p]);\n\t\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\n\t\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\n\t\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\n\n\t\t\t\t\t\tsi = si.n;\n\n\t\t\t\t\t\tyi += w;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn true;\n\t};\n\n\tcreatejs.BlurFilter = createjs.promote(BlurFilter, \"Filter\");\n}());\n\n//##############################################################################\n// AlphaMapFilter.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\t\n\t\n// constructor:\n\t/**\n\t * Applies a greyscale alpha map image (or canvas) to the target, such that the alpha channel of the result will\n\t * be copied from the red channel of the map, and the RGB channels will be copied from the target.\n\t *\n\t * Generally, it is recommended that you use {{#crossLink \"AlphaMaskFilter\"}}{{/crossLink}}, because it has much\n\t * better performance.\n\t *\n\t * <h4>Example</h4>\n\t * This example draws a red->blue box, caches it, and then uses the cache canvas as an alpha map on a 100x100 image.\n\t *\n\t *       var box = new createjs.Shape();\n\t *       box.graphics.beginLinearGradientFill([\"#ff0000\", \"#0000ff\"], [0, 1], 0, 0, 0, 100)\n\t *       box.graphics.drawRect(0, 0, 100, 100);\n\t *       box.cache(0, 0, 100, 100);\n\t *\n\t *       var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\n\t *       bmp.filters = [\n\t *           new createjs.AlphaMapFilter(box.cacheCanvas)\n\t *       ];\n\t *       bmp.cache(0, 0, 100, 100);\n\t *       stage.addChild(bmp);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.\n\t * @class AlphaMapFilter\n\t * @extends Filter\n\t * @constructor\n\t * @param {HTMLImageElement|HTMLCanvasElement} alphaMap The greyscale image (or canvas) to use as the alpha value for the\n\t * result. This should be exactly the same dimensions as the target.\n\t **/\n\tfunction AlphaMapFilter(alphaMap) {\n\t\tthis.Filter_constructor();\n\t\n\t// public properties:\n\t\t/**\n\t\t * The greyscale image (or canvas) to use as the alpha value for the result. This should be exactly the same\n\t\t * dimensions as the target.\n\t\t * @property alphaMap\n\t\t * @type HTMLImageElement|HTMLCanvasElement\n\t\t **/\n\t\tthis.alphaMap = alphaMap;\n\t\t\n\t\t\n\t// private properties:\n\t\t/**\n\t\t * @property _alphaMap\n\t\t * @protected\n\t\t * @type HTMLImageElement|HTMLCanvasElement\n\t\t **/\n\t\tthis._alphaMap = null;\n\t\t\n\t\t/**\n\t\t * @property _mapData\n\t\t * @protected\n\t\t * @type Uint8ClampedArray\n\t\t **/\n\t\tthis._mapData = null;\n\t\tthis._mapTexture = null;\n\n\t\tthis.FRAG_SHADER_BODY = (\n\t\t\t\"uniform sampler2D uAlphaSampler;\"+\n\n\t\t\t\"void main(void) {\" +\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\n\t\t\t\t\"vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);\" +\n\n\t\t\t\t// some image formats can have transparent white rgba(1,1,1, 0) when put on the GPU, this means we need a slight tweak\n\t\t\t\t// using ceil ensure that the colour will be used so long as it exists but pure transparency will be treated black\n\t\t\t\t\"gl_FragColor = vec4(color.rgb, color.a * (alphaMap.r * ceil(alphaMap.a)));\" +\n\t\t\t\"}\"\n\t\t);\n\t}\n\tvar p = createjs.extend(AlphaMapFilter, createjs.Filter);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\t/** docced in super class **/\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\n\t\tif(!this._mapTexture) { this._mapTexture = gl.createTexture(); }\n\n\t\tgl.activeTexture(gl.TEXTURE1);\n\t\tgl.bindTexture(gl.TEXTURE_2D, this._mapTexture);\n\t\tstage.setTextureParams(gl);\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.alphaMap);\n\n\t\tgl.uniform1i(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uAlphaSampler\"),\n\t\t\t1\n\t\t);\n\t};\n\n// public methods:\n\t/** docced in super class **/\n\tp.clone = function () {\n\t\tvar o = new AlphaMapFilter(this.alphaMap);\n\t\to._alphaMap = this._alphaMap;\n\t\to._mapData = this._mapData;\n\t\treturn o;\n\t};\n\n\t/** docced in super class **/\n\tp.toString = function () {\n\t\treturn \"[AlphaMapFilter]\";\n\t};\n\n\n// private methods:\n\t/** docced in super class **/\n\tp._applyFilter = function (imageData) {\n\t\tif (!this.alphaMap) { return true; }\n\t\tif (!this._prepAlphaMap()) { return false; }\n\t\t\n\t\t// TODO: update to support scenarios where the target has different dimensions.\n\t\tvar data = imageData.data;\n\t\tvar map = this._mapData;\n\t\tfor(var i=0, l=data.length; i<l; i += 4) { data[i + 3] = map[i] || 0; }\n\t\t\n\t\treturn true;\n\t};\n\n\t/**\n\t * @method _prepAlphaMap\n\t * @protected\n\t **/\n\tp._prepAlphaMap = function () {\n\t\tif (!this.alphaMap) { return false; }\n\t\tif (this.alphaMap == this._alphaMap && this._mapData) { return true; }\n\n\t\tthis._mapData = null;\n\t\tvar map = this._alphaMap = this.alphaMap;\n\t\tvar canvas = map;\n\t\tvar ctx;\n\t\tif (map instanceof HTMLCanvasElement) {\n\t\t\tctx = canvas.getContext(\"2d\");\n\t\t} else {\n\t\t\tcanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement(\"canvas\");\n\t\t\tcanvas.width = map.width;\n\t\t\tcanvas.height = map.height;\n\t\t\tctx = canvas.getContext(\"2d\");\n\t\t\tctx.drawImage(map, 0, 0);\n\t\t}\n\n\t\ttry {\n\t\t\tvar imgData = ctx.getImageData(0, 0, map.width, map.height);\n\t\t} catch (e) {\n\t\t\t//if (!this.suppressCrossDomainErrors) throw new Error(\"unable to access local image data: \" + e);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tthis._mapData = imgData.data;\n\t\treturn true;\n\t};\n\n\n\tcreatejs.AlphaMapFilter = createjs.promote(AlphaMapFilter, \"Filter\");\n}());\n\n//##############################################################################\n// AlphaMaskFilter.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Applies the alpha from the mask image (or canvas) to the target, such that the alpha channel of the result will\n\t * be derived from the mask, and the RGB channels will be copied from the target. This can be used, for example, to\n\t * apply an alpha mask to a display object. This can also be used to combine a JPG compressed RGB image with a PNG32\n\t * alpha mask, which can result in a much smaller file size than a single PNG32 containing ARGB.\n\t *\n\t * <b>IMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters correctly.</b>\n\t *\n\t * <h4>Example</h4>\n\t * This example draws a gradient box, then caches it and uses the \"cacheCanvas\" as the alpha mask on a 100x100 image.\n\t *\n\t *      var box = new createjs.Shape();\n\t *      box.graphics.beginLinearGradientFill([\"#000000\", \"rgba(0, 0, 0, 0)\"], [0, 1], 0, 0, 100, 100)\n\t *      box.graphics.drawRect(0, 0, 100, 100);\n\t *      box.cache(0, 0, 100, 100);\n\t *\n\t *      var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\n\t *      bmp.filters = [\n\t *          new createjs.AlphaMaskFilter(box.cacheCanvas)\n\t *      ];\n\t *      bmp.cache(0, 0, 100, 100);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.\n\t * @class AlphaMaskFilter\n\t * @extends Filter\n\t * @constructor\n\t * @param {HTMLImageElement|HTMLCanvasElement} mask\n\t **/\n\tfunction AlphaMaskFilter(mask) {\n\t\tthis.Filter_constructor();\n\t\n\t// public properties:\n\t\t/**\n\t\t * The image (or canvas) to use as the mask.\n\t\t * @property mask\n\t\t * @type HTMLImageElement|HTMLCanvasElement\n\t\t **/\n\t\tthis.mask = mask;\n\n\t\t/** docced in super class **/\n\t\tthis.usesContext = true;\n\n\t\tthis.FRAG_SHADER_BODY = (\n\t\t\t\"uniform sampler2D uAlphaSampler;\"+\n\n\t\t\t\"void main(void) {\" +\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\n\t\t\t\t\"vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);\" +\n\n\t\t\t\t\"gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);\" +\n\t\t\t\"}\"\n\t\t);\n\t}\n\tvar p = createjs.extend(AlphaMaskFilter, createjs.Filter);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\t/** docced in super class **/\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\n\t\tif(!this._mapTexture) { this._mapTexture = gl.createTexture(); }\n\n\t\tgl.activeTexture(gl.TEXTURE1);\n\t\tgl.bindTexture(gl.TEXTURE_2D, this._mapTexture);\n\t\tstage.setTextureParams(gl);\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.mask);\n\n\t\tgl.uniform1i(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uAlphaSampler\"),\n\t\t\t1\n\t\t);\n\t};\n\n// public methods:\n\t/**\n\t * Applies the filter to the specified context.\n\t *\n\t * <strong>IMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters\n\t * correctly.</strong>\n\t * @method applyFilter\n\t * @param {CanvasRenderingContext2D} ctx The 2D context to use as the source.\n\t * @param {Number} x The x position to use for the source rect.\n\t * @param {Number} y The y position to use for the source rect.\n\t * @param {Number} width The width to use for the source rect.\n\t * @param {Number} height The height to use for the source rect.\n\t * @param {CanvasRenderingContext2D} [targetCtx] NOT SUPPORTED IN THIS FILTER. The 2D context to draw the result to. Defaults to the context passed to ctx.\n\t * @param {Number} [targetX] NOT SUPPORTED IN THIS FILTER. The x position to draw the result to. Defaults to the value passed to x.\n\t * @param {Number} [targetY] NOT SUPPORTED IN THIS FILTER. The y position to draw the result to. Defaults to the value passed to y.\n\t * @return {Boolean} If the filter was applied successfully.\n\t **/\n\tp.applyFilter = function (ctx, x, y, width, height, targetCtx, targetX, targetY) {\n\t\tif (!this.mask) { return true; }\n\t\ttargetCtx = targetCtx || ctx;\n\t\tif (targetX == null) { targetX = x; }\n\t\tif (targetY == null) { targetY = y; }\n\n\t\ttargetCtx.save();\n\t\tif (ctx != targetCtx) {\n\t\t\t// TODO: support targetCtx and targetX/Y\n\t\t\t// clearRect, then draw the ctx in?\n\t\t\treturn false;\n\t\t}\n\n\t\ttargetCtx.globalCompositeOperation = \"destination-in\";\n\t\ttargetCtx.drawImage(this.mask, targetX, targetY);\n\t\ttargetCtx.restore();\n\t\treturn true;\n\t};\n\n\t/** docced in super class **/\n\tp.clone = function () {\n\t\treturn new AlphaMaskFilter(this.mask);\n\t};\n\n\t/** docced in super class **/\n\tp.toString = function () {\n\t\treturn \"[AlphaMaskFilter]\";\n\t};\n\n\n\tcreatejs.AlphaMaskFilter = createjs.promote(AlphaMaskFilter, \"Filter\");\n}());\n\n//##############################################################################\n// ColorFilter.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Applies a color transform to DisplayObjects.\n\t *\n\t * <h4>Example</h4>\n\t * This example draws a red circle, and then transforms it to Blue. This is accomplished by multiplying all the channels\n\t * to 0 (except alpha, which is set to 1), and then adding 255 to the blue channel.\n\t *\n\t *      var shape = new createjs.Shape().set({x:100,y:100});\n\t *      shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\t *\n\t *      shape.filters = [\n\t *          new createjs.ColorFilter(0,0,0,1, 0,0,255,0)\n\t *      ];\n\t *      shape.cache(-50, -50, 100, 100);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\n\t * @class ColorFilter\n\t * @param {Number} [redMultiplier=1] The amount to multiply against the red channel. This is a range between 0 and 1.\n\t * @param {Number} [greenMultiplier=1] The amount to multiply against the green channel. This is a range between 0 and 1.\n\t * @param {Number} [blueMultiplier=1] The amount to multiply against the blue channel. This is a range between 0 and 1.\n\t * @param {Number} [alphaMultiplier=1] The amount to multiply against the alpha channel. This is a range between 0 and 1.\n\t * @param {Number} [redOffset=0] The amount to add to the red channel after it has been multiplied. This is a range\n\t * between -255 and 255.\n\t * @param {Number} [greenOffset=0] The amount to add to the green channel after it has been multiplied. This is a range\n\t  * between -255 and 255.\n\t * @param {Number} [blueOffset=0] The amount to add to the blue channel after it has been multiplied. This is a range\n\t  * between -255 and 255.\n\t * @param {Number} [alphaOffset=0] The amount to add to the alpha channel after it has been multiplied. This is a range\n\t  * between -255 and 255.\n\t * @constructor\n\t * @extends Filter\n\t **/\n\tfunction ColorFilter(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset) {\n\t\tthis.Filter_constructor();\n\n\t// public properties:\n\t\t/**\n\t\t * Red channel multiplier.\n\t\t * @property redMultiplier\n\t\t * @type Number\n\t\t **/\n\t\tthis.redMultiplier = redMultiplier != null ? redMultiplier : 1;\n\t\n\t\t/**\n\t\t * Green channel multiplier.\n\t\t * @property greenMultiplier\n\t\t * @type Number\n\t\t **/\n\t\tthis.greenMultiplier = greenMultiplier != null ? greenMultiplier : 1;\n\t\n\t\t/**\n\t\t * Blue channel multiplier.\n\t\t * @property blueMultiplier\n\t\t * @type Number\n\t\t **/\n\t\tthis.blueMultiplier = blueMultiplier != null ? blueMultiplier : 1;\n\t\n\t\t/**\n\t\t * Alpha channel multiplier.\n\t\t * @property alphaMultiplier\n\t\t * @type Number\n\t\t **/\n\t\tthis.alphaMultiplier = alphaMultiplier != null ? alphaMultiplier : 1;\n\t\n\t\t/**\n\t\t * Red channel offset (added to value).\n\t\t * @property redOffset\n\t\t * @type Number\n\t\t **/\n\t\tthis.redOffset = redOffset || 0;\n\t\n\t\t/**\n\t\t * Green channel offset (added to value).\n\t\t * @property greenOffset\n\t\t * @type Number\n\t\t **/\n\t\tthis.greenOffset = greenOffset || 0;\n\t\n\t\t/**\n\t\t * Blue channel offset (added to value).\n\t\t * @property blueOffset\n\t\t * @type Number\n\t\t **/\n\t\tthis.blueOffset = blueOffset || 0;\n\t\n\t\t/**\n\t\t * Alpha channel offset (added to value).\n\t\t * @property alphaOffset\n\t\t * @type Number\n\t\t **/\n\t\tthis.alphaOffset = alphaOffset || 0;\n\n\t\tthis.FRAG_SHADER_BODY = (\n\t\t\t\"uniform vec4 uColorMultiplier;\" +\n\t\t\t\"uniform vec4 uColorOffset;\" +\n\n\t\t\t\"void main(void) {\" +\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\n\n\t\t\t\t\"gl_FragColor = (color * uColorMultiplier) + uColorOffset;\" +\n\t\t\t\"}\"\n\t\t);\n\n\t}\n\tvar p = createjs.extend(ColorFilter, createjs.Filter);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\n// public methods:\n\t/** docced in super class **/\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\n\t\tgl.uniform4f(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMultiplier\"),\n\t\t\tthis.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier\n\t\t);\n\n\t\tgl.uniform4f(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorOffset\"),\n\t\t\tthis.redOffset/255, this.greenOffset/255, this.blueOffset/255, this.alphaOffset/255\n\t\t);\n\t};\n\n\t/** docced in super class **/\n\tp.toString = function() {\n\t\treturn \"[ColorFilter]\";\n\t};\n\n\t/** docced in super class **/\n\tp.clone = function() {\n\t\treturn new ColorFilter(\n\t\t\tthis.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier,\n\t\t\tthis.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset\n\t\t);\n\t};\n\n// private methods:\n\t/** docced in super class **/\n\tp._applyFilter = function(imageData) {\n\t\tvar data = imageData.data;\n\t\tvar l = data.length;\n\t\tfor (var i=0; i<l; i+=4) {\n\t\t\tdata[i] = data[i]*this.redMultiplier+this.redOffset;\n\t\t\tdata[i+1] = data[i+1]*this.greenMultiplier+this.greenOffset;\n\t\t\tdata[i+2] = data[i+2]*this.blueMultiplier+this.blueOffset;\n\t\t\tdata[i+3] = data[i+3]*this.alphaMultiplier+this.alphaOffset;\n\t\t}\n\t\treturn true;\n\t};\n\n\n\tcreatejs.ColorFilter = createjs.promote(ColorFilter, \"Filter\");\n}());\n\n//##############################################################################\n// ColorMatrix.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Provides helper functions for assembling a matrix for use with the {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}.\n\t * Most methods return the instance to facilitate chained calls.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      myColorMatrix.adjustHue(20).adjustBrightness(50);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an example of how to apply filters, or {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}\n\t * for an example of how to use ColorMatrix to change a DisplayObject's color.\n\t * @class ColorMatrix\n\t * @param {Number} brightness\n\t * @param {Number} contrast\n\t * @param {Number} saturation\n\t * @param {Number} hue\n\t * @constructor\n\t **/\n\tfunction ColorMatrix(brightness, contrast, saturation, hue) {\n\t\tthis.setColor(brightness, contrast, saturation, hue);\n\t}\n\tvar p = ColorMatrix.prototype;\n\n// constants:\n\t/**\n\t * Array of delta values for contrast calculations.\n\t * @property DELTA_INDEX\n\t * @type Array\n\t * @protected\n\t * @static\n\t **/\n\tColorMatrix.DELTA_INDEX = [\n\t\t0,    0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1,  0.11,\n\t\t0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,\n\t\t0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,\n\t\t0.44, 0.46, 0.48, 0.5,  0.53, 0.56, 0.59, 0.62, 0.65, 0.68,\n\t\t0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,\n\t\t1.0,  1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,\n\t\t1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0,  2.12, 2.25,\n\t\t2.37, 2.50, 2.62, 2.75, 2.87, 3.0,  3.2,  3.4,  3.6,  3.8,\n\t\t4.0,  4.3,  4.7,  4.9,  5.0,  5.5,  6.0,  6.5,  6.8,  7.0,\n\t\t7.3,  7.5,  7.8,  8.0,  8.4,  8.7,  9.0,  9.4,  9.6,  9.8,\n\t\t10.0\n\t];\n\n\t/**\n\t * Identity matrix values.\n\t * @property IDENTITY_MATRIX\n\t * @type Array\n\t * @protected\n\t * @static\n\t **/\n\tColorMatrix.IDENTITY_MATRIX = [\n\t\t1,0,0,0,0,\n\t\t0,1,0,0,0,\n\t\t0,0,1,0,0,\n\t\t0,0,0,1,0,\n\t\t0,0,0,0,1\n\t];\n\n\t/**\n\t * The constant length of a color matrix.\n\t * @property LENGTH\n\t * @type Number\n\t * @protected\n\t * @static\n\t **/\n\tColorMatrix.LENGTH = ColorMatrix.IDENTITY_MATRIX.length;\n\n\n// public methods:\n\t/**\n\t * Resets the instance with the specified values.\n\t * @method setColor\n\t * @param {Number} brightness\n\t * @param {Number} contrast\n\t * @param {Number} saturation\n\t * @param {Number} hue\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t */\n\tp.setColor = function(brightness,contrast,saturation,hue) {\n\t\treturn this.reset().adjustColor(brightness,contrast,saturation,hue);\n\t};\n\n\t/**\n\t * Resets the matrix to identity values.\n\t * @method reset\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t */\n\tp.reset = function() {\n\t\treturn this.copy(ColorMatrix.IDENTITY_MATRIX);\n\t};\n\n\t/**\n\t * Shortcut method to adjust brightness, contrast, saturation and hue.\n\t * Equivalent to calling adjustHue(hue), adjustContrast(contrast),\n\t * adjustBrightness(brightness), adjustSaturation(saturation), in that order.\n\t * @method adjustColor\n\t * @param {Number} brightness\n\t * @param {Number} contrast\n\t * @param {Number} saturation\n\t * @param {Number} hue\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.adjustColor = function(brightness,contrast,saturation,hue) {\n\t\tthis.adjustHue(hue);\n\t\tthis.adjustContrast(contrast);\n\t\tthis.adjustBrightness(brightness);\n\t\treturn this.adjustSaturation(saturation);\n\t};\n\n\t/**\n\t * Adjusts the brightness of pixel color by adding the specified value to the red, green and blue channels.\n\t * Positive values will make the image brighter, negative values will make it darker.\n\t * @method adjustBrightness\n\t * @param {Number} value A value between -255 & 255 that will be added to the RGB channels.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.adjustBrightness = function(value) {\n\t\tif (value == 0 || isNaN(value)) { return this; }\n\t\tvalue = this._cleanValue(value,255);\n\t\tthis._multiplyMatrix([\n\t\t\t1,0,0,0,value,\n\t\t\t0,1,0,0,value,\n\t\t\t0,0,1,0,value,\n\t\t\t0,0,0,1,0,\n\t\t\t0,0,0,0,1\n\t\t]);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Adjusts the contrast of pixel color.\n\t * Positive values will increase contrast, negative values will decrease contrast.\n\t * @method adjustContrast\n\t * @param {Number} value A value between -100 & 100.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.adjustContrast = function(value) {\n\t\tif (value == 0 || isNaN(value)) { return this; }\n\t\tvalue = this._cleanValue(value,100);\n\t\tvar x;\n\t\tif (value<0) {\n\t\t\tx = 127+value/100*127;\n\t\t} else {\n\t\t\tx = value%1;\n\t\t\tif (x == 0) {\n\t\t\t\tx = ColorMatrix.DELTA_INDEX[value];\n\t\t\t} else {\n\t\t\t\tx = ColorMatrix.DELTA_INDEX[(value<<0)]*(1-x)+ColorMatrix.DELTA_INDEX[(value<<0)+1]*x; // use linear interpolation for more granularity.\n\t\t\t}\n\t\t\tx = x*127+127;\n\t\t}\n\t\tthis._multiplyMatrix([\n\t\t\tx/127,0,0,0,0.5*(127-x),\n\t\t\t0,x/127,0,0,0.5*(127-x),\n\t\t\t0,0,x/127,0,0.5*(127-x),\n\t\t\t0,0,0,1,0,\n\t\t\t0,0,0,0,1\n\t\t]);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Adjusts the color saturation of the pixel.\n\t * Positive values will increase saturation, negative values will decrease saturation (trend towards greyscale).\n\t * @method adjustSaturation\n\t * @param {Number} value A value between -100 & 100.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.adjustSaturation = function(value) {\n\t\tif (value == 0 || isNaN(value)) { return this; }\n\t\tvalue = this._cleanValue(value,100);\n\t\tvar x = 1+((value > 0) ? 3*value/100 : value/100);\n\t\tvar lumR = 0.3086;\n\t\tvar lumG = 0.6094;\n\t\tvar lumB = 0.0820;\n\t\tthis._multiplyMatrix([\n\t\t\tlumR*(1-x)+x,lumG*(1-x),lumB*(1-x),0,0,\n\t\t\tlumR*(1-x),lumG*(1-x)+x,lumB*(1-x),0,0,\n\t\t\tlumR*(1-x),lumG*(1-x),lumB*(1-x)+x,0,0,\n\t\t\t0,0,0,1,0,\n\t\t\t0,0,0,0,1\n\t\t]);\n\t\treturn this;\n\t};\n\n\n\t/**\n\t * Adjusts the hue of the pixel color.\n\t * @method adjustHue\n\t * @param {Number} value A value between -180 & 180.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.adjustHue = function(value) {\n\t\tif (value == 0 || isNaN(value)) { return this; }\n\t\tvalue = this._cleanValue(value,180)/180*Math.PI;\n\t\tvar cosVal = Math.cos(value);\n\t\tvar sinVal = Math.sin(value);\n\t\tvar lumR = 0.213;\n\t\tvar lumG = 0.715;\n\t\tvar lumB = 0.072;\n\t\tthis._multiplyMatrix([\n\t\t\tlumR+cosVal*(1-lumR)+sinVal*(-lumR),lumG+cosVal*(-lumG)+sinVal*(-lumG),lumB+cosVal*(-lumB)+sinVal*(1-lumB),0,0,\n\t\t\tlumR+cosVal*(-lumR)+sinVal*(0.143),lumG+cosVal*(1-lumG)+sinVal*(0.140),lumB+cosVal*(-lumB)+sinVal*(-0.283),0,0,\n\t\t\tlumR+cosVal*(-lumR)+sinVal*(-(1-lumR)),lumG+cosVal*(-lumG)+sinVal*(lumG),lumB+cosVal*(1-lumB)+sinVal*(lumB),0,0,\n\t\t\t0,0,0,1,0,\n\t\t\t0,0,0,0,1\n\t\t]);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Concatenates (multiplies) the specified matrix with this one.\n\t * @method concat\n\t * @param {Array} matrix An array or ColorMatrix instance.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.concat = function(matrix) {\n\t\tmatrix = this._fixMatrix(matrix);\n\t\tif (matrix.length != ColorMatrix.LENGTH) { return this; }\n\t\tthis._multiplyMatrix(matrix);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a clone of this ColorMatrix.\n\t * @method clone\n\t * @return {ColorMatrix} A clone of this ColorMatrix.\n\t **/\n\tp.clone = function() {\n\t\treturn (new ColorMatrix()).copy(this);\n\t};\n\n\t/**\n\t * Return a length 25 (5x5) array instance containing this matrix's values.\n\t * @method toArray\n\t * @return {Array} An array holding this matrix's values.\n\t **/\n\tp.toArray = function() {\n\t\tvar arr = [];\n\t\tfor (var i= 0, l=ColorMatrix.LENGTH; i<l; i++) {\n\t\t\tarr[i] = this[i];\n\t\t}\n\t\treturn arr;\n\t};\n\n\t/**\n\t * Copy the specified matrix's values to this matrix.\n\t * @method copy\n\t * @param {Array} matrix An array or ColorMatrix instance.\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t **/\n\tp.copy = function(matrix) {\n\t\tvar l = ColorMatrix.LENGTH;\n\t\tfor (var i=0;i<l;i++) {\n\t\t\tthis[i] = matrix[i];\n\t\t}\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[ColorMatrix]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * @method _multiplyMatrix\n\t * @param {Array} matrix\n\t * @protected\n\t **/\n\tp._multiplyMatrix = function(matrix) {\n\t\tvar i, j, k, col = [];\n\n\t\tfor (i=0;i<5;i++) {\n\t\t\tfor (j=0;j<5;j++) {\n\t\t\t\tcol[j] = this[j+i*5];\n\t\t\t}\n\t\t\tfor (j=0;j<5;j++) {\n\t\t\t\tvar val=0;\n\t\t\t\tfor (k=0;k<5;k++) {\n\t\t\t\t\tval += matrix[j+k*5]*col[k];\n\t\t\t\t}\n\t\t\t\tthis[j+i*5] = val;\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Make sure values are within the specified range, hue has a limit of 180, brightness is 255, others are 100.\n\t * @method _cleanValue\n\t * @param {Number} value The raw number\n\t * @param {Number} limit The maximum that the number can be. The minimum is the limit * -1.\n\t * @protected\n\t **/\n\tp._cleanValue = function(value, limit) {\n\t\treturn Math.min(limit,Math.max(-limit,value));\n\t};\n\n\t/**\n\t * Makes sure matrixes are 5x5 (25 long).\n\t * @method _fixMatrix\n\t * @param {Array} matrix\n\t * @protected\n\t **/\n\tp._fixMatrix = function(matrix) {\n\t\tif (matrix instanceof ColorMatrix) { matrix = matrix.toArray(); }\n\t\tif (matrix.length < ColorMatrix.LENGTH) {\n\t\t\tmatrix = matrix.slice(0,matrix.length).concat(ColorMatrix.IDENTITY_MATRIX.slice(matrix.length,ColorMatrix.LENGTH));\n\t\t} else if (matrix.length > ColorMatrix.LENGTH) {\n\t\t\tmatrix = matrix.slice(0,ColorMatrix.LENGTH);\n\t\t}\n\t\treturn matrix;\n\t};\n\n\n\tcreatejs.ColorMatrix = ColorMatrix;\n}());\n\n//##############################################################################\n// ColorMatrixFilter.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * Allows you to carry out complex color operations such as modifying saturation, brightness, or inverting. See the\n\t * {{#crossLink \"ColorMatrix\"}}{{/crossLink}} for more information on changing colors. For an easier color transform,\n\t * consider the {{#crossLink \"ColorFilter\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t * This example creates a red circle, inverts its hue, and then saturates it to brighten it up.\n\t *\n\t *      var shape = new createjs.Shape().set({x:100,y:100});\n\t *      shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\n\t *\n\t *      var matrix = new createjs.ColorMatrix().adjustHue(180).adjustSaturation(100);\n\t *      shape.filters = [\n\t *          new createjs.ColorMatrixFilter(matrix)\n\t *      ];\n\t *\n\t *      shape.cache(-50, -50, 100, 100);\n\t *\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\n\t * @class ColorMatrixFilter\n\t * @constructor\n\t * @extends Filter\n\t * @param {Array | ColorMatrix} matrix A 4x5 matrix describing the color operation to perform. See also the {{#crossLink \"ColorMatrix\"}}{{/crossLink}}\n\t * class.\n\t **/\n\tfunction ColorMatrixFilter(matrix) {\n\t\tthis.Filter_constructor();\n\n\t// public properties:\n\t\t/**\n\t\t * A 4x5 matrix describing the color operation to perform. See also the {{#crossLink \"ColorMatrix\"}}{{/crossLink}}\n\t\t * @property matrix\n\t\t * @type Array | ColorMatrix\n\t\t **/\n\t\tthis.matrix = matrix;\n\n\t\tthis.FRAG_SHADER_BODY = (\n\t\t\t\"uniform mat4 uColorMatrix;\" +\n\t\t\t\"uniform vec4 uColorMatrixOffset;\" +\n\n\t\t\t\"void main(void) {\" +\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\n\n\t\t\t\t\"mat4 m = uColorMatrix;\" +\n\t\t\t\t\"vec4 newColor = vec4(0,0,0,0);\" +\n\t\t\t\t\"newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];\" +\n\t\t\t\t\"newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];\" +\n\t\t\t\t\"newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];\" +\n\t\t\t\t\"newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];\" +\n\n\t\t\t\t\"gl_FragColor = newColor + uColorMatrixOffset;\" +\n\t\t\t\"}\"\n\t\t);\n\t}\n\tvar p = createjs.extend(ColorMatrixFilter, createjs.Filter);\n\n\t// TODO: deprecated\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\n\n\t/** docced in super class **/\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\n\t\tvar mat = this.matrix;\n\t\tvar colorMatrix = new Float32Array([\n\t\t\tmat[0],mat[1],mat[2],mat[3],\n\t\t\tmat[5],mat[6],mat[7],mat[8],\n\t\t\tmat[10],mat[11],mat[12],mat[13],\n\t\t\tmat[15],mat[16],mat[17],mat[18]\n\t\t]);\n\n\t\tgl.uniformMatrix4fv(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMatrix\"),\n\t\t\tfalse, colorMatrix\n\t\t);\n\t\tgl.uniform4f(\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMatrixOffset\"),\n\t\t\tmat[4]/255, mat[9]/255, mat[14]/255, mat[19]/255\n\t\t);\n\t};\n\n// public methods:\n\t/** docced in super class **/\n\tp.toString = function() {\n\t\treturn \"[ColorMatrixFilter]\";\n\t};\n\n\t/** docced in super class **/\n\tp.clone = function() {\n\t\treturn new ColorMatrixFilter(this.matrix);\n\t};\n\n// private methods:\n\t/** docced in super class **/\n\tp._applyFilter = function(imageData) { \n\t\tvar data = imageData.data;\n\t\tvar l = data.length;\n\t\tvar r,g,b,a;\n\t\tvar mtx = this.matrix;\n\t\tvar m0 =  mtx[0],  m1 =  mtx[1],  m2 =  mtx[2],  m3 =  mtx[3],  m4 =  mtx[4];\n\t\tvar m5 =  mtx[5],  m6 =  mtx[6],  m7 =  mtx[7],  m8 =  mtx[8],  m9 =  mtx[9];\n\t\tvar m10 = mtx[10], m11 = mtx[11], m12 = mtx[12], m13 = mtx[13], m14 = mtx[14];\n\t\tvar m15 = mtx[15], m16 = mtx[16], m17 = mtx[17], m18 = mtx[18], m19 = mtx[19];\n\n\t\tfor (var i=0; i<l; i+=4) {\n\t\t\tr = data[i];\n\t\t\tg = data[i+1];\n\t\t\tb = data[i+2];\n\t\t\ta = data[i+3];\n\t\t\tdata[i] = r*m0+g*m1+b*m2+a*m3+m4; // red\n\t\t\tdata[i+1] = r*m5+g*m6+b*m7+a*m8+m9; // green\n\t\t\tdata[i+2] = r*m10+g*m11+b*m12+a*m13+m14; // blue\n\t\t\tdata[i+3] = r*m15+g*m16+b*m17+a*m18+m19; // alpha\n\t\t}\n\t\treturn true;\n\t};\n\n\tcreatejs.ColorMatrixFilter = createjs.promote(ColorMatrixFilter, \"Filter\");\n}());\n\n//##############################################################################\n// Touch.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n * Global utility for working with multi-touch enabled devices in EaselJS. Currently supports W3C Touch API (iOS and\n * modern Android browser) and the Pointer API (IE), including ms-prefixed events in IE10, and unprefixed in IE11.\n *\n * Ensure that you {{#crossLink \"Touch/disable\"}}{{/crossLink}} touch when cleaning up your application. You do not have\n * to check if touch is supported to enable it, as it will fail gracefully if it is not supported.\n *\n * <h4>Example</h4>\n *\n *      var stage = new createjs.Stage(\"canvasId\");\n *      createjs.Touch.enable(stage);\n *\n * <strong>Note:</strong> It is important to disable Touch on a stage that you are no longer using:\n *\n *      createjs.Touch.disable(stage);\n *\n * @class Touch\n * @static\n **/\n\tfunction Touch() {\n\t\tthrow \"Touch cannot be instantiated\";\n\t}\n\n\n// public static methods:\n\t/**\n\t * Returns `true` if touch is supported in the current browser.\n\t * @method isSupported\n\t * @return {Boolean} Indicates whether touch is supported in the current browser.\n\t * @static\n\t **/\n\tTouch.isSupported = function() {\n\t\treturn\t!!(('ontouchstart' in window) // iOS & Android\n\t\t\t|| (window.navigator['msPointerEnabled'] && window.navigator['msMaxTouchPoints'] > 0) // IE10\n\t\t\t|| (window.navigator['pointerEnabled'] && window.navigator['maxTouchPoints'] > 0)); // IE11+\n\t};\n\n\t/**\n\t * Enables touch interaction for the specified EaselJS {{#crossLink \"Stage\"}}{{/crossLink}}. Currently supports iOS\n\t * (and compatible browsers, such as modern Android browsers), and IE10/11. Supports both single touch and\n\t * multi-touch modes. Extends the EaselJS {{#crossLink \"MouseEvent\"}}{{/crossLink}} model, but without support for\n\t * double click or over/out events. See the MouseEvent {{#crossLink \"MouseEvent/pointerId:property\"}}{{/crossLink}}\n\t * for more information.\n\t * @method enable\n\t * @param {Stage} stage The {{#crossLink \"Stage\"}}{{/crossLink}} to enable touch on.\n\t * @param {Boolean} [singleTouch=false] If `true`, only a single touch will be active at a time.\n\t * @param {Boolean} [allowDefault=false] If `true`, then default gesture actions (ex. scrolling, zooming) will be\n\t * allowed when the user is interacting with the target canvas.\n\t * @return {Boolean} Returns `true` if touch was successfully enabled on the target stage.\n\t * @static\n\t **/\n\tTouch.enable = function(stage, singleTouch, allowDefault) {\n\t\tif (!stage || !stage.canvas || !Touch.isSupported()) { return false; }\n\t\tif (stage.__touch) { return true; }\n\n\t\t// inject required properties on stage:\n\t\tstage.__touch = {pointers:{}, multitouch:!singleTouch, preventDefault:!allowDefault, count:0};\n\n\t\t// note that in the future we may need to disable the standard mouse event model before adding\n\t\t// these to prevent duplicate calls. It doesn't seem to be an issue with iOS devices though.\n\t\tif ('ontouchstart' in window) { Touch._IOS_enable(stage); }\n\t\telse if (window.navigator['msPointerEnabled'] || window.navigator[\"pointerEnabled\"]) { Touch._IE_enable(stage); }\n\t\treturn true;\n\t};\n\n\t/**\n\t * Removes all listeners that were set up when calling `Touch.enable()` on a stage.\n\t * @method disable\n\t * @param {Stage} stage The {{#crossLink \"Stage\"}}{{/crossLink}} to disable touch on.\n\t * @static\n\t **/\n\tTouch.disable = function(stage) {\n\t\tif (!stage) { return; }\n\t\tif ('ontouchstart' in window) { Touch._IOS_disable(stage); }\n\t\telse if (window.navigator['msPointerEnabled'] || window.navigator[\"pointerEnabled\"]) { Touch._IE_disable(stage); }\n\t\t\n\t\tdelete stage.__touch;\n\t};\n\n\n// Private static methods:\n\t/**\n\t * @method _IOS_enable\n\t * @protected\n\t * @param {Stage} stage\n\t * @static\n\t **/\n\tTouch._IOS_enable = function(stage) {\n\t\tvar canvas = stage.canvas;\n\t\tvar f = stage.__touch.f = function(e) { Touch._IOS_handleEvent(stage,e); };\n\t\tcanvas.addEventListener(\"touchstart\", f, false);\n\t\tcanvas.addEventListener(\"touchmove\", f, false);\n\t\tcanvas.addEventListener(\"touchend\", f, false);\n\t\tcanvas.addEventListener(\"touchcancel\", f, false);\n\t};\n\n\t/**\n\t * @method _IOS_disable\n\t * @protected\n\t * @param {Stage} stage\n\t * @static\n\t **/\n\tTouch._IOS_disable = function(stage) {\n\t\tvar canvas = stage.canvas;\n\t\tif (!canvas) { return; }\n\t\tvar f = stage.__touch.f;\n\t\tcanvas.removeEventListener(\"touchstart\", f, false);\n\t\tcanvas.removeEventListener(\"touchmove\", f, false);\n\t\tcanvas.removeEventListener(\"touchend\", f, false);\n\t\tcanvas.removeEventListener(\"touchcancel\", f, false);\n\t};\n\n\t/**\n\t * @method _IOS_handleEvent\n\t * @param {Stage} stage\n\t * @param {Object} e The event to handle\n\t * @protected\n\t * @static\n\t **/\n\tTouch._IOS_handleEvent = function(stage, e) {\n\t\tif (!stage) { return; }\n\t\tif (stage.__touch.preventDefault) { e.preventDefault&&e.preventDefault(); }\n\t\tvar touches = e.changedTouches;\n\t\tvar type = e.type;\n\t\tfor (var i= 0,l=touches.length; i<l; i++) {\n\t\t\tvar touch = touches[i];\n\t\t\tvar id = touch.identifier;\n\t\t\tif (touch.target != stage.canvas) { continue; }\n\n\t\t\tif (type == \"touchstart\") {\n\t\t\t\tthis._handleStart(stage, id, e, touch.pageX, touch.pageY);\n\t\t\t} else if (type == \"touchmove\") {\n\t\t\t\tthis._handleMove(stage, id, e, touch.pageX, touch.pageY);\n\t\t\t} else if (type == \"touchend\" || type == \"touchcancel\") {\n\t\t\t\tthis._handleEnd(stage, id, e);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @method _IE_enable\n\t * @protected\n\t * @param {Stage} stage\n\t * @static\n\t **/\n\tTouch._IE_enable = function(stage) {\n\t\tvar canvas = stage.canvas;\n\t\tvar f = stage.__touch.f = function(e) { Touch._IE_handleEvent(stage,e); };\n\n\t\tif (window.navigator[\"pointerEnabled\"] === undefined) {\n\t\t\tcanvas.addEventListener(\"MSPointerDown\", f, false);\n\t\t\twindow.addEventListener(\"MSPointerMove\", f, false);\n\t\t\twindow.addEventListener(\"MSPointerUp\", f, false);\n\t\t\twindow.addEventListener(\"MSPointerCancel\", f, false);\n\t\t\tif (stage.__touch.preventDefault) { canvas.style.msTouchAction = \"none\"; }\n\t\t} else {\n\t\t\tcanvas.addEventListener(\"pointerdown\", f, false);\n\t\t\twindow.addEventListener(\"pointermove\", f, false);\n\t\t\twindow.addEventListener(\"pointerup\", f, false);\n\t\t\twindow.addEventListener(\"pointercancel\", f, false);\n\t\t\tif (stage.__touch.preventDefault) { canvas.style.touchAction = \"none\"; }\n\n\t\t}\n\t\tstage.__touch.activeIDs = {};\n\t};\n\n\t/**\n\t * @method _IE_disable\n\t * @protected\n\t * @param {Stage} stage\n\t * @static\n\t **/\n\tTouch._IE_disable = function(stage) {\n\t\tvar f = stage.__touch.f;\n\n\t\tif (window.navigator[\"pointerEnabled\"] === undefined) {\n\t\t\twindow.removeEventListener(\"MSPointerMove\", f, false);\n\t\t\twindow.removeEventListener(\"MSPointerUp\", f, false);\n\t\t\twindow.removeEventListener(\"MSPointerCancel\", f, false);\n\t\t\tif (stage.canvas) {\n\t\t\t\tstage.canvas.removeEventListener(\"MSPointerDown\", f, false);\n\t\t\t}\n\t\t} else {\n\t\t\twindow.removeEventListener(\"pointermove\", f, false);\n\t\t\twindow.removeEventListener(\"pointerup\", f, false);\n\t\t\twindow.removeEventListener(\"pointercancel\", f, false);\n\t\t\tif (stage.canvas) {\n\t\t\t\tstage.canvas.removeEventListener(\"pointerdown\", f, false);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @method _IE_handleEvent\n\t * @param {Stage} stage\n\t * @param {Object} e The event to handle.\n\t * @protected\n\t * @static\n\t **/\n\tTouch._IE_handleEvent = function(stage, e) {\n\t\tif (!stage) { return; }\n\t\tif (stage.__touch.preventDefault) { e.preventDefault && e.preventDefault(); }\n\t\tvar type = e.type;\n\t\tvar id = e.pointerId;\n\t\tvar ids = stage.__touch.activeIDs;\n\n\t\tif (type == \"MSPointerDown\" || type == \"pointerdown\") {\n\t\t\tif (e.srcElement != stage.canvas) { return; }\n\t\t\tids[id] = true;\n\t\t\tthis._handleStart(stage, id, e, e.pageX, e.pageY);\n\t\t} else if (ids[id]) { // it's an id we're watching\n\t\t\tif (type == \"MSPointerMove\" || type == \"pointermove\") {\n\t\t\t\tthis._handleMove(stage, id, e, e.pageX, e.pageY);\n\t\t\t} else if (type == \"MSPointerUp\" || type == \"MSPointerCancel\"\n\t\t\t\t\t|| type == \"pointerup\" || type == \"pointercancel\") {\n\t\t\t\tdelete(ids[id]);\n\t\t\t\tthis._handleEnd(stage, id, e);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleStart\n\t * @param {Stage} stage\n\t * @param {String|Number} id\n\t * @param {Object} e\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @protected\n\t **/\n\tTouch._handleStart = function(stage, id, e, x, y) {\n\t\tvar props = stage.__touch;\n\t\tif (!props.multitouch && props.count) { return; }\n\t\tvar ids = props.pointers;\n\t\tif (ids[id]) { return; }\n\t\tids[id] = true;\n\t\tprops.count++;\n\t\tstage._handlePointerDown(id, e, x, y);\n\t};\n\n\t/**\n\t * @method _handleMove\n\t * @param {Stage} stage\n\t * @param {String|Number} id\n\t * @param {Object} e\n\t * @param {Number} x\n\t * @param {Number} y\n\t * @protected\n\t **/\n\tTouch._handleMove = function(stage, id, e, x, y) {\n\t\tif (!stage.__touch.pointers[id]) { return; }\n\t\tstage._handlePointerMove(id, e, x, y);\n\t};\n\n\t/**\n\t * @method _handleEnd\n\t * @param {Stage} stage\n\t * @param {String|Number} id\n\t * @param {Object} e\n\t * @protected\n\t **/\n\tTouch._handleEnd = function(stage, id, e) {\n\t\t// TODO: cancel should be handled differently for proper UI (ex. an up would trigger a click, a cancel would more closely resemble an out).\n\t\tvar props = stage.__touch;\n\t\tvar ids = props.pointers;\n\t\tif (!ids[id]) { return; }\n\t\tprops.count--;\n\t\tstage._handlePointerUp(id, e, true);\n\t\tdelete(ids[id]);\n\t};\n\n\n\tcreatejs.Touch = Touch;\n}());\n\n//##############################################################################\n// version.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * Static class holding library specific information such as the version and buildDate of\n\t * the library.\n\t * @class EaselJS\n\t **/\n\tvar s = createjs.EaselJS = createjs.EaselJS || {};\n\n\t/**\n\t * The version string for this release.\n\t * @property version\n\t * @type String\n\t * @static\n\t **/\n\ts.version = /*=version*/\"1.0.0\"; // injected by build process\n\n\t/**\n\t * The build date for this release in UTC format.\n\t * @property buildDate\n\t * @type String\n\t * @static\n\t **/\n\ts.buildDate = /*=date*/\"Thu, 14 Sep 2017 19:47:53 GMT\"; // injected by build process\n\n})();\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/latest-createjs/lib/easeljs/easeljs.js?");

/***/ }),

/***/ "./node_modules/latest-createjs/lib/preloadjs/preloadjs.js":
/*!*****************************************************************!*\
  !*** ./node_modules/latest-createjs/lib/preloadjs/preloadjs.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*!\n* PreloadJS\n* Visit http://createjs.com/ for documentation, updates and examples.\n*\n* Copyright (c) 2010 gskinner.com, inc.\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n//##############################################################################\n// version.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * Static class holding library specific information such as the version and buildDate of the library.\n\t * @class PreloadJS\n\t **/\n\tvar s = createjs.PreloadJS = createjs.PreloadJS || {};\n\n\t/**\n\t * The version string for this release.\n\t * @property version\n\t * @type {String}\n\t * @static\n\t **/\n\ts.version = /*=version*/\"1.0.0\"; // injected by build process\n\n\t/**\n\t * The build date for this release in UTC format.\n\t * @property buildDate\n\t * @type {String}\n\t * @static\n\t **/\n\ts.buildDate = /*=date*/\"Thu, 14 Sep 2017 19:47:47 GMT\"; // injected by build process\n\n})();\n\n//##############################################################################\n// extend.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Sets up the prototype chain and constructor property for a new class.\n *\n * This should be called right after creating the class constructor.\n *\n * \tfunction MySubClass() {}\n * \tcreatejs.extend(MySubClass, MySuperClass);\n * \tMySubClass.prototype.doSomething = function() { }\n *\n * \tvar foo = new MySubClass();\n * \tconsole.log(foo instanceof MySuperClass); // true\n * \tconsole.log(foo.prototype.constructor === MySubClass); // true\n *\n * @method extend\n * @param {Function} subclass The subclass.\n * @param {Function} superclass The superclass to extend.\n * @return {Function} Returns the subclass's new prototype.\n */\ncreatejs.extend = function(subclass, superclass) {\n\t\"use strict\";\n\n\tfunction o() { this.constructor = subclass; }\n\to.prototype = superclass.prototype;\n\treturn (subclass.prototype = new o());\n};\n\n//##############################################################################\n// promote.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\n * It is recommended to use the super class's name as the prefix.\n * An alias to the super class's constructor is always added in the format `prefix_constructor`.\n * This allows the subclass to call super class methods without using `function.call`, providing better performance.\n *\n * For example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\n * would add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\n * prototype of `MySubClass` as `MySuperClass_draw`.\n *\n * This should be called after the class's prototype is fully defined.\n *\n * \tfunction ClassA(name) {\n * \t\tthis.name = name;\n * \t}\n * \tClassA.prototype.greet = function() {\n * \t\treturn \"Hello \"+this.name;\n * \t}\n *\n * \tfunction ClassB(name, punctuation) {\n * \t\tthis.ClassA_constructor(name);\n * \t\tthis.punctuation = punctuation;\n * \t}\n * \tcreatejs.extend(ClassB, ClassA);\n * \tClassB.prototype.greet = function() {\n * \t\treturn this.ClassA_greet()+this.punctuation;\n * \t}\n * \tcreatejs.promote(ClassB, \"ClassA\");\n *\n * \tvar foo = new ClassB(\"World\", \"!?!\");\n * \tconsole.log(foo.greet()); // Hello World!?!\n *\n * @method promote\n * @param {Function} subclass The class to promote super class methods on.\n * @param {String} prefix The prefix to add to the promoted method names. Usually the name of the superclass.\n * @return {Function} Returns the subclass.\n */\ncreatejs.promote = function(subclass, prefix) {\n\t\"use strict\";\n\n\tvar subP = subclass.prototype, supP = (Object.getPrototypeOf&&Object.getPrototypeOf(subP))||subP.__proto__;\n\tif (supP) {\n\t\tsubP[(prefix+=\"_\") + \"constructor\"] = supP.constructor; // constructor is not always innumerable\n\t\tfor (var n in supP) {\n\t\t\tif (subP.hasOwnProperty(n) && (typeof supP[n] == \"function\")) { subP[prefix + n] = supP[n]; }\n\t\t}\n\t}\n\treturn subclass;\n};\n\n//##############################################################################\n// deprecate.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Wraps deprecated methods so they still be used, but throw warnings to developers.\n *\n *\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\n *\n * The recommended approach for deprecated properties is:\n *\n *\ttry {\n *\t\tObj\tect.defineProperties(object, {\n *\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\n *\t\t\treadWriteProp: {\n *\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\n *\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\n *\t\t});\n *\t} catch (e) {}\n *\n * @method deprecate\n * @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how\n * @param {String} [name=null] The name of the method or property to display in the console warning.\n * to deprecate properties.\n * @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after\n * logging the warning in the console.\n */\ncreatejs.deprecate = function(fallbackMethod, name) {\n\t\"use strict\";\n\treturn function() {\n\t\tvar msg = \"Deprecated property or method '\"+name+\"'. See docs for info.\";\n\t\tconsole && (console.warn ? console.warn(msg) : console.log(msg));\n\t\treturn fallbackMethod && fallbackMethod.apply(this, arguments);\n\t}\n};\n\n//##############################################################################\n// proxy.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * Various utilities that the CreateJS Suite uses. Utilities are created as separate files, and will be available on the\n * createjs namespace directly.\n *\n * <h4>Example</h4>\n *\n *      myObject.addEventListener(\"change\", createjs.proxy(myMethod, scope));\n *\n * @class Utility Methods\n * @main Utility Methods\n */\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * A function proxy for methods. By default, JavaScript methods do not maintain scope, so passing a method as a\n\t * callback will result in the method getting called in the scope of the caller. Using a proxy ensures that the\n\t * method gets called in the correct scope.\n\t *\n\t * Additional arguments can be passed that will be applied to the function when it is called.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      myObject.addEventListener(\"event\", createjs.proxy(myHandler, this, arg1, arg2));\n\t *\n\t *      function myHandler(arg1, arg2) {\n\t *           // This gets called when myObject.myCallback is executed.\n\t *      }\n\t *\n\t * @method proxy\n\t * @param {Function} method The function to call\n\t * @param {Object} scope The scope to call the method name on\n\t * @param {mixed} [arg] * Arguments that are appended to the callback for additional params.\n\t * @public\n\t * @static\n\t */\n\tcreatejs.proxy = function (method, scope) {\n\t\tvar aArgs = Array.prototype.slice.call(arguments, 2);\n\t\treturn function () {\n\t\t\treturn method.apply(scope, Array.prototype.slice.call(arguments, 0).concat(aArgs));\n\t\t};\n\t}\n\n}());\n\n//##############################################################################\n// indexOf.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of\n * that value.  Returns -1 if value is not found.\n *\n *      var i = createjs.indexOf(myArray, myElementToFind);\n *\n * @method indexOf\n * @param {Array} array Array to search for searchElement\n * @param searchElement Element to find in array.\n * @return {Number} The first index of searchElement in array.\n */\ncreatejs.indexOf = function (array, searchElement){\n\t\"use strict\";\n\n\tfor (var i = 0,l=array.length; i < l; i++) {\n\t\tif (searchElement === array[i]) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n//##############################################################################\n// Event.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n// constructor:\n\t/**\n\t * Contains properties and methods shared by all events for use with\n\t * {{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\n\t * \n\t * Note that Event objects are often reused, so you should never\n\t * rely on an event object's state outside of the call stack it was received in.\n\t * @class Event\n\t * @param {String} type The event type.\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\n\t * @constructor\n\t **/\n\tfunction Event(type, bubbles, cancelable) {\n\t\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * The type of event.\n\t\t * @property type\n\t\t * @type String\n\t\t **/\n\t\tthis.type = type;\n\t\n\t\t/**\n\t\t * The object that generated an event.\n\t\t * @property target\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.target = null;\n\t\n\t\t/**\n\t\t * The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\n\t\t * always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\n\t\t * is generated from childObj, then a listener on parentObj would receive the event with\n\t\t * target=childObj (the original target) and currentTarget=parentObj (where the listener was added).\n\t\t * @property currentTarget\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.currentTarget = null;\n\t\n\t\t/**\n\t\t * For bubbling events, this indicates the current event phase:<OL>\n\t\t * \t<LI> capture phase: starting from the top parent to the target</LI>\n\t\t * \t<LI> at target phase: currently being dispatched from the target</LI>\n\t\t * \t<LI> bubbling phase: from the target to the top parent</LI>\n\t\t * </OL>\n\t\t * @property eventPhase\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.eventPhase = 0;\n\t\n\t\t/**\n\t\t * Indicates whether the event will bubble through the display list.\n\t\t * @property bubbles\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.bubbles = !!bubbles;\n\t\n\t\t/**\n\t\t * Indicates whether the default behaviour of this event can be cancelled via\n\t\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.\n\t\t * @property cancelable\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.cancelable = !!cancelable;\n\t\n\t\t/**\n\t\t * The epoch time at which this event was created.\n\t\t * @property timeStamp\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.timeStamp = (new Date()).getTime();\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property defaultPrevented\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.defaultPrevented = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.\n\t\t * @property propagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.propagationStopped = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property immediatePropagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.immediatePropagationStopped = false;\n\t\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.\n\t\t * @property removed\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.removed = false;\n\t}\n\tvar p = Event.prototype;\n\n// public methods:\n\t/**\n\t * Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\n\t * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\n\t * cancel the default behaviour associated with the event.\n\t * @method preventDefault\n\t **/\n\tp.preventDefault = function() {\n\t\tthis.defaultPrevented = this.cancelable&&true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopPropagation\n\t **/\n\tp.stopPropagation = function() {\n\t\tthis.propagationStopped = true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\n\t * {{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopImmediatePropagation\n\t **/\n\tp.stopImmediatePropagation = function() {\n\t\tthis.immediatePropagationStopped = this.propagationStopped = true;\n\t};\n\t\n\t/**\n\t * Causes the active listener to be removed via removeEventListener();\n\t * \n\t * \t\tmyBtn.addEventListener(\"click\", function(evt) {\n\t * \t\t\t// do stuff...\n\t * \t\t\tevt.remove(); // removes this listener.\n\t * \t\t});\n\t * \n\t * @method remove\n\t **/\n\tp.remove = function() {\n\t\tthis.removed = true;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Event instance.\n\t * @method clone\n\t * @return {Event} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Event(this.type, this.bubbles, this.cancelable);\n\t};\n\t\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the instance.\n\t * @return {Event} Returns the instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Event (type=\"+this.type+\")]\";\n\t};\n\n\tcreatejs.Event = Event;\n}());\n\n//##############################################################################\n// ErrorEvent.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * A general error {{#crossLink \"Event\"}}{{/crossLink}}, that describes an error that occurred, as well as any details.\n\t * @class ErrorEvent\n\t * @param {String} [title] The error title\n\t * @param {String} [message] The error description\n\t * @param {Object} [data] Additional error data\n\t * @constructor\n\t */\n\tfunction ErrorEvent(title, message, data) {\n\t\tthis.Event_constructor(\"error\");\n\n\t\t/**\n\t\t * The short error title, which indicates the type of error that occurred.\n\t\t * @property title\n\t\t * @type String\n\t\t */\n\t\tthis.title = title;\n\n\t\t/**\n\t\t * The verbose error message, containing details about the error.\n\t\t * @property message\n\t\t * @type String\n\t\t */\n\t\tthis.message = message;\n\n\t\t/**\n\t\t * Additional data attached to an error.\n\t\t * @property data\n\t\t * @type {Object}\n\t\t */\n\t\tthis.data = data;\n\t}\n\n\tvar p = createjs.extend(ErrorEvent, createjs.Event);\n\n\tp.clone = function() {\n\t\treturn new createjs.ErrorEvent(this.title, this.message, this.data);\n\t};\n\n\tcreatejs.ErrorEvent = createjs.promote(ErrorEvent, \"Event\");\n\n}());\n\n//##############################################################################\n// EventDispatcher.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * EventDispatcher provides methods for managing queues of event listeners and dispatching events.\r\n\t *\r\n\t * You can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\r\n\t * EventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\r\n\t * \r\n\t * Together with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\r\n\t * DOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\r\n\t * bubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\r\n\t * \r\n\t * EventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\r\n\t * to create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \r\n\t * {{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\r\n\t * {{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\r\n\t * \r\n\t * Another addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\r\n\t * method, which can be used to listeners for all events, or listeners for a specific event. The Event object also \r\n\t * includes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * Add EventDispatcher capabilities to the \"MyClass\" class.\r\n\t *\r\n\t *      EventDispatcher.initialize(MyClass.prototype);\r\n\t *\r\n\t * Add an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\r\n\t *\r\n\t *      instance.addEventListener(\"eventName\", handlerMethod);\r\n\t *      function handlerMethod(event) {\r\n\t *          console.log(event.target + \" Was Clicked\");\r\n\t *      }\r\n\t *\r\n\t * <b>Maintaining proper scope</b><br />\r\n\t * Scope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\r\n\t * method to subscribe to events simplifies this.\r\n\t *\r\n\t *      instance.addEventListener(\"click\", function(event) {\r\n\t *          console.log(instance == this); // false, scope is ambiguous.\r\n\t *      });\r\n\t *      \r\n\t *      instance.on(\"click\", function(event) {\r\n\t *          console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\r\n\t *      });\r\n\t * \r\n\t * If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\r\n\t * scope.\r\n\t *\r\n\t * <b>Browser support</b>\r\n\t * The event model in CreateJS can be used separately from the suite in any project, however the inheritance model\r\n\t * requires modern browsers (IE9+).\r\n\t *      \r\n\t *\r\n\t * @class EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction EventDispatcher() {\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _listeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._listeners = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _captureListeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._captureListeners = null;\r\n\t}\r\n\tvar p = EventDispatcher.prototype;\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Static initializer to mix EventDispatcher methods into a target object or prototype.\r\n\t * \r\n\t * \t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\r\n\t * \t\tEventDispatcher.initialize(myObject); // add to a specific instance\r\n\t * \r\n\t * @method initialize\r\n\t * @static\r\n\t * @param {Object} target The target object to inject EventDispatcher methods into. This can be an instance or a\r\n\t * prototype.\r\n\t **/\r\n\tEventDispatcher.initialize = function(target) {\r\n\t\ttarget.addEventListener = p.addEventListener;\r\n\t\ttarget.on = p.on;\r\n\t\ttarget.removeEventListener = target.off =  p.removeEventListener;\r\n\t\ttarget.removeAllEventListeners = p.removeAllEventListeners;\r\n\t\ttarget.hasEventListener = p.hasEventListener;\r\n\t\ttarget.dispatchEvent = p.dispatchEvent;\r\n\t\ttarget._dispatchEvent = p._dispatchEvent;\r\n\t\ttarget.willTrigger = p.willTrigger;\r\n\t};\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds the specified event listener. Note that adding multiple listeners to the same function will result in\r\n\t * multiple callbacks getting fired.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.addEventListener(\"click\", handleClick);\r\n\t *      function handleClick(event) {\r\n\t *         // Click happened.\r\n\t *      }\r\n\t *\r\n\t * @method addEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function | Object} Returns the listener for chaining or assignment.\r\n\t **/\r\n\tp.addEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners;\r\n\t\tif (useCapture) {\r\n\t\t\tlisteners = this._captureListeners = this._captureListeners||{};\r\n\t\t} else {\r\n\t\t\tlisteners = this._listeners = this._listeners||{};\r\n\t\t}\r\n\t\tvar arr = listeners[type];\r\n\t\tif (arr) { this.removeEventListener(type, listener, useCapture); }\r\n\t\tarr = listeners[type]; // remove may have deleted the array\r\n\t\tif (!arr) { listeners[type] = [listener];  }\r\n\t\telse { arr.push(listener); }\r\n\t\treturn listener;\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\r\n\t * only run once, associate arbitrary data with the listener, and remove the listener.\r\n\t * \r\n\t * This method works by creating an anonymous wrapper function and subscribing it with addEventListener.\r\n\t * The wrapper function is returned for use with `removeEventListener` (or `off`).\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\r\n\t * {{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\r\n\t * to `on` with the same params will create multiple listeners.\r\n\t * \r\n\t * <h4>Example</h4>\r\n\t * \r\n\t * \t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\r\n\t * \t\tfunction handleClick(evt, data) {\r\n\t * \t\t\tdata.count -= 1;\r\n\t * \t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\r\n\t * \t\t\tif (data.count == 0) {\r\n\t * \t\t\t\talert(\"clicked 3 times!\");\r\n\t * \t\t\t\tmyBtn.off(\"click\", listener);\r\n\t * \t\t\t\t// alternately: evt.remove();\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t * \r\n\t * @method on\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Object} [scope] The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).\r\n\t * @param {Boolean} [once=false] If true, the listener will remove itself after the first time it is triggered.\r\n\t * @param {*} [data] Arbitrary data that will be included as the second parameter when the listener is called.\r\n\t * @param {Boolean} [useCapture=false] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function} Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.\r\n\t **/\r\n\tp.on = function(type, listener, scope, once, data, useCapture) {\r\n\t\tif (listener.handleEvent) {\r\n\t\t\tscope = scope||listener;\r\n\t\t\tlistener = listener.handleEvent;\r\n\t\t}\r\n\t\tscope = scope||this;\r\n\t\treturn this.addEventListener(type, function(evt) {\r\n\t\t\t\tlistener.call(scope, evt, data);\r\n\t\t\t\tonce&&evt.remove();\r\n\t\t\t}, useCapture);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified event listener.\r\n\t *\r\n\t * <b>Important Note:</b> that you must pass the exact function reference used when the event was added. If a proxy\r\n\t * function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\r\n\t * closure will not work.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.removeEventListener(\"click\", handleClick);\r\n\t *\r\n\t * @method removeEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.removeEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners = useCapture ? this._captureListeners : this._listeners;\r\n\t\tif (!listeners) { return; }\r\n\t\tvar arr = listeners[type];\r\n\t\tif (!arr) { return; }\r\n\t\tfor (var i=0,l=arr.length; i<l; i++) {\r\n\t\t\tif (arr[i] == listener) {\r\n\t\t\t\tif (l==1) { delete(listeners[type]); } // allows for faster checks.\r\n\t\t\t\telse { arr.splice(i,1); }\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the\r\n\t * .on method.\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \r\n\t * {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.\r\n\t *\r\n\t * @method off\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.off = p.removeEventListener;\r\n\r\n\t/**\r\n\t * Removes all listeners for the specified type, or all listeners of all types.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Remove all listeners\r\n\t *      displayObject.removeAllEventListeners();\r\n\t *\r\n\t *      // Remove all click listeners\r\n\t *      displayObject.removeAllEventListeners(\"click\");\r\n\t *\r\n\t * @method removeAllEventListeners\r\n\t * @param {String} [type] The string type of the event. If omitted, all listeners for all types will be removed.\r\n\t **/\r\n\tp.removeAllEventListeners = function(type) {\r\n\t\tif (!type) { this._listeners = this._captureListeners = null; }\r\n\t\telse {\r\n\t\t\tif (this._listeners) { delete(this._listeners[type]); }\r\n\t\t\tif (this._captureListeners) { delete(this._captureListeners[type]); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the specified event to all listeners.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Use a string event\r\n\t *      this.dispatchEvent(\"complete\");\r\n\t *\r\n\t *      // Use an Event instance\r\n\t *      var event = new createjs.Event(\"progress\");\r\n\t *      this.dispatchEvent(event);\r\n\t *\r\n\t * @method dispatchEvent\r\n\t * @param {Object | String | Event} eventObj An object with a \"type\" property, or a string type.\r\n\t * While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\r\n\t * dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\r\n\t * be used to avoid event object instantiation for non-bubbling events that may not have any listeners.\r\n\t * @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.\r\n\t * @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.\r\n\t * @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.\r\n\t **/\r\n\tp.dispatchEvent = function(eventObj, bubbles, cancelable) {\r\n\t\tif (typeof eventObj == \"string\") {\r\n\t\t\t// skip everything if there's no listeners and it doesn't bubble:\r\n\t\t\tvar listeners = this._listeners;\r\n\t\t\tif (!bubbles && (!listeners || !listeners[eventObj])) { return true; }\r\n\t\t\teventObj = new createjs.Event(eventObj, bubbles, cancelable);\r\n\t\t} else if (eventObj.target && eventObj.clone) {\r\n\t\t\t// redispatching an active event object, so clone it:\r\n\t\t\teventObj = eventObj.clone();\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent\r\n\t\ttry { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events\r\n\r\n\t\tif (!eventObj.bubbles || !this.parent) {\r\n\t\t\tthis._dispatchEvent(eventObj, 2);\r\n\t\t} else {\r\n\t\t\tvar top=this, list=[top];\r\n\t\t\twhile (top.parent) { list.push(top = top.parent); }\r\n\t\t\tvar i, l=list.length;\r\n\r\n\t\t\t// capture & atTarget\r\n\t\t\tfor (i=l-1; i>=0 && !eventObj.propagationStopped; i--) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 1+(i==0));\r\n\t\t\t}\r\n\t\t\t// bubbling\r\n\t\t\tfor (i=1; i<l && !eventObj.propagationStopped; i++) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 3);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !eventObj.defaultPrevented;\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type.\r\n\t * @method hasEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns true if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.hasEventListener = function(type) {\r\n\t\tvar listeners = this._listeners, captureListeners = this._captureListeners;\r\n\t\treturn !!((listeners && listeners[type]) || (captureListeners && captureListeners[type]));\r\n\t};\r\n\t\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type on this object or any of its\r\n\t * ancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the\r\n\t * specified type is dispatched from this object, it will trigger at least one listener.\r\n\t * \r\n\t * This is similar to {{#crossLink \"EventDispatcher/hasEventListener\"}}{{/crossLink}}, but it searches the entire\r\n\t * event flow for a listener, not just this object.\r\n\t * @method willTrigger\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns `true` if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.willTrigger = function(type) {\r\n\t\tvar o = this;\r\n\t\twhile (o) {\r\n\t\t\tif (o.hasEventListener(type)) { return true; }\r\n\t\t\to = o.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[EventDispatcher]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _dispatchEvent\r\n\t * @param {Object | Event} eventObj\r\n\t * @param {Object} eventPhase\r\n\t * @protected\r\n\t **/\r\n\tp._dispatchEvent = function(eventObj, eventPhase) {\r\n\t\tvar l, arr, listeners = (eventPhase <= 2) ? this._captureListeners : this._listeners;\r\n\t\tif (eventObj && listeners && (arr = listeners[eventObj.type]) && (l=arr.length)) {\r\n\t\t\ttry { eventObj.currentTarget = this; } catch (e) {}\r\n\t\t\ttry { eventObj.eventPhase = eventPhase|0; } catch (e) {}\r\n\t\t\teventObj.removed = false;\r\n\t\t\t\r\n\t\t\tarr = arr.slice(); // to avoid issues with items being removed or added during the dispatch\r\n\t\t\tfor (var i=0; i<l && !eventObj.immediatePropagationStopped; i++) {\r\n\t\t\t\tvar o = arr[i];\r\n\t\t\t\tif (o.handleEvent) { o.handleEvent(eventObj); }\r\n\t\t\t\telse { o(eventObj); }\r\n\t\t\t\tif (eventObj.removed) {\r\n\t\t\t\t\tthis.off(eventObj.type, o, eventPhase==1);\r\n\t\t\t\t\teventObj.removed = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (eventPhase === 2) { this._dispatchEvent(eventObj, 2.1); }\r\n\t};\r\n\r\n\r\n\tcreatejs.EventDispatcher = EventDispatcher;\r\n}());\n\n//##############################################################################\n// ProgressEvent.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function (scope) {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A CreateJS {{#crossLink \"Event\"}}{{/crossLink}} that is dispatched when progress changes.\n\t * @class ProgressEvent\n\t * @param {Number} loaded The amount that has been loaded. This can be any number relative to the total.\n\t * @param {Number} [total=1] The total amount that will load. This will default to 1, so if the `loaded` value is\n\t * a percentage (between 0 and 1), it can be omitted.\n\t * @todo Consider having this event be a \"fileprogress\" event as well\n\t * @constructor\n\t */\n\tfunction ProgressEvent(loaded, total) {\n\t\tthis.Event_constructor(\"progress\");\n\n\t\t/**\n\t\t * The amount that has been loaded (out of a total amount)\n\t\t * @property loaded\n\t\t * @type {Number}\n\t\t */\n\t\tthis.loaded = loaded;\n\n\t\t/**\n\t\t * The total \"size\" of the load.\n\t\t * @property total\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t */\n\t\tthis.total = (total == null) ? 1 : total;\n\n\t\t/**\n\t\t * The percentage (out of 1) that the load has been completed. This is calculated using `loaded/total`.\n\t\t * @property progress\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis.progress = (total == 0) ? 0 : this.loaded / this.total;\n\t};\n\n\tvar p = createjs.extend(ProgressEvent, createjs.Event);\n\n\t/**\n\t * Returns a clone of the ProgressEvent instance.\n\t * @method clone\n\t * @return {ProgressEvent} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new createjs.ProgressEvent(this.loaded, this.total);\n\t};\n\n\tcreatejs.ProgressEvent = createjs.promote(ProgressEvent, \"Event\");\n\n}(window));\n\n//##############################################################################\n// json3.js\n//##############################################################################\n\n/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */\n;(function () {\n  // Detect the `define` function exposed by asynchronous module loaders. The\n  // strict `define` check is necessary for compatibility with `r.js`.\n  var isLoader =  true && __webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\");\n\n  // A set of types used to distinguish objects from primitives.\n  var objectTypes = {\n    \"function\": true,\n    \"object\": true\n  };\n\n  // Detect the `exports` object exposed by CommonJS implementations.\n  var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n  // Use the `global` object exposed by Node (including Browserify via\n  // `insert-module-globals`), Narwhal, and Ringo as the default context,\n  // and the `window` object in browsers. Rhino exports a `global` function\n  // instead.\n  var root = objectTypes[typeof window] && window || this,\n      freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\n\n  if (freeGlobal && (freeGlobal[\"global\"] === freeGlobal || freeGlobal[\"window\"] === freeGlobal || freeGlobal[\"self\"] === freeGlobal)) {\n    root = freeGlobal;\n  }\n\n  // Public: Initializes JSON 3 using the given `context` object, attaching the\n  // `stringify` and `parse` functions to the specified `exports` object.\n  function runInContext(context, exports) {\n    context || (context = root[\"Object\"]());\n    exports || (exports = root[\"Object\"]());\n\n    // Native constructor aliases.\n    var Number = context[\"Number\"] || root[\"Number\"],\n        String = context[\"String\"] || root[\"String\"],\n        Object = context[\"Object\"] || root[\"Object\"],\n        Date = context[\"Date\"] || root[\"Date\"],\n        SyntaxError = context[\"SyntaxError\"] || root[\"SyntaxError\"],\n        TypeError = context[\"TypeError\"] || root[\"TypeError\"],\n        Math = context[\"Math\"] || root[\"Math\"],\n        nativeJSON = context[\"JSON\"] || root[\"JSON\"];\n\n    // Delegate to the native `stringify` and `parse` implementations.\n    if (typeof nativeJSON == \"object\" && nativeJSON) {\n      exports.stringify = nativeJSON.stringify;\n      exports.parse = nativeJSON.parse;\n    }\n\n    // Convenience aliases.\n    var objectProto = Object.prototype,\n        getClass = objectProto.toString,\n        isProperty, forEach, undef;\n\n    // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\n    var isExtended = new Date(-3509827334573292);\n    try {\n      // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\n      // results for certain dates in Opera >= 10.53.\n      isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&\n        // Safari < 2.0.2 stores the internal millisecond time value correctly,\n        // but clips the values returned by the date methods to the range of\n        // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]).\n        isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\n    } catch (exception) {}\n\n    // Internal: Determines whether the native `JSON.stringify` and `parse`\n    // implementations are spec-compliant. Based on work by Ken Snyder.\n    function has(name) {\n      if (has[name] !== undef) {\n        // Return cached feature test result.\n        return has[name];\n      }\n      var isSupported;\n      if (name == \"bug-string-char-index\") {\n        // IE <= 7 doesn't support accessing string characters using square\n        // bracket notation. IE 8 only supports this for primitives.\n        isSupported = \"a\"[0] != \"a\";\n      } else if (name == \"json\") {\n        // Indicates whether both `JSON.stringify` and `JSON.parse` are\n        // supported.\n        isSupported = has(\"json-stringify\") && has(\"json-parse\");\n      } else {\n        var value, serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';\n        // Test `JSON.stringify`.\n        if (name == \"json-stringify\") {\n          var stringify = exports.stringify, stringifySupported = typeof stringify == \"function\" && isExtended;\n          if (stringifySupported) {\n            // A test function object with a custom `toJSON` method.\n            (value = function () {\n              return 1;\n            }).toJSON = value;\n            try {\n              stringifySupported =\n                // Firefox 3.1b1 and b2 serialize string, number, and boolean\n                // primitives as object literals.\n                stringify(0) === \"0\" &&\n                // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n                // literals.\n                stringify(new Number()) === \"0\" &&\n                stringify(new String()) == '\"\"' &&\n                // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n                // does not define a canonical JSON representation (this applies to\n                // objects with `toJSON` properties as well, *unless* they are nested\n                // within an object or array).\n                stringify(getClass) === undef &&\n                // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n                // FF 3.1b3 pass this test.\n                stringify(undef) === undef &&\n                // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n                // respectively, if the value is omitted entirely.\n                stringify() === undef &&\n                // FF 3.1b1, 2 throw an error if the given value is not a number,\n                // string, array, object, Boolean, or `null` literal. This applies to\n                // objects with custom `toJSON` methods as well, unless they are nested\n                // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n                // methods entirely.\n                stringify(value) === \"1\" &&\n                stringify([value]) == \"[1]\" &&\n                // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n                // `\"[null]\"`.\n                stringify([undef]) == \"[null]\" &&\n                // YUI 3.0.0b1 fails to serialize `null` literals.\n                stringify(null) == \"null\" &&\n                // FF 3.1b1, 2 halts serialization if an array contains a function:\n                // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n                // elides non-JSON values from objects and arrays, unless they\n                // define custom `toJSON` methods.\n                stringify([undef, getClass, null]) == \"[null,null,null]\" &&\n                // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n                // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\n                stringify({ \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"] }) == serialized &&\n                // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n                stringify(null, value) === \"1\" &&\n                stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\" &&\n                // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n                // serialize extended years.\n                stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' &&\n                // The milliseconds are optional in ES 5, but required in 5.1.\n                stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' &&\n                // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n                // four-digit years instead of six-digit years. Credits: @Yaffle.\n                stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' &&\n                // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n                // values less than 1000. Credits: @Yaffle.\n                stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\n            } catch (exception) {\n              stringifySupported = false;\n            }\n          }\n          isSupported = stringifySupported;\n        }\n        // Test `JSON.parse`.\n        if (name == \"json-parse\") {\n          var parse = exports.parse;\n          if (typeof parse == \"function\") {\n            try {\n              // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n              // Conforming implementations should also coerce the initial argument to\n              // a string prior to parsing.\n              if (parse(\"0\") === 0 && !parse(false)) {\n                // Simple parsing test.\n                value = parse(serialized);\n                var parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\n                if (parseSupported) {\n                  try {\n                    // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\n                    parseSupported = !parse('\"\\t\"');\n                  } catch (exception) {}\n                  if (parseSupported) {\n                    try {\n                      // FF 4.0 and 4.0.1 allow leading `+` signs and leading\n                      // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n                      // certain octal literals.\n                      parseSupported = parse(\"01\") !== 1;\n                    } catch (exception) {}\n                  }\n                  if (parseSupported) {\n                    try {\n                      // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n                      // points. These environments, along with FF 3.1b1 and 2,\n                      // also allow trailing commas in JSON objects and arrays.\n                      parseSupported = parse(\"1.\") !== 1;\n                    } catch (exception) {}\n                  }\n                }\n              }\n            } catch (exception) {\n              parseSupported = false;\n            }\n          }\n          isSupported = parseSupported;\n        }\n      }\n      return has[name] = !!isSupported;\n    }\n\n    if (!has(\"json\")) {\n      // Common `[[Class]]` name aliases.\n      var functionClass = \"[object Function]\",\n          dateClass = \"[object Date]\",\n          numberClass = \"[object Number]\",\n          stringClass = \"[object String]\",\n          arrayClass = \"[object Array]\",\n          booleanClass = \"[object Boolean]\";\n\n      // Detect incomplete support for accessing string characters by index.\n      var charIndexBuggy = has(\"bug-string-char-index\");\n\n      // Define additional utility methods if the `Date` methods are buggy.\n      if (!isExtended) {\n        var floor = Math.floor;\n        // A mapping between the months of the year and the number of days between\n        // January 1st and the first of the respective month.\n        var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n        // Internal: Calculates the number of days between the Unix epoch and the\n        // first day of the given month.\n        var getDay = function (year, month) {\n          return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\n        };\n      }\n\n      // Internal: Determines if a property is a direct property of the given\n      // object. Delegates to the native `Object#hasOwnProperty` method.\n      if (!(isProperty = objectProto.hasOwnProperty)) {\n        isProperty = function (property) {\n          var members = {}, constructor;\n          if ((members.__proto__ = null, members.__proto__ = {\n            // The *proto* property cannot be set multiple times in recent\n            // versions of Firefox and SeaMonkey.\n            \"toString\": 1\n          }, members).toString != getClass) {\n            // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but\n            // supports the mutable *proto* property.\n            isProperty = function (property) {\n              // Capture and break the object's prototype chain (see section 8.6.2\n              // of the ES 5.1 spec). The parenthesized expression prevents an\n              // unsafe transformation by the Closure Compiler.\n              var original = this.__proto__, result = property in (this.__proto__ = null, this);\n              // Restore the original prototype chain.\n              this.__proto__ = original;\n              return result;\n            };\n          } else {\n            // Capture a reference to the top-level `Object` constructor.\n            constructor = members.constructor;\n            // Use the `constructor` property to simulate `Object#hasOwnProperty` in\n            // other environments.\n            isProperty = function (property) {\n              var parent = (this.constructor || constructor).prototype;\n              return property in this && !(property in parent && this[property] === parent[property]);\n            };\n          }\n          members = null;\n          return isProperty.call(this, property);\n        };\n      }\n\n      // Internal: Normalizes the `for...in` iteration algorithm across\n      // environments. Each enumerated key is yielded to a `callback` function.\n      forEach = function (object, callback) {\n        var size = 0, Properties, members, property;\n\n        // Tests for bugs in the current environment's `for...in` algorithm. The\n        // `valueOf` property inherits the non-enumerable flag from\n        // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\n        (Properties = function () {\n          this.valueOf = 0;\n        }).prototype.valueOf = 0;\n\n        // Iterate over a new instance of the `Properties` class.\n        members = new Properties();\n        for (property in members) {\n          // Ignore all properties inherited from `Object.prototype`.\n          if (isProperty.call(members, property)) {\n            size++;\n          }\n        }\n        Properties = members = null;\n\n        // Normalize the iteration algorithm.\n        if (!size) {\n          // A list of non-enumerable properties inherited from `Object.prototype`.\n          members = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"];\n          // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\n          // properties.\n          forEach = function (object, callback) {\n            var isFunction = getClass.call(object) == functionClass, property, length;\n            var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\n            for (property in object) {\n              // Gecko <= 1.0 enumerates the `prototype` property of functions under\n              // certain conditions; IE does not.\n              if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\n                callback(property);\n              }\n            }\n            // Manually invoke the callback for each non-enumerable property.\n            for (length = members.length; property = members[--length]; hasProperty.call(object, property) && callback(property));\n          };\n        } else if (size == 2) {\n          // Safari <= 2.0.4 enumerates shadowed properties twice.\n          forEach = function (object, callback) {\n            // Create a set of iterated properties.\n            var members = {}, isFunction = getClass.call(object) == functionClass, property;\n            for (property in object) {\n              // Store each property name to prevent double enumeration. The\n              // `prototype` property of functions is not enumerated due to cross-\n              // environment inconsistencies.\n              if (!(isFunction && property == \"prototype\") && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property)) {\n                callback(property);\n              }\n            }\n          };\n        } else {\n          // No bugs detected; use the standard `for...in` algorithm.\n          forEach = function (object, callback) {\n            var isFunction = getClass.call(object) == functionClass, property, isConstructor;\n            for (property in object) {\n              if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\n                callback(property);\n              }\n            }\n            // Manually invoke the callback for the `constructor` property due to\n            // cross-environment inconsistencies.\n            if (isConstructor || isProperty.call(object, (property = \"constructor\"))) {\n              callback(property);\n            }\n          };\n        }\n        return forEach(object, callback);\n      };\n\n      // Public: Serializes a JavaScript `value` as a JSON string. The optional\n      // `filter` argument may specify either a function that alters how object and\n      // array members are serialized, or an array of strings and numbers that\n      // indicates which properties should be serialized. The optional `width`\n      // argument may be either a string or number that specifies the indentation\n      // level of the output.\n      if (!has(\"json-stringify\")) {\n        // Internal: A map of control characters and their escaped equivalents.\n        var Escapes = {\n          92: \"\\\\\\\\\",\n          34: '\\\\\"',\n          8: \"\\\\b\",\n          12: \"\\\\f\",\n          10: \"\\\\n\",\n          13: \"\\\\r\",\n          9: \"\\\\t\"\n        };\n\n        // Internal: Converts `value` into a zero-padded string such that its\n        // length is at least equal to `width`. The `width` must be <= 6.\n        var leadingZeroes = \"000000\";\n        var toPaddedString = function (width, value) {\n          // The `|| 0` expression is necessary to work around a bug in\n          // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\n          return (leadingZeroes + (value || 0)).slice(-width);\n        };\n\n        // Internal: Double-quotes a string `value`, replacing all ASCII control\n        // characters (characters with code unit values between 0 and 31) with\n        // their escaped equivalents. This is an implementation of the\n        // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\n        var unicodePrefix = \"\\\\u00\";\n        var quote = function (value) {\n          var result = '\"', index = 0, length = value.length, useCharIndex = !charIndexBuggy || length > 10;\n          var symbols = useCharIndex && (charIndexBuggy ? value.split(\"\") : value);\n          for (; index < length; index++) {\n            var charCode = value.charCodeAt(index);\n            // If the character is a control character, append its Unicode or\n            // shorthand escape sequence; otherwise, append the character as-is.\n            switch (charCode) {\n              case 8: case 9: case 10: case 12: case 13: case 34: case 92:\n                result += Escapes[charCode];\n                break;\n              default:\n                if (charCode < 32) {\n                  result += unicodePrefix + toPaddedString(2, charCode.toString(16));\n                  break;\n                }\n                result += useCharIndex ? symbols[index] : value.charAt(index);\n            }\n          }\n          return result + '\"';\n        };\n\n        // Internal: Recursively serializes an object. Implements the\n        // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\n        var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\n          var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result;\n          try {\n            // Necessary for host object support.\n            value = object[property];\n          } catch (exception) {}\n          if (typeof value == \"object\" && value) {\n            className = getClass.call(value);\n            if (className == dateClass && !isProperty.call(value, \"toJSON\")) {\n              if (value > -1 / 0 && value < 1 / 0) {\n                // Dates are serialized according to the `Date#toJSON` method\n                // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\n                // for the ISO 8601 date time string format.\n                if (getDay) {\n                  // Manually compute the year, month, date, hours, minutes,\n                  // seconds, and milliseconds if the `getUTC*` methods are\n                  // buggy. Adapted from @Yaffle's `date-shim` project.\n                  date = floor(value / 864e5);\n                  for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\n                  for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\n                  date = 1 + date - getDay(year, month);\n                  // The `time` value specifies the time within the day (see ES\n                  // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\n                  // to compute `A modulo B`, as the `%` operator does not\n                  // correspond to the `modulo` operation for negative numbers.\n                  time = (value % 864e5 + 864e5) % 864e5;\n                  // The hours, minutes, seconds, and milliseconds are obtained by\n                  // decomposing the time within the day. See section 15.9.1.10.\n                  hours = floor(time / 36e5) % 24;\n                  minutes = floor(time / 6e4) % 60;\n                  seconds = floor(time / 1e3) % 60;\n                  milliseconds = time % 1e3;\n                } else {\n                  year = value.getUTCFullYear();\n                  month = value.getUTCMonth();\n                  date = value.getUTCDate();\n                  hours = value.getUTCHours();\n                  minutes = value.getUTCMinutes();\n                  seconds = value.getUTCSeconds();\n                  milliseconds = value.getUTCMilliseconds();\n                }\n                // Serialize extended years correctly.\n                value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +\n                  \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) +\n                  // Months, dates, hours, minutes, and seconds should have two\n                  // digits; milliseconds should have three.\n                  \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) +\n                  // Milliseconds are optional in ES 5.0, but required in 5.1.\n                  \".\" + toPaddedString(3, milliseconds) + \"Z\";\n              } else {\n                value = null;\n              }\n            } else if (typeof value.toJSON == \"function\" && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, \"toJSON\"))) {\n              // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the\n              // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3\n              // ignores all `toJSON` methods on these objects unless they are\n              // defined directly on an instance.\n              value = value.toJSON(property);\n            }\n          }\n          if (callback) {\n            // If a replacement function was provided, call it to obtain the value\n            // for serialization.\n            value = callback.call(object, property, value);\n          }\n          if (value === null) {\n            return \"null\";\n          }\n          className = getClass.call(value);\n          if (className == booleanClass) {\n            // Booleans are represented literally.\n            return \"\" + value;\n          } else if (className == numberClass) {\n            // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\n            // `\"null\"`.\n            return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\n          } else if (className == stringClass) {\n            // Strings are double-quoted and escaped.\n            return quote(\"\" + value);\n          }\n          // Recursively serialize objects and arrays.\n          if (typeof value == \"object\") {\n            // Check for cyclic structures. This is a linear search; performance\n            // is inversely proportional to the number of unique nested objects.\n            for (length = stack.length; length--;) {\n              if (stack[length] === value) {\n                // Cyclic structures cannot be serialized by `JSON.stringify`.\n                throw TypeError();\n              }\n            }\n            // Add the object to the stack of traversed objects.\n            stack.push(value);\n            results = [];\n            // Save the current indentation level and indent one additional level.\n            prefix = indentation;\n            indentation += whitespace;\n            if (className == arrayClass) {\n              // Recursively serialize array elements.\n              for (index = 0, length = value.length; index < length; index++) {\n                element = serialize(index, value, callback, properties, whitespace, indentation, stack);\n                results.push(element === undef ? \"null\" : element);\n              }\n              result = results.length ? (whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : (\"[\" + results.join(\",\") + \"]\")) : \"[]\";\n            } else {\n              // Recursively serialize object members. Members are selected from\n              // either a user-specified list of property names, or the object\n              // itself.\n              forEach(properties || value, function (property) {\n                var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\n                if (element !== undef) {\n                  // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\n                  // is not the empty string, let `member` {quote(property) + \":\"}\n                  // be the concatenation of `member` and the `space` character.\"\n                  // The \"`space` character\" refers to the literal space\n                  // character, not the `space` {width} argument provided to\n                  // `JSON.stringify`.\n                  results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\n                }\n              });\n              result = results.length ? (whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : (\"{\" + results.join(\",\") + \"}\")) : \"{}\";\n            }\n            // Remove the object from the traversed object stack.\n            stack.pop();\n            return result;\n          }\n        };\n\n        // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n        exports.stringify = function (source, filter, width) {\n          var whitespace, callback, properties, className;\n          if (objectTypes[typeof filter] && filter) {\n            if ((className = getClass.call(filter)) == functionClass) {\n              callback = filter;\n            } else if (className == arrayClass) {\n              // Convert the property names array into a makeshift set.\n              properties = {};\n              for (var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1));\n            }\n          }\n          if (width) {\n            if ((className = getClass.call(width)) == numberClass) {\n              // Convert the `width` to an integer and create a string containing\n              // `width` number of space characters.\n              if ((width -= width % 1) > 0) {\n                for (whitespace = \"\", width > 10 && (width = 10); whitespace.length < width; whitespace += \" \");\n              }\n            } else if (className == stringClass) {\n              whitespace = width.length <= 10 ? width : width.slice(0, 10);\n            }\n          }\n          // Opera <= 7.54u2 discards the values associated with empty string keys\n          // (`\"\"`) only if they are used directly within an object member list\n          // (e.g., `!(\"\" in { \"\": 1})`).\n          return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\n        };\n      }\n\n      // Public: Parses a JSON source string.\n      if (!has(\"json-parse\")) {\n        var fromCharCode = String.fromCharCode;\n\n        // Internal: A map of escaped control characters and their unescaped\n        // equivalents.\n        var Unescapes = {\n          92: \"\\\\\",\n          34: '\"',\n          47: \"/\",\n          98: \"\\b\",\n          116: \"\\t\",\n          110: \"\\n\",\n          102: \"\\f\",\n          114: \"\\r\"\n        };\n\n        // Internal: Stores the parser state.\n        var Index, Source;\n\n        // Internal: Resets the parser state and throws a `SyntaxError`.\n        var abort = function () {\n          Index = Source = null;\n          throw SyntaxError();\n        };\n\n        // Internal: Returns the next token, or `\"$\"` if the parser has reached\n        // the end of the source string. A token may be a string, number, `null`\n        // literal, or Boolean literal.\n        var lex = function () {\n          var source = Source, length = source.length, value, begin, position, isSigned, charCode;\n          while (Index < length) {\n            charCode = source.charCodeAt(Index);\n            switch (charCode) {\n              case 9: case 10: case 13: case 32:\n                // Skip whitespace tokens, including tabs, carriage returns, line\n                // feeds, and space characters.\n                Index++;\n                break;\n              case 123: case 125: case 91: case 93: case 58: case 44:\n                // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\n                // the current position.\n                value = charIndexBuggy ? source.charAt(Index) : source[Index];\n                Index++;\n                return value;\n              case 34:\n                // `\"` delimits a JSON string; advance to the next character and\n                // begin parsing the string. String tokens are prefixed with the\n                // sentinel `@` character to distinguish them from punctuators and\n                // end-of-string tokens.\n                for (value = \"@\", Index++; Index < length;) {\n                  charCode = source.charCodeAt(Index);\n                  if (charCode < 32) {\n                    // Unescaped ASCII control characters (those with a code unit\n                    // less than the space character) are not permitted.\n                    abort();\n                  } else if (charCode == 92) {\n                    // A reverse solidus (`\\`) marks the beginning of an escaped\n                    // control character (including `\"`, `\\`, and `/`) or Unicode\n                    // escape sequence.\n                    charCode = source.charCodeAt(++Index);\n                    switch (charCode) {\n                      case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:\n                        // Revive escaped control characters.\n                        value += Unescapes[charCode];\n                        Index++;\n                        break;\n                      case 117:\n                        // `\\u` marks the beginning of a Unicode escape sequence.\n                        // Advance to the first character and validate the\n                        // four-digit code point.\n                        begin = ++Index;\n                        for (position = Index + 4; Index < position; Index++) {\n                          charCode = source.charCodeAt(Index);\n                          // A valid sequence comprises four hexdigits (case-\n                          // insensitive) that form a single hexadecimal value.\n                          if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\n                            // Invalid Unicode escape sequence.\n                            abort();\n                          }\n                        }\n                        // Revive the escaped character.\n                        value += fromCharCode(\"0x\" + source.slice(begin, Index));\n                        break;\n                      default:\n                        // Invalid escape sequence.\n                        abort();\n                    }\n                  } else {\n                    if (charCode == 34) {\n                      // An unescaped double-quote character marks the end of the\n                      // string.\n                      break;\n                    }\n                    charCode = source.charCodeAt(Index);\n                    begin = Index;\n                    // Optimize for the common case where a string is valid.\n                    while (charCode >= 32 && charCode != 92 && charCode != 34) {\n                      charCode = source.charCodeAt(++Index);\n                    }\n                    // Append the string as-is.\n                    value += source.slice(begin, Index);\n                  }\n                }\n                if (source.charCodeAt(Index) == 34) {\n                  // Advance to the next character and return the revived string.\n                  Index++;\n                  return value;\n                }\n                // Unterminated string.\n                abort();\n              default:\n                // Parse numbers and literals.\n                begin = Index;\n                // Advance past the negative sign, if one is specified.\n                if (charCode == 45) {\n                  isSigned = true;\n                  charCode = source.charCodeAt(++Index);\n                }\n                // Parse an integer or floating-point value.\n                if (charCode >= 48 && charCode <= 57) {\n                  // Leading zeroes are interpreted as octal literals.\n                  if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {\n                    // Illegal octal literal.\n                    abort();\n                  }\n                  isSigned = false;\n                  // Parse the integer component.\n                  for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);\n                  // Floats cannot contain a leading decimal point; however, this\n                  // case is already accounted for by the parser.\n                  if (source.charCodeAt(Index) == 46) {\n                    position = ++Index;\n                    // Parse the decimal component.\n                    for (; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n                    if (position == Index) {\n                      // Illegal trailing decimal.\n                      abort();\n                    }\n                    Index = position;\n                  }\n                  // Parse exponents. The `e` denoting the exponent is\n                  // case-insensitive.\n                  charCode = source.charCodeAt(Index);\n                  if (charCode == 101 || charCode == 69) {\n                    charCode = source.charCodeAt(++Index);\n                    // Skip past the sign following the exponent, if one is\n                    // specified.\n                    if (charCode == 43 || charCode == 45) {\n                      Index++;\n                    }\n                    // Parse the exponential component.\n                    for (position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n                    if (position == Index) {\n                      // Illegal empty exponent.\n                      abort();\n                    }\n                    Index = position;\n                  }\n                  // Coerce the parsed value to a JavaScript number.\n                  return +source.slice(begin, Index);\n                }\n                // A negative sign may only precede numbers.\n                if (isSigned) {\n                  abort();\n                }\n                // `true`, `false`, and `null` literals.\n                if (source.slice(Index, Index + 4) == \"true\") {\n                  Index += 4;\n                  return true;\n                } else if (source.slice(Index, Index + 5) == \"false\") {\n                  Index += 5;\n                  return false;\n                } else if (source.slice(Index, Index + 4) == \"null\") {\n                  Index += 4;\n                  return null;\n                }\n                // Unrecognized token.\n                abort();\n            }\n          }\n          // Return the sentinel `$` character if the parser has reached the end\n          // of the source string.\n          return \"$\";\n        };\n\n        // Internal: Parses a JSON `value` token.\n        var get = function (value) {\n          var results, hasMembers;\n          if (value == \"$\") {\n            // Unexpected end of input.\n            abort();\n          }\n          if (typeof value == \"string\") {\n            if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\n              // Remove the sentinel `@` character.\n              return value.slice(1);\n            }\n            // Parse object and array literals.\n            if (value == \"[\") {\n              // Parses a JSON array, returning a new JavaScript array.\n              results = [];\n              for (;; hasMembers || (hasMembers = true)) {\n                value = lex();\n                // A closing square bracket marks the end of the array literal.\n                if (value == \"]\") {\n                  break;\n                }\n                // If the array literal contains elements, the current token\n                // should be a comma separating the previous element from the\n                // next.\n                if (hasMembers) {\n                  if (value == \",\") {\n                    value = lex();\n                    if (value == \"]\") {\n                      // Unexpected trailing `,` in array literal.\n                      abort();\n                    }\n                  } else {\n                    // A `,` must separate each array element.\n                    abort();\n                  }\n                }\n                // Elisions and leading commas are not permitted.\n                if (value == \",\") {\n                  abort();\n                }\n                results.push(get(value));\n              }\n              return results;\n            } else if (value == \"{\") {\n              // Parses a JSON object, returning a new JavaScript object.\n              results = {};\n              for (;; hasMembers || (hasMembers = true)) {\n                value = lex();\n                // A closing curly brace marks the end of the object literal.\n                if (value == \"}\") {\n                  break;\n                }\n                // If the object literal contains members, the current token\n                // should be a comma separator.\n                if (hasMembers) {\n                  if (value == \",\") {\n                    value = lex();\n                    if (value == \"}\") {\n                      // Unexpected trailing `,` in object literal.\n                      abort();\n                    }\n                  } else {\n                    // A `,` must separate each object member.\n                    abort();\n                  }\n                }\n                // Leading commas are not permitted, object property names must be\n                // double-quoted strings, and a `:` must separate each property\n                // name and value.\n                if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\n                  abort();\n                }\n                results[value.slice(1)] = get(lex());\n              }\n              return results;\n            }\n            // Unexpected token encountered.\n            abort();\n          }\n          return value;\n        };\n\n        // Internal: Updates a traversed object member.\n        var update = function (source, property, callback) {\n          var element = walk(source, property, callback);\n          if (element === undef) {\n            delete source[property];\n          } else {\n            source[property] = element;\n          }\n        };\n\n        // Internal: Recursively traverses a parsed JSON object, invoking the\n        // `callback` function for each value. This is an implementation of the\n        // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\n        var walk = function (source, property, callback) {\n          var value = source[property], length;\n          if (typeof value == \"object\" && value) {\n            // `forEach` can't be used to traverse an array in Opera <= 8.54\n            // because its `Object#hasOwnProperty` implementation returns `false`\n            // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\n            if (getClass.call(value) == arrayClass) {\n              for (length = value.length; length--;) {\n                update(value, length, callback);\n              }\n            } else {\n              forEach(value, function (property) {\n                update(value, property, callback);\n              });\n            }\n          }\n          return callback.call(source, property, value);\n        };\n\n        // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\n        exports.parse = function (source, callback) {\n          var result, value;\n          Index = 0;\n          Source = \"\" + source;\n          result = get(lex());\n          // If a JSON string contains multiple tokens, it is invalid.\n          if (lex() != \"$\") {\n            abort();\n          }\n          // Reset the parser state.\n          Index = Source = null;\n          return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\n        };\n      }\n    }\n\n    exports[\"runInContext\"] = runInContext;\n    return exports;\n  }\n\n  if (freeExports && !isLoader) {\n    // Export for CommonJS environments.\n    runInContext(root, freeExports);\n  } else {\n    // Export for web browsers and JavaScript engines.\n    var nativeJSON = root.JSON,\n        previousJSON = root[\"JSON3\"],\n        isRestored = false;\n\n    var JSON3 = runInContext(root, (root[\"JSON3\"] = {\n      // Public: Restores the original value of the global `JSON` object and\n      // returns a reference to the `JSON3` object.\n      \"noConflict\": function () {\n        if (!isRestored) {\n          isRestored = true;\n          root.JSON = nativeJSON;\n          root[\"JSON3\"] = previousJSON;\n          nativeJSON = previousJSON = null;\n        }\n        return JSON3;\n      }\n    }));\n\n    root.JSON = {\n      \"parse\": JSON3.parse,\n      \"stringify\": JSON3.stringify\n    };\n  }\n\n  // Export for asynchronous module loaders.\n  if (isLoader) {\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n      return JSON3;\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  }\n}).call(this);\n\n//##############################################################################\n// Elements.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Convenience methods for creating various elements used by PrelaodJS.\n\t *\n\t * @class DomUtils\n\t */\n\tvar s = {};\n\n\ts.a = function() {\n\t\treturn s.el(\"a\");\n\t}\n\n\ts.svg = function() {\n\t\treturn s.el(\"svg\");\n\t}\n\n\ts.object = function() {\n\t\treturn s.el(\"object\");\n\t}\n\n\ts.image = function() {\n\t\treturn s.el(\"image\");\n\t}\n\n\ts.img = function() {\n\t\treturn s.el(\"img\");\n\t}\n\n\ts.style = function() {\n\t\treturn s.el(\"style\");\n\t}\n\n\ts.link = function() {\n\t\treturn s.el(\"link\");\n\t}\n\n\ts.script = function() {\n\t\treturn s.el(\"script\");\n\t}\n\n\ts.audio = function() {\n\t\treturn s.el(\"audio\");\n\t}\n\n\ts.video = function() {\n\t\treturn s.el(\"video\");\n\t}\n\n\ts.text = function(value) {\n\t\treturn document.createTextNode(value);\n\t}\n\n\ts.el = function(name) {\n\t\treturn document.createElement(name);\n\t}\n\n\tcreatejs.Elements = s;\n\n}());\n\n//##############################################################################\n// URLUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Utilities that assist with parsing load items, and determining file types, etc.\n\t * @class URLUtils\n\t */\n\tvar s = {};\n\n\t/**\n\t * The Regular Expression used to test file URLS for an absolute path.\n\t * @property ABSOLUTE_PATH\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.ABSOLUTE_PATT = /^(?:\\w+:)?\\/{2}/i;\n\n\t/**\n\t * The Regular Expression used to test file URLS for a relative path.\n\t * @property RELATIVE_PATH\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.RELATIVE_PATT = (/^[./]*?\\//i);\n\n\t/**\n\t * The Regular Expression used to test file URLS for an extension. Note that URIs must already have the query string\n\t * removed.\n\t * @property EXTENSION_PATT\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.EXTENSION_PATT = /\\/?[^/]+\\.(\\w{1,5})$/i;\n\n\t/**\n\t * Parse a file path to determine the information we need to work with it. Currently, PreloadJS needs to know:\n\t * <ul>\n\t *     <li>If the path is absolute. Absolute paths start with a protocol (such as `http://`, `file://`, or\n\t *     `//networkPath`)</li>\n\t *     <li>If the path is relative. Relative paths start with `../` or `/path` (or similar)</li>\n\t *     <li>The file extension. This is determined by the filename with an extension. Query strings are dropped, and\n\t *     the file path is expected to follow the format `name.ext`.</li>\n\t * </ul>\n\t *\n\t * @method parseURI\n\t * @param {String} path\n\t * @returns {Object} An Object with an `absolute` and `relative` Boolean values,\n\t * \tthe pieces of the path (protocol, hostname, port, pathname, search, hash, host)\n\t * \tas well as an optional 'extension` property, which is the lowercase extension.\n\t *\n\t * @static\n\t */\n\ts.parseURI = function (path) {\n\t\tvar info = {\n\t\t\tabsolute: false,\n\t\t\trelative: false,\n\t\t\tprotocol: null,\n\t\t\thostname: null,\n\t\t\tport: null,\n\t\t\tpathname: null,\n\t\t\tsearch: null,\n\t\t\thash: null,\n\t\t\thost: null\n\t\t};\n\n\t\tif (path == null) { return info; }\n\n\t\t// Inject the path parts.\n\t\tvar parser = createjs.Elements.a();\n\t\tparser.href = path;\n\n\t\tfor (var n in info) {\n\t\t\tif (n in parser) {\n\t\t\t\tinfo[n] = parser[n];\n\t\t\t}\n\t\t}\n\n\t\t// Drop the query string\n\t\tvar queryIndex = path.indexOf(\"?\");\n\t\tif (queryIndex > -1) {\n\t\t\tpath = path.substr(0, queryIndex);\n\t\t}\n\n\t\t// Absolute\n\t\tvar match;\n\t\tif (s.ABSOLUTE_PATT.test(path)) {\n\t\t\tinfo.absolute = true;\n\n\t\t\t// Relative\n\t\t} else if (s.RELATIVE_PATT.test(path)) {\n\t\t\tinfo.relative = true;\n\t\t}\n\n\t\t// Extension\n\t\tif (match = path.match(s.EXTENSION_PATT)) {\n\t\t\tinfo.extension = match[1].toLowerCase();\n\t\t}\n\n\t\treturn info;\n\t};\n\n\t/**\n\t * Formats an object into a query string for either a POST or GET request.\n\t * @method formatQueryString\n\t * @param {Object} data The data to convert to a query string.\n\t * @param {Array} [query] Existing name/value pairs to append on to this query.\n\t * @static\n\t */\n\ts.formatQueryString = function (data, query) {\n\t\tif (data == null) {\n\t\t\tthrow new Error(\"You must specify data.\");\n\t\t}\n\t\tvar params = [];\n\t\tfor (var n in data) {\n\t\t\tparams.push(n + \"=\" + escape(data[n]));\n\t\t}\n\t\tif (query) {\n\t\t\tparams = params.concat(query);\n\t\t}\n\t\treturn params.join(\"&\");\n\t};\n\n\t/**\n\t * A utility method that builds a file path using a source and a data object, and formats it into a new path.\n\t * @method buildURI\n\t * @param {String} src The source path to add values to.\n\t * @param {Object} [data] Object used to append values to this request as a query string. Existing parameters on the\n\t * path will be preserved.\n\t * @returns {string} A formatted string that contains the path and the supplied parameters.\n\t * @static\n\t */\n\ts.buildURI = function (src, data) {\n\t\tif (data == null) {\n\t\t\treturn src;\n\t\t}\n\n\t\tvar query = [];\n\t\tvar idx = src.indexOf(\"?\");\n\n\t\tif (idx != -1) {\n\t\t\tvar q = src.slice(idx + 1);\n\t\t\tquery = query.concat(q.split(\"&\"));\n\t\t}\n\n\t\tif (idx != -1) {\n\t\t\treturn src.slice(0, idx) + \"?\" + this.formatQueryString(data, query);\n\t\t} else {\n\t\t\treturn src + \"?\" + this.formatQueryString(data, query);\n\t\t}\n\t};\n\n\t/**\n\t * @method isCrossDomain\n\t * @param {LoadItem|Object} item A load item with a `src` property.\n\t * @return {Boolean} If the load item is loading from a different domain than the current location.\n\t * @static\n\t */\n\ts.isCrossDomain = function (item) {\n\t\tvar target = createjs.Elements.a();\n\t\ttarget.href = item.src;\n\n\t\tvar host = createjs.Elements.a();\n\t\thost.href = location.href;\n\n\t\tvar crossdomain = (target.hostname != \"\") &&\n\t\t\t(target.port != host.port ||\n\t\t\ttarget.protocol != host.protocol ||\n\t\t\ttarget.hostname != host.hostname);\n\t\treturn crossdomain;\n\t};\n\n\t/**\n\t * @method isLocal\n\t * @param {LoadItem|Object} item A load item with a `src` property\n\t * @return {Boolean} If the load item is loading from the \"file:\" protocol. Assume that the host must be local as\n\t * well.\n\t * @static\n\t */\n\ts.isLocal = function (item) {\n\t\tvar target = createjs.Elements.a();\n\t\ttarget.href = item.src;\n\t\treturn target.hostname == \"\" && target.protocol == \"file:\";\n\t};\n\n\tcreatejs.URLUtils = s;\n\n}());\n\n//##############################################################################\n// DomUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * A few utilities for interacting with the dom.\n\t * @class DomUtils\n\t */\n\tvar s = {\n\t\tcontainer: null\n\t};\n\n\ts.appendToHead = function (el) {\n\t\ts.getHead().appendChild(el);\n\t}\n\n\ts.appendToBody = function (el) {\n\t\tif (s.container == null) {\n\t\t\ts.container = document.createElement(\"div\");\n\t\t\ts.container.id = \"preloadjs-container\";\n\t\t\tvar style = s.container.style;\n\t\t\tstyle.visibility = \"hidden\";\n\t\t\tstyle.position = \"absolute\";\n\t\t\tstyle.width = s.container.style.height = \"10px\";\n\t\t\tstyle.overflow = \"hidden\";\n\t\t\tstyle.transform = style.msTransform = style.webkitTransform = style.oTransform = \"translate(-10px, -10px)\"; //LM: Not working\n\t\t\ts.getBody().appendChild(s.container);\n\t\t}\n\t\ts.container.appendChild(el);\n\t}\n\n\ts.getHead = function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}\n\n\ts.getBody = function () {\n\t\treturn document.body || document.getElementsByTagName(\"body\")[0];\n\t}\n\n\ts.removeChild = function(el) {\n\t\tif (el.parent) {\n\t\t\tel.parent.removeChild(el);\n\t\t}\n\t}\n\n\t/**\n\t * Check if item is a valid HTMLImageElement\n\t * @method isImageTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isImageTag = function(item) {\n\t\treturn item instanceof HTMLImageElement;\n\t};\n\n\t/**\n\t * Check if item is a valid HTMLAudioElement\n\t * @method isAudioTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isAudioTag = function(item) {\n\t\tif (window.HTMLAudioElement) {\n\t\t\treturn item instanceof HTMLAudioElement;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Check if item is a valid HTMLVideoElement\n\t * @method isVideoTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isVideoTag = function(item) {\n\t\tif (window.HTMLVideoElement) {\n\t\t\treturn item instanceof HTMLVideoElement;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tcreatejs.DomUtils = s;\n\n}());\n\n//##############################################################################\n// DataUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * A few data utilities for formatting different data types.\n\t * @class DataUtils\n\t */\n\tvar s = {};\n\n\t// static methods\n\t/**\n\t * Parse XML using the DOM. This is required when preloading XML or SVG.\n\t * @method parseXML\n\t * @param {String} text The raw text or XML that is loaded by XHR.\n\t * @return {XML} An XML document\n\t * @static\n\t */\n\ts.parseXML = function (text) {\n\t\tvar xml = null;\n\t\t// CocoonJS does not support XML parsing with either method.\n\n\t\t// Most browsers will use DOMParser\n\t\t// IE fails on certain SVG files, so we have a fallback below.\n\t\ttry {\n\t\t\tif (window.DOMParser) {\n\t\t\t\tvar parser = new DOMParser();\n\t\t\t\txml = parser.parseFromString(text, \"text/xml\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t}\n\n\t\t// Fallback for IE support.\n\t\tif (!xml) {\n\t\t\ttry {\n\t\t\t\txml = new ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\t\txml.async = false;\n\t\t\t\txml.loadXML(text);\n\t\t\t} catch (e) {\n\t\t\t\txml = null;\n\t\t\t}\n\t\t}\n\n\t\treturn xml;\n\t};\n\n\t/**\n\t * Parse a string into an Object.\n\t * @method parseJSON\n\t * @param {String} value The loaded JSON string\n\t * @returns {Object} A JavaScript object.\n\t */\n\ts.parseJSON = function (value) {\n\t\tif (value == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\treturn JSON.parse(value);\n\t\t} catch (e) {\n\t\t\t// TODO; Handle this with a custom error?\n\t\t\tthrow e;\n\t\t}\n\t};\n\n\tcreatejs.DataUtils = s;\n\n}());\n\n//##############################################################################\n// Types.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\tvar s = {};\n\n\t/**\n\t * The preload type for generic binary types. Note that images are loaded as binary files when using XHR.\n\t * @property BINARY\n\t * @type {String}\n\t * @default binary\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.BINARY = \"binary\";\n\n\t/**\n\t * The preload type for css files. CSS files are loaded using a &lt;link&gt; when loaded with XHR, or a\n\t * &lt;style&gt; tag when loaded with tags.\n\t * @property CSS\n\t * @type {String}\n\t * @default css\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.CSS = \"css\";\n\n\t/**\n\t * The preload type for font files.\n\t * @property FONT\n\t * @type {String}\n\t * @default font\n\t * @static\n\t * @since 0.9.0\n\t */\n\ts.FONT = \"font\";\n\n\t/**\n\t * The preload type for fonts specified with CSS (such as Google fonts)\n\t * @property FONTCSS\n\t * @type {String}\n\t * @default fontcss\n\t * @static\n\t * @since 0.9.0\n\t */\n\ts.FONTCSS = \"fontcss\";\n\n\t/**\n\t * The preload type for image files, usually png, gif, or jpg/jpeg. Images are loaded into an &lt;image&gt; tag.\n\t * @property IMAGE\n\t * @type {String}\n\t * @default image\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.IMAGE = \"image\";\n\n\t/**\n\t * The preload type for javascript files, usually with the \"js\" file extension. JavaScript files are loaded into a\n\t * &lt;script&gt; tag.\n\t *\n\t * Since version 0.4.1+, due to how tag-loaded scripts work, all JavaScript files are automatically injected into\n\t * the body of the document to maintain parity between XHR and tag-loaded scripts. In version 0.4.0 and earlier,\n\t * only tag-loaded scripts are injected.\n\t * @property JAVASCRIPT\n\t * @type {String}\n\t * @default javascript\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JAVASCRIPT = \"javascript\";\n\n\t/**\n\t * The preload type for json files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\n\t * JavaScript object. Note that if a `callback` is present on the load item, the file will be loaded with JSONP,\n\t * no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to, and the JSON\n\t * must contain a matching wrapper function.\n\t * @property JSON\n\t * @type {String}\n\t * @default json\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JSON = \"json\";\n\n\t/**\n\t * The preload type for jsonp files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\n\t * JavaScript object. You are required to pass a callback parameter that matches the function wrapper in the JSON.\n\t * Note that JSONP will always be used if there is a callback present, no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}}\n\t * property is set to.\n\t * @property JSONP\n\t * @type {String}\n\t * @default jsonp\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JSONP = \"jsonp\";\n\n\t/**\n\t * The preload type for json-based manifest files, usually with the \"json\" file extension. The JSON data is loaded\n\t * and parsed into a JavaScript object. PreloadJS will then look for a \"manifest\" property in the JSON, which is an\n\t * Array of files to load, following the same format as the {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\n\t * method. If a \"callback\" is specified on the manifest object, then it will be loaded using JSONP instead,\n\t * regardless of what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to.\n\t * @property MANIFEST\n\t * @type {String}\n\t * @default manifest\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.MANIFEST = \"manifest\";\n\n\t/**\n\t * The preload type for sound files, usually mp3, ogg, or wav. When loading via tags, audio is loaded into an\n\t * &lt;audio&gt; tag.\n\t * @property SOUND\n\t * @type {String}\n\t * @default sound\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SOUND = \"sound\";\n\n\t/**\n\t * The preload type for video files, usually mp4, ts, or ogg. When loading via tags, video is loaded into an\n\t * &lt;video&gt; tag.\n\t * @property VIDEO\n\t * @type {String}\n\t * @default video\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.VIDEO = \"video\";\n\n\t/**\n\t * The preload type for SpriteSheet files. SpriteSheet files are JSON files that contain string image paths.\n\t * @property SPRITESHEET\n\t * @type {String}\n\t * @default spritesheet\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SPRITESHEET = \"spritesheet\";\n\n\t/**\n\t * The preload type for SVG files.\n\t * @property SVG\n\t * @type {String}\n\t * @default svg\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SVG = \"svg\";\n\n\t/**\n\t * The preload type for text files, which is also the default file type if the type can not be determined. Text is\n\t * loaded as raw text.\n\t * @property TEXT\n\t * @type {String}\n\t * @default text\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.TEXT = \"text\";\n\n\t/**\n\t * The preload type for xml files. XML is loaded into an XML document.\n\t * @property XML\n\t * @type {String}\n\t * @default xml\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.XML = \"xml\";\n\n\tcreatejs.Types = s;\n}());\n\n//##############################################################################\n// Methods.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\tvar s = {};\n\n\t/**\n\t * Defines a POST request, use for a method value when loading data.\n\t * @property POST\n\t * @type {string}\n\t * @default post\n\t * @static\n\t */\n\ts.POST = \"POST\";\n\n\t/**\n\t * Defines a GET request, use for a method value when loading data.\n\t * @property GET\n\t * @type {string}\n\t * @default get\n\t * @static\n\t */\n\ts.GET = \"GET\";\n\n\tcreatejs.Methods = s;\n}());\n\n//##############################################################################\n// LoadItem.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * All loaders accept an item containing the properties defined in this class. If a raw object is passed instead,\n\t * it will not be affected, but it must contain at least a {{#crossLink \"src:property\"}}{{/crossLink}} property. A\n\t * string path or HTML tag is also acceptable, but it will be automatically converted to a LoadItem using the\n\t * {{#crossLink \"create\"}}{{/crossLink}} method by {{#crossLink \"AbstractLoader\"}}{{/crossLink}}\n\t * @class LoadItem\n\t * @constructor\n\t * @since 0.6.0\n\t */\n\tfunction LoadItem() {\n\t\t/**\n\t\t * The source of the file that is being loaded. This property is <b>required</b>. The source can either be a\n\t\t * string (recommended), or an HTML tag.\n\t\t * This can also be an object, but in that case it has to include a type and be handled by a plugin.\n\t\t * @property src\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.src = null;\n\n\t\t/**\n\t\t * The type file that is being loaded. The type of the file is usually inferred by the extension, but can also\n\t\t * be set manually. This is helpful in cases where a file does not have an extension.\n\t\t * @property type\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.type = null;\n\n\t\t/**\n\t\t * A string identifier which can be used to reference the loaded object. If none is provided, this will be\n\t\t * automatically set to the {{#crossLink \"src:property\"}}{{/crossLink}}.\n\t\t * @property id\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.id = null;\n\n\t\t/**\n\t\t * Determines if a manifest will maintain the order of this item, in relation to other items in the manifest\n\t\t * that have also set the `maintainOrder` property to `true`. This only applies when the max connections has\n\t\t * been set above 1 (using {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}). Everything with this\n\t\t * property set to `false` will finish as it is loaded. Ordered items are combined with script tags loading in\n\t\t * order when {{#crossLink \"LoadQueue/maintainScriptOrder:property\"}}{{/crossLink}} is set to `true`.\n\t\t * @property maintainOrder\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.maintainOrder = false;\n\n\t\t/**\n\t\t * A callback used by JSONP requests that defines what global method to call when the JSONP content is loaded.\n\t\t * @property callback\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.callback = null;\n\n\t\t/**\n\t\t * An arbitrary data object, which is included with the loaded object.\n\t\t * @property data\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.data = null;\n\n\t\t/**\n\t\t * The request method used for HTTP calls. Both {{#crossLink \"Methods/GET:property\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Methods/POST:property\"}}{{/crossLink}} request types are supported, and are defined as\n\t\t * constants on {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\n\t\t * @property method\n\t\t * @type {String}\n\t\t * @default GET\n\t\t */\n\t\tthis.method = createjs.Methods.GET;\n\n\t\t/**\n\t\t * An object hash of name/value pairs to send to the server.\n\t\t * @property values\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.values = null;\n\n\t\t/**\n\t\t * An object hash of headers to attach to an XHR request. PreloadJS will automatically attach some default\n\t\t * headers when required, including \"Origin\", \"Content-Type\", and \"X-Requested-With\". You may override the\n\t\t * default headers by including them in your headers object.\n\t\t * @property headers\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.headers = null;\n\n\t\t/**\n\t\t * Enable credentials for XHR requests.\n\t\t * @property withCredentials\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.withCredentials = false;\n\n\t\t/**\n\t\t * Set the mime type of XHR-based requests. This is automatically set to \"text/plain; charset=utf-8\" for text\n\t\t * based files (json, xml, text, css, js).\n\t\t * @property mimeType\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.mimeType = null;\n\n\t\t/**\n\t\t * Sets the crossOrigin attribute for CORS-enabled images loading cross-domain.\n\t\t * @property crossOrigin\n\t\t * @type {boolean}\n\t\t * @default Anonymous\n\t\t */\n\t\tthis.crossOrigin = null;\n\n\t\t/**\n\t\t * The duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\n\t\t * (level one) loading, as XHR (level 2) provides its own timeout event.\n\t\t * @property loadTimeout\n\t\t * @type {Number}\n\t\t * @default 8000 (8 seconds)\n\t\t */\n\t\tthis.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\n\t};\n\n\tvar p = LoadItem.prototype = {};\n\tvar s = LoadItem;\n\n\t/**\n\t * Default duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\n\t * (level one) loading, as XHR (level 2) provides its own timeout event.\n\t * @property LOAD_TIMEOUT_DEFAULT\n\t * @type {number}\n\t * @static\n\t */\n\ts.LOAD_TIMEOUT_DEFAULT = 8000;\n\n\t/**\n\t * Create a LoadItem.\n\t * <ul>\n\t *     <li>String-based items are converted to a LoadItem with a populated {{#crossLink \"src:property\"}}{{/crossLink}}.</li>\n\t *     <li>LoadItem instances are returned as-is</li>\n\t *     <li>Objects are returned with any needed properties added</li>\n\t * </ul>\n\t * @method create\n\t * @param {LoadItem|String|Object} value The load item value\n\t * @returns {LoadItem|Object}\n\t * @static\n\t */\n\ts.create = function (value) {\n\t\tif (typeof value == \"string\") {\n\t\t\tvar item = new LoadItem();\n\t\t\titem.src = value;\n\t\t\treturn item;\n\t\t} else if (value instanceof s) {\n\t\t\treturn value;\n\t\t} else if (value instanceof Object && value.src) {\n\t\t\tif (value.loadTimeout == null) {\n\t\t\t\tvalue.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\n\t\t\t}\n\t\t\treturn value;\n\t\t} else {\n\t\t\tthrow new Error(\"Type not recognized.\");\n\t\t}\n\t};\n\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var loadItem = new createjs.LoadItem().set({src:\"image.png\", maintainOrder:true});\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the LoadItem instance.\n\t * @return {LoadItem} Returns the instance the method is called on (useful for chaining calls.)\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\tcreatejs.LoadItem = s;\n\n}());\n\n//##############################################################################\n// RequestUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Utilities that assist with parsing load items, and determining file types, etc.\n\t * @class RequestUtils\n\t */\n\tvar s = {};\n\n\t/**\n\t * Determine if a specific type should be loaded as a binary file. Currently, only images and items marked\n\t * specifically as \"binary\" are loaded as binary. Note that audio is <b>not</b> a binary type, as we can not play\n\t * back using an audio tag if it is loaded as binary. Plugins can change the item type to binary to ensure they get\n\t * a binary result to work with. Binary files are loaded using XHR2. Types are defined as static constants on\n\t * {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\n\t * @method isBinary\n\t * @param {String} type The item type.\n\t * @return {Boolean} If the specified type is binary.\n\t * @static\n\t */\n\ts.isBinary = function (type) {\n\t\tswitch (type) {\n\t\t\tcase createjs.Types.IMAGE:\n\t\t\tcase createjs.Types.BINARY:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Determine if a specific type is a text-based asset, and should be loaded as UTF-8.\n\t * @method isText\n\t * @param {String} type The item type.\n\t * @return {Boolean} If the specified type is text.\n\t * @static\n\t */\n\ts.isText = function (type) {\n\t\tswitch (type) {\n\t\t\tcase createjs.Types.TEXT:\n\t\t\tcase createjs.Types.JSON:\n\t\t\tcase createjs.Types.MANIFEST:\n\t\t\tcase createjs.Types.XML:\n\t\t\tcase createjs.Types.CSS:\n\t\t\tcase createjs.Types.SVG:\n\t\t\tcase createjs.Types.JAVASCRIPT:\n\t\t\tcase createjs.Types.SPRITESHEET:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Determine the type of the object using common extensions. Note that the type can be passed in with the load item\n\t * if it is an unusual extension.\n\t * @method getTypeByExtension\n\t * @param {String} extension The file extension to use to determine the load type.\n\t * @return {String} The determined load type (for example, `createjs.Types.IMAGE`). Will return `null` if\n\t * the type can not be determined by the extension.\n\t * @static\n\t */\n\ts.getTypeByExtension = function (extension) {\n\t\tif (extension == null) {\n\t\t\treturn createjs.Types.TEXT;\n\t\t}\n\n\t\tswitch (extension.toLowerCase()) {\n\t\t\tcase \"jpeg\":\n\t\t\tcase \"jpg\":\n\t\t\tcase \"gif\":\n\t\t\tcase \"png\":\n\t\t\tcase \"webp\":\n\t\t\tcase \"bmp\":\n\t\t\t\treturn createjs.Types.IMAGE;\n\t\t\tcase \"ogg\":\n\t\t\tcase \"mp3\":\n\t\t\tcase \"webm\":\n\t\t\t\treturn createjs.Types.SOUND;\n\t\t\tcase \"mp4\":\n\t\t\tcase \"webm\":\n\t\t\tcase \"ts\":\n\t\t\t\treturn createjs.Types.VIDEO;\n\t\t\tcase \"json\":\n\t\t\t\treturn createjs.Types.JSON;\n\t\t\tcase \"xml\":\n\t\t\t\treturn createjs.Types.XML;\n\t\t\tcase \"css\":\n\t\t\t\treturn createjs.Types.CSS;\n\t\t\tcase \"js\":\n\t\t\t\treturn createjs.Types.JAVASCRIPT;\n\t\t\tcase 'svg':\n\t\t\t\treturn createjs.Types.SVG;\n\t\t\tdefault:\n\t\t\t\treturn createjs.Types.TEXT;\n\t\t}\n\t};\n\n\tcreatejs.RequestUtils = s;\n\n}());\n\n//##############################################################################\n// AbstractLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n// constructor\n\t/**\n\t * The base loader, which defines all the generic methods, properties, and events. All loaders extend this class,\n\t * including the {{#crossLink \"LoadQueue\"}}{{/crossLink}}.\n\t * @class AbstractLoader\n\t * @param {LoadItem|object|string} loadItem The item to be loaded.\n\t * @param {Boolean} [preferXHR] Determines if the LoadItem should <em>try</em> and load using XHR, or take a\n\t * tag-based approach, which can be better in cross-domain situations. Not all loaders can load using one or the\n\t * other, so this is a suggested directive.\n\t * @param {String} [type] The type of loader. Loader types are defined as constants on the AbstractLoader class,\n\t * such as {{#crossLink \"IMAGE:property\"}}{{/crossLink}}, {{#crossLink \"CSS:property\"}}{{/crossLink}}, etc.\n\t * @extends EventDispatcher\n\t */\n\tfunction AbstractLoader(loadItem, preferXHR, type) {\n\t\tthis.EventDispatcher_constructor();\n\n\t\t// public properties\n\t\t/**\n\t\t * If the loader has completed loading. This provides a quick check, but also ensures that the different approaches\n\t\t * used for loading do not pile up resulting in more than one `complete` {{#crossLink \"Event\"}}{{/crossLink}}.\n\t\t * @property loaded\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.loaded = false;\n\n\t\t/**\n\t\t * Determine if the loader was canceled. Canceled loads will not fire complete events. Note that this property\n\t\t * is readonly, so {{#crossLink \"LoadQueue\"}}{{/crossLink}} queues should be closed using {{#crossLink \"LoadQueue/close\"}}{{/crossLink}}\n\t\t * instead.\n\t\t * @property canceled\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @readonly\n\t\t */\n\t\tthis.canceled = false;\n\n\t\t/**\n\t\t * The current load progress (percentage) for this item. This will be a number between 0 and 1.\n\t\t *\n\t\t * <h4>Example</h4>\n\t\t *\n\t\t *     var queue = new createjs.LoadQueue();\n\t\t *     queue.loadFile(\"largeImage.png\");\n\t\t *     queue.on(\"progress\", function() {\n\t\t *         console.log(\"Progress:\", queue.progress, event.progress);\n\t\t *     });\n\t\t *\n\t\t * @property progress\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis.progress = 0;\n\n\t\t/**\n\t\t * The type of item this loader will load. See {{#crossLink \"AbstractLoader\"}}{{/crossLink}} for a full list of\n\t\t * supported types.\n\t\t * @property type\n\t\t * @type {String}\n\t\t */\n\t\tthis.type = type;\n\n\t\t/**\n\t\t * A formatter function that converts the loaded raw result into the final result. For example, the JSONLoader\n\t\t * converts a string of text into a JavaScript object. Not all loaders have a resultFormatter, and this property\n\t\t * can be overridden to provide custom formatting.\n\t\t *\n\t\t * Optionally, a resultFormatter can return a callback function in cases where the formatting needs to be\n\t\t * asynchronous, such as creating a new image. The callback function is passed 2 parameters, which are callbacks\n\t\t * to handle success and error conditions in the resultFormatter. Note that the resultFormatter method is\n\t\t * called in the current scope, as well as the success and error callbacks.\n\t\t *\n\t\t * <h4>Example asynchronous resultFormatter</h4>\n\t\t *\n\t\t * \tfunction _formatResult(loader) {\n\t\t * \t\treturn function(success, error) {\n\t\t * \t\t\tif (errorCondition) { error(errorDetailEvent); }\n\t\t * \t\t\tsuccess(result);\n\t\t * \t\t}\n\t\t * \t}\n\t\t * @property resultFormatter\n\t\t * @type {Function}\n\t\t * @default null\n\t\t */\n\t\tthis.resultFormatter = null;\n\n\t\t// protected properties\n\t\t/**\n\t\t * The {{#crossLink \"LoadItem\"}}{{/crossLink}} this loader represents. Note that this is null in a {{#crossLink \"LoadQueue\"}}{{/crossLink}},\n\t\t * but will be available on loaders such as {{#crossLink \"XMLLoader\"}}{{/crossLink}} and {{#crossLink \"ImageLoader\"}}{{/crossLink}}.\n\t\t * @property _item\n\t\t * @type {LoadItem|Object}\n\t\t * @private\n\t\t */\n\t\tif (loadItem) {\n\t\t\tthis._item = createjs.LoadItem.create(loadItem);\n\t\t} else {\n\t\t\tthis._item = null;\n\t\t}\n\n\t\t/**\n\t\t * Whether the loader will try and load content using XHR (true) or HTML tags (false).\n\t\t * @property _preferXHR\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t\tthis._preferXHR = preferXHR;\n\n\t\t/**\n\t\t * The loaded result after it is formatted by an optional {{#crossLink \"resultFormatter\"}}{{/crossLink}}. For\n\t\t * items that are not formatted, this will be the same as the {{#crossLink \"_rawResult:property\"}}{{/crossLink}}.\n\t\t * The result is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}} method.\n\t\t * @property _result\n\t\t * @type {Object|String}\n\t\t * @private\n\t\t */\n\t\tthis._result = null;\n\n\t\t/**\n\t\t * The loaded result before it is formatted. The rawResult is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}}\n\t\t * method, and passing `true`.\n\t\t * @property _rawResult\n\t\t * @type {Object|String}\n\t\t * @private\n\t\t */\n\t\tthis._rawResult = null;\n\n\t\t/**\n\t\t * A list of items that loaders load behind the scenes. This does not include the main item the loader is\n\t\t * responsible for loading. Examples of loaders that have sub-items include the {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}} and\n\t\t * {{#crossLink \"ManifestLoader\"}}{{/crossLink}}.\n\t\t * @property _loadItems\n\t\t * @type {null}\n\t\t * @protected\n\t\t */\n\t\tthis._loadedItems = null;\n\n\t\t/**\n\t\t * The attribute the items loaded using tags use for the source.\n\t\t * @type {string}\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\tthis._tagSrcAttribute = null;\n\n\t\t/**\n\t\t * An HTML tag (or similar) that a loader may use to load HTML content, such as images, scripts, etc.\n\t\t * @property _tag\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._tag = null;\n\t};\n\n\tvar p = createjs.extend(AbstractLoader, createjs.EventDispatcher);\n\tvar s = AbstractLoader;\n\n\t// Remove these @deprecated properties after 1.0\n\ttry {\n\t\tObject.defineProperties(s, {\n\t\t\tPOST: { get: createjs.deprecate(function() { return createjs.Methods.POST; }, \"AbstractLoader.POST\") },\n\t\t\tGET: { get: createjs.deprecate(function() { return createjs.Methods.GET; }, \"AbstractLoader.GET\") },\n\n\t\t\tBINARY: { get: createjs.deprecate(function() { return createjs.Types.BINARY; }, \"AbstractLoader.BINARY\") },\n\t\t\tCSS: { get: createjs.deprecate(function() { return createjs.Types.CSS; }, \"AbstractLoader.CSS\") },\n\t\t\tFONT: { get: createjs.deprecate(function() { return createjs.Types.FONT; }, \"AbstractLoader.FONT\") },\n\t\t\tFONTCSS: { get: createjs.deprecate(function() { return createjs.Types.FONTCSS; }, \"AbstractLoader.FONTCSS\") },\n\t\t\tIMAGE: { get: createjs.deprecate(function() { return createjs.Types.IMAGE; }, \"AbstractLoader.IMAGE\") },\n\t\t\tJAVASCRIPT: { get: createjs.deprecate(function() { return createjs.Types.JAVASCRIPT; }, \"AbstractLoader.JAVASCRIPT\") },\n\t\t\tJSON: { get: createjs.deprecate(function() { return createjs.Types.JSON; }, \"AbstractLoader.JSON\") },\n\t\t\tJSONP: { get: createjs.deprecate(function() { return createjs.Types.JSONP; }, \"AbstractLoader.JSONP\") },\n\t\t\tMANIFEST: { get: createjs.deprecate(function() { return createjs.Types.MANIFEST; }, \"AbstractLoader.MANIFEST\") },\n\t\t\tSOUND: { get: createjs.deprecate(function() { return createjs.Types.SOUND; }, \"AbstractLoader.SOUND\") },\n\t\t\tVIDEO: { get: createjs.deprecate(function() { return createjs.Types.VIDEO; }, \"AbstractLoader.VIDEO\") },\n\t\t\tSPRITESHEET: { get: createjs.deprecate(function() { return createjs.Types.SPRITESHEET; }, \"AbstractLoader.SPRITESHEET\") },\n\t\t\tSVG: { get: createjs.deprecate(function() { return createjs.Types.SVG; }, \"AbstractLoader.SVG\") },\n\t\t\tTEXT: { get: createjs.deprecate(function() { return createjs.Types.TEXT; }, \"AbstractLoader.TEXT\") },\n\t\t\tXML: { get: createjs.deprecate(function() { return createjs.Types.XML; }, \"AbstractLoader.XML\") }\n\t\t});\n\t} catch (e) {}\n\n// Events\n\t/**\n\t * The {{#crossLink \"ProgressEvent\"}}{{/crossLink}} that is fired when the overall progress changes. Prior to\n\t * version 0.6.0, this was just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\n\t * @event progress\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a load starts.\n\t * @event loadstart\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.3.1\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the entire queue has been loaded.\n\t * @event complete\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"ErrorEvent\"}}{{/crossLink}} that is fired when the loader encounters an error. If the error was\n\t * encountered by a file, the event will contain the item that caused the error. Prior to version 0.6.0, this was\n\t * just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\n\t * @event error\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the loader encounters an internal file load error.\n\t * This enables loaders to maintain internal queues, and surface file load errors.\n\t * @event fileerror\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"fileerror\")\n\t * @param {LoadItem|object} The item that encountered the error\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a loader internally loads a file. This enables\n\t * loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}} to maintain internal {{#crossLink \"LoadQueue\"}}{{/crossLink}}s\n\t * and notify when they have loaded a file. The {{#crossLink \"LoadQueue\"}}{{/crossLink}} class dispatches a\n\t * slightly different {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event.\n\t * @event fileload\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"fileload\")\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\n\t * object will contain that value as a `src` property.\n\t * @param {Object} result The HTML tag or parsed result of the loaded item.\n\t * @param {Object} rawResult The unprocessed result, usually the raw text or binary data before it is converted\n\t * to a usable object.\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired after the internal request is created, but before a load.\n\t * This allows updates to the loader for specific loading needs, such as binary or XHR image loading.\n\t * @event initialize\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"initialize\")\n\t * @param {AbstractLoader} loader The loader that has been initialized.\n\t */\n\n\n\t/**\n\t * Get a reference to the manifest item that is loaded by this loader. In some cases this will be the value that was\n\t * passed into {{#crossLink \"LoadQueue\"}}{{/crossLink}} using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or\n\t * {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. However if only a String path was passed in, then it will\n\t * be a {{#crossLink \"LoadItem\"}}{{/crossLink}}.\n\t * @method getItem\n\t * @return {Object} The manifest item that this loader is responsible for loading.\n\t * @since 0.6.0\n\t */\n\tp.getItem = function () {\n\t\treturn this._item;\n\t};\n\n\t/**\n\t * Get a reference to the content that was loaded by the loader (only available after the {{#crossLink \"complete:event\"}}{{/crossLink}}\n\t * event is dispatched.\n\t * @method getResult\n\t * @param {Boolean} [raw=false] Determines if the returned result will be the formatted content, or the raw loaded\n\t * data (if it exists).\n\t * @return {Object}\n\t * @since 0.6.0\n\t */\n\tp.getResult = function (raw) {\n\t\treturn raw ? this._rawResult : this._result;\n\t};\n\n\t/**\n\t * Return the `tag` this object creates or uses for loading.\n\t * @method getTag\n\t * @return {Object} The tag instance\n\t * @since 0.6.0\n\t */\n\tp.getTag = function () {\n\t\treturn this._tag;\n\t};\n\n\t/**\n\t * Set the `tag` this item uses for loading.\n\t * @method setTag\n\t * @param {Object} tag The tag instance\n\t * @since 0.6.0\n\t */\n\tp.setTag = function(tag) {\n\t  this._tag = tag;\n\t};\n\n\t/**\n\t * Begin loading the item. This method is required when using a loader by itself.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var queue = new createjs.LoadQueue();\n\t *      queue.on(\"complete\", handleComplete);\n\t *      queue.loadManifest(fileArray, false); // Note the 2nd argument that tells the queue not to start loading yet\n\t *      queue.load();\n\t *\n\t * @method load\n\t */\n\tp.load = function () {\n\t\tthis._createRequest();\n\n\t\tthis._request.on(\"complete\", this, this);\n\t\tthis._request.on(\"progress\", this, this);\n\t\tthis._request.on(\"loadStart\", this, this);\n\t\tthis._request.on(\"abort\", this, this);\n\t\tthis._request.on(\"timeout\", this, this);\n\t\tthis._request.on(\"error\", this, this);\n\n\t\tvar evt = new createjs.Event(\"initialize\");\n\t\tevt.loader = this._request;\n\t\tthis.dispatchEvent(evt);\n\n\t\tthis._request.load();\n\t};\n\n\t/**\n\t * Close the the item. This will stop any open requests (although downloads using HTML tags may still continue in\n\t * the background), but events will not longer be dispatched.\n\t * @method cancel\n\t */\n\tp.cancel = function () {\n\t\tthis.canceled = true;\n\t\tthis.destroy();\n\t};\n\n\t/**\n\t * Clean up the loader.\n\t * @method destroy\n\t */\n\tp.destroy = function() {\n\t\tif (this._request) {\n\t\t\tthis._request.removeAllEventListeners();\n\t\t\tthis._request.destroy();\n\t\t}\n\n\t\tthis._request = null;\n\n\t\tthis._item = null;\n\t\tthis._rawResult = null;\n\t\tthis._result = null;\n\n\t\tthis._loadItems = null;\n\n\t\tthis.removeAllEventListeners();\n\t};\n\n\t/**\n\t * Get any items loaded internally by the loader. The enables loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}}\n\t * to expose items it loads internally.\n\t * @method getLoadedItems\n\t * @return {Array} A list of the items loaded by the loader.\n\t * @since 0.6.0\n\t */\n\tp.getLoadedItems = function () {\n\t\treturn this._loadedItems;\n\t};\n\n\n\t// Private methods\n\t/**\n\t * Create an internal request used for loading. By default, an {{#crossLink \"XHRRequest\"}}{{/crossLink}} or\n\t * {{#crossLink \"TagRequest\"}}{{/crossLink}} is created, depending on the value of {{#crossLink \"preferXHR:property\"}}{{/crossLink}}.\n\t * Other loaders may override this to use different request types, such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}},\n\t * which uses {{#crossLink \"JSONLoader\"}}{{/crossLink}} or {{#crossLink \"JSONPLoader\"}}{{/crossLink}} under the hood.\n\t * @method _createRequest\n\t * @protected\n\t */\n\tp._createRequest = function() {\n\t\tif (!this._preferXHR) {\n\t\t\tthis._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\n\t\t} else {\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\n\t\t}\n\t};\n\n\t/**\n\t * Create the HTML tag used for loading. This method does nothing by default, and needs to be implemented\n\t * by loaders that require tag loading.\n\t * @method _createTag\n\t * @param {String} src The tag source\n\t * @return {HTMLElement} The tag that was created\n\t * @protected\n\t */\n\tp._createTag = function(src) { return null; };\n\n\t/**\n\t * Dispatch a loadstart {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/loadstart:event\"}}{{/crossLink}}\n\t * event for details on the event payload.\n\t * @method _sendLoadStart\n\t * @protected\n\t */\n\tp._sendLoadStart = function () {\n\t\tif (this._isCanceled()) { return; }\n\t\tthis.dispatchEvent(\"loadstart\");\n\t};\n\n\t/**\n\t * Dispatch a {{#crossLink \"ProgressEvent\"}}{{/crossLink}}.\n\t * @method _sendProgress\n\t * @param {Number | Object} value The progress of the loaded item, or an object containing <code>loaded</code>\n\t * and <code>total</code> properties.\n\t * @protected\n\t */\n\tp._sendProgress = function (value) {\n\t\tif (this._isCanceled()) { return; }\n\t\tvar event = null;\n\t\tif (typeof(value) == \"number\") {\n\t\t\tthis.progress = value;\n\t\t\tevent = new createjs.ProgressEvent(this.progress);\n\t\t} else {\n\t\t\tevent = value;\n\t\t\tthis.progress = value.loaded / value.total;\n\t\t\tevent.progress = this.progress;\n\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\n\t\t}\n\t\tthis.hasEventListener(\"progress\") && this.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch a complete {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}} event\n\t * @method _sendComplete\n\t * @protected\n\t */\n\tp._sendComplete = function () {\n\t\tif (this._isCanceled()) { return; }\n\n\t\tthis.loaded = true;\n\n\t\tvar event = new createjs.Event(\"complete\");\n\t\tevent.rawResult = this._rawResult;\n\n\t\tif (this._result != null) {\n\t\t\tevent.result = this._result;\n\t\t}\n\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch an error {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/error:event\"}}{{/crossLink}}\n\t * event for details on the event payload.\n\t * @method _sendError\n\t * @param {ErrorEvent} event The event object containing specific error properties.\n\t * @protected\n\t */\n\tp._sendError = function (event) {\n\t\tif (this._isCanceled() || !this.hasEventListener(\"error\")) { return; }\n\t\tif (event == null) {\n\t\t\tevent = new createjs.ErrorEvent(\"PRELOAD_ERROR_EMPTY\"); // TODO: Populate error\n\t\t}\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Determine if the load has been canceled. This is important to ensure that method calls or asynchronous events\n\t * do not cause issues after the queue has been cleaned up.\n\t * @method _isCanceled\n\t * @return {Boolean} If the loader has been canceled.\n\t * @protected\n\t */\n\tp._isCanceled = function () {\n\t\tif (window.createjs == null || this.canceled) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * A custom result formatter function, which is called just before a request dispatches its complete event. Most\n\t * loader types already have an internal formatter, but this can be user-overridden for custom formatting. The\n\t * formatted result will be available on Loaders using {{#crossLink \"getResult\"}}{{/crossLink}}, and passing `true`.\n\t * @property resultFormatter\n\t * @type Function\n\t * @return {Object} The formatted result\n\t * @since 0.6.0\n\t */\n\tp.resultFormatter = null;\n\n\t/**\n\t * Handle events from internal requests. By default, loaders will handle, and redispatch the necessary events, but\n\t * this method can be overridden for custom behaviours.\n\t * @method handleEvent\n\t * @param {Event} event The event that the internal request dispatches.\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp.handleEvent = function (event) {\n\t\tswitch (event.type) {\n\t\t\tcase \"complete\":\n\t\t\t\tthis._rawResult = event.target._response;\n\t\t\t\tvar result = this.resultFormatter && this.resultFormatter(this);\n\t\t\t\t// The resultFormatter is asynchronous\n\t\t\t\tif (result instanceof Function) {\n\t\t\t\t\tresult.call(this,\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatSuccess, this),\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatFailed, this)\n\t\t\t\t\t);\n\t\t\t\t// The result formatter is synchronous\n\t\t\t\t} else {\n\t\t\t\t\tthis._result =  result || this._rawResult;\n\t\t\t\t\tthis._sendComplete();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"progress\":\n\t\t\t\tthis._sendProgress(event);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._sendError(event);\n\t\t\t\tbreak;\n\t\t\tcase \"loadstart\":\n\t\t\t\tthis._sendLoadStart();\n\t\t\t\tbreak;\n\t\t\tcase \"abort\":\n\t\t\tcase \"timeout\":\n\t\t\t\tif (!this._isCanceled()) {\n\t\t\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_\" + event.type.toUpperCase() + \"_ERROR\"));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\t/**\n\t * The \"success\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\n\t * functions.\n\t * @method _resultFormatSuccess\n\t * @param {Object} result The formatted result\n\t * @private\n\t */\n\tp._resultFormatSuccess = function (result) {\n\t\tthis._result = result;\n\t\tthis._sendComplete();\n\t};\n\n\t/**\n\t * The \"error\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\n\t * functions.\n\t * @method _resultFormatSuccess\n\t * @param {Object} error The error event\n\t * @private\n\t */\n\tp._resultFormatFailed = function (event) {\n\t\tthis._sendError(event);\n\t};\n\n\t/**\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t */\n\tp.toString = function () {\n\t\treturn \"[PreloadJS AbstractLoader]\";\n\t};\n\n\tcreatejs.AbstractLoader = createjs.promote(AbstractLoader, \"EventDispatcher\");\n\n}());\n\n//##############################################################################\n// AbstractMediaLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * The AbstractMediaLoader is a base class that handles some of the shared methods and properties of loaders that\n\t * handle HTML media elements, such as Video and Audio.\n\t * @class AbstractMediaLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @param {String} type The type of media to load. Usually \"video\" or \"audio\".\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction AbstractMediaLoader(loadItem, preferXHR, type) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, type);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"src\";\n\n        this.on(\"initialize\", this._updateXHR, this);\n\t};\n\n\tvar p = createjs.extend(AbstractMediaLoader, createjs.AbstractLoader);\n\n\t// static properties\n\t// public methods\n\tp.load = function () {\n\t\t// TagRequest will handle most of this, but Sound / Video need a few custom properties, so just handle them here.\n\t\tif (!this._tag) {\n\t\t\tthis._tag = this._createTag(this._item.src);\n\t\t}\n\n\t\tthis._tag.preload = \"auto\";\n\t\tthis._tag.load();\n\n\t\tthis.AbstractLoader_load();\n\t};\n\n\t// protected methods\n\t/**\n\t * Creates a new tag for loading if it doesn't exist yet.\n\t * @method _createTag\n\t * @private\n\t */\n\tp._createTag = function () {};\n\n\n\tp._createRequest = function() {\n\t\tif (!this._preferXHR) {\n\t\t\tthis._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\n\t\t} else {\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\n\t\t}\n\t};\n\n    // protected methods\n    /**\n     * Before the item loads, set its mimeType and responseType.\n     * @property _updateXHR\n     * @param {Event} event\n     * @private\n     */\n    p._updateXHR = function (event) {\n        // Only exists for XHR\n        if (event.loader.setResponseType) {\n            event.loader.setResponseType(\"blob\");\n        }\n    };\n\n\t/**\n\t * The result formatter for media files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLVideoElement|HTMLAudioElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\n\t\tthis._tag.onstalled = null;\n\t\tif (this._preferXHR) {\n            var URL = window.URL || window.webkitURL;\n            var result = loader.getResult(true);\n\n\t\t\tloader.getTag().src = URL.createObjectURL(result);\n\t\t}\n\t\treturn loader.getTag();\n\t};\n\n\tcreatejs.AbstractMediaLoader = createjs.promote(AbstractMediaLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// AbstractRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * A base class for actual data requests, such as {{#crossLink \"XHRRequest\"}}{{/crossLink}}, {{#crossLink \"TagRequest\"}}{{/crossLink}},\n\t * and {{#crossLink \"MediaRequest\"}}{{/crossLink}}. PreloadJS loaders will typically use a data loader under the\n\t * hood to get data.\n\t * @class AbstractRequest\n\t * @param {LoadItem} item\n\t * @constructor\n\t */\n\tvar AbstractRequest = function (item) {\n\t\tthis._item = item;\n\t};\n\n\tvar p = createjs.extend(AbstractRequest, createjs.EventDispatcher);\n\n\t// public methods\n\t/**\n\t * Begin a load.\n\t * @method load\n\t */\n\tp.load =  function() {};\n\n\t/**\n\t * Clean up a request.\n\t * @method destroy\n\t */\n\tp.destroy = function() {};\n\n\t/**\n\t * Cancel an in-progress request.\n\t * @method cancel\n\t */\n\tp.cancel = function() {};\n\n\tcreatejs.AbstractRequest = createjs.promote(AbstractRequest, \"EventDispatcher\");\n\n}());\n\n//##############################################################################\n// TagRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * An {{#crossLink \"AbstractRequest\"}}{{/crossLink}} that loads HTML tags, such as images and scripts.\n\t * @class TagRequest\n\t * @param {LoadItem} loadItem\n\t * @param {HTMLElement} tag\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t */\n\tfunction TagRequest(loadItem, tag, srcAttribute) {\n\t\tthis.AbstractRequest_constructor(loadItem);\n\n\t\t// protected properties\n\t\t/**\n\t\t * The HTML tag instance that is used to load.\n\t\t * @property _tag\n\t\t * @type {HTMLElement}\n\t\t * @protected\n\t\t */\n\t\tthis._tag = tag;\n\n\t\t/**\n\t\t * The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t\t * @property _tagSrcAttribute\n\t\t * @type {String}\n\t\t * @protected\n\t\t */\n\t\tthis._tagSrcAttribute = srcAttribute;\n\n\t\t/**\n\t\t * A method closure used for handling the tag load event.\n\t\t * @property _loadedHandler\n\t\t * @type {Function}\n\t\t * @private\n\t\t */\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\n\n\t\t/**\n\t\t * Determines if the element was added to the DOM automatically by PreloadJS, so it can be cleaned up after.\n\t\t * @property _addedToDOM\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t\tthis._addedToDOM = false;\n\n\t};\n\n\tvar p = createjs.extend(TagRequest, createjs.AbstractRequest);\n\n\t// public methods\n\tp.load = function () {\n\t\tthis._tag.onload = createjs.proxy(this._handleTagComplete, this);\n\t\tthis._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);\n\t\tthis._tag.onerror = createjs.proxy(this._handleError, this);\n\n\t\tvar evt = new createjs.Event(\"initialize\");\n\t\tevt.loader = this._tag;\n\n\t\tthis.dispatchEvent(evt);\n\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\n\t\tthis._tag[this._tagSrcAttribute] = this._item.src;\n\n\t\t// wdg:: Append the tag AFTER setting the src, or SVG loading on iOS will fail.\n\t\tif (this._tag.parentNode == null) {\n\t\t\tcreatejs.DomUtils.appendToBody(this._tag);\n\t\t\tthis._addedToDOM = true;\n\t\t}\n\t};\n\n\tp.destroy = function() {\n\t\tthis._clean();\n\t\tthis._tag = null;\n\n\t\tthis.AbstractRequest_destroy();\n\t};\n\n\t// private methods\n\t/**\n\t * Handle the readyStateChange event from a tag. We need this in place of the `onload` callback (mainly SCRIPT\n\t * and LINK tags), but other cases may exist.\n\t * @method _handleReadyStateChange\n\t * @private\n\t */\n\tp._handleReadyStateChange = function () {\n\t\tclearTimeout(this._loadTimeout);\n\t\t// This is strictly for tags in browsers that do not support onload.\n\t\tvar tag = this._tag;\n\n\t\t// Complete is for old IE support.\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\n\t\t\tthis._handleTagComplete();\n\t\t}\n\t};\n\n\t/**\n\t * Handle any error events from the tag.\n\t * @method _handleError\n\t * @protected\n\t */\n\tp._handleError = function() {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(\"error\");\n\t};\n\n\t/**\n\t * Handle the tag's onload callback.\n\t * @method _handleTagComplete\n\t * @private\n\t */\n\tp._handleTagComplete = function () {\n\t\tthis._rawResult = this._tag;\n\t\tthis._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult;\n\n\t\tthis._clean();\n\n\t\tthis.dispatchEvent(\"complete\");\n\t};\n\n\t/**\n\t * The tag request has not loaded within the time specified in loadTimeout.\n\t * @method _handleError\n\t * @param {Object} event The XHR error event.\n\t * @private\n\t */\n\tp._handleTimeout = function () {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.Event(\"timeout\"));\n\t};\n\n\t/**\n\t * Remove event listeners, but don't destroy the request object\n\t * @method _clean\n\t * @private\n\t */\n\tp._clean = function() {\n\t\tthis._tag.onload = null;\n\t\tthis._tag.onreadystatechange = null;\n\t\tthis._tag.onerror = null;\n\t\tif (this._addedToDOM && this._tag.parentNode != null) {\n\t\t\tthis._tag.parentNode.removeChild(this._tag);\n\t\t}\n\t\tclearTimeout(this._loadTimeout);\n\t};\n\n\t/**\n\t * Handle a stalled audio event. The main place this happens is with HTMLAudio in Chrome when playing back audio\n\t * that is already in a load, but not complete.\n\t * @method _handleStalled\n\t * @private\n\t */\n\tp._handleStalled = function () {\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\n\t};\n\n\tcreatejs.TagRequest = createjs.promote(TagRequest, \"AbstractRequest\");\n\n}());\n\n//##############################################################################\n// MediaTagRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * An {{#crossLink \"TagRequest\"}}{{/crossLink}} that loads HTML tags for video and audio.\n\t * @class MediaTagRequest\n\t * @param {LoadItem} loadItem\n\t * @param {HTMLAudioElement|HTMLVideoElement} tag\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t * @constructor\n\t */\n\tfunction MediaTagRequest(loadItem, tag, srcAttribute) {\n\t\tthis.AbstractRequest_constructor(loadItem);\n\n\t\t// protected properties\n\t\tthis._tag = tag;\n\t\tthis._tagSrcAttribute = srcAttribute;\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\n\t};\n\n\tvar p = createjs.extend(MediaTagRequest, createjs.TagRequest);\n\tvar s = MediaTagRequest;\n\n\t// public methods\n\tp.load = function () {\n\t\tvar sc = createjs.proxy(this._handleStalled, this);\n\t\tthis._stalledCallback = sc;\n\n\t\tvar pc = createjs.proxy(this._handleProgress, this);\n\t\tthis._handleProgress = pc;\n\n\t\tthis._tag.addEventListener(\"stalled\", sc);\n\t\tthis._tag.addEventListener(\"progress\", pc);\n\n\t\t// This will tell us when audio is buffered enough to play through, but not when its loaded.\n\t\t// The tag doesn't keep loading in Chrome once enough has buffered, and we have decided that behaviour is sufficient.\n\t\tthis._tag.addEventListener && this._tag.addEventListener(\"canplaythrough\", this._loadedHandler, false); // canplaythrough callback doesn't work in Chrome, so we use an event.\n\n\t\tthis.TagRequest_load();\n\t};\n\n\t// private methods\n\tp._handleReadyStateChange = function () {\n\t\tclearTimeout(this._loadTimeout);\n\t\t// This is strictly for tags in browsers that do not support onload.\n\t\tvar tag = this._tag;\n\n\t\t// Complete is for old IE support.\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\n\t\t\tthis._handleTagComplete();\n\t\t}\n\t};\n\n\tp._handleStalled = function () {\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\n\t};\n\n\t/**\n\t * An XHR request has reported progress.\n\t * @method _handleProgress\n\t * @param {Object} event The XHR progress event.\n\t * @private\n\t */\n\tp._handleProgress = function (event) {\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\n\t\t}\n\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\t// protected methods\n\tp._clean = function () {\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\n\t\tthis._tag.removeEventListener(\"stalled\", this._stalledCallback);\n\t\tthis._tag.removeEventListener(\"progress\", this._progressCallback);\n\n\t\tthis.TagRequest__clean();\n\t};\n\n\tcreatejs.MediaTagRequest = createjs.promote(MediaTagRequest, \"TagRequest\");\n\n}());\n\n//##############################################################################\n// XHRRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n// constructor\n\t/**\n\t * A preloader that loads items using XHR requests, usually XMLHttpRequest. However XDomainRequests will be used\n\t * for cross-domain requests if possible, and older versions of IE fall back on to ActiveX objects when necessary.\n\t * XHR requests load the content as text or binary data, provide progress and consistent completion events, and\n\t * can be canceled during load. Note that XHR is not supported in IE 6 or earlier, and is not recommended for\n\t * cross-domain loading.\n\t * @class XHRRequest\n\t * @constructor\n\t * @param {Object} item The object that defines the file to load. Please see the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * for an overview of supported file properties.\n\t * @extends AbstractLoader\n\t */\n\tfunction XHRRequest (item) {\n\t\tthis.AbstractRequest_constructor(item);\n\n\t\t// protected properties\n\t\t/**\n\t\t * A reference to the XHR request used to load the content.\n\t\t * @property _request\n\t\t * @type {XMLHttpRequest | XDomainRequest | ActiveX.XMLHTTP}\n\t\t * @private\n\t\t */\n\t\tthis._request = null;\n\n\t\t/**\n\t\t * A manual load timeout that is used for browsers that do not support the onTimeout event on XHR (XHR level 1,\n\t\t * typically IE9).\n\t\t * @property _loadTimeout\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t\tthis._loadTimeout = null;\n\n\t\t/**\n\t\t * The browser's XHR (XMLHTTPRequest) version. Supported versions are 1 and 2. There is no official way to detect\n\t\t * the version, so we use capabilities to make a best guess.\n\t\t * @property _xhrLevel\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t * @private\n\t\t */\n\t\tthis._xhrLevel = 1;\n\n\t\t/**\n\t\t * The response of a loaded file. This is set because it is expensive to look up constantly. This property will be\n\t\t * null until the file is loaded.\n\t\t * @property _response\n\t\t * @type {mixed}\n\t\t * @private\n\t\t */\n\t\tthis._response = null;\n\n\t\t/**\n\t\t * The response of the loaded file before it is modified. In most cases, content is converted from raw text to\n\t\t * an HTML tag or a formatted object which is set to the <code>result</code> property, but the developer may still\n\t\t * want to access the raw content as it was loaded.\n\t\t * @property _rawResponse\n\t\t * @type {String|Object}\n\t\t * @private\n\t\t */\n\t\tthis._rawResponse = null;\n\n\t\tthis._canceled = false;\n\n\t\t// Setup our event handlers now.\n\t\tthis._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this);\n\t\tthis._handleProgressProxy = createjs.proxy(this._handleProgress, this);\n\t\tthis._handleAbortProxy = createjs.proxy(this._handleAbort, this);\n\t\tthis._handleErrorProxy = createjs.proxy(this._handleError, this);\n\t\tthis._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this);\n\t\tthis._handleLoadProxy = createjs.proxy(this._handleLoad, this);\n\t\tthis._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this);\n\n\t\tif (!this._createXHR(item)) {\n\t\t\t//TODO: Throw error?\n\t\t}\n\t};\n\n\tvar p = createjs.extend(XHRRequest, createjs.AbstractRequest);\n\n// static properties\n\t/**\n\t * A list of XMLHTTP object IDs to try when building an ActiveX object for XHR requests in earlier versions of IE.\n\t * @property ACTIVEX_VERSIONS\n\t * @type {Array}\n\t * @since 0.4.2\n\t * @private\n\t */\n\tXHRRequest.ACTIVEX_VERSIONS = [\n\t\t\"Msxml2.XMLHTTP.6.0\",\n\t\t\"Msxml2.XMLHTTP.5.0\",\n\t\t\"Msxml2.XMLHTTP.4.0\",\n\t\t\"MSXML2.XMLHTTP.3.0\",\n\t\t\"MSXML2.XMLHTTP\",\n\t\t\"Microsoft.XMLHTTP\"\n\t];\n\n// Public methods\n\t/**\n\t * Look up the loaded result.\n\t * @method getResult\n\t * @param {Boolean} [raw=false] Return a raw result instead of a formatted result. This applies to content\n\t * loaded via XHR such as scripts, XML, CSS, and Images. If there is no raw result, the formatted result will be\n\t * returned instead.\n\t * @return {Object} A result object containing the content that was loaded, such as:\n\t * <ul>\n\t *      <li>An image tag (&lt;image /&gt;) for images</li>\n\t *      <li>A script tag for JavaScript (&lt;script /&gt;). Note that scripts loaded with tags may be added to the\n\t *      HTML head.</li>\n\t *      <li>A style tag for CSS (&lt;style /&gt;)</li>\n\t *      <li>Raw text for TEXT</li>\n\t *      <li>A formatted JavaScript object defined by JSON</li>\n\t *      <li>An XML document</li>\n\t *      <li>An binary arraybuffer loaded by XHR</li>\n\t * </ul>\n\t * Note that if a raw result is requested, but not found, the result will be returned instead.\n\t */\n\tp.getResult = function (raw) {\n\t\tif (raw && this._rawResponse) {\n\t\t\treturn this._rawResponse;\n\t\t}\n\t\treturn this._response;\n\t};\n\n\t// Overrides abstract method in AbstractRequest\n\tp.cancel = function () {\n\t\tthis.canceled = true;\n\t\tthis._clean();\n\t\tthis._request.abort();\n\t};\n\n\t// Overrides abstract method in AbstractLoader\n\tp.load = function () {\n\t\tif (this._request == null) {\n\t\t\tthis._handleError();\n\t\t\treturn;\n\t\t}\n\n\t\t//Events\n\t\tif (this._request.addEventListener != null) {\n\t\t\tthis._request.addEventListener(\"loadstart\", this._handleLoadStartProxy, false);\n\t\t\tthis._request.addEventListener(\"progress\", this._handleProgressProxy, false);\n\t\t\tthis._request.addEventListener(\"abort\", this._handleAbortProxy, false);\n\t\t\tthis._request.addEventListener(\"error\", this._handleErrorProxy, false);\n\t\t\tthis._request.addEventListener(\"timeout\", this._handleTimeoutProxy, false);\n\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\n\t\t\tthis._request.addEventListener(\"load\", this._handleLoadProxy, false);\n\t\t\tthis._request.addEventListener(\"readystatechange\", this._handleReadyStateChangeProxy, false);\n\t\t} else {\n\t\t\t// IE9 support\n\t\t\tthis._request.onloadstart = this._handleLoadStartProxy;\n\t\t\tthis._request.onprogress = this._handleProgressProxy;\n\t\t\tthis._request.onabort = this._handleAbortProxy;\n\t\t\tthis._request.onerror = this._handleErrorProxy;\n\t\t\tthis._request.ontimeout = this._handleTimeoutProxy;\n\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\n\t\t\tthis._request.onload = this._handleLoadProxy;\n\t\t\tthis._request.onreadystatechange = this._handleReadyStateChangeProxy;\n\t\t}\n\n\t\t// Set up a timeout if we don't have XHR2\n\t\tif (this._xhrLevel == 1) {\n\t\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\t\t}\n\n\t\t// Sometimes we get back 404s immediately, particularly when there is a cross origin request.  // note this does not catch in Chrome\n\t\ttry {\n\t\t\tif (!this._item.values) {\n\t\t\t\tthis._request.send();\n\t\t\t} else {\n\t\t\t\tthis._request.send(createjs.URLUtils.formatQueryString(this._item.values));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_SEND\", null, error));\n\t\t}\n\t};\n\n\tp.setResponseType = function (type) {\n\t\t// Some old browsers doesn't support blob, so we convert arraybuffer to blob after response is downloaded\n\t\tif (type === 'blob') {\n\t\t\ttype = window.URL ? 'blob' : 'arraybuffer';\n\t\t\tthis._responseType = type;\n\t\t}\n\t\tthis._request.responseType = type;\n\t};\n\n\t/**\n\t * Get all the response headers from the XmlHttpRequest.\n\t *\n\t * <strong>From the docs:</strong> Return all the HTTP headers, excluding headers that are a case-insensitive match\n\t * for Set-Cookie or Set-Cookie2, as a single string, with each header line separated by a U+000D CR U+000A LF pair,\n\t * excluding the status line, and with each header name and header value separated by a U+003A COLON U+0020 SPACE\n\t * pair.\n\t * @method getAllResponseHeaders\n\t * @return {String}\n\t * @since 0.4.1\n\t */\n\tp.getAllResponseHeaders = function () {\n\t\tif (this._request.getAllResponseHeaders instanceof Function) {\n\t\t\treturn this._request.getAllResponseHeaders();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\t/**\n\t * Get a specific response header from the XmlHttpRequest.\n\t *\n\t * <strong>From the docs:</strong> Returns the header field value from the response of which the field name matches\n\t * header, unless the field name is Set-Cookie or Set-Cookie2.\n\t * @method getResponseHeader\n\t * @param {String} header The header name to retrieve.\n\t * @return {String}\n\t * @since 0.4.1\n\t */\n\tp.getResponseHeader = function (header) {\n\t\tif (this._request.getResponseHeader instanceof Function) {\n\t\t\treturn this._request.getResponseHeader(header);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n// protected methods\n\t/**\n\t * The XHR request has reported progress.\n\t * @method _handleProgress\n\t * @param {Object} event The XHR progress event.\n\t * @private\n\t */\n\tp._handleProgress = function (event) {\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\n\t\t}\n\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\t/**\n\t * The XHR request has reported a load start.\n\t * @method _handleLoadStart\n\t * @param {Object} event The XHR loadStart event.\n\t * @private\n\t */\n\tp._handleLoadStart = function (event) {\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis.dispatchEvent(\"loadstart\");\n\t};\n\n\t/**\n\t * The XHR request has reported an abort event.\n\t * @method handleAbort\n\t * @param {Object} event The XHR abort event.\n\t * @private\n\t */\n\tp._handleAbort = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_ABORTED\", null, event));\n\t};\n\n\t/**\n\t * The XHR request has reported an error event.\n\t * @method _handleError\n\t * @param {Object} event The XHR error event.\n\t * @private\n\t */\n\tp._handleError = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(event.message));\n\t};\n\n\t/**\n\t * The XHR request has reported a readyState change. Note that older browsers (IE 7 & 8) do not provide an onload\n\t * event, so we must monitor the readyStateChange to determine if the file is loaded.\n\t * @method _handleReadyStateChange\n\t * @param {Object} event The XHR readyStateChange event.\n\t * @private\n\t */\n\tp._handleReadyStateChange = function (event) {\n\t\tif (this._request.readyState == 4) {\n\t\t\tthis._handleLoad();\n\t\t}\n\t};\n\n\t/**\n\t * The XHR request has completed. This is called by the XHR request directly, or by a readyStateChange that has\n\t * <code>request.readyState == 4</code>. Only the first call to this method will be processed.\n\t *\n\t * Note that This method uses {{#crossLink \"_checkError\"}}{{/crossLink}} to determine if the server has returned an\n\t * error code.\n\t * @method _handleLoad\n\t * @param {Object} event The XHR load event.\n\t * @private\n\t */\n\tp._handleLoad = function (event) {\n\t\tif (this.loaded) {\n\t\t\treturn;\n\t\t}\n\t\tthis.loaded = true;\n\n\t\tvar error = this._checkError();\n\t\tif (error) {\n\t\t\tthis._handleError(error);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._response = this._getResponse();\n\t\t// Convert arraybuffer back to blob\n\t\tif (this._responseType === 'arraybuffer') {\n\t\t\ttry {\n\t\t\t\tthis._response = new Blob([this._response]);\n\t\t\t} catch (e) {\n\t\t\t\t// Fallback to use BlobBuilder if Blob constructor is not supported\n\t\t\t\t// Tested on Android 2.3 ~ 4.2 and iOS5 safari\n\t\t\t\twindow.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n\t\t\t\tif (e.name === 'TypeError' && window.BlobBuilder) {\n\t\t\t\t\tvar builder = new BlobBuilder();\n\t\t\t\t\tbuilder.append(this._response);\n\t\t\t\t\tthis._response = builder.getBlob();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._clean();\n\n\t\tthis.dispatchEvent(new createjs.Event(\"complete\"));\n\t};\n\n\t/**\n\t * The XHR request has timed out. This is called by the XHR request directly, or via a <code>setTimeout</code>\n\t * callback.\n\t * @method _handleTimeout\n\t * @param {Object} [event] The XHR timeout event. This is occasionally null when called by the backup setTimeout.\n\t * @private\n\t */\n\tp._handleTimeout = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_TIMEOUT\", null, event));\n\t};\n\n// Protected\n\t/**\n\t * Determine if there is an error in the current load.\n\t * Currently this checks the status of the request for problem codes, and not actual response content:\n\t * <ul>\n\t *     <li>Status codes between 400 and 599 (HTTP error range)</li>\n\t *     <li>A status of 0, but *only when the application is running on a server*. If the application is running\n\t *     on `file:`, then it may incorrectly treat an error on local (or embedded applications) as a successful\n\t *     load.</li>\n\t * </ul>\n\t * @method _checkError\n\t * @return {Error} An error with the status code in the `message` argument.\n\t * @private\n\t */\n\tp._checkError = function () {\n\t\tvar status = parseInt(this._request.status);\n\t\tif (status >= 400 && status <= 599) {\n\t\t\treturn new Error(status);\n\t\t} else if (status == 0) {\n\t\t\tif ((/^https?:/).test(location.protocol)) { return new Error(0); }\n\t\t\treturn null; // Likely an embedded app.\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\n\t/**\n\t * Validate the response. Different browsers have different approaches, some of which throw errors when accessed\n\t * in other browsers. If there is no response, the <code>_response</code> property will remain null.\n\t * @method _getResponse\n\t * @private\n\t */\n\tp._getResponse = function () {\n\t\tif (this._response != null) {\n\t\t\treturn this._response;\n\t\t}\n\n\t\tif (this._request.response != null) {\n\t\t\treturn this._request.response;\n\t\t}\n\n\t\t// Android 2.2 uses .responseText\n\t\ttry {\n\t\t\tif (this._request.responseText != null) {\n\t\t\t\treturn this._request.responseText;\n\t\t\t}\n\t\t} catch (e) {\n\t\t}\n\n\t\t// When loading XML, IE9 does not return .response, instead it returns responseXML.xml\n\t\ttry {\n\t\t\tif (this._request.responseXML != null) {\n\t\t\t\treturn this._request.responseXML;\n\t\t\t}\n\t\t} catch (e) {\n\t\t}\n\n\t\treturn null;\n\t};\n\n\t/**\n\t * Create an XHR request. Depending on a number of factors, we get totally different results.\n\t * <ol><li>Some browsers get an <code>XDomainRequest</code> when loading cross-domain.</li>\n\t *      <li>XMLHttpRequest are created when available.</li>\n\t *      <li>ActiveX.XMLHTTP objects are used in older IE browsers.</li>\n\t *      <li>Text requests override the mime type if possible</li>\n\t *      <li>Origin headers are sent for crossdomain requests in some browsers.</li>\n\t *      <li>Binary loads set the response type to \"arraybuffer\"</li></ol>\n\t * @method _createXHR\n\t * @param {Object} item The requested item that is being loaded.\n\t * @return {Boolean} If an XHR request or equivalent was successfully created.\n\t * @private\n\t */\n\tp._createXHR = function (item) {\n\t\t// Check for cross-domain loads. We can't fully support them, but we can try.\n\t\tvar crossdomain = createjs.URLUtils.isCrossDomain(item);\n\t\tvar headers = {};\n\n\t\t// Create the request. Fallback to whatever support we have.\n\t\tvar req = null;\n\t\tif (window.XMLHttpRequest) {\n\t\t\treq = new XMLHttpRequest();\n\t\t\t// This is 8 or 9, so use XDomainRequest instead.\n\t\t\tif (crossdomain && req.withCredentials === undefined && window.XDomainRequest) {\n\t\t\t\treq = new XDomainRequest();\n\t\t\t}\n\t\t} else { // Old IE versions use a different approach\n\t\t\tfor (var i = 0, l = s.ACTIVEX_VERSIONS.length; i < l; i++) {\n\t\t\t\tvar axVersion = s.ACTIVEX_VERSIONS[i];\n\t\t\t\ttry {\n\t\t\t\t\treq = new ActiveXObject(axVersion);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (req == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Default to utf-8 for Text requests.\n\t\tif (item.mimeType == null && createjs.RequestUtils.isText(item.type)) {\n\t\t\titem.mimeType = \"text/plain; charset=utf-8\";\n\t\t}\n\n\t\t// IE9 doesn't support overrideMimeType(), so we need to check for it.\n\t\tif (item.mimeType && req.overrideMimeType) {\n\t\t\treq.overrideMimeType(item.mimeType);\n\t\t}\n\n\t\t// Determine the XHR level\n\t\tthis._xhrLevel = (typeof req.responseType === \"string\") ? 2 : 1;\n\n\t\tvar src = null;\n\t\tif (item.method == createjs.Methods.GET) {\n\t\t\tsrc = createjs.URLUtils.buildURI(item.src, item.values);\n\t\t} else {\n\t\t\tsrc = item.src;\n\t\t}\n\n\t\t// Open the request.  Set cross-domain flags if it is supported (XHR level 1 only)\n\t\treq.open(item.method || createjs.Methods.GET, src, true);\n\n\t\tif (crossdomain && req instanceof XMLHttpRequest && this._xhrLevel == 1) {\n\t\t\theaders[\"Origin\"] = location.origin;\n\t\t}\n\n\t\t// To send data we need to set the Content-type header)\n\t\tif (item.values && item.method == createjs.Methods.POST) {\n\t\t\theaders[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n\t\t}\n\n\t\tif (!crossdomain && !headers[\"X-Requested-With\"]) {\n\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t}\n\n\t\tif (item.headers) {\n\t\t\tfor (var n in item.headers) {\n\t\t\t\theaders[n] = item.headers[n];\n\t\t\t}\n\t\t}\n\n\t\tfor (n in headers) {\n\t\t\treq.setRequestHeader(n, headers[n])\n\t\t}\n\n\t\tif (req instanceof XMLHttpRequest && item.withCredentials !== undefined) {\n\t\t\treq.withCredentials = item.withCredentials;\n\t\t}\n\n\t\tthis._request = req;\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * A request has completed (or failed or canceled), and needs to be disposed.\n\t * @method _clean\n\t * @private\n\t */\n\tp._clean = function () {\n\t\tclearTimeout(this._loadTimeout);\n\n\t\tif (this._request.removeEventListener != null) {\n\t\t\tthis._request.removeEventListener(\"loadstart\", this._handleLoadStartProxy);\n\t\t\tthis._request.removeEventListener(\"progress\", this._handleProgressProxy);\n\t\t\tthis._request.removeEventListener(\"abort\", this._handleAbortProxy);\n\t\t\tthis._request.removeEventListener(\"error\", this._handleErrorProxy);\n\t\t\tthis._request.removeEventListener(\"timeout\", this._handleTimeoutProxy);\n\t\t\tthis._request.removeEventListener(\"load\", this._handleLoadProxy);\n\t\t\tthis._request.removeEventListener(\"readystatechange\", this._handleReadyStateChangeProxy);\n\t\t} else {\n\t\t\tthis._request.onloadstart = null;\n\t\t\tthis._request.onprogress = null;\n\t\t\tthis._request.onabort = null;\n\t\t\tthis._request.onerror = null;\n\t\t\tthis._request.ontimeout = null;\n\t\t\tthis._request.onload = null;\n\t\t\tthis._request.onreadystatechange = null;\n\t\t}\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[PreloadJS XHRRequest]\";\n\t};\n\n\tcreatejs.XHRRequest = createjs.promote(XHRRequest, \"AbstractRequest\");\n\n}());\n\n//##############################################################################\n// LoadQueue.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n/*\n TODO: WINDOWS ISSUES\n * No error for HTML audio in IE 678\n * SVG no failure error in IE 67 (maybe 8) TAGS AND XHR\n * No script complete handler in IE 67 TAGS (XHR is fine)\n * No XML/JSON in IE6 TAGS\n * Need to hide loading SVG in Opera TAGS\n * No CSS onload/readystatechange in Safari or Android TAGS (requires rule checking)\n * SVG no load or failure in Opera XHR\n * Reported issues with IE7/8\n */\n\n(function () {\n\t\"use strict\";\n\n// constructor\n\t/**\n\t * The LoadQueue class is the main API for preloading content. LoadQueue is a load manager, which can preload either\n\t * a single file, or queue of files.\n\t *\n\t * <b>Creating a Queue</b><br />\n\t * To use LoadQueue, create a LoadQueue instance. If you want to force tag loading where possible, set the preferXHR\n\t * argument to false.\n\t *\n\t *      var queue = new createjs.LoadQueue(true);\n\t *\n\t * <b>Listening for Events</b><br />\n\t * Add any listeners you want to the queue. Since PreloadJS 0.3.0, the {{#crossLink \"EventDispatcher\"}}{{/crossLink}}\n\t * lets you add as many listeners as you want for events. You can subscribe to the following events:<ul>\n\t *     <li>{{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}: fired when a queue completes loading all\n\t *     files</li>\n\t *     <li>{{#crossLink \"AbstractLoader/error:event\"}}{{/crossLink}}: fired when the queue encounters an error with\n\t *     any file.</li>\n\t *     <li>{{#crossLink \"AbstractLoader/progress:event\"}}{{/crossLink}}: Progress for the entire queue has\n\t *     changed.</li>\n\t *     <li>{{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}: A single file has completed loading.</li>\n\t *     <li>{{#crossLink \"LoadQueue/fileprogress:event\"}}{{/crossLink}}: Progress for a single file has changes. Note\n\t *     that only files loaded with XHR (or possibly by plugins) will fire progress events other than 0 or 100%.</li>\n\t * </ul>\n\t *\n\t *      queue.on(\"fileload\", handleFileLoad, this);\n\t *      queue.on(\"complete\", handleComplete, this);\n\t *\n\t * <b>Adding files and manifests</b><br />\n\t * Add files you want to load using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or add multiple files at a\n\t * time using a list or a manifest definition using {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. Files are\n\t * appended to the end of the active queue, so you can use these methods as many times as you like, whenever you\n\t * like.\n\t *\n\t *      queue.loadFile(\"filePath/file.jpg\");\n\t *      queue.loadFile({id:\"image\", src:\"filePath/file.jpg\"});\n\t *      queue.loadManifest([\"filePath/file.jpg\", {id:\"image\", src:\"filePath/file.jpg\"}]);\n\t *\n\t *      // Use an external manifest\n\t *      queue.loadManifest(\"path/to/manifest.json\");\n\t *      queue.loadManifest({src:\"manifest.json\", type:\"manifest\"});\n\t *\n\t * If you pass `false` as the `loadNow` parameter, the queue will not kick of the load of the files, but it will not\n\t * stop if it has already been started. Call the {{#crossLink \"AbstractLoader/load\"}}{{/crossLink}} method to begin\n\t * a paused queue. Note that a paused queue will automatically resume when new files are added to it with a\n\t * `loadNow` argument of `true`.\n\t *\n\t *      queue.load();\n\t *\n\t * <b>File Types</b><br />\n\t * The file type of a manifest item is auto-determined by the file extension. The pattern matching in PreloadJS\n\t * should handle the majority of standard file and url formats, and works with common file extensions. If you have\n\t * either a non-standard file extension, or are serving the file using a proxy script, then you can pass in a\n\t * <code>type</code> property with any manifest item.\n\t *\n\t *      queue.loadFile({src:\"path/to/myFile.mp3x\", type:createjs.Types.SOUND});\n\t *\n\t *      // Note that PreloadJS will not read a file extension from the query string\n\t *      queue.loadFile({src:\"http://server.com/proxy?file=image.jpg\", type:createjs.Types.IMAGE});\n\t *\n\t * Supported types are defined on the {{#crossLink \"AbstractLoader\"}}{{/crossLink}} class, and include:\n\t * <ul>\n\t *     <li>{{#crossLink \"Types/BINARY:property\"}}{{/crossLink}}: Raw binary data via XHR</li>\n\t *     <li>{{#crossLink \"Types/CSS:property\"}}{{/crossLink}}: CSS files</li>\n\t *     <li>{{#crossLink \"Types/IMAGE:property\"}}{{/crossLink}}: Common image formats</li>\n\t *     <li>{{#crossLink \"Types/JAVASCRIPT:property\"}}{{/crossLink}}: JavaScript files</li>\n\t *     <li>{{#crossLink \"Types/JSON:property\"}}{{/crossLink}}: JSON data</li>\n\t *     <li>{{#crossLink \"Types/JSONP:property\"}}{{/crossLink}}: JSON files cross-domain</li>\n\t *     <li>{{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}: A list of files to load in JSON format, see\n\t *     {{#crossLink \"AbstractLoader/loadManifest\"}}{{/crossLink}}</li>\n\t *     <li>{{#crossLink \"Types/SOUND:property\"}}{{/crossLink}}: Audio file formats</li>\n\t *     <li>{{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}: JSON SpriteSheet definitions. This\n\t *     will also load sub-images, and provide a {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance.</li>\n\t *     <li>{{#crossLink \"Types/SVG:property\"}}{{/crossLink}}: SVG files</li>\n\t *     <li>{{#crossLink \"Types/TEXT:property\"}}{{/crossLink}}: Text files - XHR only</li>\n     *     <li>{{#crossLink \"Types/VIDEO:property\"}}{{/crossLink}}: Video objects</li>\n\t *     <li>{{#crossLink \"Types/XML:property\"}}{{/crossLink}}: XML data</li>\n\t * </ul>\n\t *\n\t * <em>Note: Loader types used to be defined on LoadQueue, but have been moved to the Types class</em>\n\t *\n\t * <b>Handling Results</b><br />\n\t * When a file is finished downloading, a {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event is\n\t * dispatched. In an example above, there is an event listener snippet for fileload. Loaded files are usually a\n\t * formatted object that can be used immediately, including:\n\t * <ul>\n\t *     <li>Binary: The binary loaded result</li>\n\t *     <li>CSS: A &lt;link /&gt; tag</li>\n\t *     <li>Image: An &lt;img /&gt; tag</li>\n\t *     <li>JavaScript: A &lt;script /&gt; tag</li>\n\t *     <li>JSON/JSONP: A formatted JavaScript Object</li>\n\t *     <li>Manifest: A JavaScript object.\n\t *     <li>Sound: An &lt;audio /&gt; tag</a>\n\t *     <li>SpriteSheet: A {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance, containing loaded images.\n\t *     <li>SVG: An &lt;object /&gt; tag</li>\n\t *     <li>Text: Raw text</li>\n     *     <li>Video: A Video DOM node</li>\n\t *     <li>XML: An XML DOM node</li>\n\t * </ul>\n\t *\n\t *      function handleFileLoad(event) {\n\t *          var item = event.item; // A reference to the item that was passed in to the LoadQueue\n\t *          var type = item.type;\n\t *\n\t *          // Add any images to the page body.\n\t *          if (type == createjs.Types.IMAGE) {\n\t *              document.body.appendChild(event.result);\n\t *          }\n\t *      }\n\t *\n\t * At any time after the file has been loaded (usually after the queue has completed), any result can be looked up\n\t * via its \"id\" using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}. If no id was provided, then the\n\t * \"src\" or file path can be used instead, including the `path` defined by a manifest, but <strong>not including</strong>\n\t * a base path defined on the LoadQueue. It is recommended to always pass an id if you want to look up content.\n\t *\n\t *      var image = queue.getResult(\"image\");\n\t *      document.body.appendChild(image);\n\t *\n\t * Raw loaded content can be accessed using the <code>rawResult</code> property of the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}\n\t * event, or can be looked up using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}, passing `true` as the 2nd\n\t * argument. This is only applicable for content that has been parsed for the browser, specifically: JavaScript,\n\t * CSS, XML, SVG, and JSON objects, or anything loaded with XHR.\n\t *\n\t *      var image = queue.getResult(\"image\", true); // load the binary image data loaded with XHR.\n\t *\n\t * <b>Plugins</b><br />\n\t * LoadQueue has a simple plugin architecture to help process and preload content. For example, to preload audio,\n\t * make sure to install the <a href=\"http://soundjs.com\">SoundJS</a> Sound class, which will help load HTML audio,\n\t * Flash audio, and WebAudio files. This should be installed <strong>before</strong> loading any audio files.\n\t *\n\t *      queue.installPlugin(createjs.Sound);\n\t *\n\t * <h4>Known Browser Issues</h4>\n\t * <ul>\n\t *     <li>Browsers without audio support can not load audio files.</li>\n\t *     <li>Safari on Mac OS X can only play HTML audio if QuickTime is installed</li>\n\t *     <li>HTML Audio tags will only download until their <code>canPlayThrough</code> event is fired. Browsers other\n\t *     than Chrome will continue to download in the background.</li>\n\t *     <li>When loading scripts using tags, they are automatically added to the document.</li>\n\t *     <li>Scripts loaded via XHR may not be properly inspectable with browser tools.</li>\n\t *     <li>IE6 and IE7 (and some other browsers) may not be able to load XML, Text, or JSON, since they require\n\t *     XHR to work.</li>\n\t *     <li>Content loaded via tags will not show progress, and will continue to download in the background when\n\t *     canceled, although no events will be dispatched.</li>\n\t * </ul>\n\t *\n\t * @class LoadQueue\n\t * @param {Boolean} [preferXHR=true] Determines whether the preload instance will favor loading with XHR (XML HTTP\n\t * Requests), or HTML tags. When this is `false`, the queue will use tag loading when possible, and fall back on XHR\n\t * when necessary.\n\t * @param {String} [basePath=\"\"] A path that will be prepended on to the source parameter of all items in the queue\n\t * before they are loaded.  Sources beginning with a protocol such as `http://` or a relative path such as `../`\n\t * will not receive a base path.\n\t * @param {String|Boolean} [crossOrigin=\"\"] An optional flag to support images loaded from a CORS-enabled server. To\n\t * use it, set this value to `true`, which will default the crossOrigin property on images to \"Anonymous\". Any\n\t * string value will be passed through, but only \"\" and \"Anonymous\" are recommended. <strong>Note: The crossOrigin\n\t * parameter is deprecated. Use LoadItem.crossOrigin instead</strong>\n\t *\n\t * @constructor\n\t * @extends AbstractLoader\n\t */\n\tfunction LoadQueue (preferXHR, basePath, crossOrigin) {\n\t\tthis.AbstractLoader_constructor();\n\n\t\t/**\n\t\t * An array of the plugins registered using {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}.\n\t\t * @property _plugins\n\t\t * @type {Array}\n\t\t * @private\n\t\t * @since 0.6.1\n\t\t */\n\t\tthis._plugins = [];\n\n\t\t/**\n\t\t * An object hash of callbacks that are fired for each file type before the file is loaded, giving plugins the\n\t\t * ability to override properties of the load. Please see the {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}\n\t\t * method for more information.\n\t\t * @property _typeCallbacks\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._typeCallbacks = {};\n\n\t\t/**\n\t\t * An object hash of callbacks that are fired for each file extension before the file is loaded, giving plugins the\n\t\t * ability to override properties of the load. Please see the {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}\n\t\t * method for more information.\n\t\t * @property _extensionCallbacks\n\t\t * @type {null}\n\t\t * @private\n\t\t */\n\t\tthis._extensionCallbacks = {};\n\n\t\t/**\n\t\t * The next preload queue to process when this one is complete. If an error is thrown in the current queue, and\n\t\t * {{#crossLink \"LoadQueue/stopOnError:property\"}}{{/crossLink}} is `true`, the next queue will not be processed.\n\t\t * @property next\n\t\t * @type {LoadQueue}\n\t\t * @default null\n\t\t */\n\t\tthis.next = null;\n\n\t\t/**\n\t\t * Ensure loaded scripts \"complete\" in the order they are specified. Loaded scripts are added to the document head\n\t\t * once they are loaded. Scripts loaded via tags will load one-at-a-time when this property is `true`, whereas\n\t\t * scripts loaded using XHR can load in any order, but will \"finish\" and be added to the document in the order\n\t\t * specified.\n\t\t *\n\t\t * Any items can be set to load in order by setting the {{#crossLink \"maintainOrder:property\"}}{{/crossLink}}\n\t\t * property on the load item, or by ensuring that only one connection can be open at a time using\n\t\t * {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}. Note that when the `maintainScriptOrder` property\n\t\t * is set to `true`, scripts items are automatically set to `maintainOrder=true`, and changing the\n\t\t * `maintainScriptOrder` to `false` during a load will not change items already in a queue.\n\t\t *\n\t\t * <h4>Example</h4>\n\t\t *\n\t\t *      var queue = new createjs.LoadQueue();\n\t\t *      queue.setMaxConnections(3); // Set a higher number to load multiple items at once\n\t\t *      queue.maintainScriptOrder = true; // Ensure scripts are loaded in order\n\t\t *      queue.loadManifest([\n\t\t *          \"script1.js\",\n\t\t *          \"script2.js\",\n\t\t *          \"image.png\", // Load any time\n\t\t *          {src: \"image2.png\", maintainOrder: true} // Will wait for script2.js\n\t\t *          \"image3.png\",\n\t\t *          \"script3.js\" // Will wait for image2.png before loading (or completing when loading with XHR)\n\t\t *      ]);\n\t\t *\n\t\t * @property maintainScriptOrder\n\t\t * @type {Boolean}\n\t\t * @default true\n\t\t */\n\t\tthis.maintainScriptOrder = true;\n\n\t\t/**\n\t\t * Determines if the LoadQueue will stop processing the current queue when an error is encountered.\n\t\t * @property stopOnError\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.stopOnError = false;\n\n\t\t/**\n\t\t * The number of maximum open connections that a loadQueue tries to maintain. Please see\n\t\t * {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}} for more information.\n\t\t * @property _maxConnections\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t * @private\n\t\t */\n\t\tthis._maxConnections = 1;\n\n\t\t/**\n\t\t * An internal list of all the default Loaders that are included with PreloadJS. Before an item is loaded, the\n\t\t * available loader list is iterated, in the order they are included, and as soon as a loader indicates it can\n\t\t * handle the content, it will be selected. The default loader, ({{#crossLink \"TextLoader\"}}{{/crossLink}} is\n\t\t * last in the list, so it will be used if no other match is found. Typically, loaders will match based on the\n\t\t * {{#crossLink \"LoadItem/type\"}}{{/crossLink}}, which is automatically determined using the file extension of\n\t\t * the {{#crossLink \"LoadItem/src:property\"}}{{/crossLink}}.\n\t\t *\n\t\t * Loaders can be removed from PreloadJS by simply not including them.\n\t\t *\n\t\t * Custom loaders installed using {{#crossLink \"registerLoader\"}}{{/crossLink}} will be prepended to this list\n\t\t * so that they are checked first.\n\t\t * @property _availableLoaders\n\t\t * @type {Array}\n\t\t * @private\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._availableLoaders = [\n            createjs.FontLoader,\n\t\t\tcreatejs.ImageLoader,\n\t\t\tcreatejs.JavaScriptLoader,\n\t\t\tcreatejs.CSSLoader,\n\t\t\tcreatejs.JSONLoader,\n\t\t\tcreatejs.JSONPLoader,\n\t\t\tcreatejs.SoundLoader,\n\t\t\tcreatejs.ManifestLoader,\n\t\t\tcreatejs.SpriteSheetLoader,\n\t\t\tcreatejs.XMLLoader,\n\t\t\tcreatejs.SVGLoader,\n\t\t\tcreatejs.BinaryLoader,\n\t\t\tcreatejs.VideoLoader,\n\t\t\tcreatejs.TextLoader\n\t\t];\n\n\t\t/**\n\t\t * The number of built in loaders, so they can't be removed by {{#crossLink \"unregisterLoader\"}}{{/crossLink}.\n\t\t\t\t * @property _defaultLoaderLength\n\t\t * @type {Number}\n\t\t * @private\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._defaultLoaderLength = this._availableLoaders.length;\n\n\t\tthis.init(preferXHR, basePath, crossOrigin);\n\t}\n\n\tvar p = createjs.extend(LoadQueue, createjs.AbstractLoader);\n\tvar s = LoadQueue;\n\n\t// Remove these @deprecated properties after 1.0\n\ttry {\n\t\tObject.defineProperties(s, {\n\t\t\tPOST: { get: createjs.deprecate(function() { return createjs.Methods.POST; }, \"AbstractLoader.POST\") },\n\t\t\tGET: { get: createjs.deprecate(function() { return createjs.Methods.GET; }, \"AbstractLoader.GET\") },\n\n\t\t\tBINARY: { get: createjs.deprecate(function() { return createjs.Types.BINARY; }, \"AbstractLoader.BINARY\") },\n\t\t\tCSS: { get: createjs.deprecate(function() { return createjs.Types.CSS; }, \"AbstractLoader.CSS\") },\n\t\t\tFONT: { get: createjs.deprecate(function() { return createjs.Types.FONT; }, \"AbstractLoader.FONT\") },\n\t\t\tFONTCSS: { get: createjs.deprecate(function() { return createjs.Types.FONTCSS; }, \"AbstractLoader.FONTCSS\") },\n\t\t\tIMAGE: { get: createjs.deprecate(function() { return createjs.Types.IMAGE; }, \"AbstractLoader.IMAGE\") },\n\t\t\tJAVASCRIPT: { get: createjs.deprecate(function() { return createjs.Types.JAVASCRIPT; }, \"AbstractLoader.JAVASCRIPT\") },\n\t\t\tJSON: { get: createjs.deprecate(function() { return createjs.Types.JSON; }, \"AbstractLoader.JSON\") },\n\t\t\tJSONP: { get: createjs.deprecate(function() { return createjs.Types.JSONP; }, \"AbstractLoader.JSONP\") },\n\t\t\tMANIFEST: { get: createjs.deprecate(function() { return createjs.Types.MANIFEST; }, \"AbstractLoader.MANIFEST\") },\n\t\t\tSOUND: { get: createjs.deprecate(function() { return createjs.Types.SOUND; }, \"AbstractLoader.SOUND\") },\n\t\t\tVIDEO: { get: createjs.deprecate(function() { return createjs.Types.VIDEO; }, \"AbstractLoader.VIDEO\") },\n\t\t\tSPRITESHEET: { get: createjs.deprecate(function() { return createjs.Types.SPRITESHEET; }, \"AbstractLoader.SPRITESHEET\") },\n\t\t\tSVG: { get: createjs.deprecate(function() { return createjs.Types.SVG; }, \"AbstractLoader.SVG\") },\n\t\t\tTEXT: { get: createjs.deprecate(function() { return createjs.Types.TEXT; }, \"AbstractLoader.TEXT\") },\n\t\t\tXML: { get: createjs.deprecate(function() { return createjs.Types.XML; }, \"AbstractLoader.XML\") }\n\t\t});\n\t} catch (e) {}\n\n\t/**\n\t * An internal initialization method, which is used for initial set up, but also to reset the LoadQueue.\n\t * @method init\n\t * @param preferXHR\n\t * @param basePath\n\t * @param crossOrigin\n\t * @private\n\t */\n\tp.init = function (preferXHR, basePath, crossOrigin) {\n\n\t\t// public properties\n\n\t\t/**\n\t\t * Try and use XMLHttpRequest (XHR) when possible. Note that LoadQueue will default to tag loading or XHR\n\t\t * loading depending on the requirements for a media type. For example, HTML audio can not be loaded with XHR,\n\t\t * and plain text can not be loaded with tags, so it will default the the correct type instead of using the\n\t\t * user-defined type.\n\t\t * @type {Boolean}\n\t\t * @default true\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis.preferXHR = true; //TODO: Get/Set\n\t\tthis._preferXHR = true;\n\t\tthis.setPreferXHR(preferXHR);\n\n\t\t// protected properties\n\t\t/**\n\t\t * Whether the queue is currently paused or not.\n\t\t * @property _paused\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._paused = false;\n\n\t\t/**\n\t\t * A path that will be prepended on to the item's {{#crossLink \"LoadItem/src:property\"}}{{/crossLink}}. The\n\t\t * `_basePath` property will only be used if an item's source is relative, and does not include a protocol such\n\t\t * as `http://`, or a relative path such as `../`.\n\t\t * @property _basePath\n\t\t * @type {String}\n\t\t * @private\n\t\t * @since 0.3.1\n\t\t */\n\t\tthis._basePath = basePath;\n\n\t\t/**\n\t\t * An optional flag to set on images that are loaded using PreloadJS, which enables CORS support. Images loaded\n\t\t * cross-domain by servers that support CORS require the crossOrigin flag to be loaded and interacted with by\n\t\t * a canvas. When loading locally, or with a server with no CORS support, this flag can cause other security issues,\n\t\t * so it is recommended to only set it if you are sure the server supports it. Currently, supported values are \"\"\n\t\t * and \"Anonymous\".\n\t\t * @property _crossOrigin\n\t\t * @type {String}\n\t\t * @default \"\"\n\t\t * @private\n\t\t * @since 0.4.1\n\t\t */\n\t\tthis._crossOrigin = crossOrigin;\n\n\t\t/**\n\t\t * Determines if the loadStart event was dispatched already. This event is only fired one time, when the first\n\t\t * file is requested.\n\t\t * @property _loadStartWasDispatched\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @private\n\t\t */\n\t\tthis._loadStartWasDispatched = false;\n\n\t\t/**\n\t\t * Determines if there is currently a script loading. This helps ensure that only a single script loads at once when\n\t\t * using a script tag to do preloading.\n\t\t * @property _currentlyLoadingScript\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t\tthis._currentlyLoadingScript = null;\n\n\t\t/**\n\t\t * An array containing the currently downloading files.\n\t\t * @property _currentLoads\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._currentLoads = [];\n\n\t\t/**\n\t\t * An array containing the queued items that have not yet started downloading.\n\t\t * @property _loadQueue\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._loadQueue = [];\n\n\t\t/**\n\t\t * An array containing downloads that have not completed, so that the LoadQueue can be properly reset.\n\t\t * @property _loadQueueBackup\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._loadQueueBackup = [];\n\n\t\t/**\n\t\t * An object hash of items that have finished downloading, indexed by the {{#crossLink \"LoadItem\"}}{{/crossLink}}\n\t\t * id.\n\t\t * @property _loadItemsById\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._loadItemsById = {};\n\n\t\t/**\n\t\t * An object hash of items that have finished downloading, indexed by {{#crossLink \"LoadItem\"}}{{/crossLink}}\n\t\t * source.\n\t\t * @property _loadItemsBySrc\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._loadItemsBySrc = {};\n\n\t\t/**\n\t\t * An object hash of loaded items, indexed by the ID of the {{#crossLink \"LoadItem\"}}{{/crossLink}}.\n\t\t * @property _loadedResults\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._loadedResults = {};\n\n\t\t/**\n\t\t * An object hash of un-parsed loaded items, indexed by the ID of the {{#crossLink \"LoadItem\"}}{{/crossLink}}.\n\t\t * @property _loadedRawResults\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._loadedRawResults = {};\n\n\t\t/**\n\t\t * The number of items that have been requested. This helps manage an overall progress without knowing how large\n\t\t * the files are before they are downloaded. This does not include items inside of loaders such as the\n\t\t * {{#crossLink \"ManifestLoader\"}}{{/crossLink}}.\n\t\t * @property _numItems\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @private\n\t\t */\n\t\tthis._numItems = 0;\n\n\t\t/**\n\t\t * The number of items that have completed loaded. This helps manage an overall progress without knowing how large\n\t\t * the files are before they are downloaded.\n\t\t * @property _numItemsLoaded\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @private\n\t\t */\n\t\tthis._numItemsLoaded = 0;\n\n\t\t/**\n\t\t * A list of scripts in the order they were requested. This helps ensure that scripts are \"completed\" in the right\n\t\t * order.\n\t\t * @property _scriptOrder\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._scriptOrder = [];\n\n\t\t/**\n\t\t * A list of scripts that have been loaded. Items are added to this list as <code>null</code> when they are\n\t\t * requested, contain the loaded item if it has completed, but not been dispatched to the user, and <code>true</true>\n\t\t * once they are complete and have been dispatched.\n\t\t * @property _loadedScripts\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._loadedScripts = [];\n\n\t\t/**\n\t\t * The last progress amount. This is used to suppress duplicate progress events.\n\t\t * @property _lastProgress\n\t\t * @type {Number}\n\t\t * @private\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._lastProgress = NaN;\n\n\t};\n\n// static properties\n\n// events\n\t/**\n\t * This event is fired when an individual file has loaded, and been processed.\n\t * @event fileload\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\n\t * object will contain that value as a `src` property.\n\t * @param {Object} result The HTML tag or parsed result of the loaded item.\n\t * @param {Object} rawResult The unprocessed result, usually the raw text or binary data before it is converted\n\t * to a usable object.\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * This {{#crossLink \"ProgressEvent\"}}{{/crossLink}} that is fired when an an individual file's progress changes.\n\t * @event fileprogress\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * This event is fired when an individual file starts to load.\n\t * @event filestart\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\n\t * object will contain that value as a property.\n\t */\n\n\t/**\n\t * Although it extends {{#crossLink \"AbstractLoader\"}}{{/crossLink}}, the `initialize` event is never fired from\n\t * a LoadQueue instance.\n\t * @event initialize\n\t * @private\n\t */\n\n// public methods\n\t/**\n\t * Register a custom loaders class. New loaders are given precedence over loaders added earlier and default loaders.\n\t * It is recommended that loaders extend {{#crossLink \"AbstractLoader\"}}{{/crossLink}}. Loaders can only be added\n\t * once, and will be prepended to the list of available loaders.\n\t * @method registerLoader\n\t * @param {Function|AbstractLoader} loader The AbstractLoader class to add.\n\t * @since 0.6.0\n\t */\n\tp.registerLoader = function (loader) {\n\t\tif (!loader || !loader.canLoadItem) {\n\t\t\tthrow new Error(\"loader is of an incorrect type.\");\n\t\t} else if (this._availableLoaders.indexOf(loader) != -1) {\n\t\t\tthrow new Error(\"loader already exists.\"); //LM: Maybe just silently fail here\n\t\t}\n\n\t\tthis._availableLoaders.unshift(loader);\n\t};\n\n\t/**\n\t * Remove a custom loader added using {{#crossLink \"registerLoader\"}}{{/crossLink}}. Only custom loaders can be\n\t * unregistered, the default loaders will always be available.\n\t * @method unregisterLoader\n\t * @param {Function|AbstractLoader} loader The AbstractLoader class to remove\n\t */\n\tp.unregisterLoader = function (loader) {\n\t\tvar idx = this._availableLoaders.indexOf(loader);\n\t\tif (idx != -1 && idx < this._defaultLoaderLength - 1) {\n\t\t\tthis._availableLoaders.splice(idx, 1);\n\t\t}\n\t};\n\n\t/**\n\t * Change the {{#crossLink \"preferXHR:property\"}}{{/crossLink}} value. Note that if this is set to `true`, it may\n\t * fail, or be ignored depending on the browser's capabilities and the load type.\n\t * @method setPreferXHR\n\t * @param {Boolean} value\n\t * @returns {Boolean} The value of {{#crossLink \"preferXHR\"}}{{/crossLink}} that was successfully set.\n\t * @since 0.6.0\n\t */\n\tp.setPreferXHR = function (value) {\n\t\t// Determine if we can use XHR. XHR defaults to TRUE, but the browser may not support it.\n\t\t//TODO: Should we be checking for the other XHR types? Might have to do a try/catch on the different types similar to createXHR.\n\t\tthis.preferXHR = (value != false && window.XMLHttpRequest != null);\n\t\treturn this.preferXHR;\n\t};\n\n\t/**\n\t * Stops all queued and loading items, and clears the queue. This also removes all internal references to loaded\n\t * content, and allows the queue to be used again.\n\t * @method removeAll\n\t * @since 0.3.0\n\t */\n\tp.removeAll = function () {\n\t\tthis.remove();\n\t};\n\n\t/**\n\t * Stops an item from being loaded, and removes it from the queue. If nothing is passed, all items are removed.\n\t * This also removes internal references to loaded item(s).\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      queue.loadManifest([\n\t *          {src:\"test.png\", id:\"png\"},\n\t *          {src:\"test.jpg\", id:\"jpg\"},\n\t *          {src:\"test.mp3\", id:\"mp3\"}\n\t *      ]);\n\t *      queue.remove(\"png\"); // Single item by ID\n\t *      queue.remove(\"png\", \"test.jpg\"); // Items as arguments. Mixed id and src.\n\t *      queue.remove([\"test.png\", \"jpg\"]); // Items in an Array. Mixed id and src.\n\t *\n\t * @method remove\n\t * @param {String | Array} idsOrUrls* The id or ids to remove from this queue. You can pass an item, an array of\n\t * items, or multiple items as arguments.\n\t * @since 0.3.0\n\t */\n\tp.remove = function (idsOrUrls) {\n\t\tvar args = null;\n\n\t\tif (idsOrUrls && !Array.isArray(idsOrUrls)) {\n\t\t\targs = [idsOrUrls];\n\t\t} else if (idsOrUrls) {\n\t\t\targs = idsOrUrls;\n\t\t} else if (arguments.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar itemsWereRemoved = false;\n\n\t\t// Destroy everything\n\t\tif (!args) {\n\t\t\tthis.close();\n\t\t\tfor (var n in this._loadItemsById) {\n\t\t\t\tthis._disposeItem(this._loadItemsById[n]);\n\t\t\t}\n\t\t\tthis.init(this.preferXHR, this._basePath);\n\n\t\t\t// Remove specific items\n\t\t} else {\n\t\t\twhile (args.length) {\n\t\t\t\tvar item = args.pop();\n\t\t\t\tvar r = this.getResult(item);\n\n\t\t\t\t//Remove from the main load Queue\n\t\t\t\tfor (i = this._loadQueue.length - 1; i >= 0; i--) {\n\t\t\t\t\tloadItem = this._loadQueue[i].getItem();\n\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\n\t\t\t\t\t\tthis._loadQueue.splice(i, 1)[0].cancel();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Remove from the backup queue\n\t\t\t\tfor (i = this._loadQueueBackup.length - 1; i >= 0; i--) {\n\t\t\t\t\tloadItem = this._loadQueueBackup[i].getItem();\n\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\n\t\t\t\t\t\tthis._loadQueueBackup.splice(i, 1)[0].cancel();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (r) {\n\t\t\t\t\tthis._disposeItem(this.getItem(item));\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = this._currentLoads.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tvar loadItem = this._currentLoads[i].getItem();\n\t\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\n\t\t\t\t\t\t\tthis._currentLoads.splice(i, 1)[0].cancel();\n\t\t\t\t\t\t\titemsWereRemoved = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If this was called during a load, try to load the next item.\n\t\t\tif (itemsWereRemoved) {\n\t\t\t\tthis._loadNext();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Stops all open loads, destroys any loaded items, and resets the queue, so all items can\n\t * be reloaded again by calling {{#crossLink \"AbstractLoader/load\"}}{{/crossLink}}. Items are not removed from the\n\t * queue. To remove items use the {{#crossLink \"LoadQueue/remove\"}}{{/crossLink}} or\n\t * {{#crossLink \"LoadQueue/removeAll\"}}{{/crossLink}} method.\n\t * @method reset\n\t * @since 0.3.0\n\t */\n\tp.reset = function () {\n\t\tthis.close();\n\t\tfor (var n in this._loadItemsById) {\n\t\t\tthis._disposeItem(this._loadItemsById[n]);\n\t\t}\n\n\t\t//Reset the queue to its start state\n\t\tvar a = [];\n\t\tfor (var i = 0, l = this._loadQueueBackup.length; i < l; i++) {\n\t\t\ta.push(this._loadQueueBackup[i].getItem());\n\t\t}\n\n\t\tthis.loadManifest(a, false);\n\t};\n\n\t/**\n\t * Register a plugin. Plugins can map to load types (sound, image, etc), or specific extensions (png, mp3, etc).\n\t * Currently, only one plugin can exist per type/extension.\n\t *\n\t * When a plugin is installed, a <code>getPreloadHandlers()</code> method will be called on it. For more information\n\t * on this method, check out the {{#crossLink \"SamplePlugin/getPreloadHandlers\"}}{{/crossLink}} method in the\n\t * {{#crossLink \"SamplePlugin\"}}{{/crossLink}} class.\n\t *\n\t * Before a file is loaded, a matching plugin has an opportunity to modify the load. If a `callback` is returned\n\t * from the {{#crossLink \"SamplePlugin/getPreloadHandlers\"}}{{/crossLink}} method, it will be invoked first, and its\n\t * result may cancel or modify the item. The callback method can also return a `completeHandler` to be fired when\n\t * the file is loaded, or a `tag` object, which will manage the actual download. For more information on these\n\t * methods, check out the {{#crossLink \"SamplePlugin/preloadHandler\"}}{{/crossLink}} and {{#crossLink \"SamplePlugin/fileLoadHandler\"}}{{/crossLink}}\n\t * methods on the {{#crossLink \"SamplePlugin\"}}{{/crossLink}}.\n\t *\n\t * @method installPlugin\n\t * @param {Function} plugin The plugin class to install.\n\t */\n\tp.installPlugin = function (plugin) {\n\t\tif (plugin == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (plugin.getPreloadHandlers != null) {\n\t\t\tthis._plugins.push(plugin);\n\t\t\tvar map = plugin.getPreloadHandlers();\n\t\t\tmap.scope = plugin;\n\n\t\t\tif (map.types != null) {\n\t\t\t\tfor (var i = 0, l = map.types.length; i < l; i++) {\n\t\t\t\t\tthis._typeCallbacks[map.types[i]] = map;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (map.extensions != null) {\n\t\t\t\tfor (i = 0, l = map.extensions.length; i < l; i++) {\n\t\t\t\t\tthis._extensionCallbacks[map.extensions[i]] = map;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Set the maximum number of concurrent connections. Note that browsers and servers may have a built-in maximum\n\t * number of open connections, so any additional connections may remain in a pending state until the browser\n\t * opens the connection. When loading scripts using tags, and when {{#crossLink \"LoadQueue/maintainScriptOrder:property\"}}{{/crossLink}}\n\t * is `true`, only one script is loaded at a time due to browser limitations.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var queue = new createjs.LoadQueue();\n\t *      queue.setMaxConnections(10); // Allow 10 concurrent loads\n\t *\n\t * @method setMaxConnections\n\t * @param {Number} value The number of concurrent loads to allow. By default, only a single connection per LoadQueue\n\t * is open at any time.\n\t */\n\tp.setMaxConnections = function (value) {\n\t\tthis._maxConnections = value;\n\t\tif (!this._paused && this._loadQueue.length > 0) {\n\t\t\tthis._loadNext();\n\t\t}\n\t};\n\n\t/**\n\t * Load a single file. To add multiple files at once, use the {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\n\t * method.\n\t *\n\t * Files are always appended to the current queue, so this method can be used multiple times to add files.\n\t * To clear the queue first, use the {{#crossLink \"AbstractLoader/close\"}}{{/crossLink}} method.\n\t * @method loadFile\n\t * @param {LoadItem|Object|String} file The file object or path to load. A file can be either\n\t * <ul>\n\t *     <li>A {{#crossLink \"LoadItem\"}}{{/crossLink}} instance</li>\n\t *     <li>An object containing properties defined by {{#crossLink \"LoadItem\"}}{{/crossLink}}</li>\n\t *     <li>OR A string path to a resource. Note that this kind of load item will be converted to a {{#crossLink \"LoadItem\"}}{{/crossLink}}\n\t *     in the background.</li>\n\t * </ul>\n\t * @param {Boolean} [loadNow=true] Kick off an immediate load (true) or wait for a load call (false). The default\n\t * value is true. If the queue is paused using {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}}, and the value is\n\t * `true`, the queue will resume automatically.\n\t * @param {String} [basePath] A base path that will be prepended to each file. The basePath argument overrides the\n\t * path specified in the constructor. Note that if you load a manifest using a file of type {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}},\n\t * its files will <strong>NOT</strong> use the basePath parameter. <strong>The basePath parameter is deprecated.</strong>\n\t * This parameter will be removed in a future version. Please either use the `basePath` parameter in the LoadQueue\n\t * constructor, or a `path` property in a manifest definition.\n\t */\n\tp.loadFile = function (file, loadNow, basePath) {\n\t\tif (file == null) {\n\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_NO_FILE\");\n\t\t\tthis._sendError(event);\n\t\t\treturn;\n\t\t}\n\t\tthis._addItem(file, null, basePath);\n\n\t\tif (loadNow !== false) {\n\t\t\tthis.setPaused(false);\n\t\t} else {\n\t\t\tthis.setPaused(true);\n\t\t}\n\t};\n\n\t/**\n\t * Load an array of files. To load a single file, use the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} method.\n\t * The files in the manifest are requested in the same order, but may complete in a different order if the max\n\t * connections are set above 1 using {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}. Scripts will load\n\t * in the right order as long as {{#crossLink \"LoadQueue/maintainScriptOrder\"}}{{/crossLink}} is true (which is\n\t * default).\n\t *\n\t * Files are always appended to the current queue, so this method can be used multiple times to add files.\n\t * To clear the queue first, use the {{#crossLink \"AbstractLoader/close\"}}{{/crossLink}} method.\n\t * @method loadManifest\n\t * @param {Array|String|Object} manifest An list of files to load. The loadManifest call supports four types of\n\t * manifests:\n\t * <ol>\n\t *     <li>A string path, which points to a manifest file, which is a JSON file that contains a \"manifest\" property,\n\t *     which defines the list of files to load, and can optionally contain a \"path\" property, which will be\n\t *     prepended to each file in the list.</li>\n\t *     <li>An object which defines a \"src\", which is a JSON or JSONP file. A \"callback\" can be defined for JSONP\n\t *     file. The JSON/JSONP file should contain a \"manifest\" property, which defines the list of files to load,\n\t *     and can optionally contain a \"path\" property, which will be prepended to each file in the list.</li>\n\t *     <li>An object which contains a \"manifest\" property, which defines the list of files to load, and can\n\t *     optionally contain a \"path\" property, which will be prepended to each file in the list.</li>\n\t *     <li>An Array of files to load.</li>\n\t * </ol>\n\t *\n\t * Each \"file\" in a manifest can be either:\n\t * <ul>\n\t *     <li>A {{#crossLink \"LoadItem\"}}{{/crossLink}} instance</li>\n\t *     <li>An object containing properties defined by {{#crossLink \"LoadItem\"}}{{/crossLink}}</li>\n\t *     <li>OR A string path to a resource. Note that this kind of load item will be converted to a {{#crossLink \"LoadItem\"}}{{/crossLink}}\n\t *     in the background.</li>\n\t * </ul>\n\t *\n\t * @param {Boolean} [loadNow=true] Kick off an immediate load (true) or wait for a load call (false). The default\n\t * value is true. If the queue is paused using {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}} and this value is\n\t * `true`, the queue will resume automatically.\n\t * @param {String} [basePath] A base path that will be prepended to each file. The basePath argument overrides the\n\t * path specified in the constructor. Note that if you load a manifest using a file of type {{#crossLink \"LoadQueue/MANIFEST:property\"}}{{/crossLink}},\n\t * its files will <strong>NOT</strong> use the basePath parameter. <strong>The basePath parameter is deprecated.</strong>\n\t * This parameter will be removed in a future version. Please either use the `basePath` parameter in the LoadQueue\n\t * constructor, or a `path` property in a manifest definition.\n\t */\n\tp.loadManifest = function (manifest, loadNow, basePath) {\n\t\tvar fileList = null;\n\t\tvar path = null;\n\n\t\t// Array-based list of items\n\t\tif (Array.isArray(manifest)) {\n\t\t\tif (manifest.length == 0) {\n\t\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_EMPTY\");\n\t\t\t\tthis._sendError(event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfileList = manifest;\n\n\t\t\t// String-based. Only file manifests can be specified this way. Any other types will cause an error when loaded.\n\t\t} else if (typeof(manifest) === \"string\") {\n\t\t\tfileList = [\n\t\t\t\t{\n\t\t\t\t\tsrc: manifest,\n\t\t\t\t\ttype: s.MANIFEST\n\t\t\t\t}\n\t\t\t];\n\n\t\t} else if (typeof(manifest) == \"object\") {\n\n\t\t\t// An object that defines a manifest path\n\t\t\tif (manifest.src !== undefined) {\n\t\t\t\tif (manifest.type == null) {\n\t\t\t\t\tmanifest.type = s.MANIFEST;\n\t\t\t\t} else if (manifest.type != s.MANIFEST) {\n\t\t\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_TYPE\");\n\t\t\t\t\tthis._sendError(event);\n\t\t\t\t}\n\t\t\t\tfileList = [manifest];\n\n\t\t\t\t// An object that defines a manifest\n\t\t\t} else if (manifest.manifest !== undefined) {\n\t\t\t\tfileList = manifest.manifest;\n\t\t\t\tpath = manifest.path;\n\t\t\t}\n\n\t\t\t// Unsupported. This will throw an error.\n\t\t} else {\n\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_NULL\");\n\t\t\tthis._sendError(event);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, l = fileList.length; i < l; i++) {\n\t\t\tthis._addItem(fileList[i], path, basePath);\n\t\t}\n\n\t\tif (loadNow !== false) {\n\t\t\tthis.setPaused(false);\n\t\t} else {\n\t\t\tthis.setPaused(true);\n\t\t}\n\n\t};\n\n\t/**\n\t * Start a LoadQueue that was created, but not automatically started.\n\t * @method load\n\t */\n\tp.load = function () {\n\t\tthis.setPaused(false);\n\t};\n\n\t/**\n\t * Look up a {{#crossLink \"LoadItem\"}}{{/crossLink}} using either the \"id\" or \"src\" that was specified when loading it. Note that if no \"id\" was\n\t * supplied with the load item, the ID will be the \"src\", including a `path` property defined by a manifest. The\n\t * `basePath` will not be part of the ID.\n\t * @method getItem\n\t * @param {String} value The <code>id</code> or <code>src</code> of the load item.\n\t * @return {Object} The load item that was initially requested using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. This object is also returned via the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}\n\t * event as the `item` parameter.\n\t */\n\tp.getItem = function (value) {\n\t\treturn this._loadItemsById[value] || this._loadItemsBySrc[value];\n\t};\n\n\t/**\n\t * Look up a loaded result using either the \"id\" or \"src\" that was specified when loading it. Note that if no \"id\"\n\t * was supplied with the load item, the ID will be the \"src\", including a `path` property defined by a manifest. The\n\t * `basePath` will not be part of the ID.\n\t * @method getResult\n\t * @param {String} value The <code>id</code> or <code>src</code> of the load item.\n\t * @param {Boolean} [rawResult=false] Return a raw result instead of a formatted result. This applies to content\n\t * loaded via XHR such as scripts, XML, CSS, and Images. If there is no raw result, the formatted result will be\n\t * returned instead.\n\t * @return {Object} A result object containing the content that was loaded, such as:\n\t * <ul>\n\t *      <li>An image tag (&lt;image /&gt;) for images</li>\n\t *      <li>A script tag for JavaScript (&lt;script /&gt;). Note that scripts are automatically added to the HTML\n\t *      DOM.</li>\n\t *      <li>A style tag for CSS (&lt;style /&gt; or &lt;link &gt;)</li>\n\t *      <li>Raw text for TEXT</li>\n\t *      <li>A formatted JavaScript object defined by JSON</li>\n\t *      <li>An XML document</li>\n\t *      <li>A binary arraybuffer loaded by XHR</li>\n\t *      <li>An audio tag (&lt;audio &gt;) for HTML audio. Note that it is recommended to use SoundJS APIs to play\n\t *      loaded audio. Specifically, audio loaded by Flash and WebAudio will return a loader object using this method\n\t *      which can not be used to play audio back.</li>\n\t * </ul>\n\t * This object is also returned via the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event as the 'item`\n\t * parameter. Note that if a raw result is requested, but not found, the result will be returned instead.\n\t */\n\tp.getResult = function (value, rawResult) {\n\t\tvar item = this._loadItemsById[value] || this._loadItemsBySrc[value];\n\t\tif (item == null) {\n\t\t\treturn null;\n\t\t}\n\t\tvar id = item.id;\n\t\tif (rawResult && this._loadedRawResults[id]) {\n\t\t\treturn this._loadedRawResults[id];\n\t\t}\n\t\treturn this._loadedResults[id];\n\t};\n\n\t/**\n\t * Generate an list of items loaded by this queue.\n\t * @method getItems\n\t * @param {Boolean} loaded Determines if only items that have been loaded should be returned. If false, in-progress\n\t * and failed load items will also be included.\n\t * @returns {Array} A list of objects that have been loaded. Each item includes the {{#crossLink \"LoadItem\"}}{{/crossLink}},\n\t * result, and rawResult.\n\t * @since 0.6.0\n\t */\n\tp.getItems = function (loaded) {\n\t\tvar arr = [];\n\t\tfor (var n in this._loadItemsById) {\n\t\t\tvar item = this._loadItemsById[n];\n\t\t\tvar result = this.getResult(n);\n\t\t\tif (loaded === true && result == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tarr.push({\n\t\t\t\titem: item,\n\t\t\t\tresult: result,\n\t\t\t\trawResult: this.getResult(n, true)\n\t\t\t});\n\t\t}\n\t\treturn arr;\n\t};\n\n\t/**\n\t * Pause or resume the current load. Active loads will not be cancelled, but the next items in the queue will not\n\t * be processed when active loads complete. LoadQueues are not paused by default.\n\t *\n\t * Note that if new items are added to the queue using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or\n\t * {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}, a paused queue will be resumed, unless the `loadNow`\n\t * argument is `false`.\n\t * @method setPaused\n\t * @param {Boolean} value Whether the queue should be paused or not.\n\t */\n\tp.setPaused = function (value) {\n\t\tthis._paused = value;\n\t\tif (!this._paused) {\n\t\t\tthis._loadNext();\n\t\t}\n\t};\n\n\t/**\n\t * Close the active queue. Closing a queue completely empties the queue, and prevents any remaining items from\n\t * starting to download. Note that currently any active loads will remain open, and events may be processed.\n\t *\n\t * To stop and restart a queue, use the {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}} method instead.\n\t * @method close\n\t */\n\tp.close = function () {\n\t\twhile (this._currentLoads.length) {\n\t\t\tthis._currentLoads.pop().cancel();\n\t\t}\n\t\tthis._scriptOrder.length = 0;\n\t\tthis._loadedScripts.length = 0;\n\t\tthis.loadStartWasDispatched = false;\n\t\tthis._itemCount = 0;\n\t\tthis._lastProgress = NaN;\n\t};\n\n// protected methods\n\t/**\n\t * Add an item to the queue. Items are formatted into a usable object containing all the properties necessary to\n\t * load the content. The load queue is populated with the loader instance that handles preloading, and not the load\n\t * item that was passed in by the user. To look up the load item by id or src, use the {{#crossLink \"LoadQueue.getItem\"}}{{/crossLink}}\n\t * method.\n\t * @method _addItem\n\t * @param {String|Object} value The item to add to the queue.\n\t * @param {String} [path] An optional path prepended to the `src`. The path will only be prepended if the src is\n\t * relative, and does not start with a protocol such as `http://`, or a path like `../`. If the LoadQueue was\n\t * provided a {{#crossLink \"_basePath\"}}{{/crossLink}}, then it will optionally be prepended after.\n\t * @param {String} [basePath] <strong>Deprecated</strong>An optional basePath passed into a {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} call. This parameter will be removed in a future tagged\n\t * version.\n\t * @private\n\t */\n\tp._addItem = function (value, path, basePath) {\n\t\tvar item = this._createLoadItem(value, path, basePath); // basePath and manifest path are added to the src.\n\t\tif (item == null) {\n\t\t\treturn;\n\t\t} // Sometimes plugins or types should be skipped.\n\t\tvar loader = this._createLoader(item);\n\t\tif (loader != null) {\n\t\t\tif (\"plugins\" in loader) {\n\t\t\t\tloader.plugins = this._plugins;\n\t\t\t}\n\t\t\titem._loader = loader;\n\t\t\tthis._loadQueue.push(loader);\n\t\t\tthis._loadQueueBackup.push(loader);\n\n\t\t\tthis._numItems++;\n\t\t\tthis._updateProgress();\n\n\t\t\t// Only worry about script order when using XHR to load scripts. Tags are only loading one at a time.\n\t\t\tif ((this.maintainScriptOrder\n\t\t\t\t\t&& item.type == createjs.Types.JAVASCRIPT\n\t\t\t\t\t\t//&& loader instanceof createjs.XHRLoader //NOTE: Have to track all JS files this way\n\t\t\t\t\t)\n\t\t\t\t\t|| item.maintainOrder === true) {\n\t\t\t\tthis._scriptOrder.push(item);\n\t\t\t\tthis._loadedScripts.push(null);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Create a refined {{#crossLink \"LoadItem\"}}{{/crossLink}}, which contains all the required properties. The type of\n\t * item is determined by browser support, requirements based on the file type, and developer settings. For example,\n\t * XHR is only used for file types that support it in new browsers.\n\t *\n\t * Before the item is returned, any plugins registered to handle the type or extension will be fired, which may\n\t * alter the load item.\n\t * @method _createLoadItem\n\t * @param {String | Object | HTMLAudioElement | HTMLImageElement} value The item that needs to be preloaded.\n\t * @param {String} [path] A path to prepend to the item's source. Sources beginning with http:// or similar will\n\t * not receive a path. Since PreloadJS 0.4.1, the src will be modified to include the `path` and {{#crossLink \"LoadQueue/_basePath:property\"}}{{/crossLink}}\n\t * when it is added.\n\t * @param {String} [basePath] <strong>Deprectated</strong> A base path to prepend to the items source in addition to\n\t * the path argument.\n\t * @return {Object} The loader instance that will be used.\n\t * @private\n\t */\n\tp._createLoadItem = function (value, path, basePath) {\n\t\tvar item = createjs.LoadItem.create(value);\n\t\tif (item == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar bp = \"\"; // Store the generated basePath\n\t\tvar useBasePath = basePath || this._basePath;\n\n\t\tif (item.src instanceof Object) {\n\t\t\tif (!item.type) {\n\t\t\t\treturn null;\n\t\t\t} // the the src is an object, type is required to pass off to plugin\n\t\t\tif (path) {\n\t\t\t\tbp = path;\n\t\t\t\tvar pathMatch = createjs.URLUtils.parseURI(path);\n\t\t\t\t// Also append basePath\n\t\t\t\tif (useBasePath != null && !pathMatch.absolute && !pathMatch.relative) {\n\t\t\t\t\tbp = useBasePath + bp;\n\t\t\t\t}\n\t\t\t} else if (useBasePath != null) {\n\t\t\t\tbp = useBasePath;\n\t\t\t}\n\t\t} else {\n\t\t\t// Determine Extension, etc.\n\t\t\tvar match = createjs.URLUtils.parseURI(item.src);\n\t\t\tif (match.extension) {\n\t\t\t\titem.ext = match.extension;\n\t\t\t}\n\t\t\tif (item.type == null) {\n\t\t\t\titem.type = createjs.RequestUtils.getTypeByExtension(item.ext);\n\t\t\t}\n\n\t\t\t// Inject path & basePath\n\t\t\tvar autoId = item.src;\n\t\t\tif (!match.absolute && !match.relative) {\n\t\t\t\tif (path) {\n\t\t\t\t\tbp = path;\n\t\t\t\t\tvar pathMatch = createjs.URLUtils.parseURI(path);\n\t\t\t\t\tautoId = path + autoId;\n\t\t\t\t\t// Also append basePath\n\t\t\t\t\tif (useBasePath != null && !pathMatch.absolute && !pathMatch.relative) {\n\t\t\t\t\t\tbp = useBasePath + bp;\n\t\t\t\t\t}\n\t\t\t\t} else if (useBasePath != null) {\n\t\t\t\t\tbp = useBasePath;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.src = bp + item.src;\n\t\t}\n\t\titem.path = bp;\n\n\t\t// If there's no id, set one now.\n\t\tif (item.id === undefined || item.id === null || item.id === \"\") {\n\t\t\titem.id = autoId;\n\t\t}\n\n\t\t// Give plugins a chance to modify the loadItem:\n\t\tvar customHandler = this._typeCallbacks[item.type] || this._extensionCallbacks[item.ext];\n\t\tif (customHandler) {\n\t\t\t// Plugins are now passed both the full source, as well as a combined path+basePath (appropriately)\n\t\t\tvar result = customHandler.callback.call(customHandler.scope, item, this);\n\n\t\t\t// The plugin will handle the load, or has canceled it. Ignore it.\n\t\t\tif (result === false) {\n\t\t\t\treturn null;\n\n\t\t\t\t// Load as normal:\n\t\t\t} else if (result === true) {\n\t\t\t\t// Do Nothing\n\n\t\t\t\t// Result is a loader class:\n\t\t\t} else if (result != null) {\n\t\t\t\titem._loader = result;\n\t\t\t}\n\n\t\t\t// Update the extension in case the type changed:\n\t\t\tmatch = createjs.URLUtils.parseURI(item.src);\n\t\t\tif (match.extension != null) {\n\t\t\t\titem.ext = match.extension;\n\t\t\t}\n\t\t}\n\n\t\t// Store the item for lookup. This also helps clean-up later.\n\t\tthis._loadItemsById[item.id] = item;\n\t\tthis._loadItemsBySrc[item.src] = item;\n\n\t\tif (item.crossOrigin == null) {\n\t\t\titem.crossOrigin = this._crossOrigin;\n\t\t}\n\n\t\treturn item;\n\t};\n\n\t/**\n\t * Create a loader for a load item.\n\t * @method _createLoader\n\t * @param {Object} item A formatted load item that can be used to generate a loader.\n\t * @return {AbstractLoader} A loader that can be used to load content.\n\t * @private\n\t */\n\tp._createLoader = function (item) {\n\t\tif (item._loader != null) { // A plugin already specified a loader\n\t\t\treturn item._loader;\n\t\t}\n\n\t\t// Initially, try and use the provided/supported XHR mode:\n\t\tvar preferXHR = this.preferXHR;\n\n\t\tfor (var i = 0; i < this._availableLoaders.length; i++) {\n\t\t\tvar loader = this._availableLoaders[i];\n\t\t\tif (loader && loader.canLoadItem(item)) {\n\t\t\t\treturn new loader(item, preferXHR);\n\t\t\t}\n\t\t}\n\n\t\t// TODO: Log error (requires createjs.log)\n\t\treturn null;\n\t};\n\n\t/**\n\t * Load the next item in the queue. If the queue is empty (all items have been loaded), then the complete event\n\t * is processed. The queue will \"fill up\" any empty slots, up to the max connection specified using\n\t * {{#crossLink \"LoadQueue.setMaxConnections\"}}{{/crossLink}} method. The only exception is scripts that are loaded\n\t * using tags, which have to be loaded one at a time to maintain load order.\n\t * @method _loadNext\n\t * @private\n\t */\n\tp._loadNext = function () {\n\t\tif (this._paused) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only dispatch loadstart event when the first file is loaded.\n\t\tif (!this._loadStartWasDispatched) {\n\t\t\tthis._sendLoadStart();\n\t\t\tthis._loadStartWasDispatched = true;\n\t\t}\n\n\t\t// The queue has completed.\n\t\tif (this._numItems == this._numItemsLoaded) {\n\t\t\tthis.loaded = true;\n\t\t\tthis._sendComplete();\n\n\t\t\t// Load the next queue, if it has been defined.\n\t\t\tif (this.next && this.next.load) {\n\t\t\t\tthis.next.load();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.loaded = false;\n\t\t}\n\n\t\t// Must iterate forwards to load in the right order.\n\t\tfor (var i = 0; i < this._loadQueue.length; i++) {\n\t\t\tif (this._currentLoads.length >= this._maxConnections) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tvar loader = this._loadQueue[i];\n\n\t\t\t// Determine if we should be only loading one tag-script at a time:\n\t\t\t// Note: maintainOrder items don't do anything here because we can hold onto their loaded value\n\t\t\tif (!this._canStartLoad(loader)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._loadQueue.splice(i, 1);\n\t\t\ti--;\n\t\t\tthis._loadItem(loader);\n\t\t}\n\t};\n\n\t/**\n\t * Begin loading an item. Event listeners are not added to the loaders until the load starts.\n\t * @method _loadItem\n\t * @param {AbstractLoader} loader The loader instance to start. Currently, this will be an XHRLoader or TagLoader.\n\t * @private\n\t */\n\tp._loadItem = function (loader) {\n\t\tloader.on(\"fileload\", this._handleFileLoad, this);\n\t\tloader.on(\"progress\", this._handleProgress, this);\n\t\tloader.on(\"complete\", this._handleFileComplete, this);\n\t\tloader.on(\"error\", this._handleError, this);\n\t\tloader.on(\"fileerror\", this._handleFileError, this);\n\t\tthis._currentLoads.push(loader);\n\t\tthis._sendFileStart(loader.getItem());\n\t\tloader.load();\n\t};\n\n\t/**\n\t * The callback that is fired when a loader loads a file. This enables loaders like {{#crossLink \"ManifestLoader\"}}{{/crossLink}}\n\t * to maintain internal queues, but for this queue to dispatch the {{#crossLink \"fileload:event\"}}{{/crossLink}}\n\t * events.\n\t * @param {Event} event The {{#crossLink \"AbstractLoader/fileload:event\"}}{{/crossLink}} event from the loader.\n\t * @private\n\t * @since 0.6.0\n\t */\n\tp._handleFileLoad = function (event) {\n\t\tevent.target = null;\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * The callback that is fired when a loader encounters an error from an internal file load operation. This enables\n\t * loaders like M\n\t * @param event\n\t * @private\n\t */\n\tp._handleFileError = function (event) {\n\t\tvar newEvent = new createjs.ErrorEvent(\"FILE_LOAD_ERROR\", null, event.item);\n\t\tthis._sendError(newEvent);\n\t};\n\n\t/**\n\t * The callback that is fired when a loader encounters an error. The queue will continue loading unless {{#crossLink \"LoadQueue/stopOnError:property\"}}{{/crossLink}}\n\t * is set to `true`.\n\t * @method _handleError\n\t * @param {ErrorEvent} event The error event, containing relevant error information.\n\t * @private\n\t */\n\tp._handleError = function (event) {\n\t\tvar loader = event.target;\n\t\tthis._numItemsLoaded++;\n\n\t\tthis._finishOrderedItem(loader, true);\n\t\tthis._updateProgress();\n\n\t\tvar newEvent = new createjs.ErrorEvent(\"FILE_LOAD_ERROR\", null, loader.getItem());\n\t\t// TODO: Propagate actual error message.\n\n\t\tthis._sendError(newEvent);\n\n\t\tif (!this.stopOnError) {\n\t\t\tthis._removeLoadItem(loader);\n\t\t\tthis._cleanLoadItem(loader);\n\t\t\tthis._loadNext();\n\t\t} else {\n\t\t\tthis.setPaused(true);\n\t\t}\n\t};\n\n\t/**\n\t * An item has finished loading. We can assume that it is totally loaded, has been parsed for immediate use, and\n\t * is available as the \"result\" property on the load item. The raw text result for a parsed item (such as JSON, XML,\n\t * CSS, JavaScript, etc) is available as the \"rawResult\" property, and can also be looked up using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}.\n\t * @method _handleFileComplete\n\t * @param {Event} event The event object from the loader.\n\t * @private\n\t */\n\tp._handleFileComplete = function (event) {\n\t\tvar loader = event.target;\n\t\tvar item = loader.getItem();\n\n\t\tvar result = loader.getResult();\n\t\tthis._loadedResults[item.id] = result;\n\t\tvar rawResult = loader.getResult(true);\n\t\tif (rawResult != null && rawResult !== result) {\n\t\t\tthis._loadedRawResults[item.id] = rawResult;\n\t\t}\n\n\t\tthis._saveLoadedItems(loader);\n\n\t\t// Remove the load item\n\t\tthis._removeLoadItem(loader);\n\n\t\tif (!this._finishOrderedItem(loader)) {\n\t\t\t// The item was NOT managed, so process it now\n\t\t\tthis._processFinishedLoad(item, loader);\n\t\t}\n\n\t\t// Clean up the load item\n\t\tthis._cleanLoadItem(loader);\n\t};\n\n\t/**\n\t * Some loaders might load additional content, other than the item they were passed (such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}}).\n\t * Any items exposed by the loader using {{#crossLink \"AbstractLoader/getLoadItems\"}}{{/crossLink}} are added to the\n\t * LoadQueue's look-ups, including {{#crossLink \"getItem\"}}{{/crossLink}} and {{#crossLink \"getResult\"}}{{/crossLink}}\n\t * methods.\n\t * @method _saveLoadedItems\n\t * @param {AbstractLoader} loader\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._saveLoadedItems = function (loader) {\n\t\t// TODO: Not sure how to handle this. Would be nice to expose the items.\n\t\t// Loaders may load sub-items. This adds them to this queue\n\t\tvar list = loader.getLoadedItems();\n\t\tif (list === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tvar item = list[i].item;\n\n\t\t\t// Store item lookups\n\t\t\tthis._loadItemsBySrc[item.src] = item;\n\t\t\tthis._loadItemsById[item.id] = item;\n\n\t\t\t// Store loaded content\n\t\t\tthis._loadedResults[item.id] = list[i].result;\n\t\t\tthis._loadedRawResults[item.id] = list[i].rawResult;\n\t\t}\n\t};\n\n\t/**\n\t * Flag an item as finished. If the item's order is being managed, then ensure that it is allowed to finish, and if\n\t * so, trigger prior items to trigger as well.\n\t * @method _finishOrderedItem\n\t * @param {AbstractLoader} loader\n\t * @param {Boolean} loadFailed\n\t * @return {Boolean} If the item's order is being managed. This allows the caller to take an alternate\n\t * behaviour if it is.\n\t * @private\n\t */\n\tp._finishOrderedItem = function (loader, loadFailed) {\n\t\tvar item = loader.getItem();\n\n\t\tif ((this.maintainScriptOrder && item.type == createjs.Types.JAVASCRIPT)\n\t\t\t\t|| item.maintainOrder) {\n\n\t\t\t//TODO: Evaluate removal of the _currentlyLoadingScript\n\t\t\tif (loader instanceof createjs.JavaScriptLoader) {\n\t\t\t\tthis._currentlyLoadingScript = false;\n\t\t\t}\n\n\t\t\tvar index = createjs.indexOf(this._scriptOrder, item);\n\t\t\tif (index == -1) {\n\t\t\t\treturn false;\n\t\t\t} // This loader no longer exists\n\t\t\tthis._loadedScripts[index] = (loadFailed === true) ? true : item;\n\n\t\t\tthis._checkScriptLoadOrder();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\t/**\n\t * Ensure the scripts load and dispatch in the correct order. When using XHR, scripts are stored in an array in the\n\t * order they were added, but with a \"null\" value. When they are completed, the value is set to the load item,\n\t * and then when they are processed and dispatched, the value is set to `true`. This method simply\n\t * iterates the array, and ensures that any loaded items that are not preceded by a `null` value are\n\t * dispatched.\n\t * @method _checkScriptLoadOrder\n\t * @private\n\t */\n\tp._checkScriptLoadOrder = function () {\n\t\tvar l = this._loadedScripts.length;\n\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tvar item = this._loadedScripts[i];\n\t\t\tif (item === null) {\n\t\t\t\tbreak;\n\t\t\t} // This is still loading. Do not process further.\n\t\t\tif (item === true) {\n\t\t\t\tcontinue;\n\t\t\t} // This has completed, and been processed. Move on.\n\n\t\t\tvar loadItem = this._loadedResults[item.id];\n\t\t\tif (item.type == createjs.Types.JAVASCRIPT) {\n\t\t\t\t// Append script tags to the head automatically.\n\t\t\t\tcreatejs.DomUtils.appendToHead(loadItem);\n\t\t\t}\n\n\t\t\tvar loader = item._loader;\n\t\t\tthis._processFinishedLoad(item, loader);\n\t\t\tthis._loadedScripts[i] = true;\n\t\t}\n\t};\n\n\t/**\n\t * A file has completed loading, and the LoadQueue can move on. This triggers the complete event, and kick-starts\n\t * the next item.\n\t * @method _processFinishedLoad\n\t * @param {LoadItem|Object} item\n\t * @param {AbstractLoader} loader\n\t * @protected\n\t */\n\tp._processFinishedLoad = function (item, loader) {\n\t\tthis._numItemsLoaded++;\n\n\t\t// Since LoadQueue needs maintain order, we can't append scripts in the loader.\n\t\t// So we do it here instead. Or in _checkScriptLoadOrder();\n\t\tif (!this.maintainScriptOrder && item.type == createjs.Types.JAVASCRIPT) {\n\t\t\tvar tag = loader.getTag();\n\t\t\tcreatejs.DomUtils.appendToHead(tag);\n\t\t}\n\n\t\tthis._updateProgress();\n\t\tthis._sendFileComplete(item, loader);\n\t\tthis._loadNext();\n\t};\n\n\t/**\n\t * Ensure items with `maintainOrder=true` that are before the specified item have loaded. This only applies to\n\t * JavaScript items that are being loaded with a TagLoader, since they have to be loaded and completed <strong>before</strong>\n\t * the script can even be started, since it exist in the DOM while loading.\n\t * @method _canStartLoad\n\t * @param {AbstractLoader} loader The loader for the item\n\t * @return {Boolean} Whether the item can start a load or not.\n\t * @private\n\t */\n\tp._canStartLoad = function (loader) {\n\t\tif (!this.maintainScriptOrder || loader.preferXHR) {\n\t\t\treturn true;\n\t\t}\n\t\tvar item = loader.getItem();\n\t\tif (item.type != createjs.Types.JAVASCRIPT) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this._currentlyLoadingScript) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar index = this._scriptOrder.indexOf(item);\n\t\tvar i = 0;\n\t\twhile (i < index) {\n\t\t\tvar checkItem = this._loadedScripts[i];\n\t\t\tif (checkItem == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tthis._currentlyLoadingScript = true;\n\t\treturn true;\n\t};\n\n\t/**\n\t * A load item is completed or was canceled, and needs to be removed from the LoadQueue.\n\t * @method _removeLoadItem\n\t * @param {AbstractLoader} loader A loader instance to remove.\n\t * @private\n\t */\n\tp._removeLoadItem = function (loader) {\n\t\tvar l = this._currentLoads.length;\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tif (this._currentLoads[i] == loader) {\n\t\t\t\tthis._currentLoads.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Remove unneeded references from a loader.\n\t *\n\t * @param loader\n\t * @private\n\t */\n\tp._cleanLoadItem = function(loader) {\n\t\tvar item = loader.getItem();\n\t\tif (item) {\n\t\t\tdelete item._loader;\n\t\t}\n\t}\n\n\t/**\n\t * An item has dispatched progress. Propagate that progress, and update the LoadQueue's overall progress.\n\t * @method _handleProgress\n\t * @param {ProgressEvent} event The progress event from the item.\n\t * @private\n\t */\n\tp._handleProgress = function (event) {\n\t\tvar loader = event.target;\n\t\tthis._sendFileProgress(loader.getItem(), loader.progress);\n\t\tthis._updateProgress();\n\t};\n\n\t/**\n\t * Overall progress has changed, so determine the new progress amount and dispatch it. This changes any time an\n\t * item dispatches progress or completes. Note that since we don't always know the actual filesize of items before\n\t * they are loaded. In this case, we define a \"slot\" for each item (1 item in 10 would get 10%), and then append\n\t * loaded progress on top of the already-loaded items.\n\t *\n\t * For example, if 5/10 items have loaded, and item 6 is 20% loaded, the total progress would be:\n\t * <ul>\n\t *      <li>5/10 of the items in the queue (50%)</li>\n\t *      <li>plus 20% of item 6's slot (2%)</li>\n\t *      <li>equals 52%</li>\n\t * </ul>\n\t * @method _updateProgress\n\t * @private\n\t */\n\tp._updateProgress = function () {\n\t\tvar loaded = this._numItemsLoaded / this._numItems; // Fully Loaded Progress\n\t\tvar remaining = this._numItems - this._numItemsLoaded;\n\t\tif (remaining > 0) {\n\t\t\tvar chunk = 0;\n\t\t\tfor (var i = 0, l = this._currentLoads.length; i < l; i++) {\n\t\t\t\tchunk += this._currentLoads[i].progress;\n\t\t\t}\n\t\t\tloaded += (chunk / remaining) * (remaining / this._numItems);\n\t\t}\n\n\t\tif (this._lastProgress != loaded) {\n\t\t\tthis._sendProgress(loaded);\n\t\t\tthis._lastProgress = loaded;\n\t\t}\n\t};\n\n\t/**\n\t * Clean out item results, to free them from memory. Mainly, the loaded item and results are cleared from internal\n\t * hashes.\n\t * @method _disposeItem\n\t * @param {LoadItem|Object} item The item that was passed in for preloading.\n\t * @private\n\t */\n\tp._disposeItem = function (item) {\n\t\tdelete this._loadedResults[item.id];\n\t\tdelete this._loadedRawResults[item.id];\n\t\tdelete this._loadItemsById[item.id];\n\t\tdelete this._loadItemsBySrc[item.src];\n\t};\n\n\t/**\n\t * Dispatch a \"fileprogress\" {{#crossLink \"Event\"}}{{/crossLink}}. Please see the LoadQueue {{#crossLink \"LoadQueue/fileprogress:event\"}}{{/crossLink}}\n\t * event for details on the event payload.\n\t * @method _sendFileProgress\n\t * @param {LoadItem|Object} item The item that is being loaded.\n\t * @param {Number} progress The amount the item has been loaded (between 0 and 1).\n\t * @protected\n\t */\n\tp._sendFileProgress = function (item, progress) {\n\t\tif (this._isCanceled() || this._paused) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this.hasEventListener(\"fileprogress\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t//LM: Rework ProgressEvent to support this?\n\t\tvar event = new createjs.Event(\"fileprogress\");\n\t\tevent.progress = progress;\n\t\tevent.loaded = progress;\n\t\tevent.total = 1;\n\t\tevent.item = item;\n\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch a fileload {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event for\n\t * details on the event payload.\n\t * @method _sendFileComplete\n\t * @param {LoadItemObject} item The item that is being loaded.\n\t * @param {AbstractLoader} loader\n\t * @protected\n\t */\n\tp._sendFileComplete = function (item, loader) {\n\t\tif (this._isCanceled() || this._paused) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar event = new createjs.Event(\"fileload\");\n\t\tevent.loader = loader;\n\t\tevent.item = item;\n\t\tevent.result = this._loadedResults[item.id];\n\t\tevent.rawResult = this._loadedRawResults[item.id];\n\n\t\t// This calls a handler specified on the actual load item. Currently, the SoundJS plugin uses this.\n\t\tif (item.completeHandler) {\n\t\t\titem.completeHandler(event);\n\t\t}\n\n\t\tthis.hasEventListener(\"fileload\") && this.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch a filestart {{#crossLink \"Event\"}}{{/crossLink}} immediately before a file starts to load. Please see\n\t * the {{#crossLink \"LoadQueue/filestart:event\"}}{{/crossLink}} event for details on the event payload.\n\t * @method _sendFileStart\n\t * @param {LoadItem|Object} item The item that is being loaded.\n\t * @protected\n\t */\n\tp._sendFileStart = function (item) {\n\t\tvar event = new createjs.Event(\"filestart\");\n\t\tevent.item = item;\n\t\tthis.hasEventListener(\"filestart\") && this.dispatchEvent(event);\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[PreloadJS LoadQueue]\";\n\t};\n\n\tcreatejs.LoadQueue = createjs.promote(LoadQueue, \"AbstractLoader\");\n}());\n\n//##############################################################################\n// TextLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for Text files.\n\t * @class TextLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction TextLoader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.TEXT);\n\t};\n\n\tvar p = createjs.extend(TextLoader, createjs.AbstractLoader);\n\tvar s = TextLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader loads items that are of type {{#crossLink \"Types/TEXT:property\"}}{{/crossLink}},\n\t * but is also the default loader if a file type can not be determined.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.TEXT;\n\t};\n\n\tcreatejs.TextLoader = createjs.promote(TextLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// BinaryLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for binary files. This is useful for loading web audio, or content that requires an ArrayBuffer.\n\t * @class BinaryLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction BinaryLoader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.BINARY);\n\t\tthis.on(\"initialize\", this._updateXHR, this);\n\t};\n\n\tvar p = createjs.extend(BinaryLoader, createjs.AbstractLoader);\n\tvar s = BinaryLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/BINARY:property\"}}{{/crossLink}}\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.BINARY;\n\t};\n\n\t// private methods\n\t/**\n\t * Before the item loads, set the response type to \"arraybuffer\"\n\t * @property _updateXHR\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._updateXHR = function (event) {\n\t\tevent.loader.setResponseType(\"arraybuffer\");\n\t};\n\n\tcreatejs.BinaryLoader = createjs.promote(BinaryLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// CSSLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for CSS files.\n\t * @class CSSLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction CSSLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.CSS);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"href\";\n\n\t\tif (preferXHR) {\n\t\t\tthis._tag = createjs.Elements.style();\n\t\t} else {\n\t\t\tthis._tag = createjs.Elements.link();\n\t\t}\n\n\t\tthis._tag.rel = \"stylesheet\";\n\t\tthis._tag.type = \"text/css\";\n\t};\n\n\tvar p = createjs.extend(CSSLoader, createjs.AbstractLoader);\n\tvar s = CSSLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/CSS:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.CSS;\n\t};\n\n\t// protected methods\n\t/**\n\t * The result formatter for CSS files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLLinkElement|HTMLStyleElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\tif (this._preferXHR) {\n\t\t\tvar tag = loader.getTag();\n\n\t\t\tif (tag.styleSheet) { // IE\n\t\t\t\ttag.styleSheet.cssText = loader.getResult(true);\n\t\t\t} else {\n\t\t\t\tvar textNode = createjs.Elements.text(loader.getResult(true));\n\t\t\t\ttag.appendChild(textNode);\n\t\t\t}\n\t\t} else {\n\t\t\ttag = this._tag;\n\t\t}\n\n\t\tcreatejs.DomUtils.appendToHead(tag);\n\n\t\treturn tag;\n\t};\n\n\tcreatejs.CSSLoader = createjs.promote(CSSLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// FontLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n// constructor:\n\t/**\n\t * A loader that handles font files, CSS definitions, and CSS paths. FontLoader doesn't actually preload fonts\n\t * themselves, but rather generates CSS definitions, and then tests the size changes on an HTML5 Canvas element.\n\t *\n\t * Note that FontLoader does not support tag-based loading due to the requirement that CSS be read to determine the\n\t * font definitions to test for.\n\t * @class FontLoader\n\t * @param {LoadItem|object|string} loadItem The item to be loaded.\n\t * @extends AbstractLoader\n\t * @constructor\n\t **/\n\tfunction FontLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, loadItem.type);\n\n\t\t// private properties:\n\t\t/**\n\t\t * A lookup of font faces to load.\n\t\t * @property _faces\n\t\t * @protected\n\t\t * @type Object\n\t\t **/\n\t\tthis._faces = {};\n\n\t\t/**\n\t\t * A list of font faces currently being \"watched\". Watched fonts will be tested on a regular interval, and be\n\t\t * removed from this list when they are complete.\n\t\t * @oroperty _watched\n\t\t * @type {Array}\n\t\t * @protected\n\t\t */\n\t\tthis._watched = [];\n\n\t\t/**\n\t\t * A count of the total font faces to load.\n\t\t * @property _count\n\t\t * @type {number}\n\t\t * @protected\n\t\t * @default 0\n\t\t */\n\t\tthis._count = 0;\n\n\t\t/**\n\t\t * The interval for checking if fonts have been loaded.\n\t\t * @property _watchInterval\n\t\t * @type {Number}\n\t\t * @protected\n\t\t */\n\t\tthis._watchInterval = null;\n\n\t\t/**\n\t\t * The timeout for determining if a font can't be loaded. Uses the LoadItem {{#crossLink \"LoadImte/timeout:property\"}}{{/crossLink}}\n\t\t * value.\n\t\t * @property _loadTimeout\n\t\t * @type {Number}\n\t\t * @protected\n\t\t */\n\t\tthis._loadTimeout = null;\n\t\t/**\n\t\t * Determines if generated CSS should be injected into the document.\n\t\t * @property _injectCSS\n\t\t * @type {boolean}\n\t\t * @protected\n\t\t */\n\t\tthis._injectCSS = (loadItem.injectCSS === undefined) ? true : loadItem.injectCSS;\n\n\t\tthis.dispatchEvent(\"initialize\");\n\t}\n\tvar p = createjs.extend(FontLoader, createjs.AbstractLoader);\n    \n    /**\n     * Determines if the loader can load a specific item. This loader can only load items that are of type\n     * {{#crossLink \"Types/FONT:property\"}}{{/crossLink}}.\n     * @method canLoadItem\n     * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n     * @returns {Boolean} Whether the loader can load the item.\n     * @static\n     */\n    FontLoader.canLoadItem = function (item) {\n        return item.type == createjs.Types.FONT || item.type == createjs.Types.FONTCSS;\n    };\n\n// static properties:\n\t/**\n\t * Sample text used by the FontLoader to determine if the font has been loaded. The sample text size is compared\n\t * to the loaded font size, and a change indicates that the font has completed.\n\t * @property sampleText\n\t * @type {String}\n\t * @default abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t * @static\n\t * @private\n\t */\n\tFontLoader.sampleText = \"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t/**\n\t * The canvas context used to test the font size. Note that this currently requires an HTML DOM.\n\t * @property _ctx\n\t * @type {CanvasRenderingContext2D}\n\t * @static\n\t * @private\n\t */\n\tFontLoader._ctx = document.createElement(\"canvas\").getContext(\"2d\"); // TODO: Consider a method to do this like EaselJS Stage has.\n\n\t/**\n\t * A list of reference fonts to test. Multiple faces are tested to address the rare case of a loaded font being the\n\t * exact same dimensions as the test font.\n\t * @property _referenceFonts\n\t * @type {Array}\n\t * @default [\"serif\", \"monospace\"]\n\t * @private\n\t */\n\tFontLoader._referenceFonts = [\"serif\",\"monospace\"];\n\n\t/**\n\t * A regular expression that pulls out possible style values from the font name.\n\t * <ul>\n\t *     <li>This includes font names that include thin, normal, book, regular, medium, black, and heavy (such as\n\t *     \"Arial Black\")</li>\n\t *     <li>Weight modifiers including extra, ultra, semi, demi, light, and bold (such as \"WorkSans SemiBold\")</li>\n\t * </ul>\n\t *\n\t * Weight descriptions map to font weight values by default using the following (from\n\t * http://www.w3.org/TR/css3-fonts/#font-weight-numeric-values):\n\t * <ul>\n\t *     <li>100 - Thin</li>\n\t * \t   <li>200 - Extra Light, Ultra Light</li>\n\t *     <li>300 - Light, Semi Light, Demi Light</li>\n\t *     <li>400 - Normal, Book, Regular</li>\n\t *     <li>500 - Medium</li>\n\t *     <li>600 - Semi Bold, Demi Bold</li>\n\t *     <li>700 - Bold</li>\n\t *     <li>800 - Extra Bold, Ultra Bold</li>\n\t *     <li>900 - Black, Heavy</li>\n\t * </ul>\n\t * @property WEIGHT_REGEX\n\t * @type {RegExp}\n\t * @static\n\t */\n\tFontLoader.WEIGHT_REGEX = /[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/ig;\n\n\t/**\n\t * A regular expression that pulls out possible style values from the font name. These include \"italic\"\n\t * and \"oblique\".\n\t * @property STYLE_REGEX\n\t * @type {RegExp}\n\t * @static\n\t */\n\tFontLoader.STYLE_REGEX = /[- ._]*(italic|oblique)[- ._]*/ig;\n\n\t/**\n\t * A lookup of font types for generating a CSS definition. For example, TTF fonts requires a \"truetype\" type.\n\t * @property FONT_FORMAT\n\t * @type {Object}\n\t * @static\n\t */\n\tFontLoader.FONT_FORMAT = {woff2:\"woff2\", woff:\"woff\", ttf:\"truetype\", otf:\"truetype\"};\n\n\t/**\n\t * A lookup of font weights based on a name. These values are from http://www.w3.org/TR/css3-fonts/#font-weight-numeric-values.\n\t * @property FONT_WEIGHT\n\t * @type {Object}\n\t * @static\n\t */\n\tFontLoader.FONT_WEIGHT = {thin:100, extralight:200, ultralight:200, light:300, semilight:300, demilight:300, book:\"normal\", regular:\"normal\", semibold:600, demibold:600, extrabold:800, ultrabold:800, black:900, heavy:900};\n\n\t/**\n\t * The frequency in milliseconds to check for loaded fonts.\n\t * @property WATCH_DURATION\n\t * @type {number}\n\t * @default 10\n\t * @static\n\t */\n\tFontLoader.WATCH_DURATION = 10;\n// public methods:\n\tp.load = function() {\n\t\tif (this.type == createjs.Types.FONTCSS) {\n\t\t\tvar loaded = this._watchCSS();\n\n\t\t\t// If the CSS is not ready, it will create a request, which AbstractLoader can handle.\n\t\t\tif (!loaded) {\n\t\t\t\tthis.AbstractLoader_load();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else if (this._item.src instanceof Array) {\n\t\t\tthis._watchFontArray();\n\t\t} else {\n\t\t\tvar def = this._defFromSrc(this._item.src);\n\t\t\tthis._watchFont(def);\n\t\t\tthis._injectStyleTag(this._cssFromDef(def));\n\t\t}\n\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\n\t\tthis.dispatchEvent(\"loadstart\");\n\t};\n\n\t/**\n\t * The font load has timed out. This is called via a <code>setTimeout</code>.\n\t * callback.\n\t * @method _handleTimeout\n\t * @protected\n\t */\n\tp._handleTimeout = function () {\n\t\tthis._stopWatching();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_TIMEOUT\"));\n\t};\n\n\t// WatchCSS does the work for us, and provides a modified src.\n\tp._createRequest = function() {\n\t\treturn this._request;\n\t};\n\n\t// Events come from the internal XHR loader.\n\tp.handleEvent = function (event) {\n\t\tswitch (event.type) {\n\t\t\tcase \"complete\":\n\t\t\t\tthis._rawResult = event.target._response;\n\t\t\t\tthis._result = true;\n\t\t\t\tthis._parseCSS(this._rawResult);\n\t\t\t\tbreak;\n\n\t\t\tcase \"error\":\n\t\t\t\tthis._stopWatching();\n\t\t\t\tthis.AbstractLoader_handleEvent(event);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n// private methods:\n\t/**\n\t * Determine if the provided CSS is a string definition, CSS HTML element, or a CSS file URI. Depending on the\n\t * format, the CSS will be parsed, or loaded.\n\t * @method _watchCSS\n\t * @returns {boolean} Whether or not the CSS is ready\n\t * @protected\n\t */\n\tp._watchCSS = function() {\n\t\tvar src = this._item.src;\n\n\t\t// An HTMLElement was passed in. Just use it.\n\t\tif (src instanceof HTMLStyleElement) {\n\t\t\tif (this._injectCSS && !src.parentNode) { (document.head || document.getElementsByTagName('head')[0]).appendChild(src); }\n\t\t\tthis._injectCSS = false;\n\t\t\tsrc = \"\\n\"+src.textContent;\n\t\t}\n\n\t\t// A CSS string was passed in. Parse and use it\n\t\tif (src.search(/\\n|\\r|@font-face/i) !== -1) { // css string.\n\t\t\tthis._parseCSS(src);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Load a CSS Path. Note that we CAN NOT load it without XHR because we need to read the CSS definition\n\t\tthis._request = new createjs.XHRRequest(this._item);\n\t\treturn false;\n\t};\n\n\t/**\n\t * Parse a CSS string to determine the fonts to load.\n\t * @method _parseCSS\n\t * @param {String} css The CSS string to parse\n\t * @protected\n\t */\n\tp._parseCSS = function(css) {\n\t\tvar regex = /@font-face\\s*\\{([^}]+)}/g\n\t\twhile (true) {\n\t\t\tvar result = regex.exec(css);\n\t\t\tif (!result) { break; }\n\t\t\tthis._watchFont(this._parseFontFace(result[1]));\n\t\t}\n\t\tthis._injectStyleTag(css);\n\t};\n\n\t/**\n\t * The provided fonts were an array of object or string definitions. Parse them, and inject any that are ready.\n\t * @method _watchFontArray\n\t * @protected\n\t */\n\tp._watchFontArray = function() {\n\t\tvar arr = this._item.src, css = \"\", def;\n\t\tfor (var i=arr.length-1; i>=0; i--) {\n\t\t\tvar o = arr[i];\n\t\t\tif (typeof o === \"string\") { def = this._defFromSrc(o) }\n\t\t\telse { def = this._defFromObj(o); }\n\t\t\tthis._watchFont(def);\n\t\t\tcss += this._cssFromDef(def)+\"\\n\";\n\t\t}\n\t\tthis._injectStyleTag(css);\n\t};\n\n\t/**\n\t * Inject any style definitions into the document head. This is necessary when the definition is just a string or\n\t * object definition in order for the styles to be applied to the document. If the loaded fonts are already HTML CSS\n\t * elements, they don't need to be appended again.\n\t * @method _injectStyleTag\n\t * @param {String} css The CSS string content to be appended to the\n\t * @protected\n\t */\n\tp._injectStyleTag = function(css) {\n\t\tif (!this._injectCSS) { return; }\n\t\tvar head = document.head || document.getElementsByTagName('head')[0];\n\t\tvar styleTag = document.createElement(\"style\");\n\t\tstyleTag.type = \"text/css\";\n\t\tif (styleTag.styleSheet){\n\t\t\tstyleTag.styleSheet.cssText = css;\n\t\t} else {\n\t\t\tstyleTag.appendChild(document.createTextNode(css));\n\t\t}\n\t\thead.appendChild(styleTag);\n\t};\n\n\t/**\n\t * Determine the font face from a CSS definition.\n\t * @method _parseFontFace\n\t * @param {String} str The CSS string definition\n\t * @protected\n\t * @return {String} A modified CSS object containing family name, src, style, and weight\n\t */\n\tp._parseFontFace = function(str) {\n\t\tvar family = this._getCSSValue(str, \"font-family\"), src = this._getCSSValue(str, \"src\");\n\t\tif (!family || !src) { return null; }\n\t\treturn this._defFromObj({\n\t\t\tfamily: family,\n\t\t\tsrc: src,\n\t\t\tstyle: this._getCSSValue(str, \"font-style\"),\n\t\t\tweight: this._getCSSValue(str, \"font-weight\")\n\t\t});\n\t};\n\n\t/**\n\t * Add a font to the list of fonts currently being watched. If the font is already watched or loaded, it won't be\n\t * added again.\n\t * @method _watchFont\n\t * @param {Object} def The font definition\n\t * @protected\n\t */\n\tp._watchFont = function(def) {\n\t\tif (!def || this._faces[def.id]) { return; }\n\t\tthis._faces[def.id] = def;\n\t\tthis._watched.push(def);\n\t\tthis._count++;\n\n\t\tthis._calculateReferenceSizes(def);\n\t\tthis._startWatching();\n\t};\n\n\t/**\n\t * Create a interval to check for loaded fonts. Only one interval is used for all fonts. The fonts are checked based\n\t * on the {{#crossLink \"FontLoader/WATCH_DURATION:property\"}}{{/crossLink}}.\n\t * @method _startWatching\n\t * @protected\n\t */\n\tp._startWatching = function() {\n\t\tif (this._watchInterval != null) { return; }\n\t\tthis._watchInterval = setInterval(createjs.proxy(this._watch, this), FontLoader.WATCH_DURATION);\n\t};\n\n\t/**\n\t * Clear the interval used to check fonts. This happens when all fonts are loaded, or an error occurs, such as a\n\t * CSS file error, or a load timeout.\n\t * @method _stopWatching\n\t * @protected\n\t */\n\tp._stopWatching = function() {\n\t\tclearInterval(this._watchInterval);\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis._watchInterval = null;\n\t};\n\n\t/**\n\t * Check all the fonts that have not been loaded. The fonts are drawn to a canvas in memory, and if their font size\n\t * varies from the default text size, then the font is considered loaded.\n\t *\n\t * A {{#crossLink \"AbstractLoader/fileload\"}}{{/crossLink}} event will be dispatched when each file is loaded, along\n\t * with the font family name as the `item` value. A {{#crossLink \"ProgressEvent\"}}{{/crossLink}} is dispatched a\n\t * maximum of one time per check when any fonts are loaded, with the {{#crossLink \"ProgressEvent/progress:property\"}}{{/crossLink}}\n\t * value showing the percentage of fonts that have loaded.\n\t * @method _watch\n\t * @protected\n\t */\n\tp._watch = function() {\n\t\tvar defs = this._watched, refFonts = FontLoader._referenceFonts, l = defs.length;\n\t\tfor (var i = l - 1; i >= 0; i--) {\n\t\t\tvar def = defs[i], refs = def.refs;\n\t\t\tfor (var j = refs.length - 1; j >= 0; j--) {\n\t\t\t\tvar w = this._getTextWidth(def.family + \",\" + refFonts[j], def.weight, def.style);\n\t\t\t\tif (w != refs[j]) {\n\t\t\t\t\tvar event = new createjs.Event(\"fileload\");\n\t\t\t\t\tdef.type = \"font-family\";\n\t\t\t\t\tevent.item = def;\n\t\t\t\t\tthis.dispatchEvent(event);\n\t\t\t\t\tdefs.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (l !== defs.length) {\n\t\t\tvar event = new createjs.ProgressEvent(this._count-defs.length, this._count);\n\t\t\tthis.dispatchEvent(event);\n\t\t}\n\t\tif (l === 0) {\n\t\t\tthis._stopWatching();\n\t\t\tthis._sendComplete();\n\t\t}\n\t};\n\n\t/**\n\t * Determine the default size of the reference fonts used to compare against loaded fonts.\n\t * @method _calculateReferenceSizes\n\t * @param {Object} def The font definition to get the size of.\n\t * @protected\n\t */\n\tp._calculateReferenceSizes = function(def) {\n\t\tvar refFonts = FontLoader._referenceFonts;\n\t\tvar refs = def.refs = [];\n\t\tfor (var i=0; i<refFonts.length; i++) {\n\t\t\trefs[i] = this._getTextWidth(refFonts[i], def.weight, def.style);\n\t\t}\n\t};\n\n\t/**\n\t * Get a CSS definition from a font source and name.\n\t * @method _defFromSrc\n\t * @param {String} src The font source\n\t * @protected\n\t */\n\tp._defFromSrc = function(src) {\n\t\tvar re = /[- ._]+/g, name = src, ext = null, index;\n\t\t\n\t\tindex = name.search(/[?#]/);\n\t\tif (index !== -1) {\n\t\t\tname = name.substr(0,index);\n\t\t}\n\t\tindex = name.lastIndexOf(\".\");\n\t\tif (index !== -1) {\n\t\t\text = name.substr(index+1);\n\t\t\tname = name.substr(0,index);\n\t\t}\n\t\tindex = name.lastIndexOf(\"/\");\n\t\tif (index !== -1) {\n\t\t\tname = name.substr(index+1);\n\t\t}\n\t\t\n\t\tvar family = name,\n\t\t\t\tweight = family.match(FontLoader.WEIGHT_REGEX);\n\t\tif (weight) {\n\t\t\tweight = weight[0];\n\t\t\tfamily = family.replace(weight, \"\");\n\t\t\tweight = weight.replace(re, \"\").toLowerCase();\n\t\t}\n\t\tvar style = name.match(FontLoader.STYLE_REGEX);\n\t\tif (style) {\n\t\t\tfamily = family.replace(style[0], \"\");\n\t\t\tstyle = \"italic\";\n\t\t}\n\t\tfamily = family.replace(re, \"\");\n\t\t\n\t\tvar cssSrc = \"local('\"+name.replace(re,\" \")+\"'), url('\"+src+\"')\";\n\t\tvar format = FontLoader.FONT_FORMAT[ext];\n\t\tif (format) { cssSrc += \" format('\"+format+\"')\"; }\n\t\t\n\t\treturn this._defFromObj({\n\t\t\tfamily: family,\n\t\t\tweight: FontLoader.FONT_WEIGHT[weight]||weight,\n\t\t\tstyle: style,\n\t\t\tsrc: cssSrc\n\t\t});\n\t};\n\n\t/**\n\t * Get a font definition from a raw font object.\n\t * @method _defFromObj\n\t * @param {Object} o A raw object provided to the FontLoader\n\t * @returns {Object} A standard font object that the FontLoader understands\n\t * @protected\n\t */\n\tp._defFromObj = function(o) {\n\t\tvar def = {\n\t\t\tfamily: o.family,\n\t\t\tsrc: o.src,\n\t\t\tstyle: o.style || \"normal\",\n\t\t\tweight: o.weight || \"normal\"\n\t\t};\n\t\tdef.id = def.family + \";\" + def.style + \";\" + def.weight;\n\t\treturn def;\n\t};\n\n\t/**\n\t * Get CSS from a font definition.\n\t * @method _cssFromDef\n\t * @param {Object} def A font definition\n\t * @returns {string} A CSS string representing the object\n\t * @protected\n\t */\n\tp._cssFromDef = function(def) {\n\t\treturn \"@font-face {\\n\" +\n\t\t\t\"\\tfont-family: '\"+def.family+\"';\\n\" +\n\t\t\t\"\\tfont-style: \"+def.style+\";\\n\" +\n\t\t\t\"\\tfont-weight: \"+def.weight+\";\\n\" +\n\t\t\t\"\\tsrc: \"+def.src+\";\\n\" +\n\t\t\t\"}\";\n\t};\n\n\t/**\n\t * Get the text width of text using the family, weight, and style\n\t * @method _getTextWidth\n\t * @param {String} family The font family\n\t * @param {String} weight The font weight\n\t * @param {String} style The font style\n\t * @returns {Number} The pixel measurement of the font.\n\t * @protected\n\t */\n\tp._getTextWidth = function(family, weight, style) {\n\t\tvar ctx = FontLoader._ctx;\n\t\tctx.font = style+\" \"+weight+\" 72px \"+family;\n\t\treturn ctx.measureText(FontLoader.sampleText).width;\n\t};\n\n\t/**\n\t * Get the value of a property from a CSS string. For example, searches a CSS string for the value of the\n\t * \"font-family\" property.\n\t * @method _getCSSValue\n\t * @param {String} str The CSS string to search\n\t * @param {String} propName The property name to get the value for\n\t * @returns {String} The value in the CSS for the provided property name\n\t * @protected\n\t */\n\tp._getCSSValue = function(str, propName) {\n\t\tvar regex = new RegExp(propName+\":\\s*([^;}]+?)\\s*[;}]\");\n\t\tvar result = regex.exec(str);\n\t\tif (!result || !result[1]) { return null; }\n\t\treturn result[1];\n\t};\n\n\tcreatejs.FontLoader = createjs.promote(FontLoader, \"AbstractLoader\");\n\n})();\n\n//##############################################################################\n// ImageLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for image files.\n\t * @class ImageLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction ImageLoader (loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.IMAGE);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"src\";\n\n\t\t// Check if the preload item is already a tag.\n\t\tif (createjs.DomUtils.isImageTag(loadItem)) {\n\t\t\tthis._tag = loadItem;\n\t\t} else if (createjs.DomUtils.isImageTag(loadItem.src)) {\n\t\t\tthis._tag = loadItem.src;\n\t\t} else if (createjs.DomUtils.isImageTag(loadItem.tag)) {\n\t\t\tthis._tag = loadItem.tag;\n\t\t}\n\n\t\tif (this._tag != null) {\n\t\t\tthis._preferXHR = false;\n\t\t} else {\n\t\t\tthis._tag = createjs.Elements.img();\n\t\t}\n\n\t\tthis.on(\"initialize\", this._updateXHR, this);\n\t};\n\n\tvar p = createjs.extend(ImageLoader, createjs.AbstractLoader);\n\tvar s = ImageLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/IMAGE:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.IMAGE;\n\t};\n\n\t// public methods\n\tp.load = function () {\n\t\tif (this._tag.src != \"\" && this._tag.complete) {\n\t\t\tthis._sendComplete();\n\t\t\treturn;\n\t\t}\n\n\t\tvar crossOrigin = this._item.crossOrigin;\n\t\tif (crossOrigin == true) { crossOrigin = \"Anonymous\"; }\n\t\tif (crossOrigin != null && !createjs.URLUtils.isLocal(this._item)) {\n\t\t\tthis._tag.crossOrigin = crossOrigin;\n\t\t}\n\n\t\tthis.AbstractLoader_load();\n\t};\n\n\t// protected methods\n\t/**\n\t * Before the item loads, set its mimeType and responseType.\n\t * @property _updateXHR\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._updateXHR = function (event) {\n\t\tevent.loader.mimeType = 'text/plain; charset=x-user-defined-binary';\n\n\t\t// Only exists for XHR\n\t\tif (event.loader.setResponseType) {\n\t\t\tevent.loader.setResponseType(\"blob\");\n\t\t}\n\t};\n\n\t/**\n\t * The result formatter for Image files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLImageElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\treturn this._formatImage;\n\t};\n\n\t/**\n\t * The asynchronous image formatter function. This is required because images have\n\t * a short delay before they are ready.\n\t * @method _formatImage\n\t * @param {Function} successCallback The method to call when the result has finished formatting\n\t * @param {Function} errorCallback The method to call if an error occurs during formatting\n\t * @private\n\t */\n\tp._formatImage = function (successCallback, errorCallback) {\n\t\tvar tag = this._tag;\n\t\tvar URL = window.URL || window.webkitURL;\n\n\t\tif (!this._preferXHR) {\n\n\t\t\t//document.body.removeChild(tag);\n\t\t} else if (URL) {\n\t\t\tvar objURL = URL.createObjectURL(this.getResult(true));\n\t\t\ttag.src = objURL;\n\n\t\t\ttag.addEventListener(\"load\", this._cleanUpURL, false);\n\t\t\ttag.addEventListener(\"error\", this._cleanUpURL, false);\n\t\t} else {\n\t\t\ttag.src = this._item.src;\n\t\t}\n\n\t\tif (tag.complete) {\n\t\t\tsuccessCallback(tag);\n\t\t} else {\n            tag.onload = createjs.proxy(function() {\n                successCallback(this._tag);\n                tag.onload = tag.onerror = null;\n            }, this);\n\n            tag.onerror = createjs.proxy(function(event) {\n                errorCallback(new createjs.ErrorEvent('IMAGE_FORMAT', null, event));\n                tag.onload = tag.onerror = null;\n            }, this);\n\t\t}\n\t};\n\n\t/**\n\t * Clean up the ObjectURL, the tag is done with it. Note that this function is run\n\t * as an event listener without a proxy/closure, as it doesn't require it - so do not\n\t * include any functionality that requires scope without changing it.\n\t * @method _cleanUpURL\n\t * @param event\n\t * @private\n\t */\n\tp._cleanUpURL = function (event) {\n\t\tvar URL = window.URL || window.webkitURL;\n\t\tURL.revokeObjectURL(event.target.src);\n\t};\n\n\tcreatejs.ImageLoader = createjs.promote(ImageLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// JavaScriptLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for JavaScript files.\n\t * @class JavaScriptLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction JavaScriptLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.JAVASCRIPT);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"src\";\n\t\tthis.setTag(createjs.Elements.script());\n\t};\n\n\tvar p = createjs.extend(JavaScriptLoader, createjs.AbstractLoader);\n\tvar s = JavaScriptLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/JAVASCRIPT:property\"}}{{/crossLink}}\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.JAVASCRIPT;\n\t};\n\n\t// protected methods\n\t/**\n\t * The result formatter for JavaScript files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLLinkElement|HTMLStyleElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\tvar tag = loader.getTag();\n\t\tif (this._preferXHR) {\n\t\t\ttag.text = loader.getResult(true);\n\t\t}\n\t\treturn tag;\n\t};\n\n\tcreatejs.JavaScriptLoader = createjs.promote(JavaScriptLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// JSONLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for JSON files. To load JSON cross-domain, use JSONP and the {{#crossLink \"JSONPLoader\"}}{{/crossLink}}\n\t * instead. To load JSON-formatted manifests, use {{#crossLink \"ManifestLoader\"}}{{/crossLink}}, and to\n\t * load EaselJS SpriteSheets, use {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}}.\n\t * @class JSONLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction JSONLoader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.JSON);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\t};\n\n\tvar p = createjs.extend(JSONLoader, createjs.AbstractLoader);\n\tvar s = JSONLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/JSON:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.JSON;\n\t};\n\n\t// protected methods\n\t/**\n\t * The result formatter for JSON files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLLinkElement|HTMLStyleElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\tvar json = null;\n\t\ttry {\n\t\t\tjson = createjs.DataUtils.parseJSON(loader.getResult(true));\n\t\t} catch (e) {\n\t\t\tvar event = new createjs.ErrorEvent(\"JSON_FORMAT\", null, e);\n\t\t\tthis._sendError(event);\n\t\t\treturn e;\n\t\t}\n\n\t\treturn json;\n\t};\n\n\tcreatejs.JSONLoader = createjs.promote(JSONLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// JSONPLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for JSONP files, which are JSON-formatted text files, wrapped in a callback. To load regular JSON\n\t * without a callback use the {{#crossLink \"JSONLoader\"}}{{/crossLink}} instead. To load JSON-formatted manifests,\n\t * use {{#crossLink \"ManifestLoader\"}}{{/crossLink}}, and to load EaselJS SpriteSheets, use\n\t * {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}}.\n\t *\n\t * JSONP is a format that provides a solution for loading JSON files cross-domain <em>without</em> requiring CORS.\n\t * JSONP files are loaded as JavaScript, and the \"callback\" is executed once they are loaded. The callback in the\n\t * JSONP must match the callback passed to the loadItem.\n\t *\n\t * <h4>Example JSONP</h4>\n\t *\n\t * \t\tcallbackName({\n\t * \t\t\t\"name\": \"value\",\n\t *\t \t\t\"num\": 3,\n\t *\t\t\t\"obj\": { \"bool\":true }\n\t * \t\t});\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \t\tvar loadItem = {id:\"json\", type:\"jsonp\", src:\"http://server.com/text.json\", callback:\"callbackName\"}\n\t * \t\tvar queue = new createjs.LoadQueue();\n\t * \t\tqueue.on(\"complete\", handleComplete);\n\t * \t\tqueue.loadItem(loadItem);\n\t *\n\t * \t\tfunction handleComplete(event) }\n\t * \t\t\tvar json = queue.getResult(\"json\");\n\t * \t\t\tconsole.log(json.obj.bool); // true\n\t * \t\t}\n\t *\n\t * JSONP files loaded concurrently require a <em>unique</em> callback. To ensure JSONP files are loaded in order,\n\t * either use the {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}} method (set to 1), or set\n\t * {{#crossLink \"LoadItem/maintainOrder:property\"}}{{/crossLink}} on items with the same callback.\n\t *\n\t * Important note: Some browsers will prevent JSONP from firing the callback if the file was loaded as JSON, and not\n\t * JavaScript. You may have to have your server give you a JavaScript mime-type for this to work.\n\t *\n\t * @class JSONPLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction JSONPLoader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, false, createjs.Types.JSONP);\n\t\tthis.setTag(createjs.Elements.script());\n\t\tthis.getTag().type = \"text/javascript\";\n\t};\n\n\tvar p = createjs.extend(JSONPLoader, createjs.AbstractLoader);\n\tvar s = JSONPLoader;\n\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/JSONP:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.JSONP;\n\t};\n\n\t// public methods\n\tp.cancel = function () {\n\t\tthis.AbstractLoader_cancel();\n\t\tthis._dispose();\n\t};\n\n\t/**\n\t * Loads the JSONp file.  Because of the unique loading needs of JSONp\n\t * we don't use the AbstractLoader.load() method.\n\t *\n\t * @method load\n\t *\n\t */\n\tp.load = function () {\n\t\tif (this._item.callback == null) {\n\t\t\tthrow new Error('callback is required for loading JSONP requests.');\n\t\t}\n\n\t\t// TODO: Look into creating our own iFrame to handle the load\n\t\t// In the first attempt, FF did not get the result\n\t\t//   result instanceof Object did not work either\n\t\t//   so we would need to clone the result.\n\t\tif (window[this._item.callback] != null) {\n\t\t\tthrow new Error(\n\t\t\t\t\"JSONP callback '\" +\n\t\t\t\tthis._item.callback +\n\t\t\t\t\"' already exists on window. You need to specify a different callback or re-name the current one.\");\n\t\t}\n\n\t\twindow[this._item.callback] = createjs.proxy(this._handleLoad, this);\n\t\tcreatejs.DomUtils.appendToBody(this._tag);\n\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\n\t\t// Load the tag\n\t\tthis._tag.src = this._item.src;\n\t};\n\n\t// private methods\n\t/**\n\t * Handle the JSONP callback, which is a public method defined on `window`.\n\t * @method _handleLoad\n\t * @param {Object} data The formatted JSON data.\n\t * @private\n\t */\n\tp._handleLoad = function (data) {\n\t\tthis._result = this._rawResult = data;\n\t\tthis._sendComplete();\n\n\t\tthis._dispose();\n\t};\n\n\t/**\n\t * The tag request has not loaded within the time specfied in loadTimeout.\n\t * @method _handleError\n\t * @param {Object} event The XHR error event.\n\t * @private\n\t */\n\tp._handleTimeout = function () {\n\t\tthis._dispose();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"timeout\"));\n\t};\n\n\t/**\n\t * Clean up the JSONP load. This clears out the callback and script tag that this loader creates.\n\t * @method _dispose\n\t * @private\n\t */\n\tp._dispose = function () {\n\t\tcreatejs.DomUtils.removeChild(this._tag);\n\t\tdelete window[this._item.callback];\n\n\t\tclearTimeout(this._loadTimeout);\n\t};\n\n\tcreatejs.JSONPLoader = createjs.promote(JSONPLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// ManifestLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for JSON manifests. Items inside the manifest are loaded before the loader completes. To load manifests\n\t * using JSONP, specify a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}} as part of the\n\t * {{#crossLink \"LoadItem\"}}{{/crossLink}}.\n\t *\n\t * The list of files in the manifest must be defined on the top-level JSON object in a `manifest` property. This\n\t * example shows a sample manifest definition, as well as how to to include a sub-manifest.\n\t *\n\t * \t\t{\n\t * \t\t\t\"path\": \"assets/\",\n\t *\t \t    \"manifest\": [\n\t *\t\t\t\t\"image.png\",\n\t *\t\t\t\t{\"src\": \"image2.png\", \"id\":\"image2\"},\n\t *\t\t\t\t{\"src\": \"sub-manifest.json\", \"type\":\"manifest\", \"callback\":\"jsonCallback\"}\n\t *\t \t    ]\n\t *\t \t}\n\t *\n\t * When a ManifestLoader has completed loading, the parent loader (usually a {{#crossLink \"LoadQueue\"}}{{/crossLink}},\n\t * but could also be another ManifestLoader) will inherit all the loaded items, so you can access them directly.\n\t *\n\t * Note that the {{#crossLink \"JSONLoader\"}}{{/crossLink}} and {{#crossLink \"JSONPLoader\"}}{{/crossLink}} are\n\t * higher priority loaders, so manifests <strong>must</strong> set the {{#crossLink \"LoadItem\"}}{{/crossLink}}\n\t * {{#crossLink \"LoadItem/type:property\"}}{{/crossLink}} property to {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}.\n\t *\n\t * Additionally, some browsers require the server to serve a JavaScript mime-type for JSONP, so it may not work in\n\t * some conditions.\n\t * @class ManifestLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction ManifestLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.MANIFEST);\n\n\t// Public Properties\n\t\t/**\n\t\t * An array of the plugins registered using {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}},\n\t\t * used to pass plugins to new LoadQueues that may be created.\n\t\t * @property _plugins\n\t\t * @type {Array}\n\t\t * @private\n\t\t * @since 0.6.1\n\t\t */\n\t\tthis.plugins = null;\n\n\n\t// Protected Properties\n\t\t/**\n\t\t * An internal {{#crossLink \"LoadQueue\"}}{{/crossLink}} that loads the contents of the manifest.\n\t\t * @property _manifestQueue\n\t\t * @type {LoadQueue}\n\t\t * @private\n\t\t */\n\t\tthis._manifestQueue = null;\n\t};\n\n\tvar p = createjs.extend(ManifestLoader, createjs.AbstractLoader);\n\tvar s = ManifestLoader;\n\n\t// static properties\n\t/**\n\t * The amount of progress that the manifest itself takes up.\n\t * @property MANIFEST_PROGRESS\n\t * @type {number}\n\t * @default 0.25 (25%)\n\t * @private\n\t * @static\n\t */\n\ts.MANIFEST_PROGRESS = 0.25;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.MANIFEST;\n\t};\n\n\t// public methods\n\tp.load = function () {\n\t\tthis.AbstractLoader_load();\n\t};\n\n\t// protected methods\n\tp._createRequest = function() {\n\t\tvar callback = this._item.callback;\n\t\tif (callback != null) {\n\t\t\tthis._request = new createjs.JSONPLoader(this._item);\n\t\t} else {\n\t\t\tthis._request = new createjs.JSONLoader(this._item);\n\t\t}\n\t};\n\n\tp.handleEvent = function (event) {\n\t\tswitch (event.type) {\n\t\t\tcase \"complete\":\n\t\t\t\tthis._rawResult = event.target.getResult(true);\n\t\t\t\tthis._result = event.target.getResult();\n\t\t\t\tthis._sendProgress(s.MANIFEST_PROGRESS);\n\t\t\t\tthis._loadManifest(this._result);\n\t\t\t\treturn;\n\t\t\tcase \"progress\":\n\t\t\t\tevent.loaded *= s.MANIFEST_PROGRESS;\n\t\t\t\tthis.progress = event.loaded / event.total;\n\t\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\n\t\t\t\tthis._sendProgress(event);\n\t\t\t\treturn;\n\t\t}\n\t\tthis.AbstractLoader_handleEvent(event);\n\t};\n\n\tp.destroy = function() {\n\t\tthis.AbstractLoader_destroy();\n\t\tthis._manifestQueue.close();\n\t};\n\n\t/**\n\t * Create and load the manifest items once the actual manifest has been loaded.\n\t * @method _loadManifest\n\t * @param {Object} json\n\t * @private\n\t */\n\tp._loadManifest = function (json) {\n\t\tif (json && json.manifest) {\n\t\t\tvar queue = this._manifestQueue = new createjs.LoadQueue(this._preferXHR);\n\t\t\tqueue.on(\"fileload\", this._handleManifestFileLoad, this);\n\t\t\tqueue.on(\"progress\", this._handleManifestProgress, this);\n\t\t\tqueue.on(\"complete\", this._handleManifestComplete, this, true);\n\t\t\tqueue.on(\"error\", this._handleManifestError, this, true);\n\t\t\tfor(var i = 0, l = this.plugins.length; i < l; i++) {\t// conserve order of plugins\n\t\t\t\tqueue.installPlugin(this.plugins[i]);\n\t\t\t}\n\t\t\tqueue.loadManifest(json);\n\t\t} else {\n\t\t\tthis._sendComplete();\n\t\t}\n\t};\n\n\t/**\n\t * An item from the {{#crossLink \"_manifestQueue:property\"}}{{/crossLink}} has completed.\n\t * @method _handleManifestFileLoad\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._handleManifestFileLoad = function (event) {\n\t\tevent.target = null;\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * The manifest has completed loading. This triggers the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}\n\t * {{#crossLink \"Event\"}}{{/crossLink}} from the ManifestLoader.\n\t * @method _handleManifestComplete\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._handleManifestComplete = function (event) {\n\t\tthis._loadedItems = this._manifestQueue.getItems(true);\n\t\tthis._sendComplete();\n\t};\n\n\t/**\n\t * The manifest has reported progress.\n\t * @method _handleManifestProgress\n\t * @param {ProgressEvent} event\n\t * @private\n\t */\n\tp._handleManifestProgress = function (event) {\n\t\tthis.progress = event.progress * (1 - s.MANIFEST_PROGRESS) + s.MANIFEST_PROGRESS;\n\t\tthis._sendProgress(this.progress);\n\t};\n\n\t/**\n\t * The manifest has reported an error with one of the files.\n\t * @method _handleManifestError\n\t * @param {ErrorEvent} event\n\t * @private\n\t */\n\tp._handleManifestError = function (event) {\n\t\tvar newEvent = new createjs.Event(\"fileerror\");\n\t\tnewEvent.item = event.data;\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\tcreatejs.ManifestLoader = createjs.promote(ManifestLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// SoundLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for HTML audio files. PreloadJS can not load WebAudio files, as a WebAudio context is required, which\n\t * should be created by either a library playing the sound (such as <a href=\"http://soundjs.com\">SoundJS</a>, or an\n\t * external framework that handles audio playback. To load content that can be played by WebAudio, use the\n\t * {{#crossLink \"BinaryLoader\"}}{{/crossLink}}, and handle the audio context decoding manually.\n\t * @class SoundLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractMediaLoader\n\t * @constructor\n\t */\n\tfunction SoundLoader(loadItem, preferXHR) {\n\t\tthis.AbstractMediaLoader_constructor(loadItem, preferXHR, createjs.Types.SOUND);\n\n\t\t// protected properties\n\t\tif (createjs.DomUtils.isAudioTag(loadItem)) {\n\t\t\tthis._tag = loadItem;\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.src)) {\n\t\t\tthis._tag = loadItem;\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.tag)) {\n\t\t\tthis._tag = createjs.DomUtils.isAudioTag(loadItem) ? loadItem : loadItem.src;\n\t\t}\n\n\t\tif (this._tag != null) {\n\t\t\tthis._preferXHR = false;\n\t\t}\n\t};\n\n\tvar p = createjs.extend(SoundLoader, createjs.AbstractMediaLoader);\n\tvar s = SoundLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/SOUND:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.SOUND;\n\t};\n\n\t// protected methods\n\tp._createTag = function (src) {\n\t\tvar tag = createjs.Elements.audio();\n\t\ttag.autoplay = false;\n\t\ttag.preload = \"none\";\n\n\t\t//LM: Firefox fails when this the preload=\"none\" for other tags, but it needs to be \"none\" to ensure PreloadJS works.\n\t\ttag.src = src;\n\t\treturn tag;\n\t};\n\n\tcreatejs.SoundLoader = createjs.promote(SoundLoader, \"AbstractMediaLoader\");\n\n}());\n\n//##############################################################################\n// VideoLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for video files.\n\t * @class VideoLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractMediaLoader\n\t * @constructor\n\t */\n\tfunction VideoLoader(loadItem, preferXHR) {\n\t\tthis.AbstractMediaLoader_constructor(loadItem, preferXHR, createjs.Types.VIDEO);\n\n\t\tif (createjs.DomUtils.isVideoTag(loadItem) || createjs.DomUtils.isVideoTag(loadItem.src)) {\n\t\t\tthis.setTag(createjs.DomUtils.isVideoTag(loadItem)?loadItem:loadItem.src);\n\n\t\t\t// We can't use XHR for a tag that's passed in.\n\t\t\tthis._preferXHR = false;\n\t\t} else {\n\t\t\tthis.setTag(this._createTag());\n\t\t}\n\t};\n\n\tvar p = createjs.extend(VideoLoader, createjs.AbstractMediaLoader);\n\tvar s = VideoLoader;\n\n\t/**\n\t * Create a new video tag\n\t *\n\t * @returns {HTMLElement}\n\t * @private\n\t */\n\tp._createTag = function () {\n\t\treturn createjs.Elements.video();\n\t};\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/VIDEO:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.VIDEO;\n\t};\n\n\tcreatejs.VideoLoader = createjs.promote(VideoLoader, \"AbstractMediaLoader\");\n\n}());\n\n//##############################################################################\n// SpriteSheetLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for EaselJS SpriteSheets. Images inside the spritesheet definition are loaded before the loader\n\t * completes. To load SpriteSheets using JSONP, specify a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}}\n\t * as part of the {{#crossLink \"LoadItem\"}}{{/crossLink}}. Note that the {{#crossLink \"JSONLoader\"}}{{/crossLink}}\n\t * and {{#crossLink \"JSONPLoader\"}}{{/crossLink}} are higher priority loaders, so SpriteSheets <strong>must</strong>\n\t * set the {{#crossLink \"LoadItem\"}}{{/crossLink}} {{#crossLink \"LoadItem/type:property\"}}{{/crossLink}} property\n\t * to {{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}.\n\t *\n\t * The {{#crossLink \"LoadItem\"}}{{/crossLink}} {{#crossLink \"LoadItem/crossOrigin:property\"}}{{/crossLink}} as well\n\t * as the {{#crossLink \"LoadQueue's\"}}{{/crossLink}} `basePath` argument and {{#crossLink \"LoadQueue/_preferXHR\"}}{{/crossLink}}\n\t * property supplied to the {{#crossLink \"LoadQueue\"}}{{/crossLink}} are passed on to the sub-manifest that loads\n\t * the SpriteSheet images.\n\t *\n\t * Note that the SpriteSheet JSON does not respect the {{#crossLink \"LoadQueue/_preferXHR:property\"}}{{/crossLink}}\n\t * property, which should instead be determined by the presence of a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}}\n\t * property on the SpriteSheet load item. This is because the JSON loaded will have a different format depending on\n\t * if it is loaded as JSON, so just changing `preferXHR` is not enough to change how it is loaded.\n\t * @class SpriteSheetLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction SpriteSheetLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.SPRITESHEET);\n\n\t\t// protected properties\n\t\t/**\n\t\t * An internal queue which loads the SpriteSheet's images.\n\t\t * @method _manifestQueue\n\t\t * @type {LoadQueue}\n\t\t * @private\n\t\t */\n\t\tthis._manifestQueue = null;\n\t}\n\n\tvar p = createjs.extend(SpriteSheetLoader, createjs.AbstractLoader);\n\tvar s = SpriteSheetLoader;\n\n\t// static properties\n\t/**\n\t * The amount of progress that the manifest itself takes up.\n\t * @property SPRITESHEET_PROGRESS\n\t * @type {number}\n\t * @default 0.25 (25%)\n\t * @private\n\t * @static\n\t */\n\ts.SPRITESHEET_PROGRESS = 0.25;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.SPRITESHEET;\n\t};\n\n\t// public methods\n\tp.destroy = function() {\n\t\tthis.AbstractLoader_destroy();\n\t\tthis._manifestQueue.close();\n\t};\n\n\t// protected methods\n\tp._createRequest = function() {\n\t\tvar callback = this._item.callback;\n\t\tif (callback != null) {\n\t\t\tthis._request = new createjs.JSONPLoader(this._item);\n\t\t} else {\n\t\t\tthis._request = new createjs.JSONLoader(this._item);\n\t\t}\n\t};\n\n\tp.handleEvent = function (event) {\n\t\tswitch (event.type) {\n\t\t\tcase \"complete\":\n\t\t\t\tthis._rawResult = event.target.getResult(true);\n\t\t\t\tthis._result = event.target.getResult();\n\t\t\t\tthis._sendProgress(s.SPRITESHEET_PROGRESS);\n\t\t\t\tthis._loadManifest(this._result);\n\t\t\t\treturn;\n\t\t\tcase \"progress\":\n\t\t\t\tevent.loaded *= s.SPRITESHEET_PROGRESS;\n\t\t\t\tthis.progress = event.loaded / event.total;\n\t\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\n\t\t\t\tthis._sendProgress(event);\n\t\t\t\treturn;\n\t\t}\n\t\tthis.AbstractLoader_handleEvent(event);\n\t};\n\n\t/**\n\t * Create and load the images once the SpriteSheet JSON has been loaded.\n\t * @method _loadManifest\n\t * @param {Object} json\n\t * @private\n\t */\n\tp._loadManifest = function (json) {\n\t\tif (json && json.images) {\n\t\t\tvar queue = this._manifestQueue = new createjs.LoadQueue(this._preferXHR, this._item.path, this._item.crossOrigin);\n\t\t\tqueue.on(\"complete\", this._handleManifestComplete, this, true);\n\t\t\tqueue.on(\"fileload\", this._handleManifestFileLoad, this);\n\t\t\tqueue.on(\"progress\", this._handleManifestProgress, this);\n\t\t\tqueue.on(\"error\", this._handleManifestError, this, true);\n\t\t\tqueue.loadManifest(json.images);\n\t\t}\n\t};\n\n\t/**\n\t * An item from the {{#crossLink \"_manifestQueue:property\"}}{{/crossLink}} has completed.\n\t * @method _handleManifestFileLoad\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._handleManifestFileLoad = function (event) {\n\t\tvar image = event.result;\n\t\tif (image != null) {\n\t\t\tvar images = this.getResult().images;\n\t\t\tvar pos = images.indexOf(event.item.src);\n\t\t\timages[pos] = image;\n\t\t}\n\t};\n\n\t/**\n\t * The images have completed loading. This triggers the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}\n\t * {{#crossLink \"Event\"}}{{/crossLink}} from the SpriteSheetLoader.\n\t * @method _handleManifestComplete\n\t * @param {Event} event\n\t * @private\n\t */\n\tp._handleManifestComplete = function (event) {\n\t\tthis._result = new createjs.SpriteSheet(this._result);\n\t\tthis._loadedItems = this._manifestQueue.getItems(true);\n\t\tthis._sendComplete();\n\t};\n\n\t/**\n\t * The images {{#crossLink \"LoadQueue\"}}{{/crossLink}} has reported progress.\n\t * @method _handleManifestProgress\n\t * @param {ProgressEvent} event\n\t * @private\n\t */\n\tp._handleManifestProgress = function (event) {\n\t\tthis.progress = event.progress * (1 - s.SPRITESHEET_PROGRESS) + s.SPRITESHEET_PROGRESS;\n\t\tthis._sendProgress(this.progress);\n\t};\n\n\t/**\n\t * An image has reported an error.\n\t * @method _handleManifestError\n\t * @param {ErrorEvent} event\n\t * @private\n\t */\n\tp._handleManifestError = function (event) {\n\t\tvar newEvent = new createjs.Event(\"fileerror\");\n\t\tnewEvent.item = event.data;\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\tcreatejs.SpriteSheetLoader = createjs.promote(SpriteSheetLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// SVGLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for SVG files.\n\t * @class SVGLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction SVGLoader(loadItem, preferXHR) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.SVG);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"data\";\n\n\t\tif (preferXHR) {\n\t\t\tthis.setTag(createjs.Elements.svg());\n\t\t} else {\n\t\t\tthis.setTag(createjs.Elements.object());\n\t\t\tthis.getTag().type = \"image/svg+xml\";\n\t\t}\n\t};\n\n\tvar p = createjs.extend(SVGLoader, createjs.AbstractLoader);\n\tvar s = SVGLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/SVG:property\"}}{{/crossLink}}\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.SVG;\n\t};\n\n\t// protected methods\n\t/**\n\t * The result formatter for SVG files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {Object}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\t// mime should be image/svg+xml, but Opera requires text/xml\n\t\tvar xml = createjs.DataUtils.parseXML(loader.getResult(true));\n\t\tvar tag = loader.getTag();\n\n\t\tif (!this._preferXHR && document.body.contains(tag)) {\n\t\t\tdocument.body.removeChild(tag);\n\t\t}\n\n\t\tif (xml.documentElement != null) {\n\t\t\tvar element = xml.documentElement;\n\t\t\t// Support loading an SVG from a different domain in ID\n\t\t\tif (document.importNode) {\n\t\t\t\telement = document.importNode(element, true);\n\t\t\t}\n\t\t\ttag.appendChild(element);\n\t\t\treturn tag;\n\t\t} else { // For browsers that don't support SVG, just give them the XML. (IE 9-8)\n\t\t\treturn xml;\n\t\t}\n\t};\n\n\tcreatejs.SVGLoader = createjs.promote(SVGLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// XMLLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for CSS files.\n\t * @class XMLLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction XMLLoader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.XML);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\t};\n\n\tvar p = createjs.extend(XMLLoader, createjs.AbstractLoader);\n\tvar s = XMLLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/XML:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.XML;\n\t};\n\n\t// protected methods\n\t/**\n\t * The result formatter for XML files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {XMLDocument}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\treturn createjs.DataUtils.parseXML(loader.getResult(true));\n\t};\n\n\tcreatejs.XMLLoader = createjs.promote(XMLLoader, \"AbstractLoader\");\n\n}());\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/latest-createjs/lib/preloadjs/preloadjs.js?");

/***/ }),

/***/ "./node_modules/latest-createjs/lib/soundjs/soundjs.js":
/*!*************************************************************!*\
  !*** ./node_modules/latest-createjs/lib/soundjs/soundjs.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*!\n* SoundJS\n* Visit http://createjs.com/ for documentation, updates and examples.\n*\n* Copyright (c) 2010 gskinner.com, inc.\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n//##############################################################################\n// version.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\n\t/**\n\t * Static class holding library specific information such as the version and buildDate of the library.\n\t * The SoundJS class has been renamed {{#crossLink \"Sound\"}}{{/crossLink}}.  Please see {{#crossLink \"Sound\"}}{{/crossLink}}\n\t * for information on using sound.\n\t * @class SoundJS\n\t **/\n\tvar s = createjs.SoundJS = createjs.SoundJS || {};\n\n\t/**\n\t * The version string for this release.\n\t * @property version\n\t * @type String\n\t * @static\n\t **/\n\ts.version = /*=version*/\"1.0.0\"; // injected by build process\n\n\t/**\n\t * The build date for this release in UTC format.\n\t * @property buildDate\n\t * @type String\n\t * @static\n\t **/\n\ts.buildDate = /*=date*/\"Tue, 10 Oct 2017 12:24:35 GMT\"; // injected by build process\n\n})();\n\n//##############################################################################\n// extend.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Sets up the prototype chain and constructor property for a new class.\n *\n * This should be called right after creating the class constructor.\n *\n * \tfunction MySubClass() {}\n * \tcreatejs.extend(MySubClass, MySuperClass);\n * \tMySubClass.prototype.doSomething = function() { }\n *\n * \tvar foo = new MySubClass();\n * \tconsole.log(foo instanceof MySuperClass); // true\n * \tconsole.log(foo.prototype.constructor === MySubClass); // true\n *\n * @method extend\n * @param {Function} subclass The subclass.\n * @param {Function} superclass The superclass to extend.\n * @return {Function} Returns the subclass's new prototype.\n */\ncreatejs.extend = function(subclass, superclass) {\n\t\"use strict\";\n\n\tfunction o() { this.constructor = subclass; }\n\to.prototype = superclass.prototype;\n\treturn (subclass.prototype = new o());\n};\n\n//##############################################################################\n// promote.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\n * It is recommended to use the super class's name as the prefix.\n * An alias to the super class's constructor is always added in the format `prefix_constructor`.\n * This allows the subclass to call super class methods without using `function.call`, providing better performance.\n *\n * For example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\n * would add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\n * prototype of `MySubClass` as `MySuperClass_draw`.\n *\n * This should be called after the class's prototype is fully defined.\n *\n * \tfunction ClassA(name) {\n * \t\tthis.name = name;\n * \t}\n * \tClassA.prototype.greet = function() {\n * \t\treturn \"Hello \"+this.name;\n * \t}\n *\n * \tfunction ClassB(name, punctuation) {\n * \t\tthis.ClassA_constructor(name);\n * \t\tthis.punctuation = punctuation;\n * \t}\n * \tcreatejs.extend(ClassB, ClassA);\n * \tClassB.prototype.greet = function() {\n * \t\treturn this.ClassA_greet()+this.punctuation;\n * \t}\n * \tcreatejs.promote(ClassB, \"ClassA\");\n *\n * \tvar foo = new ClassB(\"World\", \"!?!\");\n * \tconsole.log(foo.greet()); // Hello World!?!\n *\n * @method promote\n * @param {Function} subclass The class to promote super class methods on.\n * @param {String} prefix The prefix to add to the promoted method names. Usually the name of the superclass.\n * @return {Function} Returns the subclass.\n */\ncreatejs.promote = function(subclass, prefix) {\n\t\"use strict\";\n\n\tvar subP = subclass.prototype, supP = (Object.getPrototypeOf&&Object.getPrototypeOf(subP))||subP.__proto__;\n\tif (supP) {\n\t\tsubP[(prefix+=\"_\") + \"constructor\"] = supP.constructor; // constructor is not always innumerable\n\t\tfor (var n in supP) {\n\t\t\tif (subP.hasOwnProperty(n) && (typeof supP[n] == \"function\")) { subP[prefix + n] = supP[n]; }\n\t\t}\n\t}\n\treturn subclass;\n};\n\n//##############################################################################\n// deprecate.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Wraps deprecated methods so they still be used, but throw warnings to developers.\n *\n *\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\n *\n * The recommended approach for deprecated properties is:\n *\n *\ttry {\n *\t\tObj\tect.defineProperties(object, {\n *\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\n *\t\t\treadWriteProp: {\n *\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\n *\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\n *\t\t});\n *\t} catch (e) {}\n *\n * @method deprecate\n * @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how\n * @param {String} [name=null] The name of the method or property to display in the console warning.\n * to deprecate properties.\n * @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after\n * logging the warning in the console.\n */\ncreatejs.deprecate = function(fallbackMethod, name) {\n\t\"use strict\";\n\treturn function() {\n\t\tvar msg = \"Deprecated property or method '\"+name+\"'. See docs for info.\";\n\t\tconsole && (console.warn ? console.warn(msg) : console.log(msg));\n\t\treturn fallbackMethod && fallbackMethod.apply(this, arguments);\n\t}\n};\n\n//##############################################################################\n// indexOf.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of\n * that value.  Returns -1 if value is not found.\n *\n *      var i = createjs.indexOf(myArray, myElementToFind);\n *\n * @method indexOf\n * @param {Array} array Array to search for searchElement\n * @param searchElement Element to find in array.\n * @return {Number} The first index of searchElement in array.\n */\ncreatejs.indexOf = function (array, searchElement){\n\t\"use strict\";\n\n\tfor (var i = 0,l=array.length; i < l; i++) {\n\t\tif (searchElement === array[i]) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n//##############################################################################\n// proxy.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * Various utilities that the CreateJS Suite uses. Utilities are created as separate files, and will be available on the\n * createjs namespace directly.\n *\n * <h4>Example</h4>\n *\n *      myObject.addEventListener(\"change\", createjs.proxy(myMethod, scope));\n *\n * @class Utility Methods\n * @main Utility Methods\n */\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * A function proxy for methods. By default, JavaScript methods do not maintain scope, so passing a method as a\n\t * callback will result in the method getting called in the scope of the caller. Using a proxy ensures that the\n\t * method gets called in the correct scope.\n\t *\n\t * Additional arguments can be passed that will be applied to the function when it is called.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      myObject.addEventListener(\"event\", createjs.proxy(myHandler, this, arg1, arg2));\n\t *\n\t *      function myHandler(arg1, arg2) {\n\t *           // This gets called when myObject.myCallback is executed.\n\t *      }\n\t *\n\t * @method proxy\n\t * @param {Function} method The function to call\n\t * @param {Object} scope The scope to call the method name on\n\t * @param {mixed} [arg] * Arguments that are appended to the callback for additional params.\n\t * @public\n\t * @static\n\t */\n\tcreatejs.proxy = function (method, scope) {\n\t\tvar aArgs = Array.prototype.slice.call(arguments, 2);\n\t\treturn function () {\n\t\t\treturn method.apply(scope, Array.prototype.slice.call(arguments, 0).concat(aArgs));\n\t\t};\n\t}\n\n}());\n\n//##############################################################################\n// BrowserDetect.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * An object that determines the current browser, version, operating system, and other environment\n\t * variables via user agent string.\n\t *\n\t * Used for audio because feature detection is unable to detect the many limitations of mobile devices.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      if (createjs.BrowserDetect.isIOS) { // do stuff }\n\t *\n\t * @property BrowserDetect\n\t * @type {Object}\n\t * @param {Boolean} isFirefox True if our browser is Firefox.\n\t * @param {Boolean} isOpera True if our browser is opera.\n\t * @param {Boolean} isChrome True if our browser is Chrome.  Note that Chrome for Android returns true, but is a\n\t * completely different browser with different abilities.\n\t * @param {Boolean} isIOS True if our browser is safari for iOS devices (iPad, iPhone, and iPod).\n\t * @param {Boolean} isAndroid True if our browser is Android.\n\t * @param {Boolean} isBlackberry True if our browser is Blackberry.\n\t * @constructor\n\t * @static\n\t */\n\tfunction BrowserDetect() {\n\t\tthrow \"BrowserDetect cannot be instantiated\";\n\t};\n\n\tvar agent = BrowserDetect.agent = window.navigator.userAgent;\n\tBrowserDetect.isWindowPhone = (agent.indexOf(\"IEMobile\") > -1) || (agent.indexOf(\"Windows Phone\") > -1);\n\tBrowserDetect.isFirefox = (agent.indexOf(\"Firefox\") > -1);\n\tBrowserDetect.isOpera = (window.opera != null);\n\tBrowserDetect.isChrome = (agent.indexOf(\"Chrome\") > -1);  // NOTE that Chrome on Android returns true but is a completely different browser with different abilities\n\tBrowserDetect.isIOS = (agent.indexOf(\"iPod\") > -1 || agent.indexOf(\"iPhone\") > -1 || agent.indexOf(\"iPad\") > -1) && !BrowserDetect.isWindowPhone;\n\tBrowserDetect.isAndroid = (agent.indexOf(\"Android\") > -1) && !BrowserDetect.isWindowPhone;\n\tBrowserDetect.isBlackberry = (agent.indexOf(\"Blackberry\") > -1);\n\n\tcreatejs.BrowserDetect = BrowserDetect;\n\n}());\n\n//##############################################################################\n// EventDispatcher.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * EventDispatcher provides methods for managing queues of event listeners and dispatching events.\r\n\t *\r\n\t * You can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\r\n\t * EventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\r\n\t * \r\n\t * Together with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\r\n\t * DOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\r\n\t * bubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\r\n\t * \r\n\t * EventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\r\n\t * to create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \r\n\t * {{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\r\n\t * {{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\r\n\t * \r\n\t * Another addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\r\n\t * method, which can be used to listeners for all events, or listeners for a specific event. The Event object also \r\n\t * includes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * Add EventDispatcher capabilities to the \"MyClass\" class.\r\n\t *\r\n\t *      EventDispatcher.initialize(MyClass.prototype);\r\n\t *\r\n\t * Add an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\r\n\t *\r\n\t *      instance.addEventListener(\"eventName\", handlerMethod);\r\n\t *      function handlerMethod(event) {\r\n\t *          console.log(event.target + \" Was Clicked\");\r\n\t *      }\r\n\t *\r\n\t * <b>Maintaining proper scope</b><br />\r\n\t * Scope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\r\n\t * method to subscribe to events simplifies this.\r\n\t *\r\n\t *      instance.addEventListener(\"click\", function(event) {\r\n\t *          console.log(instance == this); // false, scope is ambiguous.\r\n\t *      });\r\n\t *      \r\n\t *      instance.on(\"click\", function(event) {\r\n\t *          console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\r\n\t *      });\r\n\t * \r\n\t * If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\r\n\t * scope.\r\n\t *\r\n\t * <b>Browser support</b>\r\n\t * The event model in CreateJS can be used separately from the suite in any project, however the inheritance model\r\n\t * requires modern browsers (IE9+).\r\n\t *      \r\n\t *\r\n\t * @class EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction EventDispatcher() {\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _listeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._listeners = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _captureListeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._captureListeners = null;\r\n\t}\r\n\tvar p = EventDispatcher.prototype;\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Static initializer to mix EventDispatcher methods into a target object or prototype.\r\n\t * \r\n\t * \t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\r\n\t * \t\tEventDispatcher.initialize(myObject); // add to a specific instance\r\n\t * \r\n\t * @method initialize\r\n\t * @static\r\n\t * @param {Object} target The target object to inject EventDispatcher methods into. This can be an instance or a\r\n\t * prototype.\r\n\t **/\r\n\tEventDispatcher.initialize = function(target) {\r\n\t\ttarget.addEventListener = p.addEventListener;\r\n\t\ttarget.on = p.on;\r\n\t\ttarget.removeEventListener = target.off =  p.removeEventListener;\r\n\t\ttarget.removeAllEventListeners = p.removeAllEventListeners;\r\n\t\ttarget.hasEventListener = p.hasEventListener;\r\n\t\ttarget.dispatchEvent = p.dispatchEvent;\r\n\t\ttarget._dispatchEvent = p._dispatchEvent;\r\n\t\ttarget.willTrigger = p.willTrigger;\r\n\t};\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds the specified event listener. Note that adding multiple listeners to the same function will result in\r\n\t * multiple callbacks getting fired.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.addEventListener(\"click\", handleClick);\r\n\t *      function handleClick(event) {\r\n\t *         // Click happened.\r\n\t *      }\r\n\t *\r\n\t * @method addEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function | Object} Returns the listener for chaining or assignment.\r\n\t **/\r\n\tp.addEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners;\r\n\t\tif (useCapture) {\r\n\t\t\tlisteners = this._captureListeners = this._captureListeners||{};\r\n\t\t} else {\r\n\t\t\tlisteners = this._listeners = this._listeners||{};\r\n\t\t}\r\n\t\tvar arr = listeners[type];\r\n\t\tif (arr) { this.removeEventListener(type, listener, useCapture); }\r\n\t\tarr = listeners[type]; // remove may have deleted the array\r\n\t\tif (!arr) { listeners[type] = [listener];  }\r\n\t\telse { arr.push(listener); }\r\n\t\treturn listener;\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\r\n\t * only run once, associate arbitrary data with the listener, and remove the listener.\r\n\t * \r\n\t * This method works by creating an anonymous wrapper function and subscribing it with addEventListener.\r\n\t * The wrapper function is returned for use with `removeEventListener` (or `off`).\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\r\n\t * {{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\r\n\t * to `on` with the same params will create multiple listeners.\r\n\t * \r\n\t * <h4>Example</h4>\r\n\t * \r\n\t * \t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\r\n\t * \t\tfunction handleClick(evt, data) {\r\n\t * \t\t\tdata.count -= 1;\r\n\t * \t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\r\n\t * \t\t\tif (data.count == 0) {\r\n\t * \t\t\t\talert(\"clicked 3 times!\");\r\n\t * \t\t\t\tmyBtn.off(\"click\", listener);\r\n\t * \t\t\t\t// alternately: evt.remove();\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t * \r\n\t * @method on\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Object} [scope] The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).\r\n\t * @param {Boolean} [once=false] If true, the listener will remove itself after the first time it is triggered.\r\n\t * @param {*} [data] Arbitrary data that will be included as the second parameter when the listener is called.\r\n\t * @param {Boolean} [useCapture=false] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function} Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.\r\n\t **/\r\n\tp.on = function(type, listener, scope, once, data, useCapture) {\r\n\t\tif (listener.handleEvent) {\r\n\t\t\tscope = scope||listener;\r\n\t\t\tlistener = listener.handleEvent;\r\n\t\t}\r\n\t\tscope = scope||this;\r\n\t\treturn this.addEventListener(type, function(evt) {\r\n\t\t\t\tlistener.call(scope, evt, data);\r\n\t\t\t\tonce&&evt.remove();\r\n\t\t\t}, useCapture);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified event listener.\r\n\t *\r\n\t * <b>Important Note:</b> that you must pass the exact function reference used when the event was added. If a proxy\r\n\t * function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\r\n\t * closure will not work.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.removeEventListener(\"click\", handleClick);\r\n\t *\r\n\t * @method removeEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.removeEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners = useCapture ? this._captureListeners : this._listeners;\r\n\t\tif (!listeners) { return; }\r\n\t\tvar arr = listeners[type];\r\n\t\tif (!arr) { return; }\r\n\t\tfor (var i=0,l=arr.length; i<l; i++) {\r\n\t\t\tif (arr[i] == listener) {\r\n\t\t\t\tif (l==1) { delete(listeners[type]); } // allows for faster checks.\r\n\t\t\t\telse { arr.splice(i,1); }\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the\r\n\t * .on method.\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \r\n\t * {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.\r\n\t *\r\n\t * @method off\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.off = p.removeEventListener;\r\n\r\n\t/**\r\n\t * Removes all listeners for the specified type, or all listeners of all types.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Remove all listeners\r\n\t *      displayObject.removeAllEventListeners();\r\n\t *\r\n\t *      // Remove all click listeners\r\n\t *      displayObject.removeAllEventListeners(\"click\");\r\n\t *\r\n\t * @method removeAllEventListeners\r\n\t * @param {String} [type] The string type of the event. If omitted, all listeners for all types will be removed.\r\n\t **/\r\n\tp.removeAllEventListeners = function(type) {\r\n\t\tif (!type) { this._listeners = this._captureListeners = null; }\r\n\t\telse {\r\n\t\t\tif (this._listeners) { delete(this._listeners[type]); }\r\n\t\t\tif (this._captureListeners) { delete(this._captureListeners[type]); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the specified event to all listeners.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Use a string event\r\n\t *      this.dispatchEvent(\"complete\");\r\n\t *\r\n\t *      // Use an Event instance\r\n\t *      var event = new createjs.Event(\"progress\");\r\n\t *      this.dispatchEvent(event);\r\n\t *\r\n\t * @method dispatchEvent\r\n\t * @param {Object | String | Event} eventObj An object with a \"type\" property, or a string type.\r\n\t * While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\r\n\t * dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\r\n\t * be used to avoid event object instantiation for non-bubbling events that may not have any listeners.\r\n\t * @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.\r\n\t * @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.\r\n\t * @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.\r\n\t **/\r\n\tp.dispatchEvent = function(eventObj, bubbles, cancelable) {\r\n\t\tif (typeof eventObj == \"string\") {\r\n\t\t\t// skip everything if there's no listeners and it doesn't bubble:\r\n\t\t\tvar listeners = this._listeners;\r\n\t\t\tif (!bubbles && (!listeners || !listeners[eventObj])) { return true; }\r\n\t\t\teventObj = new createjs.Event(eventObj, bubbles, cancelable);\r\n\t\t} else if (eventObj.target && eventObj.clone) {\r\n\t\t\t// redispatching an active event object, so clone it:\r\n\t\t\teventObj = eventObj.clone();\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent\r\n\t\ttry { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events\r\n\r\n\t\tif (!eventObj.bubbles || !this.parent) {\r\n\t\t\tthis._dispatchEvent(eventObj, 2);\r\n\t\t} else {\r\n\t\t\tvar top=this, list=[top];\r\n\t\t\twhile (top.parent) { list.push(top = top.parent); }\r\n\t\t\tvar i, l=list.length;\r\n\r\n\t\t\t// capture & atTarget\r\n\t\t\tfor (i=l-1; i>=0 && !eventObj.propagationStopped; i--) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 1+(i==0));\r\n\t\t\t}\r\n\t\t\t// bubbling\r\n\t\t\tfor (i=1; i<l && !eventObj.propagationStopped; i++) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 3);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !eventObj.defaultPrevented;\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type.\r\n\t * @method hasEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns true if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.hasEventListener = function(type) {\r\n\t\tvar listeners = this._listeners, captureListeners = this._captureListeners;\r\n\t\treturn !!((listeners && listeners[type]) || (captureListeners && captureListeners[type]));\r\n\t};\r\n\t\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type on this object or any of its\r\n\t * ancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the\r\n\t * specified type is dispatched from this object, it will trigger at least one listener.\r\n\t * \r\n\t * This is similar to {{#crossLink \"EventDispatcher/hasEventListener\"}}{{/crossLink}}, but it searches the entire\r\n\t * event flow for a listener, not just this object.\r\n\t * @method willTrigger\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns `true` if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.willTrigger = function(type) {\r\n\t\tvar o = this;\r\n\t\twhile (o) {\r\n\t\t\tif (o.hasEventListener(type)) { return true; }\r\n\t\t\to = o.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[EventDispatcher]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _dispatchEvent\r\n\t * @param {Object | Event} eventObj\r\n\t * @param {Object} eventPhase\r\n\t * @protected\r\n\t **/\r\n\tp._dispatchEvent = function(eventObj, eventPhase) {\r\n\t\tvar l, arr, listeners = (eventPhase <= 2) ? this._captureListeners : this._listeners;\r\n\t\tif (eventObj && listeners && (arr = listeners[eventObj.type]) && (l=arr.length)) {\r\n\t\t\ttry { eventObj.currentTarget = this; } catch (e) {}\r\n\t\t\ttry { eventObj.eventPhase = eventPhase|0; } catch (e) {}\r\n\t\t\teventObj.removed = false;\r\n\t\t\t\r\n\t\t\tarr = arr.slice(); // to avoid issues with items being removed or added during the dispatch\r\n\t\t\tfor (var i=0; i<l && !eventObj.immediatePropagationStopped; i++) {\r\n\t\t\t\tvar o = arr[i];\r\n\t\t\t\tif (o.handleEvent) { o.handleEvent(eventObj); }\r\n\t\t\t\telse { o(eventObj); }\r\n\t\t\t\tif (eventObj.removed) {\r\n\t\t\t\t\tthis.off(eventObj.type, o, eventPhase==1);\r\n\t\t\t\t\teventObj.removed = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (eventPhase === 2) { this._dispatchEvent(eventObj, 2.1); }\r\n\t};\r\n\r\n\r\n\tcreatejs.EventDispatcher = EventDispatcher;\r\n}());\n\n//##############################################################################\n// Event.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n// constructor:\n\t/**\n\t * Contains properties and methods shared by all events for use with\n\t * {{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\n\t * \n\t * Note that Event objects are often reused, so you should never\n\t * rely on an event object's state outside of the call stack it was received in.\n\t * @class Event\n\t * @param {String} type The event type.\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\n\t * @constructor\n\t **/\n\tfunction Event(type, bubbles, cancelable) {\n\t\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * The type of event.\n\t\t * @property type\n\t\t * @type String\n\t\t **/\n\t\tthis.type = type;\n\t\n\t\t/**\n\t\t * The object that generated an event.\n\t\t * @property target\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.target = null;\n\t\n\t\t/**\n\t\t * The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\n\t\t * always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\n\t\t * is generated from childObj, then a listener on parentObj would receive the event with\n\t\t * target=childObj (the original target) and currentTarget=parentObj (where the listener was added).\n\t\t * @property currentTarget\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.currentTarget = null;\n\t\n\t\t/**\n\t\t * For bubbling events, this indicates the current event phase:<OL>\n\t\t * \t<LI> capture phase: starting from the top parent to the target</LI>\n\t\t * \t<LI> at target phase: currently being dispatched from the target</LI>\n\t\t * \t<LI> bubbling phase: from the target to the top parent</LI>\n\t\t * </OL>\n\t\t * @property eventPhase\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.eventPhase = 0;\n\t\n\t\t/**\n\t\t * Indicates whether the event will bubble through the display list.\n\t\t * @property bubbles\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.bubbles = !!bubbles;\n\t\n\t\t/**\n\t\t * Indicates whether the default behaviour of this event can be cancelled via\n\t\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.\n\t\t * @property cancelable\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.cancelable = !!cancelable;\n\t\n\t\t/**\n\t\t * The epoch time at which this event was created.\n\t\t * @property timeStamp\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.timeStamp = (new Date()).getTime();\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property defaultPrevented\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.defaultPrevented = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.\n\t\t * @property propagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.propagationStopped = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property immediatePropagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.immediatePropagationStopped = false;\n\t\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.\n\t\t * @property removed\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.removed = false;\n\t}\n\tvar p = Event.prototype;\n\n// public methods:\n\t/**\n\t * Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\n\t * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\n\t * cancel the default behaviour associated with the event.\n\t * @method preventDefault\n\t **/\n\tp.preventDefault = function() {\n\t\tthis.defaultPrevented = this.cancelable&&true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopPropagation\n\t **/\n\tp.stopPropagation = function() {\n\t\tthis.propagationStopped = true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\n\t * {{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopImmediatePropagation\n\t **/\n\tp.stopImmediatePropagation = function() {\n\t\tthis.immediatePropagationStopped = this.propagationStopped = true;\n\t};\n\t\n\t/**\n\t * Causes the active listener to be removed via removeEventListener();\n\t * \n\t * \t\tmyBtn.addEventListener(\"click\", function(evt) {\n\t * \t\t\t// do stuff...\n\t * \t\t\tevt.remove(); // removes this listener.\n\t * \t\t});\n\t * \n\t * @method remove\n\t **/\n\tp.remove = function() {\n\t\tthis.removed = true;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Event instance.\n\t * @method clone\n\t * @return {Event} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Event(this.type, this.bubbles, this.cancelable);\n\t};\n\t\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the instance.\n\t * @return {Event} Returns the instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Event (type=\"+this.type+\")]\";\n\t};\n\n\tcreatejs.Event = Event;\n}());\n\n//##############################################################################\n// ErrorEvent.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * A general error {{#crossLink \"Event\"}}{{/crossLink}}, that describes an error that occurred, as well as any details.\n\t * @class ErrorEvent\n\t * @param {String} [title] The error title\n\t * @param {String} [message] The error description\n\t * @param {Object} [data] Additional error data\n\t * @constructor\n\t */\n\tfunction ErrorEvent(title, message, data) {\n\t\tthis.Event_constructor(\"error\");\n\n\t\t/**\n\t\t * The short error title, which indicates the type of error that occurred.\n\t\t * @property title\n\t\t * @type String\n\t\t */\n\t\tthis.title = title;\n\n\t\t/**\n\t\t * The verbose error message, containing details about the error.\n\t\t * @property message\n\t\t * @type String\n\t\t */\n\t\tthis.message = message;\n\n\t\t/**\n\t\t * Additional data attached to an error.\n\t\t * @property data\n\t\t * @type {Object}\n\t\t */\n\t\tthis.data = data;\n\t}\n\n\tvar p = createjs.extend(ErrorEvent, createjs.Event);\n\n\tp.clone = function() {\n\t\treturn new createjs.ErrorEvent(this.title, this.message, this.data);\n\t};\n\n\tcreatejs.ErrorEvent = createjs.promote(ErrorEvent, \"Event\");\n\n}());\n\n//##############################################################################\n// ProgressEvent.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function (scope) {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A CreateJS {{#crossLink \"Event\"}}{{/crossLink}} that is dispatched when progress changes.\n\t * @class ProgressEvent\n\t * @param {Number} loaded The amount that has been loaded. This can be any number relative to the total.\n\t * @param {Number} [total=1] The total amount that will load. This will default to 1, so if the `loaded` value is\n\t * a percentage (between 0 and 1), it can be omitted.\n\t * @todo Consider having this event be a \"fileprogress\" event as well\n\t * @constructor\n\t */\n\tfunction ProgressEvent(loaded, total) {\n\t\tthis.Event_constructor(\"progress\");\n\n\t\t/**\n\t\t * The amount that has been loaded (out of a total amount)\n\t\t * @property loaded\n\t\t * @type {Number}\n\t\t */\n\t\tthis.loaded = loaded;\n\n\t\t/**\n\t\t * The total \"size\" of the load.\n\t\t * @property total\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t */\n\t\tthis.total = (total == null) ? 1 : total;\n\n\t\t/**\n\t\t * The percentage (out of 1) that the load has been completed. This is calculated using `loaded/total`.\n\t\t * @property progress\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis.progress = (total == 0) ? 0 : this.loaded / this.total;\n\t};\n\n\tvar p = createjs.extend(ProgressEvent, createjs.Event);\n\n\t/**\n\t * Returns a clone of the ProgressEvent instance.\n\t * @method clone\n\t * @return {ProgressEvent} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new createjs.ProgressEvent(this.loaded, this.total);\n\t};\n\n\tcreatejs.ProgressEvent = createjs.promote(ProgressEvent, \"Event\");\n\n}(window));\n\n//##############################################################################\n// LoadItem.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * All loaders accept an item containing the properties defined in this class. If a raw object is passed instead,\n\t * it will not be affected, but it must contain at least a {{#crossLink \"src:property\"}}{{/crossLink}} property. A\n\t * string path or HTML tag is also acceptable, but it will be automatically converted to a LoadItem using the\n\t * {{#crossLink \"create\"}}{{/crossLink}} method by {{#crossLink \"AbstractLoader\"}}{{/crossLink}}\n\t * @class LoadItem\n\t * @constructor\n\t * @since 0.6.0\n\t */\n\tfunction LoadItem() {\n\t\t/**\n\t\t * The source of the file that is being loaded. This property is <b>required</b>. The source can either be a\n\t\t * string (recommended), or an HTML tag.\n\t\t * This can also be an object, but in that case it has to include a type and be handled by a plugin.\n\t\t * @property src\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.src = null;\n\n\t\t/**\n\t\t * The type file that is being loaded. The type of the file is usually inferred by the extension, but can also\n\t\t * be set manually. This is helpful in cases where a file does not have an extension.\n\t\t * @property type\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.type = null;\n\n\t\t/**\n\t\t * A string identifier which can be used to reference the loaded object. If none is provided, this will be\n\t\t * automatically set to the {{#crossLink \"src:property\"}}{{/crossLink}}.\n\t\t * @property id\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.id = null;\n\n\t\t/**\n\t\t * Determines if a manifest will maintain the order of this item, in relation to other items in the manifest\n\t\t * that have also set the `maintainOrder` property to `true`. This only applies when the max connections has\n\t\t * been set above 1 (using {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}). Everything with this\n\t\t * property set to `false` will finish as it is loaded. Ordered items are combined with script tags loading in\n\t\t * order when {{#crossLink \"LoadQueue/maintainScriptOrder:property\"}}{{/crossLink}} is set to `true`.\n\t\t * @property maintainOrder\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.maintainOrder = false;\n\n\t\t/**\n\t\t * A callback used by JSONP requests that defines what global method to call when the JSONP content is loaded.\n\t\t * @property callback\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.callback = null;\n\n\t\t/**\n\t\t * An arbitrary data object, which is included with the loaded object.\n\t\t * @property data\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.data = null;\n\n\t\t/**\n\t\t * The request method used for HTTP calls. Both {{#crossLink \"Methods/GET:property\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Methods/POST:property\"}}{{/crossLink}} request types are supported, and are defined as\n\t\t * constants on {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\n\t\t * @property method\n\t\t * @type {String}\n\t\t * @default GET\n\t\t */\n\t\tthis.method = createjs.Methods.GET;\n\n\t\t/**\n\t\t * An object hash of name/value pairs to send to the server.\n\t\t * @property values\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.values = null;\n\n\t\t/**\n\t\t * An object hash of headers to attach to an XHR request. PreloadJS will automatically attach some default\n\t\t * headers when required, including \"Origin\", \"Content-Type\", and \"X-Requested-With\". You may override the\n\t\t * default headers by including them in your headers object.\n\t\t * @property headers\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis.headers = null;\n\n\t\t/**\n\t\t * Enable credentials for XHR requests.\n\t\t * @property withCredentials\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.withCredentials = false;\n\n\t\t/**\n\t\t * Set the mime type of XHR-based requests. This is automatically set to \"text/plain; charset=utf-8\" for text\n\t\t * based files (json, xml, text, css, js).\n\t\t * @property mimeType\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.mimeType = null;\n\n\t\t/**\n\t\t * Sets the crossOrigin attribute for CORS-enabled images loading cross-domain.\n\t\t * @property crossOrigin\n\t\t * @type {boolean}\n\t\t * @default Anonymous\n\t\t */\n\t\tthis.crossOrigin = null;\n\n\t\t/**\n\t\t * The duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\n\t\t * (level one) loading, as XHR (level 2) provides its own timeout event.\n\t\t * @property loadTimeout\n\t\t * @type {Number}\n\t\t * @default 8000 (8 seconds)\n\t\t */\n\t\tthis.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\n\t};\n\n\tvar p = LoadItem.prototype = {};\n\tvar s = LoadItem;\n\n\t/**\n\t * Default duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\n\t * (level one) loading, as XHR (level 2) provides its own timeout event.\n\t * @property LOAD_TIMEOUT_DEFAULT\n\t * @type {number}\n\t * @static\n\t */\n\ts.LOAD_TIMEOUT_DEFAULT = 8000;\n\n\t/**\n\t * Create a LoadItem.\n\t * <ul>\n\t *     <li>String-based items are converted to a LoadItem with a populated {{#crossLink \"src:property\"}}{{/crossLink}}.</li>\n\t *     <li>LoadItem instances are returned as-is</li>\n\t *     <li>Objects are returned with any needed properties added</li>\n\t * </ul>\n\t * @method create\n\t * @param {LoadItem|String|Object} value The load item value\n\t * @returns {LoadItem|Object}\n\t * @static\n\t */\n\ts.create = function (value) {\n\t\tif (typeof value == \"string\") {\n\t\t\tvar item = new LoadItem();\n\t\t\titem.src = value;\n\t\t\treturn item;\n\t\t} else if (value instanceof s) {\n\t\t\treturn value;\n\t\t} else if (value instanceof Object && value.src) {\n\t\t\tif (value.loadTimeout == null) {\n\t\t\t\tvalue.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\n\t\t\t}\n\t\t\treturn value;\n\t\t} else {\n\t\t\tthrow new Error(\"Type not recognized.\");\n\t\t}\n\t};\n\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var loadItem = new createjs.LoadItem().set({src:\"image.png\", maintainOrder:true});\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the LoadItem instance.\n\t * @return {LoadItem} Returns the instance the method is called on (useful for chaining calls.)\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\tcreatejs.LoadItem = s;\n\n}());\n\n//##############################################################################\n// Methods.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\tvar s = {};\n\n\t/**\n\t * Defines a POST request, use for a method value when loading data.\n\t * @property POST\n\t * @type {string}\n\t * @default post\n\t * @static\n\t */\n\ts.POST = \"POST\";\n\n\t/**\n\t * Defines a GET request, use for a method value when loading data.\n\t * @property GET\n\t * @type {string}\n\t * @default get\n\t * @static\n\t */\n\ts.GET = \"GET\";\n\n\tcreatejs.Methods = s;\n}());\n\n//##############################################################################\n// Types.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\tvar s = {};\n\n\t/**\n\t * The preload type for generic binary types. Note that images are loaded as binary files when using XHR.\n\t * @property BINARY\n\t * @type {String}\n\t * @default binary\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.BINARY = \"binary\";\n\n\t/**\n\t * The preload type for css files. CSS files are loaded using a &lt;link&gt; when loaded with XHR, or a\n\t * &lt;style&gt; tag when loaded with tags.\n\t * @property CSS\n\t * @type {String}\n\t * @default css\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.CSS = \"css\";\n\n\t/**\n\t * The preload type for font files.\n\t * @property FONT\n\t * @type {String}\n\t * @default font\n\t * @static\n\t * @since 0.9.0\n\t */\n\ts.FONT = \"font\";\n\n\t/**\n\t * The preload type for fonts specified with CSS (such as Google fonts)\n\t * @property FONTCSS\n\t * @type {String}\n\t * @default fontcss\n\t * @static\n\t * @since 0.9.0\n\t */\n\ts.FONTCSS = \"fontcss\";\n\n\t/**\n\t * The preload type for image files, usually png, gif, or jpg/jpeg. Images are loaded into an &lt;image&gt; tag.\n\t * @property IMAGE\n\t * @type {String}\n\t * @default image\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.IMAGE = \"image\";\n\n\t/**\n\t * The preload type for javascript files, usually with the \"js\" file extension. JavaScript files are loaded into a\n\t * &lt;script&gt; tag.\n\t *\n\t * Since version 0.4.1+, due to how tag-loaded scripts work, all JavaScript files are automatically injected into\n\t * the body of the document to maintain parity between XHR and tag-loaded scripts. In version 0.4.0 and earlier,\n\t * only tag-loaded scripts are injected.\n\t * @property JAVASCRIPT\n\t * @type {String}\n\t * @default javascript\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JAVASCRIPT = \"javascript\";\n\n\t/**\n\t * The preload type for json files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\n\t * JavaScript object. Note that if a `callback` is present on the load item, the file will be loaded with JSONP,\n\t * no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to, and the JSON\n\t * must contain a matching wrapper function.\n\t * @property JSON\n\t * @type {String}\n\t * @default json\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JSON = \"json\";\n\n\t/**\n\t * The preload type for jsonp files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\n\t * JavaScript object. You are required to pass a callback parameter that matches the function wrapper in the JSON.\n\t * Note that JSONP will always be used if there is a callback present, no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}}\n\t * property is set to.\n\t * @property JSONP\n\t * @type {String}\n\t * @default jsonp\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.JSONP = \"jsonp\";\n\n\t/**\n\t * The preload type for json-based manifest files, usually with the \"json\" file extension. The JSON data is loaded\n\t * and parsed into a JavaScript object. PreloadJS will then look for a \"manifest\" property in the JSON, which is an\n\t * Array of files to load, following the same format as the {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\n\t * method. If a \"callback\" is specified on the manifest object, then it will be loaded using JSONP instead,\n\t * regardless of what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to.\n\t * @property MANIFEST\n\t * @type {String}\n\t * @default manifest\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.MANIFEST = \"manifest\";\n\n\t/**\n\t * The preload type for sound files, usually mp3, ogg, or wav. When loading via tags, audio is loaded into an\n\t * &lt;audio&gt; tag.\n\t * @property SOUND\n\t * @type {String}\n\t * @default sound\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SOUND = \"sound\";\n\n\t/**\n\t * The preload type for video files, usually mp4, ts, or ogg. When loading via tags, video is loaded into an\n\t * &lt;video&gt; tag.\n\t * @property VIDEO\n\t * @type {String}\n\t * @default video\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.VIDEO = \"video\";\n\n\t/**\n\t * The preload type for SpriteSheet files. SpriteSheet files are JSON files that contain string image paths.\n\t * @property SPRITESHEET\n\t * @type {String}\n\t * @default spritesheet\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SPRITESHEET = \"spritesheet\";\n\n\t/**\n\t * The preload type for SVG files.\n\t * @property SVG\n\t * @type {String}\n\t * @default svg\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.SVG = \"svg\";\n\n\t/**\n\t * The preload type for text files, which is also the default file type if the type can not be determined. Text is\n\t * loaded as raw text.\n\t * @property TEXT\n\t * @type {String}\n\t * @default text\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.TEXT = \"text\";\n\n\t/**\n\t * The preload type for xml files. XML is loaded into an XML document.\n\t * @property XML\n\t * @type {String}\n\t * @default xml\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.XML = \"xml\";\n\n\tcreatejs.Types = s;\n}());\n\n//##############################################################################\n// Elements.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Convenience methods for creating various elements used by PrelaodJS.\n\t *\n\t * @class DomUtils\n\t */\n\tvar s = {};\n\n\ts.a = function() {\n\t\treturn s.el(\"a\");\n\t}\n\n\ts.svg = function() {\n\t\treturn s.el(\"svg\");\n\t}\n\n\ts.object = function() {\n\t\treturn s.el(\"object\");\n\t}\n\n\ts.image = function() {\n\t\treturn s.el(\"image\");\n\t}\n\n\ts.img = function() {\n\t\treturn s.el(\"img\");\n\t}\n\n\ts.style = function() {\n\t\treturn s.el(\"style\");\n\t}\n\n\ts.link = function() {\n\t\treturn s.el(\"link\");\n\t}\n\n\ts.script = function() {\n\t\treturn s.el(\"script\");\n\t}\n\n\ts.audio = function() {\n\t\treturn s.el(\"audio\");\n\t}\n\n\ts.video = function() {\n\t\treturn s.el(\"video\");\n\t}\n\n\ts.text = function(value) {\n\t\treturn document.createTextNode(value);\n\t}\n\n\ts.el = function(name) {\n\t\treturn document.createElement(name);\n\t}\n\n\tcreatejs.Elements = s;\n\n}());\n\n//##############################################################################\n// DomUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * A few utilities for interacting with the dom.\n\t * @class DomUtils\n\t */\n\tvar s = {\n\t\tcontainer: null\n\t};\n\n\ts.appendToHead = function (el) {\n\t\ts.getHead().appendChild(el);\n\t}\n\n\ts.appendToBody = function (el) {\n\t\tif (s.container == null) {\n\t\t\ts.container = document.createElement(\"div\");\n\t\t\ts.container.id = \"preloadjs-container\";\n\t\t\tvar style = s.container.style;\n\t\t\tstyle.visibility = \"hidden\";\n\t\t\tstyle.position = \"absolute\";\n\t\t\tstyle.width = s.container.style.height = \"10px\";\n\t\t\tstyle.overflow = \"hidden\";\n\t\t\tstyle.transform = style.msTransform = style.webkitTransform = style.oTransform = \"translate(-10px, -10px)\"; //LM: Not working\n\t\t\ts.getBody().appendChild(s.container);\n\t\t}\n\t\ts.container.appendChild(el);\n\t}\n\n\ts.getHead = function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}\n\n\ts.getBody = function () {\n\t\treturn document.body || document.getElementsByTagName(\"body\")[0];\n\t}\n\n\ts.removeChild = function(el) {\n\t\tif (el.parent) {\n\t\t\tel.parent.removeChild(el);\n\t\t}\n\t}\n\n\t/**\n\t * Check if item is a valid HTMLImageElement\n\t * @method isImageTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isImageTag = function(item) {\n\t\treturn item instanceof HTMLImageElement;\n\t};\n\n\t/**\n\t * Check if item is a valid HTMLAudioElement\n\t * @method isAudioTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isAudioTag = function(item) {\n\t\tif (window.HTMLAudioElement) {\n\t\t\treturn item instanceof HTMLAudioElement;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Check if item is a valid HTMLVideoElement\n\t * @method isVideoTag\n\t * @param {Object} item\n\t * @returns {Boolean}\n\t * @static\n\t */\n\ts.isVideoTag = function(item) {\n\t\tif (window.HTMLVideoElement) {\n\t\t\treturn item instanceof HTMLVideoElement;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tcreatejs.DomUtils = s;\n\n}());\n\n//##############################################################################\n// RequestUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Utilities that assist with parsing load items, and determining file types, etc.\n\t * @class RequestUtils\n\t */\n\tvar s = {};\n\n\t/**\n\t * Determine if a specific type should be loaded as a binary file. Currently, only images and items marked\n\t * specifically as \"binary\" are loaded as binary. Note that audio is <b>not</b> a binary type, as we can not play\n\t * back using an audio tag if it is loaded as binary. Plugins can change the item type to binary to ensure they get\n\t * a binary result to work with. Binary files are loaded using XHR2. Types are defined as static constants on\n\t * {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\n\t * @method isBinary\n\t * @param {String} type The item type.\n\t * @return {Boolean} If the specified type is binary.\n\t * @static\n\t */\n\ts.isBinary = function (type) {\n\t\tswitch (type) {\n\t\t\tcase createjs.Types.IMAGE:\n\t\t\tcase createjs.Types.BINARY:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Determine if a specific type is a text-based asset, and should be loaded as UTF-8.\n\t * @method isText\n\t * @param {String} type The item type.\n\t * @return {Boolean} If the specified type is text.\n\t * @static\n\t */\n\ts.isText = function (type) {\n\t\tswitch (type) {\n\t\t\tcase createjs.Types.TEXT:\n\t\t\tcase createjs.Types.JSON:\n\t\t\tcase createjs.Types.MANIFEST:\n\t\t\tcase createjs.Types.XML:\n\t\t\tcase createjs.Types.CSS:\n\t\t\tcase createjs.Types.SVG:\n\t\t\tcase createjs.Types.JAVASCRIPT:\n\t\t\tcase createjs.Types.SPRITESHEET:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Determine the type of the object using common extensions. Note that the type can be passed in with the load item\n\t * if it is an unusual extension.\n\t * @method getTypeByExtension\n\t * @param {String} extension The file extension to use to determine the load type.\n\t * @return {String} The determined load type (for example, `createjs.Types.IMAGE`). Will return `null` if\n\t * the type can not be determined by the extension.\n\t * @static\n\t */\n\ts.getTypeByExtension = function (extension) {\n\t\tif (extension == null) {\n\t\t\treturn createjs.Types.TEXT;\n\t\t}\n\n\t\tswitch (extension.toLowerCase()) {\n\t\t\tcase \"jpeg\":\n\t\t\tcase \"jpg\":\n\t\t\tcase \"gif\":\n\t\t\tcase \"png\":\n\t\t\tcase \"webp\":\n\t\t\tcase \"bmp\":\n\t\t\t\treturn createjs.Types.IMAGE;\n\t\t\tcase \"ogg\":\n\t\t\tcase \"mp3\":\n\t\t\tcase \"webm\":\n\t\t\t\treturn createjs.Types.SOUND;\n\t\t\tcase \"mp4\":\n\t\t\tcase \"webm\":\n\t\t\tcase \"ts\":\n\t\t\t\treturn createjs.Types.VIDEO;\n\t\t\tcase \"json\":\n\t\t\t\treturn createjs.Types.JSON;\n\t\t\tcase \"xml\":\n\t\t\t\treturn createjs.Types.XML;\n\t\t\tcase \"css\":\n\t\t\t\treturn createjs.Types.CSS;\n\t\t\tcase \"js\":\n\t\t\t\treturn createjs.Types.JAVASCRIPT;\n\t\t\tcase 'svg':\n\t\t\t\treturn createjs.Types.SVG;\n\t\t\tdefault:\n\t\t\t\treturn createjs.Types.TEXT;\n\t\t}\n\t};\n\n\tcreatejs.RequestUtils = s;\n\n}());\n\n//##############################################################################\n// URLUtils.js\n//##############################################################################\n\n(function () {\n\n\t/**\n\t * Utilities that assist with parsing load items, and determining file types, etc.\n\t * @class URLUtils\n\t */\n\tvar s = {};\n\n\t/**\n\t * The Regular Expression used to test file URLS for an absolute path.\n\t * @property ABSOLUTE_PATH\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.ABSOLUTE_PATT = /^(?:\\w+:)?\\/{2}/i;\n\n\t/**\n\t * The Regular Expression used to test file URLS for a relative path.\n\t * @property RELATIVE_PATH\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.RELATIVE_PATT = (/^[./]*?\\//i);\n\n\t/**\n\t * The Regular Expression used to test file URLS for an extension. Note that URIs must already have the query string\n\t * removed.\n\t * @property EXTENSION_PATT\n\t * @type {RegExp}\n\t * @static\n\t */\n\ts.EXTENSION_PATT = /\\/?[^/]+\\.(\\w{1,5})$/i;\n\n\t/**\n\t * Parse a file path to determine the information we need to work with it. Currently, PreloadJS needs to know:\n\t * <ul>\n\t *     <li>If the path is absolute. Absolute paths start with a protocol (such as `http://`, `file://`, or\n\t *     `//networkPath`)</li>\n\t *     <li>If the path is relative. Relative paths start with `../` or `/path` (or similar)</li>\n\t *     <li>The file extension. This is determined by the filename with an extension. Query strings are dropped, and\n\t *     the file path is expected to follow the format `name.ext`.</li>\n\t * </ul>\n\t *\n\t * @method parseURI\n\t * @param {String} path\n\t * @returns {Object} An Object with an `absolute` and `relative` Boolean values,\n\t * \tthe pieces of the path (protocol, hostname, port, pathname, search, hash, host)\n\t * \tas well as an optional 'extension` property, which is the lowercase extension.\n\t *\n\t * @static\n\t */\n\ts.parseURI = function (path) {\n\t\tvar info = {\n\t\t\tabsolute: false,\n\t\t\trelative: false,\n\t\t\tprotocol: null,\n\t\t\thostname: null,\n\t\t\tport: null,\n\t\t\tpathname: null,\n\t\t\tsearch: null,\n\t\t\thash: null,\n\t\t\thost: null\n\t\t};\n\n\t\tif (path == null) { return info; }\n\n\t\t// Inject the path parts.\n\t\tvar parser = createjs.Elements.a();\n\t\tparser.href = path;\n\n\t\tfor (var n in info) {\n\t\t\tif (n in parser) {\n\t\t\t\tinfo[n] = parser[n];\n\t\t\t}\n\t\t}\n\n\t\t// Drop the query string\n\t\tvar queryIndex = path.indexOf(\"?\");\n\t\tif (queryIndex > -1) {\n\t\t\tpath = path.substr(0, queryIndex);\n\t\t}\n\n\t\t// Absolute\n\t\tvar match;\n\t\tif (s.ABSOLUTE_PATT.test(path)) {\n\t\t\tinfo.absolute = true;\n\n\t\t\t// Relative\n\t\t} else if (s.RELATIVE_PATT.test(path)) {\n\t\t\tinfo.relative = true;\n\t\t}\n\n\t\t// Extension\n\t\tif (match = path.match(s.EXTENSION_PATT)) {\n\t\t\tinfo.extension = match[1].toLowerCase();\n\t\t}\n\n\t\treturn info;\n\t};\n\n\t/**\n\t * Formats an object into a query string for either a POST or GET request.\n\t * @method formatQueryString\n\t * @param {Object} data The data to convert to a query string.\n\t * @param {Array} [query] Existing name/value pairs to append on to this query.\n\t * @static\n\t */\n\ts.formatQueryString = function (data, query) {\n\t\tif (data == null) {\n\t\t\tthrow new Error(\"You must specify data.\");\n\t\t}\n\t\tvar params = [];\n\t\tfor (var n in data) {\n\t\t\tparams.push(n + \"=\" + escape(data[n]));\n\t\t}\n\t\tif (query) {\n\t\t\tparams = params.concat(query);\n\t\t}\n\t\treturn params.join(\"&\");\n\t};\n\n\t/**\n\t * A utility method that builds a file path using a source and a data object, and formats it into a new path.\n\t * @method buildURI\n\t * @param {String} src The source path to add values to.\n\t * @param {Object} [data] Object used to append values to this request as a query string. Existing parameters on the\n\t * path will be preserved.\n\t * @returns {string} A formatted string that contains the path and the supplied parameters.\n\t * @static\n\t */\n\ts.buildURI = function (src, data) {\n\t\tif (data == null) {\n\t\t\treturn src;\n\t\t}\n\n\t\tvar query = [];\n\t\tvar idx = src.indexOf(\"?\");\n\n\t\tif (idx != -1) {\n\t\t\tvar q = src.slice(idx + 1);\n\t\t\tquery = query.concat(q.split(\"&\"));\n\t\t}\n\n\t\tif (idx != -1) {\n\t\t\treturn src.slice(0, idx) + \"?\" + this.formatQueryString(data, query);\n\t\t} else {\n\t\t\treturn src + \"?\" + this.formatQueryString(data, query);\n\t\t}\n\t};\n\n\t/**\n\t * @method isCrossDomain\n\t * @param {LoadItem|Object} item A load item with a `src` property.\n\t * @return {Boolean} If the load item is loading from a different domain than the current location.\n\t * @static\n\t */\n\ts.isCrossDomain = function (item) {\n\t\tvar target = createjs.Elements.a();\n\t\ttarget.href = item.src;\n\n\t\tvar host = createjs.Elements.a();\n\t\thost.href = location.href;\n\n\t\tvar crossdomain = (target.hostname != \"\") &&\n\t\t\t(target.port != host.port ||\n\t\t\ttarget.protocol != host.protocol ||\n\t\t\ttarget.hostname != host.hostname);\n\t\treturn crossdomain;\n\t};\n\n\t/**\n\t * @method isLocal\n\t * @param {LoadItem|Object} item A load item with a `src` property\n\t * @return {Boolean} If the load item is loading from the \"file:\" protocol. Assume that the host must be local as\n\t * well.\n\t * @static\n\t */\n\ts.isLocal = function (item) {\n\t\tvar target = createjs.Elements.a();\n\t\ttarget.href = item.src;\n\t\treturn target.hostname == \"\" && target.protocol == \"file:\";\n\t};\n\n\tcreatejs.URLUtils = s;\n\n}());\n\n//##############################################################################\n// AbstractLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n// constructor\n\t/**\n\t * The base loader, which defines all the generic methods, properties, and events. All loaders extend this class,\n\t * including the {{#crossLink \"LoadQueue\"}}{{/crossLink}}.\n\t * @class AbstractLoader\n\t * @param {LoadItem|object|string} loadItem The item to be loaded.\n\t * @param {Boolean} [preferXHR] Determines if the LoadItem should <em>try</em> and load using XHR, or take a\n\t * tag-based approach, which can be better in cross-domain situations. Not all loaders can load using one or the\n\t * other, so this is a suggested directive.\n\t * @param {String} [type] The type of loader. Loader types are defined as constants on the AbstractLoader class,\n\t * such as {{#crossLink \"IMAGE:property\"}}{{/crossLink}}, {{#crossLink \"CSS:property\"}}{{/crossLink}}, etc.\n\t * @extends EventDispatcher\n\t */\n\tfunction AbstractLoader(loadItem, preferXHR, type) {\n\t\tthis.EventDispatcher_constructor();\n\n\t\t// public properties\n\t\t/**\n\t\t * If the loader has completed loading. This provides a quick check, but also ensures that the different approaches\n\t\t * used for loading do not pile up resulting in more than one `complete` {{#crossLink \"Event\"}}{{/crossLink}}.\n\t\t * @property loaded\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.loaded = false;\n\n\t\t/**\n\t\t * Determine if the loader was canceled. Canceled loads will not fire complete events. Note that this property\n\t\t * is readonly, so {{#crossLink \"LoadQueue\"}}{{/crossLink}} queues should be closed using {{#crossLink \"LoadQueue/close\"}}{{/crossLink}}\n\t\t * instead.\n\t\t * @property canceled\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @readonly\n\t\t */\n\t\tthis.canceled = false;\n\n\t\t/**\n\t\t * The current load progress (percentage) for this item. This will be a number between 0 and 1.\n\t\t *\n\t\t * <h4>Example</h4>\n\t\t *\n\t\t *     var queue = new createjs.LoadQueue();\n\t\t *     queue.loadFile(\"largeImage.png\");\n\t\t *     queue.on(\"progress\", function() {\n\t\t *         console.log(\"Progress:\", queue.progress, event.progress);\n\t\t *     });\n\t\t *\n\t\t * @property progress\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis.progress = 0;\n\n\t\t/**\n\t\t * The type of item this loader will load. See {{#crossLink \"AbstractLoader\"}}{{/crossLink}} for a full list of\n\t\t * supported types.\n\t\t * @property type\n\t\t * @type {String}\n\t\t */\n\t\tthis.type = type;\n\n\t\t/**\n\t\t * A formatter function that converts the loaded raw result into the final result. For example, the JSONLoader\n\t\t * converts a string of text into a JavaScript object. Not all loaders have a resultFormatter, and this property\n\t\t * can be overridden to provide custom formatting.\n\t\t *\n\t\t * Optionally, a resultFormatter can return a callback function in cases where the formatting needs to be\n\t\t * asynchronous, such as creating a new image. The callback function is passed 2 parameters, which are callbacks\n\t\t * to handle success and error conditions in the resultFormatter. Note that the resultFormatter method is\n\t\t * called in the current scope, as well as the success and error callbacks.\n\t\t *\n\t\t * <h4>Example asynchronous resultFormatter</h4>\n\t\t *\n\t\t * \tfunction _formatResult(loader) {\n\t\t * \t\treturn function(success, error) {\n\t\t * \t\t\tif (errorCondition) { error(errorDetailEvent); }\n\t\t * \t\t\tsuccess(result);\n\t\t * \t\t}\n\t\t * \t}\n\t\t * @property resultFormatter\n\t\t * @type {Function}\n\t\t * @default null\n\t\t */\n\t\tthis.resultFormatter = null;\n\n\t\t// protected properties\n\t\t/**\n\t\t * The {{#crossLink \"LoadItem\"}}{{/crossLink}} this loader represents. Note that this is null in a {{#crossLink \"LoadQueue\"}}{{/crossLink}},\n\t\t * but will be available on loaders such as {{#crossLink \"XMLLoader\"}}{{/crossLink}} and {{#crossLink \"ImageLoader\"}}{{/crossLink}}.\n\t\t * @property _item\n\t\t * @type {LoadItem|Object}\n\t\t * @private\n\t\t */\n\t\tif (loadItem) {\n\t\t\tthis._item = createjs.LoadItem.create(loadItem);\n\t\t} else {\n\t\t\tthis._item = null;\n\t\t}\n\n\t\t/**\n\t\t * Whether the loader will try and load content using XHR (true) or HTML tags (false).\n\t\t * @property _preferXHR\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t\tthis._preferXHR = preferXHR;\n\n\t\t/**\n\t\t * The loaded result after it is formatted by an optional {{#crossLink \"resultFormatter\"}}{{/crossLink}}. For\n\t\t * items that are not formatted, this will be the same as the {{#crossLink \"_rawResult:property\"}}{{/crossLink}}.\n\t\t * The result is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}} method.\n\t\t * @property _result\n\t\t * @type {Object|String}\n\t\t * @private\n\t\t */\n\t\tthis._result = null;\n\n\t\t/**\n\t\t * The loaded result before it is formatted. The rawResult is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}}\n\t\t * method, and passing `true`.\n\t\t * @property _rawResult\n\t\t * @type {Object|String}\n\t\t * @private\n\t\t */\n\t\tthis._rawResult = null;\n\n\t\t/**\n\t\t * A list of items that loaders load behind the scenes. This does not include the main item the loader is\n\t\t * responsible for loading. Examples of loaders that have sub-items include the {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}} and\n\t\t * {{#crossLink \"ManifestLoader\"}}{{/crossLink}}.\n\t\t * @property _loadItems\n\t\t * @type {null}\n\t\t * @protected\n\t\t */\n\t\tthis._loadedItems = null;\n\n\t\t/**\n\t\t * The attribute the items loaded using tags use for the source.\n\t\t * @type {string}\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\tthis._tagSrcAttribute = null;\n\n\t\t/**\n\t\t * An HTML tag (or similar) that a loader may use to load HTML content, such as images, scripts, etc.\n\t\t * @property _tag\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._tag = null;\n\t};\n\n\tvar p = createjs.extend(AbstractLoader, createjs.EventDispatcher);\n\tvar s = AbstractLoader;\n\n\t// Remove these @deprecated properties after 1.0\n\ttry {\n\t\tObject.defineProperties(s, {\n\t\t\tPOST: { get: createjs.deprecate(function() { return createjs.Methods.POST; }, \"AbstractLoader.POST\") },\n\t\t\tGET: { get: createjs.deprecate(function() { return createjs.Methods.GET; }, \"AbstractLoader.GET\") },\n\n\t\t\tBINARY: { get: createjs.deprecate(function() { return createjs.Types.BINARY; }, \"AbstractLoader.BINARY\") },\n\t\t\tCSS: { get: createjs.deprecate(function() { return createjs.Types.CSS; }, \"AbstractLoader.CSS\") },\n\t\t\tFONT: { get: createjs.deprecate(function() { return createjs.Types.FONT; }, \"AbstractLoader.FONT\") },\n\t\t\tFONTCSS: { get: createjs.deprecate(function() { return createjs.Types.FONTCSS; }, \"AbstractLoader.FONTCSS\") },\n\t\t\tIMAGE: { get: createjs.deprecate(function() { return createjs.Types.IMAGE; }, \"AbstractLoader.IMAGE\") },\n\t\t\tJAVASCRIPT: { get: createjs.deprecate(function() { return createjs.Types.JAVASCRIPT; }, \"AbstractLoader.JAVASCRIPT\") },\n\t\t\tJSON: { get: createjs.deprecate(function() { return createjs.Types.JSON; }, \"AbstractLoader.JSON\") },\n\t\t\tJSONP: { get: createjs.deprecate(function() { return createjs.Types.JSONP; }, \"AbstractLoader.JSONP\") },\n\t\t\tMANIFEST: { get: createjs.deprecate(function() { return createjs.Types.MANIFEST; }, \"AbstractLoader.MANIFEST\") },\n\t\t\tSOUND: { get: createjs.deprecate(function() { return createjs.Types.SOUND; }, \"AbstractLoader.SOUND\") },\n\t\t\tVIDEO: { get: createjs.deprecate(function() { return createjs.Types.VIDEO; }, \"AbstractLoader.VIDEO\") },\n\t\t\tSPRITESHEET: { get: createjs.deprecate(function() { return createjs.Types.SPRITESHEET; }, \"AbstractLoader.SPRITESHEET\") },\n\t\t\tSVG: { get: createjs.deprecate(function() { return createjs.Types.SVG; }, \"AbstractLoader.SVG\") },\n\t\t\tTEXT: { get: createjs.deprecate(function() { return createjs.Types.TEXT; }, \"AbstractLoader.TEXT\") },\n\t\t\tXML: { get: createjs.deprecate(function() { return createjs.Types.XML; }, \"AbstractLoader.XML\") }\n\t\t});\n\t} catch (e) {}\n\n// Events\n\t/**\n\t * The {{#crossLink \"ProgressEvent\"}}{{/crossLink}} that is fired when the overall progress changes. Prior to\n\t * version 0.6.0, this was just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\n\t * @event progress\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a load starts.\n\t * @event loadstart\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.3.1\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the entire queue has been loaded.\n\t * @event complete\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"ErrorEvent\"}}{{/crossLink}} that is fired when the loader encounters an error. If the error was\n\t * encountered by a file, the event will contain the item that caused the error. Prior to version 0.6.0, this was\n\t * just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\n\t * @event error\n\t * @since 0.3.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the loader encounters an internal file load error.\n\t * This enables loaders to maintain internal queues, and surface file load errors.\n\t * @event fileerror\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"fileerror\")\n\t * @param {LoadItem|object} The item that encountered the error\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a loader internally loads a file. This enables\n\t * loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}} to maintain internal {{#crossLink \"LoadQueue\"}}{{/crossLink}}s\n\t * and notify when they have loaded a file. The {{#crossLink \"LoadQueue\"}}{{/crossLink}} class dispatches a\n\t * slightly different {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event.\n\t * @event fileload\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"fileload\")\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\n\t * object will contain that value as a `src` property.\n\t * @param {Object} result The HTML tag or parsed result of the loaded item.\n\t * @param {Object} rawResult The unprocessed result, usually the raw text or binary data before it is converted\n\t * to a usable object.\n\t * @since 0.6.0\n\t */\n\n\t/**\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired after the internal request is created, but before a load.\n\t * This allows updates to the loader for specific loading needs, such as binary or XHR image loading.\n\t * @event initialize\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type (\"initialize\")\n\t * @param {AbstractLoader} loader The loader that has been initialized.\n\t */\n\n\n\t/**\n\t * Get a reference to the manifest item that is loaded by this loader. In some cases this will be the value that was\n\t * passed into {{#crossLink \"LoadQueue\"}}{{/crossLink}} using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or\n\t * {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. However if only a String path was passed in, then it will\n\t * be a {{#crossLink \"LoadItem\"}}{{/crossLink}}.\n\t * @method getItem\n\t * @return {Object} The manifest item that this loader is responsible for loading.\n\t * @since 0.6.0\n\t */\n\tp.getItem = function () {\n\t\treturn this._item;\n\t};\n\n\t/**\n\t * Get a reference to the content that was loaded by the loader (only available after the {{#crossLink \"complete:event\"}}{{/crossLink}}\n\t * event is dispatched.\n\t * @method getResult\n\t * @param {Boolean} [raw=false] Determines if the returned result will be the formatted content, or the raw loaded\n\t * data (if it exists).\n\t * @return {Object}\n\t * @since 0.6.0\n\t */\n\tp.getResult = function (raw) {\n\t\treturn raw ? this._rawResult : this._result;\n\t};\n\n\t/**\n\t * Return the `tag` this object creates or uses for loading.\n\t * @method getTag\n\t * @return {Object} The tag instance\n\t * @since 0.6.0\n\t */\n\tp.getTag = function () {\n\t\treturn this._tag;\n\t};\n\n\t/**\n\t * Set the `tag` this item uses for loading.\n\t * @method setTag\n\t * @param {Object} tag The tag instance\n\t * @since 0.6.0\n\t */\n\tp.setTag = function(tag) {\n\t  this._tag = tag;\n\t};\n\n\t/**\n\t * Begin loading the item. This method is required when using a loader by itself.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var queue = new createjs.LoadQueue();\n\t *      queue.on(\"complete\", handleComplete);\n\t *      queue.loadManifest(fileArray, false); // Note the 2nd argument that tells the queue not to start loading yet\n\t *      queue.load();\n\t *\n\t * @method load\n\t */\n\tp.load = function () {\n\t\tthis._createRequest();\n\n\t\tthis._request.on(\"complete\", this, this);\n\t\tthis._request.on(\"progress\", this, this);\n\t\tthis._request.on(\"loadStart\", this, this);\n\t\tthis._request.on(\"abort\", this, this);\n\t\tthis._request.on(\"timeout\", this, this);\n\t\tthis._request.on(\"error\", this, this);\n\n\t\tvar evt = new createjs.Event(\"initialize\");\n\t\tevt.loader = this._request;\n\t\tthis.dispatchEvent(evt);\n\n\t\tthis._request.load();\n\t};\n\n\t/**\n\t * Close the the item. This will stop any open requests (although downloads using HTML tags may still continue in\n\t * the background), but events will not longer be dispatched.\n\t * @method cancel\n\t */\n\tp.cancel = function () {\n\t\tthis.canceled = true;\n\t\tthis.destroy();\n\t};\n\n\t/**\n\t * Clean up the loader.\n\t * @method destroy\n\t */\n\tp.destroy = function() {\n\t\tif (this._request) {\n\t\t\tthis._request.removeAllEventListeners();\n\t\t\tthis._request.destroy();\n\t\t}\n\n\t\tthis._request = null;\n\n\t\tthis._item = null;\n\t\tthis._rawResult = null;\n\t\tthis._result = null;\n\n\t\tthis._loadItems = null;\n\n\t\tthis.removeAllEventListeners();\n\t};\n\n\t/**\n\t * Get any items loaded internally by the loader. The enables loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}}\n\t * to expose items it loads internally.\n\t * @method getLoadedItems\n\t * @return {Array} A list of the items loaded by the loader.\n\t * @since 0.6.0\n\t */\n\tp.getLoadedItems = function () {\n\t\treturn this._loadedItems;\n\t};\n\n\n\t// Private methods\n\t/**\n\t * Create an internal request used for loading. By default, an {{#crossLink \"XHRRequest\"}}{{/crossLink}} or\n\t * {{#crossLink \"TagRequest\"}}{{/crossLink}} is created, depending on the value of {{#crossLink \"preferXHR:property\"}}{{/crossLink}}.\n\t * Other loaders may override this to use different request types, such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}},\n\t * which uses {{#crossLink \"JSONLoader\"}}{{/crossLink}} or {{#crossLink \"JSONPLoader\"}}{{/crossLink}} under the hood.\n\t * @method _createRequest\n\t * @protected\n\t */\n\tp._createRequest = function() {\n\t\tif (!this._preferXHR) {\n\t\t\tthis._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\n\t\t} else {\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\n\t\t}\n\t};\n\n\t/**\n\t * Create the HTML tag used for loading. This method does nothing by default, and needs to be implemented\n\t * by loaders that require tag loading.\n\t * @method _createTag\n\t * @param {String} src The tag source\n\t * @return {HTMLElement} The tag that was created\n\t * @protected\n\t */\n\tp._createTag = function(src) { return null; };\n\n\t/**\n\t * Dispatch a loadstart {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/loadstart:event\"}}{{/crossLink}}\n\t * event for details on the event payload.\n\t * @method _sendLoadStart\n\t * @protected\n\t */\n\tp._sendLoadStart = function () {\n\t\tif (this._isCanceled()) { return; }\n\t\tthis.dispatchEvent(\"loadstart\");\n\t};\n\n\t/**\n\t * Dispatch a {{#crossLink \"ProgressEvent\"}}{{/crossLink}}.\n\t * @method _sendProgress\n\t * @param {Number | Object} value The progress of the loaded item, or an object containing <code>loaded</code>\n\t * and <code>total</code> properties.\n\t * @protected\n\t */\n\tp._sendProgress = function (value) {\n\t\tif (this._isCanceled()) { return; }\n\t\tvar event = null;\n\t\tif (typeof(value) == \"number\") {\n\t\t\tthis.progress = value;\n\t\t\tevent = new createjs.ProgressEvent(this.progress);\n\t\t} else {\n\t\t\tevent = value;\n\t\t\tthis.progress = value.loaded / value.total;\n\t\t\tevent.progress = this.progress;\n\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\n\t\t}\n\t\tthis.hasEventListener(\"progress\") && this.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch a complete {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}} event\n\t * @method _sendComplete\n\t * @protected\n\t */\n\tp._sendComplete = function () {\n\t\tif (this._isCanceled()) { return; }\n\n\t\tthis.loaded = true;\n\n\t\tvar event = new createjs.Event(\"complete\");\n\t\tevent.rawResult = this._rawResult;\n\n\t\tif (this._result != null) {\n\t\t\tevent.result = this._result;\n\t\t}\n\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Dispatch an error {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/error:event\"}}{{/crossLink}}\n\t * event for details on the event payload.\n\t * @method _sendError\n\t * @param {ErrorEvent} event The event object containing specific error properties.\n\t * @protected\n\t */\n\tp._sendError = function (event) {\n\t\tif (this._isCanceled() || !this.hasEventListener(\"error\")) { return; }\n\t\tif (event == null) {\n\t\t\tevent = new createjs.ErrorEvent(\"PRELOAD_ERROR_EMPTY\"); // TODO: Populate error\n\t\t}\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Determine if the load has been canceled. This is important to ensure that method calls or asynchronous events\n\t * do not cause issues after the queue has been cleaned up.\n\t * @method _isCanceled\n\t * @return {Boolean} If the loader has been canceled.\n\t * @protected\n\t */\n\tp._isCanceled = function () {\n\t\tif (window.createjs == null || this.canceled) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * A custom result formatter function, which is called just before a request dispatches its complete event. Most\n\t * loader types already have an internal formatter, but this can be user-overridden for custom formatting. The\n\t * formatted result will be available on Loaders using {{#crossLink \"getResult\"}}{{/crossLink}}, and passing `true`.\n\t * @property resultFormatter\n\t * @type Function\n\t * @return {Object} The formatted result\n\t * @since 0.6.0\n\t */\n\tp.resultFormatter = null;\n\n\t/**\n\t * Handle events from internal requests. By default, loaders will handle, and redispatch the necessary events, but\n\t * this method can be overridden for custom behaviours.\n\t * @method handleEvent\n\t * @param {Event} event The event that the internal request dispatches.\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp.handleEvent = function (event) {\n\t\tswitch (event.type) {\n\t\t\tcase \"complete\":\n\t\t\t\tthis._rawResult = event.target._response;\n\t\t\t\tvar result = this.resultFormatter && this.resultFormatter(this);\n\t\t\t\t// The resultFormatter is asynchronous\n\t\t\t\tif (result instanceof Function) {\n\t\t\t\t\tresult.call(this,\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatSuccess, this),\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatFailed, this)\n\t\t\t\t\t);\n\t\t\t\t// The result formatter is synchronous\n\t\t\t\t} else {\n\t\t\t\t\tthis._result =  result || this._rawResult;\n\t\t\t\t\tthis._sendComplete();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"progress\":\n\t\t\t\tthis._sendProgress(event);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._sendError(event);\n\t\t\t\tbreak;\n\t\t\tcase \"loadstart\":\n\t\t\t\tthis._sendLoadStart();\n\t\t\t\tbreak;\n\t\t\tcase \"abort\":\n\t\t\tcase \"timeout\":\n\t\t\t\tif (!this._isCanceled()) {\n\t\t\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_\" + event.type.toUpperCase() + \"_ERROR\"));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\t/**\n\t * The \"success\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\n\t * functions.\n\t * @method _resultFormatSuccess\n\t * @param {Object} result The formatted result\n\t * @private\n\t */\n\tp._resultFormatSuccess = function (result) {\n\t\tthis._result = result;\n\t\tthis._sendComplete();\n\t};\n\n\t/**\n\t * The \"error\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\n\t * functions.\n\t * @method _resultFormatSuccess\n\t * @param {Object} error The error event\n\t * @private\n\t */\n\tp._resultFormatFailed = function (event) {\n\t\tthis._sendError(event);\n\t};\n\n\t/**\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t */\n\tp.toString = function () {\n\t\treturn \"[PreloadJS AbstractLoader]\";\n\t};\n\n\tcreatejs.AbstractLoader = createjs.promote(AbstractLoader, \"EventDispatcher\");\n\n}());\n\n//##############################################################################\n// AbstractMediaLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * The AbstractMediaLoader is a base class that handles some of the shared methods and properties of loaders that\n\t * handle HTML media elements, such as Video and Audio.\n\t * @class AbstractMediaLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @param {String} type The type of media to load. Usually \"video\" or \"audio\".\n\t * @extends AbstractLoader\n\t * @constructor\n\t */\n\tfunction AbstractMediaLoader(loadItem, preferXHR, type) {\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, type);\n\n\t\t// public properties\n\t\tthis.resultFormatter = this._formatResult;\n\n\t\t// protected properties\n\t\tthis._tagSrcAttribute = \"src\";\n\n        this.on(\"initialize\", this._updateXHR, this);\n\t};\n\n\tvar p = createjs.extend(AbstractMediaLoader, createjs.AbstractLoader);\n\n\t// static properties\n\t// public methods\n\tp.load = function () {\n\t\t// TagRequest will handle most of this, but Sound / Video need a few custom properties, so just handle them here.\n\t\tif (!this._tag) {\n\t\t\tthis._tag = this._createTag(this._item.src);\n\t\t}\n\n\t\tthis._tag.preload = \"auto\";\n\t\tthis._tag.load();\n\n\t\tthis.AbstractLoader_load();\n\t};\n\n\t// protected methods\n\t/**\n\t * Creates a new tag for loading if it doesn't exist yet.\n\t * @method _createTag\n\t * @private\n\t */\n\tp._createTag = function () {};\n\n\n\tp._createRequest = function() {\n\t\tif (!this._preferXHR) {\n\t\t\tthis._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\n\t\t} else {\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\n\t\t}\n\t};\n\n    // protected methods\n    /**\n     * Before the item loads, set its mimeType and responseType.\n     * @property _updateXHR\n     * @param {Event} event\n     * @private\n     */\n    p._updateXHR = function (event) {\n        // Only exists for XHR\n        if (event.loader.setResponseType) {\n            event.loader.setResponseType(\"blob\");\n        }\n    };\n\n\t/**\n\t * The result formatter for media files.\n\t * @method _formatResult\n\t * @param {AbstractLoader} loader\n\t * @returns {HTMLVideoElement|HTMLAudioElement}\n\t * @private\n\t */\n\tp._formatResult = function (loader) {\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\n\t\tthis._tag.onstalled = null;\n\t\tif (this._preferXHR) {\n            var URL = window.URL || window.webkitURL;\n            var result = loader.getResult(true);\n\n\t\t\tloader.getTag().src = URL.createObjectURL(result);\n\t\t}\n\t\treturn loader.getTag();\n\t};\n\n\tcreatejs.AbstractMediaLoader = createjs.promote(AbstractMediaLoader, \"AbstractLoader\");\n\n}());\n\n//##############################################################################\n// AbstractRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * A base class for actual data requests, such as {{#crossLink \"XHRRequest\"}}{{/crossLink}}, {{#crossLink \"TagRequest\"}}{{/crossLink}},\n\t * and {{#crossLink \"MediaRequest\"}}{{/crossLink}}. PreloadJS loaders will typically use a data loader under the\n\t * hood to get data.\n\t * @class AbstractRequest\n\t * @param {LoadItem} item\n\t * @constructor\n\t */\n\tvar AbstractRequest = function (item) {\n\t\tthis._item = item;\n\t};\n\n\tvar p = createjs.extend(AbstractRequest, createjs.EventDispatcher);\n\n\t// public methods\n\t/**\n\t * Begin a load.\n\t * @method load\n\t */\n\tp.load =  function() {};\n\n\t/**\n\t * Clean up a request.\n\t * @method destroy\n\t */\n\tp.destroy = function() {};\n\n\t/**\n\t * Cancel an in-progress request.\n\t * @method cancel\n\t */\n\tp.cancel = function() {};\n\n\tcreatejs.AbstractRequest = createjs.promote(AbstractRequest, \"EventDispatcher\");\n\n}());\n\n//##############################################################################\n// TagRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * An {{#crossLink \"AbstractRequest\"}}{{/crossLink}} that loads HTML tags, such as images and scripts.\n\t * @class TagRequest\n\t * @param {LoadItem} loadItem\n\t * @param {HTMLElement} tag\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t */\n\tfunction TagRequest(loadItem, tag, srcAttribute) {\n\t\tthis.AbstractRequest_constructor(loadItem);\n\n\t\t// protected properties\n\t\t/**\n\t\t * The HTML tag instance that is used to load.\n\t\t * @property _tag\n\t\t * @type {HTMLElement}\n\t\t * @protected\n\t\t */\n\t\tthis._tag = tag;\n\n\t\t/**\n\t\t * The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t\t * @property _tagSrcAttribute\n\t\t * @type {String}\n\t\t * @protected\n\t\t */\n\t\tthis._tagSrcAttribute = srcAttribute;\n\n\t\t/**\n\t\t * A method closure used for handling the tag load event.\n\t\t * @property _loadedHandler\n\t\t * @type {Function}\n\t\t * @private\n\t\t */\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\n\n\t\t/**\n\t\t * Determines if the element was added to the DOM automatically by PreloadJS, so it can be cleaned up after.\n\t\t * @property _addedToDOM\n\t\t * @type {Boolean}\n\t\t * @private\n\t\t */\n\t\tthis._addedToDOM = false;\n\n\t};\n\n\tvar p = createjs.extend(TagRequest, createjs.AbstractRequest);\n\n\t// public methods\n\tp.load = function () {\n\t\tthis._tag.onload = createjs.proxy(this._handleTagComplete, this);\n\t\tthis._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);\n\t\tthis._tag.onerror = createjs.proxy(this._handleError, this);\n\n\t\tvar evt = new createjs.Event(\"initialize\");\n\t\tevt.loader = this._tag;\n\n\t\tthis.dispatchEvent(evt);\n\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\n\t\tthis._tag[this._tagSrcAttribute] = this._item.src;\n\n\t\t// wdg:: Append the tag AFTER setting the src, or SVG loading on iOS will fail.\n\t\tif (this._tag.parentNode == null) {\n\t\t\tcreatejs.DomUtils.appendToBody(this._tag);\n\t\t\tthis._addedToDOM = true;\n\t\t}\n\t};\n\n\tp.destroy = function() {\n\t\tthis._clean();\n\t\tthis._tag = null;\n\n\t\tthis.AbstractRequest_destroy();\n\t};\n\n\t// private methods\n\t/**\n\t * Handle the readyStateChange event from a tag. We need this in place of the `onload` callback (mainly SCRIPT\n\t * and LINK tags), but other cases may exist.\n\t * @method _handleReadyStateChange\n\t * @private\n\t */\n\tp._handleReadyStateChange = function () {\n\t\tclearTimeout(this._loadTimeout);\n\t\t// This is strictly for tags in browsers that do not support onload.\n\t\tvar tag = this._tag;\n\n\t\t// Complete is for old IE support.\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\n\t\t\tthis._handleTagComplete();\n\t\t}\n\t};\n\n\t/**\n\t * Handle any error events from the tag.\n\t * @method _handleError\n\t * @protected\n\t */\n\tp._handleError = function() {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(\"error\");\n\t};\n\n\t/**\n\t * Handle the tag's onload callback.\n\t * @method _handleTagComplete\n\t * @private\n\t */\n\tp._handleTagComplete = function () {\n\t\tthis._rawResult = this._tag;\n\t\tthis._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult;\n\n\t\tthis._clean();\n\n\t\tthis.dispatchEvent(\"complete\");\n\t};\n\n\t/**\n\t * The tag request has not loaded within the time specified in loadTimeout.\n\t * @method _handleError\n\t * @param {Object} event The XHR error event.\n\t * @private\n\t */\n\tp._handleTimeout = function () {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.Event(\"timeout\"));\n\t};\n\n\t/**\n\t * Remove event listeners, but don't destroy the request object\n\t * @method _clean\n\t * @private\n\t */\n\tp._clean = function() {\n\t\tthis._tag.onload = null;\n\t\tthis._tag.onreadystatechange = null;\n\t\tthis._tag.onerror = null;\n\t\tif (this._addedToDOM && this._tag.parentNode != null) {\n\t\t\tthis._tag.parentNode.removeChild(this._tag);\n\t\t}\n\t\tclearTimeout(this._loadTimeout);\n\t};\n\n\t/**\n\t * Handle a stalled audio event. The main place this happens is with HTMLAudio in Chrome when playing back audio\n\t * that is already in a load, but not complete.\n\t * @method _handleStalled\n\t * @private\n\t */\n\tp._handleStalled = function () {\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\n\t};\n\n\tcreatejs.TagRequest = createjs.promote(TagRequest, \"AbstractRequest\");\n\n}());\n\n//##############################################################################\n// MediaTagRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * An {{#crossLink \"TagRequest\"}}{{/crossLink}} that loads HTML tags for video and audio.\n\t * @class MediaTagRequest\n\t * @param {LoadItem} loadItem\n\t * @param {HTMLAudioElement|HTMLVideoElement} tag\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\n\t * @constructor\n\t */\n\tfunction MediaTagRequest(loadItem, tag, srcAttribute) {\n\t\tthis.AbstractRequest_constructor(loadItem);\n\n\t\t// protected properties\n\t\tthis._tag = tag;\n\t\tthis._tagSrcAttribute = srcAttribute;\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\n\t};\n\n\tvar p = createjs.extend(MediaTagRequest, createjs.TagRequest);\n\tvar s = MediaTagRequest;\n\n\t// public methods\n\tp.load = function () {\n\t\tvar sc = createjs.proxy(this._handleStalled, this);\n\t\tthis._stalledCallback = sc;\n\n\t\tvar pc = createjs.proxy(this._handleProgress, this);\n\t\tthis._handleProgress = pc;\n\n\t\tthis._tag.addEventListener(\"stalled\", sc);\n\t\tthis._tag.addEventListener(\"progress\", pc);\n\n\t\t// This will tell us when audio is buffered enough to play through, but not when its loaded.\n\t\t// The tag doesn't keep loading in Chrome once enough has buffered, and we have decided that behaviour is sufficient.\n\t\tthis._tag.addEventListener && this._tag.addEventListener(\"canplaythrough\", this._loadedHandler, false); // canplaythrough callback doesn't work in Chrome, so we use an event.\n\n\t\tthis.TagRequest_load();\n\t};\n\n\t// private methods\n\tp._handleReadyStateChange = function () {\n\t\tclearTimeout(this._loadTimeout);\n\t\t// This is strictly for tags in browsers that do not support onload.\n\t\tvar tag = this._tag;\n\n\t\t// Complete is for old IE support.\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\n\t\t\tthis._handleTagComplete();\n\t\t}\n\t};\n\n\tp._handleStalled = function () {\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\n\t};\n\n\t/**\n\t * An XHR request has reported progress.\n\t * @method _handleProgress\n\t * @param {Object} event The XHR progress event.\n\t * @private\n\t */\n\tp._handleProgress = function (event) {\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\n\t\t}\n\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\t// protected methods\n\tp._clean = function () {\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\n\t\tthis._tag.removeEventListener(\"stalled\", this._stalledCallback);\n\t\tthis._tag.removeEventListener(\"progress\", this._progressCallback);\n\n\t\tthis.TagRequest__clean();\n\t};\n\n\tcreatejs.MediaTagRequest = createjs.promote(MediaTagRequest, \"TagRequest\");\n\n}());\n\n//##############################################################################\n// XHRRequest.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n// constructor\n\t/**\n\t * A preloader that loads items using XHR requests, usually XMLHttpRequest. However XDomainRequests will be used\n\t * for cross-domain requests if possible, and older versions of IE fall back on to ActiveX objects when necessary.\n\t * XHR requests load the content as text or binary data, provide progress and consistent completion events, and\n\t * can be canceled during load. Note that XHR is not supported in IE 6 or earlier, and is not recommended for\n\t * cross-domain loading.\n\t * @class XHRRequest\n\t * @constructor\n\t * @param {Object} item The object that defines the file to load. Please see the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\n\t * for an overview of supported file properties.\n\t * @extends AbstractLoader\n\t */\n\tfunction XHRRequest (item) {\n\t\tthis.AbstractRequest_constructor(item);\n\n\t\t// protected properties\n\t\t/**\n\t\t * A reference to the XHR request used to load the content.\n\t\t * @property _request\n\t\t * @type {XMLHttpRequest | XDomainRequest | ActiveX.XMLHTTP}\n\t\t * @private\n\t\t */\n\t\tthis._request = null;\n\n\t\t/**\n\t\t * A manual load timeout that is used for browsers that do not support the onTimeout event on XHR (XHR level 1,\n\t\t * typically IE9).\n\t\t * @property _loadTimeout\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t\tthis._loadTimeout = null;\n\n\t\t/**\n\t\t * The browser's XHR (XMLHTTPRequest) version. Supported versions are 1 and 2. There is no official way to detect\n\t\t * the version, so we use capabilities to make a best guess.\n\t\t * @property _xhrLevel\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t * @private\n\t\t */\n\t\tthis._xhrLevel = 1;\n\n\t\t/**\n\t\t * The response of a loaded file. This is set because it is expensive to look up constantly. This property will be\n\t\t * null until the file is loaded.\n\t\t * @property _response\n\t\t * @type {mixed}\n\t\t * @private\n\t\t */\n\t\tthis._response = null;\n\n\t\t/**\n\t\t * The response of the loaded file before it is modified. In most cases, content is converted from raw text to\n\t\t * an HTML tag or a formatted object which is set to the <code>result</code> property, but the developer may still\n\t\t * want to access the raw content as it was loaded.\n\t\t * @property _rawResponse\n\t\t * @type {String|Object}\n\t\t * @private\n\t\t */\n\t\tthis._rawResponse = null;\n\n\t\tthis._canceled = false;\n\n\t\t// Setup our event handlers now.\n\t\tthis._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this);\n\t\tthis._handleProgressProxy = createjs.proxy(this._handleProgress, this);\n\t\tthis._handleAbortProxy = createjs.proxy(this._handleAbort, this);\n\t\tthis._handleErrorProxy = createjs.proxy(this._handleError, this);\n\t\tthis._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this);\n\t\tthis._handleLoadProxy = createjs.proxy(this._handleLoad, this);\n\t\tthis._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this);\n\n\t\tif (!this._createXHR(item)) {\n\t\t\t//TODO: Throw error?\n\t\t}\n\t};\n\n\tvar p = createjs.extend(XHRRequest, createjs.AbstractRequest);\n\n// static properties\n\t/**\n\t * A list of XMLHTTP object IDs to try when building an ActiveX object for XHR requests in earlier versions of IE.\n\t * @property ACTIVEX_VERSIONS\n\t * @type {Array}\n\t * @since 0.4.2\n\t * @private\n\t */\n\tXHRRequest.ACTIVEX_VERSIONS = [\n\t\t\"Msxml2.XMLHTTP.6.0\",\n\t\t\"Msxml2.XMLHTTP.5.0\",\n\t\t\"Msxml2.XMLHTTP.4.0\",\n\t\t\"MSXML2.XMLHTTP.3.0\",\n\t\t\"MSXML2.XMLHTTP\",\n\t\t\"Microsoft.XMLHTTP\"\n\t];\n\n// Public methods\n\t/**\n\t * Look up the loaded result.\n\t * @method getResult\n\t * @param {Boolean} [raw=false] Return a raw result instead of a formatted result. This applies to content\n\t * loaded via XHR such as scripts, XML, CSS, and Images. If there is no raw result, the formatted result will be\n\t * returned instead.\n\t * @return {Object} A result object containing the content that was loaded, such as:\n\t * <ul>\n\t *      <li>An image tag (&lt;image /&gt;) for images</li>\n\t *      <li>A script tag for JavaScript (&lt;script /&gt;). Note that scripts loaded with tags may be added to the\n\t *      HTML head.</li>\n\t *      <li>A style tag for CSS (&lt;style /&gt;)</li>\n\t *      <li>Raw text for TEXT</li>\n\t *      <li>A formatted JavaScript object defined by JSON</li>\n\t *      <li>An XML document</li>\n\t *      <li>An binary arraybuffer loaded by XHR</li>\n\t * </ul>\n\t * Note that if a raw result is requested, but not found, the result will be returned instead.\n\t */\n\tp.getResult = function (raw) {\n\t\tif (raw && this._rawResponse) {\n\t\t\treturn this._rawResponse;\n\t\t}\n\t\treturn this._response;\n\t};\n\n\t// Overrides abstract method in AbstractRequest\n\tp.cancel = function () {\n\t\tthis.canceled = true;\n\t\tthis._clean();\n\t\tthis._request.abort();\n\t};\n\n\t// Overrides abstract method in AbstractLoader\n\tp.load = function () {\n\t\tif (this._request == null) {\n\t\t\tthis._handleError();\n\t\t\treturn;\n\t\t}\n\n\t\t//Events\n\t\tif (this._request.addEventListener != null) {\n\t\t\tthis._request.addEventListener(\"loadstart\", this._handleLoadStartProxy, false);\n\t\t\tthis._request.addEventListener(\"progress\", this._handleProgressProxy, false);\n\t\t\tthis._request.addEventListener(\"abort\", this._handleAbortProxy, false);\n\t\t\tthis._request.addEventListener(\"error\", this._handleErrorProxy, false);\n\t\t\tthis._request.addEventListener(\"timeout\", this._handleTimeoutProxy, false);\n\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\n\t\t\tthis._request.addEventListener(\"load\", this._handleLoadProxy, false);\n\t\t\tthis._request.addEventListener(\"readystatechange\", this._handleReadyStateChangeProxy, false);\n\t\t} else {\n\t\t\t// IE9 support\n\t\t\tthis._request.onloadstart = this._handleLoadStartProxy;\n\t\t\tthis._request.onprogress = this._handleProgressProxy;\n\t\t\tthis._request.onabort = this._handleAbortProxy;\n\t\t\tthis._request.onerror = this._handleErrorProxy;\n\t\t\tthis._request.ontimeout = this._handleTimeoutProxy;\n\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\n\t\t\tthis._request.onload = this._handleLoadProxy;\n\t\t\tthis._request.onreadystatechange = this._handleReadyStateChangeProxy;\n\t\t}\n\n\t\t// Set up a timeout if we don't have XHR2\n\t\tif (this._xhrLevel == 1) {\n\t\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\n\t\t}\n\n\t\t// Sometimes we get back 404s immediately, particularly when there is a cross origin request.  // note this does not catch in Chrome\n\t\ttry {\n\t\t\tif (!this._item.values) {\n\t\t\t\tthis._request.send();\n\t\t\t} else {\n\t\t\t\tthis._request.send(createjs.URLUtils.formatQueryString(this._item.values));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_SEND\", null, error));\n\t\t}\n\t};\n\n\tp.setResponseType = function (type) {\n\t\t// Some old browsers doesn't support blob, so we convert arraybuffer to blob after response is downloaded\n\t\tif (type === 'blob') {\n\t\t\ttype = window.URL ? 'blob' : 'arraybuffer';\n\t\t\tthis._responseType = type;\n\t\t}\n\t\tthis._request.responseType = type;\n\t};\n\n\t/**\n\t * Get all the response headers from the XmlHttpRequest.\n\t *\n\t * <strong>From the docs:</strong> Return all the HTTP headers, excluding headers that are a case-insensitive match\n\t * for Set-Cookie or Set-Cookie2, as a single string, with each header line separated by a U+000D CR U+000A LF pair,\n\t * excluding the status line, and with each header name and header value separated by a U+003A COLON U+0020 SPACE\n\t * pair.\n\t * @method getAllResponseHeaders\n\t * @return {String}\n\t * @since 0.4.1\n\t */\n\tp.getAllResponseHeaders = function () {\n\t\tif (this._request.getAllResponseHeaders instanceof Function) {\n\t\t\treturn this._request.getAllResponseHeaders();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\t/**\n\t * Get a specific response header from the XmlHttpRequest.\n\t *\n\t * <strong>From the docs:</strong> Returns the header field value from the response of which the field name matches\n\t * header, unless the field name is Set-Cookie or Set-Cookie2.\n\t * @method getResponseHeader\n\t * @param {String} header The header name to retrieve.\n\t * @return {String}\n\t * @since 0.4.1\n\t */\n\tp.getResponseHeader = function (header) {\n\t\tif (this._request.getResponseHeader instanceof Function) {\n\t\t\treturn this._request.getResponseHeader(header);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n// protected methods\n\t/**\n\t * The XHR request has reported progress.\n\t * @method _handleProgress\n\t * @param {Object} event The XHR progress event.\n\t * @private\n\t */\n\tp._handleProgress = function (event) {\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\n\t\t}\n\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\n\t\tthis.dispatchEvent(newEvent);\n\t};\n\n\t/**\n\t * The XHR request has reported a load start.\n\t * @method _handleLoadStart\n\t * @param {Object} event The XHR loadStart event.\n\t * @private\n\t */\n\tp._handleLoadStart = function (event) {\n\t\tclearTimeout(this._loadTimeout);\n\t\tthis.dispatchEvent(\"loadstart\");\n\t};\n\n\t/**\n\t * The XHR request has reported an abort event.\n\t * @method handleAbort\n\t * @param {Object} event The XHR abort event.\n\t * @private\n\t */\n\tp._handleAbort = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_ABORTED\", null, event));\n\t};\n\n\t/**\n\t * The XHR request has reported an error event.\n\t * @method _handleError\n\t * @param {Object} event The XHR error event.\n\t * @private\n\t */\n\tp._handleError = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(event.message));\n\t};\n\n\t/**\n\t * The XHR request has reported a readyState change. Note that older browsers (IE 7 & 8) do not provide an onload\n\t * event, so we must monitor the readyStateChange to determine if the file is loaded.\n\t * @method _handleReadyStateChange\n\t * @param {Object} event The XHR readyStateChange event.\n\t * @private\n\t */\n\tp._handleReadyStateChange = function (event) {\n\t\tif (this._request.readyState == 4) {\n\t\t\tthis._handleLoad();\n\t\t}\n\t};\n\n\t/**\n\t * The XHR request has completed. This is called by the XHR request directly, or by a readyStateChange that has\n\t * <code>request.readyState == 4</code>. Only the first call to this method will be processed.\n\t *\n\t * Note that This method uses {{#crossLink \"_checkError\"}}{{/crossLink}} to determine if the server has returned an\n\t * error code.\n\t * @method _handleLoad\n\t * @param {Object} event The XHR load event.\n\t * @private\n\t */\n\tp._handleLoad = function (event) {\n\t\tif (this.loaded) {\n\t\t\treturn;\n\t\t}\n\t\tthis.loaded = true;\n\n\t\tvar error = this._checkError();\n\t\tif (error) {\n\t\t\tthis._handleError(error);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._response = this._getResponse();\n\t\t// Convert arraybuffer back to blob\n\t\tif (this._responseType === 'arraybuffer') {\n\t\t\ttry {\n\t\t\t\tthis._response = new Blob([this._response]);\n\t\t\t} catch (e) {\n\t\t\t\t// Fallback to use BlobBuilder if Blob constructor is not supported\n\t\t\t\t// Tested on Android 2.3 ~ 4.2 and iOS5 safari\n\t\t\t\twindow.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n\t\t\t\tif (e.name === 'TypeError' && window.BlobBuilder) {\n\t\t\t\t\tvar builder = new BlobBuilder();\n\t\t\t\t\tbuilder.append(this._response);\n\t\t\t\t\tthis._response = builder.getBlob();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._clean();\n\n\t\tthis.dispatchEvent(new createjs.Event(\"complete\"));\n\t};\n\n\t/**\n\t * The XHR request has timed out. This is called by the XHR request directly, or via a <code>setTimeout</code>\n\t * callback.\n\t * @method _handleTimeout\n\t * @param {Object} [event] The XHR timeout event. This is occasionally null when called by the backup setTimeout.\n\t * @private\n\t */\n\tp._handleTimeout = function (event) {\n\t\tthis._clean();\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_TIMEOUT\", null, event));\n\t};\n\n// Protected\n\t/**\n\t * Determine if there is an error in the current load.\n\t * Currently this checks the status of the request for problem codes, and not actual response content:\n\t * <ul>\n\t *     <li>Status codes between 400 and 599 (HTTP error range)</li>\n\t *     <li>A status of 0, but *only when the application is running on a server*. If the application is running\n\t *     on `file:`, then it may incorrectly treat an error on local (or embedded applications) as a successful\n\t *     load.</li>\n\t * </ul>\n\t * @method _checkError\n\t * @return {Error} An error with the status code in the `message` argument.\n\t * @private\n\t */\n\tp._checkError = function () {\n\t\tvar status = parseInt(this._request.status);\n\t\tif (status >= 400 && status <= 599) {\n\t\t\treturn new Error(status);\n\t\t} else if (status == 0) {\n\t\t\tif ((/^https?:/).test(location.protocol)) { return new Error(0); }\n\t\t\treturn null; // Likely an embedded app.\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\n\t/**\n\t * Validate the response. Different browsers have different approaches, some of which throw errors when accessed\n\t * in other browsers. If there is no response, the <code>_response</code> property will remain null.\n\t * @method _getResponse\n\t * @private\n\t */\n\tp._getResponse = function () {\n\t\tif (this._response != null) {\n\t\t\treturn this._response;\n\t\t}\n\n\t\tif (this._request.response != null) {\n\t\t\treturn this._request.response;\n\t\t}\n\n\t\t// Android 2.2 uses .responseText\n\t\ttry {\n\t\t\tif (this._request.responseText != null) {\n\t\t\t\treturn this._request.responseText;\n\t\t\t}\n\t\t} catch (e) {\n\t\t}\n\n\t\t// When loading XML, IE9 does not return .response, instead it returns responseXML.xml\n\t\ttry {\n\t\t\tif (this._request.responseXML != null) {\n\t\t\t\treturn this._request.responseXML;\n\t\t\t}\n\t\t} catch (e) {\n\t\t}\n\n\t\treturn null;\n\t};\n\n\t/**\n\t * Create an XHR request. Depending on a number of factors, we get totally different results.\n\t * <ol><li>Some browsers get an <code>XDomainRequest</code> when loading cross-domain.</li>\n\t *      <li>XMLHttpRequest are created when available.</li>\n\t *      <li>ActiveX.XMLHTTP objects are used in older IE browsers.</li>\n\t *      <li>Text requests override the mime type if possible</li>\n\t *      <li>Origin headers are sent for crossdomain requests in some browsers.</li>\n\t *      <li>Binary loads set the response type to \"arraybuffer\"</li></ol>\n\t * @method _createXHR\n\t * @param {Object} item The requested item that is being loaded.\n\t * @return {Boolean} If an XHR request or equivalent was successfully created.\n\t * @private\n\t */\n\tp._createXHR = function (item) {\n\t\t// Check for cross-domain loads. We can't fully support them, but we can try.\n\t\tvar crossdomain = createjs.URLUtils.isCrossDomain(item);\n\t\tvar headers = {};\n\n\t\t// Create the request. Fallback to whatever support we have.\n\t\tvar req = null;\n\t\tif (window.XMLHttpRequest) {\n\t\t\treq = new XMLHttpRequest();\n\t\t\t// This is 8 or 9, so use XDomainRequest instead.\n\t\t\tif (crossdomain && req.withCredentials === undefined && window.XDomainRequest) {\n\t\t\t\treq = new XDomainRequest();\n\t\t\t}\n\t\t} else { // Old IE versions use a different approach\n\t\t\tfor (var i = 0, l = s.ACTIVEX_VERSIONS.length; i < l; i++) {\n\t\t\t\tvar axVersion = s.ACTIVEX_VERSIONS[i];\n\t\t\t\ttry {\n\t\t\t\t\treq = new ActiveXObject(axVersion);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (req == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Default to utf-8 for Text requests.\n\t\tif (item.mimeType == null && createjs.RequestUtils.isText(item.type)) {\n\t\t\titem.mimeType = \"text/plain; charset=utf-8\";\n\t\t}\n\n\t\t// IE9 doesn't support overrideMimeType(), so we need to check for it.\n\t\tif (item.mimeType && req.overrideMimeType) {\n\t\t\treq.overrideMimeType(item.mimeType);\n\t\t}\n\n\t\t// Determine the XHR level\n\t\tthis._xhrLevel = (typeof req.responseType === \"string\") ? 2 : 1;\n\n\t\tvar src = null;\n\t\tif (item.method == createjs.Methods.GET) {\n\t\t\tsrc = createjs.URLUtils.buildURI(item.src, item.values);\n\t\t} else {\n\t\t\tsrc = item.src;\n\t\t}\n\n\t\t// Open the request.  Set cross-domain flags if it is supported (XHR level 1 only)\n\t\treq.open(item.method || createjs.Methods.GET, src, true);\n\n\t\tif (crossdomain && req instanceof XMLHttpRequest && this._xhrLevel == 1) {\n\t\t\theaders[\"Origin\"] = location.origin;\n\t\t}\n\n\t\t// To send data we need to set the Content-type header)\n\t\tif (item.values && item.method == createjs.Methods.POST) {\n\t\t\theaders[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n\t\t}\n\n\t\tif (!crossdomain && !headers[\"X-Requested-With\"]) {\n\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t}\n\n\t\tif (item.headers) {\n\t\t\tfor (var n in item.headers) {\n\t\t\t\theaders[n] = item.headers[n];\n\t\t\t}\n\t\t}\n\n\t\tfor (n in headers) {\n\t\t\treq.setRequestHeader(n, headers[n])\n\t\t}\n\n\t\tif (req instanceof XMLHttpRequest && item.withCredentials !== undefined) {\n\t\t\treq.withCredentials = item.withCredentials;\n\t\t}\n\n\t\tthis._request = req;\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * A request has completed (or failed or canceled), and needs to be disposed.\n\t * @method _clean\n\t * @private\n\t */\n\tp._clean = function () {\n\t\tclearTimeout(this._loadTimeout);\n\n\t\tif (this._request.removeEventListener != null) {\n\t\t\tthis._request.removeEventListener(\"loadstart\", this._handleLoadStartProxy);\n\t\t\tthis._request.removeEventListener(\"progress\", this._handleProgressProxy);\n\t\t\tthis._request.removeEventListener(\"abort\", this._handleAbortProxy);\n\t\t\tthis._request.removeEventListener(\"error\", this._handleErrorProxy);\n\t\t\tthis._request.removeEventListener(\"timeout\", this._handleTimeoutProxy);\n\t\t\tthis._request.removeEventListener(\"load\", this._handleLoadProxy);\n\t\t\tthis._request.removeEventListener(\"readystatechange\", this._handleReadyStateChangeProxy);\n\t\t} else {\n\t\t\tthis._request.onloadstart = null;\n\t\t\tthis._request.onprogress = null;\n\t\t\tthis._request.onabort = null;\n\t\t\tthis._request.onerror = null;\n\t\t\tthis._request.ontimeout = null;\n\t\t\tthis._request.onload = null;\n\t\t\tthis._request.onreadystatechange = null;\n\t\t}\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[PreloadJS XHRRequest]\";\n\t};\n\n\tcreatejs.XHRRequest = createjs.promote(XHRRequest, \"AbstractRequest\");\n\n}());\n\n//##############################################################################\n// SoundLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t// constructor\n\t/**\n\t * A loader for HTML audio files. PreloadJS can not load WebAudio files, as a WebAudio context is required, which\n\t * should be created by either a library playing the sound (such as <a href=\"http://soundjs.com\">SoundJS</a>, or an\n\t * external framework that handles audio playback. To load content that can be played by WebAudio, use the\n\t * {{#crossLink \"BinaryLoader\"}}{{/crossLink}}, and handle the audio context decoding manually.\n\t * @class SoundLoader\n\t * @param {LoadItem|Object} loadItem\n\t * @param {Boolean} preferXHR\n\t * @extends AbstractMediaLoader\n\t * @constructor\n\t */\n\tfunction SoundLoader(loadItem, preferXHR) {\n\t\tthis.AbstractMediaLoader_constructor(loadItem, preferXHR, createjs.Types.SOUND);\n\n\t\t// protected properties\n\t\tif (createjs.DomUtils.isAudioTag(loadItem)) {\n\t\t\tthis._tag = loadItem;\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.src)) {\n\t\t\tthis._tag = loadItem;\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.tag)) {\n\t\t\tthis._tag = createjs.DomUtils.isAudioTag(loadItem) ? loadItem : loadItem.src;\n\t\t}\n\n\t\tif (this._tag != null) {\n\t\t\tthis._preferXHR = false;\n\t\t}\n\t};\n\n\tvar p = createjs.extend(SoundLoader, createjs.AbstractMediaLoader);\n\tvar s = SoundLoader;\n\n\t// static methods\n\t/**\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\n\t * {{#crossLink \"Types/SOUND:property\"}}{{/crossLink}}.\n\t * @method canLoadItem\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\n\t * @returns {Boolean} Whether the loader can load the item.\n\t * @static\n\t */\n\ts.canLoadItem = function (item) {\n\t\treturn item.type == createjs.Types.SOUND;\n\t};\n\n\t// protected methods\n\tp._createTag = function (src) {\n\t\tvar tag = createjs.Elements.audio();\n\t\ttag.autoplay = false;\n\t\ttag.preload = \"none\";\n\n\t\t//LM: Firefox fails when this the preload=\"none\" for other tags, but it needs to be \"none\" to ensure PreloadJS works.\n\t\ttag.src = src;\n\t\treturn tag;\n\t};\n\n\tcreatejs.SoundLoader = createjs.promote(SoundLoader, \"AbstractMediaLoader\");\n\n}());\n\n//##############################################################################\n// AudioSprite.js\n//##############################################################################\n\n//  NOTE this is \"Class\" is purely to document audioSprite Setup and usage.\n\n\n/**\n * <strong>Note: AudioSprite is not a class, but its usage is easily lost in the documentation, so it has been called\n * out here for quick reference.</strong>\n *\n * Audio sprites are much like CSS sprites or image sprite sheets: multiple audio assets grouped into a single file.\n * Audio sprites work around limitations in certain browsers, where only a single sound can be loaded and played at a\n * time. We recommend at least 300ms of silence between audio clips to deal with HTML audio tag inaccuracy, and to prevent\n * accidentally playing bits of the neighbouring clips.\n *\n * <strong>Benefits of Audio Sprites:</strong>\n * <ul>\n *     <li>More robust support for older browsers and devices that only allow a single audio instance, such as iOS 5.</li>\n *     <li>They provide a work around for the Internet Explorer 9 audio tag limit, which restricts how many different\n *     sounds that could be loaded at once.</li>\n *     <li>Faster loading by only requiring a single network request for several sounds, especially on mobile devices\n * where the network round trip for each file can add significant latency.</li>\n * </ul>\n *\n * <strong>Drawbacks of Audio Sprites</strong>\n * <ul>\n *     <li>No guarantee of smooth looping when using HTML or Flash audio. If you have a track that needs to loop\n * \t\tsmoothly and you are supporting non-web audio browsers, do not use audio sprites for that sound if you can avoid\n * \t\tit.</li>\n *     <li>No guarantee that HTML audio will play back immediately, especially the first time. In some browsers\n *     (Chrome!), HTML audio will only load enough to play through at the current download speed – so we rely on the\n *     `canplaythrough` event to determine if the audio is loaded. Since audio sprites must jump ahead to play specific\n *     sounds, the audio may not yet have downloaded fully.</li>\n *     <li>Audio sprites share the same core source, so if you have a sprite with 5 sounds and are limited to 2\n * \t\tconcurrently playing instances, you can only play 2 of the sounds at the same time.</li>\n * </ul>\n *\n * <h4>Example</h4>\n *\n *\t\tcreatejs.Sound.initializeDefaultPlugins();\n *\t\tvar assetsPath = \"./assets/\";\n *\t\tvar sounds = [{\n *\t\t\tsrc:\"MyAudioSprite.ogg\", data: {\n *\t\t\t\taudioSprite: [\n *\t\t\t\t\t{id:\"sound1\", startTime:0, duration:500},\n *\t\t\t\t\t{id:\"sound2\", startTime:1000, duration:400},\n *\t\t\t\t\t{id:\"sound3\", startTime:1700, duration: 1000}\n *\t\t\t\t]}\n *\t\t\t}\n *\t\t];\n *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\n *\t\tcreatejs.Sound.on(\"fileload\", loadSound);\n *\t\tcreatejs.Sound.registerSounds(sounds, assetsPath);\n *\t\t// after load is complete\n *\t\tcreatejs.Sound.play(\"sound2\");\n *\n * You can also create audio sprites on the fly by setting the startTime and duration when creating an new AbstractSoundInstance.\n *\n * \t\tcreatejs.Sound.play(\"MyAudioSprite\", {startTime: 1000, duration: 400});\n *\n * The excellent CreateJS community has created a tool to create audio sprites, available at\n * <a href=\"https://github.com/tonistiigi/audiosprite\" target=\"_blank\">https://github.com/tonistiigi/audiosprite</a>,\n * as well as a <a href=\"http://jsfiddle.net/bharat_battu/g8fFP/12/\" target=\"_blank\">jsfiddle</a> to convert the output\n * to SoundJS format.\n *\n * @class AudioSprite\n * @since 0.6.0\n */\n\n//##############################################################################\n// PlayPropsConfig.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\t/**\n\t * A class to store the optional play properties passed in {{#crossLink \"Sound/play\"}}{{/crossLink}} and\n\t * {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}} calls.\n\t *\n\t * Optional Play Properties Include:\n\t * <ul>\n\t * <li>interrupt - How to interrupt any currently playing instances of audio with the same source,\n\t * if the maximum number of instances of the sound are already playing. Values are defined as <code>INTERRUPT_TYPE</code>\n\t * constants on the Sound class, with the default defined by {{#crossLink \"Sound/defaultInterruptBehavior:property\"}}{{/crossLink}}.</li>\n\t * <li>delay - The amount of time to delay the start of audio playback, in milliseconds.</li>\n\t * <li>offset - The offset from the start of the audio to begin playback, in milliseconds.</li>\n\t * <li>loop - How many times the audio loops when it reaches the end of playback. The default is 0 (no\n\t * loops), and -1 can be used for infinite playback.</li>\n\t * <li>volume - The volume of the sound, between 0 and 1. Note that the master volume is applied\n\t * against the individual volume.</li>\n\t * <li>pan - The left-right pan of the sound (if supported), between -1 (left) and 1 (right).</li>\n\t * <li>startTime - To create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.</li>\n\t * <li>duration - To create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.</li>\n\t * </ul>\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \tvar props = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: -1, volume: 0.5})\n\t * \tcreatejs.Sound.play(\"mySound\", props);\n\t * \t// OR\n\t * \tmySoundInstance.play(props);\n\t *\n\t * @class PlayPropsConfig\n\t * @constructor\n\t * @since 0.6.1\n\t */\n\t// TODO think of a better name for this class\n\tvar PlayPropsConfig = function () {\n// Public Properties\n\t\t/**\n\t\t * How to interrupt any currently playing instances of audio with the same source,\n\t\t * if the maximum number of instances of the sound are already playing. Values are defined as\n\t\t * <code>INTERRUPT_TYPE</code> constants on the Sound class, with the default defined by\n\t\t * {{#crossLink \"Sound/defaultInterruptBehavior:property\"}}{{/crossLink}}.\n\t\t * @property interrupt\n\t\t * @type {string}\n\t\t * @default null\n\t\t */\n\t\tthis.interrupt = null;\n\n\t\t/**\n\t\t * The amount of time to delay the start of audio playback, in milliseconds.\n\t\t * @property delay\n\t\t * @type {Number}\n\t\t * @default null\n\t\t */\n\t\tthis.delay = null;\n\n\t\t/**\n\t\t * The offset from the start of the audio to begin playback, in milliseconds.\n\t\t * @property offset\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.offset = null;\n\n\t\t/**\n\t\t * How many times the audio loops when it reaches the end of playback. The default is 0 (no\n\t\t * loops), and -1 can be used for infinite playback.\n\t\t * @property loop\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.loop = null;\n\n\t\t/**\n\t\t * The volume of the sound, between 0 and 1. Note that the master volume is applied\n\t\t * against the individual volume.\n\t\t * @property volume\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.volume = null;\n\n\t\t/**\n\t\t * The left-right pan of the sound (if supported), between -1 (left) and 1 (right).\n\t\t * @property pan\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.pan = null;\n\n\t\t/**\n\t\t * Used to create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.\n\t\t * @property startTime\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.startTime = null;\n\n\t\t/**\n\t\t * Used to create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.\n\t\t * @property duration\n\t\t * @type {number}\n\t\t * @default null\n\t\t */\n\t\tthis.duration = null;\n\t};\n\tvar p = PlayPropsConfig.prototype = {};\n\tvar s = PlayPropsConfig;\n\n\n// Static Methods\n\t/**\n\t * Creates a PlayPropsConfig from another PlayPropsConfig or an Object.\n\t *\n\t * @method create\n\t * @param {PlayPropsConfig|Object} value The play properties\n\t * @returns {PlayPropsConfig}\n\t * @static\n\t */\n\ts.create = function (value) {\n\t\tif (typeof(value) === \"string\") {\n\t\t\t// Handle the old API gracefully.\n\t\t\tconsole && (console.warn || console.log)(\"Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info.\");\n\t\t\treturn new createjs.PlayPropsConfig().set({interrupt:value});\n\t\t} else if (value == null || value instanceof s || value instanceof Object) {\n\t\t\treturn new createjs.PlayPropsConfig().set(value);\n\t\t} else if (value == null) {\n\t\t\tthrow new Error(\"PlayProps configuration not recognized.\");\n\t\t}\n\t};\n\n// Public Methods\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var PlayPropsConfig = new createjs.PlayPropsConfig().set({loop:-1, volume:0.7});\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the PlayPropsConfig instance.\n\t * @return {PlayPropsConfig} Returns the instance the method is called on (useful for chaining calls.)\n\t*/\n\tp.set = function(props) {\n\t\tif (props != null) {\n\t\t\tfor (var n in props) { this[n] = props[n]; }\n\t\t}\n\t\treturn this;\n\t};\n\n\tp.toString = function() {\n\t\treturn \"[PlayPropsConfig]\";\n\t};\n\n\tcreatejs.PlayPropsConfig = s;\n\n}());\n\n//##############################################################################\n// Sound.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * The Sound class is the public API for creating sounds, controlling the overall sound levels, and managing plugins.\n\t * All Sound APIs on this class are static.\n\t *\n\t * <b>Registering and Preloading</b><br />\n\t * Before you can play a sound, it <b>must</b> be registered. You can do this with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}},\n\t * or register multiple sounds using {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}. If you don't register a\n\t * sound prior to attempting to play it using {{#crossLink \"Sound/play\"}}{{/crossLink}} or create it using {{#crossLink \"Sound/createInstance\"}}{{/crossLink}},\n\t * the sound source will be automatically registered but playback will fail as the source will not be ready. If you use\n\t * <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>, registration is handled for you when the sound is\n\t * preloaded. It is recommended to preload sounds either internally using the register functions or externally using\n\t * PreloadJS so they are ready when you want to use them.\n\t *\n\t * <b>Playback</b><br />\n\t * To play a sound once it's been registered and preloaded, use the {{#crossLink \"Sound/play\"}}{{/crossLink}} method.\n\t * This method returns a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} which can be paused, resumed, muted, etc.\n\t * Please see the {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} documentation for more on the instance control APIs.\n\t *\n\t * <b>Plugins</b><br />\n\t * By default, the {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} or the {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}\n\t * are used (when available), although developers can change plugin priority or add new plugins (such as the\n\t * provided {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}). Please see the {{#crossLink \"Sound\"}}{{/crossLink}} API\n\t * methods for more on the playback and plugin APIs. To install plugins, or specify a different plugin order, see\n\t * {{#crossLink \"Sound/installPlugins\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio\";\n\t *      createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.FlashAudioPlugin]);\n\t *      createjs.Sound.alternateExtensions = [\"mp3\"];\n\t *      createjs.Sound.on(\"fileload\", this.loadHandler, this);\n\t *      createjs.Sound.registerSound(\"path/to/mySound.ogg\", \"sound\");\n\t *      function loadHandler(event) {\n     *          // This is fired for each sound that is registered.\n     *          var instance = createjs.Sound.play(\"sound\");  // play using id.  Could also use full source path or event.src.\n     *          instance.on(\"complete\", this.handleComplete, this);\n     *          instance.volume = 0.5;\n\t *      }\n\t *\n\t * The maximum number of concurrently playing instances of the same sound can be specified in the \"data\" argument\n\t * of {{#crossLink \"Sound/registerSound\"}}{{/crossLink}}.  Note that if not specified, the active plugin will apply\n\t * a default limit.  Currently HTMLAudioPlugin sets a default limit of 2, while WebAudioPlugin and FlashAudioPlugin set a\n\t * default limit of 100.\n\t *\n\t *      createjs.Sound.registerSound(\"sound.mp3\", \"soundId\", 4);\n\t *\n\t * Sound can be used as a plugin with PreloadJS to help preload audio properly. Audio preloaded with PreloadJS is\n\t * automatically registered with the Sound class. When audio is not preloaded, Sound will do an automatic internal\n\t * load. As a result, it may fail to play the first time play is called if the audio is not finished loading. Use\n\t * the {{#crossLink \"Sound/fileload:event\"}}{{/crossLink}} event to determine when a sound has finished internally\n\t * preloading. It is recommended that all audio is preloaded before it is played.\n\t *\n\t *      var queue = new createjs.LoadQueue();\n\t *\t\tqueue.installPlugin(createjs.Sound);\n\t *\n\t * <b>Audio Sprites</b><br />\n\t * SoundJS has added support for {{#crossLink \"AudioSprite\"}}{{/crossLink}}, available as of version 0.6.0.\n\t * For those unfamiliar with audio sprites, they are much like CSS sprites or sprite sheets: multiple audio assets\n\t * grouped into a single file.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *\t\tvar assetsPath = \"./assets/\";\n\t *\t\tvar sounds = [{\n\t *\t\t\tsrc:\"MyAudioSprite.ogg\", data: {\n\t *\t\t\t\taudioSprite: [\n\t *\t\t\t\t\t{id:\"sound1\", startTime:0, duration:500},\n\t *\t\t\t\t\t{id:\"sound2\", startTime:1000, duration:400},\n\t *\t\t\t\t\t{id:\"sound3\", startTime:1700, duration: 1000}\n\t *\t\t\t\t]}\n \t *\t\t\t}\n\t *\t\t];\n\t *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\n\t *\t\tcreatejs.Sound.on(\"fileload\", loadSound);\n\t *\t\tcreatejs.Sound.registerSounds(sounds, assetsPath);\n\t *\t\t// after load is complete\n\t *\t\tcreatejs.Sound.play(\"sound2\");\n\t *\n\t * <b>Mobile Playback</b><br />\n\t * Devices running iOS require the WebAudio context to be \"unlocked\" by playing at least one sound inside of a user-\n\t * initiated event (such as touch/click). Earlier versions of SoundJS included a \"MobileSafe\" sample, but this is no\n\t * longer necessary as of SoundJS 0.6.2.\n\t * <ul>\n\t *     <li>\n\t *         In SoundJS 0.4.1 and above, you can either initialize plugins or use the {{#crossLink \"WebAudioPlugin/playEmptySound\"}}{{/crossLink}}\n\t *         method in the call stack of a user input event to manually unlock the audio context.\n\t *     </li>\n\t *     <li>\n\t *         In SoundJS 0.6.2 and above, SoundJS will automatically listen for the first document-level \"mousedown\"\n\t *         and \"touchend\" event, and unlock WebAudio. This will continue to check these events until the WebAudio\n\t *         context becomes \"unlocked\" (changes from \"suspended\" to \"running\")\n\t *     </li>\n\t *     <li>\n\t *         Both the \"mousedown\" and \"touchend\" events can be used to unlock audio in iOS9+, the \"touchstart\" event\n\t *         will work in iOS8 and below. The \"touchend\" event will only work in iOS9 when the gesture is interpreted\n\t *         as a \"click\", so if the user long-presses the button, it will no longer work.\n\t *     </li>\n\t *     <li>\n\t *         When using the <a href=\"http://www.createjs.com/docs/easeljs/classes/Touch.html\">EaselJS Touch class</a>,\n\t *         the \"mousedown\" event will not fire when a canvas is clicked, since MouseEvents are prevented, to ensure\n\t *         only touch events fire. To get around this, you can either rely on \"touchend\", or:\n\t *         <ol>\n\t *             <li>Set the `allowDefault` property on the Touch class constructor to `true` (defaults to `false`).</li>\n\t *             <li>Set the `preventSelection` property on the EaselJS `Stage` to `false`.</li>\n\t *         </ol>\n\t *         These settings may change how your application behaves, and are not recommended.\n\t *     </li>\n\t * </ul>\n\t *\n\t * <b>Loading Alternate Paths and Extension-less Files</b><br />\n\t * SoundJS supports loading alternate paths and extension-less files by passing an object instead of a string for\n\t * the `src` property, which is a hash using the format `{extension:\"path\", extension2:\"path2\"}`. These labels are\n\t * how SoundJS determines if the browser will support the sound. This also enables multiple formats to live in\n\t * different folders, or on CDNs, which often has completely different filenames for each file.\n\t *\n\t * Priority is determined by the property order (first property is tried first).  This is supported by both internal loading\n\t * and loading with PreloadJS.\n\t *\n\t * <em>Note: an id is required for playback.</em>\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *\t\tvar sounds = {path:\"./audioPath/\",\n\t * \t\t\t\tmanifest: [\n\t *\t\t\t\t{id: \"cool\", src: {mp3:\"mp3/awesome.mp3\", ogg:\"noExtensionOggFile\"}}\n\t *\t\t]};\n\t *\n\t *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\n\t *\t\tcreatejs.Sound.addEventListener(\"fileload\", handleLoad);\n\t *\t\tcreatejs.Sound.registerSounds(sounds);\n\t *\n\t * <h3>Known Browser and OS issues</h3>\n\t * <b>IE 9 HTML Audio limitations</b><br />\n\t * <ul><li>There is a delay in applying volume changes to tags that occurs once playback is started. So if you have\n\t * muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of\n\t * when or how you apply the volume change, as the tag seems to need to play to apply it.</li>\n     * <li>MP3 encoding will not always work for audio tags, particularly in Internet Explorer. We've found default\n\t * encoding with 64kbps works.</li>\n\t * <li>Occasionally very short samples will get cut off.</li>\n\t * <li>There is a limit to how many audio tags you can load and play at once, which appears to be determined by\n\t * hardware and browser settings.  See {{#crossLink \"HTMLAudioPlugin.MAX_INSTANCES\"}}{{/crossLink}} for a safe\n\t * estimate.</li></ul>\n\t *\n\t * <b>Firefox 25 Web Audio limitations</b>\n\t * <ul><li>mp3 audio files do not load properly on all windows machines, reported\n\t * <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=929969\" target=\"_blank\">here</a>. </br>\n\t * For this reason it is recommended to pass another FF supported type (ie ogg) first until this bug is resolved, if\n\t * possible.</li></ul>\n\n\t * <b>Safari limitations</b><br />\n\t * <ul><li>Safari requires Quicktime to be installed for audio playback.</li></ul>\n\t *\n\t * <b>iOS 6 Web Audio limitations</b><br />\n\t * <ul><li>Sound is initially locked, and must be unlocked via a user-initiated event. Please see the section on\n\t * Mobile Playback above.</li>\n\t * <li>A bug exists that will distort un-cached web audio when a video element is present in the DOM that has audio\n\t * at a different sampleRate.</li>\n\t * </ul>\n\t *\n\t * <b>Android HTML Audio limitations</b><br />\n\t * <ul><li>We have no control over audio volume. Only the user can set volume on their device.</li>\n\t * <li>We can only play audio inside a user event (touch/click).  This currently means you cannot loop sound or use\n\t * a delay.</li></ul>\n\t *\n\t * <b>Web Audio and PreloadJS</b><br />\n\t * <ul><li>Web Audio must be loaded through XHR, therefore when used with PreloadJS, tag loading is not possible.\n\t * This means that tag loading can not be used to avoid cross domain issues.</li><ul>\n\t *\n\t * @class Sound\n\t * @static\n\t * @uses EventDispatcher\n\t */\n\tfunction Sound() {\n\t\tthrow \"Sound cannot be instantiated\";\n\t}\n\n\tvar s = Sound;\n\n\n// Static Properties\n\t/**\n\t * The interrupt value to interrupt any currently playing instance with the same source, if the maximum number of\n\t * instances of the sound are already playing.\n\t * @property INTERRUPT_ANY\n\t * @type {String}\n\t * @default any\n\t * @static\n\t */\n\ts.INTERRUPT_ANY = \"any\";\n\n\t/**\n\t * The interrupt value to interrupt the earliest currently playing instance with the same source that progressed the\n\t * least distance in the audio track, if the maximum number of instances of the sound are already playing.\n\t * @property INTERRUPT_EARLY\n\t * @type {String}\n\t * @default early\n\t * @static\n\t */\n\ts.INTERRUPT_EARLY = \"early\";\n\n\t/**\n\t * The interrupt value to interrupt the currently playing instance with the same source that progressed the most\n\t * distance in the audio track, if the maximum number of instances of the sound are already playing.\n\t * @property INTERRUPT_LATE\n\t * @type {String}\n\t * @default late\n\t * @static\n\t */\n\ts.INTERRUPT_LATE = \"late\";\n\n\t/**\n\t * The interrupt value to not interrupt any currently playing instances with the same source, if the maximum number of\n\t * instances of the sound are already playing.\n\t * @property INTERRUPT_NONE\n\t * @type {String}\n\t * @default none\n\t * @static\n\t */\n\ts.INTERRUPT_NONE = \"none\";\n\n\t/**\n\t * Defines the playState of an instance that is still initializing.\n\t * @property PLAY_INITED\n\t * @type {String}\n\t * @default playInited\n\t * @static\n\t */\n\ts.PLAY_INITED = \"playInited\";\n\n\t/**\n\t * Defines the playState of an instance that is currently playing or paused.\n\t * @property PLAY_SUCCEEDED\n\t * @type {String}\n\t * @default playSucceeded\n\t * @static\n\t */\n\ts.PLAY_SUCCEEDED = \"playSucceeded\";\n\n\t/**\n\t * Defines the playState of an instance that was interrupted by another instance.\n\t * @property PLAY_INTERRUPTED\n\t * @type {String}\n\t * @default playInterrupted\n\t * @static\n\t */\n\ts.PLAY_INTERRUPTED = \"playInterrupted\";\n\n\t/**\n\t * Defines the playState of an instance that completed playback.\n\t * @property PLAY_FINISHED\n\t * @type {String}\n\t * @default playFinished\n\t * @static\n\t */\n\ts.PLAY_FINISHED = \"playFinished\";\n\n\t/**\n\t * Defines the playState of an instance that failed to play. This is usually caused by a lack of available channels\n\t * when the interrupt mode was \"INTERRUPT_NONE\", the playback stalled, or the sound could not be found.\n\t * @property PLAY_FAILED\n\t * @type {String}\n\t * @default playFailed\n\t * @static\n\t */\n\ts.PLAY_FAILED = \"playFailed\";\n\n\t/**\n\t * A list of the default supported extensions that Sound will <i>try</i> to play. Plugins will check if the browser\n\t * can play these types, so modifying this list before a plugin is initialized will allow the plugins to try to\n\t * support additional media types.\n\t *\n\t * NOTE this does not currently work for {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}.\n\t *\n\t * More details on file formats can be found at <a href=\"http://en.wikipedia.org/wiki/Audio_file_format\" target=\"_blank\">http://en.wikipedia.org/wiki/Audio_file_format</a>.<br />\n\t * A very detailed list of file formats can be found at <a href=\"http://www.fileinfo.com/filetypes/audio\" target=\"_blank\">http://www.fileinfo.com/filetypes/audio</a>.\n\t * @property SUPPORTED_EXTENSIONS\n\t * @type {Array[String]}\n\t * @default [\"mp3\", \"ogg\", \"opus\", \"mpeg\", \"wav\", \"m4a\", \"mp4\", \"aiff\", \"wma\", \"mid\"]\n\t * @since 0.4.0\n\t * @static\n\t */\n\ts.SUPPORTED_EXTENSIONS = [\"mp3\", \"ogg\", \"opus\", \"mpeg\", \"wav\", \"m4a\", \"mp4\", \"aiff\", \"wma\", \"mid\"];\n\n\t/**\n\t * Some extensions use another type of extension support to play (one of them is a codex).  This allows you to map\n\t * that support so plugins can accurately determine if an extension is supported.  Adding to this list can help\n\t * plugins determine more accurately if an extension is supported.\n\t *\n \t * A useful list of extensions for each format can be found at <a href=\"http://html5doctor.com/html5-audio-the-state-of-play/\" target=\"_blank\">http://html5doctor.com/html5-audio-the-state-of-play/</a>.\n\t * @property EXTENSION_MAP\n\t * @type {Object}\n\t * @since 0.4.0\n\t * @default {m4a:\"mp4\"}\n\t * @static\n\t */\n\ts.EXTENSION_MAP = {\n\t\tm4a:\"mp4\"\n\t};\n\n\t/**\n\t * The RegExp pattern used to parse file URIs. This supports simple file names, as well as full domain URIs with\n\t * query strings. The resulting match is: protocol:$1 domain:$2 path:$3 file:$4 extension:$5 query:$6.\n\t * @property FILE_PATTERN\n\t * @type {RegExp}\n\t * @static\n\t * @private\n\t */\n\ts.FILE_PATTERN = /^(?:(\\w+:)\\/{2}(\\w+(?:\\.\\w+)*\\/?))?([/.]*?(?:[^?]+)?\\/)?((?:[^/?]+)\\.(\\w+))(?:\\?(\\S+)?)?$/;\n\n\n// Class Public properties\n\t/**\n\t * Determines the default behavior for interrupting other currently playing instances with the same source, if the\n\t * maximum number of instances of the sound are already playing.  Currently the default is {{#crossLink \"Sound/INTERRUPT_NONE:property\"}}{{/crossLink}}\n\t * but this can be set and will change playback behavior accordingly.  This is only used when {{#crossLink \"Sound/play\"}}{{/crossLink}}\n\t * is called without passing a value for interrupt.\n\t * @property defaultInterruptBehavior\n\t * @type {String}\n\t * @default Sound.INTERRUPT_NONE, or \"none\"\n\t * @static\n\t * @since 0.4.0\n\t */\n\ts.defaultInterruptBehavior = s.INTERRUPT_NONE;  // OJR does s.INTERRUPT_ANY make more sense as default?  Needs game dev testing to see which case makes more sense.\n\n\t/**\n\t * An array of extensions to attempt to use when loading sound, if the default is unsupported by the active plugin.\n\t * These are applied in order, so if you try to Load Thunder.ogg in a browser that does not support ogg, and your\n\t * extensions array is [\"mp3\", \"m4a\", \"wav\"] it will check mp3 support, then m4a, then wav. The audio files need\n\t * to exist in the same location, as only the extension is altered.\n\t *\n\t * Note that regardless of which file is loaded, you can call {{#crossLink \"Sound/createInstance\"}}{{/crossLink}}\n\t * and {{#crossLink \"Sound/play\"}}{{/crossLink}} using the same id or full source path passed for loading.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *\tvar sounds = [\n\t *\t\t{src:\"myPath/mySound.ogg\", id:\"example\"},\n\t *\t];\n\t *\tcreatejs.Sound.alternateExtensions = [\"mp3\"]; // now if ogg is not supported, SoundJS will try asset0.mp3\n\t *\tcreatejs.Sound.on(\"fileload\", handleLoad); // call handleLoad when each sound loads\n\t *\tcreatejs.Sound.registerSounds(sounds, assetPath);\n\t *\t// ...\n\t *\tcreatejs.Sound.play(\"myPath/mySound.ogg\"); // works regardless of what extension is supported.  Note calling with ID is a better approach\n\t *\n\t * @property alternateExtensions\n\t * @type {Array}\n\t * @since 0.5.2\n\t * @static\n\t */\n\ts.alternateExtensions = [];\n\n\t/**\n\t * The currently active plugin. If this is null, then no plugin could be initialized. If no plugin was specified,\n\t * Sound attempts to apply the default plugins: {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}, followed by\n\t * {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\n\t * @property activePlugin\n\t * @type {Object}\n\t * @static\n\t */\n    s.activePlugin = null;\n\n\n// class getter / setter properties\n\n\t/**\n\t * Set the master volume of Sound. The master volume is multiplied against each sound's individual volume.  For\n\t * example, if master volume is 0.5 and a sound's volume is 0.5, the resulting volume is 0.25. To set individual\n\t * sound volume, use AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}}\n\t * instead.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     createjs.Sound.volume = 0.5;\n\t *\n\t * @property volume\n\t * @type {Number}\n\t * @default 1\n\t * @since 0.6.1\n\t */\n\n\t/**\n\t * The internal volume level. Use {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} to adjust the master volume.\n\t * @property _masterVolume\n\t * @type {number}\n\t * @default 1\n\t * @private\n\t */\n\ts._masterVolume = 1;\n\n\t/**\n\t * Use the {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} property instead.\n\t * @method _getMasterVolume\n\t * @private\n\t * @static\n\t * @return {Number}\n\t **/\n\ts._getMasterVolume = function() {\n\t\treturn this._masterVolume;\n\t};\n\t// Sound.getMasterVolume is @deprecated. Remove for 1.1+\n\ts.getVolume = createjs.deprecate(s._getMasterVolume, \"Sound.getVolume\");\n\t/**\n\t * Use the {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} property instead.\n\t * @method _setMasterVolume\n\t * @static\n\t * @private\n\t **/\n\ts._setMasterVolume = function(value) {\n\t\tif (Number(value) == null) { return; }\n\t\tvalue = Math.max(0, Math.min(1, value));\n\t\ts._masterVolume = value;\n\t\tif (!this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(value)) {\n\t\t\tvar instances = this._instances;\n\t\t\tfor (var i = 0, l = instances.length; i < l; i++) {\n\t\t\t\tinstances[i].setMasterVolume(value);\n\t\t\t}\n\t\t}\n\t};\n\t// Sound.stMasterVolume is @deprecated. Remove for 1.1+\n\ts.setVolume = createjs.deprecate(s._setMasterVolume, \"Sound.setVolume\");\n\n\t/**\n\t * Mute/Unmute all audio. Note that muted audio still plays at 0 volume. This global mute value is maintained\n\t * separately and when set will override, but not change the mute property of individual instances. To mute an individual\n\t * instance, use AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} instead.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     createjs.Sound.muted = true;\n\t *\n\t *\n\t * @property muted\n\t * @type {Boolean}\n\t * @default false\n\t * @since 0.6.1\n\t */\n\ts._masterMute = false;\n\n\t/**\n\t * Use the {{#crossLink \"Sound/muted:property\"}}{{/crossLink}} property instead.\n\t * @method _getMute\n\t * @returns {Boolean}\n\t * @static\n\t * @private\n\t */\n\ts._getMute = function () {\n\t\treturn this._masterMute;\n\t};\n\t// Sound.getMute is @deprecated. Remove for 1.1+\n\ts.getMute = createjs.deprecate(s._getMute, \"Sound.getMute\");\n\n\t/**\n\t * Use the {{#crossLink \"Sound/muted:property\"}}{{/crossLink}} property instead.\n\t * @method _setMute\n\t * @param {Boolean} value The muted value\n\t * @static\n\t * @private\n\t */\n\ts._setMute = function (value) {\n\t\tif (value == null) { return; }\n\t\tthis._masterMute = value;\n\t\tif (!this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(value)) {\n\t\t\tvar instances = this._instances;\n\t\t\tfor (var i = 0, l = instances.length; i < l; i++) {\n\t\t\t\tinstances[i].setMasterMute(value);\n\t\t\t}\n\t\t}\n\t};\n\t// Sound.setMute is @deprecated. Remove for 1.1+\n\ts.setMute = createjs.deprecate(s._setMute, \"Sound.setMute\");\n\n\t/**\n\t * Get the active plugins capabilities, which help determine if a plugin can be used in the current environment,\n\t * or if the plugin supports a specific feature. Capabilities include:\n\t * <ul>\n\t *     <li><b>panning:</b> If the plugin can pan audio from left to right</li>\n\t *     <li><b>volume;</b> If the plugin can control audio volume.</li>\n\t *     <li><b>tracks:</b> The maximum number of audio tracks that can be played back at a time. This will be -1\n\t *     if there is no known limit.</li>\n\t * <br />An entry for each file type in {{#crossLink \"Sound/SUPPORTED_EXTENSIONS:property\"}}{{/crossLink}}:\n\t *     <li><b>mp3:</b> If MP3 audio is supported.</li>\n\t *     <li><b>ogg:</b> If OGG audio is supported.</li>\n\t *     <li><b>wav:</b> If WAV audio is supported.</li>\n\t *     <li><b>mpeg:</b> If MPEG audio is supported.</li>\n\t *     <li><b>m4a:</b> If M4A audio is supported.</li>\n\t *     <li><b>mp4:</b> If MP4 audio is supported.</li>\n\t *     <li><b>aiff:</b> If aiff audio is supported.</li>\n\t *     <li><b>wma:</b> If wma audio is supported.</li>\n\t *     <li><b>mid:</b> If mid audio is supported.</li>\n\t * </ul>\n\t *\n\t * You can get a specific capability of the active plugin using standard object notation\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var mp3 = createjs.Sound.capabilities.mp3;\n\t *\n\t * Note this property is read only.\n\t *\n\t * @property capabilities\n\t * @type {Object}\n\t * @static\n\t * @readOnly\n\t * @since 0.6.1\n\t */\n\n\t/**\n\t * Use the {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}} property instead.\n\t * @returns {null}\n\t * @private\n\t */\n\ts._getCapabilities = function() {\n\t\tif (s.activePlugin == null) { return null; }\n\t\treturn s.activePlugin._capabilities;\n\t};\n\t// Sound.getCapabilities is @deprecated. Remove for 1.1+\n\ts.getCapabilities = createjs.deprecate(s._getCapabilities, \"Sound.getCapabilities\");\n\n\tObject.defineProperties(s, {\n\t\tvolume: { get: s._getMasterVolume, set: s._setMasterVolume },\n\t\tmuted: { get: s._getMute, set: s._setMute },\n\t\tcapabilities: { get: s._getCapabilities }\n\t});\n\n\n// Class Private properties\n\t/**\n\t * Determines if the plugins have been registered. If false, the first call to {{#crossLink \"play\"}}{{/crossLink}} will instantiate the default\n\t * plugins ({{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}, followed by {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}).\n\t * If plugins have been registered, but none are applicable, then sound playback will fail.\n\t * @property _pluginsRegistered\n\t * @type {Boolean}\n\t * @default false\n\t * @static\n\t * @private\n\t */\n\ts._pluginsRegistered = false;\n\n\t/**\n\t * Used internally to assign unique IDs to each AbstractSoundInstance.\n\t * @property _lastID\n\t * @type {Number}\n\t * @static\n\t * @private\n\t */\n\ts._lastID = 0;\n\n\t/**\n\t * An array containing all currently playing instances. This allows Sound to control the volume, mute, and playback of\n\t * all instances when using static APIs like {{#crossLink \"Sound/stop\"}}{{/crossLink}} and {{#crossLink \"Sound/volume:property\"}}{{/crossLink}}.\n\t * When an instance has finished playback, it gets removed via the {{#crossLink \"Sound/finishedPlaying\"}}{{/crossLink}}\n\t * method. If the user replays an instance, it gets added back in via the {{#crossLink \"Sound/_beginPlaying\"}}{{/crossLink}}\n\t * method.\n\t * @property _instances\n\t * @type {Array}\n\t * @private\n\t * @static\n\t */\n\ts._instances = [];\n\n\t/**\n\t * An object hash storing objects with sound sources, startTime, and duration via there corresponding ID.\n\t * @property _idHash\n\t * @type {Object}\n\t * @private\n\t * @static\n\t */\n\ts._idHash = {};\n\n\t/**\n\t * An object hash that stores preloading sound sources via the parsed source that is passed to the plugin.  Contains the\n\t * source, id, and data that was passed in by the user.  Parsed sources can contain multiple instances of source, id,\n\t * and data.\n\t * @property _preloadHash\n\t * @type {Object}\n\t * @private\n\t * @static\n\t */\n\ts._preloadHash = {};\n\n\t/**\n\t * An object hash storing {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} via the parsed source that is passed as defaultPlayProps in\n\t * {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} and {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\n\t * @property _defaultPlayPropsHash\n\t * @type {Object}\n\t * @private\n\t * @static\n\t * @since 0.6.1\n\t */\n\ts._defaultPlayPropsHash = {};\n\n\n// EventDispatcher methods:\n\ts.addEventListener = null;\n\ts.removeEventListener = null;\n\ts.removeAllEventListeners = null;\n\ts.dispatchEvent = null;\n\ts.hasEventListener = null;\n\ts._listeners = null;\n\n\tcreatejs.EventDispatcher.initialize(s); // inject EventDispatcher methods.\n\n\n// Events\n\t/**\n\t * This event is fired when a file finishes loading internally. This event is fired for each loaded sound,\n\t * so any handler methods should look up the <code>event.src</code> to handle a particular sound.\n\t * @event fileload\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {String} src The source of the sound that was loaded.\n\t * @param {String} [id] The id passed in when the sound was registered. If one was not provided, it will be null.\n\t * @param {Number|Object} [data] Any additional data associated with the item. If not provided, it will be undefined.\n\t * @since 0.4.1\n\t */\n\n\t/**\n\t * This event is fired when a file fails loading internally. This event is fired for each loaded sound,\n\t * so any handler methods should look up the <code>event.src</code> to handle a particular sound.\n\t * @event fileerror\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {String} src The source of the sound that was loaded.\n\t * @param {String} [id] The id passed in when the sound was registered. If one was not provided, it will be null.\n\t * @param {Number|Object} [data] Any additional data associated with the item. If not provided, it will be undefined.\n\t * @since 0.6.0\n\t */\n\n\n// Class Public Methods\n\t/**\n\t * Get the preload rules to allow Sound to be used as a plugin by <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>.\n\t * Any load calls that have the matching type or extension will fire the callback method, and use the resulting\n\t * object, which is potentially modified by Sound. This helps when determining the correct path, as well as\n\t * registering the audio instance(s) with Sound. This method should not be called, except by PreloadJS.\n\t * @method getPreloadHandlers\n\t * @return {Object} An object containing:\n\t * <ul><li>callback: A preload callback that is fired when a file is added to PreloadJS, which provides\n\t *      Sound a mechanism to modify the load parameters, select the correct file format, register the sound, etc.</li>\n\t *      <li>types: A list of file types that are supported by Sound (currently supports \"sound\").</li>\n\t *      <li>extensions: A list of file extensions that are supported by Sound (see {{#crossLink \"Sound/SUPPORTED_EXTENSIONS:property\"}}{{/crossLink}}).</li></ul>\n\t * @static\n\t * @private\n\t */\n\ts.getPreloadHandlers = function () {\n\t\treturn {\n\t\t\tcallback:createjs.proxy(s.initLoad, s),\n\t\t\ttypes:[\"sound\"],\n\t\t\textensions:s.SUPPORTED_EXTENSIONS\n\t\t};\n\t};\n\n\t/**\n\t * Used to dispatch fileload events from internal loading.\n\t * @method _handleLoadComplete\n\t * @param event A loader event.\n\t * @private\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts._handleLoadComplete = function(event) {\n\t\tvar src = event.target.getItem().src;\n\t\tif (!s._preloadHash[src]) {return;}\n\n\t\tfor (var i = 0, l = s._preloadHash[src].length; i < l; i++) {\n\t\t\tvar item = s._preloadHash[src][i];\n\t\t\ts._preloadHash[src][i] = true;\n\n\t\t\tif (!s.hasEventListener(\"fileload\")) { continue; }\n\n\t\t\tvar event = new createjs.Event(\"fileload\");\n\t\t\tevent.src = item.src;\n\t\t\tevent.id = item.id;\n\t\t\tevent.data = item.data;\n\t\t\tevent.sprite = item.sprite;\n\n\t\t\ts.dispatchEvent(event);\n\t\t}\n\t};\n\n\t/**\n\t * Used to dispatch error events from internal preloading.\n\t * @param event\n\t * @private\n\t * @since 0.6.0\n\t * @static\n\t */\n\ts._handleLoadError = function(event) {\n\t\tvar src = event.target.getItem().src;\n\t\tif (!s._preloadHash[src]) {return;}\n\n\t\tfor (var i = 0, l = s._preloadHash[src].length; i < l; i++) {\n\t\t\tvar item = s._preloadHash[src][i];\n\t\t\ts._preloadHash[src][i] = false;\n\n\t\t\tif (!s.hasEventListener(\"fileerror\")) { continue; }\n\n\t\t\tvar event = new createjs.Event(\"fileerror\");\n\t\t\tevent.src = item.src;\n\t\t\tevent.id = item.id;\n\t\t\tevent.data = item.data;\n\t\t\tevent.sprite = item.sprite;\n\n\t\t\ts.dispatchEvent(event);\n\t\t}\n\t};\n\n\t/**\n\t * Used by {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} to register a Sound plugin.\n\t *\n\t * @method _registerPlugin\n\t * @param {Object} plugin The plugin class to install.\n\t * @return {Boolean} Whether the plugin was successfully initialized.\n\t * @static\n\t * @private\n\t */\n\ts._registerPlugin = function (plugin) {\n\t\t// Note: Each plugin is passed in as a class reference, but we store the activePlugin as an instance\n\t\tif (plugin.isSupported()) {\n\t\t\ts.activePlugin = new plugin();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Register a list of Sound plugins, in order of precedence. To register a single plugin, pass a single element in the array.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio/\";\n\t *      createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashAudioPlugin]);\n\t *\n\t * @method registerPlugins\n\t * @param {Array} plugins An array of plugins classes to install.\n\t * @return {Boolean} Whether a plugin was successfully initialized.\n\t * @static\n\t */\n\ts.registerPlugins = function (plugins) {\n\t\ts._pluginsRegistered = true;\n\t\tfor (var i = 0, l = plugins.length; i < l; i++) {\n\t\t\tif (s._registerPlugin(plugins[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Initialize the default plugins. This method is automatically called when any audio is played or registered before\n\t * the user has manually registered plugins, and enables Sound to work without manual plugin setup. Currently, the\n\t * default plugins are {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} followed by {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \tif (!createjs.initializeDefaultPlugins()) { return; }\n\t *\n\t * @method initializeDefaultPlugins\n\t * @returns {Boolean} True if a plugin was initialized, false otherwise.\n\t * @since 0.4.0\n\t * @static\n\t */\n\ts.initializeDefaultPlugins = function () {\n\t\tif (s.activePlugin != null) {return true;}\n\t\tif (s._pluginsRegistered) {return false;}\n\t\tif (s.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin])) {return true;}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Determines if Sound has been initialized, and a plugin has been activated.\n\t *\n\t * <h4>Example</h4>\n\t * This example sets up a Flash fallback, but only if there is no plugin specified yet.\n\t *\n\t * \tif (!createjs.Sound.isReady()) {\n\t *\t\tcreatejs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio/\";\n\t * \t\tcreatejs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashAudioPlugin]);\n\t *\t}\n\t *\n\t * @method isReady\n\t * @return {Boolean} If Sound has initialized a plugin.\n\t * @static\n\t */\n\ts.isReady = function () {\n\t\treturn (s.activePlugin != null);\n\t};\n\n\t/**\n\t * Process manifest items from <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>. This method is intended\n\t * for usage by a plugin, and not for direct interaction.\n\t * @method initLoad\n\t * @param {Object} src The object to load.\n\t * @return {Object|AbstractLoader} An instance of AbstractLoader.\n\t * @private\n\t * @static\n\t */\n\ts.initLoad = function (loadItem) {\n\t\tif (loadItem.type == \"video\") { return true; } // Don't handle video. PreloadJS's plugin model is really aggressive.\n\t\treturn s._registerSound(loadItem);\n\t};\n\n\t/**\n\t * Internal method for loading sounds.  This should not be called directly.\n\t *\n\t * @method _registerSound\n\t * @param {Object} src The object to load, containing src property and optionally containing id and data.\n\t * @return {Object} An object with the modified values that were passed in, which defines the sound.\n\t * Returns false if the source cannot be parsed or no plugins can be initialized.\n\t * Returns true if the source is already loaded.\n\t * @static\n\t * @private\n\t * @since 0.6.0\n\t */\n\n\ts._registerSound = function (loadItem) {\n\t\tif (!s.initializeDefaultPlugins()) {return false;}\n\n\t\tvar details;\n\t\tif (loadItem.src instanceof Object) {\n\t\t\tdetails = s._parseSrc(loadItem.src);\n\t\t\tdetails.src = loadItem.path + details.src;\n\t\t} else {\n\t\t\tdetails = s._parsePath(loadItem.src);\n\t\t}\n\t\tif (details == null) {return false;}\n\t\tloadItem.src = details.src;\n\t\tloadItem.type = \"sound\";\n\n\t\tvar data = loadItem.data;\n\t\tvar numChannels = null;\n\t\tif (data != null) {\n\t\t\tif (!isNaN(data.channels)) {\n\t\t\t\tnumChannels = parseInt(data.channels);\n\t\t\t} else if (!isNaN(data)) {\n\t\t\t\tnumChannels = parseInt(data);\n\t\t\t}\n\n\t\t\tif(data.audioSprite) {\n\t\t\t\tvar sp;\n\t\t\t\tfor(var i = data.audioSprite.length; i--; ) {\n\t\t\t\t\tsp = data.audioSprite[i];\n\t\t\t\t\ts._idHash[sp.id] = {src: loadItem.src, startTime: parseInt(sp.startTime), duration: parseInt(sp.duration)};\n\n\t\t\t\t\tif (sp.defaultPlayProps) {\n\t\t\t\t\t\ts._defaultPlayPropsHash[sp.id] = createjs.PlayPropsConfig.create(sp.defaultPlayProps);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (loadItem.id != null) {s._idHash[loadItem.id] = {src: loadItem.src}};\n\t\tvar loader = s.activePlugin.register(loadItem);\n\n\t\tSoundChannel.create(loadItem.src, numChannels);\n\n\t\t// return the number of instances to the user.  This will also be returned in the load event.\n\t\tif (data == null || !isNaN(data)) {\n\t\t\tloadItem.data = numChannels || SoundChannel.maxPerChannel();\n\t\t} else {\n\t\t\tloadItem.data.channels = numChannels || SoundChannel.maxPerChannel();\n\t\t}\n\n\t\tif (loader.type) {loadItem.type = loader.type;}\n\n\t\tif (loadItem.defaultPlayProps) {\n\t\t\ts._defaultPlayPropsHash[loadItem.src] = createjs.PlayPropsConfig.create(loadItem.defaultPlayProps);\n\t\t}\n\t\treturn loader;\n\t};\n\n\t/**\n\t * Register an audio file for loading and future playback in Sound. This is automatically called when using\n\t * <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>.  It is recommended to register all sounds that\n\t * need to be played back in order to properly prepare and preload them. Sound does internal preloading when required.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Sound.alternateExtensions = [\"mp3\"];\n\t *      createjs.Sound.on(\"fileload\", handleLoad); // add an event listener for when load is completed\n\t *      createjs.Sound.registerSound(\"myAudioPath/mySound.ogg\", \"myID\", 3);\n\t *      createjs.Sound.registerSound({ogg:\"path1/mySound.ogg\", mp3:\"path2/mySoundNoExtension\"}, \"myID\", 3);\n\t *\n\t *\n\t * @method registerSound\n\t * @param {String | Object} src The source or an Object with a \"src\" property or an Object with multiple extension labeled src properties.\n\t * @param {String} [id] An id specified by the user to play the sound later.  Note id is required for when src is multiple extension labeled src properties.\n\t * @param {Number | Object} [data] Data associated with the item. Sound uses the data parameter as the number of\n\t * channels for an audio instance, however a \"channels\" property can be appended to the data object if it is used\n\t * for other information. The audio channels will set a default based on plugin if no value is found.\n\t * Sound also uses the data property to hold an {{#crossLink \"AudioSprite\"}}{{/crossLink}} array of objects in the following format {id, startTime, duration}.<br/>\n\t *   id used to play the sound later, in the same manner as a sound src with an id.<br/>\n\t *   startTime is the initial offset to start playback and loop from, in milliseconds.<br/>\n\t *   duration is the amount of time to play the clip for, in milliseconds.<br/>\n\t * This allows Sound to support audio sprites that are played back by id.\n\t * @param {string} basePath Set a path that will be prepended to src for loading.\n\t * @param {Object | PlayPropsConfig} defaultPlayProps Optional Playback properties that will be set as the defaults on any new AbstractSoundInstance.\n\t * See {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for options.\n\t * @return {Object} An object with the modified values that were passed in, which defines the sound.\n\t * Returns false if the source cannot be parsed or no plugins can be initialized.\n\t * Returns true if the source is already loaded.\n\t * @static\n\t * @since 0.4.0\n\t */\n\ts.registerSound = function (src, id, data, basePath, defaultPlayProps) {\n\t\tvar loadItem = {src: src, id: id, data:data, defaultPlayProps:defaultPlayProps};\n\t\tif (src instanceof Object && src.src) {\n\t\t\tbasePath = id;\n\t\t\tloadItem = src;\n\t\t}\n\t\tloadItem = createjs.LoadItem.create(loadItem);\n\t\tloadItem.path = basePath;\n\n\t\tif (basePath != null && !(loadItem.src instanceof Object)) {loadItem.src = basePath + loadItem.src;}\n\n\t\tvar loader = s._registerSound(loadItem);\n\t\tif(!loader) {return false;}\n\n\t\tif (!s._preloadHash[loadItem.src]) { s._preloadHash[loadItem.src] = [];}\n\t\ts._preloadHash[loadItem.src].push(loadItem);\n\t\tif (s._preloadHash[loadItem.src].length == 1) {\n\t\t\t// OJR note this will disallow reloading a sound if loading fails or the source changes\n\t\t\tloader.on(\"complete\", this._handleLoadComplete, this);\n\t\t\tloader.on(\"error\", this._handleLoadError, this);\n\t\t\ts.activePlugin.preload(loader);\n\t\t} else {\n\t\t\tif (s._preloadHash[loadItem.src][0] == true) {return true;}\n\t\t}\n\n\t\treturn loadItem;\n\t};\n\n\t/**\n\t * Register an array of audio files for loading and future playback in Sound. It is recommended to register all\n\t * sounds that need to be played back in order to properly prepare and preload them. Sound does internal preloading\n\t * when required.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \t\tvar assetPath = \"./myAudioPath/\";\n\t *      var sounds = [\n\t *          {src:\"asset0.ogg\", id:\"example\"},\n\t *          {src:\"asset1.ogg\", id:\"1\", data:6},\n\t *          {src:\"asset2.mp3\", id:\"works\"}\n\t *          {src:{mp3:\"path1/asset3.mp3\", ogg:\"path2/asset3NoExtension\"}, id:\"better\"}\n\t *      ];\n\t *      createjs.Sound.alternateExtensions = [\"mp3\"];\t// if the passed extension is not supported, try this extension\n\t *      createjs.Sound.on(\"fileload\", handleLoad); // call handleLoad when each sound loads\n\t *      createjs.Sound.registerSounds(sounds, assetPath);\n\t *\n\t * @method registerSounds\n\t * @param {Array} sounds An array of objects to load. Objects are expected to be in the format needed for\n\t * {{#crossLink \"Sound/registerSound\"}}{{/crossLink}}: <code>{src:srcURI, id:ID, data:Data}</code>\n\t * with \"id\" and \"data\" being optional.\n\t * You can also pass an object with path and manifest properties, where path is a basePath and manifest is an array of objects to load.\n\t * Note id is required if src is an object with extension labeled src properties.\n\t * @param {string} basePath Set a path that will be prepended to each src when loading.  When creating, playing, or removing\n\t * audio that was loaded with a basePath by src, the basePath must be included.\n\t * @return {Object} An array of objects with the modified values that were passed in, which defines each sound.\n\t * Like registerSound, it will return false for any values when the source cannot be parsed or if no plugins can be initialized.\n\t * Also, it will return true for any values when the source is already loaded.\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.registerSounds = function (sounds, basePath) {\n\t\tvar returnValues = [];\n\t\tif (sounds.path) {\n\t\t\tif (!basePath) {\n\t\t\t\tbasePath = sounds.path;\n\t\t\t} else {\n\t\t\t\tbasePath = basePath + sounds.path;\n\t\t\t}\n\t\t\tsounds = sounds.manifest;\n\t\t\t// TODO document this feature\n\t\t}\n\t\tfor (var i = 0, l = sounds.length; i < l; i++) {\n\t\t\treturnValues[i] = createjs.Sound.registerSound(sounds[i].src, sounds[i].id, sounds[i].data, basePath, sounds[i].defaultPlayProps);\n\t\t}\n\t\treturn returnValues;\n\t};\n\n\t/**\n\t * Remove a sound that has been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\n\t * <br />Note this will stop playback on active instances playing this sound before deleting them.\n\t * <br />Note if you passed in a basePath, you need to pass it or prepend it to the src here.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Sound.removeSound(\"myID\");\n\t *      createjs.Sound.removeSound(\"myAudioBasePath/mySound.ogg\");\n\t *      createjs.Sound.removeSound(\"myPath/myOtherSound.mp3\", \"myBasePath/\");\n\t *      createjs.Sound.removeSound({mp3:\"musicNoExtension\", ogg:\"music.ogg\"}, \"myBasePath/\");\n\t *\n\t * @method removeSound\n\t * @param {String | Object} src The src or ID of the audio, or an Object with a \"src\" property, or an Object with multiple extension labeled src properties.\n\t * @param {string} basePath Set a path that will be prepended to each src when removing.\n\t * @return {Boolean} True if sound is successfully removed.\n\t * @static\n\t * @since 0.4.1\n\t */\n\ts.removeSound = function(src, basePath) {\n\t\tif (s.activePlugin == null) {return false;}\n\n\t\tif (src instanceof Object && src.src) {src = src.src;}\n\n\t\tvar details;\n\t\tif (src instanceof Object) {\n\t\t\tdetails = s._parseSrc(src);\n\t\t} else {\n\t\t\tsrc = s._getSrcById(src).src;\n\t\t\tdetails = s._parsePath(src);\n\t\t}\n\t\tif (details == null) {return false;}\n\t\tsrc = details.src;\n\t\tif (basePath != null) {src = basePath + src;}\n\n\t\tfor(var prop in s._idHash){\n\t\t\tif(s._idHash[prop].src == src) {\n\t\t\t\tdelete(s._idHash[prop]);\n\t\t\t}\n\t\t}\n\n\t\t// clear from SoundChannel, which also stops and deletes all instances\n\t\tSoundChannel.removeSrc(src);\n\n\t\tdelete(s._preloadHash[src]);\n\n\t\ts.activePlugin.removeSound(src);\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * Remove an array of audio files that have been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\n\t * <br />Note this will stop playback on active instances playing this audio before deleting them.\n\t * <br />Note if you passed in a basePath, you need to pass it or prepend it to the src here.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \t\tassetPath = \"./myPath/\";\n\t *      var sounds = [\n\t *          {src:\"asset0.ogg\", id:\"example\"},\n\t *          {src:\"asset1.ogg\", id:\"1\", data:6},\n\t *          {src:\"asset2.mp3\", id:\"works\"}\n\t *      ];\n\t *      createjs.Sound.removeSounds(sounds, assetPath);\n\t *\n\t * @method removeSounds\n\t * @param {Array} sounds An array of objects to remove. Objects are expected to be in the format needed for\n\t * {{#crossLink \"Sound/removeSound\"}}{{/crossLink}}: <code>{srcOrID:srcURIorID}</code>.\n\t * You can also pass an object with path and manifest properties, where path is a basePath and manifest is an array of objects to remove.\n\t * @param {string} basePath Set a path that will be prepended to each src when removing.\n\t * @return {Object} An array of Boolean values representing if the sounds with the same array index were\n\t * successfully removed.\n\t * @static\n\t * @since 0.4.1\n\t */\n\ts.removeSounds = function (sounds, basePath) {\n\t\tvar returnValues = [];\n\t\tif (sounds.path) {\n\t\t\tif (!basePath) {\n\t\t\t\tbasePath = sounds.path;\n\t\t\t} else {\n\t\t\t\tbasePath = basePath + sounds.path;\n\t\t\t}\n\t\t\tsounds = sounds.manifest;\n\t\t}\n\t\tfor (var i = 0, l = sounds.length; i < l; i++) {\n\t\t\treturnValues[i] = createjs.Sound.removeSound(sounds[i].src, basePath);\n\t\t}\n\t\treturn returnValues;\n\t};\n\n\t/**\n\t * Remove all sounds that have been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\n\t * <br />Note this will stop playback on all active sound instances before deleting them.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     createjs.Sound.removeAllSounds();\n\t *\n\t * @method removeAllSounds\n\t * @static\n\t * @since 0.4.1\n\t */\n\ts.removeAllSounds = function() {\n\t\ts._idHash = {};\n\t\ts._preloadHash = {};\n\t\tSoundChannel.removeAll();\n\t\tif (s.activePlugin) {s.activePlugin.removeAllSounds();}\n\t};\n\n\t/**\n\t * Check if a source has been loaded by internal preloaders. This is necessary to ensure that sounds that are\n\t * not completed preloading will not kick off a new internal preload if they are played.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     var mySound = \"assetPath/asset0.ogg\";\n\t *     if(createjs.Sound.loadComplete(mySound) {\n\t *         createjs.Sound.play(mySound);\n\t *     }\n\t *\n\t * @method loadComplete\n\t * @param {String} src The src or id that is being loaded.\n\t * @return {Boolean} If the src is already loaded.\n\t * @since 0.4.0\n\t * @static\n\t */\n\ts.loadComplete = function (src) {\n\t\tif (!s.isReady()) { return false; }\n\t\tvar details = s._parsePath(src);\n\t\tif (details) {\n\t\t\tsrc = s._getSrcById(details.src).src;\n\t\t} else {\n\t\t\tsrc = s._getSrcById(src).src;\n\t\t}\n\t\tif(s._preloadHash[src] == undefined) {return false;}\n\t\treturn (s._preloadHash[src][0] == true);  // src only loads once, so if it's true for the first it's true for all\n\t};\n\n\t/**\n\t * Parse the path of a sound. Alternate extensions will be attempted in order if the\n\t * current extension is not supported\n\t * @method _parsePath\n\t * @param {String} value The path to an audio source.\n\t * @return {Object} A formatted object that can be registered with the {{#crossLink \"Sound/activePlugin:property\"}}{{/crossLink}}\n\t * and returned to a preloader like <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>.\n\t * @private\n\t * @static\n\t */\n\ts._parsePath = function (value) {\n\t\tif (typeof(value) != \"string\") {value = value.toString();}\n\n\t\tvar match = value.match(s.FILE_PATTERN);\n\t\tif (match == null) {return false;}\n\n\t\tvar name = match[4];\n\t\tvar ext = match[5];\n\t\tvar c = s.capabilities;\n\t\tvar i = 0;\n\t\twhile (!c[ext]) {\n\t\t\text = s.alternateExtensions[i++];\n\t\t\tif (i > s.alternateExtensions.length) { return null;}\t// no extensions are supported\n\t\t}\n\t\tvalue = value.replace(\".\"+match[5], \".\"+ext);\n\n\t\tvar ret = {name:name, src:value, extension:ext};\n\t\treturn ret;\n\t};\n\n\t/**\n\t * Parse the path of a sound based on properties of src matching with supported extensions.\n\t * Returns false if none of the properties are supported\n\t * @method _parseSrc\n\t * @param {Object} value The paths to an audio source, indexed by extension type.\n\t * @return {Object} A formatted object that can be registered with the {{#crossLink \"Sound/activePlugin:property\"}}{{/crossLink}}\n\t * and returned to a preloader like <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>.\n\t * @private\n\t * @static\n\t */\n\ts._parseSrc = function (value) {\n\t\tvar ret = {name:undefined, src:undefined, extension:undefined};\n\t\tvar c = s.capabilities;\n\n\t\tfor (var prop in value) {\n\t\t  if(value.hasOwnProperty(prop) && c[prop]) {\n\t\t\t\tret.src = value[prop];\n\t\t\t\tret.extension = prop;\n\t\t\t\tbreak;\n\t\t  }\n\t\t}\n\t\tif (!ret.src) {return false;}\t// no matches\n\n\t\tvar i = ret.src.lastIndexOf(\"/\");\n\t\tif (i != -1) {\n\t\t\tret.name = ret.src.slice(i+1);\n\t\t} else {\n\t\t\tret.name = ret.src;\n\t\t}\n\n\t\treturn ret;\n\t};\n\n\t/* ---------------\n\t Static API.\n\t --------------- */\n\t/**\n\t * Play a sound and get a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to control. If the sound fails to\n\t * play, an AbstractSoundInstance will still be returned, and have a playState of {{#crossLink \"Sound/PLAY_FAILED:property\"}}{{/crossLink}}.\n\t * Note that even on sounds with failed playback, you may still be able to call the {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}},\n\t * method, since the failure could be due to lack of available channels. If the src does not have a supported\n\t * extension or if there is no available plugin, a default AbstractSoundInstance will still be returned, which will\n\t * not play any audio, but will not generate errors.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Sound.on(\"fileload\", handleLoad);\n\t *      createjs.Sound.registerSound(\"myAudioPath/mySound.mp3\", \"myID\", 3);\n\t *      function handleLoad(event) {\n\t *      \tcreatejs.Sound.play(\"myID\");\n\t *      \t// store off AbstractSoundInstance for controlling\n\t *      \tvar myInstance = createjs.Sound.play(\"myID\", {interrupt: createjs.Sound.INTERRUPT_ANY, loop:-1});\n\t *      }\n\t *\n\t * NOTE: To create an audio sprite that has not already been registered, both startTime and duration need to be set.\n\t * This is only when creating a new audio sprite, not when playing using the id of an already registered audio sprite.\n\t *\n\t * @method play\n\t * @param {String} src The src or ID of the audio.\n\t * @param {Object | PlayPropsConfig} props A PlayPropsConfig instance, or an object that contains the parameters to\n\t * play a sound. See the {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for more info.\n\t * @return {AbstractSoundInstance} A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} that can be controlled\n\t * after it is created.\n\t * @static\n\t */\n\ts.play = function (src, props) {\n\t\tvar playProps = createjs.PlayPropsConfig.create(props);\n\t\tvar instance = s.createInstance(src, playProps.startTime, playProps.duration);\n\t\tvar ok = s._playInstance(instance, playProps);\n\t\tif (!ok) {instance._playFailed();}\n\t\treturn instance;\n\t};\n\n\t/**\n\t * Creates a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} using the passed in src. If the src does not have a\n\t * supported extension or if there is no available plugin, a default AbstractSoundInstance will be returned that can be\n\t * called safely but does nothing.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var myInstance = null;\n\t *      createjs.Sound.on(\"fileload\", handleLoad);\n\t *      createjs.Sound.registerSound(\"myAudioPath/mySound.mp3\", \"myID\", 3);\n\t *      function handleLoad(event) {\n\t *      \tmyInstance = createjs.Sound.createInstance(\"myID\");\n\t *      \t// alternately we could call the following\n\t *      \tmyInstance = createjs.Sound.createInstance(\"myAudioPath/mySound.mp3\");\n\t *      }\n\t *\n\t * NOTE to create an audio sprite that has not already been registered, both startTime and duration need to be set.\n\t * This is only when creating a new audio sprite, not when playing using the id of an already registered audio sprite.\n\t *\n\t * @method createInstance\n\t * @param {String} src The src or ID of the audio.\n\t * @param {Number} [startTime=null] To create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.\n\t * @param {Number} [duration=null] To create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.\n\t * @return {AbstractSoundInstance} A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} that can be controlled after it is created.\n\t * Unsupported extensions will return the default AbstractSoundInstance.\n\t * @since 0.4.0\n\t * @static\n\t */\n\ts.createInstance = function (src, startTime, duration) {\n\t\tif (!s.initializeDefaultPlugins()) { return new createjs.DefaultSoundInstance(src, startTime, duration); }\n\n\t\tvar defaultPlayProps = s._defaultPlayPropsHash[src];\t// for audio sprites, which create and store defaults by id\n\t\tsrc = s._getSrcById(src);\n\n\t\tvar details = s._parsePath(src.src);\n\n\t\tvar instance = null;\n\t\tif (details != null && details.src != null) {\n\t\t\tSoundChannel.create(details.src);\n\t\t\tif (startTime == null) { startTime = src.startTime; }\n\t\t\tinstance = s.activePlugin.create(details.src, startTime, duration || src.duration);\n\n\t\t\tdefaultPlayProps = defaultPlayProps || s._defaultPlayPropsHash[details.src];\n\t\t\tif (defaultPlayProps) {\n\t\t\t\tinstance.applyPlayProps(defaultPlayProps);\n\t\t\t}\n\t\t} else {\n\t\t\tinstance = new createjs.DefaultSoundInstance(src, startTime, duration);\n\t\t}\n\n\t\tinstance.uniqueId = s._lastID++;\n\n\t\treturn instance;\n\t};\n\n\t/**\n\t * Stop all audio (global stop). Stopped audio is reset, and not paused. To play audio that has been stopped,\n\t * call AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     createjs.Sound.stop();\n\t *\n\t * @method stop\n\t * @static\n\t */\n\ts.stop = function () {\n\t\tvar instances = this._instances;\n\t\tfor (var i = instances.length; i--; ) {\n\t\t\tinstances[i].stop();  // NOTE stop removes instance from this._instances\n\t\t}\n\t};\n\n\t/**\n\t * Set the default playback properties for all new SoundInstances of the passed in src or ID.\n\t * See {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for available properties.\n\t *\n\t * @method setDefaultPlayProps\n\t * @param {String} src The src or ID used to register the audio.\n\t * @param {Object | PlayPropsConfig} playProps The playback properties you would like to set.\n\t * @since 0.6.1\n\t */\n\ts.setDefaultPlayProps = function(src, playProps) {\n\t\tsrc = s._getSrcById(src);\n\t\ts._defaultPlayPropsHash[s._parsePath(src.src).src] = createjs.PlayPropsConfig.create(playProps);\n\t};\n\n\t/**\n\t * Get the default playback properties for the passed in src or ID.  These properties are applied to all\n\t * new SoundInstances.  Returns null if default does not exist.\n\t *\n\t * @method getDefaultPlayProps\n\t * @param {String} src The src or ID used to register the audio.\n\t * @returns {PlayPropsConfig} returns an existing PlayPropsConfig or null if one does not exist\n\t * @since 0.6.1\n\t */\n\ts.getDefaultPlayProps = function(src) {\n\t\tsrc = s._getSrcById(src);\n\t\treturn s._defaultPlayPropsHash[s._parsePath(src.src).src];\n\t};\n\n\n\t/* ---------------\n\t Internal methods\n\t --------------- */\n\t/**\n\t * Play an instance. This is called by the static API, as well as from plugins. This allows the core class to\n\t * control delays.\n\t * @method _playInstance\n\t * @param {AbstractSoundInstance} instance The {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to start playing.\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\n\t * @return {Boolean} If the sound can start playing. Sounds that fail immediately will return false. Sounds that\n\t * have a delay will return true, but may still fail to play.\n\t * @private\n\t * @static\n\t */\n\ts._playInstance = function (instance, playProps) {\n\t\tvar defaultPlayProps = s._defaultPlayPropsHash[instance.src] || {};\n\t\tif (playProps.interrupt == null) {playProps.interrupt = defaultPlayProps.interrupt || s.defaultInterruptBehavior};\n\t\tif (playProps.delay == null) {playProps.delay = defaultPlayProps.delay || 0;}\n\t\tif (playProps.offset == null) {playProps.offset = instance.position;}\n\t\tif (playProps.loop == null) {playProps.loop = instance.loop;}\n\t\tif (playProps.volume == null) {playProps.volume = instance.volume;}\n\t\tif (playProps.pan == null) {playProps.pan = instance.pan;}\n\n\t\tif (playProps.delay == 0) {\n\t\t\tvar ok = s._beginPlaying(instance, playProps);\n\t\t\tif (!ok) {return false;}\n\t\t} else {\n\t\t\t//Note that we can't pass arguments to proxy OR setTimeout (IE only), so just wrap the function call.\n\t\t\t// OJR WebAudio may want to handle this differently, so it might make sense to move this functionality into the plugins in the future\n\t\t\tvar delayTimeoutId = setTimeout(function () {\n\t\t\t\ts._beginPlaying(instance, playProps);\n\t\t\t}, playProps.delay);\n\t\t\tinstance.delayTimeoutId = delayTimeoutId;\n\t\t}\n\n\t\tthis._instances.push(instance);\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * Begin playback. This is called immediately or after delay by {{#crossLink \"Sound/playInstance\"}}{{/crossLink}}.\n\t * @method _beginPlaying\n\t * @param {AbstractSoundInstance} instance A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to begin playback.\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\n\t * @return {Boolean} If the sound can start playing. If there are no available channels, or the instance fails to\n\t * start, this will return false.\n\t * @private\n\t * @static\n\t */\n\ts._beginPlaying = function (instance, playProps) {\n\t\tif (!SoundChannel.add(instance, playProps.interrupt)) {\n\t\t\treturn false;\n\t\t}\n\t\tvar result = instance._beginPlaying(playProps);\n\t\tif (!result) {\n\t\t\tvar index = createjs.indexOf(this._instances, instance);\n\t\t\tif (index > -1) {this._instances.splice(index, 1);}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\t/**\n\t * Get the source of a sound via the ID passed in with a register call. If no ID is found the value is returned\n\t * instead.\n\t * @method _getSrcById\n\t * @param {String} value The ID the sound was registered with.\n\t * @return {String} The source of the sound if it has been registered with this ID or the value that was passed in.\n\t * @private\n\t * @static\n\t */\n\ts._getSrcById = function (value) {\n\t\treturn s._idHash[value] || {src: value};\n\t};\n\n\t/**\n\t * A sound has completed playback, been interrupted, failed, or been stopped. This method removes the instance from\n\t * Sound management. It will be added again, if the sound re-plays. Note that this method is called from the\n\t * instances themselves.\n\t * @method _playFinished\n\t * @param {AbstractSoundInstance} instance The instance that finished playback.\n\t * @private\n\t * @static\n\t */\n\ts._playFinished = function (instance) {\n\t\tSoundChannel.remove(instance);\n\t\tvar index = createjs.indexOf(this._instances, instance);\n\t\tif (index > -1) {this._instances.splice(index, 1);}\t// OJR this will always be > -1, there is no way for an instance to exist without being added to this._instances\n\t};\n\n\tcreatejs.Sound = Sound;\n\n\t/**\n\t * An internal class that manages the number of active {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} instances for\n\t * each sound type. This method is only used internally by the {{#crossLink \"Sound\"}}{{/crossLink}} class.\n\t *\n\t * The number of sounds is artificially limited by Sound in order to prevent over-saturation of a\n\t * single sound, as well as to stay within hardware limitations, although the latter may disappear with better\n\t * browser support.\n\t *\n\t * When a sound is played, this class ensures that there is an available instance, or interrupts an appropriate\n\t * sound that is already playing.\n\t * #class SoundChannel\n\t * @param {String} src The source of the instances\n\t * @param {Number} [max=1] The number of instances allowed\n\t * @constructor\n\t * @protected\n\t */\n\tfunction SoundChannel(src, max) {\n\t\tthis.init(src, max);\n\t}\n\n\t/* ------------\n\t Static API\n\t ------------ */\n\t/**\n\t * A hash of channel instances indexed by source.\n\t * #property channels\n\t * @type {Object}\n\t * @static\n\t */\n\tSoundChannel.channels = {};\n\n\t/**\n\t * Create a sound channel. Note that if the sound channel already exists, this will fail.\n\t * #method create\n\t * @param {String} src The source for the channel\n\t * @param {Number} max The maximum amount this channel holds. The default is {{#crossLink \"SoundChannel.maxDefault\"}}{{/crossLink}}.\n\t * @return {Boolean} If the channels were created.\n\t * @static\n\t */\n\tSoundChannel.create = function (src, max) {\n\t\tvar channel = SoundChannel.get(src);\n\t\tif (channel == null) {\n\t\t\tSoundChannel.channels[src] = new SoundChannel(src, max);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t * Delete a sound channel, stop and delete all related instances. Note that if the sound channel does not exist, this will fail.\n\t * #method remove\n\t * @param {String} src The source for the channel\n\t * @return {Boolean} If the channels were deleted.\n\t * @static\n\t */\n\tSoundChannel.removeSrc = function (src) {\n\t\tvar channel = SoundChannel.get(src);\n\t\tif (channel == null) {return false;}\n\t\tchannel._removeAll();\t// this stops and removes all active instances\n\t\tdelete(SoundChannel.channels[src]);\n\t\treturn true;\n\t};\n\t/**\n\t * Delete all sound channels, stop and delete all related instances.\n\t * #method removeAll\n\t * @static\n\t */\n\tSoundChannel.removeAll = function () {\n\t\tfor(var channel in SoundChannel.channels) {\n\t\t\tSoundChannel.channels[channel]._removeAll();\t// this stops and removes all active instances\n\t\t}\n\t\tSoundChannel.channels = {};\n\t};\n\t/**\n\t * Add an instance to a sound channel.\n\t * #method add\n\t * @param {AbstractSoundInstance} instance The instance to add to the channel\n\t * @param {String} interrupt The interrupt value to use. Please see the {{#crossLink \"Sound/play\"}}{{/crossLink}}\n\t * for details on interrupt modes.\n\t * @return {Boolean} The success of the method call. If the channel is full, it will return false.\n\t * @static\n\t */\n\tSoundChannel.add = function (instance, interrupt) {\n\t\tvar channel = SoundChannel.get(instance.src);\n\t\tif (channel == null) {return false;}\n\t\treturn channel._add(instance, interrupt);\n\t};\n\t/**\n\t * Remove an instance from the channel.\n\t * #method remove\n\t * @param {AbstractSoundInstance} instance The instance to remove from the channel\n\t * @return The success of the method call. If there is no channel, it will return false.\n\t * @static\n\t */\n\tSoundChannel.remove = function (instance) {\n\t\tvar channel = SoundChannel.get(instance.src);\n\t\tif (channel == null) {return false;}\n\t\tchannel._remove(instance);\n\t\treturn true;\n\t};\n\t/**\n\t * Get the maximum number of sounds you can have in a channel.\n\t * #method maxPerChannel\n\t * @return {Number} The maximum number of sounds you can have in a channel.\n\t */\n\tSoundChannel.maxPerChannel = function () {\n\t\treturn p.maxDefault;\n\t};\n\t/**\n\t * Get a channel instance by its src.\n\t * #method get\n\t * @param {String} src The src to use to look up the channel\n\t * @static\n\t */\n\tSoundChannel.get = function (src) {\n\t\treturn SoundChannel.channels[src];\n\t};\n\n\tvar p = SoundChannel.prototype;\n\tp.constructor = SoundChannel;\n\n\t/**\n\t * The source of the channel.\n\t * #property src\n\t * @type {String}\n\t */\n\tp.src = null;\n\n\t/**\n\t * The maximum number of instances in this channel.  -1 indicates no limit\n\t * #property max\n\t * @type {Number}\n\t */\n\tp.max = null;\n\n\t/**\n\t * The default value to set for max, if it isn't passed in.  Also used if -1 is passed.\n\t * #property maxDefault\n\t * @type {Number}\n\t * @default 100\n\t * @since 0.4.0\n\t */\n\tp.maxDefault = 100;\n\n\t/**\n\t * The current number of active instances.\n\t * #property length\n\t * @type {Number}\n\t */\n\tp.length = 0;\n\n\t/**\n\t * Initialize the channel.\n\t * #method init\n\t * @param {String} src The source of the channel\n\t * @param {Number} max The maximum number of instances in the channel\n\t * @protected\n\t */\n\tp.init = function (src, max) {\n\t\tthis.src = src;\n\t\tthis.max = max || this.maxDefault;\n\t\tif (this.max == -1) {this.max = this.maxDefault;}\n\t\tthis._instances = [];\n\t};\n\n\t/**\n\t * Get an instance by index.\n\t * #method get\n\t * @param {Number} index The index to return.\n\t * @return {AbstractSoundInstance} The AbstractSoundInstance at a specific instance.\n\t */\n\tp._get = function (index) {\n\t\treturn this._instances[index];\n\t};\n\n\t/**\n\t * Add a new instance to the channel.\n\t * #method add\n\t * @param {AbstractSoundInstance} instance The instance to add.\n\t * @return {Boolean} The success of the method call. If the channel is full, it will return false.\n\t */\n\tp._add = function (instance, interrupt) {\n\t\tif (!this._getSlot(interrupt, instance)) {return false;}\n\t\tthis._instances.push(instance);\n\t\tthis.length++;\n\t\treturn true;\n\t};\n\n\t/**\n\t * Remove an instance from the channel, either when it has finished playing, or it has been interrupted.\n\t * #method remove\n\t * @param {AbstractSoundInstance} instance The instance to remove\n\t * @return {Boolean} The success of the remove call. If the instance is not found in this channel, it will\n\t * return false.\n\t */\n\tp._remove = function (instance) {\n\t\tvar index = createjs.indexOf(this._instances, instance);\n\t\tif (index == -1) {return false;}\n\t\tthis._instances.splice(index, 1);\n\t\tthis.length--;\n\t\treturn true;\n\t};\n\n\t/**\n\t * Stop playback and remove all instances from the channel.  Usually in response to a delete call.\n\t * #method removeAll\n\t */\n\tp._removeAll = function () {\n\t\t// Note that stop() removes the item from the list\n\t\tfor (var i=this.length-1; i>=0; i--) {\n\t\t\tthis._instances[i].stop();\n\t\t}\n\t};\n\n\t/**\n\t * Get an available slot depending on interrupt value and if slots are available.\n\t * #method getSlot\n\t * @param {String} interrupt The interrupt value to use.\n\t * @param {AbstractSoundInstance} instance The sound instance that will go in the channel if successful.\n\t * @return {Boolean} Determines if there is an available slot. Depending on the interrupt mode, if there are no slots,\n\t * an existing AbstractSoundInstance may be interrupted. If there are no slots, this method returns false.\n\t */\n\tp._getSlot = function (interrupt, instance) {\n\t\tvar target, replacement;\n\n\t\tif (interrupt != Sound.INTERRUPT_NONE) {\n\t\t\t// First replacement candidate\n\t\t\treplacement = this._get(0);\n\t\t\tif (replacement == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = 0, l = this.max; i < l; i++) {\n\t\t\ttarget = this._get(i);\n\n\t\t\t// Available Space\n\t\t\tif (target == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Audio is complete or not playing\n\t\t\tif (target.playState == Sound.PLAY_FINISHED ||\n\t\t\t\ttarget.playState == Sound.PLAY_INTERRUPTED ||\n\t\t\t\ttarget.playState == Sound.PLAY_FAILED) {\n\t\t\t\treplacement = target;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (interrupt == Sound.INTERRUPT_NONE) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Audio is a better candidate than the current target, according to playhead\n\t\t\tif ((interrupt == Sound.INTERRUPT_EARLY && target.position < replacement.position) ||\n\t\t\t\t(interrupt == Sound.INTERRUPT_LATE && target.position > replacement.position)) {\n\t\t\t\t\treplacement = target;\n\t\t\t}\n\t\t}\n\n\t\tif (replacement != null) {\n\t\t\treplacement._interrupt();\n\t\t\tthis._remove(replacement);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[Sound SoundChannel]\";\n\t};\n\t// do not add SoundChannel to namespace\n\n}());\n\n//##############################################################################\n// AbstractSoundInstance.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n/**\n * A AbstractSoundInstance is created when any calls to the Sound API method {{#crossLink \"Sound/play\"}}{{/crossLink}} or\n * {{#crossLink \"Sound/createInstance\"}}{{/crossLink}} are made. The AbstractSoundInstance is returned by the active plugin\n * for control by the user.\n *\n * <h4>Example</h4>\n *\n *      var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\");\n *\n * A number of additional parameters provide a quick way to determine how a sound is played. Please see the Sound\n * API method {{#crossLink \"Sound/play\"}}{{/crossLink}} for a list of arguments.\n *\n * Once a AbstractSoundInstance is created, a reference can be stored that can be used to control the audio directly through\n * the AbstractSoundInstance. If the reference is not stored, the AbstractSoundInstance will play out its audio (and any loops), and\n * is then de-referenced from the {{#crossLink \"Sound\"}}{{/crossLink}} class so that it can be cleaned up. If audio\n * playback has completed, a simple call to the {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}} instance method\n * will rebuild the references the Sound class need to control it.\n *\n *      var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\", {loop:2});\n *      myInstance.on(\"loop\", handleLoop);\n *      function handleLoop(event) {\n *          myInstance.volume = myInstance.volume * 0.5;\n *      }\n *\n * Events are dispatched from the instance to notify when the sound has completed, looped, or when playback fails\n *\n *      var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\");\n *      myInstance.on(\"complete\", handleComplete);\n *      myInstance.on(\"loop\", handleLoop);\n *      myInstance.on(\"failed\", handleFailed);\n *\n *\n * @class AbstractSoundInstance\n * @param {String} src The path to and file name of the sound.\n * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\n * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\n * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\n * @extends EventDispatcher\n * @constructor\n */\n\n(function () {\n\t\"use strict\";\n\n\n// Constructor:\n\tvar AbstractSoundInstance = function (src, startTime, duration, playbackResource) {\n\t\tthis.EventDispatcher_constructor();\n\n\n\t// public properties:\n\t\t/**\n\t\t * The source of the sound.\n\t\t * @property src\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.src = src;\n\n\t\t/**\n\t\t * The unique ID of the instance. This is set by {{#crossLink \"Sound\"}}{{/crossLink}}.\n\t\t * @property uniqueId\n\t\t * @type {String} | Number\n\t\t * @default -1\n\t\t */\n\t\tthis.uniqueId = -1;\n\n\t\t/**\n\t\t * The play state of the sound. Play states are defined as constants on {{#crossLink \"Sound\"}}{{/crossLink}}.\n\t\t * @property playState\n\t\t * @type {String}\n\t\t * @default null\n\t\t */\n\t\tthis.playState = null;\n\n\t\t/**\n\t\t * A Timeout created by {{#crossLink \"Sound\"}}{{/crossLink}} when this AbstractSoundInstance is played with a delay.\n\t\t * This allows AbstractSoundInstance to remove the delay if stop, pause, or cleanup are called before playback begins.\n\t\t * @property delayTimeoutId\n\t\t * @type {timeoutVariable}\n\t\t * @default null\n\t\t * @protected\n\t\t * @since 0.4.0\n\t\t */\n\t\tthis.delayTimeoutId = null;\n\t\t// TODO consider moving delay into AbstractSoundInstance so it can be handled by plugins\n\n\n\t// private properties\n\t// Getter / Setter Properties\n\t\t// OJR TODO find original reason that we didn't use defined functions.  I think it was performance related\n\t\t/**\n\t\t * The volume of the sound, between 0 and 1.\n\t\t *\n\t\t * The actual output volume of a sound can be calculated using:\n\t\t * <code>myInstance.volume * createjs.Sound._getVolume();</code>\n\t\t *\n\t\t * @property volume\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t */\n\t\tthis._volume =  1;\n\t\tObject.defineProperty(this, \"volume\", {\n\t\t\tget: this._getVolume,\n\t\t\tset: this._setVolume\n\t\t});\n\n\t\t/**\n\t\t * The pan of the sound, between -1 (left) and 1 (right). Note that pan is not supported by HTML Audio.\n\t\t *\n\t\t * Note in WebAudioPlugin this only gives us the \"x\" value of what is actually 3D audio\n\t\t * @property pan\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis._pan =  0;\n\t\tObject.defineProperty(this, \"pan\", {\n\t\t\tget: this._getPan,\n\t\t\tset: this._setPan\n\t\t});\n\n\t\t/**\n\t\t * Audio sprite property used to determine the starting offset.\n\t\t * @property startTime\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @since 0.6.1\n\t\t */\n\t\tthis._startTime = Math.max(0, startTime || 0);\n\t\tObject.defineProperty(this, \"startTime\", {\n\t\t\tget: this._getStartTime,\n\t\t\tset: this._setStartTime\n\t\t});\n\n\t\t/**\n\t\t * Sets or gets the length of the audio clip, value is in milliseconds.\n\t\t *\n\t\t * @property duration\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._duration = Math.max(0, duration || 0);\n\t\tObject.defineProperty(this, \"duration\", {\n\t\t\tget: this._getDuration,\n\t\t\tset: this._setDuration\n\t\t});\n\n\t\t/**\n\t\t * Object that holds plugin specific resource need for audio playback.\n\t\t * This is set internally by the plugin.  For example, WebAudioPlugin will set an array buffer,\n\t\t * HTMLAudioPlugin will set a tag, FlashAudioPlugin will set a flash reference.\n\t\t *\n\t\t * @property playbackResource\n\t\t * @type {Object}\n\t\t * @default null\n\t\t */\n\t\tthis._playbackResource = null;\n\t\tObject.defineProperty(this, \"playbackResource\", {\n\t\t\tget: this._getPlaybackResource,\n\t\t\tset: this._setPlaybackResource\n\t\t});\n\t\tif(playbackResource !== false && playbackResource !== true) { this._setPlaybackResource(playbackResource); }\n\n\t\t/**\n\t\t * The position of the playhead in milliseconds. This can be set while a sound is playing, paused, or stopped.\n\t\t *\n\t\t * @property position\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._position = 0;\n\t\tObject.defineProperty(this, \"position\", {\n\t\t\tget: this._getPosition,\n\t\t\tset: this._setPosition\n\t\t});\n\n\t\t/**\n\t\t * The number of play loops remaining. Negative values will loop infinitely.\n\t\t *\n\t\t * @property loop\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @public\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._loop = 0;\n\t\tObject.defineProperty(this, \"loop\", {\n\t\t\tget: this._getLoop,\n\t\t\tset: this._setLoop\n\t\t});\n\n\t\t/**\n\t\t * Mutes or unmutes the current audio instance.\n\t\t *\n\t\t * @property muted\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @since 0.6.0\n\t\t */\n\t\tthis._muted = false;\n\t\tObject.defineProperty(this, \"muted\", {\n\t\t\tget: this._getMuted,\n\t\t\tset: this._setMuted\n\t\t});\n\n\t\t/**\n\t\t * Pauses or resumes the current audio instance.\n\t\t *\n\t\t * @property paused\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis._paused = false;\n\t\tObject.defineProperty(this, \"paused\", {\n\t\t\tget: this._getPaused,\n\t\t\tset: this._setPaused\n\t\t});\n\n\n\t// Events\n\t\t/**\n\t\t * The event that is fired when playback has started successfully.\n\t\t * @event succeeded\n\t\t * @param {Object} target The object that dispatched the event.\n\t\t * @param {String} type The event type.\n\t\t * @since 0.4.0\n\t\t */\n\n\t\t/**\n\t\t * The event that is fired when playback is interrupted. This happens when another sound with the same\n\t\t * src property is played using an interrupt value that causes this instance to stop playing.\n\t\t * @event interrupted\n\t\t * @param {Object} target The object that dispatched the event.\n\t\t * @param {String} type The event type.\n\t\t * @since 0.4.0\n\t\t */\n\n\t\t/**\n\t\t * The event that is fired when playback has failed. This happens when there are too many channels with the same\n\t\t * src property already playing (and the interrupt value doesn't cause an interrupt of another instance), or\n\t\t * the sound could not be played, perhaps due to a 404 error.\n\t\t * @event failed\n\t\t * @param {Object} target The object that dispatched the event.\n\t\t * @param {String} type The event type.\n\t\t * @since 0.4.0\n\t\t */\n\n\t\t/**\n\t\t * The event that is fired when a sound has completed playing but has loops remaining.\n\t\t * @event loop\n\t\t * @param {Object} target The object that dispatched the event.\n\t\t * @param {String} type The event type.\n\t\t * @since 0.4.0\n\t\t */\n\n\t\t/**\n\t\t * The event that is fired when playback completes. This means that the sound has finished playing in its\n\t\t * entirety, including its loop iterations.\n\t\t * @event complete\n\t\t * @param {Object} target The object that dispatched the event.\n\t\t * @param {String} type The event type.\n\t\t * @since 0.4.0\n\t\t */\n\t};\n\n\tvar p = createjs.extend(AbstractSoundInstance, createjs.EventDispatcher);\n\n// Public Methods:\n\t/**\n\t * Play an instance. This method is intended to be called on SoundInstances that already exist (created\n\t * with the Sound API {{#crossLink \"Sound/createInstance\"}}{{/crossLink}} or {{#crossLink \"Sound/play\"}}{{/crossLink}}).\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      var myInstance = createjs.Sound.createInstance(mySrc);\n\t *      myInstance.play({interrupt:createjs.Sound.INTERRUPT_ANY, loop:2, pan:0.5});\n\t *\n\t * Note that if this sound is already playing, this call will still set the passed in parameters.\n\n\t * <b>Parameters Deprecated</b><br />\n\t * The parameters for this method are deprecated in favor of a single parameter that is an Object or {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}}.\n\t *\n\t * @method play\n\t * @param {Object | PlayPropsConfig} props A PlayPropsConfig instance, or an object that contains the parameters to\n\t * play a sound. See the {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for more info.\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t */\n\tp.play = function (props) {\n\t\tvar playProps = createjs.PlayPropsConfig.create(props);\n\t\tif (this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis.applyPlayProps(playProps);\n\t\t\tif (this._paused) {\tthis._setPaused(false); }\n\t\t\treturn;\n\t\t}\n\t\tthis._cleanUp();\n\t\tcreatejs.Sound._playInstance(this, playProps);\t// make this an event dispatch??\n\t\treturn this;\n\t};\n\n\t/**\n\t * Stop playback of the instance. Stopped sounds will reset their position to 0, and calls to {{#crossLink \"AbstractSoundInstance/resume\"}}{{/crossLink}}\n\t * will fail. To start playback again, call {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}}.\n     *\n     * If you don't want to lose your position use yourSoundInstance.paused = true instead. {{#crossLink \"AbstractSoundInstance/paused\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     myInstance.stop();\n\t *\n\t * @method stop\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t */\n\tp.stop = function () {\n\t\tthis._position = 0;\n\t\tthis._paused = false;\n\t\tthis._handleStop();\n\t\tthis._cleanUp();\n\t\tthis.playState = createjs.Sound.PLAY_FINISHED;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Remove all external references and resources from AbstractSoundInstance.  Note this is irreversible and AbstractSoundInstance will no longer work\n\t * @method destroy\n\t * @since 0.6.0\n\t */\n\tp.destroy = function() {\n\t\tthis._cleanUp();\n\t\tthis.src = null;\n\t\tthis.playbackResource = null;\n\n\t\tthis.removeAllEventListeners();\n\t};\n\n\t/**\n\t * Takes an PlayPropsConfig or Object with the same properties and sets them on this instance.\n\t * @method applyPlayProps\n\t * @param {PlayPropsConfig | Object} playProps A PlayPropsConfig or object containing the same properties.\n\t * @since 0.6.1\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t */\n\tp.applyPlayProps = function(playProps) {\n\t\tif (playProps.offset != null) { this._setPosition(playProps.offset) }\n\t\tif (playProps.loop != null) { this._setLoop(playProps.loop); }\n\t\tif (playProps.volume != null) { this._setVolume(playProps.volume); }\n\t\tif (playProps.pan != null) { this._setPan(playProps.pan); }\n\t\tif (playProps.startTime != null) {\n\t\t\tthis._setStartTime(playProps.startTime);\n\t\t\tthis._setDuration(playProps.duration);\n\t\t}\n\t\treturn this;\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[AbstractSoundInstance]\";\n\t};\n\n// get/set methods that allow support for IE8\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/paused:property\"}}{{/crossLink}} directly as a property.\n\t * @method _getPaused\n\t * @protected\n\t * @return {boolean} If the instance is currently paused\n\t * @since 0.6.0\n\t */\n\tp._getPaused = function() {\n\t\treturn this._paused;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/paused:property\"}}{{/crossLink}} directly as a property\n\t * @method _setPaused\n\t * @protected\n\t * @param {boolean} value\n\t * @since 0.6.0\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t */\n\tp._setPaused = function (value) {\n\t\tif ((value !== true && value !== false) || this._paused == value) {return;}\n\t\tif (value == true && this.playState != createjs.Sound.PLAY_SUCCEEDED) {return;}\n\t\tthis._paused = value;\n\t\tif(value) {\n\t\t\tthis._pause();\n\t\t} else {\n\t\t\tthis._resume();\n\t\t}\n\t\tclearTimeout(this.delayTimeoutId);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}} directly as a property\n\t * @method _setVolume\n\t * @protected\n\t * @param {Number} value The volume to set, between 0 and 1.\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t */\n\tp._setVolume = function (value) {\n\t\tif (value == this._volume) { return this; }\n\t\tthis._volume = Math.max(0, Math.min(1, value));\n\t\tif (!this._muted) {\n\t\t\tthis._updateVolume();\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}} directly as a property\n\t * @method _getVolume\n\t * @protected\n\t * @return {Number} The current volume of the sound instance.\n\t */\n\tp._getVolume = function () {\n\t\treturn this._volume;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} directly as a property\n\t * @method _setMuted\n\t * @protected\n\t * @param {Boolean} value If the sound should be muted.\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\n\t * @since 0.6.0\n\t */\n\tp._setMuted = function (value) {\n\t\tif (value !== true && value !== false) {return;}\n\t\tthis._muted = value;\n\t\tthis._updateVolume();\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} directly as a property\n\t * @method _getMuted\n\t * @protected\n\t * @return {Boolean} If the sound is muted.\n\t * @since 0.6.0\n\t */\n\tp._getMuted = function () {\n\t\treturn this._muted;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/pan:property\"}}{{/crossLink}} directly as a property\n\t * @method _setPan\n\t * @protected\n\t * @param {Number} value The pan value, between -1 (left) and 1 (right).\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\n\t */\n\tp._setPan = function (value) {\n\t\tif(value == this._pan) { return this; }\n\t\tthis._pan = Math.max(-1, Math.min(1, value));\n\t\tthis._updatePan();\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/pan:property\"}}{{/crossLink}} directly as a property\n\t * @method _getPan\n\t * @protected\n\t * @return {Number} The value of the pan, between -1 (left) and 1 (right).\n\t */\n\tp._getPan = function () {\n\t\treturn this._pan;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/position:property\"}}{{/crossLink}} directly as a property\n\t * @method _getPosition\n\t * @protected\n\t * @return {Number} The position of the playhead in the sound, in milliseconds.\n\t */\n\tp._getPosition = function () {\n\t\tif (!this._paused && this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis._position = this._calculateCurrentPosition();\n\t\t}\n\t\treturn this._position;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/position:property\"}}{{/crossLink}} directly as a property\n\t * @method _setPosition\n\t * @protected\n\t * @param {Number} value The position to place the playhead, in milliseconds.\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\n\t */\n\tp._setPosition = function (value) {\n\t\tthis._position = Math.max(0, value);\n\t\tif (this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis._updatePosition();\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/startTime:property\"}}{{/crossLink}} directly as a property\n\t * @method _getStartTime\n\t * @protected\n\t * @return {Number} The startTime of the sound instance in milliseconds.\n\t */\n\tp._getStartTime = function () {\n\t\treturn this._startTime;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/startTime:property\"}}{{/crossLink}} directly as a property\n\t * @method _setStartTime\n\t * @protected\n\t * @param {number} value The new startTime time in milli seconds.\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\n\t */\n\tp._setStartTime = function (value) {\n\t\tif (value == this._startTime) { return this; }\n\t\tthis._startTime = Math.max(0, value || 0);\n\t\tthis._updateStartTime();\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/duration:property\"}}{{/crossLink}} directly as a property\n\t * @method _getDuration\n\t * @protected\n\t * @return {Number} The duration of the sound instance in milliseconds.\n\t */\n\tp._getDuration = function () {\n\t\treturn this._duration;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/duration:property\"}}{{/crossLink}} directly as a property\n\t * @method _setDuration\n\t * @protected\n\t * @param {number} value The new duration time in milli seconds.\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\n\t * @since 0.6.0\n\t */\n\tp._setDuration = function (value) {\n\t\tif (value == this._duration) { return this; }\n\t\tthis._duration = Math.max(0, value || 0);\n\t\tthis._updateDuration();\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/playbackResource:property\"}}{{/crossLink}} directly as a property\n\t * @method _setPlaybackResource\n\t * @protected\n\t * @param {Object} value The new playback resource.\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\n\t * @since 0.6.0\n\t **/\n\tp._setPlaybackResource = function (value) {\n\t\tthis._playbackResource = value;\n\t\tif (this._duration == 0 && this._playbackResource) { this._setDurationFromSource(); }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/playbackResource:property\"}}{{/crossLink}} directly as a property\n\t * @method _getPlaybackResource\n\t * @protected\n\t * @param {Object} value The new playback resource.\n\t * @return {Object} playback resource used for playing audio\n\t * @since 0.6.0\n\t **/\n\tp._getPlaybackResource = function () {\n\t\treturn this._playbackResource;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/loop:property\"}}{{/crossLink}} directly as a property\n\t * @method _getLoop\n\t * @protected\n\t * @return {number}\n\t * @since 0.6.0\n\t **/\n\tp._getLoop = function () {\n\t\treturn this._loop;\n\t};\n\n\t/**\n\t * Please use {{#crossLink \"AbstractSoundInstance/loop:property\"}}{{/crossLink}} directly as a property\n\t * @method _setLoop\n\t * @protected\n\t * @param {number} value The number of times to loop after play.\n\t * @since 0.6.0\n\t */\n\tp._setLoop = function (value) {\n\t\tif(this._playbackResource != null) {\n\t\t\t// remove looping\n\t\t\tif (this._loop != 0 && value == 0) {\n\t\t\t\tthis._removeLooping(value);\n\t\t\t}\n\t\t\t// add looping\n\t\t\telse if (this._loop == 0 && value != 0) {\n\t\t\t\tthis._addLooping(value);\n\t\t\t}\n\t\t}\n\t\tthis._loop = value;\n\t};\n\n\n// Private Methods:\n\t/**\n\t * A helper method that dispatches all events for AbstractSoundInstance.\n\t * @method _sendEvent\n\t * @param {String} type The event type\n\t * @protected\n\t */\n\tp._sendEvent = function (type) {\n\t\tvar event = new createjs.Event(type);\n\t\tthis.dispatchEvent(event);\n\t};\n\n\t/**\n\t * Clean up the instance. Remove references and clean up any additional properties such as timers.\n\t * @method _cleanUp\n\t * @protected\n\t */\n\tp._cleanUp = function () {\n\t\tclearTimeout(this.delayTimeoutId); // clear timeout that plays delayed sound\n\t\tthis._handleCleanUp();\n\t\tthis._paused = false;\n\n\t\tcreatejs.Sound._playFinished(this);\t// TODO change to an event\n\t};\n\n\t/**\n\t * The sound has been interrupted.\n\t * @method _interrupt\n\t * @protected\n\t */\n\tp._interrupt = function () {\n\t\tthis._cleanUp();\n\t\tthis.playState = createjs.Sound.PLAY_INTERRUPTED;\n\t\tthis._sendEvent(\"interrupted\");\n\t};\n\n\t/**\n\t * Called by the Sound class when the audio is ready to play (delay has completed). Starts sound playing if the\n\t * src is loaded, otherwise playback will fail.\n\t * @method _beginPlaying\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\n\t * @return {Boolean} If playback succeeded.\n\t * @protected\n\t */\n\t// OJR FlashAudioSoundInstance overwrites\n\tp._beginPlaying = function (playProps) {\n\t\tthis._setPosition(playProps.offset);\n\t\tthis._setLoop(playProps.loop);\n\t\tthis._setVolume(playProps.volume);\n\t\tthis._setPan(playProps.pan);\n\t\tif (playProps.startTime != null) {\n\t\t\tthis._setStartTime(playProps.startTime);\n\t\t\tthis._setDuration(playProps.duration);\n\t\t}\n\n\t\tif (this._playbackResource != null && this._position < this._duration) {\n\t\t\tthis._paused = false;\n\t\t\tthis._handleSoundReady();\n\t\t\tthis.playState = createjs.Sound.PLAY_SUCCEEDED;\n\t\t\tthis._sendEvent(\"succeeded\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._playFailed();\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * Play has failed, which can happen for a variety of reasons.\n\t * Cleans up instance and dispatches failed event\n\t * @method _playFailed\n\t * @private\n\t */\n\tp._playFailed = function () {\n\t\tthis._cleanUp();\n\t\tthis.playState = createjs.Sound.PLAY_FAILED;\n\t\tthis._sendEvent(\"failed\");\n\t};\n\n\t/**\n\t * Audio has finished playing. Manually loop it if required.\n\t * @method _handleSoundComplete\n\t * @param event\n\t * @protected\n\t */\n\tp._handleSoundComplete = function (event) {\n\t\tthis._position = 0;  // have to set this as it can be set by pause during playback\n\n\t\tif (this._loop != 0) {\n\t\t\tthis._loop--;  // NOTE this introduces a theoretical limit on loops = float max size x 2 - 1\n\t\t\tthis._handleLoop();\n\t\t\tthis._sendEvent(\"loop\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanUp();\n\t\tthis.playState = createjs.Sound.PLAY_FINISHED;\n\t\tthis._sendEvent(\"complete\");\n\t};\n\n// Plugin specific code\n\t/**\n\t * Handles starting playback when the sound is ready for playing.\n\t * @method _handleSoundReady\n\t * @protected\n \t */\n\tp._handleSoundReady = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function used to update the volume based on the instance volume, master volume, instance mute value,\n\t * and master mute value.\n\t * @method _updateVolume\n\t * @protected\n\t */\n\tp._updateVolume = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function used to update the pan\n\t * @method _updatePan\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._updatePan = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function used to update the startTime of the audio.\n\t * @method _updateStartTime\n\t * @protected\n\t * @since 0.6.1\n\t */\n\tp._updateStartTime = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function used to update the duration of the audio.\n\t * @method _updateDuration\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._updateDuration = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function used to get the duration of the audio from the source we'll be playing.\n\t * @method _updateDuration\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._setDurationFromSource = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function that calculates the current position of the playhead and sets this._position to that value\n\t * @method _calculateCurrentPosition\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._calculateCurrentPosition = function () {\n\t\t// plugin specific code that sets this.position\n\t};\n\n\t/**\n\t * Internal function used to update the position of the playhead.\n\t * @method _updatePosition\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._updatePosition = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when looping is removed during playback.\n\t * @method _removeLooping\n\t * @param {number} value The number of times to loop after play.\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._removeLooping = function (value) {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when looping is added during playback.\n\t * @method _addLooping\n\t * @param {number} value The number of times to loop after play.\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._addLooping = function (value) {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when pausing playback\n\t * @method _pause\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._pause = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when resuming playback\n\t * @method _resume\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._resume = function () {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when stopping playback\n\t * @method _handleStop\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._handleStop = function() {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when AbstractSoundInstance is being cleaned up\n\t * @method _handleCleanUp\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._handleCleanUp = function() {\n\t\t// plugin specific code\n\t};\n\n\t/**\n\t * Internal function called when AbstractSoundInstance has played to end and is looping\n\t * @method _handleLoop\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._handleLoop = function () {\n\t\t// plugin specific code\n\t};\n\n\tcreatejs.AbstractSoundInstance = createjs.promote(AbstractSoundInstance, \"EventDispatcher\");\n\tcreatejs.DefaultSoundInstance = createjs.AbstractSoundInstance;\t// used when no plugin is supported\n}());\n\n//##############################################################################\n// AbstractPlugin.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\n// constructor:\n \t/**\n\t * A default plugin class used as a base for all other plugins.\n\t * @class AbstractPlugin\n\t * @constructor\n\t * @since 0.6.0\n\t */\n\n\tvar AbstractPlugin = function () {\n\t// private properties:\n\t\t/**\n\t\t * The capabilities of the plugin.\n\t\t * method and is used internally.\n\t\t * @property _capabilities\n\t\t * @type {Object}\n\t\t * @default null\n\t\t * @protected\n\t\t * @static\n\t\t */\n\t\tthis._capabilities = null;\n\n\t\t/**\n\t\t * Object hash indexed by the source URI of all created loaders, used to properly destroy them if sources are removed.\n\t\t * @type {Object}\n\t\t * @protected\n\t\t */\n\t\tthis._loaders = {};\n\n\t\t/**\n\t\t * Object hash indexed by the source URI of each file to indicate if an audio source has begun loading,\n\t\t * is currently loading, or has completed loading.  Can be used to store non boolean data after loading\n\t\t * is complete (for example arrayBuffers for web audio).\n\t\t * @property _audioSources\n\t\t * @type {Object}\n\t\t * @protected\n\t\t */\n\t\tthis._audioSources = {};\n\n\t\t/**\n\t\t * Object hash indexed by the source URI of all created SoundInstances, updates the playbackResource if it loads after they are created,\n\t\t * and properly destroy them if sources are removed\n\t\t * @type {Object}\n\t\t * @protected\n\t\t */\n\t\tthis._soundInstances = {};\n\n\t\t/**\n\t\t * The internal master volume value of the plugin.\n\t\t * @property _volume\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t * @protected\n\t\t */\n\t\tthis._volume = 1;\n\n\t\t/**\n\t\t * A reference to a loader class used by a plugin that must be set.\n\t\t * @type {Object}\n\t\t * @protected\n\t\t */\n\t\tthis._loaderClass;\n\n\t\t/**\n\t\t * A reference to an AbstractSoundInstance class used by a plugin that must be set.\n\t\t * @type {Object}\n\t\t * @protected;\n\t\t */\n\t\tthis._soundInstanceClass;\n\t};\n\tvar p = AbstractPlugin.prototype;\n\n// Static Properties:\n// NOTE THESE PROPERTIES NEED TO BE ADDED TO EACH PLUGIN\n\t/**\n\t * The capabilities of the plugin. This is generated via the _generateCapabilities method and is used internally.\n\t * @property _capabilities\n\t * @type {Object}\n\t * @default null\n\t * @private\n\t * @static\n\t */\n\tAbstractPlugin._capabilities = null;\n\n\t/**\n\t * Determine if the plugin can be used in the current browser/OS.\n\t * @method isSupported\n\t * @return {Boolean} If the plugin can be initialized.\n\t * @static\n\t */\n\tAbstractPlugin.isSupported = function () {\n\t\treturn true;\n\t};\n\n\n// public methods:\n\t/**\n\t * Pre-register a sound for preloading and setup. This is called by {{#crossLink \"Sound\"}}{{/crossLink}}.\n\t * Note all plugins provide a <code>Loader</code> instance, which <a href=\"http://preloadjs.com\" target=\"_blank\">PreloadJS</a>\n\t * can use to assist with preloading.\n\t * @method register\n\t * @param {String} loadItem An Object containing the source of the audio\n\t * Note that not every plugin will manage this value.\n\t * @return {Object} A result object, containing a \"tag\" for preloading purposes.\n\t */\n\tp.register = function (loadItem) {\n\t\tvar loader = this._loaders[loadItem.src];\n\t\tif(loader && !loader.canceled) {return this._loaders[loadItem.src];}\t// already loading/loaded this, so don't load twice\n\t\t// OJR potential issue that we won't be firing loaded event, might need to trigger if this is already loaded?\n\t\tthis._audioSources[loadItem.src] = true;\n\t\tthis._soundInstances[loadItem.src] = [];\n\t\tloader = new this._loaderClass(loadItem);\n\t\tloader.on(\"complete\", this._handlePreloadComplete, this);\n\t\tthis._loaders[loadItem.src] = loader;\n\t\treturn loader;\n\t};\n\n\t// note sound calls register before calling preload\n\t/**\n\t * Internally preload a sound.\n\t * @method preload\n\t * @param {Loader} loader The sound URI to load.\n\t */\n\tp.preload = function (loader) {\n\t\tloader.on(\"error\", this._handlePreloadError, this);\n\t\tloader.load();\n\t};\n\n\t/**\n\t * Checks if preloading has started for a specific source. If the source is found, we can assume it is loading,\n\t * or has already finished loading.\n\t * @method isPreloadStarted\n\t * @param {String} src The sound URI to check.\n\t * @return {Boolean}\n\t */\n\tp.isPreloadStarted = function (src) {\n\t\treturn (this._audioSources[src] != null);\n\t};\n\n\t/**\n\t * Checks if preloading has finished for a specific source.\n\t * @method isPreloadComplete\n\t * @param {String} src The sound URI to load.\n\t * @return {Boolean}\n\t */\n\tp.isPreloadComplete = function (src) {\n\t\treturn (!(this._audioSources[src] == null || this._audioSources[src] == true));\n\t};\n\n\t/**\n\t * Remove a sound added using {{#crossLink \"WebAudioPlugin/register\"}}{{/crossLink}}. Note this does not cancel a preload.\n\t * @method removeSound\n\t * @param {String} src The sound URI to unload.\n\t */\n\tp.removeSound = function (src) {\n\t\tif (!this._soundInstances[src]) { return; }\n\t\tfor (var i = this._soundInstances[src].length; i--; ) {\n\t\t\tvar item = this._soundInstances[src][i];\n\t\t\titem.destroy();\n\t\t}\n\t\tdelete(this._soundInstances[src]);\n\t\tdelete(this._audioSources[src]);\n\t\tif(this._loaders[src]) { this._loaders[src].destroy(); }\n\t\tdelete(this._loaders[src]);\n\t};\n\n\t/**\n\t * Remove all sounds added using {{#crossLink \"WebAudioPlugin/register\"}}{{/crossLink}}. Note this does not cancel a preload.\n\t * @method removeAllSounds\n\t * @param {String} src The sound URI to unload.\n\t */\n\tp.removeAllSounds = function () {\n\t\tfor(var key in this._audioSources) {\n\t\t\tthis.removeSound(key);\n\t\t}\n\t};\n\n\t/**\n\t * Create a sound instance. If the sound has not been preloaded, it is internally preloaded here.\n\t * @method create\n\t * @param {String} src The sound source to use.\n\t * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\n\t * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\n\t * @return {AbstractSoundInstance} A sound instance for playback and control.\n\t */\n\tp.create = function (src, startTime, duration) {\n\t\tif (!this.isPreloadStarted(src)) {\n\t\t\tthis.preload(this.register(src));\n\t\t}\n\t\tvar si = new this._soundInstanceClass(src, startTime, duration, this._audioSources[src]);\n\t\tif(this._soundInstances[src]){\n\t\t\tthis._soundInstances[src].push(si);\n\t\t}\n\n\t\t// Plugins that don't have a setVolume should implement a setMasterVolune/setMasterMute\n\t\t// So we have to check that here.\n\t\tsi.setMasterVolume && si.setMasterVolume(createjs.Sound.volume);\n\t\tsi.setMasterMute && si.setMasterMute(createjs.Sound.muted);\n\n\t\treturn si;\n\t};\n\n\t// if a plugin does not support volume and mute, it should set these to null\n\t/**\n\t * Set the master volume of the plugin, which affects all SoundInstances.\n\t * @method setVolume\n\t * @param {Number} value The volume to set, between 0 and 1.\n\t * @return {Boolean} If the plugin processes the setVolume call (true). The Sound class will affect all the\n\t * instances manually otherwise.\n\t */\n\tp.setVolume = function (value) {\n\t\tthis._volume = value;\n\t\tthis._updateVolume();\n\t\treturn true;\n\t};\n\n\t/**\n\t * Get the master volume of the plugin, which affects all SoundInstances.\n\t * @method getVolume\n\t * @return {Number} The volume level, between 0 and 1.\n\t */\n\tp.getVolume = function () {\n\t\treturn this._volume;\n\t};\n\n\t/**\n\t * Mute all sounds via the plugin.\n\t * @method setMute\n\t * @param {Boolean} value If all sound should be muted or not. Note that plugin-level muting just looks up\n\t * the mute value of Sound {{#crossLink \"Sound/muted:property\"}}{{/crossLink}}, so this property is not used here.\n\t * @return {Boolean} If the mute call succeeds.\n\t */\n\tp.setMute = function (value) {\n\t\tthis._updateVolume();\n\t\treturn true;\n\t};\n\n\t// plugins should overwrite this method\n\tp.toString = function () {\n\t\treturn \"[AbstractPlugin]\";\n\t};\n\n\n// private methods:\n\t/**\n\t * Handles internal preload completion.\n\t * @method _handlePreloadComplete\n\t * @param event\n\t * @protected\n\t */\n\tp._handlePreloadComplete = function (event) {\n\t\tvar src = event.target.getItem().src;\n\t\tthis._audioSources[src] = event.result;\n\t\tif (!this._soundInstances[src]) { return; }\n\t\tfor (var i = 0, l = this._soundInstances[src].length; i < l; i++) {\n\t\t\tvar item = this._soundInstances[src][i];\n\t\t\titem.playbackResource = this._audioSources[src];\n\t\t\t// ToDo consider adding play call here if playstate == playfailed\n\t\t\tthis._soundInstances[src] = null;\n\t\t}\n\t};\n\n\t/**\n\t * Handles internal preload errors\n\t * @method _handlePreloadError\n\t * @param event\n\t * @protected\n\t */\n\tp._handlePreloadError = function(event) {\n\t\t//delete(this._audioSources[src]);\n\t};\n\n\t/**\n\t * Set the gain value for master audio. Should not be called externally.\n\t * @method _updateVolume\n\t * @protected\n\t */\n\tp._updateVolume = function () {\n\t\t// Plugin Specific code\n\t};\n\n\tcreatejs.AbstractPlugin = AbstractPlugin;\n}());\n\n//##############################################################################\n// WebAudioLoader.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * Loader provides a mechanism to preload Web Audio content via PreloadJS or internally. Instances are returned to\n\t * the preloader, and the load method is called when the asset needs to be requested.\n\t *\n\t * @class WebAudioLoader\n\t * @param {String} loadItem The item to be loaded\n\t * @extends XHRRequest\n\t * @protected\n\t */\n\tfunction Loader(loadItem) {\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.SOUND);\n\n\t};\n\tvar p = createjs.extend(Loader, createjs.AbstractLoader);\n\n\t/**\n\t * web audio context required for decoding audio\n\t * @property context\n\t * @type {AudioContext}\n\t * @static\n\t */\n\tLoader.context = null;\n\n\n// public methods\n\tp.toString = function () {\n\t\treturn \"[WebAudioLoader]\";\n\t};\n\n\n// private methods\n\tp._createRequest = function() {\n\t\tthis._request = new createjs.XHRRequest(this._item, false);\n\t\tthis._request.setResponseType(\"arraybuffer\");\n\t};\n\n\tp._sendComplete = function (event) {\n\t\t// OJR we leave this wrapped in Loader because we need to reference src and the handler only receives a single argument, the decodedAudio\n\t\tLoader.context.decodeAudioData(this._rawResult,\n\t         createjs.proxy(this._handleAudioDecoded, this),\n\t         createjs.proxy(this._sendError, this));\n\t};\n\n\n\t/**\n\t* The audio has been decoded.\n\t* @method handleAudioDecoded\n\t* @param decoded\n\t* @protected\n\t*/\n\tp._handleAudioDecoded = function (decodedAudio) {\n\t\tthis._result = decodedAudio;\n\t\tthis.AbstractLoader__sendComplete();\n\t};\n\n\tcreatejs.WebAudioLoader = createjs.promote(Loader, \"AbstractLoader\");\n}());\n\n//##############################################################################\n// WebAudioSoundInstance.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n/**\n * WebAudioSoundInstance extends the base api of {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} and is used by\n * {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\n *\n * WebAudioSoundInstance exposes audioNodes for advanced users.\n *\n * @param {String} src The path to and file name of the sound.\n * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\n * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\n * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\n * @class WebAudioSoundInstance\n * @extends AbstractSoundInstance\n * @constructor\n */\n(function () {\n\t\"use strict\";\n\n\tfunction WebAudioSoundInstance(src, startTime, duration, playbackResource) {\n\t\tthis.AbstractSoundInstance_constructor(src, startTime, duration, playbackResource);\n\n\n// public properties\n\t\t/**\n\t\t * NOTE this is only intended for use by advanced users.\n\t\t * <br />GainNode for controlling <code>WebAudioSoundInstance</code> volume. Connected to the {{#crossLink \"WebAudioSoundInstance/destinationNode:property\"}}{{/crossLink}}.\n\t\t * @property gainNode\n\t\t * @type {AudioGainNode}\n\t\t * @since 0.4.0\n\t\t *\n\t\t */\n\t\tthis.gainNode = s.context.createGain();\n\n\t\t/**\n\t\t * NOTE this is only intended for use by advanced users.\n\t\t * <br />A panNode allowing left and right audio channel panning only. Connected to WebAudioSoundInstance {{#crossLink \"WebAudioSoundInstance/gainNode:property\"}}{{/crossLink}}.\n\t\t * @property panNode\n\t\t * @type {AudioPannerNode}\n\t\t * @since 0.4.0\n\t\t */\n\t\tthis.panNode = s.context.createPanner();\n\t\tthis.panNode.panningModel = s._panningModel;\n\t\tthis.panNode.connect(this.gainNode);\n\t\tthis._updatePan();\n\n\t\t/**\n\t\t * NOTE this is only intended for use by advanced users.\n\t\t * <br />sourceNode is the audio source. Connected to WebAudioSoundInstance {{#crossLink \"WebAudioSoundInstance/panNode:property\"}}{{/crossLink}}.\n\t\t * @property sourceNode\n\t\t * @type {AudioNode}\n\t\t * @since 0.4.0\n\t\t *\n\t\t */\n\t\tthis.sourceNode = null;\n\n\n// private properties\n\t\t/**\n\t\t * Timeout that is created internally to handle sound playing to completion.\n\t\t * Stored so we can remove it when stop, pause, or cleanup are called\n\t\t * @property _soundCompleteTimeout\n\t\t * @type {timeoutVariable}\n\t\t * @default null\n\t\t * @protected\n\t\t * @since 0.4.0\n\t\t */\n\t\tthis._soundCompleteTimeout = null;\n\n\t\t/**\n\t\t * NOTE this is only intended for use by very advanced users.\n\t\t * _sourceNodeNext is the audio source for the next loop, inserted in a look ahead approach to allow for smooth\n\t\t * looping. Connected to {{#crossLink \"WebAudioSoundInstance/gainNode:property\"}}{{/crossLink}}.\n\t\t * @property _sourceNodeNext\n\t\t * @type {AudioNode}\n\t\t * @default null\n\t\t * @protected\n\t\t * @since 0.4.1\n\t\t *\n\t\t */\n\t\tthis._sourceNodeNext = null;\n\n\t\t/**\n\t\t * Time audio started playback, in seconds. Used to handle set position, get position, and resuming from paused.\n\t\t * @property _playbackStartTime\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @protected\n\t\t * @since 0.4.0\n\t\t */\n\t\tthis._playbackStartTime = 0;\n\n\t\t// Proxies, make removing listeners easier.\n\t\tthis._endedHandler = createjs.proxy(this._handleSoundComplete, this);\n\t};\n\tvar p = createjs.extend(WebAudioSoundInstance, createjs.AbstractSoundInstance);\n\tvar s = WebAudioSoundInstance;\n\n\t/**\n\t * Note this is only intended for use by advanced users.\n\t * <br />Audio context used to create nodes.  This is and needs to be the same context used by {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\n  \t * @property context\n\t * @type {AudioContext}\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.context = null;\n\n\t/**\n\t * Note this is only intended for use by advanced users.\n\t * <br />The scratch buffer that will be assigned to the buffer property of a source node on close.  \n\t * This is and should be the same scratch buffer referenced by {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\n  \t * @property _scratchBuffer\n\t * @type {AudioBufferSourceNode}\n\t * @static\n\t */\n\ts._scratchBuffer = null;\n\n\t/**\n\t * Note this is only intended for use by advanced users.\n\t * <br /> Audio node from WebAudioPlugin that sequences to <code>context.destination</code>\n\t * @property destinationNode\n\t * @type {AudioNode}\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts.destinationNode = null;\n\n\t/**\n\t * Value to set panning model to equal power for WebAudioSoundInstance.  Can be \"equalpower\" or 0 depending on browser implementation.\n\t * @property _panningModel\n\t * @type {Number / String}\n\t * @protected\n\t * @static\n\t * @since 0.6.0\n\t */\n\ts._panningModel = \"equalpower\";\n\n\n// Public methods\n\tp.destroy = function() {\n\t\tthis.AbstractSoundInstance_destroy();\n\n\t\tthis.panNode.disconnect(0);\n\t\tthis.panNode = null;\n\t\tthis.gainNode.disconnect(0);\n\t\tthis.gainNode = null;\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[WebAudioSoundInstance]\";\n\t};\n\n\n// Private Methods\n\tp._updatePan = function() {\n\t\tthis.panNode.setPosition(this._pan, 0, -0.5);\n\t\t// z need to be -0.5 otherwise the sound only plays in left, right, or center\n\t};\n\n\tp._removeLooping = function(value) {\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\n\t};\n\n\tp._addLooping = function(value) {\n\t\tif (this.playState != createjs.Sound.PLAY_SUCCEEDED) { return; }\n\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\n\t};\n\n\tp._setDurationFromSource = function () {\n\t\tthis._duration = this.playbackResource.duration * 1000;\n\t};\n\n\tp._handleCleanUp = function () {\n\t\tif (this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\n\t\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\n\t\t}\n\n\t\tif (this.gainNode.numberOfOutputs != 0) {this.gainNode.disconnect(0);}\n\t\t// OJR there appears to be a bug that this doesn't always work in webkit (Chrome and Safari). According to the documentation, this should work.\n\n\t\tclearTimeout(this._soundCompleteTimeout);\n\n\t\tthis._playbackStartTime = 0;\t// This is used by _getPosition\n\t};\n\n\t/**\n\t * Turn off and disconnect an audioNode, then set reference to null to release it for garbage collection\n\t * @method _cleanUpAudioNode\n\t * @param audioNode\n\t * @return {audioNode}\n\t * @protected\n\t * @since 0.4.1\n\t */\n\tp._cleanUpAudioNode = function(audioNode) {\n\t\tif(audioNode) {\n\t\t\taudioNode.stop(0);\n\t\t\taudioNode.disconnect(0);\n\t\t\t// necessary to prevent leak on iOS Safari 7-9. will throw in almost all other\n\t\t\t// browser implementations.\n\t\t\tif ( createjs.BrowserDetect.isIOS ) {\n\t\t\t\ttry { audioNode.buffer = s._scratchBuffer; } catch(e) {}\n\t\t\t}\n\t\t\taudioNode = null;\n\t\t}\n\t\treturn audioNode;\n\t};\n\n\tp._handleSoundReady = function (event) {\n\t\tthis.gainNode.connect(s.destinationNode);  // this line can cause a memory leak.  Nodes need to be disconnected from the audioDestination or any sequence that leads to it.\n\n\t\tvar dur = this._duration * 0.001,\n\t\t\tpos = Math.min(Math.max(0, this._position) * 0.001, dur);\n\t\tthis.sourceNode = this._createAndPlayAudioNode((s.context.currentTime - dur), pos);\n\t\tthis._playbackStartTime = this.sourceNode.startTime - pos;\n\n\t\tthis._soundCompleteTimeout = setTimeout(this._endedHandler, (dur - pos) * 1000);\n\n\t\tif(this._loop != 0) {\n\t\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\n\t\t}\n\t};\n\n\t/**\n\t * Creates an audio node using the current src and context, connects it to the gain node, and starts playback.\n\t * @method _createAndPlayAudioNode\n\t * @param {Number} startTime The time to add this to the web audio context, in seconds.\n\t * @param {Number} offset The amount of time into the src audio to start playback, in seconds.\n\t * @return {audioNode}\n\t * @protected\n\t * @since 0.4.1\n\t */\n\tp._createAndPlayAudioNode = function(startTime, offset) {\n\t\tvar audioNode = s.context.createBufferSource();\n\t\taudioNode.buffer = this.playbackResource;\n\t\taudioNode.connect(this.panNode);\n\t\tvar dur = this._duration * 0.001;\n\t\taudioNode.startTime = startTime + dur;\n\t\taudioNode.start(audioNode.startTime, offset+(this._startTime*0.001), dur - offset);\n\t\treturn audioNode;\n\t};\n\n\tp._pause = function () {\n\t\tthis._position = (s.context.currentTime - this._playbackStartTime) * 1000;  // * 1000 to give milliseconds, lets us restart at same point\n\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\n\n\t\tif (this.gainNode.numberOfOutputs != 0) {this.gainNode.disconnect(0);}\n\n\t\tclearTimeout(this._soundCompleteTimeout);\n\t};\n\n\tp._resume = function () {\n\t\tthis._handleSoundReady();\n\t};\n\n\t/*\n\tp._handleStop = function () {\n\t\t// web audio does not need to do anything extra\n\t};\n\t*/\n\n\tp._updateVolume = function () {\n\t\tvar newVolume = this._muted ? 0 : this._volume;\n\t  \tif (newVolume != this.gainNode.gain.value) {\n\t\t  this.gainNode.gain.value = newVolume;\n  \t\t}\n\t};\n\n\tp._calculateCurrentPosition = function () {\n\t\treturn ((s.context.currentTime - this._playbackStartTime) * 1000); // pos in seconds * 1000 to give milliseconds\n\t};\n\n\tp._updatePosition = function () {\n\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\n\t\tclearTimeout(this._soundCompleteTimeout);\n\n\t\tif (!this._paused) {this._handleSoundReady();}\n\t};\n\n\t// OJR we are using a look ahead approach to ensure smooth looping.\n\t// We add _sourceNodeNext to the audio context so that it starts playing even if this callback is delayed.\n\t// This technique is described here:  http://www.html5rocks.com/en/tutorials/audio/scheduling/\n\t// NOTE the cost of this is that our audio loop may not always match the loop event timing precisely.\n\tp._handleLoop = function () {\n\t\tthis._cleanUpAudioNode(this.sourceNode);\n\t\tthis.sourceNode = this._sourceNodeNext;\n\t\tthis._playbackStartTime = this.sourceNode.startTime;\n\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\n\t\tthis._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration);\n\t};\n\n\tp._updateDuration = function () {\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis._pause();\n\t\t\tthis._resume();\n\t\t}\n\t};\n\n\tcreatejs.WebAudioSoundInstance = createjs.promote(WebAudioSoundInstance, \"AbstractSoundInstance\");\n}());\n\n//##############################################################################\n// WebAudioPlugin.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\n\t\"use strict\";\n\n\t/**\n\t * Play sounds using Web Audio in the browser. The WebAudioPlugin is currently the default plugin, and will be used\n\t * anywhere that it is supported. To change plugin priority, check out the Sound API\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} method.\n\n\t * <h4>Known Browser and OS issues for Web Audio</h4>\n\t * <b>Firefox 25</b>\n\t * <li>\n\t *     mp3 audio files do not load properly on all windows machines, reported <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=929969\" target=\"_blank\">here</a>.\n\t *     <br />For this reason it is recommended to pass another FireFox-supported type (i.e. ogg) as the default\n\t *     extension, until this bug is resolved\n\t * </li>\n\t *\n\t * <b>Webkit (Chrome and Safari)</b>\n\t * <li>\n\t *     AudioNode.disconnect does not always seem to work.  This can cause the file size to grow over time if you\n\t * \t   are playing a lot of audio files.\n\t * </li>\n\t *\n\t * <b>iOS 6 limitations</b>\n\t * <ul>\n\t *     <li>\n\t *         Sound is initially muted and will only unmute through play being called inside a user initiated event\n\t *         (touch/click). Please read the mobile playback notes in the the {{#crossLink \"Sound\"}}{{/crossLink}}\n\t *         class for a full overview of the limitations, and how to get around them.\n\t *     </li>\n\t *\t   <li>\n\t *\t       A bug exists that will distort un-cached audio when a video element is present in the DOM. You can avoid\n\t *\t       this bug by ensuring the audio and video audio share the same sample rate.\n\t *\t   </li>\n\t * </ul>\n\t * @class WebAudioPlugin\n\t * @extends AbstractPlugin\n\t * @constructor\n\t * @since 0.4.0\n\t */\n\tfunction WebAudioPlugin() {\n\t\tthis.AbstractPlugin_constructor();\n\n\n// Private Properties\n\t\t/**\n\t\t * Value to set panning model to equal power for WebAudioSoundInstance.  Can be \"equalpower\" or 0 depending on browser implementation.\n\t\t * @property _panningModel\n\t\t * @type {Number / String}\n\t\t * @protected\n\t\t */\n\t\tthis._panningModel = s._panningModel;;\n\n\t\t/**\n\t\t * The web audio context, which WebAudio uses to play audio. All nodes that interact with the WebAudioPlugin\n\t\t * need to be created within this context.\n\t\t * @property context\n\t\t * @type {AudioContext}\n\t\t */\n\t\tthis.context = s.context;\n\n\t\t/**\n\t\t * A DynamicsCompressorNode, which is used to improve sound quality and prevent audio distortion.\n\t\t * It is connected to <code>context.destination</code>.\n\t\t *\n\t\t * Can be accessed by advanced users through createjs.Sound.activePlugin.dynamicsCompressorNode.\n\t\t * @property dynamicsCompressorNode\n\t\t * @type {AudioNode}\n\t\t */\n\t\tthis.dynamicsCompressorNode = this.context.createDynamicsCompressor();\n\t\tthis.dynamicsCompressorNode.connect(this.context.destination);\n\n\t\t/**\n\t\t * A GainNode for controlling master volume. It is connected to {{#crossLink \"WebAudioPlugin/dynamicsCompressorNode:property\"}}{{/crossLink}}.\n\t\t *\n\t\t * Can be accessed by advanced users through createjs.Sound.activePlugin.gainNode.\n\t\t * @property gainNode\n\t\t * @type {AudioGainNode}\n\t\t */\n\t\tthis.gainNode = this.context.createGain();\n\t\tthis.gainNode.connect(this.dynamicsCompressorNode);\n\t\tcreatejs.WebAudioSoundInstance.destinationNode = this.gainNode;\n\n\t\tthis._capabilities = s._capabilities;\n\n\t\tthis._loaderClass = createjs.WebAudioLoader;\n\t\tthis._soundInstanceClass = createjs.WebAudioSoundInstance;\n\n\t\tthis._addPropsToClasses();\n\t}\n\tvar p = createjs.extend(WebAudioPlugin, createjs.AbstractPlugin);\n\n// Static Properties\n\tvar s = WebAudioPlugin;\n\t/**\n\t * The capabilities of the plugin. This is generated via the {{#crossLink \"WebAudioPlugin/_generateCapabilities:method\"}}{{/crossLink}}\n\t * method and is used internally.\n\t * @property _capabilities\n\t * @type {Object}\n\t * @default null\n\t * @private\n\t * @static\n\t */\n\ts._capabilities = null;\n\n\t/**\n\t * Value to set panning model to equal power for WebAudioSoundInstance.  Can be \"equalpower\" or 0 depending on browser implementation.\n\t * @property _panningModel\n\t * @type {Number / String}\n\t * @private\n\t * @static\n\t */\n\ts._panningModel = \"equalpower\";\n\n\t/**\n\t * The web audio context, which WebAudio uses to play audio. All nodes that interact with the WebAudioPlugin\n\t * need to be created within this context.\n\t *\n\t * Advanced users can set this to an existing context, but <b>must</b> do so before they call\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} or {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}.\n\t *\n\t * @property context\n\t * @type {AudioContext}\n\t * @static\n\t */\n\ts.context = null;\n\n\t/**\n\t * The scratch buffer that will be assigned to the buffer property of a source node on close.\n\t * Works around an iOS Safari bug: https://github.com/CreateJS/SoundJS/issues/102\n\t *\n\t * Advanced users can set this to an existing source node, but <b>must</b> do so before they call\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} or {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}.\n\t *\n\t * @property _scratchBuffer\n\t * @type {AudioBuffer}\n\t * @private\n\t * @static\n\t */\n\t s._scratchBuffer = null;\n\n\t/**\n\t * Indicated whether audio on iOS has been unlocked, which requires a touchend/mousedown event that plays an\n\t * empty sound.\n\t * @property _unlocked\n\t * @type {boolean}\n\t * @since 0.6.2\n\t * @private\n\t */\n\ts._unlocked = false;\n\n\t/**\n\t * The default sample rate used when checking for iOS compatibility. See {{#crossLink \"WebAudioPlugin/_createAudioContext\"}}{{/crossLink}}.\n\t * @property DEFAULT_SAMPLE_REATE\n\t * @type {number}\n\t * @default 44100\n\t * @static\n\t */\n\ts.DEFAULT_SAMPLE_RATE = 44100;\n\n// Static Public Methods\n\t/**\n\t * Determine if the plugin can be used in the current browser/OS.\n\t * @method isSupported\n\t * @return {Boolean} If the plugin can be initialized.\n\t * @static\n\t */\n\ts.isSupported = function () {\n\t\t// check if this is some kind of mobile device, Web Audio works with local protocol under PhoneGap and it is unlikely someone is trying to run a local file\n\t\tvar isMobilePhoneGap = createjs.BrowserDetect.isIOS || createjs.BrowserDetect.isAndroid || createjs.BrowserDetect.isBlackberry;\n\t\t// OJR isMobile may be redundant with _isFileXHRSupported available.  Consider removing.\n\t\tif (location.protocol == \"file:\" && !isMobilePhoneGap && !this._isFileXHRSupported()) { return false; }  // Web Audio requires XHR, which is not usually available locally\n\t\ts._generateCapabilities();\n\t\tif (s.context == null) {return false;}\n\t\treturn true;\n\t};\n\n\t/**\n\t * Plays an empty sound in the web audio context.  This is used to enable web audio on iOS devices, as they\n\t * require the first sound to be played inside of a user initiated event (touch/click).  This is called when\n\t * {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} is initialized (by Sound {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}\n\t * for example).\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *     function handleTouch(event) {\n\t *         createjs.WebAudioPlugin.playEmptySound();\n\t *     }\n\t *\n\t * @method playEmptySound\n\t * @static\n\t * @since 0.4.1\n\t */\n\ts.playEmptySound = function() {\n\t\tif (s.context == null) {return;}\n\t\tvar source = s.context.createBufferSource();\n\t\tsource.buffer = s._scratchBuffer;\n\t\tsource.connect(s.context.destination);\n\t\tsource.start(0, 0, 0);\n\t};\n\n\n// Static Private Methods\n\t/**\n\t * Determine if XHR is supported, which is necessary for web audio.\n\t * @method _isFileXHRSupported\n\t * @return {Boolean} If XHR is supported.\n\t * @since 0.4.2\n\t * @private\n\t * @static\n\t */\n\ts._isFileXHRSupported = function() {\n\t\t// it's much easier to detect when something goes wrong, so let's start optimistically\n\t\tvar supported = true;\n\n\t\tvar xhr = new XMLHttpRequest();\n\t\ttry {\n\t\t\txhr.open(\"GET\", \"WebAudioPluginTest.fail\", false); // loading non-existant file triggers 404 only if it could load (synchronous call)\n\t\t} catch (error) {\n\t\t\t// catch errors in cases where the onerror is passed by\n\t\t\tsupported = false;\n\t\t\treturn supported;\n\t\t}\n\t\txhr.onerror = function() { supported = false; }; // cause irrelevant\n\t\t// with security turned off, we can get empty success results, which is actually a failed read (status code 0?)\n\t\txhr.onload = function() { supported = this.status == 404 || (this.status == 200 || (this.status == 0 && this.response != \"\")); };\n\t\ttry {\n\t\t\txhr.send();\n\t\t} catch (error) {\n\t\t\t// catch errors in cases where the onerror is passed by\n\t\t\tsupported = false;\n\t\t}\n\n\t\treturn supported;\n\t};\n\n\t/**\n\t * Determine the capabilities of the plugin. Used internally. Please see the Sound API {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}}\n\t * method for an overview of plugin capabilities.\n\t * @method _generateCapabilities\n\t * @static\n\t * @private\n\t */\n\ts._generateCapabilities = function () {\n\t\tif (s._capabilities != null) {return;}\n\t\t// Web Audio can be in any formats supported by the audio element, from http://www.w3.org/TR/webaudio/#AudioContext-section\n\t\tvar t = document.createElement(\"audio\");\n\t\tif (t.canPlayType == null) {return null;}\n\n\t\tif (s.context == null) {\n\t\t\ts.context = s._createAudioContext();\n\t\t\tif (s.context == null) { return null; }\n\t\t}\n\t\tif (s._scratchBuffer == null) {\n\t\t\ts._scratchBuffer = s.context.createBuffer(1, 1, 22050);\n\t\t}\n\n\t\ts._compatibilitySetUp();\n\n\t\t// Listen for document level clicks to unlock WebAudio on iOS. See the _unlock method.\n\t\tif (\"ontouchstart\" in window && s.context.state != \"running\") {\n\t\t\ts._unlock(); // When played inside of a touch event, this will enable audio on iOS immediately.\n\t\t\tdocument.addEventListener(\"mousedown\", s._unlock, true);\n\t\t\tdocument.addEventListener(\"touchstart\", s._unlock, true);\n\t\t\tdocument.addEventListener(\"touchend\", s._unlock, true);\n\t\t}\n\n\t\ts._capabilities = {\n\t\t\tpanning:true,\n\t\t\tvolume:true,\n\t\t\ttracks:-1\n\t\t};\n\n\t\t// determine which extensions our browser supports for this plugin by iterating through Sound.SUPPORTED_EXTENSIONS\n\t\tvar supportedExtensions = createjs.Sound.SUPPORTED_EXTENSIONS;\n\t\tvar extensionMap = createjs.Sound.EXTENSION_MAP;\n\t\tfor (var i = 0, l = supportedExtensions.length; i < l; i++) {\n\t\t\tvar ext = supportedExtensions[i];\n\t\t\tvar playType = extensionMap[ext] || ext;\n\t\t\ts._capabilities[ext] = (t.canPlayType(\"audio/\" + ext) != \"no\" && t.canPlayType(\"audio/\" + ext) != \"\") || (t.canPlayType(\"audio/\" + playType) != \"no\" && t.canPlayType(\"audio/\" + playType) != \"\");\n\t\t}  // OJR another way to do this might be canPlayType:\"m4a\", codex: mp4\n\n\t\t// 0=no output, 1=mono, 2=stereo, 4=surround, 6=5.1 surround.\n\t\t// See http://www.w3.org/TR/webaudio/#AudioChannelSplitter for more details on channels.\n\t\tif (s.context.destination.numberOfChannels < 2) {\n\t\t\ts._capabilities.panning = false;\n\t\t}\n\t};\n\n\t/**\n\t * Create an audio context for the sound.\n\t *\n\t * This method handles both vendor prefixes (specifically webkit support), as well as a case on iOS where\n\t * audio played with a different sample rate may play garbled when first started. The default sample rate is\n\t * 44,100, however it can be changed using the {{#crossLink \"WebAudioPlugin/DEFAULT_SAMPLE_RATE:property\"}}{{/crossLink}}.\n\t * @method _createAudioContext\n\t * @return {AudioContext | webkitAudioContext}\n\t * @private\n\t * @static\n\t * @since 1.0.0\n\t */\n\ts._createAudioContext = function() {\n\t\t// Slightly modified version of https://github.com/Jam3/ios-safe-audio-context\n\t\t// Resolves issues with first-run contexts playing garbled on iOS.\n\t\tvar AudioCtor = (window.AudioContext || window.webkitAudioContext);\n\t\tif (AudioCtor == null) { return null; }\n\t\tvar context = new AudioCtor();\n\n\t\t// Check if hack is necessary. Only occurs in iOS6+ devices\n\t\t// and only when you first boot the iPhone, or play a audio/video\n\t\t// with a different sample rate\n\t\tif (/(iPhone|iPad)/i.test(navigator.userAgent)\n\t\t\t\t&& context.sampleRate !== s.DEFAULT_SAMPLE_RATE) {\n\t\t\tvar buffer = context.createBuffer(1, 1, s.DEFAULT_SAMPLE_RATE),\n\t\t\t\t\tdummy = context.createBufferSource();\n\t\t\tdummy.buffer = buffer;\n\t\t\tdummy.connect(context.destination);\n\t\t\tdummy.start(0);\n\t\t\tdummy.disconnect();\n\t\t\tcontext.close() // dispose old context\n\n\t\t\tcontext = new AudioCtor();\n\t\t}\n\t\treturn context;\n\t}\n\n\t/**\n\t * Set up compatibility if only deprecated web audio calls are supported.\n\t * See http://www.w3.org/TR/webaudio/#DeprecationNotes\n\t * Needed so we can support new browsers that don't support deprecated calls (Firefox) as well as old browsers that\n\t * don't support new calls.\n\t *\n\t * @method _compatibilitySetUp\n\t * @static\n\t * @private\n\t * @since 0.4.2\n\t */\n\ts._compatibilitySetUp = function() {\n\t\ts._panningModel = \"equalpower\";\n\t\t//assume that if one new call is supported, they all are\n\t\tif (s.context.createGain) { return; }\n\n\t\t// simple name change, functionality the same\n\t\ts.context.createGain = s.context.createGainNode;\n\n\t\t// source node, add to prototype\n\t\tvar audioNode = s.context.createBufferSource();\n\t\taudioNode.__proto__.start = audioNode.__proto__.noteGrainOn;\t// note that noteGrainOn requires all 3 parameters\n\t\taudioNode.__proto__.stop = audioNode.__proto__.noteOff;\n\n\t\t// panningModel\n\t\ts._panningModel = 0;\n\t};\n\n\t/**\n\t * Try to unlock audio on iOS. This is triggered from either WebAudio plugin setup (which will work if inside of\n\t * a `mousedown` or `touchend` event stack), or the first document touchend/mousedown event. If it fails (touchend\n\t * will fail if the user presses for too long, indicating a scroll event instead of a click event.\n\t *\n\t * Note that earlier versions of iOS supported `touchstart` for this, but iOS9 removed this functionality. Adding\n\t * a `touchstart` event to support older platforms may preclude a `mousedown` even from getting fired on iOS9, so we\n\t * stick with `mousedown` and `touchend`.\n\t * @method _unlock\n\t * @since 0.6.2\n\t * @private\n\t */\n\ts._unlock = function() {\n\t\tif (s._unlocked) { return; }\n\t\ts.playEmptySound();\n\t\tif (s.context.state == \"running\") {\n\t\t\tdocument.removeEventListener(\"mousedown\", s._unlock, true);\n\t\t\tdocument.removeEventListener(\"touchend\", s._unlock, true);\n\t\t\tdocument.removeEventListener(\"touchstart\", s._unlock, true);\n\t\t\ts._unlocked = true;\n\t\t}\n\t};\n\n\n// Public Methods\n\tp.toString = function () {\n\t\treturn \"[WebAudioPlugin]\";\n\t};\n\n\n// Private Methods\n\t/**\n\t * Set up needed properties on supported classes WebAudioSoundInstance and WebAudioLoader.\n\t * @method _addPropsToClasses\n\t * @static\n\t * @protected\n\t * @since 0.6.0\n\t */\n\tp._addPropsToClasses = function() {\n\t\tvar c = this._soundInstanceClass;\n\t\tc.context = this.context;\n\t\tc._scratchBuffer = s._scratchBuffer;\n\t\tc.destinationNode = this.gainNode;\n\t\tc._panningModel = this._panningModel;\n\n\t\tthis._loaderClass.context = this.context;\n\t};\n\n\n\t/**\n\t * Set the gain value for master audio. Should not be called externally.\n\t * @method _updateVolume\n\t * @protected\n\t */\n\tp._updateVolume = function () {\n\t\tvar newVolume = createjs.Sound._masterMute ? 0 : this._volume;\n\t\tif (newVolume != this.gainNode.gain.value) {\n\t\t\tthis.gainNode.gain.value = newVolume;\n\t\t}\n\t};\n\n\tcreatejs.WebAudioPlugin = createjs.promote(WebAudioPlugin, \"AbstractPlugin\");\n}());\n\n//##############################################################################\n// HTMLAudioTagPool.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * HTMLAudioTagPool is an object pool for HTMLAudio tag instances.\n\t * @class HTMLAudioTagPool\n\t * @param {String} src The source of the channel.\n\t * @protected\n\t */\n\tfunction HTMLAudioTagPool() {\n\t\t\tthrow \"HTMLAudioTagPool cannot be instantiated\";\n\t}\n\n\tvar s = HTMLAudioTagPool;\n\n// Static Properties\n\t/**\n\t * A hash lookup of each base audio tag, indexed by the audio source.\n\t * @property _tags\n\t * @type {{}}\n\t * @static\n\t * @private\n\t */\n\ts._tags = {};\n\n\t/**\n\t * An object pool for html audio tags\n\t * @property _tagPool\n\t * @type {TagPool}\n\t * @static\n\t * @private\n\t */\n\ts._tagPool = new TagPool();\n\n\t/**\n\t * A hash lookup of if a base audio tag is available, indexed by the audio source\n\t * @property _tagsUsed\n\t * @type {{}}\n\t * @private\n\t * @static\n\t */\n\ts._tagUsed = {};\n\n// Static Methods\n\t/**\n\t  * Get an audio tag with the given source.\n\t  * @method get\n\t  * @param {String} src The source file used by the audio tag.\n\t  * @static\n\t  */\n\t s.get = function (src) {\n\t\tvar t = s._tags[src];\n\t\tif (t == null) {\n\t\t\t// create new base tag\n\t\t\tt = s._tags[src] = s._tagPool.get();\n\t\t\tt.src = src;\n\t\t} else {\n\t\t\t// get base or pool\n\t\t\tif (s._tagUsed[src]) {\n\t\t\t\tt = s._tagPool.get();\n\t\t\t\tt.src = src;\n\t\t\t} else {\n\t\t\t\ts._tagUsed[src] = true;\n\t\t\t}\n\t\t}\n\t\treturn t;\n\t };\n\n\t /**\n\t  * Return an audio tag to the pool.\n\t  * @method set\n\t  * @param {String} src The source file used by the audio tag.\n\t  * @param {HTMLElement} tag Audio tag to set.\n\t  * @static\n\t  */\n\t s.set = function (src, tag) {\n\t\t // check if this is base, if yes set boolean if not return to pool\n\t\t if(tag == s._tags[src]) {\n\t\t\t s._tagUsed[src] = false;\n\t\t } else {\n\t\t\t s._tagPool.set(tag);\n\t\t }\n\t };\n\n\t/**\n\t * Delete stored tag reference and return them to pool. Note that if the tag reference does not exist, this will fail.\n\t * @method remove\n\t * @param {String} src The source for the tag\n\t * @return {Boolean} If the TagPool was deleted.\n\t * @static\n\t */\n\ts.remove = function (src) {\n\t\tvar tag = s._tags[src];\n\t\tif (tag == null) {return false;}\n\t\ts._tagPool.set(tag);\n\t\tdelete(s._tags[src]);\n\t\tdelete(s._tagUsed[src]);\n\t\treturn true;\n\t};\n\n\t/**\n\t * Gets the duration of the src audio in milliseconds\n\t * @method getDuration\n\t * @param {String} src The source file used by the audio tag.\n\t * @return {Number} Duration of src in milliseconds\n\t * @static\n\t */\n\ts.getDuration= function (src) {\n\t\tvar t = s._tags[src];\n\t\tif (t == null || !t.duration) {return 0;}\t// OJR duration is NaN if loading has not completed\n\t\treturn t.duration * 1000;\n\t};\n\n\tcreatejs.HTMLAudioTagPool = HTMLAudioTagPool;\n\n\n// ************************************************************************************************************\n\t/**\n\t * The TagPool is an object pool for HTMLAudio tag instances.\n\t * #class TagPool\n\t * @param {String} src The source of the channel.\n\t * @protected\n\t */\n\tfunction TagPool(src) {\n\n// Public Properties\n\t\t/**\n\t\t * A list of all available tags in the pool.\n\t\t * #property tags\n\t\t * @type {Array}\n\t\t * @protected\n\t\t */\n\t\tthis._tags = [];\n\t};\n\n\tvar p = TagPool.prototype;\n\tp.constructor = TagPool;\n\n\n// Public Methods\n\t/**\n\t * Get an HTMLAudioElement for immediate playback. This takes it out of the pool.\n\t * #method get\n\t * @return {HTMLAudioElement} An HTML audio tag.\n\t */\n\tp.get = function () {\n\t\tvar tag;\n\t\tif (this._tags.length == 0) {\n\t\t\ttag = this._createTag();\n\t\t} else {\n\t\t\ttag = this._tags.pop();\n\t\t}\n\t\tif (tag.parentNode == null) {document.body.appendChild(tag);}\n\t\treturn tag;\n\t};\n\n\t/**\n\t * Put an HTMLAudioElement back in the pool for use.\n\t * #method set\n\t * @param {HTMLAudioElement} tag HTML audio tag\n\t */\n\tp.set = function (tag) {\n\t\t// OJR this first step seems unnecessary\n\t\tvar index = createjs.indexOf(this._tags, tag);\n\t\tif (index == -1) {\n\t\t\tthis._tags.src = null;\n\t\t\tthis._tags.push(tag);\n\t\t}\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[TagPool]\";\n\t};\n\n\n// Private Methods\n\t/**\n\t * Create an HTML audio tag.\n\t * #method _createTag\n\t * @param {String} src The source file to set for the audio tag.\n\t * @return {HTMLElement} Returns an HTML audio tag.\n\t * @protected\n\t */\n\tp._createTag = function () {\n\t\tvar tag = document.createElement(\"audio\");\n\t\ttag.autoplay = false;\n\t\ttag.preload = \"none\";\n\t\t//LM: Firefox fails when this the preload=\"none\" for other tags, but it needs to be \"none\" to ensure PreloadJS works.\n\t\treturn tag;\n\t};\n\n}());\n\n//##############################################################################\n// HTMLAudioSoundInstance.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\t\"use strict\";\n\n\t/**\n\t * HTMLAudioSoundInstance extends the base api of {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} and is used by\n\t * {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\n\t *\n\t * @param {String} src The path to and file name of the sound.\n\t * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\n\t * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\n\t * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\n\t * @class HTMLAudioSoundInstance\n\t * @extends AbstractSoundInstance\n\t * @constructor\n\t */\n\tfunction HTMLAudioSoundInstance(src, startTime, duration, playbackResource) {\n\t\tthis.AbstractSoundInstance_constructor(src, startTime, duration, playbackResource);\n\n\n// Private Properties\n\t\tthis._audioSpriteStopTime = null;\n\t\tthis._delayTimeoutId = null;\n\n\t\t// Proxies, make removing listeners easier.\n\t\tthis._endedHandler = createjs.proxy(this._handleSoundComplete, this);\n\t\tthis._readyHandler = createjs.proxy(this._handleTagReady, this);\n\t\tthis._stalledHandler = createjs.proxy(this._playFailed, this);\n\t\tthis._audioSpriteEndHandler = createjs.proxy(this._handleAudioSpriteLoop, this);\n\t\tthis._loopHandler = createjs.proxy(this._handleSoundComplete, this);\n\n\t\tif (duration) {\n\t\t\tthis._audioSpriteStopTime = (startTime + duration) * 0.001;\n\t\t} else {\n\t\t\tthis._duration = createjs.HTMLAudioTagPool.getDuration(this.src);\n\t\t}\n\t}\n\tvar p = createjs.extend(HTMLAudioSoundInstance, createjs.AbstractSoundInstance);\n\n// Public Methods\n\t/**\n\t * Called by {{#crossLink \"Sound\"}}{{/crossLink}} when plugin does not handle master volume.\n\t * undoc'd because it is not meant to be used outside of Sound\n\t * #method setMasterVolume\n\t * @param value\n\t */\n\tp.setMasterVolume = function (value) {\n\t\tthis._updateVolume();\n\t};\n\n\t/**\n\t * Called by {{#crossLink \"Sound\"}}{{/crossLink}} when plugin does not handle master mute.\n\t * undoc'd because it is not meant to be used outside of Sound\n\t * #method setMasterMute\n\t * @param value\n\t */\n\tp.setMasterMute = function (isMuted) {\n\t\tthis._updateVolume();\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[HTMLAudioSoundInstance]\";\n\t};\n\n//Private Methods\n\tp._removeLooping = function() {\n\t\tif(this._playbackResource == null) {return;}\n\t\tthis._playbackResource.loop = false;\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t};\n\n\tp._addLooping = function() {\n\t\tif(this._playbackResource == null  || this._audioSpriteStopTime) {return;}\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t\tthis._playbackResource.loop = true;\n\t};\n\n\tp._handleCleanUp = function () {\n\t\tvar tag = this._playbackResource;\n\t\tif (tag != null) {\n\t\t\ttag.pause();\n\t\t\ttag.loop = false;\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\n\n\t\t\ttry {\n\t\t\t\ttag.currentTime = this._startTime;\n\t\t\t} catch (e) {\n\t\t\t} // Reset Position\n\t\t\tcreatejs.HTMLAudioTagPool.set(this.src, tag);\n\t\t\tthis._playbackResource = null;\n\t\t}\n\t};\n\n\tp._beginPlaying = function (playProps) {\n\t\tthis._playbackResource = createjs.HTMLAudioTagPool.get(this.src);\n\t\treturn this.AbstractSoundInstance__beginPlaying(playProps);\n\t};\n\n\tp._handleSoundReady = function (event) {\n\t\tif (this._playbackResource.readyState !== 4) {\n\t\t\tvar tag = this._playbackResource;\n\t\t\ttag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\n\t\t\ttag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\n\t\t\ttag.preload = \"auto\"; // This is necessary for Firefox, as it won't ever \"load\" until this is set.\n\t\t\ttag.load();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._updateVolume();\n\t\tthis._playbackResource.currentTime = (this._startTime + this._position) * 0.001;\n\t\tif (this._audioSpriteStopTime) {\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\n\t\t} else {\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\n\t\t\tif(this._loop != 0) {\n\t\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t\t\t\tthis._playbackResource.loop = true;\n\t\t\t}\n\t\t}\n\n\t\tthis._playbackResource.play();\n\t};\n\n\t/**\n\t * Used to handle when a tag is not ready for immediate playback when it is returned from the HTMLAudioTagPool.\n\t * @method _handleTagReady\n\t * @param event\n\t * @protected\n\t */\n\tp._handleTagReady = function (event) {\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\n\n\t\tthis._handleSoundReady();\n\t};\n\n\tp._pause = function () {\n\t\tthis._playbackResource.pause();\n\t};\n\n\tp._resume = function () {\n\t\tthis._playbackResource.play();\n\t};\n\n\tp._updateVolume = function () {\n\t\tif (this._playbackResource != null) {\n\t\t\tvar newVolume = (this._muted || createjs.Sound._masterMute) ? 0 : this._volume * createjs.Sound._masterVolume;\n\t\t\tif (newVolume != this._playbackResource.volume) {this._playbackResource.volume = newVolume;}\n\t\t}\n\t};\n\n\tp._calculateCurrentPosition = function() {\n\t\treturn (this._playbackResource.currentTime * 1000) - this._startTime;\n\t};\n\n\tp._updatePosition = function() {\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);\n\t\ttry {\n\t\t\tthis._playbackResource.currentTime = (this._position + this._startTime) * 0.001;\n\t\t} catch (error) { // Out of range\n\t\t\tthis._handleSetPositionSeek(null);\n\t\t}\n\t};\n\n\t/**\n\t * Used to enable setting position, as we need to wait for that seek to be done before we add back our loop handling seek listener\n\t * @method _handleSetPositionSeek\n\t * @param event\n\t * @protected\n\t */\n\tp._handleSetPositionSeek = function(event) {\n\t\tif (this._playbackResource == null) { return; }\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t};\n\n\t/**\n\t * Timer used to loop audio sprites.\n\t * NOTE because of the inaccuracies in the timeupdate event (15 - 250ms) and in setting the tag to the desired timed\n\t * (up to 300ms), it is strongly recommended not to loop audio sprites with HTML Audio if smooth looping is desired\n\t *\n\t * @method _handleAudioSpriteLoop\n\t * @param event\n\t * @private\n\t */\n\tp._handleAudioSpriteLoop = function (event) {\n\t\tif(this._playbackResource.currentTime <= this._audioSpriteStopTime) {return;}\n\t\tthis._playbackResource.pause();\n\t\tif(this._loop == 0) {\n\t\t\tthis._handleSoundComplete(null);\n\t\t} else {\n\t\t\tthis._position = 0;\n\t\t\tthis._loop--;\n\t\t\tthis._playbackResource.currentTime = this._startTime * 0.001;\n\t\t\tif(!this._paused) {this._playbackResource.play();}\n\t\t\tthis._sendEvent(\"loop\");\n\t\t}\n\t};\n\n\t// NOTE with this approach audio will loop as reliably as the browser allows\n\t// but we could end up sending the loop event after next loop playback begins\n\tp._handleLoop = function (event) {\n\t\tif(this._loop == 0) {\n\t\t\tthis._playbackResource.loop = false;\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\n\t\t}\n\t};\n\n\tp._updateStartTime = function () {\n\t\tthis._audioSpriteStopTime = (this._startTime + this._duration) * 0.001;\n\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\n\t\t}\n\t};\n\n\tp._updateDuration = function () {\n\t\tthis._audioSpriteStopTime = (this._startTime + this._duration) * 0.001;\n\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\n\t\t}\n\t};\n\n\tp._setDurationFromSource = function () {\n\t\tthis._duration = createjs.HTMLAudioTagPool.getDuration(this.src);\n\t\tthis._playbackResource = null;\n\t};\n\n\tcreatejs.HTMLAudioSoundInstance = createjs.promote(HTMLAudioSoundInstance, \"AbstractSoundInstance\");\n}());\n\n//##############################################################################\n// HTMLAudioPlugin.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function () {\n\n\t\"use strict\";\n\n\t/**\n\t * Play sounds using HTML &lt;audio&gt; tags in the browser. This plugin is the second priority plugin installed\n\t * by default, after the {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.  For older browsers that do not support html\n\t * audio, include and install the {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}.\n\t *\n\t * <h4>Known Browser and OS issues for HTML Audio</h4>\n\t * <b>All browsers</b><br />\n\t * Testing has shown in all browsers there is a limit to how many audio tag instances you are allowed.  If you exceed\n\t * this limit, you can expect to see unpredictable results. Please use {{#crossLink \"Sound.MAX_INSTANCES\"}}{{/crossLink}} as\n\t * a guide to how many total audio tags you can safely use in all browsers.  This issue is primarily limited to IE9.\n\t *\n     * <b>IE html limitations</b><br />\n     * <ul><li>There is a delay in applying volume changes to tags that occurs once playback is started. So if you have\n     * muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of\n     * when or how you apply the volume change, as the tag seems to need to play to apply it.</li>\n     * <li>MP3 encoding will not always work for audio tags if it's not default.  We've found default encoding with\n     * 64kbps works.</li>\n\t * <li>Occasionally very short samples will get cut off.</li>\n\t * <li>There is a limit to how many audio tags you can load or play at once, which appears to be determined by\n\t * hardware and browser settings.  See {{#crossLink \"HTMLAudioPlugin.MAX_INSTANCES\"}}{{/crossLink}} for a safe estimate.\n\t * Note that audio sprites can be used as a solution to this issue.</li></ul>\n\t *\n\t * <b>Safari limitations</b><br />\n\t * <ul><li>Safari requires Quicktime to be installed for audio playback.</li></ul>\n\t *\n\t * <b>iOS 6 limitations</b><br />\n\t * <ul><li>can only have one &lt;audio&gt; tag</li>\n\t * \t\t<li>can not preload or autoplay the audio</li>\n\t * \t\t<li>can not cache the audio</li>\n\t * \t\t<li>can not play the audio except inside a user initiated event.</li>\n\t *\t\t<li>Note it is recommended to use {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} for iOS (6+)</li>\n\t * \t\t<li>audio sprites can be used to mitigate some of these issues and are strongly recommended on iOS</li>\n\t * </ul>\n\t *\n\t * <b>Android Native Browser limitations</b><br />\n\t * <ul><li>We have no control over audio volume. Only the user can set volume on their device.</li>\n\t *      <li>We can only play audio inside a user event (touch/click).  This currently means you cannot loop sound or use a delay.</li></ul>\n\t * <b> Android Chrome 26.0.1410.58 specific limitations</b><br />\n\t * <ul> <li>Can only play 1 sound at a time.</li>\n\t *      <li>Sound is not cached.</li>\n\t *      <li>Sound can only be loaded in a user initiated touch/click event.</li>\n\t *      <li>There is a delay before a sound is played, presumably while the src is loaded.</li>\n\t * </ul>\n\t *\n\t * See {{#crossLink \"Sound\"}}{{/crossLink}} for general notes on known issues.\n\t *\n\t * @class HTMLAudioPlugin\n\t * @extends AbstractPlugin\n\t * @constructor\n\t */\n\tfunction HTMLAudioPlugin() {\n\t\tthis.AbstractPlugin_constructor();\n\n\n\t// Public Properties\n\t\tthis._capabilities = s._capabilities;\n\n\t\tthis._loaderClass = createjs.SoundLoader;\n\t\tthis._soundInstanceClass = createjs.HTMLAudioSoundInstance;\n\t}\n\n\tvar p = createjs.extend(HTMLAudioPlugin, createjs.AbstractPlugin);\n\tvar s = HTMLAudioPlugin;\n\n// Static Properties\n\t/**\n\t * The maximum number of instances that can be loaded or played. This is a browser limitation, primarily limited to IE9.\n\t * The actual number varies from browser to browser (and is largely hardware dependant), but this is a safe estimate.\n\t * Audio sprites work around this limitation.\n\t * @property MAX_INSTANCES\n\t * @type {Number}\n\t * @default 30\n\t * @static\n\t */\n\ts.MAX_INSTANCES = 30;\n\n\t/**\n\t * Event constant for the \"canPlayThrough\" event for cleaner code.\n\t * @property _AUDIO_READY\n\t * @type {String}\n\t * @default canplaythrough\n\t * @static\n\t * @private\n\t */\n\ts._AUDIO_READY = \"canplaythrough\";\n\n\t/**\n\t * Event constant for the \"ended\" event for cleaner code.\n\t * @property _AUDIO_ENDED\n\t * @type {String}\n\t * @default ended\n\t * @static\n\t * @private\n\t */\n\ts._AUDIO_ENDED = \"ended\";\n\n\t/**\n\t * Event constant for the \"seeked\" event for cleaner code.  We utilize this event for maintaining loop events.\n\t * @property _AUDIO_SEEKED\n\t * @type {String}\n\t * @default seeked\n\t * @static\n\t * @private\n\t */\n\ts._AUDIO_SEEKED = \"seeked\";\n\n\t/**\n\t * Event constant for the \"stalled\" event for cleaner code.\n\t * @property _AUDIO_STALLED\n\t * @type {String}\n\t * @default stalled\n\t * @static\n\t * @private\n\t */\n\ts._AUDIO_STALLED = \"stalled\";\n\n\t/**\n\t * Event constant for the \"timeupdate\" event for cleaner code.  Utilized for looping audio sprites.\n\t * This event callsback ever 15 to 250ms and can be dropped by the browser for performance.\n\t * @property _TIME_UPDATE\n\t * @type {String}\n\t * @default timeupdate\n\t * @static\n\t * @private\n\t */\n\ts._TIME_UPDATE = \"timeupdate\";\n\n\t/**\n\t * The capabilities of the plugin. This is generated via the {{#crossLink \"HTMLAudioPlugin/_generateCapabilities\"}}{{/crossLink}}\n\t * method. Please see the Sound {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}} method for an overview of all\n\t * of the available properties.\n\t * @property _capabilities\n\t * @type {Object}\n\t * @private\n\t * @static\n\t */\n\ts._capabilities = null;\n\n\n// Static Methods\n\t/**\n\t * Determine if the plugin can be used in the current browser/OS. Note that HTML audio is available in most modern\n\t * browsers, but is disabled in iOS because of its limitations.\n\t * @method isSupported\n\t * @return {Boolean} If the plugin can be initialized.\n\t * @static\n\t */\n\ts.isSupported = function () {\n\t\ts._generateCapabilities();\n\t\treturn (s._capabilities != null);\n\t};\n\n\t/**\n\t * Determine the capabilities of the plugin. Used internally. Please see the Sound API {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}}\n\t * method for an overview of plugin capabilities.\n\t * @method _generateCapabilities\n\t * @static\n\t * @private\n\t */\n\ts._generateCapabilities = function () {\n\t\tif (s._capabilities != null) {return;}\n\t\tvar t = document.createElement(\"audio\");\n\t\tif (t.canPlayType == null) {return null;}\n\n\t\ts._capabilities = {\n\t\t\tpanning:false,\n\t\t\tvolume:true,\n\t\t\ttracks:-1\n\t\t};\n\n\t\t// determine which extensions our browser supports for this plugin by iterating through Sound.SUPPORTED_EXTENSIONS\n\t\tvar supportedExtensions = createjs.Sound.SUPPORTED_EXTENSIONS;\n\t\tvar extensionMap = createjs.Sound.EXTENSION_MAP;\n\t\tfor (var i = 0, l = supportedExtensions.length; i < l; i++) {\n\t\t\tvar ext = supportedExtensions[i];\n\t\t\tvar playType = extensionMap[ext] || ext;\n\t\t\ts._capabilities[ext] = (t.canPlayType(\"audio/\" + ext) != \"no\" && t.canPlayType(\"audio/\" + ext) != \"\") || (t.canPlayType(\"audio/\" + playType) != \"no\" && t.canPlayType(\"audio/\" + playType) != \"\");\n\t\t}  // OJR another way to do this might be canPlayType:\"m4a\", codex: mp4\n\t};\n\n\n// public methods\n\tp.register = function (loadItem) {\n\t\tvar tag = createjs.HTMLAudioTagPool.get(loadItem.src);\n\t\tvar loader = this.AbstractPlugin_register(loadItem);\n\t\tloader.setTag(tag);\n\n\t\treturn loader;\n\t};\n\n\tp.removeSound = function (src) {\n\t\tthis.AbstractPlugin_removeSound(src);\n\t\tcreatejs.HTMLAudioTagPool.remove(src);\n\t};\n\n\tp.create = function (src, startTime, duration) {\n\t\tvar si = this.AbstractPlugin_create(src, startTime, duration);\n\t\tsi.playbackResource = null;\n\t\treturn si;\n\t};\n\n\tp.toString = function () {\n\t\treturn \"[HTMLAudioPlugin]\";\n\t};\n\n\t// plugin does not support these\n\tp.setVolume = p.getVolume = p.setMute = null;\n\n\n\tcreatejs.HTMLAudioPlugin = createjs.promote(HTMLAudioPlugin, \"AbstractPlugin\");\n}());\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/latest-createjs/lib/soundjs/soundjs.js?");

/***/ }),

/***/ "./node_modules/latest-createjs/lib/tweenjs/tweenjs.js":
/*!*************************************************************!*\
  !*** ./node_modules/latest-createjs/lib/tweenjs/tweenjs.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*!\n* TweenJS\n* Visit http://createjs.com/ for documentation, updates and examples.\n*\n* Copyright (c) 2010 gskinner.com, inc.\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n\n//##############################################################################\n// extend.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Sets up the prototype chain and constructor property for a new class.\n *\n * This should be called right after creating the class constructor.\n *\n * \tfunction MySubClass() {}\n * \tcreatejs.extend(MySubClass, MySuperClass);\n * \tMySubClass.prototype.doSomething = function() { }\n *\n * \tvar foo = new MySubClass();\n * \tconsole.log(foo instanceof MySuperClass); // true\n * \tconsole.log(foo.prototype.constructor === MySubClass); // true\n *\n * @method extend\n * @param {Function} subclass The subclass.\n * @param {Function} superclass The superclass to extend.\n * @return {Function} Returns the subclass's new prototype.\n */\ncreatejs.extend = function(subclass, superclass) {\n\t\"use strict\";\n\n\tfunction o() { this.constructor = subclass; }\n\to.prototype = superclass.prototype;\n\treturn (subclass.prototype = new o());\n};\n\n//##############################################################################\n// promote.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\n * It is recommended to use the super class's name as the prefix.\n * An alias to the super class's constructor is always added in the format `prefix_constructor`.\n * This allows the subclass to call super class methods without using `function.call`, providing better performance.\n *\n * For example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\n * would add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\n * prototype of `MySubClass` as `MySuperClass_draw`.\n *\n * This should be called after the class's prototype is fully defined.\n *\n * \tfunction ClassA(name) {\n * \t\tthis.name = name;\n * \t}\n * \tClassA.prototype.greet = function() {\n * \t\treturn \"Hello \"+this.name;\n * \t}\n *\n * \tfunction ClassB(name, punctuation) {\n * \t\tthis.ClassA_constructor(name);\n * \t\tthis.punctuation = punctuation;\n * \t}\n * \tcreatejs.extend(ClassB, ClassA);\n * \tClassB.prototype.greet = function() {\n * \t\treturn this.ClassA_greet()+this.punctuation;\n * \t}\n * \tcreatejs.promote(ClassB, \"ClassA\");\n *\n * \tvar foo = new ClassB(\"World\", \"!?!\");\n * \tconsole.log(foo.greet()); // Hello World!?!\n *\n * @method promote\n * @param {Function} subclass The class to promote super class methods on.\n * @param {String} prefix The prefix to add to the promoted method names. Usually the name of the superclass.\n * @return {Function} Returns the subclass.\n */\ncreatejs.promote = function(subclass, prefix) {\n\t\"use strict\";\n\n\tvar subP = subclass.prototype, supP = (Object.getPrototypeOf&&Object.getPrototypeOf(subP))||subP.__proto__;\n\tif (supP) {\n\t\tsubP[(prefix+=\"_\") + \"constructor\"] = supP.constructor; // constructor is not always innumerable\n\t\tfor (var n in supP) {\n\t\t\tif (subP.hasOwnProperty(n) && (typeof supP[n] == \"function\")) { subP[prefix + n] = supP[n]; }\n\t\t}\n\t}\n\treturn subclass;\n};\n\n//##############################################################################\n// deprecate.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n/**\n * @class Utility Methods\n */\n\n/**\n * Wraps deprecated methods so they still be used, but throw warnings to developers.\n *\n *\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\n *\n * The recommended approach for deprecated properties is:\n *\n *\ttry {\n *\t\tObj\tect.defineProperties(object, {\n *\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\n *\t\t\treadWriteProp: {\n *\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\n *\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\n *\t\t});\n *\t} catch (e) {}\n *\n * @method deprecate\n * @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how\n * @param {String} [name=null] The name of the method or property to display in the console warning.\n * to deprecate properties.\n * @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after\n * logging the warning in the console.\n */\ncreatejs.deprecate = function(fallbackMethod, name) {\n\t\"use strict\";\n\treturn function() {\n\t\tvar msg = \"Deprecated property or method '\"+name+\"'. See docs for info.\";\n\t\tconsole && (console.warn ? console.warn(msg) : console.log(msg));\n\t\treturn fallbackMethod && fallbackMethod.apply(this, arguments);\n\t}\n};\n\n//##############################################################################\n// Event.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n// constructor:\n\t/**\n\t * Contains properties and methods shared by all events for use with\n\t * {{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\n\t * \n\t * Note that Event objects are often reused, so you should never\n\t * rely on an event object's state outside of the call stack it was received in.\n\t * @class Event\n\t * @param {String} type The event type.\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\n\t * @constructor\n\t **/\n\tfunction Event(type, bubbles, cancelable) {\n\t\t\n\t\n\t// public properties:\n\t\t/**\n\t\t * The type of event.\n\t\t * @property type\n\t\t * @type String\n\t\t **/\n\t\tthis.type = type;\n\t\n\t\t/**\n\t\t * The object that generated an event.\n\t\t * @property target\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.target = null;\n\t\n\t\t/**\n\t\t * The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\n\t\t * always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\n\t\t * is generated from childObj, then a listener on parentObj would receive the event with\n\t\t * target=childObj (the original target) and currentTarget=parentObj (where the listener was added).\n\t\t * @property currentTarget\n\t\t * @type Object\n\t\t * @default null\n\t\t * @readonly\n\t\t*/\n\t\tthis.currentTarget = null;\n\t\n\t\t/**\n\t\t * For bubbling events, this indicates the current event phase:<OL>\n\t\t * \t<LI> capture phase: starting from the top parent to the target</LI>\n\t\t * \t<LI> at target phase: currently being dispatched from the target</LI>\n\t\t * \t<LI> bubbling phase: from the target to the top parent</LI>\n\t\t * </OL>\n\t\t * @property eventPhase\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.eventPhase = 0;\n\t\n\t\t/**\n\t\t * Indicates whether the event will bubble through the display list.\n\t\t * @property bubbles\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.bubbles = !!bubbles;\n\t\n\t\t/**\n\t\t * Indicates whether the default behaviour of this event can be cancelled via\n\t\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.\n\t\t * @property cancelable\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.cancelable = !!cancelable;\n\t\n\t\t/**\n\t\t * The epoch time at which this event was created.\n\t\t * @property timeStamp\n\t\t * @type Number\n\t\t * @default 0\n\t\t * @readonly\n\t\t*/\n\t\tthis.timeStamp = (new Date()).getTime();\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property defaultPrevented\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.defaultPrevented = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\n\t\t * {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.\n\t\t * @property propagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.propagationStopped = false;\n\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\n\t\t * on this event.\n\t\t * @property immediatePropagationStopped\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.immediatePropagationStopped = false;\n\t\t\n\t\t/**\n\t\t * Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.\n\t\t * @property removed\n\t\t * @type Boolean\n\t\t * @default false\n\t\t * @readonly\n\t\t*/\n\t\tthis.removed = false;\n\t}\n\tvar p = Event.prototype;\n\n// public methods:\n\t/**\n\t * Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\n\t * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\n\t * cancel the default behaviour associated with the event.\n\t * @method preventDefault\n\t **/\n\tp.preventDefault = function() {\n\t\tthis.defaultPrevented = this.cancelable&&true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopPropagation\n\t **/\n\tp.stopPropagation = function() {\n\t\tthis.propagationStopped = true;\n\t};\n\n\t/**\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\n\t * {{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\n\t * Mirrors the DOM event standard.\n\t * @method stopImmediatePropagation\n\t **/\n\tp.stopImmediatePropagation = function() {\n\t\tthis.immediatePropagationStopped = this.propagationStopped = true;\n\t};\n\t\n\t/**\n\t * Causes the active listener to be removed via removeEventListener();\n\t * \n\t * \t\tmyBtn.addEventListener(\"click\", function(evt) {\n\t * \t\t\t// do stuff...\n\t * \t\t\tevt.remove(); // removes this listener.\n\t * \t\t});\n\t * \n\t * @method remove\n\t **/\n\tp.remove = function() {\n\t\tthis.removed = true;\n\t};\n\t\n\t/**\n\t * Returns a clone of the Event instance.\n\t * @method clone\n\t * @return {Event} a clone of the Event instance.\n\t **/\n\tp.clone = function() {\n\t\treturn new Event(this.type, this.bubbles, this.cancelable);\n\t};\n\t\n\t/**\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\n\t *\n\t * @method set\n\t * @param {Object} props A generic object containing properties to copy to the instance.\n\t * @return {Event} Returns the instance the method is called on (useful for chaining calls.)\n\t * @chainable\n\t*/\n\tp.set = function(props) {\n\t\tfor (var n in props) { this[n] = props[n]; }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t **/\n\tp.toString = function() {\n\t\treturn \"[Event (type=\"+this.type+\")]\";\n\t};\n\n\tcreatejs.Event = Event;\n}());\n\n//##############################################################################\n// EventDispatcher.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * EventDispatcher provides methods for managing queues of event listeners and dispatching events.\r\n\t *\r\n\t * You can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\r\n\t * EventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\r\n\t * \r\n\t * Together with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\r\n\t * DOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\r\n\t * bubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\r\n\t * \r\n\t * EventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\r\n\t * to create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \r\n\t * {{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\r\n\t * {{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\r\n\t * \r\n\t * Another addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\r\n\t * method, which can be used to listeners for all events, or listeners for a specific event. The Event object also \r\n\t * includes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t * Add EventDispatcher capabilities to the \"MyClass\" class.\r\n\t *\r\n\t *      EventDispatcher.initialize(MyClass.prototype);\r\n\t *\r\n\t * Add an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\r\n\t *\r\n\t *      instance.addEventListener(\"eventName\", handlerMethod);\r\n\t *      function handlerMethod(event) {\r\n\t *          console.log(event.target + \" Was Clicked\");\r\n\t *      }\r\n\t *\r\n\t * <b>Maintaining proper scope</b><br />\r\n\t * Scope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\r\n\t * method to subscribe to events simplifies this.\r\n\t *\r\n\t *      instance.addEventListener(\"click\", function(event) {\r\n\t *          console.log(instance == this); // false, scope is ambiguous.\r\n\t *      });\r\n\t *      \r\n\t *      instance.on(\"click\", function(event) {\r\n\t *          console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\r\n\t *      });\r\n\t * \r\n\t * If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\r\n\t * scope.\r\n\t *\r\n\t * <b>Browser support</b>\r\n\t * The event model in CreateJS can be used separately from the suite in any project, however the inheritance model\r\n\t * requires modern browsers (IE9+).\r\n\t *      \r\n\t *\r\n\t * @class EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction EventDispatcher() {\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _listeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._listeners = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _captureListeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._captureListeners = null;\r\n\t}\r\n\tvar p = EventDispatcher.prototype;\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Static initializer to mix EventDispatcher methods into a target object or prototype.\r\n\t * \r\n\t * \t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\r\n\t * \t\tEventDispatcher.initialize(myObject); // add to a specific instance\r\n\t * \r\n\t * @method initialize\r\n\t * @static\r\n\t * @param {Object} target The target object to inject EventDispatcher methods into. This can be an instance or a\r\n\t * prototype.\r\n\t **/\r\n\tEventDispatcher.initialize = function(target) {\r\n\t\ttarget.addEventListener = p.addEventListener;\r\n\t\ttarget.on = p.on;\r\n\t\ttarget.removeEventListener = target.off =  p.removeEventListener;\r\n\t\ttarget.removeAllEventListeners = p.removeAllEventListeners;\r\n\t\ttarget.hasEventListener = p.hasEventListener;\r\n\t\ttarget.dispatchEvent = p.dispatchEvent;\r\n\t\ttarget._dispatchEvent = p._dispatchEvent;\r\n\t\ttarget.willTrigger = p.willTrigger;\r\n\t};\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds the specified event listener. Note that adding multiple listeners to the same function will result in\r\n\t * multiple callbacks getting fired.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.addEventListener(\"click\", handleClick);\r\n\t *      function handleClick(event) {\r\n\t *         // Click happened.\r\n\t *      }\r\n\t *\r\n\t * @method addEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function | Object} Returns the listener for chaining or assignment.\r\n\t **/\r\n\tp.addEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners;\r\n\t\tif (useCapture) {\r\n\t\t\tlisteners = this._captureListeners = this._captureListeners||{};\r\n\t\t} else {\r\n\t\t\tlisteners = this._listeners = this._listeners||{};\r\n\t\t}\r\n\t\tvar arr = listeners[type];\r\n\t\tif (arr) { this.removeEventListener(type, listener, useCapture); }\r\n\t\tarr = listeners[type]; // remove may have deleted the array\r\n\t\tif (!arr) { listeners[type] = [listener];  }\r\n\t\telse { arr.push(listener); }\r\n\t\treturn listener;\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\r\n\t * only run once, associate arbitrary data with the listener, and remove the listener.\r\n\t * \r\n\t * This method works by creating an anonymous wrapper function and subscribing it with addEventListener.\r\n\t * The wrapper function is returned for use with `removeEventListener` (or `off`).\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\r\n\t * {{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\r\n\t * to `on` with the same params will create multiple listeners.\r\n\t * \r\n\t * <h4>Example</h4>\r\n\t * \r\n\t * \t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\r\n\t * \t\tfunction handleClick(evt, data) {\r\n\t * \t\t\tdata.count -= 1;\r\n\t * \t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\r\n\t * \t\t\tif (data.count == 0) {\r\n\t * \t\t\t\talert(\"clicked 3 times!\");\r\n\t * \t\t\t\tmyBtn.off(\"click\", listener);\r\n\t * \t\t\t\t// alternately: evt.remove();\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t * \r\n\t * @method on\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Object} [scope] The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).\r\n\t * @param {Boolean} [once=false] If true, the listener will remove itself after the first time it is triggered.\r\n\t * @param {*} [data] Arbitrary data that will be included as the second parameter when the listener is called.\r\n\t * @param {Boolean} [useCapture=false] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function} Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.\r\n\t **/\r\n\tp.on = function(type, listener, scope, once, data, useCapture) {\r\n\t\tif (listener.handleEvent) {\r\n\t\t\tscope = scope||listener;\r\n\t\t\tlistener = listener.handleEvent;\r\n\t\t}\r\n\t\tscope = scope||this;\r\n\t\treturn this.addEventListener(type, function(evt) {\r\n\t\t\t\tlistener.call(scope, evt, data);\r\n\t\t\t\tonce&&evt.remove();\r\n\t\t\t}, useCapture);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified event listener.\r\n\t *\r\n\t * <b>Important Note:</b> that you must pass the exact function reference used when the event was added. If a proxy\r\n\t * function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\r\n\t * closure will not work.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      displayObject.removeEventListener(\"click\", handleClick);\r\n\t *\r\n\t * @method removeEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.removeEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners = useCapture ? this._captureListeners : this._listeners;\r\n\t\tif (!listeners) { return; }\r\n\t\tvar arr = listeners[type];\r\n\t\tif (!arr) { return; }\r\n\t\tfor (var i=0,l=arr.length; i<l; i++) {\r\n\t\t\tif (arr[i] == listener) {\r\n\t\t\t\tif (l==1) { delete(listeners[type]); } // allows for faster checks.\r\n\t\t\t\telse { arr.splice(i,1); }\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the\r\n\t * .on method.\r\n\t * \r\n\t * <b>IMPORTANT:</b> To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \r\n\t * {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.\r\n\t *\r\n\t * @method off\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.off = p.removeEventListener;\r\n\r\n\t/**\r\n\t * Removes all listeners for the specified type, or all listeners of all types.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Remove all listeners\r\n\t *      displayObject.removeAllEventListeners();\r\n\t *\r\n\t *      // Remove all click listeners\r\n\t *      displayObject.removeAllEventListeners(\"click\");\r\n\t *\r\n\t * @method removeAllEventListeners\r\n\t * @param {String} [type] The string type of the event. If omitted, all listeners for all types will be removed.\r\n\t **/\r\n\tp.removeAllEventListeners = function(type) {\r\n\t\tif (!type) { this._listeners = this._captureListeners = null; }\r\n\t\telse {\r\n\t\t\tif (this._listeners) { delete(this._listeners[type]); }\r\n\t\t\tif (this._captureListeners) { delete(this._captureListeners[type]); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the specified event to all listeners.\r\n\t *\r\n\t * <h4>Example</h4>\r\n\t *\r\n\t *      // Use a string event\r\n\t *      this.dispatchEvent(\"complete\");\r\n\t *\r\n\t *      // Use an Event instance\r\n\t *      var event = new createjs.Event(\"progress\");\r\n\t *      this.dispatchEvent(event);\r\n\t *\r\n\t * @method dispatchEvent\r\n\t * @param {Object | String | Event} eventObj An object with a \"type\" property, or a string type.\r\n\t * While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\r\n\t * dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\r\n\t * be used to avoid event object instantiation for non-bubbling events that may not have any listeners.\r\n\t * @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.\r\n\t * @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.\r\n\t * @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.\r\n\t **/\r\n\tp.dispatchEvent = function(eventObj, bubbles, cancelable) {\r\n\t\tif (typeof eventObj == \"string\") {\r\n\t\t\t// skip everything if there's no listeners and it doesn't bubble:\r\n\t\t\tvar listeners = this._listeners;\r\n\t\t\tif (!bubbles && (!listeners || !listeners[eventObj])) { return true; }\r\n\t\t\teventObj = new createjs.Event(eventObj, bubbles, cancelable);\r\n\t\t} else if (eventObj.target && eventObj.clone) {\r\n\t\t\t// redispatching an active event object, so clone it:\r\n\t\t\teventObj = eventObj.clone();\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent\r\n\t\ttry { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events\r\n\r\n\t\tif (!eventObj.bubbles || !this.parent) {\r\n\t\t\tthis._dispatchEvent(eventObj, 2);\r\n\t\t} else {\r\n\t\t\tvar top=this, list=[top];\r\n\t\t\twhile (top.parent) { list.push(top = top.parent); }\r\n\t\t\tvar i, l=list.length;\r\n\r\n\t\t\t// capture & atTarget\r\n\t\t\tfor (i=l-1; i>=0 && !eventObj.propagationStopped; i--) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 1+(i==0));\r\n\t\t\t}\r\n\t\t\t// bubbling\r\n\t\t\tfor (i=1; i<l && !eventObj.propagationStopped; i++) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 3);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !eventObj.defaultPrevented;\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type.\r\n\t * @method hasEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns true if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.hasEventListener = function(type) {\r\n\t\tvar listeners = this._listeners, captureListeners = this._captureListeners;\r\n\t\treturn !!((listeners && listeners[type]) || (captureListeners && captureListeners[type]));\r\n\t};\r\n\t\r\n\t/**\r\n\t * Indicates whether there is at least one listener for the specified event type on this object or any of its\r\n\t * ancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the\r\n\t * specified type is dispatched from this object, it will trigger at least one listener.\r\n\t * \r\n\t * This is similar to {{#crossLink \"EventDispatcher/hasEventListener\"}}{{/crossLink}}, but it searches the entire\r\n\t * event flow for a listener, not just this object.\r\n\t * @method willTrigger\r\n\t * @param {String} type The string type of the event.\r\n\t * @return {Boolean} Returns `true` if there is at least one listener for the specified event.\r\n\t **/\r\n\tp.willTrigger = function(type) {\r\n\t\tvar o = this;\r\n\t\twhile (o) {\r\n\t\t\tif (o.hasEventListener(type)) { return true; }\r\n\t\t\to = o.parent;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[EventDispatcher]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _dispatchEvent\r\n\t * @param {Object | Event} eventObj\r\n\t * @param {Object} eventPhase\r\n\t * @protected\r\n\t **/\r\n\tp._dispatchEvent = function(eventObj, eventPhase) {\r\n\t\tvar l, arr, listeners = (eventPhase <= 2) ? this._captureListeners : this._listeners;\r\n\t\tif (eventObj && listeners && (arr = listeners[eventObj.type]) && (l=arr.length)) {\r\n\t\t\ttry { eventObj.currentTarget = this; } catch (e) {}\r\n\t\t\ttry { eventObj.eventPhase = eventPhase|0; } catch (e) {}\r\n\t\t\teventObj.removed = false;\r\n\t\t\t\r\n\t\t\tarr = arr.slice(); // to avoid issues with items being removed or added during the dispatch\r\n\t\t\tfor (var i=0; i<l && !eventObj.immediatePropagationStopped; i++) {\r\n\t\t\t\tvar o = arr[i];\r\n\t\t\t\tif (o.handleEvent) { o.handleEvent(eventObj); }\r\n\t\t\t\telse { o(eventObj); }\r\n\t\t\t\tif (eventObj.removed) {\r\n\t\t\t\t\tthis.off(eventObj.type, o, eventPhase==1);\r\n\t\t\t\t\teventObj.removed = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (eventPhase === 2) { this._dispatchEvent(eventObj, 2.1); }\r\n\t};\r\n\r\n\r\n\tcreatejs.EventDispatcher = EventDispatcher;\r\n}());\n\n//##############################################################################\n// Ticker.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor:\n\t/**\n\t * The Ticker provides a centralized tick or heartbeat broadcast at a set interval. Listeners can subscribe to the tick\n\t * event to be notified when a set time interval has elapsed.\n\t *\n\t * Note that the interval that the tick event is called is a target interval, and may be broadcast at a slower interval\n\t * when under high CPU load. The Ticker class uses a static interface (ex. `Ticker.framerate = 30;`) and\n\t * can not be instantiated.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      function handleTick(event) {\n\t *          // Actions carried out each tick (aka frame)\n\t *          if (!event.paused) {\n\t *              // Actions carried out when the Ticker is not paused.\n\t *          }\n\t *      }\n\t *\n\t * @class Ticker\n\t * @uses EventDispatcher\n\t * @static\n\t **/\n\tfunction Ticker() {\n\t\tthrow \"Ticker cannot be instantiated.\";\n\t}\n\n\n// constants:\n\t/**\n\t * In this mode, Ticker uses the requestAnimationFrame API, but attempts to synch the ticks to target framerate. It\n\t * uses a simple heuristic that compares the time of the RAF return to the target time for the current frame and\n\t * dispatches the tick when the time is within a certain threshold.\n\t *\n\t * This mode has a higher variance for time between frames than {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}},\n\t * but does not require that content be time based as with {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}} while\n\t * gaining the benefits of that API (screen synch, background throttling).\n\t *\n\t * Variance is usually lowest for framerates that are a divisor of the RAF frequency. This is usually 60, so\n\t * framerates of 10, 12, 15, 20, and 30 work well.\n\t *\n\t * Falls back to {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\n\t * supported.\n\t * @property RAF_SYNCHED\n\t * @static\n\t * @type {String}\n\t * @default \"synched\"\n\t * @readonly\n\t **/\n\tTicker.RAF_SYNCHED = \"synched\";\n\n\t/**\n\t * In this mode, Ticker passes through the requestAnimationFrame heartbeat, ignoring the target framerate completely.\n\t * Because requestAnimationFrame frequency is not deterministic, any content using this mode should be time based.\n\t * You can leverage {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} and the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\n\t * event object's \"delta\" properties to make this easier.\n\t *\n\t * Falls back on {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\n\t * supported.\n\t * @property RAF\n\t * @static\n\t * @type {String}\n\t * @default \"raf\"\n\t * @readonly\n\t **/\n\tTicker.RAF = \"raf\";\n\n\t/**\n\t * In this mode, Ticker uses the setTimeout API. This provides predictable, adaptive frame timing, but does not\n\t * provide the benefits of requestAnimationFrame (screen synch, background throttling).\n\t * @property TIMEOUT\n\t * @static\n\t * @type {String}\n\t * @default \"timeout\"\n\t * @readonly\n\t **/\n\tTicker.TIMEOUT = \"timeout\";\n\n\n// static events:\n\t/**\n\t * Dispatched each tick. The event will be dispatched to each listener even when the Ticker has been paused using\n\t * {{#crossLink \"Ticker/paused:property\"}}{{/crossLink}}.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      function handleTick(event) {\n\t *          console.log(\"Paused:\", event.paused, event.delta);\n\t *      }\n\t *\n\t * @event tick\n\t * @param {Object} target The object that dispatched the event.\n\t * @param {String} type The event type.\n\t * @param {Boolean} paused Indicates whether the ticker is currently paused.\n\t * @param {Number} delta The time elapsed in ms since the last tick.\n\t * @param {Number} time The total time in ms since Ticker was initialized.\n\t * @param {Number} runTime The total time in ms that Ticker was not paused since it was initialized. For example,\n\t * \tyou could determine the amount of time that the Ticker has been paused since initialization with `time-runTime`.\n\t * @since 0.6.0\n\t */\n\n\n// public static properties:\n\t/**\n\t * Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See\n\t * {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}}, {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}}, and\n\t * {{#crossLink \"Ticker/RAF_SYNCHED:property\"}}{{/crossLink}} for mode details.\n\t * @property timingMode\n\t * @static\n\t * @type {String}\n\t * @default Ticker.TIMEOUT\n\t **/\n\tTicker.timingMode = null;\n\n\t/**\n\t * Specifies a maximum value for the delta property in the tick event object. This is useful when building time\n\t * based animations and systems to prevent issues caused by large time gaps caused by background tabs, system sleep,\n\t * alert dialogs, or other blocking routines. Double the expected frame duration is often an effective value\n\t * (ex. maxDelta=50 when running at 40fps).\n\t * \n\t * This does not impact any other values (ex. time, runTime, etc), so you may experience issues if you enable maxDelta\n\t * when using both delta and other values.\n\t * \n\t * If 0, there is no maximum.\n\t * @property maxDelta\n\t * @static\n\t * @type {number}\n\t * @default 0\n\t */\n\tTicker.maxDelta = 0;\n\t\n\t/**\n\t * When the ticker is paused, all listeners will still receive a tick event, but the <code>paused</code> property\n\t * of the event will be `true`. Also, while paused the `runTime` will not increase. See {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}},\n\t * {{#crossLink \"Ticker/getTime\"}}{{/crossLink}}, and {{#crossLink \"Ticker/getEventTime\"}}{{/crossLink}} for more\n\t * info.\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *      createjs.Ticker.addEventListener(\"tick\", handleTick);\n\t *      createjs.Ticker.paused = true;\n\t *      function handleTick(event) {\n\t *          console.log(event.paused,\n\t *          \tcreatejs.Ticker.getTime(false),\n\t *          \tcreatejs.Ticker.getTime(true));\n\t *      }\n\t *\n\t * @property paused\n\t * @static\n\t * @type {Boolean}\n\t * @default false\n\t **/\n\tTicker.paused = false;\n\n\n// mix-ins:\n\t// EventDispatcher methods:\n\tTicker.removeEventListener = null;\n\tTicker.removeAllEventListeners = null;\n\tTicker.dispatchEvent = null;\n\tTicker.hasEventListener = null;\n\tTicker._listeners = null;\n\tcreatejs.EventDispatcher.initialize(Ticker); // inject EventDispatcher methods.\n\tTicker._addEventListener = Ticker.addEventListener;\n\tTicker.addEventListener = function() {\n\t\t!Ticker._inited&&Ticker.init();\n\t\treturn Ticker._addEventListener.apply(Ticker, arguments);\n\t};\n\n\n// private static properties:\n\t/**\n\t * @property _inited\n\t * @static\n\t * @type {Boolean}\n\t * @private\n\t **/\n\tTicker._inited = false;\n\n\t/**\n\t * @property _startTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._startTime = 0;\n\n\t/**\n\t * @property _pausedTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._pausedTime=0;\n\n\t/**\n\t * The number of ticks that have passed\n\t * @property _ticks\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._ticks = 0;\n\n\t/**\n\t * The number of ticks that have passed while Ticker has been paused\n\t * @property _pausedTicks\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._pausedTicks = 0;\n\n\t/**\n\t * @property _interval\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._interval = 50;\n\n\t/**\n\t * @property _lastTime\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._lastTime = 0;\n\n\t/**\n\t * @property _times\n\t * @static\n\t * @type {Array}\n\t * @private\n\t **/\n\tTicker._times = null;\n\n\t/**\n\t * @property _tickTimes\n\t * @static\n\t * @type {Array}\n\t * @private\n\t **/\n\tTicker._tickTimes = null;\n\n\t/**\n\t * Stores the timeout or requestAnimationFrame id.\n\t * @property _timerId\n\t * @static\n\t * @type {Number}\n\t * @private\n\t **/\n\tTicker._timerId = null;\n\t\n\t/**\n\t * True if currently using requestAnimationFrame, false if using setTimeout. This may be different than timingMode\n\t * if that property changed and a tick hasn't fired.\n\t * @property _raf\n\t * @static\n\t * @type {Boolean}\n\t * @private\n\t **/\n\tTicker._raf = true;\n\t\n\n// static getter / setters:\n\t/**\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\n\t * @method _setInterval\n\t * @private\n\t * @static\n\t * @param {Number} interval\n\t **/\n\tTicker._setInterval = function(interval) {\n\t\tTicker._interval = interval;\n\t\tif (!Ticker._inited) { return; }\n\t\tTicker._setupTick();\n\t};\n\t// Ticker.setInterval is @deprecated. Remove for 1.1+\n\tTicker.setInterval = createjs.deprecate(Ticker._setInterval, \"Ticker.setInterval\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\n\t * @method _getInterval\n\t * @private\n\t * @static\n\t * @return {Number}\n\t **/\n\tTicker._getInterval = function() {\n\t\treturn Ticker._interval;\n\t};\n\t// Ticker.getInterval is @deprecated. Remove for 1.1+\n\tTicker.getInterval = createjs.deprecate(Ticker._getInterval, \"Ticker.getInterval\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\n\t * @method _setFPS\n\t * @private\n\t * @static\n\t * @param {Number} value\n\t **/\n\tTicker._setFPS = function(value) {\n\t\tTicker._setInterval(1000/value);\n\t};\n\t// Ticker.setFPS is @deprecated. Remove for 1.1+\n\tTicker.setFPS = createjs.deprecate(Ticker._setFPS, \"Ticker.setFPS\");\n\n\t/**\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\n\t * @method _getFPS\n\t * @static\n\t * @private\n\t * @return {Number}\n\t **/\n\tTicker._getFPS = function() {\n\t\treturn 1000/Ticker._interval;\n\t};\n\t// Ticker.getFPS is @deprecated. Remove for 1.1+\n\tTicker.getFPS = createjs.deprecate(Ticker._getFPS, \"Ticker.getFPS\");\n\n\t/**\n\t * Indicates the target time (in milliseconds) between ticks. Default is 50 (20 FPS).\n\t * Note that actual time between ticks may be more than specified depending on CPU load.\n\t * This property is ignored if the ticker is using the `RAF` timing mode.\n\t * @property interval\n\t * @static\n\t * @type {Number}\n\t **/\n\t \n\t/**\n\t * Indicates the target frame rate in frames per second (FPS). Effectively just a shortcut to `interval`, where\n\t * `framerate == 1000/interval`.\n\t * @property framerate\n\t * @static\n\t * @type {Number}\n\t **/\n\ttry {\n\t\tObject.defineProperties(Ticker, {\n\t\t\tinterval: { get: Ticker._getInterval, set: Ticker._setInterval },\n\t\t\tframerate: { get: Ticker._getFPS, set: Ticker._setFPS }\n\t\t});\n\t} catch (e) { console.log(e); }\n\n\n// public static methods:\n\t/**\n\t * Starts the tick. This is called automatically when the first listener is added.\n\t * @method init\n\t * @static\n\t **/\n\tTicker.init = function() {\n\t\tif (Ticker._inited) { return; }\n\t\tTicker._inited = true;\n\t\tTicker._times = [];\n\t\tTicker._tickTimes = [];\n\t\tTicker._startTime = Ticker._getTime();\n\t\tTicker._times.push(Ticker._lastTime = 0);\n\t\tTicker.interval = Ticker._interval;\n\t};\n\t\n\t/**\n\t * Stops the Ticker and removes all listeners. Use init() to restart the Ticker.\n\t * @method reset\n\t * @static\n\t **/\n\tTicker.reset = function() {\n\t\tif (Ticker._raf) {\n\t\t\tvar f = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;\n\t\t\tf&&f(Ticker._timerId);\n\t\t} else {\n\t\t\tclearTimeout(Ticker._timerId);\n\t\t}\n\t\tTicker.removeAllEventListeners(\"tick\");\n\t\tTicker._timerId = Ticker._times = Ticker._tickTimes = null;\n\t\tTicker._startTime = Ticker._lastTime = Ticker._ticks = Ticker._pausedTime = 0;\n\t\tTicker._inited = false;\n\t};\n\n\t/**\n\t * Returns the average time spent within a tick. This can vary significantly from the value provided by getMeasuredFPS\n\t * because it only measures the time spent within the tick execution stack. \n\t * \n\t * Example 1: With a target FPS of 20, getMeasuredFPS() returns 20fps, which indicates an average of 50ms between \n\t * the end of one tick and the end of the next. However, getMeasuredTickTime() returns 15ms. This indicates that \n\t * there may be up to 35ms of \"idle\" time between the end of one tick and the start of the next.\n\t *\n\t * Example 2: With a target FPS of 30, {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} returns 10fps, which\n\t * indicates an average of 100ms between the end of one tick and the end of the next. However, {{#crossLink \"Ticker/getMeasuredTickTime\"}}{{/crossLink}}\n\t * returns 20ms. This would indicate that something other than the tick is using ~80ms (another script, DOM\n\t * rendering, etc).\n\t * @method getMeasuredTickTime\n\t * @static\n\t * @param {Number} [ticks] The number of previous ticks over which to measure the average time spent in a tick.\n\t * Defaults to the number of ticks per second. To get only the last tick's time, pass in 1.\n\t * @return {Number} The average time spent in a tick in milliseconds.\n\t **/\n\tTicker.getMeasuredTickTime = function(ticks) {\n\t\tvar ttl=0, times=Ticker._tickTimes;\n\t\tif (!times || times.length < 1) { return -1; }\n\n\t\t// by default, calculate average for the past ~1 second:\n\t\tticks = Math.min(times.length, ticks||(Ticker._getFPS()|0));\n\t\tfor (var i=0; i<ticks; i++) { ttl += times[i]; }\n\t\treturn ttl/ticks;\n\t};\n\n\t/**\n\t * Returns the actual frames / ticks per second.\n\t * @method getMeasuredFPS\n\t * @static\n\t * @param {Number} [ticks] The number of previous ticks over which to measure the actual frames / ticks per second.\n\t * Defaults to the number of ticks per second.\n\t * @return {Number} The actual frames / ticks per second. Depending on performance, this may differ\n\t * from the target frames per second.\n\t **/\n\tTicker.getMeasuredFPS = function(ticks) {\n\t\tvar times = Ticker._times;\n\t\tif (!times || times.length < 2) { return -1; }\n\n\t\t// by default, calculate fps for the past ~1 second:\n\t\tticks = Math.min(times.length-1, ticks||(Ticker._getFPS()|0));\n\t\treturn 1000/((times[0]-times[ticks])/ticks);\n\t};\n\n\t/**\n\t * Returns the number of milliseconds that have elapsed since Ticker was initialized via {{#crossLink \"Ticker/init\"}}.\n\t * Returns -1 if Ticker has not been initialized. For example, you could use\n\t * this in a time synchronized animation to determine the exact amount of time that has elapsed.\n\t * @method getTime\n\t * @static\n\t * @param {Boolean} [runTime=false] If true only time elapsed while Ticker was not paused will be returned.\n\t * If false, the value returned will be total time elapsed since the first tick event listener was added.\n\t * @return {Number} Number of milliseconds that have elapsed since Ticker was initialized or -1.\n\t **/\n\tTicker.getTime = function(runTime) {\n\t\treturn Ticker._startTime ? Ticker._getTime() - (runTime ? Ticker._pausedTime : 0) : -1;\n\t};\n\n\t/**\n\t * Similar to the {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} method, but returns the time on the most recent {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\n\t * event object.\n\t * @method getEventTime\n\t * @static\n\t * @param runTime {Boolean} [runTime=false] If true, the runTime property will be returned instead of time.\n\t * @returns {number} The time or runTime property from the most recent tick event or -1.\n\t */\n\tTicker.getEventTime = function(runTime) {\n\t\treturn Ticker._startTime ? (Ticker._lastTime || Ticker._startTime) - (runTime ? Ticker._pausedTime : 0) : -1;\n\t};\n\t\n\t/**\n\t * Returns the number of ticks that have been broadcast by Ticker.\n\t * @method getTicks\n\t * @static\n\t * @param {Boolean} pauseable Indicates whether to include ticks that would have been broadcast\n\t * while Ticker was paused. If true only tick events broadcast while Ticker is not paused will be returned.\n\t * If false, tick events that would have been broadcast while Ticker was paused will be included in the return\n\t * value. The default value is false.\n\t * @return {Number} of ticks that have been broadcast.\n\t **/\n\tTicker.getTicks = function(pauseable) {\n\t\treturn  Ticker._ticks - (pauseable ? Ticker._pausedTicks : 0);\n\t};\n\n\n// private static methods:\n\t/**\n\t * @method _handleSynch\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleSynch = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\n\t\t// run if enough time has elapsed, with a little bit of flexibility to be early:\n\t\tif (Ticker._getTime() - Ticker._lastTime >= (Ticker._interval-1)*0.97) {\n\t\t\tTicker._tick();\n\t\t}\n\t};\n\n\t/**\n\t * @method _handleRAF\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleRAF = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\t\tTicker._tick();\n\t};\n\n\t/**\n\t * @method _handleTimeout\n\t * @static\n\t * @private\n\t **/\n\tTicker._handleTimeout = function() {\n\t\tTicker._timerId = null;\n\t\tTicker._setupTick();\n\t\tTicker._tick();\n\t};\n\n\t/**\n\t * @method _setupTick\n\t * @static\n\t * @private\n\t **/\n\tTicker._setupTick = function() {\n\t\tif (Ticker._timerId != null) { return; } // avoid duplicates\n\n\t\tvar mode = Ticker.timingMode;\n\t\tif (mode == Ticker.RAF_SYNCHED || mode == Ticker.RAF) {\n\t\t\tvar f = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;\n\t\t\tif (f) {\n\t\t\t\tTicker._timerId = f(mode == Ticker.RAF ? Ticker._handleRAF : Ticker._handleSynch);\n\t\t\t\tTicker._raf = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tTicker._raf = false;\n\t\tTicker._timerId = setTimeout(Ticker._handleTimeout, Ticker._interval);\n\t};\n\n\t/**\n\t * @method _tick\n\t * @static\n\t * @private\n\t **/\n\tTicker._tick = function() {\n\t\tvar paused = Ticker.paused;\n\t\tvar time = Ticker._getTime();\n\t\tvar elapsedTime = time-Ticker._lastTime;\n\t\tTicker._lastTime = time;\n\t\tTicker._ticks++;\n\t\t\n\t\tif (paused) {\n\t\t\tTicker._pausedTicks++;\n\t\t\tTicker._pausedTime += elapsedTime;\n\t\t}\n\t\t\n\t\tif (Ticker.hasEventListener(\"tick\")) {\n\t\t\tvar event = new createjs.Event(\"tick\");\n\t\t\tvar maxDelta = Ticker.maxDelta;\n\t\t\tevent.delta = (maxDelta && elapsedTime > maxDelta) ? maxDelta : elapsedTime;\n\t\t\tevent.paused = paused;\n\t\t\tevent.time = time;\n\t\t\tevent.runTime = time-Ticker._pausedTime;\n\t\t\tTicker.dispatchEvent(event);\n\t\t}\n\t\t\n\t\tTicker._tickTimes.unshift(Ticker._getTime()-time);\n\t\twhile (Ticker._tickTimes.length > 100) { Ticker._tickTimes.pop(); }\n\n\t\tTicker._times.unshift(time);\n\t\twhile (Ticker._times.length > 100) { Ticker._times.pop(); }\n\t};\n\n\t/**\n\t * @method _getTime\n\t * @static\n\t * @private\n\t **/\n\tvar w=window, now=w.performance.now || w.performance.mozNow || w.performance.msNow || w.performance.oNow || w.performance.webkitNow;\n\tTicker._getTime = function() {\n\t\treturn ((now&&now.call(w.performance))||(new Date().getTime())) - Ticker._startTime;\n\t};\n\n\n\tcreatejs.Ticker = Ticker;\n}());\n\n//##############################################################################\n// AbstractTween.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor\n\t/**\n\t * Base class that both {{#crossLink \"Tween\"}}{{/crossLink}} and {{#crossLink \"Timeline\"}}{{/crossLink}} extend. Should not be instantiated directly.\n\t * @class AbstractTween\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\n\t * specified.\n\t * @param {boolean} [props.useTicks=false]  See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\n\t * @extends EventDispatcher\n\t * @constructor\n\t */\n\tfunction AbstractTween(props) {\n\t\tthis.EventDispatcher_constructor();\n\t\t\n\t// public properties:\n\t\t/**\n\t\t * Causes this tween to continue playing when a global pause is active. For example, if TweenJS is using {{#crossLink \"Ticker\"}}{{/crossLink}},\n\t\t * then setting this to false (the default) will cause this tween to be paused when `Ticker.paused` is set to\n\t\t * `true`. See the {{#crossLink \"Tween/tick\"}}{{/crossLink}} method for more info. Can be set via the `props`\n\t\t * parameter.\n\t\t * @property ignoreGlobalPause\n\t\t * @type Boolean\n\t\t * @default false\n\t\t */\n\t\tthis.ignoreGlobalPause = false;\n\t\n\t\t/**\n\t\t * Indicates the number of times to loop. If set to -1, the tween will loop continuously.\n\t\t *\n\t\t * Note that a tween must loop at _least_ once to see it play in both directions when `{{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}}`\n\t\t * is set to `true`.\n\t\t * @property loop\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t */\n\t\tthis.loop = 0;\n\t\n\t\t/**\n\t\t * Uses ticks for all durations instead of milliseconds. This also changes the behaviour of some actions (such as `call`).\n\t\t * Changing this value on a running tween could have unexpected results.\n\t\t * @property useTicks\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @readonly\n\t\t */\n\t\tthis.useTicks = false;\n\t\t\n\t\t/**\n\t\t * Causes the tween to play in reverse.\n\t\t * @property reversed\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.reversed = false;\n\t\t\n\t\t/**\n\t\t * Causes the tween to reverse direction at the end of each loop. Each single-direction play-through of the\n\t\t * tween counts as a single bounce. For example, to play a tween once forward, and once back, set the\n\t\t * `{{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}}` to `1`.\n\t\t * @property bounce\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t */\n\t\tthis.bounce = false;\n\t\t\n\t\t/**\n\t\t * Changes the rate at which the tween advances. For example, a `timeScale` value of `2` will double the\n\t\t * playback speed, a value of `0.5` would halve it.\n\t\t * @property timeScale\n\t\t * @type {Number}\n\t\t * @default 1\n\t\t */\n\t\tthis.timeScale = 1;\n\t\n\t\t/**\n\t\t * Indicates the duration of this tween in milliseconds (or ticks if `useTicks` is true), irrespective of `loops`.\n\t\t * This value is automatically updated as you modify the tween. Changing it directly could result in unexpected\n\t\t * behaviour.\n\t\t * @property duration\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @readonly\n\t\t */\n\t\tthis.duration = 0;\n\t\n\t\t/**\n\t\t * The current normalized position of the tween. This will always be a value between 0 and `duration`.\n\t\t * Changing this property directly will have unexpected results, use {{#crossLink \"Tween/setPosition\"}}{{/crossLink}}.\n\t\t * @property position\n\t\t * @type {Object}\n\t\t * @default 0\n\t\t * @readonly\n\t\t */\n\t\tthis.position = 0;\n\t\t\n\t\t/**\n\t\t * The raw tween position. This value will be between `0` and `loops * duration` while the tween is active, or -1 before it activates.\n\t\t * @property rawPosition\n\t\t * @type {Number}\n\t\t * @default -1\n\t\t * @readonly\n\t\t */\n\t\tthis.rawPosition = -1;\n\t\t\n\t\t\n\t// private properties:\n\t\t/**\n\t\t * @property _paused\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @protected\n\t\t */\n\t\tthis._paused = true;\n\t\t\n\t\t/**\n\t\t * @property _next\n\t\t * @type {Tween}\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._next = null;\n\t\t\n\t\t/**\n\t\t * @property _prev\n\t\t * @type {Tween}\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._prev = null;\n\t\t\n\t\t/**\n\t\t * @property _parent\n\t\t * @type {Object}\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._parent = null;\n\n\t\t/**\n\t\t * @property _labels\n\t\t * @type Object\n\t\t * @protected\n\t\t **/\n\t\tthis._labels = null;\n\n\t\t/**\n\t\t * @property _labelList\n\t\t * @type Array[Object]\n\t\t * @protected\n\t\t **/\n\t\tthis._labelList = null;\n\n\t\tif (props) {\n\t\t\tthis.useTicks = !!props.useTicks;\n\t\t\tthis.ignoreGlobalPause = !!props.ignoreGlobalPause;\n\t\t\tthis.loop = props.loop === true ? -1 : (props.loop||0);\n\t\t\tthis.reversed = !!props.reversed;\n\t\t\tthis.bounce = !!props.bounce;\n\t\t\tthis.timeScale = props.timeScale||1;\n\t\t\tprops.onChange && this.addEventListener(\"change\", props.onChange);\n\t\t\tprops.onComplete && this.addEventListener(\"complete\", props.onComplete);\n\t\t}\n\t\t\n\t\t// while `position` is shared, it needs to happen after ALL props are set, so it's handled in _init()\n\t};\n\n\tvar p = createjs.extend(AbstractTween, createjs.EventDispatcher);\n\n// events:\n\t/**\n\t * Dispatched whenever the tween's position changes. It occurs after all tweened properties are updated and actions\n\t * are executed.\n\t * @event change\n\t **/\n\t \n\t/**\n\t * Dispatched when the tween reaches its end and has paused itself. This does not fire until all loops are complete;\n\t * tweens that loop continuously will never fire a complete event.\n\t * @event complete\n\t **/\n\t\n// getter / setters:\n\t\n\t/**\n\t * Use the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} property instead.\n\t * @method _setPaused\n\t * @param {Boolean} [value=true] Indicates whether the tween should be paused (`true`) or played (`false`).\n\t * @return {AbstractTween} This tween instance (for chaining calls)\n\t * @protected\n\t * @chainable\n\t */\n\tp._setPaused = function(value) {\n\t\tcreatejs.Tween._register(this, value);\n\t\treturn this;\n\t};\n\tp.setPaused = createjs.deprecate(p._setPaused, \"AbstractTween.setPaused\");\n\t\n\t/**\n\t * Use the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} property instead.\n\t * @method _getPaused\n\t * @protected\n\t */\n\tp._getPaused = function() {\n\t\treturn this._paused;\n\t};\n\tp.getPaused = createjs.deprecate(p._getPaused, \"AbstactTween.getPaused\");\n\t\n\t/**\n\t * Use the {{#crossLink \"AbstractTween/currentLabel:property\"}}{{/crossLink}} property instead.\n\t * @method _getCurrentLabel\n\t * @protected\n\t * @return {String} The name of the current label or null if there is no label\n\t **/\n\tp._getCurrentLabel = function(pos) {\n\t\tvar labels = this.getLabels();\n\t\tif (pos == null) { pos = this.position; }\n\t\tfor (var i = 0, l = labels.length; i<l; i++) { if (pos < labels[i].position) { break; } }\n\t\treturn (i===0) ? null : labels[i-1].label;\n\t};\n\tp.getCurrentLabel = createjs.deprecate(p._getCurrentLabel, \"AbstractTween.getCurrentLabel\");\n\t\n\t/**\n\t * Pauses or unpauses the tween. A paused tween is removed from the global registry and is eligible for garbage\n\t * collection if no other references to it exist.\n\t * @property paused\n\t * @type Boolean\n\t * @readonly\n\t **/\n\t \n\t/**\n\t * Returns the name of the label on or immediately before the current position. For example, given a tween with\n\t * two labels, \"first\" on frame index 4, and \"second\" on frame 8, `currentLabel` would return:\n\t * <UL>\n\t * \t\t<LI>null if the current position is 2.</LI>\n\t * \t\t<LI>\"first\" if the current position is 4.</LI>\n\t * \t\t<LI>\"first\" if the current position is 7.</LI>\n\t * \t\t<LI>\"second\" if the current position is 15.</LI>\n\t * </UL>\n\t * @property currentLabel\n\t * @type String\n\t * @readonly\n\t **/\n\t \n\ttry {\n\t\tObject.defineProperties(p, {\n\t\t\tpaused: { set: p._setPaused, get: p._getPaused },\n\t\t\tcurrentLabel: { get: p._getCurrentLabel }\n\t\t});\n\t} catch (e) {}\n\n// public methods:\n\t/**\n\t * Advances the tween by a specified amount.\n\t * @method advance\n\t * @param {Number} delta The amount to advance in milliseconds (or ticks if useTicks is true). Negative values are supported.\n\t * @param {Number} [ignoreActions=false] If true, actions will not be executed due to this change in position.\n\t */\n\tp.advance = function(delta, ignoreActions) {\n\t\tthis.setPosition(this.rawPosition+delta*this.timeScale, ignoreActions);\n\t};\n\t\n\t/**\n\t * Advances the tween to a specified position.\n\t * @method setPosition\n\t * @param {Number} rawPosition The raw position to seek to in milliseconds (or ticks if useTicks is true).\n\t * @param {Boolean} [ignoreActions=false] If true, do not run any actions that would be triggered by this operation.\n\t * @param {Boolean} [jump=false] If true, only actions at the new position will be run. If false, actions between the old and new position are run.\n\t * @param {Function} [callback] Primarily for use with MovieClip, this callback is called after properties are updated, but before actions are run.\n\t */\n\tp.setPosition = function(rawPosition, ignoreActions, jump, callback) {\n\t\tvar d=this.duration, loopCount=this.loop, prevRawPos = this.rawPosition;\n\t\tvar loop=0, t=0, end=false;\n\t\t\n\t\t// normalize position:\n\t\tif (rawPosition < 0) { rawPosition = 0; }\n\t\t\n\t\tif (d === 0) {\n\t\t\t// deal with 0 length tweens.\n\t\t\tend = true;\n\t\t\tif (prevRawPos !== -1) { return end; } // we can avoid doing anything else if we're already at 0.\n\t\t} else {\n\t\t\tloop = rawPosition/d|0;\n\t\t\tt = rawPosition-loop*d;\n\t\t\t\n\t\t\tend = (loopCount !== -1 && rawPosition >= loopCount*d+d);\n\t\t\tif (end) { rawPosition = (t=d)*(loop=loopCount)+d; }\n\t\t\tif (rawPosition === prevRawPos) { return end; } // no need to update\n\t\t\t\n\t\t\tvar rev = !this.reversed !== !(this.bounce && loop%2); // current loop is reversed\n\t\t\tif (rev) { t = d-t; }\n\t\t}\n\t\t\n\t\t// set this in advance in case an action modifies position:\n\t\tthis.position = t;\n\t\tthis.rawPosition = rawPosition;\n\t\t\n\t\tthis._updatePosition(jump, end);\n\t\tif (end) { this.paused = true; }\n\t\t\n\t\tcallback&&callback(this);\n\t\t\n\t\tif (!ignoreActions) { this._runActions(prevRawPos, rawPosition, jump, !jump && prevRawPos === -1); }\n\t\t\n\t\tthis.dispatchEvent(\"change\");\n\t\tif (end) { this.dispatchEvent(\"complete\"); }\n\t};\n\t\n\t/**\n\t * Calculates a normalized position based on a raw position. For example, given a tween with a duration of 3000ms set to loop:\n\t * \tconsole.log(myTween.calculatePosition(3700); // 700\n\t * @method calculatePosition\n\t * @param {Number} rawPosition A raw position.\n\t */\n\tp.calculatePosition = function(rawPosition) {\n\t\t// largely duplicated from setPosition, but necessary to avoid having to instantiate generic objects to pass values (end, loop, position) back.\n\t\tvar d=this.duration, loopCount=this.loop, loop=0, t=0;\n\t\t\n\t\tif (d===0) { return 0; }\n\t\tif (loopCount !== -1 && rawPosition >= loopCount*d+d) { t = d; loop = loopCount } // end\n\t\telse if (rawPosition < 0) { t = 0; }\n\t\telse { loop = rawPosition/d|0; t = rawPosition-loop*d;  }\n\t\t\n\t\tvar rev = !this.reversed !== !(this.bounce && loop%2); // current loop is reversed\n\t\treturn rev ? d-t : t;\n\t};\n\t\n\t/**\n\t * Returns a list of the labels defined on this tween sorted by position.\n\t * @method getLabels\n\t * @return {Array[Object]} A sorted array of objects with label and position properties.\n\t **/\n\tp.getLabels = function() {\n\t\tvar list = this._labelList;\n\t\tif (!list) {\n\t\t\tlist = this._labelList = [];\n\t\t\tvar labels = this._labels;\n\t\t\tfor (var n in labels) {\n\t\t\t\tlist.push({label:n, position:labels[n]});\n\t\t\t}\n\t\t\tlist.sort(function (a,b) { return a.position- b.position; });\n\t\t}\n\t\treturn list;\n\t};\n\t\n\n\t/**\n\t * Defines labels for use with gotoAndPlay/Stop. Overwrites any previously set labels.\n\t * @method setLabels\n\t * @param {Object} labels An object defining labels for using {{#crossLink \"Timeline/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Timeline/gotoAndStop\"}}{{/crossLink}}\n\t * in the form `{myLabelName:time}` where time is in milliseconds (or ticks if `useTicks` is `true`).\n\t **/\n\tp.setLabels = function(labels) {\n\t\tthis._labels = labels;\n\t\tthis._labelList = null;\n\t};\n\n\t/**\n\t * Adds a label that can be used with {{#crossLink \"Timeline/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Timeline/gotoAndStop\"}}{{/crossLink}}.\n\t * @method addLabel\n\t * @param {String} label The label name.\n\t * @param {Number} position The position this label represents.\n\t **/\n\tp.addLabel = function(label, position) {\n\t\tif (!this._labels) { this._labels = {}; }\n\t\tthis._labels[label] = position;\n\t\tvar list = this._labelList;\n\t\tif (list) {\n\t\t\tfor (var i= 0,l=list.length; i<l; i++) { if (position < list[i].position) { break; } }\n\t\t\tlist.splice(i, 0, {label:label, position:position});\n\t\t}\n\t};\n\t\n\t/**\n\t * Unpauses this timeline and jumps to the specified position or label.\n\t * @method gotoAndPlay\n\t * @param {String|Number} positionOrLabel The position in milliseconds (or ticks if `useTicks` is `true`)\n\t * or label to jump to.\n\t **/\n\tp.gotoAndPlay = function(positionOrLabel) {\n\t\tthis.paused = false;\n\t\tthis._goto(positionOrLabel);\n\t};\n\n\t/**\n\t * Pauses this timeline and jumps to the specified position or label.\n\t * @method gotoAndStop\n\t * @param {String|Number} positionOrLabel The position in milliseconds (or ticks if `useTicks` is `true`) or label\n\t * to jump to.\n\t **/\n\tp.gotoAndStop = function(positionOrLabel) {\n\t\tthis.paused = true;\n\t\tthis._goto(positionOrLabel);\n\t};\n\t\n\t/**\n\t * If a numeric position is passed, it is returned unchanged. If a string is passed, the position of the\n\t * corresponding frame label will be returned, or `null` if a matching label is not defined.\n\t * @method resolve\n\t * @param {String|Number} positionOrLabel A numeric position value or label string.\n\t **/\n\tp.resolve = function(positionOrLabel) {\n\t\tvar pos = Number(positionOrLabel);\n\t\tif (isNaN(pos)) { pos = this._labels && this._labels[positionOrLabel]; }\n\t\treturn pos;\n\t};\n\t\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t */\n\tp.toString = function() {\n\t\treturn \"[AbstractTween]\";\n\t};\n\n\t/**\n\t * @method clone\n\t * @protected\n\t */\n\tp.clone = function() {\n\t\tthrow(\"AbstractTween can not be cloned.\")\n\t};\n\n\n// private methods:\n\t/**\n\t * Shared logic that executes at the end of the subclass constructor.\n\t * @method _init\n\t * @protected\n\t */\n\tp._init = function(props) {\n\t\tif (!props || !props.paused) { this.paused = false; }\n\t\tif (props&&(props.position!=null)) { this.setPosition(props.position); }\n\t};\n\n\t/**\n\t * @method _updatePosition\n\t * @protected\n\t */\n\tp._updatePosition = function(jump, end) {\n\t\t// abstract.\n\t};\n\t\n\t/**\n\t * @method _goto\n\t * @protected\n\t **/\n\tp._goto = function(positionOrLabel) {\n\t\tvar pos = this.resolve(positionOrLabel);\n\t\tif (pos != null) { this.setPosition(pos, false, true); }\n\t};\n\t\n\t/**\n\t * @method _runActions\n\t * @protected\n\t */\n\tp._runActions = function(startRawPos, endRawPos, jump, includeStart) {\n\t\t// runs actions between startPos & endPos. Separated to support action deferral.\n\t\t\n\t\t//console.log(this.passive === false ? \" > Tween\" : \"Timeline\", \"run\", startRawPos, endRawPos, jump, includeStart);\n\t\t\n\t\t// if we don't have any actions, and we're not a Timeline, then return:\n\t\t// TODO: a cleaner way to handle this would be to override this method in Tween, but I'm not sure it's worth the overhead.\n\t\tif (!this._actionHead && !this.tweens) { return; } \n\t\t\n\t\tvar d=this.duration, reversed=this.reversed, bounce=this.bounce, loopCount=this.loop;\n\t\tvar loop0, loop1, t0, t1;\n\t\t\n\t\tif (d === 0) {\n\t\t\t// deal with 0 length tweens:\n\t\t\tloop0 = loop1 = t0 = t1 = 0;\n\t\t\treversed = bounce = false;\n\t\t} else {\n\t\t\tloop0=startRawPos/d|0;\n\t\t\tloop1=endRawPos/d|0;\n\t\t\tt0=startRawPos-loop0*d;\n\t\t\tt1=endRawPos-loop1*d;\n\t\t}\n\t\t\n\t\t// catch positions that are past the end:\n\t\tif (loopCount !== -1) {\n\t\t\tif (loop1 > loopCount) { t1=d; loop1=loopCount; }\n\t\t\tif (loop0 > loopCount) { t0=d; loop0=loopCount; }\n\t\t}\n\t\t\n\t\t// special cases:\n\t\tif (jump) { return this._runActionsRange(t1, t1, jump, includeStart); } // jump.\n\t\telse if (loop0 === loop1 && t0 === t1 && !jump && !includeStart) { return; } // no actions if the position is identical and we aren't including the start\n\t\telse if (loop0 === -1) { loop0 = t0 = 0; } // correct the -1 value for first advance, important with useTicks.\n\t\t\n\t\tvar dir = (startRawPos <= endRawPos), loop = loop0;\n\t\tdo {\n\t\t\tvar rev = !reversed !== !(bounce && loop % 2);\n\n\t\t\tvar start = (loop === loop0) ? t0 : dir ? 0 : d;\n\t\t\tvar end = (loop === loop1) ? t1 : dir ? d : 0;\n\t\t\t\n\t\t\tif (rev) {\n\t\t\t\tstart = d - start;\n\t\t\t\tend = d - end;\n\t\t\t}\n\t\t\t\n\t\t\tif (bounce && loop !== loop0 && start === end) { /* bounced onto the same time/frame, don't re-execute end actions */ }\n\t\t\telse if (this._runActionsRange(start, end, jump, includeStart || (loop !== loop0 && !bounce))) { return true; }\n\t\t\t\t\n\t\t\tincludeStart = false;\n\t\t} while ((dir && ++loop <= loop1) || (!dir && --loop >= loop1));\n\t};\n\t\n\tp._runActionsRange = function(startPos, endPos, jump, includeStart) {\n\t\t// abstract\n\t};\n\n\tcreatejs.AbstractTween = createjs.promote(AbstractTween, \"EventDispatcher\");\n}());\n\n//##############################################################################\n// Tween.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\n// constructor\n\t/**\n\t * Tweens properties for a single target. Methods can be chained to create complex animation sequences:\n\t *\n\t * <h4>Example</h4>\n\t *\n\t *\tcreatejs.Tween.get(target)\n\t *\t\t.wait(500)\n\t *\t\t.to({alpha:0, visible:false}, 1000)\n\t *\t\t.call(handleComplete);\n\t *\n\t * Multiple tweens can share a target, however if they affect the same properties there could be unexpected\n\t * behaviour. To stop all tweens on an object, use {{#crossLink \"Tween/removeTweens\"}}{{/crossLink}} or pass `override:true`\n\t * in the props argument.\n\t *\n\t * \tcreatejs.Tween.get(target, {override:true}).to({x:100});\n\t *\n\t * Subscribe to the {{#crossLink \"Tween/change:event\"}}{{/crossLink}} event to be notified when the tween position changes.\n\t *\n\t * \tcreatejs.Tween.get(target, {override:true}).to({x:100}).addEventListener(\"change\", handleChange);\n\t * \tfunction handleChange(event) {\n\t * \t\t// The tween changed.\n\t * \t}\n\t *\n\t * See the {{#crossLink \"Tween/get\"}}{{/crossLink}} method also.\n\t * @class Tween\n\t * @param {Object} target The target object that will have its properties tweened.\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\n\t * specified.\n\t * @param {boolean} [props.useTicks=false]  See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\n\t * @param {object} [props.pluginData] See the {{#crossLink \"Tween/pluginData:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.paused=false] See the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} for more information.\n\t * @param {number} [props.position=0] The initial position for this tween. See {{#crossLink \"AbstractTween/position:property\"}}{{/crossLink}}\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\n\t * @param {boolean} [props.override=false] Removes all existing tweens for the target when set to `true`.\n\t * </UL>\n\t * @extends AbstractTween\n\t * @constructor\n\t */\n\tfunction Tween(target, props) {\n\t\tthis.AbstractTween_constructor(props);\n\t\t\n\t// public properties:\n\t\n\t\t/**\n\t\t * Allows you to specify data that will be used by installed plugins. Each plugin uses this differently, but in general\n\t\t * you specify data by assigning it to a property of `pluginData` with the same name as the plugin.\n\t\t * Note that in many cases, this data is used as soon as the plugin initializes itself for the tween.\n\t\t * As such, this data should be set before the first `to` call in most cases.\n\t\t * @example\n\t\t *\tmyTween.pluginData.SmartRotation = data;\n\t\t * \n\t\t * Most plugins also support a property to disable them for a specific tween. This is typically the plugin name followed by \"_disabled\".\n\t\t * @example\n\t\t *\tmyTween.pluginData.SmartRotation_disabled = true;\n\t\t * \n\t\t * Some plugins also store working data in this object, usually in a property named `_PluginClassName`.\n\t\t * See the documentation for individual plugins for more details.\n\t\t * @property pluginData\n\t\t * @type {Object}\n\t\t */\n\t\tthis.pluginData = null;\n\t\n\t\t/**\n\t\t * The target of this tween. This is the object on which the tweened properties will be changed.\n\t\t * @property target\n\t\t * @type {Object}\n\t\t * @readonly\n\t\t */\n\t\tthis.target = target;\n\t\n\t\t/**\n\t\t * Indicates the tween's current position is within a passive wait.\n\t\t * @property passive\n\t\t * @type {Boolean}\n\t\t * @default false\n\t\t * @readonly\n\t\t **/\n\t\tthis.passive = false;\n\t\t\n\t\t\n\t// private properties:\n\t\n\t\t/**\n\t\t * @property _stepHead\n\t\t * @type {TweenStep}\n\t\t * @protected\n\t\t */\n\t\tthis._stepHead = new TweenStep(null, 0, 0, {}, null, true);\n\t\t\n\t\t/**\n\t\t * @property _stepTail\n\t\t * @type {TweenStep}\n\t\t * @protected\n\t\t */\n\t\tthis._stepTail = this._stepHead;\n\t\t\n\t\t/**\n\t\t * The position within the current step. Used by MovieClip.\n\t\t * @property _stepPosition\n\t\t * @type {Number}\n\t\t * @default 0\n\t\t * @protected\n\t\t */\n\t\tthis._stepPosition = 0;\n\t\t\n\t\t/**\n\t\t * @property _actionHead\n\t\t * @type {TweenAction}\n\t\t * @protected\n\t\t */\n\t\tthis._actionHead = null;\n\t\t\n\t\t/**\n\t\t * @property _actionTail\n\t\t * @type {TweenAction}\n\t\t * @protected\n\t\t */\n\t\tthis._actionTail = null;\n\t\t\n\t\t/**\n\t\t * Plugins added to this tween instance.\n\t\t * @property _plugins\n\t\t * @type Array[Object]\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._plugins = null;\n\t\t\n\t\t/**\n\t\t * Hash for quickly looking up added plugins. Null until a plugin is added.\n\t\t * @property _plugins\n\t\t * @type Object\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._pluginIds = null;\n\t\t\n\t\t/**\n\t\t * Used by plugins to inject new properties.\n\t\t * @property _injected\n\t\t * @type {Object}\n\t\t * @default null\n\t\t * @protected\n\t\t */\n\t\tthis._injected = null;\n\n\t\tif (props) {\n\t\t\tthis.pluginData = props.pluginData;\n\t\t\tif (props.override) { Tween.removeTweens(target); }\n\t\t}\n\t\tif (!this.pluginData) { this.pluginData = {}; }\n\t\t\n\t\tthis._init(props);\n\t};\n\n\tvar p = createjs.extend(Tween, createjs.AbstractTween);\n\n// static properties\n\n\t/**\n\t * Constant returned by plugins to tell the tween not to use default assignment.\n\t * @property IGNORE\n\t * @type Object\n\t * @static\n\t */\n\tTween.IGNORE = {};\n\n\t/**\n\t * @property _listeners\n\t * @type Array[Tween]\n\t * @static\n\t * @protected\n\t */\n\tTween._tweens = [];\n\n\t/**\n\t * @property _plugins\n\t * @type Object\n\t * @static\n\t * @protected\n\t */\n\tTween._plugins = null;\n\t\n\t/**\n\t * @property _tweenHead\n\t * @type Tween\n\t * @static\n\t * @protected\n\t */\n\tTween._tweenHead = null;\n\t\n\t/**\n\t * @property _tweenTail\n\t * @type Tween\n\t * @static\n\t * @protected\n\t */\n\tTween._tweenTail = null;\n\n\n// static methods\t\n\t/**\n\t * Returns a new tween instance. This is functionally identical to using `new Tween(...)`, but may look cleaner\n\t * with the chained syntax of TweenJS.\n\t * <h4>Example</h4>\n\t *\n\t *\tvar tween = createjs.Tween.get(target).to({x:100}, 500);\n\t *\t// equivalent to:\n\t *\tvar tween = new createjs.Tween(target).to({x:100}, 500);\n\t *\n\t * @method get\n\t * @param {Object} target The target object that will have its properties tweened.\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\n\t * specified.\n\t * @param {boolean} [props.useTicks=false]  See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\n\t * @param {object} [props.pluginData] See the {{#crossLink \"Tween/pluginData:property\"}}{{/crossLink}} for more information.\n\t * @param {boolean} [props.paused=false] See the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} for more information.\n\t * @param {number} [props.position=0] The initial position for this tween. See {{#crossLink \"AbstractTween/position:property\"}}{{/crossLink}}\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\n\t * @param {boolean} [props.override=false] Removes all existing tweens for the target when set to `true`.\n\t * @return {Tween} A reference to the created tween.\n\t * @static\n\t */\n\tTween.get = function(target, props) {\n\t\treturn new Tween(target, props);\n\t};\n\n\t/**\n\t * Advances all tweens. This typically uses the {{#crossLink \"Ticker\"}}{{/crossLink}} class, but you can call it\n\t * manually if you prefer to use your own \"heartbeat\" implementation.\n\t * @method tick\n\t * @param {Number} delta The change in time in milliseconds since the last tick. Required unless all tweens have\n\t * `useTicks` set to true.\n\t * @param {Boolean} paused Indicates whether a global pause is in effect. Tweens with {{#crossLink \"Tween/ignoreGlobalPause:property\"}}{{/crossLink}}\n\t * will ignore this, but all others will pause if this is `true`.\n\t * @static\n\t */\n\tTween.tick = function(delta, paused) {\n\t\tvar tween = Tween._tweenHead;\n\t\twhile (tween) {\n\t\t\tvar next = tween._next; // in case it completes and wipes its _next property\n\t\t\tif ((paused && !tween.ignoreGlobalPause) || tween._paused) { /* paused */ }\n\t\t\telse { tween.advance(tween.useTicks?1:delta); }\n\t\t\ttween = next;\n\t\t}\n\t};\n\n\t/**\n\t * Handle events that result from Tween being used as an event handler. This is included to allow Tween to handle\n\t * {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}} events from the createjs {{#crossLink \"Ticker\"}}{{/crossLink}}.\n\t * No other events are handled in Tween.\n\t * @method handleEvent\n\t * @param {Object} event An event object passed in by the {{#crossLink \"EventDispatcher\"}}{{/crossLink}}. Will\n\t * usually be of type \"tick\".\n\t * @private\n\t * @static\n\t * @since 0.4.2\n\t */\n\tTween.handleEvent = function(event) {\n\t\tif (event.type === \"tick\") {\n\t\t\tthis.tick(event.delta, event.paused);\n\t\t}\n\t};\n\n\t/**\n\t * Removes all existing tweens for a target. This is called automatically by new tweens if the `override`\n\t * property is `true`.\n\t * @method removeTweens\n\t * @param {Object} target The target object to remove existing tweens from.\n\t * @static\n\t */\n\tTween.removeTweens = function(target) {\n\t\tif (!target.tweenjs_count) { return; }\n\t\tvar tween = Tween._tweenHead;\n\t\twhile (tween) {\n\t\t\tvar next = tween._next;\n\t\t\tif (tween.target === target) { Tween._register(tween, true); }\n\t\t\ttween = next;\n\t\t}\n\t\ttarget.tweenjs_count = 0;\n\t};\n\n\t/**\n\t * Stop and remove all existing tweens.\n\t * @method removeAllTweens\n\t * @static\n\t * @since 0.4.1\n\t */\n\tTween.removeAllTweens = function() {\n\t\tvar tween = Tween._tweenHead;\n\t\twhile (tween) {\n\t\t\tvar next = tween._next;\n\t\t\ttween._paused = true;\n\t\t\ttween.target&&(tween.target.tweenjs_count = 0);\n\t\t\ttween._next = tween._prev = null;\n\t\t\ttween = next;\n\t\t}\n\t\tTween._tweenHead = Tween._tweenTail = null;\n\t};\n\n\t/**\n\t * Indicates whether there are any active tweens on the target object (if specified) or in general.\n\t * @method hasActiveTweens\n\t * @param {Object} [target] The target to check for active tweens. If not specified, the return value will indicate\n\t * if there are any active tweens on any target.\n\t * @return {Boolean} Indicates if there are active tweens.\n\t * @static\n\t */\n\tTween.hasActiveTweens = function(target) {\n\t\tif (target) { return !!target.tweenjs_count; }\n\t\treturn !!Tween._tweenHead;\n\t};\n\n\t/**\n\t * Installs a plugin, which can modify how certain properties are handled when tweened. See the {{#crossLink \"SamplePlugin\"}}{{/crossLink}}\n\t * for an example of how to write TweenJS plugins. Plugins should generally be installed via their own `install` method, in order to provide\n\t * the plugin with an opportunity to configure itself.\n\t * @method _installPlugin\n\t * @param {Object} plugin The plugin to install\n\t * @static\n\t * @protected\n\t */\n\tTween._installPlugin = function(plugin) {\n\t\tvar priority = (plugin.priority = plugin.priority||0), arr = (Tween._plugins = Tween._plugins || []);\n\t\tfor (var i=0,l=arr.length;i<l;i++) {\n\t\t\tif (priority < arr[i].priority) { break; }\n\t\t}\n\t\tarr.splice(i,0,plugin);\n\t};\n\n\t/**\n\t * Registers or unregisters a tween with the ticking system.\n\t * @method _register\n\t * @param {Tween} tween The tween instance to register or unregister.\n\t * @param {Boolean} paused If `false`, the tween is registered. If `true` the tween is unregistered.\n\t * @static\n\t * @protected\n\t */\n\tTween._register = function(tween, paused) {\n\t\tvar target = tween.target;\n\t\tif (!paused && tween._paused) {\n\t\t\t// TODO: this approach might fail if a dev is using sealed objects\n\t\t\tif (target) { target.tweenjs_count = target.tweenjs_count ? target.tweenjs_count+1 : 1; }\n\t\t\tvar tail = Tween._tweenTail;\n\t\t\tif (!tail) { Tween._tweenHead = Tween._tweenTail = tween; }\n\t\t\telse {\n\t\t\t\tTween._tweenTail = tail._next = tween;\n\t\t\t\ttween._prev = tail;\n\t\t\t}\n\t\t\tif (!Tween._inited && createjs.Ticker) { createjs.Ticker.addEventListener(\"tick\", Tween); Tween._inited = true; }\n\t\t} else if (paused && !tween._paused) {\n\t\t\tif (target) { target.tweenjs_count--; }\n\t\t\tvar next = tween._next, prev = tween._prev;\n\t\t\t\n\t\t\tif (next) { next._prev = prev; }\n\t\t\telse { Tween._tweenTail = prev; } // was tail\n\t\t\tif (prev) { prev._next = next; }\n\t\t\telse { Tween._tweenHead = next; } // was head.\n\t\t\t\n\t\t\ttween._next = tween._prev = null;\n\t\t}\n\t\ttween._paused = paused;\n\t};\n\n\n// events:\n\n// public methods:\n\t/**\n\t * Adds a wait (essentially an empty tween).\n\t * <h4>Example</h4>\n\t *\n\t *\t//This tween will wait 1s before alpha is faded to 0.\n\t *\tcreatejs.Tween.get(target).wait(1000).to({alpha:0}, 1000);\n\t *\n\t * @method wait\n\t * @param {Number} duration The duration of the wait in milliseconds (or in ticks if `useTicks` is true).\n\t * @param {Boolean} [passive=false] Tween properties will not be updated during a passive wait. This\n\t * is mostly useful for use with {{#crossLink \"Timeline\"}}{{/crossLink}} instances that contain multiple tweens\n\t * affecting the same target at different times.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t **/\n\tp.wait = function(duration, passive) {\n\t\tif (duration > 0) { this._addStep(+duration, this._stepTail.props, null, passive); }\n\t\treturn this;\n\t};\n\n\t/**\n\t * Adds a tween from the current values to the specified properties. Set duration to 0 to jump to these value.\n\t * Numeric properties will be tweened from their current value in the tween to the target value. Non-numeric\n\t * properties will be set at the end of the specified duration.\n\t * <h4>Example</h4>\n\t *\n\t *\tcreatejs.Tween.get(target).to({alpha:0, visible:false}, 1000);\n\t *\n\t * @method to\n\t * @param {Object} props An object specifying property target values for this tween (Ex. `{x:300}` would tween the x\n\t * property of the target to 300).\n\t * @param {Number} [duration=0] The duration of the tween in milliseconds (or in ticks if `useTicks` is true).\n\t * @param {Function} [ease=\"linear\"] The easing function to use for this tween. See the {{#crossLink \"Ease\"}}{{/crossLink}}\n\t * class for a list of built-in ease functions.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t */\n\tp.to = function(props, duration, ease) {\n\t\tif (duration == null || duration < 0) { duration = 0; }\n\t\tvar step = this._addStep(+duration, null, ease);\n\t\tthis._appendProps(props, step);\n\t\treturn this;\n\t};\n\t\n\t/**\n\t * Adds a label that can be used with {{#crossLink \"Tween/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Tween/gotoAndStop\"}}{{/crossLink}}\n\t * at the current point in the tween. For example:\n\t * \n\t * \tvar tween = createjs.Tween.get(foo)\n\t * \t\t\t\t\t.to({x:100}, 1000)\n\t * \t\t\t\t\t.label(\"myLabel\")\n\t * \t\t\t\t\t.to({x:200}, 1000);\n\t * // ...\n\t * tween.gotoAndPlay(\"myLabel\"); // would play from 1000ms in.\n\t * \n\t * @method addLabel\n\t * @param {String} label The label name.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t **/\n\tp.label = function(name) {\n\t\tthis.addLabel(name, this.duration);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Adds an action to call the specified function.\n\t * <h4>Example</h4>\n\t *\n\t * \t//would call myFunction() after 1 second.\n\t * \tcreatejs.Tween.get().wait(1000).call(myFunction);\n\t *\n\t * @method call\n\t * @param {Function} callback The function to call.\n\t * @param {Array} [params]. The parameters to call the function with. If this is omitted, then the function\n\t * will be called with a single param pointing to this tween.\n\t * @param {Object} [scope]. The scope to call the function in. If omitted, it will be called in the target's scope.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t */\n\tp.call = function(callback, params, scope) {\n\t\treturn this._addAction(scope||this.target, callback, params||[this]);\n\t};\n\n\t/**\n\t * Adds an action to set the specified props on the specified target. If `target` is null, it will use this tween's\n\t * target. Note that for properties on the target object, you should consider using a zero duration {{#crossLink \"Tween/to\"}}{{/crossLink}}\n\t * operation instead so the values are registered as tweened props.\n\t * <h4>Example</h4>\n\t *\n\t *\tmyTween.wait(1000).set({visible:false}, foo);\n\t *\n\t * @method set\n\t * @param {Object} props The properties to set (ex. `{visible:false}`).\n\t * @param {Object} [target] The target to set the properties on. If omitted, they will be set on the tween's target.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t */\n\tp.set = function(props, target) {\n\t\treturn this._addAction(target||this.target, this._set, [props]);\n\t};\n\n\t/**\n\t * Adds an action to play (unpause) the specified tween. This enables you to sequence multiple tweens.\n\t * <h4>Example</h4>\n\t *\n\t *\tmyTween.to({x:100}, 500).play(otherTween);\n\t *\n\t * @method play\n\t * @param {Tween} [tween] The tween to play. Defaults to this tween.\n\t * @return {Tween} This tween instance (for chaining calls).\n\t * @chainable\n\t */\n\tp.play = function(tween) {\n\t\treturn this._addAction(tween||this, this._set, [{paused:false}]);\n\t};\n\n\t/**\n\t * Adds an action to pause the specified tween.\n\t * \n\t * \tmyTween.pause(otherTween).to({alpha:1}, 1000).play(otherTween);\n\t * \n\t * Note that this executes at the end of a tween update, so the tween may advance beyond the time the pause\n\t * action was inserted at. For example:\n\t * \n\t * myTween.to({foo:0}, 1000).pause().to({foo:1}, 1000);\n\t * \n\t * At 60fps the tween will advance by ~16ms per tick, if the tween above was at 999ms prior to the current tick, it\n\t * will advance to 1015ms (15ms into the second \"step\") and then pause.\n\t * \n\t * @method pause\n\t * @param {Tween} [tween] The tween to pause. Defaults to this tween.\n\t * @return {Tween} This tween instance (for chaining calls)\n\t * @chainable\n\t */\n\tp.pause = function(tween) {\n\t\treturn this._addAction(tween||this, this._set, [{paused:true}]);\n\t};\n\n\t// tiny api (primarily for tool output):\n\tp.w = p.wait;\n\tp.t = p.to;\n\tp.c = p.call;\n\tp.s = p.set;\n\n\t/**\n\t * Returns a string representation of this object.\n\t * @method toString\n\t * @return {String} a string representation of the instance.\n\t */\n\tp.toString = function() {\n\t\treturn \"[Tween]\";\n\t};\n\n\t/**\n\t * @method clone\n\t * @protected\n\t */\n\tp.clone = function() {\n\t\tthrow(\"Tween can not be cloned.\")\n\t};\n\n\n// private methods:\n\t/**\n\t * Adds a plugin to this tween.\n\t * @method _addPlugin\n\t * @param {Object} plugin\n\t * @protected\n\t */\n\tp._addPlugin = function(plugin) {\n\t\tvar ids = this._pluginIds || (this._pluginIds = {}), id = plugin.ID;\n\t\tif (!id || ids[id]) { return; } // already added\n\t\t\n\t\tids[id] = true;\n\t\tvar plugins = this._plugins || (this._plugins = []), priority = plugin.priority || 0;\n\t\tfor (var i=0,l=plugins.length; i<l; i++) {\n\t\t\tif (priority < plugins[i].priority) {\n\t\t\t\tplugins.splice(i,0,plugin);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplugins.push(plugin);\n\t};\n\t\n\t// Docced in AbstractTween\n\tp._updatePosition = function(jump, end) {\n\t\tvar step = this._stepHead.next, t=this.position, d=this.duration;\n\t\tif (this.target && step) {\n\t\t\t// find our new step index:\n\t\t\tvar stepNext = step.next;\n\t\t\twhile (stepNext && stepNext.t <= t) { step = step.next; stepNext = step.next; }\n\t\t\tvar ratio = end ? d === 0 ? 1 : t/d : (t-step.t)/step.d; // TODO: revisit this.\n\t\t\tthis._updateTargetProps(step, ratio, end);\n\t\t}\n\t\tthis._stepPosition = step ? t-step.t : 0;\n\t};\n\t\n\t/**\n\t * @method _updateTargetProps\n\t * @param {Object} step\n\t * @param {Number} ratio\n\t * @param {Boolean} end Indicates to plugins that the full tween has ended.\n\t * @protected\n\t */\n\tp._updateTargetProps = function(step, ratio, end) {\n\t\tif (this.passive = !!step.passive) { return; } // don't update props.\n\t\t\n\t\tvar v, v0, v1, ease;\n\t\tvar p0 = step.prev.props;\n\t\tvar p1 = step.props;\n\t\tif (ease = step.ease) { ratio = ease(ratio,0,1,1); }\n\t\t\n\t\tvar plugins = this._plugins;\n\t\tproploop : for (var n in p0) {\n\t\t\tv0 = p0[n];\n\t\t\tv1 = p1[n];\n\t\t\t\n\t\t\t// values are different & it is numeric then interpolate:\n\t\t\tif (v0 !== v1 && (typeof(v0) === \"number\")) {\n\t\t\t\tv = v0+(v1-v0)*ratio;\n\t\t\t} else {\n\t\t\t\tv = ratio >= 1 ? v1 : v0;\n\t\t\t}\n\t\t\t\n\t\t\tif (plugins) {\n\t\t\t\tfor (var i=0,l=plugins.length;i<l;i++) {\n\t\t\t\t\tvar value = plugins[i].change(this, step, n, v, ratio, end);\n\t\t\t\t\tif (value === Tween.IGNORE) { continue proploop; }\n\t\t\t\t\tif (value !== undefined) { v = value; }\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.target[n] = v;\n\t\t}\n\n\t};\n\t\n\t/**\n\t * @method _runActionsRange\n\t * @param {Number} startPos\n\t * @param {Number} endPos\n\t * @param {Boolean} includeStart\n\t * @protected\n\t */\n\tp._runActionsRange = function(startPos, endPos, jump, includeStart) {\n\t\tvar rev = startPos > endPos;\n\t\tvar action = rev ? this._actionTail : this._actionHead;\n\t\tvar ePos = endPos, sPos = startPos;\n\t\tif (rev) { ePos=startPos; sPos=endPos; }\n\t\tvar t = this.position;\n\t\twhile (action) {\n\t\t\tvar pos = action.t;\n\t\t\tif (pos === endPos || (pos > sPos && pos < ePos) || (includeStart && pos === startPos)) {\n\t\t\t\taction.funct.apply(action.scope, action.params);\n\t\t\t\tif (t !== this.position) { return true; }\n\t\t\t}\n\t\t\taction = rev ? action.prev : action.next;\n\t\t}\n\t};\n\n\t/**\n\t * @method _appendProps\n\t * @param {Object} props\n\t * @protected\n\t */\n\tp._appendProps = function(props, step, stepPlugins) {\n\t\tvar initProps = this._stepHead.props, target = this.target, plugins = Tween._plugins;\n\t\tvar n, i, value, initValue, inject;\n\t\tvar oldStep = step.prev, oldProps = oldStep.props;\n\t\tvar stepProps = step.props || (step.props = this._cloneProps(oldProps));\n\t\tvar cleanProps = {}; // TODO: is there some way to avoid this additional object?\n\n\t\tfor (n in props) {\n\t\t\tif (!props.hasOwnProperty(n)) { continue; }\n\t\t\tcleanProps[n] = stepProps[n] = props[n];\n\n\t\t\tif (initProps[n] !== undefined) { continue; }\n\n\t\t\tinitValue = undefined; // accessing missing properties on DOMElements when using CSSPlugin is INSANELY expensive, so we let the plugin take a first swing at it.\n\t\t\tif (plugins) {\n\t\t\t\tfor (i = plugins.length-1; i >= 0; i--) {\n\t\t\t\t\tvalue = plugins[i].init(this, n, initValue);\n\t\t\t\t\tif (value !== undefined) { initValue = value; }\n\t\t\t\t\tif (initValue === Tween.IGNORE) {\n\t\t\t\t\t\tdelete(stepProps[n]);\n\t\t\t\t\t\tdelete(cleanProps[n]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (initValue !== Tween.IGNORE) {\n\t\t\t\tif (initValue === undefined) { initValue = target[n]; }\n\t\t\t\toldProps[n] = (initValue === undefined) ? null : initValue;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (n in cleanProps) {\n\t\t\tvalue = props[n];\n\n\t\t\t// propagate old value to previous steps:\n\t\t\tvar o, prev=oldStep;\n\t\t\twhile ((o = prev) && (prev = o.prev)) {\n\t\t\t\tif (prev.props === o.props) { continue; } // wait step\n\t\t\t\tif (prev.props[n] !== undefined) { break; } // already has a value, we're done.\n\t\t\t\tprev.props[n] = oldProps[n];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (stepPlugins !== false && (plugins = this._plugins)) {\n\t\t\tfor (i = plugins.length-1; i >= 0; i--) {\n\t\t\t\tplugins[i].step(this, step, cleanProps);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (inject = this._injected) {\n\t\t\tthis._injected = null;\n\t\t\tthis._appendProps(inject, step, false);\n\t\t}\n\t};\n\t\n\t/**\n\t * Used by plugins to inject properties onto the current step. Called from within `Plugin.step` calls.\n\t * For example, a plugin dealing with color, could read a hex color, and inject red, green, and blue props into the tween.\n\t * See the SamplePlugin for more info.\n\t * @method _injectProp\n\t * @param {String} name\n\t * @param {Object} value\n\t * @protected\n\t */\n\tp._injectProp = function(name, value) {\n\t\tvar o = this._injected || (this._injected = {});\n\t\to[name] = value;\n\t};\n\n\t/**\n\t * @method _addStep\n\t * @param {Number} duration\n\t * @param {Object} props\n\t * @param {Function} ease\n\t * @param {Boolean} passive\n\t * @protected\n\t */\n\tp._addStep = function(duration, props, ease, passive) {\n\t\tvar step = new TweenStep(this._stepTail, this.duration, duration, props, ease, passive||false);\n\t\tthis.duration += duration;\n\t\treturn this._stepTail = (this._stepTail.next = step);\n\t};\n\n\t/**\n\t * @method _addAction\n\t * @param {Object} scope\n\t * @param {Function} funct\n\t * @param {Array} params\n\t * @protected\n\t */\n\tp._addAction = function(scope, funct, params) {\n\t\tvar action = new TweenAction(this._actionTail, this.duration, scope, funct, params);\n\t\tif (this._actionTail) { this._actionTail.next = action; }\n\t\telse { this._actionHead = action; }\n\t\tthis._actionTail = action;\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method _set\n\t * @param {Object} props\n\t * @protected\n\t */\n\tp._set = function(props) {\n\t\tfor (var n in props) {\n\t\t\tthis[n] = props[n];\n\t\t}\n\t};\n\n\t/**\n\t * @method _cloneProps\n\t * @param {Object} props\n\t * @protected\n\t */\n\tp._cloneProps = function(props) {\n\t\tvar o = {};\n\t\tfor (var n in props) { o[n] = props[n]; }\n\t\treturn o;\n\t};\n\n\tcreatejs.Tween = createjs.promote(Tween, \"AbstractTween\");\n\t\n\tfunction TweenStep(prev, t, d, props, ease, passive) {\n\t\tthis.next = null;\n\t\tthis.prev = prev;\n\t\tthis.t = t;\n\t\tthis.d = d;\n\t\tthis.props = props;\n\t\tthis.ease = ease;\n\t\tthis.passive = passive;\n\t\tthis.index = prev ? prev.index+1 : 0;\n\t};\n\t\n\tfunction TweenAction(prev, t, scope, funct, params) {\n\t\tthis.next = null;\n\t\tthis.prev = prev;\n\t\tthis.t = t;\n\t\tthis.d = 0;\n\t\tthis.scope = scope;\n\t\tthis.funct = funct;\n\t\tthis.params = params;\n\t};\n}());\n\n//##############################################################################\n// Timeline.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n\n(function() {\n\t\"use strict\";\n\t\n\n// constructor\t\n\t/**\n\t * The Timeline class synchronizes multiple tweens and allows them to be controlled as a group. Please note that if a\n\t * timeline is looping, the tweens on it may appear to loop even if the \"loop\" property of the tween is false.\n\t * \n\t * NOTE: Timeline currently also accepts a param list in the form: `tweens, labels, props`. This is for backwards\n\t * compatibility only and will be removed in the future. Include tweens and labels as properties on the props object.\n\t * @class Timeline\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\n\t * specified.<UL>\n\t *    <LI> `useTicks`</LI>\n\t *    <LI> `ignoreGlobalPause`</LI>\n\t *    <LI> `loop`</LI>\n\t *    <LI> `reversed`</LI>\n\t *    <LI> `bounce`</LI>\n\t *    <LI> `timeScale`</LI>\n\t *    <LI> `paused`</LI>\n\t *    <LI> `position`: indicates the initial position for this tween.</LI>\n\t *    <LI> `onChange`: adds the specified function as a listener to the `change` event</LI>\n\t *    <LI> `onComplete`: adds the specified function as a listener to the `complete` event</LI>\n\t * </UL>\n\t * @extends AbstractTween\n\t * @constructor\n\t **/\n\tfunction Timeline(props) {\n\t\tvar tweens, labels;\n\t\t// handle old params (tweens, labels, props):\n\t\t// TODO: deprecated.\n\t\tif (props instanceof Array || (props == null && arguments.length > 1)) {\n\t\t\ttweens = props;\n\t\t\tlabels = arguments[1];\n\t\t\tprops = arguments[2];\n\t\t} else if (props) {\n\t\t\ttweens = props.tweens;\n\t\t\tlabels = props.labels;\n\t\t}\n\t\t\n\t\tthis.AbstractTween_constructor(props);\n\n\t// private properties:\n\t\t/**\n\t\t * The array of tweens in the timeline. It is *strongly* recommended that you use\n\t\t * {{#crossLink \"Tween/addTween\"}}{{/crossLink}} and {{#crossLink \"Tween/removeTween\"}}{{/crossLink}},\n\t\t * rather than accessing this directly, but it is included for advanced uses.\n\t\t * @property tweens\n\t\t * @type Array\n\t\t **/\n\t\tthis.tweens = [];\n\t\t\n\t\tif (tweens) { this.addTween.apply(this, tweens); }\n\t\tthis.setLabels(labels);\n\t\t\n\t\tthis._init(props);\n\t};\n\t\n\tvar p = createjs.extend(Timeline, createjs.AbstractTween);\n\n\t\n// events:\n\t// docced in AbstractTween.\n\n\n// public methods:\n\t/**\n\t * Adds one or more tweens (or timelines) to this timeline. The tweens will be paused (to remove them from the\n\t * normal ticking system) and managed by this timeline. Adding a tween to multiple timelines will result in\n\t * unexpected behaviour.\n\t * @method addTween\n\t * @param {Tween} ...tween The tween(s) to add. Accepts multiple arguments.\n\t * @return {Tween} The first tween that was passed in.\n\t **/\n\tp.addTween = function(tween) {\n\t\tif (tween._parent) { tween._parent.removeTween(tween); }\n\t\t\n\t\tvar l = arguments.length;\n\t\tif (l > 1) {\n\t\t\tfor (var i=0; i<l; i++) { this.addTween(arguments[i]); }\n\t\t\treturn arguments[l-1];\n\t\t} else if (l === 0) { return null; }\n\t\t\n\t\tthis.tweens.push(tween);\n\t\ttween._parent = this;\n\t\ttween.paused = true;\n\t\tvar d = tween.duration;\n\t\tif (tween.loop > 0) { d *= tween.loop+1; }\n\t\tif (d > this.duration) { this.duration = d; }\n\t\t\n\t\tif (this.rawPosition >= 0) { tween.setPosition(this.rawPosition); }\n\t\treturn tween;\n\t};\n\n\t/**\n\t * Removes one or more tweens from this timeline.\n\t * @method removeTween\n\t * @param {Tween} ...tween The tween(s) to remove. Accepts multiple arguments.\n\t * @return Boolean Returns `true` if all of the tweens were successfully removed.\n\t **/\n\tp.removeTween = function(tween) {\n\t\tvar l = arguments.length;\n\t\tif (l > 1) {\n\t\t\tvar good = true;\n\t\t\tfor (var i=0; i<l; i++) { good = good && this.removeTween(arguments[i]); }\n\t\t\treturn good;\n\t\t} else if (l === 0) { return true; }\n\n\t\tvar tweens = this.tweens;\n\t\tvar i = tweens.length;\n\t\twhile (i--) {\n\t\t\tif (tweens[i] === tween) {\n\t\t\t\ttweens.splice(i, 1);\n\t\t\t\ttween._parent = null;\n\t\t\t\tif (tween.duration >= this.duration) { this.updateDuration(); }\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Recalculates the duration of the timeline. The duration is automatically updated when tweens are added or removed,\n\t * but this method is useful if you modify a tween after it was added to the timeline.\n\t * @method updateDuration\n\t **/\n\tp.updateDuration = function() {\n\t\tthis.duration = 0;\n\t\tfor (var i=0,l=this.tweens.length; i<l; i++) {\n\t\t\tvar tween = this.tweens[i];\n\t\t\tvar d = tween.duration;\n\t\t\tif (tween.loop > 0) { d *= tween.loop+1; }\n\t\t\tif (d > this.duration) { this.duration = d; }\n\t\t}\n\t};\n\n\t/**\n\t* Returns a string representation of this object.\n\t* @method toString\n\t* @return {String} a string representation of the instance.\n\t**/\n\tp.toString = function() {\n\t\treturn \"[Timeline]\";\n\t};\n\n\t/**\n\t * @method clone\n\t * @protected\n\t **/\n\tp.clone = function() {\n\t\tthrow(\"Timeline can not be cloned.\")\n\t};\n\n// private methods:\n\t\n\t// Docced in AbstractTween\n\tp._updatePosition = function(jump, end) {\n\t\tvar t = this.position;\n\t\tfor (var i=0, l=this.tweens.length; i<l; i++) {\n\t\t\tthis.tweens[i].setPosition(t, true, jump); // actions will run after all the tweens update.\n\t\t}\n\t};\n\t\n\t// Docced in AbstractTween\n\tp._runActionsRange = function(startPos, endPos, jump, includeStart) {\n\t\t//console.log(\"\trange\", startPos, endPos, jump, includeStart);\n\t\tvar t = this.position;\n\t\tfor (var i=0, l=this.tweens.length; i<l; i++) {\n\t\t\tthis.tweens[i]._runActions(startPos, endPos, jump, includeStart);\n\t\t\tif (t !== this.position) { return true; } // an action changed this timeline's position.\n\t\t}\n\t};\n\n\n\tcreatejs.Timeline = createjs.promote(Timeline, \"AbstractTween\");\n\n}());\n\n//##############################################################################\n// Ease.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * The Ease class provides a collection of easing functions for use with TweenJS. It does not use the standard 4 param\n\t * easing signature. Instead it uses a single param which indicates the current linear ratio (0 to 1) of the tween.\n\t *\n\t * Most methods on Ease can be passed directly as easing functions:\n\t *\n\t *      Tween.get(target).to({x:100}, 500, Ease.linear);\n\t *\n\t * However, methods beginning with \"get\" will return an easing function based on parameter values:\n\t *\n\t *      Tween.get(target).to({y:200}, 500, Ease.getPowIn(2.2));\n\t *\n\t * Please see the <a href=\"http://www.createjs.com/Demos/TweenJS/Tween_SparkTable\">spark table demo</a> for an\n\t * overview of the different ease types on <a href=\"http://tweenjs.com\">TweenJS.com</a>.\n\t *\n\t * <em>Equations derived from work by Robert Penner.</em>\n\t * @class Ease\n\t * @static\n\t **/\n\tfunction Ease() {\n\t\tthrow \"Ease cannot be instantiated.\";\n\t}\n\n\n// static methods and properties\n\t/**\n\t * @method linear\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.linear = function(t) { return t; };\n\n\t/**\n\t * Identical to linear.\n\t * @method none\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.none = Ease.linear;\n\n\t/**\n\t * Mimics the simple -100 to 100 easing in Adobe Flash/Animate.\n\t * @method get\n\t * @param {Number} amount A value from -1 (ease in) to 1 (ease out) indicating the strength and direction of the ease.\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.get = function(amount) {\n\t\tif (amount < -1) { amount = -1; }\n\t\telse if (amount > 1) { amount = 1; }\n\t\treturn function(t) {\n\t\t\tif (amount==0) { return t; }\n\t\t\tif (amount<0) { return t*(t*-amount+1+amount); }\n\t\t\treturn t*((2-t)*amount+(1-amount));\n\t\t};\n\t};\n\n\t/**\n\t * Configurable exponential ease.\n\t * @method getPowIn\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getPowIn = function(pow) {\n\t\treturn function(t) {\n\t\t\treturn Math.pow(t,pow);\n\t\t};\n\t};\n\n\t/**\n\t * Configurable exponential ease.\n\t * @method getPowOut\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getPowOut = function(pow) {\n\t\treturn function(t) {\n\t\t\treturn 1-Math.pow(1-t,pow);\n\t\t};\n\t};\n\n\t/**\n\t * Configurable exponential ease.\n\t * @method getPowInOut\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getPowInOut = function(pow) {\n\t\treturn function(t) {\n\t\t\tif ((t*=2)<1) return 0.5*Math.pow(t,pow);\n\t\t\treturn 1-0.5*Math.abs(Math.pow(2-t,pow));\n\t\t};\n\t};\n\n\t/**\n\t * @method quadIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quadIn = Ease.getPowIn(2);\n\t/**\n\t * @method quadOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quadOut = Ease.getPowOut(2);\n\t/**\n\t * @method quadInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quadInOut = Ease.getPowInOut(2);\n\n\t/**\n\t * @method cubicIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.cubicIn = Ease.getPowIn(3);\n\t/**\n\t * @method cubicOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.cubicOut = Ease.getPowOut(3);\n\t/**\n\t * @method cubicInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.cubicInOut = Ease.getPowInOut(3);\n\n\t/**\n\t * @method quartIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quartIn = Ease.getPowIn(4);\n\t/**\n\t * @method quartOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quartOut = Ease.getPowOut(4);\n\t/**\n\t * @method quartInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quartInOut = Ease.getPowInOut(4);\n\n\t/**\n\t * @method quintIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quintIn = Ease.getPowIn(5);\n\t/**\n\t * @method quintOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quintOut = Ease.getPowOut(5);\n\t/**\n\t * @method quintInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.quintInOut = Ease.getPowInOut(5);\n\n\t/**\n\t * @method sineIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.sineIn = function(t) {\n\t\treturn 1-Math.cos(t*Math.PI/2);\n\t};\n\n\t/**\n\t * @method sineOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.sineOut = function(t) {\n\t\treturn Math.sin(t*Math.PI/2);\n\t};\n\n\t/**\n\t * @method sineInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.sineInOut = function(t) {\n\t\treturn -0.5*(Math.cos(Math.PI*t) - 1);\n\t};\n\n\t/**\n\t * Configurable \"back in\" ease.\n\t * @method getBackIn\n\t * @param {Number} amount The strength of the ease.\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getBackIn = function(amount) {\n\t\treturn function(t) {\n\t\t\treturn t*t*((amount+1)*t-amount);\n\t\t};\n\t};\n\t/**\n\t * @method backIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.backIn = Ease.getBackIn(1.7);\n\n\t/**\n\t * Configurable \"back out\" ease.\n\t * @method getBackOut\n\t * @param {Number} amount The strength of the ease.\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getBackOut = function(amount) {\n\t\treturn function(t) {\n\t\t\treturn (--t*t*((amount+1)*t + amount) + 1);\n\t\t};\n\t};\n\t/**\n\t * @method backOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.backOut = Ease.getBackOut(1.7);\n\n\t/**\n\t * Configurable \"back in out\" ease.\n\t * @method getBackInOut\n\t * @param {Number} amount The strength of the ease.\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getBackInOut = function(amount) {\n\t\tamount*=1.525;\n\t\treturn function(t) {\n\t\t\tif ((t*=2)<1) return 0.5*(t*t*((amount+1)*t-amount));\n\t\t\treturn 0.5*((t-=2)*t*((amount+1)*t+amount)+2);\n\t\t};\n\t};\n\t/**\n\t * @method backInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.backInOut = Ease.getBackInOut(1.7);\n\n\t/**\n\t * @method circIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.circIn = function(t) {\n\t\treturn -(Math.sqrt(1-t*t)- 1);\n\t};\n\n\t/**\n\t * @method circOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.circOut = function(t) {\n\t\treturn Math.sqrt(1-(--t)*t);\n\t};\n\n\t/**\n\t * @method circInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.circInOut = function(t) {\n\t\tif ((t*=2) < 1) return -0.5*(Math.sqrt(1-t*t)-1);\n\t\treturn 0.5*(Math.sqrt(1-(t-=2)*t)+1);\n\t};\n\n\t/**\n\t * @method bounceIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.bounceIn = function(t) {\n\t\treturn 1-Ease.bounceOut(1-t);\n\t};\n\n\t/**\n\t * @method bounceOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.bounceOut = function(t) {\n\t\tif (t < 1/2.75) {\n\t\t\treturn (7.5625*t*t);\n\t\t} else if (t < 2/2.75) {\n\t\t\treturn (7.5625*(t-=1.5/2.75)*t+0.75);\n\t\t} else if (t < 2.5/2.75) {\n\t\t\treturn (7.5625*(t-=2.25/2.75)*t+0.9375);\n\t\t} else {\n\t\t\treturn (7.5625*(t-=2.625/2.75)*t +0.984375);\n\t\t}\n\t};\n\n\t/**\n\t * @method bounceInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.bounceInOut = function(t) {\n\t\tif (t<0.5) return Ease.bounceIn (t*2) * .5;\n\t\treturn Ease.bounceOut(t*2-1)*0.5+0.5;\n\t};\n\n\t/**\n\t * Configurable elastic ease.\n\t * @method getElasticIn\n\t * @param {Number} amplitude\n\t * @param {Number} period\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getElasticIn = function(amplitude,period) {\n\t\tvar pi2 = Math.PI*2;\n\t\treturn function(t) {\n\t\t\tif (t==0 || t==1) return t;\n\t\t\tvar s = period/pi2*Math.asin(1/amplitude);\n\t\t\treturn -(amplitude*Math.pow(2,10*(t-=1))*Math.sin((t-s)*pi2/period));\n\t\t};\n\t};\n\t/**\n\t * @method elasticIn\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.elasticIn = Ease.getElasticIn(1,0.3);\n\n\t/**\n\t * Configurable elastic ease.\n\t * @method getElasticOut\n\t * @param {Number} amplitude\n\t * @param {Number} period\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getElasticOut = function(amplitude,period) {\n\t\tvar pi2 = Math.PI*2;\n\t\treturn function(t) {\n\t\t\tif (t==0 || t==1) return t;\n\t\t\tvar s = period/pi2 * Math.asin(1/amplitude);\n\t\t\treturn (amplitude*Math.pow(2,-10*t)*Math.sin((t-s)*pi2/period )+1);\n\t\t};\n\t};\n\t/**\n\t * @method elasticOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.elasticOut = Ease.getElasticOut(1,0.3);\n\n\t/**\n\t * Configurable elastic ease.\n\t * @method getElasticInOut\n\t * @param {Number} amplitude\n\t * @param {Number} period\n\t * @static\n\t * @return {Function}\n\t **/\n\tEase.getElasticInOut = function(amplitude,period) {\n\t\tvar pi2 = Math.PI*2;\n\t\treturn function(t) {\n\t\t\tvar s = period/pi2 * Math.asin(1/amplitude);\n\t\t\tif ((t*=2)<1) return -0.5*(amplitude*Math.pow(2,10*(t-=1))*Math.sin( (t-s)*pi2/period ));\n\t\t\treturn amplitude*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*pi2/period)*0.5+1;\n\t\t};\n\t};\n\t/**\n\t * @method elasticInOut\n\t * @param {Number} t\n\t * @static\n\t * @return {Number}\n\t **/\n\tEase.elasticInOut = Ease.getElasticInOut(1,0.3*1.5);\n\n\tcreatejs.Ease = Ease;\n\n}());\n\n//##############################################################################\n// MotionGuidePlugin.js\n//##############################################################################\n\nwindow.createjs = window.createjs||{};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * A TweenJS plugin for working with motion guides. Defined paths which objects can follow or orient along.\n\t *\n\t * To use the plugin, install the plugin after TweenJS has loaded. To define a path, add\n\t *\n\t * \t\tcreatejs.MotionGuidePlugin.install();\n\t *\n\t * <h4>Example</h4>\n\t *\n\t * \t\t// Using a Motion Guide\n\t * \t\tcreatejs.Tween.get(target).to({guide:{ path:[0,0, 0,200,200,200, 200,0,0,0] }},7000);\n\t * \t\t// Visualizing the line\n\t * \t\tgraphics.moveTo(0,0).curveTo(0,200,200,200).curveTo(200,0,0,0);\n\t *\n\t * Each path needs pre-computation to ensure there's fast performance. Because of the pre-computation there's no\n\t * built in support for path changes mid tween. These are the Guide Object's properties:<UL>\n\t * \t\t<LI> path: Required, Array : The x/y points used to draw the path with a moveTo and 1 to n curveTo calls.</LI>\n\t * \t\t<LI> start: Optional, 0-1 : Initial position, default 0 except for when continuing along the same path.</LI>\n\t * \t\t<LI> end: Optional, 0-1 : Final position, default 1 if not specified.</LI>\n\t * \t\t<LI> orient: Optional, string : \"fixed\"/\"auto\"/\"cw\"/\"ccw\"<UL>\n\t *\t\t\t\t<LI>\"fixed\" forces the object to face down the path all movement (relative to start rotation),</LI>\n\t * \t\t\t\t<LI>\"auto\" rotates the object along the path relative to the line.</LI>\n\t * \t\t\t\t<LI>\"cw\"/\"ccw\" force clockwise or counter clockwise rotations including Adobe Flash/Animate-like\n\t * \t\t\t\tbehaviour. This may override your end rotation value.</LI>\n\t * \t\t</UL></LI>\n\t * </UL>\n\t * Guide objects should not be shared between tweens even if all properties are identical, the library stores\n\t * information on these objects in the background and sharing them can cause unexpected behaviour. Values\n\t * outside 0-1 range of tweens will be a \"best guess\" from the appropriate part of the defined curve.\n\t *\n\t * @class MotionGuidePlugin\n\t * @constructor\n\t */\n\tfunction MotionGuidePlugin() {\n\t\tthrow(\"MotionGuidePlugin cannot be instantiated.\")\n\t}\n\tvar s = MotionGuidePlugin;\n\n\n// static properties:\n\t/**\n\t * @property priority\n\t * @protected\n\t * @static\n\t */\n\ts.priority = 0; // high priority, should run sooner\n\n\t/**\n\t * READ-ONLY. A unique identifying string for this plugin. Used by TweenJS to ensure duplicate plugins are not installed on a tween.\n\t * @property ID\n\t * @type {String}\n\t * @static\n\t * @readonly\n\t */\n\ts.ID = \"MotionGuide\";\n\n// static methods\n\t/**\n\t * Installs this plugin for use with TweenJS. Call this once after TweenJS is loaded to enable this plugin.\n\t * @method install\n\t * @static\n\t */\n\ts.install = function() {\n\t\tcreatejs.Tween._installPlugin(MotionGuidePlugin);\n\t\treturn createjs.Tween.IGNORE;\n\t};\n\n\t/**\n\t * Called by TweenJS when a new property initializes on a tween.\n\t * See {{#crossLink \"SamplePlugin/init\"}}{{/crossLink}} for more info.\n\t * @method init\n\t * @param {Tween} tween\n\t * @param {String} prop\n\t * @param {any} value\n\t * @return {any}\n\t * @static\n\t */\n\ts.init = function(tween, prop, value) {\n\t\tif(prop == \"guide\") {\n\t\t\ttween._addPlugin(s);\n\t\t}\n\t};\n\n\t/**\n\t * Called when a new step is added to a tween (ie. a new \"to\" action is added to a tween).\n\t * See {{#crossLink \"SamplePlugin/step\"}}{{/crossLink}} for more info.\n\t * @method step\n\t * @param {Tween} tween\n\t * @param {TweenStep} step\n\t * @param {Object} props\n\t * @static\n\t */\n\ts.step = function(tween, step, props) {\n\t\tfor (var n in props) {\n\t\t\tif(n !== \"guide\") { continue; }\n\n\t\t\tvar guideData = step.props.guide;\n\t\t\tvar error = s._solveGuideData(props.guide, guideData);\n\t\t\tguideData.valid = !error;\n\n\t\t\tvar end = guideData.endData;\n\t\t\ttween._injectProp(\"x\", end.x);\n\t\t\ttween._injectProp(\"y\", end.y);\n\n\t\t\tif(error || !guideData.orient) { break; }\n\n\t\t\tvar initRot = step.prev.props.rotation === undefined ? (tween.target.rotation || 0) : step.prev.props.rotation;\n\n\t\t\tguideData.startOffsetRot = initRot - guideData.startData.rotation;\n\n\t\t\tif(guideData.orient == \"fixed\") {\n\t\t\t\t// controlled rotation\n\t\t\t\tguideData.endAbsRot = end.rotation + guideData.startOffsetRot;\n\t\t\t\tguideData.deltaRotation = 0;\n\t\t\t} else {\n\t\t\t\t// interpreted rotation\n\n\t\t\t\tvar finalRot = props.rotation === undefined ? (tween.target.rotation || 0) : props.rotation;\n\t\t\t\tvar deltaRot = (finalRot - guideData.endData.rotation) - guideData.startOffsetRot;\n\t\t\t\tvar modRot = deltaRot % 360;\n\n\t\t\t\tguideData.endAbsRot = finalRot;\n\n\t\t\t\tswitch(guideData.orient) {\n\t\t\t\t\tcase \"auto\":\n\t\t\t\t\t\tguideData.deltaRotation = deltaRot;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"cw\":\n\t\t\t\t\t\tguideData.deltaRotation = ((modRot + 360) % 360) + (360 * Math.abs((deltaRot/360) |0));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ccw\":\n\t\t\t\t\t\tguideData.deltaRotation = ((modRot - 360) % 360) + (-360 * Math.abs((deltaRot/360) |0));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttween._injectProp(\"rotation\", guideData.endAbsRot);\n\t\t}\n\t};\n\n\t/**\n\t * Called before a property is updated by the tween.\n\t * See {{#crossLink \"SamplePlugin/change\"}}{{/crossLink}} for more info.\n\t * @method change\n\t * @param {Tween} tween\n\t * @param {TweenStep} step\n\t * @param {String} prop\n\t * @param {any} value\n\t * @param {Number} ratio\n\t * @param {Boolean} end\n\t * @return {any}\n\t * @static\n\t */\n\ts.change = function(tween, step, prop, value, ratio, end) {\n\t\tvar guideData = step.props.guide;\n\n\t\tif(\n\t\t\t\t!guideData ||\t\t\t\t\t\t\t// Missing data\n\t\t\t\t(step.props === step.prev.props) || \t// In a wait()\n\t\t\t\t(guideData === step.prev.props.guide) \t// Guide hasn't changed\n\t\t) {\n\t\t\treturn; // have no business making decisions\n\t\t}\n\t\tif(\n\t\t\t\t(prop === \"guide\" && !guideData.valid) ||\t\t// this data is broken\n\t\t\t\t(prop == \"x\" || prop == \"y\") ||\t\t\t\t\t// these always get over-written\n\t\t\t\t(prop === \"rotation\" && guideData.orient)\t\t// currently over-written\n\t\t){\n\t\t\treturn createjs.Tween.IGNORE;\n\t\t}\n\n\t\ts._ratioToPositionData(ratio, guideData, tween.target);\n\t};\n\n// public methods\n\t/**\n\t * Provide potentially useful debugging information, like running the error detection system, and rendering the path\n\t * defined in the guide data.\n\t *\n\t * NOTE: you will need to transform your context 2D to the local space of the guide if you wish to line it up.\n\t * @param {Object} guideData All the information describing the guide to be followed.\n\t * @param {DrawingContext2D} [ctx=undefined] The context to draw the object into.\n\t * @param {Array} [higlight=undefined] Array of ratio positions to highlight\n\t * @returns {undefined|String}\n\t */\n\ts.debug = function(guideData, ctx, higlight) {\n\t\tguideData = guideData.guide || guideData;\n\n\t\t// errors\n\t\tvar err = s._findPathProblems(guideData);\n\t\tif(err) {\n\t\t\tconsole.error(\"MotionGuidePlugin Error found: \\n\" + err);\n\t\t}\n\n\t\t// drawing\n\t\tif(!ctx){ return err; }\n\n\t\tvar i;\n\t\tvar path = guideData.path;\n\t\tvar pathLength = path.length;\n\t\tvar width = 3;\n\t\tvar length = 9;\n\n\t\tctx.save();\n\t\t//ctx.resetTransform();\n\n\t\tctx.lineCap = \"round\";\n\t\tctx.lineJoin = \"miter\";\n\t\tctx.beginPath();\n\n\t\t// curve\n\t\tctx.moveTo(path[0], path[1]);\n\t\tfor(i=2; i < pathLength; i+=4) {\n\t\t\tctx.quadraticCurveTo(\n\t\t\t\tpath[i], path[i+1],\n\t\t\t\tpath[i+2], path[i+3]\n\t\t\t);\n\t\t}\n\n\t\tctx.strokeStyle = \"black\";\n\t\tctx.lineWidth = width*1.5;\n\t\tctx.stroke();\n\t\tctx.strokeStyle = \"white\";\n\t\tctx.lineWidth = width;\n\t\tctx.stroke();\n\t\tctx.closePath();\n\n\t\t// highlights\n\t\tvar hiCount = higlight.length;\n\t\tif(higlight && hiCount) {\n\t\t\tvar tempStore = {};\n\t\t\tvar tempLook = {};\n\t\t\ts._solveGuideData(guideData, tempStore);\n\n\t\t\tfor(var i=0; i<hiCount; i++){\n\t\t\t\ttempStore.orient = \"fixed\";\n\t\t\t\ts._ratioToPositionData(higlight[i], tempStore, tempLook);\n\n\t\t\t\tctx.beginPath();\n\n\t\t\t\tctx.moveTo(tempLook.x, tempLook.y);\n\t\t\t\tctx.lineTo(\n\t\t\t\t\ttempLook.x + Math.cos(tempLook.rotation * 0.0174533) * length,\n\t\t\t\t\ttempLook.y + Math.sin(tempLook.rotation * 0.0174533) * length\n\t\t\t\t);\n\n\t\t\t\tctx.strokeStyle = \"black\";\n\t\t\t\tctx.lineWidth = width*1.5;\n\t\t\t\tctx.stroke();\n\t\t\t\tctx.strokeStyle = \"red\";\n\t\t\t\tctx.lineWidth = width;\n\t\t\t\tctx.stroke();\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t}\n\n\t\t// end draw\n\t\tctx.restore();\n\n\t\treturn err;\n\t};\n\n// private methods\n\t/**\n\t * Calculate and store optimization data about the desired path to improve performance and accuracy of positions.\n\t * @param {Object} source The guide data provided to the tween call\n\t * @param {Object} storage the guide data used by the step calls and plugin to do the job, will be overwritten\n\t * @returns {undefined|String} Can return an error if unable to generate the data.\n\t * @private\n\t */\n\ts._solveGuideData = function(source, storage) {\n\t\tvar err = undefined;\n\t\tif(err = s.debug(source)) { return err; }\n\n\t\tvar path = storage.path = source.path;\n\t\tvar orient = storage.orient = source.orient;\n\t\tstorage.subLines = [];\n\t\tstorage.totalLength = 0;\n\t\tstorage.startOffsetRot = 0;\n\t\tstorage.deltaRotation = 0;\n\t\tstorage.startData = {ratio: 0};\n\t\tstorage.endData = {ratio: 1};\n\t\tstorage.animSpan = 1;\n\n\t\tvar pathLength = path.length;\n\n\t\tvar precision = 10;\n\t\tvar sx,sy, cx,cy, ex,ey, i,j, len, temp = {};\n\n\t\tsx = path[0];\t\tsy = path[1];\n\n\t\t// get the data for each curve\n\t\tfor(i=2; i < pathLength; i+=4) {\n\t\t\tcx = path[i];\t\t\tcy = path[i+1];\n\t\t\tex = path[i+2];\t\t\tey = path[i+3];\n\n\t\t\tvar subLine = {\n\t\t\t\tweightings: [],\n\t\t\t\testLength: 0,\n\t\t\t\tportion: 0\n\t\t\t};\n\n\t\t\tvar subX = sx, subY = sy;\n\t\t\t// get the distance data for each point\n\t\t\tfor(j=1; j <= precision;j++) {\t// we need to evaluate t = 1 not t = 0\n\t\t\t\ts._getParamsForCurve(sx,sy, cx,cy, ex,ey, j/precision, false, temp);\n\n\t\t\t\tvar dx = temp.x - subX, dy = temp.y - subY;\n\t\t\t\tlen = Math.sqrt(dx*dx + dy*dy);\n\t\t\t\tsubLine.weightings.push(len);\n\t\t\t\tsubLine.estLength += len;\n\n\t\t\t\tsubX = temp.x;\n\t\t\t\tsubY = temp.y;\n\t\t\t}\n\n\t\t\t// figure out full lengths\n\t\t\tstorage.totalLength += subLine.estLength;\n\n\t\t\t// use length to figure out proportional weightings\n\t\t\tfor(j=0; j < precision; j++) {\n\t\t\t\tlen = subLine.estLength;\n\t\t\t\tsubLine.weightings[j] = subLine.weightings[j] / len;\n\t\t\t}\n\n\t\t\tstorage.subLines.push(subLine);\n\t\t\tsx = ex;\n\t\t\tsy = ey;\n\t\t}\n\n\t\t// use length to figure out proportional weightings\n\t\tlen = storage.totalLength;\n\t\tvar l = storage.subLines.length;\n\t\tfor(i=0; i<l; i++) {\n\t\t\tstorage.subLines[i].portion = storage.subLines[i].estLength / len;\n\t\t}\n\n\t\t// determine start and end data\n\t\tvar startRatio = isNaN(source.start) ? 0 : source.start;\n\t\tvar endRatio = isNaN(source.end) ? 1 : source.end;\n\t\ts._ratioToPositionData(startRatio, storage, storage.startData);\n\t\ts._ratioToPositionData(endRatio, storage, storage.endData);\n\n\t\t// this has to be done last else the prev ratios will be out of place\n\t\tstorage.startData.ratio = startRatio;\n\t\tstorage.endData.ratio = endRatio;\n\t\tstorage.animSpan = storage.endData.ratio - storage.startData.ratio;\n\t};\n\n\t/**\n\t * Convert a percentage along the line into, a local line (start, control, end) t-value for calculation.\n\t * @param {Number} ratio The (euclidean distance) percentage into the whole curve.\n\t * @param {Object} guideData All the information describing the guide to be followed.\n\t * @param {Object} output Object to save output properties of x,y, and rotation onto.\n\t * @returns {Object} The output object, useful for isolated calls.\n\t * @private\n\t */\n\ts._ratioToPositionData = function(ratio, guideData, output) {\n\t\tvar lineSegments = guideData.subLines;\n\n\t\tvar i,l, t, test, target;\n\n\t\tvar look = 0;\n\t\tvar precision = 10;\n\t\tvar effRatio = (ratio * guideData.animSpan) + guideData.startData.ratio;\n\n\t\t// find subline\n\t\tl = lineSegments.length;\n\t\tfor(i=0; i<l; i++) {\n\t\t\ttest = lineSegments[i].portion;\n\t\t\tif(look + test >= effRatio){ target = i; break; }\n\t\t\tlook += test;\n\t\t}\n\t\tif(target === undefined) { target = l-1;  look -= test; }\n\n\t\t// find midline weighting\n\t\tvar subLines = lineSegments[target].weightings;\n\t\tvar portion = test;\n\t\tl = subLines.length;\n\t\tfor(i=0; i<l; i++) {\n\t\t\ttest = subLines[i] * portion;\n\t\t\tif(look + test >= effRatio){ break; }\n\t\t\tlook += test;\n\t\t}\n\n\t\t// translate the subline index into a position in the path data\n\t\ttarget = (target*4) + 2;\n\t\t// take the distance we've covered in our ratio, and scale it to distance into the weightings\n\t\tt = (i/precision) + (((effRatio-look) / test) * (1/precision));\n\n\t\t// position\n\t\tvar pathData = guideData.path;\n\t\ts._getParamsForCurve(\n\t\t\tpathData[target-2],\t\t\tpathData[target-1],\n\t\t\tpathData[target],\t\t\tpathData[target+1],\n\t\t\tpathData[target+2],\t\t\tpathData[target+3],\n\t\t\tt,\n\t\t\tguideData.orient,\n\t\t\toutput\n\t\t);\n\n\t\tif(guideData.orient) {\n\t\t\tif(ratio >= 0.99999 && ratio <= 1.00001 && guideData.endAbsRot !== undefined) {\n\t\t\t\toutput.rotation = guideData.endAbsRot;\n\t\t\t} else {\n\t\t\t\toutput.rotation += guideData.startOffsetRot + (ratio * guideData.deltaRotation);\n\t\t\t}\n\t\t}\n\n\t\treturn output;\n\t};\n\n\t/**\n\t * For a given quadratic bezier t-value, what is the position and rotation. Save it onto the output object.\n\t * @param {Number} sx Start x.\n\t * @param {Number} sy Start y.\n\t * @param {Number} cx Control x.\n\t * @param {Number} cy Control y.\n\t * @param {Number} ex End x.\n\t * @param {Number} ey End y.\n\t * @param {Number} t T value (parametric distance into curve).\n\t * @param {Boolean} orient Save rotation data.\n\t * @param {Object} output Object to save output properties of x,y, and rotation onto.\n\t * @private\n\t */\n\ts._getParamsForCurve = function(sx,sy, cx,cy, ex,ey, t, orient, output) {\n\t\tvar inv = 1 - t;\n\n\t\t// finding a point on a bezier curve\n\t\toutput.x =\tinv*inv * sx + 2 * inv * t * cx + t*t * ex;\n\t\toutput.y =\tinv*inv * sy + 2 * inv * t * cy + t*t * ey;\n\n\t\t// finding an angle on a bezier curve\n\t\tif(orient) {\n\t\t\t// convert from radians back to degrees\n\t\t\toutput.rotation = 57.2957795 * Math.atan2(\n\t\t\t\t(cy - sy)*inv + (ey - cy)*t,\n\t\t\t\t(cx - sx)*inv + (ex - cx)*t\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * Perform a check to validate path information so plugin can avoid later error checking.\n\t * @param {Object} guideData All the information describing the guide to be followed.\n\t * @returns {undefined|String} The problem found, or undefined if no problems.\n\t * @private\n\t */\n\ts._findPathProblems = function(guideData) {\n\t\tvar path = guideData.path;\n\t\tvar valueCount = (path && path.length) || 0;\t// ensure this is a number to simplify later logic\n\t\tif(valueCount < 6 || (valueCount-2) % 4) {\n\t\t\tvar message =\t\"\\tCannot parse 'path' array due to invalid number of entries in path. \";\n\t\t\tmessage +=\t\t\"There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). \";\n\t\t\tmessage +=\t\t\"See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\\n\\n\";\n\t\t\tmessage +=\t\t\"Only [ \"+ valueCount +\" ] values found. Expected: \"+ Math.max(Math.ceil((valueCount-2)/4)*4+2, 6); //6, 10, 14,...\n\t\t\treturn message;\n\t\t}\n\n\t\tfor(var i=0; i<valueCount; i++) {\n\t\t\tif(isNaN(path[i])){\n\t\t\t\treturn \"All data in path array must be numeric\";\n\t\t\t}\n\t\t}\n\n\t\tvar start = guideData.start;\n\t\tif(isNaN(start) && !(start === undefined)/* || start < 0 || start > 1*/) {\t// outside 0-1 is unpredictable, but not breaking\n\t\t\treturn \"'start' out of bounds. Expected 0 to 1, got: \"+ start;\n\t\t}\n\t\tvar end = guideData.end;\n\t\tif(isNaN(end) && (end !== undefined)/* || end < 0 || end > 1*/) {\t// outside 0-1 is unpredictable, but not breaking\n\t\t\treturn \"'end' out of bounds. Expected 0 to 1, got: \"+ end;\n\t\t}\n\n\t\tvar orient = guideData.orient;\n\t\tif(orient) { // mirror the check used elsewhere\n\t\t\tif(orient != \"fixed\" && orient != \"auto\" && orient != \"cw\" && orient != \"ccw\") {\n\t\t\t\treturn 'Invalid orientation value. Expected [\"fixed\", \"auto\", \"cw\", \"ccw\", undefined], got: '+ orient;\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tcreatejs.MotionGuidePlugin = MotionGuidePlugin;\n\n}());\n\n//##############################################################################\n// version.js\n//##############################################################################\n\nwindow.createjs = window.createjs || {};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * Static class holding library specific information such as the version and buildDate of\n\t * the library.\n\t * @class TweenJS\n\t **/\n\tvar s = createjs.TweenJS = createjs.TweenJS || {};\n\n\t/**\n\t * The version string for this release.\n\t * @property version\n\t * @type String\n\t * @static\n\t **/\n\ts.version = /*=version*/\"1.0.0\"; // injected by build process\n\n\t/**\n\t * The build date for this release in UTC format.\n\t * @property buildDate\n\t * @type String\n\t * @static\n\t **/\n\ts.buildDate = /*=date*/\"Thu, 14 Sep 2017 19:47:47 GMT\"; // injected by build process\n\n})();\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/latest-createjs/lib/tweenjs/tweenjs.js?");

/***/ }),

/***/ "./node_modules/libgif/libgif.js":
/*!***************************************!*\
  !*** ./node_modules/libgif/libgif.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n\tSuperGif\n\n\tExample usage:\n\n\t\t<img src=\"./example1_preview.gif\" rel:animated_src=\"./example1.gif\" width=\"360\" height=\"360\" rel:auto_play=\"1\" />\n\n\t\t<script type=\"text/javascript\">\n\t\t\t$$('img').each(function (img_tag) {\n\t\t\t\tif (/.*\\.gif/.test(img_tag.src)) {\n\t\t\t\t\tvar rub = new SuperGif({ gif: img_tag } );\n\t\t\t\t\trub.load();\n\t\t\t\t}\n\t\t\t});\n\t\t</script>\n\n\tImage tag attributes:\n\n\t\trel:animated_src -\tIf this url is specified, it's loaded into the player instead of src.\n\t\t\t\t\t\t\tThis allows a preview frame to be shown until animated gif data is streamed into the canvas\n\n\t\trel:auto_play -\t\tDefaults to 1 if not specified. If set to zero, a call to the play() method is needed\n\n\tConstructor options args\n\n\t\tgif \t\t\t\tRequired. The DOM element of an img tag.\n\t\tloop_mode\t\t\tOptional. Setting this to false will force disable looping of the gif.\n\t\tauto_play \t\t\tOptional. Same as the rel:auto_play attribute above, this arg overrides the img tag info.\n\t\tmax_width\t\t\tOptional. Scale images over max_width down to max_width. Helpful with mobile.\n \t\ton_end\t\t\t\tOptional. Add a callback for when the gif reaches the end of a single loop (one iteration). The first argument passed will be the gif HTMLElement.\n\t\tloop_delay\t\t\tOptional. The amount of time to pause (in ms) after each single loop (iteration).\n\t\tdraw_while_loading\tOptional. Determines whether the gif will be drawn to the canvas whilst it is loaded.\n\t\tshow_progress_bar\tOptional. Only applies when draw_while_loading is set to true.\n\n\tInstance methods\n\n\t\t// loading\n\t\tload( callback )\t\tLoads the gif specified by the src or rel:animated_src sttributie of the img tag into a canvas element and then calls callback if one is passed\n\t\tload_url( src, callback )\tLoads the gif file specified in the src argument into a canvas element and then calls callback if one is passed\n\n\t\t// play controls\n\t\tplay -\t\t\t\tStart playing the gif\n\t\tpause -\t\t\t\tStop playing the gif\n\t\tmove_to(i) -\t\tMove to frame i of the gif\n\t\tmove_relative(i) -\tMove i frames ahead (or behind if i < 0)\n\n\t\t// getters\n\t\tget_canvas\t\t\tThe canvas element that the gif is playing in. Handy for assigning event handlers to.\n\t\tget_playing\t\t\tWhether or not the gif is currently playing\n\t\tget_loading\t\t\tWhether or not the gif has finished loading/parsing\n\t\tget_auto_play\t\tWhether or not the gif is set to play automatically\n\t\tget_length\t\t\tThe number of frames in the gif\n\t\tget_current_frame\tThe index of the currently displayed frame of the gif\n\t\tget_frames\t        An array containing the data for all parsed frames\n\t\tget_duration\t    Returns the duration of the gif in hundredths of a second (standard for GIF spec)\n\t\tget_duration_ms\t    Returns the duration of the gif in milliseconds\n\n\t\tFor additional customization (viewport inside iframe) these params may be passed:\n\t\tc_w, c_h - width and height of canvas\n\t\tvp_t, vp_l, vp_ w, vp_h - top, left, width and height of the viewport\n\n\t\tA bonus: few articles to understand what is going on\n\t\t\thttp://enthusiasms.org/post/16976438906\n\t\t\thttp://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp\n\t\t\thttp://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546\n\n*/\n(function (root, factory) {\n    if (true) {\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    } else {}\n}(this, function () {\n    // Generic functions\n    var bitsToNum = function (ba) {\n        return ba.reduce(function (s, n) {\n            return s * 2 + n;\n        }, 0);\n    };\n\n    var byteToBitArr = function (bite) {\n        var a = [];\n        for (var i = 7; i >= 0; i--) {\n            a.push( !! (bite & (1 << i)));\n        }\n        return a;\n    };\n\n    // Stream\n    /**\n     * @constructor\n     */\n    // Make compiler happy.\n    var Stream = function (data) {\n        this.data = data;\n        this.len = this.data.length;\n        this.pos = 0;\n\n        this.readByte = function () {\n            if (this.pos >= this.data.length) {\n                throw new Error('Attempted to read past end of stream.');\n            }\n            if (data instanceof Uint8Array)\n                return data[this.pos++];\n            else\n                return data.charCodeAt(this.pos++) & 0xFF;\n        };\n\n        this.readBytes = function (n) {\n            var bytes = [];\n            for (var i = 0; i < n; i++) {\n                bytes.push(this.readByte());\n            }\n            return bytes;\n        };\n\n        this.read = function (n) {\n            var s = '';\n            for (var i = 0; i < n; i++) {\n                s += String.fromCharCode(this.readByte());\n            }\n            return s;\n        };\n\n        this.readUnsigned = function () { // Little-endian.\n            var a = this.readBytes(2);\n            return (a[1] << 8) + a[0];\n        };\n    };\n\n    var lzwDecode = function (minCodeSize, data) {\n        // TODO: Now that the GIF parser is a bit different, maybe this should get an array of bytes instead of a String?\n        var pos = 0; // Maybe this streaming thing should be merged with the Stream?\n        var readCode = function (size) {\n            var code = 0;\n            for (var i = 0; i < size; i++) {\n                if (data.charCodeAt(pos >> 3) & (1 << (pos & 7))) {\n                    code |= 1 << i;\n                }\n                pos++;\n            }\n            return code;\n        };\n\n        var output = [];\n\n        var clearCode = 1 << minCodeSize;\n        var eoiCode = clearCode + 1;\n\n        var codeSize = minCodeSize + 1;\n\n        var dict = [];\n\n        var clear = function () {\n            dict = [];\n            codeSize = minCodeSize + 1;\n            for (var i = 0; i < clearCode; i++) {\n                dict[i] = [i];\n            }\n            dict[clearCode] = [];\n            dict[eoiCode] = null;\n\n        };\n\n        var code;\n        var last;\n\n        while (true) {\n            last = code;\n            code = readCode(codeSize);\n\n            if (code === clearCode) {\n                clear();\n                continue;\n            }\n            if (code === eoiCode) break;\n\n            if (code < dict.length) {\n                if (last !== clearCode) {\n                    dict.push(dict[last].concat(dict[code][0]));\n                }\n            }\n            else {\n                if (code !== dict.length) throw new Error('Invalid LZW code.');\n                dict.push(dict[last].concat(dict[last][0]));\n            }\n            output.push.apply(output, dict[code]);\n\n            if (dict.length === (1 << codeSize) && codeSize < 12) {\n                // If we're at the last code and codeSize is 12, the next code will be a clearCode, and it'll be 12 bits long.\n                codeSize++;\n            }\n        }\n\n        // I don't know if this is technically an error, but some GIFs do it.\n        //if (Math.ceil(pos / 8) !== data.length) throw new Error('Extraneous LZW bytes.');\n        return output;\n    };\n\n\n    // The actual parsing; returns an object with properties.\n    var parseGIF = function (st, handler) {\n        handler || (handler = {});\n\n        // LZW (GIF-specific)\n        var parseCT = function (entries) { // Each entry is 3 bytes, for RGB.\n            var ct = [];\n            for (var i = 0; i < entries; i++) {\n                ct.push(st.readBytes(3));\n            }\n            return ct;\n        };\n\n        var readSubBlocks = function () {\n            var size, data;\n            data = '';\n            do {\n                size = st.readByte();\n                data += st.read(size);\n            } while (size !== 0);\n            return data;\n        };\n\n        var parseHeader = function () {\n            var hdr = {};\n            hdr.sig = st.read(3);\n            hdr.ver = st.read(3);\n            if (hdr.sig !== 'GIF') throw new Error('Not a GIF file.'); // XXX: This should probably be handled more nicely.\n            hdr.width = st.readUnsigned();\n            hdr.height = st.readUnsigned();\n\n            var bits = byteToBitArr(st.readByte());\n            hdr.gctFlag = bits.shift();\n            hdr.colorRes = bitsToNum(bits.splice(0, 3));\n            hdr.sorted = bits.shift();\n            hdr.gctSize = bitsToNum(bits.splice(0, 3));\n\n            hdr.bgColor = st.readByte();\n            hdr.pixelAspectRatio = st.readByte(); // if not 0, aspectRatio = (pixelAspectRatio + 15) / 64\n            if (hdr.gctFlag) {\n                hdr.gct = parseCT(1 << (hdr.gctSize + 1));\n            }\n            handler.hdr && handler.hdr(hdr);\n        };\n\n        var parseExt = function (block) {\n            var parseGCExt = function (block) {\n                var blockSize = st.readByte(); // Always 4\n                var bits = byteToBitArr(st.readByte());\n                block.reserved = bits.splice(0, 3); // Reserved; should be 000.\n                block.disposalMethod = bitsToNum(bits.splice(0, 3));\n                block.userInput = bits.shift();\n                block.transparencyGiven = bits.shift();\n\n                block.delayTime = st.readUnsigned();\n\n                block.transparencyIndex = st.readByte();\n\n                block.terminator = st.readByte();\n\n                handler.gce && handler.gce(block);\n            };\n\n            var parseComExt = function (block) {\n                block.comment = readSubBlocks();\n                handler.com && handler.com(block);\n            };\n\n            var parsePTExt = function (block) {\n                // No one *ever* uses this. If you use it, deal with parsing it yourself.\n                var blockSize = st.readByte(); // Always 12\n                block.ptHeader = st.readBytes(12);\n                block.ptData = readSubBlocks();\n                handler.pte && handler.pte(block);\n            };\n\n            var parseAppExt = function (block) {\n                var parseNetscapeExt = function (block) {\n                    var blockSize = st.readByte(); // Always 3\n                    block.unknown = st.readByte(); // ??? Always 1? What is this?\n                    block.iterations = st.readUnsigned();\n                    block.terminator = st.readByte();\n                    handler.app && handler.app.NETSCAPE && handler.app.NETSCAPE(block);\n                };\n\n                var parseUnknownAppExt = function (block) {\n                    block.appData = readSubBlocks();\n                    // FIXME: This won't work if a handler wants to match on any identifier.\n                    handler.app && handler.app[block.identifier] && handler.app[block.identifier](block);\n                };\n\n                var blockSize = st.readByte(); // Always 11\n                block.identifier = st.read(8);\n                block.authCode = st.read(3);\n                switch (block.identifier) {\n                    case 'NETSCAPE':\n                        parseNetscapeExt(block);\n                        break;\n                    default:\n                        parseUnknownAppExt(block);\n                        break;\n                }\n            };\n\n            var parseUnknownExt = function (block) {\n                block.data = readSubBlocks();\n                handler.unknown && handler.unknown(block);\n            };\n\n            block.label = st.readByte();\n            switch (block.label) {\n                case 0xF9:\n                    block.extType = 'gce';\n                    parseGCExt(block);\n                    break;\n                case 0xFE:\n                    block.extType = 'com';\n                    parseComExt(block);\n                    break;\n                case 0x01:\n                    block.extType = 'pte';\n                    parsePTExt(block);\n                    break;\n                case 0xFF:\n                    block.extType = 'app';\n                    parseAppExt(block);\n                    break;\n                default:\n                    block.extType = 'unknown';\n                    parseUnknownExt(block);\n                    break;\n            }\n        };\n\n        var parseImg = function (img) {\n            var deinterlace = function (pixels, width) {\n                // Of course this defeats the purpose of interlacing. And it's *probably*\n                // the least efficient way it's ever been implemented. But nevertheless...\n                var newPixels = new Array(pixels.length);\n                var rows = pixels.length / width;\n                var cpRow = function (toRow, fromRow) {\n                    var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width);\n                    newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels));\n                };\n\n                // See appendix E.\n                var offsets = [0, 4, 2, 1];\n                var steps = [8, 8, 4, 2];\n\n                var fromRow = 0;\n                for (var pass = 0; pass < 4; pass++) {\n                    for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) {\n                        cpRow(toRow, fromRow)\n                        fromRow++;\n                    }\n                }\n\n                return newPixels;\n            };\n\n            img.leftPos = st.readUnsigned();\n            img.topPos = st.readUnsigned();\n            img.width = st.readUnsigned();\n            img.height = st.readUnsigned();\n\n            var bits = byteToBitArr(st.readByte());\n            img.lctFlag = bits.shift();\n            img.interlaced = bits.shift();\n            img.sorted = bits.shift();\n            img.reserved = bits.splice(0, 2);\n            img.lctSize = bitsToNum(bits.splice(0, 3));\n\n            if (img.lctFlag) {\n                img.lct = parseCT(1 << (img.lctSize + 1));\n            }\n\n            img.lzwMinCodeSize = st.readByte();\n\n            var lzwData = readSubBlocks();\n\n            img.pixels = lzwDecode(img.lzwMinCodeSize, lzwData);\n\n            if (img.interlaced) { // Move\n                img.pixels = deinterlace(img.pixels, img.width);\n            }\n\n            handler.img && handler.img(img);\n        };\n\n        var parseBlock = function () {\n            var block = {};\n            block.sentinel = st.readByte();\n\n            switch (String.fromCharCode(block.sentinel)) { // For ease of matching\n                case '!':\n                    block.type = 'ext';\n                    parseExt(block);\n                    break;\n                case ',':\n                    block.type = 'img';\n                    parseImg(block);\n                    break;\n                case ';':\n                    block.type = 'eof';\n                    handler.eof && handler.eof(block);\n                    break;\n                default:\n                    throw new Error('Unknown block: 0x' + block.sentinel.toString(16)); // TODO: Pad this with a 0.\n            }\n\n            if (block.type !== 'eof') setTimeout(parseBlock, 0);\n        };\n\n        var parse = function () {\n            parseHeader();\n            setTimeout(parseBlock, 0);\n        };\n\n        parse();\n    };\n\n    var SuperGif = function ( opts ) {\n        var options = {\n            //viewport position\n            vp_l: 0,\n            vp_t: 0,\n            vp_w: null,\n            vp_h: null,\n            //canvas sizes\n            c_w: null,\n            c_h: null\n        };\n        for (var i in opts ) { options[i] = opts[i] }\n        if (options.vp_w && options.vp_h) options.is_vp = true;\n\n        var stream;\n        var hdr;\n\n        var loadError = null;\n        var loading = false;\n\n        var transparency = null;\n        var delay = null;\n        var disposalMethod = null;\n        var disposalRestoreFromIdx = null;\n        var lastDisposalMethod = null;\n        var frame = null;\n        var lastImg = null;\n\n        var playing = true;\n        var forward = true;\n\n        var ctx_scaled = false;\n\n        var frames = [];\n        var frameOffsets = []; // elements have .x and .y properties\n\n        var gif = options.gif;\n        if (typeof options.auto_play == 'undefined')\n            options.auto_play = (!gif.getAttribute('rel:auto_play') || gif.getAttribute('rel:auto_play') == '1');\n\n        var onEndListener = (options.hasOwnProperty('on_end') ? options.on_end : null);\n        var loopDelay = (options.hasOwnProperty('loop_delay') ? options.loop_delay : 0);\n        var overrideLoopMode = (options.hasOwnProperty('loop_mode') ? options.loop_mode : 'auto');\n        var drawWhileLoading = (options.hasOwnProperty('draw_while_loading') ? options.draw_while_loading : true);\n        var showProgressBar = drawWhileLoading ? (options.hasOwnProperty('show_progress_bar') ? options.show_progress_bar : true) : false;\n        var progressBarHeight = (options.hasOwnProperty('progressbar_height') ? options.progressbar_height : 25);\n        var progressBarBackgroundColor = (options.hasOwnProperty('progressbar_background_color') ? options.progressbar_background_color : 'rgba(255,255,255,0.4)');\n        var progressBarForegroundColor = (options.hasOwnProperty('progressbar_foreground_color') ? options.progressbar_foreground_color : 'rgba(255,0,22,.8)');\n\n        var clear = function () {\n            transparency = null;\n            delay = null;\n            lastDisposalMethod = disposalMethod;\n            disposalMethod = null;\n            frame = null;\n        };\n\n        // XXX: There's probably a better way to handle catching exceptions when\n        // callbacks are involved.\n        var doParse = function () {\n            try {\n                parseGIF(stream, handler);\n            }\n            catch (err) {\n                doLoadError('parse');\n            }\n        };\n\n        var doText = function (text) {\n            toolbar.innerHTML = text; // innerText? Escaping? Whatever.\n            toolbar.style.visibility = 'visible';\n        };\n\n        var setSizes = function(w, h) {\n            canvas.width = w * get_canvas_scale();\n            canvas.height = h * get_canvas_scale();\n            toolbar.style.minWidth = ( w * get_canvas_scale() ) + 'px';\n\n            tmpCanvas.width = w;\n            tmpCanvas.height = h;\n            tmpCanvas.style.width = w + 'px';\n            tmpCanvas.style.height = h + 'px';\n            tmpCanvas.getContext('2d').setTransform(1, 0, 0, 1, 0, 0);\n        };\n\n        var setFrameOffset = function(frame, offset) {\n            if (!frameOffsets[frame]) {\n                frameOffsets[frame] = offset;\n                return;\n            }\n            if (typeof offset.x !== 'undefined') {\n                frameOffsets[frame].x = offset.x;\n            }\n            if (typeof offset.y !== 'undefined') {\n                frameOffsets[frame].y = offset.y;\n            }\n        };\n\n        var doShowProgress = function (pos, length, draw) {\n            if (draw && showProgressBar) {\n                var height = progressBarHeight;\n                var left, mid, top, width;\n                if (options.is_vp) {\n                    if (!ctx_scaled) {\n                        top = (options.vp_t + options.vp_h - height);\n                        height = height;\n                        left = options.vp_l;\n                        mid = left + (pos / length) * options.vp_w;\n                        width = canvas.width;\n                    } else {\n                        top = (options.vp_t + options.vp_h - height) / get_canvas_scale();\n                        height = height / get_canvas_scale();\n                        left = (options.vp_l / get_canvas_scale() );\n                        mid = left + (pos / length) * (options.vp_w / get_canvas_scale());\n                        width = canvas.width / get_canvas_scale();\n                    }\n                    //some debugging, draw rect around viewport\n                    if (false) { var w, h, l, t; }\n                }\n                else {\n                    top = (canvas.height - height) / (ctx_scaled ? get_canvas_scale() : 1);\n                    mid = ((pos / length) * canvas.width) / (ctx_scaled ? get_canvas_scale() : 1);\n                    width = canvas.width / (ctx_scaled ? get_canvas_scale() : 1 );\n                    height /= ctx_scaled ? get_canvas_scale() : 1;\n                }\n\n                ctx.fillStyle = progressBarBackgroundColor;\n                ctx.fillRect(mid, top, width - mid, height);\n\n                ctx.fillStyle = progressBarForegroundColor;\n                ctx.fillRect(0, top, mid, height);\n            }\n        };\n\n        var doLoadError = function (originOfError) {\n            var drawError = function () {\n                ctx.fillStyle = 'black';\n                ctx.fillRect(0, 0, options.c_w ? options.c_w : hdr.width, options.c_h ? options.c_h : hdr.height);\n                ctx.strokeStyle = 'red';\n                ctx.lineWidth = 3;\n                ctx.moveTo(0, 0);\n                ctx.lineTo(options.c_w ? options.c_w : hdr.width, options.c_h ? options.c_h : hdr.height);\n                ctx.moveTo(0, options.c_h ? options.c_h : hdr.height);\n                ctx.lineTo(options.c_w ? options.c_w : hdr.width, 0);\n                ctx.stroke();\n            };\n\n            loadError = originOfError;\n            hdr = {\n                width: gif.width,\n                height: gif.height\n            }; // Fake header.\n            frames = [];\n            drawError();\n        };\n\n        var doHdr = function (_hdr) {\n            hdr = _hdr;\n            setSizes(hdr.width, hdr.height)\n        };\n\n        var doGCE = function (gce) {\n            pushFrame();\n            clear();\n            transparency = gce.transparencyGiven ? gce.transparencyIndex : null;\n            delay = gce.delayTime;\n            disposalMethod = gce.disposalMethod;\n            // We don't have much to do with the rest of GCE.\n        };\n\n        var pushFrame = function () {\n            if (!frame) return;\n            frames.push({\n                            data: frame.getImageData(0, 0, hdr.width, hdr.height),\n                            delay: delay\n                        });\n            frameOffsets.push({ x: 0, y: 0 });\n        };\n\n        var doImg = function (img) {\n            if (!frame) frame = tmpCanvas.getContext('2d');\n\n            var currIdx = frames.length;\n\n            //ct = color table, gct = global color table\n            var ct = img.lctFlag ? img.lct : hdr.gct; // TODO: What if neither exists?\n\n            /*\n            Disposal method indicates the way in which the graphic is to\n            be treated after being displayed.\n\n            Values :    0 - No disposal specified. The decoder is\n                            not required to take any action.\n                        1 - Do not dispose. The graphic is to be left\n                            in place.\n                        2 - Restore to background color. The area used by the\n                            graphic must be restored to the background color.\n                        3 - Restore to previous. The decoder is required to\n                            restore the area overwritten by the graphic with\n                            what was there prior to rendering the graphic.\n\n                            Importantly, \"previous\" means the frame state\n                            after the last disposal of method 0, 1, or 2.\n            */\n            if (currIdx > 0) {\n                if (lastDisposalMethod === 3) {\n                    // Restore to previous\n                    // If we disposed every frame including first frame up to this point, then we have\n                    // no composited frame to restore to. In this case, restore to background instead.\n                    if (disposalRestoreFromIdx !== null) {\n                    \tframe.putImageData(frames[disposalRestoreFromIdx].data, 0, 0);\n                    } else {\n                    \tframe.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height);\n                    }\n                } else {\n                    disposalRestoreFromIdx = currIdx - 1;\n                }\n\n                if (lastDisposalMethod === 2) {\n                    // Restore to background color\n                    // Browser implementations historically restore to transparent; we do the same.\n                    // http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=21172#p86079\n                    frame.clearRect(lastImg.leftPos, lastImg.topPos, lastImg.width, lastImg.height);\n                }\n            }\n            // else, Undefined/Do not dispose.\n            // frame contains final pixel data from the last frame; do nothing\n\n            //Get existing pixels for img region after applying disposal method\n            var imgData = frame.getImageData(img.leftPos, img.topPos, img.width, img.height);\n\n            //apply color table colors\n            img.pixels.forEach(function (pixel, i) {\n                // imgData.data === [R,G,B,A,R,G,B,A,...]\n                if (pixel !== transparency) {\n                    imgData.data[i * 4 + 0] = ct[pixel][0];\n                    imgData.data[i * 4 + 1] = ct[pixel][1];\n                    imgData.data[i * 4 + 2] = ct[pixel][2];\n                    imgData.data[i * 4 + 3] = 255; // Opaque.\n                }\n            });\n\n            frame.putImageData(imgData, img.leftPos, img.topPos);\n\n            if (!ctx_scaled) {\n                ctx.scale(get_canvas_scale(),get_canvas_scale());\n                ctx_scaled = true;\n            }\n\n            // We could use the on-page canvas directly, except that we draw a progress\n            // bar for each image chunk (not just the final image).\n            if (drawWhileLoading) {\n                ctx.drawImage(tmpCanvas, 0, 0);\n                drawWhileLoading = options.auto_play;\n            }\n\n            lastImg = img;\n        };\n\n        var player = (function () {\n            var i = -1;\n            var iterationCount = 0;\n\n            var showingInfo = false;\n            var pinned = false;\n\n            /**\n             * Gets the index of the frame \"up next\".\n             * @returns {number}\n             */\n            var getNextFrameNo = function () {\n                var delta = (forward ? 1 : -1);\n                return (i + delta + frames.length) % frames.length;\n            };\n\n            var stepFrame = function (amount) { // XXX: Name is confusing.\n                i = i + amount;\n\n                putFrame();\n            };\n\n            var step = (function () {\n                var stepping = false;\n\n                var completeLoop = function () {\n                    if (onEndListener !== null)\n                        onEndListener(gif);\n                    iterationCount++;\n\n                    if (overrideLoopMode !== false || iterationCount < 0) {\n                        doStep();\n                    } else {\n                        stepping = false;\n                        playing = false;\n                    }\n                };\n\n                var doStep = function () {\n                    stepping = playing;\n                    if (!stepping) return;\n\n                    stepFrame(1);\n                    var delay = frames[i].delay * 10;\n                    if (!delay) delay = 100; // FIXME: Should this even default at all? What should it be?\n\n                    var nextFrameNo = getNextFrameNo();\n                    if (nextFrameNo === 0) {\n                        delay += loopDelay;\n                        setTimeout(completeLoop, delay);\n                    } else {\n                        setTimeout(doStep, delay);\n                    }\n                };\n\n                return function () {\n                    if (!stepping) setTimeout(doStep, 0);\n                };\n            }());\n\n            var putFrame = function () {\n                var offset;\n                i = parseInt(i, 10);\n\n                if (i > frames.length - 1){\n                    i = 0;\n                }\n\n                if (i < 0){\n                    i = 0;\n                }\n\n                offset = frameOffsets[i];\n\n                tmpCanvas.getContext(\"2d\").putImageData(frames[i].data, offset.x, offset.y);\n                ctx.globalCompositeOperation = \"copy\";\n                ctx.drawImage(tmpCanvas, 0, 0);\n            };\n\n            var play = function () {\n                playing = true;\n                step();\n            };\n\n            var pause = function () {\n                playing = false;\n            };\n\n\n            return {\n                init: function () {\n                    if (loadError) return;\n\n                    if ( ! (options.c_w && options.c_h) ) {\n                        ctx.scale(get_canvas_scale(),get_canvas_scale());\n                    }\n\n                    if (options.auto_play) {\n                        step();\n                    }\n                    else {\n                        i = 0;\n                        putFrame();\n                    }\n                },\n                step: step,\n                play: play,\n                pause: pause,\n                playing: playing,\n                move_relative: stepFrame,\n                current_frame: function() { return i; },\n                length: function() { return frames.length },\n                move_to: function ( frame_idx ) {\n                    i = frame_idx;\n                    putFrame();\n                }\n            }\n        }());\n\n        var doDecodeProgress = function (draw) {\n            doShowProgress(stream.pos, stream.data.length, draw);\n        };\n\n        var doNothing = function () {};\n        /**\n         * @param{boolean=} draw Whether to draw progress bar or not; this is not idempotent because of translucency.\n         *                       Note that this means that the text will be unsynchronized with the progress bar on non-frames;\n         *                       but those are typically so small (GCE etc.) that it doesn't really matter. TODO: Do this properly.\n         */\n        var withProgress = function (fn, draw) {\n            return function (block) {\n                fn(block);\n                doDecodeProgress(draw);\n            };\n        };\n\n\n        var handler = {\n            hdr: withProgress(doHdr),\n            gce: withProgress(doGCE),\n            com: withProgress(doNothing),\n            // I guess that's all for now.\n            app: {\n                // TODO: Is there much point in actually supporting iterations?\n                NETSCAPE: withProgress(doNothing)\n            },\n            img: withProgress(doImg, true),\n            eof: function (block) {\n                //toolbar.style.display = '';\n                pushFrame();\n                doDecodeProgress(false);\n                if ( ! (options.c_w && options.c_h) ) {\n                    canvas.width = hdr.width * get_canvas_scale();\n                    canvas.height = hdr.height * get_canvas_scale();\n                }\n                player.init();\n                loading = false;\n                if (load_callback) {\n                    load_callback(gif);\n                }\n\n            }\n        };\n\n        var init = function () {\n            var parent = gif.parentNode;\n\n            var div = document.createElement('div');\n            canvas = document.createElement('canvas');\n            ctx = canvas.getContext('2d');\n            toolbar = document.createElement('div');\n\n            tmpCanvas = document.createElement('canvas');\n\n            div.width = canvas.width = gif.width;\n            div.height = canvas.height = gif.height;\n            toolbar.style.minWidth = gif.width + 'px';\n\n            div.className = 'jsgif';\n            toolbar.className = 'jsgif_toolbar';\n            div.appendChild(canvas);\n            div.appendChild(toolbar);\n\n            parent.insertBefore(div, gif);\n            parent.removeChild(gif);\n\n            if (options.c_w && options.c_h) setSizes(options.c_w, options.c_h);\n            initialized=true;\n        };\n\n        var get_canvas_scale = function() {\n            var scale;\n            if (options.max_width && hdr && hdr.width > options.max_width) {\n                scale = options.max_width / hdr.width;\n            }\n            else {\n                scale = 1;\n            }\n            return scale;\n        }\n\n        var canvas, ctx, toolbar, tmpCanvas;\n        var initialized = false;\n        var load_callback = false;\n\n        var load_setup = function(callback) {\n            if (loading) return false;\n            if (callback) load_callback = callback;\n            else load_callback = false;\n\n            loading = true;\n            frames = [];\n            clear();\n            disposalRestoreFromIdx = null;\n            lastDisposalMethod = null;\n            frame = null;\n            lastImg = null;\n\n            return true;\n        }\n\n        var calculateDuration = function() {\n            return frames.reduce(function(duration, frame) {\n                return duration + frame.delay;\n            }, 0);\n        }\n\n        return {\n            // play controls\n            play: player.play,\n            pause: player.pause,\n            move_relative: player.move_relative,\n            move_to: player.move_to,\n\n            // getters for instance vars\n            get_playing      : function() { return playing },\n            get_canvas       : function() { return canvas },\n            get_canvas_scale : function() { return get_canvas_scale() },\n            get_loading      : function() { return loading },\n            get_auto_play    : function() { return options.auto_play },\n            get_length       : function() { return player.length() },\n            get_frames       : function() { return frames },\n            get_duration     : function() { return calculateDuration() },\n            get_duration_ms  : function() { return calculateDuration() * 10 },\n            get_current_frame: function() { return player.current_frame() },\n            load_url: function(src,callback){\n                if (!load_setup(callback)) return;\n\n                var h = new XMLHttpRequest();\n                // new browsers (XMLHttpRequest2-compliant)\n                h.open('GET', src, true);\n\n                if ('overrideMimeType' in h) {\n                    h.overrideMimeType('text/plain; charset=x-user-defined');\n                }\n\n                // old browsers (XMLHttpRequest-compliant)\n                else if ('responseType' in h) {\n                    h.responseType = 'arraybuffer';\n                }\n\n                // IE9 (Microsoft.XMLHTTP-compliant)\n                else {\n                    h.setRequestHeader('Accept-Charset', 'x-user-defined');\n                }\n\n                h.onloadstart = function() {\n                    // Wait until connection is opened to replace the gif element with a canvas to avoid a blank img\n                    if (!initialized) init();\n                };\n                h.onload = function(e) {\n                    if (this.status != 200) {\n                        doLoadError('xhr - response');\n                    }\n                    // emulating response field for IE9\n                    if (!('response' in this)) {\n                        this.response = new VBArray(this.responseText).toArray().map(String.fromCharCode).join('');\n                    }\n                    var data = this.response;\n                    if (data.toString().indexOf(\"ArrayBuffer\") > 0) {\n                        data = new Uint8Array(data);\n                    }\n\n                    stream = new Stream(data);\n                    setTimeout(doParse, 0);\n                };\n                h.onprogress = function (e) {\n                    if (e.lengthComputable) doShowProgress(e.loaded, e.total, true);\n                };\n                h.onerror = function() { doLoadError('xhr'); };\n                h.send();\n            },\n            load: function (callback) {\n                this.load_url(gif.getAttribute('rel:animated_src') || gif.src,callback);\n            },\n            load_raw: function(arr, callback) {\n                if (!load_setup(callback)) return;\n                if (!initialized) init();\n                stream = new Stream(arr);\n                setTimeout(doParse, 0);\n            },\n            set_frame_offset: setFrameOffset\n        };\n    };\n\n    return SuperGif;\n}));\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/libgif/libgif.js?");

/***/ }),

/***/ "./node_modules/loadjs/dist/loadjs.umd.js":
/*!************************************************!*\
  !*** ./node_modules/loadjs/dist/loadjs.umd.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {\n  if (true) {\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n}(this, function() {\n/**\n * Global dependencies.\n * @global {Object} document - DOM\n */\n\nvar devnull = function() {},\n    bundleIdCache = {},\n    bundleResultCache = {},\n    bundleCallbackQueue = {};\n\n\n/**\n * Subscribe to bundle load event.\n * @param {string[]} bundleIds - Bundle ids\n * @param {Function} callbackFn - The callback function\n */\nfunction subscribe(bundleIds, callbackFn) {\n  // listify\n  bundleIds = bundleIds.push ? bundleIds : [bundleIds];\n\n  var depsNotFound = [],\n      i = bundleIds.length,\n      numWaiting = i,\n      fn,\n      bundleId,\n      r,\n      q;\n\n  // define callback function\n  fn = function (bundleId, pathsNotFound) {\n    if (pathsNotFound.length) depsNotFound.push(bundleId);\n\n    numWaiting--;\n    if (!numWaiting) callbackFn(depsNotFound);\n  };\n\n  // register callback\n  while (i--) {\n    bundleId = bundleIds[i];\n\n    // execute callback if in result cache\n    r = bundleResultCache[bundleId];\n    if (r) {\n      fn(bundleId, r);\n      continue;\n    }\n\n    // add to callback queue\n    q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];\n    q.push(fn);\n  }\n}\n\n\n/**\n * Publish bundle load event.\n * @param {string} bundleId - Bundle id\n * @param {string[]} pathsNotFound - List of files not found\n */\nfunction publish(bundleId, pathsNotFound) {\n  // exit if id isn't defined\n  if (!bundleId) return;\n\n  var q = bundleCallbackQueue[bundleId];\n\n  // cache result\n  bundleResultCache[bundleId] = pathsNotFound;\n\n  // exit if queue is empty\n  if (!q) return;\n\n  // empty callback queue\n  while (q.length) {\n    q[0](bundleId, pathsNotFound);\n    q.splice(0, 1);\n  }\n}\n\n\n/**\n * Execute callbacks.\n * @param {Object or Function} args - The callback args\n * @param {string[]} depsNotFound - List of dependencies not found\n */\nfunction executeCallbacks(args, depsNotFound) {\n  // accept function as argument\n  if (args.call) args = {success: args};\n\n  // success and error callbacks\n  if (depsNotFound.length) (args.error || devnull)(depsNotFound);\n  else (args.success || devnull)(args);\n}\n\n\n/**\n * Load individual file.\n * @param {string} path - The file path\n * @param {Function} callbackFn - The callback function\n */\nfunction loadFile(path, callbackFn, args, numTries) {\n  var doc = document,\n      async = args.async,\n      maxTries = (args.numRetries || 0) + 1,\n      beforeCallbackFn = args.before || devnull,\n      pathStripped = path.replace(/^(css|img)!/, ''),\n      isLegacyIECss,\n      e;\n\n  numTries = numTries || 0;\n\n  if (/(^css!|\\.css$)/.test(path)) {\n    // css\n    e = doc.createElement('link');\n    e.rel = 'stylesheet';\n    e.href = pathStripped;\n\n    // tag IE9+\n    isLegacyIECss = 'hideFocus' in e;\n\n    // use preload in IE Edge (to detect load errors)\n    if (isLegacyIECss && e.relList) {\n      isLegacyIECss = 0;\n      e.rel = 'preload';\n      e.as = 'style';\n    }\n  } else if (/(^img!|\\.(png|gif|jpg|svg)$)/.test(path)) {\n    // image\n    e = doc.createElement('img');\n    e.src = pathStripped;    \n  } else {\n    // javascript\n    e = doc.createElement('script');\n    e.src = path;\n    e.async = async === undefined ? true : async;\n  }\n\n  e.onload = e.onerror = e.onbeforeload = function (ev) {\n    var result = ev.type[0];\n\n    // treat empty stylesheets as failures to get around lack of onerror\n    // support in IE9-11\n    if (isLegacyIECss) {\n      try {\n        if (!e.sheet.cssText.length) result = 'e';\n      } catch (x) {\n        // sheets objects created from load errors don't allow access to\n        // `cssText` (unless error is Code:18 SecurityError)\n        if (x.code != 18) result = 'e';\n      }\n    }\n\n    // handle retries in case of load failure\n    if (result == 'e') {\n      // increment counter\n      numTries += 1;\n\n      // exit function and try again\n      if (numTries < maxTries) {\n        return loadFile(path, callbackFn, args, numTries);\n      }\n    } else if (e.rel == 'preload' && e.as == 'style') {\n      // activate preloaded stylesheets\n      return e.rel = 'stylesheet'; // jshint ignore:line\n    }\n    \n    // execute callback\n    callbackFn(path, result, ev.defaultPrevented);\n  };\n\n  // add to document (unless callback returns `false`)\n  if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);\n}\n\n\n/**\n * Load multiple files.\n * @param {string[]} paths - The file paths\n * @param {Function} callbackFn - The callback function\n */\nfunction loadFiles(paths, callbackFn, args) {\n  // listify paths\n  paths = paths.push ? paths : [paths];\n\n  var numWaiting = paths.length,\n      x = numWaiting,\n      pathsNotFound = [],\n      fn,\n      i;\n\n  // define callback function\n  fn = function(path, result, defaultPrevented) {\n    // handle error\n    if (result == 'e') pathsNotFound.push(path);\n\n    // handle beforeload event. If defaultPrevented then that means the load\n    // will be blocked (ex. Ghostery/ABP on Safari)\n    if (result == 'b') {\n      if (defaultPrevented) pathsNotFound.push(path);\n      else return;\n    }\n\n    numWaiting--;\n    if (!numWaiting) callbackFn(pathsNotFound);\n  };\n\n  // load scripts\n  for (i=0; i < x; i++) loadFile(paths[i], fn, args);\n}\n\n\n/**\n * Initiate script load and register bundle.\n * @param {(string|string[])} paths - The file paths\n * @param {(string|Function|Object)} [arg1] - The (1) bundleId or (2) success\n *   callback or (3) object literal with success/error arguments, numRetries,\n *   etc.\n * @param {(Function|Object)} [arg2] - The (1) success callback or (2) object\n *   literal with success/error arguments, numRetries, etc.\n */\nfunction loadjs(paths, arg1, arg2) {\n  var bundleId,\n      args;\n\n  // bundleId (if string)\n  if (arg1 && arg1.trim) bundleId = arg1;\n\n  // args (default is {})\n  args = (bundleId ? arg2 : arg1) || {};\n\n  // throw error if bundle is already defined\n  if (bundleId) {\n    if (bundleId in bundleIdCache) {\n      throw \"LoadJS\";\n    } else {\n      bundleIdCache[bundleId] = true;\n    }\n  }\n\n  function loadFn(resolve, reject) {\n    loadFiles(paths, function (pathsNotFound) {\n      // execute callbacks\n      executeCallbacks(args, pathsNotFound);\n      \n      // resolve Promise\n      if (resolve) {\n        executeCallbacks({success: resolve, error: reject}, pathsNotFound);\n      }\n\n      // publish bundle load event\n      publish(bundleId, pathsNotFound);\n    }, args);\n  }\n  \n  if (args.returnPromise) return new Promise(loadFn);\n  else loadFn();\n}\n\n\n/**\n * Execute callbacks when dependencies have been satisfied.\n * @param {(string|string[])} deps - List of bundle ids\n * @param {Object} args - success/error arguments\n */\nloadjs.ready = function ready(deps, args) {\n  // subscribe to bundle load event\n  subscribe(deps, function (depsNotFound) {\n    // execute callbacks\n    executeCallbacks(args, depsNotFound);\n  });\n\n  return loadjs;\n};\n\n\n/**\n * Manually satisfy bundle dependencies.\n * @param {string} bundleId - The bundle id\n */\nloadjs.done = function done(bundleId) {\n  publish(bundleId, []);\n};\n\n\n/**\n * Reset loadjs dependencies statuses\n */\nloadjs.reset = function reset() {\n  bundleIdCache = {};\n  bundleResultCache = {};\n  bundleCallbackQueue = {};\n};\n\n\n/**\n * Determine if bundle has already been defined\n * @param String} bundleId - The bundle id\n */\nloadjs.isDefined = function isDefined(bundleId) {\n  return bundleId in bundleIdCache;\n};\n\n\n// export\nreturn loadjs;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/loadjs/dist/loadjs.umd.js?");

/***/ }),

/***/ "./node_modules/localforage/dist/localforage.js":
/*!******************************************************!*\
  !*** ./node_modules/localforage/dist/localforage.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/*!\n    localForage -- Offline Storage, Improved\n    Version 1.10.0\n    https://localforage.github.io/localForage\n    (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n  if (Mutation) {\n    var called = 0;\n    var observer = new Mutation(nextTick);\n    var element = global.document.createTextNode('');\n    observer.observe(element, {\n      characterData: true\n    });\n    scheduleDrain = function () {\n      element.data = (called = ++called % 2);\n    };\n  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n    var channel = new global.MessageChannel();\n    channel.port1.onmessage = nextTick;\n    scheduleDrain = function () {\n      channel.port2.postMessage(0);\n    };\n  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n    scheduleDrain = function () {\n\n      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n      var scriptEl = global.document.createElement('script');\n      scriptEl.onreadystatechange = function () {\n        nextTick();\n\n        scriptEl.onreadystatechange = null;\n        scriptEl.parentNode.removeChild(scriptEl);\n        scriptEl = null;\n      };\n      global.document.documentElement.appendChild(scriptEl);\n    };\n  } else {\n    scheduleDrain = function () {\n      setTimeout(nextTick, 0);\n    };\n  }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n  draining = true;\n  var i, oldQueue;\n  var len = queue.length;\n  while (len) {\n    oldQueue = queue;\n    queue = [];\n    i = -1;\n    while (++i < len) {\n      oldQueue[i]();\n    }\n    len = queue.length;\n  }\n  draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n  if (queue.push(task) === 1 && !draining) {\n    scheduleDrain();\n  }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n  if (typeof resolver !== 'function') {\n    throw new TypeError('resolver must be a function');\n  }\n  this.state = PENDING;\n  this.queue = [];\n  this.outcome = void 0;\n  if (resolver !== INTERNAL) {\n    safelyResolveThenable(this, resolver);\n  }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n  return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n    typeof onRejected !== 'function' && this.state === REJECTED) {\n    return this;\n  }\n  var promise = new this.constructor(INTERNAL);\n  if (this.state !== PENDING) {\n    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n    unwrap(promise, resolver, this.outcome);\n  } else {\n    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n  }\n\n  return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n  this.promise = promise;\n  if (typeof onFulfilled === 'function') {\n    this.onFulfilled = onFulfilled;\n    this.callFulfilled = this.otherCallFulfilled;\n  }\n  if (typeof onRejected === 'function') {\n    this.onRejected = onRejected;\n    this.callRejected = this.otherCallRejected;\n  }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n  handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n  unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n  handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n  unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n  immediate(function () {\n    var returnValue;\n    try {\n      returnValue = func(value);\n    } catch (e) {\n      return handlers.reject(promise, e);\n    }\n    if (returnValue === promise) {\n      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n    } else {\n      handlers.resolve(promise, returnValue);\n    }\n  });\n}\n\nhandlers.resolve = function (self, value) {\n  var result = tryCatch(getThen, value);\n  if (result.status === 'error') {\n    return handlers.reject(self, result.value);\n  }\n  var thenable = result.value;\n\n  if (thenable) {\n    safelyResolveThenable(self, thenable);\n  } else {\n    self.state = FULFILLED;\n    self.outcome = value;\n    var i = -1;\n    var len = self.queue.length;\n    while (++i < len) {\n      self.queue[i].callFulfilled(value);\n    }\n  }\n  return self;\n};\nhandlers.reject = function (self, error) {\n  self.state = REJECTED;\n  self.outcome = error;\n  var i = -1;\n  var len = self.queue.length;\n  while (++i < len) {\n    self.queue[i].callRejected(error);\n  }\n  return self;\n};\n\nfunction getThen(obj) {\n  // Make sure we only access the accessor once as required by the spec\n  var then = obj && obj.then;\n  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n    return function appyThen() {\n      then.apply(obj, arguments);\n    };\n  }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n  // Either fulfill, reject or reject with error\n  var called = false;\n  function onError(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.reject(self, value);\n  }\n\n  function onSuccess(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.resolve(self, value);\n  }\n\n  function tryToUnwrap() {\n    thenable(onSuccess, onError);\n  }\n\n  var result = tryCatch(tryToUnwrap);\n  if (result.status === 'error') {\n    onError(result.value);\n  }\n}\n\nfunction tryCatch(func, value) {\n  var out = {};\n  try {\n    out.value = func(value);\n    out.status = 'success';\n  } catch (e) {\n    out.status = 'error';\n    out.value = e;\n  }\n  return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n  if (value instanceof this) {\n    return value;\n  }\n  return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n  var promise = new this(INTERNAL);\n  return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var values = new Array(len);\n  var resolved = 0;\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    allResolver(iterable[i], i);\n  }\n  return promise;\n  function allResolver(value, i) {\n    self.resolve(value).then(resolveFromAll, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n    function resolveFromAll(outValue) {\n      values[i] = outValue;\n      if (++resolved === len && !called) {\n        called = true;\n        handlers.resolve(promise, values);\n      }\n    }\n  }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    resolver(iterable[i]);\n  }\n  return promise;\n  function resolver(value) {\n    self.resolve(value).then(function (response) {\n      if (!called) {\n        called = true;\n        handlers.resolve(promise, response);\n      }\n    }, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n  }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n  global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n    /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n    try {\n        if (typeof indexedDB !== 'undefined') {\n            return indexedDB;\n        }\n        if (typeof webkitIndexedDB !== 'undefined') {\n            return webkitIndexedDB;\n        }\n        if (typeof mozIndexedDB !== 'undefined') {\n            return mozIndexedDB;\n        }\n        if (typeof OIndexedDB !== 'undefined') {\n            return OIndexedDB;\n        }\n        if (typeof msIndexedDB !== 'undefined') {\n            return msIndexedDB;\n        }\n    } catch (e) {\n        return;\n    }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n    try {\n        // Initialize IndexedDB; fall back to vendor-prefixed versions\n        // if needed.\n        if (!idb || !idb.open) {\n            return false;\n        }\n        // We mimic PouchDB here;\n        //\n        // We test for openDatabase because IE Mobile identifies itself\n        // as Safari. Oh the lulz...\n        var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n        var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n        // Safari <10.1 does not meet our requirements for IDB support\n        // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n        // Safari 10.1 shipped with fetch, we can use that to detect it.\n        // Note: this creates issues with `window.fetch` polyfills and\n        // overrides; see:\n        // https://github.com/localForage/localForage/issues/856\n        return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n        // some outdated implementations of IDB that appear on Samsung\n        // and HTC Android devices <4.4 are missing IDBKeyRange\n        // See: https://github.com/mozilla/localForage/issues/128\n        // See: https://github.com/mozilla/localForage/issues/272\n        typeof IDBKeyRange !== 'undefined';\n    } catch (e) {\n        return false;\n    }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n    /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n    parts = parts || [];\n    properties = properties || {};\n    try {\n        return new Blob(parts, properties);\n    } catch (e) {\n        if (e.name !== 'TypeError') {\n            throw e;\n        }\n        var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n        var builder = new Builder();\n        for (var i = 0; i < parts.length; i += 1) {\n            builder.append(parts[i]);\n        }\n        return builder.getBlob(properties.type);\n    }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n    // In the \"nopromises\" build this will just throw if you don't have\n    // a global promise object, but it would throw anyway later.\n    _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n    if (callback) {\n        promise.then(function (result) {\n            callback(null, result);\n        }, function (error) {\n            callback(error);\n        });\n    }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n    if (typeof callback === 'function') {\n        promise.then(callback);\n    }\n\n    if (typeof errorCallback === 'function') {\n        promise[\"catch\"](errorCallback);\n    }\n}\n\nfunction normalizeKey(key) {\n    // Cast the key to a string, as that's all we can set as a key.\n    if (typeof key !== 'string') {\n        console.warn(key + ' used as a key, but it is not a string.');\n        key = String(key);\n    }\n\n    return key;\n}\n\nfunction getCallback() {\n    if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n        return arguments[arguments.length - 1];\n    }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n    var length = bin.length;\n    var buf = new ArrayBuffer(length);\n    var arr = new Uint8Array(buf);\n    for (var i = 0; i < length; i++) {\n        arr[i] = bin.charCodeAt(i);\n    }\n    return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n    return new Promise$1(function (resolve) {\n        var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n        var blob = createBlob(['']);\n        txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n        txn.onabort = function (e) {\n            // If the transaction aborts now its due to not being able to\n            // write to the database, likely due to the disk being full\n            e.preventDefault();\n            e.stopPropagation();\n            resolve(false);\n        };\n\n        txn.oncomplete = function () {\n            var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n            var matchedEdge = navigator.userAgent.match(/Edge\\//);\n            // MS Edge pretends to be Chrome 42:\n            // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n            resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n        };\n    })[\"catch\"](function () {\n        return false; // error, so assume unsupported\n    });\n}\n\nfunction _checkBlobSupport(idb) {\n    if (typeof supportsBlobs === 'boolean') {\n        return Promise$1.resolve(supportsBlobs);\n    }\n    return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n        supportsBlobs = value;\n        return supportsBlobs;\n    });\n}\n\nfunction _deferReadiness(dbInfo) {\n    var dbContext = dbContexts[dbInfo.name];\n\n    // Create a deferred object representing the current database operation.\n    var deferredOperation = {};\n\n    deferredOperation.promise = new Promise$1(function (resolve, reject) {\n        deferredOperation.resolve = resolve;\n        deferredOperation.reject = reject;\n    });\n\n    // Enqueue the deferred operation.\n    dbContext.deferredOperations.push(deferredOperation);\n\n    // Chain its promise to the database readiness.\n    if (!dbContext.dbReady) {\n        dbContext.dbReady = deferredOperation.promise;\n    } else {\n        dbContext.dbReady = dbContext.dbReady.then(function () {\n            return deferredOperation.promise;\n        });\n    }\n}\n\nfunction _advanceReadiness(dbInfo) {\n    var dbContext = dbContexts[dbInfo.name];\n\n    // Dequeue a deferred operation.\n    var deferredOperation = dbContext.deferredOperations.pop();\n\n    // Resolve its promise (which is part of the database readiness\n    // chain of promises).\n    if (deferredOperation) {\n        deferredOperation.resolve();\n        return deferredOperation.promise;\n    }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n    var dbContext = dbContexts[dbInfo.name];\n\n    // Dequeue a deferred operation.\n    var deferredOperation = dbContext.deferredOperations.pop();\n\n    // Reject its promise (which is part of the database readiness\n    // chain of promises).\n    if (deferredOperation) {\n        deferredOperation.reject(err);\n        return deferredOperation.promise;\n    }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n    return new Promise$1(function (resolve, reject) {\n        dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n        if (dbInfo.db) {\n            if (upgradeNeeded) {\n                _deferReadiness(dbInfo);\n                dbInfo.db.close();\n            } else {\n                return resolve(dbInfo.db);\n            }\n        }\n\n        var dbArgs = [dbInfo.name];\n\n        if (upgradeNeeded) {\n            dbArgs.push(dbInfo.version);\n        }\n\n        var openreq = idb.open.apply(idb, dbArgs);\n\n        if (upgradeNeeded) {\n            openreq.onupgradeneeded = function (e) {\n                var db = openreq.result;\n                try {\n                    db.createObjectStore(dbInfo.storeName);\n                    if (e.oldVersion <= 1) {\n                        // Added when support for blob shims was added\n                        db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n                    }\n                } catch (ex) {\n                    if (ex.name === 'ConstraintError') {\n                        console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n                    } else {\n                        throw ex;\n                    }\n                }\n            };\n        }\n\n        openreq.onerror = function (e) {\n            e.preventDefault();\n            reject(openreq.error);\n        };\n\n        openreq.onsuccess = function () {\n            var db = openreq.result;\n            db.onversionchange = function (e) {\n                // Triggered when the database is modified (e.g. adding an objectStore) or\n                // deleted (even when initiated by other sessions in different tabs).\n                // Closing the connection here prevents those operations from being blocked.\n                // If the database is accessed again later by this instance, the connection\n                // will be reopened or the database recreated as needed.\n                e.target.close();\n            };\n            resolve(db);\n            _advanceReadiness(dbInfo);\n        };\n    });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n    return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n    return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n    if (!dbInfo.db) {\n        return true;\n    }\n\n    var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n    var isDowngrade = dbInfo.version < dbInfo.db.version;\n    var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n    if (isDowngrade) {\n        // If the version is not the default one\n        // then warn for impossible downgrade.\n        if (dbInfo.version !== defaultVersion) {\n            console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n        }\n        // Align the versions to prevent errors.\n        dbInfo.version = dbInfo.db.version;\n    }\n\n    if (isUpgrade || isNewStore) {\n        // If the store is new then increment the version (if needed).\n        // This will trigger an \"upgradeneeded\" event which is required\n        // for creating a store.\n        if (isNewStore) {\n            var incVersion = dbInfo.db.version + 1;\n            if (incVersion > dbInfo.version) {\n                dbInfo.version = incVersion;\n            }\n        }\n\n        return true;\n    }\n\n    return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n    return new Promise$1(function (resolve, reject) {\n        var reader = new FileReader();\n        reader.onerror = reject;\n        reader.onloadend = function (e) {\n            var base64 = btoa(e.target.result || '');\n            resolve({\n                __local_forage_encoded_blob: true,\n                data: base64,\n                type: blob.type\n            });\n        };\n        reader.readAsBinaryString(blob);\n    });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n    var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n    return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n    return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n    var self = this;\n\n    var promise = self._initReady().then(function () {\n        var dbContext = dbContexts[self._dbInfo.name];\n\n        if (dbContext && dbContext.dbReady) {\n            return dbContext.dbReady;\n        }\n    });\n\n    executeTwoCallbacks(promise, callback, callback);\n    return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n    _deferReadiness(dbInfo);\n\n    var dbContext = dbContexts[dbInfo.name];\n    var forages = dbContext.forages;\n\n    for (var i = 0; i < forages.length; i++) {\n        var forage = forages[i];\n        if (forage._dbInfo.db) {\n            forage._dbInfo.db.close();\n            forage._dbInfo.db = null;\n        }\n    }\n    dbInfo.db = null;\n\n    return _getOriginalConnection(dbInfo).then(function (db) {\n        dbInfo.db = db;\n        if (_isUpgradeNeeded(dbInfo)) {\n            // Reopen the database for upgrading.\n            return _getUpgradedConnection(dbInfo);\n        }\n        return db;\n    }).then(function (db) {\n        // store the latest db reference\n        // in case the db was upgraded\n        dbInfo.db = dbContext.db = db;\n        for (var i = 0; i < forages.length; i++) {\n            forages[i]._dbInfo.db = db;\n        }\n    })[\"catch\"](function (err) {\n        _rejectReadiness(dbInfo, err);\n        throw err;\n    });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n    if (retries === undefined) {\n        retries = 1;\n    }\n\n    try {\n        var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n        callback(null, tx);\n    } catch (err) {\n        if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n            return Promise$1.resolve().then(function () {\n                if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n                    // increase the db version, to create the new ObjectStore\n                    if (dbInfo.db) {\n                        dbInfo.version = dbInfo.db.version + 1;\n                    }\n                    // Reopen the database for upgrading.\n                    return _getUpgradedConnection(dbInfo);\n                }\n            }).then(function () {\n                return _tryReconnect(dbInfo).then(function () {\n                    createTransaction(dbInfo, mode, callback, retries - 1);\n                });\n            })[\"catch\"](callback);\n        }\n\n        callback(err);\n    }\n}\n\nfunction createDbContext() {\n    return {\n        // Running localForages sharing a database.\n        forages: [],\n        // Shared database.\n        db: null,\n        // Database readiness (promise).\n        dbReady: null,\n        // Deferred operations on the database.\n        deferredOperations: []\n    };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n    var self = this;\n    var dbInfo = {\n        db: null\n    };\n\n    if (options) {\n        for (var i in options) {\n            dbInfo[i] = options[i];\n        }\n    }\n\n    // Get the current context of the database;\n    var dbContext = dbContexts[dbInfo.name];\n\n    // ...or create a new context.\n    if (!dbContext) {\n        dbContext = createDbContext();\n        // Register the new context in the global container.\n        dbContexts[dbInfo.name] = dbContext;\n    }\n\n    // Register itself as a running localForage in the current context.\n    dbContext.forages.push(self);\n\n    // Replace the default `ready()` function with the specialized one.\n    if (!self._initReady) {\n        self._initReady = self.ready;\n        self.ready = _fullyReady;\n    }\n\n    // Create an array of initialization states of the related localForages.\n    var initPromises = [];\n\n    function ignoreErrors() {\n        // Don't handle errors here,\n        // just makes sure related localForages aren't pending.\n        return Promise$1.resolve();\n    }\n\n    for (var j = 0; j < dbContext.forages.length; j++) {\n        var forage = dbContext.forages[j];\n        if (forage !== self) {\n            // Don't wait for itself...\n            initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n        }\n    }\n\n    // Take a snapshot of the related localForages.\n    var forages = dbContext.forages.slice(0);\n\n    // Initialize the connection process only when\n    // all the related localForages aren't pending.\n    return Promise$1.all(initPromises).then(function () {\n        dbInfo.db = dbContext.db;\n        // Get the connection or open a new one without upgrade.\n        return _getOriginalConnection(dbInfo);\n    }).then(function (db) {\n        dbInfo.db = db;\n        if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n            // Reopen the database for upgrading.\n            return _getUpgradedConnection(dbInfo);\n        }\n        return db;\n    }).then(function (db) {\n        dbInfo.db = dbContext.db = db;\n        self._dbInfo = dbInfo;\n        // Share the final connection amongst related localForages.\n        for (var k = 0; k < forages.length; k++) {\n            var forage = forages[k];\n            if (forage !== self) {\n                // Self is already up-to-date.\n                forage._dbInfo.db = dbInfo.db;\n                forage._dbInfo.version = dbInfo.version;\n            }\n        }\n    });\n}\n\nfunction getItem(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var req = store.get(key);\n\n                    req.onsuccess = function () {\n                        var value = req.result;\n                        if (value === undefined) {\n                            value = null;\n                        }\n                        if (_isEncodedBlob(value)) {\n                            value = _decodeBlob(value);\n                        }\n                        resolve(value);\n                    };\n\n                    req.onerror = function () {\n                        reject(req.error);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var req = store.openCursor();\n                    var iterationNumber = 1;\n\n                    req.onsuccess = function () {\n                        var cursor = req.result;\n\n                        if (cursor) {\n                            var value = cursor.value;\n                            if (_isEncodedBlob(value)) {\n                                value = _decodeBlob(value);\n                            }\n                            var result = iterator(value, cursor.key, iterationNumber++);\n\n                            // when the iterator callback returns any\n                            // (non-`undefined`) value, then we stop\n                            // the iteration immediately\n                            if (result !== void 0) {\n                                resolve(result);\n                            } else {\n                                cursor[\"continue\"]();\n                            }\n                        } else {\n                            resolve();\n                        }\n                    };\n\n                    req.onerror = function () {\n                        reject(req.error);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n\n    return promise;\n}\n\nfunction setItem(key, value, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        var dbInfo;\n        self.ready().then(function () {\n            dbInfo = self._dbInfo;\n            if (toString.call(value) === '[object Blob]') {\n                return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n                    if (blobSupport) {\n                        return value;\n                    }\n                    return _encodeBlob(value);\n                });\n            }\n            return value;\n        }).then(function (value) {\n            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n\n                    // The reason we don't _save_ null is because IE 10 does\n                    // not support saving the `null` type in IndexedDB. How\n                    // ironic, given the bug below!\n                    // See: https://github.com/mozilla/localForage/issues/161\n                    if (value === null) {\n                        value = undefined;\n                    }\n\n                    var req = store.put(value, key);\n\n                    transaction.oncomplete = function () {\n                        // Cast to undefined so the value passed to\n                        // callback/promise is the same as what one would get out\n                        // of `getItem()` later. This leads to some weirdness\n                        // (setItem('foo', undefined) will return `null`), but\n                        // it's not my fault localStorage is our baseline and that\n                        // it's weird.\n                        if (value === undefined) {\n                            value = null;\n                        }\n\n                        resolve(value);\n                    };\n                    transaction.onabort = transaction.onerror = function () {\n                        var err = req.error ? req.error : req.transaction.error;\n                        reject(err);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction removeItem(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    // We use a Grunt task to make this safe for IE and some\n                    // versions of Android (including those used by Cordova).\n                    // Normally IE won't like `.delete()` and will insist on\n                    // using `['delete']()`, but we have a build step that\n                    // fixes this for us now.\n                    var req = store[\"delete\"](key);\n                    transaction.oncomplete = function () {\n                        resolve();\n                    };\n\n                    transaction.onerror = function () {\n                        reject(req.error);\n                    };\n\n                    // The request will be also be aborted if we've exceeded our storage\n                    // space.\n                    transaction.onabort = function () {\n                        var err = req.error ? req.error : req.transaction.error;\n                        reject(err);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction clear(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var req = store.clear();\n\n                    transaction.oncomplete = function () {\n                        resolve();\n                    };\n\n                    transaction.onabort = transaction.onerror = function () {\n                        var err = req.error ? req.error : req.transaction.error;\n                        reject(err);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction length(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var req = store.count();\n\n                    req.onsuccess = function () {\n                        resolve(req.result);\n                    };\n\n                    req.onerror = function () {\n                        reject(req.error);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction key(n, callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        if (n < 0) {\n            resolve(null);\n\n            return;\n        }\n\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var advanced = false;\n                    var req = store.openKeyCursor();\n\n                    req.onsuccess = function () {\n                        var cursor = req.result;\n                        if (!cursor) {\n                            // this means there weren't enough keys\n                            resolve(null);\n\n                            return;\n                        }\n\n                        if (n === 0) {\n                            // We have the first key, return it if that's what they\n                            // wanted.\n                            resolve(cursor.key);\n                        } else {\n                            if (!advanced) {\n                                // Otherwise, ask the cursor to skip ahead n\n                                // records.\n                                advanced = true;\n                                cursor.advance(n);\n                            } else {\n                                // When we get here, we've got the nth key.\n                                resolve(cursor.key);\n                            }\n                        }\n                    };\n\n                    req.onerror = function () {\n                        reject(req.error);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction keys(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n                if (err) {\n                    return reject(err);\n                }\n\n                try {\n                    var store = transaction.objectStore(self._dbInfo.storeName);\n                    var req = store.openKeyCursor();\n                    var keys = [];\n\n                    req.onsuccess = function () {\n                        var cursor = req.result;\n\n                        if (!cursor) {\n                            resolve(keys);\n                            return;\n                        }\n\n                        keys.push(cursor.key);\n                        cursor[\"continue\"]();\n                    };\n\n                    req.onerror = function () {\n                        reject(req.error);\n                    };\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction dropInstance(options, callback) {\n    callback = getCallback.apply(this, arguments);\n\n    var currentConfig = this.config();\n    options = typeof options !== 'function' && options || {};\n    if (!options.name) {\n        options.name = options.name || currentConfig.name;\n        options.storeName = options.storeName || currentConfig.storeName;\n    }\n\n    var self = this;\n    var promise;\n    if (!options.name) {\n        promise = Promise$1.reject('Invalid arguments');\n    } else {\n        var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n        var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n            var dbContext = dbContexts[options.name];\n            var forages = dbContext.forages;\n            dbContext.db = db;\n            for (var i = 0; i < forages.length; i++) {\n                forages[i]._dbInfo.db = db;\n            }\n            return db;\n        });\n\n        if (!options.storeName) {\n            promise = dbPromise.then(function (db) {\n                _deferReadiness(options);\n\n                var dbContext = dbContexts[options.name];\n                var forages = dbContext.forages;\n\n                db.close();\n                for (var i = 0; i < forages.length; i++) {\n                    var forage = forages[i];\n                    forage._dbInfo.db = null;\n                }\n\n                var dropDBPromise = new Promise$1(function (resolve, reject) {\n                    var req = idb.deleteDatabase(options.name);\n\n                    req.onerror = function () {\n                        var db = req.result;\n                        if (db) {\n                            db.close();\n                        }\n                        reject(req.error);\n                    };\n\n                    req.onblocked = function () {\n                        // Closing all open connections in onversionchange handler should prevent this situation, but if\n                        // we do get here, it just means the request remains pending - eventually it will succeed or error\n                        console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n                    };\n\n                    req.onsuccess = function () {\n                        var db = req.result;\n                        if (db) {\n                            db.close();\n                        }\n                        resolve(db);\n                    };\n                });\n\n                return dropDBPromise.then(function (db) {\n                    dbContext.db = db;\n                    for (var i = 0; i < forages.length; i++) {\n                        var _forage = forages[i];\n                        _advanceReadiness(_forage._dbInfo);\n                    }\n                })[\"catch\"](function (err) {\n                    (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n                    throw err;\n                });\n            });\n        } else {\n            promise = dbPromise.then(function (db) {\n                if (!db.objectStoreNames.contains(options.storeName)) {\n                    return;\n                }\n\n                var newVersion = db.version + 1;\n\n                _deferReadiness(options);\n\n                var dbContext = dbContexts[options.name];\n                var forages = dbContext.forages;\n\n                db.close();\n                for (var i = 0; i < forages.length; i++) {\n                    var forage = forages[i];\n                    forage._dbInfo.db = null;\n                    forage._dbInfo.version = newVersion;\n                }\n\n                var dropObjectPromise = new Promise$1(function (resolve, reject) {\n                    var req = idb.open(options.name, newVersion);\n\n                    req.onerror = function (err) {\n                        var db = req.result;\n                        db.close();\n                        reject(err);\n                    };\n\n                    req.onupgradeneeded = function () {\n                        var db = req.result;\n                        db.deleteObjectStore(options.storeName);\n                    };\n\n                    req.onsuccess = function () {\n                        var db = req.result;\n                        db.close();\n                        resolve(db);\n                    };\n                });\n\n                return dropObjectPromise.then(function (db) {\n                    dbContext.db = db;\n                    for (var j = 0; j < forages.length; j++) {\n                        var _forage2 = forages[j];\n                        _forage2._dbInfo.db = db;\n                        _advanceReadiness(_forage2._dbInfo);\n                    }\n                })[\"catch\"](function (err) {\n                    (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n                    throw err;\n                });\n            });\n        }\n    }\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nvar asyncStorage = {\n    _driver: 'asyncStorage',\n    _initStorage: _initStorage,\n    _support: isIndexedDBValid(),\n    iterate: iterate,\n    getItem: getItem,\n    setItem: setItem,\n    removeItem: removeItem,\n    clear: clear,\n    length: length,\n    key: key,\n    keys: keys,\n    dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n    return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n    // Fill the string into a ArrayBuffer.\n    var bufferLength = serializedString.length * 0.75;\n    var len = serializedString.length;\n    var i;\n    var p = 0;\n    var encoded1, encoded2, encoded3, encoded4;\n\n    if (serializedString[serializedString.length - 1] === '=') {\n        bufferLength--;\n        if (serializedString[serializedString.length - 2] === '=') {\n            bufferLength--;\n        }\n    }\n\n    var buffer = new ArrayBuffer(bufferLength);\n    var bytes = new Uint8Array(buffer);\n\n    for (i = 0; i < len; i += 4) {\n        encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n        encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n        encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n        encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n        /*jslint bitwise: true */\n        bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n        bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n        bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n    }\n    return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n    // base64-arraybuffer\n    var bytes = new Uint8Array(buffer);\n    var base64String = '';\n    var i;\n\n    for (i = 0; i < bytes.length; i += 3) {\n        /*jslint bitwise: true */\n        base64String += BASE_CHARS[bytes[i] >> 2];\n        base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n        base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n        base64String += BASE_CHARS[bytes[i + 2] & 63];\n    }\n\n    if (bytes.length % 3 === 2) {\n        base64String = base64String.substring(0, base64String.length - 1) + '=';\n    } else if (bytes.length % 3 === 1) {\n        base64String = base64String.substring(0, base64String.length - 2) + '==';\n    }\n\n    return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n    var valueType = '';\n    if (value) {\n        valueType = toString$1.call(value);\n    }\n\n    // Cannot use `value instanceof ArrayBuffer` or such here, as these\n    // checks fail when running the tests using casper.js...\n    //\n    // TODO: See why those tests fail and use a better solution.\n    if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n        // Convert binary arrays to a string and prefix the string with\n        // a special marker.\n        var buffer;\n        var marker = SERIALIZED_MARKER;\n\n        if (value instanceof ArrayBuffer) {\n            buffer = value;\n            marker += TYPE_ARRAYBUFFER;\n        } else {\n            buffer = value.buffer;\n\n            if (valueType === '[object Int8Array]') {\n                marker += TYPE_INT8ARRAY;\n            } else if (valueType === '[object Uint8Array]') {\n                marker += TYPE_UINT8ARRAY;\n            } else if (valueType === '[object Uint8ClampedArray]') {\n                marker += TYPE_UINT8CLAMPEDARRAY;\n            } else if (valueType === '[object Int16Array]') {\n                marker += TYPE_INT16ARRAY;\n            } else if (valueType === '[object Uint16Array]') {\n                marker += TYPE_UINT16ARRAY;\n            } else if (valueType === '[object Int32Array]') {\n                marker += TYPE_INT32ARRAY;\n            } else if (valueType === '[object Uint32Array]') {\n                marker += TYPE_UINT32ARRAY;\n            } else if (valueType === '[object Float32Array]') {\n                marker += TYPE_FLOAT32ARRAY;\n            } else if (valueType === '[object Float64Array]') {\n                marker += TYPE_FLOAT64ARRAY;\n            } else {\n                callback(new Error('Failed to get type for BinaryArray'));\n            }\n        }\n\n        callback(marker + bufferToString(buffer));\n    } else if (valueType === '[object Blob]') {\n        // Conver the blob to a binaryArray and then to a string.\n        var fileReader = new FileReader();\n\n        fileReader.onload = function () {\n            // Backwards-compatible prefix for the blob type.\n            var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n            callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n        };\n\n        fileReader.readAsArrayBuffer(value);\n    } else {\n        try {\n            callback(JSON.stringify(value));\n        } catch (e) {\n            console.error(\"Couldn't convert value into a JSON string: \", value);\n\n            callback(null, e);\n        }\n    }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n    // If we haven't marked this string as being specially serialized (i.e.\n    // something other than serialized JSON), we can just return it and be\n    // done with it.\n    if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n        return JSON.parse(value);\n    }\n\n    // The following code deals with deserializing some kind of Blob or\n    // TypedArray. First we separate out the type of data we're dealing\n    // with from the data itself.\n    var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n    var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n    var blobType;\n    // Backwards-compatible blob type serialization strategy.\n    // DBs created with older versions of localForage will simply not have the blob type.\n    if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n        var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n        blobType = matcher[1];\n        serializedString = serializedString.substring(matcher[0].length);\n    }\n    var buffer = stringToBuffer(serializedString);\n\n    // Return the right type based on the code/type set during\n    // serialization.\n    switch (type) {\n        case TYPE_ARRAYBUFFER:\n            return buffer;\n        case TYPE_BLOB:\n            return createBlob([buffer], { type: blobType });\n        case TYPE_INT8ARRAY:\n            return new Int8Array(buffer);\n        case TYPE_UINT8ARRAY:\n            return new Uint8Array(buffer);\n        case TYPE_UINT8CLAMPEDARRAY:\n            return new Uint8ClampedArray(buffer);\n        case TYPE_INT16ARRAY:\n            return new Int16Array(buffer);\n        case TYPE_UINT16ARRAY:\n            return new Uint16Array(buffer);\n        case TYPE_INT32ARRAY:\n            return new Int32Array(buffer);\n        case TYPE_UINT32ARRAY:\n            return new Uint32Array(buffer);\n        case TYPE_FLOAT32ARRAY:\n            return new Float32Array(buffer);\n        case TYPE_FLOAT64ARRAY:\n            return new Float64Array(buffer);\n        default:\n            throw new Error('Unkown type: ' + type);\n    }\n}\n\nvar localforageSerializer = {\n    serialize: serialize,\n    deserialize: deserialize,\n    stringToBuffer: stringToBuffer,\n    bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n    t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n    var self = this;\n    var dbInfo = {\n        db: null\n    };\n\n    if (options) {\n        for (var i in options) {\n            dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n        }\n    }\n\n    var dbInfoPromise = new Promise$1(function (resolve, reject) {\n        // Open the database; the openDatabase API will automatically\n        // create it for us if it doesn't exist.\n        try {\n            dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n        } catch (e) {\n            return reject(e);\n        }\n\n        // Create our key/value table if it doesn't exist.\n        dbInfo.db.transaction(function (t) {\n            createDbTable(t, dbInfo, function () {\n                self._dbInfo = dbInfo;\n                resolve();\n            }, function (t, error) {\n                reject(error);\n            });\n        }, reject);\n    });\n\n    dbInfo.serializer = localforageSerializer;\n    return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n    t.executeSql(sqlStatement, args, callback, function (t, error) {\n        if (error.code === error.SYNTAX_ERR) {\n            t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n                if (!results.rows.length) {\n                    // if the table is missing (was deleted)\n                    // re-create it table and retry\n                    createDbTable(t, dbInfo, function () {\n                        t.executeSql(sqlStatement, args, callback, errorCallback);\n                    }, errorCallback);\n                } else {\n                    errorCallback(t, error);\n                }\n            }, errorCallback);\n        } else {\n            errorCallback(t, error);\n        }\n    }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n                    var result = results.rows.length ? results.rows.item(0).value : null;\n\n                    // Check to see if this is serialized content we need to\n                    // unpack.\n                    if (result) {\n                        result = dbInfo.serializer.deserialize(result);\n                    }\n\n                    resolve(result);\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n                    var rows = results.rows;\n                    var length = rows.length;\n\n                    for (var i = 0; i < length; i++) {\n                        var item = rows.item(i);\n                        var result = item.value;\n\n                        // Check to see if this is serialized content\n                        // we need to unpack.\n                        if (result) {\n                            result = dbInfo.serializer.deserialize(result);\n                        }\n\n                        result = iterator(result, item.key, i + 1);\n\n                        // void(0) prevents problems with redefinition\n                        // of `undefined`.\n                        if (result !== void 0) {\n                            resolve(result);\n                            return;\n                        }\n                    }\n\n                    resolve();\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            // The localStorage API doesn't return undefined values in an\n            // \"expected\" way, so undefined is always cast to null in all\n            // drivers. See: https://github.com/mozilla/localForage/pull/42\n            if (value === undefined) {\n                value = null;\n            }\n\n            // Save the original value to pass to the callback.\n            var originalValue = value;\n\n            var dbInfo = self._dbInfo;\n            dbInfo.serializer.serialize(value, function (value, error) {\n                if (error) {\n                    reject(error);\n                } else {\n                    dbInfo.db.transaction(function (t) {\n                        tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n                            resolve(originalValue);\n                        }, function (t, error) {\n                            reject(error);\n                        });\n                    }, function (sqlError) {\n                        // The transaction failed; check\n                        // to see if it's a quota error.\n                        if (sqlError.code === sqlError.QUOTA_ERR) {\n                            // We reject the callback outright for now, but\n                            // it's worth trying to re-run the transaction.\n                            // Even if the user accepts the prompt to use\n                            // more storage on Safari, this error will\n                            // be called.\n                            //\n                            // Try to re-run the transaction.\n                            if (retriesLeft > 0) {\n                                resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n                                return;\n                            }\n                            reject(sqlError);\n                        }\n                    });\n                }\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n    return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n                    resolve();\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n                    resolve();\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                // Ahhh, SQL makes this one soooooo easy.\n                tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n                    var result = results.rows.item(0).c;\n                    resolve(result);\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n                    var result = results.rows.length ? results.rows.item(0).key : null;\n                    resolve(result);\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction keys$1(callback) {\n    var self = this;\n\n    var promise = new Promise$1(function (resolve, reject) {\n        self.ready().then(function () {\n            var dbInfo = self._dbInfo;\n            dbInfo.db.transaction(function (t) {\n                tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n                    var keys = [];\n\n                    for (var i = 0; i < results.rows.length; i++) {\n                        keys.push(results.rows.item(i).key);\n                    }\n\n                    resolve(keys);\n                }, function (t, error) {\n                    reject(error);\n                });\n            });\n        })[\"catch\"](reject);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n    return new Promise$1(function (resolve, reject) {\n        db.transaction(function (t) {\n            t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n                var storeNames = [];\n\n                for (var i = 0; i < results.rows.length; i++) {\n                    storeNames.push(results.rows.item(i).name);\n                }\n\n                resolve({\n                    db: db,\n                    storeNames: storeNames\n                });\n            }, function (t, error) {\n                reject(error);\n            });\n        }, function (sqlError) {\n            reject(sqlError);\n        });\n    });\n}\n\nfunction dropInstance$1(options, callback) {\n    callback = getCallback.apply(this, arguments);\n\n    var currentConfig = this.config();\n    options = typeof options !== 'function' && options || {};\n    if (!options.name) {\n        options.name = options.name || currentConfig.name;\n        options.storeName = options.storeName || currentConfig.storeName;\n    }\n\n    var self = this;\n    var promise;\n    if (!options.name) {\n        promise = Promise$1.reject('Invalid arguments');\n    } else {\n        promise = new Promise$1(function (resolve) {\n            var db;\n            if (options.name === currentConfig.name) {\n                // use the db reference of the current instance\n                db = self._dbInfo.db;\n            } else {\n                db = openDatabase(options.name, '', '', 0);\n            }\n\n            if (!options.storeName) {\n                // drop all database tables\n                resolve(getAllStoreNames(db));\n            } else {\n                resolve({\n                    db: db,\n                    storeNames: [options.storeName]\n                });\n            }\n        }).then(function (operationInfo) {\n            return new Promise$1(function (resolve, reject) {\n                operationInfo.db.transaction(function (t) {\n                    function dropTable(storeName) {\n                        return new Promise$1(function (resolve, reject) {\n                            t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n                                resolve();\n                            }, function (t, error) {\n                                reject(error);\n                            });\n                        });\n                    }\n\n                    var operations = [];\n                    for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n                        operations.push(dropTable(operationInfo.storeNames[i]));\n                    }\n\n                    Promise$1.all(operations).then(function () {\n                        resolve();\n                    })[\"catch\"](function (e) {\n                        reject(e);\n                    });\n                }, function (sqlError) {\n                    reject(sqlError);\n                });\n            });\n        });\n    }\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nvar webSQLStorage = {\n    _driver: 'webSQLStorage',\n    _initStorage: _initStorage$1,\n    _support: isWebSQLValid(),\n    iterate: iterate$1,\n    getItem: getItem$1,\n    setItem: setItem$1,\n    removeItem: removeItem$1,\n    clear: clear$1,\n    length: length$1,\n    key: key$1,\n    keys: keys$1,\n    dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n    try {\n        return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n        // in IE8 typeof localStorage.setItem === 'object'\n        !!localStorage.setItem;\n    } catch (e) {\n        return false;\n    }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n    var keyPrefix = options.name + '/';\n\n    if (options.storeName !== defaultConfig.storeName) {\n        keyPrefix += options.storeName + '/';\n    }\n    return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n    var localStorageTestKey = '_localforage_support_test';\n\n    try {\n        localStorage.setItem(localStorageTestKey, true);\n        localStorage.removeItem(localStorageTestKey);\n\n        return false;\n    } catch (e) {\n        return true;\n    }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n    return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n    var self = this;\n    var dbInfo = {};\n    if (options) {\n        for (var i in options) {\n            dbInfo[i] = options[i];\n        }\n    }\n\n    dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n    if (!_isLocalStorageUsable()) {\n        return Promise$1.reject();\n    }\n\n    self._dbInfo = dbInfo;\n    dbInfo.serializer = localforageSerializer;\n\n    return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n    var self = this;\n    var promise = self.ready().then(function () {\n        var keyPrefix = self._dbInfo.keyPrefix;\n\n        for (var i = localStorage.length - 1; i >= 0; i--) {\n            var key = localStorage.key(i);\n\n            if (key.indexOf(keyPrefix) === 0) {\n                localStorage.removeItem(key);\n            }\n        }\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = self.ready().then(function () {\n        var dbInfo = self._dbInfo;\n        var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n        // If a result was found, parse it from the serialized\n        // string into a JS object. If result isn't truthy, the key\n        // is likely undefined and we'll pass it straight to the\n        // callback.\n        if (result) {\n            result = dbInfo.serializer.deserialize(result);\n        }\n\n        return result;\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n    var self = this;\n\n    var promise = self.ready().then(function () {\n        var dbInfo = self._dbInfo;\n        var keyPrefix = dbInfo.keyPrefix;\n        var keyPrefixLength = keyPrefix.length;\n        var length = localStorage.length;\n\n        // We use a dedicated iterator instead of the `i` variable below\n        // so other keys we fetch in localStorage aren't counted in\n        // the `iterationNumber` argument passed to the `iterate()`\n        // callback.\n        //\n        // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n        var iterationNumber = 1;\n\n        for (var i = 0; i < length; i++) {\n            var key = localStorage.key(i);\n            if (key.indexOf(keyPrefix) !== 0) {\n                continue;\n            }\n            var value = localStorage.getItem(key);\n\n            // If a result was found, parse it from the serialized\n            // string into a JS object. If result isn't truthy, the\n            // key is likely undefined and we'll pass it straight\n            // to the iterator.\n            if (value) {\n                value = dbInfo.serializer.deserialize(value);\n            }\n\n            value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n            if (value !== void 0) {\n                return value;\n            }\n        }\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n    var self = this;\n    var promise = self.ready().then(function () {\n        var dbInfo = self._dbInfo;\n        var result;\n        try {\n            result = localStorage.key(n);\n        } catch (error) {\n            result = null;\n        }\n\n        // Remove the prefix from the key, if a key is found.\n        if (result) {\n            result = result.substring(dbInfo.keyPrefix.length);\n        }\n\n        return result;\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction keys$2(callback) {\n    var self = this;\n    var promise = self.ready().then(function () {\n        var dbInfo = self._dbInfo;\n        var length = localStorage.length;\n        var keys = [];\n\n        for (var i = 0; i < length; i++) {\n            var itemKey = localStorage.key(i);\n            if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n                keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n            }\n        }\n\n        return keys;\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n    var self = this;\n    var promise = self.keys().then(function (keys) {\n        return keys.length;\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = self.ready().then(function () {\n        var dbInfo = self._dbInfo;\n        localStorage.removeItem(dbInfo.keyPrefix + key);\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n    var self = this;\n\n    key = normalizeKey(key);\n\n    var promise = self.ready().then(function () {\n        // Convert undefined values to null.\n        // https://github.com/mozilla/localForage/pull/42\n        if (value === undefined) {\n            value = null;\n        }\n\n        // Save the original value to pass to the callback.\n        var originalValue = value;\n\n        return new Promise$1(function (resolve, reject) {\n            var dbInfo = self._dbInfo;\n            dbInfo.serializer.serialize(value, function (value, error) {\n                if (error) {\n                    reject(error);\n                } else {\n                    try {\n                        localStorage.setItem(dbInfo.keyPrefix + key, value);\n                        resolve(originalValue);\n                    } catch (e) {\n                        // localStorage capacity exceeded.\n                        // TODO: Make this a specific error/event.\n                        if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n                            reject(e);\n                        }\n                        reject(e);\n                    }\n                }\n            });\n        });\n    });\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n    callback = getCallback.apply(this, arguments);\n\n    options = typeof options !== 'function' && options || {};\n    if (!options.name) {\n        var currentConfig = this.config();\n        options.name = options.name || currentConfig.name;\n        options.storeName = options.storeName || currentConfig.storeName;\n    }\n\n    var self = this;\n    var promise;\n    if (!options.name) {\n        promise = Promise$1.reject('Invalid arguments');\n    } else {\n        promise = new Promise$1(function (resolve) {\n            if (!options.storeName) {\n                resolve(options.name + '/');\n            } else {\n                resolve(_getKeyPrefix(options, self._defaultConfig));\n            }\n        }).then(function (keyPrefix) {\n            for (var i = localStorage.length - 1; i >= 0; i--) {\n                var key = localStorage.key(i);\n\n                if (key.indexOf(keyPrefix) === 0) {\n                    localStorage.removeItem(key);\n                }\n            }\n        });\n    }\n\n    executeCallback(promise, callback);\n    return promise;\n}\n\nvar localStorageWrapper = {\n    _driver: 'localStorageWrapper',\n    _initStorage: _initStorage$2,\n    _support: isLocalStorageValid(),\n    iterate: iterate$2,\n    getItem: getItem$2,\n    setItem: setItem$2,\n    removeItem: removeItem$2,\n    clear: clear$2,\n    length: length$2,\n    key: key$2,\n    keys: keys$2,\n    dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n    return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n    var len = array.length;\n    var i = 0;\n    while (i < len) {\n        if (sameValue(array[i], searchElement)) {\n            return true;\n        }\n        i++;\n    }\n\n    return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n    return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n    INDEXEDDB: asyncStorage,\n    WEBSQL: webSQLStorage,\n    LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n    description: '',\n    driver: DefaultDriverOrder.slice(),\n    name: 'localforage',\n    // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n    // we can use without a prompt.\n    size: 4980736,\n    storeName: 'keyvaluepairs',\n    version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n    localForageInstance[libraryMethod] = function () {\n        var _args = arguments;\n        return localForageInstance.ready().then(function () {\n            return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n        });\n    };\n}\n\nfunction extend() {\n    for (var i = 1; i < arguments.length; i++) {\n        var arg = arguments[i];\n\n        if (arg) {\n            for (var _key in arg) {\n                if (arg.hasOwnProperty(_key)) {\n                    if (isArray(arg[_key])) {\n                        arguments[0][_key] = arg[_key].slice();\n                    } else {\n                        arguments[0][_key] = arg[_key];\n                    }\n                }\n            }\n        }\n    }\n\n    return arguments[0];\n}\n\nvar LocalForage = function () {\n    function LocalForage(options) {\n        _classCallCheck(this, LocalForage);\n\n        for (var driverTypeKey in DefaultDrivers) {\n            if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n                var driver = DefaultDrivers[driverTypeKey];\n                var driverName = driver._driver;\n                this[driverTypeKey] = driverName;\n\n                if (!DefinedDrivers[driverName]) {\n                    // we don't need to wait for the promise,\n                    // since the default drivers can be defined\n                    // in a blocking manner\n                    this.defineDriver(driver);\n                }\n            }\n        }\n\n        this._defaultConfig = extend({}, DefaultConfig);\n        this._config = extend({}, this._defaultConfig, options);\n        this._driverSet = null;\n        this._initDriver = null;\n        this._ready = false;\n        this._dbInfo = null;\n\n        this._wrapLibraryMethodsWithReady();\n        this.setDriver(this._config.driver)[\"catch\"](function () {});\n    }\n\n    // Set any config values for localForage; can be called anytime before\n    // the first API call (e.g. `getItem`, `setItem`).\n    // We loop through options so we don't overwrite existing config\n    // values.\n\n\n    LocalForage.prototype.config = function config(options) {\n        // If the options argument is an object, we use it to set values.\n        // Otherwise, we return either a specified config value or all\n        // config values.\n        if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n            // If localforage is ready and fully initialized, we can't set\n            // any new configuration values. Instead, we return an error.\n            if (this._ready) {\n                return new Error(\"Can't call config() after localforage \" + 'has been used.');\n            }\n\n            for (var i in options) {\n                if (i === 'storeName') {\n                    options[i] = options[i].replace(/\\W/g, '_');\n                }\n\n                if (i === 'version' && typeof options[i] !== 'number') {\n                    return new Error('Database version must be a number.');\n                }\n\n                this._config[i] = options[i];\n            }\n\n            // after all config options are set and\n            // the driver option is used, try setting it\n            if ('driver' in options && options.driver) {\n                return this.setDriver(this._config.driver);\n            }\n\n            return true;\n        } else if (typeof options === 'string') {\n            return this._config[options];\n        } else {\n            return this._config;\n        }\n    };\n\n    // Used to define a custom driver, shared across all instances of\n    // localForage.\n\n\n    LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n        var promise = new Promise$1(function (resolve, reject) {\n            try {\n                var driverName = driverObject._driver;\n                var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n                // A driver name should be defined and not overlap with the\n                // library-defined, default drivers.\n                if (!driverObject._driver) {\n                    reject(complianceError);\n                    return;\n                }\n\n                var driverMethods = LibraryMethods.concat('_initStorage');\n                for (var i = 0, len = driverMethods.length; i < len; i++) {\n                    var driverMethodName = driverMethods[i];\n\n                    // when the property is there,\n                    // it should be a method even when optional\n                    var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n                    if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n                        reject(complianceError);\n                        return;\n                    }\n                }\n\n                var configureMissingMethods = function configureMissingMethods() {\n                    var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n                        return function () {\n                            var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n                            var promise = Promise$1.reject(error);\n                            executeCallback(promise, arguments[arguments.length - 1]);\n                            return promise;\n                        };\n                    };\n\n                    for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n                        var optionalDriverMethod = OptionalDriverMethods[_i];\n                        if (!driverObject[optionalDriverMethod]) {\n                            driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n                        }\n                    }\n                };\n\n                configureMissingMethods();\n\n                var setDriverSupport = function setDriverSupport(support) {\n                    if (DefinedDrivers[driverName]) {\n                        console.info('Redefining LocalForage driver: ' + driverName);\n                    }\n                    DefinedDrivers[driverName] = driverObject;\n                    DriverSupport[driverName] = support;\n                    // don't use a then, so that we can define\n                    // drivers that have simple _support methods\n                    // in a blocking manner\n                    resolve();\n                };\n\n                if ('_support' in driverObject) {\n                    if (driverObject._support && typeof driverObject._support === 'function') {\n                        driverObject._support().then(setDriverSupport, reject);\n                    } else {\n                        setDriverSupport(!!driverObject._support);\n                    }\n                } else {\n                    setDriverSupport(true);\n                }\n            } catch (e) {\n                reject(e);\n            }\n        });\n\n        executeTwoCallbacks(promise, callback, errorCallback);\n        return promise;\n    };\n\n    LocalForage.prototype.driver = function driver() {\n        return this._driver || null;\n    };\n\n    LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n        var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n        executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n        return getDriverPromise;\n    };\n\n    LocalForage.prototype.getSerializer = function getSerializer(callback) {\n        var serializerPromise = Promise$1.resolve(localforageSerializer);\n        executeTwoCallbacks(serializerPromise, callback);\n        return serializerPromise;\n    };\n\n    LocalForage.prototype.ready = function ready(callback) {\n        var self = this;\n\n        var promise = self._driverSet.then(function () {\n            if (self._ready === null) {\n                self._ready = self._initDriver();\n            }\n\n            return self._ready;\n        });\n\n        executeTwoCallbacks(promise, callback, callback);\n        return promise;\n    };\n\n    LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n        var self = this;\n\n        if (!isArray(drivers)) {\n            drivers = [drivers];\n        }\n\n        var supportedDrivers = this._getSupportedDrivers(drivers);\n\n        function setDriverToConfig() {\n            self._config.driver = self.driver();\n        }\n\n        function extendSelfWithDriver(driver) {\n            self._extend(driver);\n            setDriverToConfig();\n\n            self._ready = self._initStorage(self._config);\n            return self._ready;\n        }\n\n        function initDriver(supportedDrivers) {\n            return function () {\n                var currentDriverIndex = 0;\n\n                function driverPromiseLoop() {\n                    while (currentDriverIndex < supportedDrivers.length) {\n                        var driverName = supportedDrivers[currentDriverIndex];\n                        currentDriverIndex++;\n\n                        self._dbInfo = null;\n                        self._ready = null;\n\n                        return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n                    }\n\n                    setDriverToConfig();\n                    var error = new Error('No available storage method found.');\n                    self._driverSet = Promise$1.reject(error);\n                    return self._driverSet;\n                }\n\n                return driverPromiseLoop();\n            };\n        }\n\n        // There might be a driver initialization in progress\n        // so wait for it to finish in order to avoid a possible\n        // race condition to set _dbInfo\n        var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n            return Promise$1.resolve();\n        }) : Promise$1.resolve();\n\n        this._driverSet = oldDriverSetDone.then(function () {\n            var driverName = supportedDrivers[0];\n            self._dbInfo = null;\n            self._ready = null;\n\n            return self.getDriver(driverName).then(function (driver) {\n                self._driver = driver._driver;\n                setDriverToConfig();\n                self._wrapLibraryMethodsWithReady();\n                self._initDriver = initDriver(supportedDrivers);\n            });\n        })[\"catch\"](function () {\n            setDriverToConfig();\n            var error = new Error('No available storage method found.');\n            self._driverSet = Promise$1.reject(error);\n            return self._driverSet;\n        });\n\n        executeTwoCallbacks(this._driverSet, callback, errorCallback);\n        return this._driverSet;\n    };\n\n    LocalForage.prototype.supports = function supports(driverName) {\n        return !!DriverSupport[driverName];\n    };\n\n    LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n        extend(this, libraryMethodsAndProperties);\n    };\n\n    LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n        var supportedDrivers = [];\n        for (var i = 0, len = drivers.length; i < len; i++) {\n            var driverName = drivers[i];\n            if (this.supports(driverName)) {\n                supportedDrivers.push(driverName);\n            }\n        }\n        return supportedDrivers;\n    };\n\n    LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n        // Add a stub for each driver API method that delays the call to the\n        // corresponding driver method until localForage is ready. These stubs\n        // will be replaced by the driver methods as soon as the driver is\n        // loaded, so there is no performance impact.\n        for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n            callWhenReady(this, LibraryMethods[i]);\n        }\n    };\n\n    LocalForage.prototype.createInstance = function createInstance(options) {\n        return new LocalForage(options);\n    };\n\n    return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/localforage/dist/localforage.js?");

/***/ }),

/***/ "./node_modules/lodash.merge/index.js":
/*!********************************************!*\
  !*** ./node_modules/lodash.merge/index.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global, module) {/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    asyncTag = '[object AsyncFunction]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    nullTag = '[object Null]',\n    objectTag = '[object Object]',\n    proxyTag = '[object Proxy]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    undefinedTag = '[object Undefined]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice,\n    symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeMax = Math.max,\n    nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = merge;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash.merge/index.js?");

/***/ }),

/***/ "./node_modules/lodash/_DataView.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_DataView.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_DataView.js?");

/***/ }),

/***/ "./node_modules/lodash/_Hash.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/_Hash.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var hashClear = __webpack_require__(/*! ./_hashClear */ \"./node_modules/lodash/_hashClear.js\"),\n    hashDelete = __webpack_require__(/*! ./_hashDelete */ \"./node_modules/lodash/_hashDelete.js\"),\n    hashGet = __webpack_require__(/*! ./_hashGet */ \"./node_modules/lodash/_hashGet.js\"),\n    hashHas = __webpack_require__(/*! ./_hashHas */ \"./node_modules/lodash/_hashHas.js\"),\n    hashSet = __webpack_require__(/*! ./_hashSet */ \"./node_modules/lodash/_hashSet.js\");\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Hash.js?");

/***/ }),

/***/ "./node_modules/lodash/_ListCache.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_ListCache.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ \"./node_modules/lodash/_listCacheClear.js\"),\n    listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ \"./node_modules/lodash/_listCacheDelete.js\"),\n    listCacheGet = __webpack_require__(/*! ./_listCacheGet */ \"./node_modules/lodash/_listCacheGet.js\"),\n    listCacheHas = __webpack_require__(/*! ./_listCacheHas */ \"./node_modules/lodash/_listCacheHas.js\"),\n    listCacheSet = __webpack_require__(/*! ./_listCacheSet */ \"./node_modules/lodash/_listCacheSet.js\");\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_ListCache.js?");

/***/ }),

/***/ "./node_modules/lodash/_Map.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/_Map.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Map.js?");

/***/ }),

/***/ "./node_modules/lodash/_MapCache.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_MapCache.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ \"./node_modules/lodash/_mapCacheClear.js\"),\n    mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ \"./node_modules/lodash/_mapCacheDelete.js\"),\n    mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ \"./node_modules/lodash/_mapCacheGet.js\"),\n    mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ \"./node_modules/lodash/_mapCacheHas.js\"),\n    mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ \"./node_modules/lodash/_mapCacheSet.js\");\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_MapCache.js?");

/***/ }),

/***/ "./node_modules/lodash/_Promise.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_Promise.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Promise.js?");

/***/ }),

/***/ "./node_modules/lodash/_Set.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/_Set.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Set.js?");

/***/ }),

/***/ "./node_modules/lodash/_SetCache.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_SetCache.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\"),\n    setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ \"./node_modules/lodash/_setCacheAdd.js\"),\n    setCacheHas = __webpack_require__(/*! ./_setCacheHas */ \"./node_modules/lodash/_setCacheHas.js\");\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_SetCache.js?");

/***/ }),

/***/ "./node_modules/lodash/_Stack.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/_Stack.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    stackClear = __webpack_require__(/*! ./_stackClear */ \"./node_modules/lodash/_stackClear.js\"),\n    stackDelete = __webpack_require__(/*! ./_stackDelete */ \"./node_modules/lodash/_stackDelete.js\"),\n    stackGet = __webpack_require__(/*! ./_stackGet */ \"./node_modules/lodash/_stackGet.js\"),\n    stackHas = __webpack_require__(/*! ./_stackHas */ \"./node_modules/lodash/_stackHas.js\"),\n    stackSet = __webpack_require__(/*! ./_stackSet */ \"./node_modules/lodash/_stackSet.js\");\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Stack.js?");

/***/ }),

/***/ "./node_modules/lodash/_Symbol.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/_Symbol.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Symbol.js?");

/***/ }),

/***/ "./node_modules/lodash/_Uint8Array.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_Uint8Array.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_Uint8Array.js?");

/***/ }),

/***/ "./node_modules/lodash/_WeakMap.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_WeakMap.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\"),\n    root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_WeakMap.js?");

/***/ }),

/***/ "./node_modules/lodash/_apply.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/_apply.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_apply.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayFilter.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_arrayFilter.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayFilter.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayIncludes.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_arrayIncludes.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ \"./node_modules/lodash/_baseIndexOf.js\");\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n  var length = array == null ? 0 : array.length;\n  return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayIncludes.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayIncludesWith.js":
/*!***************************************************!*\
  !*** ./node_modules/lodash/_arrayIncludesWith.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (comparator(value, array[index])) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arrayIncludesWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayIncludesWith.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayLikeKeys.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_arrayLikeKeys.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseTimes = __webpack_require__(/*! ./_baseTimes */ \"./node_modules/lodash/_baseTimes.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayLikeKeys.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayMap.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_arrayMap.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayMap.js?");

/***/ }),

/***/ "./node_modules/lodash/_arrayPush.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_arrayPush.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arrayPush.js?");

/***/ }),

/***/ "./node_modules/lodash/_arraySome.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_arraySome.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_arraySome.js?");

/***/ }),

/***/ "./node_modules/lodash/_assignValue.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_assignValue.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ \"./node_modules/lodash/_baseAssignValue.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignValue;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_assignValue.js?");

/***/ }),

/***/ "./node_modules/lodash/_assocIndexOf.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_assocIndexOf.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_assocIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseAssignValue.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseAssignValue.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var defineProperty = __webpack_require__(/*! ./_defineProperty */ \"./node_modules/lodash/_defineProperty.js\");\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nmodule.exports = baseAssignValue;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseAssignValue.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseAt.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/_baseAt.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var get = __webpack_require__(/*! ./get */ \"./node_modules/lodash/get.js\");\n\n/**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\nfunction baseAt(object, paths) {\n  var index = -1,\n      length = paths.length,\n      result = Array(length),\n      skip = object == null;\n\n  while (++index < length) {\n    result[index] = skip ? undefined : get(object, paths[index]);\n  }\n  return result;\n}\n\nmodule.exports = baseAt;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseAt.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseClamp.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseClamp.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\nfunction baseClamp(number, lower, upper) {\n  if (number === number) {\n    if (upper !== undefined) {\n      number = number <= upper ? number : upper;\n    }\n    if (lower !== undefined) {\n      number = number >= lower ? number : lower;\n    }\n  }\n  return number;\n}\n\nmodule.exports = baseClamp;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseClamp.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseDifference.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_baseDifference.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ \"./node_modules/lodash/_arrayIncludes.js\"),\n    arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ \"./node_modules/lodash/_arrayIncludesWith.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n  var index = -1,\n      includes = arrayIncludes,\n      isCommon = true,\n      length = array.length,\n      result = [],\n      valuesLength = values.length;\n\n  if (!length) {\n    return result;\n  }\n  if (iteratee) {\n    values = arrayMap(values, baseUnary(iteratee));\n  }\n  if (comparator) {\n    includes = arrayIncludesWith;\n    isCommon = false;\n  }\n  else if (values.length >= LARGE_ARRAY_SIZE) {\n    includes = cacheHas;\n    isCommon = false;\n    values = new SetCache(values);\n  }\n  outer:\n  while (++index < length) {\n    var value = array[index],\n        computed = iteratee == null ? value : iteratee(value);\n\n    value = (comparator || value !== 0) ? value : 0;\n    if (isCommon && computed === computed) {\n      var valuesIndex = valuesLength;\n      while (valuesIndex--) {\n        if (values[valuesIndex] === computed) {\n          continue outer;\n        }\n      }\n      result.push(value);\n    }\n    else if (!includes(values, computed, comparator)) {\n      result.push(value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseDifference;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseDifference.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseFill.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseFill.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\"),\n    toLength = __webpack_require__(/*! ./toLength */ \"./node_modules/lodash/toLength.js\");\n\n/**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\nfunction baseFill(array, value, start, end) {\n  var length = array.length;\n\n  start = toInteger(start);\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = (end === undefined || end > length) ? length : toInteger(end);\n  if (end < 0) {\n    end += length;\n  }\n  end = start > end ? 0 : toLength(end);\n  while (start < end) {\n    array[start++] = value;\n  }\n  return array;\n}\n\nmodule.exports = baseFill;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseFill.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseFindIndex.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_baseFindIndex.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n  var length = array.length,\n      index = fromIndex + (fromRight ? 1 : -1);\n\n  while ((fromRight ? index-- : ++index < length)) {\n    if (predicate(array[index], index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseFindIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseFlatten.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_baseFlatten.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    isFlattenable = __webpack_require__(/*! ./_isFlattenable */ \"./node_modules/lodash/_isFlattenable.js\");\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n  var index = -1,\n      length = array.length;\n\n  predicate || (predicate = isFlattenable);\n  result || (result = []);\n\n  while (++index < length) {\n    var value = array[index];\n    if (depth > 0 && predicate(value)) {\n      if (depth > 1) {\n        // Recursively flatten arrays (susceptible to call stack limits).\n        baseFlatten(value, depth - 1, predicate, isStrict, result);\n      } else {\n        arrayPush(result, value);\n      }\n    } else if (!isStrict) {\n      result[result.length] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseFlatten.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseGet.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_baseGet.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseGet.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseGetAllKeys.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_baseGetAllKeys.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseGetAllKeys.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseGetTag.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_baseGetTag.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    getRawTag = __webpack_require__(/*! ./_getRawTag */ \"./node_modules/lodash/_getRawTag.js\"),\n    objectToString = __webpack_require__(/*! ./_objectToString */ \"./node_modules/lodash/_objectToString.js\");\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseGetTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseHasIn.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseHasIn.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseHasIn.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIndexOf.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_baseIndexOf.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ \"./node_modules/lodash/_baseIsNaN.js\"),\n    strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ \"./node_modules/lodash/_strictIndexOf.js\");\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n  return value === value\n    ? strictIndexOf(array, value, fromIndex)\n    : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIndexOfWith.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseIndexOfWith.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOfWith(array, value, fromIndex, comparator) {\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (comparator(array[index], value)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = baseIndexOfWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIndexOfWith.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIntersection.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/_baseIntersection.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ \"./node_modules/lodash/_arrayIncludes.js\"),\n    arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ \"./node_modules/lodash/_arrayIncludesWith.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n  var includes = comparator ? arrayIncludesWith : arrayIncludes,\n      length = arrays[0].length,\n      othLength = arrays.length,\n      othIndex = othLength,\n      caches = Array(othLength),\n      maxLength = Infinity,\n      result = [];\n\n  while (othIndex--) {\n    var array = arrays[othIndex];\n    if (othIndex && iteratee) {\n      array = arrayMap(array, baseUnary(iteratee));\n    }\n    maxLength = nativeMin(array.length, maxLength);\n    caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n      ? new SetCache(othIndex && array)\n      : undefined;\n  }\n  array = arrays[0];\n\n  var index = -1,\n      seen = caches[0];\n\n  outer:\n  while (++index < length && result.length < maxLength) {\n    var value = array[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    value = (comparator || value !== 0) ? value : 0;\n    if (!(seen\n          ? cacheHas(seen, computed)\n          : includes(result, computed, comparator)\n        )) {\n      othIndex = othLength;\n      while (--othIndex) {\n        var cache = caches[othIndex];\n        if (!(cache\n              ? cacheHas(cache, computed)\n              : includes(arrays[othIndex], computed, comparator))\n            ) {\n          continue outer;\n        }\n      }\n      if (seen) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseIntersection;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIntersection.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsArguments.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseIsArguments.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsArguments.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsEqual.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_baseIsEqual.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ \"./node_modules/lodash/_baseIsEqualDeep.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsEqual.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsEqualDeep.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseIsEqualDeep.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n    equalByTag = __webpack_require__(/*! ./_equalByTag */ \"./node_modules/lodash/_equalByTag.js\"),\n    equalObjects = __webpack_require__(/*! ./_equalObjects */ \"./node_modules/lodash/_equalObjects.js\"),\n    getTag = __webpack_require__(/*! ./_getTag */ \"./node_modules/lodash/_getTag.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isBuffer = __webpack_require__(/*! ./isBuffer */ \"./node_modules/lodash/isBuffer.js\"),\n    isTypedArray = __webpack_require__(/*! ./isTypedArray */ \"./node_modules/lodash/isTypedArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsEqualDeep.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsMatch.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_baseIsMatch.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Stack = __webpack_require__(/*! ./_Stack */ \"./node_modules/lodash/_Stack.js\"),\n    baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsMatch.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsNaN.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseIsNaN.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n  return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsNaN.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsNative.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_baseIsNative.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isMasked = __webpack_require__(/*! ./_isMasked */ \"./node_modules/lodash/_isMasked.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsNative.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIsTypedArray.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/_baseIsTypedArray.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIsTypedArray.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseIteratee.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_baseIteratee.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseMatches = __webpack_require__(/*! ./_baseMatches */ \"./node_modules/lodash/_baseMatches.js\"),\n    baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ \"./node_modules/lodash/_baseMatchesProperty.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    property = __webpack_require__(/*! ./property */ \"./node_modules/lodash/property.js\");\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseIteratee.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseKeys.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseKeys.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isPrototype = __webpack_require__(/*! ./_isPrototype */ \"./node_modules/lodash/_isPrototype.js\"),\n    nativeKeys = __webpack_require__(/*! ./_nativeKeys */ \"./node_modules/lodash/_nativeKeys.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseKeys.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseMatches.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_baseMatches.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ \"./node_modules/lodash/_baseIsMatch.js\"),\n    getMatchData = __webpack_require__(/*! ./_getMatchData */ \"./node_modules/lodash/_getMatchData.js\"),\n    matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\");\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseMatches.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseMatchesProperty.js":
/*!*****************************************************!*\
  !*** ./node_modules/lodash/_baseMatchesProperty.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ \"./node_modules/lodash/_baseIsEqual.js\"),\n    get = __webpack_require__(/*! ./get */ \"./node_modules/lodash/get.js\"),\n    hasIn = __webpack_require__(/*! ./hasIn */ \"./node_modules/lodash/hasIn.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n    matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ \"./node_modules/lodash/_matchesStrictComparable.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseMatchesProperty.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseNth.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_baseNth.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\");\n\n/**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\nfunction baseNth(array, n) {\n  var length = array.length;\n  if (!length) {\n    return;\n  }\n  n += n < 0 ? length : 0;\n  return isIndex(n, length) ? array[n] : undefined;\n}\n\nmodule.exports = baseNth;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseNth.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseProperty.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_baseProperty.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseProperty.js?");

/***/ }),

/***/ "./node_modules/lodash/_basePropertyDeep.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/_basePropertyDeep.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_basePropertyDeep.js?");

/***/ }),

/***/ "./node_modules/lodash/_basePullAll.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_basePullAll.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ \"./node_modules/lodash/_baseIndexOf.js\"),\n    baseIndexOfWith = __webpack_require__(/*! ./_baseIndexOfWith */ \"./node_modules/lodash/_baseIndexOfWith.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/lodash/_copyArray.js\");\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAll(array, values, iteratee, comparator) {\n  var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n      index = -1,\n      length = values.length,\n      seen = array;\n\n  if (array === values) {\n    values = copyArray(values);\n  }\n  if (iteratee) {\n    seen = arrayMap(array, baseUnary(iteratee));\n  }\n  while (++index < length) {\n    var fromIndex = 0,\n        value = values[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n      if (seen !== array) {\n        splice.call(seen, fromIndex, 1);\n      }\n      splice.call(array, fromIndex, 1);\n    }\n  }\n  return array;\n}\n\nmodule.exports = basePullAll;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_basePullAll.js?");

/***/ }),

/***/ "./node_modules/lodash/_basePullAt.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_basePullAt.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseUnset = __webpack_require__(/*! ./_baseUnset */ \"./node_modules/lodash/_baseUnset.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\");\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAt(array, indexes) {\n  var length = array ? indexes.length : 0,\n      lastIndex = length - 1;\n\n  while (length--) {\n    var index = indexes[length];\n    if (length == lastIndex || index !== previous) {\n      var previous = index;\n      if (isIndex(index)) {\n        splice.call(array, index, 1);\n      } else {\n        baseUnset(array, index);\n      }\n    }\n  }\n  return array;\n}\n\nmodule.exports = basePullAt;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_basePullAt.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseRest.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseRest.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    overRest = __webpack_require__(/*! ./_overRest */ \"./node_modules/lodash/_overRest.js\"),\n    setToString = __webpack_require__(/*! ./_setToString */ \"./node_modules/lodash/_setToString.js\");\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseRest.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSet.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_baseSet.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n  if (!isObject(object)) {\n    return object;\n  }\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      lastIndex = length - 1,\n      nested = object;\n\n  while (nested != null && ++index < length) {\n    var key = toKey(path[index]),\n        newValue = value;\n\n    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n      return object;\n    }\n\n    if (index != lastIndex) {\n      var objValue = nested[key];\n      newValue = customizer ? customizer(objValue, key, nested) : undefined;\n      if (newValue === undefined) {\n        newValue = isObject(objValue)\n          ? objValue\n          : (isIndex(path[index + 1]) ? [] : {});\n      }\n    }\n    assignValue(nested, key, newValue);\n    nested = nested[key];\n  }\n  return object;\n}\n\nmodule.exports = baseSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSetToString.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseSetToString.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var constant = __webpack_require__(/*! ./constant */ \"./node_modules/lodash/constant.js\"),\n    defineProperty = __webpack_require__(/*! ./_defineProperty */ \"./node_modules/lodash/_defineProperty.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\");\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nmodule.exports = baseSetToString;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSetToString.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSlice.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseSlice.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nmodule.exports = baseSlice;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSlice.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSortedIndex.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_baseSortedIndex.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedIndexBy = __webpack_require__(/*! ./_baseSortedIndexBy */ \"./node_modules/lodash/_baseSortedIndexBy.js\"),\n    identity = __webpack_require__(/*! ./identity */ \"./node_modules/lodash/identity.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n    HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n/**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n */\nfunction baseSortedIndex(array, value, retHighest) {\n  var low = 0,\n      high = array == null ? low : array.length;\n\n  if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n    while (low < high) {\n      var mid = (low + high) >>> 1,\n          computed = array[mid];\n\n      if (computed !== null && !isSymbol(computed) &&\n          (retHighest ? (computed <= value) : (computed < value))) {\n        low = mid + 1;\n      } else {\n        high = mid;\n      }\n    }\n    return high;\n  }\n  return baseSortedIndexBy(array, value, identity, retHighest);\n}\n\nmodule.exports = baseSortedIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSortedIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSortedIndexBy.js":
/*!***************************************************!*\
  !*** ./node_modules/lodash/_baseSortedIndexBy.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n    MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor,\n    nativeMin = Math.min;\n\n/**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n */\nfunction baseSortedIndexBy(array, value, iteratee, retHighest) {\n  var low = 0,\n      high = array == null ? 0 : array.length;\n  if (high === 0) {\n    return 0;\n  }\n\n  value = iteratee(value);\n  var valIsNaN = value !== value,\n      valIsNull = value === null,\n      valIsSymbol = isSymbol(value),\n      valIsUndefined = value === undefined;\n\n  while (low < high) {\n    var mid = nativeFloor((low + high) / 2),\n        computed = iteratee(array[mid]),\n        othIsDefined = computed !== undefined,\n        othIsNull = computed === null,\n        othIsReflexive = computed === computed,\n        othIsSymbol = isSymbol(computed);\n\n    if (valIsNaN) {\n      var setLow = retHighest || othIsReflexive;\n    } else if (valIsUndefined) {\n      setLow = othIsReflexive && (retHighest || othIsDefined);\n    } else if (valIsNull) {\n      setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n    } else if (valIsSymbol) {\n      setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n    } else if (othIsNull || othIsSymbol) {\n      setLow = false;\n    } else {\n      setLow = retHighest ? (computed <= value) : (computed < value);\n    }\n    if (setLow) {\n      low = mid + 1;\n    } else {\n      high = mid;\n    }\n  }\n  return nativeMin(high, MAX_ARRAY_INDEX);\n}\n\nmodule.exports = baseSortedIndexBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSortedIndexBy.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseSortedUniq.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_baseSortedUniq.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseSortedUniq(array, iteratee) {\n  var index = -1,\n      length = array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    if (!index || !eq(computed, seen)) {\n      var seen = computed;\n      result[resIndex++] = value === 0 ? 0 : value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseSortedUniq;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseSortedUniq.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseTimes.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseTimes.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseTimes.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseToString.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_baseToString.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseToString.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseTrim.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseTrim.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ \"./node_modules/lodash/_trimmedEndIndex.js\");\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseTrim.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseUnary.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseUnary.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseUnary.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseUniq.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseUniq.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ \"./node_modules/lodash/_arrayIncludes.js\"),\n    arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ \"./node_modules/lodash/_arrayIncludesWith.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\"),\n    createSet = __webpack_require__(/*! ./_createSet */ \"./node_modules/lodash/_createSet.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n  var index = -1,\n      includes = arrayIncludes,\n      length = array.length,\n      isCommon = true,\n      result = [],\n      seen = result;\n\n  if (comparator) {\n    isCommon = false;\n    includes = arrayIncludesWith;\n  }\n  else if (length >= LARGE_ARRAY_SIZE) {\n    var set = iteratee ? null : createSet(array);\n    if (set) {\n      return setToArray(set);\n    }\n    isCommon = false;\n    includes = cacheHas;\n    seen = new SetCache;\n  }\n  else {\n    seen = iteratee ? [] : result;\n  }\n  outer:\n  while (++index < length) {\n    var value = array[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    value = (comparator || value !== 0) ? value : 0;\n    if (isCommon && computed === computed) {\n      var seenIndex = seen.length;\n      while (seenIndex--) {\n        if (seen[seenIndex] === computed) {\n          continue outer;\n        }\n      }\n      if (iteratee) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n    else if (!includes(seen, computed, comparator)) {\n      if (seen !== result) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseUniq;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseUniq.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseUnset.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseUnset.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\"),\n    parent = __webpack_require__(/*! ./_parent */ \"./node_modules/lodash/_parent.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n  path = castPath(path, object);\n  object = parent(object, path);\n  return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseUnset.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseWhile.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_baseWhile.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\");\n\n/**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseWhile(array, predicate, isDrop, fromRight) {\n  var length = array.length,\n      index = fromRight ? length : -1;\n\n  while ((fromRight ? index-- : ++index < length) &&\n    predicate(array[index], index, array)) {}\n\n  return isDrop\n    ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n    : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n}\n\nmodule.exports = baseWhile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseWhile.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseXor.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_baseXor.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseDifference = __webpack_require__(/*! ./_baseDifference */ \"./node_modules/lodash/_baseDifference.js\"),\n    baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\");\n\n/**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\nfunction baseXor(arrays, iteratee, comparator) {\n  var length = arrays.length;\n  if (length < 2) {\n    return length ? baseUniq(arrays[0]) : [];\n  }\n  var index = -1,\n      result = Array(length);\n\n  while (++index < length) {\n    var array = arrays[index],\n        othIndex = -1;\n\n    while (++othIndex < length) {\n      if (othIndex != index) {\n        result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n      }\n    }\n  }\n  return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n}\n\nmodule.exports = baseXor;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseXor.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseZipObject.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_baseZipObject.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n  var index = -1,\n      length = props.length,\n      valsLength = values.length,\n      result = {};\n\n  while (++index < length) {\n    var value = index < valsLength ? values[index] : undefined;\n    assignFunc(result, props[index], value);\n  }\n  return result;\n}\n\nmodule.exports = baseZipObject;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_baseZipObject.js?");

/***/ }),

/***/ "./node_modules/lodash/_cacheHas.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_cacheHas.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_cacheHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_castArrayLikeObject.js":
/*!*****************************************************!*\
  !*** ./node_modules/lodash/_castArrayLikeObject.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n  return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_castArrayLikeObject.js?");

/***/ }),

/***/ "./node_modules/lodash/_castPath.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_castPath.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    stringToPath = __webpack_require__(/*! ./_stringToPath */ \"./node_modules/lodash/_stringToPath.js\"),\n    toString = __webpack_require__(/*! ./toString */ \"./node_modules/lodash/toString.js\");\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_castPath.js?");

/***/ }),

/***/ "./node_modules/lodash/_compareAscending.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/_compareAscending.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n  if (value !== other) {\n    var valIsDefined = value !== undefined,\n        valIsNull = value === null,\n        valIsReflexive = value === value,\n        valIsSymbol = isSymbol(value);\n\n    var othIsDefined = other !== undefined,\n        othIsNull = other === null,\n        othIsReflexive = other === other,\n        othIsSymbol = isSymbol(other);\n\n    if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n        (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n        (valIsNull && othIsDefined && othIsReflexive) ||\n        (!valIsDefined && othIsReflexive) ||\n        !valIsReflexive) {\n      return 1;\n    }\n    if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n        (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n        (othIsNull && valIsDefined && valIsReflexive) ||\n        (!othIsDefined && valIsReflexive) ||\n        !othIsReflexive) {\n      return -1;\n    }\n  }\n  return 0;\n}\n\nmodule.exports = compareAscending;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_compareAscending.js?");

/***/ }),

/***/ "./node_modules/lodash/_copyArray.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_copyArray.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nmodule.exports = copyArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_copyArray.js?");

/***/ }),

/***/ "./node_modules/lodash/_coreJsData.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_coreJsData.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_coreJsData.js?");

/***/ }),

/***/ "./node_modules/lodash/_createSet.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_createSet.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Set = __webpack_require__(/*! ./_Set */ \"./node_modules/lodash/_Set.js\"),\n    noop = __webpack_require__(/*! ./noop */ \"./node_modules/lodash/noop.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n  return new Set(values);\n};\n\nmodule.exports = createSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_createSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_defineProperty.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_defineProperty.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_defineProperty.js?");

/***/ }),

/***/ "./node_modules/lodash/_equalArrays.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_equalArrays.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var SetCache = __webpack_require__(/*! ./_SetCache */ \"./node_modules/lodash/_SetCache.js\"),\n    arraySome = __webpack_require__(/*! ./_arraySome */ \"./node_modules/lodash/_arraySome.js\"),\n    cacheHas = __webpack_require__(/*! ./_cacheHas */ \"./node_modules/lodash/_cacheHas.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalArrays;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_equalArrays.js?");

/***/ }),

/***/ "./node_modules/lodash/_equalByTag.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_equalByTag.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    Uint8Array = __webpack_require__(/*! ./_Uint8Array */ \"./node_modules/lodash/_Uint8Array.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n    equalArrays = __webpack_require__(/*! ./_equalArrays */ \"./node_modules/lodash/_equalArrays.js\"),\n    mapToArray = __webpack_require__(/*! ./_mapToArray */ \"./node_modules/lodash/_mapToArray.js\"),\n    setToArray = __webpack_require__(/*! ./_setToArray */ \"./node_modules/lodash/_setToArray.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_equalByTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_equalObjects.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_equalObjects.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ \"./node_modules/lodash/_getAllKeys.js\");\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalObjects;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_equalObjects.js?");

/***/ }),

/***/ "./node_modules/lodash/_flatRest.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_flatRest.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var flatten = __webpack_require__(/*! ./flatten */ \"./node_modules/lodash/flatten.js\"),\n    overRest = __webpack_require__(/*! ./_overRest */ \"./node_modules/lodash/_overRest.js\"),\n    setToString = __webpack_require__(/*! ./_setToString */ \"./node_modules/lodash/_setToString.js\");\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n  return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_flatRest.js?");

/***/ }),

/***/ "./node_modules/lodash/_freeGlobal.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_freeGlobal.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_freeGlobal.js?");

/***/ }),

/***/ "./node_modules/lodash/_getAllKeys.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_getAllKeys.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ \"./node_modules/lodash/_baseGetAllKeys.js\"),\n    getSymbols = __webpack_require__(/*! ./_getSymbols */ \"./node_modules/lodash/_getSymbols.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getAllKeys.js?");

/***/ }),

/***/ "./node_modules/lodash/_getMapData.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_getMapData.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isKeyable = __webpack_require__(/*! ./_isKeyable */ \"./node_modules/lodash/_isKeyable.js\");\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getMapData.js?");

/***/ }),

/***/ "./node_modules/lodash/_getMatchData.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_getMatchData.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ \"./node_modules/lodash/_isStrictComparable.js\"),\n    keys = __webpack_require__(/*! ./keys */ \"./node_modules/lodash/keys.js\");\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getMatchData.js?");

/***/ }),

/***/ "./node_modules/lodash/_getNative.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_getNative.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ \"./node_modules/lodash/_baseIsNative.js\"),\n    getValue = __webpack_require__(/*! ./_getValue */ \"./node_modules/lodash/_getValue.js\");\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getNative.js?");

/***/ }),

/***/ "./node_modules/lodash/_getRawTag.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_getRawTag.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getRawTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_getSymbols.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_getSymbols.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    stubArray = __webpack_require__(/*! ./stubArray */ \"./node_modules/lodash/stubArray.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getSymbols.js?");

/***/ }),

/***/ "./node_modules/lodash/_getTag.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/_getTag.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var DataView = __webpack_require__(/*! ./_DataView */ \"./node_modules/lodash/_DataView.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n    Promise = __webpack_require__(/*! ./_Promise */ \"./node_modules/lodash/_Promise.js\"),\n    Set = __webpack_require__(/*! ./_Set */ \"./node_modules/lodash/_Set.js\"),\n    WeakMap = __webpack_require__(/*! ./_WeakMap */ \"./node_modules/lodash/_WeakMap.js\"),\n    baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    toSource = __webpack_require__(/*! ./_toSource */ \"./node_modules/lodash/_toSource.js\");\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_getValue.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_getValue.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_getValue.js?");

/***/ }),

/***/ "./node_modules/lodash/_hasPath.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_hasPath.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var castPath = __webpack_require__(/*! ./_castPath */ \"./node_modules/lodash/_castPath.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hasPath.js?");

/***/ }),

/***/ "./node_modules/lodash/_hashClear.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_hashClear.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hashClear.js?");

/***/ }),

/***/ "./node_modules/lodash/_hashDelete.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_hashDelete.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hashDelete.js?");

/***/ }),

/***/ "./node_modules/lodash/_hashGet.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_hashGet.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hashGet.js?");

/***/ }),

/***/ "./node_modules/lodash/_hashHas.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_hashHas.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hashHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_hashSet.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_hashSet.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ \"./node_modules/lodash/_nativeCreate.js\");\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_hashSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_isFlattenable.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_isFlattenable.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    isArguments = __webpack_require__(/*! ./isArguments */ \"./node_modules/lodash/isArguments.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n  return isArray(value) || isArguments(value) ||\n    !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isFlattenable.js?");

/***/ }),

/***/ "./node_modules/lodash/_isIndex.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_isIndex.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/_isIterateeCall.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_isIterateeCall.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nmodule.exports = isIterateeCall;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isIterateeCall.js?");

/***/ }),

/***/ "./node_modules/lodash/_isKey.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/_isKey.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isKey.js?");

/***/ }),

/***/ "./node_modules/lodash/_isKeyable.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_isKeyable.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isKeyable.js?");

/***/ }),

/***/ "./node_modules/lodash/_isMasked.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_isMasked.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var coreJsData = __webpack_require__(/*! ./_coreJsData */ \"./node_modules/lodash/_coreJsData.js\");\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isMasked.js?");

/***/ }),

/***/ "./node_modules/lodash/_isPrototype.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_isPrototype.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isPrototype.js?");

/***/ }),

/***/ "./node_modules/lodash/_isStrictComparable.js":
/*!****************************************************!*\
  !*** ./node_modules/lodash/_isStrictComparable.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_isStrictComparable.js?");

/***/ }),

/***/ "./node_modules/lodash/_listCacheClear.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_listCacheClear.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_listCacheClear.js?");

/***/ }),

/***/ "./node_modules/lodash/_listCacheDelete.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_listCacheDelete.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_listCacheDelete.js?");

/***/ }),

/***/ "./node_modules/lodash/_listCacheGet.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_listCacheGet.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_listCacheGet.js?");

/***/ }),

/***/ "./node_modules/lodash/_listCacheHas.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_listCacheHas.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_listCacheHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_listCacheSet.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_listCacheSet.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ \"./node_modules/lodash/_assocIndexOf.js\");\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_listCacheSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapCacheClear.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_mapCacheClear.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var Hash = __webpack_require__(/*! ./_Hash */ \"./node_modules/lodash/_Hash.js\"),\n    ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\");\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapCacheClear.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapCacheDelete.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_mapCacheDelete.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapCacheDelete.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapCacheGet.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_mapCacheGet.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapCacheGet.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapCacheHas.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_mapCacheHas.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapCacheHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapCacheSet.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_mapCacheSet.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getMapData = __webpack_require__(/*! ./_getMapData */ \"./node_modules/lodash/_getMapData.js\");\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapCacheSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_mapToArray.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_mapToArray.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nmodule.exports = mapToArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_mapToArray.js?");

/***/ }),

/***/ "./node_modules/lodash/_matchesStrictComparable.js":
/*!*********************************************************!*\
  !*** ./node_modules/lodash/_matchesStrictComparable.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_matchesStrictComparable.js?");

/***/ }),

/***/ "./node_modules/lodash/_memoizeCapped.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_memoizeCapped.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var memoize = __webpack_require__(/*! ./memoize */ \"./node_modules/lodash/memoize.js\");\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_memoizeCapped.js?");

/***/ }),

/***/ "./node_modules/lodash/_nativeCreate.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_nativeCreate.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getNative = __webpack_require__(/*! ./_getNative */ \"./node_modules/lodash/_getNative.js\");\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_nativeCreate.js?");

/***/ }),

/***/ "./node_modules/lodash/_nativeKeys.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_nativeKeys.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var overArg = __webpack_require__(/*! ./_overArg */ \"./node_modules/lodash/_overArg.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_nativeKeys.js?");

/***/ }),

/***/ "./node_modules/lodash/_nodeUtil.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_nodeUtil.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_nodeUtil.js?");

/***/ }),

/***/ "./node_modules/lodash/_objectToString.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_objectToString.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_objectToString.js?");

/***/ }),

/***/ "./node_modules/lodash/_overArg.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/_overArg.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_overArg.js?");

/***/ }),

/***/ "./node_modules/lodash/_overRest.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_overRest.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var apply = __webpack_require__(/*! ./_apply */ \"./node_modules/lodash/_apply.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nmodule.exports = overRest;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_overRest.js?");

/***/ }),

/***/ "./node_modules/lodash/_parent.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/_parent.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\"),\n    baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\");\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n  return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_parent.js?");

/***/ }),

/***/ "./node_modules/lodash/_root.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/_root.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_root.js?");

/***/ }),

/***/ "./node_modules/lodash/_setCacheAdd.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_setCacheAdd.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_setCacheAdd.js?");

/***/ }),

/***/ "./node_modules/lodash/_setCacheHas.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_setCacheHas.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_setCacheHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_setToArray.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_setToArray.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_setToArray.js?");

/***/ }),

/***/ "./node_modules/lodash/_setToString.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_setToString.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ \"./node_modules/lodash/_baseSetToString.js\"),\n    shortOut = __webpack_require__(/*! ./_shortOut */ \"./node_modules/lodash/_shortOut.js\");\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_setToString.js?");

/***/ }),

/***/ "./node_modules/lodash/_shortOut.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_shortOut.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nmodule.exports = shortOut;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_shortOut.js?");

/***/ }),

/***/ "./node_modules/lodash/_stackClear.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_stackClear.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\");\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stackClear.js?");

/***/ }),

/***/ "./node_modules/lodash/_stackDelete.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/_stackDelete.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stackDelete.js?");

/***/ }),

/***/ "./node_modules/lodash/_stackGet.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_stackGet.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stackGet.js?");

/***/ }),

/***/ "./node_modules/lodash/_stackHas.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_stackHas.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stackHas.js?");

/***/ }),

/***/ "./node_modules/lodash/_stackSet.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_stackSet.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var ListCache = __webpack_require__(/*! ./_ListCache */ \"./node_modules/lodash/_ListCache.js\"),\n    Map = __webpack_require__(/*! ./_Map */ \"./node_modules/lodash/_Map.js\"),\n    MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stackSet.js?");

/***/ }),

/***/ "./node_modules/lodash/_strictIndexOf.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/_strictIndexOf.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_strictIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/_strictLastIndexOf.js":
/*!***************************************************!*\
  !*** ./node_modules/lodash/_strictLastIndexOf.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictLastIndexOf(array, value, fromIndex) {\n  var index = fromIndex + 1;\n  while (index--) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return index;\n}\n\nmodule.exports = strictLastIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_strictLastIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/_stringToPath.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/_stringToPath.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ \"./node_modules/lodash/_memoizeCapped.js\");\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nmodule.exports = stringToPath;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_stringToPath.js?");

/***/ }),

/***/ "./node_modules/lodash/_toKey.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/_toKey.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_toKey.js?");

/***/ }),

/***/ "./node_modules/lodash/_toSource.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_toSource.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_toSource.js?");

/***/ }),

/***/ "./node_modules/lodash/_trimmedEndIndex.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/_trimmedEndIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/array.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/array.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = {\n  'chunk': __webpack_require__(/*! ./chunk */ \"./node_modules/lodash/chunk.js\"),\n  'compact': __webpack_require__(/*! ./compact */ \"./node_modules/lodash/compact.js\"),\n  'concat': __webpack_require__(/*! ./concat */ \"./node_modules/lodash/concat.js\"),\n  'difference': __webpack_require__(/*! ./difference */ \"./node_modules/lodash/difference.js\"),\n  'differenceBy': __webpack_require__(/*! ./differenceBy */ \"./node_modules/lodash/differenceBy.js\"),\n  'differenceWith': __webpack_require__(/*! ./differenceWith */ \"./node_modules/lodash/differenceWith.js\"),\n  'drop': __webpack_require__(/*! ./drop */ \"./node_modules/lodash/drop.js\"),\n  'dropRight': __webpack_require__(/*! ./dropRight */ \"./node_modules/lodash/dropRight.js\"),\n  'dropRightWhile': __webpack_require__(/*! ./dropRightWhile */ \"./node_modules/lodash/dropRightWhile.js\"),\n  'dropWhile': __webpack_require__(/*! ./dropWhile */ \"./node_modules/lodash/dropWhile.js\"),\n  'fill': __webpack_require__(/*! ./fill */ \"./node_modules/lodash/fill.js\"),\n  'findIndex': __webpack_require__(/*! ./findIndex */ \"./node_modules/lodash/findIndex.js\"),\n  'findLastIndex': __webpack_require__(/*! ./findLastIndex */ \"./node_modules/lodash/findLastIndex.js\"),\n  'first': __webpack_require__(/*! ./first */ \"./node_modules/lodash/first.js\"),\n  'flatten': __webpack_require__(/*! ./flatten */ \"./node_modules/lodash/flatten.js\"),\n  'flattenDeep': __webpack_require__(/*! ./flattenDeep */ \"./node_modules/lodash/flattenDeep.js\"),\n  'flattenDepth': __webpack_require__(/*! ./flattenDepth */ \"./node_modules/lodash/flattenDepth.js\"),\n  'fromPairs': __webpack_require__(/*! ./fromPairs */ \"./node_modules/lodash/fromPairs.js\"),\n  'head': __webpack_require__(/*! ./head */ \"./node_modules/lodash/head.js\"),\n  'indexOf': __webpack_require__(/*! ./indexOf */ \"./node_modules/lodash/indexOf.js\"),\n  'initial': __webpack_require__(/*! ./initial */ \"./node_modules/lodash/initial.js\"),\n  'intersection': __webpack_require__(/*! ./intersection */ \"./node_modules/lodash/intersection.js\"),\n  'intersectionBy': __webpack_require__(/*! ./intersectionBy */ \"./node_modules/lodash/intersectionBy.js\"),\n  'intersectionWith': __webpack_require__(/*! ./intersectionWith */ \"./node_modules/lodash/intersectionWith.js\"),\n  'join': __webpack_require__(/*! ./join */ \"./node_modules/lodash/join.js\"),\n  'last': __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\"),\n  'lastIndexOf': __webpack_require__(/*! ./lastIndexOf */ \"./node_modules/lodash/lastIndexOf.js\"),\n  'nth': __webpack_require__(/*! ./nth */ \"./node_modules/lodash/nth.js\"),\n  'pull': __webpack_require__(/*! ./pull */ \"./node_modules/lodash/pull.js\"),\n  'pullAll': __webpack_require__(/*! ./pullAll */ \"./node_modules/lodash/pullAll.js\"),\n  'pullAllBy': __webpack_require__(/*! ./pullAllBy */ \"./node_modules/lodash/pullAllBy.js\"),\n  'pullAllWith': __webpack_require__(/*! ./pullAllWith */ \"./node_modules/lodash/pullAllWith.js\"),\n  'pullAt': __webpack_require__(/*! ./pullAt */ \"./node_modules/lodash/pullAt.js\"),\n  'remove': __webpack_require__(/*! ./remove */ \"./node_modules/lodash/remove.js\"),\n  'reverse': __webpack_require__(/*! ./reverse */ \"./node_modules/lodash/reverse.js\"),\n  'slice': __webpack_require__(/*! ./slice */ \"./node_modules/lodash/slice.js\"),\n  'sortedIndex': __webpack_require__(/*! ./sortedIndex */ \"./node_modules/lodash/sortedIndex.js\"),\n  'sortedIndexBy': __webpack_require__(/*! ./sortedIndexBy */ \"./node_modules/lodash/sortedIndexBy.js\"),\n  'sortedIndexOf': __webpack_require__(/*! ./sortedIndexOf */ \"./node_modules/lodash/sortedIndexOf.js\"),\n  'sortedLastIndex': __webpack_require__(/*! ./sortedLastIndex */ \"./node_modules/lodash/sortedLastIndex.js\"),\n  'sortedLastIndexBy': __webpack_require__(/*! ./sortedLastIndexBy */ \"./node_modules/lodash/sortedLastIndexBy.js\"),\n  'sortedLastIndexOf': __webpack_require__(/*! ./sortedLastIndexOf */ \"./node_modules/lodash/sortedLastIndexOf.js\"),\n  'sortedUniq': __webpack_require__(/*! ./sortedUniq */ \"./node_modules/lodash/sortedUniq.js\"),\n  'sortedUniqBy': __webpack_require__(/*! ./sortedUniqBy */ \"./node_modules/lodash/sortedUniqBy.js\"),\n  'tail': __webpack_require__(/*! ./tail */ \"./node_modules/lodash/tail.js\"),\n  'take': __webpack_require__(/*! ./take */ \"./node_modules/lodash/take.js\"),\n  'takeRight': __webpack_require__(/*! ./takeRight */ \"./node_modules/lodash/takeRight.js\"),\n  'takeRightWhile': __webpack_require__(/*! ./takeRightWhile */ \"./node_modules/lodash/takeRightWhile.js\"),\n  'takeWhile': __webpack_require__(/*! ./takeWhile */ \"./node_modules/lodash/takeWhile.js\"),\n  'union': __webpack_require__(/*! ./union */ \"./node_modules/lodash/union.js\"),\n  'unionBy': __webpack_require__(/*! ./unionBy */ \"./node_modules/lodash/unionBy.js\"),\n  'unionWith': __webpack_require__(/*! ./unionWith */ \"./node_modules/lodash/unionWith.js\"),\n  'uniq': __webpack_require__(/*! ./uniq */ \"./node_modules/lodash/uniq.js\"),\n  'uniqBy': __webpack_require__(/*! ./uniqBy */ \"./node_modules/lodash/uniqBy.js\"),\n  'uniqWith': __webpack_require__(/*! ./uniqWith */ \"./node_modules/lodash/uniqWith.js\"),\n  'unzip': __webpack_require__(/*! ./unzip */ \"./node_modules/lodash/unzip.js\"),\n  'unzipWith': __webpack_require__(/*! ./unzipWith */ \"./node_modules/lodash/unzipWith.js\"),\n  'without': __webpack_require__(/*! ./without */ \"./node_modules/lodash/without.js\"),\n  'xor': __webpack_require__(/*! ./xor */ \"./node_modules/lodash/xor.js\"),\n  'xorBy': __webpack_require__(/*! ./xorBy */ \"./node_modules/lodash/xorBy.js\"),\n  'xorWith': __webpack_require__(/*! ./xorWith */ \"./node_modules/lodash/xorWith.js\"),\n  'zip': __webpack_require__(/*! ./zip */ \"./node_modules/lodash/zip.js\"),\n  'zipObject': __webpack_require__(/*! ./zipObject */ \"./node_modules/lodash/zipObject.js\"),\n  'zipObjectDeep': __webpack_require__(/*! ./zipObjectDeep */ \"./node_modules/lodash/zipObjectDeep.js\"),\n  'zipWith': __webpack_require__(/*! ./zipWith */ \"./node_modules/lodash/zipWith.js\")\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/array.js?");

/***/ }),

/***/ "./node_modules/lodash/chunk.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/chunk.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n    nativeMax = Math.max;\n\n/**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\nfunction chunk(array, size, guard) {\n  if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n    size = 1;\n  } else {\n    size = nativeMax(toInteger(size), 0);\n  }\n  var length = array == null ? 0 : array.length;\n  if (!length || size < 1) {\n    return [];\n  }\n  var index = 0,\n      resIndex = 0,\n      result = Array(nativeCeil(length / size));\n\n  while (index < length) {\n    result[resIndex++] = baseSlice(array, index, (index += size));\n  }\n  return result;\n}\n\nmodule.exports = chunk;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/chunk.js?");

/***/ }),

/***/ "./node_modules/lodash/compact.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/compact.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (value) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = compact;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/compact.js?");

/***/ }),

/***/ "./node_modules/lodash/concat.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/concat.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayPush = __webpack_require__(/*! ./_arrayPush */ \"./node_modules/lodash/_arrayPush.js\"),\n    baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/lodash/_copyArray.js\"),\n    isArray = __webpack_require__(/*! ./isArray */ \"./node_modules/lodash/isArray.js\");\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n  var length = arguments.length;\n  if (!length) {\n    return [];\n  }\n  var args = Array(length - 1),\n      array = arguments[0],\n      index = length;\n\n  while (index--) {\n    args[index - 1] = arguments[index];\n  }\n  return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nmodule.exports = concat;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/concat.js?");

/***/ }),

/***/ "./node_modules/lodash/constant.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/constant.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nmodule.exports = constant;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/constant.js?");

/***/ }),

/***/ "./node_modules/lodash/difference.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/difference.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseDifference = __webpack_require__(/*! ./_baseDifference */ \"./node_modules/lodash/_baseDifference.js\"),\n    baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n  return isArrayLikeObject(array)\n    ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n    : [];\n});\n\nmodule.exports = difference;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/difference.js?");

/***/ }),

/***/ "./node_modules/lodash/differenceBy.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/differenceBy.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseDifference = __webpack_require__(/*! ./_baseDifference */ \"./node_modules/lodash/_baseDifference.js\"),\n    baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nvar differenceBy = baseRest(function(array, values) {\n  var iteratee = last(values);\n  if (isArrayLikeObject(iteratee)) {\n    iteratee = undefined;\n  }\n  return isArrayLikeObject(array)\n    ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))\n    : [];\n});\n\nmodule.exports = differenceBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/differenceBy.js?");

/***/ }),

/***/ "./node_modules/lodash/differenceWith.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/differenceWith.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseDifference = __webpack_require__(/*! ./_baseDifference */ \"./node_modules/lodash/_baseDifference.js\"),\n    baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\nvar differenceWith = baseRest(function(array, values) {\n  var comparator = last(values);\n  if (isArrayLikeObject(comparator)) {\n    comparator = undefined;\n  }\n  return isArrayLikeObject(array)\n    ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n    : [];\n});\n\nmodule.exports = differenceWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/differenceWith.js?");

/***/ }),

/***/ "./node_modules/lodash/drop.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/drop.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction drop(array, n, guard) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  n = (guard || n === undefined) ? 1 : toInteger(n);\n  return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nmodule.exports = drop;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/drop.js?");

/***/ }),

/***/ "./node_modules/lodash/dropRight.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/dropRight.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  n = (guard || n === undefined) ? 1 : toInteger(n);\n  n = length - n;\n  return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = dropRight;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/dropRight.js?");

/***/ }),

/***/ "./node_modules/lodash/dropRightWhile.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/dropRightWhile.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseWhile = __webpack_require__(/*! ./_baseWhile */ \"./node_modules/lodash/_baseWhile.js\");\n\n/**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': true },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropRightWhile(array, predicate) {\n  return (array && array.length)\n    ? baseWhile(array, baseIteratee(predicate, 3), true, true)\n    : [];\n}\n\nmodule.exports = dropRightWhile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/dropRightWhile.js?");

/***/ }),

/***/ "./node_modules/lodash/dropWhile.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/dropWhile.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseWhile = __webpack_require__(/*! ./_baseWhile */ \"./node_modules/lodash/_baseWhile.js\");\n\n/**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': false },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropWhile(array, predicate) {\n  return (array && array.length)\n    ? baseWhile(array, baseIteratee(predicate, 3), true)\n    : [];\n}\n\nmodule.exports = dropWhile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/dropWhile.js?");

/***/ }),

/***/ "./node_modules/lodash/eq.js":
/*!***********************************!*\
  !*** ./node_modules/lodash/eq.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/eq.js?");

/***/ }),

/***/ "./node_modules/lodash/fill.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/fill.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFill = __webpack_require__(/*! ./_baseFill */ \"./node_modules/lodash/_baseFill.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\");\n\n/**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\nfunction fill(array, value, start, end) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n    start = 0;\n    end = length;\n  }\n  return baseFill(array, value, start, end);\n}\n\nmodule.exports = fill;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/fill.js?");

/***/ }),

/***/ "./node_modules/lodash/findIndex.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/findIndex.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': false },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return -1;\n  }\n  var index = fromIndex == null ? 0 : toInteger(fromIndex);\n  if (index < 0) {\n    index = nativeMax(length + index, 0);\n  }\n  return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/findIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/findLastIndex.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/findLastIndex.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': true },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\nfunction findLastIndex(array, predicate, fromIndex) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return -1;\n  }\n  var index = length - 1;\n  if (fromIndex !== undefined) {\n    index = toInteger(fromIndex);\n    index = fromIndex < 0\n      ? nativeMax(length + index, 0)\n      : nativeMin(index, length - 1);\n  }\n  return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\n}\n\nmodule.exports = findLastIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/findLastIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/first.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/first.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./head */ \"./node_modules/lodash/head.js\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/first.js?");

/***/ }),

/***/ "./node_modules/lodash/flatten.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/flatten.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\");\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/flatten.js?");

/***/ }),

/***/ "./node_modules/lodash/flattenDeep.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/flattenDeep.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/flattenDeep.js?");

/***/ }),

/***/ "./node_modules/lodash/flattenDepth.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/flattenDepth.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\nfunction flattenDepth(array, depth) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  depth = depth === undefined ? 1 : toInteger(depth);\n  return baseFlatten(array, depth);\n}\n\nmodule.exports = flattenDepth;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/flattenDepth.js?");

/***/ }),

/***/ "./node_modules/lodash/fromPairs.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/fromPairs.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction fromPairs(pairs) {\n  var index = -1,\n      length = pairs == null ? 0 : pairs.length,\n      result = {};\n\n  while (++index < length) {\n    var pair = pairs[index];\n    result[pair[0]] = pair[1];\n  }\n  return result;\n}\n\nmodule.exports = fromPairs;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/fromPairs.js?");

/***/ }),

/***/ "./node_modules/lodash/get.js":
/*!************************************!*\
  !*** ./node_modules/lodash/get.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGet = __webpack_require__(/*! ./_baseGet */ \"./node_modules/lodash/_baseGet.js\");\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/get.js?");

/***/ }),

/***/ "./node_modules/lodash/hasIn.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/hasIn.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ \"./node_modules/lodash/_baseHasIn.js\"),\n    hasPath = __webpack_require__(/*! ./_hasPath */ \"./node_modules/lodash/_hasPath.js\");\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/hasIn.js?");

/***/ }),

/***/ "./node_modules/lodash/head.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/head.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n  return (array && array.length) ? array[0] : undefined;\n}\n\nmodule.exports = head;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/head.js?");

/***/ }),

/***/ "./node_modules/lodash/identity.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/identity.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/identity.js?");

/***/ }),

/***/ "./node_modules/lodash/indexOf.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/indexOf.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ \"./node_modules/lodash/_baseIndexOf.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return -1;\n  }\n  var index = fromIndex == null ? 0 : toInteger(fromIndex);\n  if (index < 0) {\n    index = nativeMax(length + index, 0);\n  }\n  return baseIndexOf(array, value, index);\n}\n\nmodule.exports = indexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/indexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/initial.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/initial.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\");\n\n/**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\nfunction initial(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseSlice(array, 0, -1) : [];\n}\n\nmodule.exports = initial;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/initial.js?");

/***/ }),

/***/ "./node_modules/lodash/intersection.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/intersection.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseIntersection = __webpack_require__(/*! ./_baseIntersection */ \"./node_modules/lodash/_baseIntersection.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    castArrayLikeObject = __webpack_require__(/*! ./_castArrayLikeObject */ \"./node_modules/lodash/_castArrayLikeObject.js\");\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n  var mapped = arrayMap(arrays, castArrayLikeObject);\n  return (mapped.length && mapped[0] === arrays[0])\n    ? baseIntersection(mapped)\n    : [];\n});\n\nmodule.exports = intersection;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/intersection.js?");

/***/ }),

/***/ "./node_modules/lodash/intersectionBy.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/intersectionBy.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseIntersection = __webpack_require__(/*! ./_baseIntersection */ \"./node_modules/lodash/_baseIntersection.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    castArrayLikeObject = __webpack_require__(/*! ./_castArrayLikeObject */ \"./node_modules/lodash/_castArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\nvar intersectionBy = baseRest(function(arrays) {\n  var iteratee = last(arrays),\n      mapped = arrayMap(arrays, castArrayLikeObject);\n\n  if (iteratee === last(mapped)) {\n    iteratee = undefined;\n  } else {\n    mapped.pop();\n  }\n  return (mapped.length && mapped[0] === arrays[0])\n    ? baseIntersection(mapped, baseIteratee(iteratee, 2))\n    : [];\n});\n\nmodule.exports = intersectionBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/intersectionBy.js?");

/***/ }),

/***/ "./node_modules/lodash/intersectionWith.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/intersectionWith.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseIntersection = __webpack_require__(/*! ./_baseIntersection */ \"./node_modules/lodash/_baseIntersection.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    castArrayLikeObject = __webpack_require__(/*! ./_castArrayLikeObject */ \"./node_modules/lodash/_castArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nvar intersectionWith = baseRest(function(arrays) {\n  var comparator = last(arrays),\n      mapped = arrayMap(arrays, castArrayLikeObject);\n\n  comparator = typeof comparator == 'function' ? comparator : undefined;\n  if (comparator) {\n    mapped.pop();\n  }\n  return (mapped.length && mapped[0] === arrays[0])\n    ? baseIntersection(mapped, undefined, comparator)\n    : [];\n});\n\nmodule.exports = intersectionWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/intersectionWith.js?");

/***/ }),

/***/ "./node_modules/lodash/isArguments.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/isArguments.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ \"./node_modules/lodash/_baseIsArguments.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isArguments.js?");

/***/ }),

/***/ "./node_modules/lodash/isArray.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/isArray.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isArray.js?");

/***/ }),

/***/ "./node_modules/lodash/isArrayLike.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/isArrayLike.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isFunction = __webpack_require__(/*! ./isFunction */ \"./node_modules/lodash/isFunction.js\"),\n    isLength = __webpack_require__(/*! ./isLength */ \"./node_modules/lodash/isLength.js\");\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isArrayLike.js?");

/***/ }),

/***/ "./node_modules/lodash/isArrayLikeObject.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/isArrayLikeObject.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isArrayLikeObject.js?");

/***/ }),

/***/ "./node_modules/lodash/isBuffer.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isBuffer.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\"),\n    stubFalse = __webpack_require__(/*! ./stubFalse */ \"./node_modules/lodash/stubFalse.js\");\n\n/** Detect free variable `exports`. */\nvar freeExports =  true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isBuffer.js?");

/***/ }),

/***/ "./node_modules/lodash/isFunction.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/isFunction.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\");\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isFunction.js?");

/***/ }),

/***/ "./node_modules/lodash/isLength.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isLength.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isLength.js?");

/***/ }),

/***/ "./node_modules/lodash/isObject.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isObject.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isObject.js?");

/***/ }),

/***/ "./node_modules/lodash/isObjectLike.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/isObjectLike.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isObjectLike.js?");

/***/ }),

/***/ "./node_modules/lodash/isSymbol.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isSymbol.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isSymbol.js?");

/***/ }),

/***/ "./node_modules/lodash/isTypedArray.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/isTypedArray.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ \"./node_modules/lodash/_baseIsTypedArray.js\"),\n    baseUnary = __webpack_require__(/*! ./_baseUnary */ \"./node_modules/lodash/_baseUnary.js\"),\n    nodeUtil = __webpack_require__(/*! ./_nodeUtil */ \"./node_modules/lodash/_nodeUtil.js\");\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/isTypedArray.js?");

/***/ }),

/***/ "./node_modules/lodash/join.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/join.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeJoin = arrayProto.join;\n\n/**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\nfunction join(array, separator) {\n  return array == null ? '' : nativeJoin.call(array, separator);\n}\n\nmodule.exports = join;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/join.js?");

/***/ }),

/***/ "./node_modules/lodash/keys.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/keys.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ \"./node_modules/lodash/_arrayLikeKeys.js\"),\n    baseKeys = __webpack_require__(/*! ./_baseKeys */ \"./node_modules/lodash/_baseKeys.js\"),\n    isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/lodash/isArrayLike.js\");\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/keys.js?");

/***/ }),

/***/ "./node_modules/lodash/last.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/last.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/last.js?");

/***/ }),

/***/ "./node_modules/lodash/lastIndexOf.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/lastIndexOf.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ \"./node_modules/lodash/_baseFindIndex.js\"),\n    baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ \"./node_modules/lodash/_baseIsNaN.js\"),\n    strictLastIndexOf = __webpack_require__(/*! ./_strictLastIndexOf */ \"./node_modules/lodash/_strictLastIndexOf.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\nfunction lastIndexOf(array, value, fromIndex) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return -1;\n  }\n  var index = length;\n  if (fromIndex !== undefined) {\n    index = toInteger(fromIndex);\n    index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n  }\n  return value === value\n    ? strictLastIndexOf(array, value, index)\n    : baseFindIndex(array, baseIsNaN, index, true);\n}\n\nmodule.exports = lastIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/lastIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/lodash.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/lodash.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.21';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports =  true && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (true) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n      return _;\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else {}\n}.call(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/lodash.js?");

/***/ }),

/***/ "./node_modules/lodash/memoize.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/memoize.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var MapCache = __webpack_require__(/*! ./_MapCache */ \"./node_modules/lodash/_MapCache.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/memoize.js?");

/***/ }),

/***/ "./node_modules/lodash/noop.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/noop.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/noop.js?");

/***/ }),

/***/ "./node_modules/lodash/nth.js":
/*!************************************!*\
  !*** ./node_modules/lodash/nth.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseNth = __webpack_require__(/*! ./_baseNth */ \"./node_modules/lodash/_baseNth.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\nfunction nth(array, n) {\n  return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n}\n\nmodule.exports = nth;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/nth.js?");

/***/ }),

/***/ "./node_modules/lodash/property.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/property.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseProperty = __webpack_require__(/*! ./_baseProperty */ \"./node_modules/lodash/_baseProperty.js\"),\n    basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ \"./node_modules/lodash/_basePropertyDeep.js\"),\n    isKey = __webpack_require__(/*! ./_isKey */ \"./node_modules/lodash/_isKey.js\"),\n    toKey = __webpack_require__(/*! ./_toKey */ \"./node_modules/lodash/_toKey.js\");\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/property.js?");

/***/ }),

/***/ "./node_modules/lodash/pull.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/pull.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    pullAll = __webpack_require__(/*! ./pullAll */ \"./node_modules/lodash/pullAll.js\");\n\n/**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\nvar pull = baseRest(pullAll);\n\nmodule.exports = pull;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/pull.js?");

/***/ }),

/***/ "./node_modules/lodash/pullAll.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/pullAll.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var basePullAll = __webpack_require__(/*! ./_basePullAll */ \"./node_modules/lodash/_basePullAll.js\");\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\nfunction pullAll(array, values) {\n  return (array && array.length && values && values.length)\n    ? basePullAll(array, values)\n    : array;\n}\n\nmodule.exports = pullAll;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/pullAll.js?");

/***/ }),

/***/ "./node_modules/lodash/pullAllBy.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/pullAllBy.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    basePullAll = __webpack_require__(/*! ./_basePullAll */ \"./node_modules/lodash/_basePullAll.js\");\n\n/**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nfunction pullAllBy(array, values, iteratee) {\n  return (array && array.length && values && values.length)\n    ? basePullAll(array, values, baseIteratee(iteratee, 2))\n    : array;\n}\n\nmodule.exports = pullAllBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/pullAllBy.js?");

/***/ }),

/***/ "./node_modules/lodash/pullAllWith.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/pullAllWith.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var basePullAll = __webpack_require__(/*! ./_basePullAll */ \"./node_modules/lodash/_basePullAll.js\");\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nfunction pullAllWith(array, values, comparator) {\n  return (array && array.length && values && values.length)\n    ? basePullAll(array, values, undefined, comparator)\n    : array;\n}\n\nmodule.exports = pullAllWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/pullAllWith.js?");

/***/ }),

/***/ "./node_modules/lodash/pullAt.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/pullAt.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseAt = __webpack_require__(/*! ./_baseAt */ \"./node_modules/lodash/_baseAt.js\"),\n    basePullAt = __webpack_require__(/*! ./_basePullAt */ \"./node_modules/lodash/_basePullAt.js\"),\n    compareAscending = __webpack_require__(/*! ./_compareAscending */ \"./node_modules/lodash/_compareAscending.js\"),\n    flatRest = __webpack_require__(/*! ./_flatRest */ \"./node_modules/lodash/_flatRest.js\"),\n    isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/lodash/_isIndex.js\");\n\n/**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\nvar pullAt = flatRest(function(array, indexes) {\n  var length = array == null ? 0 : array.length,\n      result = baseAt(array, indexes);\n\n  basePullAt(array, arrayMap(indexes, function(index) {\n    return isIndex(index, length) ? +index : index;\n  }).sort(compareAscending));\n\n  return result;\n});\n\nmodule.exports = pullAt;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/pullAt.js?");

/***/ }),

/***/ "./node_modules/lodash/remove.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/remove.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    basePullAt = __webpack_require__(/*! ./_basePullAt */ \"./node_modules/lodash/_basePullAt.js\");\n\n/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n *   return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\nfunction remove(array, predicate) {\n  var result = [];\n  if (!(array && array.length)) {\n    return result;\n  }\n  var index = -1,\n      indexes = [],\n      length = array.length;\n\n  predicate = baseIteratee(predicate, 3);\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result.push(value);\n      indexes.push(index);\n    }\n  }\n  basePullAt(array, indexes);\n  return result;\n}\n\nmodule.exports = remove;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/remove.js?");

/***/ }),

/***/ "./node_modules/lodash/reverse.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/reverse.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeReverse = arrayProto.reverse;\n\n/**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\nfunction reverse(array) {\n  return array == null ? array : nativeReverse.call(array);\n}\n\nmodule.exports = reverse;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/reverse.js?");

/***/ }),

/***/ "./node_modules/lodash/slice.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/slice.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ \"./node_modules/lodash/_isIterateeCall.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction slice(array, start, end) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n    start = 0;\n    end = length;\n  }\n  else {\n    start = start == null ? 0 : toInteger(start);\n    end = end === undefined ? length : toInteger(end);\n  }\n  return baseSlice(array, start, end);\n}\n\nmodule.exports = slice;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/slice.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedIndex.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/sortedIndex.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedIndex = __webpack_require__(/*! ./_baseSortedIndex */ \"./node_modules/lodash/_baseSortedIndex.js\");\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\nfunction sortedIndex(array, value) {\n  return baseSortedIndex(array, value);\n}\n\nmodule.exports = sortedIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedIndexBy.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/sortedIndexBy.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseSortedIndexBy = __webpack_require__(/*! ./_baseSortedIndexBy */ \"./node_modules/lodash/_baseSortedIndexBy.js\");\n\n/**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\nfunction sortedIndexBy(array, value, iteratee) {\n  return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));\n}\n\nmodule.exports = sortedIndexBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedIndexBy.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedIndexOf.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/sortedIndexOf.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedIndex = __webpack_require__(/*! ./_baseSortedIndex */ \"./node_modules/lodash/_baseSortedIndex.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\nfunction sortedIndexOf(array, value) {\n  var length = array == null ? 0 : array.length;\n  if (length) {\n    var index = baseSortedIndex(array, value);\n    if (index < length && eq(array[index], value)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = sortedIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedLastIndex.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/sortedLastIndex.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedIndex = __webpack_require__(/*! ./_baseSortedIndex */ \"./node_modules/lodash/_baseSortedIndex.js\");\n\n/**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\nfunction sortedLastIndex(array, value) {\n  return baseSortedIndex(array, value, true);\n}\n\nmodule.exports = sortedLastIndex;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedLastIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedLastIndexBy.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/sortedLastIndexBy.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseSortedIndexBy = __webpack_require__(/*! ./_baseSortedIndexBy */ \"./node_modules/lodash/_baseSortedIndexBy.js\");\n\n/**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n *  into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\nfunction sortedLastIndexBy(array, value, iteratee) {\n  return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);\n}\n\nmodule.exports = sortedLastIndexBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedLastIndexBy.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedLastIndexOf.js":
/*!**************************************************!*\
  !*** ./node_modules/lodash/sortedLastIndexOf.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedIndex = __webpack_require__(/*! ./_baseSortedIndex */ \"./node_modules/lodash/_baseSortedIndex.js\"),\n    eq = __webpack_require__(/*! ./eq */ \"./node_modules/lodash/eq.js\");\n\n/**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\nfunction sortedLastIndexOf(array, value) {\n  var length = array == null ? 0 : array.length;\n  if (length) {\n    var index = baseSortedIndex(array, value, true) - 1;\n    if (eq(array[index], value)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = sortedLastIndexOf;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedLastIndexOf.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedUniq.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/sortedUniq.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSortedUniq = __webpack_require__(/*! ./_baseSortedUniq */ \"./node_modules/lodash/_baseSortedUniq.js\");\n\n/**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\nfunction sortedUniq(array) {\n  return (array && array.length)\n    ? baseSortedUniq(array)\n    : [];\n}\n\nmodule.exports = sortedUniq;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedUniq.js?");

/***/ }),

/***/ "./node_modules/lodash/sortedUniqBy.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/sortedUniqBy.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseSortedUniq = __webpack_require__(/*! ./_baseSortedUniq */ \"./node_modules/lodash/_baseSortedUniq.js\");\n\n/**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\nfunction sortedUniqBy(array, iteratee) {\n  return (array && array.length)\n    ? baseSortedUniq(array, baseIteratee(iteratee, 2))\n    : [];\n}\n\nmodule.exports = sortedUniqBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/sortedUniqBy.js?");

/***/ }),

/***/ "./node_modules/lodash/stubArray.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/stubArray.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/stubArray.js?");

/***/ }),

/***/ "./node_modules/lodash/stubFalse.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/stubFalse.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/stubFalse.js?");

/***/ }),

/***/ "./node_modules/lodash/tail.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/tail.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\");\n\n/**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\nfunction tail(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? baseSlice(array, 1, length) : [];\n}\n\nmodule.exports = tail;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/tail.js?");

/***/ }),

/***/ "./node_modules/lodash/take.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/take.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n  if (!(array && array.length)) {\n    return [];\n  }\n  n = (guard || n === undefined) ? 1 : toInteger(n);\n  return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = take;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/take.js?");

/***/ }),

/***/ "./node_modules/lodash/takeRight.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/takeRight.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSlice = __webpack_require__(/*! ./_baseSlice */ \"./node_modules/lodash/_baseSlice.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\nfunction takeRight(array, n, guard) {\n  var length = array == null ? 0 : array.length;\n  if (!length) {\n    return [];\n  }\n  n = (guard || n === undefined) ? 1 : toInteger(n);\n  n = length - n;\n  return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nmodule.exports = takeRight;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/takeRight.js?");

/***/ }),

/***/ "./node_modules/lodash/takeRightWhile.js":
/*!***********************************************!*\
  !*** ./node_modules/lodash/takeRightWhile.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseWhile = __webpack_require__(/*! ./_baseWhile */ \"./node_modules/lodash/_baseWhile.js\");\n\n/**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': true },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\nfunction takeRightWhile(array, predicate) {\n  return (array && array.length)\n    ? baseWhile(array, baseIteratee(predicate, 3), false, true)\n    : [];\n}\n\nmodule.exports = takeRightWhile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/takeRightWhile.js?");

/***/ }),

/***/ "./node_modules/lodash/takeWhile.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/takeWhile.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseWhile = __webpack_require__(/*! ./_baseWhile */ \"./node_modules/lodash/_baseWhile.js\");\n\n/**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'active': false },\n *   { 'user': 'fred',    'active': false },\n *   { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\nfunction takeWhile(array, predicate) {\n  return (array && array.length)\n    ? baseWhile(array, baseIteratee(predicate, 3))\n    : [];\n}\n\nmodule.exports = takeWhile;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/takeWhile.js?");

/***/ }),

/***/ "./node_modules/lodash/toFinite.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toFinite.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var toNumber = __webpack_require__(/*! ./toNumber */ \"./node_modules/lodash/toNumber.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/toFinite.js?");

/***/ }),

/***/ "./node_modules/lodash/toInteger.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/toInteger.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var toFinite = __webpack_require__(/*! ./toFinite */ \"./node_modules/lodash/toFinite.js\");\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/toInteger.js?");

/***/ }),

/***/ "./node_modules/lodash/toLength.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toLength.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseClamp = __webpack_require__(/*! ./_baseClamp */ \"./node_modules/lodash/_baseClamp.js\"),\n    toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\nfunction toLength(value) {\n  return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n}\n\nmodule.exports = toLength;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/toLength.js?");

/***/ }),

/***/ "./node_modules/lodash/toNumber.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toNumber.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseTrim = __webpack_require__(/*! ./_baseTrim */ \"./node_modules/lodash/_baseTrim.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/toNumber.js?");

/***/ }),

/***/ "./node_modules/lodash/toString.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toString.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseToString = __webpack_require__(/*! ./_baseToString */ \"./node_modules/lodash/_baseToString.js\");\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/toString.js?");

/***/ }),

/***/ "./node_modules/lodash/union.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/union.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n  return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/union.js?");

/***/ }),

/***/ "./node_modules/lodash/unionBy.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/unionBy.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nvar unionBy = baseRest(function(arrays) {\n  var iteratee = last(arrays);\n  if (isArrayLikeObject(iteratee)) {\n    iteratee = undefined;\n  }\n  return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2));\n});\n\nmodule.exports = unionBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/unionBy.js?");

/***/ }),

/***/ "./node_modules/lodash/unionWith.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/unionWith.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ \"./node_modules/lodash/_baseFlatten.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\nvar unionWith = baseRest(function(arrays) {\n  var comparator = last(arrays);\n  comparator = typeof comparator == 'function' ? comparator : undefined;\n  return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n});\n\nmodule.exports = unionWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/unionWith.js?");

/***/ }),

/***/ "./node_modules/lodash/uniq.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/uniq.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\");\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n  return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/uniq.js?");

/***/ }),

/***/ "./node_modules/lodash/uniqBy.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/uniqBy.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\");\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n  return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/uniqBy.js?");

/***/ }),

/***/ "./node_modules/lodash/uniqWith.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/uniqWith.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseUniq = __webpack_require__(/*! ./_baseUniq */ \"./node_modules/lodash/_baseUniq.js\");\n\n/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\nfunction uniqWith(array, comparator) {\n  comparator = typeof comparator == 'function' ? comparator : undefined;\n  return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n}\n\nmodule.exports = uniqWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/uniqWith.js?");

/***/ }),

/***/ "./node_modules/lodash/unzip.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/unzip.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    baseProperty = __webpack_require__(/*! ./_baseProperty */ \"./node_modules/lodash/_baseProperty.js\"),\n    baseTimes = __webpack_require__(/*! ./_baseTimes */ \"./node_modules/lodash/_baseTimes.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nfunction unzip(array) {\n  if (!(array && array.length)) {\n    return [];\n  }\n  var length = 0;\n  array = arrayFilter(array, function(group) {\n    if (isArrayLikeObject(group)) {\n      length = nativeMax(group.length, length);\n      return true;\n    }\n  });\n  return baseTimes(length, function(index) {\n    return arrayMap(array, baseProperty(index));\n  });\n}\n\nmodule.exports = unzip;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/unzip.js?");

/***/ }),

/***/ "./node_modules/lodash/unzipWith.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/unzipWith.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var apply = __webpack_require__(/*! ./_apply */ \"./node_modules/lodash/_apply.js\"),\n    arrayMap = __webpack_require__(/*! ./_arrayMap */ \"./node_modules/lodash/_arrayMap.js\"),\n    unzip = __webpack_require__(/*! ./unzip */ \"./node_modules/lodash/unzip.js\");\n\n/**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n *  regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\nfunction unzipWith(array, iteratee) {\n  if (!(array && array.length)) {\n    return [];\n  }\n  var result = unzip(array);\n  if (iteratee == null) {\n    return result;\n  }\n  return arrayMap(result, function(group) {\n    return apply(iteratee, undefined, group);\n  });\n}\n\nmodule.exports = unzipWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/unzipWith.js?");

/***/ }),

/***/ "./node_modules/lodash/without.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/without.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseDifference = __webpack_require__(/*! ./_baseDifference */ \"./node_modules/lodash/_baseDifference.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n  return isArrayLikeObject(array)\n    ? baseDifference(array, values)\n    : [];\n});\n\nmodule.exports = without;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/without.js?");

/***/ }),

/***/ "./node_modules/lodash/xor.js":
/*!************************************!*\
  !*** ./node_modules/lodash/xor.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseXor = __webpack_require__(/*! ./_baseXor */ \"./node_modules/lodash/_baseXor.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\");\n\n/**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\nvar xor = baseRest(function(arrays) {\n  return baseXor(arrayFilter(arrays, isArrayLikeObject));\n});\n\nmodule.exports = xor;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/xor.js?");

/***/ }),

/***/ "./node_modules/lodash/xorBy.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/xorBy.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    baseIteratee = __webpack_require__(/*! ./_baseIteratee */ \"./node_modules/lodash/_baseIteratee.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseXor = __webpack_require__(/*! ./_baseXor */ \"./node_modules/lodash/_baseXor.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nvar xorBy = baseRest(function(arrays) {\n  var iteratee = last(arrays);\n  if (isArrayLikeObject(iteratee)) {\n    iteratee = undefined;\n  }\n  return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2));\n});\n\nmodule.exports = xorBy;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/xorBy.js?");

/***/ }),

/***/ "./node_modules/lodash/xorWith.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/xorWith.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ \"./node_modules/lodash/_arrayFilter.js\"),\n    baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    baseXor = __webpack_require__(/*! ./_baseXor */ \"./node_modules/lodash/_baseXor.js\"),\n    isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ \"./node_modules/lodash/isArrayLikeObject.js\"),\n    last = __webpack_require__(/*! ./last */ \"./node_modules/lodash/last.js\");\n\n/**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\nvar xorWith = baseRest(function(arrays) {\n  var comparator = last(arrays);\n  comparator = typeof comparator == 'function' ? comparator : undefined;\n  return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n});\n\nmodule.exports = xorWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/xorWith.js?");

/***/ }),

/***/ "./node_modules/lodash/zip.js":
/*!************************************!*\
  !*** ./node_modules/lodash/zip.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    unzip = __webpack_require__(/*! ./unzip */ \"./node_modules/lodash/unzip.js\");\n\n/**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nvar zip = baseRest(unzip);\n\nmodule.exports = zip;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/zip.js?");

/***/ }),

/***/ "./node_modules/lodash/zipObject.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/zipObject.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var assignValue = __webpack_require__(/*! ./_assignValue */ \"./node_modules/lodash/_assignValue.js\"),\n    baseZipObject = __webpack_require__(/*! ./_baseZipObject */ \"./node_modules/lodash/_baseZipObject.js\");\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n  return baseZipObject(props || [], values || [], assignValue);\n}\n\nmodule.exports = zipObject;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/zipObject.js?");

/***/ }),

/***/ "./node_modules/lodash/zipObjectDeep.js":
/*!**********************************************!*\
  !*** ./node_modules/lodash/zipObjectDeep.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseSet = __webpack_require__(/*! ./_baseSet */ \"./node_modules/lodash/_baseSet.js\"),\n    baseZipObject = __webpack_require__(/*! ./_baseZipObject */ \"./node_modules/lodash/_baseZipObject.js\");\n\n/**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\nfunction zipObjectDeep(props, values) {\n  return baseZipObject(props || [], values || [], baseSet);\n}\n\nmodule.exports = zipObjectDeep;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/zipObjectDeep.js?");

/***/ }),

/***/ "./node_modules/lodash/zipWith.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/zipWith.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseRest = __webpack_require__(/*! ./_baseRest */ \"./node_modules/lodash/_baseRest.js\"),\n    unzipWith = __webpack_require__(/*! ./unzipWith */ \"./node_modules/lodash/unzipWith.js\");\n\n/**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n *  grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n *   return a + b + c;\n * });\n * // => [111, 222]\n */\nvar zipWith = baseRest(function(arrays) {\n  var length = arrays.length,\n      iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n  iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n  return unzipWith(arrays, iteratee);\n});\n\nmodule.exports = zipWith;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/lodash/zipWith.js?");

/***/ }),

/***/ "./node_modules/m3u8-parser/dist/m3u8-parser.es.js":
/*!*********************************************************************!*\
  !*** ./node_modules/m3u8-parser/dist/m3u8-parser.es.js + 1 modules ***!
  \*********************************************************************/
/*! exports provided: LineStream, ParseStream, Parser */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/assertThisInitialized.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inheritsLoose.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js (<- Module uses injected variables (Buffer)) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"LineStream\", function() { return /* binding */ m3u8_parser_es_LineStream; });\n__webpack_require__.d(__webpack_exports__, \"ParseStream\", function() { return /* binding */ m3u8_parser_es_ParseStream; });\n__webpack_require__.d(__webpack_exports__, \"Parser\", function() { return /* binding */ m3u8_parser_es_Parser; });\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inheritsLoose.js\nvar inheritsLoose = __webpack_require__(\"./node_modules/@babel/runtime/helpers/inheritsLoose.js\");\nvar inheritsLoose_default = /*#__PURE__*/__webpack_require__.n(inheritsLoose);\n\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/stream.js\n/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n  function Stream() {\n    this.listeners = {};\n  }\n  /**\n   * Add a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener the callback to be invoked when an event of\n   * the specified type occurs\n   */\n\n\n  var _proto = Stream.prototype;\n\n  _proto.on = function on(type, listener) {\n    if (!this.listeners[type]) {\n      this.listeners[type] = [];\n    }\n\n    this.listeners[type].push(listener);\n  }\n  /**\n   * Remove a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener  a function previously registered for this\n   * type of event through `on`\n   * @return {boolean} if we could turn it off or not\n   */\n  ;\n\n  _proto.off = function off(type, listener) {\n    if (!this.listeners[type]) {\n      return false;\n    }\n\n    var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n    // In Video.js we slice listener functions\n    // on trigger so that it does not mess up the order\n    // while we loop through.\n    //\n    // Here we slice on off so that the loop in trigger\n    // can continue using it's old reference to loop without\n    // messing up the order.\n\n    this.listeners[type] = this.listeners[type].slice(0);\n    this.listeners[type].splice(index, 1);\n    return index > -1;\n  }\n  /**\n   * Trigger an event of the specified type on this stream. Any additional\n   * arguments to this function are passed as parameters to event listeners.\n   *\n   * @param {string} type the event name\n   */\n  ;\n\n  _proto.trigger = function trigger(type) {\n    var callbacks = this.listeners[type];\n\n    if (!callbacks) {\n      return;\n    } // Slicing the arguments on every invocation of this method\n    // can add a significant amount of overhead. Avoid the\n    // intermediate object creation for the common case of a\n    // single callback argument\n\n\n    if (arguments.length === 2) {\n      var length = callbacks.length;\n\n      for (var i = 0; i < length; ++i) {\n        callbacks[i].call(this, arguments[1]);\n      }\n    } else {\n      var args = Array.prototype.slice.call(arguments, 1);\n      var _length = callbacks.length;\n\n      for (var _i = 0; _i < _length; ++_i) {\n        callbacks[_i].apply(this, args);\n      }\n    }\n  }\n  /**\n   * Destroys the stream and cleans up.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.listeners = {};\n  }\n  /**\n   * Forwards all `data` events on this stream to the destination stream. The\n   * destination stream should provide a method `push` to receive the data\n   * events as they arrive.\n   *\n   * @param {Stream} destination the stream that will receive all `data` events\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n   */\n  ;\n\n  _proto.pipe = function pipe(destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n  };\n\n  return Stream;\n}();\n\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js\nvar helpers_extends = __webpack_require__(\"./node_modules/@babel/runtime/helpers/extends.js\");\nvar extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js\nvar assertThisInitialized = __webpack_require__(\"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\nvar assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);\n\n// EXTERNAL MODULE: ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js\nvar decode_b64_to_uint8_array = __webpack_require__(\"./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js\");\n\n// CONCATENATED MODULE: ./node_modules/m3u8-parser/dist/m3u8-parser.es.js\n/*! @name m3u8-parser @version 4.8.0 @license Apache-2.0 */\n\n\n\n\n\n\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nvar m3u8_parser_es_LineStream = /*#__PURE__*/function (_Stream) {\n  inheritsLoose_default()(LineStream, _Stream);\n\n  function LineStream() {\n    var _this;\n\n    _this = _Stream.call(this) || this;\n    _this.buffer = '';\n    return _this;\n  }\n  /**\n   * Add new data to be parsed.\n   *\n   * @param {string} data the text to process\n   */\n\n\n  var _proto = LineStream.prototype;\n\n  _proto.push = function push(data) {\n    var nextNewline;\n    this.buffer += data;\n    nextNewline = this.buffer.indexOf('\\n');\n\n    for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n      this.trigger('data', this.buffer.substring(0, nextNewline));\n      this.buffer = this.buffer.substring(nextNewline + 1);\n    }\n  };\n\n  return LineStream;\n}(Stream);\n\nvar TAB = String.fromCharCode(0x09);\n\nvar parseByterange = function parseByterange(byterangeString) {\n  // optionally match and capture 0+ digits before `@`\n  // optionally match and capture 0+ digits after `@`\n  var match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n  var result = {};\n\n  if (match[1]) {\n    result.length = parseInt(match[1], 10);\n  }\n\n  if (match[2]) {\n    result.offset = parseInt(match[2], 10);\n  }\n\n  return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue   -> key '=' value\n * key        -> [^=]*\n * value      -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nvar attributeSeparator = function attributeSeparator() {\n  var key = '[^=]*';\n  var value = '\"[^\"]*\"|[^,]*';\n  var keyvalue = '(?:' + key + ')=(?:' + value + ')';\n  return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nvar parseAttributes = function parseAttributes(attributes) {\n  // split the string using attributes as the separator\n  var attrs = attributes.split(attributeSeparator());\n  var result = {};\n  var i = attrs.length;\n  var attr;\n\n  while (i--) {\n    // filter out unmatched portions of the string\n    if (attrs[i] === '') {\n      continue;\n    } // split the key and value\n\n\n    attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n    attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n    result[attr[0]] = attr[1];\n  }\n\n  return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nvar m3u8_parser_es_ParseStream = /*#__PURE__*/function (_Stream) {\n  inheritsLoose_default()(ParseStream, _Stream);\n\n  function ParseStream() {\n    var _this;\n\n    _this = _Stream.call(this) || this;\n    _this.customParsers = [];\n    _this.tagMappers = [];\n    return _this;\n  }\n  /**\n   * Parses an additional line of input.\n   *\n   * @param {string} line a single line of an M3U8 file to parse\n   */\n\n\n  var _proto = ParseStream.prototype;\n\n  _proto.push = function push(line) {\n    var _this2 = this;\n\n    var match;\n    var event; // strip whitespace\n\n    line = line.trim();\n\n    if (line.length === 0) {\n      // ignore empty lines\n      return;\n    } // URIs\n\n\n    if (line[0] !== '#') {\n      this.trigger('data', {\n        type: 'uri',\n        uri: line\n      });\n      return;\n    } // map tags\n\n\n    var newLines = this.tagMappers.reduce(function (acc, mapper) {\n      var mappedLine = mapper(line); // skip if unchanged\n\n      if (mappedLine === line) {\n        return acc;\n      }\n\n      return acc.concat([mappedLine]);\n    }, [line]);\n    newLines.forEach(function (newLine) {\n      for (var i = 0; i < _this2.customParsers.length; i++) {\n        if (_this2.customParsers[i].call(_this2, newLine)) {\n          return;\n        }\n      } // Comments\n\n\n      if (newLine.indexOf('#EXT') !== 0) {\n        _this2.trigger('data', {\n          type: 'comment',\n          text: newLine.slice(1)\n        });\n\n        return;\n      } // strip off any carriage returns here so the regex matching\n      // doesn't have to account for them.\n\n\n      newLine = newLine.replace('\\r', ''); // Tags\n\n      match = /^#EXTM3U/.exec(newLine);\n\n      if (match) {\n        _this2.trigger('data', {\n          type: 'tag',\n          tagType: 'm3u'\n        });\n\n        return;\n      }\n\n      match = /^#EXTINF:?([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'inf'\n        };\n\n        if (match[1]) {\n          event.duration = parseFloat(match[1]);\n        }\n\n        if (match[2]) {\n          event.title = match[2];\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'targetduration'\n        };\n\n        if (match[1]) {\n          event.duration = parseInt(match[1], 10);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-VERSION:?([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'version'\n        };\n\n        if (match[1]) {\n          event.version = parseInt(match[1], 10);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA-SEQUENCE:?(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:?(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'discontinuity-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'playlist-type'\n        };\n\n        if (match[1]) {\n          event.playlistType = match[1];\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-BYTERANGE:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = extends_default()(parseByterange(match[1]), {\n          type: 'tag',\n          tagType: 'byterange'\n        });\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'allow-cache'\n        };\n\n        if (match[1]) {\n          event.allowed = !/NO/.test(match[1]);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-MAP:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'map'\n        };\n\n        if (match[1]) {\n          var attributes = parseAttributes(match[1]);\n\n          if (attributes.URI) {\n            event.uri = attributes.URI;\n          }\n\n          if (attributes.BYTERANGE) {\n            event.byterange = parseByterange(attributes.BYTERANGE);\n          }\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-STREAM-INF:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'stream-inf'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n\n          if (event.attributes.RESOLUTION) {\n            var split = event.attributes.RESOLUTION.split('x');\n            var resolution = {};\n\n            if (split[0]) {\n              resolution.width = parseInt(split[0], 10);\n            }\n\n            if (split[1]) {\n              resolution.height = parseInt(split[1], 10);\n            }\n\n            event.attributes.RESOLUTION = resolution;\n          }\n\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n\n          if (event.attributes['PROGRAM-ID']) {\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n          }\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n      if (match) {\n        _this2.trigger('data', {\n          type: 'tag',\n          tagType: 'endlist'\n        });\n\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n      if (match) {\n        _this2.trigger('data', {\n          type: 'tag',\n          tagType: 'discontinuity'\n        });\n\n        return;\n      }\n\n      match = /^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'program-date-time'\n        };\n\n        if (match[1]) {\n          event.dateTimeString = match[1];\n          event.dateTimeObject = new Date(match[1]);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-KEY:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'key'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n          if (event.attributes.IV) {\n            if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n              event.attributes.IV = event.attributes.IV.substring(2);\n            }\n\n            event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n            event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n            event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n            event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n            event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n            event.attributes.IV = new Uint32Array(event.attributes.IV);\n          }\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-START:?(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'start'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n          event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n          event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out-cont'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-in'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'skip'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n          event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n        }\n\n        if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n          event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['DURATION'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['INDEPENDENT', 'GAP'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n\n        if (event.attributes.hasOwnProperty('BYTERANGE')) {\n          event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n        }\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'server-control'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part-inf'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['PART-TARGET'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'preload-hint'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n            var subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n            event.attributes.byterange = event.attributes.byterange || {};\n            event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n            delete event.attributes[key];\n          }\n        });\n\n        _this2.trigger('data', event);\n\n        return;\n      }\n\n      match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'rendition-report'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n          }\n        });\n\n        _this2.trigger('data', event);\n\n        return;\n      } // unknown tag type\n\n\n      _this2.trigger('data', {\n        type: 'tag',\n        data: newLine.slice(4)\n      });\n    });\n  }\n  /**\n   * Add a parser for custom headers\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.customType   the custom type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n  ;\n\n  _proto.addParser = function addParser(_ref) {\n    var _this3 = this;\n\n    var expression = _ref.expression,\n        customType = _ref.customType,\n        dataParser = _ref.dataParser,\n        segment = _ref.segment;\n\n    if (typeof dataParser !== 'function') {\n      dataParser = function dataParser(line) {\n        return line;\n      };\n    }\n\n    this.customParsers.push(function (line) {\n      var match = expression.exec(line);\n\n      if (match) {\n        _this3.trigger('data', {\n          type: 'custom',\n          data: dataParser(line),\n          customType: customType,\n          segment: segment\n        });\n\n        return true;\n      }\n    });\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n  ;\n\n  _proto.addTagMapper = function addTagMapper(_ref2) {\n    var expression = _ref2.expression,\n        map = _ref2.map;\n\n    var mapFn = function mapFn(line) {\n      if (expression.test(line)) {\n        return map(line);\n      }\n\n      return line;\n    };\n\n    this.tagMappers.push(mapFn);\n  };\n\n  return ParseStream;\n}(Stream);\n\nvar camelCase = function camelCase(str) {\n  return str.toLowerCase().replace(/-(\\w)/g, function (a) {\n    return a[1].toUpperCase();\n  });\n};\n\nvar camelCaseKeys = function camelCaseKeys(attributes) {\n  var result = {};\n  Object.keys(attributes).forEach(function (key) {\n    result[camelCase(key)] = attributes[key];\n  });\n  return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nvar setHoldBack = function setHoldBack(manifest) {\n  var serverControl = manifest.serverControl,\n      targetDuration = manifest.targetDuration,\n      partTargetDuration = manifest.partTargetDuration;\n\n  if (!serverControl) {\n    return;\n  }\n\n  var tag = '#EXT-X-SERVER-CONTROL';\n  var hb = 'holdBack';\n  var phb = 'partHoldBack';\n  var minTargetDuration = targetDuration && targetDuration * 3;\n  var minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n  if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n    serverControl[hb] = minTargetDuration;\n    this.trigger('info', {\n      message: tag + \" defaulting HOLD-BACK to targetDuration * 3 (\" + minTargetDuration + \").\"\n    });\n  }\n\n  if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n    this.trigger('warn', {\n      message: tag + \" clamping HOLD-BACK (\" + serverControl[hb] + \") to targetDuration * 3 (\" + minTargetDuration + \")\"\n    });\n    serverControl[hb] = minTargetDuration;\n  } // default no part hold back to part target duration * 3\n\n\n  if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n    serverControl[phb] = partTargetDuration * 3;\n    this.trigger('info', {\n      message: tag + \" defaulting PART-HOLD-BACK to partTargetDuration * 3 (\" + serverControl[phb] + \").\"\n    });\n  } // if part hold back is too small default it to part target duration * 2\n\n\n  if (partTargetDuration && serverControl[phb] < minPartDuration) {\n    this.trigger('warn', {\n      message: tag + \" clamping PART-HOLD-BACK (\" + serverControl[phb] + \") to partTargetDuration * 2 (\" + minPartDuration + \").\"\n    });\n    serverControl[phb] = minPartDuration;\n  }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nvar m3u8_parser_es_Parser = /*#__PURE__*/function (_Stream) {\n  inheritsLoose_default()(Parser, _Stream);\n\n  function Parser() {\n    var _this;\n\n    _this = _Stream.call(this) || this;\n    _this.lineStream = new m3u8_parser_es_LineStream();\n    _this.parseStream = new m3u8_parser_es_ParseStream();\n\n    _this.lineStream.pipe(_this.parseStream);\n    /* eslint-disable consistent-this */\n\n\n    var self = assertThisInitialized_default()(_this);\n    /* eslint-enable consistent-this */\n\n\n    var uris = [];\n    var currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n    var currentMap; // if specified, the active decryption key\n\n    var _key;\n\n    var hasParts = false;\n\n    var noop = function noop() {};\n\n    var defaultMediaGroups = {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n    // used in MPDs with Widevine encrypted streams.\n\n    var widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n    var currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n    _this.manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      segments: []\n    }; // keep track of the last seen segment's byte range end, as segments are not required\n    // to provide the offset, in which case it defaults to the next byte after the\n    // previous segment\n\n    var lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n    var lastPartByterangeEnd = 0;\n\n    _this.on('end', function () {\n      // only add preloadSegment if we don't yet have a uri for it.\n      // and we actually have parts/preloadHints\n      if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n        return;\n      }\n\n      if (!currentUri.map && currentMap) {\n        currentUri.map = currentMap;\n      }\n\n      if (!currentUri.key && _key) {\n        currentUri.key = _key;\n      }\n\n      if (!currentUri.timeline && typeof currentTimeline === 'number') {\n        currentUri.timeline = currentTimeline;\n      }\n\n      _this.manifest.preloadSegment = currentUri;\n    }); // update the manifest with the m3u8 entry from the parse stream\n\n\n    _this.parseStream.on('data', function (entry) {\n      var mediaGroup;\n      var rendition;\n      ({\n        tag: function tag() {\n          // switch based on the tag type\n          (({\n            version: function version() {\n              if (entry.version) {\n                this.manifest.version = entry.version;\n              }\n            },\n            'allow-cache': function allowCache() {\n              this.manifest.allowCache = entry.allowed;\n\n              if (!('allowed' in entry)) {\n                this.trigger('info', {\n                  message: 'defaulting allowCache to YES'\n                });\n                this.manifest.allowCache = true;\n              }\n            },\n            byterange: function byterange() {\n              var byterange = {};\n\n              if ('length' in entry) {\n                currentUri.byterange = byterange;\n                byterange.length = entry.length;\n\n                if (!('offset' in entry)) {\n                  /*\n                   * From the latest spec (as of this writing):\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n                   *\n                   * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n                   *\n                   * \"If o [offset] is not present, the sub-range begins at the next byte\n                   * following the sub-range of the previous media segment.\"\n                   */\n                  entry.offset = lastByterangeEnd;\n                }\n              }\n\n              if ('offset' in entry) {\n                currentUri.byterange = byterange;\n                byterange.offset = entry.offset;\n              }\n\n              lastByterangeEnd = byterange.offset + byterange.length;\n            },\n            endlist: function endlist() {\n              this.manifest.endList = true;\n            },\n            inf: function inf() {\n              if (!('mediaSequence' in this.manifest)) {\n                this.manifest.mediaSequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting media sequence to zero'\n                });\n              }\n\n              if (!('discontinuitySequence' in this.manifest)) {\n                this.manifest.discontinuitySequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting discontinuity sequence to zero'\n                });\n              }\n\n              if (entry.duration > 0) {\n                currentUri.duration = entry.duration;\n              }\n\n              if (entry.duration === 0) {\n                currentUri.duration = 0.01;\n                this.trigger('info', {\n                  message: 'updating zero segment duration to a small value'\n                });\n              }\n\n              this.manifest.segments = uris;\n            },\n            key: function key() {\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without attribute list'\n                });\n                return;\n              } // clear the active encryption key\n\n\n              if (entry.attributes.METHOD === 'NONE') {\n                _key = null;\n                return;\n              }\n\n              if (!entry.attributes.URI) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without URI'\n                });\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.apple.fps.1_0'] = {\n                  attributes: entry.attributes\n                };\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.microsoft.playready'] = {\n                  uri: entry.attributes.URI\n                };\n                return;\n              } // check if the content is encrypted for Widevine\n              // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\n                var VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n                if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n                  this.trigger('warn', {\n                    message: 'invalid key method provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n                  this.trigger('warn', {\n                    message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n                  });\n                }\n\n                if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n                  this.trigger('warn', {\n                    message: 'invalid key URI provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n                  this.trigger('warn', {\n                    message: 'invalid key ID provided for Widevine'\n                  });\n                  return;\n                } // if Widevine key attributes are valid, store them as `contentProtection`\n                // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n                this.manifest.contentProtection = this.manifest.contentProtection || {};\n                this.manifest.contentProtection['com.widevine.alpha'] = {\n                  attributes: {\n                    schemeIdUri: entry.attributes.KEYFORMAT,\n                    // remove '0x' from the key id string\n                    keyId: entry.attributes.KEYID.substring(2)\n                  },\n                  // decode the base64-encoded PSSH box\n                  pssh: Object(decode_b64_to_uint8_array[\"default\"])(entry.attributes.URI.split(',')[1])\n                };\n                return;\n              }\n\n              if (!entry.attributes.METHOD) {\n                this.trigger('warn', {\n                  message: 'defaulting key method to AES-128'\n                });\n              } // setup an encryption key for upcoming segments\n\n\n              _key = {\n                method: entry.attributes.METHOD || 'AES-128',\n                uri: entry.attributes.URI\n              };\n\n              if (typeof entry.attributes.IV !== 'undefined') {\n                _key.iv = entry.attributes.IV;\n              }\n            },\n            'media-sequence': function mediaSequence() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid media sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.mediaSequence = entry.number;\n            },\n            'discontinuity-sequence': function discontinuitySequence() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.discontinuitySequence = entry.number;\n              currentTimeline = entry.number;\n            },\n            'playlist-type': function playlistType() {\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\n                this.trigger('warn', {\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\n                });\n                return;\n              }\n\n              this.manifest.playlistType = entry.playlistType;\n            },\n            map: function map() {\n              currentMap = {};\n\n              if (entry.uri) {\n                currentMap.uri = entry.uri;\n              }\n\n              if (entry.byterange) {\n                currentMap.byterange = entry.byterange;\n              }\n\n              if (_key) {\n                currentMap.key = _key;\n              }\n            },\n            'stream-inf': function streamInf() {\n              this.manifest.playlists = uris;\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring empty stream-inf attributes'\n                });\n                return;\n              }\n\n              if (!currentUri.attributes) {\n                currentUri.attributes = {};\n              }\n\n              extends_default()(currentUri.attributes, entry.attributes);\n            },\n            media: function media() {\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n                this.trigger('warn', {\n                  message: 'ignoring incomplete or missing media group'\n                });\n                return;\n              } // find the media group, creating defaults as necessary\n\n\n              var mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n              mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n              mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n              rendition = {\n                default: /yes/i.test(entry.attributes.DEFAULT)\n              };\n\n              if (rendition.default) {\n                rendition.autoselect = true;\n              } else {\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n              }\n\n              if (entry.attributes.LANGUAGE) {\n                rendition.language = entry.attributes.LANGUAGE;\n              }\n\n              if (entry.attributes.URI) {\n                rendition.uri = entry.attributes.URI;\n              }\n\n              if (entry.attributes['INSTREAM-ID']) {\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\n              }\n\n              if (entry.attributes.CHARACTERISTICS) {\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\n              }\n\n              if (entry.attributes.FORCED) {\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\n              } // insert the new rendition\n\n\n              mediaGroup[entry.attributes.NAME] = rendition;\n            },\n            discontinuity: function discontinuity() {\n              currentTimeline += 1;\n              currentUri.discontinuity = true;\n              this.manifest.discontinuityStarts.push(uris.length);\n            },\n            'program-date-time': function programDateTime() {\n              if (typeof this.manifest.dateTimeString === 'undefined') {\n                // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n                // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n                // to the manifest object\n                // TODO: Consider removing this in future major version\n                this.manifest.dateTimeString = entry.dateTimeString;\n                this.manifest.dateTimeObject = entry.dateTimeObject;\n              }\n\n              currentUri.dateTimeString = entry.dateTimeString;\n              currentUri.dateTimeObject = entry.dateTimeObject;\n            },\n            targetduration: function targetduration() {\n              if (!isFinite(entry.duration) || entry.duration < 0) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid target duration: ' + entry.duration\n                });\n                return;\n              }\n\n              this.manifest.targetDuration = entry.duration;\n              setHoldBack.call(this, this.manifest);\n            },\n            start: function start() {\n              if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n                this.trigger('warn', {\n                  message: 'ignoring start declaration without appropriate attribute list'\n                });\n                return;\n              }\n\n              this.manifest.start = {\n                timeOffset: entry.attributes['TIME-OFFSET'],\n                precise: entry.attributes.PRECISE\n              };\n            },\n            'cue-out': function cueOut() {\n              currentUri.cueOut = entry.data;\n            },\n            'cue-out-cont': function cueOutCont() {\n              currentUri.cueOutCont = entry.data;\n            },\n            'cue-in': function cueIn() {\n              currentUri.cueIn = entry.data;\n            },\n            'skip': function skip() {\n              this.manifest.skip = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n            },\n            'part': function part() {\n              var _this2 = this;\n\n              hasParts = true; // parts are always specifed before a segment\n\n              var segmentIndex = this.manifest.segments.length;\n              var part = camelCaseKeys(entry.attributes);\n              currentUri.parts = currentUri.parts || [];\n              currentUri.parts.push(part);\n\n              if (part.byterange) {\n                if (!part.byterange.hasOwnProperty('offset')) {\n                  part.byterange.offset = lastPartByterangeEnd;\n                }\n\n                lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n              }\n\n              var partIndex = currentUri.parts.length - 1;\n              this.warnOnMissingAttributes_(\"#EXT-X-PART #\" + partIndex + \" for segment #\" + segmentIndex, entry.attributes, ['URI', 'DURATION']);\n\n              if (this.manifest.renditionReports) {\n                this.manifest.renditionReports.forEach(function (r, i) {\n                  if (!r.hasOwnProperty('lastPart')) {\n                    _this2.trigger('warn', {\n                      message: \"#EXT-X-RENDITION-REPORT #\" + i + \" lacks required attribute(s): LAST-PART\"\n                    });\n                  }\n                });\n              }\n            },\n            'server-control': function serverControl() {\n              var attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n              if (!attrs.hasOwnProperty('canBlockReload')) {\n                attrs.canBlockReload = false;\n                this.trigger('info', {\n                  message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n                });\n              }\n\n              setHoldBack.call(this, this.manifest);\n\n              if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n                this.trigger('warn', {\n                  message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n                });\n              }\n            },\n            'preload-hint': function preloadHint() {\n              // parts are always specifed before a segment\n              var segmentIndex = this.manifest.segments.length;\n              var hint = camelCaseKeys(entry.attributes);\n              var isPart = hint.type && hint.type === 'PART';\n              currentUri.preloadHints = currentUri.preloadHints || [];\n              currentUri.preloadHints.push(hint);\n\n              if (hint.byterange) {\n                if (!hint.byterange.hasOwnProperty('offset')) {\n                  // use last part byterange end or zero if not a part.\n                  hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n                  if (isPart) {\n                    lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                  }\n                }\n              }\n\n              var index = currentUri.preloadHints.length - 1;\n              this.warnOnMissingAttributes_(\"#EXT-X-PRELOAD-HINT #\" + index + \" for segment #\" + segmentIndex, entry.attributes, ['TYPE', 'URI']);\n\n              if (!hint.type) {\n                return;\n              } // search through all preload hints except for the current one for\n              // a duplicate type.\n\n\n              for (var i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                var otherHint = currentUri.preloadHints[i];\n\n                if (!otherHint.type) {\n                  continue;\n                }\n\n                if (otherHint.type === hint.type) {\n                  this.trigger('warn', {\n                    message: \"#EXT-X-PRELOAD-HINT #\" + index + \" for segment #\" + segmentIndex + \" has the same TYPE \" + hint.type + \" as preload hint #\" + i\n                  });\n                }\n              }\n            },\n            'rendition-report': function renditionReport() {\n              var report = camelCaseKeys(entry.attributes);\n              this.manifest.renditionReports = this.manifest.renditionReports || [];\n              this.manifest.renditionReports.push(report);\n              var index = this.manifest.renditionReports.length - 1;\n              var required = ['LAST-MSN', 'URI'];\n\n              if (hasParts) {\n                required.push('LAST-PART');\n              }\n\n              this.warnOnMissingAttributes_(\"#EXT-X-RENDITION-REPORT #\" + index, entry.attributes, required);\n            },\n            'part-inf': function partInf() {\n              this.manifest.partInf = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n              if (this.manifest.partInf.partTarget) {\n                this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n              }\n\n              setHoldBack.call(this, this.manifest);\n            }\n          })[entry.tagType] || noop).call(self);\n        },\n        uri: function uri() {\n          currentUri.uri = entry.uri;\n          uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n          if (this.manifest.targetDuration && !('duration' in currentUri)) {\n            this.trigger('warn', {\n              message: 'defaulting segment duration to the target duration'\n            });\n            currentUri.duration = this.manifest.targetDuration;\n          } // annotate with encryption information, if necessary\n\n\n          if (_key) {\n            currentUri.key = _key;\n          }\n\n          currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n          if (currentMap) {\n            currentUri.map = currentMap;\n          } // reset the last byterange end as it needs to be 0 between parts\n\n\n          lastPartByterangeEnd = 0; // prepare for the next URI\n\n          currentUri = {};\n        },\n        comment: function comment() {// comments are not important for playback\n        },\n        custom: function custom() {\n          // if this is segment-level data attach the output to the segment\n          if (entry.segment) {\n            currentUri.custom = currentUri.custom || {};\n            currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n          } else {\n            this.manifest.custom = this.manifest.custom || {};\n            this.manifest.custom[entry.customType] = entry.data;\n          }\n        }\n      })[entry.type].call(self);\n    });\n\n    return _this;\n  }\n\n  var _proto = Parser.prototype;\n\n  _proto.warnOnMissingAttributes_ = function warnOnMissingAttributes_(identifier, attributes, required) {\n    var missing = [];\n    required.forEach(function (key) {\n      if (!attributes.hasOwnProperty(key)) {\n        missing.push(key);\n      }\n    });\n\n    if (missing.length) {\n      this.trigger('warn', {\n        message: identifier + \" lacks required attribute(s): \" + missing.join(', ')\n      });\n    }\n  }\n  /**\n   * Parse the input string and update the manifest object.\n   *\n   * @param {string} chunk a potentially incomplete portion of the manifest\n   */\n  ;\n\n  _proto.push = function push(chunk) {\n    this.lineStream.push(chunk);\n  }\n  /**\n   * Flush any remaining input. This can be handy if the last line of an M3U8\n   * manifest did not contain a trailing newline but the file has been\n   * completely received.\n   */\n  ;\n\n  _proto.end = function end() {\n    // flush any buffered input\n    this.lineStream.push('\\n');\n    this.trigger('end');\n  }\n  /**\n   * Add an additional parser for non-standard tags\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.type         the type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n  ;\n\n  _proto.addParser = function addParser(options) {\n    this.parseStream.addParser(options);\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n  ;\n\n  _proto.addTagMapper = function addTagMapper(options) {\n    this.parseStream.addTagMapper(options);\n  };\n\n  return Parser;\n}(Stream);\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/m3u8-parser/dist/m3u8-parser.es.js_+_1_modules?");

/***/ }),

/***/ "./node_modules/masonry-layout/masonry.js":
/*!************************************************!*\
  !*** ./node_modules/masonry-layout/masonry.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * Masonry v4.2.2\n * Cascading grid layout library\n * https://masonry.desandro.com\n * MIT License\n * by David DeSandro\n */\n\n( function( window, factory ) {\n  // universal module definition\n  /* jshint strict: false */ /*globals define, module, require */\n  if ( true ) {\n    // AMD\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n        __webpack_require__(/*! outlayer/outlayer */ \"./node_modules/outlayer/outlayer.js\"),\n        __webpack_require__(/*! get-size/get-size */ \"./node_modules/get-size/get-size.js\")\n      ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( window, function factory( Outlayer, getSize ) {\n\n'use strict';\n\n// -------------------------- masonryDefinition -------------------------- //\n\n  // create an Outlayer layout class\n  var Masonry = Outlayer.create('masonry');\n  // isFitWidth -> fitWidth\n  Masonry.compatOptions.fitWidth = 'isFitWidth';\n\n  var proto = Masonry.prototype;\n\n  proto._resetLayout = function() {\n    this.getSize();\n    this._getMeasurement( 'columnWidth', 'outerWidth' );\n    this._getMeasurement( 'gutter', 'outerWidth' );\n    this.measureColumns();\n\n    // reset column Y\n    this.colYs = [];\n    for ( var i=0; i < this.cols; i++ ) {\n      this.colYs.push( 0 );\n    }\n\n    this.maxY = 0;\n    this.horizontalColIndex = 0;\n  };\n\n  proto.measureColumns = function() {\n    this.getContainerWidth();\n    // if columnWidth is 0, default to outerWidth of first item\n    if ( !this.columnWidth ) {\n      var firstItem = this.items[0];\n      var firstItemElem = firstItem && firstItem.element;\n      // columnWidth fall back to item of first element\n      this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n        // if first elem has no width, default to size of container\n        this.containerWidth;\n    }\n\n    var columnWidth = this.columnWidth += this.gutter;\n\n    // calculate columns\n    var containerWidth = this.containerWidth + this.gutter;\n    var cols = containerWidth / columnWidth;\n    // fix rounding errors, typically with gutters\n    var excess = columnWidth - containerWidth % columnWidth;\n    // if overshoot is less than a pixel, round up, otherwise floor it\n    var mathMethod = excess && excess < 1 ? 'round' : 'floor';\n    cols = Math[ mathMethod ]( cols );\n    this.cols = Math.max( cols, 1 );\n  };\n\n  proto.getContainerWidth = function() {\n    // container is parent if fit width\n    var isFitWidth = this._getOption('fitWidth');\n    var container = isFitWidth ? this.element.parentNode : this.element;\n    // check that this.size and size are there\n    // IE8 triggers resize on body size change, so they might not be\n    var size = getSize( container );\n    this.containerWidth = size && size.innerWidth;\n  };\n\n  proto._getItemLayoutPosition = function( item ) {\n    item.getSize();\n    // how many columns does this brick span\n    var remainder = item.size.outerWidth % this.columnWidth;\n    var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n    // round if off by 1 pixel, otherwise use ceil\n    var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n    colSpan = Math.min( colSpan, this.cols );\n    // use horizontal or top column position\n    var colPosMethod = this.options.horizontalOrder ?\n      '_getHorizontalColPosition' : '_getTopColPosition';\n    var colPosition = this[ colPosMethod ]( colSpan, item );\n    // position the brick\n    var position = {\n      x: this.columnWidth * colPosition.col,\n      y: colPosition.y\n    };\n    // apply setHeight to necessary columns\n    var setHeight = colPosition.y + item.size.outerHeight;\n    var setMax = colSpan + colPosition.col;\n    for ( var i = colPosition.col; i < setMax; i++ ) {\n      this.colYs[i] = setHeight;\n    }\n\n    return position;\n  };\n\n  proto._getTopColPosition = function( colSpan ) {\n    var colGroup = this._getTopColGroup( colSpan );\n    // get the minimum Y value from the columns\n    var minimumY = Math.min.apply( Math, colGroup );\n\n    return {\n      col: colGroup.indexOf( minimumY ),\n      y: minimumY,\n    };\n  };\n\n  /**\n   * @param {Number} colSpan - number of columns the element spans\n   * @returns {Array} colGroup\n   */\n  proto._getTopColGroup = function( colSpan ) {\n    if ( colSpan < 2 ) {\n      // if brick spans only one column, use all the column Ys\n      return this.colYs;\n    }\n\n    var colGroup = [];\n    // how many different places could this brick fit horizontally\n    var groupCount = this.cols + 1 - colSpan;\n    // for each group potential horizontal position\n    for ( var i = 0; i < groupCount; i++ ) {\n      colGroup[i] = this._getColGroupY( i, colSpan );\n    }\n    return colGroup;\n  };\n\n  proto._getColGroupY = function( col, colSpan ) {\n    if ( colSpan < 2 ) {\n      return this.colYs[ col ];\n    }\n    // make an array of colY values for that one group\n    var groupColYs = this.colYs.slice( col, col + colSpan );\n    // and get the max value of the array\n    return Math.max.apply( Math, groupColYs );\n  };\n\n  // get column position based on horizontal index. #873\n  proto._getHorizontalColPosition = function( colSpan, item ) {\n    var col = this.horizontalColIndex % this.cols;\n    var isOver = colSpan > 1 && col + colSpan > this.cols;\n    // shift to next row if item can't fit on current row\n    col = isOver ? 0 : col;\n    // don't let zero-size items take up space\n    var hasSize = item.size.outerWidth && item.size.outerHeight;\n    this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;\n\n    return {\n      col: col,\n      y: this._getColGroupY( col, colSpan ),\n    };\n  };\n\n  proto._manageStamp = function( stamp ) {\n    var stampSize = getSize( stamp );\n    var offset = this._getElementOffset( stamp );\n    // get the columns that this stamp affects\n    var isOriginLeft = this._getOption('originLeft');\n    var firstX = isOriginLeft ? offset.left : offset.right;\n    var lastX = firstX + stampSize.outerWidth;\n    var firstCol = Math.floor( firstX / this.columnWidth );\n    firstCol = Math.max( 0, firstCol );\n    var lastCol = Math.floor( lastX / this.columnWidth );\n    // lastCol should not go over if multiple of columnWidth #425\n    lastCol -= lastX % this.columnWidth ? 0 : 1;\n    lastCol = Math.min( this.cols - 1, lastCol );\n    // set colYs to bottom of the stamp\n\n    var isOriginTop = this._getOption('originTop');\n    var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +\n      stampSize.outerHeight;\n    for ( var i = firstCol; i <= lastCol; i++ ) {\n      this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n    }\n  };\n\n  proto._getContainerSize = function() {\n    this.maxY = Math.max.apply( Math, this.colYs );\n    var size = {\n      height: this.maxY\n    };\n\n    if ( this._getOption('fitWidth') ) {\n      size.width = this._getContainerFitWidth();\n    }\n\n    return size;\n  };\n\n  proto._getContainerFitWidth = function() {\n    var unusedCols = 0;\n    // count unused columns\n    var i = this.cols;\n    while ( --i ) {\n      if ( this.colYs[i] !== 0 ) {\n        break;\n      }\n      unusedCols++;\n    }\n    // fit container to columns that have been used\n    return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n  };\n\n  proto.needsResizeLayout = function() {\n    var previousWidth = this.containerWidth;\n    this.getContainerWidth();\n    return previousWidth != this.containerWidth;\n  };\n\n  return Masonry;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/masonry-layout/masonry.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/calculate-layout.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/calculate-layout.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst contentUpgrade = __webpack_require__(/*! mindmup-mapjs-model */ \"./node_modules/mindmup-mapjs-model/index.js\").contentUpgrade,\n\tTheme = __webpack_require__(/*! ./theme */ \"./node_modules/mindmup-mapjs-layout/src/theme.js\"),\n\textractConnectors = __webpack_require__(/*! ./layouts/extract-connectors */ \"./node_modules/mindmup-mapjs-layout/src/layouts/extract-connectors.js\"),\n\tlayoutLinks = __webpack_require__(/*! ./layouts/links */ \"./node_modules/mindmup-mapjs-layout/src/layouts/links.js\"),\n\tMultiRootLayout = __webpack_require__(/*! ./multi-root-layout */ \"./node_modules/mindmup-mapjs-layout/src/multi-root-layout.js\"),\n\tdefaultLayouts = {\n\t\t'standard': __webpack_require__(/*! ./layouts/standard */ \"./node_modules/mindmup-mapjs-layout/src/layouts/standard.js\"),\n\t\t'top-down': __webpack_require__(/*! ./layouts/top-down */ \"./node_modules/mindmup-mapjs-layout/src/layouts/top-down.js\")\n\t},\n\tattachStyles = function (nodes, theme) {\n\t\t'use strict';\n\t\tObject.keys(nodes).forEach(function (nodeKey) {\n\t\t\tconst node = nodes[nodeKey];\n\t\t\tnode.styles = theme.nodeStyles(node.level, node.attr);\n\t\t});\n\t\treturn nodes;\n\t},\n\tformatResult = function (result, idea, theme, orientation) {\n\t\t'use strict';\n\t\treturn {\n\t\t\torientation: orientation,\n\t\t\tnodes: attachStyles(result, theme),\n\t\t\tconnectors: extractConnectors(idea, result, theme),\n\t\t\tlinks: layoutLinks(idea, result),\n\t\t\ttheme: idea.attr && idea.attr.theme\n\t\t};\n\t};\n\nmodule.exports = function calculateLayout(idea, dimensionProvider, optional) {\n\t'use strict';\n\tconst layouts = (optional && optional.layouts) || defaultLayouts,\n\t\ttheme = (optional && optional.theme) || new Theme({}),\n\t\tmultiRootLayout = new MultiRootLayout(),\n\t\tmargin = theme.attributeValue(['layout'], [], ['spacing'], {h: 20, v: 20}),\n\t\torientation = theme.attributeValue(['layout'], [], ['orientation'], 'standard'),\n\t\tcalculator = layouts[orientation] || layouts.standard;\n\n\tidea = contentUpgrade(idea);\n\n\tObject.keys(idea.ideas).forEach(function (rank) {\n\t\tconst rootIdea = idea.ideas[rank],\n\t\t\trootResult = calculator(rootIdea, dimensionProvider, {h: (margin.h || margin), v: (margin.v || margin)});\n\t\tmultiRootLayout.appendRootNodeLayout(rootResult, rootIdea);\n\t});\n\n\treturn formatResult (multiRootLayout.getCombinedLayout(10), idea, theme, orientation);\n\t// result = calculator(idea, dimensionProvider, {h: (margin.h || margin), v: (margin.v || margin)});\n\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/calculate-layout.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/color-parser.js":
/*!***************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/color-parser.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst convertToRGB = __webpack_require__(/*! ./color-to-rgb */ \"./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js\");\nmodule.exports = function colorParser(colorObj) {\n\t'use strict';\n\tif (!colorObj.color || colorObj.opacity === 0) {\n\t\treturn 'transparent';\n\t}\n\tif (colorObj.opacity) {\n\t\treturn 'rgba(' + convertToRGB(colorObj.color).join(',') + ',' + colorObj.opacity + ')';\n\t} else {\n\t\treturn colorObj.color;\n\t}\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/color-parser.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js":
/*!***************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tregCSSRGB = new RegExp(/^rgba?\\(([^,\\s]+)[,\\s]*([^,\\s]+)[,\\s]*([^,\\s\\()]+).*$/),\n\tfromCSSRGB = function (colorString) {\n\t\t'use strict';\n\t\tlet matched;\n\t\tif (regCSSRGB.test(colorString)) {\n\n\t\t\tmatched = colorString.match(regCSSRGB);\n\t\t\tif (matched.length === 4) {\n\t\t\t\treturn _.map(matched.slice(1), function (i) {\n\t\t\t\t\treturn parseInt(i);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\tfromHexString = function (colorString) {\n\t\t'use strict';\n\t\tconst match = colorString.toString(16).match(/[a-f0-9]{6}/i);\n\t\tlet integer, r, g, b;\n\t\tif (match) {\n\t\t\tinteger = parseInt(match[0], 16);\n\t\t\tr = (integer >> 16) & 0xFF;\n\t\t\tg = (integer >> 8) & 0xFF;\n\t\t\tb = integer & 0xFF;\n\n\t\t\treturn [r, g, b];\n\t\t}\n\t};\nmodule.exports = function convertToRGB(colorString) {\n\t'use strict';\n\treturn fromCSSRGB(colorString) || fromHexString(colorString) || [0, 0, 0];\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/connector-paths.js":
/*!******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/connector-paths.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\n\nconst straight = function (calculatedConnector, position) {\n\t'use strict';\n\treturn {\n\t\t'd': 'M' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.from.y - position.top) + 'L' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n\t\t'position': position\n\t};\n};\n\nmodule.exports = {\n\t'quadratic': function (calculatedConnector, position, parent, child) {\n\t\t'use strict';\n\t\tconst maxOffset = Math.min(child.height, parent.height) * 1.2,\n\t\t\trequestedOffset = calculatedConnector.connectorTheme.controlPoint.height * (calculatedConnector.from.y - calculatedConnector.to.y),\n\t\t\toffset = Math.max(-maxOffset, Math.min(maxOffset, requestedOffset));\n\n\t\tif (Math.round(calculatedConnector.from.y) === Math.round(calculatedConnector.to.y - offset)) {\n\t\t\treturn straight(calculatedConnector, position);\n\t\t}\n\t\treturn {\n\t\t\t'd': 'M' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.from.y - position.top) +\n\t\t\t\t'Q' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.to.y - offset - position.top) + ' ' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n\t\t\t'position': position\n\t\t};\n\t},\n\t's-curve': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\tconst initialRadius = 10,\n\t\t\tdx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n\t\t\tdy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n\t\t\tdxIncrement = (initialRadius < Math.abs(dx * 0.5)) ? initialRadius * Math.sign(dx) : Math.round(dx * 0.5),\n\t\t\tdyIncrement = (initialRadius < Math.abs(dy * 0.5)) ? initialRadius * Math.sign(dy) : Math.round(dy * 0.5);\n\n\t\treturn {\n\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement +\n\t\t\t\t'c0,' + (dy - (2 * dyIncrement)) + ' ' + Math.round(dx / 2  - dxIncrement) + ',' +  (dy - dyIncrement) + ' '  + (dx - dxIncrement) + ',' + (dy - dyIncrement),\n\t\t\t'position': position\n\t\t};\n\n\t},\n\t'top-down-s-curve': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\tconst dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n\t\t\tdy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n\t\t\tinitialRadius = 15,\n\t\t\tdxIncrement = initialRadius * Math.sign(dx),\n\t\t\tdyIncrement = initialRadius * Math.sign(dy),\n\t\t\tverticalLine = Math.round(0.5 * dy) - dyIncrement,\n\t\t\tflatLine = function () {\n\t\t\t\tconst yIncrement = verticalLine + Math.round(0.5 * dyIncrement);\n\t\t\t\treturn {\n\t\t\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t\t\t'v' + yIncrement +\n\t\t\t\t\t\t'l' + dx + ',' + (dy - yIncrement),\n\t\t\t\t\t'position': position,\n\t\t\t\t\t'initialRadius': 5\n\t\t\t\t};\n\t\t\t};\n\t\tif (initialRadius > Math.abs(dx / 2)) {\n\t\t\treturn flatLine();\n\t\t}\n\n\t\treturn {\n\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t'v' + verticalLine +\n\t\t\t\t'q0,' + dyIncrement + ' ' + dxIncrement + ',' + dyIncrement +\n\t\t\t\t'h' + (dx - (2 * dxIncrement)) +\n\t\t\t\t'q' + dxIncrement + ',0 ' + dxIncrement + ',' +  dyIncrement +\n\t\t\t\t'v' + verticalLine,\n\t\t\t'position': position,\n\t\t\t'initialRadius': 5\n\t\t};\n\n\t},\n\t'compact-s-curve': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\tconst initialRadius = 10,\n\t\t\tdx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n\t\t\tdy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n\t\t\tdxIncrement = initialRadius * Math.sign(dx),\n\t\t\tdyIncrement = initialRadius * Math.sign(dy),\n\t\t\tflatLine = function () {\n\t\t\t\tconst xIncrement = Math.round(dx / 2);\n\t\t\t\treturn {\n\t\t\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t\t\t'l' + xIncrement + ',0 ' +\n\t\t\t\t\t\t'l' + (dx - xIncrement) + ',' + dy,\n\t\t\t\t\t'position': position\n\t\t\t\t};\n\t\t\t};\n\n\t\tif (initialRadius > Math.abs(dx * 0.5) || initialRadius > Math.abs(dy * 0.5)) {\n\t\t\treturn flatLine();\n\t\t}\n\t\treturn {\n\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement +\n\t\t\t\t'v' + (dy - (2 * dyIncrement)) +\n\t\t\t\t'q0,' + dyIncrement + ' ' + dxIncrement + ',' +  dyIncrement +\n\t\t\t\t'h' + (dx - (2 * dxIncrement)),\n\t\t\t'position': position\n\t\t};\n\n\t},\n\t'vertical-quadratic-s-curve': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\tconst dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n\t\t\tdy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n\t\t\tdxIncrement = dx / 2,\n\t\t\tdyIncrement = dy / 2;\n\n\t\tif (Math.abs(dx) < 20) {\n\n\t\t\treturn {\n\t\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t\t'l' + dx + ',' + dy,\n\t\t\t\tinitialRadius: 10,\n\t\t\t\t'position': position\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t'q0,' + Math.round(dyIncrement / 2) + ' ' + dxIncrement + ',' + dyIncrement +\n\t\t\t\t'q' + dxIncrement + ',' + Math.round(dyIncrement / 2) + ' ' + dxIncrement + ',' +  dyIncrement,\n\t\t\tinitialRadius: 10,\n\t\t\t'position': position\n\t\t};\n\t},\n\t'vertical-s-curve': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\tconst initialRadius = 10,\n\t\t\tdx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n\t\t\tdy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n\t\t\tdxIncrement = initialRadius * Math.sign(dx),\n\t\t\tdyIncrement = initialRadius * Math.sign(dy);\n\n\t\tif (initialRadius > Math.abs(dx * 0.5) || initialRadius > Math.abs(dy * 0.5)) {\n\t\t\treturn {\n\t\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t\t'l' + dx + ',' + dy,\n\t\t\t\t'position': position\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) +\n\t\t\t\t'q0,' + dyIncrement + ' ' + dxIncrement + ',' + dyIncrement +\n\t\t\t\t'h' + (dx - (2 * dxIncrement)) +\n\t\t\t\t'q' + dxIncrement + ',0 ' + dxIncrement + ',' +  dyIncrement +\n\t\t\t\t'v' + (dy - (2 * dyIncrement)),\n\t\t\t'position': position\n\t\t};\n\n\t},\n\t'straight': straight,\n\t'no-connector': function (calculatedConnector, position) {\n\t\t'use strict';\n\t\treturn {\n\t\t\t'd': 'M' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n\t\t\t'position': position\n\t\t};\n\t}\n\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/connector-paths.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/connectors.js":
/*!*************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/connectors.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, module */\nconst Theme = __webpack_require__ (/*! ./theme */ \"./node_modules/mindmup-mapjs-layout/src/theme.js\"),\n\t_ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tlineStyles = __webpack_require__(/*! ./line-styles */ \"./node_modules/mindmup-mapjs-layout/src/line-styles.js\"),\n\tnodeConnectionPointX = __webpack_require__(/*! ./layouts/node-connection-point-x */ \"./node_modules/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js\"),\n\tappendUnderLine = function (connectorCurve, calculatedConnector, position) {\n\t\t'use strict';\n\t\tif (calculatedConnector.nodeUnderline) {\n\t\t\tconnectorCurve.d += 'M' + (calculatedConnector.nodeUnderline.from.x - position.left) + ',' + (calculatedConnector.nodeUnderline.from.y - position.top) + ' H' + (calculatedConnector.nodeUnderline.to.x - position.left);\n\t\t}\n\t\treturn connectorCurve;\n\t},\n\tappendOverLine = function (connectorCurve, calculatedConnector) {\n\t\t'use strict';\n\t\tconst initialRadius = connectorCurve.initialRadius || 0,\n\t\t\thalfWidth = calculatedConnector.nodeOverline && (Math.floor(0.5 * Math.abs(calculatedConnector.nodeOverline.to.x - calculatedConnector.nodeOverline.from.x)) - 1);\n\n\t\tif (calculatedConnector.nodeOverline) {\n\t\t\tconnectorCurve.d += 'm' + (-1 * halfWidth) + ',' + initialRadius +\n\t\t\t\t'q0,' + (-1 * initialRadius) + ' ' + initialRadius + ',' +  (-1 * initialRadius) +\n\t\t\t\t' h' + (2 * (halfWidth - initialRadius)) +\n\t\t\t\t'q' + initialRadius + ',0 ' + initialRadius + ',' +  initialRadius;\n\t\t}\n\t\treturn connectorCurve;\n\n\t},\n\tappendBorderLines = function (connectorCurve, calculatedConnector, position) {\n\t\t'use strict';\n\t\treturn appendOverLine(appendUnderLine(connectorCurve, calculatedConnector, position), calculatedConnector);\n\t},\n\tnodeConnectionPointY = {\n\t\t'center': function (node) {\n\t\t\t'use strict';\n\t\t\treturn Math.round(node.top + node.height * 0.5);\n\t\t},\n\t\t'base': function (node) {\n\t\t\t'use strict';\n\t\t\treturn node.top + node.height + 1;\n\t\t},\n\t\t'base-inset': function (node, inset) {\n\t\t\t'use strict';\n\t\t\treturn node.top + node.height + 1 - inset;\n\t\t},\n\t\t'top': function (node) {\n\t\t\t'use strict';\n\t\t\treturn node.top;\n\t\t}\n\t},\n\tconnectorPaths = __webpack_require__(/*! ./connector-paths */ \"./node_modules/mindmup-mapjs-layout/src/connector-paths.js\"),\n\tcalculateConnector = function (parent, child, theme) {\n\t\t'use strict';\n\t\tconst calcChildPosition = function () {\n\t\t\t\tconst tolerance = 10,\n\t\t\t\t\tchildMid = child.top + child.height * 0.5,\n\t\t\t\t\tparentMid = parent.top + parent.height * 0.5;\n\t\t\t\tif (Math.abs(parentMid - childMid) + tolerance < Math.max(child.height, parent.height * 0.75)) {\n\t\t\t\t\treturn 'horizontal';\n\t\t\t\t}\n\t\t\t\treturn (childMid < parentMid) ? 'above' : 'below';\n\t\t\t},\n\t\t\tchildPosition = calcChildPosition(),\n\t\t\tfromStyles = parent.styles,\n\t\t\ttoStyles = child.styles,\n\t\t\tconnectionPositionDefaultFrom = theme.attributeValue(['node'], fromStyles, ['connections', 'default'], {h: 'center', v: 'center'}),\n\t\t\tconnectionPositionDefaultTo = theme.attributeValue(['node'], toStyles, ['connections', 'default'], {h: 'nearest-inset', v: 'center'}),\n\t\t\tconnectionPositionFrom = _.extend({}, connectionPositionDefaultFrom, theme.attributeValue(['node'], fromStyles, ['connections', 'from', childPosition], {})),\n\t\t\tconnectionPositionTo = _.extend({}, connectionPositionDefaultTo, theme.attributeValue(['node'], toStyles, ['connections', 'to'], {})),\n\t\t\tconnectorTheme = theme.connectorTheme(childPosition, toStyles, fromStyles),\n\t\t\tfromInset = theme.attributeValue(['node'], fromStyles, ['cornerRadius'], 10),\n\t\t\ttoInset = theme.attributeValue(['node'], toStyles, ['cornerRadius'], 10),\n\t\t\tborderType = theme.attributeValue(['node'], toStyles, ['border', 'type'], '');\n\t\tlet nodeUnderline = false, nodeOverline = false;\n\t\tif (borderType === 'underline' || borderType === 'under-overline') {\n\t\t\tnodeUnderline = {\n\t\t\t\tfrom: {\n\t\t\t\t\tx: child.left,\n\t\t\t\t\ty: child.top + child.height + 1\n\t\t\t\t},\n\t\t\t\tto: {\n\t\t\t\t\tx: child.left + child.width,\n\t\t\t\t\ty: child.top + child.height + 1\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tif (borderType === 'overline' || borderType === 'under-overline') {\n\t\t\tnodeOverline = {\n\t\t\t\tfrom: {\n\t\t\t\t\tx: child.left,\n\t\t\t\t\ty: child.top\n\t\t\t\t},\n\t\t\t\tto: {\n\t\t\t\t\tx: child.left + child.width,\n\t\t\t\t\ty: child.top\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tfrom: {\n\t\t\t\tx: nodeConnectionPointX[connectionPositionFrom.h](parent, child, fromInset),\n\t\t\t\ty: nodeConnectionPointY[connectionPositionFrom.v](parent, fromInset)\n\t\t\t},\n\t\t\tto: {\n\t\t\t\tx: nodeConnectionPointX[connectionPositionTo.h](child, parent, toInset),\n\t\t\t\ty: nodeConnectionPointY[connectionPositionTo.v](child, toInset)\n\t\t\t},\n\t\t\tconnectorTheme: connectorTheme,\n\t\t\tnodeUnderline: nodeUnderline,\n\t\t\tnodeOverline: nodeOverline\n\t\t};\n\t},\n\tthemePath = function (parent, child, themeArg) {\n\t\t'use strict';\n\t\tconst left = Math.min(parent.left, child.left),\n\t\t\ttop = Math.min(parent.top, child.top),\n\t\t\tposition = {\n\t\t\t\tleft: left,\n\t\t\t\ttop: top,\n\t\t\t\twidth: Math.max(parent.left + parent.width, child.left + child.width, left + 1) - left,\n\t\t\t\theight: Math.max(parent.top + parent.height, child.top + child.height, top + 1) - top + 2\n\t\t\t},\n\t\t\ttheme = themeArg || new Theme({}),\n\t\t\tcalculatedConnector = calculateConnector(parent, child, theme),\n\t\t\tresult = appendBorderLines(connectorPaths[calculatedConnector.connectorTheme.type](calculatedConnector, position, parent, child), calculatedConnector, position);\n\t\tresult.color = calculatedConnector.connectorTheme.line.color;\n\t\tresult.width = calculatedConnector.connectorTheme.line.width;\n\t\tresult.theme = calculatedConnector.connectorTheme;\n\t\treturn result;\n\t},\n\tlinkPath = function (parent, child, linkAttrArg, themeArg) {\n\t\t'use strict';\n\t\tconst calculateConnector = function (parent, child) {\n\t\t\t\tconst parentPoints =\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: parent.left + Math.round(0.5 * parent.width),\n\t\t\t\t\t\t\ty: parent.top\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: parent.left + parent.width,\n\t\t\t\t\t\t\ty: parent.top + Math.round(0.5 * parent.height)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: parent.left + Math.round(0.5 * parent.width),\n\t\t\t\t\t\t\ty: parent.top + parent.height\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: parent.left,\n\t\t\t\t\t\t\ty: parent.top + Math.round(0.5 * parent.height)\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tchildPoints =\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: child.left + Math.round(0.5 * child.width),\n\t\t\t\t\t\t\ty: child.top\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: child.left + child.width,\n\t\t\t\t\t\t\ty: child.top + Math.round(0.5 * child.height)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: child.left + Math.round(0.5 * child.width),\n\t\t\t\t\t\t\ty: child.top + child.height\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: child.left,\n\t\t\t\t\t\t\ty: child.top + Math.round(0.5 * child.height)\n\t\t\t\t\t\t}\n\t\t\t\t\t];\n\t\t\t\tlet i, j, min = Infinity, bestParent, bestChild, dx, dy, current;\n\t\t\t\tfor (i = 0; i < parentPoints.length; i += 1) {\n\t\t\t\t\tfor (j = 0; j < childPoints.length; j += 1) {\n\t\t\t\t\t\tdx = parentPoints[i].x - childPoints[j].x;\n\t\t\t\t\t\tdy = parentPoints[i].y - childPoints[j].y;\n\t\t\t\t\t\tcurrent = dx * dx + dy * dy;\n\t\t\t\t\t\tif (current < min) {\n\t\t\t\t\t\t\tbestParent = i;\n\t\t\t\t\t\t\tbestChild = j;\n\t\t\t\t\t\t\tmin = current;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tfrom: parentPoints[bestParent],\n\t\t\t\t\tto: childPoints[bestChild]\n\t\t\t\t};\n\t\t\t},\n\t\t\tconn = calculateConnector(parent, child),\n\t\t\ttheme = themeArg || new Theme({}),\n\t\t\tlinkAttr = linkAttrArg || {},\n\t\t\tleft = Math.min(parent.left, child.left),\n\t\t\ttop = Math.min(parent.top, child.top),\n\t\t\tposition = {\n\t\t\t\tleft: left,\n\t\t\t\ttop: top,\n\t\t\t\twidth: Math.max(parent.left + parent.width, child.left + child.width, left) - left,\n\t\t\t\theight: Math.max(parent.top + parent.height, child.top + child.height, top) - top\n\t\t\t},\n\t\t\tarrowPath = function () {\n\t\t\t\tconst n = Math.tan(Math.PI / 9),\n\t\t\t\t\tdx = conn.to.x - conn.from.x,\n\t\t\t\t\tdy = conn.to.y - conn.from.y;\n\n\t\t\t\tlet len = 14, iy, a1x, a2x, a1y, a2y, m;\n\n\t\t\t\tif (dx === 0) {\n\t\t\t\t\tiy = dy < 0 ? -1 : 1;\n\t\t\t\t\ta1x = conn.to.x + len * Math.sin(n) * iy;\n\t\t\t\t\ta2x = conn.to.x - len * Math.sin(n) * iy;\n\t\t\t\t\ta1y = conn.to.y - len * Math.cos(n) * iy;\n\t\t\t\t\ta2y = conn.to.y - len * Math.cos(n) * iy;\n\t\t\t\t} else {\n\t\t\t\t\tm = dy / dx;\n\t\t\t\t\tif (conn.from.x < conn.to.x) {\n\t\t\t\t\t\tlen = -len;\n\t\t\t\t\t}\n\t\t\t\t\ta1x = conn.to.x + (1 - m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n\t\t\t\t\ta1y = conn.to.y + (m + n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n\t\t\t\t\ta2x = conn.to.x + (1 + m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n\t\t\t\t\ta2y = conn.to.y + (m - n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n\t\t\t\t}\n\t\t\t\treturn 'M' + Math.round(a1x - position.left) + ',' + Math.round(a1y - position.top) +\n\t\t\t\t\t'L' + Math.round(conn.to.x - position.left) + ',' + Math.round(conn.to.y - position.top) +\n\t\t\t\t\t'L' + Math.round(a2x - position.left) + ',' + Math.round(a2y - position.top) +\n\t\t\t\t\t'Z';\n\t\t\t},\n\t\t\tlinkTheme = theme.linkTheme(linkAttr.type),\n\t\t\twidth = linkAttr.width || linkTheme.line.width,\n\t\t\tlineStyle = linkAttr.lineStyle || linkTheme.line.lineStyle,\n\t\t\tlineProps = {\n\t\t\t\tcolor: linkAttr.color || linkTheme.line.color,\n\t\t\t\tstrokes: lineStyles.strokes(lineStyle, width),\n\t\t\t\tlinecap: lineStyles.linecap(lineStyle, width),\n\t\t\t\twidth: width\n\t\t\t};\n\n\n\t\treturn {\n\t\t\td: 'M' + Math.round(conn.from.x - position.left) + ',' + Math.round(conn.from.y - position.top) + 'L' + Math.round(conn.to.x - position.left) + ',' + Math.round(conn.to.y - position.top),\n\t\t\tposition: position,\n\t\t\tarrow: linkAttr.arrow && arrowPath(),\n\t\t\ttheme: linkTheme,\n\t\t\tlineProps: lineProps\n\t\t};\n\t};\n\nMath.sign = Math.sign || function (val) {\n\t'use strict';\n\treturn val >= 0 ? 1 : -1;\n};\nmodule.exports = {\n\tthemePath: themePath,\n\tlinkPath: linkPath\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/connectors.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/default-theme.js":
/*!****************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/default-theme.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nmodule.exports = {\n\t'name': 'MindMup Default',\n\t'node': [\n\t\t{\n\t\t\t'name': 'default',\n\t\t\t'cornerRadius': 10.0,\n\t\t\t'backgroundColor': '#E0E0E0',\n\t\t\t'border': {\n\t\t\t\t'type': 'surround',\n\t\t\t\t'line': {\n\t\t\t\t\t'color': '#707070',\n\t\t\t\t\t'width': 1.0\n\t\t\t\t}\n\t\t\t},\n\t\t\t'shadow': [{\n\t\t\t\t'color': '#070707',\n\t\t\t\t'opacity': 0.4,\n\t\t\t\t'offset': {\n\t\t\t\t\t'width': 2,\n\t\t\t\t\t'height': 2\n\t\t\t\t},\n\t\t\t\t'radius': 2\n\t\t\t}],\n\t\t\t'text': {\n\t\t\t\t'margin': 5.0,\n\t\t\t\t'alignment': 'center',\n\t\t\t\t'color': '#4F4F4F',\n\t\t\t\t'lightColor': '#EEEEEE',\n\t\t\t\t'darkColor': '#000000',\n\t\t\t\t'font': {\n\t\t\t\t\t'lineSpacing': 2.5,\n\t\t\t\t\t'size': 9,\n\t\t\t\t\t'weight': 'bold'\n\t\t\t\t}\n\t\t\t},\n\t\t\t'connections': {\n\t\t\t\t'default': {\n\t\t\t\t\t'h': 'center',\n\t\t\t\t\t'v': 'center'\n\t\t\t\t},\n\t\t\t\t'from': {\n\t\t\t\t\t'horizontal': {\n\t\t\t\t\t\t'h': 'nearest-inset',\n\t\t\t\t\t\t'v': 'center'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'to': {\n\t\t\t\t\t'h': 'nearest',\n\t\t\t\t\t'v': 'center'\n\t\t\t\t}\n\t\t\t},\n\t\t\t'decorations': {\n\t\t\t\t'height': 20,\n\t\t\t\t'edge': 'top',\n\t\t\t\t'overlap': true,\n\t\t\t\t'position': 'end'\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t'name': 'level_1',\n\t\t\t'backgroundColor': '#22AAE0'\n\t\t},\n\t\t{\n\t\t\t'name': 'activated',\n\t\t\t'border': {\n\t\t\t\t'type': 'surround',\n\t\t\t\t'line': {\n\t\t\t\t\t'color': '#22AAE0',\n\t\t\t\t\t'width': 2.0,\n\t\t\t\t\t'style': 'dashed'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t'name': 'selected',\n\t\t\t'shadow': [\n\t\t\t\t{\n\t\t\t\t\t'color': '#000000',\n\t\t\t\t\t'opacity': 0.9,\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 2,\n\t\t\t\t\t\t'height': 2\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 2\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'name': 'collapsed',\n\t\t\t'shadow': [\n\t\t\t\t{\n\t\t\t\t\t'color': '#888888',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 1\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#FFFFFF',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 3\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#888888',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 4\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#FFFFFF',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 6\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#888888',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 7\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'name': 'collapsed.selected',\n\t\t\t'shadow': [\n\t\t\t\t{\n\t\t\t\t\t'color': '#FFFFFF',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 1\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#888888',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 3\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#FFFFFF',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 6\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#555555',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 7\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#FFFFFF',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 10\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'color': '#333333',\n\t\t\t\t\t'offset': {\n\t\t\t\t\t\t'width': 0,\n\t\t\t\t\t\t'height': 11\n\t\t\t\t\t},\n\t\t\t\t\t'radius': 0\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t'connector': {\n\t\t'default': {\n\t\t\t'type': 'quadratic',\n\t\t\t'label': {\n\t\t\t\t'position': {\n\t\t\t\t\t'ratio': 0.5\n\t\t\t\t},\n\t\t\t\t'backgroundColor': 'transparent',\n\t\t\t\t'borderColor': 'transparent',\n\t\t\t\t'text': {\n\t\t\t\t\t'color': '#4F4F4F',\n\t\t\t\t\t'font': {\n\t\t\t\t\t\t'size': 9,\n\t\t\t\t\t\t'sizePx': 12,\n\t\t\t\t\t\t'weight': 'normal'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t'controlPoint': {\n\t\t\t\t'above': {'width': 0, 'height': 1.75},\n\t\t\t\t'below': {'width': 0, 'height': 1.75},\n\t\t\t\t'horizontal': {'width': 0, 'height': 1}\n\t\t\t},\n\t\t\t'line': {\n\t\t\t\t'color': '#707070',\n\t\t\t\t'width': 1.0\n\t\t\t}\n\t\t}\n\t},\n\tlink: {\n\t\tdefault: {\n\t\t\tline: {\n\t\t\t\tcolor: 'red',\n\t\t\t\tlineStyle: 'dashed',\n\t\t\t\twidth: 1.0\n\t\t\t},\n\t\t\tlabel: {\n\t\t\t\tposition: {\n\t\t\t\t\tratio: 0.5\n\t\t\t\t},\n\t\t\t\tbackgroundColor: '#FFFFFF',\n\t\t\t\tborderColor: '#FFFFFF',\n\t\t\t\ttext: {\n\t\t\t\t\tcolor: '#4F4F4F',\n\t\t\t\t\tfont: {\n\t\t\t\t\t\t'size': 9,\n\t\t\t\t\t\t'sizePx': 12,\n\t\t\t\t\t\t'weight': 'normal'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/default-theme.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/foreground-style.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/foreground-style.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst convertToRGB = __webpack_require__(/*! ./color-to-rgb */ \"./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js\");\n\nmodule.exports = function foregroundStyle(backgroundColor) {\n\t'use strict';\n\n\t/*jslint newcap:true*/\n\t// var luminosity = Color(backgroundColor).mix(Color('#EEEEEE')).luminosity();\n\tconst mix = function (color1, color2) {\n\t\t\treturn [\n\t\t\t\tMath.round(0.5 * (color1[0] + color2[0])),\n\t\t\t\tMath.round(0.5 * (color1[1] + color2[1])),\n\t\t\t\tMath.round(0.5 * (color1[2] + color2[2]))\n\t\t\t];\n\t\t},\n\t\tcalcLuminosity = function () {\n\t\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\t\tconst rgb = mix(convertToRGB(backgroundColor), convertToRGB('#EEEEEE')),\n\t\t\t\tlum = [];\n\t\t\tlet chan;\n\t\t\tfor (let i = 0; i < rgb.length; i++) {\n\t\t\t\tchan = rgb[i] / 255;\n\t\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t\t}\n\t\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t\t},\n\t\tluminosity = calcLuminosity();\n\tif (luminosity < 0.5) {\n\t\treturn 'lightColor';\n\t} else if (luminosity < 0.9) {\n\t\treturn 'color';\n\t}\n\treturn 'darkColor';\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/foreground-style.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/is-empty-group.js":
/*!*****************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/is-empty-group.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* global require, module */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function isEmptyGroup(contentIdea) {\n\t'use strict';\n\treturn contentIdea.attr && contentIdea.attr.group && _.isEmpty(contentIdea.ideas);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/is-empty-group.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layout-geometry.js":
/*!******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layout-geometry.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require, isNaN, console*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tPolyBool = __webpack_require__(/*! polybooljs */ \"./node_modules/polybooljs/index.js\"),\n\tconvexHull = __webpack_require__(/*! monotone-convex-hull-2d */ \"./node_modules/monotone-convex-hull-2d/index.js\"),\n\tdotProduct = function (p1, p2) {\n\t\t'use strict';\n\t\treturn (p1[0] * p2[0]) + (p1[1] * p2[1]);\n\t},\n\tunitVector = function (vector) {\n\t\t'use strict';\n\t\tconst magnitude = Math.sqrt(Math.pow(vector[0], 2) +  Math.pow(vector[1], 2));\n\t\tif (magnitude === 0) {\n\t\t\treturn [0, 0];\n\t\t}\n\t\treturn [vector[0] / magnitude, vector[1] / magnitude];\n\t},\n\ttoPolyBoolPoly = function (poly) {\n\t\t'use strict';\n\t\treturn {\n\t\t\tregions: poly,\n\t\t\tinverted: false\n\t\t};\n\t},\n\tarePointsEqual = function (p1, p2) {\n\t\t'use strict';\n\t\treturn p1 && p2 && p1.length === 2 && p2.length === 2 && p1[0] === p2[0] && p1[1] === p2[1];\n\t},\n\tareShapesEqual = function (shape1, shape2) {\n\t\t'use strict';\n\t\tif (!shape1 || !shape2 || shape1.length !== shape2.length) {\n\t\t\treturn false;\n\t\t}\n\t\treturn _.filter(shape1, function (p1) {\n\t\t\treturn _.filter(shape2, function (p2) {\n\t\t\t\treturn arePointsEqual(p1, p2);\n\t\t\t}).length;\n\t\t}).length === shape1.length;\n\t},\n\tpolygonsAreEqual = function (poly1, poly2) {\n\t\t'use strict';\n\t\tconst matchingShapes = function () {\n\t\t\treturn  _.filter(poly1, function (shape1) {\n\t\t\t\treturn _.filter(poly2, function (shape2) {\n\t\t\t\t\treturn areShapesEqual(shape1, shape2);\n\t\t\t\t}).length;\n\t\t\t});\n\t\t};\n\t\tif (poly1.length > poly2.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if (true || matchingShapes.length) {\n\t\t// \tconsole.log('matchingShapes.length === poly1.length', matchingShapes.length === poly1.length, 'matchingShapes', matchingShapes, 'poly1', poly1, 'poly2', poly2);\n\n\t\t// }\n\t\treturn matchingShapes().length === poly1.length;\n\t},\n\tshapeContainingIntersection = function (poly, intersection) {\n\t\t'use strict';\n\t\tconst pbIntersection = toPolyBoolPoly(intersection),\n\t\t\tcontainingShape = _.find(poly, function (shape) {\n\t\t\t\tconst pbShape = toPolyBoolPoly([shape]),\n\t\t\t\t\tshapeIntersection =  PolyBool.intersect(pbIntersection, pbShape);\n\t\t\t\treturn (polygonsAreEqual(intersection, shapeIntersection.regions));\n\t\t\t});\n\t\treturn containingShape && containingShape.length && containingShape;\n\t},\n\tpolygonIntersectionPoints = function (poly1, poly2) {\n\t\t'use strict';\n\t\tconst pbPoly1 = toPolyBoolPoly(poly1),\n\t\t\tpbPoly2 = toPolyBoolPoly(poly2),\n\t\t\tintersection =  PolyBool.intersect(pbPoly1, pbPoly2),\n\t\t\tisSameAsPoly1 = polygonsAreEqual(poly1, intersection.regions),\n\t\t\tisContained = isSameAsPoly1 && !polygonsAreEqual(intersection.regions, poly2),\n\t\t\tcontainingShape = isContained && shapeContainingIntersection(poly2, intersection.regions);\n\n\t\tif (containingShape) {\n\t\t\treturn containingShape;\n\t\t}\n\t\treturn _.flatten(intersection.regions, true);\n\t},\n\tprojectPointOnLineVector = function (point, vectorOrigin, vector) {\n\t\t'use strict';\n\t\tconst pointVector = [point[0] - vectorOrigin[0], point[1] - vectorOrigin[1]],\n\t\t\tvalDp = dotProduct(vector, pointVector),\n\t\t\tlen2 = dotProduct(vector, vector),\n\t\t\tresultVector = [\n\t\t\t\tvectorOrigin[0] + ((valDp * vector[0]) / len2),\n\t\t\t\tvectorOrigin[1] + ((valDp * vector[1]) / len2)\n\t\t\t];\n\t\tif (!vector[0] && !vector[1]) {\n\t\t\tthrow 'invalid-args';\n\t\t}\n\t\treturn resultVector;\n\t},\n\n\torderPointsOnVector = function (points, vectorOrigin, vector, pointsBeforeOriginOnly) {\n\t\t'use strict';\n\t\tconst pointScale = function (point) {\n\t\t\t\tconst dx = point[0] - vectorOrigin[0],\n\t\t\t\t\tdy = point[1] - vectorOrigin[1],\n\t\t\t\t\tval = (function () {\n\t\t\t\t\t\tif (dx === 0) {\n\t\t\t\t\t\t\tif (vector[1] === 0) {\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn dy / vector[1];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (vector[0] === 0) {\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn dx / vector[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t}()),\n\t\t\t\t\tpointSign = val >= 0 ? 1 : -1,\n\t\t\t\t\tvectorScale = pointSign * (Math.pow(dx, 2) + Math.pow(dy, 2));\n\t\t\t\treturn vectorScale;\n\t\t\t},\n\t\t\tfilteredPoints = _.filter(points, function (point) {\n\t\t\t\tif (pointsBeforeOriginOnly) {\n\t\t\t\t\treturn pointScale(point) < 0;\n\t\t\t\t}\n\t\t\t\treturn pointScale(point) >= 0;\n\t\t\t});\n\n\n\t\treturn _.sortBy(filteredPoints, pointScale);\n\t},\n\tbuildPoints = function (layout, margin) {\n\t\t'use strict';\n\t\tconst points = [];\n\t\t_.each(layout, function (node) {\n\t\t\tconst x1 = Math.round(node.x - margin),\n\t\t\t\tx2 = Math.round(node.x + node.width + margin),\n\t\t\t\ty1 = Math.round(node.y - margin),\n\t\t\t\ty2 = Math.round(node.y + node.height + margin);\n\n\t\t\tpoints.push([x1, y1]);\n\t\t\tpoints.push([x1, y2]);\n\t\t\tpoints.push([x2, y2]);\n\t\t\tpoints.push([x2, y1]);\n\t\t});\n\t\treturn points;\n\t},\n\ttolayoutPolygonHull = function (layout, margin) {\n\t\t'use strict';\n\t\tconst points = buildPoints(layout, margin),\n\t\t\thullIndices = convexHull(points),\n\t\t\thull =  _.map(hullIndices, function (hullIndex) {\n\t\t\t\treturn points[hullIndex];\n\t\t\t});\n\t\treturn [hull];\n\t},\n\troundVector = function (vector) {\n\t\t'use strict';\n\t\treturn [Math.round(vector[0]), Math.round(vector[1])];\n\t},\n\ttolayoutPolygonRect = function (layout, margin) {\n\t\t'use strict';\n\t\tlet minX = 0,\n\t\t\tmaxX = 0,\n\t\t\tminY = 0,\n\t\t\tmaxY = 0;\n\t\t_.each(layout, function (node) {\n\t\t\tminX = Math.min(minX, node.x);\n\t\t\tmaxX = Math.max(maxX, node.x + node.width);\n\t\t\tminY = Math.min(minY, node.y);\n\t\t\tmaxY = Math.max(maxY, node.y + node.width);\n\t\t});\n\t\tminX = minX - margin;\n\t\tmaxX = maxX + margin;\n\t\tminY = minY - margin;\n\t\tmaxY = maxY + margin;\n\t\treturn  [\n\t\t\t[\n\t\t\t\troundVector([minX, minY]), roundVector([maxX, minY]), roundVector([maxX, maxY]), roundVector([minX, maxY])\n\t\t\t]\n\t\t];\n\t},\n\taddVectors = function (vector1, vector2) {\n\t\t'use strict';\n\t\tconst x = vector1[0] + vector2[0],\n\t\t\ty = vector1[1] + vector2[1];\n\t\tif (isNaN(x) || isNaN(y)) {\n\t\t\tconsole.log('addVectors invalid-args x', x, 'y', y, 'vector1', vector1, 'vector2', vector2);\n\t\t\tthrow 'invalid-args';\n\t\t}\n\t\treturn [x, y];\n\t},\n\tsubtractVectors = function (vector1, vector2) {\n\t\t'use strict';\n\t\tconst x = vector1[0] - vector2[0],\n\t\t\ty = vector1[1] - vector2[1];\n\t\tif (isNaN(x) || isNaN(y)) {\n\t\t\tconsole.log('subtractVectors invalid-args vector1', vector1, 'vector2', vector2);\n\t\t\tthrow 'invalid-args';\n\t\t}\n\t\treturn [x, y];\n\t},\n\ttranslatePoly = function (poly, translation) {\n\t\t'use strict';\n\t\treturn poly.map(function (region) {\n\t\t\treturn region.map(function (vector) {\n\t\t\t\treturn roundVector(addVectors(vector, translation));\n\t\t\t});\n\t\t});\n\t},\n\tfirstProjectedPolyPointOnVector = function (poly, vectorOrigin, vector) {\n\t\t'use strict';\n\t\tconst polyPoints = _.flatten(poly, true),\n\t\t\tintersectionsOnLine = polyPoints.map(function (intersection) {\n\t\t\t\treturn projectPointOnLineVector(intersection, vectorOrigin, vector);\n\t\t\t}),\n\t\t\torderedIntersectionsOnLine = orderPointsOnVector(intersectionsOnLine, vectorOrigin, vector, true);\n\t\treturn orderedIntersectionsOnLine.length && orderedIntersectionsOnLine[0];\n\t},\n\tfurthestIntersectionPoint = function (poly1, poly2, vectorOrigin, vector) {\n\t\t'use strict';\n\t\tconst intersections = polygonIntersectionPoints(poly1, poly2),\n\t\t\tintersectionsOnLine = intersections.map(function (intersection) {\n\t\t\t\treturn projectPointOnLineVector(intersection, vectorOrigin, vector);\n\t\t\t}),\n\t\t\torderedIntersectionsOnLine = orderPointsOnVector(intersectionsOnLine, vectorOrigin, vector);\n\t\treturn orderedIntersectionsOnLine.length && orderedIntersectionsOnLine.pop();\n\t},\n\ttranslatePolyToIntersecton = function (polyToTranslate, intersectionPoint, vector) {\n\t\t'use strict';\n\t\tconst firstPolyPoint = firstProjectedPolyPointOnVector(polyToTranslate, intersectionPoint, vector),\n\t\t\ttranslation =  firstPolyPoint && roundVector(subtractVectors(intersectionPoint, firstPolyPoint));\n\n\t\tif (!firstPolyPoint) {\n\t\t\treturn false;\n\t\t}\n\t\treturn {\n\t\t\ttranslation: translation,\n\t\t\ttranslatedPoly: translatePoly(polyToTranslate, translation)\n\t\t};\n\t},\n\ttranslatePolyToNotOverlap = function (polyToFit, existingRegions, polyRootCenter, vector, previousTranslation, depth) {\n\t\t'use strict';\n\n\t\tconst firstPolyPoint = firstProjectedPolyPointOnVector(polyToFit, polyRootCenter, vector) || polyRootCenter,\n\t\t\tintersectionPoint = furthestIntersectionPoint(polyToFit, existingRegions, firstPolyPoint, vector);\n\t\tlet polyTranslation;\n\t\tdepth = depth || 0;\n\t\tpreviousTranslation = previousTranslation || [0, 0];\n\t\tif (intersectionPoint) {\n\t\t\tpolyTranslation = translatePolyToIntersecton(polyToFit, intersectionPoint, vector);\n\t\t\tif (polyTranslation) {\n\t\t\t\tpreviousTranslation\t= addVectors(previousTranslation, polyTranslation.translation);\n\t\t\t\tpolyRootCenter = addVectors(polyRootCenter, polyTranslation.translation);\n\t\t\t\tif (depth < 100) {\n\t\t\t\t\treturn translatePolyToNotOverlap(polyTranslation.translatedPoly, existingRegions, polyRootCenter, vector, previousTranslation, (depth + 1));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('unable to translate poly', polyToFit, 'to intersectionPoint', intersectionPoint, 'with vector', vector);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\ttranslation: previousTranslation,\n\t\t\ttranslatedPoly: polyToFit\n\t\t};\n\t};\n\nmodule.exports = {\n\ttolayoutPolygonRect: tolayoutPolygonRect,\n\ttolayoutPolygonHull: tolayoutPolygonHull,\n\tfurthestIntersectionPoint: furthestIntersectionPoint,\n\tprojectPointOnLineVector: projectPointOnLineVector,\n\torderPointsOnVector: orderPointsOnVector,\n\tfirstProjectedPolyPointOnVector: firstProjectedPolyPointOnVector,\n\ttranslatePoly: translatePoly,\n\taddVectors: addVectors,\n\tsubtractVectors: subtractVectors,\n\ttranslatePolyToIntersecton: translatePolyToIntersecton,\n\ttranslatePolyToNotOverlap: translatePolyToNotOverlap,\n\tunitVector: unitVector,\n\troundVector: roundVector,\n\tpolygonIntersectionPoints: polygonIntersectionPoints,\n\tshapeContainingIntersection: shapeContainingIntersection\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layout-geometry.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layout-model.js":
/*!***************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layout-model.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tnodeToBox = __webpack_require__(/*! ./node-to-box */ \"./node_modules/mindmup-mapjs-layout/src/node-to-box.js\");\n\nmodule.exports = function LayoutModel(emptyLayout) {\n\t'use strict';\n\tlet layout;\n\tconst self = this,\n\t\toptions = {\n\t\t\tconeRatio: 0.5,\n\t\t\tmajorAxisRatio: 3\n\t\t},\n\t\tgetNodesForPredicate = function (predicate) {\n\t\t\tconst nodes = layout && _.values(layout.nodes),\n\t\t\t\tfiltered = nodes && _.filter(nodes, predicate);\n\t\t\treturn nodes && filtered.length && filtered;\n\t\t},\n\t\tgetNodesDown = function (referenceNode, coneRatio) {\n\t\t\tconst predicate  = function (node) {\n\t\t\t\tconst dy = (node.y + node.height) - (referenceNode.y + referenceNode.height),\n\t\t\t\t\tx1 = referenceNode.x  - Math.abs(dy * coneRatio),\n\t\t\t\t\tx2 = referenceNode.x  + referenceNode.width + Math.abs(dy * coneRatio);\n\n\t\t\t\tif (node.id === referenceNode.id || node.y <= Math.round(referenceNode.y + referenceNode.height * 0.5)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (coneRatio !== undefined && (node.x > x2 || (node.x + node.width) < x1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t\treturn getNodesForPredicate(predicate);\n\t\t},\n\t\tgetNodesRight = function (referenceNode, coneRatio) {\n\t\t\tconst predicate  = function (node) {\n\t\t\t\tconst dx = (node.x + node.width) - (referenceNode.x + referenceNode.width),\n\t\t\t\t\ty1 = referenceNode.y  - Math.abs(dx * coneRatio),\n\t\t\t\t\ty2 = referenceNode.y  + referenceNode.height + Math.abs(dx * coneRatio);\n\n\t\t\t\tif (node.id === referenceNode.id || node.x <= Math.round(referenceNode.x + referenceNode.width * 0.5)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (coneRatio !== undefined && (node.y > y2 || (node.y + node.height) < y1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t\treturn getNodesForPredicate(predicate);\n\t\t},\n\t\tgetNodesUp = function (referenceNode, coneRatio) {\n\t\t\tconst predicate = function (node) {\n\t\t\t\tconst dy = node.y - referenceNode.y,\n\t\t\t\t\tx1 = referenceNode.x - Math.abs(dy * coneRatio),\n\t\t\t\t\tx2 = referenceNode.x + referenceNode.width + Math.abs(dy * coneRatio);\n\n\t\t\t\tif (node.id === referenceNode.id || (node.y + node.height) >= Math.round(referenceNode.y + referenceNode.height * 0.5)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (coneRatio !== undefined && (node.x > x2 || (node.x + node.width) < x1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t\treturn getNodesForPredicate(predicate);\n\t\t},\n\t\tgetNodesLeft = function (referenceNode, coneRatio) {\n\t\t\tconst predicate = function (node) {\n\t\t\t\tconst dx = node.x - referenceNode.x,\n\t\t\t\t\ty1 = referenceNode.y - Math.abs(dx * coneRatio),\n\t\t\t\t\ty2 = referenceNode.y + referenceNode.height + Math.abs(dx * coneRatio);\n\n\t\t\t\tif (node.id === referenceNode.id || (node.x + node.width) >= Math.round(referenceNode.x + referenceNode.width * 0.5)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (coneRatio !== undefined && (node.y > y2 || (node.y + node.height) < y1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t\treturn getNodesForPredicate(predicate);\n\t\t},\n\t\tgetNearest = function (referenceNode, nodes, xRatio, yRatio) {\n\t\t\tconst referenceNodeCenter = {\n\t\t\t\t\tx: Math.round(referenceNode.x + referenceNode.width * 0.5),\n\t\t\t\t\ty: Math.round(referenceNode.y + referenceNode.height * 0.5)\n\t\t\t\t},\n\t\t\t\tcalculateDistance = function (point1, point2) {\n\t\t\t\t\tconst dx = xRatio * (point1.x - point2.x),\n\t\t\t\t\t\tdy = yRatio * (point1.y - point2.y);\n\t\t\t\t\treturn Math.pow(dx, 2)  + Math.pow(dy, 2);\n\t\t\t\t};\n\t\t\tif (!nodes) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (nodes.length === 1) {\n\t\t\t\treturn nodes[0];\n\t\t\t}\n\t\t\treturn _.min(nodes, function (node) {\n\t\t\t\tconst d = [\n\t\t\t\t\tcalculateDistance(node, referenceNodeCenter),\n\t\t\t\t\tcalculateDistance({x: node.x + node.width, y: node.y + node.height}, referenceNodeCenter),\n\t\t\t\t\tcalculateDistance({x: node.x + node.width, y: node.y}, referenceNodeCenter),\n\t\t\t\t\tcalculateDistance({x: node.x, y: node.y + node.height}, referenceNodeCenter),\n\t\t\t\t\tcalculateDistance({x: Math.round(node.x + node.width * 0.5), y: Math.round(node.y + node.height * 0.5)}, referenceNodeCenter)\n\t\t\t\t];\n\t\t\t\treturn _.min(d);\n\t\t\t});\n\t\t};\n\n\tself.getNode = function (nodeId) {\n\t\treturn (layout && layout.nodes && layout.nodes[nodeId]);\n\t};\n\tself.isRootNode = function (nodeId) {\n\t\treturn (layout && layout.nodes && layout.nodes[nodeId] && layout.nodes[nodeId].level === 1);\n\t};\n\tself.getNodeBox = function (nodeId) {\n\t\treturn nodeToBox(self.getNode(nodeId));\n\t};\n\tself.setLayout = function (newLayout) {\n\t\tlayout = newLayout || emptyLayout;\n\t};\n\tself.getLayout = function () {\n\t\treturn layout || emptyLayout;\n\t};\n\tself.nodeIdLeft = function (nodeId) {\n\t\tconst referenceNode = self.getNode(nodeId),\n\t\t\tnodes = referenceNode && (getNodesLeft(referenceNode, options.coneRatio) || getNodesLeft(referenceNode)),\n\t\t\tnode = nodes && getNearest(referenceNode, nodes, 1, options.majorAxisRatio);\n\t\treturn node && node.id;\n\t};\n\tself.nodeIdRight = function (nodeId) {\n\t\tconst referenceNode = self.getNode(nodeId),\n\t\t\tnodes = referenceNode && (getNodesRight(referenceNode, options.coneRatio) || getNodesRight(referenceNode)),\n\t\t\tnode = nodes && getNearest(referenceNode, nodes, 1, options.majorAxisRatio);\n\t\treturn node && node.id;\n\t};\n\n\tself.nodeIdUp = function (nodeId) {\n\t\tconst referenceNode = self.getNode(nodeId),\n\t\t\tnodes = referenceNode && (getNodesUp(referenceNode, options.coneRatio) || getNodesUp(referenceNode)),\n\t\t\tnode = nodes && getNearest(referenceNode, nodes, options.majorAxisRatio, 1);\n\t\treturn node && node.id;\n\t};\n\tself.nodeIdDown = function (nodeId) {\n\t\tconst referenceNode = self.getNode(nodeId),\n\t\t\tnodes = referenceNode && (getNodesDown(referenceNode, options.coneRatio) || getNodesDown(referenceNode)),\n\t\t\tnode = nodes && getNearest(referenceNode, nodes, options.majorAxisRatio, 1);\n\t\treturn node && node.id;\n\t};\n\tself.getOrientation = function () {\n\t\treturn (layout && layout.orientation) || 'standard';\n\t};\n\tself.layoutBounds = function () {\n\t\tlet minx, miny, maxx, maxy;\n\t\tif (_.isEmpty(layout.nodes)) {\n\t\t\treturn false;\n\t\t}\n\t\t_.each(layout.nodes, function (node) {\n\t\t\tif (!minx) {\n\t\t\t\tminx = node.x;\n\t\t\t\tminy = node.y;\n\t\t\t\tmaxx = node.x + node.width;\n\t\t\t\tmaxy = node.y + node.height;\n\t\t\t} else {\n\t\t\t\tminx = Math.min(node.x, minx);\n\t\t\t\tminy = Math.min(node.y, miny);\n\t\t\t\tmaxx = Math.max(node.x + node.width, maxx);\n\t\t\t\tmaxy = Math.max(node.y + node.height, maxy);\n\t\t\t}\n\t\t});\n\t\treturn {minX: minx, minY: miny, maxX: maxx, maxY: maxy, width: (maxx - minx), height: (maxy - miny)};\n\t};\n\n\tself.clipRectTransform = function (centerNodeId, options) {\n\t\tlet scale = (options && options.scale) || 1;\n\t\tconst centerNode = self.getNode(centerNodeId),\n\t\t\tbounds = self.layoutBounds(),\n\t\t\tpadding = (options && options.padding) || 0,\n\t\t\timgCenter = {\n\t\t\t\tx: centerNode.x + (centerNode.width / 2),\n\t\t\t\ty: centerNode.y + (centerNode.height / 2)\n\t\t\t};\n\t\tif (options && options.clipRect) {\n\t\t\treturn {\n\t\t\t\tx: (options.clipRect.width / 2) - imgCenter.x,\n\t\t\t\ty: (options.clipRect.height / 2) - imgCenter.y,\n\t\t\t\twidth: options.clipRect.width,\n\t\t\t\theight: options.clipRect.height,\n\t\t\t\tscale: scale\n\t\t\t};\n\t\t} else if (options && options.page) {\n\t\t\tscale = Math.min((options.page.width - 2 * padding) / bounds.width, (options.page.height - 2 * padding) / bounds.height);\n\t\t\treturn {\n\t\t\t\tx: -1 * bounds.minX + Math.floor(0.5 * (options.page.width / scale - bounds.width)), // in scaled coordinates\n\t\t\t\ty: -1 * bounds.minY + Math.floor(0.5 * (options.page.height / scale - bounds.height)), // in scaled coordinates\n\t\t\t\twidth: options.page.width,\n\t\t\t\theight: options.page.height,\n\t\t\t\tscale: scale\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tx: -1 *  bounds.minX + Math.floor (padding / scale), // in scaled coordinates\n\t\t\t\ty: -1 *  bounds.minY + Math.floor (padding / scale), // in scaled coordinates\n\t\t\t\twidth: bounds.width * scale + 2 * padding,\n\t\t\t\theight: bounds.height * scale + 2 * padding,\n\t\t\t\tscale: scale\n\t\t\t};\n\t\t}\n\t};\n\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layout-model.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/align-group.js":
/*!**********************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/align-group.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function alignGroup(result, rootIdea) {\n\t'use strict';\n\tconst nodes = result.nodes,\n\t\tchildIds = _.values(rootIdea.ideas).map(function (idea) {\n\t\t\treturn idea.id;\n\t\t}),\n\t\tchildNodes = childIds.map(function (id) {\n\t\t\treturn nodes[id];\n\t\t}).filter(function (node) {\n\t\t\treturn node;\n\t\t}),\n\t\tleftBorders = _.map(childNodes, function (node) {\n\t\t\treturn node.x;\n\t\t}),\n\t\trightBorders = _.map(childNodes, function (node) {\n\t\t\treturn node.x + node.width;\n\t\t}),\n\t\tminLeft = _.min(leftBorders),\n\t\tmaxRight = _.max(rightBorders),\n\t\trootNode = nodes[rootIdea.id],\n\t\tsameLevelNodes = _.values(nodes).filter(function (node) {\n\t\t\treturn node.level === rootNode.level && node.id !== rootNode.id;\n\t\t});\n\n\tif (childNodes.length) {\n\t\trootNode.x = minLeft;\n\t\trootNode.width = maxRight - rootNode.x;\n\t}\n\tsameLevelNodes.forEach(function (node) {\n\t\tnode.verticalOffset = (node.verticalOffset || 0) + rootNode.height;\n\t});\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/align-group.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js":
/*!************************************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tVerticalSubtreeCollection = __webpack_require__(/*! ./vertical-subtree-collection */ \"./node_modules/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js\");\nmodule.exports = function combineVerticalSubtrees(node, childLayouts, margin, sameLevel) {\n\t'use strict';\n\tconst result = {\n\t\t\tnodes: { }\n\t\t},\n\t\tshift = function (nodes, xOffset) {\n\t\t\t_.each(nodes, function (node) {\n\t\t\t\tnode.x += xOffset;\n\t\t\t});\n\t\t\treturn nodes;\n\t\t},\n\t\tverticalSubtreeCollection = new VerticalSubtreeCollection(childLayouts, margin);\n\tlet treeOffset;\n\n\tif (Array.isArray(childLayouts)) {\n\t\tthrow 'child layouts are an array!';\n\t}\n\n\tresult.nodes[node.id] = node;\n\tnode.x = Math.round(-0.5 * node.width);\n\tresult.levels = [{width: node.width, xOffset: node.x}];\n\n\tif (!verticalSubtreeCollection.isEmpty()) {\n\t\tif (sameLevel) {\n\t\t\tresult.levels = verticalSubtreeCollection.getMergedLevels();\n\t\t\ttreeOffset = result.levels[0].xOffset;\n\t\t} else {\n\t\t\tresult.levels = result.levels.concat(verticalSubtreeCollection.getMergedLevels());\n\t\t\ttreeOffset = result.levels[1].xOffset;\n\t\t}\n\t\tObject.keys(childLayouts).forEach(function (subtreeRank) {\n\t\t\t_.extend(result.nodes, shift(childLayouts[subtreeRank].nodes, treeOffset + verticalSubtreeCollection.getExpectedTranslation(subtreeRank)));\n\t\t});\n\t}\n\treturn result;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/extract-connectors.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/extract-connectors.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function extractConnectors(aggregate, visibleNodes, theme) {\n\t'use strict';\n\tconst result = {},\n\t\tallowParentConnectorOverride = !(theme && theme.blockParentConnectorOverride),\n\t\ttraverse = function (idea, parentId, isChildNode) {\n\t\t\tif (isChildNode) {\n\t\t\t\tif (!visibleNodes[idea.id]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (parentId !== aggregate.id) {\n\t\t\t\t\tresult[idea.id] = {\n\t\t\t\t\t\ttype: 'connector',\n\t\t\t\t\t\tfrom: parentId,\n\t\t\t\t\t\tto: idea.id\n\t\t\t\t\t};\n\t\t\t\t\tif (allowParentConnectorOverride && idea.attr && idea.attr.parentConnector) {\n\t\t\t\t\t\tresult[idea.id].attr = _.clone(idea.attr.parentConnector);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (idea.ideas) {\n\t\t\t\tObject.keys(idea.ideas).forEach(function (subNodeRank) {\n\t\t\t\t\ttraverse(idea.ideas[subNodeRank], idea.id, true);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\ttraverse(aggregate);\n\treturn result;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/extract-connectors.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/links.js":
/*!****************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/links.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function (idea, visibleNodes) {\n\t'use strict';\n\tconst result = {};\n\t_.each(idea.links, function (link) {\n\t\tif (visibleNodes[link.ideaIdFrom] && visibleNodes[link.ideaIdTo]) {\n\t\t\tresult[link.ideaIdFrom + '_' + link.ideaIdTo] = {\n\t\t\t\ttype: 'link',\n\t\t\t\tideaIdFrom: link.ideaIdFrom,\n\t\t\t\tideaIdTo: link.ideaIdTo,\n\t\t\t\tattr: _.clone(link.attr)\n\t\t\t};\n\t\t}\n\t});\n\treturn result;\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/links.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nconst nearestInset = function (node, relatedNode, inset) {\n\t'use strict';\n\tif (node.left + node.width < relatedNode.left) {\n\t\treturn node.left + node.width - inset;\n\t}\n\treturn node.left + inset;\n};\n\nmodule.exports = {\n\t'center': function (node) {\n\t\t'use strict';\n\t\treturn Math.round(node.left + node.width * 0.5);\n\t},\n\t'center-separated': function (node, relatedNode, horizontalInset, verticalInsetRatio) {\n\t\t'use strict';\n\t\tconst insetY = node.height * (verticalInsetRatio || 0.2),\n\t\t\tinsetX = horizontalInset || 10,\n\t\t\thalfWidth = node.width / 2,\n\t\t\tnodeMidX = node.left + halfWidth,\n\t\t\trelatedNodeMidX = relatedNode.left + (relatedNode.width / 2),\n\t\t\trelatedNodeRight = (relatedNode.left + relatedNode.width),\n\t\t\tdy = relatedNode.top - node.top + node.height - insetY,\n\t\t\tcalcDx = function () {\n\t\t\t\tif (relatedNode.left > node.left + node.width) {\n\t\t\t\t\treturn relatedNode.left - nodeMidX;\n\t\t\t\t} else if (relatedNodeRight < node.left) {\n\t\t\t\t\treturn relatedNodeRight - nodeMidX;\n\t\t\t\t} else if (relatedNode.left < nodeMidX) {\n\t\t\t\t\treturn relatedNodeMidX - nodeMidX;\n\t\t\t\t} else {\n\t\t\t\t\treturn relatedNodeMidX - nodeMidX;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdx = calcDx(),\n\t\t\trequestedOffset = (dx / Math.abs(dy)) * insetY,\n\t\t\tcappedOffset = Math.max(requestedOffset, (halfWidth * -1) + insetX),\n\t\t\toffsetX = Math.min(cappedOffset, halfWidth - insetX);\n\t\treturn Math.round(node.left + (node.width * 0.5) + offsetX);\n\t},\n\t'nearest': function (node, relatedNode) {\n\t\t'use strict';\n\t\treturn nearestInset(node, relatedNode, 0);\n\t},\n\t'nearest-inset': nearestInset\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/standard.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/standard.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\ttreeUtils = __webpack_require__(/*! ../tree */ \"./node_modules/mindmup-mapjs-layout/src/tree.js\");\nmodule.exports  = function standardLayout(idea, dimensionProvider, margin) {\n\t'use strict';\n\tconst positive = function (rank, parentId) {\n\t\t\treturn parentId !== idea.id || rank > 0;\n\t\t},\n\t\tnegative = function (rank, parentId) {\n\t\t\treturn parentId !== idea.id || rank < 0;\n\t\t},\n\t\tpositiveTree = treeUtils.calculateTree(idea, dimensionProvider, margin.h, positive),\n\t\tnegativeTree = treeUtils.calculateTree(idea, dimensionProvider, margin.h, negative),\n\t\tlayout = positiveTree.toLayout(),\n\t\tnegativeLayout = negativeTree.toLayout();\n\t_.each(negativeLayout.nodes, function (n) {\n\t\tn.x = -1 * n.x - n.width;\n\t});\n\treturn _.extend(negativeLayout.nodes, layout.nodes);\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/standard.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/top-down.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/top-down.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tisEmptyGroup = __webpack_require__(/*! ../is-empty-group */ \"./node_modules/mindmup-mapjs-layout/src/is-empty-group.js\"),\n\talignGroup = __webpack_require__(/*! ./align-group */ \"./node_modules/mindmup-mapjs-layout/src/layouts/align-group.js\"),\n\tcombineVerticalSubtrees = __webpack_require__(/*! ./combine-vertical-subtrees */ \"./node_modules/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js\");\nmodule.exports  = function topdownLayout(aggregate, dimensionProvider, margin) {\n\t'use strict';\n\tconst isGroup = function (node) {\n\t\t\treturn node.attr && node.attr.group;\n\t\t},\n\t\ttoNode = function (idea, level) {\n\t\t\tconst dimensions = dimensionProvider(idea, level);\n\t\t\treturn _.extend({level: level, verticalOffset: 0, title: isGroup(idea) ? '' : idea.title}, dimensions, _.pick(idea, ['id', 'attr']));\n\t\t},\n\t\ttraverse = function (idea, predicate, level) {\n\t\t\tconst childResults = {},\n\t\t\t\tshouldIncludeSubIdeas = !(_.isEmpty(idea.ideas) || (idea.attr && idea.attr.collapsed));\n\n\t\t\tlevel = level || 1;\n\t\t\tif (shouldIncludeSubIdeas) {\n\t\t\t\tObject.keys(idea.ideas).forEach(function (subNodeRank) {\n\t\t\t\t\tconst newLevel = isGroup(idea) ? level : level + 1,\n\t\t\t\t\t\tresult = traverse(idea.ideas[subNodeRank], predicate, newLevel);\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\tchildResults[subNodeRank] = result;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn predicate(idea, childResults, level);\n\t\t},\n\t\ttraversalLayout = function (idea, childLayouts, level) {\n\t\t\tconst node = toNode(idea, level);\n\t\t\tlet result;\n\n\t\t\tif (isGroup(node) && !_.isEmpty(idea.ideas)) {\n\t\t\t\tresult = combineVerticalSubtrees(node, childLayouts, margin.h, true);\n\t\t\t\talignGroup(result, idea);\n\t\t\t} else {\n\t\t\t\tresult = combineVerticalSubtrees(node, childLayouts, margin.h);\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\ttraversalLayoutWithoutEmptyGroups = function (idea, childLayouts, level) {\n\t\t\treturn (idea === aggregate || !isEmptyGroup(idea)) && traversalLayout(idea, childLayouts, level);\n\t\t},\n\t\tsetLevelHeights = function (nodes, levelHeights) {\n\t\t\t_.each(nodes, function (node) {\n\t\t\t\tnode.y = levelHeights[node.level - 1] + node.verticalOffset;\n\t\t\t\tdelete node.verticalOffset;\n\t\t\t});\n\t\t},\n\t\tgetLevelHeights = function (nodes) {\n\t\t\tconst maxHeights = [],\n\t\t\t\theights = [];\n\t\t\tlet level,\n\t\t\t\ttotalHeight = 0;\n\n\t\t\t_.each(nodes, function (node) {\n\t\t\t\tmaxHeights[node.level - 1] = Math.max(maxHeights[node.level - 1] || 0, node.height + node.verticalOffset);\n\t\t\t});\n\t\t\ttotalHeight = maxHeights.reduce(function (memo, item) {\n\t\t\t\treturn memo + item;\n\t\t\t}, 0) + (margin.v *  (maxHeights.length - 1));\n\n\t\t\theights[0] = Math.round(-0.5 * totalHeight);\n\n\t\t\tfor (level = 1; level < maxHeights.length; level++) {\n\t\t\t\theights [level] = heights [level - 1] + margin.v + maxHeights[level - 1];\n\t\t\t}\n\t\t\treturn heights;\n\t\t},\n\t\ttree = traverse(aggregate, traversalLayoutWithoutEmptyGroups);\n\n\tsetLevelHeights(tree.nodes, getLevelHeights(tree.nodes));\n\n\treturn tree.nodes;\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/top-down.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function VerticalSubtreeCollection(subtreeMap, marginArg) {\n\t'use strict';\n\tconst self = this,\n\t\tsortedRanks = function () {\n\t\t\tif (!subtreeMap) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn _.sortBy(Object.keys(subtreeMap), parseFloat);\n\t\t},\n\t\tmargin = marginArg || 0,\n\t\tcalculateExpectedTranslations = function () {\n\t\t\tconst ranks = sortedRanks(),\n\t\t\t\ttranslations = {},\n\n\t\t\t\tsortByRank = function () {\n\t\t\t\t\t/* todo: cache */\n\t\t\t\t\tif (_.isEmpty(subtreeMap)) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\t\t\t\t\treturn sortedRanks().map(function (key) {\n\t\t\t\t\t\treturn subtreeMap[key];\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\tlet currentWidthByLevel;\n\n\t\t\tsortByRank().forEach(function (childLayout, rankIndex) {\n\t\t\t\tconst currentRank = ranks[rankIndex];\n\t\t\t\tif (currentWidthByLevel === undefined) {\n\t\t\t\t\ttranslations[currentRank] = 0 - childLayout.levels[0].xOffset;\n\t\t\t\t\tcurrentWidthByLevel = childLayout.levels.map(function (level) {\n\t\t\t\t\t\treturn level.width + translations[currentRank] + level.xOffset;\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tchildLayout.levels.forEach(function (level, levelIndex) {\n\t\t\t\t\t\tconst currentLevelWidth = currentWidthByLevel[levelIndex];\n\t\t\t\t\t\tif (currentLevelWidth !== undefined) {\n\t\t\t\t\t\t\tif (translations[currentRank] === undefined) {\n\t\t\t\t\t\t\t\ttranslations[currentRank] = currentLevelWidth + margin - level.xOffset;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttranslations[currentRank] = Math.max(translations[currentRank], currentLevelWidth + margin - level.xOffset);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tchildLayout.levels.forEach(function (level, levelIndex) {\n\t\t\t\t\t\tcurrentWidthByLevel[levelIndex] = translations[currentRank] + level.xOffset + level.width;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn translations;\n\t\t},\n\t\ttranslationsByRank = calculateExpectedTranslations();\n\n\tself.getLevelWidth = function (level) {\n\t\tconst candidateRanks = sortedRanks().filter(function (rank) {\n\t\t\t\treturn self.existsOnLevel(rank, level);\n\t\t\t}),\n\t\t\treferenceLeft = candidateRanks[0], /* won't work if the first child layout does not exist on the widest level */\n\t\t\treferenceRight = candidateRanks[candidateRanks.length - 1],\n\t\t\tleftLayout = subtreeMap[referenceLeft],\n\t\t\trightLayout = subtreeMap[referenceRight],\n\t\t\tleftx = leftLayout.levels[level].xOffset + self.getExpectedTranslation(referenceLeft),\n\t\t\trightx = rightLayout.levels[level].xOffset + self.getExpectedTranslation(referenceRight);\n\t\treturn rightx + rightLayout.levels[level].width - leftx;\n\t};\n\tself.getLevelWidths = function () {\n\t\t/* todo: cache */\n\t\tconst result = [],\n\t\t\tmaxLevel = _.max(_.map(subtreeMap, function (childLayout) {\n\t\t\t\treturn childLayout.levels.length;\n\t\t\t}));\n\t\tfor (let levelIdx = 0; levelIdx < maxLevel; levelIdx++) {\n\t\t\tresult.push(self.getLevelWidth(levelIdx));\n\t\t}\n\t\treturn result;\n\t};\n\tself.isEmpty = function () {\n\t\treturn _.isEmpty(subtreeMap);\n\t};\n\n\tself.getExpectedTranslation = function (rank) {\n\t\treturn translationsByRank[rank];\n\t};\n\tself.existsOnLevel = function (rank, level) {\n\t\treturn subtreeMap[rank].levels.length > level;\n\t};\n\tself.getMergedLevels = function () {\n\t\tconst targetCombinedLeftOffset = Math.round(self.getLevelWidth(0) * -0.5);\n\t\treturn self.getLevelWidths().map(function (levelWidth, index) {\n\t\t\tconst candidateRanks = sortedRanks().filter(function (rank) {\n\t\t\t\t\treturn self.existsOnLevel(rank, index);\n\t\t\t\t}),\n\t\t\t\treferenceLeft = candidateRanks[0], /* won't work if the first child layout does not exist on the widest level */\n\t\t\t\tleftLayout = subtreeMap[referenceLeft];\n\t\t\treturn {\n\t\t\t\twidth: levelWidth,\n\t\t\t\txOffset: leftLayout.levels[index].xOffset + self.getExpectedTranslation(referenceLeft) + targetCombinedLeftOffset\n\t\t\t};\n\t\t});\n\n\t};\n\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/line-strokes.js":
/*!***************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/line-strokes.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nmodule.exports = {\n\tdashed: '8, 8',\n\tsolid: ''\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/line-strokes.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/line-styles.js":
/*!**************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/line-styles.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\n\nmodule.exports = {\n\tstrokes: (name, width) => {\n\t\t'use strict';\n\t\tif (!name || name === 'solid') {\n\t\t\treturn '';\n\t\t}\n\t\tconst multipleWidth = Math.max(width || 1, 1) * 4;\n\t\tif (name === 'dashed') {\n\t\t\treturn [multipleWidth, multipleWidth].join(', ');\n\t\t} else {\n\t\t\treturn [1, multipleWidth].join(', ');\n\t\t}\n\t},\n\tlinecap: (name) => {\n\t\t'use strict';\n\t\tif (!name || name === 'solid') {\n\t\t\treturn 'square';\n\t\t}\n\t\tif (name === 'dotted') {\n\t\t\treturn 'round';\n\t\t}\n\t\treturn '';\n\t}\n\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/line-styles.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js":
/*!***************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\n\nmodule.exports = {\n\tcalculateLayout: __webpack_require__(/*! ./calculate-layout */ \"./node_modules/mindmup-mapjs-layout/src/calculate-layout.js\"),\n\tcolorToRGB: __webpack_require__(/*! ./color-to-rgb */ \"./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js\"),\n\tConnectors: __webpack_require__(/*! ./connectors */ \"./node_modules/mindmup-mapjs-layout/src/connectors.js\"),\n\tforegroundStyle: __webpack_require__(/*! ./foreground-style */ \"./node_modules/mindmup-mapjs-layout/src/foreground-style.js\"),\n\tLayoutModel: __webpack_require__(/*! ./layout-model */ \"./node_modules/mindmup-mapjs-layout/src/layout-model.js\"),\n\tnodeToBox: __webpack_require__(/*! ./node-to-box */ \"./node_modules/mindmup-mapjs-layout/src/node-to-box.js\"),\n\tTheme: __webpack_require__(/*! ./theme */ \"./node_modules/mindmup-mapjs-layout/src/theme.js\"),\n\tThemeProcessor: __webpack_require__(/*! ./theme-processor */ \"./node_modules/mindmup-mapjs-layout/src/theme-processor.js\"),\n\tThemeDimensionProvider: __webpack_require__(/*! ./theme-dimension-provider */ \"./node_modules/mindmup-mapjs-layout/src/theme-dimension-provider.js\"),\n\tThemes: {\n\t\tdefault: __webpack_require__(/*! ./default-theme */ \"./node_modules/mindmup-mapjs-layout/src/default-theme.js\")\n\t},\n\tlineStrokes: __webpack_require__(/*! ./line-strokes */ \"./node_modules/mindmup-mapjs-layout/src/line-strokes.js\")\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/multi-root-layout.js":
/*!********************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/multi-root-layout.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tlayoutGeometry = __webpack_require__(/*! ./layout-geometry */ \"./node_modules/mindmup-mapjs-layout/src/layout-geometry.js\");\n\nmodule.exports = function MultiRootLayout() {\n\t'use strict';\n\tconst self = this,\n\t\tmergeNodes = function (storedLayout, offset) {\n\t\t\t_.each(storedLayout.rootLayout, function (node) {\n\t\t\t\tnode.x = node.x + offset.x;\n\t\t\t\tnode.y = node.y + offset.y;\n\t\t\t\tnode.rootId = storedLayout.rootIdea.id;\n\t\t\t});\n\t\t},\n\t\tglobalIdeaTopLeftPosition = function (idea) {\n\t\t\tconst positionArray = (idea && idea.attr && idea.attr.position) || [0, 0, 0];\n\t\t\treturn {\n\t\t\t\tx: positionArray[0],\n\t\t\t\ty: positionArray[1],\n\t\t\t\tpriority: positionArray[2]\n\t\t\t};\n\t\t},\n\t\ttoStoredLayout = function (rootLayout, rootIdea) {\n\t\t\tconst storedLayout = {\n\t\t\t\trootIdea: rootIdea,\n\t\t\t\trootNode: rootLayout[rootIdea.id],\n\t\t\t\trootLayout: rootLayout\n\t\t\t};\n\t\t\treturn storedLayout;\n\t\t},\n\t\tisPositioned = function (rootIdea) {\n\t\t\treturn globalIdeaTopLeftPosition(rootIdea).priority;\n\t\t},\n\t\tcalcDesiredRootNodeCenter = function (storedLayout) {\n\t\t\tconst rootPosition = globalIdeaTopLeftPosition(storedLayout.rootIdea);\n\t\t\tif (!rootPosition || !rootPosition.priority || !storedLayout.rootNode) {\n\t\t\t\treturn {x: 0, y: 0};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tx: (rootPosition.x + storedLayout.rootNode.width / 2),\n\t\t\t\ty: (rootPosition.y + storedLayout.rootNode.height / 2)\n\t\t\t};\n\t\t},\n\t\tpositionedLayouts = [],\n\t\tunpositionedLayouts = [];\n\n\tself.appendRootNodeLayout = function (rootLayout, rootIdea) {\n\t\tconst storedLayout = toStoredLayout(rootLayout, rootIdea);\n\t\tif (isPositioned(rootIdea)) {\n\t\t\tpositionedLayouts.push(storedLayout);\n\t\t} else {\n\t\t\tunpositionedLayouts.push(storedLayout);\n\t\t}\n\t};\n\tself.getCombinedLayout = function (margin) {\n\t\tlet placedLayoutPoly = [],\n\t\t\tresult = {};\n\n\t\tconst mostRecentlyPositioned = positionedLayouts.length && _.max(positionedLayouts, function (layout) {\n\t\t\t\treturn globalIdeaTopLeftPosition(layout.rootIdea).priority;\n\t\t\t}),\n\t\t\torigin = {x: 0, y: 0}, //mostRecentlyPositioned && calcDesiredRootNodeCenter(mostRecentlyPositioned),\n\t\t\trootDistance = function (storedLayout) {\n\t\t\t\t// return globalIdeaTopLeftPosition(storedLayout.rootIdea).priority * -1;\n\t\t\t\t// return storedLayout.rootIdea.id;\n\t\t\t\tconst rootCenter = calcDesiredRootNodeCenter(storedLayout);\n\t\t\t\treturn Math.pow(rootCenter.x - origin.x, 2) + Math.pow(rootCenter.y - origin.y, 2);\n\t\t\t},\n\t\t\tsortedPositionedLayouts = _.sortBy(positionedLayouts, rootDistance),\n\t\t\tplacedLayouts = [],\n\n\t\t\tlayoutCount = positionedLayouts.length + unpositionedLayouts.length,\n\t\t\thasMultipleLayouts = layoutCount > 1,\n\t\t\tpositionLayout = function (storedLayout) {\n\t\t\t\tlet offset,\n\t\t\t\t\ttranslationResult,\n\t\t\t\t\tstoredLayoutPoly;\n\n\t\t\t\tconst placedRootCenter = calcDesiredRootNodeCenter(storedLayout),\n\t\t\t\t\tinitialTranslation = layoutGeometry.roundVector([placedRootCenter.x, placedRootCenter.y]),\n\t\t\t\t\tplaceNewLayout = function () {\n\t\t\t\t\t\tlet vector = layoutGeometry.unitVector([placedRootCenter.x - origin.x, placedRootCenter.y - origin.y]);\n\t\t\t\t\t\tif (vector[0] === 0 && vector[1] === 0) {\n\t\t\t\t\t\t\tvector = [1, 0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttranslationResult = layoutGeometry.translatePolyToNotOverlap(storedLayoutPoly, placedLayoutPoly, initialTranslation, vector, initialTranslation);\n\t\t\t\t\t\toffset = {x: translationResult.translation[0], y: translationResult.translation[1]};\n\t\t\t\t\t\tstoredLayoutPoly = translationResult.translatedPoly;\n\t\t\t\t\t};\n\n\n\n\n\t\t\t\tstoredLayoutPoly = hasMultipleLayouts && layoutGeometry.translatePoly(layoutGeometry.tolayoutPolygonHull(storedLayout.rootLayout, margin), initialTranslation);\n\n\t\t\t\tif (!storedLayout || _.contains(placedLayouts, storedLayout)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (placedLayouts.length) {\n\t\t\t\t\tplaceNewLayout();\n\t\t\t\t} else {\n\t\t\t\t\toffset = placedRootCenter;\n\t\t\t\t}\n\n\t\t\t\tmergeNodes(storedLayout, offset);\n\t\t\t\tplacedLayouts.push(storedLayout);\n\t\t\t\tif (hasMultipleLayouts) {\n\t\t\t\t\tplacedLayoutPoly = placedLayoutPoly.concat(storedLayoutPoly);\n\t\t\t\t}\n\n\t\t\t};\n\t\tif (!margin) {\n\t\t\tthrow 'invalid-args';\n\t\t}\n\t\tif (mostRecentlyPositioned) {\n\t\t\tpositionLayout(mostRecentlyPositioned);\n\t\t}\n\t\tsortedPositionedLayouts.forEach(positionLayout);\n\t\tunpositionedLayouts.forEach(positionLayout);\n\t\tplacedLayouts.forEach(function (placedLayout) {\n\t\t\tresult = _.extend(result, placedLayout.rootLayout);\n\t\t});\n\t\treturn result;\n\t};\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/multi-root-layout.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/node-to-box.js":
/*!**************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/node-to-box.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nmodule.exports = function nodeToBox(node) {\n\t'use strict';\n\tif (!node) {\n\t\treturn false;\n\t}\n\treturn {\n\t\tleft: node.x,\n\t\ttop: node.y,\n\t\twidth: node.width,\n\t\theight: node.height,\n\t\tlevel: node.level,\n\t\tstyles: node.styles || ['default']\n\t};\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/node-to-box.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/outline.js":
/*!**********************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/outline.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, module*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tborderLength = function (border) {\n\t\t'use strict';\n\t\treturn _.reduce(border, function (seed, el) {\n\t\t\treturn seed + el.l;\n\t\t}, 0);\n\t},\n\tborderSegmentIndexAt = function (border, length) {\n\t\t'use strict';\n\t\tlet l = 0, i = -1;\n\t\twhile (l <= length) {\n\t\t\ti += 1;\n\t\t\tif (i >= border.length) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tl += border[i].l;\n\t\t}\n\t\treturn i;\n\t},\n\textendBorder = function (originalBorder, extension) {\n\t\t'use strict';\n\t\tlet lengthToCut,\n\t\t\tresult = originalBorder.slice();\n\t\tconst origLength = borderLength(originalBorder),\n\t\t\ti = borderSegmentIndexAt(extension, origLength);\n\t\tif (i >= 0) {\n\t\t\tlengthToCut = borderLength(extension.slice(0, i + 1));\n\t\t\tresult.push({h: extension[i].h, l: lengthToCut - origLength});\n\t\t\tresult = result.concat(extension.slice(i + 1));\n\t\t}\n\t\treturn result;\n\t},\n\tOutline = function (topBorder, bottomBorder) {\n\t\t'use strict';\n\t\tconst shiftBorder = function (border, deltaH) {\n\t\t\treturn _.map(border, function (segment) {\n\t\t\t\treturn {\n\t\t\t\t\tl: segment.l,\n\t\t\t\t\th: segment.h + deltaH\n\t\t\t\t};\n\t\t\t});\n\t\t};\n\t\tthis.initialHeight = function () {\n\t\t\treturn this.bottom[0].h - this.top[0].h;\n\t\t};\n\t\tthis.borders = function () {\n\t\t\treturn _.pick(this, 'top', 'bottom');\n\t\t};\n\t\tthis.spacingAbove = function (outline) {\n\t\t\tlet i = 0, j = 0, result = 0, li = 0, lj = 0;\n\t\t\twhile (i < this.bottom.length && j < outline.top.length) {\n\t\t\t\tresult = Math.max(result, this.bottom[i].h - outline.top[j].h);\n\t\t\t\tif (li + this.bottom[i].l < lj + outline.top[j].l) {\n\t\t\t\t\tli += this.bottom[i].l;\n\t\t\t\t\ti += 1;\n\t\t\t\t} else if (li + this.bottom[i].l === lj + outline.top[j].l) {\n\t\t\t\t\tli += this.bottom[i].l;\n\t\t\t\t\ti += 1;\n\t\t\t\t\tlj += outline.top[j].l;\n\t\t\t\t\tj += 1;\n\t\t\t\t} else {\n\t\t\t\t\tlj += outline.top[j].l;\n\t\t\t\t\tj += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\tthis.indent = function (horizontalIndent, margin) {\n\t\t\tconst top = this.top.slice(),\n\t\t\t\tbottom = this.bottom.slice(),\n\t\t\t\tvertCenter = Math.round((bottom[0].h + top[0].h) / 2);\n\n\t\t\tif (!horizontalIndent) {\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\ttop.unshift({h: Math.round(vertCenter - margin / 2), l: horizontalIndent});\n\t\t\tbottom.unshift({h: Math.round(vertCenter + margin / 2), l: horizontalIndent});\n\t\t\treturn new Outline(top, bottom);\n\t\t};\n\t\tthis.stackBelow = function (outline, margin) {\n\t\t\tconst spacing = outline.spacingAbove(this),\n\t\t\t\ttop = extendBorder(outline.top, shiftBorder(this.top, spacing + margin)),\n\t\t\t\tbottom = extendBorder(shiftBorder(this.bottom, spacing + margin), outline.bottom);\n\t\t\treturn new Outline(\n\t\t\t\ttop,\n\t\t\t\tbottom\n\t\t\t);\n\t\t};\n\t\tthis.expand = function (initialTopHeight, initialBottomHeight) {\n\t\t\tconst topAlignment = initialTopHeight - this.top[0].h,\n\t\t\t\tbottomAlignment = initialBottomHeight - this.bottom[0].h,\n\t\t\t\ttop = shiftBorder(this.top, topAlignment),\n\t\t\t\tbottom = shiftBorder(this.bottom, bottomAlignment);\n\t\t\treturn new Outline(\n\t\t\t\ttop,\n\t\t\t\tbottom\n\t\t\t);\n\t\t};\n\t\tthis.insertAtStart = function (dimensions, margin) {\n\t\t\tconst alignment = 0, //-1 * this.top[0].h - suboutlineHeight * 0.5,\n\t\t\t\ttopBorder = shiftBorder(this.top, alignment),\n\t\t\t\tbottomBorder = shiftBorder(this.bottom, alignment),\n\t\t\t\teaseIn = function (border) {\n\t\t\t\t\tborder[0].l *= 0.5;\n\t\t\t\t\tborder[1].l += border[0].l;\n\t\t\t\t};\n\t\t\ttopBorder[0].l += margin;\n\t\t\tbottomBorder[0].l += margin;\n\t\t\ttopBorder.unshift({h: Math.round(-0.5 * dimensions.height), l: dimensions.width});\n\t\t\tbottomBorder.unshift({h: Math.round(0.5 * dimensions.height), l: dimensions.width});\n\t\t\tif (topBorder[0].h > topBorder[1].h) {\n\t\t\t\teaseIn(topBorder);\n\t\t\t}\n\t\t\tif (bottomBorder[0].h < bottomBorder[1].h) {\n\t\t\t\teaseIn(bottomBorder);\n\t\t\t}\n\t\t\treturn new Outline(topBorder, bottomBorder);\n\t\t};\n\t\tthis.top = topBorder.slice();\n\t\tthis.bottom = bottomBorder.slice();\n\t},\n\toutlineFromDimensions = function (dimensions) {\n\t\t'use strict';\n\t\treturn new Outline([{\n\t\t\th: Math.round(-0.5 * dimensions.height),\n\t\t\tl: dimensions.width\n\t\t}], [{\n\t\t\th: Math.round(0.5 * dimensions.height),\n\t\t\tl: dimensions.width\n\t\t}]);\n\t};\n\n\nmodule.exports = {\n\tborderLength: borderLength,\n\tborderSegmentIndexAt: borderSegmentIndexAt,\n\textendBorder: extendBorder,\n\tOutline: Outline,\n\toutlineFromDimensions: outlineFromDimensions\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/outline.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/theme-dimension-provider.js":
/*!***************************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/theme-dimension-provider.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst formattedNodeTitle = __webpack_require__(/*! mindmup-mapjs-model */ \"./node_modules/mindmup-mapjs-model/index.js\").formattedNodeTitle,\n\t_ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function ThemeDimensionProvider(textSizer, options) {\n\t'use strict';\n\tconst self = this,\n\t\tcalcMaxWidth = function (attr, nodeTheme) {\n\t\t\tconst maxWidth = (attr && attr.style && attr.style.width) || nodeTheme.maxWidth,\n\t\t\t\tmargin = (nodeTheme && nodeTheme.margin) || (nodeTheme && nodeTheme.text && nodeTheme.text.margin) || 0;\n\t\t\tif (options && options.substractMarginFromMaxWidth && margin) {\n\t\t\t\treturn  maxWidth - (2 * margin);\n\t\t\t}\n\t\t\treturn maxWidth;\n\t\t};\n\n\tself.dimensionProviderForTheme = function (theme) {\n\t\treturn function (idea, level) {\n\t\t\tconst icon = idea.attr && idea.attr.icon,\n\t\t\t\tnodeTheme = theme.nodeTheme(theme.nodeStyles(level, idea.attr)),\n\t\t\t\ttitle = formattedNodeTitle(idea.title),\n\t\t\t\tmaxWidth = calcMaxWidth(idea.attr, nodeTheme),\n\t\t\t\trequestedWidth = (idea.attr && idea.attr.style && idea.attr.style.width) || 0,\n\t\t\t\ttextBox = _.extend({}, textSizer(title, maxWidth, nodeTheme.font));\n\n\t\t\ttextBox.textSize = {width: textBox.width, height: textBox.height};\n\n\t\t\tif (icon) {\n\t\t\t\tif (icon.position === 'left' || icon.position === 'right') {\n\t\t\t\t\tif (textBox.width && icon.width && nodeTheme.margin) {\n\t\t\t\t\t\ttextBox.width = textBox.width + nodeTheme.margin;\n\t\t\t\t\t}\n\t\t\t\t\ttextBox.width = textBox.width + icon.width;\n\t\t\t\t}\n\t\t\t\tif (icon.position === 'top' || icon.position === 'bottom') {\n\t\t\t\t\tif (textBox.height && icon.height && nodeTheme.margin) {\n\t\t\t\t\t\ttextBox.height = textBox.height + nodeTheme.margin;\n\t\t\t\t\t}\n\t\t\t\t\ttextBox.height = textBox.height + icon.height;\n\t\t\t\t}\n\t\t\t\ttextBox.height = Math.max(textBox.height, icon.height);\n\t\t\t\ttextBox.width = Math.max(textBox.width, icon.width);\n\n\t\t\t}\n\t\t\ttextBox.width = Math.max(textBox.width + 2 * nodeTheme.margin, nodeTheme.cornerRadius * 2);\n\t\t\ttextBox.width = Math.max(requestedWidth, textBox.width);\n\t\t\ttextBox.height = Math.max(textBox.height + 2 * nodeTheme.margin, nodeTheme.cornerRadius * 2);\n\t\t\treturn textBox;\n\t\t};\n\t};\n\tself.nodeLayoutProviderForTheme = function (theme) {\n\t\treturn function (node) {\n\t\t\tconst image = node.attr && node.attr.icon,\n\t\t\t\tnodeTheme = theme.nodeTheme(theme.nodeStyles(node.level, node.attr)),\n\t\t\t\ttitle = formattedNodeTitle(node.title),\n\t\t\t\tmaxWidth = calcMaxWidth(node.attr, nodeTheme),\n\t\t\t\ttextBox = textSizer(title, maxWidth, nodeTheme.font);\n\t\t\tlet textWidth = Math.min(node.width - (2 * nodeTheme.margin), textBox.width),\n\t\t\t\ttextLayout,\n\t\t\t\timageLayout,\n\t\t\t\toffset;\n\n\t\t\tif (image) {\n\t\t\t\timageLayout = {\n\t\t\t\t\tx: nodeTheme.margin,\n\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\twidth: image.width,\n\t\t\t\t\theight: image.height\n\t\t\t\t};\n\n\t\t\t\tswitch (image.position) {\n\t\t\t\t\tcase 'top':\n\t\t\t\t\t\timageLayout.x =  Math.round((node.width - image.width) / 2);\n\t\t\t\t\t\ttextLayout = {\n\t\t\t\t\t\t\tx: Math.round((node.width - textWidth) / 2),\n\t\t\t\t\t\t\ty: imageLayout.y + imageLayout.height + nodeTheme.margin,\n\t\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t\t\theight: node.height - image.height - (3 * nodeTheme.margin)\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\timageLayout.x = Math.round((node.width - image.width) / 2);\n\t\t\t\t\t\timageLayout.y = node.height - image.height - nodeTheme.margin;\n\t\t\t\t\t\ttextLayout = {\n\t\t\t\t\t\t\tx: Math.round((node.width - textWidth) / 2),\n\t\t\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t\t\theight: node.height - image.height - (3 * nodeTheme.margin)\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\t\ttextWidth = Math.min(node.width - imageLayout.width - (3 * nodeTheme.margin), textBox.width);\n\t\t\t\t\t\timageLayout.y = Math.round((node.height - image.height) / 2);\n\t\t\t\t\t\toffset = imageLayout.x + imageLayout.width;\n\n\t\t\t\t\t\ttextLayout = {\n\t\t\t\t\t\t\tx: Math.round(offset + (node.width - offset - textWidth) / 2),\n\t\t\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t\t\theight: node.height - (2 * nodeTheme.margin)\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\ttextWidth = Math.min(node.width - imageLayout.width - (3 * nodeTheme.margin), textBox.width);\n\t\t\t\t\t\timageLayout.x = node.width - image.width - nodeTheme.margin;\n\t\t\t\t\t\timageLayout.y =  Math.round((node.height - image.height) / 2);\n\t\t\t\t\t\ttextLayout = {\n\t\t\t\t\t\t\tx: Math.round((imageLayout.x - textWidth) / 2),\n\t\t\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t\t\theight: node.height - (2 * nodeTheme.margin)\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\timageLayout.x = Math.round((node.width - image.width) / 2);\n\t\t\t\t\t\timageLayout.y =  Math.round((node.height - image.height) / 2);\n\t\t\t\t\t\ttextLayout = {\n\t\t\t\t\t\t\tx: Math.round((node.width - textWidth) / 2),\n\t\t\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t\t\theight: node.height - (2 * nodeTheme.margin)\n\t\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (_.contains(['left', 'right', 'center'], image.position)) {\n\t\t\t\t\ttextLayout.y = Math.round((node.height - textBox.height) / 2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextLayout = {\n\t\t\t\t\tx: Math.round((node.width - textBox.width) / 2),\n\t\t\t\t\ty: nodeTheme.margin,\n\t\t\t\t\twidth: Math.min(textBox.width, node.width - (2 * nodeTheme.margin)),\n\t\t\t\t\theight: node.height - (2 * nodeTheme.margin)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttext: textLayout,\n\t\t\t\timage: imageLayout\n\t\t\t};\n\t\t};\n\t};\n\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/theme-dimension-provider.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/theme-processor.js":
/*!******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/theme-processor.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tcolorParser = __webpack_require__(/*! ./color-parser */ \"./node_modules/mindmup-mapjs-layout/src/color-parser.js\");\nmodule.exports = function ThemeProcessor() {\n\t'use strict';\n\tconst self = this,\n\t\taddPx = function (val) {\n\t\t\treturn val + 'px';\n\t\t},\n\t\tcssProp = {\n\t\t\tcornerRadius: 'border-radius',\n\t\t\t'text.color': 'color',\n\t\t\t'text.margin': 'padding',\n\t\t\tbackground: 'background-color',\n\t\t\tbackgroundColor: 'background-color',\n\t\t\tborder: 'border',\n\t\t\tshadow: 'box-shadow',\n\t\t\t'text.font': 'font',\n\t\t\t'text.alignment': 'text-align'\n\t\t},\n\t\tfontWeightParser = function (fontObj) {\n\t\t\tconst weightMap = {\n\t\t\t\t'light': '200',\n\t\t\t\t'semi-bold': '600'\n\t\t\t};\n\t\t\tif (!fontObj || !fontObj.weight) {\n\t\t\t\treturn 'bold';\n\t\t\t}\n\t\t\treturn weightMap[fontObj.weight] || fontObj.weight;\n\t\t},\n\t\tfontSizeParser = function (fontObj) {\n\t\t\tconst fontSize = (fontObj && fontObj.size) || 12,\n\t\t\t\tlineSpacing = (fontObj && fontObj.lineSpacing) || 3;\n\n\t\t\treturn fontSize + 'pt/' + (lineSpacing + fontSize) + 'pt';\n\t\t},\n\t\tparsers = {\n\t\t\tcornerRadius: addPx,\n\t\t\t'text.margin': addPx,\n\t\t\tbackground: colorParser,\n\t\t\tborder: function (borderOb) {\n\t\t\t\tif (!borderOb.line) {\n\t\t\t\t\treturn '0';\n\t\t\t\t}\n\t\t\t\treturn borderOb.line.width + 'px ' + (borderOb.line.style || 'solid') + ' '  + borderOb.line.color + ';margin:' + (-1 * borderOb.line.width) + 'px';\n\t\t\t},\n\t\t\tshadow: function (shadowArray) {\n\t\t\t\tconst boxshadows = [];\n\t\t\t\tif (shadowArray.length === 1 && shadowArray[0].color === 'transparent') {\n\t\t\t\t\treturn 'none';\n\t\t\t\t}\n\t\t\t\tshadowArray.forEach(function (shadow) {\n\t\t\t\t\tboxshadows.push(shadow.offset.width + 'px ' + shadow.offset.height + 'px ' + shadow.radius + 'px ' + colorParser(shadow));\n\t\t\t\t});\n\t\t\t\treturn boxshadows.join(',');\n\t\t\t},\n\t\t\t'text.font': function (fontObj) {\n\t\t\t\treturn 'normal normal ' + fontWeightParser(fontObj) + ' ' +  fontSizeParser(fontObj) + ' NotoSans, \"Helvetica Neue\", Roboto, Helvetica, Arial, sans-serif';\n\t\t\t}\n\t\t},\n\t\tprocessNodeStyles = function (nodeStyleArray) {\n\t\t\tlet parser, cssVal;\n\t\t\tconst result = [],\n\t\t\t\tpushProperties = function (styleObject, keyPrefix) {\n\t\t\t\t\t_.each(styleObject, function (val, propKey) {\n\t\t\t\t\t\tconst key = (keyPrefix || '') + propKey;\n\t\t\t\t\t\tif (cssProp[key]) {\n\t\t\t\t\t\t\tparser = parsers[key] || _.identity;\n\t\t\t\t\t\t\tcssVal = parser(val);\n\t\t\t\t\t\t\tif (cssVal) {\n\t\t\t\t\t\t\t\tresult.push(cssProp[key]);\n\t\t\t\t\t\t\t\tresult.push(':');\n\t\t\t\t\t\t\t\tresult.push(cssVal);\n\t\t\t\t\t\t\t\tresult.push(';');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (_.isObject(val)) {\n\t\t\t\t\t\t\tpushProperties(val, key + '.');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tappendColorVariants = function (styleSelector, nodeStyle) {\n\t\t\t\t\tif (!nodeStyle.text) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nodeStyle.text.color) {\n\t\t\t\t\t\tresult.push(styleSelector);\n\t\t\t\t\t\tresult.push('.mapjs-node-light{color:');\n\t\t\t\t\t\tresult.push(nodeStyle.text.color);\n\t\t\t\t\t\tresult.push(';}');\n\t\t\t\t\t}\n\t\t\t\t\tif (nodeStyle.text.lightColor) {\n\t\t\t\t\t\tresult.push(styleSelector);\n\t\t\t\t\t\tresult.push('.mapjs-node-dark{color:');\n\t\t\t\t\t\tresult.push(nodeStyle.text.lightColor);\n\t\t\t\t\t\tresult.push(';}');\n\t\t\t\t\t}\n\t\t\t\t\tif (nodeStyle.text.darkColor) {\n\t\t\t\t\t\tresult.push(styleSelector);\n\t\t\t\t\t\tresult.push('.mapjs-node-white{color:');\n\t\t\t\t\t\tresult.push(nodeStyle.text.darkColor);\n\t\t\t\t\t\tresult.push(';}');\n\t\t\t\t\t}\n\n\t\t\t\t},\n\t\t\t\tappendDecorationStyles = function (styleSelector, nodeStyle) {\n\t\t\t\t\tconst style = nodeStyle.decorations,\n\t\t\t\t\t\tmargin = nodeStyle.text && nodeStyle.text.margin || 0;\n\t\t\t\t\tif (!style) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tresult.push(styleSelector);\n\t\t\t\t\tresult.push(' .mapjs-decorations{position:absolute;');\n\t\t\t\t\tif (style.edge === 'top' || style.edge === 'bottom') {\n\t\t\t\t\t\tif (style.position === 'end') {\n\t\t\t\t\t\t\tresult.push('right:0;');\n\t\t\t\t\t\t} else if (style.position === 'start') {\n\t\t\t\t\t\t\tresult.push('left:0;');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.push('left:0;width:100%;text-align:center;');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult.push(style.edge);\n\t\t\t\t\t\tresult.push(':-');\n\t\t\t\t\t\tresult.push (style.overlap ? Math.round(style.height / 2) + margin : style.height);\n\t\t\t\t\t\tresult.push('px;');\n\t\t\t\t\t} else if (style.edge === 'left' || style.edge === 'right') {\n\t\t\t\t\t\tresult.push(style.edge === 'left' ?  'right' : 'left');\n\t\t\t\t\t\tresult.push(':100%;');\n\t\t\t\t\t\tif (style.position === 'end') {\n\t\t\t\t\t\t\tresult.push('bottom:0;');\n\t\t\t\t\t\t} else if (style.position === 'start') {\n\t\t\t\t\t\t\tresult.push('top:0;');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.push('top:calc(50% - ');\n\t\t\t\t\t\t\tresult.push(Math.round(style.height / 2));\n\t\t\t\t\t\t\tresult.push('px);');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresult.push('}');\n\t\t\t\t};\n\t\t\tnodeStyleArray.forEach(function (nodeStyle) {\n\t\t\t\tlet styleSelector = '.mapjs-node';\n\t\t\t\tif (nodeStyle.name !== 'default') {\n\t\t\t\t\tstyleSelector = styleSelector + '.' + nodeStyle.name.replace(/\\s/g, '_');\n\t\t\t\t}\n\t\t\t\tresult.push(styleSelector);\n\t\t\t\tresult.push('{');\n\t\t\t\tpushProperties(nodeStyle);\n\t\t\t\tresult.push('}');\n\n\t\t\t\tappendColorVariants(styleSelector, nodeStyle);\n\t\t\t\tappendDecorationStyles(styleSelector, nodeStyle);\n\t\t\t});\n\t\t\treturn result.join('');\n\t\t};\n\tself.process = function (theme) {\n\t\tlet nodeStyles = '';\n\t\tif (theme.node) {\n\t\t\tnodeStyles = processNodeStyles(theme.node);\n\t\t}\n\t\treturn {\n\t\t\tcss: nodeStyles\n\t\t};\n\t};\n\tself.cssFont = parsers['text.font'];\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/theme-processor.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/theme.js":
/*!********************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/theme.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tcolorParser = __webpack_require__(/*! ./color-parser */ \"./node_modules/mindmup-mapjs-layout/src/color-parser.js\"),\n\tdefaultTheme = __webpack_require__(/*! ./default-theme */ \"./node_modules/mindmup-mapjs-layout/src/default-theme.js\");\nmodule.exports = function Theme(themeJson) {\n\t'use strict';\n\tconst self = this,\n\t\tthemeDictionary = _.extend({}, themeJson),\n\t\tgetElementForPath = function (object, pathArray) {\n\t\t\tlet remaining = pathArray.slice(0),\n\t\t\t\tcurrent = object;\n\n\t\t\twhile (remaining.length > 0) {\n\t\t\t\tcurrent = current[remaining[0]];\n\t\t\t\tif (current === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tremaining = remaining.slice(1);\n\t\t\t}\n\t\t\treturn current;\n\t\t},\n\t\textractElement = function (merged, postfixes, fallback) {\n\t\t\tconst result = getElementForPath(merged, postfixes);\n\t\t\tif (result === undefined) {\n\t\t\t\treturn fallback;\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\tself.getFontForStyles = function (themeStyles) {\n\t\tconst weight = self.attributeValue(['node'], themeStyles, ['text', 'font', 'weight'], 'semibold'),\n\t\t\tsize = self.attributeValue(['node'], themeStyles, ['text', 'font', 'size'], 12),\n\t\t\tlineSpacing = self.attributeValue(['node'], themeStyles, ['text', 'font', 'lineSpacing'], 3.5);\n\t\treturn {size: size, weight: weight, lineGap: lineSpacing};\n\t};\n\tself.getNodeMargin = function (themeStyles) {\n\t\treturn self.attributeValue(['node'], themeStyles, ['text', 'margin'], 5);\n\t};\n\tself.name = themeJson && themeJson.name;\n\tself.blockParentConnectorOverride = themeJson && themeJson.blockParentConnectorOverride;\n\tself.attributeValue = function (prefixes, styles, postfixes, fallback) {\n\t\tconst rootElement = getElementForPath(themeDictionary, prefixes);\n\t\tlet merged = {};\n\t\tif (!rootElement) {\n\t\t\treturn fallback;\n\t\t}\n\t\tif (styles && styles.length) {\n\t\t\tstyles.slice(0).reverse().forEach(function (style) {\n\t\t\t\tmerged = _.extend(merged, rootElement[style]);\n\t\t\t});\n\t\t} else {\n\t\t\tmerged = _.extend({}, rootElement);\n\t\t}\n\t\treturn extractElement(merged, postfixes, fallback);\n\t};\n\tself.nodeStyles = function (nodeLevel, nodeAttr) {\n\t\tconst result = ['level_' + nodeLevel, 'default'];\n\t\tif (nodeAttr && nodeAttr.group) {\n\t\t\tresult.unshift('attr_group');\n\t\t\tif (typeof nodeAttr.group === 'string' || typeof nodeAttr.group === 'number') {\n\t\t\t\tresult.unshift('attr_group_' + nodeAttr.group);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t};\n\tself.nodeTheme = function (styles) {\n\t\tlet merged = {};\n\t\tconst getBackgroundColor = function () {\n\t\t\t\tconst colorObj = getElementForPath(merged, ['background']);\n\t\t\t\tif (colorObj) {\n\t\t\t\t\treturn colorParser(colorObj);\n\t\t\t\t}\n\t\t\t\treturn getElementForPath(merged, ['backgroundColor']);\n\t\t\t},\n\t\t\trootElement = getElementForPath(themeDictionary, ['node']),\n\n\t\t\tresult = {\n\t\t\t\tmargin: 5,\n\t\t\t\tfont: {\n\t\t\t\t\tsize: 12,\n\t\t\t\t\tweight: 'semibold',\n\t\t\t\t\tlineSpacing: 3.5\n\t\t\t\t},\n\t\t\t\tmaxWidth: 146,\n\t\t\t\tbackgroundColor: '#E0E0E0',\n\t\t\t\tborderType: 'surround',\n\t\t\t\tcornerRadius: 5,\n\t\t\t\tlineColor: '#707070',\n\t\t\t\ttext: {\n\t\t\t\t\tcolor: '#4F4F4F',\n\t\t\t\t\tlightColor: '#EEEEEE',\n\t\t\t\t\tdarkColor: '#000000'\n\t\t\t\t}\n\t\t\t};\n\t\tif (!rootElement) {\n\t\t\treturn result;\n\t\t}\n\t\tstyles.slice(0).reverse().forEach(function (style) {\n\t\t\tmerged = _.extend(merged, rootElement[style]);\n\t\t});\n\t\tresult.margin = getElementForPath(merged, ['text', 'margin']) || result.margin;\n\t\tresult.font = _.extend(result.font, getElementForPath(merged, ['text', 'font']));\n\t\tresult.text = _.extend(result.text, getElementForPath(merged, ['text']));\n\t\tresult.borderType = getElementForPath(merged, ['border', 'type']) || result.borderType;\n\t\tresult.backgroundColor = getBackgroundColor() || result.backgroundColor;\n\t\tresult.cornerRadius = getElementForPath(merged, ['cornerRadius']) || result.cornerRadius;\n\t\tresult.lineColor = getElementForPath(merged, ['border', 'line', 'color']) || result.lineColor;\n\t\treturn result;\n\t};\n\n\tself.connectorControlPoint = function (childPosition, connectorStyle) {\n\t\tconst controlPointOffset = childPosition === 'horizontal' ? 1 : 1.75,\n\t\t\tdefaultControlPoint = {'width': 0, 'height': controlPointOffset},\n\t\t\tconfiguredControlPoint = connectorStyle && getElementForPath(themeDictionary, ['connector', connectorStyle, 'controlPoint', childPosition]);\n\n\t\treturn (configuredControlPoint && _.extend({}, configuredControlPoint)) || defaultControlPoint;\n\t};\n\tself.connectorTheme = function (childPosition, childStyles, parentStyles) {\n\t\tconst position = childPosition || 'horizontal',\n\t\t\tchildConnectorStyle = self.attributeValue(['node'], childStyles, ['connections', 'style'], 'default'),\n\t\t\tparentConnectorStyle = parentStyles && self.attributeValue(['node'], parentStyles, ['connections', 'childstyle'], false),\n\t\t\tchildConnector = getElementForPath(themeDictionary, ['connector', childConnectorStyle]),\n\t\t\tparentConnector = parentConnectorStyle && getElementForPath(themeDictionary, ['connector', parentConnectorStyle]),\n\t\t\tcombinedStyle = parentConnectorStyle && (parentConnectorStyle + '.' + childConnectorStyle),\n\t\t\tcombinedConnector = combinedStyle &&  getElementForPath(themeDictionary, ['connector', combinedStyle]),\n\t\t\tconnectorStyle  = (combinedConnector && combinedStyle) || (parentConnector && parentConnectorStyle) || childConnectorStyle || 'default',\n\t\t\tcontrolPoint = self.connectorControlPoint(position, connectorStyle),\n\t\t\tconnectorDefaults = {\n\t\t\t\ttype: 'quadratic',\n\t\t\t\tlabel: defaultTheme.connector.default.label,\n\t\t\t\tline: {\n\t\t\t\t\tcolor: '#707070',\n\t\t\t\t\twidth: 1.0\n\t\t\t\t}\n\t\t\t},\n\t\t\treturnedConnector =  _.extend({}, combinedConnector || parentConnector || childConnector || connectorDefaults);\n\t\tif (!returnedConnector.label) {\n\t\t\treturnedConnector.label = connectorDefaults.label;\n\t\t}\n\t\treturnedConnector.controlPoint = controlPoint;\n\t\treturnedConnector.line = returnedConnector.line || connectorDefaults.line;\n\t\treturn returnedConnector;\n\t};\n\tself.linkTheme = function (linkStyle) {\n\t\tconst fromCurrentTheme = getElementForPath(themeDictionary, ['link', linkStyle || 'default']),\n\t\t\tfromDefaultTheme = defaultTheme.link.default;\n\t\treturn _.extend({}, fromDefaultTheme, fromCurrentTheme);\n\t};\n\tif (themeDictionary && themeDictionary.node && themeDictionary.node.forEach) {\n\t\tthemeDictionary.nodeArray = themeDictionary.node;\n\t\tthemeDictionary.node = {};\n\t\tthemeDictionary.nodeArray.forEach(function (nodeStyle) {\n\t\t\tthemeDictionary.node[nodeStyle.name] = nodeStyle;\n\t\t});\n\t\tdelete themeDictionary.nodeArray;\n\t}\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/theme.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-layout/src/tree.js":
/*!*******************************************************!*\
  !*** ./node_modules/mindmup-mapjs-layout/src/tree.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tisEmptyGroup = __webpack_require__(/*! ./is-empty-group */ \"./node_modules/mindmup-mapjs-layout/src/is-empty-group.js\"),\n\toutlineUtils = __webpack_require__(/*! ./outline */ \"./node_modules/mindmup-mapjs-layout/src/outline.js\"),\n\tTree = function (options) {\n\t\t'use strict';\n\t\t_.extend(this, options);\n\t\tthis.toLayout = function (x, y, parentId) {\n\t\t\tconst result = {\n\t\t\t\t\tnodes: {},\n\t\t\t\t\tconnectors: {}\n\t\t\t\t},\n\t\t\t\tself = _.pick(this, 'id', 'title', 'attr', 'width', 'height', 'level');\n\n\t\t\tx = x || 0;\n\t\t\ty = y || 0;\n\n\n\t\t\tif (self.level === 1) {\n\t\t\t\tself.x = Math.round(-0.5 * this.width);\n\t\t\t\tself.y = Math.round(-0.5 * this.height);\n\t\t\t} else {\n\t\t\t\tself.x = x + this.deltaX || 0;\n\t\t\t\tself.y = y + this.deltaY || 0;\n\t\t\t}\n\t\t\tresult.nodes[this.id] = self;\n\t\t\tif (parentId !== undefined) {\n\t\t\t\tresult.connectors[self.id] = {\n\t\t\t\t\tfrom: parentId,\n\t\t\t\t\tto: self.id\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.subtrees) {\n\t\t\t\tthis.subtrees.forEach(function (t) {\n\t\t\t\t\tconst subLayout = t.toLayout(self.x, self.y, self.id);\n\t\t\t\t\t_.extend(result.nodes, subLayout.nodes);\n\t\t\t\t\t_.extend(result.connectors, subLayout.connectors);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t},\n\tcalculateTree = function (content, dimensionProvider, margin, rankAndParentPredicate, level) {\n\t\t'use strict';\n\t\tconst options = {\n\t\t\t\tid: content.id,\n\t\t\t\ttitle: content.title,\n\t\t\t\tattr: content.attr,\n\t\t\t\tdeltaY: 0,\n\t\t\t\tdeltaX: 0,\n\t\t\t\tlevel: level || 1\n\t\t\t},\n\t\t\tbuildReferenceTree = function (treeArray, dy, oldPositions) {\n\t\t\t\tlet referenceTree, tree;\n\t\t\t\tconst adjustSpacing = function (i) {\n\t\t\t\t\tconst oldSpacing = oldPositions[i].deltaY - oldPositions[i - 1].deltaY,\n\t\t\t\t\t\tnewSpacing = treeArray[i].deltaY - treeArray[i - 1].deltaY;\n\t\t\t\t\tif (newSpacing < oldSpacing) {\n\t\t\t\t\t\ttree.deltaY += oldSpacing - newSpacing;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfor (let i = 0; i < treeArray.length; i += 1) {\n\t\t\t\t\ttree = treeArray[i];\n\t\t\t\t\tif (tree.attr && tree.attr.position) {\n\t\t\t\t\t\ttree.deltaY = tree.attr.position[1];\n\t\t\t\t\t\tif (referenceTree === undefined || tree.attr.position[2] > treeArray[referenceTree].attr.position[2]) {\n\t\t\t\t\t\t\treferenceTree = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttree.deltaY += dy;\n\t\t\t\t\t}\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tadjustSpacing(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn referenceTree;\n\t\t\t},\n\t\t\tsetVerticalSpacing = function (treeArray,  dy) {\n\t\t\t\tconst oldPositions = _.map(treeArray, function (t) {\n\t\t\t\t\t\treturn _.pick(t, 'deltaX', 'deltaY');\n\t\t\t\t\t}),\n\t\t\t\t\treferenceTree = buildReferenceTree (treeArray, dy, oldPositions),\n\t\t\t\t\talignment = referenceTree && (treeArray[referenceTree].attr.position[1] - treeArray[referenceTree].deltaY);\n\t\t\t\tif (alignment) {\n\t\t\t\t\tfor (let i = 0; i < treeArray.length; i += 1) {\n\t\t\t\t\t\ttreeArray[i].deltaY += alignment;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tshouldIncludeSubIdeas = function () {\n\t\t\t\treturn !(_.isEmpty(content.ideas) || (content.attr && content.attr.collapsed));\n\t\t\t},\n\t\t\tincludedSubIdeaKeys = function () {\n\t\t\t\tconst allRanks = _.map(_.keys(content.ideas), parseFloat),\n\t\t\t\t\tcandidateRanks = rankAndParentPredicate ? _.filter(allRanks, function (rank) {\n\t\t\t\t\t\treturn rankAndParentPredicate(rank, content.id);\n\t\t\t\t\t}) : allRanks,\n\t\t\t\t\tincludedRanks = _.filter(candidateRanks, function (rank) {\n\t\t\t\t\t\treturn !isEmptyGroup(content.ideas[rank]);\n\t\t\t\t\t});\n\t\t\t\treturn _.sortBy(includedRanks, Math.abs);\n\t\t\t},\n\t\t\tincludedSubIdeas = function () {\n\t\t\t\tconst result = [];\n\t\t\t\t_.each(includedSubIdeaKeys(), function (key) {\n\t\t\t\t\tresult.push(content.ideas[key]);\n\t\t\t\t});\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tnodeDimensions = dimensionProvider(content, options.level),\n\t\t\tappendSubtrees = function (subtrees) {\n\t\t\t\tlet suboutline, deltaHeight, subtreePosition, horizontal, treeOutline;\n\t\t\t\t_.each(subtrees, function (subtree) {\n\t\t\t\t\tsubtree.deltaX = nodeDimensions.width + margin;\n\t\t\t\t\tsubtreePosition = subtree.attr && subtree.attr.position && subtree.attr.position[0];\n\t\t\t\t\tif (subtreePosition && subtreePosition > subtree.deltaX) {\n\t\t\t\t\t\thorizontal = subtreePosition - subtree.deltaX;\n\t\t\t\t\t\tsubtree.deltaX = subtreePosition;\n\t\t\t\t\t} else {\n\t\t\t\t\t\thorizontal = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (!suboutline) {\n\t\t\t\t\t\tsuboutline = subtree.outline.indent(horizontal, margin);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttreeOutline = subtree.outline.indent(horizontal, margin);\n\t\t\t\t\t\tdeltaHeight = treeOutline.initialHeight();\n\t\t\t\t\t\tsuboutline = treeOutline.stackBelow(suboutline, margin);\n\t\t\t\t\t\tsubtree.deltaY = Math.round(suboutline.initialHeight() - deltaHeight / 2 - subtree.height / 2);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (subtrees && subtrees.length) {\n\t\t\t\t\tsetVerticalSpacing(subtrees, Math.round(0.5 * (nodeDimensions.height  - suboutline.initialHeight())));\n\t\t\t\t\tsuboutline = suboutline.expand(\n\t\t\t\t\t\tMath.round(subtrees[0].deltaY - nodeDimensions.height * 0.5),\n\t\t\t\t\t\tMath.round(subtrees[subtrees.length - 1].deltaY + subtrees[subtrees.length - 1].height - nodeDimensions.height * 0.5)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\toptions.outline = suboutline.insertAtStart(nodeDimensions, margin);\n\t\t\t};\n\t\t_.extend(options, nodeDimensions);\n\t\toptions.outline = outlineUtils.outlineFromDimensions(nodeDimensions);\n\t\tif (shouldIncludeSubIdeas()) {\n\t\t\toptions.subtrees = _.map(includedSubIdeas(), function (i) {\n\t\t\t\treturn calculateTree(i, dimensionProvider, margin, rankAndParentPredicate, options.level + 1);\n\t\t\t});\n\t\t\tif (!_.isEmpty(options.subtrees)) {\n\t\t\t\tappendSubtrees(options.subtrees);\n\t\t\t}\n\t\t}\n\t\treturn new Tree(options);\n\t};\n\nmodule.exports = {\n\tTree: Tree,\n\tcalculateTree: calculateTree\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-layout/src/tree.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/index.js":
/*!***************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/index.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nmodule.exports = {\n\tURLHelper: __webpack_require__(/*! ./src/url-helper */ \"./node_modules/mindmup-mapjs-model/src/url-helper.js\"),\n\tsortedSubIdeas: __webpack_require__(/*! ./src/sorted-sub-ideas */ \"./node_modules/mindmup-mapjs-model/src/sorted-sub-ideas.js\"),\n\ttraverse: __webpack_require__(/*! ./src/traverse */ \"./node_modules/mindmup-mapjs-model/src/traverse.js\"),\n\tformattedNodeTitle: __webpack_require__(/*! ./src/formatted-node-title */ \"./node_modules/mindmup-mapjs-model/src/formatted-node-title.js\"),\n\tcontentUpgrade: __webpack_require__(/*! ./src/content-upgrade */ \"./node_modules/mindmup-mapjs-model/src/content-upgrade.js\"),\n\tcontent: __webpack_require__(/*! ./src/content */ \"./node_modules/mindmup-mapjs-model/src/content.js\"),\n\tobservable: __webpack_require__(/*! ./src/observable */ \"./node_modules/mindmup-mapjs-model/src/observable.js\")\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/index.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/content-upgrade.js":
/*!*****************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/content-upgrade.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function contentUpgrade(content) {\n\t'use strict';\n\tconst upgradeV2 = function () {\n\t\t\tconst doUpgrade = function (idea) {\n\t\t\t\tlet collapsed;\n\t\t\t\tif (idea.style) {\n\t\t\t\t\tidea.attr = {};\n\t\t\t\t\tcollapsed = idea.style.collapsed;\n\t\t\t\t\tdelete idea.style.collapsed;\n\t\t\t\t\tidea.attr.style = idea.style;\n\t\t\t\t\tif (collapsed) {\n\t\t\t\t\t\tidea.attr.collapsed = collapsed;\n\t\t\t\t\t}\n\t\t\t\t\tdelete idea.style;\n\t\t\t\t}\n\t\t\t\tif (idea.ideas) {\n\t\t\t\t\t_.each(idea.ideas, doUpgrade);\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (content.formatVersion && content.formatVersion >= 2) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdoUpgrade(content);\n\t\t\tcontent.formatVersion = 2;\n\t\t},\n\t\tupgradeV3 = function () {\n\t\t\tconst doUpgrade = function () {\n\t\t\t\tconst rootAttrKeys = ['theme', 'measurements-config', 'storyboards', 'progress-statuses'],\n\t\t\t\t\toldRootAttr = (content && content.attr) || {},\n\t\t\t\t\tnewRootAttr = _.pick(oldRootAttr, rootAttrKeys),\n\t\t\t\t\tnewRootNodeAttr = _.omit(oldRootAttr, rootAttrKeys),\n\t\t\t\t\tfirstLevel = (content && content.ideas),\n\t\t\t\t\tnewRoot = {\n\t\t\t\t\t\tid: content.id,\n\t\t\t\t\t\ttitle: content.title,\n\t\t\t\t\t\tattr: newRootNodeAttr\n\t\t\t\t\t};\n\t\t\t\tif (firstLevel) {\n\t\t\t\t\tnewRoot.ideas = firstLevel;\n\t\t\t\t}\n\t\t\t\tcontent.id = 'root';\n\t\t\t\tcontent.ideas = {\n\t\t\t\t\t1: newRoot\n\t\t\t\t};\n\t\t\t\tdelete content.title;\n\t\t\t\tcontent.attr = newRootAttr;\n\t\t\t};\n\t\t\tif (content.formatVersion && content.formatVersion >= 3) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdoUpgrade();\n\t\t\tcontent.formatVersion = 3;\n\t\t};\n\n\tupgradeV2();\n\tupgradeV3();\n\treturn content;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/content-upgrade.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/content.js":
/*!*********************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/content.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*jshint loopfunc:true */\n/*global module, require*/\nconst _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n\tobservable = __webpack_require__(/*! ./observable */ \"./node_modules/mindmup-mapjs-model/src/observable.js\"),\n\tcontentUpgrade = __webpack_require__(/*! ./content-upgrade */ \"./node_modules/mindmup-mapjs-model/src/content-upgrade.js\");\nmodule.exports = function content(contentAggregate, sessionKey) {\n\t'use strict';\n\tlet cachedId,\n\t\tconfiguration = {},\n\t\tisRedoInProgress = false;\n\tconst invalidateIdCache = function () {\n\t\t\tcachedId = undefined;\n\t\t},\n\t\tmaxId = function maxId(idea) {\n\t\t\tidea = idea || contentAggregate;\n\t\t\tif (!idea.ideas) {\n\t\t\t\treturn parseInt(idea.id, 10) || 0;\n\t\t\t}\n\t\t\treturn _.reduce(\n\t\t\t\tidea.ideas,\n\t\t\t\tfunction (result, subidea) {\n\t\t\t\t\treturn Math.max(result, maxId(subidea));\n\t\t\t\t},\n\t\t\t\tparseInt(idea.id, 10) || 0\n\t\t\t);\n\t\t},\n\t\tnextId = function nextId(originSession) {\n\t\t\toriginSession = originSession || sessionKey;\n\t\t\tif (!cachedId) {\n\t\t\t\tcachedId =  maxId();\n\t\t\t}\n\t\t\tcachedId += 1;\n\t\t\tif (originSession) {\n\t\t\t\treturn cachedId + '.' + originSession;\n\t\t\t}\n\t\t\treturn cachedId;\n\t\t},\n\t\tinit = function (contentIdea, originSession) {\n\t\t\tconst initOfRoot = contentIdea.id === contentAggregate.id;\n\t\t\tif (!contentIdea.id) {\n\t\t\t\tcontentIdea.id = nextId(originSession);\n\t\t\t} else {\n\t\t\t\tinvalidateIdCache();\n\t\t\t}\n\t\t\tif (contentIdea.ideas) {\n\t\t\t\t_.each(contentIdea.ideas, function (value, key) {\n\t\t\t\t\tif (!initOfRoot && value.attr && value.attr.group && _.isEmpty(value.ideas)) {\n\t\t\t\t\t\tdelete contentIdea.ideas[key];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontentIdea.ideas[parseFloat(key)] = init(value, originSession);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!contentIdea.title) {\n\t\t\t\tcontentIdea.title = '';\n\t\t\t}\n\t\t\tcontentIdea.containsDirectChild = contentIdea.findChildRankById = function (childIdeaId) {\n\t\t\t\treturn parseFloat(\n\t\t\t\t\t_.reduce(\n\t\t\t\t\t\tcontentIdea.ideas,\n\t\t\t\t\t\tfunction (res, value, key) {\n\t\t\t\t\t\t\treturn value.id == childIdeaId ? key : res; //eslint-disable-line eqeqeq\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t};\n\t\t\tcontentIdea.findSubIdeaById = function (childIdeaId) {\n\t\t\t\tconst myChild = _.find(contentIdea.ideas, function (idea) {\n\t\t\t\t\treturn idea.id == childIdeaId; //eslint-disable-line eqeqeq\n\t\t\t\t});\n\t\t\t\treturn myChild || _.reduce(contentIdea.ideas, function (result, idea) {\n\t\t\t\t\treturn result || idea.findSubIdeaById(childIdeaId);\n\t\t\t\t}, undefined);\n\t\t\t};\n\t\t\tcontentIdea.isEmptyGroup = function () {\n\t\t\t\treturn !contentAggregate.isRootNode(contentIdea.id) && contentIdea.attr && contentIdea.attr.group && _.isEmpty(contentIdea.ideas);\n\t\t\t};\n\t\t\tcontentIdea.find = function (predicate) {\n\t\t\t\tconst current = predicate(contentIdea) ? [_.pick(contentIdea, 'id', 'title')] : [];\n\t\t\t\tif (_.size(contentIdea.ideas) === 0) {\n\t\t\t\t\treturn current;\n\t\t\t\t}\n\t\t\t\treturn _.reduce(contentIdea.ideas, function (result, idea) {\n\t\t\t\t\treturn _.union(result, idea.find(predicate));\n\t\t\t\t}, current);\n\t\t\t};\n\t\t\tcontentIdea.getAttr = function (name) {\n\t\t\t\tif (contentIdea.attr && contentIdea.attr[name]) {\n\t\t\t\t\treturn _.clone(contentIdea.attr[name]);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\t\t\tcontentIdea.sortedSubIdeas = function () {\n\t\t\t\tconst result = [],\n\t\t\t\t\tchildKeys = contentIdea.ideas && _.groupBy(_.map(_.keys(contentIdea.ideas), parseFloat), function (key) {\n\t\t\t\t\t\treturn key > 0;\n\t\t\t\t\t}),\n\t\t\t\t\tsortedChildKeys = childKeys && _.sortBy(childKeys[true], Math.abs).concat(_.sortBy(childKeys[false], Math.abs)); //eslint-disable-line dot-notation\n\n\t\t\t\tif (!contentIdea.ideas) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t_.each(sortedChildKeys, function (key) {\n\t\t\t\t\tresult.push(contentIdea.ideas[key]);\n\t\t\t\t});\n\t\t\t\treturn result;\n\t\t\t};\n\t\t\tcontentIdea.traverse = function (iterator, postOrder) {\n\t\t\t\tif (!postOrder && contentIdea !== contentAggregate) {\n\t\t\t\t\titerator(contentIdea);\n\t\t\t\t}\n\t\t\t\t_.each(contentIdea.sortedSubIdeas(), function (subIdea) {\n\t\t\t\t\tsubIdea.traverse(iterator, postOrder);\n\t\t\t\t});\n\t\t\t\tif (postOrder && contentIdea !== contentAggregate) {\n\t\t\t\t\titerator(contentIdea);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn contentIdea;\n\t\t},\n\t\tmaxKey = function (kvMap, sign) {\n\t\t\tlet currentKeys = [];\n\t\t\tsign = sign || 1;\n\t\t\tif (_.size(kvMap) === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tcurrentKeys = _.keys(kvMap);\n\t\t\tcurrentKeys.push(0); /* ensure at least 0 is there for negative ranks */\n\t\t\treturn _.max(_.map(currentKeys, parseFloat), function (x) {\n\t\t\t\treturn x * sign;\n\t\t\t});\n\t\t},\n\t\tisRootNode = function (id) {\n\t\t\treturn !!_.find(contentAggregate.ideas, function (idea) {\n\t\t\t\treturn idea.id === id;\n\t\t\t});\n\t\t},\n\t\tnextChildRank = function (parentIdea) {\n\t\t\tlet newRank = 0, counts = 0, childRankSign = 1;\n\t\t\tif (isRootNode(parentIdea.id)) {\n\t\t\t\tcounts = _.countBy(parentIdea.ideas, function (v, k) {\n\t\t\t\t\treturn k < 0;\n\t\t\t\t});\n\t\t\t\tif ((counts['true'] || 0) < counts['false']) { //eslint-disable-line dot-notation\n\t\t\t\t\tchildRankSign = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewRank = maxKey(parentIdea.ideas, childRankSign) + childRankSign;\n\t\t\treturn newRank;\n\t\t},\n\t\tappendSubIdea = function (parentIdea, subIdea) {\n\t\t\tlet rank = 0;\n\t\t\tparentIdea.ideas = parentIdea.ideas || {};\n\t\t\trank = nextChildRank(parentIdea);\n\t\t\tparentIdea.ideas[rank] = subIdea;\n\t\t\treturn rank;\n\t\t},\n\t\tfindIdeaById = function (ideaId) {\n\t\t\treturn contentAggregate.id == ideaId ? contentAggregate : contentAggregate.findSubIdeaById(ideaId); //eslint-disable-line eqeqeq\n\t\t},\n\t\tsameSideSiblingRanks = function (parentIdea, ideaRank) {\n\t\t\treturn _(_.map(_.keys(parentIdea.ideas), parseFloat)).reject(function (k) {\n\t\t\t\treturn k * ideaRank < 0;\n\t\t\t});\n\t\t},\n\t\tsign = function (number) {\n\t\t\t/* intentionally not returning 0 case, to help with split sorting into 2 groups */\n\t\t\treturn number < 0 ? -1 : 1;\n\t\t},\n\t\teventStacks = {},\n\t\tredoStacks = {},\n\n\t\tbatches = {},\n\t\tnotifyChange = function (method, args, originSession) {\n\t\t\tif (originSession) {\n\t\t\t\tcontentAggregate.dispatchEvent('changed', method, args, originSession);\n\t\t\t} else {\n\t\t\t\tcontentAggregate.dispatchEvent('changed', method, args);\n\t\t\t}\n\t\t},\n\t\tlogChange = function (method, args, undofunc, originSession) {\n\t\t\tconst event = {eventMethod: method, eventArgs: args, undoFunction: undofunc};\n\t\t\tif (batches[originSession]) {\n\t\t\t\tbatches[originSession].push(event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!eventStacks[originSession]) {\n\t\t\t\teventStacks[originSession] = [];\n\t\t\t}\n\t\t\teventStacks[originSession].push(event);\n\n\t\t\tif (isRedoInProgress) {\n\t\t\t\tcontentAggregate.dispatchEvent('changed', 'redo', undefined, originSession);\n\t\t\t} else {\n\t\t\t\tnotifyChange(method, args, originSession);\n\t\t\t\tredoStacks[originSession] = [];\n\t\t\t}\n\t\t},\n\t\tappendChange = function (method, args, undofunc, originSession) {\n\t\t\tconst executeOutsideBatch = function () {\n\t\t\t\tconst prev = eventStacks[originSession].pop();\n\t\t\t\tif (prev.eventMethod === 'batch') {\n\t\t\t\t\teventStacks[originSession].push({\n\t\t\t\t\t\teventMethod: 'batch',\n\t\t\t\t\t\teventArgs: prev.eventArgs.concat([[method].concat(args)]),\n\t\t\t\t\t\tundoFunction: function () {\n\t\t\t\t\t\t\tundofunc();\n\t\t\t\t\t\t\tprev.undoFunction();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\teventStacks[originSession].push({\n\t\t\t\t\t\teventMethod: 'batch',\n\t\t\t\t\t\teventArgs: [[prev.eventMethod].concat(prev.eventArgs)].concat([[method].concat(args)]),\n\t\t\t\t\t\tundoFunction: function () {\n\t\t\t\t\t\t\tundofunc();\n\t\t\t\t\t\t\tprev.undoFunction();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (isRedoInProgress) {\n\t\t\t\t\tcontentAggregate.dispatchEvent('changed', 'redo', undefined, originSession);\n\t\t\t\t} else {\n\t\t\t\t\tnotifyChange(method, args, originSession);\n\t\t\t\t\tredoStacks[originSession] = [];\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (method === 'batch' || batches[originSession] || !eventStacks || !eventStacks[originSession] || eventStacks[originSession].length === 0) {\n\t\t\t\tlogChange(method, args, undofunc, originSession);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\texecuteOutsideBatch();\n\t\t\t}\n\t\t},\n\t\treorderChild = function (parentIdea, newRank, oldRank) {\n\t\t\tconst undoFunction = function () {\n\t\t\t\tif (parentIdea.ideas[oldRank] || !parentIdea.ideas[newRank]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tparentIdea.ideas[oldRank] = parentIdea.ideas[newRank];\n\t\t\t\tdelete parentIdea.ideas[newRank];\n\t\t\t};\n\t\t\tparentIdea.ideas[newRank] = parentIdea.ideas[oldRank];\n\t\t\tdelete parentIdea.ideas[oldRank];\n\t\t\treturn undoFunction;\n\t\t},\n\t\tsessionFromId = function (id) {\n\t\t\tconst dotIndex = String(id).indexOf('.');\n\t\t\treturn dotIndex > 0 && id.substr(dotIndex + 1);\n\t\t},\n\t\tcommandProcessors = {},\n\n\t\tuniqueResourcePostfix = '/xxxxxxxx-yxxx-yxxx-yxxx-xxxxxxxxxxxx/'.replace(/[xy]/g, function (c) {\n\t\t\tconst r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);\n\t\t\treturn v.toString(16);\n\t\t}) + (sessionKey || ''),\n\t\tupdateAttr = function (object, attrName, attrValue) {\n\t\t\tconst oldAttr = object && _.extend({}, object.attr);\n\t\t\tif (!object) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tobject.attr = _.extend({}, object.attr);\n\t\t\tif (!attrValue || attrValue === 'false' || (_.isObject(attrValue) && _.isEmpty(attrValue))) {\n\t\t\t\tif (!object.attr[attrName]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tdelete object.attr[attrName];\n\t\t\t} else {\n\t\t\t\tif (_.isEqual(object.attr[attrName], attrValue)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tobject.attr[attrName] = JSON.parse(JSON.stringify(attrValue));\n\t\t\t}\n\t\t\tif (_.size(object.attr) === 0) {\n\t\t\t\tdelete object.attr;\n\t\t\t}\n\t\t\treturn function () {\n\t\t\t\tobject.attr = oldAttr;\n\t\t\t};\n\t\t},\n\t\tfindLinkBetween = function (ideaIdFrom, ideaIdTo) {\n\t\t\treturn _.find(\n\t\t\t\tcontentAggregate.links,\n\t\t\t\tfunction (link) {\n\t\t\t\t\treturn (link.ideaIdFrom === ideaIdFrom && link.ideaIdTo === ideaIdTo) || (link.ideaIdFrom === ideaIdTo && link.ideaIdTo === ideaIdFrom);\n\t\t\t\t});\n\t\t},\n\t\tisLinkValid = function (ideaIdFrom, ideaIdTo) {\n\t\t\tconst ideaFrom = findIdeaById(ideaIdFrom),\n\t\t\t\tideaTo = findIdeaById(ideaIdTo),\n\t\t\t\tisParentChild = ideaFrom && ideaTo && (\n\t\t\t\t\t_.find(ideaFrom.ideas, function (node) {\n\t\t\t\t\t\treturn node.id === ideaIdTo;\n\t\t\t\t\t}) ||\n\t\t\t\t\t_.find(ideaTo.ideas, function (node) {\n\t\t\t\t\t\treturn node.id === ideaIdFrom;\n\t\t\t\t\t})\n\t\t\t\t);\n\n\t\t\tif (ideaIdFrom === ideaIdTo) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!ideaFrom) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!ideaTo) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (isParentChild) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tfindLinkDirectional = function (ideaIdFrom, ideaIdTo) {\n\t\t\treturn _.find(\n\t\t\t\tcontentAggregate.links,\n\t\t\t\tfunction (link) {\n\t\t\t\t\treturn link.ideaIdFrom == ideaIdFrom && link.ideaIdTo == ideaIdTo; //eslint-disable-line eqeqeq\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\n\tcontentAggregate.setConfiguration = function (config) {\n\t\tconfiguration = config || {};\n\t};\n\tcontentAggregate.getSessionKey = function () {\n\t\treturn sessionKey;\n\t};\n\tcontentAggregate.nextSiblingId = function (subIdeaId) {\n\t\tconst parentIdea = contentAggregate.findParent(subIdeaId),\n\t\t\tcurrentRank = parentIdea && parentIdea.findChildRankById(subIdeaId),\n\t\t\tcandidateSiblingRanks = currentRank && sameSideSiblingRanks(parentIdea, currentRank),\n\t\t\tsiblingsAfter = candidateSiblingRanks && _.reject(candidateSiblingRanks, function (k) {\n\t\t\t\treturn Math.abs(k) <= Math.abs(currentRank);\n\t\t\t});\n\n\t\tif (!parentIdea) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (siblingsAfter.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parentIdea.ideas[_.min(siblingsAfter, Math.abs)].id;\n\t};\n\tcontentAggregate.sameSideSiblingIds = function (subIdeaId) {\n\t\tconst parentIdea = contentAggregate.findParent(subIdeaId),\n\t\t\tcurrentRank = parentIdea.findChildRankById(subIdeaId);\n\t\treturn _.without(_.map(_.pick(parentIdea.ideas, sameSideSiblingRanks(parentIdea, currentRank)), function (i) {\n\t\t\treturn i.id;\n\t\t}), subIdeaId);\n\t};\n\tcontentAggregate.getAttrById = function (ideaId, attrName) {\n\t\tconst idea = findIdeaById(ideaId);\n\t\treturn idea && idea.getAttr(attrName);\n\t};\n\tcontentAggregate.previousSiblingId = function (subIdeaId) {\n\t\tconst parentIdea = contentAggregate.findParent(subIdeaId),\n\t\t\tcurrentRank = parentIdea && parentIdea.findChildRankById(subIdeaId),\n\t\t\tcandidateSiblingRanks = currentRank && sameSideSiblingRanks(parentIdea, currentRank),\n\t\t\tsiblingsBefore = candidateSiblingRanks && _.reject(candidateSiblingRanks, function (k) {\n\t\t\t\treturn Math.abs(k) >= Math.abs(currentRank);\n\t\t\t});\n\n\t\tif (!parentIdea) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (siblingsBefore.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parentIdea.ideas[_.max(siblingsBefore, Math.abs)].id;\n\t};\n\tcontentAggregate.clone = function (subIdeaId) {\n\t\tconst toClone = (subIdeaId && subIdeaId != contentAggregate.id && contentAggregate.findSubIdeaById(subIdeaId)) || contentAggregate; //eslint-disable-line eqeqeq\n\t\treturn JSON.parse(JSON.stringify(toClone));\n\t};\n\tcontentAggregate.cloneMultiple = function (subIdeaIdArray) {\n\t\treturn _.map(subIdeaIdArray, contentAggregate.clone);\n\t};\n\tcontentAggregate.calculatePath = function (ideaId, currentPath, potentialParent) {\n\t\tif (contentAggregate.isRootNode(ideaId)) {\n\t\t\treturn [];\n\t\t}\n\t\tcurrentPath = currentPath || [contentAggregate];\n\t\tpotentialParent = potentialParent || contentAggregate;\n\t\tif (potentialParent.containsDirectChild(ideaId)) {\n\t\t\treturn currentPath;\n\t\t}\n\t\treturn _.reduce(\n\t\t\tpotentialParent.ideas,\n\t\t\tfunction (result, child) {\n\t\t\t\treturn result || contentAggregate.calculatePath(ideaId, [child].concat(currentPath), child);\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t};\n\tcontentAggregate.getSubTreeIds = function (rootIdeaId) {\n\t\tconst result = [],\n\t\t\tcollectIds = function (idea) {\n\t\t\t\tif (_.isEmpty(idea.ideas)) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t\t_.each(idea.sortedSubIdeas(), function (child) {\n\t\t\t\t\tcollectIds(child);\n\t\t\t\t\tresult.push(child.id);\n\t\t\t\t});\n\t\t\t};\n\t\tcollectIds(contentAggregate.findSubIdeaById(rootIdeaId) || contentAggregate);\n\t\treturn result;\n\t};\n\tcontentAggregate.findParent = function (subIdeaId, parentIdea) {\n\t\tparentIdea = parentIdea || contentAggregate;\n\t\tif (contentAggregate.isRootNode(subIdeaId)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (parentIdea.containsDirectChild(subIdeaId)) {\n\t\t\treturn parentIdea;\n\t\t}\n\t\treturn _.reduce(\n\t\t\tparentIdea.ideas,\n\t\t\tfunction (result, child) {\n\t\t\t\treturn result || contentAggregate.findParent(subIdeaId, child);\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t};\n\n\t/**** aggregate command processing methods ****/\n\tcontentAggregate.isBatchActive = function (originSession) {\n\t\tconst activeSession = originSession || sessionKey;\n\t\treturn !!batches[activeSession];\n\t};\n\tcontentAggregate.startBatch = function (originSession) {\n\t\tconst activeSession = originSession || sessionKey;\n\t\tcontentAggregate.endBatch(originSession);\n\t\tbatches[activeSession] = [];\n\t};\n\tcontentAggregate.discardBatch = function (originSession) {\n\t\tconst activeSession = originSession || sessionKey;\n\t\tbatches[activeSession] = undefined;\n\t};\n\tcontentAggregate.endBatch = function (originSession) {\n\t\tconst activeSession = originSession || sessionKey,\n\t\t\tinBatch = batches[activeSession],\n\t\t\tperformBatchOperations = function () {\n\t\t\t\tconst batchArgs = _.map(inBatch, function (event) {\n\t\t\t\t\t\treturn [event.eventMethod].concat(event.eventArgs);\n\t\t\t\t\t}),\n\t\t\t\t\tbatchUndoFunctions = _.sortBy(\n\t\t\t\t\t\t_.map(inBatch, function (event) {\n\t\t\t\t\t\t\treturn event.undoFunction;\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tfunction (f, idx) {\n\t\t\t\t\t\t\treturn -1 * idx;\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tundo = function () {\n\t\t\t\t\t\t_.each(batchUndoFunctions, function (eventUndo) {\n\t\t\t\t\t\t\teventUndo();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\tlogChange('batch', batchArgs, undo, activeSession);\n\t\t\t};\n\n\t\tbatches[activeSession] = undefined;\n\t\tif (_.isEmpty(inBatch)) {\n\t\t\treturn;\n\t\t}\n\t\tif (_.size(inBatch) === 1) {\n\t\t\tlogChange(inBatch[0].eventMethod, inBatch[0].eventArgs, inBatch[0].undoFunction, activeSession);\n\t\t} else {\n\t\t\tperformBatchOperations();\n\t\t}\n\t};\n\tcontentAggregate.execCommand = function (cmd, args, originSession) {\n\t\tif (!commandProcessors[cmd]) {\n\t\t\treturn false;\n\t\t}\n\t\treturn commandProcessors[cmd].apply(contentAggregate, [originSession || sessionKey].concat(_.toArray(args)));\n\t};\n\n\tcontentAggregate.batch = function (batchOp) {\n\t\tconst hasActiveBatch = contentAggregate.isBatchActive();\n\t\tlet results;\n\t\tif (!hasActiveBatch) {\n\t\t\tcontentAggregate.startBatch();\n\t\t}\n\t\ttry {\n\t\t\tresults = batchOp();\n\t\t} catch (e) {\n\t\t\tif (!hasActiveBatch) {\n\t\t\t\tcontentAggregate.discardBatch();\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t\tif (!hasActiveBatch) {\n\t\t\tcontentAggregate.endBatch();\n\t\t}\n\t\treturn results;\n\t};\n\n\tcommandProcessors.batch = function (originSession) {\n\t\tcontentAggregate.startBatch(originSession);\n\t\ttry {\n\t\t\t_.each(_.toArray(arguments).slice(1), function (event) {\n\t\t\t\tcontentAggregate.execCommand(event[0], event.slice(1), originSession);\n\t\t\t});\n\t\t} finally {\n\t\t\tcontentAggregate.endBatch(originSession);\n\t\t}\n\t};\n\tcontentAggregate.pasteMultiple = function (parentIdeaId, jsonArrayToPaste) {\n\t\treturn contentAggregate.batch(function () {\n\t\t\treturn _.map(jsonArrayToPaste, function (json) {\n\t\t\t\treturn contentAggregate.paste(parentIdeaId, json);\n\t\t\t});\n\t\t});\n\t};\n\n\tcontentAggregate.paste = function (/*parentIdeaId, jsonToPaste, initialId*/) {\n\t\treturn contentAggregate.execCommand('paste', arguments);\n\t};\n\tcommandProcessors.paste = function (originSession, parentIdeaId, jsonToPaste, initialId) {\n\t\tconst pasteParent = (parentIdeaId == contentAggregate.id) ?  contentAggregate : contentAggregate.findSubIdeaById(parentIdeaId), //eslint-disable-line eqeqeq\n\t\t\tcleanUp = function (json) {\n\t\t\t\tconst result =  _.omit(json, 'ideas', 'id', 'attr');\n\t\t\t\tlet index = 1, childKeys, sortedChildKeys;\n\t\t\t\tresult.attr = _.omit(json.attr, configuration.nonClonedAttributes);\n\t\t\t\tif (_.isEmpty(result.attr)) {\n\t\t\t\t\tdelete result.attr;\n\t\t\t\t}\n\t\t\t\tif (json.ideas) {\n\t\t\t\t\tchildKeys = _.groupBy(_.map(_.keys(json.ideas), parseFloat), function (key) {\n\t\t\t\t\t\treturn key > 0;\n\t\t\t\t\t});\n\t\t\t\t\tsortedChildKeys = _.sortBy(childKeys[true], Math.abs).concat(_.sortBy(childKeys[false], Math.abs)); //eslint-disable-line dot-notation\n\t\t\t\t\tresult.ideas = {};\n\t\t\t\t\t_.each(sortedChildKeys, function (key) {\n\t\t\t\t\t\tresult.ideas[index++] = cleanUp(json.ideas[key]); // eslint-disable-line no-plusplus\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};\n\n\t\tlet newIdea = undefined, newRank = 0;\n\n\t\tif (initialId) {\n\t\t\tcachedId = parseInt(initialId, 10) - 1;\n\t\t}\n\t\tnewIdea =  jsonToPaste && (jsonToPaste.title || jsonToPaste.attr) && init(cleanUp(jsonToPaste), sessionFromId(initialId));\n\t\tif (!pasteParent || !newIdea) {\n\t\t\treturn false;\n\t\t}\n\t\tnewRank = appendSubIdea(pasteParent, newIdea);\n\t\tif (initialId) {\n\t\t\tinvalidateIdCache();\n\t\t}\n\t\tupdateAttr(newIdea, 'position');\n\t\tlogChange('paste', [parentIdeaId, jsonToPaste, newIdea.id], function () {\n\t\t\tdelete pasteParent.ideas[newRank];\n\t\t}, originSession);\n\t\treturn newIdea.id;\n\t};\n\tcontentAggregate.flip = function (/*ideaId*/) {\n\t\treturn contentAggregate.execCommand('flip', arguments);\n\t};\n\tcommandProcessors.flip = function (originSession, ideaId) {\n\t\tconst parentIdea = contentAggregate.findParent(ideaId),\n\t\t\tcurrentRank = parentIdea && contentAggregate.isRootNode(parentIdea.id) &&  parentIdea.findChildRankById(ideaId),\n\t\t\tperformFlip = function () {\n\t\t\t\tconst maxRank = maxKey(parentIdea.ideas, -1 * sign(currentRank)),\n\t\t\t\t\tnewRank = maxRank - 10 * sign(currentRank),\n\t\t\t\t\tundoFunction = reorderChild(parentIdea, newRank, currentRank);\n\t\t\t\tlogChange('flip', [ideaId], undoFunction, originSession);\n\t\t\t};\n\t\tif (!currentRank) {\n\t\t\treturn false;\n\t\t}\n\t\tperformFlip();\n\t\treturn true;\n\t};\n\tcontentAggregate.initialiseTitle = function (/*ideaId, title*/) {\n\t\treturn contentAggregate.execCommand('initialiseTitle', arguments);\n\t};\n\tcommandProcessors.initialiseTitle = function (originSession, ideaId, title) {\n\t\tconst idea = findIdeaById(ideaId),\n\t\t\toriginalTitle = idea && idea.title;\n\n\t\tif (!idea) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (originalTitle === title) {\n\t\t\treturn false;\n\t\t}\n\t\tidea.title = title;\n\t\tappendChange('initialiseTitle', [ideaId, title], function () {\n\t\t\tidea.title = originalTitle;\n\t\t}, originSession);\n\t\treturn true;\n\t};\n\tcontentAggregate.updateTitle = function (/*ideaId, title*/) {\n\t\treturn contentAggregate.execCommand('updateTitle', arguments);\n\t};\n\tcommandProcessors.updateTitle = function (originSession, ideaId, title) {\n\t\tconst idea = findIdeaById(ideaId),\n\t\t\toriginalTitle = idea && idea.title;\n\t\tif (!idea) {\n\t\t\treturn false;\n\t\t}\n\t\tif (originalTitle === title) {\n\t\t\treturn false;\n\t\t}\n\t\tidea.title = title;\n\t\tlogChange('updateTitle', [ideaId, title], function () {\n\t\t\tidea.title = originalTitle;\n\t\t}, originSession);\n\t\treturn true;\n\t};\n\tcontentAggregate.addSubIdea = function (/*parentId, ideaTitle, optionalNewId*/) {\n\t\treturn contentAggregate.execCommand('addSubIdea', arguments);\n\t};\n\tcommandProcessors.addSubIdea = function (originSession, parentId, ideaTitle, optionalNewId) {\n\t\tconst parent = findIdeaById(parentId),\n\t\t\tperformAdd = function () {\n\t\t\t\tconst idea = init({\n\t\t\t\t\t\ttitle: ideaTitle,\n\t\t\t\t\t\tid: optionalNewId\n\t\t\t\t\t}),\n\t\t\t\t\tnewRank = appendSubIdea(parent, idea);\n\t\t\t\tlogChange('addSubIdea', [parentId, ideaTitle, idea.id], function () {\n\t\t\t\t\tdelete parent.ideas[newRank];\n\t\t\t\t}, originSession);\n\t\t\t\treturn idea.id;\n\t\t\t};\n\t\tif (!parent) {\n\t\t\treturn false;\n\t\t}\n\t\tif (optionalNewId && findIdeaById(optionalNewId)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn performAdd();\n\t};\n\tcontentAggregate.removeMultiple = function (subIdeaIdArray) {\n\t\tlet results = false;\n\t\tcontentAggregate.startBatch();\n\t\tresults = _.map(subIdeaIdArray, contentAggregate.removeSubIdea);\n\t\tcontentAggregate.endBatch();\n\t\treturn results;\n\t};\n\tcontentAggregate.removeSubIdea = function (/*subIdeaId*/) {\n\t\treturn contentAggregate.execCommand('removeSubIdea', arguments);\n\t};\n\tcommandProcessors.removeSubIdea = function (originSession, subIdeaId) {\n\t\tconst canRemove = function () {\n\t\t\t\treturn !contentAggregate.isRootNode(subIdeaId) || _.size(contentAggregate.ideas) > 1;\n\t\t\t},\n\t\t\tperformRemove = function () {\n\t\t\t\tconst parent = contentAggregate.findParent(subIdeaId) || contentAggregate,\n\t\t\t\t\toldRank = parent && parent.findChildRankById(subIdeaId),\n\t\t\t\t\toldIdea = parent && parent.ideas[oldRank],\n\t\t\t\t\toldLinks = contentAggregate.links,\n\t\t\t\t\tremovedNodeIds = {};\n\n\n\t\t\t\tif (!oldRank) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\toldIdea.traverse((traversed)=> removedNodeIds[traversed.id] = true);\n\t\t\t\tdelete parent.ideas[oldRank];\n\n\t\t\t\tcontentAggregate.links = _.reject(contentAggregate.links, function (link) {\n\t\t\t\t\treturn removedNodeIds[link.ideaIdFrom]  || removedNodeIds[link.ideaIdTo];\n\t\t\t\t});\n\t\t\t\tlogChange('removeSubIdea', [subIdeaId], function () {\n\t\t\t\t\tparent.ideas[oldRank] = oldIdea;\n\t\t\t\t\tcontentAggregate.links = oldLinks;\n\t\t\t\t}, originSession);\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\tif (!canRemove()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn performRemove();\n\t};\n\tcontentAggregate.insertIntermediateMultiple = function (idArray, ideaOptions) {\n\t\treturn contentAggregate.batch(function () {\n\t\t\tconst newId = contentAggregate.insertIntermediate(idArray[0], ideaOptions && ideaOptions.title);\n\t\t\tif (ideaOptions && ideaOptions.attr) {\n\t\t\t\tObject.keys(ideaOptions.attr).forEach(function (key) {\n\t\t\t\t\tcontentAggregate.updateAttr(newId, key, ideaOptions.attr[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t\t_.each(idArray.slice(1), function (id) {\n\t\t\t\tcontentAggregate.changeParent(id, newId);\n\t\t\t});\n\t\t\treturn newId;\n\t\t});\n\t};\n\tcontentAggregate.insertIntermediate = function (/*inFrontOfIdeaId, title, optionalNewId*/) {\n\t\treturn contentAggregate.execCommand('insertIntermediate', arguments);\n\t};\n\tcommandProcessors.insertIntermediate = function (originSession, inFrontOfIdeaId, title, optionalNewId) {\n\t\tconst parentIdea = contentAggregate.isRootNode(inFrontOfIdeaId) ? contentAggregate : contentAggregate.findParent(inFrontOfIdeaId),\n\t\t\tchildRank = parentIdea && parentIdea.findChildRankById(inFrontOfIdeaId),\n\t\t\tcanInsert = function () {\n\t\t\t\tif (contentAggregate.id == inFrontOfIdeaId) { //eslint-disable-line eqeqeq\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (!parentIdea) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (optionalNewId && findIdeaById(optionalNewId)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (!childRank) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tperformInsert = function () {\n\t\t\t\tconst oldIdea = parentIdea.ideas[childRank],\n\t\t\t\t\tnewIdea = init({\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tid: optionalNewId\n\t\t\t\t\t});\n\n\t\t\t\tparentIdea.ideas[childRank] = newIdea;\n\t\t\t\tnewIdea.ideas = {\n\t\t\t\t\t1: oldIdea\n\t\t\t\t};\n\t\t\t\tlogChange('insertIntermediate', [inFrontOfIdeaId, title, newIdea.id], function () {\n\t\t\t\t\tparentIdea.ideas[childRank] = oldIdea;\n\t\t\t\t}, originSession);\n\t\t\t\treturn newIdea.id;\n\t\t\t};\n\n\t\tif (!canInsert()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn performInsert();\n\n\t};\n\tcontentAggregate.changeParent = function (/*ideaId, newParentId*/) {\n\t\treturn contentAggregate.execCommand('changeParent', arguments);\n\t};\n\tcommandProcessors.changeParent = function (originSession, ideaId, newParentId) {\n\t\tconst parent = findIdeaById(newParentId),\n\t\t\tidea = contentAggregate.findSubIdeaById(ideaId),\n\t\t\toldParent = contentAggregate.isRootNode(ideaId) ? contentAggregate : contentAggregate.findParent(ideaId),\n\t\t\tcanChangeParent = function () {\n\t\t\t\tif (ideaId == newParentId) { // eslint-disable-line eqeqeq\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (!parent) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (!idea) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (idea.findSubIdeaById(newParentId)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (parent.containsDirectChild(ideaId)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (!oldParent) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tperformChangeParent = function () {\n\t\t\t\tconst oldRank = oldParent.findChildRankById(ideaId),\n\t\t\t\t\tnewRank = appendSubIdea(parent, idea),\n\t\t\t\t\toldPosition = idea.getAttr('position');\n\n\t\t\t\tupdateAttr(idea, 'position');\n\t\t\t\tdelete oldParent.ideas[oldRank];\n\t\t\t\tlogChange('changeParent', [ideaId, newParentId], function () {\n\t\t\t\t\tupdateAttr(idea, 'position', oldPosition);\n\t\t\t\t\toldParent.ideas[oldRank] = idea;\n\t\t\t\t\tdelete parent.ideas[newRank];\n\t\t\t\t}, originSession);\n\t\t\t};\n\t\tif (!canChangeParent()) {\n\t\t\treturn false;\n\t\t}\n\t\tperformChangeParent();\n\t\treturn true;\n\t};\n\tcontentAggregate.mergeAttrProperty = function (ideaId, attrName, attrPropertyName, attrPropertyValue) {\n\t\tlet val = contentAggregate.getAttrById(ideaId, attrName) || {};\n\t\tif (attrPropertyValue) {\n\t\t\tval[attrPropertyName] = attrPropertyValue;\n\t\t} else {\n\t\t\tdelete val[attrPropertyName];\n\t\t}\n\t\tif (_.isEmpty(val)) {\n\t\t\tval = false;\n\t\t}\n\t\treturn contentAggregate.updateAttr(ideaId, attrName, val);\n\t};\n\tcontentAggregate.updateAttr = function (/*ideaId, attrName, attrValue*/) {\n\t\treturn contentAggregate.execCommand('updateAttr', arguments);\n\t};\n\tcommandProcessors.updateAttr = function (originSession, ideaId, attrName, attrValue) {\n\t\tconst idea = findIdeaById(ideaId),\n\t\t\tundoAction = updateAttr(idea, attrName, attrValue);\n\t\tif (undoAction) {\n\t\t\tlogChange('updateAttr', [ideaId, attrName, attrValue], undoAction, originSession);\n\t\t}\n\t\treturn !!undoAction;\n\t};\n\tcontentAggregate.getOrderedSiblingRanks = function (ideaId, options) {\n\t\tconst parentIdea = contentAggregate.findParent(ideaId),\n\t\t\tcurrentRank = parentIdea && parentIdea.findChildRankById(ideaId);\n\t\tif (!currentRank) {\n\t\t\treturn false;\n\t\t}\n\t\tif (options && options.ignoreRankSide) {\n\t\t\treturn _.sortBy(_.map(_.keys(parentIdea.ideas), parseFloat));\n\t\t} else {\n\t\t\treturn _.sortBy(sameSideSiblingRanks(parentIdea, currentRank), Math.abs);\n\t\t}\n\t};\n\tcontentAggregate.moveRelative = function (ideaId, relativeMovement, options) {\n\t\tconst parentIdea = contentAggregate.findParent(ideaId),\n\t\t\tcurrentRank = parentIdea && parentIdea.findChildRankById(ideaId),\n\t\t\tsiblingRanks = contentAggregate.getOrderedSiblingRanks(ideaId, options),\n\t\t\tcurrentIndex = siblingRanks && siblingRanks.indexOf(currentRank),\n\t\t\tcalcNewIndex = function () {\n\t\t\t\tlet calcIndex = currentIndex + (relativeMovement > 0 ? relativeMovement + 1 : relativeMovement);\n\t\t\t\tif (options && options.ignoreRankSide) {\n\t\t\t\t\tif (currentRank < 0) {\n\t\t\t\t\t\tcalcIndex = currentIndex + (relativeMovement < 0 ? relativeMovement - 1 : relativeMovement);\n\t\t\t\t\t\tif (siblingRanks[calcIndex] > 0) {\n\t\t\t\t\t\t\tcalcIndex = calcIndex + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (siblingRanks[calcIndex] < 0) {\n\t\t\t\t\t\tcalcIndex = calcIndex - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn calcIndex;\n\n\t\t\t},\n\t\t\t/* we call positionBefore, so movement down is actually 2 spaces, not 1 */\n\t\t\tnewIndex = calcNewIndex(),\n\t\t\tbeforeRank = newIndex >= 0 && siblingRanks && siblingRanks.length && siblingRanks[newIndex],\n\t\t\tbeforeSibling = beforeRank && parentIdea && parentIdea.ideas[beforeRank],\n\t\t\tshouldNotPosition = function () {\n\t\t\t\tif (!parentIdea) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (options && options.ignoreRankSide && currentRank < 0) {\n\t\t\t\t\treturn newIndex\t> (siblingRanks.length - 1);\n\t\t\t\t}\n\t\t\t\treturn (newIndex < 0);\n\t\t\t};\n\t\tlet result = false;\n\t\tif (shouldNotPosition()) {\n\t\t\treturn false;\n\t\t}\n\t\tcontentAggregate.startBatch();\n\t\t//handle reordering on top down maps where moving from positive to negative or vice versa\n\t\tif (options && options.ignoreRankSide && beforeRank && beforeSibling && ((beforeRank * currentRank) < 0)) {\n\t\t\tcontentAggregate.flip(ideaId);\n\t\t}\n\t\tresult =  contentAggregate.positionBefore(ideaId, beforeSibling && beforeSibling.id, parentIdea);\n\t\tcontentAggregate.endBatch();\n\t\treturn result;\n\t};\n\tcontentAggregate.positionBefore = function (/*ideaId, positionBeforeIdeaId, parentIdea*/) {\n\t\treturn contentAggregate.execCommand('positionBefore', arguments);\n\t};\n\tcommandProcessors.positionBefore = function (originSession, ideaId, positionBeforeIdeaId, parentIdeaArg) {\n\t\tlet newRank, afterRank, siblingRanks, candidateSiblings, beforeRank, maxRank, undoFunction = undefined;\n\t\tconst parentIdea = parentIdeaArg || contentAggregate.findParent(ideaId),\n\t\t\tcurrentRank = parentIdea && parentIdea.findChildRankById(ideaId);\n\n\t\tif (!parentIdea) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (ideaId == positionBeforeIdeaId) { //eslint-disable-line eqeqeq\n\t\t\treturn false;\n\t\t}\n\t\tnewRank = 0;\n\t\tif (positionBeforeIdeaId) {\n\t\t\tafterRank = parentIdea.findChildRankById(positionBeforeIdeaId);\n\t\t\tif (!afterRank) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tsiblingRanks = sameSideSiblingRanks(parentIdea, afterRank);\n\t\t\tcandidateSiblings = _.reject(_.sortBy(siblingRanks, Math.abs), function (k) {\n\t\t\t\treturn Math.abs(k) >= Math.abs(afterRank);\n\t\t\t});\n\t\t\tbeforeRank = candidateSiblings.length > 0 ? _.max(candidateSiblings, Math.abs) : 0;\n\t\t\tif (beforeRank == currentRank) { //eslint-disable-line eqeqeq\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tnewRank = beforeRank + (afterRank - beforeRank) / 2;\n\t\t} else {\n\t\t\tmaxRank = maxKey(parentIdea.ideas, currentRank < 0 ? -1 : 1);\n\t\t\tif (maxRank == currentRank) { //eslint-disable-line eqeqeq\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tnewRank = maxRank + 10 * (currentRank < 0 ? -1 : 1);\n\t\t}\n\t\tif (newRank == currentRank) { //eslint-disable-line eqeqeq\n\t\t\treturn false;\n\t\t}\n\t\tundoFunction = reorderChild(parentIdea, newRank, currentRank);\n\t\tlogChange('positionBefore', [ideaId, positionBeforeIdeaId], undoFunction, originSession);\n\t\treturn true;\n\t};\n\n\tcontentAggregate.addLink = function (/*ideaIdFrom, ideaIdTo*/) {\n\t\treturn contentAggregate.execCommand('addLink', arguments);\n\t};\n\tcommandProcessors.addLink = function (originSession, ideaIdFrom, ideaIdTo) {\n\t\tconst link = {\n\t\t\tideaIdFrom: ideaIdFrom,\n\t\t\tideaIdTo: ideaIdTo,\n\t\t\tattr: {\n\t\t\t\tstyle: {\n\t\t\t\t\tcolor: '#FF0000',\n\t\t\t\t\tlineStyle: 'dashed'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (!isLinkValid(ideaIdFrom, ideaIdTo)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (findLinkBetween(ideaIdFrom, ideaIdTo)) {\n\t\t\treturn false;\n\t\t}\n\t\tcontentAggregate.links = contentAggregate.links || [];\n\t\tcontentAggregate.links.push(link);\n\t\tlogChange('addLink', [ideaIdFrom, ideaIdTo], function () {\n\t\t\tcontentAggregate.links.pop();\n\t\t}, originSession);\n\t\treturn true;\n\t};\n\tcontentAggregate.removeLink = function (/*ideaIdOne, ideaIdTwo*/) {\n\t\treturn contentAggregate.execCommand('removeLink', arguments);\n\t};\n\tcommandProcessors.removeLink = function (originSession, ideaIdOne, ideaIdTwo) {\n\t\tlet i = 0, link;\n\n\t\twhile (contentAggregate.links && i < contentAggregate.links.length) {\n\t\t\tlink = contentAggregate.links[i];\n\t\t\tif (link.ideaIdFrom === ideaIdOne && link.ideaIdTo === ideaIdTwo) { //eslint-disable-line eqeqeq\n\t\t\t\tcontentAggregate.links.splice(i, 1);\n\t\t\t\tlogChange('removeLink', [ideaIdOne, ideaIdTwo], function () {\n\t\t\t\t\tcontentAggregate.links.push(_.clone(link));\n\t\t\t\t}, originSession);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\treturn false;\n\t};\n\tcontentAggregate.getLinkAttr = function (ideaIdFrom, ideaIdTo, name) {\n\t\tconst link = findLinkDirectional(ideaIdFrom, ideaIdTo);\n\t\tif (link && link.attr && link.attr[name]) {\n\t\t\treturn link.attr[name];\n\t\t}\n\t\treturn false;\n\t};\n\tcontentAggregate.updateLinkAttr = function (/*ideaIdFrom, ideaIdTo, attrName, attrValue*/) {\n\t\treturn contentAggregate.execCommand('updateLinkAttr', arguments);\n\t};\n\tcommandProcessors.updateLinkAttr = function (originSession, ideaIdFrom, ideaIdTo, attrName, attrValue) {\n\t\tconst link = findLinkDirectional(ideaIdFrom, ideaIdTo),\n\t\t\tundoAction = updateAttr(link, attrName, attrValue);\n\t\tif (undoAction) {\n\t\t\tlogChange('updateLinkAttr', [ideaIdFrom, ideaIdTo, attrName, attrValue], undoAction, originSession);\n\t\t}\n\t\treturn !!undoAction;\n\t};\n\n\t/* undo/redo */\n\tcontentAggregate.canUndo = function () {\n\t\treturn !!(eventStacks[sessionKey] && eventStacks[sessionKey].length > 0);\n\t};\n\tcontentAggregate.canRedo = function () {\n\t\treturn !!(redoStacks[sessionKey] && redoStacks[sessionKey].length > 0);\n\t};\n\tcontentAggregate.undo = function () {\n\t\treturn contentAggregate.execCommand('undo', arguments);\n\t};\n\tcommandProcessors.undo = function (originSession) {\n\t\tlet topEvent = false;\n\t\tcontentAggregate.endBatch();\n\t\ttopEvent = eventStacks[originSession] && eventStacks[originSession].pop();\n\t\tif (topEvent && topEvent.undoFunction) {\n\t\t\ttopEvent.undoFunction();\n\t\t\tif (!redoStacks[originSession]) {\n\t\t\t\tredoStacks[originSession] = [];\n\t\t\t}\n\t\t\tredoStacks[originSession].push(topEvent);\n\t\t\tcontentAggregate.dispatchEvent('changed', 'undo', [], originSession);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tcontentAggregate.redo = function () {\n\t\treturn contentAggregate.execCommand('redo', arguments);\n\t};\n\tcommandProcessors.redo = function (originSession) {\n\t\tlet topEvent = false;\n\t\tcontentAggregate.endBatch();\n\t\ttopEvent = redoStacks[originSession] && redoStacks[originSession].pop();\n\t\tif (topEvent) {\n\t\t\tisRedoInProgress = true;\n\t\t\tcontentAggregate.execCommand(topEvent.eventMethod, topEvent.eventArgs, originSession);\n\t\t\tisRedoInProgress = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\tcontentAggregate.storeResource = function (/*resourceBody, optionalKey*/) {\n\t\treturn contentAggregate.execCommand('storeResource', arguments);\n\t};\n\tcommandProcessors.storeResource = function (originSession, resourceBody, optionalKey) {\n\t\tconst maxIdForSession = function () {\n\t\t\t\tconst keys = _.keys(contentAggregate.resources),\n\t\t\t\t\tfilteredKeys = sessionKey ? _.filter(keys, RegExp.prototype.test.bind(new RegExp('\\\\/' + sessionKey + '$'))) : keys,\n\t\t\t\t\tintKeys = _.map(filteredKeys, function (string) {\n\t\t\t\t\t\treturn parseInt(string, 10);\n\t\t\t\t\t});\n\t\t\t\treturn _.isEmpty(intKeys) ? 0 : _.max(intKeys);\n\t\t\t},\n\t\t\tnextResourceId = function () {\n\t\t\t\tconst intId = maxIdForSession() + 1;\n\t\t\t\treturn intId + uniqueResourcePostfix;\n\t\t\t},\n\t\t\tgetExistingResourceId = function () {\n\t\t\t\tif (!optionalKey && contentAggregate.resources) {\n\t\t\t\t\treturn _.find(_.keys(contentAggregate.resources), function (key) {\n\t\t\t\t\t\treturn contentAggregate.resources[key] === resourceBody;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tstoreNewResource = function () {\n\t\t\t\tconst id = optionalKey || nextResourceId();\n\t\t\t\tcontentAggregate.resources = contentAggregate.resources || {};\n\t\t\t\tcontentAggregate.resources[id] = resourceBody;\n\t\t\t\tcontentAggregate.dispatchEvent('resourceStored', resourceBody, id, originSession);\n\t\t\t\treturn id;\n\t\t\t};\n\n\t\treturn getExistingResourceId() || storeNewResource();\n\t};\n\tcontentAggregate.getResource = function (id) {\n\t\treturn contentAggregate.resources && contentAggregate.resources[id];\n\t};\n\tcontentAggregate.hasSiblings = function (id) {\n\t\tconst parent = contentAggregate.findParent(id);\n\n\t\tif (contentAggregate.isRootNode(id)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent && _.size(parent.ideas) > 1;\n\t};\n\tcontentAggregate.isRootNode = function (id) {\n\t\treturn isRootNode(id);\n\t};\n\tcontentAggregate.getDefaultRootId = function () {\n\t\tconst rootNodes = contentAggregate && _.values(contentAggregate.ideas);\n\t\treturn rootNodes && rootNodes.length && rootNodes[0].id;\n\t};\n\n\tcontentUpgrade(contentAggregate);\n\tobservable(contentAggregate);\n\tinit(contentAggregate);\n\treturn contentAggregate;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/content.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/formatted-node-title.js":
/*!**********************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/formatted-node-title.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nconst urlHelper = __webpack_require__(/*! ./url-helper */ \"./node_modules/mindmup-mapjs-model/src/url-helper.js\"),\n\tremoveLinks = function (nodeTitle, maxUrlLength) {\n\t\t'use strict';\n\t\tconst strippedTitle = nodeTitle && urlHelper.stripLink(nodeTitle);\n\t\tif (!nodeTitle) {\n\t\t\treturn '';\n\t\t}\n\t\tif (strippedTitle.trim() === '') {\n\t\t\treturn (!maxUrlLength || (nodeTitle.length < maxUrlLength) ? nodeTitle : (nodeTitle.substring(0, maxUrlLength) + '...'));\n\t\t}  else {\n\t\t\treturn strippedTitle;\n\t\t}\n\t},\n\tremoveExtraSpaces = function (nodeTitle) {\n\t\t'use strict';\n\t\treturn nodeTitle.replace(/[ \\t]+/g, ' ');\n\t},\n\ttrimLines = function (nodeTitle) {\n\t\t'use strict';\n\t\treturn nodeTitle.replace(/\\r/g, '').split('\\n').map(line => line.trim()).join('\\n');\n\t};\nmodule.exports = function (nodeTitle, maxUrlLength) {\n\t'use strict';\n\treturn trimLines(removeExtraSpaces(removeLinks(nodeTitle, maxUrlLength)));\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/formatted-node-title.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/observable.js":
/*!************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/observable.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module, console*/\nmodule.exports = function observable(base) {\n\t'use strict';\n\tlet listeners = [];\n\tbase.addEventListener = function (types, listener, priority) {\n\t\ttypes.split(' ').forEach(function (type) {\n\t\t\tif (type) {\n\t\t\t\tlisteners.push({\n\t\t\t\t\ttype: type,\n\t\t\t\t\tlistener: listener,\n\t\t\t\t\tpriority: priority || 0\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\tbase.listeners = function (type) {\n\t\treturn listeners.filter(function (listenerDetails) {\n\t\t\treturn listenerDetails.type === type;\n\t\t}).map(function (listenerDetails) {\n\t\t\treturn listenerDetails.listener;\n\t\t});\n\t};\n\tbase.removeEventListener = function (type, listener) {\n\t\tlisteners = listeners.filter(function (details) {\n\t\t\treturn details.listener !== listener;\n\t\t});\n\t};\n\tbase.dispatchEvent = function (type) {\n\t\tconst args = Array.prototype.slice.call(arguments, 1);\n\t\tlisteners\n\t\t\t.filter(function (listenerDetails) {\n\t\t\t\treturn listenerDetails.type === type;\n\t\t\t})\n\t\t\t.sort(function (firstListenerDetails, secondListenerDetails) {\n\t\t\t\treturn secondListenerDetails.priority - firstListenerDetails.priority;\n\t\t\t})\n\t\t\t.some(function (listenerDetails) {\n\t\t\t\ttry {\n\t\t\t\t\treturn listenerDetails.listener.apply(undefined, args) === false;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.log('dispatchEvent failed', e, listenerDetails);\n\t\t\t\t}\n\n\t\t\t});\n\t};\n\treturn base;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/observable.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/sorted-sub-ideas.js":
/*!******************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/sorted-sub-ideas.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nconst positive = function positive(key) {\n\t\t'use strict';\n\t\treturn key >= 0;\n\t},\n\tnegative = function negative(key) {\n\t\t'use strict';\n\t\treturn !positive(key);\n\t},\n\tabsCompare = function (a, b) {\n\t\t'use strict';\n\t\treturn Math.abs(a) - Math.abs(b);\n\t},\n\tsafeSort = function (contentIdea) {\n\t\t'use strict';\n\t\tconst childKeys = Object.keys(contentIdea.ideas).map(parseFloat),\n\t\t\tsortedChildKeys = childKeys.filter(positive).sort(absCompare).concat(childKeys.filter(negative).sort(absCompare));\n\t\treturn sortedChildKeys.map(function (key) {\n\t\t\treturn contentIdea.ideas[key];\n\t\t});\n\t};\nmodule.exports = function sortedSubIdeas(contentIdea) {\n\t'use strict';\n\n\tif (!contentIdea.ideas) {\n\t\treturn [];\n\t}\n\treturn safeSort(contentIdea);\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/sorted-sub-ideas.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/traverse.js":
/*!**********************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/traverse.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nconst sortedSubIdeas = __webpack_require__(/*! ./sorted-sub-ideas */ \"./node_modules/mindmup-mapjs-model/src/sorted-sub-ideas.js\");\nmodule.exports = function traverse(contentIdea, iterator, postOrder, level) {\n\t'use strict';\n\tconst isSingleRootMap = !level && (!contentIdea.formatVersion || contentIdea.formatVersion < 3);\n\tlevel = level || (isSingleRootMap ? 1 : 0);\n\tif (!postOrder && (isSingleRootMap || level)) {\n\t\titerator(contentIdea, level);\n\t}\n\tsortedSubIdeas(contentIdea).forEach(function (subIdea) {\n\t\ttraverse(subIdea, iterator, postOrder, level + 1);\n\t});\n\tif (postOrder && (isSingleRootMap || level)) {\n\t\titerator(contentIdea, level);\n\t}\n};\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/traverse.js?");

/***/ }),

/***/ "./node_modules/mindmup-mapjs-model/src/url-helper.js":
/*!************************************************************!*\
  !*** ./node_modules/mindmup-mapjs-model/src/url-helper.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nconst URLHelper = function () {\n\t'use strict';\n\tconst self = this,\n\t\turlPattern = /(https?:\\/\\/|www\\.)[\\w-]+(\\.[\\w-]+)+([\\w\\(\\)\\u0080-\\u00FF.,!@?^=%&amp;:\\/~+#-]*[\\w\\(\\)\\u0080-\\u00FF!@?^=%&amp;\\/~+#-])?/i;\n\n\tself.containsLink = function (text) {\n\t\treturn urlPattern.test(text);\n\t};\n\n\tself.getLink  = function (text) {\n\t\tlet url = text && text.match(urlPattern);\n\t\tif (url && url[0]) {\n\t\t\turl = url[0];\n\t\t\tif (!/https?:\\/\\//i.test(url)) {\n\t\t\t\turl = 'http://' + url;\n\t\t\t}\n\t\t}\n\t\treturn url;\n\t};\n\n\tself.stripLink  = function (text) {\n\t\tif (!text) {\n\t\t\treturn '';\n\t\t}\n\t\treturn text.replace(urlPattern, '').trim();\n\t};\n};\n\nmodule.exports = new URLHelper();\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mindmup-mapjs-model/src/url-helper.js?");

/***/ }),

/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
/*!**************************************************!*\
  !*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var map = {\n\t\"./af\": \"./node_modules/moment/locale/af.js\",\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\n\t\"./ar\": \"./node_modules/moment/locale/ar.js\",\n\t\"./ar-dz\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-dz.js\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-kw\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-kw.js\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-ly\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ly.js\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ma\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-ma.js\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-sa\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-sa.js\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-tn\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar-tn.js\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar.js\": \"./node_modules/moment/locale/ar.js\",\n\t\"./az\": \"./node_modules/moment/locale/az.js\",\n\t\"./az.js\": \"./node_modules/moment/locale/az.js\",\n\t\"./be\": \"./node_modules/moment/locale/be.js\",\n\t\"./be.js\": \"./node_modules/moment/locale/be.js\",\n\t\"./bg\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bg.js\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bm\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bm.js\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bn\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bn-bd\": \"./node_modules/moment/locale/bn-bd.js\",\n\t\"./bn-bd.js\": \"./node_modules/moment/locale/bn-bd.js\",\n\t\"./bn.js\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bo\": \"./node_modules/moment/locale/bo.js\",\n\t\"./bo.js\": \"./node_modules/moment/locale/bo.js\",\n\t\"./br\": \"./node_modules/moment/locale/br.js\",\n\t\"./br.js\": \"./node_modules/moment/locale/br.js\",\n\t\"./bs\": \"./node_modules/moment/locale/bs.js\",\n\t\"./bs.js\": \"./node_modules/moment/locale/bs.js\",\n\t\"./ca\": \"./node_modules/moment/locale/ca.js\",\n\t\"./ca.js\": \"./node_modules/moment/locale/ca.js\",\n\t\"./cs\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cs.js\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cv\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cv.js\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cy\": \"./node_modules/moment/locale/cy.js\",\n\t\"./cy.js\": \"./node_modules/moment/locale/cy.js\",\n\t\"./da\": \"./node_modules/moment/locale/da.js\",\n\t\"./da.js\": \"./node_modules/moment/locale/da.js\",\n\t\"./de\": \"./node_modules/moment/locale/de.js\",\n\t\"./de-at\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-at.js\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-ch\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de-ch.js\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de.js\": \"./node_modules/moment/locale/de.js\",\n\t\"./dv\": \"./node_modules/moment/locale/dv.js\",\n\t\"./dv.js\": \"./node_modules/moment/locale/dv.js\",\n\t\"./el\": \"./node_modules/moment/locale/el.js\",\n\t\"./el.js\": \"./node_modules/moment/locale/el.js\",\n\t\"./en-au\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-au.js\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-ca\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-ca.js\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-gb\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-gb.js\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-ie\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-ie.js\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-il\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-il.js\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-in\": \"./node_modules/moment/locale/en-in.js\",\n\t\"./en-in.js\": \"./node_modules/moment/locale/en-in.js\",\n\t\"./en-nz\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./en-nz.js\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./en-sg\": \"./node_modules/moment/locale/en-sg.js\",\n\t\"./en-sg.js\": \"./node_modules/moment/locale/en-sg.js\",\n\t\"./eo\": \"./node_modules/moment/locale/eo.js\",\n\t\"./eo.js\": \"./node_modules/moment/locale/eo.js\",\n\t\"./es\": \"./node_modules/moment/locale/es.js\",\n\t\"./es-do\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-do.js\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-mx\": \"./node_modules/moment/locale/es-mx.js\",\n\t\"./es-mx.js\": \"./node_modules/moment/locale/es-mx.js\",\n\t\"./es-us\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es-us.js\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es.js\": \"./node_modules/moment/locale/es.js\",\n\t\"./et\": \"./node_modules/moment/locale/et.js\",\n\t\"./et.js\": \"./node_modules/moment/locale/et.js\",\n\t\"./eu\": \"./node_modules/moment/locale/eu.js\",\n\t\"./eu.js\": \"./node_modules/moment/locale/eu.js\",\n\t\"./fa\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fa.js\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fi\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fi.js\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fil\": \"./node_modules/moment/locale/fil.js\",\n\t\"./fil.js\": \"./node_modules/moment/locale/fil.js\",\n\t\"./fo\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fo.js\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fr\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fr-ca\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ca.js\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ch\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr-ch.js\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr.js\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fy\": \"./node_modules/moment/locale/fy.js\",\n\t\"./fy.js\": \"./node_modules/moment/locale/fy.js\",\n\t\"./ga\": \"./node_modules/moment/locale/ga.js\",\n\t\"./ga.js\": \"./node_modules/moment/locale/ga.js\",\n\t\"./gd\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gd.js\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gl\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gl.js\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gom-deva\": \"./node_modules/moment/locale/gom-deva.js\",\n\t\"./gom-deva.js\": \"./node_modules/moment/locale/gom-deva.js\",\n\t\"./gom-latn\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gom-latn.js\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gu\": \"./node_modules/moment/locale/gu.js\",\n\t\"./gu.js\": \"./node_modules/moment/locale/gu.js\",\n\t\"./he\": \"./node_modules/moment/locale/he.js\",\n\t\"./he.js\": \"./node_modules/moment/locale/he.js\",\n\t\"./hi\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hi.js\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hr\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hr.js\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hu\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hu.js\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hy-am\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./hy-am.js\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./id\": \"./node_modules/moment/locale/id.js\",\n\t\"./id.js\": \"./node_modules/moment/locale/id.js\",\n\t\"./is\": \"./node_modules/moment/locale/is.js\",\n\t\"./is.js\": \"./node_modules/moment/locale/is.js\",\n\t\"./it\": \"./node_modules/moment/locale/it.js\",\n\t\"./it-ch\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it-ch.js\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it.js\": \"./node_modules/moment/locale/it.js\",\n\t\"./ja\": \"./node_modules/moment/locale/ja.js\",\n\t\"./ja.js\": \"./node_modules/moment/locale/ja.js\",\n\t\"./jv\": \"./node_modules/moment/locale/jv.js\",\n\t\"./jv.js\": \"./node_modules/moment/locale/jv.js\",\n\t\"./ka\": \"./node_modules/moment/locale/ka.js\",\n\t\"./ka.js\": \"./node_modules/moment/locale/ka.js\",\n\t\"./kk\": \"./node_modules/moment/locale/kk.js\",\n\t\"./kk.js\": \"./node_modules/moment/locale/kk.js\",\n\t\"./km\": \"./node_modules/moment/locale/km.js\",\n\t\"./km.js\": \"./node_modules/moment/locale/km.js\",\n\t\"./kn\": \"./node_modules/moment/locale/kn.js\",\n\t\"./kn.js\": \"./node_modules/moment/locale/kn.js\",\n\t\"./ko\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ko.js\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ku\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ku.js\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ky\": \"./node_modules/moment/locale/ky.js\",\n\t\"./ky.js\": \"./node_modules/moment/locale/ky.js\",\n\t\"./lb\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lb.js\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lo\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lo.js\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lt\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lt.js\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lv\": \"./node_modules/moment/locale/lv.js\",\n\t\"./lv.js\": \"./node_modules/moment/locale/lv.js\",\n\t\"./me\": \"./node_modules/moment/locale/me.js\",\n\t\"./me.js\": \"./node_modules/moment/locale/me.js\",\n\t\"./mi\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mi.js\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mk\": \"./node_modules/moment/locale/mk.js\",\n\t\"./mk.js\": \"./node_modules/moment/locale/mk.js\",\n\t\"./ml\": \"./node_modules/moment/locale/ml.js\",\n\t\"./ml.js\": \"./node_modules/moment/locale/ml.js\",\n\t\"./mn\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mn.js\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mr\": \"./node_modules/moment/locale/mr.js\",\n\t\"./mr.js\": \"./node_modules/moment/locale/mr.js\",\n\t\"./ms\": \"./node_modules/moment/locale/ms.js\",\n\t\"./ms-my\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms-my.js\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms.js\": \"./node_modules/moment/locale/ms.js\",\n\t\"./mt\": \"./node_modules/moment/locale/mt.js\",\n\t\"./mt.js\": \"./node_modules/moment/locale/mt.js\",\n\t\"./my\": \"./node_modules/moment/locale/my.js\",\n\t\"./my.js\": \"./node_modules/moment/locale/my.js\",\n\t\"./nb\": \"./node_modules/moment/locale/nb.js\",\n\t\"./nb.js\": \"./node_modules/moment/locale/nb.js\",\n\t\"./ne\": \"./node_modules/moment/locale/ne.js\",\n\t\"./ne.js\": \"./node_modules/moment/locale/ne.js\",\n\t\"./nl\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nl-be\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl-be.js\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl.js\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nn\": \"./node_modules/moment/locale/nn.js\",\n\t\"./nn.js\": \"./node_modules/moment/locale/nn.js\",\n\t\"./oc-lnc\": \"./node_modules/moment/locale/oc-lnc.js\",\n\t\"./oc-lnc.js\": \"./node_modules/moment/locale/oc-lnc.js\",\n\t\"./pa-in\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pa-in.js\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pl\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pl.js\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pt\": \"./node_modules/moment/locale/pt.js\",\n\t\"./pt-br\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt-br.js\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt.js\": \"./node_modules/moment/locale/pt.js\",\n\t\"./ro\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ro.js\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ru\": \"./node_modules/moment/locale/ru.js\",\n\t\"./ru.js\": \"./node_modules/moment/locale/ru.js\",\n\t\"./sd\": \"./node_modules/moment/locale/sd.js\",\n\t\"./sd.js\": \"./node_modules/moment/locale/sd.js\",\n\t\"./se\": \"./node_modules/moment/locale/se.js\",\n\t\"./se.js\": \"./node_modules/moment/locale/se.js\",\n\t\"./si\": \"./node_modules/moment/locale/si.js\",\n\t\"./si.js\": \"./node_modules/moment/locale/si.js\",\n\t\"./sk\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sk.js\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sl\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sl.js\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sq\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sq.js\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sr\": \"./node_modules/moment/locale/sr.js\",\n\t\"./sr-cyrl\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr-cyrl.js\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr.js\": \"./node_modules/moment/locale/sr.js\",\n\t\"./ss\": \"./node_modules/moment/locale/ss.js\",\n\t\"./ss.js\": \"./node_modules/moment/locale/ss.js\",\n\t\"./sv\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sv.js\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sw\": \"./node_modules/moment/locale/sw.js\",\n\t\"./sw.js\": \"./node_modules/moment/locale/sw.js\",\n\t\"./ta\": \"./node_modules/moment/locale/ta.js\",\n\t\"./ta.js\": \"./node_modules/moment/locale/ta.js\",\n\t\"./te\": \"./node_modules/moment/locale/te.js\",\n\t\"./te.js\": \"./node_modules/moment/locale/te.js\",\n\t\"./tet\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tet.js\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tg\": \"./node_modules/moment/locale/tg.js\",\n\t\"./tg.js\": \"./node_modules/moment/locale/tg.js\",\n\t\"./th\": \"./node_modules/moment/locale/th.js\",\n\t\"./th.js\": \"./node_modules/moment/locale/th.js\",\n\t\"./tk\": \"./node_modules/moment/locale/tk.js\",\n\t\"./tk.js\": \"./node_modules/moment/locale/tk.js\",\n\t\"./tl-ph\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tl-ph.js\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tlh\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tlh.js\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tr\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tr.js\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tzl\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzl.js\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzm\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./tzm-latn\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm-latn.js\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm.js\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./ug-cn\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./ug-cn.js\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./uk\": \"./node_modules/moment/locale/uk.js\",\n\t\"./uk.js\": \"./node_modules/moment/locale/uk.js\",\n\t\"./ur\": \"./node_modules/moment/locale/ur.js\",\n\t\"./ur.js\": \"./node_modules/moment/locale/ur.js\",\n\t\"./uz\": \"./node_modules/moment/locale/uz.js\",\n\t\"./uz-latn\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz-latn.js\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz.js\": \"./node_modules/moment/locale/uz.js\",\n\t\"./vi\": \"./node_modules/moment/locale/vi.js\",\n\t\"./vi.js\": \"./node_modules/moment/locale/vi.js\",\n\t\"./x-pseudo\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./x-pseudo.js\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./yo\": \"./node_modules/moment/locale/yo.js\",\n\t\"./yo.js\": \"./node_modules/moment/locale/yo.js\",\n\t\"./zh-cn\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-cn.js\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-hk\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-hk.js\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-mo\": \"./node_modules/moment/locale/zh-mo.js\",\n\t\"./zh-mo.js\": \"./node_modules/moment/locale/zh-mo.js\",\n\t\"./zh-tw\": \"./node_modules/moment/locale/zh-tw.js\",\n\t\"./zh-tw.js\": \"./node_modules/moment/locale/zh-tw.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./node_modules/moment/locale sync recursive ^\\\\.\\\\/.*$\";\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale_sync_^\\.\\/.*$?");

/***/ }),

/***/ "./node_modules/moment/locale/af.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/af.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var af = moment.defineLocale('af', {\n        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n        meridiemParse: /vm|nm/i,\n        isPM: function (input) {\n            return /^nm$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'vm' : 'VM';\n            } else {\n                return isLower ? 'nm' : 'NM';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Vandag om] LT',\n            nextDay: '[Môre om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[Gister om] LT',\n            lastWeek: '[Laas] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oor %s',\n            past: '%s gelede',\n            s: \"'n paar sekondes\",\n            ss: '%d sekondes',\n            m: \"'n minuut\",\n            mm: '%d minute',\n            h: \"'n uur\",\n            hh: '%d ure',\n            d: \"'n dag\",\n            dd: '%d dae',\n            M: \"'n maand\",\n            MM: '%d maande',\n            y: \"'n jaar\",\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            ); // Thanks to Joris Röling : https://github.com/jjupiter\n        },\n        week: {\n            dow: 1, // Maandag is die eerste dag van die week.\n            doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n        },\n    });\n\n    return af;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/af.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-dz.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-dz.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'جانفي',\n            'فيفري',\n            'مارس',\n            'أفريل',\n            'ماي',\n            'جوان',\n            'جويلية',\n            'أوت',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arDz = moment.defineLocale('ar-dz', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arDz;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-dz.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-kw.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-kw.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arKw = moment.defineLocale('ar-kw', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arKw;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-kw.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-ly.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-ly.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '1',\n            2: '2',\n            3: '3',\n            4: '4',\n            5: '5',\n            6: '6',\n            7: '7',\n            8: '8',\n            9: '9',\n            0: '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arLy = moment.defineLocale('ar-ly', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arLy;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-ly.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-ma.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-ma.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arMa = moment.defineLocale('ar-ma', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arMa;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-ma.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-sa.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-sa.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        };\n\n    var arSa = moment.defineLocale('ar-sa', {\n        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return arSa;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-sa.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar-tn.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ar-tn.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arTn = moment.defineLocale('ar-tn', {\n        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arTn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar-tn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ar.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ar.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                ? 1\n                : n === 2\n                ? 2\n                : n % 100 >= 3 && n % 100 <= 10\n                ? 3\n                : n % 100 >= 11\n                ? 4\n                : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var ar = moment.defineLocale('ar', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ar;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ar.js?");

/***/ }),

/***/ "./node_modules/moment/locale/az.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/az.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: '-inci',\n        5: '-inci',\n        8: '-inci',\n        70: '-inci',\n        80: '-inci',\n        2: '-nci',\n        7: '-nci',\n        20: '-nci',\n        50: '-nci',\n        3: '-üncü',\n        4: '-üncü',\n        100: '-üncü',\n        6: '-ncı',\n        9: '-uncu',\n        10: '-uncu',\n        30: '-uncu',\n        60: '-ıncı',\n        90: '-ıncı',\n    };\n\n    var az = moment.defineLocale('az', {\n        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n        weekdays:\n            'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n                '_'\n            ),\n        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[sabah saat] LT',\n            nextWeek: '[gələn həftə] dddd [saat] LT',\n            lastDay: '[dünən] LT',\n            lastWeek: '[keçən həftə] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s əvvəl',\n            s: 'bir neçə saniyə',\n            ss: '%d saniyə',\n            m: 'bir dəqiqə',\n            mm: '%d dəqiqə',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir il',\n            yy: '%d il',\n        },\n        meridiemParse: /gecə|səhər|gündüz|axşam/,\n        isPM: function (input) {\n            return /^(gündüz|axşam)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'gecə';\n            } else if (hour < 12) {\n                return 'səhər';\n            } else if (hour < 17) {\n                return 'gündüz';\n            } else {\n                return 'axşam';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n        ordinal: function (number) {\n            if (number === 0) {\n                // special case for zero\n                return number + '-ıncı';\n            }\n            var a = number % 10,\n                b = (number % 100) - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return az;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/az.js?");

/***/ }),

/***/ "./node_modules/moment/locale/be.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/be.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n            hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n            dd: 'дзень_дні_дзён',\n            MM: 'месяц_месяцы_месяцаў',\n            yy: 'год_гады_гадоў',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвіліна' : 'хвіліну';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'гадзіна' : 'гадзіну';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n\n    var be = moment.defineLocale('be', {\n        months: {\n            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n                '_'\n            ),\n            standalone:\n                'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n        weekdays: {\n            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n                '_'\n            ),\n            standalone:\n                'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n                    '_'\n                ),\n            isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n        },\n        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n        },\n        calendar: {\n            sameDay: '[Сёння ў] LT',\n            nextDay: '[Заўтра ў] LT',\n            lastDay: '[Учора ў] LT',\n            nextWeek: function () {\n                return '[У] dddd [ў] LT';\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[У мінулую] dddd [ў] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[У мінулы] dddd [ў] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'праз %s',\n            past: '%s таму',\n            s: 'некалькі секунд',\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithPlural,\n            hh: relativeTimeWithPlural,\n            d: 'дзень',\n            dd: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночы|раніцы|дня|вечара/,\n        isPM: function (input) {\n            return /^(дня|вечара)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночы';\n            } else if (hour < 12) {\n                return 'раніцы';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечара';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return (number % 10 === 2 || number % 10 === 3) &&\n                        number % 100 !== 12 &&\n                        number % 100 !== 13\n                        ? number + '-і'\n                        : number + '-ы';\n                case 'D':\n                    return number + '-га';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return be;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/be.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bg.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/bg.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bg = moment.defineLocale('bg', {\n        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Днес в] LT',\n            nextDay: '[Утре в] LT',\n            nextWeek: 'dddd [в] LT',\n            lastDay: '[Вчера в] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Миналата] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Миналия] dddd [в] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'след %s',\n            past: 'преди %s',\n            s: 'няколко секунди',\n            ss: '%d секунди',\n            m: 'минута',\n            mm: '%d минути',\n            h: 'час',\n            hh: '%d часа',\n            d: 'ден',\n            dd: '%d дена',\n            w: 'седмица',\n            ww: '%d седмици',\n            M: 'месец',\n            MM: '%d месеца',\n            y: 'година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bg;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bg.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bm.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/bm.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bm = moment.defineLocale('bm', {\n        months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n            '_'\n        ),\n        monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n        weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n        weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n        weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'MMMM [tile] D [san] YYYY',\n            LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n            LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bi lɛrɛ] LT',\n            nextDay: '[Sini lɛrɛ] LT',\n            nextWeek: 'dddd [don lɛrɛ] LT',\n            lastDay: '[Kunu lɛrɛ] LT',\n            lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s kɔnɔ',\n            past: 'a bɛ %s bɔ',\n            s: 'sanga dama dama',\n            ss: 'sekondi %d',\n            m: 'miniti kelen',\n            mm: 'miniti %d',\n            h: 'lɛrɛ kelen',\n            hh: 'lɛrɛ %d',\n            d: 'tile kelen',\n            dd: 'tile %d',\n            M: 'kalo kelen',\n            MM: 'kalo %d',\n            y: 'san kelen',\n            yy: 'san %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return bm;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bm.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bn-bd.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/bn-bd.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bnBd = moment.defineLocale('bn-bd', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n\n        meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'রাত') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ভোর') {\n                return hour;\n            } else if (meridiem === 'সকাল') {\n                return hour;\n            } else if (meridiem === 'দুপুর') {\n                return hour >= 3 ? hour : hour + 12;\n            } else if (meridiem === 'বিকাল') {\n                return hour + 12;\n            } else if (meridiem === 'সন্ধ্যা') {\n                return hour + 12;\n            }\n        },\n\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 6) {\n                return 'ভোর';\n            } else if (hour < 12) {\n                return 'সকাল';\n            } else if (hour < 15) {\n                return 'দুপুর';\n            } else if (hour < 18) {\n                return 'বিকাল';\n            } else if (hour < 20) {\n                return 'সন্ধ্যা';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bnBd;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bn-bd.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bn.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/bn.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bn = moment.defineLocale('bn', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'রাত' && hour >= 4) ||\n                (meridiem === 'দুপুর' && hour < 5) ||\n                meridiem === 'বিকাল'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 10) {\n                return 'সকাল';\n            } else if (hour < 17) {\n                return 'দুপুর';\n            } else if (hour < 20) {\n                return 'বিকাল';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bo.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/bo.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '༡',\n            2: '༢',\n            3: '༣',\n            4: '༤',\n            5: '༥',\n            6: '༦',\n            7: '༧',\n            8: '༨',\n            9: '༩',\n            0: '༠',\n        },\n        numberMap = {\n            '༡': '1',\n            '༢': '2',\n            '༣': '3',\n            '༤': '4',\n            '༥': '5',\n            '༦': '6',\n            '༧': '7',\n            '༨': '8',\n            '༩': '9',\n            '༠': '0',\n        };\n\n    var bo = moment.defineLocale('bo', {\n        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n                '_'\n            ),\n        monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n        monthsParseExact: true,\n        weekdays:\n            'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n                '_'\n            ),\n        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n            '_'\n        ),\n        weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[དི་རིང] LT',\n            nextDay: '[སང་ཉིན] LT',\n            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n            lastDay: '[ཁ་སང] LT',\n            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ལ་',\n            past: '%s སྔན་ལ',\n            s: 'ལམ་སང',\n            ss: '%d སྐར་ཆ།',\n            m: 'སྐར་མ་གཅིག',\n            mm: '%d སྐར་མ',\n            h: 'ཆུ་ཚོད་གཅིག',\n            hh: '%d ཆུ་ཚོད',\n            d: 'ཉིན་གཅིག',\n            dd: '%d ཉིན་',\n            M: 'ཟླ་བ་གཅིག',\n            MM: '%d ཟླ་བ',\n            y: 'ལོ་གཅིག',\n            yy: '%d ལོ',\n        },\n        preparse: function (string) {\n            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'མཚན་མོ' && hour >= 4) ||\n                (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                meridiem === 'དགོང་དག'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'མཚན་མོ';\n            } else if (hour < 10) {\n                return 'ཞོགས་ཀས';\n            } else if (hour < 17) {\n                return 'ཉིན་གུང';\n            } else if (hour < 20) {\n                return 'དགོང་དག';\n            } else {\n                return 'མཚན་མོ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/br.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/br.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithMutation(number, withoutSuffix, key) {\n        var format = {\n            mm: 'munutenn',\n            MM: 'miz',\n            dd: 'devezh',\n        };\n        return number + ' ' + mutation(format[key], number);\n    }\n    function specialMutationForYears(number) {\n        switch (lastNumber(number)) {\n            case 1:\n            case 3:\n            case 4:\n            case 5:\n            case 9:\n                return number + ' bloaz';\n            default:\n                return number + ' vloaz';\n        }\n    }\n    function lastNumber(number) {\n        if (number > 9) {\n            return lastNumber(number % 10);\n        }\n        return number;\n    }\n    function mutation(text, number) {\n        if (number === 2) {\n            return softMutation(text);\n        }\n        return text;\n    }\n    function softMutation(text) {\n        var mutationTable = {\n            m: 'v',\n            b: 'v',\n            d: 'z',\n        };\n        if (mutationTable[text.charAt(0)] === undefined) {\n            return text;\n        }\n        return mutationTable[text.charAt(0)] + text.substring(1);\n    }\n\n    var monthsParse = [\n            /^gen/i,\n            /^c[ʼ\\']hwe/i,\n            /^meu/i,\n            /^ebr/i,\n            /^mae/i,\n            /^(mez|eve)/i,\n            /^gou/i,\n            /^eos/i,\n            /^gwe/i,\n            /^her/i,\n            /^du/i,\n            /^ker/i,\n        ],\n        monthsRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        monthsStrictRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n        monthsShortStrictRegex =\n            /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        fullWeekdaysParse = [\n            /^sul/i,\n            /^lun/i,\n            /^meurzh/i,\n            /^merc[ʼ\\']her/i,\n            /^yaou/i,\n            /^gwener/i,\n            /^sadorn/i,\n        ],\n        shortWeekdaysParse = [\n            /^Sul/i,\n            /^Lun/i,\n            /^Meu/i,\n            /^Mer/i,\n            /^Yao/i,\n            /^Gwe/i,\n            /^Sad/i,\n        ],\n        minWeekdaysParse = [\n            /^Su/i,\n            /^Lu/i,\n            /^Me([^r]|$)/i,\n            /^Mer/i,\n            /^Ya/i,\n            /^Gw/i,\n            /^Sa/i,\n        ];\n\n    var br = moment.defineLocale('br', {\n        months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n            '_'\n        ),\n        monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n        weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n        weekdaysParse: minWeekdaysParse,\n        fullWeekdaysParse: fullWeekdaysParse,\n        shortWeekdaysParse: shortWeekdaysParse,\n        minWeekdaysParse: minWeekdaysParse,\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [a viz] MMMM YYYY',\n            LLL: 'D [a viz] MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hiziv da] LT',\n            nextDay: '[Warcʼhoazh da] LT',\n            nextWeek: 'dddd [da] LT',\n            lastDay: '[Decʼh da] LT',\n            lastWeek: 'dddd [paset da] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'a-benn %s',\n            past: '%s ʼzo',\n            s: 'un nebeud segondennoù',\n            ss: '%d eilenn',\n            m: 'ur vunutenn',\n            mm: relativeTimeWithMutation,\n            h: 'un eur',\n            hh: '%d eur',\n            d: 'un devezh',\n            dd: relativeTimeWithMutation,\n            M: 'ur miz',\n            MM: relativeTimeWithMutation,\n            y: 'ur bloaz',\n            yy: specialMutationForYears,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'añ' : 'vet';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n        isPM: function (token) {\n            return token === 'g.m.';\n        },\n        meridiem: function (hour, minute, isLower) {\n            return hour < 12 ? 'a.m.' : 'g.m.';\n        },\n    });\n\n    return br;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/br.js?");

/***/ }),

/***/ "./node_modules/moment/locale/bs.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/bs.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var bs = moment.defineLocale('bs', {\n        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bs;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/bs.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ca.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ca.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ca = moment.defineLocale('ca', {\n        months: {\n            standalone:\n                'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n                    '_'\n                ),\n            format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n                '_'\n            ),\n        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a les] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextDay: function () {\n                return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastDay: function () {\n                return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [passat a ' +\n                    (this.hours() !== 1 ? 'les' : 'la') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'uns segons',\n            ss: '%d segons',\n            m: 'un minut',\n            mm: '%d minuts',\n            h: 'una hora',\n            hh: '%d hores',\n            d: 'un dia',\n            dd: '%d dies',\n            M: 'un mes',\n            MM: '%d mesos',\n            y: 'un any',\n            yy: '%d anys',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                    ? 'n'\n                    : number === 3\n                    ? 'r'\n                    : number === 4\n                    ? 't'\n                    : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ca;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ca.js?");

/***/ }),

/***/ "./node_modules/moment/locale/cs.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/cs.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = {\n            format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n                '_'\n            ),\n            standalone:\n                'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n                    '_'\n                ),\n        },\n        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n        monthsParse = [\n            /^led/i,\n            /^úno/i,\n            /^bře/i,\n            /^dub/i,\n            /^kvě/i,\n            /^(čvn|červen$|června)/i,\n            /^(čvc|červenec|července)/i,\n            /^srp/i,\n            /^zář/i,\n            /^říj/i,\n            /^lis/i,\n            /^pro/i,\n        ],\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsRegex =\n            /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n    function plural(n) {\n        return n > 1 && n < 5 && ~~(n / 10) !== 1;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekund');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minuty' : 'minut');\n                } else {\n                    return result + 'minutami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodin');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'den' : 'dnem';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dny' : 'dní');\n                } else {\n                    return result + 'dny';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'měsíce' : 'měsíců');\n                } else {\n                    return result + 'měsíci';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokem';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'let');\n                } else {\n                    return result + 'lety';\n                }\n        }\n    }\n\n    var cs = moment.defineLocale('cs', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsStrictRegex:\n            /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n        monthsShortStrictRegex:\n            /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n            l: 'D. M. YYYY',\n        },\n        calendar: {\n            sameDay: '[dnes v] LT',\n            nextDay: '[zítra v] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [v] LT';\n                    case 3:\n                        return '[ve středu v] LT';\n                    case 4:\n                        return '[ve čtvrtek v] LT';\n                    case 5:\n                        return '[v pátek v] LT';\n                    case 6:\n                        return '[v sobotu v] LT';\n                }\n            },\n            lastDay: '[včera v] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulou neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[minulé] dddd [v] LT';\n                    case 3:\n                        return '[minulou středu v] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [v] LT';\n                    case 6:\n                        return '[minulou sobotu v] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'před %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cs;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/cs.js?");

/***/ }),

/***/ "./node_modules/moment/locale/cv.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/cv.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cv = moment.defineLocale('cv', {\n        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n            '_'\n        ),\n        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n        weekdays:\n            'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n                '_'\n            ),\n        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n        },\n        calendar: {\n            sameDay: '[Паян] LT [сехетре]',\n            nextDay: '[Ыран] LT [сехетре]',\n            lastDay: '[Ӗнер] LT [сехетре]',\n            nextWeek: '[Ҫитес] dddd LT [сехетре]',\n            lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (output) {\n                var affix = /сехет$/i.exec(output)\n                    ? 'рен'\n                    : /ҫул$/i.exec(output)\n                    ? 'тан'\n                    : 'ран';\n                return output + affix;\n            },\n            past: '%s каялла',\n            s: 'пӗр-ик ҫеккунт',\n            ss: '%d ҫеккунт',\n            m: 'пӗр минут',\n            mm: '%d минут',\n            h: 'пӗр сехет',\n            hh: '%d сехет',\n            d: 'пӗр кун',\n            dd: '%d кун',\n            M: 'пӗр уйӑх',\n            MM: '%d уйӑх',\n            y: 'пӗр ҫул',\n            yy: '%d ҫул',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n        ordinal: '%d-мӗш',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return cv;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/cv.js?");

/***/ }),

/***/ "./node_modules/moment/locale/cy.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/cy.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cy = moment.defineLocale('cy', {\n        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n            '_'\n        ),\n        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n            '_'\n        ),\n        weekdays:\n            'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n        weekdaysParseExact: true,\n        // time formats are the same as en-gb\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Heddiw am] LT',\n            nextDay: '[Yfory am] LT',\n            nextWeek: 'dddd [am] LT',\n            lastDay: '[Ddoe am] LT',\n            lastWeek: 'dddd [diwethaf am] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'mewn %s',\n            past: '%s yn ôl',\n            s: 'ychydig eiliadau',\n            ss: '%d eiliad',\n            m: 'munud',\n            mm: '%d munud',\n            h: 'awr',\n            hh: '%d awr',\n            d: 'diwrnod',\n            dd: '%d diwrnod',\n            M: 'mis',\n            MM: '%d mis',\n            y: 'blwyddyn',\n            yy: '%d flynedd',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n        ordinal: function (number) {\n            var b = number,\n                output = '',\n                lookup = [\n                    '',\n                    'af',\n                    'il',\n                    'ydd',\n                    'ydd',\n                    'ed',\n                    'ed',\n                    'ed',\n                    'fed',\n                    'fed',\n                    'fed', // 1af to 10fed\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'fed', // 11eg to 20fed\n                ];\n            if (b > 20) {\n                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                    output = 'fed'; // not 30ain, 70ain or 90ain\n                } else {\n                    output = 'ain';\n                }\n            } else if (b > 0) {\n                output = lookup[b];\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cy;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/cy.js?");

/***/ }),

/***/ "./node_modules/moment/locale/da.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/da.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var da = moment.defineLocale('da', {\n        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'på dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[i] dddd[s kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'få sekunder',\n            ss: '%d sekunder',\n            m: 'et minut',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dage',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'et år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return da;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/da.js?");

/***/ }),

/***/ "./node_modules/moment/locale/de-at.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/de-at.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deAt = moment.defineLocale('de-at', {\n        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deAt;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/de-at.js?");

/***/ }),

/***/ "./node_modules/moment/locale/de-ch.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/de-ch.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deCh = moment.defineLocale('de-ch', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deCh;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/de-ch.js?");

/***/ }),

/***/ "./node_modules/moment/locale/de.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/de.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de = moment.defineLocale('de', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return de;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/de.js?");

/***/ }),

/***/ "./node_modules/moment/locale/dv.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/dv.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'ޖެނުއަރީ',\n            'ފެބްރުއަރީ',\n            'މާރިޗު',\n            'އޭޕްރީލު',\n            'މޭ',\n            'ޖޫން',\n            'ޖުލައި',\n            'އޯގަސްޓު',\n            'ސެޕްޓެމްބަރު',\n            'އޮކްޓޯބަރު',\n            'ނޮވެމްބަރު',\n            'ޑިސެމްބަރު',\n        ],\n        weekdays = [\n            'އާދިއްތަ',\n            'ހޯމަ',\n            'އަންގާރަ',\n            'ބުދަ',\n            'ބުރާސްފަތި',\n            'ހުކުރު',\n            'ހޮނިހިރު',\n        ];\n\n    var dv = moment.defineLocale('dv', {\n        months: months,\n        monthsShort: months,\n        weekdays: weekdays,\n        weekdaysShort: weekdays,\n        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/M/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /މކ|މފ/,\n        isPM: function (input) {\n            return 'މފ' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'މކ';\n            } else {\n                return 'މފ';\n            }\n        },\n        calendar: {\n            sameDay: '[މިއަދު] LT',\n            nextDay: '[މާދަމާ] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[އިއްޔެ] LT',\n            lastWeek: '[ފާއިތުވި] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ތެރޭގައި %s',\n            past: 'ކުރިން %s',\n            s: 'ސިކުންތުކޮޅެއް',\n            ss: 'd% ސިކުންތު',\n            m: 'މިނިޓެއް',\n            mm: 'މިނިޓު %d',\n            h: 'ގަޑިއިރެއް',\n            hh: 'ގަޑިއިރު %d',\n            d: 'ދުވަހެއް',\n            dd: 'ދުވަސް %d',\n            M: 'މަހެއް',\n            MM: 'މަސް %d',\n            y: 'އަހަރެއް',\n            yy: 'އަހަރު %d',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 7, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return dv;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/dv.js?");

/***/ }),

/***/ "./node_modules/moment/locale/el.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/el.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    var el = moment.defineLocale('el', {\n        monthsNominativeEl:\n            'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n                '_'\n            ),\n        monthsGenitiveEl:\n            'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n                '_'\n            ),\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return this._monthsNominativeEl;\n            } else if (\n                typeof format === 'string' &&\n                /D/.test(format.substring(0, format.indexOf('MMMM')))\n            ) {\n                // if there is a day number before 'MMMM'\n                return this._monthsGenitiveEl[momentToFormat.month()];\n            } else {\n                return this._monthsNominativeEl[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n            '_'\n        ),\n        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'μμ' : 'ΜΜ';\n            } else {\n                return isLower ? 'πμ' : 'ΠΜ';\n            }\n        },\n        isPM: function (input) {\n            return (input + '').toLowerCase()[0] === 'μ';\n        },\n        meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendarEl: {\n            sameDay: '[Σήμερα {}] LT',\n            nextDay: '[Αύριο {}] LT',\n            nextWeek: 'dddd [{}] LT',\n            lastDay: '[Χθες {}] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 6:\n                        return '[το προηγούμενο] dddd [{}] LT';\n                    default:\n                        return '[την προηγούμενη] dddd [{}] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        calendar: function (key, mom) {\n            var output = this._calendarEl[key],\n                hours = mom && mom.hours();\n            if (isFunction(output)) {\n                output = output.apply(mom);\n            }\n            return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n        },\n        relativeTime: {\n            future: 'σε %s',\n            past: '%s πριν',\n            s: 'λίγα δευτερόλεπτα',\n            ss: '%d δευτερόλεπτα',\n            m: 'ένα λεπτό',\n            mm: '%d λεπτά',\n            h: 'μία ώρα',\n            hh: '%d ώρες',\n            d: 'μία μέρα',\n            dd: '%d μέρες',\n            M: 'ένας μήνας',\n            MM: '%d μήνες',\n            y: 'ένας χρόνος',\n            yy: '%d χρόνια',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}η/,\n        ordinal: '%dη',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4st is the first week of the year.\n        },\n    });\n\n    return el;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/el.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-au.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-au.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enAu = moment.defineLocale('en-au', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enAu;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-au.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-ca.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-ca.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enCa = moment.defineLocale('en-ca', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'YYYY-MM-DD',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY h:mm A',\n            LLLL: 'dddd, MMMM D, YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    return enCa;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-ca.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-gb.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-gb.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enGb = moment.defineLocale('en-gb', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enGb;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-gb.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-ie.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-ie.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIe = moment.defineLocale('en-ie', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enIe;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-ie.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-il.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-il.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIl = moment.defineLocale('en-il', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    return enIl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-il.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-in.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-in.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIn = moment.defineLocale('en-in', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return enIn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-in.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-nz.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-nz.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enNz = moment.defineLocale('en-nz', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enNz;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-nz.js?");

/***/ }),

/***/ "./node_modules/moment/locale/en-sg.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/en-sg.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enSg = moment.defineLocale('en-sg', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enSg;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/en-sg.js?");

/***/ }),

/***/ "./node_modules/moment/locale/eo.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/eo.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eo = moment.defineLocale('eo', {\n        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: '[la] D[-an de] MMMM, YYYY',\n            LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n            LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n            llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n        },\n        meridiemParse: /[ap]\\.t\\.m/i,\n        isPM: function (input) {\n            return input.charAt(0).toLowerCase() === 'p';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'p.t.m.' : 'P.T.M.';\n            } else {\n                return isLower ? 'a.t.m.' : 'A.T.M.';\n            }\n        },\n        calendar: {\n            sameDay: '[Hodiaŭ je] LT',\n            nextDay: '[Morgaŭ je] LT',\n            nextWeek: 'dddd[n je] LT',\n            lastDay: '[Hieraŭ je] LT',\n            lastWeek: '[pasintan] dddd[n je] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'post %s',\n            past: 'antaŭ %s',\n            s: 'kelkaj sekundoj',\n            ss: '%d sekundoj',\n            m: 'unu minuto',\n            mm: '%d minutoj',\n            h: 'unu horo',\n            hh: '%d horoj',\n            d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n            dd: '%d tagoj',\n            M: 'unu monato',\n            MM: '%d monatoj',\n            y: 'unu jaro',\n            yy: '%d jaroj',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}a/,\n        ordinal: '%da',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/eo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/es-do.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/es-do.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esDo = moment.defineLocale('es-do', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return esDo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/es-do.js?");

/***/ }),

/***/ "./node_modules/moment/locale/es-mx.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/es-mx.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esMx = moment.defineLocale('es-mx', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return esMx;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/es-mx.js?");

/***/ }),

/***/ "./node_modules/moment/locale/es-us.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/es-us.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esUs = moment.defineLocale('es-us', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'MM/DD/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return esUs;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/es-us.js?");

/***/ }),

/***/ "./node_modules/moment/locale/es.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/es.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var es = moment.defineLocale('es', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return es;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/es.js?");

/***/ }),

/***/ "./node_modules/moment/locale/et.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/et.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n            ss: [number + 'sekundi', number + 'sekundit'],\n            m: ['ühe minuti', 'üks minut'],\n            mm: [number + ' minuti', number + ' minutit'],\n            h: ['ühe tunni', 'tund aega', 'üks tund'],\n            hh: [number + ' tunni', number + ' tundi'],\n            d: ['ühe päeva', 'üks päev'],\n            M: ['kuu aja', 'kuu aega', 'üks kuu'],\n            MM: [number + ' kuu', number + ' kuud'],\n            y: ['ühe aasta', 'aasta', 'üks aasta'],\n            yy: [number + ' aasta', number + ' aastat'],\n        };\n        if (withoutSuffix) {\n            return format[key][2] ? format[key][2] : format[key][1];\n        }\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var et = moment.defineLocale('et', {\n        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n        weekdays:\n            'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n                '_'\n            ),\n        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Täna,] LT',\n            nextDay: '[Homme,] LT',\n            nextWeek: '[Järgmine] dddd LT',\n            lastDay: '[Eile,] LT',\n            lastWeek: '[Eelmine] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s pärast',\n            past: '%s tagasi',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: '%d päeva',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return et;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/et.js?");

/***/ }),

/***/ "./node_modules/moment/locale/eu.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/eu.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eu = moment.defineLocale('eu', {\n        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n            '_'\n        ),\n        monthsShort:\n            'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n                '_'\n            ),\n        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY[ko] MMMM[ren] D[a]',\n            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n            l: 'YYYY-M-D',\n            ll: 'YYYY[ko] MMM D[a]',\n            lll: 'YYYY[ko] MMM D[a] HH:mm',\n            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n        },\n        calendar: {\n            sameDay: '[gaur] LT[etan]',\n            nextDay: '[bihar] LT[etan]',\n            nextWeek: 'dddd LT[etan]',\n            lastDay: '[atzo] LT[etan]',\n            lastWeek: '[aurreko] dddd LT[etan]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s barru',\n            past: 'duela %s',\n            s: 'segundo batzuk',\n            ss: '%d segundo',\n            m: 'minutu bat',\n            mm: '%d minutu',\n            h: 'ordu bat',\n            hh: '%d ordu',\n            d: 'egun bat',\n            dd: '%d egun',\n            M: 'hilabete bat',\n            MM: '%d hilabete',\n            y: 'urte bat',\n            yy: '%d urte',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eu;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/eu.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fa.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/fa.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '۱',\n            2: '۲',\n            3: '۳',\n            4: '۴',\n            5: '۵',\n            6: '۶',\n            7: '۷',\n            8: '۸',\n            9: '۹',\n            0: '۰',\n        },\n        numberMap = {\n            '۱': '1',\n            '۲': '2',\n            '۳': '3',\n            '۴': '4',\n            '۵': '5',\n            '۶': '6',\n            '۷': '7',\n            '۸': '8',\n            '۹': '9',\n            '۰': '0',\n        };\n\n    var fa = moment.defineLocale('fa', {\n        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n                '_'\n            ),\n        weekdays:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /قبل از ظهر|بعد از ظهر/,\n        isPM: function (input) {\n            return /بعد از ظهر/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'قبل از ظهر';\n            } else {\n                return 'بعد از ظهر';\n            }\n        },\n        calendar: {\n            sameDay: '[امروز ساعت] LT',\n            nextDay: '[فردا ساعت] LT',\n            nextWeek: 'dddd [ساعت] LT',\n            lastDay: '[دیروز ساعت] LT',\n            lastWeek: 'dddd [پیش] [ساعت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'در %s',\n            past: '%s پیش',\n            s: 'چند ثانیه',\n            ss: '%d ثانیه',\n            m: 'یک دقیقه',\n            mm: '%d دقیقه',\n            h: 'یک ساعت',\n            hh: '%d ساعت',\n            d: 'یک روز',\n            dd: '%d روز',\n            M: 'یک ماه',\n            MM: '%d ماه',\n            y: 'یک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[۰-۹]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}م/,\n        ordinal: '%dم',\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return fa;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fa.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fi.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/fi.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersPast =\n            'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n                ' '\n            ),\n        numbersFuture = [\n            'nolla',\n            'yhden',\n            'kahden',\n            'kolmen',\n            'neljän',\n            'viiden',\n            'kuuden',\n            numbersPast[7],\n            numbersPast[8],\n            numbersPast[9],\n        ];\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = '';\n        switch (key) {\n            case 's':\n                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n            case 'ss':\n                result = isFuture ? 'sekunnin' : 'sekuntia';\n                break;\n            case 'm':\n                return isFuture ? 'minuutin' : 'minuutti';\n            case 'mm':\n                result = isFuture ? 'minuutin' : 'minuuttia';\n                break;\n            case 'h':\n                return isFuture ? 'tunnin' : 'tunti';\n            case 'hh':\n                result = isFuture ? 'tunnin' : 'tuntia';\n                break;\n            case 'd':\n                return isFuture ? 'päivän' : 'päivä';\n            case 'dd':\n                result = isFuture ? 'päivän' : 'päivää';\n                break;\n            case 'M':\n                return isFuture ? 'kuukauden' : 'kuukausi';\n            case 'MM':\n                result = isFuture ? 'kuukauden' : 'kuukautta';\n                break;\n            case 'y':\n                return isFuture ? 'vuoden' : 'vuosi';\n            case 'yy':\n                result = isFuture ? 'vuoden' : 'vuotta';\n                break;\n        }\n        result = verbalNumber(number, isFuture) + ' ' + result;\n        return result;\n    }\n    function verbalNumber(number, isFuture) {\n        return number < 10\n            ? isFuture\n                ? numbersFuture[number]\n                : numbersPast[number]\n            : number;\n    }\n\n    var fi = moment.defineLocale('fi', {\n        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n            '_'\n        ),\n        monthsShort:\n            'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n                '_'\n            ),\n        weekdays:\n            'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n                '_'\n            ),\n        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[ta] YYYY',\n            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n            l: 'D.M.YYYY',\n            ll: 'Do MMM YYYY',\n            lll: 'Do MMM YYYY, [klo] HH.mm',\n            llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n        },\n        calendar: {\n            sameDay: '[tänään] [klo] LT',\n            nextDay: '[huomenna] [klo] LT',\n            nextWeek: 'dddd [klo] LT',\n            lastDay: '[eilen] [klo] LT',\n            lastWeek: '[viime] dddd[na] [klo] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s päästä',\n            past: '%s sitten',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fi;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fi.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fil.js":
/*!*******************************************!*\
  !*** ./node_modules/moment/locale/fil.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fil = moment.defineLocale('fil', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fil;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fil.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fo.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/fo.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fo = moment.defineLocale('fo', {\n        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D. MMMM, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Í dag kl.] LT',\n            nextDay: '[Í morgin kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[Í gjár kl.] LT',\n            lastWeek: '[síðstu] dddd [kl] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'um %s',\n            past: '%s síðani',\n            s: 'fá sekund',\n            ss: '%d sekundir',\n            m: 'ein minuttur',\n            mm: '%d minuttir',\n            h: 'ein tími',\n            hh: '%d tímar',\n            d: 'ein dagur',\n            dd: '%d dagar',\n            M: 'ein mánaður',\n            MM: '%d mánaðir',\n            y: 'eitt ár',\n            yy: '%d ár',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fr-ca.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/fr-ca.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCa = moment.defineLocale('fr-ca', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n    });\n\n    return frCa;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fr-ca.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fr-ch.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/fr-ch.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCh = moment.defineLocale('fr-ch', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return frCh;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fr-ch.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fr.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/fr.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsStrictRegex =\n            /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsShortStrictRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n        monthsRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsParse = [\n            /^janv/i,\n            /^févr/i,\n            /^mars/i,\n            /^avr/i,\n            /^mai/i,\n            /^juin/i,\n            /^juil/i,\n            /^août/i,\n            /^sept/i,\n            /^oct/i,\n            /^nov/i,\n            /^déc/i,\n        ];\n\n    var fr = moment.defineLocale('fr', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            w: 'une semaine',\n            ww: '%d semaines',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // TODO: Return 'e' when day of month > 1. Move this case inside\n                // block for masculine words below.\n                // See https://github.com/moment/moment/issues/3375\n                case 'D':\n                    return number + (number === 1 ? 'er' : '');\n\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fr.js?");

/***/ }),

/***/ "./node_modules/moment/locale/fy.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/fy.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n    var fy = moment.defineLocale('fy', {\n        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n        monthsParseExact: true,\n        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n            '_'\n        ),\n        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[hjoed om] LT',\n            nextDay: '[moarn om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[juster om] LT',\n            lastWeek: '[ôfrûne] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oer %s',\n            past: '%s lyn',\n            s: 'in pear sekonden',\n            ss: '%d sekonden',\n            m: 'ien minút',\n            mm: '%d minuten',\n            h: 'ien oere',\n            hh: '%d oeren',\n            d: 'ien dei',\n            dd: '%d dagen',\n            M: 'ien moanne',\n            MM: '%d moannen',\n            y: 'ien jier',\n            yy: '%d jierren',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fy;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/fy.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ga.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ga.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Eanáir',\n            'Feabhra',\n            'Márta',\n            'Aibreán',\n            'Bealtaine',\n            'Meitheamh',\n            'Iúil',\n            'Lúnasa',\n            'Meán Fómhair',\n            'Deireadh Fómhair',\n            'Samhain',\n            'Nollaig',\n        ],\n        monthsShort = [\n            'Ean',\n            'Feabh',\n            'Márt',\n            'Aib',\n            'Beal',\n            'Meith',\n            'Iúil',\n            'Lún',\n            'M.F.',\n            'D.F.',\n            'Samh',\n            'Noll',\n        ],\n        weekdays = [\n            'Dé Domhnaigh',\n            'Dé Luain',\n            'Dé Máirt',\n            'Dé Céadaoin',\n            'Déardaoin',\n            'Dé hAoine',\n            'Dé Sathairn',\n        ],\n        weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n        weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n    var ga = moment.defineLocale('ga', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Inniu ag] LT',\n            nextDay: '[Amárach ag] LT',\n            nextWeek: 'dddd [ag] LT',\n            lastDay: '[Inné ag] LT',\n            lastWeek: 'dddd [seo caite] [ag] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i %s',\n            past: '%s ó shin',\n            s: 'cúpla soicind',\n            ss: '%d soicind',\n            m: 'nóiméad',\n            mm: '%d nóiméad',\n            h: 'uair an chloig',\n            hh: '%d uair an chloig',\n            d: 'lá',\n            dd: '%d lá',\n            M: 'mí',\n            MM: '%d míonna',\n            y: 'bliain',\n            yy: '%d bliain',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ga;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ga.js?");

/***/ }),

/***/ "./node_modules/moment/locale/gd.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/gd.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Am Faoilleach',\n            'An Gearran',\n            'Am Màrt',\n            'An Giblean',\n            'An Cèitean',\n            'An t-Ògmhios',\n            'An t-Iuchar',\n            'An Lùnastal',\n            'An t-Sultain',\n            'An Dàmhair',\n            'An t-Samhain',\n            'An Dùbhlachd',\n        ],\n        monthsShort = [\n            'Faoi',\n            'Gear',\n            'Màrt',\n            'Gibl',\n            'Cèit',\n            'Ògmh',\n            'Iuch',\n            'Lùn',\n            'Sult',\n            'Dàmh',\n            'Samh',\n            'Dùbh',\n        ],\n        weekdays = [\n            'Didòmhnaich',\n            'Diluain',\n            'Dimàirt',\n            'Diciadain',\n            'Diardaoin',\n            'Dihaoine',\n            'Disathairne',\n        ],\n        weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n        weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n    var gd = moment.defineLocale('gd', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[An-diugh aig] LT',\n            nextDay: '[A-màireach aig] LT',\n            nextWeek: 'dddd [aig] LT',\n            lastDay: '[An-dè aig] LT',\n            lastWeek: 'dddd [seo chaidh] [aig] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ann an %s',\n            past: 'bho chionn %s',\n            s: 'beagan diogan',\n            ss: '%d diogan',\n            m: 'mionaid',\n            mm: '%d mionaidean',\n            h: 'uair',\n            hh: '%d uairean',\n            d: 'latha',\n            dd: '%d latha',\n            M: 'mìos',\n            MM: '%d mìosan',\n            y: 'bliadhna',\n            yy: '%d bliadhna',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gd;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/gd.js?");

/***/ }),

/***/ "./node_modules/moment/locale/gl.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/gl.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var gl = moment.defineLocale('gl', {\n        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort:\n            'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n            },\n            lastDay: function () {\n                return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (str) {\n                if (str.indexOf('un') === 0) {\n                    return 'n' + str;\n                }\n                return 'en ' + str;\n            },\n            past: 'hai %s',\n            s: 'uns segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'unha hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/gl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/gom-deva.js":
/*!************************************************!*\
  !*** ./node_modules/moment/locale/gom-deva.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n            ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n            m: ['एका मिणटान', 'एक मिनूट'],\n            mm: [number + ' मिणटांनी', number + ' मिणटां'],\n            h: ['एका वरान', 'एक वर'],\n            hh: [number + ' वरांनी', number + ' वरां'],\n            d: ['एका दिसान', 'एक दीस'],\n            dd: [number + ' दिसांनी', number + ' दीस'],\n            M: ['एका म्हयन्यान', 'एक म्हयनो'],\n            MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n            y: ['एका वर्सान', 'एक वर्स'],\n            yy: [number + ' वर्सांनी', number + ' वर्सां'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomDeva = moment.defineLocale('gom-deva', {\n        months: {\n            standalone:\n                'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n                    '_'\n                ),\n            format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n        weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n        weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [वाजतां]',\n            LTS: 'A h:mm:ss [वाजतां]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n            llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n        },\n        calendar: {\n            sameDay: '[आयज] LT',\n            nextDay: '[फाल्यां] LT',\n            nextWeek: '[फुडलो] dddd[,] LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[फाटलो] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s आदीं',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'वेर' only applies to day of the month\n                case 'D':\n                    return number + 'वेर';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राती') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सकाळीं') {\n                return hour;\n            } else if (meridiem === 'दनपारां') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'सांजे') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'राती';\n            } else if (hour < 12) {\n                return 'सकाळीं';\n            } else if (hour < 16) {\n                return 'दनपारां';\n            } else if (hour < 20) {\n                return 'सांजे';\n            } else {\n                return 'राती';\n            }\n        },\n    });\n\n    return gomDeva;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/gom-deva.js?");

/***/ }),

/***/ "./node_modules/moment/locale/gom-latn.js":
/*!************************************************!*\
  !*** ./node_modules/moment/locale/gom-latn.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['thoddea sekondamni', 'thodde sekond'],\n            ss: [number + ' sekondamni', number + ' sekond'],\n            m: ['eka mintan', 'ek minut'],\n            mm: [number + ' mintamni', number + ' mintam'],\n            h: ['eka voran', 'ek vor'],\n            hh: [number + ' voramni', number + ' voram'],\n            d: ['eka disan', 'ek dis'],\n            dd: [number + ' disamni', number + ' dis'],\n            M: ['eka mhoinean', 'ek mhoino'],\n            MM: [number + ' mhoineamni', number + ' mhoine'],\n            y: ['eka vorsan', 'ek voros'],\n            yy: [number + ' vorsamni', number + ' vorsam'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomLatn = moment.defineLocale('gom-latn', {\n        months: {\n            standalone:\n                'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n                    '_'\n                ),\n            format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [vazta]',\n            LTS: 'A h:mm:ss [vazta]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [vazta]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n            llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n        },\n        calendar: {\n            sameDay: '[Aiz] LT',\n            nextDay: '[Faleam] LT',\n            nextWeek: '[Fuddlo] dddd[,] LT',\n            lastDay: '[Kal] LT',\n            lastWeek: '[Fattlo] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s adim',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'er' only applies to day of the month\n                case 'D':\n                    return number + 'er';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /rati|sokallim|donparam|sanje/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'rati') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'sokallim') {\n                return hour;\n            } else if (meridiem === 'donparam') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'sanje') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'rati';\n            } else if (hour < 12) {\n                return 'sokallim';\n            } else if (hour < 16) {\n                return 'donparam';\n            } else if (hour < 20) {\n                return 'sanje';\n            } else {\n                return 'rati';\n            }\n        },\n    });\n\n    return gomLatn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/gom-latn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/gu.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/gu.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '૧',\n            2: '૨',\n            3: '૩',\n            4: '૪',\n            5: '૫',\n            6: '૬',\n            7: '૭',\n            8: '૮',\n            9: '૯',\n            0: '૦',\n        },\n        numberMap = {\n            '૧': '1',\n            '૨': '2',\n            '૩': '3',\n            '૪': '4',\n            '૫': '5',\n            '૬': '6',\n            '૭': '7',\n            '૮': '8',\n            '૯': '9',\n            '૦': '0',\n        };\n\n    var gu = moment.defineLocale('gu', {\n        months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n            '_'\n        ),\n        monthsShort:\n            'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n            '_'\n        ),\n        weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n        weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm વાગ્યે',\n            LTS: 'A h:mm:ss વાગ્યે',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n        },\n        calendar: {\n            sameDay: '[આજ] LT',\n            nextDay: '[કાલે] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ગઇકાલે] LT',\n            lastWeek: '[પાછલા] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s મા',\n            past: '%s પહેલા',\n            s: 'અમુક પળો',\n            ss: '%d સેકંડ',\n            m: 'એક મિનિટ',\n            mm: '%d મિનિટ',\n            h: 'એક કલાક',\n            hh: '%d કલાક',\n            d: 'એક દિવસ',\n            dd: '%d દિવસ',\n            M: 'એક મહિનો',\n            MM: '%d મહિનો',\n            y: 'એક વર્ષ',\n            yy: '%d વર્ષ',\n        },\n        preparse: function (string) {\n            return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n        meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'રાત') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'સવાર') {\n                return hour;\n            } else if (meridiem === 'બપોર') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'સાંજ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'રાત';\n            } else if (hour < 10) {\n                return 'સવાર';\n            } else if (hour < 17) {\n                return 'બપોર';\n            } else if (hour < 20) {\n                return 'સાંજ';\n            } else {\n                return 'રાત';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return gu;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/gu.js?");

/***/ }),

/***/ "./node_modules/moment/locale/he.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/he.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var he = moment.defineLocale('he', {\n        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n            '_'\n        ),\n        monthsShort:\n            'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [ב]MMMM YYYY',\n            LLL: 'D [ב]MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[היום ב־]LT',\n            nextDay: '[מחר ב־]LT',\n            nextWeek: 'dddd [בשעה] LT',\n            lastDay: '[אתמול ב־]LT',\n            lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'בעוד %s',\n            past: 'לפני %s',\n            s: 'מספר שניות',\n            ss: '%d שניות',\n            m: 'דקה',\n            mm: '%d דקות',\n            h: 'שעה',\n            hh: function (number) {\n                if (number === 2) {\n                    return 'שעתיים';\n                }\n                return number + ' שעות';\n            },\n            d: 'יום',\n            dd: function (number) {\n                if (number === 2) {\n                    return 'יומיים';\n                }\n                return number + ' ימים';\n            },\n            M: 'חודש',\n            MM: function (number) {\n                if (number === 2) {\n                    return 'חודשיים';\n                }\n                return number + ' חודשים';\n            },\n            y: 'שנה',\n            yy: function (number) {\n                if (number === 2) {\n                    return 'שנתיים';\n                } else if (number % 10 === 0 && number !== 10) {\n                    return number + ' שנה';\n                }\n                return number + ' שנים';\n            },\n        },\n        meridiemParse:\n            /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n        isPM: function (input) {\n            return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 5) {\n                return 'לפנות בוקר';\n            } else if (hour < 10) {\n                return 'בבוקר';\n            } else if (hour < 12) {\n                return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n            } else if (hour < 18) {\n                return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n            } else {\n                return 'בערב';\n            }\n        },\n    });\n\n    return he;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/he.js?");

/***/ }),

/***/ "./node_modules/moment/locale/hi.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/hi.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        },\n        monthsParse = [\n            /^जन/i,\n            /^फ़र|फर/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सितं|सित/i,\n            /^अक्टू/i,\n            /^नव|नवं/i,\n            /^दिसं|दिस/i,\n        ],\n        shortMonthsParse = [\n            /^जन/i,\n            /^फ़र/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सित/i,\n            /^अक्टू/i,\n            /^नव/i,\n            /^दिस/i,\n        ];\n\n    var hi = moment.defineLocale('hi', {\n        months: {\n            format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n                '_'\n            ),\n            standalone:\n                'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm बजे',\n            LTS: 'A h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n        },\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: shortMonthsParse,\n\n        monthsRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsShortRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsStrictRegex:\n            /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n        monthsShortStrictRegex:\n            /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[कल] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[कल] LT',\n            lastWeek: '[पिछले] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s में',\n            past: '%s पहले',\n            s: 'कुछ ही क्षण',\n            ss: '%d सेकंड',\n            m: 'एक मिनट',\n            mm: '%d मिनट',\n            h: 'एक घंटा',\n            hh: '%d घंटे',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महीने',\n            MM: '%d महीने',\n            y: 'एक वर्ष',\n            yy: '%d वर्ष',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n        meridiemParse: /रात|सुबह|दोपहर|शाम/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सुबह') {\n                return hour;\n            } else if (meridiem === 'दोपहर') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'शाम') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात';\n            } else if (hour < 10) {\n                return 'सुबह';\n            } else if (hour < 17) {\n                return 'दोपहर';\n            } else if (hour < 20) {\n                return 'शाम';\n            } else {\n                return 'रात';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return hi;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/hi.js?");

/***/ }),

/***/ "./node_modules/moment/locale/hr.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/hr.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var hr = moment.defineLocale('hr', {\n        months: {\n            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n                '_'\n            ),\n            standalone:\n                'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM YYYY',\n            LLL: 'Do MMMM YYYY H:mm',\n            LLLL: 'dddd, Do MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prošlu] [nedjelju] [u] LT';\n                    case 3:\n                        return '[prošlu] [srijedu] [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/hr.js?");

/***/ }),

/***/ "./node_modules/moment/locale/hu.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/hu.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt  : https://github.com/passatgt\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var weekEndings =\n        'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n    function translate(number, withoutSuffix, key, isFuture) {\n        var num = number;\n        switch (key) {\n            case 's':\n                return isFuture || withoutSuffix\n                    ? 'néhány másodperc'\n                    : 'néhány másodperce';\n            case 'ss':\n                return num + (isFuture || withoutSuffix)\n                    ? ' másodperc'\n                    : ' másodperce';\n            case 'm':\n                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'mm':\n                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'h':\n                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'hh':\n                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'd':\n                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'dd':\n                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'M':\n                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'MM':\n                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'y':\n                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n            case 'yy':\n                return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n        }\n        return '';\n    }\n    function week(isFuture) {\n        return (\n            (isFuture ? '' : '[múlt] ') +\n            '[' +\n            weekEndings[this.day()] +\n            '] LT[-kor]'\n        );\n    }\n\n    var hu = moment.defineLocale('hu', {\n        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY. MMMM D.',\n            LLL: 'YYYY. MMMM D. H:mm',\n            LLLL: 'YYYY. MMMM D., dddd H:mm',\n        },\n        meridiemParse: /de|du/i,\n        isPM: function (input) {\n            return input.charAt(1).toLowerCase() === 'u';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower === true ? 'de' : 'DE';\n            } else {\n                return isLower === true ? 'du' : 'DU';\n            }\n        },\n        calendar: {\n            sameDay: '[ma] LT[-kor]',\n            nextDay: '[holnap] LT[-kor]',\n            nextWeek: function () {\n                return week.call(this, true);\n            },\n            lastDay: '[tegnap] LT[-kor]',\n            lastWeek: function () {\n                return week.call(this, false);\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s múlva',\n            past: '%s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return hu;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/hu.js?");

/***/ }),

/***/ "./node_modules/moment/locale/hy-am.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/hy-am.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var hyAm = moment.defineLocale('hy-am', {\n        months: {\n            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n                '_'\n            ),\n            standalone:\n                'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n        weekdays:\n            'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n                '_'\n            ),\n        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY թ.',\n            LLL: 'D MMMM YYYY թ., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n        },\n        calendar: {\n            sameDay: '[այսօր] LT',\n            nextDay: '[վաղը] LT',\n            lastDay: '[երեկ] LT',\n            nextWeek: function () {\n                return 'dddd [օրը ժամը] LT';\n            },\n            lastWeek: function () {\n                return '[անցած] dddd [օրը ժամը] LT';\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s հետո',\n            past: '%s առաջ',\n            s: 'մի քանի վայրկյան',\n            ss: '%d վայրկյան',\n            m: 'րոպե',\n            mm: '%d րոպե',\n            h: 'ժամ',\n            hh: '%d ժամ',\n            d: 'օր',\n            dd: '%d օր',\n            M: 'ամիս',\n            MM: '%d ամիս',\n            y: 'տարի',\n            yy: '%d տարի',\n        },\n        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n        isPM: function (input) {\n            return /^(ցերեկվա|երեկոյան)$/.test(input);\n        },\n        meridiem: function (hour) {\n            if (hour < 4) {\n                return 'գիշերվա';\n            } else if (hour < 12) {\n                return 'առավոտվա';\n            } else if (hour < 17) {\n                return 'ցերեկվա';\n            } else {\n                return 'երեկոյան';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'DDD':\n                case 'w':\n                case 'W':\n                case 'DDDo':\n                    if (number === 1) {\n                        return number + '-ին';\n                    }\n                    return number + '-րդ';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hyAm;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/hy-am.js?");

/***/ }),

/***/ "./node_modules/moment/locale/id.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/id.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var id = moment.defineLocale('id', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|siang|sore|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'siang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sore' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'siang';\n            } else if (hours < 19) {\n                return 'sore';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Besok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kemarin pukul] LT',\n            lastWeek: 'dddd [lalu pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lalu',\n            s: 'beberapa detik',\n            ss: '%d detik',\n            m: 'semenit',\n            mm: '%d menit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return id;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/id.js?");

/***/ }),

/***/ "./node_modules/moment/locale/is.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/is.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(n) {\n        if (n % 100 === 11) {\n            return true;\n        } else if (n % 10 === 1) {\n            return false;\n        }\n        return true;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nokkrar sekúndur'\n                    : 'nokkrum sekúndum';\n            case 'ss':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n                    );\n                }\n                return result + 'sekúnda';\n            case 'm':\n                return withoutSuffix ? 'mínúta' : 'mínútu';\n            case 'mm':\n                if (plural(number)) {\n                    return (\n                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n                    );\n                } else if (withoutSuffix) {\n                    return result + 'mínúta';\n                }\n                return result + 'mínútu';\n            case 'hh':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture\n                            ? 'klukkustundir'\n                            : 'klukkustundum')\n                    );\n                }\n                return result + 'klukkustund';\n            case 'd':\n                if (withoutSuffix) {\n                    return 'dagur';\n                }\n                return isFuture ? 'dag' : 'degi';\n            case 'dd':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'dagar';\n                    }\n                    return result + (isFuture ? 'daga' : 'dögum');\n                } else if (withoutSuffix) {\n                    return result + 'dagur';\n                }\n                return result + (isFuture ? 'dag' : 'degi');\n            case 'M':\n                if (withoutSuffix) {\n                    return 'mánuður';\n                }\n                return isFuture ? 'mánuð' : 'mánuði';\n            case 'MM':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'mánuðir';\n                    }\n                    return result + (isFuture ? 'mánuði' : 'mánuðum');\n                } else if (withoutSuffix) {\n                    return result + 'mánuður';\n                }\n                return result + (isFuture ? 'mánuð' : 'mánuði');\n            case 'y':\n                return withoutSuffix || isFuture ? 'ár' : 'ári';\n            case 'yy':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n                }\n                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n        }\n    }\n\n    var is = moment.defineLocale('is', {\n        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n        },\n        calendar: {\n            sameDay: '[í dag kl.] LT',\n            nextDay: '[á morgun kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[í gær kl.] LT',\n            lastWeek: '[síðasta] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'eftir %s',\n            past: 'fyrir %s síðan',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: 'klukkustund',\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return is;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/is.js?");

/***/ }),

/***/ "./node_modules/moment/locale/it-ch.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/it-ch.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var itCh = moment.defineLocale('it-ch', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Oggi alle] LT',\n            nextDay: '[Domani alle] LT',\n            nextWeek: 'dddd [alle] LT',\n            lastDay: '[Ieri alle] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[la scorsa] dddd [alle] LT';\n                    default:\n                        return '[lo scorso] dddd [alle] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n            },\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return itCh;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/it-ch.js?");

/***/ }),

/***/ "./node_modules/moment/locale/it.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/it.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var it = moment.defineLocale('it', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return (\n                    '[Oggi a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextDay: function () {\n                return (\n                    '[Domani a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextWeek: function () {\n                return (\n                    'dddd [a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastDay: function () {\n                return (\n                    '[Ieri a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return (\n                            '[La scorsa] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                ? ' '\n                                : \"ll'\") +\n                            ']LT'\n                        );\n                    default:\n                        return (\n                            '[Lo scorso] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                ? ' '\n                                : \"ll'\") +\n                            ']LT'\n                        );\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'tra %s',\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            w: 'una settimana',\n            ww: '%d settimane',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return it;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/it.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ja.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ja.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ja = moment.defineLocale('ja', {\n        eras: [\n            {\n                since: '2019-05-01',\n                offset: 1,\n                name: '令和',\n                narrow: '㋿',\n                abbr: 'R',\n            },\n            {\n                since: '1989-01-08',\n                until: '2019-04-30',\n                offset: 1,\n                name: '平成',\n                narrow: '㍻',\n                abbr: 'H',\n            },\n            {\n                since: '1926-12-25',\n                until: '1989-01-07',\n                offset: 1,\n                name: '昭和',\n                narrow: '㍼',\n                abbr: 'S',\n            },\n            {\n                since: '1912-07-30',\n                until: '1926-12-24',\n                offset: 1,\n                name: '大正',\n                narrow: '㍽',\n                abbr: 'T',\n            },\n            {\n                since: '1873-01-01',\n                until: '1912-07-29',\n                offset: 6,\n                name: '明治',\n                narrow: '㍾',\n                abbr: 'M',\n            },\n            {\n                since: '0001-01-01',\n                until: '1873-12-31',\n                offset: 1,\n                name: '西暦',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: '紀元前',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        eraYearOrdinalRegex: /(元|\\d+)年/,\n        eraYearOrdinalParse: function (input, match) {\n            return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n        },\n        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日 dddd HH:mm',\n            l: 'YYYY/MM/DD',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日(ddd) HH:mm',\n        },\n        meridiemParse: /午前|午後/i,\n        isPM: function (input) {\n            return input === '午後';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return '午前';\n            } else {\n                return '午後';\n            }\n        },\n        calendar: {\n            sameDay: '[今日] LT',\n            nextDay: '[明日] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[来週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            lastDay: '[昨日] LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[先週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}日/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'y':\n                    return number === 1 ? '元年' : number + '年';\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '数秒',\n            ss: '%d秒',\n            m: '1分',\n            mm: '%d分',\n            h: '1時間',\n            hh: '%d時間',\n            d: '1日',\n            dd: '%d日',\n            M: '1ヶ月',\n            MM: '%dヶ月',\n            y: '1年',\n            yy: '%d年',\n        },\n    });\n\n    return ja;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ja.js?");

/***/ }),

/***/ "./node_modules/moment/locale/jv.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/jv.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var jv = moment.defineLocale('jv', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /enjing|siyang|sonten|ndalu/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'enjing') {\n                return hour;\n            } else if (meridiem === 'siyang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'enjing';\n            } else if (hours < 15) {\n                return 'siyang';\n            } else if (hours < 19) {\n                return 'sonten';\n            } else {\n                return 'ndalu';\n            }\n        },\n        calendar: {\n            sameDay: '[Dinten puniko pukul] LT',\n            nextDay: '[Mbenjang pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kala wingi pukul] LT',\n            lastWeek: 'dddd [kepengker pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'wonten ing %s',\n            past: '%s ingkang kepengker',\n            s: 'sawetawis detik',\n            ss: '%d detik',\n            m: 'setunggal menit',\n            mm: '%d menit',\n            h: 'setunggal jam',\n            hh: '%d jam',\n            d: 'sedinten',\n            dd: '%d dinten',\n            M: 'sewulan',\n            MM: '%d wulan',\n            y: 'setaun',\n            yy: '%d taun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return jv;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/jv.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ka.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ka.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ka = moment.defineLocale('ka', {\n        months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n            '_'\n        ),\n        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n        weekdays: {\n            standalone:\n                'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n                    '_'\n                ),\n            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n                '_'\n            ),\n            isFormat: /(წინა|შემდეგ)/,\n        },\n        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[დღეს] LT[-ზე]',\n            nextDay: '[ხვალ] LT[-ზე]',\n            lastDay: '[გუშინ] LT[-ზე]',\n            nextWeek: '[შემდეგ] dddd LT[-ზე]',\n            lastWeek: '[წინა] dddd LT-ზე',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return s.replace(\n                    /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n                    function ($0, $1, $2) {\n                        return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n                    }\n                );\n            },\n            past: function (s) {\n                if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n                    return s.replace(/(ი|ე)$/, 'ის წინ');\n                }\n                if (/წელი/.test(s)) {\n                    return s.replace(/წელი$/, 'წლის წინ');\n                }\n                return s;\n            },\n            s: 'რამდენიმე წამი',\n            ss: '%d წამი',\n            m: 'წუთი',\n            mm: '%d წუთი',\n            h: 'საათი',\n            hh: '%d საათი',\n            d: 'დღე',\n            dd: '%d დღე',\n            M: 'თვე',\n            MM: '%d თვე',\n            y: 'წელი',\n            yy: '%d წელი',\n        },\n        dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n        ordinal: function (number) {\n            if (number === 0) {\n                return number;\n            }\n            if (number === 1) {\n                return number + '-ლი';\n            }\n            if (\n                number < 20 ||\n                (number <= 100 && number % 20 === 0) ||\n                number % 100 === 0\n            ) {\n                return 'მე-' + number;\n            }\n            return number + '-ე';\n        },\n        week: {\n            dow: 1,\n            doy: 7,\n        },\n    });\n\n    return ka;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ka.js?");

/***/ }),

/***/ "./node_modules/moment/locale/kk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/kk.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ші',\n        1: '-ші',\n        2: '-ші',\n        3: '-ші',\n        4: '-ші',\n        5: '-ші',\n        6: '-шы',\n        7: '-ші',\n        8: '-ші',\n        9: '-шы',\n        10: '-шы',\n        20: '-шы',\n        30: '-шы',\n        40: '-шы',\n        50: '-ші',\n        60: '-шы',\n        70: '-ші',\n        80: '-ші',\n        90: '-шы',\n        100: '-ші',\n    };\n\n    var kk = moment.defineLocale('kk', {\n        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n            '_'\n        ),\n        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n            '_'\n        ),\n        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгін сағат] LT',\n            nextDay: '[Ертең сағат] LT',\n            nextWeek: 'dddd [сағат] LT',\n            lastDay: '[Кеше сағат] LT',\n            lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ішінде',\n            past: '%s бұрын',\n            s: 'бірнеше секунд',\n            ss: '%d секунд',\n            m: 'бір минут',\n            mm: '%d минут',\n            h: 'бір сағат',\n            hh: '%d сағат',\n            d: 'бір күн',\n            dd: '%d күн',\n            M: 'бір ай',\n            MM: '%d ай',\n            y: 'бір жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return kk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/kk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/km.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/km.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '១',\n            2: '២',\n            3: '៣',\n            4: '៤',\n            5: '៥',\n            6: '៦',\n            7: '៧',\n            8: '៨',\n            9: '៩',\n            0: '០',\n        },\n        numberMap = {\n            '១': '1',\n            '២': '2',\n            '៣': '3',\n            '៤': '4',\n            '៥': '5',\n            '៦': '6',\n            '៧': '7',\n            '៨': '8',\n            '៩': '9',\n            '០': '0',\n        };\n\n    var km = moment.defineLocale('km', {\n        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n            '_'\n        ),\n        monthsShort:\n            'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n                '_'\n            ),\n        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ព្រឹក|ល្ងាច/,\n        isPM: function (input) {\n            return input === 'ល្ងាច';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ព្រឹក';\n            } else {\n                return 'ល្ងាច';\n            }\n        },\n        calendar: {\n            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n            nextDay: '[ស្អែក ម៉ោង] LT',\n            nextWeek: 'dddd [ម៉ោង] LT',\n            lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sទៀត',\n            past: '%sមុន',\n            s: 'ប៉ុន្មានវិនាទី',\n            ss: '%d វិនាទី',\n            m: 'មួយនាទី',\n            mm: '%d នាទី',\n            h: 'មួយម៉ោង',\n            hh: '%d ម៉ោង',\n            d: 'មួយថ្ងៃ',\n            dd: '%d ថ្ងៃ',\n            M: 'មួយខែ',\n            MM: '%d ខែ',\n            y: 'មួយឆ្នាំ',\n            yy: '%d ឆ្នាំ',\n        },\n        dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n        ordinal: 'ទី%d',\n        preparse: function (string) {\n            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return km;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/km.js?");

/***/ }),

/***/ "./node_modules/moment/locale/kn.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/kn.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '೧',\n            2: '೨',\n            3: '೩',\n            4: '೪',\n            5: '೫',\n            6: '೬',\n            7: '೭',\n            8: '೮',\n            9: '೯',\n            0: '೦',\n        },\n        numberMap = {\n            '೧': '1',\n            '೨': '2',\n            '೩': '3',\n            '೪': '4',\n            '೫': '5',\n            '೬': '6',\n            '೭': '7',\n            '೮': '8',\n            '೯': '9',\n            '೦': '0',\n        };\n\n    var kn = moment.defineLocale('kn', {\n        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n            '_'\n        ),\n        monthsShort:\n            'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[ಇಂದು] LT',\n            nextDay: '[ನಾಳೆ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ನಿನ್ನೆ] LT',\n            lastWeek: '[ಕೊನೆಯ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ನಂತರ',\n            past: '%s ಹಿಂದೆ',\n            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n            ss: '%d ಸೆಕೆಂಡುಗಳು',\n            m: 'ಒಂದು ನಿಮಿಷ',\n            mm: '%d ನಿಮಿಷ',\n            h: 'ಒಂದು ಗಂಟೆ',\n            hh: '%d ಗಂಟೆ',\n            d: 'ಒಂದು ದಿನ',\n            dd: '%d ದಿನ',\n            M: 'ಒಂದು ತಿಂಗಳು',\n            MM: '%d ತಿಂಗಳು',\n            y: 'ಒಂದು ವರ್ಷ',\n            yy: '%d ವರ್ಷ',\n        },\n        preparse: function (string) {\n            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ರಾತ್ರಿ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n                return hour;\n            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ಸಂಜೆ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ರಾತ್ರಿ';\n            } else if (hour < 10) {\n                return 'ಬೆಳಿಗ್ಗೆ';\n            } else if (hour < 17) {\n                return 'ಮಧ್ಯಾಹ್ನ';\n            } else if (hour < 20) {\n                return 'ಸಂಜೆ';\n            } else {\n                return 'ರಾತ್ರಿ';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n        ordinal: function (number) {\n            return number + 'ನೇ';\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return kn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/kn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ko.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ko.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ko = moment.defineLocale('ko', {\n        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n            '_'\n        ),\n        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY년 MMMM D일',\n            LLL: 'YYYY년 MMMM D일 A h:mm',\n            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n            l: 'YYYY.MM.DD.',\n            ll: 'YYYY년 MMMM D일',\n            lll: 'YYYY년 MMMM D일 A h:mm',\n            llll: 'YYYY년 MMMM D일 dddd A h:mm',\n        },\n        calendar: {\n            sameDay: '오늘 LT',\n            nextDay: '내일 LT',\n            nextWeek: 'dddd LT',\n            lastDay: '어제 LT',\n            lastWeek: '지난주 dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s 후',\n            past: '%s 전',\n            s: '몇 초',\n            ss: '%d초',\n            m: '1분',\n            mm: '%d분',\n            h: '한 시간',\n            hh: '%d시간',\n            d: '하루',\n            dd: '%d일',\n            M: '한 달',\n            MM: '%d달',\n            y: '일 년',\n            yy: '%d년',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '일';\n                case 'M':\n                    return number + '월';\n                case 'w':\n                case 'W':\n                    return number + '주';\n                default:\n                    return number;\n            }\n        },\n        meridiemParse: /오전|오후/,\n        isPM: function (token) {\n            return token === '오후';\n        },\n        meridiem: function (hour, minute, isUpper) {\n            return hour < 12 ? '오전' : '오후';\n        },\n    });\n\n    return ko;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ko.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ku.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ku.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        months = [\n            'کانونی دووەم',\n            'شوبات',\n            'ئازار',\n            'نیسان',\n            'ئایار',\n            'حوزەیران',\n            'تەمموز',\n            'ئاب',\n            'ئەیلوول',\n            'تشرینی یەكەم',\n            'تشرینی دووەم',\n            'كانونی یەکەم',\n        ];\n\n    var ku = moment.defineLocale('ku', {\n        months: months,\n        monthsShort: months,\n        weekdays:\n            'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n        weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ئێواره‌|به‌یانی/,\n        isPM: function (input) {\n            return /ئێواره‌/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'به‌یانی';\n            } else {\n                return 'ئێواره‌';\n            }\n        },\n        calendar: {\n            sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n            nextDay: '[به‌یانی كاتژمێر] LT',\n            nextWeek: 'dddd [كاتژمێر] LT',\n            lastDay: '[دوێنێ كاتژمێر] LT',\n            lastWeek: 'dddd [كاتژمێر] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'له‌ %s',\n            past: '%s',\n            s: 'چه‌ند چركه‌یه‌ك',\n            ss: 'چركه‌ %d',\n            m: 'یه‌ك خوله‌ك',\n            mm: '%d خوله‌ك',\n            h: 'یه‌ك كاتژمێر',\n            hh: '%d كاتژمێر',\n            d: 'یه‌ك ڕۆژ',\n            dd: '%d ڕۆژ',\n            M: 'یه‌ك مانگ',\n            MM: '%d مانگ',\n            y: 'یه‌ك ساڵ',\n            yy: '%d ساڵ',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ku;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ku.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ky.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ky.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-чү',\n        1: '-чи',\n        2: '-чи',\n        3: '-чү',\n        4: '-чү',\n        5: '-чи',\n        6: '-чы',\n        7: '-чи',\n        8: '-чи',\n        9: '-чу',\n        10: '-чу',\n        20: '-чы',\n        30: '-чу',\n        40: '-чы',\n        50: '-чү',\n        60: '-чы',\n        70: '-чи',\n        80: '-чи',\n        90: '-чу',\n        100: '-чү',\n    };\n\n    var ky = moment.defineLocale('ky', {\n        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n            '_'\n        ),\n        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n            '_'\n        ),\n        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгүн саат] LT',\n            nextDay: '[Эртең саат] LT',\n            nextWeek: 'dddd [саат] LT',\n            lastDay: '[Кечээ саат] LT',\n            lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ичинде',\n            past: '%s мурун',\n            s: 'бирнече секунд',\n            ss: '%d секунд',\n            m: 'бир мүнөт',\n            mm: '%d мүнөт',\n            h: 'бир саат',\n            hh: '%d саат',\n            d: 'бир күн',\n            dd: '%d күн',\n            M: 'бир ай',\n            MM: '%d ай',\n            y: 'бир жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ky;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ky.js?");

/***/ }),

/***/ "./node_modules/moment/locale/lb.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/lb.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eng Minutt', 'enger Minutt'],\n            h: ['eng Stonn', 'enger Stonn'],\n            d: ['een Dag', 'engem Dag'],\n            M: ['ee Mount', 'engem Mount'],\n            y: ['ee Joer', 'engem Joer'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    function processFutureTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'a ' + string;\n        }\n        return 'an ' + string;\n    }\n    function processPastTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'viru ' + string;\n        }\n        return 'virun ' + string;\n    }\n    /**\n     * Returns true if the word before the given number loses the '-n' ending.\n     * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n     *\n     * @param number {integer}\n     * @returns {boolean}\n     */\n    function eifelerRegelAppliesToNumber(number) {\n        number = parseInt(number, 10);\n        if (isNaN(number)) {\n            return false;\n        }\n        if (number < 0) {\n            // Negative Number --> always true\n            return true;\n        } else if (number < 10) {\n            // Only 1 digit\n            if (4 <= number && number <= 7) {\n                return true;\n            }\n            return false;\n        } else if (number < 100) {\n            // 2 digits\n            var lastDigit = number % 10,\n                firstDigit = number / 10;\n            if (lastDigit === 0) {\n                return eifelerRegelAppliesToNumber(firstDigit);\n            }\n            return eifelerRegelAppliesToNumber(lastDigit);\n        } else if (number < 10000) {\n            // 3 or 4 digits --> recursively check first digit\n            while (number >= 10) {\n                number = number / 10;\n            }\n            return eifelerRegelAppliesToNumber(number);\n        } else {\n            // Anything larger than 4 digits: recursively check first n-3 digits\n            number = number / 1000;\n            return eifelerRegelAppliesToNumber(number);\n        }\n    }\n\n    var lb = moment.defineLocale('lb', {\n        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm [Auer]',\n            LTS: 'H:mm:ss [Auer]',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm [Auer]',\n            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n        },\n        calendar: {\n            sameDay: '[Haut um] LT',\n            sameElse: 'L',\n            nextDay: '[Muer um] LT',\n            nextWeek: 'dddd [um] LT',\n            lastDay: '[Gëschter um] LT',\n            lastWeek: function () {\n                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n                switch (this.day()) {\n                    case 2:\n                    case 4:\n                        return '[Leschten] dddd [um] LT';\n                    default:\n                        return '[Leschte] dddd [um] LT';\n                }\n            },\n        },\n        relativeTime: {\n            future: processFutureTime,\n            past: processPastTime,\n            s: 'e puer Sekonnen',\n            ss: '%d Sekonnen',\n            m: processRelativeTime,\n            mm: '%d Minutten',\n            h: processRelativeTime,\n            hh: '%d Stonnen',\n            d: processRelativeTime,\n            dd: '%d Deeg',\n            M: processRelativeTime,\n            MM: '%d Méint',\n            y: processRelativeTime,\n            yy: '%d Joer',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lb;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/lb.js?");

/***/ }),

/***/ "./node_modules/moment/locale/lo.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/lo.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var lo = moment.defineLocale('lo', {\n        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n                '_'\n            ),\n        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n        isPM: function (input) {\n            return input === 'ຕອນແລງ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ຕອນເຊົ້າ';\n            } else {\n                return 'ຕອນແລງ';\n            }\n        },\n        calendar: {\n            sameDay: '[ມື້ນີ້ເວລາ] LT',\n            nextDay: '[ມື້ອື່ນເວລາ] LT',\n            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n            lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ອີກ %s',\n            past: '%sຜ່ານມາ',\n            s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n            ss: '%d ວິນາທີ',\n            m: '1 ນາທີ',\n            mm: '%d ນາທີ',\n            h: '1 ຊົ່ວໂມງ',\n            hh: '%d ຊົ່ວໂມງ',\n            d: '1 ມື້',\n            dd: '%d ມື້',\n            M: '1 ເດືອນ',\n            MM: '%d ເດືອນ',\n            y: '1 ປີ',\n            yy: '%d ປີ',\n        },\n        dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n        ordinal: function (number) {\n            return 'ທີ່' + number;\n        },\n    });\n\n    return lo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/lo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/lt.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/lt.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundė_sekundžių_sekundes',\n        m: 'minutė_minutės_minutę',\n        mm: 'minutės_minučių_minutes',\n        h: 'valanda_valandos_valandą',\n        hh: 'valandos_valandų_valandas',\n        d: 'diena_dienos_dieną',\n        dd: 'dienos_dienų_dienas',\n        M: 'mėnuo_mėnesio_mėnesį',\n        MM: 'mėnesiai_mėnesių_mėnesius',\n        y: 'metai_metų_metus',\n        yy: 'metai_metų_metus',\n    };\n    function translateSeconds(number, withoutSuffix, key, isFuture) {\n        if (withoutSuffix) {\n            return 'kelios sekundės';\n        } else {\n            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n        }\n    }\n    function translateSingular(number, withoutSuffix, key, isFuture) {\n        return withoutSuffix\n            ? forms(key)[0]\n            : isFuture\n            ? forms(key)[1]\n            : forms(key)[2];\n    }\n    function special(number) {\n        return number % 10 === 0 || (number > 10 && number < 20);\n    }\n    function forms(key) {\n        return units[key].split('_');\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        if (number === 1) {\n            return (\n                result + translateSingular(number, withoutSuffix, key[0], isFuture)\n            );\n        } else if (withoutSuffix) {\n            return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n        } else {\n            if (isFuture) {\n                return result + forms(key)[1];\n            } else {\n                return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n            }\n        }\n    }\n    var lt = moment.defineLocale('lt', {\n        months: {\n            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n                '_'\n            ),\n            standalone:\n                'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n                    '_'\n                ),\n            isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n        },\n        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n        weekdays: {\n            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n                '_'\n            ),\n            standalone:\n                'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n                    '_'\n                ),\n            isFormat: /dddd HH:mm/,\n        },\n        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY [m.] MMMM D [d.]',\n            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n            l: 'YYYY-MM-DD',\n            ll: 'YYYY [m.] MMMM D [d.]',\n            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n        },\n        calendar: {\n            sameDay: '[Šiandien] LT',\n            nextDay: '[Rytoj] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[Vakar] LT',\n            lastWeek: '[Praėjusį] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'po %s',\n            past: 'prieš %s',\n            s: translateSeconds,\n            ss: translate,\n            m: translateSingular,\n            mm: translate,\n            h: translateSingular,\n            hh: translate,\n            d: translateSingular,\n            dd: translate,\n            M: translateSingular,\n            MM: translate,\n            y: translateSingular,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n        ordinal: function (number) {\n            return number + '-oji';\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lt;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/lt.js?");

/***/ }),

/***/ "./node_modules/moment/locale/lv.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/lv.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n        m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        h: 'stundas_stundām_stunda_stundas'.split('_'),\n        hh: 'stundas_stundām_stunda_stundas'.split('_'),\n        d: 'dienas_dienām_diena_dienas'.split('_'),\n        dd: 'dienas_dienām_diena_dienas'.split('_'),\n        M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        y: 'gada_gadiem_gads_gadi'.split('_'),\n        yy: 'gada_gadiem_gads_gadi'.split('_'),\n    };\n    /**\n     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n     */\n    function format(forms, number, withoutSuffix) {\n        if (withoutSuffix) {\n            // E.g. \"21 minūte\", \"3 minūtes\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n        } else {\n            // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n            // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n        }\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        return number + ' ' + format(units[key], number, withoutSuffix);\n    }\n    function relativeTimeWithSingular(number, withoutSuffix, key) {\n        return format(units[key], number, withoutSuffix);\n    }\n    function relativeSeconds(number, withoutSuffix) {\n        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n    }\n\n    var lv = moment.defineLocale('lv', {\n        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n        weekdays:\n            'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY.',\n            LL: 'YYYY. [gada] D. MMMM',\n            LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n        },\n        calendar: {\n            sameDay: '[Šodien pulksten] LT',\n            nextDay: '[Rīt pulksten] LT',\n            nextWeek: 'dddd [pulksten] LT',\n            lastDay: '[Vakar pulksten] LT',\n            lastWeek: '[Pagājušā] dddd [pulksten] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'pēc %s',\n            past: 'pirms %s',\n            s: relativeSeconds,\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithSingular,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithSingular,\n            hh: relativeTimeWithPlural,\n            d: relativeTimeWithSingular,\n            dd: relativeTimeWithPlural,\n            M: relativeTimeWithSingular,\n            MM: relativeTimeWithPlural,\n            y: relativeTimeWithSingular,\n            yy: relativeTimeWithPlural,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lv;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/lv.js?");

/***/ }),

/***/ "./node_modules/moment/locale/me.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/me.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekund', 'sekunda', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mjesec', 'mjeseca', 'mjeseci'],\n            yy: ['godina', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                ? wordKey[1]\n                : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var me = moment.defineLocale('me', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sjutra u] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedjelje] [u] LT',\n                    '[prošlog] [ponedjeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srijede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'dan',\n            dd: translator.translate,\n            M: 'mjesec',\n            MM: translator.translate,\n            y: 'godinu',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return me;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/me.js?");

/***/ }),

/***/ "./node_modules/moment/locale/mi.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/mi.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mi = moment.defineLocale('mi', {\n        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n            '_'\n        ),\n        monthsShort:\n            'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n                '_'\n            ),\n        monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [i] HH:mm',\n            LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i teie mahana, i] LT',\n            nextDay: '[apopo i] LT',\n            nextWeek: 'dddd [i] LT',\n            lastDay: '[inanahi i] LT',\n            lastWeek: 'dddd [whakamutunga i] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i roto i %s',\n            past: '%s i mua',\n            s: 'te hēkona ruarua',\n            ss: '%d hēkona',\n            m: 'he meneti',\n            mm: '%d meneti',\n            h: 'te haora',\n            hh: '%d haora',\n            d: 'he ra',\n            dd: '%d ra',\n            M: 'he marama',\n            MM: '%d marama',\n            y: 'he tau',\n            yy: '%d tau',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mi;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/mi.js?");

/***/ }),

/***/ "./node_modules/moment/locale/mk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/mk.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mk = moment.defineLocale('mk', {\n        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Денес во] LT',\n            nextDay: '[Утре во] LT',\n            nextWeek: '[Во] dddd [во] LT',\n            lastDay: '[Вчера во] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Изминатата] dddd [во] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Изминатиот] dddd [во] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пред %s',\n            s: 'неколку секунди',\n            ss: '%d секунди',\n            m: 'една минута',\n            mm: '%d минути',\n            h: 'еден час',\n            hh: '%d часа',\n            d: 'еден ден',\n            dd: '%d дена',\n            M: 'еден месец',\n            MM: '%d месеци',\n            y: 'една година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return mk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/mk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ml.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ml.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ml = moment.defineLocale('ml', {\n        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n                '_'\n            ),\n        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm -നു',\n            LTS: 'A h:mm:ss -നു',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm -നു',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n        },\n        calendar: {\n            sameDay: '[ഇന്ന്] LT',\n            nextDay: '[നാളെ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ഇന്നലെ] LT',\n            lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s കഴിഞ്ഞ്',\n            past: '%s മുൻപ്',\n            s: 'അൽപ നിമിഷങ്ങൾ',\n            ss: '%d സെക്കൻഡ്',\n            m: 'ഒരു മിനിറ്റ്',\n            mm: '%d മിനിറ്റ്',\n            h: 'ഒരു മണിക്കൂർ',\n            hh: '%d മണിക്കൂർ',\n            d: 'ഒരു ദിവസം',\n            dd: '%d ദിവസം',\n            M: 'ഒരു മാസം',\n            MM: '%d മാസം',\n            y: 'ഒരു വർഷം',\n            yy: '%d വർഷം',\n        },\n        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'രാത്രി' && hour >= 4) ||\n                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                meridiem === 'വൈകുന്നേരം'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'രാത്രി';\n            } else if (hour < 12) {\n                return 'രാവിലെ';\n            } else if (hour < 17) {\n                return 'ഉച്ച കഴിഞ്ഞ്';\n            } else if (hour < 20) {\n                return 'വൈകുന്നേരം';\n            } else {\n                return 'രാത്രി';\n            }\n        },\n    });\n\n    return ml;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ml.js?");

/***/ }),

/***/ "./node_modules/moment/locale/mn.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/mn.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 's':\n                return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n            case 'ss':\n                return number + (withoutSuffix ? ' секунд' : ' секундын');\n            case 'm':\n            case 'mm':\n                return number + (withoutSuffix ? ' минут' : ' минутын');\n            case 'h':\n            case 'hh':\n                return number + (withoutSuffix ? ' цаг' : ' цагийн');\n            case 'd':\n            case 'dd':\n                return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n            case 'M':\n            case 'MM':\n                return number + (withoutSuffix ? ' сар' : ' сарын');\n            case 'y':\n            case 'yy':\n                return number + (withoutSuffix ? ' жил' : ' жилийн');\n            default:\n                return number;\n        }\n    }\n\n    var mn = moment.defineLocale('mn', {\n        months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n            '_'\n        ),\n        monthsShort:\n            '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n        weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n        weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY оны MMMMын D',\n            LLL: 'YYYY оны MMMMын D HH:mm',\n            LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n        },\n        meridiemParse: /ҮӨ|ҮХ/i,\n        isPM: function (input) {\n            return input === 'ҮХ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ҮӨ';\n            } else {\n                return 'ҮХ';\n            }\n        },\n        calendar: {\n            sameDay: '[Өнөөдөр] LT',\n            nextDay: '[Маргааш] LT',\n            nextWeek: '[Ирэх] dddd LT',\n            lastDay: '[Өчигдөр] LT',\n            lastWeek: '[Өнгөрсөн] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s дараа',\n            past: '%s өмнө',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + ' өдөр';\n                default:\n                    return number;\n            }\n        },\n    });\n\n    return mn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/mn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/mr.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/mr.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n        var output = '';\n        if (withoutSuffix) {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंद';\n                    break;\n                case 'ss':\n                    output = '%d सेकंद';\n                    break;\n                case 'm':\n                    output = 'एक मिनिट';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटे';\n                    break;\n                case 'h':\n                    output = 'एक तास';\n                    break;\n                case 'hh':\n                    output = '%d तास';\n                    break;\n                case 'd':\n                    output = 'एक दिवस';\n                    break;\n                case 'dd':\n                    output = '%d दिवस';\n                    break;\n                case 'M':\n                    output = 'एक महिना';\n                    break;\n                case 'MM':\n                    output = '%d महिने';\n                    break;\n                case 'y':\n                    output = 'एक वर्ष';\n                    break;\n                case 'yy':\n                    output = '%d वर्षे';\n                    break;\n            }\n        } else {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंदां';\n                    break;\n                case 'ss':\n                    output = '%d सेकंदां';\n                    break;\n                case 'm':\n                    output = 'एका मिनिटा';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटां';\n                    break;\n                case 'h':\n                    output = 'एका तासा';\n                    break;\n                case 'hh':\n                    output = '%d तासां';\n                    break;\n                case 'd':\n                    output = 'एका दिवसा';\n                    break;\n                case 'dd':\n                    output = '%d दिवसां';\n                    break;\n                case 'M':\n                    output = 'एका महिन्या';\n                    break;\n                case 'MM':\n                    output = '%d महिन्यां';\n                    break;\n                case 'y':\n                    output = 'एका वर्षा';\n                    break;\n                case 'yy':\n                    output = '%d वर्षां';\n                    break;\n            }\n        }\n        return output.replace(/%d/i, number);\n    }\n\n    var mr = moment.defineLocale('mr', {\n        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm वाजता',\n            LTS: 'A h:mm:ss वाजता',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm वाजता',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[उद्या] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[मागील] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमध्ये',\n            past: '%sपूर्वी',\n            s: relativeTimeMr,\n            ss: relativeTimeMr,\n            m: relativeTimeMr,\n            mm: relativeTimeMr,\n            h: relativeTimeMr,\n            hh: relativeTimeMr,\n            d: relativeTimeMr,\n            dd: relativeTimeMr,\n            M: relativeTimeMr,\n            MM: relativeTimeMr,\n            y: relativeTimeMr,\n            yy: relativeTimeMr,\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n                return hour;\n            } else if (\n                meridiem === 'दुपारी' ||\n                meridiem === 'सायंकाळी' ||\n                meridiem === 'रात्री'\n            ) {\n                return hour >= 12 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour >= 0 && hour < 6) {\n                return 'पहाटे';\n            } else if (hour < 12) {\n                return 'सकाळी';\n            } else if (hour < 17) {\n                return 'दुपारी';\n            } else if (hour < 20) {\n                return 'सायंकाळी';\n            } else {\n                return 'रात्री';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return mr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/mr.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ms-my.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ms-my.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var msMy = moment.defineLocale('ms-my', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return msMy;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ms-my.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ms.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ms.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ms = moment.defineLocale('ms', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ms;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ms.js?");

/***/ }),

/***/ "./node_modules/moment/locale/mt.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/mt.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mt = moment.defineLocale('mt', {\n        months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n        weekdays:\n            'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n                '_'\n            ),\n        weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n        weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Illum fil-]LT',\n            nextDay: '[Għada fil-]LT',\n            nextWeek: 'dddd [fil-]LT',\n            lastDay: '[Il-bieraħ fil-]LT',\n            lastWeek: 'dddd [li għadda] [fil-]LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'f’ %s',\n            past: '%s ilu',\n            s: 'ftit sekondi',\n            ss: '%d sekondi',\n            m: 'minuta',\n            mm: '%d minuti',\n            h: 'siegħa',\n            hh: '%d siegħat',\n            d: 'ġurnata',\n            dd: '%d ġranet',\n            M: 'xahar',\n            MM: '%d xhur',\n            y: 'sena',\n            yy: '%d sni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mt;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/mt.js?");

/***/ }),

/***/ "./node_modules/moment/locale/my.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/my.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '၁',\n            2: '၂',\n            3: '၃',\n            4: '၄',\n            5: '၅',\n            6: '၆',\n            7: '၇',\n            8: '၈',\n            9: '၉',\n            0: '၀',\n        },\n        numberMap = {\n            '၁': '1',\n            '၂': '2',\n            '၃': '3',\n            '၄': '4',\n            '၅': '5',\n            '၆': '6',\n            '၇': '7',\n            '၈': '8',\n            '၉': '9',\n            '၀': '0',\n        };\n\n    var my = moment.defineLocale('my', {\n        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n            '_'\n        ),\n        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n            '_'\n        ),\n        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ယနေ.] LT [မှာ]',\n            nextDay: '[မနက်ဖြန်] LT [မှာ]',\n            nextWeek: 'dddd LT [မှာ]',\n            lastDay: '[မနေ.က] LT [မှာ]',\n            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'လာမည့် %s မှာ',\n            past: 'လွန်ခဲ့သော %s က',\n            s: 'စက္ကန်.အနည်းငယ်',\n            ss: '%d စက္ကန့်',\n            m: 'တစ်မိနစ်',\n            mm: '%d မိနစ်',\n            h: 'တစ်နာရီ',\n            hh: '%d နာရီ',\n            d: 'တစ်ရက်',\n            dd: '%d ရက်',\n            M: 'တစ်လ',\n            MM: '%d လ',\n            y: 'တစ်နှစ်',\n            yy: '%d နှစ်',\n        },\n        preparse: function (string) {\n            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return my;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/my.js?");

/***/ }),

/***/ "./node_modules/moment/locale/nb.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/nb.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nb = moment.defineLocale('nb', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[forrige] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'noen sekunder',\n            ss: '%d sekunder',\n            m: 'ett minutt',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dager',\n            w: 'en uke',\n            ww: '%d uker',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nb;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/nb.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ne.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ne.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    var ne = moment.defineLocale('ne', {\n        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n            '_'\n        ),\n        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'Aको h:mm बजे',\n            LTS: 'Aको h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, Aको h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राति') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'बिहान') {\n                return hour;\n            } else if (meridiem === 'दिउँसो') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'साँझ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 3) {\n                return 'राति';\n            } else if (hour < 12) {\n                return 'बिहान';\n            } else if (hour < 16) {\n                return 'दिउँसो';\n            } else if (hour < 20) {\n                return 'साँझ';\n            } else {\n                return 'राति';\n            }\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[भोलि] LT',\n            nextWeek: '[आउँदो] dddd[,] LT',\n            lastDay: '[हिजो] LT',\n            lastWeek: '[गएको] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमा',\n            past: '%s अगाडि',\n            s: 'केही क्षण',\n            ss: '%d सेकेण्ड',\n            m: 'एक मिनेट',\n            mm: '%d मिनेट',\n            h: 'एक घण्टा',\n            hh: '%d घण्टा',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महिना',\n            MM: '%d महिना',\n            y: 'एक बर्ष',\n            yy: '%d बर्ष',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ne;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ne.js?");

/***/ }),

/***/ "./node_modules/moment/locale/nl-be.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/nl-be.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^maart|mrt.?$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nlBe = moment.defineLocale('nl-be', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nlBe;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/nl-be.js?");

/***/ }),

/***/ "./node_modules/moment/locale/nl.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/nl.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^maart|mrt.?$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nl = moment.defineLocale('nl', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            w: 'één week',\n            ww: '%d weken',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/nl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/nn.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/nn.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nn = moment.defineLocale('nn', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n        weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n        weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[I dag klokka] LT',\n            nextDay: '[I morgon klokka] LT',\n            nextWeek: 'dddd [klokka] LT',\n            lastDay: '[I går klokka] LT',\n            lastWeek: '[Føregåande] dddd [klokka] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s sidan',\n            s: 'nokre sekund',\n            ss: '%d sekund',\n            m: 'eit minutt',\n            mm: '%d minutt',\n            h: 'ein time',\n            hh: '%d timar',\n            d: 'ein dag',\n            dd: '%d dagar',\n            w: 'ei veke',\n            ww: '%d veker',\n            M: 'ein månad',\n            MM: '%d månader',\n            y: 'eit år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/nn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/oc-lnc.js":
/*!**********************************************!*\
  !*** ./node_modules/moment/locale/oc-lnc.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ocLnc = moment.defineLocale('oc-lnc', {\n        months: {\n            standalone:\n                'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n                    '_'\n                ),\n            format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n            '_'\n        ),\n        weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: '[uèi a] LT',\n            nextDay: '[deman a] LT',\n            nextWeek: 'dddd [a] LT',\n            lastDay: '[ièr a] LT',\n            lastWeek: 'dddd [passat a] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'unas segondas',\n            ss: '%d segondas',\n            m: 'una minuta',\n            mm: '%d minutas',\n            h: 'una ora',\n            hh: '%d oras',\n            d: 'un jorn',\n            dd: '%d jorns',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                    ? 'n'\n                    : number === 3\n                    ? 'r'\n                    : number === 4\n                    ? 't'\n                    : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4,\n        },\n    });\n\n    return ocLnc;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/oc-lnc.js?");

/***/ }),

/***/ "./node_modules/moment/locale/pa-in.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/pa-in.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '੧',\n            2: '੨',\n            3: '੩',\n            4: '੪',\n            5: '੫',\n            6: '੬',\n            7: '੭',\n            8: '੮',\n            9: '੯',\n            0: '੦',\n        },\n        numberMap = {\n            '੧': '1',\n            '੨': '2',\n            '੩': '3',\n            '੪': '4',\n            '੫': '5',\n            '੬': '6',\n            '੭': '7',\n            '੮': '8',\n            '੯': '9',\n            '੦': '0',\n        };\n\n    var paIn = moment.defineLocale('pa-in', {\n        // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n                '_'\n            ),\n        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm ਵਜੇ',\n            LTS: 'A h:mm:ss ਵਜੇ',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n        },\n        calendar: {\n            sameDay: '[ਅਜ] LT',\n            nextDay: '[ਕਲ] LT',\n            nextWeek: '[ਅਗਲਾ] dddd, LT',\n            lastDay: '[ਕਲ] LT',\n            lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ਵਿੱਚ',\n            past: '%s ਪਿਛਲੇ',\n            s: 'ਕੁਝ ਸਕਿੰਟ',\n            ss: '%d ਸਕਿੰਟ',\n            m: 'ਇਕ ਮਿੰਟ',\n            mm: '%d ਮਿੰਟ',\n            h: 'ਇੱਕ ਘੰਟਾ',\n            hh: '%d ਘੰਟੇ',\n            d: 'ਇੱਕ ਦਿਨ',\n            dd: '%d ਦਿਨ',\n            M: 'ਇੱਕ ਮਹੀਨਾ',\n            MM: '%d ਮਹੀਨੇ',\n            y: 'ਇੱਕ ਸਾਲ',\n            yy: '%d ਸਾਲ',\n        },\n        preparse: function (string) {\n            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ਰਾਤ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ਸਵੇਰ') {\n                return hour;\n            } else if (meridiem === 'ਦੁਪਹਿਰ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ਸ਼ਾਮ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ਰਾਤ';\n            } else if (hour < 10) {\n                return 'ਸਵੇਰ';\n            } else if (hour < 17) {\n                return 'ਦੁਪਹਿਰ';\n            } else if (hour < 20) {\n                return 'ਸ਼ਾਮ';\n            } else {\n                return 'ਰਾਤ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return paIn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/pa-in.js?");

/***/ }),

/***/ "./node_modules/moment/locale/pl.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/pl.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsNominative =\n            'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n                '_'\n            ),\n        monthsSubjective =\n            'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n                '_'\n            ),\n        monthsParse = [\n            /^sty/i,\n            /^lut/i,\n            /^mar/i,\n            /^kwi/i,\n            /^maj/i,\n            /^cze/i,\n            /^lip/i,\n            /^sie/i,\n            /^wrz/i,\n            /^paź/i,\n            /^lis/i,\n            /^gru/i,\n        ];\n    function plural(n) {\n        return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n    }\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                return result + (plural(number) ? 'sekundy' : 'sekund');\n            case 'm':\n                return withoutSuffix ? 'minuta' : 'minutę';\n            case 'mm':\n                return result + (plural(number) ? 'minuty' : 'minut');\n            case 'h':\n                return withoutSuffix ? 'godzina' : 'godzinę';\n            case 'hh':\n                return result + (plural(number) ? 'godziny' : 'godzin');\n            case 'ww':\n                return result + (plural(number) ? 'tygodnie' : 'tygodni');\n            case 'MM':\n                return result + (plural(number) ? 'miesiące' : 'miesięcy');\n            case 'yy':\n                return result + (plural(number) ? 'lata' : 'lat');\n        }\n    }\n\n    var pl = moment.defineLocale('pl', {\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return monthsNominative;\n            } else if (/D MMMM/.test(format)) {\n                return monthsSubjective[momentToFormat.month()];\n            } else {\n                return monthsNominative[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays:\n            'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Dziś o] LT',\n            nextDay: '[Jutro o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W niedzielę o] LT';\n\n                    case 2:\n                        return '[We wtorek o] LT';\n\n                    case 3:\n                        return '[W środę o] LT';\n\n                    case 6:\n                        return '[W sobotę o] LT';\n\n                    default:\n                        return '[W] dddd [o] LT';\n                }\n            },\n            lastDay: '[Wczoraj o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W zeszłą niedzielę o] LT';\n                    case 3:\n                        return '[W zeszłą środę o] LT';\n                    case 6:\n                        return '[W zeszłą sobotę o] LT';\n                    default:\n                        return '[W zeszły] dddd [o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: '%s temu',\n            s: 'kilka sekund',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: '1 dzień',\n            dd: '%d dni',\n            w: 'tydzień',\n            ww: translate,\n            M: 'miesiąc',\n            MM: translate,\n            y: 'rok',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/pl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/pt-br.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/pt-br.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ptBr = moment.defineLocale('pt-br', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n        weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'poucos segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        invalidDate: 'Data inválida',\n    });\n\n    return ptBr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/pt-br.js?");

/***/ }),

/***/ "./node_modules/moment/locale/pt.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/pt.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pt = moment.defineLocale('pt', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            w: 'uma semana',\n            ww: '%d semanas',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pt;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/pt.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ro.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ro.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n                ss: 'secunde',\n                mm: 'minute',\n                hh: 'ore',\n                dd: 'zile',\n                ww: 'săptămâni',\n                MM: 'luni',\n                yy: 'ani',\n            },\n            separator = ' ';\n        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n            separator = ' de ';\n        }\n        return number + separator + format[key];\n    }\n\n    var ro = moment.defineLocale('ro', {\n        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n            '_'\n        ),\n        monthsShort:\n            'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[azi la] LT',\n            nextDay: '[mâine la] LT',\n            nextWeek: 'dddd [la] LT',\n            lastDay: '[ieri la] LT',\n            lastWeek: '[fosta] dddd [la] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'peste %s',\n            past: '%s în urmă',\n            s: 'câteva secunde',\n            ss: relativeTimeWithPlural,\n            m: 'un minut',\n            mm: relativeTimeWithPlural,\n            h: 'o oră',\n            hh: relativeTimeWithPlural,\n            d: 'o zi',\n            dd: relativeTimeWithPlural,\n            w: 'o săptămână',\n            ww: relativeTimeWithPlural,\n            M: 'o lună',\n            MM: relativeTimeWithPlural,\n            y: 'un an',\n            yy: relativeTimeWithPlural,\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ro;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ro.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ru.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ru.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n            hh: 'час_часа_часов',\n            dd: 'день_дня_дней',\n            ww: 'неделя_недели_недель',\n            MM: 'месяц_месяца_месяцев',\n            yy: 'год_года_лет',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'минута' : 'минуту';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    var monthsParse = [\n        /^янв/i,\n        /^фев/i,\n        /^мар/i,\n        /^апр/i,\n        /^ма[йя]/i,\n        /^июн/i,\n        /^июл/i,\n        /^авг/i,\n        /^сен/i,\n        /^окт/i,\n        /^ноя/i,\n        /^дек/i,\n    ];\n\n    // http://new.gramota.ru/spravka/rules/139-prop : § 103\n    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n    var ru = moment.defineLocale('ru', {\n        months: {\n            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n                '_'\n            ),\n            standalone:\n                'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n                    '_'\n                ),\n        },\n        monthsShort: {\n            // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n                '_'\n            ),\n            standalone:\n                'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n                    '_'\n                ),\n        },\n        weekdays: {\n            standalone:\n                'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n                    '_'\n                ),\n            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n                '_'\n            ),\n            isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n        },\n        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n        monthsRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // копия предыдущего\n        monthsShortRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // полные названия с падежами\n        monthsStrictRegex:\n            /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n        // Выражение, которое соответствует только сокращённым формам\n        monthsShortStrictRegex:\n            /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., H:mm',\n            LLLL: 'dddd, D MMMM YYYY г., H:mm',\n        },\n        calendar: {\n            sameDay: '[Сегодня, в] LT',\n            nextDay: '[Завтра, в] LT',\n            lastDay: '[Вчера, в] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В следующее] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В следующий] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В следующую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            lastWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В прошлое] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В прошлый] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В прошлую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'через %s',\n            past: '%s назад',\n            s: 'несколько секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'час',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            w: 'неделя',\n            ww: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночи|утра|дня|вечера/i,\n        isPM: function (input) {\n            return /^(дня|вечера)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночи';\n            } else if (hour < 12) {\n                return 'утра';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечера';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                case 'w':\n                case 'W':\n                    return number + '-я';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ru;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ru.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sd.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sd.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوري',\n            'فيبروري',\n            'مارچ',\n            'اپريل',\n            'مئي',\n            'جون',\n            'جولاءِ',\n            'آگسٽ',\n            'سيپٽمبر',\n            'آڪٽوبر',\n            'نومبر',\n            'ڊسمبر',\n        ],\n        days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n    var sd = moment.defineLocale('sd', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[اڄ] LT',\n            nextDay: '[سڀاڻي] LT',\n            nextWeek: 'dddd [اڳين هفتي تي] LT',\n            lastDay: '[ڪالهه] LT',\n            lastWeek: '[گزريل هفتي] dddd [تي] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s پوء',\n            past: '%s اڳ',\n            s: 'چند سيڪنڊ',\n            ss: '%d سيڪنڊ',\n            m: 'هڪ منٽ',\n            mm: '%d منٽ',\n            h: 'هڪ ڪلاڪ',\n            hh: '%d ڪلاڪ',\n            d: 'هڪ ڏينهن',\n            dd: '%d ڏينهن',\n            M: 'هڪ مهينو',\n            MM: '%d مهينا',\n            y: 'هڪ سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sd;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sd.js?");

/***/ }),

/***/ "./node_modules/moment/locale/se.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/se.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var se = moment.defineLocale('se', {\n        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n            '_'\n        ),\n        monthsShort:\n            'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n        weekdays:\n            'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n                '_'\n            ),\n        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'MMMM D. [b.] YYYY',\n            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[otne ti] LT',\n            nextDay: '[ihttin ti] LT',\n            nextWeek: 'dddd [ti] LT',\n            lastDay: '[ikte ti] LT',\n            lastWeek: '[ovddit] dddd [ti] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s geažes',\n            past: 'maŋit %s',\n            s: 'moadde sekunddat',\n            ss: '%d sekunddat',\n            m: 'okta minuhta',\n            mm: '%d minuhtat',\n            h: 'okta diimmu',\n            hh: '%d diimmut',\n            d: 'okta beaivi',\n            dd: '%d beaivvit',\n            M: 'okta mánnu',\n            MM: '%d mánut',\n            y: 'okta jahki',\n            yy: '%d jagit',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return se;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/se.js?");

/***/ }),

/***/ "./node_modules/moment/locale/si.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/si.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    /*jshint -W100*/\n    var si = moment.defineLocale('si', {\n        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n            '_'\n        ),\n        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n            '_'\n        ),\n        weekdays:\n            'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n                '_'\n            ),\n        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'a h:mm',\n            LTS: 'a h:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY MMMM D',\n            LLL: 'YYYY MMMM D, a h:mm',\n            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n        },\n        calendar: {\n            sameDay: '[අද] LT[ට]',\n            nextDay: '[හෙට] LT[ට]',\n            nextWeek: 'dddd LT[ට]',\n            lastDay: '[ඊයේ] LT[ට]',\n            lastWeek: '[පසුගිය] dddd LT[ට]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sකින්',\n            past: '%sකට පෙර',\n            s: 'තත්පර කිහිපය',\n            ss: 'තත්පර %d',\n            m: 'මිනිත්තුව',\n            mm: 'මිනිත්තු %d',\n            h: 'පැය',\n            hh: 'පැය %d',\n            d: 'දිනය',\n            dd: 'දින %d',\n            M: 'මාසය',\n            MM: 'මාස %d',\n            y: 'වසර',\n            yy: 'වසර %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n        ordinal: function (number) {\n            return number + ' වැනි';\n        },\n        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n        isPM: function (input) {\n            return input === 'ප.ව.' || input === 'පස් වරු';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'ප.ව.' : 'පස් වරු';\n            } else {\n                return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n            }\n        },\n    });\n\n    return si;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/si.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sk.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months =\n            'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n                '_'\n            ),\n        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n    function plural(n) {\n        return n > 1 && n < 5;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekúnd');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minúty' : 'minút');\n                } else {\n                    return result + 'minútami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodín');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'deň' : 'dňom';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dni' : 'dní');\n                } else {\n                    return result + 'dňami';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'mesiace' : 'mesiacov');\n                } else {\n                    return result + 'mesiacmi';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokom';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'rokov');\n                } else {\n                    return result + 'rokmi';\n                }\n        }\n    }\n\n    var sk = moment.defineLocale('sk', {\n        months: months,\n        monthsShort: monthsShort,\n        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[dnes o] LT',\n            nextDay: '[zajtra o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [o] LT';\n                    case 3:\n                        return '[v stredu o] LT';\n                    case 4:\n                        return '[vo štvrtok o] LT';\n                    case 5:\n                        return '[v piatok o] LT';\n                    case 6:\n                        return '[v sobotu o] LT';\n                }\n            },\n            lastDay: '[včera o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulú nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[minulý] dddd [o] LT';\n                    case 3:\n                        return '[minulú stredu o] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [o] LT';\n                    case 6:\n                        return '[minulú sobotu o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pred %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sl.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sl.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nekaj sekund'\n                    : 'nekaj sekundami';\n            case 'ss':\n                if (number === 1) {\n                    result += withoutSuffix ? 'sekundo' : 'sekundi';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n                } else {\n                    result += 'sekund';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'ena minuta' : 'eno minuto';\n            case 'mm':\n                if (number === 1) {\n                    result += withoutSuffix ? 'minuta' : 'minuto';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'ena ura' : 'eno uro';\n            case 'hh':\n                if (number === 1) {\n                    result += withoutSuffix ? 'ura' : 'uro';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'uri' : 'urama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'ure' : 'urami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'ur' : 'urami';\n                }\n                return result;\n            case 'd':\n                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n            case 'dd':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n                } else {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n                }\n                return result;\n            case 'M':\n                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n            case 'MM':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n                } else {\n                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n                }\n                return result;\n            case 'y':\n                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n            case 'yy':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'leto' : 'letom';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'leta' : 'leti';\n                } else {\n                    result += withoutSuffix || isFuture ? 'let' : 'leti';\n                }\n                return result;\n        }\n    }\n\n    var sl = moment.defineLocale('sl', {\n        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD. MM. YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danes ob] LT',\n            nextDay: '[jutri ob] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[v] [sredo] [ob] LT';\n                    case 6:\n                        return '[v] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[v] dddd [ob] LT';\n                }\n            },\n            lastDay: '[včeraj ob] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prejšnjo] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[prejšnjo] [sredo] [ob] LT';\n                    case 6:\n                        return '[prejšnjo] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prejšnji] dddd [ob] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'čez %s',\n            past: 'pred %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sq.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sq.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sq = moment.defineLocale('sq', {\n        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n            '_'\n        ),\n        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /PD|MD/,\n        isPM: function (input) {\n            return input.charAt(0) === 'M';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            return hours < 12 ? 'PD' : 'MD';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Sot në] LT',\n            nextDay: '[Nesër në] LT',\n            nextWeek: 'dddd [në] LT',\n            lastDay: '[Dje në] LT',\n            lastWeek: 'dddd [e kaluar në] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'në %s',\n            past: '%s më parë',\n            s: 'disa sekonda',\n            ss: '%d sekonda',\n            m: 'një minutë',\n            mm: '%d minuta',\n            h: 'një orë',\n            hh: '%d orë',\n            d: 'një ditë',\n            dd: '%d ditë',\n            M: 'një muaj',\n            MM: '%d muaj',\n            y: 'një vit',\n            yy: '%d vite',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sq;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sq.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sr-cyrl.js":
/*!***********************************************!*\
  !*** ./node_modules/moment/locale/sr-cyrl.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['секунда', 'секунде', 'секунди'],\n            m: ['један минут', 'једног минута'],\n            mm: ['минут', 'минута', 'минута'],\n            h: ['један сат', 'једног сата'],\n            hh: ['сат', 'сата', 'сати'],\n            d: ['један дан', 'једног дана'],\n            dd: ['дан', 'дана', 'дана'],\n            M: ['један месец', 'једног месеца'],\n            MM: ['месец', 'месеца', 'месеци'],\n            y: ['једну годину', 'једне године'],\n            yy: ['годину', 'године', 'година'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'једна година';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'годину') {\n                return number + ' година';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var srCyrl = moment.defineLocale('sr-cyrl', {\n        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n            '_'\n        ),\n        monthsShort:\n            'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[данас у] LT',\n            nextDay: '[сутра у] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[у] [недељу] [у] LT';\n                    case 3:\n                        return '[у] [среду] [у] LT';\n                    case 6:\n                        return '[у] [суботу] [у] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[у] dddd [у] LT';\n                }\n            },\n            lastDay: '[јуче у] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[прошле] [недеље] [у] LT',\n                    '[прошлог] [понедељка] [у] LT',\n                    '[прошлог] [уторка] [у] LT',\n                    '[прошле] [среде] [у] LT',\n                    '[прошлог] [четвртка] [у] LT',\n                    '[прошлог] [петка] [у] LT',\n                    '[прошле] [суботе] [у] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пре %s',\n            s: 'неколико секунди',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return srCyrl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sr-cyrl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sr.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sr.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekunda', 'sekunde', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            d: ['jedan dan', 'jednog dana'],\n            dd: ['dan', 'dana', 'dana'],\n            M: ['jedan mesec', 'jednog meseca'],\n            MM: ['mesec', 'meseca', 'meseci'],\n            y: ['jednu godinu', 'jedne godine'],\n            yy: ['godinu', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'jedna godina';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'godinu') {\n                return number + ' godina';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var sr = moment.defineLocale('sr', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedelju] [u] LT';\n                    case 3:\n                        return '[u] [sredu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedelje] [u] LT',\n                    '[prošlog] [ponedeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pre %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sr.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ss.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ss.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ss = moment.defineLocale('ss', {\n        months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n            '_'\n        ),\n        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n        weekdays:\n            'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n                '_'\n            ),\n        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Namuhla nga] LT',\n            nextDay: '[Kusasa nga] LT',\n            nextWeek: 'dddd [nga] LT',\n            lastDay: '[Itolo nga] LT',\n            lastWeek: 'dddd [leliphelile] [nga] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'nga %s',\n            past: 'wenteka nga %s',\n            s: 'emizuzwana lomcane',\n            ss: '%d mzuzwana',\n            m: 'umzuzu',\n            mm: '%d emizuzu',\n            h: 'lihora',\n            hh: '%d emahora',\n            d: 'lilanga',\n            dd: '%d emalanga',\n            M: 'inyanga',\n            MM: '%d tinyanga',\n            y: 'umnyaka',\n            yy: '%d iminyaka',\n        },\n        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'ekuseni';\n            } else if (hours < 15) {\n                return 'emini';\n            } else if (hours < 19) {\n                return 'entsambama';\n            } else {\n                return 'ebusuku';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ekuseni') {\n                return hour;\n            } else if (meridiem === 'emini') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n                if (hour === 0) {\n                    return 0;\n                }\n                return hour + 12;\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: '%d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ss;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ss.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sv.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sv.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sv = moment.defineLocale('sv', {\n        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Idag] LT',\n            nextDay: '[Imorgon] LT',\n            lastDay: '[Igår] LT',\n            nextWeek: '[På] dddd LT',\n            lastWeek: '[I] dddd[s] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: 'för %s sedan',\n            s: 'några sekunder',\n            ss: '%d sekunder',\n            m: 'en minut',\n            mm: '%d minuter',\n            h: 'en timme',\n            hh: '%d timmar',\n            d: 'en dag',\n            dd: '%d dagar',\n            M: 'en månad',\n            MM: '%d månader',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? ':e'\n                        : b === 1\n                        ? ':a'\n                        : b === 2\n                        ? ':a'\n                        : b === 3\n                        ? ':e'\n                        : ':e';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sv;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sv.js?");

/***/ }),

/***/ "./node_modules/moment/locale/sw.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/sw.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sw = moment.defineLocale('sw', {\n        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n        weekdays:\n            'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n                '_'\n            ),\n        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'hh:mm A',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[leo saa] LT',\n            nextDay: '[kesho saa] LT',\n            nextWeek: '[wiki ijayo] dddd [saat] LT',\n            lastDay: '[jana] LT',\n            lastWeek: '[wiki iliyopita] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s baadaye',\n            past: 'tokea %s',\n            s: 'hivi punde',\n            ss: 'sekunde %d',\n            m: 'dakika moja',\n            mm: 'dakika %d',\n            h: 'saa limoja',\n            hh: 'masaa %d',\n            d: 'siku moja',\n            dd: 'siku %d',\n            M: 'mwezi mmoja',\n            MM: 'miezi %d',\n            y: 'mwaka mmoja',\n            yy: 'miaka %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sw;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/sw.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ta.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ta.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '௧',\n            2: '௨',\n            3: '௩',\n            4: '௪',\n            5: '௫',\n            6: '௬',\n            7: '௭',\n            8: '௮',\n            9: '௯',\n            0: '௦',\n        },\n        numberMap = {\n            '௧': '1',\n            '௨': '2',\n            '௩': '3',\n            '௪': '4',\n            '௫': '5',\n            '௬': '6',\n            '௭': '7',\n            '௮': '8',\n            '௯': '9',\n            '௦': '0',\n        };\n\n    var ta = moment.defineLocale('ta', {\n        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n            '_'\n        ),\n        monthsShort:\n            'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n                '_'\n            ),\n        weekdays:\n            'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n                '_'\n            ),\n        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n            '_'\n        ),\n        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, HH:mm',\n            LLLL: 'dddd, D MMMM YYYY, HH:mm',\n        },\n        calendar: {\n            sameDay: '[இன்று] LT',\n            nextDay: '[நாளை] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[நேற்று] LT',\n            lastWeek: '[கடந்த வாரம்] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s இல்',\n            past: '%s முன்',\n            s: 'ஒரு சில விநாடிகள்',\n            ss: '%d விநாடிகள்',\n            m: 'ஒரு நிமிடம்',\n            mm: '%d நிமிடங்கள்',\n            h: 'ஒரு மணி நேரம்',\n            hh: '%d மணி நேரம்',\n            d: 'ஒரு நாள்',\n            dd: '%d நாட்கள்',\n            M: 'ஒரு மாதம்',\n            MM: '%d மாதங்கள்',\n            y: 'ஒரு வருடம்',\n            yy: '%d ஆண்டுகள்',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n        ordinal: function (number) {\n            return number + 'வது';\n        },\n        preparse: function (string) {\n            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // refer http://ta.wikipedia.org/s/1er1\n        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 2) {\n                return ' யாமம்';\n            } else if (hour < 6) {\n                return ' வைகறை'; // வைகறை\n            } else if (hour < 10) {\n                return ' காலை'; // காலை\n            } else if (hour < 14) {\n                return ' நண்பகல்'; // நண்பகல்\n            } else if (hour < 18) {\n                return ' எற்பாடு'; // எற்பாடு\n            } else if (hour < 22) {\n                return ' மாலை'; // மாலை\n            } else {\n                return ' யாமம்';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'யாமம்') {\n                return hour < 2 ? hour : hour + 12;\n            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n                return hour;\n            } else if (meridiem === 'நண்பகல்') {\n                return hour >= 10 ? hour : hour + 12;\n            } else {\n                return hour + 12;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ta;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ta.js?");

/***/ }),

/***/ "./node_modules/moment/locale/te.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/te.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var te = moment.defineLocale('te', {\n        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n            '_'\n        ),\n        monthsShort:\n            'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n                '_'\n            ),\n        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[నేడు] LT',\n            nextDay: '[రేపు] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[నిన్న] LT',\n            lastWeek: '[గత] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s లో',\n            past: '%s క్రితం',\n            s: 'కొన్ని క్షణాలు',\n            ss: '%d సెకన్లు',\n            m: 'ఒక నిమిషం',\n            mm: '%d నిమిషాలు',\n            h: 'ఒక గంట',\n            hh: '%d గంటలు',\n            d: 'ఒక రోజు',\n            dd: '%d రోజులు',\n            M: 'ఒక నెల',\n            MM: '%d నెలలు',\n            y: 'ఒక సంవత్సరం',\n            yy: '%d సంవత్సరాలు',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n        ordinal: '%dవ',\n        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'రాత్రి') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ఉదయం') {\n                return hour;\n            } else if (meridiem === 'మధ్యాహ్నం') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'సాయంత్రం') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'రాత్రి';\n            } else if (hour < 10) {\n                return 'ఉదయం';\n            } else if (hour < 17) {\n                return 'మధ్యాహ్నం';\n            } else if (hour < 20) {\n                return 'సాయంత్రం';\n            } else {\n                return 'రాత్రి';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return te;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/te.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tet.js":
/*!*******************************************!*\
  !*** ./node_modules/moment/locale/tet.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tet = moment.defineLocale('tet', {\n        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Ohin iha] LT',\n            nextDay: '[Aban iha] LT',\n            nextWeek: 'dddd [iha] LT',\n            lastDay: '[Horiseik iha] LT',\n            lastWeek: 'dddd [semana kotuk] [iha] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'iha %s',\n            past: '%s liuba',\n            s: 'segundu balun',\n            ss: 'segundu %d',\n            m: 'minutu ida',\n            mm: 'minutu %d',\n            h: 'oras ida',\n            hh: 'oras %d',\n            d: 'loron ida',\n            dd: 'loron %d',\n            M: 'fulan ida',\n            MM: 'fulan %d',\n            y: 'tinan ida',\n            yy: 'tinan %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tet;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tet.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tg.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/tg.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ум',\n        1: '-ум',\n        2: '-юм',\n        3: '-юм',\n        4: '-ум',\n        5: '-ум',\n        6: '-ум',\n        7: '-ум',\n        8: '-ум',\n        9: '-ум',\n        10: '-ум',\n        12: '-ум',\n        13: '-ум',\n        20: '-ум',\n        30: '-юм',\n        40: '-ум',\n        50: '-ум',\n        60: '-ум',\n        70: '-ум',\n        80: '-ум',\n        90: '-ум',\n        100: '-ум',\n    };\n\n    var tg = moment.defineLocale('tg', {\n        months: {\n            format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n                '_'\n            ),\n            standalone:\n                'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n            '_'\n        ),\n        weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n        weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Имрӯз соати] LT',\n            nextDay: '[Фардо соати] LT',\n            lastDay: '[Дирӯз соати] LT',\n            nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n            lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'баъди %s',\n            past: '%s пеш',\n            s: 'якчанд сония',\n            m: 'як дақиқа',\n            mm: '%d дақиқа',\n            h: 'як соат',\n            hh: '%d соат',\n            d: 'як рӯз',\n            dd: '%d рӯз',\n            M: 'як моҳ',\n            MM: '%d моҳ',\n            y: 'як сол',\n            yy: '%d сол',\n        },\n        meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'шаб') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'субҳ') {\n                return hour;\n            } else if (meridiem === 'рӯз') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'бегоҳ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'шаб';\n            } else if (hour < 11) {\n                return 'субҳ';\n            } else if (hour < 16) {\n                return 'рӯз';\n            } else if (hour < 19) {\n                return 'бегоҳ';\n            } else {\n                return 'шаб';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1th is the first week of the year.\n        },\n    });\n\n    return tg;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tg.js?");

/***/ }),

/***/ "./node_modules/moment/locale/th.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/th.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var th = moment.defineLocale('th', {\n        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n            '_'\n        ),\n        monthsShort:\n            'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY เวลา H:mm',\n            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n        },\n        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n        isPM: function (input) {\n            return input === 'หลังเที่ยง';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ก่อนเที่ยง';\n            } else {\n                return 'หลังเที่ยง';\n            }\n        },\n        calendar: {\n            sameDay: '[วันนี้ เวลา] LT',\n            nextDay: '[พรุ่งนี้ เวลา] LT',\n            nextWeek: 'dddd[หน้า เวลา] LT',\n            lastDay: '[เมื่อวานนี้ เวลา] LT',\n            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'อีก %s',\n            past: '%sที่แล้ว',\n            s: 'ไม่กี่วินาที',\n            ss: '%d วินาที',\n            m: '1 นาที',\n            mm: '%d นาที',\n            h: '1 ชั่วโมง',\n            hh: '%d ชั่วโมง',\n            d: '1 วัน',\n            dd: '%d วัน',\n            w: '1 สัปดาห์',\n            ww: '%d สัปดาห์',\n            M: '1 เดือน',\n            MM: '%d เดือน',\n            y: '1 ปี',\n            yy: '%d ปี',\n        },\n    });\n\n    return th;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/th.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/tk.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inji\",\n        5: \"'inji\",\n        8: \"'inji\",\n        70: \"'inji\",\n        80: \"'inji\",\n        2: \"'nji\",\n        7: \"'nji\",\n        20: \"'nji\",\n        50: \"'nji\",\n        3: \"'ünji\",\n        4: \"'ünji\",\n        100: \"'ünji\",\n        6: \"'njy\",\n        9: \"'unjy\",\n        10: \"'unjy\",\n        30: \"'unjy\",\n        60: \"'ynjy\",\n        90: \"'ynjy\",\n    };\n\n    var tk = moment.defineLocale('tk', {\n        months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n        weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n            '_'\n        ),\n        weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n        weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün sagat] LT',\n            nextDay: '[ertir sagat] LT',\n            nextWeek: '[indiki] dddd [sagat] LT',\n            lastDay: '[düýn] LT',\n            lastWeek: '[geçen] dddd [sagat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s soň',\n            past: '%s öň',\n            s: 'birnäçe sekunt',\n            m: 'bir minut',\n            mm: '%d minut',\n            h: 'bir sagat',\n            hh: '%d sagat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir aý',\n            MM: '%d aý',\n            y: 'bir ýyl',\n            yy: '%d ýyl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'unjy\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tl-ph.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/tl-ph.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tlPh = moment.defineLocale('tl-ph', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlPh;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tl-ph.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tlh.js":
/*!*******************************************!*\
  !*** ./node_modules/moment/locale/tlh.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n    function translateFuture(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'leS'\n                : output.indexOf('jar') !== -1\n                ? time.slice(0, -3) + 'waQ'\n                : output.indexOf('DIS') !== -1\n                ? time.slice(0, -3) + 'nem'\n                : time + ' pIq';\n        return time;\n    }\n\n    function translatePast(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'Hu’'\n                : output.indexOf('jar') !== -1\n                ? time.slice(0, -3) + 'wen'\n                : output.indexOf('DIS') !== -1\n                ? time.slice(0, -3) + 'ben'\n                : time + ' ret';\n        return time;\n    }\n\n    function translate(number, withoutSuffix, string, isFuture) {\n        var numberNoun = numberAsNoun(number);\n        switch (string) {\n            case 'ss':\n                return numberNoun + ' lup';\n            case 'mm':\n                return numberNoun + ' tup';\n            case 'hh':\n                return numberNoun + ' rep';\n            case 'dd':\n                return numberNoun + ' jaj';\n            case 'MM':\n                return numberNoun + ' jar';\n            case 'yy':\n                return numberNoun + ' DIS';\n        }\n    }\n\n    function numberAsNoun(number) {\n        var hundred = Math.floor((number % 1000) / 100),\n            ten = Math.floor((number % 100) / 10),\n            one = number % 10,\n            word = '';\n        if (hundred > 0) {\n            word += numbersNouns[hundred] + 'vatlh';\n        }\n        if (ten > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n        }\n        if (one > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[one];\n        }\n        return word === '' ? 'pagh' : word;\n    }\n\n    var tlh = moment.defineLocale('tlh', {\n        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n            '_'\n        ),\n        monthsShort:\n            'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        weekdaysShort:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        weekdaysMin:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[DaHjaj] LT',\n            nextDay: '[wa’leS] LT',\n            nextWeek: 'LLL',\n            lastDay: '[wa’Hu’] LT',\n            lastWeek: 'LLL',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: translateFuture,\n            past: translatePast,\n            s: 'puS lup',\n            ss: translate,\n            m: 'wa’ tup',\n            mm: translate,\n            h: 'wa’ rep',\n            hh: translate,\n            d: 'wa’ jaj',\n            dd: translate,\n            M: 'wa’ jar',\n            MM: translate,\n            y: 'wa’ DIS',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlh;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tlh.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tr.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/tr.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inci\",\n        5: \"'inci\",\n        8: \"'inci\",\n        70: \"'inci\",\n        80: \"'inci\",\n        2: \"'nci\",\n        7: \"'nci\",\n        20: \"'nci\",\n        50: \"'nci\",\n        3: \"'üncü\",\n        4: \"'üncü\",\n        100: \"'üncü\",\n        6: \"'ncı\",\n        9: \"'uncu\",\n        10: \"'uncu\",\n        30: \"'uncu\",\n        60: \"'ıncı\",\n        90: \"'ıncı\",\n    };\n\n    var tr = moment.defineLocale('tr', {\n        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n            '_'\n        ),\n        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n            '_'\n        ),\n        weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'öö' : 'ÖÖ';\n            } else {\n                return isLower ? 'ös' : 'ÖS';\n            }\n        },\n        meridiemParse: /öö|ÖÖ|ös|ÖS/,\n        isPM: function (input) {\n            return input === 'ös' || input === 'ÖS';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[yarın saat] LT',\n            nextWeek: '[gelecek] dddd [saat] LT',\n            lastDay: '[dün] LT',\n            lastWeek: '[geçen] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s önce',\n            s: 'birkaç saniye',\n            ss: '%d saniye',\n            m: 'bir dakika',\n            mm: '%d dakika',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            w: 'bir hafta',\n            ww: '%d hafta',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir yıl',\n            yy: '%d yıl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'ıncı\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tr;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tr.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tzl.js":
/*!*******************************************!*\
  !*** ./node_modules/moment/locale/tzl.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n    // This is currently too difficult (maybe even impossible) to add.\n    var tzl = moment.defineLocale('tzl', {\n        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM [dallas] YYYY',\n            LLL: 'D. MMMM [dallas] YYYY HH.mm',\n            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n        },\n        meridiemParse: /d\\'o|d\\'a/i,\n        isPM: function (input) {\n            return \"d'o\" === input.toLowerCase();\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? \"d'o\" : \"D'O\";\n            } else {\n                return isLower ? \"d'a\" : \"D'A\";\n            }\n        },\n        calendar: {\n            sameDay: '[oxhi à] LT',\n            nextDay: '[demà à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[ieiri à] LT',\n            lastWeek: '[sür el] dddd [lasteu à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'osprei %s',\n            past: 'ja%s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['viensas secunds', \"'iensas secunds\"],\n            ss: [number + ' secunds', '' + number + ' secunds'],\n            m: [\"'n míut\", \"'iens míut\"],\n            mm: [number + ' míuts', '' + number + ' míuts'],\n            h: [\"'n þora\", \"'iensa þora\"],\n            hh: [number + ' þoras', '' + number + ' þoras'],\n            d: [\"'n ziua\", \"'iensa ziua\"],\n            dd: [number + ' ziuas', '' + number + ' ziuas'],\n            M: [\"'n mes\", \"'iens mes\"],\n            MM: [number + ' mesen', '' + number + ' mesen'],\n            y: [\"'n ar\", \"'iens ar\"],\n            yy: [number + ' ars', '' + number + ' ars'],\n        };\n        return isFuture\n            ? format[key][0]\n            : withoutSuffix\n            ? format[key][0]\n            : format[key][1];\n    }\n\n    return tzl;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tzl.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tzm-latn.js":
/*!************************************************!*\
  !*** ./node_modules/moment/locale/tzm-latn.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzmLatn = moment.defineLocale('tzm-latn', {\n        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n            '_'\n        ),\n        monthsShort:\n            'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n                '_'\n            ),\n        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[asdkh g] LT',\n            nextDay: '[aska g] LT',\n            nextWeek: 'dddd [g] LT',\n            lastDay: '[assant g] LT',\n            lastWeek: 'dddd [g] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dadkh s yan %s',\n            past: 'yan %s',\n            s: 'imik',\n            ss: '%d imik',\n            m: 'minuḍ',\n            mm: '%d minuḍ',\n            h: 'saɛa',\n            hh: '%d tassaɛin',\n            d: 'ass',\n            dd: '%d ossan',\n            M: 'ayowr',\n            MM: '%d iyyirn',\n            y: 'asgas',\n            yy: '%d isgasn',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzmLatn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tzm-latn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/tzm.js":
/*!*******************************************!*\
  !*** ./node_modules/moment/locale/tzm.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzm = moment.defineLocale('tzm', {\n        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n                '_'\n            ),\n        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n            nextWeek: 'dddd [ⴴ] LT',\n            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n            lastWeek: 'dddd [ⴴ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n            past: 'ⵢⴰⵏ %s',\n            s: 'ⵉⵎⵉⴽ',\n            ss: '%d ⵉⵎⵉⴽ',\n            m: 'ⵎⵉⵏⵓⴺ',\n            mm: '%d ⵎⵉⵏⵓⴺ',\n            h: 'ⵙⴰⵄⴰ',\n            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n            d: 'ⴰⵙⵙ',\n            dd: '%d oⵙⵙⴰⵏ',\n            M: 'ⴰⵢoⵓⵔ',\n            MM: '%d ⵉⵢⵢⵉⵔⵏ',\n            y: 'ⴰⵙⴳⴰⵙ',\n            yy: '%d ⵉⵙⴳⴰⵙⵏ',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzm;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/tzm.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ug-cn.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/ug-cn.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ugCn = moment.defineLocale('ug-cn', {\n        months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n                '_'\n            ),\n        weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n            '_'\n        ),\n        weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n            LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n            LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n        },\n        meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                meridiem === 'يېرىم كېچە' ||\n                meridiem === 'سەھەر' ||\n                meridiem === 'چۈشتىن بۇرۇن'\n            ) {\n                return hour;\n            } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n                return hour + 12;\n            } else {\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return 'يېرىم كېچە';\n            } else if (hm < 900) {\n                return 'سەھەر';\n            } else if (hm < 1130) {\n                return 'چۈشتىن بۇرۇن';\n            } else if (hm < 1230) {\n                return 'چۈش';\n            } else if (hm < 1800) {\n                return 'چۈشتىن كېيىن';\n            } else {\n                return 'كەچ';\n            }\n        },\n        calendar: {\n            sameDay: '[بۈگۈن سائەت] LT',\n            nextDay: '[ئەتە سائەت] LT',\n            nextWeek: '[كېلەركى] dddd [سائەت] LT',\n            lastDay: '[تۆنۈگۈن] LT',\n            lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s كېيىن',\n            past: '%s بۇرۇن',\n            s: 'نەچچە سېكونت',\n            ss: '%d سېكونت',\n            m: 'بىر مىنۇت',\n            mm: '%d مىنۇت',\n            h: 'بىر سائەت',\n            hh: '%d سائەت',\n            d: 'بىر كۈن',\n            dd: '%d كۈن',\n            M: 'بىر ئاي',\n            MM: '%d ئاي',\n            y: 'بىر يىل',\n            yy: '%d يىل',\n        },\n\n        dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '-كۈنى';\n                case 'w':\n                case 'W':\n                    return number + '-ھەپتە';\n                default:\n                    return number;\n            }\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return ugCn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ug-cn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/uk.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/uk.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n            ? forms[1]\n            : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n            mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n            hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n            dd: 'день_дні_днів',\n            MM: 'місяць_місяці_місяців',\n            yy: 'рік_роки_років',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвилина' : 'хвилину';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'година' : 'годину';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    function weekdaysCaseReplace(m, format) {\n        var weekdays = {\n                nominative:\n                    'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n                        '_'\n                    ),\n                accusative:\n                    'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n                        '_'\n                    ),\n                genitive:\n                    'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n                        '_'\n                    ),\n            },\n            nounCase;\n\n        if (m === true) {\n            return weekdays['nominative']\n                .slice(1, 7)\n                .concat(weekdays['nominative'].slice(0, 1));\n        }\n        if (!m) {\n            return weekdays['nominative'];\n        }\n\n        nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n            ? 'accusative'\n            : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n            ? 'genitive'\n            : 'nominative';\n        return weekdays[nounCase][m.day()];\n    }\n    function processHoursFunction(str) {\n        return function () {\n            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n        };\n    }\n\n    var uk = moment.defineLocale('uk', {\n        months: {\n            format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n                '_'\n            ),\n            standalone:\n                'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n            '_'\n        ),\n        weekdays: weekdaysCaseReplace,\n        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY р.',\n            LLL: 'D MMMM YYYY р., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n        },\n        calendar: {\n            sameDay: processHoursFunction('[Сьогодні '),\n            nextDay: processHoursFunction('[Завтра '),\n            lastDay: processHoursFunction('[Вчора '),\n            nextWeek: processHoursFunction('[У] dddd ['),\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return processHoursFunction('[Минулої] dddd [').call(this);\n                    case 1:\n                    case 2:\n                    case 4:\n                        return processHoursFunction('[Минулого] dddd [').call(this);\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: '%s тому',\n            s: 'декілька секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'годину',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            M: 'місяць',\n            MM: relativeTimeWithPlural,\n            y: 'рік',\n            yy: relativeTimeWithPlural,\n        },\n        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n        meridiemParse: /ночі|ранку|дня|вечора/,\n        isPM: function (input) {\n            return /^(дня|вечора)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночі';\n            } else if (hour < 12) {\n                return 'ранку';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечора';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/uk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/ur.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/ur.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوری',\n            'فروری',\n            'مارچ',\n            'اپریل',\n            'مئی',\n            'جون',\n            'جولائی',\n            'اگست',\n            'ستمبر',\n            'اکتوبر',\n            'نومبر',\n            'دسمبر',\n        ],\n        days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n    var ur = moment.defineLocale('ur', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[آج بوقت] LT',\n            nextDay: '[کل بوقت] LT',\n            nextWeek: 'dddd [بوقت] LT',\n            lastDay: '[گذشتہ روز بوقت] LT',\n            lastWeek: '[گذشتہ] dddd [بوقت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s بعد',\n            past: '%s قبل',\n            s: 'چند سیکنڈ',\n            ss: '%d سیکنڈ',\n            m: 'ایک منٹ',\n            mm: '%d منٹ',\n            h: 'ایک گھنٹہ',\n            hh: '%d گھنٹے',\n            d: 'ایک دن',\n            dd: '%d دن',\n            M: 'ایک ماہ',\n            MM: '%d ماہ',\n            y: 'ایک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ur;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/ur.js?");

/***/ }),

/***/ "./node_modules/moment/locale/uz-latn.js":
/*!***********************************************!*\
  !*** ./node_modules/moment/locale/uz-latn.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uzLatn = moment.defineLocale('uz-latn', {\n        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n        weekdays:\n            'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n                '_'\n            ),\n        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bugun soat] LT [da]',\n            nextDay: '[Ertaga] LT [da]',\n            nextWeek: 'dddd [kuni soat] LT [da]',\n            lastDay: '[Kecha soat] LT [da]',\n            lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Yaqin %s ichida',\n            past: 'Bir necha %s oldin',\n            s: 'soniya',\n            ss: '%d soniya',\n            m: 'bir daqiqa',\n            mm: '%d daqiqa',\n            h: 'bir soat',\n            hh: '%d soat',\n            d: 'bir kun',\n            dd: '%d kun',\n            M: 'bir oy',\n            MM: '%d oy',\n            y: 'bir yil',\n            yy: '%d yil',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uzLatn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/uz-latn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/uz.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/uz.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uz = moment.defineLocale('uz', {\n        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бугун соат] LT [да]',\n            nextDay: '[Эртага] LT [да]',\n            nextWeek: 'dddd [куни соат] LT [да]',\n            lastDay: '[Кеча соат] LT [да]',\n            lastWeek: '[Утган] dddd [куни соат] LT [да]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Якин %s ичида',\n            past: 'Бир неча %s олдин',\n            s: 'фурсат',\n            ss: '%d фурсат',\n            m: 'бир дакика',\n            mm: '%d дакика',\n            h: 'бир соат',\n            hh: '%d соат',\n            d: 'бир кун',\n            dd: '%d кун',\n            M: 'бир ой',\n            MM: '%d ой',\n            y: 'бир йил',\n            yy: '%d йил',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return uz;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/uz.js?");

/***/ }),

/***/ "./node_modules/moment/locale/vi.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/vi.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var vi = moment.defineLocale('vi', {\n        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n            '_'\n        ),\n        monthsShort:\n            'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n            '_'\n        ),\n        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /sa|ch/i,\n        isPM: function (input) {\n            return /^ch$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'sa' : 'SA';\n            } else {\n                return isLower ? 'ch' : 'CH';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [năm] YYYY',\n            LLL: 'D MMMM [năm] YYYY HH:mm',\n            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n            l: 'DD/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hôm nay lúc] LT',\n            nextDay: '[Ngày mai lúc] LT',\n            nextWeek: 'dddd [tuần tới lúc] LT',\n            lastDay: '[Hôm qua lúc] LT',\n            lastWeek: 'dddd [tuần trước lúc] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s tới',\n            past: '%s trước',\n            s: 'vài giây',\n            ss: '%d giây',\n            m: 'một phút',\n            mm: '%d phút',\n            h: 'một giờ',\n            hh: '%d giờ',\n            d: 'một ngày',\n            dd: '%d ngày',\n            w: 'một tuần',\n            ww: '%d tuần',\n            M: 'một tháng',\n            MM: '%d tháng',\n            y: 'một năm',\n            yy: '%d năm',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return vi;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/vi.js?");

/***/ }),

/***/ "./node_modules/moment/locale/x-pseudo.js":
/*!************************************************!*\
  !*** ./node_modules/moment/locale/x-pseudo.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var xPseudo = moment.defineLocale('x-pseudo', {\n        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n            '_'\n        ),\n        monthsShort:\n            'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n                '_'\n            ),\n        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[T~ódá~ý át] LT',\n            nextDay: '[T~ómó~rró~w át] LT',\n            nextWeek: 'dddd [át] LT',\n            lastDay: '[Ý~ést~érdá~ý át] LT',\n            lastWeek: '[L~ást] dddd [át] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'í~ñ %s',\n            past: '%s á~gó',\n            s: 'á ~féw ~sécó~ñds',\n            ss: '%d s~écóñ~ds',\n            m: 'á ~míñ~úté',\n            mm: '%d m~íñú~tés',\n            h: 'á~ñ hó~úr',\n            hh: '%d h~óúrs',\n            d: 'á ~dáý',\n            dd: '%d d~áýs',\n            M: 'á ~móñ~th',\n            MM: '%d m~óñt~hs',\n            y: 'á ~ýéár',\n            yy: '%d ý~éárs',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return xPseudo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/x-pseudo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/yo.js":
/*!******************************************!*\
  !*** ./node_modules/moment/locale/yo.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var yo = moment.defineLocale('yo', {\n        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n            '_'\n        ),\n        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Ònì ni] LT',\n            nextDay: '[Ọ̀la ni] LT',\n            nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n            lastDay: '[Àna ni] LT',\n            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ní %s',\n            past: '%s kọjá',\n            s: 'ìsẹjú aayá die',\n            ss: 'aayá %d',\n            m: 'ìsẹjú kan',\n            mm: 'ìsẹjú %d',\n            h: 'wákati kan',\n            hh: 'wákati %d',\n            d: 'ọjọ́ kan',\n            dd: 'ọjọ́ %d',\n            M: 'osù kan',\n            MM: 'osù %d',\n            y: 'ọdún kan',\n            yy: 'ọdún %d',\n        },\n        dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n        ordinal: 'ọjọ́ %d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return yo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/yo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/zh-cn.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/zh-cn.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhCn = moment.defineLocale('zh-cn', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日Ah点mm分',\n            LLLL: 'YYYY年M月D日ddddAh点mm分',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            } else {\n                // '中午'\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[下]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            lastDay: '[昨天]LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[上]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '周';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s后',\n            past: '%s前',\n            s: '几秒',\n            ss: '%d 秒',\n            m: '1 分钟',\n            mm: '%d 分钟',\n            h: '1 小时',\n            hh: '%d 小时',\n            d: '1 天',\n            dd: '%d 天',\n            w: '1 周',\n            ww: '%d 周',\n            M: '1 个月',\n            MM: '%d 个月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return zhCn;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/zh-cn.js?");

/***/ }),

/***/ "./node_modules/moment/locale/zh-hk.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/zh-hk.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhHk = moment.defineLocale('zh-hk', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1200) {\n                return '上午';\n            } else if (hm === 1200) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: '[下]ddddLT',\n            lastDay: '[昨天]LT',\n            lastWeek: '[上]ddddLT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhHk;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/zh-hk.js?");

/***/ }),

/***/ "./node_modules/moment/locale/zh-mo.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/zh-mo.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhMo = moment.defineLocale('zh-mo', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s內',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhMo;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/zh-mo.js?");

/***/ }),

/***/ "./node_modules/moment/locale/zh-tw.js":
/*!*********************************************!*\
  !*** ./node_modules/moment/locale/zh-tw.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n    true ? factory(__webpack_require__(/*! ../moment */ \"./node_modules/moment/moment.js\")) :\n   undefined\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhTw = moment.defineLocale('zh-tw', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhTw;\n\n})));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/locale/zh-tw.js?");

/***/ }),

/***/ "./node_modules/moment/moment.js":
/*!***************************************!*\
  !*** ./node_modules/moment/moment.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js\n//! version : 2.29.3\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n     true ? module.exports = factory() :\n    undefined\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i,\n            arrLen = arr.length;\n        for (i = 0; i < arrLen; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        if (m._isValid == null) {\n            var flags = getParsingFlags(m),\n                parsedParts = some.call(flags.parsedDateParts, function (i) {\n                    return i != null;\n                }),\n                isNowValid =\n                    !isNaN(m._d.getTime()) &&\n                    flags.overflow < 0 &&\n                    !flags.empty &&\n                    !flags.invalidEra &&\n                    !flags.invalidMonth &&\n                    !flags.invalidWeekday &&\n                    !flags.weekdayMismatch &&\n                    !flags.nullInput &&\n                    !flags.invalidFormat &&\n                    !flags.userInvalidated &&\n                    (!flags.meridiem || (flags.meridiem && parsedParts));\n\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n\n            if (Object.isFrozen == null || !Object.isFrozen(m)) {\n                m._isValid = isNowValid;\n            } else {\n                return isNowValid;\n            }\n        }\n        return m._isValid;\n    }\n\n    function createInvalid(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i,\n            prop,\n            val,\n            momentPropertiesLen = momentProperties.length;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentPropertiesLen > 0) {\n            for (i = 0; i < momentPropertiesLen; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key,\n                    argLen = arguments.length;\n                for (i = 0; i < argLen; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens =\n            /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTime(number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function pastFuture(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {};\n\n    function addUnitAlias(unit, shorthand) {\n        var lowerCase = unit.toLowerCase();\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n    }\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {};\n\n    function addUnitPriority(unit, priority) {\n        priorities[unit] = priority;\n    }\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get(mom, unit) {\n        return mom.isValid()\n            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n            : NaN;\n    }\n\n    function set$1(mom, unit, value) {\n        if (mom.isValid() && !isNaN(value)) {\n            if (\n                unit === 'FullYear' &&\n                isLeapYear(mom.year()) &&\n                mom.month() === 1 &&\n                mom.date() === 29\n            ) {\n                value = toInt(value);\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n                    value,\n                    mom.month(),\n                    daysInMonth(value, mom.month())\n                );\n            } else {\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i,\n                prioritizedLen = prioritized.length;\n            for (i = 0; i < prioritizedLen; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord =\n            /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(\n                    /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                    function (matched, p1, p2, p3, p4) {\n                        return p1 || p2 || p3 || p4;\n                    }\n                )\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback,\n            tokenLen;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        tokenLen = token.length;\n        for (i = 0; i < tokenLen; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // ALIASES\n\n    addUnitAlias('month', 'M');\n\n    // PRIORITY\n\n    addUnitPriority('month', 8);\n\n    // PARSING\n\n    addRegexToken('M', match1to2);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths =\n            'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n                '_'\n            ),\n        defaultLocaleMonthsShort =\n            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord;\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        var dayOfMonth;\n\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortPieces.push(this.monthsShort(mom, ''));\n            longPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.monthsShort(mom, ''));\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 12; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n        }\n        for (i = 0; i < 24; i++) {\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // ALIASES\n\n    addUnitAlias('year', 'y');\n\n    // PRIORITIES\n\n    addUnitPriority('year', 1);\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // ALIASES\n\n    addUnitAlias('week', 'w');\n    addUnitAlias('isoWeek', 'W');\n\n    // PRIORITIES\n\n    addUnitPriority('week', 5);\n    addUnitPriority('isoWeek', 5);\n\n    // PARSING\n\n    addRegexToken('w', match1to2);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(\n        ['w', 'ww', 'W', 'WW'],\n        function (input, week, config, token) {\n            week[token.substr(0, 1)] = toInt(input);\n        }\n    );\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // ALIASES\n\n    addUnitAlias('day', 'd');\n    addUnitAlias('weekday', 'e');\n    addUnitAlias('isoWeekday', 'E');\n\n    // PRIORITY\n    addUnitPriority('day', 11);\n    addUnitPriority('weekday', 11);\n    addUnitPriority('isoWeekday', 11);\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays =\n            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord;\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n            ? weekdays[m.day()]\n            : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n            ? this._weekdaysShort[m.day()]\n            : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n            ? this._weekdaysMin[m.day()]\n            : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // ALIASES\n\n    addUnitAlias('hour', 'h');\n\n    // PRIORITY\n    addUnitPriority('hour', 13);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2);\n    addRegexToken('h', match1to2);\n    addRegexToken('k', match1to2);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function isLocaleNameSane(name) {\n        // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n        return name.match('^[^/\\\\\\\\]*$') != null;\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(name)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                __webpack_require__(\"./node_modules/moment/locale sync recursive ^\\\\.\\\\/.*$\")(\"./\" + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[name] = null; // null means not found\n            }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                tmpLocale = loadLocale(name);\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                    ? DATE\n                    : a[HOUR] < 0 ||\n                      a[HOUR] > 24 ||\n                      (a[HOUR] === 24 &&\n                          (a[MINUTE] !== 0 ||\n                              a[SECOND] !== 0 ||\n                              a[MILLISECOND] !== 0))\n                    ? HOUR\n                    : a[MINUTE] < 0 || a[MINUTE] > 59\n                    ? MINUTE\n                    : a[SECOND] < 0 || a[SECOND] > 59\n                    ? SECOND\n                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                    ? MILLISECOND\n                    : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 =\n            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat,\n            isoDatesLen = isoDates.length,\n            isoTimesLen = isoTimes.length;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDatesLen; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimesLen; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^)]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYear(createLocal(), 1, 4).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era,\n            tokenLen;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n        tokenLen = tokens.length;\n        for (i = 0; i < tokenLen; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false,\n            configfLen = config._f.length;\n\n        if (configfLen === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < configfLen; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i,\n            orderLen = ordering.length;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < orderLen; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex =\n            /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add = createAdder(1, 'add'),\n        subtract = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property,\n            propertyLen = properties.length;\n\n        for (i = 0; i < propertyLen; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n            ? 'lastWeek'\n            : diff < 0\n            ? 'lastDay'\n            : diff < 1\n            ? 'sameDay'\n            : diff < 2\n            ? 'nextDay'\n            : diff < 7\n            ? 'nextWeek'\n            : 'sameElse';\n    }\n\n    function calendar$1(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod$1(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod$1(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2() {\n        return isValid(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(\n        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n        function (input, array, config, token) {\n            var era = config._locale.erasParse(input, token, config._strict);\n            if (era) {\n                getParsingFlags(config).era = era;\n            } else {\n                getParsingFlags(config).invalidEra = input;\n            }\n        }\n    );\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? +1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            namePieces.push(regexEscape(eras[i].name));\n            abbrPieces.push(regexEscape(eras[i].abbr));\n            narrowPieces.push(regexEscape(eras[i].narrow));\n\n            mixedPieces.push(regexEscape(eras[i].name));\n            mixedPieces.push(regexEscape(eras[i].abbr));\n            mixedPieces.push(regexEscape(eras[i].narrow));\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    addUnitAlias('weekYear', 'gg');\n    addUnitAlias('isoWeekYear', 'GG');\n\n    // PRIORITY\n\n    addUnitPriority('weekYear', 1);\n    addUnitPriority('isoWeekYear', 1);\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(\n        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n        function (input, week, config, token) {\n            week[token.substr(0, 2)] = toInt(input);\n        }\n    );\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday(),\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // ALIASES\n\n    addUnitAlias('quarter', 'Q');\n\n    // PRIORITY\n\n    addUnitPriority('quarter', 7);\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // ALIASES\n\n    addUnitAlias('date', 'D');\n\n    // PRIORITY\n    addUnitPriority('date', 9);\n\n    // PARSING\n\n    addRegexToken('D', match1to2);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // ALIASES\n\n    addUnitAlias('dayOfYear', 'DDD');\n\n    // PRIORITY\n    addUnitPriority('dayOfYear', 4);\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // ALIASES\n\n    addUnitAlias('minute', 'm');\n\n    // PRIORITY\n\n    addUnitPriority('minute', 14);\n\n    // PARSING\n\n    addRegexToken('m', match1to2);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // ALIASES\n\n    addUnitAlias('second', 's');\n\n    // PRIORITY\n\n    addUnitPriority('second', 15);\n\n    // PARSING\n\n    addRegexToken('s', match1to2);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // ALIASES\n\n    addUnitAlias('millisecond', 'ms');\n\n    // PRIORITY\n\n    addUnitPriority('millisecond', 16);\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                        ? 'st'\n                        : b === 2\n                        ? 'nd'\n                        : b === 3\n                        ? 'rd'\n                        : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (\n            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\n        ) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    // TODO: Use this.as('ms')?\n    function valueOf$1() {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        return (\n            this._milliseconds +\n            this._days * 864e5 +\n            (this._months % 12) * 2592e6 +\n            toInt(this._months / 12) * 31536e6\n        );\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y');\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = Object.assign({}, thresholds, argThresholds);\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.29.3';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://futureBooks/./node_modules/moment/moment.js?");

/***/ }),

/***/ "./node_modules/monotone-convex-hull-2d/index.js":
/*!*******************************************************!*\
  !*** ./node_modules/monotone-convex-hull-2d/index.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = monotoneConvexHull2D\n\nvar orient = __webpack_require__(/*! robust-orientation */ \"./node_modules/robust-orientation/orientation.js\")[3]\n\nfunction monotoneConvexHull2D(points) {\n  var n = points.length\n\n  if(n < 3) {\n    var result = new Array(n)\n    for(var i=0; i<n; ++i) {\n      result[i] = i\n    }\n\n    if(n === 2 &&\n       points[0][0] === points[1][0] &&\n       points[0][1] === points[1][1]) {\n      return [0]\n    }\n\n    return result\n  }\n\n  //Sort point indices along x-axis\n  var sorted = new Array(n)\n  for(var i=0; i<n; ++i) {\n    sorted[i] = i\n  }\n  sorted.sort(function(a,b) {\n    var d = points[a][0]-points[b][0]\n    if(d) {\n      return d\n    }\n    return points[a][1] - points[b][1]\n  })\n\n  //Construct upper and lower hulls\n  var lower = [sorted[0], sorted[1]]\n  var upper = [sorted[0], sorted[1]]\n\n  for(var i=2; i<n; ++i) {\n    var idx = sorted[i]\n    var p   = points[idx]\n\n    //Insert into lower list\n    var m = lower.length\n    while(m > 1 && orient(\n        points[lower[m-2]], \n        points[lower[m-1]], \n        p) <= 0) {\n      m -= 1\n      lower.pop()\n    }\n    lower.push(idx)\n\n    //Insert into upper list\n    m = upper.length\n    while(m > 1 && orient(\n        points[upper[m-2]], \n        points[upper[m-1]], \n        p) >= 0) {\n      m -= 1\n      upper.pop()\n    }\n    upper.push(idx)\n  }\n\n  //Merge lists together\n  var result = new Array(upper.length + lower.length - 2)\n  var ptr    = 0\n  for(var i=0, nl=lower.length; i<nl; ++i) {\n    result[ptr++] = lower[i]\n  }\n  for(var j=upper.length-2; j>0; --j) {\n    result[ptr++] = upper[j]\n  }\n\n  //Return result\n  return result\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/monotone-convex-hull-2d/index.js?");

/***/ }),

/***/ "./node_modules/mpd-parser/dist/mpd-parser.es.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mpd-parser/dist/mpd-parser.es.js + 1 modules ***!
  \*******************************************************************/
/*! exports provided: VERSION, addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js (<- Module uses injected variables (Buffer)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@videojs/vhs-utils/es/resolve-url.js because of ./node_modules/video.js/dist/video.es.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@xmldom/xmldom/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/global/window.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"VERSION\", function() { return /* binding */ VERSION; });\n__webpack_require__.d(__webpack_exports__, \"addSidxSegmentsToPlaylist\", function() { return /* binding */ addSidxSegmentsToPlaylist$1; });\n__webpack_require__.d(__webpack_exports__, \"generateSidxKey\", function() { return /* binding */ generateSidxKey; });\n__webpack_require__.d(__webpack_exports__, \"inheritAttributes\", function() { return /* binding */ inheritAttributes; });\n__webpack_require__.d(__webpack_exports__, \"parse\", function() { return /* binding */ parse; });\n__webpack_require__.d(__webpack_exports__, \"parseUTCTiming\", function() { return /* binding */ parseUTCTiming; });\n__webpack_require__.d(__webpack_exports__, \"stringToMpdXml\", function() { return /* binding */ mpd_parser_es_stringToMpdXml; });\n__webpack_require__.d(__webpack_exports__, \"toM3u8\", function() { return /* binding */ toM3u8; });\n__webpack_require__.d(__webpack_exports__, \"toPlaylists\", function() { return /* binding */ toPlaylists; });\n\n// EXTERNAL MODULE: ./node_modules/@videojs/vhs-utils/es/resolve-url.js\nvar resolve_url = __webpack_require__(\"./node_modules/@videojs/vhs-utils/es/resolve-url.js\");\n\n// EXTERNAL MODULE: ./node_modules/global/window.js\nvar global_window = __webpack_require__(\"./node_modules/global/window.js\");\nvar window_default = /*#__PURE__*/__webpack_require__.n(global_window);\n\n// CONCATENATED MODULE: ./node_modules/@videojs/vhs-utils/es/media-groups.js\n/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n *        The parsed master manifest object\n * @param {string[]} groups\n *        The media groups to call the callback for\n * @param {Function} callback\n *        Callback to call for each media group\n */\nvar forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n  groups.forEach(function (mediaType) {\n    for (var groupKey in master.mediaGroups[mediaType]) {\n      for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n        var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n        callback(mediaProperties, mediaType, groupKey, labelKey);\n      }\n    }\n  });\n};\n// EXTERNAL MODULE: ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js\nvar decode_b64_to_uint8_array = __webpack_require__(\"./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js\");\n\n// EXTERNAL MODULE: ./node_modules/@xmldom/xmldom/lib/index.js\nvar lib = __webpack_require__(\"./node_modules/@xmldom/xmldom/lib/index.js\");\n\n// CONCATENATED MODULE: ./node_modules/mpd-parser/dist/mpd-parser.es.js\n/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */\n\n\n\n\n\n\nvar version = \"0.22.1\";\n\nvar isObject = function isObject(obj) {\n  return !!obj && typeof obj === 'object';\n};\n\nvar merge = function merge() {\n  for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {\n    objects[_key] = arguments[_key];\n  }\n\n  return objects.reduce(function (result, source) {\n    if (typeof source !== 'object') {\n      return result;\n    }\n\n    Object.keys(source).forEach(function (key) {\n      if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n        result[key] = result[key].concat(source[key]);\n      } else if (isObject(result[key]) && isObject(source[key])) {\n        result[key] = merge(result[key], source[key]);\n      } else {\n        result[key] = source[key];\n      }\n    });\n    return result;\n  }, {});\n};\nvar values = function values(o) {\n  return Object.keys(o).map(function (k) {\n    return o[k];\n  });\n};\n\nvar mpd_parser_es_range = function range(start, end) {\n  var result = [];\n\n  for (var i = start; i < end; i++) {\n    result.push(i);\n  }\n\n  return result;\n};\nvar flatten = function flatten(lists) {\n  return lists.reduce(function (x, y) {\n    return x.concat(y);\n  }, []);\n};\nvar from = function from(list) {\n  if (!list.length) {\n    return [];\n  }\n\n  var result = [];\n\n  for (var i = 0; i < list.length; i++) {\n    result.push(list[i]);\n  }\n\n  return result;\n};\nvar findIndexes = function findIndexes(l, key) {\n  return l.reduce(function (a, e, i) {\n    if (e[key]) {\n      a.push(i);\n    }\n\n    return a;\n  }, []);\n};\n/**\n * Returns the first index that satisfies the matching function, or -1 if not found.\n *\n * Only necessary because of IE11 support.\n *\n * @param {Array} list - the list to search through\n * @param {Function} matchingFunction - the matching function\n *\n * @return {number} the matching index or -1 if not found\n */\n\nvar findIndex = function findIndex(list, matchingFunction) {\n  for (var i = 0; i < list.length; i++) {\n    if (matchingFunction(list[i])) {\n      return i;\n    }\n  }\n\n  return -1;\n};\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nvar union = function union(lists, keyFunction) {\n  return values(lists.reduce(function (acc, list) {\n    list.forEach(function (el) {\n      acc[keyFunction(el)] = el;\n    });\n    return acc;\n  }, {}));\n};\n\nvar errors = {\n  INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n  DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n  DASH_INVALID_XML: 'DASH_INVALID_XML',\n  NO_BASE_URL: 'NO_BASE_URL',\n  MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n  SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n  UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n *   requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n *   follows  RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n *   to m3u8-parser\n */\n\nvar mpd_parser_es_urlTypeToSegment = function urlTypeToSegment(_ref) {\n  var _ref$baseUrl = _ref.baseUrl,\n      baseUrl = _ref$baseUrl === void 0 ? '' : _ref$baseUrl,\n      _ref$source = _ref.source,\n      source = _ref$source === void 0 ? '' : _ref$source,\n      _ref$range = _ref.range,\n      range = _ref$range === void 0 ? '' : _ref$range,\n      _ref$indexRange = _ref.indexRange,\n      indexRange = _ref$indexRange === void 0 ? '' : _ref$indexRange;\n  var segment = {\n    uri: source,\n    resolvedUri: Object(resolve_url[\"default\"])(baseUrl || '', source)\n  };\n\n  if (range || indexRange) {\n    var rangeStr = range ? range : indexRange;\n    var ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n    var startRange = window_default.a.BigInt ? window_default.a.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n    var endRange = window_default.a.BigInt ? window_default.a.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n    if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n      startRange = Number(startRange);\n    }\n\n    if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n      endRange = Number(endRange);\n    }\n\n    var length;\n\n    if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n      length = window_default.a.BigInt(endRange) - window_default.a.BigInt(startRange) + window_default.a.BigInt(1);\n    } else {\n      length = endRange - startRange + 1;\n    }\n\n    if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n      length = Number(length);\n    } // byterange should be inclusive according to\n    // RFC 2616, Clause 14.35.1\n\n\n    segment.byterange = {\n      length: length,\n      offset: startRange\n    };\n  }\n\n  return segment;\n};\nvar mpd_parser_es_byteRangeToString = function byteRangeToString(byterange) {\n  // `endRange` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  var endRange;\n\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    endRange = window_default.a.BigInt(byterange.offset) + window_default.a.BigInt(byterange.length) - window_default.a.BigInt(1);\n  } else {\n    endRange = byterange.offset + byterange.length - 1;\n  }\n\n  return byterange.offset + \"-\" + endRange;\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n *        The end number attribute.\n *\n * @return {number|null}\n *          The result of parsing the end number.\n */\n\nvar parseEndNumber = function parseEndNumber(endNumber) {\n  if (endNumber && typeof endNumber !== 'number') {\n    endNumber = parseInt(endNumber, 10);\n  }\n\n  if (isNaN(endNumber)) {\n    return null;\n  }\n\n  return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nvar segmentRange = {\n  /**\n   * Returns the entire range of available segments for a static MPD\n   *\n   * @param {Object} attributes\n   *        Inheritied MPD attributes\n   * @return {{ start: number, end: number }}\n   *         The start and end numbers for available segments\n   */\n  static: function _static(attributes) {\n    var duration = attributes.duration,\n        _attributes$timescale = attributes.timescale,\n        timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n        sourceDuration = attributes.sourceDuration,\n        periodDuration = attributes.periodDuration;\n    var endNumber = parseEndNumber(attributes.endNumber);\n    var segmentDuration = duration / timescale;\n\n    if (typeof endNumber === 'number') {\n      return {\n        start: 0,\n        end: endNumber\n      };\n    }\n\n    if (typeof periodDuration === 'number') {\n      return {\n        start: 0,\n        end: periodDuration / segmentDuration\n      };\n    }\n\n    return {\n      start: 0,\n      end: sourceDuration / segmentDuration\n    };\n  },\n\n  /**\n   * Returns the current live window range of available segments for a dynamic MPD\n   *\n   * @param {Object} attributes\n   *        Inheritied MPD attributes\n   * @return {{ start: number, end: number }}\n   *         The start and end numbers for available segments\n   */\n  dynamic: function dynamic(attributes) {\n    var NOW = attributes.NOW,\n        clientOffset = attributes.clientOffset,\n        availabilityStartTime = attributes.availabilityStartTime,\n        _attributes$timescale2 = attributes.timescale,\n        timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\n        duration = attributes.duration,\n        _attributes$periodSta = attributes.periodStart,\n        periodStart = _attributes$periodSta === void 0 ? 0 : _attributes$periodSta,\n        _attributes$minimumUp = attributes.minimumUpdatePeriod,\n        minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp,\n        _attributes$timeShift = attributes.timeShiftBufferDepth,\n        timeShiftBufferDepth = _attributes$timeShift === void 0 ? Infinity : _attributes$timeShift;\n    var endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n    // after retrieving UTC server time.\n\n    var now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n    // Convert the period start time to EPOCH.\n\n    var periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n    var periodEndWC = now + minimumUpdatePeriod;\n    var periodDuration = periodEndWC - periodStartWC;\n    var segmentCount = Math.ceil(periodDuration * timescale / duration);\n    var availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n    var availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n    return {\n      start: Math.max(0, availableStart),\n      end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n    };\n  }\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n *        Number of the segment\n * @param {number} index\n *        Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n *         Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n *        Inherited MPD attributes\n * @return {toSegmentsCallback}\n *         Callback map function\n */\n\nvar toSegments = function toSegments(attributes) {\n  return function (number) {\n    var duration = attributes.duration,\n        _attributes$timescale3 = attributes.timescale,\n        timescale = _attributes$timescale3 === void 0 ? 1 : _attributes$timescale3,\n        periodStart = attributes.periodStart,\n        _attributes$startNumb = attributes.startNumber,\n        startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb;\n    return {\n      number: startNumber + number,\n      duration: duration / timescale,\n      timeline: periodStart,\n      time: number * duration\n    };\n  };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n *        Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\nvar parseByDuration = function parseByDuration(attributes) {\n  var type = attributes.type,\n      duration = attributes.duration,\n      _attributes$timescale4 = attributes.timescale,\n      timescale = _attributes$timescale4 === void 0 ? 1 : _attributes$timescale4,\n      periodDuration = attributes.periodDuration,\n      sourceDuration = attributes.sourceDuration;\n\n  var _segmentRange$type = segmentRange[type](attributes),\n      start = _segmentRange$type.start,\n      end = _segmentRange$type.end;\n\n  var segments = mpd_parser_es_range(start, end).map(toSegments(attributes));\n\n  if (type === 'static') {\n    var index = segments.length - 1; // section is either a period or the full source\n\n    var sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n    segments[index].duration = sectionDuration - duration / timescale * index;\n  }\n\n  return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @return {Object.<Array>} list of segments\n */\n\nvar segmentsFromBase = function segmentsFromBase(attributes) {\n  var baseUrl = attributes.baseUrl,\n      _attributes$initializ = attributes.initialization,\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ,\n      sourceDuration = attributes.sourceDuration,\n      _attributes$indexRang = attributes.indexRange,\n      indexRange = _attributes$indexRang === void 0 ? '' : _attributes$indexRang,\n      periodStart = attributes.periodStart,\n      presentationTime = attributes.presentationTime,\n      _attributes$number = attributes.number,\n      number = _attributes$number === void 0 ? 0 : _attributes$number,\n      duration = attributes.duration; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n  if (!baseUrl) {\n    throw new Error(errors.NO_BASE_URL);\n  }\n\n  var initSegment = mpd_parser_es_urlTypeToSegment({\n    baseUrl: baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  var segment = mpd_parser_es_urlTypeToSegment({\n    baseUrl: baseUrl,\n    source: baseUrl,\n    indexRange: indexRange\n  });\n  segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n  // (since SegmentBase is only for one total segment)\n\n  if (duration) {\n    var segmentTimeInfo = parseByDuration(attributes);\n\n    if (segmentTimeInfo.length) {\n      segment.duration = segmentTimeInfo[0].duration;\n      segment.timeline = segmentTimeInfo[0].timeline;\n    }\n  } else if (sourceDuration) {\n    segment.duration = sourceDuration;\n    segment.timeline = periodStart;\n  } // If presentation time is provided, these segments are being generated by SIDX\n  // references, and should use the time provided. For the general case of SegmentBase,\n  // there should only be one segment in the period, so its presentation time is the same\n  // as its period start.\n\n\n  segment.presentationTime = presentationTime || periodStart;\n  segment.number = number;\n  return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nvar addSidxSegmentsToPlaylist$1 = function addSidxSegmentsToPlaylist(playlist, sidx, baseUrl) {\n  // Retain init segment information\n  var initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n  var sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n  var timeline = playlist.timeline || 0;\n  var sidxByteRange = playlist.sidx.byterange;\n  var sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n  var timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n  var mediaReferences = sidx.references.filter(function (r) {\n    return r.referenceType !== 1;\n  });\n  var segments = [];\n  var type = playlist.endList ? 'static' : 'dynamic';\n  var periodStart = playlist.sidx.timeline;\n  var presentationTime = periodStart;\n  var number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n  var startIndex; // eslint-disable-next-line\n\n  if (typeof sidx.firstOffset === 'bigint') {\n    startIndex = window_default.a.BigInt(sidxEnd) + sidx.firstOffset;\n  } else {\n    startIndex = sidxEnd + sidx.firstOffset;\n  }\n\n  for (var i = 0; i < mediaReferences.length; i++) {\n    var reference = sidx.references[i]; // size of the referenced (sub)segment\n\n    var size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n    // this will be converted to seconds when generating segments\n\n    var duration = reference.subsegmentDuration; // should be an inclusive range\n\n    var endIndex = void 0; // eslint-disable-next-line\n\n    if (typeof startIndex === 'bigint') {\n      endIndex = startIndex + window_default.a.BigInt(size) - window_default.a.BigInt(1);\n    } else {\n      endIndex = startIndex + size - 1;\n    }\n\n    var indexRange = startIndex + \"-\" + endIndex;\n    var attributes = {\n      baseUrl: baseUrl,\n      timescale: timescale,\n      timeline: timeline,\n      periodStart: periodStart,\n      presentationTime: presentationTime,\n      number: number,\n      duration: duration,\n      sourceDuration: sourceDuration,\n      indexRange: indexRange,\n      type: type\n    };\n    var segment = segmentsFromBase(attributes)[0];\n\n    if (initSegment) {\n      segment.map = initSegment;\n    }\n\n    segments.push(segment);\n\n    if (typeof startIndex === 'bigint') {\n      startIndex += window_default.a.BigInt(size);\n    } else {\n      startIndex += size;\n    }\n\n    presentationTime += duration / timescale;\n    number++;\n  }\n\n  playlist.segments = segments;\n  return playlist;\n};\n\nvar SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nvar TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nvar getUniqueTimelineStarts = function getUniqueTimelineStarts(timelineStarts) {\n  return union(timelineStarts, function (_ref) {\n    var timeline = _ref.timeline;\n    return timeline;\n  }).sort(function (a, b) {\n    return a.timeline > b.timeline ? 1 : -1;\n  });\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nvar findPlaylistWithName = function findPlaylistWithName(playlists, name) {\n  for (var i = 0; i < playlists.length; i++) {\n    if (playlists[i].attributes.NAME === name) {\n      return playlists[i];\n    }\n  }\n\n  return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nvar mpd_parser_es_getMediaGroupPlaylists = function getMediaGroupPlaylists(manifest) {\n  var mediaGroupPlaylists = [];\n  forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, function (properties, type, group, label) {\n    mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n  });\n  return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nvar updateMediaSequenceForPlaylist = function updateMediaSequenceForPlaylist(_ref2) {\n  var playlist = _ref2.playlist,\n      mediaSequence = _ref2.mediaSequence;\n  playlist.mediaSequence = mediaSequence;\n  playlist.segments.forEach(function (segment, index) {\n    segment.number = playlist.mediaSequence + index;\n  });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nvar updateSequenceNumbers = function updateSequenceNumbers(_ref3) {\n  var oldPlaylists = _ref3.oldPlaylists,\n      newPlaylists = _ref3.newPlaylists,\n      timelineStarts = _ref3.timelineStarts;\n  newPlaylists.forEach(function (playlist) {\n    playlist.discontinuitySequence = findIndex(timelineStarts, function (_ref4) {\n      var timeline = _ref4.timeline;\n      return timeline === playlist.timeline;\n    }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n    // (see ISO_23009-1-2012 5.3.5.2).\n    //\n    // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n    var oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\n    if (!oldPlaylist) {\n      // Since this is a new playlist, the media sequence values can start from 0 without\n      // consequence.\n      return;\n    } // TODO better support for live SIDX\n    //\n    // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n    // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n    // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n    // not supported when the SIDX properties change on refreshes.\n    //\n    // In the future, if support needs to be added, the merging logic here can be called\n    // after SIDX references are resolved. For now, exit early to prevent exceptions being\n    // thrown due to undefined references.\n\n\n    if (playlist.sidx) {\n      return;\n    } // Since we don't yet support early available timelines, we don't need to support\n    // playlists with no segments.\n\n\n    var firstNewSegment = playlist.segments[0];\n    var oldMatchingSegmentIndex = findIndex(oldPlaylist.segments, function (oldSegment) {\n      return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n    }); // No matching segment from the old playlist means the entire playlist was refreshed.\n    // In this case the media sequence should account for this update, and the new segments\n    // should be marked as discontinuous from the prior content, since the last prior\n    // timeline was removed.\n\n    if (oldMatchingSegmentIndex === -1) {\n      updateMediaSequenceForPlaylist({\n        playlist: playlist,\n        mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n      });\n      playlist.segments[0].discontinuity = true;\n      playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n      //\n      // If the new playlist's timeline is the same as the last seen segment's timeline,\n      // then a discontinuity can be added to identify that there's potentially missing\n      // content. If there's no missing content, the discontinuity should still be rather\n      // harmless. It's possible that if segment durations are accurate enough, that the\n      // existence of a gap can be determined using the presentation times and durations,\n      // but if the segment timing info is off, it may introduce more problems than simply\n      // adding the discontinuity.\n      //\n      // If the new playlist's timeline is different from the last seen segment's timeline,\n      // then a discontinuity can be added to identify that this is the first seen segment\n      // of a new timeline. However, the logic at the start of this function that\n      // determined the disconinuity sequence by timeline index is now off by one (the\n      // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n      // we added it), so the disconinuity sequence must be decremented.\n      //\n      // A period may also have a duration of zero, so the case of no segments is handled\n      // here even though we don't yet support early available periods.\n\n      if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n        playlist.discontinuitySequence--;\n      }\n\n      return;\n    } // If the first segment matched with a prior segment on a discontinuity (it's matching\n    // on the first segment of a period), then the discontinuitySequence shouldn't be the\n    // timeline's matching one, but instead should be the one prior, and the first segment\n    // of the new manifest should be marked with a discontinuity.\n    //\n    // The reason for this special case is that discontinuity sequence shows how many\n    // discontinuities have fallen off of the playlist, and discontinuities are marked on\n    // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n    // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n    // sequence, and that first segment is an indicator, but can be removed before that\n    // timeline is gone.\n\n\n    var oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n    if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n      firstNewSegment.discontinuity = true;\n      playlist.discontinuityStarts.unshift(0);\n      playlist.discontinuitySequence--;\n    }\n\n    updateMediaSequenceForPlaylist({\n      playlist: playlist,\n      mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n    });\n  });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nvar positionManifestOnTimeline = function positionManifestOnTimeline(_ref5) {\n  var oldManifest = _ref5.oldManifest,\n      newManifest = _ref5.newManifest;\n  // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n  //\n  // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n  //\n  // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n  //\n  // Because of this change, and the difficulty of supporting periods with changing start\n  // times, periods with changing start times are not supported. This makes the logic much\n  // simpler, since periods with the same start time can be considerred the same period\n  // across refreshes.\n  //\n  // To give an example as to the difficulty of handling periods where the start time may\n  // change, if a single period manifest is refreshed with another manifest with a single\n  // period, and both the start and end times are increased, then the only way to determine\n  // if it's a new period or an old one that has changed is to look through the segments of\n  // each playlist and determine the presentation time bounds to find a match. In addition,\n  // if the period start changed to exceed the old period end, then there would be no\n  // match, and it would not be possible to determine whether the refreshed period is a new\n  // one or the old one.\n  var oldPlaylists = oldManifest.playlists.concat(mpd_parser_es_getMediaGroupPlaylists(oldManifest));\n  var newPlaylists = newManifest.playlists.concat(mpd_parser_es_getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n  // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n  // of properties are saved for each seen Period. Even long running live streams won't\n  // generate too many Periods, unless the stream is watched for decades. In the future,\n  // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n  // but it may not become an issue, and the additional info can be useful for debugging.\n\n  newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n  updateSequenceNumbers({\n    oldPlaylists: oldPlaylists,\n    newPlaylists: newPlaylists,\n    timelineStarts: newManifest.timelineStarts\n  });\n  return newManifest;\n};\n\nvar generateSidxKey = function generateSidxKey(sidx) {\n  return sidx && sidx.uri + '-' + mpd_parser_es_byteRangeToString(sidx.byterange);\n};\n\nvar mergeDiscontiguousPlaylists = function mergeDiscontiguousPlaylists(playlists) {\n  var mergedPlaylists = values(playlists.reduce(function (acc, playlist) {\n    // assuming playlist IDs are the same across periods\n    // TODO: handle multiperiod where representation sets are not the same\n    // across periods\n    var name = playlist.attributes.id + (playlist.attributes.lang || '');\n\n    if (!acc[name]) {\n      // First Period\n      acc[name] = playlist;\n      acc[name].attributes.timelineStarts = [];\n    } else {\n      // Subsequent Periods\n      if (playlist.segments) {\n        var _acc$name$segments;\n\n        // first segment of subsequent periods signal a discontinuity\n        if (playlist.segments[0]) {\n          playlist.segments[0].discontinuity = true;\n        }\n\n        (_acc$name$segments = acc[name].segments).push.apply(_acc$name$segments, playlist.segments);\n      } // bubble up contentProtection, this assumes all DRM content\n      // has the same contentProtection\n\n\n      if (playlist.attributes.contentProtection) {\n        acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n      }\n    }\n\n    acc[name].attributes.timelineStarts.push({\n      // Although they represent the same number, it's important to have both to make it\n      // compatible with HLS potentially having a similar attribute.\n      start: playlist.attributes.periodStart,\n      timeline: playlist.attributes.periodStart\n    });\n    return acc;\n  }, {}));\n  return mergedPlaylists.map(function (playlist) {\n    playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n    return playlist;\n  });\n};\n\nvar mpd_parser_es_addSidxSegmentsToPlaylist = function addSidxSegmentsToPlaylist(playlist, sidxMapping) {\n  var sidxKey = generateSidxKey(playlist.sidx);\n  var sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n  if (sidxMatch) {\n    addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n  }\n\n  return playlist;\n};\nvar addSidxSegmentsToPlaylists = function addSidxSegmentsToPlaylists(playlists, sidxMapping) {\n  if (sidxMapping === void 0) {\n    sidxMapping = {};\n  }\n\n  if (!Object.keys(sidxMapping).length) {\n    return playlists;\n  }\n\n  for (var i in playlists) {\n    playlists[i] = mpd_parser_es_addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n  }\n\n  return playlists;\n};\nvar formatAudioPlaylist = function formatAudioPlaylist(_ref, isAudioOnly) {\n  var _attributes;\n\n  var attributes = _ref.attributes,\n      segments = _ref.segments,\n      sidx = _ref.sidx,\n      mediaSequence = _ref.mediaSequence,\n      discontinuitySequence = _ref.discontinuitySequence,\n      discontinuityStarts = _ref.discontinuityStarts;\n  var playlist = {\n    attributes: (_attributes = {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      CODECS: attributes.codecs\n    }, _attributes['PROGRAM-ID'] = 1, _attributes),\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: '',\n    targetDuration: attributes.duration,\n    discontinuitySequence: discontinuitySequence,\n    discontinuityStarts: discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    mediaSequence: mediaSequence,\n    segments: segments\n  };\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  if (isAudioOnly) {\n    playlist.attributes.AUDIO = 'audio';\n    playlist.attributes.SUBTITLES = 'subs';\n  }\n\n  return playlist;\n};\nvar formatVttPlaylist = function formatVttPlaylist(_ref2) {\n  var _m3u8Attributes;\n\n  var attributes = _ref2.attributes,\n      segments = _ref2.segments,\n      mediaSequence = _ref2.mediaSequence,\n      discontinuityStarts = _ref2.discontinuityStarts,\n      discontinuitySequence = _ref2.discontinuitySequence;\n\n  if (typeof segments === 'undefined') {\n    // vtt tracks may use single file in BaseURL\n    segments = [{\n      uri: attributes.baseUrl,\n      timeline: attributes.periodStart,\n      resolvedUri: attributes.baseUrl || '',\n      duration: attributes.sourceDuration,\n      number: 0\n    }]; // targetDuration should be the same duration as the only segment\n\n    attributes.duration = attributes.sourceDuration;\n  }\n\n  var m3u8Attributes = (_m3u8Attributes = {\n    NAME: attributes.id,\n    BANDWIDTH: attributes.bandwidth\n  }, _m3u8Attributes['PROGRAM-ID'] = 1, _m3u8Attributes);\n\n  if (attributes.codecs) {\n    m3u8Attributes.CODECS = attributes.codecs;\n  }\n\n  return {\n    attributes: m3u8Attributes,\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    timelineStarts: attributes.timelineStarts,\n    discontinuityStarts: discontinuityStarts,\n    discontinuitySequence: discontinuitySequence,\n    mediaSequence: mediaSequence,\n    segments: segments\n  };\n};\nvar organizeAudioPlaylists = function organizeAudioPlaylists(playlists, sidxMapping, isAudioOnly) {\n  if (sidxMapping === void 0) {\n    sidxMapping = {};\n  }\n\n  if (isAudioOnly === void 0) {\n    isAudioOnly = false;\n  }\n\n  var mainPlaylist;\n  var formattedPlaylists = playlists.reduce(function (a, playlist) {\n    var role = playlist.attributes.role && playlist.attributes.role.value || '';\n    var language = playlist.attributes.lang || '';\n    var label = playlist.attributes.label || 'main';\n\n    if (language && !playlist.attributes.label) {\n      var roleLabel = role ? \" (\" + role + \")\" : '';\n      label = \"\" + playlist.attributes.lang + roleLabel;\n    }\n\n    if (!a[label]) {\n      a[label] = {\n        language: language,\n        autoselect: true,\n        default: role === 'main',\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    var formatted = mpd_parser_es_addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n    a[label].playlists.push(formatted);\n\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\n      mainPlaylist = playlist;\n      mainPlaylist.default = true;\n    }\n\n    return a;\n  }, {}); // if no playlists have role \"main\", mark the first as main\n\n  if (!mainPlaylist) {\n    var firstLabel = Object.keys(formattedPlaylists)[0];\n    formattedPlaylists[firstLabel].default = true;\n  }\n\n  return formattedPlaylists;\n};\nvar organizeVttPlaylists = function organizeVttPlaylists(playlists, sidxMapping) {\n  if (sidxMapping === void 0) {\n    sidxMapping = {};\n  }\n\n  return playlists.reduce(function (a, playlist) {\n    var label = playlist.attributes.lang || 'text';\n\n    if (!a[label]) {\n      a[label] = {\n        language: label,\n        default: false,\n        autoselect: false,\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    a[label].playlists.push(mpd_parser_es_addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n    return a;\n  }, {});\n};\n\nvar organizeCaptionServices = function organizeCaptionServices(captionServices) {\n  return captionServices.reduce(function (svcObj, svc) {\n    if (!svc) {\n      return svcObj;\n    }\n\n    svc.forEach(function (service) {\n      var channel = service.channel,\n          language = service.language;\n      svcObj[language] = {\n        autoselect: false,\n        default: false,\n        instreamId: channel,\n        language: language\n      };\n\n      if (service.hasOwnProperty('aspectRatio')) {\n        svcObj[language].aspectRatio = service.aspectRatio;\n      }\n\n      if (service.hasOwnProperty('easyReader')) {\n        svcObj[language].easyReader = service.easyReader;\n      }\n\n      if (service.hasOwnProperty('3D')) {\n        svcObj[language]['3D'] = service['3D'];\n      }\n    });\n    return svcObj;\n  }, {});\n};\n\nvar formatVideoPlaylist = function formatVideoPlaylist(_ref3) {\n  var _attributes2;\n\n  var attributes = _ref3.attributes,\n      segments = _ref3.segments,\n      sidx = _ref3.sidx,\n      discontinuityStarts = _ref3.discontinuityStarts;\n  var playlist = {\n    attributes: (_attributes2 = {\n      NAME: attributes.id,\n      AUDIO: 'audio',\n      SUBTITLES: 'subs',\n      RESOLUTION: {\n        width: attributes.width,\n        height: attributes.height\n      },\n      CODECS: attributes.codecs,\n      BANDWIDTH: attributes.bandwidth\n    }, _attributes2['PROGRAM-ID'] = 1, _attributes2),\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: '',\n    targetDuration: attributes.duration,\n    discontinuityStarts: discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    segments: segments\n  };\n\n  if (attributes.frameRate) {\n    playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n  }\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  return playlist;\n};\n\nvar videoOnly = function videoOnly(_ref4) {\n  var attributes = _ref4.attributes;\n  return attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n};\n\nvar audioOnly = function audioOnly(_ref5) {\n  var attributes = _ref5.attributes;\n  return attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n};\n\nvar vttOnly = function vttOnly(_ref6) {\n  var attributes = _ref6.attributes;\n  return attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n};\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\n\nvar addMediaSequenceValues = function addMediaSequenceValues(playlists, timelineStarts) {\n  // increment all segments sequentially\n  playlists.forEach(function (playlist) {\n    playlist.mediaSequence = 0;\n    playlist.discontinuitySequence = findIndex(timelineStarts, function (_ref7) {\n      var timeline = _ref7.timeline;\n      return timeline === playlist.timeline;\n    });\n\n    if (!playlist.segments) {\n      return;\n    }\n\n    playlist.segments.forEach(function (segment, index) {\n      segment.number = index;\n    });\n  });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n *         The media group playlists\n */\n\nvar flattenMediaGroupPlaylists = function flattenMediaGroupPlaylists(mediaGroupObject) {\n  if (!mediaGroupObject) {\n    return [];\n  }\n\n  return Object.keys(mediaGroupObject).reduce(function (acc, label) {\n    var labelContents = mediaGroupObject[label];\n    return acc.concat(labelContents.playlists);\n  }, []);\n};\nvar toM3u8 = function toM3u8(_ref8) {\n  var _mediaGroups;\n\n  var dashPlaylists = _ref8.dashPlaylists,\n      locations = _ref8.locations,\n      _ref8$sidxMapping = _ref8.sidxMapping,\n      sidxMapping = _ref8$sidxMapping === void 0 ? {} : _ref8$sidxMapping,\n      previousManifest = _ref8.previousManifest;\n\n  if (!dashPlaylists.length) {\n    return {};\n  } // grab all main manifest attributes\n\n\n  var _dashPlaylists$0$attr = dashPlaylists[0].attributes,\n      duration = _dashPlaylists$0$attr.sourceDuration,\n      type = _dashPlaylists$0$attr.type,\n      suggestedPresentationDelay = _dashPlaylists$0$attr.suggestedPresentationDelay,\n      minimumUpdatePeriod = _dashPlaylists$0$attr.minimumUpdatePeriod;\n  var videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n  var audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n  var vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n  var captions = dashPlaylists.map(function (playlist) {\n    return playlist.attributes.captionServices;\n  }).filter(Boolean);\n  var manifest = {\n    allowCache: true,\n    discontinuityStarts: [],\n    segments: [],\n    endList: true,\n    mediaGroups: (_mediaGroups = {\n      AUDIO: {},\n      VIDEO: {}\n    }, _mediaGroups['CLOSED-CAPTIONS'] = {}, _mediaGroups.SUBTITLES = {}, _mediaGroups),\n    uri: '',\n    duration: duration,\n    playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n  };\n\n  if (minimumUpdatePeriod >= 0) {\n    manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n  }\n\n  if (locations) {\n    manifest.locations = locations;\n  }\n\n  if (type === 'dynamic') {\n    manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n  }\n\n  var isAudioOnly = manifest.playlists.length === 0;\n  var organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n  var organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n  var formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n  var playlistTimelineStarts = formattedPlaylists.map(function (_ref9) {\n    var timelineStarts = _ref9.timelineStarts;\n    return timelineStarts;\n  });\n  manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n  addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n  if (organizedAudioGroup) {\n    manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n  }\n\n  if (organizedVttGroup) {\n    manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n  }\n\n  if (captions.length) {\n    manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n  }\n\n  if (previousManifest) {\n    return positionManifestOnTimeline({\n      oldManifest: previousManifest,\n      newManifest: manifest\n    });\n  }\n\n  return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {number} time\n *        current time (typically the total time up until the final segment)\n * @param {number} duration\n *        duration property for the given <S />\n *\n * @return {number}\n *        R value to reach the end of the given period\n */\nvar getLiveRValue = function getLiveRValue(attributes, time, duration) {\n  var NOW = attributes.NOW,\n      clientOffset = attributes.clientOffset,\n      availabilityStartTime = attributes.availabilityStartTime,\n      _attributes$timescale = attributes.timescale,\n      timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n      _attributes$periodSta = attributes.periodStart,\n      periodStart = _attributes$periodSta === void 0 ? 0 : _attributes$periodSta,\n      _attributes$minimumUp = attributes.minimumUpdatePeriod,\n      minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp;\n  var now = (NOW + clientOffset) / 1000;\n  var periodStartWC = availabilityStartTime + periodStart;\n  var periodEndWC = now + minimumUpdatePeriod;\n  var periodDuration = periodEndWC - periodStartWC;\n  return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\n\nvar parseByTimeline = function parseByTimeline(attributes, segmentTimeline) {\n  var type = attributes.type,\n      _attributes$minimumUp2 = attributes.minimumUpdatePeriod,\n      minimumUpdatePeriod = _attributes$minimumUp2 === void 0 ? 0 : _attributes$minimumUp2,\n      _attributes$media = attributes.media,\n      media = _attributes$media === void 0 ? '' : _attributes$media,\n      sourceDuration = attributes.sourceDuration,\n      _attributes$timescale2 = attributes.timescale,\n      timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\n      _attributes$startNumb = attributes.startNumber,\n      startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb,\n      timeline = attributes.periodStart;\n  var segments = [];\n  var time = -1;\n\n  for (var sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n    var S = segmentTimeline[sIndex];\n    var duration = S.d;\n    var repeat = S.r || 0;\n    var segmentTime = S.t || 0;\n\n    if (time < 0) {\n      // first segment\n      time = segmentTime;\n    }\n\n    if (segmentTime && segmentTime > time) {\n      // discontinuity\n      // TODO: How to handle this type of discontinuity\n      // timeline++ here would treat it like HLS discontuity and content would\n      // get appended without gap\n      // E.G.\n      //  <S t=\"0\" d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S t=\"5\" d=\"1\" />\n      // would have $Time$ values of [0, 1, 2, 5]\n      // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n      // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n      // does the value of sourceDuration consider this when calculating arbitrary\n      // negative @r repeat value?\n      // E.G. Same elements as above with this added at the end\n      //  <S d=\"1\" r=\"-1\" />\n      //  with a sourceDuration of 10\n      // Would the 2 gaps be included in the time duration calculations resulting in\n      // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n      // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n      time = segmentTime;\n    }\n\n    var count = void 0;\n\n    if (repeat < 0) {\n      var nextS = sIndex + 1;\n\n      if (nextS === segmentTimeline.length) {\n        // last segment\n        if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n          count = getLiveRValue(attributes, time, duration);\n        } else {\n          // TODO: This may be incorrect depending on conclusion of TODO above\n          count = (sourceDuration * timescale - time) / duration;\n        }\n      } else {\n        count = (segmentTimeline[nextS].t - time) / duration;\n      }\n    } else {\n      count = repeat + 1;\n    }\n\n    var end = startNumber + segments.length + count;\n    var number = startNumber + segments.length;\n\n    while (number < end) {\n      segments.push({\n        number: number,\n        duration: duration / timescale,\n        time: time,\n        timeline: timeline\n      });\n      time += duration;\n      number++;\n    }\n  }\n\n  return segments;\n};\n\nvar identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n *        Entire match of identifier\n * @param {string} identifier\n *        Name of matched identifier\n * @param {string} format\n *        Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n *        Desired length of the replaced value. Values less than this width shall be left\n *        zero padded\n * @return {string}\n *         Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n *        Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n *        Value of the Representation@id attribute\n * @param {number} values.Number\n *        Number of the corresponding segment\n * @param {number} values.Bandwidth\n *        Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n *        Timestamp value of the corresponding segment\n * @return {replaceCallback}\n *         Callback to be used with String.prototype.replace to replace identifiers\n */\n\nvar identifierReplacement = function identifierReplacement(values) {\n  return function (match, identifier, format, width) {\n    if (match === '$$') {\n      // escape sequence\n      return '$';\n    }\n\n    if (typeof values[identifier] === 'undefined') {\n      return match;\n    }\n\n    var value = '' + values[identifier];\n\n    if (identifier === 'RepresentationID') {\n      // Format tag shall not be present with RepresentationID\n      return value;\n    }\n\n    if (!format) {\n      width = 1;\n    } else {\n      width = parseInt(width, 10);\n    }\n\n    if (value.length >= width) {\n      return value;\n    }\n\n    return \"\" + new Array(width - value.length + 1).join('0') + value;\n  };\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n *        Template string to construct url from\n * @param {Obect} values\n *        Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n *        Value of the Representation@id attribute\n * @param {number} values.Number\n *        Number of the corresponding segment\n * @param {number} values.Bandwidth\n *        Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n *        Timestamp value of the corresponding segment\n * @return {string}\n *         Segment url with identifiers replaced\n */\n\nvar constructTemplateUrl = function constructTemplateUrl(url, values) {\n  return url.replace(identifierPattern, identifierReplacement(values));\n};\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\nvar parseTemplateInfo = function parseTemplateInfo(attributes, segmentTimeline) {\n  if (!attributes.duration && !segmentTimeline) {\n    // if neither @duration or SegmentTimeline are present, then there shall be exactly\n    // one media segment\n    return [{\n      number: attributes.startNumber || 1,\n      duration: attributes.sourceDuration,\n      time: 0,\n      timeline: attributes.periodStart\n    }];\n  }\n\n  if (attributes.duration) {\n    return parseByDuration(attributes);\n  }\n\n  return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {Object[]}\n *         List of segment objects\n */\n\nvar mpd_parser_es_segmentsFromTemplate = function segmentsFromTemplate(attributes, segmentTimeline) {\n  var templateValues = {\n    RepresentationID: attributes.id,\n    Bandwidth: attributes.bandwidth || 0\n  };\n  var _attributes$initializ = attributes.initialization,\n      initialization = _attributes$initializ === void 0 ? {\n    sourceURL: '',\n    range: ''\n  } : _attributes$initializ;\n  var mapSegment = mpd_parser_es_urlTypeToSegment({\n    baseUrl: attributes.baseUrl,\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\n    range: initialization.range\n  });\n  var segments = parseTemplateInfo(attributes, segmentTimeline);\n  return segments.map(function (segment) {\n    templateValues.Number = segment.number;\n    templateValues.Time = segment.time;\n    var uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n    // - if timescale isn't present on any level, default to 1.\n\n    var timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n    var presentationTimeOffset = attributes.presentationTimeOffset || 0;\n    var presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is\n    // calculated in mpd-parser prior to this, so it's assumed to be available.\n    attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n    var map = {\n      uri: uri,\n      timeline: segment.timeline,\n      duration: segment.duration,\n      resolvedUri: Object(resolve_url[\"default\"])(attributes.baseUrl || '', uri),\n      map: mapSegment,\n      number: segment.number,\n      presentationTime: presentationTime\n    };\n    return map;\n  });\n};\n\n/**\n * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @param {Object} segmentUrl\n *   <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nvar SegmentURLToSegmentObject = function SegmentURLToSegmentObject(attributes, segmentUrl) {\n  var baseUrl = attributes.baseUrl,\n      _attributes$initializ = attributes.initialization,\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ;\n  var initSegment = mpd_parser_es_urlTypeToSegment({\n    baseUrl: baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  var segment = mpd_parser_es_urlTypeToSegment({\n    baseUrl: baseUrl,\n    source: segmentUrl.media,\n    range: segmentUrl.mediaRange\n  });\n  segment.map = initSegment;\n  return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {Object.<Array>} list of segments\n */\n\n\nvar segmentsFromList = function segmentsFromList(attributes, segmentTimeline) {\n  var duration = attributes.duration,\n      _attributes$segmentUr = attributes.segmentUrls,\n      segmentUrls = _attributes$segmentUr === void 0 ? [] : _attributes$segmentUr,\n      periodStart = attributes.periodStart; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n  // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n  if (!duration && !segmentTimeline || duration && segmentTimeline) {\n    throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n  }\n\n  var segmentUrlMap = segmentUrls.map(function (segmentUrlObject) {\n    return SegmentURLToSegmentObject(attributes, segmentUrlObject);\n  });\n  var segmentTimeInfo;\n\n  if (duration) {\n    segmentTimeInfo = parseByDuration(attributes);\n  }\n\n  if (segmentTimeline) {\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n  }\n\n  var segments = segmentTimeInfo.map(function (segmentTime, index) {\n    if (segmentUrlMap[index]) {\n      var segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n      // - if timescale isn't present on any level, default to 1.\n\n      var timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      var presentationTimeOffset = attributes.presentationTimeOffset || 0;\n      segment.timeline = segmentTime.timeline;\n      segment.duration = segmentTime.duration;\n      segment.number = segmentTime.number;\n      segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n      return segment;\n    } // Since we're mapping we should get rid of any blank segments (in case\n    // the given SegmentTimeline is handling for more elements than we have\n    // SegmentURLs for).\n\n  }).filter(function (segment) {\n    return segment;\n  });\n  return segments;\n};\n\nvar generateSegments = function generateSegments(_ref) {\n  var attributes = _ref.attributes,\n      segmentInfo = _ref.segmentInfo;\n  var segmentAttributes;\n  var segmentsFn;\n\n  if (segmentInfo.template) {\n    segmentsFn = mpd_parser_es_segmentsFromTemplate;\n    segmentAttributes = merge(attributes, segmentInfo.template);\n  } else if (segmentInfo.base) {\n    segmentsFn = segmentsFromBase;\n    segmentAttributes = merge(attributes, segmentInfo.base);\n  } else if (segmentInfo.list) {\n    segmentsFn = segmentsFromList;\n    segmentAttributes = merge(attributes, segmentInfo.list);\n  }\n\n  var segmentsInfo = {\n    attributes: attributes\n  };\n\n  if (!segmentsFn) {\n    return segmentsInfo;\n  }\n\n  var segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n  // must be in seconds. Since we've generated the segment list, we no longer need\n  // @duration to be in @timescale units, so we can convert it here.\n\n  if (segmentAttributes.duration) {\n    var _segmentAttributes = segmentAttributes,\n        duration = _segmentAttributes.duration,\n        _segmentAttributes$ti = _segmentAttributes.timescale,\n        timescale = _segmentAttributes$ti === void 0 ? 1 : _segmentAttributes$ti;\n    segmentAttributes.duration = duration / timescale;\n  } else if (segments.length) {\n    // if there is no @duration attribute, use the largest segment duration as\n    // as target duration\n    segmentAttributes.duration = segments.reduce(function (max, segment) {\n      return Math.max(max, Math.ceil(segment.duration));\n    }, 0);\n  } else {\n    segmentAttributes.duration = 0;\n  }\n\n  segmentsInfo.attributes = segmentAttributes;\n  segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n  if (segmentInfo.base && segmentAttributes.indexRange) {\n    segmentsInfo.sidx = segments[0];\n    segmentsInfo.segments = [];\n  }\n\n  return segmentsInfo;\n};\nvar toPlaylists = function toPlaylists(representations) {\n  return representations.map(generateSegments);\n};\n\nvar findChildren = function findChildren(element, name) {\n  return from(element.childNodes).filter(function (_ref) {\n    var tagName = _ref.tagName;\n    return tagName === name;\n  });\n};\nvar getContent = function getContent(element) {\n  return element.textContent.trim();\n};\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nvar parseDivisionValue = function parseDivisionValue(value) {\n  return parseFloat(value.split('/').reduce(function (prev, current) {\n    return prev / current;\n  }));\n};\n\nvar parseDuration = function parseDuration(str) {\n  var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n  var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n  var SECONDS_IN_DAY = 24 * 60 * 60;\n  var SECONDS_IN_HOUR = 60 * 60;\n  var SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n  var durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n  var match = durationRegex.exec(str);\n\n  if (!match) {\n    return 0;\n  }\n\n  var _match$slice = match.slice(1),\n      year = _match$slice[0],\n      month = _match$slice[1],\n      day = _match$slice[2],\n      hour = _match$slice[3],\n      minute = _match$slice[4],\n      second = _match$slice[5];\n\n  return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nvar parseDate = function parseDate(str) {\n  // Date format without timezone according to ISO 8601\n  // YYY-MM-DDThh:mm:ss.ssssss\n  var dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n  // expressed by ending with 'Z'\n\n  if (dateRegex.test(str)) {\n    str += 'Z';\n  }\n\n  return Date.parse(str);\n};\n\nvar parsers = {\n  /**\n   * Specifies the duration of the entire Media Presentation. Format is a duration string\n   * as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  mediaPresentationDuration: function mediaPresentationDuration(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the Segment availability start time for all Segments referred to in this\n   * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n   * time. Format is a date string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The date as seconds from unix epoch\n   */\n  availabilityStartTime: function availabilityStartTime(value) {\n    return parseDate(value) / 1000;\n  },\n\n  /**\n   * Specifies the smallest period between potential changes to the MPD. Format is a\n   * duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  minimumUpdatePeriod: function minimumUpdatePeriod(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the suggested presentation delay. Format is a\n   * duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  suggestedPresentationDelay: function suggestedPresentationDelay(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   *\n   * @return {string}\n   *         The type as a string\n   */\n  type: function type(value) {\n    return value;\n  },\n\n  /**\n   * Specifies the duration of the smallest time shifting buffer for any Representation\n   * in the MPD. Format is a duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  timeShiftBufferDepth: function timeShiftBufferDepth(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n   * Format is a duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  start: function start(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the width of the visual presentation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed width\n   */\n  width: function width(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the height of the visual presentation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed height\n   */\n  height: function height(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the bitrate of the representation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed bandwidth\n   */\n  bandwidth: function bandwidth(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the frame rate of the representation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed frame rate\n   */\n  frameRate: function frameRate(value) {\n    return parseDivisionValue(value);\n  },\n\n  /**\n   * Specifies the number of the first Media Segment in this Representation in the Period\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed number\n   */\n  startNumber: function startNumber(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the timescale in units per seconds\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed timescale\n   */\n  timescale: function timescale(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the presentationTimeOffset.\n   *\n   * @param {string} value\n   *        value of the attribute as a string\n   *\n   * @return {number}\n   *         The parsed presentationTimeOffset\n   */\n  presentationTimeOffset: function presentationTimeOffset(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the constant approximate Segment duration\n   * NOTE: The <Period> element also contains an @duration attribute. This duration\n   *       specifies the duration of the Period. This attribute is currently not\n   *       supported by the rest of the parser, however we still check for it to prevent\n   *       errors.\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed duration\n   */\n  duration: function duration(value) {\n    var parsedValue = parseInt(value, 10);\n\n    if (isNaN(parsedValue)) {\n      return parseDuration(value);\n    }\n\n    return parsedValue;\n  },\n\n  /**\n   * Specifies the Segment duration, in units of the value of the @timescale.\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed duration\n   */\n  d: function d(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the MPD start time, in @timescale units, the first Segment in the series\n   * starts relative to the beginning of the Period\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed time\n   */\n  t: function t(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the repeat count of the number of following contiguous Segments with the\n   * same duration expressed by the value of @d\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed number\n   */\n  r: function r(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Default parser for all other attributes. Acts as a no-op and just returns the value\n   * as a string\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {string}\n   *         Unparsed value\n   */\n  DEFAULT: function DEFAULT(value) {\n    return value;\n  }\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n *        The node to parse attributes from\n * @return {Object}\n *         Object with all attributes of el parsed\n */\n\nvar parseAttributes = function parseAttributes(el) {\n  if (!(el && el.attributes)) {\n    return {};\n  }\n\n  return from(el.attributes).reduce(function (a, e) {\n    var parseFn = parsers[e.name] || parsers.DEFAULT;\n    a[e.name] = parseFn(e.value);\n    return a;\n  }, {});\n};\n\nvar keySystemsMap = {\n  'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n  'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n  'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n  'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {string[]} referenceUrls\n *        List of reference urls to resolve to\n * @param {Node[]} baseUrlElements\n *        List of BaseURL nodes from the mpd\n * @return {string[]}\n *         List of resolved urls\n */\n\nvar mpd_parser_es_buildBaseUrls = function buildBaseUrls(referenceUrls, baseUrlElements) {\n  if (!baseUrlElements.length) {\n    return referenceUrls;\n  }\n\n  return flatten(referenceUrls.map(function (reference) {\n    return baseUrlElements.map(function (baseUrlElement) {\n      return Object(resolve_url[\"default\"])(reference, getContent(baseUrlElement));\n    });\n  }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n *           Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n *           Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n *           Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n *           Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n *        The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n *         The Segment information contained within the provided AdaptationSet\n */\n\nvar getSegmentInformation = function getSegmentInformation(adaptationSet) {\n  var segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n  var segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n  var segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(function (s) {\n    return merge({\n      tag: 'SegmentURL'\n    }, parseAttributes(s));\n  });\n  var segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n  var segmentTimelineParentNode = segmentList || segmentTemplate;\n  var segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n  var segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n  var segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n  // @initialization and an <Initialization> node.  @initialization can be templated,\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\n  // both @initialization and an <Initialization> subelement we opt to override with\n  // the node, as this interaction is not defined in the spec.\n\n  var template = segmentTemplate && parseAttributes(segmentTemplate);\n\n  if (template && segmentInitialization) {\n    template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n  } else if (template && template.initialization) {\n    // If it is @initialization we convert it to an object since this is the format that\n    // later functions will rely on for the initialization segment.  This is only valid\n    // for <SegmentTemplate>\n    template.initialization = {\n      sourceURL: template.initialization\n    };\n  }\n\n  var segmentInfo = {\n    template: template,\n    segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(function (s) {\n      return parseAttributes(s);\n    }),\n    list: segmentList && merge(parseAttributes(segmentList), {\n      segmentUrls: segmentUrls,\n      initialization: parseAttributes(segmentInitialization)\n    }),\n    base: segmentBase && merge(parseAttributes(segmentBase), {\n      initialization: parseAttributes(segmentInitialization)\n    })\n  };\n  Object.keys(segmentInfo).forEach(function (key) {\n    if (!segmentInfo[key]) {\n      delete segmentInfo[key];\n    }\n  });\n  return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n *           Segment information for this Representation\n * @property {Object} attributes\n *           Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n *        Representation node from the mpd\n * @return {RepresentationInformation}\n *         Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n *        Contains attributes inherited by the AdaptationSet\n * @param {string[]} adaptationSetBaseUrls\n *        Contains list of resolved base urls inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n *        Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n *         Callback map function\n */\n\nvar inheritBaseUrls = function inheritBaseUrls(adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) {\n  return function (representation) {\n    var repBaseUrlElements = findChildren(representation, 'BaseURL');\n    var repBaseUrls = mpd_parser_es_buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n    var attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n    var representationSegmentInfo = getSegmentInformation(representation);\n    return repBaseUrls.map(function (baseUrl) {\n      return {\n        segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n        attributes: merge(attributes, {\n          baseUrl: baseUrl\n        })\n      };\n    });\n  };\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n *        Content protection nodes\n * @return {Object}\n *        Object containing pssh data by key system\n */\n\nvar mpd_parser_es_generateKeySystemInformation = function generateKeySystemInformation(contentProtectionNodes) {\n  return contentProtectionNodes.reduce(function (acc, node) {\n    var attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n    // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n    // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n    // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n    if (attributes.schemeIdUri) {\n      attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n    }\n\n    var keySystem = keySystemsMap[attributes.schemeIdUri];\n\n    if (keySystem) {\n      acc[keySystem] = {\n        attributes: attributes\n      };\n      var psshNode = findChildren(node, 'cenc:pssh')[0];\n\n      if (psshNode) {\n        var pssh = getContent(psshNode);\n        acc[keySystem].pssh = pssh && Object(decode_b64_to_uint8_array[\"default\"])(pssh);\n      }\n    }\n\n    return acc;\n  }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nvar parseCaptionServiceMetadata = function parseCaptionServiceMetadata(service) {\n  // 608 captions\n  if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n    var values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(function (value) {\n      var channel;\n      var language; // default language to value\n\n      language = value;\n\n      if (/^CC\\d=/.test(value)) {\n        var _value$split = value.split('=');\n\n        channel = _value$split[0];\n        language = _value$split[1];\n      } else if (/^CC\\d$/.test(value)) {\n        channel = value;\n      }\n\n      return {\n        channel: channel,\n        language: language\n      };\n    });\n  } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n    var _values = typeof service.value !== 'string' ? [] : service.value.split(';');\n\n    return _values.map(function (value) {\n      var flags = {\n        // service or channel number 1-63\n        'channel': undefined,\n        // language is a 3ALPHA per ISO 639.2/B\n        // field is required\n        'language': undefined,\n        // BIT 1/0 or ?\n        // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n        'aspectRatio': 1,\n        // BIT 1/0\n        // easy reader flag indicated the text is tailed to the needs of beginning readers\n        // default 0, or off\n        'easyReader': 0,\n        // BIT 1/0\n        // If 3d metadata is present (CEA-708.1) then 1\n        // default 0\n        '3D': 0\n      };\n\n      if (/=/.test(value)) {\n        var _value$split2 = value.split('='),\n            channel = _value$split2[0],\n            _value$split2$ = _value$split2[1],\n            opts = _value$split2$ === void 0 ? '' : _value$split2$;\n\n        flags.channel = channel;\n        flags.language = value;\n        opts.split(',').forEach(function (opt) {\n          var _opt$split = opt.split(':'),\n              name = _opt$split[0],\n              val = _opt$split[1];\n\n          if (name === 'lang') {\n            flags.language = val; // er for easyReadery\n          } else if (name === 'er') {\n            flags.easyReader = Number(val); // war for wide aspect ratio\n          } else if (name === 'war') {\n            flags.aspectRatio = Number(val);\n          } else if (name === '3D') {\n            flags['3D'] = Number(val);\n          }\n        });\n      } else {\n        flags.language = value;\n      }\n\n      if (flags.channel) {\n        flags.channel = 'SERVICE' + flags.channel;\n      }\n\n      return flags;\n    });\n  }\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n *        AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n *         List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n *        Contains attributes inherited by the Period\n * @param {string[]} periodBaseUrls\n *        Contains list of resolved base urls inherited by the Period\n * @param {string[]} periodSegmentInfo\n *        Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n *         Callback map function\n */\n\nvar toRepresentations = function toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo) {\n  return function (adaptationSet) {\n    var adaptationSetAttributes = parseAttributes(adaptationSet);\n    var adaptationSetBaseUrls = mpd_parser_es_buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n    var role = findChildren(adaptationSet, 'Role')[0];\n    var roleAttributes = {\n      role: parseAttributes(role)\n    };\n    var attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n    var accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n    var captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n    if (captionServices) {\n      attrs = merge(attrs, {\n        captionServices: captionServices\n      });\n    }\n\n    var label = findChildren(adaptationSet, 'Label')[0];\n\n    if (label && label.childNodes.length) {\n      var labelVal = label.childNodes[0].nodeValue.trim();\n      attrs = merge(attrs, {\n        label: labelVal\n      });\n    }\n\n    var contentProtection = mpd_parser_es_generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n    if (Object.keys(contentProtection).length) {\n      attrs = merge(attrs, {\n        contentProtection: contentProtection\n      });\n    }\n\n    var segmentInfo = getSegmentInformation(adaptationSet);\n    var representations = findChildren(adaptationSet, 'Representation');\n    var adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n    return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n  };\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n *           Period node from the mpd\n * @property {Object} period.attributes\n *           Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n *        Period object containing necessary period information\n * @param {number} periodStart\n *        Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n *         List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n *        Contains attributes inherited by the mpd\n * @param {string[]} mpdBaseUrls\n *        Contains list of resolved base urls inherited by the mpd\n * @return {toAdaptationSetsCallback}\n *         Callback map function\n */\n\nvar toAdaptationSets = function toAdaptationSets(mpdAttributes, mpdBaseUrls) {\n  return function (period, index) {\n    var periodBaseUrls = mpd_parser_es_buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n    var periodAttributes = merge(mpdAttributes, {\n      periodStart: period.attributes.start\n    });\n\n    if (typeof period.attributes.duration === 'number') {\n      periodAttributes.periodDuration = period.attributes.duration;\n    }\n\n    var adaptationSets = findChildren(period.node, 'AdaptationSet');\n    var periodSegmentInfo = getSegmentInformation(period.node);\n    return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n  };\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n *        Options object\n * @param {Object} options.attributes\n *        Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n *        Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n *        The MPD@type these periods came from\n * @return {number|null}\n *         The period start, or null if it's an early available period or error\n */\n\nvar getPeriodStart = function getPeriodStart(_ref) {\n  var attributes = _ref.attributes,\n      priorPeriodAttributes = _ref.priorPeriodAttributes,\n      mpdType = _ref.mpdType;\n\n  // Summary of period start time calculation from DASH spec section 5.3.2.1\n  //\n  // A period's start is the first period's start + time elapsed after playing all\n  // prior periods to this one. Periods continue one after the other in time (without\n  // gaps) until the end of the presentation.\n  //\n  // The value of Period@start should be:\n  // 1. if Period@start is present: value of Period@start\n  // 2. if previous period exists and it has @duration: previous Period@start +\n  //    previous Period@duration\n  // 3. if this is first period and MPD@type is 'static': 0\n  // 4. in all other cases, consider the period an \"early available period\" (note: not\n  //    currently supported)\n  // (1)\n  if (typeof attributes.start === 'number') {\n    return attributes.start;\n  } // (2)\n\n\n  if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n    return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n  } // (3)\n\n\n  if (!priorPeriodAttributes && mpdType === 'static') {\n    return 0;\n  } // (4)\n  // There is currently no logic for calculating the Period@start value if there is\n  // no Period@start or prior Period@start and Period@duration available. This is not made\n  // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n  // nothing about any other resolution strategies, it's implied. Thus, this case should\n  // be considered an early available period, or error, and null should suffice for both\n  // of those cases.\n\n\n  return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n *        The root node of the mpd\n * @param {Object} options\n *        Available options for inheritAttributes\n * @param {string} options.manifestUri\n *        The uri source of the mpd\n * @param {number} options.NOW\n *        Current time per DASH IOP.  Default is current time in ms since epoch\n * @param {number} options.clientOffset\n *        Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n *         List of objects containing Representation information\n */\n\nvar inheritAttributes = function inheritAttributes(mpd, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$manifestUri = _options.manifestUri,\n      manifestUri = _options$manifestUri === void 0 ? '' : _options$manifestUri,\n      _options$NOW = _options.NOW,\n      NOW = _options$NOW === void 0 ? Date.now() : _options$NOW,\n      _options$clientOffset = _options.clientOffset,\n      clientOffset = _options$clientOffset === void 0 ? 0 : _options$clientOffset;\n  var periodNodes = findChildren(mpd, 'Period');\n\n  if (!periodNodes.length) {\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n  }\n\n  var locations = findChildren(mpd, 'Location');\n  var mpdAttributes = parseAttributes(mpd);\n  var mpdBaseUrls = mpd_parser_es_buildBaseUrls([manifestUri], findChildren(mpd, 'BaseURL')); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n  mpdAttributes.type = mpdAttributes.type || 'static';\n  mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n  mpdAttributes.NOW = NOW;\n  mpdAttributes.clientOffset = clientOffset;\n\n  if (locations.length) {\n    mpdAttributes.locations = locations.map(getContent);\n  }\n\n  var periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n  // adding properties that require looking at prior periods is to parse attributes and add\n  // missing ones before toAdaptationSets is called. If more such properties are added, it\n  // may be better to refactor toAdaptationSets.\n\n  periodNodes.forEach(function (node, index) {\n    var attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n    // for this period.\n\n    var priorPeriod = periods[index - 1];\n    attributes.start = getPeriodStart({\n      attributes: attributes,\n      priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n      mpdType: mpdAttributes.type\n    });\n    periods.push({\n      node: node,\n      attributes: attributes\n    });\n  });\n  return {\n    locations: mpdAttributes.locations,\n    representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls)))\n  };\n};\n\nvar mpd_parser_es_stringToMpdXml = function stringToMpdXml(manifestString) {\n  if (manifestString === '') {\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\n  }\n\n  var parser = new lib[\"DOMParser\"]();\n  var xml;\n  var mpd;\n\n  try {\n    xml = parser.parseFromString(manifestString, 'application/xml');\n    mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n  } catch (e) {// ie 11 throwsw on invalid xml\n  }\n\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n    throw new Error(errors.DASH_INVALID_XML);\n  }\n\n  return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n *        XML string of the MPD manifest\n * @return {Object|null}\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nvar parseUTCTimingScheme = function parseUTCTimingScheme(mpd) {\n  var UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n  if (!UTCTimingNode) {\n    return null;\n  }\n\n  var attributes = parseAttributes(UTCTimingNode);\n\n  switch (attributes.schemeIdUri) {\n    case 'urn:mpeg:dash:utc:http-head:2014':\n    case 'urn:mpeg:dash:utc:http-head:2012':\n      attributes.method = 'HEAD';\n      break;\n\n    case 'urn:mpeg:dash:utc:http-xsdate:2014':\n    case 'urn:mpeg:dash:utc:http-iso:2014':\n    case 'urn:mpeg:dash:utc:http-xsdate:2012':\n    case 'urn:mpeg:dash:utc:http-iso:2012':\n      attributes.method = 'GET';\n      break;\n\n    case 'urn:mpeg:dash:utc:direct:2014':\n    case 'urn:mpeg:dash:utc:direct:2012':\n      attributes.method = 'DIRECT';\n      attributes.value = Date.parse(attributes.value);\n      break;\n\n    case 'urn:mpeg:dash:utc:http-ntp:2014':\n    case 'urn:mpeg:dash:utc:ntp:2014':\n    case 'urn:mpeg:dash:utc:sntp:2014':\n    default:\n      throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n  }\n\n  return attributes;\n};\n\nvar VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nvar parse = function parse(manifestString, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var parsedManifestInfo = inheritAttributes(mpd_parser_es_stringToMpdXml(manifestString), options);\n  var playlists = toPlaylists(parsedManifestInfo.representationInfo);\n  return toM3u8({\n    dashPlaylists: playlists,\n    locations: parsedManifestInfo.locations,\n    sidxMapping: options.sidxMapping,\n    previousManifest: options.previousManifest\n  });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n *        XML string of the MPD manifest\n * @return {Object|null}\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nvar parseUTCTiming = function parseUTCTiming(manifestString) {\n  return parseUTCTimingScheme(mpd_parser_es_stringToMpdXml(manifestString));\n};\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mpd-parser/dist/mpd-parser.es.js_+_1_modules?");

/***/ }),

/***/ "./node_modules/mux.js/lib/tools/parse-sidx.js":
/*!*****************************************************!*\
  !*** ./node_modules/mux.js/lib/tools/parse-sidx.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var getUint64 = __webpack_require__(/*! ../utils/numbers.js */ \"./node_modules/mux.js/lib/utils/numbers.js\").getUint64;\n\nvar parseSidx = function(data) {\n  var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        references: [],\n        referenceId: view.getUint32(4),\n        timescale: view.getUint32(8)\n      },\n    i = 12;\n\n  if (result.version === 0) {\n    result.earliestPresentationTime = view.getUint32(i);\n    result.firstOffset = view.getUint32(i + 4);\n    i += 8;\n  } else {\n    // read 64 bits\n    result.earliestPresentationTime = getUint64(data.subarray(i));\n    result.firstOffset = getUint64(data.subarray(i + 8));\n    i += 16;\n  }\n\n  i += 2; // reserved\n\n  var referenceCount = view.getUint16(i);\n\n  i += 2; // start of references\n\n  for (; referenceCount > 0; i += 12, referenceCount--) {\n    result.references.push({\n      referenceType: (data[i] & 0x80) >>> 7,\n      referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n      subsegmentDuration: view.getUint32(i + 4),\n      startsWithSap: !!(data[i + 8] & 0x80),\n      sapType: (data[i + 8] & 0x70) >>> 4,\n      sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n    });\n  }\n\n  return result;\n};\n\n\nmodule.exports = parseSidx;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mux.js/lib/tools/parse-sidx.js?");

/***/ }),

/***/ "./node_modules/mux.js/lib/utils/clock.js":
/*!************************************************!*\
  !*** ./node_modules/mux.js/lib/utils/clock.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\n  secondsToVideoTs,\n  secondsToAudioTs,\n  videoTsToSeconds,\n  audioTsToSeconds,\n  audioTsToVideoTs,\n  videoTsToAudioTs,\n  metadataTsToSeconds;\n\nsecondsToVideoTs = function(seconds) {\n  return seconds * ONE_SECOND_IN_TS;\n};\n\nsecondsToAudioTs = function(seconds, sampleRate) {\n  return seconds * sampleRate;\n};\n\nvideoTsToSeconds = function(timestamp) {\n  return timestamp / ONE_SECOND_IN_TS;\n};\n\naudioTsToSeconds = function(timestamp, sampleRate) {\n  return timestamp / sampleRate;\n};\n\naudioTsToVideoTs = function(timestamp, sampleRate) {\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\n\nvideoTsToAudioTs = function(timestamp, sampleRate) {\n  return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n};\n\n/**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\nmetadataTsToSeconds = function(timestamp, timelineStartPts, keepOriginalTimestamps) {\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\n\nmodule.exports = {\n  ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n  secondsToVideoTs: secondsToVideoTs,\n  secondsToAudioTs: secondsToAudioTs,\n  videoTsToSeconds: videoTsToSeconds,\n  audioTsToSeconds: audioTsToSeconds,\n  audioTsToVideoTs: audioTsToVideoTs,\n  videoTsToAudioTs: videoTsToAudioTs,\n  metadataTsToSeconds: metadataTsToSeconds\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mux.js/lib/utils/clock.js?");

/***/ }),

/***/ "./node_modules/mux.js/lib/utils/numbers.js":
/*!**************************************************!*\
  !*** ./node_modules/mux.js/lib/utils/numbers.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var MAX_UINT32 = Math.pow(2, 32);\n\nvar getUint64 = function(uint8) {\n  var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n  var value;\n\n  if (dv.getBigUint64) {\n    value = dv.getBigUint64(0);\n\n    if (value < Number.MAX_SAFE_INTEGER) {\n      return Number(value);\n    }\n\n    return value;\n  }\n\n  return (dv.getUint32(0) * MAX_UINT32) + dv.getUint32(4);\n};\n\nmodule.exports = {\n  getUint64: getUint64,\n  MAX_UINT32: MAX_UINT32\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/mux.js/lib/utils/numbers.js?");

/***/ }),

/***/ "./node_modules/nanoid/non-secure/index.js":
/*!*************************************************!*\
  !*** ./node_modules/nanoid/non-secure/index.js ***!
  \*************************************************/
/*! exports provided: nanoid, customAlphabet */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/postcss/lib/input.js (referenced with cjs require) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nanoid\", function() { return nanoid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"customAlphabet\", function() { return customAlphabet; });\n// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n  return (size = defaultSize) => {\n    let id = ''\n    // A compact alternative for `for (var i = 0; i < step; i++)`.\n    let i = size | 0\n    while (i--) {\n      // `| 0` is more compact and faster than `Math.floor()`.\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\n\nlet nanoid = (size = 21) => {\n  let id = ''\n  // A compact alternative for `for (var i = 0; i < step; i++)`.\n  let i = size | 0\n  while (i--) {\n    // `| 0` is more compact and faster than `Math.floor()`.\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/nanoid/non-secure/index.js?");

/***/ }),

/***/ "./node_modules/on-change/index.js":
/*!*****************************************!*\
  !*** ./node_modules/on-change/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst {TARGET, UNSUBSCRIBE} = __webpack_require__(/*! ./lib/constants */ \"./node_modules/on-change/lib/constants.js\");\nconst isBuiltin = __webpack_require__(/*! ./lib/is-builtin */ \"./node_modules/on-change/lib/is-builtin.js\");\nconst path = __webpack_require__(/*! ./lib/path */ \"./node_modules/on-change/lib/path.js\");\nconst isSymbol = __webpack_require__(/*! ./lib/is-symbol */ \"./node_modules/on-change/lib/is-symbol.js\");\nconst isIterator = __webpack_require__(/*! ./lib/is-iterator */ \"./node_modules/on-change/lib/is-iterator.js\");\nconst wrapIterator = __webpack_require__(/*! ./lib/wrap-iterator */ \"./node_modules/on-change/lib/wrap-iterator.js\");\nconst ignoreProperty = __webpack_require__(/*! ./lib/ignore-property */ \"./node_modules/on-change/lib/ignore-property.js\");\nconst Cache = __webpack_require__(/*! ./lib/cache */ \"./node_modules/on-change/lib/cache.js\");\nconst SmartClone = __webpack_require__(/*! ./lib/smart-clone */ \"./node_modules/on-change/lib/smart-clone.js\");\n\nconst defaultOptions = {\n\tequals: Object.is,\n\tisShallow: false,\n\tpathAsArray: false,\n\tignoreSymbols: false,\n\tignoreUnderscores: false,\n\tignoreDetached: false\n};\n\nconst onChange = (object, onChange, options = {}) => {\n\toptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t};\n\tconst proxyTarget = Symbol('ProxyTarget');\n\tconst {equals, isShallow, ignoreDetached} = options;\n\tconst cache = new Cache(equals);\n\tconst smartClone = new SmartClone();\n\n\tconst handleChangeOnTarget = (target, property, previous, value) => {\n\t\tif (\n\t\t\t!ignoreProperty(cache, options, property) &&\n\t\t\t!(ignoreDetached && cache.isDetached(target, object))\n\t\t) {\n\t\t\thandleChange(cache.getPath(target), property, previous, value);\n\t\t}\n\t};\n\n\t// eslint-disable-next-line max-params\n\tconst handleChange = (changePath, property, previous, value, name) => {\n\t\tif (smartClone.isCloning) {\n\t\t\tsmartClone.update(changePath, property, previous);\n\t\t} else {\n\t\t\tonChange(path.concat(changePath, property), value, previous, name);\n\t\t}\n\t};\n\n\tconst getProxyTarget = value => {\n\t\tif (value) {\n\t\t\treturn value[proxyTarget] || value;\n\t\t}\n\n\t\treturn value;\n\t};\n\n\tconst prepareValue = (value, target, property, basePath) => {\n\t\tif (\n\t\t\tisBuiltin.withoutMutableMethods(value) ||\n\t\t\tproperty === 'constructor' ||\n\t\t\t(isShallow && !SmartClone.isHandledMethod(target, property)) ||\n\t\t\tignoreProperty(cache, options, property) ||\n\t\t\tcache.isGetInvariant(target, property) ||\n\t\t\t(ignoreDetached && cache.isDetached(target, object))\n\t\t) {\n\t\t\treturn value;\n\t\t}\n\n\t\tif (basePath === undefined) {\n\t\t\tbasePath = cache.getPath(target);\n\t\t}\n\n\t\treturn cache.getProxy(value, path.concat(basePath, property), handler, proxyTarget);\n\t};\n\n\tconst handler = {\n\t\tget(target, property, receiver) {\n\t\t\tif (isSymbol(property)) {\n\t\t\t\tif (property === proxyTarget || property === TARGET) {\n\t\t\t\t\treturn target;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tproperty === UNSUBSCRIBE &&\n\t\t\t\t\t!cache.isUnsubscribed &&\n\t\t\t\t\tcache.getPath(target).length === 0\n\t\t\t\t) {\n\t\t\t\t\tcache.unsubscribe();\n\t\t\t\t\treturn target;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst value = isBuiltin.withMutableMethods(target) ?\n\t\t\t\tReflect.get(target, property) :\n\t\t\t\tReflect.get(target, property, receiver);\n\n\t\t\treturn prepareValue(value, target, property);\n\t\t},\n\n\t\tset(target, property, value, receiver) {\n\t\t\tvalue = getProxyTarget(value);\n\n\t\t\tconst reflectTarget = target[proxyTarget] || target;\n\t\t\tconst previous = reflectTarget[property];\n\t\t\tconst hasProperty = property in target;\n\n\t\t\tif (cache.setProperty(reflectTarget, property, value, receiver, previous)) {\n\t\t\t\tif (!equals(previous, value) || !hasProperty) {\n\t\t\t\t\thandleChangeOnTarget(target, property, previous, value);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\tdefineProperty(target, property, descriptor) {\n\t\t\tif (!cache.isSameDescriptor(descriptor, target, property)) {\n\t\t\t\tif (!cache.defineProperty(target, property, descriptor)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\thandleChangeOnTarget(target, property, undefined, descriptor.value);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tdeleteProperty(target, property) {\n\t\t\tif (!Reflect.has(target, property)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst previous = Reflect.get(target, property);\n\n\t\t\tif (cache.deleteProperty(target, property, previous)) {\n\t\t\t\thandleChangeOnTarget(target, property, previous);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\tapply(target, thisArg, argumentsList) {\n\t\t\tconst thisProxyTarget = thisArg[proxyTarget] || thisArg;\n\n\t\t\tif (cache.isUnsubscribed) {\n\t\t\t\treturn Reflect.apply(target, thisProxyTarget, argumentsList);\n\t\t\t}\n\n\t\t\tif (SmartClone.isHandledType(thisProxyTarget)) {\n\t\t\t\tconst applyPath = path.initial(cache.getPath(target));\n\t\t\t\tconst isHandledMethod = SmartClone.isHandledMethod(thisProxyTarget, target.name);\n\n\t\t\t\tsmartClone.start(thisProxyTarget, applyPath, argumentsList);\n\n\t\t\t\tconst result = Reflect.apply(\n\t\t\t\t\ttarget,\n\t\t\t\t\tsmartClone.preferredThisArg(target, thisArg, thisProxyTarget),\n\t\t\t\t\tisHandledMethod ?\n\t\t\t\t\t\targumentsList.map(argument => getProxyTarget(argument)) :\n\t\t\t\t\t\targumentsList\n\t\t\t\t);\n\n\t\t\t\tconst isChanged = smartClone.isChanged(thisProxyTarget, equals, argumentsList);\n\t\t\t\tconst clone = smartClone.stop();\n\n\t\t\t\tif (isChanged) {\n\t\t\t\t\tif (smartClone.isCloning) {\n\t\t\t\t\t\thandleChange(path.initial(applyPath), path.last(applyPath), clone, thisProxyTarget, target.name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleChange(applyPath, '', clone, thisProxyTarget, target.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(thisArg instanceof Map || thisArg instanceof Set) &&\n\t\t\t\t\tisIterator(result)\n\t\t\t\t) {\n\t\t\t\t\treturn wrapIterator(result, target, thisArg, applyPath, prepareValue);\n\t\t\t\t}\n\n\t\t\t\treturn (SmartClone.isHandledType(result) && isHandledMethod) ?\n\t\t\t\t\tcache.getProxy(result, applyPath, handler, proxyTarget) :\n\t\t\t\t\tresult;\n\t\t\t}\n\n\t\t\treturn Reflect.apply(target, thisArg, argumentsList);\n\t\t}\n\t};\n\n\tconst proxy = cache.getProxy(object, options.pathAsArray ? [] : '', handler);\n\tonChange = onChange.bind(proxy);\n\n\treturn proxy;\n};\n\nonChange.target = proxy => proxy[TARGET] || proxy;\nonChange.unsubscribe = proxy => proxy[UNSUBSCRIBE] || proxy;\n\nmodule.exports = onChange;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/index.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/cache.js":
/*!*********************************************!*\
  !*** ./node_modules/on-change/lib/cache.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst path = __webpack_require__(/*! ./path */ \"./node_modules/on-change/lib/path.js\");\n\n/**\n * @class Cache\n * @private\n */\nclass Cache {\n\tconstructor(equals) {\n\t\tthis._equals = equals;\n\t\tthis._proxyCache = new WeakMap();\n\t\tthis._pathCache = new WeakMap();\n\t\tthis.isUnsubscribed = false;\n\t}\n\n\t_getDescriptorCache() {\n\t\tif (this._descriptorCache === undefined) {\n\t\t\tthis._descriptorCache = new WeakMap();\n\t\t}\n\n\t\treturn this._descriptorCache;\n\t}\n\n\t_getProperties(target) {\n\t\tconst descriptorCache = this._getDescriptorCache();\n\t\tlet properties = descriptorCache.get(target);\n\n\t\tif (properties === undefined) {\n\t\t\tproperties = {};\n\t\t\tdescriptorCache.set(target, properties);\n\t\t}\n\n\t\treturn properties;\n\t}\n\n\t_getOwnPropertyDescriptor(target, property) {\n\t\tif (this.isUnsubscribed) {\n\t\t\treturn Reflect.getOwnPropertyDescriptor(target, property);\n\t\t}\n\n\t\tconst properties = this._getProperties(target);\n\t\tlet descriptor = properties[property];\n\n\t\tif (descriptor === undefined) {\n\t\t\tdescriptor = Reflect.getOwnPropertyDescriptor(target, property);\n\t\t\tproperties[property] = descriptor;\n\t\t}\n\n\t\treturn descriptor;\n\t}\n\n\tgetProxy(target, path, handler, proxyTarget) {\n\t\tif (this.isUnsubscribed) {\n\t\t\treturn target;\n\t\t}\n\n\t\tthis._pathCache.set(target, path);\n\n\t\tlet proxy = this._proxyCache.get(target);\n\n\t\tif (proxy === undefined) {\n\t\t\tproxy = target[proxyTarget] === undefined ?\n\t\t\t\tnew Proxy(target, handler) :\n\t\t\t\ttarget;\n\n\t\t\tthis._proxyCache.set(target, proxy);\n\t\t}\n\n\t\treturn proxy;\n\t}\n\n\tgetPath(target) {\n\t\treturn this.isUnsubscribed ? undefined : this._pathCache.get(target);\n\t}\n\n\tisDetached(target, object) {\n\t\tpath.walk(this.getPath(target), key => {\n\t\t\tif (object) {\n\t\t\t\tobject = object[key];\n\t\t\t}\n\t\t});\n\n\t\treturn !Object.is(target, object);\n\t}\n\n\tdefineProperty(target, property, descriptor) {\n\t\tif (!Reflect.defineProperty(target, property, descriptor)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!this.isUnsubscribed) {\n\t\t\tthis._getProperties(target)[property] = descriptor;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tsetProperty(target, property, value, receiver, previous) { // eslint-disable-line max-params\n\t\tif (!this._equals(previous, value) || !(property in target)) {\n\t\t\tconst descriptor = this._getOwnPropertyDescriptor(target, property);\n\n\t\t\tif (descriptor !== undefined && 'set' in descriptor) {\n\t\t\t\treturn Reflect.set(target, property, value, receiver);\n\t\t\t}\n\n\t\t\treturn Reflect.set(target, property, value);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tdeleteProperty(target, property, previous) {\n\t\tif (Reflect.deleteProperty(target, property)) {\n\t\t\tif (!this.isUnsubscribed) {\n\t\t\t\tconst properties = this._getDescriptorCache().get(target);\n\n\t\t\t\tif (properties) {\n\t\t\t\t\tdelete properties[property];\n\t\t\t\t\tthis._pathCache.delete(previous);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSameDescriptor(a, target, property) {\n\t\tconst b = this._getOwnPropertyDescriptor(target, property);\n\n\t\treturn a !== undefined &&\n\t\t\tb !== undefined &&\n\t\t\tObject.is(a.value, b.value) &&\n\t\t\t(a.writable || false) === (b.writable || false) &&\n\t\t\t(a.enumerable || false) === (b.enumerable || false) &&\n\t\t\t(a.configurable || false) === (b.configurable || false) &&\n\t\t\ta.get === b.get &&\n\t\t\ta.set === b.set;\n\t}\n\n\tisGetInvariant(target, property) {\n\t\tconst descriptor = this._getOwnPropertyDescriptor(target, property);\n\n\t\treturn descriptor !== undefined &&\n\t\t\tdescriptor.configurable !== true &&\n\t\t\tdescriptor.writable !== true;\n\t}\n\n\tunsubscribe() {\n\t\tthis._descriptorCache = null;\n\t\tthis._pathCache = null;\n\t\tthis._proxyCache = null;\n\t\tthis.isUnsubscribed = true;\n\t}\n}\n\nmodule.exports = Cache;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/cache.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/constants.js":
/*!*************************************************!*\
  !*** ./node_modules/on-change/lib/constants.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = {\n\tPATH_SEPARATOR: '.',\n\tTARGET: Symbol('target'),\n\tUNSUBSCRIBE: Symbol('unsubscribe')\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/constants.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/ignore-property.js":
/*!*******************************************************!*\
  !*** ./node_modules/on-change/lib/ignore-property.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst isSymbol = __webpack_require__(/*! ./is-symbol */ \"./node_modules/on-change/lib/is-symbol.js\");\n\nmodule.exports = (cache, options, property) => {\n\treturn cache.isUnsubscribed ||\n\t\t(options.ignoreSymbols && isSymbol(property)) ||\n\t\t(options.ignoreUnderscores && property.charAt(0) === '_') ||\n\t\t('ignoreKeys' in options && options.ignoreKeys.includes(property));\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/ignore-property.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/is-array.js":
/*!************************************************!*\
  !*** ./node_modules/on-change/lib/is-array.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = Array.isArray;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/is-array.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/is-builtin.js":
/*!**************************************************!*\
  !*** ./node_modules/on-change/lib/is-builtin.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst isBuiltin = {\n\twithMutableMethods: value => {\n\t\treturn value instanceof Date ||\n\t\t\tvalue instanceof Set ||\n\t\t\tvalue instanceof Map ||\n\t\t\tvalue instanceof WeakSet ||\n\t\t\tvalue instanceof WeakMap;\n\t},\n\twithoutMutableMethods: value => (typeof value === 'object' ? value === null : typeof value !== 'function') || value instanceof RegExp\n};\n\nmodule.exports = isBuiltin;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/is-builtin.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/is-iterator.js":
/*!***************************************************!*\
  !*** ./node_modules/on-change/lib/is-iterator.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = value => typeof value === 'object' && typeof value.next === 'function';\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/is-iterator.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/is-object.js":
/*!*************************************************!*\
  !*** ./node_modules/on-change/lib/is-object.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = value => toString.call(value) === '[object Object]';\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/is-object.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/is-symbol.js":
/*!*************************************************!*\
  !*** ./node_modules/on-change/lib/is-symbol.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = value => typeof value === 'symbol';\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/is-symbol.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/path.js":
/*!********************************************!*\
  !*** ./node_modules/on-change/lib/path.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst {PATH_SEPARATOR} = __webpack_require__(/*! ./constants */ \"./node_modules/on-change/lib/constants.js\");\nconst isArray = __webpack_require__(/*! ./is-array */ \"./node_modules/on-change/lib/is-array.js\");\nconst isSymbol = __webpack_require__(/*! ./is-symbol */ \"./node_modules/on-change/lib/is-symbol.js\");\n\nmodule.exports = {\n\tafter: (path, subPath) => {\n\t\tif (isArray(path)) {\n\t\t\treturn path.slice(subPath.length);\n\t\t}\n\n\t\tif (subPath === '') {\n\t\t\treturn path;\n\t\t}\n\n\t\treturn path.slice(subPath.length + 1);\n\t},\n\tconcat: (path, key) => {\n\t\tif (isArray(path)) {\n\t\t\tpath = path.slice();\n\n\t\t\tif (key) {\n\t\t\t\tpath.push(key);\n\t\t\t}\n\n\t\t\treturn path;\n\t\t}\n\n\t\tif (key && key.toString !== undefined) {\n\t\t\tif (path !== '') {\n\t\t\t\tpath += PATH_SEPARATOR;\n\t\t\t}\n\n\t\t\tif (isSymbol(key)) {\n\t\t\t\treturn path + key.toString();\n\t\t\t}\n\n\t\t\treturn path + key;\n\t\t}\n\n\t\treturn path;\n\t},\n\tinitial: path => {\n\t\tif (isArray(path)) {\n\t\t\treturn path.slice(0, -1);\n\t\t}\n\n\t\tif (path === '') {\n\t\t\treturn path;\n\t\t}\n\n\t\tconst index = path.lastIndexOf(PATH_SEPARATOR);\n\n\t\tif (index === -1) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn path.slice(0, index);\n\t},\n\tlast: path => {\n\t\tif (isArray(path)) {\n\t\t\treturn path[path.length - 1] || '';\n\t\t}\n\n\t\tif (path === '') {\n\t\t\treturn path;\n\t\t}\n\n\t\tconst index = path.lastIndexOf(PATH_SEPARATOR);\n\n\t\tif (index === -1) {\n\t\t\treturn path;\n\t\t}\n\n\t\treturn path.slice(index + 1);\n\t},\n\twalk: (path, callback) => {\n\t\tif (isArray(path)) {\n\t\t\tpath.forEach(key => callback(key));\n\t\t} else if (path !== '') {\n\t\t\tlet position = 0;\n\t\t\tlet index = path.indexOf(PATH_SEPARATOR);\n\n\t\t\tif (index === -1) {\n\t\t\t\tcallback(path);\n\t\t\t} else {\n\t\t\t\twhile (position < path.length) {\n\t\t\t\t\tif (index === -1) {\n\t\t\t\t\t\tindex = path.length;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback(path.slice(position, index));\n\n\t\t\t\t\tposition = index + 1;\n\t\t\t\t\tindex = path.indexOf(PATH_SEPARATOR, position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/path.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/smart-clone.js":
/*!***************************************************!*\
  !*** ./node_modules/on-change/lib/smart-clone.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst path = __webpack_require__(/*! ./path */ \"./node_modules/on-change/lib/path.js\");\nconst isArray = __webpack_require__(/*! ./is-array */ \"./node_modules/on-change/lib/is-array.js\");\nconst isBuiltin = __webpack_require__(/*! ./is-builtin */ \"./node_modules/on-change/lib/is-builtin.js\");\nconst isObject = __webpack_require__(/*! ./is-object */ \"./node_modules/on-change/lib/is-object.js\");\n\nconst certainChange = () => true;\n\nconst shallowEqualArrays = (clone, value) => {\n\treturn clone.length !== value.length || clone.some((item, index) => value[index] !== item);\n};\n\nconst shallowEqualSets = (clone, value) => {\n\tif (clone.size !== value.size) {\n\t\treturn true;\n\t}\n\n\tfor (const element of clone) {\n\t\tif (!value.has(element)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst shallowEqualMaps = (clone, value) => {\n\tif (clone.size !== value.size) {\n\t\treturn true;\n\t}\n\n\tlet bValue;\n\tfor (const [key, aValue] of clone) {\n\t\tbValue = value.get(key);\n\n\t\tif (bValue !== aValue || (bValue === undefined && !value.has(key))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst IMMUTABLE_OBJECT_METHODS = new Set([\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'toLocaleString',\n\t'toString',\n\t'valueOf'\n]);\n\nconst IMMUTABLE_ARRAY_METHODS = new Set([\n\t'concat',\n\t'includes',\n\t'indexOf',\n\t'join',\n\t'keys',\n\t'lastIndexOf'\n]);\n\nconst IMMUTABLE_SET_METHODS = new Set([\n\t'has',\n\t'toString'\n]);\n\nconst IMMUTABLE_MAP_METHODS = new Set([...IMMUTABLE_SET_METHODS].concat(['get']));\n\nconst SHALLOW_MUTABLE_ARRAY_METHODS = {\n\tpush: certainChange,\n\tpop: certainChange,\n\tshift: certainChange,\n\tunshift: certainChange,\n\tcopyWithin: shallowEqualArrays,\n\treverse: shallowEqualArrays,\n\tsort: shallowEqualArrays,\n\tsplice: shallowEqualArrays,\n\tflat: shallowEqualArrays,\n\tfill: shallowEqualArrays\n};\n\nconst SHALLOW_MUTABLE_SET_METHODS = {\n\tadd: shallowEqualSets,\n\tclear: shallowEqualSets,\n\tdelete: shallowEqualSets\n};\n\nconst COLLECTION_ITERATOR_METHODS = [\n\t'keys',\n\t'values',\n\t'entries'\n];\n\nconst SHALLOW_MUTABLE_MAP_METHODS = {\n\tset: shallowEqualMaps,\n\tclear: shallowEqualMaps,\n\tdelete: shallowEqualMaps\n};\n\nconst HANDLED_ARRAY_METHODS = new Set([...IMMUTABLE_OBJECT_METHODS]\n\t.concat([...IMMUTABLE_ARRAY_METHODS])\n\t.concat(Object.keys(SHALLOW_MUTABLE_ARRAY_METHODS)));\n\nconst HANDLED_SET_METHODS = new Set([...IMMUTABLE_SET_METHODS]\n\t.concat(Object.keys(SHALLOW_MUTABLE_SET_METHODS))\n\t.concat(COLLECTION_ITERATOR_METHODS));\n\nconst HANDLED_MAP_METHODS = new Set([...IMMUTABLE_MAP_METHODS]\n\t.concat(Object.keys(SHALLOW_MUTABLE_MAP_METHODS))\n\t.concat(COLLECTION_ITERATOR_METHODS));\n\nclass Clone {\n\tconstructor(value, path, argumentsList) {\n\t\tthis._path = path;\n\t\tthis._isChanged = false;\n\t\tthis._clonedCache = new Set();\n\n\t\tif (value instanceof WeakSet) {\n\t\t\tthis._weakValue = value.has(argumentsList[0]);\n\t\t} else if (value instanceof WeakMap) {\n\t\t\tthis._weakValue = value.get(argumentsList[0]);\n\t\t} else {\n\t\t\tthis.clone = path === undefined ? value : this._shallowClone(value);\n\t\t}\n\t}\n\n\t_shallowClone(value) {\n\t\tlet clone;\n\n\t\tif (isObject(value)) {\n\t\t\tclone = {...value};\n\t\t} else if (isArray(value)) {\n\t\t\tclone = [...value];\n\t\t} else if (value instanceof Date) {\n\t\t\tclone = new Date(value);\n\t\t} else if (value instanceof Set) {\n\t\t\tclone = new Set(value);\n\t\t} else if (value instanceof Map) {\n\t\t\tclone = new Map(value);\n\t\t}\n\n\t\tthis._clonedCache.add(clone);\n\n\t\treturn clone;\n\t}\n\n\tpreferredThisArg(target, thisArg, thisProxyTarget) {\n\t\tconst {name} = target;\n\n\t\tif (SmartClone.isHandledMethod(thisProxyTarget, name)) {\n\t\t\tif (isArray(thisProxyTarget)) {\n\t\t\t\tthis._onIsChanged = SHALLOW_MUTABLE_ARRAY_METHODS[name];\n\t\t\t} else if (thisProxyTarget instanceof Set) {\n\t\t\t\tthis._onIsChanged = SHALLOW_MUTABLE_SET_METHODS[name];\n\t\t\t} else if (thisProxyTarget instanceof Map) {\n\t\t\t\tthis._onIsChanged = SHALLOW_MUTABLE_MAP_METHODS[name];\n\t\t\t}\n\n\t\t\treturn thisProxyTarget;\n\t\t}\n\n\t\treturn thisArg;\n\t}\n\n\tupdate(fullPath, property, value) {\n\t\tif (value !== undefined && property !== 'length') {\n\t\t\tlet object = this.clone;\n\n\t\t\tpath.walk(path.after(fullPath, this._path), key => {\n\t\t\t\tif (!this._clonedCache.has(object[key])) {\n\t\t\t\t\tobject[key] = this._shallowClone(object[key]);\n\t\t\t\t}\n\n\t\t\t\tobject = object[key];\n\t\t\t});\n\n\t\t\tobject[property] = value;\n\t\t}\n\n\t\tthis._isChanged = true;\n\t}\n\n\tisChanged(value, equals, argumentsList) {\n\t\tif (value instanceof Date) {\n\t\t\treturn !equals(this.clone.valueOf(), value.valueOf());\n\t\t}\n\n\t\tif (value instanceof WeakSet) {\n\t\t\treturn this._weakValue !== value.has(argumentsList[0]);\n\t\t}\n\n\t\tif (value instanceof WeakMap) {\n\t\t\treturn this._weakValue !== value.get(argumentsList[0]);\n\t\t}\n\n\t\treturn this._onIsChanged === undefined ?\n\t\t\tthis._isChanged :\n\t\t\tthis._onIsChanged(this.clone, value);\n\t}\n}\n\nclass SmartClone {\n\tconstructor() {\n\t\tthis.stack = [];\n\t}\n\n\tstatic isHandledType(value) {\n\t\treturn isObject(value) ||\n\t\t\tisArray(value) ||\n\t\t\tisBuiltin.withMutableMethods(value);\n\t}\n\n\tstatic isHandledMethod(target, name) {\n\t\tif (isObject(target)) {\n\t\t\treturn IMMUTABLE_OBJECT_METHODS.has(name);\n\t\t}\n\n\t\tif (isArray(target)) {\n\t\t\treturn HANDLED_ARRAY_METHODS.has(name);\n\t\t}\n\n\t\tif (target instanceof Set) {\n\t\t\treturn HANDLED_SET_METHODS.has(name);\n\t\t}\n\n\t\tif (target instanceof Map) {\n\t\t\treturn HANDLED_MAP_METHODS.has(name);\n\t\t}\n\n\t\treturn isBuiltin.withMutableMethods(target);\n\t}\n\n\tget isCloning() {\n\t\treturn this.stack.length !== 0;\n\t}\n\n\tstart(value, path, argumentsList) {\n\t\tthis.stack.push(new Clone(value, path, argumentsList));\n\t}\n\n\tupdate(fullPath, property, value) {\n\t\tthis.stack[this.stack.length - 1].update(fullPath, property, value);\n\t}\n\n\tpreferredThisArg(target, thisArg, thisProxyTarget) {\n\t\treturn this.stack[this.stack.length - 1].preferredThisArg(target, thisArg, thisProxyTarget);\n\t}\n\n\tisChanged(isMutable, value, equals, argumentsList) {\n\t\treturn this.stack[this.stack.length - 1].isChanged(isMutable, value, equals, argumentsList);\n\t}\n\n\tstop() {\n\t\treturn this.stack.pop().clone;\n\t}\n}\n\nmodule.exports = SmartClone;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/smart-clone.js?");

/***/ }),

/***/ "./node_modules/on-change/lib/wrap-iterator.js":
/*!*****************************************************!*\
  !*** ./node_modules/on-change/lib/wrap-iterator.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst {TARGET} = __webpack_require__(/*! ./constants */ \"./node_modules/on-change/lib/constants.js\");\n\n// eslint-disable-next-line max-params\nmodule.exports = (iterator, target, thisArg, applyPath, prepareValue) => {\n\tconst originalNext = iterator.next;\n\n\tif (target.name === 'entries') {\n\t\titerator.next = function () {\n\t\t\tconst result = originalNext.call(this);\n\n\t\t\tif (result.done === false) {\n\t\t\t\tresult.value[0] = prepareValue(\n\t\t\t\t\tresult.value[0],\n\t\t\t\t\ttarget,\n\t\t\t\t\tresult.value[0],\n\t\t\t\t\tapplyPath\n\t\t\t\t);\n\t\t\t\tresult.value[1] = prepareValue(\n\t\t\t\t\tresult.value[1],\n\t\t\t\t\ttarget,\n\t\t\t\t\tresult.value[0],\n\t\t\t\t\tapplyPath\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t} else if (target.name === 'values') {\n\t\tconst keyIterator = thisArg[TARGET].keys();\n\n\t\titerator.next = function () {\n\t\t\tconst result = originalNext.call(this);\n\n\t\t\tif (result.done === false) {\n\t\t\t\tresult.value = prepareValue(\n\t\t\t\t\tresult.value,\n\t\t\t\t\ttarget,\n\t\t\t\t\tkeyIterator.next().value,\n\t\t\t\t\tapplyPath\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\titerator.next = function () {\n\t\t\tconst result = originalNext.call(this);\n\n\t\t\tif (result.done === false) {\n\t\t\t\tresult.value = prepareValue(\n\t\t\t\t\tresult.value,\n\t\t\t\t\ttarget,\n\t\t\t\t\tresult.value,\n\t\t\t\t\tapplyPath\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\treturn iterator;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/on-change/lib/wrap-iterator.js?");

/***/ }),

/***/ "./node_modules/os-browserify/browser.js":
/*!***********************************************!*\
  !*** ./node_modules/os-browserify/browser.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n    if (typeof location !== 'undefined') {\n        return location.hostname\n    }\n    else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n    return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n    return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n    if (typeof navigator !== 'undefined') {\n        return navigator.appVersion;\n    }\n    return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n    return '/tmp';\n};\n\nexports.EOL = '\\n';\n\nexports.homedir = function () {\n\treturn '/'\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/os-browserify/browser.js?");

/***/ }),

/***/ "./node_modules/outlayer/item.js":
/*!***************************************!*\
  !*** ./node_modules/outlayer/item.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Outlayer Item\n */\n\n( function( window, factory ) {\n  // universal module definition\n  /* jshint strict: false */ /* globals define, module, require */\n  if ( true ) {\n    // AMD - RequireJS\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n        __webpack_require__(/*! ev-emitter/ev-emitter */ \"./node_modules/ev-emitter/ev-emitter.js\"),\n        __webpack_require__(/*! get-size/get-size */ \"./node_modules/get-size/get-size.js\")\n      ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( window, function factory( EvEmitter, getSize ) {\n'use strict';\n\n// ----- helpers ----- //\n\nfunction isEmptyObj( obj ) {\n  for ( var prop in obj ) {\n    return false;\n  }\n  prop = null;\n  return true;\n}\n\n// -------------------------- CSS3 support -------------------------- //\n\n\nvar docElemStyle = document.documentElement.style;\n\nvar transitionProperty = typeof docElemStyle.transition == 'string' ?\n  'transition' : 'WebkitTransition';\nvar transformProperty = typeof docElemStyle.transform == 'string' ?\n  'transform' : 'WebkitTransform';\n\nvar transitionEndEvent = {\n  WebkitTransition: 'webkitTransitionEnd',\n  transition: 'transitionend'\n}[ transitionProperty ];\n\n// cache all vendor properties that could have vendor prefix\nvar vendorProperties = {\n  transform: transformProperty,\n  transition: transitionProperty,\n  transitionDuration: transitionProperty + 'Duration',\n  transitionProperty: transitionProperty + 'Property',\n  transitionDelay: transitionProperty + 'Delay'\n};\n\n// -------------------------- Item -------------------------- //\n\nfunction Item( element, layout ) {\n  if ( !element ) {\n    return;\n  }\n\n  this.element = element;\n  // parent layout class, i.e. Masonry, Isotope, or Packery\n  this.layout = layout;\n  this.position = {\n    x: 0,\n    y: 0\n  };\n\n  this._create();\n}\n\n// inherit EvEmitter\nvar proto = Item.prototype = Object.create( EvEmitter.prototype );\nproto.constructor = Item;\n\nproto._create = function() {\n  // transition objects\n  this._transn = {\n    ingProperties: {},\n    clean: {},\n    onEnd: {}\n  };\n\n  this.css({\n    position: 'absolute'\n  });\n};\n\n// trigger specified handler for event type\nproto.handleEvent = function( event ) {\n  var method = 'on' + event.type;\n  if ( this[ method ] ) {\n    this[ method ]( event );\n  }\n};\n\nproto.getSize = function() {\n  this.size = getSize( this.element );\n};\n\n/**\n * apply CSS styles to element\n * @param {Object} style\n */\nproto.css = function( style ) {\n  var elemStyle = this.element.style;\n\n  for ( var prop in style ) {\n    // use vendor property if available\n    var supportedProp = vendorProperties[ prop ] || prop;\n    elemStyle[ supportedProp ] = style[ prop ];\n  }\n};\n\n // measure position, and sets it\nproto.getPosition = function() {\n  var style = getComputedStyle( this.element );\n  var isOriginLeft = this.layout._getOption('originLeft');\n  var isOriginTop = this.layout._getOption('originTop');\n  var xValue = style[ isOriginLeft ? 'left' : 'right' ];\n  var yValue = style[ isOriginTop ? 'top' : 'bottom' ];\n  var x = parseFloat( xValue );\n  var y = parseFloat( yValue );\n  // convert percent to pixels\n  var layoutSize = this.layout.size;\n  if ( xValue.indexOf('%') != -1 ) {\n    x = ( x / 100 ) * layoutSize.width;\n  }\n  if ( yValue.indexOf('%') != -1 ) {\n    y = ( y / 100 ) * layoutSize.height;\n  }\n  // clean up 'auto' or other non-integer values\n  x = isNaN( x ) ? 0 : x;\n  y = isNaN( y ) ? 0 : y;\n  // remove padding from measurement\n  x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;\n  y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;\n\n  this.position.x = x;\n  this.position.y = y;\n};\n\n// set settled position, apply padding\nproto.layoutPosition = function() {\n  var layoutSize = this.layout.size;\n  var style = {};\n  var isOriginLeft = this.layout._getOption('originLeft');\n  var isOriginTop = this.layout._getOption('originTop');\n\n  // x\n  var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';\n  var xProperty = isOriginLeft ? 'left' : 'right';\n  var xResetProperty = isOriginLeft ? 'right' : 'left';\n\n  var x = this.position.x + layoutSize[ xPadding ];\n  // set in percentage or pixels\n  style[ xProperty ] = this.getXValue( x );\n  // reset other property\n  style[ xResetProperty ] = '';\n\n  // y\n  var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';\n  var yProperty = isOriginTop ? 'top' : 'bottom';\n  var yResetProperty = isOriginTop ? 'bottom' : 'top';\n\n  var y = this.position.y + layoutSize[ yPadding ];\n  // set in percentage or pixels\n  style[ yProperty ] = this.getYValue( y );\n  // reset other property\n  style[ yResetProperty ] = '';\n\n  this.css( style );\n  this.emitEvent( 'layout', [ this ] );\n};\n\nproto.getXValue = function( x ) {\n  var isHorizontal = this.layout._getOption('horizontal');\n  return this.layout.options.percentPosition && !isHorizontal ?\n    ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';\n};\n\nproto.getYValue = function( y ) {\n  var isHorizontal = this.layout._getOption('horizontal');\n  return this.layout.options.percentPosition && isHorizontal ?\n    ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';\n};\n\nproto._transitionTo = function( x, y ) {\n  this.getPosition();\n  // get current x & y from top/left\n  var curX = this.position.x;\n  var curY = this.position.y;\n\n  var didNotMove = x == this.position.x && y == this.position.y;\n\n  // save end position\n  this.setPosition( x, y );\n\n  // if did not move and not transitioning, just go to layout\n  if ( didNotMove && !this.isTransitioning ) {\n    this.layoutPosition();\n    return;\n  }\n\n  var transX = x - curX;\n  var transY = y - curY;\n  var transitionStyle = {};\n  transitionStyle.transform = this.getTranslate( transX, transY );\n\n  this.transition({\n    to: transitionStyle,\n    onTransitionEnd: {\n      transform: this.layoutPosition\n    },\n    isCleaning: true\n  });\n};\n\nproto.getTranslate = function( x, y ) {\n  // flip cooridinates if origin on right or bottom\n  var isOriginLeft = this.layout._getOption('originLeft');\n  var isOriginTop = this.layout._getOption('originTop');\n  x = isOriginLeft ? x : -x;\n  y = isOriginTop ? y : -y;\n  return 'translate3d(' + x + 'px, ' + y + 'px, 0)';\n};\n\n// non transition + transform support\nproto.goTo = function( x, y ) {\n  this.setPosition( x, y );\n  this.layoutPosition();\n};\n\nproto.moveTo = proto._transitionTo;\n\nproto.setPosition = function( x, y ) {\n  this.position.x = parseFloat( x );\n  this.position.y = parseFloat( y );\n};\n\n// ----- transition ----- //\n\n/**\n * @param {Object} style - CSS\n * @param {Function} onTransitionEnd\n */\n\n// non transition, just trigger callback\nproto._nonTransition = function( args ) {\n  this.css( args.to );\n  if ( args.isCleaning ) {\n    this._removeStyles( args.to );\n  }\n  for ( var prop in args.onTransitionEnd ) {\n    args.onTransitionEnd[ prop ].call( this );\n  }\n};\n\n/**\n * proper transition\n * @param {Object} args - arguments\n *   @param {Object} to - style to transition to\n *   @param {Object} from - style to start transition from\n *   @param {Boolean} isCleaning - removes transition styles after transition\n *   @param {Function} onTransitionEnd - callback\n */\nproto.transition = function( args ) {\n  // redirect to nonTransition if no transition duration\n  if ( !parseFloat( this.layout.options.transitionDuration ) ) {\n    this._nonTransition( args );\n    return;\n  }\n\n  var _transition = this._transn;\n  // keep track of onTransitionEnd callback by css property\n  for ( var prop in args.onTransitionEnd ) {\n    _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];\n  }\n  // keep track of properties that are transitioning\n  for ( prop in args.to ) {\n    _transition.ingProperties[ prop ] = true;\n    // keep track of properties to clean up when transition is done\n    if ( args.isCleaning ) {\n      _transition.clean[ prop ] = true;\n    }\n  }\n\n  // set from styles\n  if ( args.from ) {\n    this.css( args.from );\n    // force redraw. http://blog.alexmaccaw.com/css-transitions\n    var h = this.element.offsetHeight;\n    // hack for JSHint to hush about unused var\n    h = null;\n  }\n  // enable transition\n  this.enableTransition( args.to );\n  // set styles that are transitioning\n  this.css( args.to );\n\n  this.isTransitioning = true;\n\n};\n\n// dash before all cap letters, including first for\n// WebkitTransform => -webkit-transform\nfunction toDashedAll( str ) {\n  return str.replace( /([A-Z])/g, function( $1 ) {\n    return '-' + $1.toLowerCase();\n  });\n}\n\nvar transitionProps = 'opacity,' + toDashedAll( transformProperty );\n\nproto.enableTransition = function(/* style */) {\n  // HACK changing transitionProperty during a transition\n  // will cause transition to jump\n  if ( this.isTransitioning ) {\n    return;\n  }\n\n  // make `transition: foo, bar, baz` from style object\n  // HACK un-comment this when enableTransition can work\n  // while a transition is happening\n  // var transitionValues = [];\n  // for ( var prop in style ) {\n  //   // dash-ify camelCased properties like WebkitTransition\n  //   prop = vendorProperties[ prop ] || prop;\n  //   transitionValues.push( toDashedAll( prop ) );\n  // }\n  // munge number to millisecond, to match stagger\n  var duration = this.layout.options.transitionDuration;\n  duration = typeof duration == 'number' ? duration + 'ms' : duration;\n  // enable transition styles\n  this.css({\n    transitionProperty: transitionProps,\n    transitionDuration: duration,\n    transitionDelay: this.staggerDelay || 0\n  });\n  // listen for transition end event\n  this.element.addEventListener( transitionEndEvent, this, false );\n};\n\n// ----- events ----- //\n\nproto.onwebkitTransitionEnd = function( event ) {\n  this.ontransitionend( event );\n};\n\nproto.onotransitionend = function( event ) {\n  this.ontransitionend( event );\n};\n\n// properties that I munge to make my life easier\nvar dashedVendorProperties = {\n  '-webkit-transform': 'transform'\n};\n\nproto.ontransitionend = function( event ) {\n  // disregard bubbled events from children\n  if ( event.target !== this.element ) {\n    return;\n  }\n  var _transition = this._transn;\n  // get property name of transitioned property, convert to prefix-free\n  var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;\n\n  // remove property that has completed transitioning\n  delete _transition.ingProperties[ propertyName ];\n  // check if any properties are still transitioning\n  if ( isEmptyObj( _transition.ingProperties ) ) {\n    // all properties have completed transitioning\n    this.disableTransition();\n  }\n  // clean style\n  if ( propertyName in _transition.clean ) {\n    // clean up style\n    this.element.style[ event.propertyName ] = '';\n    delete _transition.clean[ propertyName ];\n  }\n  // trigger onTransitionEnd callback\n  if ( propertyName in _transition.onEnd ) {\n    var onTransitionEnd = _transition.onEnd[ propertyName ];\n    onTransitionEnd.call( this );\n    delete _transition.onEnd[ propertyName ];\n  }\n\n  this.emitEvent( 'transitionEnd', [ this ] );\n};\n\nproto.disableTransition = function() {\n  this.removeTransitionStyles();\n  this.element.removeEventListener( transitionEndEvent, this, false );\n  this.isTransitioning = false;\n};\n\n/**\n * removes style property from element\n * @param {Object} style\n**/\nproto._removeStyles = function( style ) {\n  // clean up transition styles\n  var cleanStyle = {};\n  for ( var prop in style ) {\n    cleanStyle[ prop ] = '';\n  }\n  this.css( cleanStyle );\n};\n\nvar cleanTransitionStyle = {\n  transitionProperty: '',\n  transitionDuration: '',\n  transitionDelay: ''\n};\n\nproto.removeTransitionStyles = function() {\n  // remove transition\n  this.css( cleanTransitionStyle );\n};\n\n// ----- stagger ----- //\n\nproto.stagger = function( delay ) {\n  delay = isNaN( delay ) ? 0 : delay;\n  this.staggerDelay = delay + 'ms';\n};\n\n// ----- show/hide/remove ----- //\n\n// remove element from DOM\nproto.removeElem = function() {\n  this.element.parentNode.removeChild( this.element );\n  // remove display: none\n  this.css({ display: '' });\n  this.emitEvent( 'remove', [ this ] );\n};\n\nproto.remove = function() {\n  // just remove element if no transition support or no transition\n  if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {\n    this.removeElem();\n    return;\n  }\n\n  // start transition\n  this.once( 'transitionEnd', function() {\n    this.removeElem();\n  });\n  this.hide();\n};\n\nproto.reveal = function() {\n  delete this.isHidden;\n  // remove display: none\n  this.css({ display: '' });\n\n  var options = this.layout.options;\n\n  var onTransitionEnd = {};\n  var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');\n  onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;\n\n  this.transition({\n    from: options.hiddenStyle,\n    to: options.visibleStyle,\n    isCleaning: true,\n    onTransitionEnd: onTransitionEnd\n  });\n};\n\nproto.onRevealTransitionEnd = function() {\n  // check if still visible\n  // during transition, item may have been hidden\n  if ( !this.isHidden ) {\n    this.emitEvent('reveal');\n  }\n};\n\n/**\n * get style property use for hide/reveal transition end\n * @param {String} styleProperty - hiddenStyle/visibleStyle\n * @returns {String}\n */\nproto.getHideRevealTransitionEndProperty = function( styleProperty ) {\n  var optionStyle = this.layout.options[ styleProperty ];\n  // use opacity\n  if ( optionStyle.opacity ) {\n    return 'opacity';\n  }\n  // get first property\n  for ( var prop in optionStyle ) {\n    return prop;\n  }\n};\n\nproto.hide = function() {\n  // set flag\n  this.isHidden = true;\n  // remove display: none\n  this.css({ display: '' });\n\n  var options = this.layout.options;\n\n  var onTransitionEnd = {};\n  var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');\n  onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;\n\n  this.transition({\n    from: options.visibleStyle,\n    to: options.hiddenStyle,\n    // keep hidden stuff hidden\n    isCleaning: true,\n    onTransitionEnd: onTransitionEnd\n  });\n};\n\nproto.onHideTransitionEnd = function() {\n  // check if still hidden\n  // during transition, item may have been un-hidden\n  if ( this.isHidden ) {\n    this.css({ display: 'none' });\n    this.emitEvent('hide');\n  }\n};\n\nproto.destroy = function() {\n  this.css({\n    position: '',\n    left: '',\n    right: '',\n    top: '',\n    bottom: '',\n    transition: '',\n    transform: ''\n  });\n};\n\nreturn Item;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/outlayer/item.js?");

/***/ }),

/***/ "./node_modules/outlayer/outlayer.js":
/*!*******************************************!*\
  !*** ./node_modules/outlayer/outlayer.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * Outlayer v2.1.1\n * the brains and guts of a layout library\n * MIT license\n */\n\n( function( window, factory ) {\n  'use strict';\n  // universal module definition\n  /* jshint strict: false */ /* globals define, module, require */\n  if ( true ) {\n    // AMD - RequireJS\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n        __webpack_require__(/*! ev-emitter/ev-emitter */ \"./node_modules/ev-emitter/ev-emitter.js\"),\n        __webpack_require__(/*! get-size/get-size */ \"./node_modules/get-size/get-size.js\"),\n        __webpack_require__(/*! fizzy-ui-utils/utils */ \"./node_modules/fizzy-ui-utils/utils.js\"),\n        __webpack_require__(/*! ./item */ \"./node_modules/outlayer/item.js\")\n      ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) {\n        return factory( window, EvEmitter, getSize, utils, Item);\n      }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n\n}( window, function factory( window, EvEmitter, getSize, utils, Item ) {\n'use strict';\n\n// ----- vars ----- //\n\nvar console = window.console;\nvar jQuery = window.jQuery;\nvar noop = function() {};\n\n// -------------------------- Outlayer -------------------------- //\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Outlayer intances\nvar instances = {};\n\n\n/**\n * @param {Element, String} element\n * @param {Object} options\n * @constructor\n */\nfunction Outlayer( element, options ) {\n  var queryElement = utils.getQueryElement( element );\n  if ( !queryElement ) {\n    if ( console ) {\n      console.error( 'Bad element for ' + this.constructor.namespace +\n        ': ' + ( queryElement || element ) );\n    }\n    return;\n  }\n  this.element = queryElement;\n  // add jQuery\n  if ( jQuery ) {\n    this.$element = jQuery( this.element );\n  }\n\n  // options\n  this.options = utils.extend( {}, this.constructor.defaults );\n  this.option( options );\n\n  // add id for Outlayer.getFromElement\n  var id = ++GUID;\n  this.element.outlayerGUID = id; // expando\n  instances[ id ] = this; // associate via id\n\n  // kick it off\n  this._create();\n\n  var isInitLayout = this._getOption('initLayout');\n  if ( isInitLayout ) {\n    this.layout();\n  }\n}\n\n// settings are for internal use only\nOutlayer.namespace = 'outlayer';\nOutlayer.Item = Item;\n\n// default options\nOutlayer.defaults = {\n  containerStyle: {\n    position: 'relative'\n  },\n  initLayout: true,\n  originLeft: true,\n  originTop: true,\n  resize: true,\n  resizeContainer: true,\n  // item options\n  transitionDuration: '0.4s',\n  hiddenStyle: {\n    opacity: 0,\n    transform: 'scale(0.001)'\n  },\n  visibleStyle: {\n    opacity: 1,\n    transform: 'scale(1)'\n  }\n};\n\nvar proto = Outlayer.prototype;\n// inherit EvEmitter\nutils.extend( proto, EvEmitter.prototype );\n\n/**\n * set options\n * @param {Object} opts\n */\nproto.option = function( opts ) {\n  utils.extend( this.options, opts );\n};\n\n/**\n * get backwards compatible option value, check old name\n */\nproto._getOption = function( option ) {\n  var oldOption = this.constructor.compatOptions[ option ];\n  return oldOption && this.options[ oldOption ] !== undefined ?\n    this.options[ oldOption ] : this.options[ option ];\n};\n\nOutlayer.compatOptions = {\n  // currentName: oldName\n  initLayout: 'isInitLayout',\n  horizontal: 'isHorizontal',\n  layoutInstant: 'isLayoutInstant',\n  originLeft: 'isOriginLeft',\n  originTop: 'isOriginTop',\n  resize: 'isResizeBound',\n  resizeContainer: 'isResizingContainer'\n};\n\nproto._create = function() {\n  // get items from children\n  this.reloadItems();\n  // elements that affect layout, but are not laid out\n  this.stamps = [];\n  this.stamp( this.options.stamp );\n  // set container style\n  utils.extend( this.element.style, this.options.containerStyle );\n\n  // bind resize method\n  var canBindResize = this._getOption('resize');\n  if ( canBindResize ) {\n    this.bindResize();\n  }\n};\n\n// goes through all children again and gets bricks in proper order\nproto.reloadItems = function() {\n  // collection of item elements\n  this.items = this._itemize( this.element.children );\n};\n\n\n/**\n * turn elements into Outlayer.Items to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - collection of new Outlayer Items\n */\nproto._itemize = function( elems ) {\n\n  var itemElems = this._filterFindItemElements( elems );\n  var Item = this.constructor.Item;\n\n  // create new Outlayer Items for collection\n  var items = [];\n  for ( var i=0; i < itemElems.length; i++ ) {\n    var elem = itemElems[i];\n    var item = new Item( elem, this );\n    items.push( item );\n  }\n\n  return items;\n};\n\n/**\n * get item elements to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - item elements\n */\nproto._filterFindItemElements = function( elems ) {\n  return utils.filterFindElements( elems, this.options.itemSelector );\n};\n\n/**\n * getter method for getting item elements\n * @returns {Array} elems - collection of item elements\n */\nproto.getItemElements = function() {\n  return this.items.map( function( item ) {\n    return item.element;\n  });\n};\n\n// ----- init & layout ----- //\n\n/**\n * lays out all items\n */\nproto.layout = function() {\n  this._resetLayout();\n  this._manageStamps();\n\n  // don't animate first layout\n  var layoutInstant = this._getOption('layoutInstant');\n  var isInstant = layoutInstant !== undefined ?\n    layoutInstant : !this._isLayoutInited;\n  this.layoutItems( this.items, isInstant );\n\n  // flag for initalized\n  this._isLayoutInited = true;\n};\n\n// _init is alias for layout\nproto._init = proto.layout;\n\n/**\n * logic before any new layout\n */\nproto._resetLayout = function() {\n  this.getSize();\n};\n\n\nproto.getSize = function() {\n  this.size = getSize( this.element );\n};\n\n/**\n * get measurement from option, for columnWidth, rowHeight, gutter\n * if option is String -> get element from selector string, & get size of element\n * if option is Element -> get size of element\n * else use option as a number\n *\n * @param {String} measurement\n * @param {String} size - width or height\n * @private\n */\nproto._getMeasurement = function( measurement, size ) {\n  var option = this.options[ measurement ];\n  var elem;\n  if ( !option ) {\n    // default to 0\n    this[ measurement ] = 0;\n  } else {\n    // use option as an element\n    if ( typeof option == 'string' ) {\n      elem = this.element.querySelector( option );\n    } else if ( option instanceof HTMLElement ) {\n      elem = option;\n    }\n    // use size of element, if element\n    this[ measurement ] = elem ? getSize( elem )[ size ] : option;\n  }\n};\n\n/**\n * layout a collection of item elements\n * @api public\n */\nproto.layoutItems = function( items, isInstant ) {\n  items = this._getItemsForLayout( items );\n\n  this._layoutItems( items, isInstant );\n\n  this._postLayout();\n};\n\n/**\n * get the items to be laid out\n * you may want to skip over some items\n * @param {Array} items\n * @returns {Array} items\n */\nproto._getItemsForLayout = function( items ) {\n  return items.filter( function( item ) {\n    return !item.isIgnored;\n  });\n};\n\n/**\n * layout items\n * @param {Array} items\n * @param {Boolean} isInstant\n */\nproto._layoutItems = function( items, isInstant ) {\n  this._emitCompleteOnItems( 'layout', items );\n\n  if ( !items || !items.length ) {\n    // no items, emit event with empty array\n    return;\n  }\n\n  var queue = [];\n\n  items.forEach( function( item ) {\n    // get x/y object from method\n    var position = this._getItemLayoutPosition( item );\n    // enqueue\n    position.item = item;\n    position.isInstant = isInstant || item.isLayoutInstant;\n    queue.push( position );\n  }, this );\n\n  this._processLayoutQueue( queue );\n};\n\n/**\n * get item layout position\n * @param {Outlayer.Item} item\n * @returns {Object} x and y position\n */\nproto._getItemLayoutPosition = function( /* item */ ) {\n  return {\n    x: 0,\n    y: 0\n  };\n};\n\n/**\n * iterate over array and position each item\n * Reason being - separating this logic prevents 'layout invalidation'\n * thx @paul_irish\n * @param {Array} queue\n */\nproto._processLayoutQueue = function( queue ) {\n  this.updateStagger();\n  queue.forEach( function( obj, i ) {\n    this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );\n  }, this );\n};\n\n// set stagger from option in milliseconds number\nproto.updateStagger = function() {\n  var stagger = this.options.stagger;\n  if ( stagger === null || stagger === undefined ) {\n    this.stagger = 0;\n    return;\n  }\n  this.stagger = getMilliseconds( stagger );\n  return this.stagger;\n};\n\n/**\n * Sets position of item in DOM\n * @param {Outlayer.Item} item\n * @param {Number} x - horizontal position\n * @param {Number} y - vertical position\n * @param {Boolean} isInstant - disables transitions\n */\nproto._positionItem = function( item, x, y, isInstant, i ) {\n  if ( isInstant ) {\n    // if not transition, just set CSS\n    item.goTo( x, y );\n  } else {\n    item.stagger( i * this.stagger );\n    item.moveTo( x, y );\n  }\n};\n\n/**\n * Any logic you want to do after each layout,\n * i.e. size the container\n */\nproto._postLayout = function() {\n  this.resizeContainer();\n};\n\nproto.resizeContainer = function() {\n  var isResizingContainer = this._getOption('resizeContainer');\n  if ( !isResizingContainer ) {\n    return;\n  }\n  var size = this._getContainerSize();\n  if ( size ) {\n    this._setContainerMeasure( size.width, true );\n    this._setContainerMeasure( size.height, false );\n  }\n};\n\n/**\n * Sets width or height of container if returned\n * @returns {Object} size\n *   @param {Number} width\n *   @param {Number} height\n */\nproto._getContainerSize = noop;\n\n/**\n * @param {Number} measure - size of width or height\n * @param {Boolean} isWidth\n */\nproto._setContainerMeasure = function( measure, isWidth ) {\n  if ( measure === undefined ) {\n    return;\n  }\n\n  var elemSize = this.size;\n  // add padding and border width if border box\n  if ( elemSize.isBorderBox ) {\n    measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +\n      elemSize.borderLeftWidth + elemSize.borderRightWidth :\n      elemSize.paddingBottom + elemSize.paddingTop +\n      elemSize.borderTopWidth + elemSize.borderBottomWidth;\n  }\n\n  measure = Math.max( measure, 0 );\n  this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';\n};\n\n/**\n * emit eventComplete on a collection of items events\n * @param {String} eventName\n * @param {Array} items - Outlayer.Items\n */\nproto._emitCompleteOnItems = function( eventName, items ) {\n  var _this = this;\n  function onComplete() {\n    _this.dispatchEvent( eventName + 'Complete', null, [ items ] );\n  }\n\n  var count = items.length;\n  if ( !items || !count ) {\n    onComplete();\n    return;\n  }\n\n  var doneCount = 0;\n  function tick() {\n    doneCount++;\n    if ( doneCount == count ) {\n      onComplete();\n    }\n  }\n\n  // bind callback\n  items.forEach( function( item ) {\n    item.once( eventName, tick );\n  });\n};\n\n/**\n * emits events via EvEmitter and jQuery events\n * @param {String} type - name of event\n * @param {Event} event - original event\n * @param {Array} args - extra arguments\n */\nproto.dispatchEvent = function( type, event, args ) {\n  // add original event to arguments\n  var emitArgs = event ? [ event ].concat( args ) : args;\n  this.emitEvent( type, emitArgs );\n\n  if ( jQuery ) {\n    // set this.$element\n    this.$element = this.$element || jQuery( this.element );\n    if ( event ) {\n      // create jQuery event\n      var $event = jQuery.Event( event );\n      $event.type = type;\n      this.$element.trigger( $event, args );\n    } else {\n      // just trigger with type if no event available\n      this.$element.trigger( type, args );\n    }\n  }\n};\n\n// -------------------------- ignore & stamps -------------------------- //\n\n\n/**\n * keep item in collection, but do not lay it out\n * ignored items do not get skipped in layout\n * @param {Element} elem\n */\nproto.ignore = function( elem ) {\n  var item = this.getItem( elem );\n  if ( item ) {\n    item.isIgnored = true;\n  }\n};\n\n/**\n * return item to layout collection\n * @param {Element} elem\n */\nproto.unignore = function( elem ) {\n  var item = this.getItem( elem );\n  if ( item ) {\n    delete item.isIgnored;\n  }\n};\n\n/**\n * adds elements to stamps\n * @param {NodeList, Array, Element, or String} elems\n */\nproto.stamp = function( elems ) {\n  elems = this._find( elems );\n  if ( !elems ) {\n    return;\n  }\n\n  this.stamps = this.stamps.concat( elems );\n  // ignore\n  elems.forEach( this.ignore, this );\n};\n\n/**\n * removes elements to stamps\n * @param {NodeList, Array, or Element} elems\n */\nproto.unstamp = function( elems ) {\n  elems = this._find( elems );\n  if ( !elems ){\n    return;\n  }\n\n  elems.forEach( function( elem ) {\n    // filter out removed stamp elements\n    utils.removeFrom( this.stamps, elem );\n    this.unignore( elem );\n  }, this );\n};\n\n/**\n * finds child elements\n * @param {NodeList, Array, Element, or String} elems\n * @returns {Array} elems\n */\nproto._find = function( elems ) {\n  if ( !elems ) {\n    return;\n  }\n  // if string, use argument as selector string\n  if ( typeof elems == 'string' ) {\n    elems = this.element.querySelectorAll( elems );\n  }\n  elems = utils.makeArray( elems );\n  return elems;\n};\n\nproto._manageStamps = function() {\n  if ( !this.stamps || !this.stamps.length ) {\n    return;\n  }\n\n  this._getBoundingRect();\n\n  this.stamps.forEach( this._manageStamp, this );\n};\n\n// update boundingLeft / Top\nproto._getBoundingRect = function() {\n  // get bounding rect for container element\n  var boundingRect = this.element.getBoundingClientRect();\n  var size = this.size;\n  this._boundingRect = {\n    left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,\n    top: boundingRect.top + size.paddingTop + size.borderTopWidth,\n    right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),\n    bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )\n  };\n};\n\n/**\n * @param {Element} stamp\n**/\nproto._manageStamp = noop;\n\n/**\n * get x/y position of element relative to container element\n * @param {Element} elem\n * @returns {Object} offset - has left, top, right, bottom\n */\nproto._getElementOffset = function( elem ) {\n  var boundingRect = elem.getBoundingClientRect();\n  var thisRect = this._boundingRect;\n  var size = getSize( elem );\n  var offset = {\n    left: boundingRect.left - thisRect.left - size.marginLeft,\n    top: boundingRect.top - thisRect.top - size.marginTop,\n    right: thisRect.right - boundingRect.right - size.marginRight,\n    bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom\n  };\n  return offset;\n};\n\n// -------------------------- resize -------------------------- //\n\n// enable event handlers for listeners\n// i.e. resize -> onresize\nproto.handleEvent = utils.handleEvent;\n\n/**\n * Bind layout to window resizing\n */\nproto.bindResize = function() {\n  window.addEventListener( 'resize', this );\n  this.isResizeBound = true;\n};\n\n/**\n * Unbind layout to window resizing\n */\nproto.unbindResize = function() {\n  window.removeEventListener( 'resize', this );\n  this.isResizeBound = false;\n};\n\nproto.onresize = function() {\n  this.resize();\n};\n\nutils.debounceMethod( Outlayer, 'onresize', 100 );\n\nproto.resize = function() {\n  // don't trigger if size did not change\n  // or if resize was unbound. See #9\n  if ( !this.isResizeBound || !this.needsResizeLayout() ) {\n    return;\n  }\n\n  this.layout();\n};\n\n/**\n * check if layout is needed post layout\n * @returns Boolean\n */\nproto.needsResizeLayout = function() {\n  var size = getSize( this.element );\n  // check that this.size and size are there\n  // IE8 triggers resize on body size change, so they might not be\n  var hasSizes = this.size && size;\n  return hasSizes && size.innerWidth !== this.size.innerWidth;\n};\n\n// -------------------------- methods -------------------------- //\n\n/**\n * add items to Outlayer instance\n * @param {Array or NodeList or Element} elems\n * @returns {Array} items - Outlayer.Items\n**/\nproto.addItems = function( elems ) {\n  var items = this._itemize( elems );\n  // add items to collection\n  if ( items.length ) {\n    this.items = this.items.concat( items );\n  }\n  return items;\n};\n\n/**\n * Layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\nproto.appended = function( elems ) {\n  var items = this.addItems( elems );\n  if ( !items.length ) {\n    return;\n  }\n  // layout and reveal just the new items\n  this.layoutItems( items, true );\n  this.reveal( items );\n};\n\n/**\n * Layout prepended elements\n * @param {Array or NodeList or Element} elems\n */\nproto.prepended = function( elems ) {\n  var items = this._itemize( elems );\n  if ( !items.length ) {\n    return;\n  }\n  // add items to beginning of collection\n  var previousItems = this.items.slice(0);\n  this.items = items.concat( previousItems );\n  // start new layout\n  this._resetLayout();\n  this._manageStamps();\n  // layout new stuff without transition\n  this.layoutItems( items, true );\n  this.reveal( items );\n  // layout previous items\n  this.layoutItems( previousItems );\n};\n\n/**\n * reveal a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.reveal = function( items ) {\n  this._emitCompleteOnItems( 'reveal', items );\n  if ( !items || !items.length ) {\n    return;\n  }\n  var stagger = this.updateStagger();\n  items.forEach( function( item, i ) {\n    item.stagger( i * stagger );\n    item.reveal();\n  });\n};\n\n/**\n * hide a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.hide = function( items ) {\n  this._emitCompleteOnItems( 'hide', items );\n  if ( !items || !items.length ) {\n    return;\n  }\n  var stagger = this.updateStagger();\n  items.forEach( function( item, i ) {\n    item.stagger( i * stagger );\n    item.hide();\n  });\n};\n\n/**\n * reveal item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.revealItemElements = function( elems ) {\n  var items = this.getItems( elems );\n  this.reveal( items );\n};\n\n/**\n * hide item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.hideItemElements = function( elems ) {\n  var items = this.getItems( elems );\n  this.hide( items );\n};\n\n/**\n * get Outlayer.Item, given an Element\n * @param {Element} elem\n * @param {Function} callback\n * @returns {Outlayer.Item} item\n */\nproto.getItem = function( elem ) {\n  // loop through items to get the one that matches\n  for ( var i=0; i < this.items.length; i++ ) {\n    var item = this.items[i];\n    if ( item.element == elem ) {\n      // return item\n      return item;\n    }\n  }\n};\n\n/**\n * get collection of Outlayer.Items, given Elements\n * @param {Array} elems\n * @returns {Array} items - Outlayer.Items\n */\nproto.getItems = function( elems ) {\n  elems = utils.makeArray( elems );\n  var items = [];\n  elems.forEach( function( elem ) {\n    var item = this.getItem( elem );\n    if ( item ) {\n      items.push( item );\n    }\n  }, this );\n\n  return items;\n};\n\n/**\n * remove element(s) from instance and DOM\n * @param {Array or NodeList or Element} elems\n */\nproto.remove = function( elems ) {\n  var removeItems = this.getItems( elems );\n\n  this._emitCompleteOnItems( 'remove', removeItems );\n\n  // bail if no items to remove\n  if ( !removeItems || !removeItems.length ) {\n    return;\n  }\n\n  removeItems.forEach( function( item ) {\n    item.remove();\n    // remove item from collection\n    utils.removeFrom( this.items, item );\n  }, this );\n};\n\n// ----- destroy ----- //\n\n// remove and disable Outlayer instance\nproto.destroy = function() {\n  // clean up dynamic styles\n  var style = this.element.style;\n  style.height = '';\n  style.position = '';\n  style.width = '';\n  // destroy items\n  this.items.forEach( function( item ) {\n    item.destroy();\n  });\n\n  this.unbindResize();\n\n  var id = this.element.outlayerGUID;\n  delete instances[ id ]; // remove reference to instance by id\n  delete this.element.outlayerGUID;\n  // remove data for jQuery\n  if ( jQuery ) {\n    jQuery.removeData( this.element, this.constructor.namespace );\n  }\n\n};\n\n// -------------------------- data -------------------------- //\n\n/**\n * get Outlayer instance from element\n * @param {Element} elem\n * @returns {Outlayer}\n */\nOutlayer.data = function( elem ) {\n  elem = utils.getQueryElement( elem );\n  var id = elem && elem.outlayerGUID;\n  return id && instances[ id ];\n};\n\n\n// -------------------------- create Outlayer class -------------------------- //\n\n/**\n * create a layout class\n * @param {String} namespace\n */\nOutlayer.create = function( namespace, options ) {\n  // sub-class Outlayer\n  var Layout = subclass( Outlayer );\n  // apply new options and compatOptions\n  Layout.defaults = utils.extend( {}, Outlayer.defaults );\n  utils.extend( Layout.defaults, options );\n  Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions  );\n\n  Layout.namespace = namespace;\n\n  Layout.data = Outlayer.data;\n\n  // sub-class Item\n  Layout.Item = subclass( Item );\n\n  // -------------------------- declarative -------------------------- //\n\n  utils.htmlInit( Layout, namespace );\n\n  // -------------------------- jQuery bridge -------------------------- //\n\n  // make into jQuery plugin\n  if ( jQuery && jQuery.bridget ) {\n    jQuery.bridget( namespace, Layout );\n  }\n\n  return Layout;\n};\n\nfunction subclass( Parent ) {\n  function SubClass() {\n    Parent.apply( this, arguments );\n  }\n\n  SubClass.prototype = Object.create( Parent.prototype );\n  SubClass.prototype.constructor = SubClass;\n\n  return SubClass;\n}\n\n// ----- helpers ----- //\n\n// how many milliseconds are in each unit\nvar msUnits = {\n  ms: 1,\n  s: 1000\n};\n\n// munge time-like parameter into millisecond number\n// '0.4s' -> 40\nfunction getMilliseconds( time ) {\n  if ( typeof time == 'number' ) {\n    return time;\n  }\n  var matches = time.match( /(^\\d*\\.?\\d*)(\\w*)/ );\n  var num = matches && matches[1];\n  var unit = matches && matches[2];\n  if ( !num.length ) {\n    return 0;\n  }\n  num = parseFloat( num );\n  var mult = msUnits[ unit ] || 1;\n  return num * mult;\n}\n\n// ----- fin ----- //\n\n// back in global\nOutlayer.Item = Item;\n\nreturn Outlayer;\n\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/outlayer/outlayer.js?");

/***/ }),

/***/ "./node_modules/parse-srcset/src/parse-srcset.js":
/*!*******************************************************!*\
  !*** ./node_modules/parse-srcset/src/parse-srcset.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Srcset Parser\n *\n * By Alex Bell |  MIT License\n *\n * JS Parser for the string value that appears in markup <img srcset=\"here\">\n *\n * @returns Array [{url: _, d: _, w: _, h:_}, ...]\n *\n * Based super duper closely on the reference algorithm at:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n *\n * Most comments are copied in directly from the spec\n * (except for comments in parens).\n */\n\n(function (root, factory) {\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}(this, function () {\n\n\t// 1. Let input be the value passed to this algorithm.\n\treturn function (input) {\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// Manual is faster than RegEx\n\t\t// http://bjorn.tipling.com/state-and-regular-expressions-in-javascript\n\t\t// http://jsperf.com/whitespace-character/5\n\t\tfunction isSpace(c) {\n\t\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\");  // carriage return\n\t\t}\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\n\t\t\t// (Don't use \\s, to avoid matching non-breaking space)\n\t\t\tregexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\t\tregexTrailingCommas = /[,]+$/,\n\t\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t\t\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t\t\t// Must include at least one digit.\n\t\t\t// According to spec tests any decimal point must be followed by a digit.\n\t\t\t// No leading plus sign is allowed.)\n\t\t\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,\n\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t\t//    of the string.\n\t\t\tpos = 0,\n\n\t\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t//    characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t//    were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t//    and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t//         more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t//  Do the following depending on the value of state.\n\t\t\t\t//  For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t//  that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t\t// Space character\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors and let current descriptor be the empty string.\n\t\t\t\t\t// Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}\n\n\t\t/**\n\t\t * Adds descriptor properties to a candidate, pushes to the candidates array\n\t\t * @return undefined\n\t\t */\n\t\t// Declared outside of the while loop so that it's only created once.\n\t\tfunction parseDescriptors() {\n\n\t\t\t// 9. Descriptor parser: Let error be no.\n\t\t\tvar pError = false,\n\n\t\t\t\t// 10. Let width be absent.\n\t\t\t\t// 11. Let density be absent.\n\t\t\t\t// 12. Let future-compat-h be absent. (We're implementing it now as h)\n\t\t\t\tw, d, h, i,\n\t\t\t\tcandidate = {},\n\t\t\t\tdesc, lastChar, value, intVal, floatVal;\n\n\t\t\t// 13. For each descriptor in descriptors, run the appropriate set of steps\n\t\t\t// from the following list:\n\t\t\tfor (i = 0 ; i < descriptors.length; i++) {\n\t\t\t\tdesc = descriptors[ i ];\n\n\t\t\t\tlastChar = desc[ desc.length - 1 ];\n\t\t\t\tvalue = desc.substring(0, desc.length - 1);\n\t\t\t\tintVal = parseInt(value, 10);\n\t\t\t\tfloatVal = parseFloat(value);\n\n\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t// a U+0077 LATIN SMALL LETTER W character\n\t\t\t\tif (regexNonNegativeInteger.test(value) && (lastChar === \"w\")) {\n\n\t\t\t\t\t// If width and density are not both absent, then let error be yes.\n\t\t\t\t\tif (w || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes.\n\t\t\t\t\t// Otherwise, let width be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {w = intVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid floating-point number followed by\n\t\t\t\t\t// a U+0078 LATIN SMALL LETTER X character\n\t\t\t\t} else if (regexFloatingPoint.test(value) && (lastChar === \"x\")) {\n\n\t\t\t\t\t// If width, density and future-compat-h are not all absent, then let error\n\t\t\t\t\t// be yes.\n\t\t\t\t\tif (w || d || h) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing floating-point number values to the descriptor.\n\t\t\t\t\t// If the result is less than zero, let error be yes. Otherwise, let density\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (floatVal < 0) {pError = true;} else {d = floatVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t\t// a U+0068 LATIN SMALL LETTER H character\n\t\t\t\t} else if (regexNonNegativeInteger.test(value) && (lastChar === \"h\")) {\n\n\t\t\t\t\t// If height and density are not both absent, then let error be yes.\n\t\t\t\t\tif (h || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes. Otherwise, let future-compat-h\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {h = intVal;}\n\n\t\t\t\t\t// Anything else, Let error be yes.\n\t\t\t\t} else {pError = true;}\n\t\t\t} // (close step 13 for loop)\n\n\t\t\t// 15. If error is still no, then append a new image source to candidates whose\n\t\t\t// URL is url, associated with a width width if not absent and a pixel\n\t\t\t// density density if not absent. Otherwise, there is a parse error.\n\t\t\tif (!pError) {\n\t\t\t\tcandidate.url = url;\n\t\t\t\tif (w) { candidate.w = w;}\n\t\t\t\tif (d) { candidate.d = d;}\n\t\t\t\tif (h) { candidate.h = h;}\n\t\t\t\tcandidates.push(candidate);\n\t\t\t} else if (console && console.log) {\n\t\t\t\tconsole.log(\"Invalid srcset descriptor found in '\" +\n\t\t\t\t\tinput + \"' at '\" + desc + \"'.\");\n\t\t\t}\n\t\t} // (close parseDescriptors fn)\n\n\t}\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/parse-srcset/src/parse-srcset.js?");

/***/ }),

/***/ "./node_modules/parseqs/index.js":
/*!***************************************!*\
  !*** ./node_modules/parseqs/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\n\nexports.encode = function (obj) {\n  var str = '';\n\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) {\n      if (str.length) str += '&';\n      str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n    }\n  }\n\n  return str;\n};\n\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\n\nexports.decode = function(qs){\n  var qry = {};\n  var pairs = qs.split('&');\n  for (var i = 0, l = pairs.length; i < l; i++) {\n    var pair = pairs[i].split('=');\n    qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n  }\n  return qry;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/parseqs/index.js?");

/***/ }),

/***/ "./node_modules/parseuri/index.js":
/*!****************************************!*\
  !*** ./node_modules/parseuri/index.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\n\nvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\n\nvar parts = [\n    'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\n\nmodule.exports = function parseuri(str) {\n    var src = str,\n        b = str.indexOf('['),\n        e = str.indexOf(']');\n\n    if (b != -1 && e != -1) {\n        str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n    }\n\n    var m = re.exec(str || ''),\n        uri = {},\n        i = 14;\n\n    while (i--) {\n        uri[parts[i]] = m[i] || '';\n    }\n\n    if (b != -1 && e != -1) {\n        uri.source = src;\n        uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n        uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n        uri.ipv6uri = true;\n    }\n\n    uri.pathNames = pathNames(uri, uri['path']);\n    uri.queryKey = queryKey(uri, uri['query']);\n\n    return uri;\n};\n\nfunction pathNames(obj, path) {\n    var regx = /\\/{2,9}/g,\n        names = path.replace(regx, \"/\").split(\"/\");\n\n    if (path.substr(0, 1) == '/' || path.length === 0) {\n        names.splice(0, 1);\n    }\n    if (path.substr(path.length - 1, 1) == '/') {\n        names.splice(names.length - 1, 1);\n    }\n\n    return names;\n}\n\nfunction queryKey(uri, query) {\n    var data = {};\n\n    query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n        if ($1) {\n            data[$1] = $2;\n        }\n    });\n\n    return data;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/parseuri/index.js?");

/***/ }),

/***/ "./node_modules/particles.js/particles.js":
/*!************************************************!*\
  !*** ./node_modules/particles.js/particles.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* -----------------------------------------------\n/* Author : Vincent Garreau  - vincentgarreau.com\n/* MIT license: http://opensource.org/licenses/MIT\n/* Demo / Generator : vincentgarreau.com/particles.js\n/* GitHub : github.com/VincentGarreau/particles.js\n/* How to use? : Check the GitHub README\n/* v2.0.0\n/* ----------------------------------------------- */\n\nvar pJS = function(tag_id, params){\n\n  var canvas_el = document.querySelector('#'+tag_id+' > .particles-js-canvas-el');\n\n  /* particles.js variables with default values */\n  this.pJS = {\n    canvas: {\n      el: canvas_el,\n      w: canvas_el.offsetWidth,\n      h: canvas_el.offsetHeight\n    },\n    particles: {\n      number: {\n        value: 400,\n        density: {\n          enable: true,\n          value_area: 800\n        }\n      },\n      color: {\n        value: '#fff'\n      },\n      shape: {\n        type: 'circle',\n        stroke: {\n          width: 0,\n          color: '#ff0000'\n        },\n        polygon: {\n          nb_sides: 5\n        },\n        image: {\n          src: '',\n          width: 100,\n          height: 100\n        }\n      },\n      opacity: {\n        value: 1,\n        random: false,\n        anim: {\n          enable: false,\n          speed: 2,\n          opacity_min: 0,\n          sync: false\n        }\n      },\n      size: {\n        value: 20,\n        random: false,\n        anim: {\n          enable: false,\n          speed: 20,\n          size_min: 0,\n          sync: false\n        }\n      },\n      line_linked: {\n        enable: true,\n        distance: 100,\n        color: '#fff',\n        opacity: 1,\n        width: 1\n      },\n      move: {\n        enable: true,\n        speed: 2,\n        direction: 'none',\n        random: false,\n        straight: false,\n        out_mode: 'out',\n        bounce: false,\n        attract: {\n          enable: false,\n          rotateX: 3000,\n          rotateY: 3000\n        }\n      },\n      array: []\n    },\n    interactivity: {\n      detect_on: 'canvas',\n      events: {\n        onhover: {\n          enable: true,\n          mode: 'grab'\n        },\n        onclick: {\n          enable: true,\n          mode: 'push'\n        },\n        resize: true\n      },\n      modes: {\n        grab:{\n          distance: 100,\n          line_linked:{\n            opacity: 1\n          }\n        },\n        bubble:{\n          distance: 200,\n          size: 80,\n          duration: 0.4\n        },\n        repulse:{\n          distance: 200,\n          duration: 0.4\n        },\n        push:{\n          particles_nb: 4\n        },\n        remove:{\n          particles_nb: 2\n        }\n      },\n      mouse:{}\n    },\n    retina_detect: false,\n    fn: {\n      interact: {},\n      modes: {},\n      vendors:{}\n    },\n    tmp: {}\n  };\n\n  var pJS = this.pJS;\n\n  /* params settings */\n  if(params){\n    Object.deepExtend(pJS, params);\n  }\n\n  pJS.tmp.obj = {\n    size_value: pJS.particles.size.value,\n    size_anim_speed: pJS.particles.size.anim.speed,\n    move_speed: pJS.particles.move.speed,\n    line_linked_distance: pJS.particles.line_linked.distance,\n    line_linked_width: pJS.particles.line_linked.width,\n    mode_grab_distance: pJS.interactivity.modes.grab.distance,\n    mode_bubble_distance: pJS.interactivity.modes.bubble.distance,\n    mode_bubble_size: pJS.interactivity.modes.bubble.size,\n    mode_repulse_distance: pJS.interactivity.modes.repulse.distance\n  };\n\n\n  pJS.fn.retinaInit = function(){\n\n    if(pJS.retina_detect && window.devicePixelRatio > 1){\n      pJS.canvas.pxratio = window.devicePixelRatio; \n      pJS.tmp.retina = true;\n    } \n    else{\n      pJS.canvas.pxratio = 1;\n      pJS.tmp.retina = false;\n    }\n\n    pJS.canvas.w = pJS.canvas.el.offsetWidth * pJS.canvas.pxratio;\n    pJS.canvas.h = pJS.canvas.el.offsetHeight * pJS.canvas.pxratio;\n\n    pJS.particles.size.value = pJS.tmp.obj.size_value * pJS.canvas.pxratio;\n    pJS.particles.size.anim.speed = pJS.tmp.obj.size_anim_speed * pJS.canvas.pxratio;\n    pJS.particles.move.speed = pJS.tmp.obj.move_speed * pJS.canvas.pxratio;\n    pJS.particles.line_linked.distance = pJS.tmp.obj.line_linked_distance * pJS.canvas.pxratio;\n    pJS.interactivity.modes.grab.distance = pJS.tmp.obj.mode_grab_distance * pJS.canvas.pxratio;\n    pJS.interactivity.modes.bubble.distance = pJS.tmp.obj.mode_bubble_distance * pJS.canvas.pxratio;\n    pJS.particles.line_linked.width = pJS.tmp.obj.line_linked_width * pJS.canvas.pxratio;\n    pJS.interactivity.modes.bubble.size = pJS.tmp.obj.mode_bubble_size * pJS.canvas.pxratio;\n    pJS.interactivity.modes.repulse.distance = pJS.tmp.obj.mode_repulse_distance * pJS.canvas.pxratio;\n\n  };\n\n\n\n  /* ---------- pJS functions - canvas ------------ */\n\n  pJS.fn.canvasInit = function(){\n    pJS.canvas.ctx = pJS.canvas.el.getContext('2d');\n  };\n\n  pJS.fn.canvasSize = function(){\n\n    pJS.canvas.el.width = pJS.canvas.w;\n    pJS.canvas.el.height = pJS.canvas.h;\n\n    if(pJS && pJS.interactivity.events.resize){\n\n      window.addEventListener('resize', function(){\n\n          pJS.canvas.w = pJS.canvas.el.offsetWidth;\n          pJS.canvas.h = pJS.canvas.el.offsetHeight;\n\n          /* resize canvas */\n          if(pJS.tmp.retina){\n            pJS.canvas.w *= pJS.canvas.pxratio;\n            pJS.canvas.h *= pJS.canvas.pxratio;\n          }\n\n          pJS.canvas.el.width = pJS.canvas.w;\n          pJS.canvas.el.height = pJS.canvas.h;\n\n          /* repaint canvas on anim disabled */\n          if(!pJS.particles.move.enable){\n            pJS.fn.particlesEmpty();\n            pJS.fn.particlesCreate();\n            pJS.fn.particlesDraw();\n            pJS.fn.vendors.densityAutoParticles();\n          }\n\n        /* density particles enabled */\n        pJS.fn.vendors.densityAutoParticles();\n\n      });\n\n    }\n\n  };\n\n\n  pJS.fn.canvasPaint = function(){\n    pJS.canvas.ctx.fillRect(0, 0, pJS.canvas.w, pJS.canvas.h);\n  };\n\n  pJS.fn.canvasClear = function(){\n    pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);\n  };\n\n\n  /* --------- pJS functions - particles ----------- */\n\n  pJS.fn.particle = function(color, opacity, position){\n\n    /* size */\n    this.radius = (pJS.particles.size.random ? Math.random() : 1) * pJS.particles.size.value;\n    if(pJS.particles.size.anim.enable){\n      this.size_status = false;\n      this.vs = pJS.particles.size.anim.speed / 100;\n      if(!pJS.particles.size.anim.sync){\n        this.vs = this.vs * Math.random();\n      }\n    }\n\n    /* position */\n    this.x = position ? position.x : Math.random() * pJS.canvas.w;\n    this.y = position ? position.y : Math.random() * pJS.canvas.h;\n\n    /* check position  - into the canvas */\n    if(this.x > pJS.canvas.w - this.radius*2) this.x = this.x - this.radius;\n    else if(this.x < this.radius*2) this.x = this.x + this.radius;\n    if(this.y > pJS.canvas.h - this.radius*2) this.y = this.y - this.radius;\n    else if(this.y < this.radius*2) this.y = this.y + this.radius;\n\n    /* check position - avoid overlap */\n    if(pJS.particles.move.bounce){\n      pJS.fn.vendors.checkOverlap(this, position);\n    }\n\n    /* color */\n    this.color = {};\n    if(typeof(color.value) == 'object'){\n\n      if(color.value instanceof Array){\n        var color_selected = color.value[Math.floor(Math.random() * pJS.particles.color.value.length)];\n        this.color.rgb = hexToRgb(color_selected);\n      }else{\n        if(color.value.r != undefined && color.value.g != undefined && color.value.b != undefined){\n          this.color.rgb = {\n            r: color.value.r,\n            g: color.value.g,\n            b: color.value.b\n          }\n        }\n        if(color.value.h != undefined && color.value.s != undefined && color.value.l != undefined){\n          this.color.hsl = {\n            h: color.value.h,\n            s: color.value.s,\n            l: color.value.l\n          }\n        }\n      }\n\n    }\n    else if(color.value == 'random'){\n      this.color.rgb = {\n        r: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),\n        g: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),\n        b: (Math.floor(Math.random() * (255 - 0 + 1)) + 0)\n      }\n    }\n    else if(typeof(color.value) == 'string'){\n      this.color = color;\n      this.color.rgb = hexToRgb(this.color.value);\n    }\n\n    /* opacity */\n    this.opacity = (pJS.particles.opacity.random ? Math.random() : 1) * pJS.particles.opacity.value;\n    if(pJS.particles.opacity.anim.enable){\n      this.opacity_status = false;\n      this.vo = pJS.particles.opacity.anim.speed / 100;\n      if(!pJS.particles.opacity.anim.sync){\n        this.vo = this.vo * Math.random();\n      }\n    }\n\n    /* animation - velocity for speed */\n    var velbase = {}\n    switch(pJS.particles.move.direction){\n      case 'top':\n        velbase = { x:0, y:-1 };\n      break;\n      case 'top-right':\n        velbase = { x:0.5, y:-0.5 };\n      break;\n      case 'right':\n        velbase = { x:1, y:-0 };\n      break;\n      case 'bottom-right':\n        velbase = { x:0.5, y:0.5 };\n      break;\n      case 'bottom':\n        velbase = { x:0, y:1 };\n      break;\n      case 'bottom-left':\n        velbase = { x:-0.5, y:1 };\n      break;\n      case 'left':\n        velbase = { x:-1, y:0 };\n      break;\n      case 'top-left':\n        velbase = { x:-0.5, y:-0.5 };\n      break;\n      default:\n        velbase = { x:0, y:0 };\n      break;\n    }\n\n    if(pJS.particles.move.straight){\n      this.vx = velbase.x;\n      this.vy = velbase.y;\n      if(pJS.particles.move.random){\n        this.vx = this.vx * (Math.random());\n        this.vy = this.vy * (Math.random());\n      }\n    }else{\n      this.vx = velbase.x + Math.random()-0.5;\n      this.vy = velbase.y + Math.random()-0.5;\n    }\n\n    // var theta = 2.0 * Math.PI * Math.random();\n    // this.vx = Math.cos(theta);\n    // this.vy = Math.sin(theta);\n\n    this.vx_i = this.vx;\n    this.vy_i = this.vy;\n\n    \n\n    /* if shape is image */\n\n    var shape_type = pJS.particles.shape.type;\n    if(typeof(shape_type) == 'object'){\n      if(shape_type instanceof Array){\n        var shape_selected = shape_type[Math.floor(Math.random() * shape_type.length)];\n        this.shape = shape_selected;\n      }\n    }else{\n      this.shape = shape_type;\n    }\n\n    if(this.shape == 'image'){\n      var sh = pJS.particles.shape;\n      this.img = {\n        src: sh.image.src,\n        ratio: sh.image.width / sh.image.height\n      }\n      if(!this.img.ratio) this.img.ratio = 1;\n      if(pJS.tmp.img_type == 'svg' && pJS.tmp.source_svg != undefined){\n        pJS.fn.vendors.createSvgImg(this);\n        if(pJS.tmp.pushing){\n          this.img.loaded = false;\n        }\n      }\n    }\n\n    \n\n  };\n\n\n  pJS.fn.particle.prototype.draw = function() {\n\n    var p = this;\n\n    if(p.radius_bubble != undefined){\n      var radius = p.radius_bubble; \n    }else{\n      var radius = p.radius;\n    }\n\n    if(p.opacity_bubble != undefined){\n      var opacity = p.opacity_bubble;\n    }else{\n      var opacity = p.opacity;\n    }\n\n    if(p.color.rgb){\n      var color_value = 'rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+opacity+')';\n    }else{\n      var color_value = 'hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+opacity+')';\n    }\n\n    pJS.canvas.ctx.fillStyle = color_value;\n    pJS.canvas.ctx.beginPath();\n\n    switch(p.shape){\n\n      case 'circle':\n        pJS.canvas.ctx.arc(p.x, p.y, radius, 0, Math.PI * 2, false);\n      break;\n\n      case 'edge':\n        pJS.canvas.ctx.rect(p.x-radius, p.y-radius, radius*2, radius*2);\n      break;\n\n      case 'triangle':\n        pJS.fn.vendors.drawShape(pJS.canvas.ctx, p.x-radius, p.y+radius / 1.66, radius*2, 3, 2);\n      break;\n\n      case 'polygon':\n        pJS.fn.vendors.drawShape(\n          pJS.canvas.ctx,\n          p.x - radius / (pJS.particles.shape.polygon.nb_sides/3.5), // startX\n          p.y - radius / (2.66/3.5), // startY\n          radius*2.66 / (pJS.particles.shape.polygon.nb_sides/3), // sideLength\n          pJS.particles.shape.polygon.nb_sides, // sideCountNumerator\n          1 // sideCountDenominator\n        );\n      break;\n\n      case 'star':\n        pJS.fn.vendors.drawShape(\n          pJS.canvas.ctx,\n          p.x - radius*2 / (pJS.particles.shape.polygon.nb_sides/4), // startX\n          p.y - radius / (2*2.66/3.5), // startY\n          radius*2*2.66 / (pJS.particles.shape.polygon.nb_sides/3), // sideLength\n          pJS.particles.shape.polygon.nb_sides, // sideCountNumerator\n          2 // sideCountDenominator\n        );\n      break;\n\n      case 'image':\n\n        function draw(){\n          pJS.canvas.ctx.drawImage(\n            img_obj,\n            p.x-radius,\n            p.y-radius,\n            radius*2,\n            radius*2 / p.img.ratio\n          );\n        }\n\n        if(pJS.tmp.img_type == 'svg'){\n          var img_obj = p.img.obj;\n        }else{\n          var img_obj = pJS.tmp.img_obj;\n        }\n\n        if(img_obj){\n          draw();\n        }\n\n      break;\n\n    }\n\n    pJS.canvas.ctx.closePath();\n\n    if(pJS.particles.shape.stroke.width > 0){\n      pJS.canvas.ctx.strokeStyle = pJS.particles.shape.stroke.color;\n      pJS.canvas.ctx.lineWidth = pJS.particles.shape.stroke.width;\n      pJS.canvas.ctx.stroke();\n    }\n    \n    pJS.canvas.ctx.fill();\n    \n  };\n\n\n  pJS.fn.particlesCreate = function(){\n    for(var i = 0; i < pJS.particles.number.value; i++) {\n      pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color, pJS.particles.opacity.value));\n    }\n  };\n\n  pJS.fn.particlesUpdate = function(){\n\n    for(var i = 0; i < pJS.particles.array.length; i++){\n\n      /* the particle */\n      var p = pJS.particles.array[i];\n\n      // var d = ( dx = pJS.interactivity.mouse.click_pos_x - p.x ) * dx + ( dy = pJS.interactivity.mouse.click_pos_y - p.y ) * dy;\n      // var f = -BANG_SIZE / d;\n      // if ( d < BANG_SIZE ) {\n      //     var t = Math.atan2( dy, dx );\n      //     p.vx = f * Math.cos(t);\n      //     p.vy = f * Math.sin(t);\n      // }\n\n      /* move the particle */\n      if(pJS.particles.move.enable){\n        var ms = pJS.particles.move.speed/2;\n        p.x += p.vx * ms;\n        p.y += p.vy * ms;\n      }\n\n      /* change opacity status */\n      if(pJS.particles.opacity.anim.enable) {\n        if(p.opacity_status == true) {\n          if(p.opacity >= pJS.particles.opacity.value) p.opacity_status = false;\n          p.opacity += p.vo;\n        }else {\n          if(p.opacity <= pJS.particles.opacity.anim.opacity_min) p.opacity_status = true;\n          p.opacity -= p.vo;\n        }\n        if(p.opacity < 0) p.opacity = 0;\n      }\n\n      /* change size */\n      if(pJS.particles.size.anim.enable){\n        if(p.size_status == true){\n          if(p.radius >= pJS.particles.size.value) p.size_status = false;\n          p.radius += p.vs;\n        }else{\n          if(p.radius <= pJS.particles.size.anim.size_min) p.size_status = true;\n          p.radius -= p.vs;\n        }\n        if(p.radius < 0) p.radius = 0;\n      }\n\n      /* change particle position if it is out of canvas */\n      if(pJS.particles.move.out_mode == 'bounce'){\n        var new_pos = {\n          x_left: p.radius,\n          x_right:  pJS.canvas.w,\n          y_top: p.radius,\n          y_bottom: pJS.canvas.h\n        }\n      }else{\n        var new_pos = {\n          x_left: -p.radius,\n          x_right: pJS.canvas.w + p.radius,\n          y_top: -p.radius,\n          y_bottom: pJS.canvas.h + p.radius\n        }\n      }\n\n      if(p.x - p.radius > pJS.canvas.w){\n        p.x = new_pos.x_left;\n        p.y = Math.random() * pJS.canvas.h;\n      }\n      else if(p.x + p.radius < 0){\n        p.x = new_pos.x_right;\n        p.y = Math.random() * pJS.canvas.h;\n      }\n      if(p.y - p.radius > pJS.canvas.h){\n        p.y = new_pos.y_top;\n        p.x = Math.random() * pJS.canvas.w;\n      }\n      else if(p.y + p.radius < 0){\n        p.y = new_pos.y_bottom;\n        p.x = Math.random() * pJS.canvas.w;\n      }\n\n      /* out of canvas modes */\n      switch(pJS.particles.move.out_mode){\n        case 'bounce':\n          if (p.x + p.radius > pJS.canvas.w) p.vx = -p.vx;\n          else if (p.x - p.radius < 0) p.vx = -p.vx;\n          if (p.y + p.radius > pJS.canvas.h) p.vy = -p.vy;\n          else if (p.y - p.radius < 0) p.vy = -p.vy;\n        break;\n      }\n\n      /* events */\n      if(isInArray('grab', pJS.interactivity.events.onhover.mode)){\n        pJS.fn.modes.grabParticle(p);\n      }\n\n      if(isInArray('bubble', pJS.interactivity.events.onhover.mode) || isInArray('bubble', pJS.interactivity.events.onclick.mode)){\n        pJS.fn.modes.bubbleParticle(p);\n      }\n\n      if(isInArray('repulse', pJS.interactivity.events.onhover.mode) || isInArray('repulse', pJS.interactivity.events.onclick.mode)){\n        pJS.fn.modes.repulseParticle(p);\n      }\n\n      /* interaction auto between particles */\n      if(pJS.particles.line_linked.enable || pJS.particles.move.attract.enable){\n        for(var j = i + 1; j < pJS.particles.array.length; j++){\n          var p2 = pJS.particles.array[j];\n\n          /* link particles */\n          if(pJS.particles.line_linked.enable){\n            pJS.fn.interact.linkParticles(p,p2);\n          }\n\n          /* attract particles */\n          if(pJS.particles.move.attract.enable){\n            pJS.fn.interact.attractParticles(p,p2);\n          }\n\n          /* bounce particles */\n          if(pJS.particles.move.bounce){\n            pJS.fn.interact.bounceParticles(p,p2);\n          }\n\n        }\n      }\n\n\n    }\n\n  };\n\n  pJS.fn.particlesDraw = function(){\n\n    /* clear canvas */\n    pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);\n\n    /* update each particles param */\n    pJS.fn.particlesUpdate();\n\n    /* draw each particle */\n    for(var i = 0; i < pJS.particles.array.length; i++){\n      var p = pJS.particles.array[i];\n      p.draw();\n    }\n\n  };\n\n  pJS.fn.particlesEmpty = function(){\n    pJS.particles.array = [];\n  };\n\n  pJS.fn.particlesRefresh = function(){\n\n    /* init all */\n    cancelRequestAnimFrame(pJS.fn.checkAnimFrame);\n    cancelRequestAnimFrame(pJS.fn.drawAnimFrame);\n    pJS.tmp.source_svg = undefined;\n    pJS.tmp.img_obj = undefined;\n    pJS.tmp.count_svg = 0;\n    pJS.fn.particlesEmpty();\n    pJS.fn.canvasClear();\n    \n    /* restart */\n    pJS.fn.vendors.start();\n\n  };\n\n\n  /* ---------- pJS functions - particles interaction ------------ */\n\n  pJS.fn.interact.linkParticles = function(p1, p2){\n\n    var dx = p1.x - p2.x,\n        dy = p1.y - p2.y,\n        dist = Math.sqrt(dx*dx + dy*dy);\n\n    /* draw a line between p1 and p2 if the distance between them is under the config distance */\n    if(dist <= pJS.particles.line_linked.distance){\n\n      var opacity_line = pJS.particles.line_linked.opacity - (dist / (1/pJS.particles.line_linked.opacity)) / pJS.particles.line_linked.distance;\n\n      if(opacity_line > 0){        \n        \n        /* style */\n        var color_line = pJS.particles.line_linked.color_rgb_line;\n        pJS.canvas.ctx.strokeStyle = 'rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';\n        pJS.canvas.ctx.lineWidth = pJS.particles.line_linked.width;\n        //pJS.canvas.ctx.lineCap = 'round'; /* performance issue */\n        \n        /* path */\n        pJS.canvas.ctx.beginPath();\n        pJS.canvas.ctx.moveTo(p1.x, p1.y);\n        pJS.canvas.ctx.lineTo(p2.x, p2.y);\n        pJS.canvas.ctx.stroke();\n        pJS.canvas.ctx.closePath();\n\n      }\n\n    }\n\n  };\n\n\n  pJS.fn.interact.attractParticles  = function(p1, p2){\n\n    /* condensed particles */\n    var dx = p1.x - p2.x,\n        dy = p1.y - p2.y,\n        dist = Math.sqrt(dx*dx + dy*dy);\n\n    if(dist <= pJS.particles.line_linked.distance){\n\n      var ax = dx/(pJS.particles.move.attract.rotateX*1000),\n          ay = dy/(pJS.particles.move.attract.rotateY*1000);\n\n      p1.vx -= ax;\n      p1.vy -= ay;\n\n      p2.vx += ax;\n      p2.vy += ay;\n\n    }\n    \n\n  }\n\n\n  pJS.fn.interact.bounceParticles = function(p1, p2){\n\n    var dx = p1.x - p2.x,\n        dy = p1.y - p2.y,\n        dist = Math.sqrt(dx*dx + dy*dy),\n        dist_p = p1.radius+p2.radius;\n\n    if(dist <= dist_p){\n      p1.vx = -p1.vx;\n      p1.vy = -p1.vy;\n\n      p2.vx = -p2.vx;\n      p2.vy = -p2.vy;\n    }\n\n  }\n\n\n  /* ---------- pJS functions - modes events ------------ */\n\n  pJS.fn.modes.pushParticles = function(nb, pos){\n\n    pJS.tmp.pushing = true;\n\n    for(var i = 0; i < nb; i++){\n      pJS.particles.array.push(\n        new pJS.fn.particle(\n          pJS.particles.color,\n          pJS.particles.opacity.value,\n          {\n            'x': pos ? pos.pos_x : Math.random() * pJS.canvas.w,\n            'y': pos ? pos.pos_y : Math.random() * pJS.canvas.h\n          }\n        )\n      )\n      if(i == nb-1){\n        if(!pJS.particles.move.enable){\n          pJS.fn.particlesDraw();\n        }\n        pJS.tmp.pushing = false;\n      }\n    }\n\n  };\n\n\n  pJS.fn.modes.removeParticles = function(nb){\n\n    pJS.particles.array.splice(0, nb);\n    if(!pJS.particles.move.enable){\n      pJS.fn.particlesDraw();\n    }\n\n  };\n\n\n  pJS.fn.modes.bubbleParticle = function(p){\n\n    /* on hover event */\n    if(pJS.interactivity.events.onhover.enable && isInArray('bubble', pJS.interactivity.events.onhover.mode)){\n\n      var dx_mouse = p.x - pJS.interactivity.mouse.pos_x,\n          dy_mouse = p.y - pJS.interactivity.mouse.pos_y,\n          dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),\n          ratio = 1 - dist_mouse / pJS.interactivity.modes.bubble.distance;\n\n      function init(){\n        p.opacity_bubble = p.opacity;\n        p.radius_bubble = p.radius;\n      }\n\n      /* mousemove - check ratio */\n      if(dist_mouse <= pJS.interactivity.modes.bubble.distance){\n\n        if(ratio >= 0 && pJS.interactivity.status == 'mousemove'){\n          \n          /* size */\n          if(pJS.interactivity.modes.bubble.size != pJS.particles.size.value){\n\n            if(pJS.interactivity.modes.bubble.size > pJS.particles.size.value){\n              var size = p.radius + (pJS.interactivity.modes.bubble.size*ratio);\n              if(size >= 0){\n                p.radius_bubble = size;\n              }\n            }else{\n              var dif = p.radius - pJS.interactivity.modes.bubble.size,\n                  size = p.radius - (dif*ratio);\n              if(size > 0){\n                p.radius_bubble = size;\n              }else{\n                p.radius_bubble = 0;\n              }\n            }\n\n          }\n\n          /* opacity */\n          if(pJS.interactivity.modes.bubble.opacity != pJS.particles.opacity.value){\n\n            if(pJS.interactivity.modes.bubble.opacity > pJS.particles.opacity.value){\n              var opacity = pJS.interactivity.modes.bubble.opacity*ratio;\n              if(opacity > p.opacity && opacity <= pJS.interactivity.modes.bubble.opacity){\n                p.opacity_bubble = opacity;\n              }\n            }else{\n              var opacity = p.opacity - (pJS.particles.opacity.value-pJS.interactivity.modes.bubble.opacity)*ratio;\n              if(opacity < p.opacity && opacity >= pJS.interactivity.modes.bubble.opacity){\n                p.opacity_bubble = opacity;\n              }\n            }\n\n          }\n\n        }\n\n      }else{\n        init();\n      }\n\n\n      /* mouseleave */\n      if(pJS.interactivity.status == 'mouseleave'){\n        init();\n      }\n    \n    }\n\n    /* on click event */\n    else if(pJS.interactivity.events.onclick.enable && isInArray('bubble', pJS.interactivity.events.onclick.mode)){\n\n\n      if(pJS.tmp.bubble_clicking){\n        var dx_mouse = p.x - pJS.interactivity.mouse.click_pos_x,\n            dy_mouse = p.y - pJS.interactivity.mouse.click_pos_y,\n            dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),\n            time_spent = (new Date().getTime() - pJS.interactivity.mouse.click_time)/1000;\n\n        if(time_spent > pJS.interactivity.modes.bubble.duration){\n          pJS.tmp.bubble_duration_end = true;\n        }\n\n        if(time_spent > pJS.interactivity.modes.bubble.duration*2){\n          pJS.tmp.bubble_clicking = false;\n          pJS.tmp.bubble_duration_end = false;\n        }\n      }\n\n\n      function process(bubble_param, particles_param, p_obj_bubble, p_obj, id){\n\n        if(bubble_param != particles_param){\n\n          if(!pJS.tmp.bubble_duration_end){\n            if(dist_mouse <= pJS.interactivity.modes.bubble.distance){\n              if(p_obj_bubble != undefined) var obj = p_obj_bubble;\n              else var obj = p_obj;\n              if(obj != bubble_param){\n                var value = p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration);\n                if(id == 'size') p.radius_bubble = value;\n                if(id == 'opacity') p.opacity_bubble = value;\n              }\n            }else{\n              if(id == 'size') p.radius_bubble = undefined;\n              if(id == 'opacity') p.opacity_bubble = undefined;\n            }\n          }else{\n            if(p_obj_bubble != undefined){\n              var value_tmp = p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration),\n                  dif = bubble_param - value_tmp;\n                  value = bubble_param + dif;\n              if(id == 'size') p.radius_bubble = value;\n              if(id == 'opacity') p.opacity_bubble = value;\n            }\n          }\n\n        }\n\n      }\n\n      if(pJS.tmp.bubble_clicking){\n        /* size */\n        process(pJS.interactivity.modes.bubble.size, pJS.particles.size.value, p.radius_bubble, p.radius, 'size');\n        /* opacity */\n        process(pJS.interactivity.modes.bubble.opacity, pJS.particles.opacity.value, p.opacity_bubble, p.opacity, 'opacity');\n      }\n\n    }\n\n  };\n\n\n  pJS.fn.modes.repulseParticle = function(p){\n\n    if(pJS.interactivity.events.onhover.enable && isInArray('repulse', pJS.interactivity.events.onhover.mode) && pJS.interactivity.status == 'mousemove') {\n\n      var dx_mouse = p.x - pJS.interactivity.mouse.pos_x,\n          dy_mouse = p.y - pJS.interactivity.mouse.pos_y,\n          dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);\n\n      var normVec = {x: dx_mouse/dist_mouse, y: dy_mouse/dist_mouse},\n          repulseRadius = pJS.interactivity.modes.repulse.distance,\n          velocity = 100,\n          repulseFactor = clamp((1/repulseRadius)*(-1*Math.pow(dist_mouse/repulseRadius,2)+1)*repulseRadius*velocity, 0, 50);\n      \n      var pos = {\n        x: p.x + normVec.x * repulseFactor,\n        y: p.y + normVec.y * repulseFactor\n      }\n\n      if(pJS.particles.move.out_mode == 'bounce'){\n        if(pos.x - p.radius > 0 && pos.x + p.radius < pJS.canvas.w) p.x = pos.x;\n        if(pos.y - p.radius > 0 && pos.y + p.radius < pJS.canvas.h) p.y = pos.y;\n      }else{\n        p.x = pos.x;\n        p.y = pos.y;\n      }\n    \n    }\n\n\n    else if(pJS.interactivity.events.onclick.enable && isInArray('repulse', pJS.interactivity.events.onclick.mode)) {\n\n      if(!pJS.tmp.repulse_finish){\n        pJS.tmp.repulse_count++;\n        if(pJS.tmp.repulse_count == pJS.particles.array.length){\n          pJS.tmp.repulse_finish = true;\n        }\n      }\n\n      if(pJS.tmp.repulse_clicking){\n\n        var repulseRadius = Math.pow(pJS.interactivity.modes.repulse.distance/6, 3);\n\n        var dx = pJS.interactivity.mouse.click_pos_x - p.x,\n            dy = pJS.interactivity.mouse.click_pos_y - p.y,\n            d = dx*dx + dy*dy;\n\n        var force = -repulseRadius / d * 1;\n\n        function process(){\n\n          var f = Math.atan2(dy,dx);\n          p.vx = force * Math.cos(f);\n          p.vy = force * Math.sin(f);\n\n          if(pJS.particles.move.out_mode == 'bounce'){\n            var pos = {\n              x: p.x + p.vx,\n              y: p.y + p.vy\n            }\n            if (pos.x + p.radius > pJS.canvas.w) p.vx = -p.vx;\n            else if (pos.x - p.radius < 0) p.vx = -p.vx;\n            if (pos.y + p.radius > pJS.canvas.h) p.vy = -p.vy;\n            else if (pos.y - p.radius < 0) p.vy = -p.vy;\n          }\n\n        }\n\n        // default\n        if(d <= repulseRadius){\n          process();\n        }\n\n        // bang - slow motion mode\n        // if(!pJS.tmp.repulse_finish){\n        //   if(d <= repulseRadius){\n        //     process();\n        //   }\n        // }else{\n        //   process();\n        // }\n        \n\n      }else{\n\n        if(pJS.tmp.repulse_clicking == false){\n\n          p.vx = p.vx_i;\n          p.vy = p.vy_i;\n        \n        }\n\n      }\n\n    }\n\n  }\n\n\n  pJS.fn.modes.grabParticle = function(p){\n\n    if(pJS.interactivity.events.onhover.enable && pJS.interactivity.status == 'mousemove'){\n\n      var dx_mouse = p.x - pJS.interactivity.mouse.pos_x,\n          dy_mouse = p.y - pJS.interactivity.mouse.pos_y,\n          dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);\n\n      /* draw a line between the cursor and the particle if the distance between them is under the config distance */\n      if(dist_mouse <= pJS.interactivity.modes.grab.distance){\n\n        var opacity_line = pJS.interactivity.modes.grab.line_linked.opacity - (dist_mouse / (1/pJS.interactivity.modes.grab.line_linked.opacity)) / pJS.interactivity.modes.grab.distance;\n\n        if(opacity_line > 0){\n\n          /* style */\n          var color_line = pJS.particles.line_linked.color_rgb_line;\n          pJS.canvas.ctx.strokeStyle = 'rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';\n          pJS.canvas.ctx.lineWidth = pJS.particles.line_linked.width;\n          //pJS.canvas.ctx.lineCap = 'round'; /* performance issue */\n          \n          /* path */\n          pJS.canvas.ctx.beginPath();\n          pJS.canvas.ctx.moveTo(p.x, p.y);\n          pJS.canvas.ctx.lineTo(pJS.interactivity.mouse.pos_x, pJS.interactivity.mouse.pos_y);\n          pJS.canvas.ctx.stroke();\n          pJS.canvas.ctx.closePath();\n\n        }\n\n      }\n\n    }\n\n  };\n\n\n\n  /* ---------- pJS functions - vendors ------------ */\n\n  pJS.fn.vendors.eventsListeners = function(){\n\n    /* events target element */\n    if(pJS.interactivity.detect_on == 'window'){\n      pJS.interactivity.el = window;\n    }else{\n      pJS.interactivity.el = pJS.canvas.el;\n    }\n\n\n    /* detect mouse pos - on hover / click event */\n    if(pJS.interactivity.events.onhover.enable || pJS.interactivity.events.onclick.enable){\n\n      /* el on mousemove */\n      pJS.interactivity.el.addEventListener('mousemove', function(e){\n\n        if(pJS.interactivity.el == window){\n          var pos_x = e.clientX,\n              pos_y = e.clientY;\n        }\n        else{\n          var pos_x = e.offsetX || e.clientX,\n              pos_y = e.offsetY || e.clientY;\n        }\n\n        pJS.interactivity.mouse.pos_x = pos_x;\n        pJS.interactivity.mouse.pos_y = pos_y;\n\n        if(pJS.tmp.retina){\n          pJS.interactivity.mouse.pos_x *= pJS.canvas.pxratio;\n          pJS.interactivity.mouse.pos_y *= pJS.canvas.pxratio;\n        }\n\n        pJS.interactivity.status = 'mousemove';\n\n      });\n\n      /* el on onmouseleave */\n      pJS.interactivity.el.addEventListener('mouseleave', function(e){\n\n        pJS.interactivity.mouse.pos_x = null;\n        pJS.interactivity.mouse.pos_y = null;\n        pJS.interactivity.status = 'mouseleave';\n\n      });\n\n    }\n\n    /* on click event */\n    if(pJS.interactivity.events.onclick.enable){\n\n      pJS.interactivity.el.addEventListener('click', function(){\n\n        pJS.interactivity.mouse.click_pos_x = pJS.interactivity.mouse.pos_x;\n        pJS.interactivity.mouse.click_pos_y = pJS.interactivity.mouse.pos_y;\n        pJS.interactivity.mouse.click_time = new Date().getTime();\n\n        if(pJS.interactivity.events.onclick.enable){\n\n          switch(pJS.interactivity.events.onclick.mode){\n\n            case 'push':\n              if(pJS.particles.move.enable){\n                pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);\n              }else{\n                if(pJS.interactivity.modes.push.particles_nb == 1){\n                  pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);\n                }\n                else if(pJS.interactivity.modes.push.particles_nb > 1){\n                  pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb);\n                }\n              }\n            break;\n\n            case 'remove':\n              pJS.fn.modes.removeParticles(pJS.interactivity.modes.remove.particles_nb);\n            break;\n\n            case 'bubble':\n              pJS.tmp.bubble_clicking = true;\n            break;\n\n            case 'repulse':\n              pJS.tmp.repulse_clicking = true;\n              pJS.tmp.repulse_count = 0;\n              pJS.tmp.repulse_finish = false;\n              setTimeout(function(){\n                pJS.tmp.repulse_clicking = false;\n              }, pJS.interactivity.modes.repulse.duration*1000)\n            break;\n\n          }\n\n        }\n\n      });\n        \n    }\n\n\n  };\n\n  pJS.fn.vendors.densityAutoParticles = function(){\n\n    if(pJS.particles.number.density.enable){\n\n      /* calc area */\n      var area = pJS.canvas.el.width * pJS.canvas.el.height / 1000;\n      if(pJS.tmp.retina){\n        area = area/(pJS.canvas.pxratio*2);\n      }\n\n      /* calc number of particles based on density area */\n      var nb_particles = area * pJS.particles.number.value / pJS.particles.number.density.value_area;\n\n      /* add or remove X particles */\n      var missing_particles = pJS.particles.array.length - nb_particles;\n      if(missing_particles < 0) pJS.fn.modes.pushParticles(Math.abs(missing_particles));\n      else pJS.fn.modes.removeParticles(missing_particles);\n\n    }\n\n  };\n\n\n  pJS.fn.vendors.checkOverlap = function(p1, position){\n    for(var i = 0; i < pJS.particles.array.length; i++){\n      var p2 = pJS.particles.array[i];\n\n      var dx = p1.x - p2.x,\n          dy = p1.y - p2.y,\n          dist = Math.sqrt(dx*dx + dy*dy);\n\n      if(dist <= p1.radius + p2.radius){\n        p1.x = position ? position.x : Math.random() * pJS.canvas.w;\n        p1.y = position ? position.y : Math.random() * pJS.canvas.h;\n        pJS.fn.vendors.checkOverlap(p1);\n      }\n    }\n  };\n\n\n  pJS.fn.vendors.createSvgImg = function(p){\n\n    /* set color to svg element */\n    var svgXml = pJS.tmp.source_svg,\n        rgbHex = /#([0-9A-F]{3,6})/gi,\n        coloredSvgXml = svgXml.replace(rgbHex, function (m, r, g, b) {\n          if(p.color.rgb){\n            var color_value = 'rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+p.opacity+')';\n          }else{\n            var color_value = 'hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+p.opacity+')';\n          }\n          return color_value;\n        });\n\n    /* prepare to create img with colored svg */\n    var svg = new Blob([coloredSvgXml], {type: 'image/svg+xml;charset=utf-8'}),\n        DOMURL = window.URL || window.webkitURL || window,\n        url = DOMURL.createObjectURL(svg);\n\n    /* create particle img obj */\n    var img = new Image();\n    img.addEventListener('load', function(){\n      p.img.obj = img;\n      p.img.loaded = true;\n      DOMURL.revokeObjectURL(url);\n      pJS.tmp.count_svg++;\n    });\n    img.src = url;\n\n  };\n\n\n  pJS.fn.vendors.destroypJS = function(){\n    cancelAnimationFrame(pJS.fn.drawAnimFrame);\n    canvas_el.remove();\n    pJSDom = null;\n  };\n\n\n  pJS.fn.vendors.drawShape = function(c, startX, startY, sideLength, sideCountNumerator, sideCountDenominator){\n\n    // By Programming Thomas - https://programmingthomas.wordpress.com/2013/04/03/n-sided-shapes/\n    var sideCount = sideCountNumerator * sideCountDenominator;\n    var decimalSides = sideCountNumerator / sideCountDenominator;\n    var interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides;\n    var interiorAngle = Math.PI - Math.PI * interiorAngleDegrees / 180; // convert to radians\n    c.save();\n    c.beginPath();\n    c.translate(startX, startY);\n    c.moveTo(0,0);\n    for (var i = 0; i < sideCount; i++) {\n      c.lineTo(sideLength,0);\n      c.translate(sideLength,0);\n      c.rotate(interiorAngle);\n    }\n    //c.stroke();\n    c.fill();\n    c.restore();\n\n  };\n\n  pJS.fn.vendors.exportImg = function(){\n    window.open(pJS.canvas.el.toDataURL('image/png'), '_blank');\n  };\n\n\n  pJS.fn.vendors.loadImg = function(type){\n\n    pJS.tmp.img_error = undefined;\n\n    if(pJS.particles.shape.image.src != ''){\n\n      if(type == 'svg'){\n\n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', pJS.particles.shape.image.src);\n        xhr.onreadystatechange = function (data) {\n          if(xhr.readyState == 4){\n            if(xhr.status == 200){\n              pJS.tmp.source_svg = data.currentTarget.response;\n              pJS.fn.vendors.checkBeforeDraw();\n            }else{\n              console.log('Error pJS - Image not found');\n              pJS.tmp.img_error = true;\n            }\n          }\n        }\n        xhr.send();\n\n      }else{\n\n        var img = new Image();\n        img.addEventListener('load', function(){\n          pJS.tmp.img_obj = img;\n          pJS.fn.vendors.checkBeforeDraw();\n        });\n        img.src = pJS.particles.shape.image.src;\n\n      }\n\n    }else{\n      console.log('Error pJS - No image.src');\n      pJS.tmp.img_error = true;\n    }\n\n  };\n\n\n  pJS.fn.vendors.draw = function(){\n\n    if(pJS.particles.shape.type == 'image'){\n\n      if(pJS.tmp.img_type == 'svg'){\n\n        if(pJS.tmp.count_svg >= pJS.particles.number.value){\n          pJS.fn.particlesDraw();\n          if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);\n          else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw);\n        }else{\n          //console.log('still loading...');\n          if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw);\n        }\n\n      }else{\n\n        if(pJS.tmp.img_obj != undefined){\n          pJS.fn.particlesDraw();\n          if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);\n          else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw);\n        }else{\n          if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw);\n        }\n\n      }\n\n    }else{\n      pJS.fn.particlesDraw();\n      if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);\n      else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw);\n    }\n\n  };\n\n\n  pJS.fn.vendors.checkBeforeDraw = function(){\n\n    // if shape is image\n    if(pJS.particles.shape.type == 'image'){\n\n      if(pJS.tmp.img_type == 'svg' && pJS.tmp.source_svg == undefined){\n        pJS.tmp.checkAnimFrame = requestAnimFrame(check);\n      }else{\n        //console.log('images loaded! cancel check');\n        cancelRequestAnimFrame(pJS.tmp.checkAnimFrame);\n        if(!pJS.tmp.img_error){\n          pJS.fn.vendors.init();\n          pJS.fn.vendors.draw();\n        }\n        \n      }\n\n    }else{\n      pJS.fn.vendors.init();\n      pJS.fn.vendors.draw();\n    }\n\n  };\n\n\n  pJS.fn.vendors.init = function(){\n\n    /* init canvas + particles */\n    pJS.fn.retinaInit();\n    pJS.fn.canvasInit();\n    pJS.fn.canvasSize();\n    pJS.fn.canvasPaint();\n    pJS.fn.particlesCreate();\n    pJS.fn.vendors.densityAutoParticles();\n\n    /* particles.line_linked - convert hex colors to rgb */\n    pJS.particles.line_linked.color_rgb_line = hexToRgb(pJS.particles.line_linked.color);\n\n  };\n\n\n  pJS.fn.vendors.start = function(){\n\n    if(isInArray('image', pJS.particles.shape.type)){\n      pJS.tmp.img_type = pJS.particles.shape.image.src.substr(pJS.particles.shape.image.src.length - 3);\n      pJS.fn.vendors.loadImg(pJS.tmp.img_type);\n    }else{\n      pJS.fn.vendors.checkBeforeDraw();\n    }\n\n  };\n\n\n\n\n  /* ---------- pJS - start ------------ */\n\n\n  pJS.fn.vendors.eventsListeners();\n\n  pJS.fn.vendors.start();\n  \n\n\n};\n\n/* ---------- global functions - vendors ------------ */\n\nObject.deepExtend = function(destination, source) {\n  for (var property in source) {\n    if (source[property] && source[property].constructor &&\n     source[property].constructor === Object) {\n      destination[property] = destination[property] || {};\n      arguments.callee(destination[property], source[property]);\n    } else {\n      destination[property] = source[property];\n    }\n  }\n  return destination;\n};\n\nwindow.requestAnimFrame = (function(){\n  return  window.requestAnimationFrame ||\n    window.webkitRequestAnimationFrame ||\n    window.mozRequestAnimationFrame    ||\n    window.oRequestAnimationFrame      ||\n    window.msRequestAnimationFrame     ||\n    function(callback){\n      window.setTimeout(callback, 1000 / 60);\n    };\n})();\n\nwindow.cancelRequestAnimFrame = ( function() {\n  return window.cancelAnimationFrame         ||\n    window.webkitCancelRequestAnimationFrame ||\n    window.mozCancelRequestAnimationFrame    ||\n    window.oCancelRequestAnimationFrame      ||\n    window.msCancelRequestAnimationFrame     ||\n    clearTimeout\n} )();\n\nfunction hexToRgb(hex){\n  // By Tim Down - http://stackoverflow.com/a/5624139/3493650\n  // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n  var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n  hex = hex.replace(shorthandRegex, function(m, r, g, b) {\n     return r + r + g + g + b + b;\n  });\n  var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n  return result ? {\n      r: parseInt(result[1], 16),\n      g: parseInt(result[2], 16),\n      b: parseInt(result[3], 16)\n  } : null;\n};\n\nfunction clamp(number, min, max) {\n  return Math.min(Math.max(number, min), max);\n};\n\nfunction isInArray(value, array) {\n  return array.indexOf(value) > -1;\n}\n\n\n/* ---------- particles.js functions - start ------------ */\n\nwindow.pJSDom = [];\n\nwindow.particlesJS = function(tag_id, params){\n\n  //console.log(params);\n\n  /* no string id? so it's object params, and set the id with default id */\n  if(typeof(tag_id) != 'string'){\n    params = tag_id;\n    tag_id = 'particles-js';\n  }\n\n  /* no id? set the id to default id */\n  if(!tag_id){\n    tag_id = 'particles-js';\n  }\n\n  /* pJS elements */\n  var pJS_tag = document.getElementById(tag_id),\n      pJS_canvas_class = 'particles-js-canvas-el',\n      exist_canvas = pJS_tag.getElementsByClassName(pJS_canvas_class);\n\n  /* remove canvas if exists into the pJS target tag */\n  if(exist_canvas.length){\n    while(exist_canvas.length > 0){\n      pJS_tag.removeChild(exist_canvas[0]);\n    }\n  }\n\n  /* create canvas element */\n  var canvas_el = document.createElement('canvas');\n  canvas_el.className = pJS_canvas_class;\n\n  /* set size canvas */\n  canvas_el.style.width = \"100%\";\n  canvas_el.style.height = \"100%\";\n\n  /* append canvas */\n  var canvas = document.getElementById(tag_id).appendChild(canvas_el);\n\n  /* launch particle.js */\n  if(canvas != null){\n    pJSDom.push(new pJS(tag_id, params));\n  }\n\n};\n\nwindow.particlesJS.load = function(tag_id, path_config_json, callback){\n\n  /* load json config */\n  var xhr = new XMLHttpRequest();\n  xhr.open('GET', path_config_json);\n  xhr.onreadystatechange = function (data) {\n    if(xhr.readyState == 4){\n      if(xhr.status == 200){\n        var params = JSON.parse(data.currentTarget.response);\n        window.particlesJS(tag_id, params);\n        if(callback) callback();\n      }else{\n        console.log('Error pJS - XMLHttpRequest status: '+xhr.status);\n        console.log('Error pJS - File config not found');\n      }\n    }\n  };\n  xhr.send();\n\n};\n\n//# sourceURL=webpack://futureBooks/./node_modules/particles.js/particles.js?");

/***/ }),

/***/ "./node_modules/path-browserify/index.js":
/*!***********************************************!*\
  !*** ./node_modules/path-browserify/index.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : process.cwd();\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n  var isAbsolute = exports.isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isAbsolute).join('/');\n\n  if (!path && !isAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n  return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return exports.normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n  from = exports.resolve(from).substr(1);\n  to = exports.resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n  if (typeof path !== 'string') path = path + '';\n  if (path.length === 0) return '.';\n  var code = path.charCodeAt(0);\n  var hasRoot = code === 47 /*/*/;\n  var end = -1;\n  var matchedSlash = true;\n  for (var i = path.length - 1; i >= 1; --i) {\n    code = path.charCodeAt(i);\n    if (code === 47 /*/*/) {\n        if (!matchedSlash) {\n          end = i;\n          break;\n        }\n      } else {\n      // We saw the first non-path separator\n      matchedSlash = false;\n    }\n  }\n\n  if (end === -1) return hasRoot ? '/' : '.';\n  if (hasRoot && end === 1) {\n    // return '//';\n    // Backwards-compat fix:\n    return '/';\n  }\n  return path.slice(0, end);\n};\n\nfunction basename(path) {\n  if (typeof path !== 'string') path = path + '';\n\n  var start = 0;\n  var end = -1;\n  var matchedSlash = true;\n  var i;\n\n  for (i = path.length - 1; i >= 0; --i) {\n    if (path.charCodeAt(i) === 47 /*/*/) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          start = i + 1;\n          break;\n        }\n      } else if (end === -1) {\n      // We saw the first non-path separator, mark this as the end of our\n      // path component\n      matchedSlash = false;\n      end = i + 1;\n    }\n  }\n\n  if (end === -1) return '';\n  return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n  var f = basename(path);\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n};\n\nexports.extname = function (path) {\n  if (typeof path !== 'string') path = path + '';\n  var startDot = -1;\n  var startPart = 0;\n  var end = -1;\n  var matchedSlash = true;\n  // Track the state of characters (if any) we see before our first dot and\n  // after any path separator we find\n  var preDotState = 0;\n  for (var i = path.length - 1; i >= 0; --i) {\n    var code = path.charCodeAt(i);\n    if (code === 47 /*/*/) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n    if (end === -1) {\n      // We saw the first non-path separator, mark this as the end of our\n      // extension\n      matchedSlash = false;\n      end = i + 1;\n    }\n    if (code === 46 /*.*/) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1)\n          startDot = i;\n        else if (preDotState !== 1)\n          preDotState = 1;\n    } else if (startDot !== -1) {\n      // We saw a non-dot and non-path separator before our dot, so we should\n      // have a good chance at having a non-empty extension\n      preDotState = -1;\n    }\n  }\n\n  if (startDot === -1 || end === -1 ||\n      // We saw a non-dot character immediately before the dot\n      preDotState === 0 ||\n      // The (right-most) trimmed path component is exactly '..'\n      preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n    return '';\n  }\n  return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n    ? function (str, start, len) { return str.substr(start, len) }\n    : function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/path-browserify/index.js?");

/***/ }),

/***/ "./node_modules/picocolors/picocolors.browser.js":
/*!*******************************************************!*\
  !*** ./node_modules/picocolors/picocolors.browser.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/picocolors/picocolors.browser.js?");

/***/ }),

/***/ "./node_modules/polybooljs/index.js":
/*!******************************************!*\
  !*** ./node_modules/polybooljs/index.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc\n * @license MIT\n * @preserve Project Home: https://github.com/voidqk/polybooljs\n */\n\nvar BuildLog = __webpack_require__(/*! ./lib/build-log */ \"./node_modules/polybooljs/lib/build-log.js\");\nvar Epsilon = __webpack_require__(/*! ./lib/epsilon */ \"./node_modules/polybooljs/lib/epsilon.js\");\nvar Intersecter = __webpack_require__(/*! ./lib/intersecter */ \"./node_modules/polybooljs/lib/intersecter.js\");\nvar SegmentChainer = __webpack_require__(/*! ./lib/segment-chainer */ \"./node_modules/polybooljs/lib/segment-chainer.js\");\nvar SegmentSelector = __webpack_require__(/*! ./lib/segment-selector */ \"./node_modules/polybooljs/lib/segment-selector.js\");\nvar GeoJSON = __webpack_require__(/*! ./lib/geojson */ \"./node_modules/polybooljs/lib/geojson.js\");\n\nvar buildLog = false;\nvar epsilon = Epsilon();\n\nvar PolyBool;\nPolyBool = {\n\t// getter/setter for buildLog\n\tbuildLog: function(bl){\n\t\tif (bl === true)\n\t\t\tbuildLog = BuildLog();\n\t\telse if (bl === false)\n\t\t\tbuildLog = false;\n\t\treturn buildLog === false ? false : buildLog.list;\n\t},\n\t// getter/setter for epsilon\n\tepsilon: function(v){\n\t\treturn epsilon.epsilon(v);\n\t},\n\n\t// core API\n\tsegments: function(poly){\n\t\tvar i = Intersecter(true, epsilon, buildLog);\n\t\tpoly.regions.forEach(i.addRegion);\n\t\treturn {\n\t\t\tsegments: i.calculate(poly.inverted),\n\t\t\tinverted: poly.inverted\n\t\t};\n\t},\n\tcombine: function(segments1, segments2){\n\t\tvar i3 = Intersecter(false, epsilon, buildLog);\n\t\treturn {\n\t\t\tcombined: i3.calculate(\n\t\t\t\tsegments1.segments, segments1.inverted,\n\t\t\t\tsegments2.segments, segments2.inverted\n\t\t\t),\n\t\t\tinverted1: segments1.inverted,\n\t\t\tinverted2: segments2.inverted\n\t\t};\n\t},\n\tselectUnion: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.union(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 || combined.inverted2\n\t\t}\n\t},\n\tselectIntersect: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.intersect(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 && combined.inverted2\n\t\t}\n\t},\n\tselectDifference: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.difference(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 && !combined.inverted2\n\t\t}\n\t},\n\tselectDifferenceRev: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.differenceRev(combined.combined, buildLog),\n\t\t\tinverted: !combined.inverted1 && combined.inverted2\n\t\t}\n\t},\n\tselectXor: function(combined){\n\t\treturn {\n\t\t\tsegments: SegmentSelector.xor(combined.combined, buildLog),\n\t\t\tinverted: combined.inverted1 !== combined.inverted2\n\t\t}\n\t},\n\tpolygon: function(segments){\n\t\treturn {\n\t\t\tregions: SegmentChainer(segments.segments, epsilon, buildLog),\n\t\t\tinverted: segments.inverted\n\t\t};\n\t},\n\n\t// GeoJSON converters\n\tpolygonFromGeoJSON: function(geojson){\n\t\treturn GeoJSON.toPolygon(PolyBool, geojson);\n\t},\n\tpolygonToGeoJSON: function(poly){\n\t\treturn GeoJSON.fromPolygon(PolyBool, epsilon, poly);\n\t},\n\n\t// helper functions for common operations\n\tunion: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectUnion);\n\t},\n\tintersect: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectIntersect);\n\t},\n\tdifference: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectDifference);\n\t},\n\tdifferenceRev: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectDifferenceRev);\n\t},\n\txor: function(poly1, poly2){\n\t\treturn operate(poly1, poly2, PolyBool.selectXor);\n\t}\n};\n\nfunction operate(poly1, poly2, selector){\n\tvar seg1 = PolyBool.segments(poly1);\n\tvar seg2 = PolyBool.segments(poly2);\n\tvar comb = PolyBool.combine(seg1, seg2);\n\tvar seg3 = selector(comb);\n\treturn PolyBool.polygon(seg3);\n}\n\nif (typeof window === 'object')\n\twindow.PolyBool = PolyBool;\n\nmodule.exports = PolyBool;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/index.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/build-log.js":
/*!**************************************************!*\
  !*** ./node_modules/polybooljs/lib/build-log.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// used strictly for logging the processing of the algorithm... only useful if you intend on\n// looking under the covers (for pretty UI's or debugging)\n//\n\nfunction BuildLog(){\n\tvar my;\n\tvar nextSegmentId = 0;\n\tvar curVert = false;\n\n\tfunction push(type, data){\n\t\tmy.list.push({\n\t\t\ttype: type,\n\t\t\tdata: data ? JSON.parse(JSON.stringify(data)) : void 0\n\t\t});\n\t\treturn my;\n\t}\n\n\tmy = {\n\t\tlist: [],\n\t\tsegmentId: function(){\n\t\t\treturn nextSegmentId++;\n\t\t},\n\t\tcheckIntersection: function(seg1, seg2){\n\t\t\treturn push('check', { seg1: seg1, seg2: seg2 });\n\t\t},\n\t\tsegmentChop: function(seg, end){\n\t\t\tpush('div_seg', { seg: seg, pt: end });\n\t\t\treturn push('chop', { seg: seg, pt: end });\n\t\t},\n\t\tstatusRemove: function(seg){\n\t\t\treturn push('pop_seg', { seg: seg });\n\t\t},\n\t\tsegmentUpdate: function(seg){\n\t\t\treturn push('seg_update', { seg: seg });\n\t\t},\n\t\tsegmentNew: function(seg, primary){\n\t\t\treturn push('new_seg', { seg: seg, primary: primary });\n\t\t},\n\t\tsegmentRemove: function(seg){\n\t\t\treturn push('rem_seg', { seg: seg });\n\t\t},\n\t\ttempStatus: function(seg, above, below){\n\t\t\treturn push('temp_status', { seg: seg, above: above, below: below });\n\t\t},\n\t\trewind: function(seg){\n\t\t\treturn push('rewind', { seg: seg });\n\t\t},\n\t\tstatus: function(seg, above, below){\n\t\t\treturn push('status', { seg: seg, above: above, below: below });\n\t\t},\n\t\tvert: function(x){\n\t\t\tif (x === curVert)\n\t\t\t\treturn my;\n\t\t\tcurVert = x;\n\t\t\treturn push('vert', { x: x });\n\t\t},\n\t\tlog: function(data){\n\t\t\tif (typeof data !== 'string')\n\t\t\t\tdata = JSON.stringify(data, false, '  ');\n\t\t\treturn push('log', { txt: data });\n\t\t},\n\t\treset: function(){\n\t\t\treturn push('reset');\n\t\t},\n\t\tselected: function(segs){\n\t\t\treturn push('selected', { segs: segs });\n\t\t},\n\t\tchainStart: function(seg){\n\t\t\treturn push('chain_start', { seg: seg });\n\t\t},\n\t\tchainRemoveHead: function(index, pt){\n\t\t\treturn push('chain_rem_head', { index: index, pt: pt });\n\t\t},\n\t\tchainRemoveTail: function(index, pt){\n\t\t\treturn push('chain_rem_tail', { index: index, pt: pt });\n\t\t},\n\t\tchainNew: function(pt1, pt2){\n\t\t\treturn push('chain_new', { pt1: pt1, pt2: pt2 });\n\t\t},\n\t\tchainMatch: function(index){\n\t\t\treturn push('chain_match', { index: index });\n\t\t},\n\t\tchainClose: function(index){\n\t\t\treturn push('chain_close', { index: index });\n\t\t},\n\t\tchainAddHead: function(index, pt){\n\t\t\treturn push('chain_add_head', { index: index, pt: pt });\n\t\t},\n\t\tchainAddTail: function(index, pt){\n\t\t\treturn push('chain_add_tail', { index: index, pt: pt, });\n\t\t},\n\t\tchainConnect: function(index1, index2){\n\t\t\treturn push('chain_con', { index1: index1, index2: index2 });\n\t\t},\n\t\tchainReverse: function(index){\n\t\t\treturn push('chain_rev', { index: index });\n\t\t},\n\t\tchainJoin: function(index1, index2){\n\t\t\treturn push('chain_join', { index1: index1, index2: index2 });\n\t\t},\n\t\tdone: function(){\n\t\t\treturn push('done');\n\t\t}\n\t};\n\treturn my;\n}\n\nmodule.exports = BuildLog;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/build-log.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/epsilon.js":
/*!************************************************!*\
  !*** ./node_modules/polybooljs/lib/epsilon.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// provides the raw computation functions that takes epsilon into account\n//\n// zero is defined to be between (-epsilon, epsilon) exclusive\n//\n\nfunction Epsilon(eps){\n\tif (typeof eps !== 'number')\n\t\teps = 0.0000000001; // sane default? sure why not\n\tvar my = {\n\t\tepsilon: function(v){\n\t\t\tif (typeof v === 'number')\n\t\t\t\teps = v;\n\t\t\treturn eps;\n\t\t},\n\t\tpointAboveOrOnLine: function(pt, left, right){\n\t\t\tvar Ax = left[0];\n\t\t\tvar Ay = left[1];\n\t\t\tvar Bx = right[0];\n\t\t\tvar By = right[1];\n\t\t\tvar Cx = pt[0];\n\t\t\tvar Cy = pt[1];\n\t\t\treturn (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax) >= -eps;\n\t\t},\n\t\tpointBetween: function(p, left, right){\n\t\t\t// p must be collinear with left->right\n\t\t\t// returns false if p == left, p == right, or left == right\n\t\t\tvar d_py_ly = p[1] - left[1];\n\t\t\tvar d_rx_lx = right[0] - left[0];\n\t\t\tvar d_px_lx = p[0] - left[0];\n\t\t\tvar d_ry_ly = right[1] - left[1];\n\n\t\t\tvar dot = d_px_lx * d_rx_lx + d_py_ly * d_ry_ly;\n\t\t\t// if `dot` is 0, then `p` == `left` or `left` == `right` (reject)\n\t\t\t// if `dot` is less than 0, then `p` is to the left of `left` (reject)\n\t\t\tif (dot < eps)\n\t\t\t\treturn false;\n\n\t\t\tvar sqlen = d_rx_lx * d_rx_lx + d_ry_ly * d_ry_ly;\n\t\t\t// if `dot` > `sqlen`, then `p` is to the right of `right` (reject)\n\t\t\t// therefore, if `dot - sqlen` is greater than 0, then `p` is to the right of `right` (reject)\n\t\t\tif (dot - sqlen > -eps)\n\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t},\n\t\tpointsSameX: function(p1, p2){\n\t\t\treturn Math.abs(p1[0] - p2[0]) < eps;\n\t\t},\n\t\tpointsSameY: function(p1, p2){\n\t\t\treturn Math.abs(p1[1] - p2[1]) < eps;\n\t\t},\n\t\tpointsSame: function(p1, p2){\n\t\t\treturn my.pointsSameX(p1, p2) && my.pointsSameY(p1, p2);\n\t\t},\n\t\tpointsCompare: function(p1, p2){\n\t\t\t// returns -1 if p1 is smaller, 1 if p2 is smaller, 0 if equal\n\t\t\tif (my.pointsSameX(p1, p2))\n\t\t\t\treturn my.pointsSameY(p1, p2) ? 0 : (p1[1] < p2[1] ? -1 : 1);\n\t\t\treturn p1[0] < p2[0] ? -1 : 1;\n\t\t},\n\t\tpointsCollinear: function(pt1, pt2, pt3){\n\t\t\t// does pt1->pt2->pt3 make a straight line?\n\t\t\t// essentially this is just checking to see if the slope(pt1->pt2) === slope(pt2->pt3)\n\t\t\t// if slopes are equal, then they must be collinear, because they share pt2\n\t\t\tvar dx1 = pt1[0] - pt2[0];\n\t\t\tvar dy1 = pt1[1] - pt2[1];\n\t\t\tvar dx2 = pt2[0] - pt3[0];\n\t\t\tvar dy2 = pt2[1] - pt3[1];\n\t\t\treturn Math.abs(dx1 * dy2 - dx2 * dy1) < eps;\n\t\t},\n\t\tlinesIntersect: function(a0, a1, b0, b1){\n\t\t\t// returns false if the lines are coincident (e.g., parallel or on top of each other)\n\t\t\t//\n\t\t\t// returns an object if the lines intersect:\n\t\t\t//   {\n\t\t\t//     pt: [x, y],    where the intersection point is at\n\t\t\t//     alongA: where intersection point is along A,\n\t\t\t//     alongB: where intersection point is along B\n\t\t\t//   }\n\t\t\t//\n\t\t\t//  alongA and alongB will each be one of: -2, -1, 0, 1, 2\n\t\t\t//\n\t\t\t//  with the following meaning:\n\t\t\t//\n\t\t\t//    -2   intersection point is before segment's first point\n\t\t\t//    -1   intersection point is directly on segment's first point\n\t\t\t//     0   intersection point is between segment's first and second points (exclusive)\n\t\t\t//     1   intersection point is directly on segment's second point\n\t\t\t//     2   intersection point is after segment's second point\n\t\t\tvar adx = a1[0] - a0[0];\n\t\t\tvar ady = a1[1] - a0[1];\n\t\t\tvar bdx = b1[0] - b0[0];\n\t\t\tvar bdy = b1[1] - b0[1];\n\n\t\t\tvar axb = adx * bdy - ady * bdx;\n\t\t\tif (Math.abs(axb) < eps)\n\t\t\t\treturn false; // lines are coincident\n\n\t\t\tvar dx = a0[0] - b0[0];\n\t\t\tvar dy = a0[1] - b0[1];\n\n\t\t\tvar A = (bdx * dy - bdy * dx) / axb;\n\t\t\tvar B = (adx * dy - ady * dx) / axb;\n\n\t\t\tvar ret = {\n\t\t\t\talongA: 0,\n\t\t\t\talongB: 0,\n\t\t\t\tpt: [\n\t\t\t\t\ta0[0] + A * adx,\n\t\t\t\t\ta0[1] + A * ady\n\t\t\t\t]\n\t\t\t};\n\n\t\t\t// categorize where intersection point is along A and B\n\n\t\t\tif (A <= -eps)\n\t\t\t\tret.alongA = -2;\n\t\t\telse if (A < eps)\n\t\t\t\tret.alongA = -1;\n\t\t\telse if (A - 1 <= -eps)\n\t\t\t\tret.alongA = 0;\n\t\t\telse if (A - 1 < eps)\n\t\t\t\tret.alongA = 1;\n\t\t\telse\n\t\t\t\tret.alongA = 2;\n\n\t\t\tif (B <= -eps)\n\t\t\t\tret.alongB = -2;\n\t\t\telse if (B < eps)\n\t\t\t\tret.alongB = -1;\n\t\t\telse if (B - 1 <= -eps)\n\t\t\t\tret.alongB = 0;\n\t\t\telse if (B - 1 < eps)\n\t\t\t\tret.alongB = 1;\n\t\t\telse\n\t\t\t\tret.alongB = 2;\n\n\t\t\treturn ret;\n\t\t},\n\t\tpointInsideRegion: function(pt, region){\n\t\t\tvar x = pt[0];\n\t\t\tvar y = pt[1];\n\t\t\tvar last_x = region[region.length - 1][0];\n\t\t\tvar last_y = region[region.length - 1][1];\n\t\t\tvar inside = false;\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tvar curr_x = region[i][0];\n\t\t\t\tvar curr_y = region[i][1];\n\n\t\t\t\t// if y is between curr_y and last_y, and\n\t\t\t\t// x is to the right of the boundary created by the line\n\t\t\t\tif ((curr_y - y > eps) != (last_y - y > eps) &&\n\t\t\t\t\t(last_x - curr_x) * (y - curr_y) / (last_y - curr_y) + curr_x - x > eps)\n\t\t\t\t\tinside = !inside\n\n\t\t\t\tlast_x = curr_x;\n\t\t\t\tlast_y = curr_y;\n\t\t\t}\n\t\t\treturn inside;\n\t\t}\n\t};\n\treturn my;\n}\n\nmodule.exports = Epsilon;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/epsilon.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/geojson.js":
/*!************************************************!*\
  !*** ./node_modules/polybooljs/lib/geojson.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2017, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// convert between PolyBool polygon format and GeoJSON formats (Polygon and MultiPolygon)\n//\n\nvar GeoJSON = {\n\t// convert a GeoJSON object to a PolyBool polygon\n\ttoPolygon: function(PolyBool, geojson){\n\n\t\t// converts list of LineString's to segments\n\t\tfunction GeoPoly(coords){\n\t\t\t// check for empty coords\n\t\t\tif (coords.length <= 0)\n\t\t\t\treturn PolyBool.segments({ inverted: false, regions: [] });\n\n\t\t\t// convert LineString to segments\n\t\t\tfunction LineString(ls){\n\t\t\t\t// remove tail which should be the same as head\n\t\t\t\tvar reg = ls.slice(0, ls.length - 1);\n\t\t\t\treturn PolyBool.segments({ inverted: false, regions: [reg] });\n\t\t\t}\n\n\t\t\t// the first LineString is considered the outside\n\t\t\tvar out = LineString(coords[0]);\n\n\t\t\t// the rest of the LineStrings are considered interior holes, so subtract them from the\n\t\t\t// current result\n\t\t\tfor (var i = 1; i < coords.length; i++)\n\t\t\t\tout = PolyBool.selectDifference(PolyBool.combine(out, LineString(coords[i])));\n\n\t\t\treturn out;\n\t\t}\n\n\t\tif (geojson.type === 'Polygon'){\n\t\t\t// single polygon, so just convert it and we're done\n\t\t\treturn PolyBool.polygon(GeoPoly(geojson.coordinates));\n\t\t}\n\t\telse if (geojson.type === 'MultiPolygon'){\n\t\t\t// multiple polygons, so union all the polygons together\n\t\t\tvar out = PolyBool.segments({ inverted: false, regions: [] });\n\t\t\tfor (var i = 0; i < geojson.coordinates.length; i++)\n\t\t\t\tout = PolyBool.selectUnion(PolyBool.combine(out, GeoPoly(geojson.coordinates[i])));\n\t\t\treturn PolyBool.polygon(out);\n\t\t}\n\t\tthrow new Error('PolyBool: Cannot convert GeoJSON object to PolyBool polygon');\n\t},\n\n\t// convert a PolyBool polygon to a GeoJSON object\n\tfromPolygon: function(PolyBool, eps, poly){\n\t\t// make sure out polygon is clean\n\t\tpoly = PolyBool.polygon(PolyBool.segments(poly));\n\n\t\t// test if r1 is inside r2\n\t\tfunction regionInsideRegion(r1, r2){\n\t\t\t// we're guaranteed no lines intersect (because the polygon is clean), but a vertex\n\t\t\t// could be on the edge -- so we just average pt[0] and pt[1] to produce a point on the\n\t\t\t// edge of the first line, which cannot be on an edge\n\t\t\treturn eps.pointInsideRegion([\n\t\t\t\t(r1[0][0] + r1[1][0]) * 0.5,\n\t\t\t\t(r1[0][1] + r1[1][1]) * 0.5\n\t\t\t], r2);\n\t\t}\n\n\t\t// calculate inside heirarchy\n\t\t//\n\t\t//  _____________________   _______    roots -> A       -> F\n\t\t// |          A          | |   F   |            |          |\n\t\t// |  _______   _______  | |  ___  |            +-- B      +-- G\n\t\t// | |   B   | |   C   | | | |   | |            |   |\n\t\t// | |  ___  | |  ___  | | | |   | |            |   +-- D\n\t\t// | | | D | | | | E | | | | | G | |            |\n\t\t// | | |___| | | |___| | | | |   | |            +-- C\n\t\t// | |_______| |_______| | | |___| |                |\n\t\t// |_____________________| |_______|                +-- E\n\n\t\tfunction newNode(region){\n\t\t\treturn {\n\t\t\t\tregion: region,\n\t\t\t\tchildren: []\n\t\t\t};\n\t\t}\n\n\t\tvar roots = newNode(null);\n\n\t\tfunction addChild(root, region){\n\t\t\t// first check if we're inside any children\n\t\t\tfor (var i = 0; i < root.children.length; i++){\n\t\t\t\tvar child = root.children[i];\n\t\t\t\tif (regionInsideRegion(region, child.region)){\n\t\t\t\t\t// we are, so insert inside them instead\n\t\t\t\t\taddChild(child, region);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// not inside any children, so check to see if any children are inside us\n\t\t\tvar node = newNode(region);\n\t\t\tfor (var i = 0; i < root.children.length; i++){\n\t\t\t\tvar child = root.children[i];\n\t\t\t\tif (regionInsideRegion(child.region, region)){\n\t\t\t\t\t// oops... move the child beneath us, and remove them from root\n\t\t\t\t\tnode.children.push(child);\n\t\t\t\t\troot.children.splice(i, 1);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we can add ourselves\n\t\t\troot.children.push(node);\n\t\t}\n\n\t\t// add all regions to the root\n\t\tfor (var i = 0; i < poly.regions.length; i++){\n\t\t\tvar region = poly.regions[i];\n\t\t\tif (region.length < 3) // regions must have at least 3 points (sanity check)\n\t\t\t\tcontinue;\n\t\t\taddChild(roots, region);\n\t\t}\n\n\t\t// with our heirarchy, we can distinguish between exterior borders, and interior holes\n\t\t// the root nodes are exterior, children are interior, children's children are exterior,\n\t\t// children's children's children are interior, etc\n\n\t\t// while we're at it, exteriors are counter-clockwise, and interiors are clockwise\n\n\t\tfunction forceWinding(region, clockwise){\n\t\t\t// first, see if we're clockwise or counter-clockwise\n\t\t\t// https://en.wikipedia.org/wiki/Shoelace_formula\n\t\t\tvar winding = 0;\n\t\t\tvar last_x = region[region.length - 1][0];\n\t\t\tvar last_y = region[region.length - 1][1];\n\t\t\tvar copy = [];\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tvar curr_x = region[i][0];\n\t\t\t\tvar curr_y = region[i][1];\n\t\t\t\tcopy.push([curr_x, curr_y]); // create a copy while we're at it\n\t\t\t\twinding += curr_y * last_x - curr_x * last_y;\n\t\t\t\tlast_x = curr_x;\n\t\t\t\tlast_y = curr_y;\n\t\t\t}\n\t\t\t// this assumes Cartesian coordinates (Y is positive going up)\n\t\t\tvar isclockwise = winding < 0;\n\t\t\tif (isclockwise !== clockwise)\n\t\t\t\tcopy.reverse();\n\t\t\t// while we're here, the last point must be the first point...\n\t\t\tcopy.push([copy[0][0], copy[0][1]]);\n\t\t\treturn copy;\n\t\t}\n\n\t\tvar geopolys = [];\n\n\t\tfunction addExterior(node){\n\t\t\tvar poly = [forceWinding(node.region, false)];\n\t\t\tgeopolys.push(poly);\n\t\t\t// children of exteriors are interior\n\t\t\tfor (var i = 0; i < node.children.length; i++)\n\t\t\t\tpoly.push(getInterior(node.children[i]));\n\t\t}\n\n\t\tfunction getInterior(node){\n\t\t\t// children of interiors are exterior\n\t\t\tfor (var i = 0; i < node.children.length; i++)\n\t\t\t\taddExterior(node.children[i]);\n\t\t\t// return the clockwise interior\n\t\t\treturn forceWinding(node.region, true);\n\t\t}\n\n\t\t// root nodes are exterior\n\t\tfor (var i = 0; i < roots.children.length; i++)\n\t\t\taddExterior(roots.children[i]);\n\n\t\t// lastly, construct the approrpriate GeoJSON object\n\n\t\tif (geopolys.length <= 0) // empty GeoJSON Polygon\n\t\t\treturn { type: 'Polygon', coordinates: [] };\n\t\tif (geopolys.length == 1) // use a GeoJSON Polygon\n\t\t\treturn { type: 'Polygon', coordinates: geopolys[0] };\n\t\treturn { // otherwise, use a GeoJSON MultiPolygon\n\t\t\ttype: 'MultiPolygon',\n\t\t\tcoordinates: geopolys\n\t\t};\n\t}\n};\n\nmodule.exports = GeoJSON;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/geojson.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/intersecter.js":
/*!****************************************************!*\
  !*** ./node_modules/polybooljs/lib/intersecter.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// this is the core work-horse\n//\n\nvar LinkedList = __webpack_require__(/*! ./linked-list */ \"./node_modules/polybooljs/lib/linked-list.js\");\n\nfunction Intersecter(selfIntersection, eps, buildLog){\n\t// selfIntersection is true/false depending on the phase of the overall algorithm\n\n\t//\n\t// segment creation\n\t//\n\n\tfunction segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null  // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}\n\n\tfunction segmentCopy(start, end, seg){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: seg.myFill.above,\n\t\t\t\tbelow: seg.myFill.below\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}\n\n\t//\n\t// event logic\n\t//\n\n\tvar event_root = LinkedList.create();\n\n\tfunction eventCompare(p1_isStart, p1_1, p1_2, p2_isStart, p2_1, p2_2){\n\t\t// compare the selected points first\n\t\tvar comp = eps.pointsCompare(p1_1, p2_1);\n\t\tif (comp !== 0)\n\t\t\treturn comp;\n\t\t// the selected points are the same\n\n\t\tif (eps.pointsSame(p1_2, p2_2)) // if the non-selected points are the same too...\n\t\t\treturn 0; // then the segments are equal\n\n\t\tif (p1_isStart !== p2_isStart) // if one is a start and the other isn't...\n\t\t\treturn p1_isStart ? 1 : -1; // favor the one that isn't the start\n\n\t\t// otherwise, we'll have to calculate which one is below the other manually\n\t\treturn eps.pointAboveOrOnLine(p1_2,\n\t\t\tp2_isStart ? p2_1 : p2_2, // order matters\n\t\t\tp2_isStart ? p2_2 : p2_1\n\t\t) ? 1 : -1;\n\t}\n\n\tfunction eventAdd(ev, other_pt){\n\t\tevent_root.insertBefore(ev, function(here){\n\t\t\t// should ev be inserted before here?\n\t\t\tvar comp = eventCompare(\n\t\t\t\tev  .isStart, ev  .pt,      other_pt,\n\t\t\t\there.isStart, here.pt, here.other.pt\n\t\t\t);\n\t\t\treturn comp < 0;\n\t\t});\n\t}\n\n\tfunction eventAddSegmentStart(seg, primary){\n\t\tvar ev_start = LinkedList.node({\n\t\t\tisStart: true,\n\t\t\tpt: seg.start,\n\t\t\tseg: seg,\n\t\t\tprimary: primary,\n\t\t\tother: null,\n\t\t\tstatus: null\n\t\t});\n\t\teventAdd(ev_start, seg.end);\n\t\treturn ev_start;\n\t}\n\n\tfunction eventAddSegmentEnd(ev_start, seg, primary){\n\t\tvar ev_end = LinkedList.node({\n\t\t\tisStart: false,\n\t\t\tpt: seg.end,\n\t\t\tseg: seg,\n\t\t\tprimary: primary,\n\t\t\tother: ev_start,\n\t\t\tstatus: null\n\t\t});\n\t\tev_start.other = ev_end;\n\t\teventAdd(ev_end, ev_start.pt);\n\t}\n\n\tfunction eventAddSegment(seg, primary){\n\t\tvar ev_start = eventAddSegmentStart(seg, primary);\n\t\teventAddSegmentEnd(ev_start, seg, primary);\n\t\treturn ev_start;\n\t}\n\n\tfunction eventUpdateEnd(ev, end){\n\t\t// slides an end backwards\n\t\t//   (start)------------(end)    to:\n\t\t//   (start)---(end)\n\n\t\tif (buildLog)\n\t\t\tbuildLog.segmentChop(ev.seg, end);\n\n\t\tev.other.remove();\n\t\tev.seg.end = end;\n\t\tev.other.pt = end;\n\t\teventAdd(ev.other, ev.pt);\n\t}\n\n\tfunction eventDivide(ev, pt){\n\t\tvar ns = segmentCopy(pt, ev.seg.end, ev.seg);\n\t\teventUpdateEnd(ev, pt);\n\t\treturn eventAddSegment(ns, ev.primary);\n\t}\n\n\tfunction calculate(primaryPolyInverted, secondaryPolyInverted){\n\t\t// if selfIntersection is true then there is no secondary polygon, so that isn't used\n\n\t\t//\n\t\t// status logic\n\t\t//\n\n\t\tvar status_root = LinkedList.create();\n\n\t\tfunction statusCompare(ev1, ev2){\n\t\t\tvar a1 = ev1.seg.start;\n\t\t\tvar a2 = ev1.seg.end;\n\t\t\tvar b1 = ev2.seg.start;\n\t\t\tvar b2 = ev2.seg.end;\n\n\t\t\tif (eps.pointsCollinear(a1, b1, b2)){\n\t\t\t\tif (eps.pointsCollinear(a2, b1, b2))\n\t\t\t\t\treturn 1;//eventCompare(true, a1, a2, true, b1, b2);\n\t\t\t\treturn eps.pointAboveOrOnLine(a2, b1, b2) ? 1 : -1;\n\t\t\t}\n\t\t\treturn eps.pointAboveOrOnLine(a1, b1, b2) ? 1 : -1;\n\t\t}\n\n\t\tfunction statusFindSurrounding(ev){\n\t\t\treturn status_root.findTransition(function(here){\n\t\t\t\tvar comp = statusCompare(ev, here.ev);\n\t\t\t\treturn comp > 0;\n\t\t\t});\n\t\t}\n\n\t\tfunction checkIntersection(ev1, ev2){\n\t\t\t// returns the segment equal to ev1, or false if nothing equal\n\n\t\t\tvar seg1 = ev1.seg;\n\t\t\tvar seg2 = ev2.seg;\n\t\t\tvar a1 = seg1.start;\n\t\t\tvar a2 = seg1.end;\n\t\t\tvar b1 = seg2.start;\n\t\t\tvar b2 = seg2.end;\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.checkIntersection(seg1, seg2);\n\n\t\t\tvar i = eps.linesIntersect(a1, a2, b1, b2);\n\n\t\t\tif (i === false){\n\t\t\t\t// segments are parallel or coincident\n\n\t\t\t\t// if points aren't collinear, then the segments are parallel, so no intersections\n\t\t\t\tif (!eps.pointsCollinear(a1, a2, b1))\n\t\t\t\t\treturn false;\n\t\t\t\t// otherwise, segments are on top of each other somehow (aka coincident)\n\n\t\t\t\tif (eps.pointsSame(a1, b2) || eps.pointsSame(a2, b1))\n\t\t\t\t\treturn false; // segments touch at endpoints... no intersection\n\n\t\t\t\tvar a1_equ_b1 = eps.pointsSame(a1, b1);\n\t\t\t\tvar a2_equ_b2 = eps.pointsSame(a2, b2);\n\n\t\t\t\tif (a1_equ_b1 && a2_equ_b2)\n\t\t\t\t\treturn ev2; // segments are exactly equal\n\n\t\t\t\tvar a1_between = !a1_equ_b1 && eps.pointBetween(a1, b1, b2);\n\t\t\t\tvar a2_between = !a2_equ_b2 && eps.pointBetween(a2, b1, b2);\n\n\t\t\t\t// handy for debugging:\n\t\t\t\t// buildLog.log({\n\t\t\t\t//\ta1_equ_b1: a1_equ_b1,\n\t\t\t\t//\ta2_equ_b2: a2_equ_b2,\n\t\t\t\t//\ta1_between: a1_between,\n\t\t\t\t//\ta2_between: a2_between\n\t\t\t\t// });\n\n\t\t\t\tif (a1_equ_b1){\n\t\t\t\t\tif (a2_between){\n\t\t\t\t\t\t//  (a1)---(a2)\n\t\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//  (a1)----------(a2)\n\t\t\t\t\t\t//  (b1)---(b2)\n\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t\t}\n\t\t\t\t\treturn ev2;\n\t\t\t\t}\n\t\t\t\telse if (a1_between){\n\t\t\t\t\tif (!a2_equ_b2){\n\t\t\t\t\t\t// make a2 equal to b2\n\t\t\t\t\t\tif (a2_between){\n\t\t\t\t\t\t\t//         (a1)---(a2)\n\t\t\t\t\t\t\t//  (b1)-----------------(b2)\n\t\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//         (a1)----------(a2)\n\t\t\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//         (a1)---(a2)\n\t\t\t\t\t//  (b1)----------(b2)\n\t\t\t\t\teventDivide(ev2, a1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// otherwise, lines intersect at i.pt, which may or may not be between the endpoints\n\n\t\t\t\t// is A divided between its endpoints? (exclusive)\n\t\t\t\tif (i.alongA === 0){\n\t\t\t\t\tif (i.alongB === -1) // yes, at exactly b1\n\t\t\t\t\t\teventDivide(ev1, b1);\n\t\t\t\t\telse if (i.alongB === 0) // yes, somewhere between B's endpoints\n\t\t\t\t\t\teventDivide(ev1, i.pt);\n\t\t\t\t\telse if (i.alongB === 1) // yes, at exactly b2\n\t\t\t\t\t\teventDivide(ev1, b2);\n\t\t\t\t}\n\n\t\t\t\t// is B divided between its endpoints? (exclusive)\n\t\t\t\tif (i.alongB === 0){\n\t\t\t\t\tif (i.alongA === -1) // yes, at exactly a1\n\t\t\t\t\t\teventDivide(ev2, a1);\n\t\t\t\t\telse if (i.alongA === 0) // yes, somewhere between A's endpoints (exclusive)\n\t\t\t\t\t\teventDivide(ev2, i.pt);\n\t\t\t\t\telse if (i.alongA === 1) // yes, at exactly a2\n\t\t\t\t\t\teventDivide(ev2, a2);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t//\n\t\t// main event loop\n\t\t//\n\t\tvar segments = [];\n\t\twhile (!event_root.isEmpty()){\n\t\t\tvar ev = event_root.getHead();\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.vert(ev.pt[0]);\n\n\t\t\tif (ev.isStart){\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.segmentNew(ev.seg, ev.primary);\n\n\t\t\t\tvar surrounding = statusFindSurrounding(ev);\n\t\t\t\tvar above = surrounding.before ? surrounding.before.ev : null;\n\t\t\t\tvar below = surrounding.after ? surrounding.after.ev : null;\n\n\t\t\t\tif (buildLog){\n\t\t\t\t\tbuildLog.tempStatus(\n\t\t\t\t\t\tev.seg,\n\t\t\t\t\t\tabove ? above.seg : false,\n\t\t\t\t\t\tbelow ? below.seg : false\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfunction checkBothIntersections(){\n\t\t\t\t\tif (above){\n\t\t\t\t\t\tvar eve = checkIntersection(ev, above);\n\t\t\t\t\t\tif (eve)\n\t\t\t\t\t\t\treturn eve;\n\t\t\t\t\t}\n\t\t\t\t\tif (below)\n\t\t\t\t\t\treturn checkIntersection(ev, below);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar eve = checkBothIntersections();\n\t\t\t\tif (eve){\n\t\t\t\t\t// ev and eve are equal\n\t\t\t\t\t// we'll keep eve and throw away ev\n\n\t\t\t\t\t// merge ev.seg's fill information into eve.seg\n\n\t\t\t\t\tif (selfIntersection){\n\t\t\t\t\t\tvar toggle; // are we a toggling edge?\n\t\t\t\t\t\tif (ev.seg.myFill.below === null)\n\t\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttoggle = ev.seg.myFill.above !== ev.seg.myFill.below;\n\n\t\t\t\t\t\t// merge two segments that belong to the same polygon\n\t\t\t\t\t\t// think of this as sandwiching two segments together, where `eve.seg` is\n\t\t\t\t\t\t// the bottom -- this will cause the above fill flag to toggle\n\t\t\t\t\t\tif (toggle)\n\t\t\t\t\t\t\teve.seg.myFill.above = !eve.seg.myFill.above;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// merge two segments that belong to different polygons\n\t\t\t\t\t\t// each segment has distinct knowledge, so no special logic is needed\n\t\t\t\t\t\t// note that this can only happen once per segment in this phase, because we\n\t\t\t\t\t\t// are guaranteed that all self-intersections are gone\n\t\t\t\t\t\teve.seg.otherFill = ev.seg.myFill;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.segmentUpdate(eve.seg);\n\n\t\t\t\t\tev.other.remove();\n\t\t\t\t\tev.remove();\n\t\t\t\t}\n\n\t\t\t\tif (event_root.getHead() !== ev){\n\t\t\t\t\t// something was inserted before us in the event queue, so loop back around and\n\t\t\t\t\t// process it before continuing\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.rewind(ev.seg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// calculate fill flags\n\t\t\t\t//\n\t\t\t\tif (selfIntersection){\n\t\t\t\t\tvar toggle; // are we a toggling edge?\n\t\t\t\t\tif (ev.seg.myFill.below === null) // if we are a new segment...\n\t\t\t\t\t\ttoggle = true; // then we toggle\n\t\t\t\t\telse // we are a segment that has previous knowledge from a division\n\t\t\t\t\t\ttoggle = ev.seg.myFill.above !== ev.seg.myFill.below; // calculate toggle\n\n\t\t\t\t\t// next, calculate whether we are filled below us\n\t\t\t\t\tif (!below){ // if nothing is below us...\n\t\t\t\t\t\t// we are filled below us if the polygon is inverted\n\t\t\t\t\t\tev.seg.myFill.below = primaryPolyInverted;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// otherwise, we know the answer -- it's the same if whatever is below\n\t\t\t\t\t\t// us is filled above it\n\t\t\t\t\t\tev.seg.myFill.below = below.seg.myFill.above;\n\t\t\t\t\t}\n\n\t\t\t\t\t// since now we know if we're filled below us, we can calculate whether\n\t\t\t\t\t// we're filled above us by applying toggle to whatever is below us\n\t\t\t\t\tif (toggle)\n\t\t\t\t\t\tev.seg.myFill.above = !ev.seg.myFill.below;\n\t\t\t\t\telse\n\t\t\t\t\t\tev.seg.myFill.above = ev.seg.myFill.below;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// now we fill in any missing transition information, since we are all-knowing\n\t\t\t\t\t// at this point\n\n\t\t\t\t\tif (ev.seg.otherFill === null){\n\t\t\t\t\t\t// if we don't have other information, then we need to figure out if we're\n\t\t\t\t\t\t// inside the other polygon\n\t\t\t\t\t\tvar inside;\n\t\t\t\t\t\tif (!below){\n\t\t\t\t\t\t\t// if nothing is below us, then we're inside if the other polygon is\n\t\t\t\t\t\t\t// inverted\n\t\t\t\t\t\t\tinside =\n\t\t\t\t\t\t\t\tev.primary ? secondaryPolyInverted : primaryPolyInverted;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ // otherwise, something is below us\n\t\t\t\t\t\t\t// so copy the below segment's other polygon's above\n\t\t\t\t\t\t\tif (ev.primary === below.primary)\n\t\t\t\t\t\t\t\tinside = below.seg.otherFill.above;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinside = below.seg.myFill.above;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tev.seg.otherFill = {\n\t\t\t\t\t\t\tabove: inside,\n\t\t\t\t\t\t\tbelow: inside\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (buildLog){\n\t\t\t\t\tbuildLog.status(\n\t\t\t\t\t\tev.seg,\n\t\t\t\t\t\tabove ? above.seg : false,\n\t\t\t\t\t\tbelow ? below.seg : false\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// insert the status and remember it for later removal\n\t\t\t\tev.other.status = surrounding.insert(LinkedList.node({ ev: ev }));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar st = ev.status;\n\n\t\t\t\tif (st === null){\n\t\t\t\t\tthrow new Error('PolyBool: Zero-length segment detected; your epsilon is ' +\n\t\t\t\t\t\t'probably too small or too large');\n\t\t\t\t}\n\n\t\t\t\t// removing the status will create two new adjacent edges, so we'll need to check\n\t\t\t\t// for those\n\t\t\t\tif (status_root.exists(st.prev) && status_root.exists(st.next))\n\t\t\t\t\tcheckIntersection(st.prev.ev, st.next.ev);\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.statusRemove(st.ev.seg);\n\n\t\t\t\t// remove the status\n\t\t\t\tst.remove();\n\n\t\t\t\t// if we've reached this point, we've calculated everything there is to know, so\n\t\t\t\t// save the segment for reporting\n\t\t\t\tif (!ev.primary){\n\t\t\t\t\t// make sure `seg.myFill` actually points to the primary polygon though\n\t\t\t\t\tvar s = ev.seg.myFill;\n\t\t\t\t\tev.seg.myFill = ev.seg.otherFill;\n\t\t\t\t\tev.seg.otherFill = s;\n\t\t\t\t}\n\t\t\t\tsegments.push(ev.seg);\n\t\t\t}\n\n\t\t\t// remove the event and continue\n\t\t\tevent_root.getHead().remove();\n\t\t}\n\n\t\tif (buildLog)\n\t\t\tbuildLog.done();\n\n\t\treturn segments;\n\t}\n\n\t// return the appropriate API depending on what we're doing\n\tif (!selfIntersection){\n\t\t// performing combination of polygons, so only deal with already-processed segments\n\t\treturn {\n\t\t\tcalculate: function(segments1, inverted1, segments2, inverted2){\n\t\t\t\t// segmentsX come from the self-intersection API, or this API\n\t\t\t\t// invertedX is whether we treat that list of segments as an inverted polygon or not\n\t\t\t\t// returns segments that can be used for further operations\n\t\t\t\tsegments1.forEach(function(seg){\n\t\t\t\t\teventAddSegment(segmentCopy(seg.start, seg.end, seg), true);\n\t\t\t\t});\n\t\t\t\tsegments2.forEach(function(seg){\n\t\t\t\t\teventAddSegment(segmentCopy(seg.start, seg.end, seg), false);\n\t\t\t\t});\n\t\t\t\treturn calculate(inverted1, inverted2);\n\t\t\t}\n\t\t};\n\t}\n\n\t// otherwise, performing self-intersection, so deal with regions\n\treturn {\n\t\taddRegion: function(region){\n\t\t\t// regions are a list of points:\n\t\t\t//  [ [0, 0], [100, 0], [50, 100] ]\n\t\t\t// you can add multiple regions before running calculate\n\t\t\tvar pt1;\n\t\t\tvar pt2 = region[region.length - 1];\n\t\t\tfor (var i = 0; i < region.length; i++){\n\t\t\t\tpt1 = pt2;\n\t\t\t\tpt2 = region[i];\n\n\t\t\t\tvar forward = eps.pointsCompare(pt1, pt2);\n\t\t\t\tif (forward === 0) // points are equal, so we have a zero-length segment\n\t\t\t\t\tcontinue; // just skip it\n\n\t\t\t\teventAddSegment(\n\t\t\t\t\tsegmentNew(\n\t\t\t\t\t\tforward < 0 ? pt1 : pt2,\n\t\t\t\t\t\tforward < 0 ? pt2 : pt1\n\t\t\t\t\t),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tcalculate: function(inverted){\n\t\t\t// is the polygon inverted?\n\t\t\t// returns segments\n\t\t\treturn calculate(inverted, false);\n\t\t}\n\t};\n}\n\nmodule.exports = Intersecter;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/intersecter.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/linked-list.js":
/*!****************************************************!*\
  !*** ./node_modules/polybooljs/lib/linked-list.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// simple linked list implementation that allows you to traverse down nodes and save positions\n//\n\nvar LinkedList = {\n\tcreate: function(){\n\t\tvar my = {\n\t\t\troot: { root: true, next: null },\n\t\t\texists: function(node){\n\t\t\t\tif (node === null || node === my.root)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tisEmpty: function(){\n\t\t\t\treturn my.root.next === null;\n\t\t\t},\n\t\t\tgetHead: function(){\n\t\t\t\treturn my.root.next;\n\t\t\t},\n\t\t\tinsertBefore: function(node, check){\n\t\t\t\tvar last = my.root;\n\t\t\t\tvar here = my.root.next;\n\t\t\t\twhile (here !== null){\n\t\t\t\t\tif (check(here)){\n\t\t\t\t\t\tnode.prev = here.prev;\n\t\t\t\t\t\tnode.next = here;\n\t\t\t\t\t\there.prev.next = node;\n\t\t\t\t\t\there.prev = node;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlast = here;\n\t\t\t\t\there = here.next;\n\t\t\t\t}\n\t\t\t\tlast.next = node;\n\t\t\t\tnode.prev = last;\n\t\t\t\tnode.next = null;\n\t\t\t},\n\t\t\tfindTransition: function(check){\n\t\t\t\tvar prev = my.root;\n\t\t\t\tvar here = my.root.next;\n\t\t\t\twhile (here !== null){\n\t\t\t\t\tif (check(here))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tprev = here;\n\t\t\t\t\there = here.next;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tbefore: prev === my.root ? null : prev,\n\t\t\t\t\tafter: here,\n\t\t\t\t\tinsert: function(node){\n\t\t\t\t\t\tnode.prev = prev;\n\t\t\t\t\t\tnode.next = here;\n\t\t\t\t\t\tprev.next = node;\n\t\t\t\t\t\tif (here !== null)\n\t\t\t\t\t\t\there.prev = node;\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\treturn my;\n\t},\n\tnode: function(data){\n\t\tdata.prev = null;\n\t\tdata.next = null;\n\t\tdata.remove = function(){\n\t\t\tdata.prev.next = data.next;\n\t\t\tif (data.next)\n\t\t\t\tdata.next.prev = data.prev;\n\t\t\tdata.prev = null;\n\t\t\tdata.next = null;\n\t\t};\n\t\treturn data;\n\t}\n};\n\nmodule.exports = LinkedList;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/linked-list.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/segment-chainer.js":
/*!********************************************************!*\
  !*** ./node_modules/polybooljs/lib/segment-chainer.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// converts a list of segments into a list of regions, while also removing unnecessary verticies\n//\n\nfunction SegmentChainer(segments, eps, buildLog){\n\tvar chains = [];\n\tvar regions = [];\n\n\tsegments.forEach(function(seg){\n\t\tvar pt1 = seg.start;\n\t\tvar pt2 = seg.end;\n\t\tif (eps.pointsSame(pt1, pt2)){\n\t\t\tconsole.warn('PolyBool: Warning: Zero-length segment detected; your epsilon is ' +\n\t\t\t\t'probably too small or too large');\n\t\t\treturn;\n\t\t}\n\n\t\tif (buildLog)\n\t\t\tbuildLog.chainStart(seg);\n\n\t\t// search for two chains that this segment matches\n\t\tvar first_match = {\n\t\t\tindex: 0,\n\t\t\tmatches_head: false,\n\t\t\tmatches_pt1: false\n\t\t};\n\t\tvar second_match = {\n\t\t\tindex: 0,\n\t\t\tmatches_head: false,\n\t\t\tmatches_pt1: false\n\t\t};\n\t\tvar next_match = first_match;\n\t\tfunction setMatch(index, matches_head, matches_pt1){\n\t\t\t// return true if we've matched twice\n\t\t\tnext_match.index = index;\n\t\t\tnext_match.matches_head = matches_head;\n\t\t\tnext_match.matches_pt1 = matches_pt1;\n\t\t\tif (next_match === first_match){\n\t\t\t\tnext_match = second_match;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tnext_match = null;\n\t\t\treturn true; // we've matched twice, we're done here\n\t\t}\n\t\tfor (var i = 0; i < chains.length; i++){\n\t\t\tvar chain = chains[i];\n\t\t\tvar head  = chain[0];\n\t\t\tvar head2 = chain[1];\n\t\t\tvar tail  = chain[chain.length - 1];\n\t\t\tvar tail2 = chain[chain.length - 2];\n\t\t\tif (eps.pointsSame(head, pt1)){\n\t\t\t\tif (setMatch(i, true, true))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(head, pt2)){\n\t\t\t\tif (setMatch(i, true, false))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(tail, pt1)){\n\t\t\t\tif (setMatch(i, false, true))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (eps.pointsSame(tail, pt2)){\n\t\t\t\tif (setMatch(i, false, false))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (next_match === first_match){\n\t\t\t// we didn't match anything, so create a new chain\n\t\t\tchains.push([ pt1, pt2 ]);\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainNew(pt1, pt2);\n\t\t\treturn;\n\t\t}\n\n\t\tif (next_match === second_match){\n\t\t\t// we matched a single chain\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainMatch(first_match.index);\n\n\t\t\t// add the other point to the apporpriate end, and check to see if we've closed the\n\t\t\t// chain into a loop\n\n\t\t\tvar index = first_match.index;\n\t\t\tvar pt = first_match.matches_pt1 ? pt2 : pt1; // if we matched pt1, then we add pt2, etc\n\t\t\tvar addToHead = first_match.matches_head; // if we matched at head, then add to the head\n\n\t\t\tvar chain = chains[index];\n\t\t\tvar grow  = addToHead ? chain[0] : chain[chain.length - 1];\n\t\t\tvar grow2 = addToHead ? chain[1] : chain[chain.length - 2];\n\t\t\tvar oppo  = addToHead ? chain[chain.length - 1] : chain[0];\n\t\t\tvar oppo2 = addToHead ? chain[chain.length - 2] : chain[1];\n\n\t\t\tif (eps.pointsCollinear(grow2, grow, pt)){\n\t\t\t\t// grow isn't needed because it's directly between grow2 and pt:\n\t\t\t\t// grow2 ---grow---> pt\n\t\t\t\tif (addToHead){\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.chainRemoveHead(first_match.index, pt);\n\t\t\t\t\tchain.shift();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\tbuildLog.chainRemoveTail(first_match.index, pt);\n\t\t\t\t\tchain.pop();\n\t\t\t\t}\n\t\t\t\tgrow = grow2; // old grow is gone... new grow is what grow2 was\n\t\t\t}\n\n\t\t\tif (eps.pointsSame(oppo, pt)){\n\t\t\t\t// we're closing the loop, so remove chain from chains\n\t\t\t\tchains.splice(index, 1);\n\n\t\t\t\tif (eps.pointsCollinear(oppo2, oppo, grow)){\n\t\t\t\t\t// oppo isn't needed because it's directly between oppo2 and grow:\n\t\t\t\t\t// oppo2 ---oppo--->grow\n\t\t\t\t\tif (addToHead){\n\t\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\t\tbuildLog.chainRemoveTail(first_match.index, grow);\n\t\t\t\t\t\tchain.pop();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (buildLog)\n\t\t\t\t\t\t\tbuildLog.chainRemoveHead(first_match.index, grow);\n\t\t\t\t\t\tchain.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainClose(first_match.index);\n\n\t\t\t\t// we have a closed chain!\n\t\t\t\tregions.push(chain);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// not closing a loop, so just add it to the apporpriate side\n\t\t\tif (addToHead){\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainAddHead(first_match.index, pt);\n\t\t\t\tchain.unshift(pt);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainAddTail(first_match.index, pt);\n\t\t\t\tchain.push(pt);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// otherwise, we matched two chains, so we need to combine those chains together\n\n\t\tfunction reverseChain(index){\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainReverse(index);\n\t\t\tchains[index].reverse(); // gee, that's easy\n\t\t}\n\n\t\tfunction appendChain(index1, index2){\n\t\t\t// index1 gets index2 appended to it, and index2 is removed\n\t\t\tvar chain1 = chains[index1];\n\t\t\tvar chain2 = chains[index2];\n\t\t\tvar tail  = chain1[chain1.length - 1];\n\t\t\tvar tail2 = chain1[chain1.length - 2];\n\t\t\tvar head  = chain2[0];\n\t\t\tvar head2 = chain2[1];\n\n\t\t\tif (eps.pointsCollinear(tail2, tail, head)){\n\t\t\t\t// tail isn't needed because it's directly between tail2 and head\n\t\t\t\t// tail2 ---tail---> head\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainRemoveTail(index1, tail);\n\t\t\t\tchain1.pop();\n\t\t\t\ttail = tail2; // old tail is gone... new tail is what tail2 was\n\t\t\t}\n\n\t\t\tif (eps.pointsCollinear(tail, head, head2)){\n\t\t\t\t// head isn't needed because it's directly between tail and head2\n\t\t\t\t// tail ---head---> head2\n\t\t\t\tif (buildLog)\n\t\t\t\t\tbuildLog.chainRemoveHead(index2, head);\n\t\t\t\tchain2.shift();\n\t\t\t}\n\n\t\t\tif (buildLog)\n\t\t\t\tbuildLog.chainJoin(index1, index2);\n\t\t\tchains[index1] = chain1.concat(chain2);\n\t\t\tchains.splice(index2, 1);\n\t\t}\n\n\t\tvar F = first_match.index;\n\t\tvar S = second_match.index;\n\n\t\tif (buildLog)\n\t\t\tbuildLog.chainConnect(F, S);\n\n\t\tvar reverseF = chains[F].length < chains[S].length; // reverse the shorter chain, if needed\n\t\tif (first_match.matches_head){\n\t\t\tif (second_match.matches_head){\n\t\t\t\tif (reverseF){\n\t\t\t\t\t// <<<< F <<<< --- >>>> S >>>>\n\t\t\t\t\treverseChain(F);\n\t\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\t\tappendChain(F, S);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// <<<< F <<<< --- >>>> S >>>>\n\t\t\t\t\treverseChain(S);\n\t\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\t\tappendChain(S, F);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\tappendChain(S, F);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (second_match.matches_head){\n\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\tappendChain(F, S);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (reverseF){\n\t\t\t\t\t// >>>> F >>>> --- <<<< S <<<<\n\t\t\t\t\treverseChain(F);\n\t\t\t\t\t// <<<< F <<<< --- <<<< S <<<<   logically same as:\n\t\t\t\t\t// >>>> S >>>> --- >>>> F >>>>\n\t\t\t\t\tappendChain(S, F);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// >>>> F >>>> --- <<<< S <<<<\n\t\t\t\t\treverseChain(S);\n\t\t\t\t\t// >>>> F >>>> --- >>>> S >>>>\n\t\t\t\t\tappendChain(F, S);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn regions;\n}\n\nmodule.exports = SegmentChainer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/segment-chainer.js?");

/***/ }),

/***/ "./node_modules/polybooljs/lib/segment-selector.js":
/*!*********************************************************!*\
  !*** ./node_modules/polybooljs/lib/segment-selector.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// (c) Copyright 2016, Sean Connelly (@voidqk), http://syntheti.cc\n// MIT License\n// Project Home: https://github.com/voidqk/polybooljs\n\n//\n// filter a list of segments based on boolean operations\n//\n\nfunction select(segments, selection, buildLog){\n\tvar result = [];\n\tsegments.forEach(function(seg){\n\t\tvar index =\n\t\t\t(seg.myFill.above ? 8 : 0) +\n\t\t\t(seg.myFill.below ? 4 : 0) +\n\t\t\t((seg.otherFill && seg.otherFill.above) ? 2 : 0) +\n\t\t\t((seg.otherFill && seg.otherFill.below) ? 1 : 0);\n\t\tif (selection[index] !== 0){\n\t\t\t// copy the segment to the results, while also calculating the fill status\n\t\t\tresult.push({\n\t\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\t\tstart: seg.start,\n\t\t\t\tend: seg.end,\n\t\t\t\tmyFill: {\n\t\t\t\t\tabove: selection[index] === 1, // 1 if filled above\n\t\t\t\t\tbelow: selection[index] === 2  // 2 if filled below\n\t\t\t\t},\n\t\t\t\totherFill: null\n\t\t\t});\n\t\t}\n\t});\n\n\tif (buildLog)\n\t\tbuildLog.selected(result);\n\n\treturn result;\n}\n\nvar SegmentSelector = {\n\tunion: function(segments, buildLog){ // primary | secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   yes filled below    2\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   no                  0\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   yes filled above    1\n\t\t//    1      0      1      1   =>   no                  0\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   no                  0\n\t\t//    1      1      1      0   =>   no                  0\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t2, 2, 0, 0,\n\t\t\t1, 0, 1, 0,\n\t\t\t0, 0, 0, 0\n\t\t], buildLog);\n\t},\n\tintersect: function(segments, buildLog){ // primary & secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   no                  0\n\t\t//    0      0      1      0   =>   no                  0\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   no                  0\n\t\t//    0      1      0      1   =>   yes filled below    2\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   yes filled below    2\n\t\t//    1      0      0      0   =>   no                  0\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   yes filled above    1\n\t\t//    1      0      1      1   =>   yes filled above    1\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled below    2\n\t\t//    1      1      1      0   =>   yes filled above    1\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 0, 0, 0,\n\t\t\t0, 2, 0, 2,\n\t\t\t0, 0, 1, 1,\n\t\t\t0, 2, 1, 0\n\t\t], buildLog);\n\t},\n\tdifference: function(segments, buildLog){ // primary - secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   no                  0\n\t\t//    0      0      1      0   =>   no                  0\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   yes filled below    2\n\t\t//    0      1      1      1   =>   no                  0\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   yes filled above    1\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   no                  0\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled above    1\n\t\t//    1      1      1      0   =>   yes filled below    2\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 0, 0, 0,\n\t\t\t2, 0, 2, 0,\n\t\t\t1, 1, 0, 0,\n\t\t\t0, 1, 2, 0\n\t\t], buildLog);\n\t},\n\tdifferenceRev: function(segments, buildLog){ // secondary - primary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   no                  0\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   yes filled above    1\n\t\t//    0      1      1      1   =>   yes filled above    1\n\t\t//    1      0      0      0   =>   no                  0\n\t\t//    1      0      0      1   =>   yes filled below    2\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   yes filled below    2\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   no                  0\n\t\t//    1      1      1      0   =>   no                  0\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t0, 0, 1, 1,\n\t\t\t0, 2, 0, 2,\n\t\t\t0, 0, 0, 0\n\t\t], buildLog);\n\t},\n\txor: function(segments, buildLog){ // primary ^ secondary\n\t\t// above1 below1 above2 below2    Keep?               Value\n\t\t//    0      0      0      0   =>   no                  0\n\t\t//    0      0      0      1   =>   yes filled below    2\n\t\t//    0      0      1      0   =>   yes filled above    1\n\t\t//    0      0      1      1   =>   no                  0\n\t\t//    0      1      0      0   =>   yes filled below    2\n\t\t//    0      1      0      1   =>   no                  0\n\t\t//    0      1      1      0   =>   no                  0\n\t\t//    0      1      1      1   =>   yes filled above    1\n\t\t//    1      0      0      0   =>   yes filled above    1\n\t\t//    1      0      0      1   =>   no                  0\n\t\t//    1      0      1      0   =>   no                  0\n\t\t//    1      0      1      1   =>   yes filled below    2\n\t\t//    1      1      0      0   =>   no                  0\n\t\t//    1      1      0      1   =>   yes filled above    1\n\t\t//    1      1      1      0   =>   yes filled below    2\n\t\t//    1      1      1      1   =>   no                  0\n\t\treturn select(segments, [\n\t\t\t0, 2, 1, 0,\n\t\t\t2, 0, 0, 1,\n\t\t\t1, 0, 0, 2,\n\t\t\t0, 1, 2, 0\n\t\t], buildLog);\n\t}\n};\n\nmodule.exports = SegmentSelector;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/polybooljs/lib/segment-selector.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/ValuesParser.js":
/*!****************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/ValuesParser.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst Parser = __webpack_require__(/*! postcss/lib/parser */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/parser.js\");\n\nconst AtWord = __webpack_require__(/*! ./nodes/AtWord */ \"./node_modules/postcss-values-parser/lib/nodes/AtWord.js\");\nconst Comment = __webpack_require__(/*! ./nodes/Comment */ \"./node_modules/postcss-values-parser/lib/nodes/Comment.js\");\nconst Func = __webpack_require__(/*! ./nodes/Func */ \"./node_modules/postcss-values-parser/lib/nodes/Func.js\");\nconst Interpolation = __webpack_require__(/*! ./nodes/Interpolation */ \"./node_modules/postcss-values-parser/lib/nodes/Interpolation.js\");\nconst Numeric = __webpack_require__(/*! ./nodes/Numeric */ \"./node_modules/postcss-values-parser/lib/nodes/Numeric.js\");\nconst Operator = __webpack_require__(/*! ./nodes/Operator */ \"./node_modules/postcss-values-parser/lib/nodes/Operator.js\");\nconst Punctuation = __webpack_require__(/*! ./nodes/Punctuation */ \"./node_modules/postcss-values-parser/lib/nodes/Punctuation.js\");\nconst Quoted = __webpack_require__(/*! ./nodes/Quoted */ \"./node_modules/postcss-values-parser/lib/nodes/Quoted.js\");\nconst UnicodeRange = __webpack_require__(/*! ./nodes/UnicodeRange */ \"./node_modules/postcss-values-parser/lib/nodes/UnicodeRange.js\");\nconst Word = __webpack_require__(/*! ./nodes/Word */ \"./node_modules/postcss-values-parser/lib/nodes/Word.js\");\n\nconst defaults = {\n  ignoreUnknownWords: false,\n  // interpolation: { prefix: '@' }\n  interpolation: false,\n  parentNode: null,\n  variables: {\n    prefixes: ['--']\n  }\n};\n\nmodule.exports = class ValuesParser extends Parser {\n  constructor(input, opts = {}) {\n    super(input);\n\n    this.lastNode = null;\n    this.options = Object.assign({}, defaults, opts);\n    this.parentNode = this.options.parentNode;\n  }\n\n  back(tokens) {\n    for (const token of tokens.reverse()) {\n      this.tokenizer.back(token);\n    }\n  }\n\n  comment(token) {\n    super.comment(token);\n\n    const inline = Comment.testInline(token);\n    const node = this.lastNode;\n    node.inline = inline;\n    Object.setPrototypeOf(node, Comment.prototype);\n  }\n\n  fromFirst(tokens, Constructor) {\n    const [first] = tokens;\n    const [, value, startLine, startChar] = first;\n    const node = new Constructor({ value });\n\n    this.init(node, startLine, startChar);\n    this.current = node;\n    this.end(first);\n    this.back(tokens.slice(1));\n  }\n\n  init(node, line, column) {\n    super.init(node, line, column);\n\n    // base methods like comment() don't set this.current, so we need some way of tracking the last\n    // node for manipulation\n    this.lastNode = node;\n  }\n\n  other(start) {\n    // console.log('other', start);\n\n    const brackets = [];\n    const tokens = [];\n    let token = start;\n    let type = null;\n    let bracket = null;\n\n    while (token) {\n      [type] = token;\n      tokens.push(token);\n\n      if (type === '(' || type === '[') {\n        if (!bracket) {\n          bracket = token;\n        }\n\n        brackets.push(type === '(' ? ')' : ']');\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop();\n        if (brackets.length === 0) {\n          bracket = null;\n        }\n      }\n\n      token = this.tokenizer.nextToken();\n    }\n\n    if (brackets.length > 0) {\n      this.unclosedBracket(bracket);\n    }\n\n    this.unknownWord(tokens);\n  }\n\n  // overriden to remove certain node types we don't need\n  parse() {\n    let token;\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken();\n\n      switch (token[0]) {\n        case 'space':\n          this.spaces += token[1];\n          break;\n\n        case 'comment':\n          this.comment(token);\n          break;\n\n        case 'at-word':\n          this.atrule(token);\n          Object.setPrototypeOf(this.lastNode, AtWord.prototype);\n          this.lastNode.type = 'atword';\n          break;\n\n        default:\n          this.other(token);\n          break;\n      }\n    }\n    this.endFile();\n  }\n\n  unknownWord(tokens) {\n    // NOTE: keep commented for examining unknown structures\n    // console.log('unknown', tokens);\n\n    const [first] = tokens;\n    const [type, value] = first;\n\n    if (Punctuation.chars.includes(type)) {\n      Punctuation.fromTokens(tokens, this);\n    } else if (Func.test(tokens)) {\n      Func.fromTokens(tokens, this);\n    } else if (this.options.interpolation && Interpolation.test(tokens, this)) {\n      Interpolation.fromTokens(tokens, this);\n    } else if (type === 'brackets') {\n      Punctuation.tokenizeBrackets(tokens, this);\n    } else if (type === 'comma') {\n      Punctuation.fromTokens(tokens, this);\n    } else if (type === 'operator') {\n      Operator.fromTokens(tokens, this);\n    } else if (type === 'string') {\n      Quoted.fromTokens(tokens, this);\n    } else if (type === 'word') {\n      if (value === ',') {\n        Punctuation.fromTokens(tokens, this);\n      } else if (value === '//') {\n        Comment.tokenizeNext(tokens, this);\n      } else if (Comment.testInline(first)) {\n        // catch protocol-relative urls in a url() function\n        // https://github.com/shellscape/postcss-values-parser/issues/65\n        const { parentNode } = this;\n        if (parentNode && parentNode.type === 'func' && parentNode.name === 'url') {\n          Word.fromTokens(tokens, this);\n        } else {\n          Comment.tokenizeInline(tokens, this);\n        }\n      } else if (value.includes(',')) {\n        Punctuation.tokenizeCommas(tokens, this);\n      } else if (Word.testWord(tokens, this)) {\n        // we need to catch variables before the numeric and operator tests\n        Word.fromTokens(tokens, this);\n      } else if (Numeric.test(value)) {\n        Numeric.fromTokens(tokens, this);\n      } else if (UnicodeRange.test(value)) {\n        UnicodeRange.fromTokens(tokens, this);\n      } else if (Operator.chars.includes(value)) {\n        Operator.fromTokens(tokens, this);\n      } else if (/^[\\w-]+$/.test(value)) {\n        Word.fromTokens(tokens, this);\n      } else if (Operator.regex.test(value)) {\n        Operator.tokenize(tokens, this);\n      } else if (this.options.ignoreUnknownWords) {\n        Word.fromTokens(tokens, this);\n      } else {\n        super.unknownWord(tokens);\n      }\n    } else {\n      /* istanbul ignore next */\n      super.unknownWord(tokens);\n    }\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/ValuesParser.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/ValuesStringifier.js":
/*!*********************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/ValuesStringifier.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Stringifier = __webpack_require__(/*! postcss/lib/stringifier */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js\");\n\nmodule.exports = class ValuesStringifier extends Stringifier {\n  static stringify(node, builder) {\n    const stringifier = new ValuesStringifier(builder);\n    stringifier.stringify(node);\n  }\n\n  basic(node, value) {\n    const print = value || node.value;\n    const after = node.raws.after ? this.raw(node, 'after') || '' : '';\n    // NOTE: before is handled by postcss in stringifier.body\n\n    this.builder(print, node, 'start');\n    this.builder(after, node, 'end');\n  }\n\n  atword(...args) {\n    this.atrule(...args);\n  }\n\n  comment(node) {\n    if (node.inline) {\n      const left = this.raw(node, 'left', 'commentLeft');\n      const right = this.raw(node, 'right', 'commentRight');\n      this.builder(`//${left}${node.text}${right}`, node);\n    } else {\n      super.comment(node);\n    }\n  }\n\n  func(node) {\n    const after = this.raw(node, 'after') || '';\n\n    this.builder(`${node.name}(`, node, 'start');\n\n    for (const child of node.nodes) {\n      // since we're duplicating this.body here, we have to handle `before`\n      // but we don't want the postcss default \\n value, so check it's non-empty first\n      const before = child.raws.before ? this.raw(child, 'before') : '';\n      if (before) {\n        this.builder(before);\n      }\n      this.stringify(child);\n    }\n\n    this.builder(`)${after}`, node, 'end');\n  }\n\n  interpolation(node) {\n    this.basic(node, node.prefix + node.params);\n  }\n\n  numeric(node) {\n    const print = node.value + node.unit;\n    this.basic(node, print);\n  }\n\n  operator(node) {\n    this.basic(node);\n  }\n\n  punctuation(node) {\n    this.basic(node);\n  }\n\n  quoted(node) {\n    this.basic(node);\n  }\n\n  unicodeRange(node) {\n    this.basic(node);\n  }\n\n  word(node) {\n    this.basic(node);\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/ValuesStringifier.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/index.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst Input = __webpack_require__(/*! postcss/lib/input */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js\");\n\nconst Parser = __webpack_require__(/*! ./ValuesParser */ \"./node_modules/postcss-values-parser/lib/ValuesParser.js\");\nconst { stringify } = __webpack_require__(/*! ./ValuesStringifier */ \"./node_modules/postcss-values-parser/lib/ValuesStringifier.js\");\n\nmodule.exports = {\n  parse(css, options) {\n    const input = new Input(css, options);\n    const parser = new Parser(input, options);\n\n    parser.parse();\n\n    const { root } = parser;\n    const ogToString = root.toString;\n\n    function toString(stringifier) {\n      return ogToString.bind(root)(stringifier || module.exports.stringify);\n    }\n\n    root.toString = toString.bind(root);\n\n    return parser.root;\n  },\n\n  stringify,\n\n  nodeToString(node) {\n    let result = '';\n\n    module.exports.stringify(node, (bit) => {\n      result += bit;\n    });\n\n    return result;\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/index.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/AtWord.js":
/*!****************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/AtWord.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst AtRule = __webpack_require__(/*! postcss/lib/node */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js\");\n\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst { stringify } = __webpack_require__(/*! ../ValuesStringifier */ \"./node_modules/postcss-values-parser/lib/ValuesStringifier.js\");\n\nclass AtWord extends AtRule {\n  toString(stringifier = stringify) {\n    return super.toString(stringifier);\n  }\n}\n\nregisterWalker(AtWord);\n\nmodule.exports = AtWord;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/AtWord.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Comment.js":
/*!*****************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Comment.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst PostCssComment = __webpack_require__(/*! postcss/lib/comment */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js\");\n\nconst { stringify } = __webpack_require__(/*! ../ValuesStringifier */ \"./node_modules/postcss-values-parser/lib/ValuesStringifier.js\");\n\nconst inlineRegex = /(\\/\\/)/;\n\nclass Comment extends PostCssComment {\n  static testInline(token) {\n    return inlineRegex.test(token[1]);\n  }\n\n  static tokenizeNext(tokens, parser) {\n    const [first] = tokens;\n    const newlineIndex = tokens.findIndex((t) => /\\n/.test(t[1]));\n    let bits = tokens;\n    let rest = [];\n\n    if (newlineIndex >= 0) {\n      bits = tokens.slice(0, newlineIndex);\n      rest = tokens.slice(newlineIndex);\n    }\n\n    bits = bits.map((t) => t[1]);\n\n    // see tilde comment in tokenizeInline\n    const text = bits.concat('~~').join('');\n    const last = bits[bits.length - 1];\n    const newToken = ['comment', text, first[2], first[3], last[2], last[3]];\n\n    parser.back([newToken, ...rest]);\n  }\n\n  static tokenizeInline(tokens, parser) {\n    const [first, ...rest] = tokens;\n    const bits = first[1].split(/(\\/\\/.+)/).filter((t) => !!t);\n    const newTokens = [];\n    const [, , startLine, , endLine] = first;\n    let [, , , startChar, , endChar] = first;\n\n    for (let bit of bits) {\n      const comment = bit.slice(0, 2) === '//';\n      const type = comment ? 'comment' : 'word';\n\n      if (comment) {\n        // the Parser base comment() method trims the last two characters when creating the node\n        // these tildes are added to counter that. it's hacky, but it works, and we don't have to\n        // re-implement the method\n        bit += '~~';\n      }\n\n      if (bit !== bits[0]) {\n        startChar = endChar + 1;\n      }\n\n      endChar = startChar + bit.length - 1;\n\n      newTokens.push([type, bit, startLine, startChar, endLine, endChar]);\n    }\n\n    parser.back(newTokens.concat(rest));\n  }\n\n  toString(stringifier = stringify) {\n    return super.toString(stringifier);\n  }\n}\n\nmodule.exports = Comment;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Comment.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Container.js":
/*!*******************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Container.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst PostCssContainer = __webpack_require__(/*! postcss/lib/container */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js\");\n\nconst { stringify } = __webpack_require__(/*! ../ValuesStringifier */ \"./node_modules/postcss-values-parser/lib/ValuesStringifier.js\");\n\nclass Container extends PostCssContainer {\n  toString(stringifier = stringify) {\n    return super.toString(stringifier);\n  }\n}\n\nmodule.exports = Container;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Container.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Func.js":
/*!**************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Func.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { getTokens } = __webpack_require__(/*! ../tokenize */ \"./node_modules/postcss-values-parser/lib/tokenize.js\");\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Container = __webpack_require__(/*! ./Container */ \"./node_modules/postcss-values-parser/lib/nodes/Container.js\");\nconst Punctuation = __webpack_require__(/*! ./Punctuation */ \"./node_modules/postcss-values-parser/lib/nodes/Punctuation.js\");\n\nconst cssFunctions = [\n  'annotation',\n  'attr',\n  'blur',\n  'brightness',\n  'calc',\n  'character-variant',\n  'circle',\n  'contrast',\n  'cubic-bezier',\n  'dir',\n  'drop-shadow',\n  'element',\n  'ellipse',\n  'grayscale',\n  'hsl',\n  'hsla',\n  'hue-rotate',\n  'image',\n  'inset',\n  'invert',\n  'lang',\n  'linear-gradient',\n  'matrix',\n  'matrix3d',\n  'minmax',\n  'not',\n  'nth-child',\n  'nth-last-child',\n  'nth-last-of-type',\n  'nth-of-type',\n  'opacity',\n  'ornaments',\n  'perspective',\n  'polygon',\n  'radial-gradient',\n  'rect',\n  'repeat',\n  'repeating-linear-gradient',\n  'repeating-radial-gradient',\n  'rgb',\n  'rgba',\n  'rotate',\n  'rotatex',\n  'rotatey',\n  'rotatez',\n  'rotate3d',\n  'saturate',\n  'scale',\n  'scalex',\n  'scaley',\n  'scalez',\n  'scale3d',\n  'sepia',\n  'skew',\n  'skewx',\n  'skewy',\n  'steps',\n  'styleset',\n  'stylistic',\n  'swash',\n  'symbols',\n  'translate',\n  'translatex',\n  'translatey',\n  'translatez',\n  'translate3d',\n  'url',\n  'var'\n];\nconst vendorPrefixes = ['-webkit-', '-moz-', '-ms-', '-o-'];\nconst reFunctions = new RegExp(`^(${vendorPrefixes.join('|')})?(${cssFunctions.join('|')})`, 'i');\nconst rePunctuation = new RegExp(`^(\\\\${Punctuation.chars.join('|\\\\')})`);\nconst reColorFunctions = /^(hsla?|hwb|lab|lch|rgba?)$/i;\nconst reVar = /^var$/i;\nconst reVarPrefix = /^--[^\\s]+$/;\n\nclass Func extends Container {\n  constructor(options = {}) {\n    super(options);\n    this.type = 'func';\n    this.isColor = false;\n    this.isVar = false;\n    this.name = options.name || '';\n    if (!this.nodes) {\n      this.nodes = [];\n    }\n  }\n\n  static test(tokens) {\n    return (\n      tokens.length > 1 &&\n      tokens[0][0] === 'word' &&\n      // fixes #91\n      !rePunctuation.test(tokens[0][1]) &&\n      (tokens[1][0] === 'brackets' || tokens[1][0] === '(')\n    );\n  }\n\n  static fromTokens(tokens, parser) {\n    const [[, , startLine, startChar]] = tokens;\n    const [name, brackets] = tokens.splice(0, 2);\n    const node = new Func({ name: name[1] });\n    let foundParens = 0;\n    let expectedParens = 1;\n    let lastToken = brackets;\n\n    // fixes #92\n    // eslint-disable-next-line no-useless-escape\n    if (!reFunctions.test(node.name) && !/^[a-zA-Z\\-]+$/.test(node.name)) {\n      const nameTokens = getTokens(node.name);\n      tokens.unshift(...nameTokens, brackets);\n      parser.back(tokens);\n      return;\n    }\n\n    parser.init(node, startLine, startChar);\n    parser.current = node; // eslint-disable-line no-param-reassign\n\n    if (brackets[0] === 'brackets') {\n      expectedParens = brackets[1].match(/[(]/g).length - 1;\n    }\n\n    const rightTokens = [];\n    // the number of closing parens we should expect, minus one for the closing paren of brackets\n\n    for (const token of tokens) {\n      if (foundParens < expectedParens) {\n        if (token[1] === ')') {\n          foundParens += 1;\n        } else if (token[1] === '(') {\n          expectedParens += 1;\n        }\n        brackets[1] += token[1];\n        lastToken = token;\n      } else {\n        rightTokens.push(token);\n      }\n    }\n\n    if (foundParens !== expectedParens) {\n      parser.unclosedBracket(brackets);\n    }\n\n    [, node.params] = brackets;\n\n    const params = brackets[1].slice(1, -1);\n\n    if (params.length) {\n      let opts = parser.options;\n\n      if (node.name === 'url') {\n        // any unknown words are likely part of a url. let the consumer scrutinize the result\n        opts = Object.assign({}, parser.options, { ignoreUnknownWords: true });\n      }\n      opts.parentNode = node;\n      // use a new parser to parse the params of the function. recursion here makes for easier maint\n      // we must require this here due to circular dependency resolution\n      // eslint-disable-next-line global-require\n      const { parse } = __webpack_require__(/*! ../ */ \"./node_modules/postcss-values-parser/lib/index.js\");\n      const root = parse(params, opts);\n      const { nodes: children } = root;\n\n      // TODO: correct line and character position (should we just pad the input? probably easiest)\n      for (const child of children) {\n        node.push(child);\n      }\n\n      if (root.raws.after) {\n        node.last.raws.after = root.raws.after;\n      }\n    }\n\n    parser.end(lastToken);\n    parser.back(rightTokens);\n\n    const { lastNode } = parser;\n    const { nodes } = node;\n    lastNode.isColor = reColorFunctions.test(lastNode.name);\n    lastNode.isVar = reVar.test(lastNode.name) && nodes.length && reVarPrefix.test(nodes[0].value);\n  }\n}\n\nregisterWalker(Func);\n\nmodule.exports = Func;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Func.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Interpolation.js":
/*!***********************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Interpolation.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Container = __webpack_require__(/*! ./Container */ \"./node_modules/postcss-values-parser/lib/nodes/Container.js\");\n\nclass Interpolation extends Container {\n  constructor(options = {}) {\n    super(options);\n    this.type = 'interpolation';\n    this.prefix = options.prefix || '';\n    if (!this.nodes) {\n      this.nodes = [];\n    }\n  }\n\n  static test(tokens, parser) {\n    const { prefix } = parser.options.interpolation;\n    const [first, next] = tokens;\n    return tokens.length > 1 && first[0] === 'word' && prefix === first[1] && next[0] === '{';\n  }\n\n  static fromTokens(tokens, parser) {\n    const [[, , startLine, startChar]] = tokens;\n    const [first] = tokens.splice(0, 2);\n    const [, prefix] = first;\n    const node = new Interpolation({ prefix });\n    const rightTokens = [];\n\n    let closed = false;\n    let lastToken;\n    let brackets = '{';\n\n    parser.init(node, startLine, startChar);\n    parser.current = node; // eslint-disable-line no-param-reassign\n\n    for (const token of tokens) {\n      if (closed) {\n        rightTokens.push(token);\n      } else {\n        if (token[1] === '}') {\n          closed = true;\n        }\n        brackets += token[1];\n        lastToken = token;\n      }\n    }\n\n    if (!closed) {\n      parser.unclosedBracket(first);\n    }\n\n    node.params = brackets;\n\n    const params = brackets.slice(1, -1);\n\n    if (params.length) {\n      // use a new parser to parse the params of the function. recursion here makes for easier maint\n      // we must require this here due to circular dependency resolution\n      const { parse } = __webpack_require__(/*! ../ */ \"./node_modules/postcss-values-parser/lib/index.js\"); // eslint-disable-line global-require\n      const { nodes: children } = parse(params, parser.options);\n\n      // TODO: correct line and character position (should we just pad the input? probably easiest)\n      for (const child of children) {\n        node.push(child);\n      }\n    }\n\n    parser.end(lastToken);\n    parser.back(rightTokens);\n  }\n}\n\nregisterWalker(Interpolation);\n\nmodule.exports = Interpolation;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Interpolation.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Node.js":
/*!**************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Node.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst PostCssNode = __webpack_require__(/*! postcss/lib/node */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js\");\n\nconst { stringify } = __webpack_require__(/*! ../ValuesStringifier */ \"./node_modules/postcss-values-parser/lib/ValuesStringifier.js\");\n\nclass Node extends PostCssNode {\n  toString(stringifier = stringify) {\n    return super.toString(stringifier || {});\n  }\n}\n\nmodule.exports = Node;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Node.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Numeric.js":
/*!*****************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Numeric.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\n\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\n/** A Number is:\n * 1. None or one plus or minus symbol; then\n * 2. Either,\n *    2.1. One or more digits; and / or,\n *    2.2. One period symbol; followed by,\n *         2.2.1. One or more digits;\n *    then,\n * 3. If one \"e\" letter,\n *    3.1. One \"e\" letter; followed by,\n *         3.1.1. None or one plus or minus symbol; followed by,\n *                3.1.1.1. One or more digits.\n * @see https://drafts.csswg.org/css-syntax/#consume-a-number\n */\nconst numberRegex = /^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[Ee][+-]?\\d+)?)$/;\n\n/** A Unit is:\n * 1. Either,\n *    1.1. One dash; followed by,\n *         1.1.1. One letter, non-ASCII, underscore, dash; or,\n *         1.1.2. One escape slash; followed by,\n *              1.1.2.1 One non-newline;\n *         or,\n *    1.2. One letter, non-ASCII, underscore; or,\n *    1.3. One escape slash; followed by,\n *       1.3.1. One non-newline;\n *    then,\n * 2. Zero or more of;\n *    2.1 One letter, non-ASCII, underscore, dash; then / or,\n *    2.2 One escape slash; followed by,\n *        2.2.1. One non-newline.\n * @see https://drafts.csswg.org/css-syntax/#consume-numeric-token\n */\nconst unitRegex = /^(-?(?:[-A-Z_a-z]|[^\\x00-\\x7F]|\\\\[^\\n\\f\\r])(?:[-\\w]|[^\\x00-\\x7F]|\\\\[^\\n\\f\\r])*|%)$/; // eslint-disable-line no-control-regex\n\n/** A Numeric is:\n * 1. One Number; followed by,\n *    1.1 Zero or one Unit.\n */\nconst numericRegex = new RegExp(\n  `^${numberRegex.source.slice(1, -1) + unitRegex.source.slice(1, -1)}?$`\n);\n\nclass Numeric extends Node {\n  constructor(options = {}) {\n    super(options);\n    this.type = 'numeric';\n    this.unit = options.unit || '';\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, Numeric);\n\n    const [[, rawValue]] = tokens;\n    const [, value, unit = ''] = rawValue.match(numericRegex);\n\n    const { lastNode } = parser;\n    lastNode.unit = unit;\n    lastNode.value = value;\n  }\n\n  static test(what) {\n    return numericRegex.test(what);\n  }\n}\n\nregisterWalker(Numeric);\n\nmodule.exports = Numeric;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Numeric.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Operator.js":
/*!******************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Operator.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\nconst operators = ['+', '-', '/', '*', '%'];\nconst operRegex = new RegExp(`([/|*}])`);\n\nclass Operator extends Node {\n  constructor(options) {\n    super(options);\n    this.type = 'operator';\n  }\n\n  static get chars() {\n    return operators;\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, Operator);\n  }\n\n  static get regex() {\n    return operRegex;\n  }\n\n  static tokenize(tokens, parser) {\n    const [first, ...rest] = tokens;\n    const [, value, startLine, , endLine, endChar] = first;\n    const parts = value.split(operRegex).filter((t) => !!t);\n    let [, , , startChar] = first;\n\n    const newTokens = parts.map((part) => {\n      const newToken = ['word', part, startLine, startChar, endLine, endChar];\n\n      startChar += part.length;\n\n      return newToken;\n    });\n\n    parser.back(newTokens.concat(rest));\n  }\n}\n\nregisterWalker(Operator);\n\nmodule.exports = Operator;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Operator.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Punctuation.js":
/*!*********************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Punctuation.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { getTokens } = __webpack_require__(/*! ../tokenize */ \"./node_modules/postcss-values-parser/lib/tokenize.js\");\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\n/**\n * @desc Punctuation nodes can contain:\n *       , : ( ) { } [ ]\n */\nclass Punctuation extends Node {\n  constructor(options) {\n    super(options);\n    this.type = 'punctuation';\n  }\n\n  static get chars() {\n    return [',', ':', '(', ')', '[', ']', '{', '}'];\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, Punctuation);\n  }\n\n  static tokenizeBrackets(tokens, parser) {\n    const [first, ...rest] = tokens;\n    const bits = first[1].split(/([()])/g).filter((t) => !!t);\n    const newTokens = [];\n    const [, , startLine, , endLine] = first;\n    let [, , , startChar, , endChar] = first;\n\n    for (const bit of bits) {\n      let type = bit === '(' ? '(' : bit === ')' ? ')' : 'word';\n\n      if (/^\\s+$/.test(bit)) {\n        type = 'space';\n      }\n\n      if (bit !== bits[0]) {\n        startChar = endChar + 1;\n      }\n\n      endChar = startChar + bit.length - 1;\n\n      if (type === 'word') {\n        const wordTokens = getTokens(bit);\n        for (const token of wordTokens) {\n          token[3] += startChar - 1;\n          newTokens.push(token);\n        }\n      } else {\n        newTokens.push([type, bit, startLine, startChar, endLine, endChar]);\n      }\n    }\n\n    parser.back(newTokens.concat(rest));\n  }\n\n  static tokenizeCommas(tokens, parser) {\n    const [first, ...rest] = tokens;\n    const bits = first[1].split(/([,])/g).filter((t) => !!t);\n    const newTokens = [];\n    const [, , startLine, , endLine] = first;\n    let [, , , startChar, , endChar] = first;\n\n    for (const bit of bits) {\n      if (bit !== bits[0]) {\n        startChar = endChar + 1;\n      }\n\n      endChar = startChar + bit.length - 1;\n\n      newTokens.push(['word', bit, startLine, startChar, endLine, endChar]);\n    }\n\n    parser.back(newTokens.concat(rest));\n  }\n}\n\nregisterWalker(Punctuation);\n\nmodule.exports = Punctuation;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Punctuation.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Quoted.js":
/*!****************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Quoted.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\nclass Quoted extends Node {\n  constructor(options) {\n    super(options);\n    this.type = 'quoted';\n    [this.quote] = options.value;\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, Quoted);\n  }\n}\n\nregisterWalker(Quoted);\n\nmodule.exports = Quoted;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Quoted.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/UnicodeRange.js":
/*!**********************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/UnicodeRange.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\nclass UnicodeRange extends Node {\n  constructor(options) {\n    super(options);\n    this.type = 'unicodeRange';\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, UnicodeRange);\n  }\n\n  static test(what) {\n    return /U\\+(\\d|\\w)+(-\\w+)?(\\?+)?/.test(what);\n  }\n}\n\nregisterWalker(UnicodeRange);\n\nmodule.exports = UnicodeRange;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/UnicodeRange.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/nodes/Word.js":
/*!**************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/nodes/Word.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst colors = __webpack_require__(/*! color-name */ \"./node_modules/color-name/index.js\");\nconst isUrl = __webpack_require__(/*! is-url-superb */ \"./node_modules/is-url-superb/index.js\");\n\nconst { registerWalker } = __webpack_require__(/*! ../walker */ \"./node_modules/postcss-values-parser/lib/walker.js\");\n\nconst Node = __webpack_require__(/*! ./Node */ \"./node_modules/postcss-values-parser/lib/nodes/Node.js\");\n\nconst escapeRegex = /^\\\\(.+)/;\nconst hexRegex = /^#(.+)/;\nconst colorRegex = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\nconst colorNames = Object.keys(colors);\n\nclass Word extends Node {\n  constructor(options) {\n    super(options);\n    this.type = 'word';\n    this.isColor = false;\n    this.isHex = false;\n    this.isUrl = false;\n    this.isVariable = false;\n  }\n\n  static fromTokens(tokens, parser) {\n    parser.fromFirst(tokens, Word);\n\n    const { lastNode } = parser;\n    const { value } = lastNode;\n    lastNode.isColor = colorRegex.test(value) || colorNames.includes(value.toLowerCase());\n    lastNode.isHex = hexRegex.test(value);\n    lastNode.isUrl = isUrl(value);\n    lastNode.isVariable = Word.testVariable(tokens[0], parser);\n  }\n\n  static testEscaped(tokens) {\n    const [first, next] = tokens;\n    const [type, value] = first;\n\n    return (\n      type === 'word' &&\n      (escapeRegex.test(value) || (value === '\\\\' && next && !/^\\s+$/.test(next[1])))\n    );\n  }\n\n  static testHex(token) {\n    const [type, value] = token;\n\n    return type === 'word' && hexRegex.test(value);\n  }\n\n  static testVariable(token, parser) {\n    const [type, value] = token;\n    const { prefixes } = parser.options.variables;\n    const varRegex = new RegExp(`^(${prefixes.join('|')})`);\n\n    return type === 'word' && varRegex.test(value);\n  }\n\n  static testWord(tokens, parser) {\n    const [token] = tokens;\n\n    return Word.testEscaped(tokens) || Word.testHex(token) || Word.testVariable(token, parser);\n  }\n}\n\nregisterWalker(Word);\n\nmodule.exports = Word;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/nodes/Word.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/tokenize.js":
/*!************************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/tokenize.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst Input = __webpack_require__(/*! postcss/lib/input */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js\");\nconst tokenizer = __webpack_require__(/*! postcss/lib/tokenize */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/tokenize.js\");\n\nconst operators = ['*', '-', '%', '+', '/'];\nconst operRegex = /([*/])/g;\n\nconst brackets = (token, tokenize) => {\n  const [, , startLine, startChar, endLine, endChar] = token;\n  const part = token[1].slice(1, token[1].length - 1);\n  const subTokens = getTokens(part); // eslint-disable-line no-use-before-define\n\n  // adjust line position numbers\n  for (const sub of subTokens) {\n    if (sub[0] !== 'space') {\n      const length = sub[5] - sub[3];\n      sub[2] = startLine;\n      sub[3] += startChar;\n      sub[4] += endLine - 1;\n      sub[5] = sub[3] + length;\n    }\n  }\n\n  const tokens = [['(', '(', startLine, startChar, startLine, startChar], ...subTokens];\n  tokens.push([')', ')', startLine, endChar, endLine, endChar]);\n\n  for (const tokn of tokens.reverse()) {\n    tokenize.back(tokn);\n  }\n};\n\nconst comma = (token, tokenize) => {\n  const bits = token[1].split(/([,])/);\n  const tokens = [];\n  const [, , startLine, , endLine] = token;\n  let [, , , startChar, , endChar] = token;\n\n  for (let bit of bits) {\n    bit = bit || ',';\n    const name = bit === ',' ? 'comma' : 'word';\n\n    if (bit !== bits[0]) {\n      startChar = endChar + 1;\n    }\n\n    endChar = startChar + bit.length - 1;\n\n    tokens.push([name, bit, startLine, startChar, endLine, endChar]);\n  }\n\n  for (const tokn of tokens.reverse()) {\n    tokenize.back(tokn);\n  }\n};\n\nconst getTokens = (what) => {\n  const input = new Input(what, {});\n  const tokenize = wrapTokenizer(input); // eslint-disable-line no-use-before-define\n  const result = [];\n\n  // this shouldn't ever be slow as the string being tokenized will always be small\n  while (!tokenize.endOfFile()) {\n    const token = tokenize.nextToken();\n    result.push(token);\n  }\n\n  return result;\n};\n\nconst operator = (token, tokenize) => {\n  const [, value, startLine, , endLine, endChar] = token;\n  const parts = value.split(operRegex);\n  let [, , , startChar] = token;\n\n  const tokens = parts.map((part) => {\n    const type = operators.includes(part) ? 'operator' : 'word';\n    const newToken = [type, part, startLine, startChar, endLine, endChar];\n\n    startChar += part.length;\n\n    return newToken;\n  });\n\n  for (const tokn of tokens.reverse()) {\n    tokenize.back(tokn);\n  }\n};\n\nconst wrapTokenizer = (...args) => {\n  const tokenize = tokenizer(...args);\n  const ogNextToken = tokenize.nextToken;\n\n  tokenize.nextToken = (...nextArgs) => {\n    let token = ogNextToken(...nextArgs);\n\n    if (!token) {\n      return token;\n    }\n\n    const [type, value] = token;\n\n    // TODO: need to adjust the line/char offsets\n    if (type === 'brackets') {\n      brackets(token, tokenize);\n      token = ogNextToken(...nextArgs);\n    } else if (type === 'word') {\n      if (operators.includes(value)) {\n        token[0] = 'operator';\n      } else if (operRegex.test(value)) {\n        operator(token, tokenize);\n        token = ogNextToken(...nextArgs);\n      } else if (value.length > 1 && value.includes(',')) {\n        comma(token, tokenize);\n        token = ogNextToken(...nextArgs);\n      }\n    }\n\n    return token;\n  };\n\n  return tokenize;\n};\n\nmodule.exports = { getTokens, tokenizer: wrapTokenizer };\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/tokenize.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/lib/walker.js":
/*!**********************************************************!*\
  !*** ./node_modules/postcss-values-parser/lib/walker.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n  Copyright © 2018 Andrew Powell\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of this Source Code Form.\n*/\nconst Container = __webpack_require__(/*! postcss/lib/container */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js\");\n\nconst registerWalker = (constructor) => {\n  let walkerName = `walk${constructor.name}`;\n\n  // plural sugar\n  if (walkerName.lastIndexOf('s') !== walkerName.length - 1) {\n    walkerName += 's';\n  }\n\n  /* istanbul ignore next */\n  if (Container.prototype[walkerName]) {\n    return;\n  }\n\n  // we need access to `this` so we can't use an arrow function\n  Container.prototype[walkerName] = function walker(callback) {\n    return this.walkType(constructor, callback);\n  };\n};\n\nContainer.prototype.walkType = function walkType(type, callback) {\n  /* istanbul ignore next */\n  if (!type || !callback) {\n    throw new Error('Parameters {type} and {callback} are required.');\n  }\n\n  // allow users to pass a constructor, or node type string; eg. Word.\n  const isTypeCallable = typeof type === 'function';\n\n  // eslint-disable-next-line consistent-return\n  return this.walk((node, index) => {\n    if ((isTypeCallable && node instanceof type) || (!isTypeCallable && node.type === type)) {\n      return callback.call(this, node, index);\n    }\n  });\n};\n\nmodule.exports = { registerWalker };\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/lib/walker.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/at-rule.js":
/*!********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/at-rule.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _container = _interopRequireDefault(__webpack_require__(/*! ./container */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Represents an at-rule.\n *\n * If it’s followed in the CSS by a {} block, this node will have\n * a nodes property representing its children.\n *\n * @extends Container\n *\n * @example\n * const root = postcss.parse('@charset \"UTF-8\"; @media print {}')\n *\n * const charset = root.first\n * charset.type  //=> 'atrule'\n * charset.nodes //=> undefined\n *\n * const media = root.last\n * media.nodes   //=> []\n */\nvar AtRule = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(AtRule, _Container);\n\n  function AtRule(defaults) {\n    var _this;\n\n    _this = _Container.call(this, defaults) || this;\n    _this.type = 'atrule';\n    return _this;\n  }\n\n  var _proto = AtRule.prototype;\n\n  _proto.append = function append() {\n    var _Container$prototype$;\n\n    if (!this.nodes) this.nodes = [];\n\n    for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) {\n      children[_key] = arguments[_key];\n    }\n\n    return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children));\n  };\n\n  _proto.prepend = function prepend() {\n    var _Container$prototype$2;\n\n    if (!this.nodes) this.nodes = [];\n\n    for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      children[_key2] = arguments[_key2];\n    }\n\n    return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children));\n  }\n  /**\n   * @memberof AtRule#\n   * @member {string} name The at-rule’s name immediately follows the `@`.\n   *\n   * @example\n   * const root  = postcss.parse('@media print {}')\n   * media.name //=> 'media'\n   * const media = root.first\n   */\n\n  /**\n   * @memberof AtRule#\n   * @member {string} params The at-rule’s parameters, the values\n   *                         that follow the at-rule’s name but precede\n   *                         any {} block.\n   *\n   * @example\n   * const root  = postcss.parse('@media print, screen {}')\n   * const media = root.first\n   * media.params //=> 'print, screen'\n   */\n\n  /**\n   * @memberof AtRule#\n   * @member {object} raws Information to generate byte-to-byte equal\n   *                        node string as it was in the origin input.\n   *\n   * Every parser saves its own properties,\n   * but the default CSS parser uses:\n   *\n   * * `before`: the space symbols before the node. It also stores `*`\n   *   and `_` symbols before the declaration (IE hack).\n   * * `after`: the space symbols after the last child of the node\n   *   to the end of the node.\n   * * `between`: the symbols between the property and value\n   *   for declarations, selector and `{` for rules, or last parameter\n   *   and `{` for at-rules.\n   * * `semicolon`: contains true if the last child has\n   *   an (optional) semicolon.\n   * * `afterName`: the space between the at-rule name and its parameters.\n   *\n   * PostCSS cleans at-rule parameters from comments and extra spaces,\n   * but it stores origin content in raws properties.\n   * As such, if you don’t change a declaration’s value,\n   * PostCSS will use the raw value with comments.\n   *\n   * @example\n   * const root = postcss.parse('  @media\\nprint {\\n}')\n   * root.first.first.raws //=> { before: '  ',\n   *                       //     between: ' ',\n   *                       //     afterName: '\\n',\n   *                       //     after: '\\n' }\n   */\n  ;\n\n  return AtRule;\n}(_container.default);\n\nvar _default = AtRule;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/at-rule.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js":
/*!********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _node = _interopRequireDefault(__webpack_require__(/*! ./node */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Represents a comment between declarations or statements (rule and at-rules).\n *\n * Comments inside selectors, at-rule parameters, or declaration values\n * will be stored in the `raws` properties explained above.\n *\n * @extends Node\n */\nvar Comment = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Comment, _Node);\n\n  function Comment(defaults) {\n    var _this;\n\n    _this = _Node.call(this, defaults) || this;\n    _this.type = 'comment';\n    return _this;\n  }\n  /**\n   * @memberof Comment#\n   * @member {string} text The comment’s text.\n   */\n\n  /**\n   * @memberof Comment#\n   * @member {object} raws Information to generate byte-to-byte equal\n   *                       node string as it was in the origin input.\n   *\n   * Every parser saves its own properties,\n   * but the default CSS parser uses:\n   *\n   * * `before`: the space symbols before the node.\n   * * `left`: the space symbols between `/*` and the comment’s text.\n   * * `right`: the space symbols between the comment’s text.\n   */\n\n\n  return Comment;\n}(_node.default);\n\nvar _default = Comment;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7SUFRTUEsTzs7O0FBQ0osbUJBQWFDLFFBQWIsRUFBdUI7QUFBQTs7QUFDckIsNkJBQU1BLFFBQU47QUFDQSxVQUFLQyxJQUFMLEdBQVksU0FBWjtBQUZxQjtBQUd0QjtBQUVEOzs7OztBQUtBOzs7Ozs7Ozs7Ozs7Ozs7RUFYb0JDLGE7O2VBeUJQSCxPIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE5vZGUgZnJvbSAnLi9ub2RlJ1xuXG4vKipcbiAqIFJlcHJlc2VudHMgYSBjb21tZW50IGJldHdlZW4gZGVjbGFyYXRpb25zIG9yIHN0YXRlbWVudHMgKHJ1bGUgYW5kIGF0LXJ1bGVzKS5cbiAqXG4gKiBDb21tZW50cyBpbnNpZGUgc2VsZWN0b3JzLCBhdC1ydWxlIHBhcmFtZXRlcnMsIG9yIGRlY2xhcmF0aW9uIHZhbHVlc1xuICogd2lsbCBiZSBzdG9yZWQgaW4gdGhlIGByYXdzYCBwcm9wZXJ0aWVzIGV4cGxhaW5lZCBhYm92ZS5cbiAqXG4gKiBAZXh0ZW5kcyBOb2RlXG4gKi9cbmNsYXNzIENvbW1lbnQgZXh0ZW5kcyBOb2RlIHtcbiAgY29uc3RydWN0b3IgKGRlZmF1bHRzKSB7XG4gICAgc3VwZXIoZGVmYXVsdHMpXG4gICAgdGhpcy50eXBlID0gJ2NvbW1lbnQnXG4gIH1cblxuICAvKipcbiAgICogQG1lbWJlcm9mIENvbW1lbnQjXG4gICAqIEBtZW1iZXIge3N0cmluZ30gdGV4dCBUaGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICovXG5cbiAgLyoqXG4gICAqIEBtZW1iZXJvZiBDb21tZW50I1xuICAgKiBAbWVtYmVyIHtvYmplY3R9IHJhd3MgSW5mb3JtYXRpb24gdG8gZ2VuZXJhdGUgYnl0ZS10by1ieXRlIGVxdWFsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICBub2RlIHN0cmluZyBhcyBpdCB3YXMgaW4gdGhlIG9yaWdpbiBpbnB1dC5cbiAgICpcbiAgICogRXZlcnkgcGFyc2VyIHNhdmVzIGl0cyBvd24gcHJvcGVydGllcyxcbiAgICogYnV0IHRoZSBkZWZhdWx0IENTUyBwYXJzZXIgdXNlczpcbiAgICpcbiAgICogKiBgYmVmb3JlYDogdGhlIHNwYWNlIHN5bWJvbHMgYmVmb3JlIHRoZSBub2RlLlxuICAgKiAqIGBsZWZ0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiBgLypgIGFuZCB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICogKiBgcmlnaHRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29tbWVudFxuIl0sImZpbGUiOiJjb21tZW50LmpzIn0=\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _declaration = _interopRequireDefault(__webpack_require__(/*! ./declaration */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/declaration.js\"));\n\nvar _comment = _interopRequireDefault(__webpack_require__(/*! ./comment */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js\"));\n\nvar _node = _interopRequireDefault(__webpack_require__(/*! ./node */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction cleanSource(nodes) {\n  return nodes.map(function (i) {\n    if (i.nodes) i.nodes = cleanSource(i.nodes);\n    delete i.source;\n    return i;\n  });\n}\n/**\n * The {@link Root}, {@link AtRule}, and {@link Rule} container nodes\n * inherit some common methods to help work with their children.\n *\n * Note that all containers can store any content. If you write a rule inside\n * a rule, PostCSS will parse it.\n *\n * @extends Node\n * @abstract\n */\n\n\nvar Container = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Container, _Node);\n\n  function Container() {\n    return _Node.apply(this, arguments) || this;\n  }\n\n  var _proto = Container.prototype;\n\n  _proto.push = function push(child) {\n    child.parent = this;\n    this.nodes.push(child);\n    return this;\n  }\n  /**\n   * Iterates through the container’s immediate children,\n   * calling `callback` for each child.\n   *\n   * Returning `false` in the callback will break iteration.\n   *\n   * This method only iterates through the container’s immediate children.\n   * If you need to recursively iterate through all the container’s descendant\n   * nodes, use {@link Container#walk}.\n   *\n   * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe\n   * if you are mutating the array of child nodes during iteration.\n   * PostCSS will adjust the current index to match the mutations.\n   *\n   * @param {childIterator} callback Iterator receives each node and index.\n   *\n   * @return {false|undefined} Returns `false` if iteration was broke.\n   *\n   * @example\n   * const root = postcss.parse('a { color: black; z-index: 1 }')\n   * const rule = root.first\n   *\n   * for (const decl of rule.nodes) {\n   *   decl.cloneBefore({ prop: '-webkit-' + decl.prop })\n   *   // Cycle will be infinite, because cloneBefore moves the current node\n   *   // to the next index\n   * }\n   *\n   * rule.each(decl => {\n   *   decl.cloneBefore({ prop: '-webkit-' + decl.prop })\n   *   // Will be executed only for color and z-index\n   * })\n   */\n  ;\n\n  _proto.each = function each(callback) {\n    if (!this.lastEach) this.lastEach = 0;\n    if (!this.indexes) this.indexes = {};\n    this.lastEach += 1;\n    var id = this.lastEach;\n    this.indexes[id] = 0;\n    if (!this.nodes) return undefined;\n    var index, result;\n\n    while (this.indexes[id] < this.nodes.length) {\n      index = this.indexes[id];\n      result = callback(this.nodes[index], index);\n      if (result === false) break;\n      this.indexes[id] += 1;\n    }\n\n    delete this.indexes[id];\n    return result;\n  }\n  /**\n   * Traverses the container’s descendant nodes, calling callback\n   * for each node.\n   *\n   * Like container.each(), this method is safe to use\n   * if you are mutating arrays during iteration.\n   *\n   * If you only need to iterate through the container’s immediate children,\n   * use {@link Container#each}.\n   *\n   * @param {childIterator} callback Iterator receives each node and index.\n   *\n   * @return {false|undefined} Returns `false` if iteration was broke.\n   *\n   * @example\n   * root.walk(node => {\n   *   // Traverses all descendant nodes.\n   * })\n   */\n  ;\n\n  _proto.walk = function walk(callback) {\n    return this.each(function (child, i) {\n      var result;\n\n      try {\n        result = callback(child, i);\n      } catch (e) {\n        e.postcssNode = child;\n\n        if (e.stack && child.source && /\\n\\s{4}at /.test(e.stack)) {\n          var s = child.source;\n          e.stack = e.stack.replace(/\\n\\s{4}at /, \"$&\" + s.input.from + \":\" + s.start.line + \":\" + s.start.column + \"$&\");\n        }\n\n        throw e;\n      }\n\n      if (result !== false && child.walk) {\n        result = child.walk(callback);\n      }\n\n      return result;\n    });\n  }\n  /**\n   * Traverses the container’s descendant nodes, calling callback\n   * for each declaration node.\n   *\n   * If you pass a filter, iteration will only happen over declarations\n   * with matching properties.\n   *\n   * Like {@link Container#each}, this method is safe\n   * to use if you are mutating arrays during iteration.\n   *\n   * @param {string|RegExp} [prop]   String or regular expression\n   *                                 to filter declarations by property name.\n   * @param {childIterator} callback Iterator receives each node and index.\n   *\n   * @return {false|undefined} Returns `false` if iteration was broke.\n   *\n   * @example\n   * root.walkDecls(decl => {\n   *   checkPropertySupport(decl.prop)\n   * })\n   *\n   * root.walkDecls('border-radius', decl => {\n   *   decl.remove()\n   * })\n   *\n   * root.walkDecls(/^background/, decl => {\n   *   decl.value = takeFirstColorFromGradient(decl.value)\n   * })\n   */\n  ;\n\n  _proto.walkDecls = function walkDecls(prop, callback) {\n    if (!callback) {\n      callback = prop;\n      return this.walk(function (child, i) {\n        if (child.type === 'decl') {\n          return callback(child, i);\n        }\n      });\n    }\n\n    if (prop instanceof RegExp) {\n      return this.walk(function (child, i) {\n        if (child.type === 'decl' && prop.test(child.prop)) {\n          return callback(child, i);\n        }\n      });\n    }\n\n    return this.walk(function (child, i) {\n      if (child.type === 'decl' && child.prop === prop) {\n        return callback(child, i);\n      }\n    });\n  }\n  /**\n   * Traverses the container’s descendant nodes, calling callback\n   * for each rule node.\n   *\n   * If you pass a filter, iteration will only happen over rules\n   * with matching selectors.\n   *\n   * Like {@link Container#each}, this method is safe\n   * to use if you are mutating arrays during iteration.\n   *\n   * @param {string|RegExp} [selector] String or regular expression\n   *                                   to filter rules by selector.\n   * @param {childIterator} callback   Iterator receives each node and index.\n   *\n   * @return {false|undefined} returns `false` if iteration was broke.\n   *\n   * @example\n   * const selectors = []\n   * root.walkRules(rule => {\n   *   selectors.push(rule.selector)\n   * })\n   * console.log(`Your CSS uses ${ selectors.length } selectors`)\n   */\n  ;\n\n  _proto.walkRules = function walkRules(selector, callback) {\n    if (!callback) {\n      callback = selector;\n      return this.walk(function (child, i) {\n        if (child.type === 'rule') {\n          return callback(child, i);\n        }\n      });\n    }\n\n    if (selector instanceof RegExp) {\n      return this.walk(function (child, i) {\n        if (child.type === 'rule' && selector.test(child.selector)) {\n          return callback(child, i);\n        }\n      });\n    }\n\n    return this.walk(function (child, i) {\n      if (child.type === 'rule' && child.selector === selector) {\n        return callback(child, i);\n      }\n    });\n  }\n  /**\n   * Traverses the container’s descendant nodes, calling callback\n   * for each at-rule node.\n   *\n   * If you pass a filter, iteration will only happen over at-rules\n   * that have matching names.\n   *\n   * Like {@link Container#each}, this method is safe\n   * to use if you are mutating arrays during iteration.\n   *\n   * @param {string|RegExp} [name]   String or regular expression\n   *                                 to filter at-rules by name.\n   * @param {childIterator} callback Iterator receives each node and index.\n   *\n   * @return {false|undefined} Returns `false` if iteration was broke.\n   *\n   * @example\n   * root.walkAtRules(rule => {\n   *   if (isOld(rule.name)) rule.remove()\n   * })\n   *\n   * let first = false\n   * root.walkAtRules('charset', rule => {\n   *   if (!first) {\n   *     first = true\n   *   } else {\n   *     rule.remove()\n   *   }\n   * })\n   */\n  ;\n\n  _proto.walkAtRules = function walkAtRules(name, callback) {\n    if (!callback) {\n      callback = name;\n      return this.walk(function (child, i) {\n        if (child.type === 'atrule') {\n          return callback(child, i);\n        }\n      });\n    }\n\n    if (name instanceof RegExp) {\n      return this.walk(function (child, i) {\n        if (child.type === 'atrule' && name.test(child.name)) {\n          return callback(child, i);\n        }\n      });\n    }\n\n    return this.walk(function (child, i) {\n      if (child.type === 'atrule' && child.name === name) {\n        return callback(child, i);\n      }\n    });\n  }\n  /**\n   * Traverses the container’s descendant nodes, calling callback\n   * for each comment node.\n   *\n   * Like {@link Container#each}, this method is safe\n   * to use if you are mutating arrays during iteration.\n   *\n   * @param {childIterator} callback Iterator receives each node and index.\n   *\n   * @return {false|undefined} Returns `false` if iteration was broke.\n   *\n   * @example\n   * root.walkComments(comment => {\n   *   comment.remove()\n   * })\n   */\n  ;\n\n  _proto.walkComments = function walkComments(callback) {\n    return this.walk(function (child, i) {\n      if (child.type === 'comment') {\n        return callback(child, i);\n      }\n    });\n  }\n  /**\n   * Inserts new nodes to the end of the container.\n   *\n   * @param {...(Node|object|string|Node[])} children New nodes.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * const decl1 = postcss.decl({ prop: 'color', value: 'black' })\n   * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' })\n   * rule.append(decl1, decl2)\n   *\n   * root.append({ name: 'charset', params: '\"UTF-8\"' })  // at-rule\n   * root.append({ selector: 'a' })                       // rule\n   * rule.append({ prop: 'color', value: 'black' })       // declaration\n   * rule.append({ text: 'Comment' })                     // comment\n   *\n   * root.append('a {}')\n   * root.first.append('color: black; z-index: 1')\n   */\n  ;\n\n  _proto.append = function append() {\n    for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) {\n      children[_key] = arguments[_key];\n    }\n\n    for (var _i = 0, _children = children; _i < _children.length; _i++) {\n      var child = _children[_i];\n      var nodes = this.normalize(child, this.last);\n\n      for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {\n        var node = _step.value;\n        this.nodes.push(node);\n      }\n    }\n\n    return this;\n  }\n  /**\n   * Inserts new nodes to the start of the container.\n   *\n   * @param {...(Node|object|string|Node[])} children New nodes.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * const decl1 = postcss.decl({ prop: 'color', value: 'black' })\n   * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' })\n   * rule.prepend(decl1, decl2)\n   *\n   * root.append({ name: 'charset', params: '\"UTF-8\"' })  // at-rule\n   * root.append({ selector: 'a' })                       // rule\n   * rule.append({ prop: 'color', value: 'black' })       // declaration\n   * rule.append({ text: 'Comment' })                     // comment\n   *\n   * root.append('a {}')\n   * root.first.append('color: black; z-index: 1')\n   */\n  ;\n\n  _proto.prepend = function prepend() {\n    for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      children[_key2] = arguments[_key2];\n    }\n\n    children = children.reverse();\n\n    for (var _iterator2 = _createForOfIteratorHelperLoose(children), _step2; !(_step2 = _iterator2()).done;) {\n      var child = _step2.value;\n      var nodes = this.normalize(child, this.first, 'prepend').reverse();\n\n      for (var _iterator3 = _createForOfIteratorHelperLoose(nodes), _step3; !(_step3 = _iterator3()).done;) {\n        var node = _step3.value;\n        this.nodes.unshift(node);\n      }\n\n      for (var id in this.indexes) {\n        this.indexes[id] = this.indexes[id] + nodes.length;\n      }\n    }\n\n    return this;\n  };\n\n  _proto.cleanRaws = function cleanRaws(keepBetween) {\n    _Node.prototype.cleanRaws.call(this, keepBetween);\n\n    if (this.nodes) {\n      for (var _iterator4 = _createForOfIteratorHelperLoose(this.nodes), _step4; !(_step4 = _iterator4()).done;) {\n        var node = _step4.value;\n        node.cleanRaws(keepBetween);\n      }\n    }\n  }\n  /**\n   * Insert new node before old node within the container.\n   *\n   * @param {Node|number} exist             Child or child’s index.\n   * @param {Node|object|string|Node[]} add New node.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }))\n   */\n  ;\n\n  _proto.insertBefore = function insertBefore(exist, add) {\n    exist = this.index(exist);\n    var type = exist === 0 ? 'prepend' : false;\n    var nodes = this.normalize(add, this.nodes[exist], type).reverse();\n\n    for (var _iterator5 = _createForOfIteratorHelperLoose(nodes), _step5; !(_step5 = _iterator5()).done;) {\n      var node = _step5.value;\n      this.nodes.splice(exist, 0, node);\n    }\n\n    var index;\n\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n\n      if (exist <= index) {\n        this.indexes[id] = index + nodes.length;\n      }\n    }\n\n    return this;\n  }\n  /**\n   * Insert new node after old node within the container.\n   *\n   * @param {Node|number} exist             Child or child’s index.\n   * @param {Node|object|string|Node[]} add New node.\n   *\n   * @return {Node} This node for methods chain.\n   */\n  ;\n\n  _proto.insertAfter = function insertAfter(exist, add) {\n    exist = this.index(exist);\n    var nodes = this.normalize(add, this.nodes[exist]).reverse();\n\n    for (var _iterator6 = _createForOfIteratorHelperLoose(nodes), _step6; !(_step6 = _iterator6()).done;) {\n      var node = _step6.value;\n      this.nodes.splice(exist + 1, 0, node);\n    }\n\n    var index;\n\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n\n      if (exist < index) {\n        this.indexes[id] = index + nodes.length;\n      }\n    }\n\n    return this;\n  }\n  /**\n   * Removes node from the container and cleans the parent properties\n   * from the node and its children.\n   *\n   * @param {Node|number} child Child or child’s index.\n   *\n   * @return {Node} This node for methods chain\n   *\n   * @example\n   * rule.nodes.length  //=> 5\n   * rule.removeChild(decl)\n   * rule.nodes.length  //=> 4\n   * decl.parent        //=> undefined\n   */\n  ;\n\n  _proto.removeChild = function removeChild(child) {\n    child = this.index(child);\n    this.nodes[child].parent = undefined;\n    this.nodes.splice(child, 1);\n    var index;\n\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n\n      if (index >= child) {\n        this.indexes[id] = index - 1;\n      }\n    }\n\n    return this;\n  }\n  /**\n   * Removes all children from the container\n   * and cleans their parent properties.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * rule.removeAll()\n   * rule.nodes.length //=> 0\n   */\n  ;\n\n  _proto.removeAll = function removeAll() {\n    for (var _iterator7 = _createForOfIteratorHelperLoose(this.nodes), _step7; !(_step7 = _iterator7()).done;) {\n      var node = _step7.value;\n      node.parent = undefined;\n    }\n\n    this.nodes = [];\n    return this;\n  }\n  /**\n   * Passes all declaration values within the container that match pattern\n   * through callback, replacing those values with the returned result\n   * of callback.\n   *\n   * This method is useful if you are using a custom unit or function\n   * and need to iterate through all values.\n   *\n   * @param {string|RegExp} pattern      Replace pattern.\n   * @param {object} opts                Options to speed up the search.\n   * @param {string|string[]} opts.props An array of property names.\n   * @param {string} opts.fast           String that’s used to narrow down\n   *                                     values and speed up the regexp search.\n   * @param {function|string} callback   String to replace pattern or callback\n   *                                     that returns a new value. The callback\n   *                                     will receive the same arguments\n   *                                     as those passed to a function parameter\n   *                                     of `String#replace`.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * root.replaceValues(/\\d+rem/, { fast: 'rem' }, string => {\n   *   return 15 * parseInt(string) + 'px'\n   * })\n   */\n  ;\n\n  _proto.replaceValues = function replaceValues(pattern, opts, callback) {\n    if (!callback) {\n      callback = opts;\n      opts = {};\n    }\n\n    this.walkDecls(function (decl) {\n      if (opts.props && opts.props.indexOf(decl.prop) === -1) return;\n      if (opts.fast && decl.value.indexOf(opts.fast) === -1) return;\n      decl.value = decl.value.replace(pattern, callback);\n    });\n    return this;\n  }\n  /**\n   * Returns `true` if callback returns `true`\n   * for all of the container’s children.\n   *\n   * @param {childCondition} condition Iterator returns true or false.\n   *\n   * @return {boolean} Is every child pass condition.\n   *\n   * @example\n   * const noPrefixes = rule.every(i => i.prop[0] !== '-')\n   */\n  ;\n\n  _proto.every = function every(condition) {\n    return this.nodes.every(condition);\n  }\n  /**\n   * Returns `true` if callback returns `true` for (at least) one\n   * of the container’s children.\n   *\n   * @param {childCondition} condition Iterator returns true or false.\n   *\n   * @return {boolean} Is some child pass condition.\n   *\n   * @example\n   * const hasPrefix = rule.some(i => i.prop[0] === '-')\n   */\n  ;\n\n  _proto.some = function some(condition) {\n    return this.nodes.some(condition);\n  }\n  /**\n   * Returns a `child`’s index within the {@link Container#nodes} array.\n   *\n   * @param {Node} child Child of the current container.\n   *\n   * @return {number} Child index.\n   *\n   * @example\n   * rule.index( rule.nodes[2] ) //=> 2\n   */\n  ;\n\n  _proto.index = function index(child) {\n    if (typeof child === 'number') {\n      return child;\n    }\n\n    return this.nodes.indexOf(child);\n  }\n  /**\n   * The container’s first child.\n   *\n   * @type {Node}\n   *\n   * @example\n   * rule.first === rules.nodes[0]\n   */\n  ;\n\n  _proto.normalize = function normalize(nodes, sample) {\n    var _this = this;\n\n    if (typeof nodes === 'string') {\n      var parse = __webpack_require__(/*! ./parse */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/parse.js\");\n\n      nodes = cleanSource(parse(nodes).nodes);\n    } else if (Array.isArray(nodes)) {\n      nodes = nodes.slice(0);\n\n      for (var _iterator8 = _createForOfIteratorHelperLoose(nodes), _step8; !(_step8 = _iterator8()).done;) {\n        var i = _step8.value;\n        if (i.parent) i.parent.removeChild(i, 'ignore');\n      }\n    } else if (nodes.type === 'root') {\n      nodes = nodes.nodes.slice(0);\n\n      for (var _iterator9 = _createForOfIteratorHelperLoose(nodes), _step9; !(_step9 = _iterator9()).done;) {\n        var _i2 = _step9.value;\n        if (_i2.parent) _i2.parent.removeChild(_i2, 'ignore');\n      }\n    } else if (nodes.type) {\n      nodes = [nodes];\n    } else if (nodes.prop) {\n      if (typeof nodes.value === 'undefined') {\n        throw new Error('Value field is missed in node creation');\n      } else if (typeof nodes.value !== 'string') {\n        nodes.value = String(nodes.value);\n      }\n\n      nodes = [new _declaration.default(nodes)];\n    } else if (nodes.selector) {\n      var Rule = __webpack_require__(/*! ./rule */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/rule.js\");\n\n      nodes = [new Rule(nodes)];\n    } else if (nodes.name) {\n      var AtRule = __webpack_require__(/*! ./at-rule */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/at-rule.js\");\n\n      nodes = [new AtRule(nodes)];\n    } else if (nodes.text) {\n      nodes = [new _comment.default(nodes)];\n    } else {\n      throw new Error('Unknown node type in node creation');\n    }\n\n    var processed = nodes.map(function (i) {\n      if (i.parent) i.parent.removeChild(i);\n\n      if (typeof i.raws.before === 'undefined') {\n        if (sample && typeof sample.raws.before !== 'undefined') {\n          i.raws.before = sample.raws.before.replace(/[^\\s]/g, '');\n        }\n      }\n\n      i.parent = _this;\n      return i;\n    });\n    return processed;\n  }\n  /**\n   * @memberof Container#\n   * @member {Node[]} nodes An array containing the container’s children.\n   *\n   * @example\n   * const root = postcss.parse('a { color: black }')\n   * root.nodes.length           //=> 1\n   * root.nodes[0].selector      //=> 'a'\n   * root.nodes[0].nodes[0].prop //=> 'color'\n   */\n  ;\n\n  _createClass(Container, [{\n    key: \"first\",\n    get: function get() {\n      if (!this.nodes) return undefined;\n      return this.nodes[0];\n    }\n    /**\n     * The container’s last child.\n     *\n     * @type {Node}\n     *\n     * @example\n     * rule.last === rule.nodes[rule.nodes.length - 1]\n     */\n\n  }, {\n    key: \"last\",\n    get: function get() {\n      if (!this.nodes) return undefined;\n      return this.nodes[this.nodes.length - 1];\n    }\n  }]);\n\n  return Container;\n}(_node.default);\n\nvar _default = Container;\n/**\n * @callback childCondition\n * @param {Node} node    Container child.\n * @param {number} index Child index.\n * @param {Node[]} nodes All container children.\n * @return {boolean}\n */\n\n/**\n * @callback childIterator\n * @param {Node} node    Container child.\n * @param {number} index Child index.\n * @return {false|undefined} Returning `false` will break iteration.\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/css-syntax-error.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/css-syntax-error.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _picocolors = _interopRequireDefault(__webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\"));\n\nvar _terminalHighlight = _interopRequireDefault(__webpack_require__(/*! ./terminal-highlight */ 6));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * The CSS parser throws this error for broken CSS.\n *\n * Custom parsers can throw this error for broken custom syntax using\n * the {@link Node#error} method.\n *\n * PostCSS will use the input source map to detect the original error location.\n * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS,\n * PostCSS will show the original position in the Sass file.\n *\n * If you need the position in the PostCSS input\n * (e.g., to debug the previous compiler), use `error.input.file`.\n *\n * @example\n * // Catching and checking syntax error\n * try {\n *   postcss.parse('a{')\n * } catch (error) {\n *   if (error.name === 'CssSyntaxError') {\n *     error //=> CssSyntaxError\n *   }\n * }\n *\n * @example\n * // Raising error from plugin\n * throw node.error('Unknown variable', { plugin: 'postcss-vars' })\n */\nvar CssSyntaxError = /*#__PURE__*/function (_Error) {\n  _inheritsLoose(CssSyntaxError, _Error);\n\n  /**\n   * @param {string} message  Error message.\n   * @param {number} [line]   Source line of the error.\n   * @param {number} [column] Source column of the error.\n   * @param {string} [source] Source code of the broken file.\n   * @param {string} [file]   Absolute path to the broken file.\n   * @param {string} [plugin] PostCSS plugin name, if error came from plugin.\n   */\n  function CssSyntaxError(message, line, column, source, file, plugin) {\n    var _this;\n\n    _this = _Error.call(this, message) || this;\n    /**\n     * Always equal to `'CssSyntaxError'`. You should always check error type\n     * by `error.name === 'CssSyntaxError'`\n     * instead of `error instanceof CssSyntaxError`,\n     * because npm could have several PostCSS versions.\n     *\n     * @type {string}\n     *\n     * @example\n     * if (error.name === 'CssSyntaxError') {\n     *   error //=> CssSyntaxError\n     * }\n     */\n\n    _this.name = 'CssSyntaxError';\n    /**\n     * Error message.\n     *\n     * @type {string}\n     *\n     * @example\n     * error.message //=> 'Unclosed block'\n     */\n\n    _this.reason = message;\n\n    if (file) {\n      /**\n       * Absolute path to the broken file.\n       *\n       * @type {string}\n       *\n       * @example\n       * error.file       //=> 'a.sass'\n       * error.input.file //=> 'a.css'\n       */\n      _this.file = file;\n    }\n\n    if (source) {\n      /**\n       * Source code of the broken file.\n       *\n       * @type {string}\n       *\n       * @example\n       * error.source       //=> 'a { b {} }'\n       * error.input.column //=> 'a b { }'\n       */\n      _this.source = source;\n    }\n\n    if (plugin) {\n      /**\n       * Plugin name, if error came from plugin.\n       *\n       * @type {string}\n       *\n       * @example\n       * error.plugin //=> 'postcss-vars'\n       */\n      _this.plugin = plugin;\n    }\n\n    if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n      /**\n       * Source line of the error.\n       *\n       * @type {number}\n       *\n       * @example\n       * error.line       //=> 2\n       * error.input.line //=> 4\n       */\n      _this.line = line;\n      /**\n       * Source column of the error.\n       *\n       * @type {number}\n       *\n       * @example\n       * error.column       //=> 1\n       * error.input.column //=> 4\n       */\n\n      _this.column = column;\n    }\n\n    _this.setMessage();\n\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(_assertThisInitialized(_this), CssSyntaxError);\n    }\n\n    return _this;\n  }\n\n  var _proto = CssSyntaxError.prototype;\n\n  _proto.setMessage = function setMessage() {\n    /**\n     * Full error text in the GNU error format\n     * with plugin, file, line and column.\n     *\n     * @type {string}\n     *\n     * @example\n     * error.message //=> 'a.css:1:1: Unclosed block'\n     */\n    this.message = this.plugin ? this.plugin + ': ' : '';\n    this.message += this.file ? this.file : '<css input>';\n\n    if (typeof this.line !== 'undefined') {\n      this.message += ':' + this.line + ':' + this.column;\n    }\n\n    this.message += ': ' + this.reason;\n  }\n  /**\n   * Returns a few lines of CSS source that caused the error.\n   *\n   * If the CSS has an input source map without `sourceContent`,\n   * this method will return an empty string.\n   *\n   * @param {boolean} [color] Whether arrow will be colored red by terminal\n   *                          color codes. By default, PostCSS will detect\n   *                          color support by `process.stdout.isTTY`\n   *                          and `process.env.NODE_DISABLE_COLORS`.\n   *\n   * @example\n   * error.showSourceCode() //=> \"  4 | }\n   *                        //      5 | a {\n   *                        //    > 6 |   bad\n   *                        //        |   ^\n   *                        //      7 | }\n   *                        //      8 | b {\"\n   *\n   * @return {string} Few lines of CSS source that caused the error.\n   */\n  ;\n\n  _proto.showSourceCode = function showSourceCode(color) {\n    var _this2 = this;\n\n    if (!this.source) return '';\n    var css = this.source;\n\n    if (_terminalHighlight.default) {\n      if (typeof color === 'undefined') color = _picocolors.default.isColorSupported;\n      if (color) css = (0, _terminalHighlight.default)(css);\n    }\n\n    var lines = css.split(/\\r?\\n/);\n    var start = Math.max(this.line - 3, 0);\n    var end = Math.min(this.line + 2, lines.length);\n    var maxWidth = String(end).length;\n\n    function mark(text) {\n      if (color && _picocolors.default.red) {\n        return _picocolors.default.red(_picocolors.default.bold(text));\n      }\n\n      return text;\n    }\n\n    function aside(text) {\n      if (color && _picocolors.default.gray) {\n        return _picocolors.default.gray(text);\n      }\n\n      return text;\n    }\n\n    return lines.slice(start, end).map(function (line, index) {\n      var number = start + 1 + index;\n      var gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ';\n\n      if (number === _this2.line) {\n        var spacing = aside(gutter.replace(/\\d/g, ' ')) + line.slice(0, _this2.column - 1).replace(/[^\\t]/g, ' ');\n        return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^');\n      }\n\n      return ' ' + aside(gutter) + line;\n    }).join('\\n');\n  }\n  /**\n   * Returns error position, message and source code of the broken part.\n   *\n   * @example\n   * error.toString() //=> \"CssSyntaxError: app.css:1:1: Unclosed block\n   *                  //    > 1 | a {\n   *                  //        | ^\"\n   *\n   * @return {string} Error position, message and source code.\n   */\n  ;\n\n  _proto.toString = function toString() {\n    var code = this.showSourceCode();\n\n    if (code) {\n      code = '\\n\\n' + code + '\\n';\n    }\n\n    return this.name + ': ' + this.message + code;\n  }\n  /**\n   * @memberof CssSyntaxError#\n   * @member {Input} input Input object with PostCSS internal information\n   *                       about input file. If input has source map\n   *                       from previous tool, PostCSS will use origin\n   *                       (for example, Sass) source. You can use this\n   *                       object to get PostCSS input source.\n   *\n   * @example\n   * error.input.file //=> 'a.css'\n   * error.file       //=> 'a.sass'\n   */\n  ;\n\n  return CssSyntaxError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar _default = CssSyntaxError;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/css-syntax-error.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/declaration.js":
/*!************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/declaration.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _node = _interopRequireDefault(__webpack_require__(/*! ./node */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Represents a CSS declaration.\n *\n * @extends Node\n *\n * @example\n * const root = postcss.parse('a { color: black }')\n * const decl = root.first.first\n * decl.type       //=> 'decl'\n * decl.toString() //=> ' color: black'\n */\nvar Declaration = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Declaration, _Node);\n\n  function Declaration(defaults) {\n    var _this;\n\n    _this = _Node.call(this, defaults) || this;\n    _this.type = 'decl';\n    return _this;\n  }\n  /**\n   * @memberof Declaration#\n   * @member {string} prop The declaration’s property name.\n   *\n   * @example\n   * const root = postcss.parse('a { color: black }')\n   * const decl = root.first.first\n   * decl.prop //=> 'color'\n   */\n\n  /**\n   * @memberof Declaration#\n   * @member {string} value The declaration’s value.\n   *\n   * @example\n   * const root = postcss.parse('a { color: black }')\n   * const decl = root.first.first\n   * decl.value //=> 'black'\n   */\n\n  /**\n   * @memberof Declaration#\n   * @member {boolean} important `true` if the declaration\n   *                             has an !important annotation.\n   *\n   * @example\n   * const root = postcss.parse('a { color: black !important; color: red }')\n   * root.first.first.important //=> true\n   * root.first.last.important  //=> undefined\n   */\n\n  /**\n   * @memberof Declaration#\n   * @member {object} raws Information to generate byte-to-byte equal\n   *                       node string as it was in the origin input.\n   *\n   * Every parser saves its own properties,\n   * but the default CSS parser uses:\n   *\n   * * `before`: the space symbols before the node. It also stores `*`\n   *   and `_` symbols before the declaration (IE hack).\n   * * `between`: the symbols between the property and value\n   *   for declarations.\n   * * `important`: the content of the important statement,\n   *   if it is not just `!important`.\n   *\n   * PostCSS cleans declaration from comments and extra spaces,\n   * but it stores origin content in raws properties.\n   * As such, if you don’t change a declaration’s value,\n   * PostCSS will use the raw value with comments.\n   *\n   * @example\n   * const root = postcss.parse('a {\\n  color:black\\n}')\n   * root.first.first.raws //=> { before: '\\n  ', between: ':' }\n   */\n\n\n  return Declaration;\n}(_node.default);\n\nvar _default = Declaration;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSIsIk5vZGUiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7OztBQUVBOzs7Ozs7Ozs7OztJQVdNQSxXOzs7QUFDSix1QkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQiw2QkFBTUEsUUFBTjtBQUNBLFVBQUtDLElBQUwsR0FBWSxNQUFaO0FBRnFCO0FBR3RCO0FBRUQ7Ozs7Ozs7Ozs7QUFVQTs7Ozs7Ozs7OztBQVVBOzs7Ozs7Ozs7OztBQVdBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7RUFyQ3dCQyxhOztlQStEWEgsVyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBOb2RlIGZyb20gJy4vbm9kZSdcblxuLyoqXG4gKiBSZXByZXNlbnRzIGEgQ1NTIGRlY2xhcmF0aW9uLlxuICpcbiAqIEBleHRlbmRzIE5vZGVcbiAqXG4gKiBAZXhhbXBsZVxuICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2EgeyBjb2xvcjogYmxhY2sgfScpXG4gKiBjb25zdCBkZWNsID0gcm9vdC5maXJzdC5maXJzdFxuICogZGVjbC50eXBlICAgICAgIC8vPT4gJ2RlY2wnXG4gKiBkZWNsLnRvU3RyaW5nKCkgLy89PiAnIGNvbG9yOiBibGFjaydcbiAqL1xuY2xhc3MgRGVjbGFyYXRpb24gZXh0ZW5kcyBOb2RlIHtcbiAgY29uc3RydWN0b3IgKGRlZmF1bHRzKSB7XG4gICAgc3VwZXIoZGVmYXVsdHMpXG4gICAgdGhpcy50eXBlID0gJ2RlY2wnXG4gIH1cblxuICAvKipcbiAgICogQG1lbWJlcm9mIERlY2xhcmF0aW9uI1xuICAgKiBAbWVtYmVyIHtzdHJpbmd9IHByb3AgVGhlIGRlY2xhcmF0aW9u4oCZcyBwcm9wZXJ0eSBuYW1lLlxuICAgKlxuICAgKiBAZXhhbXBsZVxuICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7IGNvbG9yOiBibGFjayB9JylcbiAgICogY29uc3QgZGVjbCA9IHJvb3QuZmlyc3QuZmlyc3RcbiAgICogZGVjbC5wcm9wIC8vPT4gJ2NvbG9yJ1xuICAgKi9cblxuICAvKipcbiAgICogQG1lbWJlcm9mIERlY2xhcmF0aW9uI1xuICAgKiBAbWVtYmVyIHtzdHJpbmd9IHZhbHVlIFRoZSBkZWNsYXJhdGlvbuKAmXMgdmFsdWUuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHsgY29sb3I6IGJsYWNrIH0nKVxuICAgKiBjb25zdCBkZWNsID0gcm9vdC5maXJzdC5maXJzdFxuICAgKiBkZWNsLnZhbHVlIC8vPT4gJ2JsYWNrJ1xuICAgKi9cblxuICAvKipcbiAgICogQG1lbWJlcm9mIERlY2xhcmF0aW9uI1xuICAgKiBAbWVtYmVyIHtib29sZWFufSBpbXBvcnRhbnQgYHRydWVgIGlmIHRoZSBkZWNsYXJhdGlvblxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzIGFuICFpbXBvcnRhbnQgYW5ub3RhdGlvbi5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2EgeyBjb2xvcjogYmxhY2sgIWltcG9ydGFudDsgY29sb3I6IHJlZCB9JylcbiAgICogcm9vdC5maXJzdC5maXJzdC5pbXBvcnRhbnQgLy89PiB0cnVlXG4gICAqIHJvb3QuZmlyc3QubGFzdC5pbXBvcnRhbnQgIC8vPT4gdW5kZWZpbmVkXG4gICAqL1xuXG4gIC8qKlxuICAgKiBAbWVtYmVyb2YgRGVjbGFyYXRpb24jXG4gICAqIEBtZW1iZXIge29iamVjdH0gcmF3cyBJbmZvcm1hdGlvbiB0byBnZW5lcmF0ZSBieXRlLXRvLWJ5dGUgZXF1YWxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIG5vZGUgc3RyaW5nIGFzIGl0IHdhcyBpbiB0aGUgb3JpZ2luIGlucHV0LlxuICAgKlxuICAgKiBFdmVyeSBwYXJzZXIgc2F2ZXMgaXRzIG93biBwcm9wZXJ0aWVzLFxuICAgKiBidXQgdGhlIGRlZmF1bHQgQ1NTIHBhcnNlciB1c2VzOlxuICAgKlxuICAgKiAqIGBiZWZvcmVgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZWZvcmUgdGhlIG5vZGUuIEl0IGFsc28gc3RvcmVzIGAqYFxuICAgKiAgIGFuZCBgX2Agc3ltYm9scyBiZWZvcmUgdGhlIGRlY2xhcmF0aW9uIChJRSBoYWNrKS5cbiAgICogKiBgYmV0d2VlbmA6IHRoZSBzeW1ib2xzIGJldHdlZW4gdGhlIHByb3BlcnR5IGFuZCB2YWx1ZVxuICAgKiAgIGZvciBkZWNsYXJhdGlvbnMuXG4gICAqICogYGltcG9ydGFudGA6IHRoZSBjb250ZW50IG9mIHRoZSBpbXBvcnRhbnQgc3RhdGVtZW50LFxuICAgKiAgIGlmIGl0IGlzIG5vdCBqdXN0IGAhaW1wb3J0YW50YC5cbiAgICpcbiAgICogUG9zdENTUyBjbGVhbnMgZGVjbGFyYXRpb24gZnJvbSBjb21tZW50cyBhbmQgZXh0cmEgc3BhY2VzLFxuICAgKiBidXQgaXQgc3RvcmVzIG9yaWdpbiBjb250ZW50IGluIHJhd3MgcHJvcGVydGllcy5cbiAgICogQXMgc3VjaCwgaWYgeW91IGRvbuKAmXQgY2hhbmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2Ege1xcbiAgY29sb3I6YmxhY2tcXG59JylcbiAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICdcXG4gICcsIGJldHdlZW46ICc6JyB9XG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBEZWNsYXJhdGlvblxuIl0sImZpbGUiOiJkZWNsYXJhdGlvbi5qcyJ9\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/declaration.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js":
/*!******************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _path = _interopRequireDefault(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\"));\n\nvar _cssSyntaxError = _interopRequireDefault(__webpack_require__(/*! ./css-syntax-error */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/css-syntax-error.js\"));\n\nvar _previousMap = _interopRequireDefault(__webpack_require__(/*! ./previous-map */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/previous-map.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar sequence = 0;\n/**\n * Represents the source CSS.\n *\n * @example\n * const root  = postcss.parse(css, { from: file })\n * const input = root.source.input\n */\n\nvar Input = /*#__PURE__*/function () {\n  /**\n   * @param {string} css    Input CSS source.\n   * @param {object} [opts] {@link Processor#process} options.\n   */\n  function Input(css, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (css === null || typeof css === 'undefined' || typeof css === 'object' && !css.toString) {\n      throw new Error(\"PostCSS received \" + css + \" instead of CSS string\");\n    }\n    /**\n     * Input CSS source\n     *\n     * @type {string}\n     *\n     * @example\n     * const input = postcss.parse('a{}', { from: file }).input\n     * input.css //=> \"a{}\"\n     */\n\n\n    this.css = css.toString();\n\n    if (this.css[0] === \"\\uFEFF\" || this.css[0] === \"\\uFFFE\") {\n      this.hasBOM = true;\n      this.css = this.css.slice(1);\n    } else {\n      this.hasBOM = false;\n    }\n\n    if (opts.from) {\n      if (/^\\w+:\\/\\//.test(opts.from) || _path.default.isAbsolute(opts.from)) {\n        /**\n         * The absolute path to the CSS source file defined\n         * with the `from` option.\n         *\n         * @type {string}\n         *\n         * @example\n         * const root = postcss.parse(css, { from: 'a.css' })\n         * root.source.input.file //=> '/home/ai/a.css'\n         */\n        this.file = opts.from;\n      } else {\n        this.file = _path.default.resolve(opts.from);\n      }\n    }\n\n    var map = new _previousMap.default(this.css, opts);\n\n    if (map.text) {\n      /**\n       * The input source map passed from a compilation step before PostCSS\n       * (for example, from Sass compiler).\n       *\n       * @type {PreviousMap}\n       *\n       * @example\n       * root.source.input.map.consumer().sources //=> ['a.sass']\n       */\n      this.map = map;\n      var file = map.consumer().file;\n      if (!this.file && file) this.file = this.mapResolve(file);\n    }\n\n    if (!this.file) {\n      sequence += 1;\n      /**\n       * The unique ID of the CSS source. It will be created if `from` option\n       * is not provided (because PostCSS does not know the file path).\n       *\n       * @type {string}\n       *\n       * @example\n       * const root = postcss.parse(css)\n       * root.source.input.file //=> undefined\n       * root.source.input.id   //=> \"<input css 1>\"\n       */\n\n      this.id = '<input css ' + sequence + '>';\n    }\n\n    if (this.map) this.map.file = this.from;\n  }\n\n  var _proto = Input.prototype;\n\n  _proto.error = function error(message, line, column, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    var result;\n    var origin = this.origin(line, column);\n\n    if (origin) {\n      result = new _cssSyntaxError.default(message, origin.line, origin.column, origin.source, origin.file, opts.plugin);\n    } else {\n      result = new _cssSyntaxError.default(message, line, column, this.css, this.file, opts.plugin);\n    }\n\n    result.input = {\n      line: line,\n      column: column,\n      source: this.css\n    };\n    if (this.file) result.input.file = this.file;\n    return result;\n  }\n  /**\n   * Reads the input source map and returns a symbol position\n   * in the input source (e.g., in a Sass file that was compiled\n   * to CSS before being passed to PostCSS).\n   *\n   * @param {number} line   Line in input CSS.\n   * @param {number} column Column in input CSS.\n   *\n   * @return {filePosition} Position in input source.\n   *\n   * @example\n   * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 }\n   */\n  ;\n\n  _proto.origin = function origin(line, column) {\n    if (!this.map) return false;\n    var consumer = this.map.consumer();\n    var from = consumer.originalPositionFor({\n      line: line,\n      column: column\n    });\n    if (!from.source) return false;\n    var result = {\n      file: this.mapResolve(from.source),\n      line: from.line,\n      column: from.column\n    };\n    var source = consumer.sourceContentFor(from.source);\n    if (source) result.source = source;\n    return result;\n  };\n\n  _proto.mapResolve = function mapResolve(file) {\n    if (/^\\w+:\\/\\//.test(file)) {\n      return file;\n    }\n\n    return _path.default.resolve(this.map.consumer().sourceRoot || '.', file);\n  }\n  /**\n   * The CSS source identifier. Contains {@link Input#file} if the user\n   * set the `from` option, or {@link Input#id} if they did not.\n   *\n   * @type {string}\n   *\n   * @example\n   * const root = postcss.parse(css, { from: 'a.css' })\n   * root.source.input.from //=> \"/home/ai/a.css\"\n   *\n   * const root = postcss.parse(css)\n   * root.source.input.from //=> \"<input css 1>\"\n   */\n  ;\n\n  _createClass(Input, [{\n    key: \"from\",\n    get: function get() {\n      return this.file || this.id;\n    }\n  }]);\n\n  return Input;\n}();\n\nvar _default = Input;\n/**\n * @typedef  {object} filePosition\n * @property {string} file   Path to file.\n * @property {number} line   Source line in file.\n * @property {number} column Source column in file.\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/lazy-result.js":
/*!************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/lazy-result.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _mapGenerator = _interopRequireDefault(__webpack_require__(/*! ./map-generator */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/map-generator.js\"));\n\nvar _stringify2 = _interopRequireDefault(__webpack_require__(/*! ./stringify */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/stringify.js\"));\n\nvar _warnOnce = _interopRequireDefault(__webpack_require__(/*! ./warn-once */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/warn-once.js\"));\n\nvar _result = _interopRequireDefault(__webpack_require__(/*! ./result */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/result.js\"));\n\nvar _parse = _interopRequireDefault(__webpack_require__(/*! ./parse */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction isPromise(obj) {\n  return typeof obj === 'object' && typeof obj.then === 'function';\n}\n/**\n * A Promise proxy for the result of PostCSS transformations.\n *\n * A `LazyResult` instance is returned by {@link Processor#process}.\n *\n * @example\n * const lazy = postcss([autoprefixer]).process(css)\n */\n\n\nvar LazyResult = /*#__PURE__*/function () {\n  function LazyResult(processor, css, opts) {\n    this.stringified = false;\n    this.processed = false;\n    var root;\n\n    if (typeof css === 'object' && css !== null && css.type === 'root') {\n      root = css;\n    } else if (css instanceof LazyResult || css instanceof _result.default) {\n      root = css.root;\n\n      if (css.map) {\n        if (typeof opts.map === 'undefined') opts.map = {};\n        if (!opts.map.inline) opts.map.inline = false;\n        opts.map.prev = css.map;\n      }\n    } else {\n      var parser = _parse.default;\n      if (opts.syntax) parser = opts.syntax.parse;\n      if (opts.parser) parser = opts.parser;\n      if (parser.parse) parser = parser.parse;\n\n      try {\n        root = parser(css, opts);\n      } catch (error) {\n        this.error = error;\n      }\n    }\n\n    this.result = new _result.default(processor, root, opts);\n  }\n  /**\n   * Returns a {@link Processor} instance, which will be used\n   * for CSS transformations.\n   *\n   * @type {Processor}\n   */\n\n\n  var _proto = LazyResult.prototype;\n\n  /**\n   * Processes input CSS through synchronous plugins\n   * and calls {@link Result#warnings()}.\n   *\n   * @return {Warning[]} Warnings from plugins.\n   */\n  _proto.warnings = function warnings() {\n    return this.sync().warnings();\n  }\n  /**\n   * Alias for the {@link LazyResult#css} property.\n   *\n   * @example\n   * lazy + '' === lazy.css\n   *\n   * @return {string} Output CSS.\n   */\n  ;\n\n  _proto.toString = function toString() {\n    return this.css;\n  }\n  /**\n   * Processes input CSS through synchronous and asynchronous plugins\n   * and calls `onFulfilled` with a Result instance. If a plugin throws\n   * an error, the `onRejected` callback will be executed.\n   *\n   * It implements standard Promise API.\n   *\n   * @param {onFulfilled} onFulfilled Callback will be executed\n   *                                  when all plugins will finish work.\n   * @param {onRejected}  onRejected  Callback will be executed on any error.\n   *\n   * @return {Promise} Promise API to make queue.\n   *\n   * @example\n   * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => {\n   *   console.log(result.css)\n   * })\n   */\n  ;\n\n  _proto.then = function then(onFulfilled, onRejected) {\n    if (true) {\n      if (!('from' in this.opts)) {\n        (0, _warnOnce.default)('Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.');\n      }\n    }\n\n    return this.async().then(onFulfilled, onRejected);\n  }\n  /**\n   * Processes input CSS through synchronous and asynchronous plugins\n   * and calls onRejected for each error thrown in any plugin.\n   *\n   * It implements standard Promise API.\n   *\n   * @param {onRejected} onRejected Callback will be executed on any error.\n   *\n   * @return {Promise} Promise API to make queue.\n   *\n   * @example\n   * postcss([autoprefixer]).process(css).then(result => {\n   *   console.log(result.css)\n   * }).catch(error => {\n   *   console.error(error)\n   * })\n   */\n  ;\n\n  _proto.catch = function _catch(onRejected) {\n    return this.async().catch(onRejected);\n  }\n  /**\n   * Processes input CSS through synchronous and asynchronous plugins\n   * and calls onFinally on any error or when all plugins will finish work.\n   *\n   * It implements standard Promise API.\n   *\n   * @param {onFinally} onFinally Callback will be executed on any error or\n   *                              when all plugins will finish work.\n   *\n   * @return {Promise} Promise API to make queue.\n   *\n   * @example\n   * postcss([autoprefixer]).process(css).finally(() => {\n   *   console.log('processing ended')\n   * })\n   */\n  ;\n\n  _proto.finally = function _finally(onFinally) {\n    return this.async().then(onFinally, onFinally);\n  };\n\n  _proto.handleError = function handleError(error, plugin) {\n    try {\n      this.error = error;\n\n      if (error.name === 'CssSyntaxError' && !error.plugin) {\n        error.plugin = plugin.postcssPlugin;\n        error.setMessage();\n      } else if (plugin.postcssVersion) {\n        if (true) {\n          var pluginName = plugin.postcssPlugin;\n          var pluginVer = plugin.postcssVersion;\n          var runtimeVer = this.result.processor.version;\n          var a = pluginVer.split('.');\n          var b = runtimeVer.split('.');\n\n          if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n            console.error('Unknown error from PostCSS plugin. Your current PostCSS ' + 'version is ' + runtimeVer + ', but ' + pluginName + ' uses ' + pluginVer + '. Perhaps this is the source of the error below.');\n          }\n        }\n      }\n    } catch (err) {\n      if (console && console.error) console.error(err);\n    }\n  };\n\n  _proto.asyncTick = function asyncTick(resolve, reject) {\n    var _this = this;\n\n    if (this.plugin >= this.processor.plugins.length) {\n      this.processed = true;\n      return resolve();\n    }\n\n    try {\n      var plugin = this.processor.plugins[this.plugin];\n      var promise = this.run(plugin);\n      this.plugin += 1;\n\n      if (isPromise(promise)) {\n        promise.then(function () {\n          _this.asyncTick(resolve, reject);\n        }).catch(function (error) {\n          _this.handleError(error, plugin);\n\n          _this.processed = true;\n          reject(error);\n        });\n      } else {\n        this.asyncTick(resolve, reject);\n      }\n    } catch (error) {\n      this.processed = true;\n      reject(error);\n    }\n  };\n\n  _proto.async = function async() {\n    var _this2 = this;\n\n    if (this.processed) {\n      return new Promise(function (resolve, reject) {\n        if (_this2.error) {\n          reject(_this2.error);\n        } else {\n          resolve(_this2.stringify());\n        }\n      });\n    }\n\n    if (this.processing) {\n      return this.processing;\n    }\n\n    this.processing = new Promise(function (resolve, reject) {\n      if (_this2.error) return reject(_this2.error);\n      _this2.plugin = 0;\n\n      _this2.asyncTick(resolve, reject);\n    }).then(function () {\n      _this2.processed = true;\n      return _this2.stringify();\n    });\n    return this.processing;\n  };\n\n  _proto.sync = function sync() {\n    if (this.processed) return this.result;\n    this.processed = true;\n\n    if (this.processing) {\n      throw new Error('Use process(css).then(cb) to work with async plugins');\n    }\n\n    if (this.error) throw this.error;\n\n    for (var _iterator = _createForOfIteratorHelperLoose(this.result.processor.plugins), _step; !(_step = _iterator()).done;) {\n      var plugin = _step.value;\n      var promise = this.run(plugin);\n\n      if (isPromise(promise)) {\n        throw new Error('Use process(css).then(cb) to work with async plugins');\n      }\n    }\n\n    return this.result;\n  };\n\n  _proto.run = function run(plugin) {\n    this.result.lastPlugin = plugin;\n\n    try {\n      return plugin(this.result.root, this.result);\n    } catch (error) {\n      this.handleError(error, plugin);\n      throw error;\n    }\n  };\n\n  _proto.stringify = function stringify() {\n    if (this.stringified) return this.result;\n    this.stringified = true;\n    this.sync();\n    var opts = this.result.opts;\n    var str = _stringify2.default;\n    if (opts.syntax) str = opts.syntax.stringify;\n    if (opts.stringifier) str = opts.stringifier;\n    if (str.stringify) str = str.stringify;\n    var map = new _mapGenerator.default(str, this.result.root, this.result.opts);\n    var data = map.generate();\n    this.result.css = data[0];\n    this.result.map = data[1];\n    return this.result;\n  };\n\n  _createClass(LazyResult, [{\n    key: \"processor\",\n    get: function get() {\n      return this.result.processor;\n    }\n    /**\n     * Options from the {@link Processor#process} call.\n     *\n     * @type {processOptions}\n     */\n\n  }, {\n    key: \"opts\",\n    get: function get() {\n      return this.result.opts;\n    }\n    /**\n     * Processes input CSS through synchronous plugins, converts `Root`\n     * to a CSS string and returns {@link Result#css}.\n     *\n     * This property will only work with synchronous plugins.\n     * If the processor contains any asynchronous plugins\n     * it will throw an error. This is why this method is only\n     * for debug purpose, you should always use {@link LazyResult#then}.\n     *\n     * @type {string}\n     * @see Result#css\n     */\n\n  }, {\n    key: \"css\",\n    get: function get() {\n      return this.stringify().css;\n    }\n    /**\n     * An alias for the `css` property. Use it with syntaxes\n     * that generate non-CSS output.\n     *\n     * This property will only work with synchronous plugins.\n     * If the processor contains any asynchronous plugins\n     * it will throw an error. This is why this method is only\n     * for debug purpose, you should always use {@link LazyResult#then}.\n     *\n     * @type {string}\n     * @see Result#content\n     */\n\n  }, {\n    key: \"content\",\n    get: function get() {\n      return this.stringify().content;\n    }\n    /**\n     * Processes input CSS through synchronous plugins\n     * and returns {@link Result#map}.\n     *\n     * This property will only work with synchronous plugins.\n     * If the processor contains any asynchronous plugins\n     * it will throw an error. This is why this method is only\n     * for debug purpose, you should always use {@link LazyResult#then}.\n     *\n     * @type {SourceMapGenerator}\n     * @see Result#map\n     */\n\n  }, {\n    key: \"map\",\n    get: function get() {\n      return this.stringify().map;\n    }\n    /**\n     * Processes input CSS through synchronous plugins\n     * and returns {@link Result#root}.\n     *\n     * This property will only work with synchronous plugins. If the processor\n     * contains any asynchronous plugins it will throw an error.\n     *\n     * This is why this method is only for debug purpose,\n     * you should always use {@link LazyResult#then}.\n     *\n     * @type {Root}\n     * @see Result#root\n     */\n\n  }, {\n    key: \"root\",\n    get: function get() {\n      return this.sync().root;\n    }\n    /**\n     * Processes input CSS through synchronous plugins\n     * and returns {@link Result#messages}.\n     *\n     * This property will only work with synchronous plugins. If the processor\n     * contains any asynchronous plugins it will throw an error.\n     *\n     * This is why this method is only for debug purpose,\n     * you should always use {@link LazyResult#then}.\n     *\n     * @type {Message[]}\n     * @see Result#messages\n     */\n\n  }, {\n    key: \"messages\",\n    get: function get() {\n      return this.sync().messages;\n    }\n  }]);\n\n  return LazyResult;\n}();\n\nvar _default = LazyResult;\n/**\n * @callback onFulfilled\n * @param {Result} result\n */\n\n/**\n * @callback onRejected\n * @param {Error} error\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/lazy-result.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/list.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/list.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Contains helpers for safely splitting lists of CSS values,\n * preserving parentheses and quotes.\n *\n * @example\n * const list = postcss.list\n *\n * @namespace list\n */\nvar list = {\n  split: function split(string, separators, last) {\n    var array = [];\n    var current = '';\n    var split = false;\n    var func = 0;\n    var quote = false;\n    var escape = false;\n\n    for (var i = 0; i < string.length; i++) {\n      var letter = string[i];\n\n      if (quote) {\n        if (escape) {\n          escape = false;\n        } else if (letter === '\\\\') {\n          escape = true;\n        } else if (letter === quote) {\n          quote = false;\n        }\n      } else if (letter === '\"' || letter === '\\'') {\n        quote = letter;\n      } else if (letter === '(') {\n        func += 1;\n      } else if (letter === ')') {\n        if (func > 0) func -= 1;\n      } else if (func === 0) {\n        if (separators.indexOf(letter) !== -1) split = true;\n      }\n\n      if (split) {\n        if (current !== '') array.push(current.trim());\n        current = '';\n        split = false;\n      } else {\n        current += letter;\n      }\n    }\n\n    if (last || current !== '') array.push(current.trim());\n    return array;\n  },\n\n  /**\n   * Safely splits space-separated values (such as those for `background`,\n   * `border-radius`, and other shorthand properties).\n   *\n   * @param {string} string Space-separated values.\n   *\n   * @return {string[]} Split values.\n   *\n   * @example\n   * postcss.list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']\n   */\n  space: function space(string) {\n    var spaces = [' ', '\\n', '\\t'];\n    return list.split(string, spaces);\n  },\n\n  /**\n   * Safely splits comma-separated values (such as those for `transition-*`\n   * and `background` properties).\n   *\n   * @param {string} string Comma-separated values.\n   *\n   * @return {string[]} Split values.\n   *\n   * @example\n   * postcss.list.comma('black, linear-gradient(white, black)')\n   * //=> ['black', 'linear-gradient(white, black)']\n   */\n  comma: function comma(string) {\n    return list.split(string, [','], true);\n  }\n};\nvar _default = list;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/list.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/map-generator.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/map-generator.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _sourceMap = _interopRequireDefault(__webpack_require__(/*! source-map */ \"./node_modules/postcss-values-parser/node_modules/source-map/source-map.js\"));\n\nvar _path = _interopRequireDefault(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nvar MapGenerator = /*#__PURE__*/function () {\n  function MapGenerator(stringify, root, opts) {\n    this.stringify = stringify;\n    this.mapOpts = opts.map || {};\n    this.root = root;\n    this.opts = opts;\n  }\n\n  var _proto = MapGenerator.prototype;\n\n  _proto.isMap = function isMap() {\n    if (typeof this.opts.map !== 'undefined') {\n      return !!this.opts.map;\n    }\n\n    return this.previous().length > 0;\n  };\n\n  _proto.previous = function previous() {\n    var _this = this;\n\n    if (!this.previousMaps) {\n      this.previousMaps = [];\n      this.root.walk(function (node) {\n        if (node.source && node.source.input.map) {\n          var map = node.source.input.map;\n\n          if (_this.previousMaps.indexOf(map) === -1) {\n            _this.previousMaps.push(map);\n          }\n        }\n      });\n    }\n\n    return this.previousMaps;\n  };\n\n  _proto.isInline = function isInline() {\n    if (typeof this.mapOpts.inline !== 'undefined') {\n      return this.mapOpts.inline;\n    }\n\n    var annotation = this.mapOpts.annotation;\n\n    if (typeof annotation !== 'undefined' && annotation !== true) {\n      return false;\n    }\n\n    if (this.previous().length) {\n      return this.previous().some(function (i) {\n        return i.inline;\n      });\n    }\n\n    return true;\n  };\n\n  _proto.isSourcesContent = function isSourcesContent() {\n    if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n      return this.mapOpts.sourcesContent;\n    }\n\n    if (this.previous().length) {\n      return this.previous().some(function (i) {\n        return i.withContent();\n      });\n    }\n\n    return true;\n  };\n\n  _proto.clearAnnotation = function clearAnnotation() {\n    if (this.mapOpts.annotation === false) return;\n    var node;\n\n    for (var i = this.root.nodes.length - 1; i >= 0; i--) {\n      node = this.root.nodes[i];\n      if (node.type !== 'comment') continue;\n\n      if (node.text.indexOf('# sourceMappingURL=') === 0) {\n        this.root.removeChild(i);\n      }\n    }\n  };\n\n  _proto.setSourcesContent = function setSourcesContent() {\n    var _this2 = this;\n\n    var already = {};\n    this.root.walk(function (node) {\n      if (node.source) {\n        var from = node.source.input.from;\n\n        if (from && !already[from]) {\n          already[from] = true;\n\n          var relative = _this2.relative(from);\n\n          _this2.map.setSourceContent(relative, node.source.input.css);\n        }\n      }\n    });\n  };\n\n  _proto.applyPrevMaps = function applyPrevMaps() {\n    for (var _iterator = _createForOfIteratorHelperLoose(this.previous()), _step; !(_step = _iterator()).done;) {\n      var prev = _step.value;\n      var from = this.relative(prev.file);\n\n      var root = prev.root || _path.default.dirname(prev.file);\n\n      var map = void 0;\n\n      if (this.mapOpts.sourcesContent === false) {\n        map = new _sourceMap.default.SourceMapConsumer(prev.text);\n\n        if (map.sourcesContent) {\n          map.sourcesContent = map.sourcesContent.map(function () {\n            return null;\n          });\n        }\n      } else {\n        map = prev.consumer();\n      }\n\n      this.map.applySourceMap(map, from, this.relative(root));\n    }\n  };\n\n  _proto.isAnnotation = function isAnnotation() {\n    if (this.isInline()) {\n      return true;\n    }\n\n    if (typeof this.mapOpts.annotation !== 'undefined') {\n      return this.mapOpts.annotation;\n    }\n\n    if (this.previous().length) {\n      return this.previous().some(function (i) {\n        return i.annotation;\n      });\n    }\n\n    return true;\n  };\n\n  _proto.toBase64 = function toBase64(str) {\n    if (Buffer) {\n      return Buffer.from(str).toString('base64');\n    }\n\n    return window.btoa(unescape(encodeURIComponent(str)));\n  };\n\n  _proto.addAnnotation = function addAnnotation() {\n    var content;\n\n    if (this.isInline()) {\n      content = 'data:application/json;base64,' + this.toBase64(this.map.toString());\n    } else if (typeof this.mapOpts.annotation === 'string') {\n      content = this.mapOpts.annotation;\n    } else {\n      content = this.outputFile() + '.map';\n    }\n\n    var eol = '\\n';\n    if (this.css.indexOf('\\r\\n') !== -1) eol = '\\r\\n';\n    this.css += eol + '/*# sourceMappingURL=' + content + ' */';\n  };\n\n  _proto.outputFile = function outputFile() {\n    if (this.opts.to) {\n      return this.relative(this.opts.to);\n    }\n\n    if (this.opts.from) {\n      return this.relative(this.opts.from);\n    }\n\n    return 'to.css';\n  };\n\n  _proto.generateMap = function generateMap() {\n    this.generateString();\n    if (this.isSourcesContent()) this.setSourcesContent();\n    if (this.previous().length > 0) this.applyPrevMaps();\n    if (this.isAnnotation()) this.addAnnotation();\n\n    if (this.isInline()) {\n      return [this.css];\n    }\n\n    return [this.css, this.map];\n  };\n\n  _proto.relative = function relative(file) {\n    if (file.indexOf('<') === 0) return file;\n    if (/^\\w+:\\/\\//.test(file)) return file;\n    var from = this.opts.to ? _path.default.dirname(this.opts.to) : '.';\n\n    if (typeof this.mapOpts.annotation === 'string') {\n      from = _path.default.dirname(_path.default.resolve(from, this.mapOpts.annotation));\n    }\n\n    file = _path.default.relative(from, file);\n\n    if (_path.default.sep === '\\\\') {\n      return file.replace(/\\\\/g, '/');\n    }\n\n    return file;\n  };\n\n  _proto.sourcePath = function sourcePath(node) {\n    if (this.mapOpts.from) {\n      return this.mapOpts.from;\n    }\n\n    return this.relative(node.source.input.from);\n  };\n\n  _proto.generateString = function generateString() {\n    var _this3 = this;\n\n    this.css = '';\n    this.map = new _sourceMap.default.SourceMapGenerator({\n      file: this.outputFile()\n    });\n    var line = 1;\n    var column = 1;\n    var lines, last;\n    this.stringify(this.root, function (str, node, type) {\n      _this3.css += str;\n\n      if (node && type !== 'end') {\n        if (node.source && node.source.start) {\n          _this3.map.addMapping({\n            source: _this3.sourcePath(node),\n            generated: {\n              line: line,\n              column: column - 1\n            },\n            original: {\n              line: node.source.start.line,\n              column: node.source.start.column - 1\n            }\n          });\n        } else {\n          _this3.map.addMapping({\n            source: '<no source>',\n            original: {\n              line: 1,\n              column: 0\n            },\n            generated: {\n              line: line,\n              column: column - 1\n            }\n          });\n        }\n      }\n\n      lines = str.match(/\\n/g);\n\n      if (lines) {\n        line += lines.length;\n        last = str.lastIndexOf('\\n');\n        column = str.length - last;\n      } else {\n        column += str.length;\n      }\n\n      if (node && type !== 'start') {\n        var p = node.parent || {\n          raws: {}\n        };\n\n        if (node.type !== 'decl' || node !== p.last || p.raws.semicolon) {\n          if (node.source && node.source.end) {\n            _this3.map.addMapping({\n              source: _this3.sourcePath(node),\n              generated: {\n                line: line,\n                column: column - 2\n              },\n              original: {\n                line: node.source.end.line,\n                column: node.source.end.column - 1\n              }\n            });\n          } else {\n            _this3.map.addMapping({\n              source: '<no source>',\n              original: {\n                line: 1,\n                column: 0\n              },\n              generated: {\n                line: line,\n                column: column - 1\n              }\n            });\n          }\n        }\n      }\n    });\n  };\n\n  _proto.generate = function generate() {\n    this.clearAnnotation();\n\n    if (this.isMap()) {\n      return this.generateMap();\n    }\n\n    var result = '';\n    this.stringify(this.root, function (i) {\n      result += i;\n    });\n    return [result];\n  };\n\n  return MapGenerator;\n}();\n\nvar _default = MapGenerator;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/map-generator.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _cssSyntaxError = _interopRequireDefault(__webpack_require__(/*! ./css-syntax-error */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/css-syntax-error.js\"));\n\nvar _stringifier = _interopRequireDefault(__webpack_require__(/*! ./stringifier */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js\"));\n\nvar _stringify = _interopRequireDefault(__webpack_require__(/*! ./stringify */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction cloneNode(obj, parent) {\n  var cloned = new obj.constructor();\n\n  for (var i in obj) {\n    if (!obj.hasOwnProperty(i)) continue;\n    var value = obj[i];\n    var type = typeof value;\n\n    if (i === 'parent' && type === 'object') {\n      if (parent) cloned[i] = parent;\n    } else if (i === 'source') {\n      cloned[i] = value;\n    } else if (value instanceof Array) {\n      cloned[i] = value.map(function (j) {\n        return cloneNode(j, cloned);\n      });\n    } else {\n      if (type === 'object' && value !== null) value = cloneNode(value);\n      cloned[i] = value;\n    }\n  }\n\n  return cloned;\n}\n/**\n * All node classes inherit the following common methods.\n *\n * @abstract\n */\n\n\nvar Node = /*#__PURE__*/function () {\n  /**\n   * @param {object} [defaults] Value for node properties.\n   */\n  function Node(defaults) {\n    if (defaults === void 0) {\n      defaults = {};\n    }\n\n    this.raws = {};\n\n    if (true) {\n      if (typeof defaults !== 'object' && typeof defaults !== 'undefined') {\n        throw new Error('PostCSS nodes constructor accepts object, not ' + JSON.stringify(defaults));\n      }\n    }\n\n    for (var name in defaults) {\n      this[name] = defaults[name];\n    }\n  }\n  /**\n   * Returns a `CssSyntaxError` instance containing the original position\n   * of the node in the source, showing line and column numbers and also\n   * a small excerpt to facilitate debugging.\n   *\n   * If present, an input source map will be used to get the original position\n   * of the source, even from a previous compilation step\n   * (e.g., from Sass compilation).\n   *\n   * This method produces very useful error messages.\n   *\n   * @param {string} message     Error description.\n   * @param {object} [opts]      Options.\n   * @param {string} opts.plugin Plugin name that created this error.\n   *                             PostCSS will set it automatically.\n   * @param {string} opts.word   A word inside a node’s string that should\n   *                             be highlighted as the source of the error.\n   * @param {number} opts.index  An index inside a node’s string that should\n   *                             be highlighted as the source of the error.\n   *\n   * @return {CssSyntaxError} Error object to throw it.\n   *\n   * @example\n   * if (!variables[name]) {\n   *   throw decl.error('Unknown variable ' + name, { word: name })\n   *   // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black\n   *   //   color: $black\n   *   // a\n   *   //          ^\n   *   //   background: white\n   * }\n   */\n\n\n  var _proto = Node.prototype;\n\n  _proto.error = function error(message, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (this.source) {\n      var pos = this.positionBy(opts);\n      return this.source.input.error(message, pos.line, pos.column, opts);\n    }\n\n    return new _cssSyntaxError.default(message);\n  }\n  /**\n   * This method is provided as a convenience wrapper for {@link Result#warn}.\n   *\n   * @param {Result} result      The {@link Result} instance\n   *                             that will receive the warning.\n   * @param {string} text        Warning message.\n   * @param {object} [opts]      Options\n   * @param {string} opts.plugin Plugin name that created this warning.\n   *                             PostCSS will set it automatically.\n   * @param {string} opts.word   A word inside a node’s string that should\n   *                             be highlighted as the source of the warning.\n   * @param {number} opts.index  An index inside a node’s string that should\n   *                             be highlighted as the source of the warning.\n   *\n   * @return {Warning} Created warning object.\n   *\n   * @example\n   * const plugin = postcss.plugin('postcss-deprecated', () => {\n   *   return (root, result) => {\n   *     root.walkDecls('bad', decl => {\n   *       decl.warn(result, 'Deprecated property bad')\n   *     })\n   *   }\n   * })\n   */\n  ;\n\n  _proto.warn = function warn(result, text, opts) {\n    var data = {\n      node: this\n    };\n\n    for (var i in opts) {\n      data[i] = opts[i];\n    }\n\n    return result.warn(text, data);\n  }\n  /**\n   * Removes the node from its parent and cleans the parent properties\n   * from the node and its children.\n   *\n   * @example\n   * if (decl.prop.match(/^-webkit-/)) {\n   *   decl.remove()\n   * }\n   *\n   * @return {Node} Node to make calls chain.\n   */\n  ;\n\n  _proto.remove = function remove() {\n    if (this.parent) {\n      this.parent.removeChild(this);\n    }\n\n    this.parent = undefined;\n    return this;\n  }\n  /**\n   * Returns a CSS string representing the node.\n   *\n   * @param {stringifier|syntax} [stringifier] A syntax to use\n   *                                           in string generation.\n   *\n   * @return {string} CSS string of this node.\n   *\n   * @example\n   * postcss.rule({ selector: 'a' }).toString() //=> \"a {}\"\n   */\n  ;\n\n  _proto.toString = function toString(stringifier) {\n    if (stringifier === void 0) {\n      stringifier = _stringify.default;\n    }\n\n    if (stringifier.stringify) stringifier = stringifier.stringify;\n    var result = '';\n    stringifier(this, function (i) {\n      result += i;\n    });\n    return result;\n  }\n  /**\n   * Returns an exact clone of the node.\n   *\n   * The resulting cloned node and its (cloned) children will retain\n   * code style properties.\n   *\n   * @param {object} [overrides] New properties to override in the clone.\n   *\n   * @example\n   * decl.raws.before    //=> \"\\n  \"\n   * const cloned = decl.clone({ prop: '-moz-' + decl.prop })\n   * cloned.raws.before  //=> \"\\n  \"\n   * cloned.toString()   //=> -moz-transform: scale(0)\n   *\n   * @return {Node} Clone of the node.\n   */\n  ;\n\n  _proto.clone = function clone(overrides) {\n    if (overrides === void 0) {\n      overrides = {};\n    }\n\n    var cloned = cloneNode(this);\n\n    for (var name in overrides) {\n      cloned[name] = overrides[name];\n    }\n\n    return cloned;\n  }\n  /**\n   * Shortcut to clone the node and insert the resulting cloned node\n   * before the current node.\n   *\n   * @param {object} [overrides] Mew properties to override in the clone.\n   *\n   * @example\n   * decl.cloneBefore({ prop: '-moz-' + decl.prop })\n   *\n   * @return {Node} New node\n   */\n  ;\n\n  _proto.cloneBefore = function cloneBefore(overrides) {\n    if (overrides === void 0) {\n      overrides = {};\n    }\n\n    var cloned = this.clone(overrides);\n    this.parent.insertBefore(this, cloned);\n    return cloned;\n  }\n  /**\n   * Shortcut to clone the node and insert the resulting cloned node\n   * after the current node.\n   *\n   * @param {object} [overrides] New properties to override in the clone.\n   *\n   * @return {Node} New node.\n   */\n  ;\n\n  _proto.cloneAfter = function cloneAfter(overrides) {\n    if (overrides === void 0) {\n      overrides = {};\n    }\n\n    var cloned = this.clone(overrides);\n    this.parent.insertAfter(this, cloned);\n    return cloned;\n  }\n  /**\n   * Inserts node(s) before the current node and removes the current node.\n   *\n   * @param {...Node} nodes Mode(s) to replace current one.\n   *\n   * @example\n   * if (atrule.name === 'mixin') {\n   *   atrule.replaceWith(mixinRules[atrule.params])\n   * }\n   *\n   * @return {Node} Current node to methods chain.\n   */\n  ;\n\n  _proto.replaceWith = function replaceWith() {\n    if (this.parent) {\n      for (var _len = arguments.length, nodes = new Array(_len), _key = 0; _key < _len; _key++) {\n        nodes[_key] = arguments[_key];\n      }\n\n      for (var _i = 0, _nodes = nodes; _i < _nodes.length; _i++) {\n        var node = _nodes[_i];\n        this.parent.insertBefore(this, node);\n      }\n\n      this.remove();\n    }\n\n    return this;\n  }\n  /**\n   * Returns the next child of the node’s parent.\n   * Returns `undefined` if the current node is the last child.\n   *\n   * @return {Node|undefined} Next node.\n   *\n   * @example\n   * if (comment.text === 'delete next') {\n   *   const next = comment.next()\n   *   if (next) {\n   *     next.remove()\n   *   }\n   * }\n   */\n  ;\n\n  _proto.next = function next() {\n    if (!this.parent) return undefined;\n    var index = this.parent.index(this);\n    return this.parent.nodes[index + 1];\n  }\n  /**\n   * Returns the previous child of the node’s parent.\n   * Returns `undefined` if the current node is the first child.\n   *\n   * @return {Node|undefined} Previous node.\n   *\n   * @example\n   * const annotation = decl.prev()\n   * if (annotation.type === 'comment') {\n   *   readAnnotation(annotation.text)\n   * }\n   */\n  ;\n\n  _proto.prev = function prev() {\n    if (!this.parent) return undefined;\n    var index = this.parent.index(this);\n    return this.parent.nodes[index - 1];\n  }\n  /**\n   * Insert new node before current node to current node’s parent.\n   *\n   * Just alias for `node.parent.insertBefore(node, add)`.\n   *\n   * @param {Node|object|string|Node[]} add New node.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * decl.before('content: \"\"')\n   */\n  ;\n\n  _proto.before = function before(add) {\n    this.parent.insertBefore(this, add);\n    return this;\n  }\n  /**\n   * Insert new node after current node to current node’s parent.\n   *\n   * Just alias for `node.parent.insertAfter(node, add)`.\n   *\n   * @param {Node|object|string|Node[]} add New node.\n   *\n   * @return {Node} This node for methods chain.\n   *\n   * @example\n   * decl.after('color: black')\n   */\n  ;\n\n  _proto.after = function after(add) {\n    this.parent.insertAfter(this, add);\n    return this;\n  };\n\n  _proto.toJSON = function toJSON() {\n    var fixed = {};\n\n    for (var name in this) {\n      if (!this.hasOwnProperty(name)) continue;\n      if (name === 'parent') continue;\n      var value = this[name];\n\n      if (value instanceof Array) {\n        fixed[name] = value.map(function (i) {\n          if (typeof i === 'object' && i.toJSON) {\n            return i.toJSON();\n          } else {\n            return i;\n          }\n        });\n      } else if (typeof value === 'object' && value.toJSON) {\n        fixed[name] = value.toJSON();\n      } else {\n        fixed[name] = value;\n      }\n    }\n\n    return fixed;\n  }\n  /**\n   * Returns a {@link Node#raws} value. If the node is missing\n   * the code style property (because the node was manually built or cloned),\n   * PostCSS will try to autodetect the code style property by looking\n   * at other nodes in the tree.\n   *\n   * @param {string} prop          Name of code style property.\n   * @param {string} [defaultType] Name of default value, it can be missed\n   *                               if the value is the same as prop.\n   *\n   * @example\n   * const root = postcss.parse('a { background: white }')\n   * root.nodes[0].append({ prop: 'color', value: 'black' })\n   * root.nodes[0].nodes[1].raws.before   //=> undefined\n   * root.nodes[0].nodes[1].raw('before') //=> ' '\n   *\n   * @return {string} Code style value.\n   */\n  ;\n\n  _proto.raw = function raw(prop, defaultType) {\n    var str = new _stringifier.default();\n    return str.raw(this, prop, defaultType);\n  }\n  /**\n   * Finds the Root instance of the node’s tree.\n   *\n   * @example\n   * root.nodes[0].nodes[0].root() === root\n   *\n   * @return {Root} Root parent.\n   */\n  ;\n\n  _proto.root = function root() {\n    var result = this;\n\n    while (result.parent) {\n      result = result.parent;\n    }\n\n    return result;\n  }\n  /**\n   * Clear the code style properties for the node and its children.\n   *\n   * @param {boolean} [keepBetween] Keep the raws.between symbols.\n   *\n   * @return {undefined}\n   *\n   * @example\n   * node.raws.before  //=> ' '\n   * node.cleanRaws()\n   * node.raws.before  //=> undefined\n   */\n  ;\n\n  _proto.cleanRaws = function cleanRaws(keepBetween) {\n    delete this.raws.before;\n    delete this.raws.after;\n    if (!keepBetween) delete this.raws.between;\n  };\n\n  _proto.positionInside = function positionInside(index) {\n    var string = this.toString();\n    var column = this.source.start.column;\n    var line = this.source.start.line;\n\n    for (var i = 0; i < index; i++) {\n      if (string[i] === '\\n') {\n        column = 1;\n        line += 1;\n      } else {\n        column += 1;\n      }\n    }\n\n    return {\n      line: line,\n      column: column\n    };\n  };\n\n  _proto.positionBy = function positionBy(opts) {\n    var pos = this.source.start;\n\n    if (opts.index) {\n      pos = this.positionInside(opts.index);\n    } else if (opts.word) {\n      var index = this.toString().indexOf(opts.word);\n      if (index !== -1) pos = this.positionInside(index);\n    }\n\n    return pos;\n  }\n  /**\n   * @memberof Node#\n   * @member {string} type String representing the node’s type.\n   *                       Possible values are `root`, `atrule`, `rule`,\n   *                       `decl`, or `comment`.\n   *\n   * @example\n   * postcss.decl({ prop: 'color', value: 'black' }).type //=> 'decl'\n   */\n\n  /**\n   * @memberof Node#\n   * @member {Container} parent The node’s parent node.\n   *\n   * @example\n   * root.nodes[0].parent === root\n   */\n\n  /**\n   * @memberof Node#\n   * @member {source} source The input source of the node.\n   *\n   * The property is used in source map generation.\n   *\n   * If you create a node manually (e.g., with `postcss.decl()`),\n   * that node will not have a `source` property and will be absent\n   * from the source map. For this reason, the plugin developer should\n   * consider cloning nodes to create new ones (in which case the new node’s\n   * source will reference the original, cloned node) or setting\n   * the `source` property manually.\n   *\n   * ```js\n   * // Bad\n   * const prefixed = postcss.decl({\n   *   prop: '-moz-' + decl.prop,\n   *   value: decl.value\n   * })\n   *\n   * // Good\n   * const prefixed = decl.clone({ prop: '-moz-' + decl.prop })\n   * ```\n   *\n   * ```js\n   * if (atrule.name === 'add-link') {\n   *   const rule = postcss.rule({ selector: 'a', source: atrule.source })\n   *   atrule.parent.insertBefore(atrule, rule)\n   * }\n   * ```\n   *\n   * @example\n   * decl.source.input.from //=> '/home/ai/a.sass'\n   * decl.source.start      //=> { line: 10, column: 2 }\n   * decl.source.end        //=> { line: 10, column: 12 }\n   */\n\n  /**\n   * @memberof Node#\n   * @member {object} raws Information to generate byte-to-byte equal\n   *                       node string as it was in the origin input.\n   *\n   * Every parser saves its own properties,\n   * but the default CSS parser uses:\n   *\n   * * `before`: the space symbols before the node. It also stores `*`\n   *   and `_` symbols before the declaration (IE hack).\n   * * `after`: the space symbols after the last child of the node\n   *   to the end of the node.\n   * * `between`: the symbols between the property and value\n   *   for declarations, selector and `{` for rules, or last parameter\n   *   and `{` for at-rules.\n   * * `semicolon`: contains true if the last child has\n   *   an (optional) semicolon.\n   * * `afterName`: the space between the at-rule name and its parameters.\n   * * `left`: the space symbols between `/*` and the comment’s text.\n   * * `right`: the space symbols between the comment’s text\n   *   and <code>*&#47;</code>.\n   * * `important`: the content of the important statement,\n   *   if it is not just `!important`.\n   *\n   * PostCSS cleans selectors, declaration values and at-rule parameters\n   * from comments and extra spaces, but it stores origin content in raws\n   * properties. As such, if you don’t change a declaration’s value,\n   * PostCSS will use the raw value with comments.\n   *\n   * @example\n   * const root = postcss.parse('a {\\n  color:black\\n}')\n   * root.first.first.raws //=> { before: '\\n  ', between: ':' }\n   */\n  ;\n\n  return Node;\n}();\n\nvar _default = Node;\n/**\n * @typedef {object} position\n * @property {number} line   Source line in file.\n * @property {number} column Source column in file.\n */\n\n/**\n * @typedef {object} source\n * @property {Input} input    {@link Input} with input file\n * @property {position} start The starting position of the node’s source.\n * @property {position} end   The ending position of the node’s source.\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/node.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/parse.js":
/*!******************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/parse.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _parser = _interopRequireDefault(__webpack_require__(/*! ./parser */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/parser.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! ./input */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/input.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(css, opts) {\n  var input = new _input.default(css, opts);\n  var parser = new _parser.default(input);\n\n  try {\n    parser.parse();\n  } catch (e) {\n    if (true) {\n      if (e.name === 'CssSyntaxError' && opts && opts.from) {\n        if (/\\.scss$/i.test(opts.from)) {\n          e.message += '\\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser';\n        } else if (/\\.sass/i.test(opts.from)) {\n          e.message += '\\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser';\n        } else if (/\\.less$/i.test(opts.from)) {\n          e.message += '\\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser';\n        }\n      }\n    }\n\n    throw e;\n  }\n\n  return parser.root;\n}\n\nvar _default = parse;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsImNzcyIsIm9wdHMiLCJpbnB1dCIsIklucHV0IiwicGFyc2VyIiwiUGFyc2VyIiwiZSIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIm5hbWUiLCJmcm9tIiwidGVzdCIsIm1lc3NhZ2UiLCJyb290Il0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUNBOzs7O0FBRUEsU0FBU0EsS0FBVCxDQUFnQkMsR0FBaEIsRUFBcUJDLElBQXJCLEVBQTJCO0FBQ3pCLE1BQUlDLEtBQUssR0FBRyxJQUFJQyxjQUFKLENBQVVILEdBQVYsRUFBZUMsSUFBZixDQUFaO0FBQ0EsTUFBSUcsTUFBTSxHQUFHLElBQUlDLGVBQUosQ0FBV0gsS0FBWCxDQUFiOztBQUNBLE1BQUk7QUFDRkUsSUFBQUEsTUFBTSxDQUFDTCxLQUFQO0FBQ0QsR0FGRCxDQUVFLE9BQU9PLENBQVAsRUFBVTtBQUNWLFFBQUlDLE9BQU8sQ0FBQ0MsR0FBUixDQUFZQyxRQUFaLEtBQXlCLFlBQTdCLEVBQTJDO0FBQ3pDLFVBQUlILENBQUMsQ0FBQ0ksSUFBRixLQUFXLGdCQUFYLElBQStCVCxJQUEvQixJQUF1Q0EsSUFBSSxDQUFDVSxJQUFoRCxFQUFzRDtBQUNwRCxZQUFJLFdBQVdDLElBQVgsQ0FBZ0JYLElBQUksQ0FBQ1UsSUFBckIsQ0FBSixFQUFnQztBQUM5QkwsVUFBQUEsQ0FBQyxDQUFDTyxPQUFGLElBQWEsb0NBQ0EsMkJBREEsR0FFQSx3Q0FGYjtBQUdELFNBSkQsTUFJTyxJQUFJLFVBQVVELElBQVYsQ0FBZVgsSUFBSSxDQUFDVSxJQUFwQixDQUFKLEVBQStCO0FBQ3BDTCxVQUFBQSxDQUFDLENBQUNPLE9BQUYsSUFBYSxvQ0FDQSwyQkFEQSxHQUVBLHdDQUZiO0FBR0QsU0FKTSxNQUlBLElBQUksV0FBV0QsSUFBWCxDQUFnQlgsSUFBSSxDQUFDVSxJQUFyQixDQUFKLEVBQWdDO0FBQ3JDTCxVQUFBQSxDQUFDLENBQUNPLE9BQUYsSUFBYSxvQ0FDQSwyQkFEQSxHQUVBLHdDQUZiO0FBR0Q7QUFDRjtBQUNGOztBQUNELFVBQU1QLENBQU47QUFDRDs7QUFFRCxTQUFPRixNQUFNLENBQUNVLElBQWQ7QUFDRDs7ZUFFY2YsSyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQYXJzZXIgZnJvbSAnLi9wYXJzZXInXG5pbXBvcnQgSW5wdXQgZnJvbSAnLi9pbnB1dCdcblxuZnVuY3Rpb24gcGFyc2UgKGNzcywgb3B0cykge1xuICBsZXQgaW5wdXQgPSBuZXcgSW5wdXQoY3NzLCBvcHRzKVxuICBsZXQgcGFyc2VyID0gbmV3IFBhcnNlcihpbnB1dClcbiAgdHJ5IHtcbiAgICBwYXJzZXIucGFyc2UoKVxuICB9IGNhdGNoIChlKSB7XG4gICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgIGlmIChlLm5hbWUgPT09ICdDc3NTeW50YXhFcnJvcicgJiYgb3B0cyAmJiBvcHRzLmZyb20pIHtcbiAgICAgICAgaWYgKC9cXC5zY3NzJC9pLnRlc3Qob3B0cy5mcm9tKSkge1xuICAgICAgICAgIGUubWVzc2FnZSArPSAnXFxuWW91IHRyaWVkIHRvIHBhcnNlIFNDU1Mgd2l0aCAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgJ3RoZSBzdGFuZGFyZCBDU1MgcGFyc2VyOyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgJ3RyeSBhZ2FpbiB3aXRoIHRoZSBwb3N0Y3NzLXNjc3MgcGFyc2VyJ1xuICAgICAgICB9IGVsc2UgaWYgKC9cXC5zYXNzL2kudGVzdChvcHRzLmZyb20pKSB7XG4gICAgICAgICAgZS5tZXNzYWdlICs9ICdcXG5Zb3UgdHJpZWQgdG8gcGFyc2UgU2FzcyB3aXRoICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndGhlIHN0YW5kYXJkIENTUyBwYXJzZXI7ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndHJ5IGFnYWluIHdpdGggdGhlIHBvc3Rjc3Mtc2FzcyBwYXJzZXInXG4gICAgICAgIH0gZWxzZSBpZiAoL1xcLmxlc3MkL2kudGVzdChvcHRzLmZyb20pKSB7XG4gICAgICAgICAgZS5tZXNzYWdlICs9ICdcXG5Zb3UgdHJpZWQgdG8gcGFyc2UgTGVzcyB3aXRoICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndGhlIHN0YW5kYXJkIENTUyBwYXJzZXI7ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndHJ5IGFnYWluIHdpdGggdGhlIHBvc3Rjc3MtbGVzcyBwYXJzZXInXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgdGhyb3cgZVxuICB9XG5cbiAgcmV0dXJuIHBhcnNlci5yb290XG59XG5cbmV4cG9ydCBkZWZhdWx0IHBhcnNlXG4iXSwiZmlsZSI6InBhcnNlLmpzIn0=\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/parse.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/parser.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/parser.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _declaration = _interopRequireDefault(__webpack_require__(/*! ./declaration */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/declaration.js\"));\n\nvar _tokenize = _interopRequireDefault(__webpack_require__(/*! ./tokenize */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/tokenize.js\"));\n\nvar _comment = _interopRequireDefault(__webpack_require__(/*! ./comment */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/comment.js\"));\n\nvar _atRule = _interopRequireDefault(__webpack_require__(/*! ./at-rule */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/at-rule.js\"));\n\nvar _root = _interopRequireDefault(__webpack_require__(/*! ./root */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/root.js\"));\n\nvar _rule = _interopRequireDefault(__webpack_require__(/*! ./rule */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/rule.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Parser = /*#__PURE__*/function () {\n  function Parser(input) {\n    this.input = input;\n    this.root = new _root.default();\n    this.current = this.root;\n    this.spaces = '';\n    this.semicolon = false;\n    this.createTokenizer();\n    this.root.source = {\n      input: input,\n      start: {\n        line: 1,\n        column: 1\n      }\n    };\n  }\n\n  var _proto = Parser.prototype;\n\n  _proto.createTokenizer = function createTokenizer() {\n    this.tokenizer = (0, _tokenize.default)(this.input);\n  };\n\n  _proto.parse = function parse() {\n    var token;\n\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken();\n\n      switch (token[0]) {\n        case 'space':\n          this.spaces += token[1];\n          break;\n\n        case ';':\n          this.freeSemicolon(token);\n          break;\n\n        case '}':\n          this.end(token);\n          break;\n\n        case 'comment':\n          this.comment(token);\n          break;\n\n        case 'at-word':\n          this.atrule(token);\n          break;\n\n        case '{':\n          this.emptyRule(token);\n          break;\n\n        default:\n          this.other(token);\n          break;\n      }\n    }\n\n    this.endFile();\n  };\n\n  _proto.comment = function comment(token) {\n    var node = new _comment.default();\n    this.init(node, token[2], token[3]);\n    node.source.end = {\n      line: token[4],\n      column: token[5]\n    };\n    var text = token[1].slice(2, -2);\n\n    if (/^\\s*$/.test(text)) {\n      node.text = '';\n      node.raws.left = text;\n      node.raws.right = '';\n    } else {\n      var match = text.match(/^(\\s*)([^]*[^\\s])(\\s*)$/);\n      node.text = match[2];\n      node.raws.left = match[1];\n      node.raws.right = match[3];\n    }\n  };\n\n  _proto.emptyRule = function emptyRule(token) {\n    var node = new _rule.default();\n    this.init(node, token[2], token[3]);\n    node.selector = '';\n    node.raws.between = '';\n    this.current = node;\n  };\n\n  _proto.other = function other(start) {\n    var end = false;\n    var type = null;\n    var colon = false;\n    var bracket = null;\n    var brackets = [];\n    var tokens = [];\n    var token = start;\n\n    while (token) {\n      type = token[0];\n      tokens.push(token);\n\n      if (type === '(' || type === '[') {\n        if (!bracket) bracket = token;\n        brackets.push(type === '(' ? ')' : ']');\n      } else if (brackets.length === 0) {\n        if (type === ';') {\n          if (colon) {\n            this.decl(tokens);\n            return;\n          } else {\n            break;\n          }\n        } else if (type === '{') {\n          this.rule(tokens);\n          return;\n        } else if (type === '}') {\n          this.tokenizer.back(tokens.pop());\n          end = true;\n          break;\n        } else if (type === ':') {\n          colon = true;\n        }\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop();\n        if (brackets.length === 0) bracket = null;\n      }\n\n      token = this.tokenizer.nextToken();\n    }\n\n    if (this.tokenizer.endOfFile()) end = true;\n    if (brackets.length > 0) this.unclosedBracket(bracket);\n\n    if (end && colon) {\n      while (tokens.length) {\n        token = tokens[tokens.length - 1][0];\n        if (token !== 'space' && token !== 'comment') break;\n        this.tokenizer.back(tokens.pop());\n      }\n\n      this.decl(tokens);\n    } else {\n      this.unknownWord(tokens);\n    }\n  };\n\n  _proto.rule = function rule(tokens) {\n    tokens.pop();\n    var node = new _rule.default();\n    this.init(node, tokens[0][2], tokens[0][3]);\n    node.raws.between = this.spacesAndCommentsFromEnd(tokens);\n    this.raw(node, 'selector', tokens);\n    this.current = node;\n  };\n\n  _proto.decl = function decl(tokens) {\n    var node = new _declaration.default();\n    this.init(node);\n    var last = tokens[tokens.length - 1];\n\n    if (last[0] === ';') {\n      this.semicolon = true;\n      tokens.pop();\n    }\n\n    if (last[4]) {\n      node.source.end = {\n        line: last[4],\n        column: last[5]\n      };\n    } else {\n      node.source.end = {\n        line: last[2],\n        column: last[3]\n      };\n    }\n\n    while (tokens[0][0] !== 'word') {\n      if (tokens.length === 1) this.unknownWord(tokens);\n      node.raws.before += tokens.shift()[1];\n    }\n\n    node.source.start = {\n      line: tokens[0][2],\n      column: tokens[0][3]\n    };\n    node.prop = '';\n\n    while (tokens.length) {\n      var type = tokens[0][0];\n\n      if (type === ':' || type === 'space' || type === 'comment') {\n        break;\n      }\n\n      node.prop += tokens.shift()[1];\n    }\n\n    node.raws.between = '';\n    var token;\n\n    while (tokens.length) {\n      token = tokens.shift();\n\n      if (token[0] === ':') {\n        node.raws.between += token[1];\n        break;\n      } else {\n        if (token[0] === 'word' && /\\w/.test(token[1])) {\n          this.unknownWord([token]);\n        }\n\n        node.raws.between += token[1];\n      }\n    }\n\n    if (node.prop[0] === '_' || node.prop[0] === '*') {\n      node.raws.before += node.prop[0];\n      node.prop = node.prop.slice(1);\n    }\n\n    node.raws.between += this.spacesAndCommentsFromStart(tokens);\n    this.precheckMissedSemicolon(tokens);\n\n    for (var i = tokens.length - 1; i > 0; i--) {\n      token = tokens[i];\n\n      if (token[1].toLowerCase() === '!important') {\n        node.important = true;\n        var string = this.stringFrom(tokens, i);\n        string = this.spacesFromEnd(tokens) + string;\n        if (string !== ' !important') node.raws.important = string;\n        break;\n      } else if (token[1].toLowerCase() === 'important') {\n        var cache = tokens.slice(0);\n        var str = '';\n\n        for (var j = i; j > 0; j--) {\n          var _type = cache[j][0];\n\n          if (str.trim().indexOf('!') === 0 && _type !== 'space') {\n            break;\n          }\n\n          str = cache.pop()[1] + str;\n        }\n\n        if (str.trim().indexOf('!') === 0) {\n          node.important = true;\n          node.raws.important = str;\n          tokens = cache;\n        }\n      }\n\n      if (token[0] !== 'space' && token[0] !== 'comment') {\n        break;\n      }\n    }\n\n    this.raw(node, 'value', tokens);\n    if (node.value.indexOf(':') !== -1) this.checkMissedSemicolon(tokens);\n  };\n\n  _proto.atrule = function atrule(token) {\n    var node = new _atRule.default();\n    node.name = token[1].slice(1);\n\n    if (node.name === '') {\n      this.unnamedAtrule(node, token);\n    }\n\n    this.init(node, token[2], token[3]);\n    var prev;\n    var shift;\n    var last = false;\n    var open = false;\n    var params = [];\n\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken();\n\n      if (token[0] === ';') {\n        node.source.end = {\n          line: token[2],\n          column: token[3]\n        };\n        this.semicolon = true;\n        break;\n      } else if (token[0] === '{') {\n        open = true;\n        break;\n      } else if (token[0] === '}') {\n        if (params.length > 0) {\n          shift = params.length - 1;\n          prev = params[shift];\n\n          while (prev && prev[0] === 'space') {\n            prev = params[--shift];\n          }\n\n          if (prev) {\n            node.source.end = {\n              line: prev[4],\n              column: prev[5]\n            };\n          }\n        }\n\n        this.end(token);\n        break;\n      } else {\n        params.push(token);\n      }\n\n      if (this.tokenizer.endOfFile()) {\n        last = true;\n        break;\n      }\n    }\n\n    node.raws.between = this.spacesAndCommentsFromEnd(params);\n\n    if (params.length) {\n      node.raws.afterName = this.spacesAndCommentsFromStart(params);\n      this.raw(node, 'params', params);\n\n      if (last) {\n        token = params[params.length - 1];\n        node.source.end = {\n          line: token[4],\n          column: token[5]\n        };\n        this.spaces = node.raws.between;\n        node.raws.between = '';\n      }\n    } else {\n      node.raws.afterName = '';\n      node.params = '';\n    }\n\n    if (open) {\n      node.nodes = [];\n      this.current = node;\n    }\n  };\n\n  _proto.end = function end(token) {\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon;\n    }\n\n    this.semicolon = false;\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces;\n    this.spaces = '';\n\n    if (this.current.parent) {\n      this.current.source.end = {\n        line: token[2],\n        column: token[3]\n      };\n      this.current = this.current.parent;\n    } else {\n      this.unexpectedClose(token);\n    }\n  };\n\n  _proto.endFile = function endFile() {\n    if (this.current.parent) this.unclosedBlock();\n\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon;\n    }\n\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces;\n  };\n\n  _proto.freeSemicolon = function freeSemicolon(token) {\n    this.spaces += token[1];\n\n    if (this.current.nodes) {\n      var prev = this.current.nodes[this.current.nodes.length - 1];\n\n      if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n        prev.raws.ownSemicolon = this.spaces;\n        this.spaces = '';\n      }\n    }\n  } // Helpers\n  ;\n\n  _proto.init = function init(node, line, column) {\n    this.current.push(node);\n    node.source = {\n      start: {\n        line: line,\n        column: column\n      },\n      input: this.input\n    };\n    node.raws.before = this.spaces;\n    this.spaces = '';\n    if (node.type !== 'comment') this.semicolon = false;\n  };\n\n  _proto.raw = function raw(node, prop, tokens) {\n    var token, type;\n    var length = tokens.length;\n    var value = '';\n    var clean = true;\n    var next, prev;\n    var pattern = /^([.|#])?([\\w])+/i;\n\n    for (var i = 0; i < length; i += 1) {\n      token = tokens[i];\n      type = token[0];\n\n      if (type === 'comment' && node.type === 'rule') {\n        prev = tokens[i - 1];\n        next = tokens[i + 1];\n\n        if (prev[0] !== 'space' && next[0] !== 'space' && pattern.test(prev[1]) && pattern.test(next[1])) {\n          value += token[1];\n        } else {\n          clean = false;\n        }\n\n        continue;\n      }\n\n      if (type === 'comment' || type === 'space' && i === length - 1) {\n        clean = false;\n      } else {\n        value += token[1];\n      }\n    }\n\n    if (!clean) {\n      var raw = tokens.reduce(function (all, i) {\n        return all + i[1];\n      }, '');\n      node.raws[prop] = {\n        value: value,\n        raw: raw\n      };\n    }\n\n    node[prop] = value;\n  };\n\n  _proto.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) {\n    var lastTokenType;\n    var spaces = '';\n\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0];\n      if (lastTokenType !== 'space' && lastTokenType !== 'comment') break;\n      spaces = tokens.pop()[1] + spaces;\n    }\n\n    return spaces;\n  };\n\n  _proto.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) {\n    var next;\n    var spaces = '';\n\n    while (tokens.length) {\n      next = tokens[0][0];\n      if (next !== 'space' && next !== 'comment') break;\n      spaces += tokens.shift()[1];\n    }\n\n    return spaces;\n  };\n\n  _proto.spacesFromEnd = function spacesFromEnd(tokens) {\n    var lastTokenType;\n    var spaces = '';\n\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0];\n      if (lastTokenType !== 'space') break;\n      spaces = tokens.pop()[1] + spaces;\n    }\n\n    return spaces;\n  };\n\n  _proto.stringFrom = function stringFrom(tokens, from) {\n    var result = '';\n\n    for (var i = from; i < tokens.length; i++) {\n      result += tokens[i][1];\n    }\n\n    tokens.splice(from, tokens.length - from);\n    return result;\n  };\n\n  _proto.colon = function colon(tokens) {\n    var brackets = 0;\n    var token, type, prev;\n\n    for (var i = 0; i < tokens.length; i++) {\n      token = tokens[i];\n      type = token[0];\n\n      if (type === '(') {\n        brackets += 1;\n      }\n\n      if (type === ')') {\n        brackets -= 1;\n      }\n\n      if (brackets === 0 && type === ':') {\n        if (!prev) {\n          this.doubleColon(token);\n        } else if (prev[0] === 'word' && prev[1] === 'progid') {\n          continue;\n        } else {\n          return i;\n        }\n      }\n\n      prev = token;\n    }\n\n    return false;\n  } // Errors\n  ;\n\n  _proto.unclosedBracket = function unclosedBracket(bracket) {\n    throw this.input.error('Unclosed bracket', bracket[2], bracket[3]);\n  };\n\n  _proto.unknownWord = function unknownWord(tokens) {\n    throw this.input.error('Unknown word', tokens[0][2], tokens[0][3]);\n  };\n\n  _proto.unexpectedClose = function unexpectedClose(token) {\n    throw this.input.error('Unexpected }', token[2], token[3]);\n  };\n\n  _proto.unclosedBlock = function unclosedBlock() {\n    var pos = this.current.source.start;\n    throw this.input.error('Unclosed block', pos.line, pos.column);\n  };\n\n  _proto.doubleColon = function doubleColon(token) {\n    throw this.input.error('Double colon', token[2], token[3]);\n  };\n\n  _proto.unnamedAtrule = function unnamedAtrule(node, token) {\n    throw this.input.error('At-rule without name', token[2], token[3]);\n  };\n\n  _proto.precheckMissedSemicolon = function precheckMissedSemicolon()\n  /* tokens */\n  {// Hook for Safe Parser\n  };\n\n  _proto.checkMissedSemicolon = function checkMissedSemicolon(tokens) {\n    var colon = this.colon(tokens);\n    if (colon === false) return;\n    var founded = 0;\n    var token;\n\n    for (var j = colon - 1; j >= 0; j--) {\n      token = tokens[j];\n\n      if (token[0] !== 'space') {\n        founded += 1;\n        if (founded === 2) break;\n      }\n    }\n\n    throw this.input.error('Missed semicolon', token[2], token[3]);\n  };\n\n  return Parser;\n}();\n\nexports.default = Parser;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/parser.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/previous-map.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/previous-map.js ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _sourceMap = _interopRequireDefault(__webpack_require__(/*! source-map */ \"./node_modules/postcss-values-parser/node_modules/source-map/source-map.js\"));\n\nvar _path = _interopRequireDefault(__webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\"));\n\nvar _fs = _interopRequireDefault(__webpack_require__(/*! fs */ 7));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction fromBase64(str) {\n  if (Buffer) {\n    return Buffer.from(str, 'base64').toString();\n  } else {\n    return window.atob(str);\n  }\n}\n/**\n * Source map information from input CSS.\n * For example, source map after Sass compiler.\n *\n * This class will automatically find source map in input CSS or in file system\n * near input file (according `from` option).\n *\n * @example\n * const root = postcss.parse(css, { from: 'a.sass.css' })\n * root.input.map //=> PreviousMap\n */\n\n\nvar PreviousMap = /*#__PURE__*/function () {\n  /**\n   * @param {string}         css    Input CSS source.\n   * @param {processOptions} [opts] {@link Processor#process} options.\n   */\n  function PreviousMap(css, opts) {\n    this.loadAnnotation(css);\n    /**\n     * Was source map inlined by data-uri to input CSS.\n     *\n     * @type {boolean}\n     */\n\n    this.inline = this.startWith(this.annotation, 'data:');\n    var prev = opts.map ? opts.map.prev : undefined;\n    var text = this.loadMap(opts.from, prev);\n    if (text) this.text = text;\n  }\n  /**\n   * Create a instance of `SourceMapGenerator` class\n   * from the `source-map` library to work with source map information.\n   *\n   * It is lazy method, so it will create object only on first call\n   * and then it will use cache.\n   *\n   * @return {SourceMapGenerator} Object with source map information.\n   */\n\n\n  var _proto = PreviousMap.prototype;\n\n  _proto.consumer = function consumer() {\n    if (!this.consumerCache) {\n      this.consumerCache = new _sourceMap.default.SourceMapConsumer(this.text);\n    }\n\n    return this.consumerCache;\n  }\n  /**\n   * Does source map contains `sourcesContent` with input source text.\n   *\n   * @return {boolean} Is `sourcesContent` present.\n   */\n  ;\n\n  _proto.withContent = function withContent() {\n    return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);\n  };\n\n  _proto.startWith = function startWith(string, start) {\n    if (!string) return false;\n    return string.substr(0, start.length) === start;\n  };\n\n  _proto.getAnnotationURL = function getAnnotationURL(sourceMapString) {\n    return sourceMapString.match(/\\/\\*\\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\\*\\//)[1].trim();\n  };\n\n  _proto.loadAnnotation = function loadAnnotation(css) {\n    var annotations = css.match(/\\/\\*\\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\\*\\//gm);\n\n    if (annotations && annotations.length > 0) {\n      // Locate the last sourceMappingURL to avoid picking up\n      // sourceMappingURLs from comments, strings, etc.\n      var lastAnnotation = annotations[annotations.length - 1];\n\n      if (lastAnnotation) {\n        this.annotation = this.getAnnotationURL(lastAnnotation);\n      }\n    }\n  };\n\n  _proto.decodeInline = function decodeInline(text) {\n    var baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/;\n    var baseUri = /^data:application\\/json;base64,/;\n    var uri = 'data:application/json,';\n\n    if (this.startWith(text, uri)) {\n      return decodeURIComponent(text.substr(uri.length));\n    }\n\n    if (baseCharsetUri.test(text) || baseUri.test(text)) {\n      return fromBase64(text.substr(RegExp.lastMatch.length));\n    }\n\n    var encoding = text.match(/data:application\\/json;([^,]+),/)[1];\n    throw new Error('Unsupported source map encoding ' + encoding);\n  };\n\n  _proto.loadMap = function loadMap(file, prev) {\n    if (prev === false) return false;\n\n    if (prev) {\n      if (typeof prev === 'string') {\n        return prev;\n      } else if (typeof prev === 'function') {\n        var prevPath = prev(file);\n\n        if (prevPath && _fs.default.existsSync && _fs.default.existsSync(prevPath)) {\n          return _fs.default.readFileSync(prevPath, 'utf-8').toString().trim();\n        } else {\n          throw new Error('Unable to load previous source map: ' + prevPath.toString());\n        }\n      } else if (prev instanceof _sourceMap.default.SourceMapConsumer) {\n        return _sourceMap.default.SourceMapGenerator.fromSourceMap(prev).toString();\n      } else if (prev instanceof _sourceMap.default.SourceMapGenerator) {\n        return prev.toString();\n      } else if (this.isMap(prev)) {\n        return JSON.stringify(prev);\n      } else {\n        throw new Error('Unsupported previous source map format: ' + prev.toString());\n      }\n    } else if (this.inline) {\n      return this.decodeInline(this.annotation);\n    } else if (this.annotation) {\n      var map = this.annotation;\n      if (file) map = _path.default.join(_path.default.dirname(file), map);\n      this.root = _path.default.dirname(map);\n\n      if (_fs.default.existsSync && _fs.default.existsSync(map)) {\n        return _fs.default.readFileSync(map, 'utf-8').toString().trim();\n      } else {\n        return false;\n      }\n    }\n  };\n\n  _proto.isMap = function isMap(map) {\n    if (typeof map !== 'object') return false;\n    return typeof map.mappings === 'string' || typeof map._mappings === 'string';\n  };\n\n  return PreviousMap;\n}();\n\nvar _default = PreviousMap;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/previous-map.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/processor.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/processor.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _lazyResult = _interopRequireDefault(__webpack_require__(/*! ./lazy-result */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/lazy-result.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Contains plugins to process CSS. Create one `Processor` instance,\n * initialize its plugins, and then use that instance on numerous CSS files.\n *\n * @example\n * const processor = postcss([autoprefixer, precss])\n * processor.process(css1).then(result => console.log(result.css))\n * processor.process(css2).then(result => console.log(result.css))\n */\nvar Processor = /*#__PURE__*/function () {\n  /**\n   * @param {Array.<Plugin|pluginFunction>|Processor} plugins PostCSS plugins.\n   *        See {@link Processor#use} for plugin format.\n   */\n  function Processor(plugins) {\n    if (plugins === void 0) {\n      plugins = [];\n    }\n\n    /**\n     * Current PostCSS version.\n     *\n     * @type {string}\n     *\n     * @example\n     * if (result.processor.version.split('.')[0] !== '6') {\n     *   throw new Error('This plugin works only with PostCSS 6')\n     * }\n     */\n    this.version = '7.0.39';\n    /**\n     * Plugins added to this processor.\n     *\n     * @type {pluginFunction[]}\n     *\n     * @example\n     * const processor = postcss([autoprefixer, precss])\n     * processor.plugins.length //=> 2\n     */\n\n    this.plugins = this.normalize(plugins);\n  }\n  /**\n   * Adds a plugin to be used as a CSS processor.\n   *\n   * PostCSS plugin can be in 4 formats:\n   * * A plugin created by {@link postcss.plugin} method.\n   * * A function. PostCSS will pass the function a @{link Root}\n   *   as the first argument and current {@link Result} instance\n   *   as the second.\n   * * An object with a `postcss` method. PostCSS will use that method\n   *   as described in #2.\n   * * Another {@link Processor} instance. PostCSS will copy plugins\n   *   from that instance into this one.\n   *\n   * Plugins can also be added by passing them as arguments when creating\n   * a `postcss` instance (see [`postcss(plugins)`]).\n   *\n   * Asynchronous plugins should return a `Promise` instance.\n   *\n   * @param {Plugin|pluginFunction|Processor} plugin PostCSS plugin\n   *                                                 or {@link Processor}\n   *                                                 with plugins.\n   *\n   * @example\n   * const processor = postcss()\n   *   .use(autoprefixer)\n   *   .use(precss)\n   *\n   * @return {Processes} Current processor to make methods chain.\n   */\n\n\n  var _proto = Processor.prototype;\n\n  _proto.use = function use(plugin) {\n    this.plugins = this.plugins.concat(this.normalize([plugin]));\n    return this;\n  }\n  /**\n   * Parses source CSS and returns a {@link LazyResult} Promise proxy.\n   * Because some plugins can be asynchronous it doesn’t make\n   * any transformations. Transformations will be applied\n   * in the {@link LazyResult} methods.\n   *\n   * @param {string|toString|Result} css String with input CSS or any object\n   *                                     with a `toString()` method,\n   *                                     like a Buffer. Optionally, send\n   *                                     a {@link Result} instance\n   *                                     and the processor will take\n   *                                     the {@link Root} from it.\n   * @param {processOptions} [opts]      Options.\n   *\n   * @return {LazyResult} Promise proxy.\n   *\n   * @example\n   * processor.process(css, { from: 'a.css', to: 'a.out.css' })\n   *   .then(result => {\n   *      console.log(result.css)\n   *   })\n   */\n  ;\n\n  _proto.process = function (_process) {\n    function process(_x) {\n      return _process.apply(this, arguments);\n    }\n\n    process.toString = function () {\n      return _process.toString();\n    };\n\n    return process;\n  }(function (css, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (this.plugins.length === 0 && opts.parser === opts.stringifier) {\n      if (true) {\n        if (typeof console !== 'undefined' && console.warn) {\n          console.warn('You did not set any plugins, parser, or stringifier. ' + 'Right now, PostCSS does nothing. Pick plugins for your case ' + 'on https://www.postcss.parts/ and use them in postcss.config.js.');\n        }\n      }\n    }\n\n    return new _lazyResult.default(this, css, opts);\n  });\n\n  _proto.normalize = function normalize(plugins) {\n    var normalized = [];\n\n    for (var _iterator = _createForOfIteratorHelperLoose(plugins), _step; !(_step = _iterator()).done;) {\n      var i = _step.value;\n\n      if (i.postcss === true) {\n        var plugin = i();\n        throw new Error('PostCSS plugin ' + plugin.postcssPlugin + ' requires PostCSS 8.\\n' + 'Migration guide for end-users:\\n' + 'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users');\n      }\n\n      if (i.postcss) i = i.postcss;\n\n      if (typeof i === 'object' && Array.isArray(i.plugins)) {\n        normalized = normalized.concat(i.plugins);\n      } else if (typeof i === 'function') {\n        normalized.push(i);\n      } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n        if (true) {\n          throw new Error('PostCSS syntaxes cannot be used as plugins. Instead, please use ' + 'one of the syntax/parser/stringifier options as outlined ' + 'in your PostCSS runner documentation.');\n        }\n      } else if (typeof i === 'object' && i.postcssPlugin) {\n        throw new Error('PostCSS plugin ' + i.postcssPlugin + ' requires PostCSS 8.\\n' + 'Migration guide for end-users:\\n' + 'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users');\n      } else {\n        throw new Error(i + ' is not a PostCSS plugin');\n      }\n    }\n\n    return normalized;\n  };\n\n  return Processor;\n}();\n\nvar _default = Processor;\n/**\n * @callback builder\n * @param {string} part          Part of generated CSS connected to this node.\n * @param {Node}   node          AST node.\n * @param {\"start\"|\"end\"} [type] Node’s part type.\n */\n\n/**\n * @callback parser\n *\n * @param {string|toString} css   String with input CSS or any object\n *                                with toString() method, like a Buffer.\n * @param {processOptions} [opts] Options with only `from` and `map` keys.\n *\n * @return {Root} PostCSS AST\n */\n\n/**\n * @callback stringifier\n *\n * @param {Node} node       Start node for stringifing. Usually {@link Root}.\n * @param {builder} builder Function to concatenate CSS from node’s parts\n *                          or generate string and source map.\n *\n * @return {void}\n */\n\n/**\n * @typedef {object} syntax\n * @property {parser} parse          Function to generate AST by string.\n * @property {stringifier} stringify Function to generate string by AST.\n */\n\n/**\n * @typedef {object} toString\n * @property {function} toString\n */\n\n/**\n * @callback pluginFunction\n * @param {Root} root     Parsed input CSS.\n * @param {Result} result Result to set warnings or check other plugins.\n */\n\n/**\n * @typedef {object} Plugin\n * @property {function} postcss PostCSS plugin function.\n */\n\n/**\n * @typedef {object} processOptions\n * @property {string} from             The path of the CSS source file.\n *                                     You should always set `from`,\n *                                     because it is used in source map\n *                                     generation and syntax error messages.\n * @property {string} to               The path where you’ll put the output\n *                                     CSS file. You should always set `to`\n *                                     to generate correct source maps.\n * @property {parser} parser           Function to generate AST by string.\n * @property {stringifier} stringifier Class to generate string by AST.\n * @property {syntax} syntax           Object with `parse` and `stringify`.\n * @property {object} map              Source map options.\n * @property {boolean} map.inline                    Does source map should\n *                                                   be embedded in the output\n *                                                   CSS as a base64-encoded\n *                                                   comment.\n * @property {string|object|false|function} map.prev Source map content\n *                                                   from a previous\n *                                                   processing step\n *                                                   (for example, Sass).\n *                                                   PostCSS will try to find\n *                                                   previous map automatically,\n *                                                   so you could disable it by\n *                                                   `false` value.\n * @property {boolean} map.sourcesContent            Does PostCSS should set\n *                                                   the origin content to map.\n * @property {string|false} map.annotation           Does PostCSS should set\n *                                                   annotation comment to map.\n * @property {string} map.from                       Override `from` in map’s\n *                                                   sources`.\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/processor.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/result.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/result.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _warning = _interopRequireDefault(__webpack_require__(/*! ./warning */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/warning.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Provides the result of the PostCSS transformations.\n *\n * A Result instance is returned by {@link LazyResult#then}\n * or {@link Root#toResult} methods.\n *\n * @example\n * postcss([autoprefixer]).process(css).then(result => {\n *  console.log(result.css)\n * })\n *\n * @example\n * const result2 = postcss.parse(css).toResult()\n */\nvar Result = /*#__PURE__*/function () {\n  /**\n   * @param {Processor} processor Processor used for this transformation.\n   * @param {Root}      root      Root node after all transformations.\n   * @param {processOptions} opts Options from the {@link Processor#process}\n   *                              or {@link Root#toResult}.\n   */\n  function Result(processor, root, opts) {\n    /**\n     * The Processor instance used for this transformation.\n     *\n     * @type {Processor}\n     *\n     * @example\n     * for (const plugin of result.processor.plugins) {\n     *   if (plugin.postcssPlugin === 'postcss-bad') {\n     *     throw 'postcss-good is incompatible with postcss-bad'\n     *   }\n     * })\n     */\n    this.processor = processor;\n    /**\n     * Contains messages from plugins (e.g., warnings or custom messages).\n     * Each message should have type and plugin properties.\n     *\n     * @type {Message[]}\n     *\n     * @example\n     * postcss.plugin('postcss-min-browser', () => {\n     *   return (root, result) => {\n     *     const browsers = detectMinBrowsersByCanIUse(root)\n     *     result.messages.push({\n     *       type: 'min-browser',\n     *       plugin: 'postcss-min-browser',\n     *       browsers\n     *     })\n     *   }\n     * })\n     */\n\n    this.messages = [];\n    /**\n     * Root node after all transformations.\n     *\n     * @type {Root}\n     *\n     * @example\n     * root.toResult().root === root\n     */\n\n    this.root = root;\n    /**\n     * Options from the {@link Processor#process} or {@link Root#toResult} call\n     * that produced this Result instance.\n     *\n     * @type {processOptions}\n     *\n     * @example\n     * root.toResult(opts).opts === opts\n     */\n\n    this.opts = opts;\n    /**\n     * A CSS string representing of {@link Result#root}.\n     *\n     * @type {string}\n     *\n     * @example\n     * postcss.parse('a{}').toResult().css //=> \"a{}\"\n     */\n\n    this.css = undefined;\n    /**\n     * An instance of `SourceMapGenerator` class from the `source-map` library,\n     * representing changes to the {@link Result#root} instance.\n     *\n     * @type {SourceMapGenerator}\n     *\n     * @example\n     * result.map.toJSON() //=> { version: 3, file: 'a.css', … }\n     *\n     * @example\n     * if (result.map) {\n     *   fs.writeFileSync(result.opts.to + '.map', result.map.toString())\n     * }\n     */\n\n    this.map = undefined;\n  }\n  /**\n   * Returns for @{link Result#css} content.\n   *\n   * @example\n   * result + '' === result.css\n   *\n   * @return {string} String representing of {@link Result#root}.\n   */\n\n\n  var _proto = Result.prototype;\n\n  _proto.toString = function toString() {\n    return this.css;\n  }\n  /**\n   * Creates an instance of {@link Warning} and adds it\n   * to {@link Result#messages}.\n   *\n   * @param {string} text        Warning message.\n   * @param {Object} [opts]      Warning options.\n   * @param {Node}   opts.node   CSS node that caused the warning.\n   * @param {string} opts.word   Word in CSS source that caused the warning.\n   * @param {number} opts.index  Index in CSS node string that caused\n   *                             the warning.\n   * @param {string} opts.plugin Name of the plugin that created\n   *                             this warning. {@link Result#warn} fills\n   *                             this property automatically.\n   *\n   * @return {Warning} Created warning.\n   */\n  ;\n\n  _proto.warn = function warn(text, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (!opts.plugin) {\n      if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n        opts.plugin = this.lastPlugin.postcssPlugin;\n      }\n    }\n\n    var warning = new _warning.default(text, opts);\n    this.messages.push(warning);\n    return warning;\n  }\n  /**\n     * Returns warnings from plugins. Filters {@link Warning} instances\n     * from {@link Result#messages}.\n     *\n     * @example\n     * result.warnings().forEach(warn => {\n     *   console.warn(warn.toString())\n     * })\n     *\n     * @return {Warning[]} Warnings from plugins.\n     */\n  ;\n\n  _proto.warnings = function warnings() {\n    return this.messages.filter(function (i) {\n      return i.type === 'warning';\n    });\n  }\n  /**\n   * An alias for the {@link Result#css} property.\n   * Use it with syntaxes that generate non-CSS output.\n   *\n   * @type {string}\n   *\n   * @example\n   * result.css === result.content\n   */\n  ;\n\n  _createClass(Result, [{\n    key: \"content\",\n    get: function get() {\n      return this.css;\n    }\n  }]);\n\n  return Result;\n}();\n\nvar _default = Result;\n/**\n * @typedef  {object} Message\n * @property {string} type   Message type.\n * @property {string} plugin Source PostCSS plugin name.\n */\n\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/result.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/root.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/root.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _container = _interopRequireDefault(__webpack_require__(/*! ./container */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Represents a CSS file and contains all its parsed nodes.\n *\n * @extends Container\n *\n * @example\n * const root = postcss.parse('a{color:black} b{z-index:2}')\n * root.type         //=> 'root'\n * root.nodes.length //=> 2\n */\nvar Root = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(Root, _Container);\n\n  function Root(defaults) {\n    var _this;\n\n    _this = _Container.call(this, defaults) || this;\n    _this.type = 'root';\n    if (!_this.nodes) _this.nodes = [];\n    return _this;\n  }\n\n  var _proto = Root.prototype;\n\n  _proto.removeChild = function removeChild(child, ignore) {\n    var index = this.index(child);\n\n    if (!ignore && index === 0 && this.nodes.length > 1) {\n      this.nodes[1].raws.before = this.nodes[index].raws.before;\n    }\n\n    return _Container.prototype.removeChild.call(this, child);\n  };\n\n  _proto.normalize = function normalize(child, sample, type) {\n    var nodes = _Container.prototype.normalize.call(this, child);\n\n    if (sample) {\n      if (type === 'prepend') {\n        if (this.nodes.length > 1) {\n          sample.raws.before = this.nodes[1].raws.before;\n        } else {\n          delete sample.raws.before;\n        }\n      } else if (this.first !== sample) {\n        for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {\n          var node = _step.value;\n          node.raws.before = sample.raws.before;\n        }\n      }\n    }\n\n    return nodes;\n  }\n  /**\n   * Returns a {@link Result} instance representing the root’s CSS.\n   *\n   * @param {processOptions} [opts] Options with only `to` and `map` keys.\n   *\n   * @return {Result} Result with current root’s CSS.\n   *\n   * @example\n   * const root1 = postcss.parse(css1, { from: 'a.css' })\n   * const root2 = postcss.parse(css2, { from: 'b.css' })\n   * root1.append(root2)\n   * const result = root1.toResult({ to: 'all.css', map: true })\n   */\n  ;\n\n  _proto.toResult = function toResult(opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    var LazyResult = __webpack_require__(/*! ./lazy-result */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/lazy-result.js\");\n\n    var Processor = __webpack_require__(/*! ./processor */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/processor.js\");\n\n    var lazy = new LazyResult(new Processor(), this, opts);\n    return lazy.stringify();\n  }\n  /**\n   * @memberof Root#\n   * @member {object} raws Information to generate byte-to-byte equal\n   *                       node string as it was in the origin input.\n   *\n   * Every parser saves its own properties,\n   * but the default CSS parser uses:\n   *\n   * * `after`: the space symbols after the last child to the end of file.\n   * * `semicolon`: is the last child has an (optional) semicolon.\n   *\n   * @example\n   * postcss.parse('a {}\\n').raws //=> { after: '\\n' }\n   * postcss.parse('a {}').raws   //=> { after: '' }\n   */\n  ;\n\n  return Root;\n}(_container.default);\n\nvar _default = Root;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/root.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/rule.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/rule.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _container = _interopRequireDefault(__webpack_require__(/*! ./container */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/container.js\"));\n\nvar _list = _interopRequireDefault(__webpack_require__(/*! ./list */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/list.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Represents a CSS rule: a selector followed by a declaration block.\n *\n * @extends Container\n *\n * @example\n * const root = postcss.parse('a{}')\n * const rule = root.first\n * rule.type       //=> 'rule'\n * rule.toString() //=> 'a{}'\n */\nvar Rule = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(Rule, _Container);\n\n  function Rule(defaults) {\n    var _this;\n\n    _this = _Container.call(this, defaults) || this;\n    _this.type = 'rule';\n    if (!_this.nodes) _this.nodes = [];\n    return _this;\n  }\n  /**\n   * An array containing the rule’s individual selectors.\n   * Groups of selectors are split at commas.\n   *\n   * @type {string[]}\n   *\n   * @example\n   * const root = postcss.parse('a, b { }')\n   * const rule = root.first\n   *\n   * rule.selector  //=> 'a, b'\n   * rule.selectors //=> ['a', 'b']\n   *\n   * rule.selectors = ['a', 'strong']\n   * rule.selector //=> 'a, strong'\n   */\n\n\n  _createClass(Rule, [{\n    key: \"selectors\",\n    get: function get() {\n      return _list.default.comma(this.selector);\n    },\n    set: function set(values) {\n      var match = this.selector ? this.selector.match(/,\\s*/) : null;\n      var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen');\n      this.selector = values.join(sep);\n    }\n    /**\n     * @memberof Rule#\n     * @member {string} selector The rule’s full selector represented\n     *                           as a string.\n     *\n     * @example\n     * const root = postcss.parse('a, b { }')\n     * const rule = root.first\n     * rule.selector //=> 'a, b'\n     */\n\n    /**\n     * @memberof Rule#\n     * @member {object} raws Information to generate byte-to-byte equal\n     *                       node string as it was in the origin input.\n     *\n     * Every parser saves its own properties,\n     * but the default CSS parser uses:\n     *\n     * * `before`: the space symbols before the node. It also stores `*`\n     *   and `_` symbols before the declaration (IE hack).\n     * * `after`: the space symbols after the last child of the node\n     *   to the end of the node.\n     * * `between`: the symbols between the property and value\n     *   for declarations, selector and `{` for rules, or last parameter\n     *   and `{` for at-rules.\n     * * `semicolon`: contains `true` if the last child has\n     *   an (optional) semicolon.\n     * * `ownSemicolon`: contains `true` if there is semicolon after rule.\n     *\n     * PostCSS cleans selectors from comments and extra spaces,\n     * but it stores origin content in raws properties.\n     * As such, if you don’t change a declaration’s value,\n     * PostCSS will use the raw value with comments.\n     *\n     * @example\n     * const root = postcss.parse('a {\\n  color:black\\n}')\n     * root.first.first.raws //=> { before: '', between: ' ', after: '\\n' }\n     */\n\n  }]);\n\n  return Rule;\n}(_container.default);\n\nvar _default = Rule;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/rule.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js":
/*!************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\nvar DEFAULT_RAW = {\n  colon: ': ',\n  indent: '    ',\n  beforeDecl: '\\n',\n  beforeRule: '\\n',\n  beforeOpen: ' ',\n  beforeClose: '\\n',\n  beforeComment: '\\n',\n  after: '\\n',\n  emptyBody: '',\n  commentLeft: ' ',\n  commentRight: ' ',\n  semicolon: false\n};\n\nfunction capitalize(str) {\n  return str[0].toUpperCase() + str.slice(1);\n}\n\nvar Stringifier = /*#__PURE__*/function () {\n  function Stringifier(builder) {\n    this.builder = builder;\n  }\n\n  var _proto = Stringifier.prototype;\n\n  _proto.stringify = function stringify(node, semicolon) {\n    this[node.type](node, semicolon);\n  };\n\n  _proto.root = function root(node) {\n    this.body(node);\n    if (node.raws.after) this.builder(node.raws.after);\n  };\n\n  _proto.comment = function comment(node) {\n    var left = this.raw(node, 'left', 'commentLeft');\n    var right = this.raw(node, 'right', 'commentRight');\n    this.builder('/*' + left + node.text + right + '*/', node);\n  };\n\n  _proto.decl = function decl(node, semicolon) {\n    var between = this.raw(node, 'between', 'colon');\n    var string = node.prop + between + this.rawValue(node, 'value');\n\n    if (node.important) {\n      string += node.raws.important || ' !important';\n    }\n\n    if (semicolon) string += ';';\n    this.builder(string, node);\n  };\n\n  _proto.rule = function rule(node) {\n    this.block(node, this.rawValue(node, 'selector'));\n\n    if (node.raws.ownSemicolon) {\n      this.builder(node.raws.ownSemicolon, node, 'end');\n    }\n  };\n\n  _proto.atrule = function atrule(node, semicolon) {\n    var name = '@' + node.name;\n    var params = node.params ? this.rawValue(node, 'params') : '';\n\n    if (typeof node.raws.afterName !== 'undefined') {\n      name += node.raws.afterName;\n    } else if (params) {\n      name += ' ';\n    }\n\n    if (node.nodes) {\n      this.block(node, name + params);\n    } else {\n      var end = (node.raws.between || '') + (semicolon ? ';' : '');\n      this.builder(name + params + end, node);\n    }\n  };\n\n  _proto.body = function body(node) {\n    var last = node.nodes.length - 1;\n\n    while (last > 0) {\n      if (node.nodes[last].type !== 'comment') break;\n      last -= 1;\n    }\n\n    var semicolon = this.raw(node, 'semicolon');\n\n    for (var i = 0; i < node.nodes.length; i++) {\n      var child = node.nodes[i];\n      var before = this.raw(child, 'before');\n      if (before) this.builder(before);\n      this.stringify(child, last !== i || semicolon);\n    }\n  };\n\n  _proto.block = function block(node, start) {\n    var between = this.raw(node, 'between', 'beforeOpen');\n    this.builder(start + between + '{', node, 'start');\n    var after;\n\n    if (node.nodes && node.nodes.length) {\n      this.body(node);\n      after = this.raw(node, 'after');\n    } else {\n      after = this.raw(node, 'after', 'emptyBody');\n    }\n\n    if (after) this.builder(after);\n    this.builder('}', node, 'end');\n  };\n\n  _proto.raw = function raw(node, own, detect) {\n    var value;\n    if (!detect) detect = own; // Already had\n\n    if (own) {\n      value = node.raws[own];\n      if (typeof value !== 'undefined') return value;\n    }\n\n    var parent = node.parent; // Hack for first rule in CSS\n\n    if (detect === 'before') {\n      if (!parent || parent.type === 'root' && parent.first === node) {\n        return '';\n      }\n    } // Floating child without parent\n\n\n    if (!parent) return DEFAULT_RAW[detect]; // Detect style by other nodes\n\n    var root = node.root();\n    if (!root.rawCache) root.rawCache = {};\n\n    if (typeof root.rawCache[detect] !== 'undefined') {\n      return root.rawCache[detect];\n    }\n\n    if (detect === 'before' || detect === 'after') {\n      return this.beforeAfter(node, detect);\n    } else {\n      var method = 'raw' + capitalize(detect);\n\n      if (this[method]) {\n        value = this[method](root, node);\n      } else {\n        root.walk(function (i) {\n          value = i.raws[own];\n          if (typeof value !== 'undefined') return false;\n        });\n      }\n    }\n\n    if (typeof value === 'undefined') value = DEFAULT_RAW[detect];\n    root.rawCache[detect] = value;\n    return value;\n  };\n\n  _proto.rawSemicolon = function rawSemicolon(root) {\n    var value;\n    root.walk(function (i) {\n      if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n        value = i.raws.semicolon;\n        if (typeof value !== 'undefined') return false;\n      }\n    });\n    return value;\n  };\n\n  _proto.rawEmptyBody = function rawEmptyBody(root) {\n    var value;\n    root.walk(function (i) {\n      if (i.nodes && i.nodes.length === 0) {\n        value = i.raws.after;\n        if (typeof value !== 'undefined') return false;\n      }\n    });\n    return value;\n  };\n\n  _proto.rawIndent = function rawIndent(root) {\n    if (root.raws.indent) return root.raws.indent;\n    var value;\n    root.walk(function (i) {\n      var p = i.parent;\n\n      if (p && p !== root && p.parent && p.parent === root) {\n        if (typeof i.raws.before !== 'undefined') {\n          var parts = i.raws.before.split('\\n');\n          value = parts[parts.length - 1];\n          value = value.replace(/[^\\s]/g, '');\n          return false;\n        }\n      }\n    });\n    return value;\n  };\n\n  _proto.rawBeforeComment = function rawBeforeComment(root, node) {\n    var value;\n    root.walkComments(function (i) {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before;\n\n        if (value.indexOf('\\n') !== -1) {\n          value = value.replace(/[^\\n]+$/, '');\n        }\n\n        return false;\n      }\n    });\n\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeDecl');\n    } else if (value) {\n      value = value.replace(/[^\\s]/g, '');\n    }\n\n    return value;\n  };\n\n  _proto.rawBeforeDecl = function rawBeforeDecl(root, node) {\n    var value;\n    root.walkDecls(function (i) {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before;\n\n        if (value.indexOf('\\n') !== -1) {\n          value = value.replace(/[^\\n]+$/, '');\n        }\n\n        return false;\n      }\n    });\n\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeRule');\n    } else if (value) {\n      value = value.replace(/[^\\s]/g, '');\n    }\n\n    return value;\n  };\n\n  _proto.rawBeforeRule = function rawBeforeRule(root) {\n    var value;\n    root.walk(function (i) {\n      if (i.nodes && (i.parent !== root || root.first !== i)) {\n        if (typeof i.raws.before !== 'undefined') {\n          value = i.raws.before;\n\n          if (value.indexOf('\\n') !== -1) {\n            value = value.replace(/[^\\n]+$/, '');\n          }\n\n          return false;\n        }\n      }\n    });\n    if (value) value = value.replace(/[^\\s]/g, '');\n    return value;\n  };\n\n  _proto.rawBeforeClose = function rawBeforeClose(root) {\n    var value;\n    root.walk(function (i) {\n      if (i.nodes && i.nodes.length > 0) {\n        if (typeof i.raws.after !== 'undefined') {\n          value = i.raws.after;\n\n          if (value.indexOf('\\n') !== -1) {\n            value = value.replace(/[^\\n]+$/, '');\n          }\n\n          return false;\n        }\n      }\n    });\n    if (value) value = value.replace(/[^\\s]/g, '');\n    return value;\n  };\n\n  _proto.rawBeforeOpen = function rawBeforeOpen(root) {\n    var value;\n    root.walk(function (i) {\n      if (i.type !== 'decl') {\n        value = i.raws.between;\n        if (typeof value !== 'undefined') return false;\n      }\n    });\n    return value;\n  };\n\n  _proto.rawColon = function rawColon(root) {\n    var value;\n    root.walkDecls(function (i) {\n      if (typeof i.raws.between !== 'undefined') {\n        value = i.raws.between.replace(/[^\\s:]/g, '');\n        return false;\n      }\n    });\n    return value;\n  };\n\n  _proto.beforeAfter = function beforeAfter(node, detect) {\n    var value;\n\n    if (node.type === 'decl') {\n      value = this.raw(node, null, 'beforeDecl');\n    } else if (node.type === 'comment') {\n      value = this.raw(node, null, 'beforeComment');\n    } else if (detect === 'before') {\n      value = this.raw(node, null, 'beforeRule');\n    } else {\n      value = this.raw(node, null, 'beforeClose');\n    }\n\n    var buf = node.parent;\n    var depth = 0;\n\n    while (buf && buf.type !== 'root') {\n      depth += 1;\n      buf = buf.parent;\n    }\n\n    if (value.indexOf('\\n') !== -1) {\n      var indent = this.raw(node, null, 'indent');\n\n      if (indent.length) {\n        for (var step = 0; step < depth; step++) {\n          value += indent;\n        }\n      }\n    }\n\n    return value;\n  };\n\n  _proto.rawValue = function rawValue(node, prop) {\n    var value = node[prop];\n    var raw = node.raws[prop];\n\n    if (raw && raw.value === value) {\n      return raw.raw;\n    }\n\n    return value;\n  };\n\n  return Stringifier;\n}();\n\nvar _default = Stringifier;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/stringify.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/stringify.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _stringifier = _interopRequireDefault(__webpack_require__(/*! ./stringifier */ \"./node_modules/postcss-values-parser/node_modules/postcss/lib/stringifier.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringify(node, builder) {\n  var str = new _stringifier.default(builder);\n  str.stringify(node);\n}\n\nvar _default = stringify;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiLCJTdHJpbmdpZmllciJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7OztBQUVBLFNBQVNBLFNBQVQsQ0FBb0JDLElBQXBCLEVBQTBCQyxPQUExQixFQUFtQztBQUNqQyxNQUFJQyxHQUFHLEdBQUcsSUFBSUMsb0JBQUosQ0FBZ0JGLE9BQWhCLENBQVY7QUFDQUMsRUFBQUEsR0FBRyxDQUFDSCxTQUFKLENBQWNDLElBQWQ7QUFDRDs7ZUFFY0QsUyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBTdHJpbmdpZmllciBmcm9tICcuL3N0cmluZ2lmaWVyJ1xuXG5mdW5jdGlvbiBzdHJpbmdpZnkgKG5vZGUsIGJ1aWxkZXIpIHtcbiAgbGV0IHN0ciA9IG5ldyBTdHJpbmdpZmllcihidWlsZGVyKVxuICBzdHIuc3RyaW5naWZ5KG5vZGUpXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0cmluZ2lmeVxuIl0sImZpbGUiOiJzdHJpbmdpZnkuanMifQ==\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/stringify.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/tokenize.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/tokenize.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = tokenizer;\nvar SINGLE_QUOTE = '\\''.charCodeAt(0);\nvar DOUBLE_QUOTE = '\"'.charCodeAt(0);\nvar BACKSLASH = '\\\\'.charCodeAt(0);\nvar SLASH = '/'.charCodeAt(0);\nvar NEWLINE = '\\n'.charCodeAt(0);\nvar SPACE = ' '.charCodeAt(0);\nvar FEED = '\\f'.charCodeAt(0);\nvar TAB = '\\t'.charCodeAt(0);\nvar CR = '\\r'.charCodeAt(0);\nvar OPEN_SQUARE = '['.charCodeAt(0);\nvar CLOSE_SQUARE = ']'.charCodeAt(0);\nvar OPEN_PARENTHESES = '('.charCodeAt(0);\nvar CLOSE_PARENTHESES = ')'.charCodeAt(0);\nvar OPEN_CURLY = '{'.charCodeAt(0);\nvar CLOSE_CURLY = '}'.charCodeAt(0);\nvar SEMICOLON = ';'.charCodeAt(0);\nvar ASTERISK = '*'.charCodeAt(0);\nvar COLON = ':'.charCodeAt(0);\nvar AT = '@'.charCodeAt(0);\nvar RE_AT_END = /[ \\n\\t\\r\\f{}()'\"\\\\;/[\\]#]/g;\nvar RE_WORD_END = /[ \\n\\t\\r\\f(){}:;@!'\"\\\\\\][#]|\\/(?=\\*)/g;\nvar RE_BAD_BRACKET = /.[\\\\/(\"'\\n]/;\nvar RE_HEX_ESCAPE = /[a-f0-9]/i;\n\nfunction tokenizer(input, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var css = input.css.valueOf();\n  var ignore = options.ignoreErrors;\n  var code, next, quote, lines, last, content, escape;\n  var nextLine, nextOffset, escaped, escapePos, prev, n, currentToken;\n  var length = css.length;\n  var offset = -1;\n  var line = 1;\n  var pos = 0;\n  var buffer = [];\n  var returned = [];\n\n  function position() {\n    return pos;\n  }\n\n  function unclosed(what) {\n    throw input.error('Unclosed ' + what, line, pos - offset);\n  }\n\n  function endOfFile() {\n    return returned.length === 0 && pos >= length;\n  }\n\n  function nextToken(opts) {\n    if (returned.length) return returned.pop();\n    if (pos >= length) return;\n    var ignoreUnclosed = opts ? opts.ignoreUnclosed : false;\n    code = css.charCodeAt(pos);\n\n    if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) {\n      offset = pos;\n      line += 1;\n    }\n\n    switch (code) {\n      case NEWLINE:\n      case SPACE:\n      case TAB:\n      case CR:\n      case FEED:\n        next = pos;\n\n        do {\n          next += 1;\n          code = css.charCodeAt(next);\n\n          if (code === NEWLINE) {\n            offset = next;\n            line += 1;\n          }\n        } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);\n\n        currentToken = ['space', css.slice(pos, next)];\n        pos = next - 1;\n        break;\n\n      case OPEN_SQUARE:\n      case CLOSE_SQUARE:\n      case OPEN_CURLY:\n      case CLOSE_CURLY:\n      case COLON:\n      case SEMICOLON:\n      case CLOSE_PARENTHESES:\n        var controlChar = String.fromCharCode(code);\n        currentToken = [controlChar, controlChar, line, pos - offset];\n        break;\n\n      case OPEN_PARENTHESES:\n        prev = buffer.length ? buffer.pop()[1] : '';\n        n = css.charCodeAt(pos + 1);\n\n        if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {\n          next = pos;\n\n          do {\n            escaped = false;\n            next = css.indexOf(')', next + 1);\n\n            if (next === -1) {\n              if (ignore || ignoreUnclosed) {\n                next = pos;\n                break;\n              } else {\n                unclosed('bracket');\n              }\n            }\n\n            escapePos = next;\n\n            while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n              escapePos -= 1;\n              escaped = !escaped;\n            }\n          } while (escaped);\n\n          currentToken = ['brackets', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n          pos = next;\n        } else {\n          next = css.indexOf(')', pos + 1);\n          content = css.slice(pos, next + 1);\n\n          if (next === -1 || RE_BAD_BRACKET.test(content)) {\n            currentToken = ['(', '(', line, pos - offset];\n          } else {\n            currentToken = ['brackets', content, line, pos - offset, line, next - offset];\n            pos = next;\n          }\n        }\n\n        break;\n\n      case SINGLE_QUOTE:\n      case DOUBLE_QUOTE:\n        quote = code === SINGLE_QUOTE ? '\\'' : '\"';\n        next = pos;\n\n        do {\n          escaped = false;\n          next = css.indexOf(quote, next + 1);\n\n          if (next === -1) {\n            if (ignore || ignoreUnclosed) {\n              next = pos + 1;\n              break;\n            } else {\n              unclosed('string');\n            }\n          }\n\n          escapePos = next;\n\n          while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n            escapePos -= 1;\n            escaped = !escaped;\n          }\n        } while (escaped);\n\n        content = css.slice(pos, next + 1);\n        lines = content.split('\\n');\n        last = lines.length - 1;\n\n        if (last > 0) {\n          nextLine = line + last;\n          nextOffset = next - lines[last].length;\n        } else {\n          nextLine = line;\n          nextOffset = offset;\n        }\n\n        currentToken = ['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset];\n        offset = nextOffset;\n        line = nextLine;\n        pos = next;\n        break;\n\n      case AT:\n        RE_AT_END.lastIndex = pos + 1;\n        RE_AT_END.test(css);\n\n        if (RE_AT_END.lastIndex === 0) {\n          next = css.length - 1;\n        } else {\n          next = RE_AT_END.lastIndex - 2;\n        }\n\n        currentToken = ['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n        pos = next;\n        break;\n\n      case BACKSLASH:\n        next = pos;\n        escape = true;\n\n        while (css.charCodeAt(next + 1) === BACKSLASH) {\n          next += 1;\n          escape = !escape;\n        }\n\n        code = css.charCodeAt(next + 1);\n\n        if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {\n          next += 1;\n\n          if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n            while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n              next += 1;\n            }\n\n            if (css.charCodeAt(next + 1) === SPACE) {\n              next += 1;\n            }\n          }\n        }\n\n        currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n        pos = next;\n        break;\n\n      default:\n        if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n          next = css.indexOf('*/', pos + 2) + 1;\n\n          if (next === 0) {\n            if (ignore || ignoreUnclosed) {\n              next = css.length;\n            } else {\n              unclosed('comment');\n            }\n          }\n\n          content = css.slice(pos, next + 1);\n          lines = content.split('\\n');\n          last = lines.length - 1;\n\n          if (last > 0) {\n            nextLine = line + last;\n            nextOffset = next - lines[last].length;\n          } else {\n            nextLine = line;\n            nextOffset = offset;\n          }\n\n          currentToken = ['comment', content, line, pos - offset, nextLine, next - nextOffset];\n          offset = nextOffset;\n          line = nextLine;\n          pos = next;\n        } else {\n          RE_WORD_END.lastIndex = pos + 1;\n          RE_WORD_END.test(css);\n\n          if (RE_WORD_END.lastIndex === 0) {\n            next = css.length - 1;\n          } else {\n            next = RE_WORD_END.lastIndex - 2;\n          }\n\n          currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n          buffer.push(currentToken);\n          pos = next;\n        }\n\n        break;\n    }\n\n    pos++;\n    return currentToken;\n  }\n\n  function back(token) {\n    returned.push(token);\n  }\n\n  return {\n    back: back,\n    nextToken: nextToken,\n    endOfFile: endOfFile,\n    position: position\n  };\n}\n\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/tokenize.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/warn-once.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/warn-once.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = warnOnce;\nvar printed = {};\n\nfunction warnOnce(message) {\n  if (printed[message]) return;\n  printed[message] = true;\n\n  if (typeof console !== 'undefined' && console.warn) {\n    console.warn(message);\n  }\n}\n\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm4tb25jZS5lczYiXSwibmFtZXMiOlsicHJpbnRlZCIsIndhcm5PbmNlIiwibWVzc2FnZSIsImNvbnNvbGUiLCJ3YXJuIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUEsSUFBSUEsT0FBTyxHQUFHLEVBQWQ7O0FBRWUsU0FBU0MsUUFBVCxDQUFtQkMsT0FBbkIsRUFBNEI7QUFDekMsTUFBSUYsT0FBTyxDQUFDRSxPQUFELENBQVgsRUFBc0I7QUFDdEJGLEVBQUFBLE9BQU8sQ0FBQ0UsT0FBRCxDQUFQLEdBQW1CLElBQW5COztBQUVBLE1BQUksT0FBT0MsT0FBUCxLQUFtQixXQUFuQixJQUFrQ0EsT0FBTyxDQUFDQyxJQUE5QyxFQUFvRDtBQUNsREQsSUFBQUEsT0FBTyxDQUFDQyxJQUFSLENBQWFGLE9BQWI7QUFDRDtBQUNGIiwic291cmNlc0NvbnRlbnQiOlsibGV0IHByaW50ZWQgPSB7IH1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2Fybk9uY2UgKG1lc3NhZ2UpIHtcbiAgaWYgKHByaW50ZWRbbWVzc2FnZV0pIHJldHVyblxuICBwcmludGVkW21lc3NhZ2VdID0gdHJ1ZVxuXG4gIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgY29uc29sZS53YXJuKSB7XG4gICAgY29uc29sZS53YXJuKG1lc3NhZ2UpXG4gIH1cbn1cbiJdLCJmaWxlIjoid2Fybi1vbmNlLmpzIn0=\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/warn-once.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/postcss/lib/warning.js":
/*!********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/postcss/lib/warning.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Represents a plugin’s warning. It can be created using {@link Node#warn}.\n *\n * @example\n * if (decl.important) {\n *   decl.warn(result, 'Avoid !important', { word: '!important' })\n * }\n */\nvar Warning = /*#__PURE__*/function () {\n  /**\n   * @param {string} text        Warning message.\n   * @param {Object} [opts]      Warning options.\n   * @param {Node}   opts.node   CSS node that caused the warning.\n   * @param {string} opts.word   Word in CSS source that caused the warning.\n   * @param {number} opts.index  Index in CSS node string that caused\n   *                             the warning.\n   * @param {string} opts.plugin Name of the plugin that created\n   *                             this warning. {@link Result#warn} fills\n   *                             this property automatically.\n   */\n  function Warning(text, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    /**\n     * Type to filter warnings from {@link Result#messages}.\n     * Always equal to `\"warning\"`.\n     *\n     * @type {string}\n     *\n     * @example\n     * const nonWarning = result.messages.filter(i => i.type !== 'warning')\n     */\n    this.type = 'warning';\n    /**\n     * The warning message.\n     *\n     * @type {string}\n     *\n     * @example\n     * warning.text //=> 'Try to avoid !important'\n     */\n\n    this.text = text;\n\n    if (opts.node && opts.node.source) {\n      var pos = opts.node.positionBy(opts);\n      /**\n       * Line in the input file with this warning’s source.\n       * @type {number}\n       *\n       * @example\n       * warning.line //=> 5\n       */\n\n      this.line = pos.line;\n      /**\n       * Column in the input file with this warning’s source.\n       *\n       * @type {number}\n       *\n       * @example\n       * warning.column //=> 6\n       */\n\n      this.column = pos.column;\n    }\n\n    for (var opt in opts) {\n      this[opt] = opts[opt];\n    }\n  }\n  /**\n   * Returns a warning position and message.\n   *\n   * @example\n   * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important'\n   *\n   * @return {string} Warning position and message.\n   */\n\n\n  var _proto = Warning.prototype;\n\n  _proto.toString = function toString() {\n    if (this.node) {\n      return this.node.error(this.text, {\n        plugin: this.plugin,\n        index: this.index,\n        word: this.word\n      }).message;\n    }\n\n    if (this.plugin) {\n      return this.plugin + ': ' + this.text;\n    }\n\n    return this.text;\n  }\n  /**\n   * @memberof Warning#\n   * @member {string} plugin The name of the plugin that created\n   *                         it will fill this property automatically.\n   *                         this warning. When you call {@link Node#warn}\n   *\n   * @example\n   * warning.plugin //=> 'postcss-important'\n   */\n\n  /**\n   * @memberof Warning#\n   * @member {Node} node Contains the CSS node that caused the warning.\n   *\n   * @example\n   * warning.node.toString() //=> 'color: white !important'\n   */\n  ;\n\n  return Warning;\n}();\n\nvar _default = Warning;\nexports.default = _default;\nmodule.exports = exports.default;\n//# sourceMappingURL=data:application/json;charset=utf8;base64, \n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/postcss/lib/warning.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/array-set.js":
/*!*************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/array-set.js ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js\");\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n  this._array = [];\n  this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n  var set = new ArraySet();\n  for (var i = 0, len = aArray.length; i < len; i++) {\n    set.add(aArray[i], aAllowDuplicates);\n  }\n  return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n  return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n  var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n  var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n  var idx = this._array.length;\n  if (!isDuplicate || aAllowDuplicates) {\n    this._array.push(aStr);\n  }\n  if (!isDuplicate) {\n    if (hasNativeMap) {\n      this._set.set(aStr, idx);\n    } else {\n      this._set[sStr] = idx;\n    }\n  }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n  if (hasNativeMap) {\n    return this._set.has(aStr);\n  } else {\n    var sStr = util.toSetString(aStr);\n    return has.call(this._set, sStr);\n  }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n  if (hasNativeMap) {\n    var idx = this._set.get(aStr);\n    if (idx >= 0) {\n        return idx;\n    }\n  } else {\n    var sStr = util.toSetString(aStr);\n    if (has.call(this._set, sStr)) {\n      return this._set[sStr];\n    }\n  }\n\n  throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n  if (aIdx >= 0 && aIdx < this._array.length) {\n    return this._array[aIdx];\n  }\n  throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n  return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/array-set.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/base64-vlq.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/base64-vlq.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *  * Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *  * Redistributions in binary form must reproduce the above\n *    copyright notice, this list of conditions and the following\n *    disclaimer in the documentation and/or other materials provided\n *    with the distribution.\n *  * Neither the name of Google Inc. nor the names of its\n *    contributors may be used to endorse or promote products derived\n *    from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = __webpack_require__(/*! ./base64 */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/base64.js\");\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n//   Continuation\n//   |    Sign\n//   |    |\n//   V    V\n//   101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit.  For example, as decimals:\n *   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n *   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n  return aValue < 0\n    ? ((-aValue) << 1) + 1\n    : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit.  For example, as decimals:\n *   2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n *   4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n  var isNegative = (aValue & 1) === 1;\n  var shifted = aValue >> 1;\n  return isNegative\n    ? -shifted\n    : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n  var encoded = \"\";\n  var digit;\n\n  var vlq = toVLQSigned(aValue);\n\n  do {\n    digit = vlq & VLQ_BASE_MASK;\n    vlq >>>= VLQ_BASE_SHIFT;\n    if (vlq > 0) {\n      // There are still more digits in this value, so we must make sure the\n      // continuation bit is marked.\n      digit |= VLQ_CONTINUATION_BIT;\n    }\n    encoded += base64.encode(digit);\n  } while (vlq > 0);\n\n  return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n  var strLen = aStr.length;\n  var result = 0;\n  var shift = 0;\n  var continuation, digit;\n\n  do {\n    if (aIndex >= strLen) {\n      throw new Error(\"Expected more digits in base 64 VLQ value.\");\n    }\n\n    digit = base64.decode(aStr.charCodeAt(aIndex++));\n    if (digit === -1) {\n      throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n    }\n\n    continuation = !!(digit & VLQ_CONTINUATION_BIT);\n    digit &= VLQ_BASE_MASK;\n    result = result + (digit << shift);\n    shift += VLQ_BASE_SHIFT;\n  } while (continuation);\n\n  aOutParam.value = fromVLQSigned(result);\n  aOutParam.rest = aIndex;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/base64-vlq.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/base64.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/base64.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n  if (0 <= number && number < intToCharMap.length) {\n    return intToCharMap[number];\n  }\n  throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n  var bigA = 65;     // 'A'\n  var bigZ = 90;     // 'Z'\n\n  var littleA = 97;  // 'a'\n  var littleZ = 122; // 'z'\n\n  var zero = 48;     // '0'\n  var nine = 57;     // '9'\n\n  var plus = 43;     // '+'\n  var slash = 47;    // '/'\n\n  var littleOffset = 26;\n  var numberOffset = 52;\n\n  // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n  if (bigA <= charCode && charCode <= bigZ) {\n    return (charCode - bigA);\n  }\n\n  // 26 - 51: abcdefghijklmnopqrstuvwxyz\n  if (littleA <= charCode && charCode <= littleZ) {\n    return (charCode - littleA + littleOffset);\n  }\n\n  // 52 - 61: 0123456789\n  if (zero <= charCode && charCode <= nine) {\n    return (charCode - zero + numberOffset);\n  }\n\n  // 62: +\n  if (charCode == plus) {\n    return 62;\n  }\n\n  // 63: /\n  if (charCode == slash) {\n    return 63;\n  }\n\n  // Invalid base64 digit.\n  return -1;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/base64.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/binary-search.js":
/*!*****************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/binary-search.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n  // This function terminates when one of the following is true:\n  //\n  //   1. We find the exact element we are looking for.\n  //\n  //   2. We did not find the exact element, but we can return the index of\n  //      the next-closest element.\n  //\n  //   3. We did not find the exact element, and there is no next-closest\n  //      element than the one we are searching for, so we return -1.\n  var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n  var cmp = aCompare(aNeedle, aHaystack[mid], true);\n  if (cmp === 0) {\n    // Found the element we are looking for.\n    return mid;\n  }\n  else if (cmp > 0) {\n    // Our needle is greater than aHaystack[mid].\n    if (aHigh - mid > 1) {\n      // The element is in the upper half.\n      return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n    }\n\n    // The exact needle element was not found in this haystack. Determine if\n    // we are in termination case (3) or (2) and return the appropriate thing.\n    if (aBias == exports.LEAST_UPPER_BOUND) {\n      return aHigh < aHaystack.length ? aHigh : -1;\n    } else {\n      return mid;\n    }\n  }\n  else {\n    // Our needle is less than aHaystack[mid].\n    if (mid - aLow > 1) {\n      // The element is in the lower half.\n      return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n    }\n\n    // we are in termination case (3) or (2) and return the appropriate thing.\n    if (aBias == exports.LEAST_UPPER_BOUND) {\n      return mid;\n    } else {\n      return aLow < 0 ? -1 : aLow;\n    }\n  }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n *     array and returns -1, 0, or 1 depending on whether the needle is less\n *     than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n  if (aHaystack.length === 0) {\n    return -1;\n  }\n\n  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n                              aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n  if (index < 0) {\n    return -1;\n  }\n\n  // We have found either the exact element, or the next-closest element than\n  // the one we are searching for. However, there may be more than one such\n  // element. Make sure we always return the smallest of these.\n  while (index - 1 >= 0) {\n    if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n      break;\n    }\n    --index;\n  }\n\n  return index;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/binary-search.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/mapping-list.js":
/*!****************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/mapping-list.js ***!
  \****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js\");\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n  // Optimized for most common case\n  var lineA = mappingA.generatedLine;\n  var lineB = mappingB.generatedLine;\n  var columnA = mappingA.generatedColumn;\n  var columnB = mappingB.generatedColumn;\n  return lineB > lineA || lineB == lineA && columnB >= columnA ||\n         util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n  this._array = [];\n  this._sorted = true;\n  // Serves as infimum\n  this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n  function MappingList_forEach(aCallback, aThisArg) {\n    this._array.forEach(aCallback, aThisArg);\n  };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n  if (generatedPositionAfter(this._last, aMapping)) {\n    this._last = aMapping;\n    this._array.push(aMapping);\n  } else {\n    this._sorted = false;\n    this._array.push(aMapping);\n  }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n  if (!this._sorted) {\n    this._array.sort(util.compareByGeneratedPositionsInflated);\n    this._sorted = true;\n  }\n  return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/mapping-list.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/quick-sort.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/quick-sort.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n *        The array.\n * @param {Number} x\n *        The index of the first item.\n * @param {Number} y\n *        The index of the second item.\n */\nfunction swap(ary, x, y) {\n  var temp = ary[x];\n  ary[x] = ary[y];\n  ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n *        The lower bound on the range.\n * @param {Number} high\n *        The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n  return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n *        An array to sort.\n * @param {function} comparator\n *        Function to use to compare two items.\n * @param {Number} p\n *        Start index of the array\n * @param {Number} r\n *        End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n  // If our lower bound is less than our upper bound, we (1) partition the\n  // array into two pieces and (2) recurse on each half. If it is not, this is\n  // the empty array and our base case.\n\n  if (p < r) {\n    // (1) Partitioning.\n    //\n    // The partitioning chooses a pivot between `p` and `r` and moves all\n    // elements that are less than or equal to the pivot to the before it, and\n    // all the elements that are greater than it after it. The effect is that\n    // once partition is done, the pivot is in the exact place it will be when\n    // the array is put in sorted order, and it will not need to be moved\n    // again. This runs in O(n) time.\n\n    // Always choose a random pivot so that an input array which is reverse\n    // sorted does not cause O(n^2) running time.\n    var pivotIndex = randomIntInRange(p, r);\n    var i = p - 1;\n\n    swap(ary, pivotIndex, r);\n    var pivot = ary[r];\n\n    // Immediately after `j` is incremented in this loop, the following hold\n    // true:\n    //\n    //   * Every element in `ary[p .. i]` is less than or equal to the pivot.\n    //\n    //   * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n    for (var j = p; j < r; j++) {\n      if (comparator(ary[j], pivot) <= 0) {\n        i += 1;\n        swap(ary, i, j);\n      }\n    }\n\n    swap(ary, i + 1, j);\n    var q = i + 1;\n\n    // (2) Recurse on each half.\n\n    doQuickSort(ary, comparator, p, q - 1);\n    doQuickSort(ary, comparator, q + 1, r);\n  }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n *        An array to sort.\n * @param {function} comparator\n *        Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n  doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/quick-sort.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-consumer.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-consumer.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js\");\nvar binarySearch = __webpack_require__(/*! ./binary-search */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/binary-search.js\");\nvar ArraySet = __webpack_require__(/*! ./array-set */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/array-set.js\").ArraySet;\nvar base64VLQ = __webpack_require__(/*! ./base64-vlq */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/base64-vlq.js\");\nvar quickSort = __webpack_require__(/*! ./quick-sort */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/quick-sort.js\").quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  return sourceMap.sections != null\n    ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n    : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n  return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n//     {\n//       generatedLine: The line number in the generated code,\n//       generatedColumn: The column number in the generated code,\n//       source: The path to the original source file that generated this\n//               chunk of code,\n//       originalLine: The line number in the original source that\n//                     corresponds to this chunk of generated code,\n//       originalColumn: The column number in the original source that\n//                       corresponds to this chunk of generated code,\n//       name: The name of the original symbol which generated this chunk of\n//             code.\n//     }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n  configurable: true,\n  enumerable: true,\n  get: function () {\n    if (!this.__generatedMappings) {\n      this._parseMappings(this._mappings, this.sourceRoot);\n    }\n\n    return this.__generatedMappings;\n  }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n  configurable: true,\n  enumerable: true,\n  get: function () {\n    if (!this.__originalMappings) {\n      this._parseMappings(this._mappings, this.sourceRoot);\n    }\n\n    return this.__originalMappings;\n  }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n  function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n    var c = aStr.charAt(index);\n    return c === \";\" || c === \",\";\n  };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    throw new Error(\"Subclasses must implement _parseMappings\");\n  };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n *        The function that is called with each mapping.\n * @param Object aContext\n *        Optional. If specified, this object will be the value of `this` every\n *        time that `aCallback` is called.\n * @param aOrder\n *        Either `SourceMapConsumer.GENERATED_ORDER` or\n *        `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n *        iterate over the mappings sorted by the generated file's line/column\n *        order or the original's source/line/column order, respectively. Defaults to\n *        `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n  function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n    var context = aContext || null;\n    var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n    var mappings;\n    switch (order) {\n    case SourceMapConsumer.GENERATED_ORDER:\n      mappings = this._generatedMappings;\n      break;\n    case SourceMapConsumer.ORIGINAL_ORDER:\n      mappings = this._originalMappings;\n      break;\n    default:\n      throw new Error(\"Unknown order of iteration.\");\n    }\n\n    var sourceRoot = this.sourceRoot;\n    mappings.map(function (mapping) {\n      var source = mapping.source === null ? null : this._sources.at(mapping.source);\n      source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n      return {\n        source: source,\n        generatedLine: mapping.generatedLine,\n        generatedColumn: mapping.generatedColumn,\n        originalLine: mapping.originalLine,\n        originalColumn: mapping.originalColumn,\n        name: mapping.name === null ? null : this._names.at(mapping.name)\n      };\n    }, this).forEach(aCallback, context);\n  };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number is 1-based.\n *   - column: Optional. the column number in the original source.\n *    The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *    line number is 1-based.\n *   - column: The column number in the generated source, or null.\n *    The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n  function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n    var line = util.getArg(aArgs, 'line');\n\n    // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n    // returns the index of the closest mapping less than the needle. By\n    // setting needle.originalColumn to 0, we thus find the last mapping for\n    // the given line, provided such a mapping exists.\n    var needle = {\n      source: util.getArg(aArgs, 'source'),\n      originalLine: line,\n      originalColumn: util.getArg(aArgs, 'column', 0)\n    };\n\n    needle.source = this._findSourceIndex(needle.source);\n    if (needle.source < 0) {\n      return [];\n    }\n\n    var mappings = [];\n\n    var index = this._findMapping(needle,\n                                  this._originalMappings,\n                                  \"originalLine\",\n                                  \"originalColumn\",\n                                  util.compareByOriginalPositions,\n                                  binarySearch.LEAST_UPPER_BOUND);\n    if (index >= 0) {\n      var mapping = this._originalMappings[index];\n\n      if (aArgs.column === undefined) {\n        var originalLine = mapping.originalLine;\n\n        // Iterate until either we run out of mappings, or we run into\n        // a mapping for a different line than the one we found. Since\n        // mappings are sorted, this is guaranteed to find all mappings for\n        // the line we found.\n        while (mapping && mapping.originalLine === originalLine) {\n          mappings.push({\n            line: util.getArg(mapping, 'generatedLine', null),\n            column: util.getArg(mapping, 'generatedColumn', null),\n            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n          });\n\n          mapping = this._originalMappings[++index];\n        }\n      } else {\n        var originalColumn = mapping.originalColumn;\n\n        // Iterate until either we run out of mappings, or we run into\n        // a mapping for a different line than the one we were searching for.\n        // Since mappings are sorted, this is guaranteed to find all mappings for\n        // the line we are searching for.\n        while (mapping &&\n               mapping.originalLine === line &&\n               mapping.originalColumn == originalColumn) {\n          mappings.push({\n            line: util.getArg(mapping, 'generatedLine', null),\n            column: util.getArg(mapping, 'generatedColumn', null),\n            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n          });\n\n          mapping = this._originalMappings[++index];\n        }\n      }\n    }\n\n    return mappings;\n  };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n *   - version: Which version of the source map spec this map is following.\n *   - sources: An array of URLs to the original source files.\n *   - names: An array of identifiers which can be referrenced by individual mappings.\n *   - sourceRoot: Optional. The URL root from which all sources are relative.\n *   - sourcesContent: Optional. An array of contents of the original source files.\n *   - mappings: A string of base64 VLQs which contain the actual mappings.\n *   - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n *     {\n *       version : 3,\n *       file: \"out.js\",\n *       sourceRoot : \"\",\n *       sources: [\"foo.js\", \"bar.js\"],\n *       names: [\"src\", \"maps\", \"are\", \"fun\"],\n *       mappings: \"AA,AB;;ABCDE;\"\n *     }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found.  This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  var version = util.getArg(sourceMap, 'version');\n  var sources = util.getArg(sourceMap, 'sources');\n  // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n  // requires the array) to play nice here.\n  var names = util.getArg(sourceMap, 'names', []);\n  var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n  var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n  var mappings = util.getArg(sourceMap, 'mappings');\n  var file = util.getArg(sourceMap, 'file', null);\n\n  // Once again, Sass deviates from the spec and supplies the version as a\n  // string rather than a number, so we use loose equality checking here.\n  if (version != this._version) {\n    throw new Error('Unsupported version: ' + version);\n  }\n\n  if (sourceRoot) {\n    sourceRoot = util.normalize(sourceRoot);\n  }\n\n  sources = sources\n    .map(String)\n    // Some source maps produce relative source paths like \"./foo.js\" instead of\n    // \"foo.js\".  Normalize these first so that future comparisons will succeed.\n    // See bugzil.la/1090768.\n    .map(util.normalize)\n    // Always ensure that absolute sources are internally stored relative to\n    // the source root, if the source root is absolute. Not doing this would\n    // be particularly problematic when the source root is a prefix of the\n    // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n    .map(function (source) {\n      return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n        ? util.relative(sourceRoot, source)\n        : source;\n    });\n\n  // Pass `true` below to allow duplicate names and sources. While source maps\n  // are intended to be compressed and deduplicated, the TypeScript compiler\n  // sometimes generates source maps with duplicates in them. See Github issue\n  // #72 and bugzil.la/889492.\n  this._names = ArraySet.fromArray(names.map(String), true);\n  this._sources = ArraySet.fromArray(sources, true);\n\n  this._absoluteSources = this._sources.toArray().map(function (s) {\n    return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n  });\n\n  this.sourceRoot = sourceRoot;\n  this.sourcesContent = sourcesContent;\n  this._mappings = mappings;\n  this._sourceMapURL = aSourceMapURL;\n  this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source.  Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n  var relativeSource = aSource;\n  if (this.sourceRoot != null) {\n    relativeSource = util.relative(this.sourceRoot, relativeSource);\n  }\n\n  if (this._sources.has(relativeSource)) {\n    return this._sources.indexOf(relativeSource);\n  }\n\n  // Maybe aSource is an absolute URL as returned by |sources|.  In\n  // this case we can't simply undo the transform.\n  var i;\n  for (i = 0; i < this._absoluteSources.length; ++i) {\n    if (this._absoluteSources[i] == aSource) {\n      return i;\n    }\n  }\n\n  return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n *        The source map that will be consumed.\n * @param String aSourceMapURL\n *        The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n  function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n    var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n    var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n    var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n    smc.sourceRoot = aSourceMap._sourceRoot;\n    smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n                                                            smc.sourceRoot);\n    smc.file = aSourceMap._file;\n    smc._sourceMapURL = aSourceMapURL;\n    smc._absoluteSources = smc._sources.toArray().map(function (s) {\n      return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n    });\n\n    // Because we are modifying the entries (by converting string sources and\n    // names to indices into the sources and names ArraySets), we have to make\n    // a copy of the entry or else bad things happen. Shared mutable state\n    // strikes again! See github issue #191.\n\n    var generatedMappings = aSourceMap._mappings.toArray().slice();\n    var destGeneratedMappings = smc.__generatedMappings = [];\n    var destOriginalMappings = smc.__originalMappings = [];\n\n    for (var i = 0, length = generatedMappings.length; i < length; i++) {\n      var srcMapping = generatedMappings[i];\n      var destMapping = new Mapping;\n      destMapping.generatedLine = srcMapping.generatedLine;\n      destMapping.generatedColumn = srcMapping.generatedColumn;\n\n      if (srcMapping.source) {\n        destMapping.source = sources.indexOf(srcMapping.source);\n        destMapping.originalLine = srcMapping.originalLine;\n        destMapping.originalColumn = srcMapping.originalColumn;\n\n        if (srcMapping.name) {\n          destMapping.name = names.indexOf(srcMapping.name);\n        }\n\n        destOriginalMappings.push(destMapping);\n      }\n\n      destGeneratedMappings.push(destMapping);\n    }\n\n    quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n    return smc;\n  };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n  get: function () {\n    return this._absoluteSources.slice();\n  }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n  this.generatedLine = 0;\n  this.generatedColumn = 0;\n  this.source = null;\n  this.originalLine = null;\n  this.originalColumn = null;\n  this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    var generatedLine = 1;\n    var previousGeneratedColumn = 0;\n    var previousOriginalLine = 0;\n    var previousOriginalColumn = 0;\n    var previousSource = 0;\n    var previousName = 0;\n    var length = aStr.length;\n    var index = 0;\n    var cachedSegments = {};\n    var temp = {};\n    var originalMappings = [];\n    var generatedMappings = [];\n    var mapping, str, segment, end, value;\n\n    while (index < length) {\n      if (aStr.charAt(index) === ';') {\n        generatedLine++;\n        index++;\n        previousGeneratedColumn = 0;\n      }\n      else if (aStr.charAt(index) === ',') {\n        index++;\n      }\n      else {\n        mapping = new Mapping();\n        mapping.generatedLine = generatedLine;\n\n        // Because each offset is encoded relative to the previous one,\n        // many segments often have the same encoding. We can exploit this\n        // fact by caching the parsed variable length fields of each segment,\n        // allowing us to avoid a second parse if we encounter the same\n        // segment again.\n        for (end = index; end < length; end++) {\n          if (this._charIsMappingSeparator(aStr, end)) {\n            break;\n          }\n        }\n        str = aStr.slice(index, end);\n\n        segment = cachedSegments[str];\n        if (segment) {\n          index += str.length;\n        } else {\n          segment = [];\n          while (index < end) {\n            base64VLQ.decode(aStr, index, temp);\n            value = temp.value;\n            index = temp.rest;\n            segment.push(value);\n          }\n\n          if (segment.length === 2) {\n            throw new Error('Found a source, but no line and column');\n          }\n\n          if (segment.length === 3) {\n            throw new Error('Found a source and line, but no column');\n          }\n\n          cachedSegments[str] = segment;\n        }\n\n        // Generated column.\n        mapping.generatedColumn = previousGeneratedColumn + segment[0];\n        previousGeneratedColumn = mapping.generatedColumn;\n\n        if (segment.length > 1) {\n          // Original source.\n          mapping.source = previousSource + segment[1];\n          previousSource += segment[1];\n\n          // Original line.\n          mapping.originalLine = previousOriginalLine + segment[2];\n          previousOriginalLine = mapping.originalLine;\n          // Lines are stored 0-based\n          mapping.originalLine += 1;\n\n          // Original column.\n          mapping.originalColumn = previousOriginalColumn + segment[3];\n          previousOriginalColumn = mapping.originalColumn;\n\n          if (segment.length > 4) {\n            // Original name.\n            mapping.name = previousName + segment[4];\n            previousName += segment[4];\n          }\n        }\n\n        generatedMappings.push(mapping);\n        if (typeof mapping.originalLine === 'number') {\n          originalMappings.push(mapping);\n        }\n      }\n    }\n\n    quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n    this.__generatedMappings = generatedMappings;\n\n    quickSort(originalMappings, util.compareByOriginalPositions);\n    this.__originalMappings = originalMappings;\n  };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n  function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n                                         aColumnName, aComparator, aBias) {\n    // To return the position we are searching for, we must first find the\n    // mapping for the given position and then return the opposite position it\n    // points to. Because the mappings are sorted, we can use binary search to\n    // find the best mapping.\n\n    if (aNeedle[aLineName] <= 0) {\n      throw new TypeError('Line must be greater than or equal to 1, got '\n                          + aNeedle[aLineName]);\n    }\n    if (aNeedle[aColumnName] < 0) {\n      throw new TypeError('Column must be greater than or equal to 0, got '\n                          + aNeedle[aColumnName]);\n    }\n\n    return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n  };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n  function SourceMapConsumer_computeColumnSpans() {\n    for (var index = 0; index < this._generatedMappings.length; ++index) {\n      var mapping = this._generatedMappings[index];\n\n      // Mappings do not contain a field for the last generated columnt. We\n      // can come up with an optimistic estimate, however, by assuming that\n      // mappings are contiguous (i.e. given two consecutive mappings, the\n      // first mapping ends where the second one starts).\n      if (index + 1 < this._generatedMappings.length) {\n        var nextMapping = this._generatedMappings[index + 1];\n\n        if (mapping.generatedLine === nextMapping.generatedLine) {\n          mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n          continue;\n        }\n      }\n\n      // The last mapping for each line spans the entire line.\n      mapping.lastGeneratedColumn = Infinity;\n    }\n  };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n *   - line: The line number in the generated source.  The line number\n *     is 1-based.\n *   - column: The column number in the generated source.  The column\n *     number is 0-based.\n *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n *   - source: The original source file, or null.\n *   - line: The line number in the original source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the original source, or null.  The\n *     column number is 0-based.\n *   - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n  function SourceMapConsumer_originalPositionFor(aArgs) {\n    var needle = {\n      generatedLine: util.getArg(aArgs, 'line'),\n      generatedColumn: util.getArg(aArgs, 'column')\n    };\n\n    var index = this._findMapping(\n      needle,\n      this._generatedMappings,\n      \"generatedLine\",\n      \"generatedColumn\",\n      util.compareByGeneratedPositionsDeflated,\n      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n    );\n\n    if (index >= 0) {\n      var mapping = this._generatedMappings[index];\n\n      if (mapping.generatedLine === needle.generatedLine) {\n        var source = util.getArg(mapping, 'source', null);\n        if (source !== null) {\n          source = this._sources.at(source);\n          source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n        }\n        var name = util.getArg(mapping, 'name', null);\n        if (name !== null) {\n          name = this._names.at(name);\n        }\n        return {\n          source: source,\n          line: util.getArg(mapping, 'originalLine', null),\n          column: util.getArg(mapping, 'originalColumn', null),\n          name: name\n        };\n      }\n    }\n\n    return {\n      source: null,\n      line: null,\n      column: null,\n      name: null\n    };\n  };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n  function BasicSourceMapConsumer_hasContentsOfAllSources() {\n    if (!this.sourcesContent) {\n      return false;\n    }\n    return this.sourcesContent.length >= this._sources.size() &&\n      !this.sourcesContent.some(function (sc) { return sc == null; });\n  };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n  function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n    if (!this.sourcesContent) {\n      return null;\n    }\n\n    var index = this._findSourceIndex(aSource);\n    if (index >= 0) {\n      return this.sourcesContent[index];\n    }\n\n    var relativeSource = aSource;\n    if (this.sourceRoot != null) {\n      relativeSource = util.relative(this.sourceRoot, relativeSource);\n    }\n\n    var url;\n    if (this.sourceRoot != null\n        && (url = util.urlParse(this.sourceRoot))) {\n      // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n      // many users. We can help them out when they expect file:// URIs to\n      // behave like it would if they were running a local HTTP server. See\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n      var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n      if (url.scheme == \"file\"\n          && this._sources.has(fileUriAbsPath)) {\n        return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n      }\n\n      if ((!url.path || url.path == \"/\")\n          && this._sources.has(\"/\" + relativeSource)) {\n        return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n      }\n    }\n\n    // This function is used recursively from\n    // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n    // don't want to throw if we can't find the source - we just want to\n    // return null, so we provide a flag to exit gracefully.\n    if (nullOnMissing) {\n      return null;\n    }\n    else {\n      throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n    }\n  };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number\n *     is 1-based.\n *   - column: The column number in the original source.  The column\n *     number is 0-based.\n *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the generated source, or null.\n *     The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n  function SourceMapConsumer_generatedPositionFor(aArgs) {\n    var source = util.getArg(aArgs, 'source');\n    source = this._findSourceIndex(source);\n    if (source < 0) {\n      return {\n        line: null,\n        column: null,\n        lastColumn: null\n      };\n    }\n\n    var needle = {\n      source: source,\n      originalLine: util.getArg(aArgs, 'line'),\n      originalColumn: util.getArg(aArgs, 'column')\n    };\n\n    var index = this._findMapping(\n      needle,\n      this._originalMappings,\n      \"originalLine\",\n      \"originalColumn\",\n      util.compareByOriginalPositions,\n      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n    );\n\n    if (index >= 0) {\n      var mapping = this._originalMappings[index];\n\n      if (mapping.source === needle.source) {\n        return {\n          line: util.getArg(mapping, 'generatedLine', null),\n          column: util.getArg(mapping, 'generatedColumn', null),\n          lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n        };\n      }\n    }\n\n    return {\n      line: null,\n      column: null,\n      lastColumn: null\n    };\n  };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n *   - version: Which version of the source map spec this map is following.\n *   - file: Optional. The generated file this source map is associated with.\n *   - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n *   - offset: The offset into the original specified at which this section\n *       begins to apply, defined as an object with a \"line\" and \"column\"\n *       field.\n *   - map: A source map definition. This source map could also be indexed,\n *       but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n *  {\n *    version : 3,\n *    file: \"app.js\",\n *    sections: [{\n *      offset: {line:100, column:10},\n *      map: {\n *        version : 3,\n *        file: \"section.js\",\n *        sources: [\"foo.js\", \"bar.js\"],\n *        names: [\"src\", \"maps\", \"are\", \"fun\"],\n *        mappings: \"AAAA,E;;ABCDE;\"\n *      }\n *    }],\n *  }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found.  This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  var version = util.getArg(sourceMap, 'version');\n  var sections = util.getArg(sourceMap, 'sections');\n\n  if (version != this._version) {\n    throw new Error('Unsupported version: ' + version);\n  }\n\n  this._sources = new ArraySet();\n  this._names = new ArraySet();\n\n  var lastOffset = {\n    line: -1,\n    column: 0\n  };\n  this._sections = sections.map(function (s) {\n    if (s.url) {\n      // The url field will require support for asynchronicity.\n      // See https://github.com/mozilla/source-map/issues/16\n      throw new Error('Support for url field in sections not implemented.');\n    }\n    var offset = util.getArg(s, 'offset');\n    var offsetLine = util.getArg(offset, 'line');\n    var offsetColumn = util.getArg(offset, 'column');\n\n    if (offsetLine < lastOffset.line ||\n        (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n      throw new Error('Section offsets must be ordered and non-overlapping.');\n    }\n    lastOffset = offset;\n\n    return {\n      generatedOffset: {\n        // The offset fields are 0-based, but we use 1-based indices when\n        // encoding/decoding from VLQ.\n        generatedLine: offsetLine + 1,\n        generatedColumn: offsetColumn + 1\n      },\n      consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n    }\n  });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n  get: function () {\n    var sources = [];\n    for (var i = 0; i < this._sections.length; i++) {\n      for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n        sources.push(this._sections[i].consumer.sources[j]);\n      }\n    }\n    return sources;\n  }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n *   - line: The line number in the generated source.  The line number\n *     is 1-based.\n *   - column: The column number in the generated source.  The column\n *     number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n *   - source: The original source file, or null.\n *   - line: The line number in the original source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the original source, or null.  The\n *     column number is 0-based.\n *   - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n  function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n    var needle = {\n      generatedLine: util.getArg(aArgs, 'line'),\n      generatedColumn: util.getArg(aArgs, 'column')\n    };\n\n    // Find the section containing the generated position we're trying to map\n    // to an original position.\n    var sectionIndex = binarySearch.search(needle, this._sections,\n      function(needle, section) {\n        var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n        if (cmp) {\n          return cmp;\n        }\n\n        return (needle.generatedColumn -\n                section.generatedOffset.generatedColumn);\n      });\n    var section = this._sections[sectionIndex];\n\n    if (!section) {\n      return {\n        source: null,\n        line: null,\n        column: null,\n        name: null\n      };\n    }\n\n    return section.consumer.originalPositionFor({\n      line: needle.generatedLine -\n        (section.generatedOffset.generatedLine - 1),\n      column: needle.generatedColumn -\n        (section.generatedOffset.generatedLine === needle.generatedLine\n         ? section.generatedOffset.generatedColumn - 1\n         : 0),\n      bias: aArgs.bias\n    });\n  };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n  function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n    return this._sections.every(function (s) {\n      return s.consumer.hasContentsOfAllSources();\n    });\n  };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n  function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n\n      var content = section.consumer.sourceContentFor(aSource, true);\n      if (content) {\n        return content;\n      }\n    }\n    if (nullOnMissing) {\n      return null;\n    }\n    else {\n      throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n    }\n  };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number\n *     is 1-based.\n *   - column: The column number in the original source.  The column\n *     number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *     line number is 1-based. \n *   - column: The column number in the generated source, or null.\n *     The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n  function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n\n      // Only consider this section if the requested source is in the list of\n      // sources of the consumer.\n      if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n        continue;\n      }\n      var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n      if (generatedPosition) {\n        var ret = {\n          line: generatedPosition.line +\n            (section.generatedOffset.generatedLine - 1),\n          column: generatedPosition.column +\n            (section.generatedOffset.generatedLine === generatedPosition.line\n             ? section.generatedOffset.generatedColumn - 1\n             : 0)\n        };\n        return ret;\n      }\n    }\n\n    return {\n      line: null,\n      column: null\n    };\n  };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n  function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    this.__generatedMappings = [];\n    this.__originalMappings = [];\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n      var sectionMappings = section.consumer._generatedMappings;\n      for (var j = 0; j < sectionMappings.length; j++) {\n        var mapping = sectionMappings[j];\n\n        var source = section.consumer._sources.at(mapping.source);\n        source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n        this._sources.add(source);\n        source = this._sources.indexOf(source);\n\n        var name = null;\n        if (mapping.name) {\n          name = section.consumer._names.at(mapping.name);\n          this._names.add(name);\n          name = this._names.indexOf(name);\n        }\n\n        // The mappings coming from the consumer for the section have\n        // generated positions relative to the start of the section, so we\n        // need to offset them to be relative to the start of the concatenated\n        // generated file.\n        var adjustedMapping = {\n          source: source,\n          generatedLine: mapping.generatedLine +\n            (section.generatedOffset.generatedLine - 1),\n          generatedColumn: mapping.generatedColumn +\n            (section.generatedOffset.generatedLine === mapping.generatedLine\n            ? section.generatedOffset.generatedColumn - 1\n            : 0),\n          originalLine: mapping.originalLine,\n          originalColumn: mapping.originalColumn,\n          name: name\n        };\n\n        this.__generatedMappings.push(adjustedMapping);\n        if (typeof adjustedMapping.originalLine === 'number') {\n          this.__originalMappings.push(adjustedMapping);\n        }\n      }\n    }\n\n    quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n    quickSort(this.__originalMappings, util.compareByOriginalPositions);\n  };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-consumer.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-generator.js":
/*!************************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-generator.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = __webpack_require__(/*! ./base64-vlq */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/base64-vlq.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js\");\nvar ArraySet = __webpack_require__(/*! ./array-set */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/array-set.js\").ArraySet;\nvar MappingList = __webpack_require__(/*! ./mapping-list */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/mapping-list.js\").MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n *   - file: The filename of the generated source.\n *   - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n  if (!aArgs) {\n    aArgs = {};\n  }\n  this._file = util.getArg(aArgs, 'file', null);\n  this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n  this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n  this._sources = new ArraySet();\n  this._names = new ArraySet();\n  this._mappings = new MappingList();\n  this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n  function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n    var sourceRoot = aSourceMapConsumer.sourceRoot;\n    var generator = new SourceMapGenerator({\n      file: aSourceMapConsumer.file,\n      sourceRoot: sourceRoot\n    });\n    aSourceMapConsumer.eachMapping(function (mapping) {\n      var newMapping = {\n        generated: {\n          line: mapping.generatedLine,\n          column: mapping.generatedColumn\n        }\n      };\n\n      if (mapping.source != null) {\n        newMapping.source = mapping.source;\n        if (sourceRoot != null) {\n          newMapping.source = util.relative(sourceRoot, newMapping.source);\n        }\n\n        newMapping.original = {\n          line: mapping.originalLine,\n          column: mapping.originalColumn\n        };\n\n        if (mapping.name != null) {\n          newMapping.name = mapping.name;\n        }\n      }\n\n      generator.addMapping(newMapping);\n    });\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var sourceRelative = sourceFile;\n      if (sourceRoot !== null) {\n        sourceRelative = util.relative(sourceRoot, sourceFile);\n      }\n\n      if (!generator._sources.has(sourceRelative)) {\n        generator._sources.add(sourceRelative);\n      }\n\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        generator.setSourceContent(sourceFile, content);\n      }\n    });\n    return generator;\n  };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n *   - generated: An object with the generated line and column positions.\n *   - original: An object with the original line and column positions.\n *   - source: The original source file (relative to the sourceRoot).\n *   - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n  function SourceMapGenerator_addMapping(aArgs) {\n    var generated = util.getArg(aArgs, 'generated');\n    var original = util.getArg(aArgs, 'original', null);\n    var source = util.getArg(aArgs, 'source', null);\n    var name = util.getArg(aArgs, 'name', null);\n\n    if (!this._skipValidation) {\n      this._validateMapping(generated, original, source, name);\n    }\n\n    if (source != null) {\n      source = String(source);\n      if (!this._sources.has(source)) {\n        this._sources.add(source);\n      }\n    }\n\n    if (name != null) {\n      name = String(name);\n      if (!this._names.has(name)) {\n        this._names.add(name);\n      }\n    }\n\n    this._mappings.add({\n      generatedLine: generated.line,\n      generatedColumn: generated.column,\n      originalLine: original != null && original.line,\n      originalColumn: original != null && original.column,\n      source: source,\n      name: name\n    });\n  };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n  function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n    var source = aSourceFile;\n    if (this._sourceRoot != null) {\n      source = util.relative(this._sourceRoot, source);\n    }\n\n    if (aSourceContent != null) {\n      // Add the source content to the _sourcesContents map.\n      // Create a new _sourcesContents map if the property is null.\n      if (!this._sourcesContents) {\n        this._sourcesContents = Object.create(null);\n      }\n      this._sourcesContents[util.toSetString(source)] = aSourceContent;\n    } else if (this._sourcesContents) {\n      // Remove the source file from the _sourcesContents map.\n      // If the _sourcesContents map is empty, set the property to null.\n      delete this._sourcesContents[util.toSetString(source)];\n      if (Object.keys(this._sourcesContents).length === 0) {\n        this._sourcesContents = null;\n      }\n    }\n  };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n *        If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n *        to be applied. If relative, it is relative to the SourceMapConsumer.\n *        This parameter is needed when the two source maps aren't in the same\n *        directory, and the source map to be applied contains relative source\n *        paths. If so, those relative source paths need to be rewritten\n *        relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n  function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n    var sourceFile = aSourceFile;\n    // If aSourceFile is omitted, we will use the file property of the SourceMap\n    if (aSourceFile == null) {\n      if (aSourceMapConsumer.file == null) {\n        throw new Error(\n          'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n          'or the source map\\'s \"file\" property. Both were omitted.'\n        );\n      }\n      sourceFile = aSourceMapConsumer.file;\n    }\n    var sourceRoot = this._sourceRoot;\n    // Make \"sourceFile\" relative if an absolute Url is passed.\n    if (sourceRoot != null) {\n      sourceFile = util.relative(sourceRoot, sourceFile);\n    }\n    // Applying the SourceMap can add and remove items from the sources and\n    // the names array.\n    var newSources = new ArraySet();\n    var newNames = new ArraySet();\n\n    // Find mappings for the \"sourceFile\"\n    this._mappings.unsortedForEach(function (mapping) {\n      if (mapping.source === sourceFile && mapping.originalLine != null) {\n        // Check if it can be mapped by the source map, then update the mapping.\n        var original = aSourceMapConsumer.originalPositionFor({\n          line: mapping.originalLine,\n          column: mapping.originalColumn\n        });\n        if (original.source != null) {\n          // Copy mapping\n          mapping.source = original.source;\n          if (aSourceMapPath != null) {\n            mapping.source = util.join(aSourceMapPath, mapping.source)\n          }\n          if (sourceRoot != null) {\n            mapping.source = util.relative(sourceRoot, mapping.source);\n          }\n          mapping.originalLine = original.line;\n          mapping.originalColumn = original.column;\n          if (original.name != null) {\n            mapping.name = original.name;\n          }\n        }\n      }\n\n      var source = mapping.source;\n      if (source != null && !newSources.has(source)) {\n        newSources.add(source);\n      }\n\n      var name = mapping.name;\n      if (name != null && !newNames.has(name)) {\n        newNames.add(name);\n      }\n\n    }, this);\n    this._sources = newSources;\n    this._names = newNames;\n\n    // Copy sourcesContents of applied map.\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        if (aSourceMapPath != null) {\n          sourceFile = util.join(aSourceMapPath, sourceFile);\n        }\n        if (sourceRoot != null) {\n          sourceFile = util.relative(sourceRoot, sourceFile);\n        }\n        this.setSourceContent(sourceFile, content);\n      }\n    }, this);\n  };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n *   1. Just the generated position.\n *   2. The Generated position, original position, and original source.\n *   3. Generated and original position, original source, as well as a name\n *      token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n  function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n                                              aName) {\n    // When aOriginal is truthy but has empty values for .line and .column,\n    // it is most likely a programmer error. In this case we throw a very\n    // specific error message to try to guide them the right way.\n    // For example: https://github.com/Polymer/polymer-bundler/pull/519\n    if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n        throw new Error(\n            'original.line and original.column are not numbers -- you probably meant to omit ' +\n            'the original mapping entirely and only map the generated position. If so, pass ' +\n            'null for the original mapping instead of an object with empty or null values.'\n        );\n    }\n\n    if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n        && aGenerated.line > 0 && aGenerated.column >= 0\n        && !aOriginal && !aSource && !aName) {\n      // Case 1.\n      return;\n    }\n    else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n             && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n             && aGenerated.line > 0 && aGenerated.column >= 0\n             && aOriginal.line > 0 && aOriginal.column >= 0\n             && aSource) {\n      // Cases 2 and 3.\n      return;\n    }\n    else {\n      throw new Error('Invalid mapping: ' + JSON.stringify({\n        generated: aGenerated,\n        source: aSource,\n        original: aOriginal,\n        name: aName\n      }));\n    }\n  };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n  function SourceMapGenerator_serializeMappings() {\n    var previousGeneratedColumn = 0;\n    var previousGeneratedLine = 1;\n    var previousOriginalColumn = 0;\n    var previousOriginalLine = 0;\n    var previousName = 0;\n    var previousSource = 0;\n    var result = '';\n    var next;\n    var mapping;\n    var nameIdx;\n    var sourceIdx;\n\n    var mappings = this._mappings.toArray();\n    for (var i = 0, len = mappings.length; i < len; i++) {\n      mapping = mappings[i];\n      next = ''\n\n      if (mapping.generatedLine !== previousGeneratedLine) {\n        previousGeneratedColumn = 0;\n        while (mapping.generatedLine !== previousGeneratedLine) {\n          next += ';';\n          previousGeneratedLine++;\n        }\n      }\n      else {\n        if (i > 0) {\n          if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n            continue;\n          }\n          next += ',';\n        }\n      }\n\n      next += base64VLQ.encode(mapping.generatedColumn\n                                 - previousGeneratedColumn);\n      previousGeneratedColumn = mapping.generatedColumn;\n\n      if (mapping.source != null) {\n        sourceIdx = this._sources.indexOf(mapping.source);\n        next += base64VLQ.encode(sourceIdx - previousSource);\n        previousSource = sourceIdx;\n\n        // lines are stored 0-based in SourceMap spec version 3\n        next += base64VLQ.encode(mapping.originalLine - 1\n                                   - previousOriginalLine);\n        previousOriginalLine = mapping.originalLine - 1;\n\n        next += base64VLQ.encode(mapping.originalColumn\n                                   - previousOriginalColumn);\n        previousOriginalColumn = mapping.originalColumn;\n\n        if (mapping.name != null) {\n          nameIdx = this._names.indexOf(mapping.name);\n          next += base64VLQ.encode(nameIdx - previousName);\n          previousName = nameIdx;\n        }\n      }\n\n      result += next;\n    }\n\n    return result;\n  };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n  function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n    return aSources.map(function (source) {\n      if (!this._sourcesContents) {\n        return null;\n      }\n      if (aSourceRoot != null) {\n        source = util.relative(aSourceRoot, source);\n      }\n      var key = util.toSetString(source);\n      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n        ? this._sourcesContents[key]\n        : null;\n    }, this);\n  };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n  function SourceMapGenerator_toJSON() {\n    var map = {\n      version: this._version,\n      sources: this._sources.toArray(),\n      names: this._names.toArray(),\n      mappings: this._serializeMappings()\n    };\n    if (this._file != null) {\n      map.file = this._file;\n    }\n    if (this._sourceRoot != null) {\n      map.sourceRoot = this._sourceRoot;\n    }\n    if (this._sourcesContents) {\n      map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n    }\n\n    return map;\n  };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n  function SourceMapGenerator_toString() {\n    return JSON.stringify(this.toJSON());\n  };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-generator.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/source-node.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/source-node.js ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-generator.js\").SourceMapGenerator;\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js\");\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n *        generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n  this.children = [];\n  this.sourceContents = {};\n  this.line = aLine == null ? null : aLine;\n  this.column = aColumn == null ? null : aColumn;\n  this.source = aSource == null ? null : aSource;\n  this.name = aName == null ? null : aName;\n  this[isSourceNode] = true;\n  if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n *        SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n  function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n    // The SourceNode we want to fill with the generated code\n    // and the SourceMap\n    var node = new SourceNode();\n\n    // All even indices of this array are one line of the generated code,\n    // while all odd indices are the newlines between two adjacent lines\n    // (since `REGEX_NEWLINE` captures its match).\n    // Processed fragments are accessed by calling `shiftNextLine`.\n    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n    var remainingLinesIndex = 0;\n    var shiftNextLine = function() {\n      var lineContents = getNextLine();\n      // The last line of a file might not have a newline.\n      var newLine = getNextLine() || \"\";\n      return lineContents + newLine;\n\n      function getNextLine() {\n        return remainingLinesIndex < remainingLines.length ?\n            remainingLines[remainingLinesIndex++] : undefined;\n      }\n    };\n\n    // We need to remember the position of \"remainingLines\"\n    var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n    // The generate SourceNodes we need a code range.\n    // To extract it current and last mapping is used.\n    // Here we store the last mapping.\n    var lastMapping = null;\n\n    aSourceMapConsumer.eachMapping(function (mapping) {\n      if (lastMapping !== null) {\n        // We add the code from \"lastMapping\" to \"mapping\":\n        // First check if there is a new line in between.\n        if (lastGeneratedLine < mapping.generatedLine) {\n          // Associate first line with \"lastMapping\"\n          addMappingWithCode(lastMapping, shiftNextLine());\n          lastGeneratedLine++;\n          lastGeneratedColumn = 0;\n          // The remaining code is added without mapping\n        } else {\n          // There is no new line in between.\n          // Associate the code between \"lastGeneratedColumn\" and\n          // \"mapping.generatedColumn\" with \"lastMapping\"\n          var nextLine = remainingLines[remainingLinesIndex] || '';\n          var code = nextLine.substr(0, mapping.generatedColumn -\n                                        lastGeneratedColumn);\n          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n                                              lastGeneratedColumn);\n          lastGeneratedColumn = mapping.generatedColumn;\n          addMappingWithCode(lastMapping, code);\n          // No more remaining code, continue\n          lastMapping = mapping;\n          return;\n        }\n      }\n      // We add the generated code until the first mapping\n      // to the SourceNode without any mapping.\n      // Each line is added as separate string.\n      while (lastGeneratedLine < mapping.generatedLine) {\n        node.add(shiftNextLine());\n        lastGeneratedLine++;\n      }\n      if (lastGeneratedColumn < mapping.generatedColumn) {\n        var nextLine = remainingLines[remainingLinesIndex] || '';\n        node.add(nextLine.substr(0, mapping.generatedColumn));\n        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n        lastGeneratedColumn = mapping.generatedColumn;\n      }\n      lastMapping = mapping;\n    }, this);\n    // We have processed all mappings.\n    if (remainingLinesIndex < remainingLines.length) {\n      if (lastMapping) {\n        // Associate the remaining code in the current line with \"lastMapping\"\n        addMappingWithCode(lastMapping, shiftNextLine());\n      }\n      // and add the remaining lines without any mapping\n      node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n    }\n\n    // Copy sourcesContent into SourceNode\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        if (aRelativePath != null) {\n          sourceFile = util.join(aRelativePath, sourceFile);\n        }\n        node.setSourceContent(sourceFile, content);\n      }\n    });\n\n    return node;\n\n    function addMappingWithCode(mapping, code) {\n      if (mapping === null || mapping.source === undefined) {\n        node.add(code);\n      } else {\n        var source = aRelativePath\n          ? util.join(aRelativePath, mapping.source)\n          : mapping.source;\n        node.add(new SourceNode(mapping.originalLine,\n                                mapping.originalColumn,\n                                source,\n                                code,\n                                mapping.name));\n      }\n    }\n  };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n *        SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n  if (Array.isArray(aChunk)) {\n    aChunk.forEach(function (chunk) {\n      this.add(chunk);\n    }, this);\n  }\n  else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n    if (aChunk) {\n      this.children.push(aChunk);\n    }\n  }\n  else {\n    throw new TypeError(\n      \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n    );\n  }\n  return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n *        SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n  if (Array.isArray(aChunk)) {\n    for (var i = aChunk.length-1; i >= 0; i--) {\n      this.prepend(aChunk[i]);\n    }\n  }\n  else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n    this.children.unshift(aChunk);\n  }\n  else {\n    throw new TypeError(\n      \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n    );\n  }\n  return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n  var chunk;\n  for (var i = 0, len = this.children.length; i < len; i++) {\n    chunk = this.children[i];\n    if (chunk[isSourceNode]) {\n      chunk.walk(aFn);\n    }\n    else {\n      if (chunk !== '') {\n        aFn(chunk, { source: this.source,\n                     line: this.line,\n                     column: this.column,\n                     name: this.name });\n      }\n    }\n  }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n  var newChildren;\n  var i;\n  var len = this.children.length;\n  if (len > 0) {\n    newChildren = [];\n    for (i = 0; i < len-1; i++) {\n      newChildren.push(this.children[i]);\n      newChildren.push(aSep);\n    }\n    newChildren.push(this.children[i]);\n    this.children = newChildren;\n  }\n  return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n  var lastChild = this.children[this.children.length - 1];\n  if (lastChild[isSourceNode]) {\n    lastChild.replaceRight(aPattern, aReplacement);\n  }\n  else if (typeof lastChild === 'string') {\n    this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n  }\n  else {\n    this.children.push(''.replace(aPattern, aReplacement));\n  }\n  return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n  function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n    this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n  };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n  function SourceNode_walkSourceContents(aFn) {\n    for (var i = 0, len = this.children.length; i < len; i++) {\n      if (this.children[i][isSourceNode]) {\n        this.children[i].walkSourceContents(aFn);\n      }\n    }\n\n    var sources = Object.keys(this.sourceContents);\n    for (var i = 0, len = sources.length; i < len; i++) {\n      aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n    }\n  };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n  var str = \"\";\n  this.walk(function (chunk) {\n    str += chunk;\n  });\n  return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n  var generated = {\n    code: \"\",\n    line: 1,\n    column: 0\n  };\n  var map = new SourceMapGenerator(aArgs);\n  var sourceMappingActive = false;\n  var lastOriginalSource = null;\n  var lastOriginalLine = null;\n  var lastOriginalColumn = null;\n  var lastOriginalName = null;\n  this.walk(function (chunk, original) {\n    generated.code += chunk;\n    if (original.source !== null\n        && original.line !== null\n        && original.column !== null) {\n      if(lastOriginalSource !== original.source\n         || lastOriginalLine !== original.line\n         || lastOriginalColumn !== original.column\n         || lastOriginalName !== original.name) {\n        map.addMapping({\n          source: original.source,\n          original: {\n            line: original.line,\n            column: original.column\n          },\n          generated: {\n            line: generated.line,\n            column: generated.column\n          },\n          name: original.name\n        });\n      }\n      lastOriginalSource = original.source;\n      lastOriginalLine = original.line;\n      lastOriginalColumn = original.column;\n      lastOriginalName = original.name;\n      sourceMappingActive = true;\n    } else if (sourceMappingActive) {\n      map.addMapping({\n        generated: {\n          line: generated.line,\n          column: generated.column\n        }\n      });\n      lastOriginalSource = null;\n      sourceMappingActive = false;\n    }\n    for (var idx = 0, length = chunk.length; idx < length; idx++) {\n      if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n        generated.line++;\n        generated.column = 0;\n        // Mappings end at eol\n        if (idx + 1 === length) {\n          lastOriginalSource = null;\n          sourceMappingActive = false;\n        } else if (sourceMappingActive) {\n          map.addMapping({\n            source: original.source,\n            original: {\n              line: original.line,\n              column: original.column\n            },\n            generated: {\n              line: generated.line,\n              column: generated.column\n            },\n            name: original.name\n          });\n        }\n      } else {\n        generated.column++;\n      }\n    }\n  });\n  this.walkSourceContents(function (sourceFile, sourceContent) {\n    map.setSourceContent(sourceFile, sourceContent);\n  });\n\n  return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/source-node.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js":
/*!********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n  if (aName in aArgs) {\n    return aArgs[aName];\n  } else if (arguments.length === 3) {\n    return aDefaultValue;\n  } else {\n    throw new Error('\"' + aName + '\" is a required argument.');\n  }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n  var match = aUrl.match(urlRegexp);\n  if (!match) {\n    return null;\n  }\n  return {\n    scheme: match[1],\n    auth: match[2],\n    host: match[3],\n    port: match[4],\n    path: match[5]\n  };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n  var url = '';\n  if (aParsedUrl.scheme) {\n    url += aParsedUrl.scheme + ':';\n  }\n  url += '//';\n  if (aParsedUrl.auth) {\n    url += aParsedUrl.auth + '@';\n  }\n  if (aParsedUrl.host) {\n    url += aParsedUrl.host;\n  }\n  if (aParsedUrl.port) {\n    url += \":\" + aParsedUrl.port\n  }\n  if (aParsedUrl.path) {\n    url += aParsedUrl.path;\n  }\n  return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n  var path = aPath;\n  var url = urlParse(aPath);\n  if (url) {\n    if (!url.path) {\n      return aPath;\n    }\n    path = url.path;\n  }\n  var isAbsolute = exports.isAbsolute(path);\n\n  var parts = path.split(/\\/+/);\n  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n    part = parts[i];\n    if (part === '.') {\n      parts.splice(i, 1);\n    } else if (part === '..') {\n      up++;\n    } else if (up > 0) {\n      if (part === '') {\n        // The first part is blank if the path is absolute. Trying to go\n        // above the root is a no-op. Therefore we can remove all '..' parts\n        // directly after the root.\n        parts.splice(i + 1, up);\n        up = 0;\n      } else {\n        parts.splice(i, 2);\n        up--;\n      }\n    }\n  }\n  path = parts.join('/');\n\n  if (path === '') {\n    path = isAbsolute ? '/' : '.';\n  }\n\n  if (url) {\n    url.path = path;\n    return urlGenerate(url);\n  }\n  return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n *   scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n *   first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n *   is updated with the result and aRoot is returned. Otherwise the result\n *   is returned.\n *   - If aPath is absolute, the result is aPath.\n *   - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n  if (aRoot === \"\") {\n    aRoot = \".\";\n  }\n  if (aPath === \"\") {\n    aPath = \".\";\n  }\n  var aPathUrl = urlParse(aPath);\n  var aRootUrl = urlParse(aRoot);\n  if (aRootUrl) {\n    aRoot = aRootUrl.path || '/';\n  }\n\n  // `join(foo, '//www.example.org')`\n  if (aPathUrl && !aPathUrl.scheme) {\n    if (aRootUrl) {\n      aPathUrl.scheme = aRootUrl.scheme;\n    }\n    return urlGenerate(aPathUrl);\n  }\n\n  if (aPathUrl || aPath.match(dataUrlRegexp)) {\n    return aPath;\n  }\n\n  // `join('http://', 'www.example.com')`\n  if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n    aRootUrl.host = aPath;\n    return urlGenerate(aRootUrl);\n  }\n\n  var joined = aPath.charAt(0) === '/'\n    ? aPath\n    : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n  if (aRootUrl) {\n    aRootUrl.path = joined;\n    return urlGenerate(aRootUrl);\n  }\n  return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n  return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n  if (aRoot === \"\") {\n    aRoot = \".\";\n  }\n\n  aRoot = aRoot.replace(/\\/$/, '');\n\n  // It is possible for the path to be above the root. In this case, simply\n  // checking whether the root is a prefix of the path won't work. Instead, we\n  // need to remove components from the root one by one, until either we find\n  // a prefix that fits, or we run out of components to remove.\n  var level = 0;\n  while (aPath.indexOf(aRoot + '/') !== 0) {\n    var index = aRoot.lastIndexOf(\"/\");\n    if (index < 0) {\n      return aPath;\n    }\n\n    // If the only part of the root that is left is the scheme (i.e. http://,\n    // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n    // have exhausted all components, so the path is not relative to the root.\n    aRoot = aRoot.slice(0, index);\n    if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n      return aPath;\n    }\n\n    ++level;\n  }\n\n  // Make sure we add a \"../\" for each component we removed from the root.\n  return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n  var obj = Object.create(null);\n  return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n  return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n  if (isProtoString(aStr)) {\n    return '$' + aStr;\n  }\n\n  return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n  if (isProtoString(aStr)) {\n    return aStr.slice(1);\n  }\n\n  return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n  if (!s) {\n    return false;\n  }\n\n  var length = s.length;\n\n  if (length < 9 /* \"__proto__\".length */) {\n    return false;\n  }\n\n  if (s.charCodeAt(length - 1) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 2) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n      s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n      s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n      s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n      s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n      s.charCodeAt(length - 8) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 9) !== 95  /* '_' */) {\n    return false;\n  }\n\n  for (var i = length - 10; i >= 0; i--) {\n    if (s.charCodeAt(i) !== 36 /* '$' */) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n  var cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0 || onlyCompareOriginal) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n  var cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0 || onlyCompareGenerated) {\n    return cmp;\n  }\n\n  cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n  if (aStr1 === aStr2) {\n    return 0;\n  }\n\n  if (aStr1 === null) {\n    return 1; // aStr2 !== null\n  }\n\n  if (aStr2 === null) {\n    return -1; // aStr1 !== null\n  }\n\n  if (aStr1 > aStr2) {\n    return 1;\n  }\n\n  return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n  var cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n  return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n  sourceURL = sourceURL || '';\n\n  if (sourceRoot) {\n    // This follows what Chrome does.\n    if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n      sourceRoot += '/';\n    }\n    // The spec says:\n    //   Line 4: An optional source root, useful for relocating source\n    //   files on a server or removing repeated values in the\n    //   “sources” entry.  This value is prepended to the individual\n    //   entries in the “source” field.\n    sourceURL = sourceRoot + sourceURL;\n  }\n\n  // Historically, SourceMapConsumer did not take the sourceMapURL as\n  // a parameter.  This mode is still somewhat supported, which is why\n  // this code block is conditional.  However, it's preferable to pass\n  // the source map URL to SourceMapConsumer, so that this function\n  // can implement the source URL resolution algorithm as outlined in\n  // the spec.  This block is basically the equivalent of:\n  //    new URL(sourceURL, sourceMapURL).toString()\n  // ... except it avoids using URL, which wasn't available in the\n  // older releases of node still supported by this library.\n  //\n  // The spec says:\n  //   If the sources are not absolute URLs after prepending of the\n  //   “sourceRoot”, the sources are resolved relative to the\n  //   SourceMap (like resolving script src in a html document).\n  if (sourceMapURL) {\n    var parsed = urlParse(sourceMapURL);\n    if (!parsed) {\n      throw new Error(\"sourceMapURL could not be parsed\");\n    }\n    if (parsed.path) {\n      // Strip the last path component, but keep the \"/\".\n      var index = parsed.path.lastIndexOf('/');\n      if (index >= 0) {\n        parsed.path = parsed.path.substring(0, index + 1);\n      }\n    }\n    sourceURL = join(urlGenerate(parsed), sourceURL);\n  }\n\n  return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/lib/util.js?");

/***/ }),

/***/ "./node_modules/postcss-values-parser/node_modules/source-map/source-map.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/postcss-values-parser/node_modules/source-map/source-map.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = __webpack_require__(/*! ./lib/source-map-generator */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-generator.js\").SourceMapGenerator;\nexports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/source-map-consumer.js\").SourceMapConsumer;\nexports.SourceNode = __webpack_require__(/*! ./lib/source-node */ \"./node_modules/postcss-values-parser/node_modules/source-map/lib/source-node.js\").SourceNode;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss-values-parser/node_modules/source-map/source-map.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/at-rule.js":
/*!*********************************************!*\
  !*** ./node_modules/postcss/lib/at-rule.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\n\nclass AtRule extends Container {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'atrule'\n  }\n\n  append(...children) {\n    if (!this.proxyOf.nodes) this.nodes = []\n    return super.append(...children)\n  }\n\n  prepend(...children) {\n    if (!this.proxyOf.nodes) this.nodes = []\n    return super.prepend(...children)\n  }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/at-rule.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/comment.js":
/*!*********************************************!*\
  !*** ./node_modules/postcss/lib/comment.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Node = __webpack_require__(/*! ./node */ \"./node_modules/postcss/lib/node.js\")\n\nclass Comment extends Node {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'comment'\n  }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/comment.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/container.js":
/*!***********************************************!*\
  !*** ./node_modules/postcss/lib/container.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Comment = __webpack_require__(/*! ./comment */ \"./node_modules/postcss/lib/comment.js\")\nlet Declaration = __webpack_require__(/*! ./declaration */ \"./node_modules/postcss/lib/declaration.js\")\nlet Node = __webpack_require__(/*! ./node */ \"./node_modules/postcss/lib/node.js\")\nlet { isClean, my } = __webpack_require__(/*! ./symbols */ \"./node_modules/postcss/lib/symbols.js\")\n\nlet AtRule, parse, Root, Rule\n\nfunction cleanSource(nodes) {\n  return nodes.map(i => {\n    if (i.nodes) i.nodes = cleanSource(i.nodes)\n    delete i.source\n    return i\n  })\n}\n\nfunction markTreeDirty(node) {\n  node[isClean] = false\n  if (node.proxyOf.nodes) {\n    for (let i of node.proxyOf.nodes) {\n      markTreeDirty(i)\n    }\n  }\n}\n\nclass Container extends Node {\n  get first() {\n    if (!this.proxyOf.nodes) return undefined\n    return this.proxyOf.nodes[0]\n  }\n\n  get last() {\n    if (!this.proxyOf.nodes) return undefined\n    return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n  }\n\n  append(...children) {\n    for (let child of children) {\n      let nodes = this.normalize(child, this.last)\n      for (let node of nodes) this.proxyOf.nodes.push(node)\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  cleanRaws(keepBetween) {\n    super.cleanRaws(keepBetween)\n    if (this.nodes) {\n      for (let node of this.nodes) node.cleanRaws(keepBetween)\n    }\n  }\n\n  each(callback) {\n    if (!this.proxyOf.nodes) return undefined\n    let iterator = this.getIterator()\n\n    let index, result\n    while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n      index = this.indexes[iterator]\n      result = callback(this.proxyOf.nodes[index], index)\n      if (result === false) break\n\n      this.indexes[iterator] += 1\n    }\n\n    delete this.indexes[iterator]\n    return result\n  }\n\n  every(condition) {\n    return this.nodes.every(condition)\n  }\n\n  getIterator() {\n    if (!this.lastEach) this.lastEach = 0\n    if (!this.indexes) this.indexes = {}\n\n    this.lastEach += 1\n    let iterator = this.lastEach\n    this.indexes[iterator] = 0\n\n    return iterator\n  }\n\n  getProxyProcessor() {\n    return {\n      get(node, prop) {\n        if (prop === 'proxyOf') {\n          return node\n        } else if (!node[prop]) {\n          return node[prop]\n        } else if (\n          prop === 'each' ||\n          (typeof prop === 'string' && prop.startsWith('walk'))\n        ) {\n          return (...args) => {\n            return node[prop](\n              ...args.map(i => {\n                if (typeof i === 'function') {\n                  return (child, index) => i(child.toProxy(), index)\n                } else {\n                  return i\n                }\n              })\n            )\n          }\n        } else if (prop === 'every' || prop === 'some') {\n          return cb => {\n            return node[prop]((child, ...other) =>\n              cb(child.toProxy(), ...other)\n            )\n          }\n        } else if (prop === 'root') {\n          return () => node.root().toProxy()\n        } else if (prop === 'nodes') {\n          return node.nodes.map(i => i.toProxy())\n        } else if (prop === 'first' || prop === 'last') {\n          return node[prop].toProxy()\n        } else {\n          return node[prop]\n        }\n      },\n\n      set(node, prop, value) {\n        if (node[prop] === value) return true\n        node[prop] = value\n        if (prop === 'name' || prop === 'params' || prop === 'selector') {\n          node.markDirty()\n        }\n        return true\n      }\n    }\n  }\n\n  index(child) {\n    if (typeof child === 'number') return child\n    if (child.proxyOf) child = child.proxyOf\n    return this.proxyOf.nodes.indexOf(child)\n  }\n\n  insertAfter(exist, add) {\n    let existIndex = this.index(exist)\n    let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n    existIndex = this.index(exist)\n    for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (existIndex < index) {\n        this.indexes[id] = index + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  insertBefore(exist, add) {\n    let existIndex = this.index(exist)\n    let type = existIndex === 0 ? 'prepend' : false\n    let nodes = this.normalize(\n      add,\n      this.proxyOf.nodes[existIndex],\n      type\n    ).reverse()\n    existIndex = this.index(exist)\n    for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (existIndex <= index) {\n        this.indexes[id] = index + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  normalize(nodes, sample) {\n    if (typeof nodes === 'string') {\n      nodes = cleanSource(parse(nodes).nodes)\n    } else if (typeof nodes === 'undefined') {\n      nodes = []\n    } else if (Array.isArray(nodes)) {\n      nodes = nodes.slice(0)\n      for (let i of nodes) {\n        if (i.parent) i.parent.removeChild(i, 'ignore')\n      }\n    } else if (nodes.type === 'root' && this.type !== 'document') {\n      nodes = nodes.nodes.slice(0)\n      for (let i of nodes) {\n        if (i.parent) i.parent.removeChild(i, 'ignore')\n      }\n    } else if (nodes.type) {\n      nodes = [nodes]\n    } else if (nodes.prop) {\n      if (typeof nodes.value === 'undefined') {\n        throw new Error('Value field is missed in node creation')\n      } else if (typeof nodes.value !== 'string') {\n        nodes.value = String(nodes.value)\n      }\n      nodes = [new Declaration(nodes)]\n    } else if (nodes.selector || nodes.selectors) {\n      nodes = [new Rule(nodes)]\n    } else if (nodes.name) {\n      nodes = [new AtRule(nodes)]\n    } else if (nodes.text) {\n      nodes = [new Comment(nodes)]\n    } else {\n      throw new Error('Unknown node type in node creation')\n    }\n\n    let processed = nodes.map(i => {\n      /* c8 ignore next */\n      if (!i[my]) Container.rebuild(i)\n      i = i.proxyOf\n      if (i.parent) i.parent.removeChild(i)\n      if (i[isClean]) markTreeDirty(i)\n\n      if (!i.raws) i.raws = {}\n      if (typeof i.raws.before === 'undefined') {\n        if (sample && typeof sample.raws.before !== 'undefined') {\n          i.raws.before = sample.raws.before.replace(/\\S/g, '')\n        }\n      }\n      i.parent = this.proxyOf\n      return i\n    })\n\n    return processed\n  }\n\n  prepend(...children) {\n    children = children.reverse()\n    for (let child of children) {\n      let nodes = this.normalize(child, this.first, 'prepend').reverse()\n      for (let node of nodes) this.proxyOf.nodes.unshift(node)\n      for (let id in this.indexes) {\n        this.indexes[id] = this.indexes[id] + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  push(child) {\n    child.parent = this\n    this.proxyOf.nodes.push(child)\n    return this\n  }\n\n  removeAll() {\n    for (let node of this.proxyOf.nodes) node.parent = undefined\n    this.proxyOf.nodes = []\n\n    this.markDirty()\n\n    return this\n  }\n\n  removeChild(child) {\n    child = this.index(child)\n    this.proxyOf.nodes[child].parent = undefined\n    this.proxyOf.nodes.splice(child, 1)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (index >= child) {\n        this.indexes[id] = index - 1\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  replaceValues(pattern, opts, callback) {\n    if (!callback) {\n      callback = opts\n      opts = {}\n    }\n\n    this.walkDecls(decl => {\n      if (opts.props && !opts.props.includes(decl.prop)) return\n      if (opts.fast && !decl.value.includes(opts.fast)) return\n\n      decl.value = decl.value.replace(pattern, callback)\n    })\n\n    this.markDirty()\n\n    return this\n  }\n\n  some(condition) {\n    return this.nodes.some(condition)\n  }\n\n  walk(callback) {\n    return this.each((child, i) => {\n      let result\n      try {\n        result = callback(child, i)\n      } catch (e) {\n        throw child.addToError(e)\n      }\n      if (result !== false && child.walk) {\n        result = child.walk(callback)\n      }\n\n      return result\n    })\n  }\n\n  walkAtRules(name, callback) {\n    if (!callback) {\n      callback = name\n      return this.walk((child, i) => {\n        if (child.type === 'atrule') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (name instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'atrule' && name.test(child.name)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'atrule' && child.name === name) {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkComments(callback) {\n    return this.walk((child, i) => {\n      if (child.type === 'comment') {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkDecls(prop, callback) {\n    if (!callback) {\n      callback = prop\n      return this.walk((child, i) => {\n        if (child.type === 'decl') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (prop instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'decl' && prop.test(child.prop)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'decl' && child.prop === prop) {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkRules(selector, callback) {\n    if (!callback) {\n      callback = selector\n\n      return this.walk((child, i) => {\n        if (child.type === 'rule') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (selector instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'rule' && selector.test(child.selector)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'rule' && child.selector === selector) {\n        return callback(child, i)\n      }\n    })\n  }\n}\n\nContainer.registerParse = dependant => {\n  parse = dependant\n}\n\nContainer.registerRule = dependant => {\n  Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n  AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n  Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n  if (node.type === 'atrule') {\n    Object.setPrototypeOf(node, AtRule.prototype)\n  } else if (node.type === 'rule') {\n    Object.setPrototypeOf(node, Rule.prototype)\n  } else if (node.type === 'decl') {\n    Object.setPrototypeOf(node, Declaration.prototype)\n  } else if (node.type === 'comment') {\n    Object.setPrototypeOf(node, Comment.prototype)\n  } else if (node.type === 'root') {\n    Object.setPrototypeOf(node, Root.prototype)\n  }\n\n  node[my] = true\n\n  if (node.nodes) {\n    node.nodes.forEach(child => {\n      Container.rebuild(child)\n    })\n  }\n}\n/* c8 ignore stop */\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/container.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/css-syntax-error.js":
/*!******************************************************!*\
  !*** ./node_modules/postcss/lib/css-syntax-error.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet pico = __webpack_require__(/*! picocolors */ \"./node_modules/postcss/node_modules/picocolors/picocolors.browser.js\")\n\nlet terminalHighlight = __webpack_require__(/*! ./terminal-highlight */ 1)\n\nclass CssSyntaxError extends Error {\n  constructor(message, line, column, source, file, plugin) {\n    super(message)\n    this.name = 'CssSyntaxError'\n    this.reason = message\n\n    if (file) {\n      this.file = file\n    }\n    if (source) {\n      this.source = source\n    }\n    if (plugin) {\n      this.plugin = plugin\n    }\n    if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n      if (typeof line === 'number') {\n        this.line = line\n        this.column = column\n      } else {\n        this.line = line.line\n        this.column = line.column\n        this.endLine = column.line\n        this.endColumn = column.column\n      }\n    }\n\n    this.setMessage()\n\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, CssSyntaxError)\n    }\n  }\n\n  setMessage() {\n    this.message = this.plugin ? this.plugin + ': ' : ''\n    this.message += this.file ? this.file : '<css input>'\n    if (typeof this.line !== 'undefined') {\n      this.message += ':' + this.line + ':' + this.column\n    }\n    this.message += ': ' + this.reason\n  }\n\n  showSourceCode(color) {\n    if (!this.source) return ''\n\n    let css = this.source\n    if (color == null) color = pico.isColorSupported\n\n    let aside = text => text\n    let mark = text => text\n    let highlight = text => text\n    if (color) {\n      let { bold, gray, red } = pico.createColors(true)\n      mark = text => bold(red(text))\n      aside = text => gray(text)\n      if (terminalHighlight) {\n        highlight = text => terminalHighlight(text)\n      }\n    }\n\n    let lines = css.split(/\\r?\\n/)\n    let start = Math.max(this.line - 3, 0)\n    let end = Math.min(this.line + 2, lines.length)\n    let maxWidth = String(end).length\n\n    return lines\n      .slice(start, end)\n      .map((line, index) => {\n        let number = start + 1 + index\n        let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n        if (number === this.line) {\n          if (line.length > 160) {\n            let padding = 20\n            let subLineStart = Math.max(0, this.column - padding)\n            let subLineEnd = Math.max(\n              this.column + padding,\n              this.endColumn + padding\n            )\n            let subLine = line.slice(subLineStart, subLineEnd)\n\n            let spacing =\n              aside(gutter.replace(/\\d/g, ' ')) +\n              line\n                .slice(0, Math.min(this.column - 1, padding - 1))\n                .replace(/[^\\t]/g, ' ')\n\n            return (\n              mark('>') +\n              aside(gutter) +\n              highlight(subLine) +\n              '\\n ' +\n              spacing +\n              mark('^')\n            )\n          }\n\n          let spacing =\n            aside(gutter.replace(/\\d/g, ' ')) +\n            line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n\n          return (\n            mark('>') +\n            aside(gutter) +\n            highlight(line) +\n            '\\n ' +\n            spacing +\n            mark('^')\n          )\n        }\n\n        return ' ' + aside(gutter) + highlight(line)\n      })\n      .join('\\n')\n  }\n\n  toString() {\n    let code = this.showSourceCode()\n    if (code) {\n      code = '\\n\\n' + code + '\\n'\n    }\n    return this.name + ': ' + this.message + code\n  }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/css-syntax-error.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/declaration.js":
/*!*************************************************!*\
  !*** ./node_modules/postcss/lib/declaration.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Node = __webpack_require__(/*! ./node */ \"./node_modules/postcss/lib/node.js\")\n\nclass Declaration extends Node {\n  get variable() {\n    return this.prop.startsWith('--') || this.prop[0] === '$'\n  }\n\n  constructor(defaults) {\n    if (\n      defaults &&\n      typeof defaults.value !== 'undefined' &&\n      typeof defaults.value !== 'string'\n    ) {\n      defaults = { ...defaults, value: String(defaults.value) }\n    }\n    super(defaults)\n    this.type = 'decl'\n  }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/declaration.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/document.js":
/*!**********************************************!*\
  !*** ./node_modules/postcss/lib/document.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n  constructor(defaults) {\n    // type needs to be passed to super, otherwise child roots won't be normalized correctly\n    super({ type: 'document', ...defaults })\n\n    if (!this.nodes) {\n      this.nodes = []\n    }\n  }\n\n  toResult(opts = {}) {\n    let lazy = new LazyResult(new Processor(), this, opts)\n\n    return lazy.stringify()\n  }\n}\n\nDocument.registerLazyResult = dependant => {\n  LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n  Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/document.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/fromJSON.js":
/*!**********************************************!*\
  !*** ./node_modules/postcss/lib/fromJSON.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet AtRule = __webpack_require__(/*! ./at-rule */ \"./node_modules/postcss/lib/at-rule.js\")\nlet Comment = __webpack_require__(/*! ./comment */ \"./node_modules/postcss/lib/comment.js\")\nlet Declaration = __webpack_require__(/*! ./declaration */ \"./node_modules/postcss/lib/declaration.js\")\nlet Input = __webpack_require__(/*! ./input */ \"./node_modules/postcss/lib/input.js\")\nlet PreviousMap = __webpack_require__(/*! ./previous-map */ \"./node_modules/postcss/lib/previous-map.js\")\nlet Root = __webpack_require__(/*! ./root */ \"./node_modules/postcss/lib/root.js\")\nlet Rule = __webpack_require__(/*! ./rule */ \"./node_modules/postcss/lib/rule.js\")\n\nfunction fromJSON(json, inputs) {\n  if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n  let { inputs: ownInputs, ...defaults } = json\n  if (ownInputs) {\n    inputs = []\n    for (let input of ownInputs) {\n      let inputHydrated = { ...input, __proto__: Input.prototype }\n      if (inputHydrated.map) {\n        inputHydrated.map = {\n          ...inputHydrated.map,\n          __proto__: PreviousMap.prototype\n        }\n      }\n      inputs.push(inputHydrated)\n    }\n  }\n  if (defaults.nodes) {\n    defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n  }\n  if (defaults.source) {\n    let { inputId, ...source } = defaults.source\n    defaults.source = source\n    if (inputId != null) {\n      defaults.source.input = inputs[inputId]\n    }\n  }\n  if (defaults.type === 'root') {\n    return new Root(defaults)\n  } else if (defaults.type === 'decl') {\n    return new Declaration(defaults)\n  } else if (defaults.type === 'rule') {\n    return new Rule(defaults)\n  } else if (defaults.type === 'comment') {\n    return new Comment(defaults)\n  } else if (defaults.type === 'atrule') {\n    return new AtRule(defaults)\n  } else {\n    throw new Error('Unknown node type: ' + json.type)\n  }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/fromJSON.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/input.js":
/*!*******************************************!*\
  !*** ./node_modules/postcss/lib/input.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet { nanoid } = __webpack_require__(/*! nanoid/non-secure */ \"./node_modules/nanoid/non-secure/index.js\")\nlet { isAbsolute, resolve } = __webpack_require__(/*! path */ 2)\nlet { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(/*! source-map-js */ 3)\nlet { fileURLToPath, pathToFileURL } = __webpack_require__(/*! url */ 4)\n\nlet CssSyntaxError = __webpack_require__(/*! ./css-syntax-error */ \"./node_modules/postcss/lib/css-syntax-error.js\")\nlet PreviousMap = __webpack_require__(/*! ./previous-map */ \"./node_modules/postcss/lib/previous-map.js\")\nlet terminalHighlight = __webpack_require__(/*! ./terminal-highlight */ 1)\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n  get from() {\n    return this.file || this.id\n  }\n\n  constructor(css, opts = {}) {\n    if (\n      css === null ||\n      typeof css === 'undefined' ||\n      (typeof css === 'object' && !css.toString)\n    ) {\n      throw new Error(`PostCSS received ${css} instead of CSS string`)\n    }\n\n    this.css = css.toString()\n\n    if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n      this.hasBOM = true\n      this.css = this.css.slice(1)\n    } else {\n      this.hasBOM = false\n    }\n\n    this.document = this.css\n    if (opts.document) this.document = opts.document.toString()\n\n    if (opts.from) {\n      if (\n        !pathAvailable ||\n        /^\\w+:\\/\\//.test(opts.from) ||\n        isAbsolute(opts.from)\n      ) {\n        this.file = opts.from\n      } else {\n        this.file = resolve(opts.from)\n      }\n    }\n\n    if (pathAvailable && sourceMapAvailable) {\n      let map = new PreviousMap(this.css, opts)\n      if (map.text) {\n        this.map = map\n        let file = map.consumer().file\n        if (!this.file && file) this.file = this.mapResolve(file)\n      }\n    }\n\n    if (!this.file) {\n      this.id = '<input css ' + nanoid(6) + '>'\n    }\n    if (this.map) this.map.file = this.from\n  }\n\n  error(message, line, column, opts = {}) {\n    let endColumn, endLine, result\n\n    if (line && typeof line === 'object') {\n      let start = line\n      let end = column\n      if (typeof start.offset === 'number') {\n        let pos = this.fromOffset(start.offset)\n        line = pos.line\n        column = pos.col\n      } else {\n        line = start.line\n        column = start.column\n      }\n      if (typeof end.offset === 'number') {\n        let pos = this.fromOffset(end.offset)\n        endLine = pos.line\n        endColumn = pos.col\n      } else {\n        endLine = end.line\n        endColumn = end.column\n      }\n    } else if (!column) {\n      let pos = this.fromOffset(line)\n      line = pos.line\n      column = pos.col\n    }\n\n    let origin = this.origin(line, column, endLine, endColumn)\n    if (origin) {\n      result = new CssSyntaxError(\n        message,\n        origin.endLine === undefined\n          ? origin.line\n          : { column: origin.column, line: origin.line },\n        origin.endLine === undefined\n          ? origin.column\n          : { column: origin.endColumn, line: origin.endLine },\n        origin.source,\n        origin.file,\n        opts.plugin\n      )\n    } else {\n      result = new CssSyntaxError(\n        message,\n        endLine === undefined ? line : { column, line },\n        endLine === undefined ? column : { column: endColumn, line: endLine },\n        this.css,\n        this.file,\n        opts.plugin\n      )\n    }\n\n    result.input = { column, endColumn, endLine, line, source: this.css }\n    if (this.file) {\n      if (pathToFileURL) {\n        result.input.url = pathToFileURL(this.file).toString()\n      }\n      result.input.file = this.file\n    }\n\n    return result\n  }\n\n  fromOffset(offset) {\n    let lastLine, lineToIndex\n    if (!this[fromOffsetCache]) {\n      let lines = this.css.split('\\n')\n      lineToIndex = new Array(lines.length)\n      let prevIndex = 0\n\n      for (let i = 0, l = lines.length; i < l; i++) {\n        lineToIndex[i] = prevIndex\n        prevIndex += lines[i].length + 1\n      }\n\n      this[fromOffsetCache] = lineToIndex\n    } else {\n      lineToIndex = this[fromOffsetCache]\n    }\n    lastLine = lineToIndex[lineToIndex.length - 1]\n\n    let min = 0\n    if (offset >= lastLine) {\n      min = lineToIndex.length - 1\n    } else {\n      let max = lineToIndex.length - 2\n      let mid\n      while (min < max) {\n        mid = min + ((max - min) >> 1)\n        if (offset < lineToIndex[mid]) {\n          max = mid - 1\n        } else if (offset >= lineToIndex[mid + 1]) {\n          min = mid + 1\n        } else {\n          min = mid\n          break\n        }\n      }\n    }\n    return {\n      col: offset - lineToIndex[min] + 1,\n      line: min + 1\n    }\n  }\n\n  mapResolve(file) {\n    if (/^\\w+:\\/\\//.test(file)) {\n      return file\n    }\n    return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n  }\n\n  origin(line, column, endLine, endColumn) {\n    if (!this.map) return false\n    let consumer = this.map.consumer()\n\n    let from = consumer.originalPositionFor({ column, line })\n    if (!from.source) return false\n\n    let to\n    if (typeof endLine === 'number') {\n      to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n    }\n\n    let fromUrl\n\n    if (isAbsolute(from.source)) {\n      fromUrl = pathToFileURL(from.source)\n    } else {\n      fromUrl = new URL(\n        from.source,\n        this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n      )\n    }\n\n    let result = {\n      column: from.column,\n      endColumn: to && to.column,\n      endLine: to && to.line,\n      line: from.line,\n      url: fromUrl.toString()\n    }\n\n    if (fromUrl.protocol === 'file:') {\n      if (fileURLToPath) {\n        result.file = fileURLToPath(fromUrl)\n      } else {\n        /* c8 ignore next 2 */\n        throw new Error(`file: protocol is not available in this PostCSS build`)\n      }\n    }\n\n    let source = consumer.sourceContentFor(from.source)\n    if (source) result.source = source\n\n    return result\n  }\n\n  toJSON() {\n    let json = {}\n    for (let name of ['hasBOM', 'css', 'file', 'id']) {\n      if (this[name] != null) {\n        json[name] = this[name]\n      }\n    }\n    if (this.map) {\n      json.map = { ...this.map }\n      if (json.map.consumerCache) {\n        json.map.consumerCache = undefined\n      }\n    }\n    return json\n  }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n  terminalHighlight.registerInput(Input)\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/input.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/lazy-result.js":
/*!*************************************************!*\
  !*** ./node_modules/postcss/lib/lazy-result.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\nlet Document = __webpack_require__(/*! ./document */ \"./node_modules/postcss/lib/document.js\")\nlet MapGenerator = __webpack_require__(/*! ./map-generator */ \"./node_modules/postcss/lib/map-generator.js\")\nlet parse = __webpack_require__(/*! ./parse */ \"./node_modules/postcss/lib/parse.js\")\nlet Result = __webpack_require__(/*! ./result */ \"./node_modules/postcss/lib/result.js\")\nlet Root = __webpack_require__(/*! ./root */ \"./node_modules/postcss/lib/root.js\")\nlet stringify = __webpack_require__(/*! ./stringify */ \"./node_modules/postcss/lib/stringify.js\")\nlet { isClean, my } = __webpack_require__(/*! ./symbols */ \"./node_modules/postcss/lib/symbols.js\")\nlet warnOnce = __webpack_require__(/*! ./warn-once */ \"./node_modules/postcss/lib/warn-once.js\")\n\nconst TYPE_TO_CLASS_NAME = {\n  atrule: 'AtRule',\n  comment: 'Comment',\n  decl: 'Declaration',\n  document: 'Document',\n  root: 'Root',\n  rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n  AtRule: true,\n  AtRuleExit: true,\n  Comment: true,\n  CommentExit: true,\n  Declaration: true,\n  DeclarationExit: true,\n  Document: true,\n  DocumentExit: true,\n  Once: true,\n  OnceExit: true,\n  postcssPlugin: true,\n  prepare: true,\n  Root: true,\n  RootExit: true,\n  Rule: true,\n  RuleExit: true\n}\n\nconst NOT_VISITORS = {\n  Once: true,\n  postcssPlugin: true,\n  prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n  return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n  let key = false\n  let type = TYPE_TO_CLASS_NAME[node.type]\n  if (node.type === 'decl') {\n    key = node.prop.toLowerCase()\n  } else if (node.type === 'atrule') {\n    key = node.name.toLowerCase()\n  }\n\n  if (key && node.append) {\n    return [\n      type,\n      type + '-' + key,\n      CHILDREN,\n      type + 'Exit',\n      type + 'Exit-' + key\n    ]\n  } else if (key) {\n    return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n  } else if (node.append) {\n    return [type, CHILDREN, type + 'Exit']\n  } else {\n    return [type, type + 'Exit']\n  }\n}\n\nfunction toStack(node) {\n  let events\n  if (node.type === 'document') {\n    events = ['Document', CHILDREN, 'DocumentExit']\n  } else if (node.type === 'root') {\n    events = ['Root', CHILDREN, 'RootExit']\n  } else {\n    events = getEvents(node)\n  }\n\n  return {\n    eventIndex: 0,\n    events,\n    iterator: 0,\n    node,\n    visitorIndex: 0,\n    visitors: []\n  }\n}\n\nfunction cleanMarks(node) {\n  node[isClean] = false\n  if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n  return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n  get content() {\n    return this.stringify().content\n  }\n\n  get css() {\n    return this.stringify().css\n  }\n\n  get map() {\n    return this.stringify().map\n  }\n\n  get messages() {\n    return this.sync().messages\n  }\n\n  get opts() {\n    return this.result.opts\n  }\n\n  get processor() {\n    return this.result.processor\n  }\n\n  get root() {\n    return this.sync().root\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'LazyResult'\n  }\n\n  constructor(processor, css, opts) {\n    this.stringified = false\n    this.processed = false\n\n    let root\n    if (\n      typeof css === 'object' &&\n      css !== null &&\n      (css.type === 'root' || css.type === 'document')\n    ) {\n      root = cleanMarks(css)\n    } else if (css instanceof LazyResult || css instanceof Result) {\n      root = cleanMarks(css.root)\n      if (css.map) {\n        if (typeof opts.map === 'undefined') opts.map = {}\n        if (!opts.map.inline) opts.map.inline = false\n        opts.map.prev = css.map\n      }\n    } else {\n      let parser = parse\n      if (opts.syntax) parser = opts.syntax.parse\n      if (opts.parser) parser = opts.parser\n      if (parser.parse) parser = parser.parse\n\n      try {\n        root = parser(css, opts)\n      } catch (error) {\n        this.processed = true\n        this.error = error\n      }\n\n      if (root && !root[my]) {\n        /* c8 ignore next 2 */\n        Container.rebuild(root)\n      }\n    }\n\n    this.result = new Result(processor, root, opts)\n    this.helpers = { ...postcss, postcss, result: this.result }\n    this.plugins = this.processor.plugins.map(plugin => {\n      if (typeof plugin === 'object' && plugin.prepare) {\n        return { ...plugin, ...plugin.prepare(this.result) }\n      } else {\n        return plugin\n      }\n    })\n  }\n\n  async() {\n    if (this.error) return Promise.reject(this.error)\n    if (this.processed) return Promise.resolve(this.result)\n    if (!this.processing) {\n      this.processing = this.runAsync()\n    }\n    return this.processing\n  }\n\n  catch(onRejected) {\n    return this.async().catch(onRejected)\n  }\n\n  finally(onFinally) {\n    return this.async().then(onFinally, onFinally)\n  }\n\n  getAsyncError() {\n    throw new Error('Use process(css).then(cb) to work with async plugins')\n  }\n\n  handleError(error, node) {\n    let plugin = this.result.lastPlugin\n    try {\n      if (node) node.addToError(error)\n      this.error = error\n      if (error.name === 'CssSyntaxError' && !error.plugin) {\n        error.plugin = plugin.postcssPlugin\n        error.setMessage()\n      } else if (plugin.postcssVersion) {\n        if (true) {\n          let pluginName = plugin.postcssPlugin\n          let pluginVer = plugin.postcssVersion\n          let runtimeVer = this.result.processor.version\n          let a = pluginVer.split('.')\n          let b = runtimeVer.split('.')\n\n          if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n            // eslint-disable-next-line no-console\n            console.error(\n              'Unknown error from PostCSS plugin. Your current PostCSS ' +\n                'version is ' +\n                runtimeVer +\n                ', but ' +\n                pluginName +\n                ' uses ' +\n                pluginVer +\n                '. Perhaps this is the source of the error below.'\n            )\n          }\n        }\n      }\n    } catch (err) {\n      /* c8 ignore next 3 */\n      // eslint-disable-next-line no-console\n      if (console && console.error) console.error(err)\n    }\n    return error\n  }\n\n  prepareVisitors() {\n    this.listeners = {}\n    let add = (plugin, type, cb) => {\n      if (!this.listeners[type]) this.listeners[type] = []\n      this.listeners[type].push([plugin, cb])\n    }\n    for (let plugin of this.plugins) {\n      if (typeof plugin === 'object') {\n        for (let event in plugin) {\n          if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n            throw new Error(\n              `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n                `Try to update PostCSS (${this.processor.version} now).`\n            )\n          }\n          if (!NOT_VISITORS[event]) {\n            if (typeof plugin[event] === 'object') {\n              for (let filter in plugin[event]) {\n                if (filter === '*') {\n                  add(plugin, event, plugin[event][filter])\n                } else {\n                  add(\n                    plugin,\n                    event + '-' + filter.toLowerCase(),\n                    plugin[event][filter]\n                  )\n                }\n              }\n            } else if (typeof plugin[event] === 'function') {\n              add(plugin, event, plugin[event])\n            }\n          }\n        }\n      }\n    }\n    this.hasListener = Object.keys(this.listeners).length > 0\n  }\n\n  async runAsync() {\n    this.plugin = 0\n    for (let i = 0; i < this.plugins.length; i++) {\n      let plugin = this.plugins[i]\n      let promise = this.runOnRoot(plugin)\n      if (isPromise(promise)) {\n        try {\n          await promise\n        } catch (error) {\n          throw this.handleError(error)\n        }\n      }\n    }\n\n    this.prepareVisitors()\n    if (this.hasListener) {\n      let root = this.result.root\n      while (!root[isClean]) {\n        root[isClean] = true\n        let stack = [toStack(root)]\n        while (stack.length > 0) {\n          let promise = this.visitTick(stack)\n          if (isPromise(promise)) {\n            try {\n              await promise\n            } catch (e) {\n              let node = stack[stack.length - 1].node\n              throw this.handleError(e, node)\n            }\n          }\n        }\n      }\n\n      if (this.listeners.OnceExit) {\n        for (let [plugin, visitor] of this.listeners.OnceExit) {\n          this.result.lastPlugin = plugin\n          try {\n            if (root.type === 'document') {\n              let roots = root.nodes.map(subRoot =>\n                visitor(subRoot, this.helpers)\n              )\n\n              await Promise.all(roots)\n            } else {\n              await visitor(root, this.helpers)\n            }\n          } catch (e) {\n            throw this.handleError(e)\n          }\n        }\n      }\n    }\n\n    this.processed = true\n    return this.stringify()\n  }\n\n  runOnRoot(plugin) {\n    this.result.lastPlugin = plugin\n    try {\n      if (typeof plugin === 'object' && plugin.Once) {\n        if (this.result.root.type === 'document') {\n          let roots = this.result.root.nodes.map(root =>\n            plugin.Once(root, this.helpers)\n          )\n\n          if (isPromise(roots[0])) {\n            return Promise.all(roots)\n          }\n\n          return roots\n        }\n\n        return plugin.Once(this.result.root, this.helpers)\n      } else if (typeof plugin === 'function') {\n        return plugin(this.result.root, this.result)\n      }\n    } catch (error) {\n      throw this.handleError(error)\n    }\n  }\n\n  stringify() {\n    if (this.error) throw this.error\n    if (this.stringified) return this.result\n    this.stringified = true\n\n    this.sync()\n\n    let opts = this.result.opts\n    let str = stringify\n    if (opts.syntax) str = opts.syntax.stringify\n    if (opts.stringifier) str = opts.stringifier\n    if (str.stringify) str = str.stringify\n\n    let map = new MapGenerator(str, this.result.root, this.result.opts)\n    let data = map.generate()\n    this.result.css = data[0]\n    this.result.map = data[1]\n\n    return this.result\n  }\n\n  sync() {\n    if (this.error) throw this.error\n    if (this.processed) return this.result\n    this.processed = true\n\n    if (this.processing) {\n      throw this.getAsyncError()\n    }\n\n    for (let plugin of this.plugins) {\n      let promise = this.runOnRoot(plugin)\n      if (isPromise(promise)) {\n        throw this.getAsyncError()\n      }\n    }\n\n    this.prepareVisitors()\n    if (this.hasListener) {\n      let root = this.result.root\n      while (!root[isClean]) {\n        root[isClean] = true\n        this.walkSync(root)\n      }\n      if (this.listeners.OnceExit) {\n        if (root.type === 'document') {\n          for (let subRoot of root.nodes) {\n            this.visitSync(this.listeners.OnceExit, subRoot)\n          }\n        } else {\n          this.visitSync(this.listeners.OnceExit, root)\n        }\n      }\n    }\n\n    return this.result\n  }\n\n  then(onFulfilled, onRejected) {\n    if (true) {\n      if (!('from' in this.opts)) {\n        warnOnce(\n          'Without `from` option PostCSS could generate wrong source map ' +\n            'and will not find Browserslist config. Set it to CSS file path ' +\n            'or to `undefined` to prevent this warning.'\n        )\n      }\n    }\n    return this.async().then(onFulfilled, onRejected)\n  }\n\n  toString() {\n    return this.css\n  }\n\n  visitSync(visitors, node) {\n    for (let [plugin, visitor] of visitors) {\n      this.result.lastPlugin = plugin\n      let promise\n      try {\n        promise = visitor(node, this.helpers)\n      } catch (e) {\n        throw this.handleError(e, node.proxyOf)\n      }\n      if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n        return true\n      }\n      if (isPromise(promise)) {\n        throw this.getAsyncError()\n      }\n    }\n  }\n\n  visitTick(stack) {\n    let visit = stack[stack.length - 1]\n    let { node, visitors } = visit\n\n    if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n      stack.pop()\n      return\n    }\n\n    if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n      let [plugin, visitor] = visitors[visit.visitorIndex]\n      visit.visitorIndex += 1\n      if (visit.visitorIndex === visitors.length) {\n        visit.visitors = []\n        visit.visitorIndex = 0\n      }\n      this.result.lastPlugin = plugin\n      try {\n        return visitor(node.toProxy(), this.helpers)\n      } catch (e) {\n        throw this.handleError(e, node)\n      }\n    }\n\n    if (visit.iterator !== 0) {\n      let iterator = visit.iterator\n      let child\n      while ((child = node.nodes[node.indexes[iterator]])) {\n        node.indexes[iterator] += 1\n        if (!child[isClean]) {\n          child[isClean] = true\n          stack.push(toStack(child))\n          return\n        }\n      }\n      visit.iterator = 0\n      delete node.indexes[iterator]\n    }\n\n    let events = visit.events\n    while (visit.eventIndex < events.length) {\n      let event = events[visit.eventIndex]\n      visit.eventIndex += 1\n      if (event === CHILDREN) {\n        if (node.nodes && node.nodes.length) {\n          node[isClean] = true\n          visit.iterator = node.getIterator()\n        }\n        return\n      } else if (this.listeners[event]) {\n        visit.visitors = this.listeners[event]\n        return\n      }\n    }\n    stack.pop()\n  }\n\n  walkSync(node) {\n    node[isClean] = true\n    let events = getEvents(node)\n    for (let event of events) {\n      if (event === CHILDREN) {\n        if (node.nodes) {\n          node.each(child => {\n            if (!child[isClean]) this.walkSync(child)\n          })\n        }\n      } else {\n        let visitors = this.listeners[event]\n        if (visitors) {\n          if (this.visitSync(visitors, node.toProxy())) return\n        }\n      }\n    }\n  }\n\n  warnings() {\n    return this.sync().warnings()\n  }\n}\n\nLazyResult.registerPostcss = dependant => {\n  postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/lazy-result.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/list.js":
/*!******************************************!*\
  !*** ./node_modules/postcss/lib/list.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet list = {\n  comma(string) {\n    return list.split(string, [','], true)\n  },\n\n  space(string) {\n    let spaces = [' ', '\\n', '\\t']\n    return list.split(string, spaces)\n  },\n\n  split(string, separators, last) {\n    let array = []\n    let current = ''\n    let split = false\n\n    let func = 0\n    let inQuote = false\n    let prevQuote = ''\n    let escape = false\n\n    for (let letter of string) {\n      if (escape) {\n        escape = false\n      } else if (letter === '\\\\') {\n        escape = true\n      } else if (inQuote) {\n        if (letter === prevQuote) {\n          inQuote = false\n        }\n      } else if (letter === '\"' || letter === \"'\") {\n        inQuote = true\n        prevQuote = letter\n      } else if (letter === '(') {\n        func += 1\n      } else if (letter === ')') {\n        if (func > 0) func -= 1\n      } else if (func === 0) {\n        if (separators.includes(letter)) split = true\n      }\n\n      if (split) {\n        if (current !== '') array.push(current.trim())\n        current = ''\n        split = false\n      } else {\n        current += letter\n      }\n    }\n\n    if (last || current !== '') array.push(current.trim())\n    return array\n  }\n}\n\nmodule.exports = list\nlist.default = list\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/list.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/map-generator.js":
/*!***************************************************!*\
  !*** ./node_modules/postcss/lib/map-generator.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nlet { dirname, relative, resolve, sep } = __webpack_require__(/*! path */ 2)\nlet { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(/*! source-map-js */ 3)\nlet { pathToFileURL } = __webpack_require__(/*! url */ 4)\n\nlet Input = __webpack_require__(/*! ./input */ \"./node_modules/postcss/lib/input.js\")\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n  constructor(stringify, root, opts, cssString) {\n    this.stringify = stringify\n    this.mapOpts = opts.map || {}\n    this.root = root\n    this.opts = opts\n    this.css = cssString\n    this.originalCSS = cssString\n    this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n    this.memoizedFileURLs = new Map()\n    this.memoizedPaths = new Map()\n    this.memoizedURLs = new Map()\n  }\n\n  addAnnotation() {\n    let content\n\n    if (this.isInline()) {\n      content =\n        'data:application/json;base64,' + this.toBase64(this.map.toString())\n    } else if (typeof this.mapOpts.annotation === 'string') {\n      content = this.mapOpts.annotation\n    } else if (typeof this.mapOpts.annotation === 'function') {\n      content = this.mapOpts.annotation(this.opts.to, this.root)\n    } else {\n      content = this.outputFile() + '.map'\n    }\n    let eol = '\\n'\n    if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n    this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n  }\n\n  applyPrevMaps() {\n    for (let prev of this.previous()) {\n      let from = this.toUrl(this.path(prev.file))\n      let root = prev.root || dirname(prev.file)\n      let map\n\n      if (this.mapOpts.sourcesContent === false) {\n        map = new SourceMapConsumer(prev.text)\n        if (map.sourcesContent) {\n          map.sourcesContent = null\n        }\n      } else {\n        map = prev.consumer()\n      }\n\n      this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n    }\n  }\n\n  clearAnnotation() {\n    if (this.mapOpts.annotation === false) return\n\n    if (this.root) {\n      let node\n      for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n        node = this.root.nodes[i]\n        if (node.type !== 'comment') continue\n        if (node.text.startsWith('# sourceMappingURL=')) {\n          this.root.removeChild(i)\n        }\n      }\n    } else if (this.css) {\n      this.css = this.css.replace(/\\n*\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n    }\n  }\n\n  generate() {\n    this.clearAnnotation()\n    if (pathAvailable && sourceMapAvailable && this.isMap()) {\n      return this.generateMap()\n    } else {\n      let result = ''\n      this.stringify(this.root, i => {\n        result += i\n      })\n      return [result]\n    }\n  }\n\n  generateMap() {\n    if (this.root) {\n      this.generateString()\n    } else if (this.previous().length === 1) {\n      let prev = this.previous()[0].consumer()\n      prev.file = this.outputFile()\n      this.map = SourceMapGenerator.fromSourceMap(prev, {\n        ignoreInvalidMapping: true\n      })\n    } else {\n      this.map = new SourceMapGenerator({\n        file: this.outputFile(),\n        ignoreInvalidMapping: true\n      })\n      this.map.addMapping({\n        generated: { column: 0, line: 1 },\n        original: { column: 0, line: 1 },\n        source: this.opts.from\n          ? this.toUrl(this.path(this.opts.from))\n          : '<no source>'\n      })\n    }\n\n    if (this.isSourcesContent()) this.setSourcesContent()\n    if (this.root && this.previous().length > 0) this.applyPrevMaps()\n    if (this.isAnnotation()) this.addAnnotation()\n\n    if (this.isInline()) {\n      return [this.css]\n    } else {\n      return [this.css, this.map]\n    }\n  }\n\n  generateString() {\n    this.css = ''\n    this.map = new SourceMapGenerator({\n      file: this.outputFile(),\n      ignoreInvalidMapping: true\n    })\n\n    let line = 1\n    let column = 1\n\n    let noSource = '<no source>'\n    let mapping = {\n      generated: { column: 0, line: 0 },\n      original: { column: 0, line: 0 },\n      source: ''\n    }\n\n    let last, lines\n    this.stringify(this.root, (str, node, type) => {\n      this.css += str\n\n      if (node && type !== 'end') {\n        mapping.generated.line = line\n        mapping.generated.column = column - 1\n        if (node.source && node.source.start) {\n          mapping.source = this.sourcePath(node)\n          mapping.original.line = node.source.start.line\n          mapping.original.column = node.source.start.column - 1\n          this.map.addMapping(mapping)\n        } else {\n          mapping.source = noSource\n          mapping.original.line = 1\n          mapping.original.column = 0\n          this.map.addMapping(mapping)\n        }\n      }\n\n      lines = str.match(/\\n/g)\n      if (lines) {\n        line += lines.length\n        last = str.lastIndexOf('\\n')\n        column = str.length - last\n      } else {\n        column += str.length\n      }\n\n      if (node && type !== 'start') {\n        let p = node.parent || { raws: {} }\n        let childless =\n          node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n        if (!childless || node !== p.last || p.raws.semicolon) {\n          if (node.source && node.source.end) {\n            mapping.source = this.sourcePath(node)\n            mapping.original.line = node.source.end.line\n            mapping.original.column = node.source.end.column - 1\n            mapping.generated.line = line\n            mapping.generated.column = column - 2\n            this.map.addMapping(mapping)\n          } else {\n            mapping.source = noSource\n            mapping.original.line = 1\n            mapping.original.column = 0\n            mapping.generated.line = line\n            mapping.generated.column = column - 1\n            this.map.addMapping(mapping)\n          }\n        }\n      }\n    })\n  }\n\n  isAnnotation() {\n    if (this.isInline()) {\n      return true\n    }\n    if (typeof this.mapOpts.annotation !== 'undefined') {\n      return this.mapOpts.annotation\n    }\n    if (this.previous().length) {\n      return this.previous().some(i => i.annotation)\n    }\n    return true\n  }\n\n  isInline() {\n    if (typeof this.mapOpts.inline !== 'undefined') {\n      return this.mapOpts.inline\n    }\n\n    let annotation = this.mapOpts.annotation\n    if (typeof annotation !== 'undefined' && annotation !== true) {\n      return false\n    }\n\n    if (this.previous().length) {\n      return this.previous().some(i => i.inline)\n    }\n    return true\n  }\n\n  isMap() {\n    if (typeof this.opts.map !== 'undefined') {\n      return !!this.opts.map\n    }\n    return this.previous().length > 0\n  }\n\n  isSourcesContent() {\n    if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n      return this.mapOpts.sourcesContent\n    }\n    if (this.previous().length) {\n      return this.previous().some(i => i.withContent())\n    }\n    return true\n  }\n\n  outputFile() {\n    if (this.opts.to) {\n      return this.path(this.opts.to)\n    } else if (this.opts.from) {\n      return this.path(this.opts.from)\n    } else {\n      return 'to.css'\n    }\n  }\n\n  path(file) {\n    if (this.mapOpts.absolute) return file\n    if (file.charCodeAt(0) === 60 /* `<` */) return file\n    if (/^\\w+:\\/\\//.test(file)) return file\n    let cached = this.memoizedPaths.get(file)\n    if (cached) return cached\n\n    let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n    if (typeof this.mapOpts.annotation === 'string') {\n      from = dirname(resolve(from, this.mapOpts.annotation))\n    }\n\n    let path = relative(from, file)\n    this.memoizedPaths.set(file, path)\n\n    return path\n  }\n\n  previous() {\n    if (!this.previousMaps) {\n      this.previousMaps = []\n      if (this.root) {\n        this.root.walk(node => {\n          if (node.source && node.source.input.map) {\n            let map = node.source.input.map\n            if (!this.previousMaps.includes(map)) {\n              this.previousMaps.push(map)\n            }\n          }\n        })\n      } else {\n        let input = new Input(this.originalCSS, this.opts)\n        if (input.map) this.previousMaps.push(input.map)\n      }\n    }\n\n    return this.previousMaps\n  }\n\n  setSourcesContent() {\n    let already = {}\n    if (this.root) {\n      this.root.walk(node => {\n        if (node.source) {\n          let from = node.source.input.from\n          if (from && !already[from]) {\n            already[from] = true\n            let fromUrl = this.usesFileUrls\n              ? this.toFileUrl(from)\n              : this.toUrl(this.path(from))\n            this.map.setSourceContent(fromUrl, node.source.input.css)\n          }\n        }\n      })\n    } else if (this.css) {\n      let from = this.opts.from\n        ? this.toUrl(this.path(this.opts.from))\n        : '<no source>'\n      this.map.setSourceContent(from, this.css)\n    }\n  }\n\n  sourcePath(node) {\n    if (this.mapOpts.from) {\n      return this.toUrl(this.mapOpts.from)\n    } else if (this.usesFileUrls) {\n      return this.toFileUrl(node.source.input.from)\n    } else {\n      return this.toUrl(this.path(node.source.input.from))\n    }\n  }\n\n  toBase64(str) {\n    if (Buffer) {\n      return Buffer.from(str).toString('base64')\n    } else {\n      return window.btoa(unescape(encodeURIComponent(str)))\n    }\n  }\n\n  toFileUrl(path) {\n    let cached = this.memoizedFileURLs.get(path)\n    if (cached) return cached\n\n    if (pathToFileURL) {\n      let fileURL = pathToFileURL(path).toString()\n      this.memoizedFileURLs.set(path, fileURL)\n\n      return fileURL\n    } else {\n      throw new Error(\n        '`map.absolute` option is not available in this PostCSS build'\n      )\n    }\n  }\n\n  toUrl(path) {\n    let cached = this.memoizedURLs.get(path)\n    if (cached) return cached\n\n    if (sep === '\\\\') {\n      path = path.replace(/\\\\/g, '/')\n    }\n\n    let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n    this.memoizedURLs.set(path, url)\n\n    return url\n  }\n}\n\nmodule.exports = MapGenerator\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/map-generator.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/no-work-result.js":
/*!****************************************************!*\
  !*** ./node_modules/postcss/lib/no-work-result.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet MapGenerator = __webpack_require__(/*! ./map-generator */ \"./node_modules/postcss/lib/map-generator.js\")\nlet parse = __webpack_require__(/*! ./parse */ \"./node_modules/postcss/lib/parse.js\")\nconst Result = __webpack_require__(/*! ./result */ \"./node_modules/postcss/lib/result.js\")\nlet stringify = __webpack_require__(/*! ./stringify */ \"./node_modules/postcss/lib/stringify.js\")\nlet warnOnce = __webpack_require__(/*! ./warn-once */ \"./node_modules/postcss/lib/warn-once.js\")\n\nclass NoWorkResult {\n  get content() {\n    return this.result.css\n  }\n\n  get css() {\n    return this.result.css\n  }\n\n  get map() {\n    return this.result.map\n  }\n\n  get messages() {\n    return []\n  }\n\n  get opts() {\n    return this.result.opts\n  }\n\n  get processor() {\n    return this.result.processor\n  }\n\n  get root() {\n    if (this._root) {\n      return this._root\n    }\n\n    let root\n    let parser = parse\n\n    try {\n      root = parser(this._css, this._opts)\n    } catch (error) {\n      this.error = error\n    }\n\n    if (this.error) {\n      throw this.error\n    } else {\n      this._root = root\n      return root\n    }\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'NoWorkResult'\n  }\n\n  constructor(processor, css, opts) {\n    css = css.toString()\n    this.stringified = false\n\n    this._processor = processor\n    this._css = css\n    this._opts = opts\n    this._map = undefined\n    let root\n\n    let str = stringify\n    this.result = new Result(this._processor, root, this._opts)\n    this.result.css = css\n\n    let self = this\n    Object.defineProperty(this.result, 'root', {\n      get() {\n        return self.root\n      }\n    })\n\n    let map = new MapGenerator(str, root, this._opts, css)\n    if (map.isMap()) {\n      let [generatedCSS, generatedMap] = map.generate()\n      if (generatedCSS) {\n        this.result.css = generatedCSS\n      }\n      if (generatedMap) {\n        this.result.map = generatedMap\n      }\n    } else {\n      map.clearAnnotation()\n      this.result.css = map.css\n    }\n  }\n\n  async() {\n    if (this.error) return Promise.reject(this.error)\n    return Promise.resolve(this.result)\n  }\n\n  catch(onRejected) {\n    return this.async().catch(onRejected)\n  }\n\n  finally(onFinally) {\n    return this.async().then(onFinally, onFinally)\n  }\n\n  sync() {\n    if (this.error) throw this.error\n    return this.result\n  }\n\n  then(onFulfilled, onRejected) {\n    if (true) {\n      if (!('from' in this._opts)) {\n        warnOnce(\n          'Without `from` option PostCSS could generate wrong source map ' +\n            'and will not find Browserslist config. Set it to CSS file path ' +\n            'or to `undefined` to prevent this warning.'\n        )\n      }\n    }\n\n    return this.async().then(onFulfilled, onRejected)\n  }\n\n  toString() {\n    return this._css\n  }\n\n  warnings() {\n    return []\n  }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/no-work-result.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/node.js":
/*!******************************************!*\
  !*** ./node_modules/postcss/lib/node.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet CssSyntaxError = __webpack_require__(/*! ./css-syntax-error */ \"./node_modules/postcss/lib/css-syntax-error.js\")\nlet Stringifier = __webpack_require__(/*! ./stringifier */ \"./node_modules/postcss/lib/stringifier.js\")\nlet stringify = __webpack_require__(/*! ./stringify */ \"./node_modules/postcss/lib/stringify.js\")\nlet { isClean, my } = __webpack_require__(/*! ./symbols */ \"./node_modules/postcss/lib/symbols.js\")\n\nfunction cloneNode(obj, parent) {\n  let cloned = new obj.constructor()\n\n  for (let i in obj) {\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n      /* c8 ignore next 2 */\n      continue\n    }\n    if (i === 'proxyCache') continue\n    let value = obj[i]\n    let type = typeof value\n\n    if (i === 'parent' && type === 'object') {\n      if (parent) cloned[i] = parent\n    } else if (i === 'source') {\n      cloned[i] = value\n    } else if (Array.isArray(value)) {\n      cloned[i] = value.map(j => cloneNode(j, cloned))\n    } else {\n      if (type === 'object' && value !== null) value = cloneNode(value)\n      cloned[i] = value\n    }\n  }\n\n  return cloned\n}\n\nfunction sourceOffset(inputCSS, position) {\n  // Not all custom syntaxes support `offset` in `source.start` and `source.end`\n  if (\n    position &&\n    typeof position.offset !== 'undefined'\n  ) {\n    return position.offset;\n  }\n\n  let column = 1\n  let line = 1\n  let offset = 0\n\n  for (let i = 0; i < inputCSS.length; i++) {\n    if (line === position.line && column === position.column) {\n      offset = i\n      break\n    }\n\n    if (inputCSS[i] === '\\n') {\n      column = 1\n      line += 1\n    } else {\n      column += 1\n    }\n  }\n\n  return offset\n}\n\nclass Node {\n  get proxyOf() {\n    return this\n  }\n\n  constructor(defaults = {}) {\n    this.raws = {}\n    this[isClean] = false\n    this[my] = true\n\n    for (let name in defaults) {\n      if (name === 'nodes') {\n        this.nodes = []\n        for (let node of defaults[name]) {\n          if (typeof node.clone === 'function') {\n            this.append(node.clone())\n          } else {\n            this.append(node)\n          }\n        }\n      } else {\n        this[name] = defaults[name]\n      }\n    }\n  }\n\n  addToError(error) {\n    error.postcssNode = this\n    if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n      let s = this.source\n      error.stack = error.stack.replace(\n        /\\n\\s{4}at /,\n        `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n      )\n    }\n    return error\n  }\n\n  after(add) {\n    this.parent.insertAfter(this, add)\n    return this\n  }\n\n  assign(overrides = {}) {\n    for (let name in overrides) {\n      this[name] = overrides[name]\n    }\n    return this\n  }\n\n  before(add) {\n    this.parent.insertBefore(this, add)\n    return this\n  }\n\n  cleanRaws(keepBetween) {\n    delete this.raws.before\n    delete this.raws.after\n    if (!keepBetween) delete this.raws.between\n  }\n\n  clone(overrides = {}) {\n    let cloned = cloneNode(this)\n    for (let name in overrides) {\n      cloned[name] = overrides[name]\n    }\n    return cloned\n  }\n\n  cloneAfter(overrides = {}) {\n    let cloned = this.clone(overrides)\n    this.parent.insertAfter(this, cloned)\n    return cloned\n  }\n\n  cloneBefore(overrides = {}) {\n    let cloned = this.clone(overrides)\n    this.parent.insertBefore(this, cloned)\n    return cloned\n  }\n\n  error(message, opts = {}) {\n    if (this.source) {\n      let { end, start } = this.rangeBy(opts)\n      return this.source.input.error(\n        message,\n        { column: start.column, line: start.line },\n        { column: end.column, line: end.line },\n        opts\n      )\n    }\n    return new CssSyntaxError(message)\n  }\n\n  getProxyProcessor() {\n    return {\n      get(node, prop) {\n        if (prop === 'proxyOf') {\n          return node\n        } else if (prop === 'root') {\n          return () => node.root().toProxy()\n        } else {\n          return node[prop]\n        }\n      },\n\n      set(node, prop, value) {\n        if (node[prop] === value) return true\n        node[prop] = value\n        if (\n          prop === 'prop' ||\n          prop === 'value' ||\n          prop === 'name' ||\n          prop === 'params' ||\n          prop === 'important' ||\n          /* c8 ignore next */\n          prop === 'text'\n        ) {\n          node.markDirty()\n        }\n        return true\n      }\n    }\n  }\n\n  /* c8 ignore next 3 */\n  markClean() {\n    this[isClean] = true\n  }\n\n  markDirty() {\n    if (this[isClean]) {\n      this[isClean] = false\n      let next = this\n      while ((next = next.parent)) {\n        next[isClean] = false\n      }\n    }\n  }\n\n  next() {\n    if (!this.parent) return undefined\n    let index = this.parent.index(this)\n    return this.parent.nodes[index + 1]\n  }\n\n  positionBy(opts) {\n    let pos = this.source.start\n    if (opts.index) {\n      pos = this.positionInside(opts.index)\n    } else if (opts.word) {\n      let inputString = ('document' in this.source.input)\n        ? this.source.input.document\n        : this.source.input.css\n      let stringRepresentation = inputString.slice(\n        sourceOffset(inputString, this.source.start),\n        sourceOffset(inputString, this.source.end)\n      )\n      let index = stringRepresentation.indexOf(opts.word)\n      if (index !== -1) pos = this.positionInside(index)\n    }\n    return pos\n  }\n\n  positionInside(index) {\n    let column = this.source.start.column\n    let line = this.source.start.line\n    let inputString = ('document' in this.source.input)\n      ? this.source.input.document\n      : this.source.input.css\n    let offset = sourceOffset(inputString, this.source.start)\n    let end = offset + index\n\n    for (let i = offset; i < end; i++) {\n      if (inputString[i] === '\\n') {\n        column = 1\n        line += 1\n      } else {\n        column += 1\n      }\n    }\n\n    return { column, line }\n  }\n\n  prev() {\n    if (!this.parent) return undefined\n    let index = this.parent.index(this)\n    return this.parent.nodes[index - 1]\n  }\n\n  rangeBy(opts) {\n    let start = {\n      column: this.source.start.column,\n      line: this.source.start.line\n    }\n    let end = this.source.end\n      ? {\n          column: this.source.end.column + 1,\n          line: this.source.end.line\n        }\n      : {\n          column: start.column + 1,\n          line: start.line\n        }\n\n    if (opts.word) {\n      let inputString = ('document' in this.source.input)\n        ? this.source.input.document\n        : this.source.input.css\n      let stringRepresentation = inputString.slice(\n        sourceOffset(inputString, this.source.start),\n        sourceOffset(inputString, this.source.end)\n      )\n      let index = stringRepresentation.indexOf(opts.word)\n      if (index !== -1) {\n        start = this.positionInside(index)\n        end = this.positionInside(\n          index + opts.word.length,\n        )\n      }\n    } else {\n      if (opts.start) {\n        start = {\n          column: opts.start.column,\n          line: opts.start.line\n        }\n      } else if (opts.index) {\n        start = this.positionInside(opts.index)\n      }\n\n      if (opts.end) {\n        end = {\n          column: opts.end.column,\n          line: opts.end.line\n        }\n      } else if (typeof opts.endIndex === 'number') {\n        end = this.positionInside(opts.endIndex)\n      } else if (opts.index) {\n        end = this.positionInside(opts.index + 1)\n      }\n    }\n\n    if (\n      end.line < start.line ||\n      (end.line === start.line && end.column <= start.column)\n    ) {\n      end = { column: start.column + 1, line: start.line }\n    }\n\n    return { end, start }\n  }\n\n  raw(prop, defaultType) {\n    let str = new Stringifier()\n    return str.raw(this, prop, defaultType)\n  }\n\n  remove() {\n    if (this.parent) {\n      this.parent.removeChild(this)\n    }\n    this.parent = undefined\n    return this\n  }\n\n  replaceWith(...nodes) {\n    if (this.parent) {\n      let bookmark = this\n      let foundSelf = false\n      for (let node of nodes) {\n        if (node === this) {\n          foundSelf = true\n        } else if (foundSelf) {\n          this.parent.insertAfter(bookmark, node)\n          bookmark = node\n        } else {\n          this.parent.insertBefore(bookmark, node)\n        }\n      }\n\n      if (!foundSelf) {\n        this.remove()\n      }\n    }\n\n    return this\n  }\n\n  root() {\n    let result = this\n    while (result.parent && result.parent.type !== 'document') {\n      result = result.parent\n    }\n    return result\n  }\n\n  toJSON(_, inputs) {\n    let fixed = {}\n    let emitInputs = inputs == null\n    inputs = inputs || new Map()\n    let inputsNextIndex = 0\n\n    for (let name in this) {\n      if (!Object.prototype.hasOwnProperty.call(this, name)) {\n        /* c8 ignore next 2 */\n        continue\n      }\n      if (name === 'parent' || name === 'proxyCache') continue\n      let value = this[name]\n\n      if (Array.isArray(value)) {\n        fixed[name] = value.map(i => {\n          if (typeof i === 'object' && i.toJSON) {\n            return i.toJSON(null, inputs)\n          } else {\n            return i\n          }\n        })\n      } else if (typeof value === 'object' && value.toJSON) {\n        fixed[name] = value.toJSON(null, inputs)\n      } else if (name === 'source') {\n        let inputId = inputs.get(value.input)\n        if (inputId == null) {\n          inputId = inputsNextIndex\n          inputs.set(value.input, inputsNextIndex)\n          inputsNextIndex++\n        }\n        fixed[name] = {\n          end: value.end,\n          inputId,\n          start: value.start\n        }\n      } else {\n        fixed[name] = value\n      }\n    }\n\n    if (emitInputs) {\n      fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n    }\n\n    return fixed\n  }\n\n  toProxy() {\n    if (!this.proxyCache) {\n      this.proxyCache = new Proxy(this, this.getProxyProcessor())\n    }\n    return this.proxyCache\n  }\n\n  toString(stringifier = stringify) {\n    if (stringifier.stringify) stringifier = stringifier.stringify\n    let result = ''\n    stringifier(this, i => {\n      result += i\n    })\n    return result\n  }\n\n  warn(result, text, opts) {\n    let data = { node: this }\n    for (let i in opts) data[i] = opts[i]\n    return result.warn(text, data)\n  }\n}\n\nmodule.exports = Node\nNode.default = Node\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/node.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/parse.js":
/*!*******************************************!*\
  !*** ./node_modules/postcss/lib/parse.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\nlet Input = __webpack_require__(/*! ./input */ \"./node_modules/postcss/lib/input.js\")\nlet Parser = __webpack_require__(/*! ./parser */ \"./node_modules/postcss/lib/parser.js\")\n\nfunction parse(css, opts) {\n  let input = new Input(css, opts)\n  let parser = new Parser(input)\n  try {\n    parser.parse()\n  } catch (e) {\n    if (true) {\n      if (e.name === 'CssSyntaxError' && opts && opts.from) {\n        if (/\\.scss$/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse SCSS with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-scss parser'\n        } else if (/\\.sass/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse Sass with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-sass parser'\n        } else if (/\\.less$/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse Less with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-less parser'\n        }\n      }\n    }\n    throw e\n  }\n\n  return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/parse.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/parser.js":
/*!********************************************!*\
  !*** ./node_modules/postcss/lib/parser.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet AtRule = __webpack_require__(/*! ./at-rule */ \"./node_modules/postcss/lib/at-rule.js\")\nlet Comment = __webpack_require__(/*! ./comment */ \"./node_modules/postcss/lib/comment.js\")\nlet Declaration = __webpack_require__(/*! ./declaration */ \"./node_modules/postcss/lib/declaration.js\")\nlet Root = __webpack_require__(/*! ./root */ \"./node_modules/postcss/lib/root.js\")\nlet Rule = __webpack_require__(/*! ./rule */ \"./node_modules/postcss/lib/rule.js\")\nlet tokenizer = __webpack_require__(/*! ./tokenize */ \"./node_modules/postcss/lib/tokenize.js\")\n\nconst SAFE_COMMENT_NEIGHBOR = {\n  empty: true,\n  space: true\n}\n\nfunction findLastWithPosition(tokens) {\n  for (let i = tokens.length - 1; i >= 0; i--) {\n    let token = tokens[i]\n    let pos = token[3] || token[2]\n    if (pos) return pos\n  }\n}\n\nclass Parser {\n  constructor(input) {\n    this.input = input\n\n    this.root = new Root()\n    this.current = this.root\n    this.spaces = ''\n    this.semicolon = false\n\n    this.createTokenizer()\n    this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n  }\n\n  atrule(token) {\n    let node = new AtRule()\n    node.name = token[1].slice(1)\n    if (node.name === '') {\n      this.unnamedAtrule(node, token)\n    }\n    this.init(node, token[2])\n\n    let type\n    let prev\n    let shift\n    let last = false\n    let open = false\n    let params = []\n    let brackets = []\n\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken()\n      type = token[0]\n\n      if (type === '(' || type === '[') {\n        brackets.push(type === '(' ? ')' : ']')\n      } else if (type === '{' && brackets.length > 0) {\n        brackets.push('}')\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop()\n      }\n\n      if (brackets.length === 0) {\n        if (type === ';') {\n          node.source.end = this.getPosition(token[2])\n          node.source.end.offset++\n          this.semicolon = true\n          break\n        } else if (type === '{') {\n          open = true\n          break\n        } else if (type === '}') {\n          if (params.length > 0) {\n            shift = params.length - 1\n            prev = params[shift]\n            while (prev && prev[0] === 'space') {\n              prev = params[--shift]\n            }\n            if (prev) {\n              node.source.end = this.getPosition(prev[3] || prev[2])\n              node.source.end.offset++\n            }\n          }\n          this.end(token)\n          break\n        } else {\n          params.push(token)\n        }\n      } else {\n        params.push(token)\n      }\n\n      if (this.tokenizer.endOfFile()) {\n        last = true\n        break\n      }\n    }\n\n    node.raws.between = this.spacesAndCommentsFromEnd(params)\n    if (params.length) {\n      node.raws.afterName = this.spacesAndCommentsFromStart(params)\n      this.raw(node, 'params', params)\n      if (last) {\n        token = params[params.length - 1]\n        node.source.end = this.getPosition(token[3] || token[2])\n        node.source.end.offset++\n        this.spaces = node.raws.between\n        node.raws.between = ''\n      }\n    } else {\n      node.raws.afterName = ''\n      node.params = ''\n    }\n\n    if (open) {\n      node.nodes = []\n      this.current = node\n    }\n  }\n\n  checkMissedSemicolon(tokens) {\n    let colon = this.colon(tokens)\n    if (colon === false) return\n\n    let founded = 0\n    let token\n    for (let j = colon - 1; j >= 0; j--) {\n      token = tokens[j]\n      if (token[0] !== 'space') {\n        founded += 1\n        if (founded === 2) break\n      }\n    }\n    // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n    // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n    // And because we need it after that one we do +1 to get the next one.\n    throw this.input.error(\n      'Missed semicolon',\n      token[0] === 'word' ? token[3] + 1 : token[2]\n    )\n  }\n\n  colon(tokens) {\n    let brackets = 0\n    let prev, token, type\n    for (let [i, element] of tokens.entries()) {\n      token = element\n      type = token[0]\n\n      if (type === '(') {\n        brackets += 1\n      }\n      if (type === ')') {\n        brackets -= 1\n      }\n      if (brackets === 0 && type === ':') {\n        if (!prev) {\n          this.doubleColon(token)\n        } else if (prev[0] === 'word' && prev[1] === 'progid') {\n          continue\n        } else {\n          return i\n        }\n      }\n\n      prev = token\n    }\n    return false\n  }\n\n  comment(token) {\n    let node = new Comment()\n    this.init(node, token[2])\n    node.source.end = this.getPosition(token[3] || token[2])\n    node.source.end.offset++\n\n    let text = token[1].slice(2, -2)\n    if (/^\\s*$/.test(text)) {\n      node.text = ''\n      node.raws.left = text\n      node.raws.right = ''\n    } else {\n      let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n      node.text = match[2]\n      node.raws.left = match[1]\n      node.raws.right = match[3]\n    }\n  }\n\n  createTokenizer() {\n    this.tokenizer = tokenizer(this.input)\n  }\n\n  decl(tokens, customProperty) {\n    let node = new Declaration()\n    this.init(node, tokens[0][2])\n\n    let last = tokens[tokens.length - 1]\n    if (last[0] === ';') {\n      this.semicolon = true\n      tokens.pop()\n    }\n\n    node.source.end = this.getPosition(\n      last[3] || last[2] || findLastWithPosition(tokens)\n    )\n    node.source.end.offset++\n\n    while (tokens[0][0] !== 'word') {\n      if (tokens.length === 1) this.unknownWord(tokens)\n      node.raws.before += tokens.shift()[1]\n    }\n    node.source.start = this.getPosition(tokens[0][2])\n\n    node.prop = ''\n    while (tokens.length) {\n      let type = tokens[0][0]\n      if (type === ':' || type === 'space' || type === 'comment') {\n        break\n      }\n      node.prop += tokens.shift()[1]\n    }\n\n    node.raws.between = ''\n\n    let token\n    while (tokens.length) {\n      token = tokens.shift()\n\n      if (token[0] === ':') {\n        node.raws.between += token[1]\n        break\n      } else {\n        if (token[0] === 'word' && /\\w/.test(token[1])) {\n          this.unknownWord([token])\n        }\n        node.raws.between += token[1]\n      }\n    }\n\n    if (node.prop[0] === '_' || node.prop[0] === '*') {\n      node.raws.before += node.prop[0]\n      node.prop = node.prop.slice(1)\n    }\n\n    let firstSpaces = []\n    let next\n    while (tokens.length) {\n      next = tokens[0][0]\n      if (next !== 'space' && next !== 'comment') break\n      firstSpaces.push(tokens.shift())\n    }\n\n    this.precheckMissedSemicolon(tokens)\n\n    for (let i = tokens.length - 1; i >= 0; i--) {\n      token = tokens[i]\n      if (token[1].toLowerCase() === '!important') {\n        node.important = true\n        let string = this.stringFrom(tokens, i)\n        string = this.spacesFromEnd(tokens) + string\n        if (string !== ' !important') node.raws.important = string\n        break\n      } else if (token[1].toLowerCase() === 'important') {\n        let cache = tokens.slice(0)\n        let str = ''\n        for (let j = i; j > 0; j--) {\n          let type = cache[j][0]\n          if (str.trim().startsWith('!') && type !== 'space') {\n            break\n          }\n          str = cache.pop()[1] + str\n        }\n        if (str.trim().startsWith('!')) {\n          node.important = true\n          node.raws.important = str\n          tokens = cache\n        }\n      }\n\n      if (token[0] !== 'space' && token[0] !== 'comment') {\n        break\n      }\n    }\n\n    let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n    if (hasWord) {\n      node.raws.between += firstSpaces.map(i => i[1]).join('')\n      firstSpaces = []\n    }\n    this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n    if (node.value.includes(':') && !customProperty) {\n      this.checkMissedSemicolon(tokens)\n    }\n  }\n\n  doubleColon(token) {\n    throw this.input.error(\n      'Double colon',\n      { offset: token[2] },\n      { offset: token[2] + token[1].length }\n    )\n  }\n\n  emptyRule(token) {\n    let node = new Rule()\n    this.init(node, token[2])\n    node.selector = ''\n    node.raws.between = ''\n    this.current = node\n  }\n\n  end(token) {\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon\n    }\n    this.semicolon = false\n\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces\n    this.spaces = ''\n\n    if (this.current.parent) {\n      this.current.source.end = this.getPosition(token[2])\n      this.current.source.end.offset++\n      this.current = this.current.parent\n    } else {\n      this.unexpectedClose(token)\n    }\n  }\n\n  endFile() {\n    if (this.current.parent) this.unclosedBlock()\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon\n    }\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces\n    this.root.source.end = this.getPosition(this.tokenizer.position())\n  }\n\n  freeSemicolon(token) {\n    this.spaces += token[1]\n    if (this.current.nodes) {\n      let prev = this.current.nodes[this.current.nodes.length - 1]\n      if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n        prev.raws.ownSemicolon = this.spaces\n        this.spaces = ''\n        prev.source.end = this.getPosition(token[2])\n        prev.source.end.offset += prev.raws.ownSemicolon.length\n      }\n    }\n  }\n\n  // Helpers\n\n  getPosition(offset) {\n    let pos = this.input.fromOffset(offset)\n    return {\n      column: pos.col,\n      line: pos.line,\n      offset\n    }\n  }\n\n  init(node, offset) {\n    this.current.push(node)\n    node.source = {\n      input: this.input,\n      start: this.getPosition(offset)\n    }\n    node.raws.before = this.spaces\n    this.spaces = ''\n    if (node.type !== 'comment') this.semicolon = false\n  }\n\n  other(start) {\n    let end = false\n    let type = null\n    let colon = false\n    let bracket = null\n    let brackets = []\n    let customProperty = start[1].startsWith('--')\n\n    let tokens = []\n    let token = start\n    while (token) {\n      type = token[0]\n      tokens.push(token)\n\n      if (type === '(' || type === '[') {\n        if (!bracket) bracket = token\n        brackets.push(type === '(' ? ')' : ']')\n      } else if (customProperty && colon && type === '{') {\n        if (!bracket) bracket = token\n        brackets.push('}')\n      } else if (brackets.length === 0) {\n        if (type === ';') {\n          if (colon) {\n            this.decl(tokens, customProperty)\n            return\n          } else {\n            break\n          }\n        } else if (type === '{') {\n          this.rule(tokens)\n          return\n        } else if (type === '}') {\n          this.tokenizer.back(tokens.pop())\n          end = true\n          break\n        } else if (type === ':') {\n          colon = true\n        }\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop()\n        if (brackets.length === 0) bracket = null\n      }\n\n      token = this.tokenizer.nextToken()\n    }\n\n    if (this.tokenizer.endOfFile()) end = true\n    if (brackets.length > 0) this.unclosedBracket(bracket)\n\n    if (end && colon) {\n      if (!customProperty) {\n        while (tokens.length) {\n          token = tokens[tokens.length - 1][0]\n          if (token !== 'space' && token !== 'comment') break\n          this.tokenizer.back(tokens.pop())\n        }\n      }\n      this.decl(tokens, customProperty)\n    } else {\n      this.unknownWord(tokens)\n    }\n  }\n\n  parse() {\n    let token\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken()\n\n      switch (token[0]) {\n        case 'space':\n          this.spaces += token[1]\n          break\n\n        case ';':\n          this.freeSemicolon(token)\n          break\n\n        case '}':\n          this.end(token)\n          break\n\n        case 'comment':\n          this.comment(token)\n          break\n\n        case 'at-word':\n          this.atrule(token)\n          break\n\n        case '{':\n          this.emptyRule(token)\n          break\n\n        default:\n          this.other(token)\n          break\n      }\n    }\n    this.endFile()\n  }\n\n  precheckMissedSemicolon(/* tokens */) {\n    // Hook for Safe Parser\n  }\n\n  raw(node, prop, tokens, customProperty) {\n    let token, type\n    let length = tokens.length\n    let value = ''\n    let clean = true\n    let next, prev\n\n    for (let i = 0; i < length; i += 1) {\n      token = tokens[i]\n      type = token[0]\n      if (type === 'space' && i === length - 1 && !customProperty) {\n        clean = false\n      } else if (type === 'comment') {\n        prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n        next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n        if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n          if (value.slice(-1) === ',') {\n            clean = false\n          } else {\n            value += token[1]\n          }\n        } else {\n          clean = false\n        }\n      } else {\n        value += token[1]\n      }\n    }\n    if (!clean) {\n      let raw = tokens.reduce((all, i) => all + i[1], '')\n      node.raws[prop] = { raw, value }\n    }\n    node[prop] = value\n  }\n\n  rule(tokens) {\n    tokens.pop()\n\n    let node = new Rule()\n    this.init(node, tokens[0][2])\n\n    node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n    this.raw(node, 'selector', tokens)\n    this.current = node\n  }\n\n  spacesAndCommentsFromEnd(tokens) {\n    let lastTokenType\n    let spaces = ''\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0]\n      if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n      spaces = tokens.pop()[1] + spaces\n    }\n    return spaces\n  }\n\n  // Errors\n\n  spacesAndCommentsFromStart(tokens) {\n    let next\n    let spaces = ''\n    while (tokens.length) {\n      next = tokens[0][0]\n      if (next !== 'space' && next !== 'comment') break\n      spaces += tokens.shift()[1]\n    }\n    return spaces\n  }\n\n  spacesFromEnd(tokens) {\n    let lastTokenType\n    let spaces = ''\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0]\n      if (lastTokenType !== 'space') break\n      spaces = tokens.pop()[1] + spaces\n    }\n    return spaces\n  }\n\n  stringFrom(tokens, from) {\n    let result = ''\n    for (let i = from; i < tokens.length; i++) {\n      result += tokens[i][1]\n    }\n    tokens.splice(from, tokens.length - from)\n    return result\n  }\n\n  unclosedBlock() {\n    let pos = this.current.source.start\n    throw this.input.error('Unclosed block', pos.line, pos.column)\n  }\n\n  unclosedBracket(bracket) {\n    throw this.input.error(\n      'Unclosed bracket',\n      { offset: bracket[2] },\n      { offset: bracket[2] + 1 }\n    )\n  }\n\n  unexpectedClose(token) {\n    throw this.input.error(\n      'Unexpected }',\n      { offset: token[2] },\n      { offset: token[2] + 1 }\n    )\n  }\n\n  unknownWord(tokens) {\n    throw this.input.error(\n      'Unknown word ' + tokens[0][1],\n      { offset: tokens[0][2] },\n      { offset: tokens[0][2] + tokens[0][1].length }\n    )\n  }\n\n  unnamedAtrule(node, token) {\n    throw this.input.error(\n      'At-rule without name',\n      { offset: token[2] },\n      { offset: token[2] + token[1].length }\n    )\n  }\n}\n\nmodule.exports = Parser\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/parser.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/postcss.js":
/*!*********************************************!*\
  !*** ./node_modules/postcss/lib/postcss.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nlet AtRule = __webpack_require__(/*! ./at-rule */ \"./node_modules/postcss/lib/at-rule.js\")\nlet Comment = __webpack_require__(/*! ./comment */ \"./node_modules/postcss/lib/comment.js\")\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\nlet CssSyntaxError = __webpack_require__(/*! ./css-syntax-error */ \"./node_modules/postcss/lib/css-syntax-error.js\")\nlet Declaration = __webpack_require__(/*! ./declaration */ \"./node_modules/postcss/lib/declaration.js\")\nlet Document = __webpack_require__(/*! ./document */ \"./node_modules/postcss/lib/document.js\")\nlet fromJSON = __webpack_require__(/*! ./fromJSON */ \"./node_modules/postcss/lib/fromJSON.js\")\nlet Input = __webpack_require__(/*! ./input */ \"./node_modules/postcss/lib/input.js\")\nlet LazyResult = __webpack_require__(/*! ./lazy-result */ \"./node_modules/postcss/lib/lazy-result.js\")\nlet list = __webpack_require__(/*! ./list */ \"./node_modules/postcss/lib/list.js\")\nlet Node = __webpack_require__(/*! ./node */ \"./node_modules/postcss/lib/node.js\")\nlet parse = __webpack_require__(/*! ./parse */ \"./node_modules/postcss/lib/parse.js\")\nlet Processor = __webpack_require__(/*! ./processor */ \"./node_modules/postcss/lib/processor.js\")\nlet Result = __webpack_require__(/*! ./result.js */ \"./node_modules/postcss/lib/result.js\")\nlet Root = __webpack_require__(/*! ./root */ \"./node_modules/postcss/lib/root.js\")\nlet Rule = __webpack_require__(/*! ./rule */ \"./node_modules/postcss/lib/rule.js\")\nlet stringify = __webpack_require__(/*! ./stringify */ \"./node_modules/postcss/lib/stringify.js\")\nlet Warning = __webpack_require__(/*! ./warning */ \"./node_modules/postcss/lib/warning.js\")\n\nfunction postcss(...plugins) {\n  if (plugins.length === 1 && Array.isArray(plugins[0])) {\n    plugins = plugins[0]\n  }\n  return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n  let warningPrinted = false\n  function creator(...args) {\n    // eslint-disable-next-line no-console\n    if (console && console.warn && !warningPrinted) {\n      warningPrinted = true\n      // eslint-disable-next-line no-console\n      console.warn(\n        name +\n          ': postcss.plugin was deprecated. Migration guide:\\n' +\n          'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n      )\n      if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n        /* c8 ignore next 7 */\n        // eslint-disable-next-line no-console\n        console.warn(\n          name +\n            ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n            'https://www.w3ctech.com/topic/2226'\n        )\n      }\n    }\n    let transformer = initializer(...args)\n    transformer.postcssPlugin = name\n    transformer.postcssVersion = new Processor().version\n    return transformer\n  }\n\n  let cache\n  Object.defineProperty(creator, 'postcss', {\n    get() {\n      if (!cache) cache = creator()\n      return cache\n    }\n  })\n\n  creator.process = function (css, processOpts, pluginOpts) {\n    return postcss([creator(pluginOpts)]).process(css, processOpts)\n  }\n\n  return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/postcss.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/previous-map.js":
/*!**************************************************!*\
  !*** ./node_modules/postcss/lib/previous-map.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\n\nlet { existsSync, readFileSync } = __webpack_require__(/*! fs */ 5)\nlet { dirname, join } = __webpack_require__(/*! path */ 2)\nlet { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(/*! source-map-js */ 3)\n\nfunction fromBase64(str) {\n  if (Buffer) {\n    return Buffer.from(str, 'base64').toString()\n  } else {\n    /* c8 ignore next 2 */\n    return window.atob(str)\n  }\n}\n\nclass PreviousMap {\n  constructor(css, opts) {\n    if (opts.map === false) return\n    this.loadAnnotation(css)\n    this.inline = this.startWith(this.annotation, 'data:')\n\n    let prev = opts.map ? opts.map.prev : undefined\n    let text = this.loadMap(opts.from, prev)\n    if (!this.mapFile && opts.from) {\n      this.mapFile = opts.from\n    }\n    if (this.mapFile) this.root = dirname(this.mapFile)\n    if (text) this.text = text\n  }\n\n  consumer() {\n    if (!this.consumerCache) {\n      this.consumerCache = new SourceMapConsumer(this.text)\n    }\n    return this.consumerCache\n  }\n\n  decodeInline(text) {\n    let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n    let baseUri = /^data:application\\/json;base64,/\n    let charsetUri = /^data:application\\/json;charset=utf-?8,/\n    let uri = /^data:application\\/json,/\n\n    let uriMatch = text.match(charsetUri) || text.match(uri)\n    if (uriMatch) {\n      return decodeURIComponent(text.substr(uriMatch[0].length))\n    }\n\n    let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)\n    if (baseUriMatch) {\n      return fromBase64(text.substr(baseUriMatch[0].length))\n    }\n\n    let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n    throw new Error('Unsupported source map encoding ' + encoding)\n  }\n\n  getAnnotationURL(sourceMapString) {\n    return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n  }\n\n  isMap(map) {\n    if (typeof map !== 'object') return false\n    return (\n      typeof map.mappings === 'string' ||\n      typeof map._mappings === 'string' ||\n      Array.isArray(map.sections)\n    )\n  }\n\n  loadAnnotation(css) {\n    let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g)\n    if (!comments) return\n\n    // sourceMappingURLs from comments, strings, etc.\n    let start = css.lastIndexOf(comments.pop())\n    let end = css.indexOf('*/', start)\n\n    if (start > -1 && end > -1) {\n      // Locate the last sourceMappingURL to avoid pickin\n      this.annotation = this.getAnnotationURL(css.substring(start, end))\n    }\n  }\n\n  loadFile(path) {\n    this.root = dirname(path)\n    if (existsSync(path)) {\n      this.mapFile = path\n      return readFileSync(path, 'utf-8').toString().trim()\n    }\n  }\n\n  loadMap(file, prev) {\n    if (prev === false) return false\n\n    if (prev) {\n      if (typeof prev === 'string') {\n        return prev\n      } else if (typeof prev === 'function') {\n        let prevPath = prev(file)\n        if (prevPath) {\n          let map = this.loadFile(prevPath)\n          if (!map) {\n            throw new Error(\n              'Unable to load previous source map: ' + prevPath.toString()\n            )\n          }\n          return map\n        }\n      } else if (prev instanceof SourceMapConsumer) {\n        return SourceMapGenerator.fromSourceMap(prev).toString()\n      } else if (prev instanceof SourceMapGenerator) {\n        return prev.toString()\n      } else if (this.isMap(prev)) {\n        return JSON.stringify(prev)\n      } else {\n        throw new Error(\n          'Unsupported previous source map format: ' + prev.toString()\n        )\n      }\n    } else if (this.inline) {\n      return this.decodeInline(this.annotation)\n    } else if (this.annotation) {\n      let map = this.annotation\n      if (file) map = join(dirname(file), map)\n      return this.loadFile(map)\n    }\n  }\n\n  startWith(string, start) {\n    if (!string) return false\n    return string.substr(0, start.length) === start\n  }\n\n  withContent() {\n    return !!(\n      this.consumer().sourcesContent &&\n      this.consumer().sourcesContent.length > 0\n    )\n  }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/previous-map.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/processor.js":
/*!***********************************************!*\
  !*** ./node_modules/postcss/lib/processor.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Document = __webpack_require__(/*! ./document */ \"./node_modules/postcss/lib/document.js\")\nlet LazyResult = __webpack_require__(/*! ./lazy-result */ \"./node_modules/postcss/lib/lazy-result.js\")\nlet NoWorkResult = __webpack_require__(/*! ./no-work-result */ \"./node_modules/postcss/lib/no-work-result.js\")\nlet Root = __webpack_require__(/*! ./root */ \"./node_modules/postcss/lib/root.js\")\n\nclass Processor {\n  constructor(plugins = []) {\n    this.version = '8.5.3'\n    this.plugins = this.normalize(plugins)\n  }\n\n  normalize(plugins) {\n    let normalized = []\n    for (let i of plugins) {\n      if (i.postcss === true) {\n        i = i()\n      } else if (i.postcss) {\n        i = i.postcss\n      }\n\n      if (typeof i === 'object' && Array.isArray(i.plugins)) {\n        normalized = normalized.concat(i.plugins)\n      } else if (typeof i === 'object' && i.postcssPlugin) {\n        normalized.push(i)\n      } else if (typeof i === 'function') {\n        normalized.push(i)\n      } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n        if (true) {\n          throw new Error(\n            'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n              'one of the syntax/parser/stringifier options as outlined ' +\n              'in your PostCSS runner documentation.'\n          )\n        }\n      } else {\n        throw new Error(i + ' is not a PostCSS plugin')\n      }\n    }\n    return normalized\n  }\n\n  process(css, opts = {}) {\n    if (\n      !this.plugins.length &&\n      !opts.parser &&\n      !opts.stringifier &&\n      !opts.syntax\n    ) {\n      return new NoWorkResult(this, css, opts)\n    } else {\n      return new LazyResult(this, css, opts)\n    }\n  }\n\n  use(plugin) {\n    this.plugins = this.plugins.concat(this.normalize([plugin]))\n    return this\n  }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/processor.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/result.js":
/*!********************************************!*\
  !*** ./node_modules/postcss/lib/result.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Warning = __webpack_require__(/*! ./warning */ \"./node_modules/postcss/lib/warning.js\")\n\nclass Result {\n  get content() {\n    return this.css\n  }\n\n  constructor(processor, root, opts) {\n    this.processor = processor\n    this.messages = []\n    this.root = root\n    this.opts = opts\n    this.css = undefined\n    this.map = undefined\n  }\n\n  toString() {\n    return this.css\n  }\n\n  warn(text, opts = {}) {\n    if (!opts.plugin) {\n      if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n        opts.plugin = this.lastPlugin.postcssPlugin\n      }\n    }\n\n    let warning = new Warning(text, opts)\n    this.messages.push(warning)\n\n    return warning\n  }\n\n  warnings() {\n    return this.messages.filter(i => i.type === 'warning')\n  }\n}\n\nmodule.exports = Result\nResult.default = Result\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/result.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/root.js":
/*!******************************************!*\
  !*** ./node_modules/postcss/lib/root.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'root'\n    if (!this.nodes) this.nodes = []\n  }\n\n  normalize(child, sample, type) {\n    let nodes = super.normalize(child)\n\n    if (sample) {\n      if (type === 'prepend') {\n        if (this.nodes.length > 1) {\n          sample.raws.before = this.nodes[1].raws.before\n        } else {\n          delete sample.raws.before\n        }\n      } else if (this.first !== sample) {\n        for (let node of nodes) {\n          node.raws.before = sample.raws.before\n        }\n      }\n    }\n\n    return nodes\n  }\n\n  removeChild(child, ignore) {\n    let index = this.index(child)\n\n    if (!ignore && index === 0 && this.nodes.length > 1) {\n      this.nodes[1].raws.before = this.nodes[index].raws.before\n    }\n\n    return super.removeChild(child)\n  }\n\n  toResult(opts = {}) {\n    let lazy = new LazyResult(new Processor(), this, opts)\n    return lazy.stringify()\n  }\n}\n\nRoot.registerLazyResult = dependant => {\n  LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n  Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/root.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/rule.js":
/*!******************************************!*\
  !*** ./node_modules/postcss/lib/rule.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Container = __webpack_require__(/*! ./container */ \"./node_modules/postcss/lib/container.js\")\nlet list = __webpack_require__(/*! ./list */ \"./node_modules/postcss/lib/list.js\")\n\nclass Rule extends Container {\n  get selectors() {\n    return list.comma(this.selector)\n  }\n\n  set selectors(values) {\n    let match = this.selector ? this.selector.match(/,\\s*/) : null\n    let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n    this.selector = values.join(sep)\n  }\n\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'rule'\n    if (!this.nodes) this.nodes = []\n  }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/rule.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/stringifier.js":
/*!*************************************************!*\
  !*** ./node_modules/postcss/lib/stringifier.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst DEFAULT_RAW = {\n  after: '\\n',\n  beforeClose: '\\n',\n  beforeComment: '\\n',\n  beforeDecl: '\\n',\n  beforeOpen: ' ',\n  beforeRule: '\\n',\n  colon: ': ',\n  commentLeft: ' ',\n  commentRight: ' ',\n  emptyBody: '',\n  indent: '    ',\n  semicolon: false\n}\n\nfunction capitalize(str) {\n  return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n  constructor(builder) {\n    this.builder = builder\n  }\n\n  atrule(node, semicolon) {\n    let name = '@' + node.name\n    let params = node.params ? this.rawValue(node, 'params') : ''\n\n    if (typeof node.raws.afterName !== 'undefined') {\n      name += node.raws.afterName\n    } else if (params) {\n      name += ' '\n    }\n\n    if (node.nodes) {\n      this.block(node, name + params)\n    } else {\n      let end = (node.raws.between || '') + (semicolon ? ';' : '')\n      this.builder(name + params + end, node)\n    }\n  }\n\n  beforeAfter(node, detect) {\n    let value\n    if (node.type === 'decl') {\n      value = this.raw(node, null, 'beforeDecl')\n    } else if (node.type === 'comment') {\n      value = this.raw(node, null, 'beforeComment')\n    } else if (detect === 'before') {\n      value = this.raw(node, null, 'beforeRule')\n    } else {\n      value = this.raw(node, null, 'beforeClose')\n    }\n\n    let buf = node.parent\n    let depth = 0\n    while (buf && buf.type !== 'root') {\n      depth += 1\n      buf = buf.parent\n    }\n\n    if (value.includes('\\n')) {\n      let indent = this.raw(node, null, 'indent')\n      if (indent.length) {\n        for (let step = 0; step < depth; step++) value += indent\n      }\n    }\n\n    return value\n  }\n\n  block(node, start) {\n    let between = this.raw(node, 'between', 'beforeOpen')\n    this.builder(start + between + '{', node, 'start')\n\n    let after\n    if (node.nodes && node.nodes.length) {\n      this.body(node)\n      after = this.raw(node, 'after')\n    } else {\n      after = this.raw(node, 'after', 'emptyBody')\n    }\n\n    if (after) this.builder(after)\n    this.builder('}', node, 'end')\n  }\n\n  body(node) {\n    let last = node.nodes.length - 1\n    while (last > 0) {\n      if (node.nodes[last].type !== 'comment') break\n      last -= 1\n    }\n\n    let semicolon = this.raw(node, 'semicolon')\n    for (let i = 0; i < node.nodes.length; i++) {\n      let child = node.nodes[i]\n      let before = this.raw(child, 'before')\n      if (before) this.builder(before)\n      this.stringify(child, last !== i || semicolon)\n    }\n  }\n\n  comment(node) {\n    let left = this.raw(node, 'left', 'commentLeft')\n    let right = this.raw(node, 'right', 'commentRight')\n    this.builder('/*' + left + node.text + right + '*/', node)\n  }\n\n  decl(node, semicolon) {\n    let between = this.raw(node, 'between', 'colon')\n    let string = node.prop + between + this.rawValue(node, 'value')\n\n    if (node.important) {\n      string += node.raws.important || ' !important'\n    }\n\n    if (semicolon) string += ';'\n    this.builder(string, node)\n  }\n\n  document(node) {\n    this.body(node)\n  }\n\n  raw(node, own, detect) {\n    let value\n    if (!detect) detect = own\n\n    // Already had\n    if (own) {\n      value = node.raws[own]\n      if (typeof value !== 'undefined') return value\n    }\n\n    let parent = node.parent\n\n    if (detect === 'before') {\n      // Hack for first rule in CSS\n      if (!parent || (parent.type === 'root' && parent.first === node)) {\n        return ''\n      }\n\n      // `root` nodes in `document` should use only their own raws\n      if (parent && parent.type === 'document') {\n        return ''\n      }\n    }\n\n    // Floating child without parent\n    if (!parent) return DEFAULT_RAW[detect]\n\n    // Detect style by other nodes\n    let root = node.root()\n    if (!root.rawCache) root.rawCache = {}\n    if (typeof root.rawCache[detect] !== 'undefined') {\n      return root.rawCache[detect]\n    }\n\n    if (detect === 'before' || detect === 'after') {\n      return this.beforeAfter(node, detect)\n    } else {\n      let method = 'raw' + capitalize(detect)\n      if (this[method]) {\n        value = this[method](root, node)\n      } else {\n        root.walk(i => {\n          value = i.raws[own]\n          if (typeof value !== 'undefined') return false\n        })\n      }\n    }\n\n    if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n    root.rawCache[detect] = value\n    return value\n  }\n\n  rawBeforeClose(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length > 0) {\n        if (typeof i.raws.after !== 'undefined') {\n          value = i.raws.after\n          if (value.includes('\\n')) {\n            value = value.replace(/[^\\n]+$/, '')\n          }\n          return false\n        }\n      }\n    })\n    if (value) value = value.replace(/\\S/g, '')\n    return value\n  }\n\n  rawBeforeComment(root, node) {\n    let value\n    root.walkComments(i => {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before\n        if (value.includes('\\n')) {\n          value = value.replace(/[^\\n]+$/, '')\n        }\n        return false\n      }\n    })\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeDecl')\n    } else if (value) {\n      value = value.replace(/\\S/g, '')\n    }\n    return value\n  }\n\n  rawBeforeDecl(root, node) {\n    let value\n    root.walkDecls(i => {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before\n        if (value.includes('\\n')) {\n          value = value.replace(/[^\\n]+$/, '')\n        }\n        return false\n      }\n    })\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeRule')\n    } else if (value) {\n      value = value.replace(/\\S/g, '')\n    }\n    return value\n  }\n\n  rawBeforeOpen(root) {\n    let value\n    root.walk(i => {\n      if (i.type !== 'decl') {\n        value = i.raws.between\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawBeforeRule(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && (i.parent !== root || root.first !== i)) {\n        if (typeof i.raws.before !== 'undefined') {\n          value = i.raws.before\n          if (value.includes('\\n')) {\n            value = value.replace(/[^\\n]+$/, '')\n          }\n          return false\n        }\n      }\n    })\n    if (value) value = value.replace(/\\S/g, '')\n    return value\n  }\n\n  rawColon(root) {\n    let value\n    root.walkDecls(i => {\n      if (typeof i.raws.between !== 'undefined') {\n        value = i.raws.between.replace(/[^\\s:]/g, '')\n        return false\n      }\n    })\n    return value\n  }\n\n  rawEmptyBody(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length === 0) {\n        value = i.raws.after\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawIndent(root) {\n    if (root.raws.indent) return root.raws.indent\n    let value\n    root.walk(i => {\n      let p = i.parent\n      if (p && p !== root && p.parent && p.parent === root) {\n        if (typeof i.raws.before !== 'undefined') {\n          let parts = i.raws.before.split('\\n')\n          value = parts[parts.length - 1]\n          value = value.replace(/\\S/g, '')\n          return false\n        }\n      }\n    })\n    return value\n  }\n\n  rawSemicolon(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n        value = i.raws.semicolon\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawValue(node, prop) {\n    let value = node[prop]\n    let raw = node.raws[prop]\n    if (raw && raw.value === value) {\n      return raw.raw\n    }\n\n    return value\n  }\n\n  root(node) {\n    this.body(node)\n    if (node.raws.after) this.builder(node.raws.after)\n  }\n\n  rule(node) {\n    this.block(node, this.rawValue(node, 'selector'))\n    if (node.raws.ownSemicolon) {\n      this.builder(node.raws.ownSemicolon, node, 'end')\n    }\n  }\n\n  stringify(node, semicolon) {\n    /* c8 ignore start */\n    if (!this[node.type]) {\n      throw new Error(\n        'Unknown AST node type ' +\n          node.type +\n          '. ' +\n          'Maybe you need to change PostCSS stringifier.'\n      )\n    }\n    /* c8 ignore stop */\n    this[node.type](node, semicolon)\n  }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/stringifier.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/stringify.js":
/*!***********************************************!*\
  !*** ./node_modules/postcss/lib/stringify.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nlet Stringifier = __webpack_require__(/*! ./stringifier */ \"./node_modules/postcss/lib/stringifier.js\")\n\nfunction stringify(node, builder) {\n  let str = new Stringifier(builder)\n  str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/stringify.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/symbols.js":
/*!*********************************************!*\
  !*** ./node_modules/postcss/lib/symbols.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/symbols.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/tokenize.js":
/*!**********************************************!*\
  !*** ./node_modules/postcss/lib/tokenize.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n  let css = input.css.valueOf()\n  let ignore = options.ignoreErrors\n\n  let code, content, escape, next, quote\n  let currentToken, escaped, escapePos, n, prev\n\n  let length = css.length\n  let pos = 0\n  let buffer = []\n  let returned = []\n\n  function position() {\n    return pos\n  }\n\n  function unclosed(what) {\n    throw input.error('Unclosed ' + what, pos)\n  }\n\n  function endOfFile() {\n    return returned.length === 0 && pos >= length\n  }\n\n  function nextToken(opts) {\n    if (returned.length) return returned.pop()\n    if (pos >= length) return\n\n    let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n    code = css.charCodeAt(pos)\n\n    switch (code) {\n      case NEWLINE:\n      case SPACE:\n      case TAB:\n      case CR:\n      case FEED: {\n        next = pos\n        do {\n          next += 1\n          code = css.charCodeAt(next)\n        } while (\n          code === SPACE ||\n          code === NEWLINE ||\n          code === TAB ||\n          code === CR ||\n          code === FEED\n        )\n\n        currentToken = ['space', css.slice(pos, next)]\n        pos = next - 1\n        break\n      }\n\n      case OPEN_SQUARE:\n      case CLOSE_SQUARE:\n      case OPEN_CURLY:\n      case CLOSE_CURLY:\n      case COLON:\n      case SEMICOLON:\n      case CLOSE_PARENTHESES: {\n        let controlChar = String.fromCharCode(code)\n        currentToken = [controlChar, controlChar, pos]\n        break\n      }\n\n      case OPEN_PARENTHESES: {\n        prev = buffer.length ? buffer.pop()[1] : ''\n        n = css.charCodeAt(pos + 1)\n        if (\n          prev === 'url' &&\n          n !== SINGLE_QUOTE &&\n          n !== DOUBLE_QUOTE &&\n          n !== SPACE &&\n          n !== NEWLINE &&\n          n !== TAB &&\n          n !== FEED &&\n          n !== CR\n        ) {\n          next = pos\n          do {\n            escaped = false\n            next = css.indexOf(')', next + 1)\n            if (next === -1) {\n              if (ignore || ignoreUnclosed) {\n                next = pos\n                break\n              } else {\n                unclosed('bracket')\n              }\n            }\n            escapePos = next\n            while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n              escapePos -= 1\n              escaped = !escaped\n            }\n          } while (escaped)\n\n          currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n          pos = next\n        } else {\n          next = css.indexOf(')', pos + 1)\n          content = css.slice(pos, next + 1)\n\n          if (next === -1 || RE_BAD_BRACKET.test(content)) {\n            currentToken = ['(', '(', pos]\n          } else {\n            currentToken = ['brackets', content, pos, next]\n            pos = next\n          }\n        }\n\n        break\n      }\n\n      case SINGLE_QUOTE:\n      case DOUBLE_QUOTE: {\n        quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n        next = pos\n        do {\n          escaped = false\n          next = css.indexOf(quote, next + 1)\n          if (next === -1) {\n            if (ignore || ignoreUnclosed) {\n              next = pos + 1\n              break\n            } else {\n              unclosed('string')\n            }\n          }\n          escapePos = next\n          while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n            escapePos -= 1\n            escaped = !escaped\n          }\n        } while (escaped)\n\n        currentToken = ['string', css.slice(pos, next + 1), pos, next]\n        pos = next\n        break\n      }\n\n      case AT: {\n        RE_AT_END.lastIndex = pos + 1\n        RE_AT_END.test(css)\n        if (RE_AT_END.lastIndex === 0) {\n          next = css.length - 1\n        } else {\n          next = RE_AT_END.lastIndex - 2\n        }\n\n        currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n        pos = next\n        break\n      }\n\n      case BACKSLASH: {\n        next = pos\n        escape = true\n        while (css.charCodeAt(next + 1) === BACKSLASH) {\n          next += 1\n          escape = !escape\n        }\n        code = css.charCodeAt(next + 1)\n        if (\n          escape &&\n          code !== SLASH &&\n          code !== SPACE &&\n          code !== NEWLINE &&\n          code !== TAB &&\n          code !== CR &&\n          code !== FEED\n        ) {\n          next += 1\n          if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n            while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n              next += 1\n            }\n            if (css.charCodeAt(next + 1) === SPACE) {\n              next += 1\n            }\n          }\n        }\n\n        currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n        pos = next\n        break\n      }\n\n      default: {\n        if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n          next = css.indexOf('*/', pos + 2) + 1\n          if (next === 0) {\n            if (ignore || ignoreUnclosed) {\n              next = css.length\n            } else {\n              unclosed('comment')\n            }\n          }\n\n          currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n          pos = next\n        } else {\n          RE_WORD_END.lastIndex = pos + 1\n          RE_WORD_END.test(css)\n          if (RE_WORD_END.lastIndex === 0) {\n            next = css.length - 1\n          } else {\n            next = RE_WORD_END.lastIndex - 2\n          }\n\n          currentToken = ['word', css.slice(pos, next + 1), pos, next]\n          buffer.push(currentToken)\n          pos = next\n        }\n\n        break\n      }\n    }\n\n    pos++\n    return currentToken\n  }\n\n  function back(token) {\n    returned.push(token)\n  }\n\n  return {\n    back,\n    endOfFile,\n    nextToken,\n    position\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/tokenize.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/warn-once.js":
/*!***********************************************!*\
  !*** ./node_modules/postcss/lib/warn-once.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-disable no-console */\n\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n  if (printed[message]) return\n  printed[message] = true\n\n  if (typeof console !== 'undefined' && console.warn) {\n    console.warn(message)\n  }\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/warn-once.js?");

/***/ }),

/***/ "./node_modules/postcss/lib/warning.js":
/*!*********************************************!*\
  !*** ./node_modules/postcss/lib/warning.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nclass Warning {\n  constructor(text, opts = {}) {\n    this.type = 'warning'\n    this.text = text\n\n    if (opts.node && opts.node.source) {\n      let range = opts.node.rangeBy(opts)\n      this.line = range.start.line\n      this.column = range.start.column\n      this.endLine = range.end.line\n      this.endColumn = range.end.column\n    }\n\n    for (let opt in opts) this[opt] = opts[opt]\n  }\n\n  toString() {\n    if (this.node) {\n      return this.node.error(this.text, {\n        index: this.index,\n        plugin: this.plugin,\n        word: this.word\n      }).message\n    }\n\n    if (this.plugin) {\n      return this.plugin + ': ' + this.text\n    }\n\n    return this.text\n  }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/lib/warning.js?");

/***/ }),

/***/ "./node_modules/postcss/node_modules/picocolors/picocolors.browser.js":
/*!****************************************************************************!*\
  !*** ./node_modules/postcss/node_modules/picocolors/picocolors.browser.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/postcss/node_modules/picocolors/picocolors.browser.js?");

/***/ }),

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/process/browser.js?");

/***/ }),

/***/ "./node_modules/pusher-js/dist/web/pusher.js":
/*!***************************************************!*\
  !*** ./node_modules/pusher-js/dist/web/pusher.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*!\n * Pusher JavaScript Library v8.0.1\n * https://pusher.com/\n *\n * Copyright 2020, Pusher\n * Released under the MIT licence.\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 2);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package base64 implements Base64 encoding and decoding.\n */\n// Invalid character used in decoding to indicate\n// that the character to decode is out of range of\n// alphabet and cannot be decoded.\nvar INVALID_BYTE = 256;\n/**\n * Implements standard Base64 encoding.\n *\n * Operates in constant time.\n */\nvar Coder = /** @class */ (function () {\n    // TODO(dchest): methods to encode chunk-by-chunk.\n    function Coder(_paddingCharacter) {\n        if (_paddingCharacter === void 0) { _paddingCharacter = \"=\"; }\n        this._paddingCharacter = _paddingCharacter;\n    }\n    Coder.prototype.encodedLength = function (length) {\n        if (!this._paddingCharacter) {\n            return (length * 8 + 5) / 6 | 0;\n        }\n        return (length + 2) / 3 * 4 | 0;\n    };\n    Coder.prototype.encode = function (data) {\n        var out = \"\";\n        var i = 0;\n        for (; i < data.length - 2; i += 3) {\n            var c = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);\n            out += this._encodeByte((c >>> 3 * 6) & 63);\n            out += this._encodeByte((c >>> 2 * 6) & 63);\n            out += this._encodeByte((c >>> 1 * 6) & 63);\n            out += this._encodeByte((c >>> 0 * 6) & 63);\n        }\n        var left = data.length - i;\n        if (left > 0) {\n            var c = (data[i] << 16) | (left === 2 ? data[i + 1] << 8 : 0);\n            out += this._encodeByte((c >>> 3 * 6) & 63);\n            out += this._encodeByte((c >>> 2 * 6) & 63);\n            if (left === 2) {\n                out += this._encodeByte((c >>> 1 * 6) & 63);\n            }\n            else {\n                out += this._paddingCharacter || \"\";\n            }\n            out += this._paddingCharacter || \"\";\n        }\n        return out;\n    };\n    Coder.prototype.maxDecodedLength = function (length) {\n        if (!this._paddingCharacter) {\n            return (length * 6 + 7) / 8 | 0;\n        }\n        return length / 4 * 3 | 0;\n    };\n    Coder.prototype.decodedLength = function (s) {\n        return this.maxDecodedLength(s.length - this._getPaddingLength(s));\n    };\n    Coder.prototype.decode = function (s) {\n        if (s.length === 0) {\n            return new Uint8Array(0);\n        }\n        var paddingLength = this._getPaddingLength(s);\n        var length = s.length - paddingLength;\n        var out = new Uint8Array(this.maxDecodedLength(length));\n        var op = 0;\n        var i = 0;\n        var haveBad = 0;\n        var v0 = 0, v1 = 0, v2 = 0, v3 = 0;\n        for (; i < length - 4; i += 4) {\n            v0 = this._decodeChar(s.charCodeAt(i + 0));\n            v1 = this._decodeChar(s.charCodeAt(i + 1));\n            v2 = this._decodeChar(s.charCodeAt(i + 2));\n            v3 = this._decodeChar(s.charCodeAt(i + 3));\n            out[op++] = (v0 << 2) | (v1 >>> 4);\n            out[op++] = (v1 << 4) | (v2 >>> 2);\n            out[op++] = (v2 << 6) | v3;\n            haveBad |= v0 & INVALID_BYTE;\n            haveBad |= v1 & INVALID_BYTE;\n            haveBad |= v2 & INVALID_BYTE;\n            haveBad |= v3 & INVALID_BYTE;\n        }\n        if (i < length - 1) {\n            v0 = this._decodeChar(s.charCodeAt(i));\n            v1 = this._decodeChar(s.charCodeAt(i + 1));\n            out[op++] = (v0 << 2) | (v1 >>> 4);\n            haveBad |= v0 & INVALID_BYTE;\n            haveBad |= v1 & INVALID_BYTE;\n        }\n        if (i < length - 2) {\n            v2 = this._decodeChar(s.charCodeAt(i + 2));\n            out[op++] = (v1 << 4) | (v2 >>> 2);\n            haveBad |= v2 & INVALID_BYTE;\n        }\n        if (i < length - 3) {\n            v3 = this._decodeChar(s.charCodeAt(i + 3));\n            out[op++] = (v2 << 6) | v3;\n            haveBad |= v3 & INVALID_BYTE;\n        }\n        if (haveBad !== 0) {\n            throw new Error(\"Base64Coder: incorrect characters for decoding\");\n        }\n        return out;\n    };\n    // Standard encoding have the following encoded/decoded ranges,\n    // which we need to convert between.\n    //\n    // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789  +   /\n    // Index:   0 - 25                    26 - 51              52 - 61   62  63\n    // ASCII:  65 - 90                    97 - 122             48 - 57   43  47\n    //\n    // Encode 6 bits in b into a new character.\n    Coder.prototype._encodeByte = function (b) {\n        // Encoding uses constant time operations as follows:\n        //\n        // 1. Define comparison of A with B using (A - B) >>> 8:\n        //          if A > B, then result is positive integer\n        //          if A <= B, then result is 0\n        //\n        // 2. Define selection of C or 0 using bitwise AND: X & C:\n        //          if X == 0, then result is 0\n        //          if X != 0, then result is C\n        //\n        // 3. Start with the smallest comparison (b >= 0), which is always\n        //    true, so set the result to the starting ASCII value (65).\n        //\n        // 4. Continue comparing b to higher ASCII values, and selecting\n        //    zero if comparison isn't true, otherwise selecting a value\n        //    to add to result, which:\n        //\n        //          a) undoes the previous addition\n        //          b) provides new value to add\n        //\n        var result = b;\n        // b >= 0\n        result += 65;\n        // b > 25\n        result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n        // b > 51\n        result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n        // b > 61\n        result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 43);\n        // b > 62\n        result += ((62 - b) >>> 8) & ((62 - 43) - 63 + 47);\n        return String.fromCharCode(result);\n    };\n    // Decode a character code into a byte.\n    // Must return 256 if character is out of alphabet range.\n    Coder.prototype._decodeChar = function (c) {\n        // Decoding works similar to encoding: using the same comparison\n        // function, but now it works on ranges: result is always incremented\n        // by value, but this value becomes zero if the range is not\n        // satisfied.\n        //\n        // Decoding starts with invalid value, 256, which is then\n        // subtracted when the range is satisfied. If none of the ranges\n        // apply, the function returns 256, which is then checked by\n        // the caller to throw error.\n        var result = INVALID_BYTE; // start with invalid character\n        // c == 43 (c > 42 and c < 44)\n        result += (((42 - c) & (c - 44)) >>> 8) & (-INVALID_BYTE + c - 43 + 62);\n        // c == 47 (c > 46 and c < 48)\n        result += (((46 - c) & (c - 48)) >>> 8) & (-INVALID_BYTE + c - 47 + 63);\n        // c > 47 and c < 58\n        result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n        // c > 64 and c < 91\n        result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n        // c > 96 and c < 123\n        result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n        return result;\n    };\n    Coder.prototype._getPaddingLength = function (s) {\n        var paddingLength = 0;\n        if (this._paddingCharacter) {\n            for (var i = s.length - 1; i >= 0; i--) {\n                if (s[i] !== this._paddingCharacter) {\n                    break;\n                }\n                paddingLength++;\n            }\n            if (s.length < 4 || paddingLength > 2) {\n                throw new Error(\"Base64Coder: incorrect padding\");\n            }\n        }\n        return paddingLength;\n    };\n    return Coder;\n}());\nexports.Coder = Coder;\nvar stdCoder = new Coder();\nfunction encode(data) {\n    return stdCoder.encode(data);\n}\nexports.encode = encode;\nfunction decode(s) {\n    return stdCoder.decode(s);\n}\nexports.decode = decode;\n/**\n * Implements URL-safe Base64 encoding.\n * (Same as Base64, but '+' is replaced with '-', and '/' with '_').\n *\n * Operates in constant time.\n */\nvar URLSafeCoder = /** @class */ (function (_super) {\n    __extends(URLSafeCoder, _super);\n    function URLSafeCoder() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    // URL-safe encoding have the following encoded/decoded ranges:\n    //\n    // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789  -   _\n    // Index:   0 - 25                    26 - 51              52 - 61   62  63\n    // ASCII:  65 - 90                    97 - 122             48 - 57   45  95\n    //\n    URLSafeCoder.prototype._encodeByte = function (b) {\n        var result = b;\n        // b >= 0\n        result += 65;\n        // b > 25\n        result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n        // b > 51\n        result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n        // b > 61\n        result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 45);\n        // b > 62\n        result += ((62 - b) >>> 8) & ((62 - 45) - 63 + 95);\n        return String.fromCharCode(result);\n    };\n    URLSafeCoder.prototype._decodeChar = function (c) {\n        var result = INVALID_BYTE;\n        // c == 45 (c > 44 and c < 46)\n        result += (((44 - c) & (c - 46)) >>> 8) & (-INVALID_BYTE + c - 45 + 62);\n        // c == 95 (c > 94 and c < 96)\n        result += (((94 - c) & (c - 96)) >>> 8) & (-INVALID_BYTE + c - 95 + 63);\n        // c > 47 and c < 58\n        result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n        // c > 64 and c < 91\n        result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n        // c > 96 and c < 123\n        result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n        return result;\n    };\n    return URLSafeCoder;\n}(Coder));\nexports.URLSafeCoder = URLSafeCoder;\nvar urlSafeCoder = new URLSafeCoder();\nfunction encodeURLSafe(data) {\n    return urlSafeCoder.encode(data);\n}\nexports.encodeURLSafe = encodeURLSafe;\nfunction decodeURLSafe(s) {\n    return urlSafeCoder.decode(s);\n}\nexports.decodeURLSafe = decodeURLSafe;\nexports.encodedLength = function (length) {\n    return stdCoder.encodedLength(length);\n};\nexports.maxDecodedLength = function (length) {\n    return stdCoder.maxDecodedLength(length);\n};\nexports.decodedLength = function (s) {\n    return stdCoder.decodedLength(s);\n};\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nvar INVALID_UTF16 = \"utf8: invalid string\";\nvar INVALID_UTF8 = \"utf8: invalid source encoding\";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n    // Calculate result length and allocate output array.\n    // encodedLength() also validates string and throws errors,\n    // so we don't need repeat validation here.\n    var arr = new Uint8Array(encodedLength(s));\n    var pos = 0;\n    for (var i = 0; i < s.length; i++) {\n        var c = s.charCodeAt(i);\n        if (c < 0x80) {\n            arr[pos++] = c;\n        }\n        else if (c < 0x800) {\n            arr[pos++] = 0xc0 | c >> 6;\n            arr[pos++] = 0x80 | c & 0x3f;\n        }\n        else if (c < 0xd800) {\n            arr[pos++] = 0xe0 | c >> 12;\n            arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n            arr[pos++] = 0x80 | c & 0x3f;\n        }\n        else {\n            i++; // get one more character\n            c = (c & 0x3ff) << 10;\n            c |= s.charCodeAt(i) & 0x3ff;\n            c += 0x10000;\n            arr[pos++] = 0xf0 | c >> 18;\n            arr[pos++] = 0x80 | (c >> 12) & 0x3f;\n            arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n            arr[pos++] = 0x80 | c & 0x3f;\n        }\n    }\n    return arr;\n}\nexports.encode = encode;\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n    var result = 0;\n    for (var i = 0; i < s.length; i++) {\n        var c = s.charCodeAt(i);\n        if (c < 0x80) {\n            result += 1;\n        }\n        else if (c < 0x800) {\n            result += 2;\n        }\n        else if (c < 0xd800) {\n            result += 3;\n        }\n        else if (c <= 0xdfff) {\n            if (i >= s.length - 1) {\n                throw new Error(INVALID_UTF16);\n            }\n            i++; // \"eat\" next character\n            result += 4;\n        }\n        else {\n            throw new Error(INVALID_UTF16);\n        }\n    }\n    return result;\n}\nexports.encodedLength = encodedLength;\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n    var chars = [];\n    for (var i = 0; i < arr.length; i++) {\n        var b = arr[i];\n        if (b & 0x80) {\n            var min = void 0;\n            if (b < 0xe0) {\n                // Need 1 more byte.\n                if (i >= arr.length) {\n                    throw new Error(INVALID_UTF8);\n                }\n                var n1 = arr[++i];\n                if ((n1 & 0xc0) !== 0x80) {\n                    throw new Error(INVALID_UTF8);\n                }\n                b = (b & 0x1f) << 6 | (n1 & 0x3f);\n                min = 0x80;\n            }\n            else if (b < 0xf0) {\n                // Need 2 more bytes.\n                if (i >= arr.length - 1) {\n                    throw new Error(INVALID_UTF8);\n                }\n                var n1 = arr[++i];\n                var n2 = arr[++i];\n                if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n                    throw new Error(INVALID_UTF8);\n                }\n                b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n                min = 0x800;\n            }\n            else if (b < 0xf8) {\n                // Need 3 more bytes.\n                if (i >= arr.length - 2) {\n                    throw new Error(INVALID_UTF8);\n                }\n                var n1 = arr[++i];\n                var n2 = arr[++i];\n                var n3 = arr[++i];\n                if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n                    throw new Error(INVALID_UTF8);\n                }\n                b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n                min = 0x10000;\n            }\n            else {\n                throw new Error(INVALID_UTF8);\n            }\n            if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n                throw new Error(INVALID_UTF8);\n            }\n            if (b >= 0x10000) {\n                // Surrogate pair.\n                if (b > 0x10ffff) {\n                    throw new Error(INVALID_UTF8);\n                }\n                b -= 0x10000;\n                chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n                b = 0xdc00 | (b & 0x3ff);\n            }\n        }\n        chars.push(String.fromCharCode(b));\n    }\n    return chars.join(\"\");\n}\nexports.decode = decode;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// required so we don't have to do require('pusher').default etc.\nmodule.exports = __webpack_require__(3).default;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_receiver_factory.ts\nvar ScriptReceiverFactory = (function () {\n    function ScriptReceiverFactory(prefix, name) {\n        this.lastId = 0;\n        this.prefix = prefix;\n        this.name = name;\n    }\n    ScriptReceiverFactory.prototype.create = function (callback) {\n        this.lastId++;\n        var number = this.lastId;\n        var id = this.prefix + number;\n        var name = this.name + '[' + number + ']';\n        var called = false;\n        var callbackWrapper = function () {\n            if (!called) {\n                callback.apply(null, arguments);\n                called = true;\n            }\n        };\n        this[number] = callbackWrapper;\n        return { number: number, id: id, name: name, callback: callbackWrapper };\n    };\n    ScriptReceiverFactory.prototype.remove = function (receiver) {\n        delete this[receiver.number];\n    };\n    return ScriptReceiverFactory;\n}());\n\nvar ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.ScriptReceivers');\n\n// CONCATENATED MODULE: ./src/core/defaults.ts\nvar Defaults = {\n    VERSION: \"8.0.1\",\n    PROTOCOL: 7,\n    wsPort: 80,\n    wssPort: 443,\n    wsPath: '',\n    httpHost: 'sockjs.pusher.com',\n    httpPort: 80,\n    httpsPort: 443,\n    httpPath: '/pusher',\n    stats_host: 'stats.pusher.com',\n    authEndpoint: '/pusher/auth',\n    authTransport: 'ajax',\n    activityTimeout: 120000,\n    pongTimeout: 30000,\n    unavailableTimeout: 10000,\n    userAuthentication: {\n        endpoint: '/pusher/user-auth',\n        transport: 'ajax'\n    },\n    channelAuthorization: {\n        endpoint: '/pusher/auth',\n        transport: 'ajax'\n    },\n    cdn_http: \"http://js.pusher.com\",\n    cdn_https: \"https://js.pusher.com\",\n    dependency_suffix: \"\"\n};\n/* harmony default export */ var defaults = (Defaults);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependency_loader.ts\n\n\nvar dependency_loader_DependencyLoader = (function () {\n    function DependencyLoader(options) {\n        this.options = options;\n        this.receivers = options.receivers || ScriptReceivers;\n        this.loading = {};\n    }\n    DependencyLoader.prototype.load = function (name, options, callback) {\n        var self = this;\n        if (self.loading[name] && self.loading[name].length > 0) {\n            self.loading[name].push(callback);\n        }\n        else {\n            self.loading[name] = [callback];\n            var request = runtime.createScriptRequest(self.getPath(name, options));\n            var receiver = self.receivers.create(function (error) {\n                self.receivers.remove(receiver);\n                if (self.loading[name]) {\n                    var callbacks = self.loading[name];\n                    delete self.loading[name];\n                    var successCallback = function (wasSuccessful) {\n                        if (!wasSuccessful) {\n                            request.cleanup();\n                        }\n                    };\n                    for (var i = 0; i < callbacks.length; i++) {\n                        callbacks[i](error, successCallback);\n                    }\n                }\n            });\n            request.send(receiver);\n        }\n    };\n    DependencyLoader.prototype.getRoot = function (options) {\n        var cdn;\n        var protocol = runtime.getDocument().location.protocol;\n        if ((options && options.useTLS) || protocol === 'https:') {\n            cdn = this.options.cdn_https;\n        }\n        else {\n            cdn = this.options.cdn_http;\n        }\n        return cdn.replace(/\\/*$/, '') + '/' + this.options.version;\n    };\n    DependencyLoader.prototype.getPath = function (name, options) {\n        return this.getRoot(options) + '/' + name + this.options.suffix + '.js';\n    };\n    return DependencyLoader;\n}());\n/* harmony default export */ var dependency_loader = (dependency_loader_DependencyLoader);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependencies.ts\n\n\n\nvar DependenciesReceivers = new ScriptReceiverFactory('_pusher_dependencies', 'Pusher.DependenciesReceivers');\nvar Dependencies = new dependency_loader({\n    cdn_http: defaults.cdn_http,\n    cdn_https: defaults.cdn_https,\n    version: defaults.VERSION,\n    suffix: defaults.dependency_suffix,\n    receivers: DependenciesReceivers\n});\n\n// CONCATENATED MODULE: ./src/core/utils/url_store.ts\nvar urlStore = {\n    baseUrl: 'https://pusher.com',\n    urls: {\n        authenticationEndpoint: {\n            path: '/docs/channels/server_api/authenticating_users'\n        },\n        authorizationEndpoint: {\n            path: '/docs/channels/server_api/authorizing-users/'\n        },\n        javascriptQuickStart: {\n            path: '/docs/javascript_quick_start'\n        },\n        triggeringClientEvents: {\n            path: '/docs/client_api_guide/client_events#trigger-events'\n        },\n        encryptedChannelSupport: {\n            fullUrl: 'https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support'\n        }\n    }\n};\nvar buildLogSuffix = function (key) {\n    var urlPrefix = 'See:';\n    var urlObj = urlStore.urls[key];\n    if (!urlObj)\n        return '';\n    var url;\n    if (urlObj.fullUrl) {\n        url = urlObj.fullUrl;\n    }\n    else if (urlObj.path) {\n        url = urlStore.baseUrl + urlObj.path;\n    }\n    if (!url)\n        return '';\n    return urlPrefix + \" \" + url;\n};\n/* harmony default export */ var url_store = ({ buildLogSuffix: buildLogSuffix });\n\n// CONCATENATED MODULE: ./src/core/auth/options.ts\nvar AuthRequestType;\n(function (AuthRequestType) {\n    AuthRequestType[\"UserAuthentication\"] = \"user-authentication\";\n    AuthRequestType[\"ChannelAuthorization\"] = \"channel-authorization\";\n})(AuthRequestType || (AuthRequestType = {}));\n\n// CONCATENATED MODULE: ./src/core/errors.ts\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar BadEventName = (function (_super) {\n    __extends(BadEventName, _super);\n    function BadEventName(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return BadEventName;\n}(Error));\n\nvar BadChannelName = (function (_super) {\n    __extends(BadChannelName, _super);\n    function BadChannelName(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return BadChannelName;\n}(Error));\n\nvar RequestTimedOut = (function (_super) {\n    __extends(RequestTimedOut, _super);\n    function RequestTimedOut(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return RequestTimedOut;\n}(Error));\n\nvar TransportPriorityTooLow = (function (_super) {\n    __extends(TransportPriorityTooLow, _super);\n    function TransportPriorityTooLow(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return TransportPriorityTooLow;\n}(Error));\n\nvar TransportClosed = (function (_super) {\n    __extends(TransportClosed, _super);\n    function TransportClosed(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return TransportClosed;\n}(Error));\n\nvar UnsupportedFeature = (function (_super) {\n    __extends(UnsupportedFeature, _super);\n    function UnsupportedFeature(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return UnsupportedFeature;\n}(Error));\n\nvar UnsupportedTransport = (function (_super) {\n    __extends(UnsupportedTransport, _super);\n    function UnsupportedTransport(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return UnsupportedTransport;\n}(Error));\n\nvar UnsupportedStrategy = (function (_super) {\n    __extends(UnsupportedStrategy, _super);\n    function UnsupportedStrategy(msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return UnsupportedStrategy;\n}(Error));\n\nvar HTTPAuthError = (function (_super) {\n    __extends(HTTPAuthError, _super);\n    function HTTPAuthError(status, msg) {\n        var _newTarget = this.constructor;\n        var _this = _super.call(this, msg) || this;\n        _this.status = status;\n        Object.setPrototypeOf(_this, _newTarget.prototype);\n        return _this;\n    }\n    return HTTPAuthError;\n}(Error));\n\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/auth/xhr_auth.ts\n\n\n\n\nvar ajax = function (context, query, authOptions, authRequestType, callback) {\n    var xhr = runtime.createXHR();\n    xhr.open('POST', authOptions.endpoint, true);\n    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n    for (var headerName in authOptions.headers) {\n        xhr.setRequestHeader(headerName, authOptions.headers[headerName]);\n    }\n    if (authOptions.headersProvider != null) {\n        var dynamicHeaders = authOptions.headersProvider();\n        for (var headerName in dynamicHeaders) {\n            xhr.setRequestHeader(headerName, dynamicHeaders[headerName]);\n        }\n    }\n    xhr.onreadystatechange = function () {\n        if (xhr.readyState === 4) {\n            if (xhr.status === 200) {\n                var data = void 0;\n                var parsed = false;\n                try {\n                    data = JSON.parse(xhr.responseText);\n                    parsed = true;\n                }\n                catch (e) {\n                    callback(new HTTPAuthError(200, \"JSON returned from \" + authRequestType.toString() + \" endpoint was invalid, yet status code was 200. Data was: \" + xhr.responseText), null);\n                }\n                if (parsed) {\n                    callback(null, data);\n                }\n            }\n            else {\n                var suffix = '';\n                switch (authRequestType) {\n                    case AuthRequestType.UserAuthentication:\n                        suffix = url_store.buildLogSuffix('authenticationEndpoint');\n                        break;\n                    case AuthRequestType.ChannelAuthorization:\n                        suffix = \"Clients must be authorized to join private or presence channels. \" + url_store.buildLogSuffix('authorizationEndpoint');\n                        break;\n                }\n                callback(new HTTPAuthError(xhr.status, \"Unable to retrieve auth string from \" + authRequestType.toString() + \" endpoint - \" +\n                    (\"received status: \" + xhr.status + \" from \" + authOptions.endpoint + \". \" + suffix)), null);\n            }\n        }\n    };\n    xhr.send(query);\n    return xhr;\n};\n/* harmony default export */ var xhr_auth = (ajax);\n\n// CONCATENATED MODULE: ./src/core/base64.ts\nfunction encode(s) {\n    return btoa(utob(s));\n}\nvar fromCharCode = String.fromCharCode;\nvar b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nvar b64tab = {};\nfor (var base64_i = 0, l = b64chars.length; base64_i < l; base64_i++) {\n    b64tab[b64chars.charAt(base64_i)] = base64_i;\n}\nvar cb_utob = function (c) {\n    var cc = c.charCodeAt(0);\n    return cc < 0x80\n        ? c\n        : cc < 0x800\n            ? fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))\n            : fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) +\n                fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) +\n                fromCharCode(0x80 | (cc & 0x3f));\n};\nvar utob = function (u) {\n    return u.replace(/[^\\x00-\\x7F]/g, cb_utob);\n};\nvar cb_encode = function (ccc) {\n    var padlen = [0, 2, 1][ccc.length % 3];\n    var ord = (ccc.charCodeAt(0) << 16) |\n        ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) |\n        (ccc.length > 2 ? ccc.charCodeAt(2) : 0);\n    var chars = [\n        b64chars.charAt(ord >>> 18),\n        b64chars.charAt((ord >>> 12) & 63),\n        padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),\n        padlen >= 1 ? '=' : b64chars.charAt(ord & 63)\n    ];\n    return chars.join('');\n};\nvar btoa = window.btoa ||\n    function (b) {\n        return b.replace(/[\\s\\S]{1,3}/g, cb_encode);\n    };\n\n// CONCATENATED MODULE: ./src/core/utils/timers/abstract_timer.ts\nvar Timer = (function () {\n    function Timer(set, clear, delay, callback) {\n        var _this = this;\n        this.clear = clear;\n        this.timer = set(function () {\n            if (_this.timer) {\n                _this.timer = callback(_this.timer);\n            }\n        }, delay);\n    }\n    Timer.prototype.isRunning = function () {\n        return this.timer !== null;\n    };\n    Timer.prototype.ensureAborted = function () {\n        if (this.timer) {\n            this.clear(this.timer);\n            this.timer = null;\n        }\n    };\n    return Timer;\n}());\n/* harmony default export */ var abstract_timer = (Timer);\n\n// CONCATENATED MODULE: ./src/core/utils/timers/index.ts\nvar timers_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\nfunction timers_clearTimeout(timer) {\n    window.clearTimeout(timer);\n}\nfunction timers_clearInterval(timer) {\n    window.clearInterval(timer);\n}\nvar OneOffTimer = (function (_super) {\n    timers_extends(OneOffTimer, _super);\n    function OneOffTimer(delay, callback) {\n        return _super.call(this, setTimeout, timers_clearTimeout, delay, function (timer) {\n            callback();\n            return null;\n        }) || this;\n    }\n    return OneOffTimer;\n}(abstract_timer));\n\nvar PeriodicTimer = (function (_super) {\n    timers_extends(PeriodicTimer, _super);\n    function PeriodicTimer(delay, callback) {\n        return _super.call(this, setInterval, timers_clearInterval, delay, function (timer) {\n            callback();\n            return timer;\n        }) || this;\n    }\n    return PeriodicTimer;\n}(abstract_timer));\n\n\n// CONCATENATED MODULE: ./src/core/util.ts\n\nvar Util = {\n    now: function () {\n        if (Date.now) {\n            return Date.now();\n        }\n        else {\n            return new Date().valueOf();\n        }\n    },\n    defer: function (callback) {\n        return new OneOffTimer(0, callback);\n    },\n    method: function (name) {\n        var args = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            args[_i - 1] = arguments[_i];\n        }\n        var boundArguments = Array.prototype.slice.call(arguments, 1);\n        return function (object) {\n            return object[name].apply(object, boundArguments.concat(arguments));\n        };\n    }\n};\n/* harmony default export */ var util = (Util);\n\n// CONCATENATED MODULE: ./src/core/utils/collections.ts\n\n\nfunction extend(target) {\n    var sources = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        sources[_i - 1] = arguments[_i];\n    }\n    for (var i = 0; i < sources.length; i++) {\n        var extensions = sources[i];\n        for (var property in extensions) {\n            if (extensions[property] &&\n                extensions[property].constructor &&\n                extensions[property].constructor === Object) {\n                target[property] = extend(target[property] || {}, extensions[property]);\n            }\n            else {\n                target[property] = extensions[property];\n            }\n        }\n    }\n    return target;\n}\nfunction stringify() {\n    var m = ['Pusher'];\n    for (var i = 0; i < arguments.length; i++) {\n        if (typeof arguments[i] === 'string') {\n            m.push(arguments[i]);\n        }\n        else {\n            m.push(safeJSONStringify(arguments[i]));\n        }\n    }\n    return m.join(' : ');\n}\nfunction arrayIndexOf(array, item) {\n    var nativeIndexOf = Array.prototype.indexOf;\n    if (array === null) {\n        return -1;\n    }\n    if (nativeIndexOf && array.indexOf === nativeIndexOf) {\n        return array.indexOf(item);\n    }\n    for (var i = 0, l = array.length; i < l; i++) {\n        if (array[i] === item) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction objectApply(object, f) {\n    for (var key in object) {\n        if (Object.prototype.hasOwnProperty.call(object, key)) {\n            f(object[key], key, object);\n        }\n    }\n}\nfunction keys(object) {\n    var keys = [];\n    objectApply(object, function (_, key) {\n        keys.push(key);\n    });\n    return keys;\n}\nfunction values(object) {\n    var values = [];\n    objectApply(object, function (value) {\n        values.push(value);\n    });\n    return values;\n}\nfunction apply(array, f, context) {\n    for (var i = 0; i < array.length; i++) {\n        f.call(context || window, array[i], i, array);\n    }\n}\nfunction map(array, f) {\n    var result = [];\n    for (var i = 0; i < array.length; i++) {\n        result.push(f(array[i], i, array, result));\n    }\n    return result;\n}\nfunction mapObject(object, f) {\n    var result = {};\n    objectApply(object, function (value, key) {\n        result[key] = f(value);\n    });\n    return result;\n}\nfunction filter(array, test) {\n    test =\n        test ||\n            function (value) {\n                return !!value;\n            };\n    var result = [];\n    for (var i = 0; i < array.length; i++) {\n        if (test(array[i], i, array, result)) {\n            result.push(array[i]);\n        }\n    }\n    return result;\n}\nfunction filterObject(object, test) {\n    var result = {};\n    objectApply(object, function (value, key) {\n        if ((test && test(value, key, object, result)) || Boolean(value)) {\n            result[key] = value;\n        }\n    });\n    return result;\n}\nfunction flatten(object) {\n    var result = [];\n    objectApply(object, function (value, key) {\n        result.push([key, value]);\n    });\n    return result;\n}\nfunction any(array, test) {\n    for (var i = 0; i < array.length; i++) {\n        if (test(array[i], i, array)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction collections_all(array, test) {\n    for (var i = 0; i < array.length; i++) {\n        if (!test(array[i], i, array)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction encodeParamsObject(data) {\n    return mapObject(data, function (value) {\n        if (typeof value === 'object') {\n            value = safeJSONStringify(value);\n        }\n        return encodeURIComponent(encode(value.toString()));\n    });\n}\nfunction buildQueryString(data) {\n    var params = filterObject(data, function (value) {\n        return value !== undefined;\n    });\n    var query = map(flatten(encodeParamsObject(params)), util.method('join', '=')).join('&');\n    return query;\n}\nfunction decycleObject(object) {\n    var objects = [], paths = [];\n    return (function derez(value, path) {\n        var i, name, nu;\n        switch (typeof value) {\n            case 'object':\n                if (!value) {\n                    return null;\n                }\n                for (i = 0; i < objects.length; i += 1) {\n                    if (objects[i] === value) {\n                        return { $ref: paths[i] };\n                    }\n                }\n                objects.push(value);\n                paths.push(path);\n                if (Object.prototype.toString.apply(value) === '[object Array]') {\n                    nu = [];\n                    for (i = 0; i < value.length; i += 1) {\n                        nu[i] = derez(value[i], path + '[' + i + ']');\n                    }\n                }\n                else {\n                    nu = {};\n                    for (name in value) {\n                        if (Object.prototype.hasOwnProperty.call(value, name)) {\n                            nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');\n                        }\n                    }\n                }\n                return nu;\n            case 'number':\n            case 'string':\n            case 'boolean':\n                return value;\n        }\n    })(object, '$');\n}\nfunction safeJSONStringify(source) {\n    try {\n        return JSON.stringify(source);\n    }\n    catch (e) {\n        return JSON.stringify(decycleObject(source));\n    }\n}\n\n// CONCATENATED MODULE: ./src/core/logger.ts\n\n\nvar logger_Logger = (function () {\n    function Logger() {\n        this.globalLog = function (message) {\n            if (window.console && window.console.log) {\n                window.console.log(message);\n            }\n        };\n    }\n    Logger.prototype.debug = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        this.log(this.globalLog, args);\n    };\n    Logger.prototype.warn = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        this.log(this.globalLogWarn, args);\n    };\n    Logger.prototype.error = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        this.log(this.globalLogError, args);\n    };\n    Logger.prototype.globalLogWarn = function (message) {\n        if (window.console && window.console.warn) {\n            window.console.warn(message);\n        }\n        else {\n            this.globalLog(message);\n        }\n    };\n    Logger.prototype.globalLogError = function (message) {\n        if (window.console && window.console.error) {\n            window.console.error(message);\n        }\n        else {\n            this.globalLogWarn(message);\n        }\n    };\n    Logger.prototype.log = function (defaultLoggingFunction) {\n        var args = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            args[_i - 1] = arguments[_i];\n        }\n        var message = stringify.apply(this, arguments);\n        if (core_pusher.log) {\n            core_pusher.log(message);\n        }\n        else if (core_pusher.logToConsole) {\n            var log = defaultLoggingFunction.bind(this);\n            log(message);\n        }\n    };\n    return Logger;\n}());\n/* harmony default export */ var logger = (new logger_Logger());\n\n// CONCATENATED MODULE: ./src/runtimes/web/auth/jsonp_auth.ts\n\nvar jsonp = function (context, query, authOptions, authRequestType, callback) {\n    if (authOptions.headers !== undefined ||\n        authOptions.headersProvider != null) {\n        logger.warn(\"To send headers with the \" + authRequestType.toString() + \" request, you must use AJAX, rather than JSONP.\");\n    }\n    var callbackName = context.nextAuthCallbackID.toString();\n    context.nextAuthCallbackID++;\n    var document = context.getDocument();\n    var script = document.createElement('script');\n    context.auth_callbacks[callbackName] = function (data) {\n        callback(null, data);\n    };\n    var callback_name = \"Pusher.auth_callbacks['\" + callbackName + \"']\";\n    script.src =\n        authOptions.endpoint +\n            '?callback=' +\n            encodeURIComponent(callback_name) +\n            '&' +\n            query;\n    var head = document.getElementsByTagName('head')[0] || document.documentElement;\n    head.insertBefore(script, head.firstChild);\n};\n/* harmony default export */ var jsonp_auth = (jsonp);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_request.ts\nvar ScriptRequest = (function () {\n    function ScriptRequest(src) {\n        this.src = src;\n    }\n    ScriptRequest.prototype.send = function (receiver) {\n        var self = this;\n        var errorString = 'Error loading ' + self.src;\n        self.script = document.createElement('script');\n        self.script.id = receiver.id;\n        self.script.src = self.src;\n        self.script.type = 'text/javascript';\n        self.script.charset = 'UTF-8';\n        if (self.script.addEventListener) {\n            self.script.onerror = function () {\n                receiver.callback(errorString);\n            };\n            self.script.onload = function () {\n                receiver.callback(null);\n            };\n        }\n        else {\n            self.script.onreadystatechange = function () {\n                if (self.script.readyState === 'loaded' ||\n                    self.script.readyState === 'complete') {\n                    receiver.callback(null);\n                }\n            };\n        }\n        if (self.script.async === undefined &&\n            document.attachEvent &&\n            /opera/i.test(navigator.userAgent)) {\n            self.errorScript = document.createElement('script');\n            self.errorScript.id = receiver.id + '_error';\n            self.errorScript.text = receiver.name + \"('\" + errorString + \"');\";\n            self.script.async = self.errorScript.async = false;\n        }\n        else {\n            self.script.async = true;\n        }\n        var head = document.getElementsByTagName('head')[0];\n        head.insertBefore(self.script, head.firstChild);\n        if (self.errorScript) {\n            head.insertBefore(self.errorScript, self.script.nextSibling);\n        }\n    };\n    ScriptRequest.prototype.cleanup = function () {\n        if (this.script) {\n            this.script.onload = this.script.onerror = null;\n            this.script.onreadystatechange = null;\n        }\n        if (this.script && this.script.parentNode) {\n            this.script.parentNode.removeChild(this.script);\n        }\n        if (this.errorScript && this.errorScript.parentNode) {\n            this.errorScript.parentNode.removeChild(this.errorScript);\n        }\n        this.script = null;\n        this.errorScript = null;\n    };\n    return ScriptRequest;\n}());\n/* harmony default export */ var script_request = (ScriptRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/jsonp_request.ts\n\n\nvar jsonp_request_JSONPRequest = (function () {\n    function JSONPRequest(url, data) {\n        this.url = url;\n        this.data = data;\n    }\n    JSONPRequest.prototype.send = function (receiver) {\n        if (this.request) {\n            return;\n        }\n        var query = buildQueryString(this.data);\n        var url = this.url + '/' + receiver.number + '?' + query;\n        this.request = runtime.createScriptRequest(url);\n        this.request.send(receiver);\n    };\n    JSONPRequest.prototype.cleanup = function () {\n        if (this.request) {\n            this.request.cleanup();\n        }\n    };\n    return JSONPRequest;\n}());\n/* harmony default export */ var jsonp_request = (jsonp_request_JSONPRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/timeline/jsonp_timeline.ts\n\n\nvar getAgent = function (sender, useTLS) {\n    return function (data, callback) {\n        var scheme = 'http' + (useTLS ? 's' : '') + '://';\n        var url = scheme + (sender.host || sender.options.host) + sender.options.path;\n        var request = runtime.createJSONPRequest(url, data);\n        var receiver = runtime.ScriptReceivers.create(function (error, result) {\n            ScriptReceivers.remove(receiver);\n            request.cleanup();\n            if (result && result.host) {\n                sender.host = result.host;\n            }\n            if (callback) {\n                callback(error, result);\n            }\n        });\n        request.send(receiver);\n    };\n};\nvar jsonp_timeline_jsonp = {\n    name: 'jsonp',\n    getAgent: getAgent\n};\n/* harmony default export */ var jsonp_timeline = (jsonp_timeline_jsonp);\n\n// CONCATENATED MODULE: ./src/core/transports/url_schemes.ts\n\nfunction getGenericURL(baseScheme, params, path) {\n    var scheme = baseScheme + (params.useTLS ? 's' : '');\n    var host = params.useTLS ? params.hostTLS : params.hostNonTLS;\n    return scheme + '://' + host + path;\n}\nfunction getGenericPath(key, queryString) {\n    var path = '/app/' + key;\n    var query = '?protocol=' +\n        defaults.PROTOCOL +\n        '&client=js' +\n        '&version=' +\n        defaults.VERSION +\n        (queryString ? '&' + queryString : '');\n    return path + query;\n}\nvar ws = {\n    getInitial: function (key, params) {\n        var path = (params.httpPath || '') + getGenericPath(key, 'flash=false');\n        return getGenericURL('ws', params, path);\n    }\n};\nvar http = {\n    getInitial: function (key, params) {\n        var path = (params.httpPath || '/pusher') + getGenericPath(key);\n        return getGenericURL('http', params, path);\n    }\n};\nvar sockjs = {\n    getInitial: function (key, params) {\n        return getGenericURL('http', params, params.httpPath || '/pusher');\n    },\n    getPath: function (key, params) {\n        return getGenericPath(key);\n    }\n};\n\n// CONCATENATED MODULE: ./src/core/events/callback_registry.ts\n\nvar callback_registry_CallbackRegistry = (function () {\n    function CallbackRegistry() {\n        this._callbacks = {};\n    }\n    CallbackRegistry.prototype.get = function (name) {\n        return this._callbacks[prefix(name)];\n    };\n    CallbackRegistry.prototype.add = function (name, callback, context) {\n        var prefixedEventName = prefix(name);\n        this._callbacks[prefixedEventName] =\n            this._callbacks[prefixedEventName] || [];\n        this._callbacks[prefixedEventName].push({\n            fn: callback,\n            context: context\n        });\n    };\n    CallbackRegistry.prototype.remove = function (name, callback, context) {\n        if (!name && !callback && !context) {\n            this._callbacks = {};\n            return;\n        }\n        var names = name ? [prefix(name)] : keys(this._callbacks);\n        if (callback || context) {\n            this.removeCallback(names, callback, context);\n        }\n        else {\n            this.removeAllCallbacks(names);\n        }\n    };\n    CallbackRegistry.prototype.removeCallback = function (names, callback, context) {\n        apply(names, function (name) {\n            this._callbacks[name] = filter(this._callbacks[name] || [], function (binding) {\n                return ((callback && callback !== binding.fn) ||\n                    (context && context !== binding.context));\n            });\n            if (this._callbacks[name].length === 0) {\n                delete this._callbacks[name];\n            }\n        }, this);\n    };\n    CallbackRegistry.prototype.removeAllCallbacks = function (names) {\n        apply(names, function (name) {\n            delete this._callbacks[name];\n        }, this);\n    };\n    return CallbackRegistry;\n}());\n/* harmony default export */ var callback_registry = (callback_registry_CallbackRegistry);\nfunction prefix(name) {\n    return '_' + name;\n}\n\n// CONCATENATED MODULE: ./src/core/events/dispatcher.ts\n\n\nvar dispatcher_Dispatcher = (function () {\n    function Dispatcher(failThrough) {\n        this.callbacks = new callback_registry();\n        this.global_callbacks = [];\n        this.failThrough = failThrough;\n    }\n    Dispatcher.prototype.bind = function (eventName, callback, context) {\n        this.callbacks.add(eventName, callback, context);\n        return this;\n    };\n    Dispatcher.prototype.bind_global = function (callback) {\n        this.global_callbacks.push(callback);\n        return this;\n    };\n    Dispatcher.prototype.unbind = function (eventName, callback, context) {\n        this.callbacks.remove(eventName, callback, context);\n        return this;\n    };\n    Dispatcher.prototype.unbind_global = function (callback) {\n        if (!callback) {\n            this.global_callbacks = [];\n            return this;\n        }\n        this.global_callbacks = filter(this.global_callbacks || [], function (c) { return c !== callback; });\n        return this;\n    };\n    Dispatcher.prototype.unbind_all = function () {\n        this.unbind();\n        this.unbind_global();\n        return this;\n    };\n    Dispatcher.prototype.emit = function (eventName, data, metadata) {\n        for (var i = 0; i < this.global_callbacks.length; i++) {\n            this.global_callbacks[i](eventName, data);\n        }\n        var callbacks = this.callbacks.get(eventName);\n        var args = [];\n        if (metadata) {\n            args.push(data, metadata);\n        }\n        else if (data) {\n            args.push(data);\n        }\n        if (callbacks && callbacks.length > 0) {\n            for (var i = 0; i < callbacks.length; i++) {\n                callbacks[i].fn.apply(callbacks[i].context || window, args);\n            }\n        }\n        else if (this.failThrough) {\n            this.failThrough(eventName, data);\n        }\n        return this;\n    };\n    return Dispatcher;\n}());\n/* harmony default export */ var dispatcher = (dispatcher_Dispatcher);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_connection.ts\nvar transport_connection_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n\nvar transport_connection_TransportConnection = (function (_super) {\n    transport_connection_extends(TransportConnection, _super);\n    function TransportConnection(hooks, name, priority, key, options) {\n        var _this = _super.call(this) || this;\n        _this.initialize = runtime.transportConnectionInitializer;\n        _this.hooks = hooks;\n        _this.name = name;\n        _this.priority = priority;\n        _this.key = key;\n        _this.options = options;\n        _this.state = 'new';\n        _this.timeline = options.timeline;\n        _this.activityTimeout = options.activityTimeout;\n        _this.id = _this.timeline.generateUniqueID();\n        return _this;\n    }\n    TransportConnection.prototype.handlesActivityChecks = function () {\n        return Boolean(this.hooks.handlesActivityChecks);\n    };\n    TransportConnection.prototype.supportsPing = function () {\n        return Boolean(this.hooks.supportsPing);\n    };\n    TransportConnection.prototype.connect = function () {\n        var _this = this;\n        if (this.socket || this.state !== 'initialized') {\n            return false;\n        }\n        var url = this.hooks.urls.getInitial(this.key, this.options);\n        try {\n            this.socket = this.hooks.getSocket(url, this.options);\n        }\n        catch (e) {\n            util.defer(function () {\n                _this.onError(e);\n                _this.changeState('closed');\n            });\n            return false;\n        }\n        this.bindListeners();\n        logger.debug('Connecting', { transport: this.name, url: url });\n        this.changeState('connecting');\n        return true;\n    };\n    TransportConnection.prototype.close = function () {\n        if (this.socket) {\n            this.socket.close();\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    TransportConnection.prototype.send = function (data) {\n        var _this = this;\n        if (this.state === 'open') {\n            util.defer(function () {\n                if (_this.socket) {\n                    _this.socket.send(data);\n                }\n            });\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    TransportConnection.prototype.ping = function () {\n        if (this.state === 'open' && this.supportsPing()) {\n            this.socket.ping();\n        }\n    };\n    TransportConnection.prototype.onOpen = function () {\n        if (this.hooks.beforeOpen) {\n            this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));\n        }\n        this.changeState('open');\n        this.socket.onopen = undefined;\n    };\n    TransportConnection.prototype.onError = function (error) {\n        this.emit('error', { type: 'WebSocketError', error: error });\n        this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));\n    };\n    TransportConnection.prototype.onClose = function (closeEvent) {\n        if (closeEvent) {\n            this.changeState('closed', {\n                code: closeEvent.code,\n                reason: closeEvent.reason,\n                wasClean: closeEvent.wasClean\n            });\n        }\n        else {\n            this.changeState('closed');\n        }\n        this.unbindListeners();\n        this.socket = undefined;\n    };\n    TransportConnection.prototype.onMessage = function (message) {\n        this.emit('message', message);\n    };\n    TransportConnection.prototype.onActivity = function () {\n        this.emit('activity');\n    };\n    TransportConnection.prototype.bindListeners = function () {\n        var _this = this;\n        this.socket.onopen = function () {\n            _this.onOpen();\n        };\n        this.socket.onerror = function (error) {\n            _this.onError(error);\n        };\n        this.socket.onclose = function (closeEvent) {\n            _this.onClose(closeEvent);\n        };\n        this.socket.onmessage = function (message) {\n            _this.onMessage(message);\n        };\n        if (this.supportsPing()) {\n            this.socket.onactivity = function () {\n                _this.onActivity();\n            };\n        }\n    };\n    TransportConnection.prototype.unbindListeners = function () {\n        if (this.socket) {\n            this.socket.onopen = undefined;\n            this.socket.onerror = undefined;\n            this.socket.onclose = undefined;\n            this.socket.onmessage = undefined;\n            if (this.supportsPing()) {\n                this.socket.onactivity = undefined;\n            }\n        }\n    };\n    TransportConnection.prototype.changeState = function (state, params) {\n        this.state = state;\n        this.timeline.info(this.buildTimelineMessage({\n            state: state,\n            params: params\n        }));\n        this.emit(state, params);\n    };\n    TransportConnection.prototype.buildTimelineMessage = function (message) {\n        return extend({ cid: this.id }, message);\n    };\n    return TransportConnection;\n}(dispatcher));\n/* harmony default export */ var transport_connection = (transport_connection_TransportConnection);\n\n// CONCATENATED MODULE: ./src/core/transports/transport.ts\n\nvar transport_Transport = (function () {\n    function Transport(hooks) {\n        this.hooks = hooks;\n    }\n    Transport.prototype.isSupported = function (environment) {\n        return this.hooks.isSupported(environment);\n    };\n    Transport.prototype.createConnection = function (name, priority, key, options) {\n        return new transport_connection(this.hooks, name, priority, key, options);\n    };\n    return Transport;\n}());\n/* harmony default export */ var transports_transport = (transport_Transport);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/transports/transports.ts\n\n\n\n\nvar WSTransport = new transports_transport({\n    urls: ws,\n    handlesActivityChecks: false,\n    supportsPing: false,\n    isInitialized: function () {\n        return Boolean(runtime.getWebSocketAPI());\n    },\n    isSupported: function () {\n        return Boolean(runtime.getWebSocketAPI());\n    },\n    getSocket: function (url) {\n        return runtime.createWebSocket(url);\n    }\n});\nvar httpConfiguration = {\n    urls: http,\n    handlesActivityChecks: false,\n    supportsPing: true,\n    isInitialized: function () {\n        return true;\n    }\n};\nvar streamingConfiguration = extend({\n    getSocket: function (url) {\n        return runtime.HTTPFactory.createStreamingSocket(url);\n    }\n}, httpConfiguration);\nvar pollingConfiguration = extend({\n    getSocket: function (url) {\n        return runtime.HTTPFactory.createPollingSocket(url);\n    }\n}, httpConfiguration);\nvar xhrConfiguration = {\n    isSupported: function () {\n        return runtime.isXHRSupported();\n    }\n};\nvar XHRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xhrConfiguration)));\nvar XHRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xhrConfiguration));\nvar Transports = {\n    ws: WSTransport,\n    xhr_streaming: XHRStreamingTransport,\n    xhr_polling: XHRPollingTransport\n};\n/* harmony default export */ var transports = (Transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transports.ts\n\n\n\n\n\n\nvar SockJSTransport = new transports_transport({\n    file: 'sockjs',\n    urls: sockjs,\n    handlesActivityChecks: true,\n    supportsPing: false,\n    isSupported: function () {\n        return true;\n    },\n    isInitialized: function () {\n        return window.SockJS !== undefined;\n    },\n    getSocket: function (url, options) {\n        return new window.SockJS(url, null, {\n            js_path: Dependencies.getPath('sockjs', {\n                useTLS: options.useTLS\n            }),\n            ignore_null_origin: options.ignoreNullOrigin\n        });\n    },\n    beforeOpen: function (socket, path) {\n        socket.send(JSON.stringify({\n            path: path\n        }));\n    }\n});\nvar xdrConfiguration = {\n    isSupported: function (environment) {\n        var yes = runtime.isXDRSupported(environment.useTLS);\n        return yes;\n    }\n};\nvar XDRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xdrConfiguration)));\nvar XDRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xdrConfiguration));\ntransports.xdr_streaming = XDRStreamingTransport;\ntransports.xdr_polling = XDRPollingTransport;\ntransports.sockjs = SockJSTransport;\n/* harmony default export */ var transports_transports = (transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/net_info.ts\nvar net_info_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\nvar NetInfo = (function (_super) {\n    net_info_extends(NetInfo, _super);\n    function NetInfo() {\n        var _this = _super.call(this) || this;\n        var self = _this;\n        if (window.addEventListener !== undefined) {\n            window.addEventListener('online', function () {\n                self.emit('online');\n            }, false);\n            window.addEventListener('offline', function () {\n                self.emit('offline');\n            }, false);\n        }\n        return _this;\n    }\n    NetInfo.prototype.isOnline = function () {\n        if (window.navigator.onLine === undefined) {\n            return true;\n        }\n        else {\n            return window.navigator.onLine;\n        }\n    };\n    return NetInfo;\n}(dispatcher));\n\nvar net_info_Network = new NetInfo();\n\n// CONCATENATED MODULE: ./src/core/transports/assistant_to_the_transport_manager.ts\n\n\nvar assistant_to_the_transport_manager_AssistantToTheTransportManager = (function () {\n    function AssistantToTheTransportManager(manager, transport, options) {\n        this.manager = manager;\n        this.transport = transport;\n        this.minPingDelay = options.minPingDelay;\n        this.maxPingDelay = options.maxPingDelay;\n        this.pingDelay = undefined;\n    }\n    AssistantToTheTransportManager.prototype.createConnection = function (name, priority, key, options) {\n        var _this = this;\n        options = extend({}, options, {\n            activityTimeout: this.pingDelay\n        });\n        var connection = this.transport.createConnection(name, priority, key, options);\n        var openTimestamp = null;\n        var onOpen = function () {\n            connection.unbind('open', onOpen);\n            connection.bind('closed', onClosed);\n            openTimestamp = util.now();\n        };\n        var onClosed = function (closeEvent) {\n            connection.unbind('closed', onClosed);\n            if (closeEvent.code === 1002 || closeEvent.code === 1003) {\n                _this.manager.reportDeath();\n            }\n            else if (!closeEvent.wasClean && openTimestamp) {\n                var lifespan = util.now() - openTimestamp;\n                if (lifespan < 2 * _this.maxPingDelay) {\n                    _this.manager.reportDeath();\n                    _this.pingDelay = Math.max(lifespan / 2, _this.minPingDelay);\n                }\n            }\n        };\n        connection.bind('open', onOpen);\n        return connection;\n    };\n    AssistantToTheTransportManager.prototype.isSupported = function (environment) {\n        return this.manager.isAlive() && this.transport.isSupported(environment);\n    };\n    return AssistantToTheTransportManager;\n}());\n/* harmony default export */ var assistant_to_the_transport_manager = (assistant_to_the_transport_manager_AssistantToTheTransportManager);\n\n// CONCATENATED MODULE: ./src/core/connection/protocol/protocol.ts\nvar Protocol = {\n    decodeMessage: function (messageEvent) {\n        try {\n            var messageData = JSON.parse(messageEvent.data);\n            var pusherEventData = messageData.data;\n            if (typeof pusherEventData === 'string') {\n                try {\n                    pusherEventData = JSON.parse(messageData.data);\n                }\n                catch (e) { }\n            }\n            var pusherEvent = {\n                event: messageData.event,\n                channel: messageData.channel,\n                data: pusherEventData\n            };\n            if (messageData.user_id) {\n                pusherEvent.user_id = messageData.user_id;\n            }\n            return pusherEvent;\n        }\n        catch (e) {\n            throw { type: 'MessageParseError', error: e, data: messageEvent.data };\n        }\n    },\n    encodeMessage: function (event) {\n        return JSON.stringify(event);\n    },\n    processHandshake: function (messageEvent) {\n        var message = Protocol.decodeMessage(messageEvent);\n        if (message.event === 'pusher:connection_established') {\n            if (!message.data.activity_timeout) {\n                throw 'No activity timeout specified in handshake';\n            }\n            return {\n                action: 'connected',\n                id: message.data.socket_id,\n                activityTimeout: message.data.activity_timeout * 1000\n            };\n        }\n        else if (message.event === 'pusher:error') {\n            return {\n                action: this.getCloseAction(message.data),\n                error: this.getCloseError(message.data)\n            };\n        }\n        else {\n            throw 'Invalid handshake';\n        }\n    },\n    getCloseAction: function (closeEvent) {\n        if (closeEvent.code < 4000) {\n            if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {\n                return 'backoff';\n            }\n            else {\n                return null;\n            }\n        }\n        else if (closeEvent.code === 4000) {\n            return 'tls_only';\n        }\n        else if (closeEvent.code < 4100) {\n            return 'refused';\n        }\n        else if (closeEvent.code < 4200) {\n            return 'backoff';\n        }\n        else if (closeEvent.code < 4300) {\n            return 'retry';\n        }\n        else {\n            return 'refused';\n        }\n    },\n    getCloseError: function (closeEvent) {\n        if (closeEvent.code !== 1000 && closeEvent.code !== 1001) {\n            return {\n                type: 'PusherError',\n                data: {\n                    code: closeEvent.code,\n                    message: closeEvent.reason || closeEvent.message\n                }\n            };\n        }\n        else {\n            return null;\n        }\n    }\n};\n/* harmony default export */ var protocol_protocol = (Protocol);\n\n// CONCATENATED MODULE: ./src/core/connection/connection.ts\nvar connection_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\nvar connection_Connection = (function (_super) {\n    connection_extends(Connection, _super);\n    function Connection(id, transport) {\n        var _this = _super.call(this) || this;\n        _this.id = id;\n        _this.transport = transport;\n        _this.activityTimeout = transport.activityTimeout;\n        _this.bindListeners();\n        return _this;\n    }\n    Connection.prototype.handlesActivityChecks = function () {\n        return this.transport.handlesActivityChecks();\n    };\n    Connection.prototype.send = function (data) {\n        return this.transport.send(data);\n    };\n    Connection.prototype.send_event = function (name, data, channel) {\n        var event = { event: name, data: data };\n        if (channel) {\n            event.channel = channel;\n        }\n        logger.debug('Event sent', event);\n        return this.send(protocol_protocol.encodeMessage(event));\n    };\n    Connection.prototype.ping = function () {\n        if (this.transport.supportsPing()) {\n            this.transport.ping();\n        }\n        else {\n            this.send_event('pusher:ping', {});\n        }\n    };\n    Connection.prototype.close = function () {\n        this.transport.close();\n    };\n    Connection.prototype.bindListeners = function () {\n        var _this = this;\n        var listeners = {\n            message: function (messageEvent) {\n                var pusherEvent;\n                try {\n                    pusherEvent = protocol_protocol.decodeMessage(messageEvent);\n                }\n                catch (e) {\n                    _this.emit('error', {\n                        type: 'MessageParseError',\n                        error: e,\n                        data: messageEvent.data\n                    });\n                }\n                if (pusherEvent !== undefined) {\n                    logger.debug('Event recd', pusherEvent);\n                    switch (pusherEvent.event) {\n                        case 'pusher:error':\n                            _this.emit('error', {\n                                type: 'PusherError',\n                                data: pusherEvent.data\n                            });\n                            break;\n                        case 'pusher:ping':\n                            _this.emit('ping');\n                            break;\n                        case 'pusher:pong':\n                            _this.emit('pong');\n                            break;\n                    }\n                    _this.emit('message', pusherEvent);\n                }\n            },\n            activity: function () {\n                _this.emit('activity');\n            },\n            error: function (error) {\n                _this.emit('error', error);\n            },\n            closed: function (closeEvent) {\n                unbindListeners();\n                if (closeEvent && closeEvent.code) {\n                    _this.handleCloseEvent(closeEvent);\n                }\n                _this.transport = null;\n                _this.emit('closed');\n            }\n        };\n        var unbindListeners = function () {\n            objectApply(listeners, function (listener, event) {\n                _this.transport.unbind(event, listener);\n            });\n        };\n        objectApply(listeners, function (listener, event) {\n            _this.transport.bind(event, listener);\n        });\n    };\n    Connection.prototype.handleCloseEvent = function (closeEvent) {\n        var action = protocol_protocol.getCloseAction(closeEvent);\n        var error = protocol_protocol.getCloseError(closeEvent);\n        if (error) {\n            this.emit('error', error);\n        }\n        if (action) {\n            this.emit(action, { action: action, error: error });\n        }\n    };\n    return Connection;\n}(dispatcher));\n/* harmony default export */ var connection_connection = (connection_Connection);\n\n// CONCATENATED MODULE: ./src/core/connection/handshake/index.ts\n\n\n\nvar handshake_Handshake = (function () {\n    function Handshake(transport, callback) {\n        this.transport = transport;\n        this.callback = callback;\n        this.bindListeners();\n    }\n    Handshake.prototype.close = function () {\n        this.unbindListeners();\n        this.transport.close();\n    };\n    Handshake.prototype.bindListeners = function () {\n        var _this = this;\n        this.onMessage = function (m) {\n            _this.unbindListeners();\n            var result;\n            try {\n                result = protocol_protocol.processHandshake(m);\n            }\n            catch (e) {\n                _this.finish('error', { error: e });\n                _this.transport.close();\n                return;\n            }\n            if (result.action === 'connected') {\n                _this.finish('connected', {\n                    connection: new connection_connection(result.id, _this.transport),\n                    activityTimeout: result.activityTimeout\n                });\n            }\n            else {\n                _this.finish(result.action, { error: result.error });\n                _this.transport.close();\n            }\n        };\n        this.onClosed = function (closeEvent) {\n            _this.unbindListeners();\n            var action = protocol_protocol.getCloseAction(closeEvent) || 'backoff';\n            var error = protocol_protocol.getCloseError(closeEvent);\n            _this.finish(action, { error: error });\n        };\n        this.transport.bind('message', this.onMessage);\n        this.transport.bind('closed', this.onClosed);\n    };\n    Handshake.prototype.unbindListeners = function () {\n        this.transport.unbind('message', this.onMessage);\n        this.transport.unbind('closed', this.onClosed);\n    };\n    Handshake.prototype.finish = function (action, params) {\n        this.callback(extend({ transport: this.transport, action: action }, params));\n    };\n    return Handshake;\n}());\n/* harmony default export */ var connection_handshake = (handshake_Handshake);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline_sender.ts\n\nvar timeline_sender_TimelineSender = (function () {\n    function TimelineSender(timeline, options) {\n        this.timeline = timeline;\n        this.options = options || {};\n    }\n    TimelineSender.prototype.send = function (useTLS, callback) {\n        if (this.timeline.isEmpty()) {\n            return;\n        }\n        this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);\n    };\n    return TimelineSender;\n}());\n/* harmony default export */ var timeline_sender = (timeline_sender_TimelineSender);\n\n// CONCATENATED MODULE: ./src/core/channels/channel.ts\nvar channel_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n\nvar channel_Channel = (function (_super) {\n    channel_extends(Channel, _super);\n    function Channel(name, pusher) {\n        var _this = _super.call(this, function (event, data) {\n            logger.debug('No callbacks on ' + name + ' for ' + event);\n        }) || this;\n        _this.name = name;\n        _this.pusher = pusher;\n        _this.subscribed = false;\n        _this.subscriptionPending = false;\n        _this.subscriptionCancelled = false;\n        return _this;\n    }\n    Channel.prototype.authorize = function (socketId, callback) {\n        return callback(null, { auth: '' });\n    };\n    Channel.prototype.trigger = function (event, data) {\n        if (event.indexOf('client-') !== 0) {\n            throw new BadEventName(\"Event '\" + event + \"' does not start with 'client-'\");\n        }\n        if (!this.subscribed) {\n            var suffix = url_store.buildLogSuffix('triggeringClientEvents');\n            logger.warn(\"Client event triggered before channel 'subscription_succeeded' event . \" + suffix);\n        }\n        return this.pusher.send_event(event, data, this.name);\n    };\n    Channel.prototype.disconnect = function () {\n        this.subscribed = false;\n        this.subscriptionPending = false;\n    };\n    Channel.prototype.handleEvent = function (event) {\n        var eventName = event.event;\n        var data = event.data;\n        if (eventName === 'pusher_internal:subscription_succeeded') {\n            this.handleSubscriptionSucceededEvent(event);\n        }\n        else if (eventName === 'pusher_internal:subscription_count') {\n            this.handleSubscriptionCountEvent(event);\n        }\n        else if (eventName.indexOf('pusher_internal:') !== 0) {\n            var metadata = {};\n            this.emit(eventName, data, metadata);\n        }\n    };\n    Channel.prototype.handleSubscriptionSucceededEvent = function (event) {\n        this.subscriptionPending = false;\n        this.subscribed = true;\n        if (this.subscriptionCancelled) {\n            this.pusher.unsubscribe(this.name);\n        }\n        else {\n            this.emit('pusher:subscription_succeeded', event.data);\n        }\n    };\n    Channel.prototype.handleSubscriptionCountEvent = function (event) {\n        if (event.data.subscription_count) {\n            this.subscriptionCount = event.data.subscription_count;\n        }\n        this.emit('pusher:subscription_count', event.data);\n    };\n    Channel.prototype.subscribe = function () {\n        var _this = this;\n        if (this.subscribed) {\n            return;\n        }\n        this.subscriptionPending = true;\n        this.subscriptionCancelled = false;\n        this.authorize(this.pusher.connection.socket_id, function (error, data) {\n            if (error) {\n                _this.subscriptionPending = false;\n                logger.error(error.toString());\n                _this.emit('pusher:subscription_error', Object.assign({}, {\n                    type: 'AuthError',\n                    error: error.message\n                }, error instanceof HTTPAuthError ? { status: error.status } : {}));\n            }\n            else {\n                _this.pusher.send_event('pusher:subscribe', {\n                    auth: data.auth,\n                    channel_data: data.channel_data,\n                    channel: _this.name\n                });\n            }\n        });\n    };\n    Channel.prototype.unsubscribe = function () {\n        this.subscribed = false;\n        this.pusher.send_event('pusher:unsubscribe', {\n            channel: this.name\n        });\n    };\n    Channel.prototype.cancelSubscription = function () {\n        this.subscriptionCancelled = true;\n    };\n    Channel.prototype.reinstateSubscription = function () {\n        this.subscriptionCancelled = false;\n    };\n    return Channel;\n}(dispatcher));\n/* harmony default export */ var channels_channel = (channel_Channel);\n\n// CONCATENATED MODULE: ./src/core/channels/private_channel.ts\nvar private_channel_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\nvar PrivateChannel = (function (_super) {\n    private_channel_extends(PrivateChannel, _super);\n    function PrivateChannel() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    PrivateChannel.prototype.authorize = function (socketId, callback) {\n        return this.pusher.config.channelAuthorizer({\n            channelName: this.name,\n            socketId: socketId\n        }, callback);\n    };\n    return PrivateChannel;\n}(channels_channel));\n/* harmony default export */ var private_channel = (PrivateChannel);\n\n// CONCATENATED MODULE: ./src/core/channels/members.ts\n\nvar members_Members = (function () {\n    function Members() {\n        this.reset();\n    }\n    Members.prototype.get = function (id) {\n        if (Object.prototype.hasOwnProperty.call(this.members, id)) {\n            return {\n                id: id,\n                info: this.members[id]\n            };\n        }\n        else {\n            return null;\n        }\n    };\n    Members.prototype.each = function (callback) {\n        var _this = this;\n        objectApply(this.members, function (member, id) {\n            callback(_this.get(id));\n        });\n    };\n    Members.prototype.setMyID = function (id) {\n        this.myID = id;\n    };\n    Members.prototype.onSubscription = function (subscriptionData) {\n        this.members = subscriptionData.presence.hash;\n        this.count = subscriptionData.presence.count;\n        this.me = this.get(this.myID);\n    };\n    Members.prototype.addMember = function (memberData) {\n        if (this.get(memberData.user_id) === null) {\n            this.count++;\n        }\n        this.members[memberData.user_id] = memberData.user_info;\n        return this.get(memberData.user_id);\n    };\n    Members.prototype.removeMember = function (memberData) {\n        var member = this.get(memberData.user_id);\n        if (member) {\n            delete this.members[memberData.user_id];\n            this.count--;\n        }\n        return member;\n    };\n    Members.prototype.reset = function () {\n        this.members = {};\n        this.count = 0;\n        this.myID = null;\n        this.me = null;\n    };\n    return Members;\n}());\n/* harmony default export */ var members = (members_Members);\n\n// CONCATENATED MODULE: ./src/core/channels/presence_channel.ts\nvar presence_channel_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (_) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\n\n\n\n\nvar presence_channel_PresenceChannel = (function (_super) {\n    presence_channel_extends(PresenceChannel, _super);\n    function PresenceChannel(name, pusher) {\n        var _this = _super.call(this, name, pusher) || this;\n        _this.members = new members();\n        return _this;\n    }\n    PresenceChannel.prototype.authorize = function (socketId, callback) {\n        var _this = this;\n        _super.prototype.authorize.call(this, socketId, function (error, authData) { return __awaiter(_this, void 0, void 0, function () {\n            var channelData, suffix;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        if (!!error) return [3, 3];\n                        authData = authData;\n                        if (!(authData.channel_data != null)) return [3, 1];\n                        channelData = JSON.parse(authData.channel_data);\n                        this.members.setMyID(channelData.user_id);\n                        return [3, 3];\n                    case 1: return [4, this.pusher.user.signinDonePromise];\n                    case 2:\n                        _a.sent();\n                        if (this.pusher.user.user_data != null) {\n                            this.members.setMyID(this.pusher.user.user_data.id);\n                        }\n                        else {\n                            suffix = url_store.buildLogSuffix('authorizationEndpoint');\n                            logger.error(\"Invalid auth response for channel '\" + this.name + \"', \" +\n                                (\"expected 'channel_data' field. \" + suffix + \", \") +\n                                \"or the user should be signed in.\");\n                            callback('Invalid auth response');\n                            return [2];\n                        }\n                        _a.label = 3;\n                    case 3:\n                        callback(error, authData);\n                        return [2];\n                }\n            });\n        }); });\n    };\n    PresenceChannel.prototype.handleEvent = function (event) {\n        var eventName = event.event;\n        if (eventName.indexOf('pusher_internal:') === 0) {\n            this.handleInternalEvent(event);\n        }\n        else {\n            var data = event.data;\n            var metadata = {};\n            if (event.user_id) {\n                metadata.user_id = event.user_id;\n            }\n            this.emit(eventName, data, metadata);\n        }\n    };\n    PresenceChannel.prototype.handleInternalEvent = function (event) {\n        var eventName = event.event;\n        var data = event.data;\n        switch (eventName) {\n            case 'pusher_internal:subscription_succeeded':\n                this.handleSubscriptionSucceededEvent(event);\n                break;\n            case 'pusher_internal:subscription_count':\n                this.handleSubscriptionCountEvent(event);\n                break;\n            case 'pusher_internal:member_added':\n                var addedMember = this.members.addMember(data);\n                this.emit('pusher:member_added', addedMember);\n                break;\n            case 'pusher_internal:member_removed':\n                var removedMember = this.members.removeMember(data);\n                if (removedMember) {\n                    this.emit('pusher:member_removed', removedMember);\n                }\n                break;\n        }\n    };\n    PresenceChannel.prototype.handleSubscriptionSucceededEvent = function (event) {\n        this.subscriptionPending = false;\n        this.subscribed = true;\n        if (this.subscriptionCancelled) {\n            this.pusher.unsubscribe(this.name);\n        }\n        else {\n            this.members.onSubscription(event.data);\n            this.emit('pusher:subscription_succeeded', this.members);\n        }\n    };\n    PresenceChannel.prototype.disconnect = function () {\n        this.members.reset();\n        _super.prototype.disconnect.call(this);\n    };\n    return PresenceChannel;\n}(private_channel));\n/* harmony default export */ var presence_channel = (presence_channel_PresenceChannel);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/utf8/lib/utf8.js\nvar utf8 = __webpack_require__(1);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/base64/lib/base64.js\nvar base64 = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./src/core/channels/encrypted_channel.ts\nvar encrypted_channel_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n\nvar encrypted_channel_EncryptedChannel = (function (_super) {\n    encrypted_channel_extends(EncryptedChannel, _super);\n    function EncryptedChannel(name, pusher, nacl) {\n        var _this = _super.call(this, name, pusher) || this;\n        _this.key = null;\n        _this.nacl = nacl;\n        return _this;\n    }\n    EncryptedChannel.prototype.authorize = function (socketId, callback) {\n        var _this = this;\n        _super.prototype.authorize.call(this, socketId, function (error, authData) {\n            if (error) {\n                callback(error, authData);\n                return;\n            }\n            var sharedSecret = authData['shared_secret'];\n            if (!sharedSecret) {\n                callback(new Error(\"No shared_secret key in auth payload for encrypted channel: \" + _this.name), null);\n                return;\n            }\n            _this.key = Object(base64[\"decode\"])(sharedSecret);\n            delete authData['shared_secret'];\n            callback(null, authData);\n        });\n    };\n    EncryptedChannel.prototype.trigger = function (event, data) {\n        throw new UnsupportedFeature('Client events are not currently supported for encrypted channels');\n    };\n    EncryptedChannel.prototype.handleEvent = function (event) {\n        var eventName = event.event;\n        var data = event.data;\n        if (eventName.indexOf('pusher_internal:') === 0 ||\n            eventName.indexOf('pusher:') === 0) {\n            _super.prototype.handleEvent.call(this, event);\n            return;\n        }\n        this.handleEncryptedEvent(eventName, data);\n    };\n    EncryptedChannel.prototype.handleEncryptedEvent = function (event, data) {\n        var _this = this;\n        if (!this.key) {\n            logger.debug('Received encrypted event before key has been retrieved from the authEndpoint');\n            return;\n        }\n        if (!data.ciphertext || !data.nonce) {\n            logger.error('Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: ' +\n                data);\n            return;\n        }\n        var cipherText = Object(base64[\"decode\"])(data.ciphertext);\n        if (cipherText.length < this.nacl.secretbox.overheadLength) {\n            logger.error(\"Expected encrypted event ciphertext length to be \" + this.nacl.secretbox.overheadLength + \", got: \" + cipherText.length);\n            return;\n        }\n        var nonce = Object(base64[\"decode\"])(data.nonce);\n        if (nonce.length < this.nacl.secretbox.nonceLength) {\n            logger.error(\"Expected encrypted event nonce length to be \" + this.nacl.secretbox.nonceLength + \", got: \" + nonce.length);\n            return;\n        }\n        var bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);\n        if (bytes === null) {\n            logger.debug('Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...');\n            this.authorize(this.pusher.connection.socket_id, function (error, authData) {\n                if (error) {\n                    logger.error(\"Failed to make a request to the authEndpoint: \" + authData + \". Unable to fetch new key, so dropping encrypted event\");\n                    return;\n                }\n                bytes = _this.nacl.secretbox.open(cipherText, nonce, _this.key);\n                if (bytes === null) {\n                    logger.error(\"Failed to decrypt event with new key. Dropping encrypted event\");\n                    return;\n                }\n                _this.emit(event, _this.getDataToEmit(bytes));\n                return;\n            });\n            return;\n        }\n        this.emit(event, this.getDataToEmit(bytes));\n    };\n    EncryptedChannel.prototype.getDataToEmit = function (bytes) {\n        var raw = Object(utf8[\"decode\"])(bytes);\n        try {\n            return JSON.parse(raw);\n        }\n        catch (_a) {\n            return raw;\n        }\n    };\n    return EncryptedChannel;\n}(private_channel));\n/* harmony default export */ var encrypted_channel = (encrypted_channel_EncryptedChannel);\n\n// CONCATENATED MODULE: ./src/core/connection/connection_manager.ts\nvar connection_manager_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n\nvar connection_manager_ConnectionManager = (function (_super) {\n    connection_manager_extends(ConnectionManager, _super);\n    function ConnectionManager(key, options) {\n        var _this = _super.call(this) || this;\n        _this.state = 'initialized';\n        _this.connection = null;\n        _this.key = key;\n        _this.options = options;\n        _this.timeline = _this.options.timeline;\n        _this.usingTLS = _this.options.useTLS;\n        _this.errorCallbacks = _this.buildErrorCallbacks();\n        _this.connectionCallbacks = _this.buildConnectionCallbacks(_this.errorCallbacks);\n        _this.handshakeCallbacks = _this.buildHandshakeCallbacks(_this.errorCallbacks);\n        var Network = runtime.getNetwork();\n        Network.bind('online', function () {\n            _this.timeline.info({ netinfo: 'online' });\n            if (_this.state === 'connecting' || _this.state === 'unavailable') {\n                _this.retryIn(0);\n            }\n        });\n        Network.bind('offline', function () {\n            _this.timeline.info({ netinfo: 'offline' });\n            if (_this.connection) {\n                _this.sendActivityCheck();\n            }\n        });\n        _this.updateStrategy();\n        return _this;\n    }\n    ConnectionManager.prototype.connect = function () {\n        if (this.connection || this.runner) {\n            return;\n        }\n        if (!this.strategy.isSupported()) {\n            this.updateState('failed');\n            return;\n        }\n        this.updateState('connecting');\n        this.startConnecting();\n        this.setUnavailableTimer();\n    };\n    ConnectionManager.prototype.send = function (data) {\n        if (this.connection) {\n            return this.connection.send(data);\n        }\n        else {\n            return false;\n        }\n    };\n    ConnectionManager.prototype.send_event = function (name, data, channel) {\n        if (this.connection) {\n            return this.connection.send_event(name, data, channel);\n        }\n        else {\n            return false;\n        }\n    };\n    ConnectionManager.prototype.disconnect = function () {\n        this.disconnectInternally();\n        this.updateState('disconnected');\n    };\n    ConnectionManager.prototype.isUsingTLS = function () {\n        return this.usingTLS;\n    };\n    ConnectionManager.prototype.startConnecting = function () {\n        var _this = this;\n        var callback = function (error, handshake) {\n            if (error) {\n                _this.runner = _this.strategy.connect(0, callback);\n            }\n            else {\n                if (handshake.action === 'error') {\n                    _this.emit('error', {\n                        type: 'HandshakeError',\n                        error: handshake.error\n                    });\n                    _this.timeline.error({ handshakeError: handshake.error });\n                }\n                else {\n                    _this.abortConnecting();\n                    _this.handshakeCallbacks[handshake.action](handshake);\n                }\n            }\n        };\n        this.runner = this.strategy.connect(0, callback);\n    };\n    ConnectionManager.prototype.abortConnecting = function () {\n        if (this.runner) {\n            this.runner.abort();\n            this.runner = null;\n        }\n    };\n    ConnectionManager.prototype.disconnectInternally = function () {\n        this.abortConnecting();\n        this.clearRetryTimer();\n        this.clearUnavailableTimer();\n        if (this.connection) {\n            var connection = this.abandonConnection();\n            connection.close();\n        }\n    };\n    ConnectionManager.prototype.updateStrategy = function () {\n        this.strategy = this.options.getStrategy({\n            key: this.key,\n            timeline: this.timeline,\n            useTLS: this.usingTLS\n        });\n    };\n    ConnectionManager.prototype.retryIn = function (delay) {\n        var _this = this;\n        this.timeline.info({ action: 'retry', delay: delay });\n        if (delay > 0) {\n            this.emit('connecting_in', Math.round(delay / 1000));\n        }\n        this.retryTimer = new OneOffTimer(delay || 0, function () {\n            _this.disconnectInternally();\n            _this.connect();\n        });\n    };\n    ConnectionManager.prototype.clearRetryTimer = function () {\n        if (this.retryTimer) {\n            this.retryTimer.ensureAborted();\n            this.retryTimer = null;\n        }\n    };\n    ConnectionManager.prototype.setUnavailableTimer = function () {\n        var _this = this;\n        this.unavailableTimer = new OneOffTimer(this.options.unavailableTimeout, function () {\n            _this.updateState('unavailable');\n        });\n    };\n    ConnectionManager.prototype.clearUnavailableTimer = function () {\n        if (this.unavailableTimer) {\n            this.unavailableTimer.ensureAborted();\n        }\n    };\n    ConnectionManager.prototype.sendActivityCheck = function () {\n        var _this = this;\n        this.stopActivityCheck();\n        this.connection.ping();\n        this.activityTimer = new OneOffTimer(this.options.pongTimeout, function () {\n            _this.timeline.error({ pong_timed_out: _this.options.pongTimeout });\n            _this.retryIn(0);\n        });\n    };\n    ConnectionManager.prototype.resetActivityCheck = function () {\n        var _this = this;\n        this.stopActivityCheck();\n        if (this.connection && !this.connection.handlesActivityChecks()) {\n            this.activityTimer = new OneOffTimer(this.activityTimeout, function () {\n                _this.sendActivityCheck();\n            });\n        }\n    };\n    ConnectionManager.prototype.stopActivityCheck = function () {\n        if (this.activityTimer) {\n            this.activityTimer.ensureAborted();\n        }\n    };\n    ConnectionManager.prototype.buildConnectionCallbacks = function (errorCallbacks) {\n        var _this = this;\n        return extend({}, errorCallbacks, {\n            message: function (message) {\n                _this.resetActivityCheck();\n                _this.emit('message', message);\n            },\n            ping: function () {\n                _this.send_event('pusher:pong', {});\n            },\n            activity: function () {\n                _this.resetActivityCheck();\n            },\n            error: function (error) {\n                _this.emit('error', error);\n            },\n            closed: function () {\n                _this.abandonConnection();\n                if (_this.shouldRetry()) {\n                    _this.retryIn(1000);\n                }\n            }\n        });\n    };\n    ConnectionManager.prototype.buildHandshakeCallbacks = function (errorCallbacks) {\n        var _this = this;\n        return extend({}, errorCallbacks, {\n            connected: function (handshake) {\n                _this.activityTimeout = Math.min(_this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);\n                _this.clearUnavailableTimer();\n                _this.setConnection(handshake.connection);\n                _this.socket_id = _this.connection.id;\n                _this.updateState('connected', { socket_id: _this.socket_id });\n            }\n        });\n    };\n    ConnectionManager.prototype.buildErrorCallbacks = function () {\n        var _this = this;\n        var withErrorEmitted = function (callback) {\n            return function (result) {\n                if (result.error) {\n                    _this.emit('error', { type: 'WebSocketError', error: result.error });\n                }\n                callback(result);\n            };\n        };\n        return {\n            tls_only: withErrorEmitted(function () {\n                _this.usingTLS = true;\n                _this.updateStrategy();\n                _this.retryIn(0);\n            }),\n            refused: withErrorEmitted(function () {\n                _this.disconnect();\n            }),\n            backoff: withErrorEmitted(function () {\n                _this.retryIn(1000);\n            }),\n            retry: withErrorEmitted(function () {\n                _this.retryIn(0);\n            })\n        };\n    };\n    ConnectionManager.prototype.setConnection = function (connection) {\n        this.connection = connection;\n        for (var event in this.connectionCallbacks) {\n            this.connection.bind(event, this.connectionCallbacks[event]);\n        }\n        this.resetActivityCheck();\n    };\n    ConnectionManager.prototype.abandonConnection = function () {\n        if (!this.connection) {\n            return;\n        }\n        this.stopActivityCheck();\n        for (var event in this.connectionCallbacks) {\n            this.connection.unbind(event, this.connectionCallbacks[event]);\n        }\n        var connection = this.connection;\n        this.connection = null;\n        return connection;\n    };\n    ConnectionManager.prototype.updateState = function (newState, data) {\n        var previousState = this.state;\n        this.state = newState;\n        if (previousState !== newState) {\n            var newStateDescription = newState;\n            if (newStateDescription === 'connected') {\n                newStateDescription += ' with new socket ID ' + data.socket_id;\n            }\n            logger.debug('State changed', previousState + ' -> ' + newStateDescription);\n            this.timeline.info({ state: newState, params: data });\n            this.emit('state_change', { previous: previousState, current: newState });\n            this.emit(newState, data);\n        }\n    };\n    ConnectionManager.prototype.shouldRetry = function () {\n        return this.state === 'connecting' || this.state === 'connected';\n    };\n    return ConnectionManager;\n}(dispatcher));\n/* harmony default export */ var connection_manager = (connection_manager_ConnectionManager);\n\n// CONCATENATED MODULE: ./src/core/channels/channels.ts\n\n\n\n\nvar channels_Channels = (function () {\n    function Channels() {\n        this.channels = {};\n    }\n    Channels.prototype.add = function (name, pusher) {\n        if (!this.channels[name]) {\n            this.channels[name] = createChannel(name, pusher);\n        }\n        return this.channels[name];\n    };\n    Channels.prototype.all = function () {\n        return values(this.channels);\n    };\n    Channels.prototype.find = function (name) {\n        return this.channels[name];\n    };\n    Channels.prototype.remove = function (name) {\n        var channel = this.channels[name];\n        delete this.channels[name];\n        return channel;\n    };\n    Channels.prototype.disconnect = function () {\n        objectApply(this.channels, function (channel) {\n            channel.disconnect();\n        });\n    };\n    return Channels;\n}());\n/* harmony default export */ var channels = (channels_Channels);\nfunction createChannel(name, pusher) {\n    if (name.indexOf('private-encrypted-') === 0) {\n        if (pusher.config.nacl) {\n            return factory.createEncryptedChannel(name, pusher, pusher.config.nacl);\n        }\n        var errMsg = 'Tried to subscribe to a private-encrypted- channel but no nacl implementation available';\n        var suffix = url_store.buildLogSuffix('encryptedChannelSupport');\n        throw new UnsupportedFeature(errMsg + \". \" + suffix);\n    }\n    else if (name.indexOf('private-') === 0) {\n        return factory.createPrivateChannel(name, pusher);\n    }\n    else if (name.indexOf('presence-') === 0) {\n        return factory.createPresenceChannel(name, pusher);\n    }\n    else if (name.indexOf('#') === 0) {\n        throw new BadChannelName('Cannot create a channel with name \"' + name + '\".');\n    }\n    else {\n        return factory.createChannel(name, pusher);\n    }\n}\n\n// CONCATENATED MODULE: ./src/core/utils/factory.ts\n\n\n\n\n\n\n\n\n\nvar Factory = {\n    createChannels: function () {\n        return new channels();\n    },\n    createConnectionManager: function (key, options) {\n        return new connection_manager(key, options);\n    },\n    createChannel: function (name, pusher) {\n        return new channels_channel(name, pusher);\n    },\n    createPrivateChannel: function (name, pusher) {\n        return new private_channel(name, pusher);\n    },\n    createPresenceChannel: function (name, pusher) {\n        return new presence_channel(name, pusher);\n    },\n    createEncryptedChannel: function (name, pusher, nacl) {\n        return new encrypted_channel(name, pusher, nacl);\n    },\n    createTimelineSender: function (timeline, options) {\n        return new timeline_sender(timeline, options);\n    },\n    createHandshake: function (transport, callback) {\n        return new connection_handshake(transport, callback);\n    },\n    createAssistantToTheTransportManager: function (manager, transport, options) {\n        return new assistant_to_the_transport_manager(manager, transport, options);\n    }\n};\n/* harmony default export */ var factory = (Factory);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_manager.ts\n\nvar transport_manager_TransportManager = (function () {\n    function TransportManager(options) {\n        this.options = options || {};\n        this.livesLeft = this.options.lives || Infinity;\n    }\n    TransportManager.prototype.getAssistant = function (transport) {\n        return factory.createAssistantToTheTransportManager(this, transport, {\n            minPingDelay: this.options.minPingDelay,\n            maxPingDelay: this.options.maxPingDelay\n        });\n    };\n    TransportManager.prototype.isAlive = function () {\n        return this.livesLeft > 0;\n    };\n    TransportManager.prototype.reportDeath = function () {\n        this.livesLeft -= 1;\n    };\n    return TransportManager;\n}());\n/* harmony default export */ var transport_manager = (transport_manager_TransportManager);\n\n// CONCATENATED MODULE: ./src/core/strategies/sequential_strategy.ts\n\n\n\nvar sequential_strategy_SequentialStrategy = (function () {\n    function SequentialStrategy(strategies, options) {\n        this.strategies = strategies;\n        this.loop = Boolean(options.loop);\n        this.failFast = Boolean(options.failFast);\n        this.timeout = options.timeout;\n        this.timeoutLimit = options.timeoutLimit;\n    }\n    SequentialStrategy.prototype.isSupported = function () {\n        return any(this.strategies, util.method('isSupported'));\n    };\n    SequentialStrategy.prototype.connect = function (minPriority, callback) {\n        var _this = this;\n        var strategies = this.strategies;\n        var current = 0;\n        var timeout = this.timeout;\n        var runner = null;\n        var tryNextStrategy = function (error, handshake) {\n            if (handshake) {\n                callback(null, handshake);\n            }\n            else {\n                current = current + 1;\n                if (_this.loop) {\n                    current = current % strategies.length;\n                }\n                if (current < strategies.length) {\n                    if (timeout) {\n                        timeout = timeout * 2;\n                        if (_this.timeoutLimit) {\n                            timeout = Math.min(timeout, _this.timeoutLimit);\n                        }\n                    }\n                    runner = _this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: _this.failFast }, tryNextStrategy);\n                }\n                else {\n                    callback(true);\n                }\n            }\n        };\n        runner = this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: this.failFast }, tryNextStrategy);\n        return {\n            abort: function () {\n                runner.abort();\n            },\n            forceMinPriority: function (p) {\n                minPriority = p;\n                if (runner) {\n                    runner.forceMinPriority(p);\n                }\n            }\n        };\n    };\n    SequentialStrategy.prototype.tryStrategy = function (strategy, minPriority, options, callback) {\n        var timer = null;\n        var runner = null;\n        if (options.timeout > 0) {\n            timer = new OneOffTimer(options.timeout, function () {\n                runner.abort();\n                callback(true);\n            });\n        }\n        runner = strategy.connect(minPriority, function (error, handshake) {\n            if (error && timer && timer.isRunning() && !options.failFast) {\n                return;\n            }\n            if (timer) {\n                timer.ensureAborted();\n            }\n            callback(error, handshake);\n        });\n        return {\n            abort: function () {\n                if (timer) {\n                    timer.ensureAborted();\n                }\n                runner.abort();\n            },\n            forceMinPriority: function (p) {\n                runner.forceMinPriority(p);\n            }\n        };\n    };\n    return SequentialStrategy;\n}());\n/* harmony default export */ var sequential_strategy = (sequential_strategy_SequentialStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/best_connected_ever_strategy.ts\n\n\nvar best_connected_ever_strategy_BestConnectedEverStrategy = (function () {\n    function BestConnectedEverStrategy(strategies) {\n        this.strategies = strategies;\n    }\n    BestConnectedEverStrategy.prototype.isSupported = function () {\n        return any(this.strategies, util.method('isSupported'));\n    };\n    BestConnectedEverStrategy.prototype.connect = function (minPriority, callback) {\n        return connect(this.strategies, minPriority, function (i, runners) {\n            return function (error, handshake) {\n                runners[i].error = error;\n                if (error) {\n                    if (allRunnersFailed(runners)) {\n                        callback(true);\n                    }\n                    return;\n                }\n                apply(runners, function (runner) {\n                    runner.forceMinPriority(handshake.transport.priority);\n                });\n                callback(null, handshake);\n            };\n        });\n    };\n    return BestConnectedEverStrategy;\n}());\n/* harmony default export */ var best_connected_ever_strategy = (best_connected_ever_strategy_BestConnectedEverStrategy);\nfunction connect(strategies, minPriority, callbackBuilder) {\n    var runners = map(strategies, function (strategy, i, _, rs) {\n        return strategy.connect(minPriority, callbackBuilder(i, rs));\n    });\n    return {\n        abort: function () {\n            apply(runners, abortRunner);\n        },\n        forceMinPriority: function (p) {\n            apply(runners, function (runner) {\n                runner.forceMinPriority(p);\n            });\n        }\n    };\n}\nfunction allRunnersFailed(runners) {\n    return collections_all(runners, function (runner) {\n        return Boolean(runner.error);\n    });\n}\nfunction abortRunner(runner) {\n    if (!runner.error && !runner.aborted) {\n        runner.abort();\n        runner.aborted = true;\n    }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/cached_strategy.ts\n\n\n\n\nvar cached_strategy_CachedStrategy = (function () {\n    function CachedStrategy(strategy, transports, options) {\n        this.strategy = strategy;\n        this.transports = transports;\n        this.ttl = options.ttl || 1800 * 1000;\n        this.usingTLS = options.useTLS;\n        this.timeline = options.timeline;\n    }\n    CachedStrategy.prototype.isSupported = function () {\n        return this.strategy.isSupported();\n    };\n    CachedStrategy.prototype.connect = function (minPriority, callback) {\n        var usingTLS = this.usingTLS;\n        var info = fetchTransportCache(usingTLS);\n        var strategies = [this.strategy];\n        if (info && info.timestamp + this.ttl >= util.now()) {\n            var transport = this.transports[info.transport];\n            if (transport) {\n                this.timeline.info({\n                    cached: true,\n                    transport: info.transport,\n                    latency: info.latency\n                });\n                strategies.push(new sequential_strategy([transport], {\n                    timeout: info.latency * 2 + 1000,\n                    failFast: true\n                }));\n            }\n        }\n        var startTimestamp = util.now();\n        var runner = strategies\n            .pop()\n            .connect(minPriority, function cb(error, handshake) {\n            if (error) {\n                flushTransportCache(usingTLS);\n                if (strategies.length > 0) {\n                    startTimestamp = util.now();\n                    runner = strategies.pop().connect(minPriority, cb);\n                }\n                else {\n                    callback(error);\n                }\n            }\n            else {\n                storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp);\n                callback(null, handshake);\n            }\n        });\n        return {\n            abort: function () {\n                runner.abort();\n            },\n            forceMinPriority: function (p) {\n                minPriority = p;\n                if (runner) {\n                    runner.forceMinPriority(p);\n                }\n            }\n        };\n    };\n    return CachedStrategy;\n}());\n/* harmony default export */ var cached_strategy = (cached_strategy_CachedStrategy);\nfunction getTransportCacheKey(usingTLS) {\n    return 'pusherTransport' + (usingTLS ? 'TLS' : 'NonTLS');\n}\nfunction fetchTransportCache(usingTLS) {\n    var storage = runtime.getLocalStorage();\n    if (storage) {\n        try {\n            var serializedCache = storage[getTransportCacheKey(usingTLS)];\n            if (serializedCache) {\n                return JSON.parse(serializedCache);\n            }\n        }\n        catch (e) {\n            flushTransportCache(usingTLS);\n        }\n    }\n    return null;\n}\nfunction storeTransportCache(usingTLS, transport, latency) {\n    var storage = runtime.getLocalStorage();\n    if (storage) {\n        try {\n            storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({\n                timestamp: util.now(),\n                transport: transport,\n                latency: latency\n            });\n        }\n        catch (e) {\n        }\n    }\n}\nfunction flushTransportCache(usingTLS) {\n    var storage = runtime.getLocalStorage();\n    if (storage) {\n        try {\n            delete storage[getTransportCacheKey(usingTLS)];\n        }\n        catch (e) {\n        }\n    }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/delayed_strategy.ts\n\nvar delayed_strategy_DelayedStrategy = (function () {\n    function DelayedStrategy(strategy, _a) {\n        var number = _a.delay;\n        this.strategy = strategy;\n        this.options = { delay: number };\n    }\n    DelayedStrategy.prototype.isSupported = function () {\n        return this.strategy.isSupported();\n    };\n    DelayedStrategy.prototype.connect = function (minPriority, callback) {\n        var strategy = this.strategy;\n        var runner;\n        var timer = new OneOffTimer(this.options.delay, function () {\n            runner = strategy.connect(minPriority, callback);\n        });\n        return {\n            abort: function () {\n                timer.ensureAborted();\n                if (runner) {\n                    runner.abort();\n                }\n            },\n            forceMinPriority: function (p) {\n                minPriority = p;\n                if (runner) {\n                    runner.forceMinPriority(p);\n                }\n            }\n        };\n    };\n    return DelayedStrategy;\n}());\n/* harmony default export */ var delayed_strategy = (delayed_strategy_DelayedStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/if_strategy.ts\nvar IfStrategy = (function () {\n    function IfStrategy(test, trueBranch, falseBranch) {\n        this.test = test;\n        this.trueBranch = trueBranch;\n        this.falseBranch = falseBranch;\n    }\n    IfStrategy.prototype.isSupported = function () {\n        var branch = this.test() ? this.trueBranch : this.falseBranch;\n        return branch.isSupported();\n    };\n    IfStrategy.prototype.connect = function (minPriority, callback) {\n        var branch = this.test() ? this.trueBranch : this.falseBranch;\n        return branch.connect(minPriority, callback);\n    };\n    return IfStrategy;\n}());\n/* harmony default export */ var if_strategy = (IfStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/first_connected_strategy.ts\nvar FirstConnectedStrategy = (function () {\n    function FirstConnectedStrategy(strategy) {\n        this.strategy = strategy;\n    }\n    FirstConnectedStrategy.prototype.isSupported = function () {\n        return this.strategy.isSupported();\n    };\n    FirstConnectedStrategy.prototype.connect = function (minPriority, callback) {\n        var runner = this.strategy.connect(minPriority, function (error, handshake) {\n            if (handshake) {\n                runner.abort();\n            }\n            callback(error, handshake);\n        });\n        return runner;\n    };\n    return FirstConnectedStrategy;\n}());\n/* harmony default export */ var first_connected_strategy = (FirstConnectedStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/default_strategy.ts\n\n\n\n\n\n\n\nfunction testSupportsStrategy(strategy) {\n    return function () {\n        return strategy.isSupported();\n    };\n}\nvar getDefaultStrategy = function (config, baseOptions, defineTransport) {\n    var definedTransports = {};\n    function defineTransportStrategy(name, type, priority, options, manager) {\n        var transport = defineTransport(config, name, type, priority, options, manager);\n        definedTransports[name] = transport;\n        return transport;\n    }\n    var ws_options = Object.assign({}, baseOptions, {\n        hostNonTLS: config.wsHost + ':' + config.wsPort,\n        hostTLS: config.wsHost + ':' + config.wssPort,\n        httpPath: config.wsPath\n    });\n    var wss_options = Object.assign({}, ws_options, {\n        useTLS: true\n    });\n    var sockjs_options = Object.assign({}, baseOptions, {\n        hostNonTLS: config.httpHost + ':' + config.httpPort,\n        hostTLS: config.httpHost + ':' + config.httpsPort,\n        httpPath: config.httpPath\n    });\n    var timeouts = {\n        loop: true,\n        timeout: 15000,\n        timeoutLimit: 60000\n    };\n    var ws_manager = new transport_manager({\n        lives: 2,\n        minPingDelay: 10000,\n        maxPingDelay: config.activityTimeout\n    });\n    var streaming_manager = new transport_manager({\n        lives: 2,\n        minPingDelay: 10000,\n        maxPingDelay: config.activityTimeout\n    });\n    var ws_transport = defineTransportStrategy('ws', 'ws', 3, ws_options, ws_manager);\n    var wss_transport = defineTransportStrategy('wss', 'ws', 3, wss_options, ws_manager);\n    var sockjs_transport = defineTransportStrategy('sockjs', 'sockjs', 1, sockjs_options);\n    var xhr_streaming_transport = defineTransportStrategy('xhr_streaming', 'xhr_streaming', 1, sockjs_options, streaming_manager);\n    var xdr_streaming_transport = defineTransportStrategy('xdr_streaming', 'xdr_streaming', 1, sockjs_options, streaming_manager);\n    var xhr_polling_transport = defineTransportStrategy('xhr_polling', 'xhr_polling', 1, sockjs_options);\n    var xdr_polling_transport = defineTransportStrategy('xdr_polling', 'xdr_polling', 1, sockjs_options);\n    var ws_loop = new sequential_strategy([ws_transport], timeouts);\n    var wss_loop = new sequential_strategy([wss_transport], timeouts);\n    var sockjs_loop = new sequential_strategy([sockjs_transport], timeouts);\n    var streaming_loop = new sequential_strategy([\n        new if_strategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport)\n    ], timeouts);\n    var polling_loop = new sequential_strategy([\n        new if_strategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport)\n    ], timeouts);\n    var http_loop = new sequential_strategy([\n        new if_strategy(testSupportsStrategy(streaming_loop), new best_connected_ever_strategy([\n            streaming_loop,\n            new delayed_strategy(polling_loop, { delay: 4000 })\n        ]), polling_loop)\n    ], timeouts);\n    var http_fallback_loop = new if_strategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);\n    var wsStrategy;\n    if (baseOptions.useTLS) {\n        wsStrategy = new best_connected_ever_strategy([\n            ws_loop,\n            new delayed_strategy(http_fallback_loop, { delay: 2000 })\n        ]);\n    }\n    else {\n        wsStrategy = new best_connected_ever_strategy([\n            ws_loop,\n            new delayed_strategy(wss_loop, { delay: 2000 }),\n            new delayed_strategy(http_fallback_loop, { delay: 5000 })\n        ]);\n    }\n    return new cached_strategy(new first_connected_strategy(new if_strategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {\n        ttl: 1800000,\n        timeline: baseOptions.timeline,\n        useTLS: baseOptions.useTLS\n    });\n};\n/* harmony default export */ var default_strategy = (getDefaultStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transport_connection_initializer.ts\n\n/* harmony default export */ var transport_connection_initializer = (function () {\n    var self = this;\n    self.timeline.info(self.buildTimelineMessage({\n        transport: self.name + (self.options.useTLS ? 's' : '')\n    }));\n    if (self.hooks.isInitialized()) {\n        self.changeState('initialized');\n    }\n    else if (self.hooks.file) {\n        self.changeState('initializing');\n        Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function (error, callback) {\n            if (self.hooks.isInitialized()) {\n                self.changeState('initialized');\n                callback(true);\n            }\n            else {\n                if (error) {\n                    self.onError(error);\n                }\n                self.onClose();\n                callback(false);\n            }\n        });\n    }\n    else {\n        self.onClose();\n    }\n});\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http_xdomain_request.ts\n\nvar http_xdomain_request_hooks = {\n    getRequest: function (socket) {\n        var xdr = new window.XDomainRequest();\n        xdr.ontimeout = function () {\n            socket.emit('error', new RequestTimedOut());\n            socket.close();\n        };\n        xdr.onerror = function (e) {\n            socket.emit('error', e);\n            socket.close();\n        };\n        xdr.onprogress = function () {\n            if (xdr.responseText && xdr.responseText.length > 0) {\n                socket.onChunk(200, xdr.responseText);\n            }\n        };\n        xdr.onload = function () {\n            if (xdr.responseText && xdr.responseText.length > 0) {\n                socket.onChunk(200, xdr.responseText);\n            }\n            socket.emit('finished', 200);\n            socket.close();\n        };\n        return xdr;\n    },\n    abortRequest: function (xdr) {\n        xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;\n        xdr.abort();\n    }\n};\n/* harmony default export */ var http_xdomain_request = (http_xdomain_request_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_request.ts\nvar http_request_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\nvar MAX_BUFFER_LENGTH = 256 * 1024;\nvar http_request_HTTPRequest = (function (_super) {\n    http_request_extends(HTTPRequest, _super);\n    function HTTPRequest(hooks, method, url) {\n        var _this = _super.call(this) || this;\n        _this.hooks = hooks;\n        _this.method = method;\n        _this.url = url;\n        return _this;\n    }\n    HTTPRequest.prototype.start = function (payload) {\n        var _this = this;\n        this.position = 0;\n        this.xhr = this.hooks.getRequest(this);\n        this.unloader = function () {\n            _this.close();\n        };\n        runtime.addUnloadListener(this.unloader);\n        this.xhr.open(this.method, this.url, true);\n        if (this.xhr.setRequestHeader) {\n            this.xhr.setRequestHeader('Content-Type', 'application/json');\n        }\n        this.xhr.send(payload);\n    };\n    HTTPRequest.prototype.close = function () {\n        if (this.unloader) {\n            runtime.removeUnloadListener(this.unloader);\n            this.unloader = null;\n        }\n        if (this.xhr) {\n            this.hooks.abortRequest(this.xhr);\n            this.xhr = null;\n        }\n    };\n    HTTPRequest.prototype.onChunk = function (status, data) {\n        while (true) {\n            var chunk = this.advanceBuffer(data);\n            if (chunk) {\n                this.emit('chunk', { status: status, data: chunk });\n            }\n            else {\n                break;\n            }\n        }\n        if (this.isBufferTooLong(data)) {\n            this.emit('buffer_too_long');\n        }\n    };\n    HTTPRequest.prototype.advanceBuffer = function (buffer) {\n        var unreadData = buffer.slice(this.position);\n        var endOfLinePosition = unreadData.indexOf('\\n');\n        if (endOfLinePosition !== -1) {\n            this.position += endOfLinePosition + 1;\n            return unreadData.slice(0, endOfLinePosition);\n        }\n        else {\n            return null;\n        }\n    };\n    HTTPRequest.prototype.isBufferTooLong = function (buffer) {\n        return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;\n    };\n    return HTTPRequest;\n}(dispatcher));\n/* harmony default export */ var http_request = (http_request_HTTPRequest);\n\n// CONCATENATED MODULE: ./src/core/http/state.ts\nvar State;\n(function (State) {\n    State[State[\"CONNECTING\"] = 0] = \"CONNECTING\";\n    State[State[\"OPEN\"] = 1] = \"OPEN\";\n    State[State[\"CLOSED\"] = 3] = \"CLOSED\";\n})(State || (State = {}));\n/* harmony default export */ var state = (State);\n\n// CONCATENATED MODULE: ./src/core/http/http_socket.ts\n\n\n\nvar autoIncrement = 1;\nvar http_socket_HTTPSocket = (function () {\n    function HTTPSocket(hooks, url) {\n        this.hooks = hooks;\n        this.session = randomNumber(1000) + '/' + randomString(8);\n        this.location = getLocation(url);\n        this.readyState = state.CONNECTING;\n        this.openStream();\n    }\n    HTTPSocket.prototype.send = function (payload) {\n        return this.sendRaw(JSON.stringify([payload]));\n    };\n    HTTPSocket.prototype.ping = function () {\n        this.hooks.sendHeartbeat(this);\n    };\n    HTTPSocket.prototype.close = function (code, reason) {\n        this.onClose(code, reason, true);\n    };\n    HTTPSocket.prototype.sendRaw = function (payload) {\n        if (this.readyState === state.OPEN) {\n            try {\n                runtime.createSocketRequest('POST', getUniqueURL(getSendURL(this.location, this.session))).start(payload);\n                return true;\n            }\n            catch (e) {\n                return false;\n            }\n        }\n        else {\n            return false;\n        }\n    };\n    HTTPSocket.prototype.reconnect = function () {\n        this.closeStream();\n        this.openStream();\n    };\n    HTTPSocket.prototype.onClose = function (code, reason, wasClean) {\n        this.closeStream();\n        this.readyState = state.CLOSED;\n        if (this.onclose) {\n            this.onclose({\n                code: code,\n                reason: reason,\n                wasClean: wasClean\n            });\n        }\n    };\n    HTTPSocket.prototype.onChunk = function (chunk) {\n        if (chunk.status !== 200) {\n            return;\n        }\n        if (this.readyState === state.OPEN) {\n            this.onActivity();\n        }\n        var payload;\n        var type = chunk.data.slice(0, 1);\n        switch (type) {\n            case 'o':\n                payload = JSON.parse(chunk.data.slice(1) || '{}');\n                this.onOpen(payload);\n                break;\n            case 'a':\n                payload = JSON.parse(chunk.data.slice(1) || '[]');\n                for (var i = 0; i < payload.length; i++) {\n                    this.onEvent(payload[i]);\n                }\n                break;\n            case 'm':\n                payload = JSON.parse(chunk.data.slice(1) || 'null');\n                this.onEvent(payload);\n                break;\n            case 'h':\n                this.hooks.onHeartbeat(this);\n                break;\n            case 'c':\n                payload = JSON.parse(chunk.data.slice(1) || '[]');\n                this.onClose(payload[0], payload[1], true);\n                break;\n        }\n    };\n    HTTPSocket.prototype.onOpen = function (options) {\n        if (this.readyState === state.CONNECTING) {\n            if (options && options.hostname) {\n                this.location.base = replaceHost(this.location.base, options.hostname);\n            }\n            this.readyState = state.OPEN;\n            if (this.onopen) {\n                this.onopen();\n            }\n        }\n        else {\n            this.onClose(1006, 'Server lost session', true);\n        }\n    };\n    HTTPSocket.prototype.onEvent = function (event) {\n        if (this.readyState === state.OPEN && this.onmessage) {\n            this.onmessage({ data: event });\n        }\n    };\n    HTTPSocket.prototype.onActivity = function () {\n        if (this.onactivity) {\n            this.onactivity();\n        }\n    };\n    HTTPSocket.prototype.onError = function (error) {\n        if (this.onerror) {\n            this.onerror(error);\n        }\n    };\n    HTTPSocket.prototype.openStream = function () {\n        var _this = this;\n        this.stream = runtime.createSocketRequest('POST', getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));\n        this.stream.bind('chunk', function (chunk) {\n            _this.onChunk(chunk);\n        });\n        this.stream.bind('finished', function (status) {\n            _this.hooks.onFinished(_this, status);\n        });\n        this.stream.bind('buffer_too_long', function () {\n            _this.reconnect();\n        });\n        try {\n            this.stream.start();\n        }\n        catch (error) {\n            util.defer(function () {\n                _this.onError(error);\n                _this.onClose(1006, 'Could not start streaming', false);\n            });\n        }\n    };\n    HTTPSocket.prototype.closeStream = function () {\n        if (this.stream) {\n            this.stream.unbind_all();\n            this.stream.close();\n            this.stream = null;\n        }\n    };\n    return HTTPSocket;\n}());\nfunction getLocation(url) {\n    var parts = /([^\\?]*)\\/*(\\??.*)/.exec(url);\n    return {\n        base: parts[1],\n        queryString: parts[2]\n    };\n}\nfunction getSendURL(url, session) {\n    return url.base + '/' + session + '/xhr_send';\n}\nfunction getUniqueURL(url) {\n    var separator = url.indexOf('?') === -1 ? '?' : '&';\n    return url + separator + 't=' + +new Date() + '&n=' + autoIncrement++;\n}\nfunction replaceHost(url, hostname) {\n    var urlParts = /(https?:\\/\\/)([^\\/:]+)((\\/|:)?.*)/.exec(url);\n    return urlParts[1] + hostname + urlParts[3];\n}\nfunction randomNumber(max) {\n    return runtime.randomInt(max);\n}\nfunction randomString(length) {\n    var result = [];\n    for (var i = 0; i < length; i++) {\n        result.push(randomNumber(32).toString(32));\n    }\n    return result.join('');\n}\n/* harmony default export */ var http_socket = (http_socket_HTTPSocket);\n\n// CONCATENATED MODULE: ./src/core/http/http_streaming_socket.ts\nvar http_streaming_socket_hooks = {\n    getReceiveURL: function (url, session) {\n        return url.base + '/' + session + '/xhr_streaming' + url.queryString;\n    },\n    onHeartbeat: function (socket) {\n        socket.sendRaw('[]');\n    },\n    sendHeartbeat: function (socket) {\n        socket.sendRaw('[]');\n    },\n    onFinished: function (socket, status) {\n        socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n    }\n};\n/* harmony default export */ var http_streaming_socket = (http_streaming_socket_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_polling_socket.ts\nvar http_polling_socket_hooks = {\n    getReceiveURL: function (url, session) {\n        return url.base + '/' + session + '/xhr' + url.queryString;\n    },\n    onHeartbeat: function () {\n    },\n    sendHeartbeat: function (socket) {\n        socket.sendRaw('[]');\n    },\n    onFinished: function (socket, status) {\n        if (status === 200) {\n            socket.reconnect();\n        }\n        else {\n            socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n        }\n    }\n};\n/* harmony default export */ var http_polling_socket = (http_polling_socket_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http_xhr_request.ts\n\nvar http_xhr_request_hooks = {\n    getRequest: function (socket) {\n        var Constructor = runtime.getXHRAPI();\n        var xhr = new Constructor();\n        xhr.onreadystatechange = xhr.onprogress = function () {\n            switch (xhr.readyState) {\n                case 3:\n                    if (xhr.responseText && xhr.responseText.length > 0) {\n                        socket.onChunk(xhr.status, xhr.responseText);\n                    }\n                    break;\n                case 4:\n                    if (xhr.responseText && xhr.responseText.length > 0) {\n                        socket.onChunk(xhr.status, xhr.responseText);\n                    }\n                    socket.emit('finished', xhr.status);\n                    socket.close();\n                    break;\n            }\n        };\n        return xhr;\n    },\n    abortRequest: function (xhr) {\n        xhr.onreadystatechange = null;\n        xhr.abort();\n    }\n};\n/* harmony default export */ var http_xhr_request = (http_xhr_request_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http.ts\n\n\n\n\n\nvar HTTP = {\n    createStreamingSocket: function (url) {\n        return this.createSocket(http_streaming_socket, url);\n    },\n    createPollingSocket: function (url) {\n        return this.createSocket(http_polling_socket, url);\n    },\n    createSocket: function (hooks, url) {\n        return new http_socket(hooks, url);\n    },\n    createXHR: function (method, url) {\n        return this.createRequest(http_xhr_request, method, url);\n    },\n    createRequest: function (hooks, method, url) {\n        return new http_request(hooks, method, url);\n    }\n};\n/* harmony default export */ var http_http = (HTTP);\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http.ts\n\n\nhttp_http.createXDR = function (method, url) {\n    return this.createRequest(http_xdomain_request, method, url);\n};\n/* harmony default export */ var web_http_http = (http_http);\n\n// CONCATENATED MODULE: ./src/runtimes/web/runtime.ts\n\n\n\n\n\n\n\n\n\n\n\n\nvar Runtime = {\n    nextAuthCallbackID: 1,\n    auth_callbacks: {},\n    ScriptReceivers: ScriptReceivers,\n    DependenciesReceivers: DependenciesReceivers,\n    getDefaultStrategy: default_strategy,\n    Transports: transports_transports,\n    transportConnectionInitializer: transport_connection_initializer,\n    HTTPFactory: web_http_http,\n    TimelineTransport: jsonp_timeline,\n    getXHRAPI: function () {\n        return window.XMLHttpRequest;\n    },\n    getWebSocketAPI: function () {\n        return window.WebSocket || window.MozWebSocket;\n    },\n    setup: function (PusherClass) {\n        var _this = this;\n        window.Pusher = PusherClass;\n        var initializeOnDocumentBody = function () {\n            _this.onDocumentBody(PusherClass.ready);\n        };\n        if (!window.JSON) {\n            Dependencies.load('json2', {}, initializeOnDocumentBody);\n        }\n        else {\n            initializeOnDocumentBody();\n        }\n    },\n    getDocument: function () {\n        return document;\n    },\n    getProtocol: function () {\n        return this.getDocument().location.protocol;\n    },\n    getAuthorizers: function () {\n        return { ajax: xhr_auth, jsonp: jsonp_auth };\n    },\n    onDocumentBody: function (callback) {\n        var _this = this;\n        if (document.body) {\n            callback();\n        }\n        else {\n            setTimeout(function () {\n                _this.onDocumentBody(callback);\n            }, 0);\n        }\n    },\n    createJSONPRequest: function (url, data) {\n        return new jsonp_request(url, data);\n    },\n    createScriptRequest: function (src) {\n        return new script_request(src);\n    },\n    getLocalStorage: function () {\n        try {\n            return window.localStorage;\n        }\n        catch (e) {\n            return undefined;\n        }\n    },\n    createXHR: function () {\n        if (this.getXHRAPI()) {\n            return this.createXMLHttpRequest();\n        }\n        else {\n            return this.createMicrosoftXHR();\n        }\n    },\n    createXMLHttpRequest: function () {\n        var Constructor = this.getXHRAPI();\n        return new Constructor();\n    },\n    createMicrosoftXHR: function () {\n        return new ActiveXObject('Microsoft.XMLHTTP');\n    },\n    getNetwork: function () {\n        return net_info_Network;\n    },\n    createWebSocket: function (url) {\n        var Constructor = this.getWebSocketAPI();\n        return new Constructor(url);\n    },\n    createSocketRequest: function (method, url) {\n        if (this.isXHRSupported()) {\n            return this.HTTPFactory.createXHR(method, url);\n        }\n        else if (this.isXDRSupported(url.indexOf('https:') === 0)) {\n            return this.HTTPFactory.createXDR(method, url);\n        }\n        else {\n            throw 'Cross-origin HTTP requests are not supported';\n        }\n    },\n    isXHRSupported: function () {\n        var Constructor = this.getXHRAPI();\n        return (Boolean(Constructor) && new Constructor().withCredentials !== undefined);\n    },\n    isXDRSupported: function (useTLS) {\n        var protocol = useTLS ? 'https:' : 'http:';\n        var documentProtocol = this.getProtocol();\n        return (Boolean(window['XDomainRequest']) && documentProtocol === protocol);\n    },\n    addUnloadListener: function (listener) {\n        if (window.addEventListener !== undefined) {\n            window.addEventListener('unload', listener, false);\n        }\n        else if (window.attachEvent !== undefined) {\n            window.attachEvent('onunload', listener);\n        }\n    },\n    removeUnloadListener: function (listener) {\n        if (window.addEventListener !== undefined) {\n            window.removeEventListener('unload', listener, false);\n        }\n        else if (window.detachEvent !== undefined) {\n            window.detachEvent('onunload', listener);\n        }\n    },\n    randomInt: function (max) {\n        var random = function () {\n            var crypto = window.crypto || window['msCrypto'];\n            var random = crypto.getRandomValues(new Uint32Array(1))[0];\n            return random / Math.pow(2, 32);\n        };\n        return Math.floor(random() * max);\n    }\n};\n/* harmony default export */ var runtime = (Runtime);\n\n// CONCATENATED MODULE: ./src/core/timeline/level.ts\nvar TimelineLevel;\n(function (TimelineLevel) {\n    TimelineLevel[TimelineLevel[\"ERROR\"] = 3] = \"ERROR\";\n    TimelineLevel[TimelineLevel[\"INFO\"] = 6] = \"INFO\";\n    TimelineLevel[TimelineLevel[\"DEBUG\"] = 7] = \"DEBUG\";\n})(TimelineLevel || (TimelineLevel = {}));\n/* harmony default export */ var timeline_level = (TimelineLevel);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline.ts\n\n\n\nvar timeline_Timeline = (function () {\n    function Timeline(key, session, options) {\n        this.key = key;\n        this.session = session;\n        this.events = [];\n        this.options = options || {};\n        this.sent = 0;\n        this.uniqueID = 0;\n    }\n    Timeline.prototype.log = function (level, event) {\n        if (level <= this.options.level) {\n            this.events.push(extend({}, event, { timestamp: util.now() }));\n            if (this.options.limit && this.events.length > this.options.limit) {\n                this.events.shift();\n            }\n        }\n    };\n    Timeline.prototype.error = function (event) {\n        this.log(timeline_level.ERROR, event);\n    };\n    Timeline.prototype.info = function (event) {\n        this.log(timeline_level.INFO, event);\n    };\n    Timeline.prototype.debug = function (event) {\n        this.log(timeline_level.DEBUG, event);\n    };\n    Timeline.prototype.isEmpty = function () {\n        return this.events.length === 0;\n    };\n    Timeline.prototype.send = function (sendfn, callback) {\n        var _this = this;\n        var data = extend({\n            session: this.session,\n            bundle: this.sent + 1,\n            key: this.key,\n            lib: 'js',\n            version: this.options.version,\n            cluster: this.options.cluster,\n            features: this.options.features,\n            timeline: this.events\n        }, this.options.params);\n        this.events = [];\n        sendfn(data, function (error, result) {\n            if (!error) {\n                _this.sent++;\n            }\n            if (callback) {\n                callback(error, result);\n            }\n        });\n        return true;\n    };\n    Timeline.prototype.generateUniqueID = function () {\n        this.uniqueID++;\n        return this.uniqueID;\n    };\n    return Timeline;\n}());\n/* harmony default export */ var timeline_timeline = (timeline_Timeline);\n\n// CONCATENATED MODULE: ./src/core/strategies/transport_strategy.ts\n\n\n\n\nvar transport_strategy_TransportStrategy = (function () {\n    function TransportStrategy(name, priority, transport, options) {\n        this.name = name;\n        this.priority = priority;\n        this.transport = transport;\n        this.options = options || {};\n    }\n    TransportStrategy.prototype.isSupported = function () {\n        return this.transport.isSupported({\n            useTLS: this.options.useTLS\n        });\n    };\n    TransportStrategy.prototype.connect = function (minPriority, callback) {\n        var _this = this;\n        if (!this.isSupported()) {\n            return failAttempt(new UnsupportedStrategy(), callback);\n        }\n        else if (this.priority < minPriority) {\n            return failAttempt(new TransportPriorityTooLow(), callback);\n        }\n        var connected = false;\n        var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);\n        var handshake = null;\n        var onInitialized = function () {\n            transport.unbind('initialized', onInitialized);\n            transport.connect();\n        };\n        var onOpen = function () {\n            handshake = factory.createHandshake(transport, function (result) {\n                connected = true;\n                unbindListeners();\n                callback(null, result);\n            });\n        };\n        var onError = function (error) {\n            unbindListeners();\n            callback(error);\n        };\n        var onClosed = function () {\n            unbindListeners();\n            var serializedTransport;\n            serializedTransport = safeJSONStringify(transport);\n            callback(new TransportClosed(serializedTransport));\n        };\n        var unbindListeners = function () {\n            transport.unbind('initialized', onInitialized);\n            transport.unbind('open', onOpen);\n            transport.unbind('error', onError);\n            transport.unbind('closed', onClosed);\n        };\n        transport.bind('initialized', onInitialized);\n        transport.bind('open', onOpen);\n        transport.bind('error', onError);\n        transport.bind('closed', onClosed);\n        transport.initialize();\n        return {\n            abort: function () {\n                if (connected) {\n                    return;\n                }\n                unbindListeners();\n                if (handshake) {\n                    handshake.close();\n                }\n                else {\n                    transport.close();\n                }\n            },\n            forceMinPriority: function (p) {\n                if (connected) {\n                    return;\n                }\n                if (_this.priority < p) {\n                    if (handshake) {\n                        handshake.close();\n                    }\n                    else {\n                        transport.close();\n                    }\n                }\n            }\n        };\n    };\n    return TransportStrategy;\n}());\n/* harmony default export */ var transport_strategy = (transport_strategy_TransportStrategy);\nfunction failAttempt(error, callback) {\n    util.defer(function () {\n        callback(error);\n    });\n    return {\n        abort: function () { },\n        forceMinPriority: function () { }\n    };\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/strategy_builder.ts\n\n\n\n\n\nvar strategy_builder_Transports = runtime.Transports;\nvar strategy_builder_defineTransport = function (config, name, type, priority, options, manager) {\n    var transportClass = strategy_builder_Transports[type];\n    if (!transportClass) {\n        throw new UnsupportedTransport(type);\n    }\n    var enabled = (!config.enabledTransports ||\n        arrayIndexOf(config.enabledTransports, name) !== -1) &&\n        (!config.disabledTransports ||\n            arrayIndexOf(config.disabledTransports, name) === -1);\n    var transport;\n    if (enabled) {\n        options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);\n        transport = new transport_strategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);\n    }\n    else {\n        transport = strategy_builder_UnsupportedStrategy;\n    }\n    return transport;\n};\nvar strategy_builder_UnsupportedStrategy = {\n    isSupported: function () {\n        return false;\n    },\n    connect: function (_, callback) {\n        var deferred = util.defer(function () {\n            callback(new UnsupportedStrategy());\n        });\n        return {\n            abort: function () {\n                deferred.ensureAborted();\n            },\n            forceMinPriority: function () { }\n        };\n    }\n};\n\n// CONCATENATED MODULE: ./src/core/options.ts\n\nfunction validateOptions(options) {\n    if (options == null) {\n        throw 'You must pass an options object';\n    }\n    if (options.cluster == null) {\n        throw 'Options object must provide a cluster';\n    }\n    if ('disableStats' in options) {\n        logger.warn('The disableStats option is deprecated in favor of enableStats');\n    }\n}\n\n// CONCATENATED MODULE: ./src/core/auth/user_authenticator.ts\n\n\nvar composeChannelQuery = function (params, authOptions) {\n    var query = 'socket_id=' + encodeURIComponent(params.socketId);\n    for (var key in authOptions.params) {\n        query +=\n            '&' +\n                encodeURIComponent(key) +\n                '=' +\n                encodeURIComponent(authOptions.params[key]);\n    }\n    if (authOptions.paramsProvider != null) {\n        var dynamicParams = authOptions.paramsProvider();\n        for (var key in dynamicParams) {\n            query +=\n                '&' +\n                    encodeURIComponent(key) +\n                    '=' +\n                    encodeURIComponent(dynamicParams[key]);\n        }\n    }\n    return query;\n};\nvar UserAuthenticator = function (authOptions) {\n    if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n        throw \"'\" + authOptions.transport + \"' is not a recognized auth transport\";\n    }\n    return function (params, callback) {\n        var query = composeChannelQuery(params, authOptions);\n        runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.UserAuthentication, callback);\n    };\n};\n/* harmony default export */ var user_authenticator = (UserAuthenticator);\n\n// CONCATENATED MODULE: ./src/core/auth/channel_authorizer.ts\n\n\nvar channel_authorizer_composeChannelQuery = function (params, authOptions) {\n    var query = 'socket_id=' + encodeURIComponent(params.socketId);\n    query += '&channel_name=' + encodeURIComponent(params.channelName);\n    for (var key in authOptions.params) {\n        query +=\n            '&' +\n                encodeURIComponent(key) +\n                '=' +\n                encodeURIComponent(authOptions.params[key]);\n    }\n    if (authOptions.paramsProvider != null) {\n        var dynamicParams = authOptions.paramsProvider();\n        for (var key in dynamicParams) {\n            query +=\n                '&' +\n                    encodeURIComponent(key) +\n                    '=' +\n                    encodeURIComponent(dynamicParams[key]);\n        }\n    }\n    return query;\n};\nvar ChannelAuthorizer = function (authOptions) {\n    if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n        throw \"'\" + authOptions.transport + \"' is not a recognized auth transport\";\n    }\n    return function (params, callback) {\n        var query = channel_authorizer_composeChannelQuery(params, authOptions);\n        runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.ChannelAuthorization, callback);\n    };\n};\n/* harmony default export */ var channel_authorizer = (ChannelAuthorizer);\n\n// CONCATENATED MODULE: ./src/core/auth/deprecated_channel_authorizer.ts\nvar ChannelAuthorizerProxy = function (pusher, authOptions, channelAuthorizerGenerator) {\n    var deprecatedAuthorizerOptions = {\n        authTransport: authOptions.transport,\n        authEndpoint: authOptions.endpoint,\n        auth: {\n            params: authOptions.params,\n            headers: authOptions.headers\n        }\n    };\n    return function (params, callback) {\n        var channel = pusher.channel(params.channelName);\n        var channelAuthorizer = channelAuthorizerGenerator(channel, deprecatedAuthorizerOptions);\n        channelAuthorizer.authorize(params.socketId, callback);\n    };\n};\n\n// CONCATENATED MODULE: ./src/core/config.ts\nvar __assign = (undefined && undefined.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\n\n\n\n\n\nfunction getConfig(opts, pusher) {\n    var config = {\n        activityTimeout: opts.activityTimeout || defaults.activityTimeout,\n        cluster: opts.cluster,\n        httpPath: opts.httpPath || defaults.httpPath,\n        httpPort: opts.httpPort || defaults.httpPort,\n        httpsPort: opts.httpsPort || defaults.httpsPort,\n        pongTimeout: opts.pongTimeout || defaults.pongTimeout,\n        statsHost: opts.statsHost || defaults.stats_host,\n        unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,\n        wsPath: opts.wsPath || defaults.wsPath,\n        wsPort: opts.wsPort || defaults.wsPort,\n        wssPort: opts.wssPort || defaults.wssPort,\n        enableStats: getEnableStatsConfig(opts),\n        httpHost: getHttpHost(opts),\n        useTLS: shouldUseTLS(opts),\n        wsHost: getWebsocketHost(opts),\n        userAuthenticator: buildUserAuthenticator(opts),\n        channelAuthorizer: buildChannelAuthorizer(opts, pusher)\n    };\n    if ('disabledTransports' in opts)\n        config.disabledTransports = opts.disabledTransports;\n    if ('enabledTransports' in opts)\n        config.enabledTransports = opts.enabledTransports;\n    if ('ignoreNullOrigin' in opts)\n        config.ignoreNullOrigin = opts.ignoreNullOrigin;\n    if ('timelineParams' in opts)\n        config.timelineParams = opts.timelineParams;\n    if ('nacl' in opts) {\n        config.nacl = opts.nacl;\n    }\n    return config;\n}\nfunction getHttpHost(opts) {\n    if (opts.httpHost) {\n        return opts.httpHost;\n    }\n    if (opts.cluster) {\n        return \"sockjs-\" + opts.cluster + \".pusher.com\";\n    }\n    return defaults.httpHost;\n}\nfunction getWebsocketHost(opts) {\n    if (opts.wsHost) {\n        return opts.wsHost;\n    }\n    return getWebsocketHostFromCluster(opts.cluster);\n}\nfunction getWebsocketHostFromCluster(cluster) {\n    return \"ws-\" + cluster + \".pusher.com\";\n}\nfunction shouldUseTLS(opts) {\n    if (runtime.getProtocol() === 'https:') {\n        return true;\n    }\n    else if (opts.forceTLS === false) {\n        return false;\n    }\n    return true;\n}\nfunction getEnableStatsConfig(opts) {\n    if ('enableStats' in opts) {\n        return opts.enableStats;\n    }\n    if ('disableStats' in opts) {\n        return !opts.disableStats;\n    }\n    return false;\n}\nfunction buildUserAuthenticator(opts) {\n    var userAuthentication = __assign(__assign({}, defaults.userAuthentication), opts.userAuthentication);\n    if ('customHandler' in userAuthentication &&\n        userAuthentication['customHandler'] != null) {\n        return userAuthentication['customHandler'];\n    }\n    return user_authenticator(userAuthentication);\n}\nfunction buildChannelAuth(opts, pusher) {\n    var channelAuthorization;\n    if ('channelAuthorization' in opts) {\n        channelAuthorization = __assign(__assign({}, defaults.channelAuthorization), opts.channelAuthorization);\n    }\n    else {\n        channelAuthorization = {\n            transport: opts.authTransport || defaults.authTransport,\n            endpoint: opts.authEndpoint || defaults.authEndpoint\n        };\n        if ('auth' in opts) {\n            if ('params' in opts.auth)\n                channelAuthorization.params = opts.auth.params;\n            if ('headers' in opts.auth)\n                channelAuthorization.headers = opts.auth.headers;\n        }\n        if ('authorizer' in opts)\n            channelAuthorization.customHandler = ChannelAuthorizerProxy(pusher, channelAuthorization, opts.authorizer);\n    }\n    return channelAuthorization;\n}\nfunction buildChannelAuthorizer(opts, pusher) {\n    var channelAuthorization = buildChannelAuth(opts, pusher);\n    if ('customHandler' in channelAuthorization &&\n        channelAuthorization['customHandler'] != null) {\n        return channelAuthorization['customHandler'];\n    }\n    return channel_authorizer(channelAuthorization);\n}\n\n// CONCATENATED MODULE: ./src/core/watchlist.ts\nvar watchlist_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\nvar watchlist_WatchlistFacade = (function (_super) {\n    watchlist_extends(WatchlistFacade, _super);\n    function WatchlistFacade(pusher) {\n        var _this = _super.call(this, function (eventName, data) {\n            logger.debug(\"No callbacks on watchlist events for \" + eventName);\n        }) || this;\n        _this.pusher = pusher;\n        _this.bindWatchlistInternalEvent();\n        return _this;\n    }\n    WatchlistFacade.prototype.handleEvent = function (pusherEvent) {\n        var _this = this;\n        pusherEvent.data.events.forEach(function (watchlistEvent) {\n            _this.emit(watchlistEvent.name, watchlistEvent);\n        });\n    };\n    WatchlistFacade.prototype.bindWatchlistInternalEvent = function () {\n        var _this = this;\n        this.pusher.connection.bind('message', function (pusherEvent) {\n            var eventName = pusherEvent.event;\n            if (eventName === 'pusher_internal:watchlist_events') {\n                _this.handleEvent(pusherEvent);\n            }\n        });\n    };\n    return WatchlistFacade;\n}(dispatcher));\n/* harmony default export */ var watchlist = (watchlist_WatchlistFacade);\n\n// CONCATENATED MODULE: ./src/core/utils/flat_promise.ts\nfunction flatPromise() {\n    var resolve, reject;\n    var promise = new Promise(function (res, rej) {\n        resolve = res;\n        reject = rej;\n    });\n    return { promise: promise, resolve: resolve, reject: reject };\n}\n/* harmony default export */ var flat_promise = (flatPromise);\n\n// CONCATENATED MODULE: ./src/core/user.ts\nvar user_extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n\nvar user_UserFacade = (function (_super) {\n    user_extends(UserFacade, _super);\n    function UserFacade(pusher) {\n        var _this = _super.call(this, function (eventName, data) {\n            logger.debug('No callbacks on user for ' + eventName);\n        }) || this;\n        _this.signin_requested = false;\n        _this.user_data = null;\n        _this.serverToUserChannel = null;\n        _this.signinDonePromise = null;\n        _this._signinDoneResolve = null;\n        _this._onAuthorize = function (err, authData) {\n            if (err) {\n                logger.warn(\"Error during signin: \" + err);\n                _this._cleanup();\n                return;\n            }\n            _this.pusher.send_event('pusher:signin', {\n                auth: authData.auth,\n                user_data: authData.user_data\n            });\n        };\n        _this.pusher = pusher;\n        _this.pusher.connection.bind('state_change', function (_a) {\n            var previous = _a.previous, current = _a.current;\n            if (previous !== 'connected' && current === 'connected') {\n                _this._signin();\n            }\n            if (previous === 'connected' && current !== 'connected') {\n                _this._cleanup();\n                _this._newSigninPromiseIfNeeded();\n            }\n        });\n        _this.watchlist = new watchlist(pusher);\n        _this.pusher.connection.bind('message', function (event) {\n            var eventName = event.event;\n            if (eventName === 'pusher:signin_success') {\n                _this._onSigninSuccess(event.data);\n            }\n            if (_this.serverToUserChannel &&\n                _this.serverToUserChannel.name === event.channel) {\n                _this.serverToUserChannel.handleEvent(event);\n            }\n        });\n        return _this;\n    }\n    UserFacade.prototype.signin = function () {\n        if (this.signin_requested) {\n            return;\n        }\n        this.signin_requested = true;\n        this._signin();\n    };\n    UserFacade.prototype._signin = function () {\n        if (!this.signin_requested) {\n            return;\n        }\n        this._newSigninPromiseIfNeeded();\n        if (this.pusher.connection.state !== 'connected') {\n            return;\n        }\n        this.pusher.config.userAuthenticator({\n            socketId: this.pusher.connection.socket_id\n        }, this._onAuthorize);\n    };\n    UserFacade.prototype._onSigninSuccess = function (data) {\n        try {\n            this.user_data = JSON.parse(data.user_data);\n        }\n        catch (e) {\n            logger.error(\"Failed parsing user data after signin: \" + data.user_data);\n            this._cleanup();\n            return;\n        }\n        if (typeof this.user_data.id !== 'string' || this.user_data.id === '') {\n            logger.error(\"user_data doesn't contain an id. user_data: \" + this.user_data);\n            this._cleanup();\n            return;\n        }\n        this._signinDoneResolve();\n        this._subscribeChannels();\n    };\n    UserFacade.prototype._subscribeChannels = function () {\n        var _this = this;\n        var ensure_subscribed = function (channel) {\n            if (channel.subscriptionPending && channel.subscriptionCancelled) {\n                channel.reinstateSubscription();\n            }\n            else if (!channel.subscriptionPending &&\n                _this.pusher.connection.state === 'connected') {\n                channel.subscribe();\n            }\n        };\n        this.serverToUserChannel = new channels_channel(\"#server-to-user-\" + this.user_data.id, this.pusher);\n        this.serverToUserChannel.bind_global(function (eventName, data) {\n            if (eventName.indexOf('pusher_internal:') === 0 ||\n                eventName.indexOf('pusher:') === 0) {\n                return;\n            }\n            _this.emit(eventName, data);\n        });\n        ensure_subscribed(this.serverToUserChannel);\n    };\n    UserFacade.prototype._cleanup = function () {\n        this.user_data = null;\n        if (this.serverToUserChannel) {\n            this.serverToUserChannel.unbind_all();\n            this.serverToUserChannel.disconnect();\n            this.serverToUserChannel = null;\n        }\n        if (this.signin_requested) {\n            this._signinDoneResolve();\n        }\n    };\n    UserFacade.prototype._newSigninPromiseIfNeeded = function () {\n        if (!this.signin_requested) {\n            return;\n        }\n        if (this.signinDonePromise && !this.signinDonePromise.done) {\n            return;\n        }\n        var _a = flat_promise(), promise = _a.promise, resolve = _a.resolve, _ = _a.reject;\n        promise.done = false;\n        var setDone = function () {\n            promise.done = true;\n        };\n        promise.then(setDone)[\"catch\"](setDone);\n        this.signinDonePromise = promise;\n        this._signinDoneResolve = resolve;\n    };\n    return UserFacade;\n}(dispatcher));\n/* harmony default export */ var user = (user_UserFacade);\n\n// CONCATENATED MODULE: ./src/core/pusher.ts\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar pusher_Pusher = (function () {\n    function Pusher(app_key, options) {\n        var _this = this;\n        checkAppKey(app_key);\n        validateOptions(options);\n        this.key = app_key;\n        this.config = getConfig(options, this);\n        this.channels = factory.createChannels();\n        this.global_emitter = new dispatcher();\n        this.sessionID = runtime.randomInt(1000000000);\n        this.timeline = new timeline_timeline(this.key, this.sessionID, {\n            cluster: this.config.cluster,\n            features: Pusher.getClientFeatures(),\n            params: this.config.timelineParams || {},\n            limit: 50,\n            level: timeline_level.INFO,\n            version: defaults.VERSION\n        });\n        if (this.config.enableStats) {\n            this.timelineSender = factory.createTimelineSender(this.timeline, {\n                host: this.config.statsHost,\n                path: '/timeline/v2/' + runtime.TimelineTransport.name\n            });\n        }\n        var getStrategy = function (options) {\n            return runtime.getDefaultStrategy(_this.config, options, strategy_builder_defineTransport);\n        };\n        this.connection = factory.createConnectionManager(this.key, {\n            getStrategy: getStrategy,\n            timeline: this.timeline,\n            activityTimeout: this.config.activityTimeout,\n            pongTimeout: this.config.pongTimeout,\n            unavailableTimeout: this.config.unavailableTimeout,\n            useTLS: Boolean(this.config.useTLS)\n        });\n        this.connection.bind('connected', function () {\n            _this.subscribeAll();\n            if (_this.timelineSender) {\n                _this.timelineSender.send(_this.connection.isUsingTLS());\n            }\n        });\n        this.connection.bind('message', function (event) {\n            var eventName = event.event;\n            var internal = eventName.indexOf('pusher_internal:') === 0;\n            if (event.channel) {\n                var channel = _this.channel(event.channel);\n                if (channel) {\n                    channel.handleEvent(event);\n                }\n            }\n            if (!internal) {\n                _this.global_emitter.emit(event.event, event.data);\n            }\n        });\n        this.connection.bind('connecting', function () {\n            _this.channels.disconnect();\n        });\n        this.connection.bind('disconnected', function () {\n            _this.channels.disconnect();\n        });\n        this.connection.bind('error', function (err) {\n            logger.warn(err);\n        });\n        Pusher.instances.push(this);\n        this.timeline.info({ instances: Pusher.instances.length });\n        this.user = new user(this);\n        if (Pusher.isReady) {\n            this.connect();\n        }\n    }\n    Pusher.ready = function () {\n        Pusher.isReady = true;\n        for (var i = 0, l = Pusher.instances.length; i < l; i++) {\n            Pusher.instances[i].connect();\n        }\n    };\n    Pusher.getClientFeatures = function () {\n        return keys(filterObject({ ws: runtime.Transports.ws }, function (t) {\n            return t.isSupported({});\n        }));\n    };\n    Pusher.prototype.channel = function (name) {\n        return this.channels.find(name);\n    };\n    Pusher.prototype.allChannels = function () {\n        return this.channels.all();\n    };\n    Pusher.prototype.connect = function () {\n        this.connection.connect();\n        if (this.timelineSender) {\n            if (!this.timelineSenderTimer) {\n                var usingTLS = this.connection.isUsingTLS();\n                var timelineSender = this.timelineSender;\n                this.timelineSenderTimer = new PeriodicTimer(60000, function () {\n                    timelineSender.send(usingTLS);\n                });\n            }\n        }\n    };\n    Pusher.prototype.disconnect = function () {\n        this.connection.disconnect();\n        if (this.timelineSenderTimer) {\n            this.timelineSenderTimer.ensureAborted();\n            this.timelineSenderTimer = null;\n        }\n    };\n    Pusher.prototype.bind = function (event_name, callback, context) {\n        this.global_emitter.bind(event_name, callback, context);\n        return this;\n    };\n    Pusher.prototype.unbind = function (event_name, callback, context) {\n        this.global_emitter.unbind(event_name, callback, context);\n        return this;\n    };\n    Pusher.prototype.bind_global = function (callback) {\n        this.global_emitter.bind_global(callback);\n        return this;\n    };\n    Pusher.prototype.unbind_global = function (callback) {\n        this.global_emitter.unbind_global(callback);\n        return this;\n    };\n    Pusher.prototype.unbind_all = function (callback) {\n        this.global_emitter.unbind_all();\n        return this;\n    };\n    Pusher.prototype.subscribeAll = function () {\n        var channelName;\n        for (channelName in this.channels.channels) {\n            if (this.channels.channels.hasOwnProperty(channelName)) {\n                this.subscribe(channelName);\n            }\n        }\n    };\n    Pusher.prototype.subscribe = function (channel_name) {\n        var channel = this.channels.add(channel_name, this);\n        if (channel.subscriptionPending && channel.subscriptionCancelled) {\n            channel.reinstateSubscription();\n        }\n        else if (!channel.subscriptionPending &&\n            this.connection.state === 'connected') {\n            channel.subscribe();\n        }\n        return channel;\n    };\n    Pusher.prototype.unsubscribe = function (channel_name) {\n        var channel = this.channels.find(channel_name);\n        if (channel && channel.subscriptionPending) {\n            channel.cancelSubscription();\n        }\n        else {\n            channel = this.channels.remove(channel_name);\n            if (channel && channel.subscribed) {\n                channel.unsubscribe();\n            }\n        }\n    };\n    Pusher.prototype.send_event = function (event_name, data, channel) {\n        return this.connection.send_event(event_name, data, channel);\n    };\n    Pusher.prototype.shouldUseTLS = function () {\n        return this.config.useTLS;\n    };\n    Pusher.prototype.signin = function () {\n        this.user.signin();\n    };\n    Pusher.instances = [];\n    Pusher.isReady = false;\n    Pusher.logToConsole = false;\n    Pusher.Runtime = runtime;\n    Pusher.ScriptReceivers = runtime.ScriptReceivers;\n    Pusher.DependenciesReceivers = runtime.DependenciesReceivers;\n    Pusher.auth_callbacks = runtime.auth_callbacks;\n    return Pusher;\n}());\n/* harmony default export */ var core_pusher = __webpack_exports__[\"default\"] = (pusher_Pusher);\nfunction checkAppKey(key) {\n    if (key === null || key === undefined) {\n        throw 'You must pass your app key when you instantiate Pusher.';\n    }\n}\nruntime.setup(pusher_Pusher);\n\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=pusher.js.map\n\n//# sourceURL=webpack://futureBooks/./node_modules/pusher-js/dist/web/pusher.js?");

/***/ }),

/***/ "./node_modules/rangetouch/dist/rangetouch.js":
/*!****************************************************!*\
  !*** ./node_modules/rangetouch/dist/rangetouch.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("!function(e,t){ true?module.exports=t():undefined}(this,(function(){\"use strict\";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?n(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var i={addCSS:!0,thumbWidth:15,watch:!0};function u(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var o=function(e){return null!=e?e.constructor:null},c=function(e,t){return!!(e&&t&&e instanceof t)},l=function(e){return null==e},a=function(e){return o(e)===Object},s=function(e){return o(e)===String},f=function(e){return Array.isArray(e)},h=function(e){return c(e,NodeList)},d=s,y=f,b=h,m=function(e){return c(e,Element)},g=function(e){return c(e,Event)},p=function(e){return l(e)||(s(e)||f(e)||h(e))&&!e.length||a(e)&&!Object.keys(e).length};function v(e,t){if(1>t){var n=function(e){var t=\"\".concat(e).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}return function(){function t(e,n){(function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")})(this,t),m(e)?this.element=e:d(e)&&(this.element=document.querySelector(e)),m(this.element)&&p(this.element.rangeTouch)&&(this.config=r({},i,{},n),this.init())}return n=t,c=[{key:\"setup\",value:function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=null;if(p(e)||d(e)?o=Array.from(document.querySelectorAll(d(e)?e:'input[type=\"range\"]')):m(e)?o=[e]:b(e)?o=Array.from(e):y(e)&&(o=e.filter(m)),p(o))return null;var c=r({},i,{},n);if(d(e)&&c.watch){var l=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){m(n)&&u(n,e)&&new t(n,c)}))}))}));l.observe(document.body,{childList:!0,subtree:!0})}return o.map((function(e){return new t(e,n)}))}},{key:\"enabled\",get:function(){return\"ontouchstart\"in document.documentElement}}],(o=[{key:\"init\",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect=\"none\",this.element.style.webKitUserSelect=\"none\",this.element.style.touchAction=\"manipulation\"),this.listeners(!0),this.element.rangeTouch=this)}},{key:\"destroy\",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect=\"\",this.element.style.webKitUserSelect=\"\",this.element.style.touchAction=\"\"),this.listeners(!1),this.element.rangeTouch=null)}},{key:\"listeners\",value:function(e){var t=this,n=e?\"addEventListener\":\"removeEventListener\";[\"touchstart\",\"touchmove\",\"touchend\"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:\"get\",value:function(e){if(!t.enabled||!g(e))return null;var n,r=e.target,i=e.changedTouches[0],u=parseFloat(r.getAttribute(\"min\"))||0,o=parseFloat(r.getAttribute(\"max\"))||100,c=parseFloat(r.getAttribute(\"step\"))||1,l=r.getBoundingClientRect(),a=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(i.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*a:50<n&&(n+=2*(n-50)*a),u+v(n/100*(o-u),c)}},{key:\"set\",value:function(e){t.enabled&&g(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(e.target,\"touchend\"===e.type?\"change\":\"input\"))}}])&&e(n.prototype,o),c&&e(n,c),t;var n,o,c}()}));\n//# sourceMappingURL=rangetouch.js.map\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/rangetouch/dist/rangetouch.js?");

/***/ }),

/***/ "./node_modules/rangy/lib/rangy-core.js":
/*!**********************************************!*\
  !*** ./node_modules/rangy/lib/rangy-core.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Rangy, a cross-browser JavaScript range and selection library\n * https://github.com/timdown/rangy\n *\n * Copyright 2024, Tim Down\n * Licensed under the MIT license.\n * Version: 1.3.2\n * Build date: 2 November 2024\n */\n\n(function(factory, root) {\n    if (true) {\n        // AMD. Register as an anonymous module.\n        !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    } else {}\n})(function() {\n\n    var OBJECT = \"object\", FUNCTION = \"function\", UNDEFINED = \"undefined\";\n\n    // Minimal set of properties required for DOM Level 2 Range compliance. Comparison constants such as START_TO_START\n    // are omitted because ranges in KHTML do not have them but otherwise work perfectly well. See issue 113.\n    var domRangeProperties = [\"startContainer\", \"startOffset\", \"endContainer\", \"endOffset\", \"collapsed\",\n        \"commonAncestorContainer\"];\n\n    // Minimal set of methods required for DOM Level 2 Range compliance\n    var domRangeMethods = [\"setStart\", \"setStartBefore\", \"setStartAfter\", \"setEnd\", \"setEndBefore\",\n        \"setEndAfter\", \"collapse\", \"selectNode\", \"selectNodeContents\", \"compareBoundaryPoints\", \"deleteContents\",\n        \"extractContents\", \"cloneContents\", \"insertNode\", \"surroundContents\", \"cloneRange\", \"toString\", \"detach\"];\n\n    var textRangeProperties = [\"boundingHeight\", \"boundingLeft\", \"boundingTop\", \"boundingWidth\", \"htmlText\", \"text\"];\n\n    // Subset of TextRange's full set of methods that we're interested in\n    var textRangeMethods = [\"collapse\", \"compareEndPoints\", \"duplicate\", \"moveToElementText\", \"parentElement\", \"select\",\n        \"setEndPoint\", \"getBoundingClientRect\"];\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // Trio of functions taken from Peter Michaux's article:\n    // http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting\n    function isHostMethod(o, p) {\n        var t = typeof o[p];\n        return t == FUNCTION || (!!(t == OBJECT && o[p])) || t == \"unknown\";\n    }\n\n    function isHostObject(o, p) {\n        return !!(typeof o[p] == OBJECT && o[p]);\n    }\n\n    function isHostProperty(o, p) {\n        return typeof o[p] != UNDEFINED;\n    }\n\n    // Creates a convenience function to save verbose repeated calls to tests functions\n    function createMultiplePropertyTest(testFunc) {\n        return function(o, props) {\n            var i = props.length;\n            while (i--) {\n                if (!testFunc(o, props[i])) {\n                    return false;\n                }\n            }\n            return true;\n        };\n    }\n\n    // Next trio of functions are a convenience to save verbose repeated calls to previous two functions\n    var areHostMethods = createMultiplePropertyTest(isHostMethod);\n    var areHostObjects = createMultiplePropertyTest(isHostObject);\n    var areHostProperties = createMultiplePropertyTest(isHostProperty);\n\n    function isTextRange(range) {\n        return range && areHostMethods(range, textRangeMethods) && areHostProperties(range, textRangeProperties);\n    }\n\n    function getBody(doc) {\n        return isHostObject(doc, \"body\") ? doc.body : doc.getElementsByTagName(\"body\")[0];\n    }\n\n    var forEach = [].forEach ?\n        function(arr, func) {\n            arr.forEach(func);\n        } :\n        function(arr, func) {\n            for (var i = 0, len = arr.length; i < len; ++i) {\n                func(arr[i], i);\n            }\n        };\n\n    var modules = {};\n\n    var isBrowser = (typeof window != UNDEFINED && typeof document != UNDEFINED);\n\n    var util = {\n        isHostMethod: isHostMethod,\n        isHostObject: isHostObject,\n        isHostProperty: isHostProperty,\n        areHostMethods: areHostMethods,\n        areHostObjects: areHostObjects,\n        areHostProperties: areHostProperties,\n        isTextRange: isTextRange,\n        getBody: getBody,\n        forEach: forEach\n    };\n\n    var api = {\n        version: \"1.3.2\",\n        initialized: false,\n        isBrowser: isBrowser,\n        supported: true,\n        util: util,\n        features: {},\n        modules: modules,\n        config: {\n            alertOnFail: false,\n            alertOnWarn: false,\n            preferTextRange: false,\n            autoInitialize: (typeof rangyAutoInitialize == UNDEFINED) ? true : rangyAutoInitialize\n        }\n    };\n\n    function consoleLog(msg) {\n        if (typeof console != UNDEFINED && isHostMethod(console, \"log\")) {\n            console.log(msg);\n        }\n    }\n\n    function alertOrLog(msg, shouldAlert) {\n        if (isBrowser && shouldAlert) {\n            alert(msg);\n        } else  {\n            consoleLog(msg);\n        }\n    }\n\n    function fail(reason) {\n        api.initialized = true;\n        api.supported = false;\n        alertOrLog(\"Rangy is not supported in this environment. Reason: \" + reason, api.config.alertOnFail);\n    }\n\n    api.fail = fail;\n\n    function warn(msg) {\n        alertOrLog(\"Rangy warning: \" + msg, api.config.alertOnWarn);\n    }\n\n    api.warn = warn;\n\n    // Add utility extend() method\n    var extend;\n    if ({}.hasOwnProperty) {\n        util.extend = extend = function(obj, props, deep) {\n            var o, p;\n            for (var i in props) {\n                if (i === \"__proto__\" || i === \"constructor\" || i === \"prototype\") {\n                    continue;\n                }\n                if (props.hasOwnProperty(i)) {\n                    o = obj[i];\n                    p = props[i];\n                    if (deep && o !== null && typeof o == \"object\" && p !== null && typeof p == \"object\") {\n                        extend(o, p, true);\n                    }\n                    obj[i] = p;\n                }\n            }\n            // Special case for toString, which does not show up in for...in loops in IE <= 8\n            if (props.hasOwnProperty(\"toString\")) {\n                obj.toString = props.toString;\n            }\n            return obj;\n        };\n\n        util.createOptions = function(optionsParam, defaults) {\n            var options = {};\n            extend(options, defaults);\n            if (optionsParam) {\n                extend(options, optionsParam);\n            }\n            return options;\n        };\n    } else {\n        fail(\"hasOwnProperty not supported\");\n    }\n\n    // Test whether we're in a browser and bail out if not\n    if (!isBrowser) {\n        fail(\"Rangy can only run in a browser\");\n    }\n\n    // Test whether Array.prototype.slice can be relied on for NodeLists and use an alternative toArray() if not\n    (function() {\n        var toArray;\n\n        if (isBrowser) {\n            var el = document.createElement(\"div\");\n            el.appendChild(document.createElement(\"span\"));\n            var slice = [].slice;\n            try {\n                if (slice.call(el.childNodes, 0)[0].nodeType == 1) {\n                    toArray = function(arrayLike) {\n                        return slice.call(arrayLike, 0);\n                    };\n                }\n            } catch (e) {}\n        }\n\n        if (!toArray) {\n            toArray = function(arrayLike) {\n                var arr = [];\n                for (var i = 0, len = arrayLike.length; i < len; ++i) {\n                    arr[i] = arrayLike[i];\n                }\n                return arr;\n            };\n        }\n\n        util.toArray = toArray;\n    })();\n\n    // Very simple event handler wrapper function that doesn't attempt to solve issues such as \"this\" handling or\n    // normalization of event properties because we don't need this.\n    var addListener;\n    if (isBrowser) {\n        if (isHostMethod(document, \"addEventListener\")) {\n            addListener = function(obj, eventType, listener) {\n                obj.addEventListener(eventType, listener, false);\n            };\n        } else if (isHostMethod(document, \"attachEvent\")) {\n            addListener = function(obj, eventType, listener) {\n                obj.attachEvent(\"on\" + eventType, listener);\n            };\n        } else {\n            fail(\"Document does not have required addEventListener or attachEvent method\");\n        }\n\n        util.addListener = addListener;\n    }\n\n    var initListeners = [];\n\n    function getErrorDesc(ex) {\n        return ex.message || ex.description || String(ex);\n    }\n\n    // Initialization\n    function init() {\n        if (!isBrowser || api.initialized) {\n            return;\n        }\n        var testRange;\n        var implementsDomRange = false, implementsTextRange = false;\n\n        // First, perform basic feature tests\n\n        if (isHostMethod(document, \"createRange\")) {\n            testRange = document.createRange();\n            if (areHostMethods(testRange, domRangeMethods) && areHostProperties(testRange, domRangeProperties)) {\n                implementsDomRange = true;\n            }\n        }\n\n        var body = getBody(document);\n        if (!body || body.nodeName.toLowerCase() != \"body\") {\n            fail(\"No body element found\");\n            return;\n        }\n\n        if (body && isHostMethod(body, \"createTextRange\")) {\n            testRange = body.createTextRange();\n            if (isTextRange(testRange)) {\n                implementsTextRange = true;\n            }\n        }\n\n        if (!implementsDomRange && !implementsTextRange) {\n            fail(\"Neither Range nor TextRange are available\");\n            return;\n        }\n\n        api.initialized = true;\n        api.features = {\n            implementsDomRange: implementsDomRange,\n            implementsTextRange: implementsTextRange\n        };\n\n        // Initialize modules\n        var module, errorMessage;\n        for (var moduleName in modules) {\n            if ( (module = modules[moduleName]) instanceof Module ) {\n                module.init(module, api);\n            }\n        }\n\n        // Call init listeners\n        for (var i = 0, len = initListeners.length; i < len; ++i) {\n            try {\n                initListeners[i](api);\n            } catch (ex) {\n                errorMessage = \"Rangy init listener threw an exception. Continuing. Detail: \" + getErrorDesc(ex);\n                consoleLog(errorMessage);\n            }\n        }\n    }\n\n    function deprecationNotice(deprecated, replacement, module) {\n        if (module) {\n            deprecated += \" in module \" + module.name;\n        }\n        api.warn(\"DEPRECATED: \" + deprecated + \" is deprecated. Please use \" +\n        replacement + \" instead.\");\n    }\n\n    function createAliasForDeprecatedMethod(owner, deprecated, replacement, module) {\n        owner[deprecated] = function() {\n            deprecationNotice(deprecated, replacement, module);\n            return owner[replacement].apply(owner, util.toArray(arguments));\n        };\n    }\n\n    util.deprecationNotice = deprecationNotice;\n    util.createAliasForDeprecatedMethod = createAliasForDeprecatedMethod;\n\n    // Allow external scripts to initialize this library in case it's loaded after the document has loaded\n    api.init = init;\n\n    // Execute listener immediately if already initialized\n    api.addInitListener = function(listener) {\n        if (api.initialized) {\n            listener(api);\n        } else {\n            initListeners.push(listener);\n        }\n    };\n\n    var shimListeners = [];\n\n    api.addShimListener = function(listener) {\n        shimListeners.push(listener);\n    };\n\n    function shim(win) {\n        win = win || window;\n        init();\n\n        // Notify listeners\n        for (var i = 0, len = shimListeners.length; i < len; ++i) {\n            shimListeners[i](win);\n        }\n    }\n\n    if (isBrowser) {\n        api.shim = api.createMissingNativeApi = shim;\n        createAliasForDeprecatedMethod(api, \"createMissingNativeApi\", \"shim\");\n    }\n\n    function Module(name, dependencies, initializer) {\n        this.name = name;\n        this.dependencies = dependencies;\n        this.initialized = false;\n        this.supported = false;\n        this.initializer = initializer;\n    }\n\n    Module.prototype = {\n        init: function() {\n            var requiredModuleNames = this.dependencies || [];\n            for (var i = 0, len = requiredModuleNames.length, requiredModule, moduleName; i < len; ++i) {\n                moduleName = requiredModuleNames[i];\n\n                requiredModule = modules[moduleName];\n                if (!requiredModule || !(requiredModule instanceof Module)) {\n                    throw new Error(\"required module '\" + moduleName + \"' not found\");\n                }\n\n                requiredModule.init();\n\n                if (!requiredModule.supported) {\n                    throw new Error(\"required module '\" + moduleName + \"' not supported\");\n                }\n            }\n\n            // Now run initializer\n            this.initializer(this);\n        },\n\n        fail: function(reason) {\n            this.initialized = true;\n            this.supported = false;\n            throw new Error(reason);\n        },\n\n        warn: function(msg) {\n            api.warn(\"Module \" + this.name + \": \" + msg);\n        },\n\n        deprecationNotice: function(deprecated, replacement) {\n            api.warn(\"DEPRECATED: \" + deprecated + \" in module \" + this.name + \" is deprecated. Please use \" +\n                replacement + \" instead\");\n        },\n\n        createError: function(msg) {\n            return new Error(\"Error in Rangy \" + this.name + \" module: \" + msg);\n        }\n    };\n\n    function createModule(name, dependencies, initFunc) {\n        var newModule = new Module(name, dependencies, function(module) {\n            if (!module.initialized) {\n                module.initialized = true;\n                try {\n                    initFunc(api, module);\n                    module.supported = true;\n                } catch (ex) {\n                    var errorMessage = \"Module '\" + name + \"' failed to load: \" + getErrorDesc(ex);\n                    consoleLog(errorMessage);\n                    if (ex.stack) {\n                        consoleLog(ex.stack);\n                    }\n                }\n            }\n        });\n        modules[name] = newModule;\n        return newModule;\n    }\n\n    api.createModule = function(name) {\n        // Allow 2 or 3 arguments (second argument is an optional array of dependencies)\n        var initFunc, dependencies;\n        if (arguments.length == 2) {\n            initFunc = arguments[1];\n            dependencies = [];\n        } else {\n            initFunc = arguments[2];\n            dependencies = arguments[1];\n        }\n\n        var module = createModule(name, dependencies, initFunc);\n\n        // Initialize the module immediately if the core is already initialized\n        if (api.initialized && api.supported) {\n            module.init();\n        }\n    };\n\n    api.createCoreModule = function(name, dependencies, initFunc) {\n        createModule(name, dependencies, initFunc);\n    };\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // Ensure rangy.rangePrototype and rangy.selectionPrototype are available immediately\n\n    function RangePrototype() {}\n    api.RangePrototype = RangePrototype;\n    api.rangePrototype = new RangePrototype();\n\n    function SelectionPrototype() {}\n    api.selectionPrototype = new SelectionPrototype();\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // DOM utility methods used by Rangy\n    api.createCoreModule(\"DomUtil\", [], function(api, module) {\n        var UNDEF = \"undefined\";\n        var util = api.util;\n        var getBody = util.getBody;\n\n        // Perform feature tests\n        if (!util.areHostMethods(document, [\"createDocumentFragment\", \"createElement\", \"createTextNode\"])) {\n            module.fail(\"document missing a Node creation method\");\n        }\n\n        if (!util.isHostMethod(document, \"getElementsByTagName\")) {\n            module.fail(\"document missing getElementsByTagName method\");\n        }\n\n        var el = document.createElement(\"div\");\n        if (!util.areHostMethods(el, [\"insertBefore\", \"appendChild\", \"cloneNode\"] ||\n                false)) {\n            module.fail(\"Incomplete Element implementation\");\n        }\n\n        // innerHTML is required for Range's createContextualFragment method\n        if (!util.isHostProperty(el, \"innerHTML\")) {\n            module.fail(\"Element is missing innerHTML property\");\n        }\n\n        var textNode = document.createTextNode(\"test\");\n        if (!util.areHostMethods(textNode, [\"splitText\", \"deleteData\", \"insertData\", \"appendData\", \"cloneNode\"] ||\n                false ||\n                false)) {\n            module.fail(\"Incomplete Text Node implementation\");\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // Removed use of indexOf because of a bizarre bug in Opera that is thrown in one of the Acid3 tests. I haven't been\n        // able to replicate it outside of the test. The bug is that indexOf returns -1 when called on an Array that\n        // contains just the document as a single element and the value searched for is the document.\n        var arrayContains = /*Array.prototype.indexOf ?\n            function(arr, val) {\n                return arr.indexOf(val) > -1;\n            }:*/\n\n            function(arr, val) {\n                var i = arr.length;\n                while (i--) {\n                    if (arr[i] === val) {\n                        return true;\n                    }\n                }\n                return false;\n            };\n\n        // Opera 11 puts HTML elements in the null namespace, it seems, and IE 7 has undefined namespaceURI\n        function isHtmlNamespace(node) {\n            var ns;\n            return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n        }\n\n        function parentElement(node) {\n            var parent = node.parentNode;\n            return (parent.nodeType == 1) ? parent : null;\n        }\n\n        function getNodeIndex(node) {\n            var i = 0;\n            while( (node = node.previousSibling) ) {\n                ++i;\n            }\n            return i;\n        }\n\n        function getNodeLength(node) {\n            switch (node.nodeType) {\n                case 7:\n                case 10:\n                    return 0;\n                case 3:\n                case 8:\n                    return node.length;\n                default:\n                    return node.childNodes.length;\n            }\n        }\n\n        function getCommonAncestor(node1, node2) {\n            var ancestors = [], n;\n            for (n = node1; n; n = n.parentNode) {\n                ancestors.push(n);\n            }\n\n            for (n = node2; n; n = n.parentNode) {\n                if (arrayContains(ancestors, n)) {\n                    return n;\n                }\n            }\n\n            return null;\n        }\n\n        function isAncestorOf(ancestor, descendant, selfIsAncestor) {\n            var n = selfIsAncestor ? descendant : descendant.parentNode;\n            while (n) {\n                if (n === ancestor) {\n                    return true;\n                } else {\n                    n = n.parentNode;\n                }\n            }\n            return false;\n        }\n\n        function isOrIsAncestorOf(ancestor, descendant) {\n            return isAncestorOf(ancestor, descendant, true);\n        }\n\n        function getClosestAncestorIn(node, ancestor, selfIsAncestor) {\n            var p, n = selfIsAncestor ? node : node.parentNode;\n            while (n) {\n                p = n.parentNode;\n                if (p === ancestor) {\n                    return n;\n                }\n                n = p;\n            }\n            return null;\n        }\n\n        function isCharacterDataNode(node) {\n            var t = node.nodeType;\n            return t == 3 || t == 4 || t == 8 ; // Text, CDataSection or Comment\n        }\n\n        function isTextOrCommentNode(node) {\n            if (!node) {\n                return false;\n            }\n            var t = node.nodeType;\n            return t == 3 || t == 8 ; // Text or Comment\n        }\n\n        function insertAfter(node, precedingNode) {\n            var nextNode = precedingNode.nextSibling, parent = precedingNode.parentNode;\n            if (nextNode) {\n                parent.insertBefore(node, nextNode);\n            } else {\n                parent.appendChild(node);\n            }\n            return node;\n        }\n\n        // Note that we cannot use splitText() because it is bugridden in IE 9.\n        function splitDataNode(node, index, positionsToPreserve) {\n            var newNode = node.cloneNode(false);\n            newNode.deleteData(0, index);\n            node.deleteData(index, node.length - index);\n            insertAfter(newNode, node);\n\n            // Preserve positions\n            if (positionsToPreserve) {\n                for (var i = 0, position; position = positionsToPreserve[i++]; ) {\n                    // Handle case where position was inside the portion of node after the split point\n                    if (position.node == node && position.offset > index) {\n                        position.node = newNode;\n                        position.offset -= index;\n                    }\n                    // Handle the case where the position is a node offset within node's parent\n                    else if (position.node == node.parentNode && position.offset > getNodeIndex(node)) {\n                        ++position.offset;\n                    }\n                }\n            }\n            return newNode;\n        }\n\n        function getDocument(node) {\n            if (node.nodeType == 9) {\n                return node;\n            } else if (typeof node.ownerDocument != UNDEF) {\n                return node.ownerDocument;\n            } else if (typeof node.document != UNDEF) {\n                return node.document;\n            } else if (node.parentNode) {\n                return getDocument(node.parentNode);\n            } else {\n                throw module.createError(\"getDocument: no document found for node\");\n            }\n        }\n\n        function getWindow(node) {\n            var doc = getDocument(node);\n            if (typeof doc.defaultView != UNDEF) {\n                return doc.defaultView;\n            } else if (typeof doc.parentWindow != UNDEF) {\n                return doc.parentWindow;\n            } else {\n                throw module.createError(\"Cannot get a window object for node\");\n            }\n        }\n\n        function getIframeDocument(iframeEl) {\n            if (typeof iframeEl.contentDocument != UNDEF) {\n                return iframeEl.contentDocument;\n            } else if (typeof iframeEl.contentWindow != UNDEF) {\n                return iframeEl.contentWindow.document;\n            } else {\n                throw module.createError(\"getIframeDocument: No Document object found for iframe element\");\n            }\n        }\n\n        function getIframeWindow(iframeEl) {\n            if (typeof iframeEl.contentWindow != UNDEF) {\n                return iframeEl.contentWindow;\n            } else if (typeof iframeEl.contentDocument != UNDEF) {\n                return iframeEl.contentDocument.defaultView;\n            } else {\n                throw module.createError(\"getIframeWindow: No Window object found for iframe element\");\n            }\n        }\n\n        // This looks bad. Is it worth it?\n        function isWindow(obj) {\n            return obj && util.isHostMethod(obj, \"setTimeout\") && util.isHostObject(obj, \"document\");\n        }\n\n        function getContentDocument(obj, module, methodName) {\n            var doc;\n\n            if (!obj) {\n                doc = document;\n            }\n\n            // Test if a DOM node has been passed and obtain a document object for it if so\n            else if (util.isHostProperty(obj, \"nodeType\")) {\n                doc = (obj.nodeType == 1 && obj.tagName.toLowerCase() == \"iframe\") ?\n                    getIframeDocument(obj) : getDocument(obj);\n            }\n\n            // Test if the doc parameter appears to be a Window object\n            else if (isWindow(obj)) {\n                doc = obj.document;\n            }\n\n            if (!doc) {\n                throw module.createError(methodName + \"(): Parameter must be a Window object or DOM node\");\n            }\n\n            return doc;\n        }\n\n        function getRootContainer(node) {\n            var parent;\n            while ( (parent = node.parentNode) ) {\n                node = parent;\n            }\n            return node;\n        }\n\n        function comparePoints(nodeA, offsetA, nodeB, offsetB) {\n            // See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Comparing\n            var nodeC, root, childA, childB, n;\n            if (nodeA == nodeB) {\n                // Case 1: nodes are the same\n                return offsetA === offsetB ? 0 : (offsetA < offsetB) ? -1 : 1;\n            } else if ( (nodeC = getClosestAncestorIn(nodeB, nodeA, true)) ) {\n                // Case 2: node C (container B or an ancestor) is a child node of A\n                return offsetA <= getNodeIndex(nodeC) ? -1 : 1;\n            } else if ( (nodeC = getClosestAncestorIn(nodeA, nodeB, true)) ) {\n                // Case 3: node C (container A or an ancestor) is a child node of B\n                return getNodeIndex(nodeC) < offsetB  ? -1 : 1;\n            } else {\n                root = getCommonAncestor(nodeA, nodeB);\n                if (!root) {\n                    throw new Error(\"comparePoints error: nodes have no common ancestor\");\n                }\n\n                // Case 4: containers are siblings or descendants of siblings\n                childA = (nodeA === root) ? root : getClosestAncestorIn(nodeA, root, true);\n                childB = (nodeB === root) ? root : getClosestAncestorIn(nodeB, root, true);\n\n                if (childA === childB) {\n                    // This shouldn't be possible\n                    throw module.createError(\"comparePoints got to case 4 and childA and childB are the same!\");\n                } else {\n                    n = root.firstChild;\n                    while (n) {\n                        if (n === childA) {\n                            return -1;\n                        } else if (n === childB) {\n                            return 1;\n                        }\n                        n = n.nextSibling;\n                    }\n                }\n            }\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // Test for IE's crash (IE 6/7) or exception (IE >= 8) when a reference to garbage-collected text node is queried\n        var crashyTextNodes = false;\n\n        function isBrokenNode(node) {\n            var n;\n            try {\n                n = node.parentNode;\n                return false;\n            } catch (e) {\n                return true;\n            }\n        }\n\n        (function() {\n            var el = document.createElement(\"b\");\n            el.innerHTML = \"1\";\n            var textNode = el.firstChild;\n            el.innerHTML = \"<br />\";\n            crashyTextNodes = isBrokenNode(textNode);\n\n            api.features.crashyTextNodes = crashyTextNodes;\n        })();\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        function inspectNode(node) {\n            if (!node) {\n                return \"[No node]\";\n            }\n            if (crashyTextNodes && isBrokenNode(node)) {\n                return \"[Broken node]\";\n            }\n            if (isCharacterDataNode(node)) {\n                return '\"' + node.data + '\"';\n            }\n            if (node.nodeType == 1) {\n                var idAttr = node.id ? ' id=\"' + node.id + '\"' : \"\";\n                return \"<\" + node.nodeName + idAttr + \">[index:\" + getNodeIndex(node) + \",length:\" + node.childNodes.length + \"][\" + (node.innerHTML || \"[innerHTML not supported]\").slice(0, 25) + \"]\";\n            }\n            return node.nodeName;\n        }\n\n        function fragmentFromNodeChildren(node) {\n            var fragment = getDocument(node).createDocumentFragment(), child;\n            while ( (child = node.firstChild) ) {\n                fragment.appendChild(child);\n            }\n            return fragment;\n        }\n\n        var getComputedStyleProperty;\n        if (typeof window.getComputedStyle != UNDEF) {\n            getComputedStyleProperty = function(el, propName) {\n                return getWindow(el).getComputedStyle(el, null)[propName];\n            };\n        } else if (typeof document.documentElement.currentStyle != UNDEF) {\n            getComputedStyleProperty = function(el, propName) {\n                return el.currentStyle ? el.currentStyle[propName] : \"\";\n            };\n        } else {\n            module.fail(\"No means of obtaining computed style properties found\");\n        }\n\n        function createTestElement(doc, html, contentEditable) {\n            var body = getBody(doc);\n            var el = doc.createElement(\"div\");\n            el.contentEditable = \"\" + !!contentEditable;\n            if (html) {\n                el.innerHTML = html;\n            }\n\n            // Insert the test element at the start of the body to prevent scrolling to the bottom in iOS (issue #292)\n            var bodyFirstChild = body.firstChild;\n            if (bodyFirstChild) {\n                body.insertBefore(el, bodyFirstChild);\n            } else {\n                body.appendChild(el);\n            }\n\n            return el;\n        }\n\n        function removeNode(node) {\n            return node.parentNode.removeChild(node);\n        }\n\n        function NodeIterator(root) {\n            this.root = root;\n            this._next = root;\n        }\n\n        NodeIterator.prototype = {\n            _current: null,\n\n            hasNext: function() {\n                return !!this._next;\n            },\n\n            next: function() {\n                var n = this._current = this._next;\n                var child, next;\n                if (this._current) {\n                    child = n.firstChild;\n                    if (child) {\n                        this._next = child;\n                    } else {\n                        next = null;\n                        while ((n !== this.root) && !(next = n.nextSibling)) {\n                            n = n.parentNode;\n                        }\n                        this._next = next;\n                    }\n                }\n                return this._current;\n            },\n\n            detach: function() {\n                this._current = this._next = this.root = null;\n            }\n        };\n\n        function createIterator(root) {\n            return new NodeIterator(root);\n        }\n\n        function DomPosition(node, offset) {\n            this.node = node;\n            this.offset = offset;\n        }\n\n        DomPosition.prototype = {\n            equals: function(pos) {\n                return !!pos && this.node === pos.node && this.offset == pos.offset;\n            },\n\n            inspect: function() {\n                return \"[DomPosition(\" + inspectNode(this.node) + \":\" + this.offset + \")]\";\n            },\n\n            toString: function() {\n                return this.inspect();\n            }\n        };\n\n        function DOMException(codeName) {\n            this.code = this[codeName];\n            this.codeName = codeName;\n            this.message = \"DOMException: \" + this.codeName;\n        }\n\n        DOMException.prototype = {\n            INDEX_SIZE_ERR: 1,\n            HIERARCHY_REQUEST_ERR: 3,\n            WRONG_DOCUMENT_ERR: 4,\n            NO_MODIFICATION_ALLOWED_ERR: 7,\n            NOT_FOUND_ERR: 8,\n            NOT_SUPPORTED_ERR: 9,\n            INVALID_STATE_ERR: 11,\n            INVALID_NODE_TYPE_ERR: 24\n        };\n\n        DOMException.prototype.toString = function() {\n            return this.message;\n        };\n\n        api.dom = {\n            arrayContains: arrayContains,\n            isHtmlNamespace: isHtmlNamespace,\n            parentElement: parentElement,\n            getNodeIndex: getNodeIndex,\n            getNodeLength: getNodeLength,\n            getCommonAncestor: getCommonAncestor,\n            isAncestorOf: isAncestorOf,\n            isOrIsAncestorOf: isOrIsAncestorOf,\n            getClosestAncestorIn: getClosestAncestorIn,\n            isCharacterDataNode: isCharacterDataNode,\n            isTextOrCommentNode: isTextOrCommentNode,\n            insertAfter: insertAfter,\n            splitDataNode: splitDataNode,\n            getDocument: getDocument,\n            getWindow: getWindow,\n            getIframeWindow: getIframeWindow,\n            getIframeDocument: getIframeDocument,\n            getBody: getBody,\n            isWindow: isWindow,\n            getContentDocument: getContentDocument,\n            getRootContainer: getRootContainer,\n            comparePoints: comparePoints,\n            isBrokenNode: isBrokenNode,\n            inspectNode: inspectNode,\n            getComputedStyleProperty: getComputedStyleProperty,\n            createTestElement: createTestElement,\n            removeNode: removeNode,\n            fragmentFromNodeChildren: fragmentFromNodeChildren,\n            createIterator: createIterator,\n            DomPosition: DomPosition\n        };\n\n        api.DOMException = DOMException;\n    });\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // Pure JavaScript implementation of DOM Range\n    api.createCoreModule(\"DomRange\", [\"DomUtil\"], function(api, module) {\n        var dom = api.dom;\n        var util = api.util;\n        var DomPosition = dom.DomPosition;\n        var DOMException = api.DOMException;\n\n        var isCharacterDataNode = dom.isCharacterDataNode;\n        var getNodeIndex = dom.getNodeIndex;\n        var isOrIsAncestorOf = dom.isOrIsAncestorOf;\n        var getDocument = dom.getDocument;\n        var comparePoints = dom.comparePoints;\n        var splitDataNode = dom.splitDataNode;\n        var getClosestAncestorIn = dom.getClosestAncestorIn;\n        var getNodeLength = dom.getNodeLength;\n        var arrayContains = dom.arrayContains;\n        var getRootContainer = dom.getRootContainer;\n        var crashyTextNodes = api.features.crashyTextNodes;\n\n        var removeNode = dom.removeNode;\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // Utility functions\n\n        function isNonTextPartiallySelected(node, range) {\n            return (node.nodeType != 3) &&\n                   (isOrIsAncestorOf(node, range.startContainer) || isOrIsAncestorOf(node, range.endContainer));\n        }\n\n        function getRangeDocument(range) {\n            return range.document || getDocument(range.startContainer);\n        }\n\n        function getRangeRoot(range) {\n            return getRootContainer(range.startContainer);\n        }\n\n        function getBoundaryBeforeNode(node) {\n            return new DomPosition(node.parentNode, getNodeIndex(node));\n        }\n\n        function getBoundaryAfterNode(node) {\n            return new DomPosition(node.parentNode, getNodeIndex(node) + 1);\n        }\n\n        function insertNodeAtPosition(node, n, o) {\n            var firstNodeInserted = node.nodeType == 11 ? node.firstChild : node;\n            if (isCharacterDataNode(n)) {\n                if (o == n.length) {\n                    dom.insertAfter(node, n);\n                } else {\n                    n.parentNode.insertBefore(node, o == 0 ? n : splitDataNode(n, o));\n                }\n            } else if (o >= n.childNodes.length) {\n                n.appendChild(node);\n            } else {\n                n.insertBefore(node, n.childNodes[o]);\n            }\n            return firstNodeInserted;\n        }\n\n        function rangesIntersect(rangeA, rangeB, touchingIsIntersecting) {\n            assertRangeValid(rangeA);\n            assertRangeValid(rangeB);\n\n            if (getRangeDocument(rangeB) != getRangeDocument(rangeA)) {\n                throw new DOMException(\"WRONG_DOCUMENT_ERR\");\n            }\n\n            var startComparison = comparePoints(rangeA.startContainer, rangeA.startOffset, rangeB.endContainer, rangeB.endOffset),\n                endComparison = comparePoints(rangeA.endContainer, rangeA.endOffset, rangeB.startContainer, rangeB.startOffset);\n\n            return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;\n        }\n\n        function cloneSubtree(iterator) {\n            var partiallySelected;\n            for (var node, frag = getRangeDocument(iterator.range).createDocumentFragment(), subIterator; node = iterator.next(); ) {\n                partiallySelected = iterator.isPartiallySelectedSubtree();\n                node = node.cloneNode(!partiallySelected);\n                if (partiallySelected) {\n                    subIterator = iterator.getSubtreeIterator();\n                    node.appendChild(cloneSubtree(subIterator));\n                    subIterator.detach();\n                }\n\n                if (node.nodeType == 10) { // DocumentType\n                    throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\n                }\n                frag.appendChild(node);\n            }\n            return frag;\n        }\n\n        function iterateSubtree(rangeIterator, func, iteratorState) {\n            var it, n;\n            iteratorState = iteratorState || { stop: false };\n            for (var node, subRangeIterator; node = rangeIterator.next(); ) {\n                if (rangeIterator.isPartiallySelectedSubtree()) {\n                    if (func(node) === false) {\n                        iteratorState.stop = true;\n                        return;\n                    } else {\n                        // The node is partially selected by the Range, so we can use a new RangeIterator on the portion of\n                        // the node selected by the Range.\n                        subRangeIterator = rangeIterator.getSubtreeIterator();\n                        iterateSubtree(subRangeIterator, func, iteratorState);\n                        subRangeIterator.detach();\n                        if (iteratorState.stop) {\n                            return;\n                        }\n                    }\n                } else {\n                    // The whole node is selected, so we can use efficient DOM iteration to iterate over the node and its\n                    // descendants\n                    it = dom.createIterator(node);\n                    while ( (n = it.next()) ) {\n                        if (func(n) === false) {\n                            iteratorState.stop = true;\n                            return;\n                        }\n                    }\n                }\n            }\n        }\n\n        function deleteSubtree(iterator) {\n            var subIterator;\n            while (iterator.next()) {\n                if (iterator.isPartiallySelectedSubtree()) {\n                    subIterator = iterator.getSubtreeIterator();\n                    deleteSubtree(subIterator);\n                    subIterator.detach();\n                } else {\n                    iterator.remove();\n                }\n            }\n        }\n\n        function extractSubtree(iterator) {\n            for (var node, frag = getRangeDocument(iterator.range).createDocumentFragment(), subIterator; node = iterator.next(); ) {\n\n                if (iterator.isPartiallySelectedSubtree()) {\n                    node = node.cloneNode(false);\n                    subIterator = iterator.getSubtreeIterator();\n                    node.appendChild(extractSubtree(subIterator));\n                    subIterator.detach();\n                } else {\n                    iterator.remove();\n                }\n                if (node.nodeType == 10) { // DocumentType\n                    throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\n                }\n                frag.appendChild(node);\n            }\n            return frag;\n        }\n\n        function getNodesInRange(range, nodeTypes, filter) {\n            var filterNodeTypes = !!(nodeTypes && nodeTypes.length), regex;\n            var filterExists = !!filter;\n            if (filterNodeTypes) {\n                regex = new RegExp(\"^(\" + nodeTypes.join(\"|\") + \")$\");\n            }\n\n            var nodes = [];\n            iterateSubtree(new RangeIterator(range, false), function(node) {\n                if (filterNodeTypes && !regex.test(node.nodeType)) {\n                    return;\n                }\n                if (filterExists && !filter(node)) {\n                    return;\n                }\n                // Don't include a boundary container if it is a character data node and the range does not contain any\n                // of its character data. See issue 190.\n                var sc = range.startContainer;\n                if (node == sc && isCharacterDataNode(sc) && range.startOffset == sc.length) {\n                    return;\n                }\n\n                var ec = range.endContainer;\n                if (node == ec && isCharacterDataNode(ec) && range.endOffset == 0) {\n                    return;\n                }\n\n                nodes.push(node);\n            });\n            return nodes;\n        }\n\n        function inspect(range) {\n            var name = (typeof range.getName == \"undefined\") ? \"Range\" : range.getName();\n            return \"[\" + name + \"(\" + dom.inspectNode(range.startContainer) + \":\" + range.startOffset + \", \" +\n                    dom.inspectNode(range.endContainer) + \":\" + range.endOffset + \")]\";\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // RangeIterator code partially borrows from IERange by Tim Ryan (http://github.com/timcameronryan/IERange)\n\n        function RangeIterator(range, clonePartiallySelectedTextNodes) {\n            this.range = range;\n            this.clonePartiallySelectedTextNodes = clonePartiallySelectedTextNodes;\n\n\n            if (!range.collapsed) {\n                this.sc = range.startContainer;\n                this.so = range.startOffset;\n                this.ec = range.endContainer;\n                this.eo = range.endOffset;\n                var root = range.commonAncestorContainer;\n\n                if (this.sc === this.ec && isCharacterDataNode(this.sc)) {\n                    this.isSingleCharacterDataNode = true;\n                    this._first = this._last = this._next = this.sc;\n                } else {\n                    this._first = this._next = (this.sc === root && !isCharacterDataNode(this.sc)) ?\n                        this.sc.childNodes[this.so] : getClosestAncestorIn(this.sc, root, true);\n                    this._last = (this.ec === root && !isCharacterDataNode(this.ec)) ?\n                        this.ec.childNodes[this.eo - 1] : getClosestAncestorIn(this.ec, root, true);\n                }\n            }\n        }\n\n        RangeIterator.prototype = {\n            _current: null,\n            _next: null,\n            _first: null,\n            _last: null,\n            isSingleCharacterDataNode: false,\n\n            reset: function() {\n                this._current = null;\n                this._next = this._first;\n            },\n\n            hasNext: function() {\n                return !!this._next;\n            },\n\n            next: function() {\n                // Move to next node\n                var current = this._current = this._next;\n                if (current) {\n                    this._next = (current !== this._last) ? current.nextSibling : null;\n\n                    // Check for partially selected text nodes\n                    if (isCharacterDataNode(current) && this.clonePartiallySelectedTextNodes) {\n                        if (current === this.ec) {\n                            (current = current.cloneNode(true)).deleteData(this.eo, current.length - this.eo);\n                        }\n                        if (this._current === this.sc) {\n                            (current = current.cloneNode(true)).deleteData(0, this.so);\n                        }\n                    }\n                }\n\n                return current;\n            },\n\n            remove: function() {\n                var current = this._current, start, end;\n\n                if (isCharacterDataNode(current) && (current === this.sc || current === this.ec)) {\n                    start = (current === this.sc) ? this.so : 0;\n                    end = (current === this.ec) ? this.eo : current.length;\n                    if (start != end) {\n                        current.deleteData(start, end - start);\n                    }\n                } else {\n                    if (current.parentNode) {\n                        removeNode(current);\n                    } else {\n                    }\n                }\n            },\n\n            // Checks if the current node is partially selected\n            isPartiallySelectedSubtree: function() {\n                var current = this._current;\n                return isNonTextPartiallySelected(current, this.range);\n            },\n\n            getSubtreeIterator: function() {\n                var subRange;\n                if (this.isSingleCharacterDataNode) {\n                    subRange = this.range.cloneRange();\n                    subRange.collapse(false);\n                } else {\n                    subRange = new Range(getRangeDocument(this.range));\n                    var current = this._current;\n                    var startContainer = current, startOffset = 0, endContainer = current, endOffset = getNodeLength(current);\n\n                    if (isOrIsAncestorOf(current, this.sc)) {\n                        startContainer = this.sc;\n                        startOffset = this.so;\n                    }\n                    if (isOrIsAncestorOf(current, this.ec)) {\n                        endContainer = this.ec;\n                        endOffset = this.eo;\n                    }\n\n                    updateBoundaries(subRange, startContainer, startOffset, endContainer, endOffset);\n                }\n                return new RangeIterator(subRange, this.clonePartiallySelectedTextNodes);\n            },\n\n            detach: function() {\n                this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null;\n            }\n        };\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        var beforeAfterNodeTypes = [1, 3, 4, 5, 7, 8, 10];\n        var rootContainerNodeTypes = [2, 9, 11];\n        var readonlyNodeTypes = [5, 6, 10, 12];\n        var insertableNodeTypes = [1, 3, 4, 5, 7, 8, 10, 11];\n        var surroundNodeTypes = [1, 3, 4, 5, 7, 8];\n\n        function createAncestorFinder(nodeTypes) {\n            return function(node, selfIsAncestor) {\n                var t, n = selfIsAncestor ? node : node.parentNode;\n                while (n) {\n                    t = n.nodeType;\n                    if (arrayContains(nodeTypes, t)) {\n                        return n;\n                    }\n                    n = n.parentNode;\n                }\n                return null;\n            };\n        }\n\n        var getDocumentOrFragmentContainer = createAncestorFinder( [9, 11] );\n        var getReadonlyAncestor = createAncestorFinder(readonlyNodeTypes);\n        var getDocTypeNotationEntityAncestor = createAncestorFinder( [6, 10, 12] );\n        var getElementAncestor = createAncestorFinder( [1] );\n\n        function assertNoDocTypeNotationEntityAncestor(node, allowSelf) {\n            if (getDocTypeNotationEntityAncestor(node, allowSelf)) {\n                throw new DOMException(\"INVALID_NODE_TYPE_ERR\");\n            }\n        }\n\n        function assertValidNodeType(node, invalidTypes) {\n            if (!arrayContains(invalidTypes, node.nodeType)) {\n                throw new DOMException(\"INVALID_NODE_TYPE_ERR\");\n            }\n        }\n\n        function assertValidOffset(node, offset) {\n            if (offset < 0 || offset > (isCharacterDataNode(node) ? node.length : node.childNodes.length)) {\n                throw new DOMException(\"INDEX_SIZE_ERR\");\n            }\n        }\n\n        function assertSameDocumentOrFragment(node1, node2) {\n            if (getDocumentOrFragmentContainer(node1, true) !== getDocumentOrFragmentContainer(node2, true)) {\n                throw new DOMException(\"WRONG_DOCUMENT_ERR\");\n            }\n        }\n\n        function assertNodeNotReadOnly(node) {\n            if (getReadonlyAncestor(node, true)) {\n                throw new DOMException(\"NO_MODIFICATION_ALLOWED_ERR\");\n            }\n        }\n\n        function assertNode(node, codeName) {\n            if (!node) {\n                throw new DOMException(codeName);\n            }\n        }\n\n        function isValidOffset(node, offset) {\n            return offset <= (isCharacterDataNode(node) ? node.length : node.childNodes.length);\n        }\n\n        function isRangeValid(range) {\n            return (!!range.startContainer && !!range.endContainer &&\n                    !(crashyTextNodes && (dom.isBrokenNode(range.startContainer) || dom.isBrokenNode(range.endContainer))) &&\n                    getRootContainer(range.startContainer) == getRootContainer(range.endContainer) &&\n                    isValidOffset(range.startContainer, range.startOffset) &&\n                    isValidOffset(range.endContainer, range.endOffset));\n        }\n\n        function assertRangeValid(range) {\n            if (!isRangeValid(range)) {\n                throw new Error(\"Range error: Range is not valid. This usually happens after DOM mutation. Range: (\" + range.inspect() + \")\");\n            }\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // Test the browser's innerHTML support to decide how to implement createContextualFragment\n        var styleEl = document.createElement(\"style\");\n        var htmlParsingConforms = false;\n        try {\n            styleEl.innerHTML = \"<b>x</b>\";\n            htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Pre-Blink Opera incorrectly creates an element node\n        } catch (e) {\n            // IE 6 and 7 throw\n        }\n\n        api.features.htmlParsingConforms = htmlParsingConforms;\n\n        var createContextualFragment = htmlParsingConforms ?\n\n            // Implementation as per HTML parsing spec, trusting in the browser's implementation of innerHTML. See\n            // discussion and base code for this implementation at issue 67.\n            // Spec: http://html5.org/specs/dom-parsing.html#extensions-to-the-range-interface\n            // Thanks to Aleks Williams.\n            function(fragmentStr) {\n                // \"Let node the context object's start's node.\"\n                var node = this.startContainer;\n                var doc = getDocument(node);\n\n                // \"If the context object's start's node is null, raise an INVALID_STATE_ERR\n                // exception and abort these steps.\"\n                if (!node) {\n                    throw new DOMException(\"INVALID_STATE_ERR\");\n                }\n\n                // \"Let element be as follows, depending on node's interface:\"\n                // Document, Document Fragment: null\n                var el = null;\n\n                // \"Element: node\"\n                if (node.nodeType == 1) {\n                    el = node;\n\n                // \"Text, Comment: node's parentElement\"\n                } else if (isCharacterDataNode(node)) {\n                    el = dom.parentElement(node);\n                }\n\n                // \"If either element is null or element's ownerDocument is an HTML document\n                // and element's local name is \"html\" and element's namespace is the HTML\n                // namespace\"\n                if (el === null || (\n                    el.nodeName == \"HTML\" &&\n                    dom.isHtmlNamespace(getDocument(el).documentElement) &&\n                    dom.isHtmlNamespace(el)\n                )) {\n\n                // \"let element be a new Element with \"body\" as its local name and the HTML\n                // namespace as its namespace.\"\"\n                    el = doc.createElement(\"body\");\n                } else {\n                    el = el.cloneNode(false);\n                }\n\n                // \"If the node's document is an HTML document: Invoke the HTML fragment parsing algorithm.\"\n                // \"If the node's document is an XML document: Invoke the XML fragment parsing algorithm.\"\n                // \"In either case, the algorithm must be invoked with fragment as the input\n                // and element as the context element.\"\n                el.innerHTML = fragmentStr;\n\n                // \"If this raises an exception, then abort these steps. Otherwise, let new\n                // children be the nodes returned.\"\n\n                // \"Let fragment be a new DocumentFragment.\"\n                // \"Append all new children to fragment.\"\n                // \"Return fragment.\"\n                return dom.fragmentFromNodeChildren(el);\n            } :\n\n            // In this case, innerHTML cannot be trusted, so fall back to a simpler, non-conformant implementation that\n            // previous versions of Rangy used (with the exception of using a body element rather than a div)\n            function(fragmentStr) {\n                var doc = getRangeDocument(this);\n                var el = doc.createElement(\"body\");\n                el.innerHTML = fragmentStr;\n\n                return dom.fragmentFromNodeChildren(el);\n            };\n\n        function splitRangeBoundaries(range, positionsToPreserve) {\n            assertRangeValid(range);\n\n            var sc = range.startContainer, so = range.startOffset, ec = range.endContainer, eo = range.endOffset;\n            var startEndSame = (sc === ec);\n\n            if (isCharacterDataNode(ec) && eo > 0 && eo < ec.length) {\n                splitDataNode(ec, eo, positionsToPreserve);\n            }\n\n            if (isCharacterDataNode(sc) && so > 0 && so < sc.length) {\n                sc = splitDataNode(sc, so, positionsToPreserve);\n                if (startEndSame) {\n                    eo -= so;\n                    ec = sc;\n                } else if (ec == sc.parentNode && eo >= getNodeIndex(sc)) {\n                    eo++;\n                }\n                so = 0;\n            }\n            range.setStartAndEnd(sc, so, ec, eo);\n        }\n\n        function rangeToHtml(range) {\n            assertRangeValid(range);\n            var container = range.commonAncestorContainer.parentNode.cloneNode(false);\n            container.appendChild( range.cloneContents() );\n            return container.innerHTML;\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        var rangeProperties = [\"startContainer\", \"startOffset\", \"endContainer\", \"endOffset\", \"collapsed\",\n            \"commonAncestorContainer\"];\n\n        var s2s = 0, s2e = 1, e2e = 2, e2s = 3;\n        var n_b = 0, n_a = 1, n_b_a = 2, n_i = 3;\n\n        util.extend(api.rangePrototype, {\n            compareBoundaryPoints: function(how, range) {\n                assertRangeValid(this);\n                assertSameDocumentOrFragment(this.startContainer, range.startContainer);\n\n                var nodeA, offsetA, nodeB, offsetB;\n                var prefixA = (how == e2s || how == s2s) ? \"start\" : \"end\";\n                var prefixB = (how == s2e || how == s2s) ? \"start\" : \"end\";\n                nodeA = this[prefixA + \"Container\"];\n                offsetA = this[prefixA + \"Offset\"];\n                nodeB = range[prefixB + \"Container\"];\n                offsetB = range[prefixB + \"Offset\"];\n                return comparePoints(nodeA, offsetA, nodeB, offsetB);\n            },\n\n            insertNode: function(node) {\n                assertRangeValid(this);\n                assertValidNodeType(node, insertableNodeTypes);\n                assertNodeNotReadOnly(this.startContainer);\n\n                if (isOrIsAncestorOf(node, this.startContainer)) {\n                    throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\n                }\n\n                // No check for whether the container of the start of the Range is of a type that does not allow\n                // children of the type of node: the browser's DOM implementation should do this for us when we attempt\n                // to add the node\n\n                var firstNodeInserted = insertNodeAtPosition(node, this.startContainer, this.startOffset);\n                this.setStartBefore(firstNodeInserted);\n            },\n\n            cloneContents: function() {\n                assertRangeValid(this);\n\n                var clone, frag;\n                if (this.collapsed) {\n                    return getRangeDocument(this).createDocumentFragment();\n                } else {\n                    if (this.startContainer === this.endContainer && isCharacterDataNode(this.startContainer)) {\n                        clone = this.startContainer.cloneNode(true);\n                        clone.data = clone.data.slice(this.startOffset, this.endOffset);\n                        frag = getRangeDocument(this).createDocumentFragment();\n                        frag.appendChild(clone);\n                        return frag;\n                    } else {\n                        var iterator = new RangeIterator(this, true);\n                        clone = cloneSubtree(iterator);\n                        iterator.detach();\n                    }\n                    return clone;\n                }\n            },\n\n            canSurroundContents: function() {\n                assertRangeValid(this);\n                assertNodeNotReadOnly(this.startContainer);\n                assertNodeNotReadOnly(this.endContainer);\n\n                // Check if the contents can be surrounded. Specifically, this means whether the range partially selects\n                // no non-text nodes.\n                var iterator = new RangeIterator(this, true);\n                var boundariesInvalid = (iterator._first && (isNonTextPartiallySelected(iterator._first, this)) ||\n                        (iterator._last && isNonTextPartiallySelected(iterator._last, this)));\n                iterator.detach();\n                return !boundariesInvalid;\n            },\n\n            surroundContents: function(node) {\n                assertValidNodeType(node, surroundNodeTypes);\n\n                if (!this.canSurroundContents()) {\n                    throw new DOMException(\"INVALID_STATE_ERR\");\n                }\n\n                // Extract the contents\n                var content = this.extractContents();\n\n                // Clear the children of the node\n                if (node.hasChildNodes()) {\n                    while (node.lastChild) {\n                        node.removeChild(node.lastChild);\n                    }\n                }\n\n                // Insert the new node and add the extracted contents\n                insertNodeAtPosition(node, this.startContainer, this.startOffset);\n                node.appendChild(content);\n\n                this.selectNode(node);\n            },\n\n            cloneRange: function() {\n                assertRangeValid(this);\n                var range = new Range(getRangeDocument(this));\n                var i = rangeProperties.length, prop;\n                while (i--) {\n                    prop = rangeProperties[i];\n                    range[prop] = this[prop];\n                }\n                return range;\n            },\n\n            toString: function() {\n                assertRangeValid(this);\n                var sc = this.startContainer;\n                if (sc === this.endContainer && isCharacterDataNode(sc)) {\n                    return (sc.nodeType == 3 || sc.nodeType == 4) ? sc.data.slice(this.startOffset, this.endOffset) : \"\";\n                } else {\n                    var textParts = [], iterator = new RangeIterator(this, true);\n                    iterateSubtree(iterator, function(node) {\n                        // Accept only text or CDATA nodes, not comments\n                        if (node.nodeType == 3 || node.nodeType == 4) {\n                            textParts.push(node.data);\n                        }\n                    });\n                    iterator.detach();\n                    return textParts.join(\"\");\n                }\n            },\n\n            // The methods below are all non-standard. The following batch were introduced by Mozilla but have since\n            // been removed from Mozilla.\n\n            compareNode: function(node) {\n                assertRangeValid(this);\n\n                var parent = node.parentNode;\n                var nodeIndex = getNodeIndex(node);\n\n                if (!parent) {\n                    throw new DOMException(\"NOT_FOUND_ERR\");\n                }\n\n                var startComparison = this.comparePoint(parent, nodeIndex),\n                    endComparison = this.comparePoint(parent, nodeIndex + 1);\n\n                if (startComparison < 0) { // Node starts before\n                    return (endComparison > 0) ? n_b_a : n_b;\n                } else {\n                    return (endComparison > 0) ? n_a : n_i;\n                }\n            },\n\n            comparePoint: function(node, offset) {\n                assertRangeValid(this);\n                assertNode(node, \"HIERARCHY_REQUEST_ERR\");\n                assertSameDocumentOrFragment(node, this.startContainer);\n\n                if (comparePoints(node, offset, this.startContainer, this.startOffset) < 0) {\n                    return -1;\n                } else if (comparePoints(node, offset, this.endContainer, this.endOffset) > 0) {\n                    return 1;\n                }\n                return 0;\n            },\n\n            createContextualFragment: createContextualFragment,\n\n            toHtml: function() {\n                return rangeToHtml(this);\n            },\n\n            // touchingIsIntersecting determines whether this method considers a node that borders a range intersects\n            // with it (as in WebKit) or not (as in Gecko pre-1.9, and the default)\n            intersectsNode: function(node, touchingIsIntersecting) {\n                assertRangeValid(this);\n                if (getRootContainer(node) != getRangeRoot(this)) {\n                    return false;\n                }\n\n                var parent = node.parentNode, offset = getNodeIndex(node);\n                if (!parent) {\n                    return true;\n                }\n\n                var startComparison = comparePoints(parent, offset, this.endContainer, this.endOffset),\n                    endComparison = comparePoints(parent, offset + 1, this.startContainer, this.startOffset);\n\n                return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;\n            },\n\n            isPointInRange: function(node, offset) {\n                assertRangeValid(this);\n                assertNode(node, \"HIERARCHY_REQUEST_ERR\");\n                assertSameDocumentOrFragment(node, this.startContainer);\n\n                return (comparePoints(node, offset, this.startContainer, this.startOffset) >= 0) &&\n                       (comparePoints(node, offset, this.endContainer, this.endOffset) <= 0);\n            },\n\n            // The methods below are non-standard and invented by me.\n\n            // Sharing a boundary start-to-end or end-to-start does not count as intersection.\n            intersectsRange: function(range) {\n                return rangesIntersect(this, range, false);\n            },\n\n            // Sharing a boundary start-to-end or end-to-start does count as intersection.\n            intersectsOrTouchesRange: function(range) {\n                return rangesIntersect(this, range, true);\n            },\n\n            intersection: function(range) {\n                if (this.intersectsRange(range)) {\n                    var startComparison = comparePoints(this.startContainer, this.startOffset, range.startContainer, range.startOffset),\n                        endComparison = comparePoints(this.endContainer, this.endOffset, range.endContainer, range.endOffset);\n\n                    var intersectionRange = this.cloneRange();\n                    if (startComparison == -1) {\n                        intersectionRange.setStart(range.startContainer, range.startOffset);\n                    }\n                    if (endComparison == 1) {\n                        intersectionRange.setEnd(range.endContainer, range.endOffset);\n                    }\n                    return intersectionRange;\n                }\n                return null;\n            },\n\n            union: function(range) {\n                if (this.intersectsOrTouchesRange(range)) {\n                    var unionRange = this.cloneRange();\n                    if (comparePoints(range.startContainer, range.startOffset, this.startContainer, this.startOffset) == -1) {\n                        unionRange.setStart(range.startContainer, range.startOffset);\n                    }\n                    if (comparePoints(range.endContainer, range.endOffset, this.endContainer, this.endOffset) == 1) {\n                        unionRange.setEnd(range.endContainer, range.endOffset);\n                    }\n                    return unionRange;\n                } else {\n                    throw new DOMException(\"Ranges do not intersect\");\n                }\n            },\n\n            containsNode: function(node, allowPartial) {\n                if (allowPartial) {\n                    return this.intersectsNode(node, false);\n                } else {\n                    return this.compareNode(node) == n_i;\n                }\n            },\n\n            containsNodeContents: function(node) {\n                return this.comparePoint(node, 0) >= 0 && this.comparePoint(node, getNodeLength(node)) <= 0;\n            },\n\n            containsRange: function(range) {\n                var intersection = this.intersection(range);\n                return intersection !== null && range.equals(intersection);\n            },\n\n            containsNodeText: function(node) {\n                var nodeRange = this.cloneRange();\n                nodeRange.selectNode(node);\n                var textNodes = nodeRange.getNodes([3]);\n                if (textNodes.length > 0) {\n                    nodeRange.setStart(textNodes[0], 0);\n                    var lastTextNode = textNodes.pop();\n                    nodeRange.setEnd(lastTextNode, lastTextNode.length);\n                    return this.containsRange(nodeRange);\n                } else {\n                    return this.containsNodeContents(node);\n                }\n            },\n\n            getNodes: function(nodeTypes, filter) {\n                assertRangeValid(this);\n                return getNodesInRange(this, nodeTypes, filter);\n            },\n\n            getDocument: function() {\n                return getRangeDocument(this);\n            },\n\n            collapseBefore: function(node) {\n                this.setEndBefore(node);\n                this.collapse(false);\n            },\n\n            collapseAfter: function(node) {\n                this.setStartAfter(node);\n                this.collapse(true);\n            },\n\n            getBookmark: function(containerNode) {\n                var doc = getRangeDocument(this);\n                var preSelectionRange = api.createRange(doc);\n                containerNode = containerNode || dom.getBody(doc);\n                preSelectionRange.selectNodeContents(containerNode);\n                var range = this.intersection(preSelectionRange);\n                var start = 0, end = 0;\n                if (range) {\n                    preSelectionRange.setEnd(range.startContainer, range.startOffset);\n                    start = preSelectionRange.toString().length;\n                    end = start + range.toString().length;\n                }\n\n                return {\n                    start: start,\n                    end: end,\n                    containerNode: containerNode\n                };\n            },\n\n            moveToBookmark: function(bookmark) {\n                var containerNode = bookmark.containerNode;\n                var charIndex = 0;\n                this.setStart(containerNode, 0);\n                this.collapse(true);\n                var nodeStack = [containerNode], node, foundStart = false, stop = false;\n                var nextCharIndex, i, childNodes;\n\n                while (!stop && (node = nodeStack.pop())) {\n                    if (node.nodeType == 3) {\n                        nextCharIndex = charIndex + node.length;\n                        if (!foundStart && bookmark.start >= charIndex && bookmark.start <= nextCharIndex) {\n                            this.setStart(node, bookmark.start - charIndex);\n                            foundStart = true;\n                        }\n                        if (foundStart && bookmark.end >= charIndex && bookmark.end <= nextCharIndex) {\n                            this.setEnd(node, bookmark.end - charIndex);\n                            stop = true;\n                        }\n                        charIndex = nextCharIndex;\n                    } else {\n                        childNodes = node.childNodes;\n                        i = childNodes.length;\n                        while (i--) {\n                            nodeStack.push(childNodes[i]);\n                        }\n                    }\n                }\n            },\n\n            getName: function() {\n                return \"DomRange\";\n            },\n\n            equals: function(range) {\n                return Range.rangesEqual(this, range);\n            },\n\n            isValid: function() {\n                return isRangeValid(this);\n            },\n\n            inspect: function() {\n                return inspect(this);\n            },\n\n            detach: function() {\n                // In DOM4, detach() is now a no-op.\n            }\n        });\n\n        function copyComparisonConstantsToObject(obj) {\n            obj.START_TO_START = s2s;\n            obj.START_TO_END = s2e;\n            obj.END_TO_END = e2e;\n            obj.END_TO_START = e2s;\n\n            obj.NODE_BEFORE = n_b;\n            obj.NODE_AFTER = n_a;\n            obj.NODE_BEFORE_AND_AFTER = n_b_a;\n            obj.NODE_INSIDE = n_i;\n        }\n\n        function copyComparisonConstants(constructor) {\n            copyComparisonConstantsToObject(constructor);\n            copyComparisonConstantsToObject(constructor.prototype);\n        }\n\n        function createRangeContentRemover(remover, boundaryUpdater) {\n            return function() {\n                assertRangeValid(this);\n\n                var sc = this.startContainer, so = this.startOffset, root = this.commonAncestorContainer;\n\n                var iterator = new RangeIterator(this, true);\n\n                // Work out where to position the range after content removal\n                var node, boundary;\n                if (sc !== root) {\n                    node = getClosestAncestorIn(sc, root, true);\n                    boundary = getBoundaryAfterNode(node);\n                    sc = boundary.node;\n                    so = boundary.offset;\n                }\n\n                // Check none of the range is read-only\n                iterateSubtree(iterator, assertNodeNotReadOnly);\n\n                iterator.reset();\n\n                // Remove the content\n                var returnValue = remover(iterator);\n                iterator.detach();\n\n                // Move to the new position\n                boundaryUpdater(this, sc, so, sc, so);\n\n                return returnValue;\n            };\n        }\n\n        function createPrototypeRange(constructor, boundaryUpdater) {\n            function createBeforeAfterNodeSetter(isBefore, isStart) {\n                return function(node) {\n                    assertValidNodeType(node, beforeAfterNodeTypes);\n                    assertValidNodeType(getRootContainer(node), rootContainerNodeTypes);\n\n                    var boundary = (isBefore ? getBoundaryBeforeNode : getBoundaryAfterNode)(node);\n                    (isStart ? setRangeStart : setRangeEnd)(this, boundary.node, boundary.offset);\n                };\n            }\n\n            function setRangeStart(range, node, offset) {\n                var ec = range.endContainer, eo = range.endOffset;\n                if (node !== range.startContainer || offset !== range.startOffset) {\n                    // Check the root containers of the range and the new boundary, and also check whether the new boundary\n                    // is after the current end. In either case, collapse the range to the new position\n                    if (getRootContainer(node) != getRootContainer(ec) || comparePoints(node, offset, ec, eo) == 1) {\n                        ec = node;\n                        eo = offset;\n                    }\n                    boundaryUpdater(range, node, offset, ec, eo);\n                }\n            }\n\n            function setRangeEnd(range, node, offset) {\n                var sc = range.startContainer, so = range.startOffset;\n                if (node !== range.endContainer || offset !== range.endOffset) {\n                    // Check the root containers of the range and the new boundary, and also check whether the new boundary\n                    // is after the current end. In either case, collapse the range to the new position\n                    if (getRootContainer(node) != getRootContainer(sc) || comparePoints(node, offset, sc, so) == -1) {\n                        sc = node;\n                        so = offset;\n                    }\n                    boundaryUpdater(range, sc, so, node, offset);\n                }\n            }\n\n            // Set up inheritance\n            var F = function() {};\n            F.prototype = api.rangePrototype;\n            constructor.prototype = new F();\n\n            util.extend(constructor.prototype, {\n                setStart: function(node, offset) {\n                    assertNoDocTypeNotationEntityAncestor(node, true);\n                    assertValidOffset(node, offset);\n\n                    setRangeStart(this, node, offset);\n                },\n\n                setEnd: function(node, offset) {\n                    assertNoDocTypeNotationEntityAncestor(node, true);\n                    assertValidOffset(node, offset);\n\n                    setRangeEnd(this, node, offset);\n                },\n\n                /**\n                 * Convenience method to set a range's start and end boundaries. Overloaded as follows:\n                 * - Two parameters (node, offset) creates a collapsed range at that position\n                 * - Three parameters (node, startOffset, endOffset) creates a range contained with node starting at\n                 *   startOffset and ending at endOffset\n                 * - Four parameters (startNode, startOffset, endNode, endOffset) creates a range starting at startOffset in\n                 *   startNode and ending at endOffset in endNode\n                 */\n                setStartAndEnd: function() {\n                    var args = arguments;\n                    var sc = args[0], so = args[1], ec = sc, eo = so;\n\n                    switch (args.length) {\n                        case 3:\n                            eo = args[2];\n                            break;\n                        case 4:\n                            ec = args[2];\n                            eo = args[3];\n                            break;\n                    }\n\n                    assertNoDocTypeNotationEntityAncestor(sc, true);\n                    assertValidOffset(sc, so);\n\n                    assertNoDocTypeNotationEntityAncestor(ec, true);\n                    assertValidOffset(ec, eo);\n\n                    boundaryUpdater(this, sc, so, ec, eo);\n                },\n\n                setBoundary: function(node, offset, isStart) {\n                    this[\"set\" + (isStart ? \"Start\" : \"End\")](node, offset);\n                },\n\n                setStartBefore: createBeforeAfterNodeSetter(true, true),\n                setStartAfter: createBeforeAfterNodeSetter(false, true),\n                setEndBefore: createBeforeAfterNodeSetter(true, false),\n                setEndAfter: createBeforeAfterNodeSetter(false, false),\n\n                collapse: function(isStart) {\n                    assertRangeValid(this);\n                    if (isStart) {\n                        boundaryUpdater(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset);\n                    } else {\n                        boundaryUpdater(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);\n                    }\n                },\n\n                selectNodeContents: function(node) {\n                    assertNoDocTypeNotationEntityAncestor(node, true);\n\n                    boundaryUpdater(this, node, 0, node, getNodeLength(node));\n                },\n\n                selectNode: function(node) {\n                    assertNoDocTypeNotationEntityAncestor(node, false);\n                    assertValidNodeType(node, beforeAfterNodeTypes);\n\n                    var start = getBoundaryBeforeNode(node), end = getBoundaryAfterNode(node);\n                    boundaryUpdater(this, start.node, start.offset, end.node, end.offset);\n                },\n\n                extractContents: createRangeContentRemover(extractSubtree, boundaryUpdater),\n\n                deleteContents: createRangeContentRemover(deleteSubtree, boundaryUpdater),\n\n                canSurroundContents: function() {\n                    assertRangeValid(this);\n                    assertNodeNotReadOnly(this.startContainer);\n                    assertNodeNotReadOnly(this.endContainer);\n\n                    // Check if the contents can be surrounded. Specifically, this means whether the range partially selects\n                    // no non-text nodes.\n                    var iterator = new RangeIterator(this, true);\n                    var boundariesInvalid = (iterator._first && isNonTextPartiallySelected(iterator._first, this) ||\n                            (iterator._last && isNonTextPartiallySelected(iterator._last, this)));\n                    iterator.detach();\n                    return !boundariesInvalid;\n                },\n\n                splitBoundaries: function() {\n                    splitRangeBoundaries(this);\n                },\n\n                splitBoundariesPreservingPositions: function(positionsToPreserve) {\n                    splitRangeBoundaries(this, positionsToPreserve);\n                },\n\n                normalizeBoundaries: function() {\n                    assertRangeValid(this);\n\n                    var sc = this.startContainer, so = this.startOffset, ec = this.endContainer, eo = this.endOffset;\n\n                    var mergeForward = function(node) {\n                        var sibling = node.nextSibling;\n                        if (sibling && sibling.nodeType == node.nodeType) {\n                            ec = node;\n                            eo = node.length;\n                            node.appendData(sibling.data);\n                            removeNode(sibling);\n                        }\n                    };\n\n                    var mergeBackward = function(node) {\n                        var sibling = node.previousSibling;\n                        if (sibling && sibling.nodeType == node.nodeType) {\n                            sc = node;\n                            var nodeLength = node.length;\n                            so = sibling.length;\n                            node.insertData(0, sibling.data);\n                            removeNode(sibling);\n                            if (sc == ec) {\n                                eo += so;\n                                ec = sc;\n                            } else if (ec == node.parentNode) {\n                                var nodeIndex = getNodeIndex(node);\n                                if (eo == nodeIndex) {\n                                    ec = node;\n                                    eo = nodeLength;\n                                } else if (eo > nodeIndex) {\n                                    eo--;\n                                }\n                            }\n                        }\n                    };\n\n                    var normalizeStart = true;\n                    var sibling;\n\n                    if (isCharacterDataNode(ec)) {\n                        if (eo == ec.length) {\n                            mergeForward(ec);\n                        } else if (eo == 0) {\n                            sibling = ec.previousSibling;\n                            if (sibling && sibling.nodeType == ec.nodeType) {\n                                eo = sibling.length;\n                                if (sc == ec) {\n                                    normalizeStart = false;\n                                }\n                                sibling.appendData(ec.data);\n                                removeNode(ec);\n                                ec = sibling;\n                            }\n                        }\n                    } else {\n                        if (eo > 0) {\n                            var endNode = ec.childNodes[eo - 1];\n                            if (endNode && isCharacterDataNode(endNode)) {\n                                mergeForward(endNode);\n                            }\n                        }\n                        normalizeStart = !this.collapsed;\n                    }\n\n                    if (normalizeStart) {\n                        if (isCharacterDataNode(sc)) {\n                            if (so == 0) {\n                                mergeBackward(sc);\n                            } else if (so == sc.length) {\n                                sibling = sc.nextSibling;\n                                if (sibling && sibling.nodeType == sc.nodeType) {\n                                    if (ec == sibling) {\n                                        ec = sc;\n                                        eo += sc.length;\n                                    }\n                                    sc.appendData(sibling.data);\n                                    removeNode(sibling);\n                                }\n                            }\n                        } else {\n                            if (so < sc.childNodes.length) {\n                                var startNode = sc.childNodes[so];\n                                if (startNode && isCharacterDataNode(startNode)) {\n                                    mergeBackward(startNode);\n                                }\n                            }\n                        }\n                    } else {\n                        sc = ec;\n                        so = eo;\n                    }\n\n                    boundaryUpdater(this, sc, so, ec, eo);\n                },\n\n                collapseToPoint: function(node, offset) {\n                    assertNoDocTypeNotationEntityAncestor(node, true);\n                    assertValidOffset(node, offset);\n                    this.setStartAndEnd(node, offset);\n                },\n\n                parentElement: function() {\n                    assertRangeValid(this);\n                    var parentNode = this.commonAncestorContainer;\n                    return parentNode ? getElementAncestor(this.commonAncestorContainer, true) : null;\n                }\n            });\n\n            copyComparisonConstants(constructor);\n        }\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        // Updates commonAncestorContainer and collapsed after boundary change\n        function updateCollapsedAndCommonAncestor(range) {\n            range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset);\n            range.commonAncestorContainer = range.collapsed ?\n                range.startContainer : dom.getCommonAncestor(range.startContainer, range.endContainer);\n        }\n\n        function updateBoundaries(range, startContainer, startOffset, endContainer, endOffset) {\n            range.startContainer = startContainer;\n            range.startOffset = startOffset;\n            range.endContainer = endContainer;\n            range.endOffset = endOffset;\n            range.document = dom.getDocument(startContainer);\n            updateCollapsedAndCommonAncestor(range);\n        }\n\n        function Range(doc) {\n            updateBoundaries(this, doc, 0, doc, 0);\n        }\n\n        createPrototypeRange(Range, updateBoundaries);\n\n        util.extend(Range, {\n            rangeProperties: rangeProperties,\n            RangeIterator: RangeIterator,\n            copyComparisonConstants: copyComparisonConstants,\n            createPrototypeRange: createPrototypeRange,\n            inspect: inspect,\n            toHtml: rangeToHtml,\n            getRangeDocument: getRangeDocument,\n            rangesEqual: function(r1, r2) {\n                return r1.startContainer === r2.startContainer &&\n                    r1.startOffset === r2.startOffset &&\n                    r1.endContainer === r2.endContainer &&\n                    r1.endOffset === r2.endOffset;\n            }\n        });\n\n        api.DomRange = Range;\n    });\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // Wrappers for the browser's native DOM Range and/or TextRange implementation\n    api.createCoreModule(\"WrappedRange\", [\"DomRange\"], function(api, module) {\n        var WrappedRange, WrappedTextRange;\n        var dom = api.dom;\n        var util = api.util;\n        var DomPosition = dom.DomPosition;\n        var DomRange = api.DomRange;\n        var getBody = dom.getBody;\n        var getContentDocument = dom.getContentDocument;\n        var isCharacterDataNode = dom.isCharacterDataNode;\n\n\n        /*----------------------------------------------------------------------------------------------------------------*/\n\n        if (api.features.implementsDomRange) {\n            // This is a wrapper around the browser's native DOM Range. It has two aims:\n            // - Provide workarounds for specific browser bugs\n            // - provide convenient extensions, which are inherited from Rangy's DomRange\n\n            (function() {\n                var rangeProto;\n                var rangeProperties = DomRange.rangeProperties;\n\n                function updateRangeProperties(range) {\n                    var i = rangeProperties.length, prop;\n                    while (i--) {\n                        prop = rangeProperties[i];\n                        range[prop] = range.nativeRange[prop];\n                    }\n                    // Fix for broken collapsed property in IE 9.\n                    range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset);\n                }\n\n                function updateNativeRange(range, startContainer, startOffset, endContainer, endOffset) {\n                    var startMoved = (range.startContainer !== startContainer || range.startOffset != startOffset);\n                    var endMoved = (range.endContainer !== endContainer || range.endOffset != endOffset);\n                    var nativeRangeDifferent = !range.equals(range.nativeRange);\n\n                    // Always set both boundaries for the benefit of IE9 (see issue 35)\n                    if (startMoved || endMoved || nativeRangeDifferent) {\n                        range.setEnd(endContainer, endOffset);\n                        range.setStart(startContainer, startOffset);\n                    }\n                }\n\n                var createBeforeAfterNodeSetter;\n\n                WrappedRange = function(range) {\n                    if (!range) {\n                        throw module.createError(\"WrappedRange: Range must be specified\");\n                    }\n                    this.nativeRange = range;\n                    updateRangeProperties(this);\n                };\n\n                DomRange.createPrototypeRange(WrappedRange, updateNativeRange);\n\n                rangeProto = WrappedRange.prototype;\n\n                rangeProto.selectNode = function(node) {\n                    this.nativeRange.selectNode(node);\n                    updateRangeProperties(this);\n                };\n\n                rangeProto.cloneContents = function() {\n                    return this.nativeRange.cloneContents();\n                };\n\n                // Due to a long-standing Firefox bug that I have not been able to find a reliable way to detect,\n                // insertNode() is never delegated to the native range.\n\n                rangeProto.surroundContents = function(node) {\n                    this.nativeRange.surroundContents(node);\n                    updateRangeProperties(this);\n                };\n\n                rangeProto.collapse = function(isStart) {\n                    this.nativeRange.collapse(isStart);\n                    updateRangeProperties(this);\n                };\n\n                rangeProto.cloneRange = function() {\n                    return new WrappedRange(this.nativeRange.cloneRange());\n                };\n\n                rangeProto.refresh = function() {\n                    updateRangeProperties(this);\n                };\n\n                rangeProto.toString = function() {\n                    return this.nativeRange.toString();\n                };\n\n                // Create test range and node for feature detection\n\n                var testTextNode = document.createTextNode(\"test\");\n                getBody(document).appendChild(testTextNode);\n                var range = document.createRange();\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Test for Firefox 2 bug that prevents moving the start of a Range to a point after its current end and\n                // correct for it\n\n                range.setStart(testTextNode, 0);\n                range.setEnd(testTextNode, 0);\n\n                try {\n                    range.setStart(testTextNode, 1);\n\n                    rangeProto.setStart = function(node, offset) {\n                        this.nativeRange.setStart(node, offset);\n                        updateRangeProperties(this);\n                    };\n\n                    rangeProto.setEnd = function(node, offset) {\n                        this.nativeRange.setEnd(node, offset);\n                        updateRangeProperties(this);\n                    };\n\n                    createBeforeAfterNodeSetter = function(name) {\n                        return function(node) {\n                            this.nativeRange[name](node);\n                            updateRangeProperties(this);\n                        };\n                    };\n\n                } catch(ex) {\n\n                    rangeProto.setStart = function(node, offset) {\n                        try {\n                            this.nativeRange.setStart(node, offset);\n                        } catch (ex) {\n                            this.nativeRange.setEnd(node, offset);\n                            this.nativeRange.setStart(node, offset);\n                        }\n                        updateRangeProperties(this);\n                    };\n\n                    rangeProto.setEnd = function(node, offset) {\n                        try {\n                            this.nativeRange.setEnd(node, offset);\n                        } catch (ex) {\n                            this.nativeRange.setStart(node, offset);\n                            this.nativeRange.setEnd(node, offset);\n                        }\n                        updateRangeProperties(this);\n                    };\n\n                    createBeforeAfterNodeSetter = function(name, oppositeName) {\n                        return function(node) {\n                            try {\n                                this.nativeRange[name](node);\n                            } catch (ex) {\n                                this.nativeRange[oppositeName](node);\n                                this.nativeRange[name](node);\n                            }\n                            updateRangeProperties(this);\n                        };\n                    };\n                }\n\n                rangeProto.setStartBefore = createBeforeAfterNodeSetter(\"setStartBefore\", \"setEndBefore\");\n                rangeProto.setStartAfter = createBeforeAfterNodeSetter(\"setStartAfter\", \"setEndAfter\");\n                rangeProto.setEndBefore = createBeforeAfterNodeSetter(\"setEndBefore\", \"setStartBefore\");\n                rangeProto.setEndAfter = createBeforeAfterNodeSetter(\"setEndAfter\", \"setStartAfter\");\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Always use DOM4-compliant selectNodeContents implementation: it's simpler and less code than testing\n                // whether the native implementation can be trusted\n                rangeProto.selectNodeContents = function(node) {\n                    this.setStartAndEnd(node, 0, dom.getNodeLength(node));\n                };\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Test for and correct WebKit bug that has the behaviour of compareBoundaryPoints round the wrong way for\n                // constants START_TO_END and END_TO_START: https://bugs.webkit.org/show_bug.cgi?id=20738\n\n                range.selectNodeContents(testTextNode);\n                range.setEnd(testTextNode, 3);\n\n                var range2 = document.createRange();\n                range2.selectNodeContents(testTextNode);\n                range2.setEnd(testTextNode, 4);\n                range2.setStart(testTextNode, 2);\n\n                if (range.compareBoundaryPoints(range.START_TO_END, range2) == -1 &&\n                        range.compareBoundaryPoints(range.END_TO_START, range2) == 1) {\n                    // This is the wrong way round, so correct for it\n\n                    rangeProto.compareBoundaryPoints = function(type, range) {\n                        range = range.nativeRange || range;\n                        if (type == range.START_TO_END) {\n                            type = range.END_TO_START;\n                        } else if (type == range.END_TO_START) {\n                            type = range.START_TO_END;\n                        }\n                        return this.nativeRange.compareBoundaryPoints(type, range);\n                    };\n                } else {\n                    rangeProto.compareBoundaryPoints = function(type, range) {\n                        return this.nativeRange.compareBoundaryPoints(type, range.nativeRange || range);\n                    };\n                }\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Test for IE deleteContents() and extractContents() bug and correct it. See issue 107.\n\n                var el = document.createElement(\"div\");\n                el.innerHTML = \"123\";\n                var textNode = el.firstChild;\n                var body = getBody(document);\n                body.appendChild(el);\n\n                range.setStart(textNode, 1);\n                range.setEnd(textNode, 2);\n                range.deleteContents();\n\n                if (textNode.data == \"13\") {\n                    // Behaviour is correct per DOM4 Range so wrap the browser's implementation of deleteContents() and\n                    // extractContents()\n                    rangeProto.deleteContents = function() {\n                        this.nativeRange.deleteContents();\n                        updateRangeProperties(this);\n                    };\n\n                    rangeProto.extractContents = function() {\n                        var frag = this.nativeRange.extractContents();\n                        updateRangeProperties(this);\n                        return frag;\n                    };\n                } else {\n                }\n\n                body.removeChild(el);\n                body = null;\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Test for existence of createContextualFragment and delegate to it if it exists\n                if (util.isHostMethod(range, \"createContextualFragment\")) {\n                    rangeProto.createContextualFragment = function(fragmentStr) {\n                        return this.nativeRange.createContextualFragment(fragmentStr);\n                    };\n                }\n\n                /*--------------------------------------------------------------------------------------------------------*/\n\n                // Clean up\n                getBody(document).removeChild(testTextNode);\n\n                rangeProto.getName = function() {\n                    return \"WrappedRange\";\n                };\n\n                api.WrappedRange = WrappedRange;\n\n                api.createNativeRange = function(doc) {\n                    doc = getContentDocument(doc, module, \"createNativeRange\");\n                    return doc.createRange();\n                };\n            })();\n        }\n\n        if (api.features.implementsTextRange) {\n            /*\n            This is a workaround for a bug where IE returns the wrong container element from the TextRange's parentElement()\n            method. For example, in the following (where pipes denote the selection boundaries):\n\n            <ul id=\"ul\"><li id=\"a\">| a </li><li id=\"b\"> b |</li></ul>\n\n            var range = document.selection.createRange();\n            alert(range.parentElement().id); // Should alert \"ul\" but alerts \"b\"\n\n            This method returns the common ancestor node of the following:\n            - the parentElement() of the textRange\n            - the parentElement() of the textRange after calling collapse(true)\n            - the parentElement() of the textRange after calling collapse(false)\n            */\n            var getTextRangeContainerElement = function(textRange) {\n                var parentEl = textRange.parentElement();\n                var range = textRange.duplicate();\n                range.collapse(true);\n                var startEl = range.parentElement();\n                range = textRange.duplicate();\n                range.collapse(false);\n                var endEl = range.parentElement();\n                var startEndContainer = (startEl == endEl) ? startEl : dom.getCommonAncestor(startEl, endEl);\n\n                return startEndContainer == parentEl ? startEndContainer : dom.getCommonAncestor(parentEl, startEndContainer);\n            };\n\n            var textRangeIsCollapsed = function(textRange) {\n                return textRange.compareEndPoints(\"StartToEnd\", textRange) == 0;\n            };\n\n            // Gets the boundary of a TextRange expressed as a node and an offset within that node. This function started\n            // out as an improved version of code found in Tim Cameron Ryan's IERange (http://code.google.com/p/ierange/)\n            // but has grown, fixing problems with line breaks in preformatted text, adding workaround for IE TextRange\n            // bugs, handling for inputs and images, plus optimizations.\n            var getTextRangeBoundaryPosition = function(textRange, wholeRangeContainerElement, isStart, isCollapsed, startInfo) {\n                var workingRange = textRange.duplicate();\n                workingRange.collapse(isStart);\n                var containerElement = workingRange.parentElement();\n\n                // Sometimes collapsing a TextRange that's at the start of a text node can move it into the previous node, so\n                // check for that\n                if (!dom.isOrIsAncestorOf(wholeRangeContainerElement, containerElement)) {\n                    containerElement = wholeRangeContainerElement;\n                }\n\n\n                // Deal with nodes that cannot \"contain rich HTML markup\". In practice, this means form inputs, images and\n                // similar. See http://msdn.microsoft.com/en-us/library/aa703950%28VS.85%29.aspx\n                if (!containerElement.canHaveHTML) {\n                    var pos = new DomPosition(containerElement.parentNode, dom.getNodeIndex(containerElement));\n                    return {\n                        boundaryPosition: pos,\n                        nodeInfo: {\n                            nodeIndex: pos.offset,\n                            containerElement: pos.node\n                        }\n                    };\n                }\n\n                var workingNode = dom.getDocument(containerElement).createElement(\"span\");\n\n                // Workaround for HTML5 Shiv's insane violation of document.createElement(). See Rangy issue 104 and HTML5\n                // Shiv issue 64: https://github.com/aFarkas/html5shiv/issues/64\n                if (workingNode.parentNode) {\n                    dom.removeNode(workingNode);\n                }\n\n                var comparison, workingComparisonType = isStart ? \"StartToStart\" : \"StartToEnd\";\n                var previousNode, nextNode, boundaryPosition, boundaryNode;\n                var start = (startInfo && startInfo.containerElement == containerElement) ? startInfo.nodeIndex : 0;\n                var childNodeCount = containerElement.childNodes.length;\n                var end = childNodeCount;\n\n                // Check end first. Code within the loop assumes that the endth child node of the container is definitely\n                // after the range boundary.\n                var nodeIndex = end;\n\n                while (true) {\n                    if (nodeIndex == childNodeCount) {\n                        containerElement.appendChild(workingNode);\n                    } else {\n                        containerElement.insertBefore(workingNode, containerElement.childNodes[nodeIndex]);\n                    }\n                    workingRange.moveToElementText(workingNode);\n                    comparison = workingRange.compareEndPoints(workingComparisonType, textRange);\n                    if (comparison == 0 || start == end) {\n                        break;\n                    } else if (comparison == -1) {\n                        if (end == start + 1) {\n                            // We know the endth child node is after the range boundary, so we must be done.\n                            break;\n                        } else {\n                            start = nodeIndex;\n                        }\n                    } else {\n                        end = (end == start + 1) ? start : nodeIndex;\n                    }\n                    nodeIndex = Math.floor((start + end) / 2);\n                    containerElement.removeChild(workingNode);\n                }\n\n\n                // We've now reached or gone past the boundary of the text range we're interested in\n                // so have identified the node we want\n                boundaryNode = workingNode.nextSibling;\n\n                if (comparison == -1 && boundaryNode && isCharacterDataNode(boundaryNode)) {\n                    // This is a character data node (text, comment, cdata). The working range is collapsed at the start of\n                    // the node containing the text range's boundary, so we move the end of the working range to the\n                    // boundary point and measure the length of its text to get the boundary's offset within the node.\n                    workingRange.setEndPoint(isStart ? \"EndToStart\" : \"EndToEnd\", textRange);\n\n                    var offset;\n\n                    if (/[\\r\\n]/.test(boundaryNode.data)) {\n                        /*\n                        For the particular case of a boundary within a text node containing rendered line breaks (within a\n                        <pre> element, for example), we need a slightly complicated approach to get the boundary's offset in\n                        IE. The facts:\n\n                        - Each line break is represented as \\r in the text node's data/nodeValue properties\n                        - Each line break is represented as \\r\\n in the TextRange's 'text' property\n                        - The 'text' property of the TextRange does not contain trailing line breaks\n\n                        To get round the problem presented by the final fact above, we can use the fact that TextRange's\n                        moveStart() and moveEnd() methods return the actual number of characters moved, which is not\n                        necessarily the same as the number of characters it was instructed to move. The simplest approach is\n                        to use this to store the characters moved when moving both the start and end of the range to the\n                        start of the document body and subtracting the start offset from the end offset (the\n                        \"move-negative-gazillion\" method). However, this is extremely slow when the document is large and\n                        the range is near the end of it. Clearly doing the mirror image (i.e. moving the range boundaries to\n                        the end of the document) has the same problem.\n\n                        Another approach that works is to use moveStart() to move the start boundary of the range up to the\n                        end boundary one character at a time and incrementing a counter with the value returned by the\n                        moveStart() call. However, the check for whether the start boundary has reached the end boundary is\n                        expensive, so this method is slow (although unlike \"move-negative-gazillion\" is largely unaffected\n                        by the location of the range within the document).\n\n                        The approach used below is a hybrid of the two methods above. It uses the fact that a string\n                        containing the TextRange's 'text' property with each \\r\\n converted to a single \\r character cannot\n                        be longer than the text of the TextRange, so the start of the range is moved that length initially\n                        and then a character at a time to make up for any trailing line breaks not contained in the 'text'\n                        property. This has good performance in most situations compared to the previous two methods.\n                        */\n                        var tempRange = workingRange.duplicate();\n                        var rangeLength = tempRange.text.replace(/\\r\\n/g, \"\\r\").length;\n\n                        offset = tempRange.moveStart(\"character\", rangeLength);\n                        while ( (comparison = tempRange.compareEndPoints(\"StartToEnd\", tempRange)) == -1) {\n                            offset++;\n                            tempRange.moveStart(\"character\", 1);\n                        }\n                    } else {\n                        offset = workingRange.text.length;\n                    }\n                    boundaryPosition = new DomPosition(boundaryNode, offset);\n                } else {\n\n                    // If the boundary immediately follows a character data node and this is the end boundary, we should favour\n                    // a position within that, and likewise for a start boundary preceding a character data node\n                    previousNode = (isCollapsed || !isStart) && workingNode.previousSibling;\n                    nextNode = (isCollapsed || isStart) && workingNode.nextSibling;\n                    if (nextNode && isCharacterDataNode(nextNode)) {\n                        boundaryPosition = new DomPosition(nextNode, 0);\n                    } else if (previousNode && isCharacterDataNode(previousNode)) {\n                        boundaryPosition = new DomPosition(previousNode, previousNode.data.length);\n                    } else {\n                        boundaryPosition = new DomPosition(containerElement, dom.getNodeIndex(workingNode));\n                    }\n                }\n\n                // Clean up\n                dom.removeNode(workingNode);\n\n                return {\n                    boundaryPosition: boundaryPosition,\n                    nodeInfo: {\n                        nodeIndex: nodeIndex,\n                        containerElement: containerElement\n                    }\n                };\n            };\n\n            // Returns a TextRange representing the boundary of a TextRange expressed as a node and an offset within that\n            // node. This function started out as an optimized version of code found in Tim Cameron Ryan's IERange\n            // (http://code.google.com/p/ierange/)\n            var createBoundaryTextRange = function(boundaryPosition, isStart) {\n                var boundaryNode, boundaryParent, boundaryOffset = boundaryPosition.offset;\n                var doc = dom.getDocument(boundaryPosition.node);\n                var workingNode, childNodes, workingRange = getBody(doc).createTextRange();\n                var nodeIsDataNode = isCharacterDataNode(boundaryPosition.node);\n\n                if (nodeIsDataNode) {\n                    boundaryNode = boundaryPosition.node;\n                    boundaryParent = boundaryNode.parentNode;\n                } else {\n                    childNodes = boundaryPosition.node.childNodes;\n                    boundaryNode = (boundaryOffset < childNodes.length) ? childNodes[boundaryOffset] : null;\n                    boundaryParent = boundaryPosition.node;\n                }\n\n                // Position the range immediately before the node containing the boundary\n                workingNode = doc.createElement(\"span\");\n\n                // Making the working element non-empty element persuades IE to consider the TextRange boundary to be within\n                // the element rather than immediately before or after it\n                workingNode.innerHTML = \"&#feff;\";\n\n                // insertBefore is supposed to work like appendChild if the second parameter is null. However, a bug report\n                // for IERange suggests that it can crash the browser: http://code.google.com/p/ierange/issues/detail?id=12\n                if (boundaryNode) {\n                    boundaryParent.insertBefore(workingNode, boundaryNode);\n                } else {\n                    boundaryParent.appendChild(workingNode);\n                }\n\n                workingRange.moveToElementText(workingNode);\n                workingRange.collapse(!isStart);\n\n                // Clean up\n                boundaryParent.removeChild(workingNode);\n\n                // Move the working range to the text offset, if required\n                if (nodeIsDataNode) {\n                    workingRange[isStart ? \"moveStart\" : \"moveEnd\"](\"character\", boundaryOffset);\n                }\n\n                return workingRange;\n            };\n\n            /*------------------------------------------------------------------------------------------------------------*/\n\n            // This is a wrapper around a TextRange, providing full DOM Range functionality using rangy's DomRange as a\n            // prototype\n\n            WrappedTextRange = function(textRange) {\n                this.textRange = textRange;\n                this.refresh();\n            };\n\n            WrappedTextRange.prototype = new DomRange(document);\n\n            WrappedTextRange.prototype.refresh = function() {\n                var start, end, startBoundary;\n\n                // TextRange's parentElement() method cannot be trusted. getTextRangeContainerElement() works around that.\n                var rangeContainerElement = getTextRangeContainerElement(this.textRange);\n\n                if (textRangeIsCollapsed(this.textRange)) {\n                    end = start = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, true,\n                        true).boundaryPosition;\n                } else {\n                    startBoundary = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, true, false);\n                    start = startBoundary.boundaryPosition;\n\n                    // An optimization used here is that if the start and end boundaries have the same parent element, the\n                    // search scope for the end boundary can be limited to exclude the portion of the element that precedes\n                    // the start boundary\n                    end = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, false, false,\n                        startBoundary.nodeInfo).boundaryPosition;\n                }\n\n                this.setStart(start.node, start.offset);\n                this.setEnd(end.node, end.offset);\n            };\n\n            WrappedTextRange.prototype.getName = function() {\n                return \"WrappedTextRange\";\n            };\n\n            DomRange.copyComparisonConstants(WrappedTextRange);\n\n            var rangeToTextRange = function(range) {\n                if (range.collapsed) {\n                    return createBoundaryTextRange(new DomPosition(range.startContainer, range.startOffset), true);\n                } else {\n                    var startRange = createBoundaryTextRange(new DomPosition(range.startContainer, range.startOffset), true);\n                    var endRange = createBoundaryTextRange(new DomPosition(range.endContainer, range.endOffset), false);\n                    var textRange = getBody( DomRange.getRangeDocument(range) ).createTextRange();\n                    textRange.setEndPoint(\"StartToStart\", startRange);\n                    textRange.setEndPoint(\"EndToEnd\", endRange);\n                    return textRange;\n                }\n            };\n\n            WrappedTextRange.rangeToTextRange = rangeToTextRange;\n\n            WrappedTextRange.prototype.toTextRange = function() {\n                return rangeToTextRange(this);\n            };\n\n            api.WrappedTextRange = WrappedTextRange;\n\n            // IE 9 and above have both implementations and Rangy makes both available. The next few lines sets which\n            // implementation to use by default.\n            if (!api.features.implementsDomRange || api.config.preferTextRange) {\n                // Add WrappedTextRange as the Range property of the global object to allow expression like Range.END_TO_END to work\n                var globalObj = (function(f) { return f(\"return this;\")(); })(Function);\n                if (typeof globalObj.Range == \"undefined\") {\n                    globalObj.Range = WrappedTextRange;\n                }\n\n                api.createNativeRange = function(doc) {\n                    doc = getContentDocument(doc, module, \"createNativeRange\");\n                    return getBody(doc).createTextRange();\n                };\n\n                api.WrappedRange = WrappedTextRange;\n            }\n        }\n\n        api.createRange = function(doc) {\n            doc = getContentDocument(doc, module, \"createRange\");\n            return new api.WrappedRange(api.createNativeRange(doc));\n        };\n\n        api.createRangyRange = function(doc) {\n            doc = getContentDocument(doc, module, \"createRangyRange\");\n            return new DomRange(doc);\n        };\n\n        util.createAliasForDeprecatedMethod(api, \"createIframeRange\", \"createRange\");\n        util.createAliasForDeprecatedMethod(api, \"createIframeRangyRange\", \"createRangyRange\");\n\n        api.addShimListener(function(win) {\n            var doc = win.document;\n            if (typeof doc.createRange == \"undefined\") {\n                doc.createRange = function() {\n                    return api.createRange(doc);\n                };\n            }\n            doc = win = null;\n        });\n    });\n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // This module creates a selection object wrapper that conforms as closely as possible to the Selection specification\n    // in the W3C Selection API spec (https://www.w3.org/TR/selection-api)\n    api.createCoreModule(\"WrappedSelection\", [\"DomRange\", \"WrappedRange\"], function(api, module) {\n        api.config.checkSelectionRanges = true;\n\n        var BOOLEAN = \"boolean\";\n        var NUMBER = \"number\";\n        var dom = api.dom;\n        var util = api.util;\n        var isHostMethod = util.isHostMethod;\n        var DomRange = api.DomRange;\n        var WrappedRange = api.WrappedRange;\n        var DOMException = api.DOMException;\n        var DomPosition = dom.DomPosition;\n        var getNativeSelection;\n        var selectionIsCollapsed;\n        var features = api.features;\n        var CONTROL = \"Control\";\n        var getDocument = dom.getDocument;\n        var getBody = dom.getBody;\n        var rangesEqual = DomRange.rangesEqual;\n\n\n        // Utility function to support direction parameters in the API that may be a string (\"backward\", \"backwards\",\n        // \"forward\" or \"forwards\") or a Boolean (true for backwards).\n        function isDirectionBackward(dir) {\n            return (typeof dir == \"string\") ? /^backward(s)?$/i.test(dir) : !!dir;\n        }\n\n        function getWindow(win, methodName) {\n            if (!win) {\n                return window;\n            } else if (dom.isWindow(win)) {\n                return win;\n            } else if (win instanceof WrappedSelection) {\n                return win.win;\n            } else {\n                var doc = dom.getContentDocument(win, module, methodName);\n                return dom.getWindow(doc);\n            }\n        }\n\n        function getWinSelection(winParam) {\n            return getWindow(winParam, \"getWinSelection\").getSelection();\n        }\n\n        function getDocSelection(winParam) {\n            return getWindow(winParam, \"getDocSelection\").document.selection;\n        }\n\n        function winSelectionIsBackward(sel) {\n            var backward = false;\n            if (sel.anchorNode) {\n                backward = (dom.comparePoints(sel.anchorNode, sel.anchorOffset, sel.focusNode, sel.focusOffset) == 1);\n            }\n            return backward;\n        }\n\n        // Test for the Range/TextRange and Selection features required\n        // Test for ability to retrieve selection\n        var implementsWinGetSelection = isHostMethod(window, \"getSelection\"),\n            implementsDocSelection = util.isHostObject(document, \"selection\");\n\n        features.implementsWinGetSelection = implementsWinGetSelection;\n        features.implementsDocSelection = implementsDocSelection;\n\n        var useDocumentSelection = implementsDocSelection && (!implementsWinGetSelection || api.config.preferTextRange);\n\n        if (useDocumentSelection) {\n            getNativeSelection = getDocSelection;\n            api.isSelectionValid = function(winParam) {\n                var doc = getWindow(winParam, \"isSelectionValid\").document, nativeSel = doc.selection;\n\n                // Check whether the selection TextRange is actually contained within the correct document\n                return (nativeSel.type != \"None\" || getDocument(nativeSel.createRange().parentElement()) == doc);\n            };\n        } else if (implementsWinGetSelection) {\n            getNativeSelection = getWinSelection;\n            api.isSelectionValid = function() {\n                return true;\n            };\n        } else {\n            module.fail(\"Neither document.selection or window.getSelection() detected.\");\n            return false;\n        }\n\n        api.getNativeSelection = getNativeSelection;\n\n        var testSelection = getNativeSelection();\n\n        // In Firefox, the selection is null in an iframe with display: none. See issue #138.\n        if (!testSelection) {\n            module.fail(\"Native selection was null (possibly issue 138?)\");\n            return false;\n        }\n\n        var testRange = api.createNativeRange(document);\n        var body = getBody(document);\n\n        // Obtaining a range from a selection\n        var selectionHasAnchorAndFocus = util.areHostProperties(testSelection,\n            [\"anchorNode\", \"focusNode\", \"anchorOffset\", \"focusOffset\"]);\n\n        features.selectionHasAnchorAndFocus = selectionHasAnchorAndFocus;\n\n        // Test for existence of native selection extend() method\n        var selectionHasExtend = isHostMethod(testSelection, \"extend\");\n        features.selectionHasExtend = selectionHasExtend;\n\n        // Test for existence of native selection setBaseAndExtent() method\n        var selectionHasSetBaseAndExtent = isHostMethod(testSelection, \"setBaseAndExtent\");\n        features.selectionHasSetBaseAndExtent = selectionHasSetBaseAndExtent;\n\n        // Test if rangeCount exists\n        var selectionHasRangeCount = (typeof testSelection.rangeCount == NUMBER);\n        features.selectionHasRangeCount = selectionHasRangeCount;\n\n        var selectionSupportsMultipleRanges = false;\n        var collapsedNonEditableSelectionsSupported = true;\n\n        var addRangeBackwardToNative = selectionHasExtend ?\n            function(nativeSelection, range) {\n                var doc = DomRange.getRangeDocument(range);\n                var endRange = api.createRange(doc);\n                endRange.collapseToPoint(range.endContainer, range.endOffset);\n                nativeSelection.addRange(getNativeRange(endRange));\n                nativeSelection.extend(range.startContainer, range.startOffset);\n            } : null;\n\n        if (util.areHostMethods(testSelection, [\"addRange\", \"getRangeAt\", \"removeAllRanges\"]) &&\n                typeof testSelection.rangeCount == NUMBER && features.implementsDomRange) {\n\n            (function() {\n                // Previously an iframe was used but this caused problems in some circumstances in IE, so tests are\n                // performed on the current document's selection. See issue 109.\n\n                // Note also that if a selection previously existed, it is wiped and later restored by these tests. This\n                // will result in the selection direction being reversed if the original selection was backwards and the\n                // browser does not support setting backwards selections (Internet Explorer, I'm looking at you).\n                var sel = window.getSelection();\n                if (sel) {\n                    // Store the current selection\n                    var originalSelectionRangeCount = sel.rangeCount;\n                    var selectionHasMultipleRanges = (originalSelectionRangeCount > 1);\n                    var originalSelectionRanges = [];\n                    var originalSelectionBackward = winSelectionIsBackward(sel);\n                    for (var i = 0; i < originalSelectionRangeCount; ++i) {\n                        originalSelectionRanges[i] = sel.getRangeAt(i);\n                    }\n\n                    // Create some test elements\n                    var testEl = dom.createTestElement(document, \"\", false);\n                    var textNode = testEl.appendChild( document.createTextNode(\"\\u00a0\\u00a0\\u00a0\") );\n\n                    // Test whether the native selection will allow a collapsed selection within a non-editable element\n                    var r1 = document.createRange();\n\n                    r1.setStart(textNode, 1);\n                    r1.collapse(true);\n                    sel.removeAllRanges();\n                    sel.addRange(r1);\n                    collapsedNonEditableSelectionsSupported = (sel.rangeCount == 1);\n                    sel.removeAllRanges();\n\n                    // Test whether the native selection is capable of supporting multiple ranges.\n                    if (!selectionHasMultipleRanges) {\n                        // Doing the original feature test here in Chrome 36 (and presumably later versions) prints a\n                        // console error of \"Discontiguous selection is not supported.\" that cannot be suppressed. There's\n                        // nothing we can do about this while retaining the feature test so we have to resort to a browser\n                        // sniff. I'm not happy about it. See\n                        // https://code.google.com/p/chromium/issues/detail?id=399791\n                        var chromeMatch = window.navigator.appVersion.match(/Chrome\\/(.*?) /);\n                        if (chromeMatch && parseInt(chromeMatch[1]) >= 36) {\n                            selectionSupportsMultipleRanges = false;\n                        } else {\n                            var r2 = r1.cloneRange();\n                            r1.setStart(textNode, 0);\n                            r2.setEnd(textNode, 3);\n                            r2.setStart(textNode, 2);\n                            sel.addRange(r1);\n                            sel.addRange(r2);\n                            selectionSupportsMultipleRanges = (sel.rangeCount == 2);\n                        }\n                    }\n\n                    // Clean up\n                    dom.removeNode(testEl);\n                    sel.removeAllRanges();\n\n                    for (i = 0; i < originalSelectionRangeCount; ++i) {\n                        if (i == 0 && originalSelectionBackward) {\n                            if (addRangeBackwardToNative) {\n                                addRangeBackwardToNative(sel, originalSelectionRanges[i]);\n                            } else {\n                                api.warn(\"Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend\");\n                                sel.addRange(originalSelectionRanges[i]);\n                            }\n                        } else {\n                            sel.addRange(originalSelectionRanges[i]);\n                        }\n                    }\n                }\n            })();\n        }\n\n        features.selectionSupportsMultipleRanges = selectionSupportsMultipleRanges;\n        features.collapsedNonEditableSelectionsSupported = collapsedNonEditableSelectionsSupported;\n\n        // ControlRanges\n        var implementsControlRange = false, testControlRange;\n\n        if (body && isHostMethod(body, \"createControlRange\")) {\n            testControlRange = body.createControlRange();\n            if (util.areHostProperties(testControlRange, [\"item\", \"add\"])) {\n                implementsControlRange = true;\n            }\n        }\n        features.implementsControlRange = implementsControlRange;\n\n        // Selection collapsedness\n        if (selectionHasAnchorAndFocus) {\n            selectionIsCollapsed = function(sel) {\n                return sel.anchorNode === sel.focusNode && sel.anchorOffset === sel.focusOffset;\n            };\n        } else {\n            selectionIsCollapsed = function(sel) {\n                return sel.rangeCount ? sel.getRangeAt(sel.rangeCount - 1).collapsed : false;\n            };\n        }\n\n        function updateAnchorAndFocusFromRange(sel, range, backward) {\n            var anchorPrefix = backward ? \"end\" : \"start\", focusPrefix = backward ? \"start\" : \"end\";\n            sel.anchorNode = range[anchorPrefix + \"Container\"];\n            sel.anchorOffset = range[anchorPrefix + \"Offset\"];\n            sel.focusNode = range[focusPrefix + \"Container\"];\n            sel.focusOffset = range[focusPrefix + \"Offset\"];\n        }\n\n        function updateAnchorAndFocusFromNativeSelection(sel) {\n            var nativeSel = sel.nativeSelection;\n            sel.anchorNode = nativeSel.anchorNode;\n            sel.anchorOffset = nativeSel.anchorOffset;\n            sel.focusNode = nativeSel.focusNode;\n            sel.focusOffset = nativeSel.focusOffset;\n        }\n\n        function updateEmptySelection(sel) {\n            sel.anchorNode = sel.focusNode = null;\n            sel.anchorOffset = sel.focusOffset = 0;\n            sel.rangeCount = 0;\n            sel.isCollapsed = true;\n            sel._ranges.length = 0;\n            updateType(sel);\n        }\n\n        function updateType(sel) {\n            sel.type = (sel.rangeCount == 0) ? \"None\" : (selectionIsCollapsed(sel) ? \"Caret\" : \"Range\");\n        }\n\n        function getNativeRange(range) {\n            var nativeRange;\n            if (range instanceof DomRange) {\n                nativeRange = api.createNativeRange(range.getDocument());\n                nativeRange.setEnd(range.endContainer, range.endOffset);\n                nativeRange.setStart(range.startContainer, range.startOffset);\n            } else if (range instanceof WrappedRange) {\n                nativeRange = range.nativeRange;\n            } else if (features.implementsDomRange && (range instanceof dom.getWindow(range.startContainer).Range)) {\n                nativeRange = range;\n            }\n            return nativeRange;\n        }\n\n        function rangeContainsSingleElement(rangeNodes) {\n            if (!rangeNodes.length || rangeNodes[0].nodeType != 1) {\n                return false;\n            }\n            for (var i = 1, len = rangeNodes.length; i < len; ++i) {\n                if (!dom.isAncestorOf(rangeNodes[0], rangeNodes[i])) {\n                    return false;\n                }\n            }\n            return true;\n        }\n\n        function getSingleElementFromRange(range) {\n            var nodes = range.getNodes();\n            if (!rangeContainsSingleElement(nodes)) {\n                throw module.createError(\"getSingleElementFromRange: range \" + range.inspect() + \" did not consist of a single element\");\n            }\n            return nodes[0];\n        }\n\n        // Simple, quick test which only needs to distinguish between a TextRange and a ControlRange\n        function isTextRange(range) {\n            return !!range && typeof range.text != \"undefined\";\n        }\n\n        function updateFromTextRange(sel, range) {\n            // Create a Range from the selected TextRange\n            var wrappedRange = new WrappedRange(range);\n            sel._ranges = [wrappedRange];\n\n            updateAnchorAndFocusFromRange(sel, wrappedRange, false);\n            sel.rangeCount = 1;\n            sel.isCollapsed = wrappedRange.collapsed;\n            updateType(sel);\n        }\n\n        function updateControlSelection(sel) {\n            // Update the wrapped selection based on what's now in the native selection\n            sel._ranges.length = 0;\n            if (sel.docSelection.type == \"None\") {\n                updateEmptySelection(sel);\n            } else {\n                var controlRange = sel.docSelection.createRange();\n                if (isTextRange(controlRange)) {\n                    // This case (where the selection type is \"Control\" and calling createRange() on the selection returns\n                    // a TextRange) can happen in IE 9. It happens, for example, when all elements in the selected\n                    // ControlRange have been removed from the ControlRange and removed from the document.\n                    updateFromTextRange(sel, controlRange);\n                } else {\n                    sel.rangeCount = controlRange.length;\n                    var range, doc = getDocument(controlRange.item(0));\n                    for (var i = 0; i < sel.rangeCount; ++i) {\n                        range = api.createRange(doc);\n                        range.selectNode(controlRange.item(i));\n                        sel._ranges.push(range);\n                    }\n                    sel.isCollapsed = sel.rangeCount == 1 && sel._ranges[0].collapsed;\n                    updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], false);\n                    updateType(sel);\n                }\n            }\n        }\n\n        function addRangeToControlSelection(sel, range) {\n            var controlRange = sel.docSelection.createRange();\n            var rangeElement = getSingleElementFromRange(range);\n\n            // Create a new ControlRange containing all the elements in the selected ControlRange plus the element\n            // contained by the supplied range\n            var doc = getDocument(controlRange.item(0));\n            var newControlRange = getBody(doc).createControlRange();\n            for (var i = 0, len = controlRange.length; i < len; ++i) {\n                newControlRange.add(controlRange.item(i));\n            }\n            try {\n                newControlRange.add(rangeElement);\n            } catch (ex) {\n                throw module.createError(\"addRange(): Element within the specified Range could not be added to control selection (does it have layout?)\");\n            }\n            newControlRange.select();\n\n            // Update the wrapped selection based on what's now in the native selection\n            updateControlSelection(sel);\n        }\n\n        var getSelectionRangeAt;\n\n        if (isHostMethod(testSelection, \"getRangeAt\")) {\n            // try/catch is present because getRangeAt() must have thrown an error in some browser and some situation.\n            // Unfortunately, I didn't write a comment about the specifics and am now scared to take it out. Let that be a\n            // lesson to us all, especially me.\n            getSelectionRangeAt = function(sel, index) {\n                try {\n                    return sel.getRangeAt(index);\n                } catch (ex) {\n                    return null;\n                }\n            };\n        } else if (selectionHasAnchorAndFocus) {\n            getSelectionRangeAt = function(sel) {\n                var doc = getDocument(sel.anchorNode);\n                var range = api.createRange(doc);\n                range.setStartAndEnd(sel.anchorNode, sel.anchorOffset, sel.focusNode, sel.focusOffset);\n\n                // Handle the case when the selection was selected backwards (from the end to the start in the\n                // document)\n                if (range.collapsed !== this.isCollapsed) {\n                    range.setStartAndEnd(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset);\n                }\n\n                return range;\n            };\n        }\n\n        function WrappedSelection(selection, docSelection, win) {\n            this.nativeSelection = selection;\n            this.docSelection = docSelection;\n            this._ranges = [];\n            this.win = win;\n            this.refresh();\n        }\n\n        WrappedSelection.prototype = api.selectionPrototype;\n\n        function deleteProperties(sel) {\n            sel.win = sel.anchorNode = sel.focusNode = sel._ranges = null;\n            sel.rangeCount = sel.anchorOffset = sel.focusOffset = 0;\n            sel.detached = true;\n            updateType(sel);\n        }\n\n        var cachedRangySelections = [];\n\n        function actOnCachedSelection(win, action) {\n            var i = cachedRangySelections.length, cached, sel;\n            while (i--) {\n                cached = cachedRangySelections[i];\n                sel = cached.selection;\n                if (action == \"deleteAll\") {\n                    deleteProperties(sel);\n                } else if (cached.win == win) {\n                    if (action == \"delete\") {\n                        cachedRangySelections.splice(i, 1);\n                        return true;\n                    } else {\n                        return sel;\n                    }\n                }\n            }\n            if (action == \"deleteAll\") {\n                cachedRangySelections.length = 0;\n            }\n            return null;\n        }\n\n        var getSelection = function(win) {\n            // Check if the parameter is a Rangy Selection object\n            if (win && win instanceof WrappedSelection) {\n                win.refresh();\n                return win;\n            }\n\n            win = getWindow(win, \"getNativeSelection\");\n\n            var sel = actOnCachedSelection(win);\n            var nativeSel = getNativeSelection(win), docSel = implementsDocSelection ? getDocSelection(win) : null;\n            if (sel) {\n                sel.nativeSelection = nativeSel;\n                sel.docSelection = docSel;\n                sel.refresh();\n            } else {\n                sel = new WrappedSelection(nativeSel, docSel, win);\n                cachedRangySelections.push( { win: win, selection: sel } );\n            }\n            return sel;\n        };\n\n        api.getSelection = getSelection;\n\n        util.createAliasForDeprecatedMethod(api, \"getIframeSelection\", \"getSelection\");\n\n        var selProto = WrappedSelection.prototype;\n\n        function createControlSelection(sel, ranges) {\n            // Ensure that the selection becomes of type \"Control\"\n            var doc = getDocument(ranges[0].startContainer);\n            var controlRange = getBody(doc).createControlRange();\n            for (var i = 0, el, len = ranges.length; i < len; ++i) {\n                el = getSingleElementFromRange(ranges[i]);\n                try {\n                    controlRange.add(el);\n                } catch (ex) {\n                    throw module.createError(\"setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)\");\n                }\n            }\n            controlRange.select();\n\n            // Update the wrapped selection based on what's now in the native selection\n            updateControlSelection(sel);\n        }\n\n        // Selecting a range\n        if (!useDocumentSelection && selectionHasAnchorAndFocus && util.areHostMethods(testSelection, [\"removeAllRanges\", \"addRange\"])) {\n            selProto.removeAllRanges = function() {\n                this.nativeSelection.removeAllRanges();\n                updateEmptySelection(this);\n            };\n\n            var addRangeBackward = function(sel, range) {\n                addRangeBackwardToNative(sel.nativeSelection, range);\n                sel.refresh();\n            };\n\n            if (selectionHasRangeCount) {\n                selProto.addRange = function(range, direction) {\n                    if (implementsControlRange && implementsDocSelection && this.docSelection.type == CONTROL) {\n                        addRangeToControlSelection(this, range);\n                    } else {\n                        if (isDirectionBackward(direction) && selectionHasExtend) {\n                            addRangeBackward(this, range);\n                        } else {\n                            var previousRangeCount;\n                            if (selectionSupportsMultipleRanges) {\n                                previousRangeCount = this.rangeCount;\n                            } else {\n                                this.removeAllRanges();\n                                previousRangeCount = 0;\n                            }\n                            // Clone the native range so that changing the selected range does not affect the selection.\n                            // This is contrary to the spec but is the only way to achieve consistency between browsers. See\n                            // issue 80.\n                            var clonedNativeRange = getNativeRange(range).cloneRange();\n                            try {\n                                this.nativeSelection.addRange(clonedNativeRange);\n                            } catch (ex) {\n                            }\n\n                            // Check whether adding the range was successful\n                            this.rangeCount = this.nativeSelection.rangeCount;\n\n                            if (this.rangeCount == previousRangeCount + 1) {\n                                // The range was added successfully\n\n                                // Check whether the range that we added to the selection is reflected in the last range extracted from\n                                // the selection\n                                if (api.config.checkSelectionRanges) {\n                                    var nativeRange = getSelectionRangeAt(this.nativeSelection, this.rangeCount - 1);\n                                    if (nativeRange && !rangesEqual(nativeRange, range)) {\n                                        // Happens in WebKit with, for example, a selection placed at the start of a text node\n                                        range = new WrappedRange(nativeRange);\n                                    }\n                                }\n                                this._ranges[this.rangeCount - 1] = range;\n                                updateAnchorAndFocusFromRange(this, range, selectionIsBackward(this.nativeSelection));\n                                this.isCollapsed = selectionIsCollapsed(this);\n                                updateType(this);\n                            } else {\n                                // The range was not added successfully. The simplest thing is to refresh\n                                this.refresh();\n                            }\n                        }\n                    }\n                };\n            } else {\n                selProto.addRange = function(range, direction) {\n                    if (isDirectionBackward(direction) && selectionHasExtend) {\n                        addRangeBackward(this, range);\n                    } else {\n                        this.nativeSelection.addRange(getNativeRange(range));\n                        this.refresh();\n                    }\n                };\n            }\n\n            selProto.setRanges = function(ranges) {\n                if (implementsControlRange && implementsDocSelection && ranges.length > 1) {\n                    createControlSelection(this, ranges);\n                } else {\n                    this.removeAllRanges();\n                    for (var i = 0, len = ranges.length; i < len; ++i) {\n                        this.addRange(ranges[i]);\n                    }\n                }\n            };\n        } else if (isHostMethod(testSelection, \"empty\") && isHostMethod(testRange, \"select\") &&\n                   implementsControlRange && useDocumentSelection) {\n\n            selProto.removeAllRanges = function() {\n                // Added try/catch as fix for issue #21\n                try {\n                    this.docSelection.empty();\n\n                    // Check for empty() not working (issue #24)\n                    if (this.docSelection.type != \"None\") {\n                        // Work around failure to empty a control selection by instead selecting a TextRange and then\n                        // calling empty()\n                        var doc;\n                        if (this.anchorNode) {\n                            doc = getDocument(this.anchorNode);\n                        } else if (this.docSelection.type == CONTROL) {\n                            var controlRange = this.docSelection.createRange();\n                            if (controlRange.length) {\n                                doc = getDocument( controlRange.item(0) );\n                            }\n                        }\n                        if (doc) {\n                            var textRange = getBody(doc).createTextRange();\n                            textRange.select();\n                            this.docSelection.empty();\n                        }\n                    }\n                } catch(ex) {}\n                updateEmptySelection(this);\n            };\n\n            selProto.addRange = function(range) {\n                if (this.docSelection.type == CONTROL) {\n                    addRangeToControlSelection(this, range);\n                } else {\n                    api.WrappedTextRange.rangeToTextRange(range).select();\n                    this._ranges[0] = range;\n                    this.rangeCount = 1;\n                    this.isCollapsed = this._ranges[0].collapsed;\n                    updateAnchorAndFocusFromRange(this, range, false);\n                    updateType(this);\n                }\n            };\n\n            selProto.setRanges = function(ranges) {\n                this.removeAllRanges();\n                var rangeCount = ranges.length;\n                if (rangeCount > 1) {\n                    createControlSelection(this, ranges);\n                } else if (rangeCount) {\n                    this.addRange(ranges[0]);\n                }\n            };\n        } else {\n            module.fail(\"No means of selecting a Range or TextRange was found\");\n            return false;\n        }\n\n        selProto.getRangeAt = function(index) {\n            if (index < 0 || index >= this.rangeCount) {\n                throw new DOMException(\"INDEX_SIZE_ERR\");\n            } else {\n                // Clone the range to preserve selection-range independence. See issue 80.\n                return this._ranges[index].cloneRange();\n            }\n        };\n\n        var refreshSelection;\n\n        if (useDocumentSelection) {\n            refreshSelection = function(sel) {\n                var range;\n                if (api.isSelectionValid(sel.win)) {\n                    range = sel.docSelection.createRange();\n                } else {\n                    range = getBody(sel.win.document).createTextRange();\n                    range.collapse(true);\n                }\n\n                if (sel.docSelection.type == CONTROL) {\n                    updateControlSelection(sel);\n                } else if (isTextRange(range)) {\n                    updateFromTextRange(sel, range);\n                } else {\n                    updateEmptySelection(sel);\n                }\n            };\n        } else if (isHostMethod(testSelection, \"getRangeAt\") && typeof testSelection.rangeCount == NUMBER) {\n            refreshSelection = function(sel) {\n                if (implementsControlRange && implementsDocSelection && sel.docSelection.type == CONTROL) {\n                    updateControlSelection(sel);\n                } else {\n                    sel._ranges.length = sel.rangeCount = sel.nativeSelection.rangeCount;\n                    if (sel.rangeCount) {\n                        for (var i = 0, len = sel.rangeCount; i < len; ++i) {\n                            sel._ranges[i] = new api.WrappedRange(sel.nativeSelection.getRangeAt(i));\n                        }\n                        updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], selectionIsBackward(sel.nativeSelection));\n                        sel.isCollapsed = selectionIsCollapsed(sel);\n                        updateType(sel);\n                    } else {\n                        updateEmptySelection(sel);\n                    }\n                }\n            };\n        } else if (selectionHasAnchorAndFocus && typeof testSelection.isCollapsed == BOOLEAN && typeof testRange.collapsed == BOOLEAN && features.implementsDomRange) {\n            refreshSelection = function(sel) {\n                var range, nativeSel = sel.nativeSelection;\n                if (nativeSel.anchorNode) {\n                    range = getSelectionRangeAt(nativeSel, 0);\n                    sel._ranges = [range];\n                    sel.rangeCount = 1;\n                    updateAnchorAndFocusFromNativeSelection(sel);\n                    sel.isCollapsed = selectionIsCollapsed(sel);\n                    updateType(sel);\n                } else {\n                    updateEmptySelection(sel);\n                }\n            };\n        } else {\n            module.fail(\"No means of obtaining a Range or TextRange from the user's selection was found\");\n            return false;\n        }\n\n        selProto.refresh = function(checkForChanges) {\n            var oldRanges = checkForChanges ? this._ranges.slice(0) : null;\n            var oldAnchorNode = this.anchorNode, oldAnchorOffset = this.anchorOffset;\n\n            refreshSelection(this);\n            if (checkForChanges) {\n                // Check the range count first\n                var i = oldRanges.length;\n                if (i != this._ranges.length) {\n                    return true;\n                }\n\n                // Now check the direction. Checking the anchor position is the same is enough since we're checking all the\n                // ranges after this\n                if (this.anchorNode != oldAnchorNode || this.anchorOffset != oldAnchorOffset) {\n                    return true;\n                }\n\n                // Finally, compare each range in turn\n                while (i--) {\n                    if (!rangesEqual(oldRanges[i], this._ranges[i])) {\n                        return true;\n                    }\n                }\n                return false;\n            }\n        };\n\n        // Removal of a single range\n        var removeRangeManually = function(sel, range) {\n            var ranges = sel.getAllRanges();\n            sel.removeAllRanges();\n            for (var i = 0, len = ranges.length; i < len; ++i) {\n                if (!rangesEqual(range, ranges[i])) {\n                    sel.addRange(ranges[i]);\n                }\n            }\n            if (!sel.rangeCount) {\n                updateEmptySelection(sel);\n            }\n        };\n\n        if (implementsControlRange && implementsDocSelection) {\n            selProto.removeRange = function(range) {\n                if (this.docSelection.type == CONTROL) {\n                    var controlRange = this.docSelection.createRange();\n                    var rangeElement = getSingleElementFromRange(range);\n\n                    // Create a new ControlRange containing all the elements in the selected ControlRange minus the\n                    // element contained by the supplied range\n                    var doc = getDocument(controlRange.item(0));\n                    var newControlRange = getBody(doc).createControlRange();\n                    var el, removed = false;\n                    for (var i = 0, len = controlRange.length; i < len; ++i) {\n                        el = controlRange.item(i);\n                        if (el !== rangeElement || removed) {\n                            newControlRange.add(controlRange.item(i));\n                        } else {\n                            removed = true;\n                        }\n                    }\n                    newControlRange.select();\n\n                    // Update the wrapped selection based on what's now in the native selection\n                    updateControlSelection(this);\n                } else {\n                    removeRangeManually(this, range);\n                }\n            };\n        } else {\n            selProto.removeRange = function(range) {\n                removeRangeManually(this, range);\n            };\n        }\n\n        // Detecting if a selection is backward\n        var selectionIsBackward;\n        if (!useDocumentSelection && selectionHasAnchorAndFocus && features.implementsDomRange) {\n            selectionIsBackward = winSelectionIsBackward;\n\n            selProto.isBackward = function() {\n                return selectionIsBackward(this);\n            };\n        } else {\n            selectionIsBackward = selProto.isBackward = function() {\n                return false;\n            };\n        }\n\n        // Create an alias for backwards compatibility. From 1.3, everything is \"backward\" rather than \"backwards\"\n        selProto.isBackwards = selProto.isBackward;\n\n        // Selection stringifier\n        // This is conformant to the old HTML5 selections draft spec but differs from WebKit and Mozilla's implementation.\n        // The current spec does not yet define this method.\n        selProto.toString = function() {\n            var rangeTexts = [];\n            for (var i = 0, len = this.rangeCount; i < len; ++i) {\n                rangeTexts[i] = \"\" + this._ranges[i];\n            }\n            return rangeTexts.join(\"\");\n        };\n\n        function assertNodeInSameDocument(sel, node) {\n            if (sel.win.document != getDocument(node)) {\n                throw new DOMException(\"WRONG_DOCUMENT_ERR\");\n            }\n        }\n\n        function assertValidOffset(node, offset) {\n            if (offset < 0 || offset > (dom.isCharacterDataNode(node) ? node.length : node.childNodes.length)) {\n                throw new DOMException(\"INDEX_SIZE_ERR\");\n            }\n        }\n\n        // No current browser conforms fully to the spec for this method, so Rangy's own method is always used\n        selProto.collapse = function(node, offset) {\n            assertNodeInSameDocument(this, node);\n            var range = api.createRange(node);\n            range.collapseToPoint(node, offset);\n            this.setSingleRange(range);\n            this.isCollapsed = true;\n        };\n\n        selProto.collapseToStart = function() {\n            if (this.rangeCount) {\n                var range = this._ranges[0];\n                this.collapse(range.startContainer, range.startOffset);\n            } else {\n                throw new DOMException(\"INVALID_STATE_ERR\");\n            }\n        };\n\n        selProto.collapseToEnd = function() {\n            if (this.rangeCount) {\n                var range = this._ranges[this.rangeCount - 1];\n                this.collapse(range.endContainer, range.endOffset);\n            } else {\n                throw new DOMException(\"INVALID_STATE_ERR\");\n            }\n        };\n\n        // The spec is very specific on how selectAllChildren should be implemented and not all browsers implement it as\n        // specified so the native implementation is never used by Rangy.\n        selProto.selectAllChildren = function(node) {\n            assertNodeInSameDocument(this, node);\n            var range = api.createRange(node);\n            range.selectNodeContents(node);\n            this.setSingleRange(range);\n        };\n\n        if (selectionHasSetBaseAndExtent) {\n            selProto.setBaseAndExtent = function(anchorNode, anchorOffset, focusNode, focusOffset) {\n                this.nativeSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);\n                this.refresh();\n            };\n        } else if (selectionHasExtend) {\n            selProto.setBaseAndExtent = function(anchorNode, anchorOffset, focusNode, focusOffset) {\n                assertValidOffset(anchorNode, anchorOffset);\n                assertValidOffset(focusNode, focusOffset);\n                assertNodeInSameDocument(this, anchorNode);\n                assertNodeInSameDocument(this, focusNode);\n                var range = api.createRange(node);\n                var isBackwards = (dom.comparePoints(anchorNode, anchorOffset, focusNode, focusOffset) == -1);\n                if (isBackwards) {\n                    range.setStartAndEnd(focusNode, focusOffset, anchorNode, anchorOffset);\n                } else {\n                    range.setStartAndEnd(anchorNode, anchorOffset, focusNode, focusOffset);\n                }\n                this.setSingleRange(range, isBackwards);\n            };\n        }\n\n        selProto.deleteFromDocument = function() {\n            // Sepcial behaviour required for IE's control selections\n            if (implementsControlRange && implementsDocSelection && this.docSelection.type == CONTROL) {\n                var controlRange = this.docSelection.createRange();\n                var element;\n                while (controlRange.length) {\n                    element = controlRange.item(0);\n                    controlRange.remove(element);\n                    dom.removeNode(element);\n                }\n                this.refresh();\n            } else if (this.rangeCount) {\n                var ranges = this.getAllRanges();\n                if (ranges.length) {\n                    this.removeAllRanges();\n                    for (var i = 0, len = ranges.length; i < len; ++i) {\n                        ranges[i].deleteContents();\n                    }\n                    // The spec says nothing about what the selection should contain after calling deleteContents on each\n                    // range. Firefox moves the selection to where the final selected range was, so we emulate that\n                    this.addRange(ranges[len - 1]);\n                }\n            }\n        };\n\n        // The following are non-standard extensions\n        selProto.eachRange = function(func, returnValue) {\n            for (var i = 0, len = this._ranges.length; i < len; ++i) {\n                if ( func( this.getRangeAt(i) ) ) {\n                    return returnValue;\n                }\n            }\n        };\n\n        selProto.getAllRanges = function() {\n            var ranges = [];\n            this.eachRange(function(range) {\n                ranges.push(range);\n            });\n            return ranges;\n        };\n\n        selProto.setSingleRange = function(range, direction) {\n            this.removeAllRanges();\n            this.addRange(range, direction);\n        };\n\n        selProto.callMethodOnEachRange = function(methodName, params) {\n            var results = [];\n            this.eachRange( function(range) {\n                results.push( range[methodName].apply(range, params || []) );\n            } );\n            return results;\n        };\n\n        function createStartOrEndSetter(isStart) {\n            return function(node, offset) {\n                var range;\n                if (this.rangeCount) {\n                    range = this.getRangeAt(0);\n                    range[\"set\" + (isStart ? \"Start\" : \"End\")](node, offset);\n                } else {\n                    range = api.createRange(this.win.document);\n                    range.setStartAndEnd(node, offset);\n                }\n                this.setSingleRange(range, this.isBackward());\n            };\n        }\n\n        selProto.setStart = createStartOrEndSetter(true);\n        selProto.setEnd = createStartOrEndSetter(false);\n\n        // Add select() method to Range prototype. Any existing selection will be removed.\n        api.rangePrototype.select = function(direction) {\n            getSelection( this.getDocument() ).setSingleRange(this, direction);\n        };\n\n        selProto.changeEachRange = function(func) {\n            var ranges = [];\n            var backward = this.isBackward();\n\n            this.eachRange(function(range) {\n                func(range);\n                ranges.push(range);\n            });\n\n            this.removeAllRanges();\n            if (backward && ranges.length == 1) {\n                this.addRange(ranges[0], \"backward\");\n            } else {\n                this.setRanges(ranges);\n            }\n        };\n\n        selProto.containsNode = function(node, allowPartial) {\n            return this.eachRange( function(range) {\n                return range.containsNode(node, allowPartial);\n            }, true ) || false;\n        };\n\n        selProto.getBookmark = function(containerNode) {\n            return {\n                backward: this.isBackward(),\n                rangeBookmarks: this.callMethodOnEachRange(\"getBookmark\", [containerNode])\n            };\n        };\n\n        selProto.moveToBookmark = function(bookmark) {\n            var selRanges = [];\n            for (var i = 0, rangeBookmark, range; rangeBookmark = bookmark.rangeBookmarks[i++]; ) {\n                range = api.createRange(this.win);\n                range.moveToBookmark(rangeBookmark);\n                selRanges.push(range);\n            }\n            if (bookmark.backward) {\n                this.setSingleRange(selRanges[0], \"backward\");\n            } else {\n                this.setRanges(selRanges);\n            }\n        };\n\n        selProto.saveRanges = function() {\n            return {\n                backward: this.isBackward(),\n                ranges: this.callMethodOnEachRange(\"cloneRange\")\n            };\n        };\n\n        selProto.restoreRanges = function(selRanges) {\n            this.removeAllRanges();\n            for (var i = 0, range; range = selRanges.ranges[i]; ++i) {\n                this.addRange(range, (selRanges.backward && i == 0));\n            }\n        };\n\n        selProto.toHtml = function() {\n            var rangeHtmls = [];\n            this.eachRange(function(range) {\n                rangeHtmls.push( DomRange.toHtml(range) );\n            });\n            return rangeHtmls.join(\"\");\n        };\n\n        if (features.implementsTextRange) {\n            selProto.getNativeTextRange = function() {\n                var sel, textRange;\n                if ( (sel = this.docSelection) ) {\n                    var range = sel.createRange();\n                    if (isTextRange(range)) {\n                        return range;\n                    } else {\n                        throw module.createError(\"getNativeTextRange: selection is a control selection\");\n                    }\n                } else if (this.rangeCount > 0) {\n                    return api.WrappedTextRange.rangeToTextRange( this.getRangeAt(0) );\n                } else {\n                    throw module.createError(\"getNativeTextRange: selection contains no range\");\n                }\n            };\n        }\n\n        function inspect(sel) {\n            var rangeInspects = [];\n            var anchor = new DomPosition(sel.anchorNode, sel.anchorOffset);\n            var focus = new DomPosition(sel.focusNode, sel.focusOffset);\n            var name = (typeof sel.getName == \"function\") ? sel.getName() : \"Selection\";\n\n            if (typeof sel.rangeCount != \"undefined\") {\n                for (var i = 0, len = sel.rangeCount; i < len; ++i) {\n                    rangeInspects[i] = DomRange.inspect(sel.getRangeAt(i));\n                }\n            }\n            return \"[\" + name + \"(Ranges: \" + rangeInspects.join(\", \") +\n                    \")(anchor: \" + anchor.inspect() + \", focus: \" + focus.inspect() + \"]\";\n        }\n\n        selProto.getName = function() {\n            return \"WrappedSelection\";\n        };\n\n        selProto.inspect = function() {\n            return inspect(this);\n        };\n\n        selProto.detach = function() {\n            actOnCachedSelection(this.win, \"delete\");\n            deleteProperties(this);\n        };\n\n        WrappedSelection.detachAll = function() {\n            actOnCachedSelection(null, \"deleteAll\");\n        };\n\n        WrappedSelection.inspect = inspect;\n        WrappedSelection.isDirectionBackward = isDirectionBackward;\n\n        api.Selection = WrappedSelection;\n\n        api.selectionPrototype = selProto;\n\n        api.addShimListener(function(win) {\n            if (typeof win.getSelection == \"undefined\") {\n                win.getSelection = function() {\n                    return getSelection(win);\n                };\n            }\n            win = null;\n        });\n    });\n    \n\n    /*----------------------------------------------------------------------------------------------------------------*/\n\n    // Wait for document to load before initializing\n    var docReady = false;\n\n    var loadHandler = function(e) {\n        if (!docReady) {\n            docReady = true;\n            if (!api.initialized && api.config.autoInitialize) {\n                init();\n            }\n        }\n    };\n\n    if (isBrowser) {\n        // Test whether the document has already been loaded and initialize immediately if so\n        if (document.readyState == \"complete\") {\n            loadHandler();\n        } else {\n            if (isHostMethod(document, \"addEventListener\")) {\n                document.addEventListener(\"DOMContentLoaded\", loadHandler, false);\n            }\n\n            // Add a fallback in case the DOMContentLoaded event isn't supported\n            addListener(window, \"load\", loadHandler);\n        }\n    }\n\n    return api;\n}, this);\n\n//# sourceURL=webpack://futureBooks/./node_modules/rangy/lib/rangy-core.js?");

/***/ }),

/***/ "./node_modules/rangy/lib/rangy-selectionsaverestore.js":
/*!**************************************************************!*\
  !*** ./node_modules/rangy/lib/rangy-selectionsaverestore.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Selection save and restore module for Rangy.\n * Saves and restores user selections using marker invisible elements in the DOM.\n *\n * Part of Rangy, a cross-browser JavaScript range and selection library\n * https://github.com/timdown/rangy\n *\n * Depends on Rangy core.\n *\n * Copyright 2024, Tim Down\n * Licensed under the MIT license.\n * Version: 1.3.2\n * Build date: 2 November 2024\n */\n(function(factory, root) {\n    if (true) {\n        // AMD. Register as an anonymous module with a dependency on Rangy.\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./rangy-core */ \"./node_modules/rangy/lib/rangy-core.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    } else {}\n})(function(rangy) {\n    rangy.createModule(\"SaveRestore\", [\"WrappedSelection\"], function(api, module) {\n        var dom = api.dom;\n        var removeNode = dom.removeNode;\n        var isDirectionBackward = api.Selection.isDirectionBackward;\n        var markerTextChar = \"\\ufeff\";\n\n        function gEBI(id, doc) {\n            return (doc || document).getElementById(id);\n        }\n\n        function insertRangeBoundaryMarker(range, atStart) {\n            var markerId = \"selectionBoundary_\" + (+new Date()) + \"_\" + (\"\" + Math.random()).slice(2);\n            var markerEl;\n            var doc = dom.getDocument(range.startContainer);\n\n            // Clone the Range and collapse to the appropriate boundary point\n            var boundaryRange = range.cloneRange();\n            boundaryRange.collapse(atStart);\n\n            // Create the marker element containing a single invisible character using DOM methods and insert it\n            markerEl = doc.createElement(\"span\");\n            markerEl.id = markerId;\n            markerEl.style.lineHeight = \"0\";\n            markerEl.style.display = \"none\";\n            markerEl.className = \"rangySelectionBoundary\";\n            markerEl.appendChild(doc.createTextNode(markerTextChar));\n\n            boundaryRange.insertNode(markerEl);\n            return markerEl;\n        }\n\n        function setRangeBoundary(doc, range, markerId, atStart) {\n            var markerEl = gEBI(markerId, doc);\n            if (markerEl) {\n                range[atStart ? \"setStartBefore\" : \"setEndBefore\"](markerEl);\n                removeNode(markerEl);\n            } else {\n                module.warn(\"Marker element has been removed. Cannot restore selection.\");\n            }\n        }\n\n        function compareRanges(r1, r2) {\n            return r2.compareBoundaryPoints(r1.START_TO_START, r1);\n        }\n\n        function saveRange(range, direction) {\n            var startEl, endEl, doc = api.DomRange.getRangeDocument(range), text = range.toString();\n            var backward = isDirectionBackward(direction);\n\n            if (range.collapsed) {\n                endEl = insertRangeBoundaryMarker(range, false);\n                return {\n                    document: doc,\n                    markerId: endEl.id,\n                    collapsed: true\n                };\n            } else {\n                endEl = insertRangeBoundaryMarker(range, false);\n                startEl = insertRangeBoundaryMarker(range, true);\n\n                return {\n                    document: doc,\n                    startMarkerId: startEl.id,\n                    endMarkerId: endEl.id,\n                    collapsed: false,\n                    backward: backward,\n                    toString: function() {\n                        return \"original text: '\" + text + \"', new text: '\" + range.toString() + \"'\";\n                    }\n                };\n            }\n        }\n\n        function restoreRange(rangeInfo, normalize) {\n            var doc = rangeInfo.document;\n            if (typeof normalize == \"undefined\") {\n                normalize = true;\n            }\n            var range = api.createRange(doc);\n            if (rangeInfo.collapsed) {\n                var markerEl = gEBI(rangeInfo.markerId, doc);\n                if (markerEl) {\n                    markerEl.style.display = \"inline\";\n                    var previousNode = markerEl.previousSibling;\n\n                    // Workaround for issue 17\n                    if (previousNode && previousNode.nodeType == 3) {\n                        removeNode(markerEl);\n                        range.collapseToPoint(previousNode, previousNode.length);\n                    } else {\n                        range.collapseBefore(markerEl);\n                        removeNode(markerEl);\n                    }\n                } else {\n                    module.warn(\"Marker element has been removed. Cannot restore selection.\");\n                }\n            } else {\n                setRangeBoundary(doc, range, rangeInfo.startMarkerId, true);\n                setRangeBoundary(doc, range, rangeInfo.endMarkerId, false);\n            }\n\n            if (normalize) {\n                range.normalizeBoundaries();\n            }\n\n            return range;\n        }\n\n        function saveRanges(ranges, direction) {\n            var rangeInfos = [], range, doc;\n            var backward = isDirectionBackward(direction);\n\n            // Order the ranges by position within the DOM, latest first, cloning the array to leave the original untouched\n            ranges = ranges.slice(0);\n            ranges.sort(compareRanges);\n\n            for (var i = 0, len = ranges.length; i < len; ++i) {\n                rangeInfos[i] = saveRange(ranges[i], backward);\n            }\n\n            // Now that all the markers are in place and DOM manipulation over, adjust each range's boundaries to lie\n            // between its markers\n            for (i = len - 1; i >= 0; --i) {\n                range = ranges[i];\n                doc = api.DomRange.getRangeDocument(range);\n                if (range.collapsed) {\n                    range.collapseAfter(gEBI(rangeInfos[i].markerId, doc));\n                } else {\n                    range.setEndBefore(gEBI(rangeInfos[i].endMarkerId, doc));\n                    range.setStartAfter(gEBI(rangeInfos[i].startMarkerId, doc));\n                }\n            }\n\n            return rangeInfos;\n        }\n\n        function saveSelection(win) {\n            if (!api.isSelectionValid(win)) {\n                module.warn(\"Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus.\");\n                return null;\n            }\n            var sel = api.getSelection(win);\n            var ranges = sel.getAllRanges();\n            var backward = (ranges.length == 1 && sel.isBackward());\n\n            var rangeInfos = saveRanges(ranges, backward);\n\n            // Ensure current selection is unaffected\n            if (backward) {\n                sel.setSingleRange(ranges[0], backward);\n            } else {\n                sel.setRanges(ranges);\n            }\n\n            return {\n                win: win,\n                rangeInfos: rangeInfos,\n                restored: false\n            };\n        }\n\n        function restoreRanges(rangeInfos) {\n            var ranges = [];\n\n            // Ranges are in reverse order of appearance in the DOM. We want to restore earliest first to avoid\n            // normalization affecting previously restored ranges.\n            var rangeCount = rangeInfos.length;\n\n            for (var i = rangeCount - 1; i >= 0; i--) {\n                ranges[i] = restoreRange(rangeInfos[i], true);\n            }\n\n            return ranges;\n        }\n\n        function restoreSelection(savedSelection, preserveDirection) {\n            if (!savedSelection.restored) {\n                var rangeInfos = savedSelection.rangeInfos;\n                var sel = api.getSelection(savedSelection.win);\n                var ranges = restoreRanges(rangeInfos), rangeCount = rangeInfos.length;\n\n                if (rangeCount == 1 && preserveDirection && api.features.selectionHasExtend && rangeInfos[0].backward) {\n                    sel.removeAllRanges();\n                    sel.addRange(ranges[0], true);\n                } else {\n                    sel.setRanges(ranges);\n                }\n\n                savedSelection.restored = true;\n            }\n        }\n\n        function removeMarkerElement(doc, markerId) {\n            var markerEl = gEBI(markerId, doc);\n            if (markerEl) {\n                removeNode(markerEl);\n            }\n        }\n\n        function removeMarkers(savedSelection) {\n            var rangeInfos = savedSelection.rangeInfos;\n            for (var i = 0, len = rangeInfos.length, rangeInfo; i < len; ++i) {\n                rangeInfo = rangeInfos[i];\n                if (rangeInfo.collapsed) {\n                    removeMarkerElement(savedSelection.doc, rangeInfo.markerId);\n                } else {\n                    removeMarkerElement(savedSelection.doc, rangeInfo.startMarkerId);\n                    removeMarkerElement(savedSelection.doc, rangeInfo.endMarkerId);\n                }\n            }\n        }\n\n        api.util.extend(api, {\n            saveRange: saveRange,\n            restoreRange: restoreRange,\n            saveRanges: saveRanges,\n            restoreRanges: restoreRanges,\n            saveSelection: saveSelection,\n            restoreSelection: restoreSelection,\n            removeMarkerElement: removeMarkerElement,\n            removeMarkers: removeMarkers\n        });\n    });\n    \n    return rangy;\n}, this);\n\n//# sourceURL=webpack://futureBooks/./node_modules/rangy/lib/rangy-selectionsaverestore.js?");

/***/ }),

/***/ "./node_modules/rangy/lib/rangy-serializer.js":
/*!****************************************************!*\
  !*** ./node_modules/rangy/lib/rangy-serializer.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Serializer module for Rangy.\n * Serializes Ranges and Selections. An example use would be to store a user's selection on a particular page in a\n * cookie or local storage and restore it on the user's next visit to the same page.\n *\n * Part of Rangy, a cross-browser JavaScript range and selection library\n * https://github.com/timdown/rangy\n *\n * Depends on Rangy core.\n *\n * Copyright 2024, Tim Down\n * Licensed under the MIT license.\n * Version: 1.3.2\n * Build date: 2 November 2024\n */\n(function(factory, root) {\n    if (true) {\n        // AMD. Register as an anonymous module with a dependency on Rangy.\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./rangy-core */ \"./node_modules/rangy/lib/rangy-core.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    } else {}\n})(function(rangy) {\n    rangy.createModule(\"Serializer\", [\"WrappedSelection\"], function(api, module) {\n        var UNDEF = \"undefined\";\n        var util = api.util;\n\n        // encodeURIComponent and decodeURIComponent are required for cookie handling\n        if (typeof encodeURIComponent == UNDEF || typeof decodeURIComponent == UNDEF) {\n            module.fail(\"encodeURIComponent and/or decodeURIComponent method is missing\");\n        }\n\n        // Checksum for checking whether range can be serialized\n        var crc32 = (function() {\n            function utf8encode(str) {\n                var utf8CharCodes = [];\n\n                for (var i = 0, len = str.length, c; i < len; ++i) {\n                    c = str.charCodeAt(i);\n                    if (c < 128) {\n                        utf8CharCodes.push(c);\n                    } else if (c < 2048) {\n                        utf8CharCodes.push((c >> 6) | 192, (c & 63) | 128);\n                    } else {\n                        utf8CharCodes.push((c >> 12) | 224, ((c >> 6) & 63) | 128, (c & 63) | 128);\n                    }\n                }\n                return utf8CharCodes;\n            }\n\n            var cachedCrcTable = null;\n\n            function buildCRCTable() {\n                var table = [];\n                for (var i = 0, j, crc; i < 256; ++i) {\n                    crc = i;\n                    j = 8;\n                    while (j--) {\n                        if ((crc & 1) == 1) {\n                            crc = (crc >>> 1) ^ 0xEDB88320;\n                        } else {\n                            crc >>>= 1;\n                        }\n                    }\n                    table[i] = crc >>> 0;\n                }\n                return table;\n            }\n\n            function getCrcTable() {\n                if (!cachedCrcTable) {\n                    cachedCrcTable = buildCRCTable();\n                }\n                return cachedCrcTable;\n            }\n\n            return function(str) {\n                var utf8CharCodes = utf8encode(str), crc = -1, crcTable = getCrcTable();\n                for (var i = 0, len = utf8CharCodes.length, y; i < len; ++i) {\n                    y = (crc ^ utf8CharCodes[i]) & 0xFF;\n                    crc = (crc >>> 8) ^ crcTable[y];\n                }\n                return (crc ^ -1) >>> 0;\n            };\n        })();\n\n        var dom = api.dom;\n\n        function escapeTextForHtml(str) {\n            return str.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\");\n        }\n\n        function nodeToInfoString(node, infoParts) {\n            infoParts = infoParts || [];\n            var nodeType = node.nodeType, children = node.childNodes, childCount = children.length;\n            var nodeInfo = [nodeType, node.nodeName, childCount].join(\":\");\n            var start = \"\", end = \"\";\n            switch (nodeType) {\n                case 3: // Text node\n                    start = escapeTextForHtml(node.nodeValue);\n                    break;\n                case 8: // Comment\n                    start = \"<!--\" + escapeTextForHtml(node.nodeValue) + \"-->\";\n                    break;\n                default:\n                    start = \"<\" + nodeInfo + \">\";\n                    end = \"</>\";\n                    break;\n            }\n            if (start) {\n                infoParts.push(start);\n            }\n            for (var i = 0; i < childCount; ++i) {\n                nodeToInfoString(children[i], infoParts);\n            }\n            if (end) {\n                infoParts.push(end);\n            }\n            return infoParts;\n        }\n\n        // Creates a string representation of the specified element's contents that is similar to innerHTML but omits all\n        // attributes and comments and includes child node counts. This is done instead of using innerHTML to work around\n        // IE <= 8's policy of including element properties in attributes, which ruins things by changing an element's\n        // innerHTML whenever the user changes an input within the element.\n        function getElementChecksum(el) {\n            var info = nodeToInfoString(el).join(\"\");\n            return crc32(info).toString(16);\n        }\n\n        function serializePosition(node, offset, rootNode) {\n            var pathParts = [], n = node;\n            rootNode = rootNode || dom.getDocument(node).documentElement;\n            while (n && n != rootNode) {\n                pathParts.push(dom.getNodeIndex(n, true));\n                n = n.parentNode;\n            }\n            return pathParts.join(\"/\") + \":\" + offset;\n        }\n\n        function deserializePosition(serialized, rootNode, doc) {\n            if (!rootNode) {\n                rootNode = (doc || document).documentElement;\n            }\n            var parts = serialized.split(\":\");\n            var node = rootNode;\n            var nodeIndices = parts[0] ? parts[0].split(\"/\") : [], i = nodeIndices.length, nodeIndex;\n\n            while (i--) {\n                nodeIndex = parseInt(nodeIndices[i], 10);\n                if (nodeIndex < node.childNodes.length) {\n                    node = node.childNodes[nodeIndex];\n                } else {\n                    throw module.createError(\"deserializePosition() failed: node \" + dom.inspectNode(node) +\n                            \" has no child with index \" + nodeIndex + \", \" + i);\n                }\n            }\n\n            return new dom.DomPosition(node, parseInt(parts[1], 10));\n        }\n\n        function serializeRange(range, omitChecksum, rootNode) {\n            rootNode = rootNode || api.DomRange.getRangeDocument(range).documentElement;\n            if (!dom.isOrIsAncestorOf(rootNode, range.commonAncestorContainer)) {\n                throw module.createError(\"serializeRange(): range \" + range.inspect() +\n                    \" is not wholly contained within specified root node \" + dom.inspectNode(rootNode));\n            }\n            var serialized = serializePosition(range.startContainer, range.startOffset, rootNode) + \",\" +\n                serializePosition(range.endContainer, range.endOffset, rootNode);\n            if (!omitChecksum) {\n                serialized += \"{\" + getElementChecksum(rootNode) + \"}\";\n            }\n            return serialized;\n        }\n\n        var deserializeRegex = /^([^,]+),([^,\\{]+)(\\{([^}]+)\\})?$/;\n\n        function deserializeRange(serialized, rootNode, doc) {\n            if (rootNode) {\n                doc = doc || dom.getDocument(rootNode);\n            } else {\n                doc = doc || document;\n                rootNode = doc.documentElement;\n            }\n            var result = deserializeRegex.exec(serialized);\n            var checksum = result[4];\n            if (checksum) {\n                var rootNodeChecksum = getElementChecksum(rootNode);\n                if (checksum !== rootNodeChecksum) {\n                    throw module.createError(\"deserializeRange(): checksums of serialized range root node (\" + checksum +\n                        \") and target root node (\" + rootNodeChecksum + \") do not match\");\n                }\n            }\n            var start = deserializePosition(result[1], rootNode, doc), end = deserializePosition(result[2], rootNode, doc);\n            var range = api.createRange(doc);\n            range.setStartAndEnd(start.node, start.offset, end.node, end.offset);\n            return range;\n        }\n\n        function canDeserializeRange(serialized, rootNode, doc) {\n            if (!rootNode) {\n                rootNode = (doc || document).documentElement;\n            }\n            var result = deserializeRegex.exec(serialized);\n            var checksum = result[3];\n            return !checksum || checksum === getElementChecksum(rootNode);\n        }\n\n        function serializeSelection(selection, omitChecksum, rootNode) {\n            selection = api.getSelection(selection);\n            var ranges = selection.getAllRanges(), serializedRanges = [];\n            for (var i = 0, len = ranges.length; i < len; ++i) {\n                serializedRanges[i] = serializeRange(ranges[i], omitChecksum, rootNode);\n            }\n            return serializedRanges.join(\"|\");\n        }\n\n        function deserializeSelection(serialized, rootNode, win) {\n            if (rootNode) {\n                win = win || dom.getWindow(rootNode);\n            } else {\n                win = win || window;\n                rootNode = win.document.documentElement;\n            }\n            var serializedRanges = serialized.split(\"|\");\n            var sel = api.getSelection(win);\n            var ranges = [];\n\n            for (var i = 0, len = serializedRanges.length; i < len; ++i) {\n                ranges[i] = deserializeRange(serializedRanges[i], rootNode, win.document);\n            }\n            sel.setRanges(ranges);\n\n            return sel;\n        }\n\n        function canDeserializeSelection(serialized, rootNode, win) {\n            var doc;\n            if (rootNode) {\n                doc = win ? win.document : dom.getDocument(rootNode);\n            } else {\n                win = win || window;\n                rootNode = win.document.documentElement;\n            }\n            var serializedRanges = serialized.split(\"|\");\n\n            for (var i = 0, len = serializedRanges.length; i < len; ++i) {\n                if (!canDeserializeRange(serializedRanges[i], rootNode, doc)) {\n                    return false;\n                }\n            }\n\n            return true;\n        }\n\n        var cookieName = \"rangySerializedSelection\";\n\n        function getSerializedSelectionFromCookie(cookie) {\n            var parts = cookie.split(/[;,]/);\n            for (var i = 0, len = parts.length, nameVal, val; i < len; ++i) {\n                nameVal = parts[i].split(\"=\");\n                if (nameVal[0].replace(/^\\s+/, \"\") == cookieName) {\n                    val = nameVal[1];\n                    if (val) {\n                        return decodeURIComponent(val.replace(/\\s+$/, \"\"));\n                    }\n                }\n            }\n            return null;\n        }\n\n        function restoreSelectionFromCookie(win) {\n            win = win || window;\n            var serialized = getSerializedSelectionFromCookie(win.document.cookie);\n            if (serialized) {\n                deserializeSelection(serialized, win.doc);\n            }\n        }\n\n        function saveSelectionCookie(win, props) {\n            win = win || window;\n            props = (typeof props == \"object\") ? props : {};\n            var expires = props.expires ? \";expires=\" + props.expires.toUTCString() : \"\";\n            var path = props.path ? \";path=\" + props.path : \"\";\n            var domain = props.domain ? \";domain=\" + props.domain : \"\";\n            var secure = props.secure ? \";secure\" : \"\";\n            var serialized = serializeSelection(api.getSelection(win));\n            win.document.cookie = encodeURIComponent(cookieName) + \"=\" + encodeURIComponent(serialized) + expires + path + domain + secure;\n        }\n\n        util.extend(api, {\n            serializePosition: serializePosition,\n            deserializePosition: deserializePosition,\n            serializeRange: serializeRange,\n            deserializeRange: deserializeRange,\n            canDeserializeRange: canDeserializeRange,\n            serializeSelection: serializeSelection,\n            deserializeSelection: deserializeSelection,\n            canDeserializeSelection: canDeserializeSelection,\n            restoreSelectionFromCookie: restoreSelectionFromCookie,\n            saveSelectionCookie: saveSelectionCookie,\n            getElementChecksum: getElementChecksum,\n            nodeToInfoString: nodeToInfoString\n        });\n\n        util.crc32 = crc32;\n    });\n    \n    return rangy;\n}, this);\n\n//# sourceURL=webpack://futureBooks/./node_modules/rangy/lib/rangy-serializer.js?");

/***/ }),

/***/ "./node_modules/raty-js/lib/jquery.raty.js":
/*!*************************************************!*\
  !*** ./node_modules/raty-js/lib/jquery.raty.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * Raty - A Star Rating Plugin\n *\n * The MIT License\n *\n * author:  Washington Botelho\n * github:  wbotelhos/raty\n * version: 3.1.1\n *\n */\n\n(function(root, factory) {\n  if (true) {\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  } else {}\n}(this, function($) {\n  'use strict';\n\n  $.raty = {\n    cancelButton: false,\n    cancelClass:  'raty-cancel',\n    cancelHint:   'Cancel this rating!',\n    cancelOff:    'cancel-off.png',\n    cancelOn:     'cancel-on.png',\n    cancelPlace:  'left',\n    click:        undefined,\n    half:         false,\n    halfShow:     true,\n    hints:        ['bad', 'poor', 'regular', 'good', 'gorgeous'],\n    iconRange:    undefined,\n    iconRangeSame: false,\n    mouseout:     undefined,\n    mouseover:    undefined,\n    noRatedMsg:   'Not rated yet!',\n    number:       5,\n    numberMax:    20,\n    path:         undefined,\n    precision:    false,\n    readOnly:     false,\n    round:        { down: 0.25, full: 0.6, up: 0.76 },\n    score:        undefined,\n    scoreName:    'score',\n    single:       false,\n    space:        true,\n    starHalf:     'star-half.png',\n    starOff:      'star-off.png',\n    starOn:       'star-on.png',\n    starType:     'img',\n    target:       undefined,\n    targetFormat: '{score}',\n    targetKeep:   false,\n    targetScore:  undefined,\n    targetText:   '',\n    targetType:   'hint'\n  };\n\n  $.fn.raty = function(options) {\n    return this.each(function() {\n      var instance = new $.raty.Raty(this, options);\n\n      return instance._create();\n    });\n  };\n\n  $.raty.Raty = (function() {\n    var Raty = function(element, options) {\n      this.element = element;\n      this.self    = $(element);\n      this.opt     = $.extend(true, {}, $.raty, options, this.self.data());\n    };\n\n    Raty.prototype = {\n      _create: function() {\n        this._executeCallbacks();\n        this._adjustNumber();\n        this._adjustHints();\n\n        this.opt.score = this._adjustedScore(this.opt.score);\n\n        if (this.opt.starType !== 'img') {\n          this._adjustStarName();\n        }\n\n        this._setPath();\n        this._createStars();\n\n        if (this.opt.cancelButton) {\n          this._createCancel();\n        }\n\n        if (this.opt.precision) {\n          this._adjustPrecision();\n        }\n\n        this._createScore();\n\n        this._apply(this.opt.score);\n        this._setTitle(this.opt.score);\n        this._target(this.opt.score);\n\n        if (this.opt.readOnly) {\n          this._lock();\n        } else {\n          this.element.style.cursor = 'pointer';\n\n          this._binds();\n        }\n\n        this.self.data('raty', this);\n      },\n\n      // TODO: model spec\n      _adjustedScore: function(score) {\n        if (score || score === 0) {\n          return this._between(score, 0, this.opt.number);\n        }\n      },\n\n      _adjustHints: function() {\n        if (!this.opt.hints) {\n          this.opt.hints = [];\n        }\n\n        if (!this.opt.halfShow && !this.opt.half) {\n          return;\n        }\n\n        var steps = this.opt.precision ? 10 : 2;\n\n        for (var i = 0; i < this.opt.number; i++) {\n          var group = this.opt.hints[i];\n\n          if (Object.prototype.toString.call(group) !== '[object Array]') {\n            group = [group];\n          }\n\n          this.opt.hints[i] = [];\n\n          for (var j = 0; j < steps; j++) {\n            var hint = group[j];\n            var last = group[group.length - 1];\n\n            if (last === undefined) {\n              last = null;\n            }\n\n            this.opt.hints[i][j] = hint === undefined ? last : hint;\n          }\n        }\n      },\n\n      _adjustNumber: function() {\n        this.opt.number = this._between(this.opt.number, 1, this.opt.numberMax);\n      },\n\n      _adjustPrecision: function() {\n        this.opt.half = true;\n      },\n\n      _adjustStarName: function() {\n        var replaces = ['cancelOff', 'cancelOn', 'starHalf', 'starOff', 'starOn'];\n\n        this.opt.path = '';\n\n        for (var i = 0; i < replaces.length; i++) {\n          this.opt[replaces[i]] = this.opt[replaces[i]].replace('.', '-');\n        }\n      },\n\n      // TODO: model spec\n      _apply: function(score) {\n        this._fill(score);\n\n        if (score) {\n          if (score > 0) {\n            this.scoreField.val(score);\n          }\n\n          this._roundStars(score);\n        }\n      },\n\n      _attributesForIndex: function(i) {\n        var name       = this._nameForIndex(i);\n        var attributes = { alt: i, src: this.opt.path + this.opt[name] };\n\n        if (this.opt.starType !== 'img') {\n          attributes = { 'data-alt': i, 'class': this.opt[name] };\n        }\n\n        attributes.title = this._getHint(i);\n\n        return attributes;\n      },\n\n      _between: function(value, min, max) {\n        return Math.min(Math.max(parseFloat(value), min), max);\n      },\n\n      // TODO: model spec\n      _binds: function() {\n        if (this.cancelButton) {\n          this._bindOverCancel();\n          this._bindClickCancel();\n          this._bindOutCancel();\n        }\n\n        this._bindOver();\n        this._bindClick();\n        this._bindOut();\n      },\n\n      // TODO: model spec\n      _bindClick: function() {\n        var that = this;\n\n        this.stars.on('click.raty', function(evt) {\n          if (that.self.data('readonly')) {\n            return;\n          }\n\n          var execute = true;\n          var score   = (that.opt.half || that.opt.precision) ? that.self.data('score') : (this.alt || $(this).data('alt'));\n\n          if (that.opt.half && !that.opt.precision) {\n            score = that._roundHalfScore(score);\n          }\n\n          if (that.opt.click) {\n            execute = that.opt.click.call(that.element, +score, evt);\n          }\n\n          if (execute || execute === undefined) {\n            that._apply(+score);\n          }\n        });\n      },\n\n      // TODO: model spec\n      _bindClickCancel: function() {\n        this.cancelButton.on('click.raty', function(evt) {\n          this.scoreField.removeAttr('value');\n\n          if (this.opt.click) {\n            this.opt.click.call(this.element, null, evt);\n          }\n        }.bind(this));\n      },\n\n      // TODO: model spec\n      _bindOut: function() {\n        this.self.on('mouseleave.raty', function(evt) {\n          var score = +this.scoreField.val() || undefined;\n\n          this._apply(score);\n          this._target(score, evt);\n          this._resetTitle();\n\n          if (this.opt.mouseout) {\n            this.opt.mouseout.call(this.element, score, evt);\n          }\n        }.bind(this));\n      },\n\n      // TODO: model spec\n      _bindOutCancel: function() {\n        var that = this;\n\n        this.cancelButton.on('mouseleave.raty', function(evt) {\n          var icon = that.opt.cancelOff;\n\n          if (that.opt.starType !== 'img') {\n            icon = that.opt.cancelClass + ' ' + icon;\n          }\n\n          that._setIcon(this, icon);\n\n          if (that.opt.mouseout) {\n            var score = +that.scoreField.val() || undefined;\n\n            that.opt.mouseout.call(that.element, score, evt);\n          }\n        });\n      },\n\n      // TODO: model spec\n      _bindOver: function() {\n        var that   = this;\n        var action = that.opt.half ? 'mousemove.raty' : 'mouseover.raty';\n\n        this.stars.on(action, function(evt) {\n          var score = that._getScoreByPosition(evt, this);\n\n          that._fill(score);\n\n          if (that.opt.half) {\n            that._roundStars(score, evt);\n            that._setTitle(score, evt);\n\n            that.self.data('score', score);\n          }\n\n          that._target(score, evt);\n\n          if (that.opt.mouseover) {\n            that.opt.mouseover.call(that.element, score, evt);\n          }\n        });\n      },\n\n      // TODO: model spec\n      _bindOverCancel: function() {\n        var that = this;\n\n        this.cancelButton.on('mouseover.raty', function(evt) {\n          if (that.self.data('readonly')) {\n            return;\n          }\n\n          var starOff = that.opt.path + that.opt.starOff;\n          var icon    = that.opt.cancelOn;\n\n          if (that.opt.starType === 'img') {\n            that.stars.attr('src', starOff);\n          } else {\n            icon = that.opt.cancelClass + ' ' + icon;\n\n            that.stars.attr('class', starOff);\n          }\n\n          that._setIcon(this, icon);\n          that._target(null, evt);\n\n          if (that.opt.mouseover) {\n            that.opt.mouseover.call(that.element, null);\n          }\n        });\n      },\n\n      // TODO: model spec\n      _buildScoreField: function() {\n        return $('<input />', { name: this.opt.scoreName, type: 'hidden' }).appendTo(this.self);\n      },\n\n      // TODO: model spec\n      _createCancel: function() {\n        var icon   = this.opt.path + this.opt.cancelOff;\n        var button = $('<' + this.opt.starType + ' />', { title: this.opt.cancelHint, 'class': this.opt.cancelClass });\n\n        if (this.opt.starType === 'img') {\n          button.attr({ src: icon, alt: 'x' });\n        } else {\n          // TODO: use $.data\n          button.attr('data-alt', 'x').addClass(icon);\n        }\n\n        if (this.opt.cancelPlace === 'left') {\n          this.self.prepend('&#160;').prepend(button);\n        } else {\n          this.self.append('&#160;').append(button);\n        }\n\n        this.cancelButton = button;\n      },\n\n      // TODO: model spec\n      _createScore: function() {\n        var score = $(this.opt.targetScore);\n\n        this.scoreField = score.length ? score : this._buildScoreField();\n      },\n\n      _createStars: function() {\n        for (var i = 1; i <= this.opt.number; i++) {\n          var attributes = this._attributesForIndex(i);\n\n          $('<' + this.opt.starType + ' />', attributes).appendTo(this.element);\n\n          if (this.opt.space && i < this.opt.number) {\n            this.self.append('&#160;');\n          }\n        }\n\n        this.stars = this.self.children(this.opt.starType);\n      },\n\n      // TODO: model spec\n      _error: function(message) {\n        $(this).text(message);\n\n        $.error(message);\n      },\n\n      _executeCallbacks: function() {\n        var options = ['number', 'readOnly', 'score', 'scoreName', 'target', 'path'];\n\n        for (var i = 0; i < options.length; i++) {\n          if (typeof this.opt[options[i]] === 'function') {\n            var value = this.opt[options[i]].call(this.element);\n\n            if (value) {\n              this.opt[options[i]] = value;\n            } else {\n              delete this.opt[options[i]];\n            }\n          }\n        }\n      },\n\n      // TODO: model spec\n      _fill: function(score) {\n        var hash = 0;\n\n        if (this.opt.iconRangeSame && this.opt.iconRange) {\n          while (hash < this.opt.iconRange.length && this.opt.iconRange[hash].range < score) {\n            hash++;\n          }\n        }\n\n        for (var i = 1; i <= this.stars.length; i++) {\n          var icon;\n          var star   = this.stars[i - 1];\n          var turnOn = this._turnOn(i, score);\n\n          if (this.opt.iconRange && this.opt.iconRange.length > hash) {\n            var irange = this.opt.iconRange[hash];\n\n            icon = this._getRangeIcon(irange, turnOn);\n\n            if (i <= irange.range) {\n              this._setIcon(star, icon);\n            }\n\n            if (i === irange.range) {\n              hash++;\n            }\n          } else {\n            icon = this.opt[turnOn ? 'starOn' : 'starOff'];\n\n            this._setIcon(star, icon);\n          }\n        }\n      },\n\n      _getDecimal: function(number, fractions) {\n        var decimal = number.toString().split('.')[1];\n        var result  = 0;\n\n        if (decimal) {\n          result = parseInt(decimal.slice(0, fractions), 10);\n\n          if (decimal.slice(1, 5) === '9999') {\n            result++;\n          }\n        }\n\n        return result;\n      },\n\n      // TODO: model spec\n      _getRangeIcon: function(irange, turnOn) {\n        return turnOn ? irange.on || this.opt.starOn : irange.off || this.opt.starOff;\n      },\n\n      // TODO: model spec\n      _getScoreByPosition: function(evt, icon) {\n        var score = parseInt(icon.alt || icon.getAttribute('data-alt'), 10);\n\n        if (this.opt.half) {\n          var size    = this._getWidth();\n          var percent = parseFloat((evt.pageX - $(icon).offset().left) / size);\n\n          score = score - 1 + percent;\n        }\n\n        return score;\n      },\n\n      // TODO: model spec\n      _getHint: function(score, evt) {\n        if (score !== 0 && !score) {\n          return this.opt.noRatedMsg;\n        }\n\n        var decimal = this._getDecimal(score, 1);\n        var integer = Math.ceil(score);\n        var group   = this.opt.hints[(integer || 1) - 1];\n        var hint    = group;\n        var set     = !evt || this.isMove;\n\n        if (this.opt.precision) {\n          if (set) {\n            decimal = decimal === 0 ? 9 : decimal - 1;\n          }\n\n          hint = group[decimal];\n        } else if (this.opt.halfShow || this.opt.half) {\n          decimal = set && decimal === 0 ? 1 : decimal > 5 ? 1 : 0;\n\n          hint = group[decimal];\n        }\n\n        return hint === '' ? '' : hint || score;\n      },\n\n      // TODO: model spec\n      _getWidth: function() {\n        var width = this.stars[0].width || parseFloat(this.stars.eq(0).css('font-size'));\n\n        if (!width) {\n          this._error('Could not get the icon width!');\n        }\n\n        return width;\n      },\n\n      // TODO: model spec\n      _lock: function() {\n        var hint = this._getHint(this.scoreField.val());\n\n        this.element.style.cursor = '';\n        this.element.title        = hint;\n\n        this.scoreField.prop('readonly', true);\n        this.stars.prop('title', hint);\n\n        if (this.cancelButton) {\n          this.cancelButton.hide();\n        }\n\n        this.self.data('readonly', true);\n      },\n\n      _nameForIndex: function(i) {\n        return this.opt.score && this.opt.score >= i ? 'starOn' : 'starOff';\n      },\n\n      // TODO: model spec\n      _resetTitle: function() {\n        for (var i = 0; i < this.opt.number; i++) {\n          this.stars[i].title = this._getHint(i + 1);\n        }\n      },\n\n      // TODO: model spec\n      _roundHalfScore: function(score) {\n        var integer = parseInt(score, 10);\n        var decimal = this._getDecimal(score, 1);\n\n        if (decimal !== 0) {\n          decimal = decimal > 5 ? 1 : 0.5;\n        }\n\n        return integer + decimal;\n      },\n\n      // TODO: model spec\n      _roundStars: function(score, evt) {\n        var name = this._starName(score, evt);\n\n        if (name) {\n          var icon = this.opt[name];\n          var star = this.stars[Math.ceil(score) - 1];\n\n          this._setIcon(star, icon);\n        } // Full down: [x.00 .. x.25]\n      },\n\n      // TODO: model spec\n      _setIcon: function(star, icon) {\n        star[this.opt.starType === 'img' ? 'src' : 'className'] = this.opt.path + icon;\n      },\n\n      _setPath: function() {\n        this.opt.path = this.opt.path || '';\n\n        if (this.opt.path && this.opt.path.slice(-1)[0] !== '/') {\n          this.opt.path += '/';\n        }\n      },\n\n      // TODO: model spec\n      _setTarget: function(target, score) {\n        if (score) {\n          score = this.opt.targetFormat.toString().replace('{score}', score);\n        }\n\n        if (target.is(':input')) {\n          target.val(score);\n        } else {\n          target.html(score);\n        }\n      },\n\n      // TODO: model spec\n      _setTitle: function(score, evt) {\n        if (score) {\n          var integer = parseInt(Math.ceil(score), 10);\n          var star    = this.stars[integer - 1];\n\n          star.title = this._getHint(score, evt);\n        }\n      },\n\n      _starName: function(score, evt) {\n        var decimal = +(score % 1).toFixed(2);\n\n        if (evt || this.isMove) {\n          return decimal > 0.5 ? 'starOn' : 'starHalf';\n        }\n\n        if (decimal <= this.opt.round.down) { // Down: [x.00 ... x.25]\n          return;\n        }\n\n        if (this.opt.halfShow && decimal < this.opt.round.up) { // Half: [x.26 ... x.75]\n          return 'starHalf';\n        }\n\n        if (decimal < this.opt.round.full) { // Off: [x.26 .. x.6]\n          return 'starOff';\n        }\n\n        return 'starOn'; // Up: [x.26 ...] || [x.6 ...]\n      },\n\n      // TODO: model spec\n      _target: function(score, evt) {\n        if (this.opt.target) {\n          var target = $(this.opt.target);\n\n          if (!target.length) {\n            this._error('Target selector invalid or missing!');\n          }\n\n          var mouseover = evt && evt.type === 'mouseover';\n\n          if (score === undefined) {\n            score = this.opt.targetText;\n          } else if (score === null) {\n            score = mouseover ? this.opt.cancelHint : this.opt.targetText;\n          } else {\n            if (this.opt.targetType === 'hint') {\n              score = this._getHint(score, evt);\n            } else if (this.opt.precision) {\n              score = parseFloat(score).toFixed(1);\n            }\n\n            var mousemove = evt && evt.type === 'mousemove';\n\n            if (!mouseover && !mousemove && !this.opt.targetKeep) {\n              score = this.opt.targetText;\n            }\n          }\n\n          this._setTarget(target, score);\n        }\n      },\n\n      // TODO: model spec\n      _turnOn: function(i, score) {\n        return this.opt.single ? (i === score) : (i <= score);\n      },\n\n      // TODO: model spec\n      _unlock: function() {\n        this.element.style.cursor = 'pointer';\n        this.element.removeAttribute('title');\n\n        this.scoreField.removeAttr('readonly');\n\n        this.self.data('readonly', false);\n\n        this._resetTitle();\n\n        if (this.cancelButton) {\n          this.cancelButton.css('display', '');\n        }\n      },\n\n      // TODO: model spec\n      cancel: function(click) {\n        if (this.self.data('readonly') !== true) {\n          this[click ? 'click' : 'score'].call(this, null);\n\n          this.scoreField.removeAttr('value');\n        }\n      },\n\n      // TODO: model spec\n      click: function(score) {\n        if (this.self.data('readonly') !== true) {\n          score = this._adjustedScore(score);\n\n          this._apply(score);\n\n          if (this.opt.click) {\n            this.opt.click.call(this.element, score, $.Event('click'));\n          }\n\n          this._target(score);\n        }\n      },\n\n      // TODO: model spec\n      getScore: function() {\n        var score = [];\n        var value ;\n\n        value = this.scoreField.val();\n\n        score.push(value ? +value : undefined);\n\n        return (score.length > 1) ? score : score[0];\n      },\n\n      // TODO: model spec\n      move: function(score) {\n        var integer  = parseInt(score, 10);\n        var decimal  = this._getDecimal(score, 1);\n\n        if (integer >= this.opt.number) {\n          integer = this.opt.number - 1;\n          decimal = 10;\n        }\n\n        var width   = this._getWidth();\n        var steps   = width / 10;\n        var star    = $(this.stars[integer]);\n        var percent = star.offset().left + steps * decimal;\n        var evt     = $.Event('mousemove', { pageX: percent });\n\n        this.isMove = true;\n\n        star.trigger(evt);\n\n        this.isMove = false;\n      },\n\n      // TODO: model spec\n      readOnly: function(readonly) {\n        if (this.self.data('readonly') !== readonly) {\n          if (readonly) {\n            this.self.off('.raty').children(this.opt.starType).off('.raty');\n\n            this._lock();\n          } else {\n            this._binds();\n            this._unlock();\n          }\n\n          this.self.data('readonly', readonly);\n        }\n      },\n\n      // TODO: model spec\n      score: function() {\n        return arguments.length ? this.setScore.apply(this, arguments) : this.getScore();\n      },\n\n      setScore: function(score) {\n        if (this.self.data('readonly') !== true) {\n          score = this._adjustedScore(score);\n\n          this._apply(score);\n          this._target(score);\n        }\n      }\n    };\n\n    return Raty;\n  })();\n}));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/raty-js/lib/jquery.raty.js?");

/***/ }),

/***/ "./node_modules/robust-orientation/orientation.js":
/*!********************************************************!*\
  !*** ./node_modules/robust-orientation/orientation.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar twoProduct = __webpack_require__(/*! two-product */ \"./node_modules/two-product/two-product.js\")\nvar robustSum = __webpack_require__(/*! robust-sum */ \"./node_modules/robust-sum/robust-sum.js\")\nvar robustScale = __webpack_require__(/*! robust-scale */ \"./node_modules/robust-scale/robust-scale.js\")\nvar robustSubtract = __webpack_require__(/*! robust-subtract */ \"./node_modules/robust-subtract/robust-diff.js\")\n\nvar NUM_EXPAND = 5\n\nvar EPSILON     = 1.1102230246251565e-16\nvar ERRBOUND3   = (3.0 + 16.0 * EPSILON) * EPSILON\nvar ERRBOUND4   = (7.0 + 56.0 * EPSILON) * EPSILON\n\nfunction orientation_3(sum, prod, scale, sub) {\n  return function orientation3Exact(m0, m1, m2) {\n    var p = sum(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])))\n    var n = sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0]))\n    var d = sub(p, n)\n    return d[d.length - 1]\n  }\n}\n\nfunction orientation_4(sum, prod, scale, sub) {\n  return function orientation4Exact(m0, m1, m2, m3) {\n    var p = sum(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m1[2]), sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), -m2[2]), scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m3[2]))), sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m3[2]))))\n    var n = sum(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m2[2]), scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), m3[2]))), sum(scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m2[2]))))\n    var d = sub(p, n)\n    return d[d.length - 1]\n  }\n}\n\nfunction orientation_5(sum, prod, scale, sub) {\n  return function orientation5Exact(m0, m1, m2, m3, m4) {\n    var p = sum(sum(sum(scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m2[2]), sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), -m3[2]), scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m4[2]))), m1[3]), sum(scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m1[2]), sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), -m3[2]), scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), m4[2]))), -m2[3]), scale(sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), m1[2]), sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), -m2[2]), scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m4[2]))), m3[3]))), sum(scale(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m1[2]), sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), -m2[2]), scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m3[2]))), -m4[3]), sum(scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m1[2]), sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), -m3[2]), scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), m4[2]))), m0[3]), scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m3[2]), scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), m4[2]))), -m1[3])))), sum(sum(scale(sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m4[2]))), m3[3]), sum(scale(sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m3[2]))), -m4[3]), scale(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m1[2]), sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), -m2[2]), scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m3[2]))), m0[3]))), sum(scale(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m2[2]), scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), m3[2]))), -m1[3]), sum(scale(sum(scale(sum(prod(m1[1], m3[0]), prod(-m3[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m3[2]))), m2[3]), scale(sum(scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m2[2]))), -m3[3])))))\n    var n = sum(sum(sum(scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m2[2]), sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), -m3[2]), scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m4[2]))), m0[3]), scale(sum(scale(sum(prod(m3[1], m4[0]), prod(-m4[1], m3[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m3[2]), scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), m4[2]))), -m2[3])), sum(scale(sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m2[2]), scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), m4[2]))), m3[3]), scale(sum(scale(sum(prod(m2[1], m3[0]), prod(-m3[1], m2[0])), m0[2]), sum(scale(sum(prod(m0[1], m3[0]), prod(-m3[1], m0[0])), -m2[2]), scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), m3[2]))), -m4[3]))), sum(sum(scale(sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), m1[2]), sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), -m2[2]), scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m4[2]))), m0[3]), scale(sum(scale(sum(prod(m2[1], m4[0]), prod(-m4[1], m2[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m2[2]), scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), m4[2]))), -m1[3])), sum(scale(sum(scale(sum(prod(m1[1], m4[0]), prod(-m4[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m4[0]), prod(-m4[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m4[2]))), m2[3]), scale(sum(scale(sum(prod(m1[1], m2[0]), prod(-m2[1], m1[0])), m0[2]), sum(scale(sum(prod(m0[1], m2[0]), prod(-m2[1], m0[0])), -m1[2]), scale(sum(prod(m0[1], m1[0]), prod(-m1[1], m0[0])), m2[2]))), -m4[3]))))\n    var d = sub(p, n)\n    return d[d.length - 1]\n  }\n}\n\nfunction orientation(n) {\n  var fn =\n    n === 3 ? orientation_3 :\n    n === 4 ? orientation_4 : orientation_5\n\n  return fn(robustSum, twoProduct, robustScale, robustSubtract)\n}\n\nvar orientation3Exact = orientation(3)\nvar orientation4Exact = orientation(4)\n\nvar CACHED = [\n  function orientation0() { return 0 },\n  function orientation1() { return 0 },\n  function orientation2(a, b) {\n    return b[0] - a[0]\n  },\n  function orientation3(a, b, c) {\n    var l = (a[1] - c[1]) * (b[0] - c[0])\n    var r = (a[0] - c[0]) * (b[1] - c[1])\n    var det = l - r\n    var s\n    if(l > 0) {\n      if(r <= 0) {\n        return det\n      } else {\n        s = l + r\n      }\n    } else if(l < 0) {\n      if(r >= 0) {\n        return det\n      } else {\n        s = -(l + r)\n      }\n    } else {\n      return det\n    }\n    var tol = ERRBOUND3 * s\n    if(det >= tol || det <= -tol) {\n      return det\n    }\n    return orientation3Exact(a, b, c)\n  },\n  function orientation4(a,b,c,d) {\n    var adx = a[0] - d[0]\n    var bdx = b[0] - d[0]\n    var cdx = c[0] - d[0]\n    var ady = a[1] - d[1]\n    var bdy = b[1] - d[1]\n    var cdy = c[1] - d[1]\n    var adz = a[2] - d[2]\n    var bdz = b[2] - d[2]\n    var cdz = c[2] - d[2]\n    var bdxcdy = bdx * cdy\n    var cdxbdy = cdx * bdy\n    var cdxady = cdx * ady\n    var adxcdy = adx * cdy\n    var adxbdy = adx * bdy\n    var bdxady = bdx * ady\n    var det = adz * (bdxcdy - cdxbdy)\n            + bdz * (cdxady - adxcdy)\n            + cdz * (adxbdy - bdxady)\n    var permanent = (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz)\n                  + (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz)\n                  + (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz)\n    var tol = ERRBOUND4 * permanent\n    if ((det > tol) || (-det > tol)) {\n      return det\n    }\n    return orientation4Exact(a,b,c,d)\n  }\n]\n\nfunction slowOrient(args) {\n  var proc = CACHED[args.length]\n  if(!proc) {\n    proc = CACHED[args.length] = orientation(args.length)\n  }\n  return proc.apply(undefined, args)\n}\n\nfunction proc (slow, o0, o1, o2, o3, o4, o5) {\n  return function getOrientation(a0, a1, a2, a3, a4) {\n    switch (arguments.length) {\n      case 0:\n      case 1:\n        return 0;\n      case 2:\n        return o2(a0, a1)\n      case 3:\n        return o3(a0, a1, a2)\n      case 4:\n        return o4(a0, a1, a2, a3)\n      case 5:\n        return o5(a0, a1, a2, a3, a4)\n    }\n\n    var s = new Array(arguments.length)\n    for (var i = 0; i < arguments.length; ++i) {\n      s[i] = arguments[i]\n    }\n    return slow(s)\n  }\n}\n\nfunction generateOrientationProc() {\n  while(CACHED.length <= NUM_EXPAND) {\n    CACHED.push(orientation(CACHED.length))\n  }\n  module.exports = proc.apply(undefined, [slowOrient].concat(CACHED))\n  for(var i=0; i<=NUM_EXPAND; ++i) {\n    module.exports[i] = CACHED[i]\n  }\n}\n\ngenerateOrientationProc()\n\n//# sourceURL=webpack://futureBooks/./node_modules/robust-orientation/orientation.js?");

/***/ }),

/***/ "./node_modules/robust-scale/robust-scale.js":
/*!***************************************************!*\
  !*** ./node_modules/robust-scale/robust-scale.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar twoProduct = __webpack_require__(/*! two-product */ \"./node_modules/two-product/two-product.js\")\nvar twoSum = __webpack_require__(/*! two-sum */ \"./node_modules/two-sum/two-sum.js\")\n\nmodule.exports = scaleLinearExpansion\n\nfunction scaleLinearExpansion(e, scale) {\n  var n = e.length\n  if(n === 1) {\n    var ts = twoProduct(e[0], scale)\n    if(ts[0]) {\n      return ts\n    }\n    return [ ts[1] ]\n  }\n  var g = new Array(2 * n)\n  var q = [0.1, 0.1]\n  var t = [0.1, 0.1]\n  var count = 0\n  twoProduct(e[0], scale, q)\n  if(q[0]) {\n    g[count++] = q[0]\n  }\n  for(var i=1; i<n; ++i) {\n    twoProduct(e[i], scale, t)\n    var pq = q[1]\n    twoSum(pq, t[0], q)\n    if(q[0]) {\n      g[count++] = q[0]\n    }\n    var a = t[1]\n    var b = q[1]\n    var x = a + b\n    var bv = x - a\n    var y = b - bv\n    q[1] = x\n    if(y) {\n      g[count++] = y\n    }\n  }\n  if(q[1]) {\n    g[count++] = q[1]\n  }\n  if(count === 0) {\n    g[count++] = 0.0\n  }\n  g.length = count\n  return g\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/robust-scale/robust-scale.js?");

/***/ }),

/***/ "./node_modules/robust-subtract/robust-diff.js":
/*!*****************************************************!*\
  !*** ./node_modules/robust-subtract/robust-diff.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = robustSubtract\n\n//Easy case: Add two scalars\nfunction scalarScalar(a, b) {\n  var x = a + b\n  var bv = x - a\n  var av = x - bv\n  var br = b - bv\n  var ar = a - av\n  var y = ar + br\n  if(y) {\n    return [y, x]\n  }\n  return [x]\n}\n\nfunction robustSubtract(e, f) {\n  var ne = e.length|0\n  var nf = f.length|0\n  if(ne === 1 && nf === 1) {\n    return scalarScalar(e[0], -f[0])\n  }\n  var n = ne + nf\n  var g = new Array(n)\n  var count = 0\n  var eptr = 0\n  var fptr = 0\n  var abs = Math.abs\n  var ei = e[eptr]\n  var ea = abs(ei)\n  var fi = -f[fptr]\n  var fa = abs(fi)\n  var a, b\n  if(ea < fa) {\n    b = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    b = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n      fa = abs(fi)\n    }\n  }\n  if((eptr < ne && ea < fa) || (fptr >= nf)) {\n    a = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    a = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n      fa = abs(fi)\n    }\n  }\n  var x = a + b\n  var bv = x - a\n  var y = b - bv\n  var q0 = y\n  var q1 = x\n  var _x, _bv, _av, _br, _ar\n  while(eptr < ne && fptr < nf) {\n    if(ea < fa) {\n      a = ei\n      eptr += 1\n      if(eptr < ne) {\n        ei = e[eptr]\n        ea = abs(ei)\n      }\n    } else {\n      a = fi\n      fptr += 1\n      if(fptr < nf) {\n        fi = -f[fptr]\n        fa = abs(fi)\n      }\n    }\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n  }\n  while(eptr < ne) {\n    a = ei\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n    }\n  }\n  while(fptr < nf) {\n    a = fi\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    } \n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    fptr += 1\n    if(fptr < nf) {\n      fi = -f[fptr]\n    }\n  }\n  if(q0) {\n    g[count++] = q0\n  }\n  if(q1) {\n    g[count++] = q1\n  }\n  if(!count) {\n    g[count++] = 0.0  \n  }\n  g.length = count\n  return g\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/robust-subtract/robust-diff.js?");

/***/ }),

/***/ "./node_modules/robust-sum/robust-sum.js":
/*!***********************************************!*\
  !*** ./node_modules/robust-sum/robust-sum.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = linearExpansionSum\n\n//Easy case: Add two scalars\nfunction scalarScalar(a, b) {\n  var x = a + b\n  var bv = x - a\n  var av = x - bv\n  var br = b - bv\n  var ar = a - av\n  var y = ar + br\n  if(y) {\n    return [y, x]\n  }\n  return [x]\n}\n\nfunction linearExpansionSum(e, f) {\n  var ne = e.length|0\n  var nf = f.length|0\n  if(ne === 1 && nf === 1) {\n    return scalarScalar(e[0], f[0])\n  }\n  var n = ne + nf\n  var g = new Array(n)\n  var count = 0\n  var eptr = 0\n  var fptr = 0\n  var abs = Math.abs\n  var ei = e[eptr]\n  var ea = abs(ei)\n  var fi = f[fptr]\n  var fa = abs(fi)\n  var a, b\n  if(ea < fa) {\n    b = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    b = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n      fa = abs(fi)\n    }\n  }\n  if((eptr < ne && ea < fa) || (fptr >= nf)) {\n    a = ei\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n      ea = abs(ei)\n    }\n  } else {\n    a = fi\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n      fa = abs(fi)\n    }\n  }\n  var x = a + b\n  var bv = x - a\n  var y = b - bv\n  var q0 = y\n  var q1 = x\n  var _x, _bv, _av, _br, _ar\n  while(eptr < ne && fptr < nf) {\n    if(ea < fa) {\n      a = ei\n      eptr += 1\n      if(eptr < ne) {\n        ei = e[eptr]\n        ea = abs(ei)\n      }\n    } else {\n      a = fi\n      fptr += 1\n      if(fptr < nf) {\n        fi = f[fptr]\n        fa = abs(fi)\n      }\n    }\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n  }\n  while(eptr < ne) {\n    a = ei\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    }\n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    eptr += 1\n    if(eptr < ne) {\n      ei = e[eptr]\n    }\n  }\n  while(fptr < nf) {\n    a = fi\n    b = q0\n    x = a + b\n    bv = x - a\n    y = b - bv\n    if(y) {\n      g[count++] = y\n    } \n    _x = q1 + x\n    _bv = _x - q1\n    _av = _x - _bv\n    _br = x - _bv\n    _ar = q1 - _av\n    q0 = _ar + _br\n    q1 = _x\n    fptr += 1\n    if(fptr < nf) {\n      fi = f[fptr]\n    }\n  }\n  if(q0) {\n    g[count++] = q0\n  }\n  if(q1) {\n    g[count++] = q1\n  }\n  if(!count) {\n    g[count++] = 0.0  \n  }\n  g.length = count\n  return g\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/robust-sum/robust-sum.js?");

/***/ }),

/***/ "./node_modules/rollbar/dist/rollbar.umd.min.js":
/*!******************************************************!*\
  !*** ./node_modules/rollbar/dist/rollbar.umd.min.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("!function(t,e){ true?module.exports=e():undefined}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=6)}([function(t,e,r){\"use strict\";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return\"object\"!==e?e:t?t instanceof Error?\"error\":{}.toString.call(t).match(/\\s([a-zA-Z]+)/)[1].toLowerCase():\"null\"}function a(t){return i(t,\"function\")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\"),r=RegExp(\"^\"+e+\"$\");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)}function l(){var t=y();return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),(\"x\"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"],q:{name:\"queryKey\",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,\"object\")||i(n,\"array\"))?r.includes(n)?u[o]=\"Removed circular reference: \"+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u=\"Failed cloning custom data: \"+t.message}return u}(t,[t])}var m=[\"log\",\"network\",\"dom\",\"navigation\",\"error\",\"manual\"],g=[\"critical\",\"error\",\"warning\",\"info\",\"debug\"];function v(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1}function y(){return Date.now?+Date.now():+new Date}t.exports={addParamsAndAccessTokenToPath:function(t,e,r){(r=r||{}).access_token=t;var n,o=[];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&o.push([n,r[n]].join(\"=\"));var i=\"?\"+o.sort().join(\"&\");(e=e||{}).path=e.path||\"\";var s,a=e.path.indexOf(\"?\"),u=e.path.indexOf(\"#\");-1!==a&&(-1===u||u>a)?(s=e.path,e.path=s.substring(0,a)+i+\"&\"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v<b;++v){var w=s(f=t[v]);switch(g.push(w),w){case\"undefined\":break;case\"string\":i?m.push(f):i=f;break;case\"function\":c=h(e,f);break;case\"date\":m.push(f);break;case\"error\":case\"domexception\":case\"exception\":a?m.push(f):a=f;break;case\"object\":case\"array\":if(f instanceof Error||\"undefined\"!=typeof DOMException&&f instanceof DOMException){a?m.push(f):a=f;break}if(n&&\"object\"===w&&!p){for(var _=0,x=n.length;_<x;++_)if(void 0!==f[n[_]]){p=f;break}if(p)break}u?m.push(f):u=f;break;default:if(f instanceof Error||\"undefined\"!=typeof DOMException&&f instanceof DOMException){a?m.push(f):a=f;break}m.push(f)}}u&&(u=d(u)),m.length>0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i<e.length;++i)e[i].hasOwnProperty(\"rollbarContext\")&&(r=n(r,d(e[i].rollbarContext)),o=!0);o&&(t.data.custom=r)}catch(e){t.diagnostic.error_context=\"Failed: \"+e.message}},createTelemetryEvent:function(t){for(var e,r,n,o,i=0,a=t.length;i<a;++i){switch(s(o=t[i])){case\"string\":!e&&v(m,o)?e=o:!n&&v(g,o)&&(n=o);break;case\"object\":r=o}}return{type:e||\"manual\",metadata:r||{},level:n}},filterIp:function(t,e){if(t&&t.user_ip&&!0!==e){var r=t.user_ip;if(e)try{var n;if(-1!==r.indexOf(\".\"))(n=r.split(\".\")).pop(),n.push(\"0\"),r=n.join(\".\");else if(-1!==r.indexOf(\":\")){if((n=r.split(\":\")).length>2){var o=n.slice(0,3),i=o[2].indexOf(\"/\");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat(\"0000:0000:0000:0000:0000\").join(\":\")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e<r;++e){switch(s(n=t[e])){case\"object\":(n=(n=f(n)).error||n.value).length>500&&(n=n.substr(0,497)+\"...\");break;case\"null\":n=\"null\";break;case\"undefined\":n=\"undefined\";break;case\"symbol\":n=n.toString()}o.push(n)}return o.join(\" \")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e=\"http:\":443===t.port&&(e=\"https:\")),e=e||\"https:\",!t.hostname)return null;var r=e+\"//\"+t.hostname;return t.port&&(r=r+\":\"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split(\".\"),n=t;try{for(var o=0,i=r.length;o<i;++o)n=n[r[o]]}catch(t){n=void 0}return n}},handleOptions:function(t,e,r,o){var i=n(t,e,r);return i=function(t,e){t.hostWhiteList&&!t.hostSafeList&&(t.hostSafeList=t.hostWhiteList,t.hostWhiteList=void 0,e&&e.log(\"hostWhiteList is deprecated. Use hostSafeList.\"));t.hostBlackList&&!t.hostBlockList&&(t.hostBlockList=t.hostBlackList,t.hostBlackList=void 0,e&&e.log(\"hostBlackList is deprecated. Use hostBlockList.\"));return t}(i,o),!e||e.overwriteScrubFields||e.scrubFields&&(i.scrubFields=(t.scrubFields||[]).concat(e.scrubFields)),i},isError:function(t){return i(t,\"error\")||i(t,\"exception\")},isFiniteNumber:function(t){return Number.isFinite(t)},isFunction:a,isIterable:function(t){var e=s(t);return\"object\"===e||\"array\"===e},isNativeFunction:u,isObject:c,isString:function(t){return\"string\"==typeof t||t instanceof String},isType:i,isPromise:function(t){return c(t)&&i(t.then,\"function\")},jsonParse:function(t){var e,r;try{e=o.parse(t)}catch(t){r=t}return{error:r,value:e}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(t,e,r,n,o,i,s,a){var u={url:e||\"\",line:r,column:n};u.func=a.guessFunctionName(u.url,u.line),u.context=a.gatherContext(u.url,u.line);var c=\"undefined\"!=typeof document&&document&&document.location&&document.location.href,l=\"undefined\"!=typeof window&&window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||s,url:c,stack:[u],useragent:l}},merge:n,now:y,redact:function(){return\"********\"},RollbarJSON:o,sanitizeUrl:function(t){var e=function(t){if(!i(t,\"string\"))return;for(var e=p,r=e.parser[e.strictMode?\"strict\":\"loose\"].exec(t),n={},o=0,s=e.key.length;o<s;++o)n[e.key[o]]=r[o]||\"\";return n[e.q.name]={},n[e.key[12]].replace(e.q.parser,(function(t,r,o){r&&(n[e.q.name][r]=o)})),n}(t);return e?(\"\"===e.anchor&&(e.source=e.source.replace(\"#\",\"\")),t=e.source.replace(\"?\"+e.query,\"\")):\"(unknown)\"},set:function(t,e,r){if(t){var n=e.split(\".\"),o=n.length;if(!(o<1))if(1!==o)try{for(var i=t[n[0]]||{},s=i,a=1;a<o-1;++a)i[n[a]]=i[n[a]]||{},i=i[n[a]];i[n[o-1]]=r,t[n[0]]=s}catch(t){return}else t[n[0]]=r}},setupJSON:function(t){a(o.stringify)&&a(o.parse)||(i(JSON,\"undefined\")||(t?(u(JSON.stringify)&&(o.stringify=JSON.stringify),u(JSON.parse)&&(o.parse=JSON.parse)):(a(JSON.stringify)&&(o.stringify=JSON.stringify),a(JSON.parse)&&(o.parse=JSON.parse))),a(o.stringify)&&a(o.parse)||t&&t(o))},stringify:f,maxByteSize:function(t){for(var e=0,r=t.length,n=0;n<r;n++){var o=t.charCodeAt(n);o<128?e+=1:o<2048?e+=2:o<65536&&(e+=3)}return e},typeName:s,uuid4:l}},function(t,e,r){\"use strict\";r(17);var n=r(18),o=r(0);t.exports={error:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),n.ieVersion()<=8?console.error(o.formatArgsAsString(t)):console.error.apply(console,t)},info:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),n.ieVersion()<=8?console.info(o.formatArgsAsString(t)):console.info.apply(console,t)},log:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),n.ieVersion()<=8?console.log(o.formatArgsAsString(t)):console.log.apply(console,t)}}},function(t,e,r){\"use strict\";t.exports={parse:function(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(-1!==(e=t.indexOf(\"//\"))?(n.protocol=t.substring(0,e),r=e+2):r=0,-1!==(e=t.indexOf(\"@\",r))&&(n.auth=t.substring(r,e),r=e+1),-1===(e=t.indexOf(\"/\",r))){if(-1===(e=t.indexOf(\"?\",r)))return-1===(e=t.indexOf(\"#\",r))?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(\":\")[0],n.port=n.host.split(\":\")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(\":\")[0],n.port=n.host.split(\":\")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(\":\")[0],n.port=n.host.split(\":\")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(-1===(e=t.indexOf(\"#\",r))?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split(\"?\");n.pathname=o[0],n.query=o[1],n.search=n.query?\"?\"+n.query:null}return n}}},function(t,e,r){\"use strict\";var n=r(22),o=new RegExp(\"^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): \");function i(){return null}function s(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=null,e}function a(t,e){return{stack:function(){var r=[];e=e||0;try{r=n.parse(t)}catch(t){r=[]}for(var o=[],i=e;i<r.length;i++)o.push(new s(r[i]));return o}(),message:t.message,name:u(t),rawStack:t.stack,rawException:t}}function u(t){var e=t.name&&t.name.length&&t.name,r=t.constructor.name&&t.constructor.name.length&&t.constructor.name;return e&&r?\"Error\"===e?r:e:e||r}t.exports={guessFunctionName:function(){return\"?\"},guessErrorClass:function(t){if(!t||!t.match)return[\"Unknown error. There was no error message to display.\",\"\"];var e=t.match(o),r=\"(unknown)\";return e&&(r=e[e.length-1],t=(t=t.replace((e[e.length-2]||\"\")+r+\":\",\"\")).replace(/(^[\\s]+|[\\s]+$)/g,\"\")),[r,t]},gatherContext:i,parse:function(t,e){var r=t;if(r.nested||r.cause){for(var n=[];r;)n.push(new a(r,e)),r=r.nested||r.cause,e=0;return n[0].traceChain=n,n[0]}return new a(r,e)},Stack:a,Frame:s}},function(t,e,r){\"use strict\";var n=r(0),o=r(5);function i(t,e){var r=e.split(\".\"),o=r.length-1;try{for(var i=0;i<=o;++i)i<o?t=t[r[i]]:t[r[i]]=n.redact()}catch(t){}}t.exports=function(t,e,r){if(e=e||[],r)for(var s=0;s<r.length;++s)i(t,r[s]);var a=function(t){for(var e,r=[],n=0;n<t.length;++n)e=\"^\\\\[?(%5[bB])?\"+t[n]+\"\\\\[?(%5[bB])?\\\\]?(%5[dD])?$\",r.push(new RegExp(e,\"i\"));return r}(e),u=function(t){for(var e,r=[],n=0;n<t.length;++n)e=\"\\\\[?(%5[bB])?\"+t[n]+\"\\\\[?(%5[bB])?\\\\]?(%5[dD])?\",r.push(new RegExp(\"(\"+e+\"=)([^&\\\\n]+)\",\"igm\"));return r}(e);function c(t,e){return e+n.redact()}return o(t,(function t(e,r,i){var s=function(t,e){var r;for(r=0;r<a.length;++r)if(a[r].test(t)){e=n.redact();break}return e}(e,r);return s===r?n.isType(r,\"object\")||n.isType(r,\"array\")?o(r,t,i):function(t){var e;if(n.isType(t,\"string\"))for(e=0;e<u.length;++e)t=t.replace(u[e],c);return t}(s):s}))}},function(t,e,r){\"use strict\";var n=r(0);t.exports=function(t,e,r){var o,i,s,a,u=n.isType(t,\"object\"),c=n.isType(t,\"array\"),l=[];if(r=r||{obj:[],mapped:[]},u){if(a=r.obj.indexOf(t),u&&-1!==a)return r.mapped[a]||r.obj[a];r.obj.push(t),a=r.obj.length-1}if(u)for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&l.push(o);else if(c)for(s=0;s<t.length;++s)l.push(s);var p=u?{}:[],f=!0;for(s=0;s<l.length;++s)i=t[o=l[s]],p[o]=e(o,i,r),f=f&&p[o]===t[o];return u&&!f&&(r.mapped[a]=p),f?t:p}},function(t,e,r){t.exports=r(7)},function(t,e,r){\"use strict\";var n=r(8),o=\"undefined\"!=typeof window&&window._rollbarConfig,i=o&&o.globalAlias||\"Rollbar\",s=\"undefined\"!=typeof window&&window[i]&&\"function\"==typeof window[i].shimId&&void 0!==window[i].shimId();if(\"undefined\"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),!s&&o){var a=new n(o);window[i]=a}else\"undefined\"!=typeof window?(window.rollbar=n,window._rollbarDidLoad=!0):\"undefined\"!=typeof self&&(self.rollbar=n,self._rollbarDidLoad=!0);t.exports=n},function(t,e,r){\"use strict\";var n=r(9),o=r(29),i=r(30),s=r(32),a=r(34),u=r(4),c=r(35);n.setComponents({telemeter:o,instrumenter:i,polyfillJSON:s,wrapGlobals:a,scrub:u,truncation:c}),t.exports=n},function(t,e,r){\"use strict\";var n=r(10),o=r(0),i=r(15),s=r(1),a=r(19),u=r(20),c=r(2),l=r(21),p=r(24),f=r(25),h=r(26),d=r(3);function m(t,e){this.options=o.handleOptions(x,t,null,s),this.options._configuredOptions=t;var r=this.components.telemeter,a=this.components.instrumenter,d=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var m=this.components.truncation,g=new u(m),v=new i(this.options,g,c,m);r&&(this.telemeter=new r(this.options)),this.client=e||new n(this.options,v,s,this.telemeter,\"browser\");var y=b(),w=\"undefined\"!=typeof document&&document;this.isChrome=y.chrome&&y.chrome.runtime,this.anonymousErrorsPending=0,function(t,e,r){t.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r)).addTransform(l.addClientInfo(r)).addTransform(l.addPluginInfo(r)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e.scrub)).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload)}(this.client.notifier,this,y),this.client.queue.addPredicate(h.checkLevel).addPredicate(f.checkIgnore).addPredicate(h.userCheckIgnore(s)).addPredicate(h.urlIsNotBlockListed(s)).addPredicate(h.urlIsSafeListed(s)).addPredicate(h.messageIsIgnored(s)),this.setupUnhandledCapture(),a&&(this.instrumenter=new a(this.options,this.client.telemeter,this,y,w),this.instrumenter.instrument()),o.setupJSON(d)}var g=null;function v(t){var e=\"Rollbar is not initialized\";s.error(e),t&&t(new Error(e))}function y(t){for(var e=0,r=t.length;e<r;++e)if(o.isFunction(t[e]))return t[e]}function b(){return\"undefined\"!=typeof window&&window||\"undefined\"!=typeof self&&self}m.init=function(t,e){return g?g.global(t).configure(t):g=new m(t,e)},m.prototype.components={},m.setComponents=function(t){m.prototype.components=t},m.prototype.global=function(t){return this.client.global(t),this},m.global=function(t){if(g)return g.global(t);v()},m.prototype.configure=function(t,e){var r=this.options,n={};return e&&(n={payload:e}),this.options=o.handleOptions(r,t,n,s),this.options._configuredOptions=o.handleOptions(r._configuredOptions,t,n),this.client.configure(this.options,e),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},m.configure=function(t,e){if(g)return g.configure(t,e);v()},m.prototype.lastError=function(){return this.client.lastError},m.lastError=function(){if(g)return g.lastError();v()},m.prototype.log=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.log(t),{uuid:e}},m.log=function(){if(g)return g.log.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.debug=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.debug(t),{uuid:e}},m.debug=function(){if(g)return g.debug.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.info=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.info(t),{uuid:e}},m.info=function(){if(g)return g.info.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.warn=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warn(t),{uuid:e}},m.warn=function(){if(g)return g.warn.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.warning=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warning(t),{uuid:e}},m.warning=function(){if(g)return g.warning.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.error=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.error(t),{uuid:e}},m.error=function(){if(g)return g.error.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.critical=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.critical(t),{uuid:e}},m.critical=function(){if(g)return g.critical.apply(g,arguments);var t=y(arguments);v(t)},m.prototype.buildJsonPayload=function(t){return this.client.buildJsonPayload(t)},m.buildJsonPayload=function(){if(g)return g.buildJsonPayload.apply(g,arguments);v()},m.prototype.sendJsonPayload=function(t){return this.client.sendJsonPayload(t)},m.sendJsonPayload=function(){if(g)return g.sendJsonPayload.apply(g,arguments);v()},m.prototype.setupUnhandledCapture=function(){var t=b();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(a.captureUncaughtExceptions(t,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(t,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(a.captureUnhandledRejections(t,this),this.unhandledRejectionsInitialized=!0)},m.prototype.handleUncaughtException=function(t,e,r,n,i,s){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&null===i&&\"\"===e)return\"anonymous\";var a,u=o.makeUnhandledStackInfo(t,e,r,n,i,\"onerror\",\"uncaught exception\",d);o.isError(i)?(a=this._createItem([t,i,s]))._unhandledStackInfo=u:o.isError(e)?(a=this._createItem([t,e,s]))._unhandledStackInfo=u:(a=this._createItem([t,s])).stackInfo=u,a.level=this.options.uncaughtErrorLevel,a._isUncaught=!0,this.client.log(a)}},m.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var t=this;try{Error.prepareStackTrace=function(e,r){if(t.options.inspectAnonymousErrors&&t.anonymousErrorsPending){if(t.anonymousErrorsPending-=1,!e)return;e._isAnonymous=!0,t.handleUncaughtException(e.message,null,null,null,e)}return e.stack}}catch(t){this.options.inspectAnonymousErrors=!1,this.error(\"anonymous error handler failed\",t)}}},m.prototype.handleUnhandledRejection=function(t,e){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var r=\"unhandled rejection was null or undefined!\";if(t)if(t.message)r=t.message;else{var n=o.stringify(t);n.value&&(r=n.value)}var i,s=t&&t._rollbarContext||e&&e._rollbarContext;o.isError(t)?i=this._createItem([r,t,s]):(i=this._createItem([r,t,s])).stackInfo=o.makeUnhandledStackInfo(r,\"\",0,0,null,\"unhandledrejection\",\"\",d),i.level=this.options.uncaughtErrorLevel,i._isUncaught=!0,i._originalArgs=i._originalArgs||[],i._originalArgs.push(e),this.client.log(i)}},m.prototype.wrap=function(t,e,r){try{var n;if(n=o.isFunction(e)?e:function(){return e||{}},!o.isFunction(t))return t;if(t._isWrap)return t;if(!t._rollbar_wrapped&&(t._rollbar_wrapped=function(){r&&o.isFunction(r)&&r.apply(this,arguments);try{return t.apply(this,arguments)}catch(r){var e=r;throw e&&window._rollbarWrappedError!==e&&(o.isType(e,\"string\")&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=t.toString(),window._rollbarWrappedError=e),e}},t._rollbar_wrapped._isWrap=!0,t.hasOwnProperty))for(var i in t)t.hasOwnProperty(i)&&\"_rollbar_wrapped\"!==i&&(t._rollbar_wrapped[i]=t[i]);return t._rollbar_wrapped}catch(e){return t}},m.wrap=function(t,e){if(g)return g.wrap(t,e);v()},m.prototype.captureEvent=function(){var t=o.createTelemetryEvent(arguments);return this.client.captureEvent(t.type,t.metadata,t.level)},m.captureEvent=function(){if(g)return g.captureEvent.apply(g,arguments);v()},m.prototype.captureDomContentLoaded=function(t,e){return e||(e=new Date),this.client.captureDomContentLoaded(e)},m.prototype.captureLoad=function(t,e){return e||(e=new Date),this.client.captureLoad(e)},m.prototype.loadFull=function(){s.info(\"Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.\")},m.prototype._createItem=function(t){return o.createItem(t,s,this)};var w=r(27),_=r(28),x={version:w.version,scrubFields:_.scrubFields,logLevel:w.logLevel,reportLevel:w.reportLevel,uncaughtErrorLevel:w.uncaughtErrorLevel,endpoint:w.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};t.exports=m},function(t,e,r){\"use strict\";var n=r(11),o=r(13),i=r(14),s=r(0);function a(t,e,r,n,l){this.options=s.merge(t),this.logger=r,a.rateLimiter.configureGlobal(this.options),a.rateLimiter.setPlatformOptions(l,this.options),this.api=e,this.queue=new o(a.rateLimiter,e,r,this.options);var p=this.options.tracer||null;c(p)?(this.tracer=p,this.options.tracer=\"opentracing-tracer-enabled\",this.options._configuredOptions.tracer=\"opentracing-tracer-enabled\"):this.tracer=null,this.notifier=new i(this.queue,this.options),this.telemeter=n,u(t),this.lastError=null,this.lastErrorHash=\"none\"}function u(t){t.stackTraceLimit&&(Error.stackTraceLimit=t.stackTraceLimit)}function c(t){if(!t)return!1;if(!t.scope||\"function\"!=typeof t.scope)return!1;var e=t.scope();return!(!e||!e.active||\"function\"!=typeof e.active)}a.rateLimiter=new n({maxItems:0,itemsPerMinute:60}),a.prototype.global=function(t){return a.rateLimiter.configureGlobal(t),this},a.prototype.configure=function(t,e){var r=this.options,n={};e&&(n={payload:e}),this.options=s.merge(r,t,n);var o=this.options.tracer||null;return c(o)?(this.tracer=o,this.options.tracer=\"opentracing-tracer-enabled\",this.options._configuredOptions.tracer=\"opentracing-tracer-enabled\"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(t),this.global(this.options),c(t.tracer)&&(this.tracer=t.tracer),this},a.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},a.prototype.debug=function(t){this._log(\"debug\",t)},a.prototype.info=function(t){this._log(\"info\",t)},a.prototype.warn=function(t){this._log(\"warning\",t)},a.prototype.warning=function(t){this._log(\"warning\",t)},a.prototype.error=function(t){this._log(\"error\",t)},a.prototype.critical=function(t){this._log(\"critical\",t)},a.prototype.wait=function(t){this.queue.wait(t)},a.prototype.captureEvent=function(t,e,r){return this.telemeter&&this.telemeter.captureEvent(t,e,r)},a.prototype.captureDomContentLoaded=function(t){return this.telemeter&&this.telemeter.captureDomContentLoaded(t)},a.prototype.captureLoad=function(t){return this.telemeter&&this.telemeter.captureLoad(t)},a.prototype.buildJsonPayload=function(t){return this.api.buildJsonPayload(t)},a.prototype.sendJsonPayload=function(t){this.api.postJsonPayload(t)},a.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(e)){if(r){var n=new Error(\"ignored identical item\");n.item=e,r(n)}}else try{this._addTracingInfo(e),e.level=e.level||t,this.telemeter&&this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(e,r)}catch(t){r&&r(t),this.logger.error(t)}},a.prototype._defaultLogLevel=function(){return this.options.logLevel||\"debug\"},a.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=function(t){var e=t.message||\"\",r=(t.err||{}).stack||String(t.err);return e+\"::\"+r}(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},a.prototype._addTracingInfo=function(t){if(this.tracer){var e=this.tracer.scope().active();if(function(t){if(!t||!t.context||\"function\"!=typeof t.context)return!1;var e=t.context();if(!e||!e.toSpanId||!e.toTraceId||\"function\"!=typeof e.toSpanId||\"function\"!=typeof e.toTraceId)return!1;return!0}(e)){e.setTag(\"rollbar.error_uuid\",t.uuid),e.setTag(\"rollbar.has_error\",!0),e.setTag(\"error\",!0),e.setTag(\"rollbar.item_url\",\"https://rollbar.com/item/uuid/?uuid=\"+t.uuid),e.setTag(\"rollbar.occurrence_url\",\"https://rollbar.com/occurrence/uuid/?uuid=\"+t.uuid);var r=e.context().toSpanId(),n=e.context().toTraceId();t.custom?(t.custom.opentracing_span_id=r,t.custom.opentracing_trace_id=n):t.custom={opentracing_span_id:r,opentracing_trace_id:n}}}},t.exports=a},function(t,e,r){\"use strict\";var n=r(0);function o(t){this.startTime=n.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function i(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?\"item per minute limit reached, ignoring errors until timeout\":\"maxItems has been hit, ignoring errors until reset.\";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:\"javascript\",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};\"browser\"===t?(a.platform=\"browser\",a.framework=\"browser-js\",a.notifier.name=\"rollbar-browser-js\"):\"server\"===t?(a.framework=e.framework||\"node-js\",a.notifier.name=e.notifier.name):\"react-native\"===t&&(a.framework=e.framework||\"react-native\",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+\" max items reached\",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+\" items per minute reached\",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){\"use strict\";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||\"[object Object]\"!==o.call(t))return!1;var e,r=n.call(t,\"constructor\"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,\"isPrototypeOf\");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;e<c;e++)if(null!=(u=arguments[e]))for(s in u)r=a[s],a!==(n=u[s])&&(n&&i(n)?(o=r&&i(r)?r:{},a[s]=t(o,n)):void 0!==n&&(a[s]=n));return a}},function(t,e,r){\"use strict\";var n=r(0);function o(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}o.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addPredicate=function(t){return n.isFunction(t)&&this.predicates.push(t),this},o.prototype.addPendingItem=function(t){this.pendingItems.push(t)},o.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);-1!==e&&this.pendingItems.splice(e,1)},o.prototype.addItem=function(t,e,r,o){e&&n.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(o),void e(i.err);if(this._maybeLog(t,r),this.removePendingItem(o),this.options.transmit){this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}}else e(new Error(\"Transmit disabled\"))},o.prototype.wait=function(t){n.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},o.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;r<n;r++)if(!(e=this.predicates[r](t,this.options))||void 0!==e.err)return{stop:!0,err:e.err};return{stop:!1,err:null}},o.prototype._makeApiRequest=function(t,e){var r=this.rateLimiter.shouldSend(t);r.shouldSend?this.api.postItem(t,function(r,n){r?this._maybeRetry(r,t,e):e(r,n)}.bind(this)):r.error?e(r.error):this.api.postItem(r.payload,e)};var i=[\"ECONNRESET\",\"ENOTFOUND\",\"ESOCKETTIMEDOUT\",\"ETIMEDOUT\",\"ECONNREFUSED\",\"EHOSTUNREACH\",\"EPIPE\",\"EAI_AGAIN\"];o.prototype._maybeRetry=function(t,e,r){var o=!1;if(this.options.retryInterval){for(var s=0,a=i.length;s<a;s++)if(t.code===i[s]){o=!0;break}o&&n.isFiniteNumber(this.options.maxRetries)&&(e.retries=e.retries?e.retries+1:1,e.retries>this.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,\"body.trace.exception.message\"))||n.get(t,\"body.trace_chain.0.exception.message\"))return void this.logger.error(r);(r=n.get(t,\"body.message.body\"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){\"use strict\";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error(\"Rollbar is not enabled\"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){\"use strict\";var n=r(0),o=r(16),i={hostname:\"api.rollbar.com\",path:\"/api/1/item/\",search:null,version:\"1\",protocol:\"https:\",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,\"POST\"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,\"POST\");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){\"use strict\";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,\"string\")){var o=n.stringify(e.context,r);o.error?e.context=\"Error: could not serialize 'context'\":e.context=o.value||\"\",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||\"https:\",n=t.port||(\"http:\"===r?80:\"https:\"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+\"//\"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\\/$/.test(t),n=/^\\//.test(e);return r&&n?e=e.substring(1):r||n||(e=\"/\"+e),t+e}}},function(t,e){!function(t){\"use strict\";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=[\"memory\"],s=\"assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn\".split(\",\");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}(\"undefined\"==typeof window?this:window)},function(t,e,r){\"use strict\";var n={ieVersion:function(){if(\"undefined\"!=typeof document){for(var t=3,e=document.createElement(\"div\"),r=e.getElementsByTagName(\"i\");e.innerHTML=\"\\x3c!--[if gt IE \"+ ++t+\"]><i></i><![endif]--\\x3e\",r[0];);return t>4?t:void 0}}};t.exports=n},function(t,e,r){\"use strict\";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),\"anonymous\"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if(\"function\"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){\"function\"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener(\"unhandledrejection\",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n=\"[unhandledrejection] error getting `promise` from event\"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r=\"[unhandledrejection] error getting `reason` from event\"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener(\"unhandledrejection\",n)}}}},function(t,e,r){\"use strict\";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t=\"undefined\"!=typeof window&&window||\"undefined\"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&\"angular\"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if(\"undefined\"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject(\"Msxml2.XMLHTTP\")},function(){return new ActiveXObject(\"Msxml3.XMLHTTP\")},function(){return new ActiveXObject(\"Microsoft.XMLHTTP\")}],n=r.length;for(e=0;e<n;e++)try{t=r[e]();break}catch(t){}return t}()))return s(new Error(\"No way to send a request\"));try{try{var p=function(){try{if(p&&4===l.readyState){p=void 0;var t=n.jsonParse(l.responseText);if((i=l)&&i.status&&200===i.status)return void s(t.error,t.value);if(function(t){return t&&n.isType(t.status,\"number\")&&t.status>=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u(\"XHR response had no status code (likely connection failure)\"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader(\"Content-Type\",\"application/json\"),l.setRequestHeader(\"X-Rollbar-Access-Token\",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if(\"undefined\"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error(\"No window available during request, unknown environment\"));\"http:\"===window.location.href.substring(0,5)&&\"https\"===e.substring(0,5)&&(e=\"http\"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u(\"Request timed out\",\"ETIMEDOUT\"))},f.onerror=function(){s(new Error(\"Error during request\"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error(\"Cannot find a method to transport a request\"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||\"ENOTFOUND\",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),\"GET\",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error(\"Cannot send empty request\"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),\"POST\",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),\"POST\",r,o,i,e.timeout)},t.exports=i},function(t,e,r){\"use strict\";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o=\"Item sent with null or missing arguments.\");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,\"data.body\",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y<u.length;++y)h={filename:(f=u[y]).url?n.sanitizeUrl(f.url):\"(unknown)\",lineno:f.line||null,method:f.func&&\"?\"!==f.func?f.func:\"[anonymous]\",colno:f.column},r.sendFrameUrl&&(h.url=f.url),h.method&&h.method.endsWith&&h.method.endsWith(\"_rollbar_wrapped\")||(d=m=g=null,(v=f.context?f.context.length:0)&&(b=Math.floor(v/2),m=f.context.slice(0,b),d=f.context[b],g=f.context.slice(b)),d&&(h.code=d),(m||g)&&(h.context={},m&&m.length&&(h.context.pre=m),g&&g.length&&(h.context.post=g)),f.args&&(h.args=f.args),p.frames.push(h));p.frames.reverse(),s&&(p.extra=n.merge(s))}return p}function c(t,e,r){return t.name?t.name:r.guessErrorClass?e:\"(unknown)\"}t.exports={handleDomException:function(t,e,r){if(t.err&&\"DOMException\"===o.Stack(t.err).name){var n=new Error;n.name=t.err.name,n.message=t.err.message,n.stack=t.err.stack,n.nested=t.err,t.err=n}r(null,t)},handleItemWithError:function(t,e,r){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||o.parse(t.err,t.skipFrames),e.addErrorContext&&function(t){var e=[],r=t.err;e.push(r);for(;r.nested||r.cause;)r=r.nested||r.cause,e.push(r);n.addErrorContext(t,e)}(t)}catch(e){i.error(\"Error while parsing the error object.\",e);try{t.message=t.err.message||t.err.description||t.message||String(t.err)}catch(e){t.message=String(t.err)||String(e)}delete t.err}r(null,t)},ensureItemHasSomethingToSay:function(t,e,r){t.message||t.stackInfo||t.custom||r(new Error(\"No message, stack info, or custom data\"),null),r(null,t)},addBaseInfo:function(t,e,r){var o=e.payload&&e.payload.environment||e.environment;t.data=n.merge(t.data,{environment:o,level:t.level,endpoint:e.endpoint,platform:\"browser\",framework:\"browser-js\",language:\"javascript\",server:{},uuid:t.uuid,notifier:{name:\"rollbar-browser-js\",version:e.version},custom:t.custom}),r(null,t)},addRequestInfo:function(t){return function(e,r,o){if(!t||!t.location)return o(null,e);var i=\"$remote_ip\";r.captureIp?!0!==r.captureIp&&(i+=\"_anonymize\"):i=null,n.set(e,\"data.request\",{url:t.location.href,query_string:t.location.search,user_ip:i}),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,\"data.client\",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u<c;++u)i=a[u],s.push({name:i.name,description:i.description});n.set(e,\"data.client.javascript.plugins\",s),o(null,e)}},addBody:function(t,e,r){t.stackInfo?t.stackInfo.traceChain?function(t,e,r){for(var o=t.stackInfo.traceChain,i=[],s=o.length,a=0;a<s;a++){var c=u(t,o[a],e);i.push(c)}n.set(t,\"data.body\",{trace_chain:i}),r(null,t)}(t,e,r):function(t,e,r){if(a(t)){var i=u(t,t.stackInfo,e);n.set(t,\"data.body\",{trace:i}),r(null,t)}else{var l=t.stackInfo,p=o.guessErrorClass(l.message),f=c(l,p[0],e),h=p[1];t.message=f+\": \"+h,s(t,e,r)}}(t,e,r):s(t,e,r)},addScrubber:function(t){return function(e,r,n){if(t){var o=r.scrubFields||[],i=r.scrubPaths||[];e.data=t(e.data,o,i)}n(null,e)}}}},function(t,e,r){var n,o,i;!function(s,a){\"use strict\";o=[r(23)],void 0===(i=\"function\"==typeof(n=function(t){var e=/(^|@)\\S+:\\d+/,r=/^\\s*at .*(\\S+:\\d+|\\(native\\))/m,n=/^(eval@)?(\\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t[\"opera#sourceloc\"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error(\"Cannot parse given Error object\")},extractLocation:function(t){if(-1===t.indexOf(\":\"))return[t];var e=/(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(t.replace(/[()]/g,\"\"));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(\"\\n\").filter((function(t){return!!t.match(r)}),this).map((function(e){e.indexOf(\"(eval \")>-1&&(e=e.replace(/eval code/g,\"eval\").replace(/(\\(eval at [^()]*)|(\\),.*$)/g,\"\"));var r=e.replace(/^\\s+/,\"\").replace(/\\(eval code/g,\"(\"),n=r.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/),o=(r=n?r.replace(n[0],\"\"):r).split(/\\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(\" \")||void 0,a=[\"eval\",\"<anonymous>\"].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split(\"\\n\").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(\" > eval\")>-1&&(e=e.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g,\":$1\")),-1===e.indexOf(\"@\")&&-1===e.indexOf(\":\"))return new t({functionName:e});var r=/((.*\".+\"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,\"\"));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf(\"\\n\")>-1&&t.message.split(\"\\n\").length>t.stacktrace.split(\"\\n\").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\\d+).*script (?:in )?(\\S+)/i,n=e.message.split(\"\\n\"),o=[],i=2,s=n.length;i<s;i+=2){var a=r.exec(n[i]);a&&o.push(new t({fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera10:function(e){for(var r=/Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i,n=e.stacktrace.split(\"\\n\"),o=[],i=0,s=n.length;i<s;i+=2){var a=r.exec(n[i]);a&&o.push(new t({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera11:function(r){return r.stack.split(\"\\n\").filter((function(t){return!!t.match(e)&&!t.match(/^Error created at/)}),this).map((function(e){var r,n=e.split(\"@\"),o=this.extractLocation(n.pop()),i=n.shift()||\"\",s=i.replace(/<anonymous function(: (\\w+))?>/,\"$2\").replace(/\\([^)]*\\)/g,\"\")||void 0;i.match(/\\(([^)]*)\\)/)&&(r=i.replace(/^[^(]+\\(([^)]*)\\)$/,\"$1\"));var a=void 0===r||\"[arguments not available]\"===r?void 0:r.split(\",\");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){\"use strict\";o=[],void 0===(i=\"function\"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=[\"isConstructor\",\"isEval\",\"isNative\",\"isToplevel\"],n=[\"columnNumber\",\"lineNumber\"],o=[\"fileName\",\"functionName\",\"source\"],i=r.concat(n,o,[\"args\"],[\"evalOrigin\"]);function s(e){if(e)for(var r=0;r<i.length;r++)void 0!==e[i[r]]&&this[\"set\"+t(i[r])](e[i[r]])}s.prototype={getArgs:function(){return this.args},setArgs:function(t){if(\"[object Array]\"!==Object.prototype.toString.call(t))throw new TypeError(\"Args must be an Array\");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof s)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError(\"Eval Origin must be an Object or StackFrame\");this.evalOrigin=new s(t)}},toString:function(){var t=this.getFileName()||\"\",e=this.getLineNumber()||\"\",r=this.getColumnNumber()||\"\",n=this.getFunctionName()||\"\";return this.getIsEval()?t?\"[eval] (\"+t+\":\"+e+\":\"+r+\")\":\"[eval]:\"+e+\":\"+r:n?n+\" (\"+t+\":\"+e+\":\"+r+\")\":t+\":\"+e+\":\"+r}},s.fromString=function(t){var e=t.indexOf(\"(\"),r=t.lastIndexOf(\")\"),n=t.substring(0,e),o=t.substring(e+1,r).split(\",\"),i=t.substring(r+1);if(0===i.indexOf(\"@\"))var a=/@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(i,\"\"),u=a[1],c=a[2],l=a[3];return new s({functionName:n,args:o||void 0,fileName:u,lineNumber:c||void 0,columnNumber:l||void 0})};for(var a=0;a<r.length;a++)s.prototype[\"get\"+t(r[a])]=e(r[a]),s.prototype[\"set\"+t(r[a])]=function(t){return function(e){this[t]=Boolean(e)}}(r[a]);for(var u=0;u<n.length;u++)s.prototype[\"get\"+t(n[u])]=e(n[u]),s.prototype[\"set\"+t(n[u])]=function(t){return function(e){if(r=e,isNaN(parseFloat(r))||!isFinite(r))throw new TypeError(t+\" must be a Number\");var r;this[t]=Number(e)}}(n[u]);for(var c=0;c<o.length;c++)s.prototype[\"get\"+t(o[c])]=e(o[c]),s.prototype[\"set\"+t(o[c])]=function(t){return function(e){this[t]=String(e)}}(o[c]);return s})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){\"use strict\";var n=r(0);function o(t,e){n.isFunction(t[e])&&(t[e]=t[e].toString())}t.exports={itemToPayload:function(t,e,r){var o=e.payload||{};o.body&&delete o.body;var i=n.merge(t.data,o);t._isUncaught&&(i._isUncaught=!0),t._originalArgs&&(i._originalArgs=t._originalArgs),r(null,i)},addTelemetryData:function(t,e,r){t.telemetryEvents&&n.set(t,\"data.body.telemetry\",t.telemetryEvents),r(null,t)},addMessageWithError:function(t,e,r){if(t.message){var o=\"data.body.trace_chain.0\",i=n.get(t,o);if(i||(o=\"data.body.trace\",i=n.get(t,o)),i){if(!i.exception||!i.exception.description)return n.set(t,o+\".exception.description\",t.message),void r(null,t);var s=n.get(t,o+\".extra\")||{},a=n.merge(s,{message:t.message});n.set(t,o+\".extra\",a)}r(null,t)}else r(null,t)},userTransform:function(t){return function(e,r,o){var i=n.merge(e),s=null;try{n.isFunction(r.transform)&&(s=r.transform(i.data,e))}catch(n){return r.transform=null,t.error(\"Error while calling custom transform() function. Removing custom transform().\",n),void o(null,e)}n.isPromise(s)?s.then((function(t){t&&(i.data=t),o(null,i)}),(function(t){o(t,e)})):o(null,i)}},addConfigToPayload:function(t,e,r){if(!e.sendConfig)return r(null,t);var o=n.get(t,\"data.custom\")||{};o._rollbarConfig=e,t.data.custom=o,r(null,t)},addConfiguredOptions:function(t,e,r){var n=e._configuredOptions;o(n,\"transform\"),o(n,\"checkIgnore\"),o(n,\"onSendCallback\"),delete n.accessToken,t.data.notifier.configured_options=n,r(null,t)},addDiagnosticKeys:function(t,e,r){var o=n.merge(t.notifier.client.notifier.diagnostic,t.diagnostic);if(n.get(t,\"err._isAnonymous\")&&(o.is_anonymous=!0),t._isUncaught&&(o.is_uncaught=t._isUncaught),t.err)try{o.raw_error={message:t.err.message,name:t.err.name,constructor_name:t.err.constructor&&t.err.constructor.name,filename:t.err.fileName,line:t.err.lineNumber,column:t.err.columnNumber,stack:t.err.stack}}catch(t){o.raw_error={failed:String(t)}}t.data.notifier.diagnostic=n.merge(t.data.notifier.diagnostic,o),r(null,t)}}},function(t,e,r){\"use strict\";var n=r(0);t.exports={checkIgnore:function(t,e){return!n.get(e,\"plugins.jquery.ignoreAjaxErrors\")||!n.get(t,\"body.message.extra.isAjax\")}}},function(t,e,r){\"use strict\";var n=r(0);function o(t,e,r){if(!t)return!r;var o,i,s=t.frames;if(!s||0===s.length)return!r;for(var a=e.length,u=s.length,c=0;c<u;c++){if(o=s[c].filename,!n.isType(o,\"string\"))return!r;for(var l=0;l<a;l++)if(i=e[l],new RegExp(i).test(o))return!0}return!1}function i(t,e,r,i){var s,a,u=!1;\"blocklist\"===r&&(u=!0);try{if(s=u?e.hostBlockList:e.hostSafeList,a=n.get(t,\"body.trace_chain\")||[n.get(t,\"body.trace\")],!s||0===s.length)return!u;if(0===a.length||!a[0])return!u;for(var c=a.length,l=0;l<c;l++)if(o(a[l],s,u))return!0}catch(t){u?e.hostBlockList=null:e.hostSafeList=null;var p=u?\"hostBlockList\":\"hostSafeList\";return i.error(\"Error while reading your configuration's \"+p+\" option. Removing custom \"+p+\".\",t),!u}return!1}t.exports={checkLevel:function(t,e){var r=t.level,o=n.LEVELS[r]||0,i=e.reportLevel;return!(o<(n.LEVELS[i]||0))},userCheckIgnore:function(t){return function(e,r){var o=!!e._isUncaught;delete e._isUncaught;var i=e._originalArgs;delete e._originalArgs;try{n.isFunction(r.onSendCallback)&&r.onSendCallback(o,i,e)}catch(e){r.onSendCallback=null,t.error(\"Error while calling onSendCallback, removing\",e)}try{if(n.isFunction(r.checkIgnore)&&r.checkIgnore(o,i,e))return!1}catch(e){r.checkIgnore=null,t.error(\"Error while calling custom checkIgnore(), removing\",e)}return!0}},urlIsNotBlockListed:function(t){return function(e,r){return!i(e,r,\"blocklist\",t)}},urlIsSafeListed:function(t){return function(e,r){return i(e,r,\"safelist\",t)}},messageIsIgnored:function(t){return function(e,r){var o,i,s,a,u,c;try{if(!1,!(s=r.ignoredMessages)||0===s.length)return!0;if(0===(c=function(t){var e=t.body,r=[];if(e.trace_chain)for(var o=e.trace_chain,i=0;i<o.length;i++){var s=o[i];r.push(n.get(s,\"exception.message\"))}e.trace&&r.push(n.get(e,\"trace.exception.message\"));e.message&&r.push(n.get(e,\"message.body\"));return r}(e)).length)return!0;for(a=s.length,o=0;o<a;o++)for(u=new RegExp(s[o],\"gi\"),i=0;i<c.length;i++)if(u.test(c[i]))return!1}catch(e){r.ignoredMessages=null,t.error(\"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\")}return!0}}}},function(t,e,r){\"use strict\";t.exports={version:\"2.25.0\",endpoint:\"api.rollbar.com/api/1/item/\",logLevel:\"debug\",reportLevel:\"debug\",uncaughtErrorLevel:\"error\",maxItems:0,itemsPerMin:60}},function(t,e,r){\"use strict\";t.exports={scrubFields:[\"pw\",\"pass\",\"passwd\",\"password\",\"secret\",\"confirm_password\",\"confirmPassword\",\"password_confirmation\",\"passwordConfirmation\",\"access_token\",\"accessToken\",\"X-Rollbar-Access-Token\",\"secret_key\",\"secretKey\",\"secretToken\",\"cc-number\",\"card number\",\"cardnumber\",\"cardnum\",\"ccnum\",\"ccnumber\",\"cc num\",\"creditcardnumber\",\"credit card number\",\"newcreditcardnumber\",\"new credit card\",\"creditcardno\",\"credit card no\",\"card#\",\"card #\",\"cc-csc\",\"cvc\",\"cvc2\",\"cvv2\",\"ccv2\",\"security code\",\"card verification\",\"name on credit card\",\"name on card\",\"nameoncard\",\"cardholder\",\"card holder\",\"name des karteninhabers\",\"ccname\",\"card type\",\"cardtype\",\"cc type\",\"cctype\",\"payment type\",\"expiration date\",\"expirationdate\",\"expdate\",\"cc-exp\",\"ccmonth\",\"ccyear\"]}},function(t,e,r){\"use strict\";var n=r(0);function o(t){this.queue=[],this.options=n.merge(t);var e=this.options.maxTelemetryEvents||100;this.maxQueueSize=Math.max(0,Math.min(e,100))}function i(t,e){if(e)return e;return{error:\"error\",manual:\"info\"}[t]||\"info\"}o.prototype.configure=function(t){var e=this.options;this.options=n.merge(e,t);var r=this.options.maxTelemetryEvents||100,o=Math.max(0,Math.min(r,100)),i=0;this.maxQueueSize>o&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:\"client\"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture(\"error\",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture(\"log\",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||\"xhr\",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture(\"network\",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?\"info\":0===t||t>=400?\"error\":\"info\"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture(\"dom\",i,\"info\",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture(\"navigation\",{from:t,to:e},\"info\",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture(\"navigation\",{subtype:\"DOMContentLoaded\"},\"info\",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture(\"navigation\",{subtype:\"load\"},\"info\",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},\"connectivity\",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture(\"log\",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){\"use strict\";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,\"object\")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r<t.length;++r)e.push(new RegExp(t[r],\"i\"));return function(t){var r=function(t){if(!t||!t.attributes)return null;for(var e=t.attributes,r=0;r<e.length;++r)if(\"name\"===e[r].key)return e[r].value;return null}(t);if(!r)return!1;for(var n=0;n<e.length;++n)if(e[n].test(r))return!0;return!1}}(t.scrubFields),this.telemeter=e,this.rollbar=r,this.diagnostic=r.client.notifier.diagnostic,this._window=o||{},this._document=i||{},this.replacements={network:[],log:[],navigation:[],connectivity:[]},this.eventRemovers={dom:[],connectivity:[],contentsecuritypolicy:[]},this._location=this._window.location,this._lastHref=this._location&&this._location.href}l.prototype.configure=function(t){this.options=n.merge(this.options,t);var e=t.autoInstrument,r=n.merge(this.autoInstrument);!1===t.enabled||!1===e?this.autoInstrument={}:(n.isType(e,\"object\")||(e=a),this.autoInstrument=n.merge(a,e)),this.instrument(r),void 0!==t.scrubTelemetryInputs&&(this.scrubTelemetryInputs=!!t.scrubTelemetryInputs),void 0!==t.telemetryScrubber&&(this.telemetryScrubber=t.telemetryScrubber)},l.prototype.instrument=function(t){!this.autoInstrument.network||t&&t.network?!this.autoInstrument.network&&t&&t.network&&this.deinstrumentNetwork():this.instrumentNetwork(),!this.autoInstrument.log||t&&t.log?!this.autoInstrument.log&&t&&t.log&&this.deinstrumentConsole():this.instrumentConsole(),!this.autoInstrument.dom||t&&t.dom?!this.autoInstrument.dom&&t&&t.dom&&this.deinstrumentDom():this.instrumentDom(),!this.autoInstrument.navigation||t&&t.navigation?!this.autoInstrument.navigation&&t&&t.navigation&&this.deinstrumentNavigation():this.instrumentNavigation(),!this.autoInstrument.connectivity||t&&t.connectivity?!this.autoInstrument.connectivity&&t&&t.connectivity&&this.deinstrumentConnectivity():this.instrumentConnectivity(),!this.autoInstrument.contentSecurityPolicy||t&&t.contentSecurityPolicy?!this.autoInstrument.contentSecurityPolicy&&t&&t.contentSecurityPolicy&&this.deinstrumentContentSecurityPolicy():this.instrumentContentSecurityPolicy()},l.prototype.deinstrumentNetwork=function(){c(this.replacements,\"network\")},l.prototype.instrumentNetwork=function(){var t=this;function e(e,r){e in r&&n.isFunction(r[e])&&u(r,e,(function(e){return t.rollbar.wrap(e)}))}if(\"XMLHttpRequest\"in this._window){var r=this._window.XMLHttpRequest.prototype;u(r,\"open\",(function(t){return function(e,r){return n.isType(r,\"string\")&&(this.__rollbar_xhr?(this.__rollbar_xhr.method=e,this.__rollbar_xhr.url=r,this.__rollbar_xhr.status_code=null,this.__rollbar_xhr.start_time_ms=n.now(),this.__rollbar_xhr.end_time_ms=null):this.__rollbar_xhr={method:e,url:r,status_code:null,start_time_ms:n.now(),end_time_ms:null}),t.apply(this,arguments)}}),this.replacements,\"network\"),u(r,\"setRequestHeader\",(function(e){return function(r,o){return this.__rollbar_xhr||(this.__rollbar_xhr={}),n.isType(r,\"string\")&&n.isType(o,\"string\")&&(t.autoInstrument.networkRequestHeaders&&(this.__rollbar_xhr.request_headers||(this.__rollbar_xhr.request_headers={}),this.__rollbar_xhr.request_headers[r]=o),\"content-type\"===r.toLowerCase()&&(this.__rollbar_xhr.request_content_type=o)),e.apply(this,arguments)}}),this.replacements,\"network\"),u(r,\"send\",(function(r){return function(o){var i=this;function s(){if(i.__rollbar_xhr&&(null===i.__rollbar_xhr.status_code&&(i.__rollbar_xhr.status_code=0,t.autoInstrument.networkRequestBody&&(i.__rollbar_xhr.request=o),i.__rollbar_event=t.captureNetwork(i.__rollbar_xhr,\"xhr\",void 0)),i.readyState<2&&(i.__rollbar_xhr.start_time_ms=n.now()),i.readyState>3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader(\"Content-Type\"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\\r\\n]+/);for(a=0;a<p.length;a++)s=(c=p[a].split(\": \")).shift(),l=c.join(\": \"),e[s]=l}}else for(a=0;a<r.length;a++)e[s=r[a]]=i.getResponseHeader(s)}catch(t){}}var f=null;if(t.autoInstrument.networkResponseBody)try{f=i.responseText}catch(t){}var h=null;(f||e)&&(h={},f&&(t.isJsonContentType(i.__rollbar_xhr.response_content_type)?h.body=t.scrubJson(f):h.body=f),e&&(h.headers=e)),h&&(i.__rollbar_xhr.response=h);try{var d=i.status;d=1223===d?204:d,i.__rollbar_xhr.status_code=d,i.__rollbar_event.level=t.telemeter.levelFromStatus(d),t.errorOnHttpStatus(i.__rollbar_xhr)}catch(t){}}}return e(\"onload\",i),e(\"onerror\",i),e(\"onprogress\",i),\"onreadystatechange\"in i&&n.isFunction(i.onreadystatechange)?u(i,\"onreadystatechange\",(function(e){return t.rollbar.wrap(e,void 0,s)})):i.onreadystatechange=s,i.__rollbar_xhr&&t.trackHttpErrors()&&(i.__rollbar_xhr.stack=(new Error).stack),r.apply(this,arguments)}}),this.replacements,\"network\")}\"fetch\"in this._window&&u(this._window,\"fetch\",(function(e){return function(r,o){for(var i=new Array(arguments.length),s=0,a=i.length;s<a;s++)i[s]=arguments[s];var u,c=i[0],l=\"GET\";n.isType(c,\"string\")?u=c:c&&(u=c.url,c.method&&(l=c.method)),i[1]&&i[1].method&&(l=i[1].method);var p={method:l,url:u,status_code:null,start_time_ms:n.now(),end_time_ms:null};if(i[1]&&i[1].headers){var f=new Headers(i[1].headers);p.request_content_type=f.get(\"Content-Type\"),t.autoInstrument.networkRequestHeaders&&(p.request_headers=t.fetchHeaders(f,t.autoInstrument.networkRequestHeaders))}return t.autoInstrument.networkRequestBody&&(i[1]&&i[1].body?p.request=i[1].body:i[0]&&!n.isType(i[0],\"string\")&&i[0].body&&(p.request=i[0].body)),t.captureNetwork(p,\"fetch\",void 0),t.trackHttpErrors()&&(p.stack=(new Error).stack),e.apply(this,i).then((function(e){p.end_time_ms=n.now(),p.status_code=e.status,p.response_content_type=e.headers.get(\"Content-Type\");var r=null;t.autoInstrument.networkResponseHeaders&&(r=t.fetchHeaders(e.headers,t.autoInstrument.networkResponseHeaders));var o=null;return t.autoInstrument.networkResponseBody&&\"function\"==typeof e.text&&(o=e.clone().text()),(r||o)&&(p.response={},o&&(\"function\"==typeof o.then?o.then((function(e){e&&t.isJsonContentType(p.response_content_type)?p.response.body=t.scrubJson(e):p.response.body=e})):p.response.body=o),r&&(p.response.headers=r)),t.errorOnHttpStatus(p),e}))}}),this.replacements,\"network\")},l.prototype.captureNetwork=function(t,e,r){return t.request&&this.isJsonContentType(t.request_content_type)&&(t.request=this.scrubJson(t.request)),this.telemeter.captureNetwork(t,e,r)},l.prototype.isJsonContentType=function(t){return!!(t&&n.isType(t,\"string\")&&t.toLowerCase().includes(\"json\"))},l.prototype.scrubJson=function(t){return JSON.stringify(o(JSON.parse(t),this.options.scrubFields))},l.prototype.fetchHeaders=function(t,e){var r={};try{var n;if(!0===e){if(\"function\"==typeof t.entries)for(var o=t.entries(),i=o.next();!i.done;)r[i.value[0]]=i.value[1],i=o.next()}else for(n=0;n<e.length;n++){var s=e[n];r[s]=t.get(s)}}catch(t){}return r},l.prototype.trackHttpErrors=function(){return this.autoInstrument.networkErrorOnHttp5xx||this.autoInstrument.networkErrorOnHttp4xx||this.autoInstrument.networkErrorOnHttp0},l.prototype.errorOnHttpStatus=function(t){var e=t.status_code;if(e>=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error(\"HTTP request failed with Status \"+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if(\"console\"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if(\"console\"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=[\"debug\",\"info\",\"warn\",\"error\",\"log\"];try{for(var o=0,i=r.length;o<i;o++)s(r[o])}catch(t){this.diagnostic.instrumentConsole={error:t.message}}}function s(r){var o=e[r],i=e,s=\"warn\"===r?\"warning\":r;e[r]=function(){var e=Array.prototype.slice.call(arguments),r=n.formatArgsAsString(e);t.telemeter.captureLog(r,s),o&&Function.prototype.apply.call(o,i,e)},t.replacements.log.push([r,o])}},l.prototype.deinstrumentDom=function(){(\"addEventListener\"in this._window||\"attachEvent\"in this._window)&&this.removeListeners(\"dom\")},l.prototype.instrumentDom=function(){if(\"addEventListener\"in this._window||\"attachEvent\"in this._window){var t=this.handleClick.bind(this),e=this.handleBlur.bind(this);this.addListener(\"dom\",this._window,\"click\",\"onclick\",t,!0),this.addListener(\"dom\",this._window,\"blur\",\"onfocusout\",e,!0)}},l.prototype.handleClick=function(t){try{var e=s.getElementFromEvent(t,this._document),r=e&&e.tagName,n=s.isDescribedElement(e,\"a\")||s.isDescribedElement(e,\"button\");r&&(n||s.isDescribedElement(e,\"input\",[\"button\",\"submit\"]))?this.captureDomEvent(\"click\",e):s.isDescribedElement(e,\"input\",[\"checkbox\",\"radio\"])&&this.captureDomEvent(\"input\",e,e.value,e.checked)}catch(t){}},l.prototype.handleBlur=function(t){try{var e=s.getElementFromEvent(t,this._document);e&&e.tagName&&(s.isDescribedElement(e,\"textarea\")?this.captureDomEvent(\"input\",e,e.value):s.isDescribedElement(e,\"select\")&&e.options&&e.options.length?this.handleSelectInputChanged(e):s.isDescribedElement(e,\"input\")&&!s.isDescribedElement(e,\"input\",[\"button\",\"submit\",\"hidden\",\"checkbox\",\"radio\"])&&this.captureDomEvent(\"input\",e,e.value))}catch(t){}},l.prototype.handleSelectInputChanged=function(t){if(t.multiple)for(var e=0;e<t.options.length;e++)t.options[e].selected&&this.captureDomEvent(\"input\",t,t.options[e].value);else t.selectedIndex>=0&&t.options[t.selectedIndex]&&this.captureDomEvent(\"input\",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||\"password\"===s.getElementType(e))r=\"[scrubbed]\";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r=\"[scrubbed]\"):this.defaultValueScrubber(o)&&(r=\"[scrubbed]\")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,\"navigation\")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,\"onpopstate\",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,\"navigation\"),u(this._window.history,\"pushState\",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+\"\"),t.apply(this,arguments)}}),this.replacements,\"navigation\")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||\"\")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||\"\")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){(\"addEventListener\"in this._window||\"body\"in this._document)&&(this._window.addEventListener?this.removeListeners(\"connectivity\"):c(this.replacements,\"connectivity\"))},l.prototype.instrumentConnectivity=function(){if(\"addEventListener\"in this._window||\"body\"in this._document)if(this._window.addEventListener)this.addListener(\"connectivity\",this._window,\"online\",void 0,function(){this.telemeter.captureConnectivityChange(\"online\")}.bind(this),!0),this.addListener(\"connectivity\",this._window,\"offline\",void 0,function(){this.telemeter.captureConnectivityChange(\"offline\")}.bind(this),!0);else{var t=this;u(this._document.body,\"ononline\",(function(e){return function(){t.telemeter.captureConnectivityChange(\"online\"),e&&e.apply(this,arguments)}}),this.replacements,\"connectivity\"),u(this._document.body,\"onoffline\",(function(e){return function(){t.telemeter.captureConnectivityChange(\"offline\"),e&&e.apply(this,arguments)}}),this.replacements,\"connectivity\")}},l.prototype.handleCspEvent=function(t){var e=\"Security Policy Violation: blockedURI: \"+t.blockedURI+\", violatedDirective: \"+t.violatedDirective+\", effectiveDirective: \"+t.effectiveDirective+\", \";t.sourceFile&&(e+=\"location: \"+t.sourceFile+\", line: \"+t.lineNumber+\", col: \"+t.columnNumber+\", \"),e+=\"originalPolicy: \"+t.originalPolicy,this.telemeter.captureLog(e,\"error\"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){\"addEventListener\"in this._document&&this.removeListeners(\"contentsecuritypolicy\")},l.prototype.instrumentContentSecurityPolicy=function(){if(\"addEventListener\"in this._document){var t=this.handleCspEvent.bind(this);this.addListener(\"contentsecuritypolicy\",this._document,\"securitypolicyviolation\",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){\"use strict\";function n(t){return(t.getAttribute(\"type\")||\"\").toLowerCase()}function o(t){if(!t||!t.tagName)return\"\";var e=[t.tagName];t.id&&e.push(\"#\"+t.id),t.classes&&e.push(\".\"+t.classes.join(\".\"));for(var r=0;r<t.attributes.length;r++)e.push(\"[\"+t.attributes[r].key+'=\"'+t.attributes[r].value+'\"]');return e.join(\"\")}function i(t){if(!t||!t.tagName)return null;var e,r,n,o,i={};i.tagName=t.tagName.toLowerCase(),t.id&&(i.id=t.id),(e=t.className)&&\"string\"==typeof e&&(i.classes=e.split(/\\s+/));var s=[\"type\",\"name\",\"title\",\"alt\"];for(i.attributes=[],o=0;o<s.length;o++)r=s[o],(n=t.getAttribute(r))&&i.attributes.push({key:r,value:n});return i}t.exports={describeElement:i,descriptionToString:o,elementArrayToString:function(t){for(var e,r,n=\" > \".length,i=[],s=0,a=t.length-1;a>=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a<t.length-1&&r>=83){i.unshift(\"...\");break}i.unshift(e),s+=e.length}return i.join(\" > \")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&\"html\"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o<r.length;o++)if(r[o]===t)return!0;return!1},getElementType:n}},function(t,e,r){\"use strict\";var n=r(33);t.exports=n},function(t,e){t.exports=function(t){var e,r,n,o,i,s,a,u,c,l,p,f,h,d=/[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;function m(t){return t<10?\"0\"+t:t}function g(){return this.valueOf()}function v(t){return d.lastIndex=0,d.test(t)?'\"'+t.replace(d,(function(t){var e=n[t];return\"string\"==typeof e?e:\"\\\\u\"+(\"0000\"+t.charCodeAt(0).toString(16)).slice(-4)}))+'\"':'\"'+t+'\"'}\"function\"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+\"-\"+m(this.getUTCMonth()+1)+\"-\"+m(this.getUTCDate())+\"T\"+m(this.getUTCHours())+\":\"+m(this.getUTCMinutes())+\":\"+m(this.getUTCSeconds())+\"Z\":null},Boolean.prototype.toJSON=g,Number.prototype.toJSON=g,String.prototype.toJSON=g),\"function\"!=typeof t.stringify&&(n={\"\\b\":\"\\\\b\",\"\\t\":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\f\":\"\\\\f\",\"\\r\":\"\\\\r\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\"},t.stringify=function(t,n,i){var s;if(e=\"\",r=\"\",\"number\"==typeof i)for(s=0;s<i;s+=1)r+=\" \";else\"string\"==typeof i&&(r=i);if(o=n,n&&\"function\"!=typeof n&&(\"object\"!=typeof n||\"number\"!=typeof n.length))throw new Error(\"JSON.stringify\");return function t(n,i){var s,a,u,c,l,p=e,f=i[n];switch(f&&\"object\"==typeof f&&\"function\"==typeof f.toJSON&&(f=f.toJSON(n)),\"function\"==typeof o&&(f=o.call(i,n,f)),typeof f){case\"string\":return v(f);case\"number\":return isFinite(f)?String(f):\"null\";case\"boolean\":case\"null\":return String(f);case\"object\":if(!f)return\"null\";if(e+=r,l=[],\"[object Array]\"===Object.prototype.toString.apply(f)){for(c=f.length,s=0;s<c;s+=1)l[s]=t(s,f)||\"null\";return u=0===l.length?\"[]\":e?\"[\\n\"+e+l.join(\",\\n\"+e)+\"\\n\"+p+\"]\":\"[\"+l.join(\",\")+\"]\",e=p,u}if(o&&\"object\"==typeof o)for(c=o.length,s=0;s<c;s+=1)\"string\"==typeof o[s]&&(u=t(a=o[s],f))&&l.push(v(a)+(e?\": \":\":\")+u);else for(a in f)Object.prototype.hasOwnProperty.call(f,a)&&(u=t(a,f))&&l.push(v(a)+(e?\": \":\":\")+u);return u=0===l.length?\"{}\":e?\"{\\n\"+e+l.join(\",\\n\"+e)+\"\\n\"+p+\"}\":\"{\"+l.join(\",\")+\"}\",e=p,u}}(\"\",{\"\":t})}),\"function\"!=typeof t.parse&&(t.parse=(l={\"\\\\\":\"\\\\\",'\"':'\"',\"/\":\"/\",t:\"\\t\",n:\"\\n\",r:\"\\r\",f:\"\\f\",b:\"\\b\"},p={go:function(){i=\"ok\"},firstokey:function(){u=c,i=\"colon\"},okey:function(){u=c,i=\"colon\"},ovalue:function(){i=\"ocomma\"},firstavalue:function(){i=\"acomma\"},avalue:function(){i=\"acomma\"}},f={go:function(){i=\"ok\"},ovalue:function(){i=\"ocomma\"},firstavalue:function(){i=\"acomma\"},avalue:function(){i=\"acomma\"}},h={\"{\":{go:function(){s.push({state:\"ok\"}),a={},i=\"firstokey\"},ovalue:function(){s.push({container:a,state:\"ocomma\",key:u}),a={},i=\"firstokey\"},firstavalue:function(){s.push({container:a,state:\"acomma\"}),a={},i=\"firstokey\"},avalue:function(){s.push({container:a,state:\"acomma\"}),a={},i=\"firstokey\"}},\"}\":{firstokey:function(){var t=s.pop();c=a,a=t.container,u=t.key,i=t.state},ocomma:function(){var t=s.pop();a[u]=c,c=a,a=t.container,u=t.key,i=t.state}},\"[\":{go:function(){s.push({state:\"ok\"}),a=[],i=\"firstavalue\"},ovalue:function(){s.push({container:a,state:\"ocomma\",key:u}),a=[],i=\"firstavalue\"},firstavalue:function(){s.push({container:a,state:\"acomma\"}),a=[],i=\"firstavalue\"},avalue:function(){s.push({container:a,state:\"acomma\"}),a=[],i=\"firstavalue\"}},\"]\":{firstavalue:function(){var t=s.pop();c=a,a=t.container,u=t.key,i=t.state},acomma:function(){var t=s.pop();a.push(c),c=a,a=t.container,u=t.key,i=t.state}},\":\":{colon:function(){if(Object.hasOwnProperty.call(a,u))throw new SyntaxError(\"Duplicate key '\"+u+'\"');i=\"ovalue\"}},\",\":{ocomma:function(){a[u]=c,i=\"okey\"},acomma:function(){a.push(c),i=\"avalue\"}},true:{go:function(){c=!0,i=\"ok\"},ovalue:function(){c=!0,i=\"ocomma\"},firstavalue:function(){c=!0,i=\"acomma\"},avalue:function(){c=!0,i=\"acomma\"}},false:{go:function(){c=!1,i=\"ok\"},ovalue:function(){c=!1,i=\"ocomma\"},firstavalue:function(){c=!1,i=\"acomma\"},avalue:function(){c=!1,i=\"acomma\"}},null:{go:function(){c=null,i=\"ok\"},ovalue:function(){c=null,i=\"ocomma\"},firstavalue:function(){c=null,i=\"acomma\"},avalue:function(){c=null,i=\"acomma\"}}},function(t,e){var r,n,o=/^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;i=\"go\",s=[];try{for(;r=o.exec(t);)r[1]?h[r[1]][i]():r[2]?(c=+r[2],f[i]()):(n=r[3],c=n.replace(/\\\\(?:u(.{4})|([^u]))/g,(function(t,e,r){return e?String.fromCharCode(parseInt(e,16)):l[r]})),p[i]()),t=t.slice(r[0].length)}catch(t){i=t}if(\"ok\"!==i||/[^\\u0020\\t\\n\\r]/.test(t))throw i instanceof SyntaxError?i:new SyntaxError(\"JSON\");return\"function\"==typeof e?function t(r,n){var o,i,s=r[n];if(s&&\"object\"==typeof s)for(o in c)Object.prototype.hasOwnProperty.call(s,o)&&(void 0!==(i=t(s,o))?s[o]=i:delete s[o]);return e.call(r,n,s)}({\"\":c},\"\"):c}))}},function(t,e,r){\"use strict\";function n(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty(\"addEventListener\")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var s=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};s._rollbarOldRemove=i,s.belongsToShim=r,e.removeEventListener=s}}t.exports=function(t,e,r){if(t){var o,i,s=\"EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload\".split(\",\");for(o=0;o<s.length;++o)t[i=s[o]]&&t[i].prototype&&n(e,t[i].prototype,r)}}},function(t,e,r){\"use strict\";var n=r(0),o=r(5);function i(t,e){return[t,n.stringify(t,e)]}function s(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;u<a.length;u++)o=s(o=a[u].frames,r),a[u].frames=o;else i.trace&&(o=s(o=i.trace.frames,r),i.trace.frames=o);return[t,n.stringify(t,e)]}function u(t,e){return e&&e.length>t?e.slice(0,t-3).concat(\"...\"):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case\"string\":return u(t,i);case\"object\":case\"array\":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;i<o.length;i++)o[i]=l(o[i]);else r.trace&&(r.trace=l(r.trace));return[t,n.stringify(t,e)]}function f(t,e){return n.maxByteSize(t)>e}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])}));\n//# sourceMappingURL=rollbar.umd.min.js.map\n\n//# sourceURL=webpack://futureBooks/./node_modules/rollbar/dist/rollbar.umd.min.js?");

/***/ }),

/***/ "./node_modules/safe-json-parse/tuple.js":
/*!***********************************************!*\
  !*** ./node_modules/safe-json-parse/tuple.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n    var json\n    var error = null\n\n    try {\n        json = JSON.parse(obj, reviver)\n    } catch (err) {\n        error = err\n    }\n\n    return [error, json]\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/safe-json-parse/tuple.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/index.js":
/*!*********************************************!*\
  !*** ./node_modules/sanitize-html/index.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const htmlparser = __webpack_require__(/*! htmlparser2 */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/index.js\");\nconst escapeStringRegexp = __webpack_require__(/*! escape-string-regexp */ \"./node_modules/sanitize-html/node_modules/escape-string-regexp/index.js\");\nconst { isPlainObject } = __webpack_require__(/*! is-plain-object */ \"./node_modules/is-plain-object/dist/is-plain-object.mjs\");\nconst deepmerge = __webpack_require__(/*! deepmerge */ \"./node_modules/deepmerge/dist/cjs.js\");\nconst parseSrcset = __webpack_require__(/*! parse-srcset */ \"./node_modules/parse-srcset/src/parse-srcset.js\");\nconst { parse: postcssParse } = __webpack_require__(/*! postcss */ \"./node_modules/postcss/lib/postcss.js\");\n// Tags that can conceivably represent stand-alone media.\nconst mediaTags = [\n  'img', 'audio', 'video', 'picture', 'svg',\n  'object', 'map', 'iframe', 'embed'\n];\n// Tags that are inherently vulnerable to being used in XSS attacks.\nconst vulnerableTags = [ 'script', 'style' ];\n\nfunction each(obj, cb) {\n  if (obj) {\n    Object.keys(obj).forEach(function (key) {\n      cb(obj[key], key);\n    });\n  }\n}\n\n// Avoid false positives with .__proto__, .hasOwnProperty, etc.\nfunction has(obj, key) {\n  return ({}).hasOwnProperty.call(obj, key);\n}\n\n// Returns those elements of `a` for which `cb(a)` returns truthy\nfunction filter(a, cb) {\n  const n = [];\n  each(a, function(v) {\n    if (cb(v)) {\n      n.push(v);\n    }\n  });\n  return n;\n}\n\nfunction isEmptyObject(obj) {\n  for (const key in obj) {\n    if (has(obj, key)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction stringifySrcset(parsedSrcset) {\n  return parsedSrcset.map(function(part) {\n    if (!part.url) {\n      throw new Error('URL missing');\n    }\n\n    return (\n      part.url +\n      (part.w ? ` ${part.w}w` : '') +\n      (part.h ? ` ${part.h}h` : '') +\n      (part.d ? ` ${part.d}x` : '')\n    );\n  }).join(', ');\n}\n\nmodule.exports = sanitizeHtml;\n\n// A valid attribute name.\n// We use a tolerant definition based on the set of strings defined by\n// html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state\n// and html.spec.whatwg.org/multipage/parsing.html#attribute-name-state .\n// The characters accepted are ones which can be appended to the attribute\n// name buffer without triggering a parse error:\n//   * unexpected-equals-sign-before-attribute-name\n//   * unexpected-null-character\n//   * unexpected-character-in-attribute-name\n// We exclude the empty string because it's impossible to get to the after\n// attribute name state with an empty attribute name buffer.\nconst VALID_HTML_ATTRIBUTE_NAME = /^[^\\0\\t\\n\\f\\r /<=>]+$/;\n\n// Ignore the _recursing flag; it's there for recursive\n// invocation as a guard against this exploit:\n// https://github.com/fb55/htmlparser2/issues/105\n\nfunction sanitizeHtml(html, options, _recursing) {\n  if (html == null) {\n    return '';\n  }\n\n  let result = '';\n  // Used for hot swapping the result variable with an empty string in order to \"capture\" the text written to it.\n  let tempResult = '';\n\n  function Frame(tag, attribs) {\n    const that = this;\n    this.tag = tag;\n    this.attribs = attribs || {};\n    this.tagPosition = result.length;\n    this.text = ''; // Node inner text\n    this.mediaChildren = [];\n\n    this.updateParentNodeText = function() {\n      if (stack.length) {\n        const parentFrame = stack[stack.length - 1];\n        parentFrame.text += that.text;\n      }\n    };\n\n    this.updateParentNodeMediaChildren = function() {\n      if (stack.length && mediaTags.includes(this.tag)) {\n        const parentFrame = stack[stack.length - 1];\n        parentFrame.mediaChildren.push(this.tag);\n      }\n    };\n  }\n\n  options = Object.assign({}, sanitizeHtml.defaults, options);\n  options.parser = Object.assign({}, htmlParserDefaults, options.parser);\n\n  // vulnerableTags\n  vulnerableTags.forEach(function (tag) {\n    if (\n      options.allowedTags && options.allowedTags.indexOf(tag) > -1 &&\n      !options.allowVulnerableTags\n    ) {\n      console.warn(`\\n\\n⚠️ Your \\`allowedTags\\` option includes, \\`${tag}\\`, which is inherently\\nvulnerable to XSS attacks. Please remove it from \\`allowedTags\\`.\\nOr, to disable this warning, add the \\`allowVulnerableTags\\` option\\nand ensure you are accounting for this risk.\\n\\n`);\n    }\n  });\n\n  // Tags that contain something other than HTML, or where discarding\n  // the text when the tag is disallowed makes sense for other reasons.\n  // If we are not allowing these tags, we should drop their content too.\n  // For other tags you would drop the tag but keep its content.\n  const nonTextTagsArray = options.nonTextTags || [\n    'script',\n    'style',\n    'textarea',\n    'option'\n  ];\n  let allowedAttributesMap;\n  let allowedAttributesGlobMap;\n  if (options.allowedAttributes) {\n    allowedAttributesMap = {};\n    allowedAttributesGlobMap = {};\n    each(options.allowedAttributes, function(attributes, tag) {\n      allowedAttributesMap[tag] = [];\n      const globRegex = [];\n      attributes.forEach(function(obj) {\n        if (typeof obj === 'string' && obj.indexOf('*') >= 0) {\n          globRegex.push(escapeStringRegexp(obj).replace(/\\\\\\*/g, '.*'));\n        } else {\n          allowedAttributesMap[tag].push(obj);\n        }\n      });\n      if (globRegex.length) {\n        allowedAttributesGlobMap[tag] = new RegExp('^(' + globRegex.join('|') + ')$');\n      }\n    });\n  }\n  const allowedClassesMap = {};\n  const allowedClassesGlobMap = {};\n  const allowedClassesRegexMap = {};\n  each(options.allowedClasses, function(classes, tag) {\n    // Implicitly allows the class attribute\n    if (allowedAttributesMap) {\n      if (!has(allowedAttributesMap, tag)) {\n        allowedAttributesMap[tag] = [];\n      }\n      allowedAttributesMap[tag].push('class');\n    }\n\n    allowedClassesMap[tag] = [];\n    allowedClassesRegexMap[tag] = [];\n    const globRegex = [];\n    classes.forEach(function(obj) {\n      if (typeof obj === 'string' && obj.indexOf('*') >= 0) {\n        globRegex.push(escapeStringRegexp(obj).replace(/\\\\\\*/g, '.*'));\n      } else if (obj instanceof RegExp) {\n        allowedClassesRegexMap[tag].push(obj);\n      } else {\n        allowedClassesMap[tag].push(obj);\n      }\n    });\n    if (globRegex.length) {\n      allowedClassesGlobMap[tag] = new RegExp('^(' + globRegex.join('|') + ')$');\n    }\n  });\n\n  const transformTagsMap = {};\n  let transformTagsAll;\n  each(options.transformTags, function(transform, tag) {\n    let transFun;\n    if (typeof transform === 'function') {\n      transFun = transform;\n    } else if (typeof transform === 'string') {\n      transFun = sanitizeHtml.simpleTransform(transform);\n    }\n    if (tag === '*') {\n      transformTagsAll = transFun;\n    } else {\n      transformTagsMap[tag] = transFun;\n    }\n  });\n\n  let depth;\n  let stack;\n  let skipMap;\n  let transformMap;\n  let skipText;\n  let skipTextDepth;\n  let addedText = false;\n\n  initializeState();\n\n  const parser = new htmlparser.Parser({\n    onopentag: function(name, attribs) {\n      // If `enforceHtmlBoundary` is `true` and this has found the opening\n      // `html` tag, reset the state.\n      if (options.enforceHtmlBoundary && name === 'html') {\n        initializeState();\n      }\n\n      if (skipText) {\n        skipTextDepth++;\n        return;\n      }\n      const frame = new Frame(name, attribs);\n      stack.push(frame);\n\n      let skip = false;\n      const hasText = !!frame.text;\n      let transformedTag;\n      if (has(transformTagsMap, name)) {\n        transformedTag = transformTagsMap[name](name, attribs);\n\n        frame.attribs = attribs = transformedTag.attribs;\n\n        if (transformedTag.text !== undefined) {\n          frame.innerText = transformedTag.text;\n        }\n\n        if (name !== transformedTag.tagName) {\n          frame.name = name = transformedTag.tagName;\n          transformMap[depth] = transformedTag.tagName;\n        }\n      }\n      if (transformTagsAll) {\n        transformedTag = transformTagsAll(name, attribs);\n\n        frame.attribs = attribs = transformedTag.attribs;\n        if (name !== transformedTag.tagName) {\n          frame.name = name = transformedTag.tagName;\n          transformMap[depth] = transformedTag.tagName;\n        }\n      }\n\n      if ((options.allowedTags && options.allowedTags.indexOf(name) === -1) || (options.disallowedTagsMode === 'recursiveEscape' && !isEmptyObject(skipMap)) || (options.nestingLimit != null && depth >= options.nestingLimit)) {\n        skip = true;\n        skipMap[depth] = true;\n        if (options.disallowedTagsMode === 'discard') {\n          if (nonTextTagsArray.indexOf(name) !== -1) {\n            skipText = true;\n            skipTextDepth = 1;\n          }\n        }\n        skipMap[depth] = true;\n      }\n      depth++;\n      if (skip) {\n        if (options.disallowedTagsMode === 'discard') {\n          // We want the contents but not this tag\n          return;\n        }\n        tempResult = result;\n        result = '';\n      }\n      result += '<' + name;\n\n      if (name === 'script') {\n        if (options.allowedScriptHostnames || options.allowedScriptDomains) {\n          frame.innerText = '';\n        }\n      }\n\n      if (!allowedAttributesMap || has(allowedAttributesMap, name) || allowedAttributesMap['*']) {\n        each(attribs, function(value, a) {\n          if (!VALID_HTML_ATTRIBUTE_NAME.test(a)) {\n            // This prevents part of an attribute name in the output from being\n            // interpreted as the end of an attribute, or end of a tag.\n            delete frame.attribs[a];\n            return;\n          }\n          let parsed;\n          // check allowedAttributesMap for the element and attribute and modify the value\n          // as necessary if there are specific values defined.\n          let passedAllowedAttributesMapCheck = false;\n          if (!allowedAttributesMap ||\n            (has(allowedAttributesMap, name) && allowedAttributesMap[name].indexOf(a) !== -1) ||\n            (allowedAttributesMap['*'] && allowedAttributesMap['*'].indexOf(a) !== -1) ||\n            (has(allowedAttributesGlobMap, name) && allowedAttributesGlobMap[name].test(a)) ||\n            (allowedAttributesGlobMap['*'] && allowedAttributesGlobMap['*'].test(a))) {\n            passedAllowedAttributesMapCheck = true;\n          } else if (allowedAttributesMap && allowedAttributesMap[name]) {\n            for (const o of allowedAttributesMap[name]) {\n              if (isPlainObject(o) && o.name && (o.name === a)) {\n                passedAllowedAttributesMapCheck = true;\n                let newValue = '';\n                if (o.multiple === true) {\n                  // verify the values that are allowed\n                  const splitStrArray = value.split(' ');\n                  for (const s of splitStrArray) {\n                    if (o.values.indexOf(s) !== -1) {\n                      if (newValue === '') {\n                        newValue = s;\n                      } else {\n                        newValue += ' ' + s;\n                      }\n                    }\n                  }\n                } else if (o.values.indexOf(value) >= 0) {\n                  // verified an allowed value matches the entire attribute value\n                  newValue = value;\n                }\n                value = newValue;\n              }\n            }\n          }\n          if (passedAllowedAttributesMapCheck) {\n            if (options.allowedSchemesAppliedToAttributes.indexOf(a) !== -1) {\n              if (naughtyHref(name, value)) {\n                delete frame.attribs[a];\n                return;\n              }\n            }\n\n            if (name === 'script' && a === 'src') {\n\n              let allowed = true;\n\n              try {\n                const parsed = new URL(value);\n\n                if (options.allowedScriptHostnames || options.allowedScriptDomains) {\n                  const allowedHostname = (options.allowedScriptHostnames || []).find(function (hostname) {\n                    return hostname === parsed.hostname;\n                  });\n                  const allowedDomain = (options.allowedScriptDomains || []).find(function(domain) {\n                    return parsed.hostname === domain || parsed.hostname.endsWith(`.${domain}`);\n                  });\n                  allowed = allowedHostname || allowedDomain;\n                }\n              } catch (e) {\n                allowed = false;\n              }\n\n              if (!allowed) {\n                delete frame.attribs[a];\n                return;\n              }\n            }\n\n            if (name === 'iframe' && a === 'src') {\n              let allowed = true;\n              try {\n                // Chrome accepts \\ as a substitute for / in the // at the\n                // start of a URL, so rewrite accordingly to prevent exploit.\n                // Also drop any whitespace at that point in the URL\n                value = value.replace(/^(\\w+:)?\\s*[\\\\/]\\s*[\\\\/]/, '$1//');\n                if (value.startsWith('relative:')) {\n                  // An attempt to exploit our workaround for base URLs being\n                  // mandatory for relative URL validation in the WHATWG\n                  // URL parser, reject it\n                  throw new Error('relative: exploit attempt');\n                }\n                // naughtyHref is in charge of whether protocol relative URLs\n                // are cool. Here we are concerned just with allowed hostnames and\n                // whether to allow relative URLs.\n                //\n                // Build a placeholder \"base URL\" against which any reasonable\n                // relative URL may be parsed successfully\n                let base = 'relative://relative-site';\n                for (let i = 0; (i < 100); i++) {\n                  base += `/${i}`;\n                }\n                const parsed = new URL(value, base);\n                const isRelativeUrl = parsed && parsed.hostname === 'relative-site' && parsed.protocol === 'relative:';\n                if (isRelativeUrl) {\n                  // default value of allowIframeRelativeUrls is true\n                  // unless allowedIframeHostnames or allowedIframeDomains specified\n                  allowed = has(options, 'allowIframeRelativeUrls')\n                    ? options.allowIframeRelativeUrls\n                    : (!options.allowedIframeHostnames && !options.allowedIframeDomains);\n                } else if (options.allowedIframeHostnames || options.allowedIframeDomains) {\n                  const allowedHostname = (options.allowedIframeHostnames || []).find(function (hostname) {\n                    return hostname === parsed.hostname;\n                  });\n                  const allowedDomain = (options.allowedIframeDomains || []).find(function(domain) {\n                    return parsed.hostname === domain || parsed.hostname.endsWith(`.${domain}`);\n                  });\n                  allowed = allowedHostname || allowedDomain;\n                }\n              } catch (e) {\n                // Unparseable iframe src\n                allowed = false;\n              }\n              if (!allowed) {\n                delete frame.attribs[a];\n                return;\n              }\n            }\n            if (a === 'srcset') {\n              try {\n                parsed = parseSrcset(value);\n                parsed.forEach(function(value) {\n                  if (naughtyHref('srcset', value.url)) {\n                    value.evil = true;\n                  }\n                });\n                parsed = filter(parsed, function(v) {\n                  return !v.evil;\n                });\n                if (!parsed.length) {\n                  delete frame.attribs[a];\n                  return;\n                } else {\n                  value = stringifySrcset(filter(parsed, function(v) {\n                    return !v.evil;\n                  }));\n                  frame.attribs[a] = value;\n                }\n              } catch (e) {\n                // Unparseable srcset\n                delete frame.attribs[a];\n                return;\n              }\n            }\n            if (a === 'class') {\n              const allowedSpecificClasses = allowedClassesMap[name];\n              const allowedWildcardClasses = allowedClassesMap['*'];\n              const allowedSpecificClassesGlob = allowedClassesGlobMap[name];\n              const allowedSpecificClassesRegex = allowedClassesRegexMap[name];\n              const allowedWildcardClassesGlob = allowedClassesGlobMap['*'];\n              const allowedClassesGlobs = [\n                allowedSpecificClassesGlob,\n                allowedWildcardClassesGlob\n              ]\n                .concat(allowedSpecificClassesRegex)\n                .filter(function (t) {\n                  return t;\n                });\n              if (allowedSpecificClasses && allowedWildcardClasses) {\n                value = filterClasses(value, deepmerge(allowedSpecificClasses, allowedWildcardClasses), allowedClassesGlobs);\n              } else {\n                value = filterClasses(value, allowedSpecificClasses || allowedWildcardClasses, allowedClassesGlobs);\n              }\n              if (!value.length) {\n                delete frame.attribs[a];\n                return;\n              }\n            }\n            if (a === 'style') {\n              try {\n                const abstractSyntaxTree = postcssParse(name + ' {' + value + '}');\n                const filteredAST = filterCss(abstractSyntaxTree, options.allowedStyles);\n\n                value = stringifyStyleAttributes(filteredAST);\n\n                if (value.length === 0) {\n                  delete frame.attribs[a];\n                  return;\n                }\n              } catch (e) {\n                delete frame.attribs[a];\n                return;\n              }\n            }\n            result += ' ' + a;\n            if (value && value.length) {\n              result += '=\"' + escapeHtml(value, true) + '\"';\n            }\n          } else {\n            delete frame.attribs[a];\n          }\n        });\n      }\n      if (options.selfClosing.indexOf(name) !== -1) {\n        result += ' />';\n      } else {\n        result += '>';\n        if (frame.innerText && !hasText && !options.textFilter) {\n          result += escapeHtml(frame.innerText);\n          addedText = true;\n        }\n      }\n      if (skip) {\n        result = tempResult + escapeHtml(result);\n        tempResult = '';\n      }\n    },\n    ontext: function(text) {\n      if (skipText) {\n        return;\n      }\n      const lastFrame = stack[stack.length - 1];\n      let tag;\n\n      if (lastFrame) {\n        tag = lastFrame.tag;\n        // If inner text was set by transform function then let's use it\n        text = lastFrame.innerText !== undefined ? lastFrame.innerText : text;\n      }\n\n      if (options.disallowedTagsMode === 'discard' && ((tag === 'script') || (tag === 'style'))) {\n        // htmlparser2 gives us these as-is. Escaping them ruins the content. Allowing\n        // script tags is, by definition, game over for XSS protection, so if that's\n        // your concern, don't allow them. The same is essentially true for style tags\n        // which have their own collection of XSS vectors.\n        result += text;\n      } else {\n        const escaped = escapeHtml(text, false);\n        if (options.textFilter && !addedText) {\n          result += options.textFilter(escaped, tag);\n        } else if (!addedText) {\n          result += escaped;\n        }\n      }\n      if (stack.length) {\n        const frame = stack[stack.length - 1];\n        frame.text += text;\n      }\n    },\n    onclosetag: function(name) {\n\n      if (skipText) {\n        skipTextDepth--;\n        if (!skipTextDepth) {\n          skipText = false;\n        } else {\n          return;\n        }\n      }\n\n      const frame = stack.pop();\n      if (!frame) {\n        // Do not crash on bad markup\n        return;\n      }\n      skipText = options.enforceHtmlBoundary ? name === 'html' : false;\n      depth--;\n      const skip = skipMap[depth];\n      if (skip) {\n        delete skipMap[depth];\n        if (options.disallowedTagsMode === 'discard') {\n          frame.updateParentNodeText();\n          return;\n        }\n        tempResult = result;\n        result = '';\n      }\n\n      if (transformMap[depth]) {\n        name = transformMap[depth];\n        delete transformMap[depth];\n      }\n\n      if (options.exclusiveFilter && options.exclusiveFilter(frame)) {\n        result = result.substr(0, frame.tagPosition);\n        return;\n      }\n\n      frame.updateParentNodeMediaChildren();\n      frame.updateParentNodeText();\n\n      if (options.selfClosing.indexOf(name) !== -1) {\n        // Already output />\n        if (skip) {\n          result = tempResult;\n          tempResult = '';\n        }\n        return;\n      }\n\n      result += '</' + name + '>';\n      if (skip) {\n        result = tempResult + escapeHtml(result);\n        tempResult = '';\n      }\n      addedText = false;\n    }\n  }, options.parser);\n  parser.write(html);\n  parser.end();\n\n  return result;\n\n  function initializeState() {\n    result = '';\n    depth = 0;\n    stack = [];\n    skipMap = {};\n    transformMap = {};\n    skipText = false;\n    skipTextDepth = 0;\n  }\n\n  function escapeHtml(s, quote) {\n    if (typeof (s) !== 'string') {\n      s = s + '';\n    }\n    if (options.parser.decodeEntities) {\n      s = s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n      if (quote) {\n        s = s.replace(/\"/g, '&quot;');\n      }\n    }\n    // TODO: this is inadequate because it will pass `&0;`. This approach\n    // will not work, each & must be considered with regard to whether it\n    // is followed by a 100% syntactically valid entity or not, and escaped\n    // if it is not. If this bothers you, don't set parser.decodeEntities\n    // to false. (The default is true.)\n    s = s.replace(/&(?![a-zA-Z0-9#]{1,20};)/g, '&amp;') // Match ampersands not part of existing HTML entity\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n    if (quote) {\n      s = s.replace(/\"/g, '&quot;');\n    }\n    return s;\n  }\n\n  function naughtyHref(name, href) {\n    // Browsers ignore character codes of 32 (space) and below in a surprising\n    // number of situations. Start reading here:\n    // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Embedded_tab\n    // eslint-disable-next-line no-control-regex\n    href = href.replace(/[\\x00-\\x20]+/g, '');\n    // Clobber any comments in URLs, which the browser might\n    // interpret inside an XML data island, allowing\n    // a javascript: URL to be snuck through\n    href = href.replace(/<!--.*?-->/g, '');\n    // Case insensitive so we don't get faked out by JAVASCRIPT #1\n    // Allow more characters after the first so we don't get faked\n    // out by certain schemes browsers accept\n    const matches = href.match(/^([a-zA-Z][a-zA-Z0-9.\\-+]*):/);\n    if (!matches) {\n      // Protocol-relative URL starting with any combination of '/' and '\\'\n      if (href.match(/^[/\\\\]{2}/)) {\n        return !options.allowProtocolRelative;\n      }\n\n      // No scheme\n      return false;\n    }\n    const scheme = matches[1].toLowerCase();\n\n    if (has(options.allowedSchemesByTag, name)) {\n      return options.allowedSchemesByTag[name].indexOf(scheme) === -1;\n    }\n\n    return !options.allowedSchemes || options.allowedSchemes.indexOf(scheme) === -1;\n  }\n\n  /**\n   * Filters user input css properties by allowlisted regex attributes.\n   * Modifies the abstractSyntaxTree object.\n   *\n   * @param {object} abstractSyntaxTree  - Object representation of CSS attributes.\n   * @property {array[Declaration]} abstractSyntaxTree.nodes[0] - Each object cointains prop and value key, i.e { prop: 'color', value: 'red' }.\n   * @param {object} allowedStyles       - Keys are properties (i.e color), value is list of permitted regex rules (i.e /green/i).\n   * @return {object}                    - The modified tree.\n   */\n  function filterCss(abstractSyntaxTree, allowedStyles) {\n    if (!allowedStyles) {\n      return abstractSyntaxTree;\n    }\n\n    const astRules = abstractSyntaxTree.nodes[0];\n    let selectedRule;\n\n    // Merge global and tag-specific styles into new AST.\n    if (allowedStyles[astRules.selector] && allowedStyles['*']) {\n      selectedRule = deepmerge(\n        allowedStyles[astRules.selector],\n        allowedStyles['*']\n      );\n    } else {\n      selectedRule = allowedStyles[astRules.selector] || allowedStyles['*'];\n    }\n\n    if (selectedRule) {\n      abstractSyntaxTree.nodes[0].nodes = astRules.nodes.reduce(filterDeclarations(selectedRule), []);\n    }\n\n    return abstractSyntaxTree;\n  }\n\n  /**\n   * Extracts the style attributes from an AbstractSyntaxTree and formats those\n   * values in the inline style attribute format.\n   *\n   * @param  {AbstractSyntaxTree} filteredAST\n   * @return {string}             - Example: \"color:yellow;text-align:center !important;font-family:helvetica;\"\n   */\n  function stringifyStyleAttributes(filteredAST) {\n    return filteredAST.nodes[0].nodes\n      .reduce(function(extractedAttributes, attrObject) {\n        extractedAttributes.push(\n          `${attrObject.prop}:${attrObject.value}${attrObject.important ? ' !important' : ''}`\n        );\n        return extractedAttributes;\n      }, [])\n      .join(';');\n  }\n\n  /**\n    * Filters the existing attributes for the given property. Discards any attributes\n    * which don't match the allowlist.\n    *\n    * @param  {object} selectedRule             - Example: { color: red, font-family: helvetica }\n    * @param  {array} allowedDeclarationsList   - List of declarations which pass the allowlist.\n    * @param  {object} attributeObject          - Object representing the current css property.\n    * @property {string} attributeObject.type   - Typically 'declaration'.\n    * @property {string} attributeObject.prop   - The CSS property, i.e 'color'.\n    * @property {string} attributeObject.value  - The corresponding value to the css property, i.e 'red'.\n    * @return {function}                        - When used in Array.reduce, will return an array of Declaration objects\n    */\n  function filterDeclarations(selectedRule) {\n    return function (allowedDeclarationsList, attributeObject) {\n      // If this property is allowlisted...\n      if (has(selectedRule, attributeObject.prop)) {\n        const matchesRegex = selectedRule[attributeObject.prop].some(function(regularExpression) {\n          return regularExpression.test(attributeObject.value);\n        });\n\n        if (matchesRegex) {\n          allowedDeclarationsList.push(attributeObject);\n        }\n      }\n      return allowedDeclarationsList;\n    };\n  }\n\n  function filterClasses(classes, allowed, allowedGlobs) {\n    if (!allowed) {\n      // The class attribute is allowed without filtering on this tag\n      return classes;\n    }\n    classes = classes.split(/\\s+/);\n    return classes.filter(function(clss) {\n      return allowed.indexOf(clss) !== -1 || allowedGlobs.some(function(glob) {\n        return glob.test(clss);\n      });\n    }).join(' ');\n  }\n}\n\n// Defaults are accessible to you so that you can use them as a starting point\n// programmatically if you wish\n\nconst htmlParserDefaults = {\n  decodeEntities: true\n};\nsanitizeHtml.defaults = {\n  allowedTags: [\n    // Sections derived from MDN element categories and limited to the more\n    // benign categories.\n    // https://developer.mozilla.org/en-US/docs/Web/HTML/Element\n    // Content sectioning\n    'address', 'article', 'aside', 'footer', 'header',\n    'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup',\n    'main', 'nav', 'section',\n    // Text content\n    'blockquote', 'dd', 'div', 'dl', 'dt', 'figcaption', 'figure',\n    'hr', 'li', 'main', 'ol', 'p', 'pre', 'ul',\n    // Inline text semantics\n    'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'dfn',\n    'em', 'i', 'kbd', 'mark', 'q',\n    'rb', 'rp', 'rt', 'rtc', 'ruby',\n    's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr',\n    // Table content\n    'caption', 'col', 'colgroup', 'table', 'tbody', 'td', 'tfoot', 'th',\n    'thead', 'tr'\n  ],\n  disallowedTagsMode: 'discard',\n  allowedAttributes: {\n    a: [ 'href', 'name', 'target' ],\n    // We don't currently allow img itself by default, but\n    // these attributes would make sense if we did.\n    img: [ 'src', 'srcset', 'alt', 'title', 'width', 'height', 'loading' ]\n  },\n  // Lots of these won't come up by default because we don't allow them\n  selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],\n  // URL schemes we permit\n  allowedSchemes: [ 'http', 'https', 'ftp', 'mailto', 'tel' ],\n  allowedSchemesByTag: {},\n  allowedSchemesAppliedToAttributes: [ 'href', 'src', 'cite' ],\n  allowProtocolRelative: true,\n  enforceHtmlBoundary: false\n};\n\nsanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge) {\n  merge = (merge === undefined) ? true : merge;\n  newAttribs = newAttribs || {};\n\n  return function(tagName, attribs) {\n    let attrib;\n    if (merge) {\n      for (attrib in newAttribs) {\n        attribs[attrib] = newAttribs[attrib];\n      }\n    } else {\n      attribs = newAttribs;\n    }\n\n    return {\n      tagName: newTagName,\n      attribs: attribs\n    };\n  };\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/dom-serializer/lib/foreignNames.js":
/*!************************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/dom-serializer/lib/foreignNames.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeNames = exports.elementNames = void 0;\nexports.elementNames = new Map([\n    [\"altglyph\", \"altGlyph\"],\n    [\"altglyphdef\", \"altGlyphDef\"],\n    [\"altglyphitem\", \"altGlyphItem\"],\n    [\"animatecolor\", \"animateColor\"],\n    [\"animatemotion\", \"animateMotion\"],\n    [\"animatetransform\", \"animateTransform\"],\n    [\"clippath\", \"clipPath\"],\n    [\"feblend\", \"feBlend\"],\n    [\"fecolormatrix\", \"feColorMatrix\"],\n    [\"fecomponenttransfer\", \"feComponentTransfer\"],\n    [\"fecomposite\", \"feComposite\"],\n    [\"feconvolvematrix\", \"feConvolveMatrix\"],\n    [\"fediffuselighting\", \"feDiffuseLighting\"],\n    [\"fedisplacementmap\", \"feDisplacementMap\"],\n    [\"fedistantlight\", \"feDistantLight\"],\n    [\"fedropshadow\", \"feDropShadow\"],\n    [\"feflood\", \"feFlood\"],\n    [\"fefunca\", \"feFuncA\"],\n    [\"fefuncb\", \"feFuncB\"],\n    [\"fefuncg\", \"feFuncG\"],\n    [\"fefuncr\", \"feFuncR\"],\n    [\"fegaussianblur\", \"feGaussianBlur\"],\n    [\"feimage\", \"feImage\"],\n    [\"femerge\", \"feMerge\"],\n    [\"femergenode\", \"feMergeNode\"],\n    [\"femorphology\", \"feMorphology\"],\n    [\"feoffset\", \"feOffset\"],\n    [\"fepointlight\", \"fePointLight\"],\n    [\"fespecularlighting\", \"feSpecularLighting\"],\n    [\"fespotlight\", \"feSpotLight\"],\n    [\"fetile\", \"feTile\"],\n    [\"feturbulence\", \"feTurbulence\"],\n    [\"foreignobject\", \"foreignObject\"],\n    [\"glyphref\", \"glyphRef\"],\n    [\"lineargradient\", \"linearGradient\"],\n    [\"radialgradient\", \"radialGradient\"],\n    [\"textpath\", \"textPath\"],\n]);\nexports.attributeNames = new Map([\n    [\"definitionurl\", \"definitionURL\"],\n    [\"attributename\", \"attributeName\"],\n    [\"attributetype\", \"attributeType\"],\n    [\"basefrequency\", \"baseFrequency\"],\n    [\"baseprofile\", \"baseProfile\"],\n    [\"calcmode\", \"calcMode\"],\n    [\"clippathunits\", \"clipPathUnits\"],\n    [\"diffuseconstant\", \"diffuseConstant\"],\n    [\"edgemode\", \"edgeMode\"],\n    [\"filterunits\", \"filterUnits\"],\n    [\"glyphref\", \"glyphRef\"],\n    [\"gradienttransform\", \"gradientTransform\"],\n    [\"gradientunits\", \"gradientUnits\"],\n    [\"kernelmatrix\", \"kernelMatrix\"],\n    [\"kernelunitlength\", \"kernelUnitLength\"],\n    [\"keypoints\", \"keyPoints\"],\n    [\"keysplines\", \"keySplines\"],\n    [\"keytimes\", \"keyTimes\"],\n    [\"lengthadjust\", \"lengthAdjust\"],\n    [\"limitingconeangle\", \"limitingConeAngle\"],\n    [\"markerheight\", \"markerHeight\"],\n    [\"markerunits\", \"markerUnits\"],\n    [\"markerwidth\", \"markerWidth\"],\n    [\"maskcontentunits\", \"maskContentUnits\"],\n    [\"maskunits\", \"maskUnits\"],\n    [\"numoctaves\", \"numOctaves\"],\n    [\"pathlength\", \"pathLength\"],\n    [\"patterncontentunits\", \"patternContentUnits\"],\n    [\"patterntransform\", \"patternTransform\"],\n    [\"patternunits\", \"patternUnits\"],\n    [\"pointsatx\", \"pointsAtX\"],\n    [\"pointsaty\", \"pointsAtY\"],\n    [\"pointsatz\", \"pointsAtZ\"],\n    [\"preservealpha\", \"preserveAlpha\"],\n    [\"preserveaspectratio\", \"preserveAspectRatio\"],\n    [\"primitiveunits\", \"primitiveUnits\"],\n    [\"refx\", \"refX\"],\n    [\"refy\", \"refY\"],\n    [\"repeatcount\", \"repeatCount\"],\n    [\"repeatdur\", \"repeatDur\"],\n    [\"requiredextensions\", \"requiredExtensions\"],\n    [\"requiredfeatures\", \"requiredFeatures\"],\n    [\"specularconstant\", \"specularConstant\"],\n    [\"specularexponent\", \"specularExponent\"],\n    [\"spreadmethod\", \"spreadMethod\"],\n    [\"startoffset\", \"startOffset\"],\n    [\"stddeviation\", \"stdDeviation\"],\n    [\"stitchtiles\", \"stitchTiles\"],\n    [\"surfacescale\", \"surfaceScale\"],\n    [\"systemlanguage\", \"systemLanguage\"],\n    [\"tablevalues\", \"tableValues\"],\n    [\"targetx\", \"targetX\"],\n    [\"targety\", \"targetY\"],\n    [\"textlength\", \"textLength\"],\n    [\"viewbox\", \"viewBox\"],\n    [\"viewtarget\", \"viewTarget\"],\n    [\"xchannelselector\", \"xChannelSelector\"],\n    [\"ychannelselector\", \"yChannelSelector\"],\n    [\"zoomandpan\", \"zoomAndPan\"],\n]);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/dom-serializer/lib/foreignNames.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/dom-serializer/lib/index.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/dom-serializer/lib/index.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Module dependencies\n */\nvar ElementType = __importStar(__webpack_require__(/*! domelementtype */ \"./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js\"));\nvar entities_1 = __webpack_require__(/*! entities */ \"./node_modules/sanitize-html/node_modules/entities/lib/index.js\");\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nvar foreignNames_1 = __webpack_require__(/*! ./foreignNames */ \"./node_modules/sanitize-html/node_modules/dom-serializer/lib/foreignNames.js\");\nvar unencodedElements = new Set([\n    \"style\",\n    \"script\",\n    \"xmp\",\n    \"iframe\",\n    \"noembed\",\n    \"noframes\",\n    \"plaintext\",\n    \"noscript\",\n]);\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n    if (!attributes)\n        return;\n    return Object.keys(attributes)\n        .map(function (key) {\n        var _a, _b;\n        var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n        if (opts.xmlMode === \"foreign\") {\n            /* Fix up mixed-case attribute names */\n            key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n        }\n        if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n            return key;\n        }\n        return key + \"=\\\"\" + (opts.decodeEntities !== false\n            ? entities_1.encodeXML(value)\n            : value.replace(/\"/g, \"&quot;\")) + \"\\\"\";\n    })\n        .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nvar singleTag = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nfunction render(node, options) {\n    if (options === void 0) { options = {}; }\n    var nodes = \"length\" in node ? node : [node];\n    var output = \"\";\n    for (var i = 0; i < nodes.length; i++) {\n        output += renderNode(nodes[i], options);\n    }\n    return output;\n}\nexports.default = render;\nfunction renderNode(node, options) {\n    switch (node.type) {\n        case ElementType.Root:\n            return render(node.children, options);\n        case ElementType.Directive:\n        case ElementType.Doctype:\n            return renderDirective(node);\n        case ElementType.Comment:\n            return renderComment(node);\n        case ElementType.CDATA:\n            return renderCdata(node);\n        case ElementType.Script:\n        case ElementType.Style:\n        case ElementType.Tag:\n            return renderTag(node, options);\n        case ElementType.Text:\n            return renderText(node, options);\n    }\n}\nvar foreignModeIntegrationPoints = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignObject\",\n    \"desc\",\n    \"title\",\n]);\nvar foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n    var _a;\n    // Handle SVG / MathML in HTML\n    if (opts.xmlMode === \"foreign\") {\n        /* Fix up mixed-case element names */\n        elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n        /* Exit foreign mode at integration points */\n        if (elem.parent &&\n            foreignModeIntegrationPoints.has(elem.parent.name)) {\n            opts = __assign(__assign({}, opts), { xmlMode: false });\n        }\n    }\n    if (!opts.xmlMode && foreignElements.has(elem.name)) {\n        opts = __assign(__assign({}, opts), { xmlMode: \"foreign\" });\n    }\n    var tag = \"<\" + elem.name;\n    var attribs = formatAttributes(elem.attribs, opts);\n    if (attribs) {\n        tag += \" \" + attribs;\n    }\n    if (elem.children.length === 0 &&\n        (opts.xmlMode\n            ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n                opts.selfClosingTags !== false\n            : // User explicitly asked for self-closing tags, even in HTML mode\n                opts.selfClosingTags && singleTag.has(elem.name))) {\n        if (!opts.xmlMode)\n            tag += \" \";\n        tag += \"/>\";\n    }\n    else {\n        tag += \">\";\n        if (elem.children.length > 0) {\n            tag += render(elem.children, opts);\n        }\n        if (opts.xmlMode || !singleTag.has(elem.name)) {\n            tag += \"</\" + elem.name + \">\";\n        }\n    }\n    return tag;\n}\nfunction renderDirective(elem) {\n    return \"<\" + elem.data + \">\";\n}\nfunction renderText(elem, opts) {\n    var data = elem.data || \"\";\n    // If entities weren't decoded, no need to encode them back\n    if (opts.decodeEntities !== false &&\n        !(!opts.xmlMode &&\n            elem.parent &&\n            unencodedElements.has(elem.parent.name))) {\n        data = entities_1.encodeXML(data);\n    }\n    return data;\n}\nfunction renderCdata(elem) {\n    return \"<![CDATA[\" + elem.children[0].data + \"]]>\";\n}\nfunction renderComment(elem) {\n    return \"<!--\" + elem.data + \"-->\";\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/dom-serializer/lib/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js ***!
  \*********************************************************************************/
/*! exports provided: ElementType, isTag, Root, Text, Directive, Comment, Script, Style, Tag, CDATA, Doctype */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/sanitize-html/node_modules/dom-serializer/lib/index.js (referenced with cjs require), ./node_modules/sanitize-html/node_modules/domhandler/lib/index.js (referenced with cjs require), ./node_modules/sanitize-html/node_modules/domhandler/lib/node.js (referenced with cjs require), ./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js (referenced with cjs require), ./node_modules/sanitize-html/node_modules/htmlparser2/lib/index.js (referenced with cjs require) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ElementType\", function() { return ElementType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isTag\", function() { return isTag; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Root\", function() { return Root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Text\", function() { return Text; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Directive\", function() { return Directive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Comment\", function() { return Comment; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Script\", function() { return Script; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Style\", function() { return Style; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Tag\", function() { return Tag; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CDATA\", function() { return CDATA; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Doctype\", function() { return Doctype; });\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n    /** Type for the root element of a document */\n    ElementType[\"Root\"] = \"root\";\n    /** Type for Text */\n    ElementType[\"Text\"] = \"text\";\n    /** Type for <? ... ?> */\n    ElementType[\"Directive\"] = \"directive\";\n    /** Type for <!-- ... --> */\n    ElementType[\"Comment\"] = \"comment\";\n    /** Type for <script> tags */\n    ElementType[\"Script\"] = \"script\";\n    /** Type for <style> tags */\n    ElementType[\"Style\"] = \"style\";\n    /** Type for Any tag */\n    ElementType[\"Tag\"] = \"tag\";\n    /** Type for <![CDATA[ ... ]]> */\n    ElementType[\"CDATA\"] = \"cdata\";\n    /** Type for <!doctype ...> */\n    ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n *\n * @param elem Element to test\n */\nfunction isTag(elem) {\n    return (elem.type === ElementType.Tag ||\n        elem.type === ElementType.Script ||\n        elem.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\nconst Root = ElementType.Root;\n/** Type for Text */\nconst Text = ElementType.Text;\n/** Type for <? ... ?> */\nconst Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\nconst Comment = ElementType.Comment;\n/** Type for <script> tags */\nconst Script = ElementType.Script;\n/** Type for <style> tags */\nconst Style = ElementType.Style;\n/** Type for Any tag */\nconst Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\nconst CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\nconst Doctype = ElementType.Doctype;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domhandler/lib/index.js":
/*!*************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domhandler/lib/index.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomHandler = void 0;\nvar domelementtype_1 = __webpack_require__(/*! domelementtype */ \"./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js\");\nvar node_1 = __webpack_require__(/*! ./node */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/node.js\");\n__exportStar(__webpack_require__(/*! ./node */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/node.js\"), exports);\nvar reWhitespace = /\\s+/g;\n// Default options\nvar defaultOpts = {\n    normalizeWhitespace: false,\n    withStartIndices: false,\n    withEndIndices: false,\n    xmlMode: false,\n};\nvar DomHandler = /** @class */ (function () {\n    /**\n     * @param callback Called once parsing has completed.\n     * @param options Settings for the handler.\n     * @param elementCB Callback whenever a tag is closed.\n     */\n    function DomHandler(callback, options, elementCB) {\n        /** The elements of the DOM */\n        this.dom = [];\n        /** The root element for the DOM */\n        this.root = new node_1.Document(this.dom);\n        /** Indicated whether parsing has been completed. */\n        this.done = false;\n        /** Stack of open tags. */\n        this.tagStack = [this.root];\n        /** A data node that is still being written to. */\n        this.lastNode = null;\n        /** Reference to the parser instance. Used for location information. */\n        this.parser = null;\n        // Make it possible to skip arguments, for backwards-compatibility\n        if (typeof options === \"function\") {\n            elementCB = options;\n            options = defaultOpts;\n        }\n        if (typeof callback === \"object\") {\n            options = callback;\n            callback = undefined;\n        }\n        this.callback = callback !== null && callback !== void 0 ? callback : null;\n        this.options = options !== null && options !== void 0 ? options : defaultOpts;\n        this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n    }\n    DomHandler.prototype.onparserinit = function (parser) {\n        this.parser = parser;\n    };\n    // Resets the handler back to starting state\n    DomHandler.prototype.onreset = function () {\n        this.dom = [];\n        this.root = new node_1.Document(this.dom);\n        this.done = false;\n        this.tagStack = [this.root];\n        this.lastNode = null;\n        this.parser = null;\n    };\n    // Signals the handler that parsing is done\n    DomHandler.prototype.onend = function () {\n        if (this.done)\n            return;\n        this.done = true;\n        this.parser = null;\n        this.handleCallback(null);\n    };\n    DomHandler.prototype.onerror = function (error) {\n        this.handleCallback(error);\n    };\n    DomHandler.prototype.onclosetag = function () {\n        this.lastNode = null;\n        var elem = this.tagStack.pop();\n        if (this.options.withEndIndices) {\n            elem.endIndex = this.parser.endIndex;\n        }\n        if (this.elementCB)\n            this.elementCB(elem);\n    };\n    DomHandler.prototype.onopentag = function (name, attribs) {\n        var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : undefined;\n        var element = new node_1.Element(name, attribs, undefined, type);\n        this.addNode(element);\n        this.tagStack.push(element);\n    };\n    DomHandler.prototype.ontext = function (data) {\n        var normalizeWhitespace = this.options.normalizeWhitespace;\n        var lastNode = this.lastNode;\n        if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {\n            if (normalizeWhitespace) {\n                lastNode.data = (lastNode.data + data).replace(reWhitespace, \" \");\n            }\n            else {\n                lastNode.data += data;\n            }\n            if (this.options.withEndIndices) {\n                lastNode.endIndex = this.parser.endIndex;\n            }\n        }\n        else {\n            if (normalizeWhitespace) {\n                data = data.replace(reWhitespace, \" \");\n            }\n            var node = new node_1.Text(data);\n            this.addNode(node);\n            this.lastNode = node;\n        }\n    };\n    DomHandler.prototype.oncomment = function (data) {\n        if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {\n            this.lastNode.data += data;\n            return;\n        }\n        var node = new node_1.Comment(data);\n        this.addNode(node);\n        this.lastNode = node;\n    };\n    DomHandler.prototype.oncommentend = function () {\n        this.lastNode = null;\n    };\n    DomHandler.prototype.oncdatastart = function () {\n        var text = new node_1.Text(\"\");\n        var node = new node_1.NodeWithChildren(domelementtype_1.ElementType.CDATA, [text]);\n        this.addNode(node);\n        text.parent = node;\n        this.lastNode = text;\n    };\n    DomHandler.prototype.oncdataend = function () {\n        this.lastNode = null;\n    };\n    DomHandler.prototype.onprocessinginstruction = function (name, data) {\n        var node = new node_1.ProcessingInstruction(name, data);\n        this.addNode(node);\n    };\n    DomHandler.prototype.handleCallback = function (error) {\n        if (typeof this.callback === \"function\") {\n            this.callback(error, this.dom);\n        }\n        else if (error) {\n            throw error;\n        }\n    };\n    DomHandler.prototype.addNode = function (node) {\n        var parent = this.tagStack[this.tagStack.length - 1];\n        var previousSibling = parent.children[parent.children.length - 1];\n        if (this.options.withStartIndices) {\n            node.startIndex = this.parser.startIndex;\n        }\n        if (this.options.withEndIndices) {\n            node.endIndex = this.parser.endIndex;\n        }\n        parent.children.push(node);\n        if (previousSibling) {\n            node.prev = previousSibling;\n            previousSibling.next = node;\n        }\n        node.parent = parent;\n        this.lastNode = null;\n    };\n    return DomHandler;\n}());\nexports.DomHandler = DomHandler;\nexports.default = DomHandler;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domhandler/lib/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domhandler/lib/node.js":
/*!************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domhandler/lib/node.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;\nvar domelementtype_1 = __webpack_require__(/*! domelementtype */ \"./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js\");\nvar nodeTypes = new Map([\n    [domelementtype_1.ElementType.Tag, 1],\n    [domelementtype_1.ElementType.Script, 1],\n    [domelementtype_1.ElementType.Style, 1],\n    [domelementtype_1.ElementType.Directive, 1],\n    [domelementtype_1.ElementType.Text, 3],\n    [domelementtype_1.ElementType.CDATA, 4],\n    [domelementtype_1.ElementType.Comment, 8],\n    [domelementtype_1.ElementType.Root, 9],\n]);\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nvar Node = /** @class */ (function () {\n    /**\n     *\n     * @param type The type of the node.\n     */\n    function Node(type) {\n        this.type = type;\n        /** Parent of the node */\n        this.parent = null;\n        /** Previous sibling */\n        this.prev = null;\n        /** Next sibling */\n        this.next = null;\n        /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n        this.startIndex = null;\n        /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n        this.endIndex = null;\n    }\n    Object.defineProperty(Node.prototype, \"nodeType\", {\n        // Read-only aliases\n        /**\n         * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible\n         * node {@link type}.\n         */\n        get: function () {\n            var _a;\n            return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Node.prototype, \"parentNode\", {\n        // Read-write aliases for properties\n        /**\n         * Same as {@link parent}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.parent;\n        },\n        set: function (parent) {\n            this.parent = parent;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Node.prototype, \"previousSibling\", {\n        /**\n         * Same as {@link prev}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.prev;\n        },\n        set: function (prev) {\n            this.prev = prev;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Node.prototype, \"nextSibling\", {\n        /**\n         * Same as {@link next}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.next;\n        },\n        set: function (next) {\n            this.next = next;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Clone this node, and optionally its children.\n     *\n     * @param recursive Clone child nodes as well.\n     * @returns A clone of the node.\n     */\n    Node.prototype.cloneNode = function (recursive) {\n        if (recursive === void 0) { recursive = false; }\n        return cloneNode(this, recursive);\n    };\n    return Node;\n}());\nexports.Node = Node;\n/**\n * A node that contains some data.\n */\nvar DataNode = /** @class */ (function (_super) {\n    __extends(DataNode, _super);\n    /**\n     * @param type The type of the node\n     * @param data The content of the data node\n     */\n    function DataNode(type, data) {\n        var _this = _super.call(this, type) || this;\n        _this.data = data;\n        return _this;\n    }\n    Object.defineProperty(DataNode.prototype, \"nodeValue\", {\n        /**\n         * Same as {@link data}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.data;\n        },\n        set: function (data) {\n            this.data = data;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return DataNode;\n}(Node));\nexports.DataNode = DataNode;\n/**\n * Text within the document.\n */\nvar Text = /** @class */ (function (_super) {\n    __extends(Text, _super);\n    function Text(data) {\n        return _super.call(this, domelementtype_1.ElementType.Text, data) || this;\n    }\n    return Text;\n}(DataNode));\nexports.Text = Text;\n/**\n * Comments within the document.\n */\nvar Comment = /** @class */ (function (_super) {\n    __extends(Comment, _super);\n    function Comment(data) {\n        return _super.call(this, domelementtype_1.ElementType.Comment, data) || this;\n    }\n    return Comment;\n}(DataNode));\nexports.Comment = Comment;\n/**\n * Processing instructions, including doc types.\n */\nvar ProcessingInstruction = /** @class */ (function (_super) {\n    __extends(ProcessingInstruction, _super);\n    function ProcessingInstruction(name, data) {\n        var _this = _super.call(this, domelementtype_1.ElementType.Directive, data) || this;\n        _this.name = name;\n        return _this;\n    }\n    return ProcessingInstruction;\n}(DataNode));\nexports.ProcessingInstruction = ProcessingInstruction;\n/**\n * A `Node` that can have children.\n */\nvar NodeWithChildren = /** @class */ (function (_super) {\n    __extends(NodeWithChildren, _super);\n    /**\n     * @param type Type of the node.\n     * @param children Children of the node. Only certain node types can have children.\n     */\n    function NodeWithChildren(type, children) {\n        var _this = _super.call(this, type) || this;\n        _this.children = children;\n        return _this;\n    }\n    Object.defineProperty(NodeWithChildren.prototype, \"firstChild\", {\n        // Aliases\n        /** First child of the node. */\n        get: function () {\n            var _a;\n            return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NodeWithChildren.prototype, \"lastChild\", {\n        /** Last child of the node. */\n        get: function () {\n            return this.children.length > 0\n                ? this.children[this.children.length - 1]\n                : null;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NodeWithChildren.prototype, \"childNodes\", {\n        /**\n         * Same as {@link children}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.children;\n        },\n        set: function (children) {\n            this.children = children;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return NodeWithChildren;\n}(Node));\nexports.NodeWithChildren = NodeWithChildren;\n/**\n * The root node of the document.\n */\nvar Document = /** @class */ (function (_super) {\n    __extends(Document, _super);\n    function Document(children) {\n        return _super.call(this, domelementtype_1.ElementType.Root, children) || this;\n    }\n    return Document;\n}(NodeWithChildren));\nexports.Document = Document;\n/**\n * An element within the DOM.\n */\nvar Element = /** @class */ (function (_super) {\n    __extends(Element, _super);\n    /**\n     * @param name Name of the tag, eg. `div`, `span`.\n     * @param attribs Object mapping attribute names to attribute values.\n     * @param children Children of the node.\n     */\n    function Element(name, attribs, children, type) {\n        if (children === void 0) { children = []; }\n        if (type === void 0) { type = name === \"script\"\n            ? domelementtype_1.ElementType.Script\n            : name === \"style\"\n                ? domelementtype_1.ElementType.Style\n                : domelementtype_1.ElementType.Tag; }\n        var _this = _super.call(this, type, children) || this;\n        _this.name = name;\n        _this.attribs = attribs;\n        return _this;\n    }\n    Object.defineProperty(Element.prototype, \"tagName\", {\n        // DOM Level 1 aliases\n        /**\n         * Same as {@link name}.\n         * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n         */\n        get: function () {\n            return this.name;\n        },\n        set: function (name) {\n            this.name = name;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Element.prototype, \"attributes\", {\n        get: function () {\n            var _this = this;\n            return Object.keys(this.attribs).map(function (name) {\n                var _a, _b;\n                return ({\n                    name: name,\n                    value: _this.attribs[name],\n                    namespace: (_a = _this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n                    prefix: (_b = _this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n                });\n            });\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return Element;\n}(NodeWithChildren));\nexports.Element = Element;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nfunction isTag(node) {\n    return (0, domelementtype_1.isTag)(node);\n}\nexports.isTag = isTag;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nfunction isCDATA(node) {\n    return node.type === domelementtype_1.ElementType.CDATA;\n}\nexports.isCDATA = isCDATA;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nfunction isText(node) {\n    return node.type === domelementtype_1.ElementType.Text;\n}\nexports.isText = isText;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nfunction isComment(node) {\n    return node.type === domelementtype_1.ElementType.Comment;\n}\nexports.isComment = isComment;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDirective(node) {\n    return node.type === domelementtype_1.ElementType.Directive;\n}\nexports.isDirective = isDirective;\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nfunction isDocument(node) {\n    return node.type === domelementtype_1.ElementType.Root;\n}\nexports.isDocument = isDocument;\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `NodeWithChildren` (has children), `false` otherwise.\n */\nfunction hasChildren(node) {\n    return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\nexports.hasChildren = hasChildren;\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nfunction cloneNode(node, recursive) {\n    if (recursive === void 0) { recursive = false; }\n    var result;\n    if (isText(node)) {\n        result = new Text(node.data);\n    }\n    else if (isComment(node)) {\n        result = new Comment(node.data);\n    }\n    else if (isTag(node)) {\n        var children = recursive ? cloneChildren(node.children) : [];\n        var clone_1 = new Element(node.name, __assign({}, node.attribs), children);\n        children.forEach(function (child) { return (child.parent = clone_1); });\n        if (node.namespace != null) {\n            clone_1.namespace = node.namespace;\n        }\n        if (node[\"x-attribsNamespace\"]) {\n            clone_1[\"x-attribsNamespace\"] = __assign({}, node[\"x-attribsNamespace\"]);\n        }\n        if (node[\"x-attribsPrefix\"]) {\n            clone_1[\"x-attribsPrefix\"] = __assign({}, node[\"x-attribsPrefix\"]);\n        }\n        result = clone_1;\n    }\n    else if (isCDATA(node)) {\n        var children = recursive ? cloneChildren(node.children) : [];\n        var clone_2 = new NodeWithChildren(domelementtype_1.ElementType.CDATA, children);\n        children.forEach(function (child) { return (child.parent = clone_2); });\n        result = clone_2;\n    }\n    else if (isDocument(node)) {\n        var children = recursive ? cloneChildren(node.children) : [];\n        var clone_3 = new Document(children);\n        children.forEach(function (child) { return (child.parent = clone_3); });\n        if (node[\"x-mode\"]) {\n            clone_3[\"x-mode\"] = node[\"x-mode\"];\n        }\n        result = clone_3;\n    }\n    else if (isDirective(node)) {\n        var instruction = new ProcessingInstruction(node.name, node.data);\n        if (node[\"x-name\"] != null) {\n            instruction[\"x-name\"] = node[\"x-name\"];\n            instruction[\"x-publicId\"] = node[\"x-publicId\"];\n            instruction[\"x-systemId\"] = node[\"x-systemId\"];\n        }\n        result = instruction;\n    }\n    else {\n        throw new Error(\"Not implemented yet: \".concat(node.type));\n    }\n    result.startIndex = node.startIndex;\n    result.endIndex = node.endIndex;\n    if (node.sourceCodeLocation != null) {\n        result.sourceCodeLocation = node.sourceCodeLocation;\n    }\n    return result;\n}\nexports.cloneNode = cloneNode;\nfunction cloneChildren(childs) {\n    var children = childs.map(function (child) { return cloneNode(child, true); });\n    for (var i = 1; i < children.length; i++) {\n        children[i].prev = children[i - 1];\n        children[i - 1].next = children[i];\n    }\n    return children;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domhandler/lib/node.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/feeds.js":
/*!***********************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/feeds.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFeed = void 0;\nvar stringify_1 = __webpack_require__(/*! ./stringify */ \"./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js\");\nvar legacy_1 = __webpack_require__(/*! ./legacy */ \"./node_modules/sanitize-html/node_modules/domutils/lib/legacy.js\");\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @param doc - The DOM to to extract the feed from.\n * @returns The feed.\n */\nfunction getFeed(doc) {\n    var feedRoot = getOneElement(isValidFeed, doc);\n    return !feedRoot\n        ? null\n        : feedRoot.name === \"feed\"\n            ? getAtomFeed(feedRoot)\n            : getRssFeed(feedRoot);\n}\nexports.getFeed = getFeed;\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot) {\n    var _a;\n    var childs = feedRoot.children;\n    var feed = {\n        type: \"atom\",\n        items: (0, legacy_1.getElementsByTagName)(\"entry\", childs).map(function (item) {\n            var _a;\n            var children = item.children;\n            var entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"id\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            var href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs.href;\n            if (href) {\n                entry.link = href;\n            }\n            var description = fetch(\"summary\", children) || fetch(\"content\", children);\n            if (description) {\n                entry.description = description;\n            }\n            var pubDate = fetch(\"updated\", children);\n            if (pubDate) {\n                entry.pubDate = new Date(pubDate);\n            }\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"id\", \"id\", childs);\n    addConditionally(feed, \"title\", \"title\", childs);\n    var href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs.href;\n    if (href) {\n        feed.link = href;\n    }\n    addConditionally(feed, \"description\", \"subtitle\", childs);\n    var updated = fetch(\"updated\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"email\", childs, true);\n    return feed;\n}\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot) {\n    var _a, _b;\n    var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n    var feed = {\n        type: feedRoot.name.substr(0, 3),\n        id: \"\",\n        items: (0, legacy_1.getElementsByTagName)(\"item\", feedRoot.children).map(function (item) {\n            var children = item.children;\n            var entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"guid\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            addConditionally(entry, \"link\", \"link\", children);\n            addConditionally(entry, \"description\", \"description\", children);\n            var pubDate = fetch(\"pubDate\", children);\n            if (pubDate)\n                entry.pubDate = new Date(pubDate);\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"title\", \"title\", childs);\n    addConditionally(feed, \"link\", \"link\", childs);\n    addConditionally(feed, \"description\", \"description\", childs);\n    var updated = fetch(\"lastBuildDate\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n    return feed;\n}\nvar MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\nvar MEDIA_KEYS_INT = [\n    \"fileSize\",\n    \"bitrate\",\n    \"framerate\",\n    \"samplingrate\",\n    \"channels\",\n    \"duration\",\n    \"height\",\n    \"width\",\n];\n/**\n * Get all media elements of a feed item.\n *\n * @param where Nodes to search in.\n * @returns Media elements.\n */\nfunction getMediaElements(where) {\n    return (0, legacy_1.getElementsByTagName)(\"media:content\", where).map(function (elem) {\n        var attribs = elem.attribs;\n        var media = {\n            medium: attribs.medium,\n            isDefault: !!attribs.isDefault,\n        };\n        for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {\n            var attrib = MEDIA_KEYS_STRING_1[_i];\n            if (attribs[attrib]) {\n                media[attrib] = attribs[attrib];\n            }\n        }\n        for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {\n            var attrib = MEDIA_KEYS_INT_1[_a];\n            if (attribs[attrib]) {\n                media[attrib] = parseInt(attribs[attrib], 10);\n            }\n        }\n        if (attribs.expression) {\n            media.expression =\n                attribs.expression;\n        }\n        return media;\n    });\n}\n/**\n * Get one element by tag name.\n *\n * @param tagName Tag name to look for\n * @param node Node to search in\n * @returns The element or null\n */\nfunction getOneElement(tagName, node) {\n    return (0, legacy_1.getElementsByTagName)(tagName, node, true, 1)[0];\n}\n/**\n * Get the text content of an element with a certain tag name.\n *\n * @param tagName Tag name to look for.\n * @param where  Node to search in.\n * @param recurse Whether to recurse into child nodes.\n * @returns The text content of the element.\n */\nfunction fetch(tagName, where, recurse) {\n    if (recurse === void 0) { recurse = false; }\n    return (0, stringify_1.textContent)((0, legacy_1.getElementsByTagName)(tagName, where, recurse, 1)).trim();\n}\n/**\n * Adds a property to an object if it has a value.\n *\n * @param obj Object to be extended\n * @param prop Property name\n * @param tagName Tag name that contains the conditionally added property\n * @param where Element to search for the property\n * @param recurse Whether to recurse into child nodes.\n */\nfunction addConditionally(obj, prop, tagName, where, recurse) {\n    if (recurse === void 0) { recurse = false; }\n    var val = fetch(tagName, where, recurse);\n    if (val)\n        obj[prop] = val;\n}\n/**\n * Checks if an element is a feed root node.\n *\n * @param value The name of the element to check.\n * @returns Whether an element is a feed root node.\n */\nfunction isValidFeed(value) {\n    return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/feeds.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/helpers.js":
/*!*************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/helpers.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0;\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\n/**\n * Given an array of nodes, remove any member that is contained by another.\n *\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't subtrees of each other.\n */\nfunction removeSubsets(nodes) {\n    var idx = nodes.length;\n    /*\n     * Check if each node (or one of its ancestors) is already contained in the\n     * array.\n     */\n    while (--idx >= 0) {\n        var node = nodes[idx];\n        /*\n         * Remove the node if it is not unique.\n         * We are going through the array from the end, so we only\n         * have to check nodes that preceed the node under consideration in the array.\n         */\n        if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n            nodes.splice(idx, 1);\n            continue;\n        }\n        for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n            if (nodes.includes(ancestor)) {\n                nodes.splice(idx, 1);\n                break;\n            }\n        }\n    }\n    return nodes;\n}\nexports.removeSubsets = removeSubsets;\n/**\n * Compare the position of one node against another node in any other document.\n * The return value is a bitmask with the following values:\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent./\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nfunction compareDocumentPosition(nodeA, nodeB) {\n    var aParents = [];\n    var bParents = [];\n    if (nodeA === nodeB) {\n        return 0;\n    }\n    var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;\n    while (current) {\n        aParents.unshift(current);\n        current = current.parent;\n    }\n    current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;\n    while (current) {\n        bParents.unshift(current);\n        current = current.parent;\n    }\n    var maxIdx = Math.min(aParents.length, bParents.length);\n    var idx = 0;\n    while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n        idx++;\n    }\n    if (idx === 0) {\n        return 1 /* DISCONNECTED */;\n    }\n    var sharedParent = aParents[idx - 1];\n    var siblings = sharedParent.children;\n    var aSibling = aParents[idx];\n    var bSibling = bParents[idx];\n    if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n        if (sharedParent === nodeB) {\n            return 4 /* FOLLOWING */ | 16 /* CONTAINED_BY */;\n        }\n        return 4 /* FOLLOWING */;\n    }\n    if (sharedParent === nodeA) {\n        return 2 /* PRECEDING */ | 8 /* CONTAINS */;\n    }\n    return 2 /* PRECEDING */;\n}\nexports.compareDocumentPosition = compareDocumentPosition;\n/**\n * Sort an array of nodes based on their relative position in the document and\n * remove any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nfunction uniqueSort(nodes) {\n    nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); });\n    nodes.sort(function (a, b) {\n        var relative = compareDocumentPosition(a, b);\n        if (relative & 2 /* PRECEDING */) {\n            return -1;\n        }\n        else if (relative & 4 /* FOLLOWING */) {\n            return 1;\n        }\n        return 0;\n    });\n    return nodes;\n}\nexports.uniqueSort = uniqueSort;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/helpers.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/index.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;\n__exportStar(__webpack_require__(/*! ./stringify */ \"./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js\"), exports);\n__exportStar(__webpack_require__(/*! ./traversal */ \"./node_modules/sanitize-html/node_modules/domutils/lib/traversal.js\"), exports);\n__exportStar(__webpack_require__(/*! ./manipulation */ \"./node_modules/sanitize-html/node_modules/domutils/lib/manipulation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./querying */ \"./node_modules/sanitize-html/node_modules/domutils/lib/querying.js\"), exports);\n__exportStar(__webpack_require__(/*! ./legacy */ \"./node_modules/sanitize-html/node_modules/domutils/lib/legacy.js\"), exports);\n__exportStar(__webpack_require__(/*! ./helpers */ \"./node_modules/sanitize-html/node_modules/domutils/lib/helpers.js\"), exports);\n__exportStar(__webpack_require__(/*! ./feeds */ \"./node_modules/sanitize-html/node_modules/domutils/lib/feeds.js\"), exports);\n/** @deprecated Use these methods from `domhandler` directly. */\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\nObject.defineProperty(exports, \"isTag\", { enumerable: true, get: function () { return domhandler_1.isTag; } });\nObject.defineProperty(exports, \"isCDATA\", { enumerable: true, get: function () { return domhandler_1.isCDATA; } });\nObject.defineProperty(exports, \"isText\", { enumerable: true, get: function () { return domhandler_1.isText; } });\nObject.defineProperty(exports, \"isComment\", { enumerable: true, get: function () { return domhandler_1.isComment; } });\nObject.defineProperty(exports, \"isDocument\", { enumerable: true, get: function () { return domhandler_1.isDocument; } });\nObject.defineProperty(exports, \"hasChildren\", { enumerable: true, get: function () { return domhandler_1.hasChildren; } });\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/legacy.js":
/*!************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/legacy.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\nvar querying_1 = __webpack_require__(/*! ./querying */ \"./node_modules/sanitize-html/node_modules/domutils/lib/querying.js\");\nvar Checks = {\n    tag_name: function (name) {\n        if (typeof name === \"function\") {\n            return function (elem) { return (0, domhandler_1.isTag)(elem) && name(elem.name); };\n        }\n        else if (name === \"*\") {\n            return domhandler_1.isTag;\n        }\n        return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.name === name; };\n    },\n    tag_type: function (type) {\n        if (typeof type === \"function\") {\n            return function (elem) { return type(elem.type); };\n        }\n        return function (elem) { return elem.type === type; };\n    },\n    tag_contains: function (data) {\n        if (typeof data === \"function\") {\n            return function (elem) { return (0, domhandler_1.isText)(elem) && data(elem.data); };\n        }\n        return function (elem) { return (0, domhandler_1.isText)(elem) && elem.data === data; };\n    },\n};\n/**\n * @param attrib Attribute to check.\n * @param value Attribute value to look for.\n * @returns A function to check whether the a node has an attribute with a particular value.\n */\nfunction getAttribCheck(attrib, value) {\n    if (typeof value === \"function\") {\n        return function (elem) { return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]); };\n    }\n    return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value; };\n}\n/**\n * @param a First function to combine.\n * @param b Second function to combine.\n * @returns A function taking a node and returning `true` if either\n * of the input functions returns `true` for the node.\n */\nfunction combineFuncs(a, b) {\n    return function (elem) { return a(elem) || b(elem); };\n}\n/**\n * @param options An object describing nodes to look for.\n * @returns A function executing all checks in `options` and returning `true`\n * if any of them match a node.\n */\nfunction compileTest(options) {\n    var funcs = Object.keys(options).map(function (key) {\n        var value = options[key];\n        return Object.prototype.hasOwnProperty.call(Checks, key)\n            ? Checks[key](value)\n            : getAttribCheck(key, value);\n    });\n    return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n}\n/**\n * @param options An object describing nodes to look for.\n * @param node The element to test.\n * @returns Whether the element matches the description in `options`.\n */\nfunction testElement(options, node) {\n    var test = compileTest(options);\n    return test ? test(node) : true;\n}\nexports.testElement = testElement;\n/**\n * @param options An object describing nodes to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes that match `options`.\n */\nfunction getElements(options, nodes, recurse, limit) {\n    if (limit === void 0) { limit = Infinity; }\n    var test = compileTest(options);\n    return test ? (0, querying_1.filter)(test, nodes, recurse, limit) : [];\n}\nexports.getElements = getElements;\n/**\n * @param id The unique ID attribute value to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @returns The node with the supplied ID.\n */\nfunction getElementById(id, nodes, recurse) {\n    if (recurse === void 0) { recurse = true; }\n    if (!Array.isArray(nodes))\n        nodes = [nodes];\n    return (0, querying_1.findOne)(getAttribCheck(\"id\", id), nodes, recurse);\n}\nexports.getElementById = getElementById;\n/**\n * @param tagName Tag name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `tagName`.\n */\nfunction getElementsByTagName(tagName, nodes, recurse, limit) {\n    if (recurse === void 0) { recurse = true; }\n    if (limit === void 0) { limit = Infinity; }\n    return (0, querying_1.filter)(Checks.tag_name(tagName), nodes, recurse, limit);\n}\nexports.getElementsByTagName = getElementsByTagName;\n/**\n * @param type Element type to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `type`.\n */\nfunction getElementsByTagType(type, nodes, recurse, limit) {\n    if (recurse === void 0) { recurse = true; }\n    if (limit === void 0) { limit = Infinity; }\n    return (0, querying_1.filter)(Checks.tag_type(type), nodes, recurse, limit);\n}\nexports.getElementsByTagType = getElementsByTagType;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/legacy.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/manipulation.js":
/*!******************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/manipulation.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;\n/**\n * Remove an element from the dom\n *\n * @param elem The element to be removed\n */\nfunction removeElement(elem) {\n    if (elem.prev)\n        elem.prev.next = elem.next;\n    if (elem.next)\n        elem.next.prev = elem.prev;\n    if (elem.parent) {\n        var childs = elem.parent.children;\n        childs.splice(childs.lastIndexOf(elem), 1);\n    }\n}\nexports.removeElement = removeElement;\n/**\n * Replace an element in the dom\n *\n * @param elem The element to be replaced\n * @param replacement The element to be added\n */\nfunction replaceElement(elem, replacement) {\n    var prev = (replacement.prev = elem.prev);\n    if (prev) {\n        prev.next = replacement;\n    }\n    var next = (replacement.next = elem.next);\n    if (next) {\n        next.prev = replacement;\n    }\n    var parent = (replacement.parent = elem.parent);\n    if (parent) {\n        var childs = parent.children;\n        childs[childs.lastIndexOf(elem)] = replacement;\n    }\n}\nexports.replaceElement = replaceElement;\n/**\n * Append a child to an element.\n *\n * @param elem The element to append to.\n * @param child The element to be added as a child.\n */\nfunction appendChild(elem, child) {\n    removeElement(child);\n    child.next = null;\n    child.parent = elem;\n    if (elem.children.push(child) > 1) {\n        var sibling = elem.children[elem.children.length - 2];\n        sibling.next = child;\n        child.prev = sibling;\n    }\n    else {\n        child.prev = null;\n    }\n}\nexports.appendChild = appendChild;\n/**\n * Append an element after another.\n *\n * @param elem The element to append after.\n * @param next The element be added.\n */\nfunction append(elem, next) {\n    removeElement(next);\n    var parent = elem.parent;\n    var currNext = elem.next;\n    next.next = currNext;\n    next.prev = elem;\n    elem.next = next;\n    next.parent = parent;\n    if (currNext) {\n        currNext.prev = next;\n        if (parent) {\n            var childs = parent.children;\n            childs.splice(childs.lastIndexOf(currNext), 0, next);\n        }\n    }\n    else if (parent) {\n        parent.children.push(next);\n    }\n}\nexports.append = append;\n/**\n * Prepend a child to an element.\n *\n * @param elem The element to prepend before.\n * @param child The element to be added as a child.\n */\nfunction prependChild(elem, child) {\n    removeElement(child);\n    child.parent = elem;\n    child.prev = null;\n    if (elem.children.unshift(child) !== 1) {\n        var sibling = elem.children[1];\n        sibling.prev = child;\n        child.next = sibling;\n    }\n    else {\n        child.next = null;\n    }\n}\nexports.prependChild = prependChild;\n/**\n * Prepend an element before another.\n *\n * @param elem The element to prepend before.\n * @param prev The element be added.\n */\nfunction prepend(elem, prev) {\n    removeElement(prev);\n    var parent = elem.parent;\n    if (parent) {\n        var childs = parent.children;\n        childs.splice(childs.indexOf(elem), 0, prev);\n    }\n    if (elem.prev) {\n        elem.prev.next = prev;\n    }\n    prev.parent = parent;\n    prev.prev = elem.prev;\n    prev.next = elem;\n    elem.prev = prev;\n}\nexports.prepend = prepend;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/manipulation.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/querying.js":
/*!**************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/querying.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\n/**\n * Search a node and its children for nodes passing a test function.\n *\n * @param test Function to test nodes on.\n * @param node Node to search. Will be included in the result set if it matches.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nfunction filter(test, node, recurse, limit) {\n    if (recurse === void 0) { recurse = true; }\n    if (limit === void 0) { limit = Infinity; }\n    if (!Array.isArray(node))\n        node = [node];\n    return find(test, node, recurse, limit);\n}\nexports.filter = filter;\n/**\n * Search an array of node and its children for nodes passing a test function.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nfunction find(test, nodes, recurse, limit) {\n    var result = [];\n    for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n        var elem = nodes_1[_i];\n        if (test(elem)) {\n            result.push(elem);\n            if (--limit <= 0)\n                break;\n        }\n        if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {\n            var children = find(test, elem.children, recurse, limit);\n            result.push.apply(result, children);\n            limit -= children.length;\n            if (limit <= 0)\n                break;\n        }\n    }\n    return result;\n}\nexports.find = find;\n/**\n * Finds the first element inside of an array that matches a test function.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns The first node in the array that passes `test`.\n */\nfunction findOneChild(test, nodes) {\n    return nodes.find(test);\n}\nexports.findOneChild = findOneChild;\n/**\n * Finds one element in a tree that passes a test.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @returns The first child node that passes `test`.\n */\nfunction findOne(test, nodes, recurse) {\n    if (recurse === void 0) { recurse = true; }\n    var elem = null;\n    for (var i = 0; i < nodes.length && !elem; i++) {\n        var checked = nodes[i];\n        if (!(0, domhandler_1.isTag)(checked)) {\n            continue;\n        }\n        else if (test(checked)) {\n            elem = checked;\n        }\n        else if (recurse && checked.children.length > 0) {\n            elem = findOne(test, checked.children);\n        }\n    }\n    return elem;\n}\nexports.findOne = findOne;\n/**\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns Whether a tree of nodes contains at least one node passing a test.\n */\nfunction existsOne(test, nodes) {\n    return nodes.some(function (checked) {\n        return (0, domhandler_1.isTag)(checked) &&\n            (test(checked) ||\n                (checked.children.length > 0 &&\n                    existsOne(test, checked.children)));\n    });\n}\nexports.existsOne = existsOne;\n/**\n * Search and array of nodes and its children for nodes passing a test function.\n *\n * Same as `find`, only with less options, leading to reduced complexity.\n *\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns All nodes passing `test`.\n */\nfunction findAll(test, nodes) {\n    var _a;\n    var result = [];\n    var stack = nodes.filter(domhandler_1.isTag);\n    var elem;\n    while ((elem = stack.shift())) {\n        var children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(domhandler_1.isTag);\n        if (children && children.length > 0) {\n            stack.unshift.apply(stack, children);\n        }\n        if (test(elem))\n            result.push(elem);\n    }\n    return result;\n}\nexports.findAll = findAll;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/querying.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js":
/*!***************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\nvar dom_serializer_1 = __importDefault(__webpack_require__(/*! dom-serializer */ \"./node_modules/sanitize-html/node_modules/dom-serializer/lib/index.js\"));\nvar domelementtype_1 = __webpack_require__(/*! domelementtype */ \"./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js\");\n/**\n * @param node Node to get the outer HTML of.\n * @param options Options for serialization.\n * @deprecated Use the `dom-serializer` module directly.\n * @returns `node`'s outer HTML.\n */\nfunction getOuterHTML(node, options) {\n    return (0, dom_serializer_1.default)(node, options);\n}\nexports.getOuterHTML = getOuterHTML;\n/**\n * @param node Node to get the inner HTML of.\n * @param options Options for serialization.\n * @deprecated Use the `dom-serializer` module directly.\n * @returns `node`'s inner HTML.\n */\nfunction getInnerHTML(node, options) {\n    return (0, domhandler_1.hasChildren)(node)\n        ? node.children.map(function (node) { return getOuterHTML(node, options); }).join(\"\")\n        : \"\";\n}\nexports.getInnerHTML = getInnerHTML;\n/**\n * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.\n *\n * @deprecated Use `textContent` instead.\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n */\nfunction getText(node) {\n    if (Array.isArray(node))\n        return node.map(getText).join(\"\");\n    if ((0, domhandler_1.isTag)(node))\n        return node.name === \"br\" ? \"\\n\" : getText(node.children);\n    if ((0, domhandler_1.isCDATA)(node))\n        return getText(node.children);\n    if ((0, domhandler_1.isText)(node))\n        return node.data;\n    return \"\";\n}\nexports.getText = getText;\n/**\n * Get a node's text content.\n *\n * @param node Node to get the text content of.\n * @returns `node`'s text content.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n */\nfunction textContent(node) {\n    if (Array.isArray(node))\n        return node.map(textContent).join(\"\");\n    if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) {\n        return textContent(node.children);\n    }\n    if ((0, domhandler_1.isText)(node))\n        return node.data;\n    return \"\";\n}\nexports.textContent = textContent;\n/**\n * Get a node's inner text.\n *\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n */\nfunction innerText(node) {\n    if (Array.isArray(node))\n        return node.map(innerText).join(\"\");\n    if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) {\n        return innerText(node.children);\n    }\n    if ((0, domhandler_1.isText)(node))\n        return node.data;\n    return \"\";\n}\nexports.innerText = innerText;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/stringify.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/domutils/lib/traversal.js":
/*!***************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/domutils/lib/traversal.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prevElementSibling = exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\nvar emptyArray = [];\n/**\n * Get a node's children.\n *\n * @param elem Node to get the children of.\n * @returns `elem`'s children, or an empty array.\n */\nfunction getChildren(elem) {\n    var _a;\n    return (_a = elem.children) !== null && _a !== void 0 ? _a : emptyArray;\n}\nexports.getChildren = getChildren;\n/**\n * Get a node's parent.\n *\n * @param elem Node to get the parent of.\n * @returns `elem`'s parent node.\n */\nfunction getParent(elem) {\n    return elem.parent || null;\n}\nexports.getParent = getParent;\n/**\n * Gets an elements siblings, including the element itself.\n *\n * Attempts to get the children through the element's parent first.\n * If we don't have a parent (the element is a root node),\n * we walk the element's `prev` & `next` to get all remaining nodes.\n *\n * @param elem Element to get the siblings of.\n * @returns `elem`'s siblings.\n */\nfunction getSiblings(elem) {\n    var _a, _b;\n    var parent = getParent(elem);\n    if (parent != null)\n        return getChildren(parent);\n    var siblings = [elem];\n    var prev = elem.prev, next = elem.next;\n    while (prev != null) {\n        siblings.unshift(prev);\n        (_a = prev, prev = _a.prev);\n    }\n    while (next != null) {\n        siblings.push(next);\n        (_b = next, next = _b.next);\n    }\n    return siblings;\n}\nexports.getSiblings = getSiblings;\n/**\n * Gets an attribute from an element.\n *\n * @param elem Element to check.\n * @param name Attribute name to retrieve.\n * @returns The element's attribute value, or `undefined`.\n */\nfunction getAttributeValue(elem, name) {\n    var _a;\n    return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];\n}\nexports.getAttributeValue = getAttributeValue;\n/**\n * Checks whether an element has an attribute.\n *\n * @param elem Element to check.\n * @param name Attribute name to look for.\n * @returns Returns whether `elem` has the attribute `name`.\n */\nfunction hasAttrib(elem, name) {\n    return (elem.attribs != null &&\n        Object.prototype.hasOwnProperty.call(elem.attribs, name) &&\n        elem.attribs[name] != null);\n}\nexports.hasAttrib = hasAttrib;\n/**\n * Get the tag name of an element.\n *\n * @param elem The element to get the name for.\n * @returns The tag name of `elem`.\n */\nfunction getName(elem) {\n    return elem.name;\n}\nexports.getName = getName;\n/**\n * Returns the next element sibling of a node.\n *\n * @param elem The element to get the next sibling of.\n * @returns `elem`'s next sibling that is a tag.\n */\nfunction nextElementSibling(elem) {\n    var _a;\n    var next = elem.next;\n    while (next !== null && !(0, domhandler_1.isTag)(next))\n        (_a = next, next = _a.next);\n    return next;\n}\nexports.nextElementSibling = nextElementSibling;\n/**\n * Returns the previous element sibling of a node.\n *\n * @param elem The element to get the previous sibling of.\n * @returns `elem`'s previous sibling that is a tag.\n */\nfunction prevElementSibling(elem) {\n    var _a;\n    var prev = elem.prev;\n    while (prev !== null && !(0, domhandler_1.isTag)(prev))\n        (_a = prev, prev = _a.prev);\n    return prev;\n}\nexports.prevElementSibling = prevElementSibling;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/domutils/lib/traversal.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/decode.js":
/*!************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/decode.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;\nvar entities_json_1 = __importDefault(__webpack_require__(/*! ./maps/entities.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json\"));\nvar legacy_json_1 = __importDefault(__webpack_require__(/*! ./maps/legacy.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/legacy.json\"));\nvar xml_json_1 = __importDefault(__webpack_require__(/*! ./maps/xml.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json\"));\nvar decode_codepoint_1 = __importDefault(__webpack_require__(/*! ./decode_codepoint */ \"./node_modules/sanitize-html/node_modules/entities/lib/decode_codepoint.js\"));\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\nexports.decodeXML = getStrictDecoder(xml_json_1.default);\nexports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);\nfunction getStrictDecoder(map) {\n    var replace = getReplacer(map);\n    return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\nexports.decodeHTML = (function () {\n    var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n    var keys = Object.keys(entities_json_1.default).sort(sorter);\n    for (var i = 0, j = 0; i < keys.length; i++) {\n        if (legacy[j] === keys[i]) {\n            keys[i] += \";?\";\n            j++;\n        }\n        else {\n            keys[i] += \";\";\n        }\n    }\n    var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n    var replace = getReplacer(entities_json_1.default);\n    function replacer(str) {\n        if (str.substr(-1) !== \";\")\n            str += \";\";\n        return replace(str);\n    }\n    // TODO consider creating a merged map\n    return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n    return function replace(str) {\n        if (str.charAt(1) === \"#\") {\n            var secondChar = str.charAt(2);\n            if (secondChar === \"X\" || secondChar === \"x\") {\n                return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n            }\n            return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n        }\n        // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n        return map[str.slice(1, -1)] || str;\n    };\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/decode.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/decode_codepoint.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/decode_codepoint.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(__webpack_require__(/*! ./maps/decode.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n    function (codePoint) {\n        var output = \"\";\n        if (codePoint > 0xffff) {\n            codePoint -= 0x10000;\n            output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n            codePoint = 0xdc00 | (codePoint & 0x3ff);\n        }\n        output += String.fromCharCode(codePoint);\n        return output;\n    };\nfunction decodeCodePoint(codePoint) {\n    if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n        return \"\\uFFFD\";\n    }\n    if (codePoint in decode_json_1.default) {\n        codePoint = decode_json_1.default[codePoint];\n    }\n    return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/decode_codepoint.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/encode.js":
/*!************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/encode.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;\nvar xml_json_1 = __importDefault(__webpack_require__(/*! ./maps/xml.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json\"));\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(__webpack_require__(/*! ./maps/entities.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json\"));\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `&num;`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n    return Object.keys(obj)\n        .sort()\n        .reduce(function (inverse, name) {\n        inverse[obj[name]] = \"&\" + name + \";\";\n        return inverse;\n    }, {});\n}\nfunction getInverseReplacer(inverse) {\n    var single = [];\n    var multiple = [];\n    for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n        var k = _a[_i];\n        if (k.length === 1) {\n            // Add value to single array\n            single.push(\"\\\\\" + k);\n        }\n        else {\n            // Add value to multiple array\n            multiple.push(k);\n        }\n    }\n    // Add ranges to single characters.\n    single.sort();\n    for (var start = 0; start < single.length - 1; start++) {\n        // Find the end of a run of characters\n        var end = start;\n        while (end < single.length - 1 &&\n            single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n            end += 1;\n        }\n        var count = 1 + end - start;\n        // We want to replace at least three characters\n        if (count < 3)\n            continue;\n        single.splice(start, count, single[start] + \"-\" + single[end]);\n    }\n    multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n    return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n    ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        function (str) { return str.codePointAt(0); }\n    : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n        function (c) {\n            return (c.charCodeAt(0) - 0xd800) * 0x400 +\n                c.charCodeAt(1) -\n                0xdc00 +\n                0x10000;\n        };\nfunction singleCharReplacer(c) {\n    return \"&#x\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n        .toString(16)\n        .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n    return function (data) {\n        return data\n            .replace(re, function (name) { return inverse[name]; })\n            .replace(reNonASCII, singleCharReplacer);\n    };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n    return data.replace(reEscapeChars, singleCharReplacer);\n}\nexports.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `&#xfc;`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n    return data.replace(xmlReplacer, singleCharReplacer);\n}\nexports.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n    return function (data) {\n        return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n    };\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/encode.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/index.js":
/*!***********************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/index.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;\nvar decode_1 = __webpack_require__(/*! ./decode */ \"./node_modules/sanitize-html/node_modules/entities/lib/decode.js\");\nvar encode_1 = __webpack_require__(/*! ./encode */ \"./node_modules/sanitize-html/node_modules/entities/lib/encode.js\");\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeXML` or `decodeHTML` directly.\n */\nfunction decode(data, level) {\n    return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);\n}\nexports.decode = decode;\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.\n */\nfunction decodeStrict(data, level) {\n    return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);\n}\nexports.decodeStrict = decodeStrict;\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.\n */\nfunction encode(data, level) {\n    return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);\n}\nexports.encode = encode;\nvar encode_2 = __webpack_require__(/*! ./encode */ \"./node_modules/sanitize-html/node_modules/entities/lib/encode.js\");\nObject.defineProperty(exports, \"encodeXML\", { enumerable: true, get: function () { return encode_2.encodeXML; } });\nObject.defineProperty(exports, \"encodeHTML\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeNonAsciiHTML\", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });\nObject.defineProperty(exports, \"escape\", { enumerable: true, get: function () { return encode_2.escape; } });\nObject.defineProperty(exports, \"escapeUTF8\", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"encodeHTML4\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeHTML5\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nvar decode_2 = __webpack_require__(/*! ./decode */ \"./node_modules/sanitize-html/node_modules/entities/lib/decode.js\");\nObject.defineProperty(exports, \"decodeXML\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\nObject.defineProperty(exports, \"decodeHTML\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTMLStrict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"decodeHTML4\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML5\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML4Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeHTML5Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeXMLStrict\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/maps/decode.json":
/*!*******************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/maps/decode.json ***!
  \*******************************************************************************/
/*! exports provided: 0, 128, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"{\\\"0\\\":65533,\\\"128\\\":8364,\\\"130\\\":8218,\\\"131\\\":402,\\\"132\\\":8222,\\\"133\\\":8230,\\\"134\\\":8224,\\\"135\\\":8225,\\\"136\\\":710,\\\"137\\\":8240,\\\"138\\\":352,\\\"139\\\":8249,\\\"140\\\":338,\\\"142\\\":381,\\\"145\\\":8216,\\\"146\\\":8217,\\\"147\\\":8220,\\\"148\\\":8221,\\\"149\\\":8226,\\\"150\\\":8211,\\\"151\\\":8212,\\\"152\\\":732,\\\"153\\\":8482,\\\"154\\\":353,\\\"155\\\":8250,\\\"156\\\":339,\\\"158\\\":382,\\\"159\\\":376}\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/maps/decode.json?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json":
/*!*********************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json ***!
  \*********************************************************************************/
/*! exports provided: Aacute, aacute, Abreve, abreve, ac, acd, acE, Acirc, acirc, acute, Acy, acy, AElig, aelig, af, Afr, afr, Agrave, agrave, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp, AMP, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos, ApplyFunction, approx, approxeq, Aring, aring, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde, atilde, Auml, auml, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil, ccedil, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil, Cedilla, cemptyv, cent, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy, COPY, copysr, CounterClockwiseContourIntegral, crarr, cross, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die, DifferentialD, digamma, disin, div, divide, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute, eacute, easter, Ecaron, ecaron, Ecirc, ecirc, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave, egrave, egs, egsdot, el, Element, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH, eth, Euml, euml, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12, frac13, frac14, frac15, frac16, frac18, frac23, frac25, frac34, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt, GT, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute, iacute, ic, Icirc, icirc, Icy, icy, Idot, IEcy, iecy, iexcl, iff, ifr, Ifr, Igrave, igrave, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, in, infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml, iuml, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt, LT, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr, male, malt, maltese, Map, map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro, midast, midcir, mid, middot, minusb, minus, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde, ntilde, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute, oacute, oast, Ocirc, ocirc, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve, ograve, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf, ordm, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash, oslash, osol, Otilde, otilde, otimesas, Otimes, otimes, Ouml, ouml, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot, QUOT, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg, REG, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1, sup2, sup3, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN, thorn, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute, uacute, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc, ucirc, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave, ugrave, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml, uuml, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute, yacute, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"{\\\"Aacute\\\":\\\"Á\\\",\\\"aacute\\\":\\\"á\\\",\\\"Abreve\\\":\\\"Ă\\\",\\\"abreve\\\":\\\"ă\\\",\\\"ac\\\":\\\"∾\\\",\\\"acd\\\":\\\"∿\\\",\\\"acE\\\":\\\"∾̳\\\",\\\"Acirc\\\":\\\"Â\\\",\\\"acirc\\\":\\\"â\\\",\\\"acute\\\":\\\"´\\\",\\\"Acy\\\":\\\"А\\\",\\\"acy\\\":\\\"а\\\",\\\"AElig\\\":\\\"Æ\\\",\\\"aelig\\\":\\\"æ\\\",\\\"af\\\":\\\"⁡\\\",\\\"Afr\\\":\\\"𝔄\\\",\\\"afr\\\":\\\"𝔞\\\",\\\"Agrave\\\":\\\"À\\\",\\\"agrave\\\":\\\"à\\\",\\\"alefsym\\\":\\\"ℵ\\\",\\\"aleph\\\":\\\"ℵ\\\",\\\"Alpha\\\":\\\"Α\\\",\\\"alpha\\\":\\\"α\\\",\\\"Amacr\\\":\\\"Ā\\\",\\\"amacr\\\":\\\"ā\\\",\\\"amalg\\\":\\\"⨿\\\",\\\"amp\\\":\\\"&\\\",\\\"AMP\\\":\\\"&\\\",\\\"andand\\\":\\\"⩕\\\",\\\"And\\\":\\\"⩓\\\",\\\"and\\\":\\\"∧\\\",\\\"andd\\\":\\\"⩜\\\",\\\"andslope\\\":\\\"⩘\\\",\\\"andv\\\":\\\"⩚\\\",\\\"ang\\\":\\\"∠\\\",\\\"ange\\\":\\\"⦤\\\",\\\"angle\\\":\\\"∠\\\",\\\"angmsdaa\\\":\\\"⦨\\\",\\\"angmsdab\\\":\\\"⦩\\\",\\\"angmsdac\\\":\\\"⦪\\\",\\\"angmsdad\\\":\\\"⦫\\\",\\\"angmsdae\\\":\\\"⦬\\\",\\\"angmsdaf\\\":\\\"⦭\\\",\\\"angmsdag\\\":\\\"⦮\\\",\\\"angmsdah\\\":\\\"⦯\\\",\\\"angmsd\\\":\\\"∡\\\",\\\"angrt\\\":\\\"∟\\\",\\\"angrtvb\\\":\\\"⊾\\\",\\\"angrtvbd\\\":\\\"⦝\\\",\\\"angsph\\\":\\\"∢\\\",\\\"angst\\\":\\\"Å\\\",\\\"angzarr\\\":\\\"⍼\\\",\\\"Aogon\\\":\\\"Ą\\\",\\\"aogon\\\":\\\"ą\\\",\\\"Aopf\\\":\\\"𝔸\\\",\\\"aopf\\\":\\\"𝕒\\\",\\\"apacir\\\":\\\"⩯\\\",\\\"ap\\\":\\\"≈\\\",\\\"apE\\\":\\\"⩰\\\",\\\"ape\\\":\\\"≊\\\",\\\"apid\\\":\\\"≋\\\",\\\"apos\\\":\\\"'\\\",\\\"ApplyFunction\\\":\\\"⁡\\\",\\\"approx\\\":\\\"≈\\\",\\\"approxeq\\\":\\\"≊\\\",\\\"Aring\\\":\\\"Å\\\",\\\"aring\\\":\\\"å\\\",\\\"Ascr\\\":\\\"𝒜\\\",\\\"ascr\\\":\\\"𝒶\\\",\\\"Assign\\\":\\\"≔\\\",\\\"ast\\\":\\\"*\\\",\\\"asymp\\\":\\\"≈\\\",\\\"asympeq\\\":\\\"≍\\\",\\\"Atilde\\\":\\\"Ã\\\",\\\"atilde\\\":\\\"ã\\\",\\\"Auml\\\":\\\"Ä\\\",\\\"auml\\\":\\\"ä\\\",\\\"awconint\\\":\\\"∳\\\",\\\"awint\\\":\\\"⨑\\\",\\\"backcong\\\":\\\"≌\\\",\\\"backepsilon\\\":\\\"϶\\\",\\\"backprime\\\":\\\"‵\\\",\\\"backsim\\\":\\\"∽\\\",\\\"backsimeq\\\":\\\"⋍\\\",\\\"Backslash\\\":\\\"∖\\\",\\\"Barv\\\":\\\"⫧\\\",\\\"barvee\\\":\\\"⊽\\\",\\\"barwed\\\":\\\"⌅\\\",\\\"Barwed\\\":\\\"⌆\\\",\\\"barwedge\\\":\\\"⌅\\\",\\\"bbrk\\\":\\\"⎵\\\",\\\"bbrktbrk\\\":\\\"⎶\\\",\\\"bcong\\\":\\\"≌\\\",\\\"Bcy\\\":\\\"Б\\\",\\\"bcy\\\":\\\"б\\\",\\\"bdquo\\\":\\\"„\\\",\\\"becaus\\\":\\\"∵\\\",\\\"because\\\":\\\"∵\\\",\\\"Because\\\":\\\"∵\\\",\\\"bemptyv\\\":\\\"⦰\\\",\\\"bepsi\\\":\\\"϶\\\",\\\"bernou\\\":\\\"ℬ\\\",\\\"Bernoullis\\\":\\\"ℬ\\\",\\\"Beta\\\":\\\"Β\\\",\\\"beta\\\":\\\"β\\\",\\\"beth\\\":\\\"ℶ\\\",\\\"between\\\":\\\"≬\\\",\\\"Bfr\\\":\\\"𝔅\\\",\\\"bfr\\\":\\\"𝔟\\\",\\\"bigcap\\\":\\\"⋂\\\",\\\"bigcirc\\\":\\\"◯\\\",\\\"bigcup\\\":\\\"⋃\\\",\\\"bigodot\\\":\\\"⨀\\\",\\\"bigoplus\\\":\\\"⨁\\\",\\\"bigotimes\\\":\\\"⨂\\\",\\\"bigsqcup\\\":\\\"⨆\\\",\\\"bigstar\\\":\\\"★\\\",\\\"bigtriangledown\\\":\\\"▽\\\",\\\"bigtriangleup\\\":\\\"△\\\",\\\"biguplus\\\":\\\"⨄\\\",\\\"bigvee\\\":\\\"⋁\\\",\\\"bigwedge\\\":\\\"⋀\\\",\\\"bkarow\\\":\\\"⤍\\\",\\\"blacklozenge\\\":\\\"⧫\\\",\\\"blacksquare\\\":\\\"▪\\\",\\\"blacktriangle\\\":\\\"▴\\\",\\\"blacktriangledown\\\":\\\"▾\\\",\\\"blacktriangleleft\\\":\\\"◂\\\",\\\"blacktriangleright\\\":\\\"▸\\\",\\\"blank\\\":\\\"␣\\\",\\\"blk12\\\":\\\"▒\\\",\\\"blk14\\\":\\\"░\\\",\\\"blk34\\\":\\\"▓\\\",\\\"block\\\":\\\"█\\\",\\\"bne\\\":\\\"=⃥\\\",\\\"bnequiv\\\":\\\"≡⃥\\\",\\\"bNot\\\":\\\"⫭\\\",\\\"bnot\\\":\\\"⌐\\\",\\\"Bopf\\\":\\\"𝔹\\\",\\\"bopf\\\":\\\"𝕓\\\",\\\"bot\\\":\\\"⊥\\\",\\\"bottom\\\":\\\"⊥\\\",\\\"bowtie\\\":\\\"⋈\\\",\\\"boxbox\\\":\\\"⧉\\\",\\\"boxdl\\\":\\\"┐\\\",\\\"boxdL\\\":\\\"╕\\\",\\\"boxDl\\\":\\\"╖\\\",\\\"boxDL\\\":\\\"╗\\\",\\\"boxdr\\\":\\\"┌\\\",\\\"boxdR\\\":\\\"╒\\\",\\\"boxDr\\\":\\\"╓\\\",\\\"boxDR\\\":\\\"╔\\\",\\\"boxh\\\":\\\"─\\\",\\\"boxH\\\":\\\"═\\\",\\\"boxhd\\\":\\\"┬\\\",\\\"boxHd\\\":\\\"╤\\\",\\\"boxhD\\\":\\\"╥\\\",\\\"boxHD\\\":\\\"╦\\\",\\\"boxhu\\\":\\\"┴\\\",\\\"boxHu\\\":\\\"╧\\\",\\\"boxhU\\\":\\\"╨\\\",\\\"boxHU\\\":\\\"╩\\\",\\\"boxminus\\\":\\\"⊟\\\",\\\"boxplus\\\":\\\"⊞\\\",\\\"boxtimes\\\":\\\"⊠\\\",\\\"boxul\\\":\\\"┘\\\",\\\"boxuL\\\":\\\"╛\\\",\\\"boxUl\\\":\\\"╜\\\",\\\"boxUL\\\":\\\"╝\\\",\\\"boxur\\\":\\\"└\\\",\\\"boxuR\\\":\\\"╘\\\",\\\"boxUr\\\":\\\"╙\\\",\\\"boxUR\\\":\\\"╚\\\",\\\"boxv\\\":\\\"│\\\",\\\"boxV\\\":\\\"║\\\",\\\"boxvh\\\":\\\"┼\\\",\\\"boxvH\\\":\\\"╪\\\",\\\"boxVh\\\":\\\"╫\\\",\\\"boxVH\\\":\\\"╬\\\",\\\"boxvl\\\":\\\"┤\\\",\\\"boxvL\\\":\\\"╡\\\",\\\"boxVl\\\":\\\"╢\\\",\\\"boxVL\\\":\\\"╣\\\",\\\"boxvr\\\":\\\"├\\\",\\\"boxvR\\\":\\\"╞\\\",\\\"boxVr\\\":\\\"╟\\\",\\\"boxVR\\\":\\\"╠\\\",\\\"bprime\\\":\\\"‵\\\",\\\"breve\\\":\\\"˘\\\",\\\"Breve\\\":\\\"˘\\\",\\\"brvbar\\\":\\\"¦\\\",\\\"bscr\\\":\\\"𝒷\\\",\\\"Bscr\\\":\\\"ℬ\\\",\\\"bsemi\\\":\\\"⁏\\\",\\\"bsim\\\":\\\"∽\\\",\\\"bsime\\\":\\\"⋍\\\",\\\"bsolb\\\":\\\"⧅\\\",\\\"bsol\\\":\\\"\\\\\\\\\\\",\\\"bsolhsub\\\":\\\"⟈\\\",\\\"bull\\\":\\\"•\\\",\\\"bullet\\\":\\\"•\\\",\\\"bump\\\":\\\"≎\\\",\\\"bumpE\\\":\\\"⪮\\\",\\\"bumpe\\\":\\\"≏\\\",\\\"Bumpeq\\\":\\\"≎\\\",\\\"bumpeq\\\":\\\"≏\\\",\\\"Cacute\\\":\\\"Ć\\\",\\\"cacute\\\":\\\"ć\\\",\\\"capand\\\":\\\"⩄\\\",\\\"capbrcup\\\":\\\"⩉\\\",\\\"capcap\\\":\\\"⩋\\\",\\\"cap\\\":\\\"∩\\\",\\\"Cap\\\":\\\"⋒\\\",\\\"capcup\\\":\\\"⩇\\\",\\\"capdot\\\":\\\"⩀\\\",\\\"CapitalDifferentialD\\\":\\\"ⅅ\\\",\\\"caps\\\":\\\"∩︀\\\",\\\"caret\\\":\\\"⁁\\\",\\\"caron\\\":\\\"ˇ\\\",\\\"Cayleys\\\":\\\"ℭ\\\",\\\"ccaps\\\":\\\"⩍\\\",\\\"Ccaron\\\":\\\"Č\\\",\\\"ccaron\\\":\\\"č\\\",\\\"Ccedil\\\":\\\"Ç\\\",\\\"ccedil\\\":\\\"ç\\\",\\\"Ccirc\\\":\\\"Ĉ\\\",\\\"ccirc\\\":\\\"ĉ\\\",\\\"Cconint\\\":\\\"∰\\\",\\\"ccups\\\":\\\"⩌\\\",\\\"ccupssm\\\":\\\"⩐\\\",\\\"Cdot\\\":\\\"Ċ\\\",\\\"cdot\\\":\\\"ċ\\\",\\\"cedil\\\":\\\"¸\\\",\\\"Cedilla\\\":\\\"¸\\\",\\\"cemptyv\\\":\\\"⦲\\\",\\\"cent\\\":\\\"¢\\\",\\\"centerdot\\\":\\\"·\\\",\\\"CenterDot\\\":\\\"·\\\",\\\"cfr\\\":\\\"𝔠\\\",\\\"Cfr\\\":\\\"ℭ\\\",\\\"CHcy\\\":\\\"Ч\\\",\\\"chcy\\\":\\\"ч\\\",\\\"check\\\":\\\"✓\\\",\\\"checkmark\\\":\\\"✓\\\",\\\"Chi\\\":\\\"Χ\\\",\\\"chi\\\":\\\"χ\\\",\\\"circ\\\":\\\"ˆ\\\",\\\"circeq\\\":\\\"≗\\\",\\\"circlearrowleft\\\":\\\"↺\\\",\\\"circlearrowright\\\":\\\"↻\\\",\\\"circledast\\\":\\\"⊛\\\",\\\"circledcirc\\\":\\\"⊚\\\",\\\"circleddash\\\":\\\"⊝\\\",\\\"CircleDot\\\":\\\"⊙\\\",\\\"circledR\\\":\\\"®\\\",\\\"circledS\\\":\\\"Ⓢ\\\",\\\"CircleMinus\\\":\\\"⊖\\\",\\\"CirclePlus\\\":\\\"⊕\\\",\\\"CircleTimes\\\":\\\"⊗\\\",\\\"cir\\\":\\\"○\\\",\\\"cirE\\\":\\\"⧃\\\",\\\"cire\\\":\\\"≗\\\",\\\"cirfnint\\\":\\\"⨐\\\",\\\"cirmid\\\":\\\"⫯\\\",\\\"cirscir\\\":\\\"⧂\\\",\\\"ClockwiseContourIntegral\\\":\\\"∲\\\",\\\"CloseCurlyDoubleQuote\\\":\\\"”\\\",\\\"CloseCurlyQuote\\\":\\\"’\\\",\\\"clubs\\\":\\\"♣\\\",\\\"clubsuit\\\":\\\"♣\\\",\\\"colon\\\":\\\":\\\",\\\"Colon\\\":\\\"∷\\\",\\\"Colone\\\":\\\"⩴\\\",\\\"colone\\\":\\\"≔\\\",\\\"coloneq\\\":\\\"≔\\\",\\\"comma\\\":\\\",\\\",\\\"commat\\\":\\\"@\\\",\\\"comp\\\":\\\"∁\\\",\\\"compfn\\\":\\\"∘\\\",\\\"complement\\\":\\\"∁\\\",\\\"complexes\\\":\\\"ℂ\\\",\\\"cong\\\":\\\"≅\\\",\\\"congdot\\\":\\\"⩭\\\",\\\"Congruent\\\":\\\"≡\\\",\\\"conint\\\":\\\"∮\\\",\\\"Conint\\\":\\\"∯\\\",\\\"ContourIntegral\\\":\\\"∮\\\",\\\"copf\\\":\\\"𝕔\\\",\\\"Copf\\\":\\\"ℂ\\\",\\\"coprod\\\":\\\"∐\\\",\\\"Coproduct\\\":\\\"∐\\\",\\\"copy\\\":\\\"©\\\",\\\"COPY\\\":\\\"©\\\",\\\"copysr\\\":\\\"℗\\\",\\\"CounterClockwiseContourIntegral\\\":\\\"∳\\\",\\\"crarr\\\":\\\"↵\\\",\\\"cross\\\":\\\"✗\\\",\\\"Cross\\\":\\\"⨯\\\",\\\"Cscr\\\":\\\"𝒞\\\",\\\"cscr\\\":\\\"𝒸\\\",\\\"csub\\\":\\\"⫏\\\",\\\"csube\\\":\\\"⫑\\\",\\\"csup\\\":\\\"⫐\\\",\\\"csupe\\\":\\\"⫒\\\",\\\"ctdot\\\":\\\"⋯\\\",\\\"cudarrl\\\":\\\"⤸\\\",\\\"cudarrr\\\":\\\"⤵\\\",\\\"cuepr\\\":\\\"⋞\\\",\\\"cuesc\\\":\\\"⋟\\\",\\\"cularr\\\":\\\"↶\\\",\\\"cularrp\\\":\\\"⤽\\\",\\\"cupbrcap\\\":\\\"⩈\\\",\\\"cupcap\\\":\\\"⩆\\\",\\\"CupCap\\\":\\\"≍\\\",\\\"cup\\\":\\\"∪\\\",\\\"Cup\\\":\\\"⋓\\\",\\\"cupcup\\\":\\\"⩊\\\",\\\"cupdot\\\":\\\"⊍\\\",\\\"cupor\\\":\\\"⩅\\\",\\\"cups\\\":\\\"∪︀\\\",\\\"curarr\\\":\\\"↷\\\",\\\"curarrm\\\":\\\"⤼\\\",\\\"curlyeqprec\\\":\\\"⋞\\\",\\\"curlyeqsucc\\\":\\\"⋟\\\",\\\"curlyvee\\\":\\\"⋎\\\",\\\"curlywedge\\\":\\\"⋏\\\",\\\"curren\\\":\\\"¤\\\",\\\"curvearrowleft\\\":\\\"↶\\\",\\\"curvearrowright\\\":\\\"↷\\\",\\\"cuvee\\\":\\\"⋎\\\",\\\"cuwed\\\":\\\"⋏\\\",\\\"cwconint\\\":\\\"∲\\\",\\\"cwint\\\":\\\"∱\\\",\\\"cylcty\\\":\\\"⌭\\\",\\\"dagger\\\":\\\"†\\\",\\\"Dagger\\\":\\\"‡\\\",\\\"daleth\\\":\\\"ℸ\\\",\\\"darr\\\":\\\"↓\\\",\\\"Darr\\\":\\\"↡\\\",\\\"dArr\\\":\\\"⇓\\\",\\\"dash\\\":\\\"‐\\\",\\\"Dashv\\\":\\\"⫤\\\",\\\"dashv\\\":\\\"⊣\\\",\\\"dbkarow\\\":\\\"⤏\\\",\\\"dblac\\\":\\\"˝\\\",\\\"Dcaron\\\":\\\"Ď\\\",\\\"dcaron\\\":\\\"ď\\\",\\\"Dcy\\\":\\\"Д\\\",\\\"dcy\\\":\\\"д\\\",\\\"ddagger\\\":\\\"‡\\\",\\\"ddarr\\\":\\\"⇊\\\",\\\"DD\\\":\\\"ⅅ\\\",\\\"dd\\\":\\\"ⅆ\\\",\\\"DDotrahd\\\":\\\"⤑\\\",\\\"ddotseq\\\":\\\"⩷\\\",\\\"deg\\\":\\\"°\\\",\\\"Del\\\":\\\"∇\\\",\\\"Delta\\\":\\\"Δ\\\",\\\"delta\\\":\\\"δ\\\",\\\"demptyv\\\":\\\"⦱\\\",\\\"dfisht\\\":\\\"⥿\\\",\\\"Dfr\\\":\\\"𝔇\\\",\\\"dfr\\\":\\\"𝔡\\\",\\\"dHar\\\":\\\"⥥\\\",\\\"dharl\\\":\\\"⇃\\\",\\\"dharr\\\":\\\"⇂\\\",\\\"DiacriticalAcute\\\":\\\"´\\\",\\\"DiacriticalDot\\\":\\\"˙\\\",\\\"DiacriticalDoubleAcute\\\":\\\"˝\\\",\\\"DiacriticalGrave\\\":\\\"`\\\",\\\"DiacriticalTilde\\\":\\\"˜\\\",\\\"diam\\\":\\\"⋄\\\",\\\"diamond\\\":\\\"⋄\\\",\\\"Diamond\\\":\\\"⋄\\\",\\\"diamondsuit\\\":\\\"♦\\\",\\\"diams\\\":\\\"♦\\\",\\\"die\\\":\\\"¨\\\",\\\"DifferentialD\\\":\\\"ⅆ\\\",\\\"digamma\\\":\\\"ϝ\\\",\\\"disin\\\":\\\"⋲\\\",\\\"div\\\":\\\"÷\\\",\\\"divide\\\":\\\"÷\\\",\\\"divideontimes\\\":\\\"⋇\\\",\\\"divonx\\\":\\\"⋇\\\",\\\"DJcy\\\":\\\"Ђ\\\",\\\"djcy\\\":\\\"ђ\\\",\\\"dlcorn\\\":\\\"⌞\\\",\\\"dlcrop\\\":\\\"⌍\\\",\\\"dollar\\\":\\\"$\\\",\\\"Dopf\\\":\\\"𝔻\\\",\\\"dopf\\\":\\\"𝕕\\\",\\\"Dot\\\":\\\"¨\\\",\\\"dot\\\":\\\"˙\\\",\\\"DotDot\\\":\\\"⃜\\\",\\\"doteq\\\":\\\"≐\\\",\\\"doteqdot\\\":\\\"≑\\\",\\\"DotEqual\\\":\\\"≐\\\",\\\"dotminus\\\":\\\"∸\\\",\\\"dotplus\\\":\\\"∔\\\",\\\"dotsquare\\\":\\\"⊡\\\",\\\"doublebarwedge\\\":\\\"⌆\\\",\\\"DoubleContourIntegral\\\":\\\"∯\\\",\\\"DoubleDot\\\":\\\"¨\\\",\\\"DoubleDownArrow\\\":\\\"⇓\\\",\\\"DoubleLeftArrow\\\":\\\"⇐\\\",\\\"DoubleLeftRightArrow\\\":\\\"⇔\\\",\\\"DoubleLeftTee\\\":\\\"⫤\\\",\\\"DoubleLongLeftArrow\\\":\\\"⟸\\\",\\\"DoubleLongLeftRightArrow\\\":\\\"⟺\\\",\\\"DoubleLongRightArrow\\\":\\\"⟹\\\",\\\"DoubleRightArrow\\\":\\\"⇒\\\",\\\"DoubleRightTee\\\":\\\"⊨\\\",\\\"DoubleUpArrow\\\":\\\"⇑\\\",\\\"DoubleUpDownArrow\\\":\\\"⇕\\\",\\\"DoubleVerticalBar\\\":\\\"∥\\\",\\\"DownArrowBar\\\":\\\"⤓\\\",\\\"downarrow\\\":\\\"↓\\\",\\\"DownArrow\\\":\\\"↓\\\",\\\"Downarrow\\\":\\\"⇓\\\",\\\"DownArrowUpArrow\\\":\\\"⇵\\\",\\\"DownBreve\\\":\\\"̑\\\",\\\"downdownarrows\\\":\\\"⇊\\\",\\\"downharpoonleft\\\":\\\"⇃\\\",\\\"downharpoonright\\\":\\\"⇂\\\",\\\"DownLeftRightVector\\\":\\\"⥐\\\",\\\"DownLeftTeeVector\\\":\\\"⥞\\\",\\\"DownLeftVectorBar\\\":\\\"⥖\\\",\\\"DownLeftVector\\\":\\\"↽\\\",\\\"DownRightTeeVector\\\":\\\"⥟\\\",\\\"DownRightVectorBar\\\":\\\"⥗\\\",\\\"DownRightVector\\\":\\\"⇁\\\",\\\"DownTeeArrow\\\":\\\"↧\\\",\\\"DownTee\\\":\\\"⊤\\\",\\\"drbkarow\\\":\\\"⤐\\\",\\\"drcorn\\\":\\\"⌟\\\",\\\"drcrop\\\":\\\"⌌\\\",\\\"Dscr\\\":\\\"𝒟\\\",\\\"dscr\\\":\\\"𝒹\\\",\\\"DScy\\\":\\\"Ѕ\\\",\\\"dscy\\\":\\\"ѕ\\\",\\\"dsol\\\":\\\"⧶\\\",\\\"Dstrok\\\":\\\"Đ\\\",\\\"dstrok\\\":\\\"đ\\\",\\\"dtdot\\\":\\\"⋱\\\",\\\"dtri\\\":\\\"▿\\\",\\\"dtrif\\\":\\\"▾\\\",\\\"duarr\\\":\\\"⇵\\\",\\\"duhar\\\":\\\"⥯\\\",\\\"dwangle\\\":\\\"⦦\\\",\\\"DZcy\\\":\\\"Џ\\\",\\\"dzcy\\\":\\\"џ\\\",\\\"dzigrarr\\\":\\\"⟿\\\",\\\"Eacute\\\":\\\"É\\\",\\\"eacute\\\":\\\"é\\\",\\\"easter\\\":\\\"⩮\\\",\\\"Ecaron\\\":\\\"Ě\\\",\\\"ecaron\\\":\\\"ě\\\",\\\"Ecirc\\\":\\\"Ê\\\",\\\"ecirc\\\":\\\"ê\\\",\\\"ecir\\\":\\\"≖\\\",\\\"ecolon\\\":\\\"≕\\\",\\\"Ecy\\\":\\\"Э\\\",\\\"ecy\\\":\\\"э\\\",\\\"eDDot\\\":\\\"⩷\\\",\\\"Edot\\\":\\\"Ė\\\",\\\"edot\\\":\\\"ė\\\",\\\"eDot\\\":\\\"≑\\\",\\\"ee\\\":\\\"ⅇ\\\",\\\"efDot\\\":\\\"≒\\\",\\\"Efr\\\":\\\"𝔈\\\",\\\"efr\\\":\\\"𝔢\\\",\\\"eg\\\":\\\"⪚\\\",\\\"Egrave\\\":\\\"È\\\",\\\"egrave\\\":\\\"è\\\",\\\"egs\\\":\\\"⪖\\\",\\\"egsdot\\\":\\\"⪘\\\",\\\"el\\\":\\\"⪙\\\",\\\"Element\\\":\\\"∈\\\",\\\"elinters\\\":\\\"⏧\\\",\\\"ell\\\":\\\"ℓ\\\",\\\"els\\\":\\\"⪕\\\",\\\"elsdot\\\":\\\"⪗\\\",\\\"Emacr\\\":\\\"Ē\\\",\\\"emacr\\\":\\\"ē\\\",\\\"empty\\\":\\\"∅\\\",\\\"emptyset\\\":\\\"∅\\\",\\\"EmptySmallSquare\\\":\\\"◻\\\",\\\"emptyv\\\":\\\"∅\\\",\\\"EmptyVerySmallSquare\\\":\\\"▫\\\",\\\"emsp13\\\":\\\" \\\",\\\"emsp14\\\":\\\" \\\",\\\"emsp\\\":\\\" \\\",\\\"ENG\\\":\\\"Ŋ\\\",\\\"eng\\\":\\\"ŋ\\\",\\\"ensp\\\":\\\" \\\",\\\"Eogon\\\":\\\"Ę\\\",\\\"eogon\\\":\\\"ę\\\",\\\"Eopf\\\":\\\"𝔼\\\",\\\"eopf\\\":\\\"𝕖\\\",\\\"epar\\\":\\\"⋕\\\",\\\"eparsl\\\":\\\"⧣\\\",\\\"eplus\\\":\\\"⩱\\\",\\\"epsi\\\":\\\"ε\\\",\\\"Epsilon\\\":\\\"Ε\\\",\\\"epsilon\\\":\\\"ε\\\",\\\"epsiv\\\":\\\"ϵ\\\",\\\"eqcirc\\\":\\\"≖\\\",\\\"eqcolon\\\":\\\"≕\\\",\\\"eqsim\\\":\\\"≂\\\",\\\"eqslantgtr\\\":\\\"⪖\\\",\\\"eqslantless\\\":\\\"⪕\\\",\\\"Equal\\\":\\\"⩵\\\",\\\"equals\\\":\\\"=\\\",\\\"EqualTilde\\\":\\\"≂\\\",\\\"equest\\\":\\\"≟\\\",\\\"Equilibrium\\\":\\\"⇌\\\",\\\"equiv\\\":\\\"≡\\\",\\\"equivDD\\\":\\\"⩸\\\",\\\"eqvparsl\\\":\\\"⧥\\\",\\\"erarr\\\":\\\"⥱\\\",\\\"erDot\\\":\\\"≓\\\",\\\"escr\\\":\\\"ℯ\\\",\\\"Escr\\\":\\\"ℰ\\\",\\\"esdot\\\":\\\"≐\\\",\\\"Esim\\\":\\\"⩳\\\",\\\"esim\\\":\\\"≂\\\",\\\"Eta\\\":\\\"Η\\\",\\\"eta\\\":\\\"η\\\",\\\"ETH\\\":\\\"Ð\\\",\\\"eth\\\":\\\"ð\\\",\\\"Euml\\\":\\\"Ë\\\",\\\"euml\\\":\\\"ë\\\",\\\"euro\\\":\\\"€\\\",\\\"excl\\\":\\\"!\\\",\\\"exist\\\":\\\"∃\\\",\\\"Exists\\\":\\\"∃\\\",\\\"expectation\\\":\\\"ℰ\\\",\\\"exponentiale\\\":\\\"ⅇ\\\",\\\"ExponentialE\\\":\\\"ⅇ\\\",\\\"fallingdotseq\\\":\\\"≒\\\",\\\"Fcy\\\":\\\"Ф\\\",\\\"fcy\\\":\\\"ф\\\",\\\"female\\\":\\\"♀\\\",\\\"ffilig\\\":\\\"ﬃ\\\",\\\"fflig\\\":\\\"ﬀ\\\",\\\"ffllig\\\":\\\"ﬄ\\\",\\\"Ffr\\\":\\\"𝔉\\\",\\\"ffr\\\":\\\"𝔣\\\",\\\"filig\\\":\\\"ﬁ\\\",\\\"FilledSmallSquare\\\":\\\"◼\\\",\\\"FilledVerySmallSquare\\\":\\\"▪\\\",\\\"fjlig\\\":\\\"fj\\\",\\\"flat\\\":\\\"♭\\\",\\\"fllig\\\":\\\"ﬂ\\\",\\\"fltns\\\":\\\"▱\\\",\\\"fnof\\\":\\\"ƒ\\\",\\\"Fopf\\\":\\\"𝔽\\\",\\\"fopf\\\":\\\"𝕗\\\",\\\"forall\\\":\\\"∀\\\",\\\"ForAll\\\":\\\"∀\\\",\\\"fork\\\":\\\"⋔\\\",\\\"forkv\\\":\\\"⫙\\\",\\\"Fouriertrf\\\":\\\"ℱ\\\",\\\"fpartint\\\":\\\"⨍\\\",\\\"frac12\\\":\\\"½\\\",\\\"frac13\\\":\\\"⅓\\\",\\\"frac14\\\":\\\"¼\\\",\\\"frac15\\\":\\\"⅕\\\",\\\"frac16\\\":\\\"⅙\\\",\\\"frac18\\\":\\\"⅛\\\",\\\"frac23\\\":\\\"⅔\\\",\\\"frac25\\\":\\\"⅖\\\",\\\"frac34\\\":\\\"¾\\\",\\\"frac35\\\":\\\"⅗\\\",\\\"frac38\\\":\\\"⅜\\\",\\\"frac45\\\":\\\"⅘\\\",\\\"frac56\\\":\\\"⅚\\\",\\\"frac58\\\":\\\"⅝\\\",\\\"frac78\\\":\\\"⅞\\\",\\\"frasl\\\":\\\"⁄\\\",\\\"frown\\\":\\\"⌢\\\",\\\"fscr\\\":\\\"𝒻\\\",\\\"Fscr\\\":\\\"ℱ\\\",\\\"gacute\\\":\\\"ǵ\\\",\\\"Gamma\\\":\\\"Γ\\\",\\\"gamma\\\":\\\"γ\\\",\\\"Gammad\\\":\\\"Ϝ\\\",\\\"gammad\\\":\\\"ϝ\\\",\\\"gap\\\":\\\"⪆\\\",\\\"Gbreve\\\":\\\"Ğ\\\",\\\"gbreve\\\":\\\"ğ\\\",\\\"Gcedil\\\":\\\"Ģ\\\",\\\"Gcirc\\\":\\\"Ĝ\\\",\\\"gcirc\\\":\\\"ĝ\\\",\\\"Gcy\\\":\\\"Г\\\",\\\"gcy\\\":\\\"г\\\",\\\"Gdot\\\":\\\"Ġ\\\",\\\"gdot\\\":\\\"ġ\\\",\\\"ge\\\":\\\"≥\\\",\\\"gE\\\":\\\"≧\\\",\\\"gEl\\\":\\\"⪌\\\",\\\"gel\\\":\\\"⋛\\\",\\\"geq\\\":\\\"≥\\\",\\\"geqq\\\":\\\"≧\\\",\\\"geqslant\\\":\\\"⩾\\\",\\\"gescc\\\":\\\"⪩\\\",\\\"ges\\\":\\\"⩾\\\",\\\"gesdot\\\":\\\"⪀\\\",\\\"gesdoto\\\":\\\"⪂\\\",\\\"gesdotol\\\":\\\"⪄\\\",\\\"gesl\\\":\\\"⋛︀\\\",\\\"gesles\\\":\\\"⪔\\\",\\\"Gfr\\\":\\\"𝔊\\\",\\\"gfr\\\":\\\"𝔤\\\",\\\"gg\\\":\\\"≫\\\",\\\"Gg\\\":\\\"⋙\\\",\\\"ggg\\\":\\\"⋙\\\",\\\"gimel\\\":\\\"ℷ\\\",\\\"GJcy\\\":\\\"Ѓ\\\",\\\"gjcy\\\":\\\"ѓ\\\",\\\"gla\\\":\\\"⪥\\\",\\\"gl\\\":\\\"≷\\\",\\\"glE\\\":\\\"⪒\\\",\\\"glj\\\":\\\"⪤\\\",\\\"gnap\\\":\\\"⪊\\\",\\\"gnapprox\\\":\\\"⪊\\\",\\\"gne\\\":\\\"⪈\\\",\\\"gnE\\\":\\\"≩\\\",\\\"gneq\\\":\\\"⪈\\\",\\\"gneqq\\\":\\\"≩\\\",\\\"gnsim\\\":\\\"⋧\\\",\\\"Gopf\\\":\\\"𝔾\\\",\\\"gopf\\\":\\\"𝕘\\\",\\\"grave\\\":\\\"`\\\",\\\"GreaterEqual\\\":\\\"≥\\\",\\\"GreaterEqualLess\\\":\\\"⋛\\\",\\\"GreaterFullEqual\\\":\\\"≧\\\",\\\"GreaterGreater\\\":\\\"⪢\\\",\\\"GreaterLess\\\":\\\"≷\\\",\\\"GreaterSlantEqual\\\":\\\"⩾\\\",\\\"GreaterTilde\\\":\\\"≳\\\",\\\"Gscr\\\":\\\"𝒢\\\",\\\"gscr\\\":\\\"ℊ\\\",\\\"gsim\\\":\\\"≳\\\",\\\"gsime\\\":\\\"⪎\\\",\\\"gsiml\\\":\\\"⪐\\\",\\\"gtcc\\\":\\\"⪧\\\",\\\"gtcir\\\":\\\"⩺\\\",\\\"gt\\\":\\\">\\\",\\\"GT\\\":\\\">\\\",\\\"Gt\\\":\\\"≫\\\",\\\"gtdot\\\":\\\"⋗\\\",\\\"gtlPar\\\":\\\"⦕\\\",\\\"gtquest\\\":\\\"⩼\\\",\\\"gtrapprox\\\":\\\"⪆\\\",\\\"gtrarr\\\":\\\"⥸\\\",\\\"gtrdot\\\":\\\"⋗\\\",\\\"gtreqless\\\":\\\"⋛\\\",\\\"gtreqqless\\\":\\\"⪌\\\",\\\"gtrless\\\":\\\"≷\\\",\\\"gtrsim\\\":\\\"≳\\\",\\\"gvertneqq\\\":\\\"≩︀\\\",\\\"gvnE\\\":\\\"≩︀\\\",\\\"Hacek\\\":\\\"ˇ\\\",\\\"hairsp\\\":\\\" \\\",\\\"half\\\":\\\"½\\\",\\\"hamilt\\\":\\\"ℋ\\\",\\\"HARDcy\\\":\\\"Ъ\\\",\\\"hardcy\\\":\\\"ъ\\\",\\\"harrcir\\\":\\\"⥈\\\",\\\"harr\\\":\\\"↔\\\",\\\"hArr\\\":\\\"⇔\\\",\\\"harrw\\\":\\\"↭\\\",\\\"Hat\\\":\\\"^\\\",\\\"hbar\\\":\\\"ℏ\\\",\\\"Hcirc\\\":\\\"Ĥ\\\",\\\"hcirc\\\":\\\"ĥ\\\",\\\"hearts\\\":\\\"♥\\\",\\\"heartsuit\\\":\\\"♥\\\",\\\"hellip\\\":\\\"…\\\",\\\"hercon\\\":\\\"⊹\\\",\\\"hfr\\\":\\\"𝔥\\\",\\\"Hfr\\\":\\\"ℌ\\\",\\\"HilbertSpace\\\":\\\"ℋ\\\",\\\"hksearow\\\":\\\"⤥\\\",\\\"hkswarow\\\":\\\"⤦\\\",\\\"hoarr\\\":\\\"⇿\\\",\\\"homtht\\\":\\\"∻\\\",\\\"hookleftarrow\\\":\\\"↩\\\",\\\"hookrightarrow\\\":\\\"↪\\\",\\\"hopf\\\":\\\"𝕙\\\",\\\"Hopf\\\":\\\"ℍ\\\",\\\"horbar\\\":\\\"―\\\",\\\"HorizontalLine\\\":\\\"─\\\",\\\"hscr\\\":\\\"𝒽\\\",\\\"Hscr\\\":\\\"ℋ\\\",\\\"hslash\\\":\\\"ℏ\\\",\\\"Hstrok\\\":\\\"Ħ\\\",\\\"hstrok\\\":\\\"ħ\\\",\\\"HumpDownHump\\\":\\\"≎\\\",\\\"HumpEqual\\\":\\\"≏\\\",\\\"hybull\\\":\\\"⁃\\\",\\\"hyphen\\\":\\\"‐\\\",\\\"Iacute\\\":\\\"Í\\\",\\\"iacute\\\":\\\"í\\\",\\\"ic\\\":\\\"⁣\\\",\\\"Icirc\\\":\\\"Î\\\",\\\"icirc\\\":\\\"î\\\",\\\"Icy\\\":\\\"И\\\",\\\"icy\\\":\\\"и\\\",\\\"Idot\\\":\\\"İ\\\",\\\"IEcy\\\":\\\"Е\\\",\\\"iecy\\\":\\\"е\\\",\\\"iexcl\\\":\\\"¡\\\",\\\"iff\\\":\\\"⇔\\\",\\\"ifr\\\":\\\"𝔦\\\",\\\"Ifr\\\":\\\"ℑ\\\",\\\"Igrave\\\":\\\"Ì\\\",\\\"igrave\\\":\\\"ì\\\",\\\"ii\\\":\\\"ⅈ\\\",\\\"iiiint\\\":\\\"⨌\\\",\\\"iiint\\\":\\\"∭\\\",\\\"iinfin\\\":\\\"⧜\\\",\\\"iiota\\\":\\\"℩\\\",\\\"IJlig\\\":\\\"Ĳ\\\",\\\"ijlig\\\":\\\"ĳ\\\",\\\"Imacr\\\":\\\"Ī\\\",\\\"imacr\\\":\\\"ī\\\",\\\"image\\\":\\\"ℑ\\\",\\\"ImaginaryI\\\":\\\"ⅈ\\\",\\\"imagline\\\":\\\"ℐ\\\",\\\"imagpart\\\":\\\"ℑ\\\",\\\"imath\\\":\\\"ı\\\",\\\"Im\\\":\\\"ℑ\\\",\\\"imof\\\":\\\"⊷\\\",\\\"imped\\\":\\\"Ƶ\\\",\\\"Implies\\\":\\\"⇒\\\",\\\"incare\\\":\\\"℅\\\",\\\"in\\\":\\\"∈\\\",\\\"infin\\\":\\\"∞\\\",\\\"infintie\\\":\\\"⧝\\\",\\\"inodot\\\":\\\"ı\\\",\\\"intcal\\\":\\\"⊺\\\",\\\"int\\\":\\\"∫\\\",\\\"Int\\\":\\\"∬\\\",\\\"integers\\\":\\\"ℤ\\\",\\\"Integral\\\":\\\"∫\\\",\\\"intercal\\\":\\\"⊺\\\",\\\"Intersection\\\":\\\"⋂\\\",\\\"intlarhk\\\":\\\"⨗\\\",\\\"intprod\\\":\\\"⨼\\\",\\\"InvisibleComma\\\":\\\"⁣\\\",\\\"InvisibleTimes\\\":\\\"⁢\\\",\\\"IOcy\\\":\\\"Ё\\\",\\\"iocy\\\":\\\"ё\\\",\\\"Iogon\\\":\\\"Į\\\",\\\"iogon\\\":\\\"į\\\",\\\"Iopf\\\":\\\"𝕀\\\",\\\"iopf\\\":\\\"𝕚\\\",\\\"Iota\\\":\\\"Ι\\\",\\\"iota\\\":\\\"ι\\\",\\\"iprod\\\":\\\"⨼\\\",\\\"iquest\\\":\\\"¿\\\",\\\"iscr\\\":\\\"𝒾\\\",\\\"Iscr\\\":\\\"ℐ\\\",\\\"isin\\\":\\\"∈\\\",\\\"isindot\\\":\\\"⋵\\\",\\\"isinE\\\":\\\"⋹\\\",\\\"isins\\\":\\\"⋴\\\",\\\"isinsv\\\":\\\"⋳\\\",\\\"isinv\\\":\\\"∈\\\",\\\"it\\\":\\\"⁢\\\",\\\"Itilde\\\":\\\"Ĩ\\\",\\\"itilde\\\":\\\"ĩ\\\",\\\"Iukcy\\\":\\\"І\\\",\\\"iukcy\\\":\\\"і\\\",\\\"Iuml\\\":\\\"Ï\\\",\\\"iuml\\\":\\\"ï\\\",\\\"Jcirc\\\":\\\"Ĵ\\\",\\\"jcirc\\\":\\\"ĵ\\\",\\\"Jcy\\\":\\\"Й\\\",\\\"jcy\\\":\\\"й\\\",\\\"Jfr\\\":\\\"𝔍\\\",\\\"jfr\\\":\\\"𝔧\\\",\\\"jmath\\\":\\\"ȷ\\\",\\\"Jopf\\\":\\\"𝕁\\\",\\\"jopf\\\":\\\"𝕛\\\",\\\"Jscr\\\":\\\"𝒥\\\",\\\"jscr\\\":\\\"𝒿\\\",\\\"Jsercy\\\":\\\"Ј\\\",\\\"jsercy\\\":\\\"ј\\\",\\\"Jukcy\\\":\\\"Є\\\",\\\"jukcy\\\":\\\"є\\\",\\\"Kappa\\\":\\\"Κ\\\",\\\"kappa\\\":\\\"κ\\\",\\\"kappav\\\":\\\"ϰ\\\",\\\"Kcedil\\\":\\\"Ķ\\\",\\\"kcedil\\\":\\\"ķ\\\",\\\"Kcy\\\":\\\"К\\\",\\\"kcy\\\":\\\"к\\\",\\\"Kfr\\\":\\\"𝔎\\\",\\\"kfr\\\":\\\"𝔨\\\",\\\"kgreen\\\":\\\"ĸ\\\",\\\"KHcy\\\":\\\"Х\\\",\\\"khcy\\\":\\\"х\\\",\\\"KJcy\\\":\\\"Ќ\\\",\\\"kjcy\\\":\\\"ќ\\\",\\\"Kopf\\\":\\\"𝕂\\\",\\\"kopf\\\":\\\"𝕜\\\",\\\"Kscr\\\":\\\"𝒦\\\",\\\"kscr\\\":\\\"𝓀\\\",\\\"lAarr\\\":\\\"⇚\\\",\\\"Lacute\\\":\\\"Ĺ\\\",\\\"lacute\\\":\\\"ĺ\\\",\\\"laemptyv\\\":\\\"⦴\\\",\\\"lagran\\\":\\\"ℒ\\\",\\\"Lambda\\\":\\\"Λ\\\",\\\"lambda\\\":\\\"λ\\\",\\\"lang\\\":\\\"⟨\\\",\\\"Lang\\\":\\\"⟪\\\",\\\"langd\\\":\\\"⦑\\\",\\\"langle\\\":\\\"⟨\\\",\\\"lap\\\":\\\"⪅\\\",\\\"Laplacetrf\\\":\\\"ℒ\\\",\\\"laquo\\\":\\\"«\\\",\\\"larrb\\\":\\\"⇤\\\",\\\"larrbfs\\\":\\\"⤟\\\",\\\"larr\\\":\\\"←\\\",\\\"Larr\\\":\\\"↞\\\",\\\"lArr\\\":\\\"⇐\\\",\\\"larrfs\\\":\\\"⤝\\\",\\\"larrhk\\\":\\\"↩\\\",\\\"larrlp\\\":\\\"↫\\\",\\\"larrpl\\\":\\\"⤹\\\",\\\"larrsim\\\":\\\"⥳\\\",\\\"larrtl\\\":\\\"↢\\\",\\\"latail\\\":\\\"⤙\\\",\\\"lAtail\\\":\\\"⤛\\\",\\\"lat\\\":\\\"⪫\\\",\\\"late\\\":\\\"⪭\\\",\\\"lates\\\":\\\"⪭︀\\\",\\\"lbarr\\\":\\\"⤌\\\",\\\"lBarr\\\":\\\"⤎\\\",\\\"lbbrk\\\":\\\"❲\\\",\\\"lbrace\\\":\\\"{\\\",\\\"lbrack\\\":\\\"[\\\",\\\"lbrke\\\":\\\"⦋\\\",\\\"lbrksld\\\":\\\"⦏\\\",\\\"lbrkslu\\\":\\\"⦍\\\",\\\"Lcaron\\\":\\\"Ľ\\\",\\\"lcaron\\\":\\\"ľ\\\",\\\"Lcedil\\\":\\\"Ļ\\\",\\\"lcedil\\\":\\\"ļ\\\",\\\"lceil\\\":\\\"⌈\\\",\\\"lcub\\\":\\\"{\\\",\\\"Lcy\\\":\\\"Л\\\",\\\"lcy\\\":\\\"л\\\",\\\"ldca\\\":\\\"⤶\\\",\\\"ldquo\\\":\\\"“\\\",\\\"ldquor\\\":\\\"„\\\",\\\"ldrdhar\\\":\\\"⥧\\\",\\\"ldrushar\\\":\\\"⥋\\\",\\\"ldsh\\\":\\\"↲\\\",\\\"le\\\":\\\"≤\\\",\\\"lE\\\":\\\"≦\\\",\\\"LeftAngleBracket\\\":\\\"⟨\\\",\\\"LeftArrowBar\\\":\\\"⇤\\\",\\\"leftarrow\\\":\\\"←\\\",\\\"LeftArrow\\\":\\\"←\\\",\\\"Leftarrow\\\":\\\"⇐\\\",\\\"LeftArrowRightArrow\\\":\\\"⇆\\\",\\\"leftarrowtail\\\":\\\"↢\\\",\\\"LeftCeiling\\\":\\\"⌈\\\",\\\"LeftDoubleBracket\\\":\\\"⟦\\\",\\\"LeftDownTeeVector\\\":\\\"⥡\\\",\\\"LeftDownVectorBar\\\":\\\"⥙\\\",\\\"LeftDownVector\\\":\\\"⇃\\\",\\\"LeftFloor\\\":\\\"⌊\\\",\\\"leftharpoondown\\\":\\\"↽\\\",\\\"leftharpoonup\\\":\\\"↼\\\",\\\"leftleftarrows\\\":\\\"⇇\\\",\\\"leftrightarrow\\\":\\\"↔\\\",\\\"LeftRightArrow\\\":\\\"↔\\\",\\\"Leftrightarrow\\\":\\\"⇔\\\",\\\"leftrightarrows\\\":\\\"⇆\\\",\\\"leftrightharpoons\\\":\\\"⇋\\\",\\\"leftrightsquigarrow\\\":\\\"↭\\\",\\\"LeftRightVector\\\":\\\"⥎\\\",\\\"LeftTeeArrow\\\":\\\"↤\\\",\\\"LeftTee\\\":\\\"⊣\\\",\\\"LeftTeeVector\\\":\\\"⥚\\\",\\\"leftthreetimes\\\":\\\"⋋\\\",\\\"LeftTriangleBar\\\":\\\"⧏\\\",\\\"LeftTriangle\\\":\\\"⊲\\\",\\\"LeftTriangleEqual\\\":\\\"⊴\\\",\\\"LeftUpDownVector\\\":\\\"⥑\\\",\\\"LeftUpTeeVector\\\":\\\"⥠\\\",\\\"LeftUpVectorBar\\\":\\\"⥘\\\",\\\"LeftUpVector\\\":\\\"↿\\\",\\\"LeftVectorBar\\\":\\\"⥒\\\",\\\"LeftVector\\\":\\\"↼\\\",\\\"lEg\\\":\\\"⪋\\\",\\\"leg\\\":\\\"⋚\\\",\\\"leq\\\":\\\"≤\\\",\\\"leqq\\\":\\\"≦\\\",\\\"leqslant\\\":\\\"⩽\\\",\\\"lescc\\\":\\\"⪨\\\",\\\"les\\\":\\\"⩽\\\",\\\"lesdot\\\":\\\"⩿\\\",\\\"lesdoto\\\":\\\"⪁\\\",\\\"lesdotor\\\":\\\"⪃\\\",\\\"lesg\\\":\\\"⋚︀\\\",\\\"lesges\\\":\\\"⪓\\\",\\\"lessapprox\\\":\\\"⪅\\\",\\\"lessdot\\\":\\\"⋖\\\",\\\"lesseqgtr\\\":\\\"⋚\\\",\\\"lesseqqgtr\\\":\\\"⪋\\\",\\\"LessEqualGreater\\\":\\\"⋚\\\",\\\"LessFullEqual\\\":\\\"≦\\\",\\\"LessGreater\\\":\\\"≶\\\",\\\"lessgtr\\\":\\\"≶\\\",\\\"LessLess\\\":\\\"⪡\\\",\\\"lesssim\\\":\\\"≲\\\",\\\"LessSlantEqual\\\":\\\"⩽\\\",\\\"LessTilde\\\":\\\"≲\\\",\\\"lfisht\\\":\\\"⥼\\\",\\\"lfloor\\\":\\\"⌊\\\",\\\"Lfr\\\":\\\"𝔏\\\",\\\"lfr\\\":\\\"𝔩\\\",\\\"lg\\\":\\\"≶\\\",\\\"lgE\\\":\\\"⪑\\\",\\\"lHar\\\":\\\"⥢\\\",\\\"lhard\\\":\\\"↽\\\",\\\"lharu\\\":\\\"↼\\\",\\\"lharul\\\":\\\"⥪\\\",\\\"lhblk\\\":\\\"▄\\\",\\\"LJcy\\\":\\\"Љ\\\",\\\"ljcy\\\":\\\"љ\\\",\\\"llarr\\\":\\\"⇇\\\",\\\"ll\\\":\\\"≪\\\",\\\"Ll\\\":\\\"⋘\\\",\\\"llcorner\\\":\\\"⌞\\\",\\\"Lleftarrow\\\":\\\"⇚\\\",\\\"llhard\\\":\\\"⥫\\\",\\\"lltri\\\":\\\"◺\\\",\\\"Lmidot\\\":\\\"Ŀ\\\",\\\"lmidot\\\":\\\"ŀ\\\",\\\"lmoustache\\\":\\\"⎰\\\",\\\"lmoust\\\":\\\"⎰\\\",\\\"lnap\\\":\\\"⪉\\\",\\\"lnapprox\\\":\\\"⪉\\\",\\\"lne\\\":\\\"⪇\\\",\\\"lnE\\\":\\\"≨\\\",\\\"lneq\\\":\\\"⪇\\\",\\\"lneqq\\\":\\\"≨\\\",\\\"lnsim\\\":\\\"⋦\\\",\\\"loang\\\":\\\"⟬\\\",\\\"loarr\\\":\\\"⇽\\\",\\\"lobrk\\\":\\\"⟦\\\",\\\"longleftarrow\\\":\\\"⟵\\\",\\\"LongLeftArrow\\\":\\\"⟵\\\",\\\"Longleftarrow\\\":\\\"⟸\\\",\\\"longleftrightarrow\\\":\\\"⟷\\\",\\\"LongLeftRightArrow\\\":\\\"⟷\\\",\\\"Longleftrightarrow\\\":\\\"⟺\\\",\\\"longmapsto\\\":\\\"⟼\\\",\\\"longrightarrow\\\":\\\"⟶\\\",\\\"LongRightArrow\\\":\\\"⟶\\\",\\\"Longrightarrow\\\":\\\"⟹\\\",\\\"looparrowleft\\\":\\\"↫\\\",\\\"looparrowright\\\":\\\"↬\\\",\\\"lopar\\\":\\\"⦅\\\",\\\"Lopf\\\":\\\"𝕃\\\",\\\"lopf\\\":\\\"𝕝\\\",\\\"loplus\\\":\\\"⨭\\\",\\\"lotimes\\\":\\\"⨴\\\",\\\"lowast\\\":\\\"∗\\\",\\\"lowbar\\\":\\\"_\\\",\\\"LowerLeftArrow\\\":\\\"↙\\\",\\\"LowerRightArrow\\\":\\\"↘\\\",\\\"loz\\\":\\\"◊\\\",\\\"lozenge\\\":\\\"◊\\\",\\\"lozf\\\":\\\"⧫\\\",\\\"lpar\\\":\\\"(\\\",\\\"lparlt\\\":\\\"⦓\\\",\\\"lrarr\\\":\\\"⇆\\\",\\\"lrcorner\\\":\\\"⌟\\\",\\\"lrhar\\\":\\\"⇋\\\",\\\"lrhard\\\":\\\"⥭\\\",\\\"lrm\\\":\\\"‎\\\",\\\"lrtri\\\":\\\"⊿\\\",\\\"lsaquo\\\":\\\"‹\\\",\\\"lscr\\\":\\\"𝓁\\\",\\\"Lscr\\\":\\\"ℒ\\\",\\\"lsh\\\":\\\"↰\\\",\\\"Lsh\\\":\\\"↰\\\",\\\"lsim\\\":\\\"≲\\\",\\\"lsime\\\":\\\"⪍\\\",\\\"lsimg\\\":\\\"⪏\\\",\\\"lsqb\\\":\\\"[\\\",\\\"lsquo\\\":\\\"‘\\\",\\\"lsquor\\\":\\\"‚\\\",\\\"Lstrok\\\":\\\"Ł\\\",\\\"lstrok\\\":\\\"ł\\\",\\\"ltcc\\\":\\\"⪦\\\",\\\"ltcir\\\":\\\"⩹\\\",\\\"lt\\\":\\\"<\\\",\\\"LT\\\":\\\"<\\\",\\\"Lt\\\":\\\"≪\\\",\\\"ltdot\\\":\\\"⋖\\\",\\\"lthree\\\":\\\"⋋\\\",\\\"ltimes\\\":\\\"⋉\\\",\\\"ltlarr\\\":\\\"⥶\\\",\\\"ltquest\\\":\\\"⩻\\\",\\\"ltri\\\":\\\"◃\\\",\\\"ltrie\\\":\\\"⊴\\\",\\\"ltrif\\\":\\\"◂\\\",\\\"ltrPar\\\":\\\"⦖\\\",\\\"lurdshar\\\":\\\"⥊\\\",\\\"luruhar\\\":\\\"⥦\\\",\\\"lvertneqq\\\":\\\"≨︀\\\",\\\"lvnE\\\":\\\"≨︀\\\",\\\"macr\\\":\\\"¯\\\",\\\"male\\\":\\\"♂\\\",\\\"malt\\\":\\\"✠\\\",\\\"maltese\\\":\\\"✠\\\",\\\"Map\\\":\\\"⤅\\\",\\\"map\\\":\\\"↦\\\",\\\"mapsto\\\":\\\"↦\\\",\\\"mapstodown\\\":\\\"↧\\\",\\\"mapstoleft\\\":\\\"↤\\\",\\\"mapstoup\\\":\\\"↥\\\",\\\"marker\\\":\\\"▮\\\",\\\"mcomma\\\":\\\"⨩\\\",\\\"Mcy\\\":\\\"М\\\",\\\"mcy\\\":\\\"м\\\",\\\"mdash\\\":\\\"—\\\",\\\"mDDot\\\":\\\"∺\\\",\\\"measuredangle\\\":\\\"∡\\\",\\\"MediumSpace\\\":\\\" \\\",\\\"Mellintrf\\\":\\\"ℳ\\\",\\\"Mfr\\\":\\\"𝔐\\\",\\\"mfr\\\":\\\"𝔪\\\",\\\"mho\\\":\\\"℧\\\",\\\"micro\\\":\\\"µ\\\",\\\"midast\\\":\\\"*\\\",\\\"midcir\\\":\\\"⫰\\\",\\\"mid\\\":\\\"∣\\\",\\\"middot\\\":\\\"·\\\",\\\"minusb\\\":\\\"⊟\\\",\\\"minus\\\":\\\"−\\\",\\\"minusd\\\":\\\"∸\\\",\\\"minusdu\\\":\\\"⨪\\\",\\\"MinusPlus\\\":\\\"∓\\\",\\\"mlcp\\\":\\\"⫛\\\",\\\"mldr\\\":\\\"…\\\",\\\"mnplus\\\":\\\"∓\\\",\\\"models\\\":\\\"⊧\\\",\\\"Mopf\\\":\\\"𝕄\\\",\\\"mopf\\\":\\\"𝕞\\\",\\\"mp\\\":\\\"∓\\\",\\\"mscr\\\":\\\"𝓂\\\",\\\"Mscr\\\":\\\"ℳ\\\",\\\"mstpos\\\":\\\"∾\\\",\\\"Mu\\\":\\\"Μ\\\",\\\"mu\\\":\\\"μ\\\",\\\"multimap\\\":\\\"⊸\\\",\\\"mumap\\\":\\\"⊸\\\",\\\"nabla\\\":\\\"∇\\\",\\\"Nacute\\\":\\\"Ń\\\",\\\"nacute\\\":\\\"ń\\\",\\\"nang\\\":\\\"∠⃒\\\",\\\"nap\\\":\\\"≉\\\",\\\"napE\\\":\\\"⩰̸\\\",\\\"napid\\\":\\\"≋̸\\\",\\\"napos\\\":\\\"ŉ\\\",\\\"napprox\\\":\\\"≉\\\",\\\"natural\\\":\\\"♮\\\",\\\"naturals\\\":\\\"ℕ\\\",\\\"natur\\\":\\\"♮\\\",\\\"nbsp\\\":\\\" \\\",\\\"nbump\\\":\\\"≎̸\\\",\\\"nbumpe\\\":\\\"≏̸\\\",\\\"ncap\\\":\\\"⩃\\\",\\\"Ncaron\\\":\\\"Ň\\\",\\\"ncaron\\\":\\\"ň\\\",\\\"Ncedil\\\":\\\"Ņ\\\",\\\"ncedil\\\":\\\"ņ\\\",\\\"ncong\\\":\\\"≇\\\",\\\"ncongdot\\\":\\\"⩭̸\\\",\\\"ncup\\\":\\\"⩂\\\",\\\"Ncy\\\":\\\"Н\\\",\\\"ncy\\\":\\\"н\\\",\\\"ndash\\\":\\\"–\\\",\\\"nearhk\\\":\\\"⤤\\\",\\\"nearr\\\":\\\"↗\\\",\\\"neArr\\\":\\\"⇗\\\",\\\"nearrow\\\":\\\"↗\\\",\\\"ne\\\":\\\"≠\\\",\\\"nedot\\\":\\\"≐̸\\\",\\\"NegativeMediumSpace\\\":\\\"​\\\",\\\"NegativeThickSpace\\\":\\\"​\\\",\\\"NegativeThinSpace\\\":\\\"​\\\",\\\"NegativeVeryThinSpace\\\":\\\"​\\\",\\\"nequiv\\\":\\\"≢\\\",\\\"nesear\\\":\\\"⤨\\\",\\\"nesim\\\":\\\"≂̸\\\",\\\"NestedGreaterGreater\\\":\\\"≫\\\",\\\"NestedLessLess\\\":\\\"≪\\\",\\\"NewLine\\\":\\\"\\\\n\\\",\\\"nexist\\\":\\\"∄\\\",\\\"nexists\\\":\\\"∄\\\",\\\"Nfr\\\":\\\"𝔑\\\",\\\"nfr\\\":\\\"𝔫\\\",\\\"ngE\\\":\\\"≧̸\\\",\\\"nge\\\":\\\"≱\\\",\\\"ngeq\\\":\\\"≱\\\",\\\"ngeqq\\\":\\\"≧̸\\\",\\\"ngeqslant\\\":\\\"⩾̸\\\",\\\"nges\\\":\\\"⩾̸\\\",\\\"nGg\\\":\\\"⋙̸\\\",\\\"ngsim\\\":\\\"≵\\\",\\\"nGt\\\":\\\"≫⃒\\\",\\\"ngt\\\":\\\"≯\\\",\\\"ngtr\\\":\\\"≯\\\",\\\"nGtv\\\":\\\"≫̸\\\",\\\"nharr\\\":\\\"↮\\\",\\\"nhArr\\\":\\\"⇎\\\",\\\"nhpar\\\":\\\"⫲\\\",\\\"ni\\\":\\\"∋\\\",\\\"nis\\\":\\\"⋼\\\",\\\"nisd\\\":\\\"⋺\\\",\\\"niv\\\":\\\"∋\\\",\\\"NJcy\\\":\\\"Њ\\\",\\\"njcy\\\":\\\"њ\\\",\\\"nlarr\\\":\\\"↚\\\",\\\"nlArr\\\":\\\"⇍\\\",\\\"nldr\\\":\\\"‥\\\",\\\"nlE\\\":\\\"≦̸\\\",\\\"nle\\\":\\\"≰\\\",\\\"nleftarrow\\\":\\\"↚\\\",\\\"nLeftarrow\\\":\\\"⇍\\\",\\\"nleftrightarrow\\\":\\\"↮\\\",\\\"nLeftrightarrow\\\":\\\"⇎\\\",\\\"nleq\\\":\\\"≰\\\",\\\"nleqq\\\":\\\"≦̸\\\",\\\"nleqslant\\\":\\\"⩽̸\\\",\\\"nles\\\":\\\"⩽̸\\\",\\\"nless\\\":\\\"≮\\\",\\\"nLl\\\":\\\"⋘̸\\\",\\\"nlsim\\\":\\\"≴\\\",\\\"nLt\\\":\\\"≪⃒\\\",\\\"nlt\\\":\\\"≮\\\",\\\"nltri\\\":\\\"⋪\\\",\\\"nltrie\\\":\\\"⋬\\\",\\\"nLtv\\\":\\\"≪̸\\\",\\\"nmid\\\":\\\"∤\\\",\\\"NoBreak\\\":\\\"⁠\\\",\\\"NonBreakingSpace\\\":\\\" \\\",\\\"nopf\\\":\\\"𝕟\\\",\\\"Nopf\\\":\\\"ℕ\\\",\\\"Not\\\":\\\"⫬\\\",\\\"not\\\":\\\"¬\\\",\\\"NotCongruent\\\":\\\"≢\\\",\\\"NotCupCap\\\":\\\"≭\\\",\\\"NotDoubleVerticalBar\\\":\\\"∦\\\",\\\"NotElement\\\":\\\"∉\\\",\\\"NotEqual\\\":\\\"≠\\\",\\\"NotEqualTilde\\\":\\\"≂̸\\\",\\\"NotExists\\\":\\\"∄\\\",\\\"NotGreater\\\":\\\"≯\\\",\\\"NotGreaterEqual\\\":\\\"≱\\\",\\\"NotGreaterFullEqual\\\":\\\"≧̸\\\",\\\"NotGreaterGreater\\\":\\\"≫̸\\\",\\\"NotGreaterLess\\\":\\\"≹\\\",\\\"NotGreaterSlantEqual\\\":\\\"⩾̸\\\",\\\"NotGreaterTilde\\\":\\\"≵\\\",\\\"NotHumpDownHump\\\":\\\"≎̸\\\",\\\"NotHumpEqual\\\":\\\"≏̸\\\",\\\"notin\\\":\\\"∉\\\",\\\"notindot\\\":\\\"⋵̸\\\",\\\"notinE\\\":\\\"⋹̸\\\",\\\"notinva\\\":\\\"∉\\\",\\\"notinvb\\\":\\\"⋷\\\",\\\"notinvc\\\":\\\"⋶\\\",\\\"NotLeftTriangleBar\\\":\\\"⧏̸\\\",\\\"NotLeftTriangle\\\":\\\"⋪\\\",\\\"NotLeftTriangleEqual\\\":\\\"⋬\\\",\\\"NotLess\\\":\\\"≮\\\",\\\"NotLessEqual\\\":\\\"≰\\\",\\\"NotLessGreater\\\":\\\"≸\\\",\\\"NotLessLess\\\":\\\"≪̸\\\",\\\"NotLessSlantEqual\\\":\\\"⩽̸\\\",\\\"NotLessTilde\\\":\\\"≴\\\",\\\"NotNestedGreaterGreater\\\":\\\"⪢̸\\\",\\\"NotNestedLessLess\\\":\\\"⪡̸\\\",\\\"notni\\\":\\\"∌\\\",\\\"notniva\\\":\\\"∌\\\",\\\"notnivb\\\":\\\"⋾\\\",\\\"notnivc\\\":\\\"⋽\\\",\\\"NotPrecedes\\\":\\\"⊀\\\",\\\"NotPrecedesEqual\\\":\\\"⪯̸\\\",\\\"NotPrecedesSlantEqual\\\":\\\"⋠\\\",\\\"NotReverseElement\\\":\\\"∌\\\",\\\"NotRightTriangleBar\\\":\\\"⧐̸\\\",\\\"NotRightTriangle\\\":\\\"⋫\\\",\\\"NotRightTriangleEqual\\\":\\\"⋭\\\",\\\"NotSquareSubset\\\":\\\"⊏̸\\\",\\\"NotSquareSubsetEqual\\\":\\\"⋢\\\",\\\"NotSquareSuperset\\\":\\\"⊐̸\\\",\\\"NotSquareSupersetEqual\\\":\\\"⋣\\\",\\\"NotSubset\\\":\\\"⊂⃒\\\",\\\"NotSubsetEqual\\\":\\\"⊈\\\",\\\"NotSucceeds\\\":\\\"⊁\\\",\\\"NotSucceedsEqual\\\":\\\"⪰̸\\\",\\\"NotSucceedsSlantEqual\\\":\\\"⋡\\\",\\\"NotSucceedsTilde\\\":\\\"≿̸\\\",\\\"NotSuperset\\\":\\\"⊃⃒\\\",\\\"NotSupersetEqual\\\":\\\"⊉\\\",\\\"NotTilde\\\":\\\"≁\\\",\\\"NotTildeEqual\\\":\\\"≄\\\",\\\"NotTildeFullEqual\\\":\\\"≇\\\",\\\"NotTildeTilde\\\":\\\"≉\\\",\\\"NotVerticalBar\\\":\\\"∤\\\",\\\"nparallel\\\":\\\"∦\\\",\\\"npar\\\":\\\"∦\\\",\\\"nparsl\\\":\\\"⫽⃥\\\",\\\"npart\\\":\\\"∂̸\\\",\\\"npolint\\\":\\\"⨔\\\",\\\"npr\\\":\\\"⊀\\\",\\\"nprcue\\\":\\\"⋠\\\",\\\"nprec\\\":\\\"⊀\\\",\\\"npreceq\\\":\\\"⪯̸\\\",\\\"npre\\\":\\\"⪯̸\\\",\\\"nrarrc\\\":\\\"⤳̸\\\",\\\"nrarr\\\":\\\"↛\\\",\\\"nrArr\\\":\\\"⇏\\\",\\\"nrarrw\\\":\\\"↝̸\\\",\\\"nrightarrow\\\":\\\"↛\\\",\\\"nRightarrow\\\":\\\"⇏\\\",\\\"nrtri\\\":\\\"⋫\\\",\\\"nrtrie\\\":\\\"⋭\\\",\\\"nsc\\\":\\\"⊁\\\",\\\"nsccue\\\":\\\"⋡\\\",\\\"nsce\\\":\\\"⪰̸\\\",\\\"Nscr\\\":\\\"𝒩\\\",\\\"nscr\\\":\\\"𝓃\\\",\\\"nshortmid\\\":\\\"∤\\\",\\\"nshortparallel\\\":\\\"∦\\\",\\\"nsim\\\":\\\"≁\\\",\\\"nsime\\\":\\\"≄\\\",\\\"nsimeq\\\":\\\"≄\\\",\\\"nsmid\\\":\\\"∤\\\",\\\"nspar\\\":\\\"∦\\\",\\\"nsqsube\\\":\\\"⋢\\\",\\\"nsqsupe\\\":\\\"⋣\\\",\\\"nsub\\\":\\\"⊄\\\",\\\"nsubE\\\":\\\"⫅̸\\\",\\\"nsube\\\":\\\"⊈\\\",\\\"nsubset\\\":\\\"⊂⃒\\\",\\\"nsubseteq\\\":\\\"⊈\\\",\\\"nsubseteqq\\\":\\\"⫅̸\\\",\\\"nsucc\\\":\\\"⊁\\\",\\\"nsucceq\\\":\\\"⪰̸\\\",\\\"nsup\\\":\\\"⊅\\\",\\\"nsupE\\\":\\\"⫆̸\\\",\\\"nsupe\\\":\\\"⊉\\\",\\\"nsupset\\\":\\\"⊃⃒\\\",\\\"nsupseteq\\\":\\\"⊉\\\",\\\"nsupseteqq\\\":\\\"⫆̸\\\",\\\"ntgl\\\":\\\"≹\\\",\\\"Ntilde\\\":\\\"Ñ\\\",\\\"ntilde\\\":\\\"ñ\\\",\\\"ntlg\\\":\\\"≸\\\",\\\"ntriangleleft\\\":\\\"⋪\\\",\\\"ntrianglelefteq\\\":\\\"⋬\\\",\\\"ntriangleright\\\":\\\"⋫\\\",\\\"ntrianglerighteq\\\":\\\"⋭\\\",\\\"Nu\\\":\\\"Ν\\\",\\\"nu\\\":\\\"ν\\\",\\\"num\\\":\\\"#\\\",\\\"numero\\\":\\\"№\\\",\\\"numsp\\\":\\\" \\\",\\\"nvap\\\":\\\"≍⃒\\\",\\\"nvdash\\\":\\\"⊬\\\",\\\"nvDash\\\":\\\"⊭\\\",\\\"nVdash\\\":\\\"⊮\\\",\\\"nVDash\\\":\\\"⊯\\\",\\\"nvge\\\":\\\"≥⃒\\\",\\\"nvgt\\\":\\\">⃒\\\",\\\"nvHarr\\\":\\\"⤄\\\",\\\"nvinfin\\\":\\\"⧞\\\",\\\"nvlArr\\\":\\\"⤂\\\",\\\"nvle\\\":\\\"≤⃒\\\",\\\"nvlt\\\":\\\"<⃒\\\",\\\"nvltrie\\\":\\\"⊴⃒\\\",\\\"nvrArr\\\":\\\"⤃\\\",\\\"nvrtrie\\\":\\\"⊵⃒\\\",\\\"nvsim\\\":\\\"∼⃒\\\",\\\"nwarhk\\\":\\\"⤣\\\",\\\"nwarr\\\":\\\"↖\\\",\\\"nwArr\\\":\\\"⇖\\\",\\\"nwarrow\\\":\\\"↖\\\",\\\"nwnear\\\":\\\"⤧\\\",\\\"Oacute\\\":\\\"Ó\\\",\\\"oacute\\\":\\\"ó\\\",\\\"oast\\\":\\\"⊛\\\",\\\"Ocirc\\\":\\\"Ô\\\",\\\"ocirc\\\":\\\"ô\\\",\\\"ocir\\\":\\\"⊚\\\",\\\"Ocy\\\":\\\"О\\\",\\\"ocy\\\":\\\"о\\\",\\\"odash\\\":\\\"⊝\\\",\\\"Odblac\\\":\\\"Ő\\\",\\\"odblac\\\":\\\"ő\\\",\\\"odiv\\\":\\\"⨸\\\",\\\"odot\\\":\\\"⊙\\\",\\\"odsold\\\":\\\"⦼\\\",\\\"OElig\\\":\\\"Œ\\\",\\\"oelig\\\":\\\"œ\\\",\\\"ofcir\\\":\\\"⦿\\\",\\\"Ofr\\\":\\\"𝔒\\\",\\\"ofr\\\":\\\"𝔬\\\",\\\"ogon\\\":\\\"˛\\\",\\\"Ograve\\\":\\\"Ò\\\",\\\"ograve\\\":\\\"ò\\\",\\\"ogt\\\":\\\"⧁\\\",\\\"ohbar\\\":\\\"⦵\\\",\\\"ohm\\\":\\\"Ω\\\",\\\"oint\\\":\\\"∮\\\",\\\"olarr\\\":\\\"↺\\\",\\\"olcir\\\":\\\"⦾\\\",\\\"olcross\\\":\\\"⦻\\\",\\\"oline\\\":\\\"‾\\\",\\\"olt\\\":\\\"⧀\\\",\\\"Omacr\\\":\\\"Ō\\\",\\\"omacr\\\":\\\"ō\\\",\\\"Omega\\\":\\\"Ω\\\",\\\"omega\\\":\\\"ω\\\",\\\"Omicron\\\":\\\"Ο\\\",\\\"omicron\\\":\\\"ο\\\",\\\"omid\\\":\\\"⦶\\\",\\\"ominus\\\":\\\"⊖\\\",\\\"Oopf\\\":\\\"𝕆\\\",\\\"oopf\\\":\\\"𝕠\\\",\\\"opar\\\":\\\"⦷\\\",\\\"OpenCurlyDoubleQuote\\\":\\\"“\\\",\\\"OpenCurlyQuote\\\":\\\"‘\\\",\\\"operp\\\":\\\"⦹\\\",\\\"oplus\\\":\\\"⊕\\\",\\\"orarr\\\":\\\"↻\\\",\\\"Or\\\":\\\"⩔\\\",\\\"or\\\":\\\"∨\\\",\\\"ord\\\":\\\"⩝\\\",\\\"order\\\":\\\"ℴ\\\",\\\"orderof\\\":\\\"ℴ\\\",\\\"ordf\\\":\\\"ª\\\",\\\"ordm\\\":\\\"º\\\",\\\"origof\\\":\\\"⊶\\\",\\\"oror\\\":\\\"⩖\\\",\\\"orslope\\\":\\\"⩗\\\",\\\"orv\\\":\\\"⩛\\\",\\\"oS\\\":\\\"Ⓢ\\\",\\\"Oscr\\\":\\\"𝒪\\\",\\\"oscr\\\":\\\"ℴ\\\",\\\"Oslash\\\":\\\"Ø\\\",\\\"oslash\\\":\\\"ø\\\",\\\"osol\\\":\\\"⊘\\\",\\\"Otilde\\\":\\\"Õ\\\",\\\"otilde\\\":\\\"õ\\\",\\\"otimesas\\\":\\\"⨶\\\",\\\"Otimes\\\":\\\"⨷\\\",\\\"otimes\\\":\\\"⊗\\\",\\\"Ouml\\\":\\\"Ö\\\",\\\"ouml\\\":\\\"ö\\\",\\\"ovbar\\\":\\\"⌽\\\",\\\"OverBar\\\":\\\"‾\\\",\\\"OverBrace\\\":\\\"⏞\\\",\\\"OverBracket\\\":\\\"⎴\\\",\\\"OverParenthesis\\\":\\\"⏜\\\",\\\"para\\\":\\\"¶\\\",\\\"parallel\\\":\\\"∥\\\",\\\"par\\\":\\\"∥\\\",\\\"parsim\\\":\\\"⫳\\\",\\\"parsl\\\":\\\"⫽\\\",\\\"part\\\":\\\"∂\\\",\\\"PartialD\\\":\\\"∂\\\",\\\"Pcy\\\":\\\"П\\\",\\\"pcy\\\":\\\"п\\\",\\\"percnt\\\":\\\"%\\\",\\\"period\\\":\\\".\\\",\\\"permil\\\":\\\"‰\\\",\\\"perp\\\":\\\"⊥\\\",\\\"pertenk\\\":\\\"‱\\\",\\\"Pfr\\\":\\\"𝔓\\\",\\\"pfr\\\":\\\"𝔭\\\",\\\"Phi\\\":\\\"Φ\\\",\\\"phi\\\":\\\"φ\\\",\\\"phiv\\\":\\\"ϕ\\\",\\\"phmmat\\\":\\\"ℳ\\\",\\\"phone\\\":\\\"☎\\\",\\\"Pi\\\":\\\"Π\\\",\\\"pi\\\":\\\"π\\\",\\\"pitchfork\\\":\\\"⋔\\\",\\\"piv\\\":\\\"ϖ\\\",\\\"planck\\\":\\\"ℏ\\\",\\\"planckh\\\":\\\"ℎ\\\",\\\"plankv\\\":\\\"ℏ\\\",\\\"plusacir\\\":\\\"⨣\\\",\\\"plusb\\\":\\\"⊞\\\",\\\"pluscir\\\":\\\"⨢\\\",\\\"plus\\\":\\\"+\\\",\\\"plusdo\\\":\\\"∔\\\",\\\"plusdu\\\":\\\"⨥\\\",\\\"pluse\\\":\\\"⩲\\\",\\\"PlusMinus\\\":\\\"±\\\",\\\"plusmn\\\":\\\"±\\\",\\\"plussim\\\":\\\"⨦\\\",\\\"plustwo\\\":\\\"⨧\\\",\\\"pm\\\":\\\"±\\\",\\\"Poincareplane\\\":\\\"ℌ\\\",\\\"pointint\\\":\\\"⨕\\\",\\\"popf\\\":\\\"𝕡\\\",\\\"Popf\\\":\\\"ℙ\\\",\\\"pound\\\":\\\"£\\\",\\\"prap\\\":\\\"⪷\\\",\\\"Pr\\\":\\\"⪻\\\",\\\"pr\\\":\\\"≺\\\",\\\"prcue\\\":\\\"≼\\\",\\\"precapprox\\\":\\\"⪷\\\",\\\"prec\\\":\\\"≺\\\",\\\"preccurlyeq\\\":\\\"≼\\\",\\\"Precedes\\\":\\\"≺\\\",\\\"PrecedesEqual\\\":\\\"⪯\\\",\\\"PrecedesSlantEqual\\\":\\\"≼\\\",\\\"PrecedesTilde\\\":\\\"≾\\\",\\\"preceq\\\":\\\"⪯\\\",\\\"precnapprox\\\":\\\"⪹\\\",\\\"precneqq\\\":\\\"⪵\\\",\\\"precnsim\\\":\\\"⋨\\\",\\\"pre\\\":\\\"⪯\\\",\\\"prE\\\":\\\"⪳\\\",\\\"precsim\\\":\\\"≾\\\",\\\"prime\\\":\\\"′\\\",\\\"Prime\\\":\\\"″\\\",\\\"primes\\\":\\\"ℙ\\\",\\\"prnap\\\":\\\"⪹\\\",\\\"prnE\\\":\\\"⪵\\\",\\\"prnsim\\\":\\\"⋨\\\",\\\"prod\\\":\\\"∏\\\",\\\"Product\\\":\\\"∏\\\",\\\"profalar\\\":\\\"⌮\\\",\\\"profline\\\":\\\"⌒\\\",\\\"profsurf\\\":\\\"⌓\\\",\\\"prop\\\":\\\"∝\\\",\\\"Proportional\\\":\\\"∝\\\",\\\"Proportion\\\":\\\"∷\\\",\\\"propto\\\":\\\"∝\\\",\\\"prsim\\\":\\\"≾\\\",\\\"prurel\\\":\\\"⊰\\\",\\\"Pscr\\\":\\\"𝒫\\\",\\\"pscr\\\":\\\"𝓅\\\",\\\"Psi\\\":\\\"Ψ\\\",\\\"psi\\\":\\\"ψ\\\",\\\"puncsp\\\":\\\" \\\",\\\"Qfr\\\":\\\"𝔔\\\",\\\"qfr\\\":\\\"𝔮\\\",\\\"qint\\\":\\\"⨌\\\",\\\"qopf\\\":\\\"𝕢\\\",\\\"Qopf\\\":\\\"ℚ\\\",\\\"qprime\\\":\\\"⁗\\\",\\\"Qscr\\\":\\\"𝒬\\\",\\\"qscr\\\":\\\"𝓆\\\",\\\"quaternions\\\":\\\"ℍ\\\",\\\"quatint\\\":\\\"⨖\\\",\\\"quest\\\":\\\"?\\\",\\\"questeq\\\":\\\"≟\\\",\\\"quot\\\":\\\"\\\\\\\"\\\",\\\"QUOT\\\":\\\"\\\\\\\"\\\",\\\"rAarr\\\":\\\"⇛\\\",\\\"race\\\":\\\"∽̱\\\",\\\"Racute\\\":\\\"Ŕ\\\",\\\"racute\\\":\\\"ŕ\\\",\\\"radic\\\":\\\"√\\\",\\\"raemptyv\\\":\\\"⦳\\\",\\\"rang\\\":\\\"⟩\\\",\\\"Rang\\\":\\\"⟫\\\",\\\"rangd\\\":\\\"⦒\\\",\\\"range\\\":\\\"⦥\\\",\\\"rangle\\\":\\\"⟩\\\",\\\"raquo\\\":\\\"»\\\",\\\"rarrap\\\":\\\"⥵\\\",\\\"rarrb\\\":\\\"⇥\\\",\\\"rarrbfs\\\":\\\"⤠\\\",\\\"rarrc\\\":\\\"⤳\\\",\\\"rarr\\\":\\\"→\\\",\\\"Rarr\\\":\\\"↠\\\",\\\"rArr\\\":\\\"⇒\\\",\\\"rarrfs\\\":\\\"⤞\\\",\\\"rarrhk\\\":\\\"↪\\\",\\\"rarrlp\\\":\\\"↬\\\",\\\"rarrpl\\\":\\\"⥅\\\",\\\"rarrsim\\\":\\\"⥴\\\",\\\"Rarrtl\\\":\\\"⤖\\\",\\\"rarrtl\\\":\\\"↣\\\",\\\"rarrw\\\":\\\"↝\\\",\\\"ratail\\\":\\\"⤚\\\",\\\"rAtail\\\":\\\"⤜\\\",\\\"ratio\\\":\\\"∶\\\",\\\"rationals\\\":\\\"ℚ\\\",\\\"rbarr\\\":\\\"⤍\\\",\\\"rBarr\\\":\\\"⤏\\\",\\\"RBarr\\\":\\\"⤐\\\",\\\"rbbrk\\\":\\\"❳\\\",\\\"rbrace\\\":\\\"}\\\",\\\"rbrack\\\":\\\"]\\\",\\\"rbrke\\\":\\\"⦌\\\",\\\"rbrksld\\\":\\\"⦎\\\",\\\"rbrkslu\\\":\\\"⦐\\\",\\\"Rcaron\\\":\\\"Ř\\\",\\\"rcaron\\\":\\\"ř\\\",\\\"Rcedil\\\":\\\"Ŗ\\\",\\\"rcedil\\\":\\\"ŗ\\\",\\\"rceil\\\":\\\"⌉\\\",\\\"rcub\\\":\\\"}\\\",\\\"Rcy\\\":\\\"Р\\\",\\\"rcy\\\":\\\"р\\\",\\\"rdca\\\":\\\"⤷\\\",\\\"rdldhar\\\":\\\"⥩\\\",\\\"rdquo\\\":\\\"”\\\",\\\"rdquor\\\":\\\"”\\\",\\\"rdsh\\\":\\\"↳\\\",\\\"real\\\":\\\"ℜ\\\",\\\"realine\\\":\\\"ℛ\\\",\\\"realpart\\\":\\\"ℜ\\\",\\\"reals\\\":\\\"ℝ\\\",\\\"Re\\\":\\\"ℜ\\\",\\\"rect\\\":\\\"▭\\\",\\\"reg\\\":\\\"®\\\",\\\"REG\\\":\\\"®\\\",\\\"ReverseElement\\\":\\\"∋\\\",\\\"ReverseEquilibrium\\\":\\\"⇋\\\",\\\"ReverseUpEquilibrium\\\":\\\"⥯\\\",\\\"rfisht\\\":\\\"⥽\\\",\\\"rfloor\\\":\\\"⌋\\\",\\\"rfr\\\":\\\"𝔯\\\",\\\"Rfr\\\":\\\"ℜ\\\",\\\"rHar\\\":\\\"⥤\\\",\\\"rhard\\\":\\\"⇁\\\",\\\"rharu\\\":\\\"⇀\\\",\\\"rharul\\\":\\\"⥬\\\",\\\"Rho\\\":\\\"Ρ\\\",\\\"rho\\\":\\\"ρ\\\",\\\"rhov\\\":\\\"ϱ\\\",\\\"RightAngleBracket\\\":\\\"⟩\\\",\\\"RightArrowBar\\\":\\\"⇥\\\",\\\"rightarrow\\\":\\\"→\\\",\\\"RightArrow\\\":\\\"→\\\",\\\"Rightarrow\\\":\\\"⇒\\\",\\\"RightArrowLeftArrow\\\":\\\"⇄\\\",\\\"rightarrowtail\\\":\\\"↣\\\",\\\"RightCeiling\\\":\\\"⌉\\\",\\\"RightDoubleBracket\\\":\\\"⟧\\\",\\\"RightDownTeeVector\\\":\\\"⥝\\\",\\\"RightDownVectorBar\\\":\\\"⥕\\\",\\\"RightDownVector\\\":\\\"⇂\\\",\\\"RightFloor\\\":\\\"⌋\\\",\\\"rightharpoondown\\\":\\\"⇁\\\",\\\"rightharpoonup\\\":\\\"⇀\\\",\\\"rightleftarrows\\\":\\\"⇄\\\",\\\"rightleftharpoons\\\":\\\"⇌\\\",\\\"rightrightarrows\\\":\\\"⇉\\\",\\\"rightsquigarrow\\\":\\\"↝\\\",\\\"RightTeeArrow\\\":\\\"↦\\\",\\\"RightTee\\\":\\\"⊢\\\",\\\"RightTeeVector\\\":\\\"⥛\\\",\\\"rightthreetimes\\\":\\\"⋌\\\",\\\"RightTriangleBar\\\":\\\"⧐\\\",\\\"RightTriangle\\\":\\\"⊳\\\",\\\"RightTriangleEqual\\\":\\\"⊵\\\",\\\"RightUpDownVector\\\":\\\"⥏\\\",\\\"RightUpTeeVector\\\":\\\"⥜\\\",\\\"RightUpVectorBar\\\":\\\"⥔\\\",\\\"RightUpVector\\\":\\\"↾\\\",\\\"RightVectorBar\\\":\\\"⥓\\\",\\\"RightVector\\\":\\\"⇀\\\",\\\"ring\\\":\\\"˚\\\",\\\"risingdotseq\\\":\\\"≓\\\",\\\"rlarr\\\":\\\"⇄\\\",\\\"rlhar\\\":\\\"⇌\\\",\\\"rlm\\\":\\\"‏\\\",\\\"rmoustache\\\":\\\"⎱\\\",\\\"rmoust\\\":\\\"⎱\\\",\\\"rnmid\\\":\\\"⫮\\\",\\\"roang\\\":\\\"⟭\\\",\\\"roarr\\\":\\\"⇾\\\",\\\"robrk\\\":\\\"⟧\\\",\\\"ropar\\\":\\\"⦆\\\",\\\"ropf\\\":\\\"𝕣\\\",\\\"Ropf\\\":\\\"ℝ\\\",\\\"roplus\\\":\\\"⨮\\\",\\\"rotimes\\\":\\\"⨵\\\",\\\"RoundImplies\\\":\\\"⥰\\\",\\\"rpar\\\":\\\")\\\",\\\"rpargt\\\":\\\"⦔\\\",\\\"rppolint\\\":\\\"⨒\\\",\\\"rrarr\\\":\\\"⇉\\\",\\\"Rrightarrow\\\":\\\"⇛\\\",\\\"rsaquo\\\":\\\"›\\\",\\\"rscr\\\":\\\"𝓇\\\",\\\"Rscr\\\":\\\"ℛ\\\",\\\"rsh\\\":\\\"↱\\\",\\\"Rsh\\\":\\\"↱\\\",\\\"rsqb\\\":\\\"]\\\",\\\"rsquo\\\":\\\"’\\\",\\\"rsquor\\\":\\\"’\\\",\\\"rthree\\\":\\\"⋌\\\",\\\"rtimes\\\":\\\"⋊\\\",\\\"rtri\\\":\\\"▹\\\",\\\"rtrie\\\":\\\"⊵\\\",\\\"rtrif\\\":\\\"▸\\\",\\\"rtriltri\\\":\\\"⧎\\\",\\\"RuleDelayed\\\":\\\"⧴\\\",\\\"ruluhar\\\":\\\"⥨\\\",\\\"rx\\\":\\\"℞\\\",\\\"Sacute\\\":\\\"Ś\\\",\\\"sacute\\\":\\\"ś\\\",\\\"sbquo\\\":\\\"‚\\\",\\\"scap\\\":\\\"⪸\\\",\\\"Scaron\\\":\\\"Š\\\",\\\"scaron\\\":\\\"š\\\",\\\"Sc\\\":\\\"⪼\\\",\\\"sc\\\":\\\"≻\\\",\\\"sccue\\\":\\\"≽\\\",\\\"sce\\\":\\\"⪰\\\",\\\"scE\\\":\\\"⪴\\\",\\\"Scedil\\\":\\\"Ş\\\",\\\"scedil\\\":\\\"ş\\\",\\\"Scirc\\\":\\\"Ŝ\\\",\\\"scirc\\\":\\\"ŝ\\\",\\\"scnap\\\":\\\"⪺\\\",\\\"scnE\\\":\\\"⪶\\\",\\\"scnsim\\\":\\\"⋩\\\",\\\"scpolint\\\":\\\"⨓\\\",\\\"scsim\\\":\\\"≿\\\",\\\"Scy\\\":\\\"С\\\",\\\"scy\\\":\\\"с\\\",\\\"sdotb\\\":\\\"⊡\\\",\\\"sdot\\\":\\\"⋅\\\",\\\"sdote\\\":\\\"⩦\\\",\\\"searhk\\\":\\\"⤥\\\",\\\"searr\\\":\\\"↘\\\",\\\"seArr\\\":\\\"⇘\\\",\\\"searrow\\\":\\\"↘\\\",\\\"sect\\\":\\\"§\\\",\\\"semi\\\":\\\";\\\",\\\"seswar\\\":\\\"⤩\\\",\\\"setminus\\\":\\\"∖\\\",\\\"setmn\\\":\\\"∖\\\",\\\"sext\\\":\\\"✶\\\",\\\"Sfr\\\":\\\"𝔖\\\",\\\"sfr\\\":\\\"𝔰\\\",\\\"sfrown\\\":\\\"⌢\\\",\\\"sharp\\\":\\\"♯\\\",\\\"SHCHcy\\\":\\\"Щ\\\",\\\"shchcy\\\":\\\"щ\\\",\\\"SHcy\\\":\\\"Ш\\\",\\\"shcy\\\":\\\"ш\\\",\\\"ShortDownArrow\\\":\\\"↓\\\",\\\"ShortLeftArrow\\\":\\\"←\\\",\\\"shortmid\\\":\\\"∣\\\",\\\"shortparallel\\\":\\\"∥\\\",\\\"ShortRightArrow\\\":\\\"→\\\",\\\"ShortUpArrow\\\":\\\"↑\\\",\\\"shy\\\":\\\"­\\\",\\\"Sigma\\\":\\\"Σ\\\",\\\"sigma\\\":\\\"σ\\\",\\\"sigmaf\\\":\\\"ς\\\",\\\"sigmav\\\":\\\"ς\\\",\\\"sim\\\":\\\"∼\\\",\\\"simdot\\\":\\\"⩪\\\",\\\"sime\\\":\\\"≃\\\",\\\"simeq\\\":\\\"≃\\\",\\\"simg\\\":\\\"⪞\\\",\\\"simgE\\\":\\\"⪠\\\",\\\"siml\\\":\\\"⪝\\\",\\\"simlE\\\":\\\"⪟\\\",\\\"simne\\\":\\\"≆\\\",\\\"simplus\\\":\\\"⨤\\\",\\\"simrarr\\\":\\\"⥲\\\",\\\"slarr\\\":\\\"←\\\",\\\"SmallCircle\\\":\\\"∘\\\",\\\"smallsetminus\\\":\\\"∖\\\",\\\"smashp\\\":\\\"⨳\\\",\\\"smeparsl\\\":\\\"⧤\\\",\\\"smid\\\":\\\"∣\\\",\\\"smile\\\":\\\"⌣\\\",\\\"smt\\\":\\\"⪪\\\",\\\"smte\\\":\\\"⪬\\\",\\\"smtes\\\":\\\"⪬︀\\\",\\\"SOFTcy\\\":\\\"Ь\\\",\\\"softcy\\\":\\\"ь\\\",\\\"solbar\\\":\\\"⌿\\\",\\\"solb\\\":\\\"⧄\\\",\\\"sol\\\":\\\"/\\\",\\\"Sopf\\\":\\\"𝕊\\\",\\\"sopf\\\":\\\"𝕤\\\",\\\"spades\\\":\\\"♠\\\",\\\"spadesuit\\\":\\\"♠\\\",\\\"spar\\\":\\\"∥\\\",\\\"sqcap\\\":\\\"⊓\\\",\\\"sqcaps\\\":\\\"⊓︀\\\",\\\"sqcup\\\":\\\"⊔\\\",\\\"sqcups\\\":\\\"⊔︀\\\",\\\"Sqrt\\\":\\\"√\\\",\\\"sqsub\\\":\\\"⊏\\\",\\\"sqsube\\\":\\\"⊑\\\",\\\"sqsubset\\\":\\\"⊏\\\",\\\"sqsubseteq\\\":\\\"⊑\\\",\\\"sqsup\\\":\\\"⊐\\\",\\\"sqsupe\\\":\\\"⊒\\\",\\\"sqsupset\\\":\\\"⊐\\\",\\\"sqsupseteq\\\":\\\"⊒\\\",\\\"square\\\":\\\"□\\\",\\\"Square\\\":\\\"□\\\",\\\"SquareIntersection\\\":\\\"⊓\\\",\\\"SquareSubset\\\":\\\"⊏\\\",\\\"SquareSubsetEqual\\\":\\\"⊑\\\",\\\"SquareSuperset\\\":\\\"⊐\\\",\\\"SquareSupersetEqual\\\":\\\"⊒\\\",\\\"SquareUnion\\\":\\\"⊔\\\",\\\"squarf\\\":\\\"▪\\\",\\\"squ\\\":\\\"□\\\",\\\"squf\\\":\\\"▪\\\",\\\"srarr\\\":\\\"→\\\",\\\"Sscr\\\":\\\"𝒮\\\",\\\"sscr\\\":\\\"𝓈\\\",\\\"ssetmn\\\":\\\"∖\\\",\\\"ssmile\\\":\\\"⌣\\\",\\\"sstarf\\\":\\\"⋆\\\",\\\"Star\\\":\\\"⋆\\\",\\\"star\\\":\\\"☆\\\",\\\"starf\\\":\\\"★\\\",\\\"straightepsilon\\\":\\\"ϵ\\\",\\\"straightphi\\\":\\\"ϕ\\\",\\\"strns\\\":\\\"¯\\\",\\\"sub\\\":\\\"⊂\\\",\\\"Sub\\\":\\\"⋐\\\",\\\"subdot\\\":\\\"⪽\\\",\\\"subE\\\":\\\"⫅\\\",\\\"sube\\\":\\\"⊆\\\",\\\"subedot\\\":\\\"⫃\\\",\\\"submult\\\":\\\"⫁\\\",\\\"subnE\\\":\\\"⫋\\\",\\\"subne\\\":\\\"⊊\\\",\\\"subplus\\\":\\\"⪿\\\",\\\"subrarr\\\":\\\"⥹\\\",\\\"subset\\\":\\\"⊂\\\",\\\"Subset\\\":\\\"⋐\\\",\\\"subseteq\\\":\\\"⊆\\\",\\\"subseteqq\\\":\\\"⫅\\\",\\\"SubsetEqual\\\":\\\"⊆\\\",\\\"subsetneq\\\":\\\"⊊\\\",\\\"subsetneqq\\\":\\\"⫋\\\",\\\"subsim\\\":\\\"⫇\\\",\\\"subsub\\\":\\\"⫕\\\",\\\"subsup\\\":\\\"⫓\\\",\\\"succapprox\\\":\\\"⪸\\\",\\\"succ\\\":\\\"≻\\\",\\\"succcurlyeq\\\":\\\"≽\\\",\\\"Succeeds\\\":\\\"≻\\\",\\\"SucceedsEqual\\\":\\\"⪰\\\",\\\"SucceedsSlantEqual\\\":\\\"≽\\\",\\\"SucceedsTilde\\\":\\\"≿\\\",\\\"succeq\\\":\\\"⪰\\\",\\\"succnapprox\\\":\\\"⪺\\\",\\\"succneqq\\\":\\\"⪶\\\",\\\"succnsim\\\":\\\"⋩\\\",\\\"succsim\\\":\\\"≿\\\",\\\"SuchThat\\\":\\\"∋\\\",\\\"sum\\\":\\\"∑\\\",\\\"Sum\\\":\\\"∑\\\",\\\"sung\\\":\\\"♪\\\",\\\"sup1\\\":\\\"¹\\\",\\\"sup2\\\":\\\"²\\\",\\\"sup3\\\":\\\"³\\\",\\\"sup\\\":\\\"⊃\\\",\\\"Sup\\\":\\\"⋑\\\",\\\"supdot\\\":\\\"⪾\\\",\\\"supdsub\\\":\\\"⫘\\\",\\\"supE\\\":\\\"⫆\\\",\\\"supe\\\":\\\"⊇\\\",\\\"supedot\\\":\\\"⫄\\\",\\\"Superset\\\":\\\"⊃\\\",\\\"SupersetEqual\\\":\\\"⊇\\\",\\\"suphsol\\\":\\\"⟉\\\",\\\"suphsub\\\":\\\"⫗\\\",\\\"suplarr\\\":\\\"⥻\\\",\\\"supmult\\\":\\\"⫂\\\",\\\"supnE\\\":\\\"⫌\\\",\\\"supne\\\":\\\"⊋\\\",\\\"supplus\\\":\\\"⫀\\\",\\\"supset\\\":\\\"⊃\\\",\\\"Supset\\\":\\\"⋑\\\",\\\"supseteq\\\":\\\"⊇\\\",\\\"supseteqq\\\":\\\"⫆\\\",\\\"supsetneq\\\":\\\"⊋\\\",\\\"supsetneqq\\\":\\\"⫌\\\",\\\"supsim\\\":\\\"⫈\\\",\\\"supsub\\\":\\\"⫔\\\",\\\"supsup\\\":\\\"⫖\\\",\\\"swarhk\\\":\\\"⤦\\\",\\\"swarr\\\":\\\"↙\\\",\\\"swArr\\\":\\\"⇙\\\",\\\"swarrow\\\":\\\"↙\\\",\\\"swnwar\\\":\\\"⤪\\\",\\\"szlig\\\":\\\"ß\\\",\\\"Tab\\\":\\\"\\\\t\\\",\\\"target\\\":\\\"⌖\\\",\\\"Tau\\\":\\\"Τ\\\",\\\"tau\\\":\\\"τ\\\",\\\"tbrk\\\":\\\"⎴\\\",\\\"Tcaron\\\":\\\"Ť\\\",\\\"tcaron\\\":\\\"ť\\\",\\\"Tcedil\\\":\\\"Ţ\\\",\\\"tcedil\\\":\\\"ţ\\\",\\\"Tcy\\\":\\\"Т\\\",\\\"tcy\\\":\\\"т\\\",\\\"tdot\\\":\\\"⃛\\\",\\\"telrec\\\":\\\"⌕\\\",\\\"Tfr\\\":\\\"𝔗\\\",\\\"tfr\\\":\\\"𝔱\\\",\\\"there4\\\":\\\"∴\\\",\\\"therefore\\\":\\\"∴\\\",\\\"Therefore\\\":\\\"∴\\\",\\\"Theta\\\":\\\"Θ\\\",\\\"theta\\\":\\\"θ\\\",\\\"thetasym\\\":\\\"ϑ\\\",\\\"thetav\\\":\\\"ϑ\\\",\\\"thickapprox\\\":\\\"≈\\\",\\\"thicksim\\\":\\\"∼\\\",\\\"ThickSpace\\\":\\\"  \\\",\\\"ThinSpace\\\":\\\" \\\",\\\"thinsp\\\":\\\" \\\",\\\"thkap\\\":\\\"≈\\\",\\\"thksim\\\":\\\"∼\\\",\\\"THORN\\\":\\\"Þ\\\",\\\"thorn\\\":\\\"þ\\\",\\\"tilde\\\":\\\"˜\\\",\\\"Tilde\\\":\\\"∼\\\",\\\"TildeEqual\\\":\\\"≃\\\",\\\"TildeFullEqual\\\":\\\"≅\\\",\\\"TildeTilde\\\":\\\"≈\\\",\\\"timesbar\\\":\\\"⨱\\\",\\\"timesb\\\":\\\"⊠\\\",\\\"times\\\":\\\"×\\\",\\\"timesd\\\":\\\"⨰\\\",\\\"tint\\\":\\\"∭\\\",\\\"toea\\\":\\\"⤨\\\",\\\"topbot\\\":\\\"⌶\\\",\\\"topcir\\\":\\\"⫱\\\",\\\"top\\\":\\\"⊤\\\",\\\"Topf\\\":\\\"𝕋\\\",\\\"topf\\\":\\\"𝕥\\\",\\\"topfork\\\":\\\"⫚\\\",\\\"tosa\\\":\\\"⤩\\\",\\\"tprime\\\":\\\"‴\\\",\\\"trade\\\":\\\"™\\\",\\\"TRADE\\\":\\\"™\\\",\\\"triangle\\\":\\\"▵\\\",\\\"triangledown\\\":\\\"▿\\\",\\\"triangleleft\\\":\\\"◃\\\",\\\"trianglelefteq\\\":\\\"⊴\\\",\\\"triangleq\\\":\\\"≜\\\",\\\"triangleright\\\":\\\"▹\\\",\\\"trianglerighteq\\\":\\\"⊵\\\",\\\"tridot\\\":\\\"◬\\\",\\\"trie\\\":\\\"≜\\\",\\\"triminus\\\":\\\"⨺\\\",\\\"TripleDot\\\":\\\"⃛\\\",\\\"triplus\\\":\\\"⨹\\\",\\\"trisb\\\":\\\"⧍\\\",\\\"tritime\\\":\\\"⨻\\\",\\\"trpezium\\\":\\\"⏢\\\",\\\"Tscr\\\":\\\"𝒯\\\",\\\"tscr\\\":\\\"𝓉\\\",\\\"TScy\\\":\\\"Ц\\\",\\\"tscy\\\":\\\"ц\\\",\\\"TSHcy\\\":\\\"Ћ\\\",\\\"tshcy\\\":\\\"ћ\\\",\\\"Tstrok\\\":\\\"Ŧ\\\",\\\"tstrok\\\":\\\"ŧ\\\",\\\"twixt\\\":\\\"≬\\\",\\\"twoheadleftarrow\\\":\\\"↞\\\",\\\"twoheadrightarrow\\\":\\\"↠\\\",\\\"Uacute\\\":\\\"Ú\\\",\\\"uacute\\\":\\\"ú\\\",\\\"uarr\\\":\\\"↑\\\",\\\"Uarr\\\":\\\"↟\\\",\\\"uArr\\\":\\\"⇑\\\",\\\"Uarrocir\\\":\\\"⥉\\\",\\\"Ubrcy\\\":\\\"Ў\\\",\\\"ubrcy\\\":\\\"ў\\\",\\\"Ubreve\\\":\\\"Ŭ\\\",\\\"ubreve\\\":\\\"ŭ\\\",\\\"Ucirc\\\":\\\"Û\\\",\\\"ucirc\\\":\\\"û\\\",\\\"Ucy\\\":\\\"У\\\",\\\"ucy\\\":\\\"у\\\",\\\"udarr\\\":\\\"⇅\\\",\\\"Udblac\\\":\\\"Ű\\\",\\\"udblac\\\":\\\"ű\\\",\\\"udhar\\\":\\\"⥮\\\",\\\"ufisht\\\":\\\"⥾\\\",\\\"Ufr\\\":\\\"𝔘\\\",\\\"ufr\\\":\\\"𝔲\\\",\\\"Ugrave\\\":\\\"Ù\\\",\\\"ugrave\\\":\\\"ù\\\",\\\"uHar\\\":\\\"⥣\\\",\\\"uharl\\\":\\\"↿\\\",\\\"uharr\\\":\\\"↾\\\",\\\"uhblk\\\":\\\"▀\\\",\\\"ulcorn\\\":\\\"⌜\\\",\\\"ulcorner\\\":\\\"⌜\\\",\\\"ulcrop\\\":\\\"⌏\\\",\\\"ultri\\\":\\\"◸\\\",\\\"Umacr\\\":\\\"Ū\\\",\\\"umacr\\\":\\\"ū\\\",\\\"uml\\\":\\\"¨\\\",\\\"UnderBar\\\":\\\"_\\\",\\\"UnderBrace\\\":\\\"⏟\\\",\\\"UnderBracket\\\":\\\"⎵\\\",\\\"UnderParenthesis\\\":\\\"⏝\\\",\\\"Union\\\":\\\"⋃\\\",\\\"UnionPlus\\\":\\\"⊎\\\",\\\"Uogon\\\":\\\"Ų\\\",\\\"uogon\\\":\\\"ų\\\",\\\"Uopf\\\":\\\"𝕌\\\",\\\"uopf\\\":\\\"𝕦\\\",\\\"UpArrowBar\\\":\\\"⤒\\\",\\\"uparrow\\\":\\\"↑\\\",\\\"UpArrow\\\":\\\"↑\\\",\\\"Uparrow\\\":\\\"⇑\\\",\\\"UpArrowDownArrow\\\":\\\"⇅\\\",\\\"updownarrow\\\":\\\"↕\\\",\\\"UpDownArrow\\\":\\\"↕\\\",\\\"Updownarrow\\\":\\\"⇕\\\",\\\"UpEquilibrium\\\":\\\"⥮\\\",\\\"upharpoonleft\\\":\\\"↿\\\",\\\"upharpoonright\\\":\\\"↾\\\",\\\"uplus\\\":\\\"⊎\\\",\\\"UpperLeftArrow\\\":\\\"↖\\\",\\\"UpperRightArrow\\\":\\\"↗\\\",\\\"upsi\\\":\\\"υ\\\",\\\"Upsi\\\":\\\"ϒ\\\",\\\"upsih\\\":\\\"ϒ\\\",\\\"Upsilon\\\":\\\"Υ\\\",\\\"upsilon\\\":\\\"υ\\\",\\\"UpTeeArrow\\\":\\\"↥\\\",\\\"UpTee\\\":\\\"⊥\\\",\\\"upuparrows\\\":\\\"⇈\\\",\\\"urcorn\\\":\\\"⌝\\\",\\\"urcorner\\\":\\\"⌝\\\",\\\"urcrop\\\":\\\"⌎\\\",\\\"Uring\\\":\\\"Ů\\\",\\\"uring\\\":\\\"ů\\\",\\\"urtri\\\":\\\"◹\\\",\\\"Uscr\\\":\\\"𝒰\\\",\\\"uscr\\\":\\\"𝓊\\\",\\\"utdot\\\":\\\"⋰\\\",\\\"Utilde\\\":\\\"Ũ\\\",\\\"utilde\\\":\\\"ũ\\\",\\\"utri\\\":\\\"▵\\\",\\\"utrif\\\":\\\"▴\\\",\\\"uuarr\\\":\\\"⇈\\\",\\\"Uuml\\\":\\\"Ü\\\",\\\"uuml\\\":\\\"ü\\\",\\\"uwangle\\\":\\\"⦧\\\",\\\"vangrt\\\":\\\"⦜\\\",\\\"varepsilon\\\":\\\"ϵ\\\",\\\"varkappa\\\":\\\"ϰ\\\",\\\"varnothing\\\":\\\"∅\\\",\\\"varphi\\\":\\\"ϕ\\\",\\\"varpi\\\":\\\"ϖ\\\",\\\"varpropto\\\":\\\"∝\\\",\\\"varr\\\":\\\"↕\\\",\\\"vArr\\\":\\\"⇕\\\",\\\"varrho\\\":\\\"ϱ\\\",\\\"varsigma\\\":\\\"ς\\\",\\\"varsubsetneq\\\":\\\"⊊︀\\\",\\\"varsubsetneqq\\\":\\\"⫋︀\\\",\\\"varsupsetneq\\\":\\\"⊋︀\\\",\\\"varsupsetneqq\\\":\\\"⫌︀\\\",\\\"vartheta\\\":\\\"ϑ\\\",\\\"vartriangleleft\\\":\\\"⊲\\\",\\\"vartriangleright\\\":\\\"⊳\\\",\\\"vBar\\\":\\\"⫨\\\",\\\"Vbar\\\":\\\"⫫\\\",\\\"vBarv\\\":\\\"⫩\\\",\\\"Vcy\\\":\\\"В\\\",\\\"vcy\\\":\\\"в\\\",\\\"vdash\\\":\\\"⊢\\\",\\\"vDash\\\":\\\"⊨\\\",\\\"Vdash\\\":\\\"⊩\\\",\\\"VDash\\\":\\\"⊫\\\",\\\"Vdashl\\\":\\\"⫦\\\",\\\"veebar\\\":\\\"⊻\\\",\\\"vee\\\":\\\"∨\\\",\\\"Vee\\\":\\\"⋁\\\",\\\"veeeq\\\":\\\"≚\\\",\\\"vellip\\\":\\\"⋮\\\",\\\"verbar\\\":\\\"|\\\",\\\"Verbar\\\":\\\"‖\\\",\\\"vert\\\":\\\"|\\\",\\\"Vert\\\":\\\"‖\\\",\\\"VerticalBar\\\":\\\"∣\\\",\\\"VerticalLine\\\":\\\"|\\\",\\\"VerticalSeparator\\\":\\\"❘\\\",\\\"VerticalTilde\\\":\\\"≀\\\",\\\"VeryThinSpace\\\":\\\" \\\",\\\"Vfr\\\":\\\"𝔙\\\",\\\"vfr\\\":\\\"𝔳\\\",\\\"vltri\\\":\\\"⊲\\\",\\\"vnsub\\\":\\\"⊂⃒\\\",\\\"vnsup\\\":\\\"⊃⃒\\\",\\\"Vopf\\\":\\\"𝕍\\\",\\\"vopf\\\":\\\"𝕧\\\",\\\"vprop\\\":\\\"∝\\\",\\\"vrtri\\\":\\\"⊳\\\",\\\"Vscr\\\":\\\"𝒱\\\",\\\"vscr\\\":\\\"𝓋\\\",\\\"vsubnE\\\":\\\"⫋︀\\\",\\\"vsubne\\\":\\\"⊊︀\\\",\\\"vsupnE\\\":\\\"⫌︀\\\",\\\"vsupne\\\":\\\"⊋︀\\\",\\\"Vvdash\\\":\\\"⊪\\\",\\\"vzigzag\\\":\\\"⦚\\\",\\\"Wcirc\\\":\\\"Ŵ\\\",\\\"wcirc\\\":\\\"ŵ\\\",\\\"wedbar\\\":\\\"⩟\\\",\\\"wedge\\\":\\\"∧\\\",\\\"Wedge\\\":\\\"⋀\\\",\\\"wedgeq\\\":\\\"≙\\\",\\\"weierp\\\":\\\"℘\\\",\\\"Wfr\\\":\\\"𝔚\\\",\\\"wfr\\\":\\\"𝔴\\\",\\\"Wopf\\\":\\\"𝕎\\\",\\\"wopf\\\":\\\"𝕨\\\",\\\"wp\\\":\\\"℘\\\",\\\"wr\\\":\\\"≀\\\",\\\"wreath\\\":\\\"≀\\\",\\\"Wscr\\\":\\\"𝒲\\\",\\\"wscr\\\":\\\"𝓌\\\",\\\"xcap\\\":\\\"⋂\\\",\\\"xcirc\\\":\\\"◯\\\",\\\"xcup\\\":\\\"⋃\\\",\\\"xdtri\\\":\\\"▽\\\",\\\"Xfr\\\":\\\"𝔛\\\",\\\"xfr\\\":\\\"𝔵\\\",\\\"xharr\\\":\\\"⟷\\\",\\\"xhArr\\\":\\\"⟺\\\",\\\"Xi\\\":\\\"Ξ\\\",\\\"xi\\\":\\\"ξ\\\",\\\"xlarr\\\":\\\"⟵\\\",\\\"xlArr\\\":\\\"⟸\\\",\\\"xmap\\\":\\\"⟼\\\",\\\"xnis\\\":\\\"⋻\\\",\\\"xodot\\\":\\\"⨀\\\",\\\"Xopf\\\":\\\"𝕏\\\",\\\"xopf\\\":\\\"𝕩\\\",\\\"xoplus\\\":\\\"⨁\\\",\\\"xotime\\\":\\\"⨂\\\",\\\"xrarr\\\":\\\"⟶\\\",\\\"xrArr\\\":\\\"⟹\\\",\\\"Xscr\\\":\\\"𝒳\\\",\\\"xscr\\\":\\\"𝓍\\\",\\\"xsqcup\\\":\\\"⨆\\\",\\\"xuplus\\\":\\\"⨄\\\",\\\"xutri\\\":\\\"△\\\",\\\"xvee\\\":\\\"⋁\\\",\\\"xwedge\\\":\\\"⋀\\\",\\\"Yacute\\\":\\\"Ý\\\",\\\"yacute\\\":\\\"ý\\\",\\\"YAcy\\\":\\\"Я\\\",\\\"yacy\\\":\\\"я\\\",\\\"Ycirc\\\":\\\"Ŷ\\\",\\\"ycirc\\\":\\\"ŷ\\\",\\\"Ycy\\\":\\\"Ы\\\",\\\"ycy\\\":\\\"ы\\\",\\\"yen\\\":\\\"¥\\\",\\\"Yfr\\\":\\\"𝔜\\\",\\\"yfr\\\":\\\"𝔶\\\",\\\"YIcy\\\":\\\"Ї\\\",\\\"yicy\\\":\\\"ї\\\",\\\"Yopf\\\":\\\"𝕐\\\",\\\"yopf\\\":\\\"𝕪\\\",\\\"Yscr\\\":\\\"𝒴\\\",\\\"yscr\\\":\\\"𝓎\\\",\\\"YUcy\\\":\\\"Ю\\\",\\\"yucy\\\":\\\"ю\\\",\\\"yuml\\\":\\\"ÿ\\\",\\\"Yuml\\\":\\\"Ÿ\\\",\\\"Zacute\\\":\\\"Ź\\\",\\\"zacute\\\":\\\"ź\\\",\\\"Zcaron\\\":\\\"Ž\\\",\\\"zcaron\\\":\\\"ž\\\",\\\"Zcy\\\":\\\"З\\\",\\\"zcy\\\":\\\"з\\\",\\\"Zdot\\\":\\\"Ż\\\",\\\"zdot\\\":\\\"ż\\\",\\\"zeetrf\\\":\\\"ℨ\\\",\\\"ZeroWidthSpace\\\":\\\"​\\\",\\\"Zeta\\\":\\\"Ζ\\\",\\\"zeta\\\":\\\"ζ\\\",\\\"zfr\\\":\\\"𝔷\\\",\\\"Zfr\\\":\\\"ℨ\\\",\\\"ZHcy\\\":\\\"Ж\\\",\\\"zhcy\\\":\\\"ж\\\",\\\"zigrarr\\\":\\\"⇝\\\",\\\"zopf\\\":\\\"𝕫\\\",\\\"Zopf\\\":\\\"ℤ\\\",\\\"Zscr\\\":\\\"𝒵\\\",\\\"zscr\\\":\\\"𝓏\\\",\\\"zwj\\\":\\\"‍\\\",\\\"zwnj\\\":\\\"‌\\\"}\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/maps/legacy.json":
/*!*******************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/maps/legacy.json ***!
  \*******************************************************************************/
/*! exports provided: Aacute, aacute, Acirc, acirc, acute, AElig, aelig, Agrave, agrave, amp, AMP, Aring, aring, Atilde, atilde, Auml, auml, brvbar, Ccedil, ccedil, cedil, cent, copy, COPY, curren, deg, divide, Eacute, eacute, Ecirc, ecirc, Egrave, egrave, ETH, eth, Euml, euml, frac12, frac14, frac34, gt, GT, Iacute, iacute, Icirc, icirc, iexcl, Igrave, igrave, iquest, Iuml, iuml, laquo, lt, LT, macr, micro, middot, nbsp, not, Ntilde, ntilde, Oacute, oacute, Ocirc, ocirc, Ograve, ograve, ordf, ordm, Oslash, oslash, Otilde, otilde, Ouml, ouml, para, plusmn, pound, quot, QUOT, raquo, reg, REG, sect, shy, sup1, sup2, sup3, szlig, THORN, thorn, times, Uacute, uacute, Ucirc, ucirc, Ugrave, ugrave, uml, Uuml, uuml, Yacute, yacute, yen, yuml, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"{\\\"Aacute\\\":\\\"Á\\\",\\\"aacute\\\":\\\"á\\\",\\\"Acirc\\\":\\\"Â\\\",\\\"acirc\\\":\\\"â\\\",\\\"acute\\\":\\\"´\\\",\\\"AElig\\\":\\\"Æ\\\",\\\"aelig\\\":\\\"æ\\\",\\\"Agrave\\\":\\\"À\\\",\\\"agrave\\\":\\\"à\\\",\\\"amp\\\":\\\"&\\\",\\\"AMP\\\":\\\"&\\\",\\\"Aring\\\":\\\"Å\\\",\\\"aring\\\":\\\"å\\\",\\\"Atilde\\\":\\\"Ã\\\",\\\"atilde\\\":\\\"ã\\\",\\\"Auml\\\":\\\"Ä\\\",\\\"auml\\\":\\\"ä\\\",\\\"brvbar\\\":\\\"¦\\\",\\\"Ccedil\\\":\\\"Ç\\\",\\\"ccedil\\\":\\\"ç\\\",\\\"cedil\\\":\\\"¸\\\",\\\"cent\\\":\\\"¢\\\",\\\"copy\\\":\\\"©\\\",\\\"COPY\\\":\\\"©\\\",\\\"curren\\\":\\\"¤\\\",\\\"deg\\\":\\\"°\\\",\\\"divide\\\":\\\"÷\\\",\\\"Eacute\\\":\\\"É\\\",\\\"eacute\\\":\\\"é\\\",\\\"Ecirc\\\":\\\"Ê\\\",\\\"ecirc\\\":\\\"ê\\\",\\\"Egrave\\\":\\\"È\\\",\\\"egrave\\\":\\\"è\\\",\\\"ETH\\\":\\\"Ð\\\",\\\"eth\\\":\\\"ð\\\",\\\"Euml\\\":\\\"Ë\\\",\\\"euml\\\":\\\"ë\\\",\\\"frac12\\\":\\\"½\\\",\\\"frac14\\\":\\\"¼\\\",\\\"frac34\\\":\\\"¾\\\",\\\"gt\\\":\\\">\\\",\\\"GT\\\":\\\">\\\",\\\"Iacute\\\":\\\"Í\\\",\\\"iacute\\\":\\\"í\\\",\\\"Icirc\\\":\\\"Î\\\",\\\"icirc\\\":\\\"î\\\",\\\"iexcl\\\":\\\"¡\\\",\\\"Igrave\\\":\\\"Ì\\\",\\\"igrave\\\":\\\"ì\\\",\\\"iquest\\\":\\\"¿\\\",\\\"Iuml\\\":\\\"Ï\\\",\\\"iuml\\\":\\\"ï\\\",\\\"laquo\\\":\\\"«\\\",\\\"lt\\\":\\\"<\\\",\\\"LT\\\":\\\"<\\\",\\\"macr\\\":\\\"¯\\\",\\\"micro\\\":\\\"µ\\\",\\\"middot\\\":\\\"·\\\",\\\"nbsp\\\":\\\" \\\",\\\"not\\\":\\\"¬\\\",\\\"Ntilde\\\":\\\"Ñ\\\",\\\"ntilde\\\":\\\"ñ\\\",\\\"Oacute\\\":\\\"Ó\\\",\\\"oacute\\\":\\\"ó\\\",\\\"Ocirc\\\":\\\"Ô\\\",\\\"ocirc\\\":\\\"ô\\\",\\\"Ograve\\\":\\\"Ò\\\",\\\"ograve\\\":\\\"ò\\\",\\\"ordf\\\":\\\"ª\\\",\\\"ordm\\\":\\\"º\\\",\\\"Oslash\\\":\\\"Ø\\\",\\\"oslash\\\":\\\"ø\\\",\\\"Otilde\\\":\\\"Õ\\\",\\\"otilde\\\":\\\"õ\\\",\\\"Ouml\\\":\\\"Ö\\\",\\\"ouml\\\":\\\"ö\\\",\\\"para\\\":\\\"¶\\\",\\\"plusmn\\\":\\\"±\\\",\\\"pound\\\":\\\"£\\\",\\\"quot\\\":\\\"\\\\\\\"\\\",\\\"QUOT\\\":\\\"\\\\\\\"\\\",\\\"raquo\\\":\\\"»\\\",\\\"reg\\\":\\\"®\\\",\\\"REG\\\":\\\"®\\\",\\\"sect\\\":\\\"§\\\",\\\"shy\\\":\\\"­\\\",\\\"sup1\\\":\\\"¹\\\",\\\"sup2\\\":\\\"²\\\",\\\"sup3\\\":\\\"³\\\",\\\"szlig\\\":\\\"ß\\\",\\\"THORN\\\":\\\"Þ\\\",\\\"thorn\\\":\\\"þ\\\",\\\"times\\\":\\\"×\\\",\\\"Uacute\\\":\\\"Ú\\\",\\\"uacute\\\":\\\"ú\\\",\\\"Ucirc\\\":\\\"Û\\\",\\\"ucirc\\\":\\\"û\\\",\\\"Ugrave\\\":\\\"Ù\\\",\\\"ugrave\\\":\\\"ù\\\",\\\"uml\\\":\\\"¨\\\",\\\"Uuml\\\":\\\"Ü\\\",\\\"uuml\\\":\\\"ü\\\",\\\"Yacute\\\":\\\"Ý\\\",\\\"yacute\\\":\\\"ý\\\",\\\"yen\\\":\\\"¥\\\",\\\"yuml\\\":\\\"ÿ\\\"}\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/maps/legacy.json?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json":
/*!****************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json ***!
  \****************************************************************************/
/*! exports provided: amp, apos, gt, lt, quot, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"{\\\"amp\\\":\\\"&\\\",\\\"apos\\\":\\\"'\\\",\\\"gt\\\":\\\">\\\",\\\"lt\\\":\\\"<\\\",\\\"quot\\\":\\\"\\\\\\\"\\\"}\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/escape-string-regexp/index.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/escape-string-regexp/index.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/escape-string-regexp/index.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/htmlparser2/lib/FeedHandler.js":
/*!********************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/htmlparser2/lib/FeedHandler.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseFeed = exports.FeedHandler = void 0;\nvar domhandler_1 = __importDefault(__webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\"));\nvar DomUtils = __importStar(__webpack_require__(/*! domutils */ \"./node_modules/sanitize-html/node_modules/domutils/lib/index.js\"));\nvar Parser_1 = __webpack_require__(/*! ./Parser */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/Parser.js\");\nvar FeedItemMediaMedium;\n(function (FeedItemMediaMedium) {\n    FeedItemMediaMedium[FeedItemMediaMedium[\"image\"] = 0] = \"image\";\n    FeedItemMediaMedium[FeedItemMediaMedium[\"audio\"] = 1] = \"audio\";\n    FeedItemMediaMedium[FeedItemMediaMedium[\"video\"] = 2] = \"video\";\n    FeedItemMediaMedium[FeedItemMediaMedium[\"document\"] = 3] = \"document\";\n    FeedItemMediaMedium[FeedItemMediaMedium[\"executable\"] = 4] = \"executable\";\n})(FeedItemMediaMedium || (FeedItemMediaMedium = {}));\nvar FeedItemMediaExpression;\n(function (FeedItemMediaExpression) {\n    FeedItemMediaExpression[FeedItemMediaExpression[\"sample\"] = 0] = \"sample\";\n    FeedItemMediaExpression[FeedItemMediaExpression[\"full\"] = 1] = \"full\";\n    FeedItemMediaExpression[FeedItemMediaExpression[\"nonstop\"] = 2] = \"nonstop\";\n})(FeedItemMediaExpression || (FeedItemMediaExpression = {}));\n// TODO: Consume data as it is coming in\nvar FeedHandler = /** @class */ (function (_super) {\n    __extends(FeedHandler, _super);\n    /**\n     *\n     * @param callback\n     * @param options\n     */\n    function FeedHandler(callback, options) {\n        var _this = this;\n        if (typeof callback === \"object\") {\n            callback = undefined;\n            options = callback;\n        }\n        _this = _super.call(this, callback, options) || this;\n        return _this;\n    }\n    FeedHandler.prototype.onend = function () {\n        var _a, _b;\n        var feedRoot = getOneElement(isValidFeed, this.dom);\n        if (!feedRoot) {\n            this.handleCallback(new Error(\"couldn't find root of feed\"));\n            return;\n        }\n        var feed = {};\n        if (feedRoot.name === \"feed\") {\n            var childs = feedRoot.children;\n            feed.type = \"atom\";\n            addConditionally(feed, \"id\", \"id\", childs);\n            addConditionally(feed, \"title\", \"title\", childs);\n            var href = getAttribute(\"href\", getOneElement(\"link\", childs));\n            if (href) {\n                feed.link = href;\n            }\n            addConditionally(feed, \"description\", \"subtitle\", childs);\n            var updated = fetch(\"updated\", childs);\n            if (updated) {\n                feed.updated = new Date(updated);\n            }\n            addConditionally(feed, \"author\", \"email\", childs, true);\n            feed.items = getElements(\"entry\", childs).map(function (item) {\n                var entry = {};\n                var children = item.children;\n                addConditionally(entry, \"id\", \"id\", children);\n                addConditionally(entry, \"title\", \"title\", children);\n                var href = getAttribute(\"href\", getOneElement(\"link\", children));\n                if (href) {\n                    entry.link = href;\n                }\n                var description = fetch(\"summary\", children) || fetch(\"content\", children);\n                if (description) {\n                    entry.description = description;\n                }\n                var pubDate = fetch(\"updated\", children);\n                if (pubDate) {\n                    entry.pubDate = new Date(pubDate);\n                }\n                entry.media = getMediaElements(children);\n                return entry;\n            });\n        }\n        else {\n            var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n            feed.type = feedRoot.name.substr(0, 3);\n            feed.id = \"\";\n            addConditionally(feed, \"title\", \"title\", childs);\n            addConditionally(feed, \"link\", \"link\", childs);\n            addConditionally(feed, \"description\", \"description\", childs);\n            var updated = fetch(\"lastBuildDate\", childs);\n            if (updated) {\n                feed.updated = new Date(updated);\n            }\n            addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n            feed.items = getElements(\"item\", feedRoot.children).map(function (item) {\n                var entry = {};\n                var children = item.children;\n                addConditionally(entry, \"id\", \"guid\", children);\n                addConditionally(entry, \"title\", \"title\", children);\n                addConditionally(entry, \"link\", \"link\", children);\n                addConditionally(entry, \"description\", \"description\", children);\n                var pubDate = fetch(\"pubDate\", children);\n                if (pubDate)\n                    entry.pubDate = new Date(pubDate);\n                entry.media = getMediaElements(children);\n                return entry;\n            });\n        }\n        this.feed = feed;\n        this.handleCallback(null);\n    };\n    return FeedHandler;\n}(domhandler_1.default));\nexports.FeedHandler = FeedHandler;\nfunction getMediaElements(where) {\n    return getElements(\"media:content\", where).map(function (elem) {\n        var media = {\n            medium: elem.attribs.medium,\n            isDefault: !!elem.attribs.isDefault,\n        };\n        if (elem.attribs.url) {\n            media.url = elem.attribs.url;\n        }\n        if (elem.attribs.fileSize) {\n            media.fileSize = parseInt(elem.attribs.fileSize, 10);\n        }\n        if (elem.attribs.type) {\n            media.type = elem.attribs.type;\n        }\n        if (elem.attribs.expression) {\n            media.expression = elem.attribs\n                .expression;\n        }\n        if (elem.attribs.bitrate) {\n            media.bitrate = parseInt(elem.attribs.bitrate, 10);\n        }\n        if (elem.attribs.framerate) {\n            media.framerate = parseInt(elem.attribs.framerate, 10);\n        }\n        if (elem.attribs.samplingrate) {\n            media.samplingrate = parseInt(elem.attribs.samplingrate, 10);\n        }\n        if (elem.attribs.channels) {\n            media.channels = parseInt(elem.attribs.channels, 10);\n        }\n        if (elem.attribs.duration) {\n            media.duration = parseInt(elem.attribs.duration, 10);\n        }\n        if (elem.attribs.height) {\n            media.height = parseInt(elem.attribs.height, 10);\n        }\n        if (elem.attribs.width) {\n            media.width = parseInt(elem.attribs.width, 10);\n        }\n        if (elem.attribs.lang) {\n            media.lang = elem.attribs.lang;\n        }\n        return media;\n    });\n}\nfunction getElements(tagName, where) {\n    return DomUtils.getElementsByTagName(tagName, where, true);\n}\nfunction getOneElement(tagName, node) {\n    return DomUtils.getElementsByTagName(tagName, node, true, 1)[0];\n}\nfunction fetch(tagName, where, recurse) {\n    if (recurse === void 0) { recurse = false; }\n    return DomUtils.getText(DomUtils.getElementsByTagName(tagName, where, recurse, 1)).trim();\n}\nfunction getAttribute(name, elem) {\n    if (!elem) {\n        return null;\n    }\n    var attribs = elem.attribs;\n    return attribs[name];\n}\nfunction addConditionally(obj, prop, what, where, recurse) {\n    if (recurse === void 0) { recurse = false; }\n    var tmp = fetch(what, where, recurse);\n    if (tmp)\n        obj[prop] = tmp;\n}\nfunction isValidFeed(value) {\n    return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this option, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n    if (options === void 0) { options = { xmlMode: true }; }\n    var handler = new FeedHandler(options);\n    new Parser_1.Parser(handler, options).end(feed);\n    return handler.feed;\n}\nexports.parseFeed = parseFeed;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/htmlparser2/lib/FeedHandler.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/htmlparser2/lib/Parser.js":
/*!***************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/htmlparser2/lib/Parser.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Parser = void 0;\nvar Tokenizer_1 = __importDefault(__webpack_require__(/*! ./Tokenizer */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js\"));\nvar formTags = new Set([\n    \"input\",\n    \"option\",\n    \"optgroup\",\n    \"select\",\n    \"button\",\n    \"datalist\",\n    \"textarea\",\n]);\nvar pTag = new Set([\"p\"]);\nvar openImpliesClose = {\n    tr: new Set([\"tr\", \"th\", \"td\"]),\n    th: new Set([\"th\"]),\n    td: new Set([\"thead\", \"th\", \"td\"]),\n    body: new Set([\"head\", \"link\", \"script\"]),\n    li: new Set([\"li\"]),\n    p: pTag,\n    h1: pTag,\n    h2: pTag,\n    h3: pTag,\n    h4: pTag,\n    h5: pTag,\n    h6: pTag,\n    select: formTags,\n    input: formTags,\n    output: formTags,\n    button: formTags,\n    datalist: formTags,\n    textarea: formTags,\n    option: new Set([\"option\"]),\n    optgroup: new Set([\"optgroup\", \"option\"]),\n    dd: new Set([\"dt\", \"dd\"]),\n    dt: new Set([\"dt\", \"dd\"]),\n    address: pTag,\n    article: pTag,\n    aside: pTag,\n    blockquote: pTag,\n    details: pTag,\n    div: pTag,\n    dl: pTag,\n    fieldset: pTag,\n    figcaption: pTag,\n    figure: pTag,\n    footer: pTag,\n    form: pTag,\n    header: pTag,\n    hr: pTag,\n    main: pTag,\n    nav: pTag,\n    ol: pTag,\n    pre: pTag,\n    section: pTag,\n    table: pTag,\n    ul: pTag,\n    rt: new Set([\"rt\", \"rp\"]),\n    rp: new Set([\"rt\", \"rp\"]),\n    tbody: new Set([\"thead\", \"tbody\"]),\n    tfoot: new Set([\"thead\", \"tbody\"]),\n};\nvar voidElements = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\nvar foreignContextElements = new Set([\"math\", \"svg\"]);\nvar htmlIntegrationElements = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignObject\",\n    \"desc\",\n    \"title\",\n]);\nvar reNameEnd = /\\s|\\//;\nvar Parser = /** @class */ (function () {\n    function Parser(cbs, options) {\n        if (options === void 0) { options = {}; }\n        var _a, _b, _c, _d, _e;\n        /** The start index of the last event. */\n        this.startIndex = 0;\n        /** The end index of the last event. */\n        this.endIndex = null;\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribvalue = \"\";\n        this.attribs = null;\n        this.stack = [];\n        this.foreignContext = [];\n        this.options = options;\n        this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n        this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n        this.lowerCaseAttributeNames =\n            (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n        this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);\n        (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n    }\n    Parser.prototype.updatePosition = function (initialOffset) {\n        if (this.endIndex === null) {\n            if (this.tokenizer.sectionStart <= initialOffset) {\n                this.startIndex = 0;\n            }\n            else {\n                this.startIndex = this.tokenizer.sectionStart - initialOffset;\n            }\n        }\n        else {\n            this.startIndex = this.endIndex + 1;\n        }\n        this.endIndex = this.tokenizer.getAbsoluteIndex();\n    };\n    // Tokenizer event handlers\n    Parser.prototype.ontext = function (data) {\n        var _a, _b;\n        this.updatePosition(1);\n        this.endIndex--;\n        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n    };\n    Parser.prototype.onopentagname = function (name) {\n        var _a, _b;\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        this.tagname = name;\n        if (!this.options.xmlMode &&\n            Object.prototype.hasOwnProperty.call(openImpliesClose, name)) {\n            var el = void 0;\n            while (this.stack.length > 0 &&\n                openImpliesClose[name].has((el = this.stack[this.stack.length - 1]))) {\n                this.onclosetag(el);\n            }\n        }\n        if (this.options.xmlMode || !voidElements.has(name)) {\n            this.stack.push(name);\n            if (foreignContextElements.has(name)) {\n                this.foreignContext.push(true);\n            }\n            else if (htmlIntegrationElements.has(name)) {\n                this.foreignContext.push(false);\n            }\n        }\n        (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n        if (this.cbs.onopentag)\n            this.attribs = {};\n    };\n    Parser.prototype.onopentagend = function () {\n        var _a, _b;\n        this.updatePosition(1);\n        if (this.attribs) {\n            (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs);\n            this.attribs = null;\n        }\n        if (!this.options.xmlMode &&\n            this.cbs.onclosetag &&\n            voidElements.has(this.tagname)) {\n            this.cbs.onclosetag(this.tagname);\n        }\n        this.tagname = \"\";\n    };\n    Parser.prototype.onclosetag = function (name) {\n        this.updatePosition(1);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        if (foreignContextElements.has(name) ||\n            htmlIntegrationElements.has(name)) {\n            this.foreignContext.pop();\n        }\n        if (this.stack.length &&\n            (this.options.xmlMode || !voidElements.has(name))) {\n            var pos = this.stack.lastIndexOf(name);\n            if (pos !== -1) {\n                if (this.cbs.onclosetag) {\n                    pos = this.stack.length - pos;\n                    while (pos--) {\n                        // We know the stack has sufficient elements.\n                        this.cbs.onclosetag(this.stack.pop());\n                    }\n                }\n                else\n                    this.stack.length = pos;\n            }\n            else if (name === \"p\" && !this.options.xmlMode) {\n                this.onopentagname(name);\n                this.closeCurrentTag();\n            }\n        }\n        else if (!this.options.xmlMode && (name === \"br\" || name === \"p\")) {\n            this.onopentagname(name);\n            this.closeCurrentTag();\n        }\n    };\n    Parser.prototype.onselfclosingtag = function () {\n        if (this.options.xmlMode ||\n            this.options.recognizeSelfClosing ||\n            this.foreignContext[this.foreignContext.length - 1]) {\n            this.closeCurrentTag();\n        }\n        else {\n            this.onopentagend();\n        }\n    };\n    Parser.prototype.closeCurrentTag = function () {\n        var _a, _b;\n        var name = this.tagname;\n        this.onopentagend();\n        /*\n         * Self-closing tags will be on the top of the stack\n         * (cheaper check than in onclosetag)\n         */\n        if (this.stack[this.stack.length - 1] === name) {\n            (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n            this.stack.pop();\n        }\n    };\n    Parser.prototype.onattribname = function (name) {\n        if (this.lowerCaseAttributeNames) {\n            name = name.toLowerCase();\n        }\n        this.attribname = name;\n    };\n    Parser.prototype.onattribdata = function (value) {\n        this.attribvalue += value;\n    };\n    Parser.prototype.onattribend = function (quote) {\n        var _a, _b;\n        (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);\n        if (this.attribs &&\n            !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n            this.attribs[this.attribname] = this.attribvalue;\n        }\n        this.attribname = \"\";\n        this.attribvalue = \"\";\n    };\n    Parser.prototype.getInstructionName = function (value) {\n        var idx = value.search(reNameEnd);\n        var name = idx < 0 ? value : value.substr(0, idx);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        return name;\n    };\n    Parser.prototype.ondeclaration = function (value) {\n        if (this.cbs.onprocessinginstruction) {\n            var name_1 = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(\"!\" + name_1, \"!\" + value);\n        }\n    };\n    Parser.prototype.onprocessinginstruction = function (value) {\n        if (this.cbs.onprocessinginstruction) {\n            var name_2 = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(\"?\" + name_2, \"?\" + value);\n        }\n    };\n    Parser.prototype.oncomment = function (value) {\n        var _a, _b, _c, _d;\n        this.updatePosition(4);\n        (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n        (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n    };\n    Parser.prototype.oncdata = function (value) {\n        var _a, _b, _c, _d, _e, _f;\n        this.updatePosition(1);\n        if (this.options.xmlMode || this.options.recognizeCDATA) {\n            (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n            (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n            (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n        }\n        else {\n            this.oncomment(\"[CDATA[\" + value + \"]]\");\n        }\n    };\n    Parser.prototype.onerror = function (err) {\n        var _a, _b;\n        (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n    };\n    Parser.prototype.onend = function () {\n        var _a, _b;\n        if (this.cbs.onclosetag) {\n            for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i]))\n                ;\n        }\n        (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n    };\n    /**\n     * Resets the parser to a blank state, ready to parse a new HTML document\n     */\n    Parser.prototype.reset = function () {\n        var _a, _b, _c, _d;\n        (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n        this.tokenizer.reset();\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribs = null;\n        this.stack = [];\n        (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n    };\n    /**\n     * Resets the parser, then parses a complete document and\n     * pushes it to the handler.\n     *\n     * @param data Document to parse.\n     */\n    Parser.prototype.parseComplete = function (data) {\n        this.reset();\n        this.end(data);\n    };\n    /**\n     * Parses a chunk of data and calls the corresponding callbacks.\n     *\n     * @param chunk Chunk to parse.\n     */\n    Parser.prototype.write = function (chunk) {\n        this.tokenizer.write(chunk);\n    };\n    /**\n     * Parses the end of the buffer and clears the stack, calls onend.\n     *\n     * @param chunk Optional final chunk to parse.\n     */\n    Parser.prototype.end = function (chunk) {\n        this.tokenizer.end(chunk);\n    };\n    /**\n     * Pauses parsing. The parser won't emit events until `resume` is called.\n     */\n    Parser.prototype.pause = function () {\n        this.tokenizer.pause();\n    };\n    /**\n     * Resumes parsing after `pause` was called.\n     */\n    Parser.prototype.resume = function () {\n        this.tokenizer.resume();\n    };\n    /**\n     * Alias of `write`, for backwards compatibility.\n     *\n     * @param chunk Chunk to parse.\n     * @deprecated\n     */\n    Parser.prototype.parseChunk = function (chunk) {\n        this.write(chunk);\n    };\n    /**\n     * Alias of `end`, for backwards compatibility.\n     *\n     * @param chunk Optional final chunk to parse.\n     * @deprecated\n     */\n    Parser.prototype.done = function (chunk) {\n        this.end(chunk);\n    };\n    return Parser;\n}());\nexports.Parser = Parser;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/htmlparser2/lib/Parser.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js":
/*!******************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_codepoint_1 = __importDefault(__webpack_require__(/*! entities/lib/decode_codepoint */ \"./node_modules/sanitize-html/node_modules/entities/lib/decode_codepoint.js\"));\nvar entities_json_1 = __importDefault(__webpack_require__(/*! entities/lib/maps/entities.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/entities.json\"));\nvar legacy_json_1 = __importDefault(__webpack_require__(/*! entities/lib/maps/legacy.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/legacy.json\"));\nvar xml_json_1 = __importDefault(__webpack_require__(/*! entities/lib/maps/xml.json */ \"./node_modules/sanitize-html/node_modules/entities/lib/maps/xml.json\"));\nfunction whitespace(c) {\n    return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\nfunction isASCIIAlpha(c) {\n    return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\");\n}\nfunction ifElseState(upper, SUCCESS, FAILURE) {\n    var lower = upper.toLowerCase();\n    if (upper === lower) {\n        return function (t, c) {\n            if (c === lower) {\n                t._state = SUCCESS;\n            }\n            else {\n                t._state = FAILURE;\n                t._index--;\n            }\n        };\n    }\n    return function (t, c) {\n        if (c === lower || c === upper) {\n            t._state = SUCCESS;\n        }\n        else {\n            t._state = FAILURE;\n            t._index--;\n        }\n    };\n}\nfunction consumeSpecialNameChar(upper, NEXT_STATE) {\n    var lower = upper.toLowerCase();\n    return function (t, c) {\n        if (c === lower || c === upper) {\n            t._state = NEXT_STATE;\n        }\n        else {\n            t._state = 3 /* InTagName */;\n            t._index--; // Consume the token again\n        }\n    };\n}\nvar stateBeforeCdata1 = ifElseState(\"C\", 24 /* BeforeCdata2 */, 16 /* InDeclaration */);\nvar stateBeforeCdata2 = ifElseState(\"D\", 25 /* BeforeCdata3 */, 16 /* InDeclaration */);\nvar stateBeforeCdata3 = ifElseState(\"A\", 26 /* BeforeCdata4 */, 16 /* InDeclaration */);\nvar stateBeforeCdata4 = ifElseState(\"T\", 27 /* BeforeCdata5 */, 16 /* InDeclaration */);\nvar stateBeforeCdata5 = ifElseState(\"A\", 28 /* BeforeCdata6 */, 16 /* InDeclaration */);\nvar stateBeforeScript1 = consumeSpecialNameChar(\"R\", 35 /* BeforeScript2 */);\nvar stateBeforeScript2 = consumeSpecialNameChar(\"I\", 36 /* BeforeScript3 */);\nvar stateBeforeScript3 = consumeSpecialNameChar(\"P\", 37 /* BeforeScript4 */);\nvar stateBeforeScript4 = consumeSpecialNameChar(\"T\", 38 /* BeforeScript5 */);\nvar stateAfterScript1 = ifElseState(\"R\", 40 /* AfterScript2 */, 1 /* Text */);\nvar stateAfterScript2 = ifElseState(\"I\", 41 /* AfterScript3 */, 1 /* Text */);\nvar stateAfterScript3 = ifElseState(\"P\", 42 /* AfterScript4 */, 1 /* Text */);\nvar stateAfterScript4 = ifElseState(\"T\", 43 /* AfterScript5 */, 1 /* Text */);\nvar stateBeforeStyle1 = consumeSpecialNameChar(\"Y\", 45 /* BeforeStyle2 */);\nvar stateBeforeStyle2 = consumeSpecialNameChar(\"L\", 46 /* BeforeStyle3 */);\nvar stateBeforeStyle3 = consumeSpecialNameChar(\"E\", 47 /* BeforeStyle4 */);\nvar stateAfterStyle1 = ifElseState(\"Y\", 49 /* AfterStyle2 */, 1 /* Text */);\nvar stateAfterStyle2 = ifElseState(\"L\", 50 /* AfterStyle3 */, 1 /* Text */);\nvar stateAfterStyle3 = ifElseState(\"E\", 51 /* AfterStyle4 */, 1 /* Text */);\nvar stateBeforeSpecialT = consumeSpecialNameChar(\"I\", 54 /* BeforeTitle1 */);\nvar stateBeforeTitle1 = consumeSpecialNameChar(\"T\", 55 /* BeforeTitle2 */);\nvar stateBeforeTitle2 = consumeSpecialNameChar(\"L\", 56 /* BeforeTitle3 */);\nvar stateBeforeTitle3 = consumeSpecialNameChar(\"E\", 57 /* BeforeTitle4 */);\nvar stateAfterSpecialTEnd = ifElseState(\"I\", 58 /* AfterTitle1 */, 1 /* Text */);\nvar stateAfterTitle1 = ifElseState(\"T\", 59 /* AfterTitle2 */, 1 /* Text */);\nvar stateAfterTitle2 = ifElseState(\"L\", 60 /* AfterTitle3 */, 1 /* Text */);\nvar stateAfterTitle3 = ifElseState(\"E\", 61 /* AfterTitle4 */, 1 /* Text */);\nvar stateBeforeEntity = ifElseState(\"#\", 63 /* BeforeNumericEntity */, 64 /* InNamedEntity */);\nvar stateBeforeNumericEntity = ifElseState(\"X\", 66 /* InHexEntity */, 65 /* InNumericEntity */);\nvar Tokenizer = /** @class */ (function () {\n    function Tokenizer(options, cbs) {\n        var _a;\n        /** The current state the tokenizer is in. */\n        this._state = 1 /* Text */;\n        /** The read buffer. */\n        this.buffer = \"\";\n        /** The beginning of the section that is currently being read. */\n        this.sectionStart = 0;\n        /** The index within the buffer that we are currently looking at. */\n        this._index = 0;\n        /**\n         * Data that has already been processed will be removed from the buffer occasionally.\n         * `_bufferOffset` keeps track of how many characters have been removed, to make sure position information is accurate.\n         */\n        this.bufferOffset = 0;\n        /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n        this.baseState = 1 /* Text */;\n        /** For special parsing behavior inside of script and style tags. */\n        this.special = 1 /* None */;\n        /** Indicates whether the tokenizer has been paused. */\n        this.running = true;\n        /** Indicates whether the tokenizer has finished running / `.end` has been called. */\n        this.ended = false;\n        this.cbs = cbs;\n        this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode);\n        this.decodeEntities = (_a = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a !== void 0 ? _a : true;\n    }\n    Tokenizer.prototype.reset = function () {\n        this._state = 1 /* Text */;\n        this.buffer = \"\";\n        this.sectionStart = 0;\n        this._index = 0;\n        this.bufferOffset = 0;\n        this.baseState = 1 /* Text */;\n        this.special = 1 /* None */;\n        this.running = true;\n        this.ended = false;\n    };\n    Tokenizer.prototype.write = function (chunk) {\n        if (this.ended)\n            this.cbs.onerror(Error(\".write() after done!\"));\n        this.buffer += chunk;\n        this.parse();\n    };\n    Tokenizer.prototype.end = function (chunk) {\n        if (this.ended)\n            this.cbs.onerror(Error(\".end() after done!\"));\n        if (chunk)\n            this.write(chunk);\n        this.ended = true;\n        if (this.running)\n            this.finish();\n    };\n    Tokenizer.prototype.pause = function () {\n        this.running = false;\n    };\n    Tokenizer.prototype.resume = function () {\n        this.running = true;\n        if (this._index < this.buffer.length) {\n            this.parse();\n        }\n        if (this.ended) {\n            this.finish();\n        }\n    };\n    /**\n     * The current index within all of the written data.\n     */\n    Tokenizer.prototype.getAbsoluteIndex = function () {\n        return this.bufferOffset + this._index;\n    };\n    Tokenizer.prototype.stateText = function (c) {\n        if (c === \"<\") {\n            if (this._index > this.sectionStart) {\n                this.cbs.ontext(this.getSection());\n            }\n            this._state = 2 /* BeforeTagName */;\n            this.sectionStart = this._index;\n        }\n        else if (this.decodeEntities &&\n            c === \"&\" &&\n            (this.special === 1 /* None */ || this.special === 4 /* Title */)) {\n            if (this._index > this.sectionStart) {\n                this.cbs.ontext(this.getSection());\n            }\n            this.baseState = 1 /* Text */;\n            this._state = 62 /* BeforeEntity */;\n            this.sectionStart = this._index;\n        }\n    };\n    /**\n     * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n     *\n     * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n     * We allow anything that wouldn't end the tag.\n     */\n    Tokenizer.prototype.isTagStartChar = function (c) {\n        return (isASCIIAlpha(c) ||\n            (this.xmlMode && !whitespace(c) && c !== \"/\" && c !== \">\"));\n    };\n    Tokenizer.prototype.stateBeforeTagName = function (c) {\n        if (c === \"/\") {\n            this._state = 5 /* BeforeClosingTagName */;\n        }\n        else if (c === \"<\") {\n            this.cbs.ontext(this.getSection());\n            this.sectionStart = this._index;\n        }\n        else if (c === \">\" ||\n            this.special !== 1 /* None */ ||\n            whitespace(c)) {\n            this._state = 1 /* Text */;\n        }\n        else if (c === \"!\") {\n            this._state = 15 /* BeforeDeclaration */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (c === \"?\") {\n            this._state = 17 /* InProcessingInstruction */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (!this.isTagStartChar(c)) {\n            this._state = 1 /* Text */;\n        }\n        else {\n            this._state =\n                !this.xmlMode && (c === \"s\" || c === \"S\")\n                    ? 32 /* BeforeSpecialS */\n                    : !this.xmlMode && (c === \"t\" || c === \"T\")\n                        ? 52 /* BeforeSpecialT */\n                        : 3 /* InTagName */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateInTagName = function (c) {\n        if (c === \"/\" || c === \">\" || whitespace(c)) {\n            this.emitToken(\"onopentagname\");\n            this._state = 8 /* BeforeAttributeName */;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n        if (whitespace(c)) {\n            // Ignore\n        }\n        else if (c === \">\") {\n            this._state = 1 /* Text */;\n        }\n        else if (this.special !== 1 /* None */) {\n            if (this.special !== 4 /* Title */ && (c === \"s\" || c === \"S\")) {\n                this._state = 33 /* BeforeSpecialSEnd */;\n            }\n            else if (this.special === 4 /* Title */ &&\n                (c === \"t\" || c === \"T\")) {\n                this._state = 53 /* BeforeSpecialTEnd */;\n            }\n            else {\n                this._state = 1 /* Text */;\n                this._index--;\n            }\n        }\n        else if (!this.isTagStartChar(c)) {\n            this._state = 20 /* InSpecialComment */;\n            this.sectionStart = this._index;\n        }\n        else {\n            this._state = 6 /* InClosingTagName */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateInClosingTagName = function (c) {\n        if (c === \">\" || whitespace(c)) {\n            this.emitToken(\"onclosetag\");\n            this._state = 7 /* AfterClosingTagName */;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n        // Skip everything until \">\"\n        if (c === \">\") {\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n    };\n    Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n        if (c === \">\") {\n            this.cbs.onopentagend();\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (c === \"/\") {\n            this._state = 4 /* InSelfClosingTag */;\n        }\n        else if (!whitespace(c)) {\n            this._state = 9 /* InAttributeName */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n        if (c === \">\") {\n            this.cbs.onselfclosingtag();\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n            this.special = 1 /* None */; // Reset special state, in case of self-closing special tags\n        }\n        else if (!whitespace(c)) {\n            this._state = 8 /* BeforeAttributeName */;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateInAttributeName = function (c) {\n        if (c === \"=\" || c === \"/\" || c === \">\" || whitespace(c)) {\n            this.cbs.onattribname(this.getSection());\n            this.sectionStart = -1;\n            this._state = 10 /* AfterAttributeName */;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateAfterAttributeName = function (c) {\n        if (c === \"=\") {\n            this._state = 11 /* BeforeAttributeValue */;\n        }\n        else if (c === \"/\" || c === \">\") {\n            this.cbs.onattribend(undefined);\n            this._state = 8 /* BeforeAttributeName */;\n            this._index--;\n        }\n        else if (!whitespace(c)) {\n            this.cbs.onattribend(undefined);\n            this._state = 9 /* InAttributeName */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n        if (c === '\"') {\n            this._state = 12 /* InAttributeValueDq */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (c === \"'\") {\n            this._state = 13 /* InAttributeValueSq */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (!whitespace(c)) {\n            this._state = 14 /* InAttributeValueNq */;\n            this.sectionStart = this._index;\n            this._index--; // Reconsume token\n        }\n    };\n    Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n        if (c === quote) {\n            this.emitToken(\"onattribdata\");\n            this.cbs.onattribend(quote);\n            this._state = 8 /* BeforeAttributeName */;\n        }\n        else if (this.decodeEntities && c === \"&\") {\n            this.emitToken(\"onattribdata\");\n            this.baseState = this._state;\n            this._state = 62 /* BeforeEntity */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n        this.handleInAttributeValue(c, '\"');\n    };\n    Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n        this.handleInAttributeValue(c, \"'\");\n    };\n    Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n        if (whitespace(c) || c === \">\") {\n            this.emitToken(\"onattribdata\");\n            this.cbs.onattribend(null);\n            this._state = 8 /* BeforeAttributeName */;\n            this._index--;\n        }\n        else if (this.decodeEntities && c === \"&\") {\n            this.emitToken(\"onattribdata\");\n            this.baseState = this._state;\n            this._state = 62 /* BeforeEntity */;\n            this.sectionStart = this._index;\n        }\n    };\n    Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n        this._state =\n            c === \"[\"\n                ? 23 /* BeforeCdata1 */\n                : c === \"-\"\n                    ? 18 /* BeforeComment */\n                    : 16 /* InDeclaration */;\n    };\n    Tokenizer.prototype.stateInDeclaration = function (c) {\n        if (c === \">\") {\n            this.cbs.ondeclaration(this.getSection());\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n    };\n    Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n        if (c === \">\") {\n            this.cbs.onprocessinginstruction(this.getSection());\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n    };\n    Tokenizer.prototype.stateBeforeComment = function (c) {\n        if (c === \"-\") {\n            this._state = 19 /* InComment */;\n            this.sectionStart = this._index + 1;\n        }\n        else {\n            this._state = 16 /* InDeclaration */;\n        }\n    };\n    Tokenizer.prototype.stateInComment = function (c) {\n        if (c === \"-\")\n            this._state = 21 /* AfterComment1 */;\n    };\n    Tokenizer.prototype.stateInSpecialComment = function (c) {\n        if (c === \">\") {\n            this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index));\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n    };\n    Tokenizer.prototype.stateAfterComment1 = function (c) {\n        if (c === \"-\") {\n            this._state = 22 /* AfterComment2 */;\n        }\n        else {\n            this._state = 19 /* InComment */;\n        }\n    };\n    Tokenizer.prototype.stateAfterComment2 = function (c) {\n        if (c === \">\") {\n            // Remove 2 trailing chars\n            this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2));\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (c !== \"-\") {\n            this._state = 19 /* InComment */;\n        }\n        // Else: stay in AFTER_COMMENT_2 (`--->`)\n    };\n    Tokenizer.prototype.stateBeforeCdata6 = function (c) {\n        if (c === \"[\") {\n            this._state = 29 /* InCdata */;\n            this.sectionStart = this._index + 1;\n        }\n        else {\n            this._state = 16 /* InDeclaration */;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateInCdata = function (c) {\n        if (c === \"]\")\n            this._state = 30 /* AfterCdata1 */;\n    };\n    Tokenizer.prototype.stateAfterCdata1 = function (c) {\n        if (c === \"]\")\n            this._state = 31 /* AfterCdata2 */;\n        else\n            this._state = 29 /* InCdata */;\n    };\n    Tokenizer.prototype.stateAfterCdata2 = function (c) {\n        if (c === \">\") {\n            // Remove 2 trailing chars\n            this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2));\n            this._state = 1 /* Text */;\n            this.sectionStart = this._index + 1;\n        }\n        else if (c !== \"]\") {\n            this._state = 29 /* InCdata */;\n        }\n        // Else: stay in AFTER_CDATA_2 (`]]]>`)\n    };\n    Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n        if (c === \"c\" || c === \"C\") {\n            this._state = 34 /* BeforeScript1 */;\n        }\n        else if (c === \"t\" || c === \"T\") {\n            this._state = 44 /* BeforeStyle1 */;\n        }\n        else {\n            this._state = 3 /* InTagName */;\n            this._index--; // Consume the token again\n        }\n    };\n    Tokenizer.prototype.stateBeforeSpecialSEnd = function (c) {\n        if (this.special === 2 /* Script */ && (c === \"c\" || c === \"C\")) {\n            this._state = 39 /* AfterScript1 */;\n        }\n        else if (this.special === 3 /* Style */ && (c === \"t\" || c === \"T\")) {\n            this._state = 48 /* AfterStyle1 */;\n        }\n        else\n            this._state = 1 /* Text */;\n    };\n    Tokenizer.prototype.stateBeforeSpecialLast = function (c, special) {\n        if (c === \"/\" || c === \">\" || whitespace(c)) {\n            this.special = special;\n        }\n        this._state = 3 /* InTagName */;\n        this._index--; // Consume the token again\n    };\n    Tokenizer.prototype.stateAfterSpecialLast = function (c, sectionStartOffset) {\n        if (c === \">\" || whitespace(c)) {\n            this.special = 1 /* None */;\n            this._state = 6 /* InClosingTagName */;\n            this.sectionStart = this._index - sectionStartOffset;\n            this._index--; // Reconsume the token\n        }\n        else\n            this._state = 1 /* Text */;\n    };\n    // For entities terminated with a semicolon\n    Tokenizer.prototype.parseFixedEntity = function (map) {\n        if (map === void 0) { map = this.xmlMode ? xml_json_1.default : entities_json_1.default; }\n        // Offset = 1\n        if (this.sectionStart + 1 < this._index) {\n            var entity = this.buffer.substring(this.sectionStart + 1, this._index);\n            if (Object.prototype.hasOwnProperty.call(map, entity)) {\n                this.emitPartial(map[entity]);\n                this.sectionStart = this._index + 1;\n            }\n        }\n    };\n    // Parses legacy entities (without trailing semicolon)\n    Tokenizer.prototype.parseLegacyEntity = function () {\n        var start = this.sectionStart + 1;\n        // The max length of legacy entities is 6\n        var limit = Math.min(this._index - start, 6);\n        while (limit >= 2) {\n            // The min length of legacy entities is 2\n            var entity = this.buffer.substr(start, limit);\n            if (Object.prototype.hasOwnProperty.call(legacy_json_1.default, entity)) {\n                this.emitPartial(legacy_json_1.default[entity]);\n                this.sectionStart += limit + 1;\n                return;\n            }\n            limit--;\n        }\n    };\n    Tokenizer.prototype.stateInNamedEntity = function (c) {\n        if (c === \";\") {\n            this.parseFixedEntity();\n            // Retry as legacy entity if entity wasn't parsed\n            if (this.baseState === 1 /* Text */ &&\n                this.sectionStart + 1 < this._index &&\n                !this.xmlMode) {\n                this.parseLegacyEntity();\n            }\n            this._state = this.baseState;\n        }\n        else if ((c < \"0\" || c > \"9\") && !isASCIIAlpha(c)) {\n            if (this.xmlMode || this.sectionStart + 1 === this._index) {\n                // Ignore\n            }\n            else if (this.baseState !== 1 /* Text */) {\n                if (c !== \"=\") {\n                    // Parse as legacy entity, without allowing additional characters.\n                    this.parseFixedEntity(legacy_json_1.default);\n                }\n            }\n            else {\n                this.parseLegacyEntity();\n            }\n            this._state = this.baseState;\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.decodeNumericEntity = function (offset, base, strict) {\n        var sectionStart = this.sectionStart + offset;\n        if (sectionStart !== this._index) {\n            // Parse entity\n            var entity = this.buffer.substring(sectionStart, this._index);\n            var parsed = parseInt(entity, base);\n            this.emitPartial(decode_codepoint_1.default(parsed));\n            this.sectionStart = strict ? this._index + 1 : this._index;\n        }\n        this._state = this.baseState;\n    };\n    Tokenizer.prototype.stateInNumericEntity = function (c) {\n        if (c === \";\") {\n            this.decodeNumericEntity(2, 10, true);\n        }\n        else if (c < \"0\" || c > \"9\") {\n            if (!this.xmlMode) {\n                this.decodeNumericEntity(2, 10, false);\n            }\n            else {\n                this._state = this.baseState;\n            }\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.stateInHexEntity = function (c) {\n        if (c === \";\") {\n            this.decodeNumericEntity(3, 16, true);\n        }\n        else if ((c < \"a\" || c > \"f\") &&\n            (c < \"A\" || c > \"F\") &&\n            (c < \"0\" || c > \"9\")) {\n            if (!this.xmlMode) {\n                this.decodeNumericEntity(3, 16, false);\n            }\n            else {\n                this._state = this.baseState;\n            }\n            this._index--;\n        }\n    };\n    Tokenizer.prototype.cleanup = function () {\n        if (this.sectionStart < 0) {\n            this.buffer = \"\";\n            this.bufferOffset += this._index;\n            this._index = 0;\n        }\n        else if (this.running) {\n            if (this._state === 1 /* Text */) {\n                if (this.sectionStart !== this._index) {\n                    this.cbs.ontext(this.buffer.substr(this.sectionStart));\n                }\n                this.buffer = \"\";\n                this.bufferOffset += this._index;\n                this._index = 0;\n            }\n            else if (this.sectionStart === this._index) {\n                // The section just started\n                this.buffer = \"\";\n                this.bufferOffset += this._index;\n                this._index = 0;\n            }\n            else {\n                // Remove everything unnecessary\n                this.buffer = this.buffer.substr(this.sectionStart);\n                this._index -= this.sectionStart;\n                this.bufferOffset += this.sectionStart;\n            }\n            this.sectionStart = 0;\n        }\n    };\n    /**\n     * Iterates through the buffer, calling the function corresponding to the current state.\n     *\n     * States that are more likely to be hit are higher up, as a performance improvement.\n     */\n    Tokenizer.prototype.parse = function () {\n        while (this._index < this.buffer.length && this.running) {\n            var c = this.buffer.charAt(this._index);\n            if (this._state === 1 /* Text */) {\n                this.stateText(c);\n            }\n            else if (this._state === 12 /* InAttributeValueDq */) {\n                this.stateInAttributeValueDoubleQuotes(c);\n            }\n            else if (this._state === 9 /* InAttributeName */) {\n                this.stateInAttributeName(c);\n            }\n            else if (this._state === 19 /* InComment */) {\n                this.stateInComment(c);\n            }\n            else if (this._state === 20 /* InSpecialComment */) {\n                this.stateInSpecialComment(c);\n            }\n            else if (this._state === 8 /* BeforeAttributeName */) {\n                this.stateBeforeAttributeName(c);\n            }\n            else if (this._state === 3 /* InTagName */) {\n                this.stateInTagName(c);\n            }\n            else if (this._state === 6 /* InClosingTagName */) {\n                this.stateInClosingTagName(c);\n            }\n            else if (this._state === 2 /* BeforeTagName */) {\n                this.stateBeforeTagName(c);\n            }\n            else if (this._state === 10 /* AfterAttributeName */) {\n                this.stateAfterAttributeName(c);\n            }\n            else if (this._state === 13 /* InAttributeValueSq */) {\n                this.stateInAttributeValueSingleQuotes(c);\n            }\n            else if (this._state === 11 /* BeforeAttributeValue */) {\n                this.stateBeforeAttributeValue(c);\n            }\n            else if (this._state === 5 /* BeforeClosingTagName */) {\n                this.stateBeforeClosingTagName(c);\n            }\n            else if (this._state === 7 /* AfterClosingTagName */) {\n                this.stateAfterClosingTagName(c);\n            }\n            else if (this._state === 32 /* BeforeSpecialS */) {\n                this.stateBeforeSpecialS(c);\n            }\n            else if (this._state === 21 /* AfterComment1 */) {\n                this.stateAfterComment1(c);\n            }\n            else if (this._state === 14 /* InAttributeValueNq */) {\n                this.stateInAttributeValueNoQuotes(c);\n            }\n            else if (this._state === 4 /* InSelfClosingTag */) {\n                this.stateInSelfClosingTag(c);\n            }\n            else if (this._state === 16 /* InDeclaration */) {\n                this.stateInDeclaration(c);\n            }\n            else if (this._state === 15 /* BeforeDeclaration */) {\n                this.stateBeforeDeclaration(c);\n            }\n            else if (this._state === 22 /* AfterComment2 */) {\n                this.stateAfterComment2(c);\n            }\n            else if (this._state === 18 /* BeforeComment */) {\n                this.stateBeforeComment(c);\n            }\n            else if (this._state === 33 /* BeforeSpecialSEnd */) {\n                this.stateBeforeSpecialSEnd(c);\n            }\n            else if (this._state === 53 /* BeforeSpecialTEnd */) {\n                stateAfterSpecialTEnd(this, c);\n            }\n            else if (this._state === 39 /* AfterScript1 */) {\n                stateAfterScript1(this, c);\n            }\n            else if (this._state === 40 /* AfterScript2 */) {\n                stateAfterScript2(this, c);\n            }\n            else if (this._state === 41 /* AfterScript3 */) {\n                stateAfterScript3(this, c);\n            }\n            else if (this._state === 34 /* BeforeScript1 */) {\n                stateBeforeScript1(this, c);\n            }\n            else if (this._state === 35 /* BeforeScript2 */) {\n                stateBeforeScript2(this, c);\n            }\n            else if (this._state === 36 /* BeforeScript3 */) {\n                stateBeforeScript3(this, c);\n            }\n            else if (this._state === 37 /* BeforeScript4 */) {\n                stateBeforeScript4(this, c);\n            }\n            else if (this._state === 38 /* BeforeScript5 */) {\n                this.stateBeforeSpecialLast(c, 2 /* Script */);\n            }\n            else if (this._state === 42 /* AfterScript4 */) {\n                stateAfterScript4(this, c);\n            }\n            else if (this._state === 43 /* AfterScript5 */) {\n                this.stateAfterSpecialLast(c, 6);\n            }\n            else if (this._state === 44 /* BeforeStyle1 */) {\n                stateBeforeStyle1(this, c);\n            }\n            else if (this._state === 29 /* InCdata */) {\n                this.stateInCdata(c);\n            }\n            else if (this._state === 45 /* BeforeStyle2 */) {\n                stateBeforeStyle2(this, c);\n            }\n            else if (this._state === 46 /* BeforeStyle3 */) {\n                stateBeforeStyle3(this, c);\n            }\n            else if (this._state === 47 /* BeforeStyle4 */) {\n                this.stateBeforeSpecialLast(c, 3 /* Style */);\n            }\n            else if (this._state === 48 /* AfterStyle1 */) {\n                stateAfterStyle1(this, c);\n            }\n            else if (this._state === 49 /* AfterStyle2 */) {\n                stateAfterStyle2(this, c);\n            }\n            else if (this._state === 50 /* AfterStyle3 */) {\n                stateAfterStyle3(this, c);\n            }\n            else if (this._state === 51 /* AfterStyle4 */) {\n                this.stateAfterSpecialLast(c, 5);\n            }\n            else if (this._state === 52 /* BeforeSpecialT */) {\n                stateBeforeSpecialT(this, c);\n            }\n            else if (this._state === 54 /* BeforeTitle1 */) {\n                stateBeforeTitle1(this, c);\n            }\n            else if (this._state === 55 /* BeforeTitle2 */) {\n                stateBeforeTitle2(this, c);\n            }\n            else if (this._state === 56 /* BeforeTitle3 */) {\n                stateBeforeTitle3(this, c);\n            }\n            else if (this._state === 57 /* BeforeTitle4 */) {\n                this.stateBeforeSpecialLast(c, 4 /* Title */);\n            }\n            else if (this._state === 58 /* AfterTitle1 */) {\n                stateAfterTitle1(this, c);\n            }\n            else if (this._state === 59 /* AfterTitle2 */) {\n                stateAfterTitle2(this, c);\n            }\n            else if (this._state === 60 /* AfterTitle3 */) {\n                stateAfterTitle3(this, c);\n            }\n            else if (this._state === 61 /* AfterTitle4 */) {\n                this.stateAfterSpecialLast(c, 5);\n            }\n            else if (this._state === 17 /* InProcessingInstruction */) {\n                this.stateInProcessingInstruction(c);\n            }\n            else if (this._state === 64 /* InNamedEntity */) {\n                this.stateInNamedEntity(c);\n            }\n            else if (this._state === 23 /* BeforeCdata1 */) {\n                stateBeforeCdata1(this, c);\n            }\n            else if (this._state === 62 /* BeforeEntity */) {\n                stateBeforeEntity(this, c);\n            }\n            else if (this._state === 24 /* BeforeCdata2 */) {\n                stateBeforeCdata2(this, c);\n            }\n            else if (this._state === 25 /* BeforeCdata3 */) {\n                stateBeforeCdata3(this, c);\n            }\n            else if (this._state === 30 /* AfterCdata1 */) {\n                this.stateAfterCdata1(c);\n            }\n            else if (this._state === 31 /* AfterCdata2 */) {\n                this.stateAfterCdata2(c);\n            }\n            else if (this._state === 26 /* BeforeCdata4 */) {\n                stateBeforeCdata4(this, c);\n            }\n            else if (this._state === 27 /* BeforeCdata5 */) {\n                stateBeforeCdata5(this, c);\n            }\n            else if (this._state === 28 /* BeforeCdata6 */) {\n                this.stateBeforeCdata6(c);\n            }\n            else if (this._state === 66 /* InHexEntity */) {\n                this.stateInHexEntity(c);\n            }\n            else if (this._state === 65 /* InNumericEntity */) {\n                this.stateInNumericEntity(c);\n                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n            }\n            else if (this._state === 63 /* BeforeNumericEntity */) {\n                stateBeforeNumericEntity(this, c);\n            }\n            else {\n                this.cbs.onerror(Error(\"unknown _state\"), this._state);\n            }\n            this._index++;\n        }\n        this.cleanup();\n    };\n    Tokenizer.prototype.finish = function () {\n        // If there is remaining data, emit it in a reasonable way\n        if (this.sectionStart < this._index) {\n            this.handleTrailingData();\n        }\n        this.cbs.onend();\n    };\n    Tokenizer.prototype.handleTrailingData = function () {\n        var data = this.buffer.substr(this.sectionStart);\n        if (this._state === 29 /* InCdata */ ||\n            this._state === 30 /* AfterCdata1 */ ||\n            this._state === 31 /* AfterCdata2 */) {\n            this.cbs.oncdata(data);\n        }\n        else if (this._state === 19 /* InComment */ ||\n            this._state === 21 /* AfterComment1 */ ||\n            this._state === 22 /* AfterComment2 */) {\n            this.cbs.oncomment(data);\n        }\n        else if (this._state === 64 /* InNamedEntity */ && !this.xmlMode) {\n            this.parseLegacyEntity();\n            if (this.sectionStart < this._index) {\n                this._state = this.baseState;\n                this.handleTrailingData();\n            }\n        }\n        else if (this._state === 65 /* InNumericEntity */ && !this.xmlMode) {\n            this.decodeNumericEntity(2, 10, false);\n            if (this.sectionStart < this._index) {\n                this._state = this.baseState;\n                this.handleTrailingData();\n            }\n        }\n        else if (this._state === 66 /* InHexEntity */ && !this.xmlMode) {\n            this.decodeNumericEntity(3, 16, false);\n            if (this.sectionStart < this._index) {\n                this._state = this.baseState;\n                this.handleTrailingData();\n            }\n        }\n        else if (this._state !== 3 /* InTagName */ &&\n            this._state !== 8 /* BeforeAttributeName */ &&\n            this._state !== 11 /* BeforeAttributeValue */ &&\n            this._state !== 10 /* AfterAttributeName */ &&\n            this._state !== 9 /* InAttributeName */ &&\n            this._state !== 13 /* InAttributeValueSq */ &&\n            this._state !== 12 /* InAttributeValueDq */ &&\n            this._state !== 14 /* InAttributeValueNq */ &&\n            this._state !== 6 /* InClosingTagName */) {\n            this.cbs.ontext(data);\n        }\n        /*\n         * Else, ignore remaining data\n         * TODO add a way to remove current tag\n         */\n    };\n    Tokenizer.prototype.getSection = function () {\n        return this.buffer.substring(this.sectionStart, this._index);\n    };\n    Tokenizer.prototype.emitToken = function (name) {\n        this.cbs[name](this.getSection());\n        this.sectionStart = -1;\n    };\n    Tokenizer.prototype.emitPartial = function (value) {\n        if (this.baseState !== 1 /* Text */) {\n            this.cbs.onattribdata(value); // TODO implement the new event\n        }\n        else {\n            this.cbs.ontext(value);\n        }\n    };\n    return Tokenizer;\n}());\nexports.default = Tokenizer;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js?");

/***/ }),

/***/ "./node_modules/sanitize-html/node_modules/htmlparser2/lib/index.js":
/*!**************************************************************************!*\
  !*** ./node_modules/sanitize-html/node_modules/htmlparser2/lib/index.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;\nvar Parser_1 = __webpack_require__(/*! ./Parser */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/Parser.js\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_1.Parser; } });\nvar domhandler_1 = __webpack_require__(/*! domhandler */ \"./node_modules/sanitize-html/node_modules/domhandler/lib/index.js\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n    var handler = new domhandler_1.DomHandler(undefined, options);\n    new Parser_1.Parser(handler, options).end(data);\n    return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n    return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param cb A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCb An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(cb, options, elementCb) {\n    var handler = new domhandler_1.DomHandler(cb, options, elementCb);\n    return new Parser_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_1 = __webpack_require__(/*! ./Tokenizer */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/Tokenizer.js\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_1).default; } });\nvar ElementType = __importStar(__webpack_require__(/*! domelementtype */ \"./node_modules/sanitize-html/node_modules/domelementtype/lib/esm/index.js\"));\nexports.ElementType = ElementType;\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\n__exportStar(__webpack_require__(/*! ./FeedHandler */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/FeedHandler.js\"), exports);\nexports.DomUtils = __importStar(__webpack_require__(/*! domutils */ \"./node_modules/sanitize-html/node_modules/domutils/lib/index.js\"));\nvar FeedHandler_1 = __webpack_require__(/*! ./FeedHandler */ \"./node_modules/sanitize-html/node_modules/htmlparser2/lib/FeedHandler.js\");\nObject.defineProperty(exports, \"RssHandler\", { enumerable: true, get: function () { return FeedHandler_1.FeedHandler; } });\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/sanitize-html/node_modules/htmlparser2/lib/index.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/lib/index.js":
/*!****************************************************!*\
  !*** ./node_modules/socket.io-client/lib/index.js ***!
  \****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * Module dependencies.\n */\n\nvar url = __webpack_require__(/*! ./url */ \"./node_modules/socket.io-client/lib/url.js\");\nvar parser = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js\");\nvar Manager = __webpack_require__(/*! ./manager */ \"./node_modules/socket.io-client/lib/manager.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/socket.io-client/node_modules/debug/src/browser.js\")('socket.io-client');\n\n/**\n * Module exports.\n */\n\nmodule.exports = exports = lookup;\n\n/**\n * Managers cache.\n */\n\nvar cache = exports.managers = {};\n\n/**\n * Looks up an existing `Manager` for multiplexing.\n * If the user summons:\n *\n *   `io('http://localhost/a');`\n *   `io('http://localhost/b');`\n *\n * We reuse the existing instance based on same scheme/port/host,\n * and we initialize sockets for each namespace.\n *\n * @api public\n */\n\nfunction lookup (uri, opts) {\n  if (typeof uri === 'object') {\n    opts = uri;\n    uri = undefined;\n  }\n\n  opts = opts || {};\n\n  var parsed = url(uri);\n  var source = parsed.source;\n  var id = parsed.id;\n  var path = parsed.path;\n  var sameNamespace = cache[id] && path in cache[id].nsps;\n  var newConnection = opts.forceNew || opts['force new connection'] ||\n                      false === opts.multiplex || sameNamespace;\n\n  var io;\n\n  if (newConnection) {\n    debug('ignoring socket cache for %s', source);\n    io = Manager(source, opts);\n  } else {\n    if (!cache[id]) {\n      debug('new io instance for %s', source);\n      cache[id] = Manager(source, opts);\n    }\n    io = cache[id];\n  }\n  if (parsed.query && !opts.query) {\n    opts.query = parsed.query;\n  }\n  return io.socket(parsed.path, opts);\n}\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nexports.protocol = parser.protocol;\n\n/**\n * `connect`.\n *\n * @param {String} uri\n * @api public\n */\n\nexports.connect = lookup;\n\n/**\n * Expose constructors for standalone build.\n *\n * @api public\n */\n\nexports.Manager = __webpack_require__(/*! ./manager */ \"./node_modules/socket.io-client/lib/manager.js\");\nexports.Socket = __webpack_require__(/*! ./socket */ \"./node_modules/socket.io-client/lib/socket.js\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/lib/index.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/lib/manager.js":
/*!******************************************************!*\
  !*** ./node_modules/socket.io-client/lib/manager.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * Module dependencies.\n */\n\nvar eio = __webpack_require__(/*! engine.io-client */ \"./node_modules/engine.io-client/lib/index.js\");\nvar Socket = __webpack_require__(/*! ./socket */ \"./node_modules/socket.io-client/lib/socket.js\");\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\nvar parser = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js\");\nvar on = __webpack_require__(/*! ./on */ \"./node_modules/socket.io-client/lib/on.js\");\nvar bind = __webpack_require__(/*! component-bind */ \"./node_modules/component-bind/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/socket.io-client/node_modules/debug/src/browser.js\")('socket.io-client:manager');\nvar indexOf = __webpack_require__(/*! indexof */ \"./node_modules/indexof/index.js\");\nvar Backoff = __webpack_require__(/*! backo2 */ \"./node_modules/backo2/index.js\");\n\n/**\n * IE6+ hasOwnProperty\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Module exports\n */\n\nmodule.exports = Manager;\n\n/**\n * `Manager` constructor.\n *\n * @param {String} engine instance or engine uri/opts\n * @param {Object} options\n * @api public\n */\n\nfunction Manager (uri, opts) {\n  if (!(this instanceof Manager)) return new Manager(uri, opts);\n  if (uri && ('object' === typeof uri)) {\n    opts = uri;\n    uri = undefined;\n  }\n  opts = opts || {};\n\n  opts.path = opts.path || '/socket.io';\n  this.nsps = {};\n  this.subs = [];\n  this.opts = opts;\n  this.reconnection(opts.reconnection !== false);\n  this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n  this.reconnectionDelay(opts.reconnectionDelay || 1000);\n  this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n  this.randomizationFactor(opts.randomizationFactor || 0.5);\n  this.backoff = new Backoff({\n    min: this.reconnectionDelay(),\n    max: this.reconnectionDelayMax(),\n    jitter: this.randomizationFactor()\n  });\n  this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n  this.readyState = 'closed';\n  this.uri = uri;\n  this.connecting = [];\n  this.lastPing = null;\n  this.encoding = false;\n  this.packetBuffer = [];\n  var _parser = opts.parser || parser;\n  this.encoder = new _parser.Encoder();\n  this.decoder = new _parser.Decoder();\n  this.autoConnect = opts.autoConnect !== false;\n  if (this.autoConnect) this.open();\n}\n\n/**\n * Propagate given event to sockets and emit on `this`\n *\n * @api private\n */\n\nManager.prototype.emitAll = function () {\n  this.emit.apply(this, arguments);\n  for (var nsp in this.nsps) {\n    if (has.call(this.nsps, nsp)) {\n      this.nsps[nsp].emit.apply(this.nsps[nsp], arguments);\n    }\n  }\n};\n\n/**\n * Update `socket.id` of all sockets\n *\n * @api private\n */\n\nManager.prototype.updateSocketIds = function () {\n  for (var nsp in this.nsps) {\n    if (has.call(this.nsps, nsp)) {\n      this.nsps[nsp].id = this.generateId(nsp);\n    }\n  }\n};\n\n/**\n * generate `socket.id` for the given `nsp`\n *\n * @param {String} nsp\n * @return {String}\n * @api private\n */\n\nManager.prototype.generateId = function (nsp) {\n  return (nsp === '/' ? '' : (nsp + '#')) + this.engine.id;\n};\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Manager.prototype);\n\n/**\n * Sets the `reconnection` config.\n *\n * @param {Boolean} true/false if it should automatically reconnect\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnection = function (v) {\n  if (!arguments.length) return this._reconnection;\n  this._reconnection = !!v;\n  return this;\n};\n\n/**\n * Sets the reconnection attempts config.\n *\n * @param {Number} max reconnection attempts before giving up\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionAttempts = function (v) {\n  if (!arguments.length) return this._reconnectionAttempts;\n  this._reconnectionAttempts = v;\n  return this;\n};\n\n/**\n * Sets the delay between reconnections.\n *\n * @param {Number} delay\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionDelay = function (v) {\n  if (!arguments.length) return this._reconnectionDelay;\n  this._reconnectionDelay = v;\n  this.backoff && this.backoff.setMin(v);\n  return this;\n};\n\nManager.prototype.randomizationFactor = function (v) {\n  if (!arguments.length) return this._randomizationFactor;\n  this._randomizationFactor = v;\n  this.backoff && this.backoff.setJitter(v);\n  return this;\n};\n\n/**\n * Sets the maximum delay between reconnections.\n *\n * @param {Number} delay\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.reconnectionDelayMax = function (v) {\n  if (!arguments.length) return this._reconnectionDelayMax;\n  this._reconnectionDelayMax = v;\n  this.backoff && this.backoff.setMax(v);\n  return this;\n};\n\n/**\n * Sets the connection timeout. `false` to disable\n *\n * @return {Manager} self or value\n * @api public\n */\n\nManager.prototype.timeout = function (v) {\n  if (!arguments.length) return this._timeout;\n  this._timeout = v;\n  return this;\n};\n\n/**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @api private\n */\n\nManager.prototype.maybeReconnectOnOpen = function () {\n  // Only try to reconnect if it's the first time we're connecting\n  if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) {\n    // keeps reconnection from firing twice for the same reconnection loop\n    this.reconnect();\n  }\n};\n\n/**\n * Sets the current transport `socket`.\n *\n * @param {Function} optional, callback\n * @return {Manager} self\n * @api public\n */\n\nManager.prototype.open =\nManager.prototype.connect = function (fn, opts) {\n  debug('readyState %s', this.readyState);\n  if (~this.readyState.indexOf('open')) return this;\n\n  debug('opening %s', this.uri);\n  this.engine = eio(this.uri, this.opts);\n  var socket = this.engine;\n  var self = this;\n  this.readyState = 'opening';\n  this.skipReconnect = false;\n\n  // emit `open`\n  var openSub = on(socket, 'open', function () {\n    self.onopen();\n    fn && fn();\n  });\n\n  // emit `connect_error`\n  var errorSub = on(socket, 'error', function (data) {\n    debug('connect_error');\n    self.cleanup();\n    self.readyState = 'closed';\n    self.emitAll('connect_error', data);\n    if (fn) {\n      var err = new Error('Connection error');\n      err.data = data;\n      fn(err);\n    } else {\n      // Only do this if there is no fn to handle the error\n      self.maybeReconnectOnOpen();\n    }\n  });\n\n  // emit `connect_timeout`\n  if (false !== this._timeout) {\n    var timeout = this._timeout;\n    debug('connect attempt will timeout after %d', timeout);\n\n    if (timeout === 0) {\n      openSub.destroy(); // prevents a race condition with the 'open' event\n    }\n\n    // set timer\n    var timer = setTimeout(function () {\n      debug('connect attempt timed out after %d', timeout);\n      openSub.destroy();\n      socket.close();\n      socket.emit('error', 'timeout');\n      self.emitAll('connect_timeout', timeout);\n    }, timeout);\n\n    this.subs.push({\n      destroy: function () {\n        clearTimeout(timer);\n      }\n    });\n  }\n\n  this.subs.push(openSub);\n  this.subs.push(errorSub);\n\n  return this;\n};\n\n/**\n * Called upon transport open.\n *\n * @api private\n */\n\nManager.prototype.onopen = function () {\n  debug('open');\n\n  // clear old subs\n  this.cleanup();\n\n  // mark as open\n  this.readyState = 'open';\n  this.emit('open');\n\n  // add new subs\n  var socket = this.engine;\n  this.subs.push(on(socket, 'data', bind(this, 'ondata')));\n  this.subs.push(on(socket, 'ping', bind(this, 'onping')));\n  this.subs.push(on(socket, 'pong', bind(this, 'onpong')));\n  this.subs.push(on(socket, 'error', bind(this, 'onerror')));\n  this.subs.push(on(socket, 'close', bind(this, 'onclose')));\n  this.subs.push(on(this.decoder, 'decoded', bind(this, 'ondecoded')));\n};\n\n/**\n * Called upon a ping.\n *\n * @api private\n */\n\nManager.prototype.onping = function () {\n  this.lastPing = new Date();\n  this.emitAll('ping');\n};\n\n/**\n * Called upon a packet.\n *\n * @api private\n */\n\nManager.prototype.onpong = function () {\n  this.emitAll('pong', new Date() - this.lastPing);\n};\n\n/**\n * Called with data.\n *\n * @api private\n */\n\nManager.prototype.ondata = function (data) {\n  this.decoder.add(data);\n};\n\n/**\n * Called when parser fully decodes a packet.\n *\n * @api private\n */\n\nManager.prototype.ondecoded = function (packet) {\n  this.emit('packet', packet);\n};\n\n/**\n * Called upon socket error.\n *\n * @api private\n */\n\nManager.prototype.onerror = function (err) {\n  debug('error', err);\n  this.emitAll('error', err);\n};\n\n/**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @api public\n */\n\nManager.prototype.socket = function (nsp, opts) {\n  var socket = this.nsps[nsp];\n  if (!socket) {\n    socket = new Socket(this, nsp, opts);\n    this.nsps[nsp] = socket;\n    var self = this;\n    socket.on('connecting', onConnecting);\n    socket.on('connect', function () {\n      socket.id = self.generateId(nsp);\n    });\n\n    if (this.autoConnect) {\n      // manually call here since connecting event is fired before listening\n      onConnecting();\n    }\n  }\n\n  function onConnecting () {\n    if (!~indexOf(self.connecting, socket)) {\n      self.connecting.push(socket);\n    }\n  }\n\n  return socket;\n};\n\n/**\n * Called upon a socket close.\n *\n * @param {Socket} socket\n */\n\nManager.prototype.destroy = function (socket) {\n  var index = indexOf(this.connecting, socket);\n  if (~index) this.connecting.splice(index, 1);\n  if (this.connecting.length) return;\n\n  this.close();\n};\n\n/**\n * Writes a packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nManager.prototype.packet = function (packet) {\n  debug('writing packet %j', packet);\n  var self = this;\n  if (packet.query && packet.type === 0) packet.nsp += '?' + packet.query;\n\n  if (!self.encoding) {\n    // encode, then write to engine with result\n    self.encoding = true;\n    this.encoder.encode(packet, function (encodedPackets) {\n      for (var i = 0; i < encodedPackets.length; i++) {\n        self.engine.write(encodedPackets[i], packet.options);\n      }\n      self.encoding = false;\n      self.processPacketQueue();\n    });\n  } else { // add packet to the queue\n    self.packetBuffer.push(packet);\n  }\n};\n\n/**\n * If packet buffer is non-empty, begins encoding the\n * next packet in line.\n *\n * @api private\n */\n\nManager.prototype.processPacketQueue = function () {\n  if (this.packetBuffer.length > 0 && !this.encoding) {\n    var pack = this.packetBuffer.shift();\n    this.packet(pack);\n  }\n};\n\n/**\n * Clean up transport subscriptions and packet buffer.\n *\n * @api private\n */\n\nManager.prototype.cleanup = function () {\n  debug('cleanup');\n\n  var subsLength = this.subs.length;\n  for (var i = 0; i < subsLength; i++) {\n    var sub = this.subs.shift();\n    sub.destroy();\n  }\n\n  this.packetBuffer = [];\n  this.encoding = false;\n  this.lastPing = null;\n\n  this.decoder.destroy();\n};\n\n/**\n * Close the current socket.\n *\n * @api private\n */\n\nManager.prototype.close =\nManager.prototype.disconnect = function () {\n  debug('disconnect');\n  this.skipReconnect = true;\n  this.reconnecting = false;\n  if ('opening' === this.readyState) {\n    // `onclose` will not fire because\n    // an open event never happened\n    this.cleanup();\n  }\n  this.backoff.reset();\n  this.readyState = 'closed';\n  if (this.engine) this.engine.close();\n};\n\n/**\n * Called upon engine close.\n *\n * @api private\n */\n\nManager.prototype.onclose = function (reason) {\n  debug('onclose');\n\n  this.cleanup();\n  this.backoff.reset();\n  this.readyState = 'closed';\n  this.emit('close', reason);\n\n  if (this._reconnection && !this.skipReconnect) {\n    this.reconnect();\n  }\n};\n\n/**\n * Attempt a reconnection.\n *\n * @api private\n */\n\nManager.prototype.reconnect = function () {\n  if (this.reconnecting || this.skipReconnect) return this;\n\n  var self = this;\n\n  if (this.backoff.attempts >= this._reconnectionAttempts) {\n    debug('reconnect failed');\n    this.backoff.reset();\n    this.emitAll('reconnect_failed');\n    this.reconnecting = false;\n  } else {\n    var delay = this.backoff.duration();\n    debug('will wait %dms before reconnect attempt', delay);\n\n    this.reconnecting = true;\n    var timer = setTimeout(function () {\n      if (self.skipReconnect) return;\n\n      debug('attempting reconnect');\n      self.emitAll('reconnect_attempt', self.backoff.attempts);\n      self.emitAll('reconnecting', self.backoff.attempts);\n\n      // check again for the case socket closed in above events\n      if (self.skipReconnect) return;\n\n      self.open(function (err) {\n        if (err) {\n          debug('reconnect attempt error');\n          self.reconnecting = false;\n          self.reconnect();\n          self.emitAll('reconnect_error', err.data);\n        } else {\n          debug('reconnect success');\n          self.onreconnect();\n        }\n      });\n    }, delay);\n\n    this.subs.push({\n      destroy: function () {\n        clearTimeout(timer);\n      }\n    });\n  }\n};\n\n/**\n * Called upon successful reconnect.\n *\n * @api private\n */\n\nManager.prototype.onreconnect = function () {\n  var attempt = this.backoff.attempts;\n  this.reconnecting = false;\n  this.backoff.reset();\n  this.updateSocketIds();\n  this.emitAll('reconnect', attempt);\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/lib/manager.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/lib/on.js":
/*!*************************************************!*\
  !*** ./node_modules/socket.io-client/lib/on.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n/**\n * Module exports.\n */\n\nmodule.exports = on;\n\n/**\n * Helper for subscriptions.\n *\n * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter`\n * @param {String} event name\n * @param {Function} callback\n * @api public\n */\n\nfunction on (obj, ev, fn) {\n  obj.on(ev, fn);\n  return {\n    destroy: function () {\n      obj.removeListener(ev, fn);\n    }\n  };\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/lib/on.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/lib/socket.js":
/*!*****************************************************!*\
  !*** ./node_modules/socket.io-client/lib/socket.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * Module dependencies.\n */\n\nvar parser = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js\");\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\nvar toArray = __webpack_require__(/*! to-array */ \"./node_modules/to-array/index.js\");\nvar on = __webpack_require__(/*! ./on */ \"./node_modules/socket.io-client/lib/on.js\");\nvar bind = __webpack_require__(/*! component-bind */ \"./node_modules/component-bind/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/socket.io-client/node_modules/debug/src/browser.js\")('socket.io-client:socket');\nvar parseqs = __webpack_require__(/*! parseqs */ \"./node_modules/parseqs/index.js\");\nvar hasBin = __webpack_require__(/*! has-binary2 */ \"./node_modules/has-binary2/index.js\");\n\n/**\n * Module exports.\n */\n\nmodule.exports = exports = Socket;\n\n/**\n * Internal events (blacklisted).\n * These events can't be emitted by the user.\n *\n * @api private\n */\n\nvar events = {\n  connect: 1,\n  connect_error: 1,\n  connect_timeout: 1,\n  connecting: 1,\n  disconnect: 1,\n  error: 1,\n  reconnect: 1,\n  reconnect_attempt: 1,\n  reconnect_failed: 1,\n  reconnect_error: 1,\n  reconnecting: 1,\n  ping: 1,\n  pong: 1\n};\n\n/**\n * Shortcut to `Emitter#emit`.\n */\n\nvar emit = Emitter.prototype.emit;\n\n/**\n * `Socket` constructor.\n *\n * @api public\n */\n\nfunction Socket (io, nsp, opts) {\n  this.io = io;\n  this.nsp = nsp;\n  this.json = this; // compat\n  this.ids = 0;\n  this.acks = {};\n  this.receiveBuffer = [];\n  this.sendBuffer = [];\n  this.connected = false;\n  this.disconnected = true;\n  this.flags = {};\n  if (opts && opts.query) {\n    this.query = opts.query;\n  }\n  if (this.io.autoConnect) this.open();\n}\n\n/**\n * Mix in `Emitter`.\n */\n\nEmitter(Socket.prototype);\n\n/**\n * Subscribe to open, close and packet events\n *\n * @api private\n */\n\nSocket.prototype.subEvents = function () {\n  if (this.subs) return;\n\n  var io = this.io;\n  this.subs = [\n    on(io, 'open', bind(this, 'onopen')),\n    on(io, 'packet', bind(this, 'onpacket')),\n    on(io, 'close', bind(this, 'onclose'))\n  ];\n};\n\n/**\n * \"Opens\" the socket.\n *\n * @api public\n */\n\nSocket.prototype.open =\nSocket.prototype.connect = function () {\n  if (this.connected) return this;\n\n  this.subEvents();\n  if (!this.io.reconnecting) this.io.open(); // ensure open\n  if ('open' === this.io.readyState) this.onopen();\n  this.emit('connecting');\n  return this;\n};\n\n/**\n * Sends a `message` event.\n *\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.send = function () {\n  var args = toArray(arguments);\n  args.unshift('message');\n  this.emit.apply(this, args);\n  return this;\n};\n\n/**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @param {String} event name\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.emit = function (ev) {\n  if (events.hasOwnProperty(ev)) {\n    emit.apply(this, arguments);\n    return this;\n  }\n\n  var args = toArray(arguments);\n  var packet = {\n    type: (this.flags.binary !== undefined ? this.flags.binary : hasBin(args)) ? parser.BINARY_EVENT : parser.EVENT,\n    data: args\n  };\n\n  packet.options = {};\n  packet.options.compress = !this.flags || false !== this.flags.compress;\n\n  // event ack callback\n  if ('function' === typeof args[args.length - 1]) {\n    debug('emitting packet with ack id %d', this.ids);\n    this.acks[this.ids] = args.pop();\n    packet.id = this.ids++;\n  }\n\n  if (this.connected) {\n    this.packet(packet);\n  } else {\n    this.sendBuffer.push(packet);\n  }\n\n  this.flags = {};\n\n  return this;\n};\n\n/**\n * Sends a packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.packet = function (packet) {\n  packet.nsp = this.nsp;\n  this.io.packet(packet);\n};\n\n/**\n * Called upon engine `open`.\n *\n * @api private\n */\n\nSocket.prototype.onopen = function () {\n  debug('transport is open - connecting');\n\n  // write connect packet if necessary\n  if ('/' !== this.nsp) {\n    if (this.query) {\n      var query = typeof this.query === 'object' ? parseqs.encode(this.query) : this.query;\n      debug('sending connect packet with query %s', query);\n      this.packet({type: parser.CONNECT, query: query});\n    } else {\n      this.packet({type: parser.CONNECT});\n    }\n  }\n};\n\n/**\n * Called upon engine `close`.\n *\n * @param {String} reason\n * @api private\n */\n\nSocket.prototype.onclose = function (reason) {\n  debug('close (%s)', reason);\n  this.connected = false;\n  this.disconnected = true;\n  delete this.id;\n  this.emit('disconnect', reason);\n};\n\n/**\n * Called with socket packet.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onpacket = function (packet) {\n  var sameNamespace = packet.nsp === this.nsp;\n  var rootNamespaceError = packet.type === parser.ERROR && packet.nsp === '/';\n\n  if (!sameNamespace && !rootNamespaceError) return;\n\n  switch (packet.type) {\n    case parser.CONNECT:\n      this.onconnect();\n      break;\n\n    case parser.EVENT:\n      this.onevent(packet);\n      break;\n\n    case parser.BINARY_EVENT:\n      this.onevent(packet);\n      break;\n\n    case parser.ACK:\n      this.onack(packet);\n      break;\n\n    case parser.BINARY_ACK:\n      this.onack(packet);\n      break;\n\n    case parser.DISCONNECT:\n      this.ondisconnect();\n      break;\n\n    case parser.ERROR:\n      this.emit('error', packet.data);\n      break;\n  }\n};\n\n/**\n * Called upon a server event.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onevent = function (packet) {\n  var args = packet.data || [];\n  debug('emitting event %j', args);\n\n  if (null != packet.id) {\n    debug('attaching ack callback to event');\n    args.push(this.ack(packet.id));\n  }\n\n  if (this.connected) {\n    emit.apply(this, args);\n  } else {\n    this.receiveBuffer.push(args);\n  }\n};\n\n/**\n * Produces an ack callback to emit with an event.\n *\n * @api private\n */\n\nSocket.prototype.ack = function (id) {\n  var self = this;\n  var sent = false;\n  return function () {\n    // prevent double callbacks\n    if (sent) return;\n    sent = true;\n    var args = toArray(arguments);\n    debug('sending ack %j', args);\n\n    self.packet({\n      type: hasBin(args) ? parser.BINARY_ACK : parser.ACK,\n      id: id,\n      data: args\n    });\n  };\n};\n\n/**\n * Called upon a server acknowlegement.\n *\n * @param {Object} packet\n * @api private\n */\n\nSocket.prototype.onack = function (packet) {\n  var ack = this.acks[packet.id];\n  if ('function' === typeof ack) {\n    debug('calling ack %s with %j', packet.id, packet.data);\n    ack.apply(this, packet.data);\n    delete this.acks[packet.id];\n  } else {\n    debug('bad ack %s', packet.id);\n  }\n};\n\n/**\n * Called upon server connect.\n *\n * @api private\n */\n\nSocket.prototype.onconnect = function () {\n  this.connected = true;\n  this.disconnected = false;\n  this.emitBuffered();\n  this.emit('connect');\n};\n\n/**\n * Emit buffered events (received and emitted).\n *\n * @api private\n */\n\nSocket.prototype.emitBuffered = function () {\n  var i;\n  for (i = 0; i < this.receiveBuffer.length; i++) {\n    emit.apply(this, this.receiveBuffer[i]);\n  }\n  this.receiveBuffer = [];\n\n  for (i = 0; i < this.sendBuffer.length; i++) {\n    this.packet(this.sendBuffer[i]);\n  }\n  this.sendBuffer = [];\n};\n\n/**\n * Called upon server disconnect.\n *\n * @api private\n */\n\nSocket.prototype.ondisconnect = function () {\n  debug('server disconnect (%s)', this.nsp);\n  this.destroy();\n  this.onclose('io server disconnect');\n};\n\n/**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @api private.\n */\n\nSocket.prototype.destroy = function () {\n  if (this.subs) {\n    // clean subscriptions to avoid reconnections\n    for (var i = 0; i < this.subs.length; i++) {\n      this.subs[i].destroy();\n    }\n    this.subs = null;\n  }\n\n  this.io.destroy(this);\n};\n\n/**\n * Disconnects the socket manually.\n *\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.close =\nSocket.prototype.disconnect = function () {\n  if (this.connected) {\n    debug('performing disconnect (%s)', this.nsp);\n    this.packet({ type: parser.DISCONNECT });\n  }\n\n  // remove socket from pool\n  this.destroy();\n\n  if (this.connected) {\n    // fire events\n    this.onclose('io client disconnect');\n  }\n  return this;\n};\n\n/**\n * Sets the compress flag.\n *\n * @param {Boolean} if `true`, compresses the sending data\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.compress = function (compress) {\n  this.flags.compress = compress;\n  return this;\n};\n\n/**\n * Sets the binary flag\n *\n * @param {Boolean} whether the emitted data contains binary\n * @return {Socket} self\n * @api public\n */\n\nSocket.prototype.binary = function (binary) {\n  this.flags.binary = binary;\n  return this;\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/lib/socket.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/lib/url.js":
/*!**************************************************!*\
  !*** ./node_modules/socket.io-client/lib/url.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * Module dependencies.\n */\n\nvar parseuri = __webpack_require__(/*! parseuri */ \"./node_modules/parseuri/index.js\");\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/socket.io-client/node_modules/debug/src/browser.js\")('socket.io-client:url');\n\n/**\n * Module exports.\n */\n\nmodule.exports = url;\n\n/**\n * URL parser.\n *\n * @param {String} url\n * @param {Object} An object meant to mimic window.location.\n *                 Defaults to window.location.\n * @api public\n */\n\nfunction url (uri, loc) {\n  var obj = uri;\n\n  // default to window.location\n  loc = loc || (typeof location !== 'undefined' && location);\n  if (null == uri) uri = loc.protocol + '//' + loc.host;\n\n  // relative path support\n  if ('string' === typeof uri) {\n    if ('/' === uri.charAt(0)) {\n      if ('/' === uri.charAt(1)) {\n        uri = loc.protocol + uri;\n      } else {\n        uri = loc.host + uri;\n      }\n    }\n\n    if (!/^(https?|wss?):\\/\\//.test(uri)) {\n      debug('protocol-less url %s', uri);\n      if ('undefined' !== typeof loc) {\n        uri = loc.protocol + '//' + uri;\n      } else {\n        uri = 'https://' + uri;\n      }\n    }\n\n    // parse\n    debug('parse %s', uri);\n    obj = parseuri(uri);\n  }\n\n  // make sure we treat `localhost:80` and `localhost` equally\n  if (!obj.port) {\n    if (/^(http|ws)$/.test(obj.protocol)) {\n      obj.port = '80';\n    } else if (/^(http|ws)s$/.test(obj.protocol)) {\n      obj.port = '443';\n    }\n  }\n\n  obj.path = obj.path || '/';\n\n  var ipv6 = obj.host.indexOf(':') !== -1;\n  var host = ipv6 ? '[' + obj.host + ']' : obj.host;\n\n  // define unique id\n  obj.id = obj.protocol + '://' + host + ':' + obj.port;\n  // define href\n  obj.href = obj.protocol + '://' + host + (loc && loc.port === obj.port ? '' : (':' + obj.port));\n\n  return obj;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/lib/url.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/debug/src/browser.js":
/*!*************************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/debug/src/browser.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = __webpack_require__(/*! ./debug */ \"./node_modules/socket.io-client/node_modules/debug/src/debug.js\");\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n               && 'undefined' != typeof chrome.storage\n                  ? chrome.storage.local\n                  : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',\n  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',\n  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',\n  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',\n  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',\n  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',\n  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',\n  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',\n  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',\n  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',\n  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n  // NB: In an Electron preload script, document will be defined but not fully\n  // initialized. Since we know we're in Chrome, we'll just detect this case\n  // explicitly\n  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n    return true;\n  }\n\n  // Internet Explorer and Edge do not support colors.\n  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n    return false;\n  }\n\n  // is webkit? http://stackoverflow.com/a/16459606/376773\n  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n    // is firebug? http://stackoverflow.com/a/398120/376773\n    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n    // is firefox >= v31?\n    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n    // double check webkit in userAgent just in case we are in a worker\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n  try {\n    return JSON.stringify(v);\n  } catch (err) {\n    return '[UnexpectedJSONParseError]: ' + err.message;\n  }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n  var useColors = this.useColors;\n\n  args[0] = (useColors ? '%c' : '')\n    + this.namespace\n    + (useColors ? ' %c' : ' ')\n    + args[0]\n    + (useColors ? '%c ' : ' ')\n    + '+' + exports.humanize(this.diff);\n\n  if (!useColors) return;\n\n  var c = 'color: ' + this.color;\n  args.splice(1, 0, c, 'color: inherit')\n\n  // the final \"%c\" is somewhat tricky, because there could be other\n  // arguments passed either before or after the %c, so we need to\n  // figure out the correct index to insert the CSS into\n  var index = 0;\n  var lastC = 0;\n  args[0].replace(/%[a-zA-Z%]/g, function(match) {\n    if ('%%' === match) return;\n    index++;\n    if ('%c' === match) {\n      // we only are interested in the *last* %c\n      // (the user may have provided their own)\n      lastC = index;\n    }\n  });\n\n  args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n  // this hackery is required for IE8/9, where\n  // the `console.log` function doesn't have 'apply'\n  return 'object' === typeof console\n    && console.log\n    && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n  try {\n    if (null == namespaces) {\n      exports.storage.removeItem('debug');\n    } else {\n      exports.storage.debug = namespaces;\n    }\n  } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n  var r;\n  try {\n    r = exports.storage.debug;\n  } catch(e) {}\n\n  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n  if (!r && typeof process !== 'undefined' && 'env' in process) {\n    r = process.env.DEBUG;\n  }\n\n  return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n  try {\n    return window.localStorage;\n  } catch (e) {}\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/debug/src/browser.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/debug/src/debug.js":
/*!***********************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/debug/src/debug.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = __webpack_require__(/*! ms */ \"./node_modules/socket.io-client/node_modules/ms/index.js\");\n\n/**\n * Active `debug` instances.\n */\nexports.instances = [];\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n  var hash = 0, i;\n\n  for (i in namespace) {\n    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);\n    hash |= 0; // Convert to 32bit integer\n  }\n\n  return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n  var prevTime;\n\n  function debug() {\n    // disabled?\n    if (!debug.enabled) return;\n\n    var self = debug;\n\n    // set `diff` timestamp\n    var curr = +new Date();\n    var ms = curr - (prevTime || curr);\n    self.diff = ms;\n    self.prev = prevTime;\n    self.curr = curr;\n    prevTime = curr;\n\n    // turn the `arguments` into a proper Array\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n\n    args[0] = exports.coerce(args[0]);\n\n    if ('string' !== typeof args[0]) {\n      // anything else let's inspect with %O\n      args.unshift('%O');\n    }\n\n    // apply any `formatters` transformations\n    var index = 0;\n    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n      // if we encounter an escaped % then don't increase the array index\n      if (match === '%%') return match;\n      index++;\n      var formatter = exports.formatters[format];\n      if ('function' === typeof formatter) {\n        var val = args[index];\n        match = formatter.call(self, val);\n\n        // now we need to remove `args[index]` since it's inlined in the `format`\n        args.splice(index, 1);\n        index--;\n      }\n      return match;\n    });\n\n    // apply env-specific formatting (colors, etc.)\n    exports.formatArgs.call(self, args);\n\n    var logFn = debug.log || exports.log || console.log.bind(console);\n    logFn.apply(self, args);\n  }\n\n  debug.namespace = namespace;\n  debug.enabled = exports.enabled(namespace);\n  debug.useColors = exports.useColors();\n  debug.color = selectColor(namespace);\n  debug.destroy = destroy;\n\n  // env-specific initialization logic for debug instances\n  if ('function' === typeof exports.init) {\n    exports.init(debug);\n  }\n\n  exports.instances.push(debug);\n\n  return debug;\n}\n\nfunction destroy () {\n  var index = exports.instances.indexOf(this);\n  if (index !== -1) {\n    exports.instances.splice(index, 1);\n    return true;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n  exports.save(namespaces);\n\n  exports.names = [];\n  exports.skips = [];\n\n  var i;\n  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n  var len = split.length;\n\n  for (i = 0; i < len; i++) {\n    if (!split[i]) continue; // ignore empty strings\n    namespaces = split[i].replace(/\\*/g, '.*?');\n    if (namespaces[0] === '-') {\n      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n    } else {\n      exports.names.push(new RegExp('^' + namespaces + '$'));\n    }\n  }\n\n  for (i = 0; i < exports.instances.length; i++) {\n    var instance = exports.instances[i];\n    instance.enabled = exports.enabled(instance.namespace);\n  }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n  exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n  if (name[name.length - 1] === '*') {\n    return true;\n  }\n  var i, len;\n  for (i = 0, len = exports.skips.length; i < len; i++) {\n    if (exports.skips[i].test(name)) {\n      return false;\n    }\n  }\n  for (i = 0, len = exports.names.length; i < len; i++) {\n    if (exports.names[i].test(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n  if (val instanceof Error) return val.stack || val.message;\n  return val;\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/debug/src/debug.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/ms/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/ms/index.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isNaN(val) === false) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  if (ms >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (ms >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (ms >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (ms >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  return plural(ms, d, 'day') ||\n    plural(ms, h, 'hour') ||\n    plural(ms, m, 'minute') ||\n    plural(ms, s, 'second') ||\n    ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n  if (ms < n) {\n    return;\n  }\n  if (ms < n * 1.5) {\n    return Math.floor(ms / n) + ' ' + name;\n  }\n  return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/ms/index.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global Blob,File*/\n\n/**\n * Module requirements\n */\n\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\nvar isBuf = __webpack_require__(/*! ./is-buffer */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js\");\nvar toString = Object.prototype.toString;\nvar withNativeBlob = typeof Blob === 'function' || (typeof Blob !== 'undefined' && toString.call(Blob) === '[object BlobConstructor]');\nvar withNativeFile = typeof File === 'function' || (typeof File !== 'undefined' && toString.call(File) === '[object FileConstructor]');\n\n/**\n * Replaces every Buffer | ArrayBuffer in packet with a numbered placeholder.\n * Anything with blobs or files should be fed through removeBlobs before coming\n * here.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @api public\n */\n\nexports.deconstructPacket = function(packet) {\n  var buffers = [];\n  var packetData = packet.data;\n  var pack = packet;\n  pack.data = _deconstructPacket(packetData, buffers);\n  pack.attachments = buffers.length; // number of binary 'attachments'\n  return {packet: pack, buffers: buffers};\n};\n\nfunction _deconstructPacket(data, buffers) {\n  if (!data) return data;\n\n  if (isBuf(data)) {\n    var placeholder = { _placeholder: true, num: buffers.length };\n    buffers.push(data);\n    return placeholder;\n  } else if (isArray(data)) {\n    var newData = new Array(data.length);\n    for (var i = 0; i < data.length; i++) {\n      newData[i] = _deconstructPacket(data[i], buffers);\n    }\n    return newData;\n  } else if (typeof data === 'object' && !(data instanceof Date)) {\n    var newData = {};\n    for (var key in data) {\n      newData[key] = _deconstructPacket(data[key], buffers);\n    }\n    return newData;\n  }\n  return data;\n}\n\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @api public\n */\n\nexports.reconstructPacket = function(packet, buffers) {\n  packet.data = _reconstructPacket(packet.data, buffers);\n  packet.attachments = undefined; // no longer useful\n  return packet;\n};\n\nfunction _reconstructPacket(data, buffers) {\n  if (!data) return data;\n\n  if (data && data._placeholder === true) {\n    var isIndexValid =\n      typeof data.num === \"number\" &&\n      data.num >= 0 &&\n      data.num < buffers.length;\n    if (isIndexValid) {\n      return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n    } else {\n      throw new Error(\"illegal attachments\");\n    }\n  } else if (isArray(data)) {\n    for (var i = 0; i < data.length; i++) {\n      data[i] = _reconstructPacket(data[i], buffers);\n    }\n  } else if (typeof data === 'object') {\n    for (var key in data) {\n      data[key] = _reconstructPacket(data[key], buffers);\n    }\n  }\n\n  return data;\n}\n\n/**\n * Asynchronously removes Blobs or Files from data via\n * FileReader's readAsArrayBuffer method. Used before encoding\n * data as msgpack. Calls callback with the blobless data.\n *\n * @param {Object} data\n * @param {Function} callback\n * @api private\n */\n\nexports.removeBlobs = function(data, callback) {\n  function _removeBlobs(obj, curKey, containingObject) {\n    if (!obj) return obj;\n\n    // convert any blob\n    if ((withNativeBlob && obj instanceof Blob) ||\n        (withNativeFile && obj instanceof File)) {\n      pendingBlobs++;\n\n      // async filereader\n      var fileReader = new FileReader();\n      fileReader.onload = function() { // this.result == arraybuffer\n        if (containingObject) {\n          containingObject[curKey] = this.result;\n        }\n        else {\n          bloblessData = this.result;\n        }\n\n        // if nothing pending its callback time\n        if(! --pendingBlobs) {\n          callback(bloblessData);\n        }\n      };\n\n      fileReader.readAsArrayBuffer(obj); // blob -> arraybuffer\n    } else if (isArray(obj)) { // handle array\n      for (var i = 0; i < obj.length; i++) {\n        _removeBlobs(obj[i], i, obj);\n      }\n    } else if (typeof obj === 'object' && !isBuf(obj)) { // and object\n      for (var key in obj) {\n        _removeBlobs(obj[key], key, obj);\n      }\n    }\n  }\n\n  var pendingBlobs = 0;\n  var bloblessData = data;\n  _removeBlobs(bloblessData);\n  if (!pendingBlobs) {\n    callback(bloblessData);\n  }\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/socket.io-parser/index.js":
/*!******************************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/index.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("\n/**\n * Module dependencies.\n */\n\nvar debug = __webpack_require__(/*! debug */ \"./node_modules/socket.io-client/node_modules/debug/src/browser.js\")('socket.io-parser');\nvar Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/component-emitter/index.js\");\nvar binary = __webpack_require__(/*! ./binary */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js\");\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\nvar isBuf = __webpack_require__(/*! ./is-buffer */ \"./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js\");\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nexports.protocol = 4;\n\n/**\n * Packet types.\n *\n * @api public\n */\n\nexports.types = [\n  'CONNECT',\n  'DISCONNECT',\n  'EVENT',\n  'ACK',\n  'ERROR',\n  'BINARY_EVENT',\n  'BINARY_ACK'\n];\n\n/**\n * Packet type `connect`.\n *\n * @api public\n */\n\nexports.CONNECT = 0;\n\n/**\n * Packet type `disconnect`.\n *\n * @api public\n */\n\nexports.DISCONNECT = 1;\n\n/**\n * Packet type `event`.\n *\n * @api public\n */\n\nexports.EVENT = 2;\n\n/**\n * Packet type `ack`.\n *\n * @api public\n */\n\nexports.ACK = 3;\n\n/**\n * Packet type `error`.\n *\n * @api public\n */\n\nexports.ERROR = 4;\n\n/**\n * Packet type 'binary event'\n *\n * @api public\n */\n\nexports.BINARY_EVENT = 5;\n\n/**\n * Packet type `binary ack`. For acks with binary arguments.\n *\n * @api public\n */\n\nexports.BINARY_ACK = 6;\n\n/**\n * Encoder constructor.\n *\n * @api public\n */\n\nexports.Encoder = Encoder;\n\n/**\n * Decoder constructor.\n *\n * @api public\n */\n\nexports.Decoder = Decoder;\n\n/**\n * A socket.io Encoder instance\n *\n * @api public\n */\n\nfunction Encoder() {}\n\nvar ERROR_PACKET = exports.ERROR + '\"encode error\"';\n\n/**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n * @param {Function} callback - function to handle encodings (likely engine.write)\n * @return Calls callback with Array of encodings\n * @api public\n */\n\nEncoder.prototype.encode = function(obj, callback){\n  debug('encoding packet %j', obj);\n\n  if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n    encodeAsBinary(obj, callback);\n  } else {\n    var encoding = encodeAsString(obj);\n    callback([encoding]);\n  }\n};\n\n/**\n * Encode packet as string.\n *\n * @param {Object} packet\n * @return {String} encoded\n * @api private\n */\n\nfunction encodeAsString(obj) {\n\n  // first is type\n  var str = '' + obj.type;\n\n  // attachments if we have them\n  if (exports.BINARY_EVENT === obj.type || exports.BINARY_ACK === obj.type) {\n    str += obj.attachments + '-';\n  }\n\n  // if we have a namespace other than `/`\n  // we append it followed by a comma `,`\n  if (obj.nsp && '/' !== obj.nsp) {\n    str += obj.nsp + ',';\n  }\n\n  // immediately followed by the id\n  if (null != obj.id) {\n    str += obj.id;\n  }\n\n  // json data\n  if (null != obj.data) {\n    var payload = tryStringify(obj.data);\n    if (payload !== false) {\n      str += payload;\n    } else {\n      return ERROR_PACKET;\n    }\n  }\n\n  debug('encoded %j as %s', obj, str);\n  return str;\n}\n\nfunction tryStringify(str) {\n  try {\n    return JSON.stringify(str);\n  } catch(e){\n    return false;\n  }\n}\n\n/**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n *\n * @param {Object} packet\n * @return {Buffer} encoded\n * @api private\n */\n\nfunction encodeAsBinary(obj, callback) {\n\n  function writeEncoding(bloblessData) {\n    var deconstruction = binary.deconstructPacket(bloblessData);\n    var pack = encodeAsString(deconstruction.packet);\n    var buffers = deconstruction.buffers;\n\n    buffers.unshift(pack); // add packet info to beginning of data list\n    callback(buffers); // write all the buffers\n  }\n\n  binary.removeBlobs(obj, writeEncoding);\n}\n\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n * @api public\n */\n\nfunction Decoder(opts) {\n  this.reconstructor = null;\n  opts = opts || {};\n  this.opts = {\n    maxAttachments: opts.maxAttachments || 10,\n  };\n}\n\n/**\n * Mix in `Emitter` with Decoder.\n */\n\nEmitter(Decoder.prototype);\n\n/**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n * @return {Object} packet\n * @api public\n */\n\nDecoder.prototype.add = function(obj) {\n  var packet;\n  if (typeof obj === 'string') {\n    if (this.reconstructor) {\n      throw new Error(\"got plaintext data when reconstructing a packet\");\n    }\n    packet = decodeString(obj, this.opts.maxAttachments);\n    if (exports.BINARY_EVENT === packet.type || exports.BINARY_ACK === packet.type) { // binary packet's json\n      this.reconstructor = new BinaryReconstructor(packet);\n\n      // no attachments, labeled binary but no binary data to follow\n      if (this.reconstructor.reconPack.attachments === 0) {\n        this.emit('decoded', packet);\n      }\n    } else { // non-binary full packet\n      this.emit('decoded', packet);\n    }\n  } else if (isBuf(obj) || obj.base64) { // raw binary data\n    if (!this.reconstructor) {\n      throw new Error('got binary data when not reconstructing a packet');\n    } else {\n      packet = this.reconstructor.takeBinaryData(obj);\n      if (packet) { // received final buffer\n        this.reconstructor = null;\n        this.emit('decoded', packet);\n      }\n    }\n  } else {\n    throw new Error('Unknown type: ' + obj);\n  }\n};\n\nfunction isPayloadValid(type, payload) {\n  switch (type) {\n    case 0: // CONNECT\n      return typeof payload === \"object\";\n    case 1: // DISCONNECT\n      return payload === undefined;\n    case 4: // ERROR\n      return typeof payload === \"string\" || typeof payload === \"object\";\n    case 2: // EVENT\n    case 5: // BINARY_EVENT\n      return (\n        isArray(payload) &&\n        (typeof payload[0] === \"string\" || typeof payload[0] === \"number\")\n      );\n    case 3: // ACK\n    case 6: // BINARY_ACK\n      return isArray(payload);\n  }\n}\n\n/**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @param {Number} maxAttachments - the maximum number of binary attachments\n * @return {Object} packet\n * @api private\n */\n\nfunction decodeString(str, maxAttachments) {\n  var i = 0;\n  // look up type\n  var p = {\n    type: Number(str.charAt(0))\n  };\n\n  if (null == exports.types[p.type]) {\n    return error('unknown packet type ' + p.type);\n  }\n\n  // look up attachments if type binary\n  if (exports.BINARY_EVENT === p.type || exports.BINARY_ACK === p.type) {\n    var start = i + 1;\n    while (str.charAt(++i) !== '-' && i != str.length) {}\n    var buf = str.substring(start, i);\n    if (buf != Number(buf) || str.charAt(i) !== '-') {\n      throw new Error('Illegal attachments');\n    }\n    var n = Number(buf);\n    if (!isInteger(n) || n < 0) {\n      throw new Error(\"Illegal attachments\");\n    } else if (n > maxAttachments) {\n      throw new Error(\"too many attachments\");\n    }\n    p.attachments = n;\n  }\n\n  // look up namespace (if any)\n  if ('/' === str.charAt(i + 1)) {\n    var start = i + 1;\n    while (++i) {\n      var c = str.charAt(i);\n      if (',' === c) break;\n      if (i === str.length) break;\n    }\n    p.nsp = str.substring(start, i);\n  } else {\n    p.nsp = '/';\n  }\n\n  // look up id\n  var next = str.charAt(i + 1);\n  if ('' !== next && Number(next) == next) {\n    var start = i + 1;\n    while (++i) {\n      var c = str.charAt(i);\n      if (null == c || Number(c) != c) {\n        --i;\n        break;\n      }\n      if (i === str.length) break;\n    }\n    p.id = Number(str.substring(start, i + 1));\n  }\n\n  // look up json data\n  if (str.charAt(++i)) {\n    var payload = tryParse(str.substr(i));\n    if (isPayloadValid(p.type, payload)) {\n      p.data = payload;\n    } else {\n      throw new Error(\"invalid payload\");\n    }\n  }\n\n  debug('decoded %s as %j', str, p);\n  return p;\n}\n\nfunction tryParse(str) {\n  try {\n    return JSON.parse(str);\n  } catch(e){\n    return false;\n  }\n}\n\n/**\n * Deallocates a parser's resources\n *\n * @api public\n */\n\nDecoder.prototype.destroy = function() {\n  if (this.reconstructor) {\n    this.reconstructor.finishedReconstruction();\n  }\n};\n\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n * @api private\n */\n\nfunction BinaryReconstructor(packet) {\n  this.reconPack = packet;\n  this.buffers = [];\n}\n\n/**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n *   a reconstructed packet object if all buffers have been received.\n * @api private\n */\n\nBinaryReconstructor.prototype.takeBinaryData = function(binData) {\n  this.buffers.push(binData);\n  if (this.buffers.length === this.reconPack.attachments) { // done with buffer list\n    var packet = binary.reconstructPacket(this.reconPack, this.buffers);\n    this.finishedReconstruction();\n    return packet;\n  }\n  return null;\n};\n\n/**\n * Cleans up binary packet reconstruction variables.\n *\n * @api private\n */\n\nBinaryReconstructor.prototype.finishedReconstruction = function() {\n  this.reconPack = null;\n  this.buffers = [];\n};\n\nfunction error(msg) {\n  return {\n    type: exports.ERROR,\n    data: 'parser error: ' + msg\n  };\n}\n\nvar isInteger =\n  Number.isInteger ||\n  function (value) {\n    return (\n      typeof value === \"number\" &&\n      isFinite(value) &&\n      Math.floor(value) === value\n    );\n  };\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/socket.io-parser/index.js?");

/***/ }),

/***/ "./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {\nmodule.exports = isBuf;\n\nvar withNativeBuffer = typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function';\nvar withNativeArrayBuffer = typeof ArrayBuffer === 'function';\n\nvar isView = function (obj) {\n  return typeof ArrayBuffer.isView === 'function' ? ArrayBuffer.isView(obj) : (obj.buffer instanceof ArrayBuffer);\n};\n\n/**\n * Returns true if obj is a buffer or an arraybuffer.\n *\n * @api private\n */\n\nfunction isBuf(obj) {\n  return (withNativeBuffer && Buffer.isBuffer(obj)) ||\n          (withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj)));\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://futureBooks/./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js?");

/***/ }),

/***/ "./node_modules/sortablejs/modular/sortable.esm.js":
/*!*********************************************************!*\
  !*** ./node_modules/sortablejs/modular/sortable.esm.js ***!
  \*********************************************************/
/*! exports provided: default, MultiDrag, Sortable, Swap */
/*! ModuleConcatenation bailout: Module uses injected variables (__webpack_provided_window_dot_jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_window_dot_jQuery) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MultiDrag\", function() { return MultiDragPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sortable\", function() { return Sortable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Swap\", function() { return SwapPlugin; });\n/**!\n * Sortable 1.15.6\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n  return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.6\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n  }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n  return false;\n}\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n  return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\nfunction css(el, prop, val) {\n  var style = el && el.style;\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n    } while (!selfOnly && (el = el.parentNode));\n  }\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n  return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n      i = 0,\n      n = list.length;\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n    return list;\n  }\n  return [];\n}\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\r\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\r\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\r\n * @param  {[HTMLElement]} container              The parent the element will be placed in\r\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode;\n\n    // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect();\n\n          // Set relative to edges of padding box of container\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n      } while (container = container.parentNode);\n    }\n  }\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n      scaleX = elMatrix && elMatrix.a,\n      scaleY = elMatrix && elMatrix.d;\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\r\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n    elSideVal = getRect(el)[elSide];\n\n  /* jshint boss:true */\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n      visible = void 0;\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n  return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param  {HTMLElement} el       The parent element\r\n * @param  {Number} childNum      The index of the child\r\n * @param  {Object} options       Parent Sortable's options\r\n * @return {HTMLElement}          The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0,\n    i = 0,\n    children = el.children;\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n      currentChild++;\n    }\n    i++;\n  }\n  return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param  {HTMLElement} el       Parent element\r\n * @param  {selector} selector    Any other elements that should be ignored\r\n * @return {HTMLElement}          The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n  return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param  {HTMLElement} el\r\n * @param  {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n  var index = 0;\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n\n  /* jshint boss:true */\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n  return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param  {HTMLElement} el\r\n * @return {Array}             Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n    offsetTop = 0,\n    winScroller = getWindowScrollingElement();\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n        scaleX = elMatrix.a,\n        scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n  return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param  {Array} arr   Array that may or may not hold the object\r\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number}      The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n  return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n  } while (elem = elem.parentNode);\n  return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n  return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n        _this = this;\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = __webpack_provided_window_dot_jQuery || window.Zepto;\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n  var rect = {};\n  Array.from(container.children).forEach(function (child) {\n    var _rect$left, _rect$top, _rect$right, _rect$bottom;\n    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n    var childRect = getRect(child);\n    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n  });\n  rect.width = rect.right - rect.left;\n  rect.height = rect.bottom - rect.top;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n    animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n        // If animating: compensate for current animation\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n      var animating = false,\n        animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n          target = state.target,\n          fromRect = target.fromRect,\n          toRect = getRect(target),\n          prevFromRect = target.prevFromRect,\n          prevToRect = target.prevToRect,\n          animatingRect = state.rect,\n          targetMatrix = matrix(target, true);\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n        target.toRect = toRect;\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n          // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        }\n\n        // if fromRect != toRect: animate\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n          if (!time) {\n            time = _this.options.animation;\n          }\n          _this.animate(target, animatingRect, toRect, time);\n        }\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n          scaleX = elMatrix && elMatrix.a,\n          scaleY = elMatrix && elMatrix.d,\n          translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n          translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        this.forRepaintDummy = repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\nfunction repaint(target) {\n  return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n    plugins.forEach(function (p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n    this.eventCanceled = false;\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return;\n      // Fire global events if it exists in this sortable\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n\n      // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized;\n\n      // Add default options from plugin\n      _extends(defaults, initialized.defaults);\n    });\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return;\n\n      // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n    rootEl = _ref.rootEl,\n    name = _ref.name,\n    targetEl = _ref.targetEl,\n    cloneEl = _ref.cloneEl,\n    toEl = _ref.toEl,\n    fromEl = _ref.fromEl,\n    oldIndex = _ref.oldIndex,\n    newIndex = _ref.newIndex,\n    oldDraggableIndex = _ref.oldDraggableIndex,\n    newDraggableIndex = _ref.newDraggableIndex,\n    originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n    options = sortable.options,\n    onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    originalEvent = _ref.evt,\n    data = _objectWithoutProperties(_ref, _excluded);\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\nvar dragEl,\n  parentEl,\n  ghostEl,\n  rootEl,\n  nextEl,\n  lastDownEl,\n  cloneEl,\n  cloneHidden,\n  oldIndex,\n  newIndex,\n  oldDraggableIndex,\n  newDraggableIndex,\n  activeGroup,\n  putSortable,\n  awaitingDragStarted = false,\n  ignoreNextClick = false,\n  sortables = [],\n  tapEvt,\n  touchEvt,\n  lastDx,\n  lastDy,\n  tapDistanceLeft,\n  tapDistanceTop,\n  moved,\n  lastTarget,\n  lastDirection,\n  pastFirstInvertThresh = false,\n  isCircumstantialInvert = false,\n  targetMoveDistance,\n  // For positioning ghost absolutely\n  ghostRelativeParent,\n  ghostRelativeParentInitialScroll = [],\n  // (left, top)\n\n  _silent = false,\n  savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n  PositionGhostAbsolutely = IOS,\n  CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n  // This will not pass for IE9, because IE9 DnD only works on anchors\n  supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n  supportCssPointerEvents = function () {\n    if (!documentExists) return;\n    // false when <= IE11\n    if (IE11OrLess) {\n      return false;\n    }\n    var el = document.createElement('x');\n    el.style.cssText = 'pointer-events:auto';\n    return el.style.pointerEvents === 'auto';\n  }(),\n  _detectDirection = function _detectDirection(el, options) {\n    var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n    if (elCSS.display === 'flex') {\n      return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n    }\n    if (elCSS.display === 'grid') {\n      return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n    }\n    if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n      var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n      return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n    }\n    return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n  },\n  _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n    var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n  },\n  /**\r\n   * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n   * @param  {Number} x      X position\r\n   * @param  {Number} y      Y position\r\n   * @return {HTMLElement}   Element of the first found nearest Sortable\r\n   */\n  _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n    var ret;\n    sortables.some(function (sortable) {\n      var threshold = sortable[expando].options.emptyInsertThreshold;\n      if (!threshold || lastChild(sortable)) return;\n      var rect = getRect(sortable),\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n      if (insideHorizontally && insideVertically) {\n        return ret = sortable;\n      }\n    });\n    return ret;\n  },\n  _prepareGroup = function _prepareGroup(options) {\n    function toFn(value, pull) {\n      return function (to, from, dragEl, evt) {\n        var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n        if (value == null && (pull || sameGroup)) {\n          // Default pull value\n          // Default pull and put value if same group\n          return true;\n        } else if (value == null || value === false) {\n          return false;\n        } else if (pull && value === 'clone') {\n          return value;\n        } else if (typeof value === 'function') {\n          return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n        } else {\n          var otherGroup = (pull ? to : from).options.group.name;\n          return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n        }\n      };\n    }\n    var group = {};\n    var originalGroup = options.group;\n    if (!originalGroup || _typeof(originalGroup) != 'object') {\n      originalGroup = {\n        name: originalGroup\n      };\n    }\n    group.name = originalGroup.name;\n    group.checkPull = toFn(originalGroup.pull, true);\n    group.checkPut = toFn(originalGroup.put);\n    group.revertClone = originalGroup.revertClone;\n    options.group = group;\n  },\n  _hideGhostForTarget = function _hideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', 'none');\n    }\n  },\n  _unhideGhostForTarget = function _unhideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', '');\n    }\n  };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n\n/**\r\n * @class  Sortable\r\n * @param  {HTMLElement}  el\r\n * @param  {Object}       [options]\r\n */\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n  this.el = el; // root element\n  this.options = options = _extends({}, options);\n\n  // Export instance\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    // Disabled on Safari: #1571; Enabled on Safari IOS: #2244\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults);\n\n  // Set default options\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n  _prepareGroup(options);\n\n  // Bind all private methods\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  }\n\n  // Setup drag mode\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  }\n\n  // Bind events\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n  sortables.push(this.el);\n\n  // Restore sorting\n  options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n  // Add animation state manager\n  _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n    if (!evt.cancelable) return;\n    var _this = this,\n      el = this.el,\n      options = this.options,\n      preventOnFilter = options.preventOnFilter,\n      type = evt.type,\n      touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n      target = (touch || evt).target,\n      originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n      filter = options.filter;\n    _saveInputCheckedState(el);\n\n    // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n    if (dragEl) {\n      return;\n    }\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    }\n\n    // cancel dnd if original target is content editable\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n\n    // Safari ignores further event handling after mousedown\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n      return;\n    }\n    target = closest(target, options.draggable, el, false);\n    if (target && target.animated) {\n      return;\n    }\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    }\n\n    // Get the index of the dragged element within its parent\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable);\n\n    // Check filter\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n      if (filter) {\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    }\n\n    // Prepare `dragstart`\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n    var _this = this,\n      el = _this.el,\n      options = _this.options,\n      ownerDocument = el.ownerDocument,\n      dragStartFn;\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n          return;\n        }\n        // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n        _this._disableDelayedDragEvents();\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        }\n\n        // Bind the events: dragstart/dragend\n        _this._triggerDragStart(evt, touch);\n\n        // Drag start event\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        });\n\n        // Chosen item\n        toggleClass(dragEl, options.chosenClass, true);\n      };\n\n      // Disable \"draggable\"\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      if (options.supportPointer) {\n        on(ownerDocument, 'pointerup', _this._onDrop);\n        // Native D&D triggers pointercancel\n        !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);\n      } else {\n        on(ownerDocument, 'mouseup', _this._onDrop);\n        on(ownerDocument, 'touchend', _this._onDrop);\n        on(ownerDocument, 'touchcancel', _this._onDrop);\n      }\n\n      // Make dragEl draggable (must be before delay for FireFox)\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n      pluginEvent('delayStart', this, {\n        evt: evt\n      });\n\n      // Delay is impossible for native DnD in Edge or IE\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n        if (options.supportPointer) {\n          on(ownerDocument, 'pointerup', _this._disableDelayedDrag);\n          on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);\n        } else {\n          on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        }\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n    var touch = e.touches ? e.touches[0] : e;\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'pointerup', this._disableDelayedDrag);\n    off(ownerDocument, 'pointercancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n    try {\n      if (document.selection) {\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n    awaitingDragStarted = false;\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n      var options = this.options;\n\n      // Apply effect\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost();\n\n      // Drag start event\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n      _hideGhostForTarget();\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n          target = parent; // store last element\n        }\n        /* jshint boss:true */ while (parent = getParentOrHost(parent));\n      }\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n    if (tapEvt) {\n      var options = this.options,\n        fallbackTolerance = options.fallbackTolerance,\n        fallbackOffset = options.fallbackOffset,\n        touch = evt.touches ? evt.touches[0] : evt,\n        ghostMatrix = ghostEl && matrix(ghostEl, true),\n        scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n        scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n        relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n        dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n        dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n      // only set the status to dragging, when we are actually dragging\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n        this._onDragStart(evt, true);\n      }\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n        rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n        options = this.options;\n\n      // Position absolutely\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl);\n\n      // Set transform-origin\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n    var _this = this;\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    pluginEvent('setupClone', this);\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n      this._hideClone();\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    }\n\n    // #1143: IFrame support workaround\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n      _this._hideClone();\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true);\n\n    // Set proper drop events\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n      on(document, 'drop', _this);\n\n      // #1276 fix:\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n    window.getSelection().removeAllRanges();\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver( /**Event*/evt) {\n    var el = this.el,\n      target = evt.target,\n      dragRect,\n      targetRect,\n      revert,\n      options = this.options,\n      group = options.group,\n      activeSortable = Sortable.active,\n      isOwner = activeGroup === group,\n      canSort = options.sort,\n      fromSortable = putSortable || activeSortable,\n      vertical,\n      _this = this,\n      completedFired = false;\n    if (_silent) return;\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread2({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    }\n\n    // Capture animation state\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n      _this.captureAnimationState();\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    }\n\n    // Return invocation when dragEl is inserted (or completed)\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        }\n\n        // Animation\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      }\n\n      // Null lastTarget if it is not inside a previously swapped element\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      }\n\n      // no bubbling and not fallback\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n        // Do not detect for empty insert if already inserted\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    }\n\n    // Call when dragEl has been inserted\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n    ignoreNextClick = false;\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n      if (revert) {\n        parentEl = rootEl; // actualization\n        capture();\n        this._hideClone();\n        dragOverEvent('revert');\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n        return completed(true);\n      }\n      var elLastChild = lastChild(el, options.draggable);\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // Insert to end of list\n\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        }\n\n        // if there is a last element, it is the target\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n        if (target) {\n          targetRect = getRect(target);\n        }\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          if (elLastChild && elLastChild.nextSibling) {\n            // the last draggable element is not the last node\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        // Insert to start of list\n        var firstChild = getChild(el, 0, options, true);\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n        target = firstChild;\n        targetRect = getRect(target);\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n          targetBeforeFirstSwap,\n          differentLevel = dragEl.parentNode !== el,\n          differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n          side1 = vertical ? 'top' : 'left',\n          scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n          scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        }\n        // If dragEl is already beside target: Do not insert\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n          after = false;\n        after = direction === 1;\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          }\n\n          // Undo chrome's scroll adjustment (has no effect on other browsers)\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n          parentEl = dragEl.parentNode; // actualization\n\n          // must be done before animation\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n          changed();\n          return completed(true);\n        }\n      }\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'pointercancel', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop( /**Event*/evt) {\n    var el = this.el,\n      options = this.options;\n\n    // Get the index of the dragged element within its parent\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode;\n\n    // Get again after plugin event\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    if (Sortable.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n    _cancelNextTick(this.cloneId);\n    _cancelNextTick(this._dragStartId);\n\n    // Unbind events\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n    this._offMoveEvents();\n    this._offUpEvents();\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n    css(dragEl, 'transform', '');\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n        _disableDraggable(dragEl);\n        dragEl.style['will-change'] = '';\n\n        // Remove classes\n        // ghostClass is added in dragStarted\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n        toggleClass(dragEl, this.options.chosenClass, false);\n\n        // Drag stop event\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            // Remove event\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n\n            // drag from one list and drop into another\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          });\n\n          // Save sorting\n          this.save();\n        }\n      }\n    }\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function (el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent( /**Event*/evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n        break;\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n          _globalDragOver(evt);\n        }\n        break;\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n  /**\r\n   * Serializes the item into an array of string.\r\n   * @returns {String[]}\r\n   */\n  toArray: function toArray() {\n    var order = [],\n      el,\n      children = this.el.children,\n      i = 0,\n      n = children.length,\n      options = this.options;\n    for (; i < n; i++) {\n      el = children[i];\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n    return order;\n  },\n  /**\r\n   * Sorts the elements according to the array.\r\n   * @param  {String[]}  order  order of the items\r\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {},\n      rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n  /**\r\n   * Save the current sorting\r\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n  /**\r\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n   * @param   {HTMLElement}  el\r\n   * @param   {String}       [selector]  default: `options.draggable`\r\n   * @returns {HTMLElement|null}\r\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n  /**\r\n   * Set/get option\r\n   * @param   {string} name\r\n   * @param   {*}      [value]\r\n   * @returns {*}\r\n   */\n  option: function option(name, value) {\n    var options = this.options;\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n  /**\r\n   * Destroy\r\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    }\n    // Remove draggable attributes\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n    this._onDrop();\n    this._disableDelayedDragEvents();\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n      return;\n    }\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return;\n\n      // show clone at dragEl or original position\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\nfunction _globalDragOver( /**Event*/evt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n  evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n    sortable = fromEl[expando],\n    onMoveFn = sortable.options.onMove,\n    retVal;\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n  return retVal;\n}\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\nfunction _unsilent() {\n  _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n    targetLength = vertical ? targetRect.height : targetRect.width,\n    targetS1 = vertical ? targetRect.top : targetRect.left,\n    targetS2 = vertical ? targetRect.bottom : targetRect.right,\n    invert = false;\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n  invert = invert || invertSwap;\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n  return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\r\n * @return {Number}                   Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n\n/**\r\n * Generate id\r\n * @param   {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n    i = str.length,\n    sum = 0;\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n  return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n}\n\n// Export utils\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild,\n  expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param  {HTMLElement} element The element\r\n * @return {Sortable|undefined}         The instance of Sortable\r\n */\nSortable.get = function (element) {\n  return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\r\n */\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement}  el\r\n * @param {Object}      [options]\r\n */\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n  scrollEl,\n  scrollRootEl,\n  scrolling = false,\n  lastAutoScrollX,\n  lastAutoScrollY,\n  touchEvt$1,\n  pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    };\n\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n        y = (evt.touches ? evt.touches[0] : evt).clientY,\n        elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt;\n\n      // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback);\n\n        // Listener for pointer element change\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval();\n          // Detect for pointer elem change, emulating native DnD behaviour\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n    y = (evt.touches ? evt.touches[0] : evt).clientY,\n    sens = options.scrollSensitivity,\n    speed = options.scrollSpeed,\n    winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n    scrollCustomFn;\n\n  // New scroll root, set scrollEl\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n  var layersOut = 0;\n  var currentParent = scrollEl;\n  do {\n    var el = currentParent,\n      rect = getRect(el),\n      top = rect.top,\n      bottom = rect.bottom,\n      left = rect.left,\n      right = rect.right,\n      width = rect.width,\n      height = rect.height,\n      canScrollX = void 0,\n      canScrollY = void 0,\n      scrollWidth = el.scrollWidth,\n      scrollHeight = el.scrollHeight,\n      elCSS = css(el),\n      scrollPosX = el.scrollLeft,\n      scrollPosY = el.scrollTop;\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n          }\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    dragEl = _ref.dragEl,\n    activeSortable = _ref.activeSortable,\n    dispatchSortableEvent = _ref.dispatchSortableEvent,\n    hideGhostForTarget = _ref.hideGhostForTarget,\n    unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\nfunction Revert() {}\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n      putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n    this.sortable.animateAll();\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n      putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n        target = _ref2.target,\n        onMove = _ref2.onMove,\n        activeSortable = _ref2.activeSortable,\n        changed = _ref2.changed,\n        cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n        options = this.options;\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n        putSortable = _ref3.putSortable,\n        dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n    p2 = n2.parentNode,\n    i1,\n    i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n  multiDragClones = [],\n  lastMultiDragSelect,\n  // for selection with modifier key down (SHIFT)\n  multiDragSortable,\n  initialFolding = false,\n  // Initial multi-drag fold when drag started\n  folding = false,\n  // Folding any other time\n  dragStarted = false,\n  dragEl$1,\n  clonesFromRect,\n  clonesHidden;\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n    if (!sortable.options.avoidImplicitDeselect) {\n      if (sortable.options.supportPointer) {\n        on(document, 'pointerup', this._deselectMultiDrag);\n      } else {\n        on(document, 'mouseup', this._deselectMultiDrag);\n        on(document, 'touchend', this._deselectMultiDrag);\n      }\n    }\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      avoidImplicitDeselect: false,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n        cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n      sortable._hideClone();\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n        rootEl = _ref3.rootEl,\n        dispatchSortableEvent = _ref3.dispatchSortableEvent,\n        cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n        rootEl = _ref4.rootEl,\n        cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n      var sortable = _ref5.sortable,\n        cloneNowHidden = _ref5.cloneNowHidden,\n        cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      });\n\n      // Sort multi-drag elements\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n\n        sortable.captureAnimationState();\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        }\n\n        // Remove all auxiliary multidrag items from el, if sorting enabled\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n        completed = _ref8.completed,\n        cancel = _ref8.cancel;\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n        rootEl = _ref9.rootEl,\n        sortable = _ref9.sortable,\n        dragRect = _ref9.dragRect;\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n        isOwner = _ref10.isOwner,\n        insertion = _ref10.insertion,\n        activeSortable = _ref10.activeSortable,\n        parentEl = _ref10.parentEl,\n        putSortable = _ref10.putSortable;\n      var options = this.options;\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n        initialFolding = false;\n        // If leaving sort:false root, or already folding - Fold to new location\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute);\n\n            // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        }\n\n        // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n            activeSortable._showClone(sortable);\n\n            // Unfold animation for clones if showing from hidden\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n        isOwner = _ref11.isOwner,\n        activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n        rootEl = _ref12.rootEl,\n        parentEl = _ref12.parentEl,\n        sortable = _ref12.sortable,\n        dispatchSortableEvent = _ref12.dispatchSortableEvent,\n        oldIndex = _ref12.oldIndex,\n        putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n        children = parentEl.children;\n\n      // Multi-drag selection\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n\n          // Modifier activated, select from last to dragEl\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n              currentIndex = index(dragEl$1);\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              (function () {\n                // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n                // (but previous selection existed)\n                var n, i;\n                if (currentIndex > lastIndex) {\n                  i = lastIndex;\n                  n = currentIndex;\n                } else {\n                  i = currentIndex;\n                  n = lastIndex + 1;\n                }\n                var filter = options.filter;\n                for (; i < n; i++) {\n                  if (~multiDragElements.indexOf(children[i])) continue;\n                  // Check if element is draggable\n                  if (!closest(children[i], options.draggable, parentEl, false)) continue;\n                  // Check if element is filtered\n                  var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {\n                    return closest(children[i], criteria.trim(), parentEl, false);\n                  }));\n                  if (filtered) continue;\n                  toggleClass(children[i], options.selectedClass, true);\n                  multiDragElements.push(children[i]);\n                  dispatchEvent({\n                    sortable: sortable,\n                    rootEl: rootEl,\n                    name: 'select',\n                    targetEl: children[i],\n                    originalEvent: evt\n                  });\n                }\n              })();\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n        }\n      }\n\n      // Multi-drag drop\n      if (dragStarted && this.isMultiDrag) {\n        folding = false;\n        // Do not \"unfold\" after around dragEl if reverted\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n            multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect;\n\n                  // Prepare unfold animation\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            }\n\n            // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n              multiDragIndex++;\n            });\n\n            // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n              if (update) {\n                dispatchSortableEvent('update');\n                dispatchSortableEvent('sort');\n              }\n            }\n          }\n\n          // Must be done after capturing individual rects (scroll bar)\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n        multiDragSortable = toSortable;\n      }\n\n      // Remove clones if necessary\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n      // Only deselect if selection is in this sortable\n      if (multiDragSortable !== this.sortable) return;\n\n      // Only deselect if target is not item in this sortable\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n      // Only deselect if left click\n      if (evt && evt.button !== 0) return;\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvent: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n          multiDragSortable = sortable;\n        }\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n          index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n      var oldIndicies = [],\n        newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        });\n\n        // multiDragElements will already be sorted if folding\n        var newIndex;\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n        return key;\n      }\n    }\n  });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/sortablejs/modular/sortable.esm.js?");

/***/ }),

/***/ "./node_modules/svg-injector/svg-injector.js":
/*!***************************************************!*\
  !*** ./node_modules/svg-injector/svg-injector.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * SVGInjector v1.1.3 - Fast, caching, dynamic inline SVG DOM injection library\n * https://github.com/iconic/SVGInjector\n *\n * Copyright (c) 2014-2015 Waybury <hello@waybury.com>\n * @license MIT\n */\n\n(function (window, document) {\n\n  'use strict';\n\n  // Environment\n  var isLocal = window.location.protocol === 'file:';\n  var hasSvgSupport = document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');\n\n  function uniqueClasses(list) {\n    list = list.split(' ');\n\n    var hash = {};\n    var i = list.length;\n    var out = [];\n\n    while (i--) {\n      if (!hash.hasOwnProperty(list[i])) {\n        hash[list[i]] = 1;\n        out.unshift(list[i]);\n      }\n    }\n\n    return out.join(' ');\n  }\n\n  /**\n   * cache (or polyfill for <= IE8) Array.forEach()\n   * source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n   */\n  var forEach = Array.prototype.forEach || function (fn, scope) {\n    if (this === void 0 || this === null || typeof fn !== 'function') {\n      throw new TypeError();\n    }\n\n    /* jshint bitwise: false */\n    var i, len = this.length >>> 0;\n    /* jshint bitwise: true */\n\n    for (i = 0; i < len; ++i) {\n      if (i in this) {\n        fn.call(scope, this[i], i, this);\n      }\n    }\n  };\n\n  // SVG Cache\n  var svgCache = {};\n\n  var injectCount = 0;\n  var injectedElements = [];\n\n  // Request Queue\n  var requestQueue = [];\n\n  // Script running status\n  var ranScripts = {};\n\n  var cloneSvg = function (sourceSvg) {\n    return sourceSvg.cloneNode(true);\n  };\n\n  var queueRequest = function (url, callback) {\n    requestQueue[url] = requestQueue[url] || [];\n    requestQueue[url].push(callback);\n  };\n\n  var processRequestQueue = function (url) {\n    for (var i = 0, len = requestQueue[url].length; i < len; i++) {\n      // Make these calls async so we avoid blocking the page/renderer\n      /* jshint loopfunc: true */\n      (function (index) {\n        setTimeout(function () {\n          requestQueue[url][index](cloneSvg(svgCache[url]));\n        }, 0);\n      })(i);\n      /* jshint loopfunc: false */\n    }\n  };\n\n  var loadSvg = function (url, callback) {\n    if (svgCache[url] !== undefined) {\n      if (svgCache[url] instanceof SVGSVGElement) {\n        // We already have it in cache, so use it\n        callback(cloneSvg(svgCache[url]));\n      }\n      else {\n        // We don't have it in cache yet, but we are loading it, so queue this request\n        queueRequest(url, callback);\n      }\n    }\n    else {\n\n      if (!window.XMLHttpRequest) {\n        callback('Browser does not support XMLHttpRequest');\n        return false;\n      }\n\n      // Seed the cache to indicate we are loading this URL already\n      svgCache[url] = {};\n      queueRequest(url, callback);\n\n      var httpRequest = new XMLHttpRequest();\n\n      httpRequest.onreadystatechange = function () {\n        // readyState 4 = complete\n        if (httpRequest.readyState === 4) {\n\n          // Handle status\n          if (httpRequest.status === 404 || httpRequest.responseXML === null) {\n            callback('Unable to load SVG file: ' + url);\n\n            if (isLocal) callback('Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver.');\n\n            callback();\n            return false;\n          }\n\n          // 200 success from server, or 0 when using file:// protocol locally\n          if (httpRequest.status === 200 || (isLocal && httpRequest.status === 0)) {\n\n            /* globals Document */\n            if (httpRequest.responseXML instanceof Document) {\n              // Cache it\n              svgCache[url] = httpRequest.responseXML.documentElement;\n            }\n            /* globals -Document */\n\n            // IE9 doesn't create a responseXML Document object from loaded SVG,\n            // and throws a \"DOM Exception: HIERARCHY_REQUEST_ERR (3)\" error when injected.\n            //\n            // So, we'll just create our own manually via the DOMParser using\n            // the the raw XML responseText.\n            //\n            // :NOTE: IE8 and older doesn't have DOMParser, but they can't do SVG either, so...\n            else if (DOMParser && (DOMParser instanceof Function)) {\n              var xmlDoc;\n              try {\n                var parser = new DOMParser();\n                xmlDoc = parser.parseFromString(httpRequest.responseText, 'text/xml');\n              }\n              catch (e) {\n                xmlDoc = undefined;\n              }\n\n              if (!xmlDoc || xmlDoc.getElementsByTagName('parsererror').length) {\n                callback('Unable to parse SVG file: ' + url);\n                return false;\n              }\n              else {\n                // Cache it\n                svgCache[url] = xmlDoc.documentElement;\n              }\n            }\n\n            // We've loaded a new asset, so process any requests waiting for it\n            processRequestQueue(url);\n          }\n          else {\n            callback('There was a problem injecting the SVG: ' + httpRequest.status + ' ' + httpRequest.statusText);\n            return false;\n          }\n        }\n      };\n\n      httpRequest.open('GET', url);\n\n      // Treat and parse the response as XML, even if the\n      // server sends us a different mimetype\n      if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml');\n\n      httpRequest.send();\n    }\n  };\n\n  // Inject a single element\n  var injectElement = function (el, evalScripts, pngFallback, callback) {\n\n    // Grab the src or data-src attribute\n    var imgUrl = el.getAttribute('data-src') || el.getAttribute('src');\n\n    // We can only inject SVG\n    if (!(/\\.svg/i).test(imgUrl)) {\n      callback('Attempted to inject a file with a non-svg extension: ' + imgUrl);\n      return;\n    }\n\n    // If we don't have SVG support try to fall back to a png,\n    // either defined per-element via data-fallback or data-png,\n    // or globally via the pngFallback directory setting\n    if (!hasSvgSupport) {\n      var perElementFallback = el.getAttribute('data-fallback') || el.getAttribute('data-png');\n\n      // Per-element specific PNG fallback defined, so use that\n      if (perElementFallback) {\n        el.setAttribute('src', perElementFallback);\n        callback(null);\n      }\n      // Global PNG fallback directoriy defined, use the same-named PNG\n      else if (pngFallback) {\n        el.setAttribute('src', pngFallback + '/' + imgUrl.split('/').pop().replace('.svg', '.png'));\n        callback(null);\n      }\n      // um...\n      else {\n        callback('This browser does not support SVG and no PNG fallback was defined.');\n      }\n\n      return;\n    }\n\n    // Make sure we aren't already in the process of injecting this element to\n    // avoid a race condition if multiple injections for the same element are run.\n    // :NOTE: Using indexOf() only _after_ we check for SVG support and bail,\n    // so no need for IE8 indexOf() polyfill\n    if (injectedElements.indexOf(el) !== -1) {\n      return;\n    }\n\n    // Remember the request to inject this element, in case other injection\n    // calls are also trying to replace this element before we finish\n    injectedElements.push(el);\n\n    // Try to avoid loading the orginal image src if possible.\n    el.setAttribute('src', '');\n\n    // Load it up\n    loadSvg(imgUrl, function (svg) {\n\n      if (typeof svg === 'undefined' || typeof svg === 'string') {\n        callback(svg);\n        return false;\n      }\n\n      var imgId = el.getAttribute('id');\n      if (imgId) {\n        svg.setAttribute('id', imgId);\n      }\n\n      var imgTitle = el.getAttribute('title');\n      if (imgTitle) {\n        svg.setAttribute('title', imgTitle);\n      }\n\n      // Concat the SVG classes + 'injected-svg' + the img classes\n      var classMerge = [].concat(svg.getAttribute('class') || [], 'injected-svg', el.getAttribute('class') || []).join(' ');\n      svg.setAttribute('class', uniqueClasses(classMerge));\n\n      var imgStyle = el.getAttribute('style');\n      if (imgStyle) {\n        svg.setAttribute('style', imgStyle);\n      }\n\n      // Copy all the data elements to the svg\n      var imgData = [].filter.call(el.attributes, function (at) {\n        return (/^data-\\w[\\w\\-]*$/).test(at.name);\n      });\n      forEach.call(imgData, function (dataAttr) {\n        if (dataAttr.name && dataAttr.value) {\n          svg.setAttribute(dataAttr.name, dataAttr.value);\n        }\n      });\n\n      // Make sure any internally referenced clipPath ids and their\n      // clip-path references are unique.\n      //\n      // This addresses the issue of having multiple instances of the\n      // same SVG on a page and only the first clipPath id is referenced.\n      //\n      // Browsers often shortcut the SVG Spec and don't use clipPaths\n      // contained in parent elements that are hidden, so if you hide the first\n      // SVG instance on the page, then all other instances lose their clipping.\n      // Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=376027\n\n      // Handle all defs elements that have iri capable attributes as defined by w3c: http://www.w3.org/TR/SVG/linking.html#processingIRI\n      // Mapping IRI addressable elements to the properties that can reference them:\n      var iriElementsAndProperties = {\n        'clipPath': ['clip-path'],\n        'color-profile': ['color-profile'],\n        'cursor': ['cursor'],\n        'filter': ['filter'],\n        'linearGradient': ['fill', 'stroke'],\n        'marker': ['marker', 'marker-start', 'marker-mid', 'marker-end'],\n        'mask': ['mask'],\n        'pattern': ['fill', 'stroke'],\n        'radialGradient': ['fill', 'stroke']\n      };\n\n      var element, elementDefs, properties, currentId, newId;\n      Object.keys(iriElementsAndProperties).forEach(function (key) {\n        element = key;\n        properties = iriElementsAndProperties[key];\n\n        elementDefs = svg.querySelectorAll('defs ' + element + '[id]');\n        for (var i = 0, elementsLen = elementDefs.length; i < elementsLen; i++) {\n          currentId = elementDefs[i].id;\n          newId = currentId + '-' + injectCount;\n\n          // All of the properties that can reference this element type\n          var referencingElements;\n          forEach.call(properties, function (property) {\n            // :NOTE: using a substring match attr selector here to deal with IE \"adding extra quotes in url() attrs\"\n            referencingElements = svg.querySelectorAll('[' + property + '*=\"' + currentId + '\"]');\n            for (var j = 0, referencingElementLen = referencingElements.length; j < referencingElementLen; j++) {\n              referencingElements[j].setAttribute(property, 'url(#' + newId + ')');\n            }\n          });\n\n          elementDefs[i].id = newId;\n        }\n      });\n\n      // Remove any unwanted/invalid namespaces that might have been added by SVG editing tools\n      svg.removeAttribute('xmlns:a');\n\n      // Post page load injected SVGs don't automatically have their script\n      // elements run, so we'll need to make that happen, if requested\n\n      // Find then prune the scripts\n      var scripts = svg.querySelectorAll('script');\n      var scriptsToEval = [];\n      var script, scriptType;\n\n      for (var k = 0, scriptsLen = scripts.length; k < scriptsLen; k++) {\n        scriptType = scripts[k].getAttribute('type');\n\n        // Only process javascript types.\n        // SVG defaults to 'application/ecmascript' for unset types\n        if (!scriptType || scriptType === 'application/ecmascript' || scriptType === 'application/javascript') {\n\n          // innerText for IE, textContent for other browsers\n          script = scripts[k].innerText || scripts[k].textContent;\n\n          // Stash\n          scriptsToEval.push(script);\n\n          // Tidy up and remove the script element since we don't need it anymore\n          svg.removeChild(scripts[k]);\n        }\n      }\n\n      // Run/Eval the scripts if needed\n      if (scriptsToEval.length > 0 && (evalScripts === 'always' || (evalScripts === 'once' && !ranScripts[imgUrl]))) {\n        for (var l = 0, scriptsToEvalLen = scriptsToEval.length; l < scriptsToEvalLen; l++) {\n\n          // :NOTE: Yup, this is a form of eval, but it is being used to eval code\n          // the caller has explictely asked to be loaded, and the code is in a caller\n          // defined SVG file... not raw user input.\n          //\n          // Also, the code is evaluated in a closure and not in the global scope.\n          // If you need to put something in global scope, use 'window'\n          new Function(scriptsToEval[l])(window); // jshint ignore:line\n        }\n\n        // Remember we already ran scripts for this svg\n        ranScripts[imgUrl] = true;\n      }\n\n      // :WORKAROUND:\n      // IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page.\n      // This trick will trigger IE to read and use any existing SVG <style> tags.\n      //\n      // Reference: https://github.com/iconic/SVGInjector/issues/23\n      var styleTags = svg.querySelectorAll('style');\n      forEach.call(styleTags, function (styleTag) {\n        styleTag.textContent += '';\n      });\n\n      // Replace the image with the svg\n      el.parentNode.replaceChild(svg, el);\n\n      // Now that we no longer need it, drop references\n      // to the original element so it can be GC'd\n      delete injectedElements[injectedElements.indexOf(el)];\n      el = null;\n\n      // Increment the injected count\n      injectCount++;\n\n      callback(svg);\n    });\n  };\n\n  /**\n   * SVGInjector\n   *\n   * Replace the given elements with their full inline SVG DOM elements.\n   *\n   * :NOTE: We are using get/setAttribute with SVG because the SVG DOM spec differs from HTML DOM and\n   * can return other unexpected object types when trying to directly access svg properties.\n   * ex: \"className\" returns a SVGAnimatedString with the class value found in the \"baseVal\" property,\n   * instead of simple string like with HTML Elements.\n   *\n   * @param {mixes} Array of or single DOM element\n   * @param {object} options\n   * @param {function} callback\n   * @return {object} Instance of SVGInjector\n   */\n  var SVGInjector = function (elements, options, done) {\n\n    // Options & defaults\n    options = options || {};\n\n    // Should we run the scripts blocks found in the SVG\n    // 'always' - Run them every time\n    // 'once' - Only run scripts once for each SVG\n    // [false|'never'] - Ignore scripts\n    var evalScripts = options.evalScripts || 'always';\n\n    // Location of fallback pngs, if desired\n    var pngFallback = options.pngFallback || false;\n\n    // Callback to run during each SVG injection, returning the SVG injected\n    var eachCallback = options.each;\n\n    // Do the injection...\n    if (elements.length !== undefined) {\n      var elementsLoaded = 0;\n      forEach.call(elements, function (element) {\n        injectElement(element, evalScripts, pngFallback, function (svg) {\n          if (eachCallback && typeof eachCallback === 'function') eachCallback(svg);\n          if (done && elements.length === ++elementsLoaded) done(elementsLoaded);\n        });\n      });\n    }\n    else {\n      if (elements) {\n        injectElement(elements, evalScripts, pngFallback, function (svg) {\n          if (eachCallback && typeof eachCallback === 'function') eachCallback(svg);\n          if (done) done(1);\n          elements = null;\n        });\n      }\n      else {\n        if (done) done(0);\n      }\n    }\n  };\n\n  /* global module, exports: true, define */\n  // Node.js or CommonJS\n  if ( true && typeof module.exports === 'object') {\n    module.exports = exports = SVGInjector;\n  }\n  // AMD support\n  else if (true) {\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n      return SVGInjector;\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  }\n  // Otherwise, attach to window as global\n  else {}\n  /* global -module, -exports, -define */\n\n}(window, document));\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/svg-injector/svg-injector.js?");

/***/ }),

/***/ "./node_modules/table-dragger/dist/table-dragger.js":
/*!**********************************************************!*\
  !*** ./node_modules/table-dragger/dist/table-dragger.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t  value: true\n\t});\n\t\n\t__webpack_require__(1);\n\t\n\tvar _drag = __webpack_require__(5);\n\t\n\tvar _drag2 = _interopRequireDefault(_drag);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar create = function create(el, options) {\n\t  return _drag2.default.create(el, options);\n\t};\n\texports.default = create;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// style-loader: Adds some css to the DOM by adding a <style> tag\n\t\n\t// load the styles\n\tvar content = __webpack_require__(2);\n\tif(typeof content === 'string') content = [[module.id, content, '']];\n\t// add the styles to the DOM\n\tvar update = __webpack_require__(4)(content, {});\n\tif(content.locals) module.exports = content.locals;\n\t// Hot Module Replacement\n\tif(false) {}\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(3)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".sindu_dragger {\\n  list-style: none;\\n  margin: 0;\\n  padding: 0;\\n  overflow: hidden;\\n  box-sizing: border-box;\\n}\\n\\n.sindu_handle {\\n  cursor: move;\\n}\\n\\n.sindu_dragger li {\\n  margin: 0;\\n  padding: 0;\\n  list-style: none;\\n  text-align: inherit;\\n}\\n\\n.sindu_dragger li table, .sindu_dragger tr, .sindu_dragger th, .sindu_dragger td {\\n  box-sizing: border-box;\\n}\\n\\n.gu-mirror {\\n  list-style: none;\\n}\\n\\n.sindu_dragger.sindu_column li {\\n  float: left;\\n}\\n\\n.sindu_dragging .sindu_origin_table {\\n  visibility: hidden;\\n}\\n\\n.gu-mirror {\\n  position: fixed !important;\\n  margin: 0 !important;\\n  z-index: 9999 !important;\\n  opacity: 0.8;\\n}\\n\\n.gu-mirror li {\\n  margin: 0;\\n  padding: 0;\\n  list-style: none;\\n  text-align: inherit;\\n}\\n\\n.gu-mirror li table, .gu-mirror tr, .gu-mirror th, .gu-mirror td {\\n  box-sizing: border-box;\\n}\\n\\n.gu-hide {\\n  display: none !important;\\n}\\n\\n.gu-unselectable {\\n  -webkit-user-select: none !important;\\n  -moz-user-select: none !important;\\n  -ms-user-select: none !important;\\n  user-select: none !important;\\n}\\n\\n.gu-transit {\\n  opacity: 0.5;\\n}\\n\", \"\"]);\n\t\n\t// exports\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/*\n\t\tMIT License http://www.opensource.org/licenses/mit-license.php\n\t\tAuthor Tobias Koppers @sokra\n\t*/\n\t// css base code, injected by the css-loader\n\tmodule.exports = function() {\n\t\tvar list = [];\n\t\n\t\t// return the list of modules as css string\n\t\tlist.toString = function toString() {\n\t\t\tvar result = [];\n\t\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\t\tvar item = this[i];\n\t\t\t\tif(item[2]) {\n\t\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(item[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result.join(\"\");\n\t\t};\n\t\n\t\t// import a list of modules into the list\n\t\tlist.i = function(modules, mediaQuery) {\n\t\t\tif(typeof modules === \"string\")\n\t\t\t\tmodules = [[null, modules, \"\"]];\n\t\t\tvar alreadyImportedModules = {};\n\t\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\t\tvar id = this[i][0];\n\t\t\t\tif(typeof id === \"number\")\n\t\t\t\t\talreadyImportedModules[id] = true;\n\t\t\t}\n\t\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\t\tvar item = modules[i];\n\t\t\t\t// skip already imported module\n\t\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t\t//  when a module is imported multiple times with different media queries.\n\t\t\t\t//  I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t\t}\n\t\t\t\t\tlist.push(item);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn list;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t\tMIT License http://www.opensource.org/licenses/mit-license.php\n\t\tAuthor Tobias Koppers @sokra\n\t*/\n\tvar stylesInDom = {},\n\t\tmemoize = function(fn) {\n\t\t\tvar memo;\n\t\t\treturn function () {\n\t\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\t\treturn memo;\n\t\t\t};\n\t\t},\n\t\tisOldIE = memoize(function() {\n\t\t\treturn /msie [6-9]\\b/.test(self.navigator.userAgent.toLowerCase());\n\t\t}),\n\t\tgetHeadElement = memoize(function () {\n\t\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t\t}),\n\t\tsingletonElement = null,\n\t\tsingletonCounter = 0,\n\t\tstyleElementsInsertedAtTop = [];\n\t\n\tmodule.exports = function(list, options) {\n\t\tif(false) {}\n\t\n\t\toptions = options || {};\n\t\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t\t// tags it will allow on a page\n\t\tif (typeof options.singleton === \"undefined\") options.singleton = isOldIE();\n\t\n\t\t// By default, add <style> tags to the bottom of <head>.\n\t\tif (typeof options.insertAt === \"undefined\") options.insertAt = \"bottom\";\n\t\n\t\tvar styles = listToStyles(list);\n\t\taddStylesToDom(styles, options);\n\t\n\t\treturn function update(newList) {\n\t\t\tvar mayRemove = [];\n\t\t\tfor(var i = 0; i < styles.length; i++) {\n\t\t\t\tvar item = styles[i];\n\t\t\t\tvar domStyle = stylesInDom[item.id];\n\t\t\t\tdomStyle.refs--;\n\t\t\t\tmayRemove.push(domStyle);\n\t\t\t}\n\t\t\tif(newList) {\n\t\t\t\tvar newStyles = listToStyles(newList);\n\t\t\t\taddStylesToDom(newStyles, options);\n\t\t\t}\n\t\t\tfor(var i = 0; i < mayRemove.length; i++) {\n\t\t\t\tvar domStyle = mayRemove[i];\n\t\t\t\tif(domStyle.refs === 0) {\n\t\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++)\n\t\t\t\t\t\tdomStyle.parts[j]();\n\t\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\t\n\tfunction addStylesToDom(styles, options) {\n\t\tfor(var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\t\t\tif(domStyle) {\n\t\t\t\tdomStyle.refs++;\n\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t\t}\n\t\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar parts = [];\n\t\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t\t}\n\t\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfunction listToStyles(list) {\n\t\tvar styles = [];\n\t\tvar newStyles = {};\n\t\tfor(var i = 0; i < list.length; i++) {\n\t\t\tvar item = list[i];\n\t\t\tvar id = item[0];\n\t\t\tvar css = item[1];\n\t\t\tvar media = item[2];\n\t\t\tvar sourceMap = item[3];\n\t\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\t\t\tif(!newStyles[id])\n\t\t\t\tstyles.push(newStyles[id] = {id: id, parts: [part]});\n\t\t\telse\n\t\t\t\tnewStyles[id].parts.push(part);\n\t\t}\n\t\treturn styles;\n\t}\n\t\n\tfunction insertStyleElement(options, styleElement) {\n\t\tvar head = getHeadElement();\n\t\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\n\t\tif (options.insertAt === \"top\") {\n\t\t\tif(!lastStyleElementInsertedAtTop) {\n\t\t\t\thead.insertBefore(styleElement, head.firstChild);\n\t\t\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\t\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\n\t\t\t} else {\n\t\t\t\thead.appendChild(styleElement);\n\t\t\t}\n\t\t\tstyleElementsInsertedAtTop.push(styleElement);\n\t\t} else if (options.insertAt === \"bottom\") {\n\t\t\thead.appendChild(styleElement);\n\t\t} else {\n\t\t\tthrow new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");\n\t\t}\n\t}\n\t\n\tfunction removeStyleElement(styleElement) {\n\t\tstyleElement.parentNode.removeChild(styleElement);\n\t\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\n\t\tif(idx >= 0) {\n\t\t\tstyleElementsInsertedAtTop.splice(idx, 1);\n\t\t}\n\t}\n\t\n\tfunction createStyleElement(options) {\n\t\tvar styleElement = document.createElement(\"style\");\n\t\tstyleElement.type = \"text/css\";\n\t\tinsertStyleElement(options, styleElement);\n\t\treturn styleElement;\n\t}\n\t\n\tfunction createLinkElement(options) {\n\t\tvar linkElement = document.createElement(\"link\");\n\t\tlinkElement.rel = \"stylesheet\";\n\t\tinsertStyleElement(options, linkElement);\n\t\treturn linkElement;\n\t}\n\t\n\tfunction addStyle(obj, options) {\n\t\tvar styleElement, update, remove;\n\t\n\t\tif (options.singleton) {\n\t\t\tvar styleIndex = singletonCounter++;\n\t\t\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\n\t\t\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\n\t\t\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\n\t\t} else if(obj.sourceMap &&\n\t\t\ttypeof URL === \"function\" &&\n\t\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\t\ttypeof Blob === \"function\" &&\n\t\t\ttypeof btoa === \"function\") {\n\t\t\tstyleElement = createLinkElement(options);\n\t\t\tupdate = updateLink.bind(null, styleElement);\n\t\t\tremove = function() {\n\t\t\t\tremoveStyleElement(styleElement);\n\t\t\t\tif(styleElement.href)\n\t\t\t\t\tURL.revokeObjectURL(styleElement.href);\n\t\t\t};\n\t\t} else {\n\t\t\tstyleElement = createStyleElement(options);\n\t\t\tupdate = applyToTag.bind(null, styleElement);\n\t\t\tremove = function() {\n\t\t\t\tremoveStyleElement(styleElement);\n\t\t\t};\n\t\t}\n\t\n\t\tupdate(obj);\n\t\n\t\treturn function updateStyle(newObj) {\n\t\t\tif(newObj) {\n\t\t\t\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\n\t\t\t\t\treturn;\n\t\t\t\tupdate(obj = newObj);\n\t\t\t} else {\n\t\t\t\tremove();\n\t\t\t}\n\t\t};\n\t}\n\t\n\tvar replaceText = (function () {\n\t\tvar textStore = [];\n\t\n\t\treturn function (index, replacement) {\n\t\t\ttextStore[index] = replacement;\n\t\t\treturn textStore.filter(Boolean).join('\\n');\n\t\t};\n\t})();\n\t\n\tfunction applyToSingletonTag(styleElement, index, remove, obj) {\n\t\tvar css = remove ? \"\" : obj.css;\n\t\n\t\tif (styleElement.styleSheet) {\n\t\t\tstyleElement.styleSheet.cssText = replaceText(index, css);\n\t\t} else {\n\t\t\tvar cssNode = document.createTextNode(css);\n\t\t\tvar childNodes = styleElement.childNodes;\n\t\t\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\n\t\t\tif (childNodes.length) {\n\t\t\t\tstyleElement.insertBefore(cssNode, childNodes[index]);\n\t\t\t} else {\n\t\t\t\tstyleElement.appendChild(cssNode);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfunction applyToTag(styleElement, obj) {\n\t\tvar css = obj.css;\n\t\tvar media = obj.media;\n\t\n\t\tif(media) {\n\t\t\tstyleElement.setAttribute(\"media\", media)\n\t\t}\n\t\n\t\tif(styleElement.styleSheet) {\n\t\t\tstyleElement.styleSheet.cssText = css;\n\t\t} else {\n\t\t\twhile(styleElement.firstChild) {\n\t\t\t\tstyleElement.removeChild(styleElement.firstChild);\n\t\t\t}\n\t\t\tstyleElement.appendChild(document.createTextNode(css));\n\t\t}\n\t}\n\t\n\tfunction updateLink(linkElement, obj) {\n\t\tvar css = obj.css;\n\t\tvar sourceMap = obj.sourceMap;\n\t\n\t\tif(sourceMap) {\n\t\t\t// http://stackoverflow.com/a/26603875\n\t\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t\t}\n\t\n\t\tvar blob = new Blob([css], { type: \"text/css\" });\n\t\n\t\tvar oldSrc = linkElement.href;\n\t\n\t\tlinkElement.href = URL.createObjectURL(blob);\n\t\n\t\tif(oldSrc)\n\t\t\tURL.revokeObjectURL(oldSrc);\n\t}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t  value: true\n\t});\n\t\n\tvar _typeof2 = __webpack_require__(6);\n\t\n\tvar _typeof3 = _interopRequireDefault(_typeof2);\n\t\n\tvar _getIterator2 = __webpack_require__(73);\n\t\n\tvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\t\n\tvar _from = __webpack_require__(78);\n\t\n\tvar _from2 = _interopRequireDefault(_from);\n\t\n\tvar _assign = __webpack_require__(85);\n\t\n\tvar _assign2 = _interopRequireDefault(_assign);\n\t\n\tvar _classCallCheck2 = __webpack_require__(89);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(90);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _draggableList = __webpack_require__(94);\n\t\n\tvar _draggableList2 = _interopRequireDefault(_draggableList);\n\t\n\tvar _classes = __webpack_require__(107);\n\t\n\tvar _classes2 = _interopRequireDefault(_classes);\n\t\n\tvar _util = __webpack_require__(108);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar Drag = function () {\n\t  function Drag() {\n\t    var _this = this;\n\t\n\t    var table = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t    var userOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t    (0, _classCallCheck3.default)(this, Drag);\n\t\n\t    if (!checkIsTable(table)) {\n\t      throw new TypeError('table-dragger: el must be TABLE HTMLElement, not ' + {}.toString.call(table));\n\t    }\n\t    if (!table.rows.length) {\n\t      return;\n\t    }\n\t    var defaults = {\n\t      mode: 'column',\n\t      dragHandler: '',\n\t      onlyBody: false,\n\t      animation: 300\n\t    };\n\t    var options = this.options = (0, _assign2.default)({}, defaults, userOptions);\n\t    var mode = options.mode;\n\t\n\t    if (mode === 'free' && !options.dragHandler) {\n\t      throw new Error('table-dragger: please specify dragHandler in free mode');\n\t    }\n\t\n\t    ['onTap', 'destroy', 'startBecauseMouseMoved', 'sortColumn', 'sortRow'].forEach(function (m) {\n\t      _this[m] = _this[m].bind(_this);\n\t    });\n\t\n\t    var dragger = this.dragger = emitter({\n\t      dragging: false,\n\t      destroy: this.destroy\n\t    });\n\t    dragger.on('drop', function (from, to, originEl, realMode) {\n\t      (realMode === 'column' ? _this.sortColumn : _this.sortRow)(from, to);\n\t    });\n\t\n\t    var handlers = void 0;\n\t    if (options.dragHandler) {\n\t      handlers = table.querySelectorAll(options.dragHandler);\n\t      if (handlers && !handlers.length) {\n\t        throw new Error('table-dragger: no element match dragHandler selector');\n\t      }\n\t    } else {\n\t      handlers = mode === 'column' ? table.rows[0] ? table.rows[0].children : [] : (0, _from2.default)(table.rows).map(function (row) {\n\t        return row.children[0];\n\t      });\n\t    }\n\t    this.handlers = (0, _from2.default)(handlers);\n\t    this.handlers.forEach(function (h) {\n\t      h.classList.add(_classes2.default.handle);\n\t    });\n\t\n\t    table.classList.add(_classes2.default.originTable);\n\t\n\t    this.tappedCoord = { x: 0, y: 0 };\n\t    this.cellIndex = { x: 0, y: 0 };\n\t    this.el = table;\n\t    this.sortTable = null;\n\t    this.realMode = mode;\n\t    this.bindEvents();\n\t  }\n\t\n\t  (0, _createClass3.default)(Drag, [{\n\t    key: 'bindEvents',\n\t    value: function bindEvents() {\n\t      var _iteratorNormalCompletion = true;\n\t      var _didIteratorError = false;\n\t      var _iteratorError = undefined;\n\t\n\t      try {\n\t        for (var _iterator = (0, _getIterator3.default)(this.handlers), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t          var e = _step.value;\n\t\n\t          (0, _util.touchy)(e, 'add', 'mousedown', this.onTap);\n\t        }\n\t      } catch (err) {\n\t        _didIteratorError = true;\n\t        _iteratorError = err;\n\t      } finally {\n\t        try {\n\t          if (!_iteratorNormalCompletion && _iterator.return) {\n\t            _iterator.return();\n\t          }\n\t        } finally {\n\t          if (_didIteratorError) {\n\t            throw _iteratorError;\n\t          }\n\t        }\n\t      }\n\t    }\n\t  }, {\n\t    key: 'onTap',\n\t    value: function onTap(event) {\n\t      var _this2 = this;\n\t\n\t      var target = event.target;\n\t\n\t\n\t      while (target.nodeName !== 'TD' && target.nodeName !== 'TH') {\n\t        target = target.parentElement;\n\t      }\n\t\n\t      var ignore = !isLeftButton(event) || event.metaKey || event.ctrlKey;\n\t      if (ignore) {\n\t        return;\n\t      }\n\t\n\t      this.cellIndex = { x: target.cellIndex, y: target.parentElement.rowIndex };\n\t      this.tappedCoord = { x: event.clientX, y: event.clientY };\n\t\n\t      this.eventualStart(false);\n\t      (0, _util.touchy)(document, 'add', 'mouseup', function () {\n\t        _this2.eventualStart(true);\n\t      });\n\t    }\n\t  }, {\n\t    key: 'startBecauseMouseMoved',\n\t    value: function startBecauseMouseMoved(event) {\n\t      var tappedCoord = this.tappedCoord,\n\t          mode = this.options.mode;\n\t\n\t      var gapX = Math.abs(event.clientX - tappedCoord.x);\n\t      var gapY = Math.abs(event.clientY - tappedCoord.y);\n\t\n\t      var isFree = mode === 'free';\n\t      var realMode = mode;\n\t\n\t      if (!gapX && !gapY) {\n\t        return;\n\t      }\n\t      this.dragger.dragging = true;\n\t\n\t      if (isFree) {\n\t        realMode = gapX < gapY ? 'row' : 'column';\n\t      }\n\t      this.realMode = realMode;\n\t\n\t      var sortTable = this.sortTable = new _draggableList2.default({\n\t        mode: realMode,\n\t        originTable: this\n\t      });\n\t      this.eventualStart(true);\n\t\n\t      (0, _util.touchy)(document, 'add', 'mouseup', sortTable.destroy);\n\t    }\n\t  }, {\n\t    key: 'eventualStart',\n\t    value: function eventualStart(remove) {\n\t      var op = remove ? 'remove' : 'add';\n\t      (0, _util.touchy)(document, op, 'mousemove', this.startBecauseMouseMoved);\n\t    }\n\t  }, {\n\t    key: 'destroy',\n\t    value: function destroy() {\n\t      var _iteratorNormalCompletion2 = true;\n\t      var _didIteratorError2 = false;\n\t      var _iteratorError2 = undefined;\n\t\n\t      try {\n\t        for (var _iterator2 = (0, _getIterator3.default)(this.handlers), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t          var h = _step2.value;\n\t\n\t          (0, _util.touchy)(h, 'remove', 'mousedown', this.onTap);\n\t        }\n\t      } catch (err) {\n\t        _didIteratorError2 = true;\n\t        _iteratorError2 = err;\n\t      } finally {\n\t        try {\n\t          if (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t            _iterator2.return();\n\t          }\n\t        } finally {\n\t          if (_didIteratorError2) {\n\t            throw _iteratorError2;\n\t          }\n\t        }\n\t      }\n\t\n\t      this.el.classList.remove(_classes2.default.originTable);\n\t    }\n\t  }, {\n\t    key: 'sortColumn',\n\t    value: function sortColumn(from, to) {\n\t      if (from === to) {\n\t        return;\n\t      }\n\t      var table = this.el;\n\t      (0, _from2.default)(table.rows).forEach(function (row) {\n\t        (0, _util.sort)({ list: row.children, from: from, to: to });\n\t      });\n\t\n\t      var cols = table.querySelectorAll('col');\n\t      if (cols.length) {\n\t        (0, _util.sort)({ list: cols, from: from, to: to });\n\t      }\n\t    }\n\t  }, {\n\t    key: 'sortRow',\n\t    value: function sortRow(from, to) {\n\t      if (from === to) {\n\t        return;\n\t      }\n\t      var table = this.el;\n\t      var list = (0, _from2.default)(table.rows);\n\t      (0, _util.sort)({ list: list, parent: list[to].parentElement, from: from, to: to });\n\t    }\n\t  }], [{\n\t    key: 'create',\n\t    value: function create(el, options) {\n\t      var d = new Drag(el, options);\n\t      return d && d.dragger;\n\t    }\n\t  }]);\n\t  return Drag;\n\t}();\n\t\n\tDrag.version = '1.0';\n\texports.default = Drag;\n\t\n\t\n\tfunction checkIsTable(ele) {\n\t  return ele && (typeof ele === 'undefined' ? 'undefined' : (0, _typeof3.default)(ele)) === 'object' && 'nodeType' in ele && ele.nodeType === 1 && ele.cloneNode && ele.nodeName === 'TABLE';\n\t}\n\t\n\tfunction isLeftButton(e) {\n\t  if ('touches' in e) {\n\t    return e.touches.length === 1;\n\t  }\n\t  if ('buttons' in e) {\n\t    return e.buttons === 1;\n\t  }\n\t  if ('button' in e) {\n\t    return e.button === 0;\n\t  }\n\t  return false;\n\t}\n\t\n\tfunction emitter() {\n\t  var thing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t  var evt = {};\n\t  thing.on = function (type, fn) {\n\t    evt[type] = evt[type] || [];\n\t    evt[type].push(fn);\n\t    return thing;\n\t  };\n\t  thing.emit = function (type) {\n\t    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t      args[_key - 1] = arguments[_key];\n\t    }\n\t\n\t    if (!evt[type]) {\n\t      return;\n\t    }\n\t    var _iteratorNormalCompletion3 = true;\n\t    var _didIteratorError3 = false;\n\t    var _iteratorError3 = undefined;\n\t\n\t    try {\n\t      for (var _iterator3 = (0, _getIterator3.default)(evt[type]), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t        var fn = _step3.value;\n\t\n\t        fn.apply(undefined, args);\n\t      }\n\t    } catch (err) {\n\t      _didIteratorError3 = true;\n\t      _iteratorError3 = err;\n\t    } finally {\n\t      try {\n\t        if (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t          _iterator3.return();\n\t        }\n\t      } finally {\n\t        if (_didIteratorError3) {\n\t          throw _iteratorError3;\n\t        }\n\t      }\n\t    }\n\t  };\n\t  return thing;\n\t}\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _iterator = __webpack_require__(7);\n\t\n\tvar _iterator2 = _interopRequireDefault(_iterator);\n\t\n\tvar _symbol = __webpack_require__(58);\n\t\n\tvar _symbol2 = _interopRequireDefault(_symbol);\n\t\n\tvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n\t  return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n\t} : function (obj) {\n\t  return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n\t};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(8), __esModule: true };\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\t__webpack_require__(53);\n\tmodule.exports = __webpack_require__(57).f('iterator');\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar $at = __webpack_require__(10)(true);\n\t\n\t// 21.1.3.27 String.prototype[@@iterator]()\n\t__webpack_require__(13)(String, 'String', function (iterated) {\n\t  this._t = String(iterated); // target\n\t  this._i = 0;                // next index\n\t// 21.1.5.2.1 %StringIteratorPrototype%.next()\n\t}, function () {\n\t  var O = this._t;\n\t  var index = this._i;\n\t  var point;\n\t  if (index >= O.length) return { value: undefined, done: true };\n\t  point = $at(O, index);\n\t  this._i += point.length;\n\t  return { value: point, done: false };\n\t});\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar toInteger = __webpack_require__(11);\n\tvar defined = __webpack_require__(12);\n\t// true  -> String#at\n\t// false -> String#codePointAt\n\tmodule.exports = function (TO_STRING) {\n\t  return function (that, pos) {\n\t    var s = String(defined(that));\n\t    var i = toInteger(pos);\n\t    var l = s.length;\n\t    var a, b;\n\t    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n\t    a = s.charCodeAt(i);\n\t    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n\t      ? TO_STRING ? s.charAt(i) : a\n\t      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n\t  };\n\t};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t// 7.1.4 ToInteger\n\tvar ceil = Math.ceil;\n\tvar floor = Math.floor;\n\tmodule.exports = function (it) {\n\t  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\n\t// 7.2.1 RequireObjectCoercible(argument)\n\tmodule.exports = function (it) {\n\t  if (it == undefined) throw TypeError(\"Can't call method on  \" + it);\n\t  return it;\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar LIBRARY = __webpack_require__(14);\n\tvar $export = __webpack_require__(15);\n\tvar redefine = __webpack_require__(31);\n\tvar hide = __webpack_require__(20);\n\tvar Iterators = __webpack_require__(32);\n\tvar $iterCreate = __webpack_require__(33);\n\tvar setToStringTag = __webpack_require__(49);\n\tvar getPrototypeOf = __webpack_require__(51);\n\tvar ITERATOR = __webpack_require__(50)('iterator');\n\tvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\n\tvar FF_ITERATOR = '@@iterator';\n\tvar KEYS = 'keys';\n\tvar VALUES = 'values';\n\t\n\tvar returnThis = function () { return this; };\n\t\n\tmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n\t  $iterCreate(Constructor, NAME, next);\n\t  var getMethod = function (kind) {\n\t    if (!BUGGY && kind in proto) return proto[kind];\n\t    switch (kind) {\n\t      case KEYS: return function keys() { return new Constructor(this, kind); };\n\t      case VALUES: return function values() { return new Constructor(this, kind); };\n\t    } return function entries() { return new Constructor(this, kind); };\n\t  };\n\t  var TAG = NAME + ' Iterator';\n\t  var DEF_VALUES = DEFAULT == VALUES;\n\t  var VALUES_BUG = false;\n\t  var proto = Base.prototype;\n\t  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n\t  var $default = $native || getMethod(DEFAULT);\n\t  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n\t  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n\t  var methods, key, IteratorPrototype;\n\t  // Fix native\n\t  if ($anyNative) {\n\t    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n\t    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n\t      // Set @@toStringTag to native iterators\n\t      setToStringTag(IteratorPrototype, TAG, true);\n\t      // fix for some old engines\n\t      if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n\t    }\n\t  }\n\t  // fix Array#{values, @@iterator}.name in V8 / FF\n\t  if (DEF_VALUES && $native && $native.name !== VALUES) {\n\t    VALUES_BUG = true;\n\t    $default = function values() { return $native.call(this); };\n\t  }\n\t  // Define iterator\n\t  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n\t    hide(proto, ITERATOR, $default);\n\t  }\n\t  // Plug for library\n\t  Iterators[NAME] = $default;\n\t  Iterators[TAG] = returnThis;\n\t  if (DEFAULT) {\n\t    methods = {\n\t      values: DEF_VALUES ? $default : getMethod(VALUES),\n\t      keys: IS_SET ? $default : getMethod(KEYS),\n\t      entries: $entries\n\t    };\n\t    if (FORCED) for (key in methods) {\n\t      if (!(key in proto)) redefine(proto, key, methods[key]);\n\t    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n\t  }\n\t  return methods;\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = true;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar global = __webpack_require__(16);\n\tvar core = __webpack_require__(17);\n\tvar ctx = __webpack_require__(18);\n\tvar hide = __webpack_require__(20);\n\tvar has = __webpack_require__(30);\n\tvar PROTOTYPE = 'prototype';\n\t\n\tvar $export = function (type, name, source) {\n\t  var IS_FORCED = type & $export.F;\n\t  var IS_GLOBAL = type & $export.G;\n\t  var IS_STATIC = type & $export.S;\n\t  var IS_PROTO = type & $export.P;\n\t  var IS_BIND = type & $export.B;\n\t  var IS_WRAP = type & $export.W;\n\t  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n\t  var expProto = exports[PROTOTYPE];\n\t  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n\t  var key, own, out;\n\t  if (IS_GLOBAL) source = name;\n\t  for (key in source) {\n\t    // contains in native\n\t    own = !IS_FORCED && target && target[key] !== undefined;\n\t    if (own && has(exports, key)) continue;\n\t    // export native or passed\n\t    out = own ? target[key] : source[key];\n\t    // prevent global pollution for namespaces\n\t    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n\t    // bind timers to global for call from export context\n\t    : IS_BIND && own ? ctx(out, global)\n\t    // wrap global constructors for prevent change them in library\n\t    : IS_WRAP && target[key] == out ? (function (C) {\n\t      var F = function (a, b, c) {\n\t        if (this instanceof C) {\n\t          switch (arguments.length) {\n\t            case 0: return new C();\n\t            case 1: return new C(a);\n\t            case 2: return new C(a, b);\n\t          } return new C(a, b, c);\n\t        } return C.apply(this, arguments);\n\t      };\n\t      F[PROTOTYPE] = C[PROTOTYPE];\n\t      return F;\n\t    // make static versions for prototype methods\n\t    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n\t    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n\t    if (IS_PROTO) {\n\t      (exports.virtual || (exports.virtual = {}))[key] = out;\n\t      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n\t      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n\t    }\n\t  }\n\t};\n\t// type bitmap\n\t$export.F = 1;   // forced\n\t$export.G = 2;   // global\n\t$export.S = 4;   // static\n\t$export.P = 8;   // proto\n\t$export.B = 16;  // bind\n\t$export.W = 32;  // wrap\n\t$export.U = 64;  // safe\n\t$export.R = 128; // real proto method for `library`\n\tmodule.exports = $export;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n\t// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n\tvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n\t  ? window : typeof self != 'undefined' && self.Math == Math ? self\n\t  // eslint-disable-next-line no-new-func\n\t  : Function('return this')();\n\tif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n\tvar core = module.exports = { version: '2.6.5' };\n\tif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// optional / simple context binding\n\tvar aFunction = __webpack_require__(19);\n\tmodule.exports = function (fn, that, length) {\n\t  aFunction(fn);\n\t  if (that === undefined) return fn;\n\t  switch (length) {\n\t    case 1: return function (a) {\n\t      return fn.call(that, a);\n\t    };\n\t    case 2: return function (a, b) {\n\t      return fn.call(that, a, b);\n\t    };\n\t    case 3: return function (a, b, c) {\n\t      return fn.call(that, a, b, c);\n\t    };\n\t  }\n\t  return function (/* ...args */) {\n\t    return fn.apply(that, arguments);\n\t  };\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function (it) {\n\t  if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n\t  return it;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar dP = __webpack_require__(21);\n\tvar createDesc = __webpack_require__(29);\n\tmodule.exports = __webpack_require__(25) ? function (object, key, value) {\n\t  return dP.f(object, key, createDesc(1, value));\n\t} : function (object, key, value) {\n\t  object[key] = value;\n\t  return object;\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar anObject = __webpack_require__(22);\n\tvar IE8_DOM_DEFINE = __webpack_require__(24);\n\tvar toPrimitive = __webpack_require__(28);\n\tvar dP = Object.defineProperty;\n\t\n\texports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n\t  anObject(O);\n\t  P = toPrimitive(P, true);\n\t  anObject(Attributes);\n\t  if (IE8_DOM_DEFINE) try {\n\t    return dP(O, P, Attributes);\n\t  } catch (e) { /* empty */ }\n\t  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n\t  if ('value' in Attributes) O[P] = Attributes.value;\n\t  return O;\n\t};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar isObject = __webpack_require__(23);\n\tmodule.exports = function (it) {\n\t  if (!isObject(it)) throw TypeError(it + ' is not an object!');\n\t  return it;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function (it) {\n\t  return typeof it === 'object' ? it !== null : typeof it === 'function';\n\t};\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = !__webpack_require__(25) && !__webpack_require__(26)(function () {\n\t  return Object.defineProperty(__webpack_require__(27)('div'), 'a', { get: function () { return 7; } }).a != 7;\n\t});\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// Thank's IE8 for his funny defineProperty\n\tmodule.exports = !__webpack_require__(26)(function () {\n\t  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n\t});\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function (exec) {\n\t  try {\n\t    return !!exec();\n\t  } catch (e) {\n\t    return true;\n\t  }\n\t};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar isObject = __webpack_require__(23);\n\tvar document = __webpack_require__(16).document;\n\t// typeof document.createElement is 'object' in old IE\n\tvar is = isObject(document) && isObject(document.createElement);\n\tmodule.exports = function (it) {\n\t  return is ? document.createElement(it) : {};\n\t};\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 7.1.1 ToPrimitive(input [, PreferredType])\n\tvar isObject = __webpack_require__(23);\n\t// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n\t// and the second argument - flag - preferred type is a string\n\tmodule.exports = function (it, S) {\n\t  if (!isObject(it)) return it;\n\t  var fn, val;\n\t  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n\t  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n\t  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n\t  throw TypeError(\"Can't convert object to primitive value\");\n\t};\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function (bitmap, value) {\n\t  return {\n\t    enumerable: !(bitmap & 1),\n\t    configurable: !(bitmap & 2),\n\t    writable: !(bitmap & 4),\n\t    value: value\n\t  };\n\t};\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\n\tvar hasOwnProperty = {}.hasOwnProperty;\n\tmodule.exports = function (it, key) {\n\t  return hasOwnProperty.call(it, key);\n\t};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(20);\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = {};\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar create = __webpack_require__(34);\n\tvar descriptor = __webpack_require__(29);\n\tvar setToStringTag = __webpack_require__(49);\n\tvar IteratorPrototype = {};\n\t\n\t// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\t__webpack_require__(20)(IteratorPrototype, __webpack_require__(50)('iterator'), function () { return this; });\n\t\n\tmodule.exports = function (Constructor, NAME, next) {\n\t  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n\t  setToStringTag(Constructor, NAME + ' Iterator');\n\t};\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n\tvar anObject = __webpack_require__(22);\n\tvar dPs = __webpack_require__(35);\n\tvar enumBugKeys = __webpack_require__(47);\n\tvar IE_PROTO = __webpack_require__(44)('IE_PROTO');\n\tvar Empty = function () { /* empty */ };\n\tvar PROTOTYPE = 'prototype';\n\t\n\t// Create object with fake `null` prototype: use iframe Object with cleared prototype\n\tvar createDict = function () {\n\t  // Thrash, waste and sodomy: IE GC bug\n\t  var iframe = __webpack_require__(27)('iframe');\n\t  var i = enumBugKeys.length;\n\t  var lt = '<';\n\t  var gt = '>';\n\t  var iframeDocument;\n\t  iframe.style.display = 'none';\n\t  __webpack_require__(48).appendChild(iframe);\n\t  iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n\t  // createDict = iframe.contentWindow.Object;\n\t  // html.removeChild(iframe);\n\t  iframeDocument = iframe.contentWindow.document;\n\t  iframeDocument.open();\n\t  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n\t  iframeDocument.close();\n\t  createDict = iframeDocument.F;\n\t  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n\t  return createDict();\n\t};\n\t\n\tmodule.exports = Object.create || function create(O, Properties) {\n\t  var result;\n\t  if (O !== null) {\n\t    Empty[PROTOTYPE] = anObject(O);\n\t    result = new Empty();\n\t    Empty[PROTOTYPE] = null;\n\t    // add \"__proto__\" for Object.getPrototypeOf polyfill\n\t    result[IE_PROTO] = O;\n\t  } else result = createDict();\n\t  return Properties === undefined ? result : dPs(result, Properties);\n\t};\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar dP = __webpack_require__(21);\n\tvar anObject = __webpack_require__(22);\n\tvar getKeys = __webpack_require__(36);\n\t\n\tmodule.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties) {\n\t  anObject(O);\n\t  var keys = getKeys(Properties);\n\t  var length = keys.length;\n\t  var i = 0;\n\t  var P;\n\t  while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n\t  return O;\n\t};\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.14 / 15.2.3.14 Object.keys(O)\n\tvar $keys = __webpack_require__(37);\n\tvar enumBugKeys = __webpack_require__(47);\n\t\n\tmodule.exports = Object.keys || function keys(O) {\n\t  return $keys(O, enumBugKeys);\n\t};\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar has = __webpack_require__(30);\n\tvar toIObject = __webpack_require__(38);\n\tvar arrayIndexOf = __webpack_require__(41)(false);\n\tvar IE_PROTO = __webpack_require__(44)('IE_PROTO');\n\t\n\tmodule.exports = function (object, names) {\n\t  var O = toIObject(object);\n\t  var i = 0;\n\t  var result = [];\n\t  var key;\n\t  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n\t  // Don't enum bug & hidden keys\n\t  while (names.length > i) if (has(O, key = names[i++])) {\n\t    ~arrayIndexOf(result, key) || result.push(key);\n\t  }\n\t  return result;\n\t};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// to indexed object, toObject with fallback for non-array-like ES3 strings\n\tvar IObject = __webpack_require__(39);\n\tvar defined = __webpack_require__(12);\n\tmodule.exports = function (it) {\n\t  return IObject(defined(it));\n\t};\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// fallback for non-array-like ES3 and non-enumerable old V8 strings\n\tvar cof = __webpack_require__(40);\n\t// eslint-disable-next-line no-prototype-builtins\n\tmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n\t  return cof(it) == 'String' ? it.split('') : Object(it);\n\t};\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = function (it) {\n\t  return toString.call(it).slice(8, -1);\n\t};\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// false -> Array#indexOf\n\t// true  -> Array#includes\n\tvar toIObject = __webpack_require__(38);\n\tvar toLength = __webpack_require__(42);\n\tvar toAbsoluteIndex = __webpack_require__(43);\n\tmodule.exports = function (IS_INCLUDES) {\n\t  return function ($this, el, fromIndex) {\n\t    var O = toIObject($this);\n\t    var length = toLength(O.length);\n\t    var index = toAbsoluteIndex(fromIndex, length);\n\t    var value;\n\t    // Array#includes uses SameValueZero equality algorithm\n\t    // eslint-disable-next-line no-self-compare\n\t    if (IS_INCLUDES && el != el) while (length > index) {\n\t      value = O[index++];\n\t      // eslint-disable-next-line no-self-compare\n\t      if (value != value) return true;\n\t    // Array#indexOf ignores holes, Array#includes - not\n\t    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n\t      if (O[index] === el) return IS_INCLUDES || index || 0;\n\t    } return !IS_INCLUDES && -1;\n\t  };\n\t};\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 7.1.15 ToLength\n\tvar toInteger = __webpack_require__(11);\n\tvar min = Math.min;\n\tmodule.exports = function (it) {\n\t  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n\t};\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar toInteger = __webpack_require__(11);\n\tvar max = Math.max;\n\tvar min = Math.min;\n\tmodule.exports = function (index, length) {\n\t  index = toInteger(index);\n\t  return index < 0 ? max(index + length, 0) : min(index, length);\n\t};\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar shared = __webpack_require__(45)('keys');\n\tvar uid = __webpack_require__(46);\n\tmodule.exports = function (key) {\n\t  return shared[key] || (shared[key] = uid(key));\n\t};\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar core = __webpack_require__(17);\n\tvar global = __webpack_require__(16);\n\tvar SHARED = '__core-js_shared__';\n\tvar store = global[SHARED] || (global[SHARED] = {});\n\t\n\t(module.exports = function (key, value) {\n\t  return store[key] || (store[key] = value !== undefined ? value : {});\n\t})('versions', []).push({\n\t  version: core.version,\n\t  mode: __webpack_require__(14) ? 'pure' : 'global',\n\t  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n\t});\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports) {\n\n\tvar id = 0;\n\tvar px = Math.random();\n\tmodule.exports = function (key) {\n\t  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n\t};\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports) {\n\n\t// IE 8- don't enum bug keys\n\tmodule.exports = (\n\t  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n\t).split(',');\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar document = __webpack_require__(16).document;\n\tmodule.exports = document && document.documentElement;\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar def = __webpack_require__(21).f;\n\tvar has = __webpack_require__(30);\n\tvar TAG = __webpack_require__(50)('toStringTag');\n\t\n\tmodule.exports = function (it, tag, stat) {\n\t  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n\t};\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar store = __webpack_require__(45)('wks');\n\tvar uid = __webpack_require__(46);\n\tvar Symbol = __webpack_require__(16).Symbol;\n\tvar USE_SYMBOL = typeof Symbol == 'function';\n\t\n\tvar $exports = module.exports = function (name) {\n\t  return store[name] || (store[name] =\n\t    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n\t};\n\t\n\t$exports.store = store;\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\n\tvar has = __webpack_require__(30);\n\tvar toObject = __webpack_require__(52);\n\tvar IE_PROTO = __webpack_require__(44)('IE_PROTO');\n\tvar ObjectProto = Object.prototype;\n\t\n\tmodule.exports = Object.getPrototypeOf || function (O) {\n\t  O = toObject(O);\n\t  if (has(O, IE_PROTO)) return O[IE_PROTO];\n\t  if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n\t    return O.constructor.prototype;\n\t  } return O instanceof Object ? ObjectProto : null;\n\t};\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 7.1.13 ToObject(argument)\n\tvar defined = __webpack_require__(12);\n\tmodule.exports = function (it) {\n\t  return Object(defined(it));\n\t};\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(54);\n\tvar global = __webpack_require__(16);\n\tvar hide = __webpack_require__(20);\n\tvar Iterators = __webpack_require__(32);\n\tvar TO_STRING_TAG = __webpack_require__(50)('toStringTag');\n\t\n\tvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n\t  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n\t  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n\t  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n\t  'TextTrackList,TouchList').split(',');\n\t\n\tfor (var i = 0; i < DOMIterables.length; i++) {\n\t  var NAME = DOMIterables[i];\n\t  var Collection = global[NAME];\n\t  var proto = Collection && Collection.prototype;\n\t  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n\t  Iterators[NAME] = Iterators.Array;\n\t}\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar addToUnscopables = __webpack_require__(55);\n\tvar step = __webpack_require__(56);\n\tvar Iterators = __webpack_require__(32);\n\tvar toIObject = __webpack_require__(38);\n\t\n\t// 22.1.3.4 Array.prototype.entries()\n\t// 22.1.3.13 Array.prototype.keys()\n\t// 22.1.3.29 Array.prototype.values()\n\t// 22.1.3.30 Array.prototype[@@iterator]()\n\tmodule.exports = __webpack_require__(13)(Array, 'Array', function (iterated, kind) {\n\t  this._t = toIObject(iterated); // target\n\t  this._i = 0;                   // next index\n\t  this._k = kind;                // kind\n\t// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n\t}, function () {\n\t  var O = this._t;\n\t  var kind = this._k;\n\t  var index = this._i++;\n\t  if (!O || index >= O.length) {\n\t    this._t = undefined;\n\t    return step(1);\n\t  }\n\t  if (kind == 'keys') return step(0, index);\n\t  if (kind == 'values') return step(0, O[index]);\n\t  return step(0, [index, O[index]]);\n\t}, 'values');\n\t\n\t// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\tIterators.Arguments = Iterators.Array;\n\t\n\taddToUnscopables('keys');\n\taddToUnscopables('values');\n\taddToUnscopables('entries');\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function () { /* empty */ };\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function (done, value) {\n\t  return { value: value, done: !!done };\n\t};\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\texports.f = __webpack_require__(50);\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(59), __esModule: true };\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(60);\n\t__webpack_require__(70);\n\t__webpack_require__(71);\n\t__webpack_require__(72);\n\tmodule.exports = __webpack_require__(17).Symbol;\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t// ECMAScript 6 symbols shim\n\tvar global = __webpack_require__(16);\n\tvar has = __webpack_require__(30);\n\tvar DESCRIPTORS = __webpack_require__(25);\n\tvar $export = __webpack_require__(15);\n\tvar redefine = __webpack_require__(31);\n\tvar META = __webpack_require__(61).KEY;\n\tvar $fails = __webpack_require__(26);\n\tvar shared = __webpack_require__(45);\n\tvar setToStringTag = __webpack_require__(49);\n\tvar uid = __webpack_require__(46);\n\tvar wks = __webpack_require__(50);\n\tvar wksExt = __webpack_require__(57);\n\tvar wksDefine = __webpack_require__(62);\n\tvar enumKeys = __webpack_require__(63);\n\tvar isArray = __webpack_require__(66);\n\tvar anObject = __webpack_require__(22);\n\tvar isObject = __webpack_require__(23);\n\tvar toIObject = __webpack_require__(38);\n\tvar toPrimitive = __webpack_require__(28);\n\tvar createDesc = __webpack_require__(29);\n\tvar _create = __webpack_require__(34);\n\tvar gOPNExt = __webpack_require__(67);\n\tvar $GOPD = __webpack_require__(69);\n\tvar $DP = __webpack_require__(21);\n\tvar $keys = __webpack_require__(36);\n\tvar gOPD = $GOPD.f;\n\tvar dP = $DP.f;\n\tvar gOPN = gOPNExt.f;\n\tvar $Symbol = global.Symbol;\n\tvar $JSON = global.JSON;\n\tvar _stringify = $JSON && $JSON.stringify;\n\tvar PROTOTYPE = 'prototype';\n\tvar HIDDEN = wks('_hidden');\n\tvar TO_PRIMITIVE = wks('toPrimitive');\n\tvar isEnum = {}.propertyIsEnumerable;\n\tvar SymbolRegistry = shared('symbol-registry');\n\tvar AllSymbols = shared('symbols');\n\tvar OPSymbols = shared('op-symbols');\n\tvar ObjectProto = Object[PROTOTYPE];\n\tvar USE_NATIVE = typeof $Symbol == 'function';\n\tvar QObject = global.QObject;\n\t// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\tvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\t\n\t// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\tvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n\t  return _create(dP({}, 'a', {\n\t    get: function () { return dP(this, 'a', { value: 7 }).a; }\n\t  })).a != 7;\n\t}) ? function (it, key, D) {\n\t  var protoDesc = gOPD(ObjectProto, key);\n\t  if (protoDesc) delete ObjectProto[key];\n\t  dP(it, key, D);\n\t  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n\t} : dP;\n\t\n\tvar wrap = function (tag) {\n\t  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n\t  sym._k = tag;\n\t  return sym;\n\t};\n\t\n\tvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n\t  return typeof it == 'symbol';\n\t} : function (it) {\n\t  return it instanceof $Symbol;\n\t};\n\t\n\tvar $defineProperty = function defineProperty(it, key, D) {\n\t  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n\t  anObject(it);\n\t  key = toPrimitive(key, true);\n\t  anObject(D);\n\t  if (has(AllSymbols, key)) {\n\t    if (!D.enumerable) {\n\t      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n\t      it[HIDDEN][key] = true;\n\t    } else {\n\t      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n\t      D = _create(D, { enumerable: createDesc(0, false) });\n\t    } return setSymbolDesc(it, key, D);\n\t  } return dP(it, key, D);\n\t};\n\tvar $defineProperties = function defineProperties(it, P) {\n\t  anObject(it);\n\t  var keys = enumKeys(P = toIObject(P));\n\t  var i = 0;\n\t  var l = keys.length;\n\t  var key;\n\t  while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\t  return it;\n\t};\n\tvar $create = function create(it, P) {\n\t  return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n\t};\n\tvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n\t  var E = isEnum.call(this, key = toPrimitive(key, true));\n\t  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n\t  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n\t};\n\tvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n\t  it = toIObject(it);\n\t  key = toPrimitive(key, true);\n\t  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n\t  var D = gOPD(it, key);\n\t  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n\t  return D;\n\t};\n\tvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n\t  var names = gOPN(toIObject(it));\n\t  var result = [];\n\t  var i = 0;\n\t  var key;\n\t  while (names.length > i) {\n\t    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n\t  } return result;\n\t};\n\tvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n\t  var IS_OP = it === ObjectProto;\n\t  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n\t  var result = [];\n\t  var i = 0;\n\t  var key;\n\t  while (names.length > i) {\n\t    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n\t  } return result;\n\t};\n\t\n\t// 19.4.1.1 Symbol([description])\n\tif (!USE_NATIVE) {\n\t  $Symbol = function Symbol() {\n\t    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n\t    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n\t    var $set = function (value) {\n\t      if (this === ObjectProto) $set.call(OPSymbols, value);\n\t      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n\t      setSymbolDesc(this, tag, createDesc(1, value));\n\t    };\n\t    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n\t    return wrap(tag);\n\t  };\n\t  redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n\t    return this._k;\n\t  });\n\t\n\t  $GOPD.f = $getOwnPropertyDescriptor;\n\t  $DP.f = $defineProperty;\n\t  __webpack_require__(68).f = gOPNExt.f = $getOwnPropertyNames;\n\t  __webpack_require__(65).f = $propertyIsEnumerable;\n\t  __webpack_require__(64).f = $getOwnPropertySymbols;\n\t\n\t  if (DESCRIPTORS && !__webpack_require__(14)) {\n\t    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n\t  }\n\t\n\t  wksExt.f = function (name) {\n\t    return wrap(wks(name));\n\t  };\n\t}\n\t\n\t$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\t\n\tfor (var es6Symbols = (\n\t  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n\t  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n\t).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\t\n\tfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\t\n\t$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n\t  // 19.4.2.1 Symbol.for(key)\n\t  'for': function (key) {\n\t    return has(SymbolRegistry, key += '')\n\t      ? SymbolRegistry[key]\n\t      : SymbolRegistry[key] = $Symbol(key);\n\t  },\n\t  // 19.4.2.5 Symbol.keyFor(sym)\n\t  keyFor: function keyFor(sym) {\n\t    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n\t    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n\t  },\n\t  useSetter: function () { setter = true; },\n\t  useSimple: function () { setter = false; }\n\t});\n\t\n\t$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n\t  // 19.1.2.2 Object.create(O [, Properties])\n\t  create: $create,\n\t  // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n\t  defineProperty: $defineProperty,\n\t  // 19.1.2.3 Object.defineProperties(O, Properties)\n\t  defineProperties: $defineProperties,\n\t  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n\t  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n\t  // 19.1.2.7 Object.getOwnPropertyNames(O)\n\t  getOwnPropertyNames: $getOwnPropertyNames,\n\t  // 19.1.2.8 Object.getOwnPropertySymbols(O)\n\t  getOwnPropertySymbols: $getOwnPropertySymbols\n\t});\n\t\n\t// 24.3.2 JSON.stringify(value [, replacer [, space]])\n\t$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n\t  var S = $Symbol();\n\t  // MS Edge converts symbol values to JSON as {}\n\t  // WebKit converts symbol values to JSON as null\n\t  // V8 throws on boxed symbols\n\t  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n\t})), 'JSON', {\n\t  stringify: function stringify(it) {\n\t    var args = [it];\n\t    var i = 1;\n\t    var replacer, $replacer;\n\t    while (arguments.length > i) args.push(arguments[i++]);\n\t    $replacer = replacer = args[1];\n\t    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\t    if (!isArray(replacer)) replacer = function (key, value) {\n\t      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n\t      if (!isSymbol(value)) return value;\n\t    };\n\t    args[1] = replacer;\n\t    return _stringify.apply($JSON, args);\n\t  }\n\t});\n\t\n\t// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\t$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n\t// 19.4.3.5 Symbol.prototype[@@toStringTag]\n\tsetToStringTag($Symbol, 'Symbol');\n\t// 20.2.1.9 Math[@@toStringTag]\n\tsetToStringTag(Math, 'Math', true);\n\t// 24.3.3 JSON[@@toStringTag]\n\tsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar META = __webpack_require__(46)('meta');\n\tvar isObject = __webpack_require__(23);\n\tvar has = __webpack_require__(30);\n\tvar setDesc = __webpack_require__(21).f;\n\tvar id = 0;\n\tvar isExtensible = Object.isExtensible || function () {\n\t  return true;\n\t};\n\tvar FREEZE = !__webpack_require__(26)(function () {\n\t  return isExtensible(Object.preventExtensions({}));\n\t});\n\tvar setMeta = function (it) {\n\t  setDesc(it, META, { value: {\n\t    i: 'O' + ++id, // object ID\n\t    w: {}          // weak collections IDs\n\t  } });\n\t};\n\tvar fastKey = function (it, create) {\n\t  // return primitive with prefix\n\t  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\t  if (!has(it, META)) {\n\t    // can't set metadata to uncaught frozen object\n\t    if (!isExtensible(it)) return 'F';\n\t    // not necessary to add metadata\n\t    if (!create) return 'E';\n\t    // add missing metadata\n\t    setMeta(it);\n\t  // return object ID\n\t  } return it[META].i;\n\t};\n\tvar getWeak = function (it, create) {\n\t  if (!has(it, META)) {\n\t    // can't set metadata to uncaught frozen object\n\t    if (!isExtensible(it)) return true;\n\t    // not necessary to add metadata\n\t    if (!create) return false;\n\t    // add missing metadata\n\t    setMeta(it);\n\t  // return hash weak collections IDs\n\t  } return it[META].w;\n\t};\n\t// add metadata on freeze-family methods calling\n\tvar onFreeze = function (it) {\n\t  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n\t  return it;\n\t};\n\tvar meta = module.exports = {\n\t  KEY: META,\n\t  NEED: false,\n\t  fastKey: fastKey,\n\t  getWeak: getWeak,\n\t  onFreeze: onFreeze\n\t};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar global = __webpack_require__(16);\n\tvar core = __webpack_require__(17);\n\tvar LIBRARY = __webpack_require__(14);\n\tvar wksExt = __webpack_require__(57);\n\tvar defineProperty = __webpack_require__(21).f;\n\tmodule.exports = function (name) {\n\t  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n\t  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n\t};\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// all enumerable object keys, includes symbols\n\tvar getKeys = __webpack_require__(36);\n\tvar gOPS = __webpack_require__(64);\n\tvar pIE = __webpack_require__(65);\n\tmodule.exports = function (it) {\n\t  var result = getKeys(it);\n\t  var getSymbols = gOPS.f;\n\t  if (getSymbols) {\n\t    var symbols = getSymbols(it);\n\t    var isEnum = pIE.f;\n\t    var i = 0;\n\t    var key;\n\t    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n\t  } return result;\n\t};\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\n\texports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\n\texports.f = {}.propertyIsEnumerable;\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 7.2.2 IsArray(argument)\n\tvar cof = __webpack_require__(40);\n\tmodule.exports = Array.isArray || function isArray(arg) {\n\t  return cof(arg) == 'Array';\n\t};\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n\tvar toIObject = __webpack_require__(38);\n\tvar gOPN = __webpack_require__(68).f;\n\tvar toString = {}.toString;\n\t\n\tvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n\t  ? Object.getOwnPropertyNames(window) : [];\n\t\n\tvar getWindowNames = function (it) {\n\t  try {\n\t    return gOPN(it);\n\t  } catch (e) {\n\t    return windowNames.slice();\n\t  }\n\t};\n\t\n\tmodule.exports.f = function getOwnPropertyNames(it) {\n\t  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n\t};\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\n\tvar $keys = __webpack_require__(37);\n\tvar hiddenKeys = __webpack_require__(47).concat('length', 'prototype');\n\t\n\texports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n\t  return $keys(O, hiddenKeys);\n\t};\n\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar pIE = __webpack_require__(65);\n\tvar createDesc = __webpack_require__(29);\n\tvar toIObject = __webpack_require__(38);\n\tvar toPrimitive = __webpack_require__(28);\n\tvar has = __webpack_require__(30);\n\tvar IE8_DOM_DEFINE = __webpack_require__(24);\n\tvar gOPD = Object.getOwnPropertyDescriptor;\n\t\n\texports.f = __webpack_require__(25) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n\t  O = toIObject(O);\n\t  P = toPrimitive(P, true);\n\t  if (IE8_DOM_DEFINE) try {\n\t    return gOPD(O, P);\n\t  } catch (e) { /* empty */ }\n\t  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n\t};\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(62)('asyncIterator');\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(62)('observable');\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(74), __esModule: true };\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(53);\n\t__webpack_require__(9);\n\tmodule.exports = __webpack_require__(75);\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar anObject = __webpack_require__(22);\n\tvar get = __webpack_require__(76);\n\tmodule.exports = __webpack_require__(17).getIterator = function (it) {\n\t  var iterFn = get(it);\n\t  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n\t  return anObject(iterFn.call(it));\n\t};\n\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar classof = __webpack_require__(77);\n\tvar ITERATOR = __webpack_require__(50)('iterator');\n\tvar Iterators = __webpack_require__(32);\n\tmodule.exports = __webpack_require__(17).getIteratorMethod = function (it) {\n\t  if (it != undefined) return it[ITERATOR]\n\t    || it['@@iterator']\n\t    || Iterators[classof(it)];\n\t};\n\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// getting tag from 19.1.3.6 Object.prototype.toString()\n\tvar cof = __webpack_require__(40);\n\tvar TAG = __webpack_require__(50)('toStringTag');\n\t// ES3 wrong here\n\tvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\t\n\t// fallback for IE11 Script Access Denied error\n\tvar tryGet = function (it, key) {\n\t  try {\n\t    return it[key];\n\t  } catch (e) { /* empty */ }\n\t};\n\t\n\tmodule.exports = function (it) {\n\t  var O, T, B;\n\t  return it === undefined ? 'Undefined' : it === null ? 'Null'\n\t    // @@toStringTag case\n\t    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n\t    // builtinTag case\n\t    : ARG ? cof(O)\n\t    // ES3 arguments fallback\n\t    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n\t};\n\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(79), __esModule: true };\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\t__webpack_require__(80);\n\tmodule.exports = __webpack_require__(17).Array.from;\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar ctx = __webpack_require__(18);\n\tvar $export = __webpack_require__(15);\n\tvar toObject = __webpack_require__(52);\n\tvar call = __webpack_require__(81);\n\tvar isArrayIter = __webpack_require__(82);\n\tvar toLength = __webpack_require__(42);\n\tvar createProperty = __webpack_require__(83);\n\tvar getIterFn = __webpack_require__(76);\n\t\n\t$export($export.S + $export.F * !__webpack_require__(84)(function (iter) { Array.from(iter); }), 'Array', {\n\t  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n\t  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n\t    var O = toObject(arrayLike);\n\t    var C = typeof this == 'function' ? this : Array;\n\t    var aLen = arguments.length;\n\t    var mapfn = aLen > 1 ? arguments[1] : undefined;\n\t    var mapping = mapfn !== undefined;\n\t    var index = 0;\n\t    var iterFn = getIterFn(O);\n\t    var length, result, step, iterator;\n\t    if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n\t    // if object isn't iterable or it's array with default iterator - use simple case\n\t    if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n\t      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n\t        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n\t      }\n\t    } else {\n\t      length = toLength(O.length);\n\t      for (result = new C(length); length > index; index++) {\n\t        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n\t      }\n\t    }\n\t    result.length = index;\n\t    return result;\n\t  }\n\t});\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// call something on iterator step with safe closing on error\n\tvar anObject = __webpack_require__(22);\n\tmodule.exports = function (iterator, fn, value, entries) {\n\t  try {\n\t    return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n\t  // 7.4.6 IteratorClose(iterator, completion)\n\t  } catch (e) {\n\t    var ret = iterator['return'];\n\t    if (ret !== undefined) anObject(ret.call(iterator));\n\t    throw e;\n\t  }\n\t};\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// check on default Array iterator\n\tvar Iterators = __webpack_require__(32);\n\tvar ITERATOR = __webpack_require__(50)('iterator');\n\tvar ArrayProto = Array.prototype;\n\t\n\tmodule.exports = function (it) {\n\t  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n\t};\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar $defineProperty = __webpack_require__(21);\n\tvar createDesc = __webpack_require__(29);\n\t\n\tmodule.exports = function (object, index, value) {\n\t  if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n\t  else object[index] = value;\n\t};\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar ITERATOR = __webpack_require__(50)('iterator');\n\tvar SAFE_CLOSING = false;\n\t\n\ttry {\n\t  var riter = [7][ITERATOR]();\n\t  riter['return'] = function () { SAFE_CLOSING = true; };\n\t  // eslint-disable-next-line no-throw-literal\n\t  Array.from(riter, function () { throw 2; });\n\t} catch (e) { /* empty */ }\n\t\n\tmodule.exports = function (exec, skipClosing) {\n\t  if (!skipClosing && !SAFE_CLOSING) return false;\n\t  var safe = false;\n\t  try {\n\t    var arr = [7];\n\t    var iter = arr[ITERATOR]();\n\t    iter.next = function () { return { done: safe = true }; };\n\t    arr[ITERATOR] = function () { return iter; };\n\t    exec(arr);\n\t  } catch (e) { /* empty */ }\n\t  return safe;\n\t};\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(86), __esModule: true };\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(87);\n\tmodule.exports = __webpack_require__(17).Object.assign;\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.3.1 Object.assign(target, source)\n\tvar $export = __webpack_require__(15);\n\t\n\t$export($export.S + $export.F, 'Object', { assign: __webpack_require__(88) });\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t// 19.1.2.1 Object.assign(target, source, ...)\n\tvar getKeys = __webpack_require__(36);\n\tvar gOPS = __webpack_require__(64);\n\tvar pIE = __webpack_require__(65);\n\tvar toObject = __webpack_require__(52);\n\tvar IObject = __webpack_require__(39);\n\tvar $assign = Object.assign;\n\t\n\t// should work with symbols and should have deterministic property order (V8 bug)\n\tmodule.exports = !$assign || __webpack_require__(26)(function () {\n\t  var A = {};\n\t  var B = {};\n\t  // eslint-disable-next-line no-undef\n\t  var S = Symbol();\n\t  var K = 'abcdefghijklmnopqrst';\n\t  A[S] = 7;\n\t  K.split('').forEach(function (k) { B[k] = k; });\n\t  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n\t}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n\t  var T = toObject(target);\n\t  var aLen = arguments.length;\n\t  var index = 1;\n\t  var getSymbols = gOPS.f;\n\t  var isEnum = pIE.f;\n\t  while (aLen > index) {\n\t    var S = IObject(arguments[index++]);\n\t    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n\t    var length = keys.length;\n\t    var j = 0;\n\t    var key;\n\t    while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n\t  } return T;\n\t} : $assign;\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\texports.default = function (instance, Constructor) {\n\t  if (!(instance instanceof Constructor)) {\n\t    throw new TypeError(\"Cannot call a class as a function\");\n\t  }\n\t};\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tvar _defineProperty = __webpack_require__(91);\n\t\n\tvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function () {\n\t  function defineProperties(target, props) {\n\t    for (var i = 0; i < props.length; i++) {\n\t      var descriptor = props[i];\n\t      descriptor.enumerable = descriptor.enumerable || false;\n\t      descriptor.configurable = true;\n\t      if (\"value\" in descriptor) descriptor.writable = true;\n\t      (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n\t    }\n\t  }\n\t\n\t  return function (Constructor, protoProps, staticProps) {\n\t    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n\t    if (staticProps) defineProperties(Constructor, staticProps);\n\t    return Constructor;\n\t  };\n\t}();\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(92), __esModule: true };\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(93);\n\tvar $Object = __webpack_require__(17).Object;\n\tmodule.exports = function defineProperty(it, key, desc) {\n\t  return $Object.defineProperty(it, key, desc);\n\t};\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar $export = __webpack_require__(15);\n\t// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n\t$export($export.S + $export.F * !__webpack_require__(25), 'Object', { defineProperty: __webpack_require__(21).f });\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t  value: true\n\t});\n\t\n\tvar _from = __webpack_require__(78);\n\t\n\tvar _from2 = _interopRequireDefault(_from);\n\t\n\tvar _classCallCheck2 = __webpack_require__(89);\n\t\n\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\t\n\tvar _createClass2 = __webpack_require__(90);\n\t\n\tvar _createClass3 = _interopRequireDefault(_createClass2);\n\t\n\tvar _dragulaWithAnimation = __webpack_require__(95);\n\t\n\tvar _dragulaWithAnimation2 = _interopRequireDefault(_dragulaWithAnimation);\n\t\n\tvar _classes = __webpack_require__(107);\n\t\n\tvar _classes2 = _interopRequireDefault(_classes);\n\t\n\tvar _util = __webpack_require__(108);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar bodyPaddingRight = void 0;\n\tvar bodyOverflow = void 0;\n\t\n\tvar Dragger = function () {\n\t  function Dragger(_ref) {\n\t    var _this = this;\n\t\n\t    var originTable = _ref.originTable,\n\t        mode = _ref.mode;\n\t    (0, _classCallCheck3.default)(this, Dragger);\n\t    var dragger = originTable.dragger,\n\t        cellIndex = originTable.cellIndex,\n\t        originEl = originTable.el,\n\t        options = originTable.options;\n\t\n\t    var fakeTables = this.fakeTables = buildTables(originEl, mode);\n\t\n\t    bodyPaddingRight = parseInt(document.body.style.paddingRight, 0) || 0;\n\t    bodyOverflow = document.body.style.overflow;\n\t\n\t    this.options = options;\n\t    this.mode = mode;\n\t    this.originTable = originTable;\n\t    this.dragger = dragger;\n\t    this.index = mode === 'column' ? cellIndex.x : cellIndex.y;\n\t    ['destroy', 'onDrag', 'onDragend', 'onShadow', 'onOut'].forEach(function (m) {\n\t      _this[m] = _this[m].bind(_this);\n\t    });\n\t\n\t    this.el = fakeTables.reduce(function (previous, current) {\n\t      var li = document.createElement('li');\n\t      li.appendChild(current);\n\t      return previous.appendChild(li) && previous;\n\t    }, document.createElement('ul'));\n\t\n\t    this.drake = (0, _dragulaWithAnimation2.default)([this.el], {\n\t      animation: 300,\n\t      staticClass: _classes2.default.static,\n\t      direction: mode === 'column' ? 'horizontal' : 'vertical'\n\t    }).on('drag', this.onDrag).on('dragend', this.onDragend).on('shadow', this.onShadow).on('out', this.onOut);\n\t\n\t    this.renderEl();\n\t    this.dispatchMousedown();\n\t  }\n\t\n\t  (0, _createClass3.default)(Dragger, [{\n\t    key: 'onDrag',\n\t    value: function onDrag() {\n\t      (0, _util.css)(document.body, { overflow: 'hidden' });\n\t      var barWidth = (0, _util.getScrollBarWidth)();\n\t      console.log(barWidth, 'barWidth');\n\t      if (barWidth) {\n\t        (0, _util.css)(document.body, { 'padding-right': barWidth + bodyPaddingRight + 'px' });\n\t      }\n\t      (0, _util.touchy)(document, 'remove', 'mouseup', this.destroy);\n\t      this.dragger.emit('drag', this.originTable.el, this.options.mode);\n\t    }\n\t  }, {\n\t    key: 'onDragend',\n\t    value: function onDragend(droppedItem) {\n\t      var originEl = this.originTable.el,\n\t          dragger = this.dragger,\n\t          index = this.index,\n\t          mode = this.mode,\n\t          el = this.el;\n\t\n\t      (0, _util.css)(document.body, { overflow: bodyOverflow, 'padding-right': bodyPaddingRight + 'px' });\n\t      this.dragger.dragging = false;\n\t      var from = index;\n\t      var to = (0, _from2.default)(el.children).indexOf(droppedItem);\n\t      this.destroy();\n\t      dragger.emit('drop', from, to, originEl, mode);\n\t    }\n\t  }, {\n\t    key: 'onShadow',\n\t    value: function onShadow(draggingItem) {\n\t      var originEl = this.originTable.el,\n\t          dragger = this.dragger,\n\t          index = this.index,\n\t          el = this.el,\n\t          mode = this.mode;\n\t\n\t      var from = index;\n\t      var to = (0, _from2.default)(el.children).indexOf(draggingItem);\n\t      dragger.emit('shadowMove', from, to, originEl, mode);\n\t    }\n\t  }, {\n\t    key: 'onOut',\n\t    value: function onOut() {\n\t      this.dragger.dragging = false;\n\t      this.dragger.emit('out', this.originTable.el, this.mode);\n\t    }\n\t  }, {\n\t    key: 'destroy',\n\t    value: function destroy() {\n\t      var _this2 = this;\n\t\n\t      (0, _util.remove)(document, 'mouseup', this.destroy);\n\t      this.el.parentElement.classList.remove(_classes2.default.dragging);\n\t      this.el.parentElement.removeChild(this.el);\n\t      setTimeout(function () {\n\t        _this2.drake.destroy();\n\t      }, 0);\n\t    }\n\t  }, {\n\t    key: 'dispatchMousedown',\n\t    value: function dispatchMousedown() {\n\t      var el = this.el,\n\t          index = this.index;\n\t\n\t      el.children[index].dispatchEvent((0, _util.getTouchyEvent)());\n\t    }\n\t  }, {\n\t    key: 'renderEl',\n\t    value: function renderEl() {\n\t      var _this3 = this;\n\t\n\t      var mode = this.mode,\n\t          el = this.el,\n\t          originEl = this.originTable.el;\n\t\n\t\n\t      this.sizeFakes();\n\t      (0, _util.css)(el, {\n\t        position: 'absolute',\n\t        top: originEl.offsetTop + 'px',\n\t        left: originEl.offsetLeft + 'px'\n\t      });\n\t      (0, _util.insertBeforeSibling)({ target: el, origin: originEl });\n\t\n\t      var spacing = window.getComputedStyle(originEl).getPropertyValue('border-spacing').split(' ')[0];\n\t      var attr = mode === 'column' ? 'margin-right' : 'margin-bottom';\n\t      var length = el.children.length;\n\t      (0, _from2.default)(el.children).forEach(function (li, dex) {\n\t        var table = li && li.querySelector('table');\n\t        if (_this3.options.onlyBody && mode === 'row' && !(0, _from2.default)(table.children).some(function (o) {\n\t          return o.nodeName === 'TBODY';\n\t        })) {\n\t          li.classList.add(_classes2.default.static);\n\t        }\n\t\n\t        if (spacing && dex < length - 1) {\n\t          li.style[attr] = '-' + spacing;\n\t        }\n\t      });\n\t\n\t      el.parentElement.classList.add(_classes2.default.dragging);\n\t      el.classList.add(_classes2.default.draggableTable);\n\t      el.classList.add('sindu_' + mode);\n\t    }\n\t  }, {\n\t    key: 'sizeFakes',\n\t    value: function sizeFakes() {\n\t      return this.mode === 'column' ? this.sizeColumnFake() : this.sizeRowFake();\n\t    }\n\t  }, {\n\t    key: 'sizeColumnFake',\n\t    value: function sizeColumnFake() {\n\t      var fakeTables = this.fakeTables,\n\t          originEl = this.originTable.el;\n\t\n\t      (0, _from2.default)((0, _util.getLongestRow)(originEl).children).forEach(function (cell, index) {\n\t        var w = cell.getBoundingClientRect().width;\n\t        var t = fakeTables[index];\n\t        (0, _util.css)(t, { width: w + 'px' });\n\t        (0, _util.css)(t.rows[0].children[0], { width: w + 'px' });\n\t      });\n\t\n\t      var rowHeights = (0, _from2.default)(originEl.rows).map(function (row) {\n\t        return row.children[0].getBoundingClientRect().height;\n\t      });\n\t      fakeTables.forEach(function (t) {\n\t        (0, _from2.default)(t.rows).forEach(function (row, index) {\n\t          (0, _util.css)(row, { height: rowHeights[index] + 'px' });\n\t        });\n\t      });\n\t    }\n\t  }, {\n\t    key: 'sizeRowFake',\n\t    value: function sizeRowFake() {\n\t      var fakeTables = this.fakeTables,\n\t          originEl = this.originTable.el;\n\t\n\t\n\t      var cells = (0, _util.getLongestRow)(originEl).children;\n\t      var w = originEl.getBoundingClientRect().width;\n\t\n\t      fakeTables.forEach(function (t) {\n\t        (0, _util.css)(t, { width: w + 'px' });\n\t        (0, _from2.default)(t.rows[0].children).forEach(function (cell, i) {\n\t          (0, _util.css)(cell, { width: cells[i].getBoundingClientRect().width + 'px' });\n\t        });\n\t      });\n\t    }\n\t  }]);\n\t  return Dragger;\n\t}();\n\t\n\texports.default = Dragger;\n\t\n\tfunction origin2DragItem(liTable) {\n\t  (0, _util.css)(liTable, { 'table-layout': 'fixed', width: 'initial', height: 'initial', padding: 0, margin: 0 });\n\t  ['width', 'height', 'id'].forEach(function (p) {\n\t    liTable.removeAttribute(p);\n\t  });\n\t  liTable.classList.remove(_classes2.default.originTable);\n\t  (0, _from2.default)(liTable.querySelectorAll('col')).forEach(function (col) {\n\t    col.removeAttribute('width');\n\t    (0, _util.css)(col, { width: 'initial' });\n\t  });\n\t}\n\t\n\tfunction getColumnAsTableByIndex(table, index) {\n\t  var cTable = table.cloneNode(true);\n\t  origin2DragItem(cTable);\n\t\n\t  var cols = cTable.querySelectorAll('col');\n\t  if (cols.length) {\n\t    (0, _from2.default)(cols).forEach(function (col, dex) {\n\t      if (dex !== index) {\n\t        col.parentElement.removeChild(col);\n\t      }\n\t    });\n\t  }\n\t\n\t  (0, _from2.default)(cTable.rows).forEach(function (row) {\n\t    var target = row.children[index];\n\t    (0, _util.empty)(row);\n\t    if (target) {\n\t      row.appendChild(target);\n\t    }\n\t  });\n\t  return cTable;\n\t}\n\t\n\tfunction buildRowTables(table) {\n\t  return (0, _from2.default)(table.rows).map(function (row) {\n\t    var cTable = table.cloneNode(true);\n\t\n\t    origin2DragItem(cTable);\n\t\n\t    (0, _from2.default)(cTable.children).forEach(function (c) {\n\t      var nodeName = c.nodeName;\n\t\n\t      if (nodeName !== 'COL' && nodeName !== 'COLGROUP') {\n\t        cTable.removeChild(c);\n\t      }\n\t    });\n\t\n\t    var organ = row.parentNode.cloneNode();\n\t    organ.innerHTML = '';\n\t    organ.appendChild(row.cloneNode(true));\n\t    cTable.appendChild(organ);\n\t    return cTable;\n\t  });\n\t}\n\t\n\tfunction buildColumnTables(table) {\n\t  return (0, _from2.default)((0, _util.getLongestRow)(table).children).map(function (cell, index) {\n\t    return getColumnAsTableByIndex(table, index);\n\t  });\n\t}\n\t\n\tfunction buildTables(table, mode) {\n\t  return mode === 'column' ? buildColumnTables(table) : buildRowTables(table);\n\t}\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar emitter = __webpack_require__(96);\n\tvar crossvent = __webpack_require__(103);\n\tvar classes = __webpack_require__(106);\n\tvar doc = document;\n\tvar documentElement = doc.documentElement;\n\tvar oldCoord = 0;\n\t\n\tfunction dragula (initialContainers, options) {\n\t  var len = arguments.length;\n\t  if (len === 1 && Array.isArray(initialContainers) === false) {\n\t    options = initialContainers;\n\t    initialContainers = [];\n\t  }\n\t  var _mirror; // mirror image\n\t  var _source; // source container\n\t  var _item; // item being dragged\n\t  var _offsetX; // reference x\n\t  var _offsetY; // reference y\n\t  var _moveX; // reference move x\n\t  var _moveY; // reference move y\n\t  var _initialSibling; // reference sibling when grabbed\n\t  var _currentSibling; // reference sibling now\n\t  var _copy; // item used for copying\n\t  var _renderTimer; // timer for setTimeout renderMirrorImage\n\t  var _lastDropTarget = null; // last container item was over\n\t  var _grabbed; // holds mousedown context until first mousemove\n\t\n\t  var o = options || {};\n\t  if (o.moves === void 0) {\n\t    o.moves = always;\n\t  }\n\t  if (o.accepts === void 0) {\n\t    o.accepts = always;\n\t  }\n\t  if (o.invalid === void 0) {\n\t    o.invalid = invalidTarget;\n\t  }\n\t  if (o.containers === void 0) {\n\t    o.containers = initialContainers || [];\n\t  }\n\t  if (o.isContainer === void 0) {\n\t    o.isContainer = never;\n\t  }\n\t  if (o.copy === void 0) {\n\t    o.copy = false;\n\t  }\n\t  if (o.copySortSource === void 0) {\n\t    o.copySortSource = false;\n\t  }\n\t  if (o.revertOnSpill === void 0) {\n\t    o.revertOnSpill = false;\n\t  }\n\t  if (o.removeOnSpill === void 0) {\n\t    o.removeOnSpill = false;\n\t  }\n\t  if (o.direction === void 0) {\n\t    o.direction = 'vertical';\n\t  }\n\t  if (o.ignoreInputTextSelection === void 0) {\n\t    o.ignoreInputTextSelection = true;\n\t  }\n\t  if (o.mirrorContainer === void 0) {\n\t    o.mirrorContainer = doc.body;\n\t  }\n\t  if (o.animation === void 0) {\n\t    o.animation = false;\n\t  }\n\t  // 设置静态不动项目\n\t  if (o.staticClass === void 0) {\n\t    o.staticClass = '';\n\t  }\n\t\n\t  var drake = emitter({\n\t    containers: o.containers,\n\t    start: manualStart,\n\t    end: end,\n\t    cancel: cancel,\n\t    remove: remove,\n\t    destroy: destroy,\n\t    canMove: canMove,\n\t    dragging: false\n\t  });\n\t\n\t  if (o.removeOnSpill === true) {\n\t    drake.on('over', spillOver).on('out', spillOut);\n\t  }\n\t\n\t  events();\n\t\n\t  return drake;\n\t\n\t  function isContainer (el) {\n\t    return drake.containers.indexOf(el) !== -1 || o.isContainer(el);\n\t  }\n\t\n\t  function events (remove) {\n\t    var op = remove ? 'remove' : 'add';\n\t    touchy(documentElement, op, 'mousedown', grab);\n\t    touchy(documentElement, op, 'mouseup', release);\n\t  }\n\t\n\t  function eventualMovements (remove) {\n\t    var op = remove ? 'remove' : 'add';\n\t    touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);\n\t  }\n\t\n\t  function movements (remove) {\n\t    var op = remove ? 'remove' : 'add';\n\t    crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8\n\t    crossvent[op](documentElement, 'click', preventGrabbed);\n\t  }\n\t\n\t  function destroy () {\n\t    events(true);\n\t    release({});\n\t  }\n\t\n\t  function preventGrabbed (e) {\n\t    if (_grabbed) {\n\t      e.preventDefault();\n\t    }\n\t  }\n\t\n\t  function grab (e) {\n\t    _moveX = e.clientX;\n\t    _moveY = e.clientY;\n\t\n\t    var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;\n\t    if (ignore) {\n\t      return; // we only care about honest-to-god left clicks and touch events\n\t    }\n\t    var item = e.target;\n\t    var context = canStart(item);\n\t    if (!context) {\n\t      return;\n\t    }\n\t    _grabbed = context;\n\t    eventualMovements();\n\t    if (e.type === 'mousedown') {\n\t      if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208\n\t        item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176\n\t      } else {\n\t        e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155\n\t      }\n\t    }\n\t  }\n\t\n\t  function startBecauseMouseMoved (e) {\n\t    if (!_grabbed) {\n\t      return;\n\t    }\n\t    if (whichMouseButton(e) === 0) {\n\t      release({});\n\t      return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope\n\t    }\n\t    // truthy check fixes #239, equality fixes #207\n\t    if (e.clientX !== void 0 && e.clientX === _moveX && e.clientY !== void 0 && e.clientY === _moveY) {\n\t      return;\n\t    }\n\t    if (o.ignoreInputTextSelection) {\n\t      var clientX = getCoord('clientX', e);\n\t      var clientY = getCoord('clientY', e);\n\t      var elementBehindCursor = doc.elementFromPoint(clientX, clientY);\n\t      if (isInput(elementBehindCursor)) {\n\t        return;\n\t      }\n\t    }\n\t\n\t    var grabbed = _grabbed; // call to end() unsets _grabbed\n\t    eventualMovements(true);\n\t    movements();\n\t    end();\n\t    start(grabbed);\n\t\n\t    var offset = getOffset(_item);\n\t    _offsetX = getCoord('pageX', e) - offset.left;\n\t    _offsetY = getCoord('pageY', e) - offset.top;\n\t\n\t    classes.add(_copy || _item, 'gu-transit');\n\t    renderMirrorImage();\n\t    drag(e);\n\t  }\n\t\n\t  function canStart (item) {\n\t    if (drake.dragging && _mirror) {\n\t      return;\n\t    }\n\t    if (isContainer(item)) {\n\t      return; // don't drag container itself\n\t    }\n\t    var handle = item;\n\t    while (getParent(item) && isContainer(getParent(item)) === false) {\n\t      if (o.invalid(item, handle)) {\n\t        return;\n\t      }\n\t      item = getParent(item); // drag target should be a top element\n\t      if (!item) {\n\t        return;\n\t      }\n\t    }\n\t    var source = getParent(item);\n\t    if (!source) {\n\t      return;\n\t    }\n\t    if (o.invalid(item, handle) || (o.staticClass && item.classList.contains(o.staticClass))) {\n\t      return;\n\t    }\n\t\n\t    var movable = o.moves(item, source, handle, nextEl(item));\n\t    if (!movable) {\n\t      return;\n\t    }\n\t\n\t    return {\n\t      item: item,\n\t      source: source\n\t    };\n\t  }\n\t\n\t  function canMove (item) {\n\t    return !!canStart(item);\n\t  }\n\t\n\t  function manualStart (item) {\n\t    var context = canStart(item);\n\t    if (context) {\n\t      start(context);\n\t    }\n\t  }\n\t\n\t  function start (context) {\n\t    if (isCopy(context.item, context.source)) {\n\t      _copy = context.item.cloneNode(true);\n\t      drake.emit('cloned', _copy, context.item, 'copy');\n\t    }\n\t\n\t    _source = context.source;\n\t    _item = context.item;\n\t    _initialSibling = _currentSibling = nextEl(context.item);\n\t\n\t    drake.dragging = true;\n\t    drake.emit('drag', _item, _source);\n\t  }\n\t\n\t  function invalidTarget () {\n\t    return false;\n\t  }\n\t\n\t  function end () {\n\t    if (!drake.dragging) {\n\t      return;\n\t    }\n\t    var item = _copy || _item;\n\t    drop(item, getParent(item));\n\t  }\n\t\n\t  function ungrab () {\n\t    _grabbed = false;\n\t    eventualMovements(true);\n\t    movements(true);\n\t  }\n\t\n\t  function release (e) {\n\t    ungrab();\n\t\n\t    if (!drake.dragging) {\n\t      return;\n\t    }\n\t    var item = _copy || _item;\n\t    var clientX = getCoord('clientX', e);\n\t    var clientY = getCoord('clientY', e);\n\t    var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n\t    var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n\t    if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {\n\t      drop(item, dropTarget);\n\t    } else if (o.removeOnSpill) {\n\t      remove();\n\t    } else {\n\t      cancel();\n\t    }\n\t  }\n\t\n\t  function drop (item, target) {\n\t    var parent = getParent(item);\n\t    if (_copy && o.copySortSource && target === _source) {\n\t      parent.removeChild(_item);\n\t    }\n\t    if (isInitialPlacement(target)) {\n\t      drake.emit('cancel', item, _source, _source);\n\t    } else {\n\t      drake.emit('drop', item, target, _source, _currentSibling);\n\t    }\n\t    cleanup();\n\t  }\n\t\n\t  function remove () {\n\t    if (!drake.dragging) {\n\t      return;\n\t    }\n\t    var item = _copy || _item;\n\t    var parent = getParent(item);\n\t    if (parent) {\n\t      parent.removeChild(item);\n\t    }\n\t    drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);\n\t    cleanup();\n\t  }\n\t\n\t  function cancel (revert) {\n\t    if (!drake.dragging) {\n\t      return;\n\t    }\n\t    var reverts = arguments.length > 0 ? revert : o.revertOnSpill;\n\t    var item = _copy || _item;\n\t    var parent = getParent(item);\n\t    var initial = isInitialPlacement(parent);\n\t    if (initial === false && reverts) {\n\t      if (_copy) {\n\t        if (parent) {\n\t          parent.removeChild(_copy);\n\t        }\n\t      } else {\n\t        _source.insertBefore(item, _initialSibling);\n\t      }\n\t    }\n\t    if (initial || reverts) {\n\t      drake.emit('cancel', item, _source, _source);\n\t    } else {\n\t      drake.emit('drop', item, parent, _source, _currentSibling);\n\t    }\n\t    cleanup();\n\t  }\n\t\n\t  function cleanup () {\n\t    var item = _copy || _item;\n\t    ungrab();\n\t    removeMirrorImage();\n\t    if (item) {\n\t      classes.rm(item, 'gu-transit');\n\t    }\n\t    if (_renderTimer) {\n\t      clearTimeout(_renderTimer);\n\t    }\n\t    drake.dragging = false;\n\t    if (_lastDropTarget) {\n\t      drake.emit('out', item, _lastDropTarget, _source);\n\t    }\n\t    drake.emit('dragend', item);\n\t    _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;\n\t  }\n\t\n\t  function isInitialPlacement (target, s) {\n\t    var sibling;\n\t    if (s !== void 0) {\n\t      sibling = s;\n\t    } else if (_mirror) {\n\t      sibling = _currentSibling;\n\t    } else {\n\t      sibling = nextEl(_copy || _item);\n\t    }\n\t    return target === _source && sibling === _initialSibling;\n\t  }\n\t\n\t  function findDropTarget (elementBehindCursor, clientX, clientY) {\n\t    var target = elementBehindCursor;\n\t    while (target && !accepted()) {\n\t      target = getParent(target);\n\t    }\n\t    return target;\n\t\n\t    function accepted () {\n\t      var droppable = isContainer(target);\n\t      if (droppable === false) {\n\t        return false;\n\t      }\n\t\n\t      var immediate = getImmediateChild(target, elementBehindCursor);\n\t      var reference = getReference(target, immediate, clientX, clientY);\n\t      var initial = isInitialPlacement(target, reference);\n\t      if (initial) {\n\t        return true; // should always be able to drop it right back where it was\n\t      }\n\t      return o.accepts(_item, target, _source, reference);\n\t    }\n\t  }\n\t\n\t\n\t  function drag (e) {\n\t    if (!_mirror) {\n\t      return;\n\t    }\n\t    e.preventDefault();\n\t\n\t    var clientX = getCoord('clientX', e);\n\t    var clientY = getCoord('clientY', e);\n\t    var x = clientX - _offsetX;\n\t    var y = clientY - _offsetY;\n\t\n\t    _mirror.style.left = x + 'px';\n\t    _mirror.style.top = y + 'px';\n\t\n\t    var item = _copy || _item;\n\t    var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n\t    var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n\t    var changed = dropTarget !== null && dropTarget !== _lastDropTarget;\n\t    if (changed || dropTarget === null) {\n\t      out();\n\t      _lastDropTarget = dropTarget;\n\t      over();\n\t    }\n\t    var parent = getParent(item);\n\t    if (dropTarget === _source && _copy && !o.copySortSource) {\n\t      if (parent) {\n\t        parent.removeChild(item);\n\t      }\n\t      return;\n\t    }\n\t    var reference;\n\t    // var mover, moverRect;\n\t    // var previous, next, previousRect, nextRect, itemRect;\n\t    // var currentPrevious, currentNext;\n\t    var immediate = getImmediateChild(dropTarget, elementBehindCursor);\n\t    if (immediate !== null) {\n\t      reference = getReference(dropTarget, immediate, clientX, clientY);\n\t    } else if (o.revertOnSpill === true && !_copy) {\n\t      reference = _initialSibling;\n\t      dropTarget = _source;\n\t    } else {\n\t      if (_copy && parent) {\n\t        parent.removeChild(item);\n\t      }\n\t      return;\n\t    }\n\t    if (\n\t      (reference === null && changed) ||\n\t      reference !== item &&\n\t      reference !== nextEl(item)\n\t    ) {\n\t      _currentSibling = reference;\n\t\n\t      var isBrother = item.parentElement === dropTarget;\n\t      var shouldAnimate = isBrother && o.animation;\n\t      var itemRect = item.getBoundingClientRect();\n\t      var direct = o.direction;\n\t      var mover;\n\t      var nowCord = direct === 'horizontal' ? e.pageX : e.pageY;\n\t      if (nowCord < oldCoord) {\n\t        mover = reference; //upward or right\n\t      } else {\n\t        mover = reference ? (reference.previousElementSibling ? reference.previousElementSibling : reference) : dropTarget.lastElementChild;\n\t      }\n\t      oldCoord = nowCord;\n\t      if (!mover) {\n\t        return;\n\t      }\n\t      if (o.staticClass && mover.classList.contains(o.staticClass)) {\n\t        return;\n\t      }\n\t      var moverRect = mover && mover.getBoundingClientRect();\n\t      dropTarget.insertBefore(item, reference);\n\t      if (shouldAnimate && mover && moverRect) {\n\t        animate(moverRect, mover, o.animation);\n\t        animate(itemRect, item, o.animation);\n\t      }\n\t      drake.emit('shadow', item, dropTarget, _source);\n\t    }\n\t    function moved (type) {\n\t      drake.emit(type, item, _lastDropTarget, _source);\n\t    }\n\t\n\t    function over () {\n\t      if (changed) {\n\t        moved('over');\n\t      }\n\t    }\n\t\n\t    function out () {\n\t      if (_lastDropTarget) {\n\t        moved('out');\n\t      }\n\t    }\n\t  }\n\t\n\t  function spillOver (el) {\n\t    classes.rm(el, 'gu-hide');\n\t  }\n\t\n\t  function spillOut (el) {\n\t    if (drake.dragging) {\n\t      classes.add(el, 'gu-hide');\n\t    }\n\t  }\n\t\n\t  function renderMirrorImage () {\n\t    if (_mirror) {\n\t      return;\n\t    }\n\t    var rect = _item.getBoundingClientRect();\n\t    _mirror = _item.cloneNode(true);\n\t    _mirror.style.width = getRectWidth(rect) + 'px';\n\t    _mirror.style.height = getRectHeight(rect) + 'px';\n\t    classes.rm(_mirror, 'gu-transit');\n\t    classes.add(_mirror, 'gu-mirror');\n\t    o.mirrorContainer.appendChild(_mirror);\n\t    touchy(documentElement, 'add', 'mousemove', drag);\n\t    classes.add(o.mirrorContainer, 'gu-unselectable');\n\t    drake.emit('cloned', _mirror, _item, 'mirror');\n\t  }\n\t\n\t  function removeMirrorImage () {\n\t    if (_mirror) {\n\t      classes.rm(o.mirrorContainer, 'gu-unselectable');\n\t      touchy(documentElement, 'remove', 'mousemove', drag);\n\t      getParent(_mirror).removeChild(_mirror);\n\t      _mirror = null;\n\t    }\n\t  }\n\t\n\t  function getImmediateChild (dropTarget, target) {\n\t    var immediate = target;\n\t    while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {\n\t      immediate = getParent(immediate);\n\t    }\n\t    if (immediate === documentElement) {\n\t      return null;\n\t    }\n\t    return immediate;\n\t  }\n\t\n\t  function getReference (dropTarget, target, x, y) {\n\t    var horizontal = o.direction === 'horizontal';\n\t    var reference = target !== dropTarget ? inside() : outside();\n\t    return reference;\n\t\n\t    function outside () { // slower, but able to figure out any position\n\t      var len = dropTarget.children.length;\n\t      var i;\n\t      var el;\n\t      var rect;\n\t      for (i = 0; i < len; i++) {\n\t        el = dropTarget.children[i];\n\t        rect = el.getBoundingClientRect();\n\t        if (horizontal && (rect.left + rect.width / 2) > x) {\n\t          return el;\n\t        }\n\t        if (!horizontal && (rect.top + rect.height / 2) > y) {\n\t          return el;\n\t        }\n\t      }\n\t      return null;\n\t    }\n\t\n\t    function inside () { // faster, but only available if dropped inside a child element\n\t      var rect = target.getBoundingClientRect();\n\t      if (horizontal) {\n\t        return resolve(x > rect.left + getRectWidth(rect) / 2);\n\t      }\n\t      return resolve(y > rect.top + getRectHeight(rect) / 2);\n\t    }\n\t\n\t    function resolve (after) {\n\t      return after ? nextEl(target) : target;\n\t    }\n\t  }\n\t\n\t  function isCopy (item, container) {\n\t    return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);\n\t  }\n\t}\n\t\n\tfunction touchy (el, op, type, fn) {\n\t  var touch = {\n\t    mouseup: 'touchend',\n\t    mousedown: 'touchstart',\n\t    mousemove: 'touchmove'\n\t  };\n\t  var pointers = {\n\t    mouseup: 'pointerup',\n\t    mousedown: 'pointerdown',\n\t    mousemove: 'pointermove'\n\t  };\n\t  var microsoft = {\n\t    mouseup: 'MSPointerUp',\n\t    mousedown: 'MSPointerDown',\n\t    mousemove: 'MSPointerMove'\n\t  };\n\t  if (global.navigator.pointerEnabled) {\n\t    crossvent[op](el, pointers[type], fn);\n\t  } else if (global.navigator.msPointerEnabled) {\n\t    crossvent[op](el, microsoft[type], fn);\n\t  } else {\n\t    crossvent[op](el, touch[type], fn);\n\t    crossvent[op](el, type, fn);\n\t  }\n\t}\n\t\n\tfunction whichMouseButton (e) {\n\t  if (e.touches !== void 0) {\n\t    return e.touches.length;\n\t  }\n\t  if (e.which !== void 0 && e.which !== 0) {\n\t    return e.which;\n\t  } // see https://github.com/bevacqua/dragula/issues/261\n\t  if (e.buttons !== void 0) {\n\t    return e.buttons;\n\t  }\n\t  var button = e.button;\n\t  if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575\n\t    return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);\n\t  }\n\t}\n\t\n\tfunction getOffset (el) {\n\t  var rect = el.getBoundingClientRect();\n\t  return {\n\t    left: rect.left + getScroll('scrollLeft', 'pageXOffset'),\n\t    top: rect.top + getScroll('scrollTop', 'pageYOffset')\n\t  };\n\t}\n\t\n\tfunction getScroll (scrollProp, offsetProp) {\n\t  if (typeof global[offsetProp] !== 'undefined') {\n\t    return global[offsetProp];\n\t  }\n\t  if (documentElement.clientHeight) {\n\t    return documentElement[scrollProp];\n\t  }\n\t  return doc.body[scrollProp];\n\t}\n\t\n\tfunction getElementBehindPoint (point, x, y) {\n\t  var p = point || {};\n\t  var state = p.className;\n\t  var el;\n\t  p.className += ' gu-hide';\n\t  el = doc.elementFromPoint(x, y);\n\t  p.className = state;\n\t  return el;\n\t}\n\t\n\tfunction never () {\n\t  return false;\n\t}\n\tfunction always () {\n\t  return true;\n\t}\n\tfunction getRectWidth (rect) {\n\t  return rect.width || (rect.right - rect.left);\n\t}\n\tfunction getRectHeight (rect) {\n\t  return rect.height || (rect.bottom - rect.top);\n\t}\n\tfunction getParent (el) {\n\t  return el.parentNode === doc ? null : el.parentNode;\n\t}\n\tfunction isInput (el) {\n\t  return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el);\n\t}\n\tfunction isEditable (el) {\n\t  if (!el) {\n\t    return false;\n\t  } // no parents were editable\n\t  if (el.contentEditable === 'false') {\n\t    return false;\n\t  } // stop the lookup\n\t  if (el.contentEditable === 'true') {\n\t    return true;\n\t  } // found a contentEditable element in the chain\n\t  return isEditable(getParent(el)); // contentEditable is set to 'inherit'\n\t}\n\t\n\tfunction nextEl (el) {\n\t  return el.nextElementSibling || manually();\n\t  function manually () {\n\t    var sibling = el;\n\t    do {\n\t      sibling = sibling.nextSibling;\n\t    } while (sibling && sibling.nodeType !== 1);\n\t    return sibling;\n\t  }\n\t}\n\t\n\t// function previousEl (el) {\n\t//   return el.previousElementSibling || manually();\n\t//   function manually () {\n\t//     var sibling = el;\n\t//     do {\n\t//       sibling = sibling.previousSibling;\n\t//     } while (sibling && sibling.nodeType !== 1);\n\t//     return sibling;\n\t//   }\n\t// }\n\t\n\tfunction animate (prevRect, target, time) {\n\t  if (time) {\n\t    if (!prevRect || !target) {\n\t      return;\n\t    }\n\t    var currentRect = target.getBoundingClientRect();\n\t    target.style.transition = 'none';\n\t    target.style.transform = 'translate3d(' + (prevRect.left - currentRect.left) + 'px,' + (prevRect.top - currentRect.top) + 'px,0)';\n\t    target.offsetWidth; // repaint\n\t    target.style.transition = 'all ' + time + 'ms';\n\t    target.style.transform = 'translate3d(0,0,0)';\n\t    clearTimeout(target.animated);\n\t    target.animated = setTimeout(function () {\n\t      target.style.transition = '';\n\t      target.style.transform = '';\n\t      target.animated = false;\n\t    }, time);\n\t  }\n\t}\n\t\n\t\n\tfunction getEventHost (e) {\n\t  // on touchend event, we have to use `e.changedTouches`\n\t  // see http://stackoverflow.com/questions/7192563/touchend-event-properties\n\t  // see https://github.com/bevacqua/dragula/issues/34\n\t  if (e.targetTouches && e.targetTouches.length) {\n\t    return e.targetTouches[0];\n\t  }\n\t  if (e.changedTouches && e.changedTouches.length) {\n\t    return e.changedTouches[0];\n\t  }\n\t  return e;\n\t}\n\t\n\tfunction getCoord (coord, e) {\n\t  var host = getEventHost(e);\n\t  var missMap = {\n\t    pageX: 'clientX', // IE8\n\t    pageY: 'clientY' // IE8\n\t  };\n\t  if (coord in missMap && !(coord in host) && missMap[coord] in host) {\n\t    coord = missMap[coord];\n\t  }\n\t  return host[coord];\n\t}\n\t\n\tmodule.exports = dragula;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar atoa = __webpack_require__(97);\n\tvar debounce = __webpack_require__(98);\n\t\n\tmodule.exports = function emitter (thing, options) {\n\t  var opts = options || {};\n\t  var evt = {};\n\t  if (thing === undefined) { thing = {}; }\n\t  thing.on = function (type, fn) {\n\t    if (!evt[type]) {\n\t      evt[type] = [fn];\n\t    } else {\n\t      evt[type].push(fn);\n\t    }\n\t    return thing;\n\t  };\n\t  thing.once = function (type, fn) {\n\t    fn._once = true; // thing.off(fn) still works!\n\t    thing.on(type, fn);\n\t    return thing;\n\t  };\n\t  thing.off = function (type, fn) {\n\t    var c = arguments.length;\n\t    if (c === 1) {\n\t      delete evt[type];\n\t    } else if (c === 0) {\n\t      evt = {};\n\t    } else {\n\t      var et = evt[type];\n\t      if (!et) { return thing; }\n\t      et.splice(et.indexOf(fn), 1);\n\t    }\n\t    return thing;\n\t  };\n\t  thing.emit = function () {\n\t    var args = atoa(arguments);\n\t    return thing.emitterSnapshot(args.shift()).apply(this, args);\n\t  };\n\t  thing.emitterSnapshot = function (type) {\n\t    var et = (evt[type] || []).slice(0);\n\t    return function () {\n\t      var args = atoa(arguments);\n\t      var ctx = this || thing;\n\t      if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }\n\t      et.forEach(function emitter (listen) {\n\t        if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }\n\t        if (listen._once) { thing.off(type, listen); }\n\t      });\n\t      return thing;\n\t    };\n\t  };\n\t  return thing;\n\t};\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar ticky = __webpack_require__(99);\n\t\n\tmodule.exports = function debounce (fn, args, ctx) {\n\t  if (!fn) { return; }\n\t  ticky(function run () {\n\t    fn.apply(ctx || null, args || []);\n\t  });\n\t};\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(setImmediate) {var si = typeof setImmediate === 'function', tick;\n\tif (si) {\n\t  tick = function (fn) { setImmediate(fn); };\n\t} else {\n\t  tick = function (fn) { setTimeout(fn, 0); };\n\t}\n\t\n\tmodule.exports = tick;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(100).setImmediate))\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\n\t            (typeof self !== \"undefined\" && self) ||\n\t            window;\n\tvar apply = Function.prototype.apply;\n\t\n\t// DOM APIs, for completeness\n\t\n\texports.setTimeout = function() {\n\t  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n\t};\n\texports.setInterval = function() {\n\t  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n\t};\n\texports.clearTimeout =\n\texports.clearInterval = function(timeout) {\n\t  if (timeout) {\n\t    timeout.close();\n\t  }\n\t};\n\t\n\tfunction Timeout(id, clearFn) {\n\t  this._id = id;\n\t  this._clearFn = clearFn;\n\t}\n\tTimeout.prototype.unref = Timeout.prototype.ref = function() {};\n\tTimeout.prototype.close = function() {\n\t  this._clearFn.call(scope, this._id);\n\t};\n\t\n\t// Does not start the time, just sets up the members needed.\n\texports.enroll = function(item, msecs) {\n\t  clearTimeout(item._idleTimeoutId);\n\t  item._idleTimeout = msecs;\n\t};\n\t\n\texports.unenroll = function(item) {\n\t  clearTimeout(item._idleTimeoutId);\n\t  item._idleTimeout = -1;\n\t};\n\t\n\texports._unrefActive = exports.active = function(item) {\n\t  clearTimeout(item._idleTimeoutId);\n\t\n\t  var msecs = item._idleTimeout;\n\t  if (msecs >= 0) {\n\t    item._idleTimeoutId = setTimeout(function onTimeout() {\n\t      if (item._onTimeout)\n\t        item._onTimeout();\n\t    }, msecs);\n\t  }\n\t};\n\t\n\t// setimmediate attaches itself to the global object\n\t__webpack_require__(101);\n\t// On some exotic environments, it's not clear which object `setimmediate` was\n\t// able to install onto.  Search each possibility in the same order as the\n\t// `setimmediate` library.\n\texports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n\t                       (typeof global !== \"undefined\" && global.setImmediate) ||\n\t                       (this && this.setImmediate);\n\texports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n\t                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n\t                         (this && this.clearImmediate);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n\t    \"use strict\";\n\t\n\t    if (global.setImmediate) {\n\t        return;\n\t    }\n\t\n\t    var nextHandle = 1; // Spec says greater than zero\n\t    var tasksByHandle = {};\n\t    var currentlyRunningATask = false;\n\t    var doc = global.document;\n\t    var registerImmediate;\n\t\n\t    function setImmediate(callback) {\n\t      // Callback can either be a function or a string\n\t      if (typeof callback !== \"function\") {\n\t        callback = new Function(\"\" + callback);\n\t      }\n\t      // Copy function arguments\n\t      var args = new Array(arguments.length - 1);\n\t      for (var i = 0; i < args.length; i++) {\n\t          args[i] = arguments[i + 1];\n\t      }\n\t      // Store and register the task\n\t      var task = { callback: callback, args: args };\n\t      tasksByHandle[nextHandle] = task;\n\t      registerImmediate(nextHandle);\n\t      return nextHandle++;\n\t    }\n\t\n\t    function clearImmediate(handle) {\n\t        delete tasksByHandle[handle];\n\t    }\n\t\n\t    function run(task) {\n\t        var callback = task.callback;\n\t        var args = task.args;\n\t        switch (args.length) {\n\t        case 0:\n\t            callback();\n\t            break;\n\t        case 1:\n\t            callback(args[0]);\n\t            break;\n\t        case 2:\n\t            callback(args[0], args[1]);\n\t            break;\n\t        case 3:\n\t            callback(args[0], args[1], args[2]);\n\t            break;\n\t        default:\n\t            callback.apply(undefined, args);\n\t            break;\n\t        }\n\t    }\n\t\n\t    function runIfPresent(handle) {\n\t        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n\t        // So if we're currently running a task, we'll need to delay this invocation.\n\t        if (currentlyRunningATask) {\n\t            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n\t            // \"too much recursion\" error.\n\t            setTimeout(runIfPresent, 0, handle);\n\t        } else {\n\t            var task = tasksByHandle[handle];\n\t            if (task) {\n\t                currentlyRunningATask = true;\n\t                try {\n\t                    run(task);\n\t                } finally {\n\t                    clearImmediate(handle);\n\t                    currentlyRunningATask = false;\n\t                }\n\t            }\n\t        }\n\t    }\n\t\n\t    function installNextTickImplementation() {\n\t        registerImmediate = function(handle) {\n\t            process.nextTick(function () { runIfPresent(handle); });\n\t        };\n\t    }\n\t\n\t    function canUsePostMessage() {\n\t        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n\t        // where `global.postMessage` means something completely different and can't be used for this purpose.\n\t        if (global.postMessage && !global.importScripts) {\n\t            var postMessageIsAsynchronous = true;\n\t            var oldOnMessage = global.onmessage;\n\t            global.onmessage = function() {\n\t                postMessageIsAsynchronous = false;\n\t            };\n\t            global.postMessage(\"\", \"*\");\n\t            global.onmessage = oldOnMessage;\n\t            return postMessageIsAsynchronous;\n\t        }\n\t    }\n\t\n\t    function installPostMessageImplementation() {\n\t        // Installs an event handler on `global` for the `message` event: see\n\t        // * https://developer.mozilla.org/en/DOM/window.postMessage\n\t        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\t\n\t        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n\t        var onGlobalMessage = function(event) {\n\t            if (event.source === global &&\n\t                typeof event.data === \"string\" &&\n\t                event.data.indexOf(messagePrefix) === 0) {\n\t                runIfPresent(+event.data.slice(messagePrefix.length));\n\t            }\n\t        };\n\t\n\t        if (global.addEventListener) {\n\t            global.addEventListener(\"message\", onGlobalMessage, false);\n\t        } else {\n\t            global.attachEvent(\"onmessage\", onGlobalMessage);\n\t        }\n\t\n\t        registerImmediate = function(handle) {\n\t            global.postMessage(messagePrefix + handle, \"*\");\n\t        };\n\t    }\n\t\n\t    function installMessageChannelImplementation() {\n\t        var channel = new MessageChannel();\n\t        channel.port1.onmessage = function(event) {\n\t            var handle = event.data;\n\t            runIfPresent(handle);\n\t        };\n\t\n\t        registerImmediate = function(handle) {\n\t            channel.port2.postMessage(handle);\n\t        };\n\t    }\n\t\n\t    function installReadyStateChangeImplementation() {\n\t        var html = doc.documentElement;\n\t        registerImmediate = function(handle) {\n\t            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n\t            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n\t            var script = doc.createElement(\"script\");\n\t            script.onreadystatechange = function () {\n\t                runIfPresent(handle);\n\t                script.onreadystatechange = null;\n\t                html.removeChild(script);\n\t                script = null;\n\t            };\n\t            html.appendChild(script);\n\t        };\n\t    }\n\t\n\t    function installSetTimeoutImplementation() {\n\t        registerImmediate = function(handle) {\n\t            setTimeout(runIfPresent, 0, handle);\n\t        };\n\t    }\n\t\n\t    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n\t    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n\t    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\t\n\t    // Don't get fooled by e.g. browserify environments.\n\t    if ({}.toString.call(global.process) === \"[object process]\") {\n\t        // For Node.js before 0.9\n\t        installNextTickImplementation();\n\t\n\t    } else if (canUsePostMessage()) {\n\t        // For non-IE10 modern browsers\n\t        installPostMessageImplementation();\n\t\n\t    } else if (global.MessageChannel) {\n\t        // For web workers, where supported\n\t        installMessageChannelImplementation();\n\t\n\t    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n\t        // For IE 6–8\n\t        installReadyStateChangeImplementation();\n\t\n\t    } else {\n\t        // For older browsers\n\t        installSetTimeoutImplementation();\n\t    }\n\t\n\t    attachTo.setImmediate = setImmediate;\n\t    attachTo.clearImmediate = clearImmediate;\n\t}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(102)))\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things.  But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals.  It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t    throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t    throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t    try {\n\t        if (typeof setTimeout === 'function') {\n\t            cachedSetTimeout = setTimeout;\n\t        } else {\n\t            cachedSetTimeout = defaultSetTimout;\n\t        }\n\t    } catch (e) {\n\t        cachedSetTimeout = defaultSetTimout;\n\t    }\n\t    try {\n\t        if (typeof clearTimeout === 'function') {\n\t            cachedClearTimeout = clearTimeout;\n\t        } else {\n\t            cachedClearTimeout = defaultClearTimeout;\n\t        }\n\t    } catch (e) {\n\t        cachedClearTimeout = defaultClearTimeout;\n\t    }\n\t} ())\n\tfunction runTimeout(fun) {\n\t    if (cachedSetTimeout === setTimeout) {\n\t        //normal enviroments in sane situations\n\t        return setTimeout(fun, 0);\n\t    }\n\t    // if setTimeout wasn't available but was latter defined\n\t    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t        cachedSetTimeout = setTimeout;\n\t        return setTimeout(fun, 0);\n\t    }\n\t    try {\n\t        // when when somebody has screwed with setTimeout but no I.E. maddness\n\t        return cachedSetTimeout(fun, 0);\n\t    } catch(e){\n\t        try {\n\t            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t            return cachedSetTimeout.call(null, fun, 0);\n\t        } catch(e){\n\t            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t            return cachedSetTimeout.call(this, fun, 0);\n\t        }\n\t    }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t    if (cachedClearTimeout === clearTimeout) {\n\t        //normal enviroments in sane situations\n\t        return clearTimeout(marker);\n\t    }\n\t    // if clearTimeout wasn't available but was latter defined\n\t    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t        cachedClearTimeout = clearTimeout;\n\t        return clearTimeout(marker);\n\t    }\n\t    try {\n\t        // when when somebody has screwed with setTimeout but no I.E. maddness\n\t        return cachedClearTimeout(marker);\n\t    } catch (e){\n\t        try {\n\t            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n\t            return cachedClearTimeout.call(null, marker);\n\t        } catch (e){\n\t            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t            return cachedClearTimeout.call(this, marker);\n\t        }\n\t    }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t    if (!draining || !currentQueue) {\n\t        return;\n\t    }\n\t    draining = false;\n\t    if (currentQueue.length) {\n\t        queue = currentQueue.concat(queue);\n\t    } else {\n\t        queueIndex = -1;\n\t    }\n\t    if (queue.length) {\n\t        drainQueue();\n\t    }\n\t}\n\t\n\tfunction drainQueue() {\n\t    if (draining) {\n\t        return;\n\t    }\n\t    var timeout = runTimeout(cleanUpNextTick);\n\t    draining = true;\n\t\n\t    var len = queue.length;\n\t    while(len) {\n\t        currentQueue = queue;\n\t        queue = [];\n\t        while (++queueIndex < len) {\n\t            if (currentQueue) {\n\t                currentQueue[queueIndex].run();\n\t            }\n\t        }\n\t        queueIndex = -1;\n\t        len = queue.length;\n\t    }\n\t    currentQueue = null;\n\t    draining = false;\n\t    runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t    var args = new Array(arguments.length - 1);\n\t    if (arguments.length > 1) {\n\t        for (var i = 1; i < arguments.length; i++) {\n\t            args[i - 1] = arguments[i];\n\t        }\n\t    }\n\t    queue.push(new Item(fun, args));\n\t    if (queue.length === 1 && !draining) {\n\t        runTimeout(drainQueue);\n\t    }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t    this.fun = fun;\n\t    this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t    this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\tprocess.prependListener = noop;\n\tprocess.prependOnceListener = noop;\n\t\n\tprocess.listeners = function (name) { return [] }\n\t\n\tprocess.binding = function (name) {\n\t    throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t    throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar customEvent = __webpack_require__(104);\n\tvar eventmap = __webpack_require__(105);\n\tvar doc = global.document;\n\tvar addEvent = addEventEasy;\n\tvar removeEvent = removeEventEasy;\n\tvar hardCache = [];\n\t\n\tif (!global.addEventListener) {\n\t  addEvent = addEventHard;\n\t  removeEvent = removeEventHard;\n\t}\n\t\n\tmodule.exports = {\n\t  add: addEvent,\n\t  remove: removeEvent,\n\t  fabricate: fabricateEvent\n\t};\n\t\n\tfunction addEventEasy (el, type, fn, capturing) {\n\t  return el.addEventListener(type, fn, capturing);\n\t}\n\t\n\tfunction addEventHard (el, type, fn) {\n\t  return el.attachEvent('on' + type, wrap(el, type, fn));\n\t}\n\t\n\tfunction removeEventEasy (el, type, fn, capturing) {\n\t  return el.removeEventListener(type, fn, capturing);\n\t}\n\t\n\tfunction removeEventHard (el, type, fn) {\n\t  var listener = unwrap(el, type, fn);\n\t  if (listener) {\n\t    return el.detachEvent('on' + type, listener);\n\t  }\n\t}\n\t\n\tfunction fabricateEvent (el, type, model) {\n\t  var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();\n\t  if (el.dispatchEvent) {\n\t    el.dispatchEvent(e);\n\t  } else {\n\t    el.fireEvent('on' + type, e);\n\t  }\n\t  function makeClassicEvent () {\n\t    var e;\n\t    if (doc.createEvent) {\n\t      e = doc.createEvent('Event');\n\t      e.initEvent(type, true, true);\n\t    } else if (doc.createEventObject) {\n\t      e = doc.createEventObject();\n\t    }\n\t    return e;\n\t  }\n\t  function makeCustomEvent () {\n\t    return new customEvent(type, { detail: model });\n\t  }\n\t}\n\t\n\tfunction wrapperFactory (el, type, fn) {\n\t  return function wrapper (originalEvent) {\n\t    var e = originalEvent || global.event;\n\t    e.target = e.target || e.srcElement;\n\t    e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };\n\t    e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };\n\t    e.which = e.which || e.keyCode;\n\t    fn.call(el, e);\n\t  };\n\t}\n\t\n\tfunction wrap (el, type, fn) {\n\t  var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);\n\t  hardCache.push({\n\t    wrapper: wrapper,\n\t    element: el,\n\t    type: type,\n\t    fn: fn\n\t  });\n\t  return wrapper;\n\t}\n\t\n\tfunction unwrap (el, type, fn) {\n\t  var i = find(el, type, fn);\n\t  if (i) {\n\t    var wrapper = hardCache[i].wrapper;\n\t    hardCache.splice(i, 1); // free up a tad of memory\n\t    return wrapper;\n\t  }\n\t}\n\t\n\tfunction find (el, type, fn) {\n\t  var i, item;\n\t  for (i = 0; i < hardCache.length; i++) {\n\t    item = hardCache[i];\n\t    if (item.element === el && item.type === type && item.fn === fn) {\n\t      return i;\n\t    }\n\t  }\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\tvar NativeCustomEvent = global.CustomEvent;\n\t\n\tfunction useNative () {\n\t  try {\n\t    var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });\n\t    return  'cat' === p.type && 'bar' === p.detail.foo;\n\t  } catch (e) {\n\t  }\n\t  return false;\n\t}\n\t\n\t/**\n\t * Cross-browser `CustomEvent` constructor.\n\t *\n\t * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent\n\t *\n\t * @public\n\t */\n\t\n\tmodule.exports = useNative() ? NativeCustomEvent :\n\t\n\t// IE >= 9\n\t'function' === typeof document.createEvent ? function CustomEvent (type, params) {\n\t  var e = document.createEvent('CustomEvent');\n\t  if (params) {\n\t    e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);\n\t  } else {\n\t    e.initCustomEvent(type, false, false, void 0);\n\t  }\n\t  return e;\n\t} :\n\t\n\t// IE <= 8\n\tfunction CustomEvent (type, params) {\n\t  var e = document.createEventObject();\n\t  e.type = type;\n\t  if (params) {\n\t    e.bubbles = Boolean(params.bubbles);\n\t    e.cancelable = Boolean(params.cancelable);\n\t    e.detail = params.detail;\n\t  } else {\n\t    e.bubbles = false;\n\t    e.cancelable = false;\n\t    e.detail = void 0;\n\t  }\n\t  return e;\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar eventmap = [];\n\tvar eventname = '';\n\tvar ron = /^on/;\n\t\n\tfor (eventname in global) {\n\t  if (ron.test(eventname)) {\n\t    eventmap.push(eventname.slice(2));\n\t  }\n\t}\n\t\n\tmodule.exports = eventmap;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tvar cache = {};\n\tvar start = '(?:^|\\\\s)';\n\tvar end = '(?:\\\\s|$)';\n\t\n\tfunction lookupClass (className) {\n\t  var cached = cache[className];\n\t  if (cached) {\n\t    cached.lastIndex = 0;\n\t  } else {\n\t    cache[className] = cached = new RegExp(start + className + end, 'g');\n\t  }\n\t  return cached;\n\t}\n\t\n\tfunction addClass (el, className) {\n\t  var current = el.className;\n\t  if (!current.length) {\n\t    el.className = className;\n\t  } else if (!lookupClass(className).test(current)) {\n\t    el.className += ' ' + className;\n\t  }\n\t}\n\t\n\tfunction rmClass (el, className) {\n\t  el.className = el.className.replace(lookupClass(className), ' ').trim();\n\t}\n\t\n\tmodule.exports = {\n\t  add: addClass,\n\t  rm: rmClass\n\t};\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t  value: true\n\t});\n\texports.default = {\n\t  originTable: 'sindu_origin_table',\n\t  draggableTable: 'sindu_dragger',\n\t  dragging: 'sindu_dragging',\n\t  static: 'sindu_static',\n\t  handle: 'sindu_handle'\n\t};\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t  value: true\n\t});\n\texports.getScrollBarWidth = exports.sort = exports.insertBeforeSibling = exports.appendSibling = exports.remove = exports.on = exports.empty = exports.css = exports.getLongestRow = exports.touchy = exports.getTouchyEvent = undefined;\n\t\n\tvar _keys = __webpack_require__(109);\n\t\n\tvar _keys2 = _interopRequireDefault(_keys);\n\t\n\tvar _from = __webpack_require__(78);\n\t\n\tvar _from2 = _interopRequireDefault(_from);\n\t\n\tvar _crossvent = __webpack_require__(113);\n\t\n\tvar _crossvent2 = _interopRequireDefault(_crossvent);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar global = window;\n\tvar touch = {\n\t  mouseup: 'touchend',\n\t  mousedown: 'touchstart',\n\t  mousemove: 'touchmove'\n\t};\n\tvar pointers = {\n\t  mouseup: 'pointerup',\n\t  mousedown: 'pointerdown',\n\t  mousemove: 'pointermove'\n\t};\n\t\n\tvar getTouchyEvent = exports.getTouchyEvent = function getTouchyEvent() {\n\t  var event = void 0;\n\t  if (global.navigator.pointerEnabled) {\n\t    if (document.createEvent) {\n\t      event = document.createEvent(\"PointerEvent\");\n\t      event.initMouseEvent(\"pointerdown\", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\t    } else {\n\t      event = new PointerEvent('pointerdown', {\n\t        cancelable: true,\n\t        bubbles: true,\n\t        view: window\n\t      });\n\t    }\n\t  } else if (global.navigator.msPointerEnabled) {\n\t    event = document.createEvent(\"msPointerEvent\");\n\t    event.initMouseEvent(\"MSPointerDown\", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\t  } else {\n\t    if (document.createEvent) {\n\t      console.log('getTouchyEvent document.createEvent if');\n\t      event = document.createEvent(\"MouseEvent\");\n\t      event.initMouseEvent(\"mousedown\", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\t    } else {\n\t      console.log('getTouchyEvent document.createEvent else');\n\t      event = new MouseEvent('mousedown', {\n\t        'view': window,\n\t        'bubbles': true,\n\t        'cancelable': true\n\t      });\n\t    }\n\t  }\n\t  return event;\n\t};\n\t\n\tvar touchy = exports.touchy = function touchy(el, op, type, fn) {\n\t  if (global.navigator.pointerEnabled) {\n\t    _crossvent2.default[op](el, pointers[type], fn);\n\t  } else {\n\t    _crossvent2.default[op](el, touch[type], fn);\n\t    _crossvent2.default[op](el, type, fn);\n\t  }\n\t};\n\t\n\tvar getLongestRow = exports.getLongestRow = function getLongestRow(table) {\n\t  var result = table.rows[0];\n\t  (0, _from2.default)(table.rows).forEach(function (row) {\n\t    var rowL = row.children.length;\n\t    var resultL = result.children.length;\n\t    result = rowL > resultL ? row : result;\n\t  });\n\t  return result;\n\t};\n\t\n\tvar css = exports.css = function css(el, csses) {\n\t  (0, _keys2.default)(csses).forEach(function (k) {\n\t    el.style[k] = csses[k];\n\t  });\n\t  return el;\n\t};\n\t\n\tvar empty = exports.empty = function empty(node) {\n\t  while (node.firstChild) {\n\t    node.removeChild(node.firstChild);\n\t  }\n\t};\n\tvar on = exports.on = function on(el, eventName, cb) {\n\t  el.addEventListener(eventName, cb);\n\t};\n\t\n\tvar remove = exports.remove = function remove(el, eventName, cb) {\n\t  el.removeEventListener(eventName, cb);\n\t};\n\t\n\tvar appendSibling = exports.appendSibling = function appendSibling(_ref) {\n\t  var target = _ref.target,\n\t      origin = _ref.origin,\n\t      parent = _ref.parent;\n\t\n\t  if (!target) {\n\t    return;\n\t  }\n\t\n\t  (parent || target.parentNode).insertBefore(target, origin ? origin.nextElementSibling : null);\n\t};\n\t\n\tvar insertBeforeSibling = exports.insertBeforeSibling = function insertBeforeSibling(_ref2) {\n\t  var target = _ref2.target,\n\t      origin = _ref2.origin;\n\t\n\t  if (!target) {\n\t    return;\n\t  }\n\t  origin.parentNode.insertBefore(target, origin);\n\t};\n\t\n\tvar sort = exports.sort = function sort(_ref3) {\n\t  var list = _ref3.list,\n\t      from = _ref3.from,\n\t      to = _ref3.to,\n\t      parent = _ref3.parent;\n\t\n\t  if (from < to) {\n\t    appendSibling({ target: list[from], origin: list[to], parent: parent });\n\t  } else {\n\t    insertBeforeSibling({ target: list[from], origin: list[to] });\n\t  }\n\t};\n\t\n\tvar getScrollBarWidth = exports.getScrollBarWidth = function getScrollBarWidth() {\n\t  if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {\n\t    return 0;\n\t  }\n\t  var inner = document.createElement('p');\n\t  inner.style.width = '100%';\n\t  inner.style.height = '200px';\n\t\n\t  var outer = document.createElement('div');\n\t  outer.style.position = 'absolute';\n\t  outer.style.top = '0px';\n\t  outer.style.left = '0px';\n\t  outer.style.visibility = 'hidden';\n\t  outer.style.width = '200px';\n\t  outer.style.height = '150px';\n\t  outer.style.overflow = 'hidden';\n\t  outer.appendChild(inner);\n\t\n\t  document.body.appendChild(outer);\n\t  var w1 = inner.offsetWidth;\n\t  outer.style.overflow = 'scroll';\n\t  var w2 = inner.offsetWidth;\n\t  if (w1 === w2) w2 = outer.clientWidth;\n\t\n\t  document.body.removeChild(outer);\n\t\n\t  return w1 - w2;\n\t};\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = { \"default\": __webpack_require__(110), __esModule: true };\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(111);\n\tmodule.exports = __webpack_require__(17).Object.keys;\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// 19.1.2.14 Object.keys(O)\n\tvar toObject = __webpack_require__(52);\n\tvar $keys = __webpack_require__(36);\n\t\n\t__webpack_require__(112)('keys', function () {\n\t  return function keys(it) {\n\t    return $keys(toObject(it));\n\t  };\n\t});\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// most Object methods by ES6 should accept primitives\n\tvar $export = __webpack_require__(15);\n\tvar core = __webpack_require__(17);\n\tvar fails = __webpack_require__(26);\n\tmodule.exports = function (KEY, exec) {\n\t  var fn = (core.Object || {})[KEY] || Object[KEY];\n\t  var exp = {};\n\t  exp[KEY] = exec(fn);\n\t  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n\t};\n\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar customEvent = __webpack_require__(114);\n\tvar eventmap = __webpack_require__(115);\n\tvar doc = global.document;\n\tvar addEvent = addEventEasy;\n\tvar removeEvent = removeEventEasy;\n\tvar hardCache = [];\n\t\n\tif (!global.addEventListener) {\n\t  addEvent = addEventHard;\n\t  removeEvent = removeEventHard;\n\t}\n\t\n\tmodule.exports = {\n\t  add: addEvent,\n\t  remove: removeEvent,\n\t  fabricate: fabricateEvent\n\t};\n\t\n\tfunction addEventEasy (el, type, fn, capturing) {\n\t  return el.addEventListener(type, fn, capturing);\n\t}\n\t\n\tfunction addEventHard (el, type, fn) {\n\t  return el.attachEvent('on' + type, wrap(el, type, fn));\n\t}\n\t\n\tfunction removeEventEasy (el, type, fn, capturing) {\n\t  return el.removeEventListener(type, fn, capturing);\n\t}\n\t\n\tfunction removeEventHard (el, type, fn) {\n\t  var listener = unwrap(el, type, fn);\n\t  if (listener) {\n\t    return el.detachEvent('on' + type, listener);\n\t  }\n\t}\n\t\n\tfunction fabricateEvent (el, type, model) {\n\t  var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();\n\t  if (el.dispatchEvent) {\n\t    el.dispatchEvent(e);\n\t  } else {\n\t    el.fireEvent('on' + type, e);\n\t  }\n\t  function makeClassicEvent () {\n\t    var e;\n\t    if (doc.createEvent) {\n\t      e = doc.createEvent('Event');\n\t      e.initEvent(type, true, true);\n\t    } else if (doc.createEventObject) {\n\t      e = doc.createEventObject();\n\t    }\n\t    return e;\n\t  }\n\t  function makeCustomEvent () {\n\t    return new customEvent(type, { detail: model });\n\t  }\n\t}\n\t\n\tfunction wrapperFactory (el, type, fn) {\n\t  return function wrapper (originalEvent) {\n\t    var e = originalEvent || global.event;\n\t    e.target = e.target || e.srcElement;\n\t    e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };\n\t    e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };\n\t    e.which = e.which || e.keyCode;\n\t    fn.call(el, e);\n\t  };\n\t}\n\t\n\tfunction wrap (el, type, fn) {\n\t  var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);\n\t  hardCache.push({\n\t    wrapper: wrapper,\n\t    element: el,\n\t    type: type,\n\t    fn: fn\n\t  });\n\t  return wrapper;\n\t}\n\t\n\tfunction unwrap (el, type, fn) {\n\t  var i = find(el, type, fn);\n\t  if (i) {\n\t    var wrapper = hardCache[i].wrapper;\n\t    hardCache.splice(i, 1); // free up a tad of memory\n\t    return wrapper;\n\t  }\n\t}\n\t\n\tfunction find (el, type, fn) {\n\t  var i, item;\n\t  for (i = 0; i < hardCache.length; i++) {\n\t    item = hardCache[i];\n\t    if (item.element === el && item.type === type && item.fn === fn) {\n\t      return i;\n\t    }\n\t  }\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\tvar NativeCustomEvent = global.CustomEvent;\n\t\n\tfunction useNative () {\n\t  try {\n\t    var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });\n\t    return  'cat' === p.type && 'bar' === p.detail.foo;\n\t  } catch (e) {\n\t  }\n\t  return false;\n\t}\n\t\n\t/**\n\t * Cross-browser `CustomEvent` constructor.\n\t *\n\t * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent\n\t *\n\t * @public\n\t */\n\t\n\tmodule.exports = useNative() ? NativeCustomEvent :\n\t\n\t// IE >= 9\n\t'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {\n\t  var e = document.createEvent('CustomEvent');\n\t  if (params) {\n\t    e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);\n\t  } else {\n\t    e.initCustomEvent(type, false, false, void 0);\n\t  }\n\t  return e;\n\t} :\n\t\n\t// IE <= 8\n\tfunction CustomEvent (type, params) {\n\t  var e = document.createEventObject();\n\t  e.type = type;\n\t  if (params) {\n\t    e.bubbles = Boolean(params.bubbles);\n\t    e.cancelable = Boolean(params.cancelable);\n\t    e.detail = params.detail;\n\t  } else {\n\t    e.bubbles = false;\n\t    e.cancelable = false;\n\t    e.detail = void 0;\n\t  }\n\t  return e;\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar eventmap = [];\n\tvar eventname = '';\n\tvar ron = /^on/;\n\t\n\tfor (eventname in global) {\n\t  if (ron.test(eventname)) {\n\t    eventmap.push(eventname.slice(2));\n\t  }\n\t}\n\t\n\tmodule.exports = eventmap;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ })\n/******/ ])\n});\n;\n//# sourceMappingURL=table-dragger.js.map\n\n//# sourceURL=webpack://futureBooks/./node_modules/table-dragger/dist/table-dragger.js?");

/***/ }),

/***/ "./node_modules/template7/dist/template7.esm.js":
/*!******************************************************!*\
  !*** ./node_modules/template7/dist/template7.esm.js ***!
  \******************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * Template7 1.4.2\n * Mobile-first HTML template engine\n * \n * http://www.idangero.us/template7/\n * \n * Copyright 2019, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n * \n * Licensed under MIT\n * \n * Released on: June 14, 2019\n */\n\nvar t7ctx;\nif (typeof window !== 'undefined') {\n  t7ctx = window;\n} else if (typeof global !== 'undefined') {\n  t7ctx = global;\n} else {\n  t7ctx = undefined;\n}\nvar Template7Context = t7ctx;\nvar Template7Utils = {\n  quoteSingleRexExp: new RegExp('\\'', 'g'),\n  quoteDoubleRexExp: new RegExp('\"', 'g'),\n  isFunction: function isFunction(func) {\n    return typeof func === 'function';\n  },\n  escape: function escape() {\n    var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    return string.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;').replace(/'/g, '&#039;');\n  },\n  helperToSlices: function helperToSlices(string) {\n    var quoteDoubleRexExp = Template7Utils.quoteDoubleRexExp,\n      quoteSingleRexExp = Template7Utils.quoteSingleRexExp;\n    var helperParts = string.replace(/[{}#}]/g, '').trim().split(' ');\n    var slices = [];\n    var shiftIndex;\n    var i;\n    var j;\n    for (i = 0; i < helperParts.length; i += 1) {\n      var part = helperParts[i];\n      var blockQuoteRegExp = void 0;\n      var openingQuote = void 0;\n      if (i === 0) slices.push(part);else if (part.indexOf('\"') === 0 || part.indexOf('\\'') === 0) {\n        blockQuoteRegExp = part.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n        openingQuote = part.indexOf('\"') === 0 ? '\"' : '\\'';\n        // Plain String\n        if (part.match(blockQuoteRegExp).length === 2) {\n          // One word string\n          slices.push(part);\n        } else {\n          // Find closed Index\n          shiftIndex = 0;\n          for (j = i + 1; j < helperParts.length; j += 1) {\n            part += \" \".concat(helperParts[j]);\n            if (helperParts[j].indexOf(openingQuote) >= 0) {\n              shiftIndex = j;\n              slices.push(part);\n              break;\n            }\n          }\n          if (shiftIndex) i = shiftIndex;\n        }\n      } else if (part.indexOf('=') > 0) {\n        // Hash\n        var hashParts = part.split('=');\n        var hashName = hashParts[0];\n        var hashContent = hashParts[1];\n        if (!blockQuoteRegExp) {\n          blockQuoteRegExp = hashContent.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n          openingQuote = hashContent.indexOf('\"') === 0 ? '\"' : '\\'';\n        }\n        if (hashContent.match(blockQuoteRegExp).length !== 2) {\n          shiftIndex = 0;\n          for (j = i + 1; j < helperParts.length; j += 1) {\n            hashContent += \" \".concat(helperParts[j]);\n            if (helperParts[j].indexOf(openingQuote) >= 0) {\n              shiftIndex = j;\n              break;\n            }\n          }\n          if (shiftIndex) i = shiftIndex;\n        }\n        var hash = [hashName, hashContent.replace(blockQuoteRegExp, '')];\n        slices.push(hash);\n      } else {\n        // Plain variable\n        slices.push(part);\n      }\n    }\n    return slices;\n  },\n  stringToBlocks: function stringToBlocks(string) {\n    var blocks = [];\n    var i;\n    var j;\n    if (!string) return [];\n    var stringBlocks = string.split(/({{[^{^}]*}})/);\n    for (i = 0; i < stringBlocks.length; i += 1) {\n      var block = stringBlocks[i];\n      if (block === '') continue;\n      if (block.indexOf('{{') < 0) {\n        blocks.push({\n          type: 'plain',\n          content: block\n        });\n      } else {\n        if (block.indexOf('{/') >= 0) {\n          continue;\n        }\n        block = block.replace(/{{([#/])*([ ])*/, '{{$1').replace(/([ ])*}}/, '}}');\n        if (block.indexOf('{#') < 0 && block.indexOf(' ') < 0 && block.indexOf('else') < 0) {\n          // Simple variable\n          blocks.push({\n            type: 'variable',\n            contextName: block.replace(/[{}]/g, '')\n          });\n          continue;\n        }\n        // Helpers\n        var helperSlices = Template7Utils.helperToSlices(block);\n        var helperName = helperSlices[0];\n        var isPartial = helperName === '>';\n        var helperContext = [];\n        var helperHash = {};\n        for (j = 1; j < helperSlices.length; j += 1) {\n          var slice = helperSlices[j];\n          if (Array.isArray(slice)) {\n            // Hash\n            helperHash[slice[0]] = slice[1] === 'false' ? false : slice[1];\n          } else {\n            helperContext.push(slice);\n          }\n        }\n        if (block.indexOf('{#') >= 0) {\n          // Condition/Helper\n          var helperContent = '';\n          var elseContent = '';\n          var toSkip = 0;\n          var shiftIndex = void 0;\n          var foundClosed = false;\n          var foundElse = false;\n          var depth = 0;\n          for (j = i + 1; j < stringBlocks.length; j += 1) {\n            if (stringBlocks[j].indexOf('{{#') >= 0) {\n              depth += 1;\n            }\n            if (stringBlocks[j].indexOf('{{/') >= 0) {\n              depth -= 1;\n            }\n            if (stringBlocks[j].indexOf(\"{{#\".concat(helperName)) >= 0) {\n              helperContent += stringBlocks[j];\n              if (foundElse) elseContent += stringBlocks[j];\n              toSkip += 1;\n            } else if (stringBlocks[j].indexOf(\"{{/\".concat(helperName)) >= 0) {\n              if (toSkip > 0) {\n                toSkip -= 1;\n                helperContent += stringBlocks[j];\n                if (foundElse) elseContent += stringBlocks[j];\n              } else {\n                shiftIndex = j;\n                foundClosed = true;\n                break;\n              }\n            } else if (stringBlocks[j].indexOf('else') >= 0 && depth === 0) {\n              foundElse = true;\n            } else {\n              if (!foundElse) helperContent += stringBlocks[j];\n              if (foundElse) elseContent += stringBlocks[j];\n            }\n          }\n          if (foundClosed) {\n            if (shiftIndex) i = shiftIndex;\n            if (helperName === 'raw') {\n              blocks.push({\n                type: 'plain',\n                content: helperContent\n              });\n            } else {\n              blocks.push({\n                type: 'helper',\n                helperName: helperName,\n                contextName: helperContext,\n                content: helperContent,\n                inverseContent: elseContent,\n                hash: helperHash\n              });\n            }\n          }\n        } else if (block.indexOf(' ') > 0) {\n          if (isPartial) {\n            helperName = '_partial';\n            if (helperContext[0]) {\n              if (helperContext[0].indexOf('[') === 0) helperContext[0] = helperContext[0].replace(/[[\\]]/g, '');else helperContext[0] = \"\\\"\".concat(helperContext[0].replace(/\"|'/g, ''), \"\\\"\");\n            }\n          }\n          blocks.push({\n            type: 'helper',\n            helperName: helperName,\n            contextName: helperContext,\n            hash: helperHash\n          });\n        }\n      }\n    }\n    return blocks;\n  },\n  parseJsVariable: function parseJsVariable(expression, replace, object) {\n    return expression.split(/([+ \\-*/^()&=|<>!%:?])/g).reduce(function (arr, part) {\n      if (!part) {\n        return arr;\n      }\n      if (part.indexOf(replace) < 0) {\n        arr.push(part);\n        return arr;\n      }\n      if (!object) {\n        arr.push(JSON.stringify(''));\n        return arr;\n      }\n      var variable = object;\n      if (part.indexOf(\"\".concat(replace, \".\")) >= 0) {\n        part.split(\"\".concat(replace, \".\"))[1].split('.').forEach(function (partName) {\n          if (partName in variable) variable = variable[partName];else variable = undefined;\n        });\n      }\n      if (typeof variable === 'string' || Array.isArray(variable) || variable.constructor && variable.constructor === Object) {\n        variable = JSON.stringify(variable);\n      }\n      if (variable === undefined) variable = 'undefined';\n      arr.push(variable);\n      return arr;\n    }, []).join('');\n  },\n  parseJsParents: function parseJsParents(expression, parents) {\n    return expression.split(/([+ \\-*^()&=|<>!%:?])/g).reduce(function (arr, part) {\n      if (!part) {\n        return arr;\n      }\n      if (part.indexOf('../') < 0) {\n        arr.push(part);\n        return arr;\n      }\n      if (!parents || parents.length === 0) {\n        arr.push(JSON.stringify(''));\n        return arr;\n      }\n      var levelsUp = part.split('../').length - 1;\n      var parentData = levelsUp > parents.length ? parents[parents.length - 1] : parents[levelsUp - 1];\n      var variable = parentData;\n      var parentPart = part.replace(/..\\//g, '');\n      parentPart.split('.').forEach(function (partName) {\n        if (typeof variable[partName] !== 'undefined') variable = variable[partName];else variable = 'undefined';\n      });\n      if (variable === false || variable === true) {\n        arr.push(JSON.stringify(variable));\n        return arr;\n      }\n      if (variable === null || variable === 'undefined') {\n        arr.push(JSON.stringify(''));\n        return arr;\n      }\n      arr.push(JSON.stringify(variable));\n      return arr;\n    }, []).join('');\n  },\n  getCompileVar: function getCompileVar(name, ctx) {\n    var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'data_1';\n    var variable = ctx;\n    var parts;\n    var levelsUp = 0;\n    var newDepth;\n    if (name.indexOf('../') === 0) {\n      levelsUp = name.split('../').length - 1;\n      newDepth = variable.split('_')[1] - levelsUp;\n      variable = \"ctx_\".concat(newDepth >= 1 ? newDepth : 1);\n      parts = name.split('../')[levelsUp].split('.');\n    } else if (name.indexOf('@global') === 0) {\n      variable = 'Template7.global';\n      parts = name.split('@global.')[1].split('.');\n    } else if (name.indexOf('@root') === 0) {\n      variable = 'root';\n      parts = name.split('@root.')[1].split('.');\n    } else {\n      parts = name.split('.');\n    }\n    for (var i = 0; i < parts.length; i += 1) {\n      var part = parts[i];\n      if (part.indexOf('@') === 0) {\n        var dataLevel = data.split('_')[1];\n        if (levelsUp > 0) {\n          dataLevel = newDepth;\n        }\n        if (i > 0) {\n          variable += \"[(data_\".concat(dataLevel, \" && data_\").concat(dataLevel, \".\").concat(part.replace('@', ''), \")]\");\n        } else {\n          variable = \"(data_\".concat(dataLevel, \" && data_\").concat(dataLevel, \".\").concat(part.replace('@', ''), \")\");\n        }\n      } else if (Number.isFinite ? Number.isFinite(part) : Template7Context.isFinite(part)) {\n        variable += \"[\".concat(part, \"]\");\n      } else if (part === 'this' || part.indexOf('this.') >= 0 || part.indexOf('this[') >= 0 || part.indexOf('this(') >= 0) {\n        variable = part.replace('this', ctx);\n      } else {\n        variable += \".\".concat(part);\n      }\n    }\n    return variable;\n  },\n  getCompiledArguments: function getCompiledArguments(contextArray, ctx, data) {\n    var arr = [];\n    for (var i = 0; i < contextArray.length; i += 1) {\n      if (/^['\"]/.test(contextArray[i])) arr.push(contextArray[i]);else if (/^(true|false|\\d+)$/.test(contextArray[i])) arr.push(contextArray[i]);else {\n        arr.push(Template7Utils.getCompileVar(contextArray[i], ctx, data));\n      }\n    }\n    return arr.join(', ');\n  }\n};\n\n/* eslint no-eval: \"off\" */\n\nvar Template7Helpers = {\n  _partial: function _partial(partialName, options) {\n    var ctx = this;\n    var p = Template7Class.partials[partialName];\n    if (!p || p && !p.template) return '';\n    if (!p.compiled) {\n      p.compiled = new Template7Class(p.template).compile();\n    }\n    Object.keys(options.hash).forEach(function (hashName) {\n      ctx[hashName] = options.hash[hashName];\n    });\n    return p.compiled(ctx, options.data, options.root);\n  },\n  escape: function escape(context) {\n    if (typeof context === 'undefined' || context === null) return '';\n    if (typeof context !== 'string') {\n      throw new Error('Template7: Passed context to \"escape\" helper should be a string');\n    }\n    return Template7Utils.escape(context);\n  },\n  if: function _if(context, options) {\n    var ctx = context;\n    if (Template7Utils.isFunction(ctx)) {\n      ctx = ctx.call(this);\n    }\n    if (ctx) {\n      return options.fn(this, options.data);\n    }\n    return options.inverse(this, options.data);\n  },\n  unless: function unless(context, options) {\n    var ctx = context;\n    if (Template7Utils.isFunction(ctx)) {\n      ctx = ctx.call(this);\n    }\n    if (!ctx) {\n      return options.fn(this, options.data);\n    }\n    return options.inverse(this, options.data);\n  },\n  each: function each(context, options) {\n    var ctx = context;\n    var ret = '';\n    var i = 0;\n    if (Template7Utils.isFunction(ctx)) {\n      ctx = ctx.call(this);\n    }\n    if (Array.isArray(ctx)) {\n      if (options.hash.reverse) {\n        ctx = ctx.reverse();\n      }\n      for (i = 0; i < ctx.length; i += 1) {\n        ret += options.fn(ctx[i], {\n          first: i === 0,\n          last: i === ctx.length - 1,\n          index: i\n        });\n      }\n      if (options.hash.reverse) {\n        ctx = ctx.reverse();\n      }\n    } else {\n      // eslint-disable-next-line\n      for (var key in ctx) {\n        i += 1;\n        ret += options.fn(ctx[key], {\n          key: key\n        });\n      }\n    }\n    if (i > 0) return ret;\n    return options.inverse(this);\n  },\n  with: function _with(context, options) {\n    var ctx = context;\n    if (Template7Utils.isFunction(ctx)) {\n      ctx = context.call(this);\n    }\n    return options.fn(ctx);\n  },\n  join: function join(context, options) {\n    var ctx = context;\n    if (Template7Utils.isFunction(ctx)) {\n      ctx = ctx.call(this);\n    }\n    return ctx.join(options.hash.delimiter || options.hash.delimeter);\n  },\n  js: function js(expression, options) {\n    var data = options.data;\n    var func;\n    var execute = expression;\n    'index first last key'.split(' ').forEach(function (prop) {\n      if (typeof data[prop] !== 'undefined') {\n        var re1 = new RegExp(\"this.@\".concat(prop), 'g');\n        var re2 = new RegExp(\"@\".concat(prop), 'g');\n        execute = execute.replace(re1, JSON.stringify(data[prop])).replace(re2, JSON.stringify(data[prop]));\n      }\n    });\n    if (options.root && execute.indexOf('@root') >= 0) {\n      execute = Template7Utils.parseJsVariable(execute, '@root', options.root);\n    }\n    if (execute.indexOf('@global') >= 0) {\n      execute = Template7Utils.parseJsVariable(execute, '@global', Template7Context.Template7.global);\n    }\n    if (execute.indexOf('../') >= 0) {\n      execute = Template7Utils.parseJsParents(execute, options.parents);\n    }\n    if (execute.indexOf('return') >= 0) {\n      func = \"(function(){\".concat(execute, \"})\");\n    } else {\n      func = \"(function(){return (\".concat(execute, \")})\");\n    }\n    return eval(func).call(this);\n  },\n  js_if: function js_if(expression, options) {\n    var data = options.data;\n    var func;\n    var execute = expression;\n    'index first last key'.split(' ').forEach(function (prop) {\n      if (typeof data[prop] !== 'undefined') {\n        var re1 = new RegExp(\"this.@\".concat(prop), 'g');\n        var re2 = new RegExp(\"@\".concat(prop), 'g');\n        execute = execute.replace(re1, JSON.stringify(data[prop])).replace(re2, JSON.stringify(data[prop]));\n      }\n    });\n    if (options.root && execute.indexOf('@root') >= 0) {\n      execute = Template7Utils.parseJsVariable(execute, '@root', options.root);\n    }\n    if (execute.indexOf('@global') >= 0) {\n      execute = Template7Utils.parseJsVariable(execute, '@global', Template7Context.Template7.global);\n    }\n    if (execute.indexOf('../') >= 0) {\n      execute = Template7Utils.parseJsParents(execute, options.parents);\n    }\n    if (execute.indexOf('return') >= 0) {\n      func = \"(function(){\".concat(execute, \"})\");\n    } else {\n      func = \"(function(){return (\".concat(execute, \")})\");\n    }\n    var condition = eval(func).call(this);\n    if (condition) {\n      return options.fn(this, options.data);\n    }\n    return options.inverse(this, options.data);\n  }\n};\nTemplate7Helpers.js_compare = Template7Helpers.js_if;\nvar Template7Options = {};\nvar Template7Partials = {};\nvar Template7Class = /*#__PURE__*/function () {\n  function Template7Class(template) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Template7Class);\n    var t = this;\n    t.template = template;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Template7Class, [{\n    key: \"compile\",\n    value: function compile() {\n      var template = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.template;\n      var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var t = this;\n      if (t.compiled) return t.compiled;\n      if (typeof template !== 'string') {\n        throw new Error('Template7: Template must be a string');\n      }\n      var stringToBlocks = Template7Utils.stringToBlocks,\n        getCompileVar = Template7Utils.getCompileVar,\n        getCompiledArguments = Template7Utils.getCompiledArguments;\n      var blocks = stringToBlocks(template);\n      var ctx = \"ctx_\".concat(depth);\n      var data = \"data_\".concat(depth);\n      if (blocks.length === 0) {\n        return function empty() {\n          return '';\n        };\n      }\n      function getCompileFn(block, newDepth) {\n        if (block.content) return t.compile(block.content, newDepth);\n        return function empty() {\n          return '';\n        };\n      }\n      function getCompileInverse(block, newDepth) {\n        if (block.inverseContent) return t.compile(block.inverseContent, newDepth);\n        return function empty() {\n          return '';\n        };\n      }\n      var resultString = '';\n      if (depth === 1) {\n        resultString += \"(function (\".concat(ctx, \", \").concat(data, \", root) {\\n\");\n      } else {\n        resultString += \"(function (\".concat(ctx, \", \").concat(data, \") {\\n\");\n      }\n      if (depth === 1) {\n        resultString += 'function isArray(arr){return Array.isArray(arr);}\\n';\n        resultString += 'function isFunction(func){return (typeof func === \\'function\\');}\\n';\n        resultString += 'function c(val, ctx) {if (typeof val !== \"undefined\" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return \"\";}\\n';\n        resultString += 'root = root || ctx_1 || {};\\n';\n      }\n      resultString += 'var r = \\'\\';\\n';\n      var i;\n      for (i = 0; i < blocks.length; i += 1) {\n        var block = blocks[i];\n        // Plain block\n        if (block.type === 'plain') {\n          // eslint-disable-next-line\n          resultString += \"r +='\".concat(block.content.replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\' + '\\''), \"';\");\n          continue;\n        }\n        var variable = void 0;\n        var compiledArguments = void 0;\n        // Variable block\n        if (block.type === 'variable') {\n          variable = getCompileVar(block.contextName, ctx, data);\n          resultString += \"r += c(\".concat(variable, \", \").concat(ctx, \");\");\n        }\n        // Helpers block\n        if (block.type === 'helper') {\n          var parents = void 0;\n          if (ctx !== 'ctx_1') {\n            var level = ctx.split('_')[1];\n            var parentsString = \"ctx_\".concat(level - 1);\n            for (var j = level - 2; j >= 1; j -= 1) {\n              parentsString += \", ctx_\".concat(j);\n            }\n            parents = \"[\".concat(parentsString, \"]\");\n          } else {\n            parents = \"[\".concat(ctx, \"]\");\n          }\n          var dynamicHelper = void 0;\n          if (block.helperName.indexOf('[') === 0) {\n            block.helperName = getCompileVar(block.helperName.replace(/[[\\]]/g, ''), ctx, data);\n            dynamicHelper = true;\n          }\n          if (dynamicHelper || block.helperName in Template7Helpers) {\n            compiledArguments = getCompiledArguments(block.contextName, ctx, data);\n            resultString += \"r += (Template7Helpers\".concat(dynamicHelper ? \"[\".concat(block.helperName, \"]\") : \".\".concat(block.helperName), \").call(\").concat(ctx, \", \").concat(compiledArguments && \"\".concat(compiledArguments, \", \"), \"{hash:\").concat(JSON.stringify(block.hash), \", data: \").concat(data, \" || {}, fn: \").concat(getCompileFn(block, depth + 1), \", inverse: \").concat(getCompileInverse(block, depth + 1), \", root: root, parents: \").concat(parents, \"});\");\n          } else if (block.contextName.length > 0) {\n            throw new Error(\"Template7: Missing helper: \\\"\".concat(block.helperName, \"\\\"\"));\n          } else {\n            variable = getCompileVar(block.helperName, ctx, data);\n            resultString += \"if (\".concat(variable, \") {\");\n            resultString += \"if (isArray(\".concat(variable, \")) {\");\n            resultString += \"r += (Template7Helpers.each).call(\".concat(ctx, \", \").concat(variable, \", {hash:\").concat(JSON.stringify(block.hash), \", data: \").concat(data, \" || {}, fn: \").concat(getCompileFn(block, depth + 1), \", inverse: \").concat(getCompileInverse(block, depth + 1), \", root: root, parents: \").concat(parents, \"});\");\n            resultString += '}else {';\n            resultString += \"r += (Template7Helpers.with).call(\".concat(ctx, \", \").concat(variable, \", {hash:\").concat(JSON.stringify(block.hash), \", data: \").concat(data, \" || {}, fn: \").concat(getCompileFn(block, depth + 1), \", inverse: \").concat(getCompileInverse(block, depth + 1), \", root: root, parents: \").concat(parents, \"});\");\n            resultString += '}}';\n          }\n        }\n      }\n      resultString += '\\nreturn r;})';\n      if (depth === 1) {\n        // eslint-disable-next-line\n        t.compiled = eval(resultString);\n        return t.compiled;\n      }\n      return resultString;\n    }\n  }], [{\n    key: \"options\",\n    get: function get() {\n      return Template7Options;\n    }\n  }, {\n    key: \"partials\",\n    get: function get() {\n      return Template7Partials;\n    }\n  }, {\n    key: \"helpers\",\n    get: function get() {\n      return Template7Helpers;\n    }\n  }]);\n}();\nfunction Template7() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  var template = args[0],\n    data = args[1];\n  if (args.length === 2) {\n    var instance = new Template7Class(template);\n    var rendered = instance.compile()(data);\n    instance = null;\n    return rendered;\n  }\n  return new Template7Class(template);\n}\nTemplate7.registerHelper = function registerHelper(name, fn) {\n  Template7Class.helpers[name] = fn;\n};\nTemplate7.unregisterHelper = function unregisterHelper(name) {\n  Template7Class.helpers[name] = undefined;\n  delete Template7Class.helpers[name];\n};\nTemplate7.registerPartial = function registerPartial(name, template) {\n  Template7Class.partials[name] = {\n    template: template\n  };\n};\nTemplate7.unregisterPartial = function unregisterPartial(name) {\n  if (Template7Class.partials[name]) {\n    Template7Class.partials[name] = undefined;\n    delete Template7Class.partials[name];\n  }\n};\nTemplate7.compile = function compile(template, options) {\n  var instance = new Template7Class(template, options);\n  return instance.compile();\n};\nTemplate7.options = Template7Class.options;\nTemplate7.helpers = Template7Class.helpers;\nTemplate7.partials = Template7Class.partials;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Template7);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/template7/dist/template7.esm.js?");

/***/ }),

/***/ "./node_modules/tlds/index.json":
/*!**************************************!*\
  !*** ./node_modules/tlds/index.json ***!
  \**************************************/
/*! exports provided: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"[\\\"aaa\\\",\\\"aarp\\\",\\\"abarth\\\",\\\"abb\\\",\\\"abbott\\\",\\\"abbvie\\\",\\\"abc\\\",\\\"able\\\",\\\"abogado\\\",\\\"abudhabi\\\",\\\"ac\\\",\\\"academy\\\",\\\"accenture\\\",\\\"accountant\\\",\\\"accountants\\\",\\\"aco\\\",\\\"actor\\\",\\\"ad\\\",\\\"adac\\\",\\\"ads\\\",\\\"adult\\\",\\\"ae\\\",\\\"aeg\\\",\\\"aero\\\",\\\"aetna\\\",\\\"af\\\",\\\"afl\\\",\\\"africa\\\",\\\"ag\\\",\\\"agakhan\\\",\\\"agency\\\",\\\"ai\\\",\\\"aig\\\",\\\"airbus\\\",\\\"airforce\\\",\\\"airtel\\\",\\\"akdn\\\",\\\"al\\\",\\\"alfaromeo\\\",\\\"alibaba\\\",\\\"alipay\\\",\\\"allfinanz\\\",\\\"allstate\\\",\\\"ally\\\",\\\"alsace\\\",\\\"alstom\\\",\\\"am\\\",\\\"amazon\\\",\\\"americanexpress\\\",\\\"americanfamily\\\",\\\"amex\\\",\\\"amfam\\\",\\\"amica\\\",\\\"amsterdam\\\",\\\"analytics\\\",\\\"android\\\",\\\"anquan\\\",\\\"anz\\\",\\\"ao\\\",\\\"aol\\\",\\\"apartments\\\",\\\"app\\\",\\\"apple\\\",\\\"aq\\\",\\\"aquarelle\\\",\\\"ar\\\",\\\"arab\\\",\\\"aramco\\\",\\\"archi\\\",\\\"army\\\",\\\"arpa\\\",\\\"art\\\",\\\"arte\\\",\\\"as\\\",\\\"asda\\\",\\\"asia\\\",\\\"associates\\\",\\\"at\\\",\\\"athleta\\\",\\\"attorney\\\",\\\"au\\\",\\\"auction\\\",\\\"audi\\\",\\\"audible\\\",\\\"audio\\\",\\\"auspost\\\",\\\"author\\\",\\\"auto\\\",\\\"autos\\\",\\\"avianca\\\",\\\"aw\\\",\\\"aws\\\",\\\"ax\\\",\\\"axa\\\",\\\"az\\\",\\\"azure\\\",\\\"ba\\\",\\\"baby\\\",\\\"baidu\\\",\\\"banamex\\\",\\\"bananarepublic\\\",\\\"band\\\",\\\"bank\\\",\\\"bar\\\",\\\"barcelona\\\",\\\"barclaycard\\\",\\\"barclays\\\",\\\"barefoot\\\",\\\"bargains\\\",\\\"baseball\\\",\\\"basketball\\\",\\\"bauhaus\\\",\\\"bayern\\\",\\\"bb\\\",\\\"bbc\\\",\\\"bbt\\\",\\\"bbva\\\",\\\"bcg\\\",\\\"bcn\\\",\\\"bd\\\",\\\"be\\\",\\\"beats\\\",\\\"beauty\\\",\\\"beer\\\",\\\"bentley\\\",\\\"berlin\\\",\\\"best\\\",\\\"bestbuy\\\",\\\"bet\\\",\\\"bf\\\",\\\"bg\\\",\\\"bh\\\",\\\"bharti\\\",\\\"bi\\\",\\\"bible\\\",\\\"bid\\\",\\\"bike\\\",\\\"bing\\\",\\\"bingo\\\",\\\"bio\\\",\\\"biz\\\",\\\"bj\\\",\\\"black\\\",\\\"blackfriday\\\",\\\"blockbuster\\\",\\\"blog\\\",\\\"bloomberg\\\",\\\"blue\\\",\\\"bm\\\",\\\"bms\\\",\\\"bmw\\\",\\\"bn\\\",\\\"bnpparibas\\\",\\\"bo\\\",\\\"boats\\\",\\\"boehringer\\\",\\\"bofa\\\",\\\"bom\\\",\\\"bond\\\",\\\"boo\\\",\\\"book\\\",\\\"booking\\\",\\\"bosch\\\",\\\"bostik\\\",\\\"boston\\\",\\\"bot\\\",\\\"boutique\\\",\\\"box\\\",\\\"br\\\",\\\"bradesco\\\",\\\"bridgestone\\\",\\\"broadway\\\",\\\"broker\\\",\\\"brother\\\",\\\"brussels\\\",\\\"bs\\\",\\\"bt\\\",\\\"bugatti\\\",\\\"build\\\",\\\"builders\\\",\\\"business\\\",\\\"buy\\\",\\\"buzz\\\",\\\"bv\\\",\\\"bw\\\",\\\"by\\\",\\\"bz\\\",\\\"bzh\\\",\\\"ca\\\",\\\"cab\\\",\\\"cafe\\\",\\\"cal\\\",\\\"call\\\",\\\"calvinklein\\\",\\\"cam\\\",\\\"camera\\\",\\\"camp\\\",\\\"cancerresearch\\\",\\\"canon\\\",\\\"capetown\\\",\\\"capital\\\",\\\"capitalone\\\",\\\"car\\\",\\\"caravan\\\",\\\"cards\\\",\\\"care\\\",\\\"career\\\",\\\"careers\\\",\\\"cars\\\",\\\"casa\\\",\\\"case\\\",\\\"cash\\\",\\\"casino\\\",\\\"cat\\\",\\\"catering\\\",\\\"catholic\\\",\\\"cba\\\",\\\"cbn\\\",\\\"cbre\\\",\\\"cbs\\\",\\\"cc\\\",\\\"cd\\\",\\\"center\\\",\\\"ceo\\\",\\\"cern\\\",\\\"cf\\\",\\\"cfa\\\",\\\"cfd\\\",\\\"cg\\\",\\\"ch\\\",\\\"chanel\\\",\\\"channel\\\",\\\"charity\\\",\\\"chase\\\",\\\"chat\\\",\\\"cheap\\\",\\\"chintai\\\",\\\"christmas\\\",\\\"chrome\\\",\\\"church\\\",\\\"ci\\\",\\\"cipriani\\\",\\\"circle\\\",\\\"cisco\\\",\\\"citadel\\\",\\\"citi\\\",\\\"citic\\\",\\\"city\\\",\\\"cityeats\\\",\\\"ck\\\",\\\"cl\\\",\\\"claims\\\",\\\"cleaning\\\",\\\"click\\\",\\\"clinic\\\",\\\"clinique\\\",\\\"clothing\\\",\\\"cloud\\\",\\\"club\\\",\\\"clubmed\\\",\\\"cm\\\",\\\"cn\\\",\\\"co\\\",\\\"coach\\\",\\\"codes\\\",\\\"coffee\\\",\\\"college\\\",\\\"cologne\\\",\\\"com\\\",\\\"comcast\\\",\\\"commbank\\\",\\\"community\\\",\\\"company\\\",\\\"compare\\\",\\\"computer\\\",\\\"comsec\\\",\\\"condos\\\",\\\"construction\\\",\\\"consulting\\\",\\\"contact\\\",\\\"contractors\\\",\\\"cooking\\\",\\\"cookingchannel\\\",\\\"cool\\\",\\\"coop\\\",\\\"corsica\\\",\\\"country\\\",\\\"coupon\\\",\\\"coupons\\\",\\\"courses\\\",\\\"cpa\\\",\\\"cr\\\",\\\"credit\\\",\\\"creditcard\\\",\\\"creditunion\\\",\\\"cricket\\\",\\\"crown\\\",\\\"crs\\\",\\\"cruise\\\",\\\"cruises\\\",\\\"cu\\\",\\\"cuisinella\\\",\\\"cv\\\",\\\"cw\\\",\\\"cx\\\",\\\"cy\\\",\\\"cymru\\\",\\\"cyou\\\",\\\"cz\\\",\\\"dabur\\\",\\\"dad\\\",\\\"dance\\\",\\\"data\\\",\\\"date\\\",\\\"dating\\\",\\\"datsun\\\",\\\"day\\\",\\\"dclk\\\",\\\"dds\\\",\\\"de\\\",\\\"deal\\\",\\\"dealer\\\",\\\"deals\\\",\\\"degree\\\",\\\"delivery\\\",\\\"dell\\\",\\\"deloitte\\\",\\\"delta\\\",\\\"democrat\\\",\\\"dental\\\",\\\"dentist\\\",\\\"desi\\\",\\\"design\\\",\\\"dev\\\",\\\"dhl\\\",\\\"diamonds\\\",\\\"diet\\\",\\\"digital\\\",\\\"direct\\\",\\\"directory\\\",\\\"discount\\\",\\\"discover\\\",\\\"dish\\\",\\\"diy\\\",\\\"dj\\\",\\\"dk\\\",\\\"dm\\\",\\\"dnp\\\",\\\"do\\\",\\\"docs\\\",\\\"doctor\\\",\\\"dog\\\",\\\"domains\\\",\\\"dot\\\",\\\"download\\\",\\\"drive\\\",\\\"dtv\\\",\\\"dubai\\\",\\\"dunlop\\\",\\\"dupont\\\",\\\"durban\\\",\\\"dvag\\\",\\\"dvr\\\",\\\"dz\\\",\\\"earth\\\",\\\"eat\\\",\\\"ec\\\",\\\"eco\\\",\\\"edeka\\\",\\\"edu\\\",\\\"education\\\",\\\"ee\\\",\\\"eg\\\",\\\"email\\\",\\\"emerck\\\",\\\"energy\\\",\\\"engineer\\\",\\\"engineering\\\",\\\"enterprises\\\",\\\"epson\\\",\\\"equipment\\\",\\\"er\\\",\\\"ericsson\\\",\\\"erni\\\",\\\"es\\\",\\\"esq\\\",\\\"estate\\\",\\\"et\\\",\\\"etisalat\\\",\\\"eu\\\",\\\"eurovision\\\",\\\"eus\\\",\\\"events\\\",\\\"exchange\\\",\\\"expert\\\",\\\"exposed\\\",\\\"express\\\",\\\"extraspace\\\",\\\"fage\\\",\\\"fail\\\",\\\"fairwinds\\\",\\\"faith\\\",\\\"family\\\",\\\"fan\\\",\\\"fans\\\",\\\"farm\\\",\\\"farmers\\\",\\\"fashion\\\",\\\"fast\\\",\\\"fedex\\\",\\\"feedback\\\",\\\"ferrari\\\",\\\"ferrero\\\",\\\"fi\\\",\\\"fiat\\\",\\\"fidelity\\\",\\\"fido\\\",\\\"film\\\",\\\"final\\\",\\\"finance\\\",\\\"financial\\\",\\\"fire\\\",\\\"firestone\\\",\\\"firmdale\\\",\\\"fish\\\",\\\"fishing\\\",\\\"fit\\\",\\\"fitness\\\",\\\"fj\\\",\\\"fk\\\",\\\"flickr\\\",\\\"flights\\\",\\\"flir\\\",\\\"florist\\\",\\\"flowers\\\",\\\"fly\\\",\\\"fm\\\",\\\"fo\\\",\\\"foo\\\",\\\"food\\\",\\\"foodnetwork\\\",\\\"football\\\",\\\"ford\\\",\\\"forex\\\",\\\"forsale\\\",\\\"forum\\\",\\\"foundation\\\",\\\"fox\\\",\\\"fr\\\",\\\"free\\\",\\\"fresenius\\\",\\\"frl\\\",\\\"frogans\\\",\\\"frontdoor\\\",\\\"frontier\\\",\\\"ftr\\\",\\\"fujitsu\\\",\\\"fun\\\",\\\"fund\\\",\\\"furniture\\\",\\\"futbol\\\",\\\"fyi\\\",\\\"ga\\\",\\\"gal\\\",\\\"gallery\\\",\\\"gallo\\\",\\\"gallup\\\",\\\"game\\\",\\\"games\\\",\\\"gap\\\",\\\"garden\\\",\\\"gay\\\",\\\"gb\\\",\\\"gbiz\\\",\\\"gd\\\",\\\"gdn\\\",\\\"ge\\\",\\\"gea\\\",\\\"gent\\\",\\\"genting\\\",\\\"george\\\",\\\"gf\\\",\\\"gg\\\",\\\"ggee\\\",\\\"gh\\\",\\\"gi\\\",\\\"gift\\\",\\\"gifts\\\",\\\"gives\\\",\\\"giving\\\",\\\"gl\\\",\\\"glass\\\",\\\"gle\\\",\\\"global\\\",\\\"globo\\\",\\\"gm\\\",\\\"gmail\\\",\\\"gmbh\\\",\\\"gmo\\\",\\\"gmx\\\",\\\"gn\\\",\\\"godaddy\\\",\\\"gold\\\",\\\"goldpoint\\\",\\\"golf\\\",\\\"goo\\\",\\\"goodyear\\\",\\\"goog\\\",\\\"google\\\",\\\"gop\\\",\\\"got\\\",\\\"gov\\\",\\\"gp\\\",\\\"gq\\\",\\\"gr\\\",\\\"grainger\\\",\\\"graphics\\\",\\\"gratis\\\",\\\"green\\\",\\\"gripe\\\",\\\"grocery\\\",\\\"group\\\",\\\"gs\\\",\\\"gt\\\",\\\"gu\\\",\\\"guardian\\\",\\\"gucci\\\",\\\"guge\\\",\\\"guide\\\",\\\"guitars\\\",\\\"guru\\\",\\\"gw\\\",\\\"gy\\\",\\\"hair\\\",\\\"hamburg\\\",\\\"hangout\\\",\\\"haus\\\",\\\"hbo\\\",\\\"hdfc\\\",\\\"hdfcbank\\\",\\\"health\\\",\\\"healthcare\\\",\\\"help\\\",\\\"helsinki\\\",\\\"here\\\",\\\"hermes\\\",\\\"hgtv\\\",\\\"hiphop\\\",\\\"hisamitsu\\\",\\\"hitachi\\\",\\\"hiv\\\",\\\"hk\\\",\\\"hkt\\\",\\\"hm\\\",\\\"hn\\\",\\\"hockey\\\",\\\"holdings\\\",\\\"holiday\\\",\\\"homedepot\\\",\\\"homegoods\\\",\\\"homes\\\",\\\"homesense\\\",\\\"honda\\\",\\\"horse\\\",\\\"hospital\\\",\\\"host\\\",\\\"hosting\\\",\\\"hot\\\",\\\"hoteles\\\",\\\"hotels\\\",\\\"hotmail\\\",\\\"house\\\",\\\"how\\\",\\\"hr\\\",\\\"hsbc\\\",\\\"ht\\\",\\\"hu\\\",\\\"hughes\\\",\\\"hyatt\\\",\\\"hyundai\\\",\\\"ibm\\\",\\\"icbc\\\",\\\"ice\\\",\\\"icu\\\",\\\"id\\\",\\\"ie\\\",\\\"ieee\\\",\\\"ifm\\\",\\\"ikano\\\",\\\"il\\\",\\\"im\\\",\\\"imamat\\\",\\\"imdb\\\",\\\"immo\\\",\\\"immobilien\\\",\\\"in\\\",\\\"inc\\\",\\\"industries\\\",\\\"infiniti\\\",\\\"info\\\",\\\"ing\\\",\\\"ink\\\",\\\"institute\\\",\\\"insurance\\\",\\\"insure\\\",\\\"int\\\",\\\"international\\\",\\\"intuit\\\",\\\"investments\\\",\\\"io\\\",\\\"ipiranga\\\",\\\"iq\\\",\\\"ir\\\",\\\"irish\\\",\\\"is\\\",\\\"ismaili\\\",\\\"ist\\\",\\\"istanbul\\\",\\\"it\\\",\\\"itau\\\",\\\"itv\\\",\\\"jaguar\\\",\\\"java\\\",\\\"jcb\\\",\\\"je\\\",\\\"jeep\\\",\\\"jetzt\\\",\\\"jewelry\\\",\\\"jio\\\",\\\"jll\\\",\\\"jm\\\",\\\"jmp\\\",\\\"jnj\\\",\\\"jo\\\",\\\"jobs\\\",\\\"joburg\\\",\\\"jot\\\",\\\"joy\\\",\\\"jp\\\",\\\"jpmorgan\\\",\\\"jprs\\\",\\\"juegos\\\",\\\"juniper\\\",\\\"kaufen\\\",\\\"kddi\\\",\\\"ke\\\",\\\"kerryhotels\\\",\\\"kerrylogistics\\\",\\\"kerryproperties\\\",\\\"kfh\\\",\\\"kg\\\",\\\"kh\\\",\\\"ki\\\",\\\"kia\\\",\\\"kids\\\",\\\"kim\\\",\\\"kinder\\\",\\\"kindle\\\",\\\"kitchen\\\",\\\"kiwi\\\",\\\"km\\\",\\\"kn\\\",\\\"koeln\\\",\\\"komatsu\\\",\\\"kosher\\\",\\\"kp\\\",\\\"kpmg\\\",\\\"kpn\\\",\\\"kr\\\",\\\"krd\\\",\\\"kred\\\",\\\"kuokgroup\\\",\\\"kw\\\",\\\"ky\\\",\\\"kyoto\\\",\\\"kz\\\",\\\"la\\\",\\\"lacaixa\\\",\\\"lamborghini\\\",\\\"lamer\\\",\\\"lancaster\\\",\\\"lancia\\\",\\\"land\\\",\\\"landrover\\\",\\\"lanxess\\\",\\\"lasalle\\\",\\\"lat\\\",\\\"latino\\\",\\\"latrobe\\\",\\\"law\\\",\\\"lawyer\\\",\\\"lb\\\",\\\"lc\\\",\\\"lds\\\",\\\"lease\\\",\\\"leclerc\\\",\\\"lefrak\\\",\\\"legal\\\",\\\"lego\\\",\\\"lexus\\\",\\\"lgbt\\\",\\\"li\\\",\\\"lidl\\\",\\\"life\\\",\\\"lifeinsurance\\\",\\\"lifestyle\\\",\\\"lighting\\\",\\\"like\\\",\\\"lilly\\\",\\\"limited\\\",\\\"limo\\\",\\\"lincoln\\\",\\\"linde\\\",\\\"link\\\",\\\"lipsy\\\",\\\"live\\\",\\\"living\\\",\\\"lk\\\",\\\"llc\\\",\\\"llp\\\",\\\"loan\\\",\\\"loans\\\",\\\"locker\\\",\\\"locus\\\",\\\"loft\\\",\\\"lol\\\",\\\"london\\\",\\\"lotte\\\",\\\"lotto\\\",\\\"love\\\",\\\"lpl\\\",\\\"lplfinancial\\\",\\\"lr\\\",\\\"ls\\\",\\\"lt\\\",\\\"ltd\\\",\\\"ltda\\\",\\\"lu\\\",\\\"lundbeck\\\",\\\"luxe\\\",\\\"luxury\\\",\\\"lv\\\",\\\"ly\\\",\\\"ma\\\",\\\"macys\\\",\\\"madrid\\\",\\\"maif\\\",\\\"maison\\\",\\\"makeup\\\",\\\"man\\\",\\\"management\\\",\\\"mango\\\",\\\"map\\\",\\\"market\\\",\\\"marketing\\\",\\\"markets\\\",\\\"marriott\\\",\\\"marshalls\\\",\\\"maserati\\\",\\\"mattel\\\",\\\"mba\\\",\\\"mc\\\",\\\"mckinsey\\\",\\\"md\\\",\\\"me\\\",\\\"med\\\",\\\"media\\\",\\\"meet\\\",\\\"melbourne\\\",\\\"meme\\\",\\\"memorial\\\",\\\"men\\\",\\\"menu\\\",\\\"merckmsd\\\",\\\"mg\\\",\\\"mh\\\",\\\"miami\\\",\\\"microsoft\\\",\\\"mil\\\",\\\"mini\\\",\\\"mint\\\",\\\"mit\\\",\\\"mitsubishi\\\",\\\"mk\\\",\\\"ml\\\",\\\"mlb\\\",\\\"mls\\\",\\\"mm\\\",\\\"mma\\\",\\\"mn\\\",\\\"mo\\\",\\\"mobi\\\",\\\"mobile\\\",\\\"moda\\\",\\\"moe\\\",\\\"moi\\\",\\\"mom\\\",\\\"monash\\\",\\\"money\\\",\\\"monster\\\",\\\"mormon\\\",\\\"mortgage\\\",\\\"moscow\\\",\\\"moto\\\",\\\"motorcycles\\\",\\\"mov\\\",\\\"movie\\\",\\\"mp\\\",\\\"mq\\\",\\\"mr\\\",\\\"ms\\\",\\\"msd\\\",\\\"mt\\\",\\\"mtn\\\",\\\"mtr\\\",\\\"mu\\\",\\\"museum\\\",\\\"music\\\",\\\"mutual\\\",\\\"mv\\\",\\\"mw\\\",\\\"mx\\\",\\\"my\\\",\\\"mz\\\",\\\"na\\\",\\\"nab\\\",\\\"nagoya\\\",\\\"name\\\",\\\"natura\\\",\\\"navy\\\",\\\"nba\\\",\\\"nc\\\",\\\"ne\\\",\\\"nec\\\",\\\"net\\\",\\\"netbank\\\",\\\"netflix\\\",\\\"network\\\",\\\"neustar\\\",\\\"new\\\",\\\"news\\\",\\\"next\\\",\\\"nextdirect\\\",\\\"nexus\\\",\\\"nf\\\",\\\"nfl\\\",\\\"ng\\\",\\\"ngo\\\",\\\"nhk\\\",\\\"ni\\\",\\\"nico\\\",\\\"nike\\\",\\\"nikon\\\",\\\"ninja\\\",\\\"nissan\\\",\\\"nissay\\\",\\\"nl\\\",\\\"no\\\",\\\"nokia\\\",\\\"northwesternmutual\\\",\\\"norton\\\",\\\"now\\\",\\\"nowruz\\\",\\\"nowtv\\\",\\\"np\\\",\\\"nr\\\",\\\"nra\\\",\\\"nrw\\\",\\\"ntt\\\",\\\"nu\\\",\\\"nyc\\\",\\\"nz\\\",\\\"obi\\\",\\\"observer\\\",\\\"office\\\",\\\"okinawa\\\",\\\"olayan\\\",\\\"olayangroup\\\",\\\"oldnavy\\\",\\\"ollo\\\",\\\"om\\\",\\\"omega\\\",\\\"one\\\",\\\"ong\\\",\\\"onl\\\",\\\"online\\\",\\\"ooo\\\",\\\"open\\\",\\\"oracle\\\",\\\"orange\\\",\\\"org\\\",\\\"organic\\\",\\\"origins\\\",\\\"osaka\\\",\\\"otsuka\\\",\\\"ott\\\",\\\"ovh\\\",\\\"pa\\\",\\\"page\\\",\\\"panasonic\\\",\\\"paris\\\",\\\"pars\\\",\\\"partners\\\",\\\"parts\\\",\\\"party\\\",\\\"passagens\\\",\\\"pay\\\",\\\"pccw\\\",\\\"pe\\\",\\\"pet\\\",\\\"pf\\\",\\\"pfizer\\\",\\\"pg\\\",\\\"ph\\\",\\\"pharmacy\\\",\\\"phd\\\",\\\"philips\\\",\\\"phone\\\",\\\"photo\\\",\\\"photography\\\",\\\"photos\\\",\\\"physio\\\",\\\"pics\\\",\\\"pictet\\\",\\\"pictures\\\",\\\"pid\\\",\\\"pin\\\",\\\"ping\\\",\\\"pink\\\",\\\"pioneer\\\",\\\"pizza\\\",\\\"pk\\\",\\\"pl\\\",\\\"place\\\",\\\"play\\\",\\\"playstation\\\",\\\"plumbing\\\",\\\"plus\\\",\\\"pm\\\",\\\"pn\\\",\\\"pnc\\\",\\\"pohl\\\",\\\"poker\\\",\\\"politie\\\",\\\"porn\\\",\\\"post\\\",\\\"pr\\\",\\\"pramerica\\\",\\\"praxi\\\",\\\"press\\\",\\\"prime\\\",\\\"pro\\\",\\\"prod\\\",\\\"productions\\\",\\\"prof\\\",\\\"progressive\\\",\\\"promo\\\",\\\"properties\\\",\\\"property\\\",\\\"protection\\\",\\\"pru\\\",\\\"prudential\\\",\\\"ps\\\",\\\"pt\\\",\\\"pub\\\",\\\"pw\\\",\\\"pwc\\\",\\\"py\\\",\\\"qa\\\",\\\"qpon\\\",\\\"quebec\\\",\\\"quest\\\",\\\"racing\\\",\\\"radio\\\",\\\"re\\\",\\\"read\\\",\\\"realestate\\\",\\\"realtor\\\",\\\"realty\\\",\\\"recipes\\\",\\\"red\\\",\\\"redstone\\\",\\\"redumbrella\\\",\\\"rehab\\\",\\\"reise\\\",\\\"reisen\\\",\\\"reit\\\",\\\"reliance\\\",\\\"ren\\\",\\\"rent\\\",\\\"rentals\\\",\\\"repair\\\",\\\"report\\\",\\\"republican\\\",\\\"rest\\\",\\\"restaurant\\\",\\\"review\\\",\\\"reviews\\\",\\\"rexroth\\\",\\\"rich\\\",\\\"richardli\\\",\\\"ricoh\\\",\\\"ril\\\",\\\"rio\\\",\\\"rip\\\",\\\"ro\\\",\\\"rocher\\\",\\\"rocks\\\",\\\"rodeo\\\",\\\"rogers\\\",\\\"room\\\",\\\"rs\\\",\\\"rsvp\\\",\\\"ru\\\",\\\"rugby\\\",\\\"ruhr\\\",\\\"run\\\",\\\"rw\\\",\\\"rwe\\\",\\\"ryukyu\\\",\\\"sa\\\",\\\"saarland\\\",\\\"safe\\\",\\\"safety\\\",\\\"sakura\\\",\\\"sale\\\",\\\"salon\\\",\\\"samsclub\\\",\\\"samsung\\\",\\\"sandvik\\\",\\\"sandvikcoromant\\\",\\\"sanofi\\\",\\\"sap\\\",\\\"sarl\\\",\\\"sas\\\",\\\"save\\\",\\\"saxo\\\",\\\"sb\\\",\\\"sbi\\\",\\\"sbs\\\",\\\"sc\\\",\\\"sca\\\",\\\"scb\\\",\\\"schaeffler\\\",\\\"schmidt\\\",\\\"scholarships\\\",\\\"school\\\",\\\"schule\\\",\\\"schwarz\\\",\\\"science\\\",\\\"scot\\\",\\\"sd\\\",\\\"se\\\",\\\"search\\\",\\\"seat\\\",\\\"secure\\\",\\\"security\\\",\\\"seek\\\",\\\"select\\\",\\\"sener\\\",\\\"services\\\",\\\"ses\\\",\\\"seven\\\",\\\"sew\\\",\\\"sex\\\",\\\"sexy\\\",\\\"sfr\\\",\\\"sg\\\",\\\"sh\\\",\\\"shangrila\\\",\\\"sharp\\\",\\\"shaw\\\",\\\"shell\\\",\\\"shia\\\",\\\"shiksha\\\",\\\"shoes\\\",\\\"shop\\\",\\\"shopping\\\",\\\"shouji\\\",\\\"show\\\",\\\"showtime\\\",\\\"si\\\",\\\"silk\\\",\\\"sina\\\",\\\"singles\\\",\\\"site\\\",\\\"sj\\\",\\\"sk\\\",\\\"ski\\\",\\\"skin\\\",\\\"sky\\\",\\\"skype\\\",\\\"sl\\\",\\\"sling\\\",\\\"sm\\\",\\\"smart\\\",\\\"smile\\\",\\\"sn\\\",\\\"sncf\\\",\\\"so\\\",\\\"soccer\\\",\\\"social\\\",\\\"softbank\\\",\\\"software\\\",\\\"sohu\\\",\\\"solar\\\",\\\"solutions\\\",\\\"song\\\",\\\"sony\\\",\\\"soy\\\",\\\"spa\\\",\\\"space\\\",\\\"sport\\\",\\\"spot\\\",\\\"sr\\\",\\\"srl\\\",\\\"ss\\\",\\\"st\\\",\\\"stada\\\",\\\"staples\\\",\\\"star\\\",\\\"statebank\\\",\\\"statefarm\\\",\\\"stc\\\",\\\"stcgroup\\\",\\\"stockholm\\\",\\\"storage\\\",\\\"store\\\",\\\"stream\\\",\\\"studio\\\",\\\"study\\\",\\\"style\\\",\\\"su\\\",\\\"sucks\\\",\\\"supplies\\\",\\\"supply\\\",\\\"support\\\",\\\"surf\\\",\\\"surgery\\\",\\\"suzuki\\\",\\\"sv\\\",\\\"swatch\\\",\\\"swiss\\\",\\\"sx\\\",\\\"sy\\\",\\\"sydney\\\",\\\"systems\\\",\\\"sz\\\",\\\"tab\\\",\\\"taipei\\\",\\\"talk\\\",\\\"taobao\\\",\\\"target\\\",\\\"tatamotors\\\",\\\"tatar\\\",\\\"tattoo\\\",\\\"tax\\\",\\\"taxi\\\",\\\"tc\\\",\\\"tci\\\",\\\"td\\\",\\\"tdk\\\",\\\"team\\\",\\\"tech\\\",\\\"technology\\\",\\\"tel\\\",\\\"temasek\\\",\\\"tennis\\\",\\\"teva\\\",\\\"tf\\\",\\\"tg\\\",\\\"th\\\",\\\"thd\\\",\\\"theater\\\",\\\"theatre\\\",\\\"tiaa\\\",\\\"tickets\\\",\\\"tienda\\\",\\\"tiffany\\\",\\\"tips\\\",\\\"tires\\\",\\\"tirol\\\",\\\"tj\\\",\\\"tjmaxx\\\",\\\"tjx\\\",\\\"tk\\\",\\\"tkmaxx\\\",\\\"tl\\\",\\\"tm\\\",\\\"tmall\\\",\\\"tn\\\",\\\"to\\\",\\\"today\\\",\\\"tokyo\\\",\\\"tools\\\",\\\"top\\\",\\\"toray\\\",\\\"toshiba\\\",\\\"total\\\",\\\"tours\\\",\\\"town\\\",\\\"toyota\\\",\\\"toys\\\",\\\"tr\\\",\\\"trade\\\",\\\"trading\\\",\\\"training\\\",\\\"travel\\\",\\\"travelchannel\\\",\\\"travelers\\\",\\\"travelersinsurance\\\",\\\"trust\\\",\\\"trv\\\",\\\"tt\\\",\\\"tube\\\",\\\"tui\\\",\\\"tunes\\\",\\\"tushu\\\",\\\"tv\\\",\\\"tvs\\\",\\\"tw\\\",\\\"tz\\\",\\\"ua\\\",\\\"ubank\\\",\\\"ubs\\\",\\\"ug\\\",\\\"uk\\\",\\\"unicom\\\",\\\"university\\\",\\\"uno\\\",\\\"uol\\\",\\\"ups\\\",\\\"us\\\",\\\"uy\\\",\\\"uz\\\",\\\"va\\\",\\\"vacations\\\",\\\"vana\\\",\\\"vanguard\\\",\\\"vc\\\",\\\"ve\\\",\\\"vegas\\\",\\\"ventures\\\",\\\"verisign\\\",\\\"vermögensberater\\\",\\\"vermögensberatung\\\",\\\"versicherung\\\",\\\"vet\\\",\\\"vg\\\",\\\"vi\\\",\\\"viajes\\\",\\\"video\\\",\\\"vig\\\",\\\"viking\\\",\\\"villas\\\",\\\"vin\\\",\\\"vip\\\",\\\"virgin\\\",\\\"visa\\\",\\\"vision\\\",\\\"viva\\\",\\\"vivo\\\",\\\"vlaanderen\\\",\\\"vn\\\",\\\"vodka\\\",\\\"volkswagen\\\",\\\"volvo\\\",\\\"vote\\\",\\\"voting\\\",\\\"voto\\\",\\\"voyage\\\",\\\"vu\\\",\\\"vuelos\\\",\\\"wales\\\",\\\"walmart\\\",\\\"walter\\\",\\\"wang\\\",\\\"wanggou\\\",\\\"watch\\\",\\\"watches\\\",\\\"weather\\\",\\\"weatherchannel\\\",\\\"webcam\\\",\\\"weber\\\",\\\"website\\\",\\\"wed\\\",\\\"wedding\\\",\\\"weibo\\\",\\\"weir\\\",\\\"wf\\\",\\\"whoswho\\\",\\\"wien\\\",\\\"wiki\\\",\\\"williamhill\\\",\\\"win\\\",\\\"windows\\\",\\\"wine\\\",\\\"winners\\\",\\\"wme\\\",\\\"wolterskluwer\\\",\\\"woodside\\\",\\\"work\\\",\\\"works\\\",\\\"world\\\",\\\"wow\\\",\\\"ws\\\",\\\"wtc\\\",\\\"wtf\\\",\\\"xbox\\\",\\\"xerox\\\",\\\"xfinity\\\",\\\"xihuan\\\",\\\"xin\\\",\\\"xxx\\\",\\\"xyz\\\",\\\"yachts\\\",\\\"yahoo\\\",\\\"yamaxun\\\",\\\"yandex\\\",\\\"ye\\\",\\\"yodobashi\\\",\\\"yoga\\\",\\\"yokohama\\\",\\\"you\\\",\\\"youtube\\\",\\\"yt\\\",\\\"yun\\\",\\\"za\\\",\\\"zappos\\\",\\\"zara\\\",\\\"zero\\\",\\\"zip\\\",\\\"zm\\\",\\\"zone\\\",\\\"zuerich\\\",\\\"zw\\\",\\\"ελ\\\",\\\"ευ\\\",\\\"бг\\\",\\\"бел\\\",\\\"дети\\\",\\\"ею\\\",\\\"католик\\\",\\\"ком\\\",\\\"мкд\\\",\\\"мон\\\",\\\"москва\\\",\\\"онлайн\\\",\\\"орг\\\",\\\"рус\\\",\\\"рф\\\",\\\"сайт\\\",\\\"срб\\\",\\\"укр\\\",\\\"қаз\\\",\\\"հայ\\\",\\\"ישראל\\\",\\\"קום\\\",\\\"ابوظبي\\\",\\\"اتصالات\\\",\\\"ارامكو\\\",\\\"الاردن\\\",\\\"البحرين\\\",\\\"الجزائر\\\",\\\"السعودية\\\",\\\"العليان\\\",\\\"المغرب\\\",\\\"امارات\\\",\\\"ایران\\\",\\\"بارت\\\",\\\"بازار\\\",\\\"بيتك\\\",\\\"بھارت\\\",\\\"تونس\\\",\\\"سودان\\\",\\\"سورية\\\",\\\"شبكة\\\",\\\"عراق\\\",\\\"عرب\\\",\\\"عمان\\\",\\\"فلسطين\\\",\\\"قطر\\\",\\\"كاثوليك\\\",\\\"كوم\\\",\\\"مصر\\\",\\\"مليسيا\\\",\\\"موريتانيا\\\",\\\"موقع\\\",\\\"همراه\\\",\\\"پاکستان\\\",\\\"ڀارت\\\",\\\"कॉम\\\",\\\"नेट\\\",\\\"भारत\\\",\\\"भारतम्\\\",\\\"भारोत\\\",\\\"संगठन\\\",\\\"বাংলা\\\",\\\"ভারত\\\",\\\"ভাৰত\\\",\\\"ਭਾਰਤ\\\",\\\"ભારત\\\",\\\"ଭାରତ\\\",\\\"இந்தியா\\\",\\\"இலங்கை\\\",\\\"சிங்கப்பூர்\\\",\\\"భారత్\\\",\\\"ಭಾರತ\\\",\\\"ഭാരതം\\\",\\\"ලංකා\\\",\\\"คอม\\\",\\\"ไทย\\\",\\\"ລາວ\\\",\\\"გე\\\",\\\"みんな\\\",\\\"アマゾン\\\",\\\"クラウド\\\",\\\"グーグル\\\",\\\"コム\\\",\\\"ストア\\\",\\\"セール\\\",\\\"ファッション\\\",\\\"ポイント\\\",\\\"世界\\\",\\\"中信\\\",\\\"中国\\\",\\\"中國\\\",\\\"中文网\\\",\\\"亚马逊\\\",\\\"企业\\\",\\\"佛山\\\",\\\"信息\\\",\\\"健康\\\",\\\"八卦\\\",\\\"公司\\\",\\\"公益\\\",\\\"台湾\\\",\\\"台灣\\\",\\\"商城\\\",\\\"商店\\\",\\\"商标\\\",\\\"嘉里\\\",\\\"嘉里大酒店\\\",\\\"在线\\\",\\\"大拿\\\",\\\"天主教\\\",\\\"娱乐\\\",\\\"家電\\\",\\\"广东\\\",\\\"微博\\\",\\\"慈善\\\",\\\"我爱你\\\",\\\"手机\\\",\\\"招聘\\\",\\\"政务\\\",\\\"政府\\\",\\\"新加坡\\\",\\\"新闻\\\",\\\"时尚\\\",\\\"書籍\\\",\\\"机构\\\",\\\"淡马锡\\\",\\\"游戏\\\",\\\"澳門\\\",\\\"点看\\\",\\\"移动\\\",\\\"组织机构\\\",\\\"网址\\\",\\\"网店\\\",\\\"网站\\\",\\\"网络\\\",\\\"联通\\\",\\\"诺基亚\\\",\\\"谷歌\\\",\\\"购物\\\",\\\"通販\\\",\\\"集团\\\",\\\"電訊盈科\\\",\\\"飞利浦\\\",\\\"食品\\\",\\\"餐厅\\\",\\\"香格里拉\\\",\\\"香港\\\",\\\"닷넷\\\",\\\"닷컴\\\",\\\"삼성\\\",\\\"한국\\\"]\");\n\n//# sourceURL=webpack://futureBooks/./node_modules/tlds/index.json?");

/***/ }),

/***/ "./node_modules/to-array/index.js":
/*!****************************************!*\
  !*** ./node_modules/to-array/index.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = toArray\n\nfunction toArray(list, index) {\n    var array = []\n\n    index = index || 0\n\n    for (var i = index || 0; i < list.length; i++) {\n        array[i - index] = list[i]\n    }\n\n    return array\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/to-array/index.js?");

/***/ }),

/***/ "./node_modules/tui-pagination/dist/tui-pagination.css":
/*!*************************************************************!*\
  !*** ./node_modules/tui-pagination/dist/tui-pagination.css ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./node_modules/tui-pagination/dist/tui-pagination.css?");

/***/ }),

/***/ "./node_modules/tui-pagination/dist/tui-pagination.js":
/*!************************************************************!*\
  !*** ./node_modules/tui-pagination/dist/tui-pagination.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*!\n * TOAST UI Pagination\n * @version 3.4.1\n * @author NHN FE Development Team <dl_javascript@nhn.com>\n * @license MIT\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"dist\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 10);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Extend the target object from other objects.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * @module object\n */\n\n/**\n * Extend the target object from other objects.\n * @param {object} target - Object that will be extended\n * @param {...object} objects - Objects as sources\n * @returns {object} Extended object\n * @memberof module:object\n */\nfunction extend(target, objects) { // eslint-disable-line no-unused-vars\n  var hasOwnProp = Object.prototype.hasOwnProperty;\n  var source, prop, i, len;\n\n  for (i = 1, len = arguments.length; i < len; i += 1) {\n    source = arguments[i];\n    for (prop in source) {\n      if (hasOwnProp.call(source, prop)) {\n        target[prop] = source[prop];\n      }\n    }\n  }\n\n  return target;\n}\n\nmodule.exports = extend;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is undefined or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is undefined or not.\n * If the given variable is undefined, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is undefined?\n * @memberof module:type\n */\nfunction isUndefined(obj) {\n  return obj === undefined; // eslint-disable-line no-undefined\n}\n\nmodule.exports = isUndefined;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is an instance of Array or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is an instance of Array or not.\n * If the given variable is an instance of Array, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is array instance?\n * @memberof module:type\n */\nfunction isArray(obj) {\n  return obj instanceof Array;\n}\n\nmodule.exports = isArray;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Execute the provided callback once for each property of object(or element of array) which actually exist.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isArray = __webpack_require__(2);\nvar forEachArray = __webpack_require__(17);\nvar forEachOwnProperties = __webpack_require__(6);\n\n/**\n * @module collection\n */\n\n/**\n * Execute the provided callback once for each property of object(or element of array) which actually exist.\n * If the object is Array-like object(ex-arguments object), It needs to transform to Array.(see 'ex2' of example).\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n *  1) The value of the property(or The value of the element)\n *  2) The name of the property(or The index of the element)\n *  3) The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * var forEach = require('tui-code-snippet/collection/forEach'); // node, commonjs\n *\n * var sum = 0;\n *\n * forEach([1,2,3], function(value){\n *     sum += value;\n * });\n * alert(sum); // 6\n *\n * // In case of Array-like object\n * var array = Array.prototype.slice.call(arrayLike); // change to array\n * forEach(array, function(value){\n *     sum += value;\n * });\n */\nfunction forEach(obj, iteratee, context) {\n  if (isArray(obj)) {\n    forEachArray(obj, iteratee, context);\n  } else {\n    forEachOwnProperties(obj, iteratee, context);\n  }\n}\n\nmodule.exports = forEach;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is a string or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is a string or not.\n * If the given variable is a string, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is string?\n * @memberof module:type\n */\nfunction isString(obj) {\n  return typeof obj === 'string' || obj instanceof String;\n}\n\nmodule.exports = isString;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is a function or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is a function or not.\n * If the given variable is a function, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is function?\n * @memberof module:type\n */\nfunction isFunction(obj) {\n  return obj instanceof Function;\n}\n\nmodule.exports = isFunction;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Execute the provided callback once for each property of object which actually exist.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Execute the provided callback once for each property of object which actually exist.\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n *  1) The value of the property\n *  2) The name of the property\n *  3) The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee  Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * var forEachOwnProperties = require('tui-code-snippet/collection/forEachOwnProperties'); // node, commonjs\n *\n * var sum = 0;\n *\n * forEachOwnProperties({a:1,b:2,c:3}, function(value){\n *     sum += value;\n * });\n * alert(sum); // 6\n */\nfunction forEachOwnProperties(obj, iteratee, context) {\n  var key;\n\n  context = context || null;\n\n  for (key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      if (iteratee.call(context, obj[key], key, obj) === false) {\n        break;\n      }\n    }\n  }\n}\n\nmodule.exports = forEachOwnProperties;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview\n * This module provides a function to make a constructor\n * that can inherit from the other constructors like the CLASS easily.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar inherit = __webpack_require__(18);\nvar extend = __webpack_require__(0);\n\n/**\n * @module defineClass\n */\n\n/**\n * Help a constructor to be defined and to inherit from the other constructors\n * @param {*} [parent] Parent constructor\n * @param {Object} props Members of constructor\n *  @param {Function} props.init Initialization method\n *  @param {Object} [props.static] Static members of constructor\n * @returns {*} Constructor\n * @memberof module:defineClass\n * @example\n * var defineClass = require('tui-code-snippet/defineClass/defineClass'); // node, commonjs\n *\n * //-- #2. Use property --//\n * var Parent = defineClass({\n *     init: function() { // constuructor\n *         this.name = 'made by def';\n *     },\n *     method: function() {\n *         // ...\n *     },\n *     static: {\n *         staticMethod: function() {\n *              // ...\n *         }\n *     }\n * });\n *\n * var Child = defineClass(Parent, {\n *     childMethod: function() {}\n * });\n *\n * Parent.staticMethod();\n *\n * var parentInstance = new Parent();\n * console.log(parentInstance.name); //made by def\n * parentInstance.staticMethod(); // Error\n *\n * var childInstance = new Child();\n * childInstance.method();\n * childInstance.childMethod();\n */\nfunction defineClass(parent, props) {\n  var obj;\n\n  if (!props) {\n    props = parent;\n    parent = null;\n  }\n\n  obj = props.init || function() {};\n\n  if (parent) {\n    inherit(obj, parent);\n  }\n\n  if (props.hasOwnProperty('static')) {\n    extend(obj, props['static']);\n    delete props['static'];\n  }\n\n  extend(obj.prototype, props);\n\n  return obj;\n}\n\nmodule.exports = defineClass;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* eslint-disable complexity */\n/**\n * @fileoverview Returns the first index at which a given element can be found in the array.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isArray = __webpack_require__(2);\n\n/**\n * @module array\n */\n\n/**\n * Returns the first index at which a given element can be found in the array\n * from start index(default 0), or -1 if it is not present.\n * It compares searchElement to elements of the Array using strict equality\n * (the same method used by the ===, or triple-equals, operator).\n * @param {*} searchElement Element to locate in the array\n * @param {Array} array Array that will be traversed.\n * @param {number} startIndex Start index in array for searching (default 0)\n * @returns {number} the First index at which a given element, or -1 if it is not present\n * @memberof module:array\n * @example\n * var inArray = require('tui-code-snippet/array/inArray'); // node, commonjs\n *\n * var arr = ['one', 'two', 'three', 'four'];\n * var idx1 = inArray('one', arr, 3); // -1\n * var idx2 = inArray('one', arr); // 0\n */\nfunction inArray(searchElement, array, startIndex) {\n  var i;\n  var length;\n  startIndex = startIndex || 0;\n\n  if (!isArray(array)) {\n    return -1;\n  }\n\n  if (Array.prototype.indexOf) {\n    return Array.prototype.indexOf.call(array, searchElement, startIndex);\n  }\n\n  length = array.length;\n  for (i = startIndex; startIndex >= 0 && i < length; i += 1) {\n    if (array[i] === searchElement) {\n      return i;\n    }\n  }\n\n  return -1;\n}\n\nmodule.exports = inArray;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar template = __webpack_require__(29);\nvar sendHostname = __webpack_require__(30);\nvar isFunction = __webpack_require__(5);\n\nvar util = {\n  /**\n   * Capitalize first letter\n   * @param {string} str - String to change\n   * @returns {string} Changed string\n   */\n  capitalizeFirstLetter: function(str) {\n    return str.substring(0, 1).toUpperCase() + str.substring(1, str.length);\n  },\n\n  /**\n   * Check the element is contained\n   * @param {HTMLElement} find - Target element\n   * @param {HTMLElement} parent - Wrapper element\n   * @returns {boolean} Whether contained or not\n   */\n  isContained: function(find, parent) {\n    if (!parent) {\n      return false;\n    }\n\n    return find === parent ? true : parent.contains(find);\n  },\n\n  /**\n   * Create an new element by template literals.\n   * @param {string|function} tmpl - template\n   * @param {Object} context - context\n   * @returns {HTMLElement}\n   */\n  createElementByTemplate: function(tmpl, context) {\n    var parent = document.createElement('div');\n    var html = isFunction(tmpl) ? tmpl(context) : template(tmpl, context);\n    parent.innerHTML = html;\n\n    return parent.firstChild;\n  },\n\n  /**\n   * Create a new function that, when called, has its this keyword set to the provided value.\n   * @param {function} fn A original function before binding\n   * @param {*} obj context of function in arguments[0]\n   * @returns {function} A new bound function with context that is in arguments[1]\n   */\n  bind: function(fn, obj) {\n    var slice = Array.prototype.slice;\n    var args;\n\n    if (fn.bind) {\n      return fn.bind.apply(fn, slice.call(arguments, 1));\n    }\n\n    args = slice.call(arguments, 2);\n\n    return function() {\n      return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\n    };\n  },\n\n  /**\n   * Send hostname for GA\n   * @ignore\n   */\n  sendHostName: function() {\n    sendHostname('pagination', 'UA-129987462-1');\n  }\n};\n\nmodule.exports = util;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview The entry file of Pagination components\n * @author NHN. FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n__webpack_require__(11);\n\nmodule.exports = __webpack_require__(12);\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CustomEvents = __webpack_require__(13);\nvar defineClass = __webpack_require__(7);\nvar extend = __webpack_require__(0);\nvar isUndefined = __webpack_require__(1);\n\nvar View = __webpack_require__(20);\nvar util = __webpack_require__(9);\n\nvar defaultOption = {\n  totalItems: 10,\n  itemsPerPage: 10,\n  visiblePages: 10,\n  page: 1,\n  centerAlign: false,\n  firstItemClassName: 'tui-first-child',\n  lastItemClassName: 'tui-last-child',\n  usageStatistics: true\n};\n\n/**\n * Pagination class\n * @class Pagination\n * @param {string|HTMLElement|jQueryObject} container - Container element or selector.\n * In case of a string, it is considered as an id selector and find the element by id.\n * If there is no element, it is considered as a selector and find the element by querySelector().\n * Passing jQueryObject and considering an id selector at first will be deprecated in v4.0.0.\n * @param {object} options - Option object\n *     @param {number} [options.totalItems=10] Total item count\n *     @param {number} [options.itemsPerPage=10] Item count per page\n *     @param {number} [options.visiblePages=10] Display page link count\n *     @param {number} [options.page=1] Display page after pagination draw.\n *     @param {boolean}[options.centerAlign=false] Whether current page keep center or not\n *     @param {string} [options.firstItemClassName='first-child'] The class name of the first item\n *     @param {string} [options.lastItemClassName='last-child'] The class name of the last item\n *     @param {object} [options.template] A markup string set to make element. Refer to {@link https://github.com/nhn/tui.pagination/blob/master/docs/getting-started.md#how-to-use-template Getting Started: How to use template}.\n *         @param {string|function} [options.template.page] HTML template\n *         @param {string|function} [options.template.currentPage] HTML template\n *         @param {string|function} [options.template.moveButton] HTML template\n *         @param {string|function} [options.template.disabledMoveButton] HTML template\n *         @param {string|function} [options.template.moreButton] HTML template\n *     @param {boolean} [options.usageStatistics=true] Send the hostname to google analytics.\n *         If you do not want to send the hostname, this option set to false.\n * @example\n * // ES6\n * import Pagination from 'tui-pagination';\n *\n * // CommonJS\n * const Pagination = require('tui-pagination');\n *\n * // Browser\n * const Pagination = tui.Pagination;\n *\n * const container = document.getElementById('pagination');\n * const options = { // below default value of options\n *      totalItems: 10,\n *      itemsPerPage: 10,\n *      visiblePages: 10,\n *      page: 1,\n *      centerAlign: false,\n *      firstItemClassName: 'tui-first-child',\n *      lastItemClassName: 'tui-last-child',\n *      template: {\n *          page: '<a href=\"#\" class=\"tui-page-btn\">{{page}}</a>',\n *          currentPage: '<strong class=\"tui-page-btn tui-is-selected\">{{page}}</strong>',\n *          moveButton:\n *              '<a href=\"#\" class=\"tui-page-btn tui-{{type}}\">' +\n *                  '<span class=\"tui-ico-{{type}}\">{{type}}</span>' +\n *              '</a>',\n *          disabledMoveButton:\n *              '<span class=\"tui-page-btn tui-is-disabled tui-{{type}}\">' +\n *                  '<span class=\"tui-ico-{{type}}\">{{type}}</span>' +\n *              '</span>',\n *          moreButton:\n *              '<a href=\"#\" class=\"tui-page-btn tui-{{type}}-is-ellip\">' +\n *                  '<span class=\"tui-ico-ellip\">...</span>' +\n *              '</a>'\n *      }\n * };\n * const pagination = new Pagination(container, options);\n */\nvar Pagination = defineClass(\n  /** @lends Pagination.prototype */ {\n    init: function(container, options) {\n      /**\n       * Option object\n       * @type {object}\n       * @private\n       */\n      this._options = extend({}, defaultOption, options);\n\n      /**\n       * Current page number\n       * @type {number}\n       * @private\n       */\n      this._currentPage = 0;\n\n      /**\n       * View instance\n       * @type {View}\n       * @private\n       */\n      this._view = new View(container, this._options, util.bind(this._onClickHandler, this));\n\n      this._paginate();\n\n      if (this._options.usageStatistics) {\n        util.sendHostName();\n      }\n    },\n\n    /**\n     * Set current page\n     * @param {number} page - Current page\n     * @private\n     */\n    _setCurrentPage: function(page) {\n      this._currentPage = page || this._options.page;\n    },\n\n    /**\n     * Get last page number\n     * @returns {number} Last page number\n     * @private\n     */\n    _getLastPage: function() {\n      var lastPage = Math.ceil(this._options.totalItems / this._options.itemsPerPage);\n\n      return !lastPage ? 1 : lastPage;\n    },\n\n    /**\n     * Index of list in total lists\n     * @param {number} pageNumber - Page number\n     * @returns {number} Page index or number\n     * @private\n     */\n    _getPageIndex: function(pageNumber) {\n      var left, pageIndex;\n\n      if (this._options.centerAlign) {\n        left = Math.floor(this._options.visiblePages / 2);\n        pageIndex = pageNumber - left;\n        pageIndex = Math.max(pageIndex, 1);\n        pageIndex = Math.min(pageIndex, this._getLastPage() - this._options.visiblePages + 1);\n\n        return pageIndex;\n      }\n\n      return Math.ceil(pageNumber / this._options.visiblePages);\n    },\n\n    /**\n     * Get relative page\n     * @param {string} moveType - Move type ('prev' or 'next')\n     * @returns {number} Relative page number\n     * @private\n     */\n    _getRelativePage: function(moveType) {\n      var isPrevMove = moveType === 'prev';\n      var currentPage = this.getCurrentPage();\n\n      return isPrevMove ? currentPage - 1 : currentPage + 1;\n    },\n\n    /**\n     * Get more page index\n     * @param {string} moveType - Move type ('prev' or 'next')\n     * @returns {number} Page index\n     * @private\n     */\n    _getMorePageIndex: function(moveType) {\n      var currentPageIndex = this._getPageIndex(this.getCurrentPage());\n      var pageCount = this._options.visiblePages;\n      var isPrevMove = moveType === 'prev';\n      var pageIndex;\n\n      if (this._options.centerAlign) {\n        pageIndex = isPrevMove ? currentPageIndex - 1 : currentPageIndex + pageCount;\n      } else {\n        pageIndex = isPrevMove\n          ? (currentPageIndex - 1) * pageCount\n          : currentPageIndex * pageCount + 1;\n      }\n\n      return pageIndex;\n    },\n    /* eslint-enable complexity */\n\n    /**\n     * Get available page number from over number\n     * If total page is 23, but input number is 30 => return 23\n     * @param {number} page - Page number\n     * @returns {number} Replaced pgae number\n     * @private\n     */\n    _convertToValidPage: function(page) {\n      var lastPageNumber = this._getLastPage();\n      page = Math.max(page, 1);\n      page = Math.min(page, lastPageNumber);\n\n      return page;\n    },\n\n    /**\n     * Create require view set, notify view to update\n     * @param {number} page - Page number\n     * @private\n     */\n    _paginate: function(page) {\n      var viewData = this._makeViewData(page || this._options.page);\n      this._setCurrentPage(page);\n      this._view.update(viewData);\n    },\n\n    /**\n     * Create and get view data\n     * @param {number} page - Page number\n     * @returns {object} view data\n     * @private\n     */\n    _makeViewData: function(page) {\n      var viewData = {};\n      var lastPage = this._getLastPage();\n      var currentPageIndex = this._getPageIndex(page);\n      var lastPageListIndex = this._getPageIndex(lastPage);\n      var edges = this._getEdge(page);\n\n      viewData.leftPageNumber = edges.left;\n      viewData.rightPageNumber = edges.right;\n\n      viewData.prevMore = currentPageIndex > 1;\n      viewData.nextMore = currentPageIndex < lastPageListIndex;\n\n      viewData.page = page;\n      viewData.currentPageIndex = page;\n      viewData.lastPage = lastPage;\n      viewData.lastPageListIndex = lastPage;\n\n      return viewData;\n    },\n\n    /**\n     * Get each edge page\n     * @param {object} page - Page number\n     * @returns {{left: number, right: number}} Edge page numbers\n     * @private\n     */\n    _getEdge: function(page) {\n      var leftPageNumber, rightPageNumber, left;\n      var lastPage = this._getLastPage();\n      var visiblePages = this._options.visiblePages;\n      var currentPageIndex = this._getPageIndex(page);\n\n      if (this._options.centerAlign) {\n        left = Math.floor(visiblePages / 2);\n        leftPageNumber = Math.max(page - left, 1);\n        rightPageNumber = leftPageNumber + visiblePages - 1;\n\n        if (rightPageNumber > lastPage) {\n          leftPageNumber = Math.max(lastPage - visiblePages + 1, 1);\n          rightPageNumber = lastPage;\n        }\n      } else {\n        leftPageNumber = (currentPageIndex - 1) * visiblePages + 1;\n        rightPageNumber = currentPageIndex * visiblePages;\n        rightPageNumber = Math.min(rightPageNumber, lastPage);\n      }\n\n      return {\n        left: leftPageNumber,\n        right: rightPageNumber\n      };\n    },\n\n    /**\n     * Pagelist click event hadnler\n     * @param {?string} buttonType - Button type\n     * @param {?number} page - Page number\n     * @private\n     */\n    /* eslint-disable complexity */\n    _onClickHandler: function(buttonType, page) {\n      switch (buttonType) {\n        case 'first':\n          page = 1;\n          break;\n        case 'prev':\n          page = this._getRelativePage('prev');\n          break;\n        case 'next':\n          page = this._getRelativePage('next');\n          break;\n        case 'prevMore':\n          page = this._getMorePageIndex('prev');\n          break;\n        case 'nextMore':\n          page = this._getMorePageIndex('next');\n          break;\n        case 'last':\n          page = this._getLastPage();\n          break;\n        default:\n          if (!page) {\n            return;\n          }\n      }\n\n      this.movePageTo(page);\n    },\n    /* eslint-enable complexity */\n\n    /**\n     * Reset pagination\n     * @param {*} totalItems - Redraw page item count\n     * @example\n     * pagination.reset();\n     * pagination.reset(100);\n     */\n    reset: function(totalItems) {\n      if (isUndefined(totalItems)) {\n        totalItems = this._options.totalItems;\n      }\n\n      this._options.totalItems = totalItems;\n      this._paginate(1);\n    },\n\n    /**\n     * Move to specific page, redraw list.\n     * Before move fire beforeMove event, After move fire afterMove event.\n     * @param {Number} targetPage - Target page\n     * @example\n     * pagination.movePageTo(10);\n     */\n    movePageTo: function(targetPage) {\n      targetPage = this._convertToValidPage(targetPage);\n\n      /**\n       * @event Pagination#beforeMove\n       * @type {object} evt - Custom event object\n       * @property {number} page - Moved page\n       * @example\n       * paganation.on('beforeMove', (event) => {\n       *     const currentPage = event.page;\n       *\n       *     if (currentPage === 10) {\n       *         return false;\n       *         // return true;\n       *     }\n       * });\n       */\n      if (!this.invoke('beforeMove', { page: targetPage })) {\n        return;\n      }\n\n      this._paginate(targetPage);\n\n      /**\n       * @event Pagination#afterMove\n       * @type {object} evt - Custom event object\n       * @property {number} page - Moved page\n       * @example\n       * paganation.on('afterMove', (event) => {\n       *      const currentPage = event.page;\n       *      console.log(currentPage);\n       * });\n       */\n      this.fire('afterMove', { page: targetPage });\n    },\n\n    /**\n     * Set total count of items\n     * @param {number} itemCount - Total item count\n     */\n    setTotalItems: function(itemCount) {\n      this._options.totalItems = itemCount;\n    },\n\n    /**\n     * Set count of items per page\n     * @param {number} itemCount - Item count\n     */\n    setItemsPerPage: function(itemCount) {\n      this._options.itemsPerPage = itemCount;\n    },\n\n    /**\n     * Get current page\n     * @returns {number} Current page\n     */\n    getCurrentPage: function() {\n      return this._currentPage || this._options.page;\n    }\n  }\n);\n\nCustomEvents.mixin(Pagination);\n\nmodule.exports = Pagination;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview This module provides some functions for custom events. And it is implemented in the observer design pattern.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar extend = __webpack_require__(0);\nvar isExisty = __webpack_require__(14);\nvar isString = __webpack_require__(4);\nvar isObject = __webpack_require__(16);\nvar isArray = __webpack_require__(2);\nvar isFunction = __webpack_require__(5);\nvar forEach = __webpack_require__(3);\n\nvar R_EVENTNAME_SPLIT = /\\s+/g;\n\n/**\n * @class\n * @example\n * // node, commonjs\n * var CustomEvents = require('tui-code-snippet/customEvents/customEvents');\n */\nfunction CustomEvents() {\n  /**\n     * @type {HandlerItem[]}\n     */\n  this.events = null;\n\n  /**\n     * only for checking specific context event was binded\n     * @type {object[]}\n     */\n  this.contexts = null;\n}\n\n/**\n * Mixin custom events feature to specific constructor\n * @param {function} func - constructor\n * @example\n * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs\n *\n * var model;\n * function Model() {\n *     this.name = '';\n * }\n * CustomEvents.mixin(Model);\n *\n * model = new Model();\n * model.on('change', function() { this.name = 'model'; }, this);\n * model.fire('change');\n * alert(model.name); // 'model';\n */\nCustomEvents.mixin = function(func) {\n  extend(func.prototype, CustomEvents.prototype);\n};\n\n/**\n * Get HandlerItem object\n * @param {function} handler - handler function\n * @param {object} [context] - context for handler\n * @returns {HandlerItem} HandlerItem object\n * @private\n */\nCustomEvents.prototype._getHandlerItem = function(handler, context) {\n  var item = {handler: handler};\n\n  if (context) {\n    item.context = context;\n  }\n\n  return item;\n};\n\n/**\n * Get event object safely\n * @param {string} [eventName] - create sub event map if not exist.\n * @returns {(object|array)} event object. if you supplied `eventName`\n *  parameter then make new array and return it\n * @private\n */\nCustomEvents.prototype._safeEvent = function(eventName) {\n  var events = this.events;\n  var byName;\n\n  if (!events) {\n    events = this.events = {};\n  }\n\n  if (eventName) {\n    byName = events[eventName];\n\n    if (!byName) {\n      byName = [];\n      events[eventName] = byName;\n    }\n\n    events = byName;\n  }\n\n  return events;\n};\n\n/**\n * Get context array safely\n * @returns {array} context array\n * @private\n */\nCustomEvents.prototype._safeContext = function() {\n  var context = this.contexts;\n\n  if (!context) {\n    context = this.contexts = [];\n  }\n\n  return context;\n};\n\n/**\n * Get index of context\n * @param {object} ctx - context that used for bind custom event\n * @returns {number} index of context\n * @private\n */\nCustomEvents.prototype._indexOfContext = function(ctx) {\n  var context = this._safeContext();\n  var index = 0;\n\n  while (context[index]) {\n    if (ctx === context[index][0]) {\n      return index;\n    }\n\n    index += 1;\n  }\n\n  return -1;\n};\n\n/**\n * Memorize supplied context for recognize supplied object is context or\n *  name: handler pair object when off()\n * @param {object} ctx - context object to memorize\n * @private\n */\nCustomEvents.prototype._memorizeContext = function(ctx) {\n  var context, index;\n\n  if (!isExisty(ctx)) {\n    return;\n  }\n\n  context = this._safeContext();\n  index = this._indexOfContext(ctx);\n\n  if (index > -1) {\n    context[index][1] += 1;\n  } else {\n    context.push([ctx, 1]);\n  }\n};\n\n/**\n * Forget supplied context object\n * @param {object} ctx - context object to forget\n * @private\n */\nCustomEvents.prototype._forgetContext = function(ctx) {\n  var context, contextIndex;\n\n  if (!isExisty(ctx)) {\n    return;\n  }\n\n  context = this._safeContext();\n  contextIndex = this._indexOfContext(ctx);\n\n  if (contextIndex > -1) {\n    context[contextIndex][1] -= 1;\n\n    if (context[contextIndex][1] <= 0) {\n      context.splice(contextIndex, 1);\n    }\n  }\n};\n\n/**\n * Bind event handler\n * @param {(string|{name:string, handler:function})} eventName - custom\n *  event name or an object {eventName: handler}\n * @param {(function|object)} [handler] - handler function or context\n * @param {object} [context] - context for binding\n * @private\n */\nCustomEvents.prototype._bindEvent = function(eventName, handler, context) {\n  var events = this._safeEvent(eventName);\n  this._memorizeContext(context);\n  events.push(this._getHandlerItem(handler, context));\n};\n\n/**\n * Bind event handlers\n * @param {(string|{name:string, handler:function})} eventName - custom\n *  event name or an object {eventName: handler}\n * @param {(function|object)} [handler] - handler function or context\n * @param {object} [context] - context for binding\n * //-- #1. Get Module --//\n * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs\n *\n * //-- #2. Use method --//\n * // # 2.1 Basic Usage\n * CustomEvents.on('onload', handler);\n *\n * // # 2.2 With context\n * CustomEvents.on('onload', handler, myObj);\n *\n * // # 2.3 Bind by object that name, handler pairs\n * CustomEvents.on({\n *     'play': handler,\n *     'pause': handler2\n * });\n *\n * // # 2.4 Bind by object that name, handler pairs with context object\n * CustomEvents.on({\n *     'play': handler\n * }, myObj);\n */\nCustomEvents.prototype.on = function(eventName, handler, context) {\n  var self = this;\n\n  if (isString(eventName)) {\n    // [syntax 1, 2]\n    eventName = eventName.split(R_EVENTNAME_SPLIT);\n    forEach(eventName, function(name) {\n      self._bindEvent(name, handler, context);\n    });\n  } else if (isObject(eventName)) {\n    // [syntax 3, 4]\n    context = handler;\n    forEach(eventName, function(func, name) {\n      self.on(name, func, context);\n    });\n  }\n};\n\n/**\n * Bind one-shot event handlers\n * @param {(string|{name:string,handler:function})} eventName - custom\n *  event name or an object {eventName: handler}\n * @param {function|object} [handler] - handler function or context\n * @param {object} [context] - context for binding\n */\nCustomEvents.prototype.once = function(eventName, handler, context) {\n  var self = this;\n\n  if (isObject(eventName)) {\n    context = handler;\n    forEach(eventName, function(func, name) {\n      self.once(name, func, context);\n    });\n\n    return;\n  }\n\n  function onceHandler() { // eslint-disable-line require-jsdoc\n    handler.apply(context, arguments);\n    self.off(eventName, onceHandler, context);\n  }\n\n  this.on(eventName, onceHandler, context);\n};\n\n/**\n * Splice supplied array by callback result\n * @param {array} arr - array to splice\n * @param {function} predicate - function return boolean\n * @private\n */\nCustomEvents.prototype._spliceMatches = function(arr, predicate) {\n  var i = 0;\n  var len;\n\n  if (!isArray(arr)) {\n    return;\n  }\n\n  for (len = arr.length; i < len; i += 1) {\n    if (predicate(arr[i]) === true) {\n      arr.splice(i, 1);\n      len -= 1;\n      i -= 1;\n    }\n  }\n};\n\n/**\n * Get matcher for unbind specific handler events\n * @param {function} handler - handler function\n * @returns {function} handler matcher\n * @private\n */\nCustomEvents.prototype._matchHandler = function(handler) {\n  var self = this;\n\n  return function(item) {\n    var needRemove = handler === item.handler;\n\n    if (needRemove) {\n      self._forgetContext(item.context);\n    }\n\n    return needRemove;\n  };\n};\n\n/**\n * Get matcher for unbind specific context events\n * @param {object} context - context\n * @returns {function} object matcher\n * @private\n */\nCustomEvents.prototype._matchContext = function(context) {\n  var self = this;\n\n  return function(item) {\n    var needRemove = context === item.context;\n\n    if (needRemove) {\n      self._forgetContext(item.context);\n    }\n\n    return needRemove;\n  };\n};\n\n/**\n * Get matcher for unbind specific hander, context pair events\n * @param {function} handler - handler function\n * @param {object} context - context\n * @returns {function} handler, context matcher\n * @private\n */\nCustomEvents.prototype._matchHandlerAndContext = function(handler, context) {\n  var self = this;\n\n  return function(item) {\n    var matchHandler = (handler === item.handler);\n    var matchContext = (context === item.context);\n    var needRemove = (matchHandler && matchContext);\n\n    if (needRemove) {\n      self._forgetContext(item.context);\n    }\n\n    return needRemove;\n  };\n};\n\n/**\n * Unbind event by event name\n * @param {string} eventName - custom event name to unbind\n * @param {function} [handler] - handler function\n * @private\n */\nCustomEvents.prototype._offByEventName = function(eventName, handler) {\n  var self = this;\n  var andByHandler = isFunction(handler);\n  var matchHandler = self._matchHandler(handler);\n\n  eventName = eventName.split(R_EVENTNAME_SPLIT);\n\n  forEach(eventName, function(name) {\n    var handlerItems = self._safeEvent(name);\n\n    if (andByHandler) {\n      self._spliceMatches(handlerItems, matchHandler);\n    } else {\n      forEach(handlerItems, function(item) {\n        self._forgetContext(item.context);\n      });\n\n      self.events[name] = [];\n    }\n  });\n};\n\n/**\n * Unbind event by handler function\n * @param {function} handler - handler function\n * @private\n */\nCustomEvents.prototype._offByHandler = function(handler) {\n  var self = this;\n  var matchHandler = this._matchHandler(handler);\n\n  forEach(this._safeEvent(), function(handlerItems) {\n    self._spliceMatches(handlerItems, matchHandler);\n  });\n};\n\n/**\n * Unbind event by object(name: handler pair object or context object)\n * @param {object} obj - context or {name: handler} pair object\n * @param {function} handler - handler function\n * @private\n */\nCustomEvents.prototype._offByObject = function(obj, handler) {\n  var self = this;\n  var matchFunc;\n\n  if (this._indexOfContext(obj) < 0) {\n    forEach(obj, function(func, name) {\n      self.off(name, func);\n    });\n  } else if (isString(handler)) {\n    matchFunc = this._matchContext(obj);\n\n    self._spliceMatches(this._safeEvent(handler), matchFunc);\n  } else if (isFunction(handler)) {\n    matchFunc = this._matchHandlerAndContext(handler, obj);\n\n    forEach(this._safeEvent(), function(handlerItems) {\n      self._spliceMatches(handlerItems, matchFunc);\n    });\n  } else {\n    matchFunc = this._matchContext(obj);\n\n    forEach(this._safeEvent(), function(handlerItems) {\n      self._spliceMatches(handlerItems, matchFunc);\n    });\n  }\n};\n\n/**\n * Unbind custom events\n * @param {(string|object|function)} eventName - event name or context or\n *  {name: handler} pair object or handler function\n * @param {(function)} handler - handler function\n * @example\n * //-- #1. Get Module --//\n * var CustomEvents = require('tui-code-snippet/customEvents/customEvents'); // node, commonjs\n *\n * //-- #2. Use method --//\n * // # 2.1 off by event name\n * CustomEvents.off('onload');\n *\n * // # 2.2 off by event name and handler\n * CustomEvents.off('play', handler);\n *\n * // # 2.3 off by handler\n * CustomEvents.off(handler);\n *\n * // # 2.4 off by context\n * CustomEvents.off(myObj);\n *\n * // # 2.5 off by context and handler\n * CustomEvents.off(myObj, handler);\n *\n * // # 2.6 off by context and event name\n * CustomEvents.off(myObj, 'onload');\n *\n * // # 2.7 off by an Object.<string, function> that is {eventName: handler}\n * CustomEvents.off({\n *   'play': handler,\n *   'pause': handler2\n * });\n *\n * // # 2.8 off the all events\n * CustomEvents.off();\n */\nCustomEvents.prototype.off = function(eventName, handler) {\n  if (isString(eventName)) {\n    // [syntax 1, 2]\n    this._offByEventName(eventName, handler);\n  } else if (!arguments.length) {\n    // [syntax 8]\n    this.events = {};\n    this.contexts = [];\n  } else if (isFunction(eventName)) {\n    // [syntax 3]\n    this._offByHandler(eventName);\n  } else if (isObject(eventName)) {\n    // [syntax 4, 5, 6]\n    this._offByObject(eventName, handler);\n  }\n};\n\n/**\n * Fire custom event\n * @param {string} eventName - name of custom event\n */\nCustomEvents.prototype.fire = function(eventName) {  // eslint-disable-line\n  this.invoke.apply(this, arguments);\n};\n\n/**\n * Fire a event and returns the result of operation 'boolean AND' with all\n *  listener's results.\n *\n * So, It is different from {@link CustomEvents#fire}.\n *\n * In service code, use this as a before event in component level usually\n *  for notifying that the event is cancelable.\n * @param {string} eventName - Custom event name\n * @param {...*} data - Data for event\n * @returns {boolean} The result of operation 'boolean AND'\n * @example\n * var map = new Map();\n * map.on({\n *     'beforeZoom': function() {\n *         // It should cancel the 'zoom' event by some conditions.\n *         if (that.disabled && this.getState()) {\n *             return false;\n *         }\n *         return true;\n *     }\n * });\n *\n * if (this.invoke('beforeZoom')) {    // check the result of 'beforeZoom'\n *     // if true,\n *     // doSomething\n * }\n */\nCustomEvents.prototype.invoke = function(eventName) {\n  var events, args, index, item;\n\n  if (!this.hasListener(eventName)) {\n    return true;\n  }\n\n  events = this._safeEvent(eventName);\n  args = Array.prototype.slice.call(arguments, 1);\n  index = 0;\n\n  while (events[index]) {\n    item = events[index];\n\n    if (item.handler.apply(item.context, args) === false) {\n      return false;\n    }\n\n    index += 1;\n  }\n\n  return true;\n};\n\n/**\n * Return whether at least one of the handlers is registered in the given\n *  event name.\n * @param {string} eventName - Custom event name\n * @returns {boolean} Is there at least one handler in event name?\n */\nCustomEvents.prototype.hasListener = function(eventName) {\n  return this.getListenerLength(eventName) > 0;\n};\n\n/**\n * Return a count of events registered.\n * @param {string} eventName - Custom event name\n * @returns {number} number of event\n */\nCustomEvents.prototype.getListenerLength = function(eventName) {\n  var events = this._safeEvent(eventName);\n\n  return events.length;\n};\n\nmodule.exports = CustomEvents;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is existing or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isUndefined = __webpack_require__(1);\nvar isNull = __webpack_require__(15);\n\n/**\n * Check whether the given variable is existing or not.\n * If the given variable is not null and not undefined, returns true.\n * @param {*} param - Target for checking\n * @returns {boolean} Is existy?\n * @memberof module:type\n * @example\n * var isExisty = require('tui-code-snippet/type/isExisty'); // node, commonjs\n *\n * isExisty(''); //true\n * isExisty(0); //true\n * isExisty([]); //true\n * isExisty({}); //true\n * isExisty(null); //false\n * isExisty(undefined); //false\n*/\nfunction isExisty(param) {\n  return !isUndefined(param) && !isNull(param);\n}\n\nmodule.exports = isExisty;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is null or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is null or not.\n * If the given variable(arguments[0]) is null, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is null?\n * @memberof module:type\n */\nfunction isNull(obj) {\n  return obj === null;\n}\n\nmodule.exports = isNull;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is an object or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is an object or not.\n * If the given variable is an object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is object?\n * @memberof module:type\n */\nfunction isObject(obj) {\n  return obj === Object(obj);\n}\n\nmodule.exports = isObject;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Execute the provided callback once for each element present in the array(or Array-like object) in ascending order.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Execute the provided callback once for each element present\n * in the array(or Array-like object) in ascending order.\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n *  1) The value of the element\n *  2) The index of the element\n *  3) The array(or Array-like object) being traversed\n * @param {Array|Arguments|NodeList} arr The array(or Array-like object) that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * var forEachArray = require('tui-code-snippet/collection/forEachArray'); // node, commonjs\n *\n * var sum = 0;\n *\n * forEachArray([1,2,3], function(value){\n *     sum += value;\n * });\n * alert(sum); // 6\n */\nfunction forEachArray(arr, iteratee, context) {\n  var index = 0;\n  var len = arr.length;\n\n  context = context || null;\n\n  for (; index < len; index += 1) {\n    if (iteratee.call(context, arr[index], index, arr) === false) {\n      break;\n    }\n  }\n}\n\nmodule.exports = forEachArray;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Provide a simple inheritance in prototype-oriented.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar createObject = __webpack_require__(19);\n\n/**\n * Provide a simple inheritance in prototype-oriented.\n * Caution :\n *  Don't overwrite the prototype of child constructor.\n *\n * @param {function} subType Child constructor\n * @param {function} superType Parent constructor\n * @memberof module:inheritance\n * @example\n * var inherit = require('tui-code-snippet/inheritance/inherit'); // node, commonjs\n *\n * // Parent constructor\n * function Animal(leg) {\n *     this.leg = leg;\n * }\n * Animal.prototype.growl = function() {\n *     // ...\n * };\n *\n * // Child constructor\n * function Person(name) {\n *     this.name = name;\n * }\n *\n * // Inheritance\n * inherit(Person, Animal);\n *\n * // After this inheritance, please use only the extending of property.\n * // Do not overwrite prototype.\n * Person.prototype.walk = function(direction) {\n *     // ...\n * };\n */\nfunction inherit(subType, superType) {\n  var prototype = createObject(superType.prototype);\n  prototype.constructor = subType;\n  subType.prototype = prototype;\n}\n\nmodule.exports = inherit;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Create a new object with the specified prototype object and properties.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * @module inheritance\n */\n\n/**\n * Create a new object with the specified prototype object and properties.\n * @param {Object} obj This object will be a prototype of the newly-created object.\n * @returns {Object}\n * @memberof module:inheritance\n */\nfunction createObject(obj) {\n  function F() {} // eslint-disable-line require-jsdoc\n  F.prototype = obj;\n\n  return new F();\n}\n\nmodule.exports = createObject;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar forEach = __webpack_require__(3);\nvar defineClass = __webpack_require__(7);\nvar getTarget = __webpack_require__(21);\nvar on = __webpack_require__(22);\nvar preventDefault = __webpack_require__(24);\nvar addClass = __webpack_require__(25);\nvar extend = __webpack_require__(0);\nvar isString = __webpack_require__(4);\nvar isHTMLNode = __webpack_require__(28);\n\nvar util = __webpack_require__(9);\n\nvar defaultTemplate = {\n  page: '<a href=\"#\" class=\"tui-page-btn\">{{page}}</a>',\n  currentPage: '<strong class=\"tui-page-btn tui-is-selected\">{{page}}</strong>',\n  moveButton:\n    '<a href=\"#\" class=\"tui-page-btn tui-{{type}}\">' +\n    '<span class=\"tui-ico-{{type}}\">{{type}}</span>' +\n    '</a>',\n  disabledMoveButton:\n    '<span class=\"tui-page-btn tui-is-disabled tui-{{type}}\">' +\n    '<span class=\"tui-ico-{{type}}\">{{type}}</span>' +\n    '</span>',\n  moreButton:\n    '<a href=\"#\" class=\"tui-page-btn tui-{{type}}-is-ellip\">' +\n    '<span class=\"tui-ico-ellip\">...</span>' +\n    '</a>'\n};\nvar moveButtons = ['first', 'prev', 'next', 'last'];\nvar moreButtons = ['prev', 'next'];\n\nvar INVALID_CONTAINER_ELEMENT = 'The container element is invalid.';\n\n/**\n * Pagination view class\n * @class View\n * @param {string|HTMLElement|jQueryObject} container - Container element or id selector\n * @param {object} options - Option object\n *     @param {number} [options.totalItems=10] Total item count\n *     @param {number} [options.itemsPerPage=10] Item count per page\n *     @param {number} [options.visiblePages=10] Display page link count\n *     @param {number} [options.page=1] Display page after pagination draw.\n *     @param {boolean}[options.centerAlign=false] Whether current page keep center or not\n *     @param {string} [options.firstItemClassName='first-child'] The class name of the first item\n *     @param {string} [options.lastItemClassName='last-child'] The class name of the last item\n *     @param {object} [options.template] A markup string set to make element\n *         @param {string|function} [options.template.page] HTML template\n *         @param {string|function} [options.template.currentPage] HTML template\n *         @param {string|function} [options.template.moveButton] HTML template\n *         @param {string|function} [options.template.disabledMoveButton] HTML template\n *         @param {string|function} [options.template.moreButton] HTML template\n * @param {function} handler - Event handler\n * @ignore\n */\nvar View = defineClass(\n  /** @lends View.prototype */ {\n    init: function(container, options, handler) {\n      /**\n       * Root element\n       * @type {HTMLElement}\n       * @private\n       */\n      this._containerElement = null;\n\n      /**\n       * First item's class name\n       * @type {string}\n       * @private\n       */\n      this._firstItemClassName = options.firstItemClassName;\n\n      /**\n       * Last item's class name\n       * @type {string}\n       * @private\n       */\n      this._lastItemClassName = options.lastItemClassName;\n\n      /**\n       * Default template\n       * @type {object.<string, string|function>}\n       * @private\n       */\n      this._template = extend({}, defaultTemplate, options.template);\n\n      /**\n       * Map of buttons\n       * @type {object.<string, HTMLElement>}\n       * @private\n       */\n      this._buttons = {};\n\n      /**\n       * Enabled page elements list\n       * @type {array}\n       * @private\n       */\n\n      this._enabledPageElements = [];\n\n      this._setRootElement(container);\n      this._setMoveButtons();\n      this._setDisabledMoveButtons();\n      this._setMoreButtons();\n      this._attachClickEvent(handler);\n    },\n    /* eslint-enable complexity */\n\n    /**\n     * Set root element\n     * @param {string|HTMLElement|jQueryObject} container - Container element or id selector\n     * @private\n     */\n    _setRootElement: function(container) {\n      if (isString(container)) {\n        container = document.getElementById(container) || document.querySelector(container);\n      } else if (container.jquery) {\n        container = container[0];\n      }\n\n      if (!isHTMLNode(container)) {\n        throw new Error(INVALID_CONTAINER_ELEMENT);\n      }\n\n      this._containerElement = container;\n    },\n\n    /**\n     * Assign move buttons to option\n     * @private\n     */\n    _setMoveButtons: function() {\n      forEach(\n        moveButtons,\n        function(type) {\n          this._buttons[type] = util.createElementByTemplate(this._template.moveButton, {\n            type: type\n          });\n        },\n        this\n      );\n    },\n\n    /**\n     * Assign disabled move buttons to option\n     * @private\n     */\n    _setDisabledMoveButtons: function() {\n      forEach(\n        moveButtons,\n        function(type) {\n          var key = 'disabled' + util.capitalizeFirstLetter(type);\n          this._buttons[key] = util.createElementByTemplate(this._template.disabledMoveButton, {\n            type: type\n          });\n        },\n        this\n      );\n    },\n\n    /**\n     * Assign more buttons to option\n     * @private\n     */\n    _setMoreButtons: function() {\n      forEach(\n        moreButtons,\n        function(type) {\n          var key = type + 'More';\n          this._buttons[key] = util.createElementByTemplate(this._template.moreButton, {\n            type: type\n          });\n        },\n        this\n      );\n    },\n    /* eslint-enable camelcase */\n\n    /**\n     * Get container element\n     * @returns {HTMLElement} Container element\n     * @private\n     */\n    _getContainerElement: function() {\n      return this._containerElement;\n    },\n\n    /**\n     * Append first button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendFirstButton: function(viewData) {\n      var button;\n\n      if (viewData.page > 1) {\n        button = this._buttons.first;\n      } else {\n        button = this._buttons.disabledFirst;\n      }\n\n      this._getContainerElement().appendChild(button);\n    },\n\n    /**\n     * Append previous button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendPrevButton: function(viewData) {\n      var button;\n\n      if (viewData.currentPageIndex > 1) {\n        button = this._buttons.prev;\n      } else {\n        button = this._buttons.disabledPrev;\n      }\n\n      this._getContainerElement().appendChild(button);\n    },\n\n    /**\n     * Append next button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendNextButton: function(viewData) {\n      var button;\n\n      if (viewData.currentPageIndex < viewData.lastPageListIndex) {\n        button = this._buttons.next;\n      } else {\n        button = this._buttons.disabledNext;\n      }\n\n      this._getContainerElement().appendChild(button);\n    },\n\n    /**\n     * Append last button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendLastButton: function(viewData) {\n      var button;\n\n      if (viewData.page < viewData.lastPage) {\n        button = this._buttons.last;\n      } else {\n        button = this._buttons.disabledLast;\n      }\n\n      this._getContainerElement().appendChild(button);\n    },\n\n    /**\n     * Append previous more button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendPrevMoreButton: function(viewData) {\n      var button;\n\n      if (viewData.prevMore) {\n        button = this._buttons.prevMore;\n        addClass(button, this._firstItemClassName);\n        this._getContainerElement().appendChild(button);\n      }\n    },\n\n    /**\n     * Append next more button on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    _appendNextMoreButton: function(viewData) {\n      var button;\n\n      if (viewData.nextMore) {\n        button = this._buttons.nextMore;\n        addClass(button, this._lastItemClassName);\n        this._getContainerElement().appendChild(button);\n      }\n    },\n\n    /**\n     * Append page number elements on container element\n     * @param {object} viewData - View data to render pagination\n     * @private\n     */\n    // eslint-disable-next-line complexity\n    _appendPages: function(viewData) {\n      var firstPage = viewData.leftPageNumber;\n      var lastPage = viewData.rightPageNumber;\n      var pageItem, i;\n\n      for (i = firstPage; i <= lastPage; i += 1) {\n        if (i === viewData.page) {\n          pageItem = util.createElementByTemplate(this._template.currentPage, { page: i });\n        } else {\n          pageItem = util.createElementByTemplate(this._template.page, { page: i });\n          this._enabledPageElements.push(pageItem);\n        }\n\n        if (i === firstPage && !viewData.prevMore) {\n          addClass(pageItem, this._firstItemClassName);\n        }\n        if (i === lastPage && !viewData.nextMore) {\n          addClass(pageItem, this._lastItemClassName);\n        }\n        this._getContainerElement().appendChild(pageItem);\n      }\n    },\n\n    /**\n     * Attach click event\n     * @param {function} callback - Callback function\n     * @private\n     */\n    _attachClickEvent: function(callback) {\n      var rootElement = this._getContainerElement();\n\n      on(\n        rootElement,\n        'click',\n        function(ev) {\n          var target = getTarget(ev);\n          var page, buttonType;\n\n          preventDefault(ev);\n\n          buttonType = this._getButtonType(target);\n\n          if (!buttonType) {\n            page = this._getPageNumber(target);\n          }\n\n          callback(buttonType, page);\n        },\n        this\n      );\n    },\n\n    /**\n     * Get button type to move button elements\n     * @param {HTMLElement} targetElement - Each move button element\n     * @returns {?string} Button type\n     * @private\n     */\n    _getButtonType: function(targetElement) {\n      var buttonType;\n      var buttons = this._buttons;\n\n      forEach(\n        buttons,\n        function(button, type) {\n          if (util.isContained(targetElement, button)) {\n            buttonType = type;\n\n            return false;\n          }\n\n          return true;\n        },\n        this\n      );\n\n      return buttonType;\n    },\n    /* eslint-enable no-lonely-if */\n\n    /**\n     * Get number to page elements\n     * @param {HTMLElement} targetElement - Each page element\n     * @returns {?number} Page number\n     * @private\n     */\n    _getPageNumber: function(targetElement) {\n      var targetPage = this._findPageElement(targetElement);\n      var page;\n\n      if (targetPage) {\n        page = parseInt(targetPage.innerText, 10);\n      }\n\n      return page;\n    },\n\n    /**\n     * Find target element from page elements\n     * @param {HTMLElement} targetElement - Each page element\n     * @returns {HTMLElement} Found element\n     * @ignore\n     */\n    _findPageElement: function(targetElement) {\n      var i = 0;\n      var length = this._enabledPageElements.length;\n      var pickedItem;\n\n      for (; i < length; i += 1) {\n        pickedItem = this._enabledPageElements[i];\n\n        if (util.isContained(targetElement, pickedItem)) {\n          return pickedItem;\n        }\n      }\n\n      return null;\n    },\n\n    /**\n     * Reset container element\n     * @private\n     */\n    _empty: function() {\n      this._enabledPageElements = [];\n\n      forEach(\n        this._buttons,\n        function(buttonElement, type) {\n          this._buttons[type] = buttonElement.cloneNode(true);\n        },\n        this\n      );\n\n      this._getContainerElement().innerHTML = '';\n    },\n\n    /**\n     * Update view\n     * @param {object} viewData - View data to render pagination\n     * @ignore\n     */\n    update: function(viewData) {\n      this._empty();\n      this._appendFirstButton(viewData);\n      this._appendPrevButton(viewData);\n      this._appendPrevMoreButton(viewData);\n      this._appendPages(viewData);\n      this._appendNextMoreButton(viewData);\n      this._appendNextButton(viewData);\n      this._appendLastButton(viewData);\n    }\n  }\n);\n\nmodule.exports = View;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Get a target element from an event object.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Get a target element from an event object.\n * @param {Event} e - event object\n * @returns {HTMLElement} - target element\n * @memberof module:domEvent\n */\nfunction getTarget(e) {\n  return e.target || e.srcElement;\n}\n\nmodule.exports = getTarget;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Bind DOM events\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isString = __webpack_require__(4);\nvar forEach = __webpack_require__(3);\n\nvar safeEvent = __webpack_require__(23);\n\n/**\n * Bind DOM events.\n * @param {HTMLElement} element - element to bind events\n * @param {(string|object)} types - Space splitted events names or eventName:handler object\n * @param {(function|object)} handler - handler function or context for handler method\n * @param {object} [context] context - context for handler method.\n * @memberof module:domEvent\n * @example\n * var div = document.querySelector('div');\n * \n * // Bind one event to an element.\n * on(div, 'click', toggle);\n * \n * // Bind multiple events with a same handler to multiple elements at once.\n * // Use event names splitted by a space.\n * on(div, 'mouseenter mouseleave', changeColor);\n * \n * // Bind multiple events with different handlers to an element at once.\n * // Use an object which of key is an event name and value is a handler function.\n * on(div, {\n *   keydown: highlight,\n *   keyup: dehighlight\n * });\n * \n * // Set a context for handler method.\n * var name = 'global';\n * var repository = {name: 'CodeSnippet'};\n * on(div, 'drag', function() {\n *  console.log(this.name);\n * }, repository);\n * // Result when you drag a div: \"CodeSnippet\"\n */\nfunction on(element, types, handler, context) {\n  if (isString(types)) {\n    forEach(types.split(/\\s+/g), function(type) {\n      bindEvent(element, type, handler, context);\n    });\n\n    return;\n  }\n\n  forEach(types, function(func, type) {\n    bindEvent(element, type, func, handler);\n  });\n}\n\n/**\n * Bind DOM events\n * @param {HTMLElement} element - element to bind events\n * @param {string} type - events name\n * @param {function} handler - handler function or context for handler method\n * @param {object} [context] context - context for handler method.\n * @private\n */\nfunction bindEvent(element, type, handler, context) {\n  /**\n     * Event handler\n     * @param {Event} e - event object\n     */\n  function eventHandler(e) {\n    handler.call(context || element, e || window.event);\n  }\n\n  if ('addEventListener' in element) {\n    element.addEventListener(type, eventHandler);\n  } else if ('attachEvent' in element) {\n    element.attachEvent('on' + type, eventHandler);\n  }\n  memorizeHandler(element, type, handler, eventHandler);\n}\n\n/**\n * Memorize DOM event handler for unbinding.\n * @param {HTMLElement} element - element to bind events\n * @param {string} type - events name\n * @param {function} handler - handler function that user passed at on() use\n * @param {function} wrappedHandler - handler function that wrapped by domevent for implementing some features\n * @private\n */\nfunction memorizeHandler(element, type, handler, wrappedHandler) {\n  var events = safeEvent(element, type);\n  var existInEvents = false;\n\n  forEach(events, function(obj) {\n    if (obj.handler === handler) {\n      existInEvents = true;\n\n      return false;\n    }\n\n    return true;\n  });\n\n  if (!existInEvents) {\n    events.push({\n      handler: handler,\n      wrappedHandler: wrappedHandler\n    });\n  }\n}\n\nmodule.exports = on;\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Get event collection for specific HTML element\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar EVENT_KEY = '_feEventKey';\n\n/**\n * Get event collection for specific HTML element\n * @param {HTMLElement} element - HTML element\n * @param {string} type - event type\n * @returns {array}\n * @private\n */\nfunction safeEvent(element, type) {\n  var events = element[EVENT_KEY];\n  var handlers;\n\n  if (!events) {\n    events = element[EVENT_KEY] = {};\n  }\n\n  handlers = events[type];\n  if (!handlers) {\n    handlers = events[type] = [];\n  }\n\n  return handlers;\n}\n\nmodule.exports = safeEvent;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Prevent default action\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Prevent default action\n * @param {Event} e - event object\n * @memberof module:domEvent\n */\nfunction preventDefault(e) {\n  if (e.preventDefault) {\n    e.preventDefault();\n\n    return;\n  }\n\n  e.returnValue = false;\n}\n\nmodule.exports = preventDefault;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Add css class to element\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar forEach = __webpack_require__(3);\nvar inArray = __webpack_require__(8);\nvar getClass = __webpack_require__(26);\nvar setClassName = __webpack_require__(27);\n\n/**\n * domUtil module\n * @module domUtil\n */\n\n/**\n * Add css class to element\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {...string} cssClass - css classes to add\n * @memberof module:domUtil\n */\nfunction addClass(element) {\n  var cssClass = Array.prototype.slice.call(arguments, 1);\n  var classList = element.classList;\n  var newClass = [];\n  var origin;\n\n  if (classList) {\n    forEach(cssClass, function(name) {\n      element.classList.add(name);\n    });\n\n    return;\n  }\n\n  origin = getClass(element);\n\n  if (origin) {\n    cssClass = [].concat(origin.split(/\\s+/), cssClass);\n  }\n\n  forEach(cssClass, function(cls) {\n    if (inArray(cls, newClass) < 0) {\n      newClass.push(cls);\n    }\n  });\n\n  setClassName(element, newClass);\n}\n\nmodule.exports = addClass;\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Get HTML element's design classes.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isUndefined = __webpack_require__(1);\n\n/**\n * Get HTML element's design classes.\n * @param {(HTMLElement|SVGElement)} element target element\n * @returns {string} element css class name\n * @memberof module:domUtil\n */\nfunction getClass(element) {\n  if (!element || !element.className) {\n    return '';\n  }\n\n  if (isUndefined(element.className.baseVal)) {\n    return element.className;\n  }\n\n  return element.className.baseVal;\n}\n\nmodule.exports = getClass;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Set className value\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isArray = __webpack_require__(2);\nvar isUndefined = __webpack_require__(1);\n\n/**\n * Set className value\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {(string|string[])} cssClass - class names\n * @private\n */\nfunction setClassName(element, cssClass) {\n  cssClass = isArray(cssClass) ? cssClass.join(' ') : cssClass;\n\n  cssClass = cssClass.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n  if (isUndefined(element.className.baseVal)) {\n    element.className = cssClass;\n\n    return;\n  }\n\n  element.className.baseVal = cssClass;\n}\n\nmodule.exports = setClassName;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Check whether the given variable is a instance of HTMLNode or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\n/**\n * Check whether the given variable is a instance of HTMLNode or not.\n * If the given variables is a instance of HTMLNode, return true.\n * @param {*} html - Target for checking\n * @returns {boolean} Is HTMLNode ?\n * @memberof module:type\n */\nfunction isHTMLNode(html) {\n  if (typeof HTMLElement === 'object') {\n    return (html && (html instanceof HTMLElement || !!html.nodeType));\n  }\n\n  return !!(html && html.nodeType);\n}\n\nmodule.exports = isHTMLNode;\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Convert text by binding expressions with context.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar inArray = __webpack_require__(8);\nvar forEach = __webpack_require__(3);\nvar isArray = __webpack_require__(2);\nvar isString = __webpack_require__(4);\nvar extend = __webpack_require__(0);\n\n// IE8 does not support capture groups.\nvar EXPRESSION_REGEXP = /{{\\s?|\\s?}}/g;\nvar BRACKET_NOTATION_REGEXP = /^[a-zA-Z0-9_@]+\\[[a-zA-Z0-9_@\"']+\\]$/;\nvar BRACKET_REGEXP = /\\[\\s?|\\s?\\]/;\nvar DOT_NOTATION_REGEXP = /^[a-zA-Z_]+\\.[a-zA-Z_]+$/;\nvar DOT_REGEXP = /\\./;\nvar STRING_NOTATION_REGEXP = /^[\"']\\w+[\"']$/;\nvar STRING_REGEXP = /\"|'/g;\nvar NUMBER_REGEXP = /^-?\\d+\\.?\\d*$/;\n\nvar EXPRESSION_INTERVAL = 2;\n\nvar BLOCK_HELPERS = {\n  'if': handleIf,\n  'each': handleEach,\n  'with': handleWith\n};\n\nvar isValidSplit = 'a'.split(/a/).length === 3;\n\n/**\n * Split by RegExp. (Polyfill for IE8)\n * @param {string} text - text to be splitted\\\n * @param {RegExp} regexp - regular expression\n * @returns {Array.<string>}\n */\nvar splitByRegExp = (function() {\n  if (isValidSplit) {\n    return function(text, regexp) {\n      return text.split(regexp);\n    };\n  }\n\n  return function(text, regexp) {\n    var result = [];\n    var prevIndex = 0;\n    var match, index;\n\n    if (!regexp.global) {\n      regexp = new RegExp(regexp, 'g');\n    }\n\n    match = regexp.exec(text);\n    while (match !== null) {\n      index = match.index;\n      result.push(text.slice(prevIndex, index));\n\n      prevIndex = index + match[0].length;\n      match = regexp.exec(text);\n    }\n    result.push(text.slice(prevIndex));\n\n    return result;\n  };\n})();\n\n/**\n * Find value in the context by an expression.\n * @param {string} exp - an expression\n * @param {object} context - context\n * @returns {*}\n * @private\n */\n// eslint-disable-next-line complexity\nfunction getValueFromContext(exp, context) {\n  var splitedExps;\n  var value = context[exp];\n\n  if (exp === 'true') {\n    value = true;\n  } else if (exp === 'false') {\n    value = false;\n  } else if (STRING_NOTATION_REGEXP.test(exp)) {\n    value = exp.replace(STRING_REGEXP, '');\n  } else if (BRACKET_NOTATION_REGEXP.test(exp)) {\n    splitedExps = exp.split(BRACKET_REGEXP);\n    value = getValueFromContext(splitedExps[0], context)[getValueFromContext(splitedExps[1], context)];\n  } else if (DOT_NOTATION_REGEXP.test(exp)) {\n    splitedExps = exp.split(DOT_REGEXP);\n    value = getValueFromContext(splitedExps[0], context)[splitedExps[1]];\n  } else if (NUMBER_REGEXP.test(exp)) {\n    value = parseFloat(exp);\n  }\n\n  return value;\n}\n\n/**\n * Extract elseif and else expressions.\n * @param {Array.<string>} ifExps - args of if expression\n * @param {Array.<string>} sourcesInsideBlock - sources inside if block\n * @returns {object} - exps: expressions of if, elseif, and else / sourcesInsideIf: sources inside if, elseif, and else block.\n * @private\n */\nfunction extractElseif(ifExps, sourcesInsideBlock) {\n  var exps = [ifExps];\n  var sourcesInsideIf = [];\n  var otherIfCount = 0;\n  var start = 0;\n\n  // eslint-disable-next-line complexity\n  forEach(sourcesInsideBlock, function(source, index) {\n    if (source.indexOf('if') === 0) {\n      otherIfCount += 1;\n    } else if (source === '/if') {\n      otherIfCount -= 1;\n    } else if (!otherIfCount && (source.indexOf('elseif') === 0 || source === 'else')) {\n      exps.push(source === 'else' ? ['true'] : source.split(' ').slice(1));\n      sourcesInsideIf.push(sourcesInsideBlock.slice(start, index));\n      start = index + 1;\n    }\n  });\n\n  sourcesInsideIf.push(sourcesInsideBlock.slice(start));\n\n  return {\n    exps: exps,\n    sourcesInsideIf: sourcesInsideIf\n  };\n}\n\n/**\n * Helper function for \"if\". \n * @param {Array.<string>} exps - array of expressions split by spaces\n * @param {Array.<string>} sourcesInsideBlock - array of sources inside the if block\n * @param {object} context - context\n * @returns {string}\n * @private\n */\nfunction handleIf(exps, sourcesInsideBlock, context) {\n  var analyzed = extractElseif(exps, sourcesInsideBlock);\n  var result = false;\n  var compiledSource = '';\n\n  forEach(analyzed.exps, function(exp, index) {\n    result = handleExpression(exp, context);\n    if (result) {\n      compiledSource = compile(analyzed.sourcesInsideIf[index], context);\n    }\n\n    return !result;\n  });\n\n  return compiledSource;\n}\n\n/**\n * Helper function for \"each\".\n * @param {Array.<string>} exps - array of expressions split by spaces\n * @param {Array.<string>} sourcesInsideBlock - array of sources inside the each block\n * @param {object} context - context\n * @returns {string}\n * @private\n */\nfunction handleEach(exps, sourcesInsideBlock, context) {\n  var collection = handleExpression(exps, context);\n  var additionalKey = isArray(collection) ? '@index' : '@key';\n  var additionalContext = {};\n  var result = '';\n\n  forEach(collection, function(item, key) {\n    additionalContext[additionalKey] = key;\n    additionalContext['@this'] = item;\n    extend(context, additionalContext);\n\n    result += compile(sourcesInsideBlock.slice(), context);\n  });\n\n  return result;\n}\n\n/**\n * Helper function for \"with ... as\"\n * @param {Array.<string>} exps - array of expressions split by spaces\n * @param {Array.<string>} sourcesInsideBlock - array of sources inside the with block\n * @param {object} context - context\n * @returns {string}\n * @private\n */\nfunction handleWith(exps, sourcesInsideBlock, context) {\n  var asIndex = inArray('as', exps);\n  var alias = exps[asIndex + 1];\n  var result = handleExpression(exps.slice(0, asIndex), context);\n\n  var additionalContext = {};\n  additionalContext[alias] = result;\n\n  return compile(sourcesInsideBlock, extend(context, additionalContext)) || '';\n}\n\n/**\n * Extract sources inside block in place.\n * @param {Array.<string>} sources - array of sources\n * @param {number} start - index of start block\n * @param {number} end - index of end block\n * @returns {Array.<string>}\n * @private\n */\nfunction extractSourcesInsideBlock(sources, start, end) {\n  var sourcesInsideBlock = sources.splice(start + 1, end - start);\n  sourcesInsideBlock.pop();\n\n  return sourcesInsideBlock;\n}\n\n/**\n * Handle block helper function\n * @param {string} helperKeyword - helper keyword (ex. if, each, with)\n * @param {Array.<string>} sourcesToEnd - array of sources after the starting block\n * @param {object} context - context\n * @returns {Array.<string>}\n * @private\n */\nfunction handleBlockHelper(helperKeyword, sourcesToEnd, context) {\n  var executeBlockHelper = BLOCK_HELPERS[helperKeyword];\n  var helperCount = 1;\n  var startBlockIndex = 0;\n  var endBlockIndex;\n  var index = startBlockIndex + EXPRESSION_INTERVAL;\n  var expression = sourcesToEnd[index];\n\n  while (helperCount && isString(expression)) {\n    if (expression.indexOf(helperKeyword) === 0) {\n      helperCount += 1;\n    } else if (expression.indexOf('/' + helperKeyword) === 0) {\n      helperCount -= 1;\n      endBlockIndex = index;\n    }\n\n    index += EXPRESSION_INTERVAL;\n    expression = sourcesToEnd[index];\n  }\n\n  if (helperCount) {\n    throw Error(helperKeyword + ' needs {{/' + helperKeyword + '}} expression.');\n  }\n\n  sourcesToEnd[startBlockIndex] = executeBlockHelper(\n    sourcesToEnd[startBlockIndex].split(' ').slice(1),\n    extractSourcesInsideBlock(sourcesToEnd, startBlockIndex, endBlockIndex),\n    context\n  );\n\n  return sourcesToEnd;\n}\n\n/**\n * Helper function for \"custom helper\".\n * If helper is not a function, return helper itself.\n * @param {Array.<string>} exps - array of expressions split by spaces (first element: helper)\n * @param {object} context - context\n * @returns {string}\n * @private\n */\nfunction handleExpression(exps, context) {\n  var result = getValueFromContext(exps[0], context);\n\n  if (result instanceof Function) {\n    return executeFunction(result, exps.slice(1), context);\n  }\n\n  return result;\n}\n\n/**\n * Execute a helper function.\n * @param {Function} helper - helper function\n * @param {Array.<string>} argExps - expressions of arguments\n * @param {object} context - context\n * @returns {string} - result of executing the function with arguments\n * @private\n */\nfunction executeFunction(helper, argExps, context) {\n  var args = [];\n  forEach(argExps, function(exp) {\n    args.push(getValueFromContext(exp, context));\n  });\n\n  return helper.apply(null, args);\n}\n\n/**\n * Get a result of compiling an expression with the context.\n * @param {Array.<string>} sources - array of sources split by regexp of expression.\n * @param {object} context - context\n * @returns {Array.<string>} - array of sources that bind with its context\n * @private\n */\nfunction compile(sources, context) {\n  var index = 1;\n  var expression = sources[index];\n  var exps, firstExp, result;\n\n  while (isString(expression)) {\n    exps = expression.split(' ');\n    firstExp = exps[0];\n\n    if (BLOCK_HELPERS[firstExp]) {\n      result = handleBlockHelper(firstExp, sources.splice(index, sources.length - index), context);\n      sources = sources.concat(result);\n    } else {\n      sources[index] = handleExpression(exps, context);\n    }\n\n    index += EXPRESSION_INTERVAL;\n    expression = sources[index];\n  }\n\n  return sources.join('');\n}\n\n/**\n * Convert text by binding expressions with context.\n * <br>\n * If expression exists in the context, it will be replaced.\n * ex) '{{title}}' with context {title: 'Hello!'} is converted to 'Hello!'.\n * An array or object can be accessed using bracket and dot notation.\n * ex) '{{odds\\[2\\]}}' with context {odds: \\[1, 3, 5\\]} is converted to '5'.\n * ex) '{{evens\\[first\\]}}' with context {evens: \\[2, 4\\], first: 0} is converted to '2'.\n * ex) '{{project\\[\"name\"\\]}}' and '{{project.name}}' with context {project: {name: 'CodeSnippet'}} is converted to 'CodeSnippet'.\n * <br>\n * If replaced expression is a function, next expressions will be arguments of the function.\n * ex) '{{add 1 2}}' with context {add: function(a, b) {return a + b;}} is converted to '3'.\n * <br>\n * It has 3 predefined block helpers '{{helper ...}} ... {{/helper}}': 'if', 'each', 'with ... as ...'.\n * 1) 'if' evaluates conditional statements. It can use with 'elseif' and 'else'.\n * 2) 'each' iterates an array or object. It provides '@index'(array), '@key'(object), and '@this'(current element).\n * 3) 'with ... as ...' provides an alias.\n * @param {string} text - text with expressions\n * @param {object} context - context\n * @returns {string} - text that bind with its context\n * @memberof module:domUtil\n * @example\n * var template = require('tui-code-snippet/domUtil/template');\n * \n * var source = \n *     '<h1>'\n *   +   '{{if isValidNumber title}}'\n *   +     '{{title}}th'\n *   +   '{{elseif isValidDate title}}'\n *   +     'Date: {{title}}'\n *   +   '{{/if}}'\n *   + '</h1>'\n *   + '{{each list}}'\n *   +   '{{with addOne @index as idx}}'\n *   +     '<p>{{idx}}: {{@this}}</p>'\n *   +   '{{/with}}'\n *   + '{{/each}}';\n * \n * var context = {\n *   isValidDate: function(text) {\n *     return /^\\d{4}-(0|1)\\d-(0|1|2|3)\\d$/.test(text);\n *   },\n *   isValidNumber: function(text) {\n *     return /^\\d+$/.test(text);\n *   }\n *   title: '2019-11-25',\n *   list: ['Clean the room', 'Wash the dishes'],\n *   addOne: function(num) {\n *     return num + 1;\n *   }\n * };\n * \n * var result = template(source, context);\n * console.log(result); // <h1>Date: 2019-11-25</h1><p>1: Clean the room</p><p>2: Wash the dishes</p>\n */\nfunction template(text, context) {\n  return compile(splitByRegExp(text, EXPRESSION_REGEXP), context);\n}\n\nmodule.exports = template;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Send hostname on DOMContentLoaded.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar isUndefined = __webpack_require__(1);\nvar imagePing = __webpack_require__(31);\n\nvar ms7days = 7 * 24 * 60 * 60 * 1000;\n\n/**\n * Check if the date has passed 7 days\n * @param {number} date - milliseconds\n * @returns {boolean}\n * @private\n */\nfunction isExpired(date) {\n  var now = new Date().getTime();\n\n  return now - date > ms7days;\n}\n\n/**\n * Send hostname on DOMContentLoaded.\n * To prevent hostname set tui.usageStatistics to false.\n * @param {string} appName - application name\n * @param {string} trackingId - GA tracking ID\n * @ignore\n */\nfunction sendHostname(appName, trackingId) {\n  var url = 'https://www.google-analytics.com/collect';\n  var hostname = location.hostname;\n  var hitType = 'event';\n  var eventCategory = 'use';\n  var applicationKeyForStorage = 'TOAST UI ' + appName + ' for ' + hostname + ': Statistics';\n  var date = window.localStorage.getItem(applicationKeyForStorage);\n\n  // skip if the flag is defined and is set to false explicitly\n  if (!isUndefined(window.tui) && window.tui.usageStatistics === false) {\n    return;\n  }\n\n  // skip if not pass seven days old\n  if (date && !isExpired(date)) {\n    return;\n  }\n\n  window.localStorage.setItem(applicationKeyForStorage, new Date().getTime());\n\n  setTimeout(function() {\n    if (document.readyState === 'interactive' || document.readyState === 'complete') {\n      imagePing(url, {\n        v: 1,\n        t: hitType,\n        tid: trackingId,\n        cid: hostname,\n        dp: hostname,\n        dh: appName,\n        el: appName,\n        ec: eventCategory\n      });\n    }\n  }, 1000);\n}\n\nmodule.exports = sendHostname;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * @fileoverview Request image ping.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar forEachOwnProperties = __webpack_require__(6);\n\n/**\n * @module request\n */\n\n/**\n * Request image ping.\n * @param {String} url url for ping request\n * @param {Object} trackingInfo infos for make query string\n * @returns {HTMLElement}\n * @memberof module:request\n * @example\n * var imagePing = require('tui-code-snippet/request/imagePing'); // node, commonjs\n *\n * imagePing('https://www.google-analytics.com/collect', {\n *     v: 1,\n *     t: 'event',\n *     tid: 'trackingid',\n *     cid: 'cid',\n *     dp: 'dp',\n *     dh: 'dh'\n * });\n */\nfunction imagePing(url, trackingInfo) {\n  var trackingElement = document.createElement('img');\n  var queryString = '';\n  forEachOwnProperties(trackingInfo, function(value, key) {\n    queryString += '&' + key + '=' + value;\n  });\n  queryString = queryString.substring(1);\n\n  trackingElement.src = url + '?' + queryString;\n\n  trackingElement.style.display = 'none';\n  document.body.appendChild(trackingElement);\n  document.body.removeChild(trackingElement);\n\n  return trackingElement;\n}\n\nmodule.exports = imagePing;\n\n\n/***/ })\n/******/ ]);\n});\n\n//# sourceURL=webpack://futureBooks/./node_modules/tui-pagination/dist/tui-pagination.js?");

/***/ }),

/***/ "./node_modules/two-product/two-product.js":
/*!*************************************************!*\
  !*** ./node_modules/two-product/two-product.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = twoProduct\n\nvar SPLITTER = +(Math.pow(2, 27) + 1.0)\n\nfunction twoProduct(a, b, result) {\n  var x = a * b\n\n  var c = SPLITTER * a\n  var abig = c - a\n  var ahi = c - abig\n  var alo = a - ahi\n\n  var d = SPLITTER * b\n  var bbig = d - b\n  var bhi = d - bbig\n  var blo = b - bhi\n\n  var err1 = x - (ahi * bhi)\n  var err2 = err1 - (alo * bhi)\n  var err3 = err2 - (ahi * blo)\n\n  var y = alo * blo - err3\n\n  if(result) {\n    result[0] = y\n    result[1] = x\n    return result\n  }\n\n  return [ y, x ]\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/two-product/two-product.js?");

/***/ }),

/***/ "./node_modules/two-sum/two-sum.js":
/*!*****************************************!*\
  !*** ./node_modules/two-sum/two-sum.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = fastTwoSum\n\nfunction fastTwoSum(a, b, result) {\n\tvar x = a + b\n\tvar bv = x - a\n\tvar av = x - bv\n\tvar br = b - bv\n\tvar ar = a - av\n\tif(result) {\n\t\tresult[0] = ar + br\n\t\tresult[1] = x\n\t\treturn result\n\t}\n\treturn [ar+br, x]\n}\n\n//# sourceURL=webpack://futureBooks/./node_modules/two-sum/two-sum.js?");

/***/ }),

/***/ "./node_modules/underscore/modules/_setup.js":
/*!***************************************************!*\
  !*** ./node_modules/underscore/modules/_setup.js ***!
  \***************************************************/
/*! exports provided: VERSION, root, ArrayProto, ObjProto, SymbolProto, push, slice, toString, hasOwnProperty, supportsArrayBuffer, supportsDataView, nativeIsArray, nativeKeys, nativeCreate, nativeIsView, _isNaN, _isFinite, hasEnumBug, nonEnumerableProps, MAX_ARRAY_INDEX */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VERSION\", function() { return VERSION; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"root\", function() { return root; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ArrayProto\", function() { return ArrayProto; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ObjProto\", function() { return ObjProto; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SymbolProto\", function() { return SymbolProto; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"push\", function() { return push; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"slice\", function() { return slice; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toString\", function() { return toString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperty\", function() { return hasOwnProperty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"supportsArrayBuffer\", function() { return supportsArrayBuffer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"supportsDataView\", function() { return supportsDataView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nativeIsArray\", function() { return nativeIsArray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nativeKeys\", function() { return nativeKeys; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nativeCreate\", function() { return nativeCreate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nativeIsView\", function() { return nativeIsView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_isNaN\", function() { return _isNaN; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_isFinite\", function() { return _isFinite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasEnumBug\", function() { return hasEnumBug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nonEnumerableProps\", function() { return nonEnumerableProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MAX_ARRAY_INDEX\", function() { return MAX_ARRAY_INDEX; });\n// Current version.\nvar VERSION = '1.13.3';\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nvar root = (typeof self == 'object' && self.self === self && self) ||\n          (typeof global == 'object' && global.global === global && global) ||\n          Function('return this')() ||\n          {};\n\n// Save bytes in the minified (but not gzipped) version:\nvar ArrayProto = Array.prototype, ObjProto = Object.prototype;\nvar SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nvar push = ArrayProto.push,\n    slice = ArrayProto.slice,\n    toString = ObjProto.toString,\n    hasOwnProperty = ObjProto.hasOwnProperty;\n\n// Modern feature detection.\nvar supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n    supportsDataView = typeof DataView !== 'undefined';\n\n// All **ECMAScript 5+** native function implementations that we hope to use\n// are declared here.\nvar nativeIsArray = Array.isArray,\n    nativeKeys = Object.keys,\n    nativeCreate = Object.create,\n    nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n// Create references to these builtin functions because we override them.\nvar _isNaN = isNaN,\n    _isFinite = isFinite;\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nvar hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n  'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n// The largest integer that can be represented exactly.\nvar MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/underscore/modules/_setup.js?");

/***/ }),

/***/ "./node_modules/underscore/modules/index-all.js":
/*!********************************************************************!*\
  !*** ./node_modules/underscore/modules/index-all.js + 159 modules ***!
  \********************************************************************/
/*! exports provided: default, VERSION, restArguments, isObject, isNull, isUndefined, isBoolean, isElement, isString, isNumber, isDate, isRegExp, isError, isSymbol, isArrayBuffer, isDataView, isArray, isFunction, isArguments, isFinite, isNaN, isTypedArray, isEmpty, isMatch, isEqual, isMap, isWeakMap, isSet, isWeakSet, keys, allKeys, values, pairs, invert, functions, methods, extend, extendOwn, assign, defaults, create, clone, tap, get, has, mapObject, identity, constant, noop, toPath, property, propertyOf, matcher, matches, times, random, now, escape, unescape, templateSettings, template, result, uniqueId, chain, iteratee, partial, bind, bindAll, memoize, delay, defer, throttle, debounce, wrap, negate, compose, after, before, once, findKey, findIndex, findLastIndex, sortedIndex, indexOf, lastIndexOf, find, detect, findWhere, each, forEach, map, collect, reduce, foldl, inject, reduceRight, foldr, filter, select, reject, every, all, some, any, contains, includes, include, invoke, pluck, where, max, min, shuffle, sample, sortBy, groupBy, indexBy, countBy, partition, toArray, size, pick, omit, first, head, take, initial, last, rest, tail, drop, compact, flatten, without, uniq, unique, union, intersection, difference, unzip, transpose, zip, object, range, chunk, mixin */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/underscore/modules/_setup.js (<- Module uses injected variables (global)) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"default\", function() { return /* reexport */ index_default; });\n__webpack_require__.d(__webpack_exports__, \"VERSION\", function() { return /* reexport */ _setup[\"VERSION\"]; });\n__webpack_require__.d(__webpack_exports__, \"restArguments\", function() { return /* reexport */ restArguments; });\n__webpack_require__.d(__webpack_exports__, \"isObject\", function() { return /* reexport */ isObject; });\n__webpack_require__.d(__webpack_exports__, \"isNull\", function() { return /* reexport */ isNull; });\n__webpack_require__.d(__webpack_exports__, \"isUndefined\", function() { return /* reexport */ isUndefined; });\n__webpack_require__.d(__webpack_exports__, \"isBoolean\", function() { return /* reexport */ isBoolean; });\n__webpack_require__.d(__webpack_exports__, \"isElement\", function() { return /* reexport */ isElement; });\n__webpack_require__.d(__webpack_exports__, \"isString\", function() { return /* reexport */ isString; });\n__webpack_require__.d(__webpack_exports__, \"isNumber\", function() { return /* reexport */ isNumber; });\n__webpack_require__.d(__webpack_exports__, \"isDate\", function() { return /* reexport */ isDate; });\n__webpack_require__.d(__webpack_exports__, \"isRegExp\", function() { return /* reexport */ isRegExp; });\n__webpack_require__.d(__webpack_exports__, \"isError\", function() { return /* reexport */ isError; });\n__webpack_require__.d(__webpack_exports__, \"isSymbol\", function() { return /* reexport */ isSymbol; });\n__webpack_require__.d(__webpack_exports__, \"isArrayBuffer\", function() { return /* reexport */ isArrayBuffer; });\n__webpack_require__.d(__webpack_exports__, \"isDataView\", function() { return /* reexport */ modules_isDataView; });\n__webpack_require__.d(__webpack_exports__, \"isArray\", function() { return /* reexport */ isArray; });\n__webpack_require__.d(__webpack_exports__, \"isFunction\", function() { return /* reexport */ modules_isFunction; });\n__webpack_require__.d(__webpack_exports__, \"isArguments\", function() { return /* reexport */ modules_isArguments; });\n__webpack_require__.d(__webpack_exports__, \"isFinite\", function() { return /* reexport */ isFinite_isFinite; });\n__webpack_require__.d(__webpack_exports__, \"isNaN\", function() { return /* reexport */ isNaN_isNaN; });\n__webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return /* reexport */ modules_isTypedArray; });\n__webpack_require__.d(__webpack_exports__, \"isEmpty\", function() { return /* reexport */ isEmpty; });\n__webpack_require__.d(__webpack_exports__, \"isMatch\", function() { return /* reexport */ isMatch; });\n__webpack_require__.d(__webpack_exports__, \"isEqual\", function() { return /* reexport */ isEqual; });\n__webpack_require__.d(__webpack_exports__, \"isMap\", function() { return /* reexport */ isMap; });\n__webpack_require__.d(__webpack_exports__, \"isWeakMap\", function() { return /* reexport */ isWeakMap; });\n__webpack_require__.d(__webpack_exports__, \"isSet\", function() { return /* reexport */ isSet; });\n__webpack_require__.d(__webpack_exports__, \"isWeakSet\", function() { return /* reexport */ isWeakSet; });\n__webpack_require__.d(__webpack_exports__, \"keys\", function() { return /* reexport */ keys_keys; });\n__webpack_require__.d(__webpack_exports__, \"allKeys\", function() { return /* reexport */ allKeys; });\n__webpack_require__.d(__webpack_exports__, \"values\", function() { return /* reexport */ values_values; });\n__webpack_require__.d(__webpack_exports__, \"pairs\", function() { return /* reexport */ pairs_pairs; });\n__webpack_require__.d(__webpack_exports__, \"invert\", function() { return /* reexport */ invert; });\n__webpack_require__.d(__webpack_exports__, \"functions\", function() { return /* reexport */ functions; });\n__webpack_require__.d(__webpack_exports__, \"methods\", function() { return /* reexport */ functions; });\n__webpack_require__.d(__webpack_exports__, \"extend\", function() { return /* reexport */ extend; });\n__webpack_require__.d(__webpack_exports__, \"extendOwn\", function() { return /* reexport */ extendOwn; });\n__webpack_require__.d(__webpack_exports__, \"assign\", function() { return /* reexport */ extendOwn; });\n__webpack_require__.d(__webpack_exports__, \"defaults\", function() { return /* reexport */ defaults; });\n__webpack_require__.d(__webpack_exports__, \"create\", function() { return /* reexport */ create; });\n__webpack_require__.d(__webpack_exports__, \"clone\", function() { return /* reexport */ clone; });\n__webpack_require__.d(__webpack_exports__, \"tap\", function() { return /* reexport */ tap; });\n__webpack_require__.d(__webpack_exports__, \"get\", function() { return /* reexport */ get; });\n__webpack_require__.d(__webpack_exports__, \"has\", function() { return /* reexport */ has_has; });\n__webpack_require__.d(__webpack_exports__, \"mapObject\", function() { return /* reexport */ mapObject; });\n__webpack_require__.d(__webpack_exports__, \"identity\", function() { return /* reexport */ identity; });\n__webpack_require__.d(__webpack_exports__, \"constant\", function() { return /* reexport */ constant; });\n__webpack_require__.d(__webpack_exports__, \"noop\", function() { return /* reexport */ noop; });\n__webpack_require__.d(__webpack_exports__, \"toPath\", function() { return /* reexport */ toPath; });\n__webpack_require__.d(__webpack_exports__, \"property\", function() { return /* reexport */ property; });\n__webpack_require__.d(__webpack_exports__, \"propertyOf\", function() { return /* reexport */ propertyOf; });\n__webpack_require__.d(__webpack_exports__, \"matcher\", function() { return /* reexport */ matcher_matcher; });\n__webpack_require__.d(__webpack_exports__, \"matches\", function() { return /* reexport */ matcher_matcher; });\n__webpack_require__.d(__webpack_exports__, \"times\", function() { return /* reexport */ times; });\n__webpack_require__.d(__webpack_exports__, \"random\", function() { return /* reexport */ random; });\n__webpack_require__.d(__webpack_exports__, \"now\", function() { return /* reexport */ now; });\n__webpack_require__.d(__webpack_exports__, \"escape\", function() { return /* reexport */ modules_escape; });\n__webpack_require__.d(__webpack_exports__, \"unescape\", function() { return /* reexport */ modules_unescape; });\n__webpack_require__.d(__webpack_exports__, \"templateSettings\", function() { return /* reexport */ templateSettings; });\n__webpack_require__.d(__webpack_exports__, \"template\", function() { return /* reexport */ template_template; });\n__webpack_require__.d(__webpack_exports__, \"result\", function() { return /* reexport */ result_result; });\n__webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return /* reexport */ uniqueId; });\n__webpack_require__.d(__webpack_exports__, \"chain\", function() { return /* reexport */ chain; });\n__webpack_require__.d(__webpack_exports__, \"iteratee\", function() { return /* reexport */ iteratee_iteratee; });\n__webpack_require__.d(__webpack_exports__, \"partial\", function() { return /* reexport */ modules_partial; });\n__webpack_require__.d(__webpack_exports__, \"bind\", function() { return /* reexport */ bind; });\n__webpack_require__.d(__webpack_exports__, \"bindAll\", function() { return /* reexport */ bindAll; });\n__webpack_require__.d(__webpack_exports__, \"memoize\", function() { return /* reexport */ memoize_memoize; });\n__webpack_require__.d(__webpack_exports__, \"delay\", function() { return /* reexport */ delay; });\n__webpack_require__.d(__webpack_exports__, \"defer\", function() { return /* reexport */ defer; });\n__webpack_require__.d(__webpack_exports__, \"throttle\", function() { return /* reexport */ throttle; });\n__webpack_require__.d(__webpack_exports__, \"debounce\", function() { return /* reexport */ debounce; });\n__webpack_require__.d(__webpack_exports__, \"wrap\", function() { return /* reexport */ wrap; });\n__webpack_require__.d(__webpack_exports__, \"negate\", function() { return /* reexport */ negate; });\n__webpack_require__.d(__webpack_exports__, \"compose\", function() { return /* reexport */ compose; });\n__webpack_require__.d(__webpack_exports__, \"after\", function() { return /* reexport */ after; });\n__webpack_require__.d(__webpack_exports__, \"before\", function() { return /* reexport */ before; });\n__webpack_require__.d(__webpack_exports__, \"once\", function() { return /* reexport */ once; });\n__webpack_require__.d(__webpack_exports__, \"findKey\", function() { return /* reexport */ findKey; });\n__webpack_require__.d(__webpack_exports__, \"findIndex\", function() { return /* reexport */ findIndex; });\n__webpack_require__.d(__webpack_exports__, \"findLastIndex\", function() { return /* reexport */ findLastIndex; });\n__webpack_require__.d(__webpack_exports__, \"sortedIndex\", function() { return /* reexport */ sortedIndex_sortedIndex; });\n__webpack_require__.d(__webpack_exports__, \"indexOf\", function() { return /* reexport */ indexOf; });\n__webpack_require__.d(__webpack_exports__, \"lastIndexOf\", function() { return /* reexport */ lastIndexOf; });\n__webpack_require__.d(__webpack_exports__, \"find\", function() { return /* reexport */ find; });\n__webpack_require__.d(__webpack_exports__, \"detect\", function() { return /* reexport */ find; });\n__webpack_require__.d(__webpack_exports__, \"findWhere\", function() { return /* reexport */ findWhere; });\n__webpack_require__.d(__webpack_exports__, \"each\", function() { return /* reexport */ each; });\n__webpack_require__.d(__webpack_exports__, \"forEach\", function() { return /* reexport */ each; });\n__webpack_require__.d(__webpack_exports__, \"map\", function() { return /* reexport */ map_map; });\n__webpack_require__.d(__webpack_exports__, \"collect\", function() { return /* reexport */ map_map; });\n__webpack_require__.d(__webpack_exports__, \"reduce\", function() { return /* reexport */ reduce; });\n__webpack_require__.d(__webpack_exports__, \"foldl\", function() { return /* reexport */ reduce; });\n__webpack_require__.d(__webpack_exports__, \"inject\", function() { return /* reexport */ reduce; });\n__webpack_require__.d(__webpack_exports__, \"reduceRight\", function() { return /* reexport */ reduceRight; });\n__webpack_require__.d(__webpack_exports__, \"foldr\", function() { return /* reexport */ reduceRight; });\n__webpack_require__.d(__webpack_exports__, \"filter\", function() { return /* reexport */ filter; });\n__webpack_require__.d(__webpack_exports__, \"select\", function() { return /* reexport */ filter; });\n__webpack_require__.d(__webpack_exports__, \"reject\", function() { return /* reexport */ reject; });\n__webpack_require__.d(__webpack_exports__, \"every\", function() { return /* reexport */ every; });\n__webpack_require__.d(__webpack_exports__, \"all\", function() { return /* reexport */ every; });\n__webpack_require__.d(__webpack_exports__, \"some\", function() { return /* reexport */ some; });\n__webpack_require__.d(__webpack_exports__, \"any\", function() { return /* reexport */ some; });\n__webpack_require__.d(__webpack_exports__, \"contains\", function() { return /* reexport */ contains; });\n__webpack_require__.d(__webpack_exports__, \"includes\", function() { return /* reexport */ contains; });\n__webpack_require__.d(__webpack_exports__, \"include\", function() { return /* reexport */ contains; });\n__webpack_require__.d(__webpack_exports__, \"invoke\", function() { return /* reexport */ invoke; });\n__webpack_require__.d(__webpack_exports__, \"pluck\", function() { return /* reexport */ pluck; });\n__webpack_require__.d(__webpack_exports__, \"where\", function() { return /* reexport */ where; });\n__webpack_require__.d(__webpack_exports__, \"max\", function() { return /* reexport */ max; });\n__webpack_require__.d(__webpack_exports__, \"min\", function() { return /* reexport */ min; });\n__webpack_require__.d(__webpack_exports__, \"shuffle\", function() { return /* reexport */ shuffle; });\n__webpack_require__.d(__webpack_exports__, \"sample\", function() { return /* reexport */ sample_sample; });\n__webpack_require__.d(__webpack_exports__, \"sortBy\", function() { return /* reexport */ sortBy; });\n__webpack_require__.d(__webpack_exports__, \"groupBy\", function() { return /* reexport */ groupBy; });\n__webpack_require__.d(__webpack_exports__, \"indexBy\", function() { return /* reexport */ indexBy; });\n__webpack_require__.d(__webpack_exports__, \"countBy\", function() { return /* reexport */ countBy; });\n__webpack_require__.d(__webpack_exports__, \"partition\", function() { return /* reexport */ modules_partition; });\n__webpack_require__.d(__webpack_exports__, \"toArray\", function() { return /* reexport */ toArray; });\n__webpack_require__.d(__webpack_exports__, \"size\", function() { return /* reexport */ size; });\n__webpack_require__.d(__webpack_exports__, \"pick\", function() { return /* reexport */ pick; });\n__webpack_require__.d(__webpack_exports__, \"omit\", function() { return /* reexport */ omit; });\n__webpack_require__.d(__webpack_exports__, \"first\", function() { return /* reexport */ first; });\n__webpack_require__.d(__webpack_exports__, \"head\", function() { return /* reexport */ first; });\n__webpack_require__.d(__webpack_exports__, \"take\", function() { return /* reexport */ first; });\n__webpack_require__.d(__webpack_exports__, \"initial\", function() { return /* reexport */ initial_initial; });\n__webpack_require__.d(__webpack_exports__, \"last\", function() { return /* reexport */ last_last; });\n__webpack_require__.d(__webpack_exports__, \"rest\", function() { return /* reexport */ rest_rest; });\n__webpack_require__.d(__webpack_exports__, \"tail\", function() { return /* reexport */ rest_rest; });\n__webpack_require__.d(__webpack_exports__, \"drop\", function() { return /* reexport */ rest_rest; });\n__webpack_require__.d(__webpack_exports__, \"compact\", function() { return /* reexport */ compact; });\n__webpack_require__.d(__webpack_exports__, \"flatten\", function() { return /* reexport */ flatten_flatten; });\n__webpack_require__.d(__webpack_exports__, \"without\", function() { return /* reexport */ without; });\n__webpack_require__.d(__webpack_exports__, \"uniq\", function() { return /* reexport */ uniq; });\n__webpack_require__.d(__webpack_exports__, \"unique\", function() { return /* reexport */ uniq; });\n__webpack_require__.d(__webpack_exports__, \"union\", function() { return /* reexport */ union; });\n__webpack_require__.d(__webpack_exports__, \"intersection\", function() { return /* reexport */ intersection; });\n__webpack_require__.d(__webpack_exports__, \"difference\", function() { return /* reexport */ difference; });\n__webpack_require__.d(__webpack_exports__, \"unzip\", function() { return /* reexport */ unzip; });\n__webpack_require__.d(__webpack_exports__, \"transpose\", function() { return /* reexport */ unzip; });\n__webpack_require__.d(__webpack_exports__, \"zip\", function() { return /* reexport */ zip; });\n__webpack_require__.d(__webpack_exports__, \"object\", function() { return /* reexport */ object_object; });\n__webpack_require__.d(__webpack_exports__, \"range\", function() { return /* reexport */ range; });\n__webpack_require__.d(__webpack_exports__, \"chunk\", function() { return /* reexport */ chunk; });\n__webpack_require__.d(__webpack_exports__, \"mixin\", function() { return /* reexport */ mixin; });\n\n// NAMESPACE OBJECT: ./node_modules/underscore/modules/index.js\nvar modules_namespaceObject = {};\n__webpack_require__.r(modules_namespaceObject);\n__webpack_require__.d(modules_namespaceObject, \"VERSION\", function() { return _setup[\"VERSION\"]; });\n__webpack_require__.d(modules_namespaceObject, \"restArguments\", function() { return restArguments; });\n__webpack_require__.d(modules_namespaceObject, \"isObject\", function() { return isObject; });\n__webpack_require__.d(modules_namespaceObject, \"isNull\", function() { return isNull; });\n__webpack_require__.d(modules_namespaceObject, \"isUndefined\", function() { return isUndefined; });\n__webpack_require__.d(modules_namespaceObject, \"isBoolean\", function() { return isBoolean; });\n__webpack_require__.d(modules_namespaceObject, \"isElement\", function() { return isElement; });\n__webpack_require__.d(modules_namespaceObject, \"isString\", function() { return isString; });\n__webpack_require__.d(modules_namespaceObject, \"isNumber\", function() { return isNumber; });\n__webpack_require__.d(modules_namespaceObject, \"isDate\", function() { return isDate; });\n__webpack_require__.d(modules_namespaceObject, \"isRegExp\", function() { return isRegExp; });\n__webpack_require__.d(modules_namespaceObject, \"isError\", function() { return isError; });\n__webpack_require__.d(modules_namespaceObject, \"isSymbol\", function() { return isSymbol; });\n__webpack_require__.d(modules_namespaceObject, \"isArrayBuffer\", function() { return isArrayBuffer; });\n__webpack_require__.d(modules_namespaceObject, \"isDataView\", function() { return modules_isDataView; });\n__webpack_require__.d(modules_namespaceObject, \"isArray\", function() { return isArray; });\n__webpack_require__.d(modules_namespaceObject, \"isFunction\", function() { return modules_isFunction; });\n__webpack_require__.d(modules_namespaceObject, \"isArguments\", function() { return modules_isArguments; });\n__webpack_require__.d(modules_namespaceObject, \"isFinite\", function() { return isFinite_isFinite; });\n__webpack_require__.d(modules_namespaceObject, \"isNaN\", function() { return isNaN_isNaN; });\n__webpack_require__.d(modules_namespaceObject, \"isTypedArray\", function() { return modules_isTypedArray; });\n__webpack_require__.d(modules_namespaceObject, \"isEmpty\", function() { return isEmpty; });\n__webpack_require__.d(modules_namespaceObject, \"isMatch\", function() { return isMatch; });\n__webpack_require__.d(modules_namespaceObject, \"isEqual\", function() { return isEqual; });\n__webpack_require__.d(modules_namespaceObject, \"isMap\", function() { return isMap; });\n__webpack_require__.d(modules_namespaceObject, \"isWeakMap\", function() { return isWeakMap; });\n__webpack_require__.d(modules_namespaceObject, \"isSet\", function() { return isSet; });\n__webpack_require__.d(modules_namespaceObject, \"isWeakSet\", function() { return isWeakSet; });\n__webpack_require__.d(modules_namespaceObject, \"keys\", function() { return keys_keys; });\n__webpack_require__.d(modules_namespaceObject, \"allKeys\", function() { return allKeys; });\n__webpack_require__.d(modules_namespaceObject, \"values\", function() { return values_values; });\n__webpack_require__.d(modules_namespaceObject, \"pairs\", function() { return pairs_pairs; });\n__webpack_require__.d(modules_namespaceObject, \"invert\", function() { return invert; });\n__webpack_require__.d(modules_namespaceObject, \"functions\", function() { return functions; });\n__webpack_require__.d(modules_namespaceObject, \"methods\", function() { return functions; });\n__webpack_require__.d(modules_namespaceObject, \"extend\", function() { return extend; });\n__webpack_require__.d(modules_namespaceObject, \"extendOwn\", function() { return extendOwn; });\n__webpack_require__.d(modules_namespaceObject, \"assign\", function() { return extendOwn; });\n__webpack_require__.d(modules_namespaceObject, \"defaults\", function() { return defaults; });\n__webpack_require__.d(modules_namespaceObject, \"create\", function() { return create; });\n__webpack_require__.d(modules_namespaceObject, \"clone\", function() { return clone; });\n__webpack_require__.d(modules_namespaceObject, \"tap\", function() { return tap; });\n__webpack_require__.d(modules_namespaceObject, \"get\", function() { return get; });\n__webpack_require__.d(modules_namespaceObject, \"has\", function() { return has_has; });\n__webpack_require__.d(modules_namespaceObject, \"mapObject\", function() { return mapObject; });\n__webpack_require__.d(modules_namespaceObject, \"identity\", function() { return identity; });\n__webpack_require__.d(modules_namespaceObject, \"constant\", function() { return constant; });\n__webpack_require__.d(modules_namespaceObject, \"noop\", function() { return noop; });\n__webpack_require__.d(modules_namespaceObject, \"toPath\", function() { return toPath; });\n__webpack_require__.d(modules_namespaceObject, \"property\", function() { return property; });\n__webpack_require__.d(modules_namespaceObject, \"propertyOf\", function() { return propertyOf; });\n__webpack_require__.d(modules_namespaceObject, \"matcher\", function() { return matcher_matcher; });\n__webpack_require__.d(modules_namespaceObject, \"matches\", function() { return matcher_matcher; });\n__webpack_require__.d(modules_namespaceObject, \"times\", function() { return times; });\n__webpack_require__.d(modules_namespaceObject, \"random\", function() { return random; });\n__webpack_require__.d(modules_namespaceObject, \"now\", function() { return now; });\n__webpack_require__.d(modules_namespaceObject, \"escape\", function() { return modules_escape; });\n__webpack_require__.d(modules_namespaceObject, \"unescape\", function() { return modules_unescape; });\n__webpack_require__.d(modules_namespaceObject, \"templateSettings\", function() { return templateSettings; });\n__webpack_require__.d(modules_namespaceObject, \"template\", function() { return template_template; });\n__webpack_require__.d(modules_namespaceObject, \"result\", function() { return result_result; });\n__webpack_require__.d(modules_namespaceObject, \"uniqueId\", function() { return uniqueId; });\n__webpack_require__.d(modules_namespaceObject, \"chain\", function() { return chain; });\n__webpack_require__.d(modules_namespaceObject, \"iteratee\", function() { return iteratee_iteratee; });\n__webpack_require__.d(modules_namespaceObject, \"partial\", function() { return modules_partial; });\n__webpack_require__.d(modules_namespaceObject, \"bind\", function() { return bind; });\n__webpack_require__.d(modules_namespaceObject, \"bindAll\", function() { return bindAll; });\n__webpack_require__.d(modules_namespaceObject, \"memoize\", function() { return memoize_memoize; });\n__webpack_require__.d(modules_namespaceObject, \"delay\", function() { return delay; });\n__webpack_require__.d(modules_namespaceObject, \"defer\", function() { return defer; });\n__webpack_require__.d(modules_namespaceObject, \"throttle\", function() { return throttle; });\n__webpack_require__.d(modules_namespaceObject, \"debounce\", function() { return debounce; });\n__webpack_require__.d(modules_namespaceObject, \"wrap\", function() { return wrap; });\n__webpack_require__.d(modules_namespaceObject, \"negate\", function() { return negate; });\n__webpack_require__.d(modules_namespaceObject, \"compose\", function() { return compose; });\n__webpack_require__.d(modules_namespaceObject, \"after\", function() { return after; });\n__webpack_require__.d(modules_namespaceObject, \"before\", function() { return before; });\n__webpack_require__.d(modules_namespaceObject, \"once\", function() { return once; });\n__webpack_require__.d(modules_namespaceObject, \"findKey\", function() { return findKey; });\n__webpack_require__.d(modules_namespaceObject, \"findIndex\", function() { return findIndex; });\n__webpack_require__.d(modules_namespaceObject, \"findLastIndex\", function() { return findLastIndex; });\n__webpack_require__.d(modules_namespaceObject, \"sortedIndex\", function() { return sortedIndex_sortedIndex; });\n__webpack_require__.d(modules_namespaceObject, \"indexOf\", function() { return indexOf; });\n__webpack_require__.d(modules_namespaceObject, \"lastIndexOf\", function() { return lastIndexOf; });\n__webpack_require__.d(modules_namespaceObject, \"find\", function() { return find; });\n__webpack_require__.d(modules_namespaceObject, \"detect\", function() { return find; });\n__webpack_require__.d(modules_namespaceObject, \"findWhere\", function() { return findWhere; });\n__webpack_require__.d(modules_namespaceObject, \"each\", function() { return each; });\n__webpack_require__.d(modules_namespaceObject, \"forEach\", function() { return each; });\n__webpack_require__.d(modules_namespaceObject, \"map\", function() { return map_map; });\n__webpack_require__.d(modules_namespaceObject, \"collect\", function() { return map_map; });\n__webpack_require__.d(modules_namespaceObject, \"reduce\", function() { return reduce; });\n__webpack_require__.d(modules_namespaceObject, \"foldl\", function() { return reduce; });\n__webpack_require__.d(modules_namespaceObject, \"inject\", function() { return reduce; });\n__webpack_require__.d(modules_namespaceObject, \"reduceRight\", function() { return reduceRight; });\n__webpack_require__.d(modules_namespaceObject, \"foldr\", function() { return reduceRight; });\n__webpack_require__.d(modules_namespaceObject, \"filter\", function() { return filter; });\n__webpack_require__.d(modules_namespaceObject, \"select\", function() { return filter; });\n__webpack_require__.d(modules_namespaceObject, \"reject\", function() { return reject; });\n__webpack_require__.d(modules_namespaceObject, \"every\", function() { return every; });\n__webpack_require__.d(modules_namespaceObject, \"all\", function() { return every; });\n__webpack_require__.d(modules_namespaceObject, \"some\", function() { return some; });\n__webpack_require__.d(modules_namespaceObject, \"any\", function() { return some; });\n__webpack_require__.d(modules_namespaceObject, \"contains\", function() { return contains; });\n__webpack_require__.d(modules_namespaceObject, \"includes\", function() { return contains; });\n__webpack_require__.d(modules_namespaceObject, \"include\", function() { return contains; });\n__webpack_require__.d(modules_namespaceObject, \"invoke\", function() { return invoke; });\n__webpack_require__.d(modules_namespaceObject, \"pluck\", function() { return pluck; });\n__webpack_require__.d(modules_namespaceObject, \"where\", function() { return where; });\n__webpack_require__.d(modules_namespaceObject, \"max\", function() { return max; });\n__webpack_require__.d(modules_namespaceObject, \"min\", function() { return min; });\n__webpack_require__.d(modules_namespaceObject, \"shuffle\", function() { return shuffle; });\n__webpack_require__.d(modules_namespaceObject, \"sample\", function() { return sample_sample; });\n__webpack_require__.d(modules_namespaceObject, \"sortBy\", function() { return sortBy; });\n__webpack_require__.d(modules_namespaceObject, \"groupBy\", function() { return groupBy; });\n__webpack_require__.d(modules_namespaceObject, \"indexBy\", function() { return indexBy; });\n__webpack_require__.d(modules_namespaceObject, \"countBy\", function() { return countBy; });\n__webpack_require__.d(modules_namespaceObject, \"partition\", function() { return modules_partition; });\n__webpack_require__.d(modules_namespaceObject, \"toArray\", function() { return toArray; });\n__webpack_require__.d(modules_namespaceObject, \"size\", function() { return size; });\n__webpack_require__.d(modules_namespaceObject, \"pick\", function() { return pick; });\n__webpack_require__.d(modules_namespaceObject, \"omit\", function() { return omit; });\n__webpack_require__.d(modules_namespaceObject, \"first\", function() { return first; });\n__webpack_require__.d(modules_namespaceObject, \"head\", function() { return first; });\n__webpack_require__.d(modules_namespaceObject, \"take\", function() { return first; });\n__webpack_require__.d(modules_namespaceObject, \"initial\", function() { return initial_initial; });\n__webpack_require__.d(modules_namespaceObject, \"last\", function() { return last_last; });\n__webpack_require__.d(modules_namespaceObject, \"rest\", function() { return rest_rest; });\n__webpack_require__.d(modules_namespaceObject, \"tail\", function() { return rest_rest; });\n__webpack_require__.d(modules_namespaceObject, \"drop\", function() { return rest_rest; });\n__webpack_require__.d(modules_namespaceObject, \"compact\", function() { return compact; });\n__webpack_require__.d(modules_namespaceObject, \"flatten\", function() { return flatten_flatten; });\n__webpack_require__.d(modules_namespaceObject, \"without\", function() { return without; });\n__webpack_require__.d(modules_namespaceObject, \"uniq\", function() { return uniq; });\n__webpack_require__.d(modules_namespaceObject, \"unique\", function() { return uniq; });\n__webpack_require__.d(modules_namespaceObject, \"union\", function() { return union; });\n__webpack_require__.d(modules_namespaceObject, \"intersection\", function() { return intersection; });\n__webpack_require__.d(modules_namespaceObject, \"difference\", function() { return difference; });\n__webpack_require__.d(modules_namespaceObject, \"unzip\", function() { return unzip; });\n__webpack_require__.d(modules_namespaceObject, \"transpose\", function() { return unzip; });\n__webpack_require__.d(modules_namespaceObject, \"zip\", function() { return zip; });\n__webpack_require__.d(modules_namespaceObject, \"object\", function() { return object_object; });\n__webpack_require__.d(modules_namespaceObject, \"range\", function() { return range; });\n__webpack_require__.d(modules_namespaceObject, \"chunk\", function() { return chunk; });\n__webpack_require__.d(modules_namespaceObject, \"mixin\", function() { return mixin; });\n__webpack_require__.d(modules_namespaceObject, \"default\", function() { return underscore_array_methods; });\n\n// EXTERNAL MODULE: ./node_modules/underscore/modules/_setup.js\nvar _setup = __webpack_require__(\"./node_modules/underscore/modules/_setup.js\");\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/restArguments.js\n// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nfunction restArguments(func, startIndex) {\n  startIndex = startIndex == null ? func.length - 1 : +startIndex;\n  return function() {\n    var length = Math.max(arguments.length - startIndex, 0),\n        rest = Array(length),\n        index = 0;\n    for (; index < length; index++) {\n      rest[index] = arguments[index + startIndex];\n    }\n    switch (startIndex) {\n      case 0: return func.call(this, rest);\n      case 1: return func.call(this, arguments[0], rest);\n      case 2: return func.call(this, arguments[0], arguments[1], rest);\n    }\n    var args = Array(startIndex + 1);\n    for (index = 0; index < startIndex; index++) {\n      args[index] = arguments[index];\n    }\n    args[startIndex] = rest;\n    return func.apply(this, args);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isObject.js\n// Is a given variable an object?\nfunction isObject(obj) {\n  var type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isNull.js\n// Is a given value equal to null?\nfunction isNull(obj) {\n  return obj === null;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isUndefined.js\n// Is a given variable undefined?\nfunction isUndefined(obj) {\n  return obj === void 0;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isBoolean.js\n\n\n// Is a given value a boolean?\nfunction isBoolean(obj) {\n  return obj === true || obj === false || _setup[\"toString\"].call(obj) === '[object Boolean]';\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isElement.js\n// Is a given value a DOM element?\nfunction isElement(obj) {\n  return !!(obj && obj.nodeType === 1);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_tagTester.js\n\n\n// Internal function for creating a `toString`-based type tester.\nfunction tagTester(name) {\n  var tag = '[object ' + name + ']';\n  return function(obj) {\n    return _setup[\"toString\"].call(obj) === tag;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isString.js\n\n\n/* harmony default export */ var isString = (tagTester('String'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isNumber.js\n\n\n/* harmony default export */ var isNumber = (tagTester('Number'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isDate.js\n\n\n/* harmony default export */ var isDate = (tagTester('Date'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isRegExp.js\n\n\n/* harmony default export */ var isRegExp = (tagTester('RegExp'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isError.js\n\n\n/* harmony default export */ var isError = (tagTester('Error'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isSymbol.js\n\n\n/* harmony default export */ var isSymbol = (tagTester('Symbol'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isArrayBuffer.js\n\n\n/* harmony default export */ var isArrayBuffer = (tagTester('ArrayBuffer'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isFunction.js\n\n\n\nvar isFunction = tagTester('Function');\n\n// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = _setup[\"root\"].document && _setup[\"root\"].document.childNodes;\nif ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n  isFunction = function(obj) {\n    return typeof obj == 'function' || false;\n  };\n}\n\n/* harmony default export */ var modules_isFunction = (isFunction);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_hasObjectTag.js\n\n\n/* harmony default export */ var _hasObjectTag = (tagTester('Object'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_stringTagBug.js\n\n\n\n// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n// In IE 11, the most common among them, this problem also applies to\n// `Map`, `WeakMap` and `Set`.\nvar hasStringTagBug = (\n      _setup[\"supportsDataView\"] && _hasObjectTag(new DataView(new ArrayBuffer(8)))\n    ),\n    isIE11 = (typeof Map !== 'undefined' && _hasObjectTag(new Map));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isDataView.js\n\n\n\n\n\nvar isDataView = tagTester('DataView');\n\n// In IE 10 - Edge 13, we need a different heuristic\n// to determine whether an object is a `DataView`.\nfunction ie10IsDataView(obj) {\n  return obj != null && modules_isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);\n}\n\n/* harmony default export */ var modules_isDataView = (hasStringTagBug ? ie10IsDataView : isDataView);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isArray.js\n\n\n\n// Is a given value an array?\n// Delegates to ECMA5's native `Array.isArray`.\n/* harmony default export */ var isArray = (_setup[\"nativeIsArray\"] || tagTester('Array'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_has.js\n\n\n// Internal function to check whether `key` is an own property name of `obj`.\nfunction has(obj, key) {\n  return obj != null && _setup[\"hasOwnProperty\"].call(obj, key);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isArguments.js\n\n\n\nvar isArguments = tagTester('Arguments');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n  if (!isArguments(arguments)) {\n    isArguments = function(obj) {\n      return has(obj, 'callee');\n    };\n  }\n}());\n\n/* harmony default export */ var modules_isArguments = (isArguments);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isFinite.js\n\n\n\n// Is a given object a finite number?\nfunction isFinite_isFinite(obj) {\n  return !isSymbol(obj) && Object(_setup[\"_isFinite\"])(obj) && !isNaN(parseFloat(obj));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isNaN.js\n\n\n\n// Is the given value `NaN`?\nfunction isNaN_isNaN(obj) {\n  return isNumber(obj) && Object(_setup[\"_isNaN\"])(obj);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/constant.js\n// Predicate-generating function. Often useful outside of Underscore.\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createSizePropertyCheck.js\n\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nfunction createSizePropertyCheck(getSizeProperty) {\n  return function(collection) {\n    var sizeProperty = getSizeProperty(collection);\n    return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= _setup[\"MAX_ARRAY_INDEX\"];\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_shallowProperty.js\n// Internal helper to generate a function to obtain property `key` from `obj`.\nfunction shallowProperty(key) {\n  return function(obj) {\n    return obj == null ? void 0 : obj[key];\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_getByteLength.js\n\n\n// Internal helper to obtain the `byteLength` property of an object.\n/* harmony default export */ var _getByteLength = (shallowProperty('byteLength'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_isBufferLike.js\n\n\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\n/* harmony default export */ var _isBufferLike = (createSizePropertyCheck(_getByteLength));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isTypedArray.js\n\n\n\n\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n  // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n  // Otherwise, fall back on the above regular expression.\n  return _setup[\"nativeIsView\"] ? (Object(_setup[\"nativeIsView\"])(obj) && !modules_isDataView(obj)) :\n                _isBufferLike(obj) && typedArrayPattern.test(_setup[\"toString\"].call(obj));\n}\n\n/* harmony default export */ var modules_isTypedArray = (_setup[\"supportsArrayBuffer\"] ? isTypedArray : constant(false));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_getLength.js\n\n\n// Internal helper to obtain the `length` property of an object.\n/* harmony default export */ var _getLength = (shallowProperty('length'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_collectNonEnumProps.js\n\n\n\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n  var hash = {};\n  for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n  return {\n    contains: function(key) { return hash[key] === true; },\n    push: function(key) {\n      hash[key] = true;\n      return keys.push(key);\n    }\n  };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nfunction collectNonEnumProps(obj, keys) {\n  keys = emulatedSet(keys);\n  var nonEnumIdx = _setup[\"nonEnumerableProps\"].length;\n  var constructor = obj.constructor;\n  var proto = (modules_isFunction(constructor) && constructor.prototype) || _setup[\"ObjProto\"];\n\n  // Constructor is a special case.\n  var prop = 'constructor';\n  if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n  while (nonEnumIdx--) {\n    prop = _setup[\"nonEnumerableProps\"][nonEnumIdx];\n    if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n      keys.push(prop);\n    }\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/keys.js\n\n\n\n\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nfunction keys_keys(obj) {\n  if (!isObject(obj)) return [];\n  if (_setup[\"nativeKeys\"]) return Object(_setup[\"nativeKeys\"])(obj);\n  var keys = [];\n  for (var key in obj) if (has(obj, key)) keys.push(key);\n  // Ahem, IE < 9.\n  if (_setup[\"hasEnumBug\"]) collectNonEnumProps(obj, keys);\n  return keys;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isEmpty.js\n\n\n\n\n\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nfunction isEmpty(obj) {\n  if (obj == null) return true;\n  // Skip the more expensive `toString`-based type checks if `obj` has no\n  // `.length`.\n  var length = _getLength(obj);\n  if (typeof length == 'number' && (\n    isArray(obj) || isString(obj) || modules_isArguments(obj)\n  )) return length === 0;\n  return _getLength(keys_keys(obj)) === 0;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isMatch.js\n\n\n// Returns whether an object has a given set of `key:value` pairs.\nfunction isMatch(object, attrs) {\n  var _keys = keys_keys(attrs), length = _keys.length;\n  if (object == null) return !length;\n  var obj = Object(object);\n  for (var i = 0; i < length; i++) {\n    var key = _keys[i];\n    if (attrs[key] !== obj[key] || !(key in obj)) return false;\n  }\n  return true;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/underscore.js\n\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nfunction _(obj) {\n  if (obj instanceof _) return obj;\n  if (!(this instanceof _)) return new _(obj);\n  this._wrapped = obj;\n}\n\n_.VERSION = _setup[\"VERSION\"];\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n  return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n  return String(this._wrapped);\n};\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_toBufferView.js\n\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nfunction toBufferView(bufferSource) {\n  return new Uint8Array(\n    bufferSource.buffer || bufferSource,\n    bufferSource.byteOffset || 0,\n    _getByteLength(bufferSource)\n  );\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isEqual.js\n\n\n\n\n\n\n\n\n\n\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n  // Identical objects are equal. `0 === -0`, but they aren't identical.\n  // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n  if (a === b) return a !== 0 || 1 / a === 1 / b;\n  // `null` or `undefined` only equal to itself (strict comparison).\n  if (a == null || b == null) return false;\n  // `NaN`s are equivalent, but non-reflexive.\n  if (a !== a) return b !== b;\n  // Exhaust primitive checks\n  var type = typeof a;\n  if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n  return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n  // Unwrap any wrapped objects.\n  if (a instanceof _) a = a._wrapped;\n  if (b instanceof _) b = b._wrapped;\n  // Compare `[[Class]]` names.\n  var className = _setup[\"toString\"].call(a);\n  if (className !== _setup[\"toString\"].call(b)) return false;\n  // Work around a bug in IE 10 - Edge 13.\n  if (hasStringTagBug && className == '[object Object]' && modules_isDataView(a)) {\n    if (!modules_isDataView(b)) return false;\n    className = tagDataView;\n  }\n  switch (className) {\n    // These types are compared by value.\n    case '[object RegExp]':\n      // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n    case '[object String]':\n      // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n      // equivalent to `new String(\"5\")`.\n      return '' + a === '' + b;\n    case '[object Number]':\n      // `NaN`s are equivalent, but non-reflexive.\n      // Object(NaN) is equivalent to NaN.\n      if (+a !== +a) return +b !== +b;\n      // An `egal` comparison is performed for other numeric values.\n      return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n    case '[object Date]':\n    case '[object Boolean]':\n      // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n      // millisecond representations. Note that invalid dates with millisecond representations\n      // of `NaN` are not equivalent.\n      return +a === +b;\n    case '[object Symbol]':\n      return _setup[\"SymbolProto\"].valueOf.call(a) === _setup[\"SymbolProto\"].valueOf.call(b);\n    case '[object ArrayBuffer]':\n    case tagDataView:\n      // Coerce to typed array so we can fall through.\n      return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n  }\n\n  var areArrays = className === '[object Array]';\n  if (!areArrays && modules_isTypedArray(a)) {\n      var byteLength = _getByteLength(a);\n      if (byteLength !== _getByteLength(b)) return false;\n      if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n      areArrays = true;\n  }\n  if (!areArrays) {\n    if (typeof a != 'object' || typeof b != 'object') return false;\n\n    // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n    // from different frames are.\n    var aCtor = a.constructor, bCtor = b.constructor;\n    if (aCtor !== bCtor && !(modules_isFunction(aCtor) && aCtor instanceof aCtor &&\n                             modules_isFunction(bCtor) && bCtor instanceof bCtor)\n                        && ('constructor' in a && 'constructor' in b)) {\n      return false;\n    }\n  }\n  // Assume equality for cyclic structures. The algorithm for detecting cyclic\n  // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n  // Initializing stack of traversed objects.\n  // It's done here since we only need them for objects and arrays comparison.\n  aStack = aStack || [];\n  bStack = bStack || [];\n  var length = aStack.length;\n  while (length--) {\n    // Linear search. Performance is inversely proportional to the number of\n    // unique nested structures.\n    if (aStack[length] === a) return bStack[length] === b;\n  }\n\n  // Add the first object to the stack of traversed objects.\n  aStack.push(a);\n  bStack.push(b);\n\n  // Recursively compare objects and arrays.\n  if (areArrays) {\n    // Compare array lengths to determine if a deep comparison is necessary.\n    length = a.length;\n    if (length !== b.length) return false;\n    // Deep compare the contents, ignoring non-numeric properties.\n    while (length--) {\n      if (!eq(a[length], b[length], aStack, bStack)) return false;\n    }\n  } else {\n    // Deep compare objects.\n    var _keys = keys_keys(a), key;\n    length = _keys.length;\n    // Ensure that both objects contain the same number of properties before comparing deep equality.\n    if (keys_keys(b).length !== length) return false;\n    while (length--) {\n      // Deep compare each member\n      key = _keys[length];\n      if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n    }\n  }\n  // Remove the first object from the stack of traversed objects.\n  aStack.pop();\n  bStack.pop();\n  return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nfunction isEqual(a, b) {\n  return eq(a, b);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/allKeys.js\n\n\n\n\n// Retrieve all the enumerable property names of an object.\nfunction allKeys(obj) {\n  if (!isObject(obj)) return [];\n  var keys = [];\n  for (var key in obj) keys.push(key);\n  // Ahem, IE < 9.\n  if (_setup[\"hasEnumBug\"]) collectNonEnumProps(obj, keys);\n  return keys;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_methodFingerprint.js\n\n\n\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nfunction ie11fingerprint(methods) {\n  var length = _getLength(methods);\n  return function(obj) {\n    if (obj == null) return false;\n    // `Map`, `WeakMap` and `Set` have no enumerable keys.\n    var keys = allKeys(obj);\n    if (_getLength(keys)) return false;\n    for (var i = 0; i < length; i++) {\n      if (!modules_isFunction(obj[methods[i]])) return false;\n    }\n    // If we are testing against `WeakMap`, we need to ensure that\n    // `obj` doesn't have a `forEach` method in order to distinguish\n    // it from a regular `Map`.\n    return methods !== weakMapMethods || !modules_isFunction(obj[forEachName]);\n  };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n    hasName = 'has',\n    commonInit = ['clear', 'delete'],\n    mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nvar mapMethods = commonInit.concat(forEachName, mapTail),\n    weakMapMethods = commonInit.concat(mapTail),\n    setMethods = ['add'].concat(commonInit, forEachName, hasName);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isMap.js\n\n\n\n\n/* harmony default export */ var isMap = (isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isWeakMap.js\n\n\n\n\n/* harmony default export */ var isWeakMap = (isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isSet.js\n\n\n\n\n/* harmony default export */ var isSet = (isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/isWeakSet.js\n\n\n/* harmony default export */ var isWeakSet = (tagTester('WeakSet'));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/values.js\n\n\n// Retrieve the values of an object's properties.\nfunction values_values(obj) {\n  var _keys = keys_keys(obj);\n  var length = _keys.length;\n  var values = Array(length);\n  for (var i = 0; i < length; i++) {\n    values[i] = obj[_keys[i]];\n  }\n  return values;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/pairs.js\n\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nfunction pairs_pairs(obj) {\n  var _keys = keys_keys(obj);\n  var length = _keys.length;\n  var pairs = Array(length);\n  for (var i = 0; i < length; i++) {\n    pairs[i] = [_keys[i], obj[_keys[i]]];\n  }\n  return pairs;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/invert.js\n\n\n// Invert the keys and values of an object. The values must be serializable.\nfunction invert(obj) {\n  var result = {};\n  var _keys = keys_keys(obj);\n  for (var i = 0, length = _keys.length; i < length; i++) {\n    result[obj[_keys[i]]] = _keys[i];\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/functions.js\n\n\n// Return a sorted list of the function names available on the object.\nfunction functions(obj) {\n  var names = [];\n  for (var key in obj) {\n    if (modules_isFunction(obj[key])) names.push(key);\n  }\n  return names.sort();\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createAssigner.js\n// An internal function for creating assigner functions.\nfunction createAssigner(keysFunc, defaults) {\n  return function(obj) {\n    var length = arguments.length;\n    if (defaults) obj = Object(obj);\n    if (length < 2 || obj == null) return obj;\n    for (var index = 1; index < length; index++) {\n      var source = arguments[index],\n          keys = keysFunc(source),\n          l = keys.length;\n      for (var i = 0; i < l; i++) {\n        var key = keys[i];\n        if (!defaults || obj[key] === void 0) obj[key] = source[key];\n      }\n    }\n    return obj;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/extend.js\n\n\n\n// Extend a given object with all the properties in passed-in object(s).\n/* harmony default export */ var extend = (createAssigner(allKeys));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/extendOwn.js\n\n\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n/* harmony default export */ var extendOwn = (createAssigner(keys_keys));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/defaults.js\n\n\n\n// Fill in a given object with default properties.\n/* harmony default export */ var defaults = (createAssigner(allKeys, true));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_baseCreate.js\n\n\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n  return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nfunction baseCreate(prototype) {\n  if (!isObject(prototype)) return {};\n  if (_setup[\"nativeCreate\"]) return Object(_setup[\"nativeCreate\"])(prototype);\n  var Ctor = ctor();\n  Ctor.prototype = prototype;\n  var result = new Ctor;\n  Ctor.prototype = null;\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/create.js\n\n\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nfunction create(prototype, props) {\n  var result = baseCreate(prototype);\n  if (props) extendOwn(result, props);\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/clone.js\n\n\n\n\n// Create a (shallow-cloned) duplicate of an object.\nfunction clone(obj) {\n  if (!isObject(obj)) return obj;\n  return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/tap.js\n// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nfunction tap(obj, interceptor) {\n  interceptor(obj);\n  return obj;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/toPath.js\n\n\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nfunction toPath(path) {\n  return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_toPath.js\n\n\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nfunction _toPath_toPath(path) {\n  return _.toPath(path);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_deepGet.js\n// Internal function to obtain a nested property in `obj` along `path`.\nfunction deepGet(obj, path) {\n  var length = path.length;\n  for (var i = 0; i < length; i++) {\n    if (obj == null) return void 0;\n    obj = obj[path[i]];\n  }\n  return length ? obj : void 0;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/get.js\n\n\n\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nfunction get(object, path, defaultValue) {\n  var value = deepGet(object, _toPath_toPath(path));\n  return isUndefined(value) ? defaultValue : value;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/has.js\n\n\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nfunction has_has(obj, path) {\n  path = _toPath_toPath(path);\n  var length = path.length;\n  for (var i = 0; i < length; i++) {\n    var key = path[i];\n    if (!has(obj, key)) return false;\n    obj = obj[key];\n  }\n  return !!length;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/identity.js\n// Keep the identity function around for default iteratees.\nfunction identity(value) {\n  return value;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/matcher.js\n\n\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nfunction matcher_matcher(attrs) {\n  attrs = extendOwn({}, attrs);\n  return function(obj) {\n    return isMatch(obj, attrs);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/property.js\n\n\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nfunction property(path) {\n  path = _toPath_toPath(path);\n  return function(obj) {\n    return deepGet(obj, path);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_optimizeCb.js\n// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nfunction optimizeCb(func, context, argCount) {\n  if (context === void 0) return func;\n  switch (argCount == null ? 3 : argCount) {\n    case 1: return function(value) {\n      return func.call(context, value);\n    };\n    // The 2-argument case is omitted because we’re not using it.\n    case 3: return function(value, index, collection) {\n      return func.call(context, value, index, collection);\n    };\n    case 4: return function(accumulator, value, index, collection) {\n      return func.call(context, accumulator, value, index, collection);\n    };\n  }\n  return function() {\n    return func.apply(context, arguments);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_baseIteratee.js\n\n\n\n\n\n\n\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nfunction baseIteratee(value, context, argCount) {\n  if (value == null) return identity;\n  if (modules_isFunction(value)) return optimizeCb(value, context, argCount);\n  if (isObject(value) && !isArray(value)) return matcher_matcher(value);\n  return property(value);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/iteratee.js\n\n\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nfunction iteratee_iteratee(value, context) {\n  return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee_iteratee;\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_cb.js\n\n\n\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nfunction cb(value, context, argCount) {\n  if (_.iteratee !== iteratee_iteratee) return _.iteratee(value, context);\n  return baseIteratee(value, context, argCount);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/mapObject.js\n\n\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nfunction mapObject(obj, iteratee, context) {\n  iteratee = cb(iteratee, context);\n  var _keys = keys_keys(obj),\n      length = _keys.length,\n      results = {};\n  for (var index = 0; index < length; index++) {\n    var currentKey = _keys[index];\n    results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n  }\n  return results;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/noop.js\n// Predicate-generating function. Often useful outside of Underscore.\nfunction noop(){}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/propertyOf.js\n\n\n\n// Generates a function for a given object that returns a given property.\nfunction propertyOf(obj) {\n  if (obj == null) return noop;\n  return function(path) {\n    return get(obj, path);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/times.js\n\n\n// Run a function **n** times.\nfunction times(n, iteratee, context) {\n  var accum = Array(Math.max(0, n));\n  iteratee = optimizeCb(iteratee, context, 1);\n  for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n  return accum;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/random.js\n// Return a random integer between `min` and `max` (inclusive).\nfunction random(min, max) {\n  if (max == null) {\n    max = min;\n    min = 0;\n  }\n  return min + Math.floor(Math.random() * (max - min + 1));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/now.js\n// A (possibly faster) way to get the current timestamp as an integer.\n/* harmony default export */ var now = (Date.now || function() {\n  return new Date().getTime();\n});\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createEscaper.js\n\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nfunction createEscaper(map) {\n  var escaper = function(match) {\n    return map[match];\n  };\n  // Regexes for identifying a key that needs to be escaped.\n  var source = '(?:' + keys_keys(map).join('|') + ')';\n  var testRegexp = RegExp(source);\n  var replaceRegexp = RegExp(source, 'g');\n  return function(string) {\n    string = string == null ? '' : '' + string;\n    return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_escapeMap.js\n// Internal list of HTML entities for escaping.\n/* harmony default export */ var _escapeMap = ({\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#x27;',\n  '`': '&#x60;'\n});\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/escape.js\n\n\n\n// Function for escaping strings to HTML interpolation.\n/* harmony default export */ var modules_escape = (createEscaper(_escapeMap));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_unescapeMap.js\n\n\n\n// Internal list of HTML entities for unescaping.\n/* harmony default export */ var _unescapeMap = (invert(_escapeMap));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/unescape.js\n\n\n\n// Function for unescaping strings from HTML interpolation.\n/* harmony default export */ var modules_unescape = (createEscaper(_unescapeMap));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/templateSettings.js\n\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\n/* harmony default export */ var templateSettings = (_.templateSettings = {\n  evaluate: /<%([\\s\\S]+?)%>/g,\n  interpolate: /<%=([\\s\\S]+?)%>/g,\n  escape: /<%-([\\s\\S]+?)%>/g\n});\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/template.js\n\n\n\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n  \"'\": \"'\",\n  '\\\\': '\\\\',\n  '\\r': 'r',\n  '\\n': 'n',\n  '\\u2028': 'u2028',\n  '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n  return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nfunction template_template(text, settings, oldSettings) {\n  if (!settings && oldSettings) settings = oldSettings;\n  settings = defaults({}, settings, _.templateSettings);\n\n  // Combine delimiters into one regular expression via alternation.\n  var matcher = RegExp([\n    (settings.escape || noMatch).source,\n    (settings.interpolate || noMatch).source,\n    (settings.evaluate || noMatch).source\n  ].join('|') + '|$', 'g');\n\n  // Compile the template source, escaping string literals appropriately.\n  var index = 0;\n  var source = \"__p+='\";\n  text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n    source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n    index = offset + match.length;\n\n    if (escape) {\n      source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n    } else if (interpolate) {\n      source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n    } else if (evaluate) {\n      source += \"';\\n\" + evaluate + \"\\n__p+='\";\n    }\n\n    // Adobe VMs need the match returned to produce the correct offset.\n    return match;\n  });\n  source += \"';\\n\";\n\n  var argument = settings.variable;\n  if (argument) {\n    // Insure against third-party code injection. (CVE-2021-23358)\n    if (!bareIdentifier.test(argument)) throw new Error(\n      'variable is not a bare identifier: ' + argument\n    );\n  } else {\n    // If a variable is not specified, place data values in local scope.\n    source = 'with(obj||{}){\\n' + source + '}\\n';\n    argument = 'obj';\n  }\n\n  source = \"var __t,__p='',__j=Array.prototype.join,\" +\n    \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n    source + 'return __p;\\n';\n\n  var render;\n  try {\n    render = new Function(argument, '_', source);\n  } catch (e) {\n    e.source = source;\n    throw e;\n  }\n\n  var template = function(data) {\n    return render.call(this, data, _);\n  };\n\n  // Provide the compiled source as a convenience for precompilation.\n  template.source = 'function(' + argument + '){\\n' + source + '}';\n\n  return template;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/result.js\n\n\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nfunction result_result(obj, path, fallback) {\n  path = _toPath_toPath(path);\n  var length = path.length;\n  if (!length) {\n    return modules_isFunction(fallback) ? fallback.call(obj) : fallback;\n  }\n  for (var i = 0; i < length; i++) {\n    var prop = obj == null ? void 0 : obj[path[i]];\n    if (prop === void 0) {\n      prop = fallback;\n      i = length; // Ensure we don't continue iterating.\n    }\n    obj = modules_isFunction(prop) ? prop.call(obj) : prop;\n  }\n  return obj;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/uniqueId.js\n// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nfunction uniqueId(prefix) {\n  var id = ++idCounter + '';\n  return prefix ? prefix + id : id;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/chain.js\n\n\n// Start chaining a wrapped Underscore object.\nfunction chain(obj) {\n  var instance = _(obj);\n  instance._chain = true;\n  return instance;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_executeBound.js\n\n\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nfunction executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n  if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n  var self = baseCreate(sourceFunc.prototype);\n  var result = sourceFunc.apply(self, args);\n  if (isObject(result)) return result;\n  return self;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/partial.js\n\n\n\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n  var placeholder = partial.placeholder;\n  var bound = function() {\n    var position = 0, length = boundArgs.length;\n    var args = Array(length);\n    for (var i = 0; i < length; i++) {\n      args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n    }\n    while (position < arguments.length) args.push(arguments[position++]);\n    return executeBound(func, bound, this, this, args);\n  };\n  return bound;\n});\n\npartial.placeholder = _;\n/* harmony default export */ var modules_partial = (partial);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/bind.js\n\n\n\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\n/* harmony default export */ var bind = (restArguments(function(func, context, args) {\n  if (!modules_isFunction(func)) throw new TypeError('Bind must be called on a function');\n  var bound = restArguments(function(callArgs) {\n    return executeBound(func, bound, context, this, args.concat(callArgs));\n  });\n  return bound;\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_isArrayLike.js\n\n\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n/* harmony default export */ var _isArrayLike = (createSizePropertyCheck(_getLength));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_flatten.js\n\n\n\n\n\n// Internal implementation of a recursive `flatten` function.\nfunction flatten(input, depth, strict, output) {\n  output = output || [];\n  if (!depth && depth !== 0) {\n    depth = Infinity;\n  } else if (depth <= 0) {\n    return output.concat(input);\n  }\n  var idx = output.length;\n  for (var i = 0, length = _getLength(input); i < length; i++) {\n    var value = input[i];\n    if (_isArrayLike(value) && (isArray(value) || modules_isArguments(value))) {\n      // Flatten current level of array or arguments object.\n      if (depth > 1) {\n        flatten(value, depth - 1, strict, output);\n        idx = output.length;\n      } else {\n        var j = 0, len = value.length;\n        while (j < len) output[idx++] = value[j++];\n      }\n    } else if (!strict) {\n      output[idx++] = value;\n    }\n  }\n  return output;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/bindAll.js\n\n\n\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\n/* harmony default export */ var bindAll = (restArguments(function(obj, keys) {\n  keys = flatten(keys, false, false);\n  var index = keys.length;\n  if (index < 1) throw new Error('bindAll must be passed function names');\n  while (index--) {\n    var key = keys[index];\n    obj[key] = bind(obj[key], obj);\n  }\n  return obj;\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/memoize.js\n\n\n// Memoize an expensive function by storing its results.\nfunction memoize_memoize(func, hasher) {\n  var memoize = function(key) {\n    var cache = memoize.cache;\n    var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n    if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n    return cache[address];\n  };\n  memoize.cache = {};\n  return memoize;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/delay.js\n\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\n/* harmony default export */ var delay = (restArguments(function(func, wait, args) {\n  return setTimeout(function() {\n    return func.apply(null, args);\n  }, wait);\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/defer.js\n\n\n\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\n/* harmony default export */ var defer = (modules_partial(delay, _, 1));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/throttle.js\n\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nfunction throttle(func, wait, options) {\n  var timeout, context, args, result;\n  var previous = 0;\n  if (!options) options = {};\n\n  var later = function() {\n    previous = options.leading === false ? 0 : now();\n    timeout = null;\n    result = func.apply(context, args);\n    if (!timeout) context = args = null;\n  };\n\n  var throttled = function() {\n    var _now = now();\n    if (!previous && options.leading === false) previous = _now;\n    var remaining = wait - (_now - previous);\n    context = this;\n    args = arguments;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = _now;\n      result = func.apply(context, args);\n      if (!timeout) context = args = null;\n    } else if (!timeout && options.trailing !== false) {\n      timeout = setTimeout(later, remaining);\n    }\n    return result;\n  };\n\n  throttled.cancel = function() {\n    clearTimeout(timeout);\n    previous = 0;\n    timeout = context = args = null;\n  };\n\n  return throttled;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/debounce.js\n\n\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nfunction debounce(func, wait, immediate) {\n  var timeout, previous, args, result, context;\n\n  var later = function() {\n    var passed = now() - previous;\n    if (wait > passed) {\n      timeout = setTimeout(later, wait - passed);\n    } else {\n      timeout = null;\n      if (!immediate) result = func.apply(context, args);\n      // This check is needed because `func` can recursively invoke `debounced`.\n      if (!timeout) args = context = null;\n    }\n  };\n\n  var debounced = restArguments(function(_args) {\n    context = this;\n    args = _args;\n    previous = now();\n    if (!timeout) {\n      timeout = setTimeout(later, wait);\n      if (immediate) result = func.apply(context, args);\n    }\n    return result;\n  });\n\n  debounced.cancel = function() {\n    clearTimeout(timeout);\n    timeout = args = context = null;\n  };\n\n  return debounced;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/wrap.js\n\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nfunction wrap(func, wrapper) {\n  return modules_partial(wrapper, func);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/negate.js\n// Returns a negated version of the passed-in predicate.\nfunction negate(predicate) {\n  return function() {\n    return !predicate.apply(this, arguments);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/compose.js\n// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nfunction compose() {\n  var args = arguments;\n  var start = args.length - 1;\n  return function() {\n    var i = start;\n    var result = args[start].apply(this, arguments);\n    while (i--) result = args[i].call(this, result);\n    return result;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/after.js\n// Returns a function that will only be executed on and after the Nth call.\nfunction after(times, func) {\n  return function() {\n    if (--times < 1) {\n      return func.apply(this, arguments);\n    }\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/before.js\n// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nfunction before(times, func) {\n  var memo;\n  return function() {\n    if (--times > 0) {\n      memo = func.apply(this, arguments);\n    }\n    if (times <= 1) func = null;\n    return memo;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/once.js\n\n\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\n/* harmony default export */ var once = (modules_partial(before, 2));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/findKey.js\n\n\n\n// Returns the first key on an object that passes a truth test.\nfunction findKey(obj, predicate, context) {\n  predicate = cb(predicate, context);\n  var _keys = keys_keys(obj), key;\n  for (var i = 0, length = _keys.length; i < length; i++) {\n    key = _keys[i];\n    if (predicate(obj[key], key, obj)) return key;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createPredicateIndexFinder.js\n\n\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nfunction createPredicateIndexFinder(dir) {\n  return function(array, predicate, context) {\n    predicate = cb(predicate, context);\n    var length = _getLength(array);\n    var index = dir > 0 ? 0 : length - 1;\n    for (; index >= 0 && index < length; index += dir) {\n      if (predicate(array[index], index, array)) return index;\n    }\n    return -1;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/findIndex.js\n\n\n// Returns the first index on an array-like that passes a truth test.\n/* harmony default export */ var findIndex = (createPredicateIndexFinder(1));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/findLastIndex.js\n\n\n// Returns the last index on an array-like that passes a truth test.\n/* harmony default export */ var findLastIndex = (createPredicateIndexFinder(-1));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/sortedIndex.js\n\n\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nfunction sortedIndex_sortedIndex(array, obj, iteratee, context) {\n  iteratee = cb(iteratee, context, 1);\n  var value = iteratee(obj);\n  var low = 0, high = _getLength(array);\n  while (low < high) {\n    var mid = Math.floor((low + high) / 2);\n    if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n  }\n  return low;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createIndexFinder.js\n\n\n\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nfunction createIndexFinder(dir, predicateFind, sortedIndex) {\n  return function(array, item, idx) {\n    var i = 0, length = _getLength(array);\n    if (typeof idx == 'number') {\n      if (dir > 0) {\n        i = idx >= 0 ? idx : Math.max(idx + length, i);\n      } else {\n        length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n      }\n    } else if (sortedIndex && idx && length) {\n      idx = sortedIndex(array, item);\n      return array[idx] === item ? idx : -1;\n    }\n    if (item !== item) {\n      idx = predicateFind(_setup[\"slice\"].call(array, i, length), isNaN_isNaN);\n      return idx >= 0 ? idx + i : -1;\n    }\n    for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n      if (array[idx] === item) return idx;\n    }\n    return -1;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/indexOf.js\n\n\n\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\n/* harmony default export */ var indexOf = (createIndexFinder(1, findIndex, sortedIndex_sortedIndex));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/lastIndexOf.js\n\n\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n/* harmony default export */ var lastIndexOf = (createIndexFinder(-1, findLastIndex));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/find.js\n\n\n\n\n// Return the first value which passes a truth test.\nfunction find(obj, predicate, context) {\n  var keyFinder = _isArrayLike(obj) ? findIndex : findKey;\n  var key = keyFinder(obj, predicate, context);\n  if (key !== void 0 && key !== -1) return obj[key];\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/findWhere.js\n\n\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nfunction findWhere(obj, attrs) {\n  return find(obj, matcher_matcher(attrs));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/each.js\n\n\n\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nfunction each(obj, iteratee, context) {\n  iteratee = optimizeCb(iteratee, context);\n  var i, length;\n  if (_isArrayLike(obj)) {\n    for (i = 0, length = obj.length; i < length; i++) {\n      iteratee(obj[i], i, obj);\n    }\n  } else {\n    var _keys = keys_keys(obj);\n    for (i = 0, length = _keys.length; i < length; i++) {\n      iteratee(obj[_keys[i]], _keys[i], obj);\n    }\n  }\n  return obj;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/map.js\n\n\n\n\n// Return the results of applying the iteratee to each element.\nfunction map_map(obj, iteratee, context) {\n  iteratee = cb(iteratee, context);\n  var _keys = !_isArrayLike(obj) && keys_keys(obj),\n      length = (_keys || obj).length,\n      results = Array(length);\n  for (var index = 0; index < length; index++) {\n    var currentKey = _keys ? _keys[index] : index;\n    results[index] = iteratee(obj[currentKey], currentKey, obj);\n  }\n  return results;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_createReduce.js\n\n\n\n\n// Internal helper to create a reducing function, iterating left or right.\nfunction createReduce(dir) {\n  // Wrap code that reassigns argument variables in a separate function than\n  // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n  var reducer = function(obj, iteratee, memo, initial) {\n    var _keys = !_isArrayLike(obj) && keys_keys(obj),\n        length = (_keys || obj).length,\n        index = dir > 0 ? 0 : length - 1;\n    if (!initial) {\n      memo = obj[_keys ? _keys[index] : index];\n      index += dir;\n    }\n    for (; index >= 0 && index < length; index += dir) {\n      var currentKey = _keys ? _keys[index] : index;\n      memo = iteratee(memo, obj[currentKey], currentKey, obj);\n    }\n    return memo;\n  };\n\n  return function(obj, iteratee, memo, context) {\n    var initial = arguments.length >= 3;\n    return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/reduce.js\n\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\n/* harmony default export */ var reduce = (createReduce(1));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/reduceRight.js\n\n\n// The right-associative version of reduce, also known as `foldr`.\n/* harmony default export */ var reduceRight = (createReduce(-1));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/filter.js\n\n\n\n// Return all the elements that pass a truth test.\nfunction filter(obj, predicate, context) {\n  var results = [];\n  predicate = cb(predicate, context);\n  each(obj, function(value, index, list) {\n    if (predicate(value, index, list)) results.push(value);\n  });\n  return results;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/reject.js\n\n\n\n\n// Return all the elements for which a truth test fails.\nfunction reject(obj, predicate, context) {\n  return filter(obj, negate(cb(predicate)), context);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/every.js\n\n\n\n\n// Determine whether all of the elements pass a truth test.\nfunction every(obj, predicate, context) {\n  predicate = cb(predicate, context);\n  var _keys = !_isArrayLike(obj) && keys_keys(obj),\n      length = (_keys || obj).length;\n  for (var index = 0; index < length; index++) {\n    var currentKey = _keys ? _keys[index] : index;\n    if (!predicate(obj[currentKey], currentKey, obj)) return false;\n  }\n  return true;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/some.js\n\n\n\n\n// Determine if at least one element in the object passes a truth test.\nfunction some(obj, predicate, context) {\n  predicate = cb(predicate, context);\n  var _keys = !_isArrayLike(obj) && keys_keys(obj),\n      length = (_keys || obj).length;\n  for (var index = 0; index < length; index++) {\n    var currentKey = _keys ? _keys[index] : index;\n    if (predicate(obj[currentKey], currentKey, obj)) return true;\n  }\n  return false;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/contains.js\n\n\n\n\n// Determine if the array or object contains a given item (using `===`).\nfunction contains(obj, item, fromIndex, guard) {\n  if (!_isArrayLike(obj)) obj = values_values(obj);\n  if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n  return indexOf(obj, item, fromIndex) >= 0;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/invoke.js\n\n\n\n\n\n\n// Invoke a method (with arguments) on every item in a collection.\n/* harmony default export */ var invoke = (restArguments(function(obj, path, args) {\n  var contextPath, func;\n  if (modules_isFunction(path)) {\n    func = path;\n  } else {\n    path = _toPath_toPath(path);\n    contextPath = path.slice(0, -1);\n    path = path[path.length - 1];\n  }\n  return map_map(obj, function(context) {\n    var method = func;\n    if (!method) {\n      if (contextPath && contextPath.length) {\n        context = deepGet(context, contextPath);\n      }\n      if (context == null) return void 0;\n      method = context[path];\n    }\n    return method == null ? method : method.apply(context, args);\n  });\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/pluck.js\n\n\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nfunction pluck(obj, key) {\n  return map_map(obj, property(key));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/where.js\n\n\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nfunction where(obj, attrs) {\n  return filter(obj, matcher_matcher(attrs));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/max.js\n\n\n\n\n\n// Return the maximum element (or element-based computation).\nfunction max(obj, iteratee, context) {\n  var result = -Infinity, lastComputed = -Infinity,\n      value, computed;\n  if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n    obj = _isArrayLike(obj) ? obj : values_values(obj);\n    for (var i = 0, length = obj.length; i < length; i++) {\n      value = obj[i];\n      if (value != null && value > result) {\n        result = value;\n      }\n    }\n  } else {\n    iteratee = cb(iteratee, context);\n    each(obj, function(v, index, list) {\n      computed = iteratee(v, index, list);\n      if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {\n        result = v;\n        lastComputed = computed;\n      }\n    });\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/min.js\n\n\n\n\n\n// Return the minimum element (or element-based computation).\nfunction min(obj, iteratee, context) {\n  var result = Infinity, lastComputed = Infinity,\n      value, computed;\n  if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n    obj = _isArrayLike(obj) ? obj : values_values(obj);\n    for (var i = 0, length = obj.length; i < length; i++) {\n      value = obj[i];\n      if (value != null && value < result) {\n        result = value;\n      }\n    }\n  } else {\n    iteratee = cb(iteratee, context);\n    each(obj, function(v, index, list) {\n      computed = iteratee(v, index, list);\n      if (computed < lastComputed || (computed === Infinity && result === Infinity)) {\n        result = v;\n        lastComputed = computed;\n      }\n    });\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/toArray.js\n\n\n\n\n\n\n\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nfunction toArray(obj) {\n  if (!obj) return [];\n  if (isArray(obj)) return _setup[\"slice\"].call(obj);\n  if (isString(obj)) {\n    // Keep surrogate pair characters together.\n    return obj.match(reStrSymbol);\n  }\n  if (_isArrayLike(obj)) return map_map(obj, identity);\n  return values_values(obj);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/sample.js\n\n\n\n\n\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nfunction sample_sample(obj, n, guard) {\n  if (n == null || guard) {\n    if (!_isArrayLike(obj)) obj = values_values(obj);\n    return obj[random(obj.length - 1)];\n  }\n  var sample = toArray(obj);\n  var length = _getLength(sample);\n  n = Math.max(Math.min(n, length), 0);\n  var last = length - 1;\n  for (var index = 0; index < n; index++) {\n    var rand = random(index, last);\n    var temp = sample[index];\n    sample[index] = sample[rand];\n    sample[rand] = temp;\n  }\n  return sample.slice(0, n);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/shuffle.js\n\n\n// Shuffle a collection.\nfunction shuffle(obj) {\n  return sample_sample(obj, Infinity);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/sortBy.js\n\n\n\n\n// Sort the object's values by a criterion produced by an iteratee.\nfunction sortBy(obj, iteratee, context) {\n  var index = 0;\n  iteratee = cb(iteratee, context);\n  return pluck(map_map(obj, function(value, key, list) {\n    return {\n      value: value,\n      index: index++,\n      criteria: iteratee(value, key, list)\n    };\n  }).sort(function(left, right) {\n    var a = left.criteria;\n    var b = right.criteria;\n    if (a !== b) {\n      if (a > b || a === void 0) return 1;\n      if (a < b || b === void 0) return -1;\n    }\n    return left.index - right.index;\n  }), 'value');\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_group.js\n\n\n\n// An internal function used for aggregate \"group by\" operations.\nfunction group(behavior, partition) {\n  return function(obj, iteratee, context) {\n    var result = partition ? [[], []] : {};\n    iteratee = cb(iteratee, context);\n    each(obj, function(value, index) {\n      var key = iteratee(value, index, obj);\n      behavior(result, value, key);\n    });\n    return result;\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/groupBy.js\n\n\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\n/* harmony default export */ var groupBy = (group(function(result, value, key) {\n  if (has(result, key)) result[key].push(value); else result[key] = [value];\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/indexBy.js\n\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\n/* harmony default export */ var indexBy = (group(function(result, value, key) {\n  result[key] = value;\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/countBy.js\n\n\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\n/* harmony default export */ var countBy = (group(function(result, value, key) {\n  if (has(result, key)) result[key]++; else result[key] = 1;\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/partition.js\n\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\n/* harmony default export */ var modules_partition = (group(function(result, value, pass) {\n  result[pass ? 0 : 1].push(value);\n}, true));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/size.js\n\n\n\n// Return the number of elements in a collection.\nfunction size(obj) {\n  if (obj == null) return 0;\n  return _isArrayLike(obj) ? obj.length : keys_keys(obj).length;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_keyInObj.js\n// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nfunction keyInObj(value, key, obj) {\n  return key in obj;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/pick.js\n\n\n\n\n\n\n\n// Return a copy of the object only containing the allowed properties.\n/* harmony default export */ var pick = (restArguments(function(obj, keys) {\n  var result = {}, iteratee = keys[0];\n  if (obj == null) return result;\n  if (modules_isFunction(iteratee)) {\n    if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n    keys = allKeys(obj);\n  } else {\n    iteratee = keyInObj;\n    keys = flatten(keys, false, false);\n    obj = Object(obj);\n  }\n  for (var i = 0, length = keys.length; i < length; i++) {\n    var key = keys[i];\n    var value = obj[key];\n    if (iteratee(value, key, obj)) result[key] = value;\n  }\n  return result;\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/omit.js\n\n\n\n\n\n\n\n\n// Return a copy of the object without the disallowed properties.\n/* harmony default export */ var omit = (restArguments(function(obj, keys) {\n  var iteratee = keys[0], context;\n  if (modules_isFunction(iteratee)) {\n    iteratee = negate(iteratee);\n    if (keys.length > 1) context = keys[1];\n  } else {\n    keys = map_map(flatten(keys, false, false), String);\n    iteratee = function(value, key) {\n      return !contains(keys, key);\n    };\n  }\n  return pick(obj, iteratee, context);\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/initial.js\n\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nfunction initial_initial(array, n, guard) {\n  return _setup[\"slice\"].call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/first.js\n\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nfunction first(array, n, guard) {\n  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n  if (n == null || guard) return array[0];\n  return initial_initial(array, array.length - n);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/rest.js\n\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nfunction rest_rest(array, n, guard) {\n  return _setup[\"slice\"].call(array, n == null || guard ? 1 : n);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/last.js\n\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nfunction last_last(array, n, guard) {\n  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n  if (n == null || guard) return array[array.length - 1];\n  return rest_rest(array, Math.max(0, array.length - n));\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/compact.js\n\n\n// Trim out all falsy values from an array.\nfunction compact(array) {\n  return filter(array, Boolean);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/flatten.js\n\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nfunction flatten_flatten(array, depth) {\n  return flatten(array, depth, false);\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/difference.js\n\n\n\n\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\n/* harmony default export */ var difference = (restArguments(function(array, rest) {\n  rest = flatten(rest, true, true);\n  return filter(array, function(value){\n    return !contains(rest, value);\n  });\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/without.js\n\n\n\n// Return a version of the array that does not contain the specified value(s).\n/* harmony default export */ var without = (restArguments(function(array, otherArrays) {\n  return difference(array, otherArrays);\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/uniq.js\n\n\n\n\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nfunction uniq(array, isSorted, iteratee, context) {\n  if (!isBoolean(isSorted)) {\n    context = iteratee;\n    iteratee = isSorted;\n    isSorted = false;\n  }\n  if (iteratee != null) iteratee = cb(iteratee, context);\n  var result = [];\n  var seen = [];\n  for (var i = 0, length = _getLength(array); i < length; i++) {\n    var value = array[i],\n        computed = iteratee ? iteratee(value, i, array) : value;\n    if (isSorted && !iteratee) {\n      if (!i || seen !== computed) result.push(value);\n      seen = computed;\n    } else if (iteratee) {\n      if (!contains(seen, computed)) {\n        seen.push(computed);\n        result.push(value);\n      }\n    } else if (!contains(result, value)) {\n      result.push(value);\n    }\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/union.js\n\n\n\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\n/* harmony default export */ var union = (restArguments(function(arrays) {\n  return uniq(flatten(arrays, true, true));\n}));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/intersection.js\n\n\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nfunction intersection(array) {\n  var result = [];\n  var argsLength = arguments.length;\n  for (var i = 0, length = _getLength(array); i < length; i++) {\n    var item = array[i];\n    if (contains(result, item)) continue;\n    var j;\n    for (j = 1; j < argsLength; j++) {\n      if (!contains(arguments[j], item)) break;\n    }\n    if (j === argsLength) result.push(item);\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/unzip.js\n\n\n\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nfunction unzip(array) {\n  var length = (array && max(array, _getLength).length) || 0;\n  var result = Array(length);\n\n  for (var index = 0; index < length; index++) {\n    result[index] = pluck(array, index);\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/zip.js\n\n\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\n/* harmony default export */ var zip = (restArguments(unzip));\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/object.js\n\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nfunction object_object(list, values) {\n  var result = {};\n  for (var i = 0, length = _getLength(list); i < length; i++) {\n    if (values) {\n      result[list[i]] = values[i];\n    } else {\n      result[list[i][0]] = list[i][1];\n    }\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/range.js\n// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nfunction range(start, stop, step) {\n  if (stop == null) {\n    stop = start || 0;\n    start = 0;\n  }\n  if (!step) {\n    step = stop < start ? -1 : 1;\n  }\n\n  var length = Math.max(Math.ceil((stop - start) / step), 0);\n  var range = Array(length);\n\n  for (var idx = 0; idx < length; idx++, start += step) {\n    range[idx] = start;\n  }\n\n  return range;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/chunk.js\n\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nfunction chunk(array, count) {\n  if (count == null || count < 1) return [];\n  var result = [];\n  var i = 0, length = array.length;\n  while (i < length) {\n    result.push(_setup[\"slice\"].call(array, i, i += count));\n  }\n  return result;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/_chainResult.js\n\n\n// Helper function to continue chaining intermediate results.\nfunction chainResult(instance, obj) {\n  return instance._chain ? _(obj).chain() : obj;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/mixin.js\n\n\n\n\n\n\n// Add your own custom functions to the Underscore object.\nfunction mixin(obj) {\n  each(functions(obj), function(name) {\n    var func = _[name] = obj[name];\n    _.prototype[name] = function() {\n      var args = [this._wrapped];\n      _setup[\"push\"].apply(args, arguments);\n      return chainResult(this, func.apply(_, args));\n    };\n  });\n  return _;\n}\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/underscore-array-methods.js\n\n\n\n\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n  var method = _setup[\"ArrayProto\"][name];\n  _.prototype[name] = function() {\n    var obj = this._wrapped;\n    if (obj != null) {\n      method.apply(obj, arguments);\n      if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n        delete obj[0];\n      }\n    }\n    return chainResult(this, obj);\n  };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n  var method = _setup[\"ArrayProto\"][name];\n  _.prototype[name] = function() {\n    var obj = this._wrapped;\n    if (obj != null) obj = method.apply(obj, arguments);\n    return chainResult(this, obj);\n  };\n});\n\n/* harmony default export */ var underscore_array_methods = (_);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/index.js\n// Named Exports\n// =============\n\n//     Underscore.js 1.13.3\n//     https://underscorejs.org\n//     (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n\n// Baseline setup.\n\n\n\n// Object Functions\n// ----------------\n// Our most fundamental functions operate on any JavaScript object.\n// Most functions in Underscore depend on at least one function in this section.\n\n// A group of functions that check the types of core JavaScript values.\n// These are often informally referred to as the \"isType\" functions.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Functions that treat an object as a dictionary of key-value pairs.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Utility Functions\n// -----------------\n// A bit of a grab bag: Predicate-generating functions for use with filters and\n// loops, string escaping and templating, create random numbers and unique ids,\n// and functions that facilitate Underscore's chaining and iteration conventions.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Function (ahem) Functions\n// -------------------------\n// These functions take a function as an argument and return a new function\n// as the result. Also known as higher-order functions.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Finders\n// -------\n// Functions that extract (the position of) a single element from an object\n// or array based on some criterion.\n\n\n\n\n\n\n\n\n\n// Collection Functions\n// --------------------\n// Functions that work on any collection of elements: either an array, or\n// an object of key-value pairs.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// `_.pick` and `_.omit` are actually object functions, but we put\n// them here in order to create a more natural reading order in the\n// monolithic build as they depend on `_.contains`.\n\n\n\n// Array Functions\n// ---------------\n// Functions that operate on arrays (and array-likes) only, because they’re\n// expressed in terms of operations on an ordered list of values.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// OOP\n// ---\n// These modules support the \"object-oriented\" calling style. See also\n// `underscore.js` and `index-default.js`.\n\n\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/index-default.js\n// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\n\n\n\n// Add all of the Underscore functions to the wrapper object.\nvar index_default_ = mixin(modules_namespaceObject);\n// Legacy Node.js API.\nindex_default_._ = index_default_;\n// Export the Underscore API.\n/* harmony default export */ var index_default = (index_default_);\n\n// CONCATENATED MODULE: ./node_modules/underscore/modules/index-all.js\n// ESM Exports\n// ===========\n// This module is the package entry point for ES module users. In other words,\n// it is the module they are interfacing with when they import from the whole\n// package instead of from a submodule, like this:\n//\n// ```js\n// import { map } from 'underscore';\n// ```\n//\n// The difference with `./index-default`, which is the package entry point for\n// CommonJS, AMD and UMD users, is purely technical. In ES modules, named and\n// default exports are considered to be siblings, so when you have a default\n// export, its properties are not automatically available as named exports. For\n// this reason, we re-export the named exports in addition to providing the same\n// default export as in `./index-default`.\n\n\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/underscore/modules/index-all.js_+_159_modules?");

/***/ }),

/***/ "./node_modules/units-css/index.js":
/*!*****************************************!*\
  !*** ./node_modules/units-css/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\nmodule.exports = __webpack_require__(/*! ./lib */ \"./node_modules/units-css/lib/index.js\");\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/index.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/conversions/angle.js":
/*!*********************************************************!*\
  !*** ./node_modules/units-css/lib/conversions/angle.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\nvar angle = {'_default': 'deg'};\n\n// Supported units:\n// deg, grad, rad, turn\n\nangle.deg = {\n  'grad': function(value) {\n    return value / 0.9;\n  },\n\n  'rad': function(value) {\n    return value * (Math.PI / 180);\n  },\n\n  'turn': function(value) {\n    return value / 360;\n  }\n};\n\nangle.grad = {\n  'deg': function(value) {\n    return value * 0.9;\n  }\n};\n\nangle.rad = {\n  'deg': function(value) {\n    return value / (Math.PI / 180);\n  }\n};\n\nangle.turn = {\n  'deg': function(value) {\n    return value * 360;\n  }\n};\n\n// Exports\nmodule.exports = angle;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/conversions/angle.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/conversions/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/units-css/lib/conversions/index.js ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\n// Exports\nmodule.exports = {\n  'angle': __webpack_require__(/*! ./angle */ \"./node_modules/units-css/lib/conversions/angle.js\"),\n  'length': __webpack_require__(/*! ./length */ \"./node_modules/units-css/lib/conversions/length.js\"),\n  'resolution': __webpack_require__(/*! ./resolution */ \"./node_modules/units-css/lib/conversions/resolution.js\")\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/conversions/index.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/conversions/length.js":
/*!**********************************************************!*\
  !*** ./node_modules/units-css/lib/conversions/length.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\n// Imports\nvar utilities = __webpack_require__(/*! ./../utilities */ \"./node_modules/units-css/lib/utilities.js\");\nvar viewport = __webpack_require__(/*! viewport-dimensions */ \"./node_modules/viewport-dimensions/index.js\");\n\nvar length = {'_default': 'px'};\n\n// Supported units:\n// %, ch, cm, em, ex, in, mm, pc, pt, px, rem, vh, vmax, vmin, vw\n\nlength[''] = {\n  'px': function(value, element) {\n    return parseFloat(getComputedStyle(element, '').fontSize) * value;\n  }\n};\n\nlength['%'] = {\n  'px': function(value, element, property) {\n    return (value * utilities.getRelativeElementDimension(element, property)) / 100;\n  }\n};\n\nlength.ch = {\n  'px': function(value, element) {\n    return value * utilities.ifZeroThenOne(utilities.getCreatedElementWidth(element, null, '0'));\n  }\n};\n\nlength.cm = {\n  'px': function(value) {\n    return value / 2.54 * utilities.ifZeroThenOne(utilities.DPI);\n  }\n};\n\nlength.em = {\n  'px': function(value, element) {\n    return value * utilities.getElementFontSize(element);\n  }\n};\n\nlength.ex = {\n  'px': function(value, element) {\n    return value * utilities.getCreatedElementHeight(element, null, 'x');\n  }\n};\n\nlength['in'] = {\n  'px': function(value) {\n    return value * utilities.DPI;\n  }\n};\n\nlength.mm = {\n  'px': function(value) {\n    return value / 2.54 * utilities.ifZeroThenOne(utilities.DPI) / 10;\n  }\n};\n\nlength.pc = {\n  'px': function(value) {\n    return value * ((utilities.DPI / 72) * 12);\n  }\n};\n\nlength.pt = {\n  'px': function(value) {\n    return value * utilities.DPI / 72;\n  }\n};\n\nlength.px = {\n  '': function(value, element) {\n    return value / parseFloat(getComputedStyle(element, '').fontSize);\n  },\n\n  '%': function(value, element, property) {\n    return (value / utilities.ifZeroThenOne(utilities.getRelativeElementDimension(element, property))) * 100;\n  },\n\n  'ch': function(value, element) {\n    return value / utilities.ifZeroThenOne(utilities.getCreatedElementWidth(element, null, '0'));\n  },\n\n  'cm': function(value) {\n    return value / utilities.ifZeroThenOne(utilities.DPI) * 2.54;\n  },\n\n  'em': function(value, element) {\n    return value / utilities.ifZeroThenOne(utilities.getElementFontSize(element));\n  },\n\n  'ex': function(value, element) {\n    return value / utilities.ifZeroThenOne(utilities.getCreatedElementHeight(element, null, 'x'));\n  },\n\n  'in': function(value) {\n    return value / utilities.ifZeroThenOne(utilities.DPI);\n  },\n\n  'mm': function(value) {\n    return value * 2.54 / utilities.ifZeroThenOne(utilities.DPI) * 10;\n  },\n\n  'pc': function(value) {\n    return value / ((utilities.DPI / 72) * 12);\n  },\n\n  'pt': function(value) {\n    return value * 72 / utilities.DPI;\n  },\n\n  'rem': function(value) {\n    return value / utilities.ifZeroThenOne(utilities.getElementFontSize(document.documentElement));\n  },\n\n  'vh': function(value) {\n    return value / utilities.ifZeroThenOne((viewport.height() / 100));\n  },\n\n  'vmax': function(value) {\n    return value / utilities.ifZeroThenOne((viewport.max() / 100));\n  },\n\n  'vmin': function(value) {\n    return value / utilities.ifZeroThenOne((viewport.min() / 100));\n  },\n\n  'vw': function(value) {\n    return value / utilities.ifZeroThenOne((viewport.width() / 100));\n  }\n};\n\nlength.rem = {\n  'px': function(value) {\n    return value * utilities.getElementFontSize(document.documentElement);\n  }\n};\n\nlength.vh = {\n  'px': function(value) {\n    return value * (viewport.height() / 100);\n  }\n};\n\nlength.vmax = {\n  'px': function(value) {\n    return value * (viewport.max() / 100);\n  }\n};\n\nlength.vmin = {\n  'px': function(value) {\n    return value * (viewport.min() / 100);\n  }\n};\n\nlength.vw = {\n  'px': function(value) {\n    return value * (viewport.width() / 100);\n  }\n};\n\n// Exports\nmodule.exports = length;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/conversions/length.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/conversions/resolution.js":
/*!**************************************************************!*\
  !*** ./node_modules/units-css/lib/conversions/resolution.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\n// Imports\nvar utilities = __webpack_require__(/*! ./../utilities */ \"./node_modules/units-css/lib/utilities.js\");\n\nvar resolution = {'_default': 'dpi'};\n\n// Supported units:\n// dpi, dpcm, dppx\n\nresolution.dpi = {\n  'dpcm': function(value) {\n    return value / 2.54;\n  },\n\n  'dppx': function(value) {\n    return value / utilities.DPI;\n  }\n};\n\nresolution.dpcm = {\n  'dpi': function(value) {\n    return value * 2.54;\n  }\n};\n\nresolution.dppx = {\n  'dpi': function(value) {\n    return value * utilities.DPI;\n  }\n};\n\n// Exports\nmodule.exports = resolution;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/conversions/resolution.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/index.js":
/*!*********************************************!*\
  !*** ./node_modules/units-css/lib/index.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\n// Imports\nvar conversions = __webpack_require__(/*! ./conversions */ \"./node_modules/units-css/lib/conversions/index.js\");\nvar isNumeric = __webpack_require__(/*! isnumeric/isNumeric */ \"./node_modules/isnumeric/isNumeric.js\");\n\nvar units = {};\n\n\n// Expose conversion functions\n//------------------------------------------------------------------------------\n\nunits.conversions = conversions;\n\n\n// Properties with non default unit/value\n//------------------------------------------------------------------------------\n\nvar properties = units.properties = {};\n\nproperties.lineHeight =\nproperties.opacity =\nproperties.scale =\nproperties.scale3d =\nproperties.scaleX =\nproperties.scaleY =\nproperties.scaleZ = {\n  'defaultUnit': '',\n  'defaultValue': 1\n};\n\nproperties.rotate =\nproperties.rotate3d =\nproperties.rotateX =\nproperties.rotateY =\nproperties.rotateZ =\nproperties.skew =\nproperties.skewX =\nproperties.skewY = {\n  'defaultUnit': 'deg'\n};\n\nproperties.resolution = {\n  'defaultUnit': 'dpi',\n  'defaultValue': 96\n};\n\n\n// Public interface\n//------------------------------------------------------------------------------\n\nunits.convert = function(to, value, element, property) {\n  var parts = units.parse(value, property);\n\n  if (to === '_default') {\n    to = units.getDefaultUnit(property);\n  }\n\n  return to === parts.unit\n    ? parts.value\n    : units.processConversion(parts.unit, to, parts.value, element, property);\n};\n\nunits.parse = function(value, property) {\n  var parts = {};\n  var matches;\n\n  if (isNumeric(value)) {\n    parts.value = value;\n    parts.unit = property\n      ? units.getDefaultUnit(property)\n      : '';\n  } else {\n    matches = value.toString().trim().match(/^(-?[\\d+\\.\\-]+)([a-z]+|%)$/i);\n\n    if (matches !== null) {\n      parts.value = matches[1];\n      parts.unit = matches[2];\n    } else {\n      parts.unit = value;\n      parts.value = property\n        ? units.getDefaultValue(property)\n        : 0;\n    }\n  }\n\n  parts.value = parseFloat(parts.value);\n\n  return parts;\n};\n\nunits.getDefaultValue = function(property) {\n  return typeof properties[property] !== 'undefined' && typeof properties[property].defaultValue !== 'undefined'\n    ? properties[property].defaultValue\n    : 0;\n};\n\nunits.getDefaultUnit = function(property) {\n  return typeof properties[property] !== 'undefined' && typeof properties[property].defaultUnit !== 'undefined'\n    ? properties[property].defaultUnit\n    : 'px';\n};\n\n\n// Protected methods\n//------------------------------------------------------------------------------\n\nunits.processConversion = function(fromUnits, toUnits, value, element, property) {\n  var type = units.getConversionType(fromUnits);\n  var method;\n\n  if (typeof type[fromUnits][toUnits] === 'function') {\n    method = type[fromUnits][toUnits];\n  } else {\n    method = type[type._default][toUnits];\n    value = type[fromUnits][type._default](value, element, property); // Use default unit conversion as an interstitial step\n  }\n\n  return method(value, element, property);\n};\n\nunits.getConversionType = function(fromUnits) {\n  var property;\n  var type = null;\n\n  for (property in conversions) {\n    /* istanbul ignore else */\n    if (conversions.hasOwnProperty(property) && typeof conversions[property][fromUnits] !== 'undefined') {\n      type = conversions[property];\n      break;\n    }\n  }\n\n  return type;\n};\n\n// Exports\nmodule.exports = units;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/index.js?");

/***/ }),

/***/ "./node_modules/units-css/lib/utilities.js":
/*!*************************************************!*\
  !*** ./node_modules/units-css/lib/utilities.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\nvar utilities = {};\n\nutilities.getElementFontSize = function(element) {\n  return typeof getComputedStyle !== 'undefined'\n    ? parseFloat(getComputedStyle(element, '').fontSize)\n    : 16; // Default browser font-size\n};\n\nutilities.getCreatedElementDimensions = function(parent, properties, content) {\n  var element = document.createElement('div');\n  var style = element.style;\n  var dimensions;\n  var property;\n\n  style.position = 'absolute';\n  style.zIndex = -2147483648;\n  style.left = 0;\n  style.top = 0;\n  style.visibility = 'hidden';\n\n  if (properties) {\n    for (property in properties) {\n      /* istanbul ignore else */\n      if (properties.hasOwnProperty(property)) {\n        style[property] = properties[property];\n      }\n    }\n  }\n\n  if (content) {\n    element.innerHTML = content;\n  }\n\n  parent.appendChild(element);\n\n  dimensions = [\n    element.offsetWidth,\n    element.offsetHeight\n  ];\n\n  parent.removeChild(element);\n\n  return dimensions;\n};\n\nutilities.getCreatedElementWidth = function(parent, properties, content) {\n  return utilities.getCreatedElementDimensions(parent, properties, content)[0];\n};\n\nutilities.getCreatedElementHeight = function(parent, properties, content) {\n  return utilities.getCreatedElementDimensions(parent, properties, content)[1];\n};\n\nvar selfReferenceTriggers = [\n  'perspective',\n  'translate',\n  'translate3d',\n  'translateX',\n  'translateY',\n  'translateZ',\n  'transformOrigin'\n];\n\nvar layoutYTriggers = [\n  'height',\n  'top',\n  'translateY'\n];\n\nvar positionTriggers = ['absolute', 'fixed'];\n\nutilities.getRelativeElementDimension = function(element, property) {\n  var reference;\n  var dimension;\n  var referenceComputed;\n  var useY = layoutYTriggers.indexOf(property) > -1;\n  var useSelf = selfReferenceTriggers.indexOf(property) > -1;\n  var positioned = positionTriggers.indexOf(getComputedStyle(element, '').position) > -1;\n\n  if (useSelf) {\n    reference = element;\n  } else {\n    reference = positioned\n      ? element.offsetParent\n      : element.parentNode;\n  }\n\n  dimension = useY\n    ? reference.offsetHeight\n    : reference.offsetWidth;\n\n  if (!useSelf && positioned) {\n    referenceComputed = getComputedStyle(reference, '');\n\n    dimension -= useY\n      ? parseFloat(referenceComputed.paddingTop) + parseFloat(referenceComputed.paddingBottom)\n      : parseFloat(referenceComputed.paddingRight) + parseFloat(referenceComputed.paddingLeft);\n  }\n\n  return dimension;\n};\n\nutilities.DPI = (function () {\n  // Preserve dpi-reliant conversion functionality when not running in browser environment\n  /* istanbul ignore next */\n  if (typeof window === 'undefined') {\n    return 96;\n  }\n\n  return utilities.getCreatedElementWidth(document.body, {\n    'width': '1in'\n  });\n}());\n\n/**\n * Return value if non-zero, else return one (to avoid division by zero in calling code).\n *\n * @param {number} value Number to return, converting to one if zero.\n * @returns {number} Non-zero value.\n */\nutilities.ifZeroThenOne = function(value) {\n  return value === 0\n    ? 1\n    : value;\n};\n\n// Exports\nmodule.exports = utilities;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/units-css/lib/utilities.js?");

/***/ }),

/***/ "./node_modules/url-regex/index.js":
/*!*****************************************!*\
  !*** ./node_modules/url-regex/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nconst ipRegex = __webpack_require__(/*! ip-regex */ \"./node_modules/ip-regex/index.js\");\nconst tlds = __webpack_require__(/*! tlds */ \"./node_modules/tlds/index.json\");\n\nmodule.exports = options => {\n\toptions = {\n\t\tstrict: true,\n\t\t...options\n\t};\n\n\tconst protocol = `(?:(?:[a-z]+:)?//)${options.strict ? '' : '?'}`;\n\tconst auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n\tconst ip = ipRegex.v4().source;\n\tconst host = '(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)';\n\tconst domain = '(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*';\n\tconst tld = `(?:\\\\.${options.strict ? '(?:[a-z\\\\u00a1-\\\\uffff]{2,})' : `(?:${tlds.sort((a, b) => b.length - a.length).join('|')})`})\\\\.?`;\n\tconst port = '(?::\\\\d{2,5})?';\n\tconst path = '(?:[/?#][^\\\\s\"]*)?';\n\tconst regex = `(?:${protocol}|www\\\\.)${auth}(?:localhost|${ip}|${host}${domain}${tld})${port}${path}`;\n\n\treturn options.exact ? new RegExp(`(?:^${regex}$)`, 'i') : new RegExp(regex, 'ig');\n};\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/url-regex/index.js?");

/***/ }),

/***/ "./node_modules/url-toolkit/src/url-toolkit.js":
/*!*****************************************************!*\
  !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// see https://tools.ietf.org/html/rfc1808\n\n(function (root) {\n  var URL_REGEX =\n    /^(?=((?:[a-zA-Z0-9+\\-.]+:)?))\\1(?=((?:\\/\\/[^\\/?#]*)?))\\2(?=((?:(?:[^?#\\/]*\\/)*[^;?#\\/]*)?))\\3((?:;[^?#]*)?)(\\?[^#]*)?(#[^]*)?$/;\n  var FIRST_SEGMENT_REGEX = /^(?=([^\\/?#]*))\\1([^]*)$/;\n  var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n  var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/)[^\\/]*(?=\\/)/g;\n\n  var URLToolkit = {\n    // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n    // E.g\n    // With opts.alwaysNormalize = false (default, spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n    // With opts.alwaysNormalize = true (not spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n    buildAbsoluteURL: function (baseURL, relativeURL, opts) {\n      opts = opts || {};\n      // remove any remaining space and CRLF\n      baseURL = baseURL.trim();\n      relativeURL = relativeURL.trim();\n      if (!relativeURL) {\n        // 2a) If the embedded URL is entirely empty, it inherits the\n        // entire base URL (i.e., is set equal to the base URL)\n        // and we are done.\n        if (!opts.alwaysNormalize) {\n          return baseURL;\n        }\n        var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n        if (!basePartsForNormalise) {\n          throw new Error('Error trying to parse base URL.');\n        }\n        basePartsForNormalise.path = URLToolkit.normalizePath(\n          basePartsForNormalise.path\n        );\n        return URLToolkit.buildURLFromParts(basePartsForNormalise);\n      }\n      var relativeParts = URLToolkit.parseURL(relativeURL);\n      if (!relativeParts) {\n        throw new Error('Error trying to parse relative URL.');\n      }\n      if (relativeParts.scheme) {\n        // 2b) If the embedded URL starts with a scheme name, it is\n        // interpreted as an absolute URL and we are done.\n        if (!opts.alwaysNormalize) {\n          return relativeURL;\n        }\n        relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n        return URLToolkit.buildURLFromParts(relativeParts);\n      }\n      var baseParts = URLToolkit.parseURL(baseURL);\n      if (!baseParts) {\n        throw new Error('Error trying to parse base URL.');\n      }\n      if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n        // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n        // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n        var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n        baseParts.netLoc = pathParts[1];\n        baseParts.path = pathParts[2];\n      }\n      if (baseParts.netLoc && !baseParts.path) {\n        baseParts.path = '/';\n      }\n      var builtParts = {\n        // 2c) Otherwise, the embedded URL inherits the scheme of\n        // the base URL.\n        scheme: baseParts.scheme,\n        netLoc: relativeParts.netLoc,\n        path: null,\n        params: relativeParts.params,\n        query: relativeParts.query,\n        fragment: relativeParts.fragment,\n      };\n      if (!relativeParts.netLoc) {\n        // 3) If the embedded URL's <net_loc> is non-empty, we skip to\n        // Step 7.  Otherwise, the embedded URL inherits the <net_loc>\n        // (if any) of the base URL.\n        builtParts.netLoc = baseParts.netLoc;\n        // 4) If the embedded URL path is preceded by a slash \"/\", the\n        // path is not relative and we skip to Step 7.\n        if (relativeParts.path[0] !== '/') {\n          if (!relativeParts.path) {\n            // 5) If the embedded URL path is empty (and not preceded by a\n            // slash), then the embedded URL inherits the base URL path\n            builtParts.path = baseParts.path;\n            // 5a) if the embedded URL's <params> is non-empty, we skip to\n            // step 7; otherwise, it inherits the <params> of the base\n            // URL (if any) and\n            if (!relativeParts.params) {\n              builtParts.params = baseParts.params;\n              // 5b) if the embedded URL's <query> is non-empty, we skip to\n              // step 7; otherwise, it inherits the <query> of the base\n              // URL (if any) and we skip to step 7.\n              if (!relativeParts.query) {\n                builtParts.query = baseParts.query;\n              }\n            }\n          } else {\n            // 6) The last segment of the base URL's path (anything\n            // following the rightmost slash \"/\", or the entire path if no\n            // slash is present) is removed and the embedded URL's path is\n            // appended in its place.\n            var baseURLPath = baseParts.path;\n            var newPath =\n              baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) +\n              relativeParts.path;\n            builtParts.path = URLToolkit.normalizePath(newPath);\n          }\n        }\n      }\n      if (builtParts.path === null) {\n        builtParts.path = opts.alwaysNormalize\n          ? URLToolkit.normalizePath(relativeParts.path)\n          : relativeParts.path;\n      }\n      return URLToolkit.buildURLFromParts(builtParts);\n    },\n    parseURL: function (url) {\n      var parts = URL_REGEX.exec(url);\n      if (!parts) {\n        return null;\n      }\n      return {\n        scheme: parts[1] || '',\n        netLoc: parts[2] || '',\n        path: parts[3] || '',\n        params: parts[4] || '',\n        query: parts[5] || '',\n        fragment: parts[6] || '',\n      };\n    },\n    normalizePath: function (path) {\n      // The following operations are\n      // then applied, in order, to the new path:\n      // 6a) All occurrences of \"./\", where \".\" is a complete path\n      // segment, are removed.\n      // 6b) If the path ends with \".\" as a complete path segment,\n      // that \".\" is removed.\n      path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\n      // 6c) All occurrences of \"<segment>/../\", where <segment> is a\n      // complete path segment not equal to \"..\", are removed.\n      // Removal of these path segments is performed iteratively,\n      // removing the leftmost matching pattern on each iteration,\n      // until no matching pattern remains.\n      // 6d) If the path ends with \"<segment>/..\", where <segment> is a\n      // complete path segment not equal to \"..\", that\n      // \"<segment>/..\" is removed.\n      while (\n        path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length\n      ) {}\n      return path.split('').reverse().join('');\n    },\n    buildURLFromParts: function (parts) {\n      return (\n        parts.scheme +\n        parts.netLoc +\n        parts.path +\n        parts.params +\n        parts.query +\n        parts.fragment\n      );\n    },\n  };\n\n  if (true)\n    module.exports = URLToolkit;\n  else {}\n})(this);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/url-toolkit/src/url-toolkit.js?");

/***/ }),

/***/ "./node_modules/video.js/dist/video.es.js":
/*!************************************************!*\
  !*** ./node_modules/video.js/dist/video.es.js ***!
  \************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \"./node_modules/global/document.js\");\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! keycode */ \"./node_modules/keycode/index.js\");\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/inheritsLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! safe-json-parse/tuple */ \"./node_modules/safe-json-parse/tuple.js\");\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @videojs/xhr */ \"./node_modules/@videojs/xhr/lib/index.js\");\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! videojs-vtt.js */ \"./node_modules/videojs-vtt.js/lib/browser-index.js\");\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/construct */ \"./node_modules/@babel/runtime/helpers/construct.js\");\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url.js */ \"./node_modules/@videojs/vhs-utils/es/resolve-url.js\");\n/* harmony import */ var m3u8_parser__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! m3u8-parser */ \"./node_modules/m3u8-parser/dist/m3u8-parser.es.js\");\n/* harmony import */ var _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @videojs/vhs-utils/es/codecs.js */ \"./node_modules/@videojs/vhs-utils/es/codecs.js\");\n/* harmony import */ var _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-types.js */ \"./node_modules/@videojs/vhs-utils/es/media-types.js\");\n/* harmony import */ var _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @videojs/vhs-utils/es/byte-helpers */ \"./node_modules/@videojs/vhs-utils/es/byte-helpers.js\");\n/* harmony import */ var mpd_parser__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mpd-parser */ \"./node_modules/mpd-parser/dist/mpd-parser.es.js\");\n/* harmony import */ var mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! mux.js/lib/tools/parse-sidx */ \"./node_modules/mux.js/lib/tools/parse-sidx.js\");\n/* harmony import */ var mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @videojs/vhs-utils/es/id3-helpers */ \"./node_modules/@videojs/vhs-utils/es/id3-helpers.js\");\n/* harmony import */ var _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @videojs/vhs-utils/es/containers */ \"./node_modules/@videojs/vhs-utils/es/containers.js\");\n/* harmony import */ var mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! mux.js/lib/utils/clock */ \"./node_modules/mux.js/lib/utils/clock.js\");\n/* harmony import */ var mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ \"./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\");\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_21__);\n/**\n * @license\n * Video.js 7.21.7 <http://videojs.com/>\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\n * Available under Apache License Version 2.0\n * <https://github.com/videojs/video.js/blob/main/LICENSE>\n *\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\n * Available under Apache License Version 2.0\n * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar version$5 = \"7.21.7\";\n\n/**\n * An Object that contains lifecycle hooks as keys which point to an array\n * of functions that are run when a lifecycle is triggered\n *\n * @private\n */\nvar hooks_ = {};\n/**\n * Get a list of hooks for a specific lifecycle\n *\n * @param  {string} type\n *         the lifecyle to get hooks from\n *\n * @param  {Function|Function[]} [fn]\n *         Optionally add a hook (or hooks) to the lifecycle that your are getting.\n *\n * @return {Array}\n *         an array of hooks, or an empty array if there are none.\n */\n\nvar hooks = function hooks(type, fn) {\n  hooks_[type] = hooks_[type] || [];\n\n  if (fn) {\n    hooks_[type] = hooks_[type].concat(fn);\n  }\n\n  return hooks_[type];\n};\n/**\n * Add a function hook to a specific videojs lifecycle.\n *\n * @param {string} type\n *        the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n *        The function or array of functions to attach.\n */\n\n\nvar hook = function hook(type, fn) {\n  hooks(type, fn);\n};\n/**\n * Remove a hook from a specific videojs lifecycle.\n *\n * @param  {string} type\n *         the lifecycle that the function hooked to\n *\n * @param  {Function} fn\n *         The hooked function to remove\n *\n * @return {boolean}\n *         The function that was removed or undef\n */\n\n\nvar removeHook = function removeHook(type, fn) {\n  var index = hooks(type).indexOf(fn);\n\n  if (index <= -1) {\n    return false;\n  }\n\n  hooks_[type] = hooks_[type].slice();\n  hooks_[type].splice(index, 1);\n  return true;\n};\n/**\n * Add a function hook that will only run once to a specific videojs lifecycle.\n *\n * @param {string} type\n *        the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n *        The function or array of functions to attach.\n */\n\n\nvar hookOnce = function hookOnce(type, fn) {\n  hooks(type, [].concat(fn).map(function (original) {\n    var wrapper = function wrapper() {\n      removeHook(type, wrapper);\n      return original.apply(void 0, arguments);\n    };\n\n    return wrapper;\n  }));\n};\n\n/**\n * @file fullscreen-api.js\n * @module fullscreen-api\n * @private\n */\n/**\n * Store the browser-specific methods for the fullscreen API.\n *\n * @type {Object}\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\n */\n\nvar FullscreenApi = {\n  prefixed: true\n}; // browser API methods\n\nvar apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], // WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], // Mozilla\n['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], // Microsoft\n['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError', '-ms-fullscreen']];\nvar specApi = apiMap[0];\nvar browserApi; // determine the supported set of functions\n\nfor (var i = 0; i < apiMap.length; i++) {\n  // check for exitFullscreen function\n  if (apiMap[i][1] in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n    browserApi = apiMap[i];\n    break;\n  }\n} // map the browser API names to the spec API names\n\n\nif (browserApi) {\n  for (var _i = 0; _i < browserApi.length; _i++) {\n    FullscreenApi[specApi[_i]] = browserApi[_i];\n  }\n\n  FullscreenApi.prefixed = browserApi[0] !== specApi[0];\n}\n\n/**\n * @file create-logger.js\n * @module create-logger\n */\n\nvar history = [];\n/**\n * Log messages to the console and history based on the type of message\n *\n * @private\n * @param  {string} type\n *         The name of the console method to use.\n *\n * @param  {Array} args\n *         The arguments to be passed to the matching console method.\n */\n\nvar LogByTypeFactory = function LogByTypeFactory(name, log) {\n  return function (type, level, args) {\n    var lvl = log.levels[level];\n    var lvlRegExp = new RegExp(\"^(\" + lvl + \")$\");\n\n    if (type !== 'log') {\n      // Add the type to the front of the message when it's not \"log\".\n      args.unshift(type.toUpperCase() + ':');\n    } // Add console prefix after adding to history.\n\n\n    args.unshift(name + ':'); // Add a clone of the args at this point to history.\n\n    if (history) {\n      history.push([].concat(args)); // only store 1000 history entries\n\n      var splice = history.length - 1000;\n      history.splice(0, splice > 0 ? splice : 0);\n    } // If there's no console then don't try to output messages, but they will\n    // still be stored in history.\n\n\n    if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console) {\n      return;\n    } // Was setting these once outside of this function, but containing them\n    // in the function makes it easier to test cases where console doesn't exist\n    // when the module is executed.\n\n\n    var fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console[type];\n\n    if (!fn && type === 'debug') {\n      // Certain browsers don't have support for console.debug. For those, we\n      // should default to the closest comparable log.\n      fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.info || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.log;\n    } // Bail out if there's no console or if this type is not allowed by the\n    // current logging level.\n\n\n    if (!fn || !lvl || !lvlRegExp.test(type)) {\n      return;\n    }\n\n    fn[Array.isArray(args) ? 'apply' : 'call'](global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console, args);\n  };\n};\n\nfunction createLogger$1(name) {\n  // This is the private tracking variable for logging level.\n  var level = 'info'; // the curried logByType bound to the specific log and history\n\n  var logByType;\n  /**\n   * Logs plain debug messages. Similar to `console.log`.\n   *\n   * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n   * of our JSDoc template, we cannot properly document this as both a function\n   * and a namespace, so its function signature is documented here.\n   *\n   * #### Arguments\n   * ##### *args\n   * Mixed[]\n   *\n   * Any combination of values that could be passed to `console.log()`.\n   *\n   * #### Return Value\n   *\n   * `undefined`\n   *\n   * @namespace\n   * @param    {Mixed[]} args\n   *           One or more messages or objects that should be logged.\n   */\n\n  var log = function log() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    logByType('log', level, args);\n  }; // This is the logByType helper that the logging methods below use\n\n\n  logByType = LogByTypeFactory(name, log);\n  /**\n   * Create a new sublogger which chains the old name to the new name.\n   *\n   * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:\n   * ```js\n   *  mylogger('foo');\n   *  // > VIDEOJS: player: foo\n   * ```\n   *\n   * @param {string} name\n   *        The name to add call the new logger\n   * @return {Object}\n   */\n\n  log.createLogger = function (subname) {\n    return createLogger$1(name + ': ' + subname);\n  };\n  /**\n   * Enumeration of available logging levels, where the keys are the level names\n   * and the values are `|`-separated strings containing logging methods allowed\n   * in that logging level. These strings are used to create a regular expression\n   * matching the function name being called.\n   *\n   * Levels provided by Video.js are:\n   *\n   * - `off`: Matches no calls. Any value that can be cast to `false` will have\n   *   this effect. The most restrictive.\n   * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\n   *   `log.warn`, and `log.error`).\n   * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\n   * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\n   * - `warn`: Matches `log.warn` and `log.error` calls.\n   * - `error`: Matches only `log.error` calls.\n   *\n   * @type {Object}\n   */\n\n\n  log.levels = {\n    all: 'debug|log|warn|error',\n    off: '',\n    debug: 'debug|log|warn|error',\n    info: 'log|warn|error',\n    warn: 'warn|error',\n    error: 'error',\n    DEFAULT: level\n  };\n  /**\n   * Get or set the current logging level.\n   *\n   * If a string matching a key from {@link module:log.levels} is provided, acts\n   * as a setter.\n   *\n   * @param  {string} [lvl]\n   *         Pass a valid level to set a new logging level.\n   *\n   * @return {string}\n   *         The current logging level.\n   */\n\n  log.level = function (lvl) {\n    if (typeof lvl === 'string') {\n      if (!log.levels.hasOwnProperty(lvl)) {\n        throw new Error(\"\\\"\" + lvl + \"\\\" in not a valid log level\");\n      }\n\n      level = lvl;\n    }\n\n    return level;\n  };\n  /**\n   * Returns an array containing everything that has been logged to the history.\n   *\n   * This array is a shallow clone of the internal history record. However, its\n   * contents are _not_ cloned; so, mutating objects inside this array will\n   * mutate them in history.\n   *\n   * @return {Array}\n   */\n\n\n  log.history = function () {\n    return history ? [].concat(history) : [];\n  };\n  /**\n   * Allows you to filter the history by the given logger name\n   *\n   * @param {string} fname\n   *        The name to filter by\n   *\n   * @return {Array}\n   *         The filtered list to return\n   */\n\n\n  log.history.filter = function (fname) {\n    return (history || []).filter(function (historyItem) {\n      // if the first item in each historyItem includes `fname`, then it's a match\n      return new RegExp(\".*\" + fname + \".*\").test(historyItem[0]);\n    });\n  };\n  /**\n   * Clears the internal history tracking, but does not prevent further history\n   * tracking.\n   */\n\n\n  log.history.clear = function () {\n    if (history) {\n      history.length = 0;\n    }\n  };\n  /**\n   * Disable history tracking if it is currently enabled.\n   */\n\n\n  log.history.disable = function () {\n    if (history !== null) {\n      history.length = 0;\n      history = null;\n    }\n  };\n  /**\n   * Enable history tracking if it is currently disabled.\n   */\n\n\n  log.history.enable = function () {\n    if (history === null) {\n      history = [];\n    }\n  };\n  /**\n   * Logs error messages. Similar to `console.error`.\n   *\n   * @param {Mixed[]} args\n   *        One or more messages or objects that should be logged as an error\n   */\n\n\n  log.error = function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return logByType('error', level, args);\n  };\n  /**\n   * Logs warning messages. Similar to `console.warn`.\n   *\n   * @param {Mixed[]} args\n   *        One or more messages or objects that should be logged as a warning.\n   */\n\n\n  log.warn = function () {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    return logByType('warn', level, args);\n  };\n  /**\n   * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\n   * log if `console.debug` is not available\n   *\n   * @param {Mixed[]} args\n   *        One or more messages or objects that should be logged as debug.\n   */\n\n\n  log.debug = function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    return logByType('debug', level, args);\n  };\n\n  return log;\n}\n\n/**\n * @file log.js\n * @module log\n */\nvar log$1 = createLogger$1('VIDEOJS');\nvar createLogger = log$1.createLogger;\n\n/**\n * @file obj.js\n * @module obj\n */\n\n/**\n * @callback obj:EachCallback\n *\n * @param {Mixed} value\n *        The current key for the object that is being iterated over.\n *\n * @param {string} key\n *        The current key-value for object that is being iterated over\n */\n\n/**\n * @callback obj:ReduceCallback\n *\n * @param {Mixed} accum\n *        The value that is accumulating over the reduce loop.\n *\n * @param {Mixed} value\n *        The current key for the object that is being iterated over.\n *\n * @param {string} key\n *        The current key-value for object that is being iterated over\n *\n * @return {Mixed}\n *         The new accumulated value.\n */\nvar toString = Object.prototype.toString;\n/**\n * Get the keys of an Object\n *\n * @param {Object}\n *        The Object to get the keys from\n *\n * @return {string[]}\n *         An array of the keys from the object. Returns an empty array if the\n *         object passed in was invalid or had no keys.\n *\n * @private\n */\n\nvar keys = function keys(object) {\n  return isObject(object) ? Object.keys(object) : [];\n};\n/**\n * Array-like iteration for objects.\n *\n * @param {Object} object\n *        The object to iterate over\n *\n * @param {obj:EachCallback} fn\n *        The callback function which is called for each key in the object.\n */\n\n\nfunction each(object, fn) {\n  keys(object).forEach(function (key) {\n    return fn(object[key], key);\n  });\n}\n/**\n * Array-like reduce for objects.\n *\n * @param {Object} object\n *        The Object that you want to reduce.\n *\n * @param {Function} fn\n *         A callback function which is called for each key in the object. It\n *         receives the accumulated value and the per-iteration value and key\n *         as arguments.\n *\n * @param {Mixed} [initial = 0]\n *        Starting value\n *\n * @return {Mixed}\n *         The final accumulated value.\n */\n\nfunction reduce(object, fn, initial) {\n  if (initial === void 0) {\n    initial = 0;\n  }\n\n  return keys(object).reduce(function (accum, key) {\n    return fn(accum, object[key], key);\n  }, initial);\n}\n/**\n * Object.assign-style object shallow merge/extend.\n *\n * @param  {Object} target\n * @param  {Object} ...sources\n * @return {Object}\n */\n\nfunction assign(target) {\n  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    sources[_key - 1] = arguments[_key];\n  }\n\n  if (Object.assign) {\n    return _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default.a.apply(void 0, [target].concat(sources));\n  }\n\n  sources.forEach(function (source) {\n    if (!source) {\n      return;\n    }\n\n    each(source, function (value, key) {\n      target[key] = value;\n    });\n  });\n  return target;\n}\n/**\n * Returns whether a value is an object of any kind - including DOM nodes,\n * arrays, regular expressions, etc. Not functions, though.\n *\n * This avoids the gotcha where using `typeof` on a `null` value\n * results in `'object'`.\n *\n * @param  {Object} value\n * @return {boolean}\n */\n\nfunction isObject(value) {\n  return !!value && typeof value === 'object';\n}\n/**\n * Returns whether an object appears to be a \"plain\" object - that is, a\n * direct instance of `Object`.\n *\n * @param  {Object} value\n * @return {boolean}\n */\n\nfunction isPlain(value) {\n  return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\n}\n\n/**\n * @file computed-style.js\n * @module computed-style\n */\n/**\n * A safe getComputedStyle.\n *\n * This is needed because in Firefox, if the player is loaded in an iframe with\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\n * null-check to make sure that the player doesn't break in these cases.\n *\n * @function\n * @param    {Element} el\n *           The element you want the computed style of\n *\n * @param    {string} prop\n *           The property name you want\n *\n * @see      https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\n\nfunction computedStyle(el, prop) {\n  if (!el || !prop) {\n    return '';\n  }\n\n  if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle === 'function') {\n    var computedStyleValue;\n\n    try {\n      computedStyleValue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\n    } catch (e) {\n      return '';\n    }\n\n    return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\n  }\n\n  return '';\n}\n\n/**\n * @file browser.js\n * @module browser\n */\nvar USER_AGENT = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || '';\nvar webkitVersionMap = /AppleWebKit\\/([\\d.]+)/i.exec(USER_AGENT);\nvar appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n/**\n * Whether or not this device is an iPod.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @const\n * @type {string|null}\n */\n\nvar IOS_VERSION = function () {\n  var match = USER_AGENT.match(/OS (\\d+)_/i);\n\n  if (match && match[1]) {\n    return match[1];\n  }\n\n  return null;\n}();\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\n/**\n * The detected Android version - or `null`.\n *\n * @static\n * @const\n * @type {number|string|null}\n */\n\nvar ANDROID_VERSION = function () {\n  // This matches Android Major.Minor.Patch versions\n  // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n  var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n\n  if (!match) {\n    return null;\n  }\n\n  var major = match[1] && parseFloat(match[1]);\n  var minor = match[2] && parseFloat(match[2]);\n\n  if (major && minor) {\n    return parseFloat(match[1] + '.' + match[2]);\n  } else if (major) {\n    return major;\n  }\n\n  return null;\n}();\n/**\n * Whether or not this is a native Android browser.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_EDGE = /Edg/i.test(USER_AGENT);\n/**\n * Whether or not this is Google Chrome.\n *\n * This will also be `true` for Chrome on iOS, which will have different support\n * as it is actually Safari under the hood.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_CHROME = !IS_EDGE && (/Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT));\n/**\n * The detected Google Chrome version - or `null`.\n *\n * @static\n * @const\n * @type {number|null}\n */\n\nvar CHROME_VERSION = function () {\n  var match = USER_AGENT.match(/(Chrome|CriOS)\\/(\\d+)/);\n\n  if (match && match[2]) {\n    return parseFloat(match[2]);\n  }\n\n  return null;\n}();\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @const\n * @type {number|null}\n */\n\nvar IE_VERSION = function () {\n  var result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n  var version = result && parseFloat(result[1]);\n\n  if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n    // IE 11 has a different user agent string than other IE versions\n    version = 11.0;\n  }\n\n  return version;\n}();\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_WINDOWS = /Windows/i.test(USER_AGENT);\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in global_window__WEBPACK_IMPORTED_MODULE_0___default.a || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.maxTouchPoints || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch));\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\n/**\n * Whether or not this device is an iPhone.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\n\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\n/**\n * Whether or not this is an iOS device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n/**\n * Whether or not this is any flavor of Safari - including iOS.\n *\n * @static\n * @const\n * @type {Boolean}\n */\n\nvar IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n\nvar browser = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  IS_IPOD: IS_IPOD,\n  IOS_VERSION: IOS_VERSION,\n  IS_ANDROID: IS_ANDROID,\n  ANDROID_VERSION: ANDROID_VERSION,\n  IS_NATIVE_ANDROID: IS_NATIVE_ANDROID,\n  IS_FIREFOX: IS_FIREFOX,\n  IS_EDGE: IS_EDGE,\n  IS_CHROME: IS_CHROME,\n  CHROME_VERSION: CHROME_VERSION,\n  IE_VERSION: IE_VERSION,\n  IS_SAFARI: IS_SAFARI,\n  IS_WINDOWS: IS_WINDOWS,\n  TOUCH_ENABLED: TOUCH_ENABLED,\n  IS_IPAD: IS_IPAD,\n  IS_IPHONE: IS_IPHONE,\n  IS_IOS: IS_IOS,\n  IS_ANY_SAFARI: IS_ANY_SAFARI\n});\n\n/**\n * @file dom.js\n * @module dom\n */\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @private\n * @param  {string} str\n *         The string to check\n *\n * @return {boolean}\n *         Will be `true` if the string is non-blank, `false` otherwise.\n *\n */\n\nfunction isNonBlankString(str) {\n  // we use str.trim as it will trim any whitespace characters\n  // from the front or back of non-whitespace characters. aka\n  // Any string that contains non-whitespace characters will\n  // still contain them after `trim` but whitespace only strings\n  // will have a length of 0, failing this check.\n  return typeof str === 'string' && Boolean(str.trim());\n}\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @private\n * @param  {string} str\n *         The string to check for whitespace.\n *\n * @throws {Error}\n *         Throws an error if there is whitespace in the string.\n */\n\n\nfunction throwIfWhitespace(str) {\n  // str.indexOf instead of regex because str.indexOf is faster performance wise.\n  if (str.indexOf(' ') >= 0) {\n    throw new Error('class has illegal whitespace characters');\n  }\n}\n/**\n * Produce a regular expression for matching a className within an elements className.\n *\n * @private\n * @param  {string} className\n *         The className to generate the RegExp for.\n *\n * @return {RegExp}\n *         The RegExp that will check for a specific `className` in an elements\n *         className.\n */\n\n\nfunction classRegExp(className) {\n  return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n/**\n * Whether the current DOM interface appears to be real (i.e. not simulated).\n *\n * @return {boolean}\n *         Will be `true` if the DOM appears to be real, `false` otherwise.\n */\n\n\nfunction isReal() {\n  // Both document and window will never be undefined thanks to `global`.\n  return global_document__WEBPACK_IMPORTED_MODULE_1___default.a === global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document;\n}\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @param  {Mixed} value\n *         The value to check.\n *\n * @return {boolean}\n *         Will be `true` if the value is a DOM element, `false` otherwise.\n */\n\nfunction isEl(value) {\n  return isObject(value) && value.nodeType === 1;\n}\n/**\n * Determines if the current DOM is embedded in an iframe.\n *\n * @return {boolean}\n *         Will be `true` if the DOM is embedded in an iframe, `false`\n *         otherwise.\n */\n\nfunction isInFrame() {\n  // We need a try/catch here because Safari will throw errors when attempting\n  // to get either `parent` or `self`\n  try {\n    return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parent !== global_window__WEBPACK_IMPORTED_MODULE_0___default.a.self;\n  } catch (x) {\n    return true;\n  }\n}\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @private\n * @param   {string} method\n *          The method to create the query with.\n *\n * @return  {Function}\n *          The query method\n */\n\nfunction createQuerier(method) {\n  return function (selector, context) {\n    if (!isNonBlankString(selector)) {\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a[method](null);\n    }\n\n    if (isNonBlankString(context)) {\n      context = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.querySelector(context);\n    }\n\n    var ctx = isEl(context) ? context : global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\n    return ctx[method] && ctx[method](selector);\n  };\n}\n/**\n * Creates an element and applies properties, attributes, and inserts content.\n *\n * @param  {string} [tagName='div']\n *         Name of tag to be created.\n *\n * @param  {Object} [properties={}]\n *         Element properties to be applied.\n *\n * @param  {Object} [attributes={}]\n *         Element attributes to be applied.\n *\n * @param {module:dom~ContentDescriptor} content\n *        A content descriptor object.\n *\n * @return {Element}\n *         The element that was created.\n */\n\n\nfunction createEl(tagName, properties, attributes, content) {\n  if (tagName === void 0) {\n    tagName = 'div';\n  }\n\n  if (properties === void 0) {\n    properties = {};\n  }\n\n  if (attributes === void 0) {\n    attributes = {};\n  }\n\n  var el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(tagName);\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\n    var val = properties[propName]; // See #2176\n    // We originally were accepting both properties and attributes in the\n    // same object, but that doesn't work so well.\n\n    if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n      log$1.warn('Setting attributes in the second argument of createEl()\\n' + 'has been deprecated. Use the third argument instead.\\n' + (\"createEl(type, properties, attributes). Attempting to set \" + propName + \" to \" + val + \".\"));\n      el.setAttribute(propName, val); // Handle textContent since it's not supported everywhere and we have a\n      // method for it.\n    } else if (propName === 'textContent') {\n      textContent(el, val);\n    } else if (el[propName] !== val || propName === 'tabIndex') {\n      el[propName] = val;\n    }\n  });\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n    el.setAttribute(attrName, attributes[attrName]);\n  });\n\n  if (content) {\n    appendContent(el, content);\n  }\n\n  return el;\n}\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param  {Element} el\n *         The element to add text content into\n *\n * @param  {string} text\n *         The text content to add.\n *\n * @return {Element}\n *         The element with added text content.\n */\n\nfunction textContent(el, text) {\n  if (typeof el.textContent === 'undefined') {\n    el.innerText = text;\n  } else {\n    el.textContent = text;\n  }\n\n  return el;\n}\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child\n *        Element to insert\n *\n * @param {Element} parent\n *        Element to insert child into\n */\n\nfunction prependTo(child, parent) {\n  if (parent.firstChild) {\n    parent.insertBefore(child, parent.firstChild);\n  } else {\n    parent.appendChild(child);\n  }\n}\n/**\n * Check if an element has a class name.\n *\n * @param  {Element} element\n *         Element to check\n *\n * @param  {string} classToCheck\n *         Class name to check for\n *\n * @return {boolean}\n *         Will be `true` if the element has a class, `false` otherwise.\n *\n * @throws {Error}\n *         Throws an error if `classToCheck` has white space.\n */\n\nfunction hasClass(element, classToCheck) {\n  throwIfWhitespace(classToCheck);\n\n  if (element.classList) {\n    return element.classList.contains(classToCheck);\n  }\n\n  return classRegExp(classToCheck).test(element.className);\n}\n/**\n * Add a class name to an element.\n *\n * @param  {Element} element\n *         Element to add class name to.\n *\n * @param  {string} classToAdd\n *         Class name to add.\n *\n * @return {Element}\n *         The DOM element with the added class name.\n */\n\nfunction addClass(element, classToAdd) {\n  if (element.classList) {\n    element.classList.add(classToAdd); // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n    // in the case of classList not being supported.\n  } else if (!hasClass(element, classToAdd)) {\n    element.className = (element.className + ' ' + classToAdd).trim();\n  }\n\n  return element;\n}\n/**\n * Remove a class name from an element.\n *\n * @param  {Element} element\n *         Element to remove a class name from.\n *\n * @param  {string} classToRemove\n *         Class name to remove\n *\n * @return {Element}\n *         The DOM element with class name removed.\n */\n\nfunction removeClass(element, classToRemove) {\n  // Protect in case the player gets disposed\n  if (!element) {\n    log$1.warn(\"removeClass was called with an element that doesn't exist\");\n    return null;\n  }\n\n  if (element.classList) {\n    element.classList.remove(classToRemove);\n  } else {\n    throwIfWhitespace(classToRemove);\n    element.className = element.className.split(/\\s+/).filter(function (c) {\n      return c !== classToRemove;\n    }).join(' ');\n  }\n\n  return element;\n}\n/**\n * The callback definition for toggleClass.\n *\n * @callback module:dom~PredicateCallback\n * @param    {Element} element\n *           The DOM element of the Component.\n *\n * @param    {string} classToToggle\n *           The `className` that wants to be toggled\n *\n * @return   {boolean|undefined}\n *           If `true` is returned, the `classToToggle` will be added to the\n *           `element`. If `false`, the `classToToggle` will be removed from\n *           the `element`. If `undefined`, the callback will be ignored.\n */\n\n/**\n * Adds or removes a class name to/from an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @param  {Element} element\n *         The element to toggle a class name on.\n *\n * @param  {string} classToToggle\n *         The class that should be toggled.\n *\n * @param  {boolean|module:dom~PredicateCallback} [predicate]\n *         See the return value for {@link module:dom~PredicateCallback}\n *\n * @return {Element}\n *         The element with a class that has been toggled.\n */\n\nfunction toggleClass(element, classToToggle, predicate) {\n  // This CANNOT use `classList` internally because IE11 does not support the\n  // second parameter to the `classList.toggle()` method! Which is fine because\n  // `classList` will be used by the add/remove functions.\n  var has = hasClass(element, classToToggle);\n\n  if (typeof predicate === 'function') {\n    predicate = predicate(element, classToToggle);\n  }\n\n  if (typeof predicate !== 'boolean') {\n    predicate = !has;\n  } // If the necessary class operation matches the current state of the\n  // element, no action is required.\n\n\n  if (predicate === has) {\n    return;\n  }\n\n  if (predicate) {\n    addClass(element, classToToggle);\n  } else {\n    removeClass(element, classToToggle);\n  }\n\n  return element;\n}\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el\n *        Element to add attributes to.\n *\n * @param {Object} [attributes]\n *        Attributes to be applied.\n */\n\nfunction setAttributes(el, attributes) {\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n    var attrValue = attributes[attrName];\n\n    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n      el.removeAttribute(attrName);\n    } else {\n      el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n    }\n  });\n}\n/**\n * Get an element's attribute values, as defined on the HTML tag.\n *\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute.\n *\n * @param  {Element} tag\n *         Element from which to get tag attributes.\n *\n * @return {Object}\n *         All attributes of the element. Boolean attributes will be `true` or\n *         `false`, others will be strings.\n */\n\nfunction getAttributes(tag) {\n  var obj = {}; // known boolean attributes\n  // we can check for matching boolean properties, but not all browsers\n  // and not all tags know about these attributes, so, we still want to check them manually\n\n  var knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ',';\n\n  if (tag && tag.attributes && tag.attributes.length > 0) {\n    var attrs = tag.attributes;\n\n    for (var i = attrs.length - 1; i >= 0; i--) {\n      var attrName = attrs[i].name;\n      var attrVal = attrs[i].value; // check for known booleans\n      // the matching element property will return a value for typeof\n\n      if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {\n        // the value of an included boolean attribute is typically an empty\n        // string ('') which would equal false if we just check for a false value.\n        // we also don't want support bad code like autoplay='false'\n        attrVal = attrVal !== null ? true : false;\n      }\n\n      obj[attrName] = attrVal;\n    }\n  }\n\n  return obj;\n}\n/**\n * Get the value of an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to get the value of.\n *\n * @return {string}\n *         The value of the attribute.\n */\n\nfunction getAttribute(el, attribute) {\n  return el.getAttribute(attribute);\n}\n/**\n * Set the value of an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to set.\n *\n * @param {string} value\n *        Value to set the attribute to.\n */\n\nfunction setAttribute(el, attribute, value) {\n  el.setAttribute(attribute, value);\n}\n/**\n * Remove an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to remove.\n */\n\nfunction removeAttribute(el, attribute) {\n  el.removeAttribute(attribute);\n}\n/**\n * Attempt to block the ability to select text.\n */\n\nfunction blockTextSelection() {\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.focus();\n\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\n    return false;\n  };\n}\n/**\n * Turn off text selection blocking.\n */\n\nfunction unblockTextSelection() {\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\n    return true;\n  };\n}\n/**\n * Identical to the native `getBoundingClientRect` function, but ensures that\n * the method is supported at all (it is in all browsers we claim to support)\n * and that the element is in the DOM before continuing.\n *\n * This wrapper function also shims properties which are not provided by some\n * older browsers (namely, IE8).\n *\n * Additionally, some browsers do not support adding properties to a\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\n * properties (except `x` and `y` which are not widely supported). This helps\n * avoid implementations where keys are non-enumerable.\n *\n * @param  {Element} el\n *         Element whose `ClientRect` we want to calculate.\n *\n * @return {Object|undefined}\n *         Always returns a plain object - or `undefined` if it cannot.\n */\n\nfunction getBoundingClientRect(el) {\n  if (el && el.getBoundingClientRect && el.parentNode) {\n    var rect = el.getBoundingClientRect();\n    var result = {};\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) {\n      if (rect[k] !== undefined) {\n        result[k] = rect[k];\n      }\n    });\n\n    if (!result.height) {\n      result.height = parseFloat(computedStyle(el, 'height'));\n    }\n\n    if (!result.width) {\n      result.width = parseFloat(computedStyle(el, 'width'));\n    }\n\n    return result;\n  }\n}\n/**\n * Represents the position of a DOM element on the page.\n *\n * @typedef  {Object} module:dom~Position\n *\n * @property {number} left\n *           Pixels to the left.\n *\n * @property {number} top\n *           Pixels from the top.\n */\n\n/**\n * Get the position of an element in the DOM.\n *\n * Uses `getBoundingClientRect` technique from John Resig.\n *\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @param  {Element} el\n *         Element from which to get offset.\n *\n * @return {module:dom~Position}\n *         The position of the element that was passed in.\n */\n\nfunction findPosition(el) {\n  if (!el || el && !el.offsetParent) {\n    return {\n      left: 0,\n      top: 0,\n      width: 0,\n      height: 0\n    };\n  }\n\n  var width = el.offsetWidth;\n  var height = el.offsetHeight;\n  var left = 0;\n  var top = 0;\n\n  while (el.offsetParent && el !== global_document__WEBPACK_IMPORTED_MODULE_1___default.a[FullscreenApi.fullscreenElement]) {\n    left += el.offsetLeft;\n    top += el.offsetTop;\n    el = el.offsetParent;\n  }\n\n  return {\n    left: left,\n    top: top,\n    width: width,\n    height: height\n  };\n}\n/**\n * Represents x and y coordinates for a DOM element or mouse pointer.\n *\n * @typedef  {Object} module:dom~Coordinates\n *\n * @property {number} x\n *           x coordinate in pixels\n *\n * @property {number} y\n *           y coordinate in pixels\n */\n\n/**\n * Get the pointer position within an element.\n *\n * The base on the coordinates are the bottom left of the element.\n *\n * @param  {Element} el\n *         Element on which to get the pointer position on.\n *\n * @param  {EventTarget~Event} event\n *         Event object.\n *\n * @return {module:dom~Coordinates}\n *         A coordinates object corresponding to the mouse position.\n *\n */\n\nfunction getPointerPosition(el, event) {\n  var translated = {\n    x: 0,\n    y: 0\n  };\n\n  if (IS_IOS) {\n    var item = el;\n\n    while (item && item.nodeName.toLowerCase() !== 'html') {\n      var transform = computedStyle(item, 'transform');\n\n      if (/^matrix/.test(transform)) {\n        var values = transform.slice(7, -1).split(/,\\s/).map(Number);\n        translated.x += values[4];\n        translated.y += values[5];\n      } else if (/^matrix3d/.test(transform)) {\n        var _values = transform.slice(9, -1).split(/,\\s/).map(Number);\n\n        translated.x += _values[12];\n        translated.y += _values[13];\n      }\n\n      item = item.parentNode;\n    }\n  }\n\n  var position = {};\n  var boxTarget = findPosition(event.target);\n  var box = findPosition(el);\n  var boxW = box.width;\n  var boxH = box.height;\n  var offsetY = event.offsetY - (box.top - boxTarget.top);\n  var offsetX = event.offsetX - (box.left - boxTarget.left);\n\n  if (event.changedTouches) {\n    offsetX = event.changedTouches[0].pageX - box.left;\n    offsetY = event.changedTouches[0].pageY + box.top;\n\n    if (IS_IOS) {\n      offsetX -= translated.x;\n      offsetY -= translated.y;\n    }\n  }\n\n  position.y = 1 - Math.max(0, Math.min(1, offsetY / boxH));\n  position.x = Math.max(0, Math.min(1, offsetX / boxW));\n  return position;\n}\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param  {Mixed} value\n *         Check if this value is a text node.\n *\n * @return {boolean}\n *         Will be `true` if the value is a text node, `false` otherwise.\n */\n\nfunction isTextNode(value) {\n  return isObject(value) && value.nodeType === 3;\n}\n/**\n * Empties the contents of an element.\n *\n * @param  {Element} el\n *         The element to empty children from\n *\n * @return {Element}\n *         The element with no children\n */\n\nfunction emptyEl(el) {\n  while (el.firstChild) {\n    el.removeChild(el.firstChild);\n  }\n\n  return el;\n}\n/**\n * This is a mixed value that describes content to be injected into the DOM\n * via some method. It can be of the following types:\n *\n * Type       | Description\n * -----------|-------------\n * `string`   | The value will be normalized into a text node.\n * `Element`  | The value will be accepted as-is.\n * `TextNode` | The value will be accepted as-is.\n * `Array`    | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\n *\n * @typedef {string|Element|TextNode|Array|Function} module:dom~ContentDescriptor\n */\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but helps protect\n * from falling into the trap of simply writing to `innerHTML`, which could\n * be an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * @param {module:dom~ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Array}\n *         All of the content that was passed in, normalized to an array of\n *         elements or text nodes.\n */\n\nfunction normalizeContent(content) {\n  // First, invoke content if it is a function. If it produces an array,\n  // that needs to happen before normalization.\n  if (typeof content === 'function') {\n    content = content();\n  } // Next up, normalize to an array, so one or many items can be normalized,\n  // filtered, and returned.\n\n\n  return (Array.isArray(content) ? content : [content]).map(function (value) {\n    // First, invoke value if it is a function to produce a new value,\n    // which will be subsequently normalized to a Node of some kind.\n    if (typeof value === 'function') {\n      value = value();\n    }\n\n    if (isEl(value) || isTextNode(value)) {\n      return value;\n    }\n\n    if (typeof value === 'string' && /\\S/.test(value)) {\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(value);\n    }\n  }).filter(function (value) {\n    return value;\n  });\n}\n/**\n * Normalizes and appends content to an element.\n *\n * @param  {Element} el\n *         Element to append normalized content to.\n *\n * @param {module:dom~ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Element}\n *         The element with appended normalized content.\n */\n\nfunction appendContent(el, content) {\n  normalizeContent(content).forEach(function (node) {\n    return el.appendChild(node);\n  });\n  return el;\n}\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @param {Element} el\n *        Element to insert normalized content into.\n *\n * @param {module:dom~ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Element}\n *         The element with inserted normalized content.\n */\n\nfunction insertContent(el, content) {\n  return appendContent(emptyEl(el), content);\n}\n/**\n * Check if an event was a single left click.\n *\n * @param  {EventTarget~Event} event\n *         Event object.\n *\n * @return {boolean}\n *         Will be `true` if a single left click, `false` otherwise.\n */\n\nfunction isSingleLeftClick(event) {\n  // Note: if you create something draggable, be sure to\n  // call it on both `mousedown` and `mousemove` event,\n  // otherwise `mousedown` should be enough for a button\n  if (event.button === undefined && event.buttons === undefined) {\n    // Why do we need `buttons` ?\n    // Because, middle mouse sometimes have this:\n    // e.button === 0 and e.buttons === 4\n    // Furthermore, we want to prevent combination click, something like\n    // HOLD middlemouse then left click, that would be\n    // e.button === 0, e.buttons === 5\n    // just `button` is not gonna work\n    // Alright, then what this block does ?\n    // this is for chrome `simulate mobile devices`\n    // I want to support this as well\n    return true;\n  }\n\n  if (event.button === 0 && event.buttons === undefined) {\n    // Touch screen, sometimes on some specific device, `buttons`\n    // doesn't have anything (safari on ios, blackberry...)\n    return true;\n  } // `mouseup` event on a single left click has\n  // `button` and `buttons` equal to 0\n\n\n  if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\n    return true;\n  }\n\n  if (event.button !== 0 || event.buttons !== 1) {\n    // This is the reason we have those if else block above\n    // if any special case we can catch and let it slide\n    // we do it above, when get to here, this definitely\n    // is-not-left-click\n    return false;\n  }\n\n  return true;\n}\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param  {string} selector\n *         A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param  {Element|String} [context=document]\n *         A DOM element within which to query. Can also be a selector\n *         string in which case the first matching element will be used\n *         as context. If missing (or no element matches selector), falls\n *         back to `document`.\n *\n * @return {Element|null}\n *         The element that was found or null.\n */\n\nvar $ = createQuerier('querySelector');\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param  {string} selector\n *         A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param  {Element|String} [context=document]\n *         A DOM element within which to query. Can also be a selector\n *         string in which case the first matching element will be used\n *         as context. If missing (or no element matches selector), falls\n *         back to `document`.\n *\n * @return {NodeList}\n *         A element list of elements that were found. Will be empty if none\n *         were found.\n *\n */\n\nvar $$ = createQuerier('querySelectorAll');\n\nvar Dom = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  isReal: isReal,\n  isEl: isEl,\n  isInFrame: isInFrame,\n  createEl: createEl,\n  textContent: textContent,\n  prependTo: prependTo,\n  hasClass: hasClass,\n  addClass: addClass,\n  removeClass: removeClass,\n  toggleClass: toggleClass,\n  setAttributes: setAttributes,\n  getAttributes: getAttributes,\n  getAttribute: getAttribute,\n  setAttribute: setAttribute,\n  removeAttribute: removeAttribute,\n  blockTextSelection: blockTextSelection,\n  unblockTextSelection: unblockTextSelection,\n  getBoundingClientRect: getBoundingClientRect,\n  findPosition: findPosition,\n  getPointerPosition: getPointerPosition,\n  isTextNode: isTextNode,\n  emptyEl: emptyEl,\n  normalizeContent: normalizeContent,\n  appendContent: appendContent,\n  insertContent: insertContent,\n  isSingleLeftClick: isSingleLeftClick,\n  $: $,\n  $$: $$\n});\n\n/**\n * @file setup.js - Functions for setting up a player without\n * user interaction based on the data-setup `attribute` of the video tag.\n *\n * @module setup\n */\nvar _windowLoaded = false;\nvar videojs$1;\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\n\nvar autoSetup = function autoSetup() {\n  if (videojs$1.options.autoSetup === false) {\n    return;\n  }\n\n  var vids = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video'));\n  var audios = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('audio'));\n  var divs = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video-js'));\n  var mediaEls = vids.concat(audios, divs); // Check if any media elements exist\n\n  if (mediaEls && mediaEls.length > 0) {\n    for (var i = 0, e = mediaEls.length; i < e; i++) {\n      var mediaEl = mediaEls[i]; // Check if element exists, has getAttribute func.\n\n      if (mediaEl && mediaEl.getAttribute) {\n        // Make sure this player hasn't already been set up.\n        if (mediaEl.player === undefined) {\n          var options = mediaEl.getAttribute('data-setup'); // Check if data-setup attr exists.\n          // We only auto-setup if they've added the data-setup attr.\n\n          if (options !== null) {\n            // Create new video.js instance.\n            videojs$1(mediaEl);\n          }\n        } // If getAttribute isn't defined, we need to wait for the DOM.\n\n      } else {\n        autoSetupTimeout(1);\n        break;\n      }\n    } // No videos were found, so keep looping unless page is finished loading.\n\n  } else if (!_windowLoaded) {\n    autoSetupTimeout(1);\n  }\n};\n/**\n * Wait until the page is loaded before running autoSetup. This will be called in\n * autoSetup if `hasLoaded` returns false.\n *\n * @param {number} wait\n *        How long to wait in ms\n *\n * @param {module:videojs} [vjs]\n *        The videojs library function\n */\n\n\nfunction autoSetupTimeout(wait, vjs) {\n  // Protect against breakage in non-browser environments\n  if (!isReal()) {\n    return;\n  }\n\n  if (vjs) {\n    videojs$1 = vjs;\n  }\n\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(autoSetup, wait);\n}\n/**\n * Used to set the internal tracking of window loaded state to true.\n *\n * @private\n */\n\n\nfunction setWindowLoaded() {\n  _windowLoaded = true;\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('load', setWindowLoaded);\n}\n\nif (isReal()) {\n  if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.readyState === 'complete') {\n    setWindowLoaded();\n  } else {\n    /**\n     * Listen for the load event on window, and set _windowLoaded to true.\n     *\n     * We use a standard event listener here to avoid incrementing the GUID\n     * before any players are created.\n     *\n     * @listens load\n     */\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('load', setWindowLoaded);\n  }\n}\n\n/**\n * @file stylesheet.js\n * @module stylesheet\n */\n/**\n * Create a DOM syle element given a className for it.\n *\n * @param {string} className\n *        The className to add to the created style element.\n *\n * @return {Element}\n *         The element that was created.\n */\n\nvar createStyleElement = function createStyleElement(className) {\n  var style = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('style');\n  style.className = className;\n  return style;\n};\n/**\n * Add text to a DOM element.\n *\n * @param {Element} el\n *        The Element to add text content to.\n *\n * @param {string} content\n *        The text to add to the element.\n */\n\nvar setTextContent = function setTextContent(el, content) {\n  if (el.styleSheet) {\n    el.styleSheet.cssText = content;\n  } else {\n    el.textContent = content;\n  }\n};\n\n/**\n * @file guid.js\n * @module guid\n */\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\n//\n// The initial GUID is 3 because some users have come to rely on the first\n// default player ID ending up as `vjs_video_3`.\n//\n// See: https://github.com/videojs/video.js/pull/6216\nvar _initialGuid = 3;\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\n\nvar _guid = _initialGuid;\n/**\n * Get a unique auto-incrementing ID by number that has not been returned before.\n *\n * @return {number}\n *         A new unique ID.\n */\n\nfunction newGUID() {\n  return _guid++;\n}\n\n/**\n * @file dom-data.js\n * @module dom-data\n */\nvar FakeWeakMap;\n\nif (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap) {\n  FakeWeakMap = /*#__PURE__*/function () {\n    function FakeWeakMap() {\n      this.vdata = 'vdata' + Math.floor(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() || Date.now());\n      this.data = {};\n    }\n\n    var _proto = FakeWeakMap.prototype;\n\n    _proto.set = function set(key, value) {\n      var access = key[this.vdata] || newGUID();\n\n      if (!key[this.vdata]) {\n        key[this.vdata] = access;\n      }\n\n      this.data[access] = value;\n      return this;\n    };\n\n    _proto.get = function get(key) {\n      var access = key[this.vdata]; // we have data, return it\n\n      if (access) {\n        return this.data[access];\n      } // we don't have data, return nothing.\n      // return undefined explicitly as that's the contract for this method\n\n\n      log$1('We have no data for this element', key);\n      return undefined;\n    };\n\n    _proto.has = function has(key) {\n      var access = key[this.vdata];\n      return access in this.data;\n    };\n\n    _proto[\"delete\"] = function _delete(key) {\n      var access = key[this.vdata];\n\n      if (access) {\n        delete this.data[access];\n        delete key[this.vdata];\n      }\n    };\n\n    return FakeWeakMap;\n  }();\n}\n/**\n * Element Data Store.\n *\n * Allows for binding data to an element without putting it directly on the\n * element. Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\n\n\nvar DomData = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap ? new WeakMap() : new FakeWeakMap();\n\n/**\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n *\n * @file events.js\n * @module events\n */\n/**\n * Clean up the listener cache and dispatchers\n *\n * @param {Element|Object} elem\n *        Element to clean up\n *\n * @param {string} type\n *        Type of event to clean up\n */\n\nfunction _cleanUpEvents(elem, type) {\n  if (!DomData.has(elem)) {\n    return;\n  }\n\n  var data = DomData.get(elem); // Remove the events of a particular type if there are none left\n\n  if (data.handlers[type].length === 0) {\n    delete data.handlers[type]; // data.handlers[type] = null;\n    // Setting to null was causing an error with data.handlers\n    // Remove the meta-handler from the element\n\n    if (elem.removeEventListener) {\n      elem.removeEventListener(type, data.dispatcher, false);\n    } else if (elem.detachEvent) {\n      elem.detachEvent('on' + type, data.dispatcher);\n    }\n  } // Remove the events object if there are no types left\n\n\n  if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n    delete data.handlers;\n    delete data.dispatcher;\n    delete data.disabled;\n  } // Finally remove the element data if there is no data left\n\n\n  if (Object.getOwnPropertyNames(data).length === 0) {\n    DomData[\"delete\"](elem);\n  }\n}\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn\n *        The event method we want to use.\n *\n * @param {Element|Object} elem\n *        Element or object to bind listeners to\n *\n * @param {string} type\n *        Type of event to bind to.\n *\n * @param {EventTarget~EventListener} callback\n *        Event listener.\n */\n\n\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n  types.forEach(function (type) {\n    // Call the event method for each one of the types\n    fn(elem, type, callback);\n  });\n}\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event\n *        Event object to fix.\n *\n * @return {Object}\n *         Fixed event object.\n */\n\n\nfunction fixEvent(event) {\n  if (event.fixed_) {\n    return event;\n  }\n\n  function returnTrue() {\n    return true;\n  }\n\n  function returnFalse() {\n    return false;\n  } // Test if fixing up is needed\n  // Used to check if !event.stopPropagation instead of isPropagationStopped\n  // But native events return true for stopPropagation, but don't have\n  // other expected methods like isPropagationStopped. Seems to be a problem\n  // with the Javascript Ninja code. So we're just overriding all events now.\n\n\n  if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) {\n    var old = event || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.event;\n    event = {}; // Clone the old object so that we can modify the values event = {};\n    // IE8 Doesn't like when you mess with native event properties\n    // Firefox returns false for event.hasOwnProperty('type') and other props\n    //  which makes copying more difficult.\n    // TODO: Probably best to create a whitelist of event props\n\n    for (var key in old) {\n      // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n      // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n      // and webkitMovementX/Y\n      // Lighthouse complains if Event.path is copied\n      if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY' && key !== 'path') {\n        // Chrome 32+ warns if you try to copy deprecated returnValue, but\n        // we still want to if preventDefault isn't supported (IE8).\n        if (!(key === 'returnValue' && old.preventDefault)) {\n          event[key] = old[key];\n        }\n      }\n    } // The event occurred on this element\n\n\n    if (!event.target) {\n      event.target = event.srcElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\n    } // Handle which other element the event is related to\n\n\n    if (!event.relatedTarget) {\n      event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n    } // Stop the default browser action\n\n\n    event.preventDefault = function () {\n      if (old.preventDefault) {\n        old.preventDefault();\n      }\n\n      event.returnValue = false;\n      old.returnValue = false;\n      event.defaultPrevented = true;\n    };\n\n    event.defaultPrevented = false; // Stop the event from bubbling\n\n    event.stopPropagation = function () {\n      if (old.stopPropagation) {\n        old.stopPropagation();\n      }\n\n      event.cancelBubble = true;\n      old.cancelBubble = true;\n      event.isPropagationStopped = returnTrue;\n    };\n\n    event.isPropagationStopped = returnFalse; // Stop the event from bubbling and executing other handlers\n\n    event.stopImmediatePropagation = function () {\n      if (old.stopImmediatePropagation) {\n        old.stopImmediatePropagation();\n      }\n\n      event.isImmediatePropagationStopped = returnTrue;\n      event.stopPropagation();\n    };\n\n    event.isImmediatePropagationStopped = returnFalse; // Handle mouse position\n\n    if (event.clientX !== null && event.clientX !== undefined) {\n      var doc = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement;\n      var body = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body;\n      event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n      event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n    } // Handle key presses\n\n\n    event.which = event.charCode || event.keyCode; // Fix button for mouse clicks:\n    // 0 == left; 1 == middle; 2 == right\n\n    if (event.button !== null && event.button !== undefined) {\n      // The following is disabled because it does not pass videojs-standard\n      // and... yikes.\n\n      /* eslint-disable */\n      event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n      /* eslint-enable */\n    }\n  }\n\n  event.fixed_ = true; // Returns fixed-up instance\n\n  return event;\n}\n/**\n * Whether passive event listeners are supported\n */\n\nvar _supportsPassive;\n\nvar supportsPassive = function supportsPassive() {\n  if (typeof _supportsPassive !== 'boolean') {\n    _supportsPassive = false;\n\n    try {\n      var opts = Object.defineProperty({}, 'passive', {\n        get: function get() {\n          _supportsPassive = true;\n        }\n      });\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('test', null, opts);\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('test', null, opts);\n    } catch (e) {// disregard\n    }\n  }\n\n  return _supportsPassive;\n};\n/**\n * Touch events Chrome expects to be passive\n */\n\n\nvar passiveEvents = ['touchstart', 'touchmove'];\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem\n *        Element or object to bind listeners to\n *\n * @param {string|string[]} type\n *        Type of event to bind to.\n *\n * @param {EventTarget~EventListener} fn\n *        Event listener.\n */\n\nfunction on(elem, type, fn) {\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(on, elem, type, fn);\n  }\n\n  if (!DomData.has(elem)) {\n    DomData.set(elem, {});\n  }\n\n  var data = DomData.get(elem); // We need a place to store all our handler data\n\n  if (!data.handlers) {\n    data.handlers = {};\n  }\n\n  if (!data.handlers[type]) {\n    data.handlers[type] = [];\n  }\n\n  if (!fn.guid) {\n    fn.guid = newGUID();\n  }\n\n  data.handlers[type].push(fn);\n\n  if (!data.dispatcher) {\n    data.disabled = false;\n\n    data.dispatcher = function (event, hash) {\n      if (data.disabled) {\n        return;\n      }\n\n      event = fixEvent(event);\n      var handlers = data.handlers[event.type];\n\n      if (handlers) {\n        // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n        var handlersCopy = handlers.slice(0);\n\n        for (var m = 0, n = handlersCopy.length; m < n; m++) {\n          if (event.isImmediatePropagationStopped()) {\n            break;\n          } else {\n            try {\n              handlersCopy[m].call(elem, event, hash);\n            } catch (e) {\n              log$1.error(e);\n            }\n          }\n        }\n      }\n    };\n  }\n\n  if (data.handlers[type].length === 1) {\n    if (elem.addEventListener) {\n      var options = false;\n\n      if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\n        options = {\n          passive: true\n        };\n      }\n\n      elem.addEventListener(type, data.dispatcher, options);\n    } else if (elem.attachEvent) {\n      elem.attachEvent('on' + type, data.dispatcher);\n    }\n  }\n}\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem\n *        Object to remove listeners from.\n *\n * @param {string|string[]} [type]\n *        Type of listener to remove. Don't include to remove all events from element.\n *\n * @param {EventTarget~EventListener} [fn]\n *        Specific listener to remove. Don't include to remove listeners for an event\n *        type.\n */\n\nfunction off(elem, type, fn) {\n  // Don't want to add a cache object through getElData if not needed\n  if (!DomData.has(elem)) {\n    return;\n  }\n\n  var data = DomData.get(elem); // If no events exist, nothing to unbind\n\n  if (!data.handlers) {\n    return;\n  }\n\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(off, elem, type, fn);\n  } // Utility function\n\n\n  var removeType = function removeType(el, t) {\n    data.handlers[t] = [];\n\n    _cleanUpEvents(el, t);\n  }; // Are we removing all bound events?\n\n\n  if (type === undefined) {\n    for (var t in data.handlers) {\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n        removeType(elem, t);\n      }\n    }\n\n    return;\n  }\n\n  var handlers = data.handlers[type]; // If no handlers exist, nothing to unbind\n\n  if (!handlers) {\n    return;\n  } // If no listener was provided, remove all listeners for type\n\n\n  if (!fn) {\n    removeType(elem, type);\n    return;\n  } // We're only removing a single handler\n\n\n  if (fn.guid) {\n    for (var n = 0; n < handlers.length; n++) {\n      if (handlers[n].guid === fn.guid) {\n        handlers.splice(n--, 1);\n      }\n    }\n  }\n\n  _cleanUpEvents(elem, type);\n}\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem\n *        Element to trigger an event on\n *\n * @param {EventTarget~Event|string} event\n *        A string (the type) or an event object with a type attribute\n *\n * @param {Object} [hash]\n *        data hash to pass along with the event\n *\n * @return {boolean|undefined}\n *         Returns the opposite of `defaultPrevented` if default was\n *         prevented. Otherwise, returns `undefined`\n */\n\nfunction trigger(elem, event, hash) {\n  // Fetches element data and a reference to the parent (for bubbling).\n  // Don't want to add a data object to cache for every parent,\n  // so checking hasElData first.\n  var elemData = DomData.has(elem) ? DomData.get(elem) : {};\n  var parent = elem.parentNode || elem.ownerDocument; // type = event.type || event,\n  // handler;\n  // If an event name was passed as a string, creates an event out of it\n\n  if (typeof event === 'string') {\n    event = {\n      type: event,\n      target: elem\n    };\n  } else if (!event.target) {\n    event.target = elem;\n  } // Normalizes the event properties.\n\n\n  event = fixEvent(event); // If the passed element has a dispatcher, executes the established handlers.\n\n  if (elemData.dispatcher) {\n    elemData.dispatcher.call(elem, event, hash);\n  } // Unless explicitly stopped or the event does not bubble (e.g. media events)\n  // recursively calls this function to bubble the event up the DOM.\n\n\n  if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n    trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled.\n  } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\n    if (!DomData.has(event.target)) {\n      DomData.set(event.target, {});\n    }\n\n    var targetData = DomData.get(event.target); // Checks if the target has a default action for this event.\n\n    if (event.target[event.type]) {\n      // Temporarily disables event dispatching on the target as we have already executed the handler.\n      targetData.disabled = true; // Executes the default action.\n\n      if (typeof event.target[event.type] === 'function') {\n        event.target[event.type]();\n      } // Re-enables event dispatching.\n\n\n      targetData.disabled = false;\n    }\n  } // Inform the triggerer if the default was prevented by returning false\n\n\n  return !event.defaultPrevented;\n}\n/**\n * Trigger a listener only once for an event.\n *\n * @param {Element|Object} elem\n *        Element or object to bind to.\n *\n * @param {string|string[]} type\n *        Name/type of event\n *\n * @param {Event~EventListener} fn\n *        Event listener function\n */\n\nfunction one(elem, type, fn) {\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(one, elem, type, fn);\n  }\n\n  var func = function func() {\n    off(elem, type, func);\n    fn.apply(this, arguments);\n  }; // copy the guid to the new function so it can removed using the original function's ID\n\n\n  func.guid = fn.guid = fn.guid || newGUID();\n  on(elem, type, func);\n}\n/**\n * Trigger a listener only once and then turn if off for all\n * configured events\n *\n * @param {Element|Object} elem\n *        Element or object to bind to.\n *\n * @param {string|string[]} type\n *        Name/type of event\n *\n * @param {Event~EventListener} fn\n *        Event listener function\n */\n\nfunction any(elem, type, fn) {\n  var func = function func() {\n    off(elem, type, func);\n    fn.apply(this, arguments);\n  }; // copy the guid to the new function so it can removed using the original function's ID\n\n\n  func.guid = fn.guid = fn.guid || newGUID(); // multiple ons, but one off for everything\n\n  on(elem, type, func);\n}\n\nvar Events = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  fixEvent: fixEvent,\n  on: on,\n  off: off,\n  trigger: trigger,\n  one: one,\n  any: any\n});\n\n/**\n * @file fn.js\n * @module fn\n */\nvar UPDATE_REFRESH_INTERVAL = 30;\n/**\n * Bind (a.k.a proxy or context). A simple method for changing the context of\n * a function.\n *\n * It also stores a unique id on the function so it can be easily removed from\n * events.\n *\n * @function\n * @param    {Mixed} context\n *           The object to bind as scope.\n *\n * @param    {Function} fn\n *           The function to be bound to a scope.\n *\n * @param    {number} [uid]\n *           An optional unique ID for the function to be set\n *\n * @return   {Function}\n *           The new function that will be bound into the context given\n */\n\nvar bind = function bind(context, fn, uid) {\n  // Make sure the function has a unique ID\n  if (!fn.guid) {\n    fn.guid = newGUID();\n  } // Create the new function that changes the context\n\n\n  var bound = fn.bind(context); // Allow for the ability to individualize this function\n  // Needed in the case where multiple objects might share the same prototype\n  // IF both items add an event listener with the same function, then you try to remove just one\n  // it will remove both because they both have the same guid.\n  // when using this, you need to use the bind method when you remove the listener as well.\n  // currently used in text tracks\n\n  bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\n  return bound;\n};\n/**\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\n * at most once per every `wait` milliseconds.\n *\n * @function\n * @param    {Function} fn\n *           The function to be throttled.\n *\n * @param    {number}   wait\n *           The number of milliseconds by which to throttle.\n *\n * @return   {Function}\n */\n\nvar throttle = function throttle(fn, wait) {\n  var last = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\n\n  var throttled = function throttled() {\n    var now = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\n\n    if (now - last >= wait) {\n      fn.apply(void 0, arguments);\n      last = now;\n    }\n  };\n\n  return throttled;\n};\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked.\n *\n * Inspired by lodash and underscore implementations.\n *\n * @function\n * @param    {Function} func\n *           The function to wrap with debounce behavior.\n *\n * @param    {number} wait\n *           The number of milliseconds to wait after the last invocation.\n *\n * @param    {boolean} [immediate]\n *           Whether or not to invoke the function immediately upon creation.\n *\n * @param    {Object} [context=window]\n *           The \"context\" in which the debounced function should debounce. For\n *           example, if this function should be tied to a Video.js player,\n *           the player can be passed here. Alternatively, defaults to the\n *           global `window` object.\n *\n * @return   {Function}\n *           A debounced function.\n */\n\nvar debounce = function debounce(func, wait, immediate, context) {\n  if (context === void 0) {\n    context = global_window__WEBPACK_IMPORTED_MODULE_0___default.a;\n  }\n\n  var timeout;\n\n  var cancel = function cancel() {\n    context.clearTimeout(timeout);\n    timeout = null;\n  };\n  /* eslint-disable consistent-this */\n\n\n  var debounced = function debounced() {\n    var self = this;\n    var args = arguments;\n\n    var _later = function later() {\n      timeout = null;\n      _later = null;\n\n      if (!immediate) {\n        func.apply(self, args);\n      }\n    };\n\n    if (!timeout && immediate) {\n      func.apply(self, args);\n    }\n\n    context.clearTimeout(timeout);\n    timeout = context.setTimeout(_later, wait);\n  };\n  /* eslint-enable consistent-this */\n\n\n  debounced.cancel = cancel;\n  return debounced;\n};\n\n/**\n * @file src/js/event-target.js\n */\n/**\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\n * adds shorthand functions that wrap around lengthy functions. For example:\n * the `on` function is a wrapper around `addEventListener`.\n *\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\n * @class EventTarget\n */\n\nvar EventTarget$2 = function EventTarget() {};\n/**\n * A Custom DOM event.\n *\n * @typedef {Object} EventTarget~Event\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\n */\n\n/**\n * All event listeners should follow the following format.\n *\n * @callback EventTarget~EventListener\n * @this {EventTarget}\n *\n * @param {EventTarget~Event} event\n *        the event that triggered this function\n *\n * @param {Object} [hash]\n *        hash of data sent during the event\n */\n\n/**\n * An object containing event names as keys and booleans as values.\n *\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\n *         will have extra functionality. See that function for more information.\n *\n * @property EventTarget.prototype.allowedEvents_\n * @private\n */\n\n\nEventTarget$2.prototype.allowedEvents_ = {};\n/**\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n * function that will get called when an event with a certain name gets triggered.\n *\n * @param {string|string[]} type\n *        An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n *        The function to call with `EventTarget`s\n */\n\nEventTarget$2.prototype.on = function (type, fn) {\n  // Remove the addEventListener alias before calling Events.on\n  // so we don't get into an infinite type loop\n  var ael = this.addEventListener;\n\n  this.addEventListener = function () {};\n\n  on(this, type, fn);\n  this.addEventListener = ael;\n};\n/**\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#on}\n */\n\n\nEventTarget$2.prototype.addEventListener = EventTarget$2.prototype.on;\n/**\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n * This makes it so that the `event listener` will no longer get called when the\n * named event happens.\n *\n * @param {string|string[]} type\n *        An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n *        The function to remove.\n */\n\nEventTarget$2.prototype.off = function (type, fn) {\n  off(this, type, fn);\n};\n/**\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#off}\n */\n\n\nEventTarget$2.prototype.removeEventListener = EventTarget$2.prototype.off;\n/**\n * This function will add an `event listener` that gets triggered only once. After the\n * first trigger it will get removed. This is like adding an `event listener`\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n *\n * @param {string|string[]} type\n *        An event name or an array of event names.\n *\n * @param {EventTarget~EventListener} fn\n *        The function to be called once for each event name.\n */\n\nEventTarget$2.prototype.one = function (type, fn) {\n  // Remove the addEventListener aliasing Events.on\n  // so we don't get into an infinite type loop\n  var ael = this.addEventListener;\n\n  this.addEventListener = function () {};\n\n  one(this, type, fn);\n  this.addEventListener = ael;\n};\n\nEventTarget$2.prototype.any = function (type, fn) {\n  // Remove the addEventListener aliasing Events.on\n  // so we don't get into an infinite type loop\n  var ael = this.addEventListener;\n\n  this.addEventListener = function () {};\n\n  any(this, type, fn);\n  this.addEventListener = ael;\n};\n/**\n * This function causes an event to happen. This will then cause any `event listeners`\n * that are waiting for that event, to get called. If there are no `event listeners`\n * for an event then nothing will happen.\n *\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n * Trigger will also call the `on` + `uppercaseEventName` function.\n *\n * Example:\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n * `onClick` if it exists.\n *\n * @param {string|EventTarget~Event|Object} event\n *        The name of the event, an `Event`, or an object with a key of type set to\n *        an event name.\n */\n\n\nEventTarget$2.prototype.trigger = function (event) {\n  var type = event.type || event; // deprecation\n  // In a future version we should default target to `this`\n  // similar to how we default the target to `elem` in\n  // `Events.trigger`. Right now the default `target` will be\n  // `document` due to the `Event.fixEvent` call.\n\n  if (typeof event === 'string') {\n    event = {\n      type: type\n    };\n  }\n\n  event = fixEvent(event);\n\n  if (this.allowedEvents_[type] && this['on' + type]) {\n    this['on' + type](event);\n  }\n\n  trigger(this, event);\n};\n/**\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#trigger}\n */\n\n\nEventTarget$2.prototype.dispatchEvent = EventTarget$2.prototype.trigger;\nvar EVENT_MAP;\n\nEventTarget$2.prototype.queueTrigger = function (event) {\n  var _this = this;\n\n  // only set up EVENT_MAP if it'll be used\n  if (!EVENT_MAP) {\n    EVENT_MAP = new Map();\n  }\n\n  var type = event.type || event;\n  var map = EVENT_MAP.get(this);\n\n  if (!map) {\n    map = new Map();\n    EVENT_MAP.set(this, map);\n  }\n\n  var oldTimeout = map.get(type);\n  map[\"delete\"](type);\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(oldTimeout);\n  var timeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n    map[\"delete\"](type); // if we cleared out all timeouts for the current target, delete its map\n\n    if (map.size === 0) {\n      map = null;\n      EVENT_MAP[\"delete\"](_this);\n    }\n\n    _this.trigger(event);\n  }, 0);\n  map.set(type, timeout);\n};\n\n/**\n * @file mixins/evented.js\n * @module evented\n */\n\nvar objName = function objName(obj) {\n  if (typeof obj.name === 'function') {\n    return obj.name();\n  }\n\n  if (typeof obj.name === 'string') {\n    return obj.name;\n  }\n\n  if (obj.name_) {\n    return obj.name_;\n  }\n\n  if (obj.constructor && obj.constructor.name) {\n    return obj.constructor.name;\n  }\n\n  return typeof obj;\n};\n/**\n * Returns whether or not an object has had the evented mixin applied.\n *\n * @param  {Object} object\n *         An object to test.\n *\n * @return {boolean}\n *         Whether or not the object appears to be evented.\n */\n\n\nvar isEvented = function isEvented(object) {\n  return object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) {\n    return typeof object[k] === 'function';\n  });\n};\n/**\n * Adds a callback to run after the evented mixin applied.\n *\n * @param  {Object} object\n *         An object to Add\n * @param  {Function} callback\n *         The callback to run.\n */\n\n\nvar addEventedCallback = function addEventedCallback(target, callback) {\n  if (isEvented(target)) {\n    callback();\n  } else {\n    if (!target.eventedCallbacks) {\n      target.eventedCallbacks = [];\n    }\n\n    target.eventedCallbacks.push(callback);\n  }\n};\n/**\n * Whether a value is a valid event type - non-empty string or array.\n *\n * @private\n * @param  {string|Array} type\n *         The type value to test.\n *\n * @return {boolean}\n *         Whether or not the type is a valid event type.\n */\n\n\nvar isValidEventType = function isValidEventType(type) {\n  return (// The regex here verifies that the `type` contains at least one non-\n    // whitespace character.\n    typeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length\n  );\n};\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the target does not appear to be a valid event target.\n *\n * @param  {Object} target\n *         The object to test.\n *\n * @param  {Object} obj\n *         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\n\n\nvar validateTarget = function validateTarget(target, obj, fnName) {\n  if (!target || !target.nodeName && !isEvented(target)) {\n    throw new Error(\"Invalid target for \" + objName(obj) + \"#\" + fnName + \"; must be a DOM node or evented object.\");\n  }\n};\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the type does not appear to be a valid event type.\n *\n * @param  {string|Array} type\n *         The type to test.\n *\n * @param  {Object} obj\n*         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\n\n\nvar validateEventType = function validateEventType(type, obj, fnName) {\n  if (!isValidEventType(type)) {\n    throw new Error(\"Invalid event type for \" + objName(obj) + \"#\" + fnName + \"; must be a non-empty string or array.\");\n  }\n};\n/**\n * Validates a value to determine if it is a valid listener. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the listener is not a function.\n *\n * @param  {Function} listener\n *         The listener to test.\n *\n * @param  {Object} obj\n *         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\n\n\nvar validateListener = function validateListener(listener, obj, fnName) {\n  if (typeof listener !== 'function') {\n    throw new Error(\"Invalid listener for \" + objName(obj) + \"#\" + fnName + \"; must be a function.\");\n  }\n};\n/**\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\n * normalizes them into an object.\n *\n * @private\n * @param  {Object} self\n *         The evented object on which `on()` or `one()` was called. This\n *         object will be bound as the `this` value for the listener.\n *\n * @param  {Array} args\n *         An array of arguments passed to `on()` or `one()`.\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n *\n * @return {Object}\n *         An object containing useful values for `on()` or `one()` calls.\n */\n\n\nvar normalizeListenArgs = function normalizeListenArgs(self, args, fnName) {\n  // If the number of arguments is less than 3, the target is always the\n  // evented object itself.\n  var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n  var target;\n  var type;\n  var listener;\n\n  if (isTargetingSelf) {\n    target = self.eventBusEl_; // Deal with cases where we got 3 arguments, but we are still listening to\n    // the evented object itself.\n\n    if (args.length >= 3) {\n      args.shift();\n    }\n\n    type = args[0];\n    listener = args[1];\n  } else {\n    target = args[0];\n    type = args[1];\n    listener = args[2];\n  }\n\n  validateTarget(target, self, fnName);\n  validateEventType(type, self, fnName);\n  validateListener(listener, self, fnName);\n  listener = bind(self, listener);\n  return {\n    isTargetingSelf: isTargetingSelf,\n    target: target,\n    type: type,\n    listener: listener\n  };\n};\n/**\n * Adds the listener to the event type(s) on the target, normalizing for\n * the type of target.\n *\n * @private\n * @param  {Element|Object} target\n *         A DOM node or evented object.\n *\n * @param  {string} method\n *         The event binding method to use (\"on\" or \"one\").\n *\n * @param  {string|Array} type\n *         One or more event type(s).\n *\n * @param  {Function} listener\n *         A listener function.\n */\n\n\nvar listen = function listen(target, method, type, listener) {\n  validateTarget(target, target, method);\n\n  if (target.nodeName) {\n    Events[method](target, type, listener);\n  } else {\n    target[method](type, listener);\n  }\n};\n/**\n * Contains methods that provide event capabilities to an object which is passed\n * to {@link module:evented|evented}.\n *\n * @mixin EventedMixin\n */\n\n\nvar EventedMixin = {\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  on: function on() {\n    var _this = this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    var _normalizeListenArgs = normalizeListenArgs(this, args, 'on'),\n        isTargetingSelf = _normalizeListenArgs.isTargetingSelf,\n        target = _normalizeListenArgs.target,\n        type = _normalizeListenArgs.type,\n        listener = _normalizeListenArgs.listener;\n\n    listen(target, 'on', type, listener); // If this object is listening to another evented object.\n\n    if (!isTargetingSelf) {\n      // If this object is disposed, remove the listener.\n      var removeListenerOnDispose = function removeListenerOnDispose() {\n        return _this.off(target, type, listener);\n      }; // Use the same function ID as the listener so we can remove it later it\n      // using the ID of the original listener.\n\n\n      removeListenerOnDispose.guid = listener.guid; // Add a listener to the target's dispose event as well. This ensures\n      // that if the target is disposed BEFORE this object, we remove the\n      // removal listener that was just added. Otherwise, we create a memory leak.\n\n      var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() {\n        return _this.off('dispose', removeListenerOnDispose);\n      }; // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n\n\n      removeRemoverOnTargetDispose.guid = listener.guid;\n      listen(this, 'on', 'dispose', removeListenerOnDispose);\n      listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\n    }\n  },\n\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object. The listener will be called once per event and then removed.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  one: function one() {\n    var _this2 = this;\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    var _normalizeListenArgs2 = normalizeListenArgs(this, args, 'one'),\n        isTargetingSelf = _normalizeListenArgs2.isTargetingSelf,\n        target = _normalizeListenArgs2.target,\n        type = _normalizeListenArgs2.type,\n        listener = _normalizeListenArgs2.listener; // Targeting this evented object.\n\n\n    if (isTargetingSelf) {\n      listen(target, 'one', type, listener); // Targeting another evented object.\n    } else {\n      // TODO: This wrapper is incorrect! It should only\n      //       remove the wrapper for the event type that called it.\n      //       Instead all listners are removed on the first trigger!\n      //       see https://github.com/videojs/video.js/issues/5962\n      var wrapper = function wrapper() {\n        _this2.off(target, type, wrapper);\n\n        for (var _len3 = arguments.length, largs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n          largs[_key3] = arguments[_key3];\n        }\n\n        listener.apply(null, largs);\n      }; // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n\n\n      wrapper.guid = listener.guid;\n      listen(target, 'one', type, wrapper);\n    }\n  },\n\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object. The listener will only be called once for the first event that is triggered\n   * then removed.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  any: function any() {\n    var _this3 = this;\n\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    var _normalizeListenArgs3 = normalizeListenArgs(this, args, 'any'),\n        isTargetingSelf = _normalizeListenArgs3.isTargetingSelf,\n        target = _normalizeListenArgs3.target,\n        type = _normalizeListenArgs3.type,\n        listener = _normalizeListenArgs3.listener; // Targeting this evented object.\n\n\n    if (isTargetingSelf) {\n      listen(target, 'any', type, listener); // Targeting another evented object.\n    } else {\n      var wrapper = function wrapper() {\n        _this3.off(target, type, wrapper);\n\n        for (var _len5 = arguments.length, largs = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n          largs[_key5] = arguments[_key5];\n        }\n\n        listener.apply(null, largs);\n      }; // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n\n\n      wrapper.guid = listener.guid;\n      listen(target, 'any', type, wrapper);\n    }\n  },\n\n  /**\n   * Removes listener(s) from event(s) on an evented object.\n   *\n   * @param  {string|Array|Element|Object} [targetOrType]\n   *         If this is a string or array, it represents the event type(s).\n   *\n   *         Another evented object can be passed here instead, in which case\n   *         ALL 3 arguments are _required_.\n   *\n   * @param  {string|Array|Function} [typeOrListener]\n   *         If the first argument was a string or array, this may be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function; otherwise, _all_ listeners bound to the\n   *         event type(s) will be removed.\n   */\n  off: function off$1(targetOrType, typeOrListener, listener) {\n    // Targeting this evented object.\n    if (!targetOrType || isValidEventType(targetOrType)) {\n      off(this.eventBusEl_, targetOrType, typeOrListener); // Targeting another evented object.\n    } else {\n      var target = targetOrType;\n      var type = typeOrListener; // Fail fast and in a meaningful way!\n\n      validateTarget(target, this, 'off');\n      validateEventType(type, this, 'off');\n      validateListener(listener, this, 'off'); // Ensure there's at least a guid, even if the function hasn't been used\n\n      listener = bind(this, listener); // Remove the dispose listener on this evented object, which was given\n      // the same guid as the event listener in on().\n\n      this.off('dispose', listener);\n\n      if (target.nodeName) {\n        off(target, type, listener);\n        off(target, 'dispose', listener);\n      } else if (isEvented(target)) {\n        target.off(type, listener);\n        target.off('dispose', listener);\n      }\n    }\n  },\n\n  /**\n   * Fire an event on this evented object, causing its listeners to be called.\n   *\n   * @param   {string|Object} event\n   *          An event type or an object with a type property.\n   *\n   * @param   {Object} [hash]\n   *          An additional object to pass along to listeners.\n   *\n   * @return {boolean}\n   *          Whether or not the default behavior was prevented.\n   */\n  trigger: function trigger$1(event, hash) {\n    validateTarget(this.eventBusEl_, this, 'trigger');\n    var type = event && typeof event !== 'string' ? event.type : event;\n\n    if (!isValidEventType(type)) {\n      var error = \"Invalid event type for \" + objName(this) + \"#trigger; \" + 'must be a non-empty string or object with a type key that has a non-empty value.';\n\n      if (event) {\n        (this.log || log$1).error(error);\n      } else {\n        throw new Error(error);\n      }\n    }\n\n    return trigger(this.eventBusEl_, event, hash);\n  }\n};\n/**\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\n *\n * @param  {Object} target\n *         The object to which to add event methods.\n *\n * @param  {Object} [options={}]\n *         Options for customizing the mixin behavior.\n *\n * @param  {string} [options.eventBusKey]\n *         By default, adds a `eventBusEl_` DOM element to the target object,\n *         which is used as an event bus. If the target object already has a\n *         DOM element that should be used, pass its key here.\n *\n * @return {Object}\n *         The target object.\n */\n\nfunction evented(target, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      eventBusKey = _options.eventBusKey; // Set or create the eventBusEl_.\n\n  if (eventBusKey) {\n    if (!target[eventBusKey].nodeName) {\n      throw new Error(\"The eventBusKey \\\"\" + eventBusKey + \"\\\" does not refer to an element.\");\n    }\n\n    target.eventBusEl_ = target[eventBusKey];\n  } else {\n    target.eventBusEl_ = createEl('span', {\n      className: 'vjs-event-bus'\n    });\n  }\n\n  assign(target, EventedMixin);\n\n  if (target.eventedCallbacks) {\n    target.eventedCallbacks.forEach(function (callback) {\n      callback();\n    });\n  } // When any evented object is disposed, it removes all its listeners.\n\n\n  target.on('dispose', function () {\n    target.off();\n    [target, target.el_, target.eventBusEl_].forEach(function (val) {\n      if (val && DomData.has(val)) {\n        DomData[\"delete\"](val);\n      }\n    });\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n      target.eventBusEl_ = null;\n    }, 0);\n  });\n  return target;\n}\n\n/**\n * @file mixins/stateful.js\n * @module stateful\n */\n/**\n * Contains methods that provide statefulness to an object which is passed\n * to {@link module:stateful}.\n *\n * @mixin StatefulMixin\n */\n\nvar StatefulMixin = {\n  /**\n   * A hash containing arbitrary keys and values representing the state of\n   * the object.\n   *\n   * @type {Object}\n   */\n  state: {},\n\n  /**\n   * Set the state of an object by mutating its\n   * {@link module:stateful~StatefulMixin.state|state} object in place.\n   *\n   * @fires   module:stateful~StatefulMixin#statechanged\n   * @param   {Object|Function} stateUpdates\n   *          A new set of properties to shallow-merge into the plugin state.\n   *          Can be a plain object or a function returning a plain object.\n   *\n   * @return {Object|undefined}\n   *          An object containing changes that occurred. If no changes\n   *          occurred, returns `undefined`.\n   */\n  setState: function setState(stateUpdates) {\n    var _this = this;\n\n    // Support providing the `stateUpdates` state as a function.\n    if (typeof stateUpdates === 'function') {\n      stateUpdates = stateUpdates();\n    }\n\n    var changes;\n    each(stateUpdates, function (value, key) {\n      // Record the change if the value is different from what's in the\n      // current state.\n      if (_this.state[key] !== value) {\n        changes = changes || {};\n        changes[key] = {\n          from: _this.state[key],\n          to: value\n        };\n      }\n\n      _this.state[key] = value;\n    }); // Only trigger \"statechange\" if there were changes AND we have a trigger\n    // function. This allows us to not require that the target object be an\n    // evented object.\n\n    if (changes && isEvented(this)) {\n      /**\n       * An event triggered on an object that is both\n       * {@link module:stateful|stateful} and {@link module:evented|evented}\n       * indicating that its state has changed.\n       *\n       * @event    module:stateful~StatefulMixin#statechanged\n       * @type     {Object}\n       * @property {Object} changes\n       *           A hash containing the properties that were changed and\n       *           the values they were changed `from` and `to`.\n       */\n      this.trigger({\n        changes: changes,\n        type: 'statechanged'\n      });\n    }\n\n    return changes;\n  }\n};\n/**\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\n * object.\n *\n * If the target object is {@link module:evented|evented} and has a\n * `handleStateChanged` method, that method will be automatically bound to the\n * `statechanged` event on itself.\n *\n * @param   {Object} target\n *          The object to be made stateful.\n *\n * @param   {Object} [defaultState]\n *          A default set of properties to populate the newly-stateful object's\n *          `state` property.\n *\n * @return {Object}\n *          Returns the `target`.\n */\n\nfunction stateful(target, defaultState) {\n  assign(target, StatefulMixin); // This happens after the mixing-in because we need to replace the `state`\n  // added in that step.\n\n  target.state = assign({}, target.state, defaultState); // Auto-bind the `handleStateChanged` method of the target object if it exists.\n\n  if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\n    target.on('statechanged', target.handleStateChanged);\n  }\n\n  return target;\n}\n\n/**\n * @file string-cases.js\n * @module to-lower-case\n */\n\n/**\n * Lowercase the first letter of a string.\n *\n * @param {string} string\n *        String to be lowercased\n *\n * @return {string}\n *         The string with a lowercased first letter\n */\nvar toLowerCase = function toLowerCase(string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n\n  return string.replace(/./, function (w) {\n    return w.toLowerCase();\n  });\n};\n/**\n * Uppercase the first letter of a string.\n *\n * @param {string} string\n *        String to be uppercased\n *\n * @return {string}\n *         The string with an uppercased first letter\n */\n\nvar toTitleCase$1 = function toTitleCase(string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n\n  return string.replace(/./, function (w) {\n    return w.toUpperCase();\n  });\n};\n/**\n * Compares the TitleCase versions of the two strings for equality.\n *\n * @param {string} str1\n *        The first string to compare\n *\n * @param {string} str2\n *        The second string to compare\n *\n * @return {boolean}\n *         Whether the TitleCase versions of the strings are equal\n */\n\nvar titleCaseEquals = function titleCaseEquals(str1, str2) {\n  return toTitleCase$1(str1) === toTitleCase$1(str2);\n};\n\n/**\n * @file merge-options.js\n * @module merge-options\n */\n/**\n * Merge two objects recursively.\n *\n * Performs a deep merge like\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\n * plain objects (not arrays, elements, or anything else).\n *\n * Non-plain object values will be copied directly from the right-most\n * argument.\n *\n * @static\n * @param   {Object[]} sources\n *          One or more objects to merge into a new object.\n *\n * @return {Object}\n *          A new object that is the merged result of all sources.\n */\n\nfunction mergeOptions$3() {\n  var result = {};\n\n  for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n    sources[_key] = arguments[_key];\n  }\n\n  sources.forEach(function (source) {\n    if (!source) {\n      return;\n    }\n\n    each(source, function (value, key) {\n      if (!isPlain(value)) {\n        result[key] = value;\n        return;\n      }\n\n      if (!isPlain(result[key])) {\n        result[key] = {};\n      }\n\n      result[key] = mergeOptions$3(result[key], value);\n    });\n  });\n  return result;\n}\n\nvar MapSham = /*#__PURE__*/function () {\n  function MapSham() {\n    this.map_ = {};\n  }\n\n  var _proto = MapSham.prototype;\n\n  _proto.has = function has(key) {\n    return key in this.map_;\n  };\n\n  _proto[\"delete\"] = function _delete(key) {\n    var has = this.has(key);\n    delete this.map_[key];\n    return has;\n  };\n\n  _proto.set = function set(key, value) {\n    this.map_[key] = value;\n    return this;\n  };\n\n  _proto.forEach = function forEach(callback, thisArg) {\n    for (var key in this.map_) {\n      callback.call(thisArg, this.map_[key], key, this);\n    }\n  };\n\n  return MapSham;\n}();\n\nvar Map$1 = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Map ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Map : MapSham;\n\nvar SetSham = /*#__PURE__*/function () {\n  function SetSham() {\n    this.set_ = {};\n  }\n\n  var _proto = SetSham.prototype;\n\n  _proto.has = function has(key) {\n    return key in this.set_;\n  };\n\n  _proto[\"delete\"] = function _delete(key) {\n    var has = this.has(key);\n    delete this.set_[key];\n    return has;\n  };\n\n  _proto.add = function add(key) {\n    this.set_[key] = 1;\n    return this;\n  };\n\n  _proto.forEach = function forEach(callback, thisArg) {\n    for (var key in this.set_) {\n      callback.call(thisArg, key, key, this);\n    }\n  };\n\n  return SetSham;\n}();\n\nvar Set$1 = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set : SetSham;\n\n/**\n * Player Component - Base class for all UI objects\n *\n * @file component.js\n */\n/**\n * Base class for all UI Components.\n * Components are UI objects which represent both a javascript object and an element\n * in the DOM. They can be children of other components, and can have\n * children themselves.\n *\n * Components can also use methods from {@link EventTarget}\n */\n\nvar Component$1 = /*#__PURE__*/function () {\n  /**\n   * A callback that is called when a component is ready. Does not have any\n   * paramters and any callback value will be ignored.\n   *\n   * @callback Component~ReadyCallback\n   * @this Component\n   */\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of component options.\n   *\n   * @param {Object[]} [options.children]\n   *        An array of children objects to intialize this component with. Children objects have\n   *        a name property that will be used if more than one component of the same type needs to be\n   *        added.\n   *\n   * @param  {string} [options.className]\n   *         A class or space separated list of classes to add the component\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        Function that gets called when the `Component` is ready.\n   */\n  function Component(player, options, ready) {\n    var _this = this;\n\n    // The component might be the player itself and we can't pass `this` to super\n    if (!player && this.play) {\n      this.player_ = player = this; // eslint-disable-line\n    } else {\n      this.player_ = player;\n    }\n\n    this.isDisposed_ = false; // Hold the reference to the parent component via `addChild` method\n\n    this.parentComponent_ = null; // Make a copy of prototype.options_ to protect against overriding defaults\n\n    this.options_ = mergeOptions$3({}, this.options_); // Updated options with supplied options\n\n    options = this.options_ = mergeOptions$3(this.options_, options); // Get ID from options or options element if one is supplied\n\n    this.id_ = options.id || options.el && options.el.id; // If there was no ID from the options, generate one\n\n    if (!this.id_) {\n      // Don't require the player ID function in the case of mock players\n      var id = player && player.id && player.id() || 'no_player';\n      this.id_ = id + \"_component_\" + newGUID();\n    }\n\n    this.name_ = options.name || null; // Create element if one wasn't provided in options\n\n    if (options.el) {\n      this.el_ = options.el;\n    } else if (options.createEl !== false) {\n      this.el_ = this.createEl();\n    }\n\n    if (options.className && this.el_) {\n      options.className.split(' ').forEach(function (c) {\n        return _this.addClass(c);\n      });\n    } // if evented is anything except false, we want to mixin in evented\n\n\n    if (options.evented !== false) {\n      // Make this an evented object and use `el_`, if available, as its event bus\n      evented(this, {\n        eventBusKey: this.el_ ? 'el_' : null\n      });\n      this.handleLanguagechange = this.handleLanguagechange.bind(this);\n      this.on(this.player_, 'languagechange', this.handleLanguagechange);\n    }\n\n    stateful(this, this.constructor.defaultState);\n    this.children_ = [];\n    this.childIndex_ = {};\n    this.childNameIndex_ = {};\n    this.setTimeoutIds_ = new Set$1();\n    this.setIntervalIds_ = new Set$1();\n    this.rafIds_ = new Set$1();\n    this.namedRafs_ = new Map$1();\n    this.clearingTimersOnDispose_ = false; // Add any child components in options\n\n    if (options.initChildren !== false) {\n      this.initChildren();\n    } // Don't want to trigger ready here or it will go before init is actually\n    // finished for all children that run this constructor\n\n\n    this.ready(ready);\n\n    if (options.reportTouchActivity !== false) {\n      this.enableTouchActivity();\n    }\n  }\n  /**\n   * Dispose of the `Component` and all child components.\n   *\n   * @fires Component#dispose\n   *\n   * @param {Object} options\n   * @param {Element} options.originalEl element with which to replace player element\n   */\n\n\n  var _proto = Component.prototype;\n\n  _proto.dispose = function dispose(options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    // Bail out if the component has already been disposed.\n    if (this.isDisposed_) {\n      return;\n    }\n\n    if (this.readyQueue_) {\n      this.readyQueue_.length = 0;\n    }\n    /**\n     * Triggered when a `Component` is disposed.\n     *\n     * @event Component#dispose\n     * @type {EventTarget~Event}\n     *\n     * @property {boolean} [bubbles=false]\n     *           set to false so that the dispose event does not\n     *           bubble up\n     */\n\n\n    this.trigger({\n      type: 'dispose',\n      bubbles: false\n    });\n    this.isDisposed_ = true; // Dispose all children.\n\n    if (this.children_) {\n      for (var i = this.children_.length - 1; i >= 0; i--) {\n        if (this.children_[i].dispose) {\n          this.children_[i].dispose();\n        }\n      }\n    } // Delete child references\n\n\n    this.children_ = null;\n    this.childIndex_ = null;\n    this.childNameIndex_ = null;\n    this.parentComponent_ = null;\n\n    if (this.el_) {\n      // Remove element from DOM\n      if (this.el_.parentNode) {\n        if (options.restoreEl) {\n          this.el_.parentNode.replaceChild(options.restoreEl, this.el_);\n        } else {\n          this.el_.parentNode.removeChild(this.el_);\n        }\n      }\n\n      this.el_ = null;\n    } // remove reference to the player after disposing of the element\n\n\n    this.player_ = null;\n  }\n  /**\n   * Determine whether or not this component has been disposed.\n   *\n   * @return {boolean}\n   *         If the component has been disposed, will be `true`. Otherwise, `false`.\n   */\n  ;\n\n  _proto.isDisposed = function isDisposed() {\n    return Boolean(this.isDisposed_);\n  }\n  /**\n   * Return the {@link Player} that the `Component` has attached to.\n   *\n   * @return {Player}\n   *         The player that this `Component` has attached to.\n   */\n  ;\n\n  _proto.player = function player() {\n    return this.player_;\n  }\n  /**\n   * Deep merge of options objects with new options.\n   * > Note: When both `obj` and `options` contain properties whose values are objects.\n   *         The two properties get merged using {@link module:mergeOptions}\n   *\n   * @param {Object} obj\n   *        The object that contains new options.\n   *\n   * @return {Object}\n   *         A new object of `this.options_` and `obj` merged together.\n   */\n  ;\n\n  _proto.options = function options(obj) {\n    if (!obj) {\n      return this.options_;\n    }\n\n    this.options_ = mergeOptions$3(this.options_, obj);\n    return this.options_;\n  }\n  /**\n   * Get the `Component`s DOM element\n   *\n   * @return {Element}\n   *         The DOM element for this `Component`.\n   */\n  ;\n\n  _proto.el = function el() {\n    return this.el_;\n  }\n  /**\n   * Create the `Component`s DOM element.\n   *\n   * @param {string} [tagName]\n   *        Element's DOM node type. e.g. 'div'\n   *\n   * @param {Object} [properties]\n   *        An object of properties that should be set.\n   *\n   * @param {Object} [attributes]\n   *        An object of attributes that should be set.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl$1(tagName, properties, attributes) {\n    return createEl(tagName, properties, attributes);\n  }\n  /**\n   * Localize a string given the string in english.\n   *\n   * If tokens are provided, it'll try and run a simple token replacement on the provided string.\n   * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\n   *\n   * If a `defaultValue` is provided, it'll use that over `string`,\n   * if a value isn't found in provided language files.\n   * This is useful if you want to have a descriptive key for token replacement\n   * but have a succinct localized string and not require `en.json` to be included.\n   *\n   * Currently, it is used for the progress bar timing.\n   * ```js\n   * {\n   *   \"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\"\n   * }\n   * ```\n   * It is then used like so:\n   * ```js\n   * this.localize('progress bar timing: currentTime={1} duration{2}',\n   *               [this.player_.currentTime(), this.player_.duration()],\n   *               '{1} of {2}');\n   * ```\n   *\n   * Which outputs something like: `01:23 of 24:56`.\n   *\n   *\n   * @param {string} string\n   *        The string to localize and the key to lookup in the language files.\n   * @param {string[]} [tokens]\n   *        If the current item has token replacements, provide the tokens here.\n   * @param {string} [defaultValue]\n   *        Defaults to `string`. Can be a default value to use for token replacement\n   *        if the lookup key is needed to be separate.\n   *\n   * @return {string}\n   *         The localized string or if no localization exists the english string.\n   */\n  ;\n\n  _proto.localize = function localize(string, tokens, defaultValue) {\n    if (defaultValue === void 0) {\n      defaultValue = string;\n    }\n\n    var code = this.player_.language && this.player_.language();\n    var languages = this.player_.languages && this.player_.languages();\n    var language = languages && languages[code];\n    var primaryCode = code && code.split('-')[0];\n    var primaryLang = languages && languages[primaryCode];\n    var localizedString = defaultValue;\n\n    if (language && language[string]) {\n      localizedString = language[string];\n    } else if (primaryLang && primaryLang[string]) {\n      localizedString = primaryLang[string];\n    }\n\n    if (tokens) {\n      localizedString = localizedString.replace(/\\{(\\d+)\\}/g, function (match, index) {\n        var value = tokens[index - 1];\n        var ret = value;\n\n        if (typeof value === 'undefined') {\n          ret = match;\n        }\n\n        return ret;\n      });\n    }\n\n    return localizedString;\n  }\n  /**\n   * Handles language change for the player in components. Should be overriden by sub-components.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.handleLanguagechange = function handleLanguagechange() {}\n  /**\n   * Return the `Component`s DOM element. This is where children get inserted.\n   * This will usually be the the same as the element returned in {@link Component#el}.\n   *\n   * @return {Element}\n   *         The content element for this `Component`.\n   */\n  ;\n\n  _proto.contentEl = function contentEl() {\n    return this.contentEl_ || this.el_;\n  }\n  /**\n   * Get this `Component`s ID\n   *\n   * @return {string}\n   *         The id of this `Component`\n   */\n  ;\n\n  _proto.id = function id() {\n    return this.id_;\n  }\n  /**\n   * Get the `Component`s name. The name gets used to reference the `Component`\n   * and is set during registration.\n   *\n   * @return {string}\n   *         The name of this `Component`.\n   */\n  ;\n\n  _proto.name = function name() {\n    return this.name_;\n  }\n  /**\n   * Get an array of all child components\n   *\n   * @return {Array}\n   *         The children\n   */\n  ;\n\n  _proto.children = function children() {\n    return this.children_;\n  }\n  /**\n   * Returns the child `Component` with the given `id`.\n   *\n   * @param {string} id\n   *        The id of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The child `Component` with the given `id` or undefined.\n   */\n  ;\n\n  _proto.getChildById = function getChildById(id) {\n    return this.childIndex_[id];\n  }\n  /**\n   * Returns the child `Component` with the given `name`.\n   *\n   * @param {string} name\n   *        The name of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The child `Component` with the given `name` or undefined.\n   */\n  ;\n\n  _proto.getChild = function getChild(name) {\n    if (!name) {\n      return;\n    }\n\n    return this.childNameIndex_[name];\n  }\n  /**\n   * Returns the descendant `Component` following the givent\n   * descendant `names`. For instance ['foo', 'bar', 'baz'] would\n   * try to get 'foo' on the current component, 'bar' on the 'foo'\n   * component and 'baz' on the 'bar' component and return undefined\n   * if any of those don't exist.\n   *\n   * @param {...string[]|...string} names\n   *        The name of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The descendant `Component` following the given descendant\n   *         `names` or undefined.\n   */\n  ;\n\n  _proto.getDescendant = function getDescendant() {\n    for (var _len = arguments.length, names = new Array(_len), _key = 0; _key < _len; _key++) {\n      names[_key] = arguments[_key];\n    }\n\n    // flatten array argument into the main array\n    names = names.reduce(function (acc, n) {\n      return acc.concat(n);\n    }, []);\n    var currentChild = this;\n\n    for (var i = 0; i < names.length; i++) {\n      currentChild = currentChild.getChild(names[i]);\n\n      if (!currentChild || !currentChild.getChild) {\n        return;\n      }\n    }\n\n    return currentChild;\n  }\n  /**\n   * Add a child `Component` inside the current `Component`.\n   *\n   *\n   * @param {string|Component} child\n   *        The name or instance of a child to add.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of options that will get passed to children of\n   *        the child.\n   *\n   * @param {number} [index=this.children_.length]\n   *        The index to attempt to add a child into.\n   *\n   * @return {Component}\n   *         The `Component` that gets added as a child. When using a string the\n   *         `Component` will get created by this process.\n   */\n  ;\n\n  _proto.addChild = function addChild(child, options, index) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    if (index === void 0) {\n      index = this.children_.length;\n    }\n\n    var component;\n    var componentName; // If child is a string, create component with options\n\n    if (typeof child === 'string') {\n      componentName = toTitleCase$1(child);\n      var componentClassName = options.componentClass || componentName; // Set name through options\n\n      options.name = componentName; // Create a new object & element for this controls set\n      // If there's no .player_, this is a player\n\n      var ComponentClass = Component.getComponent(componentClassName);\n\n      if (!ComponentClass) {\n        throw new Error(\"Component \" + componentClassName + \" does not exist\");\n      } // data stored directly on the videojs object may be\n      // misidentified as a component to retain\n      // backwards-compatibility with 4.x. check to make sure the\n      // component class can be instantiated.\n\n\n      if (typeof ComponentClass !== 'function') {\n        return null;\n      }\n\n      component = new ComponentClass(this.player_ || this, options); // child is a component instance\n    } else {\n      component = child;\n    }\n\n    if (component.parentComponent_) {\n      component.parentComponent_.removeChild(component);\n    }\n\n    this.children_.splice(index, 0, component);\n    component.parentComponent_ = this;\n\n    if (typeof component.id === 'function') {\n      this.childIndex_[component.id()] = component;\n    } // If a name wasn't used to create the component, check if we can use the\n    // name function of the component\n\n\n    componentName = componentName || component.name && toTitleCase$1(component.name());\n\n    if (componentName) {\n      this.childNameIndex_[componentName] = component;\n      this.childNameIndex_[toLowerCase(componentName)] = component;\n    } // Add the UI object's element to the container div (box)\n    // Having an element is not required\n\n\n    if (typeof component.el === 'function' && component.el()) {\n      // If inserting before a component, insert before that component's element\n      var refNode = null;\n\n      if (this.children_[index + 1]) {\n        // Most children are components, but the video tech is an HTML element\n        if (this.children_[index + 1].el_) {\n          refNode = this.children_[index + 1].el_;\n        } else if (isEl(this.children_[index + 1])) {\n          refNode = this.children_[index + 1];\n        }\n      }\n\n      this.contentEl().insertBefore(component.el(), refNode);\n    } // Return so it can stored on parent object if desired.\n\n\n    return component;\n  }\n  /**\n   * Remove a child `Component` from this `Component`s list of children. Also removes\n   * the child `Component`s element from this `Component`s element.\n   *\n   * @param {Component} component\n   *        The child `Component` to remove.\n   */\n  ;\n\n  _proto.removeChild = function removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n\n    if (!component || !this.children_) {\n      return;\n    }\n\n    var childFound = false;\n\n    for (var i = this.children_.length - 1; i >= 0; i--) {\n      if (this.children_[i] === component) {\n        childFound = true;\n        this.children_.splice(i, 1);\n        break;\n      }\n    }\n\n    if (!childFound) {\n      return;\n    }\n\n    component.parentComponent_ = null;\n    this.childIndex_[component.id()] = null;\n    this.childNameIndex_[toTitleCase$1(component.name())] = null;\n    this.childNameIndex_[toLowerCase(component.name())] = null;\n    var compEl = component.el();\n\n    if (compEl && compEl.parentNode === this.contentEl()) {\n      this.contentEl().removeChild(component.el());\n    }\n  }\n  /**\n   * Add and initialize default child `Component`s based upon options.\n   */\n  ;\n\n  _proto.initChildren = function initChildren() {\n    var _this2 = this;\n\n    var children = this.options_.children;\n\n    if (children) {\n      // `this` is `parent`\n      var parentOptions = this.options_;\n\n      var handleAdd = function handleAdd(child) {\n        var name = child.name;\n        var opts = child.opts; // Allow options for children to be set at the parent options\n        // e.g. videojs(id, { controlBar: false });\n        // instead of videojs(id, { children: { controlBar: false });\n\n        if (parentOptions[name] !== undefined) {\n          opts = parentOptions[name];\n        } // Allow for disabling default components\n        // e.g. options['children']['posterImage'] = false\n\n\n        if (opts === false) {\n          return;\n        } // Allow options to be passed as a simple boolean if no configuration\n        // is necessary.\n\n\n        if (opts === true) {\n          opts = {};\n        } // We also want to pass the original player options\n        // to each component as well so they don't need to\n        // reach back into the player for options later.\n\n\n        opts.playerOptions = _this2.options_.playerOptions; // Create and add the child component.\n        // Add a direct reference to the child by name on the parent instance.\n        // If two of the same component are used, different names should be supplied\n        // for each\n\n        var newChild = _this2.addChild(name, opts);\n\n        if (newChild) {\n          _this2[name] = newChild;\n        }\n      }; // Allow for an array of children details to passed in the options\n\n\n      var workingChildren;\n      var Tech = Component.getComponent('Tech');\n\n      if (Array.isArray(children)) {\n        workingChildren = children;\n      } else {\n        workingChildren = Object.keys(children);\n      }\n\n      workingChildren // children that are in this.options_ but also in workingChildren  would\n      // give us extra children we do not want. So, we want to filter them out.\n      .concat(Object.keys(this.options_).filter(function (child) {\n        return !workingChildren.some(function (wchild) {\n          if (typeof wchild === 'string') {\n            return child === wchild;\n          }\n\n          return child === wchild.name;\n        });\n      })).map(function (child) {\n        var name;\n        var opts;\n\n        if (typeof child === 'string') {\n          name = child;\n          opts = children[name] || _this2.options_[name] || {};\n        } else {\n          name = child.name;\n          opts = child;\n        }\n\n        return {\n          name: name,\n          opts: opts\n        };\n      }).filter(function (child) {\n        // we have to make sure that child.name isn't in the techOrder since\n        // techs are registerd as Components but can't aren't compatible\n        // See https://github.com/videojs/video.js/issues/2772\n        var c = Component.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n        return c && !Tech.isTech(c);\n      }).forEach(handleAdd);\n    }\n  }\n  /**\n   * Builds the default DOM class name. Should be overriden by sub-components.\n   *\n   * @return {string}\n   *         The DOM class name for this object.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    // Child classes can include a function that does:\n    // return 'CLASS NAME' + this._super();\n    return '';\n  }\n  /**\n   * Bind a listener to the component's ready state.\n   * Different from event listeners in that if the ready event has already happened\n   * it will trigger the function immediately.\n   *\n   * @return {Component}\n   *         Returns itself; method can be chained.\n   */\n  ;\n\n  _proto.ready = function ready(fn, sync) {\n    if (sync === void 0) {\n      sync = false;\n    }\n\n    if (!fn) {\n      return;\n    }\n\n    if (!this.isReady_) {\n      this.readyQueue_ = this.readyQueue_ || [];\n      this.readyQueue_.push(fn);\n      return;\n    }\n\n    if (sync) {\n      fn.call(this);\n    } else {\n      // Call the function asynchronously by default for consistency\n      this.setTimeout(fn, 1);\n    }\n  }\n  /**\n   * Trigger all the ready listeners for this `Component`.\n   *\n   * @fires Component#ready\n   */\n  ;\n\n  _proto.triggerReady = function triggerReady() {\n    this.isReady_ = true; // Ensure ready is triggered asynchronously\n\n    this.setTimeout(function () {\n      var readyQueue = this.readyQueue_; // Reset Ready Queue\n\n      this.readyQueue_ = [];\n\n      if (readyQueue && readyQueue.length > 0) {\n        readyQueue.forEach(function (fn) {\n          fn.call(this);\n        }, this);\n      } // Allow for using event listeners also\n\n      /**\n       * Triggered when a `Component` is ready.\n       *\n       * @event Component#ready\n       * @type {EventTarget~Event}\n       */\n\n\n      this.trigger('ready');\n    }, 1);\n  }\n  /**\n   * Find a single DOM element matching a `selector`. This can be within the `Component`s\n   * `contentEl()` or another custom context.\n   *\n   * @param {string} selector\n   *        A valid CSS selector, which will be passed to `querySelector`.\n   *\n   * @param {Element|string} [context=this.contentEl()]\n   *        A DOM element within which to query. Can also be a selector string in\n   *        which case the first matching element will get used as context. If\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n   *        nothing it falls back to `document`.\n   *\n   * @return {Element|null}\n   *         the dom element that was found, or null\n   *\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n   */\n  ;\n\n  _proto.$ = function $$1(selector, context) {\n    return $(selector, context || this.contentEl());\n  }\n  /**\n   * Finds all DOM element matching a `selector`. This can be within the `Component`s\n   * `contentEl()` or another custom context.\n   *\n   * @param {string} selector\n   *        A valid CSS selector, which will be passed to `querySelectorAll`.\n   *\n   * @param {Element|string} [context=this.contentEl()]\n   *        A DOM element within which to query. Can also be a selector string in\n   *        which case the first matching element will get used as context. If\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n   *        nothing it falls back to `document`.\n   *\n   * @return {NodeList}\n   *         a list of dom elements that were found\n   *\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n   */\n  ;\n\n  _proto.$$ = function $$$1(selector, context) {\n    return $$(selector, context || this.contentEl());\n  }\n  /**\n   * Check if a component's element has a CSS class name.\n   *\n   * @param {string} classToCheck\n   *        CSS class name to check.\n   *\n   * @return {boolean}\n   *         - True if the `Component` has the class.\n   *         - False if the `Component` does not have the class`\n   */\n  ;\n\n  _proto.hasClass = function hasClass$1(classToCheck) {\n    return hasClass(this.el_, classToCheck);\n  }\n  /**\n   * Add a CSS class name to the `Component`s element.\n   *\n   * @param {string} classToAdd\n   *        CSS class name to add\n   */\n  ;\n\n  _proto.addClass = function addClass$1(classToAdd) {\n    addClass(this.el_, classToAdd);\n  }\n  /**\n   * Remove a CSS class name from the `Component`s element.\n   *\n   * @param {string} classToRemove\n   *        CSS class name to remove\n   */\n  ;\n\n  _proto.removeClass = function removeClass$1(classToRemove) {\n    removeClass(this.el_, classToRemove);\n  }\n  /**\n   * Add or remove a CSS class name from the component's element.\n   * - `classToToggle` gets added when {@link Component#hasClass} would return false.\n   * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\n   *\n   * @param  {string} classToToggle\n   *         The class to add or remove based on (@link Component#hasClass}\n   *\n   * @param  {boolean|Dom~predicate} [predicate]\n   *         An {@link Dom~predicate} function or a boolean\n   */\n  ;\n\n  _proto.toggleClass = function toggleClass$1(classToToggle, predicate) {\n    toggleClass(this.el_, classToToggle, predicate);\n  }\n  /**\n   * Show the `Component`s element if it is hidden by removing the\n   * 'vjs-hidden' class name from it.\n   */\n  ;\n\n  _proto.show = function show() {\n    this.removeClass('vjs-hidden');\n  }\n  /**\n   * Hide the `Component`s element if it is currently showing by adding the\n   * 'vjs-hidden` class name to it.\n   */\n  ;\n\n  _proto.hide = function hide() {\n    this.addClass('vjs-hidden');\n  }\n  /**\n   * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\n   * class name to it. Used during fadeIn/fadeOut.\n   *\n   * @private\n   */\n  ;\n\n  _proto.lockShowing = function lockShowing() {\n    this.addClass('vjs-lock-showing');\n  }\n  /**\n   * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\n   * class name from it. Used during fadeIn/fadeOut.\n   *\n   * @private\n   */\n  ;\n\n  _proto.unlockShowing = function unlockShowing() {\n    this.removeClass('vjs-lock-showing');\n  }\n  /**\n   * Get the value of an attribute on the `Component`s element.\n   *\n   * @param {string} attribute\n   *        Name of the attribute to get the value from.\n   *\n   * @return {string|null}\n   *         - The value of the attribute that was asked for.\n   *         - Can be an empty string on some browsers if the attribute does not exist\n   *           or has no value\n   *         - Most browsers will return null if the attibute does not exist or has\n   *           no value.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\n   */\n  ;\n\n  _proto.getAttribute = function getAttribute$1(attribute) {\n    return getAttribute(this.el_, attribute);\n  }\n  /**\n   * Set the value of an attribute on the `Component`'s element\n   *\n   * @param {string} attribute\n   *        Name of the attribute to set.\n   *\n   * @param {string} value\n   *        Value to set the attribute to.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\n   */\n  ;\n\n  _proto.setAttribute = function setAttribute$1(attribute, value) {\n    setAttribute(this.el_, attribute, value);\n  }\n  /**\n   * Remove an attribute from the `Component`s element.\n   *\n   * @param {string} attribute\n   *        Name of the attribute to remove.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\n   */\n  ;\n\n  _proto.removeAttribute = function removeAttribute$1(attribute) {\n    removeAttribute(this.el_, attribute);\n  }\n  /**\n   * Get or set the width of the component based upon the CSS styles.\n   * See {@link Component#dimension} for more detailed information.\n   *\n   * @param {number|string} [num]\n   *        The width that you want to set postfixed with '%', 'px' or nothing.\n   *\n   * @param {boolean} [skipListeners]\n   *        Skip the componentresize event trigger\n   *\n   * @return {number|string}\n   *         The width when getting, zero if there is no width. Can be a string\n   *           postpixed with '%' or 'px'.\n   */\n  ;\n\n  _proto.width = function width(num, skipListeners) {\n    return this.dimension('width', num, skipListeners);\n  }\n  /**\n   * Get or set the height of the component based upon the CSS styles.\n   * See {@link Component#dimension} for more detailed information.\n   *\n   * @param {number|string} [num]\n   *        The height that you want to set postfixed with '%', 'px' or nothing.\n   *\n   * @param {boolean} [skipListeners]\n   *        Skip the componentresize event trigger\n   *\n   * @return {number|string}\n   *         The width when getting, zero if there is no width. Can be a string\n   *         postpixed with '%' or 'px'.\n   */\n  ;\n\n  _proto.height = function height(num, skipListeners) {\n    return this.dimension('height', num, skipListeners);\n  }\n  /**\n   * Set both the width and height of the `Component` element at the same time.\n   *\n   * @param  {number|string} width\n   *         Width to set the `Component`s element to.\n   *\n   * @param  {number|string} height\n   *         Height to set the `Component`s element to.\n   */\n  ;\n\n  _proto.dimensions = function dimensions(width, height) {\n    // Skip componentresize listeners on width for optimization\n    this.width(width, true);\n    this.height(height);\n  }\n  /**\n   * Get or set width or height of the `Component` element. This is the shared code\n   * for the {@link Component#width} and {@link Component#height}.\n   *\n   * Things to know:\n   * - If the width or height in an number this will return the number postfixed with 'px'.\n   * - If the width/height is a percent this will return the percent postfixed with '%'\n   * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\n   *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\n   *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\n   *   for more information\n   * - If you want the computed style of the component, use {@link Component#currentWidth}\n   *   and {@link {Component#currentHeight}\n   *\n   * @fires Component#componentresize\n   *\n   * @param {string} widthOrHeight\n   8        'width' or 'height'\n   *\n   * @param  {number|string} [num]\n   8         New dimension\n   *\n   * @param  {boolean} [skipListeners]\n   *         Skip componentresize event trigger\n   *\n   * @return {number}\n   *         The dimension when getting or 0 if unset\n   */\n  ;\n\n  _proto.dimension = function dimension(widthOrHeight, num, skipListeners) {\n    if (num !== undefined) {\n      // Set to zero if null or literally NaN (NaN !== NaN)\n      if (num === null || num !== num) {\n        num = 0;\n      } // Check if using css width/height (% or px) and adjust\n\n\n      if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n        this.el_.style[widthOrHeight] = num;\n      } else if (num === 'auto') {\n        this.el_.style[widthOrHeight] = '';\n      } else {\n        this.el_.style[widthOrHeight] = num + 'px';\n      } // skipListeners allows us to avoid triggering the resize event when setting both width and height\n\n\n      if (!skipListeners) {\n        /**\n         * Triggered when a component is resized.\n         *\n         * @event Component#componentresize\n         * @type {EventTarget~Event}\n         */\n        this.trigger('componentresize');\n      }\n\n      return;\n    } // Not setting a value, so getting it\n    // Make sure element exists\n\n\n    if (!this.el_) {\n      return 0;\n    } // Get dimension value from style\n\n\n    var val = this.el_.style[widthOrHeight];\n    var pxIndex = val.indexOf('px');\n\n    if (pxIndex !== -1) {\n      // Return the pixel value with no 'px'\n      return parseInt(val.slice(0, pxIndex), 10);\n    } // No px so using % or no style was set, so falling back to offsetWidth/height\n    // If component has display:none, offset will return 0\n    // TODO: handle display:none and no dimension style using px\n\n\n    return parseInt(this.el_['offset' + toTitleCase$1(widthOrHeight)], 10);\n  }\n  /**\n   * Get the computed width or the height of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @param {string} widthOrHeight\n   *        A string containing 'width' or 'height'. Whichever one you want to get.\n   *\n   * @return {number}\n   *         The dimension that gets asked for or 0 if nothing was set\n   *         for that dimension.\n   */\n  ;\n\n  _proto.currentDimension = function currentDimension(widthOrHeight) {\n    var computedWidthOrHeight = 0;\n\n    if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n      throw new Error('currentDimension only accepts width or height value');\n    }\n\n    computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); // remove 'px' from variable and parse as integer\n\n    computedWidthOrHeight = parseFloat(computedWidthOrHeight); // if the computed value is still 0, it's possible that the browser is lying\n    // and we want to check the offset values.\n    // This code also runs wherever getComputedStyle doesn't exist.\n\n    if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\n      var rule = \"offset\" + toTitleCase$1(widthOrHeight);\n      computedWidthOrHeight = this.el_[rule];\n    }\n\n    return computedWidthOrHeight;\n  }\n  /**\n   * An object that contains width and height values of the `Component`s\n   * computed style. Uses `window.getComputedStyle`.\n   *\n   * @typedef {Object} Component~DimensionObject\n   *\n   * @property {number} width\n   *           The width of the `Component`s computed style.\n   *\n   * @property {number} height\n   *           The height of the `Component`s computed style.\n   */\n\n  /**\n   * Get an object that contains computed width and height values of the\n   * component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {Component~DimensionObject}\n   *         The computed dimensions of the component's element.\n   */\n  ;\n\n  _proto.currentDimensions = function currentDimensions() {\n    return {\n      width: this.currentDimension('width'),\n      height: this.currentDimension('height')\n    };\n  }\n  /**\n   * Get the computed width of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {number}\n   *         The computed width of the component's element.\n   */\n  ;\n\n  _proto.currentWidth = function currentWidth() {\n    return this.currentDimension('width');\n  }\n  /**\n   * Get the computed height of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {number}\n   *         The computed height of the component's element.\n   */\n  ;\n\n  _proto.currentHeight = function currentHeight() {\n    return this.currentDimension('height');\n  }\n  /**\n   * Set the focus to this component\n   */\n  ;\n\n  _proto.focus = function focus() {\n    this.el_.focus();\n  }\n  /**\n   * Remove the focus from this component\n   */\n  ;\n\n  _proto.blur = function blur() {\n    this.el_.blur();\n  }\n  /**\n   * When this Component receives a `keydown` event which it does not process,\n   *  it passes the event to the Player for handling.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    if (this.player_) {\n      // We only stop propagation here because we want unhandled events to fall\n      // back to the browser. Exclude Tab for focus trapping.\n      if (!keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n        event.stopPropagation();\n      }\n\n      this.player_.handleKeyDown(event);\n    }\n  }\n  /**\n   * Many components used to have a `handleKeyPress` method, which was poorly\n   * named because it listened to a `keydown` event. This method name now\n   * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\n   * will not see their method calls stop working.\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to be called.\n   */\n  ;\n\n  _proto.handleKeyPress = function handleKeyPress(event) {\n    this.handleKeyDown(event);\n  }\n  /**\n   * Emit a 'tap' events when touch event support gets detected. This gets used to\n   * support toggling the controls through a tap on the video. They get enabled\n   * because every sub-component would have extra overhead otherwise.\n   *\n   * @private\n   * @fires Component#tap\n   * @listens Component#touchstart\n   * @listens Component#touchmove\n   * @listens Component#touchleave\n   * @listens Component#touchcancel\n   * @listens Component#touchend\n    */\n  ;\n\n  _proto.emitTapEvents = function emitTapEvents() {\n    // Track the start time so we can determine how long the touch lasted\n    var touchStart = 0;\n    var firstTouch = null; // Maximum movement allowed during a touch event to still be considered a tap\n    // Other popular libs use anywhere from 2 (hammer.js) to 15,\n    // so 10 seems like a nice, round number.\n\n    var tapMovementThreshold = 10; // The maximum length a touch can be while still being considered a tap\n\n    var touchTimeThreshold = 200;\n    var couldBeTap;\n    this.on('touchstart', function (event) {\n      // If more than one finger, don't consider treating this as a click\n      if (event.touches.length === 1) {\n        // Copy pageX/pageY from the object\n        firstTouch = {\n          pageX: event.touches[0].pageX,\n          pageY: event.touches[0].pageY\n        }; // Record start time so we can detect a tap vs. \"touch and hold\"\n\n        touchStart = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now(); // Reset couldBeTap tracking\n\n        couldBeTap = true;\n      }\n    });\n    this.on('touchmove', function (event) {\n      // If more than one finger, don't consider treating this as a click\n      if (event.touches.length > 1) {\n        couldBeTap = false;\n      } else if (firstTouch) {\n        // Some devices will throw touchmoves for all but the slightest of taps.\n        // So, if we moved only a small distance, this could still be a tap\n        var xdiff = event.touches[0].pageX - firstTouch.pageX;\n        var ydiff = event.touches[0].pageY - firstTouch.pageY;\n        var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n        if (touchDistance > tapMovementThreshold) {\n          couldBeTap = false;\n        }\n      }\n    });\n\n    var noTap = function noTap() {\n      couldBeTap = false;\n    }; // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n\n\n    this.on('touchleave', noTap);\n    this.on('touchcancel', noTap); // When the touch ends, measure how long it took and trigger the appropriate\n    // event\n\n    this.on('touchend', function (event) {\n      firstTouch = null; // Proceed only if the touchmove/leave/cancel event didn't happen\n\n      if (couldBeTap === true) {\n        // Measure how long the touch lasted\n        var touchTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() - touchStart; // Make sure the touch was less than the threshold to be considered a tap\n\n        if (touchTime < touchTimeThreshold) {\n          // Don't let browser turn this into a click\n          event.preventDefault();\n          /**\n           * Triggered when a `Component` is tapped.\n           *\n           * @event Component#tap\n           * @type {EventTarget~Event}\n           */\n\n          this.trigger('tap'); // It may be good to copy the touchend event object and change the\n          // type to tap, if the other event properties aren't exact after\n          // Events.fixEvent runs (e.g. event.target)\n        }\n      }\n    });\n  }\n  /**\n   * This function reports user activity whenever touch events happen. This can get\n   * turned off by any sub-components that wants touch events to act another way.\n   *\n   * Report user touch activity when touch events occur. User activity gets used to\n   * determine when controls should show/hide. It is simple when it comes to mouse\n   * events, because any mouse event should show the controls. So we capture mouse\n   * events that bubble up to the player and report activity when that happens.\n   * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\n   * controls. So touch events can't help us at the player level either.\n   *\n   * User activity gets checked asynchronously. So what could happen is a tap event\n   * on the video turns the controls off. Then the `touchend` event bubbles up to\n   * the player. Which, if it reported user activity, would turn the controls right\n   * back on. We also don't want to completely block touch events from bubbling up.\n   * Furthermore a `touchmove` event and anything other than a tap, should not turn\n   * controls back on.\n   *\n   * @listens Component#touchstart\n   * @listens Component#touchmove\n   * @listens Component#touchend\n   * @listens Component#touchcancel\n   */\n  ;\n\n  _proto.enableTouchActivity = function enableTouchActivity() {\n    // Don't continue if the root player doesn't support reporting user activity\n    if (!this.player() || !this.player().reportUserActivity) {\n      return;\n    } // listener for reporting that the user is active\n\n\n    var report = bind(this.player(), this.player().reportUserActivity);\n    var touchHolding;\n    this.on('touchstart', function () {\n      report(); // For as long as the they are touching the device or have their mouse down,\n      // we consider them active even if they're not moving their finger or mouse.\n      // So we want to continue to update that they are active\n\n      this.clearInterval(touchHolding); // report at the same interval as activityCheck\n\n      touchHolding = this.setInterval(report, 250);\n    });\n\n    var touchEnd = function touchEnd(event) {\n      report(); // stop the interval that maintains activity if the touch is holding\n\n      this.clearInterval(touchHolding);\n    };\n\n    this.on('touchmove', report);\n    this.on('touchend', touchEnd);\n    this.on('touchcancel', touchEnd);\n  }\n  /**\n   * A callback that has no parameters and is bound into `Component`s context.\n   *\n   * @callback Component~GenericCallback\n   * @this Component\n   */\n\n  /**\n   * Creates a function that runs after an `x` millisecond timeout. This function is a\n   * wrapper around `window.setTimeout`. There are a few reasons to use this one\n   * instead though:\n   * 1. It gets cleared via  {@link Component#clearTimeout} when\n   *    {@link Component#dispose} gets called.\n   * 2. The function callback will gets turned into a {@link Component~GenericCallback}\n   *\n   * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\n   *         will cause its dispose listener not to get cleaned up! Please use\n   *         {@link Component#clearTimeout} or {@link Component#dispose} instead.\n   *\n   * @param {Component~GenericCallback} fn\n   *        The function that will be run after `timeout`.\n   *\n   * @param {number} timeout\n   *        Timeout in milliseconds to delay before executing the specified function.\n   *\n   * @return {number}\n   *         Returns a timeout ID that gets used to identify the timeout. It can also\n   *         get used in {@link Component#clearTimeout} to clear the timeout that\n   *         was set.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\n   */\n  ;\n\n  _proto.setTimeout = function setTimeout(fn, timeout) {\n    var _this3 = this;\n\n    // declare as variables so they are properly available in timeout function\n    // eslint-disable-next-line\n    var timeoutId;\n    fn = bind(this, fn);\n    this.clearTimersOnDispose_();\n    timeoutId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n      if (_this3.setTimeoutIds_.has(timeoutId)) {\n        _this3.setTimeoutIds_[\"delete\"](timeoutId);\n      }\n\n      fn();\n    }, timeout);\n    this.setTimeoutIds_.add(timeoutId);\n    return timeoutId;\n  }\n  /**\n   * Clears a timeout that gets created via `window.setTimeout` or\n   * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\n   * use this function instead of `window.clearTimout`. If you don't your dispose\n   * listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} timeoutId\n   *        The id of the timeout to clear. The return value of\n   *        {@link Component#setTimeout} or `window.setTimeout`.\n   *\n   * @return {number}\n   *         Returns the timeout id that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\n   */\n  ;\n\n  _proto.clearTimeout = function clearTimeout(timeoutId) {\n    if (this.setTimeoutIds_.has(timeoutId)) {\n      this.setTimeoutIds_[\"delete\"](timeoutId);\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(timeoutId);\n    }\n\n    return timeoutId;\n  }\n  /**\n   * Creates a function that gets run every `x` milliseconds. This function is a wrapper\n   * around `window.setInterval`. There are a few reasons to use this one instead though.\n   * 1. It gets cleared via  {@link Component#clearInterval} when\n   *    {@link Component#dispose} gets called.\n   * 2. The function callback will be a {@link Component~GenericCallback}\n   *\n   * @param {Component~GenericCallback} fn\n   *        The function to run every `x` seconds.\n   *\n   * @param {number} interval\n   *        Execute the specified function every `x` milliseconds.\n   *\n   * @return {number}\n   *         Returns an id that can be used to identify the interval. It can also be be used in\n   *         {@link Component#clearInterval} to clear the interval.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\n   */\n  ;\n\n  _proto.setInterval = function setInterval(fn, interval) {\n    fn = bind(this, fn);\n    this.clearTimersOnDispose_();\n    var intervalId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setInterval(fn, interval);\n    this.setIntervalIds_.add(intervalId);\n    return intervalId;\n  }\n  /**\n   * Clears an interval that gets created via `window.setInterval` or\n   * {@link Component#setInterval}. If you set an inteval via {@link Component#setInterval}\n   * use this function instead of `window.clearInterval`. If you don't your dispose\n   * listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} intervalId\n   *        The id of the interval to clear. The return value of\n   *        {@link Component#setInterval} or `window.setInterval`.\n   *\n   * @return {number}\n   *         Returns the interval id that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\n   */\n  ;\n\n  _proto.clearInterval = function clearInterval(intervalId) {\n    if (this.setIntervalIds_.has(intervalId)) {\n      this.setIntervalIds_[\"delete\"](intervalId);\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearInterval(intervalId);\n    }\n\n    return intervalId;\n  }\n  /**\n   * Queues up a callback to be passed to requestAnimationFrame (rAF), but\n   * with a few extra bonuses:\n   *\n   * - Supports browsers that do not support rAF by falling back to\n   *   {@link Component#setTimeout}.\n   *\n   * - The callback is turned into a {@link Component~GenericCallback} (i.e.\n   *   bound to the component).\n   *\n   * - Automatic cancellation of the rAF callback is handled if the component\n   *   is disposed before it is called.\n   *\n   * @param  {Component~GenericCallback} fn\n   *         A function that will be bound to this component and executed just\n   *         before the browser's next repaint.\n   *\n   * @return {number}\n   *         Returns an rAF ID that gets used to identify the timeout. It can\n   *         also be used in {@link Component#cancelAnimationFrame} to cancel\n   *         the animation frame callback.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\n   */\n  ;\n\n  _proto.requestAnimationFrame = function requestAnimationFrame(fn) {\n    var _this4 = this;\n\n    // Fall back to using a timer.\n    if (!this.supportsRaf_) {\n      return this.setTimeout(fn, 1000 / 60);\n    }\n\n    this.clearTimersOnDispose_(); // declare as variables so they are properly available in rAF function\n    // eslint-disable-next-line\n\n    var id;\n    fn = bind(this, fn);\n    id = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame(function () {\n      if (_this4.rafIds_.has(id)) {\n        _this4.rafIds_[\"delete\"](id);\n      }\n\n      fn();\n    });\n    this.rafIds_.add(id);\n    return id;\n  }\n  /**\n   * Request an animation frame, but only one named animation\n   * frame will be queued. Another will never be added until\n   * the previous one finishes.\n   *\n   * @param {string} name\n   *        The name to give this requestAnimationFrame\n   *\n   * @param  {Component~GenericCallback} fn\n   *         A function that will be bound to this component and executed just\n   *         before the browser's next repaint.\n   */\n  ;\n\n  _proto.requestNamedAnimationFrame = function requestNamedAnimationFrame(name, fn) {\n    var _this5 = this;\n\n    if (this.namedRafs_.has(name)) {\n      return;\n    }\n\n    this.clearTimersOnDispose_();\n    fn = bind(this, fn);\n    var id = this.requestAnimationFrame(function () {\n      fn();\n\n      if (_this5.namedRafs_.has(name)) {\n        _this5.namedRafs_[\"delete\"](name);\n      }\n    });\n    this.namedRafs_.set(name, id);\n    return name;\n  }\n  /**\n   * Cancels a current named animation frame if it exists.\n   *\n   * @param {string} name\n   *        The name of the requestAnimationFrame to cancel.\n   */\n  ;\n\n  _proto.cancelNamedAnimationFrame = function cancelNamedAnimationFrame(name) {\n    if (!this.namedRafs_.has(name)) {\n      return;\n    }\n\n    this.cancelAnimationFrame(this.namedRafs_.get(name));\n    this.namedRafs_[\"delete\"](name);\n  }\n  /**\n   * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\n   * (rAF).\n   *\n   * If you queue an rAF callback via {@link Component#requestAnimationFrame},\n   * use this function instead of `window.cancelAnimationFrame`. If you don't,\n   * your dispose listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} id\n   *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\n   *\n   * @return {number}\n   *         Returns the rAF ID that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\n   */\n  ;\n\n  _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {\n    // Fall back to using a timer.\n    if (!this.supportsRaf_) {\n      return this.clearTimeout(id);\n    }\n\n    if (this.rafIds_.has(id)) {\n      this.rafIds_[\"delete\"](id);\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame(id);\n    }\n\n    return id;\n  }\n  /**\n   * A function to setup `requestAnimationFrame`, `setTimeout`,\n   * and `setInterval`, clearing on dispose.\n   *\n   * > Previously each timer added and removed dispose listeners on it's own.\n   * For better performance it was decided to batch them all, and use `Set`s\n   * to track outstanding timer ids.\n   *\n   * @private\n   */\n  ;\n\n  _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() {\n    var _this6 = this;\n\n    if (this.clearingTimersOnDispose_) {\n      return;\n    }\n\n    this.clearingTimersOnDispose_ = true;\n    this.one('dispose', function () {\n      [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) {\n        var idName = _ref[0],\n            cancelName = _ref[1];\n\n        // for a `Set` key will actually be the value again\n        // so forEach((val, val) =>` but for maps we want to use\n        // the key.\n        _this6[idName].forEach(function (val, key) {\n          return _this6[cancelName](key);\n        });\n      });\n      _this6.clearingTimersOnDispose_ = false;\n    });\n  }\n  /**\n   * Register a `Component` with `videojs` given the name and the component.\n   *\n   * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\n   *         should be registered using {@link Tech.registerTech} or\n   *         {@link videojs:videojs.registerTech}.\n   *\n   * > NOTE: This function can also be seen on videojs as\n   *         {@link videojs:videojs.registerComponent}.\n   *\n   * @param {string} name\n   *        The name of the `Component` to register.\n   *\n   * @param {Component} ComponentToRegister\n   *        The `Component` class to register.\n   *\n   * @return {Component}\n   *         The `Component` that was registered.\n   */\n  ;\n\n  Component.registerComponent = function registerComponent(name, ComponentToRegister) {\n    if (typeof name !== 'string' || !name) {\n      throw new Error(\"Illegal component name, \\\"\" + name + \"\\\"; must be a non-empty string.\");\n    }\n\n    var Tech = Component.getComponent('Tech'); // We need to make sure this check is only done if Tech has been registered.\n\n    var isTech = Tech && Tech.isTech(ComponentToRegister);\n    var isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype);\n\n    if (isTech || !isComp) {\n      var reason;\n\n      if (isTech) {\n        reason = 'techs must be registered using Tech.registerTech()';\n      } else {\n        reason = 'must be a Component subclass';\n      }\n\n      throw new Error(\"Illegal component, \\\"\" + name + \"\\\"; \" + reason + \".\");\n    }\n\n    name = toTitleCase$1(name);\n\n    if (!Component.components_) {\n      Component.components_ = {};\n    }\n\n    var Player = Component.getComponent('Player');\n\n    if (name === 'Player' && Player && Player.players) {\n      var players = Player.players;\n      var playerNames = Object.keys(players); // If we have players that were disposed, then their name will still be\n      // in Players.players. So, we must loop through and verify that the value\n      // for each item is not null. This allows registration of the Player component\n      // after all players have been disposed or before any were created.\n\n      if (players && playerNames.length > 0 && playerNames.map(function (pname) {\n        return players[pname];\n      }).every(Boolean)) {\n        throw new Error('Can not register Player component after player has been created.');\n      }\n    }\n\n    Component.components_[name] = ComponentToRegister;\n    Component.components_[toLowerCase(name)] = ComponentToRegister;\n    return ComponentToRegister;\n  }\n  /**\n   * Get a `Component` based on the name it was registered with.\n   *\n   * @param {string} name\n   *        The Name of the component to get.\n   *\n   * @return {Component}\n   *         The `Component` that got registered under the given name.\n   */\n  ;\n\n  Component.getComponent = function getComponent(name) {\n    if (!name || !Component.components_) {\n      return;\n    }\n\n    return Component.components_[name];\n  };\n\n  return Component;\n}();\n/**\n * Whether or not this component supports `requestAnimationFrame`.\n *\n * This is exposed primarily for testing purposes.\n *\n * @private\n * @type {Boolean}\n */\n\n\nComponent$1.prototype.supportsRaf_ = typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame === 'function' && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame === 'function';\nComponent$1.registerComponent('Component', Component$1);\n\n/**\n * @file time-ranges.js\n * @module time-ranges\n */\n/**\n * Returns the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @typedef    {Function} TimeRangeIndex\n *\n * @param      {number} [index=0]\n *             The range number to return the time for.\n *\n * @return     {number}\n *             The time offset at the specified index.\n *\n * @deprecated The index argument must be provided.\n *             In the future, leaving it out will throw an error.\n */\n\n/**\n * An object that contains ranges of time.\n *\n * @typedef  {Object} TimeRange\n *\n * @property {number} length\n *           The number of time ranges represented by this object.\n *\n * @property {module:time-ranges~TimeRangeIndex} start\n *           Returns the time offset at which a specified time range begins.\n *\n * @property {module:time-ranges~TimeRangeIndex} end\n *           Returns the time offset at which a specified time range ends.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\n */\n\n/**\n * Check if any of the time ranges are over the maximum index.\n *\n * @private\n * @param   {string} fnName\n *          The function name to use for logging\n *\n * @param   {number} index\n *          The index to check\n *\n * @param   {number} maxIndex\n *          The maximum possible index\n *\n * @throws  {Error} if the timeRanges provided are over the maxIndex\n */\n\nfunction rangeCheck(fnName, index, maxIndex) {\n  if (typeof index !== 'number' || index < 0 || index > maxIndex) {\n    throw new Error(\"Failed to execute '\" + fnName + \"' on 'TimeRanges': The index provided (\" + index + \") is non-numeric or out of bounds (0-\" + maxIndex + \").\");\n  }\n}\n/**\n * Get the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @private\n * @param      {string} fnName\n *             The function name to use for logging\n *\n * @param      {string} valueIndex\n *             The property that should be used to get the time. should be\n *             'start' or 'end'\n *\n * @param      {Array} ranges\n *             An array of time ranges\n *\n * @param      {Array} [rangeIndex=0]\n *             The index to start the search at\n *\n * @return     {number}\n *             The time that offset at the specified index.\n *\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\n * @throws     {Error} if rangeIndex is more than the length of ranges\n */\n\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\n  rangeCheck(fnName, rangeIndex, ranges.length - 1);\n  return ranges[rangeIndex][valueIndex];\n}\n/**\n * Create a time range object given ranges of time.\n *\n * @private\n * @param   {Array} [ranges]\n *          An array of time ranges.\n */\n\n\nfunction createTimeRangesObj(ranges) {\n  var timeRangesObj;\n\n  if (ranges === undefined || ranges.length === 0) {\n    timeRangesObj = {\n      length: 0,\n      start: function start() {\n        throw new Error('This TimeRanges object is empty');\n      },\n      end: function end() {\n        throw new Error('This TimeRanges object is empty');\n      }\n    };\n  } else {\n    timeRangesObj = {\n      length: ranges.length,\n      start: getRange.bind(null, 'start', 0, ranges),\n      end: getRange.bind(null, 'end', 1, ranges)\n    };\n  }\n\n  if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Symbol && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Symbol.iterator) {\n    timeRangesObj[global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Symbol.iterator] = function () {\n      return (ranges || []).values();\n    };\n  }\n\n  return timeRangesObj;\n}\n/**\n * Create a `TimeRange` object which mimics an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\n *\n * @param {number|Array[]} start\n *        The start of a single range (a number) or an array of ranges (an\n *        array of arrays of two numbers each).\n *\n * @param {number} end\n *        The end of a single range. Cannot be used with the array form of\n *        the `start` argument.\n */\n\n\nfunction createTimeRanges(start, end) {\n  if (Array.isArray(start)) {\n    return createTimeRangesObj(start);\n  } else if (start === undefined || end === undefined) {\n    return createTimeRangesObj();\n  }\n\n  return createTimeRangesObj([[start, end]]);\n}\n\n/**\n * @file buffer.js\n * @module buffer\n */\n/**\n * Compute the percentage of the media that has been buffered.\n *\n * @param {TimeRange} buffered\n *        The current `TimeRange` object representing buffered time ranges\n *\n * @param {number} duration\n *        Total duration of the media\n *\n * @return {number}\n *         Percent buffered of the total duration in decimal form.\n */\n\nfunction bufferedPercent(buffered, duration) {\n  var bufferedDuration = 0;\n  var start;\n  var end;\n\n  if (!duration) {\n    return 0;\n  }\n\n  if (!buffered || !buffered.length) {\n    buffered = createTimeRanges(0, 0);\n  }\n\n  for (var i = 0; i < buffered.length; i++) {\n    start = buffered.start(i);\n    end = buffered.end(i); // buffered end can be bigger than duration by a very small fraction\n\n    if (end > duration) {\n      end = duration;\n    }\n\n    bufferedDuration += end - start;\n  }\n\n  return bufferedDuration / duration;\n}\n\n/**\n * @file media-error.js\n */\n/**\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\n *\n * @param {number|string|Object|MediaError} value\n *        This can be of multiple types:\n *        - number: should be a standard error code\n *        - string: an error message (the code will be 0)\n *        - Object: arbitrary properties\n *        - `MediaError` (native): used to populate a video.js `MediaError` object\n *        - `MediaError` (video.js): will return itself if it's already a\n *          video.js `MediaError` object.\n *\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\n *\n * @class MediaError\n */\n\nfunction MediaError(value) {\n  // Allow redundant calls to this constructor to avoid having `instanceof`\n  // checks peppered around the code.\n  if (value instanceof MediaError) {\n    return value;\n  }\n\n  if (typeof value === 'number') {\n    this.code = value;\n  } else if (typeof value === 'string') {\n    // default code is zero, so this is a custom error\n    this.message = value;\n  } else if (isObject(value)) {\n    // We assign the `code` property manually because native `MediaError` objects\n    // do not expose it as an own/enumerable property of the object.\n    if (typeof value.code === 'number') {\n      this.code = value.code;\n    }\n\n    assign(this, value);\n  }\n\n  if (!this.message) {\n    this.message = MediaError.defaultMessages[this.code] || '';\n  }\n}\n/**\n * The error code that refers two one of the defined `MediaError` types\n *\n * @type {Number}\n */\n\n\nMediaError.prototype.code = 0;\n/**\n * An optional message that to show with the error. Message is not part of the HTML5\n * video spec but allows for more informative custom errors.\n *\n * @type {String}\n */\n\nMediaError.prototype.message = '';\n/**\n * An optional status code that can be set by plugins to allow even more detail about\n * the error. For example a plugin might provide a specific HTTP status code and an\n * error message for that code. Then when the plugin gets that error this class will\n * know how to display an error message for it. This allows a custom message to show\n * up on the `Player` error overlay.\n *\n * @type {Array}\n */\n\nMediaError.prototype.status = null;\n/**\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\n * specification listed under {@link MediaError} for more information.\n *\n * @enum {array}\n * @readonly\n * @property {string} 0 - MEDIA_ERR_CUSTOM\n * @property {string} 1 - MEDIA_ERR_ABORTED\n * @property {string} 2 - MEDIA_ERR_NETWORK\n * @property {string} 3 - MEDIA_ERR_DECODE\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\n */\n\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\n/**\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\n *\n * @type {Array}\n * @constant\n */\n\nMediaError.defaultMessages = {\n  1: 'You aborted the media playback',\n  2: 'A network error caused the media download to fail part-way.',\n  3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n  4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n  5: 'The media is encrypted and we do not have the keys to decrypt it.'\n}; // Add types as properties on MediaError\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\n  MediaError[MediaError.errorTypes[errNum]] = errNum; // values should be accessible on both the class and instance\n\n  MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\n} // jsdocs for instance/static members added above\n\n/**\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\n *\n * @param  {Object}  value\n *         An object that may or may not be `Promise`-like.\n *\n * @return {boolean}\n *         Whether or not the object is `Promise`-like.\n */\nfunction isPromise(value) {\n  return value !== undefined && value !== null && typeof value.then === 'function';\n}\n/**\n * Silence a Promise-like object.\n *\n * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\n * play promise\" rejection error messages.\n *\n * @param  {Object} value\n *         An object that may or may not be `Promise`-like.\n */\n\nfunction silencePromise(value) {\n  if (isPromise(value)) {\n    value.then(null, function (e) {});\n  }\n}\n\n/**\n * @file text-track-list-converter.js Utilities for capturing text track state and\n * re-creating tracks based on a capture.\n *\n * @module text-track-list-converter\n */\n\n/**\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\n * represents the {@link TextTrack}'s state.\n *\n * @param {TextTrack} track\n *        The text track to query.\n *\n * @return {Object}\n *         A serializable javascript representation of the TextTrack.\n * @private\n */\nvar trackToJson_ = function trackToJson_(track) {\n  var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {\n    if (track[prop]) {\n      acc[prop] = track[prop];\n    }\n\n    return acc;\n  }, {\n    cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\n      return {\n        startTime: cue.startTime,\n        endTime: cue.endTime,\n        text: cue.text,\n        id: cue.id\n      };\n    })\n  });\n  return ret;\n};\n/**\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\n * {@link text-track-list-converter:jsonToTextTracks}.\n *\n * @param {Tech} tech\n *        The tech object to query\n *\n * @return {Array}\n *         A serializable javascript representation of the {@link Tech}s\n *         {@link TextTrackList}.\n */\n\n\nvar textTracksToJson = function textTracksToJson(tech) {\n  var trackEls = tech.$$('track');\n  var trackObjs = Array.prototype.map.call(trackEls, function (t) {\n    return t.track;\n  });\n  var tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n    var json = trackToJson_(trackEl.track);\n\n    if (trackEl.src) {\n      json.src = trackEl.src;\n    }\n\n    return json;\n  });\n  return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\n    return trackObjs.indexOf(track) === -1;\n  }).map(trackToJson_));\n};\n/**\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\n * object {@link TextTrack} representations.\n *\n * @param {Array} json\n *        An array of `TextTrack` representation objects, like those that would be\n *        produced by `textTracksToJson`.\n *\n * @param {Tech} tech\n *        The `Tech` to create the `TextTrack`s on.\n */\n\n\nvar jsonToTextTracks = function jsonToTextTracks(json, tech) {\n  json.forEach(function (track) {\n    var addedTrack = tech.addRemoteTextTrack(track).track;\n\n    if (!track.src && track.cues) {\n      track.cues.forEach(function (cue) {\n        return addedTrack.addCue(cue);\n      });\n    }\n  });\n  return tech.textTracks();\n};\n\nvar textTrackConverter = {\n  textTracksToJson: textTracksToJson,\n  jsonToTextTracks: jsonToTextTracks,\n  trackToJson_: trackToJson_\n};\n\nvar MODAL_CLASS_NAME = 'vjs-modal-dialog';\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n */\n\nvar ModalDialog = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ModalDialog, _Component);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Mixed} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.description]\n   *        A text description for the modal, primarily for accessibility.\n   *\n   * @param {boolean} [options.fillAlways=false]\n   *        Normally, modals are automatically filled only the first time\n   *        they open. This tells the modal to refresh its content\n   *        every time it opens.\n   *\n   * @param {string} [options.label]\n   *        A text label for the modal, primarily for accessibility.\n   *\n   * @param {boolean} [options.pauseOnOpen=true]\n   *        If `true`, playback will will be paused if playing when\n   *        the modal opens, and resumed when it closes.\n   *\n   * @param {boolean} [options.temporary=true]\n   *        If `true`, the modal can only be opened once; it will be\n   *        disposed as soon as it's closed.\n   *\n   * @param {boolean} [options.uncloseable=false]\n   *        If `true`, the user will not be able to close the modal\n   *        through the UI in the normal ways. Programmatic closing is\n   *        still possible.\n   */\n  function ModalDialog(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    _this.handleKeyDown_ = function (e) {\n      return _this.handleKeyDown(e);\n    };\n\n    _this.close_ = function (e) {\n      return _this.close(e);\n    };\n\n    _this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false;\n\n    _this.closeable(!_this.options_.uncloseable);\n\n    _this.content(_this.options_.content); // Make sure the contentEl is defined AFTER any children are initialized\n    // because we only want the contents of the modal in the contentEl\n    // (not the UI elements like the close button).\n\n\n    _this.contentEl_ = createEl('div', {\n      className: MODAL_CLASS_NAME + \"-content\"\n    }, {\n      role: 'document'\n    });\n    _this.descEl_ = createEl('p', {\n      className: MODAL_CLASS_NAME + \"-description vjs-control-text\",\n      id: _this.el().getAttribute('aria-describedby')\n    });\n    textContent(_this.descEl_, _this.description());\n\n    _this.el_.appendChild(_this.descEl_);\n\n    _this.el_.appendChild(_this.contentEl_);\n\n    return _this;\n  }\n  /**\n   * Create the `ModalDialog`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n\n\n  var _proto = ModalDialog.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: this.buildCSSClass(),\n      tabIndex: -1\n    }, {\n      'aria-describedby': this.id() + \"_description\",\n      'aria-hidden': 'true',\n      'aria-label': this.label(),\n      'role': 'dialog'\n    });\n  };\n\n  _proto.dispose = function dispose() {\n    this.contentEl_ = null;\n    this.descEl_ = null;\n    this.previouslyActiveEl_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return MODAL_CLASS_NAME + \" vjs-hidden \" + _Component.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Returns the label string for this modal. Primarily used for accessibility.\n   *\n   * @return {string}\n   *         the localized or raw label of this modal.\n   */\n  ;\n\n  _proto.label = function label() {\n    return this.localize(this.options_.label || 'Modal Window');\n  }\n  /**\n   * Returns the description string for this modal. Primarily used for\n   * accessibility.\n   *\n   * @return {string}\n   *         The localized or raw description of this modal.\n   */\n  ;\n\n  _proto.description = function description() {\n    var desc = this.options_.description || this.localize('This is a modal window.'); // Append a universal closeability message if the modal is closeable.\n\n    if (this.closeable()) {\n      desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n    }\n\n    return desc;\n  }\n  /**\n   * Opens the modal.\n   *\n   * @fires ModalDialog#beforemodalopen\n   * @fires ModalDialog#modalopen\n   */\n  ;\n\n  _proto.open = function open() {\n    if (!this.opened_) {\n      var player = this.player();\n      /**\n        * Fired just before a `ModalDialog` is opened.\n        *\n        * @event ModalDialog#beforemodalopen\n        * @type {EventTarget~Event}\n        */\n\n      this.trigger('beforemodalopen');\n      this.opened_ = true; // Fill content if the modal has never opened before and\n      // never been filled.\n\n      if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n        this.fill();\n      } // If the player was playing, pause it and take note of its previously\n      // playing state.\n\n\n      this.wasPlaying_ = !player.paused();\n\n      if (this.options_.pauseOnOpen && this.wasPlaying_) {\n        player.pause();\n      }\n\n      this.on('keydown', this.handleKeyDown_); // Hide controls and note if they were enabled.\n\n      this.hadControls_ = player.controls();\n      player.controls(false);\n      this.show();\n      this.conditionalFocus_();\n      this.el().setAttribute('aria-hidden', 'false');\n      /**\n        * Fired just after a `ModalDialog` is opened.\n        *\n        * @event ModalDialog#modalopen\n        * @type {EventTarget~Event}\n        */\n\n      this.trigger('modalopen');\n      this.hasBeenOpened_ = true;\n    }\n  }\n  /**\n   * If the `ModalDialog` is currently open or closed.\n   *\n   * @param  {boolean} [value]\n   *         If given, it will open (`true`) or close (`false`) the modal.\n   *\n   * @return {boolean}\n   *         the current open state of the modaldialog\n   */\n  ;\n\n  _proto.opened = function opened(value) {\n    if (typeof value === 'boolean') {\n      this[value ? 'open' : 'close']();\n    }\n\n    return this.opened_;\n  }\n  /**\n   * Closes the modal, does nothing if the `ModalDialog` is\n   * not open.\n   *\n   * @fires ModalDialog#beforemodalclose\n   * @fires ModalDialog#modalclose\n   */\n  ;\n\n  _proto.close = function close() {\n    if (!this.opened_) {\n      return;\n    }\n\n    var player = this.player();\n    /**\n      * Fired just before a `ModalDialog` is closed.\n      *\n      * @event ModalDialog#beforemodalclose\n      * @type {EventTarget~Event}\n      */\n\n    this.trigger('beforemodalclose');\n    this.opened_ = false;\n\n    if (this.wasPlaying_ && this.options_.pauseOnOpen) {\n      player.play();\n    }\n\n    this.off('keydown', this.handleKeyDown_);\n\n    if (this.hadControls_) {\n      player.controls(true);\n    }\n\n    this.hide();\n    this.el().setAttribute('aria-hidden', 'true');\n    /**\n      * Fired just after a `ModalDialog` is closed.\n      *\n      * @event ModalDialog#modalclose\n      * @type {EventTarget~Event}\n      */\n\n    this.trigger('modalclose');\n    this.conditionalBlur_();\n\n    if (this.options_.temporary) {\n      this.dispose();\n    }\n  }\n  /**\n   * Check to see if the `ModalDialog` is closeable via the UI.\n   *\n   * @param  {boolean} [value]\n   *         If given as a boolean, it will set the `closeable` option.\n   *\n   * @return {boolean}\n   *         Returns the final value of the closable option.\n   */\n  ;\n\n  _proto.closeable = function closeable(value) {\n    if (typeof value === 'boolean') {\n      var closeable = this.closeable_ = !!value;\n      var close = this.getChild('closeButton'); // If this is being made closeable and has no close button, add one.\n\n      if (closeable && !close) {\n        // The close button should be a child of the modal - not its\n        // content element, so temporarily change the content element.\n        var temp = this.contentEl_;\n        this.contentEl_ = this.el_;\n        close = this.addChild('closeButton', {\n          controlText: 'Close Modal Dialog'\n        });\n        this.contentEl_ = temp;\n        this.on(close, 'close', this.close_);\n      } // If this is being made uncloseable and has a close button, remove it.\n\n\n      if (!closeable && close) {\n        this.off(close, 'close', this.close_);\n        this.removeChild(close);\n        close.dispose();\n      }\n    }\n\n    return this.closeable_;\n  }\n  /**\n   * Fill the modal's content element with the modal's \"content\" option.\n   * The content element will be emptied before this change takes place.\n   */\n  ;\n\n  _proto.fill = function fill() {\n    this.fillWith(this.content());\n  }\n  /**\n   * Fill the modal's content element with arbitrary content.\n   * The content element will be emptied before this change takes place.\n   *\n   * @fires ModalDialog#beforemodalfill\n   * @fires ModalDialog#modalfill\n   *\n   * @param {Mixed} [content]\n   *        The same rules apply to this as apply to the `content` option.\n   */\n  ;\n\n  _proto.fillWith = function fillWith(content) {\n    var contentEl = this.contentEl();\n    var parentEl = contentEl.parentNode;\n    var nextSiblingEl = contentEl.nextSibling;\n    /**\n      * Fired just before a `ModalDialog` is filled with content.\n      *\n      * @event ModalDialog#beforemodalfill\n      * @type {EventTarget~Event}\n      */\n\n    this.trigger('beforemodalfill');\n    this.hasBeenFilled_ = true; // Detach the content element from the DOM before performing\n    // manipulation to avoid modifying the live DOM multiple times.\n\n    parentEl.removeChild(contentEl);\n    this.empty();\n    insertContent(contentEl, content);\n    /**\n     * Fired just after a `ModalDialog` is filled with content.\n     *\n     * @event ModalDialog#modalfill\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('modalfill'); // Re-inject the re-filled content element.\n\n    if (nextSiblingEl) {\n      parentEl.insertBefore(contentEl, nextSiblingEl);\n    } else {\n      parentEl.appendChild(contentEl);\n    } // make sure that the close button is last in the dialog DOM\n\n\n    var closeButton = this.getChild('closeButton');\n\n    if (closeButton) {\n      parentEl.appendChild(closeButton.el_);\n    }\n  }\n  /**\n   * Empties the content element. This happens anytime the modal is filled.\n   *\n   * @fires ModalDialog#beforemodalempty\n   * @fires ModalDialog#modalempty\n   */\n  ;\n\n  _proto.empty = function empty() {\n    /**\n    * Fired just before a `ModalDialog` is emptied.\n    *\n    * @event ModalDialog#beforemodalempty\n    * @type {EventTarget~Event}\n    */\n    this.trigger('beforemodalempty');\n    emptyEl(this.contentEl());\n    /**\n    * Fired just after a `ModalDialog` is emptied.\n    *\n    * @event ModalDialog#modalempty\n    * @type {EventTarget~Event}\n    */\n\n    this.trigger('modalempty');\n  }\n  /**\n   * Gets or sets the modal content, which gets normalized before being\n   * rendered into the DOM.\n   *\n   * This does not update the DOM or fill the modal, but it is called during\n   * that process.\n   *\n   * @param  {Mixed} [value]\n   *         If defined, sets the internal content value to be used on the\n   *         next call(s) to `fill`. This value is normalized before being\n   *         inserted. To \"clear\" the internal content value, pass `null`.\n   *\n   * @return {Mixed}\n   *         The current content of the modal dialog\n   */\n  ;\n\n  _proto.content = function content(value) {\n    if (typeof value !== 'undefined') {\n      this.content_ = value;\n    }\n\n    return this.content_;\n  }\n  /**\n   * conditionally focus the modal dialog if focus was previously on the player.\n   *\n   * @private\n   */\n  ;\n\n  _proto.conditionalFocus_ = function conditionalFocus_() {\n    var activeEl = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement;\n    var playerEl = this.player_.el_;\n    this.previouslyActiveEl_ = null;\n\n    if (playerEl.contains(activeEl) || playerEl === activeEl) {\n      this.previouslyActiveEl_ = activeEl;\n      this.focus();\n    }\n  }\n  /**\n   * conditionally blur the element and refocus the last focused element\n   *\n   * @private\n   */\n  ;\n\n  _proto.conditionalBlur_ = function conditionalBlur_() {\n    if (this.previouslyActiveEl_) {\n      this.previouslyActiveEl_.focus();\n      this.previouslyActiveEl_ = null;\n    }\n  }\n  /**\n   * Keydown handler. Attached when modal is focused.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Do not allow keydowns to reach out of the modal dialog.\n    event.stopPropagation();\n\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Escape') && this.closeable()) {\n      event.preventDefault();\n      this.close();\n      return;\n    } // exit early if it isn't a tab key\n\n\n    if (!keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n      return;\n    }\n\n    var focusableEls = this.focusableEls_();\n    var activeEl = this.el_.querySelector(':focus');\n    var focusIndex;\n\n    for (var i = 0; i < focusableEls.length; i++) {\n      if (activeEl === focusableEls[i]) {\n        focusIndex = i;\n        break;\n      }\n    }\n\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement === this.el_) {\n      focusIndex = 0;\n    }\n\n    if (event.shiftKey && focusIndex === 0) {\n      focusableEls[focusableEls.length - 1].focus();\n      event.preventDefault();\n    } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\n      focusableEls[0].focus();\n      event.preventDefault();\n    }\n  }\n  /**\n   * get all focusable elements\n   *\n   * @private\n   */\n  ;\n\n  _proto.focusableEls_ = function focusableEls_() {\n    var allChildren = this.el_.querySelectorAll('*');\n    return Array.prototype.filter.call(allChildren, function (child) {\n      return (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAnchorElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLInputElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLSelectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLTextAreaElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLIFrameElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLObjectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n    });\n  };\n\n  return ModalDialog;\n}(Component$1);\n/**\n * Default options for `ModalDialog` default options.\n *\n * @type {Object}\n * @private\n */\n\n\nModalDialog.prototype.options_ = {\n  pauseOnOpen: true,\n  temporary: true\n};\nComponent$1.registerComponent('ModalDialog', ModalDialog);\n\n/**\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n * {@link VideoTrackList}\n *\n * @extends EventTarget\n */\n\nvar TrackList = /*#__PURE__*/function (_EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TrackList, _EventTarget);\n\n  /**\n   * Create an instance of this class\n   *\n   * @param {Track[]} tracks\n   *        A list of tracks to initialize the list with.\n   *\n   * @abstract\n   */\n  function TrackList(tracks) {\n    var _this;\n\n    if (tracks === void 0) {\n      tracks = [];\n    }\n\n    _this = _EventTarget.call(this) || this;\n    _this.tracks_ = [];\n    /**\n     * @memberof TrackList\n     * @member {number} length\n     *         The current number of `Track`s in the this Trackist.\n     * @instance\n     */\n\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'length', {\n      get: function get() {\n        return this.tracks_.length;\n      }\n    });\n\n    for (var i = 0; i < tracks.length; i++) {\n      _this.addTrack(tracks[i]);\n    }\n\n    return _this;\n  }\n  /**\n   * Add a {@link Track} to the `TrackList`\n   *\n   * @param {Track} track\n   *        The audio, video, or text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n\n\n  var _proto = TrackList.prototype;\n\n  _proto.addTrack = function addTrack(track) {\n    var _this2 = this;\n\n    var index = this.tracks_.length;\n\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get: function get() {\n          return this.tracks_[index];\n        }\n      });\n    } // Do not add duplicate tracks\n\n\n    if (this.tracks_.indexOf(track) === -1) {\n      this.tracks_.push(track);\n      /**\n       * Triggered when a track is added to a track list.\n       *\n       * @event TrackList#addtrack\n       * @type {EventTarget~Event}\n       * @property {Track} track\n       *           A reference to track that was added.\n       */\n\n      this.trigger({\n        track: track,\n        type: 'addtrack',\n        target: this\n      });\n    }\n    /**\n     * Triggered when a track label is changed.\n     *\n     * @event TrackList#addtrack\n     * @type {EventTarget~Event}\n     * @property {Track} track\n     *           A reference to track that was added.\n     */\n\n\n    track.labelchange_ = function () {\n      _this2.trigger({\n        track: track,\n        type: 'labelchange',\n        target: _this2\n      });\n    };\n\n    if (isEvented(track)) {\n      track.addEventListener('labelchange', track.labelchange_);\n    }\n  }\n  /**\n   * Remove a {@link Track} from the `TrackList`\n   *\n   * @param {Track} rtrack\n   *        The audio, video, or text track to remove from the list.\n   *\n   * @fires TrackList#removetrack\n   */\n  ;\n\n  _proto.removeTrack = function removeTrack(rtrack) {\n    var track;\n\n    for (var i = 0, l = this.length; i < l; i++) {\n      if (this[i] === rtrack) {\n        track = this[i];\n\n        if (track.off) {\n          track.off();\n        }\n\n        this.tracks_.splice(i, 1);\n        break;\n      }\n    }\n\n    if (!track) {\n      return;\n    }\n    /**\n     * Triggered when a track is removed from track list.\n     *\n     * @event TrackList#removetrack\n     * @type {EventTarget~Event}\n     * @property {Track} track\n     *           A reference to track that was removed.\n     */\n\n\n    this.trigger({\n      track: track,\n      type: 'removetrack',\n      target: this\n    });\n  }\n  /**\n   * Get a Track from the TrackList by a tracks id\n   *\n   * @param {string} id - the id of the track to get\n   * @method getTrackById\n   * @return {Track}\n   * @private\n   */\n  ;\n\n  _proto.getTrackById = function getTrackById(id) {\n    var result = null;\n\n    for (var i = 0, l = this.length; i < l; i++) {\n      var track = this[i];\n\n      if (track.id === id) {\n        result = track;\n        break;\n      }\n    }\n\n    return result;\n  };\n\n  return TrackList;\n}(EventTarget$2);\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {EventTarget~Event}\n */\n\n/**\n * Events that can be called with on + eventName. See {@link EventHandler}.\n *\n * @property {Object} TrackList#allowedEvents_\n * @private\n */\n\n\nTrackList.prototype.allowedEvents_ = {\n  change: 'change',\n  addtrack: 'addtrack',\n  removetrack: 'removetrack',\n  labelchange: 'labelchange'\n}; // emulate attribute EventHandler support to allow for feature detection\n\nfor (var event in TrackList.prototype.allowedEvents_) {\n  TrackList.prototype['on' + event] = null;\n}\n\n/**\n * Anywhere we call this function we diverge from the spec\n * as we only support one enabled audiotrack at a time\n *\n * @param {AudioTrackList} list\n *        list to work on\n *\n * @param {AudioTrack} track\n *        The track to skip\n *\n * @private\n */\n\nvar disableOthers$1 = function disableOthers(list, track) {\n  for (var i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    } // another audio track is enabled, disable it\n\n\n    list[i].enabled = false;\n  }\n};\n/**\n * The current list of {@link AudioTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\n * @extends TrackList\n */\n\n\nvar AudioTrackList = /*#__PURE__*/function (_TrackList) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(AudioTrackList, _TrackList);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {AudioTrack[]} [tracks=[]]\n   *        A list of `AudioTrack` to instantiate the list with.\n   */\n  function AudioTrackList(tracks) {\n    var _this;\n\n    if (tracks === void 0) {\n      tracks = [];\n    }\n\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (var i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].enabled) {\n        disableOthers$1(tracks, tracks[i]);\n        break;\n      }\n    }\n\n    _this = _TrackList.call(this, tracks) || this;\n    _this.changing_ = false;\n    return _this;\n  }\n  /**\n   * Add an {@link AudioTrack} to the `AudioTrackList`.\n   *\n   * @param {AudioTrack} track\n   *        The AudioTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n\n\n  var _proto = AudioTrackList.prototype;\n\n  _proto.addTrack = function addTrack(track) {\n    var _this2 = this;\n\n    if (track.enabled) {\n      disableOthers$1(this, track);\n    }\n\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\n\n\n    if (!track.addEventListener) {\n      return;\n    }\n\n    track.enabledChange_ = function () {\n      // when we are disabling other tracks (since we don't support\n      // more than one track at a time) we will set changing_\n      // to true so that we don't trigger additional change events\n      if (_this2.changing_) {\n        return;\n      }\n\n      _this2.changing_ = true;\n      disableOthers$1(_this2, track);\n      _this2.changing_ = false;\n\n      _this2.trigger('change');\n    };\n    /**\n     * @listens AudioTrack#enabledchange\n     * @fires TrackList#change\n     */\n\n\n    track.addEventListener('enabledchange', track.enabledChange_);\n  };\n\n  _proto.removeTrack = function removeTrack(rtrack) {\n    _TrackList.prototype.removeTrack.call(this, rtrack);\n\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n      rtrack.enabledChange_ = null;\n    }\n  };\n\n  return AudioTrackList;\n}(TrackList);\n\n/**\n * Un-select all other {@link VideoTrack}s that are selected.\n *\n * @param {VideoTrackList} list\n *        list to work on\n *\n * @param {VideoTrack} track\n *        The track to skip\n *\n * @private\n */\n\nvar disableOthers = function disableOthers(list, track) {\n  for (var i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    } // another video track is enabled, disable it\n\n\n    list[i].selected = false;\n  }\n};\n/**\n * The current list of {@link VideoTrack} for a video.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\n * @extends TrackList\n */\n\n\nvar VideoTrackList = /*#__PURE__*/function (_TrackList) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VideoTrackList, _TrackList);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {VideoTrack[]} [tracks=[]]\n   *        A list of `VideoTrack` to instantiate the list with.\n   */\n  function VideoTrackList(tracks) {\n    var _this;\n\n    if (tracks === void 0) {\n      tracks = [];\n    }\n\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (var i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].selected) {\n        disableOthers(tracks, tracks[i]);\n        break;\n      }\n    }\n\n    _this = _TrackList.call(this, tracks) || this;\n    _this.changing_ = false;\n    /**\n     * @member {number} VideoTrackList#selectedIndex\n     *         The current index of the selected {@link VideoTrack`}.\n     */\n\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'selectedIndex', {\n      get: function get() {\n        for (var _i = 0; _i < this.length; _i++) {\n          if (this[_i].selected) {\n            return _i;\n          }\n        }\n\n        return -1;\n      },\n      set: function set() {}\n    });\n    return _this;\n  }\n  /**\n   * Add a {@link VideoTrack} to the `VideoTrackList`.\n   *\n   * @param {VideoTrack} track\n   *        The VideoTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n\n\n  var _proto = VideoTrackList.prototype;\n\n  _proto.addTrack = function addTrack(track) {\n    var _this2 = this;\n\n    if (track.selected) {\n      disableOthers(this, track);\n    }\n\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\n\n\n    if (!track.addEventListener) {\n      return;\n    }\n\n    track.selectedChange_ = function () {\n      if (_this2.changing_) {\n        return;\n      }\n\n      _this2.changing_ = true;\n      disableOthers(_this2, track);\n      _this2.changing_ = false;\n\n      _this2.trigger('change');\n    };\n    /**\n     * @listens VideoTrack#selectedchange\n     * @fires TrackList#change\n     */\n\n\n    track.addEventListener('selectedchange', track.selectedChange_);\n  };\n\n  _proto.removeTrack = function removeTrack(rtrack) {\n    _TrackList.prototype.removeTrack.call(this, rtrack);\n\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n      rtrack.selectedChange_ = null;\n    }\n  };\n\n  return VideoTrackList;\n}(TrackList);\n\n/**\n * The current list of {@link TextTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\n * @extends TrackList\n */\n\nvar TextTrackList = /*#__PURE__*/function (_TrackList) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrackList, _TrackList);\n\n  function TextTrackList() {\n    return _TrackList.apply(this, arguments) || this;\n  }\n\n  var _proto = TextTrackList.prototype;\n\n  /**\n   * Add a {@link TextTrack} to the `TextTrackList`\n   *\n   * @param {TextTrack} track\n   *        The text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n  _proto.addTrack = function addTrack(track) {\n    var _this = this;\n\n    _TrackList.prototype.addTrack.call(this, track);\n\n    if (!this.queueChange_) {\n      this.queueChange_ = function () {\n        return _this.queueTrigger('change');\n      };\n    }\n\n    if (!this.triggerSelectedlanguagechange) {\n      this.triggerSelectedlanguagechange_ = function () {\n        return _this.trigger('selectedlanguagechange');\n      };\n    }\n    /**\n     * @listens TextTrack#modechange\n     * @fires TrackList#change\n     */\n\n\n    track.addEventListener('modechange', this.queueChange_);\n    var nonLanguageTextTrackKind = ['metadata', 'chapters'];\n\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n    }\n  };\n\n  _proto.removeTrack = function removeTrack(rtrack) {\n    _TrackList.prototype.removeTrack.call(this, rtrack); // manually remove the event handlers we added\n\n\n    if (rtrack.removeEventListener) {\n      if (this.queueChange_) {\n        rtrack.removeEventListener('modechange', this.queueChange_);\n      }\n\n      if (this.selectedlanguagechange_) {\n        rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\n      }\n    }\n  };\n\n  return TextTrackList;\n}(TrackList);\n\n/**\n * @file html-track-element-list.js\n */\n\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\nvar HtmlTrackElementList = /*#__PURE__*/function () {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {HtmlTrackElement[]} [tracks=[]]\n   *        A list of `HtmlTrackElement` to instantiate the list with.\n   */\n  function HtmlTrackElementList(trackElements) {\n    if (trackElements === void 0) {\n      trackElements = [];\n    }\n\n    this.trackElements_ = [];\n    /**\n     * @memberof HtmlTrackElementList\n     * @member {number} length\n     *         The current number of `Track`s in the this Trackist.\n     * @instance\n     */\n\n    Object.defineProperty(this, 'length', {\n      get: function get() {\n        return this.trackElements_.length;\n      }\n    });\n\n    for (var i = 0, length = trackElements.length; i < length; i++) {\n      this.addTrackElement_(trackElements[i]);\n    }\n  }\n  /**\n   * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\n   *\n   * @param {HtmlTrackElement} trackElement\n   *        The track element to add to the list.\n   *\n   * @private\n   */\n\n\n  var _proto = HtmlTrackElementList.prototype;\n\n  _proto.addTrackElement_ = function addTrackElement_(trackElement) {\n    var index = this.trackElements_.length;\n\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get: function get() {\n          return this.trackElements_[index];\n        }\n      });\n    } // Do not add duplicate elements\n\n\n    if (this.trackElements_.indexOf(trackElement) === -1) {\n      this.trackElements_.push(trackElement);\n    }\n  }\n  /**\n   * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\n   * {@link TextTrack}.\n   *\n   * @param {TextTrack} track\n   *        The track associated with a track element.\n   *\n   * @return {HtmlTrackElement|undefined}\n   *         The track element that was found or undefined.\n   *\n   * @private\n   */\n  ;\n\n  _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) {\n    var trackElement_;\n\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (track === this.trackElements_[i].track) {\n        trackElement_ = this.trackElements_[i];\n        break;\n      }\n    }\n\n    return trackElement_;\n  }\n  /**\n   * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\n   *\n   * @param {HtmlTrackElement} trackElement\n   *        The track element to remove from the list.\n   *\n   * @private\n   */\n  ;\n\n  _proto.removeTrackElement_ = function removeTrackElement_(trackElement) {\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (trackElement === this.trackElements_[i]) {\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n          this.trackElements_[i].track.off();\n        }\n\n        if (typeof this.trackElements_[i].off === 'function') {\n          this.trackElements_[i].off();\n        }\n\n        this.trackElements_.splice(i, 1);\n        break;\n      }\n    }\n  };\n\n  return HtmlTrackElementList;\n}();\n\n/**\n * @file text-track-cue-list.js\n */\n\n/**\n * @typedef {Object} TextTrackCueList~TextTrackCue\n *\n * @property {string} id\n *           The unique id for this text track cue\n *\n * @property {number} startTime\n *           The start time for this text track cue\n *\n * @property {number} endTime\n *           The end time for this text track cue\n *\n * @property {boolean} pauseOnExit\n *           Pause when the end time is reached if true.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\n */\n\n/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\nvar TextTrackCueList = /*#__PURE__*/function () {\n  /**\n   * Create an instance of this class..\n   *\n   * @param {Array} cues\n   *        A list of cues to be initialized with\n   */\n  function TextTrackCueList(cues) {\n    TextTrackCueList.prototype.setCues_.call(this, cues);\n    /**\n     * @memberof TextTrackCueList\n     * @member {number} length\n     *         The current number of `TextTrackCue`s in the TextTrackCueList.\n     * @instance\n     */\n\n    Object.defineProperty(this, 'length', {\n      get: function get() {\n        return this.length_;\n      }\n    });\n  }\n  /**\n   * A setter for cues in this list. Creates getters\n   * an an index for the cues.\n   *\n   * @param {Array} cues\n   *        An array of cues to set\n   *\n   * @private\n   */\n\n\n  var _proto = TextTrackCueList.prototype;\n\n  _proto.setCues_ = function setCues_(cues) {\n    var oldLength = this.length || 0;\n    var i = 0;\n    var l = cues.length;\n    this.cues_ = cues;\n    this.length_ = cues.length;\n\n    var defineProp = function defineProp(index) {\n      if (!('' + index in this)) {\n        Object.defineProperty(this, '' + index, {\n          get: function get() {\n            return this.cues_[index];\n          }\n        });\n      }\n    };\n\n    if (oldLength < l) {\n      i = oldLength;\n\n      for (; i < l; i++) {\n        defineProp.call(this, i);\n      }\n    }\n  }\n  /**\n   * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\n   *\n   * @param {string} id\n   *        The id of the cue that should be searched for.\n   *\n   * @return {TextTrackCueList~TextTrackCue|null}\n   *         A single cue or null if none was found.\n   */\n  ;\n\n  _proto.getCueById = function getCueById(id) {\n    var result = null;\n\n    for (var i = 0, l = this.length; i < l; i++) {\n      var cue = this[i];\n\n      if (cue.id === id) {\n        result = cue;\n        break;\n      }\n    }\n\n    return result;\n  };\n\n  return TextTrackCueList;\n}();\n\n/**\n * @file track-kinds.js\n */\n\n/**\n * All possible `VideoTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\n * @typedef VideoTrack~Kind\n * @enum\n */\nvar VideoTrackKind = {\n  alternative: 'alternative',\n  captions: 'captions',\n  main: 'main',\n  sign: 'sign',\n  subtitles: 'subtitles',\n  commentary: 'commentary'\n};\n/**\n * All possible `AudioTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\n * @typedef AudioTrack~Kind\n * @enum\n */\n\nvar AudioTrackKind = {\n  'alternative': 'alternative',\n  'descriptions': 'descriptions',\n  'main': 'main',\n  'main-desc': 'main-desc',\n  'translation': 'translation',\n  'commentary': 'commentary'\n};\n/**\n * All possible `TextTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\n * @typedef TextTrack~Kind\n * @enum\n */\n\nvar TextTrackKind = {\n  subtitles: 'subtitles',\n  captions: 'captions',\n  descriptions: 'descriptions',\n  chapters: 'chapters',\n  metadata: 'metadata'\n};\n/**\n * All possible `TextTrackMode`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n * @typedef TextTrack~Mode\n * @enum\n */\n\nvar TextTrackMode = {\n  disabled: 'disabled',\n  hidden: 'hidden',\n  showing: 'showing'\n};\n\n/**\n * A Track class that contains all of the common functionality for {@link AudioTrack},\n * {@link VideoTrack}, and {@link TextTrack}.\n *\n * > Note: This class should not be used directly\n *\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\n * @extends EventTarget\n * @abstract\n */\n\nvar Track = /*#__PURE__*/function (_EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Track, _EventTarget);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {string} [options.kind='']\n   *        A valid kind for the track type you are creating.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @abstract\n   */\n  function Track(options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _EventTarget.call(this) || this;\n    var trackProps = {\n      id: options.id || 'vjs_track_' + newGUID(),\n      kind: options.kind || '',\n      language: options.language || ''\n    };\n    var label = options.label || '';\n    /**\n     * @memberof Track\n     * @member {string} id\n     *         The id of this track. Cannot be changed after creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    /**\n     * @memberof Track\n     * @member {string} kind\n     *         The kind of track that this is. Cannot be changed after creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    /**\n     * @memberof Track\n     * @member {string} language\n     *         The two letter language code for this track. Cannot be changed after\n     *         creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    var _loop = function _loop(key) {\n      Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), key, {\n        get: function get() {\n          return trackProps[key];\n        },\n        set: function set() {}\n      });\n    };\n\n    for (var key in trackProps) {\n      _loop(key);\n    }\n    /**\n     * @memberof Track\n     * @member {string} label\n     *         The label of this track. Cannot be changed after creation.\n     * @instance\n     *\n     * @fires Track#labelchange\n     */\n\n\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'label', {\n      get: function get() {\n        return label;\n      },\n      set: function set(newLabel) {\n        if (newLabel !== label) {\n          label = newLabel;\n          /**\n           * An event that fires when label changes on this track.\n           *\n           * > Note: This is not part of the spec!\n           *\n           * @event Track#labelchange\n           * @type {EventTarget~Event}\n           */\n\n          this.trigger('labelchange');\n        }\n      }\n    });\n    return _this;\n  }\n\n  return Track;\n}(EventTarget$2);\n\n/**\n * @file url.js\n * @module url\n */\n/**\n * @typedef {Object} url:URLObject\n *\n * @property {string} protocol\n *           The protocol of the url that was parsed.\n *\n * @property {string} hostname\n *           The hostname of the url that was parsed.\n *\n * @property {string} port\n *           The port of the url that was parsed.\n *\n * @property {string} pathname\n *           The pathname of the url that was parsed.\n *\n * @property {string} search\n *           The search query of the url that was parsed.\n *\n * @property {string} hash\n *           The hash of the url that was parsed.\n *\n * @property {string} host\n *           The host of the url that was parsed.\n */\n\n/**\n * Resolve and parse the elements of a URL.\n *\n * @function\n * @param    {String} url\n *           The url to parse\n *\n * @return   {url:URLObject}\n *           An object of url details\n */\n\nvar parseUrl = function parseUrl(url) {\n  // This entire method can be replace with URL once we are able to drop IE11\n  var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; // add the url to an anchor and let the browser parse the URL\n\n  var a = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('a');\n  a.href = url; // Copy the specific URL properties to a new object\n  // This is also needed for IE because the anchor loses its\n  // properties when it's removed from the dom\n\n  var details = {};\n\n  for (var i = 0; i < props.length; i++) {\n    details[props[i]] = a[props[i]];\n  } // IE adds the port to the host property unlike everyone else. If\n  // a port identifier is added for standard ports, strip it.\n\n\n  if (details.protocol === 'http:') {\n    details.host = details.host.replace(/:80$/, '');\n  }\n\n  if (details.protocol === 'https:') {\n    details.host = details.host.replace(/:443$/, '');\n  }\n\n  if (!details.protocol) {\n    details.protocol = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.protocol;\n  }\n  /* istanbul ignore if */\n\n\n  if (!details.host) {\n    details.host = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.host;\n  }\n\n  return details;\n};\n/**\n * Get absolute version of relative URL. Used to tell Flash the correct URL.\n *\n * @function\n * @param    {string} url\n *           URL to make absolute\n *\n * @return   {string}\n *           Absolute URL\n *\n * @see      http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n */\n\nvar getAbsoluteURL = function getAbsoluteURL(url) {\n  // Check if absolute URL\n  if (!url.match(/^https?:\\/\\//)) {\n    // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n    // add the url to an anchor and let the browser parse the URL\n    var a = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('a');\n    a.href = url;\n    url = a.href;\n  }\n\n  return url;\n};\n/**\n * Returns the extension of the passed file name. It will return an empty string\n * if passed an invalid path.\n *\n * @function\n * @param    {string} path\n *           The fileName path like '/path/to/file.mp4'\n *\n * @return  {string}\n *           The extension in lower case or an empty string if no\n *           extension could be found.\n */\n\nvar getFileExtension = function getFileExtension(path) {\n  if (typeof path === 'string') {\n    var splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n    var pathParts = splitPathRe.exec(path);\n\n    if (pathParts) {\n      return pathParts.pop().toLowerCase();\n    }\n  }\n\n  return '';\n};\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @function\n * @param    {string} url\n *           The url to check.\n *\n * @param    {Object} [winLoc]\n *           the domain to check the url against, defaults to window.location\n *\n * @param    {string} [winLoc.protocol]\n *           The window location protocol defaults to window.location.protocol\n *\n * @param    {string} [winLoc.host]\n *           The window location host defaults to window.location.host\n *\n * @return   {boolean}\n *           Whether it is a cross domain request or not.\n */\n\nvar isCrossOrigin = function isCrossOrigin(url, winLoc) {\n  if (winLoc === void 0) {\n    winLoc = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location;\n  }\n\n  var urlInfo = parseUrl(url); // IE8 protocol relative urls will return ':' for protocol\n\n  var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; // Check if url is for another domain/origin\n  // IE8 doesn't know location.origin, so we won't rely on it here\n\n  var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\n  return crossOrigin;\n};\n\nvar Url = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  parseUrl: parseUrl,\n  getAbsoluteURL: getAbsoluteURL,\n  getFileExtension: getFileExtension,\n  isCrossOrigin: isCrossOrigin\n});\n\n/**\n * Takes a webvtt file contents and parses it into cues\n *\n * @param {string} srcContent\n *        webVTT file contents\n *\n * @param {TextTrack} track\n *        TextTrack to add cues to. Cues come from the srcContent.\n *\n * @private\n */\n\nvar parseCues = function parseCues(srcContent, track) {\n  var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder());\n  var errors = [];\n\n  parser.oncue = function (cue) {\n    track.addCue(cue);\n  };\n\n  parser.onparsingerror = function (error) {\n    errors.push(error);\n  };\n\n  parser.onflush = function () {\n    track.trigger({\n      type: 'loadeddata',\n      target: track\n    });\n  };\n\n  parser.parse(srcContent);\n\n  if (errors.length > 0) {\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed(\"Text Track parsing errors for \" + track.src);\n    }\n\n    errors.forEach(function (error) {\n      return log$1.error(error);\n    });\n\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd();\n    }\n  }\n\n  parser.flush();\n};\n/**\n * Load a `TextTrack` from a specified url.\n *\n * @param {string} src\n *        Url to load track from.\n *\n * @param {TextTrack} track\n *        Track to add cues to. Comes from the content at the end of `url`.\n *\n * @private\n */\n\n\nvar loadTrack = function loadTrack(src, track) {\n  var opts = {\n    uri: src\n  };\n  var crossOrigin = isCrossOrigin(src);\n\n  if (crossOrigin) {\n    opts.cors = crossOrigin;\n  }\n\n  var withCredentials = track.tech_.crossOrigin() === 'use-credentials';\n\n  if (withCredentials) {\n    opts.withCredentials = withCredentials;\n  }\n\n  _videojs_xhr__WEBPACK_IMPORTED_MODULE_7___default()(opts, bind(this, function (err, response, responseBody) {\n    if (err) {\n      return log$1.error(err, response);\n    }\n\n    track.loaded_ = true; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n    // NOTE: this is only used for the alt/video.novtt.js build\n\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function') {\n      if (track.tech_) {\n        // to prevent use before define eslint error, we define loadHandler\n        // as a let here\n        track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) {\n          if (event.type === 'vttjserror') {\n            log$1.error(\"vttjs failed to load, stopping trying to process \" + track.src);\n            return;\n          }\n\n          return parseCues(responseBody, track);\n        });\n      }\n    } else {\n      parseCues(responseBody, track);\n    }\n  }));\n};\n/**\n * A representation of a single `TextTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\n * @extends Track\n */\n\n\nvar TextTrack = /*#__PURE__*/function (_Track) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrack, _Track);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} options.tech\n   *        A reference to the tech that owns this TextTrack.\n   *\n   * @param {TextTrack~Kind} [options.kind='subtitles']\n   *        A valid text track kind.\n   *\n   * @param {TextTrack~Mode} [options.mode='disabled']\n   *        A valid text track mode.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this TextTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {string} [options.srclang='']\n   *        A valid two character language code. An alternative, but deprioritized\n   *        version of `options.language`\n   *\n   * @param {string} [options.src]\n   *        A url to TextTrack cues.\n   *\n   * @param {boolean} [options.default]\n   *        If this track should default to on or off.\n   */\n  function TextTrack(options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    if (!options.tech) {\n      throw new Error('A tech was not provided.');\n    }\n\n    var settings = mergeOptions$3(options, {\n      kind: TextTrackKind[options.kind] || 'subtitles',\n      language: options.language || options.srclang || ''\n    });\n    var mode = TextTrackMode[settings.mode] || 'disabled';\n    var default_ = settings[\"default\"];\n\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n      mode = 'hidden';\n    }\n\n    _this = _Track.call(this, settings) || this;\n    _this.tech_ = settings.tech;\n    _this.cues_ = [];\n    _this.activeCues_ = [];\n    _this.preload_ = _this.tech_.preloadTextTracks !== false;\n    var cues = new TextTrackCueList(_this.cues_);\n    var activeCues = new TextTrackCueList(_this.activeCues_);\n    var changed = false;\n    _this.timeupdateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), function (event) {\n      if (event === void 0) {\n        event = {};\n      }\n\n      if (this.tech_.isDisposed()) {\n        return;\n      }\n\n      if (!this.tech_.isReady_) {\n        if (event.type !== 'timeupdate') {\n          this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n        }\n\n        return;\n      } // Accessing this.activeCues for the side-effects of updating itself\n      // due to its nature as a getter function. Do not remove or cues will\n      // stop updating!\n      // Use the setter to prevent deletion from uglify (pure_getters rule)\n\n\n      this.activeCues = this.activeCues;\n\n      if (changed) {\n        this.trigger('cuechange');\n        changed = false;\n      }\n\n      if (event.type !== 'timeupdate') {\n        this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n      }\n    });\n\n    var disposeHandler = function disposeHandler() {\n      _this.stopTracking();\n    };\n\n    _this.tech_.one('dispose', disposeHandler);\n\n    if (mode !== 'disabled') {\n      _this.startTracking();\n    }\n\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), {\n      /**\n       * @memberof TextTrack\n       * @member {boolean} default\n       *         If this track was set to be on or off by default. Cannot be changed after\n       *         creation.\n       * @instance\n       *\n       * @readonly\n       */\n      \"default\": {\n        get: function get() {\n          return default_;\n        },\n        set: function set() {}\n      },\n\n      /**\n       * @memberof TextTrack\n       * @member {string} mode\n       *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\n       *         not be set if setting to an invalid mode.\n       * @instance\n       *\n       * @fires TextTrack#modechange\n       */\n      mode: {\n        get: function get() {\n          return mode;\n        },\n        set: function set(newMode) {\n          if (!TextTrackMode[newMode]) {\n            return;\n          }\n\n          if (mode === newMode) {\n            return;\n          }\n\n          mode = newMode;\n\n          if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\n            // On-demand load.\n            loadTrack(this.src, this);\n          }\n\n          this.stopTracking();\n\n          if (mode !== 'disabled') {\n            this.startTracking();\n          }\n          /**\n           * An event that fires when mode changes on this track. This allows\n           * the TextTrackList that holds this track to act accordingly.\n           *\n           * > Note: This is not part of the spec!\n           *\n           * @event TextTrack#modechange\n           * @type {EventTarget~Event}\n           */\n\n\n          this.trigger('modechange');\n        }\n      },\n\n      /**\n       * @memberof TextTrack\n       * @member {TextTrackCueList} cues\n       *         The text track cue list for this TextTrack.\n       * @instance\n       */\n      cues: {\n        get: function get() {\n          if (!this.loaded_) {\n            return null;\n          }\n\n          return cues;\n        },\n        set: function set() {}\n      },\n\n      /**\n       * @memberof TextTrack\n       * @member {TextTrackCueList} activeCues\n       *         The list text track cues that are currently active for this TextTrack.\n       * @instance\n       */\n      activeCues: {\n        get: function get() {\n          if (!this.loaded_) {\n            return null;\n          } // nothing to do\n\n\n          if (this.cues.length === 0) {\n            return activeCues;\n          }\n\n          var ct = this.tech_.currentTime();\n          var active = [];\n\n          for (var i = 0, l = this.cues.length; i < l; i++) {\n            var cue = this.cues[i];\n\n            if (cue.startTime <= ct && cue.endTime >= ct) {\n              active.push(cue);\n            } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {\n              active.push(cue);\n            }\n          }\n\n          changed = false;\n\n          if (active.length !== this.activeCues_.length) {\n            changed = true;\n          } else {\n            for (var _i = 0; _i < active.length; _i++) {\n              if (this.activeCues_.indexOf(active[_i]) === -1) {\n                changed = true;\n              }\n            }\n          }\n\n          this.activeCues_ = active;\n          activeCues.setCues_(this.activeCues_);\n          return activeCues;\n        },\n        // /!\\ Keep this setter empty (see the timeupdate handler above)\n        set: function set() {}\n      }\n    });\n\n    if (settings.src) {\n      _this.src = settings.src;\n\n      if (!_this.preload_) {\n        // Tracks will load on-demand.\n        // Act like we're loaded for other purposes.\n        _this.loaded_ = true;\n      }\n\n      if (_this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n        loadTrack(_this.src, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n      }\n    } else {\n      _this.loaded_ = true;\n    }\n\n    return _this;\n  }\n\n  var _proto = TextTrack.prototype;\n\n  _proto.startTracking = function startTracking() {\n    // More precise cues based on requestVideoFrameCallback with a requestAnimationFram fallback\n    this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler); // Also listen to timeupdate in case rVFC/rAF stops (window in background, audio in video el)\n\n    this.tech_.on('timeupdate', this.timeupdateHandler);\n  };\n\n  _proto.stopTracking = function stopTracking() {\n    if (this.rvf_) {\n      this.tech_.cancelVideoFrameCallback(this.rvf_);\n      this.rvf_ = undefined;\n    }\n\n    this.tech_.off('timeupdate', this.timeupdateHandler);\n  }\n  /**\n   * Add a cue to the internal list of cues.\n   *\n   * @param {TextTrack~Cue} cue\n   *        The cue to add to our internal list\n   */\n  ;\n\n  _proto.addCue = function addCue(originalCue) {\n    var cue = originalCue; // Testing if the cue is a VTTCue in a way that survives minification\n\n    if (!('getCueAsHTML' in cue)) {\n      cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n\n      for (var prop in originalCue) {\n        if (!(prop in cue)) {\n          cue[prop] = originalCue[prop];\n        }\n      } // make sure that `id` is copied over\n\n\n      cue.id = originalCue.id;\n      cue.originalCue_ = originalCue;\n    }\n\n    var tracks = this.tech_.textTracks();\n\n    for (var i = 0; i < tracks.length; i++) {\n      if (tracks[i] !== this) {\n        tracks[i].removeCue(cue);\n      }\n    }\n\n    this.cues_.push(cue);\n    this.cues.setCues_(this.cues_);\n  }\n  /**\n   * Remove a cue from our internal list\n   *\n   * @param {TextTrack~Cue} removeCue\n   *        The cue to remove from our internal list\n   */\n  ;\n\n  _proto.removeCue = function removeCue(_removeCue) {\n    var i = this.cues_.length;\n\n    while (i--) {\n      var cue = this.cues_[i];\n\n      if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) {\n        this.cues_.splice(i, 1);\n        this.cues.setCues_(this.cues_);\n        break;\n      }\n    }\n  };\n\n  return TextTrack;\n}(Track);\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\n\n\nTextTrack.prototype.allowedEvents_ = {\n  cuechange: 'cuechange'\n};\n\n/**\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\n * only one `AudioTrack` in the list will be enabled at a time.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\n * @extends Track\n */\n\nvar AudioTrack = /*#__PURE__*/function (_Track) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(AudioTrack, _Track);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {AudioTrack~Kind} [options.kind='']\n   *        A valid audio track kind\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {boolean} [options.enabled]\n   *        If this track is the one that is currently playing. If this track is part of\n   *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\n   */\n  function AudioTrack(options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    var settings = mergeOptions$3(options, {\n      kind: AudioTrackKind[options.kind] || ''\n    });\n    _this = _Track.call(this, settings) || this;\n    var enabled = false;\n    /**\n     * @memberof AudioTrack\n     * @member {boolean} enabled\n     *         If this `AudioTrack` is enabled or not. When setting this will\n     *         fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\n     * @instance\n     *\n     * @fires VideoTrack#selectedchange\n     */\n\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'enabled', {\n      get: function get() {\n        return enabled;\n      },\n      set: function set(newEnabled) {\n        // an invalid or unchanged value\n        if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\n          return;\n        }\n\n        enabled = newEnabled;\n        /**\n         * An event that fires when enabled changes on this track. This allows\n         * the AudioTrackList that holds this track to act accordingly.\n         *\n         * > Note: This is not part of the spec! Native tracks will do\n         *         this internally without an event.\n         *\n         * @event AudioTrack#enabledchange\n         * @type {EventTarget~Event}\n         */\n\n        this.trigger('enabledchange');\n      }\n    }); // if the user sets this track to selected then\n    // set selected to that true value otherwise\n    // we keep it false\n\n    if (settings.enabled) {\n      _this.enabled = settings.enabled;\n    }\n\n    _this.loaded_ = true;\n    return _this;\n  }\n\n  return AudioTrack;\n}(Track);\n\n/**\n * A representation of a single `VideoTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\n * @extends Track\n */\n\nvar VideoTrack = /*#__PURE__*/function (_Track) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VideoTrack, _Track);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {string} [options.kind='']\n   *        A valid {@link VideoTrack~Kind}\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {boolean} [options.selected]\n   *        If this track is the one that is currently playing.\n   */\n  function VideoTrack(options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    var settings = mergeOptions$3(options, {\n      kind: VideoTrackKind[options.kind] || ''\n    });\n    _this = _Track.call(this, settings) || this;\n    var selected = false;\n    /**\n     * @memberof VideoTrack\n     * @member {boolean} selected\n     *         If this `VideoTrack` is selected or not. When setting this will\n     *         fire {@link VideoTrack#selectedchange} if the state of selected changed.\n     * @instance\n     *\n     * @fires VideoTrack#selectedchange\n     */\n\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'selected', {\n      get: function get() {\n        return selected;\n      },\n      set: function set(newSelected) {\n        // an invalid or unchanged value\n        if (typeof newSelected !== 'boolean' || newSelected === selected) {\n          return;\n        }\n\n        selected = newSelected;\n        /**\n         * An event that fires when selected changes on this track. This allows\n         * the VideoTrackList that holds this track to act accordingly.\n         *\n         * > Note: This is not part of the spec! Native tracks will do\n         *         this internally without an event.\n         *\n         * @event VideoTrack#selectedchange\n         * @type {EventTarget~Event}\n         */\n\n        this.trigger('selectedchange');\n      }\n    }); // if the user sets this track to selected then\n    // set selected to that true value otherwise\n    // we keep it false\n\n    if (settings.selected) {\n      _this.selected = settings.selected;\n    }\n\n    return _this;\n  }\n\n  return VideoTrack;\n}(Track);\n\n/**\n * @memberof HTMLTrackElement\n * @typedef {HTMLTrackElement~ReadyState}\n * @enum {number}\n */\n\nvar NONE = 0;\nvar LOADING = 1;\nvar LOADED = 2;\nvar ERROR = 3;\n/**\n * A single track represented in the DOM.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\n * @extends EventTarget\n */\n\nvar HTMLTrackElement = /*#__PURE__*/function (_EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(HTMLTrackElement, _EventTarget);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} options.tech\n   *        A reference to the tech that owns this HTMLTrackElement.\n   *\n   * @param {TextTrack~Kind} [options.kind='subtitles']\n   *        A valid text track kind.\n   *\n   * @param {TextTrack~Mode} [options.mode='disabled']\n   *        A valid text track mode.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this TextTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {string} [options.srclang='']\n   *        A valid two character language code. An alternative, but deprioritized\n   *        version of `options.language`\n   *\n   * @param {string} [options.src]\n   *        A url to TextTrack cues.\n   *\n   * @param {boolean} [options.default]\n   *        If this track should default to on or off.\n   */\n  function HTMLTrackElement(options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _EventTarget.call(this) || this;\n    var readyState;\n    var track = new TextTrack(options);\n    _this.kind = track.kind;\n    _this.src = track.src;\n    _this.srclang = track.language;\n    _this.label = track.label;\n    _this[\"default\"] = track[\"default\"];\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), {\n      /**\n       * @memberof HTMLTrackElement\n       * @member {HTMLTrackElement~ReadyState} readyState\n       *         The current ready state of the track element.\n       * @instance\n       */\n      readyState: {\n        get: function get() {\n          return readyState;\n        }\n      },\n\n      /**\n       * @memberof HTMLTrackElement\n       * @member {TextTrack} track\n       *         The underlying TextTrack object.\n       * @instance\n       *\n       */\n      track: {\n        get: function get() {\n          return track;\n        }\n      }\n    });\n    readyState = NONE;\n    /**\n     * @listens TextTrack#loadeddata\n     * @fires HTMLTrackElement#load\n     */\n\n    track.addEventListener('loadeddata', function () {\n      readyState = LOADED;\n\n      _this.trigger({\n        type: 'load',\n        target: _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this)\n      });\n    });\n    return _this;\n  }\n\n  return HTMLTrackElement;\n}(EventTarget$2);\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n  load: 'load'\n};\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\n/*\n * This file contains all track properties that are used in\n * player.js, tech.js, html5.js and possibly other techs in the future.\n */\n\nvar NORMAL = {\n  audio: {\n    ListClass: AudioTrackList,\n    TrackClass: AudioTrack,\n    capitalName: 'Audio'\n  },\n  video: {\n    ListClass: VideoTrackList,\n    TrackClass: VideoTrack,\n    capitalName: 'Video'\n  },\n  text: {\n    ListClass: TextTrackList,\n    TrackClass: TextTrack,\n    capitalName: 'Text'\n  }\n};\nObject.keys(NORMAL).forEach(function (type) {\n  NORMAL[type].getterName = type + \"Tracks\";\n  NORMAL[type].privateName = type + \"Tracks_\";\n});\nvar REMOTE = {\n  remoteText: {\n    ListClass: TextTrackList,\n    TrackClass: TextTrack,\n    capitalName: 'RemoteText',\n    getterName: 'remoteTextTracks',\n    privateName: 'remoteTextTracks_'\n  },\n  remoteTextEl: {\n    ListClass: HtmlTrackElementList,\n    TrackClass: HTMLTrackElement,\n    capitalName: 'RemoteTextTrackEls',\n    getterName: 'remoteTextTrackEls',\n    privateName: 'remoteTextTrackEls_'\n  }\n};\n\nvar ALL = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, NORMAL, REMOTE);\n\nREMOTE.names = Object.keys(REMOTE);\nNORMAL.names = Object.keys(NORMAL);\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\n\n/**\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\n * that just contains the src url alone.\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\n   * `var SourceString = 'http://example.com/some-video.mp4';`\n *\n * @typedef {Object|string} Tech~SourceObject\n *\n * @property {string} src\n *           The url to the source\n *\n * @property {string} type\n *           The mime type of the source\n */\n\n/**\n * A function used by {@link Tech} to create a new {@link TextTrack}.\n *\n * @private\n *\n * @param {Tech} self\n *        An instance of the Tech class.\n *\n * @param {string} kind\n *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n *        Label to identify the text track\n *\n * @param {string} [language]\n *        Two letter language abbreviation\n *\n * @param {Object} [options={}]\n *        An object with additional text track options\n *\n * @return {TextTrack}\n *          The text track that was created.\n */\n\nfunction createTrackHelper(self, kind, label, language, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var tracks = self.textTracks();\n  options.kind = kind;\n\n  if (label) {\n    options.label = label;\n  }\n\n  if (language) {\n    options.language = language;\n  }\n\n  options.tech = self;\n  var track = new ALL.text.TrackClass(options);\n  tracks.addTrack(track);\n  return track;\n}\n/**\n * This is the base class for media playback technology controllers, such as\n * {@link HTML5}\n *\n * @extends Component\n */\n\n\nvar Tech = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Tech, _Component);\n\n  /**\n  * Create an instance of this Tech.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  *\n  * @param {Component~ReadyCallback} ready\n  *        Callback function to call when the `HTML5` Tech is ready.\n  */\n  function Tech(options, ready) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    if (ready === void 0) {\n      ready = function ready() {};\n    }\n\n    // we don't want the tech to report user activity automatically.\n    // This is done manually in addControlsListeners\n    options.reportTouchActivity = false;\n    _this = _Component.call(this, null, options, ready) || this;\n\n    _this.onDurationChange_ = function (e) {\n      return _this.onDurationChange(e);\n    };\n\n    _this.trackProgress_ = function (e) {\n      return _this.trackProgress(e);\n    };\n\n    _this.trackCurrentTime_ = function (e) {\n      return _this.trackCurrentTime(e);\n    };\n\n    _this.stopTrackingCurrentTime_ = function (e) {\n      return _this.stopTrackingCurrentTime(e);\n    };\n\n    _this.disposeSourceHandler_ = function (e) {\n      return _this.disposeSourceHandler(e);\n    };\n\n    _this.queuedHanders_ = new Set(); // keep track of whether the current source has played at all to\n    // implement a very limited played()\n\n    _this.hasStarted_ = false;\n\n    _this.on('playing', function () {\n      this.hasStarted_ = true;\n    });\n\n    _this.on('loadstart', function () {\n      this.hasStarted_ = false;\n    });\n\n    ALL.names.forEach(function (name) {\n      var props = ALL[name];\n\n      if (options && options[props.getterName]) {\n        _this[props.privateName] = options[props.getterName];\n      }\n    }); // Manually track progress in cases where the browser/tech doesn't report it.\n\n    if (!_this.featuresProgressEvents) {\n      _this.manualProgressOn();\n    } // Manually track timeupdates in cases where the browser/tech doesn't report it.\n\n\n    if (!_this.featuresTimeupdateEvents) {\n      _this.manualTimeUpdatesOn();\n    }\n\n    ['Text', 'Audio', 'Video'].forEach(function (track) {\n      if (options[\"native\" + track + \"Tracks\"] === false) {\n        _this[\"featuresNative\" + track + \"Tracks\"] = false;\n      }\n    });\n\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n      _this.featuresNativeTextTracks = false;\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n      _this.featuresNativeTextTracks = true;\n    }\n\n    if (!_this.featuresNativeTextTracks) {\n      _this.emulateTextTracks();\n    }\n\n    _this.preloadTextTracks = options.preloadTextTracks !== false;\n    _this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n\n    _this.initTrackListeners(); // Turn on component tap events only if not using native controls\n\n\n    if (!options.nativeControlsForTouch) {\n      _this.emitTapEvents();\n    }\n\n    if (_this.constructor) {\n      _this.name_ = _this.constructor.name || 'Unknown Tech';\n    }\n\n    return _this;\n  }\n  /**\n   * A special function to trigger source set in a way that will allow player\n   * to re-trigger if the player or tech are not ready yet.\n   *\n   * @fires Tech#sourceset\n   * @param {string} src The source string at the time of the source changing.\n   */\n\n\n  var _proto = Tech.prototype;\n\n  _proto.triggerSourceset = function triggerSourceset(src) {\n    var _this2 = this;\n\n    if (!this.isReady_) {\n      // on initial ready we have to trigger source set\n      // 1ms after ready so that player can watch for it.\n      this.one('ready', function () {\n        return _this2.setTimeout(function () {\n          return _this2.triggerSourceset(src);\n        }, 1);\n      });\n    }\n    /**\n     * Fired when the source is set on the tech causing the media element\n     * to reload.\n     *\n     * @see {@link Player#event:sourceset}\n     * @event Tech#sourceset\n     * @type {EventTarget~Event}\n     */\n\n\n    this.trigger({\n      src: src,\n      type: 'sourceset'\n    });\n  }\n  /* Fallbacks for unsupported event types\n  ================================================================================ */\n\n  /**\n   * Polyfill the `progress` event for browsers that don't support it natively.\n   *\n   * @see {@link Tech#trackProgress}\n   */\n  ;\n\n  _proto.manualProgressOn = function manualProgressOn() {\n    this.on('durationchange', this.onDurationChange_);\n    this.manualProgress = true; // Trigger progress watching when a source begins loading\n\n    this.one('ready', this.trackProgress_);\n  }\n  /**\n   * Turn off the polyfill for `progress` events that was created in\n   * {@link Tech#manualProgressOn}\n   */\n  ;\n\n  _proto.manualProgressOff = function manualProgressOff() {\n    this.manualProgress = false;\n    this.stopTrackingProgress();\n    this.off('durationchange', this.onDurationChange_);\n  }\n  /**\n   * This is used to trigger a `progress` event when the buffered percent changes. It\n   * sets an interval function that will be called every 500 milliseconds to check if the\n   * buffer end percent has changed.\n   *\n   * > This function is called by {@link Tech#manualProgressOn}\n   *\n   * @param {EventTarget~Event} event\n   *        The `ready` event that caused this to run.\n   *\n   * @listens Tech#ready\n   * @fires Tech#progress\n   */\n  ;\n\n  _proto.trackProgress = function trackProgress(event) {\n    this.stopTrackingProgress();\n    this.progressInterval = this.setInterval(bind(this, function () {\n      // Don't trigger unless buffered amount is greater than last time\n      var numBufferedPercent = this.bufferedPercent();\n\n      if (this.bufferedPercent_ !== numBufferedPercent) {\n        /**\n         * See {@link Player#progress}\n         *\n         * @event Tech#progress\n         * @type {EventTarget~Event}\n         */\n        this.trigger('progress');\n      }\n\n      this.bufferedPercent_ = numBufferedPercent;\n\n      if (numBufferedPercent === 1) {\n        this.stopTrackingProgress();\n      }\n    }), 500);\n  }\n  /**\n   * Update our internal duration on a `durationchange` event by calling\n   * {@link Tech#duration}.\n   *\n   * @param {EventTarget~Event} event\n   *        The `durationchange` event that caused this to run.\n   *\n   * @listens Tech#durationchange\n   */\n  ;\n\n  _proto.onDurationChange = function onDurationChange(event) {\n    this.duration_ = this.duration();\n  }\n  /**\n   * Get and create a `TimeRange` object for buffering.\n   *\n   * @return {TimeRange}\n   *         The time range object that was created.\n   */\n  ;\n\n  _proto.buffered = function buffered() {\n    return createTimeRanges(0, 0);\n  }\n  /**\n   * Get the percentage of the current video that is currently buffered.\n   *\n   * @return {number}\n   *         A number from 0 to 1 that represents the decimal percentage of the\n   *         video that is buffered.\n   *\n   */\n  ;\n\n  _proto.bufferedPercent = function bufferedPercent$1() {\n    return bufferedPercent(this.buffered(), this.duration_);\n  }\n  /**\n   * Turn off the polyfill for `progress` events that was created in\n   * {@link Tech#manualProgressOn}\n   * Stop manually tracking progress events by clearing the interval that was set in\n   * {@link Tech#trackProgress}.\n   */\n  ;\n\n  _proto.stopTrackingProgress = function stopTrackingProgress() {\n    this.clearInterval(this.progressInterval);\n  }\n  /**\n   * Polyfill the `timeupdate` event for browsers that don't support it.\n   *\n   * @see {@link Tech#trackCurrentTime}\n   */\n  ;\n\n  _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() {\n    this.manualTimeUpdates = true;\n    this.on('play', this.trackCurrentTime_);\n    this.on('pause', this.stopTrackingCurrentTime_);\n  }\n  /**\n   * Turn off the polyfill for `timeupdate` events that was created in\n   * {@link Tech#manualTimeUpdatesOn}\n   */\n  ;\n\n  _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() {\n    this.manualTimeUpdates = false;\n    this.stopTrackingCurrentTime();\n    this.off('play', this.trackCurrentTime_);\n    this.off('pause', this.stopTrackingCurrentTime_);\n  }\n  /**\n   * Sets up an interval function to track current time and trigger `timeupdate` every\n   * 250 milliseconds.\n   *\n   * @listens Tech#play\n   * @triggers Tech#timeupdate\n   */\n  ;\n\n  _proto.trackCurrentTime = function trackCurrentTime() {\n    if (this.currentTimeInterval) {\n      this.stopTrackingCurrentTime();\n    }\n\n    this.currentTimeInterval = this.setInterval(function () {\n      /**\n       * Triggered at an interval of 250ms to indicated that time is passing in the video.\n       *\n       * @event Tech#timeupdate\n       * @type {EventTarget~Event}\n       */\n      this.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      }); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n    }, 250);\n  }\n  /**\n   * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\n   * `timeupdate` event is no longer triggered.\n   *\n   * @listens {Tech#pause}\n   */\n  ;\n\n  _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() {\n    this.clearInterval(this.currentTimeInterval); // #1002 - if the video ends right before the next timeupdate would happen,\n    // the progress bar won't make it all the way to the end\n\n    this.trigger({\n      type: 'timeupdate',\n      target: this,\n      manuallyTriggered: true\n    });\n  }\n  /**\n   * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\n   * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\n   *\n   * @fires Component#dispose\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    // clear out all tracks because we can't reuse them between techs\n    this.clearTracks(NORMAL.names); // Turn off any manual progress or timeupdate tracking\n\n    if (this.manualProgress) {\n      this.manualProgressOff();\n    }\n\n    if (this.manualTimeUpdates) {\n      this.manualTimeUpdatesOff();\n    }\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Clear out a single `TrackList` or an array of `TrackLists` given their names.\n   *\n   * > Note: Techs without source handlers should call this between sources for `video`\n   *         & `audio` tracks. You don't want to use them between tracks!\n   *\n   * @param {string[]|string} types\n   *        TrackList names to clear, valid names are `video`, `audio`, and\n   *        `text`.\n   */\n  ;\n\n  _proto.clearTracks = function clearTracks(types) {\n    var _this3 = this;\n\n    types = [].concat(types); // clear out all tracks because we can't reuse them between techs\n\n    types.forEach(function (type) {\n      var list = _this3[type + \"Tracks\"]() || [];\n      var i = list.length;\n\n      while (i--) {\n        var track = list[i];\n\n        if (type === 'text') {\n          _this3.removeRemoteTextTrack(track);\n        }\n\n        list.removeTrack(track);\n      }\n    });\n  }\n  /**\n   * Remove any TextTracks added via addRemoteTextTrack that are\n   * flagged for automatic garbage collection\n   */\n  ;\n\n  _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() {\n    var list = this.autoRemoteTextTracks_ || [];\n    var i = list.length;\n\n    while (i--) {\n      var track = list[i];\n      this.removeRemoteTextTrack(track);\n    }\n  }\n  /**\n   * Reset the tech, which will removes all sources and reset the internal readyState.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.reset = function reset() {}\n  /**\n   * Get the value of `crossOrigin` from the tech.\n   *\n   * @abstract\n   *\n   * @see {Html5#crossOrigin}\n   */\n  ;\n\n  _proto.crossOrigin = function crossOrigin() {}\n  /**\n   * Set the value of `crossOrigin` on the tech.\n   *\n   * @abstract\n   *\n   * @param {string} crossOrigin the crossOrigin value\n   * @see {Html5#setCrossOrigin}\n   */\n  ;\n\n  _proto.setCrossOrigin = function setCrossOrigin() {}\n  /**\n   * Get or set an error on the Tech.\n   *\n   * @param {MediaError} [err]\n   *        Error to set on the Tech\n   *\n   * @return {MediaError|null}\n   *         The current error object on the tech, or null if there isn't one.\n   */\n  ;\n\n  _proto.error = function error(err) {\n    if (err !== undefined) {\n      this.error_ = new MediaError(err);\n      this.trigger('error');\n    }\n\n    return this.error_;\n  }\n  /**\n   * Returns the `TimeRange`s that have been played through for the current source.\n   *\n   * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\n   *         It only checks whether the source has played at all or not.\n   *\n   * @return {TimeRange}\n   *         - A single time range if this video has played\n   *         - An empty set of ranges if not.\n   */\n  ;\n\n  _proto.played = function played() {\n    if (this.hasStarted_) {\n      return createTimeRanges(0, 0);\n    }\n\n    return createTimeRanges();\n  }\n  /**\n   * Start playback\n   *\n   * @abstract\n   *\n   * @see {Html5#play}\n   */\n  ;\n\n  _proto.play = function play() {}\n  /**\n   * Set whether we are scrubbing or not\n   *\n   * @abstract\n   *\n   * @see {Html5#setScrubbing}\n   */\n  ;\n\n  _proto.setScrubbing = function setScrubbing() {}\n  /**\n   * Get whether we are scrubbing or not\n   *\n   * @abstract\n   *\n   * @see {Html5#scrubbing}\n   */\n  ;\n\n  _proto.scrubbing = function scrubbing() {}\n  /**\n   * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\n   * previously called.\n   *\n   * @fires Tech#timeupdate\n   */\n  ;\n\n  _proto.setCurrentTime = function setCurrentTime() {\n    // improve the accuracy of manual timeupdates\n    if (this.manualTimeUpdates) {\n      /**\n       * A manual `timeupdate` event.\n       *\n       * @event Tech#timeupdate\n       * @type {EventTarget~Event}\n       */\n      this.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      });\n    }\n  }\n  /**\n   * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\n   * {@link TextTrackList} events.\n   *\n   * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.\n   *\n   * @fires Tech#audiotrackchange\n   * @fires Tech#videotrackchange\n   * @fires Tech#texttrackchange\n   */\n  ;\n\n  _proto.initTrackListeners = function initTrackListeners() {\n    var _this4 = this;\n\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\n      *\n      * @event Tech#audiotrackchange\n      * @type {EventTarget~Event}\n      */\n\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\n      *\n      * @event Tech#videotrackchange\n      * @type {EventTarget~Event}\n      */\n\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\n      *\n      * @event Tech#texttrackchange\n      * @type {EventTarget~Event}\n      */\n    NORMAL.names.forEach(function (name) {\n      var props = NORMAL[name];\n\n      var trackListChanges = function trackListChanges() {\n        _this4.trigger(name + \"trackchange\");\n      };\n\n      var tracks = _this4[props.getterName]();\n\n      tracks.addEventListener('removetrack', trackListChanges);\n      tracks.addEventListener('addtrack', trackListChanges);\n\n      _this4.on('dispose', function () {\n        tracks.removeEventListener('removetrack', trackListChanges);\n        tracks.removeEventListener('addtrack', trackListChanges);\n      });\n    });\n  }\n  /**\n   * Emulate TextTracks using vtt.js if necessary\n   *\n   * @fires Tech#vttjsloaded\n   * @fires Tech#vttjserror\n   */\n  ;\n\n  _proto.addWebVttScript_ = function addWebVttScript_() {\n    var _this5 = this;\n\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT) {\n      return;\n    } // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\n    // signals that the Tech is ready at which point Tech.el_ is part of the DOM\n    // before inserting the WebVTT script\n\n\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.contains(this.el())) {\n      // load via require if available and vtt.js script location was not passed in\n      // as an option. novtt builds will turn the above require call into an empty object\n      // which will cause this if check to always fail.\n      if (!this.options_['vtt.js'] && isPlain(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_8___default.a) && Object.keys(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_8___default.a).length > 0) {\n        this.trigger('vttjsloaded');\n        return;\n      } // load vtt.js via the script location option or the cdn of no location was\n      // passed in\n\n\n      var script = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('script');\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n\n      script.onload = function () {\n        /**\n         * Fired when vtt.js is loaded.\n         *\n         * @event Tech#vttjsloaded\n         * @type {EventTarget~Event}\n         */\n        _this5.trigger('vttjsloaded');\n      };\n\n      script.onerror = function () {\n        /**\n         * Fired when vtt.js was not loaded due to an error\n         *\n         * @event Tech#vttjsloaded\n         * @type {EventTarget~Event}\n         */\n        _this5.trigger('vttjserror');\n      };\n\n      this.on('dispose', function () {\n        script.onload = null;\n        script.onerror = null;\n      }); // but have not loaded yet and we set it to true before the inject so that\n      // we don't overwrite the injected window.WebVTT if it loads right away\n\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT = true;\n      this.el().parentNode.appendChild(script);\n    } else {\n      this.ready(this.addWebVttScript_);\n    }\n  }\n  /**\n   * Emulate texttracks\n   *\n   */\n  ;\n\n  _proto.emulateTextTracks = function emulateTextTracks() {\n    var _this6 = this;\n\n    var tracks = this.textTracks();\n    var remoteTracks = this.remoteTextTracks();\n\n    var handleAddTrack = function handleAddTrack(e) {\n      return tracks.addTrack(e.track);\n    };\n\n    var handleRemoveTrack = function handleRemoveTrack(e) {\n      return tracks.removeTrack(e.track);\n    };\n\n    remoteTracks.on('addtrack', handleAddTrack);\n    remoteTracks.on('removetrack', handleRemoveTrack);\n    this.addWebVttScript_();\n\n    var updateDisplay = function updateDisplay() {\n      return _this6.trigger('texttrackchange');\n    };\n\n    var textTracksChanges = function textTracksChanges() {\n      updateDisplay();\n\n      for (var i = 0; i < tracks.length; i++) {\n        var track = tracks[i];\n        track.removeEventListener('cuechange', updateDisplay);\n\n        if (track.mode === 'showing') {\n          track.addEventListener('cuechange', updateDisplay);\n        }\n      }\n    };\n\n    textTracksChanges();\n    tracks.addEventListener('change', textTracksChanges);\n    tracks.addEventListener('addtrack', textTracksChanges);\n    tracks.addEventListener('removetrack', textTracksChanges);\n    this.on('dispose', function () {\n      remoteTracks.off('addtrack', handleAddTrack);\n      remoteTracks.off('removetrack', handleRemoveTrack);\n      tracks.removeEventListener('change', textTracksChanges);\n      tracks.removeEventListener('addtrack', textTracksChanges);\n      tracks.removeEventListener('removetrack', textTracksChanges);\n\n      for (var i = 0; i < tracks.length; i++) {\n        var track = tracks[i];\n        track.removeEventListener('cuechange', updateDisplay);\n      }\n    });\n  }\n  /**\n   * Create and returns a remote {@link TextTrack} object.\n   *\n   * @param {string} kind\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n   *\n   * @param {string} [label]\n   *        Label to identify the text track\n   *\n   * @param {string} [language]\n   *        Two letter language abbreviation\n   *\n   * @return {TextTrack}\n   *         The TextTrack that gets created.\n   */\n  ;\n\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\n    if (!kind) {\n      throw new Error('TextTrack kind is required but was not provided');\n    }\n\n    return createTrackHelper(this, kind, label, language);\n  }\n  /**\n   * Create an emulated TextTrack for use by addRemoteTextTrack\n   *\n   * This is intended to be overridden by classes that inherit from\n   * Tech in order to create native or custom TextTracks.\n   *\n   * @param {Object} options\n   *        The object should contain the options to initialize the TextTrack with.\n   *\n   * @param {string} [options.kind]\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n   *\n   * @param {string} [options.label].\n   *        Label to identify the text track\n   *\n   * @param {string} [options.language]\n   *        Two letter language abbreviation.\n   *\n   * @return {HTMLTrackElement}\n   *         The track element that gets created.\n   */\n  ;\n\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\n    var track = mergeOptions$3(options, {\n      tech: this\n    });\n    return new REMOTE.remoteTextEl.TrackClass(track);\n  }\n  /**\n   * Creates a remote text track object and returns an html track element.\n   *\n   * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\n   *\n   * @param {Object} options\n   *        See {@link Tech#createRemoteTextTrack} for more detailed properties.\n   *\n   * @param {boolean} [manualCleanup=true]\n   *        - When false: the TextTrack will be automatically removed from the video\n   *          element whenever the source changes\n   *        - When True: The TextTrack will have to be cleaned up manually\n   *\n   * @return {HTMLTrackElement}\n   *         An Html Track Element.\n   *\n   * @deprecated The default functionality for this function will be equivalent\n   *             to \"manualCleanup=false\" in the future. The manualCleanup parameter will\n   *             also be removed.\n   */\n  ;\n\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n    var _this7 = this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    var htmlTrackElement = this.createRemoteTextTrack(options);\n\n    if (manualCleanup !== true && manualCleanup !== false) {\n      // deprecation warning\n      log$1.warn('Calling addRemoteTextTrack without explicitly setting the \"manualCleanup\" parameter to `true` is deprecated and default to `false` in future version of video.js');\n      manualCleanup = true;\n    } // store HTMLTrackElement and TextTrack to remote list\n\n\n    this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n    this.remoteTextTracks().addTrack(htmlTrackElement.track);\n\n    if (manualCleanup !== true) {\n      // create the TextTrackList if it doesn't exist\n      this.ready(function () {\n        return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track);\n      });\n    }\n\n    return htmlTrackElement;\n  }\n  /**\n   * Remove a remote text track from the remote `TextTrackList`.\n   *\n   * @param {TextTrack} track\n   *        `TextTrack` to remove from the `TextTrackList`\n   */\n  ;\n\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n    var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); // remove HTMLTrackElement and TextTrack from remote list\n\n    this.remoteTextTrackEls().removeTrackElement_(trackElement);\n    this.remoteTextTracks().removeTrack(track);\n    this.autoRemoteTextTracks_.removeTrack(track);\n  }\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object}\n   *         An object with supported media playback quality metrics\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n    return {};\n  }\n  /**\n   * Attempt to create a floating video window always on top of other windows\n   * so that users may continue consuming media while they interact with other\n   * content sites, or applications on their device.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @return {Promise|undefined}\n   *         A promise with a Picture-in-Picture window if the browser supports\n   *         Promises (or one was passed in as an option). It returns undefined\n   *         otherwise.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      return PromiseClass.reject();\n    }\n  }\n  /**\n   * A method to check for the value of the 'disablePictureInPicture' <video> property.\n   * Defaults to true, as it should be considered disabled if the tech does not support pip\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.disablePictureInPicture = function disablePictureInPicture() {\n    return true;\n  }\n  /**\n   * A method to set or unset the 'disablePictureInPicture' <video> property.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.setDisablePictureInPicture = function setDisablePictureInPicture() {}\n  /**\n   * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n   *\n   * @param {function} cb\n   * @return {number} request id\n   */\n  ;\n\n  _proto.requestVideoFrameCallback = function requestVideoFrameCallback(cb) {\n    var _this8 = this;\n\n    var id = newGUID();\n\n    if (!this.isReady_ || this.paused()) {\n      this.queuedHanders_.add(id);\n      this.one('playing', function () {\n        if (_this8.queuedHanders_.has(id)) {\n          _this8.queuedHanders_[\"delete\"](id);\n\n          cb();\n        }\n      });\n    } else {\n      this.requestNamedAnimationFrame(id, cb);\n    }\n\n    return id;\n  }\n  /**\n   * A fallback implementation of cancelVideoFrameCallback\n   *\n   * @param {number} id id of callback to be cancelled\n   */\n  ;\n\n  _proto.cancelVideoFrameCallback = function cancelVideoFrameCallback(id) {\n    if (this.queuedHanders_.has(id)) {\n      this.queuedHanders_[\"delete\"](id);\n    } else {\n      this.cancelNamedAnimationFrame(id);\n    }\n  }\n  /**\n   * A method to set a poster from a `Tech`.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.setPoster = function setPoster() {}\n  /**\n   * A method to check for the presence of the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.playsinline = function playsinline() {}\n  /**\n   * A method to set or unset the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.setPlaysinline = function setPlaysinline() {}\n  /**\n   * Attempt to force override of native audio tracks.\n   *\n   * @param {boolean} override - If set to true native audio will be overridden,\n   * otherwise native audio will potentially be used.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks() {}\n  /**\n   * Attempt to force override of native video tracks.\n   *\n   * @param {boolean} override - If set to true native video will be overridden,\n   * otherwise native video will potentially be used.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks() {}\n  /*\n   * Check if the tech can support the given mime-type.\n   *\n   * The base tech does not support any type, but source handlers might\n   * overwrite this.\n   *\n   * @param  {string} type\n   *         The mimetype to check for support\n   *\n   * @return {string}\n   *         'probably', 'maybe', or empty string\n   *\n   * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.canPlayType = function canPlayType() {\n    return '';\n  }\n  /**\n   * Check if the type is supported by this tech.\n   *\n   * The base tech does not support any type, but source handlers might\n   * overwrite this.\n   *\n   * @param {string} type\n   *        The media type to check\n   * @return {string} Returns the native video element's response\n   */\n  ;\n\n  Tech.canPlayType = function canPlayType() {\n    return '';\n  }\n  /**\n   * Check if the tech can support the given source\n   *\n   * @param {Object} srcObj\n   *        The source object\n   * @param {Object} options\n   *        The options passed to the tech\n   * @return {string} 'probably', 'maybe', or '' (empty string)\n   */\n  ;\n\n  Tech.canPlaySource = function canPlaySource(srcObj, options) {\n    return Tech.canPlayType(srcObj.type);\n  }\n  /*\n   * Return whether the argument is a Tech or not.\n   * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n   *\n   * @param {Object} component\n   *        The item to check\n   *\n   * @return {boolean}\n   *         Whether it is a tech or not\n   *         - True if it is a tech\n   *         - False if it is not\n   */\n  ;\n\n  Tech.isTech = function isTech(component) {\n    return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\n  }\n  /**\n   * Registers a `Tech` into a shared list for videojs.\n   *\n   * @param {string} name\n   *        Name of the `Tech` to register.\n   *\n   * @param {Object} tech\n   *        The `Tech` class to register.\n   */\n  ;\n\n  Tech.registerTech = function registerTech(name, tech) {\n    if (!Tech.techs_) {\n      Tech.techs_ = {};\n    }\n\n    if (!Tech.isTech(tech)) {\n      throw new Error(\"Tech \" + name + \" must be a Tech\");\n    }\n\n    if (!Tech.canPlayType) {\n      throw new Error('Techs must have a static canPlayType method on them');\n    }\n\n    if (!Tech.canPlaySource) {\n      throw new Error('Techs must have a static canPlaySource method on them');\n    }\n\n    name = toTitleCase$1(name);\n    Tech.techs_[name] = tech;\n    Tech.techs_[toLowerCase(name)] = tech;\n\n    if (name !== 'Tech') {\n      // camel case the techName for use in techOrder\n      Tech.defaultTechOrder_.push(name);\n    }\n\n    return tech;\n  }\n  /**\n   * Get a `Tech` from the shared list by name.\n   *\n   * @param {string} name\n   *        `camelCase` or `TitleCase` name of the Tech to get\n   *\n   * @return {Tech|undefined}\n   *         The `Tech` or undefined if there was no tech with the name requested.\n   */\n  ;\n\n  Tech.getTech = function getTech(name) {\n    if (!name) {\n      return;\n    }\n\n    if (Tech.techs_ && Tech.techs_[name]) {\n      return Tech.techs_[name];\n    }\n\n    name = toTitleCase$1(name);\n\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name]) {\n      log$1.warn(\"The \" + name + \" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\");\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name];\n    }\n  };\n\n  return Tech;\n}(Component$1);\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\n\n\nALL.names.forEach(function (name) {\n  var props = ALL[name];\n\n  Tech.prototype[props.getterName] = function () {\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\n    return this[props.privateName];\n  };\n});\n/**\n * List of associated text tracks\n *\n * @type {TextTrackList}\n * @private\n * @property Tech#textTracks_\n */\n\n/**\n * List of associated audio tracks.\n *\n * @type {AudioTrackList}\n * @private\n * @property Tech#audioTracks_\n */\n\n/**\n * List of associated video tracks.\n *\n * @type {VideoTrackList}\n * @private\n * @property Tech#videoTracks_\n */\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresVolumeControl = true;\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {bolean}\n * @default\n */\n\nTech.prototype.featuresMuteControl = true;\n/**\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\n * Resizing plugins using request fullscreen reloads the plugin\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresFullscreenResize = false;\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\n * plays. Examples:\n *   - Set player to play 2x (twice) as fast\n *   - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresPlaybackRate = false;\n/**\n * Boolean indicating whether the `Tech` supports the `progress` event. This is currently\n * not triggered by video-js-swf. This will be used to determine if\n * {@link Tech#manualProgressOn} should be called.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresProgressEvents = false;\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\n * a new source.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresSourceset = false;\n/**\n * Boolean indicating whether the `Tech` supports the `timeupdate` event. This is currently\n * not triggered by video-js-swf. This will be used to determine if\n * {@link Tech#manualTimeUpdates} should be called.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresTimeupdateEvents = false;\n/**\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\n * This will help us integrate with native `TextTrack`s if the browser supports them.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresNativeTextTracks = false;\n/**\n * Boolean indicating whether the `Tech` supports `requestVideoFrameCallback`.\n *\n * @type {boolean}\n * @default\n */\n\nTech.prototype.featuresVideoFrameCallback = false;\n/**\n * A functional mixin for techs that want to use the Source Handler pattern.\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * Example: `Tech.withSourceHandlers.call(MyTech);`\n *\n * @param {Tech} _Tech\n *        The tech to add source handler functions to.\n *\n * @mixes Tech~SourceHandlerAdditions\n */\n\nTech.withSourceHandlers = function (_Tech) {\n  /**\n   * Register a source handler\n   *\n   * @param {Function} handler\n   *        The source handler class\n   *\n   * @param {number} [index]\n   *        Register it at the following index\n   */\n  _Tech.registerSourceHandler = function (handler, index) {\n    var handlers = _Tech.sourceHandlers;\n\n    if (!handlers) {\n      handlers = _Tech.sourceHandlers = [];\n    }\n\n    if (index === undefined) {\n      // add to the end of the list\n      index = handlers.length;\n    }\n\n    handlers.splice(index, 0, handler);\n  };\n  /**\n   * Check if the tech can support the given type. Also checks the\n   * Techs sourceHandlers.\n   *\n   * @param {string} type\n   *         The mimetype to check.\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n\n\n  _Tech.canPlayType = function (type) {\n    var handlers = _Tech.sourceHandlers || [];\n    var can;\n\n    for (var i = 0; i < handlers.length; i++) {\n      can = handlers[i].canPlayType(type);\n\n      if (can) {\n        return can;\n      }\n    }\n\n    return '';\n  };\n  /**\n   * Returns the first source handler that supports the source.\n   *\n   * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n   *\n   * @param {Tech~SourceObject} source\n   *        The source object\n   *\n   * @param {Object} options\n   *        The options passed to the tech\n   *\n   * @return {SourceHandler|null}\n   *          The first source handler that supports the source or null if\n   *          no SourceHandler supports the source\n   */\n\n\n  _Tech.selectSourceHandler = function (source, options) {\n    var handlers = _Tech.sourceHandlers || [];\n    var can;\n\n    for (var i = 0; i < handlers.length; i++) {\n      can = handlers[i].canHandleSource(source, options);\n\n      if (can) {\n        return handlers[i];\n      }\n    }\n\n    return null;\n  };\n  /**\n   * Check if the tech can support the given source.\n   *\n   * @param {Tech~SourceObject} srcObj\n   *        The source object\n   *\n   * @param {Object} options\n   *        The options passed to the tech\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n\n\n  _Tech.canPlaySource = function (srcObj, options) {\n    var sh = _Tech.selectSourceHandler(srcObj, options);\n\n    if (sh) {\n      return sh.canHandleSource(srcObj, options);\n    }\n\n    return '';\n  };\n  /**\n   * When using a source handler, prefer its implementation of\n   * any function normally provided by the tech.\n   */\n\n\n  var deferrable = ['seekable', 'seeking', 'duration'];\n  /**\n   * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\n   * function if it exists, with a fallback to the Techs seekable function.\n   *\n   * @method _Tech.seekable\n   */\n\n  /**\n   * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\n   * function if it exists, otherwise it will fallback to the techs duration function.\n   *\n   * @method _Tech.duration\n   */\n\n  deferrable.forEach(function (fnName) {\n    var originalFn = this[fnName];\n\n    if (typeof originalFn !== 'function') {\n      return;\n    }\n\n    this[fnName] = function () {\n      if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n        return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n      }\n\n      return originalFn.apply(this, arguments);\n    };\n  }, _Tech.prototype);\n  /**\n   * Create a function for setting the source using a source object\n   * and source handlers.\n   * Should never be called unless a source handler was found.\n   *\n   * @param {Tech~SourceObject} source\n   *        A source object with src and type keys\n   */\n\n  _Tech.prototype.setSource = function (source) {\n    var sh = _Tech.selectSourceHandler(source, this.options_);\n\n    if (!sh) {\n      // Fall back to a native source hander when unsupported sources are\n      // deliberately set\n      if (_Tech.nativeSourceHandler) {\n        sh = _Tech.nativeSourceHandler;\n      } else {\n        log$1.error('No source handler found for the current source.');\n      }\n    } // Dispose any existing source handler\n\n\n    this.disposeSourceHandler();\n    this.off('dispose', this.disposeSourceHandler_);\n\n    if (sh !== _Tech.nativeSourceHandler) {\n      this.currentSource_ = source;\n    }\n\n    this.sourceHandler_ = sh.handleSource(source, this, this.options_);\n    this.one('dispose', this.disposeSourceHandler_);\n  };\n  /**\n   * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\n   *\n   * @listens Tech#dispose\n   */\n\n\n  _Tech.prototype.disposeSourceHandler = function () {\n    // if we have a source and get another one\n    // then we are loading something new\n    // than clear all of our current tracks\n    if (this.currentSource_) {\n      this.clearTracks(['audio', 'video']);\n      this.currentSource_ = null;\n    } // always clean up auto-text tracks\n\n\n    this.cleanupAutoTextTracks();\n\n    if (this.sourceHandler_) {\n      if (this.sourceHandler_.dispose) {\n        this.sourceHandler_.dispose();\n      }\n\n      this.sourceHandler_ = null;\n    }\n  };\n}; // The base Tech class needs to be registered as a Component. It is the only\n// Tech that can be registered as a Component.\n\n\nComponent$1.registerComponent('Tech', Tech);\nTech.registerTech('Tech', Tech);\n/**\n * A list of techs that should be added to techOrder on Players\n *\n * @private\n */\n\nTech.defaultTechOrder_ = [];\n\n/**\n * @file middleware.js\n * @module middleware\n */\nvar middlewares = {};\nvar middlewareInstances = {};\nvar TERMINATOR = {};\n/**\n * A middleware object is a plain JavaScript object that has methods that\n * match the {@link Tech} methods found in the lists of allowed\n * {@link module:middleware.allowedGetters|getters},\n * {@link module:middleware.allowedSetters|setters}, and\n * {@link module:middleware.allowedMediators|mediators}.\n *\n * @typedef {Object} MiddlewareObject\n */\n\n/**\n * A middleware factory function that should return a\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\n *\n * This factory will be called for each player when needed, with the player\n * passed in as an argument.\n *\n * @callback MiddlewareFactory\n * @param {Player} player\n *        A Video.js player.\n */\n\n/**\n * Define a middleware that the player should use by way of a factory function\n * that returns a middleware object.\n *\n * @param  {string} type\n *         The MIME type to match or `\"*\"` for all MIME types.\n *\n * @param  {MiddlewareFactory} middleware\n *         A middleware factory function that will be executed for\n *         matching types.\n */\n\nfunction use(type, middleware) {\n  middlewares[type] = middlewares[type] || [];\n  middlewares[type].push(middleware);\n}\n/**\n * Asynchronously sets a source using middleware by recursing through any\n * matching middlewares and calling `setSource` on each, passing along the\n * previous returned value each time.\n *\n * @param  {Player} player\n *         A {@link Player} instance.\n *\n * @param  {Tech~SourceObject} src\n *         A source object.\n *\n * @param  {Function}\n *         The next middleware to run.\n */\n\nfunction setSource(player, src, next) {\n  player.setTimeout(function () {\n    return setSourceHelper(src, middlewares[src.type], next, player);\n  }, 1);\n}\n/**\n * When the tech is set, passes the tech to each middleware's `setTech` method.\n *\n * @param {Object[]} middleware\n *        An array of middleware instances.\n *\n * @param {Tech} tech\n *        A Video.js tech.\n */\n\nfunction setTech(middleware, tech) {\n  middleware.forEach(function (mw) {\n    return mw.setTech && mw.setTech(tech);\n  });\n}\n/**\n * Calls a getter on the tech first, through each middleware\n * from right to left to the player.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @return {Mixed}\n *         The final value from the tech after middleware has intercepted it.\n */\n\nfunction get(middleware, tech, method) {\n  return middleware.reduceRight(middlewareIterator(method), tech[method]());\n}\n/**\n * Takes the argument given to the player and calls the setter method on each\n * middleware from left to right to the tech.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @param  {Mixed} arg\n *         The value to set on the tech.\n *\n * @return {Mixed}\n *         The return value of the `method` of the `tech`.\n */\n\nfunction set(middleware, tech, method, arg) {\n  return tech[method](middleware.reduce(middlewareIterator(method), arg));\n}\n/**\n * Takes the argument given to the player and calls the `call` version of the\n * method on each middleware from left to right.\n *\n * Then, call the passed in method on the tech and return the result unchanged\n * back to the player, through middleware, this time from right to left.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @param  {Mixed} arg\n *         The value to set on the tech.\n *\n * @return {Mixed}\n *         The return value of the `method` of the `tech`, regardless of the\n *         return values of middlewares.\n */\n\nfunction mediate(middleware, tech, method, arg) {\n  if (arg === void 0) {\n    arg = null;\n  }\n\n  var callMethod = 'call' + toTitleCase$1(method);\n  var middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n  var terminated = middlewareValue === TERMINATOR; // deprecated. The `null` return value should instead return TERMINATOR to\n  // prevent confusion if a techs method actually returns null.\n\n  var returnValue = terminated ? null : tech[method](middlewareValue);\n  executeRight(middleware, method, returnValue, terminated);\n  return returnValue;\n}\n/**\n * Enumeration of allowed getters where the keys are method names.\n *\n * @type {Object}\n */\n\nvar allowedGetters = {\n  buffered: 1,\n  currentTime: 1,\n  duration: 1,\n  muted: 1,\n  played: 1,\n  paused: 1,\n  seekable: 1,\n  volume: 1,\n  ended: 1\n};\n/**\n * Enumeration of allowed setters where the keys are method names.\n *\n * @type {Object}\n */\n\nvar allowedSetters = {\n  setCurrentTime: 1,\n  setMuted: 1,\n  setVolume: 1\n};\n/**\n * Enumeration of allowed mediators where the keys are method names.\n *\n * @type {Object}\n */\n\nvar allowedMediators = {\n  play: 1,\n  pause: 1\n};\n\nfunction middlewareIterator(method) {\n  return function (value, mw) {\n    // if the previous middleware terminated, pass along the termination\n    if (value === TERMINATOR) {\n      return TERMINATOR;\n    }\n\n    if (mw[method]) {\n      return mw[method](value);\n    }\n\n    return value;\n  };\n}\n\nfunction executeRight(mws, method, value, terminated) {\n  for (var i = mws.length - 1; i >= 0; i--) {\n    var mw = mws[i];\n\n    if (mw[method]) {\n      mw[method](terminated, value);\n    }\n  }\n}\n/**\n * Clear the middleware cache for a player.\n *\n * @param  {Player} player\n *         A {@link Player} instance.\n */\n\n\nfunction clearCacheForPlayer(player) {\n  middlewareInstances[player.id()] = null;\n}\n/**\n * {\n *  [playerId]: [[mwFactory, mwInstance], ...]\n * }\n *\n * @private\n */\n\nfunction getOrCreateFactory(player, mwFactory) {\n  var mws = middlewareInstances[player.id()];\n  var mw = null;\n\n  if (mws === undefined || mws === null) {\n    mw = mwFactory(player);\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\n    return mw;\n  }\n\n  for (var i = 0; i < mws.length; i++) {\n    var _mws$i = mws[i],\n        mwf = _mws$i[0],\n        mwi = _mws$i[1];\n\n    if (mwf !== mwFactory) {\n      continue;\n    }\n\n    mw = mwi;\n  }\n\n  if (mw === null) {\n    mw = mwFactory(player);\n    mws.push([mwFactory, mw]);\n  }\n\n  return mw;\n}\n\nfunction setSourceHelper(src, middleware, next, player, acc, lastRun) {\n  if (src === void 0) {\n    src = {};\n  }\n\n  if (middleware === void 0) {\n    middleware = [];\n  }\n\n  if (acc === void 0) {\n    acc = [];\n  }\n\n  if (lastRun === void 0) {\n    lastRun = false;\n  }\n\n  var _middleware = middleware,\n      mwFactory = _middleware[0],\n      mwrest = _middleware.slice(1); // if mwFactory is a string, then we're at a fork in the road\n\n\n  if (typeof mwFactory === 'string') {\n    setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun); // if we have an mwFactory, call it with the player to get the mw,\n    // then call the mw's setSource method\n  } else if (mwFactory) {\n    var mw = getOrCreateFactory(player, mwFactory); // if setSource isn't present, implicitly select this middleware\n\n    if (!mw.setSource) {\n      acc.push(mw);\n      return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n    }\n\n    mw.setSource(assign({}, src), function (err, _src) {\n      // something happened, try the next middleware on the current level\n      // make sure to use the old src\n      if (err) {\n        return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n      } // we've succeeded, now we need to go deeper\n\n\n      acc.push(mw); // if it's the same type, continue down the current chain\n      // otherwise, we want to go down the new chain\n\n      setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\n    });\n  } else if (mwrest.length) {\n    setSourceHelper(src, mwrest, next, player, acc, lastRun);\n  } else if (lastRun) {\n    next(src, acc);\n  } else {\n    setSourceHelper(src, middlewares['*'], next, player, acc, true);\n  }\n}\n\n/**\n * Mimetypes\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml\n * @typedef Mimetypes~Kind\n * @enum\n */\n\nvar MimetypesKind = {\n  opus: 'video/ogg',\n  ogv: 'video/ogg',\n  mp4: 'video/mp4',\n  mov: 'video/mp4',\n  m4v: 'video/mp4',\n  mkv: 'video/x-matroska',\n  m4a: 'audio/mp4',\n  mp3: 'audio/mpeg',\n  aac: 'audio/aac',\n  caf: 'audio/x-caf',\n  flac: 'audio/flac',\n  oga: 'audio/ogg',\n  wav: 'audio/wav',\n  m3u8: 'application/x-mpegURL',\n  mpd: 'application/dash+xml',\n  jpg: 'image/jpeg',\n  jpeg: 'image/jpeg',\n  gif: 'image/gif',\n  png: 'image/png',\n  svg: 'image/svg+xml',\n  webp: 'image/webp'\n};\n/**\n * Get the mimetype of a given src url if possible\n *\n * @param {string} src\n *        The url to the src\n *\n * @return {string}\n *         return the mimetype if it was known or empty string otherwise\n */\n\nvar getMimetype = function getMimetype(src) {\n  if (src === void 0) {\n    src = '';\n  }\n\n  var ext = getFileExtension(src);\n  var mimetype = MimetypesKind[ext.toLowerCase()];\n  return mimetype || '';\n};\n/**\n * Find the mime type of a given source string if possible. Uses the player\n * source cache.\n *\n * @param {Player} player\n *        The player object\n *\n * @param {string} src\n *        The source string\n *\n * @return {string}\n *         The type that was found\n */\n\nvar findMimetype = function findMimetype(player, src) {\n  if (!src) {\n    return '';\n  } // 1. check for the type in the `source` cache\n\n\n  if (player.cache_.source.src === src && player.cache_.source.type) {\n    return player.cache_.source.type;\n  } // 2. see if we have this source in our `currentSources` cache\n\n\n  var matchingSources = player.cache_.sources.filter(function (s) {\n    return s.src === src;\n  });\n\n  if (matchingSources.length) {\n    return matchingSources[0].type;\n  } // 3. look for the src url in source elements and use the type there\n\n\n  var sources = player.$$('source');\n\n  for (var i = 0; i < sources.length; i++) {\n    var s = sources[i];\n\n    if (s.type && s.src && s.src === src) {\n      return s.type;\n    }\n  } // 4. finally fallback to our list of mime types based on src url extension\n\n\n  return getMimetype(src);\n};\n\n/**\n * @module filter-source\n */\n/**\n * Filter out single bad source objects or multiple source objects in an\n * array. Also flattens nested source object arrays into a 1 dimensional\n * array of source objects.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\n *        The src object to filter\n *\n * @return {Tech~SourceObject[]}\n *         An array of sourceobjects containing only valid sources\n *\n * @private\n */\n\nvar filterSource = function filterSource(src) {\n  // traverse array\n  if (Array.isArray(src)) {\n    var newsrc = [];\n    src.forEach(function (srcobj) {\n      srcobj = filterSource(srcobj);\n\n      if (Array.isArray(srcobj)) {\n        newsrc = newsrc.concat(srcobj);\n      } else if (isObject(srcobj)) {\n        newsrc.push(srcobj);\n      }\n    });\n    src = newsrc;\n  } else if (typeof src === 'string' && src.trim()) {\n    // convert string into object\n    src = [fixSource({\n      src: src\n    })];\n  } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\n    // src is already valid\n    src = [fixSource(src)];\n  } else {\n    // invalid source, turn it into an empty array\n    src = [];\n  }\n\n  return src;\n};\n/**\n * Checks src mimetype, adding it when possible\n *\n * @param {Tech~SourceObject} src\n *        The src object to check\n * @return {Tech~SourceObject}\n *        src Object with known type\n */\n\n\nfunction fixSource(src) {\n  if (!src.type) {\n    var mimetype = getMimetype(src.src);\n\n    if (mimetype) {\n      src.type = mimetype;\n    }\n  }\n\n  return src;\n}\n\n/**\n * The `MediaLoader` is the `Component` that decides which playback technology to load\n * when a player is initialized.\n *\n * @extends Component\n */\n\nvar MediaLoader = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MediaLoader, _Component);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should attach to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function that is run when this component is ready.\n   */\n  function MediaLoader(player, options, ready) {\n    var _this;\n\n    // MediaLoader has no element\n    var options_ = mergeOptions$3({\n      createEl: false\n    }, options);\n    _this = _Component.call(this, player, options_, ready) || this; // If there are no sources when the player is initialized,\n    // load the first supported playback technology.\n\n    if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n      for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n        var techName = toTitleCase$1(j[i]);\n        var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\n        // Remove once that deprecated behavior is removed.\n\n        if (!techName) {\n          tech = Component$1.getComponent(techName);\n        } // Check if the browser supports this technology\n\n\n        if (tech && tech.isSupported()) {\n          player.loadTech_(techName);\n          break;\n        }\n      }\n    } else {\n      // Loop through playback technologies (e.g. HTML5) and check for support.\n      // Then load the best source.\n      // A few assumptions here:\n      //   All playback technologies respect preload false.\n      player.src(options.playerOptions.sources);\n    }\n\n    return _this;\n  }\n\n  return MediaLoader;\n}(Component$1);\n\nComponent$1.registerComponent('MediaLoader', MediaLoader);\n\n/**\n * Component which is clickable or keyboard actionable, but is not a\n * native HTML button.\n *\n * @extends Component\n */\n\nvar ClickableComponent = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ClickableComponent, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param  {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param  {Object} [options]\n   *         The key/value store of component options.\n   *\n   * @param  {function} [options.clickHandler]\n   *         The function to call when the button is clicked / activated\n   *\n   * @param  {string} [options.controlText]\n   *         The text to set on the button\n   *\n   * @param  {string} [options.className]\n   *         A class or space separated list of classes to add the component\n   *\n   */\n  function ClickableComponent(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    if (_this.options_.controlText) {\n      _this.controlText(_this.options_.controlText);\n    }\n\n    _this.handleMouseOver_ = function (e) {\n      return _this.handleMouseOver(e);\n    };\n\n    _this.handleMouseOut_ = function (e) {\n      return _this.handleMouseOut(e);\n    };\n\n    _this.handleClick_ = function (e) {\n      return _this.handleClick(e);\n    };\n\n    _this.handleKeyDown_ = function (e) {\n      return _this.handleKeyDown(e);\n    };\n\n    _this.emitTapEvents();\n\n    _this.enable();\n\n    return _this;\n  }\n  /**\n   * Create the `ClickableComponent`s DOM element.\n   *\n   * @param {string} [tag=div]\n   *        The element's node type.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element.\n   *\n   * @param {Object} [attributes={}]\n   *        An object of attributes that should be set on the element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n\n\n  var _proto = ClickableComponent.prototype;\n\n  _proto.createEl = function createEl$1(tag, props, attributes) {\n    if (tag === void 0) {\n      tag = 'div';\n    }\n\n    if (props === void 0) {\n      props = {};\n    }\n\n    if (attributes === void 0) {\n      attributes = {};\n    }\n\n    props = assign({\n      className: this.buildCSSClass(),\n      tabIndex: 0\n    }, props);\n\n    if (tag === 'button') {\n      log$1.error(\"Creating a ClickableComponent with an HTML element of \" + tag + \" is not supported; use a Button instead.\");\n    } // Add ARIA attributes for clickable element which is not a native HTML button\n\n\n    attributes = assign({\n      role: 'button'\n    }, attributes);\n    this.tabIndex_ = props.tabIndex;\n    var el = createEl(tag, props, attributes);\n    el.appendChild(createEl('span', {\n      className: 'vjs-icon-placeholder'\n    }, {\n      'aria-hidden': true\n    }));\n    this.createControlTextEl(el);\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    // remove controlTextEl_ on dispose\n    this.controlTextEl_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Create a control text element on this `ClickableComponent`\n   *\n   * @param {Element} [el]\n   *        Parent element for the control text.\n   *\n   * @return {Element}\n   *         The control text element that gets created.\n   */\n  ;\n\n  _proto.createControlTextEl = function createControlTextEl(el) {\n    this.controlTextEl_ = createEl('span', {\n      className: 'vjs-control-text'\n    }, {\n      // let the screen reader user know that the text of the element may change\n      'aria-live': 'polite'\n    });\n\n    if (el) {\n      el.appendChild(this.controlTextEl_);\n    }\n\n    this.controlText(this.controlText_, el);\n    return this.controlTextEl_;\n  }\n  /**\n   * Get or set the localize text to use for the controls on the `ClickableComponent`.\n   *\n   * @param {string} [text]\n   *        Control text for element.\n   *\n   * @param {Element} [el=this.el()]\n   *        Element to set the title on.\n   *\n   * @return {string}\n   *         - The control text when getting\n   */\n  ;\n\n  _proto.controlText = function controlText(text, el) {\n    if (el === void 0) {\n      el = this.el();\n    }\n\n    if (text === undefined) {\n      return this.controlText_ || 'Need Text';\n    }\n\n    var localizedText = this.localize(text);\n    this.controlText_ = text;\n    textContent(this.controlTextEl_, localizedText);\n\n    if (!this.nonIconControl && !this.player_.options_.noUITitleAttributes) {\n      // Set title attribute if only an icon is shown\n      el.setAttribute('title', localizedText);\n    }\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-control vjs-button \" + _Component.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Enable this `ClickableComponent`\n   */\n  ;\n\n  _proto.enable = function enable() {\n    if (!this.enabled_) {\n      this.enabled_ = true;\n      this.removeClass('vjs-disabled');\n      this.el_.setAttribute('aria-disabled', 'false');\n\n      if (typeof this.tabIndex_ !== 'undefined') {\n        this.el_.setAttribute('tabIndex', this.tabIndex_);\n      }\n\n      this.on(['tap', 'click'], this.handleClick_);\n      this.on('keydown', this.handleKeyDown_);\n    }\n  }\n  /**\n   * Disable this `ClickableComponent`\n   */\n  ;\n\n  _proto.disable = function disable() {\n    this.enabled_ = false;\n    this.addClass('vjs-disabled');\n    this.el_.setAttribute('aria-disabled', 'true');\n\n    if (typeof this.tabIndex_ !== 'undefined') {\n      this.el_.removeAttribute('tabIndex');\n    }\n\n    this.off('mouseover', this.handleMouseOver_);\n    this.off('mouseout', this.handleMouseOut_);\n    this.off(['tap', 'click'], this.handleClick_);\n    this.off('keydown', this.handleKeyDown_);\n  }\n  /**\n   * Handles language change in ClickableComponent for the player in components\n   *\n   *\n   */\n  ;\n\n  _proto.handleLanguagechange = function handleLanguagechange() {\n    this.controlText(this.controlText_);\n  }\n  /**\n   * Event handler that is called when a `ClickableComponent` receives a\n   * `click` or `tap` event.\n   *\n   * @param {EventTarget~Event} event\n   *        The `tap` or `click` event that caused this function to be called.\n   *\n   * @listens tap\n   * @listens click\n   * @abstract\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    if (this.options_.clickHandler) {\n      this.options_.clickHandler.call(this, arguments);\n    }\n  }\n  /**\n   * Event handler that is called when a `ClickableComponent` receives a\n   * `keydown` event.\n   *\n   * By default, if the key is Space or Enter, it will trigger a `click` event.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Support Space or Enter key operation to fire a click event. Also,\n    // prevent the event from propagating through the DOM and triggering\n    // Player hotkeys.\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Enter')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      _Component.prototype.handleKeyDown.call(this, event);\n    }\n  };\n\n  return ClickableComponent;\n}(Component$1);\n\nComponent$1.registerComponent('ClickableComponent', ClickableComponent);\n\n/**\n * A `ClickableComponent` that handles showing the poster image for the player.\n *\n * @extends ClickableComponent\n */\n\nvar PosterImage = /*#__PURE__*/function (_ClickableComponent) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PosterImage, _ClickableComponent);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should attach to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function PosterImage(player, options) {\n    var _this;\n\n    _this = _ClickableComponent.call(this, player, options) || this;\n\n    _this.update();\n\n    _this.update_ = function (e) {\n      return _this.update(e);\n    };\n\n    player.on('posterchange', _this.update_);\n    return _this;\n  }\n  /**\n   * Clean up and dispose of the `PosterImage`.\n   */\n\n\n  var _proto = PosterImage.prototype;\n\n  _proto.dispose = function dispose() {\n    this.player().off('posterchange', this.update_);\n\n    _ClickableComponent.prototype.dispose.call(this);\n  }\n  /**\n   * Create the `PosterImage`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl$1() {\n    var el = createEl('div', {\n      className: 'vjs-poster',\n      // Don't want poster to be tabbable.\n      tabIndex: -1\n    });\n    return el;\n  }\n  /**\n   * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\n   *\n   * @listens Player#posterchange\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `Player#posterchange` event that triggered this function.\n   */\n  ;\n\n  _proto.update = function update(event) {\n    var url = this.player().poster();\n    this.setSrc(url); // If there's no poster source we should display:none on this component\n    // so it's not still clickable or right-clickable\n\n    if (url) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  /**\n   * Set the source of the `PosterImage` depending on the display method.\n   *\n   * @param {string} url\n   *        The URL to the source for the `PosterImage`.\n   */\n  ;\n\n  _proto.setSrc = function setSrc(url) {\n    var backgroundImage = ''; // Any falsy value should stay as an empty string, otherwise\n    // this will throw an extra error\n\n    if (url) {\n      backgroundImage = \"url(\\\"\" + url + \"\\\")\";\n    }\n\n    this.el_.style.backgroundImage = backgroundImage;\n  }\n  /**\n   * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\n   * {@link ClickableComponent#handleClick} for instances where this will be triggered.\n   *\n   * @listens tap\n   * @listens click\n   * @listens keydown\n   *\n   * @param {EventTarget~Event} event\n   +        The `click`, `tap` or `keydown` event that caused this function to be called.\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    // We don't want a click to trigger playback when controls are disabled\n    if (!this.player_.controls()) {\n      return;\n    }\n\n    var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\n\n    if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\n    // calling .focus() on the video element causes the video to go black,\n    // so we avoid it in that specific case\n    !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\n      this.player_.tech(true).focus();\n    }\n\n    if (this.player_.paused()) {\n      silencePromise(this.player_.play());\n    } else {\n      this.player_.pause();\n    }\n  };\n\n  return PosterImage;\n}(ClickableComponent);\n\nComponent$1.registerComponent('PosterImage', PosterImage);\n\nvar darkGray = '#222';\nvar lightGray = '#ccc';\nvar fontMap = {\n  monospace: 'monospace',\n  sansSerif: 'sans-serif',\n  serif: 'serif',\n  monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n  monospaceSerif: '\"Courier New\", monospace',\n  proportionalSansSerif: 'sans-serif',\n  proportionalSerif: 'serif',\n  casual: '\"Comic Sans MS\", Impact, fantasy',\n  script: '\"Monotype Corsiva\", cursive',\n  smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n/**\n * Construct an rgba color from a given hex color code.\n *\n * @param {number} color\n *        Hex number for color, like #f0e or #f604e2.\n *\n * @param {number} opacity\n *        Value for opacity, 0.0 - 1.0.\n *\n * @return {string}\n *         The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\n */\n\nfunction constructColor(color, opacity) {\n  var hex;\n\n  if (color.length === 4) {\n    // color looks like \"#f0e\"\n    hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\n  } else if (color.length === 7) {\n    // color looks like \"#f604e2\"\n    hex = color.slice(1);\n  } else {\n    throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\n  }\n\n  return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\n}\n/**\n * Try to update the style of a DOM element. Some style changes will throw an error,\n * particularly in IE8. Those should be noops.\n *\n * @param {Element} el\n *        The DOM element to be styled.\n *\n * @param {string} style\n *        The CSS property on the element that should be styled.\n *\n * @param {string} rule\n *        The style rule that should be applied to the property.\n *\n * @private\n */\n\nfunction tryUpdateStyle(el, style, rule) {\n  try {\n    el.style[style] = rule;\n  } catch (e) {\n    // Satisfies linter.\n    return;\n  }\n}\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\n\n\nvar TextTrackDisplay = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrackDisplay, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function to call when `TextTrackDisplay` is ready.\n   */\n  function TextTrackDisplay(player, options, ready) {\n    var _this;\n\n    _this = _Component.call(this, player, options, ready) || this;\n\n    var updateDisplayHandler = function updateDisplayHandler(e) {\n      return _this.updateDisplay(e);\n    };\n\n    player.on('loadstart', function (e) {\n      return _this.toggleDisplay(e);\n    });\n    player.on('texttrackchange', updateDisplayHandler);\n    player.on('loadedmetadata', function (e) {\n      return _this.preselectTrack(e);\n    }); // This used to be called during player init, but was causing an error\n    // if a track should show by default and the display hadn't loaded yet.\n    // Should probably be moved to an external track loader when we support\n    // tracks that don't need a display.\n\n    player.ready(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), function () {\n      if (player.tech_ && player.tech_.featuresNativeTextTracks) {\n        this.hide();\n        return;\n      }\n\n      player.on('fullscreenchange', updateDisplayHandler);\n      player.on('playerresize', updateDisplayHandler);\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('orientationchange', updateDisplayHandler);\n      player.on('dispose', function () {\n        return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('orientationchange', updateDisplayHandler);\n      });\n      var tracks = this.options_.playerOptions.tracks || [];\n\n      for (var i = 0; i < tracks.length; i++) {\n        this.player_.addRemoteTextTrack(tracks[i], true);\n      }\n\n      this.preselectTrack();\n    }));\n    return _this;\n  }\n  /**\n  * Preselect a track following this precedence:\n  * - matches the previously selected {@link TextTrack}'s language and kind\n  * - matches the previously selected {@link TextTrack}'s language only\n  * - is the first default captions track\n  * - is the first default descriptions track\n  *\n  * @listens Player#loadstart\n  */\n\n\n  var _proto = TextTrackDisplay.prototype;\n\n  _proto.preselectTrack = function preselectTrack() {\n    var modes = {\n      captions: 1,\n      subtitles: 1\n    };\n    var trackList = this.player_.textTracks();\n    var userPref = this.player_.cache_.selectedLanguage;\n    var firstDesc;\n    var firstCaptions;\n    var preferredTrack;\n\n    for (var i = 0; i < trackList.length; i++) {\n      var track = trackList[i];\n\n      if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\n        // Always choose the track that matches both language and kind\n        if (track.kind === userPref.kind) {\n          preferredTrack = track; // or choose the first track that matches language\n        } else if (!preferredTrack) {\n          preferredTrack = track;\n        } // clear everything if offTextTrackMenuItem was clicked\n\n      } else if (userPref && !userPref.enabled) {\n        preferredTrack = null;\n        firstDesc = null;\n        firstCaptions = null;\n      } else if (track[\"default\"]) {\n        if (track.kind === 'descriptions' && !firstDesc) {\n          firstDesc = track;\n        } else if (track.kind in modes && !firstCaptions) {\n          firstCaptions = track;\n        }\n      }\n    } // The preferredTrack matches the user preference and takes\n    // precedence over all the other tracks.\n    // So, display the preferredTrack before the first default track\n    // and the subtitles/captions track before the descriptions track\n\n\n    if (preferredTrack) {\n      preferredTrack.mode = 'showing';\n    } else if (firstCaptions) {\n      firstCaptions.mode = 'showing';\n    } else if (firstDesc) {\n      firstDesc.mode = 'showing';\n    }\n  }\n  /**\n   * Turn display of {@link TextTrack}'s from the current state into the other state.\n   * There are only two states:\n   * - 'shown'\n   * - 'hidden'\n   *\n   * @listens Player#loadstart\n   */\n  ;\n\n  _proto.toggleDisplay = function toggleDisplay() {\n    if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\n      this.hide();\n    } else {\n      this.show();\n    }\n  }\n  /**\n   * Create the {@link Component}'s DOM element.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-text-track-display'\n    }, {\n      'translate': 'yes',\n      'aria-live': 'off',\n      'aria-atomic': 'true'\n    });\n  }\n  /**\n   * Clear all displayed {@link TextTrack}s.\n   */\n  ;\n\n  _proto.clearDisplay = function clearDisplay() {\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT === 'function') {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, [], this.el_);\n    }\n  }\n  /**\n   * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\n   * a {@link Player#fullscreenchange} is fired.\n   *\n   * @listens Player#texttrackchange\n   * @listens Player#fullscreenchange\n   */\n  ;\n\n  _proto.updateDisplay = function updateDisplay() {\n    var tracks = this.player_.textTracks();\n    var allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n    this.clearDisplay();\n\n    if (allowMultipleShowingTracks) {\n      var showingTracks = [];\n\n      for (var _i = 0; _i < tracks.length; ++_i) {\n        var track = tracks[_i];\n\n        if (track.mode !== 'showing') {\n          continue;\n        }\n\n        showingTracks.push(track);\n      }\n\n      this.updateForTrack(showingTracks);\n      return;\n    } //  Track display prioritization model: if multiple tracks are 'showing',\n    //  display the first 'subtitles' or 'captions' track which is 'showing',\n    //  otherwise display the first 'descriptions' track which is 'showing'\n\n\n    var descriptionsTrack = null;\n    var captionsSubtitlesTrack = null;\n    var i = tracks.length;\n\n    while (i--) {\n      var _track = tracks[i];\n\n      if (_track.mode === 'showing') {\n        if (_track.kind === 'descriptions') {\n          descriptionsTrack = _track;\n        } else {\n          captionsSubtitlesTrack = _track;\n        }\n      }\n    }\n\n    if (captionsSubtitlesTrack) {\n      if (this.getAttribute('aria-live') !== 'off') {\n        this.setAttribute('aria-live', 'off');\n      }\n\n      this.updateForTrack(captionsSubtitlesTrack);\n    } else if (descriptionsTrack) {\n      if (this.getAttribute('aria-live') !== 'assertive') {\n        this.setAttribute('aria-live', 'assertive');\n      }\n\n      this.updateForTrack(descriptionsTrack);\n    }\n  }\n  /**\n   * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\n   *\n   * @param {TextTrack} track\n   *        Text track object containing active cues to style.\n   */\n  ;\n\n  _proto.updateDisplayState = function updateDisplayState(track) {\n    var overrides = this.player_.textTrackSettings.getValues();\n    var cues = track.activeCues;\n    var i = cues.length;\n\n    while (i--) {\n      var cue = cues[i];\n\n      if (!cue) {\n        continue;\n      }\n\n      var cueDiv = cue.displayState;\n\n      if (overrides.color) {\n        cueDiv.firstChild.style.color = overrides.color;\n      }\n\n      if (overrides.textOpacity) {\n        tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n      }\n\n      if (overrides.backgroundColor) {\n        cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n      }\n\n      if (overrides.backgroundOpacity) {\n        tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n      }\n\n      if (overrides.windowColor) {\n        if (overrides.windowOpacity) {\n          tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n        } else {\n          cueDiv.style.backgroundColor = overrides.windowColor;\n        }\n      }\n\n      if (overrides.edgeStyle) {\n        if (overrides.edgeStyle === 'dropshadow') {\n          cueDiv.firstChild.style.textShadow = \"2px 2px 3px \" + darkGray + \", 2px 2px 4px \" + darkGray + \", 2px 2px 5px \" + darkGray;\n        } else if (overrides.edgeStyle === 'raised') {\n          cueDiv.firstChild.style.textShadow = \"1px 1px \" + darkGray + \", 2px 2px \" + darkGray + \", 3px 3px \" + darkGray;\n        } else if (overrides.edgeStyle === 'depressed') {\n          cueDiv.firstChild.style.textShadow = \"1px 1px \" + lightGray + \", 0 1px \" + lightGray + \", -1px -1px \" + darkGray + \", 0 -1px \" + darkGray;\n        } else if (overrides.edgeStyle === 'uniform') {\n          cueDiv.firstChild.style.textShadow = \"0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray + \", 0 0 4px \" + darkGray;\n        }\n      }\n\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\n        var fontSize = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parseFloat(cueDiv.style.fontSize);\n        cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n        cueDiv.style.height = 'auto';\n        cueDiv.style.top = 'auto';\n      }\n\n      if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n        if (overrides.fontFamily === 'small-caps') {\n          cueDiv.firstChild.style.fontVariant = 'small-caps';\n        } else {\n          cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n        }\n      }\n    }\n  }\n  /**\n   * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\n   *\n   * @param {TextTrack|TextTrack[]} tracks\n   *        Text track object or text track array to be added to the list.\n   */\n  ;\n\n  _proto.updateForTrack = function updateForTrack(tracks) {\n    if (!Array.isArray(tracks)) {\n      tracks = [tracks];\n    }\n\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' || tracks.every(function (track) {\n      return !track.activeCues;\n    })) {\n      return;\n    }\n\n    var cues = []; // push all active track cues\n\n    for (var i = 0; i < tracks.length; ++i) {\n      var track = tracks[i];\n\n      for (var j = 0; j < track.activeCues.length; ++j) {\n        cues.push(track.activeCues[j]);\n      }\n    } // removes all cues before it processes new ones\n\n\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, cues, this.el_); // add unique class to each language text track & add settings styling if necessary\n\n    for (var _i2 = 0; _i2 < tracks.length; ++_i2) {\n      var _track2 = tracks[_i2];\n\n      for (var _j = 0; _j < _track2.activeCues.length; ++_j) {\n        var cueEl = _track2.activeCues[_j].displayState;\n        addClass(cueEl, 'vjs-text-track-cue');\n        addClass(cueEl, 'vjs-text-track-cue-' + (_track2.language ? _track2.language : _i2));\n\n        if (_track2.language) {\n          setAttribute(cueEl, 'lang', _track2.language);\n        }\n      }\n\n      if (this.player_.textTrackSettings) {\n        this.updateDisplayState(_track2);\n      }\n    }\n  };\n\n  return TextTrackDisplay;\n}(Component$1);\n\nComponent$1.registerComponent('TextTrackDisplay', TextTrackDisplay);\n\n/**\n * A loading spinner for use during waiting/loading events.\n *\n * @extends Component\n */\n\nvar LoadingSpinner = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(LoadingSpinner, _Component);\n\n  function LoadingSpinner() {\n    return _Component.apply(this, arguments) || this;\n  }\n\n  var _proto = LoadingSpinner.prototype;\n\n  /**\n   * Create the `LoadingSpinner`s DOM element.\n   *\n   * @return {Element}\n   *         The dom element that gets created.\n   */\n  _proto.createEl = function createEl$1() {\n    var isAudio = this.player_.isAudio();\n    var playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n    var controlText = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize('{1} is loading.', [playerType])\n    });\n\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-loading-spinner',\n      dir: 'ltr'\n    });\n\n    el.appendChild(controlText);\n    return el;\n  };\n\n  return LoadingSpinner;\n}(Component$1);\n\nComponent$1.registerComponent('LoadingSpinner', LoadingSpinner);\n\n/**\n * Base class for all buttons.\n *\n * @extends ClickableComponent\n */\n\nvar Button = /*#__PURE__*/function (_ClickableComponent) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Button, _ClickableComponent);\n\n  function Button() {\n    return _ClickableComponent.apply(this, arguments) || this;\n  }\n\n  var _proto = Button.prototype;\n\n  /**\n   * Create the `Button`s DOM element.\n   *\n   * @param {string} [tag=\"button\"]\n   *        The element's node type. This argument is IGNORED: no matter what\n   *        is passed, it will always create a `button` element.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element.\n   *\n   * @param {Object} [attributes={}]\n   *        An object of attributes that should be set on the element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  _proto.createEl = function createEl$1(tag, props, attributes) {\n    if (props === void 0) {\n      props = {};\n    }\n\n    if (attributes === void 0) {\n      attributes = {};\n    }\n\n    tag = 'button';\n    props = assign({\n      className: this.buildCSSClass()\n    }, props); // Add attributes for button element\n\n    attributes = assign({\n      // Necessary since the default button type is \"submit\"\n      type: 'button'\n    }, attributes);\n\n    var el = createEl(tag, props, attributes);\n\n    el.appendChild(createEl('span', {\n      className: 'vjs-icon-placeholder'\n    }, {\n      'aria-hidden': true\n    }));\n    this.createControlTextEl(el);\n    return el;\n  }\n  /**\n   * Add a child `Component` inside of this `Button`.\n   *\n   * @param {string|Component} child\n   *        The name or instance of a child to add.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of options that will get passed to children of\n   *        the child.\n   *\n   * @return {Component}\n   *         The `Component` that gets added as a child. When using a string the\n   *         `Component` will get created by this process.\n   *\n   * @deprecated since version 5\n   */\n  ;\n\n  _proto.addChild = function addChild(child, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    var className = this.constructor.name;\n    log$1.warn(\"Adding an actionable (user controllable) child to a Button (\" + className + \") is not supported; use a ClickableComponent instead.\"); // Avoid the error message generated by ClickableComponent's addChild method\n\n    return Component$1.prototype.addChild.call(this, child, options);\n  }\n  /**\n   * Enable the `Button` element so that it can be activated or clicked. Use this with\n   * {@link Button#disable}.\n   */\n  ;\n\n  _proto.enable = function enable() {\n    _ClickableComponent.prototype.enable.call(this);\n\n    this.el_.removeAttribute('disabled');\n  }\n  /**\n   * Disable the `Button` element so that it cannot be activated or clicked. Use this with\n   * {@link Button#enable}.\n   */\n  ;\n\n  _proto.disable = function disable() {\n    _ClickableComponent.prototype.disable.call(this);\n\n    this.el_.setAttribute('disabled', 'disabled');\n  }\n  /**\n   * This gets called when a `Button` has focus and `keydown` is triggered via a key\n   * press.\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to get called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Ignore Space or Enter key operation, which is handled by the browser for\n    // a button - though not for its super class, ClickableComponent. Also,\n    // prevent the event from propagating through the DOM and triggering Player\n    // hotkeys. We do not preventDefault here because we _want_ the browser to\n    // handle it.\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Enter')) {\n      event.stopPropagation();\n      return;\n    } // Pass keypress handling up for unsupported keys\n\n\n    _ClickableComponent.prototype.handleKeyDown.call(this, event);\n  };\n\n  return Button;\n}(ClickableComponent);\n\nComponent$1.registerComponent('Button', Button);\n\n/**\n * The initial play button that shows before the video has played. The hiding of the\n * `BigPlayButton` get done via CSS and `Player` states.\n *\n * @extends Button\n */\n\nvar BigPlayButton = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(BigPlayButton, _Button);\n\n  function BigPlayButton(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this;\n    _this.mouseused_ = false;\n\n    _this.on('mousedown', function (e) {\n      return _this.handleMouseDown(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.\n   */\n\n\n  var _proto = BigPlayButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return 'vjs-big-play-button';\n  }\n  /**\n   * This gets called when a `BigPlayButton` \"clicked\". See {@link ClickableComponent}\n   * for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    var playPromise = this.player_.play(); // exit early if clicked via the mouse\n\n    if (this.mouseused_ && event.clientX && event.clientY) {\n      var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\n      silencePromise(playPromise);\n\n      if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\n      // calling .focus() on the video element causes the video to go black,\n      // so we avoid it in that specific case\n      !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\n        this.player_.tech(true).focus();\n      }\n\n      return;\n    }\n\n    var cb = this.player_.getChild('controlBar');\n    var playToggle = cb && cb.getChild('playToggle');\n\n    if (!playToggle) {\n      this.player_.tech(true).focus();\n      return;\n    }\n\n    var playFocus = function playFocus() {\n      return playToggle.focus();\n    };\n\n    if (isPromise(playPromise)) {\n      playPromise.then(playFocus, function () {});\n    } else {\n      this.setTimeout(playFocus, 1);\n    }\n  };\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    this.mouseused_ = false;\n\n    _Button.prototype.handleKeyDown.call(this, event);\n  };\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    this.mouseused_ = true;\n  };\n\n  return BigPlayButton;\n}(Button);\n/**\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n */\n\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\nComponent$1.registerComponent('BigPlayButton', BigPlayButton);\n\n/**\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n * it gets clicked.\n *\n * @extends Button\n */\n\nvar CloseButton = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(CloseButton, _Button);\n\n  /**\n  * Creates an instance of the this class.\n  *\n  * @param  {Player} player\n  *         The `Player` that this class should be attached to.\n  *\n  * @param  {Object} [options]\n  *         The key/value store of player options.\n  */\n  function CloseButton(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this;\n\n    _this.controlText(options && options.controlText || _this.localize('Close'));\n\n    return _this;\n  }\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n\n\n  var _proto = CloseButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-close-button \" + _Button.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * This gets called when a `CloseButton` gets clicked. See\n   * {@link ClickableComponent#handleClick} for more information on when\n   * this will be triggered\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   * @fires CloseButton#close\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    /**\n     * Triggered when the a `CloseButton` is clicked.\n     *\n     * @event CloseButton#close\n     * @type {EventTarget~Event}\n     *\n     * @property {boolean} [bubbles=false]\n     *           set to false so that the close event does not\n     *           bubble up to parents if there is no listener\n     */\n    this.trigger({\n      type: 'close',\n      bubbles: false\n    });\n  }\n  /**\n   * Event handler that is called when a `CloseButton` receives a\n   * `keydown` event.\n   *\n   * By default, if the key is Esc, it will trigger a `click` event.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Esc button will trigger `click` event\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      _Button.prototype.handleKeyDown.call(this, event);\n    }\n  };\n\n  return CloseButton;\n}(Button);\n\nComponent$1.registerComponent('CloseButton', CloseButton);\n\n/**\n * Button to toggle between play and pause.\n *\n * @extends Button\n */\n\nvar PlayToggle = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PlayToggle, _Button);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function PlayToggle(player, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _Button.call(this, player, options) || this; // show or hide replay icon\n\n    options.replay = options.replay === undefined || options.replay;\n\n    _this.on(player, 'play', function (e) {\n      return _this.handlePlay(e);\n    });\n\n    _this.on(player, 'pause', function (e) {\n      return _this.handlePause(e);\n    });\n\n    if (options.replay) {\n      _this.on(player, 'ended', function (e) {\n        return _this.handleEnded(e);\n      });\n    }\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = PlayToggle.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-play-control \" + _Button.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * This gets called when an `PlayToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    if (this.player_.paused()) {\n      silencePromise(this.player_.play());\n    } else {\n      this.player_.pause();\n    }\n  }\n  /**\n   * This gets called once after the video has ended and the user seeks so that\n   * we can change the replay button back to a play button.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#seeked\n   */\n  ;\n\n  _proto.handleSeeked = function handleSeeked(event) {\n    this.removeClass('vjs-ended');\n\n    if (this.player_.paused()) {\n      this.handlePause(event);\n    } else {\n      this.handlePlay(event);\n    }\n  }\n  /**\n   * Add the vjs-playing class to the element so it can change appearance.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#play\n   */\n  ;\n\n  _proto.handlePlay = function handlePlay(event) {\n    this.removeClass('vjs-ended');\n    this.removeClass('vjs-paused');\n    this.addClass('vjs-playing'); // change the button text to \"Pause\"\n\n    this.controlText('Pause');\n  }\n  /**\n   * Add the vjs-paused class to the element so it can change appearance.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#pause\n   */\n  ;\n\n  _proto.handlePause = function handlePause(event) {\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused'); // change the button text to \"Play\"\n\n    this.controlText('Play');\n  }\n  /**\n   * Add the vjs-ended class to the element so it can change appearance\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#ended\n   */\n  ;\n\n  _proto.handleEnded = function handleEnded(event) {\n    var _this2 = this;\n\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-ended'); // change the button text to \"Replay\"\n\n    this.controlText('Replay'); // on the next seek remove the replay button\n\n    this.one(this.player_, 'seeked', function (e) {\n      return _this2.handleSeeked(e);\n    });\n  };\n\n  return PlayToggle;\n}(Button);\n/**\n * The text that should display over the `PlayToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlayToggle.prototype.controlText_ = 'Play';\nComponent$1.registerComponent('PlayToggle', PlayToggle);\n\n/**\n * @file format-time.js\n * @module format-time\n */\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\n * seconds) will force a number of leading zeros to cover the length of the\n * guide.\n *\n * @private\n * @param  {number} seconds\n *         Number of seconds to be turned into a string\n *\n * @param  {number} guide\n *         Number (in seconds) to model the string after\n *\n * @return {string}\n *         Time formatted as H:MM:SS or M:SS\n */\nvar defaultImplementation = function defaultImplementation(seconds, guide) {\n  seconds = seconds < 0 ? 0 : seconds;\n  var s = Math.floor(seconds % 60);\n  var m = Math.floor(seconds / 60 % 60);\n  var h = Math.floor(seconds / 3600);\n  var gm = Math.floor(guide / 60 % 60);\n  var gh = Math.floor(guide / 3600); // handle invalid times\n\n  if (isNaN(seconds) || seconds === Infinity) {\n    // '-' is false for all relational operators (e.g. <, >=) so this setting\n    // will add the minimum number of fields specified by the guide\n    h = m = s = '-';\n  } // Check if we need to show hours\n\n\n  h = h > 0 || gh > 0 ? h + ':' : ''; // If hours are showing, we may need to add a leading zero.\n  // Always show at least one digit of minutes.\n\n  m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; // Check if leading zero is need for seconds\n\n  s = s < 10 ? '0' + s : s;\n  return h + m + s;\n}; // Internal pointer to the current implementation.\n\n\nvar implementation = defaultImplementation;\n/**\n * Replaces the default formatTime implementation with a custom implementation.\n *\n * @param {Function} customImplementation\n *        A function which will be used in place of the default formatTime\n *        implementation. Will receive the current time in seconds and the\n *        guide (in seconds) as arguments.\n */\n\nfunction setFormatTime(customImplementation) {\n  implementation = customImplementation;\n}\n/**\n * Resets formatTime to the default implementation.\n */\n\nfunction resetFormatTime() {\n  implementation = defaultImplementation;\n}\n/**\n * Delegates to either the default time formatting function or a custom\n * function supplied via `setFormatTime`.\n *\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\n * guide (in seconds) will force a number of leading zeros to cover the\n * length of the guide.\n *\n * @static\n * @example  formatTime(125, 600) === \"02:05\"\n * @param    {number} seconds\n *           Number of seconds to be turned into a string\n *\n * @param    {number} guide\n *           Number (in seconds) to model the string after\n *\n * @return   {string}\n *           Time formatted as H:MM:SS or M:SS\n */\n\nfunction formatTime(seconds, guide) {\n  if (guide === void 0) {\n    guide = seconds;\n  }\n\n  return implementation(seconds, guide);\n}\n\n/**\n * Displays time information about the video\n *\n * @extends Component\n */\n\nvar TimeDisplay = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TimeDisplay, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function TimeDisplay(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    _this.on(player, ['timeupdate', 'ended'], function (e) {\n      return _this.updateContent(e);\n    });\n\n    _this.updateTextNode_();\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = TimeDisplay.prototype;\n\n  _proto.createEl = function createEl$1() {\n    var className = this.buildCSSClass();\n\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: className + \" vjs-time-control vjs-control\"\n    });\n\n    var span = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize(this.labelText_) + \"\\xA0\"\n    }, {\n      role: 'presentation'\n    });\n    el.appendChild(span);\n    this.contentEl_ = createEl('span', {\n      className: className + \"-display\"\n    }, {\n      // tell screen readers not to automatically read the time as it changes\n      'aria-live': 'off',\n      // span elements have no implicit role, but some screen readers (notably VoiceOver)\n      // treat them as a break between items in the DOM when using arrow keys\n      // (or left-to-right swipes on iOS) to read contents of a page. Using\n      // role='presentation' causes VoiceOver to NOT treat this span as a break.\n      'role': 'presentation'\n    });\n    el.appendChild(this.contentEl_);\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    this.contentEl_ = null;\n    this.textNode_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Updates the time display text node with a new time\n   *\n   * @param {number} [time=0] the time to update to\n   *\n   * @private\n   */\n  ;\n\n  _proto.updateTextNode_ = function updateTextNode_(time) {\n    var _this2 = this;\n\n    if (time === void 0) {\n      time = 0;\n    }\n\n    time = formatTime(time);\n\n    if (this.formattedTime_ === time) {\n      return;\n    }\n\n    this.formattedTime_ = time;\n    this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', function () {\n      if (!_this2.contentEl_) {\n        return;\n      }\n\n      var oldNode = _this2.textNode_;\n\n      if (oldNode && _this2.contentEl_.firstChild !== oldNode) {\n        oldNode = null;\n        log$1.warn('TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.');\n      }\n\n      _this2.textNode_ = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(_this2.formattedTime_);\n\n      if (!_this2.textNode_) {\n        return;\n      }\n\n      if (oldNode) {\n        _this2.contentEl_.replaceChild(_this2.textNode_, oldNode);\n      } else {\n        _this2.contentEl_.appendChild(_this2.textNode_);\n      }\n    });\n  }\n  /**\n   * To be filled out in the child class, should update the displayed time\n   * in accordance with the fact that the current time has changed.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `timeupdate`  event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   */\n  ;\n\n  _proto.updateContent = function updateContent(event) {};\n\n  return TimeDisplay;\n}(Component$1);\n/**\n * The text that is added to the `TimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nTimeDisplay.prototype.labelText_ = 'Time';\n/**\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nTimeDisplay.prototype.controlText_ = 'Time';\nComponent$1.registerComponent('TimeDisplay', TimeDisplay);\n\n/**\n * Displays the current time\n *\n * @extends Component\n */\n\nvar CurrentTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(CurrentTimeDisplay, _TimeDisplay);\n\n  function CurrentTimeDisplay() {\n    return _TimeDisplay.apply(this, arguments) || this;\n  }\n\n  var _proto = CurrentTimeDisplay.prototype;\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  _proto.buildCSSClass = function buildCSSClass() {\n    return 'vjs-current-time';\n  }\n  /**\n   * Update current time display\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `timeupdate` event that caused this function to run.\n   *\n   * @listens Player#timeupdate\n   */\n  ;\n\n  _proto.updateContent = function updateContent(event) {\n    // Allows for smooth scrubbing, when player can't keep up.\n    var time;\n\n    if (this.player_.ended()) {\n      time = this.player_.duration();\n    } else {\n      time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    }\n\n    this.updateTextNode_(time);\n  };\n\n  return CurrentTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\n/**\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\nComponent$1.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\n\n/**\n * Displays the duration\n *\n * @extends Component\n */\n\nvar DurationDisplay = /*#__PURE__*/function (_TimeDisplay) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(DurationDisplay, _TimeDisplay);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function DurationDisplay(player, options) {\n    var _this;\n\n    _this = _TimeDisplay.call(this, player, options) || this;\n\n    var updateContent = function updateContent(e) {\n      return _this.updateContent(e);\n    }; // we do not want to/need to throttle duration changes,\n    // as they should always display the changed duration as\n    // it has changed\n\n\n    _this.on(player, 'durationchange', updateContent); // Listen to loadstart because the player duration is reset when a new media element is loaded,\n    // but the durationchange on the user agent will not fire.\n    // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n\n    _this.on(player, 'loadstart', updateContent); // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\n    // listeners could have broken dependent applications/libraries. These\n    // can likely be removed for 7.0.\n\n\n    _this.on(player, 'loadedmetadata', updateContent);\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = DurationDisplay.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return 'vjs-duration';\n  }\n  /**\n   * Update duration time display.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\n   *        this function to be called.\n   *\n   * @listens Player#durationchange\n   * @listens Player#timeupdate\n   * @listens Player#loadedmetadata\n   */\n  ;\n\n  _proto.updateContent = function updateContent(event) {\n    var duration = this.player_.duration();\n    this.updateTextNode_(duration);\n  };\n\n  return DurationDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `DurationDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nDurationDisplay.prototype.labelText_ = 'Duration';\n/**\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nDurationDisplay.prototype.controlText_ = 'Duration';\nComponent$1.registerComponent('DurationDisplay', DurationDisplay);\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @extends Component\n */\n\nvar TimeDivider = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TimeDivider, _Component);\n\n  function TimeDivider() {\n    return _Component.apply(this, arguments) || this;\n  }\n\n  var _proto = TimeDivider.prototype;\n\n  /**\n   * Create the component's DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  _proto.createEl = function createEl() {\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-time-control vjs-time-divider'\n    }, {\n      // this element and its contents can be hidden from assistive techs since\n      // it is made extraneous by the announcement of the control text\n      // for the current time and duration displays\n      'aria-hidden': true\n    });\n\n    var div = _Component.prototype.createEl.call(this, 'div');\n\n    var span = _Component.prototype.createEl.call(this, 'span', {\n      textContent: '/'\n    });\n\n    div.appendChild(span);\n    el.appendChild(div);\n    return el;\n  };\n\n  return TimeDivider;\n}(Component$1);\n\nComponent$1.registerComponent('TimeDivider', TimeDivider);\n\n/**\n * Displays the time left in the video\n *\n * @extends Component\n */\n\nvar RemainingTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(RemainingTimeDisplay, _TimeDisplay);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function RemainingTimeDisplay(player, options) {\n    var _this;\n\n    _this = _TimeDisplay.call(this, player, options) || this;\n\n    _this.on(player, 'durationchange', function (e) {\n      return _this.updateContent(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = RemainingTimeDisplay.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return 'vjs-remaining-time';\n  }\n  /**\n   * Create the `Component`'s DOM element with the \"minus\" characted prepend to the time\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl$1() {\n    var el = _TimeDisplay.prototype.createEl.call(this);\n\n    if (this.options_.displayNegative !== false) {\n      el.insertBefore(createEl('span', {}, {\n        'aria-hidden': true\n      }, '-'), this.contentEl_);\n    }\n\n    return el;\n  }\n  /**\n   * Update remaining time display.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `timeupdate` or `durationchange` event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   * @listens Player#durationchange\n   */\n  ;\n\n  _proto.updateContent = function updateContent(event) {\n    if (typeof this.player_.duration() !== 'number') {\n      return;\n    }\n\n    var time; // @deprecated We should only use remainingTimeDisplay\n    // as of video.js 7\n\n    if (this.player_.ended()) {\n      time = 0;\n    } else if (this.player_.remainingTimeDisplay) {\n      time = this.player_.remainingTimeDisplay();\n    } else {\n      time = this.player_.remainingTime();\n    }\n\n    this.updateTextNode_(time);\n  };\n\n  return RemainingTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\n\n\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\n/**\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @private\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\n\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\nComponent$1.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\n\nvar LiveDisplay = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(LiveDisplay, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function LiveDisplay(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    _this.updateShowing();\n\n    _this.on(_this.player(), 'durationchange', function (e) {\n      return _this.updateShowing(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = LiveDisplay.prototype;\n\n  _proto.createEl = function createEl$1() {\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-live-control vjs-control'\n    });\n\n    this.contentEl_ = createEl('div', {\n      className: 'vjs-live-display'\n    }, {\n      'aria-live': 'off'\n    });\n    this.contentEl_.appendChild(createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize('Stream Type') + \"\\xA0\"\n    }));\n    this.contentEl_.appendChild(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(this.localize('LIVE')));\n    el.appendChild(this.contentEl_);\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    this.contentEl_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\n   * it accordingly\n   *\n   * @param {EventTarget~Event} [event]\n   *        The {@link Player#durationchange} event that caused this function to run.\n   *\n   * @listens Player#durationchange\n   */\n  ;\n\n  _proto.updateShowing = function updateShowing(event) {\n    if (this.player().duration() === Infinity) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  };\n\n  return LiveDisplay;\n}(Component$1);\n\nComponent$1.registerComponent('LiveDisplay', LiveDisplay);\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\n\nvar SeekToLive = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SeekToLive, _Button);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function SeekToLive(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this;\n\n    _this.updateLiveEdgeStatus();\n\n    if (_this.player_.liveTracker) {\n      _this.updateLiveEdgeStatusHandler_ = function (e) {\n        return _this.updateLiveEdgeStatus(e);\n      };\n\n      _this.on(_this.player_.liveTracker, 'liveedgechange', _this.updateLiveEdgeStatusHandler_);\n    }\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = SeekToLive.prototype;\n\n  _proto.createEl = function createEl$1() {\n    var el = _Button.prototype.createEl.call(this, 'button', {\n      className: 'vjs-seek-to-live-control vjs-control'\n    });\n\n    this.textEl_ = createEl('span', {\n      className: 'vjs-seek-to-live-text',\n      textContent: this.localize('LIVE')\n    }, {\n      'aria-hidden': 'true'\n    });\n    el.appendChild(this.textEl_);\n    return el;\n  }\n  /**\n   * Update the state of this button if we are at the live edge\n   * or not\n   */\n  ;\n\n  _proto.updateLiveEdgeStatus = function updateLiveEdgeStatus() {\n    // default to live edge\n    if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\n      this.setAttribute('aria-disabled', true);\n      this.addClass('vjs-at-live-edge');\n      this.controlText('Seek to live, currently playing live');\n    } else {\n      this.setAttribute('aria-disabled', false);\n      this.removeClass('vjs-at-live-edge');\n      this.controlText('Seek to live, currently behind live');\n    }\n  }\n  /**\n   * On click bring us as near to the live point as possible.\n   * This requires that we wait for the next `live-seekable-change`\n   * event which will happen every segment length seconds.\n   */\n  ;\n\n  _proto.handleClick = function handleClick() {\n    this.player_.liveTracker.seekToLiveEdge();\n  }\n  /**\n   * Dispose of the element and stop tracking\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n\n    this.textEl_ = null;\n\n    _Button.prototype.dispose.call(this);\n  };\n\n  return SeekToLive;\n}(Button);\n\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\nComponent$1.registerComponent('SeekToLive', SeekToLive);\n\n/**\n * Keep a number between a min and a max value\n *\n * @param {number} number\n *        The number to clamp\n *\n * @param {number} min\n *        The minimum value\n * @param {number} max\n *        The maximum value\n *\n * @return {number}\n *         the clamped number\n */\nvar clamp = function clamp(number, min, max) {\n  number = Number(number);\n  return Math.min(max, Math.max(min, isNaN(number) ? min : number));\n};\n\n/**\n * The base functionality for a slider. Can be vertical or horizontal.\n * For instance the volume bar or the seek bar on a video is a slider.\n *\n * @extends Component\n */\n\nvar Slider = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Slider, _Component);\n\n  /**\n  * Create an instance of this class\n  *\n  * @param {Player} player\n  *        The `Player` that this class should be attached to.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  */\n  function Slider(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    _this.handleMouseDown_ = function (e) {\n      return _this.handleMouseDown(e);\n    };\n\n    _this.handleMouseUp_ = function (e) {\n      return _this.handleMouseUp(e);\n    };\n\n    _this.handleKeyDown_ = function (e) {\n      return _this.handleKeyDown(e);\n    };\n\n    _this.handleClick_ = function (e) {\n      return _this.handleClick(e);\n    };\n\n    _this.handleMouseMove_ = function (e) {\n      return _this.handleMouseMove(e);\n    };\n\n    _this.update_ = function (e) {\n      return _this.update(e);\n    }; // Set property names to bar to match with the child Slider class is looking for\n\n\n    _this.bar = _this.getChild(_this.options_.barName); // Set a horizontal or vertical class on the slider depending on the slider type\n\n    _this.vertical(!!_this.options_.vertical);\n\n    _this.enable();\n\n    return _this;\n  }\n  /**\n   * Are controls are currently enabled for this slider or not.\n   *\n   * @return {boolean}\n   *         true if controls are enabled, false otherwise\n   */\n\n\n  var _proto = Slider.prototype;\n\n  _proto.enabled = function enabled() {\n    return this.enabled_;\n  }\n  /**\n   * Enable controls for this slider if they are disabled\n   */\n  ;\n\n  _proto.enable = function enable() {\n    if (this.enabled()) {\n      return;\n    }\n\n    this.on('mousedown', this.handleMouseDown_);\n    this.on('touchstart', this.handleMouseDown_);\n    this.on('keydown', this.handleKeyDown_);\n    this.on('click', this.handleClick_); // TODO: deprecated, controlsvisible does not seem to be fired\n\n    this.on(this.player_, 'controlsvisible', this.update);\n\n    if (this.playerEvent) {\n      this.on(this.player_, this.playerEvent, this.update);\n    }\n\n    this.removeClass('disabled');\n    this.setAttribute('tabindex', 0);\n    this.enabled_ = true;\n  }\n  /**\n   * Disable controls for this slider if they are enabled\n   */\n  ;\n\n  _proto.disable = function disable() {\n    if (!this.enabled()) {\n      return;\n    }\n\n    var doc = this.bar.el_.ownerDocument;\n    this.off('mousedown', this.handleMouseDown_);\n    this.off('touchstart', this.handleMouseDown_);\n    this.off('keydown', this.handleKeyDown_);\n    this.off('click', this.handleClick_);\n    this.off(this.player_, 'controlsvisible', this.update_);\n    this.off(doc, 'mousemove', this.handleMouseMove_);\n    this.off(doc, 'mouseup', this.handleMouseUp_);\n    this.off(doc, 'touchmove', this.handleMouseMove_);\n    this.off(doc, 'touchend', this.handleMouseUp_);\n    this.removeAttribute('tabindex');\n    this.addClass('disabled');\n\n    if (this.playerEvent) {\n      this.off(this.player_, this.playerEvent, this.update);\n    }\n\n    this.enabled_ = false;\n  }\n  /**\n   * Create the `Slider`s DOM element.\n   *\n   * @param {string} type\n   *        Type of element to create.\n   *\n   * @param {Object} [props={}]\n   *        List of properties in Object form.\n   *\n   * @param {Object} [attributes={}]\n   *        list of attributes in Object form.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl(type, props, attributes) {\n    if (props === void 0) {\n      props = {};\n    }\n\n    if (attributes === void 0) {\n      attributes = {};\n    }\n\n    // Add the slider element class to all sub classes\n    props.className = props.className + ' vjs-slider';\n    props = assign({\n      tabIndex: 0\n    }, props);\n    attributes = assign({\n      'role': 'slider',\n      'aria-valuenow': 0,\n      'aria-valuemin': 0,\n      'aria-valuemax': 100,\n      'tabIndex': 0\n    }, attributes);\n    return _Component.prototype.createEl.call(this, type, props, attributes);\n  }\n  /**\n   * Handle `mousedown` or `touchstart` events on the `Slider`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   * @fires Slider#slideractive\n   */\n  ;\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    var doc = this.bar.el_.ownerDocument;\n\n    if (event.type === 'mousedown') {\n      event.preventDefault();\n    } // Do not call preventDefault() on touchstart in Chrome\n    // to avoid console warnings. Use a 'touch-action: none' style\n    // instead to prevent unintented scrolling.\n    // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n\n    if (event.type === 'touchstart' && !IS_CHROME) {\n      event.preventDefault();\n    }\n\n    blockTextSelection();\n    this.addClass('vjs-sliding');\n    /**\n     * Triggered when the slider is in an active state\n     *\n     * @event Slider#slideractive\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('slideractive');\n    this.on(doc, 'mousemove', this.handleMouseMove_);\n    this.on(doc, 'mouseup', this.handleMouseUp_);\n    this.on(doc, 'touchmove', this.handleMouseMove_);\n    this.on(doc, 'touchend', this.handleMouseUp_);\n    this.handleMouseMove(event, true);\n  }\n  /**\n   * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\n   * The `mousemove` and `touchmove` events will only only trigger this function during\n   * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\n   * {@link Slider#handleMouseUp}.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\n   *        this function\n   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false.\n   *\n   * @listens mousemove\n   * @listens touchmove\n   */\n  ;\n\n  _proto.handleMouseMove = function handleMouseMove(event) {}\n  /**\n   * Handle `mouseup` or `touchend` events on the `Slider`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   * @fires Slider#sliderinactive\n   */\n  ;\n\n  _proto.handleMouseUp = function handleMouseUp() {\n    var doc = this.bar.el_.ownerDocument;\n    unblockTextSelection();\n    this.removeClass('vjs-sliding');\n    /**\n     * Triggered when the slider is no longer in an active state.\n     *\n     * @event Slider#sliderinactive\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('sliderinactive');\n    this.off(doc, 'mousemove', this.handleMouseMove_);\n    this.off(doc, 'mouseup', this.handleMouseUp_);\n    this.off(doc, 'touchmove', this.handleMouseMove_);\n    this.off(doc, 'touchend', this.handleMouseUp_);\n    this.update();\n  }\n  /**\n   * Update the progress bar of the `Slider`.\n   *\n   * @return {number}\n   *          The percentage of progress the progress bar represents as a\n   *          number from 0 to 1.\n   */\n  ;\n\n  _proto.update = function update() {\n    var _this2 = this;\n\n    // In VolumeBar init we have a setTimeout for update that pops and update\n    // to the end of the execution stack. The player is destroyed before then\n    // update will cause an error\n    // If there's no bar...\n    if (!this.el_ || !this.bar) {\n      return;\n    } // clamp progress between 0 and 1\n    // and only round to four decimal places, as we round to two below\n\n\n    var progress = this.getProgress();\n\n    if (progress === this.progress_) {\n      return progress;\n    }\n\n    this.progress_ = progress;\n    this.requestNamedAnimationFrame('Slider#update', function () {\n      // Set the new bar width or height\n      var sizeKey = _this2.vertical() ? 'height' : 'width'; // Convert to a percentage for css value\n\n      _this2.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\n    });\n    return progress;\n  }\n  /**\n   * Get the percentage of the bar that should be filled\n   * but clamped and rounded.\n   *\n   * @return {number}\n   *         percentage filled that the slider is\n   */\n  ;\n\n  _proto.getProgress = function getProgress() {\n    return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\n  }\n  /**\n   * Calculate distance for slider\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to run.\n   *\n   * @return {number}\n   *         The current position of the Slider.\n   *         - position.x for vertical `Slider`s\n   *         - position.y for horizontal `Slider`s\n   */\n  ;\n\n  _proto.calculateDistance = function calculateDistance(event) {\n    var position = getPointerPosition(this.el_, event);\n\n    if (this.vertical()) {\n      return position.y;\n    }\n\n    return position.x;\n  }\n  /**\n   * Handle a `keydown` event on the `Slider`. Watches for left, rigth, up, and down\n   * arrow keys. This function will only be called when the slider has focus. See\n   * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\n   *\n   * @param {EventTarget~Event} event\n   *        the `keydown` event that caused this function to run.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Left and Down Arrows\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Down')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack(); // Up and Right Arrows\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Up')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n    } else {\n      // Pass keydown handling up for unsupported keys\n      _Component.prototype.handleKeyDown.call(this, event);\n    }\n  }\n  /**\n   * Listener for click events on slider, used to prevent clicks\n   *   from bubbling up to parent elements like button menus.\n   *\n   * @param {Object} event\n   *        Event that caused this object to run\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    event.stopPropagation();\n    event.preventDefault();\n  }\n  /**\n   * Get/set if slider is horizontal for vertical\n   *\n   * @param {boolean} [bool]\n   *        - true if slider is vertical,\n   *        - false is horizontal\n   *\n   * @return {boolean}\n   *         - true if slider is vertical, and getting\n   *         - false if the slider is horizontal, and getting\n   */\n  ;\n\n  _proto.vertical = function vertical(bool) {\n    if (bool === undefined) {\n      return this.vertical_ || false;\n    }\n\n    this.vertical_ = !!bool;\n\n    if (this.vertical_) {\n      this.addClass('vjs-slider-vertical');\n    } else {\n      this.addClass('vjs-slider-horizontal');\n    }\n  };\n\n  return Slider;\n}(Component$1);\n\nComponent$1.registerComponent('Slider', Slider);\n\nvar percentify = function percentify(time, end) {\n  return clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n};\n/**\n * Shows loading progress\n *\n * @extends Component\n */\n\n\nvar LoadProgressBar = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(LoadProgressBar, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function LoadProgressBar(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.partEls_ = [];\n\n    _this.on(player, 'progress', function (e) {\n      return _this.update(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = LoadProgressBar.prototype;\n\n  _proto.createEl = function createEl$1() {\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-load-progress'\n    });\n\n    var wrapper = createEl('span', {\n      className: 'vjs-control-text'\n    });\n    var loadedText = createEl('span', {\n      textContent: this.localize('Loaded')\n    });\n    var separator = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(': ');\n    this.percentageEl_ = createEl('span', {\n      className: 'vjs-control-text-loaded-percentage',\n      textContent: '0%'\n    });\n    el.appendChild(wrapper);\n    wrapper.appendChild(loadedText);\n    wrapper.appendChild(separator);\n    wrapper.appendChild(this.percentageEl_);\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    this.partEls_ = null;\n    this.percentageEl_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Update progress bar\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `progress` event that caused this function to run.\n   *\n   * @listens Player#progress\n   */\n  ;\n\n  _proto.update = function update(event) {\n    var _this2 = this;\n\n    this.requestNamedAnimationFrame('LoadProgressBar#update', function () {\n      var liveTracker = _this2.player_.liveTracker;\n\n      var buffered = _this2.player_.buffered();\n\n      var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : _this2.player_.duration();\n\n      var bufferedEnd = _this2.player_.bufferedEnd();\n\n      var children = _this2.partEls_;\n      var percent = percentify(bufferedEnd, duration);\n\n      if (_this2.percent_ !== percent) {\n        // update the width of the progress bar\n        _this2.el_.style.width = percent; // update the control-text\n\n        textContent(_this2.percentageEl_, percent);\n        _this2.percent_ = percent;\n      } // add child elements to represent the individual buffered time ranges\n\n\n      for (var i = 0; i < buffered.length; i++) {\n        var start = buffered.start(i);\n        var end = buffered.end(i);\n        var part = children[i];\n\n        if (!part) {\n          part = _this2.el_.appendChild(createEl());\n          children[i] = part;\n        } //  only update if changed\n\n\n        if (part.dataset.start === start && part.dataset.end === end) {\n          continue;\n        }\n\n        part.dataset.start = start;\n        part.dataset.end = end; // set the percent based on the width of the progress bar (bufferedEnd)\n\n        part.style.left = percentify(start, bufferedEnd);\n        part.style.width = percentify(end - start, bufferedEnd);\n      } // remove unused buffered range elements\n\n\n      for (var _i = children.length; _i > buffered.length; _i--) {\n        _this2.el_.removeChild(children[_i - 1]);\n      }\n\n      children.length = buffered.length;\n    });\n  };\n\n  return LoadProgressBar;\n}(Component$1);\n\nComponent$1.registerComponent('LoadProgressBar', LoadProgressBar);\n\n/**\n * Time tooltips display a time above the progress bar.\n *\n * @extends Component\n */\n\nvar TimeTooltip = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TimeTooltip, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function TimeTooltip(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n    return _this;\n  }\n  /**\n   * Create the time tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = TimeTooltip.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-time-tooltip'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n  /**\n   * Updates the position of the time tooltip relative to the `SeekBar`.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  ;\n\n  _proto.update = function update(seekBarRect, seekBarPoint, content) {\n    var tooltipRect = findPosition(this.el_);\n    var playerRect = getBoundingClientRect(this.player_.el());\n    var seekBarPointPx = seekBarRect.width * seekBarPoint; // do nothing if either rect isn't available\n    // for example, if the player isn't in the DOM for testing\n\n    if (!playerRect || !tooltipRect) {\n      return;\n    } // This is the space left of the `seekBarPoint` available within the bounds\n    // of the player. We calculate any gap between the left edge of the player\n    // and the left edge of the `SeekBar` and add the number of pixels in the\n    // `SeekBar` before hitting the `seekBarPoint`\n\n\n    var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx; // This is the space right of the `seekBarPoint` available within the bounds\n    // of the player. We calculate the number of pixels from the `seekBarPoint`\n    // to the right edge of the `SeekBar` and add to that any gap between the\n    // right edge of the `SeekBar` and the player.\n\n    var spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right); // This is the number of pixels by which the tooltip will need to be pulled\n    // further to the right to center it over the `seekBarPoint`.\n\n    var pullTooltipBy = tooltipRect.width / 2; // Adjust the `pullTooltipBy` distance to the left or right depending on\n    // the results of the space calculations above.\n\n    if (spaceLeftOfPoint < pullTooltipBy) {\n      pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n    } else if (spaceRightOfPoint < pullTooltipBy) {\n      pullTooltipBy = spaceRightOfPoint;\n    } // Due to the imprecision of decimal/ratio based calculations and varying\n    // rounding behaviors, there are cases where the spacing adjustment is off\n    // by a pixel or two. This adds insurance to these calculations.\n\n\n    if (pullTooltipBy < 0) {\n      pullTooltipBy = 0;\n    } else if (pullTooltipBy > tooltipRect.width) {\n      pullTooltipBy = tooltipRect.width;\n    } // prevent small width fluctuations within 0.4px from\n    // changing the value below.\n    // This really helps for live to prevent the play\n    // progress time tooltip from jittering\n\n\n    pullTooltipBy = Math.round(pullTooltipBy);\n    this.el_.style.right = \"-\" + pullTooltipBy + \"px\";\n    this.write(content);\n  }\n  /**\n   * Write the time to the tooltip DOM element.\n   *\n   * @param {string} content\n   *        The formatted time for the tooltip.\n   */\n  ;\n\n  _proto.write = function write(content) {\n    textContent(this.el_, content);\n  }\n  /**\n   * Updates the position of the time tooltip relative to the `SeekBar`.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   *\n   * @param {number} time\n   *        The time to update the tooltip to, not used during live playback\n   *\n   * @param {Function} cb\n   *        A function that will be called during the request animation frame\n   *        for tooltips that need to do additional animations from the default\n   */\n  ;\n\n  _proto.updateTime = function updateTime(seekBarRect, seekBarPoint, time, cb) {\n    var _this2 = this;\n\n    this.requestNamedAnimationFrame('TimeTooltip#updateTime', function () {\n      var content;\n\n      var duration = _this2.player_.duration();\n\n      if (_this2.player_.liveTracker && _this2.player_.liveTracker.isLive()) {\n        var liveWindow = _this2.player_.liveTracker.liveWindow();\n\n        var secondsBehind = liveWindow - seekBarPoint * liveWindow;\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n      } else {\n        content = formatTime(time, duration);\n      }\n\n      _this2.update(seekBarRect, seekBarPoint, content);\n\n      if (cb) {\n        cb();\n      }\n    });\n  };\n\n  return TimeTooltip;\n}(Component$1);\n\nComponent$1.registerComponent('TimeTooltip', TimeTooltip);\n\n/**\n * Used by {@link SeekBar} to display media playback progress as part of the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\n\nvar PlayProgressBar = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PlayProgressBar, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function PlayProgressBar(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n    return _this;\n  }\n  /**\n   * Create the the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = PlayProgressBar.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-play-progress vjs-slider-bar'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n  /**\n   * Enqueues updates to its own DOM as well as the DOM of its\n   * {@link TimeTooltip} child.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  ;\n\n  _proto.update = function update(seekBarRect, seekBarPoint) {\n    var timeTooltip = this.getChild('timeTooltip');\n\n    if (!timeTooltip) {\n      return;\n    }\n\n    var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n  };\n\n  return PlayProgressBar;\n}(Component$1);\n/**\n * Default options for {@link PlayProgressBar}.\n *\n * @type {Object}\n * @private\n */\n\n\nPlayProgressBar.prototype.options_ = {\n  children: []\n}; // Time tooltips should not be added to a player on mobile devices\n\nif (!IS_IOS && !IS_ANDROID) {\n  PlayProgressBar.prototype.options_.children.push('timeTooltip');\n}\n\nComponent$1.registerComponent('PlayProgressBar', PlayProgressBar);\n\n/**\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\n * indicating the time which is represented by a given point in the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\n\nvar MouseTimeDisplay = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MouseTimeDisplay, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function MouseTimeDisplay(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n    return _this;\n  }\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = MouseTimeDisplay.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-mouse-display'\n    });\n  }\n  /**\n   * Enqueues updates to its own DOM as well as the DOM of its\n   * {@link TimeTooltip} child.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  ;\n\n  _proto.update = function update(seekBarRect, seekBarPoint) {\n    var _this2 = this;\n\n    var time = seekBarPoint * this.player_.duration();\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, function () {\n      _this2.el_.style.left = seekBarRect.width * seekBarPoint + \"px\";\n    });\n  };\n\n  return MouseTimeDisplay;\n}(Component$1);\n/**\n * Default options for `MouseTimeDisplay`\n *\n * @type {Object}\n * @private\n */\n\n\nMouseTimeDisplay.prototype.options_ = {\n  children: ['timeTooltip']\n};\nComponent$1.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\n\nvar STEP_SECONDS = 5; // The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\n\nvar PAGE_KEY_MULTIPLIER = 12;\n/**\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\n * as its `bar`.\n *\n * @extends Slider\n */\n\nvar SeekBar = /*#__PURE__*/function (_Slider) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SeekBar, _Slider);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function SeekBar(player, options) {\n    var _this;\n\n    _this = _Slider.call(this, player, options) || this;\n\n    _this.setEventHandlers_();\n\n    return _this;\n  }\n  /**\n   * Sets the event handlers\n   *\n   * @private\n   */\n\n\n  var _proto = SeekBar.prototype;\n\n  _proto.setEventHandlers_ = function setEventHandlers_() {\n    var _this2 = this;\n\n    this.update_ = bind(this, this.update);\n    this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\n    this.on(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\n\n    if (this.player_.liveTracker) {\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\n    } // when playing, let's ensure we smoothly update the play progress bar\n    // via an interval\n\n\n    this.updateInterval = null;\n\n    this.enableIntervalHandler_ = function (e) {\n      return _this2.enableInterval_(e);\n    };\n\n    this.disableIntervalHandler_ = function (e) {\n      return _this2.disableInterval_(e);\n    };\n\n    this.on(this.player_, ['playing'], this.enableIntervalHandler_);\n    this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_); // we don't need to update the play progress if the document is hidden,\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\n\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n      this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\n    }\n  };\n\n  _proto.toggleVisibility_ = function toggleVisibility_(e) {\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.visibilityState === 'hidden') {\n      this.cancelNamedAnimationFrame('SeekBar#update');\n      this.cancelNamedAnimationFrame('Slider#update');\n      this.disableInterval_(e);\n    } else {\n      if (!this.player_.ended() && !this.player_.paused()) {\n        this.enableInterval_();\n      } // we just switched back to the page and someone may be looking, so, update ASAP\n\n\n      this.update();\n    }\n  };\n\n  _proto.enableInterval_ = function enableInterval_() {\n    if (this.updateInterval) {\n      return;\n    }\n\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n  };\n\n  _proto.disableInterval_ = function disableInterval_(e) {\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\n      return;\n    }\n\n    if (!this.updateInterval) {\n      return;\n    }\n\n    this.clearInterval(this.updateInterval);\n    this.updateInterval = null;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    return _Slider.prototype.createEl.call(this, 'div', {\n      className: 'vjs-progress-holder'\n    }, {\n      'aria-label': this.localize('Progress Bar')\n    });\n  }\n  /**\n   * This function updates the play progress bar and accessibility\n   * attributes to whatever is passed in.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `timeupdate` or `ended` event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   *\n   * @return {number}\n   *          The current percent at a number from 0-1\n   */\n  ;\n\n  _proto.update = function update(event) {\n    var _this3 = this;\n\n    // ignore updates while the tab is hidden\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.visibilityState === 'hidden') {\n      return;\n    }\n\n    var percent = _Slider.prototype.update.call(this);\n\n    this.requestNamedAnimationFrame('SeekBar#update', function () {\n      var currentTime = _this3.player_.ended() ? _this3.player_.duration() : _this3.getCurrentTime_();\n      var liveTracker = _this3.player_.liveTracker;\n\n      var duration = _this3.player_.duration();\n\n      if (liveTracker && liveTracker.isLive()) {\n        duration = _this3.player_.liveTracker.liveCurrentTime();\n      }\n\n      if (_this3.percent_ !== percent) {\n        // machine readable value of progress bar (percentage complete)\n        _this3.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n\n        _this3.percent_ = percent;\n      }\n\n      if (_this3.currentTime_ !== currentTime || _this3.duration_ !== duration) {\n        // human readable value of progress bar (time complete)\n        _this3.el_.setAttribute('aria-valuetext', _this3.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n\n        _this3.currentTime_ = currentTime;\n        _this3.duration_ = duration;\n      } // update the progress bar time tooltip with the current time\n\n\n      if (_this3.bar) {\n        _this3.bar.update(getBoundingClientRect(_this3.el()), _this3.getProgress());\n      }\n    });\n    return percent;\n  }\n  /**\n   * Prevent liveThreshold from causing seeks to seem like they\n   * are not happening from a user perspective.\n   *\n   * @param {number} ct\n   *        current time to seek to\n   */\n  ;\n\n  _proto.userSeek_ = function userSeek_(ct) {\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n      this.player_.liveTracker.nextSeekedFromUser();\n    }\n\n    this.player_.currentTime(ct);\n  }\n  /**\n   * Get the value of current time but allows for smooth scrubbing,\n   * when player can't keep up.\n   *\n   * @return {number}\n   *         The current time value to display\n   *\n   * @private\n   */\n  ;\n\n  _proto.getCurrentTime_ = function getCurrentTime_() {\n    return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n  }\n  /**\n   * Get the percentage of media played so far.\n   *\n   * @return {number}\n   *         The percentage of media played so far (0 to 1).\n   */\n  ;\n\n  _proto.getPercent = function getPercent() {\n    var currentTime = this.getCurrentTime_();\n    var percent;\n    var liveTracker = this.player_.liveTracker;\n\n    if (liveTracker && liveTracker.isLive()) {\n      percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow(); // prevent the percent from changing at the live edge\n\n      if (liveTracker.atLiveEdge()) {\n        percent = 1;\n      }\n    } else {\n      percent = currentTime / this.player_.duration();\n    }\n\n    return percent;\n  }\n  /**\n   * Handle mouse down on seek bar\n   *\n   * @param {EventTarget~Event} event\n   *        The `mousedown` event that caused this to run.\n   *\n   * @listens mousedown\n   */\n  ;\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    } // Stop event propagation to prevent double fire in progress-control.js\n\n\n    event.stopPropagation();\n    this.videoWasPlaying = !this.player_.paused();\n    this.player_.pause();\n\n    _Slider.prototype.handleMouseDown.call(this, event);\n  }\n  /**\n   * Handle mouse move on seek bar\n   *\n   * @param {EventTarget~Event} event\n   *        The `mousemove` event that caused this to run.\n   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false\n   *\n   * @listens mousemove\n   */\n  ;\n\n  _proto.handleMouseMove = function handleMouseMove(event, mouseDown) {\n    if (mouseDown === void 0) {\n      mouseDown = false;\n    }\n\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n\n    if (!mouseDown && !this.player_.scrubbing()) {\n      this.player_.scrubbing(true);\n    }\n\n    var newTime;\n    var distance = this.calculateDistance(event);\n    var liveTracker = this.player_.liveTracker;\n\n    if (!liveTracker || !liveTracker.isLive()) {\n      newTime = distance * this.player_.duration(); // Don't let video end while scrubbing.\n\n      if (newTime === this.player_.duration()) {\n        newTime = newTime - 0.1;\n      }\n    } else {\n      if (distance >= 0.99) {\n        liveTracker.seekToLiveEdge();\n        return;\n      }\n\n      var seekableStart = liveTracker.seekableStart();\n      var seekableEnd = liveTracker.liveCurrentTime();\n      newTime = seekableStart + distance * liveTracker.liveWindow(); // Don't let video end while scrubbing.\n\n      if (newTime >= seekableEnd) {\n        newTime = seekableEnd;\n      } // Compensate for precision differences so that currentTime is not less\n      // than seekable start\n\n\n      if (newTime <= seekableStart) {\n        newTime = seekableStart + 0.1;\n      } // On android seekableEnd can be Infinity sometimes,\n      // this will cause newTime to be Infinity, which is\n      // not a valid currentTime.\n\n\n      if (newTime === Infinity) {\n        return;\n      }\n    } // Set new time (tell player to seek to new time)\n\n\n    this.userSeek_(newTime);\n  };\n\n  _proto.enable = function enable() {\n    _Slider.prototype.enable.call(this);\n\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n\n    if (!mouseTimeDisplay) {\n      return;\n    }\n\n    mouseTimeDisplay.show();\n  };\n\n  _proto.disable = function disable() {\n    _Slider.prototype.disable.call(this);\n\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n\n    if (!mouseTimeDisplay) {\n      return;\n    }\n\n    mouseTimeDisplay.hide();\n  }\n  /**\n   * Handle mouse up on seek bar\n   *\n   * @param {EventTarget~Event} event\n   *        The `mouseup` event that caused this to run.\n   *\n   * @listens mouseup\n   */\n  ;\n\n  _proto.handleMouseUp = function handleMouseUp(event) {\n    _Slider.prototype.handleMouseUp.call(this, event); // Stop event propagation to prevent double fire in progress-control.js\n\n\n    if (event) {\n      event.stopPropagation();\n    }\n\n    this.player_.scrubbing(false);\n    /**\n     * Trigger timeupdate because we're done seeking and the time has changed.\n     * This is particularly useful for if the player is paused to time the time displays.\n     *\n     * @event Tech#timeupdate\n     * @type {EventTarget~Event}\n     */\n\n    this.player_.trigger({\n      type: 'timeupdate',\n      target: this,\n      manuallyTriggered: true\n    });\n\n    if (this.videoWasPlaying) {\n      silencePromise(this.player_.play());\n    } else {\n      // We're done seeking and the time has changed.\n      // If the player is paused, make sure we display the correct time on the seek bar.\n      this.update_();\n    }\n  }\n  /**\n   * Move more quickly fast forward for keyboard-only users\n   */\n  ;\n\n  _proto.stepForward = function stepForward() {\n    this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n  }\n  /**\n   * Move more quickly rewind for keyboard-only users\n   */\n  ;\n\n  _proto.stepBack = function stepBack() {\n    this.userSeek_(this.player_.currentTime() - STEP_SECONDS);\n  }\n  /**\n   * Toggles the playback state of the player\n   * This gets called when enter or space is used on the seekbar\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called\n   *\n   */\n  ;\n\n  _proto.handleAction = function handleAction(event) {\n    if (this.player_.paused()) {\n      this.player_.play();\n    } else {\n      this.player_.pause();\n    }\n  }\n  /**\n   * Called when this SeekBar has focus and a key gets pressed down.\n   * Supports the following keys:\n   *\n   *   Space or Enter key fire a click event\n   *   Home key moves to start of the timeline\n   *   End key moves to end of the timeline\n   *   Digit \"0\" through \"9\" keys move to 0%, 10% ... 80%, 90% of the timeline\n   *   PageDown key moves back a larger step than ArrowDown\n   *   PageUp key moves forward a large step\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    var liveTracker = this.player_.liveTracker;\n\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Enter')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.handleAction(event);\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Home')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(0);\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'End')) {\n      event.preventDefault();\n      event.stopPropagation();\n\n      if (liveTracker && liveTracker.isLive()) {\n        this.userSeek_(liveTracker.liveCurrentTime());\n      } else {\n        this.userSeek_(this.player_.duration());\n      }\n    } else if (/^[0-9]$/.test(keycode__WEBPACK_IMPORTED_MODULE_3___default()(event))) {\n      event.preventDefault();\n      event.stopPropagation();\n      var gotoFraction = (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.codes[keycode__WEBPACK_IMPORTED_MODULE_3___default()(event)] - keycode__WEBPACK_IMPORTED_MODULE_3___default.a.codes['0']) * 10.0 / 100.0;\n\n      if (liveTracker && liveTracker.isLive()) {\n        this.userSeek_(liveTracker.seekableStart() + liveTracker.liveWindow() * gotoFraction);\n      } else {\n        this.userSeek_(this.player_.duration() * gotoFraction);\n      }\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'PgDn')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'PgUp')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() + STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n    } else {\n      // Pass keydown handling up for unsupported keys\n      _Slider.prototype.handleKeyDown.call(this, event);\n    }\n  };\n\n  _proto.dispose = function dispose() {\n    this.disableInterval_();\n    this.off(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\n\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.update);\n    }\n\n    this.off(this.player_, ['playing'], this.enableIntervalHandler_);\n    this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_); // we don't need to update the play progress if the document is hidden,\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\n\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n      this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\n    }\n\n    _Slider.prototype.dispose.call(this);\n  };\n\n  return SeekBar;\n}(Slider);\n/**\n * Default options for the `SeekBar`\n *\n * @type {Object}\n * @private\n */\n\n\nSeekBar.prototype.options_ = {\n  children: ['loadProgressBar', 'playProgressBar'],\n  barName: 'playProgressBar'\n}; // MouseTimeDisplay tooltips should not be added to a player on mobile devices\n\nif (!IS_IOS && !IS_ANDROID) {\n  SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');\n}\n\nComponent$1.registerComponent('SeekBar', SeekBar);\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress.\n *\n * @extends Component\n */\n\nvar ProgressControl = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ProgressControl, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function ProgressControl(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.handleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    _this.throttledHandleMouseSeek = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n\n    _this.handleMouseUpHandler_ = function (e) {\n      return _this.handleMouseUp(e);\n    };\n\n    _this.handleMouseDownHandler_ = function (e) {\n      return _this.handleMouseDown(e);\n    };\n\n    _this.enable();\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = ProgressControl.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-progress-control vjs-control'\n    });\n  }\n  /**\n   * When the mouse moves over the `ProgressControl`, the pointer position\n   * gets passed down to the `MouseTimeDisplay` component.\n   *\n   * @param {EventTarget~Event} event\n   *        The `mousemove` event that caused this function to run.\n   *\n   * @listen mousemove\n   */\n  ;\n\n  _proto.handleMouseMove = function handleMouseMove(event) {\n    var seekBar = this.getChild('seekBar');\n\n    if (!seekBar) {\n      return;\n    }\n\n    var playProgressBar = seekBar.getChild('playProgressBar');\n    var mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n\n    if (!playProgressBar && !mouseTimeDisplay) {\n      return;\n    }\n\n    var seekBarEl = seekBar.el();\n    var seekBarRect = findPosition(seekBarEl);\n    var seekBarPoint = getPointerPosition(seekBarEl, event).x; // The default skin has a gap on either side of the `SeekBar`. This means\n    // that it's possible to trigger this behavior outside the boundaries of\n    // the `SeekBar`. This ensures we stay within it at all times.\n\n    seekBarPoint = clamp(seekBarPoint, 0, 1);\n\n    if (mouseTimeDisplay) {\n      mouseTimeDisplay.update(seekBarRect, seekBarPoint);\n    }\n\n    if (playProgressBar) {\n      playProgressBar.update(seekBarRect, seekBar.getProgress());\n    }\n  }\n  /**\n   * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\n   *\n   * @method ProgressControl#throttledHandleMouseSeek\n   * @param {EventTarget~Event} event\n   *        The `mousemove` event that caused this function to run.\n   *\n   * @listen mousemove\n   * @listen touchmove\n   */\n\n  /**\n   * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousemove\n   * @listens touchmove\n   */\n  ;\n\n  _proto.handleMouseSeek = function handleMouseSeek(event) {\n    var seekBar = this.getChild('seekBar');\n\n    if (seekBar) {\n      seekBar.handleMouseMove(event);\n    }\n  }\n  /**\n   * Are controls are currently enabled for this progress control.\n   *\n   * @return {boolean}\n   *         true if controls are enabled, false otherwise\n   */\n  ;\n\n  _proto.enabled = function enabled() {\n    return this.enabled_;\n  }\n  /**\n   * Disable all controls on the progress control and its children\n   */\n  ;\n\n  _proto.disable = function disable() {\n    this.children().forEach(function (child) {\n      return child.disable && child.disable();\n    });\n\n    if (!this.enabled()) {\n      return;\n    }\n\n    this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n    this.off(this.el_, 'mousemove', this.handleMouseMove);\n    this.removeListenersAddedOnMousedownAndTouchstart();\n    this.addClass('disabled');\n    this.enabled_ = false; // Restore normal playback state if controls are disabled while scrubbing\n\n    if (this.player_.scrubbing()) {\n      var seekBar = this.getChild('seekBar');\n      this.player_.scrubbing(false);\n\n      if (seekBar.videoWasPlaying) {\n        silencePromise(this.player_.play());\n      }\n    }\n  }\n  /**\n   * Enable all controls on the progress control and its children\n   */\n  ;\n\n  _proto.enable = function enable() {\n    this.children().forEach(function (child) {\n      return child.enable && child.enable();\n    });\n\n    if (this.enabled()) {\n      return;\n    }\n\n    this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n    this.on(this.el_, 'mousemove', this.handleMouseMove);\n    this.removeClass('disabled');\n    this.enabled_ = true;\n  }\n  /**\n   * Cleanup listeners after the user finishes interacting with the progress controls\n   */\n  ;\n\n  _proto.removeListenersAddedOnMousedownAndTouchstart = function removeListenersAddedOnMousedownAndTouchstart() {\n    var doc = this.el_.ownerDocument;\n    this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\n    this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\n    this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.off(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n  /**\n   * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  ;\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    var doc = this.el_.ownerDocument;\n    var seekBar = this.getChild('seekBar');\n\n    if (seekBar) {\n      seekBar.handleMouseDown(event);\n    }\n\n    this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\n    this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\n    this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.on(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n  /**\n   * Handle `mouseup` or `touchend` events on the `ProgressControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   */\n  ;\n\n  _proto.handleMouseUp = function handleMouseUp(event) {\n    var seekBar = this.getChild('seekBar');\n\n    if (seekBar) {\n      seekBar.handleMouseUp(event);\n    }\n\n    this.removeListenersAddedOnMousedownAndTouchstart();\n  };\n\n  return ProgressControl;\n}(Component$1);\n/**\n * Default options for `ProgressControl`\n *\n * @type {Object}\n * @private\n */\n\n\nProgressControl.prototype.options_ = {\n  children: ['seekBar']\n};\nComponent$1.registerComponent('ProgressControl', ProgressControl);\n\n/**\n * Toggle Picture-in-Picture mode\n *\n * @extends Button\n */\n\nvar PictureInPictureToggle = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PictureInPictureToggle, _Button);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @listens Player#enterpictureinpicture\n   * @listens Player#leavepictureinpicture\n   */\n  function PictureInPictureToggle(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this;\n\n    _this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], function (e) {\n      return _this.handlePictureInPictureChange(e);\n    });\n\n    _this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], function (e) {\n      return _this.handlePictureInPictureEnabledChange(e);\n    });\n\n    _this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], function () {\n      // This audio detection will not detect HLS or DASH audio-only streams because there was no reliable way to detect them at the time\n      var isSourceAudio = player.currentType().substring(0, 5) === 'audio';\n\n      if (isSourceAudio || player.audioPosterMode() || player.audioOnlyMode()) {\n        if (player.isInPictureInPicture()) {\n          player.exitPictureInPicture();\n        }\n\n        _this.hide();\n      } else {\n        _this.show();\n      }\n    }); // TODO: Deactivate button on player emptied event.\n\n\n    _this.disable();\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = PictureInPictureToggle.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-picture-in-picture-control \" + _Button.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Enables or disables button based on document.pictureInPictureEnabled property value\n   * or on value returned by player.disablePictureInPicture() method.\n   */\n  ;\n\n  _proto.handlePictureInPictureEnabledChange = function handlePictureInPictureEnabledChange() {\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.pictureInPictureEnabled && this.player_.disablePictureInPicture() === false) {\n      this.enable();\n    } else {\n      this.disable();\n    }\n  }\n  /**\n   * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\n   *        called.\n   *\n   * @listens Player#enterpictureinpicture\n   * @listens Player#leavepictureinpicture\n   */\n  ;\n\n  _proto.handlePictureInPictureChange = function handlePictureInPictureChange(event) {\n    if (this.player_.isInPictureInPicture()) {\n      this.controlText('Exit Picture-in-Picture');\n    } else {\n      this.controlText('Picture-in-Picture');\n    }\n\n    this.handlePictureInPictureEnabledChange();\n  }\n  /**\n   * This gets called when an `PictureInPictureToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    if (!this.player_.isInPictureInPicture()) {\n      this.player_.requestPictureInPicture();\n    } else {\n      this.player_.exitPictureInPicture();\n    }\n  };\n\n  return PictureInPictureToggle;\n}(Button);\n/**\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\nComponent$1.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n */\n\nvar FullscreenToggle = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(FullscreenToggle, _Button);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function FullscreenToggle(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this;\n\n    _this.on(player, 'fullscreenchange', function (e) {\n      return _this.handleFullscreenChange(e);\n    });\n\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[player.fsApi_.fullscreenEnabled] === false) {\n      _this.disable();\n    }\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = FullscreenToggle.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-fullscreen-control \" + _Button.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Handles fullscreenchange on the player and change control text accordingly.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The {@link Player#fullscreenchange} event that caused this function to be\n   *        called.\n   *\n   * @listens Player#fullscreenchange\n   */\n  ;\n\n  _proto.handleFullscreenChange = function handleFullscreenChange(event) {\n    if (this.player_.isFullscreen()) {\n      this.controlText('Non-Fullscreen');\n    } else {\n      this.controlText('Fullscreen');\n    }\n  }\n  /**\n   * This gets called when an `FullscreenToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    if (!this.player_.isFullscreen()) {\n      this.player_.requestFullscreen();\n    } else {\n      this.player_.exitFullscreen();\n    }\n  };\n\n  return FullscreenToggle;\n}(Button);\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\nComponent$1.registerComponent('FullscreenToggle', FullscreenToggle);\n\n/**\n * Check if volume control is supported and if it isn't hide the\n * `Component` that was passed  using the `vjs-hidden` class.\n *\n * @param {Component} self\n *        The component that should be hidden if volume is unsupported\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nvar checkVolumeSupport = function checkVolumeSupport(self, player) {\n  // hide volume controls when they're not supported by the current tech\n  if (player.tech_ && !player.tech_.featuresVolumeControl) {\n    self.addClass('vjs-hidden');\n  }\n\n  self.on(player, 'loadstart', function () {\n    if (!player.tech_.featuresVolumeControl) {\n      self.addClass('vjs-hidden');\n    } else {\n      self.removeClass('vjs-hidden');\n    }\n  });\n};\n\n/**\n * Shows volume level\n *\n * @extends Component\n */\n\nvar VolumeLevel = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VolumeLevel, _Component);\n\n  function VolumeLevel() {\n    return _Component.apply(this, arguments) || this;\n  }\n\n  var _proto = VolumeLevel.prototype;\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  _proto.createEl = function createEl() {\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-volume-level'\n    });\n\n    el.appendChild(_Component.prototype.createEl.call(this, 'span', {\n      className: 'vjs-control-text'\n    }));\n    return el;\n  };\n\n  return VolumeLevel;\n}(Component$1);\n\nComponent$1.registerComponent('VolumeLevel', VolumeLevel);\n\n/**\n * Volume level tooltips display a volume above or side by side the volume bar.\n *\n * @extends Component\n */\n\nvar VolumeLevelTooltip = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VolumeLevelTooltip, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function VolumeLevelTooltip(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n    return _this;\n  }\n  /**\n   * Create the volume tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = VolumeLevelTooltip.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-volume-tooltip'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n  /**\n   * Updates the position of the tooltip relative to the `VolumeBar` and\n   * its content text.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   */\n  ;\n\n  _proto.update = function update(rangeBarRect, rangeBarPoint, vertical, content) {\n    if (!vertical) {\n      var tooltipRect = getBoundingClientRect(this.el_);\n      var playerRect = getBoundingClientRect(this.player_.el());\n      var volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n\n      if (!playerRect || !tooltipRect) {\n        return;\n      }\n\n      var spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n      var spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n      var pullTooltipBy = tooltipRect.width / 2;\n\n      if (spaceLeftOfPoint < pullTooltipBy) {\n        pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n      } else if (spaceRightOfPoint < pullTooltipBy) {\n        pullTooltipBy = spaceRightOfPoint;\n      }\n\n      if (pullTooltipBy < 0) {\n        pullTooltipBy = 0;\n      } else if (pullTooltipBy > tooltipRect.width) {\n        pullTooltipBy = tooltipRect.width;\n      }\n\n      this.el_.style.right = \"-\" + pullTooltipBy + \"px\";\n    }\n\n    this.write(content + \"%\");\n  }\n  /**\n   * Write the volume to the tooltip DOM element.\n   *\n   * @param {string} content\n   *        The formatted volume for the tooltip.\n   */\n  ;\n\n  _proto.write = function write(content) {\n    textContent(this.el_, content);\n  }\n  /**\n   * Updates the position of the volume tooltip relative to the `VolumeBar`.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   * @param {number} volume\n   *        The volume level to update the tooltip to\n   *\n   * @param {Function} cb\n   *        A function that will be called during the request animation frame\n   *        for tooltips that need to do additional animations from the default\n   */\n  ;\n\n  _proto.updateVolume = function updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n    var _this2 = this;\n\n    this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', function () {\n      _this2.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n\n      if (cb) {\n        cb();\n      }\n    });\n  };\n\n  return VolumeLevelTooltip;\n}(Component$1);\n\nComponent$1.registerComponent('VolumeLevelTooltip', VolumeLevelTooltip);\n\n/**\n * The {@link MouseVolumeLevelDisplay} component tracks mouse movement over the\n * {@link VolumeControl}. It displays an indicator and a {@link VolumeLevelTooltip}\n * indicating the volume level which is represented by a given point in the\n * {@link VolumeBar}.\n *\n * @extends Component\n */\n\nvar MouseVolumeLevelDisplay = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MouseVolumeLevelDisplay, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function MouseVolumeLevelDisplay(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\n    return _this;\n  }\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = MouseVolumeLevelDisplay.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-mouse-display'\n    });\n  }\n  /**\n   * Enquires updates to its own DOM as well as the DOM of its\n   * {@link VolumeLevelTooltip} child.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   */\n  ;\n\n  _proto.update = function update(rangeBarRect, rangeBarPoint, vertical) {\n    var _this2 = this;\n\n    var volume = 100 * rangeBarPoint;\n    this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, function () {\n      if (vertical) {\n        _this2.el_.style.bottom = rangeBarRect.height * rangeBarPoint + \"px\";\n      } else {\n        _this2.el_.style.left = rangeBarRect.width * rangeBarPoint + \"px\";\n      }\n    });\n  };\n\n  return MouseVolumeLevelDisplay;\n}(Component$1);\n/**\n * Default options for `MouseVolumeLevelDisplay`\n *\n * @type {Object}\n * @private\n */\n\n\nMouseVolumeLevelDisplay.prototype.options_ = {\n  children: ['volumeLevelTooltip']\n};\nComponent$1.registerComponent('MouseVolumeLevelDisplay', MouseVolumeLevelDisplay);\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @extends Slider\n */\n\nvar VolumeBar = /*#__PURE__*/function (_Slider) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VolumeBar, _Slider);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function VolumeBar(player, options) {\n    var _this;\n\n    _this = _Slider.call(this, player, options) || this;\n\n    _this.on('slideractive', function (e) {\n      return _this.updateLastVolume_(e);\n    });\n\n    _this.on(player, 'volumechange', function (e) {\n      return _this.updateARIAAttributes(e);\n    });\n\n    player.ready(function () {\n      return _this.updateARIAAttributes();\n    });\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = VolumeBar.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Slider.prototype.createEl.call(this, 'div', {\n      className: 'vjs-volume-bar vjs-slider-bar'\n    }, {\n      'aria-label': this.localize('Volume Level'),\n      'aria-live': 'polite'\n    });\n  }\n  /**\n   * Handle mouse down on volume bar\n   *\n   * @param {EventTarget~Event} event\n   *        The `mousedown` event that caused this to run.\n   *\n   * @listens mousedown\n   */\n  ;\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n\n    _Slider.prototype.handleMouseDown.call(this, event);\n  }\n  /**\n   * Handle movement events on the {@link VolumeMenuButton}.\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to run.\n   *\n   * @listens mousemove\n   */\n  ;\n\n  _proto.handleMouseMove = function handleMouseMove(event) {\n    var mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n\n    if (mouseVolumeLevelDisplay) {\n      var volumeBarEl = this.el();\n      var volumeBarRect = getBoundingClientRect(volumeBarEl);\n      var vertical = this.vertical();\n      var volumeBarPoint = getPointerPosition(volumeBarEl, event);\n      volumeBarPoint = vertical ? volumeBarPoint.y : volumeBarPoint.x; // The default skin has a gap on either side of the `VolumeBar`. This means\n      // that it's possible to trigger this behavior outside the boundaries of\n      // the `VolumeBar`. This ensures we stay within it at all times.\n\n      volumeBarPoint = clamp(volumeBarPoint, 0, 1);\n      mouseVolumeLevelDisplay.update(volumeBarRect, volumeBarPoint, vertical);\n    }\n\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n\n    this.checkMuted();\n    this.player_.volume(this.calculateDistance(event));\n  }\n  /**\n   * If the player is muted unmute it.\n   */\n  ;\n\n  _proto.checkMuted = function checkMuted() {\n    if (this.player_.muted()) {\n      this.player_.muted(false);\n    }\n  }\n  /**\n   * Get percent of volume level\n   *\n   * @return {number}\n   *         Volume level percent as a decimal number.\n   */\n  ;\n\n  _proto.getPercent = function getPercent() {\n    if (this.player_.muted()) {\n      return 0;\n    }\n\n    return this.player_.volume();\n  }\n  /**\n   * Increase volume level for keyboard users\n   */\n  ;\n\n  _proto.stepForward = function stepForward() {\n    this.checkMuted();\n    this.player_.volume(this.player_.volume() + 0.1);\n  }\n  /**\n   * Decrease volume level for keyboard users\n   */\n  ;\n\n  _proto.stepBack = function stepBack() {\n    this.checkMuted();\n    this.player_.volume(this.player_.volume() - 0.1);\n  }\n  /**\n   * Update ARIA accessibility attributes\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `volumechange` event that caused this function to run.\n   *\n   * @listens Player#volumechange\n   */\n  ;\n\n  _proto.updateARIAAttributes = function updateARIAAttributes(event) {\n    var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\n    this.el_.setAttribute('aria-valuenow', ariaValue);\n    this.el_.setAttribute('aria-valuetext', ariaValue + '%');\n  }\n  /**\n   * Returns the current value of the player volume as a percentage\n   *\n   * @private\n   */\n  ;\n\n  _proto.volumeAsPercentage_ = function volumeAsPercentage_() {\n    return Math.round(this.player_.volume() * 100);\n  }\n  /**\n   * When user starts dragging the VolumeBar, store the volume and listen for\n   * the end of the drag. When the drag ends, if the volume was set to zero,\n   * set lastVolume to the stored volume.\n   *\n   * @listens slideractive\n   * @private\n   */\n  ;\n\n  _proto.updateLastVolume_ = function updateLastVolume_() {\n    var _this2 = this;\n\n    var volumeBeforeDrag = this.player_.volume();\n    this.one('sliderinactive', function () {\n      if (_this2.player_.volume() === 0) {\n        _this2.player_.lastVolume_(volumeBeforeDrag);\n      }\n    });\n  };\n\n  return VolumeBar;\n}(Slider);\n/**\n * Default options for the `VolumeBar`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumeBar.prototype.options_ = {\n  children: ['volumeLevel'],\n  barName: 'volumeLevel'\n}; // MouseVolumeLevelDisplay tooltip should not be added to a player on mobile devices\n\nif (!IS_IOS && !IS_ANDROID) {\n  VolumeBar.prototype.options_.children.splice(0, 0, 'mouseVolumeLevelDisplay');\n}\n/**\n * Call the update event for this Slider when this event happens on the player.\n *\n * @type {string}\n */\n\n\nVolumeBar.prototype.playerEvent = 'volumechange';\nComponent$1.registerComponent('VolumeBar', VolumeBar);\n\n/**\n * The component for controlling the volume level\n *\n * @extends Component\n */\n\nvar VolumeControl = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VolumeControl, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function VolumeControl(player, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    options.vertical = options.vertical || false; // Pass the vertical option down to the VolumeBar if\n    // the VolumeBar is turned on.\n\n    if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\n      options.volumeBar = options.volumeBar || {};\n      options.volumeBar.vertical = options.vertical;\n    }\n\n    _this = _Component.call(this, player, options) || this; // hide this control if volume support is missing\n\n    checkVolumeSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), player);\n    _this.throttledHandleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n\n    _this.handleMouseUpHandler_ = function (e) {\n      return _this.handleMouseUp(e);\n    };\n\n    _this.on('mousedown', function (e) {\n      return _this.handleMouseDown(e);\n    });\n\n    _this.on('touchstart', function (e) {\n      return _this.handleMouseDown(e);\n    });\n\n    _this.on('mousemove', function (e) {\n      return _this.handleMouseMove(e);\n    }); // while the slider is active (the mouse has been pressed down and\n    // is dragging) or in focus we do not want to hide the VolumeBar\n\n\n    _this.on(_this.volumeBar, ['focus', 'slideractive'], function () {\n      _this.volumeBar.addClass('vjs-slider-active');\n\n      _this.addClass('vjs-slider-active');\n\n      _this.trigger('slideractive');\n    });\n\n    _this.on(_this.volumeBar, ['blur', 'sliderinactive'], function () {\n      _this.volumeBar.removeClass('vjs-slider-active');\n\n      _this.removeClass('vjs-slider-active');\n\n      _this.trigger('sliderinactive');\n    });\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = VolumeControl.prototype;\n\n  _proto.createEl = function createEl() {\n    var orientationClass = 'vjs-volume-horizontal';\n\n    if (this.options_.vertical) {\n      orientationClass = 'vjs-volume-vertical';\n    }\n\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: \"vjs-volume-control vjs-control \" + orientationClass\n    });\n  }\n  /**\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  ;\n\n  _proto.handleMouseDown = function handleMouseDown(event) {\n    var doc = this.el_.ownerDocument;\n    this.on(doc, 'mousemove', this.throttledHandleMouseMove);\n    this.on(doc, 'touchmove', this.throttledHandleMouseMove);\n    this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.on(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n  /**\n   * Handle `mouseup` or `touchend` events on the `VolumeControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   */\n  ;\n\n  _proto.handleMouseUp = function handleMouseUp(event) {\n    var doc = this.el_.ownerDocument;\n    this.off(doc, 'mousemove', this.throttledHandleMouseMove);\n    this.off(doc, 'touchmove', this.throttledHandleMouseMove);\n    this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.off(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n  /**\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  ;\n\n  _proto.handleMouseMove = function handleMouseMove(event) {\n    this.volumeBar.handleMouseMove(event);\n  };\n\n  return VolumeControl;\n}(Component$1);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumeControl.prototype.options_ = {\n  children: ['volumeBar']\n};\nComponent$1.registerComponent('VolumeControl', VolumeControl);\n\n/**\n * Check if muting volume is supported and if it isn't hide the mute toggle\n * button.\n *\n * @param {Component} self\n *        A reference to the mute toggle button\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nvar checkMuteSupport = function checkMuteSupport(self, player) {\n  // hide mute toggle button if it's not supported by the current tech\n  if (player.tech_ && !player.tech_.featuresMuteControl) {\n    self.addClass('vjs-hidden');\n  }\n\n  self.on(player, 'loadstart', function () {\n    if (!player.tech_.featuresMuteControl) {\n      self.addClass('vjs-hidden');\n    } else {\n      self.removeClass('vjs-hidden');\n    }\n  });\n};\n\n/**\n * A button component for muting the audio.\n *\n * @extends Button\n */\n\nvar MuteToggle = /*#__PURE__*/function (_Button) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MuteToggle, _Button);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function MuteToggle(player, options) {\n    var _this;\n\n    _this = _Button.call(this, player, options) || this; // hide this control if volume support is missing\n\n    checkMuteSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), player);\n\n    _this.on(player, ['loadstart', 'volumechange'], function (e) {\n      return _this.update(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = MuteToggle.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-mute-control \" + _Button.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * This gets called when an `MuteToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    var vol = this.player_.volume();\n    var lastVolume = this.player_.lastVolume_();\n\n    if (vol === 0) {\n      var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\n      this.player_.volume(volumeToSet);\n      this.player_.muted(false);\n    } else {\n      this.player_.muted(this.player_.muted() ? false : true);\n    }\n  }\n  /**\n   * Update the `MuteToggle` button based on the state of `volume` and `muted`\n   * on the player.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The {@link Player#loadstart} event if this function was called\n   *        through an event.\n   *\n   * @listens Player#loadstart\n   * @listens Player#volumechange\n   */\n  ;\n\n  _proto.update = function update(event) {\n    this.updateIcon_();\n    this.updateControlText_();\n  }\n  /**\n   * Update the appearance of the `MuteToggle` icon.\n   *\n   * Possible states (given `level` variable below):\n   * - 0: crossed out\n   * - 1: zero bars of volume\n   * - 2: one bar of volume\n   * - 3: two bars of volume\n   *\n   * @private\n   */\n  ;\n\n  _proto.updateIcon_ = function updateIcon_() {\n    var vol = this.player_.volume();\n    var level = 3; // in iOS when a player is loaded with muted attribute\n    // and volume is changed with a native mute button\n    // we want to make sure muted state is updated\n\n    if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\n      this.player_.muted(this.player_.tech_.el_.muted);\n    }\n\n    if (vol === 0 || this.player_.muted()) {\n      level = 0;\n    } else if (vol < 0.33) {\n      level = 1;\n    } else if (vol < 0.67) {\n      level = 2;\n    } // TODO improve muted icon classes\n\n\n    for (var i = 0; i < 4; i++) {\n      removeClass(this.el_, \"vjs-vol-\" + i);\n    }\n\n    addClass(this.el_, \"vjs-vol-\" + level);\n  }\n  /**\n   * If `muted` has changed on the player, update the control text\n   * (`title` attribute on `vjs-mute-control` element and content of\n   * `vjs-control-text` element).\n   *\n   * @private\n   */\n  ;\n\n  _proto.updateControlText_ = function updateControlText_() {\n    var soundOff = this.player_.muted() || this.player_.volume() === 0;\n    var text = soundOff ? 'Unmute' : 'Mute';\n\n    if (this.controlText() !== text) {\n      this.controlText(text);\n    }\n  };\n\n  return MuteToggle;\n}(Button);\n/**\n * The text that should display over the `MuteToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nMuteToggle.prototype.controlText_ = 'Mute';\nComponent$1.registerComponent('MuteToggle', MuteToggle);\n\n/**\n * A Component to contain the MuteToggle and VolumeControl so that\n * they can work together.\n *\n * @extends Component\n */\n\nvar VolumePanel = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VolumePanel, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function VolumePanel(player, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    if (typeof options.inline !== 'undefined') {\n      options.inline = options.inline;\n    } else {\n      options.inline = true;\n    } // pass the inline option down to the VolumeControl as vertical if\n    // the VolumeControl is on.\n\n\n    if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\n      options.volumeControl = options.volumeControl || {};\n      options.volumeControl.vertical = !options.inline;\n    }\n\n    _this = _Component.call(this, player, options) || this; // this handler is used by mouse handler methods below\n\n    _this.handleKeyPressHandler_ = function (e) {\n      return _this.handleKeyPress(e);\n    };\n\n    _this.on(player, ['loadstart'], function (e) {\n      return _this.volumePanelState_(e);\n    });\n\n    _this.on(_this.muteToggle, 'keyup', function (e) {\n      return _this.handleKeyPress(e);\n    });\n\n    _this.on(_this.volumeControl, 'keyup', function (e) {\n      return _this.handleVolumeControlKeyUp(e);\n    });\n\n    _this.on('keydown', function (e) {\n      return _this.handleKeyPress(e);\n    });\n\n    _this.on('mouseover', function (e) {\n      return _this.handleMouseOver(e);\n    });\n\n    _this.on('mouseout', function (e) {\n      return _this.handleMouseOut(e);\n    }); // while the slider is active (the mouse has been pressed down and\n    // is dragging) we do not want to hide the VolumeBar\n\n\n    _this.on(_this.volumeControl, ['slideractive'], _this.sliderActive_);\n\n    _this.on(_this.volumeControl, ['sliderinactive'], _this.sliderInactive_);\n\n    return _this;\n  }\n  /**\n   * Add vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#slideractive\n   * @private\n   */\n\n\n  var _proto = VolumePanel.prototype;\n\n  _proto.sliderActive_ = function sliderActive_() {\n    this.addClass('vjs-slider-active');\n  }\n  /**\n   * Removes vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#sliderinactive\n   * @private\n   */\n  ;\n\n  _proto.sliderInactive_ = function sliderInactive_() {\n    this.removeClass('vjs-slider-active');\n  }\n  /**\n   * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\n   * depending on MuteToggle and VolumeControl state\n   *\n   * @listens Player#loadstart\n   * @private\n   */\n  ;\n\n  _proto.volumePanelState_ = function volumePanelState_() {\n    // hide volume panel if neither volume control or mute toggle\n    // are displayed\n    if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\n      this.addClass('vjs-hidden');\n    } // if only mute toggle is visible we don't want\n    // volume panel expanding when hovered or active\n\n\n    if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\n      this.addClass('vjs-mute-toggle-only');\n    }\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    var orientationClass = 'vjs-volume-panel-horizontal';\n\n    if (!this.options_.inline) {\n      orientationClass = 'vjs-volume-panel-vertical';\n    }\n\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: \"vjs-volume-panel vjs-control \" + orientationClass\n    });\n  }\n  /**\n   * Dispose of the `volume-panel` and all child components.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.handleMouseOut();\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\n   * the volume panel and sets focus on `MuteToggle`.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keyup` event that caused this function to be called.\n   *\n   * @listens keyup\n   */\n  ;\n\n  _proto.handleVolumeControlKeyUp = function handleVolumeControlKeyUp(event) {\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc')) {\n      this.muteToggle.focus();\n    }\n  }\n  /**\n   * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\n   * Turns on listening for `mouseover` event. When they happen it\n   * calls `this.handleMouseOver`.\n   *\n   * @param {EventTarget~Event} event\n   *        The `mouseover` event that caused this function to be called.\n   *\n   * @listens mouseover\n   */\n  ;\n\n  _proto.handleMouseOver = function handleMouseOver(event) {\n    this.addClass('vjs-hover');\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', this.handleKeyPressHandler_);\n  }\n  /**\n   * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\n   * Turns on listening for `mouseout` event. When they happen it\n   * calls `this.handleMouseOut`.\n   *\n   * @param {EventTarget~Event} event\n   *        The `mouseout` event that caused this function to be called.\n   *\n   * @listens mouseout\n   */\n  ;\n\n  _proto.handleMouseOut = function handleMouseOut(event) {\n    this.removeClass('vjs-hover');\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', this.handleKeyPressHandler_);\n  }\n  /**\n   * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\n   * looking for ESC, which hides the `VolumeControl`.\n   *\n   * @param {EventTarget~Event} event\n   *        The keypress that triggered this event.\n   *\n   * @listens keydown | keyup\n   */\n  ;\n\n  _proto.handleKeyPress = function handleKeyPress(event) {\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc')) {\n      this.handleMouseOut();\n    }\n  };\n\n  return VolumePanel;\n}(Component$1);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\n\n\nVolumePanel.prototype.options_ = {\n  children: ['muteToggle', 'volumeControl']\n};\nComponent$1.registerComponent('VolumePanel', VolumePanel);\n\n/**\n * The Menu component is used to build popup menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n */\n\nvar Menu = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Menu, _Component);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        the player that this component should attach to\n   *\n   * @param {Object} [options]\n   *        Object of option names and values\n   *\n   */\n  function Menu(player, options) {\n    var _this;\n\n    _this = _Component.call(this, player, options) || this;\n\n    if (options) {\n      _this.menuButton_ = options.menuButton;\n    }\n\n    _this.focusedChild_ = -1;\n\n    _this.on('keydown', function (e) {\n      return _this.handleKeyDown(e);\n    }); // All the menu item instances share the same blur handler provided by the menu container.\n\n\n    _this.boundHandleBlur_ = function (e) {\n      return _this.handleBlur(e);\n    };\n\n    _this.boundHandleTapClick_ = function (e) {\n      return _this.handleTapClick(e);\n    };\n\n    return _this;\n  }\n  /**\n   * Add event listeners to the {@link MenuItem}.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem` to add listeners to.\n   *\n   */\n\n\n  var _proto = Menu.prototype;\n\n  _proto.addEventListenerForItem = function addEventListenerForItem(component) {\n    if (!(component instanceof Component$1)) {\n      return;\n    }\n\n    this.on(component, 'blur', this.boundHandleBlur_);\n    this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\n  }\n  /**\n   * Remove event listeners from the {@link MenuItem}.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem` to remove listeners.\n   *\n   */\n  ;\n\n  _proto.removeEventListenerForItem = function removeEventListenerForItem(component) {\n    if (!(component instanceof Component$1)) {\n      return;\n    }\n\n    this.off(component, 'blur', this.boundHandleBlur_);\n    this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\n  }\n  /**\n   * This method will be called indirectly when the component has been added\n   * before the component adds to the new menu instance by `addItem`.\n   * In this case, the original menu instance will remove the component\n   * by calling `removeChild`.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem`\n   */\n  ;\n\n  _proto.removeChild = function removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n\n    this.removeEventListenerForItem(component);\n\n    _Component.prototype.removeChild.call(this, component);\n  }\n  /**\n   * Add a {@link MenuItem} to the menu.\n   *\n   * @param {Object|string} component\n   *        The name or instance of the `MenuItem` to add.\n   *\n   */\n  ;\n\n  _proto.addItem = function addItem(component) {\n    var childComponent = this.addChild(component);\n\n    if (childComponent) {\n      this.addEventListenerForItem(childComponent);\n    }\n  }\n  /**\n   * Create the `Menu`s DOM element.\n   *\n   * @return {Element}\n   *         the element that was created\n   */\n  ;\n\n  _proto.createEl = function createEl$1() {\n    var contentElType = this.options_.contentElType || 'ul';\n    this.contentEl_ = createEl(contentElType, {\n      className: 'vjs-menu-content'\n    });\n    this.contentEl_.setAttribute('role', 'menu');\n\n    var el = _Component.prototype.createEl.call(this, 'div', {\n      append: this.contentEl_,\n      className: 'vjs-menu'\n    });\n\n    el.appendChild(this.contentEl_); // Prevent clicks from bubbling up. Needed for Menu Buttons,\n    // where a click on the parent is significant\n\n    on(el, 'click', function (event) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n    });\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    this.contentEl_ = null;\n    this.boundHandleBlur_ = null;\n    this.boundHandleTapClick_ = null;\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Called when a `MenuItem` loses focus.\n   *\n   * @param {EventTarget~Event} event\n   *        The `blur` event that caused this function to be called.\n   *\n   * @listens blur\n   */\n  ;\n\n  _proto.handleBlur = function handleBlur(event) {\n    var relatedTarget = event.relatedTarget || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement; // Close menu popup when a user clicks outside the menu\n\n    if (!this.children().some(function (element) {\n      return element.el() === relatedTarget;\n    })) {\n      var btn = this.menuButton_;\n\n      if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\n        btn.unpressButton();\n      }\n    }\n  }\n  /**\n   * Called when a `MenuItem` gets clicked or tapped.\n   *\n   * @param {EventTarget~Event} event\n   *        The `click` or `tap` event that caused this function to be called.\n   *\n   * @listens click,tap\n   */\n  ;\n\n  _proto.handleTapClick = function handleTapClick(event) {\n    // Unpress the associated MenuButton, and move focus back to it\n    if (this.menuButton_) {\n      this.menuButton_.unpressButton();\n      var childComponents = this.children();\n\n      if (!Array.isArray(childComponents)) {\n        return;\n      }\n\n      var foundComponent = childComponents.filter(function (component) {\n        return component.el() === event.target;\n      })[0];\n\n      if (!foundComponent) {\n        return;\n      } // don't focus menu button if item is a caption settings item\n      // because focus will move elsewhere\n\n\n      if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\n        this.menuButton_.focus();\n      }\n    }\n  }\n  /**\n   * Handle a `keydown` event on this menu. This listener is added in the constructor.\n   *\n   * @param {EventTarget~Event} event\n   *        A `keydown` event that happened on the menu.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Left and Down Arrows\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Down')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward(); // Up and Right Arrows\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Up')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack();\n    }\n  }\n  /**\n   * Move to next (lower) menu item for keyboard users.\n   */\n  ;\n\n  _proto.stepForward = function stepForward() {\n    var stepChild = 0;\n\n    if (this.focusedChild_ !== undefined) {\n      stepChild = this.focusedChild_ + 1;\n    }\n\n    this.focus(stepChild);\n  }\n  /**\n   * Move to previous (higher) menu item for keyboard users.\n   */\n  ;\n\n  _proto.stepBack = function stepBack() {\n    var stepChild = 0;\n\n    if (this.focusedChild_ !== undefined) {\n      stepChild = this.focusedChild_ - 1;\n    }\n\n    this.focus(stepChild);\n  }\n  /**\n   * Set focus on a {@link MenuItem} in the `Menu`.\n   *\n   * @param {Object|string} [item=0]\n   *        Index of child item set focus on.\n   */\n  ;\n\n  _proto.focus = function focus(item) {\n    if (item === void 0) {\n      item = 0;\n    }\n\n    var children = this.children().slice();\n    var haveTitle = children.length && children[0].hasClass('vjs-menu-title');\n\n    if (haveTitle) {\n      children.shift();\n    }\n\n    if (children.length > 0) {\n      if (item < 0) {\n        item = 0;\n      } else if (item >= children.length) {\n        item = children.length - 1;\n      }\n\n      this.focusedChild_ = item;\n      children[item].el_.focus();\n    }\n  };\n\n  return Menu;\n}(Component$1);\n\nComponent$1.registerComponent('Menu', Menu);\n\n/**\n * A `MenuButton` class for any popup {@link Menu}.\n *\n * @extends Component\n */\n\nvar MenuButton = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MenuButton, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function MenuButton(player, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _Component.call(this, player, options) || this;\n    _this.menuButton_ = new Button(player, options);\n\n    _this.menuButton_.controlText(_this.controlText_);\n\n    _this.menuButton_.el_.setAttribute('aria-haspopup', 'true'); // Add buildCSSClass values to the button, not the wrapper\n\n\n    var buttonClass = Button.prototype.buildCSSClass();\n    _this.menuButton_.el_.className = _this.buildCSSClass() + ' ' + buttonClass;\n\n    _this.menuButton_.removeClass('vjs-control');\n\n    _this.addChild(_this.menuButton_);\n\n    _this.update();\n\n    _this.enabled_ = true;\n\n    var handleClick = function handleClick(e) {\n      return _this.handleClick(e);\n    };\n\n    _this.handleMenuKeyUp_ = function (e) {\n      return _this.handleMenuKeyUp(e);\n    };\n\n    _this.on(_this.menuButton_, 'tap', handleClick);\n\n    _this.on(_this.menuButton_, 'click', handleClick);\n\n    _this.on(_this.menuButton_, 'keydown', function (e) {\n      return _this.handleKeyDown(e);\n    });\n\n    _this.on(_this.menuButton_, 'mouseenter', function () {\n      _this.addClass('vjs-hover');\n\n      _this.menu.show();\n\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', _this.handleMenuKeyUp_);\n    });\n\n    _this.on('mouseleave', function (e) {\n      return _this.handleMouseLeave(e);\n    });\n\n    _this.on('keydown', function (e) {\n      return _this.handleSubmenuKeyDown(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Update the menu based on the current state of its items.\n   */\n\n\n  var _proto = MenuButton.prototype;\n\n  _proto.update = function update() {\n    var menu = this.createMenu();\n\n    if (this.menu) {\n      this.menu.dispose();\n      this.removeChild(this.menu);\n    }\n\n    this.menu = menu;\n    this.addChild(menu);\n    /**\n     * Track the state of the menu button\n     *\n     * @type {Boolean}\n     * @private\n     */\n\n    this.buttonPressed_ = false;\n    this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n\n    if (this.items && this.items.length <= this.hideThreshold_) {\n      this.hide();\n      this.menu.contentEl_.removeAttribute('role');\n    } else {\n      this.show();\n      this.menu.contentEl_.setAttribute('role', 'menu');\n    }\n  }\n  /**\n   * Create the menu and add all items to it.\n   *\n   * @return {Menu}\n   *         The constructed menu\n   */\n  ;\n\n  _proto.createMenu = function createMenu() {\n    var menu = new Menu(this.player_, {\n      menuButton: this\n    });\n    /**\n     * Hide the menu if the number of items is less than or equal to this threshold. This defaults\n     * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\n     * it here because every time we run `createMenu` we need to reset the value.\n     *\n     * @protected\n     * @type {Number}\n     */\n\n    this.hideThreshold_ = 0; // Add a title list item to the top\n\n    if (this.options_.title) {\n      var titleEl = createEl('li', {\n        className: 'vjs-menu-title',\n        textContent: toTitleCase$1(this.options_.title),\n        tabIndex: -1\n      });\n      var titleComponent = new Component$1(this.player_, {\n        el: titleEl\n      });\n      menu.addItem(titleComponent);\n    }\n\n    this.items = this.createItems();\n\n    if (this.items) {\n      // Add menu items to the menu\n      for (var i = 0; i < this.items.length; i++) {\n        menu.addItem(this.items[i]);\n      }\n    }\n\n    return menu;\n  }\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   * @abstract\n   */\n  ;\n\n  _proto.createItems = function createItems() {}\n  /**\n   * Create the `MenuButtons`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: this.buildWrapperCSSClass()\n    }, {});\n  }\n  /**\n   * Allow sub components to stack CSS class names for the wrapper element\n   *\n   * @return {string}\n   *         The constructed wrapper DOM `className`\n   */\n  ;\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\n\n    if (this.options_.inline === true) {\n      menuButtonClass += '-inline';\n    } else {\n      menuButtonClass += '-popup';\n    } // TODO: Fix the CSS so that this isn't necessary\n\n\n    var buttonClass = Button.prototype.buildCSSClass();\n    return \"vjs-menu-button \" + menuButtonClass + \" \" + buttonClass + \" \" + _Component.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\n\n    if (this.options_.inline === true) {\n      menuButtonClass += '-inline';\n    } else {\n      menuButtonClass += '-popup';\n    }\n\n    return \"vjs-menu-button \" + menuButtonClass + \" \" + _Component.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Get or set the localized control text that will be used for accessibility.\n   *\n   * > NOTE: This will come from the internal `menuButton_` element.\n   *\n   * @param {string} [text]\n   *        Control text for element.\n   *\n   * @param {Element} [el=this.menuButton_.el()]\n   *        Element to set the title on.\n   *\n   * @return {string}\n   *         - The control text when getting\n   */\n  ;\n\n  _proto.controlText = function controlText(text, el) {\n    if (el === void 0) {\n      el = this.menuButton_.el();\n    }\n\n    return this.menuButton_.controlText(text, el);\n  }\n  /**\n   * Dispose of the `menu-button` and all child components.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.handleMouseLeave();\n\n    _Component.prototype.dispose.call(this);\n  }\n  /**\n   * Handle a click on a `MenuButton`.\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    if (this.buttonPressed_) {\n      this.unpressButton();\n    } else {\n      this.pressButton();\n    }\n  }\n  /**\n   * Handle `mouseleave` for `MenuButton`.\n   *\n   * @param {EventTarget~Event} event\n   *        The `mouseleave` event that caused this function to be called.\n   *\n   * @listens mouseleave\n   */\n  ;\n\n  _proto.handleMouseLeave = function handleMouseLeave(event) {\n    this.removeClass('vjs-hover');\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', this.handleMenuKeyUp_);\n  }\n  /**\n   * Set the focus to the actual button, not to this element\n   */\n  ;\n\n  _proto.focus = function focus() {\n    this.menuButton_.focus();\n  }\n  /**\n   * Remove the focus from the actual button, not this element\n   */\n  ;\n\n  _proto.blur = function blur() {\n    this.menuButton_.blur();\n  }\n  /**\n   * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      } // Don't preventDefault for Tab key - we still want to lose focus\n\n\n      if (!keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n        event.preventDefault(); // Set focus back to the menu button's button\n\n        this.menuButton_.focus();\n      } // Up Arrow or Down Arrow also 'press' the button to open the menu\n\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Up') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Down')) {\n      if (!this.buttonPressed_) {\n        event.preventDefault();\n        this.pressButton();\n      }\n    }\n  }\n  /**\n   * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\n   * the constructor.\n   *\n   * @param {EventTarget~Event} event\n   *        Key press event\n   *\n   * @listens keyup\n   */\n  ;\n\n  _proto.handleMenuKeyUp = function handleMenuKeyUp(event) {\n    // Escape hides popup menu\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n      this.removeClass('vjs-hover');\n    }\n  }\n  /**\n   * This method name now delegates to `handleSubmenuKeyDown`. This means\n   * anyone calling `handleSubmenuKeyPress` will not see their method calls\n   * stop working.\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to be called.\n   */\n  ;\n\n  _proto.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) {\n    this.handleSubmenuKeyDown(event);\n  }\n  /**\n   * Handle a `keydown` event on a sub-menu. The listener for this is added in\n   * the constructor.\n   *\n   * @param {EventTarget~Event} event\n   *        Key press event\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleSubmenuKeyDown = function handleSubmenuKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      } // Don't preventDefault for Tab key - we still want to lose focus\n\n\n      if (!keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Tab')) {\n        event.preventDefault(); // Set focus back to the menu button's button\n\n        this.menuButton_.focus();\n      }\n    }\n  }\n  /**\n   * Put the current `MenuButton` into a pressed state.\n   */\n  ;\n\n  _proto.pressButton = function pressButton() {\n    if (this.enabled_) {\n      this.buttonPressed_ = true;\n      this.menu.show();\n      this.menu.lockShowing();\n      this.menuButton_.el_.setAttribute('aria-expanded', 'true'); // set the focus into the submenu, except on iOS where it is resulting in\n      // undesired scrolling behavior when the player is in an iframe\n\n      if (IS_IOS && isInFrame()) {\n        // Return early so that the menu isn't focused\n        return;\n      }\n\n      this.menu.focus();\n    }\n  }\n  /**\n   * Take the current `MenuButton` out of a pressed state.\n   */\n  ;\n\n  _proto.unpressButton = function unpressButton() {\n    if (this.enabled_) {\n      this.buttonPressed_ = false;\n      this.menu.unlockShowing();\n      this.menu.hide();\n      this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n    }\n  }\n  /**\n   * Disable the `MenuButton`. Don't allow it to be clicked.\n   */\n  ;\n\n  _proto.disable = function disable() {\n    this.unpressButton();\n    this.enabled_ = false;\n    this.addClass('vjs-disabled');\n    this.menuButton_.disable();\n  }\n  /**\n   * Enable the `MenuButton`. Allow it to be clicked.\n   */\n  ;\n\n  _proto.enable = function enable() {\n    this.enabled_ = true;\n    this.removeClass('vjs-disabled');\n    this.menuButton_.enable();\n  };\n\n  return MenuButton;\n}(Component$1);\n\nComponent$1.registerComponent('MenuButton', MenuButton);\n\n/**\n * The base class for buttons that toggle specific  track types (e.g. subtitles).\n *\n * @extends MenuButton\n */\n\nvar TrackButton = /*#__PURE__*/function (_MenuButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TrackButton, _MenuButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function TrackButton(player, options) {\n    var _this;\n\n    var tracks = options.tracks;\n    _this = _MenuButton.call(this, player, options) || this;\n\n    if (_this.items.length <= 1) {\n      _this.hide();\n    }\n\n    if (!tracks) {\n      return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this);\n    }\n\n    var updateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.update);\n    tracks.addEventListener('removetrack', updateHandler);\n    tracks.addEventListener('addtrack', updateHandler);\n    tracks.addEventListener('labelchange', updateHandler);\n\n    _this.player_.on('ready', updateHandler);\n\n    _this.player_.on('dispose', function () {\n      tracks.removeEventListener('removetrack', updateHandler);\n      tracks.removeEventListener('addtrack', updateHandler);\n      tracks.removeEventListener('labelchange', updateHandler);\n    });\n\n    return _this;\n  }\n\n  return TrackButton;\n}(MenuButton);\n\nComponent$1.registerComponent('TrackButton', TrackButton);\n\n/**\n * @file menu-keys.js\n */\n\n/**\n  * All keys used for operation of a menu (`MenuButton`, `Menu`, and `MenuItem`)\n  * Note that 'Enter' and 'Space' are not included here (otherwise they would\n  * prevent the `MenuButton` and `MenuItem` from being keyboard-clickable)\n  * @typedef MenuKeys\n  * @array\n  */\nvar MenuKeys = ['Tab', 'Esc', 'Up', 'Down', 'Right', 'Left'];\n\n/**\n * The component for a menu item. `<li>`\n *\n * @extends ClickableComponent\n */\n\nvar MenuItem = /*#__PURE__*/function (_ClickableComponent) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MenuItem, _ClickableComponent);\n\n  /**\n   * Creates an instance of the this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   *\n   */\n  function MenuItem(player, options) {\n    var _this;\n\n    _this = _ClickableComponent.call(this, player, options) || this;\n    _this.selectable = options.selectable;\n    _this.isSelected_ = options.selected || false;\n    _this.multiSelectable = options.multiSelectable;\n\n    _this.selected(_this.isSelected_);\n\n    if (_this.selectable) {\n      if (_this.multiSelectable) {\n        _this.el_.setAttribute('role', 'menuitemcheckbox');\n      } else {\n        _this.el_.setAttribute('role', 'menuitemradio');\n      }\n    } else {\n      _this.el_.setAttribute('role', 'menuitem');\n    }\n\n    return _this;\n  }\n  /**\n   * Create the `MenuItem's DOM element\n   *\n   * @param {string} [type=li]\n   *        Element's node type, not actually used, always set to `li`.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element\n   *\n   * @param {Object} [attrs={}]\n   *        An object of attributes that should be set on the element\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n\n\n  var _proto = MenuItem.prototype;\n\n  _proto.createEl = function createEl$1(type, props, attrs) {\n    // The control is textual, not just an icon\n    this.nonIconControl = true;\n\n    var el = _ClickableComponent.prototype.createEl.call(this, 'li', assign({\n      className: 'vjs-menu-item',\n      tabIndex: -1\n    }, props), attrs); // swap icon with menu item text.\n\n\n    el.replaceChild(createEl('span', {\n      className: 'vjs-menu-item-text',\n      textContent: this.localize(this.options_.label)\n    }), el.querySelector('.vjs-icon-placeholder'));\n    return el;\n  }\n  /**\n   * Ignore keys which are used by the menu, but pass any other ones up. See\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    if (!MenuKeys.some(function (key) {\n      return keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, key);\n    })) {\n      // Pass keydown handling up for unused keys\n      _ClickableComponent.prototype.handleKeyDown.call(this, event);\n    }\n  }\n  /**\n   * Any click on a `MenuItem` puts it into the selected state.\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    this.selected(true);\n  }\n  /**\n   * Set the state for this menu item as selected or not.\n   *\n   * @param {boolean} selected\n   *        if the menu item is selected or not\n   */\n  ;\n\n  _proto.selected = function selected(_selected) {\n    if (this.selectable) {\n      if (_selected) {\n        this.addClass('vjs-selected');\n        this.el_.setAttribute('aria-checked', 'true'); // aria-checked isn't fully supported by browsers/screen readers,\n        // so indicate selected state to screen reader in the control text.\n\n        this.controlText(', selected');\n        this.isSelected_ = true;\n      } else {\n        this.removeClass('vjs-selected');\n        this.el_.setAttribute('aria-checked', 'false'); // Indicate un-selected state to screen reader\n\n        this.controlText('');\n        this.isSelected_ = false;\n      }\n    }\n  };\n\n  return MenuItem;\n}(ClickableComponent);\n\nComponent$1.registerComponent('MenuItem', MenuItem);\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @extends MenuItem\n */\n\nvar TextTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrackMenuItem, _MenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function TextTrackMenuItem(player, options) {\n    var _this;\n\n    var track = options.track;\n    var tracks = player.textTracks(); // Modify options for parent MenuItem class's init.\n\n    options.label = track.label || track.language || 'Unknown';\n    options.selected = track.mode === 'showing';\n    _this = _MenuItem.call(this, player, options) || this;\n    _this.track = track; // Determine the relevant kind(s) of tracks for this component and filter\n    // out empty kinds.\n\n    _this.kinds = (options.kinds || [options.kind || _this.track.kind]).filter(Boolean);\n\n    var changeHandler = function changeHandler() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), args);\n    };\n\n    var selectedLanguageChangeHandler = function selectedLanguageChangeHandler() {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      _this.handleSelectedLanguageChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), args);\n    };\n\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\n    tracks.addEventListener('change', changeHandler);\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n\n    _this.on('dispose', function () {\n      player.off(['loadstart', 'texttrackchange'], changeHandler);\n      tracks.removeEventListener('change', changeHandler);\n      tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n    }); // iOS7 doesn't dispatch change events to TextTrackLists when an\n    // associated track's mode changes. Without something like\n    // Object.observe() (also not present on iOS7), it's not\n    // possible to detect changes to the mode attribute and polyfill\n    // the change event. As a poor substitute, we manually dispatch\n    // change events whenever the controls modify the mode.\n\n\n    if (tracks.onchange === undefined) {\n      var event;\n\n      _this.on(['tap', 'click'], function () {\n        if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event !== 'object') {\n          // Android 2.3 throws an Illegal Constructor error for window.Event\n          try {\n            event = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event('change');\n          } catch (err) {// continue regardless of error\n          }\n        }\n\n        if (!event) {\n          event = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createEvent('Event');\n          event.initEvent('change', true, true);\n        }\n\n        tracks.dispatchEvent(event);\n      });\n    } // set the default state based on current tracks\n\n\n    _this.handleTracksChange();\n\n    return _this;\n  }\n  /**\n   * This gets called when an `TextTrackMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n\n\n  var _proto = TextTrackMenuItem.prototype;\n\n  _proto.handleClick = function handleClick(event) {\n    var referenceTrack = this.track;\n    var tracks = this.player_.textTracks();\n\n    _MenuItem.prototype.handleClick.call(this, event);\n\n    if (!tracks) {\n      return;\n    }\n\n    for (var i = 0; i < tracks.length; i++) {\n      var track = tracks[i]; // If the track from the text tracks list is not of the right kind,\n      // skip it. We do not want to affect tracks of incompatible kind(s).\n\n      if (this.kinds.indexOf(track.kind) === -1) {\n        continue;\n      } // If this text track is the component's track and it is not showing,\n      // set it to showing.\n\n\n      if (track === referenceTrack) {\n        if (track.mode !== 'showing') {\n          track.mode = 'showing';\n        } // If this text track is not the component's track and it is not\n        // disabled, set it to disabled.\n\n      } else if (track.mode !== 'disabled') {\n        track.mode = 'disabled';\n      }\n    }\n  }\n  /**\n   * Handle text track list change\n   *\n   * @param {EventTarget~Event} event\n   *        The `change` event that caused this function to be called.\n   *\n   * @listens TextTrackList#change\n   */\n  ;\n\n  _proto.handleTracksChange = function handleTracksChange(event) {\n    var shouldBeSelected = this.track.mode === 'showing'; // Prevent redundant selected() calls because they may cause\n    // screen readers to read the appended control text unnecessarily\n\n    if (shouldBeSelected !== this.isSelected_) {\n      this.selected(shouldBeSelected);\n    }\n  };\n\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\n    if (this.track.mode === 'showing') {\n      var selectedLanguage = this.player_.cache_.selectedLanguage; // Don't replace the kind of track across the same language\n\n      if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\n        return;\n      }\n\n      this.player_.cache_.selectedLanguage = {\n        enabled: true,\n        language: this.track.language,\n        kind: this.track.kind\n      };\n    }\n  };\n\n  _proto.dispose = function dispose() {\n    // remove reference to track object on dispose\n    this.track = null;\n\n    _MenuItem.prototype.dispose.call(this);\n  };\n\n  return TextTrackMenuItem;\n}(MenuItem);\n\nComponent$1.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @extends TextTrackMenuItem\n */\n\nvar OffTextTrackMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(OffTextTrackMenuItem, _TextTrackMenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function OffTextTrackMenuItem(player, options) {\n    // Create pseudo track info\n    // Requires options['kind']\n    options.track = {\n      player: player,\n      // it is no longer necessary to store `kind` or `kinds` on the track itself\n      // since they are now stored in the `kinds` property of all instances of\n      // TextTrackMenuItem, but this will remain for backwards compatibility\n      kind: options.kind,\n      kinds: options.kinds,\n      \"default\": false,\n      mode: 'disabled'\n    };\n\n    if (!options.kinds) {\n      options.kinds = [options.kind];\n    }\n\n    if (options.label) {\n      options.track.label = options.label;\n    } else {\n      options.track.label = options.kinds.join(' and ') + ' off';\n    } // MenuItem is selectable\n\n\n    options.selectable = true; // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n\n    options.multiSelectable = false;\n    return _TextTrackMenuItem.call(this, player, options) || this;\n  }\n  /**\n   * Handle text track change\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to run\n   */\n\n\n  var _proto = OffTextTrackMenuItem.prototype;\n\n  _proto.handleTracksChange = function handleTracksChange(event) {\n    var tracks = this.player().textTracks();\n    var shouldBeSelected = true;\n\n    for (var i = 0, l = tracks.length; i < l; i++) {\n      var track = tracks[i];\n\n      if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\n        shouldBeSelected = false;\n        break;\n      }\n    } // Prevent redundant selected() calls because they may cause\n    // screen readers to read the appended control text unnecessarily\n\n\n    if (shouldBeSelected !== this.isSelected_) {\n      this.selected(shouldBeSelected);\n    }\n  };\n\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\n    var tracks = this.player().textTracks();\n    var allHidden = true;\n\n    for (var i = 0, l = tracks.length; i < l; i++) {\n      var track = tracks[i];\n\n      if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\n        allHidden = false;\n        break;\n      }\n    }\n\n    if (allHidden) {\n      this.player_.cache_.selectedLanguage = {\n        enabled: false\n      };\n    }\n  };\n\n  return OffTextTrackMenuItem;\n}(TextTrackMenuItem);\n\nComponent$1.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @extends MenuButton\n */\n\nvar TextTrackButton = /*#__PURE__*/function (_TrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrackButton, _TrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function TextTrackButton(player, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    options.tracks = player.textTracks();\n    return _TrackButton.call(this, player, options) || this;\n  }\n  /**\n   * Create a menu item for each text track\n   *\n   * @param {TextTrackMenuItem[]} [items=[]]\n   *        Existing array of items to use during creation\n   *\n   * @return {TextTrackMenuItem[]}\n   *         Array of menu items that were created\n   */\n\n\n  var _proto = TextTrackButton.prototype;\n\n  _proto.createItems = function createItems(items, TrackMenuItem) {\n    if (items === void 0) {\n      items = [];\n    }\n\n    if (TrackMenuItem === void 0) {\n      TrackMenuItem = TextTrackMenuItem;\n    }\n\n    // Label is an override for the [track] off label\n    // USed to localise captions/subtitles\n    var label;\n\n    if (this.label_) {\n      label = this.label_ + \" off\";\n    } // Add an OFF menu item to turn all tracks off\n\n\n    items.push(new OffTextTrackMenuItem(this.player_, {\n      kinds: this.kinds_,\n      kind: this.kind_,\n      label: label\n    }));\n    this.hideThreshold_ += 1;\n    var tracks = this.player_.textTracks();\n\n    if (!Array.isArray(this.kinds_)) {\n      this.kinds_ = [this.kind_];\n    }\n\n    for (var i = 0; i < tracks.length; i++) {\n      var track = tracks[i]; // only add tracks that are of an appropriate kind and have a label\n\n      if (this.kinds_.indexOf(track.kind) > -1) {\n        var item = new TrackMenuItem(this.player_, {\n          track: track,\n          kinds: this.kinds_,\n          kind: this.kind_,\n          // MenuItem is selectable\n          selectable: true,\n          // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n          multiSelectable: false\n        });\n        item.addClass(\"vjs-\" + track.kind + \"-menu-item\");\n        items.push(item);\n      }\n    }\n\n    return items;\n  };\n\n  return TextTrackButton;\n}(TrackButton);\n\nComponent$1.registerComponent('TextTrackButton', TextTrackButton);\n\n/**\n * The chapter track menu item\n *\n * @extends MenuItem\n */\n\nvar ChaptersTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ChaptersTrackMenuItem, _MenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function ChaptersTrackMenuItem(player, options) {\n    var _this;\n\n    var track = options.track;\n    var cue = options.cue;\n    var currentTime = player.currentTime(); // Modify options for parent MenuItem class's init.\n\n    options.selectable = true;\n    options.multiSelectable = false;\n    options.label = cue.text;\n    options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n    _this = _MenuItem.call(this, player, options) || this;\n    _this.track = track;\n    _this.cue = cue;\n    return _this;\n  }\n  /**\n   * This gets called when an `ChaptersTrackMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n\n\n  var _proto = ChaptersTrackMenuItem.prototype;\n\n  _proto.handleClick = function handleClick(event) {\n    _MenuItem.prototype.handleClick.call(this);\n\n    this.player_.currentTime(this.cue.startTime);\n  };\n\n  return ChaptersTrackMenuItem;\n}(MenuItem);\n\nComponent$1.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @extends TextTrackButton\n */\n\nvar ChaptersButton = /*#__PURE__*/function (_TextTrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ChaptersButton, _TextTrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function to call when this function is ready.\n   */\n  function ChaptersButton(player, options, ready) {\n    var _this;\n\n    _this = _TextTrackButton.call(this, player, options, ready) || this;\n\n    _this.selectCurrentItem_ = function () {\n      _this.items.forEach(function (item) {\n        item.selected(_this.track_.activeCues[0] === item.cue);\n      });\n    };\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = ChaptersButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-chapters-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-chapters-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n  }\n  /**\n   * Update the menu based on the current state of its items.\n   *\n   * @param {EventTarget~Event} [event]\n   *        An event that triggered this function to run.\n   *\n   * @listens TextTrackList#addtrack\n   * @listens TextTrackList#removetrack\n   * @listens TextTrackList#change\n   */\n  ;\n\n  _proto.update = function update(event) {\n    if (event && event.track && event.track.kind !== 'chapters') {\n      return;\n    }\n\n    var track = this.findChaptersTrack();\n\n    if (track !== this.track_) {\n      this.setTrack(track);\n\n      _TextTrackButton.prototype.update.call(this);\n    } else if (!this.items || track && track.cues && track.cues.length !== this.items.length) {\n      // Update the menu initially or if the number of cues has changed since set\n      _TextTrackButton.prototype.update.call(this);\n    }\n  }\n  /**\n   * Set the currently selected track for the chapters button.\n   *\n   * @param {TextTrack} track\n   *        The new track to select. Nothing will change if this is the currently selected\n   *        track.\n   */\n  ;\n\n  _proto.setTrack = function setTrack(track) {\n    if (this.track_ === track) {\n      return;\n    }\n\n    if (!this.updateHandler_) {\n      this.updateHandler_ = this.update.bind(this);\n    } // here this.track_ refers to the old track instance\n\n\n    if (this.track_) {\n      var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n\n      if (remoteTextTrackEl) {\n        remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\n      }\n\n      this.track_.removeEventListener('cuechange', this.selectCurrentItem_);\n      this.track_ = null;\n    }\n\n    this.track_ = track; // here this.track_ refers to the new track instance\n\n    if (this.track_) {\n      this.track_.mode = 'hidden';\n\n      var _remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n\n      if (_remoteTextTrackEl) {\n        _remoteTextTrackEl.addEventListener('load', this.updateHandler_);\n      }\n\n      this.track_.addEventListener('cuechange', this.selectCurrentItem_);\n    }\n  }\n  /**\n   * Find the track object that is currently in use by this ChaptersButton\n   *\n   * @return {TextTrack|undefined}\n   *         The current track or undefined if none was found.\n   */\n  ;\n\n  _proto.findChaptersTrack = function findChaptersTrack() {\n    var tracks = this.player_.textTracks() || [];\n\n    for (var i = tracks.length - 1; i >= 0; i--) {\n      // We will always choose the last track as our chaptersTrack\n      var track = tracks[i];\n\n      if (track.kind === this.kind_) {\n        return track;\n      }\n    }\n  }\n  /**\n   * Get the caption for the ChaptersButton based on the track label. This will also\n   * use the current tracks localized kind as a fallback if a label does not exist.\n   *\n   * @return {string}\n   *         The tracks current label or the localized track kind.\n   */\n  ;\n\n  _proto.getMenuCaption = function getMenuCaption() {\n    if (this.track_ && this.track_.label) {\n      return this.track_.label;\n    }\n\n    return this.localize(toTitleCase$1(this.kind_));\n  }\n  /**\n   * Create menu from chapter track\n   *\n   * @return {Menu}\n   *         New menu for the chapter buttons\n   */\n  ;\n\n  _proto.createMenu = function createMenu() {\n    this.options_.title = this.getMenuCaption();\n    return _TextTrackButton.prototype.createMenu.call(this);\n  }\n  /**\n   * Create a menu item for each text track\n   *\n   * @return {TextTrackMenuItem[]}\n   *         Array of menu items\n   */\n  ;\n\n  _proto.createItems = function createItems() {\n    var items = [];\n\n    if (!this.track_) {\n      return items;\n    }\n\n    var cues = this.track_.cues;\n\n    if (!cues) {\n      return items;\n    }\n\n    for (var i = 0, l = cues.length; i < l; i++) {\n      var cue = cues[i];\n      var mi = new ChaptersTrackMenuItem(this.player_, {\n        track: this.track_,\n        cue: cue\n      });\n      items.push(mi);\n    }\n\n    return items;\n  };\n\n  return ChaptersButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nChaptersButton.prototype.kind_ = 'chapters';\n/**\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nChaptersButton.prototype.controlText_ = 'Chapters';\nComponent$1.registerComponent('ChaptersButton', ChaptersButton);\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @extends TextTrackButton\n */\n\nvar DescriptionsButton = /*#__PURE__*/function (_TextTrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(DescriptionsButton, _TextTrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function to call when this component is ready.\n   */\n  function DescriptionsButton(player, options, ready) {\n    var _this;\n\n    _this = _TextTrackButton.call(this, player, options, ready) || this;\n    var tracks = player.textTracks();\n    var changeHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), _this.handleTracksChange);\n    tracks.addEventListener('change', changeHandler);\n\n    _this.on('dispose', function () {\n      tracks.removeEventListener('change', changeHandler);\n    });\n\n    return _this;\n  }\n  /**\n   * Handle text track change\n   *\n   * @param {EventTarget~Event} event\n   *        The event that caused this function to run\n   *\n   * @listens TextTrackList#change\n   */\n\n\n  var _proto = DescriptionsButton.prototype;\n\n  _proto.handleTracksChange = function handleTracksChange(event) {\n    var tracks = this.player().textTracks();\n    var disabled = false; // Check whether a track of a different kind is showing\n\n    for (var i = 0, l = tracks.length; i < l; i++) {\n      var track = tracks[i];\n\n      if (track.kind !== this.kind_ && track.mode === 'showing') {\n        disabled = true;\n        break;\n      }\n    } // If another track is showing, disable this menu button\n\n\n    if (disabled) {\n      this.disable();\n    } else {\n      this.enable();\n    }\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-descriptions-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-descriptions-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n  };\n\n  return DescriptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\n/**\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\nComponent$1.registerComponent('DescriptionsButton', DescriptionsButton);\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @extends TextTrackButton\n */\n\nvar SubtitlesButton = /*#__PURE__*/function (_TextTrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SubtitlesButton, _TextTrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function to call when this component is ready.\n   */\n  function SubtitlesButton(player, options, ready) {\n    return _TextTrackButton.call(this, player, options, ready) || this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = SubtitlesButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-subtitles-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-subtitles-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n  };\n\n  return SubtitlesButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\n/**\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubtitlesButton', SubtitlesButton);\n\n/**\n * The menu item for caption track settings menu\n *\n * @extends TextTrackMenuItem\n */\n\nvar CaptionSettingsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(CaptionSettingsMenuItem, _TextTrackMenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function CaptionSettingsMenuItem(player, options) {\n    var _this;\n\n    options.track = {\n      player: player,\n      kind: options.kind,\n      label: options.kind + ' settings',\n      selectable: false,\n      \"default\": false,\n      mode: 'disabled'\n    }; // CaptionSettingsMenuItem has no concept of 'selected'\n\n    options.selectable = false;\n    options.name = 'CaptionSettingsMenuItem';\n    _this = _TextTrackMenuItem.call(this, player, options) || this;\n\n    _this.addClass('vjs-texttrack-settings');\n\n    _this.controlText(', opens ' + options.kind + ' settings dialog');\n\n    return _this;\n  }\n  /**\n   * This gets called when an `CaptionSettingsMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n\n\n  var _proto = CaptionSettingsMenuItem.prototype;\n\n  _proto.handleClick = function handleClick(event) {\n    this.player().getChild('textTrackSettings').open();\n  };\n\n  return CaptionSettingsMenuItem;\n}(TextTrackMenuItem);\n\nComponent$1.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n\n/**\n * The button component for toggling and selecting captions\n *\n * @extends TextTrackButton\n */\n\nvar CaptionsButton = /*#__PURE__*/function (_TextTrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(CaptionsButton, _TextTrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        The function to call when this component is ready.\n   */\n  function CaptionsButton(player, options, ready) {\n    return _TextTrackButton.call(this, player, options, ready) || this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = CaptionsButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-captions-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-captions-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n  }\n  /**\n   * Create caption menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  ;\n\n  _proto.createItems = function createItems() {\n    var items = [];\n\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n      items.push(new CaptionSettingsMenuItem(this.player_, {\n        kind: this.kind_\n      }));\n      this.hideThreshold_ += 1;\n    }\n\n    return _TextTrackButton.prototype.createItems.call(this, items);\n  };\n\n  return CaptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\n\n\nCaptionsButton.prototype.kind_ = 'captions';\n/**\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\nCaptionsButton.prototype.controlText_ = 'Captions';\nComponent$1.registerComponent('CaptionsButton', CaptionsButton);\n\n/**\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\n * in the SubsCapsMenu.\n *\n * @extends TextTrackMenuItem\n */\n\nvar SubsCapsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SubsCapsMenuItem, _TextTrackMenuItem);\n\n  function SubsCapsMenuItem() {\n    return _TextTrackMenuItem.apply(this, arguments) || this;\n  }\n\n  var _proto = SubsCapsMenuItem.prototype;\n\n  _proto.createEl = function createEl$1(type, props, attrs) {\n    var el = _TextTrackMenuItem.prototype.createEl.call(this, type, props, attrs);\n\n    var parentSpan = el.querySelector('.vjs-menu-item-text');\n\n    if (this.options_.track.kind === 'captions') {\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-icon-placeholder'\n      }, {\n        'aria-hidden': true\n      }));\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-control-text',\n        // space added as the text will visually flow with the\n        // label\n        textContent: \" \" + this.localize('Captions')\n      }));\n    }\n\n    return el;\n  };\n\n  return SubsCapsMenuItem;\n}(TextTrackMenuItem);\n\nComponent$1.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n\n/**\n * The button component for toggling and selecting captions and/or subtitles\n *\n * @extends TextTrackButton\n */\n\nvar SubsCapsButton = /*#__PURE__*/function (_TextTrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SubsCapsButton, _TextTrackButton);\n\n  function SubsCapsButton(player, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _TextTrackButton.call(this, player, options) || this; // Although North America uses \"captions\" in most cases for\n    // \"captions and subtitles\" other locales use \"subtitles\"\n\n    _this.label_ = 'subtitles';\n\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(_this.player_.language_) > -1) {\n      _this.label_ = 'captions';\n    }\n\n    _this.menuButton_.controlText(toTitleCase$1(_this.label_));\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = SubsCapsButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-subs-caps-button \" + _TextTrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-subs-caps-button \" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\n  }\n  /**\n   * Create caption/subtitles menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  ;\n\n  _proto.createItems = function createItems() {\n    var items = [];\n\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n      items.push(new CaptionSettingsMenuItem(this.player_, {\n        kind: this.label_\n      }));\n      this.hideThreshold_ += 1;\n    }\n\n    items = _TextTrackButton.prototype.createItems.call(this, items, SubsCapsMenuItem);\n    return items;\n  };\n\n  return SubsCapsButton;\n}(TextTrackButton);\n/**\n * `kind`s of TextTrack to look for to associate it with this menu.\n *\n * @type {array}\n * @private\n */\n\n\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\n/**\n * The text that should display over the `SubsCapsButton`s controls.\n *\n *\n * @type {string}\n * @private\n */\n\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubsCapsButton', SubsCapsButton);\n\n/**\n * An {@link AudioTrack} {@link MenuItem}\n *\n * @extends MenuItem\n */\n\nvar AudioTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(AudioTrackMenuItem, _MenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function AudioTrackMenuItem(player, options) {\n    var _this;\n\n    var track = options.track;\n    var tracks = player.audioTracks(); // Modify options for parent MenuItem class's init.\n\n    options.label = track.label || track.language || 'Unknown';\n    options.selected = track.enabled;\n    _this = _MenuItem.call(this, player, options) || this;\n    _this.track = track;\n\n    _this.addClass(\"vjs-\" + track.kind + \"-menu-item\");\n\n    var changeHandler = function changeHandler() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), args);\n    };\n\n    tracks.addEventListener('change', changeHandler);\n\n    _this.on('dispose', function () {\n      tracks.removeEventListener('change', changeHandler);\n    });\n\n    return _this;\n  }\n\n  var _proto = AudioTrackMenuItem.prototype;\n\n  _proto.createEl = function createEl$1(type, props, attrs) {\n    var el = _MenuItem.prototype.createEl.call(this, type, props, attrs);\n\n    var parentSpan = el.querySelector('.vjs-menu-item-text');\n\n    if (this.options_.track.kind === 'main-desc') {\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-icon-placeholder'\n      }, {\n        'aria-hidden': true\n      }));\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-control-text',\n        textContent: ' ' + this.localize('Descriptions')\n      }));\n    }\n\n    return el;\n  }\n  /**\n   * This gets called when an `AudioTrackMenuItem is \"clicked\". See {@link ClickableComponent}\n   * for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    _MenuItem.prototype.handleClick.call(this, event); // the audio track list will automatically toggle other tracks\n    // off for us.\n\n\n    this.track.enabled = true; // when native audio tracks are used, we want to make sure that other tracks are turned off\n\n    if (this.player_.tech_.featuresNativeAudioTracks) {\n      var tracks = this.player_.audioTracks();\n\n      for (var i = 0; i < tracks.length; i++) {\n        var track = tracks[i]; // skip the current track since we enabled it above\n\n        if (track === this.track) {\n          continue;\n        }\n\n        track.enabled = track === this.track;\n      }\n    }\n  }\n  /**\n   * Handle any {@link AudioTrack} change.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The {@link AudioTrackList#change} event that caused this to run.\n   *\n   * @listens AudioTrackList#change\n   */\n  ;\n\n  _proto.handleTracksChange = function handleTracksChange(event) {\n    this.selected(this.track.enabled);\n  };\n\n  return AudioTrackMenuItem;\n}(MenuItem);\n\nComponent$1.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\n\n/**\n * The base class for buttons that toggle specific {@link AudioTrack} types.\n *\n * @extends TrackButton\n */\n\nvar AudioTrackButton = /*#__PURE__*/function (_TrackButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(AudioTrackButton, _TrackButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  function AudioTrackButton(player, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    options.tracks = player.audioTracks();\n    return _TrackButton.call(this, player, options) || this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n\n\n  var _proto = AudioTrackButton.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-audio-button \" + _TrackButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-audio-button \" + _TrackButton.prototype.buildWrapperCSSClass.call(this);\n  }\n  /**\n   * Create a menu item for each audio track\n   *\n   * @param {AudioTrackMenuItem[]} [items=[]]\n   *        An array of existing menu items to use.\n   *\n   * @return {AudioTrackMenuItem[]}\n   *         An array of menu items\n   */\n  ;\n\n  _proto.createItems = function createItems(items) {\n    if (items === void 0) {\n      items = [];\n    }\n\n    // if there's only one audio track, there no point in showing it\n    this.hideThreshold_ = 1;\n    var tracks = this.player_.audioTracks();\n\n    for (var i = 0; i < tracks.length; i++) {\n      var track = tracks[i];\n      items.push(new AudioTrackMenuItem(this.player_, {\n        track: track,\n        // MenuItem is selectable\n        selectable: true,\n        // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n        multiSelectable: false\n      }));\n    }\n\n    return items;\n  };\n\n  return AudioTrackButton;\n}(TrackButton);\n/**\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\nComponent$1.registerComponent('AudioTrackButton', AudioTrackButton);\n\n/**\n * The specific menu item type for selecting a playback rate.\n *\n * @extends MenuItem\n */\n\nvar PlaybackRateMenuItem = /*#__PURE__*/function (_MenuItem) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PlaybackRateMenuItem, _MenuItem);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function PlaybackRateMenuItem(player, options) {\n    var _this;\n\n    var label = options.rate;\n    var rate = parseFloat(label, 10); // Modify options for parent MenuItem class's init.\n\n    options.label = label;\n    options.selected = rate === player.playbackRate();\n    options.selectable = true;\n    options.multiSelectable = false;\n    _this = _MenuItem.call(this, player, options) || this;\n    _this.label = label;\n    _this.rate = rate;\n\n    _this.on(player, 'ratechange', function (e) {\n      return _this.update(e);\n    });\n\n    return _this;\n  }\n  /**\n   * This gets called when an `PlaybackRateMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n\n\n  var _proto = PlaybackRateMenuItem.prototype;\n\n  _proto.handleClick = function handleClick(event) {\n    _MenuItem.prototype.handleClick.call(this);\n\n    this.player().playbackRate(this.rate);\n  }\n  /**\n   * Update the PlaybackRateMenuItem when the playbackrate changes.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `ratechange` event that caused this function to run.\n   *\n   * @listens Player#ratechange\n   */\n  ;\n\n  _proto.update = function update(event) {\n    this.selected(this.player().playbackRate() === this.rate);\n  };\n\n  return PlaybackRateMenuItem;\n}(MenuItem);\n/**\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\nComponent$1.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\n\n/**\n * The component for controlling the playback rate.\n *\n * @extends MenuButton\n */\n\nvar PlaybackRateMenuButton = /*#__PURE__*/function (_MenuButton) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PlaybackRateMenuButton, _MenuButton);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  function PlaybackRateMenuButton(player, options) {\n    var _this;\n\n    _this = _MenuButton.call(this, player, options) || this;\n\n    _this.menuButton_.el_.setAttribute('aria-describedby', _this.labelElId_);\n\n    _this.updateVisibility();\n\n    _this.updateLabel();\n\n    _this.on(player, 'loadstart', function (e) {\n      return _this.updateVisibility(e);\n    });\n\n    _this.on(player, 'ratechange', function (e) {\n      return _this.updateLabel(e);\n    });\n\n    _this.on(player, 'playbackrateschange', function (e) {\n      return _this.handlePlaybackRateschange(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n\n\n  var _proto = PlaybackRateMenuButton.prototype;\n\n  _proto.createEl = function createEl$1() {\n    var el = _MenuButton.prototype.createEl.call(this);\n\n    this.labelElId_ = 'vjs-playback-rate-value-label-' + this.id_;\n    this.labelEl_ = createEl('div', {\n      className: 'vjs-playback-rate-value',\n      id: this.labelElId_,\n      textContent: '1x'\n    });\n    el.appendChild(this.labelEl_);\n    return el;\n  };\n\n  _proto.dispose = function dispose() {\n    this.labelEl_ = null;\n\n    _MenuButton.prototype.dispose.call(this);\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  ;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-playback-rate \" + _MenuButton.prototype.buildCSSClass.call(this);\n  };\n\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\n    return \"vjs-playback-rate \" + _MenuButton.prototype.buildWrapperCSSClass.call(this);\n  }\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   */\n  ;\n\n  _proto.createItems = function createItems() {\n    var rates = this.playbackRates();\n    var items = [];\n\n    for (var i = rates.length - 1; i >= 0; i--) {\n      items.push(new PlaybackRateMenuItem(this.player(), {\n        rate: rates[i] + 'x'\n      }));\n    }\n\n    return items;\n  }\n  /**\n   * Updates ARIA accessibility attributes\n   */\n  ;\n\n  _proto.updateARIAAttributes = function updateARIAAttributes() {\n    // Current playback rate\n    this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n  }\n  /**\n   * This gets called when an `PlaybackRateMenuButton` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {EventTarget~Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  ;\n\n  _proto.handleClick = function handleClick(event) {\n    // select next rate option\n    var currentRate = this.player().playbackRate();\n    var rates = this.playbackRates();\n    var currentIndex = rates.indexOf(currentRate); // this get the next rate and it will select first one if the last one currently selected\n\n    var newIndex = (currentIndex + 1) % rates.length;\n    this.player().playbackRate(rates[newIndex]);\n  }\n  /**\n   * On playbackrateschange, update the menu to account for the new items.\n   *\n   * @listens Player#playbackrateschange\n   */\n  ;\n\n  _proto.handlePlaybackRateschange = function handlePlaybackRateschange(event) {\n    this.update();\n  }\n  /**\n   * Get possible playback rates\n   *\n   * @return {Array}\n   *         All possible playback rates\n   */\n  ;\n\n  _proto.playbackRates = function playbackRates() {\n    var player = this.player();\n    return player.playbackRates && player.playbackRates() || [];\n  }\n  /**\n   * Get whether playback rates is supported by the tech\n   * and an array of playback rates exists\n   *\n   * @return {boolean}\n   *         Whether changing playback rate is supported\n   */\n  ;\n\n  _proto.playbackRateSupported = function playbackRateSupported() {\n    return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n  }\n  /**\n   * Hide playback rate controls when they're no playback rate options to select\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#loadstart\n   */\n  ;\n\n  _proto.updateVisibility = function updateVisibility(event) {\n    if (this.playbackRateSupported()) {\n      this.removeClass('vjs-hidden');\n    } else {\n      this.addClass('vjs-hidden');\n    }\n  }\n  /**\n   * Update button label when rate changed\n   *\n   * @param {EventTarget~Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#ratechange\n   */\n  ;\n\n  _proto.updateLabel = function updateLabel(event) {\n    if (this.playbackRateSupported()) {\n      this.labelEl_.textContent = this.player().playbackRate() + 'x';\n    }\n  };\n\n  return PlaybackRateMenuButton;\n}(MenuButton);\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\n\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\nComponent$1.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n */\n\nvar Spacer = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Spacer, _Component);\n\n  function Spacer() {\n    return _Component.apply(this, arguments) || this;\n  }\n\n  var _proto = Spacer.prototype;\n\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-spacer \" + _Component.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl(tag, props, attributes) {\n    if (tag === void 0) {\n      tag = 'div';\n    }\n\n    if (props === void 0) {\n      props = {};\n    }\n\n    if (attributes === void 0) {\n      attributes = {};\n    }\n\n    if (!props.className) {\n      props.className = this.buildCSSClass();\n    }\n\n    return _Component.prototype.createEl.call(this, tag, props, attributes);\n  };\n\n  return Spacer;\n}(Component$1);\n\nComponent$1.registerComponent('Spacer', Spacer);\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n */\n\nvar CustomControlSpacer = /*#__PURE__*/function (_Spacer) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(CustomControlSpacer, _Spacer);\n\n  function CustomControlSpacer() {\n    return _Spacer.apply(this, arguments) || this;\n  }\n\n  var _proto = CustomControlSpacer.prototype;\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-custom-control-spacer \" + _Spacer.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    return _Spacer.prototype.createEl.call(this, 'div', {\n      className: this.buildCSSClass(),\n      // No-flex/table-cell mode requires there be some content\n      // in the cell to fill the remaining space of the table.\n      textContent: \"\\xA0\"\n    });\n  };\n\n  return CustomControlSpacer;\n}(Spacer);\n\nComponent$1.registerComponent('CustomControlSpacer', CustomControlSpacer);\n\n/**\n * Container of main controls.\n *\n * @extends Component\n */\n\nvar ControlBar = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ControlBar, _Component);\n\n  function ControlBar() {\n    return _Component.apply(this, arguments) || this;\n  }\n\n  var _proto = ControlBar.prototype;\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'div', {\n      className: 'vjs-control-bar',\n      dir: 'ltr'\n    });\n  };\n\n  return ControlBar;\n}(Component$1);\n/**\n * Default options for `ControlBar`\n *\n * @type {Object}\n * @private\n */\n\n\nControlBar.prototype.options_ = {\n  children: ['playToggle', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'fullscreenToggle']\n};\n\nif ('exitPictureInPicture' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n  ControlBar.prototype.options_.children.splice(ControlBar.prototype.options_.children.length - 1, 0, 'pictureInPictureToggle');\n}\n\nComponent$1.registerComponent('ControlBar', ControlBar);\n\n/**\n * A display that indicates an error has occurred. This means that the video\n * is unplayable.\n *\n * @extends ModalDialog\n */\n\nvar ErrorDisplay = /*#__PURE__*/function (_ModalDialog) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ErrorDisplay, _ModalDialog);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param  {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param  {Object} [options]\n   *         The key/value store of player options.\n   */\n  function ErrorDisplay(player, options) {\n    var _this;\n\n    _this = _ModalDialog.call(this, player, options) || this;\n\n    _this.on(player, 'error', function (e) {\n      return _this.open(e);\n    });\n\n    return _this;\n  }\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   *\n   * @deprecated Since version 5.\n   */\n\n\n  var _proto = ErrorDisplay.prototype;\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return \"vjs-error-display \" + _ModalDialog.prototype.buildCSSClass.call(this);\n  }\n  /**\n   * Gets the localized error message based on the `Player`s error.\n   *\n   * @return {string}\n   *         The `Player`s error message localized or an empty string.\n   */\n  ;\n\n  _proto.content = function content() {\n    var error = this.player().error();\n    return error ? this.localize(error.message) : '';\n  };\n\n  return ErrorDisplay;\n}(ModalDialog);\n/**\n * The default options for an `ErrorDisplay`.\n *\n * @private\n */\n\n\nErrorDisplay.prototype.options_ = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, ModalDialog.prototype.options_, {\n  pauseOnOpen: false,\n  fillAlways: true,\n  temporary: false,\n  uncloseable: true\n});\nComponent$1.registerComponent('ErrorDisplay', ErrorDisplay);\n\nvar LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\nvar COLOR_BLACK = ['#000', 'Black'];\nvar COLOR_BLUE = ['#00F', 'Blue'];\nvar COLOR_CYAN = ['#0FF', 'Cyan'];\nvar COLOR_GREEN = ['#0F0', 'Green'];\nvar COLOR_MAGENTA = ['#F0F', 'Magenta'];\nvar COLOR_RED = ['#F00', 'Red'];\nvar COLOR_WHITE = ['#FFF', 'White'];\nvar COLOR_YELLOW = ['#FF0', 'Yellow'];\nvar OPACITY_OPAQUE = ['1', 'Opaque'];\nvar OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nvar OPACITY_TRANS = ['0', 'Transparent']; // Configuration for the various <select> elements in the DOM of this component.\n//\n// Possible keys include:\n//\n// `default`:\n//   The default option index. Only needs to be provided if not zero.\n// `parser`:\n//   A function which is used to parse the value from the selected option in\n//   a customized way.\n// `selector`:\n//   The selector used to find the associated <select> element.\n\nvar selectConfigs = {\n  backgroundColor: {\n    selector: '.vjs-bg-color > select',\n    id: 'captions-background-color-%s',\n    label: 'Color',\n    options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n  },\n  backgroundOpacity: {\n    selector: '.vjs-bg-opacity > select',\n    id: 'captions-background-opacity-%s',\n    label: 'Transparency',\n    options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS]\n  },\n  color: {\n    selector: '.vjs-fg-color > select',\n    id: 'captions-foreground-color-%s',\n    label: 'Color',\n    options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n  },\n  edgeStyle: {\n    selector: '.vjs-edge-style > select',\n    id: '%s',\n    label: 'Text Edge Style',\n    options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Dropshadow']]\n  },\n  fontFamily: {\n    selector: '.vjs-font-family > select',\n    id: 'captions-font-family-%s',\n    label: 'Font Family',\n    options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\n  },\n  fontPercent: {\n    selector: '.vjs-font-percent > select',\n    id: 'captions-font-size-%s',\n    label: 'Font Size',\n    options: [['0.50', '50%'], ['0.75', '75%'], ['1.00', '100%'], ['1.25', '125%'], ['1.50', '150%'], ['1.75', '175%'], ['2.00', '200%'], ['3.00', '300%'], ['4.00', '400%']],\n    \"default\": 2,\n    parser: function parser(v) {\n      return v === '1.00' ? null : Number(v);\n    }\n  },\n  textOpacity: {\n    selector: '.vjs-text-opacity > select',\n    id: 'captions-foreground-opacity-%s',\n    label: 'Transparency',\n    options: [OPACITY_OPAQUE, OPACITY_SEMI]\n  },\n  // Options for this object are defined below.\n  windowColor: {\n    selector: '.vjs-window-color > select',\n    id: 'captions-window-color-%s',\n    label: 'Color'\n  },\n  // Options for this object are defined below.\n  windowOpacity: {\n    selector: '.vjs-window-opacity > select',\n    id: 'captions-window-opacity-%s',\n    label: 'Transparency',\n    options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE]\n  }\n};\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\n/**\n * Get the actual value of an option.\n *\n * @param  {string} value\n *         The value to get\n *\n * @param  {Function} [parser]\n *         Optional function to adjust the value.\n *\n * @return {Mixed}\n *         - Will be `undefined` if no value exists\n *         - Will be `undefined` if the given value is \"none\".\n *         - Will be the actual value otherwise.\n *\n * @private\n */\n\nfunction parseOptionValue(value, parser) {\n  if (parser) {\n    value = parser(value);\n  }\n\n  if (value && value !== 'none') {\n    return value;\n  }\n}\n/**\n * Gets the value of the selected <option> element within a <select> element.\n *\n * @param  {Element} el\n *         the element to look in\n *\n * @param  {Function} [parser]\n *         Optional function to adjust the value.\n *\n * @return {Mixed}\n *         - Will be `undefined` if no value exists\n *         - Will be `undefined` if the given value is \"none\".\n *         - Will be the actual value otherwise.\n *\n * @private\n */\n\n\nfunction getSelectedOptionValue(el, parser) {\n  var value = el.options[el.options.selectedIndex].value;\n  return parseOptionValue(value, parser);\n}\n/**\n * Sets the selected <option> element within a <select> element based on a\n * given value.\n *\n * @param {Element} el\n *        The element to look in.\n *\n * @param {string} value\n *        the property to look on.\n *\n * @param {Function} [parser]\n *        Optional function to adjust the value before comparing.\n *\n * @private\n */\n\n\nfunction setSelectedOption(el, value, parser) {\n  if (!value) {\n    return;\n  }\n\n  for (var i = 0; i < el.options.length; i++) {\n    if (parseOptionValue(el.options[i].value, parser) === value) {\n      el.selectedIndex = i;\n      break;\n    }\n  }\n}\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\n\n\nvar TextTrackSettings = /*#__PURE__*/function (_ModalDialog) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TextTrackSettings, _ModalDialog);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *         The key/value store of player options.\n   */\n  function TextTrackSettings(player, options) {\n    var _this;\n\n    options.temporary = false;\n    _this = _ModalDialog.call(this, player, options) || this;\n    _this.updateDisplay = _this.updateDisplay.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this)); // fill the modal and pretend we have opened it\n\n    _this.fill();\n\n    _this.hasBeenOpened_ = _this.hasBeenFilled_ = true;\n    _this.endDialog = createEl('p', {\n      className: 'vjs-control-text',\n      textContent: _this.localize('End of dialog window.')\n    });\n\n    _this.el().appendChild(_this.endDialog);\n\n    _this.setDefaults(); // Grab `persistTextTrackSettings` from the player options if not passed in child options\n\n\n    if (options.persistTextTrackSettings === undefined) {\n      _this.options_.persistTextTrackSettings = _this.options_.playerOptions.persistTextTrackSettings;\n    }\n\n    _this.on(_this.$('.vjs-done-button'), 'click', function () {\n      _this.saveSettings();\n\n      _this.close();\n    });\n\n    _this.on(_this.$('.vjs-default-button'), 'click', function () {\n      _this.setDefaults();\n\n      _this.updateDisplay();\n    });\n\n    each(selectConfigs, function (config) {\n      _this.on(_this.$(config.selector), 'change', _this.updateDisplay);\n    });\n\n    if (_this.options_.persistTextTrackSettings) {\n      _this.restoreSettings();\n    }\n\n    return _this;\n  }\n\n  var _proto = TextTrackSettings.prototype;\n\n  _proto.dispose = function dispose() {\n    this.endDialog = null;\n\n    _ModalDialog.prototype.dispose.call(this);\n  }\n  /**\n   * Create a <select> element with configured options.\n   *\n   * @param {string} key\n   *        Configuration key to use during creation.\n   *\n   * @return {string}\n   *         An HTML string.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElSelect_ = function createElSelect_(key, legendId, type) {\n    var _this2 = this;\n\n    if (legendId === void 0) {\n      legendId = '';\n    }\n\n    if (type === void 0) {\n      type = 'label';\n    }\n\n    var config = selectConfigs[key];\n    var id = config.id.replace('%s', this.id_);\n    var selectLabelledbyIds = [legendId, id].join(' ').trim();\n    return [\"<\" + type + \" id=\\\"\" + id + \"\\\" class=\\\"\" + (type === 'label' ? 'vjs-label' : '') + \"\\\">\", this.localize(config.label), \"</\" + type + \">\", \"<select aria-labelledby=\\\"\" + selectLabelledbyIds + \"\\\">\"].concat(config.options.map(function (o) {\n      var optionId = id + '-' + o[1].replace(/\\W+/g, '');\n      return [\"<option id=\\\"\" + optionId + \"\\\" value=\\\"\" + o[0] + \"\\\" \", \"aria-labelledby=\\\"\" + selectLabelledbyIds + \" \" + optionId + \"\\\">\", _this2.localize(o[1]), '</option>'].join('');\n    })).concat('</select>').join('');\n  }\n  /**\n   * Create foreground color element for the component\n   *\n   * @return {string}\n   *         An HTML string.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElFgColor_ = function createElFgColor_() {\n    var legendId = \"captions-text-legend-\" + this.id_;\n    return ['<fieldset class=\"vjs-fg-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Text'), '</legend>', this.createElSelect_('color', legendId), '<span class=\"vjs-text-opacity vjs-opacity\">', this.createElSelect_('textOpacity', legendId), '</span>', '</fieldset>'].join('');\n  }\n  /**\n   * Create background color element for the component\n   *\n   * @return {string}\n   *         An HTML string.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElBgColor_ = function createElBgColor_() {\n    var legendId = \"captions-background-\" + this.id_;\n    return ['<fieldset class=\"vjs-bg-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Background'), '</legend>', this.createElSelect_('backgroundColor', legendId), '<span class=\"vjs-bg-opacity vjs-opacity\">', this.createElSelect_('backgroundOpacity', legendId), '</span>', '</fieldset>'].join('');\n  }\n  /**\n   * Create window color element for the component\n   *\n   * @return {string}\n   *         An HTML string.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElWinColor_ = function createElWinColor_() {\n    var legendId = \"captions-window-\" + this.id_;\n    return ['<fieldset class=\"vjs-window-color vjs-track-setting\">', \"<legend id=\\\"\" + legendId + \"\\\">\", this.localize('Window'), '</legend>', this.createElSelect_('windowColor', legendId), '<span class=\"vjs-window-opacity vjs-opacity\">', this.createElSelect_('windowOpacity', legendId), '</span>', '</fieldset>'].join('');\n  }\n  /**\n   * Create color elements for the component\n   *\n   * @return {Element}\n   *         The element that was created\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElColors_ = function createElColors_() {\n    return createEl('div', {\n      className: 'vjs-track-settings-colors',\n      innerHTML: [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()].join('')\n    });\n  }\n  /**\n   * Create font elements for the component\n   *\n   * @return {Element}\n   *         The element that was created.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElFont_ = function createElFont_() {\n    return createEl('div', {\n      className: 'vjs-track-settings-font',\n      innerHTML: ['<fieldset class=\"vjs-font-percent vjs-track-setting\">', this.createElSelect_('fontPercent', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-edge-style vjs-track-setting\">', this.createElSelect_('edgeStyle', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-font-family vjs-track-setting\">', this.createElSelect_('fontFamily', '', 'legend'), '</fieldset>'].join('')\n    });\n  }\n  /**\n   * Create controls for the component\n   *\n   * @return {Element}\n   *         The element that was created.\n   *\n   * @private\n   */\n  ;\n\n  _proto.createElControls_ = function createElControls_() {\n    var defaultsDescription = this.localize('restore all settings to the default values');\n    return createEl('div', {\n      className: 'vjs-track-settings-controls',\n      innerHTML: [\"<button type=\\\"button\\\" class=\\\"vjs-default-button\\\" title=\\\"\" + defaultsDescription + \"\\\">\", this.localize('Reset'), \"<span class=\\\"vjs-control-text\\\"> \" + defaultsDescription + \"</span>\", '</button>', \"<button type=\\\"button\\\" class=\\\"vjs-done-button\\\">\" + this.localize('Done') + \"</button>\"].join('')\n    });\n  };\n\n  _proto.content = function content() {\n    return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\n  };\n\n  _proto.label = function label() {\n    return this.localize('Caption Settings Dialog');\n  };\n\n  _proto.description = function description() {\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n  };\n\n  _proto.buildCSSClass = function buildCSSClass() {\n    return _ModalDialog.prototype.buildCSSClass.call(this) + ' vjs-text-track-settings';\n  }\n  /**\n   * Gets an object of text track settings (or null).\n   *\n   * @return {Object}\n   *         An object with config values parsed from the DOM or localStorage.\n   */\n  ;\n\n  _proto.getValues = function getValues() {\n    var _this3 = this;\n\n    return reduce(selectConfigs, function (accum, config, key) {\n      var value = getSelectedOptionValue(_this3.$(config.selector), config.parser);\n\n      if (value !== undefined) {\n        accum[key] = value;\n      }\n\n      return accum;\n    }, {});\n  }\n  /**\n   * Sets text track settings from an object of values.\n   *\n   * @param {Object} values\n   *        An object with config values parsed from the DOM or localStorage.\n   */\n  ;\n\n  _proto.setValues = function setValues(values) {\n    var _this4 = this;\n\n    each(selectConfigs, function (config, key) {\n      setSelectedOption(_this4.$(config.selector), values[key], config.parser);\n    });\n  }\n  /**\n   * Sets all `<select>` elements to their default values.\n   */\n  ;\n\n  _proto.setDefaults = function setDefaults() {\n    var _this5 = this;\n\n    each(selectConfigs, function (config) {\n      var index = config.hasOwnProperty('default') ? config[\"default\"] : 0;\n      _this5.$(config.selector).selectedIndex = index;\n    });\n  }\n  /**\n   * Restore texttrack settings from localStorage\n   */\n  ;\n\n  _proto.restoreSettings = function restoreSettings() {\n    var values;\n\n    try {\n      values = JSON.parse(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.getItem(LOCAL_STORAGE_KEY$1));\n    } catch (err) {\n      log$1.warn(err);\n    }\n\n    if (values) {\n      this.setValues(values);\n    }\n  }\n  /**\n   * Save text track settings to localStorage\n   */\n  ;\n\n  _proto.saveSettings = function saveSettings() {\n    if (!this.options_.persistTextTrackSettings) {\n      return;\n    }\n\n    var values = this.getValues();\n\n    try {\n      if (Object.keys(values).length) {\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(values));\n      } else {\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.removeItem(LOCAL_STORAGE_KEY$1);\n      }\n    } catch (err) {\n      log$1.warn(err);\n    }\n  }\n  /**\n   * Update display of text track settings\n   */\n  ;\n\n  _proto.updateDisplay = function updateDisplay() {\n    var ttDisplay = this.player_.getChild('textTrackDisplay');\n\n    if (ttDisplay) {\n      ttDisplay.updateDisplay();\n    }\n  }\n  /**\n   * conditionally blur the element and refocus the captions button\n   *\n   * @private\n   */\n  ;\n\n  _proto.conditionalBlur_ = function conditionalBlur_() {\n    this.previouslyActiveEl_ = null;\n    var cb = this.player_.controlBar;\n    var subsCapsBtn = cb && cb.subsCapsButton;\n    var ccBtn = cb && cb.captionsButton;\n\n    if (subsCapsBtn) {\n      subsCapsBtn.focus();\n    } else if (ccBtn) {\n      ccBtn.focus();\n    }\n  };\n\n  return TextTrackSettings;\n}(ModalDialog);\n\nComponent$1.registerComponent('TextTrackSettings', TextTrackSettings);\n\n/**\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\n *\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\n *\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\n * @example <caption>How to disable the resize manager</caption>\n * const player = videojs('#vid', {\n *   resizeManager: false\n * });\n *\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\n *\n * @extends Component\n */\n\nvar ResizeManager = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(ResizeManager, _Component);\n\n  /**\n   * Create the ResizeManager.\n   *\n   * @param {Object} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of ResizeManager options.\n   *\n   * @param {Object} [options.ResizeObserver]\n   *        A polyfill for ResizeObserver can be passed in here.\n   *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\n   */\n  function ResizeManager(player, options) {\n    var _this;\n\n    var RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver; // if `null` was passed, we want to disable the ResizeObserver\n\n    if (options.ResizeObserver === null) {\n      RESIZE_OBSERVER_AVAILABLE = false;\n    } // Only create an element when ResizeObserver isn't available\n\n\n    var options_ = mergeOptions$3({\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\n      reportTouchActivity: false\n    }, options);\n    _this = _Component.call(this, player, options_) || this;\n    _this.ResizeObserver = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver;\n    _this.loadListener_ = null;\n    _this.resizeObserver_ = null;\n    _this.debouncedHandler_ = debounce(function () {\n      _this.resizeHandler();\n    }, 100, false, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n\n    if (RESIZE_OBSERVER_AVAILABLE) {\n      _this.resizeObserver_ = new _this.ResizeObserver(_this.debouncedHandler_);\n\n      _this.resizeObserver_.observe(player.el());\n    } else {\n      _this.loadListener_ = function () {\n        if (!_this.el_ || !_this.el_.contentWindow) {\n          return;\n        }\n\n        var debouncedHandler_ = _this.debouncedHandler_;\n\n        var unloadListener_ = _this.unloadListener_ = function () {\n          off(this, 'resize', debouncedHandler_);\n          off(this, 'unload', unloadListener_);\n          unloadListener_ = null;\n        }; // safari and edge can unload the iframe before resizemanager dispose\n        // we have to dispose of event handlers correctly before that happens\n\n\n        on(_this.el_.contentWindow, 'unload', unloadListener_);\n        on(_this.el_.contentWindow, 'resize', debouncedHandler_);\n      };\n\n      _this.one('load', _this.loadListener_);\n    }\n\n    return _this;\n  }\n\n  var _proto = ResizeManager.prototype;\n\n  _proto.createEl = function createEl() {\n    return _Component.prototype.createEl.call(this, 'iframe', {\n      className: 'vjs-resize-manager',\n      tabIndex: -1,\n      title: this.localize('No content')\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n  /**\n   * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\n   *\n   * @fires Player#playerresize\n   */\n  ;\n\n  _proto.resizeHandler = function resizeHandler() {\n    /**\n     * Called when the player size has changed\n     *\n     * @event Player#playerresize\n     * @type {EventTarget~Event}\n     */\n    // make sure player is still around to trigger\n    // prevents this from causing an error after dispose\n    if (!this.player_ || !this.player_.trigger) {\n      return;\n    }\n\n    this.player_.trigger('playerresize');\n  };\n\n  _proto.dispose = function dispose() {\n    if (this.debouncedHandler_) {\n      this.debouncedHandler_.cancel();\n    }\n\n    if (this.resizeObserver_) {\n      if (this.player_.el()) {\n        this.resizeObserver_.unobserve(this.player_.el());\n      }\n\n      this.resizeObserver_.disconnect();\n    }\n\n    if (this.loadListener_) {\n      this.off('load', this.loadListener_);\n    }\n\n    if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\n      this.unloadListener_.call(this.el_.contentWindow);\n    }\n\n    this.ResizeObserver = null;\n    this.resizeObserver = null;\n    this.debouncedHandler_ = null;\n    this.loadListener_ = null;\n\n    _Component.prototype.dispose.call(this);\n  };\n\n  return ResizeManager;\n}(Component$1);\n\nComponent$1.registerComponent('ResizeManager', ResizeManager);\n\nvar defaults = {\n  trackingThreshold: 20,\n  liveTolerance: 15\n};\n/*\n  track when we are at the live edge, and other helpers for live playback */\n\n/**\n * A class for checking live current time and determining when the player\n * is at or behind the live edge.\n */\n\nvar LiveTracker = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(LiveTracker, _Component);\n\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {number} [options.trackingThreshold=20]\n   *        Number of seconds of live window (seekableEnd - seekableStart) that\n   *        media needs to have before the liveui will be shown.\n   *\n   * @param {number} [options.liveTolerance=15]\n   *        Number of seconds behind live that we have to be\n   *        before we will be considered non-live. Note that this will only\n   *        be used when playing at the live edge. This allows large seekable end\n   *        changes to not effect wether we are live or not.\n   */\n  function LiveTracker(player, options) {\n    var _this;\n\n    // LiveTracker does not need an element\n    var options_ = mergeOptions$3(defaults, options, {\n      createEl: false\n    });\n    _this = _Component.call(this, player, options_) || this;\n\n    _this.handleVisibilityChange_ = function (e) {\n      return _this.handleVisibilityChange(e);\n    };\n\n    _this.trackLiveHandler_ = function () {\n      return _this.trackLive_();\n    };\n\n    _this.handlePlay_ = function (e) {\n      return _this.handlePlay(e);\n    };\n\n    _this.handleFirstTimeupdate_ = function (e) {\n      return _this.handleFirstTimeupdate(e);\n    };\n\n    _this.handleSeeked_ = function (e) {\n      return _this.handleSeeked(e);\n    };\n\n    _this.seekToLiveEdge_ = function (e) {\n      return _this.seekToLiveEdge(e);\n    };\n\n    _this.reset_();\n\n    _this.on(_this.player_, 'durationchange', function (e) {\n      return _this.handleDurationchange(e);\n    }); // we should try to toggle tracking on canplay as native playback engines, like Safari\n    // may not have the proper values for things like seekableEnd until then\n\n\n    _this.on(_this.player_, 'canplay', function () {\n      return _this.toggleTracking();\n    }); // we don't need to track live playback if the document is hidden,\n    // also, tracking when the document is hidden can\n    // cause the CPU to spike and eventually crash the page on IE11.\n\n\n    if (IE_VERSION && 'hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n      _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', _this.handleVisibilityChange_);\n    }\n\n    return _this;\n  }\n  /**\n   * toggle tracking based on document visiblility\n   */\n\n\n  var _proto = LiveTracker.prototype;\n\n  _proto.handleVisibilityChange = function handleVisibilityChange() {\n    if (this.player_.duration() !== Infinity) {\n      return;\n    }\n\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.hidden) {\n      this.stopTracking();\n    } else {\n      this.startTracking();\n    }\n  }\n  /**\n   * all the functionality for tracking when seek end changes\n   * and for tracking how far past seek end we should be\n   */\n  ;\n\n  _proto.trackLive_ = function trackLive_() {\n    var seekable = this.player_.seekable(); // skip undefined seekable\n\n    if (!seekable || !seekable.length) {\n      return;\n    }\n\n    var newTime = Number(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now().toFixed(4));\n    var deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n    this.lastTime_ = newTime;\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n    var liveCurrentTime = this.liveCurrentTime();\n    var currentTime = this.player_.currentTime(); // we are behind live if any are true\n    // 1. the player is paused\n    // 2. the user seeked to a location 2 seconds away from live\n    // 3. the difference between live and current time is greater\n    //    liveTolerance which defaults to 15s\n\n    var isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance; // we cannot be behind if\n    // 1. until we have not seen a timeupdate yet\n    // 2. liveCurrentTime is Infinity, which happens on Android and Native Safari\n\n    if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\n      isBehind = false;\n    }\n\n    if (isBehind !== this.behindLiveEdge_) {\n      this.behindLiveEdge_ = isBehind;\n      this.trigger('liveedgechange');\n    }\n  }\n  /**\n   * handle a durationchange event on the player\n   * and start/stop tracking accordingly.\n   */\n  ;\n\n  _proto.handleDurationchange = function handleDurationchange() {\n    this.toggleTracking();\n  }\n  /**\n   * start/stop tracking\n   */\n  ;\n\n  _proto.toggleTracking = function toggleTracking() {\n    if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\n      if (this.player_.options_.liveui) {\n        this.player_.addClass('vjs-liveui');\n      }\n\n      this.startTracking();\n    } else {\n      this.player_.removeClass('vjs-liveui');\n      this.stopTracking();\n    }\n  }\n  /**\n   * start tracking live playback\n   */\n  ;\n\n  _proto.startTracking = function startTracking() {\n    if (this.isTracking()) {\n      return;\n    } // If we haven't seen a timeupdate, we need to check whether playback\n    // began before this component started tracking. This can happen commonly\n    // when using autoplay.\n\n\n    if (!this.timeupdateSeen_) {\n      this.timeupdateSeen_ = this.player_.hasStarted();\n    }\n\n    this.trackingInterval_ = this.setInterval(this.trackLiveHandler_, UPDATE_REFRESH_INTERVAL);\n    this.trackLive_();\n    this.on(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n\n    if (!this.timeupdateSeen_) {\n      this.one(this.player_, 'play', this.handlePlay_);\n      this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n    } else {\n      this.on(this.player_, 'seeked', this.handleSeeked_);\n    }\n  }\n  /**\n   * handle the first timeupdate on the player if it wasn't already playing\n   * when live tracker started tracking.\n   */\n  ;\n\n  _proto.handleFirstTimeupdate = function handleFirstTimeupdate() {\n    this.timeupdateSeen_ = true;\n    this.on(this.player_, 'seeked', this.handleSeeked_);\n  }\n  /**\n   * Keep track of what time a seek starts, and listen for seeked\n   * to find where a seek ends.\n   */\n  ;\n\n  _proto.handleSeeked = function handleSeeked() {\n    var timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\n    this.seekedBehindLive_ = this.nextSeekedFromUser_ && timeDiff > 2;\n    this.nextSeekedFromUser_ = false;\n    this.trackLive_();\n  }\n  /**\n   * handle the first play on the player, and make sure that we seek\n   * right to the live edge.\n   */\n  ;\n\n  _proto.handlePlay = function handlePlay() {\n    this.one(this.player_, 'timeupdate', this.seekToLiveEdge_);\n  }\n  /**\n   * Stop tracking, and set all internal variables to\n   * their initial value.\n   */\n  ;\n\n  _proto.reset_ = function reset_() {\n    this.lastTime_ = -1;\n    this.pastSeekEnd_ = 0;\n    this.lastSeekEnd_ = -1;\n    this.behindLiveEdge_ = true;\n    this.timeupdateSeen_ = false;\n    this.seekedBehindLive_ = false;\n    this.nextSeekedFromUser_ = false;\n    this.clearInterval(this.trackingInterval_);\n    this.trackingInterval_ = null;\n    this.off(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n    this.off(this.player_, 'seeked', this.handleSeeked_);\n    this.off(this.player_, 'play', this.handlePlay_);\n    this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n    this.off(this.player_, 'timeupdate', this.seekToLiveEdge_);\n  }\n  /**\n   * The next seeked event is from the user. Meaning that any seek\n   * > 2s behind live will be considered behind live for real and\n   * liveTolerance will be ignored.\n   */\n  ;\n\n  _proto.nextSeekedFromUser = function nextSeekedFromUser() {\n    this.nextSeekedFromUser_ = true;\n  }\n  /**\n   * stop tracking live playback\n   */\n  ;\n\n  _proto.stopTracking = function stopTracking() {\n    if (!this.isTracking()) {\n      return;\n    }\n\n    this.reset_();\n    this.trigger('liveedgechange');\n  }\n  /**\n   * A helper to get the player seekable end\n   * so that we don't have to null check everywhere\n   *\n   * @return {number}\n   *         The furthest seekable end or Infinity.\n   */\n  ;\n\n  _proto.seekableEnd = function seekableEnd() {\n    var seekable = this.player_.seekable();\n    var seekableEnds = [];\n    var i = seekable ? seekable.length : 0;\n\n    while (i--) {\n      seekableEnds.push(seekable.end(i));\n    } // grab the furthest seekable end after sorting, or if there are none\n    // default to Infinity\n\n\n    return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\n  }\n  /**\n   * A helper to get the player seekable start\n   * so that we don't have to null check everywhere\n   *\n   * @return {number}\n   *         The earliest seekable start or 0.\n   */\n  ;\n\n  _proto.seekableStart = function seekableStart() {\n    var seekable = this.player_.seekable();\n    var seekableStarts = [];\n    var i = seekable ? seekable.length : 0;\n\n    while (i--) {\n      seekableStarts.push(seekable.start(i));\n    } // grab the first seekable start after sorting, or if there are none\n    // default to 0\n\n\n    return seekableStarts.length ? seekableStarts.sort()[0] : 0;\n  }\n  /**\n   * Get the live time window aka\n   * the amount of time between seekable start and\n   * live current time.\n   *\n   * @return {number}\n   *         The amount of seconds that are seekable in\n   *         the live video.\n   */\n  ;\n\n  _proto.liveWindow = function liveWindow() {\n    var liveCurrentTime = this.liveCurrentTime(); // if liveCurrenTime is Infinity then we don't have a liveWindow at all\n\n    if (liveCurrentTime === Infinity) {\n      return 0;\n    }\n\n    return liveCurrentTime - this.seekableStart();\n  }\n  /**\n   * Determines if the player is live, only checks if this component\n   * is tracking live playback or not\n   *\n   * @return {boolean}\n   *         Wether liveTracker is tracking\n   */\n  ;\n\n  _proto.isLive = function isLive() {\n    return this.isTracking();\n  }\n  /**\n   * Determines if currentTime is at the live edge and won't fall behind\n   * on each seekableendchange\n   *\n   * @return {boolean}\n   *         Wether playback is at the live edge\n   */\n  ;\n\n  _proto.atLiveEdge = function atLiveEdge() {\n    return !this.behindLiveEdge();\n  }\n  /**\n   * get what we expect the live current time to be\n   *\n   * @return {number}\n   *         The expected live current time\n   */\n  ;\n\n  _proto.liveCurrentTime = function liveCurrentTime() {\n    return this.pastSeekEnd() + this.seekableEnd();\n  }\n  /**\n   * The number of seconds that have occured after seekable end\n   * changed. This will be reset to 0 once seekable end changes.\n   *\n   * @return {number}\n   *         Seconds past the current seekable end\n   */\n  ;\n\n  _proto.pastSeekEnd = function pastSeekEnd() {\n    var seekableEnd = this.seekableEnd();\n\n    if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\n      this.pastSeekEnd_ = 0;\n    }\n\n    this.lastSeekEnd_ = seekableEnd;\n    return this.pastSeekEnd_;\n  }\n  /**\n   * If we are currently behind the live edge, aka currentTime will be\n   * behind on a seekableendchange\n   *\n   * @return {boolean}\n   *         If we are behind the live edge\n   */\n  ;\n\n  _proto.behindLiveEdge = function behindLiveEdge() {\n    return this.behindLiveEdge_;\n  }\n  /**\n   * Wether live tracker is currently tracking or not.\n   */\n  ;\n\n  _proto.isTracking = function isTracking() {\n    return typeof this.trackingInterval_ === 'number';\n  }\n  /**\n   * Seek to the live edge if we are behind the live edge\n   */\n  ;\n\n  _proto.seekToLiveEdge = function seekToLiveEdge() {\n    this.seekedBehindLive_ = false;\n\n    if (this.atLiveEdge()) {\n      return;\n    }\n\n    this.nextSeekedFromUser_ = false;\n    this.player_.currentTime(this.liveCurrentTime());\n  }\n  /**\n   * Dispose of liveTracker\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.handleVisibilityChange_);\n    this.stopTracking();\n\n    _Component.prototype.dispose.call(this);\n  };\n\n  return LiveTracker;\n}(Component$1);\n\nComponent$1.registerComponent('LiveTracker', LiveTracker);\n\n/**\n * This function is used to fire a sourceset when there is something\n * similar to `mediaEl.load()` being called. It will try to find the source via\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\n * with the source that was found or empty string if we cannot know. If it cannot\n * find a source then `sourceset` will not be fired.\n *\n * @param {Html5} tech\n *        The tech object that sourceset was setup on\n *\n * @return {boolean}\n *         returns false if the sourceset was not fired and true otherwise.\n */\n\nvar sourcesetLoad = function sourcesetLoad(tech) {\n  var el = tech.el(); // if `el.src` is set, that source will be loaded.\n\n  if (el.hasAttribute('src')) {\n    tech.triggerSourceset(el.src);\n    return true;\n  }\n  /**\n   * Since there isn't a src property on the media element, source elements will be used for\n   * implementing the source selection algorithm. This happens asynchronously and\n   * for most cases were there is more than one source we cannot tell what source will\n   * be loaded, without re-implementing the source selection algorithm. At this time we are not\n   * going to do that. There are three special cases that we do handle here though:\n   *\n   * 1. If there are no sources, do not fire `sourceset`.\n   * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\n   * 3. If there is more than one `<source>` but all of them have the same `src` url.\n   *    That will be our src.\n   */\n\n\n  var sources = tech.$$('source');\n  var srcUrls = [];\n  var src = ''; // if there are no sources, do not fire sourceset\n\n  if (!sources.length) {\n    return false;\n  } // only count valid/non-duplicate source elements\n\n\n  for (var i = 0; i < sources.length; i++) {\n    var url = sources[i].src;\n\n    if (url && srcUrls.indexOf(url) === -1) {\n      srcUrls.push(url);\n    }\n  } // there were no valid sources\n\n\n  if (!srcUrls.length) {\n    return false;\n  } // there is only one valid source element url\n  // use that\n\n\n  if (srcUrls.length === 1) {\n    src = srcUrls[0];\n  }\n\n  tech.triggerSourceset(src);\n  return true;\n};\n/**\n * our implementation of an `innerHTML` descriptor for browsers\n * that do not have one.\n */\n\n\nvar innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n  get: function get() {\n    return this.cloneNode(true).innerHTML;\n  },\n  set: function set(v) {\n    // make a dummy node to use innerHTML on\n    var dummy = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(this.nodeName.toLowerCase()); // set innerHTML to the value provided\n\n    dummy.innerHTML = v; // make a document fragment to hold the nodes from dummy\n\n    var docFrag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createDocumentFragment(); // copy all of the nodes created by the innerHTML on dummy\n    // to the document fragment\n\n    while (dummy.childNodes.length) {\n      docFrag.appendChild(dummy.childNodes[0]);\n    } // remove content\n\n\n    this.innerText = ''; // now we add all of that html in one by appending the\n    // document fragment. This is how innerHTML does it.\n\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.appendChild.call(this, docFrag); // then return the result that innerHTML's setter would\n\n    return this.innerHTML;\n  }\n});\n/**\n * Get a property descriptor given a list of priorities and the\n * property to get.\n */\n\nvar getDescriptor = function getDescriptor(priority, prop) {\n  var descriptor = {};\n\n  for (var i = 0; i < priority.length; i++) {\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n\n    if (descriptor && descriptor.set && descriptor.get) {\n      break;\n    }\n  }\n\n  descriptor.enumerable = true;\n  descriptor.configurable = true;\n  return descriptor;\n};\n\nvar getInnerHTMLDescriptor = function getInnerHTMLDescriptor(tech) {\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\n};\n/**\n * Patches browser internal functions so that we can tell synchronously\n * if a `<source>` was appended to the media element. For some reason this\n * causes a `sourceset` if the the media element is ready and has no source.\n * This happens when:\n * - The page has just loaded and the media element does not have a source.\n * - The media element was emptied of all sources, then `load()` was called.\n *\n * It does this by patching the following functions/properties when they are supported:\n *\n * - `append()` - can be used to add a `<source>` element to the media element\n * - `appendChild()` - can be used to add a `<source>` element to the media element\n * - `insertAdjacentHTML()` -  can be used to add a `<source>` element to the media element\n * - `innerHTML` -  can be used to add a `<source>` element to the media element\n *\n * @param {Html5} tech\n *        The tech object that sourceset is being setup on.\n */\n\n\nvar firstSourceWatch = function firstSourceWatch(tech) {\n  var el = tech.el(); // make sure firstSourceWatch isn't setup twice.\n\n  if (el.resetSourceWatch_) {\n    return;\n  }\n\n  var old = {};\n  var innerDescriptor = getInnerHTMLDescriptor(tech);\n\n  var appendWrapper = function appendWrapper(appendFn) {\n    return function () {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      var retval = appendFn.apply(el, args);\n      sourcesetLoad(tech);\n      return retval;\n    };\n  };\n\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(function (k) {\n    if (!el[k]) {\n      return;\n    } // store the old function\n\n\n    old[k] = el[k]; // call the old function with a sourceset if a source\n    // was loaded\n\n    el[k] = appendWrapper(old[k]);\n  });\n  Object.defineProperty(el, 'innerHTML', mergeOptions$3(innerDescriptor, {\n    set: appendWrapper(innerDescriptor.set)\n  }));\n\n  el.resetSourceWatch_ = function () {\n    el.resetSourceWatch_ = null;\n    Object.keys(old).forEach(function (k) {\n      el[k] = old[k];\n    });\n    Object.defineProperty(el, 'innerHTML', innerDescriptor);\n  }; // on the first sourceset, we need to revert our changes\n\n\n  tech.one('sourceset', el.resetSourceWatch_);\n};\n/**\n * our implementation of a `src` descriptor for browsers\n * that do not have one.\n */\n\n\nvar srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n  get: function get() {\n    if (this.hasAttribute('src')) {\n      return getAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.getAttribute.call(this, 'src'));\n    }\n\n    return '';\n  },\n  set: function set(v) {\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.setAttribute.call(this, 'src', v);\n    return v;\n  }\n});\n\nvar getSrcDescriptor = function getSrcDescriptor(tech) {\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\n};\n/**\n * setup `sourceset` handling on the `Html5` tech. This function\n * patches the following element properties/functions:\n *\n * - `src` - to determine when `src` is set\n * - `setAttribute()` - to determine when `src` is set\n * - `load()` - this re-triggers the source selection algorithm, and can\n *              cause a sourceset.\n *\n * If there is no source when we are adding `sourceset` support or during a `load()`\n * we also patch the functions listed in `firstSourceWatch`.\n *\n * @param {Html5} tech\n *        The tech to patch\n */\n\n\nvar setupSourceset = function setupSourceset(tech) {\n  if (!tech.featuresSourceset) {\n    return;\n  }\n\n  var el = tech.el(); // make sure sourceset isn't setup twice.\n\n  if (el.resetSourceset_) {\n    return;\n  }\n\n  var srcDescriptor = getSrcDescriptor(tech);\n  var oldSetAttribute = el.setAttribute;\n  var oldLoad = el.load;\n  Object.defineProperty(el, 'src', mergeOptions$3(srcDescriptor, {\n    set: function set(v) {\n      var retval = srcDescriptor.set.call(el, v); // we use the getter here to get the actual value set on src\n\n      tech.triggerSourceset(el.src);\n      return retval;\n    }\n  }));\n\n  el.setAttribute = function (n, v) {\n    var retval = oldSetAttribute.call(el, n, v);\n\n    if (/src/i.test(n)) {\n      tech.triggerSourceset(el.src);\n    }\n\n    return retval;\n  };\n\n  el.load = function () {\n    var retval = oldLoad.call(el); // if load was called, but there was no source to fire\n    // sourceset on. We have to watch for a source append\n    // as that can trigger a `sourceset` when the media element\n    // has no source\n\n    if (!sourcesetLoad(tech)) {\n      tech.triggerSourceset('');\n      firstSourceWatch(tech);\n    }\n\n    return retval;\n  };\n\n  if (el.currentSrc) {\n    tech.triggerSourceset(el.currentSrc);\n  } else if (!sourcesetLoad(tech)) {\n    firstSourceWatch(tech);\n  }\n\n  el.resetSourceset_ = function () {\n    el.resetSourceset_ = null;\n    el.load = oldLoad;\n    el.setAttribute = oldSetAttribute;\n    Object.defineProperty(el, 'src', srcDescriptor);\n\n    if (el.resetSourceWatch_) {\n      el.resetSourceWatch_();\n    }\n  };\n};\n\n/**\n * Object.defineProperty but \"lazy\", which means that the value is only set after\n * it retrieved the first time, rather than being set right away.\n *\n * @param {Object} obj the object to set the property on\n * @param {string} key the key for the property to set\n * @param {Function} getValue the function used to get the value when it is needed.\n * @param {boolean} setter wether a setter shoould be allowed or not\n */\nvar defineLazyProperty = function defineLazyProperty(obj, key, getValue, setter) {\n  if (setter === void 0) {\n    setter = true;\n  }\n\n  var set = function set(value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      writable: true\n    });\n  };\n\n  var options = {\n    configurable: true,\n    enumerable: true,\n    get: function get() {\n      var value = getValue();\n      set(value);\n      return value;\n    }\n  };\n\n  if (setter) {\n    options.set = set;\n  }\n\n  return Object.defineProperty(obj, key, options);\n};\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @mixes Tech~SourceHandlerAdditions\n * @extends Tech\n */\n\nvar Html5 = /*#__PURE__*/function (_Tech) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Html5, _Tech);\n\n  /**\n  * Create an instance of this Tech.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  *\n  * @param {Component~ReadyCallback} ready\n  *        Callback function to call when the `HTML5` Tech is ready.\n  */\n  function Html5(options, ready) {\n    var _this;\n\n    _this = _Tech.call(this, options, ready) || this;\n    var source = options.source;\n    var crossoriginTracks = false;\n    _this.featuresVideoFrameCallback = _this.featuresVideoFrameCallback && _this.el_.tagName === 'VIDEO'; // Set the source if one is provided\n    // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n    // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n    // anyway so the error gets fired.\n\n    if (source && (_this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n      _this.setSource(source);\n    } else {\n      _this.handleLateInit_(_this.el_);\n    } // setup sourceset after late sourceset/init\n\n\n    if (options.enableSourceset) {\n      _this.setupSourcesetHandling_();\n    }\n\n    _this.isScrubbing_ = false;\n\n    if (_this.el_.hasChildNodes()) {\n      var nodes = _this.el_.childNodes;\n      var nodesLength = nodes.length;\n      var removeNodes = [];\n\n      while (nodesLength--) {\n        var node = nodes[nodesLength];\n        var nodeName = node.nodeName.toLowerCase();\n\n        if (nodeName === 'track') {\n          if (!_this.featuresNativeTextTracks) {\n            // Empty video tag tracks so the built-in player doesn't use them also.\n            // This may not be fast enough to stop HTML5 browsers from reading the tags\n            // so we'll need to turn off any default tracks if we're manually doing\n            // captions and subtitles. videoElement.textTracks\n            removeNodes.push(node);\n          } else {\n            // store HTMLTrackElement and TextTrack to remote list\n            _this.remoteTextTrackEls().addTrackElement_(node);\n\n            _this.remoteTextTracks().addTrack(node.track);\n\n            _this.textTracks().addTrack(node.track);\n\n            if (!crossoriginTracks && !_this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n              crossoriginTracks = true;\n            }\n          }\n        }\n      }\n\n      for (var i = 0; i < removeNodes.length; i++) {\n        _this.el_.removeChild(removeNodes[i]);\n      }\n    }\n\n    _this.proxyNativeTracks_();\n\n    if (_this.featuresNativeTextTracks && crossoriginTracks) {\n      log$1.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\'t used.\\n' + 'This may prevent text tracks from loading.');\n    } // prevent iOS Safari from disabling metadata text tracks during native playback\n\n\n    _this.restoreMetadataTracksInIOSNativePlayer_(); // Determine if native controls should be used\n    // Our goal should be to get the custom controls on mobile solid everywhere\n    // so we can remove this all together. Right now this will block custom\n    // controls on touch enabled laptops like the Chrome Pixel\n\n\n    if ((TOUCH_ENABLED || IS_IPHONE || IS_NATIVE_ANDROID) && options.nativeControlsForTouch === true) {\n      _this.setControls(true);\n    } // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n    // into a `fullscreenchange` event\n\n\n    _this.proxyWebkitFullscreen_();\n\n    _this.triggerReady();\n\n    return _this;\n  }\n  /**\n   * Dispose of `HTML5` media element and remove all tracks.\n   */\n\n\n  var _proto = Html5.prototype;\n\n  _proto.dispose = function dispose() {\n    if (this.el_ && this.el_.resetSourceset_) {\n      this.el_.resetSourceset_();\n    }\n\n    Html5.disposeMediaElement(this.el_);\n    this.options_ = null; // tech will handle clearing of the emulated track list\n\n    _Tech.prototype.dispose.call(this);\n  }\n  /**\n   * Modify the media element so that we can detect when\n   * the source is changed. Fires `sourceset` just after the source has changed\n   */\n  ;\n\n  _proto.setupSourcesetHandling_ = function setupSourcesetHandling_() {\n    setupSourceset(this);\n  }\n  /**\n   * When a captions track is enabled in the iOS Safari native player, all other\n   * tracks are disabled (including metadata tracks), which nulls all of their\n   * associated cue points. This will restore metadata tracks to their pre-fullscreen\n   * state in those cases so that cue points are not needlessly lost.\n   *\n   * @private\n   */\n  ;\n\n  _proto.restoreMetadataTracksInIOSNativePlayer_ = function restoreMetadataTracksInIOSNativePlayer_() {\n    var textTracks = this.textTracks();\n    var metadataTracksPreFullscreenState; // captures a snapshot of every metadata track's current state\n\n    var takeMetadataTrackSnapshot = function takeMetadataTrackSnapshot() {\n      metadataTracksPreFullscreenState = [];\n\n      for (var i = 0; i < textTracks.length; i++) {\n        var track = textTracks[i];\n\n        if (track.kind === 'metadata') {\n          metadataTracksPreFullscreenState.push({\n            track: track,\n            storedMode: track.mode\n          });\n        }\n      }\n    }; // snapshot each metadata track's initial state, and update the snapshot\n    // each time there is a track 'change' event\n\n\n    takeMetadataTrackSnapshot();\n    textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n    this.on('dispose', function () {\n      return textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n    });\n\n    var restoreTrackMode = function restoreTrackMode() {\n      for (var i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n        var storedTrack = metadataTracksPreFullscreenState[i];\n\n        if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\n          storedTrack.track.mode = storedTrack.storedMode;\n        }\n      } // we only want this handler to be executed on the first 'change' event\n\n\n      textTracks.removeEventListener('change', restoreTrackMode);\n    }; // when we enter fullscreen playback, stop updating the snapshot and\n    // restore all track modes to their pre-fullscreen state\n\n\n    this.on('webkitbeginfullscreen', function () {\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot); // remove the listener before adding it just in case it wasn't previously removed\n\n      textTracks.removeEventListener('change', restoreTrackMode);\n      textTracks.addEventListener('change', restoreTrackMode);\n    }); // start updating the snapshot again after leaving fullscreen\n\n    this.on('webkitendfullscreen', function () {\n      // remove the listener before adding it just in case it wasn't previously removed\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n      textTracks.addEventListener('change', takeMetadataTrackSnapshot); // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\n\n      textTracks.removeEventListener('change', restoreTrackMode);\n    });\n  }\n  /**\n   * Attempt to force override of tracks for the given type\n   *\n   * @param {string} type - Track type to override, possible values include 'Audio',\n   * 'Video', and 'Text'.\n   * @param {boolean} override - If set to true native audio/video will be overridden,\n   * otherwise native audio/video will potentially be used.\n   * @private\n   */\n  ;\n\n  _proto.overrideNative_ = function overrideNative_(type, override) {\n    var _this2 = this;\n\n    // If there is no behavioral change don't add/remove listeners\n    if (override !== this[\"featuresNative\" + type + \"Tracks\"]) {\n      return;\n    }\n\n    var lowerCaseType = type.toLowerCase();\n\n    if (this[lowerCaseType + \"TracksListeners_\"]) {\n      Object.keys(this[lowerCaseType + \"TracksListeners_\"]).forEach(function (eventName) {\n        var elTracks = _this2.el()[lowerCaseType + \"Tracks\"];\n\n        elTracks.removeEventListener(eventName, _this2[lowerCaseType + \"TracksListeners_\"][eventName]);\n      });\n    }\n\n    this[\"featuresNative\" + type + \"Tracks\"] = !override;\n    this[lowerCaseType + \"TracksListeners_\"] = null;\n    this.proxyNativeTracksForType_(lowerCaseType);\n  }\n  /**\n   * Attempt to force override of native audio tracks.\n   *\n   * @param {boolean} override - If set to true native audio will be overridden,\n   * otherwise native audio will potentially be used.\n   */\n  ;\n\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks(override) {\n    this.overrideNative_('Audio', override);\n  }\n  /**\n   * Attempt to force override of native video tracks.\n   *\n   * @param {boolean} override - If set to true native video will be overridden,\n   * otherwise native video will potentially be used.\n   */\n  ;\n\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks(override) {\n    this.overrideNative_('Video', override);\n  }\n  /**\n   * Proxy native track list events for the given type to our track\n   * lists if the browser we are playing in supports that type of track list.\n   *\n   * @param {string} name - Track type; values include 'audio', 'video', and 'text'\n   * @private\n   */\n  ;\n\n  _proto.proxyNativeTracksForType_ = function proxyNativeTracksForType_(name) {\n    var _this3 = this;\n\n    var props = NORMAL[name];\n    var elTracks = this.el()[props.getterName];\n    var techTracks = this[props.getterName]();\n\n    if (!this[\"featuresNative\" + props.capitalName + \"Tracks\"] || !elTracks || !elTracks.addEventListener) {\n      return;\n    }\n\n    var listeners = {\n      change: function change(e) {\n        var event = {\n          type: 'change',\n          target: techTracks,\n          currentTarget: techTracks,\n          srcElement: techTracks\n        };\n        techTracks.trigger(event); // if we are a text track change event, we should also notify the\n        // remote text track list. This can potentially cause a false positive\n        // if we were to get a change event on a non-remote track and\n        // we triggered the event on the remote text track list which doesn't\n        // contain that track. However, best practices mean looping through the\n        // list of tracks and searching for the appropriate mode value, so,\n        // this shouldn't pose an issue\n\n        if (name === 'text') {\n          _this3[REMOTE.remoteText.getterName]().trigger(event);\n        }\n      },\n      addtrack: function addtrack(e) {\n        techTracks.addTrack(e.track);\n      },\n      removetrack: function removetrack(e) {\n        techTracks.removeTrack(e.track);\n      }\n    };\n\n    var removeOldTracks = function removeOldTracks() {\n      var removeTracks = [];\n\n      for (var i = 0; i < techTracks.length; i++) {\n        var found = false;\n\n        for (var j = 0; j < elTracks.length; j++) {\n          if (elTracks[j] === techTracks[i]) {\n            found = true;\n            break;\n          }\n        }\n\n        if (!found) {\n          removeTracks.push(techTracks[i]);\n        }\n      }\n\n      while (removeTracks.length) {\n        techTracks.removeTrack(removeTracks.shift());\n      }\n    };\n\n    this[props.getterName + 'Listeners_'] = listeners;\n    Object.keys(listeners).forEach(function (eventName) {\n      var listener = listeners[eventName];\n      elTracks.addEventListener(eventName, listener);\n\n      _this3.on('dispose', function (e) {\n        return elTracks.removeEventListener(eventName, listener);\n      });\n    }); // Remove (native) tracks that are not used anymore\n\n    this.on('loadstart', removeOldTracks);\n    this.on('dispose', function (e) {\n      return _this3.off('loadstart', removeOldTracks);\n    });\n  }\n  /**\n   * Proxy all native track list events to our track lists if the browser we are playing\n   * in supports that type of track list.\n   *\n   * @private\n   */\n  ;\n\n  _proto.proxyNativeTracks_ = function proxyNativeTracks_() {\n    var _this4 = this;\n\n    NORMAL.names.forEach(function (name) {\n      _this4.proxyNativeTracksForType_(name);\n    });\n  }\n  /**\n   * Create the `Html5` Tech's DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    var el = this.options_.tag; // Check if this browser supports moving the element into the box.\n    // On the iPhone video will break if you move the element,\n    // So we have to create a brand new element.\n    // If we ingested the player div, we do not need to move the media element.\n\n    if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\n      // If the original tag is still there, clone and remove it.\n      if (el) {\n        var clone = el.cloneNode(true);\n\n        if (el.parentNode) {\n          el.parentNode.insertBefore(clone, el);\n        }\n\n        Html5.disposeMediaElement(el);\n        el = clone;\n      } else {\n        el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // determine if native controls should be used\n\n        var tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n        var attributes = mergeOptions$3({}, tagAttributes);\n\n        if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n          delete attributes.controls;\n        }\n\n        setAttributes(el, assign(attributes, {\n          id: this.options_.techId,\n          \"class\": 'vjs-tech'\n        }));\n      }\n\n      el.playerId = this.options_.playerId;\n    }\n\n    if (typeof this.options_.preload !== 'undefined') {\n      setAttribute(el, 'preload', this.options_.preload);\n    }\n\n    if (this.options_.disablePictureInPicture !== undefined) {\n      el.disablePictureInPicture = this.options_.disablePictureInPicture;\n    } // Update specific tag settings, in case they were overridden\n    // `autoplay` has to be *last* so that `muted` and `playsinline` are present\n    // when iOS/Safari or other browsers attempt to autoplay.\n\n\n    var settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n\n    for (var i = 0; i < settingsAttrs.length; i++) {\n      var attr = settingsAttrs[i];\n      var value = this.options_[attr];\n\n      if (typeof value !== 'undefined') {\n        if (value) {\n          setAttribute(el, attr, attr);\n        } else {\n          removeAttribute(el, attr);\n        }\n\n        el[attr] = value;\n      }\n    }\n\n    return el;\n  }\n  /**\n   * This will be triggered if the loadstart event has already fired, before videojs was\n   * ready. Two known examples of when this can happen are:\n   * 1. If we're loading the playback object after it has started loading\n   * 2. The media is already playing the (often with autoplay on) then\n   *\n   * This function will fire another loadstart so that videojs can catchup.\n   *\n   * @fires Tech#loadstart\n   *\n   * @return {undefined}\n   *         returns nothing.\n   */\n  ;\n\n  _proto.handleLateInit_ = function handleLateInit_(el) {\n    if (el.networkState === 0 || el.networkState === 3) {\n      // The video element hasn't started loading the source yet\n      // or didn't find a source\n      return;\n    }\n\n    if (el.readyState === 0) {\n      // NetworkState is set synchronously BUT loadstart is fired at the\n      // end of the current stack, usually before setInterval(fn, 0).\n      // So at this point we know loadstart may have already fired or is\n      // about to fire, and either way the player hasn't seen it yet.\n      // We don't want to fire loadstart prematurely here and cause a\n      // double loadstart so we'll wait and see if it happens between now\n      // and the next loop, and fire it if not.\n      // HOWEVER, we also want to make sure it fires before loadedmetadata\n      // which could also happen between now and the next loop, so we'll\n      // watch for that also.\n      var loadstartFired = false;\n\n      var setLoadstartFired = function setLoadstartFired() {\n        loadstartFired = true;\n      };\n\n      this.on('loadstart', setLoadstartFired);\n\n      var triggerLoadstart = function triggerLoadstart() {\n        // We did miss the original loadstart. Make sure the player\n        // sees loadstart before loadedmetadata\n        if (!loadstartFired) {\n          this.trigger('loadstart');\n        }\n      };\n\n      this.on('loadedmetadata', triggerLoadstart);\n      this.ready(function () {\n        this.off('loadstart', setLoadstartFired);\n        this.off('loadedmetadata', triggerLoadstart);\n\n        if (!loadstartFired) {\n          // We did miss the original native loadstart. Fire it now.\n          this.trigger('loadstart');\n        }\n      });\n      return;\n    } // From here on we know that loadstart already fired and we missed it.\n    // The other readyState events aren't as much of a problem if we double\n    // them, so not going to go to as much trouble as loadstart to prevent\n    // that unless we find reason to.\n\n\n    var eventsToTrigger = ['loadstart']; // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n\n    eventsToTrigger.push('loadedmetadata'); // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n\n    if (el.readyState >= 2) {\n      eventsToTrigger.push('loadeddata');\n    } // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n\n\n    if (el.readyState >= 3) {\n      eventsToTrigger.push('canplay');\n    } // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n\n\n    if (el.readyState >= 4) {\n      eventsToTrigger.push('canplaythrough');\n    } // We still need to give the player time to add event listeners\n\n\n    this.ready(function () {\n      eventsToTrigger.forEach(function (type) {\n        this.trigger(type);\n      }, this);\n    });\n  }\n  /**\n   * Set whether we are scrubbing or not.\n   * This is used to decide whether we should use `fastSeek` or not.\n   * `fastSeek` is used to provide trick play on Safari browsers.\n   *\n   * @param {boolean} isScrubbing\n   *                  - true for we are currently scrubbing\n   *                  - false for we are no longer scrubbing\n   */\n  ;\n\n  _proto.setScrubbing = function setScrubbing(isScrubbing) {\n    this.isScrubbing_ = isScrubbing;\n  }\n  /**\n   * Get whether we are scrubbing or not.\n   *\n   * @return {boolean} isScrubbing\n   *                  - true for we are currently scrubbing\n   *                  - false for we are no longer scrubbing\n   */\n  ;\n\n  _proto.scrubbing = function scrubbing() {\n    return this.isScrubbing_;\n  }\n  /**\n   * Set current time for the `HTML5` tech.\n   *\n   * @param {number} seconds\n   *        Set the current time of the media to this.\n   */\n  ;\n\n  _proto.setCurrentTime = function setCurrentTime(seconds) {\n    try {\n      if (this.isScrubbing_ && this.el_.fastSeek && IS_ANY_SAFARI) {\n        this.el_.fastSeek(seconds);\n      } else {\n        this.el_.currentTime = seconds;\n      }\n    } catch (e) {\n      log$1(e, 'Video is not ready. (Video.js)'); // this.warning(VideoJS.warnings.videoNotReady);\n    }\n  }\n  /**\n   * Get the current duration of the HTML5 media element.\n   *\n   * @return {number}\n   *         The duration of the media or 0 if there is no duration.\n   */\n  ;\n\n  _proto.duration = function duration() {\n    var _this5 = this;\n\n    // Android Chrome will report duration as Infinity for VOD HLS until after\n    // playback has started, which triggers the live display erroneously.\n    // Return NaN if playback has not started and trigger a durationupdate once\n    // the duration can be reliably known.\n    if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\n      // Wait for the first `timeupdate` with currentTime > 0 - there may be\n      // several with 0\n      var checkProgress = function checkProgress() {\n        if (_this5.el_.currentTime > 0) {\n          // Trigger durationchange for genuinely live video\n          if (_this5.el_.duration === Infinity) {\n            _this5.trigger('durationchange');\n          }\n\n          _this5.off('timeupdate', checkProgress);\n        }\n      };\n\n      this.on('timeupdate', checkProgress);\n      return NaN;\n    }\n\n    return this.el_.duration || NaN;\n  }\n  /**\n   * Get the current width of the HTML5 media element.\n   *\n   * @return {number}\n   *         The width of the HTML5 media element.\n   */\n  ;\n\n  _proto.width = function width() {\n    return this.el_.offsetWidth;\n  }\n  /**\n   * Get the current height of the HTML5 media element.\n   *\n   * @return {number}\n   *         The height of the HTML5 media element.\n   */\n  ;\n\n  _proto.height = function height() {\n    return this.el_.offsetHeight;\n  }\n  /**\n   * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\n   * `fullscreenchange` event.\n   *\n   * @private\n   * @fires fullscreenchange\n   * @listens webkitendfullscreen\n   * @listens webkitbeginfullscreen\n   * @listens webkitbeginfullscreen\n   */\n  ;\n\n  _proto.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() {\n    var _this6 = this;\n\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\n      return;\n    }\n\n    var endFn = function endFn() {\n      this.trigger('fullscreenchange', {\n        isFullscreen: false\n      }); // Safari will sometimes set contols on the videoelement when existing fullscreen.\n\n      if (this.el_.controls && !this.options_.nativeControlsForTouch && this.controls()) {\n        this.el_.controls = false;\n      }\n    };\n\n    var beginFn = function beginFn() {\n      if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\n        this.one('webkitendfullscreen', endFn);\n        this.trigger('fullscreenchange', {\n          isFullscreen: true,\n          // set a flag in case another tech triggers fullscreenchange\n          nativeIOSFullscreen: true\n        });\n      }\n    };\n\n    this.on('webkitbeginfullscreen', beginFn);\n    this.on('dispose', function () {\n      _this6.off('webkitbeginfullscreen', beginFn);\n\n      _this6.off('webkitendfullscreen', endFn);\n    });\n  }\n  /**\n   * Check if fullscreen is supported on the current playback device.\n   *\n   * @return {boolean}\n   *         - True if fullscreen is supported.\n   *         - False if fullscreen is not supported.\n   */\n  ;\n\n  _proto.supportsFullScreen = function supportsFullScreen() {\n    if (typeof this.el_.webkitEnterFullScreen === 'function') {\n      var userAgent = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || ''; // Seems to be broken in Chromium/Chrome && Safari in Leopard\n\n      if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n  /**\n   * Request that the `HTML5` Tech enter fullscreen.\n   */\n  ;\n\n  _proto.enterFullScreen = function enterFullScreen() {\n    var video = this.el_;\n\n    if (video.paused && video.networkState <= video.HAVE_METADATA) {\n      // attempt to prime the video element for programmatic access\n      // this isn't necessary on the desktop but shouldn't hurt\n      silencePromise(this.el_.play()); // playing and pausing synchronously during the transition to fullscreen\n      // can get iOS ~6.1 devices into a play/pause loop\n\n      this.setTimeout(function () {\n        video.pause();\n\n        try {\n          video.webkitEnterFullScreen();\n        } catch (e) {\n          this.trigger('fullscreenerror', e);\n        }\n      }, 0);\n    } else {\n      try {\n        video.webkitEnterFullScreen();\n      } catch (e) {\n        this.trigger('fullscreenerror', e);\n      }\n    }\n  }\n  /**\n   * Request that the `HTML5` Tech exit fullscreen.\n   */\n  ;\n\n  _proto.exitFullScreen = function exitFullScreen() {\n    if (!this.el_.webkitDisplayingFullscreen) {\n      this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\n      return;\n    }\n\n    this.el_.webkitExitFullScreen();\n  }\n  /**\n   * Create a floating video window always on top of other windows so that users may\n   * continue consuming media while they interact with other content sites, or\n   * applications on their device.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @return {Promise}\n   *         A promise with a Picture-in-Picture window.\n   */\n  ;\n\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\n    return this.el_.requestPictureInPicture();\n  }\n  /**\n   * Native requestVideoFrameCallback if supported by browser/tech, or fallback\n   * Don't use rVCF on Safari when DRM is playing, as it doesn't fire\n   * Needs to be checked later than the constructor\n   * This will be a false positive for clear sources loaded after a Fairplay source\n   *\n   * @param {function} cb function to call\n   * @return {number} id of request\n   */\n  ;\n\n  _proto.requestVideoFrameCallback = function requestVideoFrameCallback(cb) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      return this.el_.requestVideoFrameCallback(cb);\n    }\n\n    return _Tech.prototype.requestVideoFrameCallback.call(this, cb);\n  }\n  /**\n   * Native or fallback requestVideoFrameCallback\n   *\n   * @param {number} id request id to cancel\n   */\n  ;\n\n  _proto.cancelVideoFrameCallback = function cancelVideoFrameCallback(id) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      this.el_.cancelVideoFrameCallback(id);\n    } else {\n      _Tech.prototype.cancelVideoFrameCallback.call(this, id);\n    }\n  }\n  /**\n   * A getter/setter for the `Html5` Tech's source object.\n   * > Note: Please use {@link Html5#setSource}\n   *\n   * @param {Tech~SourceObject} [src]\n   *        The source object you want to set on the `HTML5` techs element.\n   *\n   * @return {Tech~SourceObject|undefined}\n   *         - The current source object when a source is not passed in.\n   *         - undefined when setting\n   *\n   * @deprecated Since version 5.\n   */\n  ;\n\n  _proto.src = function src(_src) {\n    if (_src === undefined) {\n      return this.el_.src;\n    } // Setting src through `src` instead of `setSrc` will be deprecated\n\n\n    this.setSrc(_src);\n  }\n  /**\n   * Reset the tech by removing all sources and then calling\n   * {@link Html5.resetMediaElement}.\n   */\n  ;\n\n  _proto.reset = function reset() {\n    Html5.resetMediaElement(this.el_);\n  }\n  /**\n   * Get the current source on the `HTML5` Tech. Falls back to returning the source from\n   * the HTML5 media element.\n   *\n   * @return {Tech~SourceObject}\n   *         The current source object from the HTML5 tech. With a fallback to the\n   *         elements source.\n   */\n  ;\n\n  _proto.currentSrc = function currentSrc() {\n    if (this.currentSource_) {\n      return this.currentSource_.src;\n    }\n\n    return this.el_.currentSrc;\n  }\n  /**\n   * Set controls attribute for the HTML5 media Element.\n   *\n   * @param {string} val\n   *        Value to set the controls attribute to\n   */\n  ;\n\n  _proto.setControls = function setControls(val) {\n    this.el_.controls = !!val;\n  }\n  /**\n   * Create and returns a remote {@link TextTrack} object.\n   *\n   * @param {string} kind\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n   *\n   * @param {string} [label]\n   *        Label to identify the text track\n   *\n   * @param {string} [language]\n   *        Two letter language abbreviation\n   *\n   * @return {TextTrack}\n   *         The TextTrack that gets created.\n   */\n  ;\n\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\n    if (!this.featuresNativeTextTracks) {\n      return _Tech.prototype.addTextTrack.call(this, kind, label, language);\n    }\n\n    return this.el_.addTextTrack(kind, label, language);\n  }\n  /**\n   * Creates either native TextTrack or an emulated TextTrack depending\n   * on the value of `featuresNativeTextTracks`\n   *\n   * @param {Object} options\n   *        The object should contain the options to initialize the TextTrack with.\n   *\n   * @param {string} [options.kind]\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n   *\n   * @param {string} [options.label]\n   *        Label to identify the text track\n   *\n   * @param {string} [options.language]\n   *        Two letter language abbreviation.\n   *\n   * @param {boolean} [options.default]\n   *        Default this track to on.\n   *\n   * @param {string} [options.id]\n   *        The internal id to assign this track.\n   *\n   * @param {string} [options.src]\n   *        A source url for the track.\n   *\n   * @return {HTMLTrackElement}\n   *         The track element that gets created.\n   */\n  ;\n\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\n    if (!this.featuresNativeTextTracks) {\n      return _Tech.prototype.createRemoteTextTrack.call(this, options);\n    }\n\n    var htmlTrackElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\n\n    if (options.kind) {\n      htmlTrackElement.kind = options.kind;\n    }\n\n    if (options.label) {\n      htmlTrackElement.label = options.label;\n    }\n\n    if (options.language || options.srclang) {\n      htmlTrackElement.srclang = options.language || options.srclang;\n    }\n\n    if (options[\"default\"]) {\n      htmlTrackElement[\"default\"] = options[\"default\"];\n    }\n\n    if (options.id) {\n      htmlTrackElement.id = options.id;\n    }\n\n    if (options.src) {\n      htmlTrackElement.src = options.src;\n    }\n\n    return htmlTrackElement;\n  }\n  /**\n   * Creates a remote text track object and returns an html track element.\n   *\n   * @param {Object} options The object should contain values for\n   * kind, language, label, and src (location of the WebVTT file)\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\n   * automatically removed from the video element whenever the source changes\n   * @return {HTMLTrackElement} An Html Track Element.\n   * This can be an emulated {@link HTMLTrackElement} or a native one.\n   * @deprecated The default value of the \"manualCleanup\" parameter will default\n   * to \"false\" in upcoming versions of Video.js\n   */\n  ;\n\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n    var htmlTrackElement = _Tech.prototype.addRemoteTextTrack.call(this, options, manualCleanup);\n\n    if (this.featuresNativeTextTracks) {\n      this.el().appendChild(htmlTrackElement);\n    }\n\n    return htmlTrackElement;\n  }\n  /**\n   * Remove remote `TextTrack` from `TextTrackList` object\n   *\n   * @param {TextTrack} track\n   *        `TextTrack` object to remove\n   */\n  ;\n\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\n    _Tech.prototype.removeRemoteTextTrack.call(this, track);\n\n    if (this.featuresNativeTextTracks) {\n      var tracks = this.$$('track');\n      var i = tracks.length;\n\n      while (i--) {\n        if (track === tracks[i] || track === tracks[i].track) {\n          this.el().removeChild(tracks[i]);\n        }\n      }\n    }\n  }\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object}\n   *         An object with supported media playback quality metrics\n   */\n  ;\n\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\n      return this.el().getVideoPlaybackQuality();\n    }\n\n    var videoPlaybackQuality = {};\n\n    if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\n      videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\n      videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\n    }\n\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now === 'function') {\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\n    } else if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart === 'number') {\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Date.now() - global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart;\n    }\n\n    return videoPlaybackQuality;\n  };\n\n  return Html5;\n}(Tech);\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/**\n * Element for testing browser HTML5 media capabilities\n *\n * @type {Element}\n * @constant\n * @private\n */\n\n\ndefineLazyProperty(Html5, 'TEST_VID', function () {\n  if (!isReal()) {\n    return;\n  }\n\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\n  var track = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\n  track.kind = 'captions';\n  track.srclang = 'en';\n  track.label = 'English';\n  video.appendChild(track);\n  return video;\n});\n/**\n * Check if HTML5 media is supported by this browser/device.\n *\n * @return {boolean}\n *         - True if HTML5 media is supported.\n *         - False if HTML5 media is not supported.\n */\n\nHtml5.isSupported = function () {\n  // IE with no Media Player is a LIAR! (#984)\n  try {\n    Html5.TEST_VID.volume = 0.5;\n  } catch (e) {\n    return false;\n  }\n\n  return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\n};\n/**\n * Check if the tech can support the given type\n *\n * @param {string} type\n *        The mimetype to check\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n\n\nHtml5.canPlayType = function (type) {\n  return Html5.TEST_VID.canPlayType(type);\n};\n/**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n *        The source object\n * @param {Object} options\n *        The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n\n\nHtml5.canPlaySource = function (srcObj, options) {\n  return Html5.canPlayType(srcObj.type);\n};\n/**\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {boolean}\n *         - True if volume can be controlled\n *         - False otherwise\n */\n\n\nHtml5.canControlVolume = function () {\n  // IE will error if Windows Media Player not installed #3315\n  try {\n    var volume = Html5.TEST_VID.volume;\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\n    var canControl = volume !== Html5.TEST_VID.volume; // With the introduction of iOS 15, there are cases where the volume is read as\n    // changed but reverts back to its original state at the start of the next tick.\n    // To determine whether volume can be controlled on iOS,\n    // a timeout is set and the volume is checked asynchronously.\n    // Since `features` doesn't currently work asynchronously, the value is manually set.\n\n    if (canControl && IS_IOS) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        if (Html5 && Html5.prototype) {\n          Html5.prototype.featuresVolumeControl = volume !== Html5.TEST_VID.volume;\n        }\n      }); // default iOS to false, which will be updated in the timeout above.\n\n      return false;\n    }\n\n    return canControl;\n  } catch (e) {\n    return false;\n  }\n};\n/**\n * Check if the volume can be muted in this browser/device.\n * Some devices, e.g. iOS, don't allow changing volume\n * but permits muting/unmuting.\n *\n * @return {bolean}\n *      - True if volume can be muted\n *      - False otherwise\n */\n\n\nHtml5.canMuteVolume = function () {\n  try {\n    var muted = Html5.TEST_VID.muted; // in some versions of iOS muted property doesn't always\n    // work, so we want to set both property and attribute\n\n    Html5.TEST_VID.muted = !muted;\n\n    if (Html5.TEST_VID.muted) {\n      setAttribute(Html5.TEST_VID, 'muted', 'muted');\n    } else {\n      removeAttribute(Html5.TEST_VID, 'muted', 'muted');\n    }\n\n    return muted !== Html5.TEST_VID.muted;\n  } catch (e) {\n    return false;\n  }\n};\n/**\n * Check if the playback rate can be changed in this browser/device.\n *\n * @return {boolean}\n *         - True if playback rate can be controlled\n *         - False otherwise\n */\n\n\nHtml5.canControlPlaybackRate = function () {\n  // Playback rate API is implemented in Android Chrome, but doesn't do anything\n  // https://github.com/videojs/video.js/issues/3180\n  if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\n    return false;\n  } // IE will error if Windows Media Player not installed #3315\n\n\n  try {\n    var playbackRate = Html5.TEST_VID.playbackRate;\n    Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n    return playbackRate !== Html5.TEST_VID.playbackRate;\n  } catch (e) {\n    return false;\n  }\n};\n/**\n * Check if we can override a video/audio elements attributes, with\n * Object.defineProperty.\n *\n * @return {boolean}\n *         - True if builtin attributes can be overridden\n *         - False otherwise\n */\n\n\nHtml5.canOverrideAttributes = function () {\n  // if we cannot overwrite the src/innerHTML property, there is no support\n  // iOS 7 safari for instance cannot do this.\n  try {\n    var noop = function noop() {};\n\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n  } catch (e) {\n    return false;\n  }\n\n  return true;\n};\n/**\n * Check to see if native `TextTrack`s are supported by this browser/device.\n *\n * @return {boolean}\n *         - True if native `TextTrack`s are supported.\n *         - False otherwise\n */\n\n\nHtml5.supportsNativeTextTracks = function () {\n  return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\n};\n/**\n * Check to see if native `VideoTrack`s are supported by this browser/device\n *\n * @return {boolean}\n *        - True if native `VideoTrack`s are supported.\n *        - False otherwise\n */\n\n\nHtml5.supportsNativeVideoTracks = function () {\n  return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\n};\n/**\n * Check to see if native `AudioTrack`s are supported by this browser/device\n *\n * @return {boolean}\n *        - True if native `AudioTrack`s are supported.\n *        - False otherwise\n */\n\n\nHtml5.supportsNativeAudioTracks = function () {\n  return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\n};\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\n\n\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default {@link Html5.canControlVolume}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {bolean}\n * @default {@link Html5.canMuteVolume}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\n * plays. Examples:\n *   - Set player to play 2x (twice) as fast\n *   - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default {@link Html5.canControlPlaybackRate}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * @type {boolean}\n * @default\n */\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeTextTracks}\n */\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeVideoTracks}\n */\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeAudioTracks}\n */\n\n[['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function (_ref) {\n  var key = _ref[0],\n      fn = _ref[1];\n  defineLazyProperty(Html5.prototype, key, function () {\n    return Html5[fn]();\n  }, true);\n});\nHtml5.prototype.featuresVolumeControl = Html5.canControlVolume();\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the media element\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\n * false there. Everywhere else this should be true.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS; // TODO: Previous comment: No longer appears to be used. Can probably be removed.\n//       Is this true?\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\n * when going into fullscreen.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.featuresFullscreenResize = true;\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\n * If this is false, manual `progress` events will be triggered instead.\n *\n * @type {boolean}\n * @default\n */\n\nHtml5.prototype.featuresProgressEvents = true;\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\n * If this is false, manual `timeupdate` events will be triggered instead.\n *\n * @default\n */\n\nHtml5.prototype.featuresTimeupdateEvents = true;\n/**\n * Whether the HTML5 el supports `requestVideoFrameCallback`\n *\n * @type {boolean}\n */\n\nHtml5.prototype.featuresVideoFrameCallback = !!(Html5.TEST_VID && Html5.TEST_VID.requestVideoFrameCallback); // HTML5 Feature detection and Device Fixes --------------------------------- //\n\nvar canPlayType;\n\nHtml5.patchCanPlayType = function () {\n  // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n  // Firefox and Chrome report correctly\n  if (ANDROID_VERSION >= 4.0 && !IS_FIREFOX && !IS_CHROME) {\n    canPlayType = Html5.TEST_VID && Html5.TEST_VID.constructor.prototype.canPlayType;\n\n    Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\n      var mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\n\n      if (type && mpegurlRE.test(type)) {\n        return 'maybe';\n      }\n\n      return canPlayType.call(this, type);\n    };\n  }\n};\n\nHtml5.unpatchCanPlayType = function () {\n  var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n\n  if (canPlayType) {\n    Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n  }\n\n  return r;\n}; // by default, patch the media element\n\n\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function (el) {\n  if (!el) {\n    return;\n  }\n\n  if (el.parentNode) {\n    el.parentNode.removeChild(el);\n  } // remove any child track or source nodes to prevent their loading\n\n\n  while (el.hasChildNodes()) {\n    el.removeChild(el.firstChild);\n  } // remove any src reference. not setting `src=''` because that causes a warning\n  // in firefox\n\n\n  el.removeAttribute('src'); // force the media element to update its loading state by calling load()\n  // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n\n  if (typeof el.load === 'function') {\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n    (function () {\n      try {\n        el.load();\n      } catch (e) {// not supported\n      }\n    })();\n  }\n};\n\nHtml5.resetMediaElement = function (el) {\n  if (!el) {\n    return;\n  }\n\n  var sources = el.querySelectorAll('source');\n  var i = sources.length;\n\n  while (i--) {\n    el.removeChild(sources[i]);\n  } // remove any src reference.\n  // not setting `src=''` because that throws an error\n\n\n  el.removeAttribute('src');\n\n  if (typeof el.load === 'function') {\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n    (function () {\n      try {\n        el.load();\n      } catch (e) {// satisfy linter\n      }\n    })();\n  }\n};\n/* Native HTML5 element property wrapping ----------------------------------- */\n// Wrap native boolean attributes with getters that check both property and attribute\n// The list is as followed:\n// muted, defaultMuted, autoplay, controls, loop, playsinline\n\n\n[\n/**\n * Get the value of `muted` from the media element. `muted` indicates\n * that the volume for the media should be set to silent. This does not actually change\n * the `volume` attribute.\n *\n * @method Html5#muted\n * @return {boolean}\n *         - True if the value of `volume` should be ignored and the audio set to silent.\n *         - False if the value of `volume` should be used.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\n * whether the media should start muted or not. Only changes the default state of the\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\n * current state.\n *\n * @method Html5#defaultMuted\n * @return {boolean}\n *         - The value of `defaultMuted` from the media element.\n *         - True indicates that the media should start muted.\n *         - False indicates that the media should not start muted\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Get the value of `autoplay` from the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#autoplay\n * @return {boolean}\n *         - The value of `autoplay` from the media element.\n *         - True indicates that the media should start as soon as the page loads.\n *         - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Get the value of `controls` from the media element. `controls` indicates\n * whether the native media controls should be shown or hidden.\n *\n * @method Html5#controls\n * @return {boolean}\n *         - The value of `controls` from the media element.\n *         - True indicates that native controls should be showing.\n *         - False indicates that native controls should be hidden.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\n */\n'controls',\n/**\n * Get the value of `loop` from the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#loop\n * @return {boolean}\n *         - The value of `loop` from the media element.\n *         - True indicates that playback should seek back to start once\n *           the end of a media is reached.\n *         - False indicates that playback should not loop back to the start when the\n *           end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Get the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#playsinline\n * @return {boolean}\n *         - The value of `playsinline` from the media element.\n *         - True indicates that the media should play inline.\n *         - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop] || this.el_.hasAttribute(prop);\n  };\n}); // Wrap native boolean attributes with setters that set both property and attribute\n// The list is as followed:\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\n// setControls is special-cased above\n\n[\n/**\n * Set the value of `muted` on the media element. `muted` indicates that the current\n * audio level should be silent.\n *\n * @method Html5#setMuted\n * @param {boolean} muted\n *        - True if the audio should be set to silent\n *        - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\n * audio level should be silent, but will only effect the muted level on initial playback..\n *\n * @method Html5.prototype.setDefaultMuted\n * @param {boolean} defaultMuted\n *        - True if the audio should be set to silent\n *        - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Set the value of `autoplay` on the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#setAutoplay\n * @param {boolean} autoplay\n *         - True indicates that the media should start as soon as the page loads.\n *         - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Set the value of `loop` on the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#setLoop\n * @param {boolean} loop\n *         - True indicates that playback should seek back to start once\n *           the end of a media is reached.\n *         - False indicates that playback should not loop back to the start when the\n *           end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Set the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#setPlaysinline\n * @param {boolean} playsinline\n *         - True indicates that the media should play inline.\n *         - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n  Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n    this.el_[prop] = v;\n\n    if (v) {\n      this.el_.setAttribute(prop, prop);\n    } else {\n      this.el_.removeAttribute(prop);\n    }\n  };\n}); // Wrap native properties with a getter\n// The list is as followed\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\n// seekable, ended, playbackRate, defaultPlaybackRate, disablePictureInPicture\n// played, networkState, readyState, videoWidth, videoHeight, crossOrigin\n\n[\n/**\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\n * is currently paused or not.\n *\n * @method Html5#paused\n * @return {boolean}\n *         The value of `paused` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\n */\n'paused',\n/**\n * Get the value of `currentTime` from the media element. `currentTime` indicates\n * the current second that the media is at in playback.\n *\n * @method Html5#currentTime\n * @return {number}\n *         The value of `currentTime` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\n */\n'currentTime',\n/**\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\n * object that represents the parts of the media that are already downloaded and\n * available for playback.\n *\n * @method Html5#buffered\n * @return {TimeRange}\n *         The value of `buffered` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\n */\n'buffered',\n/**\n * Get the value of `volume` from the media element. `volume` indicates\n * the current playback volume of audio for a media. `volume` will be a value from 0\n * (silent) to 1 (loudest and default).\n *\n * @method Html5#volume\n * @return {number}\n *         The value of `volume` from the media element. Value will be between 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Get the value of `poster` from the media element. `poster` indicates\n * that the url of an image file that can/will be shown when no media data is available.\n *\n * @method Html5#poster\n * @return {string}\n *         The value of `poster` from the media element. Value will be a url to an\n *         image.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\n */\n'poster',\n/**\n * Get the value of `preload` from the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n *   media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n *    interaction\n *\n * @method Html5#preload\n * @return {string}\n *         The value of `preload` from the media element. Will be 'none', 'metadata',\n *         or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Get the value of the `error` from the media element. `error` indicates any\n * MediaError that may have occurred during playback. If error returns null there is no\n * current error.\n *\n * @method Html5#error\n * @return {MediaError|null}\n *         The value of `error` from the media element. Will be `MediaError` if there\n *         is a current error and null otherwise.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\n */\n'error',\n/**\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\n * media is currently seeking to a new position or not.\n *\n * @method Html5#seeking\n * @return {boolean}\n *         - The value of `seeking` from the media element.\n *         - True indicates that the media is currently seeking to a new position.\n *         - False indicates that the media is not seeking to a new position at this time.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\n */\n'seeking',\n/**\n * Get the value of `seekable` from the media element. `seekable` returns a\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\n *\n * @method Html5#seekable\n * @return {TimeRange}\n *         The value of `seekable` from the media element. A `TimeRange` object\n *         indicating the current ranges of time that can be seeked to.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\n */\n'seekable',\n/**\n * Get the value of `ended` from the media element. `ended` indicates whether\n * the media has reached the end or not.\n *\n * @method Html5#ended\n * @return {boolean}\n *         - The value of `ended` from the media element.\n *         - True indicates that the media has ended.\n *         - False indicates that the media has not ended.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\n */\n'ended',\n/**\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\n * the rate at which the media is currently playing back. Examples:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#playbackRate\n * @return {number}\n *         The value of `playbackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\n * the rate at which the media is currently playing back. This value will not indicate the current\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\n *\n * Examples:\n *   - if defaultPlaybackRate is set to 2, media will play twice as fast.\n *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.defaultPlaybackRate\n * @return {number}\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'defaultPlaybackRate',\n/**\n * Get the value of 'disablePictureInPicture' from the video element.\n *\n * @method Html5#disablePictureInPicture\n * @return {boolean} value\n *         - The value of `disablePictureInPicture` from the video element.\n *         - True indicates that the video can't be played in Picture-In-Picture mode\n *         - False indicates that the video can be played in Picture-In-Picture mode\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\n * object representing points in the media timeline that have been played.\n *\n * @method Html5#played\n * @return {TimeRange}\n *         The value of `played` from the media element. A `TimeRange` object indicating\n *         the ranges of time that have been played.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\n */\n'played',\n/**\n * Get the value of `networkState` from the media element. `networkState` indicates\n * the current network state. It returns an enumeration from the following list:\n * - 0: NETWORK_EMPTY\n * - 1: NETWORK_IDLE\n * - 2: NETWORK_LOADING\n * - 3: NETWORK_NO_SOURCE\n *\n * @method Html5#networkState\n * @return {number}\n *         The value of `networkState` from the media element. This will be a number\n *         from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\n */\n'networkState',\n/**\n * Get the value of `readyState` from the media element. `readyState` indicates\n * the current state of the media element. It returns an enumeration from the\n * following list:\n * - 0: HAVE_NOTHING\n * - 1: HAVE_METADATA\n * - 2: HAVE_CURRENT_DATA\n * - 3: HAVE_FUTURE_DATA\n * - 4: HAVE_ENOUGH_DATA\n *\n * @method Html5#readyState\n * @return {number}\n *         The value of `readyState` from the media element. This will be a number\n *         from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\n */\n'readyState',\n/**\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\n * the current width of the video in css pixels.\n *\n * @method Html5#videoWidth\n * @return {number}\n *         The value of `videoWidth` from the video element. This will be a number\n *         in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoWidth',\n/**\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\n * the current height of the video in css pixels.\n *\n * @method Html5#videoHeight\n * @return {number}\n *         The value of `videoHeight` from the video element. This will be a number\n *         in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoHeight',\n/**\n * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#crossOrigin\n * @return {string}\n *         - anonymous indicates that the media should not sent cookies.\n *         - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop];\n  };\n}); // Wrap native properties with a setter in this format:\n// set + toTitleCase(name)\n// The list is as follows:\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate,\n// setDisablePictureInPicture, setCrossOrigin\n\n[\n/**\n * Set the value of `volume` on the media element. `volume` indicates the current\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\n * so on.\n *\n * @method Html5#setVolume\n * @param {number} percentAsDecimal\n *        The volume percent as a decimal. Valid range is from 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Set the value of `src` on the media element. `src` indicates the current\n * {@link Tech~SourceObject} for the media.\n *\n * @method Html5#setSrc\n * @param {Tech~SourceObject} src\n *        The source object to set as the current source.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\n */\n'src',\n/**\n * Set the value of `poster` on the media element. `poster` is the url to\n * an image file that can/will be shown when no media data is available.\n *\n * @method Html5#setPoster\n * @param {string} poster\n *        The url to an image that should be used as the `poster` for the media\n *        element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\n */\n'poster',\n/**\n * Set the value of `preload` on the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n *   media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n *    interaction\n *\n * @method Html5#setPreload\n * @param {string} preload\n *         The value of `preload` to set on the media element. Must be 'none', 'metadata',\n *         or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\n * the rate at which the media should play back. Examples:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#setPlaybackRate\n * @return {number}\n *         The value of `playbackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\n * the rate at which the media should play back upon initial startup. Changing this value\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\n *\n * Example Values:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.setDefaultPlaybackRate\n * @return {number}\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\n */\n'defaultPlaybackRate',\n/**\n * Prevents the browser from suggesting a Picture-in-Picture context menu\n * or to request Picture-in-Picture automatically in some cases.\n *\n * @method Html5#setDisablePictureInPicture\n * @param {boolean} value\n *         The true value will disable Picture-in-Picture mode.\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#setCrossOrigin\n * @param {string} crossOrigin\n *         - anonymous indicates that the media should not sent cookies.\n *         - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n  Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n    this.el_[prop] = v;\n  };\n}); // wrap native functions with a function\n// The list is as follows:\n// pause, load, play\n\n[\n/**\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\n * media elements `pause` function.\n *\n * @method Html5#pause\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\n */\n'pause',\n/**\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\n * media element `load` function.\n *\n * @method Html5#load\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\n */\n'load',\n/**\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\n * media element `play` function.\n *\n * @method Html5#play\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\n */\n'play'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop]();\n  };\n});\nTech.withSourceHandlers(Html5);\n/**\n * Native source handler for Html5, simply passes the source to the media element.\n *\n * @property {Tech~SourceObject} source\n *        The source object\n *\n * @property {Html5} tech\n *        The instance of the HTML5 tech.\n */\n\nHtml5.nativeSourceHandler = {};\n/**\n * Check if the media element can play the given mime type.\n *\n * @param {string} type\n *        The mimetype to check\n *\n * @return {string}\n *         'probably', 'maybe', or '' (empty string)\n */\n\nHtml5.nativeSourceHandler.canPlayType = function (type) {\n  // IE without MediaPlayer throws an error (#519)\n  try {\n    return Html5.TEST_VID.canPlayType(type);\n  } catch (e) {\n    return '';\n  }\n};\n/**\n * Check if the media element can handle a source natively.\n *\n * @param {Tech~SourceObject} source\n *         The source object\n *\n * @param {Object} [options]\n *         Options to be passed to the tech.\n *\n * @return {string}\n *         'probably', 'maybe', or '' (empty string).\n */\n\n\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\n  // If a type was provided we should rely on that\n  if (source.type) {\n    return Html5.nativeSourceHandler.canPlayType(source.type); // If no type, fall back to checking 'video/[EXTENSION]'\n  } else if (source.src) {\n    var ext = getFileExtension(source.src);\n    return Html5.nativeSourceHandler.canPlayType(\"video/\" + ext);\n  }\n\n  return '';\n};\n/**\n * Pass the source to the native media element.\n *\n * @param {Tech~SourceObject} source\n *        The source object\n *\n * @param {Html5} tech\n *        The instance of the Html5 tech\n *\n * @param {Object} [options]\n *        The options to pass to the source\n */\n\n\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\n  tech.setSrc(source.src);\n};\n/**\n * A noop for the native dispose function, as cleanup is not needed.\n */\n\n\nHtml5.nativeSourceHandler.dispose = function () {}; // Register the native source handler\n\n\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\nTech.registerTech('Html5', Html5);\n\n// on the player when they happen\n\nvar TECH_EVENTS_RETRIGGER = [\n/**\n * Fired while the user agent is downloading media data.\n *\n * @event Player#progress\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechProgress_\n * @fires Player#progress\n * @listens Tech#progress\n */\n'progress',\n/**\n * Fires when the loading of an audio/video is aborted.\n *\n * @event Player#abort\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechAbort_\n * @fires Player#abort\n * @listens Tech#abort\n */\n'abort',\n/**\n * Fires when the browser is intentionally not getting media data.\n *\n * @event Player#suspend\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechSuspend_\n * @fires Player#suspend\n * @listens Tech#suspend\n */\n'suspend',\n/**\n * Fires when the current playlist is empty.\n *\n * @event Player#emptied\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechEmptied_\n * @fires Player#emptied\n * @listens Tech#emptied\n */\n'emptied',\n/**\n * Fires when the browser is trying to get media data, but data is not available.\n *\n * @event Player#stalled\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechStalled_\n * @fires Player#stalled\n * @listens Tech#stalled\n */\n'stalled',\n/**\n * Fires when the browser has loaded meta data for the audio/video.\n *\n * @event Player#loadedmetadata\n * @type {EventTarget~Event}\n */\n\n/**\n * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoadedmetadata_\n * @fires Player#loadedmetadata\n * @listens Tech#loadedmetadata\n */\n'loadedmetadata',\n/**\n * Fires when the browser has loaded the current frame of the audio/video.\n *\n * @event Player#loadeddata\n * @type {event}\n */\n\n/**\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoaddeddata_\n * @fires Player#loadeddata\n * @listens Tech#loadeddata\n */\n'loadeddata',\n/**\n * Fires when the current playback position has changed.\n *\n * @event Player#timeupdate\n * @type {event}\n */\n\n/**\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTimeUpdate_\n * @fires Player#timeupdate\n * @listens Tech#timeupdate\n */\n'timeupdate',\n/**\n * Fires when the video's intrinsic dimensions change\n *\n * @event Player#resize\n * @type {event}\n */\n\n/**\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechResize_\n * @fires Player#resize\n * @listens Tech#resize\n */\n'resize',\n/**\n * Fires when the volume has been changed\n *\n * @event Player#volumechange\n * @type {event}\n */\n\n/**\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechVolumechange_\n * @fires Player#volumechange\n * @listens Tech#volumechange\n */\n'volumechange',\n/**\n * Fires when the text track has been changed\n *\n * @event Player#texttrackchange\n * @type {event}\n */\n\n/**\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTexttrackchange_\n * @fires Player#texttrackchange\n * @listens Tech#texttrackchange\n */\n'texttrackchange']; // events to queue when playback rate is zero\n// this is a hash for the sole purpose of mapping non-camel-cased event names\n// to camel-cased function names\n\nvar TECH_EVENTS_QUEUE = {\n  canplay: 'CanPlay',\n  canplaythrough: 'CanPlayThrough',\n  playing: 'Playing',\n  seeked: 'Seeked'\n};\nvar BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nvar BREAKPOINT_CLASSES = {}; // grep: vjs-layout-tiny\n// grep: vjs-layout-x-small\n// grep: vjs-layout-small\n// grep: vjs-layout-medium\n// grep: vjs-layout-large\n// grep: vjs-layout-x-large\n// grep: vjs-layout-huge\n\nBREAKPOINT_ORDER.forEach(function (k) {\n  var v = k.charAt(0) === 'x' ? \"x-\" + k.substring(1) : k;\n  BREAKPOINT_CLASSES[k] = \"vjs-layout-\" + v;\n});\nvar DEFAULT_BREAKPOINTS = {\n  tiny: 210,\n  xsmall: 320,\n  small: 425,\n  medium: 768,\n  large: 1440,\n  xlarge: 2560,\n  huge: Infinity\n};\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods\n * are used to initialize a video.\n *\n * After an instance has been created it can be accessed globally in two ways:\n * 1. By calling `videojs('example_video_1');`\n * 2. By using it directly via  `videojs.players.example_video_1;`\n *\n * @extends Component\n */\n\nvar Player = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(Player, _Component);\n\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Element} tag\n   *        The original video DOM element used for configuring options.\n   *\n   * @param {Object} [options]\n   *        Object of option names and values.\n   *\n   * @param {Component~ReadyCallback} [ready]\n   *        Ready callback function.\n   */\n  function Player(tag, options, ready) {\n    var _this;\n\n    // Make sure tag ID exists\n    tag.id = tag.id || options.id || \"vjs_video_\" + newGUID(); // Set Options\n    // The options argument overrides options set in the video tag\n    // which overrides globally set options.\n    // This latter part coincides with the load order\n    // (tag must exist before Player)\n\n    options = assign(Player.getTagSettings(tag), options); // Delay the initialization of children because we need to set up\n    // player properties first, and can't use `this` before `super()`\n\n    options.initChildren = false; // Same with creating the element\n\n    options.createEl = false; // don't auto mixin the evented mixin\n\n    options.evented = false; // we don't want the player to report touch activity on itself\n    // see enableTouchActivity in Component\n\n    options.reportTouchActivity = false; // If language is not set, get the closest lang attribute\n\n    if (!options.language) {\n      if (typeof tag.closest === 'function') {\n        var closest = tag.closest('[lang]');\n\n        if (closest && closest.getAttribute) {\n          options.language = closest.getAttribute('lang');\n        }\n      } else {\n        var element = tag;\n\n        while (element && element.nodeType === 1) {\n          if (getAttributes(element).hasOwnProperty('lang')) {\n            options.language = element.getAttribute('lang');\n            break;\n          }\n\n          element = element.parentNode;\n        }\n      }\n    } // Run base component initializing with new options\n\n\n    _this = _Component.call(this, null, options, ready) || this; // Create bound methods for document listeners.\n\n    _this.boundDocumentFullscreenChange_ = function (e) {\n      return _this.documentFullscreenChange_(e);\n    };\n\n    _this.boundFullWindowOnEscKey_ = function (e) {\n      return _this.fullWindowOnEscKey(e);\n    };\n\n    _this.boundUpdateStyleEl_ = function (e) {\n      return _this.updateStyleEl_(e);\n    };\n\n    _this.boundApplyInitTime_ = function (e) {\n      return _this.applyInitTime_(e);\n    };\n\n    _this.boundUpdateCurrentBreakpoint_ = function (e) {\n      return _this.updateCurrentBreakpoint_(e);\n    };\n\n    _this.boundHandleTechClick_ = function (e) {\n      return _this.handleTechClick_(e);\n    };\n\n    _this.boundHandleTechDoubleClick_ = function (e) {\n      return _this.handleTechDoubleClick_(e);\n    };\n\n    _this.boundHandleTechTouchStart_ = function (e) {\n      return _this.handleTechTouchStart_(e);\n    };\n\n    _this.boundHandleTechTouchMove_ = function (e) {\n      return _this.handleTechTouchMove_(e);\n    };\n\n    _this.boundHandleTechTouchEnd_ = function (e) {\n      return _this.handleTechTouchEnd_(e);\n    };\n\n    _this.boundHandleTechTap_ = function (e) {\n      return _this.handleTechTap_(e);\n    }; // default isFullscreen_ to false\n\n\n    _this.isFullscreen_ = false; // create logger\n\n    _this.log = createLogger(_this.id_); // Hold our own reference to fullscreen api so it can be mocked in tests\n\n    _this.fsApi_ = FullscreenApi; // Tracks when a tech changes the poster\n\n    _this.isPosterFromTech_ = false; // Holds callback info that gets queued when playback rate is zero\n    // and a seek is happening\n\n    _this.queuedCallbacks_ = []; // Turn off API access because we're loading a new tech that might load asynchronously\n\n    _this.isReady_ = false; // Init state hasStarted_\n\n    _this.hasStarted_ = false; // Init state userActive_\n\n    _this.userActive_ = false; // Init debugEnabled_\n\n    _this.debugEnabled_ = false; // Init state audioOnlyMode_\n\n    _this.audioOnlyMode_ = false; // Init state audioPosterMode_\n\n    _this.audioPosterMode_ = false; // Init state audioOnlyCache_\n\n    _this.audioOnlyCache_ = {\n      playerHeight: null,\n      hiddenChildren: []\n    }; // if the global option object was accidentally blown away by\n    // someone, bail early with an informative error\n\n    if (!_this.options_ || !_this.options_.techOrder || !_this.options_.techOrder.length) {\n      throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n    } // Store the original tag used to set options\n\n\n    _this.tag = tag; // Store the tag attributes used to restore html5 element\n\n    _this.tagAttributes = tag && getAttributes(tag); // Update current language\n\n    _this.language(_this.options_.language); // Update Supported Languages\n\n\n    if (options.languages) {\n      // Normalise player option languages to lowercase\n      var languagesToLower = {};\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n        languagesToLower[name.toLowerCase()] = options.languages[name];\n      });\n      _this.languages_ = languagesToLower;\n    } else {\n      _this.languages_ = Player.prototype.options_.languages;\n    }\n\n    _this.resetCache_(); // Set poster\n\n\n    _this.poster_ = options.poster || ''; // Set controls\n\n    _this.controls_ = !!options.controls; // Original tag settings stored in options\n    // now remove immediately so native controls don't flash.\n    // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n\n    tag.controls = false;\n    tag.removeAttribute('controls');\n    _this.changingSrc_ = false;\n    _this.playCallbacks_ = [];\n    _this.playTerminatedQueue_ = []; // the attribute overrides the option\n\n    if (tag.hasAttribute('autoplay')) {\n      _this.autoplay(true);\n    } else {\n      // otherwise use the setter to validate and\n      // set the correct value.\n      _this.autoplay(_this.options_.autoplay);\n    } // check plugins\n\n\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(function (name) {\n        if (typeof _this[name] !== 'function') {\n          throw new Error(\"plugin \\\"\" + name + \"\\\" does not exist\");\n        }\n      });\n    }\n    /*\n     * Store the internal state of scrubbing\n     *\n     * @private\n     * @return {Boolean} True if the user is scrubbing\n     */\n\n\n    _this.scrubbing_ = false;\n    _this.el_ = _this.createEl(); // Make this an evented object and use `el_` as its event bus.\n\n    evented(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), {\n      eventBusKey: 'el_'\n    }); // listen to document and player fullscreenchange handlers so we receive those events\n    // before a user can receive them so we can update isFullscreen appropriately.\n    // make sure that we listen to fullscreenchange events before everything else to make sure that\n    // our isFullscreen method is updated properly for internal components as well as external.\n\n    if (_this.fsApi_.requestFullscreen) {\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, _this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\n\n      _this.on(_this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\n    }\n\n    if (_this.fluid_) {\n      _this.on(['playerreset', 'resize'], _this.boundUpdateStyleEl_);\n    } // We also want to pass the original player options to each component and plugin\n    // as well so they don't need to reach back into the player for options later.\n    // We also need to do another copy of this.options_ so we don't end up with\n    // an infinite loop.\n\n\n    var playerOptionsCopy = mergeOptions$3(_this.options_); // Load plugins\n\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(function (name) {\n        _this[name](options.plugins[name]);\n      });\n    } // Enable debug mode to fire debugon event for all plugins.\n\n\n    if (options.debug) {\n      _this.debug(true);\n    }\n\n    _this.options_.playerOptions = playerOptionsCopy;\n    _this.middleware_ = [];\n\n    _this.playbackRates(options.playbackRates);\n\n    _this.initChildren(); // Set isAudio based on whether or not an audio tag was used\n\n\n    _this.isAudio(tag.nodeName.toLowerCase() === 'audio'); // Update controls className. Can't do this when the controls are initially\n    // set because the element doesn't exist yet.\n\n\n    if (_this.controls()) {\n      _this.addClass('vjs-controls-enabled');\n    } else {\n      _this.addClass('vjs-controls-disabled');\n    } // Set ARIA label and region role depending on player type\n\n\n    _this.el_.setAttribute('role', 'region');\n\n    if (_this.isAudio()) {\n      _this.el_.setAttribute('aria-label', _this.localize('Audio Player'));\n    } else {\n      _this.el_.setAttribute('aria-label', _this.localize('Video Player'));\n    }\n\n    if (_this.isAudio()) {\n      _this.addClass('vjs-audio');\n    }\n\n    if (_this.flexNotSupported_()) {\n      _this.addClass('vjs-no-flex');\n    } // TODO: Make this smarter. Toggle user state between touching/mousing\n    // using events, since devices can have both touch and mouse events.\n    // TODO: Make this check be performed again when the window switches between monitors\n    // (See https://github.com/videojs/video.js/issues/5683)\n\n\n    if (TOUCH_ENABLED) {\n      _this.addClass('vjs-touch-enabled');\n    } // iOS Safari has broken hover handling\n\n\n    if (!IS_IOS) {\n      _this.addClass('vjs-workinghover');\n    } // Make player easily findable by ID\n\n\n    Player.players[_this.id_] = _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this); // Add a major version class to aid css in plugins\n\n    var majorVersion = version$5.split('.')[0];\n\n    _this.addClass(\"vjs-v\" + majorVersion); // When the player is first initialized, trigger activity so components\n    // like the control bar show themselves if needed\n\n\n    _this.userActive(true);\n\n    _this.reportUserActivity();\n\n    _this.one('play', function (e) {\n      return _this.listenForUserActivity_(e);\n    });\n\n    _this.on('stageclick', function (e) {\n      return _this.handleStageClick_(e);\n    });\n\n    _this.on('keydown', function (e) {\n      return _this.handleKeyDown(e);\n    });\n\n    _this.on('languagechange', function (e) {\n      return _this.handleLanguagechange(e);\n    });\n\n    _this.breakpoints(_this.options_.breakpoints);\n\n    _this.responsive(_this.options_.responsive); // Calling both the audio mode methods after the player is fully\n    // setup to be able to listen to the events triggered by them\n\n\n    _this.on('ready', function () {\n      // Calling the audioPosterMode method first so that\n      // the audioOnlyMode can take precedence when both options are set to true\n      _this.audioPosterMode(_this.options_.audioPosterMode);\n\n      _this.audioOnlyMode(_this.options_.audioOnlyMode);\n    });\n\n    return _this;\n  }\n  /**\n   * Destroys the video player and does any necessary cleanup.\n   *\n   * This is especially helpful if you are dynamically adding and removing videos\n   * to/from the DOM.\n   *\n   * @fires Player#dispose\n   */\n\n\n  var _proto = Player.prototype;\n\n  _proto.dispose = function dispose() {\n    var _this2 = this;\n\n    /**\n     * Called when the player is being disposed of.\n     *\n     * @event Player#dispose\n     * @type {EventTarget~Event}\n     */\n    this.trigger('dispose'); // prevent dispose from being called twice\n\n    this.off('dispose'); // Make sure all player-specific document listeners are unbound. This is\n\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_);\n\n    if (this.styleEl_ && this.styleEl_.parentNode) {\n      this.styleEl_.parentNode.removeChild(this.styleEl_);\n      this.styleEl_ = null;\n    } // Kill reference to this player\n\n\n    Player.players[this.id_] = null;\n\n    if (this.tag && this.tag.player) {\n      this.tag.player = null;\n    }\n\n    if (this.el_ && this.el_.player) {\n      this.el_.player = null;\n    }\n\n    if (this.tech_) {\n      this.tech_.dispose();\n      this.isPosterFromTech_ = false;\n      this.poster_ = '';\n    }\n\n    if (this.playerElIngest_) {\n      this.playerElIngest_ = null;\n    }\n\n    if (this.tag) {\n      this.tag = null;\n    }\n\n    clearCacheForPlayer(this); // remove all event handlers for track lists\n    // all tracks and track listeners are removed on\n    // tech dispose\n\n    ALL.names.forEach(function (name) {\n      var props = ALL[name];\n\n      var list = _this2[props.getterName](); // if it is not a native list\n      // we have to manually remove event listeners\n\n\n      if (list && list.off) {\n        list.off();\n      }\n    }); // the actual .el_ is removed here, or replaced if\n\n    _Component.prototype.dispose.call(this, {\n      restoreEl: this.options_.restoreEl\n    });\n  }\n  /**\n   * Create the `Player`'s DOM element.\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  ;\n\n  _proto.createEl = function createEl() {\n    var tag = this.tag;\n    var el;\n    var playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n    var divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n\n    if (playerElIngest) {\n      el = this.el_ = tag.parentNode;\n    } else if (!divEmbed) {\n      el = this.el_ = _Component.prototype.createEl.call(this, 'div');\n    } // Copy over all the attributes from the tag, including ID and class\n    // ID will now reference player box, not the video tag\n\n\n    var attrs = getAttributes(tag);\n\n    if (divEmbed) {\n      el = this.el_ = tag;\n      tag = this.tag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\n\n      while (el.children.length) {\n        tag.appendChild(el.firstChild);\n      }\n\n      if (!hasClass(el, 'video-js')) {\n        addClass(el, 'video-js');\n      }\n\n      el.appendChild(tag);\n      playerElIngest = this.playerElIngest_ = el; // move properties over from our custom `video-js` element\n      // to our new `video` element. This will move things like\n      // `src` or `controls` that were set via js before the player\n      // was initialized.\n\n      Object.keys(el).forEach(function (k) {\n        try {\n          tag[k] = el[k];\n        } catch (e) {// we got a a property like outerHTML which we can't actually copy, ignore it\n        }\n      });\n    } // set tabindex to -1 to remove the video element from the focus order\n\n\n    tag.setAttribute('tabindex', '-1');\n    attrs.tabindex = '-1'; // Workaround for #4583 (JAWS+IE doesn't announce BPB or play button), and\n    // for the same issue with Chrome (on Windows) with JAWS.\n    // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\n    // Note that we can't detect if JAWS is being used, but this ARIA attribute\n    //  doesn't change behavior of IE11 or Chrome if JAWS is not being used\n\n    if (IE_VERSION || IS_CHROME && IS_WINDOWS) {\n      tag.setAttribute('role', 'application');\n      attrs.role = 'application';\n    } // Remove width/height attrs from tag so CSS can make it 100% width/height\n\n\n    tag.removeAttribute('width');\n    tag.removeAttribute('height');\n\n    if ('width' in attrs) {\n      delete attrs.width;\n    }\n\n    if ('height' in attrs) {\n      delete attrs.height;\n    }\n\n    Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n      // don't copy over the class attribute to the player element when we're in a div embed\n      // the class is already set up properly in the divEmbed case\n      // and we want to make sure that the `video-js` class doesn't get lost\n      if (!(divEmbed && attr === 'class')) {\n        el.setAttribute(attr, attrs[attr]);\n      }\n\n      if (divEmbed) {\n        tag.setAttribute(attr, attrs[attr]);\n      }\n    }); // Update tag id/class for use as HTML5 playback tech\n    // Might think we should do this after embedding in container so .vjs-tech class\n    // doesn't flash 100% width/height, but class only applies with .video-js parent\n\n    tag.playerId = tag.id;\n    tag.id += '_html5_api';\n    tag.className = 'vjs-tech'; // Make player findable on elements\n\n    tag.player = el.player = this; // Default state of video is paused\n\n    this.addClass('vjs-paused'); // Add a style element in the player that we'll use to set the width/height\n    // of the player in a way that's still overrideable by CSS, just like the\n    // video element\n\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n      this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n      var defaultsStyleEl = $('.vjs-styles-defaults');\n      var head = $('head');\n      head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n    }\n\n    this.fill_ = false;\n    this.fluid_ = false; // Pass in the width/height/aspectRatio options which will update the style el\n\n    this.width(this.options_.width);\n    this.height(this.options_.height);\n    this.fill(this.options_.fill);\n    this.fluid(this.options_.fluid);\n    this.aspectRatio(this.options_.aspectRatio); // support both crossOrigin and crossorigin to reduce confusion and issues around the name\n\n    this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin); // Hide any links within the video/audio tag,\n    // because IE doesn't hide them completely from screen readers.\n\n    var links = tag.getElementsByTagName('a');\n\n    for (var i = 0; i < links.length; i++) {\n      var linkEl = links.item(i);\n      addClass(linkEl, 'vjs-hidden');\n      linkEl.setAttribute('hidden', 'hidden');\n    } // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n    // keep track of the original for later so we can know if the source originally failed\n\n\n    tag.initNetworkState_ = tag.networkState; // Wrap video tag in div (el/box) container\n\n    if (tag.parentNode && !playerElIngest) {\n      tag.parentNode.insertBefore(el, tag);\n    } // insert the tag as the first child of the player element\n    // then manually add it to the children array so that this.addChild\n    // will work properly for other components\n    //\n    // Breaks iPhone, fixed in HTML5 setup.\n\n\n    prependTo(tag, el);\n    this.children_.unshift(tag); // Set lang attr on player to ensure CSS :lang() in consistent with player\n    // if it's been set to something different to the doc\n\n    this.el_.setAttribute('lang', this.language_);\n    this.el_.setAttribute('translate', 'no');\n    this.el_ = el;\n    return el;\n  }\n  /**\n   * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\n   * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n   * behavior.\n   *\n   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n   *\n   * @param {string} [value]\n   *        The value to set the `Player`'s crossOrigin to. If an argument is\n   *        given, must be one of `anonymous` or `use-credentials`.\n   *\n   * @return {string|undefined}\n   *         - The current crossOrigin value of the `Player` when getting.\n   *         - undefined when setting\n   */\n  ;\n\n  _proto.crossOrigin = function crossOrigin(value) {\n    if (!value) {\n      return this.techGet_('crossOrigin');\n    }\n\n    if (value !== 'anonymous' && value !== 'use-credentials') {\n      log$1.warn(\"crossOrigin must be \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"\" + value + \"\\\"\");\n      return;\n    }\n\n    this.techCall_('setCrossOrigin', value);\n    return;\n  }\n  /**\n   * A getter/setter for the `Player`'s width. Returns the player's configured value.\n   * To get the current width use `currentWidth()`.\n   *\n   * @param {number} [value]\n   *        The value to set the `Player`'s width to.\n   *\n   * @return {number}\n   *         The current width of the `Player` when getting.\n   */\n  ;\n\n  _proto.width = function width(value) {\n    return this.dimension('width', value);\n  }\n  /**\n   * A getter/setter for the `Player`'s height. Returns the player's configured value.\n   * To get the current height use `currentheight()`.\n   *\n   * @param {number} [value]\n   *        The value to set the `Player`'s heigth to.\n   *\n   * @return {number}\n   *         The current height of the `Player` when getting.\n   */\n  ;\n\n  _proto.height = function height(value) {\n    return this.dimension('height', value);\n  }\n  /**\n   * A getter/setter for the `Player`'s width & height.\n   *\n   * @param {string} dimension\n   *        This string can be:\n   *        - 'width'\n   *        - 'height'\n   *\n   * @param {number} [value]\n   *        Value for dimension specified in the first argument.\n   *\n   * @return {number}\n   *         The dimension arguments value when getting (width/height).\n   */\n  ;\n\n  _proto.dimension = function dimension(_dimension, value) {\n    var privDimension = _dimension + '_';\n\n    if (value === undefined) {\n      return this[privDimension] || 0;\n    }\n\n    if (value === '' || value === 'auto') {\n      // If an empty string is given, reset the dimension to be automatic\n      this[privDimension] = undefined;\n      this.updateStyleEl_();\n      return;\n    }\n\n    var parsedVal = parseFloat(value);\n\n    if (isNaN(parsedVal)) {\n      log$1.error(\"Improper value \\\"\" + value + \"\\\" supplied for for \" + _dimension);\n      return;\n    }\n\n    this[privDimension] = parsedVal;\n    this.updateStyleEl_();\n  }\n  /**\n   * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\n   *\n   * Turning this on will turn off fill mode.\n   *\n   * @param {boolean} [bool]\n   *        - A value of true adds the class.\n   *        - A value of false removes the class.\n   *        - No value will be a getter.\n   *\n   * @return {boolean|undefined}\n   *         - The value of fluid when getting.\n   *         - `undefined` when setting.\n   */\n  ;\n\n  _proto.fluid = function fluid(bool) {\n    var _this3 = this;\n\n    if (bool === undefined) {\n      return !!this.fluid_;\n    }\n\n    this.fluid_ = !!bool;\n\n    if (isEvented(this)) {\n      this.off(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n    }\n\n    if (bool) {\n      this.addClass('vjs-fluid');\n      this.fill(false);\n      addEventedCallback(this, function () {\n        _this3.on(['playerreset', 'resize'], _this3.boundUpdateStyleEl_);\n      });\n    } else {\n      this.removeClass('vjs-fluid');\n    }\n\n    this.updateStyleEl_();\n  }\n  /**\n   * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\n   *\n   * Turning this on will turn off fluid mode.\n   *\n   * @param {boolean} [bool]\n   *        - A value of true adds the class.\n   *        - A value of false removes the class.\n   *        - No value will be a getter.\n   *\n   * @return {boolean|undefined}\n   *         - The value of fluid when getting.\n   *         - `undefined` when setting.\n   */\n  ;\n\n  _proto.fill = function fill(bool) {\n    if (bool === undefined) {\n      return !!this.fill_;\n    }\n\n    this.fill_ = !!bool;\n\n    if (bool) {\n      this.addClass('vjs-fill');\n      this.fluid(false);\n    } else {\n      this.removeClass('vjs-fill');\n    }\n  }\n  /**\n   * Get/Set the aspect ratio\n   *\n   * @param {string} [ratio]\n   *        Aspect ratio for player\n   *\n   * @return {string|undefined}\n   *         returns the current aspect ratio when getting\n   */\n\n  /**\n   * A getter/setter for the `Player`'s aspect ratio.\n   *\n   * @param {string} [ratio]\n   *        The value to set the `Player`'s aspect ratio to.\n   *\n   * @return {string|undefined}\n   *         - The current aspect ratio of the `Player` when getting.\n   *         - undefined when setting\n   */\n  ;\n\n  _proto.aspectRatio = function aspectRatio(ratio) {\n    if (ratio === undefined) {\n      return this.aspectRatio_;\n    } // Check for width:height format\n\n\n    if (!/^\\d+\\:\\d+$/.test(ratio)) {\n      throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n    }\n\n    this.aspectRatio_ = ratio; // We're assuming if you set an aspect ratio you want fluid mode,\n    // because in fixed mode you could calculate width and height yourself.\n\n    this.fluid(true);\n    this.updateStyleEl_();\n  }\n  /**\n   * Update styles of the `Player` element (height, width and aspect ratio).\n   *\n   * @private\n   * @listens Tech#loadedmetadata\n   */\n  ;\n\n  _proto.updateStyleEl_ = function updateStyleEl_() {\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n      var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n\n      var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n\n      var techEl = this.tech_ && this.tech_.el();\n\n      if (techEl) {\n        if (_width >= 0) {\n          techEl.width = _width;\n        }\n\n        if (_height >= 0) {\n          techEl.height = _height;\n        }\n      }\n\n      return;\n    }\n\n    var width;\n    var height;\n    var aspectRatio;\n    var idClass; // The aspect ratio is either used directly or to calculate width and height.\n\n    if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n      // Use any aspectRatio that's been specifically set\n      aspectRatio = this.aspectRatio_;\n    } else if (this.videoWidth() > 0) {\n      // Otherwise try to get the aspect ratio from the video metadata\n      aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n    } else {\n      // Or use a default. The video element's is 2:1, but 16:9 is more common.\n      aspectRatio = '16:9';\n    } // Get the ratio as a decimal we can use to calculate dimensions\n\n\n    var ratioParts = aspectRatio.split(':');\n    var ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n    if (this.width_ !== undefined) {\n      // Use any width that's been specifically set\n      width = this.width_;\n    } else if (this.height_ !== undefined) {\n      // Or calulate the width from the aspect ratio if a height has been set\n      width = this.height_ / ratioMultiplier;\n    } else {\n      // Or use the video's metadata, or use the video el's default of 300\n      width = this.videoWidth() || 300;\n    }\n\n    if (this.height_ !== undefined) {\n      // Use any height that's been specifically set\n      height = this.height_;\n    } else {\n      // Otherwise calculate the height from the ratio and the width\n      height = width * ratioMultiplier;\n    } // Ensure the CSS class is valid by starting with an alpha character\n\n\n    if (/^[^a-zA-Z]/.test(this.id())) {\n      idClass = 'dimensions-' + this.id();\n    } else {\n      idClass = this.id() + '-dimensions';\n    } // Ensure the right class is still on the player for the style element\n\n\n    this.addClass(idClass);\n    setTextContent(this.styleEl_, \"\\n      .\" + idClass + \" {\\n        width: \" + width + \"px;\\n        height: \" + height + \"px;\\n      }\\n\\n      .\" + idClass + \".vjs-fluid:not(.vjs-audio-only-mode) {\\n        padding-top: \" + ratioMultiplier * 100 + \"%;\\n      }\\n    \");\n  }\n  /**\n   * Load/Create an instance of playback {@link Tech} including element\n   * and API methods. Then append the `Tech` element in `Player` as a child.\n   *\n   * @param {string} techName\n   *        name of the playback technology\n   *\n   * @param {string} source\n   *        video source\n   *\n   * @private\n   */\n  ;\n\n  _proto.loadTech_ = function loadTech_(techName, source) {\n    var _this4 = this;\n\n    // Pause and remove current playback technology\n    if (this.tech_) {\n      this.unloadTech_();\n    }\n\n    var titleTechName = toTitleCase$1(techName);\n    var camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1); // get rid of the HTML5 video tag as soon as we are using another tech\n\n    if (titleTechName !== 'Html5' && this.tag) {\n      Tech.getTech('Html5').disposeMediaElement(this.tag);\n      this.tag.player = null;\n      this.tag = null;\n    }\n\n    this.techName_ = titleTechName; // Turn off API access because we're loading a new tech that might load asynchronously\n\n    this.isReady_ = false;\n    var autoplay = this.autoplay(); // if autoplay is a string (or `true` with normalizeAutoplay: true) we pass false to the tech\n    // because the player is going to handle autoplay on `loadstart`\n\n    if (typeof this.autoplay() === 'string' || this.autoplay() === true && this.options_.normalizeAutoplay) {\n      autoplay = false;\n    } // Grab tech-specific options from player options and add source and parent element to use.\n\n\n    var techOptions = {\n      source: source,\n      autoplay: autoplay,\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n      'playerId': this.id(),\n      'techId': this.id() + \"_\" + camelTechName + \"_api\",\n      'playsinline': this.options_.playsinline,\n      'preload': this.options_.preload,\n      'loop': this.options_.loop,\n      'disablePictureInPicture': this.options_.disablePictureInPicture,\n      'muted': this.options_.muted,\n      'poster': this.poster(),\n      'language': this.language(),\n      'playerElIngest': this.playerElIngest_ || false,\n      'vtt.js': this.options_['vtt.js'],\n      'canOverridePoster': !!this.options_.techCanOverridePoster,\n      'enableSourceset': this.options_.enableSourceset,\n      'Promise': this.options_.Promise\n    };\n    ALL.names.forEach(function (name) {\n      var props = ALL[name];\n      techOptions[props.getterName] = _this4[props.privateName];\n    });\n    assign(techOptions, this.options_[titleTechName]);\n    assign(techOptions, this.options_[camelTechName]);\n    assign(techOptions, this.options_[techName.toLowerCase()]);\n\n    if (this.tag) {\n      techOptions.tag = this.tag;\n    }\n\n    if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\n      techOptions.startTime = this.cache_.currentTime;\n    } // Initialize tech instance\n\n\n    var TechClass = Tech.getTech(techName);\n\n    if (!TechClass) {\n      throw new Error(\"No Tech named '\" + titleTechName + \"' exists! '\" + titleTechName + \"' should be registered using videojs.registerTech()'\");\n    }\n\n    this.tech_ = new TechClass(techOptions); // player.triggerReady is always async, so don't need this to be async\n\n    this.tech_.ready(bind(this, this.handleTechReady_), true);\n    textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_); // Listen to all HTML5-defined events and trigger them on the player\n\n    TECH_EVENTS_RETRIGGER.forEach(function (event) {\n      _this4.on(_this4.tech_, event, function (e) {\n        return _this4[\"handleTech\" + toTitleCase$1(event) + \"_\"](e);\n      });\n    });\n    Object.keys(TECH_EVENTS_QUEUE).forEach(function (event) {\n      _this4.on(_this4.tech_, event, function (eventObj) {\n        if (_this4.tech_.playbackRate() === 0 && _this4.tech_.seeking()) {\n          _this4.queuedCallbacks_.push({\n            callback: _this4[\"handleTech\" + TECH_EVENTS_QUEUE[event] + \"_\"].bind(_this4),\n            event: eventObj\n          });\n\n          return;\n        }\n\n        _this4[\"handleTech\" + TECH_EVENTS_QUEUE[event] + \"_\"](eventObj);\n      });\n    });\n    this.on(this.tech_, 'loadstart', function (e) {\n      return _this4.handleTechLoadStart_(e);\n    });\n    this.on(this.tech_, 'sourceset', function (e) {\n      return _this4.handleTechSourceset_(e);\n    });\n    this.on(this.tech_, 'waiting', function (e) {\n      return _this4.handleTechWaiting_(e);\n    });\n    this.on(this.tech_, 'ended', function (e) {\n      return _this4.handleTechEnded_(e);\n    });\n    this.on(this.tech_, 'seeking', function (e) {\n      return _this4.handleTechSeeking_(e);\n    });\n    this.on(this.tech_, 'play', function (e) {\n      return _this4.handleTechPlay_(e);\n    });\n    this.on(this.tech_, 'firstplay', function (e) {\n      return _this4.handleTechFirstPlay_(e);\n    });\n    this.on(this.tech_, 'pause', function (e) {\n      return _this4.handleTechPause_(e);\n    });\n    this.on(this.tech_, 'durationchange', function (e) {\n      return _this4.handleTechDurationChange_(e);\n    });\n    this.on(this.tech_, 'fullscreenchange', function (e, data) {\n      return _this4.handleTechFullscreenChange_(e, data);\n    });\n    this.on(this.tech_, 'fullscreenerror', function (e, err) {\n      return _this4.handleTechFullscreenError_(e, err);\n    });\n    this.on(this.tech_, 'enterpictureinpicture', function (e) {\n      return _this4.handleTechEnterPictureInPicture_(e);\n    });\n    this.on(this.tech_, 'leavepictureinpicture', function (e) {\n      return _this4.handleTechLeavePictureInPicture_(e);\n    });\n    this.on(this.tech_, 'error', function (e) {\n      return _this4.handleTechError_(e);\n    });\n    this.on(this.tech_, 'posterchange', function (e) {\n      return _this4.handleTechPosterChange_(e);\n    });\n    this.on(this.tech_, 'textdata', function (e) {\n      return _this4.handleTechTextData_(e);\n    });\n    this.on(this.tech_, 'ratechange', function (e) {\n      return _this4.handleTechRateChange_(e);\n    });\n    this.on(this.tech_, 'loadedmetadata', this.boundUpdateStyleEl_);\n    this.usingNativeControls(this.techGet_('controls'));\n\n    if (this.controls() && !this.usingNativeControls()) {\n      this.addTechControlsListeners_();\n    } // Add the tech element in the DOM if it was not already there\n    // Make sure to not insert the original video element if using Html5\n\n\n    if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\n      prependTo(this.tech_.el(), this.el());\n    } // Get rid of the original video tag reference after the first tech is loaded\n\n\n    if (this.tag) {\n      this.tag.player = null;\n      this.tag = null;\n    }\n  }\n  /**\n   * Unload and dispose of the current playback {@link Tech}.\n   *\n   * @private\n   */\n  ;\n\n  _proto.unloadTech_ = function unloadTech_() {\n    var _this5 = this;\n\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\n    ALL.names.forEach(function (name) {\n      var props = ALL[name];\n      _this5[props.privateName] = _this5[props.getterName]();\n    });\n    this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n    this.isReady_ = false;\n    this.tech_.dispose();\n    this.tech_ = false;\n\n    if (this.isPosterFromTech_) {\n      this.poster_ = '';\n      this.trigger('posterchange');\n    }\n\n    this.isPosterFromTech_ = false;\n  }\n  /**\n   * Return a reference to the current {@link Tech}.\n   * It will print a warning by default about the danger of using the tech directly\n   * but any argument that is passed in will silence the warning.\n   *\n   * @param {*} [safety]\n   *        Anything passed in to silence the warning\n   *\n   * @return {Tech}\n   *         The Tech\n   */\n  ;\n\n  _proto.tech = function tech(safety) {\n    if (safety === undefined) {\n      log$1.warn('Using the tech directly can be dangerous. I hope you know what you\\'re doing.\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\n');\n    }\n\n    return this.tech_;\n  }\n  /**\n   * Set up click and touch listeners for the playback element\n   *\n   * - On desktops: a click on the video itself will toggle playback\n   * - On mobile devices: a click on the video toggles controls\n   *   which is done by toggling the user state between active and\n   *   inactive\n   * - A tap can signal that a user has become active or has become inactive\n   *   e.g. a quick tap on an iPhone movie should reveal the controls. Another\n   *   quick tap should hide them again (signaling the user is in an inactive\n   *   viewing state)\n   * - In addition to this, we still want the user to be considered inactive after\n   *   a few seconds of inactivity.\n   *\n   * > Note: the only part of iOS interaction we can't mimic with this setup\n   * is a touch and hold on the video element counting as activity in order to\n   * keep the controls showing, but that shouldn't be an issue. A touch and hold\n   * on any controls will still keep the user active\n   *\n   * @private\n   */\n  ;\n\n  _proto.addTechControlsListeners_ = function addTechControlsListeners_() {\n    // Make sure to remove all the previous listeners in case we are called multiple times.\n    this.removeTechControlsListeners_();\n    this.on(this.tech_, 'click', this.boundHandleTechClick_);\n    this.on(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_); // If the controls were hidden we don't want that to change without a tap event\n    // so we'll check if the controls were already showing before reporting user\n    // activity\n\n    this.on(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n    this.on(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n    this.on(this.tech_, 'touchend', this.boundHandleTechTouchEnd_); // The tap listener needs to come after the touchend listener because the tap\n    // listener cancels out any reportedUserActivity when setting userActive(false)\n\n    this.on(this.tech_, 'tap', this.boundHandleTechTap_);\n  }\n  /**\n   * Remove the listeners used for click and tap controls. This is needed for\n   * toggling to controls disabled, where a tap/touch should do nothing.\n   *\n   * @private\n   */\n  ;\n\n  _proto.removeTechControlsListeners_ = function removeTechControlsListeners_() {\n    // We don't want to just use `this.off()` because there might be other needed\n    // listeners added by techs that extend this.\n    this.off(this.tech_, 'tap', this.boundHandleTechTap_);\n    this.off(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n    this.off(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n    this.off(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n    this.off(this.tech_, 'click', this.boundHandleTechClick_);\n    this.off(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n  }\n  /**\n   * Player waits for the tech to be ready\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleTechReady_ = function handleTechReady_() {\n    this.triggerReady(); // Keep the same volume as before\n\n    if (this.cache_.volume) {\n      this.techCall_('setVolume', this.cache_.volume);\n    } // Look if the tech found a higher resolution poster while loading\n\n\n    this.handleTechPosterChange_(); // Update the duration if available\n\n    this.handleTechDurationChange_();\n  }\n  /**\n   * Retrigger the `loadstart` event that was triggered by the {@link Tech}. This\n   * function will also trigger {@link Player#firstplay} if it is the first loadstart\n   * for a video.\n   *\n   * @fires Player#loadstart\n   * @fires Player#firstplay\n   * @listens Tech#loadstart\n   * @private\n   */\n  ;\n\n  _proto.handleTechLoadStart_ = function handleTechLoadStart_() {\n    // TODO: Update to use `emptied` event instead. See #1277.\n    this.removeClass('vjs-ended');\n    this.removeClass('vjs-seeking'); // reset the error state\n\n    this.error(null); // Update the duration\n\n    this.handleTechDurationChange_(); // If it's already playing we want to trigger a firstplay event now.\n    // The firstplay event relies on both the play and loadstart events\n    // which can happen in any order for a new source\n\n    if (!this.paused()) {\n      /**\n       * Fired when the user agent begins looking for media data\n       *\n       * @event Player#loadstart\n       * @type {EventTarget~Event}\n       */\n      this.trigger('loadstart');\n      this.trigger('firstplay');\n    } else {\n      // reset the hasStarted state\n      this.hasStarted(false);\n      this.trigger('loadstart');\n    } // autoplay happens after loadstart for the browser,\n    // so we mimic that behavior\n\n\n    this.manualAutoplay_(this.autoplay() === true && this.options_.normalizeAutoplay ? 'play' : this.autoplay());\n  }\n  /**\n   * Handle autoplay string values, rather than the typical boolean\n   * values that should be handled by the tech. Note that this is not\n   * part of any specification. Valid values and what they do can be\n   * found on the autoplay getter at Player#autoplay()\n   */\n  ;\n\n  _proto.manualAutoplay_ = function manualAutoplay_(type) {\n    var _this6 = this;\n\n    if (!this.tech_ || typeof type !== 'string') {\n      return;\n    } // Save original muted() value, set muted to true, and attempt to play().\n    // On promise rejection, restore muted from saved value\n\n\n    var resolveMuted = function resolveMuted() {\n      var previouslyMuted = _this6.muted();\n\n      _this6.muted(true);\n\n      var restoreMuted = function restoreMuted() {\n        _this6.muted(previouslyMuted);\n      }; // restore muted on play terminatation\n\n\n      _this6.playTerminatedQueue_.push(restoreMuted);\n\n      var mutedPromise = _this6.play();\n\n      if (!isPromise(mutedPromise)) {\n        return;\n      }\n\n      return mutedPromise[\"catch\"](function (err) {\n        restoreMuted();\n        throw new Error(\"Rejection at manualAutoplay. Restoring muted value. \" + (err ? err : ''));\n      });\n    };\n\n    var promise; // if muted defaults to true\n    // the only thing we can do is call play\n\n    if (type === 'any' && !this.muted()) {\n      promise = this.play();\n\n      if (isPromise(promise)) {\n        promise = promise[\"catch\"](resolveMuted);\n      }\n    } else if (type === 'muted' && !this.muted()) {\n      promise = resolveMuted();\n    } else {\n      promise = this.play();\n    }\n\n    if (!isPromise(promise)) {\n      return;\n    }\n\n    return promise.then(function () {\n      _this6.trigger({\n        type: 'autoplay-success',\n        autoplay: type\n      });\n    })[\"catch\"](function () {\n      _this6.trigger({\n        type: 'autoplay-failure',\n        autoplay: type\n      });\n    });\n  }\n  /**\n   * Update the internal source caches so that we return the correct source from\n   * `src()`, `currentSource()`, and `currentSources()`.\n   *\n   * > Note: `currentSources` will not be updated if the source that is passed in exists\n   *         in the current `currentSources` cache.\n   *\n   *\n   * @param {Tech~SourceObject} srcObj\n   *        A string or object source to update our caches to.\n   */\n  ;\n\n  _proto.updateSourceCaches_ = function updateSourceCaches_(srcObj) {\n    if (srcObj === void 0) {\n      srcObj = '';\n    }\n\n    var src = srcObj;\n    var type = '';\n\n    if (typeof src !== 'string') {\n      src = srcObj.src;\n      type = srcObj.type;\n    } // make sure all the caches are set to default values\n    // to prevent null checking\n\n\n    this.cache_.source = this.cache_.source || {};\n    this.cache_.sources = this.cache_.sources || []; // try to get the type of the src that was passed in\n\n    if (src && !type) {\n      type = findMimetype(this, src);\n    } // update `currentSource` cache always\n\n\n    this.cache_.source = mergeOptions$3({}, srcObj, {\n      src: src,\n      type: type\n    });\n    var matchingSources = this.cache_.sources.filter(function (s) {\n      return s.src && s.src === src;\n    });\n    var sourceElSources = [];\n    var sourceEls = this.$$('source');\n    var matchingSourceEls = [];\n\n    for (var i = 0; i < sourceEls.length; i++) {\n      var sourceObj = getAttributes(sourceEls[i]);\n      sourceElSources.push(sourceObj);\n\n      if (sourceObj.src && sourceObj.src === src) {\n        matchingSourceEls.push(sourceObj.src);\n      }\n    } // if we have matching source els but not matching sources\n    // the current source cache is not up to date\n\n\n    if (matchingSourceEls.length && !matchingSources.length) {\n      this.cache_.sources = sourceElSources; // if we don't have matching source or source els set the\n      // sources cache to the `currentSource` cache\n    } else if (!matchingSources.length) {\n      this.cache_.sources = [this.cache_.source];\n    } // update the tech `src` cache\n\n\n    this.cache_.src = src;\n  }\n  /**\n   * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\n   * causing the media element to reload.\n   *\n   * It will fire for the initial source and each subsequent source.\n   * This event is a custom event from Video.js and is triggered by the {@link Tech}.\n   *\n   * The event object for this event contains a `src` property that will contain the source\n   * that was available when the event was triggered. This is generally only necessary if Video.js\n   * is switching techs while the source was being changed.\n   *\n   * It is also fired when `load` is called on the player (or media element)\n   * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\n   * says that the resource selection algorithm needs to be aborted and restarted.\n   * In this case, it is very likely that the `src` property will be set to the\n   * empty string `\"\"` to indicate we do not know what the source will be but\n   * that it is changing.\n   *\n   * *This event is currently still experimental and may change in minor releases.*\n   * __To use this, pass `enableSourceset` option to the player.__\n   *\n   * @event Player#sourceset\n   * @type {EventTarget~Event}\n   * @prop {string} src\n   *                The source url available when the `sourceset` was triggered.\n   *                It will be an empty string if we cannot know what the source is\n   *                but know that the source will change.\n   */\n\n  /**\n   * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#sourceset\n   * @listens Tech#sourceset\n   * @private\n   */\n  ;\n\n  _proto.handleTechSourceset_ = function handleTechSourceset_(event) {\n    var _this7 = this;\n\n    // only update the source cache when the source\n    // was not updated using the player api\n    if (!this.changingSrc_) {\n      var updateSourceCaches = function updateSourceCaches(src) {\n        return _this7.updateSourceCaches_(src);\n      };\n\n      var playerSrc = this.currentSource().src;\n      var eventSrc = event.src; // if we have a playerSrc that is not a blob, and a tech src that is a blob\n\n      if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\n        // if both the tech source and the player source were updated we assume\n        // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\n        if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\n          updateSourceCaches = function updateSourceCaches() {};\n        }\n      } // update the source to the initial source right away\n      // in some cases this will be empty string\n\n\n      updateSourceCaches(eventSrc); // if the `sourceset` `src` was an empty string\n      // wait for a `loadstart` to update the cache to `currentSrc`.\n      // If a sourceset happens before a `loadstart`, we reset the state\n\n      if (!event.src) {\n        this.tech_.any(['sourceset', 'loadstart'], function (e) {\n          // if a sourceset happens before a `loadstart` there\n          // is nothing to do as this `handleTechSourceset_`\n          // will be called again and this will be handled there.\n          if (e.type === 'sourceset') {\n            return;\n          }\n\n          var techSrc = _this7.techGet('currentSrc');\n\n          _this7.lastSource_.tech = techSrc;\n\n          _this7.updateSourceCaches_(techSrc);\n        });\n      }\n    }\n\n    this.lastSource_ = {\n      player: this.currentSource().src,\n      tech: event.src\n    };\n    this.trigger({\n      src: event.src,\n      type: 'sourceset'\n    });\n  }\n  /**\n   * Add/remove the vjs-has-started class\n   *\n   * @fires Player#firstplay\n   *\n   * @param {boolean} request\n   *        - true: adds the class\n   *        - false: remove the class\n   *\n   * @return {boolean}\n   *         the boolean value of hasStarted_\n   */\n  ;\n\n  _proto.hasStarted = function hasStarted(request) {\n    if (request === undefined) {\n      // act as getter, if we have no request to change\n      return this.hasStarted_;\n    }\n\n    if (request === this.hasStarted_) {\n      return;\n    }\n\n    this.hasStarted_ = request;\n\n    if (this.hasStarted_) {\n      this.addClass('vjs-has-started');\n      this.trigger('firstplay');\n    } else {\n      this.removeClass('vjs-has-started');\n    }\n  }\n  /**\n   * Fired whenever the media begins or resumes playback\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\n   * @fires Player#play\n   * @listens Tech#play\n   * @private\n   */\n  ;\n\n  _proto.handleTechPlay_ = function handleTechPlay_() {\n    this.removeClass('vjs-ended');\n    this.removeClass('vjs-paused');\n    this.addClass('vjs-playing'); // hide the poster when the user hits play\n\n    this.hasStarted(true);\n    /**\n     * Triggered whenever an {@link Tech#play} event happens. Indicates that\n     * playback has started or resumed.\n     *\n     * @event Player#play\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('play');\n  }\n  /**\n   * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\n   *\n   * If there were any events queued while the playback rate was zero, fire\n   * those events now.\n   *\n   * @private\n   * @method Player#handleTechRateChange_\n   * @fires Player#ratechange\n   * @listens Tech#ratechange\n   */\n  ;\n\n  _proto.handleTechRateChange_ = function handleTechRateChange_() {\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n      this.queuedCallbacks_.forEach(function (queued) {\n        return queued.callback(queued.event);\n      });\n      this.queuedCallbacks_ = [];\n    }\n\n    this.cache_.lastPlaybackRate = this.tech_.playbackRate();\n    /**\n     * Fires when the playing speed of the audio/video is changed\n     *\n     * @event Player#ratechange\n     * @type {event}\n     */\n\n    this.trigger('ratechange');\n  }\n  /**\n   * Retrigger the `waiting` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#waiting\n   * @listens Tech#waiting\n   * @private\n   */\n  ;\n\n  _proto.handleTechWaiting_ = function handleTechWaiting_() {\n    var _this8 = this;\n\n    this.addClass('vjs-waiting');\n    /**\n     * A readyState change on the DOM element has caused playback to stop.\n     *\n     * @event Player#waiting\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('waiting'); // Browsers may emit a timeupdate event after a waiting event. In order to prevent\n    // premature removal of the waiting class, wait for the time to change.\n\n    var timeWhenWaiting = this.currentTime();\n\n    var timeUpdateListener = function timeUpdateListener() {\n      if (timeWhenWaiting !== _this8.currentTime()) {\n        _this8.removeClass('vjs-waiting');\n\n        _this8.off('timeupdate', timeUpdateListener);\n      }\n    };\n\n    this.on('timeupdate', timeUpdateListener);\n  }\n  /**\n   * Retrigger the `canplay` event that was triggered by the {@link Tech}.\n   * > Note: This is not consistent between browsers. See #1351\n   *\n   * @fires Player#canplay\n   * @listens Tech#canplay\n   * @private\n   */\n  ;\n\n  _proto.handleTechCanPlay_ = function handleTechCanPlay_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media has a readyState of HAVE_FUTURE_DATA or greater.\n     *\n     * @event Player#canplay\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('canplay');\n  }\n  /**\n   * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#canplaythrough\n   * @listens Tech#canplaythrough\n   * @private\n   */\n  ;\n\n  _proto.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\n     * entire media file can be played without buffering.\n     *\n     * @event Player#canplaythrough\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('canplaythrough');\n  }\n  /**\n   * Retrigger the `playing` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#playing\n   * @listens Tech#playing\n   * @private\n   */\n  ;\n\n  _proto.handleTechPlaying_ = function handleTechPlaying_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media is no longer blocked from playback, and has started playing.\n     *\n     * @event Player#playing\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('playing');\n  }\n  /**\n   * Retrigger the `seeking` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#seeking\n   * @listens Tech#seeking\n   * @private\n   */\n  ;\n\n  _proto.handleTechSeeking_ = function handleTechSeeking_() {\n    this.addClass('vjs-seeking');\n    /**\n     * Fired whenever the player is jumping to a new time\n     *\n     * @event Player#seeking\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('seeking');\n  }\n  /**\n   * Retrigger the `seeked` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#seeked\n   * @listens Tech#seeked\n   * @private\n   */\n  ;\n\n  _proto.handleTechSeeked_ = function handleTechSeeked_() {\n    this.removeClass('vjs-seeking');\n    this.removeClass('vjs-ended');\n    /**\n     * Fired when the player has finished jumping to a new time\n     *\n     * @event Player#seeked\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('seeked');\n  }\n  /**\n   * Retrigger the `firstplay` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#firstplay\n   * @listens Tech#firstplay\n   * @deprecated As of 6.0 firstplay event is deprecated.\n   *             As of 6.0 passing the `starttime` option to the player and the firstplay event are deprecated.\n   * @private\n   */\n  ;\n\n  _proto.handleTechFirstPlay_ = function handleTechFirstPlay_() {\n    // If the first starttime attribute is specified\n    // then we will start at the given offset in seconds\n    if (this.options_.starttime) {\n      log$1.warn('Passing the `starttime` option to the player will be deprecated in 6.0');\n      this.currentTime(this.options_.starttime);\n    }\n\n    this.addClass('vjs-has-started');\n    /**\n     * Fired the first time a video is played. Not part of the HLS spec, and this is\n     * probably not the best implementation yet, so use sparingly. If you don't have a\n     * reason to prevent playback, use `myPlayer.one('play');` instead.\n     *\n     * @event Player#firstplay\n     * @deprecated As of 6.0 firstplay event is deprecated.\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('firstplay');\n  }\n  /**\n   * Retrigger the `pause` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#pause\n   * @listens Tech#pause\n   * @private\n   */\n  ;\n\n  _proto.handleTechPause_ = function handleTechPause_() {\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    /**\n     * Fired whenever the media has been paused\n     *\n     * @event Player#pause\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('pause');\n  }\n  /**\n   * Retrigger the `ended` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#ended\n   * @listens Tech#ended\n   * @private\n   */\n  ;\n\n  _proto.handleTechEnded_ = function handleTechEnded_() {\n    this.addClass('vjs-ended');\n    this.removeClass('vjs-waiting');\n\n    if (this.options_.loop) {\n      this.currentTime(0);\n      this.play();\n    } else if (!this.paused()) {\n      this.pause();\n    }\n    /**\n     * Fired when the end of the media resource is reached (currentTime == duration)\n     *\n     * @event Player#ended\n     * @type {EventTarget~Event}\n     */\n\n\n    this.trigger('ended');\n  }\n  /**\n   * Fired when the duration of the media resource is first known or changed\n   *\n   * @listens Tech#durationchange\n   * @private\n   */\n  ;\n\n  _proto.handleTechDurationChange_ = function handleTechDurationChange_() {\n    this.duration(this.techGet_('duration'));\n  }\n  /**\n   * Handle a click on the media element to play/pause\n   *\n   * @param {EventTarget~Event} event\n   *        the event that caused this function to trigger\n   *\n   * @listens Tech#click\n   * @private\n   */\n  ;\n\n  _proto.handleTechClick_ = function handleTechClick_(event) {\n    // When controls are disabled a click should not toggle playback because\n    // the click is considered a control\n    if (!this.controls_) {\n      return;\n    }\n\n    if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.click === undefined || this.options_.userActions.click !== false) {\n      if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.click === 'function') {\n        this.options_.userActions.click.call(this, event);\n      } else if (this.paused()) {\n        silencePromise(this.play());\n      } else {\n        this.pause();\n      }\n    }\n  }\n  /**\n   * Handle a double-click on the media element to enter/exit fullscreen\n   *\n   * @param {EventTarget~Event} event\n   *        the event that caused this function to trigger\n   *\n   * @listens Tech#dblclick\n   * @private\n   */\n  ;\n\n  _proto.handleTechDoubleClick_ = function handleTechDoubleClick_(event) {\n    if (!this.controls_) {\n      return;\n    } // we do not want to toggle fullscreen state\n    // when double-clicking inside a control bar or a modal\n\n\n    var inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), function (el) {\n      return el.contains(event.target);\n    });\n\n    if (!inAllowedEls) {\n      /*\n       * options.userActions.doubleClick\n       *\n       * If `undefined` or `true`, double-click toggles fullscreen if controls are present\n       * Set to `false` to disable double-click handling\n       * Set to a function to substitute an external double-click handler\n       */\n      if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\n        if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\n          this.options_.userActions.doubleClick.call(this, event);\n        } else if (this.isFullscreen()) {\n          this.exitFullscreen();\n        } else {\n          this.requestFullscreen();\n        }\n      }\n    }\n  }\n  /**\n   * Handle a tap on the media element. It will toggle the user\n   * activity state, which hides and shows the controls.\n   *\n   * @listens Tech#tap\n   * @private\n   */\n  ;\n\n  _proto.handleTechTap_ = function handleTechTap_() {\n    this.userActive(!this.userActive());\n  }\n  /**\n   * Handle touch to start\n   *\n   * @listens Tech#touchstart\n   * @private\n   */\n  ;\n\n  _proto.handleTechTouchStart_ = function handleTechTouchStart_() {\n    this.userWasActive = this.userActive();\n  }\n  /**\n   * Handle touch to move\n   *\n   * @listens Tech#touchmove\n   * @private\n   */\n  ;\n\n  _proto.handleTechTouchMove_ = function handleTechTouchMove_() {\n    if (this.userWasActive) {\n      this.reportUserActivity();\n    }\n  }\n  /**\n   * Handle touch to end\n   *\n   * @param {EventTarget~Event} event\n   *        the touchend event that triggered\n   *        this function\n   *\n   * @listens Tech#touchend\n   * @private\n   */\n  ;\n\n  _proto.handleTechTouchEnd_ = function handleTechTouchEnd_(event) {\n    // Stop the mouse events from also happening\n    if (event.cancelable) {\n      event.preventDefault();\n    }\n  }\n  /**\n   * native click events on the SWF aren't triggered on IE11, Win8.1RT\n   * use stageclick events triggered from inside the SWF instead\n   *\n   * @private\n   * @listens stageclick\n   */\n  ;\n\n  _proto.handleStageClick_ = function handleStageClick_() {\n    this.reportUserActivity();\n  }\n  /**\n   * @private\n   */\n  ;\n\n  _proto.toggleFullscreenClass_ = function toggleFullscreenClass_() {\n    if (this.isFullscreen()) {\n      this.addClass('vjs-fullscreen');\n    } else {\n      this.removeClass('vjs-fullscreen');\n    }\n  }\n  /**\n   * when the document fschange event triggers it calls this\n   */\n  ;\n\n  _proto.documentFullscreenChange_ = function documentFullscreenChange_(e) {\n    var targetPlayer = e.target.player; // if another player was fullscreen\n    // do a null check for targetPlayer because older firefox's would put document as e.target\n\n    if (targetPlayer && targetPlayer !== this) {\n      return;\n    }\n\n    var el = this.el();\n    var isFs = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenElement] === el;\n\n    if (!isFs && el.matches) {\n      isFs = el.matches(':' + this.fsApi_.fullscreen);\n    } else if (!isFs && el.msMatchesSelector) {\n      isFs = el.msMatchesSelector(':' + this.fsApi_.fullscreen);\n    }\n\n    this.isFullscreen(isFs);\n  }\n  /**\n   * Handle Tech Fullscreen Change\n   *\n   * @param {EventTarget~Event} event\n   *        the fullscreenchange event that triggered this function\n   *\n   * @param {Object} data\n   *        the data that was sent with the event\n   *\n   * @private\n   * @listens Tech#fullscreenchange\n   * @fires Player#fullscreenchange\n   */\n  ;\n\n  _proto.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) {\n    var _this9 = this;\n\n    if (data) {\n      if (data.nativeIOSFullscreen) {\n        this.addClass('vjs-ios-native-fs');\n        this.tech_.one('webkitendfullscreen', function () {\n          _this9.removeClass('vjs-ios-native-fs');\n        });\n      }\n\n      this.isFullscreen(data.isFullscreen);\n    }\n  };\n\n  _proto.handleTechFullscreenError_ = function handleTechFullscreenError_(event, err) {\n    this.trigger('fullscreenerror', err);\n  }\n  /**\n   * @private\n   */\n  ;\n\n  _proto.togglePictureInPictureClass_ = function togglePictureInPictureClass_() {\n    if (this.isInPictureInPicture()) {\n      this.addClass('vjs-picture-in-picture');\n    } else {\n      this.removeClass('vjs-picture-in-picture');\n    }\n  }\n  /**\n   * Handle Tech Enter Picture-in-Picture.\n   *\n   * @param {EventTarget~Event} event\n   *        the enterpictureinpicture event that triggered this function\n   *\n   * @private\n   * @listens Tech#enterpictureinpicture\n   */\n  ;\n\n  _proto.handleTechEnterPictureInPicture_ = function handleTechEnterPictureInPicture_(event) {\n    this.isInPictureInPicture(true);\n  }\n  /**\n   * Handle Tech Leave Picture-in-Picture.\n   *\n   * @param {EventTarget~Event} event\n   *        the leavepictureinpicture event that triggered this function\n   *\n   * @private\n   * @listens Tech#leavepictureinpicture\n   */\n  ;\n\n  _proto.handleTechLeavePictureInPicture_ = function handleTechLeavePictureInPicture_(event) {\n    this.isInPictureInPicture(false);\n  }\n  /**\n   * Fires when an error occurred during the loading of an audio/video.\n   *\n   * @private\n   * @listens Tech#error\n   */\n  ;\n\n  _proto.handleTechError_ = function handleTechError_() {\n    var error = this.tech_.error();\n    this.error(error);\n  }\n  /**\n   * Retrigger the `textdata` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#textdata\n   * @listens Tech#textdata\n   * @private\n   */\n  ;\n\n  _proto.handleTechTextData_ = function handleTechTextData_() {\n    var data = null;\n\n    if (arguments.length > 1) {\n      data = arguments[1];\n    }\n    /**\n     * Fires when we get a textdata event from tech\n     *\n     * @event Player#textdata\n     * @type {EventTarget~Event}\n     */\n\n\n    this.trigger('textdata', data);\n  }\n  /**\n   * Get object for cached values.\n   *\n   * @return {Object}\n   *         get the current object cache\n   */\n  ;\n\n  _proto.getCache = function getCache() {\n    return this.cache_;\n  }\n  /**\n   * Resets the internal cache object.\n   *\n   * Using this function outside the player constructor or reset method may\n   * have unintended side-effects.\n   *\n   * @private\n   */\n  ;\n\n  _proto.resetCache_ = function resetCache_() {\n    this.cache_ = {\n      // Right now, the currentTime is not _really_ cached because it is always\n      // retrieved from the tech (see: currentTime). However, for completeness,\n      // we set it to zero here to ensure that if we do start actually caching\n      // it, we reset it along with everything else.\n      currentTime: 0,\n      initTime: 0,\n      inactivityTimeout: this.options_.inactivityTimeout,\n      duration: NaN,\n      lastVolume: 1,\n      lastPlaybackRate: this.defaultPlaybackRate(),\n      media: null,\n      src: '',\n      source: {},\n      sources: [],\n      playbackRates: [],\n      volume: 1\n    };\n  }\n  /**\n   * Pass values to the playback tech\n   *\n   * @param {string} [method]\n   *        the method to call\n   *\n   * @param {Object} arg\n   *        the argument to pass\n   *\n   * @private\n   */\n  ;\n\n  _proto.techCall_ = function techCall_(method, arg) {\n    // If it's not ready yet, call method when it is\n    this.ready(function () {\n      if (method in allowedSetters) {\n        return set(this.middleware_, this.tech_, method, arg);\n      } else if (method in allowedMediators) {\n        return mediate(this.middleware_, this.tech_, method, arg);\n      }\n\n      try {\n        if (this.tech_) {\n          this.tech_[method](arg);\n        }\n      } catch (e) {\n        log$1(e);\n        throw e;\n      }\n    }, true);\n  }\n  /**\n   * Get calls can't wait for the tech, and sometimes don't need to.\n   *\n   * @param {string} method\n   *        Tech method\n   *\n   * @return {Function|undefined}\n   *         the method or undefined\n   *\n   * @private\n   */\n  ;\n\n  _proto.techGet_ = function techGet_(method) {\n    if (!this.tech_ || !this.tech_.isReady_) {\n      return;\n    }\n\n    if (method in allowedGetters) {\n      return get(this.middleware_, this.tech_, method);\n    } else if (method in allowedMediators) {\n      return mediate(this.middleware_, this.tech_, method);\n    } // Flash likes to die and reload when you hide or reposition it.\n    // In these cases the object methods go away and we get errors.\n    // TODO: Is this needed for techs other than Flash?\n    // When that happens we'll catch the errors and inform tech that it's not ready any more.\n\n\n    try {\n      return this.tech_[method]();\n    } catch (e) {\n      // When building additional tech libs, an expected method may not be defined yet\n      if (this.tech_[method] === undefined) {\n        log$1(\"Video.js: \" + method + \" method not defined for \" + this.techName_ + \" playback technology.\", e);\n        throw e;\n      } // When a method isn't available on the object it throws a TypeError\n\n\n      if (e.name === 'TypeError') {\n        log$1(\"Video.js: \" + method + \" unavailable on \" + this.techName_ + \" playback technology element.\", e);\n        this.tech_.isReady_ = false;\n        throw e;\n      } // If error unknown, just log and throw\n\n\n      log$1(e);\n      throw e;\n    }\n  }\n  /**\n   * Attempt to begin playback at the first opportunity.\n   *\n   * @return {Promise|undefined}\n   *         Returns a promise if the browser supports Promises (or one\n   *         was passed in as an option). This promise will be resolved on\n   *         the return value of play. If this is undefined it will fulfill the\n   *         promise chain otherwise the promise chain will be fulfilled when\n   *         the promise from play is fulfilled.\n   */\n  ;\n\n  _proto.play = function play() {\n    var _this10 = this;\n\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      return new PromiseClass(function (resolve) {\n        _this10.play_(resolve);\n      });\n    }\n\n    return this.play_();\n  }\n  /**\n   * The actual logic for play, takes a callback that will be resolved on the\n   * return value of play. This allows us to resolve to the play promise if there\n   * is one on modern browsers.\n   *\n   * @private\n   * @param {Function} [callback]\n   *        The callback that should be called when the techs play is actually called\n   */\n  ;\n\n  _proto.play_ = function play_(callback) {\n    var _this11 = this;\n\n    if (callback === void 0) {\n      callback = silencePromise;\n    }\n\n    this.playCallbacks_.push(callback);\n    var isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n    var isSafariOrIOS = Boolean(IS_ANY_SAFARI || IS_IOS); // treat calls to play_ somewhat like the `one` event function\n\n    if (this.waitToPlay_) {\n      this.off(['ready', 'loadstart'], this.waitToPlay_);\n      this.waitToPlay_ = null;\n    } // if the player/tech is not ready or the src itself is not ready\n    // queue up a call to play on `ready` or `loadstart`\n\n\n    if (!this.isReady_ || !isSrcReady) {\n      this.waitToPlay_ = function (e) {\n        _this11.play_();\n      };\n\n      this.one(['ready', 'loadstart'], this.waitToPlay_); // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\n      // in that case, we need to prime the video element by calling load so it'll be ready in time\n\n      if (!isSrcReady && isSafariOrIOS) {\n        this.load();\n      }\n\n      return;\n    } // If the player/tech is ready and we have a source, we can attempt playback.\n\n\n    var val = this.techGet_('play'); // For native playback, reset the progress bar if we get a play call from a replay.\n\n    var isNativeReplay = isSafariOrIOS && this.hasClass('vjs-ended');\n\n    if (isNativeReplay) {\n      this.resetProgressBar_();\n    } // play was terminated if the returned value is null\n\n\n    if (val === null) {\n      this.runPlayTerminatedQueue_();\n    } else {\n      this.runPlayCallbacks_(val);\n    }\n  }\n  /**\n   * These functions will be run when if play is terminated. If play\n   * runPlayCallbacks_ is run these function will not be run. This allows us\n   * to differenciate between a terminated play and an actual call to play.\n   */\n  ;\n\n  _proto.runPlayTerminatedQueue_ = function runPlayTerminatedQueue_() {\n    var queue = this.playTerminatedQueue_.slice(0);\n    this.playTerminatedQueue_ = [];\n    queue.forEach(function (q) {\n      q();\n    });\n  }\n  /**\n   * When a callback to play is delayed we have to run these\n   * callbacks when play is actually called on the tech. This function\n   * runs the callbacks that were delayed and accepts the return value\n   * from the tech.\n   *\n   * @param {undefined|Promise} val\n   *        The return value from the tech.\n   */\n  ;\n\n  _proto.runPlayCallbacks_ = function runPlayCallbacks_(val) {\n    var callbacks = this.playCallbacks_.slice(0);\n    this.playCallbacks_ = []; // clear play terminatedQueue since we finished a real play\n\n    this.playTerminatedQueue_ = [];\n    callbacks.forEach(function (cb) {\n      cb(val);\n    });\n  }\n  /**\n   * Pause the video playback\n   *\n   * @return {Player}\n   *         A reference to the player object this function was called on\n   */\n  ;\n\n  _proto.pause = function pause() {\n    this.techCall_('pause');\n  }\n  /**\n   * Check if the player is paused or has yet to play\n   *\n   * @return {boolean}\n   *         - false: if the media is currently playing\n   *         - true: if media is not currently playing\n   */\n  ;\n\n  _proto.paused = function paused() {\n    // The initial state of paused should be true (in Safari it's actually false)\n    return this.techGet_('paused') === false ? false : true;\n  }\n  /**\n   * Get a TimeRange object representing the current ranges of time that the user\n   * has played.\n   *\n   * @return {TimeRange}\n   *         A time range object that represents all the increments of time that have\n   *         been played.\n   */\n  ;\n\n  _proto.played = function played() {\n    return this.techGet_('played') || createTimeRanges(0, 0);\n  }\n  /**\n   * Returns whether or not the user is \"scrubbing\". Scrubbing is\n   * when the user has clicked the progress bar handle and is\n   * dragging it along the progress bar.\n   *\n   * @param {boolean} [isScrubbing]\n   *        whether the user is or is not scrubbing\n   *\n   * @return {boolean}\n   *         The value of scrubbing when getting\n   */\n  ;\n\n  _proto.scrubbing = function scrubbing(isScrubbing) {\n    if (typeof isScrubbing === 'undefined') {\n      return this.scrubbing_;\n    }\n\n    this.scrubbing_ = !!isScrubbing;\n    this.techCall_('setScrubbing', this.scrubbing_);\n\n    if (isScrubbing) {\n      this.addClass('vjs-scrubbing');\n    } else {\n      this.removeClass('vjs-scrubbing');\n    }\n  }\n  /**\n   * Get or set the current time (in seconds)\n   *\n   * @param {number|string} [seconds]\n   *        The time to seek to in seconds\n   *\n   * @return {number}\n   *         - the current time in seconds when getting\n   */\n  ;\n\n  _proto.currentTime = function currentTime(seconds) {\n    if (typeof seconds !== 'undefined') {\n      if (seconds < 0) {\n        seconds = 0;\n      }\n\n      if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\n        this.cache_.initTime = seconds;\n        this.off('canplay', this.boundApplyInitTime_);\n        this.one('canplay', this.boundApplyInitTime_);\n        return;\n      }\n\n      this.techCall_('setCurrentTime', seconds);\n      this.cache_.initTime = 0;\n      return;\n    } // cache last currentTime and return. default to 0 seconds\n    //\n    // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n    // currentTime when scrubbing, but may not provide much performance benefit afterall.\n    // Should be tested. Also something has to read the actual current time or the cache will\n    // never get updated.\n\n\n    this.cache_.currentTime = this.techGet_('currentTime') || 0;\n    return this.cache_.currentTime;\n  }\n  /**\n   * Apply the value of initTime stored in cache as currentTime.\n   *\n   * @private\n   */\n  ;\n\n  _proto.applyInitTime_ = function applyInitTime_() {\n    this.currentTime(this.cache_.initTime);\n  }\n  /**\n   * Normally gets the length in time of the video in seconds;\n   * in all but the rarest use cases an argument will NOT be passed to the method\n   *\n   * > **NOTE**: The video must have started loading before the duration can be\n   * known, and depending on preload behaviour may not be known until the video starts\n   * playing.\n   *\n   * @fires Player#durationchange\n   *\n   * @param {number} [seconds]\n   *        The duration of the video to set in seconds\n   *\n   * @return {number}\n   *         - The duration of the video in seconds when getting\n   */\n  ;\n\n  _proto.duration = function duration(seconds) {\n    if (seconds === undefined) {\n      // return NaN if the duration is not known\n      return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\n    }\n\n    seconds = parseFloat(seconds); // Standardize on Infinity for signaling video is live\n\n    if (seconds < 0) {\n      seconds = Infinity;\n    }\n\n    if (seconds !== this.cache_.duration) {\n      // Cache the last set value for optimized scrubbing (esp. Flash)\n      // TODO: Required for techs other than Flash?\n      this.cache_.duration = seconds;\n\n      if (seconds === Infinity) {\n        this.addClass('vjs-live');\n      } else {\n        this.removeClass('vjs-live');\n      }\n\n      if (!isNaN(seconds)) {\n        // Do not fire durationchange unless the duration value is known.\n        // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n        /**\n         * @event Player#durationchange\n         * @type {EventTarget~Event}\n         */\n        this.trigger('durationchange');\n      }\n    }\n  }\n  /**\n   * Calculates how much time is left in the video. Not part\n   * of the native video API.\n   *\n   * @return {number}\n   *         The time remaining in seconds\n   */\n  ;\n\n  _proto.remainingTime = function remainingTime() {\n    return this.duration() - this.currentTime();\n  }\n  /**\n   * A remaining time function that is intented to be used when\n   * the time is to be displayed directly to the user.\n   *\n   * @return {number}\n   *         The rounded time remaining in seconds\n   */\n  ;\n\n  _proto.remainingTimeDisplay = function remainingTimeDisplay() {\n    return Math.floor(this.duration()) - Math.floor(this.currentTime());\n  } //\n  // Kind of like an array of portions of the video that have been downloaded.\n\n  /**\n   * Get a TimeRange object with an array of the times of the video\n   * that have been downloaded. If you just want the percent of the\n   * video that's been downloaded, use bufferedPercent.\n   *\n   * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\n   *\n   * @return {TimeRange}\n   *         A mock TimeRange object (following HTML spec)\n   */\n  ;\n\n  _proto.buffered = function buffered() {\n    var buffered = this.techGet_('buffered');\n\n    if (!buffered || !buffered.length) {\n      buffered = createTimeRanges(0, 0);\n    }\n\n    return buffered;\n  }\n  /**\n   * Get the percent (as a decimal) of the video that's been downloaded.\n   * This method is not a part of the native HTML video API.\n   *\n   * @return {number}\n   *         A decimal between 0 and 1 representing the percent\n   *         that is buffered 0 being 0% and 1 being 100%\n   */\n  ;\n\n  _proto.bufferedPercent = function bufferedPercent$1() {\n    return bufferedPercent(this.buffered(), this.duration());\n  }\n  /**\n   * Get the ending time of the last buffered time range\n   * This is used in the progress bar to encapsulate all time ranges.\n   *\n   * @return {number}\n   *         The end of the last buffered time range\n   */\n  ;\n\n  _proto.bufferedEnd = function bufferedEnd() {\n    var buffered = this.buffered();\n    var duration = this.duration();\n    var end = buffered.end(buffered.length - 1);\n\n    if (end > duration) {\n      end = duration;\n    }\n\n    return end;\n  }\n  /**\n   * Get or set the current volume of the media\n   *\n   * @param  {number} [percentAsDecimal]\n   *         The new volume as a decimal percent:\n   *         - 0 is muted/0%/off\n   *         - 1.0 is 100%/full\n   *         - 0.5 is half volume or 50%\n   *\n   * @return {number}\n   *         The current volume as a percent when getting\n   */\n  ;\n\n  _proto.volume = function volume(percentAsDecimal) {\n    var vol;\n\n    if (percentAsDecimal !== undefined) {\n      // Force value to between 0 and 1\n      vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal)));\n      this.cache_.volume = vol;\n      this.techCall_('setVolume', vol);\n\n      if (vol > 0) {\n        this.lastVolume_(vol);\n      }\n\n      return;\n    } // Default to 1 when returning current volume.\n\n\n    vol = parseFloat(this.techGet_('volume'));\n    return isNaN(vol) ? 1 : vol;\n  }\n  /**\n   * Get the current muted state, or turn mute on or off\n   *\n   * @param {boolean} [muted]\n   *        - true to mute\n   *        - false to unmute\n   *\n   * @return {boolean}\n   *         - true if mute is on and getting\n   *         - false if mute is off and getting\n   */\n  ;\n\n  _proto.muted = function muted(_muted) {\n    if (_muted !== undefined) {\n      this.techCall_('setMuted', _muted);\n      return;\n    }\n\n    return this.techGet_('muted') || false;\n  }\n  /**\n   * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\n   * indicates the state of muted on initial playback.\n   *\n   * ```js\n   *   var myPlayer = videojs('some-player-id');\n   *\n   *   myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n   *\n   *   // get, should be false\n   *   console.log(myPlayer.defaultMuted());\n   *   // set to true\n   *   myPlayer.defaultMuted(true);\n   *   // get should be true\n   *   console.log(myPlayer.defaultMuted());\n   * ```\n   *\n   * @param {boolean} [defaultMuted]\n   *        - true to mute\n   *        - false to unmute\n   *\n   * @return {boolean|Player}\n   *         - true if defaultMuted is on and getting\n   *         - false if defaultMuted is off and getting\n   *         - A reference to the current player when setting\n   */\n  ;\n\n  _proto.defaultMuted = function defaultMuted(_defaultMuted) {\n    if (_defaultMuted !== undefined) {\n      return this.techCall_('setDefaultMuted', _defaultMuted);\n    }\n\n    return this.techGet_('defaultMuted') || false;\n  }\n  /**\n   * Get the last volume, or set it\n   *\n   * @param  {number} [percentAsDecimal]\n   *         The new last volume as a decimal percent:\n   *         - 0 is muted/0%/off\n   *         - 1.0 is 100%/full\n   *         - 0.5 is half volume or 50%\n   *\n   * @return {number}\n   *         the current value of lastVolume as a percent when getting\n   *\n   * @private\n   */\n  ;\n\n  _proto.lastVolume_ = function lastVolume_(percentAsDecimal) {\n    if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\n      this.cache_.lastVolume = percentAsDecimal;\n      return;\n    }\n\n    return this.cache_.lastVolume;\n  }\n  /**\n   * Check if current tech can support native fullscreen\n   * (e.g. with built in controls like iOS)\n   *\n   * @return {boolean}\n   *         if native fullscreen is supported\n   */\n  ;\n\n  _proto.supportsFullScreen = function supportsFullScreen() {\n    return this.techGet_('supportsFullScreen') || false;\n  }\n  /**\n   * Check if the player is in fullscreen mode or tell the player that it\n   * is or is not in fullscreen mode.\n   *\n   * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n   * property and instead document.fullscreenElement is used. But isFullscreen is\n   * still a valuable property for internal player workings.\n   *\n   * @param  {boolean} [isFS]\n   *         Set the players current fullscreen state\n   *\n   * @return {boolean}\n   *         - true if fullscreen is on and getting\n   *         - false if fullscreen is off and getting\n   */\n  ;\n\n  _proto.isFullscreen = function isFullscreen(isFS) {\n    if (isFS !== undefined) {\n      var oldValue = this.isFullscreen_;\n      this.isFullscreen_ = Boolean(isFS); // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\n      // this is the only place where we trigger fullscreenchange events for older browsers\n      // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\n\n      if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\n        /**\n           * @event Player#fullscreenchange\n           * @type {EventTarget~Event}\n           */\n        this.trigger('fullscreenchange');\n      }\n\n      this.toggleFullscreenClass_();\n      return;\n    }\n\n    return this.isFullscreen_;\n  }\n  /**\n   * Increase the size of the video to full screen\n   * In some browsers, full screen is not supported natively, so it enters\n   * \"full window mode\", where the video fills the browser window.\n   * In browsers and devices that support native full screen, sometimes the\n   * browser's default controls will be shown, and not the Video.js custom skin.\n   * This includes most mobile devices (iOS, Android) and older versions of\n   * Safari.\n   *\n   * @param  {Object} [fullscreenOptions]\n   *         Override the player fullscreen options\n   *\n   * @fires Player#fullscreenchange\n   */\n  ;\n\n  _proto.requestFullscreen = function requestFullscreen(fullscreenOptions) {\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      var self = this;\n      return new PromiseClass(function (resolve, reject) {\n        function offHandler() {\n          self.off('fullscreenerror', errorHandler);\n          self.off('fullscreenchange', changeHandler);\n        }\n\n        function changeHandler() {\n          offHandler();\n          resolve();\n        }\n\n        function errorHandler(e, err) {\n          offHandler();\n          reject(err);\n        }\n\n        self.one('fullscreenchange', changeHandler);\n        self.one('fullscreenerror', errorHandler);\n        var promise = self.requestFullscreenHelper_(fullscreenOptions);\n\n        if (promise) {\n          promise.then(offHandler, offHandler);\n          promise.then(resolve, reject);\n        }\n      });\n    }\n\n    return this.requestFullscreenHelper_();\n  };\n\n  _proto.requestFullscreenHelper_ = function requestFullscreenHelper_(fullscreenOptions) {\n    var _this12 = this;\n\n    var fsOptions; // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\n    // Use defaults or player configured option unless passed directly to this method.\n\n    if (!this.fsApi_.prefixed) {\n      fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\n\n      if (fullscreenOptions !== undefined) {\n        fsOptions = fullscreenOptions;\n      }\n    } // This method works as follows:\n    // 1. if a fullscreen api is available, use it\n    //   1. call requestFullscreen with potential options\n    //   2. if we got a promise from above, use it to update isFullscreen()\n    // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\n    //   This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\n    // 3. otherwise, use \"fullWindow\" mode\n\n\n    if (this.fsApi_.requestFullscreen) {\n      var promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\n\n      if (promise) {\n        promise.then(function () {\n          return _this12.isFullscreen(true);\n        }, function () {\n          return _this12.isFullscreen(false);\n        });\n      }\n\n      return promise;\n    } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n      // we can't take the video.js controls fullscreen but we can go fullscreen\n      // with native controls\n      this.techCall_('enterFullScreen');\n    } else {\n      // fullscreen isn't supported so we'll just stretch the video element to\n      // fill the viewport\n      this.enterFullWindow();\n    }\n  }\n  /**\n   * Return the video to its normal size after having been in full screen mode\n   *\n   * @fires Player#fullscreenchange\n   */\n  ;\n\n  _proto.exitFullscreen = function exitFullscreen() {\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      var self = this;\n      return new PromiseClass(function (resolve, reject) {\n        function offHandler() {\n          self.off('fullscreenerror', errorHandler);\n          self.off('fullscreenchange', changeHandler);\n        }\n\n        function changeHandler() {\n          offHandler();\n          resolve();\n        }\n\n        function errorHandler(e, err) {\n          offHandler();\n          reject(err);\n        }\n\n        self.one('fullscreenchange', changeHandler);\n        self.one('fullscreenerror', errorHandler);\n        var promise = self.exitFullscreenHelper_();\n\n        if (promise) {\n          promise.then(offHandler, offHandler); // map the promise to our resolve/reject methods\n\n          promise.then(resolve, reject);\n        }\n      });\n    }\n\n    return this.exitFullscreenHelper_();\n  };\n\n  _proto.exitFullscreenHelper_ = function exitFullscreenHelper_() {\n    var _this13 = this;\n\n    if (this.fsApi_.requestFullscreen) {\n      var promise = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.exitFullscreen]();\n\n      if (promise) {\n        // we're splitting the promise here, so, we want to catch the\n        // potential error so that this chain doesn't have unhandled errors\n        silencePromise(promise.then(function () {\n          return _this13.isFullscreen(false);\n        }));\n      }\n\n      return promise;\n    } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n      this.techCall_('exitFullScreen');\n    } else {\n      this.exitFullWindow();\n    }\n  }\n  /**\n   * When fullscreen isn't supported we can stretch the\n   * video container to as wide as the browser will let us.\n   *\n   * @fires Player#enterFullWindow\n   */\n  ;\n\n  _proto.enterFullWindow = function enterFullWindow() {\n    this.isFullscreen(true);\n    this.isFullWindow = true; // Storing original doc overflow value to return to when fullscreen is off\n\n    this.docOrigOverflow = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow; // Add listener for esc key to exit fullscreen\n\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Hide any scroll bars\n\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = 'hidden'; // Apply fullscreen styles\n\n    addClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window');\n    /**\n     * @event Player#enterFullWindow\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('enterFullWindow');\n  }\n  /**\n   * Check for call to either exit full window or\n   * full screen on ESC key\n   *\n   * @param {string} event\n   *        Event to check for key press\n   */\n  ;\n\n  _proto.fullWindowOnEscKey = function fullWindowOnEscKey(event) {\n    if (keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(event, 'Esc')) {\n      if (this.isFullscreen() === true) {\n        if (!this.isFullWindow) {\n          this.exitFullscreen();\n        } else {\n          this.exitFullWindow();\n        }\n      }\n    }\n  }\n  /**\n   * Exit full window\n   *\n   * @fires Player#exitFullWindow\n   */\n  ;\n\n  _proto.exitFullWindow = function exitFullWindow() {\n    this.isFullscreen(false);\n    this.isFullWindow = false;\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Unhide scroll bars.\n\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = this.docOrigOverflow; // Remove fullscreen styles\n\n    removeClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window'); // Resize the box, controller, and poster to original sizes\n    // this.positionAll();\n\n    /**\n     * @event Player#exitFullWindow\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('exitFullWindow');\n  }\n  /**\n   * Disable Picture-in-Picture mode.\n   *\n   * @param {boolean} value\n   *                  - true will disable Picture-in-Picture mode\n   *                  - false will enable Picture-in-Picture mode\n   */\n  ;\n\n  _proto.disablePictureInPicture = function disablePictureInPicture(value) {\n    if (value === undefined) {\n      return this.techGet_('disablePictureInPicture');\n    }\n\n    this.techCall_('setDisablePictureInPicture', value);\n    this.options_.disablePictureInPicture = value;\n    this.trigger('disablepictureinpicturechanged');\n  }\n  /**\n   * Check if the player is in Picture-in-Picture mode or tell the player that it\n   * is or is not in Picture-in-Picture mode.\n   *\n   * @param  {boolean} [isPiP]\n   *         Set the players current Picture-in-Picture state\n   *\n   * @return {boolean}\n   *         - true if Picture-in-Picture is on and getting\n   *         - false if Picture-in-Picture is off and getting\n   */\n  ;\n\n  _proto.isInPictureInPicture = function isInPictureInPicture(isPiP) {\n    if (isPiP !== undefined) {\n      this.isInPictureInPicture_ = !!isPiP;\n      this.togglePictureInPictureClass_();\n      return;\n    }\n\n    return !!this.isInPictureInPicture_;\n  }\n  /**\n   * Create a floating video window always on top of other windows so that users may\n   * continue consuming media while they interact with other content sites, or\n   * applications on their device.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @fires Player#enterpictureinpicture\n   *\n   * @return {Promise}\n   *         A promise with a Picture-in-Picture window.\n   */\n  ;\n\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && this.disablePictureInPicture() === false) {\n      /**\n       * This event fires when the player enters picture in picture mode\n       *\n       * @event Player#enterpictureinpicture\n       * @type {EventTarget~Event}\n       */\n      return this.techGet_('requestPictureInPicture');\n    }\n  }\n  /**\n   * Exit Picture-in-Picture mode.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @fires Player#leavepictureinpicture\n   *\n   * @return {Promise}\n   *         A promise.\n   */\n  ;\n\n  _proto.exitPictureInPicture = function exitPictureInPicture() {\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\n      /**\n       * This event fires when the player leaves picture in picture mode\n       *\n       * @event Player#leavepictureinpicture\n       * @type {EventTarget~Event}\n       */\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.exitPictureInPicture();\n    }\n  }\n  /**\n   * Called when this Player has focus and a key gets pressed down, or when\n   * any Component of this player receives a key press that it doesn't handle.\n   * This allows player-wide hotkeys (either as defined below, or optionally\n   * by an external function).\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  ;\n\n  _proto.handleKeyDown = function handleKeyDown(event) {\n    var userActions = this.options_.userActions; // Bail out if hotkeys are not configured.\n\n    if (!userActions || !userActions.hotkeys) {\n      return;\n    } // Function that determines whether or not to exclude an element from\n    // hotkeys handling.\n\n\n    var excludeElement = function excludeElement(el) {\n      var tagName = el.tagName.toLowerCase(); // The first and easiest test is for `contenteditable` elements.\n\n      if (el.isContentEditable) {\n        return true;\n      } // Inputs matching these types will still trigger hotkey handling as\n      // they are not text inputs.\n\n\n      var allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\n\n      if (tagName === 'input') {\n        return allowedInputTypes.indexOf(el.type) === -1;\n      } // The final test is by tag name. These tags will be excluded entirely.\n\n\n      var excludedTags = ['textarea'];\n      return excludedTags.indexOf(tagName) !== -1;\n    }; // Bail out if the user is focused on an interactive form element.\n\n\n    if (excludeElement(this.el_.ownerDocument.activeElement)) {\n      return;\n    }\n\n    if (typeof userActions.hotkeys === 'function') {\n      userActions.hotkeys.call(this, event);\n    } else {\n      this.handleHotkeys(event);\n    }\n  }\n  /**\n   * Called when this Player receives a hotkey keydown event.\n   * Supported player-wide hotkeys are:\n   *\n   *   f          - toggle fullscreen\n   *   m          - toggle mute\n   *   k or Space - toggle play/pause\n   *\n   * @param {EventTarget~Event} event\n   *        The `keydown` event that caused this function to be called.\n   */\n  ;\n\n  _proto.handleHotkeys = function handleHotkeys(event) {\n    var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {}; // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n\n    var _hotkeys$fullscreenKe = hotkeys.fullscreenKey,\n        fullscreenKey = _hotkeys$fullscreenKe === void 0 ? function (keydownEvent) {\n      return keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(keydownEvent, 'f');\n    } : _hotkeys$fullscreenKe,\n        _hotkeys$muteKey = hotkeys.muteKey,\n        muteKey = _hotkeys$muteKey === void 0 ? function (keydownEvent) {\n      return keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(keydownEvent, 'm');\n    } : _hotkeys$muteKey,\n        _hotkeys$playPauseKey = hotkeys.playPauseKey,\n        playPauseKey = _hotkeys$playPauseKey === void 0 ? function (keydownEvent) {\n      return keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(keydownEvent, 'k') || keycode__WEBPACK_IMPORTED_MODULE_3___default.a.isEventKey(keydownEvent, 'Space');\n    } : _hotkeys$playPauseKey;\n\n    if (fullscreenKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      var FSToggle = Component$1.getComponent('FullscreenToggle');\n\n      if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenEnabled] !== false) {\n        FSToggle.prototype.handleClick.call(this, event);\n      }\n    } else if (muteKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      var MuteToggle = Component$1.getComponent('MuteToggle');\n      MuteToggle.prototype.handleClick.call(this, event);\n    } else if (playPauseKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      var PlayToggle = Component$1.getComponent('PlayToggle');\n      PlayToggle.prototype.handleClick.call(this, event);\n    }\n  }\n  /**\n   * Check whether the player can play a given mimetype\n   *\n   * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\n   *\n   * @param {string} type\n   *        The mimetype to check\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n  ;\n\n  _proto.canPlayType = function canPlayType(type) {\n    var can; // Loop through each playback technology in the options order\n\n    for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {\n      var techName = j[i];\n      var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\n      // Remove once that deprecated behavior is removed.\n\n      if (!tech) {\n        tech = Component$1.getComponent(techName);\n      } // Check if the current tech is defined before continuing\n\n\n      if (!tech) {\n        log$1.error(\"The \\\"\" + techName + \"\\\" tech is undefined. Skipped browser support check for that tech.\");\n        continue;\n      } // Check if the browser supports this technology\n\n\n      if (tech.isSupported()) {\n        can = tech.canPlayType(type);\n\n        if (can) {\n          return can;\n        }\n      }\n    }\n\n    return '';\n  }\n  /**\n   * Select source based on tech-order or source-order\n   * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n   * defaults to tech-order selection\n   *\n   * @param {Array} sources\n   *        The sources for a media asset\n   *\n   * @return {Object|boolean}\n   *         Object of source and tech order or false\n   */\n  ;\n\n  _proto.selectSource = function selectSource(sources) {\n    var _this14 = this;\n\n    // Get only the techs specified in `techOrder` that exist and are supported by the\n    // current platform\n    var techs = this.options_.techOrder.map(function (techName) {\n      return [techName, Tech.getTech(techName)];\n    }).filter(function (_ref) {\n      var techName = _ref[0],\n          tech = _ref[1];\n\n      // Check if the current tech is defined before continuing\n      if (tech) {\n        // Check if the browser supports this technology\n        return tech.isSupported();\n      }\n\n      log$1.error(\"The \\\"\" + techName + \"\\\" tech is undefined. Skipped browser support check for that tech.\");\n      return false;\n    }); // Iterate over each `innerArray` element once per `outerArray` element and execute\n    // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n    // that value.\n\n    var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {\n      var found;\n      outerArray.some(function (outerChoice) {\n        return innerArray.some(function (innerChoice) {\n          found = tester(outerChoice, innerChoice);\n\n          if (found) {\n            return true;\n          }\n        });\n      });\n      return found;\n    };\n\n    var foundSourceAndTech;\n\n    var flip = function flip(fn) {\n      return function (a, b) {\n        return fn(b, a);\n      };\n    };\n\n    var finder = function finder(_ref2, source) {\n      var techName = _ref2[0],\n          tech = _ref2[1];\n\n      if (tech.canPlaySource(source, _this14.options_[techName.toLowerCase()])) {\n        return {\n          source: source,\n          tech: techName\n        };\n      }\n    }; // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n    // to select from them based on their priority.\n\n\n    if (this.options_.sourceOrder) {\n      // Source-first ordering\n      foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n    } else {\n      // Tech-first ordering\n      foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n    }\n\n    return foundSourceAndTech || false;\n  }\n  /**\n   * Executes source setting and getting logic\n   *\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n   *        A SourceObject, an array of SourceObjects, or a string referencing\n   *        a URL to a media source. It is _highly recommended_ that an object\n   *        or array of objects is used here, so that source selection\n   *        algorithms can take the `type` into account.\n   *\n   *        If not provided, this method acts as a getter.\n   * @param {boolean} isRetry\n   *        Indicates whether this is being called internally as a result of a retry\n   *\n   * @return {string|undefined}\n   *         If the `source` argument is missing, returns the current source\n   *         URL. Otherwise, returns nothing/undefined.\n   */\n  ;\n\n  _proto.handleSrc_ = function handleSrc_(source, isRetry) {\n    var _this15 = this;\n\n    // getter usage\n    if (typeof source === 'undefined') {\n      return this.cache_.src || '';\n    } // Reset retry behavior for new source\n\n\n    if (this.resetRetryOnError_) {\n      this.resetRetryOnError_();\n    } // filter out invalid sources and turn our source into\n    // an array of source objects\n\n\n    var sources = filterSource(source); // if a source was passed in then it is invalid because\n    // it was filtered to a zero length Array. So we have to\n    // show an error\n\n    if (!sources.length) {\n      this.setTimeout(function () {\n        this.error({\n          code: 4,\n          message: this.options_.notSupportedMessage\n        });\n      }, 0);\n      return;\n    } // initial sources\n\n\n    this.changingSrc_ = true; // Only update the cached source list if we are not retrying a new source after error,\n    // since in that case we want to include the failed source(s) in the cache\n\n    if (!isRetry) {\n      this.cache_.sources = sources;\n    }\n\n    this.updateSourceCaches_(sources[0]); // middlewareSource is the source after it has been changed by middleware\n\n    setSource(this, sources[0], function (middlewareSource, mws) {\n      _this15.middleware_ = mws; // since sourceSet is async we have to update the cache again after we select a source since\n      // the source that is selected could be out of order from the cache update above this callback.\n\n      if (!isRetry) {\n        _this15.cache_.sources = sources;\n      }\n\n      _this15.updateSourceCaches_(middlewareSource);\n\n      var err = _this15.src_(middlewareSource);\n\n      if (err) {\n        if (sources.length > 1) {\n          return _this15.handleSrc_(sources.slice(1));\n        }\n\n        _this15.changingSrc_ = false; // We need to wrap this in a timeout to give folks a chance to add error event handlers\n\n        _this15.setTimeout(function () {\n          this.error({\n            code: 4,\n            message: this.options_.notSupportedMessage\n          });\n        }, 0); // we could not find an appropriate tech, but let's still notify the delegate that this is it\n        // this needs a better comment about why this is needed\n\n\n        _this15.triggerReady();\n\n        return;\n      }\n\n      setTech(mws, _this15.tech_);\n    }); // Try another available source if this one fails before playback.\n\n    if (this.options_.retryOnError && sources.length > 1) {\n      var retry = function retry() {\n        // Remove the error modal\n        _this15.error(null);\n\n        _this15.handleSrc_(sources.slice(1), true);\n      };\n\n      var stopListeningForErrors = function stopListeningForErrors() {\n        _this15.off('error', retry);\n      };\n\n      this.one('error', retry);\n      this.one('playing', stopListeningForErrors);\n\n      this.resetRetryOnError_ = function () {\n        _this15.off('error', retry);\n\n        _this15.off('playing', stopListeningForErrors);\n      };\n    }\n  }\n  /**\n   * Get or set the video source.\n   *\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n   *        A SourceObject, an array of SourceObjects, or a string referencing\n   *        a URL to a media source. It is _highly recommended_ that an object\n   *        or array of objects is used here, so that source selection\n   *        algorithms can take the `type` into account.\n   *\n   *        If not provided, this method acts as a getter.\n   *\n   * @return {string|undefined}\n   *         If the `source` argument is missing, returns the current source\n   *         URL. Otherwise, returns nothing/undefined.\n   */\n  ;\n\n  _proto.src = function src(source) {\n    return this.handleSrc_(source, false);\n  }\n  /**\n   * Set the source object on the tech, returns a boolean that indicates whether\n   * there is a tech that can play the source or not\n   *\n   * @param {Tech~SourceObject} source\n   *        The source object to set on the Tech\n   *\n   * @return {boolean}\n   *         - True if there is no Tech to playback this source\n   *         - False otherwise\n   *\n   * @private\n   */\n  ;\n\n  _proto.src_ = function src_(source) {\n    var _this16 = this;\n\n    var sourceTech = this.selectSource([source]);\n\n    if (!sourceTech) {\n      return true;\n    }\n\n    if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\n      this.changingSrc_ = true; // load this technology with the chosen source\n\n      this.loadTech_(sourceTech.tech, sourceTech.source);\n      this.tech_.ready(function () {\n        _this16.changingSrc_ = false;\n      });\n      return false;\n    } // wait until the tech is ready to set the source\n    // and set it synchronously if possible (#2326)\n\n\n    this.ready(function () {\n      // The setSource tech method was added with source handlers\n      // so older techs won't support it\n      // We need to check the direct prototype for the case where subclasses\n      // of the tech do not support source handlers\n      if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\n        this.techCall_('setSource', source);\n      } else {\n        this.techCall_('src', source.src);\n      }\n\n      this.changingSrc_ = false;\n    }, true);\n    return false;\n  }\n  /**\n   * Begin loading the src data.\n   */\n  ;\n\n  _proto.load = function load() {\n    this.techCall_('load');\n  }\n  /**\n   * Reset the player. Loads the first tech in the techOrder,\n   * removes all the text tracks in the existing `tech`,\n   * and calls `reset` on the `tech`.\n   */\n  ;\n\n  _proto.reset = function reset() {\n    var _this17 = this;\n\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (this.paused() || !PromiseClass) {\n      this.doReset_();\n    } else {\n      var playPromise = this.play();\n      silencePromise(playPromise.then(function () {\n        return _this17.doReset_();\n      }));\n    }\n  };\n\n  _proto.doReset_ = function doReset_() {\n    if (this.tech_) {\n      this.tech_.clearTracks('text');\n    }\n\n    this.resetCache_();\n    this.poster('');\n    this.loadTech_(this.options_.techOrder[0], null);\n    this.techCall_('reset');\n    this.resetControlBarUI_();\n\n    if (isEvented(this)) {\n      this.trigger('playerreset');\n    }\n  }\n  /**\n   * Reset Control Bar's UI by calling sub-methods that reset\n   * all of Control Bar's components\n   */\n  ;\n\n  _proto.resetControlBarUI_ = function resetControlBarUI_() {\n    this.resetProgressBar_();\n    this.resetPlaybackRate_();\n    this.resetVolumeBar_();\n  }\n  /**\n   * Reset tech's progress so progress bar is reset in the UI\n   */\n  ;\n\n  _proto.resetProgressBar_ = function resetProgressBar_() {\n    this.currentTime(0);\n\n    var _ref3 = this.controlBar || {},\n        durationDisplay = _ref3.durationDisplay,\n        remainingTimeDisplay = _ref3.remainingTimeDisplay;\n\n    if (durationDisplay) {\n      durationDisplay.updateContent();\n    }\n\n    if (remainingTimeDisplay) {\n      remainingTimeDisplay.updateContent();\n    }\n  }\n  /**\n   * Reset Playback ratio\n   */\n  ;\n\n  _proto.resetPlaybackRate_ = function resetPlaybackRate_() {\n    this.playbackRate(this.defaultPlaybackRate());\n    this.handleTechRateChange_();\n  }\n  /**\n   * Reset Volume bar\n   */\n  ;\n\n  _proto.resetVolumeBar_ = function resetVolumeBar_() {\n    this.volume(1.0);\n    this.trigger('volumechange');\n  }\n  /**\n   * Returns all of the current source objects.\n   *\n   * @return {Tech~SourceObject[]}\n   *         The current source objects\n   */\n  ;\n\n  _proto.currentSources = function currentSources() {\n    var source = this.currentSource();\n    var sources = []; // assume `{}` or `{ src }`\n\n    if (Object.keys(source).length !== 0) {\n      sources.push(source);\n    }\n\n    return this.cache_.sources || sources;\n  }\n  /**\n   * Returns the current source object.\n   *\n   * @return {Tech~SourceObject}\n   *         The current source object\n   */\n  ;\n\n  _proto.currentSource = function currentSource() {\n    return this.cache_.source || {};\n  }\n  /**\n   * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n   * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\n   *\n   * @return {string}\n   *         The current source\n   */\n  ;\n\n  _proto.currentSrc = function currentSrc() {\n    return this.currentSource() && this.currentSource().src || '';\n  }\n  /**\n   * Get the current source type e.g. video/mp4\n   * This can allow you rebuild the current source object so that you could load the same\n   * source and tech later\n   *\n   * @return {string}\n   *         The source MIME type\n   */\n  ;\n\n  _proto.currentType = function currentType() {\n    return this.currentSource() && this.currentSource().type || '';\n  }\n  /**\n   * Get or set the preload attribute\n   *\n   * @param {boolean} [value]\n   *        - true means that we should preload\n   *        - false means that we should not preload\n   *\n   * @return {string}\n   *         The preload attribute value when getting\n   */\n  ;\n\n  _proto.preload = function preload(value) {\n    if (value !== undefined) {\n      this.techCall_('setPreload', value);\n      this.options_.preload = value;\n      return;\n    }\n\n    return this.techGet_('preload');\n  }\n  /**\n   * Get or set the autoplay option. When this is a boolean it will\n   * modify the attribute on the tech. When this is a string the attribute on\n   * the tech will be removed and `Player` will handle autoplay on loadstarts.\n   *\n   * @param {boolean|string} [value]\n   *        - true: autoplay using the browser behavior\n   *        - false: do not autoplay\n   *        - 'play': call play() on every loadstart\n   *        - 'muted': call muted() then play() on every loadstart\n   *        - 'any': call play() on every loadstart. if that fails call muted() then play().\n   *        - *: values other than those listed here will be set `autoplay` to true\n   *\n   * @return {boolean|string}\n   *         The current value of autoplay when getting\n   */\n  ;\n\n  _proto.autoplay = function autoplay(value) {\n    // getter usage\n    if (value === undefined) {\n      return this.options_.autoplay || false;\n    }\n\n    var techAutoplay; // if the value is a valid string set it to that, or normalize `true` to 'play', if need be\n\n    if (typeof value === 'string' && /(any|play|muted)/.test(value) || value === true && this.options_.normalizeAutoplay) {\n      this.options_.autoplay = value;\n      this.manualAutoplay_(typeof value === 'string' ? value : 'play');\n      techAutoplay = false; // any falsy value sets autoplay to false in the browser,\n      // lets do the same\n    } else if (!value) {\n      this.options_.autoplay = false; // any other value (ie truthy) sets autoplay to true\n    } else {\n      this.options_.autoplay = true;\n    }\n\n    techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay; // if we don't have a tech then we do not queue up\n    // a setAutoplay call on tech ready. We do this because the\n    // autoplay option will be passed in the constructor and we\n    // do not need to set it twice\n\n    if (this.tech_) {\n      this.techCall_('setAutoplay', techAutoplay);\n    }\n  }\n  /**\n   * Set or unset the playsinline attribute.\n   * Playsinline tells the browser that non-fullscreen playback is preferred.\n   *\n   * @param {boolean} [value]\n   *        - true means that we should try to play inline by default\n   *        - false means that we should use the browser's default playback mode,\n   *          which in most cases is inline. iOS Safari is a notable exception\n   *          and plays fullscreen by default.\n   *\n   * @return {string|Player}\n   *         - the current value of playsinline\n   *         - the player when setting\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n   */\n  ;\n\n  _proto.playsinline = function playsinline(value) {\n    if (value !== undefined) {\n      this.techCall_('setPlaysinline', value);\n      this.options_.playsinline = value;\n      return this;\n    }\n\n    return this.techGet_('playsinline');\n  }\n  /**\n   * Get or set the loop attribute on the video element.\n   *\n   * @param {boolean} [value]\n   *        - true means that we should loop the video\n   *        - false means that we should not loop the video\n   *\n   * @return {boolean}\n   *         The current value of loop when getting\n   */\n  ;\n\n  _proto.loop = function loop(value) {\n    if (value !== undefined) {\n      this.techCall_('setLoop', value);\n      this.options_.loop = value;\n      return;\n    }\n\n    return this.techGet_('loop');\n  }\n  /**\n   * Get or set the poster image source url\n   *\n   * @fires Player#posterchange\n   *\n   * @param {string} [src]\n   *        Poster image source URL\n   *\n   * @return {string}\n   *         The current value of poster when getting\n   */\n  ;\n\n  _proto.poster = function poster(src) {\n    if (src === undefined) {\n      return this.poster_;\n    } // The correct way to remove a poster is to set as an empty string\n    // other falsey values will throw errors\n\n\n    if (!src) {\n      src = '';\n    }\n\n    if (src === this.poster_) {\n      return;\n    } // update the internal poster variable\n\n\n    this.poster_ = src; // update the tech's poster\n\n    this.techCall_('setPoster', src);\n    this.isPosterFromTech_ = false; // alert components that the poster has been set\n\n    /**\n     * This event fires when the poster image is changed on the player.\n     *\n     * @event Player#posterchange\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('posterchange');\n  }\n  /**\n   * Some techs (e.g. YouTube) can provide a poster source in an\n   * asynchronous way. We want the poster component to use this\n   * poster source so that it covers up the tech's controls.\n   * (YouTube's play button). However we only want to use this\n   * source if the player user hasn't set a poster through\n   * the normal APIs.\n   *\n   * @fires Player#posterchange\n   * @listens Tech#posterchange\n   * @private\n   */\n  ;\n\n  _proto.handleTechPosterChange_ = function handleTechPosterChange_() {\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n      var newPoster = this.tech_.poster() || '';\n\n      if (newPoster !== this.poster_) {\n        this.poster_ = newPoster;\n        this.isPosterFromTech_ = true; // Let components know the poster has changed\n\n        this.trigger('posterchange');\n      }\n    }\n  }\n  /**\n   * Get or set whether or not the controls are showing.\n   *\n   * @fires Player#controlsenabled\n   *\n   * @param {boolean} [bool]\n   *        - true to turn controls on\n   *        - false to turn controls off\n   *\n   * @return {boolean}\n   *         The current value of controls when getting\n   */\n  ;\n\n  _proto.controls = function controls(bool) {\n    if (bool === undefined) {\n      return !!this.controls_;\n    }\n\n    bool = !!bool; // Don't trigger a change event unless it actually changed\n\n    if (this.controls_ === bool) {\n      return;\n    }\n\n    this.controls_ = bool;\n\n    if (this.usingNativeControls()) {\n      this.techCall_('setControls', bool);\n    }\n\n    if (this.controls_) {\n      this.removeClass('vjs-controls-disabled');\n      this.addClass('vjs-controls-enabled');\n      /**\n       * @event Player#controlsenabled\n       * @type {EventTarget~Event}\n       */\n\n      this.trigger('controlsenabled');\n\n      if (!this.usingNativeControls()) {\n        this.addTechControlsListeners_();\n      }\n    } else {\n      this.removeClass('vjs-controls-enabled');\n      this.addClass('vjs-controls-disabled');\n      /**\n       * @event Player#controlsdisabled\n       * @type {EventTarget~Event}\n       */\n\n      this.trigger('controlsdisabled');\n\n      if (!this.usingNativeControls()) {\n        this.removeTechControlsListeners_();\n      }\n    }\n  }\n  /**\n   * Toggle native controls on/off. Native controls are the controls built into\n   * devices (e.g. default iPhone controls) or other techs\n   * (e.g. Vimeo Controls)\n   * **This should only be set by the current tech, because only the tech knows\n   * if it can support native controls**\n   *\n   * @fires Player#usingnativecontrols\n   * @fires Player#usingcustomcontrols\n   *\n   * @param {boolean} [bool]\n   *        - true to turn native controls on\n   *        - false to turn native controls off\n   *\n   * @return {boolean}\n   *         The current value of native controls when getting\n   */\n  ;\n\n  _proto.usingNativeControls = function usingNativeControls(bool) {\n    if (bool === undefined) {\n      return !!this.usingNativeControls_;\n    }\n\n    bool = !!bool; // Don't trigger a change event unless it actually changed\n\n    if (this.usingNativeControls_ === bool) {\n      return;\n    }\n\n    this.usingNativeControls_ = bool;\n\n    if (this.usingNativeControls_) {\n      this.addClass('vjs-using-native-controls');\n      /**\n       * player is using the native device controls\n       *\n       * @event Player#usingnativecontrols\n       * @type {EventTarget~Event}\n       */\n\n      this.trigger('usingnativecontrols');\n    } else {\n      this.removeClass('vjs-using-native-controls');\n      /**\n       * player is using the custom HTML controls\n       *\n       * @event Player#usingcustomcontrols\n       * @type {EventTarget~Event}\n       */\n\n      this.trigger('usingcustomcontrols');\n    }\n  }\n  /**\n   * Set or get the current MediaError\n   *\n   * @fires Player#error\n   *\n   * @param  {MediaError|string|number} [err]\n   *         A MediaError or a string/number to be turned\n   *         into a MediaError\n   *\n   * @return {MediaError|null}\n   *         The current MediaError when getting (or null)\n   */\n  ;\n\n  _proto.error = function error(err) {\n    var _this18 = this;\n\n    if (err === undefined) {\n      return this.error_ || null;\n    } // allow hooks to modify error object\n\n\n    hooks('beforeerror').forEach(function (hookFunction) {\n      var newErr = hookFunction(_this18, err);\n\n      if (!(isObject(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n        _this18.log.error('please return a value that MediaError expects in beforeerror hooks');\n\n        return;\n      }\n\n      err = newErr;\n    }); // Suppress the first error message for no compatible source until\n    // user interaction\n\n    if (this.options_.suppressNotSupportedError && err && err.code === 4) {\n      var triggerSuppressedError = function triggerSuppressedError() {\n        this.error(err);\n      };\n\n      this.options_.suppressNotSupportedError = false;\n      this.any(['click', 'touchstart'], triggerSuppressedError);\n      this.one('loadstart', function () {\n        this.off(['click', 'touchstart'], triggerSuppressedError);\n      });\n      return;\n    } // restoring to default\n\n\n    if (err === null) {\n      this.error_ = err;\n      this.removeClass('vjs-error');\n\n      if (this.errorDisplay) {\n        this.errorDisplay.close();\n      }\n\n      return;\n    }\n\n    this.error_ = new MediaError(err); // add the vjs-error classname to the player\n\n    this.addClass('vjs-error'); // log the name of the error type and any message\n    // IE11 logs \"[object object]\" and required you to expand message to see error object\n\n    log$1.error(\"(CODE:\" + this.error_.code + \" \" + MediaError.errorTypes[this.error_.code] + \")\", this.error_.message, this.error_);\n    /**\n     * @event Player#error\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('error'); // notify hooks of the per player error\n\n    hooks('error').forEach(function (hookFunction) {\n      return hookFunction(_this18, _this18.error_);\n    });\n    return;\n  }\n  /**\n   * Report user activity\n   *\n   * @param {Object} event\n   *        Event object\n   */\n  ;\n\n  _proto.reportUserActivity = function reportUserActivity(event) {\n    this.userActivity_ = true;\n  }\n  /**\n   * Get/set if user is active\n   *\n   * @fires Player#useractive\n   * @fires Player#userinactive\n   *\n   * @param {boolean} [bool]\n   *        - true if the user is active\n   *        - false if the user is inactive\n   *\n   * @return {boolean}\n   *         The current value of userActive when getting\n   */\n  ;\n\n  _proto.userActive = function userActive(bool) {\n    if (bool === undefined) {\n      return this.userActive_;\n    }\n\n    bool = !!bool;\n\n    if (bool === this.userActive_) {\n      return;\n    }\n\n    this.userActive_ = bool;\n\n    if (this.userActive_) {\n      this.userActivity_ = true;\n      this.removeClass('vjs-user-inactive');\n      this.addClass('vjs-user-active');\n      /**\n       * @event Player#useractive\n       * @type {EventTarget~Event}\n       */\n\n      this.trigger('useractive');\n      return;\n    } // Chrome/Safari/IE have bugs where when you change the cursor it can\n    // trigger a mousemove event. This causes an issue when you're hiding\n    // the cursor when the user is inactive, and a mousemove signals user\n    // activity. Making it impossible to go into inactive mode. Specifically\n    // this happens in fullscreen when we really need to hide the cursor.\n    //\n    // When this gets resolved in ALL browsers it can be removed\n    // https://code.google.com/p/chromium/issues/detail?id=103041\n\n\n    if (this.tech_) {\n      this.tech_.one('mousemove', function (e) {\n        e.stopPropagation();\n        e.preventDefault();\n      });\n    }\n\n    this.userActivity_ = false;\n    this.removeClass('vjs-user-active');\n    this.addClass('vjs-user-inactive');\n    /**\n     * @event Player#userinactive\n     * @type {EventTarget~Event}\n     */\n\n    this.trigger('userinactive');\n  }\n  /**\n   * Listen for user activity based on timeout value\n   *\n   * @private\n   */\n  ;\n\n  _proto.listenForUserActivity_ = function listenForUserActivity_() {\n    var mouseInProgress;\n    var lastMoveX;\n    var lastMoveY;\n    var handleActivity = bind(this, this.reportUserActivity);\n\n    var handleMouseMove = function handleMouseMove(e) {\n      // #1068 - Prevent mousemove spamming\n      // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n      if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n        lastMoveX = e.screenX;\n        lastMoveY = e.screenY;\n        handleActivity();\n      }\n    };\n\n    var handleMouseDown = function handleMouseDown() {\n      handleActivity(); // For as long as the they are touching the device or have their mouse down,\n      // we consider them active even if they're not moving their finger or mouse.\n      // So we want to continue to update that they are active\n\n      this.clearInterval(mouseInProgress); // Setting userActivity=true now and setting the interval to the same time\n      // as the activityCheck interval (250) should ensure we never miss the\n      // next activityCheck\n\n      mouseInProgress = this.setInterval(handleActivity, 250);\n    };\n\n    var handleMouseUpAndMouseLeave = function handleMouseUpAndMouseLeave(event) {\n      handleActivity(); // Stop the interval that maintains activity if the mouse/touch is down\n\n      this.clearInterval(mouseInProgress);\n    }; // Any mouse movement will be considered user activity\n\n\n    this.on('mousedown', handleMouseDown);\n    this.on('mousemove', handleMouseMove);\n    this.on('mouseup', handleMouseUpAndMouseLeave);\n    this.on('mouseleave', handleMouseUpAndMouseLeave);\n    var controlBar = this.getChild('controlBar'); // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\n    // controlBar would no longer be hidden by default timeout.\n\n    if (controlBar && !IS_IOS && !IS_ANDROID) {\n      controlBar.on('mouseenter', function (event) {\n        if (this.player().options_.inactivityTimeout !== 0) {\n          this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\n        }\n\n        this.player().options_.inactivityTimeout = 0;\n      });\n      controlBar.on('mouseleave', function (event) {\n        this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\n      });\n    } // Listen for keyboard navigation\n    // Shouldn't need to use inProgress interval because of key repeat\n\n\n    this.on('keydown', handleActivity);\n    this.on('keyup', handleActivity); // Run an interval every 250 milliseconds instead of stuffing everything into\n    // the mousemove/touchmove function itself, to prevent performance degradation.\n    // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n    // then gets picked up by this loop\n    // http://ejohn.org/blog/learning-from-twitter/\n\n    var inactivityTimeout;\n    this.setInterval(function () {\n      // Check to see if mouse/touch activity has happened\n      if (!this.userActivity_) {\n        return;\n      } // Reset the activity tracker\n\n\n      this.userActivity_ = false; // If the user state was inactive, set the state to active\n\n      this.userActive(true); // Clear any existing inactivity timeout to start the timer over\n\n      this.clearTimeout(inactivityTimeout);\n      var timeout = this.options_.inactivityTimeout;\n\n      if (timeout <= 0) {\n        return;\n      } // In <timeout> milliseconds, if no more activity has occurred the\n      // user will be considered inactive\n\n\n      inactivityTimeout = this.setTimeout(function () {\n        // Protect against the case where the inactivityTimeout can trigger just\n        // before the next user activity is picked up by the activity check loop\n        // causing a flicker\n        if (!this.userActivity_) {\n          this.userActive(false);\n        }\n      }, timeout);\n    }, 250);\n  }\n  /**\n   * Gets or sets the current playback rate. A playback rate of\n   * 1.0 represents normal speed and 0.5 would indicate half-speed\n   * playback, for instance.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n   *\n   * @param {number} [rate]\n   *       New playback rate to set.\n   *\n   * @return {number}\n   *         The current playback rate when getting or 1.0\n   */\n  ;\n\n  _proto.playbackRate = function playbackRate(rate) {\n    if (rate !== undefined) {\n      // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\n      // that is registered above\n      this.techCall_('setPlaybackRate', rate);\n      return;\n    }\n\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\n      return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\n    }\n\n    return 1.0;\n  }\n  /**\n   * Gets or sets the current default playback rate. A default playback rate of\n   * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\n   * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\n   * not the current playbackRate.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\n   *\n   * @param {number} [rate]\n   *       New default playback rate to set.\n   *\n   * @return {number|Player}\n   *         - The default playback rate when getting or 1.0\n   *         - the player when setting\n   */\n  ;\n\n  _proto.defaultPlaybackRate = function defaultPlaybackRate(rate) {\n    if (rate !== undefined) {\n      return this.techCall_('setDefaultPlaybackRate', rate);\n    }\n\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\n      return this.techGet_('defaultPlaybackRate');\n    }\n\n    return 1.0;\n  }\n  /**\n   * Gets or sets the audio flag\n   *\n   * @param {boolean} bool\n   *        - true signals that this is an audio player\n   *        - false signals that this is not an audio player\n   *\n   * @return {boolean}\n   *         The current value of isAudio when getting\n   */\n  ;\n\n  _proto.isAudio = function isAudio(bool) {\n    if (bool !== undefined) {\n      this.isAudio_ = !!bool;\n      return;\n    }\n\n    return !!this.isAudio_;\n  };\n\n  _proto.enableAudioOnlyUI_ = function enableAudioOnlyUI_() {\n    var _this19 = this;\n\n    // Update styling immediately to show the control bar so we can get its height\n    this.addClass('vjs-audio-only-mode');\n    var playerChildren = this.children();\n    var controlBar = this.getChild('ControlBar');\n    var controlBarHeight = controlBar && controlBar.currentHeight(); // Hide all player components except the control bar. Control bar components\n    // needed only for video are hidden with CSS\n\n    playerChildren.forEach(function (child) {\n      if (child === controlBar) {\n        return;\n      }\n\n      if (child.el_ && !child.hasClass('vjs-hidden')) {\n        child.hide();\n\n        _this19.audioOnlyCache_.hiddenChildren.push(child);\n      }\n    });\n    this.audioOnlyCache_.playerHeight = this.currentHeight(); // Set the player height the same as the control bar\n\n    this.height(controlBarHeight);\n    this.trigger('audioonlymodechange');\n  };\n\n  _proto.disableAudioOnlyUI_ = function disableAudioOnlyUI_() {\n    this.removeClass('vjs-audio-only-mode'); // Show player components that were previously hidden\n\n    this.audioOnlyCache_.hiddenChildren.forEach(function (child) {\n      return child.show();\n    }); // Reset player height\n\n    this.height(this.audioOnlyCache_.playerHeight);\n    this.trigger('audioonlymodechange');\n  }\n  /**\n   * Get the current audioOnlyMode state or set audioOnlyMode to true or false.\n   *\n   * Setting this to `true` will hide all player components except the control bar,\n   * as well as control bar components needed only for video.\n   *\n   * @param {boolean} [value]\n   *         The value to set audioOnlyMode to.\n   *\n   * @return {Promise|boolean}\n   *        A Promise is returned when setting the state, and a boolean when getting\n   *        the present state\n   */\n  ;\n\n  _proto.audioOnlyMode = function audioOnlyMode(value) {\n    var _this20 = this;\n\n    if (typeof value !== 'boolean' || value === this.audioOnlyMode_) {\n      return this.audioOnlyMode_;\n    }\n\n    this.audioOnlyMode_ = value;\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      // Enable Audio Only Mode\n      if (value) {\n        var exitPromises = []; // Fullscreen and PiP are not supported in audioOnlyMode, so exit if we need to.\n\n        if (this.isInPictureInPicture()) {\n          exitPromises.push(this.exitPictureInPicture());\n        }\n\n        if (this.isFullscreen()) {\n          exitPromises.push(this.exitFullscreen());\n        }\n\n        if (this.audioPosterMode()) {\n          exitPromises.push(this.audioPosterMode(false));\n        }\n\n        return PromiseClass.all(exitPromises).then(function () {\n          return _this20.enableAudioOnlyUI_();\n        });\n      } // Disable Audio Only Mode\n\n\n      return PromiseClass.resolve().then(function () {\n        return _this20.disableAudioOnlyUI_();\n      });\n    }\n\n    if (value) {\n      if (this.isInPictureInPicture()) {\n        this.exitPictureInPicture();\n      }\n\n      if (this.isFullscreen()) {\n        this.exitFullscreen();\n      }\n\n      this.enableAudioOnlyUI_();\n    } else {\n      this.disableAudioOnlyUI_();\n    }\n  };\n\n  _proto.enablePosterModeUI_ = function enablePosterModeUI_() {\n    // Hide the video element and show the poster image to enable posterModeUI\n    var tech = this.tech_ && this.tech_;\n    tech.hide();\n    this.addClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  };\n\n  _proto.disablePosterModeUI_ = function disablePosterModeUI_() {\n    // Show the video element and hide the poster image to disable posterModeUI\n    var tech = this.tech_ && this.tech_;\n    tech.show();\n    this.removeClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  }\n  /**\n   * Get the current audioPosterMode state or set audioPosterMode to true or false\n   *\n   * @param {boolean} [value]\n   *         The value to set audioPosterMode to.\n   *\n   * @return {Promise|boolean}\n   *         A Promise is returned when setting the state, and a boolean when getting\n   *        the present state\n   */\n  ;\n\n  _proto.audioPosterMode = function audioPosterMode(value) {\n    var _this21 = this;\n\n    if (typeof value !== 'boolean' || value === this.audioPosterMode_) {\n      return this.audioPosterMode_;\n    }\n\n    this.audioPosterMode_ = value;\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\n\n    if (PromiseClass) {\n      if (value) {\n        if (this.audioOnlyMode()) {\n          var audioOnlyModePromise = this.audioOnlyMode(false);\n          return audioOnlyModePromise.then(function () {\n            // enable audio poster mode after audio only mode is disabled\n            _this21.enablePosterModeUI_();\n          });\n        }\n\n        return PromiseClass.resolve().then(function () {\n          // enable audio poster mode\n          _this21.enablePosterModeUI_();\n        });\n      }\n\n      return PromiseClass.resolve().then(function () {\n        // disable audio poster mode\n        _this21.disablePosterModeUI_();\n      });\n    }\n\n    if (value) {\n      if (this.audioOnlyMode()) {\n        this.audioOnlyMode(false);\n      }\n\n      this.enablePosterModeUI_();\n      return;\n    }\n\n    this.disablePosterModeUI_();\n  }\n  /**\n   * A helper method for adding a {@link TextTrack} to our\n   * {@link TextTrackList}.\n   *\n   * In addition to the W3C settings we allow adding additional info through options.\n   *\n   * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n   *\n   * @param {string} [kind]\n   *        the kind of TextTrack you are adding\n   *\n   * @param {string} [label]\n   *        the label to give the TextTrack label\n   *\n   * @param {string} [language]\n   *        the language to set on the TextTrack\n   *\n   * @return {TextTrack|undefined}\n   *         the TextTrack that was added or undefined\n   *         if there is no tech\n   */\n  ;\n\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\n    if (this.tech_) {\n      return this.tech_.addTextTrack(kind, label, language);\n    }\n  }\n  /**\n   * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\n   * When manualCleanup is set to false, the track will be automatically removed\n   * on source changes.\n   *\n   * @param {Object} options\n   *        Options to pass to {@link HTMLTrackElement} during creation. See\n   *        {@link HTMLTrackElement} for object properties that you should use.\n   *\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\n   *                                       removed on a source change\n   *\n   * @return {HtmlTrackElement}\n   *         the HTMLTrackElement that was created and added\n   *         to the HtmlTrackElementList and the remote\n   *         TextTrackList\n   *\n   * @deprecated The default value of the \"manualCleanup\" parameter will default\n   *             to \"false\" in upcoming versions of Video.js\n   */\n  ;\n\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\n    if (this.tech_) {\n      return this.tech_.addRemoteTextTrack(options, manualCleanup);\n    }\n  }\n  /**\n   * Remove a remote {@link TextTrack} from the respective\n   * {@link TextTrackList} and {@link HtmlTrackElementList}.\n   *\n   * @param {Object} track\n   *        Remote {@link TextTrack} to remove\n   *\n   * @return {undefined}\n   *         does not return anything\n   */\n  ;\n\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(obj) {\n    if (obj === void 0) {\n      obj = {};\n    }\n\n    var _obj = obj,\n        track = _obj.track;\n\n    if (!track) {\n      track = obj;\n    } // destructure the input into an object with a track argument, defaulting to arguments[0]\n    // default the whole argument to an empty object if nothing was passed in\n\n\n    if (this.tech_) {\n      return this.tech_.removeRemoteTextTrack(track);\n    }\n  }\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object|undefined}\n   *         An object with supported media playback quality metrics or undefined if there\n   *         is no tech or the tech does not support it.\n   */\n  ;\n\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\n    return this.techGet_('getVideoPlaybackQuality');\n  }\n  /**\n   * Get video width\n   *\n   * @return {number}\n   *         current video width\n   */\n  ;\n\n  _proto.videoWidth = function videoWidth() {\n    return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n  }\n  /**\n   * Get video height\n   *\n   * @return {number}\n   *         current video height\n   */\n  ;\n\n  _proto.videoHeight = function videoHeight() {\n    return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n  }\n  /**\n   * The player's language code.\n   *\n   * Changing the language will trigger\n   * [languagechange]{@link Player#event:languagechange}\n   * which Components can use to update control text.\n   * ClickableComponent will update its control text by default on\n   * [languagechange]{@link Player#event:languagechange}.\n   *\n   * @fires Player#languagechange\n   *\n   * @param {string} [code]\n   *        the language code to set the player to\n   *\n   * @return {string}\n   *         The current language code when getting\n   */\n  ;\n\n  _proto.language = function language(code) {\n    if (code === undefined) {\n      return this.language_;\n    }\n\n    if (this.language_ !== String(code).toLowerCase()) {\n      this.language_ = String(code).toLowerCase(); // during first init, it's possible some things won't be evented\n\n      if (isEvented(this)) {\n        /**\n        * fires when the player language change\n        *\n        * @event Player#languagechange\n        * @type {EventTarget~Event}\n        */\n        this.trigger('languagechange');\n      }\n    }\n  }\n  /**\n   * Get the player's language dictionary\n   * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n   * Languages specified directly in the player options have precedence\n   *\n   * @return {Array}\n   *         An array of of supported languages\n   */\n  ;\n\n  _proto.languages = function languages() {\n    return mergeOptions$3(Player.prototype.options_.languages, this.languages_);\n  }\n  /**\n   * returns a JavaScript object reperesenting the current track\n   * information. **DOES not return it as JSON**\n   *\n   * @return {Object}\n   *         Object representing the current of track info\n   */\n  ;\n\n  _proto.toJSON = function toJSON() {\n    var options = mergeOptions$3(this.options_);\n    var tracks = options.tracks;\n    options.tracks = [];\n\n    for (var i = 0; i < tracks.length; i++) {\n      var track = tracks[i]; // deep merge tracks and null out player so no circular references\n\n      track = mergeOptions$3(track);\n      track.player = undefined;\n      options.tracks[i] = track;\n    }\n\n    return options;\n  }\n  /**\n   * Creates a simple modal dialog (an instance of the {@link ModalDialog}\n   * component) that immediately overlays the player with arbitrary\n   * content and removes itself when closed.\n   *\n   * @param {string|Function|Element|Array|null} content\n   *        Same as {@link ModalDialog#content}'s param of the same name.\n   *        The most straight-forward usage is to provide a string or DOM\n   *        element.\n   *\n   * @param {Object} [options]\n   *        Extra options which will be passed on to the {@link ModalDialog}.\n   *\n   * @return {ModalDialog}\n   *         the {@link ModalDialog} that was created\n   */\n  ;\n\n  _proto.createModal = function createModal(content, options) {\n    var _this22 = this;\n\n    options = options || {};\n    options.content = content || '';\n    var modal = new ModalDialog(this, options);\n    this.addChild(modal);\n    modal.on('dispose', function () {\n      _this22.removeChild(modal);\n    });\n    modal.open();\n    return modal;\n  }\n  /**\n   * Change breakpoint classes when the player resizes.\n   *\n   * @private\n   */\n  ;\n\n  _proto.updateCurrentBreakpoint_ = function updateCurrentBreakpoint_() {\n    if (!this.responsive()) {\n      return;\n    }\n\n    var currentBreakpoint = this.currentBreakpoint();\n    var currentWidth = this.currentWidth();\n\n    for (var i = 0; i < BREAKPOINT_ORDER.length; i++) {\n      var candidateBreakpoint = BREAKPOINT_ORDER[i];\n      var maxWidth = this.breakpoints_[candidateBreakpoint];\n\n      if (currentWidth <= maxWidth) {\n        // The current breakpoint did not change, nothing to do.\n        if (currentBreakpoint === candidateBreakpoint) {\n          return;\n        } // Only remove a class if there is a current breakpoint.\n\n\n        if (currentBreakpoint) {\n          this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\n        }\n\n        this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\n        this.breakpoint_ = candidateBreakpoint;\n        break;\n      }\n    }\n  }\n  /**\n   * Removes the current breakpoint.\n   *\n   * @private\n   */\n  ;\n\n  _proto.removeCurrentBreakpoint_ = function removeCurrentBreakpoint_() {\n    var className = this.currentBreakpointClass();\n    this.breakpoint_ = '';\n\n    if (className) {\n      this.removeClass(className);\n    }\n  }\n  /**\n   * Get or set breakpoints on the player.\n   *\n   * Calling this method with an object or `true` will remove any previous\n   * custom breakpoints and start from the defaults again.\n   *\n   * @param  {Object|boolean} [breakpoints]\n   *         If an object is given, it can be used to provide custom\n   *         breakpoints. If `true` is given, will set default breakpoints.\n   *         If this argument is not given, will simply return the current\n   *         breakpoints.\n   *\n   * @param  {number} [breakpoints.tiny]\n   *         The maximum width for the \"vjs-layout-tiny\" class.\n   *\n   * @param  {number} [breakpoints.xsmall]\n   *         The maximum width for the \"vjs-layout-x-small\" class.\n   *\n   * @param  {number} [breakpoints.small]\n   *         The maximum width for the \"vjs-layout-small\" class.\n   *\n   * @param  {number} [breakpoints.medium]\n   *         The maximum width for the \"vjs-layout-medium\" class.\n   *\n   * @param  {number} [breakpoints.large]\n   *         The maximum width for the \"vjs-layout-large\" class.\n   *\n   * @param  {number} [breakpoints.xlarge]\n   *         The maximum width for the \"vjs-layout-x-large\" class.\n   *\n   * @param  {number} [breakpoints.huge]\n   *         The maximum width for the \"vjs-layout-huge\" class.\n   *\n   * @return {Object}\n   *         An object mapping breakpoint names to maximum width values.\n   */\n  ;\n\n  _proto.breakpoints = function breakpoints(_breakpoints) {\n    // Used as a getter.\n    if (_breakpoints === undefined) {\n      return assign(this.breakpoints_);\n    }\n\n    this.breakpoint_ = '';\n    this.breakpoints_ = assign({}, DEFAULT_BREAKPOINTS, _breakpoints); // When breakpoint definitions change, we need to update the currently\n    // selected breakpoint.\n\n    this.updateCurrentBreakpoint_(); // Clone the breakpoints before returning.\n\n    return assign(this.breakpoints_);\n  }\n  /**\n   * Get or set a flag indicating whether or not this player should adjust\n   * its UI based on its dimensions.\n   *\n   * @param  {boolean} value\n   *         Should be `true` if the player should adjust its UI based on its\n   *         dimensions; otherwise, should be `false`.\n   *\n   * @return {boolean}\n   *         Will be `true` if this player should adjust its UI based on its\n   *         dimensions; otherwise, will be `false`.\n   */\n  ;\n\n  _proto.responsive = function responsive(value) {\n    // Used as a getter.\n    if (value === undefined) {\n      return this.responsive_;\n    }\n\n    value = Boolean(value);\n    var current = this.responsive_; // Nothing changed.\n\n    if (value === current) {\n      return;\n    } // The value actually changed, set it.\n\n\n    this.responsive_ = value; // Start listening for breakpoints and set the initial breakpoint if the\n    // player is now responsive.\n\n    if (value) {\n      this.on('playerresize', this.boundUpdateCurrentBreakpoint_);\n      this.updateCurrentBreakpoint_(); // Stop listening for breakpoints if the player is no longer responsive.\n    } else {\n      this.off('playerresize', this.boundUpdateCurrentBreakpoint_);\n      this.removeCurrentBreakpoint_();\n    }\n\n    return value;\n  }\n  /**\n   * Get current breakpoint name, if any.\n   *\n   * @return {string}\n   *         If there is currently a breakpoint set, returns a the key from the\n   *         breakpoints object matching it. Otherwise, returns an empty string.\n   */\n  ;\n\n  _proto.currentBreakpoint = function currentBreakpoint() {\n    return this.breakpoint_;\n  }\n  /**\n   * Get the current breakpoint class name.\n   *\n   * @return {string}\n   *         The matching class name (e.g. `\"vjs-layout-tiny\"` or\n   *         `\"vjs-layout-large\"`) for the current breakpoint. Empty string if\n   *         there is no current breakpoint.\n   */\n  ;\n\n  _proto.currentBreakpointClass = function currentBreakpointClass() {\n    return BREAKPOINT_CLASSES[this.breakpoint_] || '';\n  }\n  /**\n   * An object that describes a single piece of media.\n   *\n   * Properties that are not part of this type description will be retained; so,\n   * this can be viewed as a generic metadata storage mechanism as well.\n   *\n   * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\n   * @typedef  {Object} Player~MediaObject\n   *\n   * @property {string} [album]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {string} [artist]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {Object[]} [artwork]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API. If not specified, will be populated via the `poster`, if\n   *           available.\n   *\n   * @property {string} [poster]\n   *           URL to an image that will display before playback.\n   *\n   * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\n   *           A single source object, an array of source objects, or a string\n   *           referencing a URL to a media source. It is _highly recommended_\n   *           that an object or array of objects is used here, so that source\n   *           selection algorithms can take the `type` into account.\n   *\n   * @property {string} [title]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {Object[]} [textTracks]\n   *           An array of objects to be used to create text tracks, following\n   *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\n   *           For ease of removal, these will be created as \"remote\" text\n   *           tracks and set to automatically clean up on source changes.\n   *\n   *           These objects may have properties like `src`, `kind`, `label`,\n   *           and `language`, see {@link Tech#createRemoteTextTrack}.\n   */\n\n  /**\n   * Populate the player using a {@link Player~MediaObject|MediaObject}.\n   *\n   * @param  {Player~MediaObject} media\n   *         A media object.\n   *\n   * @param  {Function} ready\n   *         A callback to be called when the player is ready.\n   */\n  ;\n\n  _proto.loadMedia = function loadMedia(media, ready) {\n    var _this23 = this;\n\n    if (!media || typeof media !== 'object') {\n      return;\n    }\n\n    this.reset(); // Clone the media object so it cannot be mutated from outside.\n\n    this.cache_.media = mergeOptions$3(media);\n    var _this$cache_$media = this.cache_.media,\n        artwork = _this$cache_$media.artwork,\n        poster = _this$cache_$media.poster,\n        src = _this$cache_$media.src,\n        textTracks = _this$cache_$media.textTracks; // If `artwork` is not given, create it using `poster`.\n\n    if (!artwork && poster) {\n      this.cache_.media.artwork = [{\n        src: poster,\n        type: getMimetype(poster)\n      }];\n    }\n\n    if (src) {\n      this.src(src);\n    }\n\n    if (poster) {\n      this.poster(poster);\n    }\n\n    if (Array.isArray(textTracks)) {\n      textTracks.forEach(function (tt) {\n        return _this23.addRemoteTextTrack(tt, false);\n      });\n    }\n\n    this.ready(ready);\n  }\n  /**\n   * Get a clone of the current {@link Player~MediaObject} for this player.\n   *\n   * If the `loadMedia` method has not been used, will attempt to return a\n   * {@link Player~MediaObject} based on the current state of the player.\n   *\n   * @return {Player~MediaObject}\n   */\n  ;\n\n  _proto.getMedia = function getMedia() {\n    if (!this.cache_.media) {\n      var poster = this.poster();\n      var src = this.currentSources();\n      var textTracks = Array.prototype.map.call(this.remoteTextTracks(), function (tt) {\n        return {\n          kind: tt.kind,\n          label: tt.label,\n          language: tt.language,\n          src: tt.src\n        };\n      });\n      var media = {\n        src: src,\n        textTracks: textTracks\n      };\n\n      if (poster) {\n        media.poster = poster;\n        media.artwork = [{\n          src: media.poster,\n          type: getMimetype(media.poster)\n        }];\n      }\n\n      return media;\n    }\n\n    return mergeOptions$3(this.cache_.media);\n  }\n  /**\n   * Gets tag settings\n   *\n   * @param {Element} tag\n   *        The player tag\n   *\n   * @return {Object}\n   *         An object containing all of the settings\n   *         for a player tag\n   */\n  ;\n\n  Player.getTagSettings = function getTagSettings(tag) {\n    var baseOptions = {\n      sources: [],\n      tracks: []\n    };\n    var tagOptions = getAttributes(tag);\n    var dataSetup = tagOptions['data-setup'];\n\n    if (hasClass(tag, 'vjs-fill')) {\n      tagOptions.fill = true;\n    }\n\n    if (hasClass(tag, 'vjs-fluid')) {\n      tagOptions.fluid = true;\n    } // Check if data-setup attr exists.\n\n\n    if (dataSetup !== null) {\n      // Parse options JSON\n      // If empty string, make it a parsable json object.\n      var _safeParseTuple = safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_6___default()(dataSetup || '{}'),\n          err = _safeParseTuple[0],\n          data = _safeParseTuple[1];\n\n      if (err) {\n        log$1.error(err);\n      }\n\n      assign(tagOptions, data);\n    }\n\n    assign(baseOptions, tagOptions); // Get tag children settings\n\n    if (tag.hasChildNodes()) {\n      var children = tag.childNodes;\n\n      for (var i = 0, j = children.length; i < j; i++) {\n        var child = children[i]; // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n\n        var childName = child.nodeName.toLowerCase();\n\n        if (childName === 'source') {\n          baseOptions.sources.push(getAttributes(child));\n        } else if (childName === 'track') {\n          baseOptions.tracks.push(getAttributes(child));\n        }\n      }\n    }\n\n    return baseOptions;\n  }\n  /**\n   * Determine whether or not flexbox is supported\n   *\n   * @return {boolean}\n   *         - true if flexbox is supported\n   *         - false if flexbox is not supported\n   */\n  ;\n\n  _proto.flexNotSupported_ = function flexNotSupported_() {\n    var elem = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('i'); // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\n    // common flex features that we can rely on when checking for flex support.\n\n    return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || // IE10-specific (2012 flex spec), available for completeness\n    'msFlexOrder' in elem.style);\n  }\n  /**\n   * Set debug mode to enable/disable logs at info level.\n   *\n   * @param {boolean} enabled\n   * @fires Player#debugon\n   * @fires Player#debugoff\n   */\n  ;\n\n  _proto.debug = function debug(enabled) {\n    if (enabled === undefined) {\n      return this.debugEnabled_;\n    }\n\n    if (enabled) {\n      this.trigger('debugon');\n      this.previousLogLevel_ = this.log.level;\n      this.log.level('debug');\n      this.debugEnabled_ = true;\n    } else {\n      this.trigger('debugoff');\n      this.log.level(this.previousLogLevel_);\n      this.previousLogLevel_ = undefined;\n      this.debugEnabled_ = false;\n    }\n  }\n  /**\n   * Set or get current playback rates.\n   * Takes an array and updates the playback rates menu with the new items.\n   * Pass in an empty array to hide the menu.\n   * Values other than arrays are ignored.\n   *\n   * @fires Player#playbackrateschange\n   * @param {number[]} newRates\n   *                   The new rates that the playback rates menu should update to.\n   *                   An empty array will hide the menu\n   * @return {number[]} When used as a getter will return the current playback rates\n   */\n  ;\n\n  _proto.playbackRates = function playbackRates(newRates) {\n    if (newRates === undefined) {\n      return this.cache_.playbackRates;\n    } // ignore any value that isn't an array\n\n\n    if (!Array.isArray(newRates)) {\n      return;\n    } // ignore any arrays that don't only contain numbers\n\n\n    if (!newRates.every(function (rate) {\n      return typeof rate === 'number';\n    })) {\n      return;\n    }\n\n    this.cache_.playbackRates = newRates;\n    /**\n    * fires when the playback rates in a player are changed\n    *\n    * @event Player#playbackrateschange\n    * @type {EventTarget~Event}\n    */\n\n    this.trigger('playbackrateschange');\n  };\n\n  return Player;\n}(Component$1);\n/**\n * Get the {@link VideoTrackList}\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\n *\n * @return {VideoTrackList}\n *         the current video track list\n *\n * @method Player.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\n *\n * @return {AudioTrackList}\n *         the current audio track list\n *\n * @method Player.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {TextTrackList}\n *         the current text track list\n *\n * @method Player.prototype.textTracks\n */\n\n/**\n * Get the remote {@link TextTrackList}\n *\n * @return {TextTrackList}\n *         The current remote text track list\n *\n * @method Player.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote {@link HtmlTrackElementList} tracks.\n *\n * @return {HtmlTrackElementList}\n *         The current remote text track element list\n *\n * @method Player.prototype.remoteTextTrackEls\n */\n\n\nALL.names.forEach(function (name) {\n  var props = ALL[name];\n\n  Player.prototype[props.getterName] = function () {\n    if (this.tech_) {\n      return this.tech_[props.getterName]();\n    } // if we have not yet loadTech_, we create {video,audio,text}Tracks_\n    // these will be passed to the tech during loading\n\n\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\n    return this[props.privateName];\n  };\n});\n/**\n * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n * behavior.\n *\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n *\n * @param {string} [value]\n *        The value to set the `Player`'s crossorigin to. If an argument is\n *        given, must be one of `anonymous` or `use-credentials`.\n *\n * @return {string|undefined}\n *         - The current crossorigin value of the `Player` when getting.\n *         - undefined when setting\n */\n\nPlayer.prototype.crossorigin = Player.prototype.crossOrigin;\n/**\n * Global enumeration of players.\n *\n * The keys are the player IDs and the values are either the {@link Player}\n * instance or `null` for disposed players.\n *\n * @type {Object}\n */\n\nPlayer.players = {};\nvar navigator = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator;\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n *\n * @type {Object}\n * @private\n */\n\nPlayer.prototype.options_ = {\n  // Default order of fallback technology\n  techOrder: Tech.defaultTechOrder_,\n  html5: {},\n  // default inactivity timeout\n  inactivityTimeout: 2000,\n  // default playback rates\n  playbackRates: [],\n  // Add playback rate selection by adding rates\n  // 'playbackRates': [0.5, 1, 1.5, 2],\n  liveui: false,\n  // Included control sets\n  children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\n  language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\n  // locales and their language translations\n  languages: {},\n  // Default message to show when a video cannot be played.\n  notSupportedMessage: 'No compatible source was found for this media.',\n  normalizeAutoplay: false,\n  fullscreen: {\n    options: {\n      navigationUI: 'hide'\n    }\n  },\n  breakpoints: {},\n  responsive: false,\n  audioOnlyMode: false,\n  audioPosterMode: false\n};\n[\n/**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method Player#ended\n */\n'ended',\n/**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method Player#seeking\n */\n'seeking',\n/**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method Player#seekable\n */\n'seekable',\n/**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n *   The element has not yet been initialised. All attributes are in\n *   their initial states.\n * - NETWORK_IDLE (numeric value 1)\n *   The element's resource selection algorithm is active and has\n *   selected a resource, but it is not actually using the network at\n *   this time.\n * - NETWORK_LOADING (numeric value 2)\n *   The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n *   The element's resource selection algorithm is active, but it has\n *   not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {number} the current network activity state\n * @method Player#networkState\n */\n'networkState',\n/**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n *   No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n *   Enough of the resource has been obtained that the duration of the\n *   resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n *   Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n *   Data for the immediate current playback position is available, as\n *   well as enough data for the user agent to advance the current\n *   playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n *   The user agent estimates that enough data is available for\n *   playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {number} the current playback rendering state\n * @method Player#readyState\n */\n'readyState'].forEach(function (fn) {\n  Player.prototype[fn] = function () {\n    return this.techGet_(fn);\n  };\n});\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n  Player.prototype[\"handleTech\" + toTitleCase$1(event) + \"_\"] = function () {\n    return this.trigger(event);\n  };\n});\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event Player#loadedmetadata\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event Player#loadeddata\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event Player#timeupdate\n * @type {EventTarget~Event}\n */\n\n/**\n * Fired when the volume changes\n *\n * @event Player#volumechange\n * @type {EventTarget~Event}\n */\n\n/**\n * Reports whether or not a player has a plugin available.\n *\n * This does not report whether or not the plugin has ever been initialized\n * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\n *\n * @method Player#hasPlugin\n * @param  {string}  name\n *         The name of a plugin.\n *\n * @return {boolean}\n *         Whether or not this player has the requested plugin available.\n */\n\n/**\n * Reports whether or not a player is using a plugin by name.\n *\n * For basic plugins, this only reports whether the plugin has _ever_ been\n * initialized on this player.\n *\n * @method Player#usingPlugin\n * @param  {string} name\n *         The name of a plugin.\n *\n * @return {boolean}\n *         Whether or not this player is using the requested plugin.\n */\n\nComponent$1.registerComponent('Player', Player);\n\n/**\n * The base plugin name.\n *\n * @private\n * @constant\n * @type {string}\n */\n\nvar BASE_PLUGIN_NAME = 'plugin';\n/**\n * The key on which a player's active plugins cache is stored.\n *\n * @private\n * @constant\n * @type     {string}\n */\n\nvar PLUGIN_CACHE_KEY = 'activePlugins_';\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type    {Object}\n */\n\nvar pluginStorage = {};\n/**\n * Reports whether or not a plugin has been registered.\n *\n * @private\n * @param   {string} name\n *          The name of a plugin.\n *\n * @return {boolean}\n *          Whether or not the plugin has been registered.\n */\n\nvar pluginExists = function pluginExists(name) {\n  return pluginStorage.hasOwnProperty(name);\n};\n/**\n * Get a single registered plugin by name.\n *\n * @private\n * @param   {string} name\n *          The name of a plugin.\n *\n * @return {Function|undefined}\n *          The plugin (or undefined).\n */\n\n\nvar getPlugin = function getPlugin(name) {\n  return pluginExists(name) ? pluginStorage[name] : undefined;\n};\n/**\n * Marks a plugin as \"active\" on a player.\n *\n * Also, ensures that the player has an object for tracking active plugins.\n *\n * @private\n * @param   {Player} player\n *          A Video.js player instance.\n *\n * @param   {string} name\n *          The name of a plugin.\n */\n\n\nvar markPluginAsActive = function markPluginAsActive(player, name) {\n  player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\n  player[PLUGIN_CACHE_KEY][name] = true;\n};\n/**\n * Triggers a pair of plugin setup events.\n *\n * @private\n * @param  {Player} player\n *         A Video.js player instance.\n *\n * @param  {Plugin~PluginEventHash} hash\n *         A plugin event hash.\n *\n * @param  {boolean} [before]\n *         If true, prefixes the event name with \"before\". In other words,\n *         use this to trigger \"beforepluginsetup\" instead of \"pluginsetup\".\n */\n\n\nvar triggerSetupEvent = function triggerSetupEvent(player, hash, before) {\n  var eventName = (before ? 'before' : '') + 'pluginsetup';\n  player.trigger(eventName, hash);\n  player.trigger(eventName + ':' + hash.name, hash);\n};\n/**\n * Takes a basic plugin function and returns a wrapper function which marks\n * on the player that the plugin has been activated.\n *\n * @private\n * @param   {string} name\n *          The name of the plugin.\n *\n * @param   {Function} plugin\n *          The basic plugin.\n *\n * @return {Function}\n *          A wrapper function for the given plugin.\n */\n\n\nvar createBasicPlugin = function createBasicPlugin(name, plugin) {\n  var basicPluginWrapper = function basicPluginWrapper() {\n    // We trigger the \"beforepluginsetup\" and \"pluginsetup\" events on the player\n    // regardless, but we want the hash to be consistent with the hash provided\n    // for advanced plugins.\n    //\n    // The only potentially counter-intuitive thing here is the `instance` in\n    // the \"pluginsetup\" event is the value returned by the `plugin` function.\n    triggerSetupEvent(this, {\n      name: name,\n      plugin: plugin,\n      instance: null\n    }, true);\n    var instance = plugin.apply(this, arguments);\n    markPluginAsActive(this, name);\n    triggerSetupEvent(this, {\n      name: name,\n      plugin: plugin,\n      instance: instance\n    });\n    return instance;\n  };\n\n  Object.keys(plugin).forEach(function (prop) {\n    basicPluginWrapper[prop] = plugin[prop];\n  });\n  return basicPluginWrapper;\n};\n/**\n * Takes a plugin sub-class and returns a factory function for generating\n * instances of it.\n *\n * This factory function will replace itself with an instance of the requested\n * sub-class of Plugin.\n *\n * @private\n * @param   {string} name\n *          The name of the plugin.\n *\n * @param   {Plugin} PluginSubClass\n *          The advanced plugin.\n *\n * @return {Function}\n */\n\n\nvar createPluginFactory = function createPluginFactory(name, PluginSubClass) {\n  // Add a `name` property to the plugin prototype so that each plugin can\n  // refer to itself by name.\n  PluginSubClass.prototype.name = name;\n  return function () {\n    triggerSetupEvent(this, {\n      name: name,\n      plugin: PluginSubClass,\n      instance: null\n    }, true);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    var instance = _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_9___default()(PluginSubClass, [this].concat(args)); // The plugin is replaced by a function that returns the current instance.\n\n\n    this[name] = function () {\n      return instance;\n    };\n\n    triggerSetupEvent(this, instance.getEventHash());\n    return instance;\n  };\n};\n/**\n * Parent class for all advanced plugins.\n *\n * @mixes   module:evented~EventedMixin\n * @mixes   module:stateful~StatefulMixin\n * @fires   Player#beforepluginsetup\n * @fires   Player#beforepluginsetup:$name\n * @fires   Player#pluginsetup\n * @fires   Player#pluginsetup:$name\n * @listens Player#dispose\n * @throws  {Error}\n *          If attempting to instantiate the base {@link Plugin} class\n *          directly instead of via a sub-class.\n */\n\n\nvar Plugin = /*#__PURE__*/function () {\n  /**\n   * Creates an instance of this class.\n   *\n   * Sub-classes should call `super` to ensure plugins are properly initialized.\n   *\n   * @param {Player} player\n   *        A Video.js player instance.\n   */\n  function Plugin(player) {\n    if (this.constructor === Plugin) {\n      throw new Error('Plugin must be sub-classed; not directly instantiated.');\n    }\n\n    this.player = player;\n\n    if (!this.log) {\n      this.log = this.player.log.createLogger(this.name);\n    } // Make this object evented, but remove the added `trigger` method so we\n    // use the prototype version instead.\n\n\n    evented(this);\n    delete this.trigger;\n    stateful(this, this.constructor.defaultState);\n    markPluginAsActive(player, this.name); // Auto-bind the dispose method so we can use it as a listener and unbind\n    // it later easily.\n\n    this.dispose = this.dispose.bind(this); // If the player is disposed, dispose the plugin.\n\n    player.on('dispose', this.dispose);\n  }\n  /**\n   * Get the version of the plugin that was set on <pluginName>.VERSION\n   */\n\n\n  var _proto = Plugin.prototype;\n\n  _proto.version = function version() {\n    return this.constructor.VERSION;\n  }\n  /**\n   * Each event triggered by plugins includes a hash of additional data with\n   * conventional properties.\n   *\n   * This returns that object or mutates an existing hash.\n   *\n   * @param   {Object} [hash={}]\n   *          An object to be used as event an event hash.\n   *\n   * @return {Plugin~PluginEventHash}\n   *          An event hash object with provided properties mixed-in.\n   */\n  ;\n\n  _proto.getEventHash = function getEventHash(hash) {\n    if (hash === void 0) {\n      hash = {};\n    }\n\n    hash.name = this.name;\n    hash.plugin = this.constructor;\n    hash.instance = this;\n    return hash;\n  }\n  /**\n   * Triggers an event on the plugin object and overrides\n   * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\n   *\n   * @param   {string|Object} event\n   *          An event type or an object with a type property.\n   *\n   * @param   {Object} [hash={}]\n   *          Additional data hash to merge with a\n   *          {@link Plugin~PluginEventHash|PluginEventHash}.\n   *\n   * @return {boolean}\n   *          Whether or not default was prevented.\n   */\n  ;\n\n  _proto.trigger = function trigger$1(event, hash) {\n    if (hash === void 0) {\n      hash = {};\n    }\n\n    return trigger(this.eventBusEl_, event, this.getEventHash(hash));\n  }\n  /**\n   * Handles \"statechanged\" events on the plugin. No-op by default, override by\n   * subclassing.\n   *\n   * @abstract\n   * @param    {Event} e\n   *           An event object provided by a \"statechanged\" event.\n   *\n   * @param    {Object} e.changes\n   *           An object describing changes that occurred with the \"statechanged\"\n   *           event.\n   */\n  ;\n\n  _proto.handleStateChanged = function handleStateChanged(e) {}\n  /**\n   * Disposes a plugin.\n   *\n   * Subclasses can override this if they want, but for the sake of safety,\n   * it's probably best to subscribe the \"dispose\" event.\n   *\n   * @fires Plugin#dispose\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    var name = this.name,\n        player = this.player;\n    /**\n     * Signals that a advanced plugin is about to be disposed.\n     *\n     * @event Plugin#dispose\n     * @type  {EventTarget~Event}\n     */\n\n    this.trigger('dispose');\n    this.off();\n    player.off('dispose', this.dispose); // Eliminate any possible sources of leaking memory by clearing up\n    // references between the player and the plugin instance and nulling out\n    // the plugin's state and replacing methods with a function that throws.\n\n    player[PLUGIN_CACHE_KEY][name] = false;\n    this.player = this.state = null; // Finally, replace the plugin name on the player with a new factory\n    // function, so that the plugin is ready to be set up again.\n\n    player[name] = createPluginFactory(name, pluginStorage[name]);\n  }\n  /**\n   * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\n   *\n   * @param   {string|Function} plugin\n   *          If a string, matches the name of a plugin. If a function, will be\n   *          tested directly.\n   *\n   * @return {boolean}\n   *          Whether or not a plugin is a basic plugin.\n   */\n  ;\n\n  Plugin.isBasic = function isBasic(plugin) {\n    var p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\n    return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\n  }\n  /**\n   * Register a Video.js plugin.\n   *\n   * @param   {string} name\n   *          The name of the plugin to be registered. Must be a string and\n   *          must not match an existing plugin or a method on the `Player`\n   *          prototype.\n   *\n   * @param   {Function} plugin\n   *          A sub-class of `Plugin` or a function for basic plugins.\n   *\n   * @return {Function}\n   *          For advanced plugins, a factory function for that plugin. For\n   *          basic plugins, a wrapper function that initializes the plugin.\n   */\n  ;\n\n  Plugin.registerPlugin = function registerPlugin(name, plugin) {\n    if (typeof name !== 'string') {\n      throw new Error(\"Illegal plugin name, \\\"\" + name + \"\\\", must be a string, was \" + typeof name + \".\");\n    }\n\n    if (pluginExists(name)) {\n      log$1.warn(\"A plugin named \\\"\" + name + \"\\\" already exists. You may want to avoid re-registering plugins!\");\n    } else if (Player.prototype.hasOwnProperty(name)) {\n      throw new Error(\"Illegal plugin name, \\\"\" + name + \"\\\", cannot share a name with an existing player method!\");\n    }\n\n    if (typeof plugin !== 'function') {\n      throw new Error(\"Illegal plugin for \\\"\" + name + \"\\\", must be a function, was \" + typeof plugin + \".\");\n    }\n\n    pluginStorage[name] = plugin; // Add a player prototype method for all sub-classed plugins (but not for\n    // the base Plugin class).\n\n    if (name !== BASE_PLUGIN_NAME) {\n      if (Plugin.isBasic(plugin)) {\n        Player.prototype[name] = createBasicPlugin(name, plugin);\n      } else {\n        Player.prototype[name] = createPluginFactory(name, plugin);\n      }\n    }\n\n    return plugin;\n  }\n  /**\n   * De-register a Video.js plugin.\n   *\n   * @param  {string} name\n   *         The name of the plugin to be de-registered. Must be a string that\n   *         matches an existing plugin.\n   *\n   * @throws {Error}\n   *         If an attempt is made to de-register the base plugin.\n   */\n  ;\n\n  Plugin.deregisterPlugin = function deregisterPlugin(name) {\n    if (name === BASE_PLUGIN_NAME) {\n      throw new Error('Cannot de-register base plugin.');\n    }\n\n    if (pluginExists(name)) {\n      delete pluginStorage[name];\n      delete Player.prototype[name];\n    }\n  }\n  /**\n   * Gets an object containing multiple Video.js plugins.\n   *\n   * @param   {Array} [names]\n   *          If provided, should be an array of plugin names. Defaults to _all_\n   *          plugin names.\n   *\n   * @return {Object|undefined}\n   *          An object containing plugin(s) associated with their name(s) or\n   *          `undefined` if no matching plugins exist).\n   */\n  ;\n\n  Plugin.getPlugins = function getPlugins(names) {\n    if (names === void 0) {\n      names = Object.keys(pluginStorage);\n    }\n\n    var result;\n    names.forEach(function (name) {\n      var plugin = getPlugin(name);\n\n      if (plugin) {\n        result = result || {};\n        result[name] = plugin;\n      }\n    });\n    return result;\n  }\n  /**\n   * Gets a plugin's version, if available\n   *\n   * @param   {string} name\n   *          The name of a plugin.\n   *\n   * @return {string}\n   *          The plugin's version or an empty string.\n   */\n  ;\n\n  Plugin.getPluginVersion = function getPluginVersion(name) {\n    var plugin = getPlugin(name);\n    return plugin && plugin.VERSION || '';\n  };\n\n  return Plugin;\n}();\n/**\n * Gets a plugin by name if it exists.\n *\n * @static\n * @method   getPlugin\n * @memberOf Plugin\n * @param    {string} name\n *           The name of a plugin.\n *\n * @returns  {Function|undefined}\n *           The plugin (or `undefined`).\n */\n\n\nPlugin.getPlugin = getPlugin;\n/**\n * The name of the base plugin class as it is registered.\n *\n * @type {string}\n */\n\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\n/**\n * Documented in player.js\n *\n * @ignore\n */\n\nPlayer.prototype.usingPlugin = function (name) {\n  return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\n};\n/**\n * Documented in player.js\n *\n * @ignore\n */\n\n\nPlayer.prototype.hasPlugin = function (name) {\n  return !!pluginExists(name);\n};\n/**\n * Signals that a plugin is about to be set up on a player.\n *\n * @event    Player#beforepluginsetup\n * @type     {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin is about to be set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event    Player#beforepluginsetup:$name\n * @type     {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player.\n *\n * @event    Player#pluginsetup\n * @type     {Plugin~PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event    Player#pluginsetup:$name\n * @type     {Plugin~PluginEventHash}\n */\n\n/**\n * @typedef  {Object} Plugin~PluginEventHash\n *\n * @property {string} instance\n *           For basic plugins, the return value of the plugin function. For\n *           advanced plugins, the plugin instance on which the event is fired.\n *\n * @property {string} name\n *           The name of the plugin.\n *\n * @property {string} plugin\n *           For basic plugins, the plugin function. For advanced plugins, the\n *           plugin class/constructor.\n */\n\n/**\n * @file extend.js\n * @module extend\n */\nvar hasLogged = false;\n/**\n * Used to subclass an existing class by emulating ES subclassing using the\n * `extends` keyword.\n *\n * @function\n * @deprecated\n * @example\n * var MyComponent = videojs.extend(videojs.getComponent('Component'), {\n *   myCustomMethod: function() {\n *     // Do things in my method.\n *   }\n * });\n *\n * @param    {Function} superClass\n *           The class to inherit from\n *\n * @param    {Object}   [subClassMethods={}]\n *           Methods of the new class\n *\n * @return   {Function}\n *           The new class with subClassMethods that inherited superClass.\n */\n\nvar extend = function extend(superClass, subClassMethods) {\n  if (subClassMethods === void 0) {\n    subClassMethods = {};\n  }\n\n  // Log a warning the first time extend is called to note that it is deprecated\n  // It was previously deprecated in our documentation (guides, specifically),\n  // but was never formally deprecated in code.\n  if (!hasLogged) {\n    log$1.warn('videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0');\n    hasLogged = true;\n  }\n\n  var subClass = function subClass() {\n    superClass.apply(this, arguments);\n  };\n\n  var methods = {};\n\n  if (typeof subClassMethods === 'object') {\n    if (subClassMethods.constructor !== Object.prototype.constructor) {\n      subClass = subClassMethods.constructor;\n    }\n\n    methods = subClassMethods;\n  } else if (typeof subClassMethods === 'function') {\n    subClass = subClassMethods;\n  }\n\n  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_10___default()(subClass, superClass); // this is needed for backward-compatibility and node compatibility.\n\n\n  if (superClass) {\n    subClass.super_ = superClass;\n  } // Extend subObj's prototype with functions and other properties from props\n\n\n  for (var name in methods) {\n    if (methods.hasOwnProperty(name)) {\n      subClass.prototype[name] = methods[name];\n    }\n  }\n\n  return subClass;\n};\n\n/**\n * @file video.js\n * @module videojs\n */\n/**\n * Normalize an `id` value by trimming off a leading `#`\n *\n * @private\n * @param   {string} id\n *          A string, maybe with a leading `#`.\n *\n * @return {string}\n *          The string, without any leading `#`.\n */\n\nvar normalizeId = function normalizeId(id) {\n  return id.indexOf('#') === 0 ? id.slice(1) : id;\n};\n/**\n * The `videojs()` function doubles as the main function for users to create a\n * {@link Player} instance as well as the main library namespace.\n *\n * It can also be used as a getter for a pre-existing {@link Player} instance.\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\n * purpose because it avoids any potential for unintended initialization.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### id\n * string|Element, **required**\n *\n * Video element or video element ID.\n *\n * ##### options\n * Object, optional\n *\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * ##### ready\n * {@link Component~ReadyCallback}, optional\n *\n * A function to be called when the {@link Player} and {@link Tech} are ready.\n *\n * #### Return Value\n *\n * The `videojs()` function returns a {@link Player} instance.\n *\n * @namespace\n *\n * @borrows AudioTrack as AudioTrack\n * @borrows Component.getComponent as getComponent\n * @borrows module:computed-style~computedStyle as computedStyle\n * @borrows module:events.on as on\n * @borrows module:events.one as one\n * @borrows module:events.off as off\n * @borrows module:events.trigger as trigger\n * @borrows EventTarget as EventTarget\n * @borrows module:extend~extend as extend\n * @borrows module:fn.bind as bind\n * @borrows module:format-time.formatTime as formatTime\n * @borrows module:format-time.resetFormatTime as resetFormatTime\n * @borrows module:format-time.setFormatTime as setFormatTime\n * @borrows module:merge-options.mergeOptions as mergeOptions\n * @borrows module:middleware.use as use\n * @borrows Player.players as players\n * @borrows Plugin.registerPlugin as registerPlugin\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\n * @borrows Plugin.getPlugins as getPlugins\n * @borrows Plugin.getPlugin as getPlugin\n * @borrows Plugin.getPluginVersion as getPluginVersion\n * @borrows Tech.getTech as getTech\n * @borrows Tech.registerTech as registerTech\n * @borrows TextTrack as TextTrack\n * @borrows module:time-ranges.createTimeRanges as createTimeRange\n * @borrows module:time-ranges.createTimeRanges as createTimeRanges\n * @borrows module:url.isCrossOrigin as isCrossOrigin\n * @borrows module:url.parseUrl as parseUrl\n * @borrows VideoTrack as VideoTrack\n *\n * @param  {string|Element} id\n *         Video element or video element ID.\n *\n * @param  {Object} [options]\n *         Options object for providing settings.\n *         See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * @param  {Component~ReadyCallback} [ready]\n *         A function to be called when the {@link Player} and {@link Tech} are\n *         ready.\n *\n * @return {Player}\n *         The `videojs()` function returns a {@link Player|Player} instance.\n */\n\n\nfunction videojs(id, options, ready) {\n  var player = videojs.getPlayer(id);\n\n  if (player) {\n    if (options) {\n      log$1.warn(\"Player \\\"\" + id + \"\\\" is already initialised. Options will not be applied.\");\n    }\n\n    if (ready) {\n      player.ready(ready);\n    }\n\n    return player;\n  }\n\n  var el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\n\n  if (!isEl(el)) {\n    throw new TypeError('The element or ID supplied is not valid. (videojs)');\n  } // document.body.contains(el) will only check if el is contained within that one document.\n  // This causes problems for elements in iframes.\n  // Instead, use the element's ownerDocument instead of the global document.\n  // This will make sure that the element is indeed in the dom of that document.\n  // Additionally, check that the document in question has a default view.\n  // If the document is no longer attached to the dom, the defaultView of the document will be null.\n\n\n  if (!el.ownerDocument.defaultView || !el.ownerDocument.body.contains(el)) {\n    log$1.warn('The element supplied is not included in the DOM');\n  }\n\n  options = options || {}; // Store a copy of the el before modification, if it is to be restored in destroy()\n  // If div ingest, store the parent div\n\n  if (options.restoreEl === true) {\n    options.restoreEl = (el.parentNode && el.parentNode.hasAttribute('data-vjs-player') ? el.parentNode : el).cloneNode(true);\n  }\n\n  hooks('beforesetup').forEach(function (hookFunction) {\n    var opts = hookFunction(el, mergeOptions$3(options));\n\n    if (!isObject(opts) || Array.isArray(opts)) {\n      log$1.error('please return an object in beforesetup hooks');\n      return;\n    }\n\n    options = mergeOptions$3(options, opts);\n  }); // We get the current \"Player\" component here in case an integration has\n  // replaced it with a custom player.\n\n  var PlayerComponent = Component$1.getComponent('Player');\n  player = new PlayerComponent(el, options, ready);\n  hooks('setup').forEach(function (hookFunction) {\n    return hookFunction(player);\n  });\n  return player;\n}\n\nvideojs.hooks_ = hooks_;\nvideojs.hooks = hooks;\nvideojs.hook = hook;\nvideojs.hookOnce = hookOnce;\nvideojs.removeHook = removeHook; // Add default styles\n\nif (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n  var style = $('.vjs-styles-defaults');\n\n  if (!style) {\n    style = createStyleElement('vjs-styles-defaults');\n    var head = $('head');\n\n    if (head) {\n      head.insertBefore(style, head.firstChild);\n    }\n\n    setTextContent(style, \"\\n      .video-js {\\n        width: 300px;\\n        height: 150px;\\n      }\\n\\n      .vjs-fluid:not(.vjs-audio-only-mode) {\\n        padding-top: 56.25%\\n      }\\n    \");\n  }\n} // Run Auto-load players\n// You have to wait at least once in case this script is loaded after your\n// video in the DOM (weird behavior only with minified version)\n\n\nautoSetupTimeout(1, videojs);\n/**\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\n *\n * @type {string}\n */\n\nvideojs.VERSION = version$5;\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * @type {Object}\n */\n\nvideojs.options = Player.prototype.options_;\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object}\n *         The created players\n */\n\nvideojs.getPlayers = function () {\n  return Player.players;\n};\n/**\n * Get a single player based on an ID or DOM element.\n *\n * This is useful if you want to check if an element or ID has an associated\n * Video.js player, but not create one if it doesn't.\n *\n * @param   {string|Element} id\n *          An HTML element - `<video>`, `<audio>`, or `<video-js>` -\n *          or a string matching the `id` of such an element.\n *\n * @return {Player|undefined}\n *          A player instance or `undefined` if there is no player instance\n *          matching the argument.\n */\n\n\nvideojs.getPlayer = function (id) {\n  var players = Player.players;\n  var tag;\n\n  if (typeof id === 'string') {\n    var nId = normalizeId(id);\n    var player = players[nId];\n\n    if (player) {\n      return player;\n    }\n\n    tag = $('#' + nId);\n  } else {\n    tag = id;\n  }\n\n  if (isEl(tag)) {\n    var _tag = tag,\n        _player = _tag.player,\n        playerId = _tag.playerId; // Element may have a `player` property referring to an already created\n    // player instance. If so, return that.\n\n    if (_player || players[playerId]) {\n      return _player || players[playerId];\n    }\n  }\n};\n/**\n * Returns an array of all current players.\n *\n * @return {Array}\n *         An array of all players. The array will be in the order that\n *         `Object.keys` provides, which could potentially vary between\n *         JavaScript engines.\n *\n */\n\n\nvideojs.getAllPlayers = function () {\n  return (// Disposed players leave a key with a `null` value, so we need to make sure\n    // we filter those out.\n    Object.keys(Player.players).map(function (k) {\n      return Player.players[k];\n    }).filter(Boolean)\n  );\n};\n\nvideojs.players = Player.players;\nvideojs.getComponent = Component$1.getComponent;\n/**\n * Register a component so it can referred to by name. Used when adding to other\n * components, either through addChild `component.addChild('myComponent')` or through\n * default children options  `{ children: ['myComponent'] }`.\n *\n * > NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {string} name\n *        The class name of the component\n *\n * @param {Component} comp\n *        The component class\n *\n * @return {Component}\n *         The newly registered component\n */\n\nvideojs.registerComponent = function (name, comp) {\n  if (Tech.isTech(comp)) {\n    log$1.warn(\"The \" + name + \" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\");\n  }\n\n  Component$1.registerComponent.call(Component$1, name, comp);\n};\n\nvideojs.getTech = Tech.getTech;\nvideojs.registerTech = Tech.registerTech;\nvideojs.use = use;\n/**\n * An object that can be returned by a middleware to signify\n * that the middleware is being terminated.\n *\n * @type {object}\n * @property {object} middleware.TERMINATOR\n */\n\nObject.defineProperty(videojs, 'middleware', {\n  value: {},\n  writeable: false,\n  enumerable: true\n});\nObject.defineProperty(videojs.middleware, 'TERMINATOR', {\n  value: TERMINATOR,\n  writeable: false,\n  enumerable: true\n});\n/**\n * A reference to the {@link module:browser|browser utility module} as an object.\n *\n * @type {Object}\n * @see  {@link module:browser|browser}\n */\n\nvideojs.browser = browser;\n/**\n * Use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED} instead; only\n * included for backward-compatibility with 4.x.\n *\n * @deprecated Since version 5.0, use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED instead.\n * @type {boolean}\n */\n\nvideojs.TOUCH_ENABLED = TOUCH_ENABLED;\nvideojs.extend = extend;\nvideojs.mergeOptions = mergeOptions$3;\nvideojs.bind = bind;\nvideojs.registerPlugin = Plugin.registerPlugin;\nvideojs.deregisterPlugin = Plugin.deregisterPlugin;\n/**\n * Deprecated method to register a plugin with Video.js\n *\n * @deprecated videojs.plugin() is deprecated; use videojs.registerPlugin() instead\n *\n * @param {string} name\n *        The plugin name\n *\n * @param {Plugin|Function} plugin\n *         The plugin sub-class or function\n */\n\nvideojs.plugin = function (name, plugin) {\n  log$1.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\n  return Plugin.registerPlugin(name, plugin);\n};\n\nvideojs.getPlugins = Plugin.getPlugins;\nvideojs.getPlugin = Plugin.getPlugin;\nvideojs.getPluginVersion = Plugin.getPluginVersion;\n/**\n * Adding languages so that they're available to all players.\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\n *\n * @param {string} code\n *        The language code or dictionary property\n *\n * @param {Object} data\n *        The data values to be translated\n *\n * @return {Object}\n *         The resulting language dictionary object\n */\n\nvideojs.addLanguage = function (code, data) {\n  var _mergeOptions;\n\n  code = ('' + code).toLowerCase();\n  videojs.options.languages = mergeOptions$3(videojs.options.languages, (_mergeOptions = {}, _mergeOptions[code] = data, _mergeOptions));\n  return videojs.options.languages[code];\n};\n/**\n * A reference to the {@link module:log|log utility module} as an object.\n *\n * @type {Function}\n * @see  {@link module:log|log}\n */\n\n\nvideojs.log = log$1;\nvideojs.createLogger = createLogger;\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\nvideojs.formatTime = formatTime;\nvideojs.setFormatTime = setFormatTime;\nvideojs.resetFormatTime = resetFormatTime;\nvideojs.parseUrl = parseUrl;\nvideojs.isCrossOrigin = isCrossOrigin;\nvideojs.EventTarget = EventTarget$2;\nvideojs.on = on;\nvideojs.one = one;\nvideojs.off = off;\nvideojs.trigger = trigger;\n/**\n * A cross-browser XMLHttpRequest wrapper.\n *\n * @function\n * @param    {Object} options\n *           Settings for the request.\n *\n * @return   {XMLHttpRequest|XDomainRequest}\n *           The request object.\n *\n * @see      https://github.com/Raynos/xhr\n */\n\nvideojs.xhr = _videojs_xhr__WEBPACK_IMPORTED_MODULE_7___default.a;\nvideojs.TextTrack = TextTrack;\nvideojs.AudioTrack = AudioTrack;\nvideojs.VideoTrack = VideoTrack;\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(function (k) {\n  videojs[k] = function () {\n    log$1.warn(\"videojs.\" + k + \"() is deprecated; use videojs.dom.\" + k + \"() instead\");\n    return Dom[k].apply(null, arguments);\n  };\n});\nvideojs.computedStyle = computedStyle;\n/**\n * A reference to the {@link module:dom|DOM utility module} as an object.\n *\n * @type {Object}\n * @see  {@link module:dom|dom}\n */\n\nvideojs.dom = Dom;\n/**\n * A reference to the {@link module:url|URL utility module} as an object.\n *\n * @type {Object}\n * @see  {@link module:url|url}\n */\n\nvideojs.url = Url;\nvideojs.defineLazyProperty = defineLazyProperty; // Adding less ambiguous text for fullscreen button.\n// In a major update this could become the default text and key.\n\nvideojs.addLanguage('en', {\n  'Non-Fullscreen': 'Exit Fullscreen'\n});\n\n/*! @name @videojs/http-streaming @version 2.16.3 @license Apache-2.0 */\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\n\nvar resolveUrl = _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n/**\n * Checks whether xhr request was redirected and returns correct url depending\n * on `handleManifestRedirects` option\n *\n * @api private\n *\n * @param  {string} url - an url being requested\n * @param  {XMLHttpRequest} req - xhr request result\n *\n * @return {string}\n */\n\nvar resolveManifestRedirect = function resolveManifestRedirect(handleManifestRedirect, url, req) {\n  // To understand how the responseURL below is set and generated:\n  // - https://fetch.spec.whatwg.org/#concept-response-url\n  // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\n  if (handleManifestRedirect && req && req.responseURL && url !== req.responseURL) {\n    return req.responseURL;\n  }\n\n  return url;\n};\n\nvar logger = function logger(source) {\n  if (videojs.log.debug) {\n    return videojs.log.debug.bind(videojs, 'VHS:', source + \" >\");\n  }\n\n  return function () {};\n};\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\n\nvar TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\n// can be misleading because of precision differences or when the current media has poorly\n// aligned audio and video, which can cause values to be slightly off from what you would\n// expect. This value is what we consider to be safe to use in such comparisons to account\n// for these scenarios.\n\nvar SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\n\nvar filterRanges = function filterRanges(timeRanges, predicate) {\n  var results = [];\n  var i;\n\n  if (timeRanges && timeRanges.length) {\n    // Search for ranges that match the predicate\n    for (i = 0; i < timeRanges.length; i++) {\n      if (predicate(timeRanges.start(i), timeRanges.end(i))) {\n        results.push([timeRanges.start(i), timeRanges.end(i)]);\n      }\n    }\n  }\n\n  return videojs.createTimeRanges(results);\n};\n/**\n * Attempts to find the buffered TimeRange that contains the specified\n * time.\n *\n * @param {TimeRanges} buffered - the TimeRanges object to query\n * @param {number} time  - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object\n */\n\n\nvar findRange = function findRange(buffered, time) {\n  return filterRanges(buffered, function (start, end) {\n    return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\n  });\n};\n/**\n * Returns the TimeRanges that begin later than the specified time.\n *\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object.\n */\n\n\nvar findNextRange = function findNextRange(timeRanges, time) {\n  return filterRanges(timeRanges, function (start) {\n    return start - TIME_FUDGE_FACTOR >= time;\n  });\n};\n/**\n * Returns gaps within a list of TimeRanges\n *\n * @param {TimeRanges} buffered - the TimeRanges object\n * @return {TimeRanges} a TimeRanges object of gaps\n */\n\n\nvar findGaps = function findGaps(buffered) {\n  if (buffered.length < 2) {\n    return videojs.createTimeRanges();\n  }\n\n  var ranges = [];\n\n  for (var i = 1; i < buffered.length; i++) {\n    var start = buffered.end(i - 1);\n    var end = buffered.start(i);\n    ranges.push([start, end]);\n  }\n\n  return videojs.createTimeRanges(ranges);\n};\n/**\n * Calculate the intersection of two TimeRanges\n *\n * @param {TimeRanges} bufferA\n * @param {TimeRanges} bufferB\n * @return {TimeRanges} The interesection of `bufferA` with `bufferB`\n */\n\n\nvar bufferIntersection = function bufferIntersection(bufferA, bufferB) {\n  var start = null;\n  var end = null;\n  var arity = 0;\n  var extents = [];\n  var ranges = [];\n\n  if (!bufferA || !bufferA.length || !bufferB || !bufferB.length) {\n    return videojs.createTimeRange();\n  } // Handle the case where we have both buffers and create an\n  // intersection of the two\n\n\n  var count = bufferA.length; // A) Gather up all start and end times\n\n  while (count--) {\n    extents.push({\n      time: bufferA.start(count),\n      type: 'start'\n    });\n    extents.push({\n      time: bufferA.end(count),\n      type: 'end'\n    });\n  }\n\n  count = bufferB.length;\n\n  while (count--) {\n    extents.push({\n      time: bufferB.start(count),\n      type: 'start'\n    });\n    extents.push({\n      time: bufferB.end(count),\n      type: 'end'\n    });\n  } // B) Sort them by time\n\n\n  extents.sort(function (a, b) {\n    return a.time - b.time;\n  }); // C) Go along one by one incrementing arity for start and decrementing\n  //    arity for ends\n\n  for (count = 0; count < extents.length; count++) {\n    if (extents[count].type === 'start') {\n      arity++; // D) If arity is ever incremented to 2 we are entering an\n      //    overlapping range\n\n      if (arity === 2) {\n        start = extents[count].time;\n      }\n    } else if (extents[count].type === 'end') {\n      arity--; // E) If arity is ever decremented to 1 we leaving an\n      //    overlapping range\n\n      if (arity === 1) {\n        end = extents[count].time;\n      }\n    } // F) Record overlapping ranges\n\n\n    if (start !== null && end !== null) {\n      ranges.push([start, end]);\n      start = null;\n      end = null;\n    }\n  }\n\n  return videojs.createTimeRanges(ranges);\n};\n/**\n * Gets a human readable string for a TimeRange\n *\n * @param {TimeRange} range\n * @return {string} a human readable string\n */\n\n\nvar printableRange = function printableRange(range) {\n  var strArr = [];\n\n  if (!range || !range.length) {\n    return '';\n  }\n\n  for (var i = 0; i < range.length; i++) {\n    strArr.push(range.start(i) + ' => ' + range.end(i));\n  }\n\n  return strArr.join(', ');\n};\n/**\n * Calculates the amount of time left in seconds until the player hits the end of the\n * buffer and causes a rebuffer\n *\n * @param {TimeRange} buffered\n *        The state of the buffer\n * @param {Numnber} currentTime\n *        The current time of the player\n * @param {number} playbackRate\n *        The current playback rate of the player. Defaults to 1.\n * @return {number}\n *         Time until the player has to start rebuffering in seconds.\n * @function timeUntilRebuffer\n */\n\n\nvar timeUntilRebuffer = function timeUntilRebuffer(buffered, currentTime, playbackRate) {\n  if (playbackRate === void 0) {\n    playbackRate = 1;\n  }\n\n  var bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\n  return (bufferedEnd - currentTime) / playbackRate;\n};\n/**\n * Converts a TimeRanges object into an array representation\n *\n * @param {TimeRanges} timeRanges\n * @return {Array}\n */\n\n\nvar timeRangesToArray = function timeRangesToArray(timeRanges) {\n  var timeRangesList = [];\n\n  for (var i = 0; i < timeRanges.length; i++) {\n    timeRangesList.push({\n      start: timeRanges.start(i),\n      end: timeRanges.end(i)\n    });\n  }\n\n  return timeRangesList;\n};\n/**\n * Determines if two time range objects are different.\n *\n * @param {TimeRange} a\n *        the first time range object to check\n *\n * @param {TimeRange} b\n *        the second time range object to check\n *\n * @return {Boolean}\n *         Whether the time range objects differ\n */\n\n\nvar isRangeDifferent = function isRangeDifferent(a, b) {\n  // same object\n  if (a === b) {\n    return false;\n  } // one or the other is undefined\n\n\n  if (!a && b || !b && a) {\n    return true;\n  } // length is different\n\n\n  if (a.length !== b.length) {\n    return true;\n  } // see if any start/end pair is different\n\n\n  for (var i = 0; i < a.length; i++) {\n    if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\n      return true;\n    }\n  } // if the length and every pair is the same\n  // this is the same time range\n\n\n  return false;\n};\n\nvar lastBufferedEnd = function lastBufferedEnd(a) {\n  if (!a || !a.length || !a.end) {\n    return;\n  }\n\n  return a.end(a.length - 1);\n};\n/**\n * A utility function to add up the amount of time in a timeRange\n * after a specified startTime.\n * ie:[[0, 10], [20, 40], [50, 60]] with a startTime 0\n *     would return 40 as there are 40s seconds after 0 in the timeRange\n *\n * @param {TimeRange} range\n *        The range to check against\n * @param {number} startTime\n *        The time in the time range that you should start counting from\n *\n * @return {number}\n *          The number of seconds in the buffer passed the specified time.\n */\n\n\nvar timeAheadOf = function timeAheadOf(range, startTime) {\n  var time = 0;\n\n  if (!range || !range.length) {\n    return time;\n  }\n\n  for (var i = 0; i < range.length; i++) {\n    var start = range.start(i);\n    var end = range.end(i); // startTime is after this range entirely\n\n    if (startTime > end) {\n      continue;\n    } // startTime is within this range\n\n\n    if (startTime > start && startTime <= end) {\n      time += end - startTime;\n      continue;\n    } // startTime is before this range.\n\n\n    time += end - start;\n  }\n\n  return time;\n};\n/**\n * @file playlist.js\n *\n * Playlist related utilities.\n */\n\n\nvar createTimeRange = videojs.createTimeRange;\n/**\n * Get the duration of a segment, with special cases for\n * llhls segments that do not have a duration yet.\n *\n * @param {Object} playlist\n *        the playlist that the segment belongs to.\n * @param {Object} segment\n *        the segment to get a duration for.\n *\n * @return {number}\n *          the segment duration\n */\n\nvar segmentDurationWithParts = function segmentDurationWithParts(playlist, segment) {\n  // if this isn't a preload segment\n  // then we will have a segment duration that is accurate.\n  if (!segment.preload) {\n    return segment.duration;\n  } // otherwise we have to add up parts and preload hints\n  // to get an up to date duration.\n\n\n  var result = 0;\n  (segment.parts || []).forEach(function (p) {\n    result += p.duration;\n  }); // for preload hints we have to use partTargetDuration\n  // as they won't even have a duration yet.\n\n  (segment.preloadHints || []).forEach(function (p) {\n    if (p.type === 'PART') {\n      result += playlist.partTargetDuration;\n    }\n  });\n  return result;\n};\n/**\n * A function to get a combined list of parts and segments with durations\n * and indexes.\n *\n * @param {Playlist} playlist the playlist to get the list for.\n *\n * @return {Array} The part/segment list.\n */\n\n\nvar getPartsAndSegments = function getPartsAndSegments(playlist) {\n  return (playlist.segments || []).reduce(function (acc, segment, si) {\n    if (segment.parts) {\n      segment.parts.forEach(function (part, pi) {\n        acc.push({\n          duration: part.duration,\n          segmentIndex: si,\n          partIndex: pi,\n          part: part,\n          segment: segment\n        });\n      });\n    } else {\n      acc.push({\n        duration: segment.duration,\n        segmentIndex: si,\n        partIndex: null,\n        segment: segment,\n        part: null\n      });\n    }\n\n    return acc;\n  }, []);\n};\n\nvar getLastParts = function getLastParts(media) {\n  var lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n  return lastSegment && lastSegment.parts || [];\n};\n\nvar getKnownPartCount = function getKnownPartCount(_ref) {\n  var preloadSegment = _ref.preloadSegment;\n\n  if (!preloadSegment) {\n    return;\n  }\n\n  var parts = preloadSegment.parts,\n      preloadHints = preloadSegment.preloadHints;\n  var partCount = (preloadHints || []).reduce(function (count, hint) {\n    return count + (hint.type === 'PART' ? 1 : 0);\n  }, 0);\n  partCount += parts && parts.length ? parts.length : 0;\n  return partCount;\n};\n/**\n * Get the number of seconds to delay from the end of a\n * live playlist.\n *\n * @param {Playlist} master the master playlist\n * @param {Playlist} media the media playlist\n * @return {number} the hold back in seconds.\n */\n\n\nvar liveEdgeDelay = function liveEdgeDelay(master, media) {\n  if (media.endList) {\n    return 0;\n  } // dash suggestedPresentationDelay trumps everything\n\n\n  if (master && master.suggestedPresentationDelay) {\n    return master.suggestedPresentationDelay;\n  }\n\n  var hasParts = getLastParts(media).length > 0; // look for \"part\" delays from ll-hls first\n\n  if (hasParts && media.serverControl && media.serverControl.partHoldBack) {\n    return media.serverControl.partHoldBack;\n  } else if (hasParts && media.partTargetDuration) {\n    return media.partTargetDuration * 3; // finally look for full segment delays\n  } else if (media.serverControl && media.serverControl.holdBack) {\n    return media.serverControl.holdBack;\n  } else if (media.targetDuration) {\n    return media.targetDuration * 3;\n  }\n\n  return 0;\n};\n/**\n * walk backward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {Number} endSequence the mediaSequence to stop walking on\n */\n\n\nvar backwardDuration = function backwardDuration(playlist, endSequence) {\n  var result = 0;\n  var i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n  // the interval, use it\n\n  var segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\n  // information that is earlier than endSequence\n\n  if (segment) {\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: segment.start,\n        precise: true\n      };\n    }\n\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: segment.end - segment.duration,\n        precise: true\n      };\n    }\n  }\n\n  while (i--) {\n    segment = playlist.segments[i];\n\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: result + segment.end,\n        precise: true\n      };\n    }\n\n    result += segmentDurationWithParts(playlist, segment);\n\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: result + segment.start,\n        precise: true\n      };\n    }\n  }\n\n  return {\n    result: result,\n    precise: false\n  };\n};\n/**\n * walk forward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {number} endSequence the mediaSequence to stop walking on\n */\n\n\nvar forwardDuration = function forwardDuration(playlist, endSequence) {\n  var result = 0;\n  var segment;\n  var i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\n  // information\n\n  for (; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i];\n\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: segment.start - result,\n        precise: true\n      };\n    }\n\n    result += segmentDurationWithParts(playlist, segment);\n\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: segment.end - result,\n        precise: true\n      };\n    }\n  } // indicate we didn't find a useful duration estimate\n\n\n  return {\n    result: -1,\n    precise: false\n  };\n};\n/**\n  * Calculate the media duration from the segments associated with a\n  * playlist. The duration of a subinterval of the available segments\n  * may be calculated by specifying an end index.\n  *\n  * @param {Object} playlist a media playlist object\n  * @param {number=} endSequence an exclusive upper boundary\n  * for the playlist.  Defaults to playlist length.\n  * @param {number} expired the amount of time that has dropped\n  * off the front of the playlist in a live scenario\n  * @return {number} the duration between the first available segment\n  * and end index.\n  */\n\n\nvar intervalDuration = function intervalDuration(playlist, endSequence, expired) {\n  if (typeof endSequence === 'undefined') {\n    endSequence = playlist.mediaSequence + playlist.segments.length;\n  }\n\n  if (endSequence < playlist.mediaSequence) {\n    return 0;\n  } // do a backward walk to estimate the duration\n\n\n  var backward = backwardDuration(playlist, endSequence);\n\n  if (backward.precise) {\n    // if we were able to base our duration estimate on timing\n    // information provided directly from the Media Source, return\n    // it\n    return backward.result;\n  } // walk forward to see if a precise duration estimate can be made\n  // that way\n\n\n  var forward = forwardDuration(playlist, endSequence);\n\n  if (forward.precise) {\n    // we found a segment that has been buffered and so it's\n    // position is known precisely\n    return forward.result;\n  } // return the less-precise, playlist-based duration estimate\n\n\n  return backward.result + expired;\n};\n/**\n  * Calculates the duration of a playlist. If a start and end index\n  * are specified, the duration will be for the subset of the media\n  * timeline between those two indices. The total duration for live\n  * playlists is always Infinity.\n  *\n  * @param {Object} playlist a media playlist object\n  * @param {number=} endSequence an exclusive upper\n  * boundary for the playlist. Defaults to the playlist media\n  * sequence number plus its length.\n  * @param {number=} expired the amount of time that has\n  * dropped off the front of the playlist in a live scenario\n  * @return {number} the duration between the start index and end\n  * index.\n  */\n\n\nvar duration = function duration(playlist, endSequence, expired) {\n  if (!playlist) {\n    return 0;\n  }\n\n  if (typeof expired !== 'number') {\n    expired = 0;\n  } // if a slice of the total duration is not requested, use\n  // playlist-level duration indicators when they're present\n\n\n  if (typeof endSequence === 'undefined') {\n    // if present, use the duration specified in the playlist\n    if (playlist.totalDuration) {\n      return playlist.totalDuration;\n    } // duration should be Infinity for live playlists\n\n\n    if (!playlist.endList) {\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Infinity;\n    }\n  } // calculate the total duration based on the segment durations\n\n\n  return intervalDuration(playlist, endSequence, expired);\n};\n/**\n  * Calculate the time between two indexes in the current playlist\n  * neight the start- nor the end-index need to be within the current\n  * playlist in which case, the targetDuration of the playlist is used\n  * to approximate the durations of the segments\n  *\n  * @param {Array} options.durationList list to iterate over for durations.\n  * @param {number} options.defaultDuration duration to use for elements before or after the durationList\n  * @param {number} options.startIndex partsAndSegments index to start\n  * @param {number} options.endIndex partsAndSegments index to end.\n  * @return {number} the number of seconds between startIndex and endIndex\n  */\n\n\nvar sumDurations = function sumDurations(_ref2) {\n  var defaultDuration = _ref2.defaultDuration,\n      durationList = _ref2.durationList,\n      startIndex = _ref2.startIndex,\n      endIndex = _ref2.endIndex;\n  var durations = 0;\n\n  if (startIndex > endIndex) {\n    var _ref3 = [endIndex, startIndex];\n    startIndex = _ref3[0];\n    endIndex = _ref3[1];\n  }\n\n  if (startIndex < 0) {\n    for (var i = startIndex; i < Math.min(0, endIndex); i++) {\n      durations += defaultDuration;\n    }\n\n    startIndex = 0;\n  }\n\n  for (var _i = startIndex; _i < endIndex; _i++) {\n    durations += durationList[_i].duration;\n  }\n\n  return durations;\n};\n/**\n * Calculates the playlist end time\n *\n * @param {Object} playlist a media playlist object\n * @param {number=} expired the amount of time that has\n *                  dropped off the front of the playlist in a live scenario\n * @param {boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\n *                        playlist end calculation should consider the safe live end\n *                        (truncate the playlist end by three segments). This is normally\n *                        used for calculating the end of the playlist's seekable range.\n *                        This takes into account the value of liveEdgePadding.\n *                        Setting liveEdgePadding to 0 is equivalent to setting this to false.\n * @param {number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\n *                 If this is provided, it is used in the safe live end calculation.\n *                 Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\n *                 Corresponds to suggestedPresentationDelay in DASH manifests.\n * @return {number} the end time of playlist\n * @function playlistEnd\n */\n\n\nvar playlistEnd = function playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding) {\n  if (!playlist || !playlist.segments) {\n    return null;\n  }\n\n  if (playlist.endList) {\n    return duration(playlist);\n  }\n\n  if (expired === null) {\n    return null;\n  }\n\n  expired = expired || 0;\n  var lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);\n\n  if (useSafeLiveEnd) {\n    liveEdgePadding = typeof liveEdgePadding === 'number' ? liveEdgePadding : liveEdgeDelay(null, playlist);\n    lastSegmentEndTime -= liveEdgePadding;\n  } // don't return a time less than zero\n\n\n  return Math.max(0, lastSegmentEndTime);\n};\n/**\n  * Calculates the interval of time that is currently seekable in a\n  * playlist. The returned time ranges are relative to the earliest\n  * moment in the specified playlist that is still available. A full\n  * seekable implementation for live streams would need to offset\n  * these values by the duration of content that has expired from the\n  * stream.\n  *\n  * @param {Object} playlist a media playlist object\n  * dropped off the front of the playlist in a live scenario\n  * @param {number=} expired the amount of time that has\n  * dropped off the front of the playlist in a live scenario\n  * @param {number} liveEdgePadding how far from the end of the playlist we should be in seconds.\n  *        Corresponds to suggestedPresentationDelay in DASH manifests.\n  * @return {TimeRanges} the periods of time that are valid targets\n  * for seeking\n  */\n\n\nvar seekable = function seekable(playlist, expired, liveEdgePadding) {\n  var useSafeLiveEnd = true;\n  var seekableStart = expired || 0;\n  var seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\n\n  if (seekableEnd === null) {\n    return createTimeRange();\n  }\n\n  return createTimeRange(seekableStart, seekableEnd);\n};\n/**\n * Determine the index and estimated starting time of the segment that\n * contains a specified playback position in a media playlist.\n *\n * @param {Object} options.playlist the media playlist to query\n * @param {number} options.currentTime The number of seconds since the earliest\n * possible position to determine the containing segment for\n * @param {number} options.startTime the time when the segment/part starts\n * @param {number} options.startingSegmentIndex the segment index to start looking at.\n * @param {number?} [options.startingPartIndex] the part index to look at within the segment.\n *\n * @return {Object} an object with partIndex, segmentIndex, and startTime.\n */\n\n\nvar getMediaInfoForTime = function getMediaInfoForTime(_ref4) {\n  var playlist = _ref4.playlist,\n      currentTime = _ref4.currentTime,\n      startingSegmentIndex = _ref4.startingSegmentIndex,\n      startingPartIndex = _ref4.startingPartIndex,\n      startTime = _ref4.startTime,\n      experimentalExactManifestTimings = _ref4.experimentalExactManifestTimings;\n  var time = currentTime - startTime;\n  var partsAndSegments = getPartsAndSegments(playlist);\n  var startIndex = 0;\n\n  for (var i = 0; i < partsAndSegments.length; i++) {\n    var partAndSegment = partsAndSegments[i];\n\n    if (startingSegmentIndex !== partAndSegment.segmentIndex) {\n      continue;\n    } // skip this if part index does not match.\n\n\n    if (typeof startingPartIndex === 'number' && typeof partAndSegment.partIndex === 'number' && startingPartIndex !== partAndSegment.partIndex) {\n      continue;\n    }\n\n    startIndex = i;\n    break;\n  }\n\n  if (time < 0) {\n    // Walk backward from startIndex in the playlist, adding durations\n    // until we find a segment that contains `time` and return it\n    if (startIndex > 0) {\n      for (var _i2 = startIndex - 1; _i2 >= 0; _i2--) {\n        var _partAndSegment = partsAndSegments[_i2];\n        time += _partAndSegment.duration;\n\n        if (experimentalExactManifestTimings) {\n          if (time < 0) {\n            continue;\n          }\n        } else if (time + TIME_FUDGE_FACTOR <= 0) {\n          continue;\n        }\n\n        return {\n          partIndex: _partAndSegment.partIndex,\n          segmentIndex: _partAndSegment.segmentIndex,\n          startTime: startTime - sumDurations({\n            defaultDuration: playlist.targetDuration,\n            durationList: partsAndSegments,\n            startIndex: startIndex,\n            endIndex: _i2\n          })\n        };\n      }\n    } // We were unable to find a good segment within the playlist\n    // so select the first segment\n\n\n    return {\n      partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n      segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n      startTime: currentTime\n    };\n  } // When startIndex is negative, we first walk forward to first segment\n  // adding target durations. If we \"run out of time\" before getting to\n  // the first segment, return the first segment\n\n\n  if (startIndex < 0) {\n    for (var _i3 = startIndex; _i3 < 0; _i3++) {\n      time -= playlist.targetDuration;\n\n      if (time < 0) {\n        return {\n          partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n          segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n          startTime: currentTime\n        };\n      }\n    }\n\n    startIndex = 0;\n  } // Walk forward from startIndex in the playlist, subtracting durations\n  // until we find a segment that contains `time` and return it\n\n\n  for (var _i4 = startIndex; _i4 < partsAndSegments.length; _i4++) {\n    var _partAndSegment2 = partsAndSegments[_i4];\n    time -= _partAndSegment2.duration;\n\n    if (experimentalExactManifestTimings) {\n      if (time > 0) {\n        continue;\n      }\n    } else if (time - TIME_FUDGE_FACTOR >= 0) {\n      continue;\n    }\n\n    return {\n      partIndex: _partAndSegment2.partIndex,\n      segmentIndex: _partAndSegment2.segmentIndex,\n      startTime: startTime + sumDurations({\n        defaultDuration: playlist.targetDuration,\n        durationList: partsAndSegments,\n        startIndex: startIndex,\n        endIndex: _i4\n      })\n    };\n  } // We are out of possible candidates so load the last one...\n\n\n  return {\n    segmentIndex: partsAndSegments[partsAndSegments.length - 1].segmentIndex,\n    partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,\n    startTime: currentTime\n  };\n};\n/**\n * Check whether the playlist is blacklisted or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is blacklisted or not\n * @function isBlacklisted\n */\n\n\nvar isBlacklisted = function isBlacklisted(playlist) {\n  return playlist.excludeUntil && playlist.excludeUntil > Date.now();\n};\n/**\n * Check whether the playlist is compatible with current playback configuration or has\n * been blacklisted permanently for being incompatible.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is incompatible or not\n * @function isIncompatible\n */\n\n\nvar isIncompatible = function isIncompatible(playlist) {\n  return playlist.excludeUntil && playlist.excludeUntil === Infinity;\n};\n/**\n * Check whether the playlist is enabled or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is enabled or not\n * @function isEnabled\n */\n\n\nvar isEnabled = function isEnabled(playlist) {\n  var blacklisted = isBlacklisted(playlist);\n  return !playlist.disabled && !blacklisted;\n};\n/**\n * Check whether the playlist has been manually disabled through the representations api.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is disabled manually or not\n * @function isDisabled\n */\n\n\nvar isDisabled = function isDisabled(playlist) {\n  return playlist.disabled;\n};\n/**\n * Returns whether the current playlist is an AES encrypted HLS stream\n *\n * @return {boolean} true if it's an AES encrypted HLS stream\n */\n\n\nvar isAes = function isAes(media) {\n  for (var i = 0; i < media.segments.length; i++) {\n    if (media.segments[i].key) {\n      return true;\n    }\n  }\n\n  return false;\n};\n/**\n * Checks if the playlist has a value for the specified attribute\n *\n * @param {string} attr\n *        Attribute to check for\n * @param {Object} playlist\n *        The media playlist object\n * @return {boolean}\n *         Whether the playlist contains a value for the attribute or not\n * @function hasAttribute\n */\n\n\nvar hasAttribute = function hasAttribute(attr, playlist) {\n  return playlist.attributes && playlist.attributes[attr];\n};\n/**\n * Estimates the time required to complete a segment download from the specified playlist\n *\n * @param {number} segmentDuration\n *        Duration of requested segment\n * @param {number} bandwidth\n *        Current measured bandwidth of the player\n * @param {Object} playlist\n *        The media playlist object\n * @param {number=} bytesReceived\n *        Number of bytes already received for the request. Defaults to 0\n * @return {number|NaN}\n *         The estimated time to request the segment. NaN if bandwidth information for\n *         the given playlist is unavailable\n * @function estimateSegmentRequestTime\n */\n\n\nvar estimateSegmentRequestTime = function estimateSegmentRequestTime(segmentDuration, bandwidth, playlist, bytesReceived) {\n  if (bytesReceived === void 0) {\n    bytesReceived = 0;\n  }\n\n  if (!hasAttribute('BANDWIDTH', playlist)) {\n    return NaN;\n  }\n\n  var size = segmentDuration * playlist.attributes.BANDWIDTH;\n  return (size - bytesReceived * 8) / bandwidth;\n};\n/*\n * Returns whether the current playlist is the lowest rendition\n *\n * @return {Boolean} true if on lowest rendition\n */\n\n\nvar isLowestEnabledRendition = function isLowestEnabledRendition(master, media) {\n  if (master.playlists.length === 1) {\n    return true;\n  }\n\n  var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n  return master.playlists.filter(function (playlist) {\n    if (!isEnabled(playlist)) {\n      return false;\n    }\n\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n  }).length === 0;\n};\n\nvar playlistMatch = function playlistMatch(a, b) {\n  // both playlits are null\n  // or only one playlist is non-null\n  // no match\n  if (!a && !b || !a && b || a && !b) {\n    return false;\n  } // playlist objects are the same, match\n\n\n  if (a === b) {\n    return true;\n  } // first try to use id as it should be the most\n  // accurate\n\n\n  if (a.id && b.id && a.id === b.id) {\n    return true;\n  } // next try to use reslovedUri as it should be the\n  // second most accurate.\n\n\n  if (a.resolvedUri && b.resolvedUri && a.resolvedUri === b.resolvedUri) {\n    return true;\n  } // finally try to use uri as it should be accurate\n  // but might miss a few cases for relative uris\n\n\n  if (a.uri && b.uri && a.uri === b.uri) {\n    return true;\n  }\n\n  return false;\n};\n\nvar someAudioVariant = function someAudioVariant(master, callback) {\n  var AUDIO = master && master.mediaGroups && master.mediaGroups.AUDIO || {};\n  var found = false;\n\n  for (var groupName in AUDIO) {\n    for (var label in AUDIO[groupName]) {\n      found = callback(AUDIO[groupName][label]);\n\n      if (found) {\n        break;\n      }\n    }\n\n    if (found) {\n      break;\n    }\n  }\n\n  return !!found;\n};\n\nvar isAudioOnly = function isAudioOnly(master) {\n  // we are audio only if we have no main playlists but do\n  // have media group playlists.\n  if (!master || !master.playlists || !master.playlists.length) {\n    // without audio variants or playlists this\n    // is not an audio only master.\n    var found = someAudioVariant(master, function (variant) {\n      return variant.playlists && variant.playlists.length || variant.uri;\n    });\n    return found;\n  } // if every playlist has only an audio codec it is audio only\n\n\n  var _loop = function _loop(i) {\n    var playlist = master.playlists[i];\n    var CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n    if (CODECS && CODECS.split(',').every(function (c) {\n      return Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"isAudioCodec\"])(c);\n    })) {\n      return \"continue\";\n    } // playlist is in an audio group it is audio only\n\n\n    var found = someAudioVariant(master, function (variant) {\n      return playlistMatch(playlist, variant);\n    });\n\n    if (found) {\n      return \"continue\";\n    } // if we make it here this playlist isn't audio and we\n    // are not audio only\n\n\n    return {\n      v: false\n    };\n  };\n\n  for (var i = 0; i < master.playlists.length; i++) {\n    var _ret = _loop(i);\n\n    if (_ret === \"continue\") continue;\n    if (typeof _ret === \"object\") return _ret.v;\n  } // if we make it past every playlist without returning, then\n  // this is an audio only playlist.\n\n\n  return true;\n}; // exports\n\n\nvar Playlist = {\n  liveEdgeDelay: liveEdgeDelay,\n  duration: duration,\n  seekable: seekable,\n  getMediaInfoForTime: getMediaInfoForTime,\n  isEnabled: isEnabled,\n  isDisabled: isDisabled,\n  isBlacklisted: isBlacklisted,\n  isIncompatible: isIncompatible,\n  playlistEnd: playlistEnd,\n  isAes: isAes,\n  hasAttribute: hasAttribute,\n  estimateSegmentRequestTime: estimateSegmentRequestTime,\n  isLowestEnabledRendition: isLowestEnabledRendition,\n  isAudioOnly: isAudioOnly,\n  playlistMatch: playlistMatch,\n  segmentDurationWithParts: segmentDurationWithParts\n};\nvar log = videojs.log;\n\nvar createPlaylistID = function createPlaylistID(index, uri) {\n  return index + \"-\" + uri;\n}; // default function for creating a group id\n\n\nvar groupID = function groupID(type, group, label) {\n  return \"placeholder-uri-\" + type + \"-\" + group + \"-\" + label;\n};\n/**\n * Parses a given m3u8 playlist\n *\n * @param {Function} [onwarn]\n *        a function to call when the parser triggers a warning event.\n * @param {Function} [oninfo]\n *        a function to call when the parser triggers an info event.\n * @param {string} manifestString\n *        The downloaded manifest string\n * @param {Object[]} [customTagParsers]\n *        An array of custom tag parsers for the m3u8-parser instance\n * @param {Object[]} [customTagMappers]\n *        An array of custom tag mappers for the m3u8-parser instance\n * @param {boolean} [experimentalLLHLS=false]\n *        Whether to keep ll-hls features in the manifest after parsing.\n * @return {Object}\n *         The manifest object\n */\n\n\nvar parseManifest = function parseManifest(_ref) {\n  var onwarn = _ref.onwarn,\n      oninfo = _ref.oninfo,\n      manifestString = _ref.manifestString,\n      _ref$customTagParsers = _ref.customTagParsers,\n      customTagParsers = _ref$customTagParsers === void 0 ? [] : _ref$customTagParsers,\n      _ref$customTagMappers = _ref.customTagMappers,\n      customTagMappers = _ref$customTagMappers === void 0 ? [] : _ref$customTagMappers,\n      experimentalLLHLS = _ref.experimentalLLHLS;\n  var parser = new m3u8_parser__WEBPACK_IMPORTED_MODULE_12__[\"Parser\"]();\n\n  if (onwarn) {\n    parser.on('warn', onwarn);\n  }\n\n  if (oninfo) {\n    parser.on('info', oninfo);\n  }\n\n  customTagParsers.forEach(function (customParser) {\n    return parser.addParser(customParser);\n  });\n  customTagMappers.forEach(function (mapper) {\n    return parser.addTagMapper(mapper);\n  });\n  parser.push(manifestString);\n  parser.end();\n  var manifest = parser.manifest; // remove llhls features from the parsed manifest\n  // if we don't want llhls support.\n\n  if (!experimentalLLHLS) {\n    ['preloadSegment', 'skip', 'serverControl', 'renditionReports', 'partInf', 'partTargetDuration'].forEach(function (k) {\n      if (manifest.hasOwnProperty(k)) {\n        delete manifest[k];\n      }\n    });\n\n    if (manifest.segments) {\n      manifest.segments.forEach(function (segment) {\n        ['parts', 'preloadHints'].forEach(function (k) {\n          if (segment.hasOwnProperty(k)) {\n            delete segment[k];\n          }\n        });\n      });\n    }\n  }\n\n  if (!manifest.targetDuration) {\n    var targetDuration = 10;\n\n    if (manifest.segments && manifest.segments.length) {\n      targetDuration = manifest.segments.reduce(function (acc, s) {\n        return Math.max(acc, s.duration);\n      }, 0);\n    }\n\n    if (onwarn) {\n      onwarn(\"manifest has no targetDuration defaulting to \" + targetDuration);\n    }\n\n    manifest.targetDuration = targetDuration;\n  }\n\n  var parts = getLastParts(manifest);\n\n  if (parts.length && !manifest.partTargetDuration) {\n    var partTargetDuration = parts.reduce(function (acc, p) {\n      return Math.max(acc, p.duration);\n    }, 0);\n\n    if (onwarn) {\n      onwarn(\"manifest has no partTargetDuration defaulting to \" + partTargetDuration);\n      log.error('LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.');\n    }\n\n    manifest.partTargetDuration = partTargetDuration;\n  }\n\n  return manifest;\n};\n/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n *        The parsed master manifest object\n * @param {Function} callback\n *        Callback to call for each media group\n */\n\n\nvar forEachMediaGroup = function forEachMediaGroup(master, callback) {\n  if (!master.mediaGroups) {\n    return;\n  }\n\n  ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {\n    if (!master.mediaGroups[mediaType]) {\n      return;\n    }\n\n    for (var groupKey in master.mediaGroups[mediaType]) {\n      for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n        var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n        callback(mediaProperties, mediaType, groupKey, labelKey);\n      }\n    }\n  });\n};\n/**\n * Adds properties and attributes to the playlist to keep consistent functionality for\n * playlists throughout VHS.\n *\n * @param {Object} config\n *        Arguments object\n * @param {Object} config.playlist\n *        The media playlist\n * @param {string} [config.uri]\n *        The uri to the media playlist (if media playlist is not from within a master\n *        playlist)\n * @param {string} id\n *        ID to use for the playlist\n */\n\n\nvar setupMediaPlaylist = function setupMediaPlaylist(_ref2) {\n  var playlist = _ref2.playlist,\n      uri = _ref2.uri,\n      id = _ref2.id;\n  playlist.id = id;\n  playlist.playlistErrors_ = 0;\n\n  if (uri) {\n    // For media playlists, m3u8-parser does not have access to a URI, as HLS media\n    // playlists do not contain their own source URI, but one is needed for consistency in\n    // VHS.\n    playlist.uri = uri;\n  } // For HLS master playlists, even though certain attributes MUST be defined, the\n  // stream may still be played without them.\n  // For HLS media playlists, m3u8-parser does not attach an attributes object to the\n  // manifest.\n  //\n  // To avoid undefined reference errors through the project, and make the code easier\n  // to write/read, add an empty attributes object for these cases.\n\n\n  playlist.attributes = playlist.attributes || {};\n};\n/**\n * Adds ID, resolvedUri, and attributes properties to each playlist of the master, where\n * necessary. In addition, creates playlist IDs for each playlist and adds playlist ID to\n * playlist references to the playlists array.\n *\n * @param {Object} master\n *        The master playlist\n */\n\n\nvar setupMediaPlaylists = function setupMediaPlaylists(master) {\n  var i = master.playlists.length;\n\n  while (i--) {\n    var playlist = master.playlists[i];\n    setupMediaPlaylist({\n      playlist: playlist,\n      id: createPlaylistID(i, playlist.uri)\n    });\n    playlist.resolvedUri = resolveUrl(master.uri, playlist.uri);\n    master.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\n\n    master.playlists[playlist.uri] = playlist; // Although the spec states an #EXT-X-STREAM-INF tag MUST have a BANDWIDTH attribute,\n    // the stream can be played without it. Although an attributes property may have been\n    // added to the playlist to prevent undefined references, issue a warning to fix the\n    // manifest.\n\n    if (!playlist.attributes.BANDWIDTH) {\n      log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\n    }\n  }\n};\n/**\n * Adds resolvedUri properties to each media group.\n *\n * @param {Object} master\n *        The master playlist\n */\n\n\nvar resolveMediaGroupUris = function resolveMediaGroupUris(master) {\n  forEachMediaGroup(master, function (properties) {\n    if (properties.uri) {\n      properties.resolvedUri = resolveUrl(master.uri, properties.uri);\n    }\n  });\n};\n/**\n * Creates a master playlist wrapper to insert a sole media playlist into.\n *\n * @param {Object} media\n *        Media playlist\n * @param {string} uri\n *        The media URI\n *\n * @return {Object}\n *         Master playlist\n */\n\n\nvar masterForMedia = function masterForMedia(media, uri) {\n  var id = createPlaylistID(0, uri);\n  var master = {\n    mediaGroups: {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    },\n    uri: global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href,\n    resolvedUri: global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href,\n    playlists: [{\n      uri: uri,\n      id: id,\n      resolvedUri: uri,\n      // m3u8-parser does not attach an attributes property to media playlists so make\n      // sure that the property is attached to avoid undefined reference errors\n      attributes: {}\n    }]\n  }; // set up ID reference\n\n  master.playlists[id] = master.playlists[0]; // URI reference added for backwards compatibility\n\n  master.playlists[uri] = master.playlists[0];\n  return master;\n};\n/**\n * Does an in-place update of the master manifest to add updated playlist URI references\n * as well as other properties needed by VHS that aren't included by the parser.\n *\n * @param {Object} master\n *        Master manifest object\n * @param {string} uri\n *        The source URI\n * @param {function} createGroupID\n *        A function to determine how to create the groupID for mediaGroups\n */\n\n\nvar addPropertiesToMaster = function addPropertiesToMaster(master, uri, createGroupID) {\n  if (createGroupID === void 0) {\n    createGroupID = groupID;\n  }\n\n  master.uri = uri;\n\n  for (var i = 0; i < master.playlists.length; i++) {\n    if (!master.playlists[i].uri) {\n      // Set up phony URIs for the playlists since playlists are referenced by their URIs\n      // throughout VHS, but some formats (e.g., DASH) don't have external URIs\n      // TODO: consider adding dummy URIs in mpd-parser\n      var phonyUri = \"placeholder-uri-\" + i;\n      master.playlists[i].uri = phonyUri;\n    }\n  }\n\n  var audioOnlyMaster = isAudioOnly(master);\n  forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\n    // add a playlist array under properties\n    if (!properties.playlists || !properties.playlists.length) {\n      // If the manifest is audio only and this media group does not have a uri, check\n      // if the media group is located in the main list of playlists. If it is, don't add\n      // placeholder properties as it shouldn't be considered an alternate audio track.\n      if (audioOnlyMaster && mediaType === 'AUDIO' && !properties.uri) {\n        for (var _i = 0; _i < master.playlists.length; _i++) {\n          var p = master.playlists[_i];\n\n          if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n            return;\n          }\n        }\n      }\n\n      properties.playlists = [_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, properties)];\n    }\n\n    properties.playlists.forEach(function (p, i) {\n      var groupId = createGroupID(mediaType, groupKey, labelKey, p);\n      var id = createPlaylistID(i, groupId);\n\n      if (p.uri) {\n        p.resolvedUri = p.resolvedUri || resolveUrl(master.uri, p.uri);\n      } else {\n        // DEPRECATED, this has been added to prevent a breaking change.\n        // previously we only ever had a single media group playlist, so\n        // we mark the first playlist uri without prepending the index as we used to\n        // ideally we would do all of the playlists the same way.\n        p.uri = i === 0 ? groupId : id; // don't resolve a placeholder uri to an absolute url, just use\n        // the placeholder again\n\n        p.resolvedUri = p.uri;\n      }\n\n      p.id = p.id || id; // add an empty attributes object, all playlists are\n      // expected to have this.\n\n      p.attributes = p.attributes || {}; // setup ID and URI references (URI for backwards compatibility)\n\n      master.playlists[p.id] = p;\n      master.playlists[p.uri] = p;\n    });\n  });\n  setupMediaPlaylists(master);\n  resolveMediaGroupUris(master);\n};\n\nvar mergeOptions$2 = videojs.mergeOptions,\n    EventTarget$1 = videojs.EventTarget;\n\nvar addLLHLSQueryDirectives = function addLLHLSQueryDirectives(uri, media) {\n  if (media.endList || !media.serverControl) {\n    return uri;\n  }\n\n  var parameters = {};\n\n  if (media.serverControl.canBlockReload) {\n    var preloadSegment = media.preloadSegment; // next msn is a zero based value, length is not.\n\n    var nextMSN = media.mediaSequence + media.segments.length; // If preload segment has parts then it is likely\n    // that we are going to request a part of that preload segment.\n    // the logic below is used to determine that.\n\n    if (preloadSegment) {\n      var parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n      var nextPart = getKnownPartCount(media) - 1; // if nextPart is > -1 and not equal to just the\n      // length of parts, then we know we had part preload hints\n      // and we need to add the _HLS_part= query\n\n      if (nextPart > -1 && nextPart !== parts.length - 1) {\n        // add existing parts to our preload hints\n        // eslint-disable-next-line\n        parameters._HLS_part = nextPart;\n      } // this if statement makes sure that we request the msn\n      // of the preload segment if:\n      // 1. the preload segment had parts (and was not yet a full segment)\n      //    but was added to our segments array\n      // 2. the preload segment had preload hints for parts that are not in\n      //    the manifest yet.\n      // in all other cases we want the segment after the preload segment\n      // which will be given by using media.segments.length because it is 1 based\n      // rather than 0 based.\n\n\n      if (nextPart > -1 || parts.length) {\n        nextMSN--;\n      }\n    } // add _HLS_msn= in front of any _HLS_part query\n    // eslint-disable-next-line\n\n\n    parameters._HLS_msn = nextMSN;\n  }\n\n  if (media.serverControl && media.serverControl.canSkipUntil) {\n    // add _HLS_skip= infront of all other queries.\n    // eslint-disable-next-line\n    parameters._HLS_skip = media.serverControl.canSkipDateranges ? 'v2' : 'YES';\n  }\n\n  if (Object.keys(parameters).length) {\n    var parsedUri = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL(uri);\n    ['_HLS_skip', '_HLS_msn', '_HLS_part'].forEach(function (name) {\n      if (!parameters.hasOwnProperty(name)) {\n        return;\n      }\n\n      parsedUri.searchParams.set(name, parameters[name]);\n    });\n    uri = parsedUri.toString();\n  }\n\n  return uri;\n};\n/**\n * Returns a new segment object with properties and\n * the parts array merged.\n *\n * @param {Object} a the old segment\n * @param {Object} b the new segment\n *\n * @return {Object} the merged segment\n */\n\n\nvar updateSegment = function updateSegment(a, b) {\n  if (!a) {\n    return b;\n  }\n\n  var result = mergeOptions$2(a, b); // if only the old segment has preload hints\n  // and the new one does not, remove preload hints.\n\n  if (a.preloadHints && !b.preloadHints) {\n    delete result.preloadHints;\n  } // if only the old segment has parts\n  // then the parts are no longer valid\n\n\n  if (a.parts && !b.parts) {\n    delete result.parts; // if both segments have parts\n    // copy part propeties from the old segment\n    // to the new one.\n  } else if (a.parts && b.parts) {\n    for (var i = 0; i < b.parts.length; i++) {\n      if (a.parts && a.parts[i]) {\n        result.parts[i] = mergeOptions$2(a.parts[i], b.parts[i]);\n      }\n    }\n  } // set skipped to false for segments that have\n  // have had information merged from the old segment.\n\n\n  if (!a.skipped && b.skipped) {\n    result.skipped = false;\n  } // set preload to false for segments that have\n  // had information added in the new segment.\n\n\n  if (a.preload && !b.preload) {\n    result.preload = false;\n  }\n\n  return result;\n};\n/**\n * Returns a new array of segments that is the result of merging\n * properties from an older list of segments onto an updated\n * list. No properties on the updated playlist will be ovewritten.\n *\n * @param {Array} original the outdated list of segments\n * @param {Array} update the updated list of segments\n * @param {number=} offset the index of the first update\n * segment in the original segment list. For non-live playlists,\n * this should always be zero and does not need to be\n * specified. For live playlists, it should be the difference\n * between the media sequence numbers in the original and updated\n * playlists.\n * @return {Array} a list of merged segment objects\n */\n\n\nvar updateSegments = function updateSegments(original, update, offset) {\n  var oldSegments = original.slice();\n  var newSegments = update.slice();\n  offset = offset || 0;\n  var result = [];\n  var currentMap;\n\n  for (var newIndex = 0; newIndex < newSegments.length; newIndex++) {\n    var oldSegment = oldSegments[newIndex + offset];\n    var newSegment = newSegments[newIndex];\n\n    if (oldSegment) {\n      currentMap = oldSegment.map || currentMap;\n      result.push(updateSegment(oldSegment, newSegment));\n    } else {\n      // carry over map to new segment if it is missing\n      if (currentMap && !newSegment.map) {\n        newSegment.map = currentMap;\n      }\n\n      result.push(newSegment);\n    }\n  }\n\n  return result;\n};\n\nvar resolveSegmentUris = function resolveSegmentUris(segment, baseUri) {\n  // preloadSegment will not have a uri at all\n  // as the segment isn't actually in the manifest yet, only parts\n  if (!segment.resolvedUri && segment.uri) {\n    segment.resolvedUri = resolveUrl(baseUri, segment.uri);\n  }\n\n  if (segment.key && !segment.key.resolvedUri) {\n    segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n  }\n\n  if (segment.map && !segment.map.resolvedUri) {\n    segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n  }\n\n  if (segment.map && segment.map.key && !segment.map.key.resolvedUri) {\n    segment.map.key.resolvedUri = resolveUrl(baseUri, segment.map.key.uri);\n  }\n\n  if (segment.parts && segment.parts.length) {\n    segment.parts.forEach(function (p) {\n      if (p.resolvedUri) {\n        return;\n      }\n\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n\n  if (segment.preloadHints && segment.preloadHints.length) {\n    segment.preloadHints.forEach(function (p) {\n      if (p.resolvedUri) {\n        return;\n      }\n\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n};\n\nvar getAllSegments = function getAllSegments(media) {\n  var segments = media.segments || [];\n  var preloadSegment = media.preloadSegment; // a preloadSegment with only preloadHints is not currently\n  // a usable segment, only include a preloadSegment that has\n  // parts.\n\n  if (preloadSegment && preloadSegment.parts && preloadSegment.parts.length) {\n    // if preloadHints has a MAP that means that the\n    // init segment is going to change. We cannot use any of the parts\n    // from this preload segment.\n    if (preloadSegment.preloadHints) {\n      for (var i = 0; i < preloadSegment.preloadHints.length; i++) {\n        if (preloadSegment.preloadHints[i].type === 'MAP') {\n          return segments;\n        }\n      }\n    } // set the duration for our preload segment to target duration.\n\n\n    preloadSegment.duration = media.targetDuration;\n    preloadSegment.preload = true;\n    segments.push(preloadSegment);\n  }\n\n  return segments;\n}; // consider the playlist unchanged if the playlist object is the same or\n// the number of segments is equal, the media sequence number is unchanged,\n// and this playlist hasn't become the end of the playlist\n\n\nvar isPlaylistUnchanged = function isPlaylistUnchanged(a, b) {\n  return a === b || a.segments && b.segments && a.segments.length === b.segments.length && a.endList === b.endList && a.mediaSequence === b.mediaSequence && a.preloadSegment === b.preloadSegment;\n};\n/**\n  * Returns a new master playlist that is the result of merging an\n  * updated media playlist into the original version. If the\n  * updated media playlist does not match any of the playlist\n  * entries in the original master playlist, null is returned.\n  *\n  * @param {Object} master a parsed master M3U8 object\n  * @param {Object} media a parsed media M3U8 object\n  * @return {Object} a new object that represents the original\n  * master playlist with the updated media playlist merged in, or\n  * null if the merge produced no change.\n  */\n\n\nvar updateMaster$1 = function updateMaster(master, newMedia, unchangedCheck) {\n  if (unchangedCheck === void 0) {\n    unchangedCheck = isPlaylistUnchanged;\n  }\n\n  var result = mergeOptions$2(master, {});\n  var oldMedia = result.playlists[newMedia.id];\n\n  if (!oldMedia) {\n    return null;\n  }\n\n  if (unchangedCheck(oldMedia, newMedia)) {\n    return null;\n  }\n\n  newMedia.segments = getAllSegments(newMedia);\n  var mergedPlaylist = mergeOptions$2(oldMedia, newMedia); // always use the new media's preload segment\n\n  if (mergedPlaylist.preloadSegment && !newMedia.preloadSegment) {\n    delete mergedPlaylist.preloadSegment;\n  } // if the update could overlap existing segment information, merge the two segment lists\n\n\n  if (oldMedia.segments) {\n    if (newMedia.skip) {\n      newMedia.segments = newMedia.segments || []; // add back in objects for skipped segments, so that we merge\n      // old properties into the new segments\n\n      for (var i = 0; i < newMedia.skip.skippedSegments; i++) {\n        newMedia.segments.unshift({\n          skipped: true\n        });\n      }\n    }\n\n    mergedPlaylist.segments = updateSegments(oldMedia.segments, newMedia.segments, newMedia.mediaSequence - oldMedia.mediaSequence);\n  } // resolve any segment URIs to prevent us from having to do it later\n\n\n  mergedPlaylist.segments.forEach(function (segment) {\n    resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\n  }); // TODO Right now in the playlists array there are two references to each playlist, one\n  // that is referenced by index, and one by URI. The index reference may no longer be\n  // necessary.\n\n  for (var _i = 0; _i < result.playlists.length; _i++) {\n    if (result.playlists[_i].id === newMedia.id) {\n      result.playlists[_i] = mergedPlaylist;\n    }\n  }\n\n  result.playlists[newMedia.id] = mergedPlaylist; // URI reference added for backwards compatibility\n\n  result.playlists[newMedia.uri] = mergedPlaylist; // update media group playlist references.\n\n  forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\n    if (!properties.playlists) {\n      return;\n    }\n\n    for (var _i2 = 0; _i2 < properties.playlists.length; _i2++) {\n      if (newMedia.id === properties.playlists[_i2].id) {\n        properties.playlists[_i2] = mergedPlaylist;\n      }\n    }\n  });\n  return result;\n};\n/**\n * Calculates the time to wait before refreshing a live playlist\n *\n * @param {Object} media\n *        The current media\n * @param {boolean} update\n *        True if there were any updates from the last refresh, false otherwise\n * @return {number}\n *         The time in ms to wait before refreshing the live playlist\n */\n\n\nvar refreshDelay = function refreshDelay(media, update) {\n  var segments = media.segments || [];\n  var lastSegment = segments[segments.length - 1];\n  var lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n  var lastDuration = lastPart && lastPart.duration || lastSegment && lastSegment.duration;\n\n  if (update && lastDuration) {\n    return lastDuration * 1000;\n  } // if the playlist is unchanged since the last reload or last segment duration\n  // cannot be determined, try again after half the target duration\n\n\n  return (media.partTargetDuration || media.targetDuration || 10) * 500;\n};\n/**\n * Load a playlist from a remote location\n *\n * @class PlaylistLoader\n * @extends Stream\n * @param {string|Object} src url or object of manifest\n * @param {boolean} withCredentials the withCredentials xhr option\n * @class\n */\n\n\nvar PlaylistLoader = /*#__PURE__*/function (_EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(PlaylistLoader, _EventTarget);\n\n  function PlaylistLoader(src, vhs, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _EventTarget.call(this) || this;\n\n    if (!src) {\n      throw new Error('A non-empty playlist URL or object is required');\n    }\n\n    _this.logger_ = logger('PlaylistLoader');\n    var _options = options,\n        _options$withCredenti = _options.withCredentials,\n        withCredentials = _options$withCredenti === void 0 ? false : _options$withCredenti,\n        _options$handleManife = _options.handleManifestRedirects,\n        handleManifestRedirects = _options$handleManife === void 0 ? false : _options$handleManife;\n    _this.src = src;\n    _this.vhs_ = vhs;\n    _this.withCredentials = withCredentials;\n    _this.handleManifestRedirects = handleManifestRedirects;\n    var vhsOptions = vhs.options_;\n    _this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n    _this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n    _this.experimentalLLHLS = vhsOptions && vhsOptions.experimentalLLHLS || false; // force experimentalLLHLS for IE 11\n\n    if (videojs.browser.IE_VERSION) {\n      _this.experimentalLLHLS = false;\n    } // initialize the loader state\n\n\n    _this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n    _this.handleMediaupdatetimeout_ = _this.handleMediaupdatetimeout_.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n\n    _this.on('mediaupdatetimeout', _this.handleMediaupdatetimeout_);\n\n    return _this;\n  }\n\n  var _proto = PlaylistLoader.prototype;\n\n  _proto.handleMediaupdatetimeout_ = function handleMediaupdatetimeout_() {\n    var _this2 = this;\n\n    if (this.state !== 'HAVE_METADATA') {\n      // only refresh the media playlist if no other activity is going on\n      return;\n    }\n\n    var media = this.media();\n    var uri = resolveUrl(this.master.uri, media.uri);\n\n    if (this.experimentalLLHLS) {\n      uri = addLLHLSQueryDirectives(uri, media);\n    }\n\n    this.state = 'HAVE_CURRENT_METADATA';\n    this.request = this.vhs_.xhr({\n      uri: uri,\n      withCredentials: this.withCredentials\n    }, function (error, req) {\n      // disposed\n      if (!_this2.request) {\n        return;\n      }\n\n      if (error) {\n        return _this2.playlistRequestError(_this2.request, _this2.media(), 'HAVE_METADATA');\n      }\n\n      _this2.haveMetadata({\n        playlistString: _this2.request.responseText,\n        url: _this2.media().uri,\n        id: _this2.media().id\n      });\n    });\n  };\n\n  _proto.playlistRequestError = function playlistRequestError(xhr, playlist, startingState) {\n    var uri = playlist.uri,\n        id = playlist.id; // any in-flight request is now finished\n\n    this.request = null;\n\n    if (startingState) {\n      this.state = startingState;\n    }\n\n    this.error = {\n      playlist: this.master.playlists[id],\n      status: xhr.status,\n      message: \"HLS playlist request error at URL: \" + uri + \".\",\n      responseText: xhr.responseText,\n      code: xhr.status >= 500 ? 4 : 2\n    };\n    this.trigger('error');\n  };\n\n  _proto.parseManifest_ = function parseManifest_(_ref) {\n    var _this3 = this;\n\n    var url = _ref.url,\n        manifestString = _ref.manifestString;\n    return parseManifest({\n      onwarn: function onwarn(_ref2) {\n        var message = _ref2.message;\n        return _this3.logger_(\"m3u8-parser warn for \" + url + \": \" + message);\n      },\n      oninfo: function oninfo(_ref3) {\n        var message = _ref3.message;\n        return _this3.logger_(\"m3u8-parser info for \" + url + \": \" + message);\n      },\n      manifestString: manifestString,\n      customTagParsers: this.customTagParsers,\n      customTagMappers: this.customTagMappers,\n      experimentalLLHLS: this.experimentalLLHLS\n    });\n  }\n  /**\n   * Update the playlist loader's state in response to a new or updated playlist.\n   *\n   * @param {string} [playlistString]\n   *        Playlist string (if playlistObject is not provided)\n   * @param {Object} [playlistObject]\n   *        Playlist object (if playlistString is not provided)\n   * @param {string} url\n   *        URL of playlist\n   * @param {string} id\n   *        ID to use for playlist\n   */\n  ;\n\n  _proto.haveMetadata = function haveMetadata(_ref4) {\n    var playlistString = _ref4.playlistString,\n        playlistObject = _ref4.playlistObject,\n        url = _ref4.url,\n        id = _ref4.id; // any in-flight request is now finished\n\n    this.request = null;\n    this.state = 'HAVE_METADATA';\n    var playlist = playlistObject || this.parseManifest_({\n      url: url,\n      manifestString: playlistString\n    });\n    playlist.lastRequest = Date.now();\n    setupMediaPlaylist({\n      playlist: playlist,\n      uri: url,\n      id: id\n    }); // merge this playlist into the master\n\n    var update = updateMaster$1(this.master, playlist);\n    this.targetDuration = playlist.partTargetDuration || playlist.targetDuration;\n    this.pendingMedia_ = null;\n\n    if (update) {\n      this.master = update;\n      this.media_ = this.master.playlists[id];\n    } else {\n      this.trigger('playlistunchanged');\n    }\n\n    this.updateMediaUpdateTimeout_(refreshDelay(this.media(), !!update));\n    this.trigger('loadedplaylist');\n  }\n  /**\n    * Abort any outstanding work and clean up.\n    */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.trigger('dispose');\n    this.stopRequest();\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\n    this.off();\n  };\n\n  _proto.stopRequest = function stopRequest() {\n    if (this.request) {\n      var oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n  /**\n    * When called without any arguments, returns the currently\n    * active media playlist. When called with a single argument,\n    * triggers the playlist loader to asynchronously switch to the\n    * specified media playlist. Calling this method while the\n    * loader is in the HAVE_NOTHING causes an error to be emitted\n    * but otherwise has no effect.\n    *\n    * @param {Object=} playlist the parsed media playlist\n    * object to switch to\n    * @param {boolean=} shouldDelay whether we should delay the request by half target duration\n    *\n    * @return {Playlist} the current loaded media\n    */\n  ;\n\n  _proto.media = function media(playlist, shouldDelay) {\n    var _this4 = this; // getter\n\n\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\n\n    if (this.state === 'HAVE_NOTHING') {\n      throw new Error('Cannot switch media playlist from ' + this.state);\n    } // find the playlist object if the target playlist has been\n    // specified by URI\n\n\n    if (typeof playlist === 'string') {\n      if (!this.master.playlists[playlist]) {\n        throw new Error('Unknown playlist URI: ' + playlist);\n      }\n\n      playlist = this.master.playlists[playlist];\n    }\n\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\n\n    if (shouldDelay) {\n      var delay = (playlist.partTargetDuration || playlist.targetDuration) / 2 * 1000 || 5 * 1000;\n      this.finalRenditionTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.media.bind(this, playlist, false), delay);\n      return;\n    }\n\n    var startingState = this.state;\n    var mediaChange = !this.media_ || playlist.id !== this.media_.id;\n    var masterPlaylistRef = this.master.playlists[playlist.id]; // switch to fully loaded playlists immediately\n\n    if (masterPlaylistRef && masterPlaylistRef.endList || // handle the case of a playlist object (e.g., if using vhs-json with a resolved\n    // media playlist or, for the case of demuxed audio, a resolved audio media group)\n    playlist.endList && playlist.segments.length) {\n      // abort outstanding playlist requests\n      if (this.request) {\n        this.request.onreadystatechange = null;\n        this.request.abort();\n        this.request = null;\n      }\n\n      this.state = 'HAVE_METADATA';\n      this.media_ = playlist; // trigger media change if the active media has been updated\n\n      if (mediaChange) {\n        this.trigger('mediachanging');\n\n        if (startingState === 'HAVE_MASTER') {\n          // The initial playlist was a master manifest, and the first media selected was\n          // also provided (in the form of a resolved playlist object) as part of the\n          // source object (rather than just a URL). Therefore, since the media playlist\n          // doesn't need to be requested, loadedmetadata won't trigger as part of the\n          // normal flow, and needs an explicit trigger here.\n          this.trigger('loadedmetadata');\n        } else {\n          this.trigger('mediachange');\n        }\n      }\n\n      return;\n    } // We update/set the timeout here so that live playlists\n    // that are not a media change will \"start\" the loader as expected.\n    // We expect that this function will start the media update timeout\n    // cycle again. This also prevents a playlist switch failure from\n    // causing us to stall during live.\n\n\n    this.updateMediaUpdateTimeout_(refreshDelay(playlist, true)); // switching to the active playlist is a no-op\n\n    if (!mediaChange) {\n      return;\n    }\n\n    this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\n\n    if (this.request) {\n      if (playlist.resolvedUri === this.request.url) {\n        // requesting to switch to the same playlist multiple times\n        // has no effect after the first\n        return;\n      }\n\n      this.request.onreadystatechange = null;\n      this.request.abort();\n      this.request = null;\n    } // request the new playlist\n\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n\n    this.pendingMedia_ = playlist;\n    this.request = this.vhs_.xhr({\n      uri: playlist.resolvedUri,\n      withCredentials: this.withCredentials\n    }, function (error, req) {\n      // disposed\n      if (!_this4.request) {\n        return;\n      }\n\n      playlist.lastRequest = Date.now();\n      playlist.resolvedUri = resolveManifestRedirect(_this4.handleManifestRedirects, playlist.resolvedUri, req);\n\n      if (error) {\n        return _this4.playlistRequestError(_this4.request, playlist, startingState);\n      }\n\n      _this4.haveMetadata({\n        playlistString: req.responseText,\n        url: playlist.uri,\n        id: playlist.id\n      }); // fire loadedmetadata the first time a media playlist is loaded\n\n\n      if (startingState === 'HAVE_MASTER') {\n        _this4.trigger('loadedmetadata');\n      } else {\n        _this4.trigger('mediachange');\n      }\n    });\n  }\n  /**\n   * pause loading of the playlist\n   */\n  ;\n\n  _proto.pause = function pause() {\n    if (this.mediaUpdateTimeout) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n\n    this.stopRequest();\n\n    if (this.state === 'HAVE_NOTHING') {\n      // If we pause the loader before any data has been retrieved, its as if we never\n      // started, so reset to an unstarted state.\n      this.started = false;\n    } // Need to restore state now that no activity is happening\n\n\n    if (this.state === 'SWITCHING_MEDIA') {\n      // if the loader was in the process of switching media, it should either return to\n      // HAVE_MASTER or HAVE_METADATA depending on if the loader has loaded a media\n      // playlist yet. This is determined by the existence of loader.media_\n      if (this.media_) {\n        this.state = 'HAVE_METADATA';\n      } else {\n        this.state = 'HAVE_MASTER';\n      }\n    } else if (this.state === 'HAVE_CURRENT_METADATA') {\n      this.state = 'HAVE_METADATA';\n    }\n  }\n  /**\n   * start loading of the playlist\n   */\n  ;\n\n  _proto.load = function load(shouldDelay) {\n    var _this5 = this;\n\n    if (this.mediaUpdateTimeout) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n\n    var media = this.media();\n\n    if (shouldDelay) {\n      var delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        _this5.mediaUpdateTimeout = null;\n\n        _this5.load();\n      }, delay);\n      return;\n    }\n\n    if (!this.started) {\n      this.start();\n      return;\n    }\n\n    if (media && !media.endList) {\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  };\n\n  _proto.updateMediaUpdateTimeout_ = function updateMediaUpdateTimeout_(delay) {\n    var _this6 = this;\n\n    if (this.mediaUpdateTimeout) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    } // we only have use mediaupdatetimeout for live playlists.\n\n\n    if (!this.media() || this.media().endList) {\n      return;\n    }\n\n    this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n      _this6.mediaUpdateTimeout = null;\n\n      _this6.trigger('mediaupdatetimeout');\n\n      _this6.updateMediaUpdateTimeout_(delay);\n    }, delay);\n  }\n  /**\n   * start loading of the playlist\n   */\n  ;\n\n  _proto.start = function start() {\n    var _this7 = this;\n\n    this.started = true;\n\n    if (typeof this.src === 'object') {\n      // in the case of an entirely constructed manifest object (meaning there's no actual\n      // manifest on a server), default the uri to the page's href\n      if (!this.src.uri) {\n        this.src.uri = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href;\n      } // resolvedUri is added on internally after the initial request. Since there's no\n      // request for pre-resolved manifests, add on resolvedUri here.\n\n\n      this.src.resolvedUri = this.src.uri; // Since a manifest object was passed in as the source (instead of a URL), the first\n      // request can be skipped (since the top level of the manifest, at a minimum, is\n      // already available as a parsed manifest object). However, if the manifest object\n      // represents a master playlist, some media playlists may need to be resolved before\n      // the starting segment list is available. Therefore, go directly to setup of the\n      // initial playlist, and let the normal flow continue from there.\n      //\n      // Note that the call to setup is asynchronous, as other sections of VHS may assume\n      // that the first request is asynchronous.\n\n      setTimeout(function () {\n        _this7.setupInitialPlaylist(_this7.src);\n      }, 0);\n      return;\n    } // request the specified URL\n\n\n    this.request = this.vhs_.xhr({\n      uri: this.src,\n      withCredentials: this.withCredentials\n    }, function (error, req) {\n      // disposed\n      if (!_this7.request) {\n        return;\n      } // clear the loader's request reference\n\n\n      _this7.request = null;\n\n      if (error) {\n        _this7.error = {\n          status: req.status,\n          message: \"HLS playlist request error at URL: \" + _this7.src + \".\",\n          responseText: req.responseText,\n          // MEDIA_ERR_NETWORK\n          code: 2\n        };\n\n        if (_this7.state === 'HAVE_NOTHING') {\n          _this7.started = false;\n        }\n\n        return _this7.trigger('error');\n      }\n\n      _this7.src = resolveManifestRedirect(_this7.handleManifestRedirects, _this7.src, req);\n\n      var manifest = _this7.parseManifest_({\n        manifestString: req.responseText,\n        url: _this7.src\n      });\n\n      _this7.setupInitialPlaylist(manifest);\n    });\n  };\n\n  _proto.srcUri = function srcUri() {\n    return typeof this.src === 'string' ? this.src : this.src.uri;\n  }\n  /**\n   * Given a manifest object that's either a master or media playlist, trigger the proper\n   * events and set the state of the playlist loader.\n   *\n   * If the manifest object represents a master playlist, `loadedplaylist` will be\n   * triggered to allow listeners to select a playlist. If none is selected, the loader\n   * will default to the first one in the playlists array.\n   *\n   * If the manifest object represents a media playlist, `loadedplaylist` will be\n   * triggered followed by `loadedmetadata`, as the only available playlist is loaded.\n   *\n   * In the case of a media playlist, a master playlist object wrapper with one playlist\n   * will be created so that all logic can handle playlists in the same fashion (as an\n   * assumed manifest object schema).\n   *\n   * @param {Object} manifest\n   *        The parsed manifest object\n   */\n  ;\n\n  _proto.setupInitialPlaylist = function setupInitialPlaylist(manifest) {\n    this.state = 'HAVE_MASTER';\n\n    if (manifest.playlists) {\n      this.master = manifest;\n      addPropertiesToMaster(this.master, this.srcUri()); // If the initial master playlist has playlists wtih segments already resolved,\n      // then resolve URIs in advance, as they are usually done after a playlist request,\n      // which may not happen if the playlist is resolved.\n\n      manifest.playlists.forEach(function (playlist) {\n        playlist.segments = getAllSegments(playlist);\n        playlist.segments.forEach(function (segment) {\n          resolveSegmentUris(segment, playlist.resolvedUri);\n        });\n      });\n      this.trigger('loadedplaylist');\n\n      if (!this.request) {\n        // no media playlist was specifically selected so start\n        // from the first listed one\n        this.media(this.master.playlists[0]);\n      }\n\n      return;\n    } // In order to support media playlists passed in as vhs-json, the case where the uri\n    // is not provided as part of the manifest should be considered, and an appropriate\n    // default used.\n\n\n    var uri = this.srcUri() || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href;\n    this.master = masterForMedia(manifest, uri);\n    this.haveMetadata({\n      playlistObject: manifest,\n      url: uri,\n      id: this.master.playlists[0].id\n    });\n    this.trigger('loadedmetadata');\n  };\n\n  return PlaylistLoader;\n}(EventTarget$1);\n/**\n * @file xhr.js\n */\n\n\nvar videojsXHR = videojs.xhr,\n    mergeOptions$1 = videojs.mergeOptions;\n\nvar callbackWrapper = function callbackWrapper(request, error, response, callback) {\n  var reqResponse = request.responseType === 'arraybuffer' ? request.response : request.responseText;\n\n  if (!error && reqResponse) {\n    request.responseTime = Date.now();\n    request.roundTripTime = request.responseTime - request.requestTime;\n    request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n\n    if (!request.bandwidth) {\n      request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n    }\n  }\n\n  if (response.headers) {\n    request.responseHeaders = response.headers;\n  } // videojs.xhr now uses a specific code on the error\n  // object to signal that a request has timed out instead\n  // of setting a boolean on the request object\n\n\n  if (error && error.code === 'ETIMEDOUT') {\n    request.timedout = true;\n  } // videojs.xhr no longer considers status codes outside of 200 and 0\n  // (for file uris) to be errors, but the old XHR did, so emulate that\n  // behavior. Status 206 may be used in response to byterange requests.\n\n\n  if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\n    error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\n  }\n\n  callback(error, request);\n};\n\nvar xhrFactory = function xhrFactory() {\n  var xhr = function XhrFunction(options, callback) {\n    // Add a default timeout\n    options = mergeOptions$1({\n      timeout: 45e3\n    }, options); // Allow an optional user-specified function to modify the option\n    // object before we construct the xhr request\n\n    var beforeRequest = XhrFunction.beforeRequest || videojs.Vhs.xhr.beforeRequest;\n\n    if (beforeRequest && typeof beforeRequest === 'function') {\n      var newOptions = beforeRequest(options);\n\n      if (newOptions) {\n        options = newOptions;\n      }\n    } // Use the standard videojs.xhr() method unless `videojs.Vhs.xhr` has been overriden\n    // TODO: switch back to videojs.Vhs.xhr.name === 'XhrFunction' when we drop IE11\n\n\n    var xhrMethod = videojs.Vhs.xhr.original === true ? videojsXHR : videojs.Vhs.xhr;\n    var request = xhrMethod(options, function (error, response) {\n      return callbackWrapper(request, error, response, callback);\n    });\n    var originalAbort = request.abort;\n\n    request.abort = function () {\n      request.aborted = true;\n      return originalAbort.apply(request, arguments);\n    };\n\n    request.uri = options.uri;\n    request.requestTime = Date.now();\n    return request;\n  };\n\n  xhr.original = true;\n  return xhr;\n};\n/**\n * Turns segment byterange into a string suitable for use in\n * HTTP Range requests\n *\n * @param {Object} byterange - an object with two values defining the start and end\n *                             of a byte-range\n */\n\n\nvar byterangeStr = function byterangeStr(byterange) {\n  // `byterangeEnd` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  var byterangeEnd;\n  var byterangeStart = byterange.offset;\n\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    byterangeEnd = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt(byterange.offset) + global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt(byterange.length) - global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt(1);\n  } else {\n    byterangeEnd = byterange.offset + byterange.length - 1;\n  }\n\n  return 'bytes=' + byterangeStart + '-' + byterangeEnd;\n};\n/**\n * Defines headers for use in the xhr request for a particular segment.\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n */\n\n\nvar segmentXhrHeaders = function segmentXhrHeaders(segment) {\n  var headers = {};\n\n  if (segment.byterange) {\n    headers.Range = byterangeStr(segment.byterange);\n  }\n\n  return headers;\n};\n/**\n * @file bin-utils.js\n */\n\n/**\n * convert a TimeRange to text\n *\n * @param {TimeRange} range the timerange to use for conversion\n * @param {number} i the iterator on the range to convert\n * @return {string} the range in string format\n */\n\n\nvar textRange = function textRange(range, i) {\n  return range.start(i) + '-' + range.end(i);\n};\n/**\n * format a number as hex string\n *\n * @param {number} e The number\n * @param {number} i the iterator\n * @return {string} the hex formatted number as a string\n */\n\n\nvar formatHexString = function formatHexString(e, i) {\n  var value = e.toString(16);\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\n\nvar formatAsciiString = function formatAsciiString(e) {\n  if (e >= 0x20 && e < 0x7e) {\n    return String.fromCharCode(e);\n  }\n\n  return '.';\n};\n/**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n *        Object of properties and values to send to the web worker\n * @return {Object}\n *         Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n\nvar createTransferableMessage = function createTransferableMessage(message) {\n  var transferable = {};\n  Object.keys(message).forEach(function (key) {\n    var value = message[key];\n\n    if (Object(_videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_15__[\"isArrayBufferView\"])(value)) {\n      transferable[key] = {\n        bytes: value.buffer,\n        byteOffset: value.byteOffset,\n        byteLength: value.byteLength\n      };\n    } else {\n      transferable[key] = value;\n    }\n  });\n  return transferable;\n};\n/**\n * Returns a unique string identifier for a media initialization\n * segment.\n *\n * @param {Object} initSegment\n *        the init segment object.\n *\n * @return {string} the generated init segment id\n */\n\n\nvar initSegmentId = function initSegmentId(initSegment) {\n  var byterange = initSegment.byterange || {\n    length: Infinity,\n    offset: 0\n  };\n  return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\n};\n/**\n * Returns a unique string identifier for a media segment key.\n *\n * @param {Object} key the encryption key\n * @return {string} the unique id for the media segment key.\n */\n\n\nvar segmentKeyId = function segmentKeyId(key) {\n  return key.resolvedUri;\n};\n/**\n * utils to help dump binary data to the console\n *\n * @param {Array|TypedArray} data\n *        data to dump to a string\n *\n * @return {string} the data as a hex string.\n */\n\n\nvar hexDump = function hexDump(data) {\n  var bytes = Array.prototype.slice.call(data);\n  var step = 16;\n  var result = '';\n  var hex;\n  var ascii;\n\n  for (var j = 0; j < bytes.length / step; j++) {\n    hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\n    ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\n    result += hex + ' ' + ascii + '\\n';\n  }\n\n  return result;\n};\n\nvar tagDump = function tagDump(_ref) {\n  var bytes = _ref.bytes;\n  return hexDump(bytes);\n};\n\nvar textRanges = function textRanges(ranges) {\n  var result = '';\n  var i;\n\n  for (i = 0; i < ranges.length; i++) {\n    result += textRange(ranges, i) + ' ';\n  }\n\n  return result;\n};\n\nvar utils = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createTransferableMessage: createTransferableMessage,\n  initSegmentId: initSegmentId,\n  segmentKeyId: segmentKeyId,\n  hexDump: hexDump,\n  tagDump: tagDump,\n  textRanges: textRanges\n}); // TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\n// 25% was arbitrarily chosen, and may need to be refined over time.\n\nvar SEGMENT_END_FUDGE_PERCENT = 0.25;\n/**\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\n *\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \"anchor\n * point\" (a point where we have a mapping from program time to player time, with player\n * time being the post transmux start of the segment).\n *\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\n *\n * @param {number} playerTime the player time\n * @param {Object} segment the segment which contains the player time\n * @return {Date} program time\n */\n\nvar playerTimeToProgramTime = function playerTimeToProgramTime(playerTime, segment) {\n  if (!segment.dateTimeObject) {\n    // Can't convert without an \"anchor point\" for the program time (i.e., a time that can\n    // be used to map the start of a segment with a real world time).\n    return null;\n  }\n\n  var transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n  var transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n  var startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n  var offsetFromSegmentStart = playerTime - startOfSegment;\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\n\nvar originalSegmentVideoDuration = function originalSegmentVideoDuration(videoTimingInfo) {\n  return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\n};\n/**\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\n * returned segment might be an estimate or an accurate match.\n *\n * @param {string} programTime The ISO-8601 programTime to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\n\nvar findSegmentForProgramTime = function findSegmentForProgramTime(programTime, playlist) {\n  // Assumptions:\n  //  - verifyProgramDateTimeTags has already been run\n  //  - live streams have been started\n  var dateTimeObject;\n\n  try {\n    dateTimeObject = new Date(programTime);\n  } catch (e) {\n    return null;\n  }\n\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n    return null;\n  }\n\n  var segment = playlist.segments[0];\n\n  if (dateTimeObject < segment.dateTimeObject) {\n    // Requested time is before stream start.\n    return null;\n  }\n\n  for (var i = 0; i < playlist.segments.length - 1; i++) {\n    segment = playlist.segments[i];\n    var nextSegmentStart = playlist.segments[i + 1].dateTimeObject;\n\n    if (dateTimeObject < nextSegmentStart) {\n      break;\n    }\n  }\n\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\n  var lastSegmentStart = lastSegment.dateTimeObject;\n  var lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n  var lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n\n  if (dateTimeObject > lastSegmentEnd) {\n    // Beyond the end of the stream, or our best guess of the end of the stream.\n    return null;\n  }\n\n  if (dateTimeObject > lastSegmentStart) {\n    segment = lastSegment;\n  }\n\n  return {\n    segment: segment,\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\n    // Although, given that all segments have accurate date time objects, the segment\n    // selected should be accurate, unless the video has been transmuxed at some point\n    // (determined by the presence of the videoTimingInfo object), the segment's \"player\n    // time\" (the start time in the player) can't be considered accurate.\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n  };\n};\n/**\n * Finds a segment that contains the given player time(in seconds).\n *\n * @param {number} time The player time to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\n\nvar findSegmentForPlayerTime = function findSegmentForPlayerTime(time, playlist) {\n  // Assumptions:\n  // - there will always be a segment.duration\n  // - we can start from zero\n  // - segments are in time order\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n    return null;\n  }\n\n  var segmentEnd = 0;\n  var segment;\n\n  for (var i = 0; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\n    // should contain the most accurate values we have for the segment's player times.\n    //\n    // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\n    // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\n    // calculate an end value.\n\n    segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\n\n    if (time <= segmentEnd) {\n      break;\n    }\n  }\n\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\n\n  if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n    // The time requested is beyond the stream end.\n    return null;\n  }\n\n  if (time > segmentEnd) {\n    // The time is within or beyond the last segment.\n    //\n    // Check to see if the time is beyond a reasonable guess of the end of the stream.\n    if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\n      // Technically, because the duration value is only an estimate, the time may still\n      // exist in the last segment, however, there isn't enough information to make even\n      // a reasonable estimate.\n      return null;\n    }\n\n    segment = lastSegment;\n  }\n\n  return {\n    segment: segment,\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\n    // Because videoTimingInfo is only set after transmux, it is the only way to get\n    // accurate timing values.\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n  };\n};\n/**\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\n * If the offset returned is positive, the programTime occurs after the\n * comparisonTimestamp.\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\n *\n * @param {string} comparisonTimeStamp An ISO-8601 timestamp to compare against\n * @param {string} programTime The programTime as an ISO-8601 string\n * @return {number} offset\n */\n\n\nvar getOffsetFromTimestamp = function getOffsetFromTimestamp(comparisonTimeStamp, programTime) {\n  var segmentDateTime;\n  var programDateTime;\n\n  try {\n    segmentDateTime = new Date(comparisonTimeStamp);\n    programDateTime = new Date(programTime);\n  } catch (e) {// TODO handle error\n  }\n\n  var segmentTimeEpoch = segmentDateTime.getTime();\n  var programTimeEpoch = programDateTime.getTime();\n  return (programTimeEpoch - segmentTimeEpoch) / 1000;\n};\n/**\n * Checks that all segments in this playlist have programDateTime tags.\n *\n * @param {Object} playlist A playlist object\n */\n\n\nvar verifyProgramDateTimeTags = function verifyProgramDateTimeTags(playlist) {\n  if (!playlist.segments || playlist.segments.length === 0) {\n    return false;\n  }\n\n  for (var i = 0; i < playlist.segments.length; i++) {\n    var segment = playlist.segments[i];\n\n    if (!segment.dateTimeObject) {\n      return false;\n    }\n  }\n\n  return true;\n};\n/**\n * Returns the programTime of the media given a playlist and a playerTime.\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\n * If the segments containing the time requested have not been buffered yet, an estimate\n * may be returned to the callback.\n *\n * @param {Object} args\n * @param {Object} args.playlist A playlist object to search within\n * @param {number} time A playerTime in seconds\n * @param {Function} callback(err, programTime)\n * @return {string} err.message A detailed error message\n * @return {Object} programTime\n * @return {number} programTime.mediaSeconds The streamTime in seconds\n * @return {string} programTime.programDateTime The programTime as an ISO-8601 String\n */\n\n\nvar getProgramTime = function getProgramTime(_ref) {\n  var playlist = _ref.playlist,\n      _ref$time = _ref.time,\n      time = _ref$time === void 0 ? undefined : _ref$time,\n      callback = _ref.callback;\n\n  if (!callback) {\n    throw new Error('getProgramTime: callback must be provided');\n  }\n\n  if (!playlist || time === undefined) {\n    return callback({\n      message: 'getProgramTime: playlist and time must be provided'\n    });\n  }\n\n  var matchedSegment = findSegmentForPlayerTime(time, playlist);\n\n  if (!matchedSegment) {\n    return callback({\n      message: 'valid programTime was not found'\n    });\n  }\n\n  if (matchedSegment.type === 'estimate') {\n    return callback({\n      message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\n      seekTime: matchedSegment.estimatedStart\n    });\n  }\n\n  var programTimeObject = {\n    mediaSeconds: time\n  };\n  var programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n\n  if (programTime) {\n    programTimeObject.programDateTime = programTime.toISOString();\n  }\n\n  return callback(null, programTimeObject);\n};\n/**\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\n *\n * @param {Object} args\n * @param {string} args.programTime A programTime to seek to as an ISO-8601 String\n * @param {Object} args.playlist A playlist to look within\n * @param {number} args.retryCount The number of times to try for an accurate seek. Default is 2.\n * @param {Function} args.seekTo A method to perform a seek\n * @param {boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\n * @param {Object} args.tech The tech to seek on\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\n * @return {string} err.message A detailed error message\n * @return {number} newTime The exact time that was seeked to in seconds\n */\n\n\nvar seekToProgramTime = function seekToProgramTime(_ref2) {\n  var programTime = _ref2.programTime,\n      playlist = _ref2.playlist,\n      _ref2$retryCount = _ref2.retryCount,\n      retryCount = _ref2$retryCount === void 0 ? 2 : _ref2$retryCount,\n      seekTo = _ref2.seekTo,\n      _ref2$pauseAfterSeek = _ref2.pauseAfterSeek,\n      pauseAfterSeek = _ref2$pauseAfterSeek === void 0 ? true : _ref2$pauseAfterSeek,\n      tech = _ref2.tech,\n      callback = _ref2.callback;\n\n  if (!callback) {\n    throw new Error('seekToProgramTime: callback must be provided');\n  }\n\n  if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n    return callback({\n      message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n    });\n  }\n\n  if (!playlist.endList && !tech.hasStarted_) {\n    return callback({\n      message: 'player must be playing a live stream to start buffering'\n    });\n  }\n\n  if (!verifyProgramDateTimeTags(playlist)) {\n    return callback({\n      message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n    });\n  }\n\n  var matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n  if (!matchedSegment) {\n    return callback({\n      message: programTime + \" was not found in the stream\"\n    });\n  }\n\n  var segment = matchedSegment.segment;\n  var mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n\n  if (matchedSegment.type === 'estimate') {\n    // we've run out of retries\n    if (retryCount === 0) {\n      return callback({\n        message: programTime + \" is not buffered yet. Try again\"\n      });\n    }\n\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\n    tech.one('seeked', function () {\n      seekToProgramTime({\n        programTime: programTime,\n        playlist: playlist,\n        retryCount: retryCount - 1,\n        seekTo: seekTo,\n        pauseAfterSeek: pauseAfterSeek,\n        tech: tech,\n        callback: callback\n      });\n    });\n    return;\n  } // Since the segment.start value is determined from the buffered end or ending time\n  // of the prior segment, the seekToTime doesn't need to account for any transmuxer\n  // modifications.\n\n\n  var seekToTime = segment.start + mediaOffset;\n\n  var seekedCallback = function seekedCallback() {\n    return callback(null, tech.currentTime());\n  }; // listen for seeked event\n\n\n  tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\n\n  if (pauseAfterSeek) {\n    tech.pause();\n  }\n\n  seekTo(seekToTime);\n}; // which will only happen if the request is complete.\n\n\nvar callbackOnCompleted = function callbackOnCompleted(request, cb) {\n  if (request.readyState === 4) {\n    return cb();\n  }\n\n  return;\n};\n\nvar containerRequest = function containerRequest(uri, xhr, cb) {\n  var bytes = [];\n  var id3Offset;\n  var finished = false;\n\n  var endRequestAndCallback = function endRequestAndCallback(err, req, type, _bytes) {\n    req.abort();\n    finished = true;\n    return cb(err, req, type, _bytes);\n  };\n\n  var progressListener = function progressListener(error, request) {\n    if (finished) {\n      return;\n    }\n\n    if (error) {\n      return endRequestAndCallback(error, request, '', bytes);\n    } // grap the new part of content that was just downloaded\n\n\n    var newPart = request.responseText.substring(bytes && bytes.byteLength || 0, request.responseText.length); // add that onto bytes\n\n    bytes = Object(_videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_15__[\"concatTypedArrays\"])(bytes, Object(_videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_15__[\"stringToBytes\"])(newPart, true));\n    id3Offset = id3Offset || Object(_videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_18__[\"getId3Offset\"])(bytes); // we need at least 10 bytes to determine a type\n    // or we need at least two bytes after an id3Offset\n\n    if (bytes.length < 10 || id3Offset && bytes.length < id3Offset + 2) {\n      return callbackOnCompleted(request, function () {\n        return endRequestAndCallback(error, request, '', bytes);\n      });\n    }\n\n    var type = Object(_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_19__[\"detectContainerForBytes\"])(bytes); // if this looks like a ts segment but we don't have enough data\n    // to see the second sync byte, wait until we have enough data\n    // before declaring it ts\n\n    if (type === 'ts' && bytes.length < 188) {\n      return callbackOnCompleted(request, function () {\n        return endRequestAndCallback(error, request, '', bytes);\n      });\n    } // this may be an unsynced ts segment\n    // wait for 376 bytes before detecting no container\n\n\n    if (!type && bytes.length < 376) {\n      return callbackOnCompleted(request, function () {\n        return endRequestAndCallback(error, request, '', bytes);\n      });\n    }\n\n    return endRequestAndCallback(null, request, type, bytes);\n  };\n\n  var options = {\n    uri: uri,\n    beforeSend: function beforeSend(request) {\n      // this forces the browser to pass the bytes to us unprocessed\n      request.overrideMimeType('text/plain; charset=x-user-defined');\n      request.addEventListener('progress', function (_ref) {\n        _ref.total;\n        _ref.loaded;\n        return callbackWrapper(request, null, {\n          statusCode: request.status\n        }, progressListener);\n      });\n    }\n  };\n  var request = xhr(options, function (error, response) {\n    return callbackWrapper(request, error, response, progressListener);\n  });\n  return request;\n};\n\nvar EventTarget = videojs.EventTarget,\n    mergeOptions = videojs.mergeOptions;\n\nvar dashPlaylistUnchanged = function dashPlaylistUnchanged(a, b) {\n  if (!isPlaylistUnchanged(a, b)) {\n    return false;\n  } // for dash the above check will often return true in scenarios where\n  // the playlist actually has changed because mediaSequence isn't a\n  // dash thing, and we often set it to 1. So if the playlists have the same amount\n  // of segments we return true.\n  // So for dash we need to make sure that the underlying segments are different.\n  // if sidx changed then the playlists are different.\n\n\n  if (a.sidx && b.sidx && (a.sidx.offset !== b.sidx.offset || a.sidx.length !== b.sidx.length)) {\n    return false;\n  } else if (!a.sidx && b.sidx || a.sidx && !b.sidx) {\n    return false;\n  } // one or the other does not have segments\n  // there was a change.\n\n\n  if (a.segments && !b.segments || !a.segments && b.segments) {\n    return false;\n  } // neither has segments nothing changed\n\n\n  if (!a.segments && !b.segments) {\n    return true;\n  } // check segments themselves\n\n\n  for (var i = 0; i < a.segments.length; i++) {\n    var aSegment = a.segments[i];\n    var bSegment = b.segments[i]; // if uris are different between segments there was a change\n\n    if (aSegment.uri !== bSegment.uri) {\n      return false;\n    } // neither segment has a byterange, there will be no byterange change.\n\n\n    if (!aSegment.byterange && !bSegment.byterange) {\n      continue;\n    }\n\n    var aByterange = aSegment.byterange;\n    var bByterange = bSegment.byterange; // if byterange only exists on one of the segments, there was a change.\n\n    if (aByterange && !bByterange || !aByterange && bByterange) {\n      return false;\n    } // if both segments have byterange with different offsets, there was a change.\n\n\n    if (aByterange.offset !== bByterange.offset || aByterange.length !== bByterange.length) {\n      return false;\n    }\n  } // if everything was the same with segments, this is the same playlist.\n\n\n  return true;\n};\n/**\n * Use the representation IDs from the mpd object to create groupIDs, the NAME is set to mandatory representation\n * ID in the parser. This allows for continuous playout across periods with the same representation IDs\n * (continuous periods as defined in DASH-IF 3.2.12). This is assumed in the mpd-parser as well. If we want to support\n * periods without continuous playback this function may need modification as well as the parser.\n */\n\n\nvar dashGroupId = function dashGroupId(type, group, label, playlist) {\n  // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n  var playlistId = playlist.attributes.NAME || label;\n  return \"placeholder-uri-\" + type + \"-\" + group + \"-\" + playlistId;\n};\n/**\n * Parses the master XML string and updates playlist URI references.\n *\n * @param {Object} config\n *        Object of arguments\n * @param {string} config.masterXml\n *        The mpd XML\n * @param {string} config.srcUrl\n *        The mpd URL\n * @param {Date} config.clientOffset\n *         A time difference between server and client\n * @param {Object} config.sidxMapping\n *        SIDX mappings for moof/mdat URIs and byte ranges\n * @return {Object}\n *         The parsed mpd manifest object\n */\n\n\nvar parseMasterXml = function parseMasterXml(_ref) {\n  var masterXml = _ref.masterXml,\n      srcUrl = _ref.srcUrl,\n      clientOffset = _ref.clientOffset,\n      sidxMapping = _ref.sidxMapping,\n      previousManifest = _ref.previousManifest;\n  var manifest = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"parse\"])(masterXml, {\n    manifestUri: srcUrl,\n    clientOffset: clientOffset,\n    sidxMapping: sidxMapping,\n    previousManifest: previousManifest\n  });\n  addPropertiesToMaster(manifest, srcUrl, dashGroupId);\n  return manifest;\n};\n/**\n * Removes any mediaGroup labels that no longer exist in the newMaster\n *\n * @param {Object} update\n *         The previous mpd object being updated\n * @param {Object} newMaster\n *         The new mpd object\n */\n\n\nvar removeOldMediaGroupLabels = function removeOldMediaGroupLabels(update, newMaster) {\n  forEachMediaGroup(update, function (properties, type, group, label) {\n    if (!(label in newMaster.mediaGroups[type][group])) {\n      delete update.mediaGroups[type][group][label];\n    }\n  });\n};\n/**\n * Returns a new master manifest that is the result of merging an updated master manifest\n * into the original version.\n *\n * @param {Object} oldMaster\n *        The old parsed mpd object\n * @param {Object} newMaster\n *        The updated parsed mpd object\n * @return {Object}\n *         A new object representing the original master manifest with the updated media\n *         playlists merged in\n */\n\n\nvar updateMaster = function updateMaster(oldMaster, newMaster, sidxMapping) {\n  var noChanges = true;\n  var update = mergeOptions(oldMaster, {\n    // These are top level properties that can be updated\n    duration: newMaster.duration,\n    minimumUpdatePeriod: newMaster.minimumUpdatePeriod,\n    timelineStarts: newMaster.timelineStarts\n  }); // First update the playlists in playlist list\n\n  for (var i = 0; i < newMaster.playlists.length; i++) {\n    var playlist = newMaster.playlists[i];\n\n    if (playlist.sidx) {\n      var sidxKey = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"generateSidxKey\"])(playlist.sidx); // add sidx segments to the playlist if we have all the sidx info already\n\n      if (sidxMapping && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx) {\n        Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"addSidxSegmentsToPlaylist\"])(playlist, sidxMapping[sidxKey].sidx, playlist.sidx.resolvedUri);\n      }\n    }\n\n    var playlistUpdate = updateMaster$1(update, playlist, dashPlaylistUnchanged);\n\n    if (playlistUpdate) {\n      update = playlistUpdate;\n      noChanges = false;\n    }\n  } // Then update media group playlists\n\n\n  forEachMediaGroup(newMaster, function (properties, type, group, label) {\n    if (properties.playlists && properties.playlists.length) {\n      var id = properties.playlists[0].id;\n\n      var _playlistUpdate = updateMaster$1(update, properties.playlists[0], dashPlaylistUnchanged);\n\n      if (_playlistUpdate) {\n        update = _playlistUpdate; // add new mediaGroup label if it doesn't exist and assign the new mediaGroup.\n\n        if (!(label in update.mediaGroups[type][group])) {\n          update.mediaGroups[type][group][label] = properties;\n        } // update the playlist reference within media groups\n\n\n        update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\n        noChanges = false;\n      }\n    }\n  }); // remove mediaGroup labels and references that no longer exist in the newMaster\n\n  removeOldMediaGroupLabels(update, newMaster);\n\n  if (newMaster.minimumUpdatePeriod !== oldMaster.minimumUpdatePeriod) {\n    noChanges = false;\n  }\n\n  if (noChanges) {\n    return null;\n  }\n\n  return update;\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\n// If the SIDXs have maps, the two maps should match,\n// both `a` and `b` missing SIDXs is considered matching.\n// If `a` or `b` but not both have a map, they aren't matching.\n\n\nvar equivalentSidx = function equivalentSidx(a, b) {\n  var neitherMap = Boolean(!a.map && !b.map);\n  var equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\n  return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\n}; // exported for testing\n\n\nvar compareSidxEntry = function compareSidxEntry(playlists, oldSidxMapping) {\n  var newSidxMapping = {};\n\n  for (var id in playlists) {\n    var playlist = playlists[id];\n    var currentSidxInfo = playlist.sidx;\n\n    if (currentSidxInfo) {\n      var key = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"generateSidxKey\"])(currentSidxInfo);\n\n      if (!oldSidxMapping[key]) {\n        break;\n      }\n\n      var savedSidxInfo = oldSidxMapping[key].sidxInfo;\n\n      if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n        newSidxMapping[key] = oldSidxMapping[key];\n      }\n    }\n  }\n\n  return newSidxMapping;\n};\n/**\n *  A function that filters out changed items as they need to be requested separately.\n *\n *  The method is exported for testing\n *\n *  @param {Object} master the parsed mpd XML returned via mpd-parser\n *  @param {Object} oldSidxMapping the SIDX to compare against\n */\n\n\nvar filterChangedSidxMappings = function filterChangedSidxMappings(master, oldSidxMapping) {\n  var videoSidx = compareSidxEntry(master.playlists, oldSidxMapping);\n  var mediaGroupSidx = videoSidx;\n  forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\n    if (properties.playlists && properties.playlists.length) {\n      var playlists = properties.playlists;\n      mediaGroupSidx = mergeOptions(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n    }\n  });\n  return mediaGroupSidx;\n};\n\nvar DashPlaylistLoader = /*#__PURE__*/function (_EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(DashPlaylistLoader, _EventTarget); // DashPlaylistLoader must accept either a src url or a playlist because subsequent\n  // playlist loader setups from media groups will expect to be able to pass a playlist\n  // (since there aren't external URLs to media playlists with DASH)\n\n\n  function DashPlaylistLoader(srcUrlOrPlaylist, vhs, options, masterPlaylistLoader) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _EventTarget.call(this) || this;\n    _this.masterPlaylistLoader_ = masterPlaylistLoader || _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this);\n\n    if (!masterPlaylistLoader) {\n      _this.isMaster_ = true;\n    }\n\n    var _options = options,\n        _options$withCredenti = _options.withCredentials,\n        withCredentials = _options$withCredenti === void 0 ? false : _options$withCredenti,\n        _options$handleManife = _options.handleManifestRedirects,\n        handleManifestRedirects = _options$handleManife === void 0 ? false : _options$handleManife;\n    _this.vhs_ = vhs;\n    _this.withCredentials = withCredentials;\n    _this.handleManifestRedirects = handleManifestRedirects;\n\n    if (!srcUrlOrPlaylist) {\n      throw new Error('A non-empty playlist URL or object is required');\n    } // event naming?\n\n\n    _this.on('minimumUpdatePeriod', function () {\n      _this.refreshXml_();\n    }); // live playlist staleness timeout\n\n\n    _this.on('mediaupdatetimeout', function () {\n      _this.refreshMedia_(_this.media().id);\n    });\n\n    _this.state = 'HAVE_NOTHING';\n    _this.loadedPlaylists_ = {};\n    _this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n    // The masterPlaylistLoader will be created with a string\n\n    if (_this.isMaster_) {\n      _this.masterPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n      // once multi-period is refactored\n\n      _this.masterPlaylistLoader_.sidxMapping_ = {};\n    } else {\n      _this.childPlaylist_ = srcUrlOrPlaylist;\n    }\n\n    return _this;\n  }\n\n  var _proto = DashPlaylistLoader.prototype;\n\n  _proto.requestErrored_ = function requestErrored_(err, request, startingState) {\n    // disposed\n    if (!this.request) {\n      return true;\n    } // pending request is cleared\n\n\n    this.request = null;\n\n    if (err) {\n      // use the provided error object or create one\n      // based on the request/response\n      this.error = typeof err === 'object' && !(err instanceof Error) ? err : {\n        status: request.status,\n        message: 'DASH request error at URL: ' + request.uri,\n        response: request.response,\n        // MEDIA_ERR_NETWORK\n        code: 2\n      };\n\n      if (startingState) {\n        this.state = startingState;\n      }\n\n      this.trigger('error');\n      return true;\n    }\n  }\n  /**\n   * Verify that the container of the sidx segment can be parsed\n   * and if it can, get and parse that segment.\n   */\n  ;\n\n  _proto.addSidxSegments_ = function addSidxSegments_(playlist, startingState, cb) {\n    var _this2 = this;\n\n    var sidxKey = playlist.sidx && Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"generateSidxKey\"])(playlist.sidx); // playlist lacks sidx or sidx segments were added to this playlist already.\n\n    if (!playlist.sidx || !sidxKey || this.masterPlaylistLoader_.sidxMapping_[sidxKey]) {\n      // keep this function async\n      this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        return cb(false);\n      }, 0);\n      return;\n    } // resolve the segment URL relative to the playlist\n\n\n    var uri = resolveManifestRedirect(this.handleManifestRedirects, playlist.sidx.resolvedUri);\n\n    var fin = function fin(err, request) {\n      if (_this2.requestErrored_(err, request, startingState)) {\n        return;\n      }\n\n      var sidxMapping = _this2.masterPlaylistLoader_.sidxMapping_;\n      var sidx;\n\n      try {\n        sidx = mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_17___default()(Object(_videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_15__[\"toUint8\"])(request.response).subarray(8));\n      } catch (e) {\n        // sidx parsing failed.\n        _this2.requestErrored_(e, request, startingState);\n\n        return;\n      }\n\n      sidxMapping[sidxKey] = {\n        sidxInfo: playlist.sidx,\n        sidx: sidx\n      };\n      Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"addSidxSegmentsToPlaylist\"])(playlist, sidx, playlist.sidx.resolvedUri);\n      return cb(true);\n    };\n\n    this.request = containerRequest(uri, this.vhs_.xhr, function (err, request, container, bytes) {\n      if (err) {\n        return fin(err, request);\n      }\n\n      if (!container || container !== 'mp4') {\n        return fin({\n          status: request.status,\n          message: \"Unsupported \" + (container || 'unknown') + \" container type for sidx segment at URL: \" + uri,\n          // response is just bytes in this case\n          // but we really don't want to return that.\n          response: '',\n          playlist: playlist,\n          internal: true,\n          blacklistDuration: Infinity,\n          // MEDIA_ERR_NETWORK\n          code: 2\n        }, request);\n      } // if we already downloaded the sidx bytes in the container request, use them\n\n\n      var _playlist$sidx$bytera = playlist.sidx.byterange,\n          offset = _playlist$sidx$bytera.offset,\n          length = _playlist$sidx$bytera.length;\n\n      if (bytes.length >= length + offset) {\n        return fin(err, {\n          response: bytes.subarray(offset, offset + length),\n          status: request.status,\n          uri: request.uri\n        });\n      } // otherwise request sidx bytes\n\n\n      _this2.request = _this2.vhs_.xhr({\n        uri: uri,\n        responseType: 'arraybuffer',\n        headers: segmentXhrHeaders({\n          byterange: playlist.sidx.byterange\n        })\n      }, fin);\n    });\n  };\n\n  _proto.dispose = function dispose() {\n    this.trigger('dispose');\n    this.stopRequest();\n    this.loadedPlaylists_ = {};\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaRequest_);\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    this.mediaRequest_ = null;\n    this.minimumUpdatePeriodTimeout_ = null;\n\n    if (this.masterPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.masterPlaylistLoader_.createMupOnMedia_);\n      this.masterPlaylistLoader_.createMupOnMedia_ = null;\n    }\n\n    this.off();\n  };\n\n  _proto.hasPendingRequest = function hasPendingRequest() {\n    return this.request || this.mediaRequest_;\n  };\n\n  _proto.stopRequest = function stopRequest() {\n    if (this.request) {\n      var oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  };\n\n  _proto.media = function media(playlist) {\n    var _this3 = this; // getter\n\n\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\n\n    if (this.state === 'HAVE_NOTHING') {\n      throw new Error('Cannot switch media playlist from ' + this.state);\n    }\n\n    var startingState = this.state; // find the playlist object if the target playlist has been specified by URI\n\n    if (typeof playlist === 'string') {\n      if (!this.masterPlaylistLoader_.master.playlists[playlist]) {\n        throw new Error('Unknown playlist URI: ' + playlist);\n      }\n\n      playlist = this.masterPlaylistLoader_.master.playlists[playlist];\n    }\n\n    var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\n\n    if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\n      this.state = 'HAVE_METADATA';\n      this.media_ = playlist; // trigger media change if the active media has been updated\n\n      if (mediaChange) {\n        this.trigger('mediachanging');\n        this.trigger('mediachange');\n      }\n\n      return;\n    } // switching to the active playlist is a no-op\n\n\n    if (!mediaChange) {\n      return;\n    } // switching from an already loaded playlist\n\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n\n    this.addSidxSegments_(playlist, startingState, function (sidxChanged) {\n      // everything is ready just continue to haveMetadata\n      _this3.haveMetadata({\n        startingState: startingState,\n        playlist: playlist\n      });\n    });\n  };\n\n  _proto.haveMetadata = function haveMetadata(_ref2) {\n    var startingState = _ref2.startingState,\n        playlist = _ref2.playlist;\n    this.state = 'HAVE_METADATA';\n    this.loadedPlaylists_[playlist.id] = playlist;\n    this.mediaRequest_ = null; // This will trigger loadedplaylist\n\n    this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\n    // to resolve setup of media groups\n\n    if (startingState === 'HAVE_MASTER') {\n      this.trigger('loadedmetadata');\n    } else {\n      // trigger media change if the active media has been updated\n      this.trigger('mediachange');\n    }\n  };\n\n  _proto.pause = function pause() {\n    if (this.masterPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.masterPlaylistLoader_.createMupOnMedia_);\n      this.masterPlaylistLoader_.createMupOnMedia_ = null;\n    }\n\n    this.stopRequest();\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n\n    if (this.isMaster_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_);\n      this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_ = null;\n    }\n\n    if (this.state === 'HAVE_NOTHING') {\n      // If we pause the loader before any data has been retrieved, its as if we never\n      // started, so reset to an unstarted state.\n      this.started = false;\n    }\n  };\n\n  _proto.load = function load(isFinalRendition) {\n    var _this4 = this;\n\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    var media = this.media();\n\n    if (isFinalRendition) {\n      var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        return _this4.load();\n      }, delay);\n      return;\n    } // because the playlists are internal to the manifest, load should either load the\n    // main manifest, or do nothing but trigger an event\n\n\n    if (!this.started) {\n      this.start();\n      return;\n    }\n\n    if (media && !media.endList) {\n      // Check to see if this is the master loader and the MUP was cleared (this happens\n      // when the loader was paused). `media` should be set at this point since one is always\n      // set during `start()`.\n      if (this.isMaster_ && !this.minimumUpdatePeriodTimeout_) {\n        // Trigger minimumUpdatePeriod to refresh the master manifest\n        this.trigger('minimumUpdatePeriod'); // Since there was no prior minimumUpdatePeriodTimeout it should be recreated\n\n        this.updateMinimumUpdatePeriodTimeout_();\n      }\n\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  };\n\n  _proto.start = function start() {\n    var _this5 = this;\n\n    this.started = true; // We don't need to request the master manifest again\n    // Call this asynchronously to match the xhr request behavior below\n\n    if (!this.isMaster_) {\n      this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        return _this5.haveMaster_();\n      }, 0);\n      return;\n    }\n\n    this.requestMaster_(function (req, masterChanged) {\n      _this5.haveMaster_();\n\n      if (!_this5.hasPendingRequest() && !_this5.media_) {\n        _this5.media(_this5.masterPlaylistLoader_.master.playlists[0]);\n      }\n    });\n  };\n\n  _proto.requestMaster_ = function requestMaster_(cb) {\n    var _this6 = this;\n\n    this.request = this.vhs_.xhr({\n      uri: this.masterPlaylistLoader_.srcUrl,\n      withCredentials: this.withCredentials\n    }, function (error, req) {\n      if (_this6.requestErrored_(error, req)) {\n        if (_this6.state === 'HAVE_NOTHING') {\n          _this6.started = false;\n        }\n\n        return;\n      }\n\n      var masterChanged = req.responseText !== _this6.masterPlaylistLoader_.masterXml_;\n      _this6.masterPlaylistLoader_.masterXml_ = req.responseText;\n\n      if (req.responseHeaders && req.responseHeaders.date) {\n        _this6.masterLoaded_ = Date.parse(req.responseHeaders.date);\n      } else {\n        _this6.masterLoaded_ = Date.now();\n      }\n\n      _this6.masterPlaylistLoader_.srcUrl = resolveManifestRedirect(_this6.handleManifestRedirects, _this6.masterPlaylistLoader_.srcUrl, req);\n\n      if (masterChanged) {\n        _this6.handleMaster_();\n\n        _this6.syncClientServerClock_(function () {\n          return cb(req, masterChanged);\n        });\n\n        return;\n      }\n\n      return cb(req, masterChanged);\n    });\n  }\n  /**\n   * Parses the master xml for UTCTiming node to sync the client clock to the server\n   * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\n   *\n   * @param {Function} done\n   *        Function to call when clock sync has completed\n   */\n  ;\n\n  _proto.syncClientServerClock_ = function syncClientServerClock_(done) {\n    var _this7 = this;\n\n    var utcTiming = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_16__[\"parseUTCTiming\"])(this.masterPlaylistLoader_.masterXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\n    // server clock\n\n    if (utcTiming === null) {\n      this.masterPlaylistLoader_.clientOffset_ = this.masterLoaded_ - Date.now();\n      return done();\n    }\n\n    if (utcTiming.method === 'DIRECT') {\n      this.masterPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now();\n      return done();\n    }\n\n    this.request = this.vhs_.xhr({\n      uri: resolveUrl(this.masterPlaylistLoader_.srcUrl, utcTiming.value),\n      method: utcTiming.method,\n      withCredentials: this.withCredentials\n    }, function (error, req) {\n      // disposed\n      if (!_this7.request) {\n        return;\n      }\n\n      if (error) {\n        // sync request failed, fall back to using date header from mpd\n        // TODO: log warning\n        _this7.masterPlaylistLoader_.clientOffset_ = _this7.masterLoaded_ - Date.now();\n        return done();\n      }\n\n      var serverTime;\n\n      if (utcTiming.method === 'HEAD') {\n        if (!req.responseHeaders || !req.responseHeaders.date) {\n          // expected date header not preset, fall back to using date header from mpd\n          // TODO: log warning\n          serverTime = _this7.masterLoaded_;\n        } else {\n          serverTime = Date.parse(req.responseHeaders.date);\n        }\n      } else {\n        serverTime = Date.parse(req.responseText);\n      }\n\n      _this7.masterPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n      done();\n    });\n  };\n\n  _proto.haveMaster_ = function haveMaster_() {\n    this.state = 'HAVE_MASTER';\n\n    if (this.isMaster_) {\n      // We have the master playlist at this point, so\n      // trigger this to allow MasterPlaylistController\n      // to make an initial playlist selection\n      this.trigger('loadedplaylist');\n    } else if (!this.media_) {\n      // no media playlist was specifically selected so select\n      // the one the child playlist loader was created with\n      this.media(this.childPlaylist_);\n    }\n  };\n\n  _proto.handleMaster_ = function handleMaster_() {\n    // clear media request\n    this.mediaRequest_ = null;\n    var oldMaster = this.masterPlaylistLoader_.master;\n    var newMaster = parseMasterXml({\n      masterXml: this.masterPlaylistLoader_.masterXml_,\n      srcUrl: this.masterPlaylistLoader_.srcUrl,\n      clientOffset: this.masterPlaylistLoader_.clientOffset_,\n      sidxMapping: this.masterPlaylistLoader_.sidxMapping_,\n      previousManifest: oldMaster\n    }); // if we have an old master to compare the new master against\n\n    if (oldMaster) {\n      newMaster = updateMaster(oldMaster, newMaster, this.masterPlaylistLoader_.sidxMapping_);\n    } // only update master if we have a new master\n\n\n    this.masterPlaylistLoader_.master = newMaster ? newMaster : oldMaster;\n    var location = this.masterPlaylistLoader_.master.locations && this.masterPlaylistLoader_.master.locations[0];\n\n    if (location && location !== this.masterPlaylistLoader_.srcUrl) {\n      this.masterPlaylistLoader_.srcUrl = location;\n    }\n\n    if (!oldMaster || newMaster && newMaster.minimumUpdatePeriod !== oldMaster.minimumUpdatePeriod) {\n      this.updateMinimumUpdatePeriodTimeout_();\n    }\n\n    return Boolean(newMaster);\n  };\n\n  _proto.updateMinimumUpdatePeriodTimeout_ = function updateMinimumUpdatePeriodTimeout_() {\n    var mpl = this.masterPlaylistLoader_; // cancel any pending creation of mup on media\n    // a new one will be added if needed.\n\n    if (mpl.createMupOnMedia_) {\n      mpl.off('loadedmetadata', mpl.createMupOnMedia_);\n      mpl.createMupOnMedia_ = null;\n    } // clear any pending timeouts\n\n\n    if (mpl.minimumUpdatePeriodTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n      mpl.minimumUpdatePeriodTimeout_ = null;\n    }\n\n    var mup = mpl.master && mpl.master.minimumUpdatePeriod; // If the minimumUpdatePeriod has a value of 0, that indicates that the current\n    // MPD has no future validity, so a new one will need to be acquired when new\n    // media segments are to be made available. Thus, we use the target duration\n    // in this case\n\n    if (mup === 0) {\n      if (mpl.media()) {\n        mup = mpl.media().targetDuration * 1000;\n      } else {\n        mpl.createMupOnMedia_ = mpl.updateMinimumUpdatePeriodTimeout_;\n        mpl.one('loadedmetadata', mpl.createMupOnMedia_);\n      }\n    } // if minimumUpdatePeriod is invalid or <= zero, which\n    // can happen when a live video becomes VOD. skip timeout\n    // creation.\n\n\n    if (typeof mup !== 'number' || mup <= 0) {\n      if (mup < 0) {\n        this.logger_(\"found invalid minimumUpdatePeriod of \" + mup + \", not setting a timeout\");\n      }\n\n      return;\n    }\n\n    this.createMUPTimeout_(mup);\n  };\n\n  _proto.createMUPTimeout_ = function createMUPTimeout_(mup) {\n    var mpl = this.masterPlaylistLoader_;\n    mpl.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n      mpl.minimumUpdatePeriodTimeout_ = null;\n      mpl.trigger('minimumUpdatePeriod');\n      mpl.createMUPTimeout_(mup);\n    }, mup);\n  }\n  /**\n   * Sends request to refresh the master xml and updates the parsed master manifest\n   */\n  ;\n\n  _proto.refreshXml_ = function refreshXml_() {\n    var _this8 = this;\n\n    this.requestMaster_(function (req, masterChanged) {\n      if (!masterChanged) {\n        return;\n      }\n\n      if (_this8.media_) {\n        _this8.media_ = _this8.masterPlaylistLoader_.master.playlists[_this8.media_.id];\n      } // This will filter out updated sidx info from the mapping\n\n\n      _this8.masterPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(_this8.masterPlaylistLoader_.master, _this8.masterPlaylistLoader_.sidxMapping_);\n\n      _this8.addSidxSegments_(_this8.media(), _this8.state, function (sidxChanged) {\n        // TODO: do we need to reload the current playlist?\n        _this8.refreshMedia_(_this8.media().id);\n      });\n    });\n  }\n  /**\n   * Refreshes the media playlist by re-parsing the master xml and updating playlist\n   * references. If this is an alternate loader, the updated parsed manifest is retrieved\n   * from the master loader.\n   */\n  ;\n\n  _proto.refreshMedia_ = function refreshMedia_(mediaID) {\n    var _this9 = this;\n\n    if (!mediaID) {\n      throw new Error('refreshMedia_ must take a media id');\n    } // for master we have to reparse the master xml\n    // to re-create segments based on current timing values\n    // which may change media. We only skip updating master\n    // if this is the first time this.media_ is being set.\n    // as master was just parsed in that case.\n\n\n    if (this.media_ && this.isMaster_) {\n      this.handleMaster_();\n    }\n\n    var playlists = this.masterPlaylistLoader_.master.playlists;\n    var mediaChanged = !this.media_ || this.media_ !== playlists[mediaID];\n\n    if (mediaChanged) {\n      this.media_ = playlists[mediaID];\n    } else {\n      this.trigger('playlistunchanged');\n    }\n\n    if (!this.mediaUpdateTimeout) {\n      var createMediaUpdateTimeout = function createMediaUpdateTimeout() {\n        if (_this9.media().endList) {\n          return;\n        }\n\n        _this9.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n          _this9.trigger('mediaupdatetimeout');\n\n          createMediaUpdateTimeout();\n        }, refreshDelay(_this9.media(), Boolean(mediaChanged)));\n      };\n\n      createMediaUpdateTimeout();\n    }\n\n    this.trigger('loadedplaylist');\n  };\n\n  return DashPlaylistLoader;\n}(EventTarget);\n\nvar Config = {\n  GOAL_BUFFER_LENGTH: 30,\n  MAX_GOAL_BUFFER_LENGTH: 60,\n  BACK_BUFFER_LENGTH: 30,\n  GOAL_BUFFER_LENGTH_RATE: 1,\n  // 0.5 MB/s\n  INITIAL_BANDWIDTH: 4194304,\n  // A fudge factor to apply to advertised playlist bitrates to account for\n  // temporary flucations in client bandwidth\n  BANDWIDTH_VARIANCE: 1.2,\n  // How much of the buffer must be filled before we consider upswitching\n  BUFFER_LOW_WATER_LINE: 0,\n  MAX_BUFFER_LOW_WATER_LINE: 30,\n  // TODO: Remove this when experimentalBufferBasedABR is removed\n  EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE: 16,\n  BUFFER_LOW_WATER_LINE_RATE: 1,\n  // If the buffer is greater than the high water line, we won't switch down\n  BUFFER_HIGH_WATER_LINE: 30\n};\n\nvar stringToArrayBuffer = function stringToArrayBuffer(string) {\n  var view = new Uint8Array(new ArrayBuffer(string.length));\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n\n  return view.buffer;\n};\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\n\n\nvar browserWorkerPolyFill = function browserWorkerPolyFill(workerObj) {\n  // node only supports on/off\n  workerObj.on = workerObj.addEventListener;\n  workerObj.off = workerObj.removeEventListener;\n  return workerObj;\n};\n\nvar createObjectURL = function createObjectURL(str) {\n  try {\n    return URL.createObjectURL(new Blob([str], {\n      type: 'application/javascript'\n    }));\n  } catch (e) {\n    var blob = new BlobBuilder();\n    blob.append(str);\n    return URL.createObjectURL(blob.getBlob());\n  }\n};\n\nvar factory = function factory(code) {\n  return function () {\n    var objectUrl = createObjectURL(code);\n    var worker = browserWorkerPolyFill(new Worker(objectUrl));\n    worker.objURL = objectUrl;\n    var terminate = worker.terminate;\n    worker.on = worker.addEventListener;\n    worker.off = worker.removeEventListener;\n\n    worker.terminate = function () {\n      URL.revokeObjectURL(objectUrl);\n      return terminate.call(this);\n    };\n\n    return worker;\n  };\n};\n\nvar transform = function transform(code) {\n  return \"var browserWorkerPolyFill = \" + browserWorkerPolyFill.toString() + \";\\n\" + 'browserWorkerPolyFill(self);\\n' + code;\n};\n\nvar getWorkerString = function getWorkerString(fn) {\n  return fn.toString().replace(/^function.+?{/, '').slice(0, -1);\n};\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\n\nvar workerCode$1 = transform(getWorkerString(function () {\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * A lightweight readable stream implemention that handles event dispatching.\n   * Objects that inherit from streams should call init in their constructors.\n   */\n  var Stream = function Stream() {\n    this.init = function () {\n      var listeners = {};\n      /**\n       * Add a listener for a specified event type.\n       * @param type {string} the event name\n       * @param listener {function} the callback to be invoked when an event of\n       * the specified type occurs\n       */\n\n      this.on = function (type, listener) {\n        if (!listeners[type]) {\n          listeners[type] = [];\n        }\n\n        listeners[type] = listeners[type].concat(listener);\n      };\n      /**\n       * Remove a listener for a specified event type.\n       * @param type {string} the event name\n       * @param listener {function} a function previously registered for this\n       * type of event through `on`\n       */\n\n\n      this.off = function (type, listener) {\n        var index;\n\n        if (!listeners[type]) {\n          return false;\n        }\n\n        index = listeners[type].indexOf(listener);\n        listeners[type] = listeners[type].slice();\n        listeners[type].splice(index, 1);\n        return index > -1;\n      };\n      /**\n       * Trigger an event of the specified type on this stream. Any additional\n       * arguments to this function are passed as parameters to event listeners.\n       * @param type {string} the event name\n       */\n\n\n      this.trigger = function (type) {\n        var callbacks, i, length, args;\n        callbacks = listeners[type];\n\n        if (!callbacks) {\n          return;\n        } // Slicing the arguments on every invocation of this method\n        // can add a significant amount of overhead. Avoid the\n        // intermediate object creation for the common case of a\n        // single callback argument\n\n\n        if (arguments.length === 2) {\n          length = callbacks.length;\n\n          for (i = 0; i < length; ++i) {\n            callbacks[i].call(this, arguments[1]);\n          }\n        } else {\n          args = [];\n          i = arguments.length;\n\n          for (i = 1; i < arguments.length; ++i) {\n            args.push(arguments[i]);\n          }\n\n          length = callbacks.length;\n\n          for (i = 0; i < length; ++i) {\n            callbacks[i].apply(this, args);\n          }\n        }\n      };\n      /**\n       * Destroys the stream and cleans up.\n       */\n\n\n      this.dispose = function () {\n        listeners = {};\n      };\n    };\n  };\n  /**\n   * Forwards all `data` events on this stream to the destination stream. The\n   * destination stream should provide a method `push` to receive the data\n   * events as they arrive.\n   * @param destination {stream} the stream that will receive all `data` events\n   * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n   *                            when the current stream emits a 'done' event\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n   */\n\n\n  Stream.prototype.pipe = function (destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n    this.on('done', function (flushSource) {\n      destination.flush(flushSource);\n    });\n    this.on('partialdone', function (flushSource) {\n      destination.partialFlush(flushSource);\n    });\n    this.on('endedtimeline', function (flushSource) {\n      destination.endTimeline(flushSource);\n    });\n    this.on('reset', function (flushSource) {\n      destination.reset(flushSource);\n    });\n    return destination;\n  }; // Default stream functions that are expected to be overridden to perform\n  // actual work. These are provided by the prototype as a sort of no-op\n  // implementation so that we don't have to check for their existence in the\n  // `pipe` function above.\n\n\n  Stream.prototype.push = function (data) {\n    this.trigger('data', data);\n  };\n\n  Stream.prototype.flush = function (flushSource) {\n    this.trigger('done', flushSource);\n  };\n\n  Stream.prototype.partialFlush = function (flushSource) {\n    this.trigger('partialdone', flushSource);\n  };\n\n  Stream.prototype.endTimeline = function (flushSource) {\n    this.trigger('endedtimeline', flushSource);\n  };\n\n  Stream.prototype.reset = function (flushSource) {\n    this.trigger('reset', flushSource);\n  };\n\n  var stream = Stream;\n  var MAX_UINT32$1 = Math.pow(2, 32);\n\n  var getUint64$2 = function getUint64(uint8) {\n    var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n    var value;\n\n    if (dv.getBigUint64) {\n      value = dv.getBigUint64(0);\n\n      if (value < Number.MAX_SAFE_INTEGER) {\n        return Number(value);\n      }\n\n      return value;\n    }\n\n    return dv.getUint32(0) * MAX_UINT32$1 + dv.getUint32(4);\n  };\n\n  var numbers = {\n    getUint64: getUint64$2,\n    MAX_UINT32: MAX_UINT32$1\n  };\n  var MAX_UINT32 = numbers.MAX_UINT32;\n  var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun$1, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\n\n  (function () {\n    var i;\n    types = {\n      avc1: [],\n      // codingname\n      avcC: [],\n      btrt: [],\n      dinf: [],\n      dref: [],\n      esds: [],\n      ftyp: [],\n      hdlr: [],\n      mdat: [],\n      mdhd: [],\n      mdia: [],\n      mfhd: [],\n      minf: [],\n      moof: [],\n      moov: [],\n      mp4a: [],\n      // codingname\n      mvex: [],\n      mvhd: [],\n      pasp: [],\n      sdtp: [],\n      smhd: [],\n      stbl: [],\n      stco: [],\n      stsc: [],\n      stsd: [],\n      stsz: [],\n      stts: [],\n      styp: [],\n      tfdt: [],\n      tfhd: [],\n      traf: [],\n      trak: [],\n      trun: [],\n      trex: [],\n      tkhd: [],\n      vmhd: []\n    }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n    // don't throw an error\n\n    if (typeof Uint8Array === 'undefined') {\n      return;\n    }\n\n    for (i in types) {\n      if (types.hasOwnProperty(i)) {\n        types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n      }\n    }\n\n    MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\n    AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\n    MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n    VIDEO_HDLR = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // pre_defined\n    0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n    ]);\n    AUDIO_HDLR = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // pre_defined\n    0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n    ]);\n    HDLR_TYPES = {\n      video: VIDEO_HDLR,\n      audio: AUDIO_HDLR\n    };\n    DREF = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x01, // entry_count\n    0x00, 0x00, 0x00, 0x0c, // entry_size\n    0x75, 0x72, 0x6c, 0x20, // 'url' type\n    0x00, // version 0\n    0x00, 0x00, 0x01 // entry_flags\n    ]);\n    SMHD = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, // balance, 0 means centered\n    0x00, 0x00 // reserved\n    ]);\n    STCO = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00 // entry_count\n    ]);\n    STSC = STCO;\n    STSZ = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // sample_size\n    0x00, 0x00, 0x00, 0x00 // sample_count\n    ]);\n    STTS = STCO;\n    VMHD = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x01, // flags\n    0x00, 0x00, // graphicsmode\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n    ]);\n  })();\n\n  box = function box(type) {\n    var payload = [],\n        size = 0,\n        i,\n        result,\n        view;\n\n    for (i = 1; i < arguments.length; i++) {\n      payload.push(arguments[i]);\n    }\n\n    i = payload.length; // calculate the total size we need to allocate\n\n    while (i--) {\n      size += payload[i].byteLength;\n    }\n\n    result = new Uint8Array(size + 8);\n    view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n    view.setUint32(0, result.byteLength);\n    result.set(type, 4); // copy the payload into the result\n\n    for (i = 0, size = 8; i < payload.length; i++) {\n      result.set(payload[i], size);\n      size += payload[i].byteLength;\n    }\n\n    return result;\n  };\n\n  dinf = function dinf() {\n    return box(types.dinf, box(types.dref, DREF));\n  };\n\n  esds = function esds(track) {\n    return box(types.esds, new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    // ES_Descriptor\n    0x03, // tag, ES_DescrTag\n    0x19, // length\n    0x00, 0x00, // ES_ID\n    0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\n    // DecoderConfigDescriptor\n    0x04, // tag, DecoderConfigDescrTag\n    0x11, // length\n    0x40, // object type\n    0x15, // streamType\n    0x00, 0x06, 0x00, // bufferSizeDB\n    0x00, 0x00, 0xda, 0xc0, // maxBitrate\n    0x00, 0x00, 0xda, 0xc0, // avgBitrate\n    // DecoderSpecificInfo\n    0x05, // tag, DecoderSpecificInfoTag\n    0x02, // length\n    // ISO/IEC 14496-3, AudioSpecificConfig\n    // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n    track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\n    ]));\n  };\n\n  ftyp = function ftyp() {\n    return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n  };\n\n  hdlr = function hdlr(type) {\n    return box(types.hdlr, HDLR_TYPES[type]);\n  };\n\n  mdat = function mdat(data) {\n    return box(types.mdat, data);\n  };\n\n  mdhd = function mdhd(track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x02, // creation_time\n    0x00, 0x00, 0x00, 0x03, // modification_time\n    0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n    track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF, // duration\n    0x55, 0xc4, // 'und' language (undetermined)\n    0x00, 0x00]); // Use the sample rate from the track metadata, when it is\n    // defined. The sample rate can be parsed out of an ADTS header, for\n    // instance.\n\n    if (track.samplerate) {\n      result[12] = track.samplerate >>> 24 & 0xFF;\n      result[13] = track.samplerate >>> 16 & 0xFF;\n      result[14] = track.samplerate >>> 8 & 0xFF;\n      result[15] = track.samplerate & 0xFF;\n    }\n\n    return box(types.mdhd, result);\n  };\n\n  mdia = function mdia(track) {\n    return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n  };\n\n  mfhd = function mfhd(sequenceNumber) {\n    return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\n    (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n    ]));\n  };\n\n  minf = function minf(track) {\n    return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n  };\n\n  moof = function moof(sequenceNumber, tracks) {\n    var trackFragments = [],\n        i = tracks.length; // build traf boxes for each track fragment\n\n    while (i--) {\n      trackFragments[i] = traf(tracks[i]);\n    }\n\n    return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\n  };\n  /**\n   * Returns a movie box.\n   * @param tracks {array} the tracks associated with this movie\n   * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n   */\n\n\n  moov = function moov(tracks) {\n    var i = tracks.length,\n        boxes = [];\n\n    while (i--) {\n      boxes[i] = trak(tracks[i]);\n    }\n\n    return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n  };\n\n  mvex = function mvex(tracks) {\n    var i = tracks.length,\n        boxes = [];\n\n    while (i--) {\n      boxes[i] = trex(tracks[i]);\n    }\n\n    return box.apply(null, [types.mvex].concat(boxes));\n  };\n\n  mvhd = function mvhd(duration) {\n    var bytes = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x01, // creation_time\n    0x00, 0x00, 0x00, 0x02, // modification_time\n    0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n    (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF, // duration\n    0x00, 0x01, 0x00, 0x00, // 1.0 rate\n    0x01, 0x00, // 1.0 volume\n    0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n    0xff, 0xff, 0xff, 0xff // next_track_ID\n    ]);\n    return box(types.mvhd, bytes);\n  };\n\n  sdtp = function sdtp(track) {\n    var samples = track.samples || [],\n        bytes = new Uint8Array(4 + samples.length),\n        flags,\n        i; // leave the full box header (4 bytes) all zero\n    // write the sample table\n\n    for (i = 0; i < samples.length; i++) {\n      flags = samples[i].flags;\n      bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n    }\n\n    return box(types.sdtp, bytes);\n  };\n\n  stbl = function stbl(track) {\n    return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\n  };\n\n  (function () {\n    var videoSample, audioSample;\n\n    stsd = function stsd(track) {\n      return box(types.stsd, new Uint8Array([0x00, // version 0\n      0x00, 0x00, 0x00, // flags\n      0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n    };\n\n    videoSample = function videoSample(track) {\n      var sps = track.sps || [],\n          pps = track.pps || [],\n          sequenceParameterSets = [],\n          pictureParameterSets = [],\n          i,\n          avc1Box; // assemble the SPSs\n\n      for (i = 0; i < sps.length; i++) {\n        sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n        sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\n\n        sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n      } // assemble the PPSs\n\n\n      for (i = 0; i < pps.length; i++) {\n        pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n        pictureParameterSets.push(pps[i].byteLength & 0xFF);\n        pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n      }\n\n      avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // data_reference_index\n      0x00, 0x00, // pre_defined\n      0x00, 0x00, // reserved\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n      (track.width & 0xff00) >> 8, track.width & 0xff, // width\n      (track.height & 0xff00) >> 8, track.height & 0xff, // height\n      0x00, 0x48, 0x00, 0x00, // horizresolution\n      0x00, 0x48, 0x00, 0x00, // vertresolution\n      0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // frame_count\n      0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\n      0x00, 0x18, // depth = 24\n      0x11, 0x11 // pre_defined = -1\n      ]), box(types.avcC, new Uint8Array([0x01, // configurationVersion\n      track.profileIdc, // AVCProfileIndication\n      track.profileCompatibility, // profile_compatibility\n      track.levelIdc, // AVCLevelIndication\n      0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n      ].concat([sps.length], // numOfSequenceParameterSets\n      sequenceParameterSets, // \"SPS\"\n      [pps.length], // numOfPictureParameterSets\n      pictureParameterSets // \"PPS\"\n      ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n      0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n      0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n      ]))];\n\n      if (track.sarRatio) {\n        var hSpacing = track.sarRatio[0],\n            vSpacing = track.sarRatio[1];\n        avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\n      }\n\n      return box.apply(null, avc1Box);\n    };\n\n    audioSample = function audioSample(track) {\n      return box(types.mp4a, new Uint8Array([// SampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // data_reference_index\n      // AudioSampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x00, 0x00, 0x00, // reserved\n      (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff, // channelcount\n      (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff, // samplesize\n      0x00, 0x00, // pre_defined\n      0x00, 0x00, // reserved\n      (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\n      // MP4AudioSampleEntry, ISO/IEC 14496-14\n      ]), esds(track));\n    };\n  })();\n\n  tkhd = function tkhd(track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x07, // flags\n    0x00, 0x00, 0x00, 0x00, // creation_time\n    0x00, 0x00, 0x00, 0x00, // modification_time\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x00, // reserved\n    (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF, // duration\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, // layer\n    0x00, 0x00, // alternate_group\n    0x01, 0x00, // non-audio track volume\n    0x00, 0x00, // reserved\n    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n    (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00, // width\n    (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\n    ]);\n    return box(types.tkhd, result);\n  };\n  /**\n   * Generate a track fragment (traf) box. A traf box collects metadata\n   * about tracks in a movie fragment (moof) box.\n   */\n\n\n  traf = function traf(track) {\n    var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n    trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x3a, // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x01, // sample_description_index\n    0x00, 0x00, 0x00, 0x00, // default_sample_duration\n    0x00, 0x00, 0x00, 0x00, // default_sample_size\n    0x00, 0x00, 0x00, 0x00 // default_sample_flags\n    ]));\n    upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / MAX_UINT32);\n    lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % MAX_UINT32);\n    trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01, // version 1\n    0x00, 0x00, 0x00, // flags\n    // baseMediaDecodeTime\n    upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\n    // the containing moof to the first payload byte of the associated\n    // mdat\n\n    dataOffset = 32 + // tfhd\n    20 + // tfdt\n    8 + // traf header\n    16 + // mfhd\n    8 + // moof header\n    8; // mdat header\n    // audio tracks require less metadata\n\n    if (track.type === 'audio') {\n      trackFragmentRun = trun$1(track, dataOffset);\n      return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\n    } // video tracks should contain an independent and disposable samples\n    // box (sdtp)\n    // generate one and adjust offsets to match\n\n\n    sampleDependencyTable = sdtp(track);\n    trackFragmentRun = trun$1(track, sampleDependencyTable.length + dataOffset);\n    return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\n  };\n  /**\n   * Generate a track box.\n   * @param track {object} a track definition\n   * @return {Uint8Array} the track box\n   */\n\n\n  trak = function trak(track) {\n    track.duration = track.duration || 0xffffffff;\n    return box(types.trak, tkhd(track), mdia(track));\n  };\n\n  trex = function trex(track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n    0x00, 0x00, 0x00, 0x00, // default_sample_duration\n    0x00, 0x00, 0x00, 0x00, // default_sample_size\n    0x00, 0x01, 0x00, 0x01 // default_sample_flags\n    ]); // the last two bytes of default_sample_flags is the sample\n    // degradation priority, a hint about the importance of this sample\n    // relative to others. Lower the degradation priority for all sample\n    // types other than video.\n\n    if (track.type !== 'video') {\n      result[result.length - 1] = 0x00;\n    }\n\n    return box(types.trex, result);\n  };\n\n  (function () {\n    var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\n    // duration is present for the first sample, it will be present for\n    // all subsequent samples.\n    // see ISO/IEC 14496-12:2012, Section 8.8.8.1\n\n    trunHeader = function trunHeader(samples, offset) {\n      var durationPresent = 0,\n          sizePresent = 0,\n          flagsPresent = 0,\n          compositionTimeOffset = 0; // trun flag constants\n\n      if (samples.length) {\n        if (samples[0].duration !== undefined) {\n          durationPresent = 0x1;\n        }\n\n        if (samples[0].size !== undefined) {\n          sizePresent = 0x2;\n        }\n\n        if (samples[0].flags !== undefined) {\n          flagsPresent = 0x4;\n        }\n\n        if (samples[0].compositionTimeOffset !== undefined) {\n          compositionTimeOffset = 0x8;\n        }\n      }\n\n      return [0x00, // version 0\n      0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01, // flags\n      (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF, // sample_count\n      (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n      ];\n    };\n\n    videoTrun = function videoTrun(track, offset) {\n      var bytesOffest, bytes, header, samples, sample, i;\n      samples = track.samples || [];\n      offset += 8 + 12 + 16 * samples.length;\n      header = trunHeader(samples, offset);\n      bytes = new Uint8Array(header.length + samples.length * 16);\n      bytes.set(header);\n      bytesOffest = header.length;\n\n      for (i = 0; i < samples.length; i++) {\n        sample = samples[i];\n        bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n        bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n\n        bytes[bytesOffest++] = sample.flags.isLeading << 2 | sample.flags.dependsOn;\n        bytes[bytesOffest++] = sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample;\n        bytes[bytesOffest++] = sample.flags.degradationPriority & 0xF0 << 8;\n        bytes[bytesOffest++] = sample.flags.degradationPriority & 0x0F; // sample_flags\n\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.compositionTimeOffset & 0xFF; // sample_composition_time_offset\n      }\n\n      return box(types.trun, bytes);\n    };\n\n    audioTrun = function audioTrun(track, offset) {\n      var bytes, bytesOffest, header, samples, sample, i;\n      samples = track.samples || [];\n      offset += 8 + 12 + 8 * samples.length;\n      header = trunHeader(samples, offset);\n      bytes = new Uint8Array(header.length + samples.length * 8);\n      bytes.set(header);\n      bytesOffest = header.length;\n\n      for (i = 0; i < samples.length; i++) {\n        sample = samples[i];\n        bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n        bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n      }\n\n      return box(types.trun, bytes);\n    };\n\n    trun$1 = function trun(track, offset) {\n      if (track.type === 'audio') {\n        return audioTrun(track, offset);\n      }\n\n      return videoTrun(track, offset);\n    };\n  })();\n\n  var mp4Generator = {\n    ftyp: ftyp,\n    mdat: mdat,\n    moof: moof,\n    moov: moov,\n    initSegment: function initSegment(tracks) {\n      var fileType = ftyp(),\n          movie = moov(tracks),\n          result;\n      result = new Uint8Array(fileType.byteLength + movie.byteLength);\n      result.set(fileType);\n      result.set(movie, fileType.byteLength);\n      return result;\n    }\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n  // Convert an array of nal units into an array of frames with each frame being\n  // composed of the nal units that make up that frame\n  // Also keep track of cummulative data about the frame from the nal units such\n  // as the frame duration, starting pts, etc.\n\n  var groupNalsIntoFrames = function groupNalsIntoFrames(nalUnits) {\n    var i,\n        currentNal,\n        currentFrame = [],\n        frames = []; // TODO added for LHLS, make sure this is OK\n\n    frames.byteLength = 0;\n    frames.nalCount = 0;\n    frames.duration = 0;\n    currentFrame.byteLength = 0;\n\n    for (i = 0; i < nalUnits.length; i++) {\n      currentNal = nalUnits[i]; // Split on 'aud'-type nal units\n\n      if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\n        // Since the very first nal unit is expected to be an AUD\n        // only push to the frames array when currentFrame is not empty\n        if (currentFrame.length) {\n          currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\n\n          frames.byteLength += currentFrame.byteLength;\n          frames.nalCount += currentFrame.length;\n          frames.duration += currentFrame.duration;\n          frames.push(currentFrame);\n        }\n\n        currentFrame = [currentNal];\n        currentFrame.byteLength = currentNal.data.byteLength;\n        currentFrame.pts = currentNal.pts;\n        currentFrame.dts = currentNal.dts;\n      } else {\n        // Specifically flag key frames for ease of use later\n        if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\n          currentFrame.keyFrame = true;\n        }\n\n        currentFrame.duration = currentNal.dts - currentFrame.dts;\n        currentFrame.byteLength += currentNal.data.byteLength;\n        currentFrame.push(currentNal);\n      }\n    } // For the last frame, use the duration of the previous frame if we\n    // have nothing better to go on\n\n\n    if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\n      currentFrame.duration = frames[frames.length - 1].duration;\n    } // Push the final frame\n    // TODO added for LHLS, make sure this is OK\n\n\n    frames.byteLength += currentFrame.byteLength;\n    frames.nalCount += currentFrame.length;\n    frames.duration += currentFrame.duration;\n    frames.push(currentFrame);\n    return frames;\n  }; // Convert an array of frames into an array of Gop with each Gop being composed\n  // of the frames that make up that Gop\n  // Also keep track of cummulative data about the Gop from the frames such as the\n  // Gop duration, starting pts, etc.\n\n\n  var groupFramesIntoGops = function groupFramesIntoGops(frames) {\n    var i,\n        currentFrame,\n        currentGop = [],\n        gops = []; // We must pre-set some of the values on the Gop since we\n    // keep running totals of these values\n\n    currentGop.byteLength = 0;\n    currentGop.nalCount = 0;\n    currentGop.duration = 0;\n    currentGop.pts = frames[0].pts;\n    currentGop.dts = frames[0].dts; // store some metadata about all the Gops\n\n    gops.byteLength = 0;\n    gops.nalCount = 0;\n    gops.duration = 0;\n    gops.pts = frames[0].pts;\n    gops.dts = frames[0].dts;\n\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n\n      if (currentFrame.keyFrame) {\n        // Since the very first frame is expected to be an keyframe\n        // only push to the gops array when currentGop is not empty\n        if (currentGop.length) {\n          gops.push(currentGop);\n          gops.byteLength += currentGop.byteLength;\n          gops.nalCount += currentGop.nalCount;\n          gops.duration += currentGop.duration;\n        }\n\n        currentGop = [currentFrame];\n        currentGop.nalCount = currentFrame.length;\n        currentGop.byteLength = currentFrame.byteLength;\n        currentGop.pts = currentFrame.pts;\n        currentGop.dts = currentFrame.dts;\n        currentGop.duration = currentFrame.duration;\n      } else {\n        currentGop.duration += currentFrame.duration;\n        currentGop.nalCount += currentFrame.length;\n        currentGop.byteLength += currentFrame.byteLength;\n        currentGop.push(currentFrame);\n      }\n    }\n\n    if (gops.length && currentGop.duration <= 0) {\n      currentGop.duration = gops[gops.length - 1].duration;\n    }\n\n    gops.byteLength += currentGop.byteLength;\n    gops.nalCount += currentGop.nalCount;\n    gops.duration += currentGop.duration; // push the final Gop\n\n    gops.push(currentGop);\n    return gops;\n  };\n  /*\n   * Search for the first keyframe in the GOPs and throw away all frames\n   * until that keyframe. Then extend the duration of the pulled keyframe\n   * and pull the PTS and DTS of the keyframe so that it covers the time\n   * range of the frames that were disposed.\n   *\n   * @param {Array} gops video GOPs\n   * @returns {Array} modified video GOPs\n   */\n\n\n  var extendFirstKeyFrame = function extendFirstKeyFrame(gops) {\n    var currentGop;\n\n    if (!gops[0][0].keyFrame && gops.length > 1) {\n      // Remove the first GOP\n      currentGop = gops.shift();\n      gops.byteLength -= currentGop.byteLength;\n      gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\n      // first gop to cover the time period of the\n      // frames we just removed\n\n      gops[0][0].dts = currentGop.dts;\n      gops[0][0].pts = currentGop.pts;\n      gops[0][0].duration += currentGop.duration;\n    }\n\n    return gops;\n  };\n  /**\n   * Default sample object\n   * see ISO/IEC 14496-12:2012, section 8.6.4.3\n   */\n\n\n  var createDefaultSample = function createDefaultSample() {\n    return {\n      size: 0,\n      flags: {\n        isLeading: 0,\n        dependsOn: 1,\n        isDependedOn: 0,\n        hasRedundancy: 0,\n        degradationPriority: 0,\n        isNonSyncSample: 1\n      }\n    };\n  };\n  /*\n   * Collates information from a video frame into an object for eventual\n   * entry into an MP4 sample table.\n   *\n   * @param {Object} frame the video frame\n   * @param {Number} dataOffset the byte offset to position the sample\n   * @return {Object} object containing sample table info for a frame\n   */\n\n\n  var sampleForFrame = function sampleForFrame(frame, dataOffset) {\n    var sample = createDefaultSample();\n    sample.dataOffset = dataOffset;\n    sample.compositionTimeOffset = frame.pts - frame.dts;\n    sample.duration = frame.duration;\n    sample.size = 4 * frame.length; // Space for nal unit size\n\n    sample.size += frame.byteLength;\n\n    if (frame.keyFrame) {\n      sample.flags.dependsOn = 2;\n      sample.flags.isNonSyncSample = 0;\n    }\n\n    return sample;\n  }; // generate the track's sample table from an array of gops\n\n\n  var generateSampleTable$1 = function generateSampleTable(gops, baseDataOffset) {\n    var h,\n        i,\n        sample,\n        currentGop,\n        currentFrame,\n        dataOffset = baseDataOffset || 0,\n        samples = [];\n\n    for (h = 0; h < gops.length; h++) {\n      currentGop = gops[h];\n\n      for (i = 0; i < currentGop.length; i++) {\n        currentFrame = currentGop[i];\n        sample = sampleForFrame(currentFrame, dataOffset);\n        dataOffset += sample.size;\n        samples.push(sample);\n      }\n    }\n\n    return samples;\n  }; // generate the track's raw mdat data from an array of gops\n\n\n  var concatenateNalData = function concatenateNalData(gops) {\n    var h,\n        i,\n        j,\n        currentGop,\n        currentFrame,\n        currentNal,\n        dataOffset = 0,\n        nalsByteLength = gops.byteLength,\n        numberOfNals = gops.nalCount,\n        totalByteLength = nalsByteLength + 4 * numberOfNals,\n        data = new Uint8Array(totalByteLength),\n        view = new DataView(data.buffer); // For each Gop..\n\n    for (h = 0; h < gops.length; h++) {\n      currentGop = gops[h]; // For each Frame..\n\n      for (i = 0; i < currentGop.length; i++) {\n        currentFrame = currentGop[i]; // For each NAL..\n\n        for (j = 0; j < currentFrame.length; j++) {\n          currentNal = currentFrame[j];\n          view.setUint32(dataOffset, currentNal.data.byteLength);\n          dataOffset += 4;\n          data.set(currentNal.data, dataOffset);\n          dataOffset += currentNal.data.byteLength;\n        }\n      }\n    }\n\n    return data;\n  }; // generate the track's sample table from a frame\n\n\n  var generateSampleTableForFrame = function generateSampleTableForFrame(frame, baseDataOffset) {\n    var sample,\n        dataOffset = baseDataOffset || 0,\n        samples = [];\n    sample = sampleForFrame(frame, dataOffset);\n    samples.push(sample);\n    return samples;\n  }; // generate the track's raw mdat data from a frame\n\n\n  var concatenateNalDataForFrame = function concatenateNalDataForFrame(frame) {\n    var i,\n        currentNal,\n        dataOffset = 0,\n        nalsByteLength = frame.byteLength,\n        numberOfNals = frame.length,\n        totalByteLength = nalsByteLength + 4 * numberOfNals,\n        data = new Uint8Array(totalByteLength),\n        view = new DataView(data.buffer); // For each NAL..\n\n    for (i = 0; i < frame.length; i++) {\n      currentNal = frame[i];\n      view.setUint32(dataOffset, currentNal.data.byteLength);\n      dataOffset += 4;\n      data.set(currentNal.data, dataOffset);\n      dataOffset += currentNal.data.byteLength;\n    }\n\n    return data;\n  };\n\n  var frameUtils = {\n    groupNalsIntoFrames: groupNalsIntoFrames,\n    groupFramesIntoGops: groupFramesIntoGops,\n    extendFirstKeyFrame: extendFirstKeyFrame,\n    generateSampleTable: generateSampleTable$1,\n    concatenateNalData: concatenateNalData,\n    generateSampleTableForFrame: generateSampleTableForFrame,\n    concatenateNalDataForFrame: concatenateNalDataForFrame\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var highPrefix = [33, 16, 5, 32, 164, 27];\n  var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\n\n  var zeroFill = function zeroFill(count) {\n    var a = [];\n\n    while (count--) {\n      a.push(0);\n    }\n\n    return a;\n  };\n\n  var makeTable = function makeTable(metaTable) {\n    return Object.keys(metaTable).reduce(function (obj, key) {\n      obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\n        return arr.concat(part);\n      }, []));\n      return obj;\n    }, {});\n  };\n\n  var silence;\n\n  var silence_1 = function silence_1() {\n    if (!silence) {\n      // Frames-of-silence to use for filling in missing AAC frames\n      var coneOfSilence = {\n        96000: [highPrefix, [227, 64], zeroFill(154), [56]],\n        88200: [highPrefix, [231], zeroFill(170), [56]],\n        64000: [highPrefix, [248, 192], zeroFill(240), [56]],\n        48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\n        44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\n        32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\n        24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\n        16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\n        12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\n        11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\n        8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\n      };\n      silence = makeTable(coneOfSilence);\n    }\n\n    return silence;\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n\n  var ONE_SECOND_IN_TS$4 = 90000,\n      // 90kHz clock\n  secondsToVideoTs,\n      secondsToAudioTs,\n      videoTsToSeconds,\n      audioTsToSeconds,\n      audioTsToVideoTs,\n      videoTsToAudioTs,\n      metadataTsToSeconds;\n\n  secondsToVideoTs = function secondsToVideoTs(seconds) {\n    return seconds * ONE_SECOND_IN_TS$4;\n  };\n\n  secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n\n  videoTsToSeconds = function videoTsToSeconds(timestamp) {\n    return timestamp / ONE_SECOND_IN_TS$4;\n  };\n\n  audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n\n  audioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n\n  videoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\n    return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n  };\n  /**\n   * Adjust ID3 tag or caption timing information by the timeline pts values\n   * (if keepOriginalTimestamps is false) and convert to seconds\n   */\n\n\n  metadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\n    return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n  };\n\n  var clock = {\n    ONE_SECOND_IN_TS: ONE_SECOND_IN_TS$4,\n    secondsToVideoTs: secondsToVideoTs,\n    secondsToAudioTs: secondsToAudioTs,\n    videoTsToSeconds: videoTsToSeconds,\n    audioTsToSeconds: audioTsToSeconds,\n    audioTsToVideoTs: audioTsToVideoTs,\n    videoTsToAudioTs: videoTsToAudioTs,\n    metadataTsToSeconds: metadataTsToSeconds\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  /**\n   * Sum the `byteLength` properties of the data in each AAC frame\n   */\n\n  var sumFrameByteLengths = function sumFrameByteLengths(array) {\n    var i,\n        currentObj,\n        sum = 0; // sum the byteLength's all each nal unit in the frame\n\n    for (i = 0; i < array.length; i++) {\n      currentObj = array[i];\n      sum += currentObj.data.byteLength;\n    }\n\n    return sum;\n  }; // Possibly pad (prefix) the audio track with silence if appending this track\n  // would lead to the introduction of a gap in the audio buffer\n\n\n  var prefixWithSilence = function prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\n    var baseMediaDecodeTimeTs,\n        frameDuration = 0,\n        audioGapDuration = 0,\n        audioFillFrameCount = 0,\n        audioFillDuration = 0,\n        silentFrame,\n        i,\n        firstFrame;\n\n    if (!frames.length) {\n      return;\n    }\n\n    baseMediaDecodeTimeTs = clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\n\n    frameDuration = Math.ceil(clock.ONE_SECOND_IN_TS / (track.samplerate / 1024));\n\n    if (audioAppendStartTs && videoBaseMediaDecodeTime) {\n      // insert the shortest possible amount (audio gap or audio to video gap)\n      audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\n\n      audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\n      audioFillDuration = audioFillFrameCount * frameDuration;\n    } // don't attempt to fill gaps smaller than a single frame or larger\n    // than a half second\n\n\n    if (audioFillFrameCount < 1 || audioFillDuration > clock.ONE_SECOND_IN_TS / 2) {\n      return;\n    }\n\n    silentFrame = silence_1()[track.samplerate];\n\n    if (!silentFrame) {\n      // we don't have a silent frame pregenerated for the sample rate, so use a frame\n      // from the content instead\n      silentFrame = frames[0].data;\n    }\n\n    for (i = 0; i < audioFillFrameCount; i++) {\n      firstFrame = frames[0];\n      frames.splice(0, 0, {\n        data: silentFrame,\n        dts: firstFrame.dts - frameDuration,\n        pts: firstFrame.pts - frameDuration\n      });\n    }\n\n    track.baseMediaDecodeTime -= Math.floor(clock.videoTsToAudioTs(audioFillDuration, track.samplerate));\n    return audioFillDuration;\n  }; // If the audio segment extends before the earliest allowed dts\n  // value, remove AAC frames until starts at or after the earliest\n  // allowed DTS so that we don't end up with a negative baseMedia-\n  // DecodeTime for the audio track\n\n\n  var trimAdtsFramesByEarliestDts = function trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts) {\n    if (track.minSegmentDts >= earliestAllowedDts) {\n      return adtsFrames;\n    } // We will need to recalculate the earliest segment Dts\n\n\n    track.minSegmentDts = Infinity;\n    return adtsFrames.filter(function (currentFrame) {\n      // If this is an allowed frame, keep it and record it's Dts\n      if (currentFrame.dts >= earliestAllowedDts) {\n        track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n        track.minSegmentPts = track.minSegmentDts;\n        return true;\n      } // Otherwise, discard it\n\n\n      return false;\n    });\n  }; // generate the track's raw mdat data from an array of frames\n\n\n  var generateSampleTable = function generateSampleTable(frames) {\n    var i,\n        currentFrame,\n        samples = [];\n\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n      samples.push({\n        size: currentFrame.data.byteLength,\n        duration: 1024 // For AAC audio, all samples contain 1024 samples\n\n      });\n    }\n\n    return samples;\n  }; // generate the track's sample table from an array of frames\n\n\n  var concatenateFrameData = function concatenateFrameData(frames) {\n    var i,\n        currentFrame,\n        dataOffset = 0,\n        data = new Uint8Array(sumFrameByteLengths(frames));\n\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n      data.set(currentFrame.data, dataOffset);\n      dataOffset += currentFrame.data.byteLength;\n    }\n\n    return data;\n  };\n\n  var audioFrameUtils = {\n    prefixWithSilence: prefixWithSilence,\n    trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\n    generateSampleTable: generateSampleTable,\n    concatenateFrameData: concatenateFrameData\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var ONE_SECOND_IN_TS$3 = clock.ONE_SECOND_IN_TS;\n  /**\n   * Store information about the start and end of the track and the\n   * duration for each frame/sample we process in order to calculate\n   * the baseMediaDecodeTime\n   */\n\n  var collectDtsInfo = function collectDtsInfo(track, data) {\n    if (typeof data.pts === 'number') {\n      if (track.timelineStartInfo.pts === undefined) {\n        track.timelineStartInfo.pts = data.pts;\n      }\n\n      if (track.minSegmentPts === undefined) {\n        track.minSegmentPts = data.pts;\n      } else {\n        track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n      }\n\n      if (track.maxSegmentPts === undefined) {\n        track.maxSegmentPts = data.pts;\n      } else {\n        track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n      }\n    }\n\n    if (typeof data.dts === 'number') {\n      if (track.timelineStartInfo.dts === undefined) {\n        track.timelineStartInfo.dts = data.dts;\n      }\n\n      if (track.minSegmentDts === undefined) {\n        track.minSegmentDts = data.dts;\n      } else {\n        track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n      }\n\n      if (track.maxSegmentDts === undefined) {\n        track.maxSegmentDts = data.dts;\n      } else {\n        track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n      }\n    }\n  };\n  /**\n   * Clear values used to calculate the baseMediaDecodeTime between\n   * tracks\n   */\n\n\n  var clearDtsInfo = function clearDtsInfo(track) {\n    delete track.minSegmentDts;\n    delete track.maxSegmentDts;\n    delete track.minSegmentPts;\n    delete track.maxSegmentPts;\n  };\n  /**\n   * Calculate the track's baseMediaDecodeTime based on the earliest\n   * DTS the transmuxer has ever seen and the minimum DTS for the\n   * current track\n   * @param track {object} track metadata configuration\n   * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n\n  var calculateTrackBaseMediaDecodeTime = function calculateTrackBaseMediaDecodeTime(track, keepOriginalTimestamps) {\n    var baseMediaDecodeTime,\n        scale,\n        minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\n\n    if (!keepOriginalTimestamps) {\n      minSegmentDts -= track.timelineStartInfo.dts;\n    } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n    // we want the start of the first segment to be placed\n\n\n    baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\n\n    baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\n\n    baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\n\n    if (track.type === 'audio') {\n      // Audio has a different clock equal to the sampling_rate so we need to\n      // scale the PTS values into the clock rate of the track\n      scale = track.samplerate / ONE_SECOND_IN_TS$3;\n      baseMediaDecodeTime *= scale;\n      baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\n    }\n\n    return baseMediaDecodeTime;\n  };\n\n  var trackDecodeInfo = {\n    clearDtsInfo: clearDtsInfo,\n    calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\n    collectDtsInfo: collectDtsInfo\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Reads in-band caption information from a video elementary\n   * stream. Captions must follow the CEA-708 standard for injection\n   * into an MPEG-2 transport streams.\n   * @see https://en.wikipedia.org/wiki/CEA-708\n   * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n   */\n  // payload type field to indicate how they are to be\n  // interpreted. CEAS-708 caption content is always transmitted with\n  // payload type 0x04.\n\n  var USER_DATA_REGISTERED_ITU_T_T35 = 4,\n      RBSP_TRAILING_BITS = 128;\n  /**\n    * Parse a supplemental enhancement information (SEI) NAL unit.\n    * Stops parsing once a message of type ITU T T35 has been found.\n    *\n    * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n    * @return {object} the parsed SEI payload\n    * @see Rec. ITU-T H.264, 7.3.2.3.1\n    */\n\n  var parseSei = function parseSei(bytes) {\n    var i = 0,\n        result = {\n      payloadType: -1,\n      payloadSize: 0\n    },\n        payloadType = 0,\n        payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n    while (i < bytes.byteLength) {\n      // stop once we have hit the end of the sei_rbsp\n      if (bytes[i] === RBSP_TRAILING_BITS) {\n        break;\n      } // Parse payload type\n\n\n      while (bytes[i] === 0xFF) {\n        payloadType += 255;\n        i++;\n      }\n\n      payloadType += bytes[i++]; // Parse payload size\n\n      while (bytes[i] === 0xFF) {\n        payloadSize += 255;\n        i++;\n      }\n\n      payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n      // there can only ever be one caption message in a frame's sei\n\n      if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n        var userIdentifier = String.fromCharCode(bytes[i + 3], bytes[i + 4], bytes[i + 5], bytes[i + 6]);\n\n        if (userIdentifier === 'GA94') {\n          result.payloadType = payloadType;\n          result.payloadSize = payloadSize;\n          result.payload = bytes.subarray(i, i + payloadSize);\n          break;\n        } else {\n          result.payload = void 0;\n        }\n      } // skip the payload and parse the next message\n\n\n      i += payloadSize;\n      payloadType = 0;\n      payloadSize = 0;\n    }\n\n    return result;\n  }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n\n  var parseUserData = function parseUserData(sei) {\n    // itu_t_t35_contry_code must be 181 (United States) for\n    // captions\n    if (sei.payload[0] !== 181) {\n      return null;\n    } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n\n    if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n      return null;\n    } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n\n    if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n      return null;\n    } // finally, user_data_type_code should be 0x03 for caption data\n\n\n    if (sei.payload[7] !== 0x03) {\n      return null;\n    } // return the user_data_type_structure and strip the trailing\n    // marker bits\n\n\n    return sei.payload.subarray(8, sei.payload.length - 1);\n  }; // see CEA-708-D, section 4.4\n\n\n  var parseCaptionPackets = function parseCaptionPackets(pts, userData) {\n    var results = [],\n        i,\n        count,\n        offset,\n        data; // if this is just filler, return immediately\n\n    if (!(userData[0] & 0x40)) {\n      return results;\n    } // parse out the cc_data_1 and cc_data_2 fields\n\n\n    count = userData[0] & 0x1f;\n\n    for (i = 0; i < count; i++) {\n      offset = i * 3;\n      data = {\n        type: userData[offset + 2] & 0x03,\n        pts: pts\n      }; // capture cc data when cc_valid is 1\n\n      if (userData[offset + 2] & 0x04) {\n        data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n        results.push(data);\n      }\n    }\n\n    return results;\n  };\n\n  var discardEmulationPreventionBytes$1 = function discardEmulationPreventionBytes(data) {\n    var length = data.byteLength,\n        emulationPreventionBytesPositions = [],\n        i = 1,\n        newLength,\n        newData; // Find all `Emulation Prevention Bytes`\n\n    while (i < length - 2) {\n      if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n        emulationPreventionBytesPositions.push(i + 2);\n        i += 2;\n      } else {\n        i++;\n      }\n    } // If no Emulation Prevention Bytes were found just return the original\n    // array\n\n\n    if (emulationPreventionBytesPositions.length === 0) {\n      return data;\n    } // Create a new array to hold the NAL unit data\n\n\n    newLength = length - emulationPreventionBytesPositions.length;\n    newData = new Uint8Array(newLength);\n    var sourceIndex = 0;\n\n    for (i = 0; i < newLength; sourceIndex++, i++) {\n      if (sourceIndex === emulationPreventionBytesPositions[0]) {\n        // Skip this byte\n        sourceIndex++; // Remove this position index\n\n        emulationPreventionBytesPositions.shift();\n      }\n\n      newData[i] = data[sourceIndex];\n    }\n\n    return newData;\n  }; // exports\n\n\n  var captionPacketParser = {\n    parseSei: parseSei,\n    parseUserData: parseUserData,\n    parseCaptionPackets: parseCaptionPackets,\n    discardEmulationPreventionBytes: discardEmulationPreventionBytes$1,\n    USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n  }; // Link To Transport\n  // -----------------\n\n  var CaptionStream$1 = function CaptionStream(options) {\n    options = options || {};\n    CaptionStream.prototype.init.call(this); // parse708captions flag, default to true\n\n    this.parse708captions_ = typeof options.parse708captions === 'boolean' ? options.parse708captions : true;\n    this.captionPackets_ = [];\n    this.ccStreams_ = [new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\n    new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n    ];\n\n    if (this.parse708captions_) {\n      this.cc708Stream_ = new Cea708Stream({\n        captionServices: options.captionServices\n      }); // eslint-disable-line no-use-before-define\n    }\n\n    this.reset(); // forward data and done events from CCs to this CaptionStream\n\n    this.ccStreams_.forEach(function (cc) {\n      cc.on('data', this.trigger.bind(this, 'data'));\n      cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n      cc.on('done', this.trigger.bind(this, 'done'));\n    }, this);\n\n    if (this.parse708captions_) {\n      this.cc708Stream_.on('data', this.trigger.bind(this, 'data'));\n      this.cc708Stream_.on('partialdone', this.trigger.bind(this, 'partialdone'));\n      this.cc708Stream_.on('done', this.trigger.bind(this, 'done'));\n    }\n  };\n\n  CaptionStream$1.prototype = new stream();\n\n  CaptionStream$1.prototype.push = function (event) {\n    var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n    if (event.nalUnitType !== 'sei_rbsp') {\n      return;\n    } // parse the sei\n\n\n    sei = captionPacketParser.parseSei(event.escapedRBSP); // no payload data, skip\n\n    if (!sei.payload) {\n      return;\n    } // ignore everything but user_data_registered_itu_t_t35\n\n\n    if (sei.payloadType !== captionPacketParser.USER_DATA_REGISTERED_ITU_T_T35) {\n      return;\n    } // parse out the user data payload\n\n\n    userData = captionPacketParser.parseUserData(sei); // ignore unrecognized userData\n\n    if (!userData) {\n      return;\n    } // Sometimes, the same segment # will be downloaded twice. To stop the\n    // caption data from being processed twice, we track the latest dts we've\n    // received and ignore everything with a dts before that. However, since\n    // data for a specific dts can be split across packets on either side of\n    // a segment boundary, we need to make sure we *don't* ignore the packets\n    // from the *next* segment that have dts === this.latestDts_. By constantly\n    // tracking the number of packets received with dts === this.latestDts_, we\n    // know how many should be ignored once we start receiving duplicates.\n\n\n    if (event.dts < this.latestDts_) {\n      // We've started getting older data, so set the flag.\n      this.ignoreNextEqualDts_ = true;\n      return;\n    } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n      this.numSameDts_--;\n\n      if (!this.numSameDts_) {\n        // We've received the last duplicate packet, time to start processing again\n        this.ignoreNextEqualDts_ = false;\n      }\n\n      return;\n    } // parse out CC data packets and save them for later\n\n\n    newCaptionPackets = captionPacketParser.parseCaptionPackets(event.pts, userData);\n    this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n\n    if (this.latestDts_ !== event.dts) {\n      this.numSameDts_ = 0;\n    }\n\n    this.numSameDts_++;\n    this.latestDts_ = event.dts;\n  };\n\n  CaptionStream$1.prototype.flushCCStreams = function (flushType) {\n    this.ccStreams_.forEach(function (cc) {\n      return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n    }, this);\n  };\n\n  CaptionStream$1.prototype.flushStream = function (flushType) {\n    // make sure we actually parsed captions before proceeding\n    if (!this.captionPackets_.length) {\n      this.flushCCStreams(flushType);\n      return;\n    } // In Chrome, the Array#sort function is not stable so add a\n    // presortIndex that we can use to ensure we get a stable-sort\n\n\n    this.captionPackets_.forEach(function (elem, idx) {\n      elem.presortIndex = idx;\n    }); // sort caption byte-pairs based on their PTS values\n\n    this.captionPackets_.sort(function (a, b) {\n      if (a.pts === b.pts) {\n        return a.presortIndex - b.presortIndex;\n      }\n\n      return a.pts - b.pts;\n    });\n    this.captionPackets_.forEach(function (packet) {\n      if (packet.type < 2) {\n        // Dispatch packet to the right Cea608Stream\n        this.dispatchCea608Packet(packet);\n      } else {\n        // Dispatch packet to the Cea708Stream\n        this.dispatchCea708Packet(packet);\n      }\n    }, this);\n    this.captionPackets_.length = 0;\n    this.flushCCStreams(flushType);\n  };\n\n  CaptionStream$1.prototype.flush = function () {\n    return this.flushStream('flush');\n  }; // Only called if handling partial data\n\n\n  CaptionStream$1.prototype.partialFlush = function () {\n    return this.flushStream('partialFlush');\n  };\n\n  CaptionStream$1.prototype.reset = function () {\n    this.latestDts_ = null;\n    this.ignoreNextEqualDts_ = false;\n    this.numSameDts_ = 0;\n    this.activeCea608Channel_ = [null, null];\n    this.ccStreams_.forEach(function (ccStream) {\n      ccStream.reset();\n    });\n  }; // From the CEA-608 spec:\n\n  /*\n   * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n   * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n   * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n   * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n   * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n   * to switch to captioning or Text.\n  */\n  // With that in mind, we ignore any data between an XDS control code and a\n  // subsequent closed-captioning control code.\n\n\n  CaptionStream$1.prototype.dispatchCea608Packet = function (packet) {\n    // NOTE: packet.type is the CEA608 field\n    if (this.setsTextOrXDSActive(packet)) {\n      this.activeCea608Channel_[packet.type] = null;\n    } else if (this.setsChannel1Active(packet)) {\n      this.activeCea608Channel_[packet.type] = 0;\n    } else if (this.setsChannel2Active(packet)) {\n      this.activeCea608Channel_[packet.type] = 1;\n    }\n\n    if (this.activeCea608Channel_[packet.type] === null) {\n      // If we haven't received anything to set the active channel, or the\n      // packets are Text/XDS data, discard the data; we don't want jumbled\n      // captions\n      return;\n    }\n\n    this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n  };\n\n  CaptionStream$1.prototype.setsChannel1Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1000;\n  };\n\n  CaptionStream$1.prototype.setsChannel2Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1800;\n  };\n\n  CaptionStream$1.prototype.setsTextOrXDSActive = function (packet) {\n    return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n  };\n\n  CaptionStream$1.prototype.dispatchCea708Packet = function (packet) {\n    if (this.parse708captions_) {\n      this.cc708Stream_.push(packet);\n    }\n  }; // ----------------------\n  // Session to Application\n  // ----------------------\n  // This hash maps special and extended character codes to their\n  // proper Unicode equivalent. The first one-byte key is just a\n  // non-standard character code. The two-byte keys that follow are\n  // the extended CEA708 character codes, along with the preceding\n  // 0x10 extended character byte to distinguish these codes from\n  // non-extended character codes. Every CEA708 character code that\n  // is not in this object maps directly to a standard unicode\n  // character code.\n  // The transparent space and non-breaking transparent space are\n  // technically not fully supported since there is no code to\n  // make them transparent, so they have normal non-transparent\n  // stand-ins.\n  // The special closed caption (CC) character isn't a standard\n  // unicode character, so a fairly similar unicode character was\n  // chosen in it's place.\n\n\n  var CHARACTER_TRANSLATION_708 = {\n    0x7f: 0x266a,\n    // ♪\n    0x1020: 0x20,\n    // Transparent Space\n    0x1021: 0xa0,\n    // Nob-breaking Transparent Space\n    0x1025: 0x2026,\n    // …\n    0x102a: 0x0160,\n    // Š\n    0x102c: 0x0152,\n    // Œ\n    0x1030: 0x2588,\n    // █\n    0x1031: 0x2018,\n    // ‘\n    0x1032: 0x2019,\n    // ’\n    0x1033: 0x201c,\n    // “\n    0x1034: 0x201d,\n    // ”\n    0x1035: 0x2022,\n    // •\n    0x1039: 0x2122,\n    // ™\n    0x103a: 0x0161,\n    // š\n    0x103c: 0x0153,\n    // œ\n    0x103d: 0x2120,\n    // ℠\n    0x103f: 0x0178,\n    // Ÿ\n    0x1076: 0x215b,\n    // ⅛\n    0x1077: 0x215c,\n    // ⅜\n    0x1078: 0x215d,\n    // ⅝\n    0x1079: 0x215e,\n    // ⅞\n    0x107a: 0x23d0,\n    // ⏐\n    0x107b: 0x23a4,\n    // ⎤\n    0x107c: 0x23a3,\n    // ⎣\n    0x107d: 0x23af,\n    // ⎯\n    0x107e: 0x23a6,\n    // ⎦\n    0x107f: 0x23a1,\n    // ⎡\n    0x10a0: 0x3138 // ㄸ (CC char)\n\n  };\n\n  var get708CharFromCode = function get708CharFromCode(code) {\n    var newCode = CHARACTER_TRANSLATION_708[code] || code;\n\n    if (code & 0x1000 && code === newCode) {\n      // Invalid extended code\n      return '';\n    }\n\n    return String.fromCharCode(newCode);\n  };\n\n  var within708TextBlock = function within708TextBlock(b) {\n    return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n  };\n\n  var Cea708Window = function Cea708Window(windowNum) {\n    this.windowNum = windowNum;\n    this.reset();\n  };\n\n  Cea708Window.prototype.reset = function () {\n    this.clearText();\n    this.pendingNewLine = false;\n    this.winAttr = {};\n    this.penAttr = {};\n    this.penLoc = {};\n    this.penColor = {}; // These default values are arbitrary,\n    // defineWindow will usually override them\n\n    this.visible = 0;\n    this.rowLock = 0;\n    this.columnLock = 0;\n    this.priority = 0;\n    this.relativePositioning = 0;\n    this.anchorVertical = 0;\n    this.anchorHorizontal = 0;\n    this.anchorPoint = 0;\n    this.rowCount = 1;\n    this.virtualRowCount = this.rowCount + 1;\n    this.columnCount = 41;\n    this.windowStyle = 0;\n    this.penStyle = 0;\n  };\n\n  Cea708Window.prototype.getText = function () {\n    return this.rows.join('\\n');\n  };\n\n  Cea708Window.prototype.clearText = function () {\n    this.rows = [''];\n    this.rowIdx = 0;\n  };\n\n  Cea708Window.prototype.newLine = function (pts) {\n    if (this.rows.length >= this.virtualRowCount && typeof this.beforeRowOverflow === 'function') {\n      this.beforeRowOverflow(pts);\n    }\n\n    if (this.rows.length > 0) {\n      this.rows.push('');\n      this.rowIdx++;\n    } // Show all virtual rows since there's no visible scrolling\n\n\n    while (this.rows.length > this.virtualRowCount) {\n      this.rows.shift();\n      this.rowIdx--;\n    }\n  };\n\n  Cea708Window.prototype.isEmpty = function () {\n    if (this.rows.length === 0) {\n      return true;\n    } else if (this.rows.length === 1) {\n      return this.rows[0] === '';\n    }\n\n    return false;\n  };\n\n  Cea708Window.prototype.addText = function (text) {\n    this.rows[this.rowIdx] += text;\n  };\n\n  Cea708Window.prototype.backspace = function () {\n    if (!this.isEmpty()) {\n      var row = this.rows[this.rowIdx];\n      this.rows[this.rowIdx] = row.substr(0, row.length - 1);\n    }\n  };\n\n  var Cea708Service = function Cea708Service(serviceNum, encoding, stream) {\n    this.serviceNum = serviceNum;\n    this.text = '';\n    this.currentWindow = new Cea708Window(-1);\n    this.windows = [];\n    this.stream = stream; // Try to setup a TextDecoder if an `encoding` value was provided\n\n    if (typeof encoding === 'string') {\n      this.createTextDecoder(encoding);\n    }\n  };\n  /**\n   * Initialize service windows\n   * Must be run before service use\n   *\n   * @param  {Integer}  pts               PTS value\n   * @param  {Function} beforeRowOverflow Function to execute before row overflow of a window\n   */\n\n\n  Cea708Service.prototype.init = function (pts, beforeRowOverflow) {\n    this.startPts = pts;\n\n    for (var win = 0; win < 8; win++) {\n      this.windows[win] = new Cea708Window(win);\n\n      if (typeof beforeRowOverflow === 'function') {\n        this.windows[win].beforeRowOverflow = beforeRowOverflow;\n      }\n    }\n  };\n  /**\n   * Set current window of service to be affected by commands\n   *\n   * @param  {Integer} windowNum Window number\n   */\n\n\n  Cea708Service.prototype.setCurrentWindow = function (windowNum) {\n    this.currentWindow = this.windows[windowNum];\n  };\n  /**\n   * Try to create a TextDecoder if it is natively supported\n   */\n\n\n  Cea708Service.prototype.createTextDecoder = function (encoding) {\n    if (typeof TextDecoder === 'undefined') {\n      this.stream.trigger('log', {\n        level: 'warn',\n        message: 'The `encoding` option is unsupported without TextDecoder support'\n      });\n    } else {\n      try {\n        this.textDecoder_ = new TextDecoder(encoding);\n      } catch (error) {\n        this.stream.trigger('log', {\n          level: 'warn',\n          message: 'TextDecoder could not be created with ' + encoding + ' encoding. ' + error\n        });\n      }\n    }\n  };\n\n  var Cea708Stream = function Cea708Stream(options) {\n    options = options || {};\n    Cea708Stream.prototype.init.call(this);\n    var self = this;\n    var captionServices = options.captionServices || {};\n    var captionServiceEncodings = {};\n    var serviceProps; // Get service encodings from captionServices option block\n\n    Object.keys(captionServices).forEach(function (serviceName) {\n      serviceProps = captionServices[serviceName];\n\n      if (/^SERVICE/.test(serviceName)) {\n        captionServiceEncodings[serviceName] = serviceProps.encoding;\n      }\n    });\n    this.serviceEncodings = captionServiceEncodings;\n    this.current708Packet = null;\n    this.services = {};\n\n    this.push = function (packet) {\n      if (packet.type === 3) {\n        // 708 packet start\n        self.new708Packet();\n        self.add708Bytes(packet);\n      } else {\n        if (self.current708Packet === null) {\n          // This should only happen at the start of a file if there's no packet start.\n          self.new708Packet();\n        }\n\n        self.add708Bytes(packet);\n      }\n    };\n  };\n\n  Cea708Stream.prototype = new stream();\n  /**\n   * Push current 708 packet, create new 708 packet.\n   */\n\n  Cea708Stream.prototype.new708Packet = function () {\n    if (this.current708Packet !== null) {\n      this.push708Packet();\n    }\n\n    this.current708Packet = {\n      data: [],\n      ptsVals: []\n    };\n  };\n  /**\n   * Add pts and both bytes from packet into current 708 packet.\n   */\n\n\n  Cea708Stream.prototype.add708Bytes = function (packet) {\n    var data = packet.ccData;\n    var byte0 = data >>> 8;\n    var byte1 = data & 0xff; // I would just keep a list of packets instead of bytes, but it isn't clear in the spec\n    // that service blocks will always line up with byte pairs.\n\n    this.current708Packet.ptsVals.push(packet.pts);\n    this.current708Packet.data.push(byte0);\n    this.current708Packet.data.push(byte1);\n  };\n  /**\n   * Parse completed 708 packet into service blocks and push each service block.\n   */\n\n\n  Cea708Stream.prototype.push708Packet = function () {\n    var packet708 = this.current708Packet;\n    var packetData = packet708.data;\n    var serviceNum = null;\n    var blockSize = null;\n    var i = 0;\n    var b = packetData[i++];\n    packet708.seq = b >> 6;\n    packet708.sizeCode = b & 0x3f; // 0b00111111;\n\n    for (; i < packetData.length; i++) {\n      b = packetData[i++];\n      serviceNum = b >> 5;\n      blockSize = b & 0x1f; // 0b00011111\n\n      if (serviceNum === 7 && blockSize > 0) {\n        // Extended service num\n        b = packetData[i++];\n        serviceNum = b;\n      }\n\n      this.pushServiceBlock(serviceNum, i, blockSize);\n\n      if (blockSize > 0) {\n        i += blockSize - 1;\n      }\n    }\n  };\n  /**\n   * Parse service block, execute commands, read text.\n   *\n   * Note: While many of these commands serve important purposes,\n   * many others just parse out the parameters or attributes, but\n   * nothing is done with them because this is not a full and complete\n   * implementation of the entire 708 spec.\n   *\n   * @param  {Integer} serviceNum Service number\n   * @param  {Integer} start      Start index of the 708 packet data\n   * @param  {Integer} size       Block size\n   */\n\n\n  Cea708Stream.prototype.pushServiceBlock = function (serviceNum, start, size) {\n    var b;\n    var i = start;\n    var packetData = this.current708Packet.data;\n    var service = this.services[serviceNum];\n\n    if (!service) {\n      service = this.initService(serviceNum, i);\n    }\n\n    for (; i < start + size && i < packetData.length; i++) {\n      b = packetData[i];\n\n      if (within708TextBlock(b)) {\n        i = this.handleText(i, service);\n      } else if (b === 0x18) {\n        i = this.multiByteCharacter(i, service);\n      } else if (b === 0x10) {\n        i = this.extendedCommands(i, service);\n      } else if (0x80 <= b && b <= 0x87) {\n        i = this.setCurrentWindow(i, service);\n      } else if (0x98 <= b && b <= 0x9f) {\n        i = this.defineWindow(i, service);\n      } else if (b === 0x88) {\n        i = this.clearWindows(i, service);\n      } else if (b === 0x8c) {\n        i = this.deleteWindows(i, service);\n      } else if (b === 0x89) {\n        i = this.displayWindows(i, service);\n      } else if (b === 0x8a) {\n        i = this.hideWindows(i, service);\n      } else if (b === 0x8b) {\n        i = this.toggleWindows(i, service);\n      } else if (b === 0x97) {\n        i = this.setWindowAttributes(i, service);\n      } else if (b === 0x90) {\n        i = this.setPenAttributes(i, service);\n      } else if (b === 0x91) {\n        i = this.setPenColor(i, service);\n      } else if (b === 0x92) {\n        i = this.setPenLocation(i, service);\n      } else if (b === 0x8f) {\n        service = this.reset(i, service);\n      } else if (b === 0x08) {\n        // BS: Backspace\n        service.currentWindow.backspace();\n      } else if (b === 0x0c) {\n        // FF: Form feed\n        service.currentWindow.clearText();\n      } else if (b === 0x0d) {\n        // CR: Carriage return\n        service.currentWindow.pendingNewLine = true;\n      } else if (b === 0x0e) {\n        // HCR: Horizontal carriage return\n        service.currentWindow.clearText();\n      } else if (b === 0x8d) {\n        // DLY: Delay, nothing to do\n        i++;\n      } else ;\n    }\n  };\n  /**\n   * Execute an extended command\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.extendedCommands = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n\n    if (within708TextBlock(b)) {\n      i = this.handleText(i, service, {\n        isExtended: true\n      });\n    }\n\n    return i;\n  };\n  /**\n   * Get PTS value of a given byte index\n   *\n   * @param  {Integer} byteIndex  Index of the byte\n   * @return {Integer}            PTS\n   */\n\n\n  Cea708Stream.prototype.getPts = function (byteIndex) {\n    // There's 1 pts value per 2 bytes\n    return this.current708Packet.ptsVals[Math.floor(byteIndex / 2)];\n  };\n  /**\n   * Initializes a service\n   *\n   * @param  {Integer} serviceNum Service number\n   * @return {Service}            Initialized service object\n   */\n\n\n  Cea708Stream.prototype.initService = function (serviceNum, i) {\n    var serviceName = 'SERVICE' + serviceNum;\n    var self = this;\n    var serviceName;\n    var encoding;\n\n    if (serviceName in this.serviceEncodings) {\n      encoding = this.serviceEncodings[serviceName];\n    }\n\n    this.services[serviceNum] = new Cea708Service(serviceNum, encoding, self);\n    this.services[serviceNum].init(this.getPts(i), function (pts) {\n      self.flushDisplayed(pts, self.services[serviceNum]);\n    });\n    return this.services[serviceNum];\n  };\n  /**\n   * Execute text writing to current window\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.handleText = function (i, service, options) {\n    var isExtended = options && options.isExtended;\n    var isMultiByte = options && options.isMultiByte;\n    var packetData = this.current708Packet.data;\n    var extended = isExtended ? 0x1000 : 0x0000;\n    var currentByte = packetData[i];\n    var nextByte = packetData[i + 1];\n    var win = service.currentWindow;\n\n    var _char;\n\n    var charCodeArray; // Use the TextDecoder if one was created for this service\n\n    if (service.textDecoder_ && !isExtended) {\n      if (isMultiByte) {\n        charCodeArray = [currentByte, nextByte];\n        i++;\n      } else {\n        charCodeArray = [currentByte];\n      }\n\n      _char = service.textDecoder_.decode(new Uint8Array(charCodeArray));\n    } else {\n      _char = get708CharFromCode(extended | currentByte);\n    }\n\n    if (win.pendingNewLine && !win.isEmpty()) {\n      win.newLine(this.getPts(i));\n    }\n\n    win.pendingNewLine = false;\n    win.addText(_char);\n    return i;\n  };\n  /**\n   * Handle decoding of multibyte character\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.multiByteCharacter = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var firstByte = packetData[i + 1];\n    var secondByte = packetData[i + 2];\n\n    if (within708TextBlock(firstByte) && within708TextBlock(secondByte)) {\n      i = this.handleText(++i, service, {\n        isMultiByte: true\n      });\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the CW# command.\n   *\n   * Set the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.setCurrentWindow = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var windowNum = b & 0x07;\n    service.setCurrentWindow(windowNum);\n    return i;\n  };\n  /**\n   * Parse and execute the DF# command.\n   *\n   * Define a window and set it as the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.defineWindow = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var windowNum = b & 0x07;\n    service.setCurrentWindow(windowNum);\n    var win = service.currentWindow;\n    b = packetData[++i];\n    win.visible = (b & 0x20) >> 5; // v\n\n    win.rowLock = (b & 0x10) >> 4; // rl\n\n    win.columnLock = (b & 0x08) >> 3; // cl\n\n    win.priority = b & 0x07; // p\n\n    b = packetData[++i];\n    win.relativePositioning = (b & 0x80) >> 7; // rp\n\n    win.anchorVertical = b & 0x7f; // av\n\n    b = packetData[++i];\n    win.anchorHorizontal = b; // ah\n\n    b = packetData[++i];\n    win.anchorPoint = (b & 0xf0) >> 4; // ap\n\n    win.rowCount = b & 0x0f; // rc\n\n    b = packetData[++i];\n    win.columnCount = b & 0x3f; // cc\n\n    b = packetData[++i];\n    win.windowStyle = (b & 0x38) >> 3; // ws\n\n    win.penStyle = b & 0x07; // ps\n    // The spec says there are (rowCount+1) \"virtual rows\"\n\n    win.virtualRowCount = win.rowCount + 1;\n    return i;\n  };\n  /**\n   * Parse and execute the SWA command.\n   *\n   * Set attributes of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.setWindowAttributes = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var winAttr = service.currentWindow.winAttr;\n    b = packetData[++i];\n    winAttr.fillOpacity = (b & 0xc0) >> 6; // fo\n\n    winAttr.fillRed = (b & 0x30) >> 4; // fr\n\n    winAttr.fillGreen = (b & 0x0c) >> 2; // fg\n\n    winAttr.fillBlue = b & 0x03; // fb\n\n    b = packetData[++i];\n    winAttr.borderType = (b & 0xc0) >> 6; // bt\n\n    winAttr.borderRed = (b & 0x30) >> 4; // br\n\n    winAttr.borderGreen = (b & 0x0c) >> 2; // bg\n\n    winAttr.borderBlue = b & 0x03; // bb\n\n    b = packetData[++i];\n    winAttr.borderType += (b & 0x80) >> 5; // bt\n\n    winAttr.wordWrap = (b & 0x40) >> 6; // ww\n\n    winAttr.printDirection = (b & 0x30) >> 4; // pd\n\n    winAttr.scrollDirection = (b & 0x0c) >> 2; // sd\n\n    winAttr.justify = b & 0x03; // j\n\n    b = packetData[++i];\n    winAttr.effectSpeed = (b & 0xf0) >> 4; // es\n\n    winAttr.effectDirection = (b & 0x0c) >> 2; // ed\n\n    winAttr.displayEffect = b & 0x03; // de\n\n    return i;\n  };\n  /**\n   * Gather text from all displayed windows and push a caption to output.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   */\n\n\n  Cea708Stream.prototype.flushDisplayed = function (pts, service) {\n    var displayedText = []; // TODO: Positioning not supported, displaying multiple windows will not necessarily\n    // display text in the correct order, but sample files so far have not shown any issue.\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (service.windows[winId].visible && !service.windows[winId].isEmpty()) {\n        displayedText.push(service.windows[winId].getText());\n      }\n    }\n\n    service.endPts = pts;\n    service.text = displayedText.join('\\n\\n');\n    this.pushCaption(service);\n    service.startPts = pts;\n  };\n  /**\n   * Push a caption to output if the caption contains text.\n   *\n   * @param  {Service} service  The service object to be affected\n   */\n\n\n  Cea708Stream.prototype.pushCaption = function (service) {\n    if (service.text !== '') {\n      this.trigger('data', {\n        startPts: service.startPts,\n        endPts: service.endPts,\n        text: service.text,\n        stream: 'cc708_' + service.serviceNum\n      });\n      service.text = '';\n      service.startPts = service.endPts;\n    }\n  };\n  /**\n   * Parse and execute the DSW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.displayWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 1;\n      }\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the HDW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.hideWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 0;\n      }\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the TGW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.toggleWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible ^= 1;\n      }\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the CLW command.\n   *\n   * Clear text of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.clearWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].clearText();\n      }\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the DLW command.\n   *\n   * Re-initialize windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.deleteWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].reset();\n      }\n    }\n\n    return i;\n  };\n  /**\n   * Parse and execute the SPA command.\n   *\n   * Set pen attributes of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.setPenAttributes = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penAttr = service.currentWindow.penAttr;\n    b = packetData[++i];\n    penAttr.textTag = (b & 0xf0) >> 4; // tt\n\n    penAttr.offset = (b & 0x0c) >> 2; // o\n\n    penAttr.penSize = b & 0x03; // s\n\n    b = packetData[++i];\n    penAttr.italics = (b & 0x80) >> 7; // i\n\n    penAttr.underline = (b & 0x40) >> 6; // u\n\n    penAttr.edgeType = (b & 0x38) >> 3; // et\n\n    penAttr.fontStyle = b & 0x07; // fs\n\n    return i;\n  };\n  /**\n   * Parse and execute the SPC command.\n   *\n   * Set pen color of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.setPenColor = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penColor = service.currentWindow.penColor;\n    b = packetData[++i];\n    penColor.fgOpacity = (b & 0xc0) >> 6; // fo\n\n    penColor.fgRed = (b & 0x30) >> 4; // fr\n\n    penColor.fgGreen = (b & 0x0c) >> 2; // fg\n\n    penColor.fgBlue = b & 0x03; // fb\n\n    b = packetData[++i];\n    penColor.bgOpacity = (b & 0xc0) >> 6; // bo\n\n    penColor.bgRed = (b & 0x30) >> 4; // br\n\n    penColor.bgGreen = (b & 0x0c) >> 2; // bg\n\n    penColor.bgBlue = b & 0x03; // bb\n\n    b = packetData[++i];\n    penColor.edgeRed = (b & 0x30) >> 4; // er\n\n    penColor.edgeGreen = (b & 0x0c) >> 2; // eg\n\n    penColor.edgeBlue = b & 0x03; // eb\n\n    return i;\n  };\n  /**\n   * Parse and execute the SPL command.\n   *\n   * Set pen location of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n\n  Cea708Stream.prototype.setPenLocation = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penLoc = service.currentWindow.penLoc; // Positioning isn't really supported at the moment, so this essentially just inserts a linebreak\n\n    service.currentWindow.pendingNewLine = true;\n    b = packetData[++i];\n    penLoc.row = b & 0x0f; // r\n\n    b = packetData[++i];\n    penLoc.column = b & 0x3f; // c\n\n    return i;\n  };\n  /**\n   * Execute the RST command.\n   *\n   * Reset service to a clean slate. Re-initialize.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Service}          Re-initialized service\n   */\n\n\n  Cea708Stream.prototype.reset = function (i, service) {\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    return this.initService(service.serviceNum, i);\n  }; // This hash maps non-ASCII, special, and extended character codes to their\n  // proper Unicode equivalent. The first keys that are only a single byte\n  // are the non-standard ASCII characters, which simply map the CEA608 byte\n  // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n  // character codes, but have their MSB bitmasked with 0x03 so that a lookup\n  // can be performed regardless of the field and data channel on which the\n  // character code was received.\n\n\n  var CHARACTER_TRANSLATION = {\n    0x2a: 0xe1,\n    // á\n    0x5c: 0xe9,\n    // é\n    0x5e: 0xed,\n    // í\n    0x5f: 0xf3,\n    // ó\n    0x60: 0xfa,\n    // ú\n    0x7b: 0xe7,\n    // ç\n    0x7c: 0xf7,\n    // ÷\n    0x7d: 0xd1,\n    // Ñ\n    0x7e: 0xf1,\n    // ñ\n    0x7f: 0x2588,\n    // █\n    0x0130: 0xae,\n    // ®\n    0x0131: 0xb0,\n    // °\n    0x0132: 0xbd,\n    // ½\n    0x0133: 0xbf,\n    // ¿\n    0x0134: 0x2122,\n    // ™\n    0x0135: 0xa2,\n    // ¢\n    0x0136: 0xa3,\n    // £\n    0x0137: 0x266a,\n    // ♪\n    0x0138: 0xe0,\n    // à\n    0x0139: 0xa0,\n    //\n    0x013a: 0xe8,\n    // è\n    0x013b: 0xe2,\n    // â\n    0x013c: 0xea,\n    // ê\n    0x013d: 0xee,\n    // î\n    0x013e: 0xf4,\n    // ô\n    0x013f: 0xfb,\n    // û\n    0x0220: 0xc1,\n    // Á\n    0x0221: 0xc9,\n    // É\n    0x0222: 0xd3,\n    // Ó\n    0x0223: 0xda,\n    // Ú\n    0x0224: 0xdc,\n    // Ü\n    0x0225: 0xfc,\n    // ü\n    0x0226: 0x2018,\n    // ‘\n    0x0227: 0xa1,\n    // ¡\n    0x0228: 0x2a,\n    // *\n    0x0229: 0x27,\n    // '\n    0x022a: 0x2014,\n    // —\n    0x022b: 0xa9,\n    // ©\n    0x022c: 0x2120,\n    // ℠\n    0x022d: 0x2022,\n    // •\n    0x022e: 0x201c,\n    // “\n    0x022f: 0x201d,\n    // ”\n    0x0230: 0xc0,\n    // À\n    0x0231: 0xc2,\n    // Â\n    0x0232: 0xc7,\n    // Ç\n    0x0233: 0xc8,\n    // È\n    0x0234: 0xca,\n    // Ê\n    0x0235: 0xcb,\n    // Ë\n    0x0236: 0xeb,\n    // ë\n    0x0237: 0xce,\n    // Î\n    0x0238: 0xcf,\n    // Ï\n    0x0239: 0xef,\n    // ï\n    0x023a: 0xd4,\n    // Ô\n    0x023b: 0xd9,\n    // Ù\n    0x023c: 0xf9,\n    // ù\n    0x023d: 0xdb,\n    // Û\n    0x023e: 0xab,\n    // «\n    0x023f: 0xbb,\n    // »\n    0x0320: 0xc3,\n    // Ã\n    0x0321: 0xe3,\n    // ã\n    0x0322: 0xcd,\n    // Í\n    0x0323: 0xcc,\n    // Ì\n    0x0324: 0xec,\n    // ì\n    0x0325: 0xd2,\n    // Ò\n    0x0326: 0xf2,\n    // ò\n    0x0327: 0xd5,\n    // Õ\n    0x0328: 0xf5,\n    // õ\n    0x0329: 0x7b,\n    // {\n    0x032a: 0x7d,\n    // }\n    0x032b: 0x5c,\n    // \\\n    0x032c: 0x5e,\n    // ^\n    0x032d: 0x5f,\n    // _\n    0x032e: 0x7c,\n    // |\n    0x032f: 0x7e,\n    // ~\n    0x0330: 0xc4,\n    // Ä\n    0x0331: 0xe4,\n    // ä\n    0x0332: 0xd6,\n    // Ö\n    0x0333: 0xf6,\n    // ö\n    0x0334: 0xdf,\n    // ß\n    0x0335: 0xa5,\n    // ¥\n    0x0336: 0xa4,\n    // ¤\n    0x0337: 0x2502,\n    // │\n    0x0338: 0xc5,\n    // Å\n    0x0339: 0xe5,\n    // å\n    0x033a: 0xd8,\n    // Ø\n    0x033b: 0xf8,\n    // ø\n    0x033c: 0x250c,\n    // ┌\n    0x033d: 0x2510,\n    // ┐\n    0x033e: 0x2514,\n    // └\n    0x033f: 0x2518 // ┘\n\n  };\n\n  var getCharFromCode = function getCharFromCode(code) {\n    if (code === null) {\n      return '';\n    }\n\n    code = CHARACTER_TRANSLATION[code] || code;\n    return String.fromCharCode(code);\n  }; // the index of the last row in a CEA-608 display buffer\n\n\n  var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n  // getting it through bit logic.\n\n  var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n  // cells. The \"bottom\" row is the last element in the outer array.\n\n  var createDisplayBuffer = function createDisplayBuffer() {\n    var result = [],\n        i = BOTTOM_ROW + 1;\n\n    while (i--) {\n      result.push('');\n    }\n\n    return result;\n  };\n\n  var Cea608Stream = function Cea608Stream(field, dataChannel) {\n    Cea608Stream.prototype.init.call(this);\n    this.field_ = field || 0;\n    this.dataChannel_ = dataChannel || 0;\n    this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n    this.setConstants();\n    this.reset();\n\n    this.push = function (packet) {\n      var data, swap, char0, char1, text; // remove the parity bits\n\n      data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n      if (data === this.lastControlCode_) {\n        this.lastControlCode_ = null;\n        return;\n      } // Store control codes\n\n\n      if ((data & 0xf000) === 0x1000) {\n        this.lastControlCode_ = data;\n      } else if (data !== this.PADDING_) {\n        this.lastControlCode_ = null;\n      }\n\n      char0 = data >>> 8;\n      char1 = data & 0xff;\n\n      if (data === this.PADDING_) {\n        return;\n      } else if (data === this.RESUME_CAPTION_LOADING_) {\n        this.mode_ = 'popOn';\n      } else if (data === this.END_OF_CAPTION_) {\n        // If an EOC is received while in paint-on mode, the displayed caption\n        // text should be swapped to non-displayed memory as if it was a pop-on\n        // caption. Because of that, we should explicitly switch back to pop-on\n        // mode\n        this.mode_ = 'popOn';\n        this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n        this.flushDisplayed(packet.pts); // flip memory\n\n        swap = this.displayed_;\n        this.displayed_ = this.nonDisplayed_;\n        this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n        this.startPts_ = packet.pts;\n      } else if (data === this.ROLL_UP_2_ROWS_) {\n        this.rollUpRows_ = 2;\n        this.setRollUp(packet.pts);\n      } else if (data === this.ROLL_UP_3_ROWS_) {\n        this.rollUpRows_ = 3;\n        this.setRollUp(packet.pts);\n      } else if (data === this.ROLL_UP_4_ROWS_) {\n        this.rollUpRows_ = 4;\n        this.setRollUp(packet.pts);\n      } else if (data === this.CARRIAGE_RETURN_) {\n        this.clearFormatting(packet.pts);\n        this.flushDisplayed(packet.pts);\n        this.shiftRowsUp_();\n        this.startPts_ = packet.pts;\n      } else if (data === this.BACKSPACE_) {\n        if (this.mode_ === 'popOn') {\n          this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n        } else {\n          this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n        }\n      } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n        this.flushDisplayed(packet.pts);\n        this.displayed_ = createDisplayBuffer();\n      } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n        this.nonDisplayed_ = createDisplayBuffer();\n      } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n        if (this.mode_ !== 'paintOn') {\n          // NOTE: This should be removed when proper caption positioning is\n          // implemented\n          this.flushDisplayed(packet.pts);\n          this.displayed_ = createDisplayBuffer();\n        }\n\n        this.mode_ = 'paintOn';\n        this.startPts_ = packet.pts; // Append special characters to caption text\n      } else if (this.isSpecialCharacter(char0, char1)) {\n        // Bitmask char0 so that we can apply character transformations\n        // regardless of field and data channel.\n        // Then byte-shift to the left and OR with char1 so we can pass the\n        // entire character code to `getCharFromCode`.\n        char0 = (char0 & 0x03) << 8;\n        text = getCharFromCode(char0 | char1);\n        this[this.mode_](packet.pts, text);\n        this.column_++; // Append extended characters to caption text\n      } else if (this.isExtCharacter(char0, char1)) {\n        // Extended characters always follow their \"non-extended\" equivalents.\n        // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n        // decoders are supposed to drop the \"è\", while compliant decoders\n        // backspace the \"e\" and insert \"è\".\n        // Delete the previous character\n        if (this.mode_ === 'popOn') {\n          this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\n        } else {\n          this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\n        } // Bitmask char0 so that we can apply character transformations\n        // regardless of field and data channel.\n        // Then byte-shift to the left and OR with char1 so we can pass the\n        // entire character code to `getCharFromCode`.\n\n\n        char0 = (char0 & 0x03) << 8;\n        text = getCharFromCode(char0 | char1);\n        this[this.mode_](packet.pts, text);\n        this.column_++; // Process mid-row codes\n      } else if (this.isMidRowCode(char0, char1)) {\n        // Attributes are not additive, so clear all formatting\n        this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n        // should be replaced with spaces, so add one now\n\n        this[this.mode_](packet.pts, ' ');\n        this.column_++;\n\n        if ((char1 & 0xe) === 0xe) {\n          this.addFormatting(packet.pts, ['i']);\n        }\n\n        if ((char1 & 0x1) === 0x1) {\n          this.addFormatting(packet.pts, ['u']);\n        } // Detect offset control codes and adjust cursor\n\n      } else if (this.isOffsetControlCode(char0, char1)) {\n        // Cursor position is set by indent PAC (see below) in 4-column\n        // increments, with an additional offset code of 1-3 to reach any\n        // of the 32 columns specified by CEA-608. So all we need to do\n        // here is increment the column cursor by the given offset.\n        this.column_ += char1 & 0x03; // Detect PACs (Preamble Address Codes)\n      } else if (this.isPAC(char0, char1)) {\n        // There's no logic for PAC -> row mapping, so we have to just\n        // find the row code in an array and use its index :(\n        var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n        if (this.mode_ === 'rollUp') {\n          // This implies that the base row is incorrectly set.\n          // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n          // of roll-up rows set.\n          if (row - this.rollUpRows_ + 1 < 0) {\n            row = this.rollUpRows_ - 1;\n          }\n\n          this.setRollUp(packet.pts, row);\n        }\n\n        if (row !== this.row_) {\n          // formatting is only persistent for current row\n          this.clearFormatting(packet.pts);\n          this.row_ = row;\n        } // All PACs can apply underline, so detect and apply\n        // (All odd-numbered second bytes set underline)\n\n\n        if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n          this.addFormatting(packet.pts, ['u']);\n        }\n\n        if ((data & 0x10) === 0x10) {\n          // We've got an indent level code. Each successive even number\n          // increments the column cursor by 4, so we can get the desired\n          // column position by bit-shifting to the right (to get n/2)\n          // and multiplying by 4.\n          this.column_ = ((data & 0xe) >> 1) * 4;\n        }\n\n        if (this.isColorPAC(char1)) {\n          // it's a color code, though we only support white, which\n          // can be either normal or italicized. white italics can be\n          // either 0x4e or 0x6e depending on the row, so we just\n          // bitwise-and with 0xe to see if italics should be turned on\n          if ((char1 & 0xe) === 0xe) {\n            this.addFormatting(packet.pts, ['i']);\n          }\n        } // We have a normal character in char0, and possibly one in char1\n\n      } else if (this.isNormalChar(char0)) {\n        if (char1 === 0x00) {\n          char1 = null;\n        }\n\n        text = getCharFromCode(char0);\n        text += getCharFromCode(char1);\n        this[this.mode_](packet.pts, text);\n        this.column_ += text.length;\n      } // finish data processing\n\n    };\n  };\n\n  Cea608Stream.prototype = new stream(); // Trigger a cue point that captures the current state of the\n  // display buffer\n\n  Cea608Stream.prototype.flushDisplayed = function (pts) {\n    var content = this.displayed_ // remove spaces from the start and end of the string\n    .map(function (row, index) {\n      try {\n        return row.trim();\n      } catch (e) {\n        // Ordinarily, this shouldn't happen. However, caption\n        // parsing errors should not throw exceptions and\n        // break playback.\n        this.trigger('log', {\n          level: 'warn',\n          message: 'Skipping a malformed 608 caption at index ' + index + '.'\n        });\n        return '';\n      }\n    }, this) // combine all text rows to display in one cue\n    .join('\\n') // and remove blank rows from the start and end, but not the middle\n    .replace(/^\\n+|\\n+$/g, '');\n\n    if (content.length) {\n      this.trigger('data', {\n        startPts: this.startPts_,\n        endPts: pts,\n        text: content,\n        stream: this.name_\n      });\n    }\n  };\n  /**\n   * Zero out the data, used for startup and on seek\n   */\n\n\n  Cea608Stream.prototype.reset = function () {\n    this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n    // actually display captions. If a caption is shifted to a row\n    // with a lower index than this, it is cleared from the display\n    // buffer\n\n    this.topRow_ = 0;\n    this.startPts_ = 0;\n    this.displayed_ = createDisplayBuffer();\n    this.nonDisplayed_ = createDisplayBuffer();\n    this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n    this.column_ = 0;\n    this.row_ = BOTTOM_ROW;\n    this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n    this.formatting_ = [];\n  };\n  /**\n   * Sets up control code and related constants for this instance\n   */\n\n\n  Cea608Stream.prototype.setConstants = function () {\n    // The following attributes have these uses:\n    // ext_ :    char0 for mid-row codes, and the base for extended\n    //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\n    //           extended codes)\n    // control_: char0 for control codes, except byte-shifted to the\n    //           left so that we can do this.control_ | CONTROL_CODE\n    // offset_:  char0 for tab offset codes\n    //\n    // It's also worth noting that control codes, and _only_ control codes,\n    // differ between field 1 and field2. Field 2 control codes are always\n    // their field 1 value plus 1. That's why there's the \"| field\" on the\n    // control value.\n    if (this.dataChannel_ === 0) {\n      this.BASE_ = 0x10;\n      this.EXT_ = 0x11;\n      this.CONTROL_ = (0x14 | this.field_) << 8;\n      this.OFFSET_ = 0x17;\n    } else if (this.dataChannel_ === 1) {\n      this.BASE_ = 0x18;\n      this.EXT_ = 0x19;\n      this.CONTROL_ = (0x1c | this.field_) << 8;\n      this.OFFSET_ = 0x1f;\n    } // Constants for the LSByte command codes recognized by Cea608Stream. This\n    // list is not exhaustive. For a more comprehensive listing and semantics see\n    // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n    // Padding\n\n\n    this.PADDING_ = 0x0000; // Pop-on Mode\n\n    this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n    this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n    this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n    this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n    this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n    this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n    this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n    this.BACKSPACE_ = this.CONTROL_ | 0x21;\n    this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n    this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n  };\n  /**\n   * Detects if the 2-byte packet data is a special character\n   *\n   * Special characters have a second byte in the range 0x30 to 0x3f,\n   * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n   * data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an special character\n   */\n\n\n  Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n    return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n  };\n  /**\n   * Detects if the 2-byte packet data is an extended character\n   *\n   * Extended characters have a second byte in the range 0x20 to 0x3f,\n   * with the first byte being 0x12 or 0x13 (for data channel 1) or\n   * 0x1a or 0x1b (for data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an extended character\n   */\n\n\n  Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\n    return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n  };\n  /**\n   * Detects if the 2-byte packet is a mid-row code\n   *\n   * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n   * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n   * channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are a mid-row code\n   */\n\n\n  Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\n    return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n  };\n  /**\n   * Detects if the 2-byte packet is an offset control code\n   *\n   * Offset control codes have a second byte in the range 0x21 to 0x23,\n   * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n   * data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an offset control code\n   */\n\n\n  Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n    return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n  };\n  /**\n   * Detects if the 2-byte packet is a Preamble Address Code\n   *\n   * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n   * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n   * range 0x40 to 0x7f.\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are a PAC\n   */\n\n\n  Cea608Stream.prototype.isPAC = function (char0, char1) {\n    return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n  };\n  /**\n   * Detects if a packet's second byte is in the range of a PAC color code\n   *\n   * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n   * 0x60 to 0x6f.\n   *\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the byte is a color PAC\n   */\n\n\n  Cea608Stream.prototype.isColorPAC = function (char1) {\n    return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n  };\n  /**\n   * Detects if a single byte is in the range of a normal character\n   *\n   * Normal text bytes are in the range 0x20 to 0x7f.\n   *\n   * @param  {Integer} char  The byte\n   * @return {Boolean}       Whether the byte is a normal character\n   */\n\n\n  Cea608Stream.prototype.isNormalChar = function (_char2) {\n    return _char2 >= 0x20 && _char2 <= 0x7f;\n  };\n  /**\n   * Configures roll-up\n   *\n   * @param  {Integer} pts         Current PTS\n   * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\n   *                               a new position\n   */\n\n\n  Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n    // Reset the base row to the bottom row when switching modes\n    if (this.mode_ !== 'rollUp') {\n      this.row_ = BOTTOM_ROW;\n      this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n      this.flushDisplayed(pts);\n      this.nonDisplayed_ = createDisplayBuffer();\n      this.displayed_ = createDisplayBuffer();\n    }\n\n    if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n      // move currently displayed captions (up or down) to the new base row\n      for (var i = 0; i < this.rollUpRows_; i++) {\n        this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n        this.displayed_[this.row_ - i] = '';\n      }\n    }\n\n    if (newBaseRow === undefined) {\n      newBaseRow = this.row_;\n    }\n\n    this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n  }; // Adds the opening HTML tag for the passed character to the caption text,\n  // and keeps track of it for later closing\n\n\n  Cea608Stream.prototype.addFormatting = function (pts, format) {\n    this.formatting_ = this.formatting_.concat(format);\n    var text = format.reduce(function (text, format) {\n      return text + '<' + format + '>';\n    }, '');\n    this[this.mode_](pts, text);\n  }; // Adds HTML closing tags for current formatting to caption text and\n  // clears remembered formatting\n\n\n  Cea608Stream.prototype.clearFormatting = function (pts) {\n    if (!this.formatting_.length) {\n      return;\n    }\n\n    var text = this.formatting_.reverse().reduce(function (text, format) {\n      return text + '</' + format + '>';\n    }, '');\n    this.formatting_ = [];\n    this[this.mode_](pts, text);\n  }; // Mode Implementations\n\n\n  Cea608Stream.prototype.popOn = function (pts, text) {\n    var baseRow = this.nonDisplayed_[this.row_]; // buffer characters\n\n    baseRow += text;\n    this.nonDisplayed_[this.row_] = baseRow;\n  };\n\n  Cea608Stream.prototype.rollUp = function (pts, text) {\n    var baseRow = this.displayed_[this.row_];\n    baseRow += text;\n    this.displayed_[this.row_] = baseRow;\n  };\n\n  Cea608Stream.prototype.shiftRowsUp_ = function () {\n    var i; // clear out inactive rows\n\n    for (i = 0; i < this.topRow_; i++) {\n      this.displayed_[i] = '';\n    }\n\n    for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n      this.displayed_[i] = '';\n    } // shift displayed rows up\n\n\n    for (i = this.topRow_; i < this.row_; i++) {\n      this.displayed_[i] = this.displayed_[i + 1];\n    } // clear out the bottom row\n\n\n    this.displayed_[this.row_] = '';\n  };\n\n  Cea608Stream.prototype.paintOn = function (pts, text) {\n    var baseRow = this.displayed_[this.row_];\n    baseRow += text;\n    this.displayed_[this.row_] = baseRow;\n  }; // exports\n\n\n  var captionStream = {\n    CaptionStream: CaptionStream$1,\n    Cea608Stream: Cea608Stream,\n    Cea708Stream: Cea708Stream\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var streamTypes = {\n    H264_STREAM_TYPE: 0x1B,\n    ADTS_STREAM_TYPE: 0x0F,\n    METADATA_STREAM_TYPE: 0x15\n  };\n  var MAX_TS = 8589934592;\n  var RO_THRESH = 4294967296;\n  var TYPE_SHARED = 'shared';\n\n  var handleRollover$1 = function handleRollover(value, reference) {\n    var direction = 1;\n\n    if (value > reference) {\n      // If the current timestamp value is greater than our reference timestamp and we detect a\n      // timestamp rollover, this means the roll over is happening in the opposite direction.\n      // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n      // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n      // rollover point. In loading this segment, the timestamp values will be very large,\n      // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n      // the time stamp to be `value - 2^33`.\n      direction = -1;\n    } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n    // cause an incorrect adjustment.\n\n\n    while (Math.abs(reference - value) > RO_THRESH) {\n      value += direction * MAX_TS;\n    }\n\n    return value;\n  };\n\n  var TimestampRolloverStream$1 = function TimestampRolloverStream(type) {\n    var lastDTS, referenceDTS;\n    TimestampRolloverStream.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n    // video and audio. We could use `undefined` here, but having a string\n    // makes debugging a little clearer.\n\n    this.type_ = type || TYPE_SHARED;\n\n    this.push = function (data) {\n      // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n      // streams will only accept data that matches their type.\n      if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n        return;\n      }\n\n      if (referenceDTS === undefined) {\n        referenceDTS = data.dts;\n      }\n\n      data.dts = handleRollover$1(data.dts, referenceDTS);\n      data.pts = handleRollover$1(data.pts, referenceDTS);\n      lastDTS = data.dts;\n      this.trigger('data', data);\n    };\n\n    this.flush = function () {\n      referenceDTS = lastDTS;\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n\n    this.discontinuity = function () {\n      referenceDTS = void 0;\n      lastDTS = void 0;\n    };\n\n    this.reset = function () {\n      this.discontinuity();\n      this.trigger('reset');\n    };\n  };\n\n  TimestampRolloverStream$1.prototype = new stream();\n  var timestampRolloverStream = {\n    TimestampRolloverStream: TimestampRolloverStream$1,\n    handleRollover: handleRollover$1\n  };\n\n  var percentEncode$1 = function percentEncode(bytes, start, end) {\n    var i,\n        result = '';\n\n    for (i = start; i < end; i++) {\n      result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n    }\n\n    return result;\n  },\n      // return the string representation of the specified byte range,\n  // interpreted as UTf-8.\n  parseUtf8 = function parseUtf8(bytes, start, end) {\n    return decodeURIComponent(percentEncode$1(bytes, start, end));\n  },\n      // return the string representation of the specified byte range,\n  // interpreted as ISO-8859-1.\n  parseIso88591$1 = function parseIso88591(bytes, start, end) {\n    return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n  },\n      parseSyncSafeInteger$1 = function parseSyncSafeInteger(data) {\n    return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n  },\n      tagParsers = {\n    TXXX: function TXXX(tag) {\n      var i;\n\n      if (tag.data[0] !== 3) {\n        // ignore frames with unrecognized character encodings\n        return;\n      }\n\n      for (i = 1; i < tag.data.length; i++) {\n        if (tag.data[i] === 0) {\n          // parse the text fields\n          tag.description = parseUtf8(tag.data, 1, i); // do not include the null terminator in the tag value\n\n          tag.value = parseUtf8(tag.data, i + 1, tag.data.length).replace(/\\0*$/, '');\n          break;\n        }\n      }\n\n      tag.data = tag.value;\n    },\n    WXXX: function WXXX(tag) {\n      var i;\n\n      if (tag.data[0] !== 3) {\n        // ignore frames with unrecognized character encodings\n        return;\n      }\n\n      for (i = 1; i < tag.data.length; i++) {\n        if (tag.data[i] === 0) {\n          // parse the description and URL fields\n          tag.description = parseUtf8(tag.data, 1, i);\n          tag.url = parseUtf8(tag.data, i + 1, tag.data.length);\n          break;\n        }\n      }\n    },\n    PRIV: function PRIV(tag) {\n      var i;\n\n      for (i = 0; i < tag.data.length; i++) {\n        if (tag.data[i] === 0) {\n          // parse the description and URL fields\n          tag.owner = parseIso88591$1(tag.data, 0, i);\n          break;\n        }\n      }\n\n      tag.privateData = tag.data.subarray(i + 1);\n      tag.data = tag.privateData;\n    }\n  },\n      _MetadataStream;\n\n  _MetadataStream = function MetadataStream(options) {\n    var settings = {\n      // the bytes of the program-level descriptor field in MP2T\n      // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n      // program element descriptors\"\n      descriptor: options && options.descriptor\n    },\n        // the total size in bytes of the ID3 tag being parsed\n    tagSize = 0,\n        // tag data that is not complete enough to be parsed\n    buffer = [],\n        // the total number of bytes currently in the buffer\n    bufferSize = 0,\n        i;\n\n    _MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n    // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n\n    this.dispatchType = streamTypes.METADATA_STREAM_TYPE.toString(16);\n\n    if (settings.descriptor) {\n      for (i = 0; i < settings.descriptor.length; i++) {\n        this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n      }\n    }\n\n    this.push = function (chunk) {\n      var tag, frameStart, frameSize, frame, i, frameHeader;\n\n      if (chunk.type !== 'timed-metadata') {\n        return;\n      } // if data_alignment_indicator is set in the PES header,\n      // we must have the start of a new ID3 tag. Assume anything\n      // remaining in the buffer was malformed and throw it out\n\n\n      if (chunk.dataAlignmentIndicator) {\n        bufferSize = 0;\n        buffer.length = 0;\n      } // ignore events that don't look like ID3 data\n\n\n      if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n        this.trigger('log', {\n          level: 'warn',\n          message: 'Skipping unrecognized metadata packet'\n        });\n        return;\n      } // add this chunk to the data we've collected so far\n\n\n      buffer.push(chunk);\n      bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n      if (buffer.length === 1) {\n        // the frame size is transmitted as a 28-bit integer in the\n        // last four bytes of the ID3 header.\n        // The most significant bit of each byte is dropped and the\n        // results concatenated to recover the actual value.\n        tagSize = parseSyncSafeInteger$1(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n        // convenient for our comparisons to include it\n\n        tagSize += 10;\n      } // if the entire frame has not arrived, wait for more data\n\n\n      if (bufferSize < tagSize) {\n        return;\n      } // collect the entire frame so it can be parsed\n\n\n      tag = {\n        data: new Uint8Array(tagSize),\n        frames: [],\n        pts: buffer[0].pts,\n        dts: buffer[0].dts\n      };\n\n      for (i = 0; i < tagSize;) {\n        tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n        i += buffer[0].data.byteLength;\n        bufferSize -= buffer[0].data.byteLength;\n        buffer.shift();\n      } // find the start of the first frame and the end of the tag\n\n\n      frameStart = 10;\n\n      if (tag.data[5] & 0x40) {\n        // advance the frame start past the extended header\n        frameStart += 4; // header size field\n\n        frameStart += parseSyncSafeInteger$1(tag.data.subarray(10, 14)); // clip any padding off the end\n\n        tagSize -= parseSyncSafeInteger$1(tag.data.subarray(16, 20));\n      } // parse one or more ID3 frames\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n\n      do {\n        // determine the number of bytes in this frame\n        frameSize = parseSyncSafeInteger$1(tag.data.subarray(frameStart + 4, frameStart + 8));\n\n        if (frameSize < 1) {\n          this.trigger('log', {\n            level: 'warn',\n            message: 'Malformed ID3 frame encountered. Skipping metadata parsing.'\n          });\n          return;\n        }\n\n        frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n        frame = {\n          id: frameHeader,\n          data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n        };\n        frame.key = frame.id;\n\n        if (tagParsers[frame.id]) {\n          tagParsers[frame.id](frame); // handle the special PRIV frame used to indicate the start\n          // time for raw AAC data\n\n          if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n            var d = frame.data,\n                size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n            size *= 4;\n            size += d[7] & 0x03;\n            frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n            // on the value of this frame\n            // we couldn't have known the appropriate pts and dts before\n            // parsing this ID3 tag so set those values now\n\n            if (tag.pts === undefined && tag.dts === undefined) {\n              tag.pts = frame.timeStamp;\n              tag.dts = frame.timeStamp;\n            }\n\n            this.trigger('timestamp', frame);\n          }\n        }\n\n        tag.frames.push(frame);\n        frameStart += 10; // advance past the frame header\n\n        frameStart += frameSize; // advance past the frame body\n      } while (frameStart < tagSize);\n\n      this.trigger('data', tag);\n    };\n  };\n\n  _MetadataStream.prototype = new stream();\n  var metadataStream = _MetadataStream;\n  var TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n  var _TransportPacketStream, _TransportParseStream, _ElementaryStream; // constants\n\n\n  var MP2T_PACKET_LENGTH$1 = 188,\n      // bytes\n  SYNC_BYTE$1 = 0x47;\n  /**\n   * Splits an incoming stream of binary data into MPEG-2 Transport\n   * Stream packets.\n   */\n\n  _TransportPacketStream = function TransportPacketStream() {\n    var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n        bytesInBuffer = 0;\n\n    _TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n    /**\n     * Split a stream of data into M2TS packets\n    **/\n\n\n    this.push = function (bytes) {\n      var startIndex = 0,\n          endIndex = MP2T_PACKET_LENGTH$1,\n          everything; // If there are bytes remaining from the last segment, prepend them to the\n      // bytes that were pushed in\n\n      if (bytesInBuffer) {\n        everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n        everything.set(buffer.subarray(0, bytesInBuffer));\n        everything.set(bytes, bytesInBuffer);\n        bytesInBuffer = 0;\n      } else {\n        everything = bytes;\n      } // While we have enough data for a packet\n\n\n      while (endIndex < everything.byteLength) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n          // We found a packet so emit it and jump one whole packet forward in\n          // the stream\n          this.trigger('data', everything.subarray(startIndex, endIndex));\n          startIndex += MP2T_PACKET_LENGTH$1;\n          endIndex += MP2T_PACKET_LENGTH$1;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n\n        startIndex++;\n        endIndex++;\n      } // If there was some data left over at the end of the segment that couldn't\n      // possibly be a whole packet, keep it because it might be the start of a packet\n      // that continues in the next segment\n\n\n      if (startIndex < everything.byteLength) {\n        buffer.set(everything.subarray(startIndex), 0);\n        bytesInBuffer = everything.byteLength - startIndex;\n      }\n    };\n    /**\n     * Passes identified M2TS packets to the TransportParseStream to be parsed\n    **/\n\n\n    this.flush = function () {\n      // If the buffer contains a whole packet when we are being flushed, emit it\n      // and empty the buffer. Otherwise hold onto the data because it may be\n      // important for decoding the next segment\n      if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n        this.trigger('data', buffer);\n        bytesInBuffer = 0;\n      }\n\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n\n    this.reset = function () {\n      bytesInBuffer = 0;\n      this.trigger('reset');\n    };\n  };\n\n  _TransportPacketStream.prototype = new stream();\n  /**\n   * Accepts an MP2T TransportPacketStream and emits data events with parsed\n   * forms of the individual transport stream packets.\n   */\n\n  _TransportParseStream = function TransportParseStream() {\n    var parsePsi, parsePat, parsePmt, self;\n\n    _TransportParseStream.prototype.init.call(this);\n\n    self = this;\n    this.packetsWaitingForPmt = [];\n    this.programMapTable = undefined;\n\n    parsePsi = function parsePsi(payload, psi) {\n      var offset = 0; // PSI packets may be split into multiple sections and those\n      // sections may be split into multiple packets. If a PSI\n      // section starts in this packet, the payload_unit_start_indicator\n      // will be true and the first byte of the payload will indicate\n      // the offset from the current position to the start of the\n      // section.\n\n      if (psi.payloadUnitStartIndicator) {\n        offset += payload[offset] + 1;\n      }\n\n      if (psi.type === 'pat') {\n        parsePat(payload.subarray(offset), psi);\n      } else {\n        parsePmt(payload.subarray(offset), psi);\n      }\n    };\n\n    parsePat = function parsePat(payload, pat) {\n      pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n      pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n      // skip the PSI header and parse the first PMT entry\n\n      self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n      pat.pmtPid = self.pmtPid;\n    };\n    /**\n     * Parse out the relevant fields of a Program Map Table (PMT).\n     * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n     * packet. The first byte in this array should be the table_id\n     * field.\n     * @param pmt {object} the object that should be decorated with\n     * fields parsed from the PMT.\n     */\n\n\n    parsePmt = function parsePmt(payload, pmt) {\n      var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n      // take effect. We don't believe this should ever be the case\n      // for HLS but we'll ignore \"forward\" PMT declarations if we see\n      // them. Future PMT declarations have the current_next_indicator\n      // set to zero.\n\n      if (!(payload[5] & 0x01)) {\n        return;\n      } // overwrite any existing program map table\n\n\n      self.programMapTable = {\n        video: null,\n        audio: null,\n        'timed-metadata': {}\n      }; // the mapping table ends at the end of the current section\n\n      sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n      tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n      // long the program info descriptors are\n\n      programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n      offset = 12 + programInfoLength;\n\n      while (offset < tableEnd) {\n        var streamType = payload[offset];\n        var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n        // TODO: should this be done for metadata too? for now maintain behavior of\n        //       multiple metadata streams\n\n        if (streamType === streamTypes.H264_STREAM_TYPE && self.programMapTable.video === null) {\n          self.programMapTable.video = pid;\n        } else if (streamType === streamTypes.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n          self.programMapTable.audio = pid;\n        } else if (streamType === streamTypes.METADATA_STREAM_TYPE) {\n          // map pid to stream type for metadata streams\n          self.programMapTable['timed-metadata'][pid] = streamType;\n        } // move to the next table entry\n        // skip past the elementary stream descriptors, if present\n\n\n        offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n      } // record the map on the packet as well\n\n\n      pmt.programMapTable = self.programMapTable;\n    };\n    /**\n     * Deliver a new MP2T packet to the next stream in the pipeline.\n     */\n\n\n    this.push = function (packet) {\n      var result = {},\n          offset = 4;\n      result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n      result.pid = packet[1] & 0x1f;\n      result.pid <<= 8;\n      result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n      // fifth byte of the TS packet header. The adaptation field is\n      // used to add stuffing to PES packets that don't fill a complete\n      // TS packet, and to specify some forms of timing and control data\n      // that we do not currently use.\n\n      if ((packet[3] & 0x30) >>> 4 > 0x01) {\n        offset += packet[offset] + 1;\n      } // parse the rest of the packet based on the type\n\n\n      if (result.pid === 0) {\n        result.type = 'pat';\n        parsePsi(packet.subarray(offset), result);\n        this.trigger('data', result);\n      } else if (result.pid === this.pmtPid) {\n        result.type = 'pmt';\n        parsePsi(packet.subarray(offset), result);\n        this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n        while (this.packetsWaitingForPmt.length) {\n          this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n        }\n      } else if (this.programMapTable === undefined) {\n        // When we have not seen a PMT yet, defer further processing of\n        // PES packets until one has been parsed\n        this.packetsWaitingForPmt.push([packet, offset, result]);\n      } else {\n        this.processPes_(packet, offset, result);\n      }\n    };\n\n    this.processPes_ = function (packet, offset, result) {\n      // set the appropriate stream type\n      if (result.pid === this.programMapTable.video) {\n        result.streamType = streamTypes.H264_STREAM_TYPE;\n      } else if (result.pid === this.programMapTable.audio) {\n        result.streamType = streamTypes.ADTS_STREAM_TYPE;\n      } else {\n        // if not video or audio, it is timed-metadata or unknown\n        // if unknown, streamType will be undefined\n        result.streamType = this.programMapTable['timed-metadata'][result.pid];\n      }\n\n      result.type = 'pes';\n      result.data = packet.subarray(offset);\n      this.trigger('data', result);\n    };\n  };\n\n  _TransportParseStream.prototype = new stream();\n  _TransportParseStream.STREAM_TYPES = {\n    h264: 0x1b,\n    adts: 0x0f\n  };\n  /**\n   * Reconsistutes program elementary stream (PES) packets from parsed\n   * transport stream packets. That is, if you pipe an\n   * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n   * events will be events which capture the bytes for individual PES\n   * packets plus relevant metadata that has been extracted from the\n   * container.\n   */\n\n  _ElementaryStream = function ElementaryStream() {\n    var self = this,\n        segmentHadPmt = false,\n        // PES packet fragments\n    video = {\n      data: [],\n      size: 0\n    },\n        audio = {\n      data: [],\n      size: 0\n    },\n        timedMetadata = {\n      data: [],\n      size: 0\n    },\n        programMapTable,\n        parsePes = function parsePes(payload, pes) {\n      var ptsDtsFlags;\n      var startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n      pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n      // that are frame data that is continuing from the previous fragment. This\n      // is to check that the pes data is the start of a new pes payload\n\n      if (startPrefix !== 1) {\n        return;\n      } // get the packet length, this will be 0 for video\n\n\n      pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n      pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n      // and a DTS value. Determine what combination of values is\n      // available to work with.\n\n      ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n      // performs all bitwise operations on 32-bit integers but javascript\n      // supports a much greater range (52-bits) of integer using standard\n      // mathematical operations.\n      // We construct a 31-bit value using bitwise operators over the 31\n      // most significant bits and then multiply by 4 (equal to a left-shift\n      // of 2) before we add the final 2 least significant bits of the\n      // timestamp (equal to an OR.)\n\n      if (ptsDtsFlags & 0xC0) {\n        // the PTS and DTS are not written out directly. For information\n        // on how they are encoded, see\n        // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n        pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n        pes.pts *= 4; // Left shift by 2\n\n        pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n        pes.dts = pes.pts;\n\n        if (ptsDtsFlags & 0x40) {\n          pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n          pes.dts *= 4; // Left shift by 2\n\n          pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n        }\n      } // the data section starts immediately after the PES header.\n      // pes_header_data_length specifies the number of header bytes\n      // that follow the last byte of the field.\n\n\n      pes.data = payload.subarray(9 + payload[8]);\n    },\n\n    /**\n      * Pass completely parsed PES packets to the next stream in the pipeline\n     **/\n    flushStream = function flushStream(stream, type, forceFlush) {\n      var packetData = new Uint8Array(stream.size),\n          event = {\n        type: type\n      },\n          i = 0,\n          offset = 0,\n          packetFlushable = false,\n          fragment; // do nothing if there is not enough buffered data for a complete\n      // PES header\n\n      if (!stream.data.length || stream.size < 9) {\n        return;\n      }\n\n      event.trackId = stream.data[0].pid; // reassemble the packet\n\n      for (i = 0; i < stream.data.length; i++) {\n        fragment = stream.data[i];\n        packetData.set(fragment.data, offset);\n        offset += fragment.data.byteLength;\n      } // parse assembled packet's PES header\n\n\n      parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n      // check that there is enough stream data to fill the packet\n\n      packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n      if (forceFlush || packetFlushable) {\n        stream.size = 0;\n        stream.data.length = 0;\n      } // only emit packets that are complete. this is to avoid assembling\n      // incomplete PES packets due to poor segmentation\n\n\n      if (packetFlushable) {\n        self.trigger('data', event);\n      }\n    };\n\n    _ElementaryStream.prototype.init.call(this);\n    /**\n     * Identifies M2TS packet types and parses PES packets using metadata\n     * parsed from the PMT\n     **/\n\n\n    this.push = function (data) {\n      ({\n        pat: function pat() {// we have to wait for the PMT to arrive as well before we\n          // have any meaningful metadata\n        },\n        pes: function pes() {\n          var stream, streamType;\n\n          switch (data.streamType) {\n            case streamTypes.H264_STREAM_TYPE:\n              stream = video;\n              streamType = 'video';\n              break;\n\n            case streamTypes.ADTS_STREAM_TYPE:\n              stream = audio;\n              streamType = 'audio';\n              break;\n\n            case streamTypes.METADATA_STREAM_TYPE:\n              stream = timedMetadata;\n              streamType = 'timed-metadata';\n              break;\n\n            default:\n              // ignore unknown stream types\n              return;\n          } // if a new packet is starting, we can flush the completed\n          // packet\n\n\n          if (data.payloadUnitStartIndicator) {\n            flushStream(stream, streamType, true);\n          } // buffer this fragment until we are sure we've received the\n          // complete payload\n\n\n          stream.data.push(data);\n          stream.size += data.data.byteLength;\n        },\n        pmt: function pmt() {\n          var event = {\n            type: 'metadata',\n            tracks: []\n          };\n          programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n          if (programMapTable.video !== null) {\n            event.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.video,\n              codec: 'avc',\n              type: 'video'\n            });\n          }\n\n          if (programMapTable.audio !== null) {\n            event.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.audio,\n              codec: 'adts',\n              type: 'audio'\n            });\n          }\n\n          segmentHadPmt = true;\n          self.trigger('data', event);\n        }\n      })[data.type]();\n    };\n\n    this.reset = function () {\n      video.size = 0;\n      video.data.length = 0;\n      audio.size = 0;\n      audio.data.length = 0;\n      this.trigger('reset');\n    };\n    /**\n     * Flush any remaining input. Video PES packets may be of variable\n     * length. Normally, the start of a new video packet can trigger the\n     * finalization of the previous packet. That is not possible if no\n     * more video is forthcoming, however. In that case, some other\n     * mechanism (like the end of the file) has to be employed. When it is\n     * clear that no additional data is forthcoming, calling this method\n     * will flush the buffered packets.\n     */\n\n\n    this.flushStreams_ = function () {\n      // !!THIS ORDER IS IMPORTANT!!\n      // video first then audio\n      flushStream(video, 'video');\n      flushStream(audio, 'audio');\n      flushStream(timedMetadata, 'timed-metadata');\n    };\n\n    this.flush = function () {\n      // if on flush we haven't had a pmt emitted\n      // and we have a pmt to emit. emit the pmt\n      // so that we trigger a trackinfo downstream.\n      if (!segmentHadPmt && programMapTable) {\n        var pmt = {\n          type: 'metadata',\n          tracks: []\n        }; // translate audio and video streams to tracks\n\n        if (programMapTable.video !== null) {\n          pmt.tracks.push({\n            timelineStartInfo: {\n              baseMediaDecodeTime: 0\n            },\n            id: +programMapTable.video,\n            codec: 'avc',\n            type: 'video'\n          });\n        }\n\n        if (programMapTable.audio !== null) {\n          pmt.tracks.push({\n            timelineStartInfo: {\n              baseMediaDecodeTime: 0\n            },\n            id: +programMapTable.audio,\n            codec: 'adts',\n            type: 'audio'\n          });\n        }\n\n        self.trigger('data', pmt);\n      }\n\n      segmentHadPmt = false;\n      this.flushStreams_();\n      this.trigger('done');\n    };\n  };\n\n  _ElementaryStream.prototype = new stream();\n  var m2ts = {\n    PAT_PID: 0x0000,\n    MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n    TransportPacketStream: _TransportPacketStream,\n    TransportParseStream: _TransportParseStream,\n    ElementaryStream: _ElementaryStream,\n    TimestampRolloverStream: TimestampRolloverStream,\n    CaptionStream: captionStream.CaptionStream,\n    Cea608Stream: captionStream.Cea608Stream,\n    Cea708Stream: captionStream.Cea708Stream,\n    MetadataStream: metadataStream\n  };\n\n  for (var type in streamTypes) {\n    if (streamTypes.hasOwnProperty(type)) {\n      m2ts[type] = streamTypes[type];\n    }\n  }\n\n  var m2ts_1 = m2ts;\n  var ONE_SECOND_IN_TS$2 = clock.ONE_SECOND_IN_TS;\n\n  var _AdtsStream;\n\n  var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n  /*\n   * Accepts a ElementaryStream and emits data events with parsed\n   * AAC Audio Frames of the individual packets. Input audio in ADTS\n   * format is unpacked and re-emitted as AAC frames.\n   *\n   * @see http://wiki.multimedia.cx/index.php?title=ADTS\n   * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n   */\n\n  _AdtsStream = function AdtsStream(handlePartialSegments) {\n    var buffer,\n        frameNum = 0;\n\n    _AdtsStream.prototype.init.call(this);\n\n    this.skipWarn_ = function (start, end) {\n      this.trigger('log', {\n        level: 'warn',\n        message: \"adts skiping bytes \" + start + \" to \" + end + \" in frame \" + frameNum + \" outside syncword\"\n      });\n    };\n\n    this.push = function (packet) {\n      var i = 0,\n          frameLength,\n          protectionSkipBytes,\n          oldBuffer,\n          sampleCount,\n          adtsFrameDuration;\n\n      if (!handlePartialSegments) {\n        frameNum = 0;\n      }\n\n      if (packet.type !== 'audio') {\n        // ignore non-audio data\n        return;\n      } // Prepend any data in the buffer to the input data so that we can parse\n      // aac frames the cross a PES packet boundary\n\n\n      if (buffer && buffer.length) {\n        oldBuffer = buffer;\n        buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n        buffer.set(oldBuffer);\n        buffer.set(packet.data, oldBuffer.byteLength);\n      } else {\n        buffer = packet.data;\n      } // unpack any ADTS frames which have been fully received\n      // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n\n      var skip; // We use i + 7 here because we want to be able to parse the entire header.\n      // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n      while (i + 7 < buffer.length) {\n        // Look for the start of an ADTS header..\n        if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n          if (typeof skip !== 'number') {\n            skip = i;\n          } // If a valid header was not found,  jump one forward and attempt to\n          // find a valid ADTS header starting at the next byte\n\n\n          i++;\n          continue;\n        }\n\n        if (typeof skip === 'number') {\n          this.skipWarn_(skip, i);\n          skip = null;\n        } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n        // end of the ADTS header\n\n\n        protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n        // end of the sync sequence\n        // NOTE: frame length includes the size of the header\n\n        frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n        sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n        adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n        // then we have to wait for more data\n\n        if (buffer.byteLength - i < frameLength) {\n          break;\n        } // Otherwise, deliver the complete AAC frame\n\n\n        this.trigger('data', {\n          pts: packet.pts + frameNum * adtsFrameDuration,\n          dts: packet.dts + frameNum * adtsFrameDuration,\n          sampleCount: sampleCount,\n          audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n          channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n          samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n          samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n          // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n          samplesize: 16,\n          // data is the frame without it's header\n          data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n        });\n        frameNum++;\n        i += frameLength;\n      }\n\n      if (typeof skip === 'number') {\n        this.skipWarn_(skip, i);\n        skip = null;\n      } // remove processed bytes from the buffer.\n\n\n      buffer = buffer.subarray(i);\n    };\n\n    this.flush = function () {\n      frameNum = 0;\n      this.trigger('done');\n    };\n\n    this.reset = function () {\n      buffer = void 0;\n      this.trigger('reset');\n    };\n\n    this.endTimeline = function () {\n      buffer = void 0;\n      this.trigger('endedtimeline');\n    };\n  };\n\n  _AdtsStream.prototype = new stream();\n  var adts = _AdtsStream;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var ExpGolomb;\n  /**\n   * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n   * scheme used by h264.\n   */\n\n  ExpGolomb = function ExpGolomb(workingData) {\n    var // the number of bytes left to examine in workingData\n    workingBytesAvailable = workingData.byteLength,\n        // the current word being examined\n    workingWord = 0,\n        // :uint\n    // the number of bits left to examine in the current word\n    workingBitsAvailable = 0; // :uint;\n    // ():uint\n\n    this.length = function () {\n      return 8 * workingBytesAvailable;\n    }; // ():uint\n\n\n    this.bitsAvailable = function () {\n      return 8 * workingBytesAvailable + workingBitsAvailable;\n    }; // ():void\n\n\n    this.loadWord = function () {\n      var position = workingData.byteLength - workingBytesAvailable,\n          workingBytes = new Uint8Array(4),\n          availableBytes = Math.min(4, workingBytesAvailable);\n\n      if (availableBytes === 0) {\n        throw new Error('no bytes available');\n      }\n\n      workingBytes.set(workingData.subarray(position, position + availableBytes));\n      workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n      workingBitsAvailable = availableBytes * 8;\n      workingBytesAvailable -= availableBytes;\n    }; // (count:int):void\n\n\n    this.skipBits = function (count) {\n      var skipBytes; // :int\n\n      if (workingBitsAvailable > count) {\n        workingWord <<= count;\n        workingBitsAvailable -= count;\n      } else {\n        count -= workingBitsAvailable;\n        skipBytes = Math.floor(count / 8);\n        count -= skipBytes * 8;\n        workingBytesAvailable -= skipBytes;\n        this.loadWord();\n        workingWord <<= count;\n        workingBitsAvailable -= count;\n      }\n    }; // (size:int):uint\n\n\n    this.readBits = function (size) {\n      var bits = Math.min(workingBitsAvailable, size),\n          // :uint\n      valu = workingWord >>> 32 - bits; // :uint\n      // if size > 31, handle error\n\n      workingBitsAvailable -= bits;\n\n      if (workingBitsAvailable > 0) {\n        workingWord <<= bits;\n      } else if (workingBytesAvailable > 0) {\n        this.loadWord();\n      }\n\n      bits = size - bits;\n\n      if (bits > 0) {\n        return valu << bits | this.readBits(bits);\n      }\n\n      return valu;\n    }; // ():uint\n\n\n    this.skipLeadingZeros = function () {\n      var leadingZeroCount; // :uint\n\n      for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n        if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n          // the first bit of working word is 1\n          workingWord <<= leadingZeroCount;\n          workingBitsAvailable -= leadingZeroCount;\n          return leadingZeroCount;\n        }\n      } // we exhausted workingWord and still have not found a 1\n\n\n      this.loadWord();\n      return leadingZeroCount + this.skipLeadingZeros();\n    }; // ():void\n\n\n    this.skipUnsignedExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():void\n\n\n    this.skipExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():uint\n\n\n    this.readUnsignedExpGolomb = function () {\n      var clz = this.skipLeadingZeros(); // :uint\n\n      return this.readBits(clz + 1) - 1;\n    }; // ():int\n\n\n    this.readExpGolomb = function () {\n      var valu = this.readUnsignedExpGolomb(); // :int\n\n      if (0x01 & valu) {\n        // the number is odd if the low order bit is set\n        return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n      }\n\n      return -1 * (valu >>> 1); // divide by two then make it negative\n    }; // Some convenience functions\n    // :Boolean\n\n\n    this.readBoolean = function () {\n      return this.readBits(1) === 1;\n    }; // ():int\n\n\n    this.readUnsignedByte = function () {\n      return this.readBits(8);\n    };\n\n    this.loadWord();\n  };\n\n  var expGolomb = ExpGolomb;\n\n  var _H264Stream, _NalByteStream;\n\n  var PROFILES_WITH_OPTIONAL_SPS_DATA;\n  /**\n   * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n   */\n\n  _NalByteStream = function NalByteStream() {\n    var syncPoint = 0,\n        i,\n        buffer;\n\n    _NalByteStream.prototype.init.call(this);\n    /*\n     * Scans a byte stream and triggers a data event with the NAL units found.\n     * @param {Object} data Event received from H264Stream\n     * @param {Uint8Array} data.data The h264 byte stream to be scanned\n     *\n     * @see H264Stream.push\n     */\n\n\n    this.push = function (data) {\n      var swapBuffer;\n\n      if (!buffer) {\n        buffer = data.data;\n      } else {\n        swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n        swapBuffer.set(buffer);\n        swapBuffer.set(data.data, buffer.byteLength);\n        buffer = swapBuffer;\n      }\n\n      var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n      // scan for NAL unit boundaries\n      // a match looks like this:\n      // 0 0 1 .. NAL .. 0 0 1\n      // ^ sync point        ^ i\n      // or this:\n      // 0 0 1 .. NAL .. 0 0 0\n      // ^ sync point        ^ i\n      // advance the sync point to a NAL start, if necessary\n\n      for (; syncPoint < len - 3; syncPoint++) {\n        if (buffer[syncPoint + 2] === 1) {\n          // the sync point is properly aligned\n          i = syncPoint + 5;\n          break;\n        }\n      }\n\n      while (i < len) {\n        // look at the current byte to determine if we've hit the end of\n        // a NAL unit boundary\n        switch (buffer[i]) {\n          case 0:\n            // skip past non-sync sequences\n            if (buffer[i - 1] !== 0) {\n              i += 2;\n              break;\n            } else if (buffer[i - 2] !== 0) {\n              i++;\n              break;\n            } // deliver the NAL unit if it isn't empty\n\n\n            if (syncPoint + 3 !== i - 2) {\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            } // drop trailing zeroes\n\n\n            do {\n              i++;\n            } while (buffer[i] !== 1 && i < len);\n\n            syncPoint = i - 2;\n            i += 3;\n            break;\n\n          case 1:\n            // skip past non-sync sequences\n            if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n              i += 3;\n              break;\n            } // deliver the NAL unit\n\n\n            this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            syncPoint = i - 2;\n            i += 3;\n            break;\n\n          default:\n            // the current byte isn't a one or zero, so it cannot be part\n            // of a sync sequence\n            i += 3;\n            break;\n        }\n      } // filter out the NAL units that were delivered\n\n\n      buffer = buffer.subarray(syncPoint);\n      i -= syncPoint;\n      syncPoint = 0;\n    };\n\n    this.reset = function () {\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('reset');\n    };\n\n    this.flush = function () {\n      // deliver the last buffered NAL unit\n      if (buffer && buffer.byteLength > 3) {\n        this.trigger('data', buffer.subarray(syncPoint + 3));\n      } // reset the stream state\n\n\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n  };\n\n  _NalByteStream.prototype = new stream(); // values of profile_idc that indicate additional fields are included in the SPS\n  // see Recommendation ITU-T H.264 (4/2013),\n  // 7.3.2.1.1 Sequence parameter set data syntax\n\n  PROFILES_WITH_OPTIONAL_SPS_DATA = {\n    100: true,\n    110: true,\n    122: true,\n    244: true,\n    44: true,\n    83: true,\n    86: true,\n    118: true,\n    128: true,\n    // TODO: the three profiles below don't\n    // appear to have sps data in the specificiation anymore?\n    138: true,\n    139: true,\n    134: true\n  };\n  /**\n   * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n   * events.\n   */\n\n  _H264Stream = function H264Stream() {\n    var nalByteStream = new _NalByteStream(),\n        self,\n        trackId,\n        currentPts,\n        currentDts,\n        discardEmulationPreventionBytes,\n        readSequenceParameterSet,\n        skipScalingList;\n\n    _H264Stream.prototype.init.call(this);\n\n    self = this;\n    /*\n     * Pushes a packet from a stream onto the NalByteStream\n     *\n     * @param {Object} packet - A packet received from a stream\n     * @param {Uint8Array} packet.data - The raw bytes of the packet\n     * @param {Number} packet.dts - Decode timestamp of the packet\n     * @param {Number} packet.pts - Presentation timestamp of the packet\n     * @param {Number} packet.trackId - The id of the h264 track this packet came from\n     * @param {('video'|'audio')} packet.type - The type of packet\n     *\n     */\n\n    this.push = function (packet) {\n      if (packet.type !== 'video') {\n        return;\n      }\n\n      trackId = packet.trackId;\n      currentPts = packet.pts;\n      currentDts = packet.dts;\n      nalByteStream.push(packet);\n    };\n    /*\n     * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n     * for the NALUs to the next stream component.\n     * Also, preprocess caption and sequence parameter NALUs.\n     *\n     * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n     * @see NalByteStream.push\n     */\n\n\n    nalByteStream.on('data', function (data) {\n      var event = {\n        trackId: trackId,\n        pts: currentPts,\n        dts: currentDts,\n        data: data,\n        nalUnitTypeCode: data[0] & 0x1f\n      };\n\n      switch (event.nalUnitTypeCode) {\n        case 0x05:\n          event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n          break;\n\n        case 0x06:\n          event.nalUnitType = 'sei_rbsp';\n          event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n          break;\n\n        case 0x07:\n          event.nalUnitType = 'seq_parameter_set_rbsp';\n          event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n          event.config = readSequenceParameterSet(event.escapedRBSP);\n          break;\n\n        case 0x08:\n          event.nalUnitType = 'pic_parameter_set_rbsp';\n          break;\n\n        case 0x09:\n          event.nalUnitType = 'access_unit_delimiter_rbsp';\n          break;\n      } // This triggers data on the H264Stream\n\n\n      self.trigger('data', event);\n    });\n    nalByteStream.on('done', function () {\n      self.trigger('done');\n    });\n    nalByteStream.on('partialdone', function () {\n      self.trigger('partialdone');\n    });\n    nalByteStream.on('reset', function () {\n      self.trigger('reset');\n    });\n    nalByteStream.on('endedtimeline', function () {\n      self.trigger('endedtimeline');\n    });\n\n    this.flush = function () {\n      nalByteStream.flush();\n    };\n\n    this.partialFlush = function () {\n      nalByteStream.partialFlush();\n    };\n\n    this.reset = function () {\n      nalByteStream.reset();\n    };\n\n    this.endTimeline = function () {\n      nalByteStream.endTimeline();\n    };\n    /**\n     * Advance the ExpGolomb decoder past a scaling list. The scaling\n     * list is optionally transmitted as part of a sequence parameter\n     * set and is not relevant to transmuxing.\n     * @param count {number} the number of entries in this scaling list\n     * @param expGolombDecoder {object} an ExpGolomb pointed to the\n     * start of a scaling list\n     * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n     */\n\n\n    skipScalingList = function skipScalingList(count, expGolombDecoder) {\n      var lastScale = 8,\n          nextScale = 8,\n          j,\n          deltaScale;\n\n      for (j = 0; j < count; j++) {\n        if (nextScale !== 0) {\n          deltaScale = expGolombDecoder.readExpGolomb();\n          nextScale = (lastScale + deltaScale + 256) % 256;\n        }\n\n        lastScale = nextScale === 0 ? lastScale : nextScale;\n      }\n    };\n    /**\n     * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n     * Sequence Payload\"\n     * @param data {Uint8Array} the bytes of a RBSP from a NAL\n     * unit\n     * @return {Uint8Array} the RBSP without any Emulation\n     * Prevention Bytes\n     */\n\n\n    discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\n      var length = data.byteLength,\n          emulationPreventionBytesPositions = [],\n          i = 1,\n          newLength,\n          newData; // Find all `Emulation Prevention Bytes`\n\n      while (i < length - 2) {\n        if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n          emulationPreventionBytesPositions.push(i + 2);\n          i += 2;\n        } else {\n          i++;\n        }\n      } // If no Emulation Prevention Bytes were found just return the original\n      // array\n\n\n      if (emulationPreventionBytesPositions.length === 0) {\n        return data;\n      } // Create a new array to hold the NAL unit data\n\n\n      newLength = length - emulationPreventionBytesPositions.length;\n      newData = new Uint8Array(newLength);\n      var sourceIndex = 0;\n\n      for (i = 0; i < newLength; sourceIndex++, i++) {\n        if (sourceIndex === emulationPreventionBytesPositions[0]) {\n          // Skip this byte\n          sourceIndex++; // Remove this position index\n\n          emulationPreventionBytesPositions.shift();\n        }\n\n        newData[i] = data[sourceIndex];\n      }\n\n      return newData;\n    };\n    /**\n     * Read a sequence parameter set and return some interesting video\n     * properties. A sequence parameter set is the H264 metadata that\n     * describes the properties of upcoming video frames.\n     * @param data {Uint8Array} the bytes of a sequence parameter set\n     * @return {object} an object with configuration parsed from the\n     * sequence parameter set, including the dimensions of the\n     * associated video frames.\n     */\n\n\n    readSequenceParameterSet = function readSequenceParameterSet(data) {\n      var frameCropLeftOffset = 0,\n          frameCropRightOffset = 0,\n          frameCropTopOffset = 0,\n          frameCropBottomOffset = 0,\n          expGolombDecoder,\n          profileIdc,\n          levelIdc,\n          profileCompatibility,\n          chromaFormatIdc,\n          picOrderCntType,\n          numRefFramesInPicOrderCntCycle,\n          picWidthInMbsMinus1,\n          picHeightInMapUnitsMinus1,\n          frameMbsOnlyFlag,\n          scalingListCount,\n          sarRatio = [1, 1],\n          aspectRatioIdc,\n          i;\n      expGolombDecoder = new expGolomb(data);\n      profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n      profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n      levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n      expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n      // some profiles have more optional data we don't need\n\n      if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n        chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n\n        if (chromaFormatIdc === 3) {\n          expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n        }\n\n        expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n        expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n        expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n        if (expGolombDecoder.readBoolean()) {\n          // seq_scaling_matrix_present_flag\n          scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n\n          for (i = 0; i < scalingListCount; i++) {\n            if (expGolombDecoder.readBoolean()) {\n              // seq_scaling_list_present_flag[ i ]\n              if (i < 6) {\n                skipScalingList(16, expGolombDecoder);\n              } else {\n                skipScalingList(64, expGolombDecoder);\n              }\n            }\n          }\n        }\n      }\n\n      expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n      picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n\n      if (picOrderCntType === 0) {\n        expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n      } else if (picOrderCntType === 1) {\n        expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n        expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n        expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n        numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n\n        for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n          expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n        }\n      }\n\n      expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n      expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n      picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n      picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n      frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n\n      if (frameMbsOnlyFlag === 0) {\n        expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n      }\n\n      expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n      if (expGolombDecoder.readBoolean()) {\n        // frame_cropping_flag\n        frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n      }\n\n      if (expGolombDecoder.readBoolean()) {\n        // vui_parameters_present_flag\n        if (expGolombDecoder.readBoolean()) {\n          // aspect_ratio_info_present_flag\n          aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n\n          switch (aspectRatioIdc) {\n            case 1:\n              sarRatio = [1, 1];\n              break;\n\n            case 2:\n              sarRatio = [12, 11];\n              break;\n\n            case 3:\n              sarRatio = [10, 11];\n              break;\n\n            case 4:\n              sarRatio = [16, 11];\n              break;\n\n            case 5:\n              sarRatio = [40, 33];\n              break;\n\n            case 6:\n              sarRatio = [24, 11];\n              break;\n\n            case 7:\n              sarRatio = [20, 11];\n              break;\n\n            case 8:\n              sarRatio = [32, 11];\n              break;\n\n            case 9:\n              sarRatio = [80, 33];\n              break;\n\n            case 10:\n              sarRatio = [18, 11];\n              break;\n\n            case 11:\n              sarRatio = [15, 11];\n              break;\n\n            case 12:\n              sarRatio = [64, 33];\n              break;\n\n            case 13:\n              sarRatio = [160, 99];\n              break;\n\n            case 14:\n              sarRatio = [4, 3];\n              break;\n\n            case 15:\n              sarRatio = [3, 2];\n              break;\n\n            case 16:\n              sarRatio = [2, 1];\n              break;\n\n            case 255:\n              {\n                sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n                break;\n              }\n          }\n\n          if (sarRatio) {\n            sarRatio[0] / sarRatio[1];\n          }\n        }\n      }\n\n      return {\n        profileIdc: profileIdc,\n        levelIdc: levelIdc,\n        profileCompatibility: profileCompatibility,\n        width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n        height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n        // sar is sample aspect ratio\n        sarRatio: sarRatio\n      };\n    };\n  };\n\n  _H264Stream.prototype = new stream();\n  var h264 = {\n    H264Stream: _H264Stream,\n    NalByteStream: _NalByteStream\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Utilities to detect basic properties and metadata about Aac data.\n   */\n\n  var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n\n  var parseId3TagSize = function parseId3TagSize(header, byteIndex) {\n    var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n        flags = header[byteIndex + 5],\n        footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n    returnSize = returnSize >= 0 ? returnSize : 0;\n\n    if (footerPresent) {\n      return returnSize + 20;\n    }\n\n    return returnSize + 10;\n  };\n\n  var getId3Offset = function getId3Offset(data, offset) {\n    if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n      return offset;\n    }\n\n    offset += parseId3TagSize(data, offset);\n    return getId3Offset(data, offset);\n  }; // TODO: use vhs-utils\n\n\n  var isLikelyAacData$1 = function isLikelyAacData(data) {\n    var offset = getId3Offset(data, 0);\n    return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 && // verify that the 2 layer bits are 0, aka this\n    // is not mp3 data but aac data.\n    (data[offset + 1] & 0x16) === 0x10;\n  };\n\n  var parseSyncSafeInteger = function parseSyncSafeInteger(data) {\n    return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n  }; // return a percent-encoded representation of the specified byte range\n  // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n\n  var percentEncode = function percentEncode(bytes, start, end) {\n    var i,\n        result = '';\n\n    for (i = start; i < end; i++) {\n      result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n    }\n\n    return result;\n  }; // return the string representation of the specified byte range,\n  // interpreted as ISO-8859-1.\n\n\n  var parseIso88591 = function parseIso88591(bytes, start, end) {\n    return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n  };\n\n  var parseAdtsSize = function parseAdtsSize(header, byteIndex) {\n    var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n        middle = header[byteIndex + 4] << 3,\n        highTwo = header[byteIndex + 3] & 0x3 << 11;\n    return highTwo | middle | lowThree;\n  };\n\n  var parseType$2 = function parseType(header, byteIndex) {\n    if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n      return 'timed-metadata';\n    } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n      return 'audio';\n    }\n\n    return null;\n  };\n\n  var parseSampleRate = function parseSampleRate(packet) {\n    var i = 0;\n\n    while (i + 5 < packet.length) {\n      if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n        // If a valid header was not found,  jump one forward and attempt to\n        // find a valid ADTS header starting at the next byte\n        i++;\n        continue;\n      }\n\n      return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n    }\n\n    return null;\n  };\n\n  var parseAacTimestamp = function parseAacTimestamp(packet) {\n    var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n    frameStart = 10;\n\n    if (packet[5] & 0x40) {\n      // advance the frame start past the extended header\n      frameStart += 4; // header size field\n\n      frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n    } // parse one or more ID3 frames\n    // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n\n    do {\n      // determine the number of bytes in this frame\n      frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n\n      if (frameSize < 1) {\n        return null;\n      }\n\n      frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n\n      if (frameHeader === 'PRIV') {\n        frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n\n        for (var i = 0; i < frame.byteLength; i++) {\n          if (frame[i] === 0) {\n            var owner = parseIso88591(frame, 0, i);\n\n            if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n              var d = frame.subarray(i + 1);\n              var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n              size *= 4;\n              size += d[7] & 0x03;\n              return size;\n            }\n\n            break;\n          }\n        }\n      }\n\n      frameStart += 10; // advance past the frame header\n\n      frameStart += frameSize; // advance past the frame body\n    } while (frameStart < packet.byteLength);\n\n    return null;\n  };\n\n  var utils = {\n    isLikelyAacData: isLikelyAacData$1,\n    parseId3TagSize: parseId3TagSize,\n    parseAdtsSize: parseAdtsSize,\n    parseType: parseType$2,\n    parseSampleRate: parseSampleRate,\n    parseAacTimestamp: parseAacTimestamp\n  };\n\n  var _AacStream;\n  /**\n   * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n   */\n\n\n  _AacStream = function AacStream() {\n    var everything = new Uint8Array(),\n        timeStamp = 0;\n\n    _AacStream.prototype.init.call(this);\n\n    this.setTimestamp = function (timestamp) {\n      timeStamp = timestamp;\n    };\n\n    this.push = function (bytes) {\n      var frameSize = 0,\n          byteIndex = 0,\n          bytesLeft,\n          chunk,\n          packet,\n          tempLength; // If there are bytes remaining from the last segment, prepend them to the\n      // bytes that were pushed in\n\n      if (everything.length) {\n        tempLength = everything.length;\n        everything = new Uint8Array(bytes.byteLength + tempLength);\n        everything.set(everything.subarray(0, tempLength));\n        everything.set(bytes, tempLength);\n      } else {\n        everything = bytes;\n      }\n\n      while (everything.length - byteIndex >= 3) {\n        if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n          // Exit early because we don't have enough to parse\n          // the ID3 tag header\n          if (everything.length - byteIndex < 10) {\n            break;\n          } // check framesize\n\n\n          frameSize = utils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n          // Add to byteIndex to support multiple ID3 tags in sequence\n\n          if (byteIndex + frameSize > everything.length) {\n            break;\n          }\n\n          chunk = {\n            type: 'timed-metadata',\n            data: everything.subarray(byteIndex, byteIndex + frameSize)\n          };\n          this.trigger('data', chunk);\n          byteIndex += frameSize;\n          continue;\n        } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n          // Exit early because we don't have enough to parse\n          // the ADTS frame header\n          if (everything.length - byteIndex < 7) {\n            break;\n          }\n\n          frameSize = utils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (byteIndex + frameSize > everything.length) {\n            break;\n          }\n\n          packet = {\n            type: 'audio',\n            data: everything.subarray(byteIndex, byteIndex + frameSize),\n            pts: timeStamp,\n            dts: timeStamp\n          };\n          this.trigger('data', packet);\n          byteIndex += frameSize;\n          continue;\n        }\n\n        byteIndex++;\n      }\n\n      bytesLeft = everything.length - byteIndex;\n\n      if (bytesLeft > 0) {\n        everything = everything.subarray(byteIndex);\n      } else {\n        everything = new Uint8Array();\n      }\n    };\n\n    this.reset = function () {\n      everything = new Uint8Array();\n      this.trigger('reset');\n    };\n\n    this.endTimeline = function () {\n      everything = new Uint8Array();\n      this.trigger('endedtimeline');\n    };\n  };\n\n  _AacStream.prototype = new stream();\n  var aac = _AacStream; // constants\n\n  var AUDIO_PROPERTIES = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n  var audioProperties = AUDIO_PROPERTIES;\n  var VIDEO_PROPERTIES = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n  var videoProperties = VIDEO_PROPERTIES;\n  var H264Stream = h264.H264Stream;\n  var isLikelyAacData = utils.isLikelyAacData;\n  var ONE_SECOND_IN_TS$1 = clock.ONE_SECOND_IN_TS; // object types\n\n  var _VideoSegmentStream, _AudioSegmentStream, _Transmuxer, _CoalesceStream;\n\n  var retriggerForStream = function retriggerForStream(key, event) {\n    event.stream = key;\n    this.trigger('log', event);\n  };\n\n  var addPipelineLogRetriggers = function addPipelineLogRetriggers(transmuxer, pipeline) {\n    var keys = Object.keys(pipeline);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i]; // skip non-stream keys and headOfPipeline\n      // which is just a duplicate\n\n      if (key === 'headOfPipeline' || !pipeline[key].on) {\n        continue;\n      }\n\n      pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n    }\n  };\n  /**\n   * Compare two arrays (even typed) for same-ness\n   */\n\n\n  var arrayEquals = function arrayEquals(a, b) {\n    var i;\n\n    if (a.length !== b.length) {\n      return false;\n    } // compare the value of each element in the array\n\n\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  var generateSegmentTimingInfo = function generateSegmentTimingInfo(baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n    var ptsOffsetFromDts = startPts - startDts,\n        decodeDuration = endDts - startDts,\n        presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n    // however, the player time values will reflect a start from the baseMediaDecodeTime.\n    // In order to provide relevant values for the player times, base timing info on the\n    // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n    return {\n      start: {\n        dts: baseMediaDecodeTime,\n        pts: baseMediaDecodeTime + ptsOffsetFromDts\n      },\n      end: {\n        dts: baseMediaDecodeTime + decodeDuration,\n        pts: baseMediaDecodeTime + presentationDuration\n      },\n      prependedContentDuration: prependedContentDuration,\n      baseMediaDecodeTime: baseMediaDecodeTime\n    };\n  };\n  /**\n   * Constructs a single-track, ISO BMFF media segment from AAC data\n   * events. The output of this stream can be fed to a SourceBuffer\n   * configured with a suitable initialization segment.\n   * @param track {object} track metadata configuration\n   * @param options {object} transmuxer options object\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n\n  _AudioSegmentStream = function AudioSegmentStream(track, options) {\n    var adtsFrames = [],\n        sequenceNumber,\n        earliestAllowedDts = 0,\n        audioAppendStartTs = 0,\n        videoBaseMediaDecodeTime = Infinity;\n    options = options || {};\n    sequenceNumber = options.firstSequenceNumber || 0;\n\n    _AudioSegmentStream.prototype.init.call(this);\n\n    this.push = function (data) {\n      trackDecodeInfo.collectDtsInfo(track, data);\n\n      if (track) {\n        audioProperties.forEach(function (prop) {\n          track[prop] = data[prop];\n        });\n      } // buffer audio data until end() is called\n\n\n      adtsFrames.push(data);\n    };\n\n    this.setEarliestDts = function (earliestDts) {\n      earliestAllowedDts = earliestDts;\n    };\n\n    this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      videoBaseMediaDecodeTime = baseMediaDecodeTime;\n    };\n\n    this.setAudioAppendStart = function (timestamp) {\n      audioAppendStartTs = timestamp;\n    };\n\n    this.flush = function () {\n      var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n      if (adtsFrames.length === 0) {\n        this.trigger('done', 'AudioSegmentStream');\n        return;\n      }\n\n      frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n      track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n      videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n      // samples (that is, adts frames) in the audio data\n\n      track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n      mdat = mp4Generator.mdat(audioFrameUtils.concatenateFrameData(frames));\n      adtsFrames = [];\n      moof = mp4Generator.moof(sequenceNumber, [track]);\n      boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n      sequenceNumber++;\n      boxes.set(moof);\n      boxes.set(mdat, moof.byteLength);\n      trackDecodeInfo.clearDtsInfo(track);\n      frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n      // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n      // valid use-case where an init segment/data should be triggered without associated\n      // frames. Leaving for now, but should be looked into.\n\n      if (frames.length) {\n        segmentDuration = frames.length * frameDuration;\n        this.trigger('segmentTimingInfo', generateSegmentTimingInfo( // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n        // frame info is in video clock cycles. Convert to match expectation of\n        // listeners (that all timestamps will be based on video clock cycles).\n        clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate), // frame times are already in video clock, as is segment duration\n        frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n        this.trigger('timingInfo', {\n          start: frames[0].pts,\n          end: frames[0].pts + segmentDuration\n        });\n      }\n\n      this.trigger('data', {\n        track: track,\n        boxes: boxes\n      });\n      this.trigger('done', 'AudioSegmentStream');\n    };\n\n    this.reset = function () {\n      trackDecodeInfo.clearDtsInfo(track);\n      adtsFrames = [];\n      this.trigger('reset');\n    };\n  };\n\n  _AudioSegmentStream.prototype = new stream();\n  /**\n   * Constructs a single-track, ISO BMFF media segment from H264 data\n   * events. The output of this stream can be fed to a SourceBuffer\n   * configured with a suitable initialization segment.\n   * @param track {object} track metadata configuration\n   * @param options {object} transmuxer options object\n   * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n   *        gopsToAlignWith list when attempting to align gop pts\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n  _VideoSegmentStream = function VideoSegmentStream(track, options) {\n    var sequenceNumber,\n        nalUnits = [],\n        gopsToAlignWith = [],\n        config,\n        pps;\n    options = options || {};\n    sequenceNumber = options.firstSequenceNumber || 0;\n\n    _VideoSegmentStream.prototype.init.call(this);\n\n    delete track.minPTS;\n    this.gopCache_ = [];\n    /**\n      * Constructs a ISO BMFF segment given H264 nalUnits\n      * @param {Object} nalUnit A data event representing a nalUnit\n      * @param {String} nalUnit.nalUnitType\n      * @param {Object} nalUnit.config Properties for a mp4 track\n      * @param {Uint8Array} nalUnit.data The nalUnit bytes\n      * @see lib/codecs/h264.js\n     **/\n\n    this.push = function (nalUnit) {\n      trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n      if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n        config = nalUnit.config;\n        track.sps = [nalUnit.data];\n        videoProperties.forEach(function (prop) {\n          track[prop] = config[prop];\n        }, this);\n      }\n\n      if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n        pps = nalUnit.data;\n        track.pps = [nalUnit.data];\n      } // buffer video until flush() is called\n\n\n      nalUnits.push(nalUnit);\n    };\n    /**\n      * Pass constructed ISO BMFF track and boxes on to the\n      * next stream in the pipeline\n     **/\n\n\n    this.flush = function () {\n      var frames,\n          gopForFusion,\n          gops,\n          moof,\n          mdat,\n          boxes,\n          prependedContentDuration = 0,\n          firstGop,\n          lastGop; // Throw away nalUnits at the start of the byte stream until\n      // we find the first AUD\n\n      while (nalUnits.length) {\n        if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n          break;\n        }\n\n        nalUnits.shift();\n      } // Return early if no video data has been observed\n\n\n      if (nalUnits.length === 0) {\n        this.resetStream_();\n        this.trigger('done', 'VideoSegmentStream');\n        return;\n      } // Organize the raw nal-units into arrays that represent\n      // higher-level constructs such as frames and gops\n      // (group-of-pictures)\n\n\n      frames = frameUtils.groupNalsIntoFrames(nalUnits);\n      gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n      // a problem since MSE (on Chrome) requires a leading keyframe.\n      //\n      // We have two approaches to repairing this situation:\n      // 1) GOP-FUSION:\n      //    This is where we keep track of the GOPS (group-of-pictures)\n      //    from previous fragments and attempt to find one that we can\n      //    prepend to the current fragment in order to create a valid\n      //    fragment.\n      // 2) KEYFRAME-PULLING:\n      //    Here we search for the first keyframe in the fragment and\n      //    throw away all the frames between the start of the fragment\n      //    and that keyframe. We then extend the duration and pull the\n      //    PTS of the keyframe forward so that it covers the time range\n      //    of the frames that were disposed of.\n      //\n      // #1 is far prefereable over #2 which can cause \"stuttering\" but\n      // requires more things to be just right.\n\n      if (!gops[0][0].keyFrame) {\n        // Search for a gop for fusion from our gopCache\n        gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n\n        if (gopForFusion) {\n          // in order to provide more accurate timing information about the segment, save\n          // the number of seconds prepended to the original segment due to GOP fusion\n          prependedContentDuration = gopForFusion.duration;\n          gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n          // new gop at the beginning\n\n          gops.byteLength += gopForFusion.byteLength;\n          gops.nalCount += gopForFusion.nalCount;\n          gops.pts = gopForFusion.pts;\n          gops.dts = gopForFusion.dts;\n          gops.duration += gopForFusion.duration;\n        } else {\n          // If we didn't find a candidate gop fall back to keyframe-pulling\n          gops = frameUtils.extendFirstKeyFrame(gops);\n        }\n      } // Trim gops to align with gopsToAlignWith\n\n\n      if (gopsToAlignWith.length) {\n        var alignedGops;\n\n        if (options.alignGopsAtEnd) {\n          alignedGops = this.alignGopsAtEnd_(gops);\n        } else {\n          alignedGops = this.alignGopsAtStart_(gops);\n        }\n\n        if (!alignedGops) {\n          // save all the nals in the last GOP into the gop cache\n          this.gopCache_.unshift({\n            gop: gops.pop(),\n            pps: track.pps,\n            sps: track.sps\n          }); // Keep a maximum of 6 GOPs in the cache\n\n          this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n          nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n          this.resetStream_();\n          this.trigger('done', 'VideoSegmentStream');\n          return;\n        } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n        // when recalculated before sending off to CoalesceStream\n\n\n        trackDecodeInfo.clearDtsInfo(track);\n        gops = alignedGops;\n      }\n\n      trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n      // samples (that is, frames) in the video data\n\n      track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n      mdat = mp4Generator.mdat(frameUtils.concatenateNalData(gops));\n      track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n      this.trigger('processedGopsInfo', gops.map(function (gop) {\n        return {\n          pts: gop.pts,\n          dts: gop.dts,\n          byteLength: gop.byteLength\n        };\n      }));\n      firstGop = gops[0];\n      lastGop = gops[gops.length - 1];\n      this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n      this.trigger('timingInfo', {\n        start: gops[0].pts,\n        end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n      }); // save all the nals in the last GOP into the gop cache\n\n      this.gopCache_.unshift({\n        gop: gops.pop(),\n        pps: track.pps,\n        sps: track.sps\n      }); // Keep a maximum of 6 GOPs in the cache\n\n      this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n      nalUnits = [];\n      this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n      this.trigger('timelineStartInfo', track.timelineStartInfo);\n      moof = mp4Generator.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n      // throwing away hundreds of media segment fragments\n\n      boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n      sequenceNumber++;\n      boxes.set(moof);\n      boxes.set(mdat, moof.byteLength);\n      this.trigger('data', {\n        track: track,\n        boxes: boxes\n      });\n      this.resetStream_(); // Continue with the flush process now\n\n      this.trigger('done', 'VideoSegmentStream');\n    };\n\n    this.reset = function () {\n      this.resetStream_();\n      nalUnits = [];\n      this.gopCache_.length = 0;\n      gopsToAlignWith.length = 0;\n      this.trigger('reset');\n    };\n\n    this.resetStream_ = function () {\n      trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n      // for instance, when we are rendition switching\n\n      config = undefined;\n      pps = undefined;\n    }; // Search for a candidate Gop for gop-fusion from the gop cache and\n    // return it or return null if no good candidate was found\n\n\n    this.getGopForFusion_ = function (nalUnit) {\n      var halfSecond = 45000,\n          // Half-a-second in a 90khz clock\n      allowableOverlap = 10000,\n          // About 3 frames @ 30fps\n      nearestDistance = Infinity,\n          dtsDistance,\n          nearestGopObj,\n          currentGop,\n          currentGopObj,\n          i; // Search for the GOP nearest to the beginning of this nal unit\n\n      for (i = 0; i < this.gopCache_.length; i++) {\n        currentGopObj = this.gopCache_[i];\n        currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n        if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n          continue;\n        } // Reject Gops that would require a negative baseMediaDecodeTime\n\n\n        if (currentGop.dts < track.timelineStartInfo.dts) {\n          continue;\n        } // The distance between the end of the gop and the start of the nalUnit\n\n\n        dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n        // a half-second of the nal unit\n\n        if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n          // Always use the closest GOP we found if there is more than\n          // one candidate\n          if (!nearestGopObj || nearestDistance > dtsDistance) {\n            nearestGopObj = currentGopObj;\n            nearestDistance = dtsDistance;\n          }\n        }\n      }\n\n      if (nearestGopObj) {\n        return nearestGopObj.gop;\n      }\n\n      return null;\n    }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n    // of gopsToAlignWith starting from the START of the list\n\n\n    this.alignGopsAtStart_ = function (gops) {\n      var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n      byteLength = gops.byteLength;\n      nalCount = gops.nalCount;\n      duration = gops.duration;\n      alignIndex = gopIndex = 0;\n\n      while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n\n        if (align.pts === gop.pts) {\n          break;\n        }\n\n        if (gop.pts > align.pts) {\n          // this current gop starts after the current gop we want to align on, so increment\n          // align index\n          alignIndex++;\n          continue;\n        } // current gop starts before the current gop we want to align on. so increment gop\n        // index\n\n\n        gopIndex++;\n        byteLength -= gop.byteLength;\n        nalCount -= gop.nalCount;\n        duration -= gop.duration;\n      }\n\n      if (gopIndex === 0) {\n        // no gops to trim\n        return gops;\n      }\n\n      if (gopIndex === gops.length) {\n        // all gops trimmed, skip appending all gops\n        return null;\n      }\n\n      alignedGops = gops.slice(gopIndex);\n      alignedGops.byteLength = byteLength;\n      alignedGops.duration = duration;\n      alignedGops.nalCount = nalCount;\n      alignedGops.pts = alignedGops[0].pts;\n      alignedGops.dts = alignedGops[0].dts;\n      return alignedGops;\n    }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n    // of gopsToAlignWith starting from the END of the list\n\n\n    this.alignGopsAtEnd_ = function (gops) {\n      var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n      alignIndex = gopsToAlignWith.length - 1;\n      gopIndex = gops.length - 1;\n      alignEndIndex = null;\n      matchFound = false;\n\n      while (alignIndex >= 0 && gopIndex >= 0) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n\n        if (align.pts === gop.pts) {\n          matchFound = true;\n          break;\n        }\n\n        if (align.pts > gop.pts) {\n          alignIndex--;\n          continue;\n        }\n\n        if (alignIndex === gopsToAlignWith.length - 1) {\n          // gop.pts is greater than the last alignment candidate. If no match is found\n          // by the end of this loop, we still want to append gops that come after this\n          // point\n          alignEndIndex = gopIndex;\n        }\n\n        gopIndex--;\n      }\n\n      if (!matchFound && alignEndIndex === null) {\n        return null;\n      }\n\n      var trimIndex;\n\n      if (matchFound) {\n        trimIndex = gopIndex;\n      } else {\n        trimIndex = alignEndIndex;\n      }\n\n      if (trimIndex === 0) {\n        return gops;\n      }\n\n      var alignedGops = gops.slice(trimIndex);\n      var metadata = alignedGops.reduce(function (total, gop) {\n        total.byteLength += gop.byteLength;\n        total.duration += gop.duration;\n        total.nalCount += gop.nalCount;\n        return total;\n      }, {\n        byteLength: 0,\n        duration: 0,\n        nalCount: 0\n      });\n      alignedGops.byteLength = metadata.byteLength;\n      alignedGops.duration = metadata.duration;\n      alignedGops.nalCount = metadata.nalCount;\n      alignedGops.pts = alignedGops[0].pts;\n      alignedGops.dts = alignedGops[0].dts;\n      return alignedGops;\n    };\n\n    this.alignGopsWith = function (newGopsToAlignWith) {\n      gopsToAlignWith = newGopsToAlignWith;\n    };\n  };\n\n  _VideoSegmentStream.prototype = new stream();\n  /**\n   * A Stream that can combine multiple streams (ie. audio & video)\n   * into a single output segment for MSE. Also supports audio-only\n   * and video-only streams.\n   * @param options {object} transmuxer options object\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at media timeline start.\n   */\n\n  _CoalesceStream = function CoalesceStream(options, metadataStream) {\n    // Number of Tracks per output segment\n    // If greater than 1, we combine multiple\n    // tracks into a single segment\n    this.numberOfTracks = 0;\n    this.metadataStream = metadataStream;\n    options = options || {};\n\n    if (typeof options.remux !== 'undefined') {\n      this.remuxTracks = !!options.remux;\n    } else {\n      this.remuxTracks = true;\n    }\n\n    if (typeof options.keepOriginalTimestamps === 'boolean') {\n      this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n    } else {\n      this.keepOriginalTimestamps = false;\n    }\n\n    this.pendingTracks = [];\n    this.videoTrack = null;\n    this.pendingBoxes = [];\n    this.pendingCaptions = [];\n    this.pendingMetadata = [];\n    this.pendingBytes = 0;\n    this.emittedTracks = 0;\n\n    _CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n\n    this.push = function (output) {\n      // buffer incoming captions until the associated video segment\n      // finishes\n      if (output.text) {\n        return this.pendingCaptions.push(output);\n      } // buffer incoming id3 tags until the final flush\n\n\n      if (output.frames) {\n        return this.pendingMetadata.push(output);\n      } // Add this track to the list of pending tracks and store\n      // important information required for the construction of\n      // the final segment\n\n\n      this.pendingTracks.push(output.track);\n      this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n      // We unshift audio and push video because\n      // as of Chrome 75 when switching from\n      // one init segment to another if the video\n      // mdat does not appear after the audio mdat\n      // only audio will play for the duration of our transmux.\n\n      if (output.track.type === 'video') {\n        this.videoTrack = output.track;\n        this.pendingBoxes.push(output.boxes);\n      }\n\n      if (output.track.type === 'audio') {\n        this.audioTrack = output.track;\n        this.pendingBoxes.unshift(output.boxes);\n      }\n    };\n  };\n\n  _CoalesceStream.prototype = new stream();\n\n  _CoalesceStream.prototype.flush = function (flushSource) {\n    var offset = 0,\n        event = {\n      captions: [],\n      captionStreams: {},\n      metadata: [],\n      info: {}\n    },\n        caption,\n        id3,\n        initSegment,\n        timelineStartPts = 0,\n        i;\n\n    if (this.pendingTracks.length < this.numberOfTracks) {\n      if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n        // Return because we haven't received a flush from a data-generating\n        // portion of the segment (meaning that we have only recieved meta-data\n        // or captions.)\n        return;\n      } else if (this.remuxTracks) {\n        // Return until we have enough tracks from the pipeline to remux (if we\n        // are remuxing audio and video into a single MP4)\n        return;\n      } else if (this.pendingTracks.length === 0) {\n        // In the case where we receive a flush without any data having been\n        // received we consider it an emitted track for the purposes of coalescing\n        // `done` events.\n        // We do this for the case where there is an audio and video track in the\n        // segment but no audio data. (seen in several playlists with alternate\n        // audio tracks and no audio present in the main TS segments.)\n        this.emittedTracks++;\n\n        if (this.emittedTracks >= this.numberOfTracks) {\n          this.trigger('done');\n          this.emittedTracks = 0;\n        }\n\n        return;\n      }\n    }\n\n    if (this.videoTrack) {\n      timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n      videoProperties.forEach(function (prop) {\n        event.info[prop] = this.videoTrack[prop];\n      }, this);\n    } else if (this.audioTrack) {\n      timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n      audioProperties.forEach(function (prop) {\n        event.info[prop] = this.audioTrack[prop];\n      }, this);\n    }\n\n    if (this.videoTrack || this.audioTrack) {\n      if (this.pendingTracks.length === 1) {\n        event.type = this.pendingTracks[0].type;\n      } else {\n        event.type = 'combined';\n      }\n\n      this.emittedTracks += this.pendingTracks.length;\n      initSegment = mp4Generator.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n      event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n      // and track definitions\n\n      event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n      event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n      for (i = 0; i < this.pendingBoxes.length; i++) {\n        event.data.set(this.pendingBoxes[i], offset);\n        offset += this.pendingBoxes[i].byteLength;\n      } // Translate caption PTS times into second offsets to match the\n      // video timeline for the segment, and add track info\n\n\n      for (i = 0; i < this.pendingCaptions.length; i++) {\n        caption = this.pendingCaptions[i];\n        caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n        caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n        event.captionStreams[caption.stream] = true;\n        event.captions.push(caption);\n      } // Translate ID3 frame PTS times into second offsets to match the\n      // video timeline for the segment\n\n\n      for (i = 0; i < this.pendingMetadata.length; i++) {\n        id3 = this.pendingMetadata[i];\n        id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n        event.metadata.push(id3);\n      } // We add this to every single emitted segment even though we only need\n      // it for the first\n\n\n      event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n      this.pendingTracks.length = 0;\n      this.videoTrack = null;\n      this.pendingBoxes.length = 0;\n      this.pendingCaptions.length = 0;\n      this.pendingBytes = 0;\n      this.pendingMetadata.length = 0; // Emit the built segment\n      // We include captions and ID3 tags for backwards compatibility,\n      // ideally we should send only video and audio in the data event\n\n      this.trigger('data', event); // Emit each caption to the outside world\n      // Ideally, this would happen immediately on parsing captions,\n      // but we need to ensure that video data is sent back first\n      // so that caption timing can be adjusted to match video timing\n\n      for (i = 0; i < event.captions.length; i++) {\n        caption = event.captions[i];\n        this.trigger('caption', caption);\n      } // Emit each id3 tag to the outside world\n      // Ideally, this would happen immediately on parsing the tag,\n      // but we need to ensure that video data is sent back first\n      // so that ID3 frame timing can be adjusted to match video timing\n\n\n      for (i = 0; i < event.metadata.length; i++) {\n        id3 = event.metadata[i];\n        this.trigger('id3Frame', id3);\n      }\n    } // Only emit `done` if all tracks have been flushed and emitted\n\n\n    if (this.emittedTracks >= this.numberOfTracks) {\n      this.trigger('done');\n      this.emittedTracks = 0;\n    }\n  };\n\n  _CoalesceStream.prototype.setRemux = function (val) {\n    this.remuxTracks = val;\n  };\n  /**\n   * A Stream that expects MP2T binary data as input and produces\n   * corresponding media segments, suitable for use with Media Source\n   * Extension (MSE) implementations that support the ISO BMFF byte\n   * stream format, like Chrome.\n   */\n\n\n  _Transmuxer = function Transmuxer(options) {\n    var self = this,\n        hasFlushed = true,\n        videoTrack,\n        audioTrack;\n\n    _Transmuxer.prototype.init.call(this);\n\n    options = options || {};\n    this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n    this.transmuxPipeline_ = {};\n\n    this.setupAacPipeline = function () {\n      var pipeline = {};\n      this.transmuxPipeline_ = pipeline;\n      pipeline.type = 'aac';\n      pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\n\n      pipeline.aacStream = new aac();\n      pipeline.audioTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('audio');\n      pipeline.timedMetadataTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('timed-metadata');\n      pipeline.adtsStream = new adts();\n      pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n      pipeline.headOfPipeline = pipeline.aacStream;\n      pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n      pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n      pipeline.metadataStream.on('timestamp', function (frame) {\n        pipeline.aacStream.setTimestamp(frame.timeStamp);\n      });\n      pipeline.aacStream.on('data', function (data) {\n        if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n          return;\n        }\n\n        audioTrack = audioTrack || {\n          timelineStartInfo: {\n            baseMediaDecodeTime: self.baseMediaDecodeTime\n          },\n          codec: 'adts',\n          type: 'audio'\n        }; // hook up the audio segment stream to the first track with aac data\n\n        pipeline.coalesceStream.numberOfTracks++;\n        pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n        pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n        pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n        pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n        self.trigger('trackinfo', {\n          hasAudio: !!audioTrack,\n          hasVideo: !!videoTrack\n        });\n      }); // Re-emit any data coming from the coalesce stream to the outside world\n\n      pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n      pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n      addPipelineLogRetriggers(this, pipeline);\n    };\n\n    this.setupTsPipeline = function () {\n      var pipeline = {};\n      this.transmuxPipeline_ = pipeline;\n      pipeline.type = 'ts';\n      pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\n\n      pipeline.packetStream = new m2ts_1.TransportPacketStream();\n      pipeline.parseStream = new m2ts_1.TransportParseStream();\n      pipeline.elementaryStream = new m2ts_1.ElementaryStream();\n      pipeline.timestampRolloverStream = new m2ts_1.TimestampRolloverStream();\n      pipeline.adtsStream = new adts();\n      pipeline.h264Stream = new H264Stream();\n      pipeline.captionStream = new m2ts_1.CaptionStream(options);\n      pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n      pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n      pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n      // demux the streams\n\n      pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n      pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n      pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n      pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n      pipeline.elementaryStream.on('data', function (data) {\n        var i;\n\n        if (data.type === 'metadata') {\n          i = data.tracks.length; // scan the tracks listed in the metadata\n\n          while (i--) {\n            if (!videoTrack && data.tracks[i].type === 'video') {\n              videoTrack = data.tracks[i];\n              videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n            } else if (!audioTrack && data.tracks[i].type === 'audio') {\n              audioTrack = data.tracks[i];\n              audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n            }\n          } // hook up the video segment stream to the first track with h264 data\n\n\n          if (videoTrack && !pipeline.videoSegmentStream) {\n            pipeline.coalesceStream.numberOfTracks++;\n            pipeline.videoSegmentStream = new _VideoSegmentStream(videoTrack, options);\n            pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n            pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n              // When video emits timelineStartInfo data after a flush, we forward that\n              // info to the AudioSegmentStream, if it exists, because video timeline\n              // data takes precedence.  Do not do this if keepOriginalTimestamps is set,\n              // because this is a particularly subtle form of timestamp alteration.\n              if (audioTrack && !options.keepOriginalTimestamps) {\n                audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n                // very earliest DTS we have seen in video because Chrome will\n                // interpret any video track with a baseMediaDecodeTime that is\n                // non-zero as a gap.\n\n                pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n              }\n            });\n            pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n            pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n            pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n              if (audioTrack) {\n                pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n              }\n            });\n            pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n            pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n          }\n\n          if (audioTrack && !pipeline.audioSegmentStream) {\n            // hook up the audio segment stream to the first track with aac data\n            pipeline.coalesceStream.numberOfTracks++;\n            pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n            pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n            pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n            pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n            pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n          } // emit pmt info\n\n\n          self.trigger('trackinfo', {\n            hasAudio: !!audioTrack,\n            hasVideo: !!videoTrack\n          });\n        }\n      }); // Re-emit any data coming from the coalesce stream to the outside world\n\n      pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n      pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n        id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n        self.trigger('id3Frame', id3Frame);\n      });\n      pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n      pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n      addPipelineLogRetriggers(this, pipeline);\n    }; // hook up the segment streams once track metadata is delivered\n\n\n    this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      var pipeline = this.transmuxPipeline_;\n\n      if (!options.keepOriginalTimestamps) {\n        this.baseMediaDecodeTime = baseMediaDecodeTime;\n      }\n\n      if (audioTrack) {\n        audioTrack.timelineStartInfo.dts = undefined;\n        audioTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(audioTrack);\n\n        if (pipeline.audioTimestampRolloverStream) {\n          pipeline.audioTimestampRolloverStream.discontinuity();\n        }\n      }\n\n      if (videoTrack) {\n        if (pipeline.videoSegmentStream) {\n          pipeline.videoSegmentStream.gopCache_ = [];\n        }\n\n        videoTrack.timelineStartInfo.dts = undefined;\n        videoTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(videoTrack);\n        pipeline.captionStream.reset();\n      }\n\n      if (pipeline.timestampRolloverStream) {\n        pipeline.timestampRolloverStream.discontinuity();\n      }\n    };\n\n    this.setAudioAppendStart = function (timestamp) {\n      if (audioTrack) {\n        this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n      }\n    };\n\n    this.setRemux = function (val) {\n      var pipeline = this.transmuxPipeline_;\n      options.remux = val;\n\n      if (pipeline && pipeline.coalesceStream) {\n        pipeline.coalesceStream.setRemux(val);\n      }\n    };\n\n    this.alignGopsWith = function (gopsToAlignWith) {\n      if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n        this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n      }\n    };\n\n    this.getLogTrigger_ = function (key) {\n      var self = this;\n      return function (event) {\n        event.stream = key;\n        self.trigger('log', event);\n      };\n    }; // feed incoming data to the front of the parsing pipeline\n\n\n    this.push = function (data) {\n      if (hasFlushed) {\n        var isAac = isLikelyAacData(data);\n\n        if (isAac && this.transmuxPipeline_.type !== 'aac') {\n          this.setupAacPipeline();\n        } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n          this.setupTsPipeline();\n        }\n\n        hasFlushed = false;\n      }\n\n      this.transmuxPipeline_.headOfPipeline.push(data);\n    }; // flush any buffered data\n\n\n    this.flush = function () {\n      hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n      this.transmuxPipeline_.headOfPipeline.flush();\n    };\n\n    this.endTimeline = function () {\n      this.transmuxPipeline_.headOfPipeline.endTimeline();\n    };\n\n    this.reset = function () {\n      if (this.transmuxPipeline_.headOfPipeline) {\n        this.transmuxPipeline_.headOfPipeline.reset();\n      }\n    }; // Caption data has to be reset when seeking outside buffered range\n\n\n    this.resetCaptions = function () {\n      if (this.transmuxPipeline_.captionStream) {\n        this.transmuxPipeline_.captionStream.reset();\n      }\n    };\n  };\n\n  _Transmuxer.prototype = new stream();\n  var transmuxer = {\n    Transmuxer: _Transmuxer,\n    VideoSegmentStream: _VideoSegmentStream,\n    AudioSegmentStream: _AudioSegmentStream,\n    AUDIO_PROPERTIES: audioProperties,\n    VIDEO_PROPERTIES: videoProperties,\n    // exported for testing\n    generateSegmentTimingInfo: generateSegmentTimingInfo\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var toUnsigned$3 = function toUnsigned(value) {\n    return value >>> 0;\n  };\n\n  var toHexString$1 = function toHexString(value) {\n    return ('00' + value.toString(16)).slice(-2);\n  };\n\n  var bin = {\n    toUnsigned: toUnsigned$3,\n    toHexString: toHexString$1\n  };\n\n  var parseType$1 = function parseType(buffer) {\n    var result = '';\n    result += String.fromCharCode(buffer[0]);\n    result += String.fromCharCode(buffer[1]);\n    result += String.fromCharCode(buffer[2]);\n    result += String.fromCharCode(buffer[3]);\n    return result;\n  };\n\n  var parseType_1 = parseType$1;\n  var toUnsigned$2 = bin.toUnsigned;\n\n  var findBox = function findBox(data, path) {\n    var results = [],\n        i,\n        size,\n        type,\n        end,\n        subresults;\n\n    if (!path.length) {\n      // short-circuit the search for empty paths\n      return null;\n    }\n\n    for (i = 0; i < data.byteLength;) {\n      size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n      type = parseType_1(data.subarray(i + 4, i + 8));\n      end = size > 1 ? i + size : data.byteLength;\n\n      if (type === path[0]) {\n        if (path.length === 1) {\n          // this is the end of the path and we've found the box we were\n          // looking for\n          results.push(data.subarray(i + 8, end));\n        } else {\n          // recursively search for the next box along the path\n          subresults = findBox(data.subarray(i + 8, end), path.slice(1));\n\n          if (subresults.length) {\n            results = results.concat(subresults);\n          }\n        }\n      }\n\n      i = end;\n    } // we've finished searching all of data\n\n\n    return results;\n  };\n\n  var findBox_1 = findBox;\n  var toUnsigned$1 = bin.toUnsigned;\n  var getUint64$1 = numbers.getUint64;\n\n  var tfdt = function tfdt(data) {\n    var result = {\n      version: data[0],\n      flags: new Uint8Array(data.subarray(1, 4))\n    };\n\n    if (result.version === 1) {\n      result.baseMediaDecodeTime = getUint64$1(data.subarray(4));\n    } else {\n      result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n    }\n\n    return result;\n  };\n\n  var parseTfdt = tfdt;\n\n  var parseSampleFlags = function parseSampleFlags(flags) {\n    return {\n      isLeading: (flags[0] & 0x0c) >>> 2,\n      dependsOn: flags[0] & 0x03,\n      isDependedOn: (flags[1] & 0xc0) >>> 6,\n      hasRedundancy: (flags[1] & 0x30) >>> 4,\n      paddingValue: (flags[1] & 0x0e) >>> 1,\n      isNonSyncSample: flags[1] & 0x01,\n      degradationPriority: flags[2] << 8 | flags[3]\n    };\n  };\n\n  var parseSampleFlags_1 = parseSampleFlags;\n\n  var trun = function trun(data) {\n    var result = {\n      version: data[0],\n      flags: new Uint8Array(data.subarray(1, 4)),\n      samples: []\n    },\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n        // Flag interpretation\n    dataOffsetPresent = result.flags[2] & 0x01,\n        // compare with 2nd byte of 0x1\n    firstSampleFlagsPresent = result.flags[2] & 0x04,\n        // compare with 2nd byte of 0x4\n    sampleDurationPresent = result.flags[1] & 0x01,\n        // compare with 2nd byte of 0x100\n    sampleSizePresent = result.flags[1] & 0x02,\n        // compare with 2nd byte of 0x200\n    sampleFlagsPresent = result.flags[1] & 0x04,\n        // compare with 2nd byte of 0x400\n    sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n        // compare with 2nd byte of 0x800\n    sampleCount = view.getUint32(4),\n        offset = 8,\n        sample;\n\n    if (dataOffsetPresent) {\n      // 32 bit signed integer\n      result.dataOffset = view.getInt32(offset);\n      offset += 4;\n    } // Overrides the flags for the first sample only. The order of\n    // optional values will be: duration, size, compositionTimeOffset\n\n\n    if (firstSampleFlagsPresent && sampleCount) {\n      sample = {\n        flags: parseSampleFlags_1(data.subarray(offset, offset + 4))\n      };\n      offset += 4;\n\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleCompositionTimeOffsetPresent) {\n        if (result.version === 1) {\n          sample.compositionTimeOffset = view.getInt32(offset);\n        } else {\n          sample.compositionTimeOffset = view.getUint32(offset);\n        }\n\n        offset += 4;\n      }\n\n      result.samples.push(sample);\n      sampleCount--;\n    }\n\n    while (sampleCount--) {\n      sample = {};\n\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleFlagsPresent) {\n        sample.flags = parseSampleFlags_1(data.subarray(offset, offset + 4));\n        offset += 4;\n      }\n\n      if (sampleCompositionTimeOffsetPresent) {\n        if (result.version === 1) {\n          sample.compositionTimeOffset = view.getInt32(offset);\n        } else {\n          sample.compositionTimeOffset = view.getUint32(offset);\n        }\n\n        offset += 4;\n      }\n\n      result.samples.push(sample);\n    }\n\n    return result;\n  };\n\n  var parseTrun = trun;\n\n  var tfhd = function tfhd(data) {\n    var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n        result = {\n      version: data[0],\n      flags: new Uint8Array(data.subarray(1, 4)),\n      trackId: view.getUint32(4)\n    },\n        baseDataOffsetPresent = result.flags[2] & 0x01,\n        sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n        defaultSampleDurationPresent = result.flags[2] & 0x08,\n        defaultSampleSizePresent = result.flags[2] & 0x10,\n        defaultSampleFlagsPresent = result.flags[2] & 0x20,\n        durationIsEmpty = result.flags[0] & 0x010000,\n        defaultBaseIsMoof = result.flags[0] & 0x020000,\n        i;\n    i = 8;\n\n    if (baseDataOffsetPresent) {\n      i += 4; // truncate top 4 bytes\n      // FIXME: should we read the full 64 bits?\n\n      result.baseDataOffset = view.getUint32(12);\n      i += 4;\n    }\n\n    if (sampleDescriptionIndexPresent) {\n      result.sampleDescriptionIndex = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleDurationPresent) {\n      result.defaultSampleDuration = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleSizePresent) {\n      result.defaultSampleSize = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleFlagsPresent) {\n      result.defaultSampleFlags = view.getUint32(i);\n    }\n\n    if (durationIsEmpty) {\n      result.durationIsEmpty = true;\n    }\n\n    if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n      result.baseDataOffsetIsMoof = true;\n    }\n\n    return result;\n  };\n\n  var parseTfhd = tfhd;\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n  var win;\n\n  if (typeof window !== \"undefined\") {\n    win = window;\n  } else if (typeof commonjsGlobal !== \"undefined\") {\n    win = commonjsGlobal;\n  } else if (typeof self !== \"undefined\") {\n    win = self;\n  } else {\n    win = {};\n  }\n\n  var window_1 = win;\n  var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n  var CaptionStream = captionStream.CaptionStream;\n  /**\n    * Maps an offset in the mdat to a sample based on the the size of the samples.\n    * Assumes that `parseSamples` has been called first.\n    *\n    * @param {Number} offset - The offset into the mdat\n    * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n    * @return {?Object} The matching sample, or null if no match was found.\n    *\n    * @see ISO-BMFF-12/2015, Section 8.8.8\n   **/\n\n  var mapToSample = function mapToSample(offset, samples) {\n    var approximateOffset = offset;\n\n    for (var i = 0; i < samples.length; i++) {\n      var sample = samples[i];\n\n      if (approximateOffset < sample.size) {\n        return sample;\n      }\n\n      approximateOffset -= sample.size;\n    }\n\n    return null;\n  };\n  /**\n    * Finds SEI nal units contained in a Media Data Box.\n    * Assumes that `parseSamples` has been called first.\n    *\n    * @param {Uint8Array} avcStream - The bytes of the mdat\n    * @param {Object[]} samples - The samples parsed out by `parseSamples`\n    * @param {Number} trackId - The trackId of this video track\n    * @return {Object[]} seiNals - the parsed SEI NALUs found.\n    *   The contents of the seiNal should match what is expected by\n    *   CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n    *\n    * @see ISO-BMFF-12/2015, Section 8.1.1\n    * @see Rec. ITU-T H.264, 7.3.2.3.1\n   **/\n\n\n  var findSeiNals = function findSeiNals(avcStream, samples, trackId) {\n    var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n        result = {\n      logs: [],\n      seiNals: []\n    },\n        seiNal,\n        i,\n        length,\n        lastMatchedSample;\n\n    for (i = 0; i + 4 < avcStream.length; i += length) {\n      length = avcView.getUint32(i);\n      i += 4; // Bail if this doesn't appear to be an H264 stream\n\n      if (length <= 0) {\n        continue;\n      }\n\n      switch (avcStream[i] & 0x1F) {\n        case 0x06:\n          var data = avcStream.subarray(i + 1, i + 1 + length);\n          var matchingSample = mapToSample(i, samples);\n          seiNal = {\n            nalUnitType: 'sei_rbsp',\n            size: length,\n            data: data,\n            escapedRBSP: discardEmulationPreventionBytes(data),\n            trackId: trackId\n          };\n\n          if (matchingSample) {\n            seiNal.pts = matchingSample.pts;\n            seiNal.dts = matchingSample.dts;\n            lastMatchedSample = matchingSample;\n          } else if (lastMatchedSample) {\n            // If a matching sample cannot be found, use the last\n            // sample's values as they should be as close as possible\n            seiNal.pts = lastMatchedSample.pts;\n            seiNal.dts = lastMatchedSample.dts;\n          } else {\n            result.logs.push({\n              level: 'warn',\n              message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n            });\n            break;\n          }\n\n          result.seiNals.push(seiNal);\n          break;\n      }\n    }\n\n    return result;\n  };\n  /**\n    * Parses sample information out of Track Run Boxes and calculates\n    * the absolute presentation and decode timestamps of each sample.\n    *\n    * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\n    * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n        @see ISO-BMFF-12/2015, Section 8.8.12\n    * @param {Object} tfhd - The parsed Track Fragment Header\n    *   @see inspect.parseTfhd\n    * @return {Object[]} the parsed samples\n    *\n    * @see ISO-BMFF-12/2015, Section 8.8.8\n   **/\n\n\n  var parseSamples = function parseSamples(truns, baseMediaDecodeTime, tfhd) {\n    var currentDts = baseMediaDecodeTime;\n    var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n    var defaultSampleSize = tfhd.defaultSampleSize || 0;\n    var trackId = tfhd.trackId;\n    var allSamples = [];\n    truns.forEach(function (trun) {\n      // Note: We currently do not parse the sample table as well\n      // as the trun. It's possible some sources will require this.\n      // moov > trak > mdia > minf > stbl\n      var trackRun = parseTrun(trun);\n      var samples = trackRun.samples;\n      samples.forEach(function (sample) {\n        if (sample.duration === undefined) {\n          sample.duration = defaultSampleDuration;\n        }\n\n        if (sample.size === undefined) {\n          sample.size = defaultSampleSize;\n        }\n\n        sample.trackId = trackId;\n        sample.dts = currentDts;\n\n        if (sample.compositionTimeOffset === undefined) {\n          sample.compositionTimeOffset = 0;\n        }\n\n        if (typeof currentDts === 'bigint') {\n          sample.pts = currentDts + window_1.BigInt(sample.compositionTimeOffset);\n          currentDts += window_1.BigInt(sample.duration);\n        } else {\n          sample.pts = currentDts + sample.compositionTimeOffset;\n          currentDts += sample.duration;\n        }\n      });\n      allSamples = allSamples.concat(samples);\n    });\n    return allSamples;\n  };\n  /**\n    * Parses out caption nals from an FMP4 segment's video tracks.\n    *\n    * @param {Uint8Array} segment - The bytes of a single segment\n    * @param {Number} videoTrackId - The trackId of a video track in the segment\n    * @return {Object.<Number, Object[]>} A mapping of video trackId to\n    *   a list of seiNals found in that track\n   **/\n\n\n  var parseCaptionNals = function parseCaptionNals(segment, videoTrackId) {\n    // To get the samples\n    var trafs = findBox_1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n    var mdats = findBox_1(segment, ['mdat']);\n    var captionNals = {};\n    var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n    mdats.forEach(function (mdat, index) {\n      var matchingTraf = trafs[index];\n      mdatTrafPairs.push({\n        mdat: mdat,\n        traf: matchingTraf\n      });\n    });\n    mdatTrafPairs.forEach(function (pair) {\n      var mdat = pair.mdat;\n      var traf = pair.traf;\n      var tfhd = findBox_1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n      var headerInfo = parseTfhd(tfhd[0]);\n      var trackId = headerInfo.trackId;\n      var tfdt = findBox_1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n      var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt(tfdt[0]).baseMediaDecodeTime : 0;\n      var truns = findBox_1(traf, ['trun']);\n      var samples;\n      var result; // Only parse video data for the chosen video track\n\n      if (videoTrackId === trackId && truns.length > 0) {\n        samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n        result = findSeiNals(mdat, samples, trackId);\n\n        if (!captionNals[trackId]) {\n          captionNals[trackId] = {\n            seiNals: [],\n            logs: []\n          };\n        }\n\n        captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n        captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n      }\n    });\n    return captionNals;\n  };\n  /**\n    * Parses out inband captions from an MP4 container and returns\n    * caption objects that can be used by WebVTT and the TextTrack API.\n    * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n    * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n    * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n    *\n    * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n    * @param {Number} trackId - The id of the video track to parse\n    * @param {Number} timescale - The timescale for the video track from the init segment\n    *\n    * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n    * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n    * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n    * @return {String} parsedCaptions[].text - The visible content of the caption\n   **/\n\n\n  var parseEmbeddedCaptions = function parseEmbeddedCaptions(segment, trackId, timescale) {\n    var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n    if (trackId === null) {\n      return null;\n    }\n\n    captionNals = parseCaptionNals(segment, trackId);\n    var trackNals = captionNals[trackId] || {};\n    return {\n      seiNals: trackNals.seiNals,\n      logs: trackNals.logs,\n      timescale: timescale\n    };\n  };\n  /**\n    * Converts SEI NALUs into captions that can be used by video.js\n   **/\n\n\n  var CaptionParser = function CaptionParser() {\n    var isInitialized = false;\n    var captionStream; // Stores segments seen before trackId and timescale are set\n\n    var segmentCache; // Stores video track ID of the track being parsed\n\n    var trackId; // Stores the timescale of the track being parsed\n\n    var timescale; // Stores captions parsed so far\n\n    var parsedCaptions; // Stores whether we are receiving partial data or not\n\n    var parsingPartial;\n    /**\n      * A method to indicate whether a CaptionParser has been initalized\n      * @returns {Boolean}\n     **/\n\n    this.isInitialized = function () {\n      return isInitialized;\n    };\n    /**\n      * Initializes the underlying CaptionStream, SEI NAL parsing\n      * and management, and caption collection\n     **/\n\n\n    this.init = function (options) {\n      captionStream = new CaptionStream();\n      isInitialized = true;\n      parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n      captionStream.on('data', function (event) {\n        // Convert to seconds in the source's timescale\n        event.startTime = event.startPts / timescale;\n        event.endTime = event.endPts / timescale;\n        parsedCaptions.captions.push(event);\n        parsedCaptions.captionStreams[event.stream] = true;\n      });\n      captionStream.on('log', function (log) {\n        parsedCaptions.logs.push(log);\n      });\n    };\n    /**\n      * Determines if a new video track will be selected\n      * or if the timescale changed\n      * @return {Boolean}\n     **/\n\n\n    this.isNewInit = function (videoTrackIds, timescales) {\n      if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n        return false;\n      }\n\n      return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n    };\n    /**\n      * Parses out SEI captions and interacts with underlying\n      * CaptionStream to return dispatched captions\n      *\n      * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n      * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n      * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\n      * @see parseEmbeddedCaptions\n      * @see m2ts/caption-stream.js\n     **/\n\n\n    this.parse = function (segment, videoTrackIds, timescales) {\n      var parsedData;\n\n      if (!this.isInitialized()) {\n        return null; // This is not likely to be a video segment\n      } else if (!videoTrackIds || !timescales) {\n        return null;\n      } else if (this.isNewInit(videoTrackIds, timescales)) {\n        // Use the first video track only as there is no\n        // mechanism to switch to other video tracks\n        trackId = videoTrackIds[0];\n        timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n        // data until we have one.\n        // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n      } else if (trackId === null || !timescale) {\n        segmentCache.push(segment);\n        return null;\n      } // Now that a timescale and trackId is set, parse cached segments\n\n\n      while (segmentCache.length > 0) {\n        var cachedSegment = segmentCache.shift();\n        this.parse(cachedSegment, videoTrackIds, timescales);\n      }\n\n      parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n\n      if (parsedData && parsedData.logs) {\n        parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n      }\n\n      if (parsedData === null || !parsedData.seiNals) {\n        if (parsedCaptions.logs.length) {\n          return {\n            logs: parsedCaptions.logs,\n            captions: [],\n            captionStreams: []\n          };\n        }\n\n        return null;\n      }\n\n      this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n      this.flushStream();\n      return parsedCaptions;\n    };\n    /**\n      * Pushes SEI NALUs onto CaptionStream\n      * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n      * Assumes that `parseCaptionNals` has been called first\n      * @see m2ts/caption-stream.js\n      **/\n\n\n    this.pushNals = function (nals) {\n      if (!this.isInitialized() || !nals || nals.length === 0) {\n        return null;\n      }\n\n      nals.forEach(function (nal) {\n        captionStream.push(nal);\n      });\n    };\n    /**\n      * Flushes underlying CaptionStream to dispatch processed, displayable captions\n      * @see m2ts/caption-stream.js\n     **/\n\n\n    this.flushStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\n\n      if (!parsingPartial) {\n        captionStream.flush();\n      } else {\n        captionStream.partialFlush();\n      }\n    };\n    /**\n      * Reset caption buckets for new data\n     **/\n\n\n    this.clearParsedCaptions = function () {\n      parsedCaptions.captions = [];\n      parsedCaptions.captionStreams = {};\n      parsedCaptions.logs = [];\n    };\n    /**\n      * Resets underlying CaptionStream\n      * @see m2ts/caption-stream.js\n     **/\n\n\n    this.resetCaptionStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\n\n      captionStream.reset();\n    };\n    /**\n      * Convenience method to clear all captions flushed from the\n      * CaptionStream and still being parsed\n      * @see m2ts/caption-stream.js\n     **/\n\n\n    this.clearAllCaptions = function () {\n      this.clearParsedCaptions();\n      this.resetCaptionStream();\n    };\n    /**\n      * Reset caption parser\n     **/\n\n\n    this.reset = function () {\n      segmentCache = [];\n      trackId = null;\n      timescale = null;\n\n      if (!parsedCaptions) {\n        parsedCaptions = {\n          captions: [],\n          // CC1, CC2, CC3, CC4\n          captionStreams: {},\n          logs: []\n        };\n      } else {\n        this.clearParsedCaptions();\n      }\n\n      this.resetCaptionStream();\n    };\n\n    this.reset();\n  };\n\n  var captionParser = CaptionParser;\n  var toUnsigned = bin.toUnsigned;\n  var toHexString = bin.toHexString;\n  var getUint64 = numbers.getUint64;\n  var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader;\n  /**\n   * Parses an MP4 initialization segment and extracts the timescale\n   * values for any declared tracks. Timescale values indicate the\n   * number of clock ticks per second to assume for time-based values\n   * elsewhere in the MP4.\n   *\n   * To determine the start time of an MP4, you need two pieces of\n   * information: the timescale unit and the earliest base media decode\n   * time. Multiple timescales can be specified within an MP4 but the\n   * base media decode time is always expressed in the timescale from\n   * the media header box for the track:\n   * ```\n   * moov > trak > mdia > mdhd.timescale\n   * ```\n   * @param init {Uint8Array} the bytes of the init segment\n   * @return {object} a hash of track ids to timescale values or null if\n   * the init segment is malformed.\n   */\n\n  timescale = function timescale(init) {\n    var result = {},\n        traks = findBox_1(init, ['moov', 'trak']); // mdhd timescale\n\n    return traks.reduce(function (result, trak) {\n      var tkhd, version, index, id, mdhd;\n      tkhd = findBox_1(trak, ['tkhd'])[0];\n\n      if (!tkhd) {\n        return null;\n      }\n\n      version = tkhd[0];\n      index = version === 0 ? 12 : 20;\n      id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n      mdhd = findBox_1(trak, ['mdia', 'mdhd'])[0];\n\n      if (!mdhd) {\n        return null;\n      }\n\n      version = mdhd[0];\n      index = version === 0 ? 12 : 20;\n      result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n      return result;\n    }, result);\n  };\n  /**\n   * Determine the base media decode start time, in seconds, for an MP4\n   * fragment. If multiple fragments are specified, the earliest time is\n   * returned.\n   *\n   * The base media decode time can be parsed from track fragment\n   * metadata:\n   * ```\n   * moof > traf > tfdt.baseMediaDecodeTime\n   * ```\n   * It requires the timescale value from the mdhd to interpret.\n   *\n   * @param timescale {object} a hash of track ids to timescale values.\n   * @return {number} the earliest base media decode start time for the\n   * fragment, in seconds\n   */\n\n\n  startTime = function startTime(timescale, fragment) {\n    var trafs; // we need info from two childrend of each track fragment box\n\n    trafs = findBox_1(fragment, ['moof', 'traf']); // determine the start times for each track\n\n    var lowestTime = trafs.reduce(function (acc, traf) {\n      var tfhd = findBox_1(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n      var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n      var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n      var tfdt = findBox_1(traf, ['tfdt'])[0];\n      var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n      var baseTime; // version 1 is 64 bit\n\n      if (tfdt[0] === 1) {\n        baseTime = getUint64(tfdt.subarray(4, 12));\n      } else {\n        baseTime = dv.getUint32(4);\n      } // convert base time to seconds if it is a valid number.\n\n\n      var seconds;\n\n      if (typeof baseTime === 'bigint') {\n        seconds = baseTime / window_1.BigInt(scale);\n      } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n        seconds = baseTime / scale;\n      }\n\n      if (seconds < Number.MAX_SAFE_INTEGER) {\n        seconds = Number(seconds);\n      }\n\n      if (seconds < acc) {\n        acc = seconds;\n      }\n\n      return acc;\n    }, Infinity);\n    return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n  };\n  /**\n   * Determine the composition start, in seconds, for an MP4\n   * fragment.\n   *\n   * The composition start time of a fragment can be calculated using the base\n   * media decode time, composition time offset, and timescale, as follows:\n   *\n   * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n   *\n   * All of the aforementioned information is contained within a media fragment's\n   * `traf` box, except for timescale info, which comes from the initialization\n   * segment, so a track id (also contained within a `traf`) is also necessary to\n   * associate it with a timescale\n   *\n   *\n   * @param timescales {object} - a hash of track ids to timescale values.\n   * @param fragment {Unit8Array} - the bytes of a media segment\n   * @return {number} the composition start time for the fragment, in seconds\n   **/\n\n\n  compositionStartTime = function compositionStartTime(timescales, fragment) {\n    var trafBoxes = findBox_1(fragment, ['moof', 'traf']);\n    var baseMediaDecodeTime = 0;\n    var compositionTimeOffset = 0;\n    var trackId;\n\n    if (trafBoxes && trafBoxes.length) {\n      // The spec states that track run samples contained within a `traf` box are contiguous, but\n      // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n      // We will assume that they are, so we only need the first to calculate start time.\n      var tfhd = findBox_1(trafBoxes[0], ['tfhd'])[0];\n      var trun = findBox_1(trafBoxes[0], ['trun'])[0];\n      var tfdt = findBox_1(trafBoxes[0], ['tfdt'])[0];\n\n      if (tfhd) {\n        var parsedTfhd = parseTfhd(tfhd);\n        trackId = parsedTfhd.trackId;\n      }\n\n      if (tfdt) {\n        var parsedTfdt = parseTfdt(tfdt);\n        baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n      }\n\n      if (trun) {\n        var parsedTrun = parseTrun(trun);\n\n        if (parsedTrun.samples && parsedTrun.samples.length) {\n          compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n        }\n      }\n    } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n    // specified.\n\n\n    var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n    if (typeof baseMediaDecodeTime === 'bigint') {\n      compositionTimeOffset = window_1.BigInt(compositionTimeOffset);\n      timescale = window_1.BigInt(timescale);\n    }\n\n    var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n\n    if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n      result = Number(result);\n    }\n\n    return result;\n  };\n  /**\n    * Find the trackIds of the video tracks in this source.\n    * Found by parsing the Handler Reference and Track Header Boxes:\n    *   moov > trak > mdia > hdlr\n    *   moov > trak > tkhd\n    *\n    * @param {Uint8Array} init - The bytes of the init segment for this source\n    * @return {Number[]} A list of trackIds\n    *\n    * @see ISO-BMFF-12/2015, Section 8.4.3\n   **/\n\n\n  getVideoTrackIds = function getVideoTrackIds(init) {\n    var traks = findBox_1(init, ['moov', 'trak']);\n    var videoTrackIds = [];\n    traks.forEach(function (trak) {\n      var hdlrs = findBox_1(trak, ['mdia', 'hdlr']);\n      var tkhds = findBox_1(trak, ['tkhd']);\n      hdlrs.forEach(function (hdlr, index) {\n        var handlerType = parseType_1(hdlr.subarray(8, 12));\n        var tkhd = tkhds[index];\n        var view;\n        var version;\n        var trackId;\n\n        if (handlerType === 'vide') {\n          view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n          version = view.getUint8(0);\n          trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n          videoTrackIds.push(trackId);\n        }\n      });\n    });\n    return videoTrackIds;\n  };\n\n  getTimescaleFromMediaHeader = function getTimescaleFromMediaHeader(mdhd) {\n    // mdhd is a FullBox, meaning it will have its own version as the first byte\n    var version = mdhd[0];\n    var index = version === 0 ? 12 : 20;\n    return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n  };\n  /**\n   * Get all the video, audio, and hint tracks from a non fragmented\n   * mp4 segment\n   */\n\n\n  getTracks = function getTracks(init) {\n    var traks = findBox_1(init, ['moov', 'trak']);\n    var tracks = [];\n    traks.forEach(function (trak) {\n      var track = {};\n      var tkhd = findBox_1(trak, ['tkhd'])[0];\n      var view, tkhdVersion; // id\n\n      if (tkhd) {\n        view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n        tkhdVersion = view.getUint8(0);\n        track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n      }\n\n      var hdlr = findBox_1(trak, ['mdia', 'hdlr'])[0]; // type\n\n      if (hdlr) {\n        var type = parseType_1(hdlr.subarray(8, 12));\n\n        if (type === 'vide') {\n          track.type = 'video';\n        } else if (type === 'soun') {\n          track.type = 'audio';\n        } else {\n          track.type = type;\n        }\n      } // codec\n\n\n      var stsd = findBox_1(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n\n      if (stsd) {\n        var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n        track.codec = parseType_1(sampleDescriptions.subarray(4, 8));\n        var codecBox = findBox_1(sampleDescriptions, [track.codec])[0];\n        var codecConfig, codecConfigType;\n\n        if (codecBox) {\n          // https://tools.ietf.org/html/rfc6381#section-3.3\n          if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n            // we don't need anything but the \"config\" parameter of the\n            // avc1 codecBox\n            codecConfig = codecBox.subarray(78);\n            codecConfigType = parseType_1(codecConfig.subarray(4, 8));\n\n            if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n              track.codec += '.'; // left padded with zeroes for single digit hex\n              // profile idc\n\n              track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n              track.codec += toHexString(codecConfig[10]); // level idc\n\n              track.codec += toHexString(codecConfig[11]);\n            } else {\n              // TODO: show a warning that we couldn't parse the codec\n              // and are using the default\n              track.codec = 'avc1.4d400d';\n            }\n          } else if (/^mp4[a,v]$/i.test(track.codec)) {\n            // we do not need anything but the streamDescriptor of the mp4a codecBox\n            codecConfig = codecBox.subarray(28);\n            codecConfigType = parseType_1(codecConfig.subarray(4, 8));\n\n            if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n              track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n              track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n            } else {\n              // TODO: show a warning that we couldn't parse the codec\n              // and are using the default\n              track.codec = 'mp4a.40.2';\n            }\n          } else {\n            // flac, opus, etc\n            track.codec = track.codec.toLowerCase();\n          }\n        }\n      }\n\n      var mdhd = findBox_1(trak, ['mdia', 'mdhd'])[0];\n\n      if (mdhd) {\n        track.timescale = getTimescaleFromMediaHeader(mdhd);\n      }\n\n      tracks.push(track);\n    });\n    return tracks;\n  };\n\n  var probe$2 = {\n    // export mp4 inspector's findBox and parseType for backwards compatibility\n    findBox: findBox_1,\n    parseType: parseType_1,\n    timescale: timescale,\n    startTime: startTime,\n    compositionStartTime: compositionStartTime,\n    videoTrackIds: getVideoTrackIds,\n    tracks: getTracks,\n    getTimescaleFromMediaHeader: getTimescaleFromMediaHeader\n  };\n\n  var parsePid = function parsePid(packet) {\n    var pid = packet[1] & 0x1f;\n    pid <<= 8;\n    pid |= packet[2];\n    return pid;\n  };\n\n  var parsePayloadUnitStartIndicator = function parsePayloadUnitStartIndicator(packet) {\n    return !!(packet[1] & 0x40);\n  };\n\n  var parseAdaptionField = function parseAdaptionField(packet) {\n    var offset = 0; // if an adaption field is present, its length is specified by the\n    // fifth byte of the TS packet header. The adaptation field is\n    // used to add stuffing to PES packets that don't fill a complete\n    // TS packet, and to specify some forms of timing and control data\n    // that we do not currently use.\n\n    if ((packet[3] & 0x30) >>> 4 > 0x01) {\n      offset += packet[4] + 1;\n    }\n\n    return offset;\n  };\n\n  var parseType = function parseType(packet, pmtPid) {\n    var pid = parsePid(packet);\n\n    if (pid === 0) {\n      return 'pat';\n    } else if (pid === pmtPid) {\n      return 'pmt';\n    } else if (pmtPid) {\n      return 'pes';\n    }\n\n    return null;\n  };\n\n  var parsePat = function parsePat(packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var offset = 4 + parseAdaptionField(packet);\n\n    if (pusi) {\n      offset += packet[offset] + 1;\n    }\n\n    return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n  };\n\n  var parsePmt = function parsePmt(packet) {\n    var programMapTable = {};\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var payloadOffset = 4 + parseAdaptionField(packet);\n\n    if (pusi) {\n      payloadOffset += packet[payloadOffset] + 1;\n    } // PMTs can be sent ahead of the time when they should actually\n    // take effect. We don't believe this should ever be the case\n    // for HLS but we'll ignore \"forward\" PMT declarations if we see\n    // them. Future PMT declarations have the current_next_indicator\n    // set to zero.\n\n\n    if (!(packet[payloadOffset + 5] & 0x01)) {\n      return;\n    }\n\n    var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n    sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n    tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n    // long the program info descriptors are\n\n    programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n    var offset = 12 + programInfoLength;\n\n    while (offset < tableEnd) {\n      var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n      programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n      // skip past the elementary stream descriptors, if present\n\n      offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n    }\n\n    return programMapTable;\n  };\n\n  var parsePesType = function parsePesType(packet, programMapTable) {\n    var pid = parsePid(packet);\n    var type = programMapTable[pid];\n\n    switch (type) {\n      case streamTypes.H264_STREAM_TYPE:\n        return 'video';\n\n      case streamTypes.ADTS_STREAM_TYPE:\n        return 'audio';\n\n      case streamTypes.METADATA_STREAM_TYPE:\n        return 'timed-metadata';\n\n      default:\n        return null;\n    }\n  };\n\n  var parsePesTime = function parsePesTime(packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n\n    if (!pusi) {\n      return null;\n    }\n\n    var offset = 4 + parseAdaptionField(packet);\n\n    if (offset >= packet.byteLength) {\n      // From the H 222.0 MPEG-TS spec\n      // \"For transport stream packets carrying PES packets, stuffing is needed when there\n      //  is insufficient PES packet data to completely fill the transport stream packet\n      //  payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n      //  the sum of the lengths of the data elements in it, so that the payload bytes\n      //  remaining after the adaptation field exactly accommodates the available PES packet\n      //  data.\"\n      //\n      // If the offset is >= the length of the packet, then the packet contains no data\n      // and instead is just adaption field stuffing bytes\n      return null;\n    }\n\n    var pes = null;\n    var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n    // and a DTS value. Determine what combination of values is\n    // available to work with.\n\n    ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n    // performs all bitwise operations on 32-bit integers but javascript\n    // supports a much greater range (52-bits) of integer using standard\n    // mathematical operations.\n    // We construct a 31-bit value using bitwise operators over the 31\n    // most significant bits and then multiply by 4 (equal to a left-shift\n    // of 2) before we add the final 2 least significant bits of the\n    // timestamp (equal to an OR.)\n\n    if (ptsDtsFlags & 0xC0) {\n      pes = {}; // the PTS and DTS are not written out directly. For information\n      // on how they are encoded, see\n      // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n      pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n      pes.pts *= 4; // Left shift by 2\n\n      pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n      pes.dts = pes.pts;\n\n      if (ptsDtsFlags & 0x40) {\n        pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n        pes.dts *= 4; // Left shift by 2\n\n        pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n      }\n    }\n\n    return pes;\n  };\n\n  var parseNalUnitType = function parseNalUnitType(type) {\n    switch (type) {\n      case 0x05:\n        return 'slice_layer_without_partitioning_rbsp_idr';\n\n      case 0x06:\n        return 'sei_rbsp';\n\n      case 0x07:\n        return 'seq_parameter_set_rbsp';\n\n      case 0x08:\n        return 'pic_parameter_set_rbsp';\n\n      case 0x09:\n        return 'access_unit_delimiter_rbsp';\n\n      default:\n        return null;\n    }\n  };\n\n  var videoPacketContainsKeyFrame = function videoPacketContainsKeyFrame(packet) {\n    var offset = 4 + parseAdaptionField(packet);\n    var frameBuffer = packet.subarray(offset);\n    var frameI = 0;\n    var frameSyncPoint = 0;\n    var foundKeyFrame = false;\n    var nalType; // advance the sync point to a NAL start, if necessary\n\n    for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n      if (frameBuffer[frameSyncPoint + 2] === 1) {\n        // the sync point is properly aligned\n        frameI = frameSyncPoint + 5;\n        break;\n      }\n    }\n\n    while (frameI < frameBuffer.byteLength) {\n      // look at the current byte to determine if we've hit the end of\n      // a NAL unit boundary\n      switch (frameBuffer[frameI]) {\n        case 0:\n          // skip past non-sync sequences\n          if (frameBuffer[frameI - 1] !== 0) {\n            frameI += 2;\n            break;\n          } else if (frameBuffer[frameI - 2] !== 0) {\n            frameI++;\n            break;\n          }\n\n          if (frameSyncPoint + 3 !== frameI - 2) {\n            nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n            if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n              foundKeyFrame = true;\n            }\n          } // drop trailing zeroes\n\n\n          do {\n            frameI++;\n          } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n\n        case 1:\n          // skip past non-sync sequences\n          if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n            frameI += 3;\n            break;\n          }\n\n          nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n          if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n            foundKeyFrame = true;\n          }\n\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n\n        default:\n          // the current byte isn't a one or zero, so it cannot be part\n          // of a sync sequence\n          frameI += 3;\n          break;\n      }\n    }\n\n    frameBuffer = frameBuffer.subarray(frameSyncPoint);\n    frameI -= frameSyncPoint;\n    frameSyncPoint = 0; // parse the final nal\n\n    if (frameBuffer && frameBuffer.byteLength > 3) {\n      nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n      if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n        foundKeyFrame = true;\n      }\n    }\n\n    return foundKeyFrame;\n  };\n\n  var probe$1 = {\n    parseType: parseType,\n    parsePat: parsePat,\n    parsePmt: parsePmt,\n    parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n    parsePesType: parsePesType,\n    parsePesTime: parsePesTime,\n    videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n  };\n  var handleRollover = timestampRolloverStream.handleRollover;\n  var probe = {};\n  probe.ts = probe$1;\n  probe.aac = utils;\n  var ONE_SECOND_IN_TS = clock.ONE_SECOND_IN_TS;\n  var MP2T_PACKET_LENGTH = 188,\n      // bytes\n  SYNC_BYTE = 0x47;\n  /**\n   * walks through segment data looking for pat and pmt packets to parse out\n   * program map table information\n   */\n\n  var parsePsi_ = function parsePsi_(bytes, pmt) {\n    var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type;\n\n    while (endIndex < bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n\n        switch (type) {\n          case 'pat':\n            pmt.pid = probe.ts.parsePat(packet);\n            break;\n\n          case 'pmt':\n            var table = probe.ts.parsePmt(packet);\n            pmt.table = pmt.table || {};\n            Object.keys(table).forEach(function (key) {\n              pmt.table[key] = table[key];\n            });\n            break;\n        }\n\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n\n      startIndex++;\n      endIndex++;\n    }\n  };\n  /**\n   * walks through the segment data from the start and end to get timing information\n   * for the first and last audio pes packets\n   */\n\n\n  var parseAudioPes_ = function parseAudioPes_(bytes, pmt, result) {\n    var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type,\n        pesType,\n        pusi,\n        parsed;\n    var endLoop = false; // Start walking from start of segment to get first audio packet\n\n    while (endIndex <= bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\n\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last audio packet\n\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n\n    while (startIndex >= 0) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\n\n        startIndex -= MP2T_PACKET_LENGTH;\n        endIndex -= MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n\n      startIndex--;\n      endIndex--;\n    }\n  };\n  /**\n   * walks through the segment data from the start and end to get timing information\n   * for the first and last video pes packets as well as timing information for the first\n   * key frame.\n   */\n\n\n  var parseVideoPes_ = function parseVideoPes_(bytes, pmt, result) {\n    var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type,\n        pesType,\n        pusi,\n        parsed,\n        frame,\n        i,\n        pes;\n    var endLoop = false;\n    var currentFrame = {\n      data: [],\n      size: 0\n    }; // Start walking from start of segment to get first video packet\n\n    while (endIndex < bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'video') {\n              if (pusi && !endLoop) {\n                parsed = probe.ts.parsePesTime(packet);\n\n                if (parsed) {\n                  parsed.type = 'video';\n                  result.video.push(parsed);\n                  endLoop = true;\n                }\n              }\n\n              if (!result.firstKeyFrame) {\n                if (pusi) {\n                  if (currentFrame.size !== 0) {\n                    frame = new Uint8Array(currentFrame.size);\n                    i = 0;\n\n                    while (currentFrame.data.length) {\n                      pes = currentFrame.data.shift();\n                      frame.set(pes, i);\n                      i += pes.byteLength;\n                    }\n\n                    if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n                      var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n                      // the keyframe seems to work fine with HLS playback\n                      // and definitely preferable to a crash with TypeError...\n\n                      if (firstKeyFrame) {\n                        result.firstKeyFrame = firstKeyFrame;\n                        result.firstKeyFrame.type = 'video';\n                      } else {\n                        // eslint-disable-next-line\n                        console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n                      }\n                    }\n\n                    currentFrame.size = 0;\n                  }\n                }\n\n                currentFrame.data.push(packet);\n                currentFrame.size += packet.byteLength;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop && result.firstKeyFrame) {\n          break;\n        }\n\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last video packet\n\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n\n    while (startIndex >= 0) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'video' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'video';\n                result.video.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\n\n        startIndex -= MP2T_PACKET_LENGTH;\n        endIndex -= MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n\n      startIndex--;\n      endIndex--;\n    }\n  };\n  /**\n   * Adjusts the timestamp information for the segment to account for\n   * rollover and convert to seconds based on pes packet timescale (90khz clock)\n   */\n\n\n  var adjustTimestamp_ = function adjustTimestamp_(segmentInfo, baseTimestamp) {\n    if (segmentInfo.audio && segmentInfo.audio.length) {\n      var audioBaseTimestamp = baseTimestamp;\n\n      if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n        audioBaseTimestamp = segmentInfo.audio[0].dts;\n      }\n\n      segmentInfo.audio.forEach(function (info) {\n        info.dts = handleRollover(info.dts, audioBaseTimestamp);\n        info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n        info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n        info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n      });\n    }\n\n    if (segmentInfo.video && segmentInfo.video.length) {\n      var videoBaseTimestamp = baseTimestamp;\n\n      if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n        videoBaseTimestamp = segmentInfo.video[0].dts;\n      }\n\n      segmentInfo.video.forEach(function (info) {\n        info.dts = handleRollover(info.dts, videoBaseTimestamp);\n        info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n        info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n        info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n      });\n\n      if (segmentInfo.firstKeyFrame) {\n        var frame = segmentInfo.firstKeyFrame;\n        frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n        frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n        frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n        frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n      }\n    }\n  };\n  /**\n   * inspects the aac data stream for start and end time information\n   */\n\n\n  var inspectAac_ = function inspectAac_(bytes) {\n    var endLoop = false,\n        audioCount = 0,\n        sampleRate = null,\n        timestamp = null,\n        frameSize = 0,\n        byteIndex = 0,\n        packet;\n\n    while (bytes.length - byteIndex >= 3) {\n      var type = probe.aac.parseType(bytes, byteIndex);\n\n      switch (type) {\n        case 'timed-metadata':\n          // Exit early because we don't have enough to parse\n          // the ID3 tag header\n          if (bytes.length - byteIndex < 10) {\n            endLoop = true;\n            break;\n          }\n\n          frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (frameSize > bytes.length) {\n            endLoop = true;\n            break;\n          }\n\n          if (timestamp === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            timestamp = probe.aac.parseAacTimestamp(packet);\n          }\n\n          byteIndex += frameSize;\n          break;\n\n        case 'audio':\n          // Exit early because we don't have enough to parse\n          // the ADTS frame header\n          if (bytes.length - byteIndex < 7) {\n            endLoop = true;\n            break;\n          }\n\n          frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (frameSize > bytes.length) {\n            endLoop = true;\n            break;\n          }\n\n          if (sampleRate === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            sampleRate = probe.aac.parseSampleRate(packet);\n          }\n\n          audioCount++;\n          byteIndex += frameSize;\n          break;\n\n        default:\n          byteIndex++;\n          break;\n      }\n\n      if (endLoop) {\n        return null;\n      }\n    }\n\n    if (sampleRate === null || timestamp === null) {\n      return null;\n    }\n\n    var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n    var result = {\n      audio: [{\n        type: 'audio',\n        dts: timestamp,\n        pts: timestamp\n      }, {\n        type: 'audio',\n        dts: timestamp + audioCount * 1024 * audioTimescale,\n        pts: timestamp + audioCount * 1024 * audioTimescale\n      }]\n    };\n    return result;\n  };\n  /**\n   * inspects the transport stream segment data for start and end time information\n   * of the audio and video tracks (when present) as well as the first key frame's\n   * start time.\n   */\n\n\n  var inspectTs_ = function inspectTs_(bytes) {\n    var pmt = {\n      pid: null,\n      table: null\n    };\n    var result = {};\n    parsePsi_(bytes, pmt);\n\n    for (var pid in pmt.table) {\n      if (pmt.table.hasOwnProperty(pid)) {\n        var type = pmt.table[pid];\n\n        switch (type) {\n          case streamTypes.H264_STREAM_TYPE:\n            result.video = [];\n            parseVideoPes_(bytes, pmt, result);\n\n            if (result.video.length === 0) {\n              delete result.video;\n            }\n\n            break;\n\n          case streamTypes.ADTS_STREAM_TYPE:\n            result.audio = [];\n            parseAudioPes_(bytes, pmt, result);\n\n            if (result.audio.length === 0) {\n              delete result.audio;\n            }\n\n            break;\n        }\n      }\n    }\n\n    return result;\n  };\n  /**\n   * Inspects segment byte data and returns an object with start and end timing information\n   *\n   * @param {Uint8Array} bytes The segment byte data\n   * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n   *  timestamps for rollover. This value must be in 90khz clock.\n   * @return {Object} Object containing start and end frame timing info of segment.\n   */\n\n\n  var inspect = function inspect(bytes, baseTimestamp) {\n    var isAacData = probe.aac.isLikelyAacData(bytes);\n    var result;\n\n    if (isAacData) {\n      result = inspectAac_(bytes);\n    } else {\n      result = inspectTs_(bytes);\n    }\n\n    if (!result || !result.audio && !result.video) {\n      return null;\n    }\n\n    adjustTimestamp_(result, baseTimestamp);\n    return result;\n  };\n\n  var tsInspector = {\n    inspect: inspect,\n    parseAudioPes_: parseAudioPes_\n  };\n  /* global self */\n\n  /**\n   * Re-emits transmuxer events by converting them into messages to the\n   * world outside the worker.\n   *\n   * @param {Object} transmuxer the transmuxer to wire events on\n   * @private\n   */\n\n  var wireTransmuxerEvents = function wireTransmuxerEvents(self, transmuxer) {\n    transmuxer.on('data', function (segment) {\n      // transfer ownership of the underlying ArrayBuffer\n      // instead of doing a copy to save memory\n      // ArrayBuffers are transferable but generic TypedArrays are not\n      // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n      var initArray = segment.initSegment;\n      segment.initSegment = {\n        data: initArray.buffer,\n        byteOffset: initArray.byteOffset,\n        byteLength: initArray.byteLength\n      };\n      var typedArray = segment.data;\n      segment.data = typedArray.buffer;\n      self.postMessage({\n        action: 'data',\n        segment: segment,\n        byteOffset: typedArray.byteOffset,\n        byteLength: typedArray.byteLength\n      }, [segment.data]);\n    });\n    transmuxer.on('done', function (data) {\n      self.postMessage({\n        action: 'done'\n      });\n    });\n    transmuxer.on('gopInfo', function (gopInfo) {\n      self.postMessage({\n        action: 'gopInfo',\n        gopInfo: gopInfo\n      });\n    });\n    transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n      var videoSegmentTimingInfo = {\n        start: {\n          decode: clock.videoTsToSeconds(timingInfo.start.dts),\n          presentation: clock.videoTsToSeconds(timingInfo.start.pts)\n        },\n        end: {\n          decode: clock.videoTsToSeconds(timingInfo.end.dts),\n          presentation: clock.videoTsToSeconds(timingInfo.end.pts)\n        },\n        baseMediaDecodeTime: clock.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n      };\n\n      if (timingInfo.prependedContentDuration) {\n        videoSegmentTimingInfo.prependedContentDuration = clock.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n\n      self.postMessage({\n        action: 'videoSegmentTimingInfo',\n        videoSegmentTimingInfo: videoSegmentTimingInfo\n      });\n    });\n    transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n      // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n      var audioSegmentTimingInfo = {\n        start: {\n          decode: clock.videoTsToSeconds(timingInfo.start.dts),\n          presentation: clock.videoTsToSeconds(timingInfo.start.pts)\n        },\n        end: {\n          decode: clock.videoTsToSeconds(timingInfo.end.dts),\n          presentation: clock.videoTsToSeconds(timingInfo.end.pts)\n        },\n        baseMediaDecodeTime: clock.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n      };\n\n      if (timingInfo.prependedContentDuration) {\n        audioSegmentTimingInfo.prependedContentDuration = clock.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n\n      self.postMessage({\n        action: 'audioSegmentTimingInfo',\n        audioSegmentTimingInfo: audioSegmentTimingInfo\n      });\n    });\n    transmuxer.on('id3Frame', function (id3Frame) {\n      self.postMessage({\n        action: 'id3Frame',\n        id3Frame: id3Frame\n      });\n    });\n    transmuxer.on('caption', function (caption) {\n      self.postMessage({\n        action: 'caption',\n        caption: caption\n      });\n    });\n    transmuxer.on('trackinfo', function (trackInfo) {\n      self.postMessage({\n        action: 'trackinfo',\n        trackInfo: trackInfo\n      });\n    });\n    transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n      // convert to video TS since we prioritize video time over audio\n      self.postMessage({\n        action: 'audioTimingInfo',\n        audioTimingInfo: {\n          start: clock.videoTsToSeconds(audioTimingInfo.start),\n          end: clock.videoTsToSeconds(audioTimingInfo.end)\n        }\n      });\n    });\n    transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n      self.postMessage({\n        action: 'videoTimingInfo',\n        videoTimingInfo: {\n          start: clock.videoTsToSeconds(videoTimingInfo.start),\n          end: clock.videoTsToSeconds(videoTimingInfo.end)\n        }\n      });\n    });\n    transmuxer.on('log', function (log) {\n      self.postMessage({\n        action: 'log',\n        log: log\n      });\n    });\n  };\n  /**\n   * All incoming messages route through this hash. If no function exists\n   * to handle an incoming message, then we ignore the message.\n   *\n   * @class MessageHandlers\n   * @param {Object} options the options to initialize with\n   */\n\n\n  var MessageHandlers = /*#__PURE__*/function () {\n    function MessageHandlers(self, options) {\n      this.options = options || {};\n      this.self = self;\n      this.init();\n    }\n    /**\n     * initialize our web worker and wire all the events.\n     */\n\n\n    var _proto = MessageHandlers.prototype;\n\n    _proto.init = function init() {\n      if (this.transmuxer) {\n        this.transmuxer.dispose();\n      }\n\n      this.transmuxer = new transmuxer.Transmuxer(this.options);\n      wireTransmuxerEvents(this.self, this.transmuxer);\n    };\n\n    _proto.pushMp4Captions = function pushMp4Captions(data) {\n      if (!this.captionParser) {\n        this.captionParser = new captionParser();\n        this.captionParser.init();\n      }\n\n      var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      var parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n      this.self.postMessage({\n        action: 'mp4Captions',\n        captions: parsed && parsed.captions || [],\n        logs: parsed && parsed.logs || [],\n        data: segment.buffer\n      }, [segment.buffer]);\n    };\n\n    _proto.probeMp4StartTime = function probeMp4StartTime(_ref) {\n      var timescales = _ref.timescales,\n          data = _ref.data;\n      var startTime = probe$2.startTime(timescales, data);\n      this.self.postMessage({\n        action: 'probeMp4StartTime',\n        startTime: startTime,\n        data: data\n      }, [data.buffer]);\n    };\n\n    _proto.probeMp4Tracks = function probeMp4Tracks(_ref2) {\n      var data = _ref2.data;\n      var tracks = probe$2.tracks(data);\n      this.self.postMessage({\n        action: 'probeMp4Tracks',\n        tracks: tracks,\n        data: data\n      }, [data.buffer]);\n    }\n    /**\n     * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n     * internal \"media time,\" as well as whether it contains video and/or audio.\n     *\n     * @private\n     * @param {Uint8Array} bytes - segment bytes\n     * @param {number} baseStartTime\n     *        Relative reference timestamp used when adjusting frame timestamps for rollover.\n     *        This value should be in seconds, as it's converted to a 90khz clock within the\n     *        function body.\n     * @return {Object} The start time of the current segment in \"media time\" as well as\n     *                  whether it contains video and/or audio\n     */\n    ;\n\n    _proto.probeTs = function probeTs(_ref3) {\n      var data = _ref3.data,\n          baseStartTime = _ref3.baseStartTime;\n      var tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock.ONE_SECOND_IN_TS : void 0;\n      var timeInfo = tsInspector.inspect(data, tsStartTime);\n      var result = null;\n\n      if (timeInfo) {\n        result = {\n          // each type's time info comes back as an array of 2 times, start and end\n          hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n          hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n        };\n\n        if (result.hasVideo) {\n          result.videoStart = timeInfo.video[0].ptsTime;\n        }\n\n        if (result.hasAudio) {\n          result.audioStart = timeInfo.audio[0].ptsTime;\n        }\n      }\n\n      this.self.postMessage({\n        action: 'probeTs',\n        result: result,\n        data: data\n      }, [data.buffer]);\n    };\n\n    _proto.clearAllMp4Captions = function clearAllMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearAllCaptions();\n      }\n    };\n\n    _proto.clearParsedMp4Captions = function clearParsedMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearParsedCaptions();\n      }\n    }\n    /**\n     * Adds data (a ts segment) to the start of the transmuxer pipeline for\n     * processing.\n     *\n     * @param {ArrayBuffer} data data to push into the muxer\n     */\n    ;\n\n    _proto.push = function push(data) {\n      // Cast array buffer to correct type for transmuxer\n      var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      this.transmuxer.push(segment);\n    }\n    /**\n     * Recreate the transmuxer so that the next segment added via `push`\n     * start with a fresh transmuxer.\n     */\n    ;\n\n    _proto.reset = function reset() {\n      this.transmuxer.reset();\n    }\n    /**\n     * Set the value that will be used as the `baseMediaDecodeTime` time for the\n     * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n     * set relative to the first based on the PTS values.\n     *\n     * @param {Object} data used to set the timestamp offset in the muxer\n     */\n    ;\n\n    _proto.setTimestampOffset = function setTimestampOffset(data) {\n      var timestampOffset = data.timestampOffset || 0;\n      this.transmuxer.setBaseMediaDecodeTime(Math.round(clock.secondsToVideoTs(timestampOffset)));\n    };\n\n    _proto.setAudioAppendStart = function setAudioAppendStart(data) {\n      this.transmuxer.setAudioAppendStart(Math.ceil(clock.secondsToVideoTs(data.appendStart)));\n    };\n\n    _proto.setRemux = function setRemux(data) {\n      this.transmuxer.setRemux(data.remux);\n    }\n    /**\n     * Forces the pipeline to finish processing the last segment and emit it's\n     * results.\n     *\n     * @param {Object} data event data, not really used\n     */\n    ;\n\n    _proto.flush = function flush(data) {\n      this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n      self.postMessage({\n        action: 'done',\n        type: 'transmuxed'\n      });\n    };\n\n    _proto.endTimeline = function endTimeline() {\n      this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n      // timelines\n\n      self.postMessage({\n        action: 'endedtimeline',\n        type: 'transmuxed'\n      });\n    };\n\n    _proto.alignGopsWith = function alignGopsWith(data) {\n      this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n    };\n\n    return MessageHandlers;\n  }();\n  /**\n   * Our web worker interface so that things can talk to mux.js\n   * that will be running in a web worker. the scope is passed to this by\n   * webworkify.\n   *\n   * @param {Object} self the scope for the web worker\n   */\n\n\n  self.onmessage = function (event) {\n    if (event.data.action === 'init' && event.data.options) {\n      this.messageHandlers = new MessageHandlers(self, event.data.options);\n      return;\n    }\n\n    if (!this.messageHandlers) {\n      this.messageHandlers = new MessageHandlers(self);\n    }\n\n    if (event.data && event.data.action && event.data.action !== 'init') {\n      if (this.messageHandlers[event.data.action]) {\n        this.messageHandlers[event.data.action](event.data);\n      }\n    }\n  };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nvar handleData_ = function handleData_(event, transmuxedData, callback) {\n  var _event$data$segment = event.data.segment,\n      type = _event$data$segment.type,\n      initSegment = _event$data$segment.initSegment,\n      captions = _event$data$segment.captions,\n      captionStreams = _event$data$segment.captionStreams,\n      metadata = _event$data$segment.metadata,\n      videoFrameDtsTime = _event$data$segment.videoFrameDtsTime,\n      videoFramePtsTime = _event$data$segment.videoFramePtsTime;\n  transmuxedData.buffer.push({\n    captions: captions,\n    captionStreams: captionStreams,\n    metadata: metadata\n  });\n  var boxes = event.data.segment.boxes || {\n    data: event.data.segment.data\n  };\n  var result = {\n    type: type,\n    // cast ArrayBuffer to TypedArray\n    data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n    initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n  };\n\n  if (typeof videoFrameDtsTime !== 'undefined') {\n    result.videoFrameDtsTime = videoFrameDtsTime;\n  }\n\n  if (typeof videoFramePtsTime !== 'undefined') {\n    result.videoFramePtsTime = videoFramePtsTime;\n  }\n\n  callback(result);\n};\n\nvar handleDone_ = function handleDone_(_ref) {\n  var transmuxedData = _ref.transmuxedData,\n      callback = _ref.callback; // Previously we only returned data on data events,\n  // not on done events. Clear out the buffer to keep that consistent.\n\n  transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n  // have received\n\n  callback(transmuxedData);\n};\n\nvar handleGopInfo_ = function handleGopInfo_(event, transmuxedData) {\n  transmuxedData.gopInfo = event.data.gopInfo;\n};\n\nvar processTransmux = function processTransmux(options) {\n  var transmuxer = options.transmuxer,\n      bytes = options.bytes,\n      audioAppendStart = options.audioAppendStart,\n      gopsToAlignWith = options.gopsToAlignWith,\n      remux = options.remux,\n      onData = options.onData,\n      onTrackInfo = options.onTrackInfo,\n      onAudioTimingInfo = options.onAudioTimingInfo,\n      onVideoTimingInfo = options.onVideoTimingInfo,\n      onVideoSegmentTimingInfo = options.onVideoSegmentTimingInfo,\n      onAudioSegmentTimingInfo = options.onAudioSegmentTimingInfo,\n      onId3 = options.onId3,\n      onCaptions = options.onCaptions,\n      onDone = options.onDone,\n      onEndedTimeline = options.onEndedTimeline,\n      onTransmuxerLog = options.onTransmuxerLog,\n      isEndOfTimeline = options.isEndOfTimeline;\n  var transmuxedData = {\n    buffer: []\n  };\n  var waitForEndedTimelineEvent = isEndOfTimeline;\n\n  var handleMessage = function handleMessage(event) {\n    if (transmuxer.currentTransmux !== options) {\n      // disposed\n      return;\n    }\n\n    if (event.data.action === 'data') {\n      handleData_(event, transmuxedData, onData);\n    }\n\n    if (event.data.action === 'trackinfo') {\n      onTrackInfo(event.data.trackInfo);\n    }\n\n    if (event.data.action === 'gopInfo') {\n      handleGopInfo_(event, transmuxedData);\n    }\n\n    if (event.data.action === 'audioTimingInfo') {\n      onAudioTimingInfo(event.data.audioTimingInfo);\n    }\n\n    if (event.data.action === 'videoTimingInfo') {\n      onVideoTimingInfo(event.data.videoTimingInfo);\n    }\n\n    if (event.data.action === 'videoSegmentTimingInfo') {\n      onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n    }\n\n    if (event.data.action === 'audioSegmentTimingInfo') {\n      onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n    }\n\n    if (event.data.action === 'id3Frame') {\n      onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n    }\n\n    if (event.data.action === 'caption') {\n      onCaptions(event.data.caption);\n    }\n\n    if (event.data.action === 'endedtimeline') {\n      waitForEndedTimelineEvent = false;\n      onEndedTimeline();\n    }\n\n    if (event.data.action === 'log') {\n      onTransmuxerLog(event.data.log);\n    } // wait for the transmuxed event since we may have audio and video\n\n\n    if (event.data.type !== 'transmuxed') {\n      return;\n    } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n    // of a timeline, that means there may still be data events before the segment\n    // processing can be considerred complete. In that case, the final event should be\n    // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n\n    if (waitForEndedTimelineEvent) {\n      return;\n    }\n\n    transmuxer.onmessage = null;\n    handleDone_({\n      transmuxedData: transmuxedData,\n      callback: onDone\n    });\n    /* eslint-disable no-use-before-define */\n\n    dequeue(transmuxer);\n    /* eslint-enable */\n  };\n\n  transmuxer.onmessage = handleMessage;\n\n  if (audioAppendStart) {\n    transmuxer.postMessage({\n      action: 'setAudioAppendStart',\n      appendStart: audioAppendStart\n    });\n  } // allow empty arrays to be passed to clear out GOPs\n\n\n  if (Array.isArray(gopsToAlignWith)) {\n    transmuxer.postMessage({\n      action: 'alignGopsWith',\n      gopsToAlignWith: gopsToAlignWith\n    });\n  }\n\n  if (typeof remux !== 'undefined') {\n    transmuxer.postMessage({\n      action: 'setRemux',\n      remux: remux\n    });\n  }\n\n  if (bytes.byteLength) {\n    var buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n    var byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n    transmuxer.postMessage({\n      action: 'push',\n      // Send the typed-array of data as an ArrayBuffer so that\n      // it can be sent as a \"Transferable\" and avoid the costly\n      // memory copy\n      data: buffer,\n      // To recreate the original typed-array, we need information\n      // about what portion of the ArrayBuffer it was a view into\n      byteOffset: byteOffset,\n      byteLength: bytes.byteLength\n    }, [buffer]);\n  }\n\n  if (isEndOfTimeline) {\n    transmuxer.postMessage({\n      action: 'endTimeline'\n    });\n  } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n  // the end of the segment\n\n\n  transmuxer.postMessage({\n    action: 'flush'\n  });\n};\n\nvar dequeue = function dequeue(transmuxer) {\n  transmuxer.currentTransmux = null;\n\n  if (transmuxer.transmuxQueue.length) {\n    transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n\n    if (typeof transmuxer.currentTransmux === 'function') {\n      transmuxer.currentTransmux();\n    } else {\n      processTransmux(transmuxer.currentTransmux);\n    }\n  }\n};\n\nvar processAction = function processAction(transmuxer, action) {\n  transmuxer.postMessage({\n    action: action\n  });\n  dequeue(transmuxer);\n};\n\nvar enqueueAction = function enqueueAction(action, transmuxer) {\n  if (!transmuxer.currentTransmux) {\n    transmuxer.currentTransmux = action;\n    processAction(transmuxer, action);\n    return;\n  }\n\n  transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\n\nvar reset = function reset(transmuxer) {\n  enqueueAction('reset', transmuxer);\n};\n\nvar endTimeline = function endTimeline(transmuxer) {\n  enqueueAction('endTimeline', transmuxer);\n};\n\nvar transmux = function transmux(options) {\n  if (!options.transmuxer.currentTransmux) {\n    options.transmuxer.currentTransmux = options;\n    processTransmux(options);\n    return;\n  }\n\n  options.transmuxer.transmuxQueue.push(options);\n};\n\nvar createTransmuxer = function createTransmuxer(options) {\n  var transmuxer = new TransmuxWorker();\n  transmuxer.currentTransmux = null;\n  transmuxer.transmuxQueue = [];\n  var term = transmuxer.terminate;\n\n  transmuxer.terminate = function () {\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue.length = 0;\n    return term.call(transmuxer);\n  };\n\n  transmuxer.postMessage({\n    action: 'init',\n    options: options\n  });\n  return transmuxer;\n};\n\nvar segmentTransmuxer = {\n  reset: reset,\n  endTimeline: endTimeline,\n  transmux: transmux,\n  createTransmuxer: createTransmuxer\n};\n\nvar workerCallback = function workerCallback(options) {\n  var transmuxer = options.transmuxer;\n  var endAction = options.endAction || options.action;\n  var callback = options.callback;\n\n  var message = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, options, {\n    endAction: null,\n    transmuxer: null,\n    callback: null\n  });\n\n  var listenForEndEvent = function listenForEndEvent(event) {\n    if (event.data.action !== endAction) {\n      return;\n    }\n\n    transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n    if (event.data.data) {\n      event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n\n      if (options.data) {\n        options.data = event.data.data;\n      }\n    }\n\n    callback(event.data);\n  };\n\n  transmuxer.addEventListener('message', listenForEndEvent);\n\n  if (options.data) {\n    var isArrayBuffer = options.data instanceof ArrayBuffer;\n    message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n    message.byteLength = options.data.byteLength;\n    var transfers = [isArrayBuffer ? options.data : options.data.buffer];\n    transmuxer.postMessage(message, transfers);\n  } else {\n    transmuxer.postMessage(message);\n  }\n};\n\nvar REQUEST_ERRORS = {\n  FAILURE: 2,\n  TIMEOUT: -101,\n  ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nvar abortAll = function abortAll(activeXhrs) {\n  activeXhrs.forEach(function (xhr) {\n    xhr.abort();\n  });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\n\nvar getRequestStats = function getRequestStats(request) {\n  return {\n    bandwidth: request.bandwidth,\n    bytesReceived: request.bytesReceived || 0,\n    roundTripTime: request.roundTripTime || 0\n  };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\n\nvar getProgressStats = function getProgressStats(progressEvent) {\n  var request = progressEvent.target;\n  var roundTripTime = Date.now() - request.requestTime;\n  var stats = {\n    bandwidth: Infinity,\n    bytesReceived: 0,\n    roundTripTime: roundTripTime || 0\n  };\n  stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n  // because we should only use bandwidth stats on progress to determine when\n  // abort a request early due to insufficient bandwidth\n\n  stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n  return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request -  the XHR request that possibly generated the error\n */\n\n\nvar handleErrors = function handleErrors(error, request) {\n  if (request.timedout) {\n    return {\n      status: request.status,\n      message: 'HLS request timed-out at URL: ' + request.uri,\n      code: REQUEST_ERRORS.TIMEOUT,\n      xhr: request\n    };\n  }\n\n  if (request.aborted) {\n    return {\n      status: request.status,\n      message: 'HLS request aborted at URL: ' + request.uri,\n      code: REQUEST_ERRORS.ABORTED,\n      xhr: request\n    };\n  }\n\n  if (error) {\n    return {\n      status: request.status,\n      message: 'HLS request errored at URL: ' + request.uri,\n      code: REQUEST_ERRORS.FAILURE,\n      xhr: request\n    };\n  }\n\n  if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n    return {\n      status: request.status,\n      message: 'Empty HLS response at URL: ' + request.uri,\n      code: REQUEST_ERRORS.FAILURE,\n      xhr: request\n    };\n  }\n\n  return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\n\nvar handleKeyResponse = function handleKeyResponse(segment, objects, finishProcessingFn) {\n  return function (error, request) {\n    var response = request.response;\n    var errorObj = handleErrors(error, request);\n\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n\n    if (response.byteLength !== 16) {\n      return finishProcessingFn({\n        status: request.status,\n        message: 'Invalid HLS key at URL: ' + request.uri,\n        code: REQUEST_ERRORS.FAILURE,\n        xhr: request\n      }, segment);\n    }\n\n    var view = new DataView(response);\n    var bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\n    for (var i = 0; i < objects.length; i++) {\n      objects[i].bytes = bytes;\n    }\n\n    return finishProcessingFn(null, segment);\n  };\n};\n\nvar parseInitSegment = function parseInitSegment(segment, _callback) {\n  var type = Object(_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_19__[\"detectContainerForBytes\"])(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n  // only know how to parse mp4 init segments at the moment\n\n  if (type !== 'mp4') {\n    var uri = segment.map.resolvedUri || segment.map.uri;\n    return _callback({\n      internal: true,\n      message: \"Found unsupported \" + (type || 'unknown') + \" container for initialization segment at URL: \" + uri,\n      code: REQUEST_ERRORS.FAILURE\n    });\n  }\n\n  workerCallback({\n    action: 'probeMp4Tracks',\n    data: segment.map.bytes,\n    transmuxer: segment.transmuxer,\n    callback: function callback(_ref) {\n      var tracks = _ref.tracks,\n          data = _ref.data; // transfer bytes back to us\n\n      segment.map.bytes = data;\n      tracks.forEach(function (track) {\n        segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n        if (segment.map.tracks[track.type]) {\n          return;\n        }\n\n        segment.map.tracks[track.type] = track;\n\n        if (typeof track.id === 'number' && track.timescale) {\n          segment.map.timescales = segment.map.timescales || {};\n          segment.map.timescales[track.id] = track.timescale;\n        }\n      });\n      return _callback(null);\n    }\n  });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\n\nvar handleInitSegmentResponse = function handleInitSegmentResponse(_ref2) {\n  var segment = _ref2.segment,\n      finishProcessingFn = _ref2.finishProcessingFn;\n  return function (error, request) {\n    var errorObj = handleErrors(error, request);\n\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n\n    var bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n    // until the key request is done to decrypt.\n\n    if (segment.map.key) {\n      segment.map.encryptedBytes = bytes;\n      return finishProcessingFn(null, segment);\n    }\n\n    segment.map.bytes = bytes;\n    parseInitSegment(segment, function (parseError) {\n      if (parseError) {\n        parseError.xhr = request;\n        parseError.status = request.status;\n        return finishProcessingFn(parseError, segment);\n      }\n\n      finishProcessingFn(null, segment);\n    });\n  };\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\n\nvar handleSegmentResponse = function handleSegmentResponse(_ref3) {\n  var segment = _ref3.segment,\n      finishProcessingFn = _ref3.finishProcessingFn,\n      responseType = _ref3.responseType;\n  return function (error, request) {\n    var errorObj = handleErrors(error, request);\n\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n\n    var newBytes = // although responseText \"should\" exist, this guard serves to prevent an error being\n    // thrown for two primary cases:\n    // 1. the mime type override stops working, or is not implemented for a specific\n    //    browser\n    // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n    responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n    segment.stats = getRequestStats(request);\n\n    if (segment.key) {\n      segment.encryptedBytes = new Uint8Array(newBytes);\n    } else {\n      segment.bytes = new Uint8Array(newBytes);\n    }\n\n    return finishProcessingFn(null, segment);\n  };\n};\n\nvar transmuxAndNotify = function transmuxAndNotify(_ref4) {\n  var segment = _ref4.segment,\n      bytes = _ref4.bytes,\n      trackInfoFn = _ref4.trackInfoFn,\n      timingInfoFn = _ref4.timingInfoFn,\n      videoSegmentTimingInfoFn = _ref4.videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn = _ref4.audioSegmentTimingInfoFn,\n      id3Fn = _ref4.id3Fn,\n      captionsFn = _ref4.captionsFn,\n      isEndOfTimeline = _ref4.isEndOfTimeline,\n      endedTimelineFn = _ref4.endedTimelineFn,\n      dataFn = _ref4.dataFn,\n      doneFn = _ref4.doneFn,\n      onTransmuxerLog = _ref4.onTransmuxerLog;\n  var fmp4Tracks = segment.map && segment.map.tracks || {};\n  var isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n  // One reason for this is that in the case of full segments, we want to trust start\n  // times from the probe, rather than the transmuxer.\n\n  var audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n  var audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n  var videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n  var videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n\n  var finish = function finish() {\n    return transmux({\n      bytes: bytes,\n      transmuxer: segment.transmuxer,\n      audioAppendStart: segment.audioAppendStart,\n      gopsToAlignWith: segment.gopsToAlignWith,\n      remux: isMuxed,\n      onData: function onData(result) {\n        result.type = result.type === 'combined' ? 'video' : result.type;\n        dataFn(segment, result);\n      },\n      onTrackInfo: function onTrackInfo(trackInfo) {\n        if (trackInfoFn) {\n          if (isMuxed) {\n            trackInfo.isMuxed = true;\n          }\n\n          trackInfoFn(segment, trackInfo);\n        }\n      },\n      onAudioTimingInfo: function onAudioTimingInfo(audioTimingInfo) {\n        // we only want the first start value we encounter\n        if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n          audioStartFn(audioTimingInfo.start);\n          audioStartFn = null;\n        } // we want to continually update the end time\n\n\n        if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n          audioEndFn(audioTimingInfo.end);\n        }\n      },\n      onVideoTimingInfo: function onVideoTimingInfo(videoTimingInfo) {\n        // we only want the first start value we encounter\n        if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n          videoStartFn(videoTimingInfo.start);\n          videoStartFn = null;\n        } // we want to continually update the end time\n\n\n        if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n          videoEndFn(videoTimingInfo.end);\n        }\n      },\n      onVideoSegmentTimingInfo: function onVideoSegmentTimingInfo(videoSegmentTimingInfo) {\n        videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n      },\n      onAudioSegmentTimingInfo: function onAudioSegmentTimingInfo(audioSegmentTimingInfo) {\n        audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n      },\n      onId3: function onId3(id3Frames, dispatchType) {\n        id3Fn(segment, id3Frames, dispatchType);\n      },\n      onCaptions: function onCaptions(captions) {\n        captionsFn(segment, [captions]);\n      },\n      isEndOfTimeline: isEndOfTimeline,\n      onEndedTimeline: function onEndedTimeline() {\n        endedTimelineFn();\n      },\n      onTransmuxerLog: onTransmuxerLog,\n      onDone: function onDone(result) {\n        if (!doneFn) {\n          return;\n        }\n\n        result.type = result.type === 'combined' ? 'video' : result.type;\n        doneFn(null, segment, result);\n      }\n    });\n  }; // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n  // Meaning cached frame data may corrupt our notion of where this segment\n  // really starts. To get around this, probe for the info needed.\n\n\n  workerCallback({\n    action: 'probeTs',\n    transmuxer: segment.transmuxer,\n    data: bytes,\n    baseStartTime: segment.baseStartTime,\n    callback: function callback(data) {\n      segment.bytes = bytes = data.data;\n      var probeResult = data.result;\n\n      if (probeResult) {\n        trackInfoFn(segment, {\n          hasAudio: probeResult.hasAudio,\n          hasVideo: probeResult.hasVideo,\n          isMuxed: isMuxed\n        });\n        trackInfoFn = null;\n\n        if (probeResult.hasAudio && !isMuxed) {\n          audioStartFn(probeResult.audioStart);\n        }\n\n        if (probeResult.hasVideo) {\n          videoStartFn(probeResult.videoStart);\n        }\n\n        audioStartFn = null;\n        videoStartFn = null;\n      }\n\n      finish();\n    }\n  });\n};\n\nvar handleSegmentBytes = function handleSegmentBytes(_ref5) {\n  var segment = _ref5.segment,\n      bytes = _ref5.bytes,\n      trackInfoFn = _ref5.trackInfoFn,\n      timingInfoFn = _ref5.timingInfoFn,\n      videoSegmentTimingInfoFn = _ref5.videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn = _ref5.audioSegmentTimingInfoFn,\n      id3Fn = _ref5.id3Fn,\n      captionsFn = _ref5.captionsFn,\n      isEndOfTimeline = _ref5.isEndOfTimeline,\n      endedTimelineFn = _ref5.endedTimelineFn,\n      dataFn = _ref5.dataFn,\n      doneFn = _ref5.doneFn,\n      onTransmuxerLog = _ref5.onTransmuxerLog;\n  var bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n  // We should have a handler that fetches the number of bytes required\n  // to check if something is fmp4. This will allow us to save bandwidth\n  // because we can only blacklist a playlist and abort requests\n  // by codec after trackinfo triggers.\n\n  if (Object(_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_19__[\"isLikelyFmp4MediaSegment\"])(bytesAsUint8Array)) {\n    segment.isFmp4 = true;\n    var tracks = segment.map.tracks;\n    var trackInfo = {\n      isFmp4: true,\n      hasVideo: !!tracks.video,\n      hasAudio: !!tracks.audio\n    }; // if we have a audio track, with a codec that is not set to\n    // encrypted audio\n\n    if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n      trackInfo.audioCodec = tracks.audio.codec;\n    } // if we have a video track, with a codec that is not set to\n    // encrypted video\n\n\n    if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n      trackInfo.videoCodec = tracks.video.codec;\n    }\n\n    if (tracks.video && tracks.audio) {\n      trackInfo.isMuxed = true;\n    } // since we don't support appending fmp4 data on progress, we know we have the full\n    // segment here\n\n\n    trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n    // time. The end time can be roughly calculated by the receiver using the duration.\n    //\n    // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n    // that is the true start of the segment (where the playback engine should begin\n    // decoding).\n\n    var finishLoading = function finishLoading(captions) {\n      // if the track still has audio at this point it is only possible\n      // for it to be audio only. See `tracks.video && tracks.audio` if statement\n      // above.\n      // we make sure to use segment.bytes here as that\n      dataFn(segment, {\n        data: bytesAsUint8Array,\n        type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n      });\n\n      if (captions && captions.length) {\n        captionsFn(segment, captions);\n      }\n\n      doneFn(null, segment, {});\n    };\n\n    workerCallback({\n      action: 'probeMp4StartTime',\n      timescales: segment.map.timescales,\n      data: bytesAsUint8Array,\n      transmuxer: segment.transmuxer,\n      callback: function callback(_ref6) {\n        var data = _ref6.data,\n            startTime = _ref6.startTime; // transfer bytes back to us\n\n        bytes = data.buffer;\n        segment.bytes = bytesAsUint8Array = data;\n\n        if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n          timingInfoFn(segment, 'audio', 'start', startTime);\n        }\n\n        if (trackInfo.hasVideo) {\n          timingInfoFn(segment, 'video', 'start', startTime);\n        } // Run through the CaptionParser in case there are captions.\n        // Initialize CaptionParser if it hasn't been yet\n\n\n        if (!tracks.video || !data.byteLength || !segment.transmuxer) {\n          finishLoading();\n          return;\n        }\n\n        workerCallback({\n          action: 'pushMp4Captions',\n          endAction: 'mp4Captions',\n          transmuxer: segment.transmuxer,\n          data: bytesAsUint8Array,\n          timescales: segment.map.timescales,\n          trackIds: [tracks.video.id],\n          callback: function callback(message) {\n            // transfer bytes back to us\n            bytes = message.data.buffer;\n            segment.bytes = bytesAsUint8Array = message.data;\n            message.logs.forEach(function (log) {\n              onTransmuxerLog(videojs.mergeOptions(log, {\n                stream: 'mp4CaptionParser'\n              }));\n            });\n            finishLoading(message.captions);\n          }\n        });\n      }\n    });\n    return;\n  } // VTT or other segments that don't need processing\n\n\n  if (!segment.transmuxer) {\n    doneFn(null, segment, {});\n    return;\n  }\n\n  if (typeof segment.container === 'undefined') {\n    segment.container = Object(_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_19__[\"detectContainerForBytes\"])(bytesAsUint8Array);\n  }\n\n  if (segment.container !== 'ts' && segment.container !== 'aac') {\n    trackInfoFn(segment, {\n      hasAudio: false,\n      hasVideo: false\n    });\n    doneFn(null, segment, {});\n    return;\n  } // ts or aac\n\n\n  transmuxAndNotify({\n    segment: segment,\n    bytes: bytes,\n    trackInfoFn: trackInfoFn,\n    timingInfoFn: timingInfoFn,\n    videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n    id3Fn: id3Fn,\n    captionsFn: captionsFn,\n    isEndOfTimeline: isEndOfTimeline,\n    endedTimelineFn: endedTimelineFn,\n    dataFn: dataFn,\n    doneFn: doneFn,\n    onTransmuxerLog: onTransmuxerLog\n  });\n};\n\nvar decrypt = function decrypt(_ref7, callback) {\n  var id = _ref7.id,\n      key = _ref7.key,\n      encryptedBytes = _ref7.encryptedBytes,\n      decryptionWorker = _ref7.decryptionWorker;\n\n  var decryptionHandler = function decryptionHandler(event) {\n    if (event.data.source === id) {\n      decryptionWorker.removeEventListener('message', decryptionHandler);\n      var decrypted = event.data.decrypted;\n      callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n    }\n  };\n\n  decryptionWorker.addEventListener('message', decryptionHandler);\n  var keyBytes;\n\n  if (key.bytes.slice) {\n    keyBytes = key.bytes.slice();\n  } else {\n    keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n  } // incrementally decrypt the bytes\n\n\n  decryptionWorker.postMessage(createTransferableMessage({\n    source: id,\n    encrypted: encryptedBytes,\n    key: keyBytes,\n    iv: key.iv\n  }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n *                                       routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\n\nvar decryptSegment = function decryptSegment(_ref8) {\n  var decryptionWorker = _ref8.decryptionWorker,\n      segment = _ref8.segment,\n      trackInfoFn = _ref8.trackInfoFn,\n      timingInfoFn = _ref8.timingInfoFn,\n      videoSegmentTimingInfoFn = _ref8.videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn = _ref8.audioSegmentTimingInfoFn,\n      id3Fn = _ref8.id3Fn,\n      captionsFn = _ref8.captionsFn,\n      isEndOfTimeline = _ref8.isEndOfTimeline,\n      endedTimelineFn = _ref8.endedTimelineFn,\n      dataFn = _ref8.dataFn,\n      doneFn = _ref8.doneFn,\n      onTransmuxerLog = _ref8.onTransmuxerLog;\n  decrypt({\n    id: segment.requestId,\n    key: segment.key,\n    encryptedBytes: segment.encryptedBytes,\n    decryptionWorker: decryptionWorker\n  }, function (decryptedBytes) {\n    segment.bytes = decryptedBytes;\n    handleSegmentBytes({\n      segment: segment,\n      bytes: segment.bytes,\n      trackInfoFn: trackInfoFn,\n      timingInfoFn: timingInfoFn,\n      videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n      id3Fn: id3Fn,\n      captionsFn: captionsFn,\n      isEndOfTimeline: isEndOfTimeline,\n      endedTimelineFn: endedTimelineFn,\n      dataFn: dataFn,\n      doneFn: doneFn,\n      onTransmuxerLog: onTransmuxerLog\n    });\n  });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n *                                       routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n *                            downloaded and any decryption completed\n */\n\n\nvar waitForCompletion = function waitForCompletion(_ref9) {\n  var activeXhrs = _ref9.activeXhrs,\n      decryptionWorker = _ref9.decryptionWorker,\n      trackInfoFn = _ref9.trackInfoFn,\n      timingInfoFn = _ref9.timingInfoFn,\n      videoSegmentTimingInfoFn = _ref9.videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn = _ref9.audioSegmentTimingInfoFn,\n      id3Fn = _ref9.id3Fn,\n      captionsFn = _ref9.captionsFn,\n      isEndOfTimeline = _ref9.isEndOfTimeline,\n      endedTimelineFn = _ref9.endedTimelineFn,\n      dataFn = _ref9.dataFn,\n      doneFn = _ref9.doneFn,\n      onTransmuxerLog = _ref9.onTransmuxerLog;\n  var count = 0;\n  var didError = false;\n  return function (error, segment) {\n    if (didError) {\n      return;\n    }\n\n    if (error) {\n      didError = true; // If there are errors, we have to abort any outstanding requests\n\n      abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n      // handle the aborted events from those requests, there are some cases where we may\n      // never get an aborted event. For instance, if the network connection is lost and\n      // there were two requests, the first may have triggered an error immediately, while\n      // the second request remains unsent. In that case, the aborted algorithm will not\n      // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n      //\n      // We also can't rely on the ready state of the XHR, since the request that\n      // triggered the connection error may also show as a ready state of 0 (unsent).\n      // Therefore, we have to finish this group of requests immediately after the first\n      // seen error.\n\n      return doneFn(error, segment);\n    }\n\n    count += 1;\n\n    if (count === activeXhrs.length) {\n      var segmentFinish = function segmentFinish() {\n        if (segment.encryptedBytes) {\n          return decryptSegment({\n            decryptionWorker: decryptionWorker,\n            segment: segment,\n            trackInfoFn: trackInfoFn,\n            timingInfoFn: timingInfoFn,\n            videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n            id3Fn: id3Fn,\n            captionsFn: captionsFn,\n            isEndOfTimeline: isEndOfTimeline,\n            endedTimelineFn: endedTimelineFn,\n            dataFn: dataFn,\n            doneFn: doneFn,\n            onTransmuxerLog: onTransmuxerLog\n          });\n        } // Otherwise, everything is ready just continue\n\n\n        handleSegmentBytes({\n          segment: segment,\n          bytes: segment.bytes,\n          trackInfoFn: trackInfoFn,\n          timingInfoFn: timingInfoFn,\n          videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n          audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n          id3Fn: id3Fn,\n          captionsFn: captionsFn,\n          isEndOfTimeline: isEndOfTimeline,\n          endedTimelineFn: endedTimelineFn,\n          dataFn: dataFn,\n          doneFn: doneFn,\n          onTransmuxerLog: onTransmuxerLog\n        });\n      }; // Keep track of when *all* of the requests have completed\n\n\n      segment.endOfAllRequests = Date.now();\n\n      if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n        return decrypt({\n          decryptionWorker: decryptionWorker,\n          // add -init to the \"id\" to differentiate between segment\n          // and init segment decryption, just in case they happen\n          // at the same time at some point in the future.\n          id: segment.requestId + '-init',\n          encryptedBytes: segment.map.encryptedBytes,\n          key: segment.map.key\n        }, function (decryptedBytes) {\n          segment.map.bytes = decryptedBytes;\n          parseInitSegment(segment, function (parseError) {\n            if (parseError) {\n              abortAll(activeXhrs);\n              return doneFn(parseError, segment);\n            }\n\n            segmentFinish();\n          });\n        });\n      }\n\n      segmentFinish();\n    }\n  };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\n\nvar handleLoadEnd = function handleLoadEnd(_ref10) {\n  var loadendState = _ref10.loadendState,\n      abortFn = _ref10.abortFn;\n  return function (event) {\n    var request = event.target;\n\n    if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n      abortFn();\n      loadendState.calledAbortFn = true;\n    }\n  };\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n *                                is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\n\nvar handleProgress = function handleProgress(_ref11) {\n  var segment = _ref11.segment,\n      progressFn = _ref11.progressFn;\n  _ref11.trackInfoFn;\n  _ref11.timingInfoFn;\n  _ref11.videoSegmentTimingInfoFn;\n  _ref11.audioSegmentTimingInfoFn;\n  _ref11.id3Fn;\n  _ref11.captionsFn;\n  _ref11.isEndOfTimeline;\n  _ref11.endedTimelineFn;\n  _ref11.dataFn;\n  return function (event) {\n    var request = event.target;\n\n    if (request.aborted) {\n      return;\n    }\n\n    segment.stats = videojs.mergeOptions(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n    if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n      segment.stats.firstBytesReceivedAt = Date.now();\n    }\n\n    return progressFn(event, segment);\n  };\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n *   decrypts the media-segment if it has a key uri and an iv\n *   aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n *   resolvedUri: String,\n *   [transmuxer]: Object,\n *   [byterange]: {\n *     offset: Number,\n *     length: Number\n *   },\n *   [key]: {\n *     resolvedUri: String\n *     [byterange]: {\n *       offset: Number,\n *       length: Number\n *     },\n *     iv: {\n *       bytes: Uint32Array\n *     }\n *   },\n *   [map]: {\n *     resolvedUri: String,\n *     [byterange]: {\n *       offset: Number,\n *       length: Number\n *     },\n *     [bytes]: Uint8Array\n *   }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n *                                       decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n *                             aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n *                                segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n *                            request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n *                            succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n *                     outstanding requests\n */\n\n\nvar mediaSegmentRequest = function mediaSegmentRequest(_ref12) {\n  var xhr = _ref12.xhr,\n      xhrOptions = _ref12.xhrOptions,\n      decryptionWorker = _ref12.decryptionWorker,\n      segment = _ref12.segment,\n      abortFn = _ref12.abortFn,\n      progressFn = _ref12.progressFn,\n      trackInfoFn = _ref12.trackInfoFn,\n      timingInfoFn = _ref12.timingInfoFn,\n      videoSegmentTimingInfoFn = _ref12.videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn = _ref12.audioSegmentTimingInfoFn,\n      id3Fn = _ref12.id3Fn,\n      captionsFn = _ref12.captionsFn,\n      isEndOfTimeline = _ref12.isEndOfTimeline,\n      endedTimelineFn = _ref12.endedTimelineFn,\n      dataFn = _ref12.dataFn,\n      doneFn = _ref12.doneFn,\n      onTransmuxerLog = _ref12.onTransmuxerLog;\n  var activeXhrs = [];\n  var finishProcessingFn = waitForCompletion({\n    activeXhrs: activeXhrs,\n    decryptionWorker: decryptionWorker,\n    trackInfoFn: trackInfoFn,\n    timingInfoFn: timingInfoFn,\n    videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n    id3Fn: id3Fn,\n    captionsFn: captionsFn,\n    isEndOfTimeline: isEndOfTimeline,\n    endedTimelineFn: endedTimelineFn,\n    dataFn: dataFn,\n    doneFn: doneFn,\n    onTransmuxerLog: onTransmuxerLog\n  }); // optionally, request the decryption key\n\n  if (segment.key && !segment.key.bytes) {\n    var objects = [segment.key];\n\n    if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n      objects.push(segment.map.key);\n    }\n\n    var keyRequestOptions = videojs.mergeOptions(xhrOptions, {\n      uri: segment.key.resolvedUri,\n      responseType: 'arraybuffer'\n    });\n    var keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n    var keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n    activeXhrs.push(keyXhr);\n  } // optionally, request the associated media init segment\n\n\n  if (segment.map && !segment.map.bytes) {\n    var differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n\n    if (differentMapKey) {\n      var mapKeyRequestOptions = videojs.mergeOptions(xhrOptions, {\n        uri: segment.map.key.resolvedUri,\n        responseType: 'arraybuffer'\n      });\n      var mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n      var mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n      activeXhrs.push(mapKeyXhr);\n    }\n\n    var initSegmentOptions = videojs.mergeOptions(xhrOptions, {\n      uri: segment.map.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment.map)\n    });\n    var initSegmentRequestCallback = handleInitSegmentResponse({\n      segment: segment,\n      finishProcessingFn: finishProcessingFn\n    });\n    var initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n    activeXhrs.push(initSegmentXhr);\n  }\n\n  var segmentRequestOptions = videojs.mergeOptions(xhrOptions, {\n    uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n    responseType: 'arraybuffer',\n    headers: segmentXhrHeaders(segment)\n  });\n  var segmentRequestCallback = handleSegmentResponse({\n    segment: segment,\n    finishProcessingFn: finishProcessingFn,\n    responseType: segmentRequestOptions.responseType\n  });\n  var segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n  segmentXhr.addEventListener('progress', handleProgress({\n    segment: segment,\n    progressFn: progressFn,\n    trackInfoFn: trackInfoFn,\n    timingInfoFn: timingInfoFn,\n    videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n    id3Fn: id3Fn,\n    captionsFn: captionsFn,\n    isEndOfTimeline: isEndOfTimeline,\n    endedTimelineFn: endedTimelineFn,\n    dataFn: dataFn\n  }));\n  activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n  // multiple times, provide a shared state object\n\n  var loadendState = {};\n  activeXhrs.forEach(function (activeXhr) {\n    activeXhr.addEventListener('loadend', handleLoadEnd({\n      loadendState: loadendState,\n      abortFn: abortFn\n    }));\n  });\n  return function () {\n    return abortAll(activeXhrs);\n  };\n};\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\n\n\nvar logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nvar getCodecs = function getCodecs(media) {\n  // if the codecs were explicitly specified, use them instead of the\n  // defaults\n  var mediaAttributes = media.attributes || {};\n\n  if (mediaAttributes.CODECS) {\n    return Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(mediaAttributes.CODECS);\n  }\n};\n\nvar isMaat = function isMaat(master, media) {\n  var mediaAttributes = media.attributes || {};\n  return master && master.mediaGroups && master.mediaGroups.AUDIO && mediaAttributes.AUDIO && master.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\n\nvar isMuxed = function isMuxed(master, media) {\n  if (!isMaat(master, media)) {\n    return true;\n  }\n\n  var mediaAttributes = media.attributes || {};\n  var audioGroup = master.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n\n  for (var groupId in audioGroup) {\n    // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n    // or there are listed playlists (the case for DASH, as the manifest will have already\n    // provided all of the details necessary to generate the audio playlist, as opposed to\n    // HLS' externally requested playlists), then the content is demuxed.\n    if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nvar unwrapCodecList = function unwrapCodecList(codecList) {\n  var codecs = {};\n  codecList.forEach(function (_ref) {\n    var mediaType = _ref.mediaType,\n        type = _ref.type,\n        details = _ref.details;\n    codecs[mediaType] = codecs[mediaType] || [];\n    codecs[mediaType].push(Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"translateLegacyCodec\"])(\"\" + type + details));\n  });\n  Object.keys(codecs).forEach(function (mediaType) {\n    if (codecs[mediaType].length > 1) {\n      logFn$1(\"multiple \" + mediaType + \" codecs found as attributes: \" + codecs[mediaType].join(', ') + \". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.\");\n      codecs[mediaType] = null;\n      return;\n    }\n\n    codecs[mediaType] = codecs[mediaType][0];\n  });\n  return codecs;\n};\n\nvar codecCount = function codecCount(codecObj) {\n  var count = 0;\n\n  if (codecObj.audio) {\n    count++;\n  }\n\n  if (codecObj.video) {\n    count++;\n  }\n\n  return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a master playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param master {Object} the m3u8 object for the master playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\n\nvar codecsForPlaylist = function codecsForPlaylist(master, media) {\n  var mediaAttributes = media.attributes || {};\n  var codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n  // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n  if (isMaat(master, media) && !codecInfo.audio) {\n    if (!isMuxed(master, media)) {\n      // It is possible for codecs to be specified on the audio media group playlist but\n      // not on the rendition playlist. This is mostly the case for DASH, where audio and\n      // video are always separate (and separately specified).\n      var defaultCodecs = unwrapCodecList(Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"codecsFromDefault\"])(master, mediaAttributes.AUDIO) || []);\n\n      if (defaultCodecs.audio) {\n        codecInfo.audio = defaultCodecs.audio;\n      }\n    }\n  }\n\n  return codecInfo;\n};\n\nvar logFn = logger('PlaylistSelector');\n\nvar representationToString = function representationToString(representation) {\n  if (!representation || !representation.playlist) {\n    return;\n  }\n\n  var playlist = representation.playlist;\n  return JSON.stringify({\n    id: playlist.id,\n    bandwidth: representation.bandwidth,\n    width: representation.width,\n    height: representation.height,\n    codecs: playlist.attributes && playlist.attributes.CODECS || ''\n  });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\n\nvar safeGetComputedStyle = function safeGetComputedStyle(el, property) {\n  if (!el) {\n    return '';\n  }\n\n  var result = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\n\n  if (!result) {\n    return '';\n  }\n\n  return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\n\nvar stableSort = function stableSort(array, sortFn) {\n  var newArray = array.slice();\n  array.sort(function (left, right) {\n    var cmp = sortFn(left, right);\n\n    if (cmp === 0) {\n      return newArray.indexOf(left) - newArray.indexOf(right);\n    }\n\n    return cmp;\n  });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\n\nvar comparePlaylistBandwidth = function comparePlaylistBandwidth(left, right) {\n  var leftBandwidth;\n  var rightBandwidth;\n\n  if (left.attributes.BANDWIDTH) {\n    leftBandwidth = left.attributes.BANDWIDTH;\n  }\n\n  leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\n\n  if (right.attributes.BANDWIDTH) {\n    rightBandwidth = right.attributes.BANDWIDTH;\n  }\n\n  rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\n  return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\n\nvar comparePlaylistResolution = function comparePlaylistResolution(left, right) {\n  var leftWidth;\n  var rightWidth;\n\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n    leftWidth = left.attributes.RESOLUTION.width;\n  }\n\n  leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\n\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n    rightWidth = right.attributes.RESOLUTION.width;\n  }\n\n  rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n  // have the same media dimensions/ resolution\n\n  if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n    return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n  }\n\n  return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} master\n *        Object representation of the master manifest\n * @param {number} playerBandwidth\n *        Current calculated bandwidth of the player\n * @param {number} playerWidth\n *        Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n *        Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n *        True if the player width and height should be used during the selection, false otherwise\n * @param {Object} masterPlaylistController\n *        the current masterPlaylistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\n\nvar simpleSelector = function simpleSelector(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, masterPlaylistController) {\n  // If we end up getting called before `master` is available, exit early\n  if (!master) {\n    return;\n  }\n\n  var options = {\n    bandwidth: playerBandwidth,\n    width: playerWidth,\n    height: playerHeight,\n    limitRenditionByPlayerDimensions: limitRenditionByPlayerDimensions\n  };\n  var playlists = master.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n  if (Playlist.isAudioOnly(master)) {\n    playlists = masterPlaylistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n    // at the buttom of this function for debugging.\n\n    options.audioOnly = true;\n  } // convert the playlists to an intermediary representation to make comparisons easier\n\n\n  var sortedPlaylistReps = playlists.map(function (playlist) {\n    var bandwidth;\n    var width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n    var height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n    bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n    bandwidth = bandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\n    return {\n      bandwidth: bandwidth,\n      width: width,\n      height: height,\n      playlist: playlist\n    };\n  });\n  stableSort(sortedPlaylistReps, function (left, right) {\n    return left.bandwidth - right.bandwidth;\n  }); // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  sortedPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n    return !Playlist.isIncompatible(rep.playlist);\n  }); // filter out any playlists that have been disabled manually through the representations\n  // api or blacklisted temporarily due to playback errors.\n\n  var enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n    return Playlist.isEnabled(rep.playlist);\n  });\n\n  if (!enabledPlaylistReps.length) {\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\n    // by the user through the representations api. In this case, ignore blacklisting and\n    // fallback to what the user wants by using playlists the user has not disabled.\n    enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n      return !Playlist.isDisabled(rep.playlist);\n    });\n  } // filter out any variant that has greater effective bitrate\n  // than the current estimated bandwidth\n\n\n  var bandwidthPlaylistReps = enabledPlaylistReps.filter(function (rep) {\n    return rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth;\n  });\n  var highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n  // and then taking the very first element\n\n  var bandwidthBestRep = bandwidthPlaylistReps.filter(function (rep) {\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n  })[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n  if (limitRenditionByPlayerDimensions === false) {\n    var _chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n\n    if (_chosenRep && _chosenRep.playlist) {\n      var type = 'sortedPlaylistReps';\n\n      if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      }\n\n      if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n\n      logFn(\"choosing \" + representationToString(_chosenRep) + \" using \" + type + \" with options\", options);\n      return _chosenRep.playlist;\n    }\n\n    logFn('could not choose a playlist with options', options);\n    return null;\n  } // filter out playlists without resolution information\n\n\n  var haveResolution = bandwidthPlaylistReps.filter(function (rep) {\n    return rep.width && rep.height;\n  }); // sort variants by resolution\n\n  stableSort(haveResolution, function (left, right) {\n    return left.width - right.width;\n  }); // if we have the exact resolution as the player use it\n\n  var resolutionBestRepList = haveResolution.filter(function (rep) {\n    return rep.width === playerWidth && rep.height === playerHeight;\n  });\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n  var resolutionBestRep = resolutionBestRepList.filter(function (rep) {\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n  })[0];\n  var resolutionPlusOneList;\n  var resolutionPlusOneSmallest;\n  var resolutionPlusOneRep; // find the smallest variant that is larger than the player\n  // if there is no match of exact resolution\n\n  if (!resolutionBestRep) {\n    resolutionPlusOneList = haveResolution.filter(function (rep) {\n      return rep.width > playerWidth || rep.height > playerHeight;\n    }); // find all the variants have the same smallest resolution\n\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(function (rep) {\n      return rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height;\n    }); // ensure that we also pick the highest bandwidth variant that\n    // is just-larger-than the video player\n\n    highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n    resolutionPlusOneRep = resolutionPlusOneSmallest.filter(function (rep) {\n      return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n    })[0];\n  }\n\n  var leastPixelDiffRep; // If this selector proves to be better than others,\n  // resolutionPlusOneRep and resolutionBestRep and all\n  // the code involving them should be removed.\n\n  if (masterPlaylistController.experimentalLeastPixelDiffSelector) {\n    // find the variant that is closest to the player's pixel size\n    var leastPixelDiffList = haveResolution.map(function (rep) {\n      rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n      return rep;\n    }); // get the highest bandwidth, closest resolution playlist\n\n    stableSort(leastPixelDiffList, function (left, right) {\n      // sort by highest bandwidth if pixelDiff is the same\n      if (left.pixelDiff === right.pixelDiff) {\n        return right.bandwidth - left.bandwidth;\n      }\n\n      return left.pixelDiff - right.pixelDiff;\n    });\n    leastPixelDiffRep = leastPixelDiffList[0];\n  } // fallback chain of variants\n\n\n  var chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n\n  if (chosenRep && chosenRep.playlist) {\n    var _type = 'sortedPlaylistReps';\n\n    if (leastPixelDiffRep) {\n      _type = 'leastPixelDiffRep';\n    } else if (resolutionPlusOneRep) {\n      _type = 'resolutionPlusOneRep';\n    } else if (resolutionBestRep) {\n      _type = 'resolutionBestRep';\n    } else if (bandwidthBestRep) {\n      _type = 'bandwidthBestRep';\n    } else if (enabledPlaylistReps[0]) {\n      _type = 'enabledPlaylistReps';\n    }\n\n    logFn(\"choosing \" + representationToString(chosenRep) + \" using \" + _type + \" with options\", options);\n    return chosenRep.playlist;\n  }\n\n  logFn('could not choose a playlist with options', options);\n  return null;\n};\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\n\nvar lastBandwidthSelector = function lastBandwidthSelector() {\n  var pixelRatio = this.useDevicePixelRatio ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.devicePixelRatio || 1 : 1;\n  return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\n\nvar movingAverageBandwidthSelector = function movingAverageBandwidthSelector(decay) {\n  var average = -1;\n  var lastSystemBandwidth = -1;\n\n  if (decay < 0 || decay > 1) {\n    throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n  }\n\n  return function () {\n    var pixelRatio = this.useDevicePixelRatio ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.devicePixelRatio || 1 : 1;\n\n    if (average < 0) {\n      average = this.systemBandwidth;\n      lastSystemBandwidth = this.systemBandwidth;\n    } // stop the average value from decaying for every 250ms\n    // when the systemBandwidth is constant\n    // and\n    // stop average from setting to a very low value when the\n    // systemBandwidth becomes 0 in case of chunk cancellation\n\n\n    if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n      average = decay * this.systemBandwidth + (1 - decay) * average;\n      lastSystemBandwidth = this.systemBandwidth;\n    }\n\n    return simpleSelector(this.playlists.master, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);\n  };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n *        Object of information required to use this selector\n * @param {Object} settings.master\n *        Object representation of the master manifest\n * @param {number} settings.currentTime\n *        The current time of the player\n * @param {number} settings.bandwidth\n *        Current measured bandwidth\n * @param {number} settings.duration\n *        Duration of the media\n * @param {number} settings.segmentDuration\n *        Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n *        Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n *        The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n *        SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n *         {Object} return.playlist\n *         The highest bandwidth playlist with the least amount of rebuffering\n *         {Number} return.rebufferingImpact\n *         The amount of time in seconds switching to this playlist will rebuffer. A\n *         negative value means that switching will cause zero rebuffering.\n */\n\n\nvar minRebufferMaxBandwidthSelector = function minRebufferMaxBandwidthSelector(settings) {\n  var master = settings.master,\n      currentTime = settings.currentTime,\n      bandwidth = settings.bandwidth,\n      duration = settings.duration,\n      segmentDuration = settings.segmentDuration,\n      timeUntilRebuffer = settings.timeUntilRebuffer,\n      currentTimeline = settings.currentTimeline,\n      syncController = settings.syncController; // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  var compatiblePlaylists = master.playlists.filter(function (playlist) {\n    return !Playlist.isIncompatible(playlist);\n  }); // filter out any playlists that have been disabled manually through the representations\n  // api or blacklisted temporarily due to playback errors.\n\n  var enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n\n  if (!enabledPlaylists.length) {\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\n    // by the user through the representations api. In this case, ignore blacklisting and\n    // fallback to what the user wants by using playlists the user has not disabled.\n    enabledPlaylists = compatiblePlaylists.filter(function (playlist) {\n      return !Playlist.isDisabled(playlist);\n    });\n  }\n\n  var bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n  var rebufferingEstimates = bandwidthPlaylists.map(function (playlist) {\n    var syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n    // sync request first. This will double the request time\n\n    var numRequests = syncPoint ? 1 : 2;\n    var requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n    var rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n    return {\n      playlist: playlist,\n      rebufferingImpact: rebufferingImpact\n    };\n  });\n  var noRebufferingPlaylists = rebufferingEstimates.filter(function (estimate) {\n    return estimate.rebufferingImpact <= 0;\n  }); // Sort by bandwidth DESC\n\n  stableSort(noRebufferingPlaylists, function (a, b) {\n    return comparePlaylistBandwidth(b.playlist, a.playlist);\n  });\n\n  if (noRebufferingPlaylists.length) {\n    return noRebufferingPlaylists[0];\n  }\n\n  stableSort(rebufferingEstimates, function (a, b) {\n    return a.rebufferingImpact - b.rebufferingImpact;\n  });\n  return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video.  If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n *         {Object} return.playlist\n *         The lowest bitrate playlist that contains a video codec.  If no such rendition\n *         exists pick the lowest audio rendition.\n */\n\n\nvar lowestBitrateCompatibleVariantSelector = function lowestBitrateCompatibleVariantSelector() {\n  var _this = this; // filter out any playlists that have been excluded due to\n  // incompatible configurations or playback errors\n\n\n  var playlists = this.playlists.master.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n  stableSort(playlists, function (a, b) {\n    return comparePlaylistBandwidth(a, b);\n  }); // Parse and assume that playlists with no video codec have no video\n  // (this is not necessarily true, although it is generally true).\n  //\n  // If an entire manifest has no valid videos everything will get filtered\n  // out.\n\n  var playlistsWithVideo = playlists.filter(function (playlist) {\n    return !!codecsForPlaylist(_this.playlists.master, playlist).video;\n  });\n  return playlistsWithVideo[0] || null;\n};\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\n\n\nvar concatSegments = function concatSegments(segmentObj) {\n  var offset = 0;\n  var tempBuffer;\n\n  if (segmentObj.bytes) {\n    tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n    segmentObj.segments.forEach(function (segment) {\n      tempBuffer.set(segment, offset);\n      offset += segment.byteLength;\n    });\n  }\n\n  return tempBuffer;\n};\n/**\n * @file text-tracks.js\n */\n\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\n\nvar createCaptionsTrackIfNotExists = function createCaptionsTrackIfNotExists(inbandTextTracks, tech, captionStream) {\n  if (!inbandTextTracks[captionStream]) {\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-608'\n    });\n    tech.trigger({\n      type: 'usage',\n      name: 'hls-608'\n    });\n    var instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n    if (/^cc708_/.test(captionStream)) {\n      instreamId = 'SERVICE' + captionStream.split('_')[1];\n    }\n\n    var track = tech.textTracks().getTrackById(instreamId);\n\n    if (track) {\n      // Resuse an existing track with a CC# id because this was\n      // very likely created by videojs-contrib-hls from information\n      // in the m3u8 for us to use\n      inbandTextTracks[captionStream] = track;\n    } else {\n      // This section gets called when we have caption services that aren't specified in the manifest.\n      // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n      var captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n      var label = captionStream;\n      var language = captionStream;\n      var def = false;\n      var captionService = captionServices[instreamId];\n\n      if (captionService) {\n        label = captionService.label;\n        language = captionService.language;\n        def = captionService[\"default\"];\n      } // Otherwise, create a track with the default `CC#` label and\n      // without a language\n\n\n      inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n        kind: 'captions',\n        id: instreamId,\n        // TODO: investigate why this doesn't seem to turn the caption on by default\n        \"default\": def,\n        label: label,\n        language: language\n      }, false).track;\n    }\n  }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n *   @param {Object} inbandTextTracks the inband text tracks\n *   @param {number} timestampOffset the timestamp offset of the source buffer\n *   @param {Array} captionArray an array of caption data\n * @private\n */\n\n\nvar addCaptionData = function addCaptionData(_ref) {\n  var inbandTextTracks = _ref.inbandTextTracks,\n      captionArray = _ref.captionArray,\n      timestampOffset = _ref.timestampOffset;\n\n  if (!captionArray) {\n    return;\n  }\n\n  var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\n  captionArray.forEach(function (caption) {\n    var track = caption.stream;\n    inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n  });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\n\nvar deprecateOldCue = function deprecateOldCue(cue) {\n  Object.defineProperties(cue.frame, {\n    id: {\n      get: function get() {\n        videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n        return cue.value.key;\n      }\n    },\n    value: {\n      get: function get() {\n        videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n        return cue.value.data;\n      }\n    },\n    privateData: {\n      get: function get() {\n        videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n        return cue.value.data;\n      }\n    }\n  });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n *   @param {Object} inbandTextTracks the inband text tracks\n *   @param {Array} metadataArray an array of meta data\n *   @param {number} timestampOffset the timestamp offset of the source buffer\n *   @param {number} videoDuration the duration of the video\n * @private\n */\n\n\nvar addMetadata = function addMetadata(_ref2) {\n  var inbandTextTracks = _ref2.inbandTextTracks,\n      metadataArray = _ref2.metadataArray,\n      timestampOffset = _ref2.timestampOffset,\n      videoDuration = _ref2.videoDuration;\n\n  if (!metadataArray) {\n    return;\n  }\n\n  var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\n  var metadataTrack = inbandTextTracks.metadataTrack_;\n\n  if (!metadataTrack) {\n    return;\n  }\n\n  metadataArray.forEach(function (metadata) {\n    var time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n    // ignore this bit of metadata.\n    // This likely occurs when you have an non-timed ID3 tag like TIT2,\n    // which is the \"Title/Songname/Content description\" frame\n\n    if (typeof time !== 'number' || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.isNaN(time) || time < 0 || !(time < Infinity)) {\n      return;\n    }\n\n    metadata.frames.forEach(function (frame) {\n      var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n      cue.frame = frame;\n      cue.value = frame;\n      deprecateOldCue(cue);\n      metadataTrack.addCue(cue);\n    });\n  });\n\n  if (!metadataTrack.cues || !metadataTrack.cues.length) {\n    return;\n  } // Updating the metadeta cues so that\n  // the endTime of each cue is the startTime of the next cue\n  // the endTime of last cue is the duration of the video\n\n\n  var cues = metadataTrack.cues;\n  var cuesArray = []; // Create a copy of the TextTrackCueList...\n  // ...disregarding cues with a falsey value\n\n  for (var i = 0; i < cues.length; i++) {\n    if (cues[i]) {\n      cuesArray.push(cues[i]);\n    }\n  } // Group cues by their startTime value\n\n\n  var cuesGroupedByStartTime = cuesArray.reduce(function (obj, cue) {\n    var timeSlot = obj[cue.startTime] || [];\n    timeSlot.push(cue);\n    obj[cue.startTime] = timeSlot;\n    return obj;\n  }, {}); // Sort startTimes by ascending order\n\n  var sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort(function (a, b) {\n    return Number(a) - Number(b);\n  }); // Map each cue group's endTime to the next group's startTime\n\n  sortedStartTimes.forEach(function (startTime, idx) {\n    var cueGroup = cuesGroupedByStartTime[startTime];\n    var nextTime = Number(sortedStartTimes[idx + 1]) || videoDuration; // Map each cue's endTime the next group's startTime\n\n    cueGroup.forEach(function (cue) {\n      cue.endTime = nextTime;\n    });\n  });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\n\nvar createMetadataTrackIfNotExists = function createMetadataTrackIfNotExists(inbandTextTracks, dispatchType, tech) {\n  if (inbandTextTracks.metadataTrack_) {\n    return;\n  }\n\n  inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n    kind: 'metadata',\n    label: 'Timed Metadata'\n  }, false).track;\n  inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\n\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\n  var i;\n  var cue;\n\n  if (!track) {\n    return;\n  }\n\n  if (!track.cues) {\n    return;\n  }\n\n  i = track.cues.length;\n\n  while (i--) {\n    cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n    if (cue.startTime >= start && cue.endTime <= end) {\n      track.removeCue(cue);\n    }\n  }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\n\nvar removeDuplicateCuesFromTrack = function removeDuplicateCuesFromTrack(track) {\n  var cues = track.cues;\n\n  if (!cues) {\n    return;\n  }\n\n  for (var i = 0; i < cues.length; i++) {\n    var duplicates = [];\n    var occurrences = 0;\n\n    for (var j = 0; j < cues.length; j++) {\n      if (cues[i].startTime === cues[j].startTime && cues[i].endTime === cues[j].endTime && cues[i].text === cues[j].text) {\n        occurrences++;\n\n        if (occurrences > 1) {\n          duplicates.push(cues[j]);\n        }\n      }\n    }\n\n    if (duplicates.length) {\n      duplicates.forEach(function (dupe) {\n        return track.removeCue(dupe);\n      });\n    }\n  }\n};\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {number} currentTime\n *        The current time\n * @param {Double} mapping\n *        Offset to map display time to stream presentation time\n * @return {Array}\n *         List of gops considered safe to append over\n */\n\n\nvar gopsSafeToAlignWith = function gopsSafeToAlignWith(buffer, currentTime, mapping) {\n  if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n    return [];\n  } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n\n  var currentTimePts = Math.ceil((currentTime - mapping + 3) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__[\"ONE_SECOND_IN_TS\"]);\n  var i;\n\n  for (i = 0; i < buffer.length; i++) {\n    if (buffer[i].pts > currentTimePts) {\n      break;\n    }\n  }\n\n  return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {Array} gops\n *        List of new gop information\n * @param {boolean} replace\n *        If true, replace the buffer with the new gop information. If false, append the\n *        new gop information to the buffer in the right location of time.\n * @return {Array}\n *         Updated list of gop information\n */\n\n\nvar updateGopBuffer = function updateGopBuffer(buffer, gops, replace) {\n  if (!gops.length) {\n    return buffer;\n  }\n\n  if (replace) {\n    // If we are in safe append mode, then completely overwrite the gop buffer\n    // with the most recent appeneded data. This will make sure that when appending\n    // future segments, we only try to align with gops that are both ahead of current\n    // time and in the last segment appended.\n    return gops.slice();\n  }\n\n  var start = gops[0].pts;\n  var i = 0;\n\n  for (i; i < buffer.length; i++) {\n    if (buffer[i].pts >= start) {\n      break;\n    }\n  }\n\n  return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {Double} start\n *        position to start the remove at\n * @param {Double} end\n *        position to end the remove at\n * @param {Double} mapping\n *        Offset to map display time to stream presentation time\n */\n\n\nvar removeGopBuffer = function removeGopBuffer(buffer, start, end, mapping) {\n  var startPts = Math.ceil((start - mapping) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__[\"ONE_SECOND_IN_TS\"]);\n  var endPts = Math.ceil((end - mapping) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__[\"ONE_SECOND_IN_TS\"]);\n  var updatedBuffer = buffer.slice();\n  var i = buffer.length;\n\n  while (i--) {\n    if (buffer[i].pts <= endPts) {\n      break;\n    }\n  }\n\n  if (i === -1) {\n    // no removal because end of remove range is before start of buffer\n    return updatedBuffer;\n  }\n\n  var j = i + 1;\n\n  while (j--) {\n    if (buffer[j].pts <= startPts) {\n      break;\n    }\n  } // clamp remove range start to 0 index\n\n\n  j = Math.max(j, 0);\n  updatedBuffer.splice(j, i - j + 1);\n  return updatedBuffer;\n};\n\nvar shallowEqual = function shallowEqual(a, b) {\n  // if both are undefined\n  // or one or the other is undefined\n  // they are not equal\n  if (!a && !b || !a && b || a && !b) {\n    return false;\n  } // they are the same object and thus, equal\n\n\n  if (a === b) {\n    return true;\n  } // sort keys so we can make sure they have\n  // all the same keys later.\n\n\n  var akeys = Object.keys(a).sort();\n  var bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n  if (akeys.length !== bkeys.length) {\n    return false;\n  }\n\n  for (var i = 0; i < akeys.length; i++) {\n    var key = akeys[i]; // different sorted keys, not equal\n\n    if (key !== bkeys[i]) {\n      return false;\n    } // different values, not equal\n\n\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n\n  return true;\n}; // https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\n\n\nvar QUOTA_EXCEEDED_ERR = 22;\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nvar getSyncSegmentCandidate = function getSyncSegmentCandidate(currentTimeline, segments, targetTime) {\n  segments = segments || [];\n  var timelineSegments = [];\n  var time = 0;\n\n  for (var i = 0; i < segments.length; i++) {\n    var segment = segments[i];\n\n    if (currentTimeline === segment.timeline) {\n      timelineSegments.push(i);\n      time += segment.duration;\n\n      if (time > targetTime) {\n        return i;\n      }\n    }\n  }\n\n  if (timelineSegments.length === 0) {\n    return 0;\n  } // default to the last timeline segment\n\n\n  return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\n\nvar MIN_BACK_BUFFER = 1; // in ms\n\nvar CHECK_BUFFER_DELAY = 500;\n\nvar finite = function finite(num) {\n  return typeof num === 'number' && isFinite(num);\n}; // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\n\nvar MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\n\nvar illegalMediaSwitch = function illegalMediaSwitch(loaderType, startingMedia, trackInfo) {\n  // Although these checks should most likely cover non 'main' types, for now it narrows\n  // the scope of our checks.\n  if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n    return null;\n  }\n\n  if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n    return 'Neither audio nor video found in segment.';\n  }\n\n  if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n    return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n  }\n\n  if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n    return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n  }\n\n  return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n *        The current seekable range\n * @param {number} currentTime\n *        The current time of the player\n * @param {number} targetDuration\n *        The target duration of the current playlist\n * @return {number}\n *         Time that is safe to remove from the back buffer without interrupting playback\n */\n\n\nvar safeBackBufferTrimTime = function safeBackBufferTrimTime(seekable, currentTime, targetDuration) {\n  // 30 seconds before the playhead provides a safe default for trimming.\n  //\n  // Choosing a reasonable default is particularly important for high bitrate content and\n  // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n  // throw an APPEND_BUFFER_ERR.\n  var trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n\n  if (seekable.length) {\n    // Some live playlists may have a shorter window of content than the full allowed back\n    // buffer. For these playlists, don't save content that's no longer within the window.\n    trimTime = Math.max(trimTime, seekable.start(0));\n  } // Don't remove within target duration of the current time to avoid the possibility of\n  // removing the GOP currently being played, as removing it can cause playback stalls.\n\n\n  var maxTrimTime = currentTime - targetDuration;\n  return Math.min(maxTrimTime, trimTime);\n};\n\nvar segmentInfoString = function segmentInfoString(segmentInfo) {\n  var startOfSegment = segmentInfo.startOfSegment,\n      duration = segmentInfo.duration,\n      segment = segmentInfo.segment,\n      part = segmentInfo.part,\n      _segmentInfo$playlist = segmentInfo.playlist,\n      seq = _segmentInfo$playlist.mediaSequence,\n      id = _segmentInfo$playlist.id,\n      _segmentInfo$playlist2 = _segmentInfo$playlist.segments,\n      segments = _segmentInfo$playlist2 === void 0 ? [] : _segmentInfo$playlist2,\n      index = segmentInfo.mediaIndex,\n      partIndex = segmentInfo.partIndex,\n      timeline = segmentInfo.timeline;\n  var segmentLen = segments.length - 1;\n  var selection = 'mediaIndex/partIndex increment';\n\n  if (segmentInfo.getMediaInfoForTime) {\n    selection = \"getMediaInfoForTime (\" + segmentInfo.getMediaInfoForTime + \")\";\n  } else if (segmentInfo.isSyncRequest) {\n    selection = 'getSyncSegmentCandidate (isSyncRequest)';\n  }\n\n  if (segmentInfo.independent) {\n    selection += \" with independent \" + segmentInfo.independent;\n  }\n\n  var hasPartIndex = typeof partIndex === 'number';\n  var name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n  var zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n    preloadSegment: segment\n  }) - 1 : 0;\n  return name + \" [\" + (seq + index) + \"/\" + (seq + segmentLen) + \"]\" + (hasPartIndex ? \" part [\" + partIndex + \"/\" + zeroBasedPartCount + \"]\" : '') + (\" segment start/end [\" + segment.start + \" => \" + segment.end + \"]\") + (hasPartIndex ? \" part start/end [\" + part.start + \" => \" + part.end + \"]\" : '') + (\" startOfSegment [\" + startOfSegment + \"]\") + (\" duration [\" + duration + \"]\") + (\" timeline [\" + timeline + \"]\") + (\" selected by [\" + selection + \"]\") + (\" playlist [\" + id + \"]\");\n};\n\nvar timingInfoPropertyForMedia = function timingInfoPropertyForMedia(mediaType) {\n  return mediaType + \"TimingInfo\";\n};\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n *        The timeline of the segment\n * @param {number} currentTimeline\n *        The timeline currently being followed by the loader\n * @param {number} startOfSegment\n *        The estimated segment start\n * @param {TimeRange[]} buffered\n *        The loader's buffer\n * @param {boolean} overrideCheck\n *        If true, no checks are made to see if the timestamp offset value should be set,\n *        but sets it directly to a value.\n *\n * @return {number|null}\n *         Either a number representing a new timestamp offset, or null if the segment is\n *         part of the same timeline\n */\n\n\nvar timestampOffsetForSegment = function timestampOffsetForSegment(_ref) {\n  var segmentTimeline = _ref.segmentTimeline,\n      currentTimeline = _ref.currentTimeline,\n      startOfSegment = _ref.startOfSegment,\n      buffered = _ref.buffered,\n      overrideCheck = _ref.overrideCheck; // Check to see if we are crossing a discontinuity to see if we need to set the\n  // timestamp offset on the transmuxer and source buffer.\n  //\n  // Previously, we changed the timestampOffset if the start of this segment was less than\n  // the currently set timestampOffset, but this isn't desirable as it can produce bad\n  // behavior, especially around long running live streams.\n\n  if (!overrideCheck && segmentTimeline === currentTimeline) {\n    return null;\n  } // When changing renditions, it's possible to request a segment on an older timeline. For\n  // instance, given two renditions with the following:\n  //\n  // #EXTINF:10\n  // segment1\n  // #EXT-X-DISCONTINUITY\n  // #EXTINF:10\n  // segment2\n  // #EXTINF:10\n  // segment3\n  //\n  // And the current player state:\n  //\n  // current time: 8\n  // buffer: 0 => 20\n  //\n  // The next segment on the current rendition would be segment3, filling the buffer from\n  // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n  // then the next segment to be requested will be segment1 from the new rendition in\n  // order to fill time 8 and onwards. Using the buffered end would result in repeated\n  // content (since it would position segment1 of the new rendition starting at 20s). This\n  // case can be identified when the new segment's timeline is a prior value. Instead of\n  // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n  // more accurate to the actual start time of the segment.\n\n\n  if (segmentTimeline < currentTimeline) {\n    return startOfSegment;\n  } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n  // value uses the end of the last segment if it is available. While this value\n  // should often be correct, it's better to rely on the buffered end, as the new\n  // content post discontinuity should line up with the buffered end as if it were\n  // time 0 for the new content.\n\n\n  return buffered.length ? buffered.end(buffered.length - 1) : startOfSegment;\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:                     ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader              ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:             ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader                      ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:           ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader            ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n *        The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n *        The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n *        The loader type\n * @param {boolean} audioDisabled\n *        Whether the audio is disabled for the loader. This should only be true when the\n *        loader may have muxed audio in its segment, but should not append it, e.g., for\n *        the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n *         Whether the loader should wait for a timeline change from the timeline change\n *         controller before processing the segment\n */\n\n\nvar shouldWaitForTimelineChange = function shouldWaitForTimelineChange(_ref2) {\n  var timelineChangeController = _ref2.timelineChangeController,\n      currentTimeline = _ref2.currentTimeline,\n      segmentTimeline = _ref2.segmentTimeline,\n      loaderType = _ref2.loaderType,\n      audioDisabled = _ref2.audioDisabled;\n\n  if (currentTimeline === segmentTimeline) {\n    return false;\n  }\n\n  if (loaderType === 'audio') {\n    var lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n      type: 'main'\n    }); // Audio loader should wait if:\n    //\n    // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n    // * main hasn't yet changed to the timeline audio is looking to load\n\n    return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n  } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n  // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n  // loader's segments (or the content is audio/video only and handled by the main\n  // loader).\n\n\n  if (loaderType === 'main' && audioDisabled) {\n    var pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n      type: 'audio'\n    }); // Main loader should wait for the audio loader if audio is not pending a timeline\n    // change to the current timeline.\n    //\n    // Since the main loader is responsible for setting the timestamp offset for both\n    // audio and video, the main loader must wait for audio to be about to change to its\n    // timeline before setting the offset, otherwise, if audio is behind in loading,\n    // segments from the previous timeline would be adjusted by the new timestamp offset.\n    //\n    // This requirement means that video will not cross a timeline until the audio is\n    // about to cross to it, so that way audio and video will always cross the timeline\n    // together.\n    //\n    // In addition to normal timeline changes, these rules also apply to the start of a\n    // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n    // that these rules apply to the first timeline change because if they did not, it's\n    // possible that the main loader will cross two timelines before the audio loader has\n    // crossed one. Logic may be implemented to handle the startup as a special case, but\n    // it's easier to simply treat all timeline changes the same.\n\n    if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n      return false;\n    }\n\n    return true;\n  }\n\n  return false;\n};\n\nvar mediaDuration = function mediaDuration(timingInfos) {\n  var maxDuration = 0;\n  ['video', 'audio'].forEach(function (type) {\n    var typeTimingInfo = timingInfos[type + \"TimingInfo\"];\n\n    if (!typeTimingInfo) {\n      return;\n    }\n\n    var start = typeTimingInfo.start,\n        end = typeTimingInfo.end;\n    var duration;\n\n    if (typeof start === 'bigint' || typeof end === 'bigint') {\n      duration = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt(end) - global_window__WEBPACK_IMPORTED_MODULE_0___default.a.BigInt(start);\n    } else if (typeof start === 'number' && typeof end === 'number') {\n      duration = end - start;\n    }\n\n    if (typeof duration !== 'undefined' && duration > maxDuration) {\n      maxDuration = duration;\n    }\n  }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n  // as we only need BigInt when we are above that.\n\n  if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n    maxDuration = Number(maxDuration);\n  }\n\n  return maxDuration;\n};\n\nvar segmentTooLong = function segmentTooLong(_ref3) {\n  var segmentDuration = _ref3.segmentDuration,\n      maxDuration = _ref3.maxDuration; // 0 duration segments are most likely due to metadata only segments or a lack of\n  // information.\n\n  if (!segmentDuration) {\n    return false;\n  } // For HLS:\n  //\n  // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n  // The EXTINF duration of each Media Segment in the Playlist\n  // file, when rounded to the nearest integer, MUST be less than or equal\n  // to the target duration; longer segments can trigger playback stalls\n  // or other errors.\n  //\n  // For DASH, the mpd-parser uses the largest reported segment duration as the target\n  // duration. Although that reported duration is occasionally approximate (i.e., not\n  // exact), a strict check may report that a segment is too long more often in DASH.\n\n\n  return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\n\nvar getTroublesomeSegmentDurationMessage = function getTroublesomeSegmentDurationMessage(segmentInfo, sourceType) {\n  // Right now we aren't following DASH's timing model exactly, so only perform\n  // this check for HLS content.\n  if (sourceType !== 'hls') {\n    return null;\n  }\n\n  var segmentDuration = mediaDuration({\n    audioTimingInfo: segmentInfo.audioTimingInfo,\n    videoTimingInfo: segmentInfo.videoTimingInfo\n  }); // Don't report if we lack information.\n  //\n  // If the segment has a duration of 0 it is either a lack of information or a\n  // metadata only segment and shouldn't be reported here.\n\n  if (!segmentDuration) {\n    return null;\n  }\n\n  var targetDuration = segmentInfo.playlist.targetDuration;\n  var isSegmentWayTooLong = segmentTooLong({\n    segmentDuration: segmentDuration,\n    maxDuration: targetDuration * 2\n  });\n  var isSegmentSlightlyTooLong = segmentTooLong({\n    segmentDuration: segmentDuration,\n    maxDuration: targetDuration\n  });\n  var segmentTooLongMessage = \"Segment with index \" + segmentInfo.mediaIndex + \" \" + (\"from playlist \" + segmentInfo.playlist.id + \" \") + (\"has a duration of \" + segmentDuration + \" \") + (\"when the reported duration is \" + segmentInfo.duration + \" \") + (\"and the target duration is \" + targetDuration + \". \") + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n\n  if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n    return {\n      severity: isSegmentWayTooLong ? 'warn' : 'info',\n      message: segmentTooLongMessage\n    };\n  }\n\n  return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\n\nvar SegmentLoader = /*#__PURE__*/function (_videojs$EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SegmentLoader, _videojs$EventTarget);\n\n  function SegmentLoader(settings, options) {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this; // check pre-conditions\n\n    if (!settings) {\n      throw new TypeError('Initialization settings are required');\n    }\n\n    if (typeof settings.currentTime !== 'function') {\n      throw new TypeError('No currentTime getter specified');\n    }\n\n    if (!settings.mediaSource) {\n      throw new TypeError('No MediaSource specified');\n    } // public properties\n\n\n    _this.bandwidth = settings.bandwidth;\n    _this.throughput = {\n      rate: 0,\n      count: 0\n    };\n    _this.roundTrip = NaN;\n\n    _this.resetStats_();\n\n    _this.mediaIndex = null;\n    _this.partIndex = null; // private settings\n\n    _this.hasPlayed_ = settings.hasPlayed;\n    _this.currentTime_ = settings.currentTime;\n    _this.seekable_ = settings.seekable;\n    _this.seeking_ = settings.seeking;\n    _this.duration_ = settings.duration;\n    _this.mediaSource_ = settings.mediaSource;\n    _this.vhs_ = settings.vhs;\n    _this.loaderType_ = settings.loaderType;\n    _this.currentMediaInfo_ = void 0;\n    _this.startingMediaInfo_ = void 0;\n    _this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n    _this.goalBufferLength_ = settings.goalBufferLength;\n    _this.sourceType_ = settings.sourceType;\n    _this.sourceUpdater_ = settings.sourceUpdater;\n    _this.inbandTextTracks_ = settings.inbandTextTracks;\n    _this.state_ = 'INIT';\n    _this.timelineChangeController_ = settings.timelineChangeController;\n    _this.shouldSaveSegmentTimingInfo_ = true;\n    _this.parse708captions_ = settings.parse708captions;\n    _this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n    _this.captionServices_ = settings.captionServices;\n    _this.experimentalExactManifestTimings = settings.experimentalExactManifestTimings; // private instance variables\n\n    _this.checkBufferTimeout_ = null;\n    _this.error_ = void 0;\n    _this.currentTimeline_ = -1;\n    _this.pendingSegment_ = null;\n    _this.xhrOptions_ = null;\n    _this.pendingSegments_ = [];\n    _this.audioDisabled_ = false;\n    _this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n    _this.gopBuffer_ = [];\n    _this.timeMapping_ = 0;\n    _this.safeAppend_ = videojs.browser.IE_VERSION >= 11;\n    _this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    _this.playlistOfLastInitSegment_ = {\n      audio: null,\n      video: null\n    };\n    _this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n    // information yet to start the loading process (e.g., if the audio loader wants to\n    // load a segment from the next timeline but the main loader hasn't yet crossed that\n    // timeline), then the load call will be added to the queue until it is ready to be\n    // processed.\n\n    _this.loadQueue_ = [];\n    _this.metadataQueue_ = {\n      id3: [],\n      caption: []\n    };\n    _this.waitingOnRemove_ = false;\n    _this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n    _this.activeInitSegmentId_ = null;\n    _this.initSegments_ = {}; // HLSe playback\n\n    _this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n    _this.keyCache_ = {};\n    _this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n    // between a time in the display time and a segment index within\n    // a playlist\n\n    _this.syncController_ = settings.syncController;\n    _this.syncPoint_ = {\n      segmentIndex: 0,\n      time: 0\n    };\n    _this.transmuxer_ = _this.createTransmuxer_();\n\n    _this.triggerSyncInfoUpdate_ = function () {\n      return _this.trigger('syncinfoupdate');\n    };\n\n    _this.syncController_.on('syncinfoupdate', _this.triggerSyncInfoUpdate_);\n\n    _this.mediaSource_.addEventListener('sourceopen', function () {\n      if (!_this.isEndOfStream_()) {\n        _this.ended_ = false;\n      }\n    }); // ...for determining the fetch location\n\n\n    _this.fetchAtBuffer_ = false;\n    _this.logger_ = logger(\"SegmentLoader[\" + _this.loaderType_ + \"]\");\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), 'state', {\n      get: function get() {\n        return this.state_;\n      },\n      set: function set(newState) {\n        if (newState !== this.state_) {\n          this.logger_(this.state_ + \" -> \" + newState);\n          this.state_ = newState;\n          this.trigger('statechange');\n        }\n      }\n    });\n\n    _this.sourceUpdater_.on('ready', function () {\n      if (_this.hasEnoughInfoToAppend_()) {\n        _this.processCallQueue_();\n      }\n    }); // Only the main loader needs to listen for pending timeline changes, as the main\n    // loader should wait for audio to be ready to change its timeline so that both main\n    // and audio timelines change together. For more details, see the\n    // shouldWaitForTimelineChange function.\n\n\n    if (_this.loaderType_ === 'main') {\n      _this.timelineChangeController_.on('pendingtimelinechange', function () {\n        if (_this.hasEnoughInfoToAppend_()) {\n          _this.processCallQueue_();\n        }\n      });\n    } // The main loader only listens on pending timeline changes, but the audio loader,\n    // since its loads follow main, needs to listen on timeline changes. For more details,\n    // see the shouldWaitForTimelineChange function.\n\n\n    if (_this.loaderType_ === 'audio') {\n      _this.timelineChangeController_.on('timelinechange', function () {\n        if (_this.hasEnoughInfoToLoad_()) {\n          _this.processLoadQueue_();\n        }\n\n        if (_this.hasEnoughInfoToAppend_()) {\n          _this.processCallQueue_();\n        }\n      });\n    }\n\n    return _this;\n  }\n\n  var _proto = SegmentLoader.prototype;\n\n  _proto.createTransmuxer_ = function createTransmuxer_() {\n    return segmentTransmuxer.createTransmuxer({\n      remux: false,\n      alignGopsAtEnd: this.safeAppend_,\n      keepOriginalTimestamps: true,\n      parse708captions: this.parse708captions_,\n      captionServices: this.captionServices_\n    });\n  }\n  /**\n   * reset all of our media stats\n   *\n   * @private\n   */\n  ;\n\n  _proto.resetStats_ = function resetStats_() {\n    this.mediaBytesTransferred = 0;\n    this.mediaRequests = 0;\n    this.mediaRequestsAborted = 0;\n    this.mediaRequestsTimedout = 0;\n    this.mediaRequestsErrored = 0;\n    this.mediaTransferDuration = 0;\n    this.mediaSecondsLoaded = 0;\n    this.mediaAppends = 0;\n  }\n  /**\n   * dispose of the SegmentLoader and reset to the default state\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.trigger('dispose');\n    this.state = 'DISPOSED';\n    this.pause();\n    this.abort_();\n\n    if (this.transmuxer_) {\n      this.transmuxer_.terminate();\n    }\n\n    this.resetStats_();\n\n    if (this.checkBufferTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\n    }\n\n    if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n      this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    }\n\n    this.off();\n  };\n\n  _proto.setAudio = function setAudio(enable) {\n    this.audioDisabled_ = !enable;\n\n    if (enable) {\n      this.appendInitSegment_.audio = true;\n    } else {\n      // remove current track audio if it gets disabled\n      this.sourceUpdater_.removeAudio(0, this.duration_());\n    }\n  }\n  /**\n   * abort anything that is currently doing on with the SegmentLoader\n   * and reset to a default state\n   */\n  ;\n\n  _proto.abort = function abort() {\n    if (this.state !== 'WAITING') {\n      if (this.pendingSegment_) {\n        this.pendingSegment_ = null;\n      }\n\n      return;\n    }\n\n    this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n    // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n    // when the request is aborted. This will prevent the loader from being stuck in the\n    // WAITING state indefinitely.\n\n    this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n    // next segment\n\n    if (!this.paused()) {\n      this.monitorBuffer_();\n    }\n  }\n  /**\n   * abort all pending xhr requests and null any pending segements\n   *\n   * @private\n   */\n  ;\n\n  _proto.abort_ = function abort_() {\n    if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n      this.pendingSegment_.abortRequests();\n    } // clear out the segment being processed\n\n\n    this.pendingSegment_ = null;\n    this.callQueue_ = [];\n    this.loadQueue_ = [];\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n    this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n    this.waitingOnRemove_ = false;\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n    this.quotaExceededErrorRetryTimeout_ = null;\n  };\n\n  _proto.checkForAbort_ = function checkForAbort_(requestId) {\n    // If the state is APPENDING, then aborts will not modify the state, meaning the first\n    // callback that happens should reset the state to READY so that loading can continue.\n    if (this.state === 'APPENDING' && !this.pendingSegment_) {\n      this.state = 'READY';\n      return true;\n    }\n\n    if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * set an error on the segment loader and null out any pending segements\n   *\n   * @param {Error} error the error to set on the SegmentLoader\n   * @return {Error} the error that was set or that is currently set\n   */\n  ;\n\n  _proto.error = function error(_error) {\n    if (typeof _error !== 'undefined') {\n      this.logger_('error occurred:', _error);\n      this.error_ = _error;\n    }\n\n    this.pendingSegment_ = null;\n    return this.error_;\n  };\n\n  _proto.endOfStream = function endOfStream() {\n    this.ended_ = true;\n\n    if (this.transmuxer_) {\n      // need to clear out any cached data to prepare for the new segment\n      segmentTransmuxer.reset(this.transmuxer_);\n    }\n\n    this.gopBuffer_.length = 0;\n    this.pause();\n    this.trigger('ended');\n  }\n  /**\n   * Indicates which time ranges are buffered\n   *\n   * @return {TimeRange}\n   *         TimeRange object representing the current buffered ranges\n   */\n  ;\n\n  _proto.buffered_ = function buffered_() {\n    var trackInfo = this.getMediaInfo_();\n\n    if (!this.sourceUpdater_ || !trackInfo) {\n      return videojs.createTimeRanges();\n    }\n\n    if (this.loaderType_ === 'main') {\n      var hasAudio = trackInfo.hasAudio,\n          hasVideo = trackInfo.hasVideo,\n          isMuxed = trackInfo.isMuxed;\n\n      if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n        return this.sourceUpdater_.buffered();\n      }\n\n      if (hasVideo) {\n        return this.sourceUpdater_.videoBuffered();\n      }\n    } // One case that can be ignored for now is audio only with alt audio,\n    // as we don't yet have proper support for that.\n\n\n    return this.sourceUpdater_.audioBuffered();\n  }\n  /**\n   * Gets and sets init segment for the provided map\n   *\n   * @param {Object} map\n   *        The map object representing the init segment to get or set\n   * @param {boolean=} set\n   *        If true, the init segment for the provided map should be saved\n   * @return {Object}\n   *         map object for desired init segment\n   */\n  ;\n\n  _proto.initSegmentForMap = function initSegmentForMap(map, set) {\n    if (set === void 0) {\n      set = false;\n    }\n\n    if (!map) {\n      return null;\n    }\n\n    var id = initSegmentId(map);\n    var storedMap = this.initSegments_[id];\n\n    if (set && !storedMap && map.bytes) {\n      this.initSegments_[id] = storedMap = {\n        resolvedUri: map.resolvedUri,\n        byterange: map.byterange,\n        bytes: map.bytes,\n        tracks: map.tracks,\n        timescales: map.timescales\n      };\n    }\n\n    return storedMap || map;\n  }\n  /**\n   * Gets and sets key for the provided key\n   *\n   * @param {Object} key\n   *        The key object representing the key to get or set\n   * @param {boolean=} set\n   *        If true, the key for the provided key should be saved\n   * @return {Object}\n   *         Key object for desired key\n   */\n  ;\n\n  _proto.segmentKey = function segmentKey(key, set) {\n    if (set === void 0) {\n      set = false;\n    }\n\n    if (!key) {\n      return null;\n    }\n\n    var id = segmentKeyId(key);\n    var storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n    if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n      this.keyCache_[id] = storedKey = {\n        resolvedUri: key.resolvedUri,\n        bytes: key.bytes\n      };\n    }\n\n    var result = {\n      resolvedUri: (storedKey || key).resolvedUri\n    };\n\n    if (storedKey) {\n      result.bytes = storedKey.bytes;\n    }\n\n    return result;\n  }\n  /**\n   * Returns true if all configuration required for loading is present, otherwise false.\n   *\n   * @return {boolean} True if the all configuration is ready for loading\n   * @private\n   */\n  ;\n\n  _proto.couldBeginLoading_ = function couldBeginLoading_() {\n    return this.playlist_ && !this.paused();\n  }\n  /**\n   * load a playlist and start to fill the buffer\n   */\n  ;\n\n  _proto.load = function load() {\n    // un-pause\n    this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n    // specified\n\n    if (!this.playlist_) {\n      return;\n    } // if all the configuration is ready, initialize and begin loading\n\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      return this.init_();\n    } // if we're in the middle of processing a segment already, don't\n    // kick off an additional segment request\n\n\n    if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n      return;\n    }\n\n    this.state = 'READY';\n  }\n  /**\n   * Once all the starting parameters have been specified, begin\n   * operation. This method should only be invoked from the INIT\n   * state.\n   *\n   * @private\n   */\n  ;\n\n  _proto.init_ = function init_() {\n    this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n    // audio data from the muxed content should be removed\n\n    this.resetEverything();\n    return this.monitorBuffer_();\n  }\n  /**\n   * set a playlist on the segment loader\n   *\n   * @param {PlaylistLoader} media the playlist to set on the segment loader\n   */\n  ;\n\n  _proto.playlist = function playlist(newPlaylist, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    if (!newPlaylist) {\n      return;\n    }\n\n    var oldPlaylist = this.playlist_;\n    var segmentInfo = this.pendingSegment_;\n    this.playlist_ = newPlaylist;\n    this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n    // is always our zero-time so force a sync update each time the playlist\n    // is refreshed from the server\n    //\n    // Use the INIT state to determine if playback has started, as the playlist sync info\n    // should be fixed once requests begin (as sync points are generated based on sync\n    // info), but not before then.\n\n    if (this.state === 'INIT') {\n      newPlaylist.syncInfo = {\n        mediaSequence: newPlaylist.mediaSequence,\n        time: 0\n      }; // Setting the date time mapping means mapping the program date time (if available)\n      // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n      // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n      // be updated as the playlist is refreshed before the loader starts loading, the\n      // program date time mapping needs to be updated as well.\n      //\n      // This mapping is only done for the main loader because a program date time should\n      // map equivalently between playlists.\n\n      if (this.loaderType_ === 'main') {\n        this.syncController_.setDateTimeMappingForStart(newPlaylist);\n      }\n    }\n\n    var oldId = null;\n\n    if (oldPlaylist) {\n      if (oldPlaylist.id) {\n        oldId = oldPlaylist.id;\n      } else if (oldPlaylist.uri) {\n        oldId = oldPlaylist.uri;\n      }\n    }\n\n    this.logger_(\"playlist update [\" + oldId + \" => \" + (newPlaylist.id || newPlaylist.uri) + \"]\"); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n    // in LIVE, we always want to update with new playlists (including refreshes)\n\n    this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n    // buffering now\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      return this.init_();\n    }\n\n    if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n      if (this.mediaIndex !== null) {\n        // we must reset/resync the segment loader when we switch renditions and\n        // the segment loader is already synced to the previous rendition\n        // on playlist changes we want it to be possible to fetch\n        // at the buffer for vod but not for live. So we use resetLoader\n        // for live and resyncLoader for vod. We want this because\n        // if a playlist uses independent and non-independent segments/parts the\n        // buffer may not accurately reflect the next segment that we should try\n        // downloading.\n        if (!newPlaylist.endList) {\n          this.resetLoader();\n        } else {\n          this.resyncLoader();\n        }\n      }\n\n      this.currentMediaInfo_ = void 0;\n      this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n      return;\n    } // we reloaded the same playlist so we are in a live scenario\n    // and we will likely need to adjust the mediaIndex\n\n\n    var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n    this.logger_(\"live window shift [\" + mediaSequenceDiff + \"]\"); // update the mediaIndex on the SegmentLoader\n    // this is important because we can abort a request and this value must be\n    // equal to the last appended mediaIndex\n\n    if (this.mediaIndex !== null) {\n      this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n      // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n      // new playlist was incremented by 1.\n\n      if (this.mediaIndex < 0) {\n        this.mediaIndex = null;\n        this.partIndex = null;\n      } else {\n        var segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n        // unless parts fell off of the playlist for this segment.\n        // In that case we need to reset partIndex and resync\n\n        if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n          var mediaIndex = this.mediaIndex;\n          this.logger_(\"currently processing part (index \" + this.partIndex + \") no longer exists.\");\n          this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n          // as the part was dropped from our current playlists segment.\n          // The mediaIndex will still be valid so keep that around.\n\n          this.mediaIndex = mediaIndex;\n        }\n      }\n    } // update the mediaIndex on the SegmentInfo object\n    // this is important because we will update this.mediaIndex with this value\n    // in `handleAppendsDone_` after the segment has been successfully appended\n\n\n    if (segmentInfo) {\n      segmentInfo.mediaIndex -= mediaSequenceDiff;\n\n      if (segmentInfo.mediaIndex < 0) {\n        segmentInfo.mediaIndex = null;\n        segmentInfo.partIndex = null;\n      } else {\n        // we need to update the referenced segment so that timing information is\n        // saved for the new playlist's segment, however, if the segment fell off the\n        // playlist, we can leave the old reference and just lose the timing info\n        if (segmentInfo.mediaIndex >= 0) {\n          segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n        }\n\n        if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n          segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n        }\n      }\n    }\n\n    this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n  }\n  /**\n   * Prevent the loader from fetching additional segments. If there\n   * is a segment request outstanding, it will finish processing\n   * before the loader halts. A segment loader can be unpaused by\n   * calling load().\n   */\n  ;\n\n  _proto.pause = function pause() {\n    if (this.checkBufferTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\n      this.checkBufferTimeout_ = null;\n    }\n  }\n  /**\n   * Returns whether the segment loader is fetching additional\n   * segments when given the opportunity. This property can be\n   * modified through calls to pause() and load().\n   */\n  ;\n\n  _proto.paused = function paused() {\n    return this.checkBufferTimeout_ === null;\n  }\n  /**\n   * Delete all the buffered data and reset the SegmentLoader\n   *\n   * @param {Function} [done] an optional callback to be executed when the remove\n   * operation is complete\n   */\n  ;\n\n  _proto.resetEverything = function resetEverything(done) {\n    this.ended_ = false;\n    this.activeInitSegmentId_ = null;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n    // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n    // we then clamp the value to duration if necessary.\n\n    this.remove(0, Infinity, done); // clears fmp4 captions\n\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearAllMp4Captions'\n      }); // reset the cache in the transmuxer\n\n      this.transmuxer_.postMessage({\n        action: 'reset'\n      });\n    }\n  }\n  /**\n   * Force the SegmentLoader to resync and start loading around the currentTime instead\n   * of starting at the end of the buffer\n   *\n   * Useful for fast quality changes\n   */\n  ;\n\n  _proto.resetLoader = function resetLoader() {\n    this.fetchAtBuffer_ = false;\n    this.resyncLoader();\n  }\n  /**\n   * Force the SegmentLoader to restart synchronization and make a conservative guess\n   * before returning to the simple walk-forward method\n   */\n  ;\n\n  _proto.resyncLoader = function resyncLoader() {\n    if (this.transmuxer_) {\n      // need to clear out any cached data to prepare for the new segment\n      segmentTransmuxer.reset(this.transmuxer_);\n    }\n\n    this.mediaIndex = null;\n    this.partIndex = null;\n    this.syncPoint_ = null;\n    this.isPendingTimestampOffset_ = false;\n    this.callQueue_ = [];\n    this.loadQueue_ = [];\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n    this.abort();\n\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearParsedMp4Captions'\n      });\n    }\n  }\n  /**\n   * Remove any data in the source buffer between start and end times\n   *\n   * @param {number} start - the start time of the region to remove from the buffer\n   * @param {number} end - the end time of the region to remove from the buffer\n   * @param {Function} [done] - an optional callback to be executed when the remove\n   * @param {boolean} force - force all remove operations to happen\n   * operation is complete\n   */\n  ;\n\n  _proto.remove = function remove(start, end, done, force) {\n    if (done === void 0) {\n      done = function done() {};\n    }\n\n    if (force === void 0) {\n      force = false;\n    } // clamp end to duration if we need to remove everything.\n    // This is due to a browser bug that causes issues if we remove to Infinity.\n    // videojs/videojs-contrib-hls#1225\n\n\n    if (end === Infinity) {\n      end = this.duration_();\n    } // skip removes that would throw an error\n    // commonly happens during a rendition switch at the start of a video\n    // from start 0 to end 0\n\n\n    if (end <= start) {\n      this.logger_('skipping remove because end ${end} is <= start ${start}');\n      return;\n    }\n\n    if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n      this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n      return;\n    } // set it to one to complete this function's removes\n\n\n    var removesRemaining = 1;\n\n    var removeFinished = function removeFinished() {\n      removesRemaining--;\n\n      if (removesRemaining === 0) {\n        done();\n      }\n    };\n\n    if (force || !this.audioDisabled_) {\n      removesRemaining++;\n      this.sourceUpdater_.removeAudio(start, end, removeFinished);\n    } // While it would be better to only remove video if the main loader has video, this\n    // should be safe with audio only as removeVideo will call back even if there's no\n    // video buffer.\n    //\n    // In theory we can check to see if there's video before calling the remove, but in\n    // the event that we're switching between renditions and from video to audio only\n    // (when we add support for that), we may need to clear the video contents despite\n    // what the new media will contain.\n\n\n    if (force || this.loaderType_ === 'main') {\n      this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n      removesRemaining++;\n      this.sourceUpdater_.removeVideo(start, end, removeFinished);\n    } // remove any captions and ID3 tags\n\n\n    for (var track in this.inbandTextTracks_) {\n      removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n    }\n\n    removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n    removeFinished();\n  }\n  /**\n   * (re-)schedule monitorBufferTick_ to run as soon as possible\n   *\n   * @private\n   */\n  ;\n\n  _proto.monitorBuffer_ = function monitorBuffer_() {\n    if (this.checkBufferTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\n    }\n\n    this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), 1);\n  }\n  /**\n   * As long as the SegmentLoader is in the READY state, periodically\n   * invoke fillBuffer_().\n   *\n   * @private\n   */\n  ;\n\n  _proto.monitorBufferTick_ = function monitorBufferTick_() {\n    if (this.state === 'READY') {\n      this.fillBuffer_();\n    }\n\n    if (this.checkBufferTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\n    }\n\n    this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n  }\n  /**\n   * fill the buffer with segements unless the sourceBuffers are\n   * currently updating\n   *\n   * Note: this function should only ever be called by monitorBuffer_\n   * and never directly\n   *\n   * @private\n   */\n  ;\n\n  _proto.fillBuffer_ = function fillBuffer_() {\n    // TODO since the source buffer maintains a queue, and we shouldn't call this function\n    // except when we're ready for the next segment, this check can most likely be removed\n    if (this.sourceUpdater_.updating()) {\n      return;\n    } // see if we need to begin loading immediately\n\n\n    var segmentInfo = this.chooseNextRequest_();\n\n    if (!segmentInfo) {\n      return;\n    }\n\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      this.isPendingTimestampOffset_ = false;\n      this.timelineChangeController_.pendingTimelineChange({\n        type: this.loaderType_,\n        from: this.currentTimeline_,\n        to: segmentInfo.timeline\n      });\n    }\n\n    this.loadSegment_(segmentInfo);\n  }\n  /**\n   * Determines if we should call endOfStream on the media source based\n   * on the state of the buffer or if appened segment was the final\n   * segment in the playlist.\n   *\n   * @param {number} [mediaIndex] the media index of segment we last appended\n   * @param {Object} [playlist] a media playlist object\n   * @return {boolean} do we need to call endOfStream on the MediaSource\n   */\n  ;\n\n  _proto.isEndOfStream_ = function isEndOfStream_(mediaIndex, playlist, partIndex) {\n    if (mediaIndex === void 0) {\n      mediaIndex = this.mediaIndex;\n    }\n\n    if (playlist === void 0) {\n      playlist = this.playlist_;\n    }\n\n    if (partIndex === void 0) {\n      partIndex = this.partIndex;\n    }\n\n    if (!playlist || !this.mediaSource_) {\n      return false;\n    }\n\n    var segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n    var appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n    var appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n    // so that MediaSources can trigger the `ended` event when it runs out of\n    // buffered data instead of waiting for me\n\n    return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n  }\n  /**\n   * Determines what request should be made given current segment loader state.\n   *\n   * @return {Object} a request object that describes the segment/part to load\n   */\n  ;\n\n  _proto.chooseNextRequest_ = function chooseNextRequest_() {\n    var buffered = this.buffered_();\n    var bufferedEnd = lastBufferedEnd(buffered) || 0;\n    var bufferedTime = timeAheadOf(buffered, this.currentTime_());\n    var preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n    var haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n    var segments = this.playlist_.segments; // return no segment if:\n    // 1. we don't have segments\n    // 2. The video has not yet played and we already downloaded a segment\n    // 3. we already have enough buffered time\n\n    if (!segments.length || preloaded || haveEnoughBuffer) {\n      return null;\n    }\n\n    this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n    var next = {\n      partIndex: null,\n      mediaIndex: null,\n      startOfSegment: null,\n      playlist: this.playlist_,\n      isSyncRequest: Boolean(!this.syncPoint_)\n    };\n\n    if (next.isSyncRequest) {\n      next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n    } else if (this.mediaIndex !== null) {\n      var segment = segments[this.mediaIndex];\n      var partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n      next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n\n      if (segment.parts && segment.parts[partIndex + 1]) {\n        next.mediaIndex = this.mediaIndex;\n        next.partIndex = partIndex + 1;\n      } else {\n        next.mediaIndex = this.mediaIndex + 1;\n      }\n    } else {\n      // Find the segment containing the end of the buffer or current time.\n      var _Playlist$getMediaInf = Playlist.getMediaInfoForTime({\n        experimentalExactManifestTimings: this.experimentalExactManifestTimings,\n        playlist: this.playlist_,\n        currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n        startingPartIndex: this.syncPoint_.partIndex,\n        startingSegmentIndex: this.syncPoint_.segmentIndex,\n        startTime: this.syncPoint_.time\n      }),\n          segmentIndex = _Playlist$getMediaInf.segmentIndex,\n          startTime = _Playlist$getMediaInf.startTime,\n          _partIndex = _Playlist$getMediaInf.partIndex;\n\n      next.getMediaInfoForTime = this.fetchAtBuffer_ ? \"bufferedEnd \" + bufferedEnd : \"currentTime \" + this.currentTime_();\n      next.mediaIndex = segmentIndex;\n      next.startOfSegment = startTime;\n      next.partIndex = _partIndex;\n    }\n\n    var nextSegment = segments[next.mediaIndex];\n    var nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n    // the next partIndex is invalid do not choose a next segment.\n\n    if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n      return null;\n    } // if the next segment has parts, and we don't have a partIndex.\n    // Set partIndex to 0\n\n\n    if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n      next.partIndex = 0;\n      nextPart = nextSegment.parts[0];\n    } // if we have no buffered data then we need to make sure\n    // that the next part we append is \"independent\" if possible.\n    // So we check if the previous part is independent, and request\n    // it if it is.\n\n\n    if (!bufferedTime && nextPart && !nextPart.independent) {\n      if (next.partIndex === 0) {\n        var lastSegment = segments[next.mediaIndex - 1];\n        var lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n\n        if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n          next.mediaIndex -= 1;\n          next.partIndex = lastSegment.parts.length - 1;\n          next.independent = 'previous segment';\n        }\n      } else if (nextSegment.parts[next.partIndex - 1].independent) {\n        next.partIndex -= 1;\n        next.independent = 'previous part';\n      }\n    }\n\n    var ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n    // 1. this is the last segment in the playlist\n    // 2. end of stream has been called on the media source already\n    // 3. the player is not seeking\n\n    if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n      return null;\n    }\n\n    return this.generateSegmentInfo_(next);\n  };\n\n  _proto.generateSegmentInfo_ = function generateSegmentInfo_(options) {\n    var independent = options.independent,\n        playlist = options.playlist,\n        mediaIndex = options.mediaIndex,\n        startOfSegment = options.startOfSegment,\n        isSyncRequest = options.isSyncRequest,\n        partIndex = options.partIndex,\n        forceTimestampOffset = options.forceTimestampOffset,\n        getMediaInfoForTime = options.getMediaInfoForTime;\n    var segment = playlist.segments[mediaIndex];\n    var part = typeof partIndex === 'number' && segment.parts[partIndex];\n    var segmentInfo = {\n      requestId: 'segment-loader-' + Math.random(),\n      // resolve the segment URL relative to the playlist\n      uri: part && part.resolvedUri || segment.resolvedUri,\n      // the segment's mediaIndex at the time it was requested\n      mediaIndex: mediaIndex,\n      partIndex: part ? partIndex : null,\n      // whether or not to update the SegmentLoader's state with this\n      // segment's mediaIndex\n      isSyncRequest: isSyncRequest,\n      startOfSegment: startOfSegment,\n      // the segment's playlist\n      playlist: playlist,\n      // unencrypted bytes of the segment\n      bytes: null,\n      // when a key is defined for this segment, the encrypted bytes\n      encryptedBytes: null,\n      // The target timestampOffset for this segment when we append it\n      // to the source buffer\n      timestampOffset: null,\n      // The timeline that the segment is in\n      timeline: segment.timeline,\n      // The expected duration of the segment in seconds\n      duration: part && part.duration || segment.duration,\n      // retain the segment in case the playlist updates while doing an async process\n      segment: segment,\n      part: part,\n      byteLength: 0,\n      transmuxer: this.transmuxer_,\n      // type of getMediaInfoForTime that was used to get this segment\n      getMediaInfoForTime: getMediaInfoForTime,\n      independent: independent\n    };\n    var overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n    segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n      segmentTimeline: segment.timeline,\n      currentTimeline: this.currentTimeline_,\n      startOfSegment: startOfSegment,\n      buffered: this.buffered_(),\n      overrideCheck: overrideCheck\n    });\n    var audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n\n    if (typeof audioBufferedEnd === 'number') {\n      // since the transmuxer is using the actual timing values, but the buffer is\n      // adjusted by the timestamp offset, we must adjust the value here\n      segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n    }\n\n    if (this.sourceUpdater_.videoBuffered().length) {\n      segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_, // since the transmuxer is using the actual timing values, but the time is\n      // adjusted by the timestmap offset, we must adjust the value here\n      this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n    }\n\n    return segmentInfo;\n  } // get the timestampoffset for a segment,\n  // added so that vtt segment loader can override and prevent\n  // adding timestamp offsets.\n  ;\n\n  _proto.timestampOffsetForSegment_ = function timestampOffsetForSegment_(options) {\n    return timestampOffsetForSegment(options);\n  }\n  /**\n   * Determines if the network has enough bandwidth to complete the current segment\n   * request in a timely manner. If not, the request will be aborted early and bandwidth\n   * updated to trigger a playlist switch.\n   *\n   * @param {Object} stats\n   *        Object containing stats about the request timing and size\n   * @private\n   */\n  ;\n\n  _proto.earlyAbortWhenNeeded_ = function earlyAbortWhenNeeded_(stats) {\n    if (this.vhs_.tech_.paused() || // Don't abort if the current playlist is on the lowestEnabledRendition\n    // TODO: Replace using timeout with a boolean indicating whether this playlist is\n    //       the lowestEnabledRendition.\n    !this.xhrOptions_.timeout || // Don't abort if we have no bandwidth information to estimate segment sizes\n    !this.playlist_.attributes.BANDWIDTH) {\n      return;\n    } // Wait at least 1 second since the first byte of data has been received before\n    // using the calculated bandwidth from the progress event to allow the bitrate\n    // to stabilize\n\n\n    if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n      return;\n    }\n\n    var currentTime = this.currentTime_();\n    var measuredBandwidth = stats.bandwidth;\n    var segmentDuration = this.pendingSegment_.duration;\n    var requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n    // if we are only left with less than 1 second when the request completes.\n    // A negative timeUntilRebuffering indicates we are already rebuffering\n\n    var timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n    // is larger than the estimated time until the player runs out of forward buffer\n\n    if (requestTimeRemaining <= timeUntilRebuffer$1) {\n      return;\n    }\n\n    var switchCandidate = minRebufferMaxBandwidthSelector({\n      master: this.vhs_.playlists.master,\n      currentTime: currentTime,\n      bandwidth: measuredBandwidth,\n      duration: this.duration_(),\n      segmentDuration: segmentDuration,\n      timeUntilRebuffer: timeUntilRebuffer$1,\n      currentTimeline: this.currentTimeline_,\n      syncController: this.syncController_\n    });\n\n    if (!switchCandidate) {\n      return;\n    }\n\n    var rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n    var timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n    var minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n    // potential round trip time of the new request so that we are not too aggressive\n    // with switching to a playlist that might save us a fraction of a second.\n\n    if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n      minimumTimeSaving = 1;\n    }\n\n    if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n      return;\n    } // set the bandwidth to that of the desired playlist being sure to scale by\n    // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n    // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n\n    this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n    this.trigger('earlyabort');\n  };\n\n  _proto.handleAbort_ = function handleAbort_(segmentInfo) {\n    this.logger_(\"Aborting \" + segmentInfoString(segmentInfo));\n    this.mediaRequestsAborted += 1;\n  }\n  /**\n   * XHR `progress` event handler\n   *\n   * @param {Event}\n   *        The XHR `progress` event\n   * @param {Object} simpleSegment\n   *        A simplified segment object copy\n   * @private\n   */\n  ;\n\n  _proto.handleProgress_ = function handleProgress_(event, simpleSegment) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    this.trigger('progress');\n  };\n\n  _proto.handleTrackInfo_ = function handleTrackInfo_(simpleSegment, trackInfo) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    if (this.checkForIllegalMediaSwitch(trackInfo)) {\n      return;\n    }\n\n    trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n    // Guard against cases where we're not getting track info at all until we are\n    // certain that all streams will provide it.\n\n    if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n      this.startingMediaInfo_ = trackInfo;\n      this.currentMediaInfo_ = trackInfo;\n      this.logger_('trackinfo update', trackInfo);\n      this.trigger('trackinfo');\n    } // trackinfo may cause an abort if the trackinfo\n    // causes a codec change to an unsupported codec.\n\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // set trackinfo on the pending segment so that\n    // it can append.\n\n\n    this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    }\n  };\n\n  _proto.handleTimingInfo_ = function handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_;\n    var timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n    segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n    segmentInfo[timingInfoProperty][timeType] = time;\n    this.logger_(\"timinginfo: \" + mediaType + \" - \" + timeType + \" - \" + time); // check if any calls were waiting on the timing info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    }\n  };\n\n  _proto.handleCaptions_ = function handleCaptions_(simpleSegment, captionData) {\n    var _this2 = this;\n\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // This could only happen with fmp4 segments, but\n    // should still not happen in general\n\n\n    if (captionData.length === 0) {\n      this.logger_('SegmentLoader received no captions from a caption event');\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n    // can be adjusted by the timestamp offset\n\n    if (!segmentInfo.hasAppendedData_) {\n      this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n      return;\n    }\n\n    var timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    var captionTracks = {}; // get total start/end and captions for each track/stream\n\n    captionData.forEach(function (caption) {\n      // caption.stream is actually a track name...\n      // set to the existing values in tracks or default values\n      captionTracks[caption.stream] = captionTracks[caption.stream] || {\n        // Infinity, as any other value will be less than this\n        startTime: Infinity,\n        captions: [],\n        // 0 as an other value will be more than this\n        endTime: 0\n      };\n      var captionTrack = captionTracks[caption.stream];\n      captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n      captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n      captionTrack.captions.push(caption);\n    });\n    Object.keys(captionTracks).forEach(function (trackName) {\n      var _captionTracks$trackN = captionTracks[trackName],\n          startTime = _captionTracks$trackN.startTime,\n          endTime = _captionTracks$trackN.endTime,\n          captions = _captionTracks$trackN.captions;\n      var inbandTextTracks = _this2.inbandTextTracks_;\n\n      _this2.logger_(\"adding cues from \" + startTime + \" -> \" + endTime + \" for \" + trackName);\n\n      createCaptionsTrackIfNotExists(inbandTextTracks, _this2.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n      // We do this because a rendition change that also changes the timescale for captions\n      // will result in captions being re-parsed for certain segments. If we add them again\n      // without clearing we will have two of the same captions visible.\n\n      removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n      addCaptionData({\n        captionArray: captions,\n        inbandTextTracks: inbandTextTracks,\n        timestampOffset: timestampOffset\n      });\n    }); // Reset stored captions since we added parsed\n    // captions to a text track at this point\n\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearParsedMp4Captions'\n      });\n    }\n  };\n\n  _proto.handleId3_ = function handleId3_(simpleSegment, id3Frames, dispatchType) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n    if (!segmentInfo.hasAppendedData_) {\n      this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n      return;\n    }\n\n    var timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n    // audio/video source with a metadata track, and an alt audio with a metadata track.\n    // However, this probably won't happen, and if it does it can be handled then.\n\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.vhs_.tech_);\n    addMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      metadataArray: id3Frames,\n      timestampOffset: timestampOffset,\n      videoDuration: this.duration_()\n    });\n  };\n\n  _proto.processMetadataQueue_ = function processMetadataQueue_() {\n    this.metadataQueue_.id3.forEach(function (fn) {\n      return fn();\n    });\n    this.metadataQueue_.caption.forEach(function (fn) {\n      return fn();\n    });\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n  };\n\n  _proto.processCallQueue_ = function processCallQueue_() {\n    var callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n    // functions may check the length of the load queue and default to pushing themselves\n    // back onto the queue.\n\n    this.callQueue_ = [];\n    callQueue.forEach(function (fun) {\n      return fun();\n    });\n  };\n\n  _proto.processLoadQueue_ = function processLoadQueue_() {\n    var loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n    // functions may check the length of the load queue and default to pushing themselves\n    // back onto the queue.\n\n    this.loadQueue_ = [];\n    loadQueue.forEach(function (fun) {\n      return fun();\n    });\n  }\n  /**\n   * Determines whether the loader has enough info to load the next segment.\n   *\n   * @return {boolean}\n   *         Whether or not the loader has enough info to load the next segment\n   */\n  ;\n\n  _proto.hasEnoughInfoToLoad_ = function hasEnoughInfoToLoad_() {\n    // Since primary timing goes by video, only the audio loader potentially needs to wait\n    // to load.\n    if (this.loaderType_ !== 'audio') {\n      return true;\n    }\n\n    var segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n    // enough info to load.\n\n    if (!segmentInfo) {\n      return false;\n    } // The first segment can and should be loaded immediately so that source buffers are\n    // created together (before appending). Source buffer creation uses the presence of\n    // audio and video data to determine whether to create audio/video source buffers, and\n    // uses processed (transmuxed or parsed) media to determine the types required.\n\n\n    if (!this.getCurrentMediaInfo_()) {\n      return true;\n    }\n\n    if ( // Technically, instead of waiting to load a segment on timeline changes, a segment\n    // can be requested and downloaded and only wait before it is transmuxed or parsed.\n    // But in practice, there are a few reasons why it is better to wait until a loader\n    // is ready to append that segment before requesting and downloading:\n    //\n    // 1. Because audio and main loaders cross discontinuities together, if this loader\n    //    is waiting for the other to catch up, then instead of requesting another\n    //    segment and using up more bandwidth, by not yet loading, more bandwidth is\n    //    allotted to the loader currently behind.\n    // 2. media-segment-request doesn't have to have logic to consider whether a segment\n    // is ready to be processed or not, isolating the queueing behavior to the loader.\n    // 3. The audio loader bases some of its segment properties on timing information\n    //    provided by the main loader, meaning that, if the logic for waiting on\n    //    processing was in media-segment-request, then it would also need to know how\n    //    to re-generate the segment information after the main loader caught up.\n    shouldWaitForTimelineChange({\n      timelineChangeController: this.timelineChangeController_,\n      currentTimeline: this.currentTimeline_,\n      segmentTimeline: segmentInfo.timeline,\n      loaderType: this.loaderType_,\n      audioDisabled: this.audioDisabled_\n    })) {\n      return false;\n    }\n\n    return true;\n  };\n\n  _proto.getCurrentMediaInfo_ = function getCurrentMediaInfo_(segmentInfo) {\n    if (segmentInfo === void 0) {\n      segmentInfo = this.pendingSegment_;\n    }\n\n    return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n  };\n\n  _proto.getMediaInfo_ = function getMediaInfo_(segmentInfo) {\n    if (segmentInfo === void 0) {\n      segmentInfo = this.pendingSegment_;\n    }\n\n    return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n  };\n\n  _proto.getPendingSegmentPlaylist = function getPendingSegmentPlaylist() {\n    return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n  };\n\n  _proto.hasEnoughInfoToAppend_ = function hasEnoughInfoToAppend_() {\n    if (!this.sourceUpdater_.ready()) {\n      return false;\n    } // If content needs to be removed or the loader is waiting on an append reattempt,\n    // then no additional content should be appended until the prior append is resolved.\n\n\n    if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n      return false;\n    }\n\n    var segmentInfo = this.pendingSegment_;\n    var trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n    // we do not have information on this specific\n    // segment yet\n\n    if (!segmentInfo || !trackInfo) {\n      return false;\n    }\n\n    var hasAudio = trackInfo.hasAudio,\n        hasVideo = trackInfo.hasVideo,\n        isMuxed = trackInfo.isMuxed;\n\n    if (hasVideo && !segmentInfo.videoTimingInfo) {\n      return false;\n    } // muxed content only relies on video timing information for now.\n\n\n    if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n      return false;\n    }\n\n    if (shouldWaitForTimelineChange({\n      timelineChangeController: this.timelineChangeController_,\n      currentTimeline: this.currentTimeline_,\n      segmentTimeline: segmentInfo.timeline,\n      loaderType: this.loaderType_,\n      audioDisabled: this.audioDisabled_\n    })) {\n      return false;\n    }\n\n    return true;\n  };\n\n  _proto.handleData_ = function handleData_(simpleSegment, result) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // If there's anything in the call queue, then this data came later and should be\n    // executed after the calls currently queued.\n\n\n    if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n      this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n    this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n    this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n    // logic may change behavior depending on the state, and changing state too early may\n    // inflate our estimates of bandwidth. In the future this should be re-examined to\n    // note more granular states.\n    // don't process and append data if the mediaSource is closed\n\n    if (this.mediaSource_.readyState === 'closed') {\n      return;\n    } // if this request included an initialization segment, save that data\n    // to the initSegment cache\n\n\n    if (simpleSegment.map) {\n      simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n      segmentInfo.segment.map = simpleSegment.map;\n    } // if this request included a segment key, save that data in the cache\n\n\n    if (simpleSegment.key) {\n      this.segmentKey(simpleSegment.key, true);\n    }\n\n    segmentInfo.isFmp4 = simpleSegment.isFmp4;\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n\n    if (segmentInfo.isFmp4) {\n      this.trigger('fmp4');\n      segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n    } else {\n      var trackInfo = this.getCurrentMediaInfo_();\n      var useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      var firstVideoFrameTimeForData;\n\n      if (useVideoTimingInfo) {\n        firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n      } // Segment loader knows more about segment timing than the transmuxer (in certain\n      // aspects), so make any changes required for a more accurate start time.\n      // Don't set the end time yet, as the segment may not be finished processing.\n\n\n      segmentInfo.timingInfo.start = this.trueSegmentStart_({\n        currentStart: segmentInfo.timingInfo.start,\n        playlist: segmentInfo.playlist,\n        mediaIndex: segmentInfo.mediaIndex,\n        currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n        useVideoTimingInfo: useVideoTimingInfo,\n        firstVideoFrameTimeForData: firstVideoFrameTimeForData,\n        videoTimingInfo: segmentInfo.videoTimingInfo,\n        audioTimingInfo: segmentInfo.audioTimingInfo\n      });\n    } // Init segments for audio and video only need to be appended in certain cases. Now\n    // that data is about to be appended, we can check the final cases to determine\n    // whether we should append an init segment.\n\n\n    this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n    // as we use the start of the segment to offset the best guess (playlist provided)\n    // timestamp offset.\n\n    this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n    // be appended or not.\n\n    if (segmentInfo.isSyncRequest) {\n      // first save/update our timing info for this segment.\n      // this is what allows us to choose an accurate segment\n      // and the main reason we make a sync request.\n      this.updateTimingInfoEnd_(segmentInfo);\n      this.syncController_.saveSegmentTimingInfo({\n        segmentInfo: segmentInfo,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n      var next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n      // after taking into account its timing info, do not append it.\n\n      if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n        this.logger_('sync segment was incorrect, not appending');\n        return;\n      } // otherwise append it like any other segment as our guess was correct.\n\n\n      this.logger_('sync segment was correct, appending');\n    } // Save some state so that in the future anything waiting on first append (and/or\n    // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n    // we need some notion of whether the timestamp offset or other relevant information\n    // has had a chance to be set.\n\n\n    segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n    this.processMetadataQueue_();\n    this.appendData_(segmentInfo, result);\n  };\n\n  _proto.updateAppendInitSegmentStatus = function updateAppendInitSegmentStatus(segmentInfo, type) {\n    // alt audio doesn't manage timestamp offset\n    if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' && // in the case that we're handling partial data, we don't want to append an init\n    // segment for each chunk\n    !segmentInfo.changedTimestampOffset) {\n      // if the timestamp offset changed, the timeline may have changed, so we have to re-\n      // append init segments\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n    }\n\n    if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n      // make sure we append init segment on playlist changes, in case the media config\n      // changed\n      this.appendInitSegment_[type] = true;\n    }\n  };\n\n  _proto.getInitSegmentAndUpdateState_ = function getInitSegmentAndUpdateState_(_ref4) {\n    var type = _ref4.type,\n        initSegment = _ref4.initSegment,\n        map = _ref4.map,\n        playlist = _ref4.playlist; // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n    // (Section 3) required to parse the applicable Media Segments.  It applies to every\n    // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n    // or until the end of the playlist.\"\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n\n    if (map) {\n      var id = initSegmentId(map);\n\n      if (this.activeInitSegmentId_ === id) {\n        // don't need to re-append the init segment if the ID matches\n        return null;\n      } // a map-specified init segment takes priority over any transmuxed (or otherwise\n      // obtained) init segment\n      //\n      // this also caches the init segment for later use\n\n\n      initSegment = this.initSegmentForMap(map, true).bytes;\n      this.activeInitSegmentId_ = id;\n    } // We used to always prepend init segments for video, however, that shouldn't be\n    // necessary. Instead, we should only append on changes, similar to what we've always\n    // done for audio. This is more important (though may not be that important) for\n    // frame-by-frame appending for LHLS, simply because of the increased quantity of\n    // appends.\n\n\n    if (initSegment && this.appendInitSegment_[type]) {\n      // Make sure we track the playlist that we last used for the init segment, so that\n      // we can re-append the init segment in the event that we get data from a new\n      // playlist. Discontinuities and track changes are handled in other sections.\n      this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n      this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n      // we are appending the muxer init segment\n\n      this.activeInitSegmentId_ = null;\n      return initSegment;\n    }\n\n    return null;\n  };\n\n  _proto.handleQuotaExceededError_ = function handleQuotaExceededError_(_ref5, error) {\n    var _this3 = this;\n\n    var segmentInfo = _ref5.segmentInfo,\n        type = _ref5.type,\n        bytes = _ref5.bytes;\n    var audioBuffered = this.sourceUpdater_.audioBuffered();\n    var videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n    // should be cleared out during the buffer removals. However, log in case it helps\n    // debug.\n\n    if (audioBuffered.length > 1) {\n      this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n    }\n\n    if (videoBuffered.length > 1) {\n      this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n    }\n\n    var audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n    var audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n    var videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n    var videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n\n    if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n      // Can't remove enough buffer to make room for new segment (or the browser doesn't\n      // allow for appends of segments this size). In the future, it may be possible to\n      // split up the segment and append in pieces, but for now, error out this playlist\n      // in an attempt to switch to a more manageable rendition.\n      this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + (\"Appended byte length: \" + bytes.byteLength + \", \") + (\"audio buffer: \" + timeRangesToArray(audioBuffered).join(', ') + \", \") + (\"video buffer: \" + timeRangesToArray(videoBuffered).join(', ') + \", \"));\n      this.error({\n        message: 'Quota exceeded error with append of a single segment of content',\n        excludeUntil: Infinity\n      });\n      this.trigger('error');\n      return;\n    } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n    // that the segment-loader should block on future events until this one is handled, so\n    // that it doesn't keep moving onto further segments. Adding the call to the call\n    // queue will prevent further appends until waitingOnRemove_ and\n    // quotaExceededErrorRetryTimeout_ are cleared.\n    //\n    // Note that this will only block the current loader. In the case of demuxed content,\n    // the other load may keep filling as fast as possible. In practice, this should be\n    // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n    // source buffer, or video fills without enough room for audio to append (and without\n    // the availability of clearing out seconds of back buffer to make room for audio).\n    // But it might still be good to handle this case in the future as a TODO.\n\n\n    this.waitingOnRemove_ = true;\n    this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n      segmentInfo: segmentInfo,\n      type: type,\n      bytes: bytes\n    }));\n    var currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n    // before retrying.\n\n    var timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n    this.logger_(\"On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to \" + timeToRemoveUntil);\n    this.remove(0, timeToRemoveUntil, function () {\n      _this3.logger_(\"On QUOTA_EXCEEDED_ERR, retrying append in \" + MIN_BACK_BUFFER + \"s\");\n\n      _this3.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n      // attempts (since we can't clear less than the minimum)\n\n      _this3.quotaExceededErrorRetryTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\n        _this3.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n\n        _this3.quotaExceededErrorRetryTimeout_ = null;\n\n        _this3.processCallQueue_();\n      }, MIN_BACK_BUFFER * 1000);\n    }, true);\n  };\n\n  _proto.handleAppendError_ = function handleAppendError_(_ref6, error) {\n    var segmentInfo = _ref6.segmentInfo,\n        type = _ref6.type,\n        bytes = _ref6.bytes; // if there's no error, nothing to do\n\n    if (!error) {\n      return;\n    }\n\n    if (error.code === QUOTA_EXCEEDED_ERR) {\n      this.handleQuotaExceededError_({\n        segmentInfo: segmentInfo,\n        type: type,\n        bytes: bytes\n      }); // A quota exceeded error should be recoverable with a future re-append, so no need\n      // to trigger an append error.\n\n      return;\n    }\n\n    this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n    this.error(type + \" append of \" + bytes.length + \"b failed for segment \" + (\"#\" + segmentInfo.mediaIndex + \" in playlist \" + segmentInfo.playlist.id)); // If an append errors, we often can't recover.\n    // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n    //\n    // Trigger a special error so that it can be handled separately from normal,\n    // recoverable errors.\n\n    this.trigger('appenderror');\n  };\n\n  _proto.appendToSourceBuffer_ = function appendToSourceBuffer_(_ref7) {\n    var segmentInfo = _ref7.segmentInfo,\n        type = _ref7.type,\n        initSegment = _ref7.initSegment,\n        data = _ref7.data,\n        bytes = _ref7.bytes; // If this is a re-append, bytes were already created and don't need to be recreated\n\n    if (!bytes) {\n      var segments = [data];\n      var byteLength = data.byteLength;\n\n      if (initSegment) {\n        // if the media initialization segment is changing, append it before the content\n        // segment\n        segments.unshift(initSegment);\n        byteLength += initSegment.byteLength;\n      } // Technically we should be OK appending the init segment separately, however, we\n      // haven't yet tested that, and prepending is how we have always done things.\n\n\n      bytes = concatSegments({\n        bytes: byteLength,\n        segments: segments\n      });\n    }\n\n    this.sourceUpdater_.appendBuffer({\n      segmentInfo: segmentInfo,\n      type: type,\n      bytes: bytes\n    }, this.handleAppendError_.bind(this, {\n      segmentInfo: segmentInfo,\n      type: type,\n      bytes: bytes\n    }));\n  };\n\n  _proto.handleSegmentTimingInfo_ = function handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n    if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n      return;\n    }\n\n    var segment = this.pendingSegment_.segment;\n    var timingInfoProperty = type + \"TimingInfo\";\n\n    if (!segment[timingInfoProperty]) {\n      segment[timingInfoProperty] = {};\n    }\n\n    segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n    segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n    segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n    segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n    segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n    segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n  };\n\n  _proto.appendData_ = function appendData_(segmentInfo, result) {\n    var type = result.type,\n        data = result.data;\n\n    if (!data || !data.byteLength) {\n      return;\n    }\n\n    if (type === 'audio' && this.audioDisabled_) {\n      return;\n    }\n\n    var initSegment = this.getInitSegmentAndUpdateState_({\n      type: type,\n      initSegment: result.initSegment,\n      playlist: segmentInfo.playlist,\n      map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n    });\n    this.appendToSourceBuffer_({\n      segmentInfo: segmentInfo,\n      type: type,\n      initSegment: initSegment,\n      data: data\n    });\n  }\n  /**\n   * load a specific segment from a request into the buffer\n   *\n   * @private\n   */\n  ;\n\n  _proto.loadSegment_ = function loadSegment_(segmentInfo) {\n    var _this4 = this;\n\n    this.state = 'WAITING';\n    this.pendingSegment_ = segmentInfo;\n    this.trimBackBuffer_(segmentInfo);\n\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearAllMp4Captions'\n        });\n      }\n    }\n\n    if (!this.hasEnoughInfoToLoad_()) {\n      this.loadQueue_.push(function () {\n        // regenerate the audioAppendStart, timestampOffset, etc as they\n        // may have changed since this function was added to the queue.\n        var options = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, segmentInfo, {\n          forceTimestampOffset: true\n        });\n\n        _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()(segmentInfo, _this4.generateSegmentInfo_(options));\n\n        _this4.isPendingTimestampOffset_ = false;\n\n        _this4.updateTransmuxerAndRequestSegment_(segmentInfo);\n      });\n      return;\n    }\n\n    this.updateTransmuxerAndRequestSegment_(segmentInfo);\n  };\n\n  _proto.updateTransmuxerAndRequestSegment_ = function updateTransmuxerAndRequestSegment_(segmentInfo) {\n    var _this5 = this; // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n    // the transmuxer still needs to be updated before then.\n    //\n    // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n    // offset must be passed to the transmuxer for stream correcting adjustments.\n\n\n    if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n      this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n      segmentInfo.gopsToAlignWith = [];\n      this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n      this.transmuxer_.postMessage({\n        action: 'reset'\n      });\n      this.transmuxer_.postMessage({\n        action: 'setTimestampOffset',\n        timestampOffset: segmentInfo.timestampOffset\n      });\n    }\n\n    var simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n    var isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n    var isWalkingForward = this.mediaIndex !== null;\n    var isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ && // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n    // the first timeline\n    segmentInfo.timeline > 0;\n    var isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n    this.logger_(\"Requesting \" + segmentInfoString(segmentInfo)); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n    // then this init segment has never been seen before and should be appended.\n    //\n    // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n    // both to true and leave the decision of whether to append the init segment to append time.\n\n    if (simpleSegment.map && !simpleSegment.map.bytes) {\n      this.logger_('going to request init segment.');\n      this.appendInitSegment_ = {\n        video: true,\n        audio: true\n      };\n    }\n\n    segmentInfo.abortRequests = mediaSegmentRequest({\n      xhr: this.vhs_.xhr,\n      xhrOptions: this.xhrOptions_,\n      decryptionWorker: this.decrypter_,\n      segment: simpleSegment,\n      abortFn: this.handleAbort_.bind(this, segmentInfo),\n      progressFn: this.handleProgress_.bind(this),\n      trackInfoFn: this.handleTrackInfo_.bind(this),\n      timingInfoFn: this.handleTimingInfo_.bind(this),\n      videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n      audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n      captionsFn: this.handleCaptions_.bind(this),\n      isEndOfTimeline: isEndOfTimeline,\n      endedTimelineFn: function endedTimelineFn() {\n        _this5.logger_('received endedtimeline callback');\n      },\n      id3Fn: this.handleId3_.bind(this),\n      dataFn: this.handleData_.bind(this),\n      doneFn: this.segmentRequestFinished_.bind(this),\n      onTransmuxerLog: function onTransmuxerLog(_ref8) {\n        var message = _ref8.message,\n            level = _ref8.level,\n            stream = _ref8.stream;\n\n        _this5.logger_(segmentInfoString(segmentInfo) + \" logged from transmuxer stream \" + stream + \" as a \" + level + \": \" + message);\n      }\n    });\n  }\n  /**\n   * trim the back buffer so that we don't have too much data\n   * in the source buffer\n   *\n   * @private\n   *\n   * @param {Object} segmentInfo - the current segment\n   */\n  ;\n\n  _proto.trimBackBuffer_ = function trimBackBuffer_(segmentInfo) {\n    var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n    // buffer and a very conservative \"garbage collector\"\n    // We manually clear out the old buffer to ensure\n    // we don't trigger the QuotaExceeded error\n    // on the source buffer during subsequent appends\n\n    if (removeToTime > 0) {\n      this.remove(0, removeToTime);\n    }\n  }\n  /**\n   * created a simplified copy of the segment object with just the\n   * information necessary to perform the XHR and decryption\n   *\n   * @private\n   *\n   * @param {Object} segmentInfo - the current segment\n   * @return {Object} a simplified segment object copy\n   */\n  ;\n\n  _proto.createSimplifiedSegmentObj_ = function createSimplifiedSegmentObj_(segmentInfo) {\n    var segment = segmentInfo.segment;\n    var part = segmentInfo.part;\n    var simpleSegment = {\n      resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n      byterange: part ? part.byterange : segment.byterange,\n      requestId: segmentInfo.requestId,\n      transmuxer: segmentInfo.transmuxer,\n      audioAppendStart: segmentInfo.audioAppendStart,\n      gopsToAlignWith: segmentInfo.gopsToAlignWith,\n      part: segmentInfo.part\n    };\n    var previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n\n    if (previousSegment && previousSegment.timeline === segment.timeline) {\n      // The baseStartTime of a segment is used to handle rollover when probing the TS\n      // segment to retrieve timing information. Since the probe only looks at the media's\n      // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n      // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n      // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n      // seconds of media time, so should be used here. The previous segment is used since\n      // the end of the previous segment should represent the beginning of the current\n      // segment, so long as they are on the same timeline.\n      if (previousSegment.videoTimingInfo) {\n        simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n      } else if (previousSegment.audioTimingInfo) {\n        simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n      }\n    }\n\n    if (segment.key) {\n      // if the media sequence is greater than 2^32, the IV will be incorrect\n      // assuming 10s segments, that would be about 1300 years\n      var iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n      simpleSegment.key = this.segmentKey(segment.key);\n      simpleSegment.key.iv = iv;\n    }\n\n    if (segment.map) {\n      simpleSegment.map = this.initSegmentForMap(segment.map);\n    }\n\n    return simpleSegment;\n  };\n\n  _proto.saveTransferStats_ = function saveTransferStats_(stats) {\n    // every request counts as a media request even if it has been aborted\n    // or canceled due to a timeout\n    this.mediaRequests += 1;\n\n    if (stats) {\n      this.mediaBytesTransferred += stats.bytesReceived;\n      this.mediaTransferDuration += stats.roundTripTime;\n    }\n  };\n\n  _proto.saveBandwidthRelatedStats_ = function saveBandwidthRelatedStats_(duration, stats) {\n    // byteLength will be used for throughput, and should be based on bytes receieved,\n    // which we only know at the end of the request and should reflect total bytes\n    // downloaded rather than just bytes processed from components of the segment\n    this.pendingSegment_.byteLength = stats.bytesReceived;\n\n    if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(\"Ignoring segment's bandwidth because its duration of \" + duration + (\" is less than the min to record \" + MIN_SEGMENT_DURATION_TO_SAVE_STATS));\n      return;\n    }\n\n    this.bandwidth = stats.bandwidth;\n    this.roundTrip = stats.roundTripTime;\n  };\n\n  _proto.handleTimeout_ = function handleTimeout_() {\n    // although the VTT segment loader bandwidth isn't really used, it's good to\n    // maintain functinality between segment loaders\n    this.mediaRequestsTimedout += 1;\n    this.bandwidth = 1;\n    this.roundTrip = NaN;\n    this.trigger('bandwidthupdate');\n    this.trigger('timeout');\n  }\n  /**\n   * Handle the callback from the segmentRequest function and set the\n   * associated SegmentLoader state and errors if necessary\n   *\n   * @private\n   */\n  ;\n\n  _proto.segmentRequestFinished_ = function segmentRequestFinished_(error, simpleSegment, result) {\n    // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n    // check the call queue directly since this function doesn't need to deal with any\n    // data, and can continue even if the source buffers are not set up and we didn't get\n    // any data from the segment\n    if (this.callQueue_.length) {\n      this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n      return;\n    }\n\n    this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n    if (!this.pendingSegment_) {\n      return;\n    } // the request was aborted and the SegmentLoader has already started\n    // another request. this can happen when the timeout for an aborted\n    // request triggers due to a limitation in the XHR library\n    // do not count this as any sort of request or we risk double-counting\n\n\n    if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n      return;\n    } // an error occurred from the active pendingSegment_ so reset everything\n\n\n    if (error) {\n      this.pendingSegment_ = null;\n      this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n      if (error.code === REQUEST_ERRORS.ABORTED) {\n        return;\n      }\n\n      this.pause(); // the error is really just that at least one of the requests timed-out\n      // set the bandwidth to a very low value and trigger an ABR switch to\n      // take emergency action\n\n      if (error.code === REQUEST_ERRORS.TIMEOUT) {\n        this.handleTimeout_();\n        return;\n      } // if control-flow has arrived here, then the error is real\n      // emit an error event to blacklist the current playlist\n\n\n      this.mediaRequestsErrored += 1;\n      this.error(error);\n      this.trigger('error');\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n    // generated for ABR purposes\n\n    this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n    segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n\n    if (result.gopInfo) {\n      this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n    } // Although we may have already started appending on progress, we shouldn't switch the\n    // state away from loading until we are officially done loading the segment data.\n\n\n    this.state = 'APPENDING'; // used for testing\n\n    this.trigger('appending');\n    this.waitForAppendsToComplete_(segmentInfo);\n  };\n\n  _proto.setTimeMapping_ = function setTimeMapping_(timeline) {\n    var timelineMapping = this.syncController_.mappingForTimeline(timeline);\n\n    if (timelineMapping !== null) {\n      this.timeMapping_ = timelineMapping;\n    }\n  };\n\n  _proto.updateMediaSecondsLoaded_ = function updateMediaSecondsLoaded_(segment) {\n    if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n      this.mediaSecondsLoaded += segment.end - segment.start;\n    } else {\n      this.mediaSecondsLoaded += segment.duration;\n    }\n  };\n\n  _proto.shouldUpdateTransmuxerTimestampOffset_ = function shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n    if (timestampOffset === null) {\n      return false;\n    } // note that we're potentially using the same timestamp offset for both video and\n    // audio\n\n\n    if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      return true;\n    }\n\n    if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.trueSegmentStart_ = function trueSegmentStart_(_ref9) {\n    var currentStart = _ref9.currentStart,\n        playlist = _ref9.playlist,\n        mediaIndex = _ref9.mediaIndex,\n        firstVideoFrameTimeForData = _ref9.firstVideoFrameTimeForData,\n        currentVideoTimestampOffset = _ref9.currentVideoTimestampOffset,\n        useVideoTimingInfo = _ref9.useVideoTimingInfo,\n        videoTimingInfo = _ref9.videoTimingInfo,\n        audioTimingInfo = _ref9.audioTimingInfo;\n\n    if (typeof currentStart !== 'undefined') {\n      // if start was set once, keep using it\n      return currentStart;\n    }\n\n    if (!useVideoTimingInfo) {\n      return audioTimingInfo.start;\n    }\n\n    var previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n    // within that segment. Since the transmuxer maintains a cache of incomplete data\n    // from and/or the last frame seen, the start time may reflect a frame that starts\n    // in the previous segment. Check for that case and ensure the start time is\n    // accurate for the segment.\n\n    if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n      return firstVideoFrameTimeForData;\n    }\n\n    return videoTimingInfo.start;\n  };\n\n  _proto.waitForAppendsToComplete_ = function waitForAppendsToComplete_(segmentInfo) {\n    var trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n\n    if (!trackInfo) {\n      this.error({\n        message: 'No starting media returned, likely due to an unsupported media format.',\n        blacklistDuration: Infinity\n      });\n      this.trigger('error');\n      return;\n    } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n    // on each queue this loader is responsible for to ensure that the appends are\n    // complete.\n\n\n    var hasAudio = trackInfo.hasAudio,\n        hasVideo = trackInfo.hasVideo,\n        isMuxed = trackInfo.isMuxed;\n    var waitForVideo = this.loaderType_ === 'main' && hasVideo;\n    var waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n    segmentInfo.waitingOnAppends = 0; // segments with no data\n\n    if (!segmentInfo.hasAppendedData_) {\n      if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n        // When there's no audio or video data in the segment, there's no audio or video\n        // timing information.\n        //\n        // If there's no audio or video timing information, then the timestamp offset\n        // can't be adjusted to the appropriate value for the transmuxer and source\n        // buffers.\n        //\n        // Therefore, the next segment should be used to set the timestamp offset.\n        this.isPendingTimestampOffset_ = true;\n      } // override settings for metadata only segments\n\n\n      segmentInfo.timingInfo = {\n        start: 0\n      };\n      segmentInfo.waitingOnAppends++;\n\n      if (!this.isPendingTimestampOffset_) {\n        // update the timestampoffset\n        this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n        // no video/audio data.\n\n        this.processMetadataQueue_();\n      } // append is \"done\" instantly with no data.\n\n\n      this.checkAppendsDone_(segmentInfo);\n      return;\n    } // Since source updater could call back synchronously, do the increments first.\n\n\n    if (waitForVideo) {\n      segmentInfo.waitingOnAppends++;\n    }\n\n    if (waitForAudio) {\n      segmentInfo.waitingOnAppends++;\n    }\n\n    if (waitForVideo) {\n      this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n\n    if (waitForAudio) {\n      this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n  };\n\n  _proto.checkAppendsDone_ = function checkAppendsDone_(segmentInfo) {\n    if (this.checkForAbort_(segmentInfo.requestId)) {\n      return;\n    }\n\n    segmentInfo.waitingOnAppends--;\n\n    if (segmentInfo.waitingOnAppends === 0) {\n      this.handleAppendsDone_();\n    }\n  };\n\n  _proto.checkForIllegalMediaSwitch = function checkForIllegalMediaSwitch(trackInfo) {\n    var illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n\n    if (illegalMediaSwitchError) {\n      this.error({\n        message: illegalMediaSwitchError,\n        blacklistDuration: Infinity\n      });\n      this.trigger('error');\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.updateSourceBufferTimestampOffset_ = function updateSourceBufferTimestampOffset_(segmentInfo) {\n    if (segmentInfo.timestampOffset === null || // we don't yet have the start for whatever media type (video or audio) has\n    // priority, timing-wise, so we must wait\n    typeof segmentInfo.timingInfo.start !== 'number' || // already updated the timestamp offset for this segment\n    segmentInfo.changedTimestampOffset || // the alt audio loader should not be responsible for setting the timestamp offset\n    this.loaderType_ !== 'main') {\n      return;\n    }\n\n    var didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n    // the timing info here comes from video. In the event that the audio is longer than\n    // the video, this will trim the start of the audio.\n    // This also trims any offset from 0 at the beginning of the media\n\n    segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n      videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n      audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n      timingInfo: segmentInfo.timingInfo\n    }); // In the event that there are part segment downloads, each will try to update the\n    // timestamp offset. Retaining this bit of state prevents us from updating in the\n    // future (within the same segment), however, there may be a better way to handle it.\n\n    segmentInfo.changedTimestampOffset = true;\n\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n\n    if (didChange) {\n      this.trigger('timestampoffset');\n    }\n  };\n\n  _proto.getSegmentStartTimeForTimestampOffsetCalculation_ = function getSegmentStartTimeForTimestampOffsetCalculation_(_ref10) {\n    var videoTimingInfo = _ref10.videoTimingInfo,\n        audioTimingInfo = _ref10.audioTimingInfo,\n        timingInfo = _ref10.timingInfo;\n\n    if (!this.useDtsForTimestampOffset_) {\n      return timingInfo.start;\n    }\n\n    if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n      return videoTimingInfo.transmuxedDecodeStart;\n    } // handle audio only\n\n\n    if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n      return audioTimingInfo.transmuxedDecodeStart;\n    } // handle content not transmuxed (e.g., MP4)\n\n\n    return timingInfo.start;\n  };\n\n  _proto.updateTimingInfoEnd_ = function updateTimingInfoEnd_(segmentInfo) {\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    var trackInfo = this.getMediaInfo_();\n    var useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n    var prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n\n    if (!prioritizedTimingInfo) {\n      return;\n    }\n\n    segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ? // End time may not exist in a case where we aren't parsing the full segment (one\n    // current example is the case of fmp4), so use the rough duration to calculate an\n    // end time.\n    prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n  }\n  /**\n   * callback to run when appendBuffer is finished. detects if we are\n   * in a good state to do things with the data we got, or if we need\n   * to wait for more\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleAppendsDone_ = function handleAppendsDone_() {\n    // appendsdone can cause an abort\n    if (this.pendingSegment_) {\n      this.trigger('appendsdone');\n    }\n\n    if (!this.pendingSegment_) {\n      this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n      // all appending cases?\n\n      if (!this.paused()) {\n        this.monitorBuffer_();\n      }\n\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n    // best to wait until all appends are done so we're sure that the primary media is\n    // finished (and we have its end time).\n\n    this.updateTimingInfoEnd_(segmentInfo);\n\n    if (this.shouldSaveSegmentTimingInfo_) {\n      // Timeline mappings should only be saved for the main loader. This is for multiple\n      // reasons:\n      //\n      // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n      //    and the main loader try to save the timeline mapping, whichever comes later\n      //    will overwrite the first. In theory this is OK, as the mappings should be the\n      //    same, however, it breaks for (2)\n      // 2) In the event of a live stream, the initial live point will make for a somewhat\n      //    arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n      //    the mapping will be off for one of the streams, dependent on which one was\n      //    first saved (see (1)).\n      // 3) Primary timing goes by video in VHS, so the mapping should be video.\n      //\n      // Since the audio loader will wait for the main loader to load the first segment,\n      // the main loader will save the first timeline mapping, and ensure that there won't\n      // be a case where audio loads two segments without saving a mapping (thus leading\n      // to missing segment timing info).\n      this.syncController_.saveSegmentTimingInfo({\n        segmentInfo: segmentInfo,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n    }\n\n    var segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n\n    if (segmentDurationMessage) {\n      if (segmentDurationMessage.severity === 'warn') {\n        videojs.log.warn(segmentDurationMessage.message);\n      } else {\n        this.logger_(segmentDurationMessage.message);\n      }\n    }\n\n    this.recordThroughput_(segmentInfo);\n    this.pendingSegment_ = null;\n    this.state = 'READY';\n\n    if (segmentInfo.isSyncRequest) {\n      this.trigger('syncinfoupdate'); // if the sync request was not appended\n      // then it was not the correct segment.\n      // throw it away and use the data it gave us\n      // to get the correct one.\n\n      if (!segmentInfo.hasAppendedData_) {\n        this.logger_(\"Throwing away un-appended sync request \" + segmentInfoString(segmentInfo));\n        return;\n      }\n    }\n\n    this.logger_(\"Appended \" + segmentInfoString(segmentInfo));\n    this.addSegmentMetadataCue_(segmentInfo);\n    this.fetchAtBuffer_ = true;\n\n    if (this.currentTimeline_ !== segmentInfo.timeline) {\n      this.timelineChangeController_.lastTimelineChange({\n        type: this.loaderType_,\n        from: this.currentTimeline_,\n        to: segmentInfo.timeline\n      }); // If audio is not disabled, the main segment loader is responsible for updating\n      // the audio timeline as well. If the content is video only, this won't have any\n      // impact.\n\n      if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n        this.timelineChangeController_.lastTimelineChange({\n          type: 'audio',\n          from: this.currentTimeline_,\n          to: segmentInfo.timeline\n        });\n      }\n    }\n\n    this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n    // the following conditional otherwise it may consider this a bad \"guess\"\n    // and attempt to resync when the post-update seekable window and live\n    // point would mean that this was the perfect segment to fetch\n\n    this.trigger('syncinfoupdate');\n    var segment = segmentInfo.segment;\n    var part = segmentInfo.part;\n    var badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n    var badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n    // the currentTime_ that means that our conservative guess was too conservative.\n    // In that case, reset the loader state so that we try to use any information gained\n    // from the previous request to create a new, more accurate, sync-point.\n\n    if (badSegmentGuess || badPartGuess) {\n      this.logger_(\"bad \" + (badSegmentGuess ? 'segment' : 'part') + \" \" + segmentInfoString(segmentInfo));\n      this.resetEverything();\n      return;\n    }\n\n    var isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n    // and conservatively guess\n\n    if (isWalkingForward) {\n      this.trigger('bandwidthupdate');\n    }\n\n    this.trigger('progress');\n    this.mediaIndex = segmentInfo.mediaIndex;\n    this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n    // buffer, end the stream. this ensures the \"ended\" event will\n    // fire if playback reaches that point.\n\n    if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n      this.endOfStream();\n    } // used for testing\n\n\n    this.trigger('appended');\n\n    if (segmentInfo.hasAppendedData_) {\n      this.mediaAppends++;\n    }\n\n    if (!this.paused()) {\n      this.monitorBuffer_();\n    }\n  }\n  /**\n   * Records the current throughput of the decrypt, transmux, and append\n   * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n   * moving average of the throughput. `throughput.count` is the number of\n   * data points in the average.\n   *\n   * @private\n   * @param {Object} segmentInfo the object returned by loadSegment\n   */\n  ;\n\n  _proto.recordThroughput_ = function recordThroughput_(segmentInfo) {\n    if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(\"Ignoring segment's throughput because its duration of \" + segmentInfo.duration + (\" is less than the min to record \" + MIN_SEGMENT_DURATION_TO_SAVE_STATS));\n      return;\n    }\n\n    var rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n    // by zero in the case where the throughput is ridiculously high\n\n    var segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n    var segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n    //   newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n    this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n  }\n  /**\n   * Adds a cue to the segment-metadata track with some metadata information about the\n   * segment\n   *\n   * @private\n   * @param {Object} segmentInfo\n   *        the object returned by loadSegment\n   * @method addSegmentMetadataCue_\n   */\n  ;\n\n  _proto.addSegmentMetadataCue_ = function addSegmentMetadataCue_(segmentInfo) {\n    if (!this.segmentMetadataTrack_) {\n      return;\n    }\n\n    var segment = segmentInfo.segment;\n    var start = segment.start;\n    var end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n    if (!finite(start) || !finite(end)) {\n      return;\n    }\n\n    removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n    var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\n    var value = {\n      custom: segment.custom,\n      dateTimeObject: segment.dateTimeObject,\n      dateTimeString: segment.dateTimeString,\n      bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n      resolution: segmentInfo.playlist.attributes.RESOLUTION,\n      codecs: segmentInfo.playlist.attributes.CODECS,\n      byteLength: segmentInfo.byteLength,\n      uri: segmentInfo.uri,\n      timeline: segmentInfo.timeline,\n      playlist: segmentInfo.playlist.id,\n      start: start,\n      end: end\n    };\n    var data = JSON.stringify(value);\n    var cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n    // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n    cue.value = value;\n    this.segmentMetadataTrack_.addCue(cue);\n  };\n\n  return SegmentLoader;\n}(videojs.EventTarget);\n\nfunction noop() {}\n\nvar toTitleCase = function toTitleCase(string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n\n  return string.replace(/./, function (w) {\n    return w.toUpperCase();\n  });\n};\n\nvar bufferTypes = ['video', 'audio'];\n\nvar _updating = function updating(type, sourceUpdater) {\n  var sourceBuffer = sourceUpdater[type + \"Buffer\"];\n  return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\n\nvar nextQueueIndexOfType = function nextQueueIndexOfType(type, queue) {\n  for (var i = 0; i < queue.length; i++) {\n    var queueEntry = queue[i];\n\n    if (queueEntry.type === 'mediaSource') {\n      // If the next entry is a media source entry (uses multiple source buffers), block\n      // processing to allow it to go through first.\n      return null;\n    }\n\n    if (queueEntry.type === type) {\n      return i;\n    }\n  }\n\n  return null;\n};\n\nvar shiftQueue = function shiftQueue(type, sourceUpdater) {\n  if (sourceUpdater.queue.length === 0) {\n    return;\n  }\n\n  var queueIndex = 0;\n  var queueEntry = sourceUpdater.queue[queueIndex];\n\n  if (queueEntry.type === 'mediaSource') {\n    if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n      sourceUpdater.queue.shift();\n      queueEntry.action(sourceUpdater);\n\n      if (queueEntry.doneFn) {\n        queueEntry.doneFn();\n      } // Only specific source buffer actions must wait for async updateend events. Media\n      // Source actions process synchronously. Therefore, both audio and video source\n      // buffers are now clear to process the next queue entries.\n\n\n      shiftQueue('audio', sourceUpdater);\n      shiftQueue('video', sourceUpdater);\n    } // Media Source actions require both source buffers, so if the media source action\n    // couldn't process yet (because one or both source buffers are busy), block other\n    // queue actions until both are available and the media source action can process.\n\n\n    return;\n  }\n\n  if (type === 'mediaSource') {\n    // If the queue was shifted by a media source action (this happens when pushing a\n    // media source action onto the queue), then it wasn't from an updateend event from an\n    // audio or video source buffer, so there's no change from previous state, and no\n    // processing should be done.\n    return;\n  } // Media source queue entries don't need to consider whether the source updater is\n  // started (i.e., source buffers are created) as they don't need the source buffers, but\n  // source buffer queue entries do.\n\n\n  if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || _updating(type, sourceUpdater)) {\n    return;\n  }\n\n  if (queueEntry.type !== type) {\n    queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n\n    if (queueIndex === null) {\n      // Either there's no queue entry that uses this source buffer type in the queue, or\n      // there's a media source queue entry before the next entry of this type, in which\n      // case wait for that action to process first.\n      return;\n    }\n\n    queueEntry = sourceUpdater.queue[queueIndex];\n  }\n\n  sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n  //\n  // The queue pending operation must be set before the action is performed in the event\n  // that the action results in a synchronous event that is acted upon. For instance, if\n  // an exception is thrown that can be handled, it's possible that new actions will be\n  // appended to an empty queue and immediately executed, but would not have the correct\n  // pending information if this property was set after the action was performed.\n\n  sourceUpdater.queuePending[type] = queueEntry;\n  queueEntry.action(type, sourceUpdater);\n\n  if (!queueEntry.doneFn) {\n    // synchronous operation, process next entry\n    sourceUpdater.queuePending[type] = null;\n    shiftQueue(type, sourceUpdater);\n    return;\n  }\n};\n\nvar cleanupBuffer = function cleanupBuffer(type, sourceUpdater) {\n  var buffer = sourceUpdater[type + \"Buffer\"];\n  var titleType = toTitleCase(type);\n\n  if (!buffer) {\n    return;\n  }\n\n  buffer.removeEventListener('updateend', sourceUpdater[\"on\" + titleType + \"UpdateEnd_\"]);\n  buffer.removeEventListener('error', sourceUpdater[\"on\" + titleType + \"Error_\"]);\n  sourceUpdater.codecs[type] = null;\n  sourceUpdater[type + \"Buffer\"] = null;\n};\n\nvar inSourceBuffers = function inSourceBuffers(mediaSource, sourceBuffer) {\n  return mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\n};\n\nvar actions = {\n  appendBuffer: function appendBuffer(bytes, segmentInfo, onError) {\n    return function (type, sourceUpdater) {\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"Appending segment \" + segmentInfo.mediaIndex + \"'s \" + bytes.length + \" bytes to \" + type + \"Buffer\");\n\n      try {\n        sourceBuffer.appendBuffer(bytes);\n      } catch (e) {\n        sourceUpdater.logger_(\"Error with code \" + e.code + \" \" + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + (\"when appending segment \" + segmentInfo.mediaIndex + \" to \" + type + \"Buffer\"));\n        sourceUpdater.queuePending[type] = null;\n        onError(e);\n      }\n    };\n  },\n  remove: function remove(start, end) {\n    return function (type, sourceUpdater) {\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"Removing \" + start + \" to \" + end + \" from \" + type + \"Buffer\");\n\n      try {\n        sourceBuffer.remove(start, end);\n      } catch (e) {\n        sourceUpdater.logger_(\"Remove \" + start + \" to \" + end + \" from \" + type + \"Buffer failed\");\n      }\n    };\n  },\n  timestampOffset: function timestampOffset(offset) {\n    return function (type, sourceUpdater) {\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"Setting \" + type + \"timestampOffset to \" + offset);\n      sourceBuffer.timestampOffset = offset;\n    };\n  },\n  callback: function callback(_callback) {\n    return function (type, sourceUpdater) {\n      _callback();\n    };\n  },\n  endOfStream: function endOfStream(error) {\n    return function (sourceUpdater) {\n      if (sourceUpdater.mediaSource.readyState !== 'open') {\n        return;\n      }\n\n      sourceUpdater.logger_(\"Calling mediaSource endOfStream(\" + (error || '') + \")\");\n\n      try {\n        sourceUpdater.mediaSource.endOfStream(error);\n      } catch (e) {\n        videojs.log.warn('Failed to call media source endOfStream', e);\n      }\n    };\n  },\n  duration: function duration(_duration) {\n    return function (sourceUpdater) {\n      sourceUpdater.logger_(\"Setting mediaSource duration to \" + _duration);\n\n      try {\n        sourceUpdater.mediaSource.duration = _duration;\n      } catch (e) {\n        videojs.log.warn('Failed to set media source duration', e);\n      }\n    };\n  },\n  abort: function abort() {\n    return function (type, sourceUpdater) {\n      if (sourceUpdater.mediaSource.readyState !== 'open') {\n        return;\n      }\n\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"calling abort on \" + type + \"Buffer\");\n\n      try {\n        sourceBuffer.abort();\n      } catch (e) {\n        videojs.log.warn(\"Failed to abort on \" + type + \"Buffer\", e);\n      }\n    };\n  },\n  addSourceBuffer: function addSourceBuffer(type, codec) {\n    return function (sourceUpdater) {\n      var titleType = toTitleCase(type);\n      var mime = Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"getMimeForCodec\"])(codec);\n      sourceUpdater.logger_(\"Adding \" + type + \"Buffer with codec \" + codec + \" to mediaSource\");\n      var sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n      sourceBuffer.addEventListener('updateend', sourceUpdater[\"on\" + titleType + \"UpdateEnd_\"]);\n      sourceBuffer.addEventListener('error', sourceUpdater[\"on\" + titleType + \"Error_\"]);\n      sourceUpdater.codecs[type] = codec;\n      sourceUpdater[type + \"Buffer\"] = sourceBuffer;\n    };\n  },\n  removeSourceBuffer: function removeSourceBuffer(type) {\n    return function (sourceUpdater) {\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"];\n      cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"Removing \" + type + \"Buffer with codec \" + sourceUpdater.codecs[type] + \" from mediaSource\");\n\n      try {\n        sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n      } catch (e) {\n        videojs.log.warn(\"Failed to removeSourceBuffer \" + type + \"Buffer\", e);\n      }\n    };\n  },\n  changeType: function changeType(codec) {\n    return function (type, sourceUpdater) {\n      var sourceBuffer = sourceUpdater[type + \"Buffer\"];\n      var mime = Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"getMimeForCodec\"])(codec); // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      } // do not update codec if we don't need to.\n\n\n      if (sourceUpdater.codecs[type] === codec) {\n        return;\n      }\n\n      sourceUpdater.logger_(\"changing \" + type + \"Buffer codec from \" + sourceUpdater.codecs[type] + \" to \" + codec); // check if change to the provided type is supported\n\n      try {\n        sourceBuffer.changeType(mime);\n        sourceUpdater.codecs[type] = codec;\n      } catch (e) {\n        videojs.log.warn(\"Failed to changeType on \" + type + \"Buffer\", e);\n      }\n    };\n  }\n};\n\nvar pushQueue = function pushQueue(_ref) {\n  var type = _ref.type,\n      sourceUpdater = _ref.sourceUpdater,\n      action = _ref.action,\n      doneFn = _ref.doneFn,\n      name = _ref.name;\n  sourceUpdater.queue.push({\n    type: type,\n    action: action,\n    doneFn: doneFn,\n    name: name\n  });\n  shiftQueue(type, sourceUpdater);\n};\n\nvar onUpdateend = function onUpdateend(type, sourceUpdater) {\n  return function (e) {\n    // Although there should, in theory, be a pending action for any updateend receieved,\n    // there are some actions that may trigger updateend events without set definitions in\n    // the w3c spec. For instance, setting the duration on the media source may trigger\n    // updateend events on source buffers. This does not appear to be in the spec. As such,\n    // if we encounter an updateend without a corresponding pending action from our queue\n    // for that source buffer type, process the next action.\n    if (sourceUpdater.queuePending[type]) {\n      var doneFn = sourceUpdater.queuePending[type].doneFn;\n      sourceUpdater.queuePending[type] = null;\n\n      if (doneFn) {\n        // if there's an error, report it\n        doneFn(sourceUpdater[type + \"Error_\"]);\n      }\n    }\n\n    shiftQueue(type, sourceUpdater);\n  };\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\n\nvar SourceUpdater = /*#__PURE__*/function (_videojs$EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SourceUpdater, _videojs$EventTarget);\n\n  function SourceUpdater(mediaSource) {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this;\n    _this.mediaSource = mediaSource;\n\n    _this.sourceopenListener_ = function () {\n      return shiftQueue('mediaSource', _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n    };\n\n    _this.mediaSource.addEventListener('sourceopen', _this.sourceopenListener_);\n\n    _this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n    _this.audioTimestampOffset_ = 0;\n    _this.videoTimestampOffset_ = 0;\n    _this.queue = [];\n    _this.queuePending = {\n      audio: null,\n      video: null\n    };\n    _this.delayedAudioAppendQueue_ = [];\n    _this.videoAppendQueued_ = false;\n    _this.codecs = {};\n    _this.onVideoUpdateEnd_ = onUpdateend('video', _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n    _this.onAudioUpdateEnd_ = onUpdateend('audio', _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n\n    _this.onVideoError_ = function (e) {\n      // used for debugging\n      _this.videoError_ = e;\n    };\n\n    _this.onAudioError_ = function (e) {\n      // used for debugging\n      _this.audioError_ = e;\n    };\n\n    _this.createdSourceBuffers_ = false;\n    _this.initializedEme_ = false;\n    _this.triggeredReady_ = false;\n    return _this;\n  }\n\n  var _proto = SourceUpdater.prototype;\n\n  _proto.initializedEme = function initializedEme() {\n    this.initializedEme_ = true;\n    this.triggerReady();\n  };\n\n  _proto.hasCreatedSourceBuffers = function hasCreatedSourceBuffers() {\n    // if false, likely waiting on one of the segment loaders to get enough data to create\n    // source buffers\n    return this.createdSourceBuffers_;\n  };\n\n  _proto.hasInitializedAnyEme = function hasInitializedAnyEme() {\n    return this.initializedEme_;\n  };\n\n  _proto.ready = function ready() {\n    return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n  };\n\n  _proto.createSourceBuffers = function createSourceBuffers(codecs) {\n    if (this.hasCreatedSourceBuffers()) {\n      // already created them before\n      return;\n    } // the intial addOrChangeSourceBuffers will always be\n    // two add buffers.\n\n\n    this.addOrChangeSourceBuffers(codecs);\n    this.createdSourceBuffers_ = true;\n    this.trigger('createdsourcebuffers');\n    this.triggerReady();\n  };\n\n  _proto.triggerReady = function triggerReady() {\n    // only allow ready to be triggered once, this prevents the case\n    // where:\n    // 1. we trigger createdsourcebuffers\n    // 2. ie 11 synchronously initializates eme\n    // 3. the synchronous initialization causes us to trigger ready\n    // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n    if (this.ready() && !this.triggeredReady_) {\n      this.triggeredReady_ = true;\n      this.trigger('ready');\n    }\n  }\n  /**\n   * Add a type of source buffer to the media source.\n   *\n   * @param {string} type\n   *        The type of source buffer to add.\n   *\n   * @param {string} codec\n   *        The codec to add the source buffer with.\n   */\n  ;\n\n  _proto.addSourceBuffer = function addSourceBuffer(type, codec) {\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.addSourceBuffer(type, codec),\n      name: 'addSourceBuffer'\n    });\n  }\n  /**\n   * call abort on a source buffer.\n   *\n   * @param {string} type\n   *        The type of source buffer to call abort on.\n   */\n  ;\n\n  _proto.abort = function abort(type) {\n    pushQueue({\n      type: type,\n      sourceUpdater: this,\n      action: actions.abort(type),\n      name: 'abort'\n    });\n  }\n  /**\n   * Call removeSourceBuffer and remove a specific type\n   * of source buffer on the mediaSource.\n   *\n   * @param {string} type\n   *        The type of source buffer to remove.\n   */\n  ;\n\n  _proto.removeSourceBuffer = function removeSourceBuffer(type) {\n    if (!this.canRemoveSourceBuffer()) {\n      videojs.log.error('removeSourceBuffer is not supported!');\n      return;\n    }\n\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.removeSourceBuffer(type),\n      name: 'removeSourceBuffer'\n    });\n  }\n  /**\n   * Whether or not the removeSourceBuffer function is supported\n   * on the mediaSource.\n   *\n   * @return {boolean}\n   *          if removeSourceBuffer can be called.\n   */\n  ;\n\n  _proto.canRemoveSourceBuffer = function canRemoveSourceBuffer() {\n    // IE reports that it supports removeSourceBuffer, but often throws\n    // errors when attempting to use the function. So we report that it\n    // does not support removeSourceBuffer. As of Firefox 83 removeSourceBuffer\n    // throws errors, so we report that it does not support this as well.\n    return !videojs.browser.IE_VERSION && !videojs.browser.IS_FIREFOX && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.prototype && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.prototype.removeSourceBuffer === 'function';\n  }\n  /**\n   * Whether or not the changeType function is supported\n   * on our SourceBuffers.\n   *\n   * @return {boolean}\n   *         if changeType can be called.\n   */\n  ;\n\n  SourceUpdater.canChangeType = function canChangeType() {\n    return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.SourceBuffer && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.SourceBuffer.prototype && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.SourceBuffer.prototype.changeType === 'function';\n  }\n  /**\n   * Whether or not the changeType function is supported\n   * on our SourceBuffers.\n   *\n   * @return {boolean}\n   *         if changeType can be called.\n   */\n  ;\n\n  _proto.canChangeType = function canChangeType() {\n    return this.constructor.canChangeType();\n  }\n  /**\n   * Call the changeType function on a source buffer, given the code and type.\n   *\n   * @param {string} type\n   *        The type of source buffer to call changeType on.\n   *\n   * @param {string} codec\n   *        The codec string to change type with on the source buffer.\n   */\n  ;\n\n  _proto.changeType = function changeType(type, codec) {\n    if (!this.canChangeType()) {\n      videojs.log.error('changeType is not supported!');\n      return;\n    }\n\n    pushQueue({\n      type: type,\n      sourceUpdater: this,\n      action: actions.changeType(codec),\n      name: 'changeType'\n    });\n  }\n  /**\n   * Add source buffers with a codec or, if they are already created,\n   * call changeType on source buffers using changeType.\n   *\n   * @param {Object} codecs\n   *        Codecs to switch to\n   */\n  ;\n\n  _proto.addOrChangeSourceBuffers = function addOrChangeSourceBuffers(codecs) {\n    var _this2 = this;\n\n    if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n      throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n    }\n\n    Object.keys(codecs).forEach(function (type) {\n      var codec = codecs[type];\n\n      if (!_this2.hasCreatedSourceBuffers()) {\n        return _this2.addSourceBuffer(type, codec);\n      }\n\n      if (_this2.canChangeType()) {\n        _this2.changeType(type, codec);\n      }\n    });\n  }\n  /**\n   * Queue an update to append an ArrayBuffer.\n   *\n   * @param {MediaObject} object containing audioBytes and/or videoBytes\n   * @param {Function} done the function to call when done\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n   */\n  ;\n\n  _proto.appendBuffer = function appendBuffer(options, doneFn) {\n    var _this3 = this;\n\n    var segmentInfo = options.segmentInfo,\n        type = options.type,\n        bytes = options.bytes;\n    this.processedAppend_ = true;\n\n    if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n      this.delayedAudioAppendQueue_.push([options, doneFn]);\n      this.logger_(\"delayed audio append of \" + bytes.length + \" until video append\");\n      return;\n    } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n    // not be fired. This means that the queue will be blocked until the next action\n    // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n    // these errors by calling the doneFn with the specific error.\n\n\n    var onError = doneFn;\n    pushQueue({\n      type: type,\n      sourceUpdater: this,\n      action: actions.appendBuffer(bytes, segmentInfo || {\n        mediaIndex: -1\n      }, onError),\n      doneFn: doneFn,\n      name: 'appendBuffer'\n    });\n\n    if (type === 'video') {\n      this.videoAppendQueued_ = true;\n\n      if (!this.delayedAudioAppendQueue_.length) {\n        return;\n      }\n\n      var queue = this.delayedAudioAppendQueue_.slice();\n      this.logger_(\"queuing delayed audio \" + queue.length + \" appendBuffers\");\n      this.delayedAudioAppendQueue_.length = 0;\n      queue.forEach(function (que) {\n        _this3.appendBuffer.apply(_this3, que);\n      });\n    }\n  }\n  /**\n   * Get the audio buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         The audio buffer's buffered time range\n   */\n  ;\n\n  _proto.audioBuffered = function audioBuffered() {\n    // no media source/source buffer or it isn't in the media sources\n    // source buffer list\n    if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n      return videojs.createTimeRange();\n    }\n\n    return this.audioBuffer.buffered ? this.audioBuffer.buffered : videojs.createTimeRange();\n  }\n  /**\n   * Get the video buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         The video buffer's buffered time range\n   */\n  ;\n\n  _proto.videoBuffered = function videoBuffered() {\n    // no media source/source buffer or it isn't in the media sources\n    // source buffer list\n    if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n      return videojs.createTimeRange();\n    }\n\n    return this.videoBuffer.buffered ? this.videoBuffer.buffered : videojs.createTimeRange();\n  }\n  /**\n   * Get a combined video/audio buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         the combined time range\n   */\n  ;\n\n  _proto.buffered = function buffered() {\n    var video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n    var audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n\n    if (audio && !video) {\n      return this.audioBuffered();\n    }\n\n    if (video && !audio) {\n      return this.videoBuffered();\n    }\n\n    return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n  }\n  /**\n   * Add a callback to the queue that will set duration on the mediaSource.\n   *\n   * @param {number} duration\n   *        The duration to set\n   *\n   * @param {Function} [doneFn]\n   *        function to run after duration has been set.\n   */\n  ;\n\n  _proto.setDuration = function setDuration(duration, doneFn) {\n    if (doneFn === void 0) {\n      doneFn = noop;\n    } // In order to set the duration on the media source, it's necessary to wait for all\n    // source buffers to no longer be updating. \"If the updating attribute equals true on\n    // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n    // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.duration(duration),\n      name: 'duration',\n      doneFn: doneFn\n    });\n  }\n  /**\n   * Add a mediaSource endOfStream call to the queue\n   *\n   * @param {Error} [error]\n   *        Call endOfStream with an error\n   *\n   * @param {Function} [doneFn]\n   *        A function that should be called when the\n   *        endOfStream call has finished.\n   */\n  ;\n\n  _proto.endOfStream = function endOfStream(error, doneFn) {\n    if (error === void 0) {\n      error = null;\n    }\n\n    if (doneFn === void 0) {\n      doneFn = noop;\n    }\n\n    if (typeof error !== 'string') {\n      error = undefined;\n    } // In order to set the duration on the media source, it's necessary to wait for all\n    // source buffers to no longer be updating. \"If the updating attribute equals true on\n    // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n    // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.endOfStream(error),\n      name: 'endOfStream',\n      doneFn: doneFn\n    });\n  }\n  /**\n   * Queue an update to remove a time range from the buffer.\n   *\n   * @param {number} start where to start the removal\n   * @param {number} end where to end the removal\n   * @param {Function} [done=noop] optional callback to be executed when the remove\n   * operation is complete\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n   */\n  ;\n\n  _proto.removeAudio = function removeAudio(start, end, done) {\n    if (done === void 0) {\n      done = noop;\n    }\n\n    if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n      done();\n      return;\n    }\n\n    pushQueue({\n      type: 'audio',\n      sourceUpdater: this,\n      action: actions.remove(start, end),\n      doneFn: done,\n      name: 'remove'\n    });\n  }\n  /**\n   * Queue an update to remove a time range from the buffer.\n   *\n   * @param {number} start where to start the removal\n   * @param {number} end where to end the removal\n   * @param {Function} [done=noop] optional callback to be executed when the remove\n   * operation is complete\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n   */\n  ;\n\n  _proto.removeVideo = function removeVideo(start, end, done) {\n    if (done === void 0) {\n      done = noop;\n    }\n\n    if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n      done();\n      return;\n    }\n\n    pushQueue({\n      type: 'video',\n      sourceUpdater: this,\n      action: actions.remove(start, end),\n      doneFn: done,\n      name: 'remove'\n    });\n  }\n  /**\n   * Whether the underlying sourceBuffer is updating or not\n   *\n   * @return {boolean} the updating status of the SourceBuffer\n   */\n  ;\n\n  _proto.updating = function updating() {\n    // the audio/video source buffer is updating\n    if (_updating('audio', this) || _updating('video', this)) {\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * Set/get the timestampoffset on the audio SourceBuffer\n   *\n   * @return {number} the timestamp offset\n   */\n  ;\n\n  _proto.audioTimestampOffset = function audioTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.audioBuffer && // no point in updating if it's the same\n    this.audioTimestampOffset_ !== offset) {\n      pushQueue({\n        type: 'audio',\n        sourceUpdater: this,\n        action: actions.timestampOffset(offset),\n        name: 'timestampOffset'\n      });\n      this.audioTimestampOffset_ = offset;\n    }\n\n    return this.audioTimestampOffset_;\n  }\n  /**\n   * Set/get the timestampoffset on the video SourceBuffer\n   *\n   * @return {number} the timestamp offset\n   */\n  ;\n\n  _proto.videoTimestampOffset = function videoTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.videoBuffer && // no point in updating if it's the same\n    this.videoTimestampOffset !== offset) {\n      pushQueue({\n        type: 'video',\n        sourceUpdater: this,\n        action: actions.timestampOffset(offset),\n        name: 'timestampOffset'\n      });\n      this.videoTimestampOffset_ = offset;\n    }\n\n    return this.videoTimestampOffset_;\n  }\n  /**\n   * Add a function to the queue that will be called\n   * when it is its turn to run in the audio queue.\n   *\n   * @param {Function} callback\n   *        The callback to queue.\n   */\n  ;\n\n  _proto.audioQueueCallback = function audioQueueCallback(callback) {\n    if (!this.audioBuffer) {\n      return;\n    }\n\n    pushQueue({\n      type: 'audio',\n      sourceUpdater: this,\n      action: actions.callback(callback),\n      name: 'callback'\n    });\n  }\n  /**\n   * Add a function to the queue that will be called\n   * when it is its turn to run in the video queue.\n   *\n   * @param {Function} callback\n   *        The callback to queue.\n   */\n  ;\n\n  _proto.videoQueueCallback = function videoQueueCallback(callback) {\n    if (!this.videoBuffer) {\n      return;\n    }\n\n    pushQueue({\n      type: 'video',\n      sourceUpdater: this,\n      action: actions.callback(callback),\n      name: 'callback'\n    });\n  }\n  /**\n   * dispose of the source updater and the underlying sourceBuffer\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    var _this4 = this;\n\n    this.trigger('dispose');\n    bufferTypes.forEach(function (type) {\n      _this4.abort(type);\n\n      if (_this4.canRemoveSourceBuffer()) {\n        _this4.removeSourceBuffer(type);\n      } else {\n        _this4[type + \"QueueCallback\"](function () {\n          return cleanupBuffer(type, _this4);\n        });\n      }\n    });\n    this.videoAppendQueued_ = false;\n    this.delayedAudioAppendQueue_.length = 0;\n\n    if (this.sourceopenListener_) {\n      this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n    }\n\n    this.off();\n  };\n\n  return SourceUpdater;\n}(videojs.EventTarget);\n\nvar uint8ToUtf8 = function uint8ToUtf8(uintArray) {\n  return decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n};\n\nvar VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(function (_char3) {\n  return _char3.charCodeAt(0);\n}));\n\nvar NoVttJsError = /*#__PURE__*/function (_Error) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(NoVttJsError, _Error);\n\n  function NoVttJsError() {\n    return _Error.call(this, 'Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.') || this;\n  }\n\n  return NoVttJsError;\n}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_21___default()(Error));\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\n\nvar VTTSegmentLoader = /*#__PURE__*/function (_SegmentLoader) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VTTSegmentLoader, _SegmentLoader);\n\n  function VTTSegmentLoader(settings, options) {\n    var _this;\n\n    if (options === void 0) {\n      options = {};\n    }\n\n    _this = _SegmentLoader.call(this, settings, options) || this; // SegmentLoader requires a MediaSource be specified or it will throw an error;\n    // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n    _this.mediaSource_ = null;\n    _this.subtitlesTrack_ = null;\n    _this.loaderType_ = 'subtitle';\n    _this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n    _this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n    // the sync controller leads to improper behavior.\n\n    _this.shouldSaveSegmentTimingInfo_ = false;\n    return _this;\n  }\n\n  var _proto = VTTSegmentLoader.prototype;\n\n  _proto.createTransmuxer_ = function createTransmuxer_() {\n    // don't need to transmux any subtitles\n    return null;\n  }\n  /**\n   * Indicates which time ranges are buffered\n   *\n   * @return {TimeRange}\n   *         TimeRange object representing the current buffered ranges\n   */\n  ;\n\n  _proto.buffered_ = function buffered_() {\n    if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n      return videojs.createTimeRanges();\n    }\n\n    var cues = this.subtitlesTrack_.cues;\n    var start = cues[0].startTime;\n    var end = cues[cues.length - 1].startTime;\n    return videojs.createTimeRanges([[start, end]]);\n  }\n  /**\n   * Gets and sets init segment for the provided map\n   *\n   * @param {Object} map\n   *        The map object representing the init segment to get or set\n   * @param {boolean=} set\n   *        If true, the init segment for the provided map should be saved\n   * @return {Object}\n   *         map object for desired init segment\n   */\n  ;\n\n  _proto.initSegmentForMap = function initSegmentForMap(map, set) {\n    if (set === void 0) {\n      set = false;\n    }\n\n    if (!map) {\n      return null;\n    }\n\n    var id = initSegmentId(map);\n    var storedMap = this.initSegments_[id];\n\n    if (set && !storedMap && map.bytes) {\n      // append WebVTT line terminators to the media initialization segment if it exists\n      // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n      // requires two or more WebVTT line terminators between the WebVTT header and the\n      // rest of the file\n      var combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n      var combinedSegment = new Uint8Array(combinedByteLength);\n      combinedSegment.set(map.bytes);\n      combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n      this.initSegments_[id] = storedMap = {\n        resolvedUri: map.resolvedUri,\n        byterange: map.byterange,\n        bytes: combinedSegment\n      };\n    }\n\n    return storedMap || map;\n  }\n  /**\n   * Returns true if all configuration required for loading is present, otherwise false.\n   *\n   * @return {boolean} True if the all configuration is ready for loading\n   * @private\n   */\n  ;\n\n  _proto.couldBeginLoading_ = function couldBeginLoading_() {\n    return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n  }\n  /**\n   * Once all the starting parameters have been specified, begin\n   * operation. This method should only be invoked from the INIT\n   * state.\n   *\n   * @private\n   */\n  ;\n\n  _proto.init_ = function init_() {\n    this.state = 'READY';\n    this.resetEverything();\n    return this.monitorBuffer_();\n  }\n  /**\n   * Set a subtitle track on the segment loader to add subtitles to\n   *\n   * @param {TextTrack=} track\n   *        The text track to add loaded subtitles to\n   * @return {TextTrack}\n   *        Returns the subtitles track\n   */\n  ;\n\n  _proto.track = function track(_track) {\n    if (typeof _track === 'undefined') {\n      return this.subtitlesTrack_;\n    }\n\n    this.subtitlesTrack_ = _track; // if we were unpaused but waiting for a sourceUpdater, start\n    // buffering now\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      this.init_();\n    }\n\n    return this.subtitlesTrack_;\n  }\n  /**\n   * Remove any data in the source buffer between start and end times\n   *\n   * @param {number} start - the start time of the region to remove from the buffer\n   * @param {number} end - the end time of the region to remove from the buffer\n   */\n  ;\n\n  _proto.remove = function remove(start, end) {\n    removeCuesFromTrack(start, end, this.subtitlesTrack_);\n  }\n  /**\n   * fill the buffer with segements unless the sourceBuffers are\n   * currently updating\n   *\n   * Note: this function should only ever be called by monitorBuffer_\n   * and never directly\n   *\n   * @private\n   */\n  ;\n\n  _proto.fillBuffer_ = function fillBuffer_() {\n    var _this2 = this; // see if we need to begin loading immediately\n\n\n    var segmentInfo = this.chooseNextRequest_();\n\n    if (!segmentInfo) {\n      return;\n    }\n\n    if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n      // We don't have the timestamp offset that we need to sync subtitles.\n      // Rerun on a timestamp offset or user interaction.\n      var checkTimestampOffset = function checkTimestampOffset() {\n        _this2.state = 'READY';\n\n        if (!_this2.paused()) {\n          // if not paused, queue a buffer check as soon as possible\n          _this2.monitorBuffer_();\n        }\n      };\n\n      this.syncController_.one('timestampoffset', checkTimestampOffset);\n      this.state = 'WAITING_ON_TIMELINE';\n      return;\n    }\n\n    this.loadSegment_(segmentInfo);\n  } // never set a timestamp offset for vtt segments.\n  ;\n\n  _proto.timestampOffsetForSegment_ = function timestampOffsetForSegment_() {\n    return null;\n  };\n\n  _proto.chooseNextRequest_ = function chooseNextRequest_() {\n    return this.skipEmptySegments_(_SegmentLoader.prototype.chooseNextRequest_.call(this));\n  }\n  /**\n   * Prevents the segment loader from requesting segments we know contain no subtitles\n   * by walking forward until we find the next segment that we don't know whether it is\n   * empty or not.\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @return {Object}\n   *         a segment info object that describes the current segment\n   */\n  ;\n\n  _proto.skipEmptySegments_ = function skipEmptySegments_(segmentInfo) {\n    while (segmentInfo && segmentInfo.segment.empty) {\n      // stop at the last possible segmentInfo\n      if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n        segmentInfo = null;\n        break;\n      }\n\n      segmentInfo = this.generateSegmentInfo_({\n        playlist: segmentInfo.playlist,\n        mediaIndex: segmentInfo.mediaIndex + 1,\n        startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n        isSyncRequest: segmentInfo.isSyncRequest\n      });\n    }\n\n    return segmentInfo;\n  };\n\n  _proto.stopForError = function stopForError(error) {\n    this.error(error);\n    this.state = 'READY';\n    this.pause();\n    this.trigger('error');\n  }\n  /**\n   * append a decrypted segement to the SourceBuffer through a SourceUpdater\n   *\n   * @private\n   */\n  ;\n\n  _proto.segmentRequestFinished_ = function segmentRequestFinished_(error, simpleSegment, result) {\n    var _this3 = this;\n\n    if (!this.subtitlesTrack_) {\n      this.state = 'READY';\n      return;\n    }\n\n    this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n    if (!this.pendingSegment_) {\n      this.state = 'READY';\n      this.mediaRequestsAborted += 1;\n      return;\n    }\n\n    if (error) {\n      if (error.code === REQUEST_ERRORS.TIMEOUT) {\n        this.handleTimeout_();\n      }\n\n      if (error.code === REQUEST_ERRORS.ABORTED) {\n        this.mediaRequestsAborted += 1;\n      } else {\n        this.mediaRequestsErrored += 1;\n      }\n\n      this.stopForError(error);\n      return;\n    }\n\n    var segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n    // maintain functionality between segment loaders\n\n    this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n    if (simpleSegment.key) {\n      this.segmentKey(simpleSegment.key, true);\n    }\n\n    this.state = 'APPENDING'; // used for tests\n\n    this.trigger('appending');\n    var segment = segmentInfo.segment;\n\n    if (segment.map) {\n      segment.map.bytes = simpleSegment.map.bytes;\n    }\n\n    segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n      this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n      // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n      this.loadVttJs().then(function () {\n        return _this3.segmentRequestFinished_(error, simpleSegment, result);\n      }, function () {\n        return _this3.stopForError({\n          message: 'Error loading vtt.js'\n        });\n      });\n      return;\n    }\n\n    segment.requested = true;\n\n    try {\n      this.parseVTTCues_(segmentInfo);\n    } catch (e) {\n      this.stopForError({\n        message: e.message\n      });\n      return;\n    }\n\n    this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n\n    if (segmentInfo.cues.length) {\n      segmentInfo.timingInfo = {\n        start: segmentInfo.cues[0].startTime,\n        end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n      };\n    } else {\n      segmentInfo.timingInfo = {\n        start: segmentInfo.startOfSegment,\n        end: segmentInfo.startOfSegment + segmentInfo.duration\n      };\n    }\n\n    if (segmentInfo.isSyncRequest) {\n      this.trigger('syncinfoupdate');\n      this.pendingSegment_ = null;\n      this.state = 'READY';\n      return;\n    }\n\n    segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n    this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n    // the subtitle track\n\n    segmentInfo.cues.forEach(function (cue) {\n      _this3.subtitlesTrack_.addCue(_this3.featuresNativeTextTracks_ ? new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n    }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n    // cues to have identical time-intervals, but if the text is also identical\n    // we can safely assume it is a duplicate that can be removed (ex. when a cue\n    // \"overlaps\" VTT segments)\n\n    removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n    this.handleAppendsDone_();\n  };\n\n  _proto.handleData_ = function handleData_() {// noop as we shouldn't be getting video/audio data captions\n    // that we do not support here.\n  };\n\n  _proto.updateTimingInfoEnd_ = function updateTimingInfoEnd_() {// noop\n  }\n  /**\n   * Uses the WebVTT parser to parse the segment response\n   *\n   * @throws NoVttJsError\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @private\n   */\n  ;\n\n  _proto.parseVTTCues_ = function parseVTTCues_(segmentInfo) {\n    var decoder;\n    var decodeBytesToString = false;\n\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function') {\n      // caller is responsible for exception handling.\n      throw new NoVttJsError();\n    }\n\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder === 'function') {\n      decoder = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder('utf8');\n    } else {\n      decoder = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder();\n      decodeBytesToString = true;\n    }\n\n    var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, decoder);\n    segmentInfo.cues = [];\n    segmentInfo.timestampmap = {\n      MPEGTS: 0,\n      LOCAL: 0\n    };\n    parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n\n    parser.ontimestampmap = function (map) {\n      segmentInfo.timestampmap = map;\n    };\n\n    parser.onparsingerror = function (error) {\n      videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n    };\n\n    if (segmentInfo.segment.map) {\n      var mapData = segmentInfo.segment.map.bytes;\n\n      if (decodeBytesToString) {\n        mapData = uint8ToUtf8(mapData);\n      }\n\n      parser.parse(mapData);\n    }\n\n    var segmentData = segmentInfo.bytes;\n\n    if (decodeBytesToString) {\n      segmentData = uint8ToUtf8(segmentData);\n    }\n\n    parser.parse(segmentData);\n    parser.flush();\n  }\n  /**\n   * Updates the start and end times of any cues parsed by the WebVTT parser using\n   * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n   * from the SyncController\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @param {Object} mappingObj\n   *        object containing a mapping from TS to media time\n   * @param {Object} playlist\n   *        the playlist object containing the segment\n   * @private\n   */\n  ;\n\n  _proto.updateTimeMapping_ = function updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n    var segment = segmentInfo.segment;\n\n    if (!mappingObj) {\n      // If the sync controller does not have a mapping of TS to Media Time for the\n      // timeline, then we don't have enough information to update the cue\n      // start/end times\n      return;\n    }\n\n    if (!segmentInfo.cues.length) {\n      // If there are no cues, we also do not have enough information to figure out\n      // segment timing. Mark that the segment contains no cues so we don't re-request\n      // an empty segment.\n      segment.empty = true;\n      return;\n    }\n\n    var timestampmap = segmentInfo.timestampmap;\n    var diff = timestampmap.MPEGTS / mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_20__[\"ONE_SECOND_IN_TS\"] - timestampmap.LOCAL + mappingObj.mapping;\n    segmentInfo.cues.forEach(function (cue) {\n      // First convert cue time to TS time using the timestamp-map provided within the vtt\n      cue.startTime += diff;\n      cue.endTime += diff;\n    });\n\n    if (!playlist.syncInfo) {\n      var firstStart = segmentInfo.cues[0].startTime;\n      var lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n      playlist.syncInfo = {\n        mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n        time: Math.min(firstStart, lastStart - segment.duration)\n      };\n    }\n  };\n\n  return VTTSegmentLoader;\n}(SegmentLoader);\n/**\n * @file ad-cue-tags.js\n */\n\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n *        the track to find the cue for\n *\n * @param {number} mediaTime\n *        the time to find the cue at\n *\n * @return {Object|null}\n *         the found cue or null\n */\n\n\nvar findAdCue = function findAdCue(track, mediaTime) {\n  var cues = track.cues;\n\n  for (var i = 0; i < cues.length; i++) {\n    var cue = cues[i];\n\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n      return cue;\n    }\n  }\n\n  return null;\n};\n\nvar updateAdCues = function updateAdCues(media, track, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  if (!media.segments) {\n    return;\n  }\n\n  var mediaTime = offset;\n  var cue;\n\n  for (var i = 0; i < media.segments.length; i++) {\n    var segment = media.segments[i];\n\n    if (!cue) {\n      // Since the cues will span for at least the segment duration, adding a fudge\n      // factor of half segment duration will prevent duplicate cues from being\n      // created when timing info is not exact (e.g. cue start time initialized\n      // at 10.006677, but next call mediaTime is 10.003332 )\n      cue = findAdCue(track, mediaTime + segment.duration / 2);\n    }\n\n    if (cue) {\n      if ('cueIn' in segment) {\n        // Found a CUE-IN so end the cue\n        cue.endTime = mediaTime;\n        cue.adEndTime = mediaTime;\n        mediaTime += segment.duration;\n        cue = null;\n        continue;\n      }\n\n      if (mediaTime < cue.endTime) {\n        // Already processed this mediaTime for this cue\n        mediaTime += segment.duration;\n        continue;\n      } // otherwise extend cue until a CUE-IN is found\n\n\n      cue.endTime += segment.duration;\n    } else {\n      if ('cueOut' in segment) {\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n        cue.adStartTime = mediaTime; // Assumes tag format to be\n        // #EXT-X-CUE-OUT:30\n\n        cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n        track.addCue(cue);\n      }\n\n      if ('cueOutCont' in segment) {\n        // Entered into the middle of an ad cue\n        // Assumes tag formate to be\n        // #EXT-X-CUE-OUT-CONT:10/30\n        var _segment$cueOutCont$s = segment.cueOutCont.split('/').map(parseFloat),\n            adOffset = _segment$cueOutCont$s[0],\n            adTotal = _segment$cueOutCont$s[1];\n\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, '');\n        cue.adStartTime = mediaTime - adOffset;\n        cue.adEndTime = cue.adStartTime + adTotal;\n        track.addCue(cue);\n      }\n    }\n\n    mediaTime += segment.duration;\n  }\n}; // synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\n\nvar MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nvar syncPointStrategies = [// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n//                the equivalence display-time 0 === segment-index 0\n{\n  name: 'VOD',\n  run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n    if (duration !== Infinity) {\n      var syncPoint = {\n        time: 0,\n        segmentIndex: 0,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n\n    return null;\n  }\n}, // Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n  name: 'ProgramDateTime',\n  run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n    if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n      return null;\n    }\n\n    var syncPoint = null;\n    var lastDistance = null;\n    var partsAndSegments = getPartsAndSegments(playlist);\n    currentTime = currentTime || 0;\n\n    for (var i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      var index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      var partAndSegment = partsAndSegments[index];\n      var segment = partAndSegment.segment;\n      var datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n\n      if (!datetimeMapping || !segment.dateTimeObject) {\n        continue;\n      }\n\n      var segmentTime = segment.dateTimeObject.getTime() / 1000;\n      var start = segmentTime + datetimeMapping; // take part duration into account.\n\n      if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n        for (var z = 0; z < partAndSegment.partIndex; z++) {\n          start += segment.parts[z].duration;\n        }\n      }\n\n      var distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n      // currentTime and can stop looking for better candidates\n\n      if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n        break;\n      }\n\n      lastDistance = distance;\n      syncPoint = {\n        time: start,\n        segmentIndex: partAndSegment.segmentIndex,\n        partIndex: partAndSegment.partIndex\n      };\n    }\n\n    return syncPoint;\n  }\n}, // Stategy \"Segment\": We have a known time mapping for a timeline and a\n//                    segment in the current timeline with timing data\n{\n  name: 'Segment',\n  run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n    var syncPoint = null;\n    var lastDistance = null;\n    currentTime = currentTime || 0;\n    var partsAndSegments = getPartsAndSegments(playlist);\n\n    for (var i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      var index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      var partAndSegment = partsAndSegments[index];\n      var segment = partAndSegment.segment;\n      var start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n\n      if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n        var distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n        // currentTime and can stop looking for better candidates\n\n        if (lastDistance !== null && lastDistance < distance) {\n          break;\n        }\n\n        if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n          lastDistance = distance;\n          syncPoint = {\n            time: start,\n            segmentIndex: partAndSegment.segmentIndex,\n            partIndex: partAndSegment.partIndex\n          };\n        }\n      }\n    }\n\n    return syncPoint;\n  }\n}, // Stategy \"Discontinuity\": We have a discontinuity with a known\n//                          display-time\n{\n  name: 'Discontinuity',\n  run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n    var syncPoint = null;\n    currentTime = currentTime || 0;\n\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      var lastDistance = null;\n\n      for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\n        var segmentIndex = playlist.discontinuityStarts[i];\n        var discontinuity = playlist.discontinuitySequence + i + 1;\n        var discontinuitySync = syncController.discontinuities[discontinuity];\n\n        if (discontinuitySync) {\n          var distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n          // currentTime and can stop looking for better candidates\n\n          if (lastDistance !== null && lastDistance < distance) {\n            break;\n          }\n\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n            lastDistance = distance;\n            syncPoint = {\n              time: discontinuitySync.time,\n              segmentIndex: segmentIndex,\n              partIndex: null\n            };\n          }\n        }\n      }\n    }\n\n    return syncPoint;\n  }\n}, // Stategy \"Playlist\": We have a playlist with a known mapping of\n//                     segment index to display time\n{\n  name: 'Playlist',\n  run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n    if (playlist.syncInfo) {\n      var syncPoint = {\n        time: playlist.syncInfo.time,\n        segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n\n    return null;\n  }\n}];\n\nvar SyncController = /*#__PURE__*/function (_videojs$EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(SyncController, _videojs$EventTarget);\n\n  function SyncController(options) {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this; // ...for synching across variants\n\n    _this.timelines = [];\n    _this.discontinuities = [];\n    _this.timelineToDatetimeMappings = {};\n    _this.logger_ = logger('SyncController');\n    return _this;\n  }\n  /**\n   * Find a sync-point for the playlist specified\n   *\n   * A sync-point is defined as a known mapping from display-time to\n   * a segment-index in the current playlist.\n   *\n   * @param {Playlist} playlist\n   *        The playlist that needs a sync-point\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinite if playing a live source)\n   * @param {number} currentTimeline\n   *        The last timeline from which a segment was loaded\n   * @return {Object}\n   *          A sync-point object\n   */\n\n\n  var _proto = SyncController.prototype;\n\n  _proto.getSyncPoint = function getSyncPoint(playlist, duration, currentTimeline, currentTime) {\n    var syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime);\n\n    if (!syncPoints.length) {\n      // Signal that we need to attempt to get a sync-point manually\n      // by fetching a segment in the playlist and constructing\n      // a sync-point from that information\n      return null;\n    } // Now find the sync-point that is closest to the currentTime because\n    // that should result in the most accurate guess about which segment\n    // to fetch\n\n\n    return this.selectSyncPoint_(syncPoints, {\n      key: 'time',\n      value: currentTime\n    });\n  }\n  /**\n   * Calculate the amount of time that has expired off the playlist during playback\n   *\n   * @param {Playlist} playlist\n   *        Playlist object to calculate expired from\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinity if playling a live source)\n   * @return {number|null}\n   *          The amount of time that has expired off the playlist during playback. Null\n   *          if no sync-points for the playlist can be found.\n   */\n  ;\n\n  _proto.getExpiredTime = function getExpiredTime(playlist, duration) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n\n    var syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n    if (!syncPoints.length) {\n      return null;\n    }\n\n    var syncPoint = this.selectSyncPoint_(syncPoints, {\n      key: 'segmentIndex',\n      value: 0\n    }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n    // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n    if (syncPoint.segmentIndex > 0) {\n      syncPoint.time *= -1;\n    }\n\n    return Math.abs(syncPoint.time + sumDurations({\n      defaultDuration: playlist.targetDuration,\n      durationList: playlist.segments,\n      startIndex: syncPoint.segmentIndex,\n      endIndex: 0\n    }));\n  }\n  /**\n   * Runs each sync-point strategy and returns a list of sync-points returned by the\n   * strategies\n   *\n   * @private\n   * @param {Playlist} playlist\n   *        The playlist that needs a sync-point\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinity if playing a live source)\n   * @param {number} currentTimeline\n   *        The last timeline from which a segment was loaded\n   * @return {Array}\n   *          A list of sync-point objects\n   */\n  ;\n\n  _proto.runStrategies_ = function runStrategies_(playlist, duration, currentTimeline, currentTime) {\n    var syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n    for (var i = 0; i < syncPointStrategies.length; i++) {\n      var strategy = syncPointStrategies[i];\n      var syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime);\n\n      if (syncPoint) {\n        syncPoint.strategy = strategy.name;\n        syncPoints.push({\n          strategy: strategy.name,\n          syncPoint: syncPoint\n        });\n      }\n    }\n\n    return syncPoints;\n  }\n  /**\n   * Selects the sync-point nearest the specified target\n   *\n   * @private\n   * @param {Array} syncPoints\n   *        List of sync-points to select from\n   * @param {Object} target\n   *        Object specifying the property and value we are targeting\n   * @param {string} target.key\n   *        Specifies the property to target. Must be either 'time' or 'segmentIndex'\n   * @param {number} target.value\n   *        The value to target for the specified key.\n   * @return {Object}\n   *          The sync-point nearest the target\n   */\n  ;\n\n  _proto.selectSyncPoint_ = function selectSyncPoint_(syncPoints, target) {\n    var bestSyncPoint = syncPoints[0].syncPoint;\n    var bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n    var bestStrategy = syncPoints[0].strategy;\n\n    for (var i = 1; i < syncPoints.length; i++) {\n      var newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n\n      if (newDistance < bestDistance) {\n        bestDistance = newDistance;\n        bestSyncPoint = syncPoints[i].syncPoint;\n        bestStrategy = syncPoints[i].strategy;\n      }\n    }\n\n    this.logger_(\"syncPoint for [\" + target.key + \": \" + target.value + \"] chosen with strategy\" + (\" [\" + bestStrategy + \"]: [time:\" + bestSyncPoint.time + \",\") + (\" segmentIndex:\" + bestSyncPoint.segmentIndex) + (typeof bestSyncPoint.partIndex === 'number' ? \",partIndex:\" + bestSyncPoint.partIndex : '') + ']');\n    return bestSyncPoint;\n  }\n  /**\n   * Save any meta-data present on the segments when segments leave\n   * the live window to the playlist to allow for synchronization at the\n   * playlist level later.\n   *\n   * @param {Playlist} oldPlaylist - The previous active playlist\n   * @param {Playlist} newPlaylist - The updated and most current playlist\n   */\n  ;\n\n  _proto.saveExpiredSegmentInfo = function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n    var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n    if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n      videojs.log.warn(\"Not saving expired segment info. Media sequence gap \" + mediaSequenceDiff + \" is too large.\");\n      return;\n    } // When a segment expires from the playlist and it has a start time\n    // save that information as a possible sync-point reference in future\n\n\n    for (var i = mediaSequenceDiff - 1; i >= 0; i--) {\n      var lastRemovedSegment = oldPlaylist.segments[i];\n\n      if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n        newPlaylist.syncInfo = {\n          mediaSequence: oldPlaylist.mediaSequence + i,\n          time: lastRemovedSegment.start\n        };\n        this.logger_(\"playlist refresh sync: [time:\" + newPlaylist.syncInfo.time + \",\" + (\" mediaSequence: \" + newPlaylist.syncInfo.mediaSequence + \"]\"));\n        this.trigger('syncinfoupdate');\n        break;\n      }\n    }\n  }\n  /**\n   * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n   * before segments start to load.\n   *\n   * @param {Playlist} playlist - The currently active playlist\n   */\n  ;\n\n  _proto.setDateTimeMappingForStart = function setDateTimeMappingForStart(playlist) {\n    // It's possible for the playlist to be updated before playback starts, meaning time\n    // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n    // crossed, then the old time zero mapping (for the prior timeline) would be retained\n    // unless the mappings are cleared.\n    this.timelineToDatetimeMappings = {};\n\n    if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n      var firstSegment = playlist.segments[0];\n      var playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n      this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n    }\n  }\n  /**\n   * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n   * based on the latest timing information.\n   *\n   * @param {Object} options\n   *        Options object\n   * @param {SegmentInfo} options.segmentInfo\n   *        The current active request information\n   * @param {boolean} options.shouldSaveTimelineMapping\n   *        If there's a timeline change, determines if the timeline mapping should be\n   *        saved for timeline mapping and program date time mappings.\n   */\n  ;\n\n  _proto.saveSegmentTimingInfo = function saveSegmentTimingInfo(_ref) {\n    var segmentInfo = _ref.segmentInfo,\n        shouldSaveTimelineMapping = _ref.shouldSaveTimelineMapping;\n    var didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n    var segment = segmentInfo.segment;\n\n    if (didCalculateSegmentTimeMapping) {\n      this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n      // now with segment timing information\n\n      if (!segmentInfo.playlist.syncInfo) {\n        segmentInfo.playlist.syncInfo = {\n          mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n          time: segment.start\n        };\n      }\n    }\n\n    var dateTime = segment.dateTimeObject;\n\n    if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n      this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n    }\n  };\n\n  _proto.timestampOffsetForTimeline = function timestampOffsetForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n\n    return this.timelines[timeline].time;\n  };\n\n  _proto.mappingForTimeline = function mappingForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n\n    return this.timelines[timeline].mapping;\n  }\n  /**\n   * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n   * save that display time to the segment.\n   *\n   * @private\n   * @param {SegmentInfo} segmentInfo\n   *        The current active request information\n   * @param {Object} timingInfo\n   *        The start and end time of the current segment in \"media time\"\n   * @param {boolean} shouldSaveTimelineMapping\n   *        If there's a timeline change, determines if the timeline mapping should be\n   *        saved in timelines.\n   * @return {boolean}\n   *          Returns false if segment time mapping could not be calculated\n   */\n  ;\n\n  _proto.calculateSegmentTimeMapping_ = function calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n    // TODO: remove side effects\n    var segment = segmentInfo.segment;\n    var part = segmentInfo.part;\n    var mappingObj = this.timelines[segmentInfo.timeline];\n    var start;\n    var end;\n\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      mappingObj = {\n        time: segmentInfo.startOfSegment,\n        mapping: segmentInfo.startOfSegment - timingInfo.start\n      };\n\n      if (shouldSaveTimelineMapping) {\n        this.timelines[segmentInfo.timeline] = mappingObj;\n        this.trigger('timestampoffset');\n        this.logger_(\"time mapping for timeline \" + segmentInfo.timeline + \": \" + (\"[time: \" + mappingObj.time + \"] [mapping: \" + mappingObj.mapping + \"]\"));\n      }\n\n      start = segmentInfo.startOfSegment;\n      end = timingInfo.end + mappingObj.mapping;\n    } else if (mappingObj) {\n      start = timingInfo.start + mappingObj.mapping;\n      end = timingInfo.end + mappingObj.mapping;\n    } else {\n      return false;\n    }\n\n    if (part) {\n      part.start = start;\n      part.end = end;\n    } // If we don't have a segment start yet or the start value we got\n    // is less than our current segment.start value, save a new start value.\n    // We have to do this because parts will have segment timing info saved\n    // multiple times and we want segment start to be the earliest part start\n    // value for that segment.\n\n\n    if (!segment.start || start < segment.start) {\n      segment.start = start;\n    }\n\n    segment.end = end;\n    return true;\n  }\n  /**\n   * Each time we have discontinuity in the playlist, attempt to calculate the location\n   * in display of the start of the discontinuity and save that. We also save an accuracy\n   * value so that we save values with the most accuracy (closest to 0.)\n   *\n   * @private\n   * @param {SegmentInfo} segmentInfo - The current active request information\n   */\n  ;\n\n  _proto.saveDiscontinuitySyncInfo_ = function saveDiscontinuitySyncInfo_(segmentInfo) {\n    var playlist = segmentInfo.playlist;\n    var segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n    // the start of the range and it's accuracy is 0 (greater accuracy values\n    // mean more approximation)\n\n    if (segment.discontinuity) {\n      this.discontinuities[segment.timeline] = {\n        time: segment.start,\n        accuracy: 0\n      };\n    } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      // Search for future discontinuities that we can provide better timing\n      // information for and save that information for sync purposes\n      for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\n        var segmentIndex = playlist.discontinuityStarts[i];\n        var discontinuity = playlist.discontinuitySequence + i + 1;\n        var mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n        var accuracy = Math.abs(mediaIndexDiff);\n\n        if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n          var time = void 0;\n\n          if (mediaIndexDiff < 0) {\n            time = segment.start - sumDurations({\n              defaultDuration: playlist.targetDuration,\n              durationList: playlist.segments,\n              startIndex: segmentInfo.mediaIndex,\n              endIndex: segmentIndex\n            });\n          } else {\n            time = segment.end + sumDurations({\n              defaultDuration: playlist.targetDuration,\n              durationList: playlist.segments,\n              startIndex: segmentInfo.mediaIndex + 1,\n              endIndex: segmentIndex\n            });\n          }\n\n          this.discontinuities[discontinuity] = {\n            time: time,\n            accuracy: accuracy\n          };\n        }\n      }\n    }\n  };\n\n  _proto.dispose = function dispose() {\n    this.trigger('dispose');\n    this.off();\n  };\n\n  return SyncController;\n}(videojs.EventTarget);\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\n\nvar TimelineChangeController = /*#__PURE__*/function (_videojs$EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(TimelineChangeController, _videojs$EventTarget);\n\n  function TimelineChangeController() {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this;\n    _this.pendingTimelineChanges_ = {};\n    _this.lastTimelineChanges_ = {};\n    return _this;\n  }\n\n  var _proto = TimelineChangeController.prototype;\n\n  _proto.clearPendingTimelineChange = function clearPendingTimelineChange(type) {\n    this.pendingTimelineChanges_[type] = null;\n    this.trigger('pendingtimelinechange');\n  };\n\n  _proto.pendingTimelineChange = function pendingTimelineChange(_ref) {\n    var type = _ref.type,\n        from = _ref.from,\n        to = _ref.to;\n\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.pendingTimelineChanges_[type] = {\n        type: type,\n        from: from,\n        to: to\n      };\n      this.trigger('pendingtimelinechange');\n    }\n\n    return this.pendingTimelineChanges_[type];\n  };\n\n  _proto.lastTimelineChange = function lastTimelineChange(_ref2) {\n    var type = _ref2.type,\n        from = _ref2.from,\n        to = _ref2.to;\n\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.lastTimelineChanges_[type] = {\n        type: type,\n        from: from,\n        to: to\n      };\n      delete this.pendingTimelineChanges_[type];\n      this.trigger('timelinechange');\n    }\n\n    return this.lastTimelineChanges_[type];\n  };\n\n  _proto.dispose = function dispose() {\n    this.trigger('dispose');\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n    this.off();\n  };\n\n  return TimelineChangeController;\n}(videojs.EventTarget);\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n\nvar workerCode = transform(getWorkerString(function () {\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n  function createCommonjsModule(fn, basedir, module) {\n    return module = {\n      path: basedir,\n      exports: {},\n      require: function require(path, base) {\n        return commonjsRequire(path, base === undefined || base === null ? module.path : base);\n      }\n    }, fn(module, module.exports), module.exports;\n  }\n\n  function commonjsRequire() {\n    throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n  }\n\n  var createClass = createCommonjsModule(function (module) {\n    function _defineProperties(target, props) {\n      for (var i = 0; i < props.length; i++) {\n        var descriptor = props[i];\n        descriptor.enumerable = descriptor.enumerable || false;\n        descriptor.configurable = true;\n        if (\"value\" in descriptor) descriptor.writable = true;\n        Object.defineProperty(target, descriptor.key, descriptor);\n      }\n    }\n\n    function _createClass(Constructor, protoProps, staticProps) {\n      if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n      if (staticProps) _defineProperties(Constructor, staticProps);\n      return Constructor;\n    }\n\n    module.exports = _createClass;\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  });\n  var setPrototypeOf = createCommonjsModule(function (module) {\n    function _setPrototypeOf(o, p) {\n      module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n        o.__proto__ = p;\n        return o;\n      };\n\n      module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n      return _setPrototypeOf(o, p);\n    }\n\n    module.exports = _setPrototypeOf;\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  });\n  var inheritsLoose = createCommonjsModule(function (module) {\n    function _inheritsLoose(subClass, superClass) {\n      subClass.prototype = Object.create(superClass.prototype);\n      subClass.prototype.constructor = subClass;\n      setPrototypeOf(subClass, superClass);\n    }\n\n    module.exports = _inheritsLoose;\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  });\n  /**\n   * @file stream.js\n   */\n\n  /**\n   * A lightweight readable stream implemention that handles event dispatching.\n   *\n   * @class Stream\n   */\n\n  var Stream = /*#__PURE__*/function () {\n    function Stream() {\n      this.listeners = {};\n    }\n    /**\n     * Add a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener the callback to be invoked when an event of\n     * the specified type occurs\n     */\n\n\n    var _proto = Stream.prototype;\n\n    _proto.on = function on(type, listener) {\n      if (!this.listeners[type]) {\n        this.listeners[type] = [];\n      }\n\n      this.listeners[type].push(listener);\n    }\n    /**\n     * Remove a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener  a function previously registered for this\n     * type of event through `on`\n     * @return {boolean} if we could turn it off or not\n     */\n    ;\n\n    _proto.off = function off(type, listener) {\n      if (!this.listeners[type]) {\n        return false;\n      }\n\n      var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n      // In Video.js we slice listener functions\n      // on trigger so that it does not mess up the order\n      // while we loop through.\n      //\n      // Here we slice on off so that the loop in trigger\n      // can continue using it's old reference to loop without\n      // messing up the order.\n\n      this.listeners[type] = this.listeners[type].slice(0);\n      this.listeners[type].splice(index, 1);\n      return index > -1;\n    }\n    /**\n     * Trigger an event of the specified type on this stream. Any additional\n     * arguments to this function are passed as parameters to event listeners.\n     *\n     * @param {string} type the event name\n     */\n    ;\n\n    _proto.trigger = function trigger(type) {\n      var callbacks = this.listeners[type];\n\n      if (!callbacks) {\n        return;\n      } // Slicing the arguments on every invocation of this method\n      // can add a significant amount of overhead. Avoid the\n      // intermediate object creation for the common case of a\n      // single callback argument\n\n\n      if (arguments.length === 2) {\n        var length = callbacks.length;\n\n        for (var i = 0; i < length; ++i) {\n          callbacks[i].call(this, arguments[1]);\n        }\n      } else {\n        var args = Array.prototype.slice.call(arguments, 1);\n        var _length = callbacks.length;\n\n        for (var _i = 0; _i < _length; ++_i) {\n          callbacks[_i].apply(this, args);\n        }\n      }\n    }\n    /**\n     * Destroys the stream and cleans up.\n     */\n    ;\n\n    _proto.dispose = function dispose() {\n      this.listeners = {};\n    }\n    /**\n     * Forwards all `data` events on this stream to the destination stream. The\n     * destination stream should provide a method `push` to receive the data\n     * events as they arrive.\n     *\n     * @param {Stream} destination the stream that will receive all `data` events\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n     */\n    ;\n\n    _proto.pipe = function pipe(destination) {\n      this.on('data', function (data) {\n        destination.push(data);\n      });\n    };\n\n    return Stream;\n  }();\n  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n  /**\n   * Returns the subarray of a Uint8Array without PKCS#7 padding.\n   *\n   * @param padded {Uint8Array} unencrypted bytes that have been padded\n   * @return {Uint8Array} the unpadded bytes\n   * @see http://tools.ietf.org/html/rfc5652\n   */\n\n\n  function unpad(padded) {\n    return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n  }\n  /*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */\n\n  /**\n   * @file aes.js\n   *\n   * This file contains an adaptation of the AES decryption algorithm\n   * from the Standford Javascript Cryptography Library. That work is\n   * covered by the following copyright and permissions notice:\n   *\n   * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n   * All rights reserved.\n   *\n   * Redistribution and use in source and binary forms, with or without\n   * modification, are permitted provided that the following conditions are\n   * met:\n   *\n   * 1. Redistributions of source code must retain the above copyright\n   *    notice, this list of conditions and the following disclaimer.\n   *\n   * 2. Redistributions in binary form must reproduce the above\n   *    copyright notice, this list of conditions and the following\n   *    disclaimer in the documentation and/or other materials provided\n   *    with the distribution.\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n   * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n   * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n   * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * The views and conclusions contained in the software and documentation\n   * are those of the authors and should not be interpreted as representing\n   * official policies, either expressed or implied, of the authors.\n   */\n\n  /**\n   * Expand the S-box tables.\n   *\n   * @private\n   */\n\n\n  var precompute = function precompute() {\n    var tables = [[[], [], [], [], []], [[], [], [], [], []]];\n    var encTable = tables[0];\n    var decTable = tables[1];\n    var sbox = encTable[4];\n    var sboxInv = decTable[4];\n    var i;\n    var x;\n    var xInv;\n    var d = [];\n    var th = [];\n    var x2;\n    var x4;\n    var x8;\n    var s;\n    var tEnc;\n    var tDec; // Compute double and third tables\n\n    for (i = 0; i < 256; i++) {\n      th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n    }\n\n    for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n      // Compute sbox\n      s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n      s = s >> 8 ^ s & 255 ^ 99;\n      sbox[x] = s;\n      sboxInv[s] = x; // Compute MixColumns\n\n      x8 = d[x4 = d[x2 = d[x]]];\n      tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n      tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n      for (i = 0; i < 4; i++) {\n        encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n        decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n      }\n    } // Compactify. Considerable speedup on Firefox.\n\n\n    for (i = 0; i < 5; i++) {\n      encTable[i] = encTable[i].slice(0);\n      decTable[i] = decTable[i].slice(0);\n    }\n\n    return tables;\n  };\n\n  var aesTables = null;\n  /**\n   * Schedule out an AES key for both encryption and decryption. This\n   * is a low-level class. Use a cipher mode to do bulk encryption.\n   *\n   * @class AES\n   * @param key {Array} The key as an array of 4, 6 or 8 words.\n   */\n\n  var AES = /*#__PURE__*/function () {\n    function AES(key) {\n      /**\n      * The expanded S-box and inverse S-box tables. These will be computed\n      * on the client so that we don't have to send them down the wire.\n      *\n      * There are two tables, _tables[0] is for encryption and\n      * _tables[1] is for decryption.\n      *\n      * The first 4 sub-tables are the expanded S-box with MixColumns. The\n      * last (_tables[01][4]) is the S-box itself.\n      *\n      * @private\n      */\n      // if we have yet to precompute the S-box tables\n      // do so now\n      if (!aesTables) {\n        aesTables = precompute();\n      } // then make a copy of that object for use\n\n\n      this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n      var i;\n      var j;\n      var tmp;\n      var sbox = this._tables[0][4];\n      var decTable = this._tables[1];\n      var keyLen = key.length;\n      var rcon = 1;\n\n      if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n        throw new Error('Invalid aes key size');\n      }\n\n      var encKey = key.slice(0);\n      var decKey = [];\n      this._key = [encKey, decKey]; // schedule encryption keys\n\n      for (i = keyLen; i < 4 * keyLen + 28; i++) {\n        tmp = encKey[i - 1]; // apply sbox\n\n        if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n          tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n          if (i % keyLen === 0) {\n            tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n            rcon = rcon << 1 ^ (rcon >> 7) * 283;\n          }\n        }\n\n        encKey[i] = encKey[i - keyLen] ^ tmp;\n      } // schedule decryption keys\n\n\n      for (j = 0; i; j++, i--) {\n        tmp = encKey[j & 3 ? i : i - 4];\n\n        if (i <= 4 || j < 4) {\n          decKey[j] = tmp;\n        } else {\n          decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n        }\n      }\n    }\n    /**\n     * Decrypt 16 bytes, specified as four 32-bit words.\n     *\n     * @param {number} encrypted0 the first word to decrypt\n     * @param {number} encrypted1 the second word to decrypt\n     * @param {number} encrypted2 the third word to decrypt\n     * @param {number} encrypted3 the fourth word to decrypt\n     * @param {Int32Array} out the array to write the decrypted words\n     * into\n     * @param {number} offset the offset into the output array to start\n     * writing results\n     * @return {Array} The plaintext.\n     */\n\n\n    var _proto = AES.prototype;\n\n    _proto.decrypt = function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n      var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n      var a = encrypted0 ^ key[0];\n      var b = encrypted3 ^ key[1];\n      var c = encrypted2 ^ key[2];\n      var d = encrypted1 ^ key[3];\n      var a2;\n      var b2;\n      var c2; // key.length === 2 ?\n\n      var nInnerRounds = key.length / 4 - 2;\n      var i;\n      var kIndex = 4;\n      var table = this._tables[1]; // load up the tables\n\n      var table0 = table[0];\n      var table1 = table[1];\n      var table2 = table[2];\n      var table3 = table[3];\n      var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n      for (i = 0; i < nInnerRounds; i++) {\n        a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n        b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n        c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n        d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n        kIndex += 4;\n        a = a2;\n        b = b2;\n        c = c2;\n      } // Last round.\n\n\n      for (i = 0; i < 4; i++) {\n        out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n        a2 = a;\n        a = b;\n        b = c;\n        c = d;\n        d = a2;\n      }\n    };\n\n    return AES;\n  }();\n  /**\n   * A wrapper around the Stream class to use setTimeout\n   * and run stream \"jobs\" Asynchronously\n   *\n   * @class AsyncStream\n   * @extends Stream\n   */\n\n\n  var AsyncStream = /*#__PURE__*/function (_Stream) {\n    inheritsLoose(AsyncStream, _Stream);\n\n    function AsyncStream() {\n      var _this;\n\n      _this = _Stream.call(this, Stream) || this;\n      _this.jobs = [];\n      _this.delay = 1;\n      _this.timeout_ = null;\n      return _this;\n    }\n    /**\n     * process an async job\n     *\n     * @private\n     */\n\n\n    var _proto = AsyncStream.prototype;\n\n    _proto.processJob_ = function processJob_() {\n      this.jobs.shift()();\n\n      if (this.jobs.length) {\n        this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n      } else {\n        this.timeout_ = null;\n      }\n    }\n    /**\n     * push a job into the stream\n     *\n     * @param {Function} job the job to push into the stream\n     */\n    ;\n\n    _proto.push = function push(job) {\n      this.jobs.push(job);\n\n      if (!this.timeout_) {\n        this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n      }\n    };\n\n    return AsyncStream;\n  }(Stream);\n  /**\n   * Convert network-order (big-endian) bytes into their little-endian\n   * representation.\n   */\n\n\n  var ntoh = function ntoh(word) {\n    return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n  };\n  /**\n   * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n   *\n   * @param {Uint8Array} encrypted the encrypted bytes\n   * @param {Uint32Array} key the bytes of the decryption key\n   * @param {Uint32Array} initVector the initialization vector (IV) to\n   * use for the first round of CBC.\n   * @return {Uint8Array} the decrypted bytes\n   *\n   * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n   * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n   * @see https://tools.ietf.org/html/rfc2315\n   */\n\n\n  var decrypt = function decrypt(encrypted, key, initVector) {\n    // word-level access to the encrypted bytes\n    var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n    var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n    var decrypted = new Uint8Array(encrypted.byteLength);\n    var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n    // decrypted data\n\n    var init0;\n    var init1;\n    var init2;\n    var init3;\n    var encrypted0;\n    var encrypted1;\n    var encrypted2;\n    var encrypted3; // iteration variable\n\n    var wordIx; // pull out the words of the IV to ensure we don't modify the\n    // passed-in reference and easier access\n\n    init0 = initVector[0];\n    init1 = initVector[1];\n    init2 = initVector[2];\n    init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n    // to each decrypted block\n\n    for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n      // convert big-endian (network order) words into little-endian\n      // (javascript order)\n      encrypted0 = ntoh(encrypted32[wordIx]);\n      encrypted1 = ntoh(encrypted32[wordIx + 1]);\n      encrypted2 = ntoh(encrypted32[wordIx + 2]);\n      encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n      decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n      // plaintext\n\n      decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n      decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n      decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n      decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n      init0 = encrypted0;\n      init1 = encrypted1;\n      init2 = encrypted2;\n      init3 = encrypted3;\n    }\n\n    return decrypted;\n  };\n  /**\n   * The `Decrypter` class that manages decryption of AES\n   * data through `AsyncStream` objects and the `decrypt`\n   * function\n   *\n   * @param {Uint8Array} encrypted the encrypted bytes\n   * @param {Uint32Array} key the bytes of the decryption key\n   * @param {Uint32Array} initVector the initialization vector (IV) to\n   * @param {Function} done the function to run when done\n   * @class Decrypter\n   */\n\n\n  var Decrypter = /*#__PURE__*/function () {\n    function Decrypter(encrypted, key, initVector, done) {\n      var step = Decrypter.STEP;\n      var encrypted32 = new Int32Array(encrypted.buffer);\n      var decrypted = new Uint8Array(encrypted.byteLength);\n      var i = 0;\n      this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n      this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n\n      for (i = step; i < encrypted32.length; i += step) {\n        initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n        this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n      } // invoke the done() callback when everything is finished\n\n\n      this.asyncStream_.push(function () {\n        // remove pkcs#7 padding from the decrypted bytes\n        done(null, unpad(decrypted));\n      });\n    }\n    /**\n     * a getter for step the maximum number of bytes to process at one time\n     *\n     * @return {number} the value of step 32000\n     */\n\n\n    var _proto = Decrypter.prototype;\n    /**\n     * @private\n     */\n\n    _proto.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\n      return function () {\n        var bytes = decrypt(encrypted, key, initVector);\n        decrypted.set(bytes, encrypted.byteOffset);\n      };\n    };\n\n    createClass(Decrypter, null, [{\n      key: \"STEP\",\n      get: function get() {\n        // 4 * 8000;\n        return 32000;\n      }\n    }]);\n    return Decrypter;\n  }();\n\n  var win;\n\n  if (typeof window !== \"undefined\") {\n    win = window;\n  } else if (typeof commonjsGlobal !== \"undefined\") {\n    win = commonjsGlobal;\n  } else if (typeof self !== \"undefined\") {\n    win = self;\n  } else {\n    win = {};\n  }\n\n  var window_1 = win;\n\n  var isArrayBufferView = function isArrayBufferView(obj) {\n    if (ArrayBuffer.isView === 'function') {\n      return ArrayBuffer.isView(obj);\n    }\n\n    return obj && obj.buffer instanceof ArrayBuffer;\n  };\n\n  var BigInt = window_1.BigInt || Number;\n  [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n  /**\n   * Creates an object for sending to a web worker modifying properties that are TypedArrays\n   * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n   *\n   * @param {Object} message\n   *        Object of properties and values to send to the web worker\n   * @return {Object}\n   *         Modified message with TypedArray values expanded\n   * @function createTransferableMessage\n   */\n\n\n  var createTransferableMessage = function createTransferableMessage(message) {\n    var transferable = {};\n    Object.keys(message).forEach(function (key) {\n      var value = message[key];\n\n      if (isArrayBufferView(value)) {\n        transferable[key] = {\n          bytes: value.buffer,\n          byteOffset: value.byteOffset,\n          byteLength: value.byteLength\n        };\n      } else {\n        transferable[key] = value;\n      }\n    });\n    return transferable;\n  };\n  /* global self */\n\n  /**\n   * Our web worker interface so that things can talk to aes-decrypter\n   * that will be running in a web worker. the scope is passed to this by\n   * webworkify.\n   */\n\n\n  self.onmessage = function (event) {\n    var data = event.data;\n    var encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n    var key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n    var iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n    /* eslint-disable no-new, handle-callback-err */\n\n    new Decrypter(encrypted, key, iv, function (err, bytes) {\n      self.postMessage(createTransferableMessage({\n        source: data.source,\n        decrypted: bytes\n      }), [bytes.buffer]);\n    });\n    /* eslint-enable */\n  };\n}));\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nvar audioTrackKind_ = function audioTrackKind_(properties) {\n  var kind = properties[\"default\"] ? 'main' : 'alternative';\n\n  if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n    kind = 'main-desc';\n  }\n\n  return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n *        SegmentLoader to pause\n * @param {Object} mediaType\n *        Active media type\n * @function stopLoaders\n */\n\n\nvar stopLoaders = function stopLoaders(segmentLoader, mediaType) {\n  segmentLoader.abort();\n  segmentLoader.pause();\n\n  if (mediaType && mediaType.activePlaylistLoader) {\n    mediaType.activePlaylistLoader.pause();\n    mediaType.activePlaylistLoader = null;\n  }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n *        PlaylistLoader to start loading\n * @param {Object} mediaType\n *        Active media type\n * @function startLoaders\n */\n\n\nvar startLoaders = function startLoaders(playlistLoader, mediaType) {\n  // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n  // playlist loader\n  mediaType.activePlaylistLoader = playlistLoader;\n  playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Handler for a non-destructive resync of SegmentLoader when the active media\n *         group changes.\n * @function onGroupChanged\n */\n\n\nvar onGroupChanged = function onGroupChanged(type, settings) {\n  return function () {\n    var _settings$segmentLoad = settings.segmentLoaders,\n        segmentLoader = _settings$segmentLoad[type],\n        mainSegmentLoader = _settings$segmentLoad.main,\n        mediaType = settings.mediaTypes[type];\n    var activeTrack = mediaType.activeTrack();\n    var activeGroup = mediaType.getActiveGroup();\n    var previousActiveLoader = mediaType.activePlaylistLoader;\n    var lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n    if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n      return;\n    }\n\n    mediaType.lastGroup_ = activeGroup;\n    mediaType.lastTrack_ = activeTrack;\n    stopLoaders(segmentLoader, mediaType);\n\n    if (!activeGroup || activeGroup.isMasterPlaylist) {\n      // there is no group active or active group is a main playlist and won't change\n      return;\n    }\n\n    if (!activeGroup.playlistLoader) {\n      if (previousActiveLoader) {\n        // The previous group had a playlist loader but the new active group does not\n        // this means we are switching from demuxed to muxed audio. In this case we want to\n        // do a destructive reset of the main segment loader and not restart the audio\n        // loaders.\n        mainSegmentLoader.resetEverything();\n      }\n\n      return;\n    } // Non-destructive resync\n\n\n    segmentLoader.resyncLoader();\n    startLoaders(activeGroup.playlistLoader, mediaType);\n  };\n};\n\nvar onGroupChanging = function onGroupChanging(type, settings) {\n  return function () {\n    var segmentLoader = settings.segmentLoaders[type],\n        mediaType = settings.mediaTypes[type];\n    mediaType.lastGroup_ = null;\n    segmentLoader.abort();\n    segmentLoader.pause();\n  };\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Handler for a destructive reset of SegmentLoader when the active media\n *         track changes.\n * @function onTrackChanged\n */\n\n\nvar onTrackChanged = function onTrackChanged(type, settings) {\n  return function () {\n    var masterPlaylistLoader = settings.masterPlaylistLoader,\n        _settings$segmentLoad2 = settings.segmentLoaders,\n        segmentLoader = _settings$segmentLoad2[type],\n        mainSegmentLoader = _settings$segmentLoad2.main,\n        mediaType = settings.mediaTypes[type];\n    var activeTrack = mediaType.activeTrack();\n    var activeGroup = mediaType.getActiveGroup();\n    var previousActiveLoader = mediaType.activePlaylistLoader;\n    var lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n    if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n      return;\n    }\n\n    mediaType.lastGroup_ = activeGroup;\n    mediaType.lastTrack_ = activeTrack;\n    stopLoaders(segmentLoader, mediaType);\n\n    if (!activeGroup) {\n      // there is no group active so we do not want to restart loaders\n      return;\n    }\n\n    if (activeGroup.isMasterPlaylist) {\n      // track did not change, do nothing\n      if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n        return;\n      }\n\n      var mpc = settings.vhs.masterPlaylistController_;\n      var newPlaylist = mpc.selectPlaylist(); // media will not change do nothing\n\n      if (mpc.media() === newPlaylist) {\n        return;\n      }\n\n      mediaType.logger_(\"track change. Switching master audio from \" + lastTrack.id + \" to \" + activeTrack.id);\n      masterPlaylistLoader.pause();\n      mainSegmentLoader.resetEverything();\n      mpc.fastQualityChange_(newPlaylist);\n      return;\n    }\n\n    if (type === 'AUDIO') {\n      if (!activeGroup.playlistLoader) {\n        // when switching from demuxed audio/video to muxed audio/video (noted by no\n        // playlist loader for the audio group), we want to do a destructive reset of the\n        // main segment loader and not restart the audio loaders\n        mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n        // it should be stopped\n\n        mainSegmentLoader.resetEverything();\n        return;\n      } // although the segment loader is an audio segment loader, call the setAudio\n      // function to ensure it is prepared to re-append the init segment (or handle other\n      // config changes)\n\n\n      segmentLoader.setAudio(true);\n      mainSegmentLoader.setAudio(false);\n    }\n\n    if (previousActiveLoader === activeGroup.playlistLoader) {\n      // Nothing has actually changed. This can happen because track change events can fire\n      // multiple times for a \"single\" change. One for enabling the new active track, and\n      // one for disabling the track that was active\n      startLoaders(activeGroup.playlistLoader, mediaType);\n      return;\n    }\n\n    if (segmentLoader.track) {\n      // For WebVTT, set the new text track in the segmentloader\n      segmentLoader.track(activeTrack);\n    } // destructive reset\n\n\n    segmentLoader.resetEverything();\n    startLoaders(activeGroup.playlistLoader, mediaType);\n  };\n};\n\nvar onError = {\n  /**\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n   * an error.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Error handler. Logs warning (or error if the playlist is blacklisted) to\n   *         console and switches back to default audio track.\n   * @function onError.AUDIO\n   */\n  AUDIO: function AUDIO(type, settings) {\n    return function () {\n      var segmentLoader = settings.segmentLoaders[type],\n          mediaType = settings.mediaTypes[type],\n          blacklistCurrentPlaylist = settings.blacklistCurrentPlaylist;\n      stopLoaders(segmentLoader, mediaType); // switch back to default audio track\n\n      var activeTrack = mediaType.activeTrack();\n      var activeGroup = mediaType.activeGroup();\n      var id = (activeGroup.filter(function (group) {\n        return group[\"default\"];\n      })[0] || activeGroup[0]).id;\n      var defaultTrack = mediaType.tracks[id];\n\n      if (activeTrack === defaultTrack) {\n        // Default track encountered an error. All we can do now is blacklist the current\n        // rendition and hope another will switch audio groups\n        blacklistCurrentPlaylist({\n          message: 'Problem encountered loading the default audio track.'\n        });\n        return;\n      }\n\n      videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n\n      for (var trackId in mediaType.tracks) {\n        mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n      }\n\n      mediaType.onTrackChanged();\n    };\n  },\n\n  /**\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n   * an error.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Error handler. Logs warning to console and disables the active subtitle track\n   * @function onError.SUBTITLES\n   */\n  SUBTITLES: function SUBTITLES(type, settings) {\n    return function () {\n      var segmentLoader = settings.segmentLoaders[type],\n          mediaType = settings.mediaTypes[type];\n      videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n      stopLoaders(segmentLoader, mediaType);\n      var track = mediaType.activeTrack();\n\n      if (track) {\n        track.mode = 'disabled';\n      }\n\n      mediaType.onTrackChanged();\n    };\n  }\n};\nvar setupListeners = {\n  /**\n   * Setup event listeners for audio playlist loader\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {PlaylistLoader|null} playlistLoader\n   *        PlaylistLoader to register listeners on\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function setupListeners.AUDIO\n   */\n  AUDIO: function AUDIO(type, playlistLoader, settings) {\n    if (!playlistLoader) {\n      // no playlist loader means audio will be muxed with the video\n      return;\n    }\n\n    var tech = settings.tech,\n        requestOptions = settings.requestOptions,\n        segmentLoader = settings.segmentLoaders[type];\n    playlistLoader.on('loadedmetadata', function () {\n      var media = playlistLoader.media();\n      segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n      // permits, start downloading segments\n\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('loadedplaylist', function () {\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n      if (!tech.paused()) {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('error', onError[type](type, settings));\n  },\n\n  /**\n   * Setup event listeners for subtitle playlist loader\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {PlaylistLoader|null} playlistLoader\n   *        PlaylistLoader to register listeners on\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function setupListeners.SUBTITLES\n   */\n  SUBTITLES: function SUBTITLES(type, playlistLoader, settings) {\n    var tech = settings.tech,\n        requestOptions = settings.requestOptions,\n        segmentLoader = settings.segmentLoaders[type],\n        mediaType = settings.mediaTypes[type];\n    playlistLoader.on('loadedmetadata', function () {\n      var media = playlistLoader.media();\n      segmentLoader.playlist(media, requestOptions);\n      segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n      // permits, start downloading segments\n\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('loadedplaylist', function () {\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n      if (!tech.paused()) {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('error', onError[type](type, settings));\n  }\n};\nvar initialize = {\n  /**\n   * Setup PlaylistLoaders and AudioTracks for the audio groups\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize.AUDIO\n   */\n  'AUDIO': function AUDIO(type, settings) {\n    var vhs = settings.vhs,\n        sourceType = settings.sourceType,\n        segmentLoader = settings.segmentLoaders[type],\n        requestOptions = settings.requestOptions,\n        mediaGroups = settings.master.mediaGroups,\n        _settings$mediaTypes$ = settings.mediaTypes[type],\n        groups = _settings$mediaTypes$.groups,\n        tracks = _settings$mediaTypes$.tracks,\n        logger_ = _settings$mediaTypes$.logger_,\n        masterPlaylistLoader = settings.masterPlaylistLoader;\n    var audioOnlyMaster = isAudioOnly(masterPlaylistLoader.master); // force a default if we have none\n\n    if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n      mediaGroups[type] = {\n        main: {\n          \"default\": {\n            \"default\": true\n          }\n        }\n      };\n\n      if (audioOnlyMaster) {\n        mediaGroups[type].main[\"default\"].playlists = masterPlaylistLoader.master.playlists;\n      }\n    }\n\n    for (var groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (var variantLabel in mediaGroups[type][groupId]) {\n        var properties = mediaGroups[type][groupId][variantLabel];\n        var playlistLoader = void 0;\n\n        if (audioOnlyMaster) {\n          logger_(\"AUDIO group '\" + groupId + \"' label '\" + variantLabel + \"' is a master playlist\");\n          properties.isMasterPlaylist = true;\n          playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n          // use the resolved media playlist object\n        } else if (sourceType === 'vhs-json' && properties.playlists) {\n          playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n        } else if (properties.resolvedUri) {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n          // should we even have properties.playlists in this check.\n        } else if (properties.playlists && sourceType === 'dash') {\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, masterPlaylistLoader);\n        } else {\n          // no resolvedUri means the audio is muxed with the video when using this\n          // audio track\n          playlistLoader = null;\n        }\n\n        properties = videojs.mergeOptions({\n          id: variantLabel,\n          playlistLoader: playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          var track = new videojs.AudioTrack({\n            id: variantLabel,\n            kind: audioTrackKind_(properties),\n            enabled: false,\n            language: properties.language,\n            \"default\": properties[\"default\"],\n            label: variantLabel\n          });\n          tracks[variantLabel] = track;\n        }\n      }\n    } // setup single error event handler for the segment loader\n\n\n    segmentLoader.on('error', onError[type](type, settings));\n  },\n\n  /**\n   * Setup PlaylistLoaders and TextTracks for the subtitle groups\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize.SUBTITLES\n   */\n  'SUBTITLES': function SUBTITLES(type, settings) {\n    var tech = settings.tech,\n        vhs = settings.vhs,\n        sourceType = settings.sourceType,\n        segmentLoader = settings.segmentLoaders[type],\n        requestOptions = settings.requestOptions,\n        mediaGroups = settings.master.mediaGroups,\n        _settings$mediaTypes$2 = settings.mediaTypes[type],\n        groups = _settings$mediaTypes$2.groups,\n        tracks = _settings$mediaTypes$2.tracks,\n        masterPlaylistLoader = settings.masterPlaylistLoader;\n\n    for (var groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (var variantLabel in mediaGroups[type][groupId]) {\n        if (mediaGroups[type][groupId][variantLabel].forced) {\n          // Subtitle playlists with the forced attribute are not selectable in Safari.\n          // According to Apple's HLS Authoring Specification:\n          //   If content has forced subtitles and regular subtitles in a given language,\n          //   the regular subtitles track in that language MUST contain both the forced\n          //   subtitles and the regular subtitles for that language.\n          // Because of this requirement and that Safari does not add forced subtitles,\n          // forced subtitles are skipped here to maintain consistent experience across\n          // all platforms\n          continue;\n        }\n\n        var properties = mediaGroups[type][groupId][variantLabel];\n        var playlistLoader = void 0;\n\n        if (sourceType === 'hls') {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n        } else if (sourceType === 'dash') {\n          var playlists = properties.playlists.filter(function (p) {\n            return p.excludeUntil !== Infinity;\n          });\n\n          if (!playlists.length) {\n            return;\n          }\n\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, masterPlaylistLoader);\n        } else if (sourceType === 'vhs-json') {\n          playlistLoader = new PlaylistLoader( // if the vhs-json object included the media playlist, use the media playlist\n          // as provided, otherwise use the resolved URI to load the playlist\n          properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n        }\n\n        properties = videojs.mergeOptions({\n          id: variantLabel,\n          playlistLoader: playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          var track = tech.addRemoteTextTrack({\n            id: variantLabel,\n            kind: 'subtitles',\n            \"default\": properties[\"default\"] && properties.autoselect,\n            language: properties.language,\n            label: variantLabel\n          }, false).track;\n          tracks[variantLabel] = track;\n        }\n      }\n    } // setup single error event handler for the segment loader\n\n\n    segmentLoader.on('error', onError[type](type, settings));\n  },\n\n  /**\n   * Setup TextTracks for the closed-caption groups\n   *\n   * @param {String} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize['CLOSED-CAPTIONS']\n   */\n  'CLOSED-CAPTIONS': function CLOSEDCAPTIONS(type, settings) {\n    var tech = settings.tech,\n        mediaGroups = settings.master.mediaGroups,\n        _settings$mediaTypes$3 = settings.mediaTypes[type],\n        groups = _settings$mediaTypes$3.groups,\n        tracks = _settings$mediaTypes$3.tracks;\n\n    for (var groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (var variantLabel in mediaGroups[type][groupId]) {\n        var properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n        if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n          continue;\n        }\n\n        var captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        var newProps = {\n          label: variantLabel,\n          language: properties.language,\n          instreamId: properties.instreamId,\n          \"default\": properties[\"default\"] && properties.autoselect\n        };\n\n        if (captionServices[newProps.instreamId]) {\n          newProps = videojs.mergeOptions(newProps, captionServices[newProps.instreamId]);\n        }\n\n        if (newProps[\"default\"] === undefined) {\n          delete newProps[\"default\"];\n        } // No PlaylistLoader is required for Closed-Captions because the captions are\n        // embedded within the video stream\n\n\n        groups[groupId].push(videojs.mergeOptions({\n          id: variantLabel\n        }, properties));\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          var track = tech.addRemoteTextTrack({\n            id: newProps.instreamId,\n            kind: 'captions',\n            \"default\": newProps[\"default\"],\n            language: newProps.language,\n            label: newProps.label\n          }, false).track;\n          tracks[variantLabel] = track;\n        }\n      }\n    }\n  }\n};\n\nvar groupMatch = function groupMatch(list, media) {\n  for (var i = 0; i < list.length; i++) {\n    if (playlistMatch(media, list[i])) {\n      return true;\n    }\n\n    if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n      return true;\n    }\n  }\n\n  return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Function that returns the active media group for the provided type. Takes an\n *         optional parameter {TextTrack} track. If no track is provided, a list of all\n *         variants in the group, otherwise the variant corresponding to the provided\n *         track is returned.\n * @function activeGroup\n */\n\n\nvar activeGroup = function activeGroup(type, settings) {\n  return function (track) {\n    var masterPlaylistLoader = settings.masterPlaylistLoader,\n        groups = settings.mediaTypes[type].groups;\n    var media = masterPlaylistLoader.media();\n\n    if (!media) {\n      return null;\n    }\n\n    var variants = null; // set to variants to main media active group\n\n    if (media.attributes[type]) {\n      variants = groups[media.attributes[type]];\n    }\n\n    var groupKeys = Object.keys(groups);\n\n    if (!variants) {\n      // find the masterPlaylistLoader media\n      // that is in a media group if we are dealing\n      // with audio only\n      if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.master)) {\n        for (var i = 0; i < groupKeys.length; i++) {\n          var groupPropertyList = groups[groupKeys[i]];\n\n          if (groupMatch(groupPropertyList, media)) {\n            variants = groupPropertyList;\n            break;\n          }\n        } // use the main group if it exists\n\n      } else if (groups.main) {\n        variants = groups.main; // only one group, use that one\n      } else if (groupKeys.length === 1) {\n        variants = groups[groupKeys[0]];\n      }\n    }\n\n    if (typeof track === 'undefined') {\n      return variants;\n    }\n\n    if (track === null || !variants) {\n      // An active track was specified so a corresponding group is expected. track === null\n      // means no track is currently active so there is no corresponding group\n      return null;\n    }\n\n    return variants.filter(function (props) {\n      return props.id === track.id;\n    })[0] || null;\n  };\n};\n\nvar activeTrack = {\n  /**\n   * Returns a function used to get the active track of type provided\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Function that returns the active media track for the provided type. Returns\n   *         null if no track is active\n   * @function activeTrack.AUDIO\n   */\n  AUDIO: function AUDIO(type, settings) {\n    return function () {\n      var tracks = settings.mediaTypes[type].tracks;\n\n      for (var id in tracks) {\n        if (tracks[id].enabled) {\n          return tracks[id];\n        }\n      }\n\n      return null;\n    };\n  },\n\n  /**\n   * Returns a function used to get the active track of type provided\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Function that returns the active media track for the provided type. Returns\n   *         null if no track is active\n   * @function activeTrack.SUBTITLES\n   */\n  SUBTITLES: function SUBTITLES(type, settings) {\n    return function () {\n      var tracks = settings.mediaTypes[type].tracks;\n\n      for (var id in tracks) {\n        if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n          return tracks[id];\n        }\n      }\n\n      return null;\n    };\n  }\n};\n\nvar getActiveGroup = function getActiveGroup(type, _ref) {\n  var mediaTypes = _ref.mediaTypes;\n  return function () {\n    var activeTrack_ = mediaTypes[type].activeTrack();\n\n    if (!activeTrack_) {\n      return null;\n    }\n\n    return mediaTypes[type].activeGroup(activeTrack_);\n  };\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the master manifest.\n *\n * @param {Object} settings\n *        Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n *        The tech of the player\n * @param {Object} settings.requestOptions\n *        XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.masterPlaylistLoader\n *        PlaylistLoader for the master source\n * @param {VhsHandler} settings.vhs\n *        VHS SourceHandler\n * @param {Object} settings.master\n *        The parsed master manifest\n * @param {Object} settings.mediaTypes\n *        Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.blacklistCurrentPlaylist\n *        Blacklists the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\n\nvar setupMediaGroups = function setupMediaGroups(settings) {\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n    initialize[type](type, settings);\n  });\n  var mediaTypes = settings.mediaTypes,\n      masterPlaylistLoader = settings.masterPlaylistLoader,\n      tech = settings.tech,\n      vhs = settings.vhs,\n      _settings$segmentLoad3 = settings.segmentLoaders,\n      audioSegmentLoader = _settings$segmentLoad3['AUDIO'],\n      mainSegmentLoader = _settings$segmentLoad3.main; // setup active group and track getters and change event handlers\n\n  ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n    mediaTypes[type].activeGroup = activeGroup(type, settings);\n    mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n    mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n    mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n    mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n    mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n  }); // DO NOT enable the default subtitle or caption track.\n  // DO enable the default audio track\n\n  var audioGroup = mediaTypes.AUDIO.activeGroup();\n\n  if (audioGroup) {\n    var groupId = (audioGroup.filter(function (group) {\n      return group[\"default\"];\n    })[0] || audioGroup[0]).id;\n    mediaTypes.AUDIO.tracks[groupId].enabled = true;\n    mediaTypes.AUDIO.onGroupChanged();\n    mediaTypes.AUDIO.onTrackChanged();\n    var activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n    // track is changed, but needs to be handled here since the track may not be considered\n    // changed on the first call to onTrackChanged\n\n    if (!activeAudioGroup.playlistLoader) {\n      // either audio is muxed with video or the stream is audio only\n      mainSegmentLoader.setAudio(true);\n    } else {\n      // audio is demuxed\n      mainSegmentLoader.setAudio(false);\n      audioSegmentLoader.setAudio(true);\n    }\n  }\n\n  masterPlaylistLoader.on('mediachange', function () {\n    ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n      return mediaTypes[type].onGroupChanged();\n    });\n  });\n  masterPlaylistLoader.on('mediachanging', function () {\n    ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n      return mediaTypes[type].onGroupChanging();\n    });\n  }); // custom audio track change event handler for usage event\n\n  var onAudioTrackChanged = function onAudioTrackChanged() {\n    mediaTypes.AUDIO.onTrackChanged();\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-audio-change'\n    });\n    tech.trigger({\n      type: 'usage',\n      name: 'hls-audio-change'\n    });\n  };\n\n  tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n  tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n  vhs.on('dispose', function () {\n    tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n    tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n  }); // clear existing audio tracks and add the ones we just created\n\n  tech.clearTracks('audio');\n\n  for (var id in mediaTypes.AUDIO.tracks) {\n    tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n  }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n *         Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\n\nvar createMediaTypes = function createMediaTypes() {\n  var mediaTypes = {};\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n    mediaTypes[type] = {\n      groups: {},\n      tracks: {},\n      activePlaylistLoader: null,\n      activeGroup: noop,\n      activeTrack: noop,\n      getActiveGroup: noop,\n      onGroupChanged: noop,\n      onTrackChanged: noop,\n      lastTrack_: null,\n      logger_: logger(\"MediaGroups[\" + type + \"]\")\n    };\n  });\n  return mediaTypes;\n};\n\nvar ABORT_EARLY_BLACKLIST_SECONDS = 60 * 2;\nvar Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nvar loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\n\nvar sumLoaderStat = function sumLoaderStat(stat) {\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\n\nvar shouldSwitchToMedia = function shouldSwitchToMedia(_ref) {\n  var currentPlaylist = _ref.currentPlaylist,\n      buffered = _ref.buffered,\n      currentTime = _ref.currentTime,\n      nextPlaylist = _ref.nextPlaylist,\n      bufferLowWaterLine = _ref.bufferLowWaterLine,\n      bufferHighWaterLine = _ref.bufferHighWaterLine,\n      duration = _ref.duration,\n      experimentalBufferBasedABR = _ref.experimentalBufferBasedABR,\n      log = _ref.log; // we have no other playlist to switch to\n\n  if (!nextPlaylist) {\n    videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n    return false;\n  }\n\n  var sharedLogLine = \"allowing switch \" + (currentPlaylist && currentPlaylist.id || 'null') + \" -> \" + nextPlaylist.id;\n\n  if (!currentPlaylist) {\n    log(sharedLogLine + \" as current playlist is not set\");\n    return true;\n  } // no need to switch if playlist is the same\n\n\n  if (nextPlaylist.id === currentPlaylist.id) {\n    return false;\n  } // determine if current time is in a buffered range.\n\n\n  var isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n  // This is because in LIVE, the player plays 3 segments from the end of the\n  // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n  // in those segments, a viewer will never experience a rendition upswitch.\n\n  if (!currentPlaylist.endList) {\n    // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n    // doubles the time to first playback.\n    if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n      log(\"not \" + sharedLogLine + \" as current playlist is live llhls, but currentTime isn't in buffered.\");\n      return false;\n    }\n\n    log(sharedLogLine + \" as current playlist is live\");\n    return true;\n  }\n\n  var forwardBuffer = timeAheadOf(buffered, currentTime);\n  var maxBufferLowWaterLine = experimentalBufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n  // duration is below the max potential low water line\n\n  if (duration < maxBufferLowWaterLine) {\n    log(sharedLogLine + \" as duration < max low water line (\" + duration + \" < \" + maxBufferLowWaterLine + \")\");\n    return true;\n  }\n\n  var nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n  var currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n  // we can switch down\n\n  if (nextBandwidth < currBandwidth && (!experimentalBufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n    var logLine = sharedLogLine + \" as next bandwidth < current bandwidth (\" + nextBandwidth + \" < \" + currBandwidth + \")\";\n\n    if (experimentalBufferBasedABR) {\n      logLine += \" and forwardBuffer < bufferHighWaterLine (\" + forwardBuffer + \" < \" + bufferHighWaterLine + \")\";\n    }\n\n    log(logLine);\n    return true;\n  } // and if our buffer is higher than the low water line,\n  // we can switch up\n\n\n  if ((!experimentalBufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n    var _logLine = sharedLogLine + \" as forwardBuffer >= bufferLowWaterLine (\" + forwardBuffer + \" >= \" + bufferLowWaterLine + \")\";\n\n    if (experimentalBufferBasedABR) {\n      _logLine += \" and next bandwidth > current bandwidth (\" + nextBandwidth + \" > \" + currBandwidth + \")\";\n    }\n\n    log(_logLine);\n    return true;\n  }\n\n  log(\"not \" + sharedLogLine + \" as no switching criteria met\");\n  return false;\n};\n/**\n * the master playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a master playlist and a series of audio playlists\n * if they are available\n *\n * @class MasterPlaylistController\n * @extends videojs.EventTarget\n */\n\n\nvar MasterPlaylistController = /*#__PURE__*/function (_videojs$EventTarget) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(MasterPlaylistController, _videojs$EventTarget);\n\n  function MasterPlaylistController(options) {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this;\n    var src = options.src,\n        handleManifestRedirects = options.handleManifestRedirects,\n        withCredentials = options.withCredentials,\n        tech = options.tech,\n        bandwidth = options.bandwidth,\n        externVhs = options.externVhs,\n        useCueTags = options.useCueTags,\n        blacklistDuration = options.blacklistDuration,\n        enableLowInitialPlaylist = options.enableLowInitialPlaylist,\n        sourceType = options.sourceType,\n        cacheEncryptionKeys = options.cacheEncryptionKeys,\n        experimentalBufferBasedABR = options.experimentalBufferBasedABR,\n        experimentalLeastPixelDiffSelector = options.experimentalLeastPixelDiffSelector,\n        captionServices = options.captionServices;\n\n    if (!src) {\n      throw new Error('A non-empty playlist URL or JSON manifest string is required');\n    }\n\n    var maxPlaylistRetries = options.maxPlaylistRetries;\n\n    if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n      maxPlaylistRetries = Infinity;\n    }\n\n    Vhs$1 = externVhs;\n    _this.experimentalBufferBasedABR = Boolean(experimentalBufferBasedABR);\n    _this.experimentalLeastPixelDiffSelector = Boolean(experimentalLeastPixelDiffSelector);\n    _this.withCredentials = withCredentials;\n    _this.tech_ = tech;\n    _this.vhs_ = tech.vhs;\n    _this.sourceType_ = sourceType;\n    _this.useCueTags_ = useCueTags;\n    _this.blacklistDuration = blacklistDuration;\n    _this.maxPlaylistRetries = maxPlaylistRetries;\n    _this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n\n    if (_this.useCueTags_) {\n      _this.cueTagsTrack_ = _this.tech_.addTextTrack('metadata', 'ad-cues');\n      _this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n    }\n\n    _this.requestOptions_ = {\n      withCredentials: withCredentials,\n      handleManifestRedirects: handleManifestRedirects,\n      maxPlaylistRetries: maxPlaylistRetries,\n      timeout: null\n    };\n\n    _this.on('error', _this.pauseLoading);\n\n    _this.mediaTypes_ = createMediaTypes();\n    _this.mediaSource = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource();\n    _this.handleDurationChange_ = _this.handleDurationChange_.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n    _this.handleSourceOpen_ = _this.handleSourceOpen_.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n    _this.handleSourceEnded_ = _this.handleSourceEnded_.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));\n\n    _this.mediaSource.addEventListener('durationchange', _this.handleDurationChange_); // load the media source into the player\n\n\n    _this.mediaSource.addEventListener('sourceopen', _this.handleSourceOpen_);\n\n    _this.mediaSource.addEventListener('sourceended', _this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n    // everything, and the MediaSource should not be detached without a proper disposal\n\n\n    _this.seekable_ = videojs.createTimeRanges();\n    _this.hasPlayed_ = false;\n    _this.syncController_ = new SyncController(options);\n    _this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'segment-metadata'\n    }, false).track;\n    _this.decrypter_ = new Decrypter();\n    _this.sourceUpdater_ = new SourceUpdater(_this.mediaSource);\n    _this.inbandTextTracks_ = {};\n    _this.timelineChangeController_ = new TimelineChangeController();\n    var segmentLoaderSettings = {\n      vhs: _this.vhs_,\n      parse708captions: options.parse708captions,\n      useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n      captionServices: captionServices,\n      mediaSource: _this.mediaSource,\n      currentTime: _this.tech_.currentTime.bind(_this.tech_),\n      seekable: function seekable() {\n        return _this.seekable();\n      },\n      seeking: function seeking() {\n        return _this.tech_.seeking();\n      },\n      duration: function duration() {\n        return _this.duration();\n      },\n      hasPlayed: function hasPlayed() {\n        return _this.hasPlayed_;\n      },\n      goalBufferLength: function goalBufferLength() {\n        return _this.goalBufferLength();\n      },\n      bandwidth: bandwidth,\n      syncController: _this.syncController_,\n      decrypter: _this.decrypter_,\n      sourceType: _this.sourceType_,\n      inbandTextTracks: _this.inbandTextTracks_,\n      cacheEncryptionKeys: cacheEncryptionKeys,\n      sourceUpdater: _this.sourceUpdater_,\n      timelineChangeController: _this.timelineChangeController_,\n      experimentalExactManifestTimings: options.experimentalExactManifestTimings\n    }; // The source type check not only determines whether a special DASH playlist loader\n    // should be used, but also covers the case where the provided src is a vhs-json\n    // manifest object (instead of a URL). In the case of vhs-json, the default\n    // PlaylistLoader should be used.\n\n    _this.masterPlaylistLoader_ = _this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, _this.vhs_, _this.requestOptions_) : new PlaylistLoader(src, _this.vhs_, _this.requestOptions_);\n\n    _this.setupMasterPlaylistLoaderListeners_(); // setup segment loaders\n    // combined audio/video or just video when alternate audio track is selected\n\n\n    _this.mainSegmentLoader_ = new SegmentLoader(videojs.mergeOptions(segmentLoaderSettings, {\n      segmentMetadataTrack: _this.segmentMetadataTrack_,\n      loaderType: 'main'\n    }), options); // alternate audio track\n\n    _this.audioSegmentLoader_ = new SegmentLoader(videojs.mergeOptions(segmentLoaderSettings, {\n      loaderType: 'audio'\n    }), options);\n    _this.subtitleSegmentLoader_ = new VTTSegmentLoader(videojs.mergeOptions(segmentLoaderSettings, {\n      loaderType: 'vtt',\n      featuresNativeTextTracks: _this.tech_.featuresNativeTextTracks,\n      loadVttJs: function loadVttJs() {\n        return new Promise(function (resolve, reject) {\n          function onLoad() {\n            tech.off('vttjserror', onError);\n            resolve();\n          }\n\n          function onError() {\n            tech.off('vttjsloaded', onLoad);\n            reject();\n          }\n\n          tech.one('vttjsloaded', onLoad);\n          tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n          tech.addWebVttScript_();\n        });\n      }\n    }), options);\n\n    _this.setupSegmentLoaderListeners_();\n\n    if (_this.experimentalBufferBasedABR) {\n      _this.masterPlaylistLoader_.one('loadedplaylist', function () {\n        return _this.startABRTimer_();\n      });\n\n      _this.tech_.on('pause', function () {\n        return _this.stopABRTimer_();\n      });\n\n      _this.tech_.on('play', function () {\n        return _this.startABRTimer_();\n      });\n    } // Create SegmentLoader stat-getters\n    // mediaRequests_\n    // mediaRequestsAborted_\n    // mediaRequestsTimedout_\n    // mediaRequestsErrored_\n    // mediaTransferDuration_\n    // mediaBytesTransferred_\n    // mediaAppends_\n\n\n    loaderStats.forEach(function (stat) {\n      _this[stat + '_'] = sumLoaderStat.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), stat);\n    });\n    _this.logger_ = logger('MPC');\n    _this.triggeredFmp4Usage = false;\n\n    if (_this.tech_.preload() === 'none') {\n      _this.loadOnPlay_ = function () {\n        _this.loadOnPlay_ = null;\n\n        _this.masterPlaylistLoader_.load();\n      };\n\n      _this.tech_.one('play', _this.loadOnPlay_);\n    } else {\n      _this.masterPlaylistLoader_.load();\n    }\n\n    _this.timeToLoadedData__ = -1;\n    _this.mainAppendsToLoadedData__ = -1;\n    _this.audioAppendsToLoadedData__ = -1;\n    var event = _this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n    _this.tech_.one(event, function () {\n      var timeToLoadedDataStart = Date.now();\n\n      _this.tech_.one('loadeddata', function () {\n        _this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n        _this.mainAppendsToLoadedData__ = _this.mainSegmentLoader_.mediaAppends;\n        _this.audioAppendsToLoadedData__ = _this.audioSegmentLoader_.mediaAppends;\n      });\n    });\n\n    return _this;\n  }\n\n  var _proto = MasterPlaylistController.prototype;\n\n  _proto.mainAppendsToLoadedData_ = function mainAppendsToLoadedData_() {\n    return this.mainAppendsToLoadedData__;\n  };\n\n  _proto.audioAppendsToLoadedData_ = function audioAppendsToLoadedData_() {\n    return this.audioAppendsToLoadedData__;\n  };\n\n  _proto.appendsToLoadedData_ = function appendsToLoadedData_() {\n    var main = this.mainAppendsToLoadedData_();\n    var audio = this.audioAppendsToLoadedData_();\n\n    if (main === -1 || audio === -1) {\n      return -1;\n    }\n\n    return main + audio;\n  };\n\n  _proto.timeToLoadedData_ = function timeToLoadedData_() {\n    return this.timeToLoadedData__;\n  }\n  /**\n   * Run selectPlaylist and switch to the new playlist if we should\n   *\n   * @param {string} [reason=abr] a reason for why the ABR check is made\n   * @private\n   */\n  ;\n\n  _proto.checkABR_ = function checkABR_(reason) {\n    if (reason === void 0) {\n      reason = 'abr';\n    }\n\n    var nextPlaylist = this.selectPlaylist();\n\n    if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n      this.switchMedia_(nextPlaylist, reason);\n    }\n  };\n\n  _proto.switchMedia_ = function switchMedia_(playlist, cause, delay) {\n    var oldMedia = this.media();\n    var oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n    var newId = playlist.id || playlist.uri;\n\n    if (oldId && oldId !== newId) {\n      this.logger_(\"switch media \" + oldId + \" -> \" + newId + \" from \" + cause);\n      this.tech_.trigger({\n        type: 'usage',\n        name: \"vhs-rendition-change-\" + cause\n      });\n    }\n\n    this.masterPlaylistLoader_.media(playlist, delay);\n  }\n  /**\n   * Start a timer that periodically calls checkABR_\n   *\n   * @private\n   */\n  ;\n\n  _proto.startABRTimer_ = function startABRTimer_() {\n    var _this2 = this;\n\n    this.stopABRTimer_();\n    this.abrTimer_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setInterval(function () {\n      return _this2.checkABR_();\n    }, 250);\n  }\n  /**\n   * Stop the timer that periodically calls checkABR_\n   *\n   * @private\n   */\n  ;\n\n  _proto.stopABRTimer_ = function stopABRTimer_() {\n    // if we're scrubbing, we don't need to pause.\n    // This getter will be added to Video.js in version 7.11.\n    if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n      return;\n    }\n\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearInterval(this.abrTimer_);\n    this.abrTimer_ = null;\n  }\n  /**\n   * Get a list of playlists for the currently selected audio playlist\n   *\n   * @return {Array} the array of audio playlists\n   */\n  ;\n\n  _proto.getAudioTrackPlaylists_ = function getAudioTrackPlaylists_() {\n    var master = this.master();\n    var defaultPlaylists = master && master.playlists || []; // if we don't have any audio groups then we can only\n    // assume that the audio tracks are contained in masters\n    // playlist array, use that or an empty array.\n\n    if (!master || !master.mediaGroups || !master.mediaGroups.AUDIO) {\n      return defaultPlaylists;\n    }\n\n    var AUDIO = master.mediaGroups.AUDIO;\n    var groupKeys = Object.keys(AUDIO);\n    var track; // get the current active track\n\n    if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n      track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from master if mediaTypes_ isn't setup yet\n    } else {\n      // default group is `main` or just the first group.\n      var defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n\n      for (var label in defaultGroup) {\n        if (defaultGroup[label][\"default\"]) {\n          track = {\n            label: label\n          };\n          break;\n        }\n      }\n    } // no active track no playlists.\n\n\n    if (!track) {\n      return defaultPlaylists;\n    }\n\n    var playlists = []; // get all of the playlists that are possible for the\n    // active track.\n\n    for (var group in AUDIO) {\n      if (AUDIO[group][track.label]) {\n        var properties = AUDIO[group][track.label];\n\n        if (properties.playlists && properties.playlists.length) {\n          playlists.push.apply(playlists, properties.playlists);\n        } else if (properties.uri) {\n          playlists.push(properties);\n        } else if (master.playlists.length) {\n          // if an audio group does not have a uri\n          // see if we have main playlists that use it as a group.\n          // if we do then add those to the playlists list.\n          for (var i = 0; i < master.playlists.length; i++) {\n            var playlist = master.playlists[i];\n\n            if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n              playlists.push(playlist);\n            }\n          }\n        }\n      }\n    }\n\n    if (!playlists.length) {\n      return defaultPlaylists;\n    }\n\n    return playlists;\n  }\n  /**\n   * Register event handlers on the master playlist loader. A helper\n   * function for construction time.\n   *\n   * @private\n   */\n  ;\n\n  _proto.setupMasterPlaylistLoaderListeners_ = function setupMasterPlaylistLoaderListeners_() {\n    var _this3 = this;\n\n    this.masterPlaylistLoader_.on('loadedmetadata', function () {\n      var media = _this3.masterPlaylistLoader_.media();\n\n      var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n      // timeout the request.\n\n      if (isLowestEnabledRendition(_this3.masterPlaylistLoader_.master, _this3.masterPlaylistLoader_.media())) {\n        _this3.requestOptions_.timeout = 0;\n      } else {\n        _this3.requestOptions_.timeout = requestTimeout;\n      } // if this isn't a live video and preload permits, start\n      // downloading segments\n\n\n      if (media.endList && _this3.tech_.preload() !== 'none') {\n        _this3.mainSegmentLoader_.playlist(media, _this3.requestOptions_);\n\n        _this3.mainSegmentLoader_.load();\n      }\n\n      setupMediaGroups({\n        sourceType: _this3.sourceType_,\n        segmentLoaders: {\n          AUDIO: _this3.audioSegmentLoader_,\n          SUBTITLES: _this3.subtitleSegmentLoader_,\n          main: _this3.mainSegmentLoader_\n        },\n        tech: _this3.tech_,\n        requestOptions: _this3.requestOptions_,\n        masterPlaylistLoader: _this3.masterPlaylistLoader_,\n        vhs: _this3.vhs_,\n        master: _this3.master(),\n        mediaTypes: _this3.mediaTypes_,\n        blacklistCurrentPlaylist: _this3.blacklistCurrentPlaylist.bind(_this3)\n      });\n\n      _this3.triggerPresenceUsage_(_this3.master(), media);\n\n      _this3.setupFirstPlay();\n\n      if (!_this3.mediaTypes_.AUDIO.activePlaylistLoader || _this3.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n        _this3.trigger('selectedinitialmedia');\n      } else {\n        // We must wait for the active audio playlist loader to\n        // finish setting up before triggering this event so the\n        // representations API and EME setup is correct\n        _this3.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', function () {\n          _this3.trigger('selectedinitialmedia');\n        });\n      }\n    });\n    this.masterPlaylistLoader_.on('loadedplaylist', function () {\n      if (_this3.loadOnPlay_) {\n        _this3.tech_.off('play', _this3.loadOnPlay_);\n      }\n\n      var updatedPlaylist = _this3.masterPlaylistLoader_.media();\n\n      if (!updatedPlaylist) {\n        // exclude any variants that are not supported by the browser before selecting\n        // an initial media as the playlist selectors do not consider browser support\n        _this3.excludeUnsupportedVariants_();\n\n        var selectedMedia;\n\n        if (_this3.enableLowInitialPlaylist) {\n          selectedMedia = _this3.selectInitialPlaylist();\n        }\n\n        if (!selectedMedia) {\n          selectedMedia = _this3.selectPlaylist();\n        }\n\n        if (!selectedMedia || !_this3.shouldSwitchToMedia_(selectedMedia)) {\n          return;\n        }\n\n        _this3.initialMedia_ = selectedMedia;\n\n        _this3.switchMedia_(_this3.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n        // fire again since the playlist will be requested. In the case of vhs-json\n        // (where the manifest object is provided as the source), when the media\n        // playlist's `segments` list is already available, a media playlist won't be\n        // requested, and loadedplaylist won't fire again, so the playlist handler must be\n        // called on its own here.\n\n\n        var haveJsonSource = _this3.sourceType_ === 'vhs-json' && _this3.initialMedia_.segments;\n\n        if (!haveJsonSource) {\n          return;\n        }\n\n        updatedPlaylist = _this3.initialMedia_;\n      }\n\n      _this3.handleUpdatedMediaPlaylist(updatedPlaylist);\n    });\n    this.masterPlaylistLoader_.on('error', function () {\n      _this3.blacklistCurrentPlaylist(_this3.masterPlaylistLoader_.error);\n    });\n    this.masterPlaylistLoader_.on('mediachanging', function () {\n      _this3.mainSegmentLoader_.abort();\n\n      _this3.mainSegmentLoader_.pause();\n    });\n    this.masterPlaylistLoader_.on('mediachange', function () {\n      var media = _this3.masterPlaylistLoader_.media();\n\n      var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n      // timeout the request.\n\n      if (isLowestEnabledRendition(_this3.masterPlaylistLoader_.master, _this3.masterPlaylistLoader_.media())) {\n        _this3.requestOptions_.timeout = 0;\n      } else {\n        _this3.requestOptions_.timeout = requestTimeout;\n      }\n\n      _this3.masterPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals\n      // that the segments have changed in some way and use that to\n      // update the SegmentLoader instead of doing it twice here and\n      // on `loadedplaylist`\n\n\n      _this3.mainSegmentLoader_.playlist(media, _this3.requestOptions_);\n\n      _this3.mainSegmentLoader_.load();\n\n      _this3.tech_.trigger({\n        type: 'mediachange',\n        bubbles: true\n      });\n    });\n    this.masterPlaylistLoader_.on('playlistunchanged', function () {\n      var updatedPlaylist = _this3.masterPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n      // excluded for not-changing. We likely just have a really slowly updating\n      // playlist.\n\n\n      if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n        return;\n      }\n\n      var playlistOutdated = _this3.stuckAtPlaylistEnd_(updatedPlaylist);\n\n      if (playlistOutdated) {\n        // Playlist has stopped updating and we're stuck at its end. Try to\n        // blacklist it and switch to another playlist in the hope that that\n        // one is updating (and give the player a chance to re-adjust to the\n        // safe live point).\n        _this3.blacklistCurrentPlaylist({\n          message: 'Playlist no longer updating.',\n          reason: 'playlist-unchanged'\n        }); // useful for monitoring QoS\n\n\n        _this3.tech_.trigger('playliststuck');\n      }\n    });\n    this.masterPlaylistLoader_.on('renditiondisabled', function () {\n      _this3.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-disabled'\n      });\n\n      _this3.tech_.trigger({\n        type: 'usage',\n        name: 'hls-rendition-disabled'\n      });\n    });\n    this.masterPlaylistLoader_.on('renditionenabled', function () {\n      _this3.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-enabled'\n      });\n\n      _this3.tech_.trigger({\n        type: 'usage',\n        name: 'hls-rendition-enabled'\n      });\n    });\n  }\n  /**\n   * Given an updated media playlist (whether it was loaded for the first time, or\n   * refreshed for live playlists), update any relevant properties and state to reflect\n   * changes in the media that should be accounted for (e.g., cues and duration).\n   *\n   * @param {Object} updatedPlaylist the updated media playlist object\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleUpdatedMediaPlaylist = function handleUpdatedMediaPlaylist(updatedPlaylist) {\n    if (this.useCueTags_) {\n      this.updateAdCues_(updatedPlaylist);\n    } // TODO: Create a new event on the PlaylistLoader that signals\n    // that the segments have changed in some way and use that to\n    // update the SegmentLoader instead of doing it twice here and\n    // on `mediachange`\n\n\n    this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n    this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n    // as it is possible that it was temporarily stopped while waiting for\n    // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n    if (!this.tech_.paused()) {\n      this.mainSegmentLoader_.load();\n\n      if (this.audioSegmentLoader_) {\n        this.audioSegmentLoader_.load();\n      }\n    }\n  }\n  /**\n   * A helper function for triggerring presence usage events once per source\n   *\n   * @private\n   */\n  ;\n\n  _proto.triggerPresenceUsage_ = function triggerPresenceUsage_(master, media) {\n    var mediaGroups = master.mediaGroups || {};\n    var defaultDemuxed = true;\n    var audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n\n    for (var mediaGroup in mediaGroups.AUDIO) {\n      for (var label in mediaGroups.AUDIO[mediaGroup]) {\n        var properties = mediaGroups.AUDIO[mediaGroup][label];\n\n        if (!properties.uri) {\n          defaultDemuxed = false;\n        }\n      }\n    }\n\n    if (defaultDemuxed) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-demuxed'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-demuxed'\n      });\n    }\n\n    if (Object.keys(mediaGroups.SUBTITLES).length) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-webvtt'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-webvtt'\n      });\n    }\n\n    if (Vhs$1.Playlist.isAes(media)) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-aes'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-aes'\n      });\n    }\n\n    if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-alternate-audio'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-alternate-audio'\n      });\n    }\n\n    if (this.useCueTags_) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-playlist-cue-tags'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-playlist-cue-tags'\n      });\n    }\n  };\n\n  _proto.shouldSwitchToMedia_ = function shouldSwitchToMedia_(nextPlaylist) {\n    var currentPlaylist = this.masterPlaylistLoader_.media() || this.masterPlaylistLoader_.pendingMedia_;\n    var currentTime = this.tech_.currentTime();\n    var bufferLowWaterLine = this.bufferLowWaterLine();\n    var bufferHighWaterLine = this.bufferHighWaterLine();\n    var buffered = this.tech_.buffered();\n    return shouldSwitchToMedia({\n      buffered: buffered,\n      currentTime: currentTime,\n      currentPlaylist: currentPlaylist,\n      nextPlaylist: nextPlaylist,\n      bufferLowWaterLine: bufferLowWaterLine,\n      bufferHighWaterLine: bufferHighWaterLine,\n      duration: this.duration(),\n      experimentalBufferBasedABR: this.experimentalBufferBasedABR,\n      log: this.logger_\n    });\n  }\n  /**\n   * Register event handlers on the segment loaders. A helper function\n   * for construction time.\n   *\n   * @private\n   */\n  ;\n\n  _proto.setupSegmentLoaderListeners_ = function setupSegmentLoaderListeners_() {\n    var _this4 = this;\n\n    this.mainSegmentLoader_.on('bandwidthupdate', function () {\n      // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n      // useful to check to see if a rendition switch should be made.\n      _this4.checkABR_('bandwidthupdate');\n\n      _this4.tech_.trigger('bandwidthupdate');\n    });\n    this.mainSegmentLoader_.on('timeout', function () {\n      if (_this4.experimentalBufferBasedABR) {\n        // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n        // Here the only consideration is that for buffer based ABR there's no guarantee\n        // of an immediate switch (since the bandwidth is averaged with a timeout\n        // bandwidth value of 1), so force a load on the segment loader to keep it going.\n        _this4.mainSegmentLoader_.load();\n      }\n    }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n    // based ABR.\n\n    if (!this.experimentalBufferBasedABR) {\n      this.mainSegmentLoader_.on('progress', function () {\n        _this4.trigger('progress');\n      });\n    }\n\n    this.mainSegmentLoader_.on('error', function () {\n      _this4.blacklistCurrentPlaylist(_this4.mainSegmentLoader_.error());\n    });\n    this.mainSegmentLoader_.on('appenderror', function () {\n      _this4.error = _this4.mainSegmentLoader_.error_;\n\n      _this4.trigger('error');\n    });\n    this.mainSegmentLoader_.on('syncinfoupdate', function () {\n      _this4.onSyncInfoUpdate_();\n    });\n    this.mainSegmentLoader_.on('timestampoffset', function () {\n      _this4.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-timestamp-offset'\n      });\n\n      _this4.tech_.trigger({\n        type: 'usage',\n        name: 'hls-timestamp-offset'\n      });\n    });\n    this.audioSegmentLoader_.on('syncinfoupdate', function () {\n      _this4.onSyncInfoUpdate_();\n    });\n    this.audioSegmentLoader_.on('appenderror', function () {\n      _this4.error = _this4.audioSegmentLoader_.error_;\n\n      _this4.trigger('error');\n    });\n    this.mainSegmentLoader_.on('ended', function () {\n      _this4.logger_('main segment loader ended');\n\n      _this4.onEndOfStream();\n    });\n    this.mainSegmentLoader_.on('earlyabort', function (event) {\n      // never try to early abort with the new ABR algorithm\n      if (_this4.experimentalBufferBasedABR) {\n        return;\n      }\n\n      _this4.delegateLoaders_('all', ['abort']);\n\n      _this4.blacklistCurrentPlaylist({\n        message: 'Aborted early because there isn\\'t enough bandwidth to complete the ' + 'request without rebuffering.'\n      }, ABORT_EARLY_BLACKLIST_SECONDS);\n    });\n\n    var updateCodecs = function updateCodecs() {\n      if (!_this4.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return _this4.tryToCreateSourceBuffers_();\n      }\n\n      var codecs = _this4.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n\n      if (!codecs) {\n        return;\n      }\n\n      _this4.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n    };\n\n    this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n    this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n    this.mainSegmentLoader_.on('fmp4', function () {\n      if (!_this4.triggeredFmp4Usage) {\n        _this4.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n\n        _this4.tech_.trigger({\n          type: 'usage',\n          name: 'hls-fmp4'\n        });\n\n        _this4.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('fmp4', function () {\n      if (!_this4.triggeredFmp4Usage) {\n        _this4.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n\n        _this4.tech_.trigger({\n          type: 'usage',\n          name: 'hls-fmp4'\n        });\n\n        _this4.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('ended', function () {\n      _this4.logger_('audioSegmentLoader ended');\n\n      _this4.onEndOfStream();\n    });\n  };\n\n  _proto.mediaSecondsLoaded_ = function mediaSecondsLoaded_() {\n    return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n  }\n  /**\n   * Call load on our SegmentLoaders\n   */\n  ;\n\n  _proto.load = function load() {\n    this.mainSegmentLoader_.load();\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.load();\n    }\n\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.load();\n    }\n  }\n  /**\n   * Re-tune playback quality level for the current player\n   * conditions without performing destructive actions, like\n   * removing already buffered content\n   *\n   * @private\n   * @deprecated\n   */\n  ;\n\n  _proto.smoothQualityChange_ = function smoothQualityChange_(media) {\n    if (media === void 0) {\n      media = this.selectPlaylist();\n    }\n\n    this.fastQualityChange_(media);\n  }\n  /**\n   * Re-tune playback quality level for the current player\n   * conditions. This method will perform destructive actions like removing\n   * already buffered content in order to readjust the currently active\n   * playlist quickly. This is good for manual quality changes\n   *\n   * @private\n   */\n  ;\n\n  _proto.fastQualityChange_ = function fastQualityChange_(media) {\n    var _this5 = this;\n\n    if (media === void 0) {\n      media = this.selectPlaylist();\n    }\n\n    if (media === this.masterPlaylistLoader_.media()) {\n      this.logger_('skipping fastQualityChange because new media is same as old');\n      return;\n    }\n\n    this.switchMedia_(media, 'fast-quality'); // Delete all buffered data to allow an immediate quality switch, then seek to give\n    // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\n    // ahead is roughly the minimum that will accomplish this across a variety of content\n    // in IE and Edge, but seeking in place is sufficient on all other browsers)\n    // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\n    // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\n\n    this.mainSegmentLoader_.resetEverything(function () {\n      // Since this is not a typical seek, we avoid the seekTo method which can cause segments\n      // from the previously enabled rendition to load before the new playlist has finished loading\n      if (videojs.browser.IE_VERSION || videojs.browser.IS_EDGE) {\n        _this5.tech_.setCurrentTime(_this5.tech_.currentTime() + 0.04);\n      } else {\n        _this5.tech_.setCurrentTime(_this5.tech_.currentTime());\n      }\n    }); // don't need to reset audio as it is reset when media changes\n  }\n  /**\n   * Begin playback.\n   */\n  ;\n\n  _proto.play = function play() {\n    if (this.setupFirstPlay()) {\n      return;\n    }\n\n    if (this.tech_.ended()) {\n      this.tech_.setCurrentTime(0);\n    }\n\n    if (this.hasPlayed_) {\n      this.load();\n    }\n\n    var seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n    // seek forward to the live point\n\n    if (this.tech_.duration() === Infinity) {\n      if (this.tech_.currentTime() < seekable.start(0)) {\n        return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n      }\n    }\n  }\n  /**\n   * Seek to the latest media position if this is a live video and the\n   * player and video are loaded and initialized.\n   */\n  ;\n\n  _proto.setupFirstPlay = function setupFirstPlay() {\n    var _this6 = this;\n\n    var media = this.masterPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n    //  If 1) there is no active media\n    //     2) the player is paused\n    //     3) the first play has already been setup\n    // then exit early\n\n    if (!media || this.tech_.paused() || this.hasPlayed_) {\n      return false;\n    } // when the video is a live stream\n\n\n    if (!media.endList) {\n      var seekable = this.seekable();\n\n      if (!seekable.length) {\n        // without a seekable range, the player cannot seek to begin buffering at the live\n        // point\n        return false;\n      }\n\n      if (videojs.browser.IE_VERSION && this.tech_.readyState() === 0) {\n        // IE11 throws an InvalidStateError if you try to set currentTime while the\n        // readyState is 0, so it must be delayed until the tech fires loadedmetadata.\n        this.tech_.one('loadedmetadata', function () {\n          _this6.trigger('firstplay');\n\n          _this6.tech_.setCurrentTime(seekable.end(0));\n\n          _this6.hasPlayed_ = true;\n        });\n        return false;\n      } // trigger firstplay to inform the source handler to ignore the next seek event\n\n\n      this.trigger('firstplay'); // seek to the live point\n\n      this.tech_.setCurrentTime(seekable.end(0));\n    }\n\n    this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n    this.load();\n    return true;\n  }\n  /**\n   * handle the sourceopen event on the MediaSource\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleSourceOpen_ = function handleSourceOpen_() {\n    // Only attempt to create the source buffer if none already exist.\n    // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n    // after `endOfStream` has been called (in response to a seek for instance)\n    this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n    // code in video.js but is required because play() must be invoked\n    // *after* the media source has opened.\n\n    if (this.tech_.autoplay()) {\n      var playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n      // on browsers which return a promise\n\n      if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n        playPromise.then(null, function (e) {});\n      }\n    }\n\n    this.trigger('sourceopen');\n  }\n  /**\n   * handle the sourceended event on the MediaSource\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleSourceEnded_ = function handleSourceEnded_() {\n    if (!this.inbandTextTracks_.metadataTrack_) {\n      return;\n    }\n\n    var cues = this.inbandTextTracks_.metadataTrack_.cues;\n\n    if (!cues || !cues.length) {\n      return;\n    }\n\n    var duration = this.duration();\n    cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n  }\n  /**\n   * handle the durationchange event on the MediaSource\n   *\n   * @private\n   */\n  ;\n\n  _proto.handleDurationChange_ = function handleDurationChange_() {\n    this.tech_.trigger('durationchange');\n  }\n  /**\n   * Calls endOfStream on the media source when all active stream types have called\n   * endOfStream\n   *\n   * @param {string} streamType\n   *        Stream type of the segment loader that called endOfStream\n   * @private\n   */\n  ;\n\n  _proto.onEndOfStream = function onEndOfStream() {\n    var isEndOfStream = this.mainSegmentLoader_.ended_;\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      var mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n      if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n        // if we do not know if the main segment loader contains video yet or if we\n        // definitively know the main segment loader contains video, then we need to wait\n        // for both main and audio segment loaders to call endOfStream\n        isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n      } else {\n        // otherwise just rely on the audio loader\n        isEndOfStream = this.audioSegmentLoader_.ended_;\n      }\n    }\n\n    if (!isEndOfStream) {\n      return;\n    }\n\n    this.stopABRTimer_();\n    this.sourceUpdater_.endOfStream();\n  }\n  /**\n   * Check if a playlist has stopped being updated\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist has stopped being updated or not\n   */\n  ;\n\n  _proto.stuckAtPlaylistEnd_ = function stuckAtPlaylistEnd_(playlist) {\n    var seekable = this.seekable();\n\n    if (!seekable.length) {\n      // playlist doesn't have enough information to determine whether we are stuck\n      return false;\n    }\n\n    var expired = this.syncController_.getExpiredTime(playlist, this.duration());\n\n    if (expired === null) {\n      return false;\n    } // does not use the safe live end to calculate playlist end, since we\n    // don't want to say we are stuck while there is still content\n\n\n    var absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n    var currentTime = this.tech_.currentTime();\n    var buffered = this.tech_.buffered();\n\n    if (!buffered.length) {\n      // return true if the playhead reached the absolute end of the playlist\n      return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n    }\n\n    var bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n    // end of playlist\n\n    return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n  }\n  /**\n   * Blacklists a playlist when an error occurs for a set amount of time\n   * making it unavailable for selection by the rendition selection algorithm\n   * and then forces a new playlist (rendition) selection.\n   *\n   * @param {Object=} error an optional error that may include the playlist\n   * to blacklist\n   * @param {number=} blacklistDuration an optional number of seconds to blacklist the\n   * playlist\n   */\n  ;\n\n  _proto.blacklistCurrentPlaylist = function blacklistCurrentPlaylist(error, blacklistDuration) {\n    if (error === void 0) {\n      error = {};\n    } // If the `error` was generated by the playlist loader, it will contain\n    // the playlist we were trying to load (but failed) and that should be\n    // blacklisted instead of the currently selected playlist which is likely\n    // out-of-date in this scenario\n\n\n    var currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();\n    blacklistDuration = blacklistDuration || error.blacklistDuration || this.blacklistDuration; // If there is no current playlist, then an error occurred while we were\n    // trying to load the master OR while we were disposing of the tech\n\n    if (!currentPlaylist) {\n      this.error = error;\n\n      if (this.mediaSource.readyState !== 'open') {\n        this.trigger('error');\n      } else {\n        this.sourceUpdater_.endOfStream('network');\n      }\n\n      return;\n    }\n\n    currentPlaylist.playlistErrors_++;\n    var playlists = this.masterPlaylistLoader_.master.playlists;\n    var enabledPlaylists = playlists.filter(isEnabled);\n    var isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === currentPlaylist; // Don't blacklist the only playlist unless it was blacklisted\n    // forever\n\n    if (playlists.length === 1 && blacklistDuration !== Infinity) {\n      videojs.log.warn(\"Problem encountered with playlist \" + currentPlaylist.id + \". \" + 'Trying again since it is the only playlist.');\n      this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n      return this.masterPlaylistLoader_.load(isFinalRendition);\n    }\n\n    if (isFinalRendition) {\n      // Since we're on the final non-blacklisted playlist, and we're about to blacklist\n      // it, instead of erring the player or retrying this playlist, clear out the current\n      // blacklist. This allows other playlists to be attempted in case any have been\n      // fixed.\n      var reincluded = false;\n      playlists.forEach(function (playlist) {\n        // skip current playlist which is about to be blacklisted\n        if (playlist === currentPlaylist) {\n          return;\n        }\n\n        var excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n        if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n          reincluded = true;\n          delete playlist.excludeUntil;\n        }\n      });\n\n      if (reincluded) {\n        videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n        // playlist. This is needed for users relying on the retryplaylist event to catch a\n        // case where the player might be stuck and looping through \"dead\" playlists.\n\n        this.tech_.trigger('retryplaylist');\n      }\n    } // Blacklist this playlist\n\n\n    var excludeUntil;\n\n    if (currentPlaylist.playlistErrors_ > this.maxPlaylistRetries) {\n      excludeUntil = Infinity;\n    } else {\n      excludeUntil = Date.now() + blacklistDuration * 1000;\n    }\n\n    currentPlaylist.excludeUntil = excludeUntil;\n\n    if (error.reason) {\n      currentPlaylist.lastExcludeReason_ = error.reason;\n    }\n\n    this.tech_.trigger('blacklistplaylist');\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'vhs-rendition-blacklisted'\n    });\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'hls-rendition-blacklisted'\n    }); // TODO: should we select a new playlist if this blacklist wasn't for the currentPlaylist?\n    // Would be something like media().id !=== currentPlaylist.id and we  would need something\n    // like `pendingMedia` in playlist loaders to check against that too. This will prevent us\n    // from loading a new playlist on any blacklist.\n    // Select a new playlist\n\n    var nextPlaylist = this.selectPlaylist();\n\n    if (!nextPlaylist) {\n      this.error = 'Playback cannot continue. No available working or supported playlists.';\n      this.trigger('error');\n      return;\n    }\n\n    var logFn = error.internal ? this.logger_ : videojs.log.warn;\n    var errorMessage = error.message ? ' ' + error.message : '';\n    logFn((error.internal ? 'Internal problem' : 'Problem') + \" encountered with playlist \" + currentPlaylist.id + \".\" + (errorMessage + \" Switching to playlist \" + nextPlaylist.id + \".\")); // if audio group changed reset audio loaders\n\n    if (nextPlaylist.attributes.AUDIO !== currentPlaylist.attributes.AUDIO) {\n      this.delegateLoaders_('audio', ['abort', 'pause']);\n    } // if subtitle group changed reset subtitle loaders\n\n\n    if (nextPlaylist.attributes.SUBTITLES !== currentPlaylist.attributes.SUBTITLES) {\n      this.delegateLoaders_('subtitle', ['abort', 'pause']);\n    }\n\n    this.delegateLoaders_('main', ['abort', 'pause']);\n    var delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n    var shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n    return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n  }\n  /**\n   * Pause all segment/playlist loaders\n   */\n  ;\n\n  _proto.pauseLoading = function pauseLoading() {\n    this.delegateLoaders_('all', ['abort', 'pause']);\n    this.stopABRTimer_();\n  }\n  /**\n   * Call a set of functions in order on playlist loaders, segment loaders,\n   * or both types of loaders.\n   *\n   * @param {string} filter\n   *        Filter loaders that should call fnNames using a string. Can be:\n   *        * all - run on all loaders\n   *        * audio - run on all audio loaders\n   *        * subtitle - run on all subtitle loaders\n   *        * main - run on the main/master loaders\n   *\n   * @param {Array|string} fnNames\n   *        A string or array of function names to call.\n   */\n  ;\n\n  _proto.delegateLoaders_ = function delegateLoaders_(filter, fnNames) {\n    var _this7 = this;\n\n    var loaders = [];\n    var dontFilterPlaylist = filter === 'all';\n\n    if (dontFilterPlaylist || filter === 'main') {\n      loaders.push(this.masterPlaylistLoader_);\n    }\n\n    var mediaTypes = [];\n\n    if (dontFilterPlaylist || filter === 'audio') {\n      mediaTypes.push('AUDIO');\n    }\n\n    if (dontFilterPlaylist || filter === 'subtitle') {\n      mediaTypes.push('CLOSED-CAPTIONS');\n      mediaTypes.push('SUBTITLES');\n    }\n\n    mediaTypes.forEach(function (mediaType) {\n      var loader = _this7.mediaTypes_[mediaType] && _this7.mediaTypes_[mediaType].activePlaylistLoader;\n\n      if (loader) {\n        loaders.push(loader);\n      }\n    });\n    ['main', 'audio', 'subtitle'].forEach(function (name) {\n      var loader = _this7[name + \"SegmentLoader_\"];\n\n      if (loader && (filter === name || filter === 'all')) {\n        loaders.push(loader);\n      }\n    });\n    loaders.forEach(function (loader) {\n      return fnNames.forEach(function (fnName) {\n        if (typeof loader[fnName] === 'function') {\n          loader[fnName]();\n        }\n      });\n    });\n  }\n  /**\n   * set the current time on all segment loaders\n   *\n   * @param {TimeRange} currentTime the current time to set\n   * @return {TimeRange} the current time\n   */\n  ;\n\n  _proto.setCurrentTime = function setCurrentTime(currentTime) {\n    var buffered = findRange(this.tech_.buffered(), currentTime);\n\n    if (!(this.masterPlaylistLoader_ && this.masterPlaylistLoader_.media())) {\n      // return immediately if the metadata is not ready yet\n      return 0;\n    } // it's clearly an edge-case but don't thrown an error if asked to\n    // seek within an empty playlist\n\n\n    if (!this.masterPlaylistLoader_.media().segments) {\n      return 0;\n    } // if the seek location is already buffered, continue buffering as usual\n\n\n    if (buffered && buffered.length) {\n      return currentTime;\n    } // cancel outstanding requests so we begin buffering at the new\n    // location\n\n\n    this.mainSegmentLoader_.resetEverything();\n    this.mainSegmentLoader_.abort();\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.resetEverything();\n      this.audioSegmentLoader_.abort();\n    }\n\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.resetEverything();\n      this.subtitleSegmentLoader_.abort();\n    } // start segment loader loading in case they are paused\n\n\n    this.load();\n  }\n  /**\n   * get the current duration\n   *\n   * @return {TimeRange} the duration\n   */\n  ;\n\n  _proto.duration = function duration() {\n    if (!this.masterPlaylistLoader_) {\n      return 0;\n    }\n\n    var media = this.masterPlaylistLoader_.media();\n\n    if (!media) {\n      // no playlists loaded yet, so can't determine a duration\n      return 0;\n    } // Don't rely on the media source for duration in the case of a live playlist since\n    // setting the native MediaSource's duration to infinity ends up with consequences to\n    // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n    //\n    // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n    // however, few browsers have support for setLiveSeekableRange()\n    // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n    //\n    // Until a time when the duration of the media source can be set to infinity, and a\n    // seekable range specified across browsers, just return Infinity.\n\n\n    if (!media.endList) {\n      return Infinity;\n    } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n    // available). If it's not available, fall back to a playlist-calculated estimate.\n\n\n    if (this.mediaSource) {\n      return this.mediaSource.duration;\n    }\n\n    return Vhs$1.Playlist.duration(media);\n  }\n  /**\n   * check the seekable range\n   *\n   * @return {TimeRange} the seekable range\n   */\n  ;\n\n  _proto.seekable = function seekable() {\n    return this.seekable_;\n  };\n\n  _proto.onSyncInfoUpdate_ = function onSyncInfoUpdate_() {\n    var audioSeekable; // TODO check for creation of both source buffers before updating seekable\n    //\n    // A fix was made to this function where a check for\n    // this.sourceUpdater_.hasCreatedSourceBuffers\n    // was added to ensure that both source buffers were created before seekable was\n    // updated. However, it originally had a bug where it was checking for a true and\n    // returning early instead of checking for false. Setting it to check for false to\n    // return early though created other issues. A call to play() would check for seekable\n    // end without verifying that a seekable range was present. In addition, even checking\n    // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n    // due to a media update calling load on the segment loaders, skipping a seek to live,\n    // thereby starting live streams at the beginning of the stream rather than at the end.\n    //\n    // This conditional should be fixed to wait for the creation of two source buffers at\n    // the same time as the other sections of code are fixed to properly seek to live and\n    // not throw an error due to checking for a seekable end when no seekable range exists.\n    //\n    // For now, fall back to the older behavior, with the understanding that the seekable\n    // range may not be completely correct, leading to a suboptimal initial live point.\n\n    if (!this.masterPlaylistLoader_) {\n      return;\n    }\n\n    var media = this.masterPlaylistLoader_.media();\n\n    if (!media) {\n      return;\n    }\n\n    var expired = this.syncController_.getExpiredTime(media, this.duration());\n\n    if (expired === null) {\n      // not enough information to update seekable\n      return;\n    }\n\n    var master = this.masterPlaylistLoader_.master;\n    var mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(master, media));\n\n    if (mainSeekable.length === 0) {\n      return;\n    }\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n      expired = this.syncController_.getExpiredTime(media, this.duration());\n\n      if (expired === null) {\n        return;\n      }\n\n      audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(master, media));\n\n      if (audioSeekable.length === 0) {\n        return;\n      }\n    }\n\n    var oldEnd;\n    var oldStart;\n\n    if (this.seekable_ && this.seekable_.length) {\n      oldEnd = this.seekable_.end(0);\n      oldStart = this.seekable_.start(0);\n    }\n\n    if (!audioSeekable) {\n      // seekable has been calculated based on buffering video data so it\n      // can be returned directly\n      this.seekable_ = mainSeekable;\n    } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n      // seekables are pretty far off, rely on main\n      this.seekable_ = mainSeekable;\n    } else {\n      this.seekable_ = videojs.createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n    } // seekable is the same as last time\n\n\n    if (this.seekable_ && this.seekable_.length) {\n      if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n        return;\n      }\n    }\n\n    this.logger_(\"seekable updated [\" + printableRange(this.seekable_) + \"]\");\n    this.tech_.trigger('seekablechanged');\n  }\n  /**\n   * Update the player duration\n   */\n  ;\n\n  _proto.updateDuration = function updateDuration(isLive) {\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n      this.updateDuration_ = null;\n    }\n\n    if (this.mediaSource.readyState !== 'open') {\n      this.updateDuration_ = this.updateDuration.bind(this, isLive);\n      this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n      return;\n    }\n\n    if (isLive) {\n      var seekable = this.seekable();\n\n      if (!seekable.length) {\n        return;\n      } // Even in the case of a live playlist, the native MediaSource's duration should not\n      // be set to Infinity (even though this would be expected for a live playlist), since\n      // setting the native MediaSource's duration to infinity ends up with consequences to\n      // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n      //\n      // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n      // however, few browsers have support for setLiveSeekableRange()\n      // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n      //\n      // Until a time when the duration of the media source can be set to infinity, and a\n      // seekable range specified across browsers, the duration should be greater than or\n      // equal to the last possible seekable value.\n      // MediaSource duration starts as NaN\n      // It is possible (and probable) that this case will never be reached for many\n      // sources, since the MediaSource reports duration as the highest value without\n      // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n      // we buffered times 0 to 100 with real times of 100 to 200, even though current\n      // time will be between 0 and 100, the native media source may report the duration\n      // as 200. However, since we report duration separate from the media source (as\n      // Infinity), and as long as the native media source duration value is greater than\n      // our reported seekable range, seeks will work as expected. The large number as\n      // duration for live is actually a strategy used by some players to work around the\n      // issue of live seekable ranges cited above.\n\n\n      if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n        this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n      }\n\n      return;\n    }\n\n    var buffered = this.tech_.buffered();\n    var duration = Vhs$1.Playlist.duration(this.masterPlaylistLoader_.media());\n\n    if (buffered.length > 0) {\n      duration = Math.max(duration, buffered.end(buffered.length - 1));\n    }\n\n    if (this.mediaSource.duration !== duration) {\n      this.sourceUpdater_.setDuration(duration);\n    }\n  }\n  /**\n   * dispose of the MasterPlaylistController and everything\n   * that it controls\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    var _this8 = this;\n\n    this.trigger('dispose');\n    this.decrypter_.terminate();\n    this.masterPlaylistLoader_.dispose();\n    this.mainSegmentLoader_.dispose();\n\n    if (this.loadOnPlay_) {\n      this.tech_.off('play', this.loadOnPlay_);\n    }\n\n    ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n      var groups = _this8.mediaTypes_[type].groups;\n\n      for (var id in groups) {\n        groups[id].forEach(function (group) {\n          if (group.playlistLoader) {\n            group.playlistLoader.dispose();\n          }\n        });\n      }\n    });\n    this.audioSegmentLoader_.dispose();\n    this.subtitleSegmentLoader_.dispose();\n    this.sourceUpdater_.dispose();\n    this.timelineChangeController_.dispose();\n    this.stopABRTimer_();\n\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n    }\n\n    this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n    this.off();\n  }\n  /**\n   * return the master playlist object if we have one\n   *\n   * @return {Object} the master playlist object that we parsed\n   */\n  ;\n\n  _proto.master = function master() {\n    return this.masterPlaylistLoader_.master;\n  }\n  /**\n   * return the currently selected playlist\n   *\n   * @return {Object} the currently selected playlist object that we parsed\n   */\n  ;\n\n  _proto.media = function media() {\n    // playlist loader will not return media if it has not been fully loaded\n    return this.masterPlaylistLoader_.media() || this.initialMedia_;\n  };\n\n  _proto.areMediaTypesKnown_ = function areMediaTypesKnown_() {\n    var usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    var hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n    // otherwise check on the segment loader.\n\n    var hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n    if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n      return false;\n    }\n\n    return true;\n  };\n\n  _proto.getCodecsOrExclude_ = function getCodecsOrExclude_() {\n    var _this9 = this;\n\n    var media = {\n      main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n      audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n    };\n    var playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n    media.video = media.main;\n    var playlistCodecs = codecsForPlaylist(this.master(), playlist);\n    var codecs = {};\n    var usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n\n    if (media.main.hasVideo) {\n      codecs.video = playlistCodecs.video || media.main.videoCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"DEFAULT_VIDEO_CODEC\"];\n    }\n\n    if (media.main.isMuxed) {\n      codecs.video += \",\" + (playlistCodecs.audio || media.main.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"DEFAULT_AUDIO_CODEC\"]);\n    }\n\n    if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n      codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"DEFAULT_AUDIO_CODEC\"]; // set audio isFmp4 so we use the correct \"supports\" function below\n\n      media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n    } // no codecs, no playback.\n\n\n    if (!codecs.audio && !codecs.video) {\n      this.blacklistCurrentPlaylist({\n        playlist: playlist,\n        message: 'Could not determine codecs for playlist.',\n        blacklistDuration: Infinity\n      });\n      return;\n    } // fmp4 relies on browser support, while ts relies on muxer support\n\n\n    var supportFunction = function supportFunction(isFmp4, codec) {\n      return isFmp4 ? Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"browserSupportsCodec\"])(codec) : Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"muxerSupportsCodec\"])(codec);\n    };\n\n    var unsupportedCodecs = {};\n    var unsupportedAudio;\n    ['video', 'audio'].forEach(function (type) {\n      if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n        var supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n        unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n        unsupportedCodecs[supporter].push(codecs[type]);\n\n        if (type === 'audio') {\n          unsupportedAudio = supporter;\n        }\n      }\n    });\n\n    if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n      var audioGroup = playlist.attributes.AUDIO;\n      this.master().playlists.forEach(function (variant) {\n        var variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n\n        if (variantAudioGroup === audioGroup && variant !== playlist) {\n          variant.excludeUntil = Infinity;\n        }\n      });\n      this.logger_(\"excluding audio group \" + audioGroup + \" as \" + unsupportedAudio + \" does not support codec(s): \\\"\" + codecs.audio + \"\\\"\");\n    } // if we have any unsupported codecs blacklist this playlist.\n\n\n    if (Object.keys(unsupportedCodecs).length) {\n      var message = Object.keys(unsupportedCodecs).reduce(function (acc, supporter) {\n        if (acc) {\n          acc += ', ';\n        }\n\n        acc += supporter + \" does not support codec(s): \\\"\" + unsupportedCodecs[supporter].join(',') + \"\\\"\";\n        return acc;\n      }, '') + '.';\n      this.blacklistCurrentPlaylist({\n        playlist: playlist,\n        internal: true,\n        message: message,\n        blacklistDuration: Infinity\n      });\n      return;\n    } // check if codec switching is happening\n\n\n    if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n      var switchMessages = [];\n      ['video', 'audio'].forEach(function (type) {\n        var newCodec = (Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(_this9.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n        var oldCodec = (Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(codecs[type] || '')[0] || {}).type;\n\n        if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n          switchMessages.push(\"\\\"\" + _this9.sourceUpdater_.codecs[type] + \"\\\" -> \\\"\" + codecs[type] + \"\\\"\");\n        }\n      });\n\n      if (switchMessages.length) {\n        this.blacklistCurrentPlaylist({\n          playlist: playlist,\n          message: \"Codec switching not supported: \" + switchMessages.join(', ') + \".\",\n          blacklistDuration: Infinity,\n          internal: true\n        });\n        return;\n      }\n    } // TODO: when using the muxer shouldn't we just return\n    // the codecs that the muxer outputs?\n\n\n    return codecs;\n  }\n  /**\n   * Create source buffers and exlude any incompatible renditions.\n   *\n   * @private\n   */\n  ;\n\n  _proto.tryToCreateSourceBuffers_ = function tryToCreateSourceBuffers_() {\n    // media source is not ready yet or sourceBuffers are already\n    // created.\n    if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n      return;\n    }\n\n    if (!this.areMediaTypesKnown_()) {\n      return;\n    }\n\n    var codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n    if (!codecs) {\n      return;\n    }\n\n    this.sourceUpdater_.createSourceBuffers(codecs);\n    var codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n    this.excludeIncompatibleVariants_(codecString);\n  }\n  /**\n   * Excludes playlists with codecs that are unsupported by the muxer and browser.\n   */\n  ;\n\n  _proto.excludeUnsupportedVariants_ = function excludeUnsupportedVariants_() {\n    var _this10 = this;\n\n    var playlists = this.master().playlists;\n    var ids = []; // TODO: why don't we have a property to loop through all\n    // playlist? Why did we ever mix indexes and keys?\n\n    Object.keys(playlists).forEach(function (key) {\n      var variant = playlists[key]; // check if we already processed this playlist.\n\n      if (ids.indexOf(variant.id) !== -1) {\n        return;\n      }\n\n      ids.push(variant.id);\n      var codecs = codecsForPlaylist(_this10.master, variant);\n      var unsupported = [];\n\n      if (codecs.audio && !Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"muxerSupportsCodec\"])(codecs.audio) && !Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"browserSupportsCodec\"])(codecs.audio)) {\n        unsupported.push(\"audio codec \" + codecs.audio);\n      }\n\n      if (codecs.video && !Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"muxerSupportsCodec\"])(codecs.video) && !Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"browserSupportsCodec\"])(codecs.video)) {\n        unsupported.push(\"video codec \" + codecs.video);\n      }\n\n      if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n        unsupported.push(\"text codec \" + codecs.text);\n      }\n\n      if (unsupported.length) {\n        variant.excludeUntil = Infinity;\n\n        _this10.logger_(\"excluding \" + variant.id + \" for unsupported: \" + unsupported.join(', '));\n      }\n    });\n  }\n  /**\n   * Blacklist playlists that are known to be codec or\n   * stream-incompatible with the SourceBuffer configuration. For\n   * instance, Media Source Extensions would cause the video element to\n   * stall waiting for video data if you switched from a variant with\n   * video and audio to an audio-only one.\n   *\n   * @param {Object} media a media playlist compatible with the current\n   * set of SourceBuffers. Variants in the current master playlist that\n   * do not appear to have compatible codec or stream configurations\n   * will be excluded from the default playlist selection algorithm\n   * indefinitely.\n   * @private\n   */\n  ;\n\n  _proto.excludeIncompatibleVariants_ = function excludeIncompatibleVariants_(codecString) {\n    var _this11 = this;\n\n    var ids = [];\n    var playlists = this.master().playlists;\n    var codecs = unwrapCodecList(Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(codecString));\n    var codecCount_ = codecCount(codecs);\n    var videoDetails = codecs.video && Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(codecs.video)[0] || null;\n    var audioDetails = codecs.audio && Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(codecs.audio)[0] || null;\n    Object.keys(playlists).forEach(function (key) {\n      var variant = playlists[key]; // check if we already processed this playlist.\n      // or it if it is already excluded forever.\n\n      if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n        return;\n      }\n\n      ids.push(variant.id);\n      var blacklistReasons = []; // get codecs from the playlist for this variant\n\n      var variantCodecs = codecsForPlaylist(_this11.masterPlaylistLoader_.master, variant);\n      var variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n      // variant is incompatible. Wait for mux.js to probe\n\n      if (!variantCodecs.audio && !variantCodecs.video) {\n        return;\n      } // TODO: we can support this by removing the\n      // old media source and creating a new one, but it will take some work.\n      // The number of streams cannot change\n\n\n      if (variantCodecCount !== codecCount_) {\n        blacklistReasons.push(\"codec count \\\"\" + variantCodecCount + \"\\\" !== \\\"\" + codecCount_ + \"\\\"\");\n      } // only exclude playlists by codec change, if codecs cannot switch\n      // during playback.\n\n\n      if (!_this11.sourceUpdater_.canChangeType()) {\n        var variantVideoDetails = variantCodecs.video && Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(variantCodecs.video)[0] || null;\n        var variantAudioDetails = variantCodecs.audio && Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n        if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n          blacklistReasons.push(\"video codec \\\"\" + variantVideoDetails.type + \"\\\" !== \\\"\" + videoDetails.type + \"\\\"\");\n        } // the audio codec cannot change\n\n\n        if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n          blacklistReasons.push(\"audio codec \\\"\" + variantAudioDetails.type + \"\\\" !== \\\"\" + audioDetails.type + \"\\\"\");\n        }\n      }\n\n      if (blacklistReasons.length) {\n        variant.excludeUntil = Infinity;\n\n        _this11.logger_(\"blacklisting \" + variant.id + \": \" + blacklistReasons.join(' && '));\n      }\n    });\n  };\n\n  _proto.updateAdCues_ = function updateAdCues_(media) {\n    var offset = 0;\n    var seekable = this.seekable();\n\n    if (seekable.length) {\n      offset = seekable.start(0);\n    }\n\n    updateAdCues(media, this.cueTagsTrack_, offset);\n  }\n  /**\n   * Calculates the desired forward buffer length based on current time\n   *\n   * @return {number} Desired forward buffer length in seconds\n   */\n  ;\n\n  _proto.goalBufferLength = function goalBufferLength() {\n    var currentTime = this.tech_.currentTime();\n    var initial = Config.GOAL_BUFFER_LENGTH;\n    var rate = Config.GOAL_BUFFER_LENGTH_RATE;\n    var max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n    return Math.min(initial + currentTime * rate, max);\n  }\n  /**\n   * Calculates the desired buffer low water line based on current time\n   *\n   * @return {number} Desired buffer low water line in seconds\n   */\n  ;\n\n  _proto.bufferLowWaterLine = function bufferLowWaterLine() {\n    var currentTime = this.tech_.currentTime();\n    var initial = Config.BUFFER_LOW_WATER_LINE;\n    var rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n    var max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n    var newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n    return Math.min(initial + currentTime * rate, this.experimentalBufferBasedABR ? newMax : max);\n  };\n\n  _proto.bufferHighWaterLine = function bufferHighWaterLine() {\n    return Config.BUFFER_HIGH_WATER_LINE;\n  };\n\n  return MasterPlaylistController;\n}(videojs.EventTarget);\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The master playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\n\nvar enableFunction = function enableFunction(loader, playlistID, changePlaylistFn) {\n  return function (enable) {\n    var playlist = loader.master.playlists[playlistID];\n    var incompatible = isIncompatible(playlist);\n    var currentlyEnabled = isEnabled(playlist);\n\n    if (typeof enable === 'undefined') {\n      return currentlyEnabled;\n    }\n\n    if (enable) {\n      delete playlist.disabled;\n    } else {\n      playlist.disabled = true;\n    }\n\n    if (enable !== currentlyEnabled && !incompatible) {\n      // Ensure the outside world knows about our changes\n      changePlaylistFn();\n\n      if (enable) {\n        loader.trigger('renditionenabled');\n      } else {\n        loader.trigger('renditiondisabled');\n      }\n    }\n\n    return enable;\n  };\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\n\nvar Representation = function Representation(vhsHandler, playlist, id) {\n  var mpc = vhsHandler.masterPlaylistController_,\n      smoothQualityChange = vhsHandler.options_.smoothQualityChange; // Get a reference to a bound version of the quality change function\n\n  var changeType = smoothQualityChange ? 'smooth' : 'fast';\n  var qualityChangeFunction = mpc[changeType + \"QualityChange_\"].bind(mpc); // some playlist attributes are optional\n\n  if (playlist.attributes) {\n    var resolution = playlist.attributes.RESOLUTION;\n    this.width = resolution && resolution.width;\n    this.height = resolution && resolution.height;\n    this.bandwidth = playlist.attributes.BANDWIDTH;\n    this.frameRate = playlist.attributes['FRAME-RATE'];\n  }\n\n  this.codecs = codecsForPlaylist(mpc.master(), playlist);\n  this.playlist = playlist; // The id is simply the ordinality of the media playlist\n  // within the master playlist\n\n  this.id = id; // Partially-apply the enableFunction to create a playlist-\n  // specific variant\n\n  this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n};\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\n\nvar renditionSelectionMixin = function renditionSelectionMixin(vhsHandler) {\n  // Add a single API-specific function to the VhsHandler instance\n  vhsHandler.representations = function () {\n    var master = vhsHandler.masterPlaylistController_.master();\n    var playlists = isAudioOnly(master) ? vhsHandler.masterPlaylistController_.getAudioTrackPlaylists_() : master.playlists;\n\n    if (!playlists) {\n      return [];\n    }\n\n    return playlists.filter(function (media) {\n      return !isIncompatible(media);\n    }).map(function (e, i) {\n      return new Representation(vhsHandler, e, e.id);\n    });\n  };\n};\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\n\nvar timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nvar PlaybackWatcher = /*#__PURE__*/function () {\n  /**\n   * Represents an PlaybackWatcher object.\n   *\n   * @class\n   * @param {Object} options an object that includes the tech and settings\n   */\n  function PlaybackWatcher(options) {\n    var _this = this;\n\n    this.masterPlaylistController_ = options.masterPlaylistController;\n    this.tech_ = options.tech;\n    this.seekable = options.seekable;\n    this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n    this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n    this.media = options.media;\n    this.consecutiveUpdates = 0;\n    this.lastRecordedTime = null;\n    this.timer_ = null;\n    this.checkCurrentTimeTimeout_ = null;\n    this.logger_ = logger('PlaybackWatcher');\n    this.logger_('initialize');\n\n    var playHandler = function playHandler() {\n      return _this.monitorCurrentTime_();\n    };\n\n    var canPlayHandler = function canPlayHandler() {\n      return _this.monitorCurrentTime_();\n    };\n\n    var waitingHandler = function waitingHandler() {\n      return _this.techWaiting_();\n    };\n\n    var cancelTimerHandler = function cancelTimerHandler() {\n      return _this.cancelTimer_();\n    };\n\n    var mpc = this.masterPlaylistController_;\n    var loaderTypes = ['main', 'subtitle', 'audio'];\n    var loaderChecks = {};\n    loaderTypes.forEach(function (type) {\n      loaderChecks[type] = {\n        reset: function reset() {\n          return _this.resetSegmentDownloads_(type);\n        },\n        updateend: function updateend() {\n          return _this.checkSegmentDownloads_(type);\n        }\n      };\n      mpc[type + \"SegmentLoader_\"].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n      // isn't changing we want to reset. We cannot assume that the new rendition\n      // will also be stalled, until after new appends.\n\n      mpc[type + \"SegmentLoader_\"].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n      // This prevents one segment playlists (single vtt or single segment content)\n      // from being detected as stalling. As the buffer will not change in those cases, since\n      // the buffer is the entire video duration.\n\n      _this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n    });\n    /**\n     * We check if a seek was into a gap through the following steps:\n     * 1. We get a seeking event and we do not get a seeked event. This means that\n     *    a seek was attempted but not completed.\n     * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n     *    removed everything from our buffer and appended a segment, and should be ready\n     *    to check for gaps.\n     */\n\n    var setSeekingHandlers = function setSeekingHandlers(fn) {\n      ['main', 'audio'].forEach(function (type) {\n        mpc[type + \"SegmentLoader_\"][fn]('appended', _this.seekingAppendCheck_);\n      });\n    };\n\n    this.seekingAppendCheck_ = function () {\n      if (_this.fixesBadSeeks_()) {\n        _this.consecutiveUpdates = 0;\n        _this.lastRecordedTime = _this.tech_.currentTime();\n        setSeekingHandlers('off');\n      }\n    };\n\n    this.clearSeekingAppendCheck_ = function () {\n      return setSeekingHandlers('off');\n    };\n\n    this.watchForBadSeeking_ = function () {\n      _this.clearSeekingAppendCheck_();\n\n      setSeekingHandlers('on');\n    };\n\n    this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n    this.tech_.on('seeking', this.watchForBadSeeking_);\n    this.tech_.on('waiting', waitingHandler);\n    this.tech_.on(timerCancelEvents, cancelTimerHandler);\n    this.tech_.on('canplay', canPlayHandler);\n    /*\n      An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n      is surfaced in one of two ways:\n       1)  The `waiting` event is fired before the player has buffered content, making it impossible\n          to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n          we can check if playback is stalled due to a gap, and skip the gap if necessary.\n      2)  A source with a gap at the beginning of the stream is loaded programatically while the player\n          is in a playing state. To catch this case, it's important that our one-time play listener is setup\n          even if the player is in a playing state\n    */\n\n    this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n    this.dispose = function () {\n      _this.clearSeekingAppendCheck_();\n\n      _this.logger_('dispose');\n\n      _this.tech_.off('waiting', waitingHandler);\n\n      _this.tech_.off(timerCancelEvents, cancelTimerHandler);\n\n      _this.tech_.off('canplay', canPlayHandler);\n\n      _this.tech_.off('play', playHandler);\n\n      _this.tech_.off('seeking', _this.watchForBadSeeking_);\n\n      _this.tech_.off('seeked', _this.clearSeekingAppendCheck_);\n\n      loaderTypes.forEach(function (type) {\n        mpc[type + \"SegmentLoader_\"].off('appendsdone', loaderChecks[type].updateend);\n        mpc[type + \"SegmentLoader_\"].off('playlistupdate', loaderChecks[type].reset);\n\n        _this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n\n      if (_this.checkCurrentTimeTimeout_) {\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(_this.checkCurrentTimeTimeout_);\n      }\n\n      _this.cancelTimer_();\n    };\n  }\n  /**\n   * Periodically check current time to see if playback stopped\n   *\n   * @private\n   */\n\n\n  var _proto = PlaybackWatcher.prototype;\n\n  _proto.monitorCurrentTime_ = function monitorCurrentTime_() {\n    this.checkCurrentTime_();\n\n    if (this.checkCurrentTimeTimeout_) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkCurrentTimeTimeout_);\n    } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n\n    this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n  }\n  /**\n   * Reset stalled download stats for a specific type of loader\n   *\n   * @param {string} type\n   *        The segment loader type to check.\n   *\n   * @listens SegmentLoader#playlistupdate\n   * @listens Tech#seeking\n   * @listens Tech#seeked\n   */\n  ;\n\n  _proto.resetSegmentDownloads_ = function resetSegmentDownloads_(type) {\n    var loader = this.masterPlaylistController_[type + \"SegmentLoader_\"];\n\n    if (this[type + \"StalledDownloads_\"] > 0) {\n      this.logger_(\"resetting possible stalled download count for \" + type + \" loader\");\n    }\n\n    this[type + \"StalledDownloads_\"] = 0;\n    this[type + \"Buffered_\"] = loader.buffered_();\n  }\n  /**\n   * Checks on every segment `appendsdone` to see\n   * if segment appends are making progress. If they are not\n   * and we are still downloading bytes. We blacklist the playlist.\n   *\n   * @param {string} type\n   *        The segment loader type to check.\n   *\n   * @listens SegmentLoader#appendsdone\n   */\n  ;\n\n  _proto.checkSegmentDownloads_ = function checkSegmentDownloads_(type) {\n    var mpc = this.masterPlaylistController_;\n    var loader = mpc[type + \"SegmentLoader_\"];\n    var buffered = loader.buffered_();\n    var isBufferedDifferent = isRangeDifferent(this[type + \"Buffered_\"], buffered);\n    this[type + \"Buffered_\"] = buffered; // if another watcher is going to fix the issue or\n    // the buffered value for this loader changed\n    // appends are working\n\n    if (isBufferedDifferent) {\n      this.resetSegmentDownloads_(type);\n      return;\n    }\n\n    this[type + \"StalledDownloads_\"]++;\n    this.logger_(\"found #\" + this[type + \"StalledDownloads_\"] + \" \" + type + \" appends that did not increase buffer (possible stalled download)\", {\n      playlistId: loader.playlist_ && loader.playlist_.id,\n      buffered: timeRangesToArray(buffered)\n    }); // after 10 possibly stalled appends with no reset, exclude\n\n    if (this[type + \"StalledDownloads_\"] < 10) {\n      return;\n    }\n\n    this.logger_(type + \" loader stalled download exclusion\");\n    this.resetSegmentDownloads_(type);\n    this.tech_.trigger({\n      type: 'usage',\n      name: \"vhs-\" + type + \"-download-exclusion\"\n    });\n\n    if (type === 'subtitle') {\n      return;\n    } // TODO: should we exclude audio tracks rather than main tracks\n    // when type is audio?\n\n\n    mpc.blacklistCurrentPlaylist({\n      message: \"Excessive \" + type + \" segment downloading detected.\"\n    }, Infinity);\n  }\n  /**\n   * The purpose of this function is to emulate the \"waiting\" event on\n   * browsers that do not emit it when they are waiting for more\n   * data to continue playback\n   *\n   * @private\n   */\n  ;\n\n  _proto.checkCurrentTime_ = function checkCurrentTime_() {\n    if (this.tech_.paused() || this.tech_.seeking()) {\n      return;\n    }\n\n    var currentTime = this.tech_.currentTime();\n    var buffered = this.tech_.buffered();\n\n    if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n      // If current time is at the end of the final buffered region, then any playback\n      // stall is most likely caused by buffering in a low bandwidth environment. The tech\n      // should fire a `waiting` event in this scenario, but due to browser and tech\n      // inconsistencies. Calling `techWaiting_` here allows us to simulate\n      // responding to a native `waiting` event when the tech fails to emit one.\n      return this.techWaiting_();\n    }\n\n    if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n      this.consecutiveUpdates++;\n      this.waiting_();\n    } else if (currentTime === this.lastRecordedTime) {\n      this.consecutiveUpdates++;\n    } else {\n      this.consecutiveUpdates = 0;\n      this.lastRecordedTime = currentTime;\n    }\n  }\n  /**\n   * Cancels any pending timers and resets the 'timeupdate' mechanism\n   * designed to detect that we are stalled\n   *\n   * @private\n   */\n  ;\n\n  _proto.cancelTimer_ = function cancelTimer_() {\n    this.consecutiveUpdates = 0;\n\n    if (this.timer_) {\n      this.logger_('cancelTimer_');\n      clearTimeout(this.timer_);\n    }\n\n    this.timer_ = null;\n  }\n  /**\n   * Fixes situations where there's a bad seek\n   *\n   * @return {boolean} whether an action was taken to fix the seek\n   * @private\n   */\n  ;\n\n  _proto.fixesBadSeeks_ = function fixesBadSeeks_() {\n    var seeking = this.tech_.seeking();\n\n    if (!seeking) {\n      return false;\n    } // TODO: It's possible that these seekable checks should be moved out of this function\n    // and into a function that runs on seekablechange. It's also possible that we only need\n    // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n    // seekable range.\n\n\n    var seekable = this.seekable();\n    var currentTime = this.tech_.currentTime();\n    var isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n    var seekTo;\n\n    if (isAfterSeekableRange) {\n      var seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n      seekTo = seekableEnd;\n    }\n\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      var seekableStart = seekable.start(0); // sync to the beginning of the live window\n      // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n      seekTo = seekableStart + ( // if the playlist is too short and the seekable range is an exact time (can\n      // happen in live with a 3 segment playlist), then don't use a time delta\n      seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n    }\n\n    if (typeof seekTo !== 'undefined') {\n      this.logger_(\"Trying to seek outside of seekable at time \" + currentTime + \" with \" + (\"seekable range \" + printableRange(seekable) + \". Seeking to \") + (seekTo + \".\"));\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n\n    var sourceUpdater = this.masterPlaylistController_.sourceUpdater_;\n    var buffered = this.tech_.buffered();\n    var audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n    var videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n    var media = this.media(); // verify that at least two segment durations or one part duration have been\n    // appended before checking for a gap.\n\n    var minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n    // appended before checking for a gap.\n\n    var bufferedToCheck = [audioBuffered, videoBuffered];\n\n    for (var i = 0; i < bufferedToCheck.length; i++) {\n      // skip null buffered\n      if (!bufferedToCheck[i]) {\n        continue;\n      }\n\n      var timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n      // duration behind we haven't appended enough to call this a bad seek.\n\n      if (timeAhead < minAppendedDuration) {\n        return false;\n      }\n    }\n\n    var nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n    // to seek over the gap\n\n    if (nextRange.length === 0) {\n      return false;\n    }\n\n    seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n    this.logger_(\"Buffered region starts (\" + nextRange.start(0) + \") \" + (\" just beyond seek point (\" + currentTime + \"). Seeking to \" + seekTo + \".\"));\n    this.tech_.setCurrentTime(seekTo);\n    return true;\n  }\n  /**\n   * Handler for situations when we determine the player is waiting.\n   *\n   * @private\n   */\n  ;\n\n  _proto.waiting_ = function waiting_() {\n    if (this.techWaiting_()) {\n      return;\n    } // All tech waiting checks failed. Use last resort correction\n\n\n    var currentTime = this.tech_.currentTime();\n    var buffered = this.tech_.buffered();\n    var currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n    // region with no indication that anything is amiss (seen in Firefox). Seeking to\n    // currentTime is usually enough to kickstart the player. This checks that the player\n    // is currently within a buffered region before attempting a corrective seek.\n    // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n    // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n    // make sure there is ~3 seconds of forward buffer before taking any corrective action\n    // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n    if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n      this.cancelTimer_();\n      this.tech_.setCurrentTime(currentTime);\n      this.logger_(\"Stopped at \" + currentTime + \" while inside a buffered region \" + (\"[\" + currentRange.start(0) + \" -> \" + currentRange.end(0) + \"]. Attempting to resume \") + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-unknown-waiting'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-unknown-waiting'\n      });\n      return;\n    }\n  }\n  /**\n   * Handler for situations when the tech fires a `waiting` event\n   *\n   * @return {boolean}\n   *         True if an action (or none) was needed to correct the waiting. False if no\n   *         checks passed\n   * @private\n   */\n  ;\n\n  _proto.techWaiting_ = function techWaiting_() {\n    var seekable = this.seekable();\n    var currentTime = this.tech_.currentTime();\n\n    if (this.tech_.seeking() || this.timer_ !== null) {\n      // Tech is seeking or already waiting on another action, no action needed\n      return true;\n    }\n\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      var livePoint = seekable.end(seekable.length - 1);\n      this.logger_(\"Fell out of live window at time \" + currentTime + \". Seeking to \" + (\"live point (seekable end) \" + livePoint));\n      this.cancelTimer_();\n      this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-live-resync'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-live-resync'\n      });\n      return true;\n    }\n\n    var sourceUpdater = this.tech_.vhs.masterPlaylistController_.sourceUpdater_;\n    var buffered = this.tech_.buffered();\n    var videoUnderflow = this.videoUnderflow_({\n      audioBuffered: sourceUpdater.audioBuffered(),\n      videoBuffered: sourceUpdater.videoBuffered(),\n      currentTime: currentTime\n    });\n\n    if (videoUnderflow) {\n      // Even though the video underflowed and was stuck in a gap, the audio overplayed\n      // the gap, leading currentTime into a buffered range. Seeking to currentTime\n      // allows the video to catch up to the audio position without losing any audio\n      // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n      this.cancelTimer_();\n      this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-video-underflow'\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'hls-video-underflow'\n      });\n      return true;\n    }\n\n    var nextRange = findNextRange(buffered, currentTime); // check for gap\n\n    if (nextRange.length > 0) {\n      var difference = nextRange.start(0) - currentTime;\n      this.logger_(\"Stopped at \" + currentTime + \", setting timer for \" + difference + \", seeking \" + (\"to \" + nextRange.start(0)));\n      this.cancelTimer_();\n      this.timer_ = setTimeout(this.skipTheGap_.bind(this), difference * 1000, currentTime);\n      return true;\n    } // All checks failed. Returning false to indicate failure to correct waiting\n\n\n    return false;\n  };\n\n  _proto.afterSeekableWindow_ = function afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow) {\n    if (allowSeeksWithinUnsafeLiveWindow === void 0) {\n      allowSeeksWithinUnsafeLiveWindow = false;\n    }\n\n    if (!seekable.length) {\n      // we can't make a solid case if there's no seekable, default to false\n      return false;\n    }\n\n    var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n    var isLive = !playlist.endList;\n\n    if (isLive && allowSeeksWithinUnsafeLiveWindow) {\n      allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n    }\n\n    if (currentTime > allowedEnd) {\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.beforeSeekableWindow_ = function beforeSeekableWindow_(seekable, currentTime) {\n    if (seekable.length && // can't fall before 0 and 0 seekable start identifies VOD stream\n    seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.videoUnderflow_ = function videoUnderflow_(_ref) {\n    var videoBuffered = _ref.videoBuffered,\n        audioBuffered = _ref.audioBuffered,\n        currentTime = _ref.currentTime; // audio only content will not have video underflow :)\n\n    if (!videoBuffered) {\n      return;\n    }\n\n    var gap; // find a gap in demuxed content.\n\n    if (videoBuffered.length && audioBuffered.length) {\n      // in Chrome audio will continue to play for ~3s when we run out of video\n      // so we have to check that the video buffer did have some buffer in the\n      // past.\n      var lastVideoRange = findRange(videoBuffered, currentTime - 3);\n      var videoRange = findRange(videoBuffered, currentTime);\n      var audioRange = findRange(audioBuffered, currentTime);\n\n      if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n        gap = {\n          start: lastVideoRange.end(0),\n          end: audioRange.end(0)\n        };\n      } // find a gap in muxed content.\n\n    } else {\n      var nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n      // stuck in a gap due to video underflow.\n\n      if (!nextRange.length) {\n        gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n      }\n    }\n\n    if (gap) {\n      this.logger_(\"Encountered a gap in video from \" + gap.start + \" to \" + gap.end + \". \" + (\"Seeking to current time \" + currentTime));\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * Timer callback. If playback still has not proceeded, then we seek\n   * to the start of the next buffered region.\n   *\n   * @private\n   */\n  ;\n\n  _proto.skipTheGap_ = function skipTheGap_(scheduledCurrentTime) {\n    var buffered = this.tech_.buffered();\n    var currentTime = this.tech_.currentTime();\n    var nextRange = findNextRange(buffered, currentTime);\n    this.cancelTimer_();\n\n    if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n      return;\n    }\n\n    this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n    this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'vhs-gap-skip'\n    });\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'hls-gap-skip'\n    });\n  };\n\n  _proto.gapFromVideoUnderflow_ = function gapFromVideoUnderflow_(buffered, currentTime) {\n    // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n    // playing for ~3 seconds after the video gap starts. This is done to account for\n    // video buffer underflow/underrun (note that this is not done when there is audio\n    // buffer underflow/underrun -- in that case the video will stop as soon as it\n    // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n    // video stalls). The player's time will reflect the playthrough of audio, so the\n    // time will appear as if we are in a buffered region, even if we are stuck in a\n    // \"gap.\"\n    //\n    // Example:\n    // video buffer:   0 => 10.1, 10.2 => 20\n    // audio buffer:   0 => 20\n    // overall buffer: 0 => 10.1, 10.2 => 20\n    // current time: 13\n    //\n    // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n    // however, the audio continued playing until it reached ~3 seconds past the gap\n    // (13 seconds), at which point it stops as well. Since current time is past the\n    // gap, findNextRange will return no ranges.\n    //\n    // To check for this issue, we see if there is a gap that starts somewhere within\n    // a 3 second range (3 seconds +/- 1 second) back from our current time.\n    var gaps = findGaps(buffered);\n\n    for (var i = 0; i < gaps.length; i++) {\n      var start = gaps.start(i);\n      var end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n      if (currentTime - start < 4 && currentTime - start > 2) {\n        return {\n          start: start,\n          end: end\n        };\n      }\n    }\n\n    return null;\n  };\n\n  return PlaybackWatcher;\n}();\n\nvar defaultOptions = {\n  errorInterval: 30,\n  getSource: function getSource(next) {\n    var tech = this.tech({\n      IWillNotUseThisInPlugins: true\n    });\n    var sourceObj = tech.currentSource_ || this.currentSource();\n    return next(sourceObj);\n  }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nvar initPlugin = function initPlugin(player, options) {\n  var lastCalled = 0;\n  var seekTo = 0;\n  var localOptions = videojs.mergeOptions(defaultOptions, options);\n  player.ready(function () {\n    player.trigger({\n      type: 'usage',\n      name: 'vhs-error-reload-initialized'\n    });\n    player.trigger({\n      type: 'usage',\n      name: 'hls-error-reload-initialized'\n    });\n  });\n  /**\n   * Player modifications to perform that must wait until `loadedmetadata`\n   * has been triggered\n   *\n   * @private\n   */\n\n  var loadedMetadataHandler = function loadedMetadataHandler() {\n    if (seekTo) {\n      player.currentTime(seekTo);\n    }\n  };\n  /**\n   * Set the source on the player element, play, and seek if necessary\n   *\n   * @param {Object} sourceObj An object specifying the source url and mime-type to play\n   * @private\n   */\n\n\n  var setSource = function setSource(sourceObj) {\n    if (sourceObj === null || sourceObj === undefined) {\n      return;\n    }\n\n    seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n    player.one('loadedmetadata', loadedMetadataHandler);\n    player.src(sourceObj);\n    player.trigger({\n      type: 'usage',\n      name: 'vhs-error-reload'\n    });\n    player.trigger({\n      type: 'usage',\n      name: 'hls-error-reload'\n    });\n    player.play();\n  };\n  /**\n   * Attempt to get a source from either the built-in getSource function\n   * or a custom function provided via the options\n   *\n   * @private\n   */\n\n\n  var errorHandler = function errorHandler() {\n    // Do not attempt to reload the source if a source-reload occurred before\n    // 'errorInterval' time has elapsed since the last source-reload\n    if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n      player.trigger({\n        type: 'usage',\n        name: 'vhs-error-reload-canceled'\n      });\n      player.trigger({\n        type: 'usage',\n        name: 'hls-error-reload-canceled'\n      });\n      return;\n    }\n\n    if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n      videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n      return;\n    }\n\n    lastCalled = Date.now();\n    return localOptions.getSource.call(player, setSource);\n  };\n  /**\n   * Unbind any event handlers that were bound by the plugin\n   *\n   * @private\n   */\n\n\n  var cleanupEvents = function cleanupEvents() {\n    player.off('loadedmetadata', loadedMetadataHandler);\n    player.off('error', errorHandler);\n    player.off('dispose', cleanupEvents);\n  };\n  /**\n   * Cleanup before re-initializing the plugin\n   *\n   * @param {Object} [newOptions] an object with plugin options\n   * @private\n   */\n\n\n  var reinitPlugin = function reinitPlugin(newOptions) {\n    cleanupEvents();\n    initPlugin(player, newOptions);\n  };\n\n  player.on('error', errorHandler);\n  player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n  // initializing the plugin\n\n  player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\n\nvar reloadSourceOnError = function reloadSourceOnError(options) {\n  initPlugin(this, options);\n};\n\nvar version$4 = \"2.16.3\";\nvar version$3 = \"6.0.1\";\nvar version$2 = \"0.22.1\";\nvar version$1 = \"4.8.0\";\nvar version = \"3.1.3\";\nvar Vhs = {\n  PlaylistLoader: PlaylistLoader,\n  Playlist: Playlist,\n  utils: utils,\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n  lastBandwidthSelector: lastBandwidthSelector,\n  movingAverageBandwidthSelector: movingAverageBandwidthSelector,\n  comparePlaylistBandwidth: comparePlaylistBandwidth,\n  comparePlaylistResolution: comparePlaylistResolution,\n  xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(function (prop) {\n  Object.defineProperty(Vhs, prop, {\n    get: function get() {\n      videojs.log.warn(\"using Vhs.\" + prop + \" is UNSAFE be sure you know what you are doing\");\n      return Config[prop];\n    },\n    set: function set(value) {\n      videojs.log.warn(\"using Vhs.\" + prop + \" is UNSAFE be sure you know what you are doing\");\n\n      if (typeof value !== 'number' || value < 0) {\n        videojs.log.warn(\"value of Vhs.\" + prop + \" must be greater than or equal to 0\");\n        return;\n      }\n\n      Config[prop] = value;\n    }\n  });\n});\nvar LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nvar handleVhsMediaChange = function handleVhsMediaChange(qualityLevels, playlistLoader) {\n  var newPlaylist = playlistLoader.media();\n  var selectedIndex = -1;\n\n  for (var i = 0; i < qualityLevels.length; i++) {\n    if (qualityLevels[i].id === newPlaylist.id) {\n      selectedIndex = i;\n      break;\n    }\n  }\n\n  qualityLevels.selectedIndex_ = selectedIndex;\n  qualityLevels.trigger({\n    selectedIndex: selectedIndex,\n    type: 'change'\n  });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\n\nvar handleVhsLoadedMetadata = function handleVhsLoadedMetadata(qualityLevels, vhs) {\n  vhs.representations().forEach(function (rep) {\n    qualityLevels.addQualityLevel(rep);\n  });\n  handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // HLS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\n\nVhs.canPlaySource = function () {\n  return videojs.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n\nvar emeKeySystems = function emeKeySystems(keySystemOptions, mainPlaylist, audioPlaylist) {\n  if (!keySystemOptions) {\n    return keySystemOptions;\n  }\n\n  var codecs = {};\n\n  if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n    codecs = unwrapCodecList(Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"parseCodecs\"])(mainPlaylist.attributes.CODECS));\n  }\n\n  if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n    codecs.audio = audioPlaylist.attributes.CODECS;\n  }\n\n  var videoContentType = Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"getMimeForCodec\"])(codecs.video);\n  var audioContentType = Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"getMimeForCodec\"])(codecs.audio); // upsert the content types based on the selected playlist\n\n  var keySystemContentTypes = {};\n\n  for (var keySystem in keySystemOptions) {\n    keySystemContentTypes[keySystem] = {};\n\n    if (audioContentType) {\n      keySystemContentTypes[keySystem].audioContentType = audioContentType;\n    }\n\n    if (videoContentType) {\n      keySystemContentTypes[keySystem].videoContentType = videoContentType;\n    } // Default to using the video playlist's PSSH even though they may be different, as\n    // videojs-contrib-eme will only accept one in the options.\n    //\n    // This shouldn't be an issue for most cases as early intialization will handle all\n    // unique PSSH values, and if they aren't, then encrypted events should have the\n    // specific information needed for the unique license.\n\n\n    if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n      keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n    } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n    // so we need to prevent overwriting the URL entirely\n\n\n    if (typeof keySystemOptions[keySystem] === 'string') {\n      keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n    }\n  }\n\n  return videojs.mergeOptions(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n *           Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n *        The playlists to look through\n * @param {string[]} keySystems\n *        The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n *         An array of KeySystems objects containing available key systems and their\n *         pssh values\n */\n\n\nvar getAllPsshKeySystemsOptions = function getAllPsshKeySystemsOptions(playlists, keySystems) {\n  return playlists.reduce(function (keySystemsArr, playlist) {\n    if (!playlist.contentProtection) {\n      return keySystemsArr;\n    }\n\n    var keySystemsOptions = keySystems.reduce(function (keySystemsObj, keySystem) {\n      var keySystemOptions = playlist.contentProtection[keySystem];\n\n      if (keySystemOptions && keySystemOptions.pssh) {\n        keySystemsObj[keySystem] = {\n          pssh: keySystemOptions.pssh\n        };\n      }\n\n      return keySystemsObj;\n    }, {});\n\n    if (Object.keys(keySystemsOptions).length) {\n      keySystemsArr.push(keySystemsOptions);\n    }\n\n    return keySystemsArr;\n  }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n *        The player instance\n * @param {Object[]} sourceKeySystems\n *        The key systems options from the player source\n * @param {Object} [audioMedia]\n *        The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n *        The playlists found on the master playlist object\n *\n * @return {Object}\n *         Promise that resolves when the key session has been created\n */\n\n\nvar waitForKeySessionCreation = function waitForKeySessionCreation(_ref) {\n  var player = _ref.player,\n      sourceKeySystems = _ref.sourceKeySystems,\n      audioMedia = _ref.audioMedia,\n      mainPlaylists = _ref.mainPlaylists;\n\n  if (!player.eme.initializeMediaKeys) {\n    return Promise.resolve();\n  } // TODO should all audio PSSH values be initialized for DRM?\n  //\n  // All unique video rendition pssh values are initialized for DRM, but here only\n  // the initial audio playlist license is initialized. In theory, an encrypted\n  // event should be fired if the user switches to an alternative audio playlist\n  // where a license is required, but this case hasn't yet been tested. In addition, there\n  // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n  // languages).\n\n\n  var playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n  var keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n  var initializationFinishedPromises = [];\n  var keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n  // only place where it should not be deduped is for ms-prefixed APIs, but the early\n  // return for IE11 above, and the existence of modern EME APIs in addition to\n  // ms-prefixed APIs on Edge should prevent this from being a concern.\n  // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n  keySystemsOptionsArr.forEach(function (keySystemsOptions) {\n    keySessionCreatedPromises.push(new Promise(function (resolve, reject) {\n      player.tech_.one('keysessioncreated', resolve);\n    }));\n    initializationFinishedPromises.push(new Promise(function (resolve, reject) {\n      player.eme.initializeMediaKeys({\n        keySystems: keySystemsOptions\n      }, function (err) {\n        if (err) {\n          reject(err);\n          return;\n        }\n\n        resolve();\n      });\n    }));\n  }); // The reasons Promise.race is chosen over Promise.any:\n  //\n  // * Promise.any is only available in Safari 14+.\n  // * None of these promises are expected to reject. If they do reject, it might be\n  //   better here for the race to surface the rejection, rather than mask it by using\n  //   Promise.any.\n\n  return Promise.race([// If a session was previously created, these will all finish resolving without\n  // creating a new session, otherwise it will take until the end of all license\n  // requests, which is why the key session check is used (to make setup much faster).\n  Promise.all(initializationFinishedPromises), // Once a single session is created, the browser knows DRM will be used.\n  Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n *        The player instance\n * @param {Object[]} sourceKeySystems\n *        The key systems options from the player source\n * @param {Object} media\n *        The active media playlist\n * @param {Object} [audioMedia]\n *        The active audio media playlist (optional)\n *\n * @return {boolean}\n *         Whether or not options were configured and EME is available\n */\n\n\nvar setupEmeOptions = function setupEmeOptions(_ref2) {\n  var player = _ref2.player,\n      sourceKeySystems = _ref2.sourceKeySystems,\n      media = _ref2.media,\n      audioMedia = _ref2.audioMedia;\n  var sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n\n  if (!sourceOptions) {\n    return false;\n  }\n\n  player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n  // do nothing.\n\n  if (sourceOptions && !player.eme) {\n    videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n    return false;\n  }\n\n  return true;\n};\n\nvar getVhsLocalStorage = function getVhsLocalStorage() {\n  if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage) {\n    return null;\n  }\n\n  var storedObject = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.getItem(LOCAL_STORAGE_KEY);\n\n  if (!storedObject) {\n    return null;\n  }\n\n  try {\n    return JSON.parse(storedObject);\n  } catch (e) {\n    // someone may have tampered with the value\n    return null;\n  }\n};\n\nvar updateVhsLocalStorage = function updateVhsLocalStorage(options) {\n  if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage) {\n    return false;\n  }\n\n  var objectToStore = getVhsLocalStorage();\n  objectToStore = objectToStore ? videojs.mergeOptions(objectToStore, options) : options;\n\n  try {\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n  } catch (e) {\n    // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n    // storage is set to 0).\n    // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n    // No need to perform any operation.\n    return false;\n  }\n\n  return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n *        The data URI\n *\n * @return {string|Object}\n *         The parsed object/string, or the original string if no supported media type\n *         was found\n */\n\n\nvar expandDataUri = function expandDataUri(dataUri) {\n  if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n    return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n  } // no known case for this data URI, return the string as-is\n\n\n  return dataUri;\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\n\nVhs.supportsNativeHls = function () {\n  if (!global_document__WEBPACK_IMPORTED_MODULE_1___default.a || !global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement) {\n    return false;\n  }\n\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n  if (!videojs.getTech('Html5').isSupported()) {\n    return false;\n  } // HLS manifests can go by many mime-types\n\n\n  var canPlay = [// Apple santioned\n  'application/vnd.apple.mpegurl', // Apple sanctioned for backwards compatibility\n  'audio/mpegurl', // Very common\n  'audio/x-mpegurl', // Very common\n  'application/x-mpegurl', // Included for completeness\n  'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n  return canPlay.some(function (canItPlay) {\n    return /maybe|probably/i.test(video.canPlayType(canItPlay));\n  });\n}();\n\nVhs.supportsNativeDash = function () {\n  if (!global_document__WEBPACK_IMPORTED_MODULE_1___default.a || !global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement || !videojs.getTech('Html5').isSupported()) {\n    return false;\n  }\n\n  return /maybe|probably/i.test(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video').canPlayType('application/dash+xml'));\n}();\n\nVhs.supportsTypeNatively = function (type) {\n  if (type === 'hls') {\n    return Vhs.supportsNativeHls;\n  }\n\n  if (type === 'dash') {\n    return Vhs.supportsNativeDash;\n  }\n\n  return false;\n};\n/**\n * HLS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\n\nVhs.isSupported = function () {\n  return videojs.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n\nvar Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of HLS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nvar VhsHandler = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_5___default()(VhsHandler, _Component);\n\n  function VhsHandler(source, tech, options) {\n    var _this;\n\n    _this = _Component.call(this, tech, videojs.mergeOptions(options.hls, options.vhs)) || this;\n\n    if (options.hls && Object.keys(options.hls).length) {\n      videojs.log.warn('Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.');\n    } // if a tech level `initialBandwidth` option was passed\n    // use that over the VHS level `bandwidth` option\n\n\n    if (typeof options.initialBandwidth === 'number') {\n      _this.options_.bandwidth = options.initialBandwidth;\n    }\n\n    _this.logger_ = logger('VhsHandler'); // tech.player() is deprecated but setup a reference to HLS for\n    // backwards-compatibility\n\n    if (tech.options_ && tech.options_.playerId) {\n      var _player = videojs(tech.options_.playerId);\n\n      if (!_player.hasOwnProperty('hls')) {\n        Object.defineProperty(_player, 'hls', {\n          get: function get() {\n            videojs.log.warn('player.hls is deprecated. Use player.tech().vhs instead.');\n            tech.trigger({\n              type: 'usage',\n              name: 'hls-player-access'\n            });\n            return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this);\n          },\n          configurable: true\n        });\n      }\n\n      if (!_player.hasOwnProperty('vhs')) {\n        Object.defineProperty(_player, 'vhs', {\n          get: function get() {\n            videojs.log.warn('player.vhs is deprecated. Use player.tech().vhs instead.');\n            tech.trigger({\n              type: 'usage',\n              name: 'vhs-player-access'\n            });\n            return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this);\n          },\n          configurable: true\n        });\n      }\n\n      if (!_player.hasOwnProperty('dash')) {\n        Object.defineProperty(_player, 'dash', {\n          get: function get() {\n            videojs.log.warn('player.dash is deprecated. Use player.tech().vhs instead.');\n            return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this);\n          },\n          configurable: true\n        });\n      }\n\n      _this.player_ = _player;\n    }\n\n    _this.tech_ = tech;\n    _this.source_ = source;\n    _this.stats = {};\n    _this.ignoreNextSeekingEvent_ = false;\n\n    _this.setOptions_();\n\n    if (_this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n      tech.overrideNativeAudioTracks(true);\n      tech.overrideNativeVideoTracks(true);\n    } else if (_this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n      // overriding native HLS only works if audio tracks have been emulated\n      // error early if we're misconfigured\n      throw new Error('Overriding native HLS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n    } // listen for fullscreenchange events for this player so that we\n    // can adjust our quality selection quickly\n\n\n    _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], function (event) {\n      var fullscreenElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.fullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.webkitFullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.mozFullScreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.msFullscreenElement;\n\n      if (fullscreenElement && fullscreenElement.contains(_this.tech_.el())) {\n        _this.masterPlaylistController_.fastQualityChange_();\n      } else {\n        // When leaving fullscreen, since the in page pixel dimensions should be smaller\n        // than full screen, see if there should be a rendition switch down to preserve\n        // bandwidth.\n        _this.masterPlaylistController_.checkABR_();\n      }\n    });\n\n    _this.on(_this.tech_, 'seeking', function () {\n      if (this.ignoreNextSeekingEvent_) {\n        this.ignoreNextSeekingEvent_ = false;\n        return;\n      }\n\n      this.setCurrentTime(this.tech_.currentTime());\n    });\n\n    _this.on(_this.tech_, 'error', function () {\n      // verify that the error was real and we are loaded\n      // enough to have mpc loaded.\n      if (this.tech_.error() && this.masterPlaylistController_) {\n        this.masterPlaylistController_.pauseLoading();\n      }\n    });\n\n    _this.on(_this.tech_, 'play', _this.play);\n\n    return _this;\n  }\n\n  var _proto = VhsHandler.prototype;\n\n  _proto.setOptions_ = function setOptions_() {\n    var _this2 = this; // defaults\n\n\n    this.options_.withCredentials = this.options_.withCredentials || false;\n    this.options_.handleManifestRedirects = this.options_.handleManifestRedirects === false ? false : true;\n    this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n    this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n    this.options_.smoothQualityChange = this.options_.smoothQualityChange || false;\n    this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n    this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n    this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n    this.options_.customTagParsers = this.options_.customTagParsers || [];\n    this.options_.customTagMappers = this.options_.customTagMappers || [];\n    this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n\n    if (typeof this.options_.blacklistDuration !== 'number') {\n      this.options_.blacklistDuration = 5 * 60;\n    }\n\n    if (typeof this.options_.bandwidth !== 'number') {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        var storedObject = getVhsLocalStorage();\n\n        if (storedObject && storedObject.bandwidth) {\n          this.options_.bandwidth = storedObject.bandwidth;\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-bandwidth-from-local-storage'\n          });\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'hls-bandwidth-from-local-storage'\n          });\n        }\n\n        if (storedObject && storedObject.throughput) {\n          this.options_.throughput = storedObject.throughput;\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-throughput-from-local-storage'\n          });\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'hls-throughput-from-local-storage'\n          });\n        }\n      }\n    } // if bandwidth was not set by options or pulled from local storage, start playlist\n    // selection at a reasonable bandwidth\n\n\n    if (typeof this.options_.bandwidth !== 'number') {\n      this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n    } // If the bandwidth number is unchanged from the initial setting\n    // then this takes precedence over the enableLowInitialPlaylist option\n\n\n    this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n    ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'smoothQualityChange', 'customTagParsers', 'customTagMappers', 'handleManifestRedirects', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'experimentalBufferBasedABR', 'liveRangeSafeTimeDelta', 'experimentalLLHLS', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'experimentalExactManifestTimings', 'experimentalLeastPixelDiffSelector'].forEach(function (option) {\n      if (typeof _this2.source_[option] !== 'undefined') {\n        _this2.options_[option] = _this2.source_[option];\n      }\n    });\n    this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n    this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n  }\n  /**\n   * called when player.src gets called, handle a new source\n   *\n   * @param {Object} src the source object to handle\n   */\n  ;\n\n  _proto.src = function src(_src, type) {\n    var _this3 = this; // do nothing if the src is falsey\n\n\n    if (!_src) {\n      return;\n    }\n\n    this.setOptions_(); // add master playlist controller options\n\n    this.options_.src = expandDataUri(this.source_.src);\n    this.options_.tech = this.tech_;\n    this.options_.externVhs = Vhs;\n    this.options_.sourceType = Object(_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_14__[\"simpleTypeFromSourceType\"])(type); // Whenever we seek internally, we should update the tech\n\n    this.options_.seekTo = function (time) {\n      _this3.tech_.setCurrentTime(time);\n    };\n\n    if (this.options_.smoothQualityChange) {\n      videojs.log.warn('smoothQualityChange is deprecated and will be removed in the next major version');\n    }\n\n    this.masterPlaylistController_ = new MasterPlaylistController(this.options_);\n    var playbackWatcherOptions = videojs.mergeOptions({\n      liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n    }, this.options_, {\n      seekable: function seekable() {\n        return _this3.seekable();\n      },\n      media: function media() {\n        return _this3.masterPlaylistController_.media();\n      },\n      masterPlaylistController: this.masterPlaylistController_\n    });\n    this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n    this.masterPlaylistController_.on('error', function () {\n      var player = videojs.players[_this3.tech_.options_.playerId];\n      var error = _this3.masterPlaylistController_.error;\n\n      if (typeof error === 'object' && !error.code) {\n        error.code = 3;\n      } else if (typeof error === 'string') {\n        error = {\n          message: error,\n          code: 3\n        };\n      }\n\n      player.error(error);\n    });\n    var defaultSelector = this.options_.experimentalBufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n    // compatibility with < v2\n\n    this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n    this.masterPlaylistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n    this.playlists = this.masterPlaylistController_.masterPlaylistLoader_;\n    this.mediaSource = this.masterPlaylistController_.mediaSource; // Proxy assignment of some properties to the master playlist\n    // controller. Using a custom property for backwards compatibility\n    // with < v2\n\n    Object.defineProperties(this, {\n      selectPlaylist: {\n        get: function get() {\n          return this.masterPlaylistController_.selectPlaylist;\n        },\n        set: function set(selectPlaylist) {\n          this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this);\n        }\n      },\n      throughput: {\n        get: function get() {\n          return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;\n        },\n        set: function set(throughput) {\n          this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n          // for the cumulative average\n\n          this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1;\n        }\n      },\n      bandwidth: {\n        get: function get() {\n          var playerBandwidthEst = this.masterPlaylistController_.mainSegmentLoader_.bandwidth;\n          var networkInformation = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.connection || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.mozConnection || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.webkitConnection;\n          var tenMbpsAsBitsPerSecond = 10e6;\n\n          if (this.options_.useNetworkInformationApi && networkInformation) {\n            // downlink returns Mbps\n            // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n            var networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n            // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n            // high quality streams are not filtered out.\n\n            if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n              playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n            } else {\n              playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n            }\n          }\n\n          return playerBandwidthEst;\n        },\n        set: function set(bandwidth) {\n          this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n          // `count` is set to zero that current value of `rate` isn't included\n          // in the cumulative average\n\n          this.masterPlaylistController_.mainSegmentLoader_.throughput = {\n            rate: 0,\n            count: 0\n          };\n        }\n      },\n\n      /**\n       * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n       * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n       * the entire process after that - decryption, transmuxing, and appending - provided\n       * by `throughput`.\n       *\n       * Since the two process are serial, the overall system bandwidth is given by:\n       *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n       */\n      systemBandwidth: {\n        get: function get() {\n          var invBandwidth = 1 / (this.bandwidth || 1);\n          var invThroughput;\n\n          if (this.throughput > 0) {\n            invThroughput = 1 / this.throughput;\n          } else {\n            invThroughput = 0;\n          }\n\n          var systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n          return systemBitrate;\n        },\n        set: function set() {\n          videojs.log.error('The \"systemBandwidth\" property is read-only');\n        }\n      }\n    });\n\n    if (this.options_.bandwidth) {\n      this.bandwidth = this.options_.bandwidth;\n    }\n\n    if (this.options_.throughput) {\n      this.throughput = this.options_.throughput;\n    }\n\n    Object.defineProperties(this.stats, {\n      bandwidth: {\n        get: function get() {\n          return _this3.bandwidth || 0;\n        },\n        enumerable: true\n      },\n      mediaRequests: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaRequests_() || 0;\n        },\n        enumerable: true\n      },\n      mediaRequestsAborted: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaRequestsAborted_() || 0;\n        },\n        enumerable: true\n      },\n      mediaRequestsTimedout: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaRequestsTimedout_() || 0;\n        },\n        enumerable: true\n      },\n      mediaRequestsErrored: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaRequestsErrored_() || 0;\n        },\n        enumerable: true\n      },\n      mediaTransferDuration: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaTransferDuration_() || 0;\n        },\n        enumerable: true\n      },\n      mediaBytesTransferred: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaBytesTransferred_() || 0;\n        },\n        enumerable: true\n      },\n      mediaSecondsLoaded: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaSecondsLoaded_() || 0;\n        },\n        enumerable: true\n      },\n      mediaAppends: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mediaAppends_() || 0;\n        },\n        enumerable: true\n      },\n      mainAppendsToLoadedData: {\n        get: function get() {\n          return _this3.masterPlaylistController_.mainAppendsToLoadedData_() || 0;\n        },\n        enumerable: true\n      },\n      audioAppendsToLoadedData: {\n        get: function get() {\n          return _this3.masterPlaylistController_.audioAppendsToLoadedData_() || 0;\n        },\n        enumerable: true\n      },\n      appendsToLoadedData: {\n        get: function get() {\n          return _this3.masterPlaylistController_.appendsToLoadedData_() || 0;\n        },\n        enumerable: true\n      },\n      timeToLoadedData: {\n        get: function get() {\n          return _this3.masterPlaylistController_.timeToLoadedData_() || 0;\n        },\n        enumerable: true\n      },\n      buffered: {\n        get: function get() {\n          return timeRangesToArray(_this3.tech_.buffered());\n        },\n        enumerable: true\n      },\n      currentTime: {\n        get: function get() {\n          return _this3.tech_.currentTime();\n        },\n        enumerable: true\n      },\n      currentSource: {\n        get: function get() {\n          return _this3.tech_.currentSource_;\n        },\n        enumerable: true\n      },\n      currentTech: {\n        get: function get() {\n          return _this3.tech_.name_;\n        },\n        enumerable: true\n      },\n      duration: {\n        get: function get() {\n          return _this3.tech_.duration();\n        },\n        enumerable: true\n      },\n      master: {\n        get: function get() {\n          return _this3.playlists.master;\n        },\n        enumerable: true\n      },\n      playerDimensions: {\n        get: function get() {\n          return _this3.tech_.currentDimensions();\n        },\n        enumerable: true\n      },\n      seekable: {\n        get: function get() {\n          return timeRangesToArray(_this3.tech_.seekable());\n        },\n        enumerable: true\n      },\n      timestamp: {\n        get: function get() {\n          return Date.now();\n        },\n        enumerable: true\n      },\n      videoPlaybackQuality: {\n        get: function get() {\n          return _this3.tech_.getVideoPlaybackQuality();\n        },\n        enumerable: true\n      }\n    });\n    this.tech_.one('canplay', this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));\n    this.tech_.on('bandwidthupdate', function () {\n      if (_this3.options_.useBandwidthFromLocalStorage) {\n        updateVhsLocalStorage({\n          bandwidth: _this3.bandwidth,\n          throughput: Math.round(_this3.throughput)\n        });\n      }\n    });\n    this.masterPlaylistController_.on('selectedinitialmedia', function () {\n      // Add the manual rendition mix-in to VhsHandler\n      renditionSelectionMixin(_this3);\n    });\n    this.masterPlaylistController_.sourceUpdater_.on('createdsourcebuffers', function () {\n      _this3.setupEme_();\n    }); // the bandwidth of the primary segment loader is our best\n    // estimate of overall bandwidth\n\n    this.on(this.masterPlaylistController_, 'progress', function () {\n      this.tech_.trigger('progress');\n    }); // In the live case, we need to ignore the very first `seeking` event since\n    // that will be the result of the seek-to-live behavior\n\n    this.on(this.masterPlaylistController_, 'firstplay', function () {\n      this.ignoreNextSeekingEvent_ = true;\n    });\n    this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n    // this can occur if someone sets the src in player.ready(), for instance\n\n    if (!this.tech_.el()) {\n      return;\n    }\n\n    this.mediaSourceUrl_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource);\n    this.tech_.src(this.mediaSourceUrl_);\n  };\n\n  _proto.createKeySessions_ = function createKeySessions_() {\n    var _this4 = this;\n\n    var audioPlaylistLoader = this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    this.logger_('waiting for EME key session creation');\n    waitForKeySessionCreation({\n      player: this.player_,\n      sourceKeySystems: this.source_.keySystems,\n      audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n      mainPlaylists: this.playlists.master.playlists\n    }).then(function () {\n      _this4.logger_('created EME key session');\n\n      _this4.masterPlaylistController_.sourceUpdater_.initializedEme();\n    })[\"catch\"](function (err) {\n      _this4.logger_('error while creating EME key session', err);\n\n      _this4.player_.error({\n        message: 'Failed to initialize media keys for EME',\n        code: 3\n      });\n    });\n  };\n\n  _proto.handleWaitingForKey_ = function handleWaitingForKey_() {\n    // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n    // the key is in the manifest. While this should've happened on initial source load, it\n    // may happen again in live streams where the keys change, and the manifest info\n    // reflects the update.\n    //\n    // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n    // already requested keys for, we don't have to worry about this generating extraneous\n    // requests.\n    this.logger_('waitingforkey fired, attempting to create any new key sessions');\n    this.createKeySessions_();\n  }\n  /**\n   * If necessary and EME is available, sets up EME options and waits for key session\n   * creation.\n   *\n   * This function also updates the source updater so taht it can be used, as for some\n   * browsers, EME must be configured before content is appended (if appending unencrypted\n   * content before encrypted content).\n   */\n  ;\n\n  _proto.setupEme_ = function setupEme_() {\n    var _this5 = this;\n\n    var audioPlaylistLoader = this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    var didSetupEmeOptions = setupEmeOptions({\n      player: this.player_,\n      sourceKeySystems: this.source_.keySystems,\n      media: this.playlists.media(),\n      audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n    });\n    this.player_.tech_.on('keystatuschange', function (e) {\n      if (e.status !== 'output-restricted') {\n        return;\n      }\n\n      var masterPlaylist = _this5.masterPlaylistController_.master();\n\n      if (!masterPlaylist || !masterPlaylist.playlists) {\n        return;\n      }\n\n      var excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection\n\n      masterPlaylist.playlists.forEach(function (playlist) {\n        if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) {\n          if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {\n            playlist.excludeUntil = Infinity;\n            excludedHDPlaylists.push(playlist);\n          }\n        }\n      });\n\n      if (excludedHDPlaylists.length) {\n        var _videojs$log;\n\n        (_videojs$log = videojs.log).warn.apply(_videojs$log, ['DRM keystatus changed to \"output-restricted.\" Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(excludedHDPlaylists)); // Clear the buffer before switching playlists, since it may already contain unplayable segments\n\n\n        _this5.masterPlaylistController_.fastQualityChange_();\n      }\n    });\n    this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n    this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_); // In IE11 this is too early to initialize media keys, and IE11 does not support\n    // promises.\n\n    if (videojs.browser.IE_VERSION === 11 || !didSetupEmeOptions) {\n      // If EME options were not set up, we've done all we could to initialize EME.\n      this.masterPlaylistController_.sourceUpdater_.initializedEme();\n      return;\n    }\n\n    this.createKeySessions_();\n  }\n  /**\n   * Initializes the quality levels and sets listeners to update them.\n   *\n   * @method setupQualityLevels_\n   * @private\n   */\n  ;\n\n  _proto.setupQualityLevels_ = function setupQualityLevels_() {\n    var _this6 = this;\n\n    var player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n    // or qualityLevels_ listeners have already been setup, do nothing.\n\n    if (!player || !player.qualityLevels || this.qualityLevels_) {\n      return;\n    }\n\n    this.qualityLevels_ = player.qualityLevels();\n    this.masterPlaylistController_.on('selectedinitialmedia', function () {\n      handleVhsLoadedMetadata(_this6.qualityLevels_, _this6);\n    });\n    this.playlists.on('mediachange', function () {\n      handleVhsMediaChange(_this6.qualityLevels_, _this6.playlists);\n    });\n  }\n  /**\n   * return the version\n   */\n  ;\n\n  VhsHandler.version = function version$5() {\n    return {\n      '@videojs/http-streaming': version$4,\n      'mux.js': version$3,\n      'mpd-parser': version$2,\n      'm3u8-parser': version$1,\n      'aes-decrypter': version\n    };\n  }\n  /**\n   * return the version\n   */\n  ;\n\n  _proto.version = function version() {\n    return this.constructor.version();\n  };\n\n  _proto.canChangeType = function canChangeType() {\n    return SourceUpdater.canChangeType();\n  }\n  /**\n   * Begin playing the video.\n   */\n  ;\n\n  _proto.play = function play() {\n    this.masterPlaylistController_.play();\n  }\n  /**\n   * a wrapper around the function in MasterPlaylistController\n   */\n  ;\n\n  _proto.setCurrentTime = function setCurrentTime(currentTime) {\n    this.masterPlaylistController_.setCurrentTime(currentTime);\n  }\n  /**\n   * a wrapper around the function in MasterPlaylistController\n   */\n  ;\n\n  _proto.duration = function duration() {\n    return this.masterPlaylistController_.duration();\n  }\n  /**\n   * a wrapper around the function in MasterPlaylistController\n   */\n  ;\n\n  _proto.seekable = function seekable() {\n    return this.masterPlaylistController_.seekable();\n  }\n  /**\n   * Abort all outstanding work and cleanup.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    if (this.playbackWatcher_) {\n      this.playbackWatcher_.dispose();\n    }\n\n    if (this.masterPlaylistController_) {\n      this.masterPlaylistController_.dispose();\n    }\n\n    if (this.qualityLevels_) {\n      this.qualityLevels_.dispose();\n    }\n\n    if (this.player_) {\n      delete this.player_.vhs;\n      delete this.player_.dash;\n      delete this.player_.hls;\n    }\n\n    if (this.tech_ && this.tech_.vhs) {\n      delete this.tech_.vhs;\n    } // don't check this.tech_.hls as it will log a deprecated warning\n\n\n    if (this.tech_) {\n      delete this.tech_.hls;\n    }\n\n    if (this.mediaSourceUrl_ && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.revokeObjectURL) {\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.revokeObjectURL(this.mediaSourceUrl_);\n      this.mediaSourceUrl_ = null;\n    }\n\n    if (this.tech_) {\n      this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n    }\n\n    _Component.prototype.dispose.call(this);\n  };\n\n  _proto.convertToProgramTime = function convertToProgramTime(time, callback) {\n    return getProgramTime({\n      playlist: this.masterPlaylistController_.media(),\n      time: time,\n      callback: callback\n    });\n  } // the player must be playing before calling this\n  ;\n\n  _proto.seekToProgramTime = function seekToProgramTime$1(programTime, callback, pauseAfterSeek, retryCount) {\n    if (pauseAfterSeek === void 0) {\n      pauseAfterSeek = true;\n    }\n\n    if (retryCount === void 0) {\n      retryCount = 2;\n    }\n\n    return seekToProgramTime({\n      programTime: programTime,\n      playlist: this.masterPlaylistController_.media(),\n      retryCount: retryCount,\n      pauseAfterSeek: pauseAfterSeek,\n      seekTo: this.options_.seekTo,\n      tech: this.options_.tech,\n      callback: callback\n    });\n  };\n\n  return VhsHandler;\n}(Component);\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\n\nvar VhsSourceHandler = {\n  name: 'videojs-http-streaming',\n  VERSION: version$4,\n  canHandleSource: function canHandleSource(srcObj, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    var localOptions = videojs.mergeOptions(videojs.options, options);\n    return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n  },\n  handleSource: function handleSource(source, tech, options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    var localOptions = videojs.mergeOptions(videojs.options, options);\n    tech.vhs = new VhsHandler(source, tech, localOptions);\n\n    if (!videojs.hasOwnProperty('hls')) {\n      Object.defineProperty(tech, 'hls', {\n        get: function get() {\n          videojs.log.warn('player.tech().hls is deprecated. Use player.tech().vhs instead.');\n          return tech.vhs;\n        },\n        configurable: true\n      });\n    }\n\n    tech.vhs.xhr = xhrFactory();\n    tech.vhs.src(source.src, source.type);\n    return tech.vhs;\n  },\n  canPlayType: function canPlayType(type, options) {\n    var simpleType = Object(_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_14__[\"simpleTypeFromSourceType\"])(type);\n\n    if (!simpleType) {\n      return '';\n    }\n\n    var overrideNative = VhsSourceHandler.getOverrideNative(options);\n    var supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n    var canUseMsePlayback = !supportsTypeNatively || overrideNative;\n    return canUseMsePlayback ? 'maybe' : '';\n  },\n  getOverrideNative: function getOverrideNative(options) {\n    if (options === void 0) {\n      options = {};\n    }\n\n    var _options = options,\n        _options$vhs = _options.vhs,\n        vhs = _options$vhs === void 0 ? {} : _options$vhs,\n        _options$hls = _options.hls,\n        hls = _options$hls === void 0 ? {} : _options$hls;\n    var defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n    var _vhs$overrideNative = vhs.overrideNative,\n        overrideNative = _vhs$overrideNative === void 0 ? defaultOverrideNative : _vhs$overrideNative;\n    var _hls$overrideNative = hls.overrideNative,\n        legacyOverrideNative = _hls$overrideNative === void 0 ? false : _hls$overrideNative;\n    return legacyOverrideNative || overrideNative;\n  }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if  native media sources are supported\n */\n\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\n  return Object(_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_13__[\"browserSupportsCodec\"])('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\n\nif (supportsNativeMediaSources()) {\n  videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\n\nvideojs.VhsHandler = VhsHandler;\nObject.defineProperty(videojs, 'HlsHandler', {\n  get: function get() {\n    videojs.log.warn('videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead.');\n    return VhsHandler;\n  },\n  configurable: true\n});\nvideojs.VhsSourceHandler = VhsSourceHandler;\nObject.defineProperty(videojs, 'HlsSourceHandler', {\n  get: function get() {\n    videojs.log.warn('videojs.HlsSourceHandler is deprecated. ' + 'Use videojs.VhsSourceHandler instead.');\n    return VhsSourceHandler;\n  },\n  configurable: true\n});\nvideojs.Vhs = Vhs;\nObject.defineProperty(videojs, 'Hls', {\n  get: function get() {\n    videojs.log.warn('videojs.Hls is deprecated. Use videojs.Vhs instead.');\n    return Vhs;\n  },\n  configurable: true\n});\n\nif (!videojs.use) {\n  videojs.registerComponent('Hls', Vhs);\n  videojs.registerComponent('Vhs', Vhs);\n}\n\nvideojs.options.vhs = videojs.options.vhs || {};\nvideojs.options.hls = videojs.options.hls || {};\n\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n  var registerPlugin = videojs.registerPlugin || videojs.plugin;\n  registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (videojs);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./node_modules/video.js/dist/video.es.js?");

/***/ }),

/***/ "./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js ***!
  \***********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"./node_modules/video.js/dist/video.es.js\");\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \"./node_modules/global/document.js\");\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\n/*! @name videojs-contrib-quality-levels @version 2.1.0 @license Apache-2.0 */\n\n\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\n/**\n * A single QualityLevel.\n *\n * interface QualityLevel {\n *   readonly attribute DOMString id;\n *            attribute DOMString label;\n *   readonly attribute long width;\n *   readonly attribute long height;\n *   readonly attribute long bitrate;\n *            attribute boolean enabled;\n * };\n *\n * @class QualityLevel\n */\n\nvar QualityLevel =\n/**\n * Creates a QualityLevel\n *\n * @param {Representation|Object} representation The representation of the quality level\n * @param {string}   representation.id        Unique id of the QualityLevel\n * @param {number=}  representation.width     Resolution width of the QualityLevel\n * @param {number=}  representation.height    Resolution height of the QualityLevel\n * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n */\nfunction QualityLevel(representation) {\n  var level = this; // eslint-disable-line\n\n  if (video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browser.IS_IE8) {\n    level = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\n\n    for (var prop in QualityLevel.prototype) {\n      if (prop !== 'constructor') {\n        level[prop] = QualityLevel.prototype[prop];\n      }\n    }\n  }\n\n  level.id = representation.id;\n  level.label = level.id;\n  level.width = representation.width;\n  level.height = representation.height;\n  level.bitrate = representation.bandwidth;\n  level.enabled_ = representation.enabled;\n  Object.defineProperty(level, 'enabled', {\n    /**\n     * Get whether the QualityLevel is enabled.\n     *\n     * @return {boolean} True if the QualityLevel is enabled.\n     */\n    get: function get() {\n      return level.enabled_();\n    },\n\n    /**\n     * Enable or disable the QualityLevel.\n     *\n     * @param {boolean} enable true to enable QualityLevel, false to disable.\n     */\n    set: function set(enable) {\n      level.enabled_(enable);\n    }\n  });\n  return level;\n};\n\n/**\n * A list of QualityLevels.\n *\n * interface QualityLevelList : EventTarget {\n *   getter QualityLevel (unsigned long index);\n *   readonly attribute unsigned long length;\n *   readonly attribute long selectedIndex;\n *\n *   void addQualityLevel(QualityLevel qualityLevel)\n *   void removeQualityLevel(QualityLevel remove)\n *   QualityLevel? getQualityLevelById(DOMString id);\n *\n *   attribute EventHandler onchange;\n *   attribute EventHandler onaddqualitylevel;\n *   attribute EventHandler onremovequalitylevel;\n * };\n *\n * @extends videojs.EventTarget\n * @class QualityLevelList\n */\n\nvar QualityLevelList =\n/*#__PURE__*/\nfunction (_videojs$EventTarget) {\n  _inheritsLoose(QualityLevelList, _videojs$EventTarget);\n\n  function QualityLevelList() {\n    var _this;\n\n    _this = _videojs$EventTarget.call(this) || this;\n\n    var list = _assertThisInitialized(_assertThisInitialized(_this)); // eslint-disable-line\n\n\n    if (video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].browser.IS_IE8) {\n      list = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\n\n      for (var prop in QualityLevelList.prototype) {\n        if (prop !== 'constructor') {\n          list[prop] = QualityLevelList.prototype[prop];\n        }\n      }\n    }\n\n    list.levels_ = [];\n    list.selectedIndex_ = -1;\n    /**\n     * Get the index of the currently selected QualityLevel.\n     *\n     * @returns {number} The index of the selected QualityLevel. -1 if none selected.\n     * @readonly\n     */\n\n    Object.defineProperty(list, 'selectedIndex', {\n      get: function get() {\n        return list.selectedIndex_;\n      }\n    });\n    /**\n     * Get the length of the list of QualityLevels.\n     *\n     * @returns {number} The length of the list.\n     * @readonly\n     */\n\n    Object.defineProperty(list, 'length', {\n      get: function get() {\n        return list.levels_.length;\n      }\n    });\n    return list || _assertThisInitialized(_this);\n  }\n  /**\n   * Adds a quality level to the list.\n   *\n   * @param {Representation|Object} representation The representation of the quality level\n   * @param {string}   representation.id        Unique id of the QualityLevel\n   * @param {number=}  representation.width     Resolution width of the QualityLevel\n   * @param {number=}  representation.height    Resolution height of the QualityLevel\n   * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n   * @return {QualityLevel} the QualityLevel added to the list\n   * @method addQualityLevel\n   */\n\n\n  var _proto = QualityLevelList.prototype;\n\n  _proto.addQualityLevel = function addQualityLevel(representation) {\n    var qualityLevel = this.getQualityLevelById(representation.id); // Do not add duplicate quality levels\n\n    if (qualityLevel) {\n      return qualityLevel;\n    }\n\n    var index = this.levels_.length;\n    qualityLevel = new QualityLevel(representation);\n\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get: function get() {\n          return this.levels_[index];\n        }\n      });\n    }\n\n    this.levels_.push(qualityLevel);\n    this.trigger({\n      qualityLevel: qualityLevel,\n      type: 'addqualitylevel'\n    });\n    return qualityLevel;\n  };\n  /**\n   * Removes a quality level from the list.\n   *\n   * @param {QualityLevel} remove QualityLevel to remove to the list.\n   * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\n   * @method removeQualityLevel\n   */\n\n\n  _proto.removeQualityLevel = function removeQualityLevel(qualityLevel) {\n    var removed = null;\n\n    for (var i = 0, l = this.length; i < l; i++) {\n      if (this[i] === qualityLevel) {\n        removed = this.levels_.splice(i, 1)[0];\n\n        if (this.selectedIndex_ === i) {\n          this.selectedIndex_ = -1;\n        } else if (this.selectedIndex_ > i) {\n          this.selectedIndex_--;\n        }\n\n        break;\n      }\n    }\n\n    if (removed) {\n      this.trigger({\n        qualityLevel: qualityLevel,\n        type: 'removequalitylevel'\n      });\n    }\n\n    return removed;\n  };\n  /**\n   * Searches for a QualityLevel with the given id.\n   *\n   * @param {string} id The id of the QualityLevel to find.\n   * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\n   * @method getQualityLevelById\n   */\n\n\n  _proto.getQualityLevelById = function getQualityLevelById(id) {\n    for (var i = 0, l = this.length; i < l; i++) {\n      var level = this[i];\n\n      if (level.id === id) {\n        return level;\n      }\n    }\n\n    return null;\n  };\n  /**\n   * Resets the list of QualityLevels to empty\n   *\n   * @method dispose\n   */\n\n\n  _proto.dispose = function dispose() {\n    this.selectedIndex_ = -1;\n    this.levels_.length = 0;\n  };\n\n  return QualityLevelList;\n}(video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].EventTarget);\n/**\n * change - The selected QualityLevel has changed.\n * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\n * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\n */\n\n\nQualityLevelList.prototype.allowedEvents_ = {\n  change: 'change',\n  addqualitylevel: 'addqualitylevel',\n  removequalitylevel: 'removequalitylevel'\n}; // emulate attribute EventHandler support to allow for feature detection\n\nfor (var event in QualityLevelList.prototype.allowedEvents_) {\n  QualityLevelList.prototype['on' + event] = null;\n}\n\nvar version = \"2.1.0\";\n\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].plugin;\n/**\n * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\n * event handlers.\n *\n * @param {Player} player Player object.\n * @param {Object} options Plugin options object.\n * @function initPlugin\n */\n\nvar initPlugin = function initPlugin(player, options) {\n  var originalPluginFn = player.qualityLevels;\n  var qualityLevelList = new QualityLevelList();\n\n  var disposeHandler = function disposeHandler() {\n    qualityLevelList.dispose();\n    player.qualityLevels = originalPluginFn;\n    player.off('dispose', disposeHandler);\n  };\n\n  player.on('dispose', disposeHandler);\n\n  player.qualityLevels = function () {\n    return qualityLevelList;\n  };\n\n  player.qualityLevels.VERSION = version;\n  return qualityLevelList;\n};\n/**\n * A video.js plugin.\n *\n * In the plugin function, the value of `this` is a video.js `Player`\n * instance. You cannot rely on the player being in a \"ready\" state here,\n * depending on how the plugin is invoked. This may or may not be important\n * to you; if not, remove the wait for \"ready\"!\n *\n * @param {Object} options Plugin options object\n * @function qualityLevels\n */\n\n\nvar qualityLevels = function qualityLevels(options) {\n  return initPlugin(this, video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mergeOptions({}, options));\n}; // Register the plugin with video.js.\n\n\nregisterPlugin('qualityLevels', qualityLevels); // Include the version number.\n\nqualityLevels.VERSION = version;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (qualityLevels);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js?");

/***/ }),

/***/ "./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js ***!
  \*******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"./node_modules/video.js/dist/video.es.js\");\n\n\nvar version = \"1.1.4\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\nvar asyncGenerator = function () {\n  function AwaitValue(value) {\n    this.value = value;\n  }\n\n  function AsyncGenerator(gen) {\n    var front, back;\n\n    function send(key, arg) {\n      return new Promise(function (resolve, reject) {\n        var request = {\n          key: key,\n          arg: arg,\n          resolve: resolve,\n          reject: reject,\n          next: null\n        };\n\n        if (back) {\n          back = back.next = request;\n        } else {\n          front = back = request;\n          resume(key, arg);\n        }\n      });\n    }\n\n    function resume(key, arg) {\n      try {\n        var result = gen[key](arg);\n        var value = result.value;\n\n        if (value instanceof AwaitValue) {\n          Promise.resolve(value.value).then(function (arg) {\n            resume(\"next\", arg);\n          }, function (arg) {\n            resume(\"throw\", arg);\n          });\n        } else {\n          settle(result.done ? \"return\" : \"normal\", result.value);\n        }\n      } catch (err) {\n        settle(\"throw\", err);\n      }\n    }\n\n    function settle(type, value) {\n      switch (type) {\n        case \"return\":\n          front.resolve({\n            value: value,\n            done: true\n          });\n          break;\n\n        case \"throw\":\n          front.reject(value);\n          break;\n\n        default:\n          front.resolve({\n            value: value,\n            done: false\n          });\n          break;\n      }\n\n      front = front.next;\n\n      if (front) {\n        resume(front.key, front.arg);\n      } else {\n        back = null;\n      }\n    }\n\n    this._invoke = send;\n\n    if (typeof gen.return !== \"function\") {\n      this.return = undefined;\n    }\n  }\n\n  if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n    AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n      return this;\n    };\n  }\n\n  AsyncGenerator.prototype.next = function (arg) {\n    return this._invoke(\"next\", arg);\n  };\n\n  AsyncGenerator.prototype.throw = function (arg) {\n    return this._invoke(\"throw\", arg);\n  };\n\n  AsyncGenerator.prototype.return = function (arg) {\n    return this._invoke(\"return\", arg);\n  };\n\n  return {\n    wrap: function (fn) {\n      return function () {\n        return new AsyncGenerator(fn.apply(this, arguments));\n      };\n    },\n    await: function (value) {\n      return new AwaitValue(value);\n    }\n  };\n}();\n\n\n\n\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\n\n\n\n\n\n\n\n\n\n\nvar inherits = function (subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar possibleConstructorReturn = function (self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar VideoJsButtonClass = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getComponent('MenuButton');\nvar VideoJsMenuClass = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getComponent('Menu');\nvar VideoJsComponent = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getComponent('Component');\nvar Dom = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].dom;\n\n/**\n * Convert string to title case.\n *\n * @param {string} string - the string to convert\n * @return {string} the returned titlecase string\n */\nfunction toTitleCase(string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n\n  return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\n/**\n * Extend vjs button class for quality button.\n */\n\nvar ConcreteButton = function (_VideoJsButtonClass) {\n  inherits(ConcreteButton, _VideoJsButtonClass);\n\n  /**\n   * Button constructor.\n   *\n   * @param {Player} player - videojs player instance\n   */\n  function ConcreteButton(player) {\n    classCallCheck(this, ConcreteButton);\n    return possibleConstructorReturn(this, _VideoJsButtonClass.call(this, player, {\n      title: player.localize('Quality'),\n      name: 'QualityButton'\n    }));\n  }\n\n  /**\n   * Creates button items.\n   *\n   * @return {Array} - Button items\n   */\n\n\n  ConcreteButton.prototype.createItems = function createItems() {\n    return [];\n  };\n\n  /**\n   * Create the menu and add all items to it.\n   *\n   * @return {Menu}\n   *         The constructed menu\n   */\n\n\n  ConcreteButton.prototype.createMenu = function createMenu() {\n    var menu = new VideoJsMenuClass(this.player_, { menuButton: this });\n\n    this.hideThreshold_ = 0;\n\n    // Add a title list item to the top\n    if (this.options_.title) {\n      var titleEl = Dom.createEl('li', {\n        className: 'vjs-menu-title',\n        innerHTML: toTitleCase(this.options_.title),\n        tabIndex: -1\n      });\n      var titleComponent = new VideoJsComponent(this.player_, { el: titleEl });\n\n      this.hideThreshold_ += 1;\n\n      menu.addItem(titleComponent);\n    }\n\n    this.items = this.createItems();\n\n    if (this.items) {\n      // Add menu items to the menu\n      for (var i = 0; i < this.items.length; i++) {\n        menu.addItem(this.items[i]);\n      }\n    }\n\n    return menu;\n  };\n\n  return ConcreteButton;\n}(VideoJsButtonClass);\n\n// Concrete classes\nvar VideoJsMenuItemClass = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getComponent('MenuItem');\n\n/**\n * Extend vjs menu item class.\n */\n\nvar ConcreteMenuItem = function (_VideoJsMenuItemClass) {\n  inherits(ConcreteMenuItem, _VideoJsMenuItemClass);\n\n  /**\n   * Menu item constructor.\n   *\n   * @param {Player} player - vjs player\n   * @param {Object} item - Item object\n   * @param {ConcreteButton} qualityButton - The containing button.\n   * @param {HlsQualitySelectorPlugin} plugin - This plugin instance.\n   */\n  function ConcreteMenuItem(player, item, qualityButton, plugin) {\n    classCallCheck(this, ConcreteMenuItem);\n\n    var _this = possibleConstructorReturn(this, _VideoJsMenuItemClass.call(this, player, {\n      label: item.label,\n      selectable: true,\n      selected: item.selected || false\n    }));\n\n    _this.item = item;\n    _this.qualityButton = qualityButton;\n    _this.plugin = plugin;\n    return _this;\n  }\n\n  /**\n   * Click event for menu item.\n   */\n\n\n  ConcreteMenuItem.prototype.handleClick = function handleClick() {\n\n    // Reset other menu items selected status.\n    for (var i = 0; i < this.qualityButton.items.length; ++i) {\n      this.qualityButton.items[i].selected(false);\n    }\n\n    // Set this menu item to selected, and set quality.\n    this.plugin.setQuality(this.item.value);\n    this.selected(true);\n  };\n\n  return ConcreteMenuItem;\n}(VideoJsMenuItemClass);\n\n// Default options for the plugin.\nvar defaults = {};\n\n// Cross-compatibility for Video.js 5 and 6.\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].plugin;\n// const dom = videojs.dom || videojs;\n\n/**\n * VideoJS HLS Quality Selector Plugin class.\n */\n\nvar HlsQualitySelectorPlugin = function () {\n\n  /**\n   * Plugin Constructor.\n   *\n   * @param {Player} player - The videojs player instance.\n   * @param {Object} options - The plugin options.\n   */\n  function HlsQualitySelectorPlugin(player, options) {\n    classCallCheck(this, HlsQualitySelectorPlugin);\n\n    this.player = player;\n    this.config = options;\n\n    // If there is quality levels plugin and the HLS tech exists\n    // then continue.\n    if (this.player.qualityLevels && this.getHls()) {\n      // Create the quality button.\n      this.createQualityButton();\n      this.bindPlayerEvents();\n    }\n  }\n\n  /**\n   * Returns HLS Plugin\n   *\n   * @return {*} - videojs-hls-contrib plugin.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.getHls = function getHls() {\n    return this.player.tech({ IWillNotUseThisInPlugins: true }).hls;\n  };\n\n  /**\n   * Binds listener for quality level changes.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.bindPlayerEvents = function bindPlayerEvents() {\n    this.player.qualityLevels().on('addqualitylevel', this.onAddQualityLevel.bind(this));\n  };\n\n  /**\n   * Adds the quality menu button to the player control bar.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.createQualityButton = function createQualityButton() {\n\n    var player = this.player;\n\n    this._qualityButton = new ConcreteButton(player);\n\n    var placementIndex = player.controlBar.children().length - 2;\n    var concreteButtonInstance = player.controlBar.addChild(this._qualityButton, { componentClass: 'qualitySelector' }, this.config.placementIndex || placementIndex);\n\n    concreteButtonInstance.addClass('vjs-quality-selector');\n    if (!this.config.displayCurrentQuality) {\n      var icon = ' ' + (this.config.vjsIconClass || 'vjs-icon-hd');\n\n      concreteButtonInstance.menuButton_.$('.vjs-icon-placeholder').className += icon;\n    } else {\n      this.setButtonInnerText('auto');\n    }\n    concreteButtonInstance.removeClass('vjs-hidden');\n  };\n\n  /**\n   *Set inner button text.\n   *\n   * @param {string} text - the text to display in the button.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.setButtonInnerText = function setButtonInnerText(text) {\n    this._qualityButton.menuButton_.$('.vjs-icon-placeholder').innerHTML = text;\n  };\n\n  /**\n   * Builds individual quality menu items.\n   *\n   * @param {Object} item - Individual quality menu item.\n   * @return {ConcreteMenuItem} - Menu item\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.getQualityMenuItem = function getQualityMenuItem(item) {\n    var player = this.player;\n\n    return new ConcreteMenuItem(player, item, this._qualityButton, this);\n  };\n\n  /**\n   * Executed when a quality level is added from HLS playlist.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.onAddQualityLevel = function onAddQualityLevel() {\n    var _this = this;\n\n    var player = this.player;\n    var qualityList = player.qualityLevels();\n    var levels = qualityList.levels_ || [];\n    var levelItems = [];\n\n    var _loop = function _loop(i) {\n      if (!levelItems.filter(function (_existingItem) {\n        return _existingItem.item && _existingItem.item.value === levels[i].height;\n      }).length) {\n        var levelItem = _this.getQualityMenuItem.call(_this, {\n          label: levels[i].height + 'p',\n          value: levels[i].height\n        });\n\n        levelItems.push(levelItem);\n      }\n    };\n\n    for (var i = 0; i < levels.length; ++i) {\n      _loop(i);\n    }\n\n    levelItems.sort(function (current, next) {\n      if ((typeof current === 'undefined' ? 'undefined' : _typeof(current)) !== 'object' || (typeof next === 'undefined' ? 'undefined' : _typeof(next)) !== 'object') {\n        return -1;\n      }\n      if (current.item.value < next.item.value) {\n        return -1;\n      }\n      if (current.item.value > next.item.value) {\n        return 1;\n      }\n      return 0;\n    });\n\n    levelItems.push(this.getQualityMenuItem.call(this, {\n      label: player.localize('Auto'),\n      value: 'auto',\n      selected: true\n    }));\n\n    if (this._qualityButton) {\n      this._qualityButton.createItems = function () {\n        return levelItems;\n      };\n      this._qualityButton.update();\n    }\n  };\n\n  /**\n   * Sets quality (based on media height)\n   *\n   * @param {number} height - A number representing HLS playlist.\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.setQuality = function setQuality(height) {\n    var qualityList = this.player.qualityLevels();\n\n    // Set quality on plugin\n    this._currentQuality = height;\n\n    if (this.config.displayCurrentQuality) {\n      this.setButtonInnerText(height === 'auto' ? height : height + 'p');\n    }\n\n    for (var i = 0; i < qualityList.length; ++i) {\n      var quality = qualityList[i];\n\n      quality.enabled = quality.height === height || height === 'auto';\n    }\n    this._qualityButton.unpressButton();\n  };\n\n  /**\n   * Return the current set quality or 'auto'\n   *\n   * @return {string} the currently set quality\n   */\n\n\n  HlsQualitySelectorPlugin.prototype.getCurrentQuality = function getCurrentQuality() {\n    return this._currentQuality || 'auto';\n  };\n\n  return HlsQualitySelectorPlugin;\n}();\n\n/**\n * Function to invoke when the player is ready.\n *\n * This is a great place for your plugin to initialize itself. When this\n * function is called, the player will have its DOM and child components\n * in place.\n *\n * @function onPlayerReady\n * @param    {Player} player\n *           A Video.js player object.\n *\n * @param    {Object} [options={}]\n *           A plain object containing options for the plugin.\n */\n\n\nvar onPlayerReady = function onPlayerReady(player, options) {\n  player.addClass('vjs-hls-quality-selector');\n  player.hlsQualitySelector = new HlsQualitySelectorPlugin(player, options);\n};\n\n/**\n * A video.js plugin.\n *\n * In the plugin function, the value of `this` is a video.js `Player`\n * instance. You cannot rely on the player being in a \"ready\" state here,\n * depending on how the plugin is invoked. This may or may not be important\n * to you; if not, remove the wait for \"ready\"!\n *\n * @function hlsQualitySelector\n * @param    {Object} [options={}]\n *           An object of options left to the plugin author to define.\n */\nvar hlsQualitySelector = function hlsQualitySelector(options) {\n  var _this2 = this;\n\n  this.ready(function () {\n    onPlayerReady(_this2, video_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mergeOptions(defaults, options));\n  });\n};\n\n// Register the plugin with video.js.\nregisterPlugin('hlsQualitySelector', hlsQualitySelector);\n\n// Include the version number.\nhlsQualitySelector.VERSION = version;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hlsQualitySelector);\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js?");

/***/ }),

/***/ "./node_modules/videojs-vtt.js/lib/browser-index.js":
/*!**********************************************************!*\
  !*** ./node_modules/videojs-vtt.js/lib/browser-index.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = __webpack_require__(/*! global/window */ \"./node_modules/global/window.js\");\n\nvar vttjs = module.exports = {\n  WebVTT: __webpack_require__(/*! ./vtt.js */ \"./node_modules/videojs-vtt.js/lib/vtt.js\"),\n  VTTCue: __webpack_require__(/*! ./vttcue.js */ \"./node_modules/videojs-vtt.js/lib/vttcue.js\"),\n  VTTRegion: __webpack_require__(/*! ./vttregion.js */ \"./node_modules/videojs-vtt.js/lib/vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n  window.VTTCue = cueShim;\n  window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n  window.VTTCue = nativeVTTCue;\n  window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n  vttjs.shim();\n}\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-vtt.js/lib/browser-index.js?");

/***/ }),

/***/ "./node_modules/videojs-vtt.js/lib/vtt.js":
/*!************************************************!*\
  !*** ./node_modules/videojs-vtt.js/lib/vtt.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = __webpack_require__(/*! global/document */ \"./node_modules/global/document.js\");\n\nvar _objCreate = Object.create || (function() {\n  function F() {}\n  return function(o) {\n    if (arguments.length !== 1) {\n      throw new Error('Object.create shim only accepts one parameter.');\n    }\n    F.prototype = o;\n    return new F();\n  };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n  this.name = \"ParsingError\";\n  this.code = errorData.code;\n  this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n  BadSignature: {\n    code: 0,\n    message: \"Malformed WebVTT signature.\"\n  },\n  BadTimeStamp: {\n    code: 1,\n    message: \"Malformed time stamp.\"\n  }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n  function computeSeconds(h, m, s, f) {\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n  }\n\n  var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n  if (!m) {\n    return null;\n  }\n\n  if (m[3]) {\n    // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n    return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n  } else if (m[1] > 59) {\n    // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n    // First position is hours as it's over 59.\n    return computeSeconds(m[1], m[2], 0,  m[4]);\n  } else {\n    // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n    return computeSeconds(0, m[1], m[2], m[4]);\n  }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n  this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n  // Only accept the first assignment to any key.\n  set: function(k, v) {\n    if (!this.get(k) && v !== \"\") {\n      this.values[k] = v;\n    }\n  },\n  // Return the value for a key, or a default value.\n  // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n  // a number of possible default values as properties where 'defaultKey' is\n  // the key of the property that will be chosen; otherwise it's assumed to be\n  // a single value.\n  get: function(k, dflt, defaultKey) {\n    if (defaultKey) {\n      return this.has(k) ? this.values[k] : dflt[defaultKey];\n    }\n    return this.has(k) ? this.values[k] : dflt;\n  },\n  // Check whether we have a value for a key.\n  has: function(k) {\n    return k in this.values;\n  },\n  // Accept a setting if its one of the given alternatives.\n  alt: function(k, v, a) {\n    for (var n = 0; n < a.length; ++n) {\n      if (v === a[n]) {\n        this.set(k, v);\n        break;\n      }\n    }\n  },\n  // Accept a setting if its a valid (signed) integer.\n  integer: function(k, v) {\n    if (/^-?\\d+$/.test(v)) { // integer\n      this.set(k, parseInt(v, 10));\n    }\n  },\n  // Accept a setting if its a valid percentage.\n  percent: function(k, v) {\n    var m;\n    if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n      v = parseFloat(v);\n      if (v >= 0 && v <= 100) {\n        this.set(k, v);\n        return true;\n      }\n    }\n    return false;\n  }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n  var groups = groupDelim ? input.split(groupDelim) : [input];\n  for (var i in groups) {\n    if (typeof groups[i] !== \"string\") {\n      continue;\n    }\n    var kv = groups[i].split(keyValueDelim);\n    if (kv.length !== 2) {\n      continue;\n    }\n    var k = kv[0].trim();\n    var v = kv[1].trim();\n    callback(k, v);\n  }\n}\n\nfunction parseCue(input, cue, regionList) {\n  // Remember the original input if we need to throw an error.\n  var oInput = input;\n  // 4.1 WebVTT timestamp\n  function consumeTimeStamp() {\n    var ts = parseTimeStamp(input);\n    if (ts === null) {\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                            \"Malformed timestamp: \" + oInput);\n    }\n    // Remove time stamp from input.\n    input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n    return ts;\n  }\n\n  // 4.4.2 WebVTT cue settings\n  function consumeCueSettings(input, cue) {\n    var settings = new Settings();\n\n    parseOptions(input, function (k, v) {\n      switch (k) {\n      case \"region\":\n        // Find the last region we parsed with the same region id.\n        for (var i = regionList.length - 1; i >= 0; i--) {\n          if (regionList[i].id === v) {\n            settings.set(k, regionList[i].region);\n            break;\n          }\n        }\n        break;\n      case \"vertical\":\n        settings.alt(k, v, [\"rl\", \"lr\"]);\n        break;\n      case \"line\":\n        var vals = v.split(\",\"),\n            vals0 = vals[0];\n        settings.integer(k, vals0);\n        settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n        settings.alt(k, vals0, [\"auto\"]);\n        if (vals.length === 2) {\n          settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"position\":\n        vals = v.split(\",\");\n        settings.percent(k, vals[0]);\n        if (vals.length === 2) {\n          settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"size\":\n        settings.percent(k, v);\n        break;\n      case \"align\":\n        settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n        break;\n      }\n    }, /:/, /\\s/);\n\n    // Apply default values for any missing fields.\n    cue.region = settings.get(\"region\", null);\n    cue.vertical = settings.get(\"vertical\", \"\");\n    try {\n      cue.line = settings.get(\"line\", \"auto\");\n    } catch (e) {}\n    cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n    cue.snapToLines = settings.get(\"snapToLines\", true);\n    cue.size = settings.get(\"size\", 100);\n    // Safari still uses the old middle value and won't accept center\n    try {\n      cue.align = settings.get(\"align\", \"center\");\n    } catch (e) {\n      cue.align = settings.get(\"align\", \"middle\");\n    }\n    try {\n      cue.position = settings.get(\"position\", \"auto\");\n    } catch (e) {\n      cue.position = settings.get(\"position\", {\n        start: 0,\n        left: 0,\n        center: 50,\n        middle: 50,\n        end: 100,\n        right: 100\n      }, cue.align);\n    }\n\n\n    cue.positionAlign = settings.get(\"positionAlign\", {\n      start: \"start\",\n      left: \"start\",\n      center: \"center\",\n      middle: \"center\",\n      end: \"end\",\n      right: \"end\"\n    }, cue.align);\n  }\n\n  function skipWhitespace() {\n    input = input.replace(/^\\s+/, \"\");\n  }\n\n  // 4.1 WebVTT cue timings.\n  skipWhitespace();\n  cue.startTime = consumeTimeStamp();   // (1) collect cue start time\n  skipWhitespace();\n  if (input.substr(0, 3) !== \"-->\") {     // (3) next characters must match \"-->\"\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                           \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n                           oInput);\n  }\n  input = input.substr(3);\n  skipWhitespace();\n  cue.endTime = consumeTimeStamp();     // (5) collect cue end time\n\n  // 4.1 WebVTT cue settings list.\n  skipWhitespace();\n  consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n  c: \"span\",\n  i: \"i\",\n  b: \"b\",\n  u: \"u\",\n  ruby: \"ruby\",\n  rt: \"rt\",\n  v: \"span\",\n  lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n  white: 'rgba(255,255,255,1)',\n  lime: 'rgba(0,255,0,1)',\n  cyan: 'rgba(0,255,255,1)',\n  red: 'rgba(255,0,0,1)',\n  yellow: 'rgba(255,255,0,1)',\n  magenta: 'rgba(255,0,255,1)',\n  blue: 'rgba(0,0,255,1)',\n  black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n  v: \"title\",\n  lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n  rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n  function nextToken() {\n    // Check for end-of-string.\n    if (!input) {\n      return null;\n    }\n\n    // Consume 'n' characters from the input.\n    function consume(result) {\n      input = input.substr(result.length);\n      return result;\n    }\n\n    var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n    // If there is some text before the next tag, return it, otherwise return\n    // the tag.\n    return consume(m[1] ? m[1] : m[2]);\n  }\n\n  function unescape(s) {\n    TEXTAREA_ELEMENT.innerHTML = s;\n    s = TEXTAREA_ELEMENT.textContent;\n    TEXTAREA_ELEMENT.textContent = \"\";\n    return s;\n  }\n\n  function shouldAdd(current, element) {\n    return !NEEDS_PARENT[element.localName] ||\n           NEEDS_PARENT[element.localName] === current.localName;\n  }\n\n  // Create an element for this tag.\n  function createElement(type, annotation) {\n    var tagName = TAG_NAME[type];\n    if (!tagName) {\n      return null;\n    }\n    var element = window.document.createElement(tagName);\n    var name = TAG_ANNOTATION[type];\n    if (name && annotation) {\n      element[name] = annotation.trim();\n    }\n    return element;\n  }\n\n  var rootDiv = window.document.createElement(\"div\"),\n      current = rootDiv,\n      t,\n      tagStack = [];\n\n  while ((t = nextToken()) !== null) {\n    if (t[0] === '<') {\n      if (t[1] === \"/\") {\n        // If the closing tag matches, move back up to the parent node.\n        if (tagStack.length &&\n            tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n          tagStack.pop();\n          current = current.parentNode;\n        }\n        // Otherwise just ignore the end tag.\n        continue;\n      }\n      var ts = parseTimeStamp(t.substr(1, t.length - 2));\n      var node;\n      if (ts) {\n        // Timestamps are lead nodes as well.\n        node = window.document.createProcessingInstruction(\"timestamp\", ts);\n        current.appendChild(node);\n        continue;\n      }\n      var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n      // If we can't parse the tag, skip to the next tag.\n      if (!m) {\n        continue;\n      }\n      // Try to construct an element, and ignore the tag if we couldn't.\n      node = createElement(m[1], m[3]);\n      if (!node) {\n        continue;\n      }\n      // Determine if the tag should be added based on the context of where it\n      // is placed in the cuetext.\n      if (!shouldAdd(current, node)) {\n        continue;\n      }\n      // Set the class list (as a list of classes, separated by space).\n      if (m[2]) {\n        var classes = m[2].split('.');\n\n        classes.forEach(function(cl) {\n          var bgColor = /^bg_/.test(cl);\n          // slice out `bg_` if it's a background color\n          var colorName = bgColor ? cl.slice(3) : cl;\n\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n            var propName = bgColor ? 'background-color' : 'color';\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n            node.style[propName] = propValue;\n          }\n        });\n\n        node.className = classes.join(' ');\n      }\n      // Append the node to the current node, and enter the scope of the new\n      // node.\n      tagStack.push(m[1]);\n      current.appendChild(node);\n      current = node;\n      continue;\n    }\n\n    // Text nodes are leaf nodes.\n    current.appendChild(window.document.createTextNode(unescape(t)));\n  }\n\n  return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n  for (var i = 0; i < strongRTLRanges.length; i++) {\n    var currentRange = strongRTLRanges[i];\n    if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction determineBidi(cueDiv) {\n  var nodeStack = [],\n      text = \"\",\n      charCode;\n\n  if (!cueDiv || !cueDiv.childNodes) {\n    return \"ltr\";\n  }\n\n  function pushNodes(nodeStack, node) {\n    for (var i = node.childNodes.length - 1; i >= 0; i--) {\n      nodeStack.push(node.childNodes[i]);\n    }\n  }\n\n  function nextTextNode(nodeStack) {\n    if (!nodeStack || !nodeStack.length) {\n      return null;\n    }\n\n    var node = nodeStack.pop(),\n        text = node.textContent || node.innerText;\n    if (text) {\n      // TODO: This should match all unicode type B characters (paragraph\n      // separator characters). See issue #115.\n      var m = text.match(/^.*(\\n|\\r)/);\n      if (m) {\n        nodeStack.length = 0;\n        return m[0];\n      }\n      return text;\n    }\n    if (node.tagName === \"ruby\") {\n      return nextTextNode(nodeStack);\n    }\n    if (node.childNodes) {\n      pushNodes(nodeStack, node);\n      return nextTextNode(nodeStack);\n    }\n  }\n\n  pushNodes(nodeStack, cueDiv);\n  while ((text = nextTextNode(nodeStack))) {\n    for (var i = 0; i < text.length; i++) {\n      charCode = text.charCodeAt(i);\n      if (isStrongRTLChar(charCode)) {\n        return \"rtl\";\n      }\n    }\n  }\n  return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n  if (typeof cue.line === \"number\" &&\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n    return cue.line;\n  }\n  if (!cue.track || !cue.track.textTrackList ||\n      !cue.track.textTrackList.mediaElement) {\n    return -1;\n  }\n  var track = cue.track,\n      trackList = track.textTrackList,\n      count = 0;\n  for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n    if (trackList[i].mode === \"showing\") {\n      count++;\n    }\n  }\n  return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n  div = div || this.div;\n  for (var prop in styles) {\n    if (styles.hasOwnProperty(prop)) {\n      div.style[prop] = styles[prop];\n    }\n  }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n  return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n  StyleBox.call(this);\n  this.cue = cue;\n\n  // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n  // have inline positioning and will function as the cue background box.\n  this.cueDiv = parseContent(window, cue.text);\n  var styles = {\n    color: \"rgba(255, 255, 255, 1)\",\n    backgroundColor:  \"rgba(0, 0, 0, 0.8)\",\n    position: \"relative\",\n    left: 0,\n    right: 0,\n    top: 0,\n    bottom: 0,\n    display: \"inline\",\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\"\n  };\n\n  this.applyStyles(styles, this.cueDiv);\n\n  // Create an absolutely positioned div that will be used to position the cue\n  // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n  // mirrors of them except middle instead of center on Safari.\n  this.div = window.document.createElement(\"div\");\n  styles = {\n    direction: determineBidi(this.cueDiv),\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\",\n    textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n    font: styleOptions.font,\n    whiteSpace: \"pre-line\",\n    position: \"absolute\"\n  };\n\n  this.applyStyles(styles);\n  this.div.appendChild(this.cueDiv);\n\n  // Calculate the distance from the reference edge of the viewport to the text\n  // position of the cue box. The reference edge will be resolved later when\n  // the box orientation styles are applied.\n  var textPos = 0;\n  switch (cue.positionAlign) {\n  case \"start\":\n  case \"line-left\":\n    textPos = cue.position;\n    break;\n  case \"center\":\n    textPos = cue.position - (cue.size / 2);\n    break;\n  case \"end\":\n  case \"line-right\":\n    textPos = cue.position - cue.size;\n    break;\n  }\n\n  // Horizontal box orientation; textPos is the distance from the left edge of the\n  // area to the left edge of the box and cue.size is the distance extending to\n  // the right from there.\n  if (cue.vertical === \"\") {\n    this.applyStyles({\n      left:  this.formatStyle(textPos, \"%\"),\n      width: this.formatStyle(cue.size, \"%\")\n    });\n  // Vertical box orientation; textPos is the distance from the top edge of the\n  // area to the top edge of the box and cue.size is the height extending\n  // downwards from there.\n  } else {\n    this.applyStyles({\n      top: this.formatStyle(textPos, \"%\"),\n      height: this.formatStyle(cue.size, \"%\")\n    });\n  }\n\n  this.move = function(box) {\n    this.applyStyles({\n      top: this.formatStyle(box.top, \"px\"),\n      bottom: this.formatStyle(box.bottom, \"px\"),\n      left: this.formatStyle(box.left, \"px\"),\n      right: this.formatStyle(box.right, \"px\"),\n      height: this.formatStyle(box.height, \"px\"),\n      width: this.formatStyle(box.width, \"px\")\n    });\n  };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n  // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n  // was passed in and we need to copy the results of 'getBoundingClientRect'\n  // as the object returned is readonly. All co-ordinate values are in reference\n  // to the viewport origin (top left).\n  var lh, height, width, top;\n  if (obj.div) {\n    height = obj.div.offsetHeight;\n    width = obj.div.offsetWidth;\n    top = obj.div.offsetTop;\n\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n                rects.getClientRects && rects.getClientRects();\n    obj = obj.div.getBoundingClientRect();\n    // In certain cases the outter div will be slightly larger then the sum of\n    // the inner div's lines. This could be due to bold text, etc, on some platforms.\n    // In this case we should get the average line height and use that. This will\n    // result in the desired behaviour.\n    lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n               : 0;\n\n  }\n  this.left = obj.left;\n  this.right = obj.right;\n  this.top = obj.top || top;\n  this.height = obj.height || height;\n  this.bottom = obj.bottom || (top + (obj.height || height));\n  this.width = obj.width || width;\n  this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n  toMove = toMove !== undefined ? toMove : this.lineHeight;\n  switch (axis) {\n  case \"+x\":\n    this.left += toMove;\n    this.right += toMove;\n    break;\n  case \"-x\":\n    this.left -= toMove;\n    this.right -= toMove;\n    break;\n  case \"+y\":\n    this.top += toMove;\n    this.bottom += toMove;\n    break;\n  case \"-y\":\n    this.top -= toMove;\n    this.bottom -= toMove;\n    break;\n  }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n  return this.left < b2.right &&\n         this.right > b2.left &&\n         this.top < b2.bottom &&\n         this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n  for (var i = 0; i < boxes.length; i++) {\n    if (this.overlaps(boxes[i])) {\n      return true;\n    }\n  }\n  return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n  return this.top >= container.top &&\n         this.bottom <= container.bottom &&\n         this.left >= container.left &&\n         this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n  switch (axis) {\n  case \"+x\":\n    return this.left < container.left;\n  case \"-x\":\n    return this.right > container.right;\n  case \"+y\":\n    return this.top < container.top;\n  case \"-y\":\n    return this.bottom > container.bottom;\n  }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n  var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n      intersectArea = x * y;\n  return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n  return {\n    top: this.top - reference.top,\n    bottom: reference.bottom - this.bottom,\n    left: this.left - reference.left,\n    right: reference.right - this.right,\n    height: this.height,\n    width: this.width\n  };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n  var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n  var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n  var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n  obj = obj.div ? obj.div.getBoundingClientRect() :\n                obj.tagName ? obj.getBoundingClientRect() : obj;\n  var ret = {\n    left: obj.left,\n    right: obj.right,\n    top: obj.top || top,\n    height: obj.height || height,\n    bottom: obj.bottom || (top + (obj.height || height)),\n    width: obj.width || width\n  };\n  return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n  // Find the best position for a cue box, b, on the video. The axis parameter\n  // is a list of axis, the order of which, it will move the box along. For example:\n  // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n  // direction. If it doesn't find a good position for it there it will then move\n  // it along the x axis in the negative direction.\n  function findBestPosition(b, axis) {\n    var bestPosition,\n        specifiedPosition = new BoxPosition(b),\n        percentage = 1; // Highest possible so the first thing we get is better.\n\n    for (var i = 0; i < axis.length; i++) {\n      while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n             (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n        b.move(axis[i]);\n      }\n      // We found a spot where we aren't overlapping anything. This is our\n      // best position.\n      if (b.within(containerBox)) {\n        return b;\n      }\n      var p = b.intersectPercentage(containerBox);\n      // If we're outside the container box less then we were on our last try\n      // then remember this position as the best position.\n      if (percentage > p) {\n        bestPosition = new BoxPosition(b);\n        percentage = p;\n      }\n      // Reset the box position to the specified position.\n      b = new BoxPosition(specifiedPosition);\n    }\n    return bestPosition || specifiedPosition;\n  }\n\n  var boxPosition = new BoxPosition(styleBox),\n      cue = styleBox.cue,\n      linePos = computeLinePos(cue),\n      axis = [];\n\n  // If we have a line number to align the cue to.\n  if (cue.snapToLines) {\n    var size;\n    switch (cue.vertical) {\n    case \"\":\n      axis = [ \"+y\", \"-y\" ];\n      size = \"height\";\n      break;\n    case \"rl\":\n      axis = [ \"+x\", \"-x\" ];\n      size = \"width\";\n      break;\n    case \"lr\":\n      axis = [ \"-x\", \"+x\" ];\n      size = \"width\";\n      break;\n    }\n\n    var step = boxPosition.lineHeight,\n        position = step * Math.round(linePos),\n        maxPosition = containerBox[size] + step,\n        initialAxis = axis[0];\n\n    // If the specified intial position is greater then the max position then\n    // clamp the box to the amount of steps it would take for the box to\n    // reach the max position.\n    if (Math.abs(position) > maxPosition) {\n      position = position < 0 ? -1 : 1;\n      position *= Math.ceil(maxPosition / step) * step;\n    }\n\n    // If computed line position returns negative then line numbers are\n    // relative to the bottom of the video instead of the top. Therefore, we\n    // need to increase our initial position by the length or width of the\n    // video, depending on the writing direction, and reverse our axis directions.\n    if (linePos < 0) {\n      position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n      axis = axis.reverse();\n    }\n\n    // Move the box to the specified position. This may not be its best\n    // position.\n    boxPosition.move(initialAxis, position);\n\n  } else {\n    // If we have a percentage line value for the cue.\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n    switch (cue.lineAlign) {\n    case \"center\":\n      linePos -= (calculatedPercentage / 2);\n      break;\n    case \"end\":\n      linePos -= calculatedPercentage;\n      break;\n    }\n\n    // Apply initial line position to the cue box.\n    switch (cue.vertical) {\n    case \"\":\n      styleBox.applyStyles({\n        top: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"rl\":\n      styleBox.applyStyles({\n        left: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"lr\":\n      styleBox.applyStyles({\n        right: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    }\n\n    axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n    // Get the box position again after we've applied the specified positioning\n    // to it.\n    boxPosition = new BoxPosition(styleBox);\n  }\n\n  var bestPosition = findBestPosition(boxPosition, axis);\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n  // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n  return {\n    decode: function(data) {\n      if (!data) {\n        return \"\";\n      }\n      if (typeof data !== \"string\") {\n        throw new Error(\"Error - expected string data.\");\n      }\n      return decodeURIComponent(encodeURIComponent(data));\n    }\n  };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n  if (!window || !cuetext) {\n    return null;\n  }\n  return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n//                and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n  if (!window || !cues || !overlay) {\n    return null;\n  }\n\n  // Remove all previous children.\n  while (overlay.firstChild) {\n    overlay.removeChild(overlay.firstChild);\n  }\n\n  var paddedOverlay = window.document.createElement(\"div\");\n  paddedOverlay.style.position = \"absolute\";\n  paddedOverlay.style.left = \"0\";\n  paddedOverlay.style.right = \"0\";\n  paddedOverlay.style.top = \"0\";\n  paddedOverlay.style.bottom = \"0\";\n  paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n  overlay.appendChild(paddedOverlay);\n\n  // Determine if we need to compute the display states of the cues. This could\n  // be the case if a cue's state has been changed since the last computation or\n  // if it has not been computed yet.\n  function shouldCompute(cues) {\n    for (var i = 0; i < cues.length; i++) {\n      if (cues[i].hasBeenReset || !cues[i].displayState) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  // We don't need to recompute the cues' display states. Just reuse them.\n  if (!shouldCompute(cues)) {\n    for (var i = 0; i < cues.length; i++) {\n      paddedOverlay.appendChild(cues[i].displayState);\n    }\n    return;\n  }\n\n  var boxPositions = [],\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n  var styleOptions = {\n    font: fontSize + \"px \" + FONT_STYLE\n  };\n\n  (function() {\n    var styleBox, cue;\n\n    for (var i = 0; i < cues.length; i++) {\n      cue = cues[i];\n\n      // Compute the intial position and styles of the cue div.\n      styleBox = new CueStyleBox(window, cue, styleOptions);\n      paddedOverlay.appendChild(styleBox.div);\n\n      // Move the cue div to it's correct line position.\n      moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n      // Remember the computed div so that we don't have to recompute it later\n      // if we don't have too.\n      cue.displayState = styleBox.div;\n\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n    }\n  })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n  if (!decoder) {\n    decoder = vttjs;\n    vttjs = {};\n  }\n  if (!vttjs) {\n    vttjs = {};\n  }\n\n  this.window = window;\n  this.vttjs = vttjs;\n  this.state = \"INITIAL\";\n  this.buffer = \"\";\n  this.decoder = decoder || new TextDecoder(\"utf8\");\n  this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n  // If the error is a ParsingError then report it to the consumer if\n  // possible. If it's not a ParsingError then throw it like normal.\n  reportOrThrowError: function(e) {\n    if (e instanceof ParsingError) {\n      this.onparsingerror && this.onparsingerror(e);\n    } else {\n      throw e;\n    }\n  },\n  parse: function (data) {\n    var self = this;\n\n    // If there is no data then we won't decode it, but will just try to parse\n    // whatever is in buffer already. This may occur in circumstances, for\n    // example when flush() is called.\n    if (data) {\n      // Try to decode the data that we received.\n      self.buffer += self.decoder.decode(data, {stream: true});\n    }\n\n    function collectNextLine() {\n      var buffer = self.buffer;\n      var pos = 0;\n      while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n        ++pos;\n      }\n      var line = buffer.substr(0, pos);\n      // Advance the buffer early in case we fail below.\n      if (buffer[pos] === '\\r') {\n        ++pos;\n      }\n      if (buffer[pos] === '\\n') {\n        ++pos;\n      }\n      self.buffer = buffer.substr(pos);\n      return line;\n    }\n\n    // 3.4 WebVTT region and WebVTT region settings syntax\n    function parseRegion(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function (k, v) {\n        switch (k) {\n        case \"id\":\n          settings.set(k, v);\n          break;\n        case \"width\":\n          settings.percent(k, v);\n          break;\n        case \"lines\":\n          settings.integer(k, v);\n          break;\n        case \"regionanchor\":\n        case \"viewportanchor\":\n          var xy = v.split(',');\n          if (xy.length !== 2) {\n            break;\n          }\n          // We have to make sure both x and y parse, so use a temporary\n          // settings object here.\n          var anchor = new Settings();\n          anchor.percent(\"x\", xy[0]);\n          anchor.percent(\"y\", xy[1]);\n          if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n            break;\n          }\n          settings.set(k + \"X\", anchor.get(\"x\"));\n          settings.set(k + \"Y\", anchor.get(\"y\"));\n          break;\n        case \"scroll\":\n          settings.alt(k, v, [\"up\"]);\n          break;\n        }\n      }, /=/, /\\s/);\n\n      // Create the region, using default values for any values that were not\n      // specified.\n      if (settings.has(\"id\")) {\n        var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n        region.width = settings.get(\"width\", 100);\n        region.lines = settings.get(\"lines\", 3);\n        region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n        region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n        region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n        region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n        region.scroll = settings.get(\"scroll\", \"\");\n        // Register the region.\n        self.onregion && self.onregion(region);\n        // Remember the VTTRegion for later in case we parse any VTTCues that\n        // reference it.\n        self.regionList.push({\n          id: settings.get(\"id\"),\n          region: region\n        });\n      }\n    }\n\n    // draft-pantos-http-live-streaming-20\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n    // 3.5 WebVTT\n    function parseTimestampMap(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function(k, v) {\n        switch(k) {\n        case \"MPEGT\":\n          settings.integer(k + 'S', v);\n          break;\n        case \"LOCA\":\n          settings.set(k + 'L', parseTimeStamp(v));\n          break;\n        }\n      }, /[^\\d]:/, /,/);\n\n      self.ontimestampmap && self.ontimestampmap({\n        \"MPEGTS\": settings.get(\"MPEGTS\"),\n        \"LOCAL\": settings.get(\"LOCAL\")\n      });\n    }\n\n    // 3.2 WebVTT metadata header syntax\n    function parseHeader(input) {\n      if (input.match(/X-TIMESTAMP-MAP/)) {\n        // This line contains HLS X-TIMESTAMP-MAP metadata\n        parseOptions(input, function(k, v) {\n          switch(k) {\n          case \"X-TIMESTAMP-MAP\":\n            parseTimestampMap(v);\n            break;\n          }\n        }, /=/);\n      } else {\n        parseOptions(input, function (k, v) {\n          switch (k) {\n          case \"Region\":\n            // 3.3 WebVTT region metadata header syntax\n            parseRegion(v);\n            break;\n          }\n        }, /:/);\n      }\n\n    }\n\n    // 5.1 WebVTT file parsing.\n    try {\n      var line;\n      if (self.state === \"INITIAL\") {\n        // We can't start parsing until we have the first line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        line = collectNextLine();\n\n        var m = line.match(/^WEBVTT([ \\t].*)?$/);\n        if (!m || !m[0]) {\n          throw new ParsingError(ParsingError.Errors.BadSignature);\n        }\n\n        self.state = \"HEADER\";\n      }\n\n      var alreadyCollectedLine = false;\n      while (self.buffer) {\n        // We can't parse a line until we have the full line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        if (!alreadyCollectedLine) {\n          line = collectNextLine();\n        } else {\n          alreadyCollectedLine = false;\n        }\n\n        switch (self.state) {\n        case \"HEADER\":\n          // 13-18 - Allow a header (metadata) under the WEBVTT line.\n          if (/:/.test(line)) {\n            parseHeader(line);\n          } else if (!line) {\n            // An empty line terminates the header and starts the body (cues).\n            self.state = \"ID\";\n          }\n          continue;\n        case \"NOTE\":\n          // Ignore NOTE blocks.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        case \"ID\":\n          // Check for the start of NOTE blocks.\n          if (/^NOTE($|[ \\t])/.test(line)) {\n            self.state = \"NOTE\";\n            break;\n          }\n          // 19-29 - Allow any number of line terminators, then initialize new cue values.\n          if (!line) {\n            continue;\n          }\n          self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n          // Safari still uses the old middle value and won't accept center\n          try {\n            self.cue.align = \"center\";\n          } catch (e) {\n            self.cue.align = \"middle\";\n          }\n          self.state = \"CUE\";\n          // 30-39 - Check if self line contains an optional identifier or timing data.\n          if (line.indexOf(\"-->\") === -1) {\n            self.cue.id = line;\n            continue;\n          }\n          // Process line as start of a cue.\n          /*falls through*/\n        case \"CUE\":\n          // 40 - Collect cue timings and settings.\n          try {\n            parseCue(line, self.cue, self.regionList);\n          } catch (e) {\n            self.reportOrThrowError(e);\n            // In case of an error ignore rest of the cue.\n            self.cue = null;\n            self.state = \"BADCUE\";\n            continue;\n          }\n          self.state = \"CUETEXT\";\n          continue;\n        case \"CUETEXT\":\n          var hasSubstring = line.indexOf(\"-->\") !== -1;\n          // 34 - If we have an empty line then report the cue.\n          // 35 - If we have the special substring '-->' then report the cue,\n          // but do not collect the line as we need to process the current\n          // one as a new cue.\n          if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n            // We are done parsing self cue.\n            self.oncue && self.oncue(self.cue);\n            self.cue = null;\n            self.state = \"ID\";\n            continue;\n          }\n          if (self.cue.text) {\n            self.cue.text += \"\\n\";\n          }\n          self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n          continue;\n        case \"BADCUE\": // BADCUE\n          // 54-62 - Collect and discard the remaining cue.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        }\n      }\n    } catch (e) {\n      self.reportOrThrowError(e);\n\n      // If we are currently parsing a cue, report what we have.\n      if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n        self.oncue(self.cue);\n      }\n      self.cue = null;\n      // Enter BADWEBVTT state if header was not parsed correctly otherwise\n      // another exception occurred so enter BADCUE state.\n      self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n    }\n    return this;\n  },\n  flush: function () {\n    var self = this;\n    try {\n      // Finish decoding the stream.\n      self.buffer += self.decoder.decode();\n      // Synthesize the end of the current cue or region.\n      if (self.cue || self.state === \"HEADER\") {\n        self.buffer += \"\\n\\n\";\n        self.parse();\n      }\n      // If we've flushed, parsed, and we're still on the INITIAL state then\n      // that means we don't have enough of the stream to parse the first\n      // line.\n      if (self.state === \"INITIAL\") {\n        throw new ParsingError(ParsingError.Errors.BadSignature);\n      }\n    } catch(e) {\n      self.reportOrThrowError(e);\n    }\n    self.onflush && self.onflush();\n    return this;\n  }\n};\n\nmodule.exports = WebVTT;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-vtt.js/lib/vtt.js?");

/***/ }),

/***/ "./node_modules/videojs-vtt.js/lib/vttcue.js":
/*!***************************************************!*\
  !*** ./node_modules/videojs-vtt.js/lib/vttcue.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n  \"\": 1,\n  \"lr\": 1,\n  \"rl\": 1\n};\nvar alignSetting = {\n  \"start\": 1,\n  \"center\": 1,\n  \"end\": 1,\n  \"left\": 1,\n  \"right\": 1,\n  \"auto\": 1,\n  \"line-left\": 1,\n  \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var dir = directionSetting[value.toLowerCase()];\n  return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var align = alignSetting[value.toLowerCase()];\n  return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n  /**\n   * Shim implementation specific properties. These properties are not in\n   * the spec.\n   */\n\n  // Lets us know when the VTTCue's data has changed in such a way that we need\n  // to recompute its display state. This lets us compute its display state\n  // lazily.\n  this.hasBeenReset = false;\n\n  /**\n   * VTTCue and TextTrackCue properties\n   * http://dev.w3.org/html5/webvtt/#vttcue-interface\n   */\n\n  var _id = \"\";\n  var _pauseOnExit = false;\n  var _startTime = startTime;\n  var _endTime = endTime;\n  var _text = text;\n  var _region = null;\n  var _vertical = \"\";\n  var _snapToLines = true;\n  var _line = \"auto\";\n  var _lineAlign = \"start\";\n  var _position = \"auto\";\n  var _positionAlign = \"auto\";\n  var _size = 100;\n  var _align = \"center\";\n\n  Object.defineProperties(this, {\n    \"id\": {\n      enumerable: true,\n      get: function() {\n        return _id;\n      },\n      set: function(value) {\n        _id = \"\" + value;\n      }\n    },\n\n    \"pauseOnExit\": {\n      enumerable: true,\n      get: function() {\n        return _pauseOnExit;\n      },\n      set: function(value) {\n        _pauseOnExit = !!value;\n      }\n    },\n\n    \"startTime\": {\n      enumerable: true,\n      get: function() {\n        return _startTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Start time must be set to a number.\");\n        }\n        _startTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"endTime\": {\n      enumerable: true,\n      get: function() {\n        return _endTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"End time must be set to a number.\");\n        }\n        _endTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"text\": {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = \"\" + value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"region\": {\n      enumerable: true,\n      get: function() {\n        return _region;\n      },\n      set: function(value) {\n        _region = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"vertical\": {\n      enumerable: true,\n      get: function() {\n        return _vertical;\n      },\n      set: function(value) {\n        var setting = findDirectionSetting(value);\n        // Have to check for false because the setting an be an empty string.\n        if (setting === false) {\n          throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n        }\n        _vertical = setting;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"snapToLines\": {\n      enumerable: true,\n      get: function() {\n        return _snapToLines;\n      },\n      set: function(value) {\n        _snapToLines = !!value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"line\": {\n      enumerable: true,\n      get: function() {\n        return _line;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\" && value !== autoKeyword) {\n          throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n        }\n        _line = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"lineAlign\": {\n      enumerable: true,\n      get: function() {\n        return _lineAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n        } else {\n          _lineAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"position\": {\n      enumerable: true,\n      get: function() {\n        return _position;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Position must be between 0 and 100.\");\n        }\n        _position = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"positionAlign\": {\n      enumerable: true,\n      get: function() {\n        return _positionAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n        } else {\n          _positionAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"size\": {\n      enumerable: true,\n      get: function() {\n        return _size;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Size must be between 0 and 100.\");\n        }\n        _size = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"align\": {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n        }\n        _align = setting;\n        this.hasBeenReset = true;\n      }\n    }\n  });\n\n  /**\n   * Other <track> spec defined properties\n   */\n\n  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n  this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n  // Assume WebVTT.convertCueToDOMTree is on the global.\n  return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-vtt.js/lib/vttcue.js?");

/***/ }),

/***/ "./node_modules/videojs-vtt.js/lib/vttregion.js":
/*!******************************************************!*\
  !*** ./node_modules/videojs-vtt.js/lib/vttregion.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n  \"\": true,\n  \"up\": true\n};\n\nfunction findScrollSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var scroll = scrollSetting[value.toLowerCase()];\n  return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n  return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n  var _width = 100;\n  var _lines = 3;\n  var _regionAnchorX = 0;\n  var _regionAnchorY = 100;\n  var _viewportAnchorX = 0;\n  var _viewportAnchorY = 100;\n  var _scroll = \"\";\n\n  Object.defineProperties(this, {\n    \"width\": {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"Width must be between 0 and 100.\");\n        }\n        _width = value;\n      }\n    },\n    \"lines\": {\n      enumerable: true,\n      get: function() {\n        return _lines;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Lines must be set to a number.\");\n        }\n        _lines = value;\n      }\n    },\n    \"regionAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n        }\n        _regionAnchorY = value;\n      }\n    },\n    \"regionAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorX;\n      },\n      set: function(value) {\n        if(!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n        }\n        _regionAnchorX = value;\n      }\n    },\n    \"viewportAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n        }\n        _viewportAnchorY = value;\n      }\n    },\n    \"viewportAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorX;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n        }\n        _viewportAnchorX = value;\n      }\n    },\n    \"scroll\": {\n      enumerable: true,\n      get: function() {\n        return _scroll;\n      },\n      set: function(value) {\n        var setting = findScrollSetting(value);\n        // Have to check for false as an empty string is a legal value.\n        if (setting === false) {\n          console.warn(\"Scroll: an invalid or illegal string was specified.\");\n        } else {\n          _scroll = setting;\n        }\n      }\n    }\n  });\n}\n\nmodule.exports = VTTRegion;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/videojs-vtt.js/lib/vttregion.js?");

/***/ }),

/***/ "./node_modules/viewport-dimensions/index.js":
/*!***************************************************!*\
  !*** ./node_modules/viewport-dimensions/index.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* eslint-env browser, node */\n\n\n\nvar viewport = {};\nvar width = -1;\nvar height = -1;\n\n\n// Public interface\n//------------------------------------------------------------------------------\n\n/**\n * Get browser viewport width.\n *\n * @returns {number} Internal reference to browser viewport width.\n */\nviewport.width = function() {\n  return width;\n};\n\n/**\n * Get browser viewport height.\n *\n * @returns {number} Internal reference to browser viewport height.\n */\nviewport.height = function() {\n  return height;\n};\n\n/**\n * Get maximum browser viewport dimension (width or height).\n *\n * @returns {number} Internal reference to maximum browser viewport dimension.\n */\nviewport.max = function() {\n  return Math.max(width, height);\n};\n\n/**\n * Get minimum browser viewport dimension (width or height).\n *\n * @returns {number} Internal reference to minimum browser viewport dimension.\n */\nviewport.min = function() {\n  return Math.min(width, height);\n};\n\n\n/**\n * Set internal dimension references to current browser viewport width and height.\n * Called by viewport#onWindowResize on resize and orientationchange.\n */\nviewport.setDimensions = function() {\n  /* istanbul ignore else */\n  if (typeof document !== 'undefined') {\n    width = document.documentElement.clientWidth;\n    height = document.documentElement.clientHeight;\n  }\n};\n\n\n// Protected methods\n//------------------------------------------------------------------------------\n\n/**\n * Handler for window resize and orientationchange events. Calls viewport#setDimensions.\n *\n * @private\n */\nviewport.onWindowResize = function() {\n  viewport.setDimensions();\n};\n\n/* istanbul ignore else */\nif (typeof window !== 'undefined') {\n  window.addEventListener('resize', viewport.onWindowResize, false);\n  window.addEventListener('orientationchange', viewport.onWindowResize, false);\n\n  viewport.setDimensions();\n}\n\n// Exports\nmodule.exports = viewport;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/viewport-dimensions/index.js?");

/***/ }),

/***/ "./node_modules/webpack-jquery-ui/draggable.js":
/*!****************************************!*\
  !*** (webpack)-jquery-ui/draggable.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! jquery-ui/ui/widget */ \"./node_modules/jquery-ui/ui/widget.js\");\r\n__webpack_require__(/*! jquery-ui/ui/data */ \"./node_modules/jquery-ui/ui/data.js\");\r\n__webpack_require__(/*! jquery-ui/ui/scroll-parent */ \"./node_modules/jquery-ui/ui/scroll-parent.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/draggable */ \"./node_modules/jquery-ui/ui/widgets/draggable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\");\r\n__webpack_require__(/*! jquery-ui/themes/base/core.css */ \"./node_modules/jquery-ui/themes/base/core.css\");\r\n__webpack_require__(/*! jquery-ui/themes/base/draggable.css */ \"./node_modules/jquery-ui/themes/base/draggable.css\");\n\n//# sourceURL=webpack://futureBooks/(webpack)-jquery-ui/draggable.js?");

/***/ }),

/***/ "./node_modules/webpack-jquery-ui/droppable.js":
/*!****************************************!*\
  !*** (webpack)-jquery-ui/droppable.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! jquery-ui/ui/widget */ \"./node_modules/jquery-ui/ui/widget.js\");\r\n__webpack_require__(/*! jquery-ui/ui/data */ \"./node_modules/jquery-ui/ui/data.js\");\r\n__webpack_require__(/*! jquery-ui/ui/scroll-parent */ \"./node_modules/jquery-ui/ui/scroll-parent.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/draggable */ \"./node_modules/jquery-ui/ui/widgets/draggable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/droppable */ \"./node_modules/jquery-ui/ui/widgets/droppable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\");\r\n__webpack_require__(/*! jquery-ui/themes/base/core.css */ \"./node_modules/jquery-ui/themes/base/core.css\");\r\n__webpack_require__(/*! jquery-ui/themes/base/draggable.css */ \"./node_modules/jquery-ui/themes/base/draggable.css\");\n\n//# sourceURL=webpack://futureBooks/(webpack)-jquery-ui/droppable.js?");

/***/ }),

/***/ "./node_modules/webpack-jquery-ui/resizable.js":
/*!****************************************!*\
  !*** (webpack)-jquery-ui/resizable.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! jquery-ui/ui/widget */ \"./node_modules/jquery-ui/ui/widget.js\");\r\n__webpack_require__(/*! jquery-ui/ui/disable-selection */ \"./node_modules/jquery-ui/ui/disable-selection.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/resizable */ \"./node_modules/jquery-ui/ui/widgets/resizable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\");\r\n__webpack_require__(/*! jquery-ui/themes/base/core.css */ \"./node_modules/jquery-ui/themes/base/core.css\");\r\n__webpack_require__(/*! jquery-ui/themes/base/resizable.css */ \"./node_modules/jquery-ui/themes/base/resizable.css\");\n\n//# sourceURL=webpack://futureBooks/(webpack)-jquery-ui/resizable.js?");

/***/ }),

/***/ "./node_modules/webpack-jquery-ui/selectable.js":
/*!*****************************************!*\
  !*** (webpack)-jquery-ui/selectable.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! jquery-ui/ui/widget */ \"./node_modules/jquery-ui/ui/widget.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/selectable */ \"./node_modules/jquery-ui/ui/widgets/selectable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\");\r\n__webpack_require__(/*! jquery-ui/themes/base/core.css */ \"./node_modules/jquery-ui/themes/base/core.css\");\r\n__webpack_require__(/*! jquery-ui/themes/base/selectable.css */ \"./node_modules/jquery-ui/themes/base/selectable.css\");\n\n//# sourceURL=webpack://futureBooks/(webpack)-jquery-ui/selectable.js?");

/***/ }),

/***/ "./node_modules/webpack-jquery-ui/sortable.js":
/*!***************************************!*\
  !*** (webpack)-jquery-ui/sortable.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! jquery-ui/ui/widget */ \"./node_modules/jquery-ui/ui/widget.js\");\r\n__webpack_require__(/*! jquery-ui/ui/data */ \"./node_modules/jquery-ui/ui/data.js\");\r\n__webpack_require__(/*! jquery-ui/ui/disable-selection */ \"./node_modules/jquery-ui/ui/disable-selection.js\");\r\n__webpack_require__(/*! jquery-ui/ui/scroll-parent */ \"./node_modules/jquery-ui/ui/scroll-parent.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/sortable */ \"./node_modules/jquery-ui/ui/widgets/sortable.js\");\r\n__webpack_require__(/*! jquery-ui/ui/widgets/mouse */ \"./node_modules/jquery-ui/ui/widgets/mouse.js\");\r\n__webpack_require__(/*! jquery-ui/themes/base/core.css */ \"./node_modules/jquery-ui/themes/base/core.css\");\r\n__webpack_require__(/*! jquery-ui/themes/base/sortable.css */ \"./node_modules/jquery-ui/themes/base/sortable.css\");\n\n//# sourceURL=webpack://futureBooks/(webpack)-jquery-ui/sortable.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/amd-options.js":
/*!****************************************!*\
  !*** (webpack)/buildin/amd-options.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(this, {}))\n\n//# sourceURL=webpack://futureBooks/(webpack)/buildin/amd-options.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://futureBooks/(webpack)/buildin/global.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/harmony-module.js":
/*!*******************************************!*\
  !*** (webpack)/buildin/harmony-module.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack://futureBooks/(webpack)/buildin/harmony-module.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack://futureBooks/(webpack)/buildin/module.js?");

/***/ }),

/***/ "./node_modules/yeast/index.js":
/*!*************************************!*\
  !*** ./node_modules/yeast/index.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nvar alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')\n  , length = 64\n  , map = {}\n  , seed = 0\n  , i = 0\n  , prev;\n\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nfunction encode(num) {\n  var encoded = '';\n\n  do {\n    encoded = alphabet[num % length] + encoded;\n    num = Math.floor(num / length);\n  } while (num > 0);\n\n  return encoded;\n}\n\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nfunction decode(str) {\n  var decoded = 0;\n\n  for (i = 0; i < str.length; i++) {\n    decoded = decoded * length + map[str.charAt(i)];\n  }\n\n  return decoded;\n}\n\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nfunction yeast() {\n  var now = encode(+new Date());\n\n  if (now !== prev) return seed = 0, prev = now;\n  return now +'.'+ encode(seed++);\n}\n\n//\n// Map each character to its index.\n//\nfor (; i < length; i++) map[alphabet[i]] = i;\n\n//\n// Expose the `yeast`, `encode` and `decode` functions.\n//\nyeast.encode = encode;\nyeast.decode = decode;\nmodule.exports = yeast;\n\n\n//# sourceURL=webpack://futureBooks/./node_modules/yeast/index.js?");

/***/ }),

/***/ "./src/core/builder-book.less":
/*!************************************!*\
  !*** ./src/core/builder-book.less ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/builder-book.less?");

/***/ }),

/***/ "./src/core/core.js":
/*!****************************************!*\
  !*** ./src/core/core.js + 565 modules ***!
  \****************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/templates/builder_components.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/templates/builder_history.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/highlights-comments/templates/info.f7.html (<- Module uses injected variables (jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/search/templates/right_menu.f7.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/asyncToGenerator.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/construct.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/get.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/getPrototypeOf.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/dom7/dist/dom7.module.js because of ./src/core/custom_plugins/book-navigation/book-navigation.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js because of ./node_modules/framework7-v575/utils/device.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/framework7-v575/utils/device.js (<- Module uses injected variables (process)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/framework7-v575/utils/support.js because of ./node_modules/framework7-v575/utils/device.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/framework7-v575/utils/utils.js because of ./src/core/custom_plugins/builder-mind-maps/mm-comp.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/template7/dist/template7.esm.js (<- Module uses eval()) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/book-navigation/book-navigation.js (<- Module uses injected variables (jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/book/book.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder-citations/standards/iso690.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder-mind-maps/mm-comp.js (<- Module uses injected variables (jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/genHelp.js because of ./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js because of ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js (<- Module uses eval()) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/cards/c-01.js (<- Module is referenced from these modules with unsupported syntax: ./src/core/custom_plugins/builder/components/category-en.js (referenced with import())) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/charts/chart-01.js (<- Module uses eval()) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js because of ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js because of ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js because of ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/games/ge-01.js (<- Module uses injected variables ($, jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js (<- Module uses eval()) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/rating/rating-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js (<- Module uses injected variables (module, global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/gallery/gallery.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/highlights-comments/highlights-comments-class.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/translation/translation.js because of ./src/core/custom_plugins/book/book.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/video-player/video-player.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/utils-extend/utils-extend-2.js (<- Module uses injected variables ($)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/bowser/es5.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/chart.js/dist/Chart.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/jquery/dist/jquery.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/jwt-decode/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/laravel-echo/dist/echo.js (<- Module uses injected variables (jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/libgif/libgif.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/loadjs/dist/loadjs.umd.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/localforage/dist/localforage.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/array.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rangetouch/dist/rangetouch.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rollbar/dist/rollbar.umd.min.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/socket.io-client/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/sortablejs/modular/sortable.esm.js (<- Module uses injected variables (__webpack_provided_window_dot_jQuery)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/svg-injector/svg-injector.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/underscore/modules/index-all.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/mindmup-mapjs-layout/src/color-to-rgb.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/connectors.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/is-empty-group.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layout-geometry.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layout-model.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/align-group.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/extract-connectors.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/links.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/standard.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/top-down.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/multi-root-layout.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/outline.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/theme-dimension-provider.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/theme-processor.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/theme.js (referenced with cjs require), ./node_modules/mindmup-mapjs-layout/src/tree.js (referenced with cjs require), ./node_modules/mindmup-mapjs-model/src/content-upgrade.js (referenced with cjs require), ./node_modules/mindmup-mapjs-model/src/content.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connectors.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-geometry.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-model.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/align-group.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/extract-connectors.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/links.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/standard.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/top-down.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/multi-root-layout.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/outline.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-dimension-provider.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-processor.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/tree.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-view.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-widget.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-insert-controller.js (referenced with cjs require), ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-model.js (referenced with cjs require)) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/video.js/dist/video.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js because of ./src/core/custom_plugins/video-player/video-player.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js because of ./src/core/custom_plugins/video-player/video-player.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js\nvar classCallCheck = __webpack_require__(\"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\nvar classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js\nvar createClass = __webpack_require__(\"./node_modules/@babel/runtime/helpers/createClass.js\");\nvar createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);\n\n// EXTERNAL MODULE: ./src/core/builder-book.less\nvar builder_book = __webpack_require__(\"./src/core/builder-book.less\");\n\n// EXTERNAL MODULE: ./node_modules/template7/dist/template7.esm.js\nvar template7_esm = __webpack_require__(\"./node_modules/template7/dist/template7.esm.js\");\n\n// EXTERNAL MODULE: ./node_modules/dom7/dist/dom7.module.js + 1 modules\nvar dom7_module = __webpack_require__(\"./node_modules/dom7/dist/dom7.module.js\");\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\nvar possibleConstructorReturn = __webpack_require__(\"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\nvar possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js\nvar getPrototypeOf = __webpack_require__(\"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\nvar getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js\nvar inherits = __webpack_require__(\"./node_modules/@babel/runtime/helpers/inherits.js\");\nvar inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);\n\n// EXTERNAL MODULE: ./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js\nvar ssr_window_esm = __webpack_require__(\"./node_modules/framework7-v575/node_modules/ssr-window/dist/ssr-window.esm.js\");\n\n// EXTERNAL MODULE: ./node_modules/framework7-v575/utils/utils.js\nvar utils = __webpack_require__(\"./node_modules/framework7-v575/utils/utils.js\");\n\n// EXTERNAL MODULE: ./node_modules/framework7-v575/utils/device.js\nvar device = __webpack_require__(\"./node_modules/framework7-v575/utils/device.js\");\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js\nvar toConsumableArray = __webpack_require__(\"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\nvar toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/events-class.js\n\n\n\nvar events_class_EventsClass = /*#__PURE__*/function () {\n  function EventsClass() {\n    var parents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n    classCallCheck_default()(this, EventsClass);\n    var self = this;\n    self.eventsParents = parents;\n    self.eventsListeners = {};\n  }\n  return createClass_default()(EventsClass, [{\n    key: \"on\",\n    value: function on(events, handler, priority) {\n      var self = this;\n      if (typeof handler !== 'function') return self;\n      var method = priority ? 'unshift' : 'push';\n      events.split(' ').forEach(function (event) {\n        if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n        self.eventsListeners[event][method](handler);\n      });\n      return self;\n    }\n  }, {\n    key: \"once\",\n    value: function once(events, handler, priority) {\n      var self = this;\n      if (typeof handler !== 'function') return self;\n      function onceHandler() {\n        self.off(events, onceHandler);\n        if (onceHandler.f7proxy) {\n          delete onceHandler.f7proxy;\n        }\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        handler.apply(self, args);\n      }\n      onceHandler.f7proxy = handler;\n      return self.on(events, onceHandler, priority);\n    }\n  }, {\n    key: \"off\",\n    value: function off(events, handler) {\n      var self = this;\n      if (!self.eventsListeners) return self;\n      events.split(' ').forEach(function (event) {\n        if (typeof handler === 'undefined') {\n          self.eventsListeners[event] = [];\n        } else if (self.eventsListeners[event]) {\n          self.eventsListeners[event].forEach(function (eventHandler, index) {\n            if (eventHandler === handler || eventHandler.f7proxy && eventHandler.f7proxy === handler) {\n              self.eventsListeners[event].splice(index, 1);\n            }\n          });\n        }\n      });\n      return self;\n    }\n  }, {\n    key: \"emit\",\n    value: function emit() {\n      var self = this;\n      if (!self.eventsListeners) return self;\n      var events;\n      var data;\n      var context;\n      var eventsParents;\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n        events = args[0];\n        data = args.slice(1, args.length);\n        context = self;\n        eventsParents = self.eventsParents;\n      } else {\n        events = args[0].events;\n        data = args[0].data;\n        context = args[0].context || self;\n        eventsParents = args[0].local ? [] : args[0].parents || self.eventsParents;\n      }\n      var eventsArray = Array.isArray(events) ? events : events.split(' ');\n      var localEvents = eventsArray.map(function (eventName) {\n        return eventName.replace('local::', '');\n      });\n      var parentEvents = eventsArray.filter(function (eventName) {\n        return eventName.indexOf('local::') < 0;\n      });\n      localEvents.forEach(function (event) {\n        if (self.eventsListeners && self.eventsListeners[event]) {\n          var handlers = [];\n          self.eventsListeners[event].forEach(function (eventHandler) {\n            handlers.push(eventHandler);\n          });\n          handlers.forEach(function (eventHandler) {\n            eventHandler.apply(context, data);\n          });\n        }\n      });\n      if (eventsParents && eventsParents.length > 0) {\n        eventsParents.forEach(function (eventsParent) {\n          eventsParent.emit.apply(eventsParent, [parentEvents].concat(toConsumableArray_default()(data)));\n        });\n      }\n      return self;\n    }\n  }]);\n}();\n/* harmony default export */ var events_class = (events_class_EventsClass);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/class.js\n\n\n\n\n\nfunction _callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\nvar class_Framework7Class = /*#__PURE__*/function (_EventsClass) {\n  function Framework7Class() {\n    var _this;\n    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var parents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    classCallCheck_default()(this, Framework7Class);\n    _this = _callSuper(this, Framework7Class, [parents]);\n    var self = _this;\n    self.params = params;\n    if (self.params && self.params.on) {\n      Object.keys(self.params.on).forEach(function (eventName) {\n        self.on(eventName, self.params.on[eventName]);\n      });\n    }\n    return _this;\n  }\n\n  // eslint-disable-next-line\n  inherits_default()(Framework7Class, _EventsClass);\n  return createClass_default()(Framework7Class, [{\n    key: \"useModuleParams\",\n    value: function useModuleParams(module, instanceParams) {\n      if (module.params) {\n        var originalParams = {};\n        Object.keys(module.params).forEach(function (paramKey) {\n          if (typeof instanceParams[paramKey] === 'undefined') return;\n          originalParams[paramKey] = utils[\"default\"].extend({}, instanceParams[paramKey]);\n        });\n        utils[\"default\"].extend(instanceParams, module.params);\n        Object.keys(originalParams).forEach(function (paramKey) {\n          utils[\"default\"].extend(instanceParams[paramKey], originalParams[paramKey]);\n        });\n      }\n    }\n  }, {\n    key: \"useModulesParams\",\n    value: function useModulesParams(instanceParams) {\n      var instance = this;\n      if (!instance.modules) return;\n      Object.keys(instance.modules).forEach(function (moduleName) {\n        var module = instance.modules[moduleName];\n        // Extend params\n        if (module.params) {\n          utils[\"default\"].extend(instanceParams, module.params);\n        }\n      });\n    }\n  }, {\n    key: \"useModule\",\n    value: function useModule() {\n      var moduleName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var moduleParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var instance = this;\n      if (!instance.modules) return;\n      var module = typeof moduleName === 'string' ? instance.modules[moduleName] : moduleName;\n      if (!module) return;\n\n      // Extend instance methods and props\n      if (module.instance) {\n        Object.keys(module.instance).forEach(function (modulePropName) {\n          var moduleProp = module.instance[modulePropName];\n          if (typeof moduleProp === 'function') {\n            instance[modulePropName] = moduleProp.bind(instance);\n          } else {\n            instance[modulePropName] = moduleProp;\n          }\n        });\n      }\n      // Add event listeners\n      if (module.on && instance.on) {\n        Object.keys(module.on).forEach(function (moduleEventName) {\n          instance.on(moduleEventName, module.on[moduleEventName]);\n        });\n      }\n      // Add vnode hooks\n      if (module.vnode) {\n        if (!instance.vnodeHooks) instance.vnodeHooks = {};\n        Object.keys(module.vnode).forEach(function (vnodeId) {\n          Object.keys(module.vnode[vnodeId]).forEach(function (hookName) {\n            var handler = module.vnode[vnodeId][hookName];\n            if (!instance.vnodeHooks[hookName]) instance.vnodeHooks[hookName] = {};\n            if (!instance.vnodeHooks[hookName][vnodeId]) instance.vnodeHooks[hookName][vnodeId] = [];\n            instance.vnodeHooks[hookName][vnodeId].push(handler.bind(instance));\n          });\n        });\n      }\n      // Module create callback\n      if (module.create) {\n        module.create.bind(instance)(moduleParams);\n      }\n    }\n  }, {\n    key: \"useModules\",\n    value: function useModules() {\n      var modulesParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var instance = this;\n      if (!instance.modules) return;\n      Object.keys(instance.modules).forEach(function (moduleName) {\n        var moduleParams = modulesParams[moduleName] || {};\n        instance.useModule(moduleName, moduleParams);\n      });\n    }\n  }], [{\n    key: \"components\",\n    set: function set(components) {\n      var Class = this;\n      if (!Class.use) return;\n      Class.use(components);\n    }\n  }, {\n    key: \"installModule\",\n    value: function installModule(module) {\n      var Class = this;\n      if (!Class.prototype.modules) Class.prototype.modules = {};\n      var name = module.name || \"\".concat(Object.keys(Class.prototype.modules).length, \"_\").concat(utils[\"default\"].now());\n      Class.prototype.modules[name] = module;\n      // Prototype\n      if (module.proto) {\n        Object.keys(module.proto).forEach(function (key) {\n          Class.prototype[key] = module.proto[key];\n        });\n      }\n      // Class\n      if (module.static) {\n        Object.keys(module.static).forEach(function (key) {\n          Class[key] = module.static[key];\n        });\n      }\n      // Callback\n      if (module.install) {\n        for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n          params[_key - 1] = arguments[_key];\n        }\n        module.install.apply(Class, params);\n      }\n      return Class;\n    }\n  }, {\n    key: \"use\",\n    value: function use(module) {\n      var Class = this;\n      if (Array.isArray(module)) {\n        module.forEach(function (m) {\n          return Class.installModule(m);\n        });\n        return Class;\n      }\n      for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        params[_key2 - 1] = arguments[_key2];\n      }\n      return Class.installModule.apply(Class, [module].concat(params));\n    }\n  }]);\n}(events_class);\n/* harmony default export */ var utils_class = (class_Framework7Class);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/construct.js\nvar construct = __webpack_require__(\"./node_modules/@babel/runtime/helpers/construct.js\");\nvar construct_default = /*#__PURE__*/__webpack_require__.n(construct);\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/constructor-methods.js\n\n\n/* harmony default export */ var constructor_methods = (function () {\n  var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var defaultSelector = parameters.defaultSelector,\n    Constructor = parameters.constructor,\n    domProp = parameters.domProp,\n    app = parameters.app,\n    addMethods = parameters.addMethods;\n  var methods = {\n    create: function create() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      if (app) return construct_default()(Constructor, [app].concat(args));\n      return construct_default()(Constructor, args);\n    },\n    get: function get() {\n      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSelector;\n      if (el instanceof Constructor) return el;\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return undefined;\n      return $el[0][domProp];\n    },\n    destroy: function destroy(el) {\n      var instance = methods.get(el);\n      if (instance && instance.destroy) return instance.destroy();\n      return undefined;\n    }\n  };\n  if (addMethods && Array.isArray(addMethods)) {\n    addMethods.forEach(function (methodName) {\n      methods[methodName] = function () {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSelector;\n        var instance = methods.get(el);\n        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n          args[_key2 - 1] = arguments[_key2];\n        }\n        if (instance && instance[methodName]) return instance[methodName].apply(instance, args);\n        return undefined;\n      };\n    });\n  }\n  return methods;\n});\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(\"./node_modules/@babel/runtime/helpers/defineProperty.js\");\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/modal-methods.js\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n/* harmony default export */ var modal_methods = (function () {\n  var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var defaultSelector = parameters.defaultSelector,\n    Constructor = parameters.constructor,\n    app = parameters.app;\n  var methods = utils[\"default\"].extend(constructor_methods({\n    defaultSelector: defaultSelector,\n    constructor: Constructor,\n    app: app,\n    domProp: 'f7Modal'\n  }), {\n    open: function open(el, animate, targetEl) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length > 1 && targetEl) {\n        // check if same modal in other page\n        var $targetPage = Object(dom7_module[\"default\"])(targetEl).parents('.page');\n        if ($targetPage.length) {\n          $el.each(function (index, modalEl) {\n            var $modalEl = Object(dom7_module[\"default\"])(modalEl);\n            if ($modalEl.parents($targetPage)[0] === $targetPage[0]) {\n              $el = $modalEl;\n            }\n          });\n        }\n      }\n      if ($el.length > 1) {\n        $el = $el.eq($el.length - 1);\n      }\n      if (!$el.length) return undefined;\n      var instance = $el[0].f7Modal;\n      if (!instance) {\n        var params = $el.dataset();\n        instance = new Constructor(app, _objectSpread({\n          el: $el\n        }, params));\n      }\n      return instance.open(animate);\n    },\n    close: function close() {\n      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSelector;\n      var animate = arguments.length > 1 ? arguments[1] : undefined;\n      var targetEl = arguments.length > 2 ? arguments[2] : undefined;\n      var $el = Object(dom7_module[\"default\"])(el);\n      if (!$el.length) return undefined;\n      if ($el.length > 1) {\n        // check if close link (targetEl) in this modal\n        var $parentEl;\n        if (targetEl) {\n          var $targetEl = Object(dom7_module[\"default\"])(targetEl);\n          if ($targetEl.length) {\n            $parentEl = $targetEl.parents($el);\n          }\n        }\n        if ($parentEl && $parentEl.length > 0) {\n          $el = $parentEl;\n        } else {\n          $el = $el.eq($el.length - 1);\n        }\n      }\n      var instance = $el[0].f7Modal;\n      if (!instance) {\n        var params = $el.dataset();\n        instance = new Constructor(app, _objectSpread({\n          el: $el\n        }, params));\n      }\n      return instance.close(animate);\n    }\n  });\n  return methods;\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/app/load-module.js\n\n\n\nvar fetchedModules = [];\nfunction loadModule(moduleToLoad) {\n  var Framework7 = this;\n  return new Promise(function (resolve, reject) {\n    var app = Framework7.instance;\n    var modulePath;\n    var moduleObj;\n    var moduleFunc;\n    if (!moduleToLoad) {\n      reject(new Error('Framework7: Lazy module must be specified'));\n      return;\n    }\n    function install(module) {\n      Framework7.use(module);\n      if (app) {\n        app.useModuleParams(module, app.params);\n        app.useModule(module);\n      }\n    }\n    if (typeof moduleToLoad === 'string') {\n      var matchNamePattern = moduleToLoad.match(/([a-z0-9-]*)/i);\n      if (moduleToLoad.indexOf('.') < 0 && matchNamePattern && matchNamePattern[0].length === moduleToLoad.length) {\n        if (!app || app && !app.params.lazyModulesPath) {\n          reject(new Error('Framework7: \"lazyModulesPath\" app parameter must be specified to fetch module by name'));\n          return;\n        }\n        modulePath = \"\".concat(app.params.lazyModulesPath, \"/\").concat(moduleToLoad, \".js\");\n      } else {\n        modulePath = moduleToLoad;\n      }\n    } else if (typeof moduleToLoad === 'function') {\n      moduleFunc = moduleToLoad;\n    } else {\n      // considering F7-Plugin object\n      moduleObj = moduleToLoad;\n    }\n    if (moduleFunc) {\n      var module = moduleFunc(Framework7, false);\n      if (!module) {\n        reject(new Error('Framework7: Can\\'t find Framework7 component in specified component function'));\n        return;\n      }\n      // Check if it was added\n      if (Framework7.prototype.modules && Framework7.prototype.modules[module.name]) {\n        resolve();\n        return;\n      }\n      // Install It\n      install(module);\n      resolve();\n    }\n    if (moduleObj) {\n      var _module = moduleObj;\n      if (!_module) {\n        reject(new Error('Framework7: Can\\'t find Framework7 component in specified component'));\n        return;\n      }\n      // Check if it was added\n      if (Framework7.prototype.modules && Framework7.prototype.modules[_module.name]) {\n        resolve();\n        return;\n      }\n      // Install It\n      install(_module);\n      resolve();\n    }\n    if (modulePath) {\n      if (fetchedModules.indexOf(modulePath) >= 0) {\n        resolve();\n        return;\n      }\n      fetchedModules.push(modulePath);\n      var scriptLoad = new Promise(function (resolveScript, rejectScript) {\n        Framework7.request.get(modulePath, function (scriptContent) {\n          var id = utils[\"default\"].id();\n          var callbackLoadName = \"f7_component_loader_callback_\".concat(id);\n          var scriptEl = ssr_window_esm[\"document\"].createElement('script');\n          scriptEl.innerHTML = \"window.\".concat(callbackLoadName, \" = function (Framework7, Framework7AutoInstallComponent) {return \").concat(scriptContent.trim(), \"}\");\n          Object(dom7_module[\"default\"])('head').append(scriptEl);\n          var componentLoader = ssr_window_esm[\"window\"][callbackLoadName];\n          delete ssr_window_esm[\"window\"][callbackLoadName];\n          Object(dom7_module[\"default\"])(scriptEl).remove();\n          var module = componentLoader(Framework7, false);\n          if (!module) {\n            rejectScript(new Error(\"Framework7: Can't find Framework7 component in \".concat(modulePath, \" file\")));\n            return;\n          }\n\n          // Check if it was added\n          if (Framework7.prototype.modules && Framework7.prototype.modules[module.name]) {\n            resolveScript();\n            return;\n          }\n\n          // Install It\n          install(module);\n          resolveScript();\n        }, function (xhr, status) {\n          rejectScript(xhr, status);\n        });\n      });\n      var styleLoad = new Promise(function (resolveStyle) {\n        Framework7.request.get(modulePath.replace('.js', app.rtl ? '.rtl.css' : '.css'), function (styleContent) {\n          var styleEl = ssr_window_esm[\"document\"].createElement('style');\n          styleEl.innerHTML = styleContent;\n          Object(dom7_module[\"default\"])('head').append(styleEl);\n          resolveStyle();\n        }, function () {\n          resolveStyle();\n        });\n      });\n      Promise.all([scriptLoad, styleLoad]).then(function () {\n        resolve();\n      }).catch(function (err) {\n        reject(err);\n      });\n    }\n  });\n}\n/* harmony default export */ var load_module = (loadModule);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/app/app-class.js\n\n\n\n\n\nfunction app_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, app_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction app_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (app_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\n\n\n\n\n\nvar app_class_Framework7 = /*#__PURE__*/function (_Framework7Class) {\n  function Framework7(params) {\n    var _this;\n    classCallCheck_default()(this, Framework7);\n    _this = app_class_callSuper(this, Framework7, [params]);\n    if (Framework7.instance) {\n      throw new Error('Framework7 is already initialized and can\\'t be initialized more than once');\n    }\n    var passedParams = utils[\"default\"].extend({}, params);\n\n    // App Instance\n    var app = _this;\n    Framework7.instance = app;\n\n    // Default\n    var defaults = {\n      version: '1.0.0',\n      id: 'io.framework7.testapp',\n      root: 'body',\n      theme: 'auto',\n      language: ssr_window_esm[\"window\"].navigator.language,\n      routes: [],\n      name: 'Framework7',\n      lazyModulesPath: null,\n      initOnDeviceReady: true,\n      init: true,\n      autoDarkTheme: false,\n      iosTranslucentBars: true,\n      iosTranslucentModals: true,\n      component: undefined,\n      componentUrl: undefined\n    };\n\n    // Extend defaults with modules params\n    app.useModulesParams(defaults);\n\n    // Extend defaults with passed params\n    app.params = utils[\"default\"].extend(defaults, params);\n    var $rootEl = Object(dom7_module[\"default\"])(app.params.root);\n    utils[\"default\"].extend(app, {\n      // App Id\n      id: app.params.id,\n      // App Name\n      name: app.params.name,\n      // App version\n      version: app.params.version,\n      // Routes\n      routes: app.params.routes,\n      // Lang\n      language: app.params.language,\n      // Root\n      root: $rootEl,\n      // RTL\n      rtl: $rootEl.css('direction') === 'rtl',\n      // Theme\n      theme: function getTheme() {\n        if (app.params.theme === 'auto') {\n          if (device[\"default\"].ios) return 'ios';\n          if (device[\"default\"].desktop && device[\"default\"].electron) return 'aurora';\n          return 'md';\n        }\n        return app.params.theme;\n      }(),\n      // Initially passed parameters\n      passedParams: passedParams,\n      online: ssr_window_esm[\"window\"].navigator.onLine\n    });\n\n    // Save Root\n    if (app.root && app.root[0]) {\n      app.root[0].f7 = app;\n    }\n\n    // Install Modules\n    app.useModules();\n\n    // Init Data & Methods\n    app.initData();\n\n    // Auto Dark Theme\n    var DARK = '(prefers-color-scheme: dark)';\n    var LIGHT = '(prefers-color-scheme: light)';\n    app.mq = {};\n    if (ssr_window_esm[\"window\"].matchMedia) {\n      app.mq.dark = ssr_window_esm[\"window\"].matchMedia(DARK);\n      app.mq.light = ssr_window_esm[\"window\"].matchMedia(LIGHT);\n    }\n    app.colorSchemeListener = function colorSchemeListener(_ref) {\n      var matches = _ref.matches,\n        media = _ref.media;\n      if (!matches) {\n        return;\n      }\n      var html = ssr_window_esm[\"document\"].querySelector('html');\n      if (media === DARK) {\n        html.classList.add('theme-dark');\n        app.darkTheme = true;\n        app.emit('darkThemeChange', true);\n      } else if (media === LIGHT) {\n        html.classList.remove('theme-dark');\n        app.darkTheme = false;\n        app.emit('darkThemeChange', false);\n      }\n    };\n\n    // Init\n    if (app.params.init) {\n      if (device[\"default\"].cordova && app.params.initOnDeviceReady) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('deviceready', function () {\n          app.init();\n        });\n      } else {\n        app.init();\n      }\n    }\n\n    // Return app instance\n    return possibleConstructorReturn_default()(_this, app);\n  }\n  inherits_default()(Framework7, _Framework7Class);\n  return createClass_default()(Framework7, [{\n    key: \"initData\",\n    value: function initData() {\n      var app = this;\n\n      // Data\n      app.data = {};\n      if (app.params.data && typeof app.params.data === 'function') {\n        utils[\"default\"].extend(app.data, app.params.data.bind(app)());\n      } else if (app.params.data) {\n        utils[\"default\"].extend(app.data, app.params.data);\n      }\n      // Methods\n      app.methods = {};\n      if (app.params.methods) {\n        Object.keys(app.params.methods).forEach(function (methodName) {\n          if (typeof app.params.methods[methodName] === 'function') {\n            app.methods[methodName] = app.params.methods[methodName].bind(app);\n          } else {\n            app.methods[methodName] = app.params.methods[methodName];\n          }\n        });\n      }\n    }\n  }, {\n    key: \"enableAutoDarkTheme\",\n    value: function enableAutoDarkTheme() {\n      if (!ssr_window_esm[\"window\"].matchMedia) return;\n      var app = this;\n      var html = ssr_window_esm[\"document\"].querySelector('html');\n      if (app.mq.dark && app.mq.light) {\n        app.mq.dark.addListener(app.colorSchemeListener);\n        app.mq.light.addListener(app.colorSchemeListener);\n      }\n      if (app.mq.dark && app.mq.dark.matches) {\n        html.classList.add('theme-dark');\n        app.darkTheme = true;\n        app.emit('darkThemeChange', true);\n      } else if (app.mq.light && app.mq.light.matches) {\n        html.classList.remove('theme-dark');\n        app.darkTheme = false;\n        app.emit('darkThemeChange', false);\n      }\n    }\n  }, {\n    key: \"disableAutoDarkTheme\",\n    value: function disableAutoDarkTheme() {\n      if (!ssr_window_esm[\"window\"].matchMedia) return;\n      var app = this;\n      if (app.mq.dark) app.mq.dark.removeListener(app.colorSchemeListener);\n      if (app.mq.light) app.mq.light.removeListener(app.colorSchemeListener);\n    }\n  }, {\n    key: \"initAppComponent\",\n    value: function initAppComponent(callback) {\n      var app = this;\n      app.router.componentLoader(app.params.component, app.params.componentUrl, {\n        componentOptions: {\n          el: app.root[0],\n          root: true\n        }\n      }, function (el) {\n        app.root = Object(dom7_module[\"default\"])(el);\n        app.root[0].f7 = app;\n        app.rootComponent = el.f7Component;\n        if (callback) callback();\n      }, function () {});\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"_init\",\n    value: function _init() {\n      var app = this;\n      if (app.initialized) return app;\n      app.root.addClass('framework7-initializing');\n\n      // RTL attr\n      if (app.rtl) {\n        Object(dom7_module[\"default\"])('html').attr('dir', 'rtl');\n      }\n\n      // Auto Dark Theme\n      if (app.params.autoDarkTheme) {\n        app.enableAutoDarkTheme();\n      }\n\n      // Watch for online/offline state\n      ssr_window_esm[\"window\"].addEventListener('offline', function () {\n        app.online = false;\n        app.emit('offline');\n        app.emit('connection', false);\n      });\n      ssr_window_esm[\"window\"].addEventListener('online', function () {\n        app.online = true;\n        app.emit('online');\n        app.emit('connection', true);\n      });\n\n      // Root class\n      app.root.addClass('framework7-root');\n\n      // Theme class\n      Object(dom7_module[\"default\"])('html').removeClass('ios md aurora').addClass(app.theme);\n\n      // iOS Translucent\n      if (app.params.iosTranslucentBars && app.theme === 'ios' && device[\"default\"].ios) {\n        Object(dom7_module[\"default\"])('html').addClass('ios-translucent-bars');\n      }\n      if (app.params.iosTranslucentModals && app.theme === 'ios' && device[\"default\"].ios) {\n        Object(dom7_module[\"default\"])('html').addClass('ios-translucent-modals');\n      }\n\n      // Init class\n      utils[\"default\"].nextFrame(function () {\n        app.root.removeClass('framework7-initializing');\n      });\n      // Emit, init other modules\n      app.initialized = true;\n      app.emit('init');\n      return app;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var app = this;\n      if (app.params.component || app.params.componentUrl) {\n        app.initAppComponent(function () {\n          app._init(); // eslint-disable-line\n        });\n      } else {\n        app._init(); // eslint-disable-line\n      }\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"loadModule\",\n    value: function loadModule() {\n      return Framework7.loadModule.apply(Framework7, arguments);\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"loadModules\",\n    value: function loadModules() {\n      return Framework7.loadModules.apply(Framework7, arguments);\n    }\n  }, {\n    key: \"getVnodeHooks\",\n    value: function getVnodeHooks(hook, id) {\n      var app = this;\n      if (!app.vnodeHooks || !app.vnodeHooks[hook]) return [];\n      return app.vnodeHooks[hook][id] || [];\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"$\",\n    get: function get() {\n      return dom7_module[\"default\"];\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"t7\",\n    get: function get() {\n      return template7_esm[\"default\"];\n    }\n  }], [{\n    key: \"Dom7\",\n    get: function get() {\n      return dom7_module[\"default\"];\n    }\n  }, {\n    key: \"$\",\n    get: function get() {\n      return dom7_module[\"default\"];\n    }\n  }, {\n    key: \"Template7\",\n    get: function get() {\n      return template7_esm[\"default\"];\n    }\n  }, {\n    key: \"Class\",\n    get: function get() {\n      return utils_class;\n    }\n  }, {\n    key: \"Events\",\n    get: function get() {\n      return events_class;\n    }\n  }]);\n}(utils_class);\napp_class_Framework7.ModalMethods = modal_methods;\napp_class_Framework7.ConstructorMethods = constructor_methods;\napp_class_Framework7.loadModule = load_module;\napp_class_Framework7.loadModules = function loadModules(modules) {\n  return Promise.all(modules.map(function (module) {\n    return app_class_Framework7.loadModule(module);\n  }));\n};\n/* harmony default export */ var app_class = (app_class_Framework7);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/request.js\n\n\nvar globals = {};\nvar jsonpRequests = 0;\nfunction Request(requestOptions) {\n  var globalsNoCallbacks = utils[\"default\"].extend({}, globals);\n  'beforeCreate beforeOpen beforeSend error complete success statusCode'.split(' ').forEach(function (callbackName) {\n    delete globalsNoCallbacks[callbackName];\n  });\n  var defaults = utils[\"default\"].extend({\n    url: ssr_window_esm[\"window\"].location.toString(),\n    method: 'GET',\n    data: false,\n    async: true,\n    cache: true,\n    user: '',\n    password: '',\n    headers: {},\n    xhrFields: {},\n    statusCode: {},\n    processData: true,\n    dataType: 'text',\n    contentType: 'application/x-www-form-urlencoded',\n    timeout: 0\n  }, globalsNoCallbacks);\n  var options = utils[\"default\"].extend({}, defaults, requestOptions);\n  var proceedRequest;\n\n  // Function to run XHR callbacks and events\n  function fireCallback(callbackName) {\n    /*\n      Callbacks:\n      beforeCreate (options),\n      beforeOpen (xhr, options),\n      beforeSend (xhr, options),\n      error (xhr, status, message),\n      complete (xhr, status),\n      success (response, status, xhr),\n      statusCode ()\n    */\n    var globalCallbackValue;\n    var optionCallbackValue;\n    for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      data[_key - 1] = arguments[_key];\n    }\n    if (globals[callbackName]) {\n      globalCallbackValue = globals[callbackName].apply(globals, data);\n    }\n    if (options[callbackName]) {\n      optionCallbackValue = options[callbackName].apply(options, data);\n    }\n    if (typeof globalCallbackValue !== 'boolean') globalCallbackValue = true;\n    if (typeof optionCallbackValue !== 'boolean') optionCallbackValue = true;\n    return globalCallbackValue && optionCallbackValue;\n  }\n\n  // Before create callback\n  proceedRequest = fireCallback('beforeCreate', options);\n  if (proceedRequest === false) return undefined;\n\n  // For jQuery guys\n  if (options.type) options.method = options.type;\n\n  // Parameters Prefix\n  var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';\n\n  // UC method\n  var method = options.method.toUpperCase();\n\n  // Data to modify GET URL\n  if ((method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') && options.data) {\n    var stringData;\n    if (typeof options.data === 'string') {\n      // Should be key=value string\n      if (options.data.indexOf('?') >= 0) stringData = options.data.split('?')[1];else stringData = options.data;\n    } else {\n      // Should be key=value object\n      stringData = utils[\"default\"].serializeObject(options.data);\n    }\n    if (stringData.length) {\n      options.url += paramsPrefix + stringData;\n      if (paramsPrefix === '?') paramsPrefix = '&';\n    }\n  }\n\n  // JSONP\n  if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) {\n    var callbackName = \"f7jsonp_\".concat(Date.now() + (jsonpRequests += 1));\n    var abortTimeout;\n    var callbackSplit = options.url.split('callback=');\n    var requestUrl = \"\".concat(callbackSplit[0], \"callback=\").concat(callbackName);\n    if (callbackSplit[1].indexOf('&') >= 0) {\n      var addVars = callbackSplit[1].split('&').filter(function (el) {\n        return el.indexOf('=') > 0;\n      }).join('&');\n      if (addVars.length > 0) requestUrl += \"&\".concat(addVars);\n    }\n\n    // Create script\n    var script = ssr_window_esm[\"document\"].createElement('script');\n    script.type = 'text/javascript';\n    script.onerror = function onerror() {\n      clearTimeout(abortTimeout);\n      fireCallback('error', null, 'scripterror', 'scripterror');\n      fireCallback('complete', null, 'scripterror');\n    };\n    script.src = requestUrl;\n\n    // Handler\n    ssr_window_esm[\"window\"][callbackName] = function jsonpCallback(data) {\n      clearTimeout(abortTimeout);\n      fireCallback('success', data);\n      script.parentNode.removeChild(script);\n      script = null;\n      delete ssr_window_esm[\"window\"][callbackName];\n    };\n    ssr_window_esm[\"document\"].querySelector('head').appendChild(script);\n    if (options.timeout > 0) {\n      abortTimeout = setTimeout(function () {\n        script.parentNode.removeChild(script);\n        script = null;\n        fireCallback('error', null, 'timeout', 'timeout');\n      }, options.timeout);\n    }\n    return undefined;\n  }\n\n  // Cache for GET/HEAD requests\n  if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') {\n    if (options.cache === false) {\n      options.url += \"\".concat(paramsPrefix, \"_nocache\").concat(Date.now());\n    }\n  }\n\n  // Create XHR\n  var xhr = new XMLHttpRequest();\n\n  // Save Request URL\n  xhr.requestUrl = options.url;\n  xhr.requestParameters = options;\n\n  // Before open callback\n  proceedRequest = fireCallback('beforeOpen', xhr, options);\n  if (proceedRequest === false) return xhr;\n\n  // Open XHR\n  xhr.open(method, options.url, options.async, options.user, options.password);\n\n  // Create POST Data\n  var postData = null;\n  if ((method === 'POST' || method === 'PUT' || method === 'PATCH') && options.data) {\n    if (options.processData) {\n      var postDataInstances = [ArrayBuffer, Blob, Document, FormData];\n      // Post Data\n      if (postDataInstances.indexOf(options.data.constructor) >= 0) {\n        postData = options.data;\n      } else {\n        // POST Headers\n        var boundary = \"---------------------------\".concat(Date.now().toString(16));\n        if (options.contentType === 'multipart/form-data') {\n          xhr.setRequestHeader('Content-Type', \"multipart/form-data; boundary=\".concat(boundary));\n        } else {\n          xhr.setRequestHeader('Content-Type', options.contentType);\n        }\n        postData = '';\n        var data = utils[\"default\"].serializeObject(options.data);\n        if (options.contentType === 'multipart/form-data') {\n          data = data.split('&');\n          var newData = [];\n          for (var i = 0; i < data.length; i += 1) {\n            newData.push(\"Content-Disposition: form-data; name=\\\"\".concat(data[i].split('=')[0], \"\\\"\\r\\n\\r\\n\").concat(data[i].split('=')[1], \"\\r\\n\"));\n          }\n          postData = \"--\".concat(boundary, \"\\r\\n\").concat(newData.join(\"--\".concat(boundary, \"\\r\\n\")), \"--\").concat(boundary, \"--\\r\\n\");\n        } else if (options.contentType === 'application/json') {\n          postData = JSON.stringify(options.data);\n        } else {\n          postData = data;\n        }\n      }\n    } else {\n      postData = options.data;\n      xhr.setRequestHeader('Content-Type', options.contentType);\n    }\n  }\n  if (options.dataType === 'json' && (!options.headers || !options.headers.Accept)) {\n    xhr.setRequestHeader('Accept', 'application/json');\n  }\n\n  // Additional headers\n  if (options.headers) {\n    Object.keys(options.headers).forEach(function (headerName) {\n      if (typeof options.headers[headerName] === 'undefined') return;\n      xhr.setRequestHeader(headerName, options.headers[headerName]);\n    });\n  }\n\n  // Check for crossDomain\n  if (typeof options.crossDomain === 'undefined') {\n    // eslint-disable-next-line\n    options.crossDomain = /^([\\w-]+:)?\\/\\/([^\\/]+)/.test(options.url) && RegExp.$2 !== ssr_window_esm[\"window\"].location.host;\n  }\n  if (!options.crossDomain) {\n    xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n  }\n  if (options.xhrFields) {\n    utils[\"default\"].extend(xhr, options.xhrFields);\n  }\n\n  // Handle XHR\n  xhr.onload = function onload() {\n    if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 0) {\n      var responseData;\n      if (options.dataType === 'json') {\n        var parseError;\n        try {\n          responseData = JSON.parse(xhr.responseText);\n        } catch (err) {\n          parseError = true;\n        }\n        if (!parseError) {\n          fireCallback('success', responseData, xhr.status, xhr);\n        } else {\n          fireCallback('error', xhr, 'parseerror', 'parseerror');\n        }\n      } else {\n        responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response;\n        fireCallback('success', responseData, xhr.status, xhr);\n      }\n    } else {\n      fireCallback('error', xhr, xhr.status, xhr.statusText);\n    }\n    if (options.statusCode) {\n      if (globals.statusCode && globals.statusCode[xhr.status]) globals.statusCode[xhr.status](xhr);\n      if (options.statusCode[xhr.status]) options.statusCode[xhr.status](xhr);\n    }\n    fireCallback('complete', xhr, xhr.status);\n  };\n  xhr.onerror = function onerror() {\n    fireCallback('error', xhr, xhr.status, xhr.status);\n    fireCallback('complete', xhr, 'error');\n  };\n\n  // Timeout\n  if (options.timeout > 0) {\n    xhr.timeout = options.timeout;\n    xhr.ontimeout = function () {\n      fireCallback('error', xhr, 'timeout', 'timeout');\n      fireCallback('complete', xhr, 'timeout');\n    };\n  }\n\n  // Ajax start callback\n  proceedRequest = fireCallback('beforeSend', xhr, options);\n  if (proceedRequest === false) return xhr;\n\n  // Send XHR\n  xhr.send(postData);\n\n  // Return XHR object\n  return xhr;\n}\nfunction RequestShortcut(method) {\n  var _ref = [],\n    url = _ref[0],\n    data = _ref[1],\n    success = _ref[2],\n    error = _ref[3],\n    dataType = _ref[4];\n  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    args[_key2 - 1] = arguments[_key2];\n  }\n  if (typeof args[1] === 'function') {\n    url = args[0];\n    success = args[1];\n    error = args[2];\n    dataType = args[3];\n  } else {\n    url = args[0];\n    data = args[1];\n    success = args[2];\n    error = args[3];\n    dataType = args[4];\n  }\n  [success, error].forEach(function (callback) {\n    if (typeof callback === 'string') {\n      dataType = callback;\n      if (callback === success) success = undefined;else error = undefined;\n    }\n  });\n  dataType = dataType || (method === 'json' || method === 'postJSON' ? 'json' : undefined);\n  var requestOptions = {\n    url: url,\n    method: method === 'post' || method === 'postJSON' ? 'POST' : 'GET',\n    data: data,\n    success: success,\n    error: error,\n    dataType: dataType\n  };\n  if (method === 'postJSON') {\n    utils[\"default\"].extend(requestOptions, {\n      contentType: 'application/json',\n      processData: false,\n      crossDomain: true,\n      data: typeof data === 'string' ? data : JSON.stringify(data)\n    });\n  }\n  return Request(requestOptions);\n}\nfunction RequestShortcutPromise(method) {\n  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n    args[_key3 - 1] = arguments[_key3];\n  }\n  var url = args[0],\n    data = args[1],\n    dataType = args[2];\n  return new Promise(function (resolve, reject) {\n    RequestShortcut(method, url, data, function (responseData, status, xhr) {\n      resolve({\n        data: responseData,\n        status: status,\n        xhr: xhr\n      });\n    }, function (xhr, status, message) {\n      // eslint-disable-next-line\n      reject({\n        xhr: xhr,\n        status: status,\n        message: message\n      });\n    }, dataType);\n  });\n}\nObject.assign(Request, {\n  get: function get() {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n    return RequestShortcut.apply(void 0, ['get'].concat(args));\n  },\n  post: function post() {\n    for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n      args[_key5] = arguments[_key5];\n    }\n    return RequestShortcut.apply(void 0, ['post'].concat(args));\n  },\n  json: function json() {\n    for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n      args[_key6] = arguments[_key6];\n    }\n    return RequestShortcut.apply(void 0, ['json'].concat(args));\n  },\n  getJSON: function getJSON() {\n    for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n      args[_key7] = arguments[_key7];\n    }\n    return RequestShortcut.apply(void 0, ['json'].concat(args));\n  },\n  postJSON: function postJSON() {\n    for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n      args[_key8] = arguments[_key8];\n    }\n    return RequestShortcut.apply(void 0, ['postJSON'].concat(args));\n  }\n});\nRequest.promise = function requestPromise(requestOptions) {\n  return new Promise(function (resolve, reject) {\n    Request(Object.assign(requestOptions, {\n      success: function success(data, status, xhr) {\n        resolve({\n          data: data,\n          status: status,\n          xhr: xhr\n        });\n      },\n      error: function error(xhr, status, message) {\n        // eslint-disable-next-line\n        reject({\n          xhr: xhr,\n          status: status,\n          message: message\n        });\n      }\n    }));\n  });\n};\nObject.assign(Request.promise, {\n  get: function get() {\n    for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n      args[_key9] = arguments[_key9];\n    }\n    return RequestShortcutPromise.apply(void 0, ['get'].concat(args));\n  },\n  post: function post() {\n    for (var _len0 = arguments.length, args = new Array(_len0), _key0 = 0; _key0 < _len0; _key0++) {\n      args[_key0] = arguments[_key0];\n    }\n    return RequestShortcutPromise.apply(void 0, ['post'].concat(args));\n  },\n  json: function json() {\n    for (var _len1 = arguments.length, args = new Array(_len1), _key1 = 0; _key1 < _len1; _key1++) {\n      args[_key1] = arguments[_key1];\n    }\n    return RequestShortcutPromise.apply(void 0, ['json'].concat(args));\n  },\n  getJSON: function getJSON() {\n    for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n      args[_key10] = arguments[_key10];\n    }\n    return RequestShortcutPromise.apply(void 0, ['json'].concat(args));\n  },\n  postJSON: function postJSON() {\n    for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\n      args[_key11] = arguments[_key11];\n    }\n    return RequestShortcutPromise.apply(void 0, ['postJSON'].concat(args));\n  }\n});\nRequest.setup = function setup(options) {\n  if (options.type && !options.method) {\n    utils[\"default\"].extend(options, {\n      method: options.type\n    });\n  }\n  utils[\"default\"].extend(globals, options);\n};\n/* harmony default export */ var utils_request = (Request);\n// EXTERNAL MODULE: ./node_modules/framework7-v575/utils/support.js\nvar utils_support = __webpack_require__(\"./node_modules/framework7-v575/utils/support.js\");\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/device/device.js\n\n\n/* harmony default export */ var device_device = ({\n  name: 'device',\n  proto: {\n    device: device[\"default\"]\n  },\n  static: {\n    device: device[\"default\"]\n  },\n  on: {\n    init: function init() {\n      var classNames = [];\n      var html = ssr_window_esm[\"document\"].querySelector('html');\n      var metaStatusbar = ssr_window_esm[\"document\"].querySelector('meta[name=\"apple-mobile-web-app-status-bar-style\"]');\n      if (!html) return;\n      if (device[\"default\"].standalone && device[\"default\"].ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {\n        classNames.push('device-full-viewport');\n      }\n\n      // Pixel Ratio\n      classNames.push(\"device-pixel-ratio-\".concat(Math.floor(device[\"default\"].pixelRatio)));\n      // OS classes\n      if (device[\"default\"].os && !device[\"default\"].desktop) {\n        classNames.push(\"device-\".concat(device[\"default\"].os));\n      } else if (device[\"default\"].desktop) {\n        classNames.push('device-desktop');\n        if (device[\"default\"].os) {\n          classNames.push(\"device-\".concat(device[\"default\"].os));\n        }\n      }\n      if (device[\"default\"].cordova || device[\"default\"].phonegap) {\n        classNames.push('device-cordova');\n      }\n\n      // Add html classes\n      classNames.forEach(function (className) {\n        html.classList.add(className);\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/support/support.js\n\n/* harmony default export */ var support_support = ({\n  name: 'support',\n  proto: {\n    support: utils_support[\"default\"]\n  },\n  static: {\n    support: utils_support[\"default\"]\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/utils/utils.js\n\n/* harmony default export */ var utils_utils = ({\n  name: 'utils',\n  proto: {\n    utils: utils[\"default\"]\n  },\n  static: {\n    utils: utils[\"default\"]\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/resize/resize.js\n\n/* harmony default export */ var resize_resize = ({\n  name: 'resize',\n  instance: {\n    getSize: function getSize() {\n      var app = this;\n      if (!app.root[0]) return {\n        width: 0,\n        height: 0,\n        left: 0,\n        top: 0\n      };\n      var offset = app.root.offset();\n      var _ref = [app.root[0].offsetWidth, app.root[0].offsetHeight, offset.left, offset.top],\n        width = _ref[0],\n        height = _ref[1],\n        left = _ref[2],\n        top = _ref[3];\n      app.width = width;\n      app.height = height;\n      app.left = left;\n      app.top = top;\n      return {\n        width: width,\n        height: height,\n        left: left,\n        top: top\n      };\n    }\n  },\n  on: {\n    init: function init() {\n      var app = this;\n\n      // Get Size\n      app.getSize();\n\n      // Emit resize\n      ssr_window_esm[\"window\"].addEventListener('resize', function () {\n        app.emit('resize');\n      }, false);\n\n      // Emit orientationchange\n      ssr_window_esm[\"window\"].addEventListener('orientationchange', function () {\n        app.emit('orientationchange');\n      });\n    },\n    orientationchange: function orientationchange() {\n      var app = this;\n      // Fix iPad weird body scroll\n      if (app.device.ipad) {\n        ssr_window_esm[\"document\"].body.scrollLeft = 0;\n        setTimeout(function () {\n          ssr_window_esm[\"document\"].body.scrollLeft = 0;\n        }, 0);\n      }\n    },\n    resize: function resize() {\n      var app = this;\n      app.getSize();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/request/request.js\n/* eslint no-param-reassign: \"off\" */\n\n/* harmony default export */ var request_request = ({\n  name: 'request',\n  proto: {\n    request: utils_request\n  },\n  static: {\n    request: utils_request\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/touch/touch.js\n/* eslint-disable no-nested-ternary */\n\n\n\n\nfunction initTouch() {\n  var app = this;\n  var params = app.params.touch;\n  var useRipple = params[\"\".concat(app.theme, \"TouchRipple\")];\n  if (device[\"default\"].ios && device[\"default\"].webView) {\n    // Strange hack required for iOS 8 webview to work on inputs\n    ssr_window_esm[\"window\"].addEventListener('touchstart', function () {});\n  }\n  var touchStartX;\n  var touchStartY;\n  var targetElement;\n  var isMoved;\n  var tapHoldFired;\n  var tapHoldTimeout;\n  var preventClick;\n  var activableElement;\n  var activeTimeout;\n  var rippleWave;\n  var rippleTarget;\n  var rippleTimeout;\n  function findActivableElement(el) {\n    var target = Object(dom7_module[\"default\"])(el);\n    var parents = target.parents(params.activeStateElements);\n    if (target.closest('.no-active-state').length) {\n      return null;\n    }\n    var activable;\n    if (target.is(params.activeStateElements)) {\n      activable = target;\n    }\n    if (parents.length > 0) {\n      activable = activable ? activable.add(parents) : parents;\n    }\n    if (activable && activable.length > 1) {\n      var newActivable = [];\n      var preventPropagation;\n      for (var i = 0; i < activable.length; i += 1) {\n        if (!preventPropagation) {\n          newActivable.push(activable[i]);\n          if (activable.eq(i).hasClass('prevent-active-state-propagation') || activable.eq(i).hasClass('no-active-state-propagation')) {\n            preventPropagation = true;\n          }\n        }\n      }\n      activable = Object(dom7_module[\"default\"])(newActivable);\n    }\n    return activable || target;\n  }\n  function isInsideScrollableView(el) {\n    var pageContent = el.parents('.page-content');\n    return pageContent.length > 0;\n  }\n  function addActive() {\n    if (!activableElement) return;\n    activableElement.addClass('active-state');\n  }\n  function removeActive() {\n    if (!activableElement) return;\n    activableElement.removeClass('active-state');\n    activableElement = null;\n  }\n\n  // Ripple handlers\n  function findRippleElement(el) {\n    var rippleElements = params.touchRippleElements;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.is(rippleElements)) {\n      if ($el.hasClass('no-ripple')) {\n        return false;\n      }\n      return $el;\n    }\n    if ($el.parents(rippleElements).length > 0) {\n      var rippleParent = $el.parents(rippleElements).eq(0);\n      if (rippleParent.hasClass('no-ripple')) {\n        return false;\n      }\n      return rippleParent;\n    }\n    return false;\n  }\n  function createRipple($el, x, y) {\n    if (!$el) return;\n    rippleWave = app.touchRipple.create($el, x, y);\n  }\n  function removeRipple() {\n    if (!rippleWave) return;\n    rippleWave.remove();\n    rippleWave = undefined;\n    rippleTarget = undefined;\n  }\n  function rippleTouchStart(el) {\n    rippleTarget = findRippleElement(el);\n    if (!rippleTarget || rippleTarget.length === 0) {\n      rippleTarget = undefined;\n      return;\n    }\n    var inScrollable = isInsideScrollableView(rippleTarget);\n    if (!inScrollable) {\n      removeRipple();\n      createRipple(rippleTarget, touchStartX, touchStartY);\n    } else {\n      clearTimeout(rippleTimeout);\n      rippleTimeout = setTimeout(function () {\n        removeRipple();\n        createRipple(rippleTarget, touchStartX, touchStartY);\n      }, 80);\n    }\n  }\n  function rippleTouchMove() {\n    clearTimeout(rippleTimeout);\n    removeRipple();\n  }\n  function rippleTouchEnd() {\n    if (!rippleWave && rippleTarget && !isMoved) {\n      clearTimeout(rippleTimeout);\n      createRipple(rippleTarget, touchStartX, touchStartY);\n      setTimeout(removeRipple, 0);\n    } else {\n      removeRipple();\n    }\n  }\n\n  // Mouse Handlers\n  function handleMouseDown(e) {\n    var $activableEl = findActivableElement(e.target);\n    if ($activableEl) {\n      $activableEl.addClass('active-state');\n      if ('which' in e && e.which === 3) {\n        setTimeout(function () {\n          Object(dom7_module[\"default\"])('.active-state').removeClass('active-state');\n        }, 0);\n      }\n    }\n    if (useRipple) {\n      touchStartX = e.pageX;\n      touchStartY = e.pageY;\n      rippleTouchStart(e.target, e.pageX, e.pageY);\n    }\n  }\n  function handleMouseMove() {\n    if (!params.activeStateOnMouseMove) {\n      Object(dom7_module[\"default\"])('.active-state').removeClass('active-state');\n    }\n    if (useRipple) {\n      rippleTouchMove();\n    }\n  }\n  function handleMouseUp() {\n    Object(dom7_module[\"default\"])('.active-state').removeClass('active-state');\n    if (useRipple) {\n      rippleTouchEnd();\n    }\n  }\n  function handleTouchCancel() {\n    targetElement = null;\n\n    // Remove Active State\n    clearTimeout(activeTimeout);\n    clearTimeout(tapHoldTimeout);\n    if (params.activeState) {\n      removeActive();\n    }\n\n    // Remove Ripple\n    if (useRipple) {\n      rippleTouchEnd();\n    }\n  }\n  function handleTouchStart(e) {\n    isMoved = false;\n    tapHoldFired = false;\n    preventClick = false;\n    if (e.targetTouches.length > 1) {\n      if (activableElement) removeActive();\n      return true;\n    }\n    if (e.touches.length > 1 && activableElement) {\n      removeActive();\n    }\n    if (params.tapHold) {\n      if (tapHoldTimeout) clearTimeout(tapHoldTimeout);\n      tapHoldTimeout = setTimeout(function () {\n        if (e && e.touches && e.touches.length > 1) return;\n        tapHoldFired = true;\n        e.preventDefault();\n        preventClick = true;\n        Object(dom7_module[\"default\"])(e.target).trigger('taphold', e);\n        app.emit('taphold', e);\n      }, params.tapHoldDelay);\n    }\n    targetElement = e.target;\n    touchStartX = e.targetTouches[0].pageX;\n    touchStartY = e.targetTouches[0].pageY;\n    if (params.activeState) {\n      activableElement = findActivableElement(targetElement);\n      if (activableElement && !isInsideScrollableView(activableElement)) {\n        addActive();\n      } else if (activableElement) {\n        activeTimeout = setTimeout(addActive, 80);\n      }\n    }\n    if (useRipple) {\n      rippleTouchStart(targetElement, touchStartX, touchStartY);\n    }\n    return true;\n  }\n  function handleTouchMove(e) {\n    var touch;\n    var distance;\n    if (e.type === 'touchmove') {\n      touch = e.targetTouches[0];\n      distance = params.touchClicksDistanceThreshold;\n    }\n    if (distance && touch) {\n      var pageX = touch.pageX;\n      var pageY = touch.pageY;\n      if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) {\n        isMoved = true;\n      }\n    } else {\n      isMoved = true;\n    }\n    if (isMoved) {\n      preventClick = true;\n      if (params.tapHold) {\n        clearTimeout(tapHoldTimeout);\n      }\n      if (params.activeState) {\n        clearTimeout(activeTimeout);\n        removeActive();\n      }\n      if (useRipple) {\n        rippleTouchMove();\n      }\n    }\n  }\n  function handleTouchEnd(e) {\n    clearTimeout(activeTimeout);\n    clearTimeout(tapHoldTimeout);\n    if (ssr_window_esm[\"document\"].activeElement === e.target) {\n      if (params.activeState) removeActive();\n      if (useRipple) {\n        rippleTouchEnd();\n      }\n      return true;\n    }\n    if (params.activeState) {\n      addActive();\n      setTimeout(removeActive, 0);\n    }\n    if (useRipple) {\n      rippleTouchEnd();\n    }\n    if (params.tapHoldPreventClicks && tapHoldFired || preventClick) {\n      if (e.cancelable) e.preventDefault();\n      preventClick = true;\n      return false;\n    }\n    return true;\n  }\n  function handleClick(e) {\n    var isOverswipe = e && e.detail && e.detail === 'f7Overswipe';\n    var localPreventClick = preventClick;\n    if (targetElement && e.target !== targetElement) {\n      if (isOverswipe) {\n        localPreventClick = false;\n      } else {\n        localPreventClick = true;\n      }\n    }\n    if (params.tapHold && params.tapHoldPreventClicks && tapHoldFired) {\n      localPreventClick = true;\n    }\n    if (localPreventClick) {\n      e.stopImmediatePropagation();\n      e.stopPropagation();\n      e.preventDefault();\n    }\n    if (params.tapHold) {\n      tapHoldTimeout = setTimeout(function () {\n        tapHoldFired = false;\n      }, device[\"default\"].ios || device[\"default\"].androidChrome ? 100 : 400);\n    }\n    preventClick = false;\n    targetElement = null;\n    return !localPreventClick;\n  }\n  function emitAppTouchEvent(name, e) {\n    app.emit({\n      events: name,\n      data: [e]\n    });\n  }\n  function appClick(e) {\n    emitAppTouchEvent('click', e);\n  }\n  function appTouchStartActive(e) {\n    emitAppTouchEvent('touchstart touchstart:active', e);\n  }\n  function appTouchMoveActive(e) {\n    emitAppTouchEvent('touchmove touchmove:active', e);\n  }\n  function appTouchEndActive(e) {\n    emitAppTouchEvent('touchend touchend:active', e);\n  }\n  function appTouchStartPassive(e) {\n    emitAppTouchEvent('touchstart:passive', e);\n  }\n  function appTouchMovePassive(e) {\n    emitAppTouchEvent('touchmove:passive', e);\n  }\n  function appTouchEndPassive(e) {\n    emitAppTouchEvent('touchend:passive', e);\n  }\n  function appGestureActive(e) {\n    emitAppTouchEvent(\"\".concat(e.type, \" \").concat(e.type, \":active\"), e);\n  }\n  function appGesturePassive(e) {\n    emitAppTouchEvent(\"\".concat(e.type, \":passive\"), e);\n  }\n  var passiveListener = utils_support[\"default\"].passiveListener ? {\n    passive: true\n  } : false;\n  var passiveListenerCapture = utils_support[\"default\"].passiveListener ? {\n    passive: true,\n    capture: true\n  } : true;\n  var activeListener = utils_support[\"default\"].passiveListener ? {\n    passive: false\n  } : false;\n  var activeListenerCapture = utils_support[\"default\"].passiveListener ? {\n    passive: false,\n    capture: true\n  } : true;\n  ssr_window_esm[\"document\"].addEventListener('click', appClick, true);\n  if (utils_support[\"default\"].passiveListener) {\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.start, appTouchStartActive, activeListenerCapture);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.move, appTouchMoveActive, activeListener);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.end, appTouchEndActive, activeListener);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.start, appTouchStartPassive, passiveListenerCapture);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.move, appTouchMovePassive, passiveListener);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.end, appTouchEndPassive, passiveListener);\n    if (utils_support[\"default\"].touch && utils_support[\"default\"].gestures) {\n      ssr_window_esm[\"document\"].addEventListener('gesturestart', appGestureActive, activeListener);\n      ssr_window_esm[\"document\"].addEventListener('gesturechange', appGestureActive, activeListener);\n      ssr_window_esm[\"document\"].addEventListener('gestureend', appGestureActive, activeListener);\n      ssr_window_esm[\"document\"].addEventListener('gesturestart', appGesturePassive, passiveListener);\n      ssr_window_esm[\"document\"].addEventListener('gesturechange', appGesturePassive, passiveListener);\n      ssr_window_esm[\"document\"].addEventListener('gestureend', appGesturePassive, passiveListener);\n    }\n  } else {\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.start, function (e) {\n      appTouchStartActive(e);\n      appTouchStartPassive(e);\n    }, true);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.move, function (e) {\n      appTouchMoveActive(e);\n      appTouchMovePassive(e);\n    }, false);\n    ssr_window_esm[\"document\"].addEventListener(app.touchEvents.end, function (e) {\n      appTouchEndActive(e);\n      appTouchEndPassive(e);\n    }, false);\n    if (utils_support[\"default\"].touch && utils_support[\"default\"].gestures) {\n      ssr_window_esm[\"document\"].addEventListener('gesturestart', function (e) {\n        appGestureActive(e);\n        appGesturePassive(e);\n      }, false);\n      ssr_window_esm[\"document\"].addEventListener('gesturechange', function (e) {\n        appGestureActive(e);\n        appGesturePassive(e);\n      }, false);\n      ssr_window_esm[\"document\"].addEventListener('gestureend', function (e) {\n        appGestureActive(e);\n        appGesturePassive(e);\n      }, false);\n    }\n  }\n  if (utils_support[\"default\"].touch) {\n    app.on('click', handleClick);\n    app.on('touchstart', handleTouchStart);\n    app.on('touchmove', handleTouchMove);\n    app.on('touchend', handleTouchEnd);\n    ssr_window_esm[\"document\"].addEventListener('touchcancel', handleTouchCancel, {\n      passive: true\n    });\n  } else if (params.activeState) {\n    app.on('touchstart', handleMouseDown);\n    app.on('touchmove', handleMouseMove);\n    app.on('touchend', handleMouseUp);\n    ssr_window_esm[\"document\"].addEventListener('pointercancel', handleMouseUp, {\n      passive: true\n    });\n  }\n  ssr_window_esm[\"document\"].addEventListener('contextmenu', function (e) {\n    if (params.disableContextMenu && (device[\"default\"].ios || device[\"default\"].android || device[\"default\"].cordova)) {\n      e.preventDefault();\n    }\n    if (useRipple) {\n      if (activableElement) removeActive();\n      rippleTouchEnd();\n    }\n  });\n}\n/* harmony default export */ var touch_touch = ({\n  name: 'touch',\n  params: {\n    touch: {\n      // Clicks\n      touchClicksDistanceThreshold: 5,\n      // ContextMenu\n      disableContextMenu: false,\n      // Tap Hold\n      tapHold: false,\n      tapHoldDelay: 750,\n      tapHoldPreventClicks: true,\n      // Active State\n      activeState: true,\n      activeStateElements: 'a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .menu-item, .link, .item-link, .accordion-item-toggle',\n      activeStateOnMouseMove: false,\n      mdTouchRipple: true,\n      iosTouchRipple: false,\n      auroraTouchRipple: false,\n      touchRippleElements: '.ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content, .list.accordion-list .accordion-item-toggle'\n    }\n  },\n  instance: {\n    touchEvents: {\n      start: utils_support[\"default\"].touch ? 'touchstart' : utils_support[\"default\"].pointerEvents ? 'pointerdown' : 'mousedown',\n      move: utils_support[\"default\"].touch ? 'touchmove' : utils_support[\"default\"].pointerEvents ? 'pointermove' : 'mousemove',\n      end: utils_support[\"default\"].touch ? 'touchend' : utils_support[\"default\"].pointerEvents ? 'pointerup' : 'mouseup'\n    }\n  },\n  on: {\n    init: initTouch\n  }\n});\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js\nvar helpers_typeof = __webpack_require__(\"./node_modules/@babel/runtime/helpers/typeof.js\");\nvar typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/node_modules/path-to-regexp/dist.es2015/index.js\n\n/**\n * Tokenize input string.\n */\nfunction lexer(str) {\n  var tokens = [];\n  var i = 0;\n  while (i < str.length) {\n    var char = str[i];\n    if (char === \"*\" || char === \"+\" || char === \"?\") {\n      tokens.push({\n        type: \"MODIFIER\",\n        index: i,\n        value: str[i++]\n      });\n      continue;\n    }\n    if (char === \"\\\\\") {\n      tokens.push({\n        type: \"ESCAPED_CHAR\",\n        index: i++,\n        value: str[i++]\n      });\n      continue;\n    }\n    if (char === \"{\") {\n      tokens.push({\n        type: \"OPEN\",\n        index: i,\n        value: str[i++]\n      });\n      continue;\n    }\n    if (char === \"}\") {\n      tokens.push({\n        type: \"CLOSE\",\n        index: i,\n        value: str[i++]\n      });\n      continue;\n    }\n    if (char === \":\") {\n      var name = \"\";\n      var j = i + 1;\n      while (j < str.length) {\n        var code = str.charCodeAt(j);\n        if (\n        // `0-9`\n        code >= 48 && code <= 57 ||\n        // `A-Z`\n        code >= 65 && code <= 90 ||\n        // `a-z`\n        code >= 97 && code <= 122 ||\n        // `_`\n        code === 95) {\n          name += str[j++];\n          continue;\n        }\n        break;\n      }\n      if (!name) throw new TypeError(\"Missing parameter name at \".concat(i));\n      tokens.push({\n        type: \"NAME\",\n        index: i,\n        value: name\n      });\n      i = j;\n      continue;\n    }\n    if (char === \"(\") {\n      var count = 1;\n      var pattern = \"\";\n      var j = i + 1;\n      if (str[j] === \"?\") {\n        throw new TypeError(\"Pattern cannot start with \\\"?\\\" at \".concat(j));\n      }\n      while (j < str.length) {\n        if (str[j] === \"\\\\\") {\n          pattern += str[j++] + str[j++];\n          continue;\n        }\n        if (str[j] === \")\") {\n          count--;\n          if (count === 0) {\n            j++;\n            break;\n          }\n        } else if (str[j] === \"(\") {\n          count++;\n          if (str[j + 1] !== \"?\") {\n            throw new TypeError(\"Capturing groups are not allowed at \".concat(j));\n          }\n        }\n        pattern += str[j++];\n      }\n      if (count) throw new TypeError(\"Unbalanced pattern at \".concat(i));\n      if (!pattern) throw new TypeError(\"Missing pattern at \".concat(i));\n      tokens.push({\n        type: \"PATTERN\",\n        index: i,\n        value: pattern\n      });\n      i = j;\n      continue;\n    }\n    tokens.push({\n      type: \"CHAR\",\n      index: i,\n      value: str[i++]\n    });\n  }\n  tokens.push({\n    type: \"END\",\n    index: i,\n    value: \"\"\n  });\n  return tokens;\n}\n/**\n * Parse a string for the raw tokens.\n */\nfunction dist_es2015_parse(str, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var tokens = lexer(str);\n  var _a = options.prefixes,\n    prefixes = _a === void 0 ? \"./\" : _a,\n    _b = options.delimiter,\n    delimiter = _b === void 0 ? \"/#?\" : _b;\n  var result = [];\n  var key = 0;\n  var i = 0;\n  var path = \"\";\n  var tryConsume = function tryConsume(type) {\n    if (i < tokens.length && tokens[i].type === type) return tokens[i++].value;\n  };\n  var mustConsume = function mustConsume(type) {\n    var value = tryConsume(type);\n    if (value !== undefined) return value;\n    var _a = tokens[i],\n      nextType = _a.type,\n      index = _a.index;\n    throw new TypeError(\"Unexpected \".concat(nextType, \" at \").concat(index, \", expected \").concat(type));\n  };\n  var consumeText = function consumeText() {\n    var result = \"\";\n    var value;\n    while (value = tryConsume(\"CHAR\") || tryConsume(\"ESCAPED_CHAR\")) {\n      result += value;\n    }\n    return result;\n  };\n  var isSafe = function isSafe(value) {\n    for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {\n      var char = delimiter_1[_i];\n      if (value.indexOf(char) > -1) return true;\n    }\n    return false;\n  };\n  var safePattern = function safePattern(prefix) {\n    var prev = result[result.length - 1];\n    var prevText = prefix || (prev && typeof prev === \"string\" ? prev : \"\");\n    if (prev && !prevText) {\n      throw new TypeError(\"Must have text between two parameters, missing text after \\\"\".concat(prev.name, \"\\\"\"));\n    }\n    if (!prevText || isSafe(prevText)) return \"[^\".concat(escapeString(delimiter), \"]+?\");\n    return \"(?:(?!\".concat(escapeString(prevText), \")[^\").concat(escapeString(delimiter), \"])+?\");\n  };\n  while (i < tokens.length) {\n    var char = tryConsume(\"CHAR\");\n    var name = tryConsume(\"NAME\");\n    var pattern = tryConsume(\"PATTERN\");\n    if (name || pattern) {\n      var prefix = char || \"\";\n      if (prefixes.indexOf(prefix) === -1) {\n        path += prefix;\n        prefix = \"\";\n      }\n      if (path) {\n        result.push(path);\n        path = \"\";\n      }\n      result.push({\n        name: name || key++,\n        prefix: prefix,\n        suffix: \"\",\n        pattern: pattern || safePattern(prefix),\n        modifier: tryConsume(\"MODIFIER\") || \"\"\n      });\n      continue;\n    }\n    var value = char || tryConsume(\"ESCAPED_CHAR\");\n    if (value) {\n      path += value;\n      continue;\n    }\n    if (path) {\n      result.push(path);\n      path = \"\";\n    }\n    var open = tryConsume(\"OPEN\");\n    if (open) {\n      var prefix = consumeText();\n      var name_1 = tryConsume(\"NAME\") || \"\";\n      var pattern_1 = tryConsume(\"PATTERN\") || \"\";\n      var suffix = consumeText();\n      mustConsume(\"CLOSE\");\n      result.push({\n        name: name_1 || (pattern_1 ? key++ : \"\"),\n        pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,\n        prefix: prefix,\n        suffix: suffix,\n        modifier: tryConsume(\"MODIFIER\") || \"\"\n      });\n      continue;\n    }\n    mustConsume(\"END\");\n  }\n  return result;\n}\n/**\n * Compile a string to a template function for the path.\n */\nfunction dist_es2015_compile(str, options) {\n  return tokensToFunction(dist_es2015_parse(str, options), options);\n}\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction(tokens, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var reFlags = flags(options);\n  var _a = options.encode,\n    encode = _a === void 0 ? function (x) {\n      return x;\n    } : _a,\n    _b = options.validate,\n    validate = _b === void 0 ? true : _b;\n  // Compile all the tokens into regexps.\n  var matches = tokens.map(function (token) {\n    if (typeof_default()(token) === \"object\") {\n      return new RegExp(\"^(?:\".concat(token.pattern, \")$\"), reFlags);\n    }\n  });\n  return function (data) {\n    var path = \"\";\n    for (var i = 0; i < tokens.length; i++) {\n      var token = tokens[i];\n      if (typeof token === \"string\") {\n        path += token;\n        continue;\n      }\n      var value = data ? data[token.name] : undefined;\n      var optional = token.modifier === \"?\" || token.modifier === \"*\";\n      var repeat = token.modifier === \"*\" || token.modifier === \"+\";\n      if (Array.isArray(value)) {\n        if (!repeat) {\n          throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to not repeat, but got an array\"));\n        }\n        if (value.length === 0) {\n          if (optional) continue;\n          throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to not be empty\"));\n        }\n        for (var j = 0; j < value.length; j++) {\n          var segment = encode(value[j], token);\n          if (validate && !matches[i].test(segment)) {\n            throw new TypeError(\"Expected all \\\"\".concat(token.name, \"\\\" to match \\\"\").concat(token.pattern, \"\\\", but got \\\"\").concat(segment, \"\\\"\"));\n          }\n          path += token.prefix + segment + token.suffix;\n        }\n        continue;\n      }\n      if (typeof value === \"string\" || typeof value === \"number\") {\n        var segment = encode(String(value), token);\n        if (validate && !matches[i].test(segment)) {\n          throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to match \\\"\").concat(token.pattern, \"\\\", but got \\\"\").concat(segment, \"\\\"\"));\n        }\n        path += token.prefix + segment + token.suffix;\n        continue;\n      }\n      if (optional) continue;\n      var typeOfMessage = repeat ? \"an array\" : \"a string\";\n      throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to be \").concat(typeOfMessage));\n    }\n    return path;\n  };\n}\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match(str, options) {\n  var keys = [];\n  var re = pathToRegexp(str, keys, options);\n  return regexpToFunction(re, keys, options);\n}\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction(re, keys, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var _a = options.decode,\n    decode = _a === void 0 ? function (x) {\n      return x;\n    } : _a;\n  return function (pathname) {\n    var m = re.exec(pathname);\n    if (!m) return false;\n    var path = m[0],\n      index = m.index;\n    var params = Object.create(null);\n    var _loop_1 = function _loop_1(i) {\n      if (m[i] === undefined) return \"continue\";\n      var key = keys[i - 1];\n      if (key.modifier === \"*\" || key.modifier === \"+\") {\n        params[key.name] = m[i].split(key.prefix + key.suffix).map(function (value) {\n          return decode(value, key);\n        });\n      } else {\n        params[key.name] = decode(m[i], key);\n      }\n    };\n    for (var i = 1; i < m.length; i++) {\n      _loop_1(i);\n    }\n    return {\n      path: path,\n      index: index,\n      params: params\n    };\n  };\n}\n/**\n * Escape a regular expression string.\n */\nfunction escapeString(str) {\n  return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n}\n/**\n * Get the flags for a regexp from the options.\n */\nfunction flags(options) {\n  return options && options.sensitive ? \"\" : \"i\";\n}\n/**\n * Pull out keys from a regexp.\n */\nfunction regexpToRegexp(path, keys) {\n  if (!keys) return path;\n  var groupsRegex = /\\((?:\\?<(.*?)>)?(?!\\?)/g;\n  var index = 0;\n  var execResult = groupsRegex.exec(path.source);\n  while (execResult) {\n    keys.push({\n      // Use parenthesized substring match if available, index otherwise\n      name: execResult[1] || index++,\n      prefix: \"\",\n      suffix: \"\",\n      modifier: \"\",\n      pattern: \"\"\n    });\n    execResult = groupsRegex.exec(path.source);\n  }\n  return path;\n}\n/**\n * Transform an array into a regexp.\n */\nfunction arrayToRegexp(paths, keys, options) {\n  var parts = paths.map(function (path) {\n    return pathToRegexp(path, keys, options).source;\n  });\n  return new RegExp(\"(?:\".concat(parts.join(\"|\"), \")\"), flags(options));\n}\n/**\n * Create a path regexp from string input.\n */\nfunction stringToRegexp(path, keys, options) {\n  return tokensToRegexp(dist_es2015_parse(path, options), keys, options);\n}\n/**\n * Expose a function for taking tokens and returning a RegExp.\n */\nfunction tokensToRegexp(tokens, keys, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var _a = options.strict,\n    strict = _a === void 0 ? false : _a,\n    _b = options.start,\n    start = _b === void 0 ? true : _b,\n    _c = options.end,\n    end = _c === void 0 ? true : _c,\n    _d = options.encode,\n    encode = _d === void 0 ? function (x) {\n      return x;\n    } : _d,\n    _e = options.delimiter,\n    delimiter = _e === void 0 ? \"/#?\" : _e,\n    _f = options.endsWith,\n    endsWith = _f === void 0 ? \"\" : _f;\n  var endsWithRe = \"[\".concat(escapeString(endsWith), \"]|$\");\n  var delimiterRe = \"[\".concat(escapeString(delimiter), \"]\");\n  var route = start ? \"^\" : \"\";\n  // Iterate over the tokens and create our regexp string.\n  for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n    var token = tokens_1[_i];\n    if (typeof token === \"string\") {\n      route += escapeString(encode(token));\n    } else {\n      var prefix = escapeString(encode(token.prefix));\n      var suffix = escapeString(encode(token.suffix));\n      if (token.pattern) {\n        if (keys) keys.push(token);\n        if (prefix || suffix) {\n          if (token.modifier === \"+\" || token.modifier === \"*\") {\n            var mod = token.modifier === \"*\" ? \"?\" : \"\";\n            route += \"(?:\".concat(prefix, \"((?:\").concat(token.pattern, \")(?:\").concat(suffix).concat(prefix, \"(?:\").concat(token.pattern, \"))*)\").concat(suffix, \")\").concat(mod);\n          } else {\n            route += \"(?:\".concat(prefix, \"(\").concat(token.pattern, \")\").concat(suffix, \")\").concat(token.modifier);\n          }\n        } else {\n          if (token.modifier === \"+\" || token.modifier === \"*\") {\n            throw new TypeError(\"Can not repeat \\\"\".concat(token.name, \"\\\" without a prefix and suffix\"));\n          }\n          route += \"(\".concat(token.pattern, \")\").concat(token.modifier);\n        }\n      } else {\n        route += \"(?:\".concat(prefix).concat(suffix, \")\").concat(token.modifier);\n      }\n    }\n  }\n  if (end) {\n    if (!strict) route += \"\".concat(delimiterRe, \"?\");\n    route += !options.endsWith ? \"$\" : \"(?=\".concat(endsWithRe, \")\");\n  } else {\n    var endToken = tokens[tokens.length - 1];\n    var isEndDelimited = typeof endToken === \"string\" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === undefined;\n    if (!strict) {\n      route += \"(?:\".concat(delimiterRe, \"(?=\").concat(endsWithRe, \"))?\");\n    }\n    if (!isEndDelimited) {\n      route += \"(?=\".concat(delimiterRe, \"|\").concat(endsWithRe, \")\");\n    }\n  }\n  return new RegExp(route, flags(options));\n}\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n */\nfunction pathToRegexp(path, keys, options) {\n  if (path instanceof RegExp) return regexpToRegexp(path, keys);\n  if (Array.isArray(path)) return arrayToRegexp(path, keys, options);\n  return stringToRegexp(path, keys, options);\n}\n// CONCATENATED MODULE: ./node_modules/framework7-v575/utils/history.js\n\n\n\n\nvar History = {\n  queue: [],\n  clearQueue: function clearQueue() {\n    if (History.queue.length === 0) return;\n    var currentQueue = History.queue.shift();\n    currentQueue();\n  },\n  routerQueue: [],\n  clearRouterQueue: function clearRouterQueue() {\n    if (History.routerQueue.length === 0) return;\n    var currentQueue = History.routerQueue.pop();\n    var router = currentQueue.router,\n      stateUrl = currentQueue.stateUrl,\n      action = currentQueue.action;\n    var animate = router.params.animate;\n    if (router.params.pushStateAnimate === false) animate = false;\n    if (action === 'back') {\n      router.back({\n        animate: animate,\n        pushState: false\n      });\n    }\n    if (action === 'load') {\n      router.navigate(stateUrl, {\n        animate: animate,\n        pushState: false\n      });\n    }\n  },\n  handle: function handle(e) {\n    if (History.blockPopstate) return;\n    var app = this;\n    // const mainView = app.views.main;\n    var state = e.state;\n    History.previousState = History.state;\n    History.state = state;\n    History.allowChange = true;\n    History.clearQueue();\n    state = History.state;\n    if (!state) state = {};\n    app.views.forEach(function (view) {\n      var router = view.router;\n      var viewState = state[view.id];\n      if (!viewState && view.params.pushState) {\n        viewState = {\n          url: view.router.history[0]\n        };\n      }\n      if (!viewState) return;\n      var stateUrl = viewState.url || undefined;\n      var animate = router.params.animate;\n      if (router.params.pushStateAnimate === false) animate = false;\n      if (stateUrl !== router.url) {\n        if (router.history.indexOf(stateUrl) >= 0) {\n          // Go Back\n          if (router.allowPageChange) {\n            router.back({\n              animate: animate,\n              pushState: false\n            });\n          } else {\n            History.routerQueue.push({\n              action: 'back',\n              router: router\n            });\n          }\n        } else if (router.allowPageChange) {\n          // Load page\n          router.navigate(stateUrl, {\n            animate: animate,\n            pushState: false\n          });\n        } else {\n          History.routerQueue.unshift({\n            action: 'load',\n            stateUrl: stateUrl,\n            router: router\n          });\n        }\n      }\n    });\n  },\n  initViewState: function initViewState(viewId, viewState) {\n    var newState = utils[\"default\"].extend({}, History.state || {}, defineProperty_default()({}, viewId, viewState));\n    History.state = newState;\n    ssr_window_esm[\"window\"].history.replaceState(newState, '');\n  },\n  push: function push(viewId, viewState, url) {\n    if (!History.allowChange) {\n      History.queue.push(function () {\n        History.push(viewId, viewState, url);\n      });\n      return;\n    }\n    History.previousState = History.state;\n    var newState = utils[\"default\"].extend({}, History.previousState || {}, defineProperty_default()({}, viewId, viewState));\n    History.state = newState;\n    ssr_window_esm[\"window\"].history.pushState(newState, '', url);\n  },\n  replace: function replace(viewId, viewState, url) {\n    if (!History.allowChange) {\n      History.queue.push(function () {\n        History.replace(viewId, viewState, url);\n      });\n      return;\n    }\n    History.previousState = History.state;\n    var newState = utils[\"default\"].extend({}, History.previousState || {}, defineProperty_default()({}, viewId, viewState));\n    History.state = newState;\n    ssr_window_esm[\"window\"].history.replaceState(newState, '', url);\n  },\n  go: function go(index) {\n    History.allowChange = false;\n    ssr_window_esm[\"window\"].history.go(index);\n  },\n  back: function back() {\n    History.allowChange = false;\n    ssr_window_esm[\"window\"].history.back();\n  },\n  allowChange: true,\n  previousState: {},\n  state: ssr_window_esm[\"window\"].history.state,\n  blockPopstate: true,\n  init: function init(app) {\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).on('load', function () {\n      setTimeout(function () {\n        History.blockPopstate = false;\n      }, 0);\n    });\n    if (ssr_window_esm[\"document\"].readyState && ssr_window_esm[\"document\"].readyState === 'complete') {\n      History.blockPopstate = false;\n    }\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).on('popstate', History.handle.bind(app));\n  }\n};\n/* harmony default export */ var utils_history = (History);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/swipe-back.js\n\n\n\n\n\nfunction SwipeBack(r) {\n  var router = r;\n  var $el = router.$el,\n    $navbarsEl = router.$navbarsEl,\n    app = router.app,\n    params = router.params;\n  var isTouched = false;\n  var isMoved = false;\n  var touchesStart = {};\n  var isScrolling;\n  var $currentPageEl = [];\n  var $previousPageEl = [];\n  var viewContainerWidth;\n  var touchesDiff;\n  var allowViewTouchMove = true;\n  var touchStartTime;\n  var $currentNavbarEl = [];\n  var $previousNavbarEl = [];\n  var dynamicNavbar;\n  var $pageShadowEl;\n  var $pageOpacityEl;\n  var animatableNavEls;\n  var paramsSwipeBackAnimateShadow = params[\"\".concat(app.theme, \"SwipeBackAnimateShadow\")];\n  var paramsSwipeBackAnimateOpacity = params[\"\".concat(app.theme, \"SwipeBackAnimateOpacity\")];\n  var paramsSwipeBackActiveArea = params[\"\".concat(app.theme, \"SwipeBackActiveArea\")];\n  var paramsSwipeBackThreshold = params[\"\".concat(app.theme, \"SwipeBackThreshold\")];\n  var transformOrigin = app.rtl ? 'right center' : 'left center';\n  var transformOriginTitleLarge = app.rtl ? 'calc(100% - var(--f7-navbar-large-title-padding-left) - var(--f7-safe-area-left)) center' : 'calc(var(--f7-navbar-large-title-padding-left) + var(--f7-safe-area-left)) center';\n  function animatableNavElements() {\n    var els = [];\n    var inverter = app.rtl ? -1 : 1;\n    var currentNavIsTransparent = $currentNavbarEl.hasClass('navbar-transparent') && !$currentNavbarEl.hasClass('navbar-large') && !$currentNavbarEl.hasClass('navbar-transparent-visible');\n    var currentNavIsLarge = $currentNavbarEl.hasClass('navbar-large');\n    var currentNavIsCollapsed = $currentNavbarEl.hasClass('navbar-large-collapsed');\n    var currentNavIsLargeTransparent = $currentNavbarEl.hasClass('navbar-large-transparent') || $currentNavbarEl.hasClass('navbar-large') && $currentNavbarEl.hasClass('navbar-transparent');\n    var previousNavIsTransparent = $previousNavbarEl.hasClass('navbar-transparent') && !$previousNavbarEl.hasClass('navbar-large') && !$previousNavbarEl.hasClass('navbar-transparent-visible');\n    var previousNavIsLarge = $previousNavbarEl.hasClass('navbar-large');\n    var previousNavIsCollapsed = $previousNavbarEl.hasClass('navbar-large-collapsed');\n    var previousNavIsLargeTransparent = $previousNavbarEl.hasClass('navbar-large-transparent') || $previousNavbarEl.hasClass('navbar-large') && $previousNavbarEl.hasClass('navbar-transparent');\n    var fromLarge = currentNavIsLarge && !currentNavIsCollapsed;\n    var toLarge = previousNavIsLarge && !previousNavIsCollapsed;\n    var $currentNavElements = $currentNavbarEl.find('.left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg');\n    var $previousNavElements = $previousNavbarEl.find('.left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg');\n    var activeNavBackIconText;\n    var previousNavBackIconText;\n    if (params.iosAnimateNavbarBackIcon) {\n      if ($currentNavbarEl.hasClass('sliding') || $currentNavbarEl.find('.navbar-inner.sliding').length) {\n        activeNavBackIconText = $currentNavbarEl.find('.left').find('.back .icon + span').eq(0);\n      } else {\n        activeNavBackIconText = $currentNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);\n      }\n      if ($previousNavbarEl.hasClass('sliding') || $previousNavbarEl.find('.navbar-inner.sliding').length) {\n        previousNavBackIconText = $previousNavbarEl.find('.left').find('.back .icon + span').eq(0);\n      } else {\n        previousNavBackIconText = $previousNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);\n      }\n      if (activeNavBackIconText.length) {\n        $previousNavElements.each(function (index, el) {\n          if (!Object(dom7_module[\"default\"])(el).hasClass('title')) return;\n          el.f7NavbarLeftOffset += activeNavBackIconText.prev('.icon')[0].offsetWidth;\n        });\n      }\n    }\n    $currentNavElements.each(function (index, navEl) {\n      var $navEl = Object(dom7_module[\"default\"])(navEl);\n      var isSubnavbar = $navEl.hasClass('subnavbar');\n      var isLeft = $navEl.hasClass('left');\n      var isTitle = $navEl.hasClass('title');\n      var isBg = $navEl.hasClass('navbar-bg');\n      if ((isTitle || isBg) && currentNavIsTransparent) return;\n      if (!fromLarge && $navEl.hasClass('.title-large')) return;\n      var el = {\n        el: navEl\n      };\n      if (fromLarge) {\n        if (isTitle) return;\n        if ($navEl.hasClass('title-large')) {\n          if (els.indexOf(el) < 0) els.push(el);\n          el.overflow = 'visible';\n          $navEl.find('.title-large-text').each(function (subIndex, subNavEl) {\n            els.push({\n              el: subNavEl,\n              transform: function transform(progress) {\n                return \"translateX(\".concat(progress * 100 * inverter, \"%)\");\n              }\n            });\n          });\n          return;\n        }\n      }\n      if (toLarge) {\n        if (!fromLarge) {\n          if ($navEl.hasClass('title-large')) {\n            if (els.indexOf(el) < 0) els.push(el);\n            el.opacity = 0;\n          }\n        }\n        if (isLeft) {\n          if (els.indexOf(el) < 0) els.push(el);\n          el.opacity = function (progress) {\n            return 1 - Math.pow(progress, 0.33);\n          };\n          $navEl.find('.back span').each(function (subIndex, subNavEl) {\n            els.push({\n              el: subNavEl,\n              'transform-origin': transformOrigin,\n              transform: function transform(progress) {\n                return \"translateX(calc(\".concat(progress, \" * (var(--f7-navbarTitleLargeOffset) - var(--f7-navbarLeftTextOffset)))) translateY(calc(\").concat(progress, \" * (var(--f7-navbar-large-title-height) - var(--f7-navbar-large-title-padding-vertical) / 2))) scale(\").concat(1 + 1 * progress, \")\");\n              }\n            });\n          });\n          return;\n        }\n      }\n      if (isBg) {\n        if (els.indexOf(el) < 0) els.push(el);\n        if (!fromLarge && !toLarge) {\n          if (currentNavIsCollapsed) {\n            if (currentNavIsLargeTransparent) {\n              el.className = 'ios-swipeback-navbar-bg-large';\n            }\n            el.transform = function (progress) {\n              return \"translateX(\".concat(100 * progress * inverter, \"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))\");\n            };\n          } else {\n            el.transform = function (progress) {\n              return \"translateX(\".concat(100 * progress * inverter, \"%)\");\n            };\n          }\n        }\n        if (!fromLarge && toLarge) {\n          el.className = 'ios-swipeback-navbar-bg-large';\n          el.transform = function (progress) {\n            return \"translateX(\".concat(100 * progress * inverter, \"%) translateY(calc(-1 * \").concat(1 - progress, \" * var(--f7-navbar-large-title-height)))\");\n          };\n        }\n        if (fromLarge && toLarge) {\n          el.transform = function (progress) {\n            return \"translateX(\".concat(100 * progress * inverter, \"%)\");\n          };\n        }\n        if (fromLarge && !toLarge) {\n          el.transform = function (progress) {\n            return \"translateX(\".concat(100 * progress * inverter, \"%) translateY(calc(-\").concat(progress, \" * var(--f7-navbar-large-title-height)))\");\n          };\n        }\n        return;\n      }\n      if ($navEl.hasClass('title-large')) return;\n      var isSliding = $navEl.hasClass('sliding') || $navEl.parents('.navbar-inner.sliding').length;\n      if (els.indexOf(el) < 0) els.push(el);\n      if (!isSubnavbar || isSubnavbar && !isSliding) {\n        el.opacity = function (progress) {\n          return 1 - Math.pow(progress, 0.33);\n        };\n      }\n      if (isSliding) {\n        var transformTarget = el;\n        if (isLeft && activeNavBackIconText.length && params.iosAnimateNavbarBackIcon) {\n          var textEl = {\n            el: activeNavBackIconText[0]\n          };\n          transformTarget = textEl;\n          els.push(textEl);\n        }\n        transformTarget.transform = function (progress) {\n          var activeNavTranslate = progress * transformTarget.el.f7NavbarRightOffset;\n          if (device[\"default\"].pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);\n          if (isSubnavbar && currentNavIsLarge) {\n            return \"translate3d(\".concat(activeNavTranslate, \"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)\");\n          }\n          return \"translate3d(\".concat(activeNavTranslate, \"px,0,0)\");\n        };\n      }\n    });\n    $previousNavElements.each(function (index, navEl) {\n      var $navEl = Object(dom7_module[\"default\"])(navEl);\n      var isSubnavbar = $navEl.hasClass('subnavbar');\n      var isLeft = $navEl.hasClass('left');\n      var isTitle = $navEl.hasClass('title');\n      var isBg = $navEl.hasClass('navbar-bg');\n      if ((isTitle || isBg) && previousNavIsTransparent) return;\n      var el = {\n        el: navEl\n      };\n      if (toLarge) {\n        if (isTitle) return;\n        if (els.indexOf(el) < 0) els.push(el);\n        if ($navEl.hasClass('title-large')) {\n          el.opacity = 1;\n          el.overflow = 'visible';\n          $navEl.find('.title-large-text').each(function (subIndex, subNavEl) {\n            els.push({\n              el: subNavEl,\n              'transform-origin': transformOriginTitleLarge,\n              opacity: function opacity(progress) {\n                return Math.pow(progress, 3);\n              },\n              transform: function transform(progress) {\n                return \"translateX(calc(\".concat(1 - progress, \" * (var(--f7-navbarLeftTextOffset) - var(--f7-navbarTitleLargeOffset)))) translateY(calc(\").concat(progress - 1, \" * var(--f7-navbar-large-title-height) + \").concat(1 - progress, \" * var(--f7-navbar-large-title-padding-vertical))) scale(\").concat(0.5 + progress * 0.5, \")\");\n              }\n            });\n          });\n          return;\n        }\n      }\n      if (isBg) {\n        if (els.indexOf(el) < 0) els.push(el);\n        if (!fromLarge && !toLarge) {\n          if (previousNavIsCollapsed) {\n            if (previousNavIsLargeTransparent) {\n              el.className = 'ios-swipeback-navbar-bg-large';\n            }\n            el.transform = function (progress) {\n              return \"translateX(\".concat((-100 + 100 * progress) * inverter, \"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))\");\n            };\n          } else {\n            el.transform = function (progress) {\n              return \"translateX(\".concat((-100 + 100 * progress) * inverter, \"%)\");\n            };\n          }\n        }\n        if (!fromLarge && toLarge) {\n          el.transform = function (progress) {\n            return \"translateX(\".concat((-100 + 100 * progress) * inverter, \"%) translateY(calc(-1 * \").concat(1 - progress, \" * var(--f7-navbar-large-title-height)))\");\n          };\n        }\n        if (fromLarge && !toLarge) {\n          el.className = 'ios-swipeback-navbar-bg-large';\n          el.transform = function (progress) {\n            return \"translateX(\".concat((-100 + 100 * progress) * inverter, \"%) translateY(calc(-\").concat(progress, \" * var(--f7-navbar-large-title-height)))\");\n          };\n        }\n        if (fromLarge && toLarge) {\n          el.transform = function (progress) {\n            return \"translateX(\".concat((-100 + 100 * progress) * inverter, \"%)\");\n          };\n        }\n        return;\n      }\n      if ($navEl.hasClass('title-large')) return;\n      var isSliding = $navEl.hasClass('sliding') || $previousNavbarEl.children('.navbar-inner.sliding').length;\n      if (els.indexOf(el) < 0) els.push(el);\n      if (!isSubnavbar || isSubnavbar && !isSliding) {\n        el.opacity = function (progress) {\n          return Math.pow(progress, 3);\n        };\n      }\n      if (isSliding) {\n        var transformTarget = el;\n        if (isLeft && previousNavBackIconText.length && params.iosAnimateNavbarBackIcon) {\n          var textEl = {\n            el: previousNavBackIconText[0]\n          };\n          transformTarget = textEl;\n          els.push(textEl);\n        }\n        transformTarget.transform = function (progress) {\n          var previousNavTranslate = transformTarget.el.f7NavbarLeftOffset * (1 - progress);\n          if (device[\"default\"].pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);\n          if (isSubnavbar && previousNavIsLarge) {\n            return \"translate3d(\".concat(previousNavTranslate, \"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)\");\n          }\n          return \"translate3d(\".concat(previousNavTranslate, \"px,0,0)\");\n        };\n      }\n    });\n    return els;\n  }\n  function setAnimatableNavElements() {\n    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      progress = _ref.progress,\n      reset = _ref.reset,\n      transition = _ref.transition,\n      reflow = _ref.reflow;\n    var styles = ['overflow', 'transform', 'transform-origin', 'opacity'];\n    if (transition === true || transition === false) {\n      for (var i = 0; i < animatableNavEls.length; i += 1) {\n        var el = animatableNavEls[i];\n        if (el && el.el) {\n          if (transition === true) el.el.classList.add('navbar-page-transitioning');\n          if (transition === false) el.el.classList.remove('navbar-page-transitioning');\n        }\n      }\n    }\n    if (reflow && animatableNavEls.length && animatableNavEls[0] && animatableNavEls[0].el) {\n      // eslint-disable-next-line\n      animatableNavEls[0].el._clientLeft = animatableNavEls[0].el.clientLeft;\n    }\n    for (var _i = 0; _i < animatableNavEls.length; _i += 1) {\n      var _el = animatableNavEls[_i];\n      if (_el && _el.el) {\n        if (_el.className && !_el.classNameSet && !reset) {\n          _el.el.classList.add(_el.className);\n          _el.classNameSet = true;\n        }\n        if (_el.className && reset) {\n          _el.el.classList.remove(_el.className);\n        }\n        for (var j = 0; j < styles.length; j += 1) {\n          var styleProp = styles[j];\n          if (_el[styleProp]) {\n            if (reset) {\n              _el.el.style[styleProp] = '';\n            } else if (typeof _el[styleProp] === 'function') {\n              _el.el.style[styleProp] = _el[styleProp](progress);\n            } else {\n              _el.el.style[styleProp] = _el[styleProp];\n            }\n          }\n        }\n      }\n    }\n  }\n  function handleTouchStart(e) {\n    var swipeBackEnabled = params[\"\".concat(app.theme, \"SwipeBack\")];\n    if (!allowViewTouchMove || !swipeBackEnabled || isTouched || app.swipeout && app.swipeout.el || !router.allowPageChange) return;\n    if (Object(dom7_module[\"default\"])(e.target).closest('.range-slider, .calendar-months').length > 0) return;\n    if (Object(dom7_module[\"default\"])(e.target).closest('.page-master, .page-master-detail').length > 0 && params.masterDetailBreakpoint > 0 && app.width >= params.masterDetailBreakpoint) return;\n    isMoved = false;\n    isTouched = true;\n    isScrolling = undefined;\n    touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n    touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    touchStartTime = utils[\"default\"].now();\n    dynamicNavbar = router.dynamicNavbar;\n  }\n  function handleTouchMove(e) {\n    if (!isTouched) return;\n    var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n    var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n    if (typeof isScrolling === 'undefined') {\n      isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)) || pageX < touchesStart.x && !app.rtl || pageX > touchesStart.x && app.rtl;\n    }\n    if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) {\n      isTouched = false;\n      return;\n    }\n    if (!isMoved) {\n      // Calc values during first move fired\n      var cancel = false;\n      var target = Object(dom7_module[\"default\"])(e.target);\n      var swipeout = target.closest('.swipeout');\n      if (swipeout.length > 0) {\n        if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true;\n        if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true;\n      }\n      $currentPageEl = target.closest('.page');\n      if ($currentPageEl.hasClass('no-swipeback') || target.closest('.no-swipeback, .card-opened').length > 0) cancel = true;\n      $previousPageEl = $el.find('.page-previous:not(.stacked)');\n      if ($previousPageEl.length > 1) {\n        $previousPageEl = $previousPageEl.eq($previousPageEl.length - 1);\n      }\n      var notFromBorder = touchesStart.x - $el.offset().left > paramsSwipeBackActiveArea;\n      viewContainerWidth = $el.width();\n      if (app.rtl) {\n        notFromBorder = touchesStart.x < $el.offset().left - $el[0].scrollLeft + (viewContainerWidth - paramsSwipeBackActiveArea);\n      } else {\n        notFromBorder = touchesStart.x - $el.offset().left > paramsSwipeBackActiveArea;\n      }\n      if (notFromBorder) cancel = true;\n      if ($previousPageEl.length === 0 || $currentPageEl.length === 0) cancel = true;\n      if (cancel) {\n        isTouched = false;\n        return;\n      }\n      if (paramsSwipeBackAnimateShadow) {\n        $pageShadowEl = $currentPageEl.find('.page-shadow-effect');\n        if ($pageShadowEl.length === 0) {\n          $pageShadowEl = Object(dom7_module[\"default\"])('<div class=\"page-shadow-effect\"></div>');\n          $currentPageEl.append($pageShadowEl);\n        }\n      }\n      if (paramsSwipeBackAnimateOpacity) {\n        $pageOpacityEl = $previousPageEl.find('.page-opacity-effect');\n        if ($pageOpacityEl.length === 0) {\n          $pageOpacityEl = Object(dom7_module[\"default\"])('<div class=\"page-opacity-effect\"></div>');\n          $previousPageEl.append($pageOpacityEl);\n        }\n      }\n      if (dynamicNavbar) {\n        $currentNavbarEl = $navbarsEl.find('.navbar-current:not(.stacked)');\n        $previousNavbarEl = $navbarsEl.find('.navbar-previous:not(.stacked)');\n        if ($previousNavbarEl.length > 1) {\n          $previousNavbarEl = $previousNavbarEl.eq($previousNavbarEl.length - 1);\n        }\n        animatableNavEls = animatableNavElements($previousNavbarEl, $currentNavbarEl);\n      }\n\n      // Close/Hide Any Picker\n      if (Object(dom7_module[\"default\"])('.sheet.modal-in').length > 0 && app.sheet) {\n        app.sheet.close(Object(dom7_module[\"default\"])('.sheet.modal-in'));\n      }\n    }\n    e.f7PreventSwipePanel = true;\n    isMoved = true;\n    app.preventSwipePanelBySwipeBack = true;\n    e.preventDefault();\n\n    // RTL inverter\n    var inverter = app.rtl ? -1 : 1;\n\n    // Touches diff\n    touchesDiff = (pageX - touchesStart.x - paramsSwipeBackThreshold) * inverter;\n    if (touchesDiff < 0) touchesDiff = 0;\n    var percentage = Math.min(Math.max(touchesDiff / viewContainerWidth, 0), 1);\n\n    // Swipe Back Callback\n    var callbackData = {\n      percentage: percentage,\n      progress: percentage,\n      currentPageEl: $currentPageEl[0],\n      previousPageEl: $previousPageEl[0],\n      currentNavbarEl: $currentNavbarEl[0],\n      previousNavbarEl: $previousNavbarEl[0]\n    };\n    $el.trigger('swipeback:move', callbackData);\n    router.emit('swipebackMove', callbackData);\n\n    // Transform pages\n    var currentPageTranslate = touchesDiff * inverter;\n    var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter;\n    if (!app.rtl) {\n      currentPageTranslate = Math.min(currentPageTranslate, viewContainerWidth);\n      previousPageTranslate = Math.min(previousPageTranslate, 0);\n    } else {\n      currentPageTranslate = Math.max(currentPageTranslate, -viewContainerWidth);\n      previousPageTranslate = Math.max(previousPageTranslate, 0);\n    }\n    if (device[\"default\"].pixelRatio === 1) {\n      currentPageTranslate = Math.round(currentPageTranslate);\n      previousPageTranslate = Math.round(previousPageTranslate);\n    }\n    router.swipeBackActive = true;\n    Object(dom7_module[\"default\"])([$currentPageEl[0], $previousPageEl[0]]).addClass('page-swipeback-active');\n    $currentPageEl.transform(\"translate3d(\".concat(currentPageTranslate, \"px,0,0)\"));\n    if (paramsSwipeBackAnimateShadow) $pageShadowEl[0].style.opacity = 1 - 1 * percentage;\n    if (app.theme === 'ios') {\n      $previousPageEl.transform(\"translate3d(\".concat(previousPageTranslate, \"px,0,0)\"));\n    }\n    if (paramsSwipeBackAnimateOpacity) $pageOpacityEl[0].style.opacity = 1 - 1 * percentage;\n\n    // Dynamic Navbars Animation\n    if (!dynamicNavbar) return;\n    setAnimatableNavElements({\n      progress: percentage\n    });\n  }\n  function handleTouchEnd() {\n    app.preventSwipePanelBySwipeBack = false;\n    if (!isTouched || !isMoved) {\n      isTouched = false;\n      isMoved = false;\n      return;\n    }\n    isTouched = false;\n    isMoved = false;\n    router.swipeBackActive = false;\n    var $pages = Object(dom7_module[\"default\"])([$currentPageEl[0], $previousPageEl[0]]);\n    $pages.removeClass('page-swipeback-active');\n    if (touchesDiff === 0) {\n      $pages.transform('');\n      if ($pageShadowEl && $pageShadowEl.length > 0) $pageShadowEl.remove();\n      if ($pageOpacityEl && $pageOpacityEl.length > 0) $pageOpacityEl.remove();\n      if (dynamicNavbar) {\n        setAnimatableNavElements({\n          reset: true\n        });\n      }\n      return;\n    }\n    var timeDiff = utils[\"default\"].now() - touchStartTime;\n    var pageChanged = false;\n    // Swipe back to previous page\n    if (timeDiff < 300 && touchesDiff > 10 || timeDiff >= 300 && touchesDiff > viewContainerWidth / 2) {\n      $currentPageEl.removeClass('page-current').addClass(\"page-next\".concat(app.theme !== 'ios' ? ' page-next-on-right' : ''));\n      $previousPageEl.removeClass('page-previous').addClass('page-current').removeAttr('aria-hidden');\n      if ($pageShadowEl) $pageShadowEl[0].style.opacity = '';\n      if ($pageOpacityEl) $pageOpacityEl[0].style.opacity = '';\n      if (dynamicNavbar) {\n        router.setNavbarPosition($currentNavbarEl, 'next');\n        router.setNavbarPosition($previousNavbarEl, 'current', false);\n      }\n      pageChanged = true;\n    }\n    // Reset custom styles\n    // Add transitioning class for transition-duration\n    $pages.addClass('page-transitioning page-transitioning-swipeback');\n    if (!pageChanged) {\n      // eslint-disable-next-line\n      $currentPageEl[0]._clientLeft = $currentPageEl[0].clientLeft;\n    }\n    $pages.transform('');\n    if (dynamicNavbar) {\n      setAnimatableNavElements({\n        progress: pageChanged ? 1 : 0,\n        transition: true,\n        reflow: !pageChanged\n      });\n    }\n    allowViewTouchMove = false;\n    router.allowPageChange = false;\n\n    // Swipe Back Callback\n    var callbackData = {\n      currentPageEl: $currentPageEl[0],\n      previousPageEl: $previousPageEl[0],\n      currentNavbarEl: $currentNavbarEl[0],\n      previousNavbarEl: $previousNavbarEl[0]\n    };\n    if (pageChanged) {\n      // Update Route\n      router.currentRoute = $previousPageEl[0].f7Page.route;\n      router.currentPage = $previousPageEl[0];\n\n      // Page before animation callback\n      router.pageCallback('beforeOut', $currentPageEl, $currentNavbarEl, 'current', 'next', {\n        route: $currentPageEl[0].f7Page.route,\n        swipeBack: true\n      });\n      router.pageCallback('beforeIn', $previousPageEl, $previousNavbarEl, 'previous', 'current', {\n        route: $previousPageEl[0].f7Page.route,\n        swipeBack: true\n      }, $currentPageEl[0]);\n      $el.trigger('swipeback:beforechange', callbackData);\n      router.emit('swipebackBeforeChange', callbackData);\n    } else {\n      $el.trigger('swipeback:beforereset', callbackData);\n      router.emit('swipebackBeforeReset', callbackData);\n    }\n    $currentPageEl.transitionEnd(function () {\n      $pages.removeClass('page-transitioning page-transitioning-swipeback');\n      if (dynamicNavbar) {\n        setAnimatableNavElements({\n          reset: true,\n          transition: false\n        });\n      }\n      allowViewTouchMove = true;\n      router.allowPageChange = true;\n      if (pageChanged) {\n        // Update History\n        if (router.history.length === 1) {\n          router.history.unshift(router.url);\n        }\n        router.history.pop();\n        router.saveHistory();\n\n        // Update push state\n        if (params.pushState) {\n          utils_history.back();\n        }\n\n        // Page after animation callback\n        router.pageCallback('afterOut', $currentPageEl, $currentNavbarEl, 'current', 'next', {\n          route: $currentPageEl[0].f7Page.route,\n          swipeBack: true\n        });\n        router.pageCallback('afterIn', $previousPageEl, $previousNavbarEl, 'previous', 'current', {\n          route: $previousPageEl[0].f7Page.route,\n          swipeBack: true\n        });\n\n        // Remove Old Page\n        if (params.stackPages && router.initialPages.indexOf($currentPageEl[0]) >= 0) {\n          $currentPageEl.addClass('stacked');\n          if (dynamicNavbar) {\n            $currentNavbarEl.addClass('stacked');\n          }\n        } else {\n          router.pageCallback('beforeRemove', $currentPageEl, $currentNavbarEl, 'next', {\n            swipeBack: true\n          });\n          router.removePage($currentPageEl);\n          if (dynamicNavbar) {\n            router.removeNavbar($currentNavbarEl);\n          }\n        }\n        $el.trigger('swipeback:afterchange', callbackData);\n        router.emit('swipebackAfterChange', callbackData);\n        router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n        if (params.preloadPreviousPage) {\n          router.back(router.history[router.history.length - 2], {\n            preload: true\n          });\n        }\n      } else {\n        $el.trigger('swipeback:afterreset', callbackData);\n        router.emit('swipebackAfterReset', callbackData);\n      }\n      if ($pageShadowEl && $pageShadowEl.length > 0) $pageShadowEl.remove();\n      if ($pageOpacityEl && $pageOpacityEl.length > 0) $pageOpacityEl.remove();\n    });\n  }\n  function attachEvents() {\n    var passiveListener = app.touchEvents.start === 'touchstart' && utils_support[\"default\"].passiveListener ? {\n      passive: true,\n      capture: false\n    } : false;\n    $el.on(app.touchEvents.start, handleTouchStart, passiveListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n  }\n  function detachEvents() {\n    var passiveListener = app.touchEvents.start === 'touchstart' && utils_support[\"default\"].passiveListener ? {\n      passive: true,\n      capture: false\n    } : false;\n    $el.off(app.touchEvents.start, handleTouchStart, passiveListener);\n    app.off('touchmove:active', handleTouchMove);\n    app.off('touchend:passive', handleTouchEnd);\n  }\n  attachEvents();\n  router.on('routerDestroy', detachEvents);\n}\n/* harmony default export */ var swipe_back = (SwipeBack);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/redirect.js\n\n/* harmony default export */ var router_redirect = (function (direction, route, options) {\n  var router = this;\n  var redirect = route.route.redirect;\n  if (options.initial && router.params.pushState) {\n    options.replaceState = true; // eslint-disable-line\n    options.history = true; // eslint-disable-line\n  }\n  function redirectResolve(redirectUrl) {\n    var redirectOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    router.allowPageChange = true;\n    router[direction](redirectUrl, utils[\"default\"].extend({}, options, redirectOptions));\n  }\n  function redirectReject() {\n    router.allowPageChange = true;\n  }\n  if (typeof redirect === 'function') {\n    router.allowPageChange = false;\n    var redirectUrl = redirect.call(router, route, redirectResolve, redirectReject);\n    if (redirectUrl && typeof redirectUrl === 'string') {\n      router.allowPageChange = true;\n      return router[direction](redirectUrl, options);\n    }\n    return router;\n  }\n  return router[direction](redirect, options);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/process-route-queue.js\n\nfunction processQueue(router, routerQueue, routeQueue, to, from, resolve, reject) {\n  var queue = [];\n  if (Array.isArray(routeQueue)) {\n    queue.push.apply(queue, toConsumableArray_default()(routeQueue));\n  } else if (routeQueue && typeof routeQueue === 'function') {\n    queue.push(routeQueue);\n  }\n  if (routerQueue) {\n    if (Array.isArray(routerQueue)) {\n      queue.push.apply(queue, toConsumableArray_default()(routerQueue));\n    } else {\n      queue.push(routerQueue);\n    }\n  }\n  function next() {\n    if (queue.length === 0) {\n      resolve();\n      return;\n    }\n    var queueItem = queue.shift();\n    queueItem.call(router, to, from, function () {\n      next();\n    }, function () {\n      reject();\n    });\n  }\n  next();\n}\n/* harmony default export */ var process_route_queue = (function (to, from, resolve, reject) {\n  var router = this;\n  function enterNextRoute() {\n    if (to && to.route && (router.params.routesBeforeEnter || to.route.beforeEnter)) {\n      router.allowPageChange = false;\n      processQueue(router, router.params.routesBeforeEnter, to.route.beforeEnter, to, from, function () {\n        router.allowPageChange = true;\n        resolve();\n      }, function () {\n        reject();\n      });\n    } else {\n      resolve();\n    }\n  }\n  function leaveCurrentRoute() {\n    if (from && from.route && (router.params.routesBeforeLeave || from.route.beforeLeave)) {\n      router.allowPageChange = false;\n      processQueue(router, router.params.routesBeforeLeave, from.route.beforeLeave, to, from, function () {\n        router.allowPageChange = true;\n        enterNextRoute();\n      }, function () {\n        reject();\n      });\n    } else {\n      enterNextRoute();\n    }\n  }\n  leaveCurrentRoute();\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/app-router-check.js\n/* harmony default export */ var app_router_check = (function (router, method) {\n  if (!router.view) {\n    throw new Error(\"Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router.\".concat(method, \"(...)\"));\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/async-component.js\n/* harmony default export */ var async_component = (function (router, asyncComponent, resolve, reject) {\n  function resolvePromise(componentPromise) {\n    componentPromise.then(function (c) {\n      // eslint-disable-next-line\n      resolve({\n        component: c.default || c._default || c\n      });\n    }).catch(function (err) {\n      reject();\n      throw new Error(err);\n    });\n  }\n  if (asyncComponent instanceof Promise) {\n    resolvePromise(asyncComponent);\n    return;\n  }\n  var asyncComponentResult = asyncComponent.call(router);\n  if (asyncComponentResult instanceof Promise) {\n    resolvePromise(asyncComponentResult);\n  } else {\n    resolve({\n      component: asyncComponentResult\n    });\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/navigate.js\n\n\n\n\n\n\n\n\n\nfunction refreshPage() {\n  var router = this;\n  app_router_check(router, 'refreshPage');\n  return router.navigate(router.currentRoute.url, {\n    ignoreCache: true,\n    reloadCurrent: true\n  });\n}\nfunction forward(el) {\n  var forwardOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var router = this;\n  var $el = Object(dom7_module[\"default\"])(el);\n  var app = router.app;\n  var view = router.view;\n  var options = utils[\"default\"].extend(false, {\n    animate: router.params.animate,\n    pushState: true,\n    replaceState: false,\n    history: true,\n    reloadCurrent: router.params.reloadPages,\n    reloadPrevious: false,\n    reloadAll: false,\n    clearPreviousHistory: false,\n    reloadDetail: router.params.reloadDetail,\n    on: {}\n  }, forwardOptions);\n  var masterDetailEnabled = router.params.masterDetailBreakpoint > 0;\n  var isMaster = masterDetailEnabled && options.route && options.route.route && options.route.route.master === true;\n  var masterPageEl;\n  var otherDetailPageEl;\n  var currentRouteIsModal = router.currentRoute.modal;\n  var modalType;\n  if (!currentRouteIsModal) {\n    'popup popover sheet loginScreen actions customModal panel'.split(' ').forEach(function (modalLoadProp) {\n      if (router.currentRoute && router.currentRoute.route && router.currentRoute.route[modalLoadProp]) {\n        currentRouteIsModal = true;\n        modalType = modalLoadProp;\n      }\n    });\n  }\n  if (currentRouteIsModal) {\n    var modalToClose = router.currentRoute.modal || router.currentRoute.route.modalInstance || app[modalType].get();\n    var previousUrl = router.history[router.history.length - 2];\n    var previousRoute = router.findMatchingRoute(previousUrl);\n    if (!previousRoute && previousUrl) {\n      previousRoute = {\n        url: previousUrl,\n        path: previousUrl.split('?')[0],\n        query: utils[\"default\"].parseUrlQuery(previousUrl),\n        route: {\n          path: previousUrl.split('?')[0],\n          url: previousUrl\n        }\n      };\n    }\n    router.modalRemove(modalToClose);\n  }\n  var dynamicNavbar = router.dynamicNavbar;\n  var $viewEl = router.$el;\n  var $newPage = $el;\n  var reload = options.reloadPrevious || options.reloadCurrent || options.reloadAll;\n  var $oldPage;\n  var $navbarsEl;\n  var $newNavbarEl;\n  var $oldNavbarEl;\n  router.allowPageChange = false;\n  if ($newPage.length === 0) {\n    router.allowPageChange = true;\n    return router;\n  }\n  if ($newPage.length) {\n    // Remove theme elements\n    router.removeThemeElements($newPage);\n  }\n  if (dynamicNavbar) {\n    $newNavbarEl = $newPage.children('.navbar');\n    $navbarsEl = router.$navbarsEl;\n    if ($newNavbarEl.length === 0 && $newPage[0] && $newPage[0].f7Page) {\n      // Try from pageData\n      $newNavbarEl = $newPage[0].f7Page.$navbarEl;\n    }\n  }\n\n  // Save Keep Alive Cache\n  if (options.route && options.route.route && options.route.route.keepAlive && !options.route.route.keepAliveData) {\n    options.route.route.keepAliveData = {\n      pageEl: $el[0]\n    };\n  }\n\n  // Pages In View\n  var $pagesInView = $viewEl.children('.page:not(.stacked)').filter(function (index, pageInView) {\n    return pageInView !== $newPage[0];\n  });\n\n  // Navbars In View\n  var $navbarsInView;\n  if (dynamicNavbar) {\n    $navbarsInView = $navbarsEl.children('.navbar:not(.stacked)').filter(function (index, navbarInView) {\n      return navbarInView !== $newNavbarEl[0];\n    });\n  }\n\n  // Exit when reload previous and only 1 page in view so nothing ro reload\n  if (options.reloadPrevious && $pagesInView.length < 2) {\n    router.allowPageChange = true;\n    return router;\n  }\n\n  // Find Detail' master page\n  var isDetail;\n  var reloadDetail;\n  var isDetailRoot;\n  if (masterDetailEnabled && !options.reloadAll) {\n    for (var i = 0; i < $pagesInView.length; i += 1) {\n      if (!masterPageEl && $pagesInView[i].classList.contains('page-master')) {\n        masterPageEl = $pagesInView[i];\n        continue; // eslint-disable-line\n      }\n    }\n    isDetail = !isMaster && masterPageEl;\n    if (isDetail) {\n      // Find Other Detail\n      if (masterPageEl) {\n        for (var _i = 0; _i < $pagesInView.length; _i += 1) {\n          if ($pagesInView[_i].classList.contains('page-master-detail')) {\n            otherDetailPageEl = $pagesInView[_i];\n            continue; // eslint-disable-line\n          }\n        }\n      }\n    }\n    reloadDetail = isDetail && options.reloadDetail && app.width >= router.params.masterDetailBreakpoint && masterPageEl;\n  }\n  if (isDetail) {\n    isDetailRoot = !otherDetailPageEl || reloadDetail || options.reloadAll || options.reloadCurrent;\n  }\n\n  // New Page\n  var newPagePosition = 'next';\n  if (options.reloadCurrent || options.reloadAll || reloadDetail) {\n    newPagePosition = 'current';\n  } else if (options.reloadPrevious) {\n    newPagePosition = 'previous';\n  }\n  $newPage.removeClass('page-previous page-current page-next').addClass(\"page-\".concat(newPagePosition).concat(isMaster ? ' page-master' : '').concat(isDetail ? ' page-master-detail' : '').concat(isDetailRoot ? ' page-master-detail-root' : '')).removeClass('stacked').trigger('page:unstack').trigger('page:position', {\n    position: newPagePosition\n  });\n  router.emit('pageUnstack', $newPage[0]);\n  router.emit('pagePosition', $newPage[0], newPagePosition);\n  if (isMaster || isDetail) {\n    $newPage.trigger('page:role', {\n      role: isMaster ? 'master' : 'detail',\n      root: !!isDetailRoot\n    });\n    router.emit('pageRole', $newPage[0], {\n      role: isMaster ? 'master' : 'detail',\n      detailRoot: !!isDetailRoot\n    });\n  }\n  if (dynamicNavbar && $newNavbarEl.length) {\n    $newNavbarEl.removeClass('navbar-previous navbar-current navbar-next').addClass(\"navbar-\".concat(newPagePosition).concat(isMaster ? ' navbar-master' : '').concat(isDetail ? ' navbar-master-detail' : '').concat(isDetailRoot ? ' navbar-master-detail-root' : '')).removeClass('stacked');\n    $newNavbarEl.trigger('navbar:position', {\n      position: newPagePosition\n    });\n    router.emit('navbarPosition', $newNavbarEl[0], newPagePosition);\n    if (isMaster || isDetail) {\n      router.emit('navbarRole', $newNavbarEl[0], {\n        role: isMaster ? 'master' : 'detail',\n        detailRoot: !!isDetailRoot\n      });\n    }\n  }\n\n  // Find Old Page\n  if (options.reloadCurrent || reloadDetail) {\n    $oldPage = $pagesInView.eq($pagesInView.length - 1);\n    if (dynamicNavbar) {\n      // $oldNavbarEl = $navbarsInView.eq($pagesInView.length - 1);\n      $oldNavbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($oldPage));\n    }\n  } else if (options.reloadPrevious) {\n    $oldPage = $pagesInView.eq($pagesInView.length - 2);\n    if (dynamicNavbar) {\n      // $oldNavbarEl = $navbarsInView.eq($pagesInView.length - 2);\n      $oldNavbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($oldPage));\n    }\n  } else if (options.reloadAll) {\n    $oldPage = $pagesInView.filter(function (index, pageEl) {\n      return pageEl !== $newPage[0];\n    });\n    if (dynamicNavbar) {\n      $oldNavbarEl = $navbarsInView.filter(function (index, navbarEl) {\n        return navbarEl !== $newNavbarEl[0];\n      });\n    }\n  } else {\n    var removedPageEls = [];\n    var removedNavbarEls = [];\n    if ($pagesInView.length > 1) {\n      var _i2 = 0;\n      for (_i2 = 0; _i2 < $pagesInView.length - 1; _i2 += 1) {\n        if (masterPageEl && $pagesInView[_i2] === masterPageEl) {\n          $pagesInView.eq(_i2).addClass('page-master-stacked');\n          $pagesInView.eq(_i2).trigger('page:masterstack');\n          router.emit('pageMasterStack', $pagesInView[_i2]);\n          if (dynamicNavbar) {\n            Object(dom7_module[\"default\"])(app.navbar.getElByPage(masterPageEl)).addClass('navbar-master-stacked');\n            router.emit('navbarMasterStack', app.navbar.getElByPage(masterPageEl));\n          }\n          continue; // eslint-disable-line\n        }\n        var oldNavbarEl = app.navbar.getElByPage($pagesInView.eq(_i2));\n        if (router.params.stackPages) {\n          $pagesInView.eq(_i2).addClass('stacked');\n          $pagesInView.eq(_i2).trigger('page:stack');\n          router.emit('pageStack', $pagesInView[_i2]);\n          if (dynamicNavbar) {\n            Object(dom7_module[\"default\"])(oldNavbarEl).addClass('stacked');\n          }\n        } else {\n          // Page remove event\n          removedPageEls.push($pagesInView[_i2]);\n          router.pageCallback('beforeRemove', $pagesInView[_i2], $navbarsInView && $navbarsInView[_i2], 'previous', undefined, options);\n          router.removePage($pagesInView[_i2]);\n          if (dynamicNavbar && oldNavbarEl) {\n            removedNavbarEls.push(oldNavbarEl);\n            router.removeNavbar(oldNavbarEl);\n          }\n        }\n      }\n    }\n    $oldPage = $viewEl.children('.page:not(.stacked)').filter(function (index, pageEl) {\n      return pageEl !== $newPage[0] && removedPageEls.indexOf(pageEl) < 0;\n    });\n    if (dynamicNavbar) {\n      $oldNavbarEl = $navbarsEl.children('.navbar:not(.stacked)').filter(function (index, navbarEl) {\n        return navbarEl !== $newNavbarEl[0] && removedNavbarEls.indexOf(removedNavbarEls) < 0;\n      });\n    }\n    removedPageEls = [];\n    removedNavbarEls = [];\n  }\n  if (isDetail && !options.reloadAll) {\n    if ($oldPage.length > 1 || reloadDetail) {\n      $oldPage = $oldPage.filter(function (pageIndex, pageEl) {\n        return !pageEl.classList.contains('page-master');\n      });\n    }\n    if ($oldNavbarEl && ($oldNavbarEl.length > 1 || reloadDetail)) {\n      $oldNavbarEl = $oldNavbarEl.filter(function (navbarIndex, navbarEl) {\n        return !navbarEl.classList.contains('navbar-master');\n      });\n    }\n  }\n\n  // Push State\n  if (router.params.pushState && (options.pushState || options.replaceState) && !options.reloadPrevious) {\n    var pushStateRoot = router.params.pushStateRoot || '';\n    utils_history[options.reloadCurrent || reloadDetail && otherDetailPageEl || options.reloadAll || options.replaceState ? 'replace' : 'push'](view.id, {\n      url: options.route.url\n    }, pushStateRoot + router.params.pushStateSeparator + options.route.url);\n  }\n  if (!options.reloadPrevious) {\n    // Current Page & Navbar\n    router.currentPageEl = $newPage[0];\n    if (dynamicNavbar && $newNavbarEl.length) {\n      router.currentNavbarEl = $newNavbarEl[0];\n    } else {\n      delete router.currentNavbarEl;\n    }\n\n    // Current Route\n    router.currentRoute = options.route;\n  }\n\n  // Update router history\n  var url = options.route.url;\n  if (options.history) {\n    if (((options.reloadCurrent || reloadDetail && otherDetailPageEl) && router.history.length) > 0 || options.replaceState) {\n      router.history[router.history.length - (options.reloadPrevious ? 2 : 1)] = url;\n    } else if (options.reloadPrevious) {\n      router.history[router.history.length - 2] = url;\n    } else if (options.reloadAll) {\n      router.history = [url];\n    } else {\n      router.history.push(url);\n    }\n  }\n  router.saveHistory();\n\n  // Insert new page and navbar\n  var newPageInDom = $newPage.parents(ssr_window_esm[\"document\"]).length > 0;\n  var f7Component = $newPage[0].f7Component;\n  if (options.reloadPrevious) {\n    if (f7Component && !newPageInDom) {\n      f7Component.$mount(function (componentEl) {\n        Object(dom7_module[\"default\"])(componentEl).insertBefore($oldPage);\n      });\n    } else {\n      $newPage.insertBefore($oldPage);\n    }\n    if (dynamicNavbar && $newNavbarEl.length) {\n      if ($newNavbarEl.find('.title-large').length) {\n        $newNavbarEl.addClass('navbar-large');\n      }\n      if ($oldNavbarEl.length) {\n        $newNavbarEl.insertBefore($oldNavbarEl);\n      } else {\n        if (!router.$navbarsEl.parents(ssr_window_esm[\"document\"]).length) {\n          router.$el.prepend(router.$navbarsEl);\n        }\n        $navbarsEl.append($newNavbarEl);\n      }\n    }\n  } else {\n    if ($oldPage.next('.page')[0] !== $newPage[0]) {\n      if (f7Component && !newPageInDom) {\n        f7Component.$mount(function (componentEl) {\n          $viewEl.append(componentEl);\n        });\n      } else {\n        $viewEl.append($newPage[0]);\n      }\n    }\n    if (dynamicNavbar && $newNavbarEl.length) {\n      if ($newNavbarEl.find('.title-large').length) {\n        $newNavbarEl.addClass('navbar-large');\n      }\n      if (!router.$navbarsEl.parents(ssr_window_esm[\"document\"]).length) {\n        router.$el.prepend(router.$navbarsEl);\n      }\n      $navbarsEl.append($newNavbarEl[0]);\n    }\n  }\n  if (!newPageInDom) {\n    router.pageCallback('mounted', $newPage, $newNavbarEl, newPagePosition, reload ? newPagePosition : 'current', options, $oldPage);\n  } else if (options.route && options.route.route && options.route.route.keepAlive && !$newPage[0].f7PageMounted) {\n    $newPage[0].f7PageMounted = true;\n    router.pageCallback('mounted', $newPage, $newNavbarEl, newPagePosition, reload ? newPagePosition : 'current', options, $oldPage);\n  }\n\n  // Remove old page\n  if ((options.reloadCurrent || reloadDetail) && $oldPage.length > 0) {\n    if (router.params.stackPages && router.initialPages.indexOf($oldPage[0]) >= 0) {\n      $oldPage.addClass('stacked');\n      $oldPage.trigger('page:stack');\n      router.emit('pageStack', $oldPage[0]);\n      if (dynamicNavbar) {\n        $oldNavbarEl.addClass('stacked');\n      }\n    } else {\n      // Page remove event\n      router.pageCallback('beforeOut', $oldPage, $oldNavbarEl, 'current', undefined, options);\n      router.pageCallback('afterOut', $oldPage, $oldNavbarEl, 'current', undefined, options);\n      router.pageCallback('beforeRemove', $oldPage, $oldNavbarEl, 'current', undefined, options);\n      router.removePage($oldPage);\n      if (dynamicNavbar && $oldNavbarEl && $oldNavbarEl.length) {\n        router.removeNavbar($oldNavbarEl);\n      }\n    }\n  } else if (options.reloadAll) {\n    $oldPage.each(function (index, pageEl) {\n      var $oldPageEl = Object(dom7_module[\"default\"])(pageEl);\n      var $oldNavbarElEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($oldPageEl));\n      if (router.params.stackPages && router.initialPages.indexOf($oldPageEl[0]) >= 0) {\n        $oldPageEl.addClass('stacked');\n        $oldPageEl.trigger('page:stack');\n        router.emit('pageStack', $oldPageEl[0]);\n        if (dynamicNavbar) {\n          $oldNavbarElEl.addClass('stacked');\n        }\n      } else {\n        // Page remove event\n        if ($oldPageEl.hasClass('page-current')) {\n          router.pageCallback('beforeOut', $oldPage, $oldNavbarEl, 'current', undefined, options);\n          router.pageCallback('afterOut', $oldPage, $oldNavbarEl, 'current', undefined, options);\n        }\n        router.pageCallback('beforeRemove', $oldPageEl, $oldNavbarEl && $oldNavbarEl.eq(index), 'previous', undefined, options);\n        router.removePage($oldPageEl);\n        if (dynamicNavbar && $oldNavbarElEl.length) {\n          router.removeNavbar($oldNavbarElEl);\n        }\n      }\n    });\n  } else if (options.reloadPrevious) {\n    if (router.params.stackPages && router.initialPages.indexOf($oldPage[0]) >= 0) {\n      $oldPage.addClass('stacked');\n      $oldPage.trigger('page:stack');\n      router.emit('pageStack', $oldPage[0]);\n      if (dynamicNavbar) {\n        $oldNavbarEl.addClass('stacked');\n      }\n    } else {\n      // Page remove event\n      router.pageCallback('beforeRemove', $oldPage, $oldNavbarEl, 'previous', undefined, options);\n      router.removePage($oldPage);\n      if (dynamicNavbar && $oldNavbarEl && $oldNavbarEl.length) {\n        router.removeNavbar($oldNavbarEl);\n      }\n    }\n  }\n\n  // Load Tab\n  if (options.route.route.tab) {\n    router.tabLoad(options.route.route.tab, utils[\"default\"].extend({}, options, {\n      history: false,\n      pushState: false\n    }));\n  }\n\n  // Check master detail\n  if (masterDetailEnabled) {\n    view.checkMasterDetailBreakpoint();\n  }\n\n  // Page init and before init events\n  router.pageCallback('init', $newPage, $newNavbarEl, newPagePosition, reload ? newPagePosition : 'current', options, $oldPage);\n  if (options.reloadCurrent || options.reloadAll || reloadDetail) {\n    router.allowPageChange = true;\n    router.pageCallback('beforeIn', $newPage, $newNavbarEl, newPagePosition, 'current', options);\n    $newPage.removeAttr('aria-hidden');\n    if (dynamicNavbar && $newNavbarEl) {\n      $newNavbarEl.removeAttr('aria-hidden');\n    }\n    router.pageCallback('afterIn', $newPage, $newNavbarEl, newPagePosition, 'current', options);\n    if (options.reloadCurrent && options.clearPreviousHistory) router.clearPreviousHistory();\n    if (reloadDetail) {\n      router.setPagePosition(Object(dom7_module[\"default\"])(masterPageEl), 'previous');\n      if (masterPageEl.f7Page && masterPageEl.f7Page.navbarEl) {\n        router.setNavbarPosition(Object(dom7_module[\"default\"])(masterPageEl.f7Page.navbarEl), 'previous');\n      }\n    }\n    return router;\n  }\n  if (options.reloadPrevious) {\n    router.allowPageChange = true;\n    return router;\n  }\n\n  // Before animation event\n  router.pageCallback('beforeOut', $oldPage, $oldNavbarEl, 'current', 'previous', options);\n  router.pageCallback('beforeIn', $newPage, $newNavbarEl, 'next', 'current', options);\n\n  // Animation\n  function afterAnimation() {\n    router.setPagePosition($newPage, 'current', false);\n    router.setPagePosition($oldPage, 'previous', !$oldPage.hasClass('page-master'));\n    if (dynamicNavbar) {\n      router.setNavbarPosition($newNavbarEl, 'current', false);\n      router.setNavbarPosition($oldNavbarEl, 'previous', !$oldNavbarEl.hasClass('navbar-master'));\n    }\n    // After animation event\n    router.allowPageChange = true;\n    router.pageCallback('afterOut', $oldPage, $oldNavbarEl, 'current', 'previous', options);\n    router.pageCallback('afterIn', $newPage, $newNavbarEl, 'next', 'current', options);\n    var keepOldPage = (router.params.preloadPreviousPage || router.params[\"\".concat(app.theme, \"SwipeBack\")]) && !isMaster;\n    if (!keepOldPage) {\n      if ($newPage.hasClass('smart-select-page') || $newPage.hasClass('photo-browser-page') || $newPage.hasClass('autocomplete-page') || $newPage.hasClass('color-picker-page')) {\n        keepOldPage = true;\n      }\n    }\n    if (!keepOldPage) {\n      if (router.params.stackPages) {\n        $oldPage.addClass('stacked');\n        $oldPage.trigger('page:stack');\n        router.emit('pageStack', $oldPage[0]);\n        if (dynamicNavbar) {\n          $oldNavbarEl.addClass('stacked');\n        }\n      } else if (!($newPage.attr('data-name') && $newPage.attr('data-name') === 'smart-select-page')) {\n        // Remove event\n        router.pageCallback('beforeRemove', $oldPage, $oldNavbarEl, 'previous', undefined, options);\n        router.removePage($oldPage);\n        if (dynamicNavbar && $oldNavbarEl.length) {\n          router.removeNavbar($oldNavbarEl);\n        }\n      }\n    }\n    if (options.clearPreviousHistory) router.clearPreviousHistory();\n    router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n    if (router.params.pushState) {\n      utils_history.clearRouterQueue();\n    }\n  }\n  function setPositionClasses() {\n    router.setPagePosition($oldPage, 'current', false);\n    router.setPagePosition($newPage, 'next', false);\n    if (dynamicNavbar) {\n      router.setNavbarPosition($oldNavbarEl, 'current', false);\n      router.setNavbarPosition($newNavbarEl, 'next', false);\n    }\n  }\n  if (options.animate && !(isMaster && app.width >= router.params.masterDetailBreakpoint)) {\n    var delay = router.params[\"\".concat(router.app.theme, \"PageLoadDelay\")];\n    var transition = router.params.transition;\n    if (options.transition) transition = options.transition;\n    if (!transition && router.currentRoute && router.currentRoute.route) {\n      transition = router.currentRoute.route.transition;\n    }\n    if (!transition && router.currentRoute && router.currentRoute.route.options) {\n      transition = router.currentRoute.route.options.transition;\n    }\n    if (transition) {\n      $newPage[0].f7PageTransition = transition;\n    }\n    if (delay) {\n      setTimeout(function () {\n        setPositionClasses();\n        router.animate($oldPage, $newPage, $oldNavbarEl, $newNavbarEl, 'forward', transition, function () {\n          afterAnimation();\n        });\n      }, delay);\n    } else {\n      setPositionClasses();\n      router.animate($oldPage, $newPage, $oldNavbarEl, $newNavbarEl, 'forward', transition, function () {\n        afterAnimation();\n      });\n    }\n  } else {\n    afterAnimation();\n  }\n  return router;\n}\nfunction navigate_load() {\n  var loadParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var loadOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var ignorePageChange = arguments.length > 2 ? arguments[2] : undefined;\n  var router = this;\n  if (!router.allowPageChange && !ignorePageChange) return router;\n  var params = loadParams;\n  var options = loadOptions;\n  var url = params.url,\n    content = params.content,\n    el = params.el,\n    pageName = params.pageName,\n    template = params.template,\n    templateUrl = params.templateUrl,\n    component = params.component,\n    componentUrl = params.componentUrl;\n  if (!options.reloadCurrent && options.route && options.route.route && options.route.route.parentPath && router.currentRoute.route && router.currentRoute.route.parentPath === options.route.route.parentPath) {\n    // Do something nested\n    if (options.route.url === router.url) {\n      router.allowPageChange = true;\n      return false;\n    }\n    // Check for same params\n    var sameParams = Object.keys(options.route.params).length === Object.keys(router.currentRoute.params).length;\n    if (sameParams) {\n      // Check for equal params name\n      Object.keys(options.route.params).forEach(function (paramName) {\n        if (!(paramName in router.currentRoute.params) || router.currentRoute.params[paramName] !== options.route.params[paramName]) {\n          sameParams = false;\n        }\n      });\n    }\n    if (sameParams) {\n      if (options.route.route.tab) {\n        return router.tabLoad(options.route.route.tab, options);\n      }\n      return false;\n    }\n    if (!sameParams && options.route.route.tab && router.currentRoute.route.tab && router.currentRoute.parentPath === options.route.parentPath) {\n      return router.tabLoad(options.route.route.tab, options);\n    }\n  }\n  if (options.route && options.route.url && router.url === options.route.url && !(options.reloadCurrent || options.reloadPrevious) && !router.params.allowDuplicateUrls) {\n    router.allowPageChange = true;\n    return false;\n  }\n  if (!options.route && url) {\n    options.route = router.parseRouteUrl(url);\n    utils[\"default\"].extend(options.route, {\n      route: {\n        url: url,\n        path: url\n      }\n    });\n  }\n\n  // Component Callbacks\n  function resolve(pageEl, newOptions) {\n    return router.forward(pageEl, utils[\"default\"].extend(options, newOptions));\n  }\n  function reject() {\n    router.allowPageChange = true;\n    return router;\n  }\n  if (url || templateUrl || componentUrl || component) {\n    router.allowPageChange = false;\n  }\n\n  // Proceed\n  if (content) {\n    router.forward(router.getPageEl(content), options);\n  } else if (template || templateUrl) {\n    // Parse template and send page element\n    try {\n      router.pageTemplateLoader(template, templateUrl, options, resolve, reject);\n    } catch (err) {\n      router.allowPageChange = true;\n      throw err;\n    }\n  } else if (el) {\n    // Load page from specified HTMLElement or by page name in pages container\n    router.forward(router.getPageEl(el), options);\n  } else if (pageName) {\n    // Load page by page name in pages container\n    router.forward(router.$el.children(\".page[data-name=\\\"\".concat(pageName, \"\\\"]\")).eq(0), options);\n  } else if (component || componentUrl) {\n    // Load from component (F7/Vue/React/...)\n    try {\n      router.pageComponentLoader(router.el, component, componentUrl, options, resolve, reject);\n    } catch (err) {\n      router.allowPageChange = true;\n      throw err;\n    }\n  } else if (url) {\n    // Load using XHR\n    if (router.xhr) {\n      router.xhr.abort();\n      router.xhr = false;\n    }\n    router.xhrRequest(url, options).then(function (pageContent) {\n      router.forward(router.getPageEl(pageContent), options);\n    }).catch(function () {\n      router.allowPageChange = true;\n    });\n  }\n  return router;\n}\nfunction navigate_navigate(navigateParams) {\n  var navigateOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var router = this;\n  if (router.swipeBackActive) return router;\n  var url;\n  var createRoute;\n  var name;\n  var path;\n  var query;\n  var params;\n  var route;\n  if (typeof navigateParams === 'string') {\n    url = navigateParams;\n  } else {\n    url = navigateParams.url;\n    createRoute = navigateParams.route;\n    name = navigateParams.name;\n    path = navigateParams.path;\n    query = navigateParams.query;\n    params = navigateParams.params;\n  }\n  if (name || path) {\n    url = router.generateUrl({\n      path: path,\n      name: name,\n      params: params,\n      query: query\n    });\n    if (url) {\n      return router.navigate(url, navigateOptions);\n    }\n    return router;\n  }\n  var app = router.app;\n  app_router_check(router, 'navigate');\n  if (url === '#' || url === '') {\n    return router;\n  }\n  var navigateUrl = url.replace('./', '');\n  if (navigateUrl[0] !== '/' && navigateUrl.indexOf('#') !== 0) {\n    var currentPath = router.currentRoute.parentPath || router.currentRoute.path;\n    navigateUrl = ((currentPath ? \"\".concat(currentPath, \"/\") : '/') + navigateUrl).replace('///', '/').replace('//', '/');\n  }\n  if (createRoute) {\n    route = utils[\"default\"].extend(router.parseRouteUrl(navigateUrl), {\n      route: utils[\"default\"].extend({}, createRoute)\n    });\n  } else {\n    route = router.findMatchingRoute(navigateUrl);\n  }\n  if (!route) {\n    return router;\n  }\n  if (route.route && route.route.viewName) {\n    var anotherViewName = route.route.viewName;\n    var anotherView = app.views[anotherViewName];\n    if (!anotherView) {\n      throw new Error(\"Framework7: There is no View with \\\"\".concat(anotherViewName, \"\\\" name that was specified in this route\"));\n    }\n    if (anotherView !== router.view) {\n      return anotherView.router.navigate(navigateParams, navigateOptions);\n    }\n  }\n  if (route.route.redirect) {\n    return router_redirect.call(router, 'navigate', route, navigateOptions);\n  }\n  var options = {};\n  if (route.route.options) {\n    utils[\"default\"].extend(options, route.route.options, navigateOptions);\n  } else {\n    utils[\"default\"].extend(options, navigateOptions);\n  }\n  options.route = route;\n  if (options && options.context) {\n    route.context = options.context;\n    options.route.context = options.context;\n  }\n  function resolve() {\n    var routerLoaded = false;\n    'popup popover sheet loginScreen actions customModal panel'.split(' ').forEach(function (modalLoadProp) {\n      if (route.route[modalLoadProp] && !routerLoaded) {\n        routerLoaded = true;\n        router.modalLoad(modalLoadProp, route, options);\n      }\n    });\n    if (route.route.keepAlive && route.route.keepAliveData) {\n      router.load({\n        el: route.route.keepAliveData.pageEl\n      }, options, false);\n      routerLoaded = true;\n    }\n    'url content component pageName el componentUrl template templateUrl'.split(' ').forEach(function (pageLoadProp) {\n      if (route.route[pageLoadProp] && !routerLoaded) {\n        routerLoaded = true;\n        router.load(defineProperty_default()({}, pageLoadProp, route.route[pageLoadProp]), options, false);\n      }\n    });\n    if (routerLoaded) return;\n    // Async\n    function asyncResolve(resolveParams, resolveOptions) {\n      router.allowPageChange = false;\n      var resolvedAsModal = false;\n      if (resolveOptions && resolveOptions.context) {\n        if (!route.context) route.context = resolveOptions.context;else route.context = utils[\"default\"].extend({}, route.context, resolveOptions.context);\n        options.route.context = route.context;\n      }\n      'popup popover sheet loginScreen actions customModal panel'.split(' ').forEach(function (modalLoadProp) {\n        if (resolveParams[modalLoadProp]) {\n          resolvedAsModal = true;\n          var modalRoute = utils[\"default\"].extend({}, route, {\n            route: resolveParams\n          });\n          router.allowPageChange = true;\n          router.modalLoad(modalLoadProp, modalRoute, utils[\"default\"].extend(options, resolveOptions));\n        }\n      });\n      if (resolvedAsModal) return;\n      router.load(resolveParams, utils[\"default\"].extend(options, resolveOptions), true);\n    }\n    function asyncReject() {\n      router.allowPageChange = true;\n    }\n    if (route.route.async) {\n      router.allowPageChange = false;\n      route.route.async.call(router, options.route, router.currentRoute, asyncResolve, asyncReject);\n    }\n    if (route.route.asyncComponent) {\n      async_component(router, route.route.asyncComponent, asyncResolve, asyncReject);\n    }\n  }\n  function reject() {\n    router.allowPageChange = true;\n  }\n  if (router.params.masterDetailBreakpoint > 0 && route.route.masterRoute) {\n    // load detail route\n    var preloadMaster = true;\n    var masterLoaded = false;\n    if (router.currentRoute && router.currentRoute.route) {\n      if (router.currentRoute.route.master && (router.currentRoute.route === route.route.masterRoute || router.currentRoute.route.path === route.route.masterRoute.path)) {\n        preloadMaster = false;\n      }\n      if (router.currentRoute.route.masterRoute && (router.currentRoute.route.masterRoute === route.route.masterRoute || router.currentRoute.route.masterRoute.path === route.route.masterRoute.path)) {\n        preloadMaster = false;\n        masterLoaded = true;\n      }\n    }\n    if (preloadMaster || masterLoaded && navigateOptions.reloadAll) {\n      router.navigate({\n        path: route.route.masterRoute.path,\n        params: route.params || {}\n      }, {\n        animate: false,\n        reloadAll: navigateOptions.reloadAll,\n        reloadCurrent: navigateOptions.reloadCurrent,\n        reloadPrevious: navigateOptions.reloadPrevious,\n        pushState: !navigateOptions.initial,\n        history: !navigateOptions.initial,\n        once: {\n          pageAfterIn: function pageAfterIn() {\n            router.navigate(navigateParams, utils[\"default\"].extend({}, navigateOptions, {\n              animate: false,\n              reloadAll: false,\n              reloadCurrent: false,\n              reloadPrevious: false,\n              history: !navigateOptions.initial,\n              pushState: !navigateOptions.initial\n            }));\n          }\n        }\n      });\n      return router;\n    }\n  }\n  process_route_queue.call(router, route, router.currentRoute, function () {\n    if (route.route.modules) {\n      app.loadModules(Array.isArray(route.route.modules) ? route.route.modules : [route.route.modules]).then(function () {\n        resolve();\n      }).catch(function () {\n        reject();\n      });\n    } else {\n      resolve();\n    }\n  }, function () {\n    reject();\n  });\n\n  // Return Router\n  return router;\n}\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/tab.js\n\n\n\n\n\nfunction tabLoad(tabRoute) {\n  var loadOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var router = this;\n  var options = utils[\"default\"].extend({\n    animate: router.params.animate,\n    pushState: true,\n    history: true,\n    parentPageEl: null,\n    preload: false,\n    on: {}\n  }, loadOptions);\n  var currentRoute;\n  var previousRoute;\n  if (options.route) {\n    // Set Route\n    if (!options.preload && options.route !== router.currentRoute) {\n      previousRoute = router.previousRoute;\n      router.currentRoute = options.route;\n    }\n    if (options.preload) {\n      currentRoute = options.route;\n      previousRoute = router.currentRoute;\n    } else {\n      currentRoute = router.currentRoute;\n      if (!previousRoute) previousRoute = router.previousRoute;\n    }\n\n    // Update Browser History\n    if (router.params.pushState && options.pushState && !options.reloadPrevious) {\n      utils_history.replace(router.view.id, {\n        url: options.route.url\n      }, (router.params.pushStateRoot || '') + router.params.pushStateSeparator + options.route.url);\n    }\n\n    // Update Router History\n    if (options.history) {\n      router.history[Math.max(router.history.length - 1, 0)] = options.route.url;\n      router.saveHistory();\n    }\n  }\n\n  // Show Tab\n  var $parentPageEl = Object(dom7_module[\"default\"])(options.parentPageEl || router.currentPageEl);\n  var tabEl;\n  if ($parentPageEl.length && $parentPageEl.find(\"#\".concat(tabRoute.id)).length) {\n    tabEl = $parentPageEl.find(\"#\".concat(tabRoute.id)).eq(0);\n  } else if (router.view.selector) {\n    tabEl = \"\".concat(router.view.selector, \" #\").concat(tabRoute.id);\n  } else {\n    tabEl = \"#\".concat(tabRoute.id);\n  }\n  var tabShowResult = router.app.tab.show({\n    tabEl: tabEl,\n    animate: options.animate,\n    tabRoute: options.route\n  });\n  var $newTabEl = tabShowResult.$newTabEl,\n    $oldTabEl = tabShowResult.$oldTabEl,\n    animated = tabShowResult.animated,\n    onTabsChanged = tabShowResult.onTabsChanged;\n  if ($newTabEl && $newTabEl.parents('.page').length > 0 && options.route) {\n    var tabParentPageData = $newTabEl.parents('.page')[0].f7Page;\n    if (tabParentPageData && options.route) {\n      tabParentPageData.route = options.route;\n    }\n  }\n\n  // Tab Content Loaded\n  function onTabLoaded(contentEl) {\n    // Remove theme elements\n    router.removeThemeElements($newTabEl);\n    var tabEventTarget = $newTabEl;\n    if (typeof contentEl !== 'string') tabEventTarget = Object(dom7_module[\"default\"])(contentEl);\n    tabEventTarget.trigger('tab:init tab:mounted', tabRoute);\n    router.emit('tabInit tabMounted', $newTabEl[0], tabRoute);\n    if ($oldTabEl && $oldTabEl.length) {\n      if (animated) {\n        onTabsChanged(function () {\n          router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n          if (router.params.unloadTabContent) {\n            router.tabRemove($oldTabEl, $newTabEl, tabRoute);\n          }\n        });\n      } else {\n        router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n        if (router.params.unloadTabContent) {\n          router.tabRemove($oldTabEl, $newTabEl, tabRoute);\n        }\n      }\n    }\n  }\n  if ($newTabEl[0].f7RouterTabLoaded) {\n    if (!$oldTabEl || !$oldTabEl.length) return router;\n    if (animated) {\n      onTabsChanged(function () {\n        router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n      });\n    } else {\n      router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n    }\n    return router;\n  }\n\n  // Load Tab Content\n  function loadTab(loadTabParams, loadTabOptions) {\n    // Load Tab Props\n    var url = loadTabParams.url,\n      content = loadTabParams.content,\n      el = loadTabParams.el,\n      template = loadTabParams.template,\n      templateUrl = loadTabParams.templateUrl,\n      component = loadTabParams.component,\n      componentUrl = loadTabParams.componentUrl;\n    // Component/Template Callbacks\n    function resolve(contentEl) {\n      router.allowPageChange = true;\n      if (!contentEl) return;\n      if (typeof contentEl === 'string') {\n        $newTabEl.html(contentEl);\n      } else {\n        $newTabEl.html('');\n        if (contentEl.f7Component) {\n          contentEl.f7Component.$mount(function (componentEl) {\n            $newTabEl.append(componentEl);\n          });\n        } else {\n          $newTabEl.append(contentEl);\n        }\n      }\n      $newTabEl[0].f7RouterTabLoaded = true;\n      onTabLoaded(contentEl);\n    }\n    function reject() {\n      router.allowPageChange = true;\n      return router;\n    }\n    if (content) {\n      resolve(content);\n    } else if (template || templateUrl) {\n      try {\n        router.tabTemplateLoader(template, templateUrl, loadTabOptions, resolve, reject);\n      } catch (err) {\n        router.allowPageChange = true;\n        throw err;\n      }\n    } else if (el) {\n      resolve(el);\n    } else if (component || componentUrl) {\n      // Load from component (F7/Vue/React/...)\n      try {\n        router.tabComponentLoader($newTabEl[0], component, componentUrl, loadTabOptions, resolve, reject);\n      } catch (err) {\n        router.allowPageChange = true;\n        throw err;\n      }\n    } else if (url) {\n      // Load using XHR\n      if (router.xhr) {\n        router.xhr.abort();\n        router.xhr = false;\n      }\n      router.xhrRequest(url, loadTabOptions).then(function (tabContent) {\n        resolve(tabContent);\n      }).catch(function () {\n        router.allowPageChange = true;\n      });\n    }\n  }\n  var hasContentLoadProp;\n  'url content component el componentUrl template templateUrl'.split(' ').forEach(function (tabLoadProp) {\n    if (tabRoute[tabLoadProp]) {\n      hasContentLoadProp = true;\n      loadTab(defineProperty_default()({}, tabLoadProp, tabRoute[tabLoadProp]), options);\n    }\n  });\n\n  // Async\n  function asyncResolve(resolveParams, resolveOptions) {\n    loadTab(resolveParams, utils[\"default\"].extend(options, resolveOptions));\n  }\n  function asyncReject() {\n    router.allowPageChange = true;\n  }\n  if (tabRoute.async) {\n    tabRoute.async.call(router, currentRoute, previousRoute, asyncResolve, asyncReject);\n  } else if (tabRoute.asyncComponent) {\n    async_component(router, tabRoute.asyncComponent, asyncResolve, asyncReject);\n  } else if (!hasContentLoadProp) {\n    router.allowPageChange = true;\n  }\n  return router;\n}\nfunction tabRemove($oldTabEl, $newTabEl, tabRoute) {\n  var router = this;\n  var hasTabComponentChild;\n  if ($oldTabEl[0]) {\n    $oldTabEl[0].f7RouterTabLoaded = false;\n    delete $oldTabEl[0].f7RouterTabLoaded;\n  }\n  $oldTabEl.children().each(function (index, tabChild) {\n    if (tabChild.f7Component) {\n      hasTabComponentChild = true;\n      Object(dom7_module[\"default\"])(tabChild).trigger('tab:beforeremove', tabRoute);\n      tabChild.f7Component.$destroy();\n    }\n  });\n  if (!hasTabComponentChild) {\n    $oldTabEl.trigger('tab:beforeremove', tabRoute);\n  }\n  router.emit('tabBeforeRemove', $oldTabEl[0], $newTabEl[0], tabRoute);\n  router.removeTabContent($oldTabEl[0], tabRoute);\n}\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/modal.js\n\n\n\n\nfunction modalLoad(modalType, route) {\n  var loadOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var router = this;\n  var app = router.app;\n  var isPanel = modalType === 'panel';\n  var modalOrPanel = isPanel ? 'panel' : 'modal';\n  var options = utils[\"default\"].extend({\n    animate: router.params.animate,\n    pushState: true,\n    history: true,\n    on: {}\n  }, loadOptions);\n  var modalParams = utils[\"default\"].extend({}, route.route[modalType]);\n  var modalRoute = route.route;\n  function onModalLoaded() {\n    // Create Modal\n    var modal = app[modalType].create(modalParams);\n    modalRoute.modalInstance = modal;\n    var hasEl = modal.el;\n    function closeOnSwipeBack() {\n      modal.close();\n    }\n    modal.on(\"\".concat(modalOrPanel, \"Open\"), function () {\n      if (!hasEl) {\n        // Remove theme elements\n        router.removeThemeElements(modal.el);\n\n        // Emit events\n        modal.$el.trigger(\"\".concat(modalType.toLowerCase(), \":init \").concat(modalType.toLowerCase(), \":mounted\"), route, modal);\n        router.emit(\"\".concat(!isPanel ? 'modalInit' : '', \" \").concat(modalType, \"Init \").concat(modalType, \"Mounted\"), modal.el, route, modal);\n      }\n      router.once('swipeBackMove', closeOnSwipeBack);\n    });\n    modal.on(\"\".concat(modalOrPanel, \"Close\"), function () {\n      router.off('swipeBackMove', closeOnSwipeBack);\n      if (!modal.closeByRouter) {\n        router.back();\n      }\n    });\n    modal.on(\"\".concat(modalOrPanel, \"Closed\"), function () {\n      modal.$el.trigger(\"\".concat(modalType.toLowerCase(), \":beforeremove\"), route, modal);\n      modal.emit(\"\".concat(!isPanel ? 'modalBeforeRemove ' : '').concat(modalType, \"BeforeRemove\"), modal.el, route, modal);\n      var modalComponent = modal.el.f7Component;\n      if (modalComponent) {\n        modalComponent.$destroy();\n      }\n      utils[\"default\"].nextTick(function () {\n        if (modalComponent || modalParams.component) {\n          router.removeModal(modal.el);\n        }\n        modal.destroy();\n        delete modal.route;\n        delete modalRoute.modalInstance;\n      });\n    });\n    if (options.route) {\n      // Update Browser History\n      if (router.params.pushState && options.pushState) {\n        utils_history.push(router.view.id, {\n          url: options.route.url,\n          modal: modalType\n        }, (router.params.pushStateRoot || '') + router.params.pushStateSeparator + options.route.url);\n      }\n\n      // Set Route\n      if (options.route !== router.currentRoute) {\n        modal.route = utils[\"default\"].extend(options.route, {\n          modal: modal\n        });\n        router.currentRoute = modal.route;\n      }\n\n      // Update Router History\n      if (options.history) {\n        router.history.push(options.route.url);\n        router.saveHistory();\n      }\n    }\n    if (hasEl) {\n      // Remove theme elements\n      router.removeThemeElements(modal.el);\n\n      // Emit events\n      modal.$el.trigger(\"\".concat(modalType.toLowerCase(), \":init \").concat(modalType.toLowerCase(), \":mounted\"), route, modal);\n      router.emit(\"\".concat(modalOrPanel, \"Init \").concat(modalType, \"Init \").concat(modalType, \"Mounted\"), modal.el, route, modal);\n    }\n\n    // Open\n    modal.open();\n  }\n\n  // Load Modal Content\n  function loadModal(loadModalParams, loadModalOptions) {\n    // Load Modal Props\n    var url = loadModalParams.url,\n      content = loadModalParams.content,\n      template = loadModalParams.template,\n      templateUrl = loadModalParams.templateUrl,\n      component = loadModalParams.component,\n      componentUrl = loadModalParams.componentUrl;\n\n    // Component/Template Callbacks\n    function resolve(contentEl) {\n      if (contentEl) {\n        if (typeof contentEl === 'string') {\n          modalParams.content = contentEl;\n        } else if (contentEl.f7Component) {\n          contentEl.f7Component.$mount(function (componentEl) {\n            modalParams.el = componentEl;\n            app.root.append(componentEl);\n          });\n        } else {\n          modalParams.el = contentEl;\n        }\n        onModalLoaded();\n      }\n    }\n    function reject() {\n      router.allowPageChange = true;\n      return router;\n    }\n    if (content) {\n      resolve(content);\n    } else if (template || templateUrl) {\n      try {\n        router.modalTemplateLoader(template, templateUrl, loadModalOptions, resolve, reject);\n      } catch (err) {\n        router.allowPageChange = true;\n        throw err;\n      }\n    } else if (component || componentUrl) {\n      // Load from component (F7/Vue/React/...)\n      try {\n        router.modalComponentLoader(app.root[0], component, componentUrl, loadModalOptions, resolve, reject);\n      } catch (err) {\n        router.allowPageChange = true;\n        throw err;\n      }\n    } else if (url) {\n      // Load using XHR\n      if (router.xhr) {\n        router.xhr.abort();\n        router.xhr = false;\n      }\n      router.xhrRequest(url, loadModalOptions).then(function (modalContent) {\n        modalParams.content = modalContent;\n        onModalLoaded();\n      }).catch(function () {\n        router.allowPageChange = true;\n      });\n    } else {\n      onModalLoaded();\n    }\n  }\n  var foundLoadProp;\n  'url content component el componentUrl template templateUrl'.split(' ').forEach(function (modalLoadProp) {\n    if (modalParams[modalLoadProp] && !foundLoadProp) {\n      foundLoadProp = true;\n      loadModal(defineProperty_default()({}, modalLoadProp, modalParams[modalLoadProp]), options);\n    }\n  });\n  if (!foundLoadProp && modalType === 'actions') {\n    onModalLoaded();\n  }\n\n  // Async\n  function asyncResolve(resolveParams, resolveOptions) {\n    loadModal(resolveParams, utils[\"default\"].extend(options, resolveOptions));\n  }\n  function asyncReject() {\n    router.allowPageChange = true;\n  }\n  if (modalParams.async) {\n    modalParams.async.call(router, options.route, router.currentRoute, asyncResolve, asyncReject);\n  }\n  if (modalParams.asyncComponent) {\n    async_component(router, modalParams.asyncComponent, asyncResolve, asyncReject);\n  }\n  return router;\n}\nfunction modalRemove(modal) {\n  utils[\"default\"].extend(modal, {\n    closeByRouter: true\n  });\n  modal.close();\n}\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/back.js\n\n\n\n\n\n\n\n\n\n\n\nfunction backward(el, backwardOptions) {\n  var router = this;\n  var $el = Object(dom7_module[\"default\"])(el);\n  var app = router.app;\n  var view = router.view;\n  var options = utils[\"default\"].extend({\n    animate: router.params.animate,\n    pushState: true,\n    replaceState: false\n  }, backwardOptions);\n  var masterDetailEnabled = router.params.masterDetailBreakpoint > 0;\n  var isMaster = masterDetailEnabled && options.route && options.route.route && options.route.route.master === true;\n  var masterPageEl;\n  var masterPageRemoved;\n  var dynamicNavbar = router.dynamicNavbar;\n  var $newPage = $el;\n  var $oldPage = router.$el.children('.page-current');\n  var currentIsMaster = masterDetailEnabled && $oldPage.hasClass('page-master');\n  if ($newPage.length) {\n    // Remove theme elements\n    router.removeThemeElements($newPage);\n  }\n  var $navbarsEl;\n  var $newNavbarEl;\n  var $oldNavbarEl;\n  if (dynamicNavbar) {\n    $newNavbarEl = $newPage.children('.navbar');\n    $navbarsEl = router.$navbarsEl;\n    if ($newNavbarEl.length === 0 && $newPage[0] && $newPage[0].f7Page) {\n      // Try from pageData\n      $newNavbarEl = $newPage[0].f7Page.$navbarEl;\n    }\n    $oldNavbarEl = $navbarsEl.find('.navbar-current');\n  }\n  router.allowPageChange = false;\n  if ($newPage.length === 0 || $oldPage.length === 0) {\n    router.allowPageChange = true;\n    return router;\n  }\n\n  // Remove theme elements\n  router.removeThemeElements($newPage);\n\n  // Save Keep Alive Cache\n  if (options.route && options.route.route && options.route.route.keepAlive && !options.route.route.keepAliveData) {\n    options.route.route.keepAliveData = {\n      pageEl: $el[0]\n    };\n  }\n\n  // Pages In View\n  var isDetail;\n  var isDetailRoot;\n  if (masterDetailEnabled) {\n    var $pagesInView = router.$el.children('.page:not(.stacked)').filter(function (index, pageInView) {\n      return pageInView !== $newPage[0];\n    });\n\n    // Find Detail' master page\n    for (var i = 0; i < $pagesInView.length; i += 1) {\n      if (!masterPageEl && $pagesInView[i].classList.contains('page-master')) {\n        masterPageEl = $pagesInView[i];\n        continue; // eslint-disable-line\n      }\n    }\n    isDetail = !isMaster && masterPageEl && router.history.indexOf(options.route.url) > router.history.indexOf(masterPageEl.f7Page.route.url);\n    if (!isDetail && !isMaster && masterPageEl && masterPageEl.f7Page && options.route.route.masterRoute) {\n      isDetail = options.route.route.masterRoute.path === masterPageEl.f7Page.route.route.path;\n    }\n  }\n  if (isDetail && masterPageEl && masterPageEl.f7Page) {\n    isDetailRoot = router.history.indexOf(options.route.url) - router.history.indexOf(masterPageEl.f7Page.route.url) === 1;\n  }\n\n  // New Page\n  $newPage.addClass(\"page-previous\".concat(isMaster ? ' page-master' : '').concat(isDetail ? ' page-master-detail' : '').concat(isDetailRoot ? ' page-master-detail-root' : '')).removeClass('stacked').removeAttr('aria-hidden').trigger('page:unstack').trigger('page:position', {\n    position: 'previous'\n  });\n  router.emit('pageUnstack', $newPage[0]);\n  router.emit('pagePosition', $newPage[0], 'previous');\n  if (isMaster || isDetail) {\n    $newPage.trigger('page:role', {\n      role: isMaster ? 'master' : 'detail',\n      root: !!isDetailRoot\n    });\n    router.emit('pageRole', $newPage[0], {\n      role: isMaster ? 'master' : 'detail',\n      detailRoot: !!isDetailRoot\n    });\n  }\n  if (dynamicNavbar && $newNavbarEl.length > 0) {\n    $newNavbarEl.addClass(\"navbar-previous\".concat(isMaster ? ' navbar-master' : '').concat(isDetail ? ' navbar-master-detail' : '').concat(isDetailRoot ? ' navbar-master-detail-root' : '')).removeClass('stacked').removeAttr('aria-hidden');\n    $newNavbarEl.trigger('navbar:position', {\n      position: 'previous'\n    });\n    router.emit('navbarPosition', $newNavbarEl[0], 'previous');\n    if (isMaster || isDetailRoot) {\n      router.emit('navbarRole', $newNavbarEl[0], {\n        role: isMaster ? 'master' : 'detail',\n        detailRoot: !!isDetailRoot\n      });\n    }\n  }\n\n  // Remove previous page in case of \"forced\"\n  var backIndex;\n  if (options.force) {\n    if ($oldPage.prev('.page-previous:not(.stacked)').length > 0 || $oldPage.prev('.page-previous').length === 0) {\n      if (router.history.indexOf(options.route.url) >= 0) {\n        backIndex = router.history.length - router.history.indexOf(options.route.url) - 1;\n        router.history = router.history.slice(0, router.history.indexOf(options.route.url) + 2);\n        view.history = router.history;\n      } else if (router.history[[router.history.length - 2]]) {\n        router.history[router.history.length - 2] = options.route.url;\n      } else {\n        router.history.unshift(router.url);\n      }\n      if (backIndex && router.params.stackPages) {\n        $oldPage.prevAll('.page-previous').each(function (index, pageToRemove) {\n          var $pageToRemove = Object(dom7_module[\"default\"])(pageToRemove);\n          var $navbarToRemove;\n          if (dynamicNavbar) {\n            // $navbarToRemove = $oldNavbarEl.prevAll('.navbar-previous').eq(index);\n            $navbarToRemove = Object(dom7_module[\"default\"])(app.navbar.getElByPage($pageToRemove));\n          }\n          if ($pageToRemove[0] !== $newPage[0] && $pageToRemove.index() > $newPage.index()) {\n            if (router.initialPages.indexOf($pageToRemove[0]) >= 0) {\n              $pageToRemove.addClass('stacked');\n              $pageToRemove.trigger('page:stack');\n              router.emit('pageStack', $pageToRemove[0]);\n              if (dynamicNavbar) {\n                $navbarToRemove.addClass('stacked');\n              }\n            } else {\n              router.pageCallback('beforeRemove', $pageToRemove, $navbarToRemove, 'previous', undefined, options);\n              if ($pageToRemove[0] === masterPageEl) {\n                masterPageRemoved = true;\n              }\n              router.removePage($pageToRemove);\n              if (dynamicNavbar && $navbarToRemove.length > 0) {\n                router.removeNavbar($navbarToRemove);\n              }\n            }\n          }\n        });\n      } else {\n        var $pageToRemove = $oldPage.prev('.page-previous:not(.stacked)');\n        var $navbarToRemove;\n        if (dynamicNavbar) {\n          // $navbarToRemove = $oldNavbarEl.prev('.navbar-inner:not(.stacked)');\n          $navbarToRemove = Object(dom7_module[\"default\"])(app.navbar.getElByPage($pageToRemove));\n        }\n        if (router.params.stackPages && router.initialPages.indexOf($pageToRemove[0]) >= 0) {\n          $pageToRemove.addClass('stacked');\n          $pageToRemove.trigger('page:stack');\n          router.emit('pageStack', $pageToRemove[0]);\n          $navbarToRemove.addClass('stacked');\n        } else if ($pageToRemove.length > 0) {\n          router.pageCallback('beforeRemove', $pageToRemove, $navbarToRemove, 'previous', undefined, options);\n          if ($pageToRemove[0] === masterPageEl) {\n            masterPageRemoved = true;\n          }\n          router.removePage($pageToRemove);\n          if (dynamicNavbar && $navbarToRemove.length) {\n            router.removeNavbar($navbarToRemove);\n          }\n        }\n      }\n    }\n  }\n\n  // Insert new page\n  var newPageInDom = $newPage.parents(ssr_window_esm[\"document\"]).length > 0;\n  var f7Component = $newPage[0].f7Component;\n  function insertPage() {\n    if ($newPage.next($oldPage).length === 0) {\n      if (!newPageInDom && f7Component) {\n        f7Component.$mount(function (componentEl) {\n          Object(dom7_module[\"default\"])(componentEl).insertBefore($oldPage);\n        });\n      } else {\n        $newPage.insertBefore($oldPage);\n      }\n    }\n    if (dynamicNavbar && $newNavbarEl.length) {\n      if ($newNavbarEl.find('.title-large').length) {\n        $newNavbarEl.addClass('navbar-large');\n      }\n      $newNavbarEl.insertBefore($oldNavbarEl);\n      if ($oldNavbarEl.length > 0) {\n        $newNavbarEl.insertBefore($oldNavbarEl);\n      } else {\n        if (!router.$navbarsEl.parents(ssr_window_esm[\"document\"]).length) {\n          router.$el.prepend(router.$navbarsEl);\n        }\n        $navbarsEl.append($newNavbarEl);\n      }\n    }\n    if (!newPageInDom) {\n      router.pageCallback('mounted', $newPage, $newNavbarEl, 'previous', 'current', options, $oldPage);\n    } else if (options.route && options.route.route && options.route.route.keepAlive && !$newPage[0].f7PageMounted) {\n      $newPage[0].f7PageMounted = true;\n      router.pageCallback('mounted', $newPage, $newNavbarEl, 'previous', 'current', options, $oldPage);\n    }\n  }\n  if (options.preload) {\n    // Insert Page\n    insertPage();\n    // Tab route\n    if (options.route.route.tab) {\n      router.tabLoad(options.route.route.tab, utils[\"default\"].extend({}, options, {\n        history: false,\n        pushState: false,\n        preload: true\n      }));\n    }\n    if (isMaster) {\n      $newPage.removeClass('page-master-stacked').trigger('page:masterunstack');\n      router.emit('pageMasterUnstack', $newPage[0]);\n      if (dynamicNavbar) {\n        Object(dom7_module[\"default\"])(app.navbar.getElByPage($newPage)).removeClass('navbar-master-stacked');\n        router.emit('navbarMasterUnstack', app.navbar.getElByPage($newPage));\n      }\n    }\n    // Page init and before init events\n    router.pageCallback('init', $newPage, $newNavbarEl, 'previous', 'current', options, $oldPage);\n    var $previousPages = $newPage.prevAll('.page-previous:not(.stacked):not(.page-master)');\n    if ($previousPages.length > 0) {\n      $previousPages.each(function (index, pageToRemove) {\n        var $pageToRemove = Object(dom7_module[\"default\"])(pageToRemove);\n        var $navbarToRemove;\n        if (dynamicNavbar) {\n          // $navbarToRemove = $newNavbarEl.prevAll('.navbar-previous:not(.stacked)').eq(index);\n          $navbarToRemove = Object(dom7_module[\"default\"])(app.navbar.getElByPage($pageToRemove));\n        }\n        if (router.params.stackPages && router.initialPages.indexOf(pageToRemove) >= 0) {\n          $pageToRemove.addClass('stacked');\n          $pageToRemove.trigger('page:stack');\n          router.emit('pageStack', $pageToRemove[0]);\n          if (dynamicNavbar) {\n            $navbarToRemove.addClass('stacked');\n          }\n        } else {\n          router.pageCallback('beforeRemove', $pageToRemove, $navbarToRemove, 'previous', undefined);\n          router.removePage($pageToRemove);\n          if (dynamicNavbar && $navbarToRemove.length) {\n            router.removeNavbar($navbarToRemove);\n          }\n        }\n      });\n    }\n    router.allowPageChange = true;\n    return router;\n  }\n\n  // History State\n  if (!(device[\"default\"].ie || device[\"default\"].edge || device[\"default\"].firefox && !device[\"default\"].ios)) {\n    if (router.params.pushState && options.pushState) {\n      if (options.replaceState) {\n        var pushStateRoot = router.params.pushStateRoot || '';\n        utils_history.replace(view.id, {\n          url: options.route.url\n        }, pushStateRoot + router.params.pushStateSeparator + options.route.url);\n      } else if (backIndex) {\n        utils_history.go(-backIndex);\n      } else {\n        utils_history.back();\n      }\n    }\n  }\n\n  // Update History\n  if (options.replaceState) {\n    router.history[router.history.length - 1] = options.route.url;\n  } else {\n    if (router.history.length === 1) {\n      router.history.unshift(router.url);\n    }\n    router.history.pop();\n  }\n  router.saveHistory();\n\n  // Current Page & Navbar\n  router.currentPageEl = $newPage[0];\n  if (dynamicNavbar && $newNavbarEl.length) {\n    router.currentNavbarEl = $newNavbarEl[0];\n  } else {\n    delete router.currentNavbarEl;\n  }\n\n  // Current Route\n  router.currentRoute = options.route;\n\n  // History State\n  if (device[\"default\"].ie || device[\"default\"].edge || device[\"default\"].firefox && !device[\"default\"].ios) {\n    if (router.params.pushState && options.pushState) {\n      if (options.replaceState) {\n        var _pushStateRoot = router.params.pushStateRoot || '';\n        utils_history.replace(view.id, {\n          url: options.route.url\n        }, _pushStateRoot + router.params.pushStateSeparator + options.route.url);\n      } else if (backIndex) {\n        utils_history.go(-backIndex);\n      } else {\n        utils_history.back();\n      }\n    }\n  }\n\n  // Insert Page\n  insertPage();\n\n  // Load Tab\n  if (options.route.route.tab) {\n    router.tabLoad(options.route.route.tab, utils[\"default\"].extend({}, options, {\n      history: false,\n      pushState: false\n    }));\n  }\n\n  // Check master detail\n\n  if (masterDetailEnabled && (currentIsMaster || masterPageRemoved)) {\n    view.checkMasterDetailBreakpoint(false);\n  }\n\n  // Page init and before init events\n  router.pageCallback('init', $newPage, $newNavbarEl, 'previous', 'current', options, $oldPage);\n\n  // Before animation callback\n  router.pageCallback('beforeOut', $oldPage, $oldNavbarEl, 'current', 'next', options);\n  router.pageCallback('beforeIn', $newPage, $newNavbarEl, 'previous', 'current', options);\n\n  // Animation\n  function afterAnimation() {\n    // Set classes\n    router.setPagePosition($newPage, 'current', false);\n    router.setPagePosition($oldPage, 'next', true);\n    if (dynamicNavbar) {\n      router.setNavbarPosition($newNavbarEl, 'current', false);\n      router.setNavbarPosition($oldNavbarEl, 'next', true);\n    }\n\n    // After animation event\n    router.pageCallback('afterOut', $oldPage, $oldNavbarEl, 'current', 'next', options);\n    router.pageCallback('afterIn', $newPage, $newNavbarEl, 'previous', 'current', options);\n\n    // Remove Old Page\n    if (router.params.stackPages && router.initialPages.indexOf($oldPage[0]) >= 0) {\n      $oldPage.addClass('stacked');\n      $oldPage.trigger('page:stack');\n      router.emit('pageStack', $oldPage[0]);\n      if (dynamicNavbar) {\n        $oldNavbarEl.addClass('stacked');\n      }\n    } else {\n      router.pageCallback('beforeRemove', $oldPage, $oldNavbarEl, 'next', undefined, options);\n      router.removePage($oldPage);\n      if (dynamicNavbar && $oldNavbarEl.length) {\n        router.removeNavbar($oldNavbarEl);\n      }\n    }\n    router.allowPageChange = true;\n    router.emit('routeChanged', router.currentRoute, router.previousRoute, router);\n\n    // Preload previous page\n    var preloadPreviousPage = router.params.preloadPreviousPage || router.params[\"\".concat(app.theme, \"SwipeBack\")];\n    if (preloadPreviousPage && router.history[router.history.length - 2] && !isMaster) {\n      router.back(router.history[router.history.length - 2], {\n        preload: true\n      });\n    }\n    if (router.params.pushState) {\n      utils_history.clearRouterQueue();\n    }\n  }\n  function setPositionClasses() {\n    router.setPagePosition($oldPage, 'current');\n    router.setPagePosition($newPage, 'previous', false);\n    if (dynamicNavbar) {\n      router.setNavbarPosition($oldNavbarEl, 'current');\n      router.setNavbarPosition($newNavbarEl, 'previous', false);\n    }\n  }\n  if (options.animate && !(currentIsMaster && app.width >= router.params.masterDetailBreakpoint)) {\n    var transition = router.params.transition;\n    if ($oldPage[0] && $oldPage[0].f7PageTransition) {\n      transition = $oldPage[0].f7PageTransition;\n      delete $oldPage[0].f7PageTransition;\n    }\n    if (options.transition) transition = options.transition;\n    if (!transition && router.previousRoute && router.previousRoute.route) {\n      transition = router.previousRoute.route.transition;\n    }\n    if (!transition && router.previousRoute && router.previousRoute.route && router.previousRoute.route.options) {\n      transition = router.previousRoute.route.options.transition;\n    }\n    setPositionClasses();\n    router.animate($oldPage, $newPage, $oldNavbarEl, $newNavbarEl, 'backward', transition, function () {\n      afterAnimation();\n    });\n  } else {\n    afterAnimation();\n  }\n  return router;\n}\nfunction loadBack(backParams, backOptions, ignorePageChange) {\n  var router = this;\n  if (!router.allowPageChange && !ignorePageChange) return router;\n  var params = backParams;\n  var options = backOptions;\n  var url = params.url,\n    content = params.content,\n    el = params.el,\n    pageName = params.pageName,\n    template = params.template,\n    templateUrl = params.templateUrl,\n    component = params.component,\n    componentUrl = params.componentUrl;\n  if (options.route.url && router.url === options.route.url && !(options.reloadCurrent || options.reloadPrevious) && !router.params.allowDuplicateUrls) {\n    return false;\n  }\n  if (!options.route && url) {\n    options.route = router.parseRouteUrl(url);\n  }\n\n  // Component Callbacks\n  function resolve(pageEl, newOptions) {\n    return router.backward(pageEl, utils[\"default\"].extend(options, newOptions));\n  }\n  function reject() {\n    router.allowPageChange = true;\n    return router;\n  }\n  if (url || templateUrl || componentUrl || component) {\n    router.allowPageChange = false;\n  }\n\n  // Proceed\n  if (content) {\n    router.backward(router.getPageEl(content), options);\n  } else if (template || templateUrl) {\n    // Parse template and send page element\n    try {\n      router.pageTemplateLoader(template, templateUrl, options, resolve, reject);\n    } catch (err) {\n      router.allowPageChange = true;\n      throw err;\n    }\n  } else if (el) {\n    // Load page from specified HTMLElement or by page name in pages container\n    router.backward(router.getPageEl(el), options);\n  } else if (pageName) {\n    // Load page by page name in pages container\n    router.backward(router.$el.children(\".page[data-name=\\\"\".concat(pageName, \"\\\"]\")).eq(0), options);\n  } else if (component || componentUrl) {\n    // Load from component (F7/Vue/React/...)\n    try {\n      router.pageComponentLoader(router.el, component, componentUrl, options, resolve, reject);\n    } catch (err) {\n      router.allowPageChange = true;\n      throw err;\n    }\n  } else if (url) {\n    // Load using XHR\n    if (router.xhr) {\n      router.xhr.abort();\n      router.xhr = false;\n    }\n    router.xhrRequest(url, options).then(function (pageContent) {\n      router.backward(router.getPageEl(pageContent), options);\n    }).catch(function () {\n      router.allowPageChange = true;\n    });\n  }\n  return router;\n}\nfunction back_back() {\n  var router = this;\n  if (router.swipeBackActive) return router;\n  var navigateUrl;\n  var navigateOptions;\n  var route;\n  if (typeof_default()(arguments.length <= 0 ? undefined : arguments[0]) === 'object') {\n    navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};\n  } else {\n    navigateUrl = arguments.length <= 0 ? undefined : arguments[0];\n    navigateOptions = (arguments.length <= 1 ? undefined : arguments[1]) || {};\n  }\n  var _navigateOptions = navigateOptions,\n    name = _navigateOptions.name,\n    params = _navigateOptions.params,\n    query = _navigateOptions.query;\n  if (name) {\n    navigateUrl = router.generateUrl({\n      name: name,\n      params: params,\n      query: query\n    });\n    if (navigateUrl) {\n      return router.back(navigateUrl, utils[\"default\"].extend({}, navigateOptions, {\n        name: null,\n        params: null,\n        query: null\n      }));\n    }\n    return router;\n  }\n  var app = router.app;\n  app_router_check(router, 'back');\n  var currentRouteIsModal = router.currentRoute.modal;\n  var modalType;\n  if (!currentRouteIsModal) {\n    'popup popover sheet loginScreen actions customModal panel'.split(' ').forEach(function (modalLoadProp) {\n      if (router.currentRoute.route[modalLoadProp]) {\n        currentRouteIsModal = true;\n        modalType = modalLoadProp;\n      }\n    });\n  }\n  if (currentRouteIsModal) {\n    var modalToClose = router.currentRoute.modal || router.currentRoute.route.modalInstance || app[modalType].get();\n    var previousUrl = router.history[router.history.length - 2];\n    var previousRoute;\n    // check if previous route is modal too\n    if (modalToClose && modalToClose.$el) {\n      var prevOpenedModals = modalToClose.$el.prevAll('.modal-in');\n      if (prevOpenedModals.length && prevOpenedModals[0].f7Modal) {\n        var modalEl = prevOpenedModals[0];\n        // check if current router not inside of the modalEl\n        if (!router.$el.parents(modalEl).length) {\n          previousRoute = modalEl.f7Modal.route;\n        }\n      }\n    }\n    if (!previousRoute) {\n      previousRoute = router.findMatchingRoute(previousUrl);\n    }\n    if (!previousRoute && previousUrl) {\n      previousRoute = {\n        url: previousUrl,\n        path: previousUrl.split('?')[0],\n        query: utils[\"default\"].parseUrlQuery(previousUrl),\n        route: {\n          path: previousUrl.split('?')[0],\n          url: previousUrl\n        }\n      };\n    }\n    if (!navigateUrl || navigateUrl.replace(/[# ]/g, '').trim().length === 0) {\n      if (!previousRoute || !modalToClose) {\n        return router;\n      }\n    }\n    var forceOtherUrl = navigateOptions.force && previousRoute && navigateUrl;\n    if (previousRoute && modalToClose) {\n      var isBrokenPushState = device[\"default\"].ie || device[\"default\"].edge || device[\"default\"].firefox && !device[\"default\"].ios;\n      var needHistoryBack = router.params.pushState && navigateOptions.pushState !== false;\n      var currentRouteWithoutPushState = router.currentRoute && router.currentRoute.route && router.currentRoute.route.options && router.currentRoute.route.options.pushState === false;\n      if (needHistoryBack && !isBrokenPushState && !currentRouteWithoutPushState) {\n        utils_history.back();\n      }\n      router.currentRoute = previousRoute;\n      router.history.pop();\n      router.saveHistory();\n      if (needHistoryBack && isBrokenPushState && !currentRouteWithoutPushState) {\n        utils_history.back();\n      }\n      router.modalRemove(modalToClose);\n      if (forceOtherUrl) {\n        router.navigate(navigateUrl, {\n          reloadCurrent: true\n        });\n      }\n    } else if (modalToClose) {\n      router.modalRemove(modalToClose);\n      if (navigateUrl) {\n        router.navigate(navigateUrl, {\n          reloadCurrent: true\n        });\n      }\n    }\n    return router;\n  }\n  var $previousPage = router.$el.children('.page-current').prevAll('.page-previous:not(.page-master)').eq(0);\n  var skipMaster;\n  if (router.params.masterDetailBreakpoint > 0) {\n    var classes = [];\n    router.$el.children('.page').each(function (index, pageEl) {\n      classes.push(pageEl.className);\n    });\n    var $previousMaster = router.$el.children('.page-current').prevAll('.page-master').eq(0);\n    if ($previousMaster.length) {\n      var expectedPreviousPageUrl = router.history[router.history.length - 2];\n      var expectedPreviousPageRoute = router.findMatchingRoute(expectedPreviousPageUrl);\n      if (expectedPreviousPageRoute && $previousMaster[0].f7Page && expectedPreviousPageRoute.route === $previousMaster[0].f7Page.route.route) {\n        $previousPage = $previousMaster;\n        if (!navigateOptions.preload) {\n          skipMaster = app.width >= router.params.masterDetailBreakpoint;\n        }\n      }\n    }\n  }\n  if (!navigateOptions.force && $previousPage.length && !skipMaster) {\n    if (router.params.pushState && $previousPage[0].f7Page && router.history[router.history.length - 2] !== $previousPage[0].f7Page.route.url) {\n      router.back(router.history[router.history.length - 2], utils[\"default\"].extend(navigateOptions, {\n        force: true\n      }));\n      return router;\n    }\n    var previousPageRoute = $previousPage[0].f7Page.route;\n    process_route_queue.call(router, previousPageRoute, router.currentRoute, function () {\n      router.loadBack({\n        el: $previousPage\n      }, utils[\"default\"].extend(navigateOptions, {\n        route: previousPageRoute\n      }));\n    }, function () {});\n    return router;\n  }\n\n  // Navigate URL\n  if (navigateUrl === '#') {\n    navigateUrl = undefined;\n  }\n  if (navigateUrl && navigateUrl[0] !== '/' && navigateUrl.indexOf('#') !== 0) {\n    navigateUrl = ((router.path || '/') + navigateUrl).replace('//', '/');\n  }\n  if (!navigateUrl && router.history.length > 1) {\n    navigateUrl = router.history[router.history.length - 2];\n  }\n  if (skipMaster && !navigateOptions.force && router.history[router.history.length - 3]) {\n    return router.back(router.history[router.history.length - 3], utils[\"default\"].extend({}, navigateOptions || {}, {\n      force: true,\n      animate: false\n    }));\n  }\n  if (skipMaster && !navigateOptions.force) {\n    return router;\n  }\n\n  // Find route to load\n  route = router.findMatchingRoute(navigateUrl);\n  if (!route) {\n    if (navigateUrl) {\n      route = {\n        url: navigateUrl,\n        path: navigateUrl.split('?')[0],\n        query: utils[\"default\"].parseUrlQuery(navigateUrl),\n        route: {\n          path: navigateUrl.split('?')[0],\n          url: navigateUrl\n        }\n      };\n    }\n  }\n  if (!route) {\n    return router;\n  }\n  if (route.route.redirect) {\n    return router_redirect.call(router, 'back', route, navigateOptions);\n  }\n  var options = {};\n  if (route.route.options) {\n    utils[\"default\"].extend(options, route.route.options, navigateOptions);\n  } else {\n    utils[\"default\"].extend(options, navigateOptions);\n  }\n  options.route = route;\n  if (options && options.context) {\n    route.context = options.context;\n    options.route.context = options.context;\n  }\n  var backForceLoaded;\n  if (options.force && router.params.stackPages) {\n    router.$el.children('.page-previous.stacked').each(function (index, pageEl) {\n      if (pageEl.f7Page && pageEl.f7Page.route && pageEl.f7Page.route.url === route.url) {\n        backForceLoaded = true;\n        router.loadBack({\n          el: pageEl\n        }, options);\n      }\n    });\n    if (backForceLoaded) {\n      return router;\n    }\n  }\n  function resolve() {\n    var routerLoaded = false;\n    if (route.route.keepAlive && route.route.keepAliveData) {\n      router.loadBack({\n        el: route.route.keepAliveData.pageEl\n      }, options);\n      routerLoaded = true;\n    }\n    'url content component pageName el componentUrl template templateUrl'.split(' ').forEach(function (pageLoadProp) {\n      if (route.route[pageLoadProp] && !routerLoaded) {\n        routerLoaded = true;\n        router.loadBack(defineProperty_default()({}, pageLoadProp, route.route[pageLoadProp]), options);\n      }\n    });\n    if (routerLoaded) return;\n    // Async\n    function asyncResolve(resolveParams, resolveOptions) {\n      router.allowPageChange = false;\n      if (resolveOptions && resolveOptions.context) {\n        if (!route.context) route.context = resolveOptions.context;else route.context = utils[\"default\"].extend({}, route.context, resolveOptions.context);\n        options.route.context = route.context;\n      }\n      router.loadBack(resolveParams, utils[\"default\"].extend(options, resolveOptions), true);\n    }\n    function asyncReject() {\n      router.allowPageChange = true;\n    }\n    if (route.route.async) {\n      router.allowPageChange = false;\n      route.route.async.call(router, route, router.currentRoute, asyncResolve, asyncReject);\n    }\n    if (route.route.asyncComponent) {\n      async_component(router, route.route.asyncComponent, asyncResolve, asyncReject);\n    }\n  }\n  function reject() {\n    router.allowPageChange = true;\n  }\n  if (options.preload) {\n    resolve();\n  } else {\n    process_route_queue.call(router, route, router.currentRoute, function () {\n      if (route.route.modules) {\n        app.loadModules(Array.isArray(route.route.modules) ? route.route.modules : [route.route.modules]).then(function () {\n          resolve();\n        }).catch(function () {\n          reject();\n        });\n      } else {\n        resolve();\n      }\n    }, function () {\n      reject();\n    });\n  }\n\n  // Return Router\n  return router;\n}\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/clear-previous-history.js\n\n\nfunction clearPreviousPages(router) {\n  app_router_check(router, 'clearPreviousPages');\n  var app = router.app;\n  var dynamicNavbar = router.dynamicNavbar;\n  var $pagesToRemove = router.$el.children('.page').filter(function (index, pageInView) {\n    if (router.currentRoute && (router.currentRoute.modal || router.currentRoute.panel)) return true;\n    return pageInView !== router.currentPageEl;\n  });\n  $pagesToRemove.each(function (index, pageEl) {\n    var $oldPageEl = Object(dom7_module[\"default\"])(pageEl);\n    var $oldNavbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($oldPageEl));\n    if (router.params.stackPages && router.initialPages.indexOf($oldPageEl[0]) >= 0) {\n      $oldPageEl.addClass('stacked');\n      if (dynamicNavbar) {\n        $oldNavbarEl.addClass('stacked');\n      }\n    } else {\n      // Page remove event\n      router.pageCallback('beforeRemove', $oldPageEl, $oldNavbarEl, 'previous', undefined, {});\n      router.removePage($oldPageEl);\n      if (dynamicNavbar && $oldNavbarEl.length) {\n        router.removeNavbar($oldNavbarEl);\n      }\n    }\n  });\n}\nfunction clearPreviousHistory() {\n  var router = this;\n  app_router_check(router, 'clearPreviousHistory');\n  var url = router.history[router.history.length - 1];\n  clearPreviousPages(router);\n  router.history = [url];\n  router.view.history = [url];\n  router.saveHistory();\n}\n // eslint-disable-line\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/router-class.js\n\n\n\n\n\nfunction router_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, router_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction router_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (router_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar router_class_Router = /*#__PURE__*/function (_Framework7Class) {\n  function Router(app, view) {\n    var _this;\n    classCallCheck_default()(this, Router);\n    _this = router_class_callSuper(this, Router, [{}, [typeof view === 'undefined' ? app : view]]);\n    var router = _this;\n\n    // Is App Router\n    router.isAppRouter = typeof view === 'undefined';\n    if (router.isAppRouter) {\n      // App Router\n      utils[\"default\"].extend(false, router, {\n        app: app,\n        params: app.params.view,\n        routes: app.routes || [],\n        cache: app.cache\n      });\n    } else {\n      // View Router\n      utils[\"default\"].extend(false, router, {\n        app: app,\n        view: view,\n        viewId: view.id,\n        params: view.params,\n        routes: view.routes,\n        $el: view.$el,\n        el: view.el,\n        $navbarsEl: view.$navbarsEl,\n        navbarsEl: view.navbarsEl,\n        history: view.history,\n        scrollHistory: view.scrollHistory,\n        cache: app.cache,\n        dynamicNavbar: app.theme === 'ios' && view.params.iosDynamicNavbar,\n        initialPages: [],\n        initialNavbars: []\n      });\n    }\n\n    // Install Modules\n    router.useModules();\n\n    // Temporary Dom\n    router.tempDom = ssr_window_esm[\"document\"].createElement('div');\n\n    // AllowPageChage\n    router.allowPageChange = true;\n\n    // Current Route\n    var currentRoute = {};\n    var previousRoute = {};\n    Object.defineProperty(router, 'currentRoute', {\n      enumerable: true,\n      configurable: true,\n      set: function set() {\n        var newRoute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        previousRoute = utils[\"default\"].extend({}, currentRoute);\n        currentRoute = newRoute;\n        if (!currentRoute) return;\n        router.url = currentRoute.url;\n        router.emit('routeChange', newRoute, previousRoute, router);\n      },\n      get: function get() {\n        return currentRoute;\n      }\n    });\n    Object.defineProperty(router, 'previousRoute', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        return previousRoute;\n      },\n      set: function set(newRoute) {\n        previousRoute = newRoute;\n      }\n    });\n    return possibleConstructorReturn_default()(_this, router);\n  }\n  inherits_default()(Router, _Framework7Class);\n  return createClass_default()(Router, [{\n    key: \"animatableNavElements\",\n    value: function animatableNavElements($newNavbarEl, $oldNavbarEl, toLarge, fromLarge, direction) {\n      var router = this;\n      var dynamicNavbar = router.dynamicNavbar;\n      var animateIcon = router.params.iosAnimateNavbarBackIcon;\n      var newNavEls;\n      var oldNavEls;\n      function animatableNavEl($el, $navbarInner) {\n        var isSliding = $el.hasClass('sliding') || $navbarInner.hasClass('sliding');\n        var isSubnavbar = $el.hasClass('subnavbar');\n        var needsOpacityTransition = isSliding ? !isSubnavbar : true;\n        var $iconEl = $el.find('.back .icon');\n        var isIconLabel;\n        if (isSliding && animateIcon && $el.hasClass('left') && $iconEl.length > 0 && $iconEl.next('span').length) {\n          $el = $iconEl.next('span'); // eslint-disable-line\n          isIconLabel = true;\n        }\n        return {\n          $el: $el,\n          isIconLabel: isIconLabel,\n          leftOffset: $el[0].f7NavbarLeftOffset,\n          rightOffset: $el[0].f7NavbarRightOffset,\n          isSliding: isSliding,\n          isSubnavbar: isSubnavbar,\n          needsOpacityTransition: needsOpacityTransition\n        };\n      }\n      if (dynamicNavbar) {\n        newNavEls = [];\n        oldNavEls = [];\n        $newNavbarEl.children('.navbar-inner').children('.left, .right, .title, .subnavbar').each(function (index, navEl) {\n          var $navEl = Object(dom7_module[\"default\"])(navEl);\n          if ($navEl.hasClass('left') && fromLarge && direction === 'forward') return;\n          if ($navEl.hasClass('title') && toLarge) return;\n          newNavEls.push(animatableNavEl($navEl, $newNavbarEl.children('.navbar-inner')));\n        });\n        if (!($oldNavbarEl.hasClass('navbar-master') && router.params.masterDetailBreakpoint > 0 && router.app.width >= router.params.masterDetailBreakpoint)) {\n          $oldNavbarEl.children('.navbar-inner').children('.left, .right, .title, .subnavbar').each(function (index, navEl) {\n            var $navEl = Object(dom7_module[\"default\"])(navEl);\n            if ($navEl.hasClass('left') && toLarge && !fromLarge && direction === 'forward') return;\n            if ($navEl.hasClass('left') && toLarge && direction === 'backward') return;\n            if ($navEl.hasClass('title') && fromLarge) {\n              return;\n            }\n            oldNavEls.push(animatableNavEl($navEl, $oldNavbarEl.children('.navbar-inner')));\n          });\n        }\n        [oldNavEls, newNavEls].forEach(function (navEls) {\n          navEls.forEach(function (navEl) {\n            var n = navEl;\n            var isSliding = navEl.isSliding,\n              $el = navEl.$el;\n            var otherEls = navEls === oldNavEls ? newNavEls : oldNavEls;\n            if (!(isSliding && $el.hasClass('title') && otherEls)) return;\n            otherEls.forEach(function (otherNavEl) {\n              if (otherNavEl.isIconLabel) {\n                var iconTextEl = otherNavEl.$el[0];\n                n.leftOffset += iconTextEl ? iconTextEl.offsetLeft || 0 : 0;\n              }\n            });\n          });\n        });\n      }\n      return {\n        newNavEls: newNavEls,\n        oldNavEls: oldNavEls\n      };\n    }\n  }, {\n    key: \"animate\",\n    value: function animate($oldPageEl, $newPageEl, $oldNavbarEl, $newNavbarEl, direction, transition, callback) {\n      var router = this;\n      if (router.params.animateCustom) {\n        router.params.animateCustom.apply(router, [$oldPageEl, $newPageEl, $oldNavbarEl, $newNavbarEl, direction, callback]);\n        return;\n      }\n      var dynamicNavbar = router.dynamicNavbar;\n      var ios = router.app.theme === 'ios';\n      if (transition) {\n        var routerCustomTransitionClass = \"router-transition-custom router-transition-\".concat(transition, \"-\").concat(direction);\n        // Animate\n        var onCustomTransitionDone = function onCustomTransitionDone() {\n          router.$el.removeClass(routerCustomTransitionClass);\n          if (dynamicNavbar && router.$navbarsEl.length) {\n            if ($newNavbarEl) {\n              router.$navbarsEl.prepend($newNavbarEl);\n            }\n            if ($oldNavbarEl) {\n              router.$navbarsEl.prepend($oldNavbarEl);\n            }\n          }\n          if (callback) callback();\n        };\n        (direction === 'forward' ? $newPageEl : $oldPageEl).animationEnd(onCustomTransitionDone);\n        if (dynamicNavbar) {\n          if ($newNavbarEl && $newPageEl) {\n            router.setNavbarPosition($newNavbarEl, '');\n            $newNavbarEl.removeClass('navbar-next navbar-previous navbar-current');\n            $newPageEl.prepend($newNavbarEl);\n          }\n          if ($oldNavbarEl && $oldPageEl) {\n            router.setNavbarPosition($oldNavbarEl, '');\n            $oldNavbarEl.removeClass('navbar-next navbar-previous navbar-current');\n            $oldPageEl.prepend($oldNavbarEl);\n          }\n        }\n        router.$el.addClass(routerCustomTransitionClass);\n        return;\n      }\n\n      // Router Animation class\n      var routerTransitionClass = \"router-transition-\".concat(direction, \" router-transition\");\n      var newNavEls;\n      var oldNavEls;\n      var fromLarge;\n      var toLarge;\n      var oldIsLarge;\n      var newIsLarge;\n      if (ios && dynamicNavbar) {\n        var betweenMasterAndDetail = router.params.masterDetailBreakpoint > 0 && router.app.width >= router.params.masterDetailBreakpoint && ($oldNavbarEl.hasClass('navbar-master') && $newNavbarEl.hasClass('navbar-master-detail') || $oldNavbarEl.hasClass('navbar-master-detail') && $newNavbarEl.hasClass('navbar-master'));\n        if (!betweenMasterAndDetail) {\n          oldIsLarge = $oldNavbarEl && $oldNavbarEl.hasClass('navbar-large');\n          newIsLarge = $newNavbarEl && $newNavbarEl.hasClass('navbar-large');\n          fromLarge = oldIsLarge && !$oldNavbarEl.hasClass('navbar-large-collapsed');\n          toLarge = newIsLarge && !$newNavbarEl.hasClass('navbar-large-collapsed');\n        }\n        var navEls = router.animatableNavElements($newNavbarEl, $oldNavbarEl, toLarge, fromLarge, direction);\n        newNavEls = navEls.newNavEls;\n        oldNavEls = navEls.oldNavEls;\n      }\n      function animateNavbars(progress) {\n        if (!(ios && dynamicNavbar)) return;\n        if (progress === 1) {\n          if (toLarge) {\n            $newNavbarEl.addClass('router-navbar-transition-to-large');\n            $oldNavbarEl.addClass('router-navbar-transition-to-large');\n          }\n          if (fromLarge) {\n            $newNavbarEl.addClass('router-navbar-transition-from-large');\n            $oldNavbarEl.addClass('router-navbar-transition-from-large');\n          }\n        }\n        newNavEls.forEach(function (navEl) {\n          var $el = navEl.$el;\n          var offset = direction === 'forward' ? navEl.rightOffset : navEl.leftOffset;\n          if (navEl.isSliding) {\n            if (navEl.isSubnavbar && newIsLarge) {\n              $el[0].style.setProperty('transform', \"translate3d(\".concat(offset * (1 - progress), \"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)\"), 'important');\n            } else {\n              $el.transform(\"translate3d(\".concat(offset * (1 - progress), \"px,0,0)\"));\n            }\n          }\n        });\n        oldNavEls.forEach(function (navEl) {\n          var $el = navEl.$el;\n          var offset = direction === 'forward' ? navEl.leftOffset : navEl.rightOffset;\n          if (navEl.isSliding) {\n            if (navEl.isSubnavbar && oldIsLarge) {\n              $el.transform(\"translate3d(\".concat(offset * progress, \"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)\"));\n            } else {\n              $el.transform(\"translate3d(\".concat(offset * progress, \"px,0,0)\"));\n            }\n          }\n        });\n      }\n\n      // AnimationEnd Callback\n      function onDone() {\n        if (router.dynamicNavbar) {\n          if ($newNavbarEl) {\n            $newNavbarEl.removeClass('router-navbar-transition-to-large router-navbar-transition-from-large');\n            $newNavbarEl.addClass('navbar-no-title-large-transition');\n            utils[\"default\"].nextFrame(function () {\n              $newNavbarEl.removeClass('navbar-no-title-large-transition');\n            });\n          }\n          if ($oldNavbarEl) {\n            $oldNavbarEl.removeClass('router-navbar-transition-to-large router-navbar-transition-from-large');\n          }\n          if ($newNavbarEl.hasClass('sliding') || $newNavbarEl.children('.navbar-inner.sliding').length) {\n            $newNavbarEl.find('.title, .left, .right, .left .icon, .subnavbar').transform('');\n          } else {\n            $newNavbarEl.find('.sliding').transform('');\n          }\n          if ($oldNavbarEl.hasClass('sliding') || $oldNavbarEl.children('.navbar-inner.sliding').length) {\n            $oldNavbarEl.find('.title, .left, .right, .left .icon, .subnavbar').transform('');\n          } else {\n            $oldNavbarEl.find('.sliding').transform('');\n          }\n        }\n        router.$el.removeClass(routerTransitionClass);\n        if (callback) callback();\n      }\n      (direction === 'forward' ? $newPageEl : $oldPageEl).animationEnd(function () {\n        onDone();\n      });\n\n      // Animate\n      if (dynamicNavbar) {\n        // Prepare Navbars\n        animateNavbars(0);\n        utils[\"default\"].nextFrame(function () {\n          // Add class, start animation\n          animateNavbars(1);\n          router.$el.addClass(routerTransitionClass);\n        });\n      } else {\n        // Add class, start animation\n        router.$el.addClass(routerTransitionClass);\n      }\n    }\n  }, {\n    key: \"removeModal\",\n    value: function removeModal(modalEl) {\n      var router = this;\n      router.removeEl(modalEl);\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"removeTabContent\",\n    value: function removeTabContent(tabEl) {\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      $tabEl.html('');\n    }\n  }, {\n    key: \"removeNavbar\",\n    value: function removeNavbar(el) {\n      var router = this;\n      router.removeEl(el);\n    }\n  }, {\n    key: \"removePage\",\n    value: function removePage(el) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      var f7Page = $el && $el[0] && $el[0].f7Page;\n      var router = this;\n      if (f7Page && f7Page.route && f7Page.route.route && f7Page.route.route.keepAlive) {\n        $el.remove();\n        return;\n      }\n      router.removeEl(el);\n    }\n  }, {\n    key: \"removeEl\",\n    value: function removeEl(el) {\n      if (!el) return;\n      var router = this;\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return;\n      $el.find('.tab').each(function (tabIndex, tabEl) {\n        Object(dom7_module[\"default\"])(tabEl).children().each(function (index, tabChild) {\n          if (tabChild.f7Component) {\n            Object(dom7_module[\"default\"])(tabChild).trigger('tab:beforeremove');\n            tabChild.f7Component.$destroy();\n          }\n        });\n      });\n      if ($el[0].f7Component && $el[0].f7Component.$destroy) {\n        $el[0].f7Component.$destroy();\n      }\n      if (!router.params.removeElements) {\n        return;\n      }\n      if (router.params.removeElementsWithTimeout) {\n        setTimeout(function () {\n          $el.remove();\n        }, router.params.removeElementsTimeout);\n      } else {\n        $el.remove();\n      }\n    }\n  }, {\n    key: \"getPageEl\",\n    value: function getPageEl(content) {\n      var router = this;\n      if (typeof content === 'string') {\n        router.tempDom.innerHTML = content;\n      } else {\n        if (Object(dom7_module[\"default\"])(content).hasClass('page')) {\n          return content;\n        }\n        router.tempDom.innerHTML = '';\n        Object(dom7_module[\"default\"])(router.tempDom).append(content);\n      }\n      return router.findElement('.page', router.tempDom);\n    }\n  }, {\n    key: \"findElement\",\n    value: function findElement(stringSelector, container, notStacked) {\n      var router = this;\n      var view = router.view;\n      var app = router.app;\n\n      // Modals Selector\n      var modalsSelector = '.popup, .dialog, .popover, .actions-modal, .sheet-modal, .login-screen, .page';\n      var $container = Object(dom7_module[\"default\"])(container);\n      var selector = stringSelector;\n      if (notStacked) selector += ':not(.stacked)';\n      var found = $container.find(selector).filter(function (index, el) {\n        return Object(dom7_module[\"default\"])(el).parents(modalsSelector).length === 0;\n      });\n      if (found.length > 1) {\n        if (typeof view.selector === 'string') {\n          // Search in related view\n          found = $container.find(\"\".concat(view.selector, \" \").concat(selector));\n        }\n        if (found.length > 1) {\n          // Search in main view\n          found = $container.find(\".\".concat(app.params.viewMainClass, \" \").concat(selector));\n        }\n      }\n      if (found.length === 1) return found;\n\n      // Try to find not stacked\n      if (!notStacked) found = router.findElement(selector, $container, true);\n      if (found && found.length === 1) return found;\n      if (found && found.length > 1) return Object(dom7_module[\"default\"])(found[0]);\n      return undefined;\n    }\n  }, {\n    key: \"flattenRoutes\",\n    value: function flattenRoutes() {\n      var routes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.routes;\n      var router = this;\n      var flattenedRoutes = [];\n      routes.forEach(function (route) {\n        var hasTabRoutes = false;\n        if ('tabs' in route && route.tabs) {\n          var mergedPathsRoutes = route.tabs.map(function (tabRoute) {\n            var tRoute = utils[\"default\"].extend({}, route, {\n              path: \"\".concat(route.path, \"/\").concat(tabRoute.path).replace('///', '/').replace('//', '/'),\n              parentPath: route.path,\n              tab: tabRoute\n            });\n            delete tRoute.tabs;\n            delete tRoute.routes;\n            return tRoute;\n          });\n          hasTabRoutes = true;\n          flattenedRoutes = flattenedRoutes.concat(router.flattenRoutes(mergedPathsRoutes));\n        }\n        if ('detailRoutes' in route) {\n          var _mergedPathsRoutes = route.detailRoutes.map(function (detailRoute) {\n            var dRoute = utils[\"default\"].extend({}, detailRoute);\n            dRoute.masterRoute = route;\n            dRoute.masterRoutePath = route.path;\n            return dRoute;\n          });\n          flattenedRoutes = flattenedRoutes.concat(route, router.flattenRoutes(_mergedPathsRoutes));\n        }\n        if ('routes' in route) {\n          var _mergedPathsRoutes2 = route.routes.map(function (childRoute) {\n            var cRoute = utils[\"default\"].extend({}, childRoute);\n            cRoute.path = \"\".concat(route.path, \"/\").concat(cRoute.path).replace('///', '/').replace('//', '/');\n            return cRoute;\n          });\n          if (hasTabRoutes) {\n            flattenedRoutes = flattenedRoutes.concat(router.flattenRoutes(_mergedPathsRoutes2));\n          } else {\n            flattenedRoutes = flattenedRoutes.concat(route, router.flattenRoutes(_mergedPathsRoutes2));\n          }\n        }\n        if (!('routes' in route) && !('tabs' in route && route.tabs) && !('detailRoutes' in route)) {\n          flattenedRoutes.push(route);\n        }\n      });\n      return flattenedRoutes;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"parseRouteUrl\",\n    value: function parseRouteUrl(url) {\n      if (!url) return {};\n      var query = utils[\"default\"].parseUrlQuery(url);\n      var hash = url.split('#')[1];\n      var params = {};\n      var path = url.split('#')[0].split('?')[0];\n      return {\n        query: query,\n        hash: hash,\n        params: params,\n        url: url,\n        path: path\n      };\n    }\n  }, {\n    key: \"generateUrl\",\n    value: function generateUrl() {\n      var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      if (typeof parameters === 'string') {\n        return parameters;\n      }\n      var name = parameters.name,\n        path = parameters.path,\n        params = parameters.params,\n        query = parameters.query;\n      if (!name && !path) {\n        throw new Error('Framework7: \"name\" or \"path\" parameter is required');\n      }\n      var router = this;\n      var route = name ? router.findRouteByKey('name', name) : router.findRouteByKey('path', path);\n      if (!route) {\n        if (name) {\n          throw new Error(\"Framework7: route with name \\\"\".concat(name, \"\\\" not found\"));\n        } else {\n          throw new Error(\"Framework7: route with path \\\"\".concat(path, \"\\\" not found\"));\n        }\n      }\n      var url = router.constructRouteUrl(route, {\n        params: params,\n        query: query\n      });\n      if (!url) {\n        throw new Error(\"Framework7: can't construct URL for route with name \\\"\".concat(name, \"\\\"\"));\n      }\n      return url;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"constructRouteUrl\",\n    value: function constructRouteUrl(route) {\n      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        params = _ref.params,\n        query = _ref.query;\n      var path = route.path;\n      var toUrl = dist_es2015_compile(path);\n      var url;\n      try {\n        url = toUrl(params || {});\n      } catch (error) {\n        throw new Error(\"Framework7: error constructing route URL from passed params:\\nRoute: \".concat(path, \"\\n\").concat(error.toString()));\n      }\n      if (query) {\n        if (typeof query === 'string') url += \"?\".concat(query);else url += \"?\".concat(utils[\"default\"].serializeObject(query));\n      }\n      return url;\n    }\n  }, {\n    key: \"findTabRoute\",\n    value: function findTabRoute(tabEl) {\n      var router = this;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      var parentPath = router.currentRoute.route.parentPath;\n      var tabId = $tabEl.attr('id');\n      var flattenedRoutes = router.flattenRoutes(router.routes);\n      var foundTabRoute;\n      flattenedRoutes.forEach(function (route) {\n        if (route.parentPath === parentPath && route.tab && route.tab.id === tabId) {\n          foundTabRoute = route;\n        }\n      });\n      return foundTabRoute;\n    }\n  }, {\n    key: \"findRouteByKey\",\n    value: function findRouteByKey(key, value) {\n      var router = this;\n      var routes = router.routes;\n      var flattenedRoutes = router.flattenRoutes(routes);\n      var matchingRoute;\n      flattenedRoutes.forEach(function (route) {\n        if (matchingRoute) return;\n        if (route[key] === value) {\n          matchingRoute = route;\n        }\n      });\n      return matchingRoute;\n    }\n  }, {\n    key: \"findMatchingRoute\",\n    value: function findMatchingRoute(url) {\n      if (!url) return undefined;\n      var router = this;\n      var routes = router.routes;\n      var flattenedRoutes = router.flattenRoutes(routes);\n      var _router$parseRouteUrl = router.parseRouteUrl(url),\n        path = _router$parseRouteUrl.path,\n        query = _router$parseRouteUrl.query,\n        hash = _router$parseRouteUrl.hash,\n        params = _router$parseRouteUrl.params;\n      var matchingRoute;\n      flattenedRoutes.forEach(function (route) {\n        if (matchingRoute) return;\n        var keys = [];\n        var pathsToMatch = [route.path];\n        if (route.alias) {\n          if (typeof route.alias === 'string') pathsToMatch.push(route.alias);else if (Array.isArray(route.alias)) {\n            route.alias.forEach(function (aliasPath) {\n              pathsToMatch.push(aliasPath);\n            });\n          }\n        }\n        var matched;\n        pathsToMatch.forEach(function (pathToMatch) {\n          if (matched) return;\n          matched = pathToRegexp(pathToMatch, keys).exec(path);\n        });\n        if (matched) {\n          keys.forEach(function (keyObj, index) {\n            if (typeof keyObj.name === 'number') return;\n            var paramValue = matched[index + 1];\n            if (typeof paramValue === 'undefined' || paramValue === null) {\n              params[keyObj.name] = paramValue;\n            } else {\n              params[keyObj.name] = decodeURIComponent(paramValue);\n            }\n          });\n          var parentPath;\n          if (route.parentPath) {\n            parentPath = path.split('/').slice(0, route.parentPath.split('/').length - 1).join('/');\n          }\n          matchingRoute = {\n            query: query,\n            hash: hash,\n            params: params,\n            url: url,\n            path: path,\n            parentPath: parentPath,\n            route: route,\n            name: route.name\n          };\n        }\n      });\n      return matchingRoute;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"replaceRequestUrlParams\",\n    value: function replaceRequestUrlParams() {\n      var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var compiledUrl = url;\n      if (typeof compiledUrl === 'string' && compiledUrl.indexOf('{{') >= 0 && options && options.route && options.route.params && Object.keys(options.route.params).length) {\n        Object.keys(options.route.params).forEach(function (paramName) {\n          var regExp = new RegExp(\"{{\".concat(paramName, \"}}\"), 'g');\n          compiledUrl = compiledUrl.replace(regExp, options.route.params[paramName] || '');\n        });\n      }\n      return compiledUrl;\n    }\n  }, {\n    key: \"removeFromXhrCache\",\n    value: function removeFromXhrCache(url) {\n      var router = this;\n      var xhrCache = router.cache.xhr;\n      var index = false;\n      for (var i = 0; i < xhrCache.length; i += 1) {\n        if (xhrCache[i].url === url) index = i;\n      }\n      if (index !== false) xhrCache.splice(index, 1);\n    }\n  }, {\n    key: \"xhrRequest\",\n    value: function xhrRequest(requestUrl, options) {\n      var router = this;\n      var params = router.params;\n      var ignoreCache = options.ignoreCache;\n      var url = requestUrl;\n      var hasQuery = url.indexOf('?') >= 0;\n      if (params.passRouteQueryToRequest && options && options.route && options.route.query && Object.keys(options.route.query).length) {\n        url += \"\".concat(hasQuery ? '&' : '?').concat(utils[\"default\"].serializeObject(options.route.query));\n        hasQuery = true;\n      }\n      if (params.passRouteParamsToRequest && options && options.route && options.route.params && Object.keys(options.route.params).length) {\n        url += \"\".concat(hasQuery ? '&' : '?').concat(utils[\"default\"].serializeObject(options.route.params));\n        hasQuery = true;\n      }\n      if (url.indexOf('{{') >= 0) {\n        url = router.replaceRequestUrlParams(url, options);\n      }\n      // should we ignore get params or not\n      if (params.xhrCacheIgnoreGetParameters && url.indexOf('?') >= 0) {\n        url = url.split('?')[0];\n      }\n      return new Promise(function (resolve, reject) {\n        if (params.xhrCache && !ignoreCache && url.indexOf('nocache') < 0 && params.xhrCacheIgnore.indexOf(url) < 0) {\n          for (var i = 0; i < router.cache.xhr.length; i += 1) {\n            var cachedUrl = router.cache.xhr[i];\n            if (cachedUrl.url === url) {\n              // Check expiration\n              if (utils[\"default\"].now() - cachedUrl.time < params.xhrCacheDuration) {\n                // Load from cache\n                resolve(cachedUrl.content);\n                return;\n              }\n            }\n          }\n        }\n        router.xhr = router.app.request({\n          url: url,\n          method: 'GET',\n          beforeSend: function beforeSend(xhr) {\n            router.emit('routerAjaxStart', xhr, options);\n          },\n          complete: function complete(xhr, status) {\n            router.emit('routerAjaxComplete', xhr);\n            if (status !== 'error' && status !== 'timeout' && xhr.status >= 200 && xhr.status < 300 || xhr.status === 0) {\n              if (params.xhrCache && xhr.responseText !== '') {\n                router.removeFromXhrCache(url);\n                router.cache.xhr.push({\n                  url: url,\n                  time: utils[\"default\"].now(),\n                  content: xhr.responseText\n                });\n              }\n              router.emit('routerAjaxSuccess', xhr, options);\n              resolve(xhr.responseText);\n            } else {\n              router.emit('routerAjaxError', xhr, options);\n              reject(xhr);\n            }\n          },\n          error: function error(xhr) {\n            router.emit('routerAjaxError', xhr, options);\n            reject(xhr);\n          }\n        });\n      });\n    }\n  }, {\n    key: \"setNavbarPosition\",\n    value: function setNavbarPosition($el, position, ariaHidden) {\n      var router = this;\n      $el.removeClass('navbar-previous navbar-current navbar-next');\n      if (position) {\n        $el.addClass(\"navbar-\".concat(position));\n      }\n      if (ariaHidden === false) {\n        $el.removeAttr('aria-hidden');\n      } else if (ariaHidden === true) {\n        $el.attr('aria-hidden', 'true');\n      }\n      $el.trigger('navbar:position', {\n        position: position\n      });\n      router.emit('navbarPosition', $el[0], position);\n    }\n  }, {\n    key: \"setPagePosition\",\n    value: function setPagePosition($el, position, ariaHidden) {\n      var router = this;\n      $el.removeClass('page-previous page-current page-next');\n      $el.addClass(\"page-\".concat(position));\n      if (ariaHidden === false) {\n        $el.removeAttr('aria-hidden');\n      } else if (ariaHidden === true) {\n        $el.attr('aria-hidden', 'true');\n      }\n      $el.trigger('page:position', {\n        position: position\n      });\n      router.emit('pagePosition', $el[0], position);\n    }\n\n    // Remove theme elements\n  }, {\n    key: \"removeThemeElements\",\n    value: function removeThemeElements(el) {\n      var router = this;\n      var theme = router.app.theme;\n      var toRemove;\n      if (theme === 'ios') {\n        toRemove = '.md-only, .aurora-only, .if-md, .if-aurora, .if-not-ios, .not-ios';\n      } else if (theme === 'md') {\n        toRemove = '.ios-only, .aurora-only, .if-ios, .if-aurora, .if-not-md, .not-md';\n      } else if (theme === 'aurora') {\n        toRemove = '.ios-only, .md-only, .if-ios, .if-md, .if-not-aurora, .not-aurora';\n      }\n      Object(dom7_module[\"default\"])(el).find(toRemove).remove();\n    }\n  }, {\n    key: \"getPageData\",\n    value: function getPageData(pageEl, navbarEl, from, to) {\n      var route = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n      var pageFromEl = arguments.length > 5 ? arguments[5] : undefined;\n      var router = this;\n      var $pageEl = Object(dom7_module[\"default\"])(pageEl).eq(0);\n      var $navbarEl = Object(dom7_module[\"default\"])(navbarEl).eq(0);\n      var currentPage = $pageEl[0].f7Page || {};\n      var direction;\n      var pageFrom;\n      if (from === 'next' && to === 'current' || from === 'current' && to === 'previous') direction = 'forward';\n      if (from === 'current' && to === 'next' || from === 'previous' && to === 'current') direction = 'backward';\n      if (currentPage && !currentPage.fromPage) {\n        var $pageFromEl = Object(dom7_module[\"default\"])(pageFromEl);\n        if ($pageFromEl.length) {\n          pageFrom = $pageFromEl[0].f7Page;\n        }\n      }\n      pageFrom = currentPage.pageFrom || pageFrom;\n      if (pageFrom && pageFrom.pageFrom) {\n        pageFrom.pageFrom = null;\n      }\n      var page = {\n        app: router.app,\n        view: router.view,\n        router: router,\n        $el: $pageEl,\n        el: $pageEl[0],\n        $pageEl: $pageEl,\n        pageEl: $pageEl[0],\n        $navbarEl: $navbarEl,\n        navbarEl: $navbarEl[0],\n        name: $pageEl.attr('data-name'),\n        position: from,\n        from: from,\n        to: to,\n        direction: direction,\n        route: currentPage.route ? currentPage.route : route,\n        pageFrom: pageFrom\n      };\n      $pageEl[0].f7Page = page;\n      return page;\n    }\n\n    // Callbacks\n  }, {\n    key: \"pageCallback\",\n    value: function pageCallback(callback, pageEl, navbarEl, from, to) {\n      var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n      var pageFromEl = arguments.length > 6 ? arguments[6] : undefined;\n      if (!pageEl) return;\n      var router = this;\n      var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n      if (!$pageEl.length) return;\n      var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n      var route = options.route;\n      var restoreScrollTopOnBack = router.params.restoreScrollTopOnBack && !(router.params.masterDetailBreakpoint > 0 && $pageEl.hasClass('page-master') && router.app.width >= router.params.masterDetailBreakpoint);\n      var keepAlive = $pageEl[0].f7Page && $pageEl[0].f7Page.route && $pageEl[0].f7Page.route.route && $pageEl[0].f7Page.route.route.keepAlive;\n      if (callback === 'beforeRemove' && keepAlive) {\n        callback = 'beforeUnmount'; // eslint-disable-line\n      }\n      var camelName = \"page\".concat(callback[0].toUpperCase() + callback.slice(1, callback.length));\n      var colonName = \"page:\".concat(callback.toLowerCase());\n      var page = {};\n      if (callback === 'beforeRemove' && $pageEl[0].f7Page) {\n        page = utils[\"default\"].extend($pageEl[0].f7Page, {\n          from: from,\n          to: to,\n          position: from\n        });\n      } else {\n        page = router.getPageData($pageEl[0], $navbarEl[0], from, to, route, pageFromEl);\n      }\n      page.swipeBack = !!options.swipeBack;\n      var _ref2 = options.route ? options.route.route : {},\n        _ref2$on = _ref2.on,\n        on = _ref2$on === void 0 ? {} : _ref2$on,\n        _ref2$once = _ref2.once,\n        once = _ref2$once === void 0 ? {} : _ref2$once;\n      if (options.on) {\n        utils[\"default\"].extend(on, options.on);\n      }\n      if (options.once) {\n        utils[\"default\"].extend(once, options.once);\n      }\n      function attachEvents() {\n        if ($pageEl[0].f7RouteEventsAttached) return;\n        $pageEl[0].f7RouteEventsAttached = true;\n        if (on && Object.keys(on).length > 0) {\n          $pageEl[0].f7RouteEventsOn = on;\n          Object.keys(on).forEach(function (eventName) {\n            on[eventName] = on[eventName].bind(router);\n            $pageEl.on(utils[\"default\"].eventNameToColonCase(eventName), on[eventName]);\n          });\n        }\n        if (once && Object.keys(once).length > 0) {\n          $pageEl[0].f7RouteEventsOnce = once;\n          Object.keys(once).forEach(function (eventName) {\n            once[eventName] = once[eventName].bind(router);\n            $pageEl.once(utils[\"default\"].eventNameToColonCase(eventName), once[eventName]);\n          });\n        }\n      }\n      function detachEvents() {\n        if (!$pageEl[0].f7RouteEventsAttached) return;\n        if ($pageEl[0].f7RouteEventsOn) {\n          Object.keys($pageEl[0].f7RouteEventsOn).forEach(function (eventName) {\n            $pageEl.off(utils[\"default\"].eventNameToColonCase(eventName), $pageEl[0].f7RouteEventsOn[eventName]);\n          });\n        }\n        if ($pageEl[0].f7RouteEventsOnce) {\n          Object.keys($pageEl[0].f7RouteEventsOnce).forEach(function (eventName) {\n            $pageEl.off(utils[\"default\"].eventNameToColonCase(eventName), $pageEl[0].f7RouteEventsOnce[eventName]);\n          });\n        }\n        $pageEl[0].f7RouteEventsAttached = null;\n        $pageEl[0].f7RouteEventsOn = null;\n        $pageEl[0].f7RouteEventsOnce = null;\n        delete $pageEl[0].f7RouteEventsAttached;\n        delete $pageEl[0].f7RouteEventsOn;\n        delete $pageEl[0].f7RouteEventsOnce;\n      }\n      if (callback === 'mounted') {\n        attachEvents();\n      }\n      if (callback === 'init') {\n        if (restoreScrollTopOnBack && (from === 'previous' || !from) && to === 'current' && router.scrollHistory[page.route.url] && !$pageEl.hasClass('no-restore-scroll')) {\n          var $pageContent = $pageEl.find('.page-content');\n          if ($pageContent.length > 0) {\n            // eslint-disable-next-line\n            $pageContent = $pageContent.filter(function (pageContentIndex, pageContentEl) {\n              return Object(dom7_module[\"default\"])(pageContentEl).parents('.tab:not(.tab-active)').length === 0 && !Object(dom7_module[\"default\"])(pageContentEl).is('.tab:not(.tab-active)');\n            });\n          }\n          $pageContent.scrollTop(router.scrollHistory[page.route.url]);\n        }\n        attachEvents();\n        if ($pageEl[0].f7PageInitialized) {\n          $pageEl.trigger('page:reinit', page);\n          router.emit('pageReinit', page);\n          return;\n        }\n        $pageEl[0].f7PageInitialized = true;\n      }\n      if (restoreScrollTopOnBack && callback === 'beforeOut' && from === 'current' && to === 'previous') {\n        // Save scroll position\n        var _$pageContent = $pageEl.find('.page-content');\n        if (_$pageContent.length > 0) {\n          // eslint-disable-next-line\n          _$pageContent = _$pageContent.filter(function (pageContentIndex, pageContentEl) {\n            return Object(dom7_module[\"default\"])(pageContentEl).parents('.tab:not(.tab-active)').length === 0 && !Object(dom7_module[\"default\"])(pageContentEl).is('.tab:not(.tab-active)');\n          });\n        }\n        router.scrollHistory[page.route.url] = _$pageContent.scrollTop();\n      }\n      if (restoreScrollTopOnBack && callback === 'beforeOut' && from === 'current' && to === 'next') {\n        // Delete scroll position\n        delete router.scrollHistory[page.route.url];\n      }\n      $pageEl.trigger(colonName, page);\n      router.emit(camelName, page);\n      if (callback === 'beforeRemove' || callback === 'beforeUnmount') {\n        detachEvents();\n        if (!keepAlive) {\n          if ($pageEl[0].f7Page && $pageEl[0].f7Page.navbarEl) {\n            delete $pageEl[0].f7Page.navbarEl.f7Page;\n          }\n          $pageEl[0].f7Page = null;\n        }\n      }\n    }\n  }, {\n    key: \"saveHistory\",\n    value: function saveHistory() {\n      var router = this;\n      router.view.history = router.history;\n      if (router.params.pushState) {\n        ssr_window_esm[\"window\"].localStorage[\"f7router-\".concat(router.view.id, \"-history\")] = JSON.stringify(router.history);\n      }\n    }\n  }, {\n    key: \"restoreHistory\",\n    value: function restoreHistory() {\n      var router = this;\n      if (router.params.pushState && ssr_window_esm[\"window\"].localStorage[\"f7router-\".concat(router.view.id, \"-history\")]) {\n        router.history = JSON.parse(ssr_window_esm[\"window\"].localStorage[\"f7router-\".concat(router.view.id, \"-history\")]);\n        router.view.history = router.history;\n      }\n    }\n  }, {\n    key: \"clearHistory\",\n    value: function clearHistory() {\n      var router = this;\n      router.history = [];\n      if (router.view) router.view.history = [];\n      router.saveHistory();\n    }\n  }, {\n    key: \"updateCurrentUrl\",\n    value: function updateCurrentUrl(newUrl) {\n      var router = this;\n      app_router_check(router, 'updateCurrentUrl');\n      // Update history\n      if (router.history.length) {\n        router.history[router.history.length - 1] = newUrl;\n      } else {\n        router.history.push(newUrl);\n      }\n\n      // Update current route params\n      var _router$parseRouteUrl2 = router.parseRouteUrl(newUrl),\n        query = _router$parseRouteUrl2.query,\n        hash = _router$parseRouteUrl2.hash,\n        params = _router$parseRouteUrl2.params,\n        url = _router$parseRouteUrl2.url,\n        path = _router$parseRouteUrl2.path;\n      if (router.currentRoute) {\n        utils[\"default\"].extend(router.currentRoute, {\n          query: query,\n          hash: hash,\n          params: params,\n          url: url,\n          path: path\n        });\n      }\n      if (router.params.pushState) {\n        var pushStateRoot = router.params.pushStateRoot || '';\n        utils_history.replace(router.view.id, {\n          url: newUrl\n        }, pushStateRoot + router.params.pushStateSeparator + newUrl);\n      }\n\n      // Save History\n      router.saveHistory();\n      router.emit('routeUrlUpdate', router.currentRoute, router);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var router = this;\n      var app = router.app,\n        view = router.view;\n\n      // Init Swipeback\n      if (view && router.params.iosSwipeBack && app.theme === 'ios' || view && router.params.mdSwipeBack && app.theme === 'md' || view && router.params.auroraSwipeBack && app.theme === 'aurora') {\n        swipe_back(router);\n      }\n      var initUrl = router.params.url;\n      var documentUrl = ssr_window_esm[\"document\"].location.href.split(ssr_window_esm[\"document\"].location.origin)[1];\n      var historyRestored;\n      var _router$params = router.params,\n        pushState = _router$params.pushState,\n        pushStateOnLoad = _router$params.pushStateOnLoad,\n        pushStateSeparator = _router$params.pushStateSeparator,\n        pushStateAnimateOnLoad = _router$params.pushStateAnimateOnLoad;\n      var pushStateRoot = router.params.pushStateRoot;\n      if (ssr_window_esm[\"window\"].cordova && pushState && !pushStateSeparator && !pushStateRoot && ssr_window_esm[\"document\"].location.pathname.indexOf('index.html')) {\n        // eslint-disable-next-line\n        console.warn('Framework7: wrong or not complete pushState configuration, trying to guess pushStateRoot');\n        pushStateRoot = ssr_window_esm[\"document\"].location.pathname.split('index.html')[0];\n      }\n      if (!pushState || !pushStateOnLoad) {\n        if (!initUrl) {\n          initUrl = documentUrl;\n        }\n        if (ssr_window_esm[\"document\"].location.search && initUrl.indexOf('?') < 0) {\n          initUrl += ssr_window_esm[\"document\"].location.search;\n        }\n        if (ssr_window_esm[\"document\"].location.hash && initUrl.indexOf('#') < 0) {\n          initUrl += ssr_window_esm[\"document\"].location.hash;\n        }\n      } else {\n        if (pushStateRoot && documentUrl.indexOf(pushStateRoot) >= 0) {\n          documentUrl = documentUrl.split(pushStateRoot)[1];\n          if (documentUrl === '') documentUrl = '/';\n        }\n        if (pushStateSeparator.length > 0 && documentUrl.indexOf(pushStateSeparator) >= 0) {\n          initUrl = documentUrl.split(pushStateSeparator)[1];\n        } else {\n          initUrl = documentUrl;\n        }\n        router.restoreHistory();\n        if (router.history.indexOf(initUrl) >= 0) {\n          router.history = router.history.slice(0, router.history.indexOf(initUrl) + 1);\n        } else if (router.params.url === initUrl) {\n          router.history = [initUrl];\n        } else if (utils_history.state && utils_history.state[view.id] && utils_history.state[view.id].url === router.history[router.history.length - 1]) {\n          initUrl = router.history[router.history.length - 1];\n        } else {\n          router.history = [documentUrl.split(pushStateSeparator)[0] || '/', initUrl];\n        }\n        if (router.history.length > 1) {\n          historyRestored = true;\n        } else {\n          router.history = [];\n        }\n        router.saveHistory();\n      }\n      var currentRoute;\n      if (router.history.length > 1) {\n        // Will load page\n        currentRoute = router.findMatchingRoute(router.history[0]);\n        if (!currentRoute) {\n          currentRoute = utils[\"default\"].extend(router.parseRouteUrl(router.history[0]), {\n            route: {\n              url: router.history[0],\n              path: router.history[0].split('?')[0]\n            }\n          });\n        }\n      } else {\n        // Don't load page\n        currentRoute = router.findMatchingRoute(initUrl);\n        if (!currentRoute) {\n          currentRoute = utils[\"default\"].extend(router.parseRouteUrl(initUrl), {\n            route: {\n              url: initUrl,\n              path: initUrl.split('?')[0]\n            }\n          });\n        }\n      }\n      if (router.params.stackPages) {\n        router.$el.children('.page').each(function (index, pageEl) {\n          var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n          router.initialPages.push($pageEl[0]);\n          if (router.dynamicNavbar && $pageEl.children('.navbar').length > 0) {\n            router.initialNavbars.push($pageEl.children('.navbar')[0]);\n          }\n        });\n      }\n      if (router.$el.children('.page:not(.stacked)').length === 0 && initUrl && router.params.loadInitialPage) {\n        // No pages presented in DOM, reload new page\n        router.navigate(initUrl, {\n          initial: true,\n          reloadCurrent: true,\n          pushState: false\n        });\n      } else if (router.$el.children('.page:not(.stacked)').length) {\n        // Init current DOM page\n        var hasTabRoute;\n        router.currentRoute = currentRoute;\n        router.$el.children('.page:not(.stacked)').each(function (index, pageEl) {\n          var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n          var $navbarEl;\n          router.setPagePosition($pageEl, 'current');\n          if (router.dynamicNavbar) {\n            $navbarEl = $pageEl.children('.navbar');\n            if ($navbarEl.length > 0) {\n              if (!router.$navbarsEl.parents(ssr_window_esm[\"document\"]).length) {\n                router.$el.prepend(router.$navbarsEl);\n              }\n              router.setNavbarPosition($navbarEl, 'current');\n              router.$navbarsEl.append($navbarEl);\n              if ($navbarEl.children('.title-large').length) {\n                $navbarEl.addClass('navbar-large');\n              }\n              $pageEl.children('.navbar').remove();\n            } else {\n              router.$navbarsEl.addClass('navbar-hidden');\n              if ($navbarEl.children('.title-large').length) {\n                router.$navbarsEl.addClass('navbar-hidden navbar-large-hidden');\n              }\n            }\n          }\n          if (router.currentRoute && router.currentRoute.route && router.currentRoute.route.master && router.params.masterDetailBreakpoint > 0) {\n            $pageEl.addClass('page-master');\n            $pageEl.trigger('page:role', {\n              role: 'master'\n            });\n            if ($navbarEl && $navbarEl.length) {\n              $navbarEl.addClass('navbar-master');\n            }\n            view.checkMasterDetailBreakpoint();\n          }\n          var initOptions = {\n            route: router.currentRoute\n          };\n          if (router.currentRoute && router.currentRoute.route && router.currentRoute.route.options) {\n            utils[\"default\"].extend(initOptions, router.currentRoute.route.options);\n          }\n          router.currentPageEl = $pageEl[0];\n          if (router.dynamicNavbar && $navbarEl.length) {\n            router.currentNavbarEl = $navbarEl[0];\n          }\n          router.removeThemeElements($pageEl);\n          if (router.dynamicNavbar && $navbarEl.length) {\n            router.removeThemeElements($navbarEl);\n          }\n          if (initOptions.route.route.tab) {\n            hasTabRoute = true;\n            router.tabLoad(initOptions.route.route.tab, utils[\"default\"].extend({}, initOptions));\n          }\n          router.pageCallback('init', $pageEl, $navbarEl, 'current', undefined, initOptions);\n        });\n        if (historyRestored) {\n          router.navigate(initUrl, {\n            initial: true,\n            pushState: false,\n            history: false,\n            animate: pushStateAnimateOnLoad,\n            once: {\n              pageAfterIn: function pageAfterIn() {\n                var preloadPreviousPage = router.params.preloadPreviousPage || router.params[\"\".concat(app.theme, \"SwipeBack\")];\n                if (preloadPreviousPage && router.history.length > 2) {\n                  router.back({\n                    preload: true\n                  });\n                }\n              }\n            }\n          });\n        }\n        if (!historyRestored && !hasTabRoute) {\n          router.history.push(initUrl);\n          router.saveHistory();\n        }\n      }\n      if (initUrl && pushState && pushStateOnLoad && (!utils_history.state || !utils_history.state[view.id])) {\n        utils_history.initViewState(view.id, {\n          url: initUrl\n        });\n      }\n      router.emit('local::init routerInit', router);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var router = this;\n      router.emit('local::destroy routerDestroy', router);\n\n      // Delete props & methods\n      Object.keys(router).forEach(function (routerProp) {\n        router[routerProp] = null;\n        delete router[routerProp];\n      });\n      router = null;\n    }\n  }]);\n}(utils_class); // Load\nrouter_class_Router.prototype.forward = forward;\nrouter_class_Router.prototype.load = navigate_load;\nrouter_class_Router.prototype.navigate = navigate_navigate;\nrouter_class_Router.prototype.refreshPage = refreshPage;\n// Tab\nrouter_class_Router.prototype.tabLoad = tabLoad;\nrouter_class_Router.prototype.tabRemove = tabRemove;\n// Modal\nrouter_class_Router.prototype.modalLoad = modalLoad;\nrouter_class_Router.prototype.modalRemove = modalRemove;\n// Back\nrouter_class_Router.prototype.backward = backward;\nrouter_class_Router.prototype.loadBack = loadBack;\nrouter_class_Router.prototype.back = back_back;\n// Clear history\nrouter_class_Router.prototype.clearPreviousHistory = clearPreviousHistory;\n/* harmony default export */ var router_class = (router_class_Router);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/router.js\n\n/* harmony default export */ var router_router = ({\n  name: 'router',\n  static: {\n    Router: router_class\n  },\n  instance: {\n    cache: {\n      xhr: [],\n      templates: [],\n      components: []\n    }\n  },\n  create: function create() {\n    var instance = this;\n    if (instance.app) {\n      // View Router\n      if (instance.params.router) {\n        instance.router = new router_class(instance.app, instance);\n      }\n    } else {\n      // App Router\n      instance.router = new router_class(instance);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/view/resizable-view.js\n\n\n\nfunction resizableView(view) {\n  var app = view.app;\n  if (view.resizableInitialized) return;\n  utils[\"default\"].extend(view, {\n    resizable: true,\n    resizableWidth: null,\n    resizableInitialized: true\n  });\n  var $htmlEl = Object(dom7_module[\"default\"])('html');\n  var $el = view.$el;\n  if (!$el) return;\n  var $resizeHandlerEl;\n  var isTouched;\n  var isMoved;\n  var touchesStart = {};\n  var touchesDiff;\n  var width;\n  var minWidth;\n  var maxWidth;\n  function transformCSSWidth(v) {\n    if (!v) return null;\n    if (v.indexOf('%') >= 0 || v.indexOf('vw') >= 0) {\n      return parseInt(v, 10) / 100 * app.width;\n    }\n    var newV = parseInt(v, 10);\n    if (Number.isNaN(newV)) return null;\n    return newV;\n  }\n  function isResizable() {\n    return view.resizable && $el.hasClass('view-resizable') && $el.hasClass('view-master-detail');\n  }\n  function handleTouchStart(e) {\n    if (!isResizable()) return;\n    touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n    touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    isMoved = false;\n    isTouched = true;\n    var $pageMasterEl = $el.children('.page-master');\n    minWidth = transformCSSWidth($pageMasterEl.css('min-width'));\n    maxWidth = transformCSSWidth($pageMasterEl.css('max-width'));\n  }\n  function handleTouchMove(e) {\n    if (!isTouched) return;\n    e.f7PreventSwipePanel = true;\n    var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n    if (!isMoved) {\n      width = $resizeHandlerEl[0].offsetLeft + $resizeHandlerEl[0].offsetWidth;\n      $el.addClass('view-resizing');\n      $htmlEl.css('cursor', 'col-resize');\n    }\n    isMoved = true;\n    e.preventDefault();\n    touchesDiff = pageX - touchesStart.x;\n    var newWidth = width + touchesDiff;\n    if (minWidth && !Number.isNaN(minWidth)) {\n      newWidth = Math.max(newWidth, minWidth);\n    }\n    if (maxWidth && !Number.isNaN(maxWidth)) {\n      newWidth = Math.min(newWidth, maxWidth);\n    }\n    newWidth = Math.min(Math.max(newWidth, 0), app.width);\n    view.resizableWidth = newWidth;\n    $htmlEl[0].style.setProperty('--f7-page-master-width', \"\".concat(newWidth, \"px\"));\n    $el.trigger('view:resize', newWidth);\n    view.emit('local::resize viewResize', view, newWidth);\n  }\n  function handleTouchEnd() {\n    Object(dom7_module[\"default\"])('html').css('cursor', '');\n    if (!isTouched || !isMoved) {\n      isTouched = false;\n      isMoved = false;\n      return;\n    }\n    isTouched = false;\n    isMoved = false;\n    $htmlEl[0].style.setProperty('--f7-page-master-width', \"\".concat(view.resizableWidth, \"px\"));\n    $el.removeClass('view-resizing');\n  }\n  function handleResize() {\n    if (!view.resizableWidth) return;\n    minWidth = transformCSSWidth($resizeHandlerEl.css('min-width'));\n    maxWidth = transformCSSWidth($resizeHandlerEl.css('max-width'));\n    if (minWidth && !Number.isNaN(minWidth) && view.resizableWidth < minWidth) {\n      view.resizableWidth = Math.max(view.resizableWidth, minWidth);\n    }\n    if (maxWidth && !Number.isNaN(maxWidth) && view.resizableWidth > maxWidth) {\n      view.resizableWidth = Math.min(view.resizableWidth, maxWidth);\n    }\n    view.resizableWidth = Math.min(Math.max(view.resizableWidth, 0), app.width);\n    $htmlEl[0].style.setProperty('--f7-page-master-width', \"\".concat(view.resizableWidth, \"px\"));\n  }\n  $resizeHandlerEl = view.$el.children('.view-resize-handler');\n  if (!$resizeHandlerEl.length) {\n    view.$el.append('<div class=\"view-resize-handler\"></div>');\n    $resizeHandlerEl = view.$el.children('.view-resize-handler');\n  }\n  view.$resizeHandlerEl = $resizeHandlerEl;\n  $el.addClass('view-resizable');\n\n  // Add Events\n  var passive = utils_support[\"default\"].passiveListener ? {\n    passive: true\n  } : false;\n  view.$el.on(app.touchEvents.start, '.view-resize-handler', handleTouchStart, passive);\n  app.on('touchmove:active', handleTouchMove);\n  app.on('touchend:passive', handleTouchEnd);\n  app.on('resize', handleResize);\n  view.on('beforeOpen', handleResize);\n  view.once('viewDestroy', function () {\n    $el.removeClass('view-resizable');\n    view.$resizeHandlerEl.remove();\n    view.$el.off(app.touchEvents.start, '.view-resize-handler', handleTouchStart, passive);\n    app.off('touchmove:active', handleTouchMove);\n    app.off('touchend:passive', handleTouchEnd);\n    app.off('resize', handleResize);\n    view.off('beforeOpen', handleResize);\n  });\n}\n/* harmony default export */ var resizable_view = (resizableView);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/view/view-class.js\n\n\n\n\n\nfunction view_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, view_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction view_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (view_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar view_class_View = /*#__PURE__*/function (_Framework7Class) {\n  function View(appInstance, el) {\n    var _this;\n    var viewParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    classCallCheck_default()(this, View);\n    _this = view_class_callSuper(this, View, [viewParams, [appInstance]]);\n    var app = appInstance;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var view = _this;\n    var defaults = {\n      routes: [],\n      routesAdd: []\n    };\n    if ($el.length === 0) {\n      var message = 'Framework7: can\\'t create a View instance because ';\n      message += typeof el === 'string' ? \"the selector \\\"\".concat(el, \"\\\" didn't match any element\") : 'el must be an HTMLElement or Dom7 object';\n      throw new Error(message);\n    }\n\n    // Default View params\n    view.params = utils[\"default\"].extend(defaults, app.params.view, viewParams);\n\n    // Routes\n    if (view.params.routes.length > 0) {\n      view.routes = view.params.routes;\n    } else {\n      view.routes = [].concat(app.routes, view.params.routesAdd);\n    }\n\n    // Selector\n    var selector;\n    if (typeof el === 'string') selector = el;else {\n      // Supposed to be HTMLElement or Dom7\n      selector = ($el.attr('id') ? \"#\".concat($el.attr('id')) : '') + ($el.attr('class') ? \".\".concat($el.attr('class').replace(/ /g, '.').replace('.active', '')) : '');\n    }\n\n    // DynamicNavbar\n    var $navbarsEl;\n    if (app.theme === 'ios' && view.params.iosDynamicNavbar) {\n      $navbarsEl = $el.children('.navbars').eq(0);\n      if ($navbarsEl.length === 0) {\n        $navbarsEl = Object(dom7_module[\"default\"])('<div class=\"navbars\"></div>');\n      }\n    }\n\n    // View Props\n    utils[\"default\"].extend(false, view, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      name: view.params.name,\n      main: view.params.main || $el.hasClass('view-main'),\n      $navbarsEl: $navbarsEl,\n      navbarsEl: $navbarsEl ? $navbarsEl[0] : undefined,\n      selector: selector,\n      history: [],\n      scrollHistory: {}\n    });\n\n    // Save in DOM\n    $el[0].f7View = view;\n\n    // Install Modules\n    view.useModules();\n\n    // Add to app\n    app.views.push(view);\n    if (view.main) {\n      app.views.main = view;\n    }\n    if (view.name) {\n      app.views[view.name] = view;\n    }\n\n    // Index\n    view.index = app.views.indexOf(view);\n\n    // View ID\n    var viewId;\n    if (view.name) {\n      viewId = \"view_\".concat(view.name);\n    } else if (view.main) {\n      viewId = 'view_main';\n    } else {\n      viewId = \"view_\".concat(view.index);\n    }\n    view.id = viewId;\n\n    // Init View\n    if (app.initialized) {\n      view.init();\n    } else {\n      app.on('init', function () {\n        view.init();\n      });\n    }\n    return possibleConstructorReturn_default()(_this, view);\n  }\n  inherits_default()(View, _Framework7Class);\n  return createClass_default()(View, [{\n    key: \"destroy\",\n    value: function destroy() {\n      var view = this;\n      var app = view.app;\n      view.$el.trigger('view:beforedestroy');\n      view.emit('local::beforeDestroy viewBeforeDestroy', view);\n      app.off('resize', view.checkMasterDetailBreakpoint);\n      if (view.main) {\n        app.views.main = null;\n        delete app.views.main;\n      } else if (view.name) {\n        app.views[view.name] = null;\n        delete app.views[view.name];\n      }\n      view.$el[0].f7View = null;\n      delete view.$el[0].f7View;\n      app.views.splice(app.views.indexOf(view), 1);\n\n      // Destroy Router\n      if (view.params.router && view.router) {\n        view.router.destroy();\n      }\n      view.emit('local::destroy viewDestroy', view);\n\n      // Delete props & methods\n      Object.keys(view).forEach(function (viewProp) {\n        view[viewProp] = null;\n        delete view[viewProp];\n      });\n      view = null;\n    }\n  }, {\n    key: \"checkMasterDetailBreakpoint\",\n    value: function checkMasterDetailBreakpoint(force) {\n      var view = this;\n      var app = view.app;\n      var wasMasterDetail = view.$el.hasClass('view-master-detail');\n      var isMasterDetail = app.width >= view.params.masterDetailBreakpoint && view.$el.children('.page-master').length;\n      if (typeof force === 'undefined' && isMasterDetail || force === true) {\n        view.$el.addClass('view-master-detail');\n        if (!wasMasterDetail) {\n          view.emit('local::masterDetailBreakpoint viewMasterDetailBreakpoint', view);\n          view.$el.trigger('view:masterDetailBreakpoint');\n        }\n      } else {\n        view.$el.removeClass('view-master-detail');\n        if (wasMasterDetail) {\n          view.emit('local::masterDetailBreakpoint viewMasterDetailBreakpoint', view);\n          view.$el.trigger('view:masterDetailBreakpoint');\n        }\n      }\n    }\n  }, {\n    key: \"initMasterDetail\",\n    value: function initMasterDetail() {\n      var view = this;\n      var app = view.app;\n      view.checkMasterDetailBreakpoint = view.checkMasterDetailBreakpoint.bind(view);\n      view.checkMasterDetailBreakpoint();\n      if (view.params.masterDetailResizable) {\n        resizable_view(view);\n      }\n      app.on('resize', view.checkMasterDetailBreakpoint);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var view = this;\n      if (view.params.router) {\n        if (view.params.masterDetailBreakpoint > 0) {\n          view.initMasterDetail();\n        }\n        view.router.init();\n        view.$el.trigger('view:init');\n        view.emit('local::init viewInit', view);\n      }\n    }\n  }]);\n}(utils_class); // Use Router\nview_class_View.use(router_router);\n/* harmony default export */ var view_class = (view_class_View);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/clicks/clicks.js\n\n\n// import Device from '../../utils/device';\n// import Support from '../../utils/support';\n\nfunction initClicks(app) {\n  function handleClicks(e) {\n    var $clickedEl = Object(dom7_module[\"default\"])(e.target);\n    var $clickedLinkEl = $clickedEl.closest('a');\n    var isLink = $clickedLinkEl.length > 0;\n    var url = isLink && $clickedLinkEl.attr('href');\n    // const isTabLink = isLink && $clickedLinkEl.hasClass('tab-link') && ($clickedLinkEl.attr('data-tab') || (url && url.indexOf('#') === 0));\n\n    // Check if link is external\n    if (isLink) {\n      // eslint-disable-next-line\n      if ($clickedLinkEl.is(app.params.clicks.externalLinks) || url && url.indexOf('javascript:') >= 0) {\n        var target = $clickedLinkEl.attr('target');\n        if (url && ssr_window_esm[\"window\"].cordova && ssr_window_esm[\"window\"].cordova.InAppBrowser && (target === '_system' || target === '_blank')) {\n          e.preventDefault();\n          ssr_window_esm[\"window\"].cordova.InAppBrowser.open(url, target);\n        }\n        return;\n      }\n    }\n\n    // Modules Clicks\n    Object.keys(app.modules).forEach(function (moduleName) {\n      var moduleClicks = app.modules[moduleName].clicks;\n      if (!moduleClicks) return;\n      if (e.preventF7Router) return;\n      Object.keys(moduleClicks).forEach(function (clickSelector) {\n        var matchingClickedElement = $clickedEl.closest(clickSelector).eq(0);\n        if (matchingClickedElement.length > 0) {\n          moduleClicks[clickSelector].call(app, matchingClickedElement, matchingClickedElement.dataset(), e);\n        }\n      });\n    });\n\n    // Load Page\n    var clickedLinkData = {};\n    if (isLink) {\n      e.preventDefault();\n      clickedLinkData = $clickedLinkEl.dataset();\n    }\n\n    // Prevent Router\n    if (e.preventF7Router) return;\n    if ($clickedLinkEl.hasClass('prevent-router') || $clickedLinkEl.hasClass('router-prevent')) return;\n    var validUrl = url && url.length > 0 && url[0] !== '#';\n    if (validUrl || $clickedLinkEl.hasClass('back')) {\n      var view;\n      if (clickedLinkData.view && clickedLinkData.view === 'current') {\n        view = app.views.current;\n      } else if (clickedLinkData.view) {\n        view = Object(dom7_module[\"default\"])(clickedLinkData.view)[0].f7View;\n      } else {\n        view = $clickedEl.parents('.view')[0] && $clickedEl.parents('.view')[0].f7View;\n        if (!$clickedLinkEl.hasClass('back') && view && view.params.linksView) {\n          if (typeof view.params.linksView === 'string') view = Object(dom7_module[\"default\"])(view.params.linksView)[0].f7View;else if (view.params.linksView instanceof view_class) view = view.params.linksView;\n        }\n      }\n      if (!view) {\n        if (app.views.main) view = app.views.main;\n      }\n      if (!view || !view.router) return;\n      if (clickedLinkData.context && typeof clickedLinkData.context === 'string') {\n        try {\n          clickedLinkData.context = JSON.parse(clickedLinkData.context);\n        } catch (err) {\n          // something wrong there\n        }\n      }\n      if ($clickedLinkEl[0].f7RouteProps) {\n        clickedLinkData.props = $clickedLinkEl[0].f7RouteProps;\n      }\n      if ($clickedLinkEl.hasClass('back')) view.router.back(url, clickedLinkData);else view.router.navigate(url, clickedLinkData);\n    }\n  }\n  app.on('click', handleClicks);\n}\n/* harmony default export */ var clicks = ({\n  name: 'clicks',\n  params: {\n    clicks: {\n      // External Links\n      externalLinks: '.external'\n    }\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      initClicks(app);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/template-loader.js\n\n\n/* harmony default export */ var template_loader = ({\n  name: 'routerTemplateLoader',\n  proto: {\n    templateLoader: function templateLoader(template, templateUrl, options, resolve, reject) {\n      var router = this;\n      function compile(t) {\n        var compiledHtml;\n        var context;\n        try {\n          context = options.context || {};\n          if (typeof context === 'function') context = context.call(router);else if (typeof context === 'string') {\n            try {\n              context = JSON.parse(context);\n            } catch (err) {\n              reject();\n              throw err;\n            }\n          }\n          if (typeof t === 'function') {\n            compiledHtml = t(context);\n          } else {\n            compiledHtml = template7_esm[\"default\"].compile(t)(utils[\"default\"].extend({}, context || {}, {\n              $app: router.app,\n              $root: utils[\"default\"].extend({}, router.app.data, router.app.methods),\n              $route: options.route,\n              $f7route: options.route,\n              $router: router,\n              $f7router: router,\n              $theme: {\n                ios: router.app.theme === 'ios',\n                md: router.app.theme === 'md',\n                aurora: router.app.theme === 'aurora'\n              }\n            }));\n          }\n        } catch (err) {\n          reject();\n          throw err;\n        }\n        resolve(compiledHtml, {\n          context: context\n        });\n      }\n      if (templateUrl) {\n        // Load via XHR\n        if (router.xhr) {\n          router.xhr.abort();\n          router.xhr = false;\n        }\n        router.xhrRequest(templateUrl, options).then(function (templateContent) {\n          compile(templateContent);\n        }).catch(function () {\n          reject();\n        });\n      } else {\n        compile(template);\n      }\n    },\n    modalTemplateLoader: function modalTemplateLoader(template, templateUrl, options, resolve, reject) {\n      var router = this;\n      return router.templateLoader(template, templateUrl, options, function (html) {\n        resolve(html);\n      }, reject);\n    },\n    tabTemplateLoader: function tabTemplateLoader(template, templateUrl, options, resolve, reject) {\n      var router = this;\n      return router.templateLoader(template, templateUrl, options, function (html) {\n        resolve(html);\n      }, reject);\n    },\n    pageTemplateLoader: function pageTemplateLoader(template, templateUrl, options, resolve, reject) {\n      var router = this;\n      return router.templateLoader(template, templateUrl, options, function (html) {\n        var newOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        resolve(router.getPageEl(html), newOptions);\n      }, reject);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/router/component-loader.js\n\n/* harmony default export */ var component_loader = ({\n  name: 'routerComponentLoader',\n  proto: {\n    componentLoader: function componentLoader(component, componentUrl) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var resolve = arguments.length > 3 ? arguments[3] : undefined;\n      var reject = arguments.length > 4 ? arguments[4] : undefined;\n      var router = this;\n      var app = router.app;\n      var url = typeof component === 'string' ? component : componentUrl;\n      var compiledUrl = router.replaceRequestUrlParams(url, options);\n      function compile(componentOptions) {\n        var context = options.context || {};\n        if (typeof context === 'function') context = context.call(router);else if (typeof context === 'string') {\n          try {\n            context = JSON.parse(context);\n          } catch (err) {\n            reject(err);\n            throw err;\n          }\n        }\n        var extendContext = utils[\"default\"].merge({}, context, {\n          $route: options.route,\n          $f7route: options.route,\n          $router: router,\n          $f7router: router,\n          $theme: {\n            ios: app.theme === 'ios',\n            md: app.theme === 'md',\n            aurora: app.theme === 'aurora'\n          }\n        });\n        if (options.componentOptions && options.componentOptions.el) {\n          componentOptions.el = options.componentOptions.el;\n        }\n        if (options.componentOptions && options.componentOptions.root) {\n          componentOptions.root = options.componentOptions.root;\n        }\n        app.component.create(componentOptions, extendContext).then(function (createdComponent) {\n          resolve(createdComponent.el);\n        }).catch(function (err) {\n          reject(err);\n          throw new Error(err);\n        });\n      }\n      var cachedComponent;\n      if (compiledUrl && router.params.componentCache) {\n        router.cache.components.forEach(function (cached) {\n          if (cached.url === compiledUrl) cachedComponent = cached.component;\n        });\n      }\n      if (compiledUrl && cachedComponent) {\n        compile(cachedComponent);\n      } else if (compiledUrl && !cachedComponent) {\n        // Load via XHR\n        if (router.xhr) {\n          router.xhr.abort();\n          router.xhr = false;\n        }\n        router.xhrRequest(url, options).then(function (loadedComponent) {\n          var parsedComponent = app.component.parse(loadedComponent);\n          if (router.params.componentCache) {\n            router.cache.components.push({\n              url: compiledUrl,\n              component: parsedComponent\n            });\n          }\n          compile(parsedComponent);\n        }).catch(function (err) {\n          reject();\n          throw err;\n        });\n      } else {\n        compile(component);\n      }\n    },\n    modalComponentLoader: function modalComponentLoader(rootEl, component, componentUrl, options, resolve, reject) {\n      var router = this;\n      router.componentLoader(component, componentUrl, options, function (el) {\n        resolve(el);\n      }, reject);\n    },\n    tabComponentLoader: function tabComponentLoader(tabEl, component, componentUrl, options, resolve, reject) {\n      var router = this;\n      router.componentLoader(component, componentUrl, options, function (el) {\n        resolve(el);\n      }, reject);\n    },\n    pageComponentLoader: function pageComponentLoader(routerEl, component, componentUrl, options, resolve, reject) {\n      var router = this;\n      router.componentLoader(component, componentUrl, options, function (el) {\n        var newOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        resolve(el, newOptions);\n      }, reject);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/vnode.js\nfunction vnode_vnode(sel, data, children, text, elm) {\n  var key = data === undefined ? undefined : data.key;\n  return {\n    sel: sel,\n    data: data,\n    children: children,\n    text: text,\n    elm: elm,\n    key: key\n  };\n}\n/* harmony default export */ var snabbdom_vnode = (vnode_vnode);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/is.js\nvar is_array = Array.isArray;\nfunction primitive(s) {\n  return typeof s === 'string' || typeof s === 'number';\n}\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/h.js\n\n\nfunction addNS(data, children, sel) {\n  data.ns = 'http://www.w3.org/2000/svg';\n  if (sel !== 'foreignObject' && children !== undefined) {\n    for (var i = 0; i < children.length; ++i) {\n      var childData = children[i].data;\n      if (childData !== undefined) {\n        addNS(childData, children[i].children, children[i].sel);\n      }\n    }\n  }\n}\nfunction h_h(sel, b, c) {\n  var data = {},\n    children,\n    text,\n    i;\n  if (c !== undefined) {\n    data = b;\n    if (is_array(c)) {\n      children = c;\n    } else if (primitive(c)) {\n      text = c;\n    } else if (c && c.sel) {\n      children = [c];\n    }\n  } else if (b !== undefined) {\n    if (is_array(b)) {\n      children = b;\n    } else if (primitive(b)) {\n      text = b;\n    } else if (b && b.sel) {\n      children = [b];\n    } else {\n      data = b;\n    }\n  }\n  if (is_array(children)) {\n    for (i = 0; i < children.length; ++i) {\n      if (primitive(children[i])) children[i] = vnode_vnode(undefined, undefined, undefined, children[i], undefined);\n    }\n  }\n  if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' && (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {\n    addNS(data, children, sel);\n  }\n  return vnode_vnode(sel, data, children, text, undefined);\n}\n;\n/* harmony default export */ var snabbdom_h = (h_h);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/custom-components.js\n/* harmony default export */ var custom_components = ({});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/vdom.js\n\n/* eslint no-use-before-define: \"off\" */\n/* eslint import/no-named-as-default: \"off\" */\n\n\n\nvar selfClosing = 'area base br col command embed hr img input keygen link menuitem meta param source track wbr'.split(' ');\nvar propsAttrs = 'hidden checked disabled readonly selected autofocus autoplay required multiple value indeterminate'.split(' ');\nvar booleanProps = 'hidden checked disabled readonly selected autofocus autoplay required multiple readOnly indeterminate'.split(' ');\nvar tempDomDIV = ssr_window_esm[\"document\"].createElement('div');\nvar tempDomTBODY;\nvar tempDomTROW;\nfunction toCamelCase(name) {\n  return name.split('-').map(function (word, index) {\n    if (index === 0) return word.toLowerCase();\n    return word[0].toUpperCase() + word.substr(1);\n  }).join('');\n}\nfunction contextFromAttrs() {\n  var context = {};\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  args.forEach(function () {\n    var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    Object.keys(obj).forEach(function (key) {\n      context[toCamelCase(key)] = obj[key];\n    });\n  });\n  return context;\n}\nfunction createCustomComponent(_ref) {\n  var app = _ref.app,\n    vnode = _ref.vnode,\n    tagName = _ref.tagName,\n    data = _ref.data;\n  app.component.create(Object.assign({\n    el: vnode.elm\n  }, custom_components[tagName]), {\n    $props: contextFromAttrs(data.attrs || {}, data.props || {})\n  }, vnode.children).then(function (c) {\n    if (vnode.data && vnode.data.on && c && c.$el) {\n      Object.keys(vnode.data.on).forEach(function (eventName) {\n        c.$el.on(eventName, vnode.data.on[eventName]);\n      });\n    }\n    // eslint-disable-next-line\n    vnode.elm.__component__ = c;\n  });\n}\nfunction updateCustomComponent(vnode) {\n  // eslint-disable-next-line\n  var component = vnode && vnode.elm && vnode.elm.__component__;\n  if (!component) return;\n  var newProps = contextFromAttrs(vnode.data.attrs || {}, vnode.data.props || {});\n  component.$children = vnode.children;\n  Object.assign(component.$props, newProps);\n  component.$update();\n}\nfunction destroyCustomComponent(vnode) {\n  // eslint-disable-next-line\n  var component = vnode && vnode.elm && vnode.elm.__component__;\n  if (component) {\n    var el = component.el,\n      $el = component.$el;\n    if (vnode.data && vnode.data.on && $el) {\n      Object.keys(vnode.data.on).forEach(function (eventName) {\n        $el.off(eventName, vnode.data.on[eventName]);\n      });\n    }\n    if (component.$destroy) component.$destroy();\n    if (el && el.parentNode) el.parentNode.removeChild(el);\n    delete vnode.elm.__component__; // eslint-disable-line\n  }\n}\nfunction getHooks(data, app, initial, isRoot, tagName) {\n  var hooks = {};\n  var insert = [];\n  var destroy = [];\n  var update = [];\n  var postpatch = [];\n  var isFakeElement = false;\n  if (data && data.attrs && data.attrs.component) {\n    // eslint-disable-next-line\n    tagName = data.attrs.component;\n    delete data.attrs.component;\n    isFakeElement = true;\n  }\n  var isCustomComponent = tagName && tagName.indexOf('-') > 0 && custom_components[tagName];\n  if (isCustomComponent) {\n    insert.push(function (vnode) {\n      if (vnode.sel !== tagName && !isFakeElement) return;\n      createCustomComponent({\n        app: app,\n        vnode: vnode,\n        tagName: tagName,\n        data: data\n      });\n    });\n    destroy.push(function (vnode) {\n      destroyCustomComponent(vnode);\n    });\n    update.push(function (oldVnode, vnode) {\n      updateCustomComponent(vnode);\n    });\n  }\n  if (!isCustomComponent) {\n    if (!data || !data.attrs || !data.attrs.class) return hooks;\n    var classNames = data.attrs.class;\n    classNames.split(' ').forEach(function (className) {\n      if (!initial) {\n        insert.push.apply(insert, toConsumableArray_default()(app.getVnodeHooks('insert', className)));\n      }\n      destroy.push.apply(destroy, toConsumableArray_default()(app.getVnodeHooks('destroy', className)));\n      update.push.apply(update, toConsumableArray_default()(app.getVnodeHooks('update', className)));\n      postpatch.push.apply(postpatch, toConsumableArray_default()(app.getVnodeHooks('postpatch', className)));\n    });\n  }\n  if (isRoot && !initial) {\n    postpatch.push(function (oldVnode, vnode) {\n      var vn = vnode || oldVnode;\n      if (!vn) return;\n      if (vn.data && vn.data.context && vn.data.context.$options.updated) {\n        vn.data.context.$hook('updated');\n      }\n    });\n  }\n  if (insert.length === 0 && destroy.length === 0 && update.length === 0 && postpatch.length === 0) {\n    return hooks;\n  }\n  if (insert.length) {\n    hooks.insert = function (vnode) {\n      insert.forEach(function (f) {\n        return f(vnode);\n      });\n    };\n  }\n  if (destroy.length) {\n    hooks.destroy = function (vnode) {\n      destroy.forEach(function (f) {\n        return f(vnode);\n      });\n    };\n  }\n  if (update.length) {\n    hooks.update = function (oldVnode, vnode) {\n      update.forEach(function (f) {\n        return f(oldVnode, vnode);\n      });\n    };\n  }\n  if (postpatch.length) {\n    hooks.postpatch = function (oldVnode, vnode) {\n      postpatch.forEach(function (f) {\n        return f(oldVnode, vnode);\n      });\n    };\n  }\n  return hooks;\n}\nfunction getEventHandler(handlerString, context) {\n  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    stop = _ref2.stop,\n    prevent = _ref2.prevent,\n    once = _ref2.once;\n  var fired = false;\n  var methodName;\n  var method;\n  var needMethodBind = true;\n  if (handlerString.indexOf('(') < 0) {\n    methodName = handlerString;\n  } else {\n    methodName = handlerString.split('(')[0];\n  }\n  if (methodName.indexOf('.') >= 0) {\n    methodName.split('.').forEach(function (path, pathIndex) {\n      if (pathIndex === 0 && path === 'this') return;\n      if (pathIndex === 0 && path === 'window') {\n        // eslint-disable-next-line\n        method = ssr_window_esm[\"window\"];\n        needMethodBind = false;\n        return;\n      }\n      if (!method) method = context;\n      if (method[path]) method = method[path];else {\n        throw new Error(\"Framework7: Component doesn't have method \\\"\".concat(methodName.split('.').slice(0, pathIndex + 1).join('.'), \"\\\"\"));\n      }\n    });\n  } else {\n    if (!context[methodName]) {\n      throw new Error(\"Framework7: Component doesn't have method \\\"\".concat(methodName, \"\\\"\"));\n    }\n    method = context[methodName];\n  }\n  if (needMethodBind) {\n    method = method.bind(context);\n  }\n  function handler() {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n    var e = args[0];\n    var customArgs = [];\n    if (once && fired) return;\n    if (stop) e.stopPropagation();\n    if (prevent) e.preventDefault();\n    fired = true;\n    if (handlerString.indexOf('(') < 0) {\n      customArgs = args;\n    } else {\n      var handlerArguments = handlerString.split('(')[1].split(')')[0].replace(/'[^']*'|\"[^\"]*\"/g, function (a) {\n        return a.replace(/,/g, '<_comma_>');\n      }).split(',').map(function (a) {\n        return a.replace(/<_comma_>/g, ',');\n      });\n      handlerArguments.forEach(function (argument) {\n        var arg = argument.trim();\n        // eslint-disable-next-line\n        if (!isNaN(arg)) arg = parseFloat(arg);else if (arg === 'true') arg = true;else if (arg === 'false') arg = false;else if (arg === 'null') arg = null;else if (arg === 'undefined') arg = undefined;else if (arg[0] === '\"') arg = arg.replace(/\"/g, '');else if (arg[0] === '\\'') arg = arg.replace(/'/g, '');else if (arg.indexOf('.') > 0) {\n          var deepArg;\n          arg.split('.').forEach(function (path) {\n            if (!deepArg) deepArg = context;\n            deepArg = deepArg[path];\n          });\n          arg = deepArg;\n        } else {\n          arg = context[arg];\n        }\n        customArgs.push(arg);\n      });\n    }\n    method.apply(void 0, toConsumableArray_default()(customArgs));\n  }\n  return handler;\n}\nfunction getData(el, context, app, initial, isRoot, tagName) {\n  var data = {\n    context: context\n  };\n  var attributes = el.attributes;\n  Array.prototype.forEach.call(attributes, function (attr) {\n    var attrName = attr.name;\n    var attrValue = attr.value;\n    if (propsAttrs.indexOf(attrName) >= 0) {\n      // Props\n      if (!data.props) data.props = {};\n      if (attrName === 'readonly') {\n        attrName = 'readOnly';\n      }\n      if (tagName === 'option' && attrName === 'value') {\n        if (!data.attrs) data.attrs = {};\n        data.attrs.value = attrValue;\n      }\n      if (booleanProps.indexOf(attrName) >= 0) {\n        // eslint-disable-next-line\n        data.props[attrName] = attrValue === false ? false : true;\n      } else {\n        data.props[attrName] = attrValue;\n      }\n    } else if (attrName === 'key') {\n      // Key\n      data.key = attrValue;\n    } else if (attrName.indexOf('@') === 0) {\n      // Events\n      if (!data.on) data.on = {};\n      var eventName = attrName.substr(1);\n      var stop = false;\n      var prevent = false;\n      var once = false;\n      if (eventName.indexOf('.') >= 0) {\n        eventName.split('.').forEach(function (eventNamePart, eventNameIndex) {\n          if (eventNameIndex === 0) eventName = eventNamePart;else {\n            if (eventNamePart === 'stop') stop = true;\n            if (eventNamePart === 'prevent') prevent = true;\n            if (eventNamePart === 'once') once = true;\n          }\n        });\n      }\n      data.on[eventName] = getEventHandler(attrValue, context, {\n        stop: stop,\n        prevent: prevent,\n        once: once\n      });\n    } else if (attrName === 'style') {\n      // Style\n      if (attrValue.indexOf('{') >= 0 && attrValue.indexOf('}') >= 0) {\n        try {\n          data.style = JSON.parse(attrValue);\n        } catch (e) {\n          if (!data.attrs) data.attrs = {};\n          data.attrs.style = attrValue;\n        }\n      } else {\n        if (!data.attrs) data.attrs = {};\n        data.attrs.style = attrValue;\n      }\n    } else {\n      // Rest of attribures\n      if (!data.attrs) data.attrs = {};\n      data.attrs[attrName] = attrValue;\n\n      // ID -> Key\n      if (attrName === 'id' && !data.key && !isRoot) {\n        data.key = attrValue;\n      }\n    }\n  });\n  if (isRoot && context && context.$id && context.$style && context.$styleScoped) {\n    if (!data.attrs) data.attrs = {};\n    data.attrs[\"data-f7-\".concat(context.$id)] = '';\n  }\n  var hooks = getHooks(data, app, initial, isRoot, tagName);\n  hooks.prepatch = function (oldVnode, vnode) {\n    if (!oldVnode || !vnode) return;\n    if (oldVnode && oldVnode.data && oldVnode.data.props) {\n      Object.keys(oldVnode.data.props).forEach(function (key) {\n        if (booleanProps.indexOf(key) < 0) return;\n        if (!vnode.data) vnode.data = {};\n        if (!vnode.data.props) vnode.data.props = {};\n        if (oldVnode.data.props[key] === true && !(key in vnode.data.props)) {\n          vnode.data.props[key] = false;\n        }\n      });\n    }\n  };\n  if (hooks) {\n    data.hook = hooks;\n  }\n  return data;\n}\nfunction getChildren(el, context, app, initial) {\n  var children = [];\n  var nodes = el.childNodes;\n  for (var i = 0; i < nodes.length; i += 1) {\n    var childNode = nodes[i];\n    var child = elementToVNode(childNode, context, app, initial);\n    if (Array.isArray(child)) {\n      children.push.apply(children, toConsumableArray_default()(child));\n    } else if (child) {\n      children.push(child);\n    }\n  }\n  return children;\n}\nfunction getSlots(slotEl, context, app, initial) {\n  var slotName = slotEl.getAttribute('name') || 'default';\n  var slots = (context.$children || []).filter(function (childEl) {\n    var childSlotName = 'default';\n    if (childEl.data) {\n      childSlotName = childEl.data.attrs && childEl.data.attrs.slot || 'default';\n    }\n    return childSlotName === slotName;\n  });\n  if (slots.length === 0) {\n    return getChildren(slotEl, context, app, initial);\n  }\n  return slots;\n}\nfunction elementToVNode(el, context, app, initial, isRoot) {\n  if (el.nodeType === 3) {\n    // text\n    return el.textContent;\n  }\n  if (el.nodeType !== 1) return null;\n  // element (statement adds inline SVG compatibility)\n  var tagName = el instanceof ssr_window_esm[\"window\"].SVGElement ? el.nodeName : el.nodeName.toLowerCase();\n  if (tagName === 'slot') {\n    return getSlots(el, context, app, initial);\n  }\n  return snabbdom_h(tagName, getData(el, context, app, initial, isRoot, tagName), selfClosing.indexOf(tagName) >= 0 ? [] : getChildren(el, context, app, initial));\n}\n/* harmony default export */ var vdom = (function () {\n  var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n  var context = arguments.length > 1 ? arguments[1] : undefined;\n  var initial = arguments.length > 2 ? arguments[2] : undefined;\n  // Save to temp dom\n  var htmlTrim = html.trim();\n  var tempDom = tempDomDIV;\n  if (htmlTrim.indexOf('<tr') === 0) {\n    if (!tempDomTBODY) tempDomTBODY = ssr_window_esm[\"document\"].createElement('tbody');\n    tempDom = tempDomTBODY;\n  }\n  if (htmlTrim.indexOf('<td') === 0 || htmlTrim.indexOf('<th') === 0) {\n    if (!tempDomTROW) tempDomTROW = ssr_window_esm[\"document\"].createElement('tr');\n    tempDom = tempDomTROW;\n  }\n  tempDom.innerHTML = htmlTrim;\n\n  // Parse DOM\n  var rootEl;\n  for (var i = 0; i < tempDom.childNodes.length; i += 1) {\n    if (!rootEl && tempDom.childNodes[i].nodeType === 1) {\n      rootEl = tempDom.childNodes[i];\n    }\n  }\n  var result = elementToVNode(rootEl, context, context.$app, initial, true);\n\n  // Clean\n  tempDom.innerHTML = '';\n  return result;\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/htmldomapi.js\nfunction createElement(tagName) {\n  return document.createElement(tagName);\n}\nfunction createElementNS(namespaceURI, qualifiedName) {\n  return document.createElementNS(namespaceURI, qualifiedName);\n}\nfunction createTextNode(text) {\n  return document.createTextNode(text);\n}\nfunction createComment(text) {\n  return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n  if (referenceNode && referenceNode.parentNode !== parentNode) {\n    if (referenceNode.__component__) referenceNode = referenceNode.__component__.el;\n  }\n  parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n  if (!node) return;\n  node.removeChild(child);\n}\nfunction appendChild(node, child) {\n  node.appendChild(child);\n}\nfunction parentNode(node) {\n  return node.parentNode;\n}\nfunction nextSibling(node) {\n  return node.nextSibling;\n}\nfunction htmldomapi_tagName(elm) {\n  return elm.tagName;\n}\nfunction setTextContent(node, text) {\n  node.textContent = text;\n}\nfunction getTextContent(node) {\n  return node.textContent;\n}\nfunction isElement(node) {\n  return node.nodeType === 1;\n}\nfunction isText(node) {\n  return node.nodeType === 3;\n}\nfunction isComment(node) {\n  return node.nodeType === 8;\n}\nvar htmlDomApi = {\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: htmldomapi_tagName,\n  setTextContent: setTextContent,\n  getTextContent: getTextContent,\n  isElement: isElement,\n  isText: isText,\n  isComment: isComment\n};\n/* harmony default export */ var htmldomapi = (htmlDomApi);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/thunk.js\n\nfunction copyToThunk(vnode, thunk) {\n  thunk.elm = vnode.elm;\n  vnode.data.fn = thunk.data.fn;\n  vnode.data.args = thunk.data.args;\n  thunk.data = vnode.data;\n  thunk.children = vnode.children;\n  thunk.text = vnode.text;\n  thunk.elm = vnode.elm;\n}\nfunction thunk_init(thunk) {\n  var cur = thunk.data;\n  var vnode = cur.fn.apply(undefined, cur.args);\n  copyToThunk(vnode, thunk);\n}\nfunction prepatch(oldVnode, thunk) {\n  var i,\n    old = oldVnode.data,\n    cur = thunk.data;\n  var oldArgs = old.args,\n    args = cur.args;\n  if (old.fn !== cur.fn || oldArgs.length !== args.length) {\n    copyToThunk(cur.fn.apply(undefined, args), thunk);\n    return;\n  }\n  for (i = 0; i < args.length; ++i) {\n    if (oldArgs[i] !== args[i]) {\n      copyToThunk(cur.fn.apply(undefined, args), thunk);\n      return;\n    }\n  }\n  copyToThunk(oldVnode, thunk);\n}\nvar thunk_thunk = function thunk(sel, key, fn, args) {\n  if (args === undefined) {\n    args = fn;\n    fn = key;\n    key = undefined;\n  }\n  return h_h(sel, {\n    key: key,\n    hook: {\n      init: thunk_init,\n      prepatch: prepatch\n    },\n    fn: fn,\n    args: args\n  });\n};\n/* harmony default export */ var snabbdom_thunk = (thunk_thunk);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/snabbdom.js\n\n\n\nfunction isUndef(s) {\n  return s === undefined;\n}\nfunction isDef(s) {\n  return s !== undefined;\n}\nvar emptyNode = snabbdom_vnode('', {}, [], undefined, undefined);\nfunction sameVnode(vnode1, vnode2) {\n  return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;\n}\nfunction isVnode(vnode) {\n  return vnode.sel !== undefined;\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n  var i,\n    map = {},\n    key,\n    ch;\n  for (i = beginIdx; i <= endIdx; ++i) {\n    ch = children[i];\n    if (ch != null) {\n      key = ch.key;\n      if (key !== undefined) map[key] = i;\n    }\n  }\n  return map;\n}\nvar snabbdom_hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post'];\n\n\nfunction snabbdom_init(modules, domApi) {\n  var i,\n    j,\n    cbs = {};\n  var api = domApi !== undefined ? domApi : htmldomapi;\n  for (i = 0; i < snabbdom_hooks.length; ++i) {\n    cbs[snabbdom_hooks[i]] = [];\n    for (j = 0; j < modules.length; ++j) {\n      var hook = modules[j][snabbdom_hooks[i]];\n      if (hook !== undefined) {\n        cbs[snabbdom_hooks[i]].push(hook);\n      }\n    }\n  }\n  function emptyNodeAt(elm) {\n    var id = elm.id ? '#' + elm.id : '';\n    var c = elm.className ? '.' + elm.className.split(' ').join('.') : '';\n    return snabbdom_vnode(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm);\n  }\n  function createRmCb(childElm, listeners) {\n    return function rmCb() {\n      if (--listeners === 0) {\n        var parent_1 = api.parentNode(childElm);\n        api.removeChild(parent_1, childElm);\n      }\n    };\n  }\n  function createElm(vnode, insertedVnodeQueue) {\n    var i,\n      data = vnode.data;\n    if (data !== undefined) {\n      if (isDef(i = data.hook) && isDef(i = i.init)) {\n        i(vnode);\n        data = vnode.data;\n      }\n    }\n    var children = vnode.children,\n      sel = vnode.sel;\n    if (sel === '!') {\n      if (isUndef(vnode.text)) {\n        vnode.text = '';\n      }\n      vnode.elm = api.createComment(vnode.text);\n    } else if (sel !== undefined) {\n      // Parse selector\n      var hashIdx = sel.indexOf('#');\n      var dotIdx = sel.indexOf('.', hashIdx);\n      var hash = hashIdx > 0 ? hashIdx : sel.length;\n      var dot = dotIdx > 0 ? dotIdx : sel.length;\n      var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;\n      var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag) : api.createElement(tag);\n      if (hash < dot) elm.setAttribute('id', sel.slice(hash + 1, dot));\n      if (dotIdx > 0) elm.setAttribute('class', sel.slice(dot + 1).replace(/\\./g, ' '));\n      for (i = 0; i < cbs.create.length; ++i) cbs.create[i](emptyNode, vnode);\n      if (is_array(children)) {\n        for (i = 0; i < children.length; ++i) {\n          var ch = children[i];\n          if (ch != null) {\n            api.appendChild(elm, createElm(ch, insertedVnodeQueue));\n          }\n        }\n      } else if (primitive(vnode.text)) {\n        api.appendChild(elm, api.createTextNode(vnode.text));\n      }\n      i = vnode.data.hook; // Reuse variable\n      if (isDef(i)) {\n        if (i.create) i.create(emptyNode, vnode);\n        if (i.insert) insertedVnodeQueue.push(vnode);\n      }\n    } else {\n      vnode.elm = api.createTextNode(vnode.text);\n    }\n    return vnode.elm;\n  }\n  function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var ch = vnodes[startIdx];\n      if (ch != null) {\n        api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before);\n      }\n    }\n  }\n  function invokeDestroyHook(vnode) {\n    var i,\n      j,\n      data = vnode.data;\n    if (data !== undefined) {\n      if (isDef(i = data.hook) && isDef(i = i.destroy)) i(vnode);\n      for (i = 0; i < cbs.destroy.length; ++i) cbs.destroy[i](vnode);\n      if (vnode.children !== undefined) {\n        for (j = 0; j < vnode.children.length; ++j) {\n          i = vnode.children[j];\n          if (i != null && typeof i !== \"string\") {\n            invokeDestroyHook(i);\n          }\n        }\n      }\n    }\n  }\n  function removeVnodes(parentElm, vnodes, startIdx, endIdx) {\n    for (; startIdx <= endIdx; ++startIdx) {\n      var i_1 = void 0,\n        listeners = void 0,\n        rm = void 0,\n        ch = vnodes[startIdx];\n      if (ch != null) {\n        if (isDef(ch.sel)) {\n          invokeDestroyHook(ch);\n          listeners = cbs.remove.length + 1;\n          rm = createRmCb(ch.elm, listeners);\n          for (i_1 = 0; i_1 < cbs.remove.length; ++i_1) cbs.remove[i_1](ch, rm);\n          if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) {\n            i_1(ch, rm);\n          } else {\n            rm();\n          }\n        } else {\n          api.removeChild(parentElm, ch.elm);\n        }\n      }\n    }\n  }\n  function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) {\n    var oldStartIdx = 0,\n      newStartIdx = 0;\n    var oldEndIdx = oldCh.length - 1;\n    var oldStartVnode = oldCh[0];\n    var oldEndVnode = oldCh[oldEndIdx];\n    var newEndIdx = newCh.length - 1;\n    var newStartVnode = newCh[0];\n    var newEndVnode = newCh[newEndIdx];\n    var oldKeyToIdx;\n    var idxInOld;\n    var elmToMove;\n    var before;\n    while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n      if (oldStartVnode == null) {\n        oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left\n      } else if (oldEndVnode == null) {\n        oldEndVnode = oldCh[--oldEndIdx];\n      } else if (newStartVnode == null) {\n        newStartVnode = newCh[++newStartIdx];\n      } else if (newEndVnode == null) {\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newStartVnode)) {\n        patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n        oldStartVnode = oldCh[++oldStartIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else if (sameVnode(oldEndVnode, newEndVnode)) {\n        patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldStartVnode, newEndVnode)) {\n        patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n        api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));\n        oldStartVnode = oldCh[++oldStartIdx];\n        newEndVnode = newCh[--newEndIdx];\n      } else if (sameVnode(oldEndVnode, newStartVnode)) {\n        patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n        api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n        oldEndVnode = oldCh[--oldEndIdx];\n        newStartVnode = newCh[++newStartIdx];\n      } else {\n        if (oldKeyToIdx === undefined) {\n          oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n        }\n        idxInOld = oldKeyToIdx[newStartVnode.key];\n        if (isUndef(idxInOld)) {\n          api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);\n          newStartVnode = newCh[++newStartIdx];\n        } else {\n          elmToMove = oldCh[idxInOld];\n          if (elmToMove.sel !== newStartVnode.sel) {\n            api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);\n          } else {\n            patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\n            oldCh[idxInOld] = undefined;\n            api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);\n          }\n          newStartVnode = newCh[++newStartIdx];\n        }\n      }\n    }\n    if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {\n      if (oldStartIdx > oldEndIdx) {\n        before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;\n        addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n      } else {\n        removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n      }\n    }\n  }\n  function patchVnode(oldVnode, vnode, insertedVnodeQueue) {\n    var i, hook;\n    if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {\n      i(oldVnode, vnode);\n    }\n    var elm = vnode.elm = oldVnode.elm;\n    var oldCh = oldVnode.children;\n    var ch = vnode.children;\n    if (oldVnode === vnode) return;\n    if (vnode.data !== undefined) {\n      for (i = 0; i < cbs.update.length; ++i) cbs.update[i](oldVnode, vnode);\n      i = vnode.data.hook;\n      if (isDef(i) && isDef(i = i.update)) i(oldVnode, vnode);\n    }\n    if (isUndef(vnode.text)) {\n      if (isDef(oldCh) && isDef(ch)) {\n        if (oldCh !== ch) updateChildren(elm, oldCh, ch, insertedVnodeQueue);\n      } else if (isDef(ch)) {\n        if (isDef(oldVnode.text)) api.setTextContent(elm, '');\n        addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n      } else if (isDef(oldCh)) {\n        removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n      } else if (isDef(oldVnode.text)) {\n        api.setTextContent(elm, '');\n      }\n    } else if (oldVnode.text !== vnode.text) {\n      api.setTextContent(elm, vnode.text);\n    }\n    if (isDef(hook) && isDef(i = hook.postpatch)) {\n      i(oldVnode, vnode);\n    }\n  }\n  return function patch(oldVnode, vnode) {\n    var i, elm, parent;\n    var insertedVnodeQueue = [];\n    for (i = 0; i < cbs.pre.length; ++i) cbs.pre[i]();\n    if (!isVnode(oldVnode)) {\n      oldVnode = emptyNodeAt(oldVnode);\n    }\n    if (sameVnode(oldVnode, vnode)) {\n      patchVnode(oldVnode, vnode, insertedVnodeQueue);\n    } else {\n      elm = oldVnode.elm;\n      parent = api.parentNode(elm);\n      createElm(vnode, insertedVnodeQueue);\n      if (parent !== null) {\n        api.insertBefore(parent, vnode.elm, api.nextSibling(elm));\n        removeVnodes(parent, [oldVnode], 0, 0);\n      }\n    }\n    for (i = 0; i < insertedVnodeQueue.length; ++i) {\n      insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]);\n    }\n    for (i = 0; i < cbs.post.length; ++i) cbs.post[i]();\n    return vnode;\n  };\n}\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/modules/attributes.js\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\nvar xmlNS = 'http://www.w3.org/XML/1998/namespace';\nvar colonChar = 58;\nvar xChar = 120;\nfunction updateAttrs(oldVnode, vnode) {\n  var key,\n    elm = vnode.elm,\n    oldAttrs = oldVnode.data.attrs,\n    attrs = vnode.data.attrs;\n  if (!oldAttrs && !attrs) return;\n  if (oldAttrs === attrs) return;\n  oldAttrs = oldAttrs || {};\n  attrs = attrs || {};\n  // update modified attributes, add new attributes\n  for (key in attrs) {\n    var cur = attrs[key];\n    var old = oldAttrs[key];\n    if (old !== cur) {\n      if (cur === true) {\n        elm.setAttribute(key, \"\");\n      } else if (cur === false) {\n        elm.removeAttribute(key);\n      } else {\n        if (key.charCodeAt(0) !== xChar) {\n          elm.setAttribute(key, cur);\n        } else if (key.charCodeAt(3) === colonChar) {\n          // Assume xml namespace\n          elm.setAttributeNS(xmlNS, key, cur);\n        } else if (key.charCodeAt(5) === colonChar) {\n          // Assume xlink namespace\n          elm.setAttributeNS(xlinkNS, key, cur);\n        } else {\n          elm.setAttribute(key, cur);\n        }\n      }\n    }\n  }\n  // remove removed attributes\n  // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)\n  // the other option is to remove all attributes with value == undefined\n  for (key in oldAttrs) {\n    if (!(key in attrs)) {\n      elm.removeAttribute(key);\n    }\n  }\n}\nvar attributesModule = {\n  create: updateAttrs,\n  update: updateAttrs\n};\n/* harmony default export */ var modules_attributes = (attributesModule);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/modules/props.js\nfunction updateProps(oldVnode, vnode) {\n  var key,\n    cur,\n    old,\n    elm = vnode.elm,\n    oldProps = oldVnode.data.props,\n    props = vnode.data.props;\n  if (!oldProps && !props) return;\n  if (oldProps === props) return;\n  oldProps = oldProps || {};\n  props = props || {};\n  for (key in oldProps) {\n    if (!props[key]) {\n      delete elm[key];\n    }\n  }\n  for (key in props) {\n    cur = props[key];\n    old = oldProps[key];\n    if (old !== cur && (key !== 'value' || elm[key] !== cur)) {\n      elm[key] = cur;\n    }\n  }\n}\nvar propsModule = {\n  create: updateProps,\n  update: updateProps\n};\n/* harmony default export */ var modules_props = (propsModule);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/snabbdom/modules/style.js\nvar raf = typeof window !== 'undefined' && window.requestAnimationFrame || setTimeout;\nvar nextFrame = function nextFrame(fn) {\n  raf(function () {\n    raf(fn);\n  });\n};\nfunction setNextFrame(obj, prop, val) {\n  nextFrame(function () {\n    obj[prop] = val;\n  });\n}\nfunction updateStyle(oldVnode, vnode) {\n  var cur,\n    name,\n    elm = vnode.elm,\n    oldStyle = oldVnode.data.style,\n    style = vnode.data.style;\n  if (!oldStyle && !style) return;\n  if (oldStyle === style) return;\n  oldStyle = oldStyle || {};\n  style = style || {};\n  var oldHasDel = 'delayed' in oldStyle;\n  for (name in oldStyle) {\n    if (!style[name]) {\n      if (name[0] === '-' && name[1] === '-') {\n        elm.style.removeProperty(name);\n      } else {\n        elm.style[name] = '';\n      }\n    }\n  }\n  for (name in style) {\n    cur = style[name];\n    if (name === 'delayed' && style.delayed) {\n      for (var name2 in style.delayed) {\n        cur = style.delayed[name2];\n        if (!oldHasDel || cur !== oldStyle.delayed[name2]) {\n          setNextFrame(elm.style, name2, cur);\n        }\n      }\n    } else if (name !== 'remove' && cur !== oldStyle[name]) {\n      if (name[0] === '-' && name[1] === '-') {\n        elm.style.setProperty(name, cur);\n      } else {\n        elm.style[name] = cur;\n      }\n    }\n  }\n}\nfunction applyDestroyStyle(vnode) {\n  var style,\n    name,\n    elm = vnode.elm,\n    s = vnode.data.style;\n  if (!s || !(style = s.destroy)) return;\n  for (name in style) {\n    elm.style[name] = style[name];\n  }\n}\nfunction applyRemoveStyle(vnode, rm) {\n  var s = vnode.data.style;\n  if (!s || !s.remove) {\n    rm();\n    return;\n  }\n  var name,\n    elm = vnode.elm,\n    i = 0,\n    compStyle,\n    style = s.remove,\n    amount = 0,\n    applied = [];\n  for (name in style) {\n    applied.push(name);\n    elm.style[name] = style[name];\n  }\n  compStyle = getComputedStyle(elm);\n  var props = compStyle['transition-property'].split(', ');\n  for (; i < props.length; ++i) {\n    if (applied.indexOf(props[i]) !== -1) amount++;\n  }\n  elm.addEventListener('transitionend', function (ev) {\n    if (ev.target === elm) --amount;\n    if (amount === 0) rm();\n  });\n}\nvar styleModule = {\n  create: updateStyle,\n  update: updateStyle,\n  destroy: applyDestroyStyle,\n  remove: applyRemoveStyle\n};\n/* harmony default export */ var modules_style = (styleModule);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/eventslisteners.js\n\n\nfunction invokeHandler(handler, event, args) {\n  if (typeof handler === 'function') {\n    // call function handler\n    handler.apply(void 0, [event].concat(toConsumableArray_default()(args)));\n  }\n}\nfunction handleEvent(event, args, vnode) {\n  var name = event.type;\n  var on = vnode.data.on;\n  // call event handler(s) if exists\n  if (on && on[name]) {\n    invokeHandler(on[name], event, args, vnode);\n  }\n}\nfunction createListener() {\n  return function handler(event) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n    handleEvent(event, args, handler.vnode);\n  };\n}\nfunction updateEvents(oldVnode, vnode) {\n  var oldOn = oldVnode.data.on;\n  var oldListener = oldVnode.listener;\n  var oldElm = oldVnode.elm;\n  var on = vnode && vnode.data.on;\n  var elm = vnode && vnode.elm;\n  // optimization for reused immutable handlers\n  if (oldOn === on) {\n    return;\n  }\n  // remove existing listeners which no longer used\n  if (oldOn && oldListener) {\n    // if element changed or deleted we remove all existing listeners unconditionally\n    if (!on) {\n      Object.keys(oldOn).forEach(function (name) {\n        Object(dom7_module[\"default\"])(oldElm).off(name, oldListener);\n      });\n    } else {\n      Object.keys(oldOn).forEach(function (name) {\n        if (!on[name]) {\n          Object(dom7_module[\"default\"])(oldElm).off(name, oldListener);\n        }\n      });\n    }\n  }\n  // add new listeners which has not already attached\n  if (on) {\n    // reuse existing listener or create new\n    var listener = oldVnode.listener || createListener();\n    vnode.listener = listener;\n    // update vnode for listener\n    listener.vnode = vnode;\n    // if element changed or added we add all needed listeners unconditionally\n    if (!oldOn) {\n      Object.keys(on).forEach(function (name) {\n        Object(dom7_module[\"default\"])(elm).on(name, listener);\n      });\n    } else {\n      Object.keys(on).forEach(function (name) {\n        if (!oldOn[name]) {\n          Object(dom7_module[\"default\"])(elm).on(name, listener);\n        }\n      });\n    }\n  }\n}\n/* harmony default export */ var eventslisteners = ({\n  create: updateEvents,\n  update: updateEvents,\n  destroy: updateEvents\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/patch.js\n/* eslint import/no-named-as-default: off */\n\n\n\n\n\nvar patch = snabbdom_init([modules_attributes, modules_props, modules_style, eventslisteners]);\n/* harmony default export */ var component_patch = (patch);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/component-mixins.js\n/* harmony default export */ var component_mixins = ({});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/component-class.js\n\n\n\n/* eslint no-underscore-dangle: \"off\" */\n\n\n\n\n\n\n\nvar component_class_Component = /*#__PURE__*/function () {\n  function Component(app) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var extendContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var children = arguments.length > 3 ? arguments[3] : undefined;\n    classCallCheck_default()(this, Component);\n    var id = utils[\"default\"].id();\n    var self = this;\n    utils[\"default\"].merge(self, {\n      $props: {}\n    }, extendContext, {\n      $: dom7_module[\"default\"],\n      $$: dom7_module[\"default\"],\n      $dom7: dom7_module[\"default\"],\n      $app: app,\n      $f7: app,\n      $options: utils[\"default\"].extend({\n        id: id\n      }, options),\n      $id: options.isClassComponent ? self.constructor.id : options.id || id,\n      $mixins: options.isClassComponent ? self.constructor.mixins : options.mixins,\n      $children: children || [],\n      $isRootComponent: !!options.root\n    });\n    var $options = self.$options;\n    if (self.$mixins && self.$mixins.length) {\n      for (var i = self.$mixins.length - 1; i >= 0; i -= 1) {\n        var mixin = self.$mixins[i];\n        if (typeof mixin === 'string') {\n          if (component_mixins[mixin]) self.$mixins[i] = component_mixins[mixin];else self.$mixins.splice(i, 1);\n        }\n      }\n    }\n    Object.defineProperty(self, '$slots', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        var slots = {};\n        self.$children.forEach(function (childVNode) {\n          var childSlotName = 'default';\n          if (childVNode.data) {\n            childSlotName = childVNode.data.attrs && childVNode.data.attrs.slot || 'default';\n          }\n          if (!slots[childSlotName]) slots[childSlotName] = [];\n          slots[childSlotName].push(childVNode);\n        });\n        return slots;\n      }\n    });\n\n    // Root data and methods\n    Object.defineProperty(self, '$root', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        if (self.$isRootComponent) {\n          return self;\n        }\n        if (app.rootComponent) {\n          if (!self.$onRootUpdated) {\n            self.$onRootUpdated = function () {\n              return self.$update();\n            };\n            app.on('rootComponentUpdated', self.$onRootUpdated);\n          }\n          return app.rootComponent;\n        }\n        var root = utils[\"default\"].merge({}, app.data, app.methods);\n        if (ssr_window_esm[\"window\"] && ssr_window_esm[\"window\"].Proxy) {\n          root = new ssr_window_esm[\"window\"].Proxy(root, {\n            set: function set(target, name, val) {\n              app.data[name] = val;\n            },\n            deleteProperty: function deleteProperty(target, name) {\n              delete app.data[name];\n              delete app.methods[name];\n            },\n            has: function has(target, name) {\n              return name in app.data || name in app.methods;\n            }\n          });\n        }\n        return root;\n      },\n      set: function set() {}\n    });\n\n    // Bind render\n    if ($options.render) $options.render = $options.render.bind(self);\n\n    // Bind methods\n    var methods = {};\n    if (self.$mixins && self.$mixins.length) {\n      self.$mixins.forEach(function (mixin) {\n        if (mixin.methods) Object.assign(methods, mixin.methods);\n      });\n    }\n    if ($options.methods) {\n      Object.assign(methods, $options.methods);\n    }\n    Object.keys(methods).forEach(function (methodName) {\n      self[methodName] = methods[methodName].bind(self);\n    });\n\n    // Bind Events\n    if ($options.on) {\n      Object.keys($options.on).forEach(function (eventName) {\n        $options.on[eventName] = $options.on[eventName].bind(self);\n      });\n    }\n    if ($options.once) {\n      Object.keys($options.once).forEach(function (eventName) {\n        $options.once[eventName] = $options.once[eventName].bind(self);\n      });\n    }\n    self.$style = $options.isClassComponent ? self.constructor.style : $options.style;\n    self.$styleScoped = $options.isClassComponent ? self.constructor.styleScoped : $options.styleScoped;\n    self.__updateQueue = [];\n    return new Promise(function (resolve, reject) {\n      self.$hook('data', true).then(function (datas) {\n        var data = {};\n        datas.forEach(function (dt) {\n          Object.assign(data, dt || {});\n        });\n        utils[\"default\"].extend(self, data);\n        self.$hook('beforeCreate');\n        var html = self.$render();\n        if (self.$options.el) {\n          html = html.trim();\n          self.$vnode = vdom(html, self, true);\n          if (self.$style) {\n            self.$styleEl = ssr_window_esm[\"document\"].createElement('style');\n            self.$styleEl.innerHTML = self.$style;\n          }\n          self.el = self.$options.el;\n          component_patch(self.el, self.$vnode);\n          self.el = self.$vnode.elm;\n          self.$el = Object(dom7_module[\"default\"])(self.el);\n          self.$attachEvents();\n          self.el.f7Component = self;\n          self.$hook('created');\n          self.$mount();\n          resolve(self);\n          return;\n        }\n        // Make Dom\n        if (html && typeof html === 'string') {\n          html = html.trim();\n          self.$vnode = vdom(html, self, true);\n          self.el = ssr_window_esm[\"document\"].createElement(self.$vnode.sel || 'div');\n          component_patch(self.el, self.$vnode);\n          self.$el = Object(dom7_module[\"default\"])(self.el);\n        } else if (html) {\n          self.el = html;\n          self.$el = Object(dom7_module[\"default\"])(self.el);\n        }\n        if (self.$style) {\n          self.$styleEl = ssr_window_esm[\"document\"].createElement('style');\n          self.$styleEl.innerHTML = self.$style;\n        }\n        self.$attachEvents();\n        if (self.el) {\n          self.el.f7Component = self;\n        }\n        self.$hook('created');\n        resolve(self);\n      }).catch(function (err) {\n        reject(err);\n      });\n    });\n  }\n  return createClass_default()(Component, [{\n    key: \"$attachEvents\",\n    value: function $attachEvents() {\n      var self = this;\n      var $options = self.$options,\n        $el = self.$el;\n      if (self.$mixins && self.$mixins.length) {\n        self.$detachEventsHandlers = {};\n        self.$mixins.forEach(function (mixin) {\n          if (mixin.on) {\n            Object.keys(mixin.on).forEach(function (eventName) {\n              var handler = mixin.on[eventName].bind(self);\n              if (!self.$detachEventsHandlers[eventName]) self.$detachEventsHandlers[eventName] = [];\n              self.$detachEventsHandlers[eventName].push(handler);\n              $el.on(utils[\"default\"].eventNameToColonCase(eventName), handler);\n            });\n          }\n          if (mixin.once) {\n            Object.keys(mixin.once).forEach(function (eventName) {\n              var handler = mixin.once[eventName].bind(self);\n              if (!self.$detachEventsHandlers[eventName]) self.$detachEventsHandlers[eventName] = [];\n              self.$detachEventsHandlers[eventName].push(handler);\n              $el.once(utils[\"default\"].eventNameToColonCase(eventName), handler);\n            });\n          }\n        });\n      }\n      if ($options.on) {\n        Object.keys($options.on).forEach(function (eventName) {\n          $el.on(utils[\"default\"].eventNameToColonCase(eventName), $options.on[eventName]);\n        });\n      }\n      if ($options.once) {\n        Object.keys($options.once).forEach(function (eventName) {\n          $el.once(utils[\"default\"].eventNameToColonCase(eventName), $options.once[eventName]);\n        });\n      }\n    }\n  }, {\n    key: \"$detachEvents\",\n    value: function $detachEvents() {\n      var self = this;\n      var $options = self.$options,\n        $el = self.$el;\n      if ($options.on) {\n        Object.keys($options.on).forEach(function (eventName) {\n          $el.off(utils[\"default\"].eventNameToColonCase(eventName), $options.on[eventName]);\n        });\n      }\n      if ($options.once) {\n        Object.keys($options.once).forEach(function (eventName) {\n          $el.off(utils[\"default\"].eventNameToColonCase(eventName), $options.once[eventName]);\n        });\n      }\n      if (!self.$detachEventsHandlers) return;\n      Object.keys(self.$detachEventsHandlers).forEach(function (eventName) {\n        var handlers = self.$detachEventsHandlers[eventName];\n        handlers.forEach(function (handler) {\n          $el.off(utils[\"default\"].eventNameToColonCase(eventName), handler);\n        });\n        self.$detachEventsHandlers[eventName] = [];\n        delete self.$detachEventsHandlers[eventName];\n      });\n      self.$detachEventsHandlers = null;\n      delete self.$detachEventsHandlers;\n    }\n  }, {\n    key: \"$render\",\n    value: function $render() {\n      var self = this;\n      var $options = self.$options;\n      var html = '';\n      if ($options.render) {\n        html = $options.render();\n      } else if (self.render) {\n        html = self.render.call(self);\n      } else if ($options.template) {\n        if (typeof $options.template === 'string') {\n          html = template7_esm[\"default\"].compile($options.template)(self);\n        } else {\n          // Supposed to be function\n          html = $options.template(self);\n        }\n      }\n      return html;\n    }\n  }, {\n    key: \"$startUpdateQueue\",\n    value: function $startUpdateQueue() {\n      var self = this;\n      if (self.__requestAnimationFrameId) return;\n      function update() {\n        var html = self.$render();\n\n        // Make Dom\n        if (html && typeof html === 'string') {\n          html = html.trim();\n          var newVNode = vdom(html, self, false);\n          self.$vnode = component_patch(self.$vnode, newVNode);\n        }\n      }\n      self.__requestAnimationFrameId = ssr_window_esm[\"window\"].requestAnimationFrame(function () {\n        if (self.__updateIsPending) update();\n        var resolvers = toConsumableArray_default()(self.__updateQueue);\n        self.__updateQueue = [];\n        self.__updateIsPending = false;\n        ssr_window_esm[\"window\"].cancelAnimationFrame(self.__requestAnimationFrameId);\n        delete self.__requestAnimationFrameId;\n        delete self.__updateIsPending;\n        resolvers.forEach(function (resolver) {\n          return resolver();\n        });\n        resolvers = [];\n      });\n    }\n  }, {\n    key: \"$tick\",\n    value: function $tick(callback) {\n      var self = this;\n      return new Promise(function (resolve) {\n        function resolver() {\n          resolve();\n          if (callback) callback();\n        }\n        self.__updateQueue.push(resolver);\n        self.$startUpdateQueue();\n      });\n    }\n  }, {\n    key: \"$update\",\n    value: function $update(callback) {\n      var self = this;\n      return new Promise(function (resolve) {\n        function resolver() {\n          resolve();\n          if (callback) callback();\n          if (self.$isRootComponent) {\n            self.$f7.emit('rootComponentUpdated');\n          }\n        }\n        self.__updateIsPending = true;\n        self.__updateQueue.push(resolver);\n        self.$startUpdateQueue();\n      });\n    }\n  }, {\n    key: \"$setState\",\n    value: function $setState() {\n      var mergeState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var callback = arguments.length > 1 ? arguments[1] : undefined;\n      var self = this;\n      utils[\"default\"].merge(self, mergeState);\n      return self.$update(callback);\n    }\n  }, {\n    key: \"$f7ready\",\n    value: function $f7ready(callback) {\n      var _this = this;\n      if (this.$f7.initialized) {\n        callback(this.$f7);\n        return;\n      }\n      this.$f7.once('init', function () {\n        callback(_this.$f7);\n      });\n    }\n  }, {\n    key: \"$mount\",\n    value: function $mount(mountMethod) {\n      var self = this;\n      self.$hook('beforeMount');\n      if (self.$styleEl) Object(dom7_module[\"default\"])('head').append(self.$styleEl);\n      if (mountMethod) mountMethod(self.el);\n      self.$hook('mounted');\n    }\n  }, {\n    key: \"$destroy\",\n    value: function $destroy() {\n      var self = this;\n      self.$hook('beforeDestroy');\n      if (self.$styleEl) Object(dom7_module[\"default\"])(self.$styleEl).remove();\n      if (self.$onRootUpdated) {\n        self.$f7.off('rootComponentUpdated', self.$onRootUpdated);\n        delete self.$onRootUpdated;\n      }\n      self.$detachEvents();\n      self.$hook('destroyed');\n      // Delete component instance\n      if (self.el && self.el.f7Component) {\n        self.el.f7Component = null;\n        delete self.el.f7Component;\n      }\n      // Patch with empty node\n      if (self.$vnode) {\n        self.$vnode = component_patch(self.$vnode, {\n          sel: self.$vnode.sel,\n          data: {}\n        });\n      }\n      // Clear update queue\n      ssr_window_esm[\"window\"].cancelAnimationFrame(self.__requestAnimationFrameId);\n\n      // Delete all props\n      utils[\"default\"].deleteProps(self);\n    }\n  }, {\n    key: \"$hook\",\n    value: function $hook(name, async) {\n      var self = this;\n      if (async) {\n        var promises = [];\n        if (self.$mixins && self.$mixins.length) {\n          self.$mixins.forEach(function (mixin) {\n            if (mixin[name]) promises.push(mixin[name].call(self));\n          });\n        }\n        if (self[name] && typeof self[name] === 'function') {\n          promises.push(self[name].call(self));\n        }\n        if (self.$options[name]) {\n          promises.push(self.$options[name].call(self));\n        }\n        return Promise.all(promises);\n      }\n      if (self.$mixins && self.$mixins.length) {\n        self.$mixins.forEach(function (mixin) {\n          if (mixin[name] && typeof mixin[name] === 'function') {\n            mixin[name].call(self);\n          }\n        });\n      }\n      if (self.$options[name]) return self.$options[name].call(self);\n      if (self[name]) return self[name].call(self);\n      return undefined;\n    }\n  }]);\n}();\n/* harmony default export */ var component_class = (component_class_Component);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/parse-component.js\n\n\n\n\nfunction parseComponent(componentString) {\n  var id = utils[\"default\"].id();\n  var callbackCreateName = \"f7_component_create_callback_\".concat(id);\n  var callbackRenderName = \"f7_component_render_callback_\".concat(id);\n\n  // Template\n  var template;\n  var hasTemplate = componentString.match(/<template([ ]?)([a-z0-9-]*)>/);\n  var templateType = hasTemplate[2] || 't7';\n  if (hasTemplate) {\n    template = componentString.split(/<template[ ]?[a-z0-9-]*>/).filter(function (item, index) {\n      return index > 0;\n    }).join('<template>').split('</template>').filter(function (item, index, arr) {\n      return index < arr.length - 1;\n    }).join('</template>').replace(/{{#raw}}([ \\n]*)<template/g, '{{#raw}}<template').replace(/\\/template>([ \\n]*){{\\/raw}}/g, '/template>{{/raw}}').replace(/([ \\n])<template/g, '$1{{#raw}}<template').replace(/\\/template>([ \\n])/g, '/template>{{/raw}}$1');\n  }\n\n  // Parse Styles\n  var style = null;\n  var styleScoped = false;\n  if (componentString.indexOf('<style>') >= 0) {\n    style = componentString.split('<style>')[1].split('</style>')[0];\n  } else if (componentString.indexOf('<style scoped>') >= 0) {\n    styleScoped = true;\n    style = componentString.split('<style scoped>')[1].split('</style>')[0];\n    style = style.replace(/{{this}}/g, \"[data-f7-\".concat(id, \"]\")).replace(/[\\n]?([^{^}]*){/gi, function (string, rules) {\n      if (rules.indexOf('\"') >= 0 || rules.indexOf(\"'\") >= 0) return string;\n      // eslint-disable-next-line\n      rules = rules.split(',').map(function (rule) {\n        if (rule.indexOf('@') >= 0) return rule;\n        if (rule.indexOf(\"[data-f7-\".concat(id, \"]\")) >= 0) return rule;\n        return \"[data-f7-\".concat(id, \"] \").concat(rule.trim());\n      }).join(', ');\n      return \"\\n\".concat(rules, \" {\");\n    });\n  }\n\n  // Parse Script\n  var scriptContent;\n  var scriptEl;\n  if (componentString.indexOf('<script>') >= 0) {\n    var scripts = componentString.split('<script>');\n    scriptContent = scripts[scripts.length - 1].split('</script>')[0].trim();\n  } else {\n    scriptContent = 'return {}';\n  }\n  if (!scriptContent || !scriptContent.trim()) scriptContent = 'return {}';\n  scriptContent = \"window.\".concat(callbackCreateName, \" = function () {\").concat(scriptContent, \"}\");\n\n  // Insert Script El\n  scriptEl = ssr_window_esm[\"document\"].createElement('script');\n  scriptEl.innerHTML = scriptContent;\n  Object(dom7_module[\"default\"])('head').append(scriptEl);\n  var component = ssr_window_esm[\"window\"][callbackCreateName]();\n  var isClassComponent = typeof component === 'function';\n\n  // Remove Script El\n  Object(dom7_module[\"default\"])(scriptEl).remove();\n  ssr_window_esm[\"window\"][callbackCreateName] = null;\n  delete ssr_window_esm[\"window\"][callbackCreateName];\n\n  // Assign Template\n  if (!component.template && !component.render) {\n    component.template = template;\n    component.templateType = templateType;\n  }\n  if (component.template) {\n    if (component.templateType === 't7') {\n      if (isClassComponent) {\n        var templateFunction = template7_esm[\"default\"].compile(component.template);\n        component.prototype.render = function render() {\n          return templateFunction(this);\n        };\n      } else {\n        component.template = template7_esm[\"default\"].compile(component.template);\n      }\n    }\n    if (component.templateType === 'es') {\n      var renderContent = \"window.\".concat(callbackRenderName, \" = function () {\\n        return function render() {\\n          return `\").concat(component.template, \"`;\\n        }\\n      }\");\n      scriptEl = ssr_window_esm[\"document\"].createElement('script');\n      scriptEl.innerHTML = renderContent;\n      Object(dom7_module[\"default\"])('head').append(scriptEl);\n      if (isClassComponent) {\n        component.prototype.render = component.template;\n      } else {\n        component.render = ssr_window_esm[\"window\"][callbackRenderName]();\n      }\n\n      // Remove Script El\n      Object(dom7_module[\"default\"])(scriptEl).remove();\n      ssr_window_esm[\"window\"][callbackRenderName] = null;\n      delete ssr_window_esm[\"window\"][callbackRenderName];\n    }\n  }\n  if (isClassComponent) {\n    delete component.template;\n    delete component.templateType;\n  }\n\n  // Assign Style\n  if (style) {\n    component.style = style;\n    component.styleScoped = styleScoped;\n  }\n\n  // Component ID\n  component.id = id;\n  return component;\n}\n/* harmony default export */ var parse_component = (parseComponent);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/component/component.js\n\n\n\n\nfunction registerComponentMixin(name, mixin) {\n  component_mixins[name] = mixin;\n}\nfunction registerComponent(tagName, component) {\n  custom_components[tagName] = component;\n}\n\n/* harmony default export */ var component_component = ({\n  name: 'component',\n  static: {\n    Component: component_class,\n    registerComponentMixin: registerComponentMixin,\n    registerComponent: registerComponent\n  },\n  create: function create() {\n    var app = this;\n    app.component = {\n      registerComponentMixin: registerComponentMixin,\n      registerComponent: registerComponent,\n      parse: function parse(componentString) {\n        return parse_component(componentString);\n      },\n      create: function create(options, context, children) {\n        if (typeof options === 'function') {\n          var root = options.root,\n            el = options.el;\n          // eslint-disable-next-line\n          return new options(app, {\n            isClassComponent: true,\n            root: root,\n            el: el\n          }, context, children);\n        }\n        return new component_class(app, options, context, children);\n      }\n    };\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/history/history.js\n\n/* harmony default export */ var history_history = ({\n  name: 'history',\n  static: {\n    history: utils_history\n  },\n  on: {\n    init: function init() {\n      utils_history.init(this);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/modules/service-worker/service-worker.js\n\n\nvar SW = {\n  registrations: [],\n  register: function register(path, scope) {\n    var app = this;\n    if (!('serviceWorker' in ssr_window_esm[\"window\"].navigator) || !app.serviceWorker.container) {\n      return new Promise(function (resolve, reject) {\n        reject(new Error('Service worker is not supported'));\n      });\n    }\n    return new Promise(function (resolve, reject) {\n      app.serviceWorker.container.register(path, scope ? {\n        scope: scope\n      } : {}).then(function (reg) {\n        SW.registrations.push(reg);\n        app.emit('serviceWorkerRegisterSuccess', reg);\n        resolve(reg);\n      }).catch(function (error) {\n        app.emit('serviceWorkerRegisterError', error);\n        reject(error);\n      });\n    });\n  },\n  unregister: function unregister(registration) {\n    var app = this;\n    if (!('serviceWorker' in ssr_window_esm[\"window\"].navigator) || !app.serviceWorker.container) {\n      return new Promise(function (resolve, reject) {\n        reject(new Error('Service worker is not supported'));\n      });\n    }\n    var registrations;\n    if (!registration) registrations = SW.registrations;else if (Array.isArray(registration)) registrations = registration;else registrations = [registration];\n    return Promise.all(registrations.map(function (reg) {\n      return new Promise(function (resolve, reject) {\n        reg.unregister().then(function () {\n          if (SW.registrations.indexOf(reg) >= 0) {\n            SW.registrations.splice(SW.registrations.indexOf(reg), 1);\n          }\n          app.emit('serviceWorkerUnregisterSuccess', reg);\n          resolve();\n        }).catch(function (error) {\n          app.emit('serviceWorkerUnregisterError', reg, error);\n          reject(error);\n        });\n      });\n    }));\n  }\n};\n/* harmony default export */ var service_worker = ({\n  name: 'sw',\n  params: {\n    serviceWorker: {\n      path: undefined,\n      scope: undefined\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      serviceWorker: {\n        container: 'serviceWorker' in ssr_window_esm[\"window\"].navigator ? ssr_window_esm[\"window\"].navigator.serviceWorker : undefined,\n        registrations: SW.registrations,\n        register: SW.register.bind(app),\n        unregister: SW.unregister.bind(app)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      if (!('serviceWorker' in ssr_window_esm[\"window\"].navigator)) return;\n      var app = this;\n      if (!app.serviceWorker.container) return;\n      var paths = app.params.serviceWorker.path;\n      var scope = app.params.serviceWorker.scope;\n      if (!paths || Array.isArray(paths) && !paths.length) return;\n      var toRegister = Array.isArray(paths) ? paths : [paths];\n      toRegister.forEach(function (path) {\n        app.serviceWorker.register(path, scope);\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/statusbar/statusbar.js\n\n\n\n\nvar Statusbar = {\n  hide: function hide() {\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      ssr_window_esm[\"window\"].StatusBar.hide();\n    }\n  },\n  show: function show() {\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      ssr_window_esm[\"window\"].StatusBar.show();\n    }\n  },\n  onClick: function onClick() {\n    var app = this;\n    var pageContent;\n    if (Object(dom7_module[\"default\"])('.popup.modal-in').length > 0) {\n      // Check for opened popup\n      pageContent = Object(dom7_module[\"default\"])('.popup.modal-in').find('.page:not(.page-previous):not(.page-next):not(.cached)').find('.page-content');\n    } else if (Object(dom7_module[\"default\"])('.panel.panel-in').length > 0) {\n      // Check for opened panel\n      pageContent = Object(dom7_module[\"default\"])('.panel.panel-in').find('.page:not(.page-previous):not(.page-next):not(.cached)').find('.page-content');\n    } else if (Object(dom7_module[\"default\"])('.views > .view.tab-active').length > 0) {\n      // View in tab bar app layout\n      pageContent = Object(dom7_module[\"default\"])('.views > .view.tab-active').find('.page:not(.page-previous):not(.page-next):not(.cached)').find('.page-content');\n    } else if (Object(dom7_module[\"default\"])('.views').length > 0) {\n      pageContent = Object(dom7_module[\"default\"])('.views').find('.page:not(.page-previous):not(.page-next):not(.cached)').find('.page-content');\n    } else {\n      pageContent = app.root.children('.view').find('.page:not(.page-previous):not(.page-next):not(.cached)').find('.page-content');\n    }\n    if (pageContent && pageContent.length > 0) {\n      // Check for tab\n      if (pageContent.hasClass('tab')) {\n        pageContent = pageContent.parent('.tabs').children('.page-content.tab-active');\n      }\n      if (pageContent.length > 0) pageContent.scrollTop(0, 300);\n    }\n  },\n  setTextColor: function setTextColor(color) {\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      if (color === 'white') {\n        ssr_window_esm[\"window\"].StatusBar.styleLightContent();\n      } else {\n        ssr_window_esm[\"window\"].StatusBar.styleDefault();\n      }\n    }\n  },\n  setBackgroundColor: function setBackgroundColor(color) {\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      ssr_window_esm[\"window\"].StatusBar.backgroundColorByHexString(color);\n    }\n  },\n  isVisible: function isVisible() {\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      return ssr_window_esm[\"window\"].StatusBar.isVisible;\n    }\n    return false;\n  },\n  overlaysWebView: function overlaysWebView() {\n    var overlays = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      ssr_window_esm[\"window\"].StatusBar.overlaysWebView(overlays);\n    }\n  },\n  init: function init() {\n    var app = this;\n    var params = app.params.statusbar;\n    if (!params.enabled) return;\n    if (device[\"default\"].cordova && ssr_window_esm[\"window\"].StatusBar) {\n      if (params.scrollTopOnClick) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).on('statusTap', Statusbar.onClick.bind(app));\n      }\n      if (device[\"default\"].ios) {\n        if (params.iosOverlaysWebView) {\n          ssr_window_esm[\"window\"].StatusBar.overlaysWebView(true);\n        } else {\n          ssr_window_esm[\"window\"].StatusBar.overlaysWebView(false);\n        }\n        if (params.iosTextColor === 'white') {\n          ssr_window_esm[\"window\"].StatusBar.styleLightContent();\n        } else {\n          ssr_window_esm[\"window\"].StatusBar.styleDefault();\n        }\n      }\n      if (device[\"default\"].android) {\n        if (params.androidOverlaysWebView) {\n          ssr_window_esm[\"window\"].StatusBar.overlaysWebView(true);\n        } else {\n          ssr_window_esm[\"window\"].StatusBar.overlaysWebView(false);\n        }\n        if (params.androidTextColor === 'white') {\n          ssr_window_esm[\"window\"].StatusBar.styleLightContent();\n        } else {\n          ssr_window_esm[\"window\"].StatusBar.styleDefault();\n        }\n      }\n    }\n    if (params.iosBackgroundColor && device[\"default\"].ios) {\n      Statusbar.setBackgroundColor(params.iosBackgroundColor);\n    }\n    if (params.androidBackgroundColor && device[\"default\"].android) {\n      Statusbar.setBackgroundColor(params.androidBackgroundColor);\n    }\n  }\n};\n/* harmony default export */ var statusbar = ({\n  name: 'statusbar',\n  params: {\n    statusbar: {\n      enabled: true,\n      scrollTopOnClick: true,\n      iosOverlaysWebView: true,\n      iosTextColor: 'black',\n      iosBackgroundColor: null,\n      androidOverlaysWebView: false,\n      androidTextColor: 'black',\n      androidBackgroundColor: null\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      statusbar: {\n        hide: Statusbar.hide,\n        show: Statusbar.show,\n        overlaysWebView: Statusbar.overlaysWebView,\n        setTextColor: Statusbar.setTextColor,\n        setBackgroundColor: Statusbar.setBackgroundColor,\n        isVisible: Statusbar.isVisible,\n        init: Statusbar.init.bind(app)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      Statusbar.init.call(app);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/view/view.js\n\n\n\nfunction getCurrentView(app) {\n  var $popoverView = Object(dom7_module[\"default\"])('.popover.modal-in .view');\n  var $popupView = Object(dom7_module[\"default\"])('.popup.modal-in .view');\n  var $panelView = Object(dom7_module[\"default\"])('.panel.panel-in .view');\n  var $viewsEl = Object(dom7_module[\"default\"])('.views');\n  if ($viewsEl.length === 0) $viewsEl = app.root;\n  // Find active view as tab\n  var $viewEl = $viewsEl.children('.view');\n  if ($viewEl.length === 0) {\n    $viewEl = $viewsEl.children('.tabs').children('.view');\n  }\n  // Propably in tabs or split view\n  if ($viewEl.length > 1) {\n    if ($viewEl.hasClass('tab')) {\n      // Tabs\n      $viewEl = $viewsEl.children('.view.tab-active');\n      if ($viewEl.length === 0) {\n        $viewEl = $viewsEl.children('.tabs').children('.view.tab-active');\n      }\n    } else {\n      // Split View, leave appView intact\n    }\n  }\n  if ($popoverView.length > 0 && $popoverView[0].f7View) return $popoverView[0].f7View;\n  if ($popupView.length > 0 && $popupView[0].f7View) return $popupView[0].f7View;\n  if ($panelView.length > 0 && $panelView[0].f7View) return $panelView[0].f7View;\n  if ($viewEl.length > 0) {\n    if ($viewEl.length === 1 && $viewEl[0].f7View) return $viewEl[0].f7View;\n    if ($viewEl.length > 1) {\n      return app.views.main;\n    }\n  }\n  return undefined;\n}\n/* harmony default export */ var view_view = ({\n  name: 'view',\n  params: {\n    view: {\n      name: undefined,\n      main: false,\n      router: true,\n      linksView: null,\n      stackPages: false,\n      xhrCache: true,\n      xhrCacheIgnore: [],\n      xhrCacheIgnoreGetParameters: false,\n      xhrCacheDuration: 1000 * 60 * 10,\n      // Ten minutes\n      componentCache: true,\n      preloadPreviousPage: true,\n      allowDuplicateUrls: false,\n      reloadPages: false,\n      reloadDetail: false,\n      masterDetailBreakpoint: 0,\n      masterDetailResizable: false,\n      removeElements: true,\n      removeElementsWithTimeout: false,\n      removeElementsTimeout: 0,\n      restoreScrollTopOnBack: true,\n      unloadTabContent: true,\n      passRouteQueryToRequest: true,\n      passRouteParamsToRequest: false,\n      loadInitialPage: true,\n      // Swipe Back\n      iosSwipeBack: true,\n      iosSwipeBackAnimateShadow: true,\n      iosSwipeBackAnimateOpacity: true,\n      iosSwipeBackActiveArea: 30,\n      iosSwipeBackThreshold: 0,\n      mdSwipeBack: false,\n      mdSwipeBackAnimateShadow: true,\n      mdSwipeBackAnimateOpacity: false,\n      mdSwipeBackActiveArea: 30,\n      mdSwipeBackThreshold: 0,\n      auroraSwipeBack: false,\n      auroraSwipeBackAnimateShadow: false,\n      auroraSwipeBackAnimateOpacity: true,\n      auroraSwipeBackActiveArea: 30,\n      auroraSwipeBackThreshold: 0,\n      // Push State\n      pushState: false,\n      pushStateRoot: undefined,\n      pushStateAnimate: true,\n      pushStateAnimateOnLoad: false,\n      pushStateSeparator: '#!',\n      pushStateOnLoad: true,\n      // Animate Pages\n      animate: true,\n      // iOS Dynamic Navbar\n      iosDynamicNavbar: true,\n      // Animate iOS Navbar Back Icon\n      iosAnimateNavbarBackIcon: true,\n      // Delays\n      iosPageLoadDelay: 0,\n      mdPageLoadDelay: 0,\n      auroraPageLoadDelay: 0,\n      // Routes hooks\n      routesBeforeEnter: null,\n      routesBeforeLeave: null\n    }\n  },\n  static: {\n    View: view_class\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      views: utils[\"default\"].extend([], {\n        create: function create(el, params) {\n          return new view_class(app, el, params);\n        },\n        get: function get(viewEl) {\n          var $viewEl = Object(dom7_module[\"default\"])(viewEl);\n          if ($viewEl.length && $viewEl[0].f7View) return $viewEl[0].f7View;\n          return undefined;\n        }\n      })\n    });\n    Object.defineProperty(app.views, 'current', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        return getCurrentView(app);\n      }\n    });\n    // Alias\n    app.view = app.views;\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      Object(dom7_module[\"default\"])('.view-init').each(function (index, viewEl) {\n        if (viewEl.f7View) return;\n        var viewParams = Object(dom7_module[\"default\"])(viewEl).dataset();\n        app.views.create(viewEl, viewParams);\n      });\n    },\n    'modalOpen panelOpen': function onOpen(instance) {\n      var app = this;\n      instance.$el.find('.view-init').each(function (index, viewEl) {\n        if (viewEl.f7View) return;\n        var viewParams = Object(dom7_module[\"default\"])(viewEl).dataset();\n        app.views.create(viewEl, viewParams);\n      });\n    },\n    'modalBeforeDestroy panelBeforeDestroy': function onClose(instance) {\n      if (!instance || !instance.$el) return;\n      instance.$el.find('.view-init').each(function (index, viewEl) {\n        var view = viewEl.f7View;\n        if (!view) return;\n        view.destroy();\n      });\n    }\n  },\n  vnode: {\n    'view-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var viewEl = vnode.elm;\n        if (viewEl.f7View) return;\n        var viewParams = Object(dom7_module[\"default\"])(viewEl).dataset();\n        app.views.create(viewEl, viewParams);\n      },\n      destroy: function destroy(vnode) {\n        var viewEl = vnode.elm;\n        var view = viewEl.f7View;\n        if (!view) return;\n        view.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/navbar/navbar.js\n\n\n\nvar Navbar = {\n  size: function size(el) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.hasClass('navbars')) {\n      $el = $el.children('.navbar').each(function (index, navbarEl) {\n        app.navbar.size(navbarEl);\n      });\n      return;\n    }\n    var $innerEl = $el.children('.navbar-inner');\n    if (!$innerEl.length) return;\n    var needCenterTitle = $innerEl.hasClass('navbar-inner-centered-title') || app.params.navbar[\"\".concat(app.theme, \"CenterTitle\")];\n    var needLeftTitle = app.theme === 'ios' && !app.params.navbar[\"\".concat(app.theme, \"CenterTitle\")];\n    if (!needCenterTitle && !needLeftTitle) return;\n    if ($el.hasClass('stacked') || $el.parents('.stacked').length > 0 || $el.parents('.tab:not(.tab-active)').length > 0 || $el.parents('.popup:not(.modal-in)').length > 0) {\n      return;\n    }\n    if (app.theme !== 'ios' && app.params.navbar[\"\".concat(app.theme, \"CenterTitle\")]) {\n      $innerEl.addClass('navbar-inner-centered-title');\n    }\n    if (app.theme === 'ios' && !app.params.navbar.iosCenterTitle) {\n      $innerEl.addClass('navbar-inner-left-title');\n    }\n    var $viewEl = $el.parents('.view').eq(0);\n    var left = app.rtl ? $innerEl.children('.right') : $innerEl.children('.left');\n    var right = app.rtl ? $innerEl.children('.left') : $innerEl.children('.right');\n    var title = $innerEl.children('.title');\n    var subnavbar = $innerEl.children('.subnavbar');\n    var noLeft = left.length === 0;\n    var noRight = right.length === 0;\n    var leftWidth = noLeft ? 0 : left.outerWidth(true);\n    var rightWidth = noRight ? 0 : right.outerWidth(true);\n    var titleWidth = title.outerWidth(true);\n    var navbarStyles = $innerEl.styles();\n    var navbarWidth = $innerEl[0].offsetWidth;\n    var navbarInnerWidth = navbarWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10);\n    var isPrevious = $el.hasClass('navbar-previous');\n    var sliding = $innerEl.hasClass('sliding');\n    var router;\n    var dynamicNavbar;\n    if ($viewEl.length > 0 && $viewEl[0].f7View) {\n      router = $viewEl[0].f7View.router;\n      dynamicNavbar = router && router.dynamicNavbar;\n    }\n    var currLeft;\n    var diff;\n    if (noRight) {\n      currLeft = navbarInnerWidth - titleWidth;\n    }\n    if (noLeft) {\n      currLeft = 0;\n    }\n    if (!noLeft && !noRight) {\n      currLeft = (navbarInnerWidth - rightWidth - titleWidth + leftWidth) / 2;\n    }\n    var requiredLeft = (navbarInnerWidth - titleWidth) / 2;\n    if (navbarInnerWidth - leftWidth - rightWidth > titleWidth) {\n      if (requiredLeft < leftWidth) {\n        requiredLeft = leftWidth;\n      }\n      if (requiredLeft + titleWidth > navbarInnerWidth - rightWidth) {\n        requiredLeft = navbarInnerWidth - rightWidth - titleWidth;\n      }\n      diff = requiredLeft - currLeft;\n    } else {\n      diff = 0;\n    }\n\n    // RTL inverter\n    var inverter = app.rtl ? -1 : 1;\n    if (dynamicNavbar && app.theme === 'ios') {\n      if (title.hasClass('sliding') || title.length > 0 && sliding) {\n        var titleLeftOffset = -(currLeft + diff) * inverter;\n        var titleRightOffset = (navbarInnerWidth - currLeft - diff - titleWidth) * inverter;\n        if (isPrevious) {\n          if (router && router.params.iosAnimateNavbarBackIcon) {\n            var activeNavbarBackLink = $el.parent().find('.navbar-current').children('.left.sliding').find('.back .icon ~ span');\n            if (activeNavbarBackLink.length > 0) {\n              titleLeftOffset += activeNavbarBackLink[0].offsetLeft;\n            }\n          }\n        }\n        title[0].f7NavbarLeftOffset = titleLeftOffset;\n        title[0].f7NavbarRightOffset = titleRightOffset;\n      }\n      if (!noLeft && (left.hasClass('sliding') || sliding)) {\n        if (app.rtl) {\n          left[0].f7NavbarLeftOffset = -(navbarInnerWidth - left[0].offsetWidth) / 2 * inverter;\n          left[0].f7NavbarRightOffset = leftWidth * inverter;\n        } else {\n          left[0].f7NavbarLeftOffset = -leftWidth;\n          left[0].f7NavbarRightOffset = (navbarInnerWidth - left[0].offsetWidth) / 2;\n          if (router && router.params.iosAnimateNavbarBackIcon && left.find('.back .icon').length > 0) {\n            if (left.find('.back .icon ~ span').length) {\n              var leftOffset = left[0].f7NavbarLeftOffset;\n              var rightOffset = left[0].f7NavbarRightOffset;\n              left[0].f7NavbarLeftOffset = 0;\n              left[0].f7NavbarRightOffset = 0;\n              left.find('.back .icon ~ span')[0].f7NavbarLeftOffset = leftOffset;\n              left.find('.back .icon ~ span')[0].f7NavbarRightOffset = rightOffset - left.find('.back .icon')[0].offsetWidth;\n            }\n          }\n        }\n      }\n      if (!noRight && (right.hasClass('sliding') || sliding)) {\n        if (app.rtl) {\n          right[0].f7NavbarLeftOffset = -rightWidth * inverter;\n          right[0].f7NavbarRightOffset = (navbarInnerWidth - right[0].offsetWidth) / 2 * inverter;\n        } else {\n          right[0].f7NavbarLeftOffset = -(navbarInnerWidth - right[0].offsetWidth) / 2;\n          right[0].f7NavbarRightOffset = rightWidth;\n        }\n      }\n      if (subnavbar.length && (subnavbar.hasClass('sliding') || sliding)) {\n        subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth;\n        subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset;\n      }\n    }\n\n    // Center title\n    if (needCenterTitle) {\n      var titleLeft = diff;\n      if (app.rtl && noLeft && noRight && title.length > 0) titleLeft = -titleLeft;\n      title.css({\n        left: \"\".concat(titleLeft, \"px\")\n      });\n    }\n  },\n  hide: function hide(el) {\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var hideStatusbar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length;\n    if (isDynamic) $el = $el.parents('.navbars');\n    if (!$el.length) return;\n    if ($el.hasClass('navbar-hidden')) return;\n    var className = \"navbar-hidden\".concat(animate ? ' navbar-transitioning' : '');\n    var currentIsLarge = isDynamic ? $el.find('.navbar-current .title-large').length : $el.find('.title-large').length;\n    if (currentIsLarge) {\n      className += ' navbar-large-hidden';\n    }\n    if (hideStatusbar) {\n      className += ' navbar-hidden-statusbar';\n    }\n    $el.transitionEnd(function () {\n      $el.removeClass('navbar-transitioning');\n    });\n    $el.addClass(className);\n    if (isDynamic) {\n      $el.children('.navbar').each(function (index, subEl) {\n        Object(dom7_module[\"default\"])(subEl).trigger('navbar:hide');\n        app.emit('navbarHide', subEl);\n      });\n    } else {\n      $el.trigger('navbar:hide');\n      app.emit('navbarHide', $el[0]);\n    }\n  },\n  show: function show() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.navbar-hidden';\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length;\n    if (isDynamic) $el = $el.parents('.navbars');\n    if (!$el.length) return;\n    if (!$el.hasClass('navbar-hidden')) return;\n    if (animate) {\n      $el.addClass('navbar-transitioning');\n      $el.transitionEnd(function () {\n        $el.removeClass('navbar-transitioning');\n      });\n    }\n    $el.removeClass('navbar-hidden navbar-large-hidden navbar-hidden-statusbar');\n    if (isDynamic) {\n      $el.children('.navbar').each(function (index, subEl) {\n        Object(dom7_module[\"default\"])(subEl).trigger('navbar:show');\n        app.emit('navbarShow', subEl);\n      });\n    } else {\n      $el.trigger('navbar:show');\n      app.emit('navbarShow', $el[0]);\n    }\n  },\n  getElByPage: function getElByPage(page) {\n    var $pageEl;\n    var $navbarEl;\n    var pageData;\n    if (page.$navbarEl || page.$el) {\n      pageData = page;\n      $pageEl = page.$el;\n    } else {\n      $pageEl = Object(dom7_module[\"default\"])(page);\n      if ($pageEl.length > 0) pageData = $pageEl[0].f7Page;\n    }\n    if (pageData && pageData.$navbarEl && pageData.$navbarEl.length > 0) {\n      $navbarEl = pageData.$navbarEl;\n    } else if ($pageEl) {\n      $navbarEl = $pageEl.children('.navbar');\n    }\n    if (!$navbarEl || $navbarEl && $navbarEl.length === 0) return undefined;\n    return $navbarEl[0];\n  },\n  getPageByEl: function getPageByEl(navbarEl) {\n    var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n    if ($navbarEl.parents('.page').length) {\n      return $navbarEl.parents('.page')[0];\n    }\n    var pageEl;\n    $navbarEl.parents('.view').find('.page').each(function (index, el) {\n      if (el && el.f7Page && el.f7Page.navbarEl && $navbarEl[0] === el.f7Page.navbarEl) {\n        pageEl = el;\n      }\n    });\n    return pageEl;\n  },\n  collapseLargeTitle: function collapseLargeTitle(navbarEl) {\n    var app = this;\n    var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n    if ($navbarEl.hasClass('navbars')) {\n      $navbarEl = $navbarEl.find('.navbar');\n      if ($navbarEl.length > 1) {\n        $navbarEl = Object(dom7_module[\"default\"])(navbarEl).find('.navbar-large.navbar-current');\n      }\n      if ($navbarEl.length > 1 || !$navbarEl.length) {\n        return;\n      }\n    }\n    var $pageEl = Object(dom7_module[\"default\"])(app.navbar.getPageByEl($navbarEl));\n    $navbarEl.addClass('navbar-large-collapsed');\n    $pageEl.eq(0).addClass('page-with-navbar-large-collapsed').trigger('page:navbarlargecollapsed');\n    app.emit('pageNavbarLargeCollapsed', $pageEl[0]);\n    $navbarEl.trigger('navbar:collapse');\n    app.emit('navbarCollapse', $navbarEl[0]);\n  },\n  expandLargeTitle: function expandLargeTitle(navbarEl) {\n    var app = this;\n    var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n    if ($navbarEl.hasClass('navbars')) {\n      $navbarEl = $navbarEl.find('.navbar-large');\n      if ($navbarEl.length > 1) {\n        $navbarEl = Object(dom7_module[\"default\"])(navbarEl).find('.navbar-large.navbar-current');\n      }\n      if ($navbarEl.length > 1 || !$navbarEl.length) {\n        return;\n      }\n    }\n    var $pageEl = Object(dom7_module[\"default\"])(app.navbar.getPageByEl($navbarEl));\n    $navbarEl.removeClass('navbar-large-collapsed');\n    $pageEl.eq(0).removeClass('page-with-navbar-large-collapsed').trigger('page:navbarlargeexpanded');\n    app.emit('pageNavbarLargeExpanded', $pageEl[0]);\n    $navbarEl.trigger('navbar:expand');\n    app.emit('navbarExpand', $navbarEl[0]);\n  },\n  toggleLargeTitle: function toggleLargeTitle(navbarEl) {\n    var app = this;\n    var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n    if ($navbarEl.hasClass('navbars')) {\n      $navbarEl = $navbarEl.find('.navbar-large');\n      if ($navbarEl.length > 1) {\n        $navbarEl = Object(dom7_module[\"default\"])(navbarEl).find('.navbar-large.navbar-current');\n      }\n      if ($navbarEl.length > 1 || !$navbarEl.length) {\n        return;\n      }\n    }\n    if ($navbarEl.hasClass('navbar-large-collapsed')) {\n      app.navbar.expandLargeTitle($navbarEl);\n    } else {\n      app.navbar.collapseLargeTitle($navbarEl);\n    }\n  },\n  initNavbarOnScroll: function initNavbarOnScroll(pageEl, navbarEl, needHide, needCollapse, needTransparent) {\n    var app = this;\n    var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n    var $navbarEl = Object(dom7_module[\"default\"])(navbarEl);\n    var $titleLargeEl = $navbarEl.find('.title-large');\n    var isLarge = $titleLargeEl.length || $navbarEl.hasClass('.navbar-large');\n    var navbarHideHeight = 44;\n    var snapPageScrollToLargeTitle = app.params.navbar.snapPageScrollToLargeTitle;\n    var snapPageScrollToTransparentNavbar = app.params.navbar.snapPageScrollToTransparentNavbar;\n    var previousScrollTop;\n    var currentScrollTop;\n    var scrollHeight;\n    var offsetHeight;\n    var reachEnd;\n    var action;\n    var navbarHidden;\n    var navbarCollapsed;\n    var navbarTitleLargeHeight;\n    var navbarOffsetHeight;\n    if (needCollapse || needHide && isLarge) {\n      navbarTitleLargeHeight = $navbarEl.css('--f7-navbar-large-title-height');\n      if (navbarTitleLargeHeight && navbarTitleLargeHeight.indexOf('px') >= 0) {\n        navbarTitleLargeHeight = parseInt(navbarTitleLargeHeight, 10);\n        if (Number.isNaN(navbarTitleLargeHeight) && $titleLargeEl.length) {\n          navbarTitleLargeHeight = $titleLargeEl[0].offsetHeight;\n        } else if (Number.isNaN(navbarTitleLargeHeight)) {\n          if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight = 48;else if (app.theme === 'aurora') navbarTitleLargeHeight = 38;\n        }\n      } else if ($titleLargeEl.length) {\n        navbarTitleLargeHeight = $titleLargeEl[0].offsetHeight;\n      } else {\n        // eslint-disable-next-line\n        if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight = 48;else if (app.theme === 'aurora') navbarTitleLargeHeight = 38;\n      }\n    }\n    if (needHide && isLarge) {\n      navbarHideHeight += navbarTitleLargeHeight;\n    }\n    var scrollChanged;\n    var scrollContent;\n    var scrollTimeoutId;\n    var touchEndTimeoutId;\n    var touchSnapTimeout = 70;\n    var desktopSnapTimeout = 300;\n    function snapLargeNavbar() {\n      var inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');\n      if (inSearchbarExpanded) return;\n      if (!scrollContent || currentScrollTop < 0) return;\n      if (currentScrollTop >= navbarTitleLargeHeight / 2 && currentScrollTop < navbarTitleLargeHeight) {\n        Object(dom7_module[\"default\"])(scrollContent).scrollTop(navbarTitleLargeHeight, 100);\n      } else if (currentScrollTop < navbarTitleLargeHeight) {\n        Object(dom7_module[\"default\"])(scrollContent).scrollTop(0, 200);\n      }\n    }\n    function snapTransparentNavbar() {\n      var inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');\n      if (inSearchbarExpanded) return;\n      if (!scrollContent || currentScrollTop < 0) return;\n      if (currentScrollTop >= navbarOffsetHeight / 2 && currentScrollTop < navbarOffsetHeight) {\n        Object(dom7_module[\"default\"])(scrollContent).scrollTop(navbarOffsetHeight, 100);\n      } else if (currentScrollTop < navbarOffsetHeight) {\n        Object(dom7_module[\"default\"])(scrollContent).scrollTop(0, 200);\n      }\n    }\n    function handleNavbarTransparent() {\n      var isHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');\n      var inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');\n      if (inSearchbarExpanded || isHidden) return;\n      if (!navbarOffsetHeight) {\n        navbarOffsetHeight = navbarEl.offsetHeight;\n      }\n      var opacity = currentScrollTop / navbarOffsetHeight;\n      var notTransparent = $navbarEl.hasClass('navbar-transparent-visible');\n      opacity = Math.max(Math.min(opacity, 1), 0);\n      if (notTransparent && opacity === 1 || !notTransparent && opacity === 0) {\n        $navbarEl.find('.navbar-bg, .title').css('opacity', '');\n        return;\n      }\n      if (notTransparent && opacity === 0) {\n        $navbarEl.trigger('navbar:transparenthide');\n        app.emit('navbarTransparentHide', $navbarEl[0]);\n        $navbarEl.removeClass('navbar-transparent-visible');\n        $navbarEl.find('.navbar-bg, .title').css('opacity', '');\n        return;\n      }\n      if (!notTransparent && opacity === 1) {\n        $navbarEl.trigger('navbar:transparentshow');\n        app.emit('navbarTransparentShow', $navbarEl[0]);\n        $navbarEl.addClass('navbar-transparent-visible');\n        $navbarEl.find('.navbar-bg, .title').css('opacity', '');\n        return;\n      }\n      $navbarEl.find('.navbar-bg, .title').css('opacity', opacity);\n      if (snapPageScrollToTransparentNavbar) {\n        if (!utils_support[\"default\"].touch) {\n          clearTimeout(scrollTimeoutId);\n          scrollTimeoutId = setTimeout(function () {\n            snapTransparentNavbar();\n          }, desktopSnapTimeout);\n        } else if (touchEndTimeoutId) {\n          clearTimeout(touchEndTimeoutId);\n          touchEndTimeoutId = null;\n          touchEndTimeoutId = setTimeout(function () {\n            snapTransparentNavbar();\n            clearTimeout(touchEndTimeoutId);\n            touchEndTimeoutId = null;\n          }, touchSnapTimeout);\n        }\n      }\n    }\n    var previousCollapseProgress = null;\n    var collapseProgress = null;\n    function handleLargeNavbarCollapse() {\n      var isHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');\n      if (isHidden) return;\n      var isLargeTransparent = $navbarEl.hasClass('navbar-large-transparent') || $navbarEl.hasClass('navbar-large') && $navbarEl.hasClass('navbar-transparent');\n      previousCollapseProgress = collapseProgress;\n      collapseProgress = Math.min(Math.max(currentScrollTop / navbarTitleLargeHeight, 0), 1);\n      var previousCollapseWasInMiddle = previousCollapseProgress > 0 && previousCollapseProgress < 1;\n      var inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');\n      if (inSearchbarExpanded) return;\n      navbarCollapsed = $navbarEl.hasClass('navbar-large-collapsed');\n      if (collapseProgress === 0 && navbarCollapsed) {\n        app.navbar.expandLargeTitle($navbarEl[0]);\n      } else if (collapseProgress === 1 && !navbarCollapsed) {\n        app.navbar.collapseLargeTitle($navbarEl[0]);\n      }\n      if (collapseProgress === 0 && navbarCollapsed || collapseProgress === 0 && previousCollapseWasInMiddle || collapseProgress === 1 && !navbarCollapsed || collapseProgress === 1 && previousCollapseWasInMiddle) {\n        if (app.theme === 'md') {\n          $navbarEl.find('.navbar-inner').css('overflow', '');\n        }\n        $navbarEl.find('.title').css('opacity', '');\n        $navbarEl.find('.title-large-text, .subnavbar').css('transform', '');\n        if (isLargeTransparent) {\n          $navbarEl.find('.navbar-bg').css('opacity', '');\n        } else {\n          $navbarEl.find('.navbar-bg').css('transform', '');\n        }\n      } else if (collapseProgress > 0 && collapseProgress < 1) {\n        if (app.theme === 'md') {\n          $navbarEl.find('.navbar-inner').css('overflow', 'visible');\n        }\n        $navbarEl.find('.title').css('opacity', collapseProgress);\n        $navbarEl.find('.title-large-text, .subnavbar').css('transform', \"translate3d(0px, \".concat(-1 * collapseProgress * navbarTitleLargeHeight, \"px, 0)\"));\n        if (isLargeTransparent) {\n          $navbarEl.find('.navbar-bg').css('opacity', collapseProgress);\n        } else {\n          $navbarEl.find('.navbar-bg').css('transform', \"translate3d(0px, \".concat(-1 * collapseProgress * navbarTitleLargeHeight, \"px, 0)\"));\n        }\n      }\n      if (snapPageScrollToLargeTitle) {\n        if (!utils_support[\"default\"].touch) {\n          clearTimeout(scrollTimeoutId);\n          scrollTimeoutId = setTimeout(function () {\n            snapLargeNavbar();\n          }, desktopSnapTimeout);\n        } else if (touchEndTimeoutId) {\n          clearTimeout(touchEndTimeoutId);\n          touchEndTimeoutId = null;\n          touchEndTimeoutId = setTimeout(function () {\n            snapLargeNavbar();\n            clearTimeout(touchEndTimeoutId);\n            touchEndTimeoutId = null;\n          }, touchSnapTimeout);\n        }\n      }\n    }\n    function handleTitleHideShow() {\n      if ($pageEl.hasClass('page-with-card-opened')) return;\n      scrollHeight = scrollContent.scrollHeight;\n      offsetHeight = scrollContent.offsetHeight;\n      reachEnd = currentScrollTop + offsetHeight >= scrollHeight;\n      navbarHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');\n      if (reachEnd) {\n        if (app.params.navbar.showOnPageScrollEnd) {\n          action = 'show';\n        }\n      } else if (previousScrollTop > currentScrollTop) {\n        if (app.params.navbar.showOnPageScrollTop || currentScrollTop <= navbarHideHeight) {\n          action = 'show';\n        } else {\n          action = 'hide';\n        }\n      } else if (currentScrollTop > navbarHideHeight) {\n        action = 'hide';\n      } else {\n        action = 'show';\n      }\n      if (action === 'show' && navbarHidden) {\n        app.navbar.show($navbarEl);\n        navbarHidden = false;\n      } else if (action === 'hide' && !navbarHidden) {\n        app.navbar.hide($navbarEl);\n        navbarHidden = true;\n      }\n      previousScrollTop = currentScrollTop;\n    }\n    function handleScroll(e) {\n      scrollContent = this;\n      if (e && e.target && e.target !== scrollContent) {\n        return;\n      }\n      currentScrollTop = scrollContent.scrollTop;\n      scrollChanged = currentScrollTop;\n      if (needCollapse) {\n        handleLargeNavbarCollapse();\n      } else if (needTransparent) {\n        handleNavbarTransparent();\n      }\n      if ($pageEl.hasClass('page-previous')) return;\n      if (needHide) {\n        handleTitleHideShow();\n      }\n    }\n    function handeTouchStart() {\n      scrollChanged = false;\n    }\n    function handleTouchEnd() {\n      clearTimeout(touchEndTimeoutId);\n      touchEndTimeoutId = null;\n      touchEndTimeoutId = setTimeout(function () {\n        if (scrollChanged !== false) {\n          if (needTransparent && !needCollapse) {\n            snapTransparentNavbar();\n          } else {\n            snapLargeNavbar();\n          }\n          clearTimeout(touchEndTimeoutId);\n          touchEndTimeoutId = null;\n        }\n      }, touchSnapTimeout);\n    }\n    $pageEl.on('scroll', '.page-content', handleScroll, true);\n    if (utils_support[\"default\"].touch && (needCollapse && snapPageScrollToLargeTitle || needTransparent && snapPageScrollToTransparentNavbar)) {\n      app.on('touchstart:passive', handeTouchStart);\n      app.on('touchend:passive', handleTouchEnd);\n    }\n    if (needCollapse) {\n      $pageEl.find('.page-content').each(function (pageContentIndex, pageContentEl) {\n        if (pageContentEl.scrollTop > 0) handleScroll.call(pageContentEl);\n      });\n    } else if (needTransparent) {\n      $pageEl.find('.page-content').each(function (pageContentIndex, pageContentEl) {\n        if (pageContentEl.scrollTop > 0) handleScroll.call(pageContentEl);\n      });\n    }\n    $pageEl[0].f7DetachNavbarScrollHandlers = function f7DetachNavbarScrollHandlers() {\n      delete $pageEl[0].f7DetachNavbarScrollHandlers;\n      $pageEl.off('scroll', '.page-content', handleScroll, true);\n      if (utils_support[\"default\"].touch && (needCollapse && snapPageScrollToLargeTitle || needTransparent && snapPageScrollToTransparentNavbar)) {\n        app.off('touchstart:passive', handeTouchStart);\n        app.off('touchend:passive', handleTouchEnd);\n      }\n    };\n  }\n};\n/* harmony default export */ var navbar = ({\n  name: 'navbar',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      navbar: {\n        size: Navbar.size.bind(app),\n        hide: Navbar.hide.bind(app),\n        show: Navbar.show.bind(app),\n        getElByPage: Navbar.getElByPage.bind(app),\n        getPageByEl: Navbar.getPageByEl.bind(app),\n        collapseLargeTitle: Navbar.collapseLargeTitle.bind(app),\n        expandLargeTitle: Navbar.expandLargeTitle.bind(app),\n        toggleLargeTitle: Navbar.toggleLargeTitle.bind(app),\n        initNavbarOnScroll: Navbar.initNavbarOnScroll.bind(app)\n      }\n    });\n  },\n  params: {\n    navbar: {\n      scrollTopOnTitleClick: true,\n      iosCenterTitle: true,\n      mdCenterTitle: false,\n      auroraCenterTitle: true,\n      hideOnPageScroll: false,\n      showOnPageScrollEnd: true,\n      showOnPageScrollTop: true,\n      collapseLargeTitleOnScroll: true,\n      snapPageScrollToLargeTitle: true,\n      snapPageScrollToTransparentNavbar: true\n    }\n  },\n  on: {\n    'panelBreakpoint panelCollapsedBreakpoint panelResize viewResize resize viewMasterDetailBreakpoint': function onPanelResize() {\n      var app = this;\n      Object(dom7_module[\"default\"])('.navbar').each(function (index, navbarEl) {\n        app.navbar.size(navbarEl);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      if (page.$el[0].f7DetachNavbarScrollHandlers) {\n        page.$el[0].f7DetachNavbarScrollHandlers();\n      }\n    },\n    pageBeforeIn: function pageBeforeIn(page) {\n      var app = this;\n      if (app.theme !== 'ios') return;\n      var $navbarsEl;\n      var view = page.$el.parents('.view')[0].f7View;\n      var navbarEl = app.navbar.getElByPage(page);\n      if (!navbarEl) {\n        $navbarsEl = page.$el.parents('.view').children('.navbars');\n      } else {\n        $navbarsEl = Object(dom7_module[\"default\"])(navbarEl).parents('.navbars');\n      }\n      if (page.$el.hasClass('no-navbar') || view.router.dynamicNavbar && !navbarEl) {\n        var animate = !!(page.pageFrom && page.router.history.length > 0);\n        app.navbar.hide($navbarsEl, animate);\n      } else {\n        app.navbar.show($navbarsEl);\n      }\n    },\n    pageReinit: function pageReinit(page) {\n      var app = this;\n      var $navbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage(page));\n      if (!$navbarEl || $navbarEl.length === 0) return;\n      app.navbar.size($navbarEl);\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      var $navbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage(page));\n      if (!$navbarEl || $navbarEl.length === 0) return;\n\n      // Size\n      app.navbar.size($navbarEl);\n\n      // Need Collapse On Scroll\n      var needCollapseOnScrollHandler;\n      if ($navbarEl.find('.title-large').length > 0) {\n        $navbarEl.addClass('navbar-large');\n      }\n      if ($navbarEl.hasClass('navbar-large')) {\n        if (app.params.navbar.collapseLargeTitleOnScroll) needCollapseOnScrollHandler = true;\n        page.$el.addClass('page-with-navbar-large');\n      }\n\n      // Need transparent on scroll\n      var needTransparentOnScroll;\n      if (!needCollapseOnScrollHandler && $navbarEl.hasClass('navbar-transparent')) {\n        needTransparentOnScroll = true;\n      }\n\n      // Need Hide On Scroll\n      var needHideOnScrollHandler;\n      if (app.params.navbar.hideOnPageScroll || page.$el.find('.hide-navbar-on-scroll').length || page.$el.hasClass('hide-navbar-on-scroll') || page.$el.find('.hide-bars-on-scroll').length || page.$el.hasClass('hide-bars-on-scroll')) {\n        if (page.$el.find('.keep-navbar-on-scroll').length || page.$el.hasClass('keep-navbar-on-scroll') || page.$el.find('.keep-bars-on-scroll').length || page.$el.hasClass('keep-bars-on-scroll')) {\n          needHideOnScrollHandler = false;\n        } else {\n          needHideOnScrollHandler = true;\n        }\n      }\n      if (needCollapseOnScrollHandler || needHideOnScrollHandler || needTransparentOnScroll) {\n        app.navbar.initNavbarOnScroll(page.el, $navbarEl[0], needHideOnScrollHandler, needCollapseOnScrollHandler, needTransparentOnScroll);\n      }\n    },\n    'panelOpen panelSwipeOpen modalOpen': function onPanelModalOpen(instance) {\n      var app = this;\n      instance.$el.find('.navbar:not(.navbar-previous):not(.stacked)').each(function (index, navbarEl) {\n        app.navbar.size(navbarEl);\n      });\n    },\n    tabShow: function tabShow(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.navbar:not(.navbar-previous):not(.stacked)').each(function (index, navbarEl) {\n        app.navbar.size(navbarEl);\n      });\n    }\n  },\n  clicks: {\n    '.navbar .title': function onTitleClick($clickedEl) {\n      var app = this;\n      if (!app.params.navbar.scrollTopOnTitleClick) return;\n      if ($clickedEl.closest('a').length > 0) {\n        return;\n      }\n      var $pageContentEl;\n\n      // Find active page\n      var $navbarEl = $clickedEl.parents('.navbar');\n      var $navbarsEl = $navbarEl.parents('.navbars');\n\n      // Static Layout\n      $pageContentEl = $navbarEl.parents('.page-content');\n      if ($pageContentEl.length === 0) {\n        // Fixed Layout\n        if ($navbarEl.parents('.page').length > 0) {\n          $pageContentEl = $navbarEl.parents('.page').find('.page-content');\n        }\n        // Through Layout iOS\n        if ($pageContentEl.length === 0 && $navbarsEl.length) {\n          if ($navbarsEl.nextAll('.page-current:not(.stacked)').length > 0) {\n            $pageContentEl = $navbarsEl.nextAll('.page-current:not(.stacked)').find('.page-content');\n          }\n        }\n        // Through Layout\n        if ($pageContentEl.length === 0) {\n          if ($navbarEl.nextAll('.page-current:not(.stacked)').length > 0) {\n            $pageContentEl = $navbarEl.nextAll('.page-current:not(.stacked)').find('.page-content');\n          }\n        }\n      }\n      if ($pageContentEl && $pageContentEl.length > 0) {\n        // Check for tab\n        if ($pageContentEl.hasClass('tab')) {\n          $pageContentEl = $pageContentEl.parent('.tabs').children('.page-content.tab-active');\n        }\n        if ($pageContentEl.length > 0) $pageContentEl.scrollTop(0, 300);\n      }\n    }\n  },\n  vnode: {\n    navbar: {\n      postpatch: function postpatch(vnode) {\n        var app = this;\n        app.navbar.size(vnode.elm);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/toolbar/toolbar.js\n\n\nvar Toolbar = {\n  setHighlight: function setHighlight(tabbarEl) {\n    var app = this;\n    if (app.theme !== 'md') return;\n    var $tabbarEl = Object(dom7_module[\"default\"])(tabbarEl);\n    if ($tabbarEl.length === 0 || !($tabbarEl.hasClass('tabbar') || $tabbarEl.hasClass('tabbar-labels'))) return;\n    var $highlightEl = $tabbarEl.find('.tab-link-highlight');\n    var tabLinksCount = $tabbarEl.find('.tab-link').length;\n    if (tabLinksCount === 0) {\n      $highlightEl.remove();\n      return;\n    }\n    if ($highlightEl.length === 0) {\n      $tabbarEl.children('.toolbar-inner').append('<span class=\"tab-link-highlight\"></span>');\n      $highlightEl = $tabbarEl.find('.tab-link-highlight');\n    } else if ($highlightEl.next().length) {\n      $tabbarEl.children('.toolbar-inner').append($highlightEl);\n    }\n    var $activeLink = $tabbarEl.find('.tab-link-active');\n    var highlightWidth;\n    var highlightTranslate;\n    if ($tabbarEl.hasClass('tabbar-scrollable') && $activeLink && $activeLink[0]) {\n      highlightWidth = \"\".concat($activeLink[0].offsetWidth, \"px\");\n      highlightTranslate = \"\".concat($activeLink[0].offsetLeft, \"px\");\n    } else {\n      var activeIndex = $activeLink.index();\n      highlightWidth = \"\".concat(100 / tabLinksCount, \"%\");\n      highlightTranslate = \"\".concat((app.rtl ? -activeIndex : activeIndex) * 100, \"%\");\n    }\n    utils[\"default\"].nextFrame(function () {\n      $highlightEl.css('width', highlightWidth).transform(\"translate3d(\".concat(highlightTranslate, \",0,0)\"));\n    });\n  },\n  init: function init(tabbarEl) {\n    var app = this;\n    app.toolbar.setHighlight(tabbarEl);\n  },\n  hide: function hide(el) {\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.hasClass('toolbar-hidden')) return;\n    var className = \"toolbar-hidden\".concat(animate ? ' toolbar-transitioning' : '');\n    $el.transitionEnd(function () {\n      $el.removeClass('toolbar-transitioning');\n    });\n    $el.addClass(className);\n    $el.trigger('toolbar:hide');\n    app.emit('toolbarHide', $el[0]);\n  },\n  show: function show(el) {\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if (!$el.hasClass('toolbar-hidden')) return;\n    if (animate) {\n      $el.addClass('toolbar-transitioning');\n      $el.transitionEnd(function () {\n        $el.removeClass('toolbar-transitioning');\n      });\n    }\n    $el.removeClass('toolbar-hidden');\n    $el.trigger('toolbar:show');\n    app.emit('toolbarShow', $el[0]);\n  },\n  initToolbarOnScroll: function initToolbarOnScroll(pageEl) {\n    var app = this;\n    var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n    var $toolbarEl = $pageEl.parents('.view').children('.toolbar');\n    if ($toolbarEl.length === 0) {\n      $toolbarEl = $pageEl.find('.toolbar');\n    }\n    if ($toolbarEl.length === 0) {\n      $toolbarEl = $pageEl.parents('.views').children('.tabbar, .tabbar-labels');\n    }\n    if ($toolbarEl.length === 0) {\n      return;\n    }\n    var previousScrollTop;\n    var currentScrollTop;\n    var scrollHeight;\n    var offsetHeight;\n    var reachEnd;\n    var action;\n    var toolbarHidden;\n    function handleScroll(e) {\n      if ($pageEl.hasClass('page-with-card-opened')) return;\n      if ($pageEl.hasClass('page-previous')) return;\n      var scrollContent = this;\n      if (e && e.target && e.target !== scrollContent) {\n        return;\n      }\n      currentScrollTop = scrollContent.scrollTop;\n      scrollHeight = scrollContent.scrollHeight;\n      offsetHeight = scrollContent.offsetHeight;\n      reachEnd = currentScrollTop + offsetHeight >= scrollHeight;\n      toolbarHidden = $toolbarEl.hasClass('toolbar-hidden');\n      if (reachEnd) {\n        if (app.params.toolbar.showOnPageScrollEnd) {\n          action = 'show';\n        }\n      } else if (previousScrollTop > currentScrollTop) {\n        if (app.params.toolbar.showOnPageScrollTop || currentScrollTop <= 44) {\n          action = 'show';\n        } else {\n          action = 'hide';\n        }\n      } else if (currentScrollTop > 44) {\n        action = 'hide';\n      } else {\n        action = 'show';\n      }\n      if (action === 'show' && toolbarHidden) {\n        app.toolbar.show($toolbarEl);\n        toolbarHidden = false;\n      } else if (action === 'hide' && !toolbarHidden) {\n        app.toolbar.hide($toolbarEl);\n        toolbarHidden = true;\n      }\n      previousScrollTop = currentScrollTop;\n    }\n    $pageEl.on('scroll', '.page-content', handleScroll, true);\n    $pageEl[0].f7ScrollToolbarHandler = handleScroll;\n  }\n};\n/* harmony default export */ var toolbar = ({\n  name: 'toolbar',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      toolbar: {\n        hide: Toolbar.hide.bind(app),\n        show: Toolbar.show.bind(app),\n        setHighlight: Toolbar.setHighlight.bind(app),\n        initToolbarOnScroll: Toolbar.initToolbarOnScroll.bind(app),\n        init: Toolbar.init.bind(app)\n      }\n    });\n  },\n  params: {\n    toolbar: {\n      hideOnPageScroll: false,\n      showOnPageScrollEnd: true,\n      showOnPageScrollTop: true\n    }\n  },\n  on: {\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      if (page.$el[0].f7ScrollToolbarHandler) {\n        page.$el.off('scroll', '.page-content', page.$el[0].f7ScrollToolbarHandler, true);\n      }\n    },\n    pageBeforeIn: function pageBeforeIn(page) {\n      var app = this;\n      var $toolbarEl = page.$el.parents('.view').children('.toolbar');\n      if ($toolbarEl.length === 0) {\n        $toolbarEl = page.$el.parents('.views').children('.tabbar, .tabbar-labels');\n      }\n      if ($toolbarEl.length === 0) {\n        $toolbarEl = page.$el.find('.toolbar');\n      }\n      if ($toolbarEl.length === 0) {\n        return;\n      }\n      if (page.$el.hasClass('no-toolbar')) {\n        app.toolbar.hide($toolbarEl);\n      } else {\n        app.toolbar.show($toolbarEl);\n      }\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.tabbar, .tabbar-labels').each(function (index, tabbarEl) {\n        app.toolbar.init(tabbarEl);\n      });\n      if (app.params.toolbar.hideOnPageScroll || page.$el.find('.hide-toolbar-on-scroll').length || page.$el.hasClass('hide-toolbar-on-scroll') || page.$el.find('.hide-bars-on-scroll').length || page.$el.hasClass('hide-bars-on-scroll')) {\n        if (page.$el.find('.keep-toolbar-on-scroll').length || page.$el.hasClass('keep-toolbar-on-scroll') || page.$el.find('.keep-bars-on-scroll').length || page.$el.hasClass('keep-bars-on-scroll')) {\n          return;\n        }\n        app.toolbar.initToolbarOnScroll(page.el);\n      }\n    },\n    init: function init() {\n      var app = this;\n      app.root.find('.tabbar, .tabbar-labels').each(function (index, tabbarEl) {\n        app.toolbar.init(tabbarEl);\n      });\n    }\n  },\n  vnode: {\n    tabbar: {\n      insert: function insert(vnode) {\n        var app = this;\n        app.toolbar.init(vnode.elm);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/subnavbar/subnavbar.js\n/* harmony default export */ var subnavbar_subnavbar = ({\n  name: 'subnavbar',\n  on: {\n    pageInit: function pageInit(page) {\n      if (page.$navbarEl && page.$navbarEl.length && page.$navbarEl.find('.subnavbar').length) {\n        page.$el.addClass('page-with-subnavbar');\n      }\n      if (page.$el.find('.subnavbar').length) {\n        page.$el.addClass('page-with-subnavbar');\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/touch-ripple/touch-ripple-class.js\n\n\n\n\nvar touch_ripple_class_TouchRipple = /*#__PURE__*/function () {\n  function TouchRipple($el, x, y) {\n    classCallCheck_default()(this, TouchRipple);\n    var ripple = this;\n    if (!$el) return undefined;\n    var box = $el[0].getBoundingClientRect();\n    var center = {\n      x: x - box.left,\n      y: y - box.top\n    };\n    var width = box.width;\n    var height = box.height;\n    var diameter = Math.max(Math.pow(Math.pow(height, 2) + Math.pow(width, 2), 0.5), 48);\n    ripple.$rippleWaveEl = Object(dom7_module[\"default\"])(\"<div class=\\\"ripple-wave\\\" style=\\\"width: \".concat(diameter, \"px; height: \").concat(diameter, \"px; margin-top:-\").concat(diameter / 2, \"px; margin-left:-\").concat(diameter / 2, \"px; left:\").concat(center.x, \"px; top:\").concat(center.y, \"px;\\\"></div>\"));\n    $el.prepend(ripple.$rippleWaveEl);\n    ripple.rippleTransform = \"translate3d(\".concat(-center.x + width / 2, \"px, \").concat(-center.y + height / 2, \"px, 0) scale(1)\");\n    utils[\"default\"].nextFrame(function () {\n      if (!ripple || !ripple.$rippleWaveEl) return;\n      ripple.$rippleWaveEl.transform(ripple.rippleTransform);\n    });\n    return ripple;\n  }\n  return createClass_default()(TouchRipple, [{\n    key: \"destroy\",\n    value: function destroy() {\n      var ripple = this;\n      if (ripple.$rippleWaveEl) {\n        ripple.$rippleWaveEl.remove();\n      }\n      Object.keys(ripple).forEach(function (key) {\n        ripple[key] = null;\n        delete ripple[key];\n      });\n      ripple = null;\n    }\n  }, {\n    key: \"remove\",\n    value: function remove() {\n      var ripple = this;\n      if (ripple.removing) return;\n      var $rippleWaveEl = this.$rippleWaveEl;\n      var rippleTransform = this.rippleTransform;\n      var removeTimeout = utils[\"default\"].nextTick(function () {\n        ripple.destroy();\n      }, 400);\n      ripple.removing = true;\n      $rippleWaveEl.addClass('ripple-wave-fill').transform(rippleTransform.replace('scale(1)', 'scale(1.01)')).transitionEnd(function () {\n        clearTimeout(removeTimeout);\n        utils[\"default\"].nextFrame(function () {\n          $rippleWaveEl.addClass('ripple-wave-out').transform(rippleTransform.replace('scale(1)', 'scale(1.01)'));\n          removeTimeout = utils[\"default\"].nextTick(function () {\n            ripple.destroy();\n          }, 700);\n          $rippleWaveEl.transitionEnd(function () {\n            clearTimeout(removeTimeout);\n            ripple.destroy();\n          });\n        });\n      });\n    }\n  }]);\n}();\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/touch-ripple/touch-ripple.js\n\n\n/* harmony default export */ var touch_ripple = ({\n  name: 'touch-ripple',\n  static: {\n    TouchRipple: touch_ripple_class_TouchRipple\n  },\n  create: function create() {\n    var app = this;\n    app.touchRipple = {\n      create: function create() {\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        return construct_default()(touch_ripple_class_TouchRipple, args);\n      }\n    };\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/modal/modal-class.js\n\n\n\n\n\nfunction modal_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, modal_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction modal_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (modal_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar openedModals = [];\nvar dialogsQueue = [];\nfunction clearDialogsQueue() {\n  if (dialogsQueue.length === 0) return;\n  var dialog = dialogsQueue.shift();\n  dialog.open();\n}\nvar modal_class_Modal = /*#__PURE__*/function (_Framework7Class) {\n  function Modal(app, params) {\n    var _this;\n    classCallCheck_default()(this, Modal);\n    _this = modal_class_callSuper(this, Modal, [params, [app]]);\n    var modal = _this;\n    var defaults = {};\n\n    // Extend defaults with modules params\n    modal.useModulesParams(defaults);\n    modal.params = utils[\"default\"].extend(defaults, params);\n    modal.opened = false;\n\n    // Install Modules\n    modal.useModules();\n    return possibleConstructorReturn_default()(_this, _this);\n  }\n  inherits_default()(Modal, _Framework7Class);\n  return createClass_default()(Modal, [{\n    key: \"onOpen\",\n    value: function onOpen() {\n      var modal = this;\n      modal.opened = true;\n      openedModals.push(modal);\n      Object(dom7_module[\"default\"])('html').addClass(\"with-modal-\".concat(modal.type.toLowerCase()));\n      modal.$el.trigger(\"modal:open \".concat(modal.type.toLowerCase(), \":open\"));\n      modal.emit(\"local::open modalOpen \".concat(modal.type, \"Open\"), modal);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var modal = this;\n      modal.$el.trigger(\"modal:opened \".concat(modal.type.toLowerCase(), \":opened\"));\n      modal.emit(\"local::opened modalOpened \".concat(modal.type, \"Opened\"), modal);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var modal = this;\n      modal.opened = false;\n      if (!modal.type || !modal.$el) return;\n      openedModals.splice(openedModals.indexOf(modal), 1);\n      Object(dom7_module[\"default\"])('html').removeClass(\"with-modal-\".concat(modal.type.toLowerCase()));\n      modal.$el.trigger(\"modal:close \".concat(modal.type.toLowerCase(), \":close\"));\n      modal.emit(\"local::close modalClose \".concat(modal.type, \"Close\"), modal);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var modal = this;\n      if (!modal.type || !modal.$el) return;\n      modal.$el.removeClass('modal-out');\n      modal.$el.hide();\n      modal.$el.trigger(\"modal:closed \".concat(modal.type.toLowerCase(), \":closed\"));\n      modal.emit(\"local::closed modalClosed \".concat(modal.type, \"Closed\"), modal);\n    }\n  }, {\n    key: \"open\",\n    value: function open(animateModal) {\n      var modal = this;\n      var app = modal.app;\n      var $el = modal.$el;\n      var $backdropEl = modal.$backdropEl;\n      var type = modal.type;\n      var animate = true;\n      if (typeof animateModal !== 'undefined') animate = animateModal;else if (typeof modal.params.animate !== 'undefined') {\n        animate = modal.params.animate;\n      }\n      if (!$el || $el.hasClass('modal-in')) {\n        return modal;\n      }\n      if (type === 'dialog' && app.params.modal.queueDialogs) {\n        var pushToQueue;\n        if (Object(dom7_module[\"default\"])('.dialog.modal-in').length > 0) {\n          pushToQueue = true;\n        } else if (openedModals.length > 0) {\n          openedModals.forEach(function (openedModal) {\n            if (openedModal.type === 'dialog') pushToQueue = true;\n          });\n        }\n        if (pushToQueue) {\n          dialogsQueue.push(modal);\n          return modal;\n        }\n      }\n      var $modalParentEl = $el.parent();\n      var wasInDom = $el.parents(ssr_window_esm[\"document\"]).length > 0;\n      if (app.params.modal.moveToRoot && !$modalParentEl.is(app.root)) {\n        app.root.append($el);\n        modal.once(\"\".concat(type, \"Closed\"), function () {\n          if (wasInDom) {\n            $modalParentEl.append($el);\n          } else {\n            $el.remove();\n          }\n        });\n      }\n      // Show Modal\n      $el.show();\n\n      /* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n      modal._clientLeft = $el[0].clientLeft;\n\n      // Modal\n      function transitionEnd() {\n        if ($el.hasClass('modal-out')) {\n          modal.onClosed();\n        } else if ($el.hasClass('modal-in')) {\n          modal.onOpened();\n        }\n      }\n      if (animate) {\n        if ($backdropEl) {\n          $backdropEl.removeClass('not-animated');\n          $backdropEl.addClass('backdrop-in');\n        }\n        $el.animationEnd(function () {\n          transitionEnd();\n        });\n        $el.transitionEnd(function () {\n          transitionEnd();\n        });\n        $el.removeClass('modal-out not-animated').addClass('modal-in');\n        modal.onOpen();\n      } else {\n        if ($backdropEl) {\n          $backdropEl.addClass('backdrop-in not-animated');\n        }\n        $el.removeClass('modal-out').addClass('modal-in not-animated');\n        modal.onOpen();\n        modal.onOpened();\n      }\n      return modal;\n    }\n  }, {\n    key: \"close\",\n    value: function close(animateModal) {\n      var modal = this;\n      var $el = modal.$el;\n      var $backdropEl = modal.$backdropEl;\n      var animate = true;\n      if (typeof animateModal !== 'undefined') animate = animateModal;else if (typeof modal.params.animate !== 'undefined') {\n        animate = modal.params.animate;\n      }\n      if (!$el || !$el.hasClass('modal-in')) {\n        if (dialogsQueue.indexOf(modal) >= 0) {\n          dialogsQueue.splice(dialogsQueue.indexOf(modal), 1);\n        }\n        return modal;\n      }\n\n      // backdrop\n      if ($backdropEl) {\n        var needToHideBackdrop = true;\n        if (modal.type === 'popup') {\n          modal.$el.prevAll('.popup.modal-in').each(function (index, popupEl) {\n            var popupInstance = popupEl.f7Modal;\n            if (!popupInstance) return;\n            if (popupInstance.params.closeByBackdropClick && popupInstance.params.backdrop && popupInstance.backdropEl === modal.backdropEl) {\n              needToHideBackdrop = false;\n            }\n          });\n        }\n        if (needToHideBackdrop) {\n          $backdropEl[animate ? 'removeClass' : 'addClass']('not-animated');\n          $backdropEl.removeClass('backdrop-in');\n        }\n      }\n\n      // Modal\n      $el[animate ? 'removeClass' : 'addClass']('not-animated');\n      function transitionEnd() {\n        if ($el.hasClass('modal-out')) {\n          modal.onClosed();\n        } else if ($el.hasClass('modal-in')) {\n          modal.onOpened();\n        }\n      }\n      if (animate) {\n        $el.animationEnd(function () {\n          transitionEnd();\n        });\n        $el.transitionEnd(function () {\n          transitionEnd();\n        });\n        $el.removeClass('modal-in').addClass('modal-out');\n        // Emit close\n        modal.onClose();\n      } else {\n        $el.addClass('not-animated').removeClass('modal-in').addClass('modal-out');\n        // Emit close\n        modal.onClose();\n        modal.onClosed();\n      }\n      if (modal.type === 'dialog') {\n        clearDialogsQueue();\n      }\n      return modal;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var modal = this;\n      if (modal.destroyed) return;\n      modal.emit(\"local::beforeDestroy modalBeforeDestroy \".concat(modal.type, \"BeforeDestroy\"), modal);\n      if (modal.$el) {\n        modal.$el.trigger(\"modal:beforedestroy \".concat(modal.type.toLowerCase(), \":beforedestroy\"));\n        if (modal.$el.length && modal.$el[0].f7Modal) {\n          delete modal.$el[0].f7Modal;\n        }\n      }\n      utils[\"default\"].deleteProps(modal);\n      modal.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var modal_class = (modal_class_Modal);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/modal/custom-modal-class.js\n\n\n\n\n\nfunction custom_modal_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, custom_modal_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction custom_modal_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (custom_modal_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar custom_modal_class_CustomModal = /*#__PURE__*/function (_Modal) {\n  function CustomModal(app, params) {\n    var _this;\n    classCallCheck_default()(this, CustomModal);\n    var extendedParams = utils[\"default\"].extend({\n      backdrop: true,\n      closeByBackdropClick: true,\n      on: {}\n    }, params);\n\n    // Extends with open/close Modal methods;\n    _this = custom_modal_class_callSuper(this, CustomModal, [app, extendedParams]);\n    var customModal = _this;\n    customModal.params = extendedParams;\n\n    // Find Element\n    var $el;\n    if (!customModal.params.el) {\n      $el = Object(dom7_module[\"default\"])(customModal.params.content);\n    } else {\n      $el = Object(dom7_module[\"default\"])(customModal.params.el);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, customModal.destroy());\n    }\n    var $backdropEl;\n    if (customModal.params.backdrop) {\n      $backdropEl = app.root.children('.custom-modal-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"custom-modal-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n    function handleClick(e) {\n      if (!customModal || customModal.destroyed) return;\n      if ($backdropEl && e.target === $backdropEl[0]) {\n        customModal.close();\n      }\n    }\n    customModal.on('customModalOpened', function () {\n      if (customModal.params.closeByBackdropClick && customModal.params.backdrop) {\n        app.on('click', handleClick);\n      }\n    });\n    customModal.on('customModalClose', function () {\n      if (customModal.params.closeByBackdropClick && customModal.params.backdrop) {\n        app.off('click', handleClick);\n      }\n    });\n    utils[\"default\"].extend(customModal, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'customModal'\n    });\n    $el[0].f7Modal = customModal;\n    return possibleConstructorReturn_default()(_this, customModal);\n  }\n  inherits_default()(CustomModal, _Modal);\n  return createClass_default()(CustomModal);\n}(modal_class);\n/* harmony default export */ var custom_modal_class = (custom_modal_class_CustomModal);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/modal/modal.js\n\n\n/* harmony default export */ var modal_modal = ({\n  name: 'modal',\n  static: {\n    Modal: modal_class,\n    CustomModal: custom_modal_class\n  },\n  create: function create() {\n    var app = this;\n    app.customModal = {\n      create: function create(params) {\n        return new custom_modal_class(app, params);\n      }\n    };\n  },\n  params: {\n    modal: {\n      moveToRoot: true,\n      queueDialogs: true\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/appbar/appbar.js\n/* harmony default export */ var appbar = ({\n  name: 'appbar'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/dialog/dialog-class.js\n\n\n\n\n\nfunction dialog_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, dialog_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction dialog_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (dialog_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar dialog_class_Dialog = /*#__PURE__*/function (_Modal) {\n  function Dialog(app, params) {\n    var _this;\n    classCallCheck_default()(this, Dialog);\n    var extendedParams = utils[\"default\"].extend({\n      title: app.params.dialog.title,\n      text: undefined,\n      content: '',\n      buttons: [],\n      verticalButtons: false,\n      onClick: undefined,\n      cssClass: undefined,\n      destroyOnClose: false,\n      on: {}\n    }, params);\n    if (typeof extendedParams.closeByBackdropClick === 'undefined') {\n      extendedParams.closeByBackdropClick = app.params.dialog.closeByBackdropClick;\n    }\n    if (typeof extendedParams.backdrop === 'undefined') {\n      extendedParams.backdrop = app.params.dialog.backdrop;\n    }\n\n    // Extends with open/close Modal methods;\n    _this = dialog_class_callSuper(this, Dialog, [app, extendedParams]);\n    var dialog = _this;\n    var title = extendedParams.title,\n      text = extendedParams.text,\n      content = extendedParams.content,\n      buttons = extendedParams.buttons,\n      verticalButtons = extendedParams.verticalButtons,\n      cssClass = extendedParams.cssClass,\n      backdrop = extendedParams.backdrop;\n    dialog.params = extendedParams;\n\n    // Find Element\n    var $el;\n    if (!dialog.params.el) {\n      var dialogClasses = ['dialog'];\n      if (buttons.length === 0) dialogClasses.push('dialog-no-buttons');\n      if (buttons.length > 0) dialogClasses.push(\"dialog-buttons-\".concat(buttons.length));\n      if (verticalButtons) dialogClasses.push('dialog-buttons-vertical');\n      if (cssClass) dialogClasses.push(cssClass);\n      var buttonsHTML = '';\n      if (buttons.length > 0) {\n        buttonsHTML = \"\\n          <div class=\\\"dialog-buttons\\\">\\n            \".concat(buttons.map(function (button) {\n          return \"\\n              <span class=\\\"dialog-button\".concat(button.bold ? ' dialog-button-bold' : '').concat(button.color ? \" color-\".concat(button.color) : '').concat(button.cssClass ? \" \".concat(button.cssClass) : '', \"\\\">\").concat(button.text, \"</span>\\n            \");\n        }).join(''), \"\\n          </div>\\n        \");\n      }\n      var dialogHtml = \"\\n        <div class=\\\"\".concat(dialogClasses.join(' '), \"\\\">\\n          <div class=\\\"dialog-inner\\\">\\n            \").concat(title ? \"<div class=\\\"dialog-title\\\">\".concat(title, \"</div>\") : '', \"\\n            \").concat(text ? \"<div class=\\\"dialog-text\\\">\".concat(text, \"</div>\") : '', \"\\n            \").concat(content, \"\\n          </div>\\n          \").concat(buttonsHTML, \"\\n        </div>\\n      \");\n      $el = Object(dom7_module[\"default\"])(dialogHtml);\n    } else {\n      $el = Object(dom7_module[\"default\"])(dialog.params.el);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, dialog.destroy());\n    }\n    var $backdropEl;\n    if (backdrop) {\n      $backdropEl = app.root.children('.dialog-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"dialog-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n\n    // Assign events\n    function buttonOnClick(e) {\n      var buttonEl = this;\n      var index = Object(dom7_module[\"default\"])(buttonEl).index();\n      var button = buttons[index];\n      if (button.onClick) button.onClick(dialog, e);\n      if (dialog.params.onClick) dialog.params.onClick(dialog, index);\n      if (button.close !== false) dialog.close();\n    }\n    var addKeyboardHander;\n    function onKeyDown(e) {\n      var keyCode = e.keyCode;\n      buttons.forEach(function (button, index) {\n        if (button.keyCodes && button.keyCodes.indexOf(keyCode) >= 0) {\n          if (ssr_window_esm[\"document\"].activeElement) ssr_window_esm[\"document\"].activeElement.blur();\n          if (button.onClick) button.onClick(dialog, e);\n          if (dialog.params.onClick) dialog.params.onClick(dialog, index);\n          if (button.close !== false) dialog.close();\n        }\n      });\n    }\n    if (buttons && buttons.length > 0) {\n      dialog.on('open', function () {\n        $el.find('.dialog-button').each(function (index, buttonEl) {\n          var button = buttons[index];\n          if (button.keyCodes) addKeyboardHander = true;\n          Object(dom7_module[\"default\"])(buttonEl).on('click', buttonOnClick);\n        });\n        if (addKeyboardHander && !app.device.ios && !app.device.android && !app.device.cordova) {\n          Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('keydown', onKeyDown);\n        }\n      });\n      dialog.on('close', function () {\n        $el.find('.dialog-button').each(function (index, buttonEl) {\n          Object(dom7_module[\"default\"])(buttonEl).off('click', buttonOnClick);\n        });\n        if (addKeyboardHander && !app.device.ios && !app.device.android && !app.device.cordova) {\n          Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('keydown', onKeyDown);\n        }\n        addKeyboardHander = false;\n      });\n    }\n    utils[\"default\"].extend(dialog, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'dialog',\n      setProgress: function setProgress(progress, duration) {\n        app.progressbar.set($el.find('.progressbar'), progress, duration);\n        return dialog;\n      },\n      setText: function setText(newText) {\n        var $textEl = $el.find('.dialog-text');\n        if ($textEl.length === 0) {\n          $textEl = Object(dom7_module[\"default\"])('<div class=\"dialog-text\"></div>');\n          if (typeof title !== 'undefined') {\n            $textEl.insertAfter($el.find('.dialog-title'));\n          } else {\n            $el.find('.dialog-inner').prepend($textEl);\n          }\n        }\n        $textEl.html(newText);\n        dialog.params.text = newText;\n        return dialog;\n      },\n      setTitle: function setTitle(newTitle) {\n        var $titleEl = $el.find('.dialog-title');\n        if ($titleEl.length === 0) {\n          $titleEl = Object(dom7_module[\"default\"])('<div class=\"dialog-title\"></div>');\n          $el.find('.dialog-inner').prepend($titleEl);\n        }\n        $titleEl.html(newTitle);\n        dialog.params.title = newTitle;\n        return dialog;\n      }\n    });\n    function handleClick(e) {\n      var target = e.target;\n      var $target = Object(dom7_module[\"default\"])(target);\n      if ($target.closest(dialog.el).length === 0) {\n        if (dialog.params.closeByBackdropClick && dialog.backdropEl && dialog.backdropEl === target) {\n          dialog.close();\n        }\n      }\n    }\n    dialog.on('opened', function () {\n      if (dialog.params.closeByBackdropClick) {\n        app.on('click', handleClick);\n      }\n    });\n    dialog.on('close', function () {\n      if (dialog.params.closeByBackdropClick) {\n        app.off('click', handleClick);\n      }\n    });\n    $el[0].f7Modal = dialog;\n    if (dialog.params.destroyOnClose) {\n      dialog.once('closed', function () {\n        setTimeout(function () {\n          dialog.destroy();\n        }, 0);\n      });\n    }\n    return possibleConstructorReturn_default()(_this, dialog);\n  }\n  inherits_default()(Dialog, _Modal);\n  return createClass_default()(Dialog);\n}(modal_class);\n/* harmony default export */ var dialog_class = (dialog_class_Dialog);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/dialog/dialog.js\n\nfunction dialog_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction dialog_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? dialog_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : dialog_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n/* harmony default export */ var dialog_dialog = ({\n  name: 'dialog',\n  params: {\n    dialog: {\n      title: undefined,\n      buttonOk: 'OK',\n      buttonCancel: 'Cancel',\n      usernamePlaceholder: 'Username',\n      passwordPlaceholder: 'Password',\n      preloaderTitle: 'Loading... ',\n      progressTitle: 'Loading... ',\n      backdrop: true,\n      closeByBackdropClick: false,\n      destroyPredefinedDialogs: true,\n      keyboardActions: true,\n      autoFocus: true\n    }\n  },\n  static: {\n    Dialog: dialog_class\n  },\n  create: function create() {\n    var app = this;\n    function defaultDialogTitle() {\n      return app.params.dialog.title || app.name;\n    }\n    var destroyOnClose = app.params.dialog.destroyPredefinedDialogs;\n    var keyboardActions = app.params.dialog.keyboardActions;\n    var autoFocus = app.params.dialog.autoFocus;\n    var autoFocusHandler = autoFocus ? {\n      on: {\n        opened: function opened(dialog) {\n          dialog.$el.find('input').eq(0).focus();\n        }\n      }\n    } : {};\n    app.dialog = utils[\"default\"].extend(modal_methods({\n      app: app,\n      constructor: dialog_class,\n      defaultSelector: '.dialog.modal-in'\n    }), {\n      // Shortcuts\n      alert: function alert() {\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        var text = args[0],\n          title = args[1],\n          callbackOk = args[2];\n        if (args.length === 2 && typeof args[1] === 'function') {\n          text = args[0];\n          callbackOk = args[1];\n          title = args[2];\n        }\n        return new dialog_class(app, {\n          title: typeof title === 'undefined' ? defaultDialogTitle() : title,\n          text: text,\n          buttons: [{\n            text: app.params.dialog.buttonOk,\n            bold: true,\n            onClick: callbackOk,\n            keyCodes: keyboardActions ? [13, 27] : null\n          }],\n          destroyOnClose: destroyOnClose\n        }).open();\n      },\n      prompt: function prompt() {\n        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n          args[_key2] = arguments[_key2];\n        }\n        var text = args[0],\n          title = args[1],\n          callbackOk = args[2],\n          callbackCancel = args[3],\n          defaultValue = args[4];\n        if (typeof args[1] === 'function') {\n          text = args[0];\n          callbackOk = args[1];\n          callbackCancel = args[2];\n          defaultValue = args[3];\n          title = args[4];\n        }\n        defaultValue = typeof defaultValue === 'undefined' || defaultValue === null ? '' : defaultValue;\n        return new dialog_class(app, dialog_objectSpread({\n          title: typeof title === 'undefined' ? defaultDialogTitle() : title,\n          text: text,\n          content: \"<div class=\\\"dialog-input-field input\\\"><input type=\\\"text\\\" class=\\\"dialog-input\\\" value=\\\"\".concat(defaultValue, \"\\\"></div>\"),\n          buttons: [{\n            text: app.params.dialog.buttonCancel,\n            keyCodes: keyboardActions ? [27] : null,\n            color: app.theme === 'aurora' ? 'gray' : null\n          }, {\n            text: app.params.dialog.buttonOk,\n            bold: true,\n            keyCodes: keyboardActions ? [13] : null\n          }],\n          onClick: function onClick(dialog, index) {\n            var inputValue = dialog.$el.find('.dialog-input').val();\n            if (index === 0 && callbackCancel) callbackCancel(inputValue);\n            if (index === 1 && callbackOk) callbackOk(inputValue);\n          },\n          destroyOnClose: destroyOnClose\n        }, autoFocusHandler)).open();\n      },\n      confirm: function confirm() {\n        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n          args[_key3] = arguments[_key3];\n        }\n        var text = args[0],\n          title = args[1],\n          callbackOk = args[2],\n          callbackCancel = args[3];\n        if (typeof args[1] === 'function') {\n          text = args[0];\n          callbackOk = args[1];\n          callbackCancel = args[2];\n          title = args[3];\n        }\n        return new dialog_class(app, {\n          title: typeof title === 'undefined' ? defaultDialogTitle() : title,\n          text: text,\n          buttons: [{\n            text: app.params.dialog.buttonCancel,\n            onClick: callbackCancel,\n            keyCodes: keyboardActions ? [27] : null,\n            color: app.theme === 'aurora' ? 'gray' : null\n          }, {\n            text: app.params.dialog.buttonOk,\n            bold: true,\n            onClick: callbackOk,\n            keyCodes: keyboardActions ? [13] : null\n          }],\n          destroyOnClose: destroyOnClose\n        }).open();\n      },\n      login: function login() {\n        for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n          args[_key4] = arguments[_key4];\n        }\n        var text = args[0],\n          title = args[1],\n          callbackOk = args[2],\n          callbackCancel = args[3];\n        if (typeof args[1] === 'function') {\n          text = args[0];\n          callbackOk = args[1];\n          callbackCancel = args[2];\n          title = args[3];\n        }\n        return new dialog_class(app, dialog_objectSpread({\n          title: typeof title === 'undefined' ? defaultDialogTitle() : title,\n          text: text,\n          content: \"\\n              <div class=\\\"dialog-input-field dialog-input-double input\\\">\\n                <input type=\\\"text\\\" name=\\\"dialog-username\\\" placeholder=\\\"\".concat(app.params.dialog.usernamePlaceholder, \"\\\" class=\\\"dialog-input\\\">\\n              </div>\\n              <div class=\\\"dialog-input-field dialog-input-double input\\\">\\n                <input type=\\\"password\\\" name=\\\"dialog-password\\\" placeholder=\\\"\").concat(app.params.dialog.passwordPlaceholder, \"\\\" class=\\\"dialog-input\\\">\\n              </div>\"),\n          buttons: [{\n            text: app.params.dialog.buttonCancel,\n            keyCodes: keyboardActions ? [27] : null,\n            color: app.theme === 'aurora' ? 'gray' : null\n          }, {\n            text: app.params.dialog.buttonOk,\n            bold: true,\n            keyCodes: keyboardActions ? [13] : null\n          }],\n          onClick: function onClick(dialog, index) {\n            var username = dialog.$el.find('[name=\"dialog-username\"]').val();\n            var password = dialog.$el.find('[name=\"dialog-password\"]').val();\n            if (index === 0 && callbackCancel) callbackCancel(username, password);\n            if (index === 1 && callbackOk) callbackOk(username, password);\n          },\n          destroyOnClose: destroyOnClose\n        }, autoFocusHandler)).open();\n      },\n      password: function password() {\n        for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n          args[_key5] = arguments[_key5];\n        }\n        var text = args[0],\n          title = args[1],\n          callbackOk = args[2],\n          callbackCancel = args[3];\n        if (typeof args[1] === 'function') {\n          text = args[0];\n          callbackOk = args[1];\n          callbackCancel = args[2];\n          title = args[3];\n        }\n        return new dialog_class(app, dialog_objectSpread({\n          title: typeof title === 'undefined' ? defaultDialogTitle() : title,\n          text: text,\n          content: \"\\n              <div class=\\\"dialog-input-field input\\\">\\n                <input type=\\\"password\\\" name=\\\"dialog-password\\\" placeholder=\\\"\".concat(app.params.dialog.passwordPlaceholder, \"\\\" class=\\\"dialog-input\\\">\\n              </div>\"),\n          buttons: [{\n            text: app.params.dialog.buttonCancel,\n            keyCodes: keyboardActions ? [27] : null,\n            color: app.theme === 'aurora' ? 'gray' : null\n          }, {\n            text: app.params.dialog.buttonOk,\n            bold: true,\n            keyCodes: keyboardActions ? [13] : null\n          }],\n          onClick: function onClick(dialog, index) {\n            var password = dialog.$el.find('[name=\"dialog-password\"]').val();\n            if (index === 0 && callbackCancel) callbackCancel(password);\n            if (index === 1 && callbackOk) callbackOk(password);\n          },\n          destroyOnClose: destroyOnClose\n        }, autoFocusHandler)).open();\n      },\n      preloader: function preloader(title, color) {\n        var preloaderInner = utils[\"default\"][\"\".concat(app.theme, \"PreloaderContent\")] || '';\n        return new dialog_class(app, {\n          title: typeof title === 'undefined' || title === null ? app.params.dialog.preloaderTitle : title,\n          content: \"<div class=\\\"preloader\".concat(color ? \" color-\".concat(color) : '', \"\\\">\").concat(preloaderInner, \"</div>\"),\n          cssClass: 'dialog-preloader',\n          destroyOnClose: destroyOnClose\n        }).open();\n      },\n      progress: function progress() {\n        for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n          args[_key6] = arguments[_key6];\n        }\n        var title = args[0],\n          progress = args[1],\n          color = args[2];\n        if (args.length === 2) {\n          if (typeof args[0] === 'number') {\n            progress = args[0];\n            color = args[1];\n            title = args[2];\n          } else if (typeof args[0] === 'string' && typeof args[1] === 'string') {\n            title = args[0];\n            color = args[1];\n            progress = args[2];\n          }\n        } else if (args.length === 1) {\n          if (typeof args[0] === 'number') {\n            progress = args[0];\n            title = args[1];\n            color = args[2];\n          }\n        }\n        var infinite = typeof progress === 'undefined';\n        var dialog = new dialog_class(app, {\n          title: typeof title === 'undefined' ? app.params.dialog.progressTitle : title,\n          cssClass: 'dialog-progress',\n          content: \"\\n              <div class=\\\"progressbar\".concat(infinite ? '-infinite' : '').concat(color ? \" color-\".concat(color) : '', \"\\\">\\n                \").concat(!infinite ? '<span></span>' : '', \"\\n              </div>\\n            \"),\n          destroyOnClose: destroyOnClose\n        });\n        if (!infinite) dialog.setProgress(progress);\n        return dialog.open();\n      }\n    });\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/popup/popup-class.js\n\n\n\n\n\nfunction popup_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, popup_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction popup_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (popup_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar popup_class_Popup = /*#__PURE__*/function (_Modal) {\n  function Popup(app, params) {\n    var _this;\n    classCallCheck_default()(this, Popup);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.popup, params);\n\n    // Extends with open/close Modal methods;\n    _this = popup_class_callSuper(this, Popup, [app, extendedParams]);\n    var popup = _this;\n    popup.params = extendedParams;\n\n    // Find Element\n    var $el;\n    if (!popup.params.el) {\n      $el = Object(dom7_module[\"default\"])(popup.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    } else {\n      $el = Object(dom7_module[\"default\"])(popup.params.el).eq(0);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, popup.destroy());\n    }\n    var $backdropEl;\n    if (popup.params.backdrop && popup.params.backdropEl) {\n      $backdropEl = Object(dom7_module[\"default\"])(popup.params.backdropEl);\n    } else if (popup.params.backdrop) {\n      $backdropEl = app.root.children('.popup-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"popup-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n    utils[\"default\"].extend(popup, {\n      app: app,\n      push: $el.hasClass('popup-push') || popup.params.push,\n      $el: $el,\n      el: $el[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'popup',\n      $htmlEl: Object(dom7_module[\"default\"])('html')\n    });\n    if (popup.params.push) {\n      $el.addClass('popup-push');\n    }\n    function handleClick(e) {\n      var target = e.target;\n      var $target = Object(dom7_module[\"default\"])(target);\n      var keyboardOpened = !app.device.desktop && app.device.cordova && (ssr_window_esm[\"window\"].Keyboard && ssr_window_esm[\"window\"].Keyboard.isVisible || ssr_window_esm[\"window\"].cordova.plugins && ssr_window_esm[\"window\"].cordova.plugins.Keyboard && ssr_window_esm[\"window\"].cordova.plugins.Keyboard.isVisible);\n      if (keyboardOpened) return;\n      if ($target.closest(popup.el).length === 0) {\n        if (popup.params && popup.params.closeByBackdropClick && popup.params.backdrop && popup.backdropEl && popup.backdropEl === target) {\n          var needToClose = true;\n          popup.$el.nextAll('.popup.modal-in').each(function (index, popupEl) {\n            var popupInstance = popupEl.f7Modal;\n            if (!popupInstance) return;\n            if (popupInstance.params.closeByBackdropClick && popupInstance.params.backdrop && popupInstance.backdropEl === popup.backdropEl) {\n              needToClose = false;\n            }\n          });\n          if (needToClose) {\n            popup.close();\n          }\n        }\n      }\n    }\n    function onKeyDown(e) {\n      var keyCode = e.keyCode;\n      if (keyCode === 27 && popup.params.closeOnEscape) {\n        popup.close();\n      }\n    }\n    var pushOffset;\n    var isPush;\n    function pushViewScale(offset) {\n      return (app.height - offset * 2) / app.height;\n    }\n    var allowSwipeToClose = true;\n    var isTouched = false;\n    var startTouch;\n    var currentTouch;\n    var isScrolling;\n    var touchStartTime;\n    var touchesDiff;\n    var isMoved = false;\n    var pageContentEl;\n    var pageContentScrollTop;\n    var pageContentOffsetHeight;\n    var pageContentScrollHeight;\n    var popupHeight;\n    var $pushEl;\n    function handleTouchStart(e) {\n      if (isTouched || !allowSwipeToClose || !popup.params.swipeToClose) return;\n      if (popup.params.swipeHandler && Object(dom7_module[\"default\"])(e.target).closest(popup.params.swipeHandler).length === 0) {\n        return;\n      }\n      isTouched = true;\n      isMoved = false;\n      startTouch = {\n        x: e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX,\n        y: e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY\n      };\n      touchStartTime = utils[\"default\"].now();\n      isScrolling = undefined;\n      if (!popup.params.swipeHandler && e.type === 'touchstart') {\n        pageContentEl = Object(dom7_module[\"default\"])(e.target).closest('.page-content')[0];\n      }\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      currentTouch = {\n        x: e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX,\n        y: e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY\n      };\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(currentTouch.x - startTouch.x) > Math.abs(currentTouch.y - startTouch.y));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      touchesDiff = startTouch.y - currentTouch.y;\n      if (isPush && pushOffset && touchesDiff > 0) {\n        touchesDiff = 0;\n      }\n      var direction = touchesDiff < 0 ? 'to-bottom' : 'to-top';\n      $el.transition(0);\n      if (typeof popup.params.swipeToClose === 'string' && direction !== popup.params.swipeToClose) {\n        $el.transform('');\n        $el.transition('');\n        return;\n      }\n      if (!isMoved) {\n        if (isPush && pushOffset) {\n          popupHeight = $el[0].offsetHeight;\n          $pushEl = $el.prevAll('.popup.modal-in').eq(0);\n          if ($pushEl.length === 0) {\n            $pushEl = app.root.children('.view, .views');\n          }\n        }\n        if (pageContentEl) {\n          pageContentScrollTop = pageContentEl.scrollTop;\n          pageContentScrollHeight = pageContentEl.scrollHeight;\n          pageContentOffsetHeight = pageContentEl.offsetHeight;\n          if (!(pageContentScrollHeight === pageContentOffsetHeight) && !(direction === 'to-bottom' && pageContentScrollTop === 0) && !(direction === 'to-top' && pageContentScrollTop === pageContentScrollHeight - pageContentOffsetHeight)) {\n            $el.transform('');\n            $el.transition('');\n            isTouched = false;\n            isMoved = false;\n            return;\n          }\n        }\n        isMoved = true;\n        popup.emit('local::swipeStart popupSwipeStart', popup);\n        popup.$el.trigger('popup:swipestart');\n      } else {\n        popup.emit('local::swipeMove popupSwipeMove', popup);\n        popup.$el.trigger('popup:swipemove');\n      }\n      e.preventDefault();\n      if (isPush && pushOffset) {\n        var pushProgress = 1 - Math.abs(touchesDiff / popupHeight);\n        var scale = 1 - (1 - pushViewScale(pushOffset)) * pushProgress;\n        if ($pushEl.hasClass('popup')) {\n          if ($pushEl.hasClass('popup-push')) {\n            $pushEl.transition(0).transform(\"translate3d(0, calc(-1 * \".concat(pushProgress, \" * (var(--f7-popup-push-offset) + 10px)) , 0px) scale(\").concat(scale, \")\"));\n          } else {\n            $pushEl.transition(0).transform(\"translate3d(0, 0px , 0px) scale(\".concat(scale, \")\"));\n          }\n        } else {\n          $pushEl.transition(0).transform(\"translate3d(0,0,0) scale(\".concat(scale, \")\"));\n        }\n      }\n      $el.transition(0).transform(\"translate3d(0,\".concat(-touchesDiff, \"px,0)\"));\n    }\n    function handleTouchEnd() {\n      isTouched = false;\n      if (!isMoved) {\n        return;\n      }\n      popup.emit('local::swipeEnd popupSwipeEnd', popup);\n      popup.$el.trigger('popup:swipeend');\n      isMoved = false;\n      allowSwipeToClose = false;\n      $el.transition('');\n      if (isPush && pushOffset) {\n        $pushEl.transition('').transform('');\n      }\n      var direction = touchesDiff <= 0 ? 'to-bottom' : 'to-top';\n      if (typeof popup.params.swipeToClose === 'string' && direction !== popup.params.swipeToClose) {\n        $el.transform('');\n        allowSwipeToClose = true;\n        return;\n      }\n      var diff = Math.abs(touchesDiff);\n      var timeDiff = new Date().getTime() - touchStartTime;\n      if (timeDiff < 300 && diff > 20 || timeDiff >= 300 && diff > 100) {\n        utils[\"default\"].nextTick(function () {\n          if (direction === 'to-bottom') {\n            $el.addClass('swipe-close-to-bottom');\n          } else {\n            $el.addClass('swipe-close-to-top');\n          }\n          $el.transform('');\n          popup.emit('local::swipeclose popupSwipeClose', popup);\n          popup.$el.trigger('popup:swipeclose');\n          popup.close();\n          allowSwipeToClose = true;\n        });\n        return;\n      }\n      allowSwipeToClose = true;\n      $el.transform('');\n    }\n    var passive = utils_support[\"default\"].passiveListener ? {\n      passive: true\n    } : false;\n    if (popup.params.swipeToClose) {\n      $el.on(app.touchEvents.start, handleTouchStart, passive);\n      app.on('touchmove', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n      popup.once('popupDestroy', function () {\n        $el.off(app.touchEvents.start, handleTouchStart, passive);\n        app.off('touchmove', handleTouchMove);\n        app.off('touchend:passive', handleTouchEnd);\n      });\n    }\n    var hasPreviousPushPopup;\n    popup.on('open', function () {\n      hasPreviousPushPopup = false;\n      if (popup.params.closeOnEscape) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('keydown', onKeyDown);\n      }\n      $el.prevAll('.popup.modal-in').addClass('popup-behind');\n      if (popup.push) {\n        isPush = popup.push && (app.width < 630 || app.height < 630 || $el.hasClass('popup-tablet-fullscreen'));\n      }\n      if (isPush) {\n        pushOffset = parseInt($el.css('--f7-popup-push-offset'), 10);\n        if (Number.isNaN(pushOffset)) pushOffset = 0;\n        if (pushOffset) {\n          $el.addClass('popup-push');\n          popup.$htmlEl.addClass('with-modal-popup-push');\n          popup.$htmlEl[0].style.setProperty('--f7-popup-push-scale', pushViewScale(pushOffset));\n        }\n      }\n    });\n    popup.on('opened', function () {\n      $el.removeClass('swipe-close-to-bottom swipe-close-to-top');\n      if (popup.params.closeByBackdropClick) {\n        app.on('click', handleClick);\n      }\n    });\n    popup.on('close', function () {\n      hasPreviousPushPopup = popup.$el.prevAll('.popup-push.modal-in').length > 0;\n      if (popup.params.closeOnEscape) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('keydown', onKeyDown);\n      }\n      if (popup.params.closeByBackdropClick) {\n        app.off('click', handleClick);\n      }\n      $el.prevAll('.popup.modal-in').eq(0).removeClass('popup-behind');\n      if (isPush && pushOffset && !hasPreviousPushPopup) {\n        popup.$htmlEl.removeClass('with-modal-popup-push');\n        popup.$htmlEl.addClass('with-modal-popup-push-closing');\n      }\n    });\n    popup.on('closed', function () {\n      if (isPush && pushOffset && !hasPreviousPushPopup) {\n        popup.$htmlEl.removeClass('with-modal-popup-push-closing');\n        popup.$htmlEl[0].style.removeProperty('--f7-popup-push-scale');\n      }\n    });\n    $el[0].f7Modal = popup;\n    return possibleConstructorReturn_default()(_this, popup);\n  }\n  inherits_default()(Popup, _Modal);\n  return createClass_default()(Popup);\n}(modal_class);\n/* harmony default export */ var popup_class = (popup_class_Popup);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/popup/popup.js\n\n\n/* harmony default export */ var popup_popup = ({\n  name: 'popup',\n  params: {\n    popup: {\n      backdrop: true,\n      backdropEl: undefined,\n      closeByBackdropClick: true,\n      closeOnEscape: false,\n      swipeToClose: false,\n      swipeHandler: null,\n      push: false\n    }\n  },\n  static: {\n    Popup: popup_class\n  },\n  create: function create() {\n    var app = this;\n    app.popup = modal_methods({\n      app: app,\n      constructor: popup_class,\n      defaultSelector: '.popup.modal-in',\n      parentSelector: '.popup'\n    });\n  },\n  clicks: {\n    '.popup-open': function openPopup($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.popup.open(data.popup, data.animate, $clickedEl);\n    },\n    '.popup-close': function closePopup($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.popup.close(data.popup, data.animate, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/login-screen/login-screen-class.js\n\n\n\n\n\nfunction login_screen_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, login_screen_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction login_screen_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (login_screen_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar login_screen_class_LoginScreen = /*#__PURE__*/function (_Modal) {\n  function LoginScreen(app, params) {\n    var _this;\n    classCallCheck_default()(this, LoginScreen);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, params);\n\n    // Extends with open/close Modal methods;\n    _this = login_screen_class_callSuper(this, LoginScreen, [app, extendedParams]);\n    var loginScreen = _this;\n    loginScreen.params = extendedParams;\n\n    // Find Element\n    var $el;\n    if (!loginScreen.params.el) {\n      $el = Object(dom7_module[\"default\"])(loginScreen.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    } else {\n      $el = Object(dom7_module[\"default\"])(loginScreen.params.el).eq(0);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, loginScreen.destroy());\n    }\n    utils[\"default\"].extend(loginScreen, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      type: 'loginScreen'\n    });\n    $el[0].f7Modal = loginScreen;\n    return possibleConstructorReturn_default()(_this, loginScreen);\n  }\n  inherits_default()(LoginScreen, _Modal);\n  return createClass_default()(LoginScreen);\n}(modal_class);\n/* harmony default export */ var login_screen_class = (login_screen_class_LoginScreen);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/login-screen/login-screen.js\n\n\n/* harmony default export */ var login_screen = ({\n  name: 'loginScreen',\n  static: {\n    LoginScreen: login_screen_class\n  },\n  create: function create() {\n    var app = this;\n    app.loginScreen = modal_methods({\n      app: app,\n      constructor: login_screen_class,\n      defaultSelector: '.login-screen.modal-in'\n    });\n  },\n  clicks: {\n    '.login-screen-open': function openLoginScreen($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.loginScreen.open(data.loginScreen, data.animate, $clickedEl);\n    },\n    '.login-screen-close': function closeLoginScreen($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.loginScreen.close(data.loginScreen, data.animate, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/popover/popover-class.js\n\n\n\n\n\nfunction popover_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, popover_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction popover_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (popover_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar popover_class_Popover = /*#__PURE__*/function (_Modal) {\n  function Popover(app, params) {\n    var _this;\n    classCallCheck_default()(this, Popover);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.popover, params);\n\n    // Extends with open/close Modal methods;\n    _this = popover_class_callSuper(this, Popover, [app, extendedParams]);\n    var popover = _this;\n    popover.params = extendedParams;\n\n    // Find Element\n    var $el;\n    if (!popover.params.el) {\n      $el = Object(dom7_module[\"default\"])(popover.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    } else {\n      $el = Object(dom7_module[\"default\"])(popover.params.el).eq(0);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n\n    // Find Target\n    var $targetEl = Object(dom7_module[\"default\"])(popover.params.targetEl).eq(0);\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, popover.destroy());\n    }\n\n    // Backdrop\n    var $backdropEl;\n    if (popover.params.backdrop && popover.params.backdropEl) {\n      $backdropEl = Object(dom7_module[\"default\"])(popover.params.backdropEl);\n    } else if (popover.params.backdrop) {\n      $backdropEl = app.root.children('.popover-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"popover-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n\n    // Find Angle\n    var $angleEl;\n    if ($el.find('.popover-angle').length === 0) {\n      $angleEl = Object(dom7_module[\"default\"])('<div class=\"popover-angle\"></div>');\n      $el.prepend($angleEl);\n    } else {\n      $angleEl = $el.find('.popover-angle');\n    }\n\n    // Open\n    var originalOpen = popover.open;\n    utils[\"default\"].extend(popover, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $targetEl: $targetEl,\n      targetEl: $targetEl[0],\n      $angleEl: $angleEl,\n      angleEl: $angleEl[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'popover',\n      open: function open() {\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        var targetEl = args[0],\n          animate = args[1];\n        if (typeof args[0] === 'boolean') {\n          animate = args[0];\n          targetEl = args[1];\n        }\n        if (targetEl) {\n          popover.$targetEl = Object(dom7_module[\"default\"])(targetEl);\n          popover.targetEl = popover.$targetEl[0];\n        }\n        return originalOpen.call(popover, animate);\n      }\n    });\n    function handleResize() {\n      popover.resize();\n    }\n    popover.on('popoverOpen', function () {\n      popover.resize();\n      app.on('resize', handleResize);\n      Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).on('keyboardDidShow keyboardDidHide', handleResize);\n      popover.on('popoverClose popoverBeforeDestroy', function () {\n        app.off('resize', handleResize);\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).off('keyboardDidShow keyboardDidHide', handleResize);\n      });\n    });\n    function handleClick(e) {\n      var target = e.target;\n      var $target = Object(dom7_module[\"default\"])(target);\n      var keyboardOpened = !app.device.desktop && app.device.cordova && (ssr_window_esm[\"window\"].Keyboard && ssr_window_esm[\"window\"].Keyboard.isVisible || ssr_window_esm[\"window\"].cordova.plugins && ssr_window_esm[\"window\"].cordova.plugins.Keyboard && ssr_window_esm[\"window\"].cordova.plugins.Keyboard.isVisible);\n      if (keyboardOpened) return;\n      if ($target.closest(popover.el).length === 0) {\n        if (popover.params.closeByBackdropClick && popover.params.backdrop && popover.backdropEl && popover.backdropEl === target) {\n          popover.close();\n        } else if (popover.params.closeByOutsideClick) {\n          popover.close();\n        }\n      }\n    }\n    function onKeyDown(e) {\n      var keyCode = e.keyCode;\n      if (keyCode === 27 && popover.params.closeOnEscape) {\n        popover.close();\n      }\n    }\n    if (popover.params.closeOnEscape) {\n      popover.on('popoverOpen', function () {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('keydown', onKeyDown);\n      });\n      popover.on('popoverClose', function () {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('keydown', onKeyDown);\n      });\n    }\n    popover.on('popoverOpened', function () {\n      if (popover.params.closeByOutsideClick || popover.params.closeByBackdropClick) {\n        app.on('click', handleClick);\n      }\n    });\n    popover.on('popoverClose', function () {\n      if (popover.params.closeByOutsideClick || popover.params.closeByBackdropClick) {\n        app.off('click', handleClick);\n      }\n    });\n    $el[0].f7Modal = popover;\n    return possibleConstructorReturn_default()(_this, popover);\n  }\n  inherits_default()(Popover, _Modal);\n  return createClass_default()(Popover, [{\n    key: \"resize\",\n    value: function resize() {\n      var popover = this;\n      var app = popover.app,\n        $el = popover.$el,\n        $targetEl = popover.$targetEl,\n        $angleEl = popover.$angleEl;\n      var _popover$params = popover.params,\n        targetX = _popover$params.targetX,\n        targetY = _popover$params.targetY;\n      $el.css({\n        left: '',\n        top: ''\n      });\n      var _ref = [$el.width(), $el.height()],\n        width = _ref[0],\n        height = _ref[1];\n      var angleSize = 0;\n      var angleLeft;\n      var angleTop;\n      if (app.theme === 'ios' || app.theme === 'aurora') {\n        $angleEl.removeClass('on-left on-right on-top on-bottom').css({\n          left: '',\n          top: ''\n        });\n        angleSize = $angleEl.width() / 2;\n      } else {\n        $el.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom popover-on-middle').css({\n          left: '',\n          top: ''\n        });\n      }\n      var targetWidth;\n      var targetHeight;\n      var targetOffsetLeft;\n      var targetOffsetTop;\n      var safeAreaTop = parseInt(Object(dom7_module[\"default\"])('html').css('--f7-safe-area-top'), 10);\n      if (Number.isNaN(safeAreaTop)) safeAreaTop = 0;\n      if ($targetEl && $targetEl.length > 0) {\n        targetWidth = $targetEl.outerWidth();\n        targetHeight = $targetEl.outerHeight();\n        var targetOffset = $targetEl.offset();\n        targetOffsetLeft = targetOffset.left - app.left;\n        targetOffsetTop = targetOffset.top - app.top;\n        var targetParentPage = $targetEl.parents('.page');\n        if (targetParentPage.length > 0) {\n          targetOffsetTop -= targetParentPage[0].scrollTop;\n        }\n      } else if (typeof targetX !== 'undefined' && targetY !== 'undefined') {\n        targetOffsetLeft = targetX;\n        targetOffsetTop = targetY;\n        targetWidth = popover.params.targetWidth || 0;\n        targetHeight = popover.params.targetHeight || 0;\n      }\n      var left = 0,\n        top = 0,\n        diff = 0;\n      // Top Position\n      var position = app.theme === 'md' ? 'bottom' : 'top';\n      if (app.theme === 'md') {\n        if (height < app.height - targetOffsetTop - targetHeight) {\n          // On bottom\n          position = 'bottom';\n          top = targetOffsetTop + targetHeight;\n        } else if (height < targetOffsetTop - safeAreaTop) {\n          // On top\n          top = targetOffsetTop - height;\n          position = 'top';\n        } else {\n          // On middle\n          position = 'middle';\n          top = targetHeight / 2 + targetOffsetTop - height / 2;\n        }\n        top = Math.max(8, Math.min(top, app.height - height - 8));\n\n        // Horizontal Position\n        var hPosition;\n        if (targetOffsetLeft < app.width / 2) {\n          hPosition = 'right';\n          left = position === 'middle' ? targetOffsetLeft + targetWidth : targetOffsetLeft;\n        } else {\n          hPosition = 'left';\n          left = position === 'middle' ? targetOffsetLeft - width : targetOffsetLeft + targetWidth - width;\n        }\n        left = Math.max(8, Math.min(left, app.width - width - 8));\n        $el.addClass(\"popover-on-\".concat(position, \" popover-on-\").concat(hPosition));\n      } else {\n        // ios and aurora\n        if (height + angleSize < targetOffsetTop - safeAreaTop) {\n          // On top\n          top = targetOffsetTop - height - angleSize;\n        } else if (height + angleSize < app.height - targetOffsetTop - targetHeight) {\n          // On bottom\n          position = 'bottom';\n          top = targetOffsetTop + targetHeight + angleSize;\n        } else {\n          // On middle\n          position = 'middle';\n          top = targetHeight / 2 + targetOffsetTop - height / 2;\n          diff = top;\n          top = Math.max(5, Math.min(top, app.height - height - 5));\n          diff -= top;\n        }\n\n        // Horizontal Position\n        if (position === 'top' || position === 'bottom') {\n          left = targetWidth / 2 + targetOffsetLeft - width / 2;\n          diff = left;\n          left = Math.max(5, Math.min(left, app.width - width - 5));\n          if (position === 'top') {\n            $angleEl.addClass('on-bottom');\n          }\n          if (position === 'bottom') {\n            $angleEl.addClass('on-top');\n          }\n          diff -= left;\n          angleLeft = width / 2 - angleSize + diff;\n          angleLeft = Math.max(Math.min(angleLeft, width - angleSize * 2 - 13), 13);\n          $angleEl.css({\n            left: \"\".concat(angleLeft, \"px\")\n          });\n        } else if (position === 'middle') {\n          left = targetOffsetLeft - width - angleSize;\n          $angleEl.addClass('on-right');\n          if (left < 5 || left + width > app.width) {\n            if (left < 5) left = targetOffsetLeft + targetWidth + angleSize;\n            if (left + width > app.width) left = app.width - width - 5;\n            $angleEl.removeClass('on-right').addClass('on-left');\n          }\n          angleTop = height / 2 - angleSize + diff;\n          angleTop = Math.max(Math.min(angleTop, height - angleSize * 2 - 13), 13);\n          $angleEl.css({\n            top: \"\".concat(angleTop, \"px\")\n          });\n        }\n      }\n\n      // Apply Styles\n      $el.css({\n        top: \"\".concat(top, \"px\"),\n        left: \"\".concat(left, \"px\")\n      });\n    }\n  }]);\n}(modal_class);\n/* harmony default export */ var popover_class = (popover_class_Popover);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/popover/popover.js\n\n\n\n\n/* harmony default export */ var popover_popover = ({\n  name: 'popover',\n  params: {\n    popover: {\n      backdrop: true,\n      backdropEl: undefined,\n      closeByBackdropClick: true,\n      closeByOutsideClick: true,\n      closeOnEscape: false\n    }\n  },\n  static: {\n    Popover: popover_class\n  },\n  create: function create() {\n    var app = this;\n    app.popover = utils[\"default\"].extend(modal_methods({\n      app: app,\n      constructor: popover_class,\n      defaultSelector: '.popover.modal-in'\n    }), {\n      open: function open(popoverEl, targetEl, animate) {\n        var $popoverEl = Object(dom7_module[\"default\"])(popoverEl);\n        if ($popoverEl.length > 1) {\n          // check if same popover in other page\n          var $targetPage = Object(dom7_module[\"default\"])(targetEl).parents('.page');\n          if ($targetPage.length) {\n            $popoverEl.each(function (index, el) {\n              var $el = Object(dom7_module[\"default\"])(el);\n              if ($el.parents($targetPage)[0] === $targetPage[0]) {\n                $popoverEl = $el;\n              }\n            });\n          }\n        }\n        if ($popoverEl.length > 1) {\n          $popoverEl = $popoverEl.eq($popoverEl.length - 1);\n        }\n        var popover = $popoverEl[0].f7Modal;\n        var data = $popoverEl.dataset();\n        if (!popover) {\n          popover = new popover_class(app, Object.assign({\n            el: $popoverEl,\n            targetEl: targetEl\n          }, data));\n        }\n        return popover.open(targetEl, animate);\n      }\n    });\n  },\n  clicks: {\n    '.popover-open': function openPopover($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.popover.open(data.popover, $clickedEl, data.animate);\n    },\n    '.popover-close': function closePopover($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.popover.close(data.popover, data.animate, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/actions/actions-class.js\n\n\n\n\n\nfunction actions_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, actions_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction actions_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (actions_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint indent: [\"off\"] */\n\n\n\n\nvar actions_class_Actions = /*#__PURE__*/function (_Modal) {\n  function Actions(app, params) {\n    var _this;\n    classCallCheck_default()(this, Actions);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.actions, params);\n\n    // Extends with open/close Modal methods;\n    _this = actions_class_callSuper(this, Actions, [app, extendedParams]);\n    var actions = _this;\n    actions.params = extendedParams;\n\n    // Buttons\n    var groups;\n    if (actions.params.buttons) {\n      groups = actions.params.buttons;\n      if (!Array.isArray(groups[0])) groups = [groups];\n    }\n    actions.groups = groups;\n\n    // Find Element\n    var $el;\n    if (actions.params.el) {\n      $el = Object(dom7_module[\"default\"])(actions.params.el).eq(0);\n    } else if (actions.params.content) {\n      $el = Object(dom7_module[\"default\"])(actions.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    } else if (actions.params.buttons) {\n      if (actions.params.convertToPopover) {\n        actions.popoverHtml = actions.renderPopover();\n      }\n      actions.actionsHtml = actions.render();\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el && $el.length === 0 && !(actions.actionsHtml || actions.popoverHtml)) {\n      return possibleConstructorReturn_default()(_this, actions.destroy());\n    }\n\n    // Backdrop\n    var $backdropEl;\n    if (actions.params.backdrop && actions.params.backdropEl) {\n      $backdropEl = Object(dom7_module[\"default\"])(actions.params.backdropEl);\n    } else if (actions.params.backdrop) {\n      $backdropEl = app.root.children('.actions-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"actions-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n    var originalOpen = actions.open;\n    var originalClose = actions.close;\n    var popover;\n    function buttonOnClick(e) {\n      var $buttonEl = Object(dom7_module[\"default\"])(this);\n      var buttonIndex;\n      var groupIndex;\n      if ($buttonEl.hasClass('list-button') || $buttonEl.hasClass('item-link')) {\n        buttonIndex = $buttonEl.parents('li').index();\n        groupIndex = $buttonEl.parents('.list').index();\n      } else {\n        buttonIndex = $buttonEl.index();\n        groupIndex = $buttonEl.parents('.actions-group').index();\n      }\n      if (typeof groups !== 'undefined') {\n        var button = groups[groupIndex][buttonIndex];\n        if (button.onClick) button.onClick(actions, e);\n        if (actions.params.onClick) actions.params.onClick(actions, e);\n        if (button.close !== false) actions.close();\n      }\n    }\n    actions.open = function open(animate) {\n      var convertToPopover = false;\n      var _actions$params = actions.params,\n        targetEl = _actions$params.targetEl,\n        targetX = _actions$params.targetX,\n        targetY = _actions$params.targetY,\n        targetWidth = _actions$params.targetWidth,\n        targetHeight = _actions$params.targetHeight;\n      if (actions.params.convertToPopover && (targetEl || targetX !== undefined && targetY !== undefined)) {\n        // Popover\n        if (actions.params.forceToPopover || app.device.ios && app.device.ipad || app.width >= 768 || app.device.desktop && app.theme === 'aurora') {\n          convertToPopover = true;\n        }\n      }\n      if (convertToPopover && actions.popoverHtml) {\n        popover = app.popover.create({\n          content: actions.popoverHtml,\n          backdrop: actions.params.backdrop,\n          targetEl: targetEl,\n          targetX: targetX,\n          targetY: targetY,\n          targetWidth: targetWidth,\n          targetHeight: targetHeight,\n          on: {\n            open: function open() {\n              if (!actions.$el) {\n                actions.$el = popover.$el;\n              }\n              actions.$el.trigger(\"modal:open \".concat(actions.type.toLowerCase(), \":open\"));\n              actions.emit(\"local::open modalOpen \".concat(actions.type, \"Open\"), actions);\n            },\n            opened: function opened() {\n              if (!actions.$el) {\n                actions.$el = popover.$el;\n              }\n              actions.$el.trigger(\"modal:opened \".concat(actions.type.toLowerCase(), \":opened\"));\n              actions.emit(\"local::opened modalOpened \".concat(actions.type, \"Opened\"), actions);\n            },\n            close: function close() {\n              if (!actions.$el) {\n                actions.$el = popover.$el;\n              }\n              actions.$el.trigger(\"modal:close \".concat(actions.type.toLowerCase(), \":close\"));\n              actions.emit(\"local::close modalClose \".concat(actions.type, \"Close\"), actions);\n            },\n            closed: function closed() {\n              if (!actions.$el) {\n                actions.$el = popover.$el;\n              }\n              actions.$el.trigger(\"modal:closed \".concat(actions.type.toLowerCase(), \":closed\"));\n              actions.emit(\"local::closed modalClosed \".concat(actions.type, \"Closed\"), actions);\n            }\n          }\n        });\n        popover.open(animate);\n        popover.once('popoverOpened', function () {\n          popover.$el.find('.list-button, .item-link').each(function (groupIndex, buttonEl) {\n            Object(dom7_module[\"default\"])(buttonEl).on('click', buttonOnClick);\n          });\n        });\n        popover.once('popoverClosed', function () {\n          popover.$el.find('.list-button, .item-link').each(function (groupIndex, buttonEl) {\n            Object(dom7_module[\"default\"])(buttonEl).off('click', buttonOnClick);\n          });\n          utils[\"default\"].nextTick(function () {\n            popover.destroy();\n            popover = undefined;\n          });\n        });\n      } else {\n        actions.$el = actions.actionsHtml ? Object(dom7_module[\"default\"])(actions.actionsHtml) : actions.$el;\n        actions.$el[0].f7Modal = actions;\n        if (actions.groups) {\n          actions.$el.find('.actions-button').each(function (groupIndex, buttonEl) {\n            Object(dom7_module[\"default\"])(buttonEl).on('click', buttonOnClick);\n          });\n          actions.once('actionsClosed', function () {\n            actions.$el.find('.actions-button').each(function (groupIndex, buttonEl) {\n              Object(dom7_module[\"default\"])(buttonEl).off('click', buttonOnClick);\n            });\n          });\n        }\n        actions.el = actions.$el[0];\n        originalOpen.call(actions, animate);\n      }\n      return actions;\n    };\n    actions.close = function close(animate) {\n      if (popover) {\n        popover.close(animate);\n      } else {\n        originalClose.call(actions, animate);\n      }\n      return actions;\n    };\n    utils[\"default\"].extend(actions, {\n      app: app,\n      $el: $el,\n      el: $el ? $el[0] : undefined,\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'actions'\n    });\n    function handleClick(e) {\n      var target = e.target;\n      var $target = Object(dom7_module[\"default\"])(target);\n      var keyboardOpened = !app.device.desktop && app.device.cordova && (ssr_window_esm[\"window\"].Keyboard && ssr_window_esm[\"window\"].Keyboard.isVisible || ssr_window_esm[\"window\"].cordova.plugins && ssr_window_esm[\"window\"].cordova.plugins.Keyboard && ssr_window_esm[\"window\"].cordova.plugins.Keyboard.isVisible);\n      if (keyboardOpened) return;\n      if ($target.closest(actions.el).length === 0) {\n        if (actions.params.closeByBackdropClick && actions.params.backdrop && actions.backdropEl && actions.backdropEl === target) {\n          actions.close();\n        } else if (actions.params.closeByOutsideClick) {\n          actions.close();\n        }\n      }\n    }\n    function onKeyDown(e) {\n      var keyCode = e.keyCode;\n      if (keyCode === 27 && actions.params.closeOnEscape) {\n        actions.close();\n      }\n    }\n    if (actions.params.closeOnEscape) {\n      actions.on('open', function () {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('keydown', onKeyDown);\n      });\n      actions.on('close', function () {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('keydown', onKeyDown);\n      });\n    }\n    actions.on('opened', function () {\n      if (actions.params.closeByBackdropClick || actions.params.closeByOutsideClick) {\n        app.on('click', handleClick);\n      }\n    });\n    actions.on('close', function () {\n      if (actions.params.closeByBackdropClick || actions.params.closeByOutsideClick) {\n        app.off('click', handleClick);\n      }\n    });\n    if ($el) {\n      $el[0].f7Modal = actions;\n    }\n    return possibleConstructorReturn_default()(_this, actions);\n  }\n  inherits_default()(Actions, _Modal);\n  return createClass_default()(Actions, [{\n    key: \"render\",\n    value: function render() {\n      var actions = this;\n      if (actions.params.render) return actions.params.render.call(actions, actions);\n      var groups = actions.groups;\n      var cssClass = actions.params.cssClass;\n      return \"\\n      <div class=\\\"actions-modal\".concat(actions.params.grid ? ' actions-grid' : '', \" \").concat(cssClass || '', \"\\\">\\n        \").concat(groups.map(function (group) {\n        return \"<div class=\\\"actions-group\\\">\\n            \".concat(group.map(function (button) {\n          var buttonClasses = [\"actions-\".concat(button.label ? 'label' : 'button')];\n          var color = button.color,\n            bg = button.bg,\n            bold = button.bold,\n            disabled = button.disabled,\n            label = button.label,\n            text = button.text,\n            icon = button.icon;\n          if (color) buttonClasses.push(\"color-\".concat(color));\n          if (bg) buttonClasses.push(\"bg-color-\".concat(bg));\n          if (bold) buttonClasses.push('actions-button-bold');\n          if (disabled) buttonClasses.push('disabled');\n          if (label) {\n            return \"<div class=\\\"\".concat(buttonClasses.join(' '), \"\\\">\").concat(text, \"</div>\");\n          }\n          return \"\\n                <div class=\\\"\".concat(buttonClasses.join(' '), \"\\\">\\n                  \").concat(icon ? \"<div class=\\\"actions-button-media\\\">\".concat(icon, \"</div>\") : '', \"\\n                  <div class=\\\"actions-button-text\\\">\").concat(text, \"</div>\\n                </div>\").trim();\n        }).join(''), \"\\n          </div>\");\n      }).join(''), \"\\n      </div>\\n    \").trim();\n    }\n  }, {\n    key: \"renderPopover\",\n    value: function renderPopover() {\n      var actions = this;\n      if (actions.params.renderPopover) return actions.params.renderPopover.call(actions, actions);\n      var groups = actions.groups;\n      var cssClass = actions.params.cssClass;\n      return \"\\n      <div class=\\\"popover popover-from-actions \".concat(cssClass || '', \"\\\">\\n        <div class=\\\"popover-inner\\\">\\n          \").concat(groups.map(function (group) {\n        return \"\\n            <div class=\\\"list\\\">\\n              <ul>\\n                \".concat(group.map(function (button) {\n          var itemClasses = [];\n          var color = button.color,\n            bg = button.bg,\n            bold = button.bold,\n            disabled = button.disabled,\n            label = button.label,\n            text = button.text,\n            icon = button.icon;\n          if (color) itemClasses.push(\"color-\".concat(color));\n          if (bg) itemClasses.push(\"bg-color-\".concat(bg));\n          if (bold) itemClasses.push('popover-from-actions-bold');\n          if (disabled) itemClasses.push('disabled');\n          if (label) {\n            itemClasses.push('popover-from-actions-label');\n            return \"<li class=\\\"\".concat(itemClasses.join(' '), \"\\\">\").concat(text, \"</li>\");\n          }\n          if (icon) {\n            itemClasses.push('item-link item-content');\n            return \"\\n                      <li>\\n                        <a class=\\\"\".concat(itemClasses.join(' '), \"\\\">\\n                          <div class=\\\"item-media\\\">\\n                            \").concat(icon, \"\\n                          </div>\\n                          <div class=\\\"item-inner\\\">\\n                            <div class=\\\"item-title\\\">\\n                              \").concat(text, \"\\n                            </div>\\n                          </div>\\n                        </a>\\n                      </li>\\n                    \");\n          }\n          itemClasses.push('list-button');\n          return \"\\n                    <li>\\n                      <a class=\\\"\".concat(itemClasses.join(' '), \"\\\">\").concat(text, \"</a>\\n                    </li>\\n                  \");\n        }).join(''), \"\\n              </ul>\\n            </div>\\n          \");\n      }).join(''), \"\\n        </div>\\n      </div>\\n    \").trim();\n    }\n  }]);\n}(modal_class);\n/* harmony default export */ var actions_class = (actions_class_Actions);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/actions/actions.js\n\n\n/* harmony default export */ var actions_actions = ({\n  name: 'actions',\n  params: {\n    actions: {\n      convertToPopover: true,\n      forceToPopover: false,\n      backdrop: true,\n      backdropEl: undefined,\n      cssClass: null,\n      closeByBackdropClick: true,\n      closeOnEscape: false,\n      render: null,\n      renderPopover: null\n    }\n  },\n  static: {\n    Actions: actions_class\n  },\n  create: function create() {\n    var app = this;\n    app.actions = modal_methods({\n      app: app,\n      constructor: actions_class,\n      defaultSelector: '.actions-modal.modal-in'\n    });\n  },\n  clicks: {\n    '.actions-open': function openActions($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.actions.open(data.actions, data.animate, $clickedEl);\n    },\n    '.actions-close': function closeActions($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.actions.close(data.actions, data.animate, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/sheet/sheet-class.js\n\n\n\n\n\nfunction sheet_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, sheet_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction sheet_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (sheet_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar sheet_class_Sheet = /*#__PURE__*/function (_Modal) {\n  function Sheet(app, params) {\n    var _this;\n    classCallCheck_default()(this, Sheet);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.sheet, params);\n\n    // Extends with open/close Modal methods;\n    _this = sheet_class_callSuper(this, Sheet, [app, extendedParams]);\n    var sheet = _this;\n    sheet.params = extendedParams;\n    if (typeof sheet.params.backdrop === 'undefined') {\n      sheet.params.backdrop = app.theme !== 'ios';\n    }\n\n    // Find Element\n    var $el;\n    if (!sheet.params.el) {\n      $el = Object(dom7_module[\"default\"])(sheet.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    } else {\n      $el = Object(dom7_module[\"default\"])(sheet.params.el).eq(0);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, sheet.destroy());\n    }\n    var $backdropEl;\n    if (sheet.params.backdrop && sheet.params.backdropEl) {\n      $backdropEl = Object(dom7_module[\"default\"])(sheet.params.backdropEl);\n    } else if (sheet.params.backdrop) {\n      $backdropEl = app.root.children('.sheet-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"sheet-backdrop\"></div>');\n        app.root.append($backdropEl);\n      }\n    }\n    utils[\"default\"].extend(sheet, {\n      app: app,\n      push: $el.hasClass('sheet-modal-push') || sheet.params.push,\n      $el: $el,\n      el: $el[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      type: 'sheet',\n      $htmlEl: Object(dom7_module[\"default\"])('html')\n    });\n    if (sheet.params.push) {\n      $el.addClass('sheet-modal-push');\n    }\n    var $pageContentEl;\n    function scrollToElementOnOpen() {\n      var $scrollEl = Object(dom7_module[\"default\"])(sheet.params.scrollToEl).eq(0);\n      if ($scrollEl.length === 0) return;\n      $pageContentEl = $scrollEl.parents('.page-content');\n      if ($pageContentEl.length === 0) return;\n      var paddingTop = parseInt($pageContentEl.css('padding-top'), 10);\n      var paddingBottom = parseInt($pageContentEl.css('padding-bottom'), 10);\n      var pageHeight = $pageContentEl[0].offsetHeight - paddingTop - $el.height();\n      var pageScrollHeight = $pageContentEl[0].scrollHeight - paddingTop - $el.height();\n      var pageScroll = $pageContentEl.scrollTop();\n      var newPaddingBottom;\n      var scrollElTop = $scrollEl.offset().top - paddingTop + $scrollEl[0].offsetHeight;\n      if (scrollElTop > pageHeight) {\n        var scrollTop = pageScroll + scrollElTop - pageHeight;\n        if (scrollTop + pageHeight > pageScrollHeight) {\n          newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n          if (pageHeight === pageScrollHeight) {\n            newPaddingBottom = $el.height();\n          }\n          $pageContentEl.css({\n            'padding-bottom': \"\".concat(newPaddingBottom, \"px\")\n          });\n        }\n        $pageContentEl.scrollTop(scrollTop, 300);\n      }\n    }\n    function scrollToElementOnClose() {\n      if ($pageContentEl && $pageContentEl.length > 0) {\n        $pageContentEl.css({\n          'padding-bottom': ''\n        });\n      }\n    }\n    function handleClick(e) {\n      var target = e.target;\n      var $target = Object(dom7_module[\"default\"])(target);\n      var keyboardOpened = !app.device.desktop && app.device.cordova && (ssr_window_esm[\"window\"].Keyboard && ssr_window_esm[\"window\"].Keyboard.isVisible || ssr_window_esm[\"window\"].cordova.plugins && ssr_window_esm[\"window\"].cordova.plugins.Keyboard && ssr_window_esm[\"window\"].cordova.plugins.Keyboard.isVisible);\n      if (keyboardOpened) return;\n      if ($target.closest(sheet.el).length === 0) {\n        if (sheet.params.closeByBackdropClick && sheet.params.backdrop && sheet.backdropEl && sheet.backdropEl === target) {\n          sheet.close();\n        } else if (sheet.params.closeByOutsideClick) {\n          sheet.close();\n        }\n      }\n    }\n    function onKeyDown(e) {\n      var keyCode = e.keyCode;\n      if (keyCode === 27 && sheet.params.closeOnEscape) {\n        sheet.close();\n      }\n    }\n    var pushOffset;\n    function pushViewScale(offset) {\n      return (app.height - offset * 2) / app.height;\n    }\n    var isTouched = false;\n    var startTouch;\n    var currentTouch;\n    var isScrolling;\n    var touchStartTime;\n    var touchesDiff;\n    var isMoved = false;\n    var isTopSheetModal;\n    var swipeStepTranslate;\n    var startTranslate;\n    var currentTranslate;\n    var sheetElOffsetHeight;\n    var minTranslate;\n    var maxTranslate;\n    var $pushViewEl;\n    var pushBorderRadius;\n    var sheetPageContentEl;\n    var sheetPageContentScrollTop;\n    var sheetPageContentScrollHeight;\n    var sheetPageContentOffsetHeight;\n    function handleTouchStart(e) {\n      if (isTouched || !(sheet.params.swipeToClose || sheet.params.swipeToStep)) return;\n      if (sheet.params.swipeHandler && Object(dom7_module[\"default\"])(e.target).closest(sheet.params.swipeHandler).length === 0) {\n        return;\n      }\n      isTouched = true;\n      isMoved = false;\n      startTouch = {\n        x: e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX,\n        y: e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY\n      };\n      touchStartTime = utils[\"default\"].now();\n      isScrolling = undefined;\n      isTopSheetModal = $el.hasClass('sheet-modal-top');\n      if (!sheet.params.swipeHandler && e.type === 'touchstart') {\n        sheetPageContentEl = Object(dom7_module[\"default\"])(e.target).closest('.page-content')[0];\n      }\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      currentTouch = {\n        x: e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX,\n        y: e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY\n      };\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(currentTouch.x - startTouch.x) > Math.abs(currentTouch.y - startTouch.y));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      touchesDiff = startTouch.y - currentTouch.y;\n      var direction = touchesDiff < 0 ? 'to-bottom' : 'to-top';\n      if (!isMoved) {\n        if (sheetPageContentEl && !$el.hasClass('modal-in-swipe-step')) {\n          sheetPageContentScrollTop = sheetPageContentEl.scrollTop;\n          sheetPageContentScrollHeight = sheetPageContentEl.scrollHeight;\n          sheetPageContentOffsetHeight = sheetPageContentEl.offsetHeight;\n          if (!(sheetPageContentScrollHeight === sheetPageContentOffsetHeight) && !(direction === 'to-bottom' && sheetPageContentScrollTop === 0) && !(direction === 'to-top' && sheetPageContentScrollTop === sheetPageContentScrollHeight - sheetPageContentOffsetHeight)) {\n            $el.transform('');\n            isTouched = false;\n            isMoved = false;\n            return;\n          }\n        }\n        if (sheet.push && pushOffset) {\n          $pushViewEl = app.root.children('.view, .views');\n        }\n        sheetElOffsetHeight = $el[0].offsetHeight;\n        startTranslate = utils[\"default\"].getTranslate($el[0], 'y');\n        if (isTopSheetModal) {\n          minTranslate = sheet.params.swipeToClose ? -sheetElOffsetHeight : -swipeStepTranslate;\n          maxTranslate = 0;\n        } else {\n          minTranslate = 0;\n          maxTranslate = sheet.params.swipeToClose ? sheetElOffsetHeight : swipeStepTranslate;\n        }\n        isMoved = true;\n      }\n      currentTranslate = startTranslate - touchesDiff;\n      currentTranslate = Math.min(Math.max(currentTranslate, minTranslate), maxTranslate);\n      e.preventDefault();\n      if (sheet.push && pushOffset) {\n        var progress = (currentTranslate - startTranslate) / sheetElOffsetHeight;\n        if (sheet.params.swipeToStep) {\n          if (isTopSheetModal) {\n            progress = currentTranslate / swipeStepTranslate;\n          } else {\n            progress = 1 - (swipeStepTranslate - currentTranslate) / swipeStepTranslate;\n          }\n        }\n        progress = Math.abs(progress);\n        progress = Math.min(Math.max(progress, 0), 1);\n        var pushProgress = 1 - progress;\n        var scale = 1 - (1 - pushViewScale(pushOffset)) * pushProgress;\n        $pushViewEl.transition(0).transform(\"translate3d(0,0,0) scale(\".concat(scale, \")\"));\n        if (sheet.params.swipeToStep) {\n          $pushViewEl.css('border-radius', \"\".concat(pushBorderRadius * pushProgress, \"px\"));\n        }\n      }\n      $el.transition(0).transform(\"translate3d(0,\".concat(currentTranslate, \"px,0)\"));\n      if (sheet.params.swipeToStep) {\n        var _progress;\n        if (isTopSheetModal) {\n          _progress = 1 - currentTranslate / swipeStepTranslate;\n        } else {\n          _progress = (swipeStepTranslate - currentTranslate) / swipeStepTranslate;\n        }\n        _progress = Math.min(Math.max(_progress, 0), 1);\n        $el.trigger('sheet:stepprogress', _progress);\n        sheet.emit('local::stepProgress sheetStepProgress', sheet, _progress);\n      }\n    }\n    function handleTouchEnd() {\n      isTouched = false;\n      if (!isMoved) {\n        return;\n      }\n      isMoved = false;\n      $el.transform('').transition('');\n      if (sheet.push && pushOffset) {\n        $pushViewEl.transition('').transform('');\n        $pushViewEl.css('border-radius', '');\n      }\n      var direction = touchesDiff < 0 ? 'to-bottom' : 'to-top';\n      var diff = Math.abs(touchesDiff);\n      if (diff === 0 || currentTranslate === startTranslate) return;\n      var timeDiff = new Date().getTime() - touchStartTime;\n      if (!sheet.params.swipeToStep) {\n        if (direction !== (isTopSheetModal ? 'to-top' : 'to-bottom')) {\n          return;\n        }\n        if (timeDiff < 300 && diff > 20 || timeDiff >= 300 && diff > sheetElOffsetHeight / 2) {\n          sheet.close();\n        }\n        return;\n      }\n      var openDirection = isTopSheetModal ? 'to-bottom' : 'to-top';\n      var closeDirection = isTopSheetModal ? 'to-top' : 'to-bottom';\n      var absCurrentTranslate = Math.abs(currentTranslate);\n      var absSwipeStepTranslate = Math.abs(swipeStepTranslate);\n      if (timeDiff < 300 && diff > 10) {\n        if (direction === openDirection && absCurrentTranslate < absSwipeStepTranslate) {\n          // open step\n          $el.removeClass('modal-in-swipe-step');\n          $el.trigger('sheet:stepprogress', 1);\n          sheet.emit('local::stepProgress sheetStepProgress', sheet, 1);\n          $el.trigger('sheet:stepopen');\n          sheet.emit('local::stepOpen sheetStepOpen', sheet);\n          if (sheet.push && pushOffset) {\n            sheet.$htmlEl[0].style.setProperty('--f7-sheet-push-scale', pushViewScale(pushOffset));\n            $pushViewEl.css('border-radius', '');\n          }\n        }\n        if (direction === closeDirection && absCurrentTranslate > absSwipeStepTranslate) {\n          // close sheet\n          if (sheet.params.swipeToClose) {\n            sheet.close();\n          } else {\n            // close step\n            $el.addClass('modal-in-swipe-step');\n            $el.trigger('sheet:stepprogress', 0);\n            sheet.emit('local::stepProgress sheetStepProgress', sheet, 0);\n            $el.trigger('sheet:stepclose');\n            sheet.emit('local::stepClose sheetStepClose', sheet);\n            if (sheet.push && pushOffset) {\n              sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');\n              $pushViewEl.css('border-radius', '0px');\n            }\n          }\n        }\n        if (direction === closeDirection && absCurrentTranslate <= absSwipeStepTranslate) {\n          // close step\n          $el.addClass('modal-in-swipe-step');\n          $el.trigger('sheet:stepprogress', 0);\n          sheet.emit('local::stepProgress sheetStepProgress', sheet, 0);\n          $el.trigger('sheet:stepclose');\n          sheet.emit('local::stepClose sheetStepClose', sheet);\n          if (sheet.push && pushOffset) {\n            sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');\n            $pushViewEl.css('border-radius', '0px');\n          }\n        }\n        return;\n      }\n      if (timeDiff >= 300) {\n        var stepOpened = !$el.hasClass('modal-in-swipe-step');\n        if (!stepOpened) {\n          if (absCurrentTranslate < absSwipeStepTranslate / 2) {\n            // open step\n            $el.removeClass('modal-in-swipe-step');\n            $el.trigger('sheet:stepprogress', 1);\n            sheet.emit('local::stepProgress sheetStepProgress', sheet, 1);\n            $el.trigger('sheet:stepopen');\n            sheet.emit('local::stepOpen sheetStepOpen', sheet);\n            if (sheet.push && pushOffset) {\n              sheet.$htmlEl[0].style.setProperty('--f7-sheet-push-scale', pushViewScale(pushOffset));\n              $pushViewEl.css('border-radius', '');\n            }\n          } else if (absCurrentTranslate - absSwipeStepTranslate > (sheetElOffsetHeight - absSwipeStepTranslate) / 2) {\n            // close sheet\n            if (sheet.params.swipeToClose) sheet.close();\n          }\n        } else if (stepOpened) {\n          if (absCurrentTranslate > absSwipeStepTranslate + (sheetElOffsetHeight - absSwipeStepTranslate) / 2) {\n            // close sheet\n            if (sheet.params.swipeToClose) sheet.close();\n          } else if (absCurrentTranslate > absSwipeStepTranslate / 2) {\n            // close step\n            $el.addClass('modal-in-swipe-step');\n            $el.trigger('sheet:stepprogress', 0);\n            sheet.emit('local::stepProgress sheetStepProgress', sheet, 0);\n            $el.trigger('sheet:stepclose');\n            sheet.emit('local::stepClose sheetStepClose', sheet);\n            if (sheet.push && pushOffset) {\n              sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');\n              $pushViewEl.css('border-radius', '0px');\n            }\n          }\n        }\n      }\n    }\n    sheet.setSwipeStep = function setSwipeStep() {\n      var byResize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var $swipeStepEl = $el.find('.sheet-modal-swipe-step').eq(0);\n      if (!$swipeStepEl.length) return;\n      if ($el.hasClass('sheet-modal-top')) {\n        swipeStepTranslate = -($swipeStepEl.offset().top - $el.offset().top + $swipeStepEl[0].offsetHeight);\n      } else {\n        swipeStepTranslate = $el[0].offsetHeight - ($swipeStepEl.offset().top - $el.offset().top + $swipeStepEl[0].offsetHeight);\n      }\n      $el[0].style.setProperty('--f7-sheet-swipe-step', \"\".concat(swipeStepTranslate, \"px\"));\n      if (!byResize) {\n        $el.addClass('modal-in-swipe-step');\n      }\n    };\n    function onResize() {\n      sheet.setSwipeStep(true);\n    }\n    var passive = utils_support[\"default\"].passiveListener ? {\n      passive: true\n    } : false;\n    if (sheet.params.swipeToClose || sheet.params.swipeToStep) {\n      $el.on(app.touchEvents.start, handleTouchStart, passive);\n      app.on('touchmove', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n      sheet.once('sheetDestroy', function () {\n        $el.off(app.touchEvents.start, handleTouchStart, passive);\n        app.off('touchmove', handleTouchMove);\n        app.off('touchend:passive', handleTouchEnd);\n      });\n    }\n    sheet.on('open', function () {\n      if (sheet.params.closeOnEscape) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('keydown', onKeyDown);\n      }\n      $el.prevAll('.popup.modal-in').addClass('popup-behind');\n      if (sheet.params.swipeToStep) {\n        sheet.setSwipeStep(false);\n        app.on('resize', onResize);\n      }\n      if (sheet.params.scrollToEl) {\n        scrollToElementOnOpen();\n      }\n      if (sheet.push) {\n        pushOffset = parseInt($el.css('--f7-sheet-push-offset'), 10);\n        if (Number.isNaN(pushOffset)) pushOffset = 0;\n        if (pushOffset) {\n          $el.addClass('sheet-modal-push');\n          sheet.$htmlEl.addClass('with-modal-sheet-push');\n          if (!sheet.params.swipeToStep) {\n            sheet.$htmlEl[0].style.setProperty('--f7-sheet-push-scale', pushViewScale(pushOffset));\n          } else {\n            $pushViewEl = app.root.children('.view, .views');\n            pushBorderRadius = parseFloat($el.css(\"border-\".concat(isTopSheetModal ? 'bottom' : 'top', \"-left-radius\")));\n            $pushViewEl.css('border-radius', '0px');\n          }\n        }\n      }\n    });\n    sheet.on('opened', function () {\n      if (sheet.params.closeByOutsideClick || sheet.params.closeByBackdropClick) {\n        app.on('click', handleClick);\n      }\n    });\n    sheet.on('close', function () {\n      if (sheet.params.swipeToStep) {\n        $el.removeClass('modal-in-swipe-step');\n        app.off('resize', onResize);\n      }\n      if (sheet.params.closeOnEscape) {\n        Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('keydown', onKeyDown);\n      }\n      if (sheet.params.scrollToEl) {\n        scrollToElementOnClose();\n      }\n      if (sheet.params.closeByOutsideClick || sheet.params.closeByBackdropClick) {\n        app.off('click', handleClick);\n      }\n      $el.prevAll('.popup.modal-in').eq(0).removeClass('popup-behind');\n      if (sheet.push && pushOffset) {\n        sheet.$htmlEl.removeClass('with-modal-sheet-push');\n        sheet.$htmlEl.addClass('with-modal-sheet-push-closing');\n      }\n    });\n    sheet.on('closed', function () {\n      if (sheet.push && pushOffset) {\n        sheet.$htmlEl.removeClass('with-modal-sheet-push-closing');\n        sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');\n      }\n    });\n    sheet.stepOpen = function stepOpen() {\n      $el.removeClass('modal-in-swipe-step');\n      if (sheet.push) {\n        if (!pushOffset) {\n          pushOffset = parseInt($el.css('--f7-sheet-push-offset'), 10);\n          if (Number.isNaN(pushOffset)) pushOffset = 0;\n        }\n        if (pushOffset) {\n          sheet.$htmlEl[0].style.setProperty('--f7-sheet-push-scale', pushViewScale(pushOffset));\n        }\n      }\n    };\n    sheet.stepClose = function stepClose() {\n      $el.addClass('modal-in-swipe-step');\n      if (sheet.push) {\n        sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');\n      }\n    };\n    sheet.stepToggle = function stepToggle() {\n      $el.toggleClass('modal-in-swipe-step');\n    };\n    $el[0].f7Modal = sheet;\n    return possibleConstructorReturn_default()(_this, sheet);\n  }\n  inherits_default()(Sheet, _Modal);\n  return createClass_default()(Sheet);\n}(modal_class);\n/* harmony default export */ var sheet_class = (sheet_class_Sheet);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/sheet/sheet.js\n\n\n\n\n/* harmony default export */ var sheet_sheet = ({\n  name: 'sheet',\n  params: {\n    sheet: {\n      push: false,\n      backdrop: undefined,\n      backdropEl: undefined,\n      closeByBackdropClick: true,\n      closeByOutsideClick: false,\n      closeOnEscape: false,\n      swipeToClose: false,\n      swipeToStep: false,\n      swipeHandler: null\n    }\n  },\n  static: {\n    Sheet: sheet_class\n  },\n  create: function create() {\n    var app = this;\n    app.sheet = utils[\"default\"].extend({}, modal_methods({\n      app: app,\n      constructor: sheet_class,\n      defaultSelector: '.sheet-modal.modal-in'\n    }), {\n      stepOpen: function stepOpen(sheet) {\n        var sheetInstance = app.sheet.get(sheet);\n        if (sheetInstance && sheetInstance.stepOpen) return sheetInstance.stepOpen();\n        return undefined;\n      },\n      stepClose: function stepClose(sheet) {\n        var sheetInstance = app.sheet.get(sheet);\n        if (sheetInstance && sheetInstance.stepClose) return sheetInstance.stepClose();\n        return undefined;\n      },\n      stepToggle: function stepToggle(sheet) {\n        var sheetInstance = app.sheet.get(sheet);\n        if (sheetInstance && sheetInstance.stepToggle) return sheetInstance.stepToggle();\n        return undefined;\n      }\n    });\n  },\n  clicks: {\n    '.sheet-open': function openSheet($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      if (Object(dom7_module[\"default\"])('.sheet-modal.modal-in').length > 0 && data.sheet && Object(dom7_module[\"default\"])(data.sheet)[0] !== Object(dom7_module[\"default\"])('.sheet-modal.modal-in')[0]) {\n        app.sheet.close('.sheet-modal.modal-in');\n      }\n      app.sheet.open(data.sheet, data.animate, $clickedEl);\n    },\n    '.sheet-close': function closeSheet($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.sheet.close(data.sheet, data.animate, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/toast/toast-class.js\n\n\n\n\n\nfunction toast_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, toast_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction toast_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (toast_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar toast_class_Toast = /*#__PURE__*/function (_Modal) {\n  function Toast(app, params) {\n    var _this;\n    classCallCheck_default()(this, Toast);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.toast, params);\n\n    // Extends with open/close Modal methods;\n    _this = toast_class_callSuper(this, Toast, [app, extendedParams]);\n    var toast = _this;\n    toast.app = app;\n    toast.params = extendedParams;\n    var _toast$params = toast.params,\n      closeButton = _toast$params.closeButton,\n      closeTimeout = _toast$params.closeTimeout;\n    var $el;\n    if (!toast.params.el) {\n      // Find Element\n      var toastHtml = toast.render();\n      $el = Object(dom7_module[\"default\"])(toastHtml);\n    } else {\n      $el = Object(dom7_module[\"default\"])(toast.params.el);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, toast.destroy());\n    }\n    utils[\"default\"].extend(toast, {\n      $el: $el,\n      el: $el[0],\n      type: 'toast'\n    });\n    $el[0].f7Modal = toast;\n    if (closeButton) {\n      $el.find('.toast-button').on('click', function () {\n        toast.emit('local::closeButtonClick toastCloseButtonClick', toast);\n        toast.close();\n      });\n      toast.on('beforeDestroy', function () {\n        $el.find('.toast-button').off('click');\n      });\n    }\n    var timeoutId;\n    toast.on('open', function () {\n      Object(dom7_module[\"default\"])('.toast.modal-in').each(function (index, openedEl) {\n        var toastInstance = app.toast.get(openedEl);\n        if (openedEl !== toast.el && toastInstance) {\n          toastInstance.close();\n        }\n      });\n      if (closeTimeout) {\n        timeoutId = utils[\"default\"].nextTick(function () {\n          toast.close();\n        }, closeTimeout);\n      }\n    });\n    toast.on('close', function () {\n      ssr_window_esm[\"window\"].clearTimeout(timeoutId);\n    });\n    if (toast.params.destroyOnClose) {\n      toast.once('closed', function () {\n        setTimeout(function () {\n          toast.destroy();\n        }, 0);\n      });\n    }\n    return possibleConstructorReturn_default()(_this, toast);\n  }\n  inherits_default()(Toast, _Modal);\n  return createClass_default()(Toast, [{\n    key: \"render\",\n    value: function render() {\n      var toast = this;\n      if (toast.params.render) return toast.params.render.call(toast, toast);\n      var _toast$params2 = toast.params,\n        position = _toast$params2.position,\n        horizontalPosition = _toast$params2.horizontalPosition,\n        cssClass = _toast$params2.cssClass,\n        icon = _toast$params2.icon,\n        text = _toast$params2.text,\n        closeButton = _toast$params2.closeButton,\n        closeButtonColor = _toast$params2.closeButtonColor,\n        closeButtonText = _toast$params2.closeButtonText;\n      var horizontalClass = position === 'top' || position === 'bottom' ? \"toast-horizontal-\".concat(horizontalPosition) : '';\n      return \"\\n      <div class=\\\"toast toast-\".concat(position, \" \").concat(horizontalClass, \" \").concat(cssClass || '', \" \").concat(icon ? 'toast-with-icon' : '', \"\\\">\\n        <div class=\\\"toast-content\\\">\\n          \").concat(icon ? \"<div class=\\\"toast-icon\\\">\".concat(icon, \"</div>\") : '', \"\\n          <div class=\\\"toast-text\\\">\").concat(text, \"</div>\\n          \").concat(closeButton && !icon ? \"\\n          <a class=\\\"toast-button button \".concat(closeButtonColor ? \"color-\".concat(closeButtonColor) : '', \"\\\">\").concat(closeButtonText, \"</a>\\n          \").trim() : '', \"\\n        </div>\\n      </div>\\n    \").trim();\n    }\n  }]);\n}(modal_class);\n/* harmony default export */ var toast_class = (toast_class_Toast);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/toast/toast.js\n\n\n\n/* harmony default export */ var toast_toast = ({\n  name: 'toast',\n  static: {\n    Toast: toast_class\n  },\n  create: function create() {\n    var app = this;\n    app.toast = utils[\"default\"].extend({}, modal_methods({\n      app: app,\n      constructor: toast_class,\n      defaultSelector: '.toast.modal-in'\n    }), {\n      // Shortcuts\n      show: function show(params) {\n        utils[\"default\"].extend(params, {\n          destroyOnClose: true\n        });\n        return new toast_class(app, params).open();\n      }\n    });\n  },\n  params: {\n    toast: {\n      icon: null,\n      text: null,\n      position: 'bottom',\n      horizontalPosition: 'left',\n      closeButton: false,\n      closeButtonColor: null,\n      closeButtonText: 'Ok',\n      closeTimeout: null,\n      cssClass: null,\n      render: null\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/preloader/preloader.js\n\n\nvar Preloader = {\n  init: function init(el) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0 || $el.children('.preloader-inner').length > 0 || $el.children('.preloader-inner-line').length > 0) return;\n    $el.append(utils[\"default\"][\"\".concat(app.theme, \"PreloaderContent\")]);\n  },\n  // Modal\n  visible: false,\n  show: function show() {\n    var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'white';\n    var app = this;\n    if (Preloader.visible) return;\n    var preloaderInner = utils[\"default\"][\"\".concat(app.theme, \"PreloaderContent\")] || '';\n    Object(dom7_module[\"default\"])('html').addClass('with-modal-preloader');\n    app.root.append(\"\\n      <div class=\\\"preloader-backdrop\\\"></div>\\n      <div class=\\\"preloader-modal\\\">\\n        <div class=\\\"preloader color-\".concat(color, \"\\\">\").concat(preloaderInner, \"</div>\\n      </div>\\n    \"));\n    Preloader.visible = true;\n  },\n  showIn: function showIn(el) {\n    var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'white';\n    var app = this;\n    var preloaderInner = utils[\"default\"][\"\".concat(app.theme, \"PreloaderContent\")] || '';\n    Object(dom7_module[\"default\"])(el || 'html').addClass('with-modal-preloader');\n    Object(dom7_module[\"default\"])(el || app.root).append(\"\\n      <div class=\\\"preloader-backdrop\\\"></div>\\n      <div class=\\\"preloader-modal\\\">\\n        <div class=\\\"preloader color-\".concat(color, \"\\\">\").concat(preloaderInner, \"</div>\\n      </div>\\n    \"));\n  },\n  hide: function hide() {\n    var app = this;\n    if (!Preloader.visible) return;\n    Object(dom7_module[\"default\"])('html').removeClass('with-modal-preloader');\n    app.root.find('.preloader-backdrop, .preloader-modal').remove();\n    Preloader.visible = false;\n  },\n  hideIn: function hideIn(el) {\n    var app = this;\n    Object(dom7_module[\"default\"])(el || 'html').removeClass('with-modal-preloader');\n    Object(dom7_module[\"default\"])(el || app.root).find('.preloader-backdrop, .preloader-modal').remove();\n  }\n};\n/* harmony default export */ var preloader_preloader = ({\n  name: 'preloader',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      preloader: {\n        init: Preloader.init.bind(app),\n        show: Preloader.show.bind(app),\n        hide: Preloader.hide.bind(app),\n        showIn: Preloader.showIn.bind(app),\n        hideIn: Preloader.hideIn.bind(app)\n      }\n    });\n  },\n  on: {\n    photoBrowserOpen: function photoBrowserOpen(pb) {\n      var app = this;\n      pb.$el.find('.preloader').each(function (index, preloaderEl) {\n        app.preloader.init(preloaderEl);\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.preloader').each(function (index, preloaderEl) {\n        app.preloader.init(preloaderEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.preloader').each(function (index, preloaderEl) {\n        app.preloader.init(preloaderEl);\n      });\n    }\n  },\n  vnode: {\n    preloader: {\n      insert: function insert(vnode) {\n        var app = this;\n        var preloaderEl = vnode.elm;\n        app.preloader.init(preloaderEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/progressbar/progressbar.js\n\n\n\nvar Progressbar = {\n  set: function set() {\n    var app = this;\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    var el = args[0],\n      progress = args[1],\n      duration = args[2];\n    if (typeof args[0] === 'number') {\n      progress = args[0];\n      duration = args[1];\n      el = app.root;\n    }\n    if (typeof progress === 'undefined' || progress === null) return el;\n    if (!progress) progress = 0;\n    var $el = Object(dom7_module[\"default\"])(el || app.root);\n    if ($el.length === 0) {\n      return el;\n    }\n    var progressNormalized = Math.min(Math.max(progress, 0), 100);\n    var $progressbarEl;\n    if ($el.hasClass('progressbar')) $progressbarEl = $el.eq(0);else {\n      $progressbarEl = $el.children('.progressbar');\n    }\n    if ($progressbarEl.length === 0 || $progressbarEl.hasClass('progressbar-infinite')) {\n      return $progressbarEl;\n    }\n    var $progressbarLine = $progressbarEl.children('span');\n    if ($progressbarLine.length === 0) {\n      $progressbarLine = Object(dom7_module[\"default\"])('<span></span>');\n      $progressbarEl.append($progressbarLine);\n    }\n    $progressbarLine.transition(typeof duration !== 'undefined' ? duration : '').transform(\"translate3d(\".concat(-100 + progressNormalized, \"%,0,0)\"));\n    return $progressbarEl[0];\n  },\n  show: function show() {\n    var app = this;\n\n    // '.page', 50, 'multi'\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n    var el = args[0],\n      progress = args[1],\n      color = args[2];\n    var type = 'determined';\n    if (args.length === 2) {\n      if ((typeof args[0] === 'string' || typeof_default()(args[0]) === 'object') && typeof args[1] === 'string') {\n        // '.page', 'multi'\n        el = args[0];\n        color = args[1];\n        progress = args[2];\n        type = 'infinite';\n      } else if (typeof args[0] === 'number' && typeof args[1] === 'string') {\n        // 50, 'multi'\n        progress = args[0];\n        color = args[1];\n        el = app.root;\n      }\n    } else if (args.length === 1) {\n      if (typeof args[0] === 'number') {\n        el = app.root;\n        progress = args[0];\n      } else if (typeof args[0] === 'string') {\n        type = 'infinite';\n        el = app.root;\n        color = args[0];\n      }\n    } else if (args.length === 0) {\n      type = 'infinite';\n      el = app.root;\n    }\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return undefined;\n    var $progressbarEl;\n    if ($el.hasClass('progressbar') || $el.hasClass('progressbar-infinite')) {\n      $progressbarEl = $el;\n    } else {\n      $progressbarEl = $el.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)');\n      if ($progressbarEl.length === 0) {\n        $progressbarEl = Object(dom7_module[\"default\"])(\"\\n          <span class=\\\"progressbar\".concat(type === 'infinite' ? '-infinite' : '').concat(color ? \" color-\".concat(color) : '', \" progressbar-in\\\">\\n            \").concat(type === 'infinite' ? '' : '<span></span>', \"\\n          </span>\"));\n        $el.append($progressbarEl);\n      }\n    }\n    if (typeof progress !== 'undefined') {\n      app.progressbar.set($progressbarEl, progress);\n    }\n    return $progressbarEl[0];\n  },\n  hide: function hide(el) {\n    var removeAfterHide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el || app.root);\n    if ($el.length === 0) return undefined;\n    var $progressbarEl;\n    if ($el.hasClass('progressbar') || $el.hasClass('progressbar-infinite')) {\n      $progressbarEl = $el;\n    } else {\n      $progressbarEl = $el.children('.progressbar, .progressbar-infinite');\n    }\n    if ($progressbarEl.length === 0 || !$progressbarEl.hasClass('progressbar-in') || $progressbarEl.hasClass('progressbar-out')) {\n      return $progressbarEl;\n    }\n    $progressbarEl.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () {\n      if (removeAfterHide) {\n        $progressbarEl.remove();\n      }\n    });\n    return $progressbarEl;\n  }\n};\n/* harmony default export */ var progressbar = ({\n  name: 'progressbar',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      progressbar: {\n        set: Progressbar.set.bind(app),\n        show: Progressbar.show.bind(app),\n        hide: Progressbar.hide.bind(app)\n      }\n    });\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.progressbar').each(function (index, progressbarEl) {\n        var $progressbarEl = Object(dom7_module[\"default\"])(progressbarEl);\n        app.progressbar.set($progressbarEl, $progressbarEl.attr('data-progress'));\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.progressbar').each(function (index, progressbarEl) {\n        var $progressbarEl = Object(dom7_module[\"default\"])(progressbarEl);\n        app.progressbar.set($progressbarEl, $progressbarEl.attr('data-progress'));\n      });\n    }\n  },\n  vnode: {\n    progressbar: {\n      insert: function insert(vnode) {\n        var app = this;\n        var el = vnode.elm;\n        app.progressbar.set(el, el.getAttribute('data-progress'));\n      },\n      update: function update(vnode) {\n        var app = this;\n        var el = vnode.elm;\n        app.progressbar.set(el, el.getAttribute('data-progress'));\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/sortable/sortable.js\n\n\n\nvar Sortable = {\n  init: function init() {\n    var app = this;\n    var isTouched;\n    var isMoved;\n    var touchStartY;\n    var touchesDiff;\n    var $sortingEl;\n    var $sortingItems;\n    var $sortableContainer;\n    var sortingElHeight;\n    var minTop;\n    var maxTop;\n    var $insertAfterEl;\n    var $insertBeforeEl;\n    var indexFrom;\n    var $pageEl;\n    var $pageContentEl;\n    var pageHeight;\n    var pageOffset;\n    var sortingElOffsetLocal;\n    var sortingElOffsetTop;\n    var initialScrollTop;\n    var wasTapHold;\n    function handleTouchStart(e, isTapHold) {\n      isMoved = false;\n      isTouched = true;\n      wasTapHold = false;\n      touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      $sortingEl = Object(dom7_module[\"default\"])(e.target).closest('li').eq(0);\n      indexFrom = $sortingEl.index();\n      $sortableContainer = $sortingEl.parents('.sortable');\n      var $listGroup = $sortingEl.parents('.list-group');\n      if ($listGroup.length && $listGroup.parents($sortableContainer).length) {\n        $sortableContainer = $listGroup;\n      }\n      $sortingItems = $sortableContainer.children('ul').children('li:not(.disallow-sorting):not(.no-sorting)');\n      if (app.panel) app.panel.allowOpen = false;\n      if (app.swipeout) app.swipeout.allow = false;\n      if (isTapHold) {\n        $sortingEl.addClass('sorting');\n        $sortableContainer.addClass('sortable-sorting');\n        wasTapHold = true;\n      }\n    }\n    function handleTouchMove(e) {\n      if (!isTouched || !$sortingEl) return;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      if (!isMoved) {\n        $pageEl = $sortingEl.parents('.page');\n        $pageContentEl = $sortingEl.parents('.page-content');\n        var paddingTop = parseInt($pageContentEl.css('padding-top'), 10);\n        var paddingBottom = parseInt($pageContentEl.css('padding-bottom'), 10);\n        initialScrollTop = $pageContentEl[0].scrollTop;\n        pageOffset = $pageEl.offset().top + paddingTop;\n        pageHeight = $pageEl.height() - paddingTop - paddingBottom;\n        $sortingEl.addClass('sorting');\n        $sortableContainer.addClass('sortable-sorting');\n        sortingElOffsetLocal = $sortingEl[0].offsetTop;\n        minTop = $sortingEl[0].offsetTop;\n        maxTop = $sortingEl.parent().height() - sortingElOffsetLocal - $sortingEl.height();\n        sortingElHeight = $sortingEl[0].offsetHeight;\n        sortingElOffsetTop = $sortingEl.offset().top;\n      }\n      isMoved = true;\n      e.preventDefault();\n      e.f7PreventSwipePanel = true;\n      touchesDiff = pageY - touchStartY;\n      var translateScrollOffset = $pageContentEl[0].scrollTop - initialScrollTop;\n      var translate = Math.min(Math.max(touchesDiff + translateScrollOffset, -minTop), maxTop);\n      $sortingEl.transform(\"translate3d(0,\".concat(translate, \"px,0)\"));\n      var scrollAddition = 44;\n      var allowScroll = true;\n      if (touchesDiff + translateScrollOffset + scrollAddition < -minTop) {\n        allowScroll = false;\n      }\n      if (touchesDiff + translateScrollOffset - scrollAddition > maxTop) {\n        allowScroll = false;\n      }\n      $insertBeforeEl = undefined;\n      $insertAfterEl = undefined;\n      var scrollDiff;\n      if (allowScroll) {\n        if (sortingElOffsetTop + touchesDiff + sortingElHeight + scrollAddition > pageOffset + pageHeight) {\n          // To Bottom\n          scrollDiff = sortingElOffsetTop + touchesDiff + sortingElHeight + scrollAddition - (pageOffset + pageHeight);\n        }\n        if (sortingElOffsetTop + touchesDiff < pageOffset + scrollAddition) {\n          // To Top\n          scrollDiff = sortingElOffsetTop + touchesDiff - pageOffset - scrollAddition;\n        }\n        if (scrollDiff) {\n          $pageContentEl[0].scrollTop += scrollDiff;\n        }\n      }\n      $sortingItems.each(function (index, el) {\n        var $currentEl = Object(dom7_module[\"default\"])(el);\n        if ($currentEl[0] === $sortingEl[0]) return;\n        var currentElOffset = $currentEl[0].offsetTop;\n        var currentElHeight = $currentEl.height();\n        var sortingElOffset = sortingElOffsetLocal + translate;\n        if (sortingElOffset >= currentElOffset - currentElHeight / 2 && $sortingEl.index() < $currentEl.index()) {\n          $currentEl.transform(\"translate3d(0, \".concat(-sortingElHeight, \"px,0)\"));\n          $insertAfterEl = $currentEl;\n          $insertBeforeEl = undefined;\n        } else if (sortingElOffset <= currentElOffset + currentElHeight / 2 && $sortingEl.index() > $currentEl.index()) {\n          $currentEl.transform(\"translate3d(0, \".concat(sortingElHeight, \"px,0)\"));\n          $insertAfterEl = undefined;\n          if (!$insertBeforeEl) $insertBeforeEl = $currentEl;\n        } else {\n          $currentEl.transform('translate3d(0, 0%,0)');\n        }\n      });\n    }\n    function handleTouchEnd() {\n      if (!isTouched || !isMoved) {\n        if (isTouched && !isMoved) {\n          if (app.panel) app.panel.allowOpen = true;\n          if (app.swipeout) app.swipeout.allow = true;\n          if (wasTapHold) {\n            $sortingEl.removeClass('sorting');\n            $sortableContainer.removeClass('sortable-sorting');\n          }\n        }\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      if (app.panel) app.panel.allowOpen = true;\n      if (app.swipeout) app.swipeout.allow = true;\n      $sortingItems.transform('');\n      $sortingEl.removeClass('sorting');\n      $sortableContainer.removeClass('sortable-sorting');\n      var indexTo;\n      if ($insertAfterEl) indexTo = $insertAfterEl.index();else if ($insertBeforeEl) indexTo = $insertBeforeEl.index();\n      var moveElements = $sortableContainer.dataset().sortableMoveElements;\n      if (typeof moveElements === 'undefined') {\n        moveElements = app.params.sortable.moveElements;\n      }\n      if (moveElements) {\n        if ($insertAfterEl) {\n          $sortingEl.insertAfter($insertAfterEl);\n        }\n        if ($insertBeforeEl) {\n          $sortingEl.insertBefore($insertBeforeEl);\n        }\n      }\n      if (($insertAfterEl || $insertBeforeEl) && $sortableContainer.hasClass('virtual-list')) {\n        indexFrom = $sortingEl[0].f7VirtualListIndex;\n        if (typeof indexFrom === 'undefined') indexFrom = $sortingEl.attr('data-virtual-list-index');\n        if ($insertBeforeEl) {\n          indexTo = $insertBeforeEl[0].f7VirtualListIndex;\n          if (typeof indexTo === 'undefined') indexTo = $insertBeforeEl.attr('data-virtual-list-index');\n        } else {\n          indexTo = $insertAfterEl[0].f7VirtualListIndex;\n          if (typeof indexTo === 'undefined') indexTo = $insertAfterEl.attr('data-virtual-list-index');\n        }\n        if (indexTo !== null) indexTo = parseInt(indexTo, 10);else indexTo = undefined;\n        var virtualList = $sortableContainer[0].f7VirtualList;\n        if (indexFrom) indexFrom = parseInt(indexFrom, 10);\n        if (indexTo) indexTo = parseInt(indexTo, 10);\n        if (virtualList) virtualList.moveItem(indexFrom, indexTo);\n      }\n      if (typeof indexTo !== 'undefined' && !Number.isNaN(indexTo) && indexTo !== indexFrom) {\n        $sortingEl.trigger('sortable:sort', {\n          from: indexFrom,\n          to: indexTo\n        });\n        app.emit('sortableSort', $sortingEl[0], {\n          from: indexFrom,\n          to: indexTo,\n          el: $sortingEl[0]\n        }, $sortableContainer[0]);\n      }\n      $insertBeforeEl = undefined;\n      $insertAfterEl = undefined;\n      isTouched = false;\n      isMoved = false;\n    }\n    var activeListener = app.support.passiveListener ? {\n      passive: false,\n      capture: false\n    } : false;\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on(app.touchEvents.start, '.list.sortable .sortable-handler', handleTouchStart, activeListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('taphold', '.sortable-tap-hold', function (e, pointerEvent) {\n      handleTouchStart(pointerEvent, true);\n    });\n  },\n  enable: function enable() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.list.sortable';\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return;\n    $el.addClass('sortable-enabled');\n    $el.trigger('sortable:enable');\n    app.emit('sortableEnable', $el[0]);\n  },\n  disable: function disable() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.list.sortable';\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return;\n    $el.removeClass('sortable-enabled');\n    $el.trigger('sortable:disable');\n    app.emit('sortableDisable', $el[0]);\n  },\n  toggle: function toggle() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.list.sortable';\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return;\n    if ($el.hasClass('sortable-enabled')) {\n      app.sortable.disable($el);\n    } else {\n      app.sortable.enable($el);\n    }\n  }\n};\n/* harmony default export */ var sortable_sortable = ({\n  name: 'sortable',\n  params: {\n    sortable: {\n      moveElements: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      sortable: {\n        init: Sortable.init.bind(app),\n        enable: Sortable.enable.bind(app),\n        disable: Sortable.disable.bind(app),\n        toggle: Sortable.toggle.bind(app)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      if (!app.params.sortable) return;\n      app.sortable.init();\n    }\n  },\n  clicks: {\n    '.sortable-enable': function enable($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.sortable.enable(data.sortable);\n    },\n    '.sortable-disable': function disable($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.sortable.disable(data.sortable);\n    },\n    '.sortable-toggle': function toggle($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.sortable.toggle(data.sortable);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swipeout/swipeout.js\n\n\n\nvar Swipeout = {\n  init: function init() {\n    var app = this;\n    var touchesStart = {};\n    var isTouched;\n    var isMoved;\n    var isScrolling;\n    var touchStartTime;\n    var touchesDiff;\n    var $swipeoutEl;\n    var $swipeoutContent;\n    var $actionsRight;\n    var $actionsLeft;\n    var actionsLeftWidth;\n    var actionsRightWidth;\n    var translate;\n    var opened;\n    var openedActionsSide;\n    var $leftButtons;\n    var $rightButtons;\n    var direction;\n    var $overswipeLeftButton;\n    var $overswipeRightButton;\n    var overswipeLeft;\n    var overswipeRight;\n    function handleTouchStart(e) {\n      if (!Swipeout.allow) return;\n      isMoved = false;\n      isTouched = true;\n      isScrolling = undefined;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      touchStartTime = new Date().getTime();\n      $swipeoutEl = Object(dom7_module[\"default\"])(this);\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        return;\n      }\n      if (!isMoved) {\n        if (Object(dom7_module[\"default\"])('.list.sortable-opened').length > 0) return;\n        $swipeoutContent = $swipeoutEl.find('.swipeout-content');\n        $actionsRight = $swipeoutEl.find('.swipeout-actions-right');\n        $actionsLeft = $swipeoutEl.find('.swipeout-actions-left');\n        actionsLeftWidth = null;\n        actionsRightWidth = null;\n        $leftButtons = null;\n        $rightButtons = null;\n        $overswipeRightButton = null;\n        $overswipeLeftButton = null;\n        if ($actionsLeft.length > 0) {\n          actionsLeftWidth = $actionsLeft.outerWidth();\n          $leftButtons = $actionsLeft.children('a');\n          $overswipeLeftButton = $actionsLeft.find('.swipeout-overswipe');\n        }\n        if ($actionsRight.length > 0) {\n          actionsRightWidth = $actionsRight.outerWidth();\n          $rightButtons = $actionsRight.children('a');\n          $overswipeRightButton = $actionsRight.find('.swipeout-overswipe');\n        }\n        opened = $swipeoutEl.hasClass('swipeout-opened');\n        if (opened) {\n          openedActionsSide = $swipeoutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right';\n        }\n        $swipeoutEl.removeClass('swipeout-transitioning');\n        if (!app.params.swipeout.noFollow) {\n          $swipeoutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n          $swipeoutEl.removeClass('swipeout-opened');\n        }\n      }\n      isMoved = true;\n      e.preventDefault();\n      touchesDiff = pageX - touchesStart.x;\n      translate = touchesDiff;\n      if (opened) {\n        if (openedActionsSide === 'right') translate -= actionsRightWidth;else translate += actionsLeftWidth;\n      }\n      if (translate > 0 && $actionsLeft.length === 0 || translate < 0 && $actionsRight.length === 0) {\n        if (!opened) {\n          isTouched = false;\n          isMoved = false;\n          $swipeoutContent.transform('');\n          if ($rightButtons && $rightButtons.length > 0) {\n            $rightButtons.transform('');\n          }\n          if ($leftButtons && $leftButtons.length > 0) {\n            $leftButtons.transform('');\n          }\n          return;\n        }\n        translate = 0;\n      }\n      if (translate < 0) direction = 'to-left';else if (translate > 0) direction = 'to-right';else if (!direction) direction = 'to-left';\n      var buttonOffset;\n      var progress;\n      e.f7PreventSwipePanel = true;\n      if (app.params.swipeout.noFollow) {\n        if (opened) {\n          if (openedActionsSide === 'right' && touchesDiff > 0) {\n            app.swipeout.close($swipeoutEl);\n          }\n          if (openedActionsSide === 'left' && touchesDiff < 0) {\n            app.swipeout.close($swipeoutEl);\n          }\n        } else {\n          if (touchesDiff < 0 && $actionsRight.length > 0) {\n            app.swipeout.open($swipeoutEl, 'right');\n          }\n          if (touchesDiff > 0 && $actionsLeft.length > 0) {\n            app.swipeout.open($swipeoutEl, 'left');\n          }\n        }\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      overswipeLeft = false;\n      overswipeRight = false;\n      if ($actionsRight.length > 0) {\n        // Show right actions\n        var buttonTranslate = translate;\n        progress = buttonTranslate / actionsRightWidth;\n        if (buttonTranslate < -actionsRightWidth) {\n          buttonTranslate = -actionsRightWidth - Math.pow(-buttonTranslate - actionsRightWidth, 0.8);\n          translate = buttonTranslate;\n          if ($overswipeRightButton.length > 0) {\n            overswipeRight = true;\n          }\n        }\n        if (direction !== 'to-left') {\n          progress = 0;\n          buttonTranslate = 0;\n        }\n        $rightButtons.each(function (index, buttonEl) {\n          var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n          if (typeof buttonEl.f7SwipeoutButtonOffset === 'undefined') {\n            $buttonEl[0].f7SwipeoutButtonOffset = buttonEl.offsetLeft;\n          }\n          buttonOffset = buttonEl.f7SwipeoutButtonOffset;\n          if ($overswipeRightButton.length > 0 && $buttonEl.hasClass('swipeout-overswipe') && direction === 'to-left') {\n            $buttonEl.css({\n              left: \"\".concat(overswipeRight ? -buttonOffset : 0, \"px\")\n            });\n            if (overswipeRight) {\n              if (!$buttonEl.hasClass('swipeout-overswipe-active')) {\n                $swipeoutEl.trigger('swipeout:overswipeenter');\n                app.emit('swipeoutOverswipeEnter', $swipeoutEl[0]);\n              }\n              $buttonEl.addClass('swipeout-overswipe-active');\n            } else {\n              if ($buttonEl.hasClass('swipeout-overswipe-active')) {\n                $swipeoutEl.trigger('swipeout:overswipeexit');\n                app.emit('swipeoutOverswipeExit', $swipeoutEl[0]);\n              }\n              $buttonEl.removeClass('swipeout-overswipe-active');\n            }\n          }\n          $buttonEl.transform(\"translate3d(\".concat(buttonTranslate - buttonOffset * (1 + Math.max(progress, -1)), \"px,0,0)\"));\n        });\n      }\n      if ($actionsLeft.length > 0) {\n        // Show left actions\n        var _buttonTranslate = translate;\n        progress = _buttonTranslate / actionsLeftWidth;\n        if (_buttonTranslate > actionsLeftWidth) {\n          _buttonTranslate = actionsLeftWidth + Math.pow(_buttonTranslate - actionsLeftWidth, 0.8);\n          translate = _buttonTranslate;\n          if ($overswipeLeftButton.length > 0) {\n            overswipeLeft = true;\n          }\n        }\n        if (direction !== 'to-right') {\n          _buttonTranslate = 0;\n          progress = 0;\n        }\n        $leftButtons.each(function (index, buttonEl) {\n          var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n          if (typeof buttonEl.f7SwipeoutButtonOffset === 'undefined') {\n            $buttonEl[0].f7SwipeoutButtonOffset = actionsLeftWidth - buttonEl.offsetLeft - buttonEl.offsetWidth;\n          }\n          buttonOffset = buttonEl.f7SwipeoutButtonOffset;\n          if ($overswipeLeftButton.length > 0 && $buttonEl.hasClass('swipeout-overswipe') && direction === 'to-right') {\n            $buttonEl.css({\n              left: \"\".concat(overswipeLeft ? buttonOffset : 0, \"px\")\n            });\n            if (overswipeLeft) {\n              if (!$buttonEl.hasClass('swipeout-overswipe-active')) {\n                $swipeoutEl.trigger('swipeout:overswipeenter');\n                app.emit('swipeoutOverswipeEnter', $swipeoutEl[0]);\n              }\n              $buttonEl.addClass('swipeout-overswipe-active');\n            } else {\n              if ($buttonEl.hasClass('swipeout-overswipe-active')) {\n                $swipeoutEl.trigger('swipeout:overswipeexit');\n                app.emit('swipeoutOverswipeExit', $swipeoutEl[0]);\n              }\n              $buttonEl.removeClass('swipeout-overswipe-active');\n            }\n          }\n          if ($leftButtons.length > 1) {\n            $buttonEl.css('z-index', $leftButtons.length - index);\n          }\n          $buttonEl.transform(\"translate3d(\".concat(_buttonTranslate + buttonOffset * (1 - Math.min(progress, 1)), \"px,0,0)\"));\n        });\n      }\n      $swipeoutEl.trigger('swipeout', progress);\n      app.emit('swipeout', $swipeoutEl[0], progress);\n      $swipeoutContent.transform(\"translate3d(\".concat(translate, \"px,0,0)\"));\n    }\n    function handleTouchEnd() {\n      if (!isTouched || !isMoved) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      isTouched = false;\n      isMoved = false;\n      var timeDiff = new Date().getTime() - touchStartTime;\n      var $actions = direction === 'to-left' ? $actionsRight : $actionsLeft;\n      var actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth;\n      var action;\n      var $buttons;\n      var i;\n      if (timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') || timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2) {\n        action = 'open';\n      } else {\n        action = 'close';\n      }\n      if (timeDiff < 300) {\n        if (Math.abs(translate) === 0) action = 'close';\n        if (Math.abs(translate) === actionsWidth) action = 'open';\n      }\n      if (action === 'open') {\n        Swipeout.el = $swipeoutEl[0];\n        $swipeoutEl.trigger('swipeout:open');\n        app.emit('swipeoutOpen', $swipeoutEl[0]);\n        $swipeoutEl.addClass('swipeout-opened swipeout-transitioning');\n        var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth;\n        $swipeoutContent.transform(\"translate3d(\".concat(newTranslate, \"px,0,0)\"));\n        $actions.addClass('swipeout-actions-opened');\n        $buttons = direction === 'to-left' ? $rightButtons : $leftButtons;\n        if ($buttons) {\n          for (i = 0; i < $buttons.length; i += 1) {\n            Object(dom7_module[\"default\"])($buttons[i]).transform(\"translate3d(\".concat(newTranslate, \"px,0,0)\"));\n          }\n        }\n        if (overswipeRight) {\n          $actionsRight.find('.swipeout-overswipe').trigger('click', 'f7Overswipe');\n        }\n        if (overswipeLeft) {\n          $actionsLeft.find('.swipeout-overswipe').trigger('click', 'f7Overswipe');\n        }\n      } else {\n        $swipeoutEl.trigger('swipeout:close');\n        app.emit('swipeoutClose', $swipeoutEl[0]);\n        Swipeout.el = undefined;\n        $swipeoutEl.addClass('swipeout-transitioning').removeClass('swipeout-opened');\n        $swipeoutContent.transform('');\n        $actions.removeClass('swipeout-actions-opened');\n      }\n      var buttonOffset;\n      if ($leftButtons && $leftButtons.length > 0 && $leftButtons !== $buttons) {\n        $leftButtons.each(function (index, buttonEl) {\n          var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n          buttonOffset = buttonEl.f7SwipeoutButtonOffset;\n          if (typeof buttonOffset === 'undefined') {\n            $buttonEl[0].f7SwipeoutButtonOffset = actionsLeftWidth - buttonEl.offsetLeft - buttonEl.offsetWidth;\n          }\n          $buttonEl.transform(\"translate3d(\".concat(buttonOffset, \"px,0,0)\"));\n        });\n      }\n      if ($rightButtons && $rightButtons.length > 0 && $rightButtons !== $buttons) {\n        $rightButtons.each(function (index, buttonEl) {\n          var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n          buttonOffset = buttonEl.f7SwipeoutButtonOffset;\n          if (typeof buttonOffset === 'undefined') {\n            $buttonEl[0].f7SwipeoutButtonOffset = buttonEl.offsetLeft;\n          }\n          $buttonEl.transform(\"translate3d(\".concat(-buttonOffset, \"px,0,0)\"));\n        });\n      }\n      $swipeoutContent.transitionEnd(function () {\n        if (opened && action === 'open' || !opened && action === 'close') return;\n        $swipeoutEl.trigger(action === 'open' ? 'swipeout:opened' : 'swipeout:closed');\n        app.emit(action === 'open' ? 'swipeoutOpened' : 'swipeoutClosed', $swipeoutEl[0]);\n        $swipeoutEl.removeClass('swipeout-transitioning');\n        if (opened && action === 'close') {\n          if ($actionsRight.length > 0) {\n            $rightButtons.transform('');\n          }\n          if ($actionsLeft.length > 0) {\n            $leftButtons.transform('');\n          }\n        }\n      });\n    }\n    var passiveListener = app.support.passiveListener ? {\n      passive: true\n    } : false;\n    app.on('touchstart', function (e) {\n      if (Swipeout.el) {\n        var $targetEl = Object(dom7_module[\"default\"])(e.target);\n        if (!(Object(dom7_module[\"default\"])(Swipeout.el).is($targetEl[0]) || $targetEl.parents('.swipeout').is(Swipeout.el) || $targetEl.hasClass('modal-in') || ($targetEl.attr('class') || '').indexOf('-backdrop') > 0 || $targetEl.hasClass('actions-modal') || $targetEl.parents('.actions-modal.modal-in, .dialog.modal-in').length > 0)) {\n          app.swipeout.close(Swipeout.el);\n        }\n      }\n    });\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on(app.touchEvents.start, 'li.swipeout', handleTouchStart, passiveListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n  },\n  allow: true,\n  el: undefined,\n  open: function open() {\n    var app = this;\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    var el = args[0],\n      side = args[1],\n      callback = args[2];\n    if (typeof args[1] === 'function') {\n      el = args[0];\n      callback = args[1];\n      side = args[2];\n    }\n    var $el = Object(dom7_module[\"default\"])(el).eq(0);\n    if ($el.length === 0) return;\n    if (!$el.hasClass('swipeout') || $el.hasClass('swipeout-opened')) return;\n    if (!side) {\n      if ($el.find('.swipeout-actions-right').length > 0) side = 'right';else side = 'left';\n    }\n    var $swipeoutActions = $el.find(\".swipeout-actions-\".concat(side));\n    var $swipeoutContent = $el.find('.swipeout-content');\n    if ($swipeoutActions.length === 0) return;\n    $el.trigger('swipeout:open').addClass('swipeout-opened').removeClass('swipeout-transitioning');\n    app.emit('swipeoutOpen', $el[0]);\n    $swipeoutActions.addClass('swipeout-actions-opened');\n    var $buttons = $swipeoutActions.children('a');\n    var swipeoutActionsWidth = $swipeoutActions.outerWidth();\n    var translate = side === 'right' ? -swipeoutActionsWidth : swipeoutActionsWidth;\n    if ($buttons.length > 1) {\n      $buttons.each(function (buttonIndex, buttonEl) {\n        var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n        if (side === 'right') {\n          $buttonEl.transform(\"translate3d(\".concat(-buttonEl.offsetLeft, \"px,0,0)\"));\n        } else {\n          $buttonEl.css('z-index', $buttons.length - buttonIndex).transform(\"translate3d(\".concat(swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft, \"px,0,0)\"));\n        }\n      });\n    }\n    $el.addClass('swipeout-transitioning');\n    $swipeoutContent.transitionEnd(function () {\n      $el.trigger('swipeout:opened');\n      app.emit('swipeoutOpened', $el[0]);\n      if (callback) callback.call($el[0]);\n    });\n    utils[\"default\"].nextFrame(function () {\n      $buttons.transform(\"translate3d(\".concat(translate, \"px,0,0)\"));\n      $swipeoutContent.transform(\"translate3d(\".concat(translate, \"px,0,0)\"));\n    });\n    Swipeout.el = $el[0];\n  },\n  close: function close(el, callback) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el).eq(0);\n    if ($el.length === 0) return;\n    if (!$el.hasClass('swipeout-opened')) return;\n    var side = $el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left';\n    var $swipeoutActions = $el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n    var $buttons = $swipeoutActions.children('a');\n    var swipeoutActionsWidth = $swipeoutActions.outerWidth();\n    Swipeout.allow = false;\n    $el.trigger('swipeout:close');\n    app.emit('swipeoutClose', $el[0]);\n    $el.removeClass('swipeout-opened').addClass('swipeout-transitioning');\n    var closeTimeout;\n    function onSwipeoutClose() {\n      Swipeout.allow = true;\n      if ($el.hasClass('swipeout-opened')) return;\n      $el.removeClass('swipeout-transitioning');\n      $buttons.transform('');\n      $el.trigger('swipeout:closed');\n      app.emit('swipeoutClosed', $el[0]);\n      if (callback) callback.call($el[0]);\n      if (closeTimeout) clearTimeout(closeTimeout);\n    }\n    $el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose);\n    closeTimeout = setTimeout(onSwipeoutClose, 500);\n    $buttons.each(function (index, buttonEl) {\n      var $buttonEl = Object(dom7_module[\"default\"])(buttonEl);\n      if (side === 'right') {\n        $buttonEl.transform(\"translate3d(\".concat(-buttonEl.offsetLeft, \"px,0,0)\"));\n      } else {\n        $buttonEl.transform(\"translate3d(\".concat(swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft, \"px,0,0)\"));\n      }\n      $buttonEl.css({\n        left: '0px'\n      }).removeClass('swipeout-overswipe-active');\n    });\n    if (Swipeout.el && Swipeout.el === $el[0]) Swipeout.el = undefined;\n  },\n  delete: function _delete(el, callback) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el).eq(0);\n    if ($el.length === 0) return;\n    Swipeout.el = undefined;\n    $el.trigger('swipeout:delete');\n    app.emit('swipeoutDelete', $el[0]);\n    $el.css({\n      height: \"\".concat($el.outerHeight(), \"px\")\n    });\n    $el.transitionEnd(function () {\n      $el.trigger('swipeout:deleted');\n      app.emit('swipeoutDeleted', $el[0]);\n      if (callback) callback.call($el[0]);\n      if ($el.parents('.virtual-list').length > 0) {\n        var virtualList = $el.parents('.virtual-list')[0].f7VirtualList;\n        var virtualIndex = $el[0].f7VirtualListIndex;\n        if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex);\n      } else if (app.params.swipeout.removeElements) {\n        if (app.params.swipeout.removeElementsWithTimeout) {\n          setTimeout(function () {\n            $el.remove();\n          }, app.params.swipeout.removeElementsTimeout);\n        } else {\n          $el.remove();\n        }\n      } else {\n        $el.removeClass('swipeout-deleting swipeout-transitioning');\n      }\n    });\n    // eslint-disable-next-line\n    // $el[0]._clientLeft = $el[0].clientLeft;\n    utils[\"default\"].nextFrame(function () {\n      $el.addClass('swipeout-deleting swipeout-transitioning').css({\n        height: '0px'\n      }).find('.swipeout-content').transform('translate3d(-100%,0,0)');\n    });\n  }\n};\n/* harmony default export */ var swipeout_swipeout = ({\n  name: 'swipeout',\n  params: {\n    swipeout: {\n      actionsNoFold: false,\n      noFollow: false,\n      removeElements: true,\n      removeElementsWithTimeout: false,\n      removeElementsTimeout: 0\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      swipeout: {\n        init: Swipeout.init.bind(app),\n        open: Swipeout.open.bind(app),\n        close: Swipeout.close.bind(app),\n        delete: Swipeout.delete.bind(app)\n      }\n    });\n    Object.defineProperty(app.swipeout, 'el', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        return Swipeout.el;\n      },\n      set: function set(el) {\n        Swipeout.el = el;\n      }\n    });\n    Object.defineProperty(app.swipeout, 'allow', {\n      enumerable: true,\n      configurable: true,\n      get: function get() {\n        return Swipeout.allow;\n      },\n      set: function set(allow) {\n        Swipeout.allow = allow;\n      }\n    });\n  },\n  clicks: {\n    '.swipeout-open': function openSwipeout($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.swipeout.open(data.swipeout, data.side);\n    },\n    '.swipeout-close': function closeSwipeout($clickedEl) {\n      var app = this;\n      var $swipeoutEl = $clickedEl.closest('.swipeout');\n      if ($swipeoutEl.length === 0) return;\n      app.swipeout.close($swipeoutEl);\n    },\n    '.swipeout-delete': function deleteSwipeout($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      var $swipeoutEl = $clickedEl.closest('.swipeout');\n      if ($swipeoutEl.length === 0) return;\n      var confirm = data.confirm,\n        confirmTitle = data.confirmTitle;\n      if (data.confirm) {\n        app.dialog.confirm(confirm, confirmTitle, function () {\n          app.swipeout.delete($swipeoutEl);\n        });\n      } else {\n        app.swipeout.delete($swipeoutEl);\n      }\n    }\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      if (!app.params.swipeout) return;\n      app.swipeout.init();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/accordion/accordion.js\n\n\nvar Accordion = {\n  toggleClicked: function toggleClicked($clickedEl) {\n    var app = this;\n    var $accordionItemEl = $clickedEl.closest('.accordion-item').eq(0);\n    if (!$accordionItemEl.length) $accordionItemEl = $clickedEl.parents('li').eq(0);\n    var $accordionContent = $clickedEl.parents('.accordion-item-content').eq(0);\n    if ($accordionContent.length) {\n      if ($accordionContent.parents($accordionItemEl).length) return;\n    }\n    if ($clickedEl.parents('li').length > 1 && $clickedEl.parents('li')[0] !== $accordionItemEl[0]) return;\n    app.accordion.toggle($accordionItemEl);\n  },\n  open: function open(el) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var prevented = false;\n    function prevent() {\n      prevented = true;\n    }\n    $el.trigger('accordion:beforeopen', {\n      prevent: prevent\n    }, prevent);\n    app.emit('accordionBeforeOpen', $el[0], prevent);\n    if (prevented) return;\n    var $list = $el.parents('.accordion-list').eq(0);\n    var $contentEl = $el.children('.accordion-item-content');\n    $contentEl.removeAttr('aria-hidden');\n    if ($contentEl.length === 0) $contentEl = $el.find('.accordion-item-content');\n    if ($contentEl.length === 0) return;\n    var $openedItem = $list.length > 0 && $el.parent().children('.accordion-item-opened');\n    if ($openedItem.length > 0) {\n      app.accordion.close($openedItem);\n    }\n    $contentEl.transitionEnd(function () {\n      if ($el.hasClass('accordion-item-opened')) {\n        $contentEl.transition(0);\n        $contentEl.css('height', 'auto');\n        utils[\"default\"].nextFrame(function () {\n          $contentEl.transition('');\n          $el.trigger('accordion:opened');\n          app.emit('accordionOpened', $el[0]);\n        });\n      } else {\n        $contentEl.css('height', '');\n        $el.trigger('accordion:closed');\n        app.emit('accordionClosed', $el[0]);\n      }\n    });\n    $contentEl.css('height', \"\".concat($contentEl[0].scrollHeight, \"px\"));\n    $el.trigger('accordion:open');\n    $el.addClass('accordion-item-opened');\n    app.emit('accordionOpen', $el[0]);\n  },\n  close: function close(el) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var prevented = false;\n    function prevent() {\n      prevented = true;\n    }\n    $el.trigger('accordion:beforeclose', {\n      prevent: prevent\n    }, prevent);\n    app.emit('accordionBeforeClose', $el[0], prevent);\n    if (prevented) return;\n    var $contentEl = $el.children('.accordion-item-content');\n    if ($contentEl.length === 0) $contentEl = $el.find('.accordion-item-content');\n    $el.removeClass('accordion-item-opened');\n    $contentEl.attr('aria-hidden', true);\n    $contentEl.transition(0);\n    $contentEl.css('height', \"\".concat($contentEl[0].scrollHeight, \"px\"));\n    // Close\n    $contentEl.transitionEnd(function () {\n      if ($el.hasClass('accordion-item-opened')) {\n        $contentEl.transition(0);\n        $contentEl.css('height', 'auto');\n        utils[\"default\"].nextFrame(function () {\n          $contentEl.transition('');\n          $el.trigger('accordion:opened');\n          app.emit('accordionOpened', $el[0]);\n        });\n      } else {\n        $contentEl.css('height', '');\n        $el.trigger('accordion:closed');\n        app.emit('accordionClosed', $el[0]);\n      }\n    });\n    utils[\"default\"].nextFrame(function () {\n      $contentEl.transition('');\n      $contentEl.css('height', '');\n      $el.trigger('accordion:close');\n      app.emit('accordionClose', $el[0]);\n    });\n  },\n  toggle: function toggle(el) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return;\n    if ($el.hasClass('accordion-item-opened')) app.accordion.close(el);else app.accordion.open(el);\n  }\n};\n/* harmony default export */ var accordion = ({\n  name: 'accordion',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      accordion: {\n        open: Accordion.open.bind(app),\n        close: Accordion.close.bind(app),\n        toggle: Accordion.toggle.bind(app)\n      }\n    });\n  },\n  clicks: {\n    '.accordion-item .item-link, .accordion-item-toggle, .links-list.accordion-list > ul > li > a': function open($clickedEl) {\n      var app = this;\n      Accordion.toggleClicked.call(app, $clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/contacts-list/contacts-list.js\n/* harmony default export */ var contacts_list = ({\n  name: 'contactsList'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/virtual-list/virtual-list-class.js\n\n\n\n\n\nfunction virtual_list_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, virtual_list_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction virtual_list_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (virtual_list_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar virtual_list_class_VirtualList = /*#__PURE__*/function (_Framework7Class) {\n  function VirtualList(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, VirtualList);\n    _this = virtual_list_class_callSuper(this, VirtualList, [params, [app]]);\n    var vl = _this;\n    var defaultHeight;\n    if (app.theme === 'md') {\n      defaultHeight = 48;\n    } else if (app.theme === 'ios') {\n      defaultHeight = 44;\n    } else if (app.theme === 'aurora') {\n      defaultHeight = 38;\n    }\n    var defaults = {\n      cols: 1,\n      height: defaultHeight,\n      cache: true,\n      dynamicHeightBufferSize: 1,\n      showFilteredItemsOnly: false,\n      renderExternal: undefined,\n      setListHeight: true,\n      searchByItem: undefined,\n      searchAll: undefined,\n      itemTemplate: undefined,\n      ul: null,\n      createUl: true,\n      scrollableParentEl: undefined,\n      renderItem: function renderItem(item) {\n        return \"\\n          <li>\\n            <div class=\\\"item-content\\\">\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title\\\">\".concat(item, \"</div>\\n              </div>\\n            </div>\\n          </li>\\n        \").trim();\n      },\n      on: {}\n    };\n\n    // Extend defaults with modules params\n    vl.useModulesParams(defaults);\n    vl.params = utils[\"default\"].extend(defaults, params);\n    if (vl.params.height === undefined || !vl.params.height) {\n      vl.params.height = defaultHeight;\n    }\n    vl.$el = Object(dom7_module[\"default\"])(params.el);\n    vl.el = vl.$el[0];\n    if (vl.$el.length === 0) return possibleConstructorReturn_default()(_this, undefined);\n    vl.$el[0].f7VirtualList = vl;\n    vl.items = vl.params.items;\n    if (vl.params.showFilteredItemsOnly) {\n      vl.filteredItems = [];\n    }\n    if (vl.params.itemTemplate) {\n      if (typeof vl.params.itemTemplate === 'string') vl.renderItem = app.t7.compile(vl.params.itemTemplate);else if (typeof vl.params.itemTemplate === 'function') vl.renderItem = vl.params.itemTemplate;\n    } else if (vl.params.renderItem) {\n      vl.renderItem = vl.params.renderItem;\n    }\n    vl.$pageContentEl = vl.$el.parents('.page-content');\n    vl.pageContentEl = vl.$pageContentEl[0];\n    vl.$scrollableParentEl = vl.params.scrollableParentEl ? Object(dom7_module[\"default\"])(vl.params.scrollableParentEl).eq(0) : vl.$pageContentEl;\n    if (!vl.$scrollableParentEl.length && vl.$pageContentEl.length) {\n      vl.$scrollableParentEl = vl.$pageContentEl;\n    }\n    vl.scrollableParentEl = vl.$scrollableParentEl[0];\n\n    // Bad scroll\n    if (typeof vl.params.updatableScroll !== 'undefined') {\n      vl.updatableScroll = vl.params.updatableScroll;\n    } else {\n      vl.updatableScroll = true;\n      if (device[\"default\"].ios && device[\"default\"].osVersion.split('.')[0] < 8) {\n        vl.updatableScroll = false;\n      }\n    }\n\n    // Append <ul>\n    var ul = vl.params.ul;\n    vl.$ul = ul ? Object(dom7_module[\"default\"])(vl.params.ul) : vl.$el.children('ul');\n    if (vl.$ul.length === 0 && vl.params.createUl) {\n      vl.$el.append('<ul></ul>');\n      vl.$ul = vl.$el.children('ul');\n    }\n    vl.ul = vl.$ul[0];\n    var $itemsWrapEl;\n    if (!vl.ul && !vl.params.createUl) $itemsWrapEl = vl.$el;else $itemsWrapEl = vl.$ul;\n    utils[\"default\"].extend(vl, {\n      $itemsWrapEl: $itemsWrapEl,\n      itemsWrapEl: $itemsWrapEl[0],\n      // DOM cached items\n      domCache: {},\n      displayDomCache: {},\n      // Temporary DOM Element\n      tempDomElement: ssr_window_esm[\"document\"].createElement('ul'),\n      // Last repain position\n      lastRepaintY: null,\n      // Fragment\n      fragment: ssr_window_esm[\"document\"].createDocumentFragment(),\n      // Props\n      pageHeight: undefined,\n      rowsPerScreen: undefined,\n      rowsBefore: undefined,\n      rowsAfter: undefined,\n      rowsToRender: undefined,\n      maxBufferHeight: 0,\n      listHeight: undefined,\n      dynamicHeight: typeof vl.params.height === 'function'\n    });\n\n    // Install Modules\n    vl.useModules();\n\n    // Attach events\n    var handleScrollBound = vl.handleScroll.bind(vl);\n    var handleResizeBound = vl.handleResize.bind(vl);\n    var $pageEl;\n    var $tabEl;\n    var $panelEl;\n    var $popupEl;\n    vl.attachEvents = function attachEvents() {\n      $pageEl = vl.$el.parents('.page').eq(0);\n      $tabEl = vl.$el.parents('.tab').filter(function (tabElIndex, tabEl) {\n        return Object(dom7_module[\"default\"])(tabEl).parent('.tabs').parent('.tabs-animated-wrap, .tabs-swipeable-wrap').length === 0;\n      }).eq(0);\n      $panelEl = vl.$el.parents('.panel').eq(0);\n      $popupEl = vl.$el.parents('.popup').eq(0);\n      vl.$scrollableParentEl.on('scroll', handleScrollBound);\n      if ($pageEl.length) $pageEl.on('page:reinit', handleResizeBound);\n      if ($tabEl.length) $tabEl.on('tab:show', handleResizeBound);\n      if ($panelEl.length) $panelEl.on('panel:open', handleResizeBound);\n      if ($popupEl.length) $popupEl.on('popup:open', handleResizeBound);\n      app.on('resize', handleResizeBound);\n    };\n    vl.detachEvents = function attachEvents() {\n      vl.$scrollableParentEl.off('scroll', handleScrollBound);\n      if ($pageEl.length) $pageEl.off('page:reinit', handleResizeBound);\n      if ($tabEl.length) $tabEl.off('tab:show', handleResizeBound);\n      if ($panelEl.length) $panelEl.off('panel:open', handleResizeBound);\n      if ($popupEl.length) $popupEl.off('popup:open', handleResizeBound);\n      app.off('resize', handleResizeBound);\n    };\n    // Init\n    vl.init();\n    return possibleConstructorReturn_default()(_this, vl);\n  }\n  inherits_default()(VirtualList, _Framework7Class);\n  return createClass_default()(VirtualList, [{\n    key: \"setListSize\",\n    value: function setListSize() {\n      var vl = this;\n      var items = vl.filteredItems || vl.items;\n      vl.pageHeight = vl.$scrollableParentEl[0].offsetHeight;\n      if (vl.dynamicHeight) {\n        vl.listHeight = 0;\n        vl.heights = [];\n        for (var i = 0; i < items.length; i += 1) {\n          var itemHeight = vl.params.height(items[i]);\n          vl.listHeight += itemHeight;\n          vl.heights.push(itemHeight);\n        }\n      } else {\n        vl.listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height;\n        vl.rowsPerScreen = Math.ceil(vl.pageHeight / vl.params.height);\n        vl.rowsBefore = vl.params.rowsBefore || vl.rowsPerScreen * 2;\n        vl.rowsAfter = vl.params.rowsAfter || vl.rowsPerScreen;\n        vl.rowsToRender = vl.rowsPerScreen + vl.rowsBefore + vl.rowsAfter;\n        vl.maxBufferHeight = vl.rowsBefore / 2 * vl.params.height;\n      }\n      if (vl.updatableScroll || vl.params.setListHeight) {\n        vl.$itemsWrapEl.css({\n          height: \"\".concat(vl.listHeight, \"px\")\n        });\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render(force, forceScrollTop) {\n      var vl = this;\n      if (force) vl.lastRepaintY = null;\n      var scrollTop = -(vl.$el[0].getBoundingClientRect().top - vl.$scrollableParentEl[0].getBoundingClientRect().top);\n      if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop;\n      if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > vl.maxBufferHeight || !vl.updatableScroll && vl.$scrollableParentEl[0].scrollTop + vl.pageHeight >= vl.$scrollableParentEl[0].scrollHeight) {\n        vl.lastRepaintY = scrollTop;\n      } else {\n        return;\n      }\n      var items = vl.filteredItems || vl.items;\n      var fromIndex;\n      var toIndex;\n      var heightBeforeFirstItem = 0;\n      var heightBeforeLastItem = 0;\n      if (vl.dynamicHeight) {\n        var itemTop = 0;\n        var itemHeight;\n        vl.maxBufferHeight = vl.pageHeight;\n        for (var j = 0; j < vl.heights.length; j += 1) {\n          itemHeight = vl.heights[j];\n          if (typeof fromIndex === 'undefined') {\n            if (itemTop + itemHeight >= scrollTop - vl.pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j;else heightBeforeFirstItem += itemHeight;\n          }\n          if (typeof toIndex === 'undefined') {\n            if (itemTop + itemHeight >= scrollTop + vl.pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1;\n            heightBeforeLastItem += itemHeight;\n          }\n          itemTop += itemHeight;\n        }\n        toIndex = Math.min(toIndex, items.length);\n      } else {\n        fromIndex = (parseInt(scrollTop / vl.params.height, 10) - vl.rowsBefore) * vl.params.cols;\n        if (fromIndex < 0) {\n          fromIndex = 0;\n        }\n        toIndex = Math.min(fromIndex + vl.rowsToRender * vl.params.cols, items.length);\n      }\n      var topPosition;\n      var renderExternalItems = [];\n      vl.reachEnd = false;\n      var i;\n      for (i = fromIndex; i < toIndex; i += 1) {\n        var itemEl = void 0;\n        // Define real item index\n        var index = vl.items.indexOf(items[i]);\n        if (i === fromIndex) vl.currentFromIndex = index;\n        if (i === toIndex - 1) vl.currentToIndex = index;\n        if (vl.filteredItems) {\n          if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true;\n        } else if (index === vl.items.length - 1) vl.reachEnd = true;\n\n        // Find items\n        if (vl.params.renderExternal) {\n          renderExternalItems.push(items[i]);\n        } else if (vl.domCache[index]) {\n          itemEl = vl.domCache[index];\n          itemEl.f7VirtualListIndex = index;\n        } else {\n          if (vl.renderItem) {\n            vl.tempDomElement.innerHTML = vl.renderItem(items[i], index).trim();\n          } else {\n            vl.tempDomElement.innerHTML = items[i].toString().trim();\n          }\n          itemEl = vl.tempDomElement.childNodes[0];\n          if (vl.params.cache) vl.domCache[index] = itemEl;\n          itemEl.f7VirtualListIndex = index;\n        }\n\n        // Set item top position\n        if (i === fromIndex) {\n          if (vl.dynamicHeight) {\n            topPosition = heightBeforeFirstItem;\n          } else {\n            topPosition = i * vl.params.height / vl.params.cols;\n          }\n        }\n        if (!vl.params.renderExternal) {\n          itemEl.style.top = \"\".concat(topPosition, \"px\");\n\n          // Before item insert\n          vl.emit('local::itemBeforeInsert vlItemBeforeInsert', vl, itemEl, items[i]);\n\n          // Append item to fragment\n          vl.fragment.appendChild(itemEl);\n        }\n      }\n\n      // Update list height with not updatable scroll\n      if (!vl.updatableScroll) {\n        if (vl.dynamicHeight) {\n          vl.itemsWrapEl.style.height = \"\".concat(heightBeforeLastItem, \"px\");\n        } else {\n          vl.itemsWrapEl.style.height = \"\".concat(i * vl.params.height / vl.params.cols, \"px\");\n        }\n      }\n\n      // Update list html\n      if (vl.params.renderExternal) {\n        if (items && items.length === 0) {\n          vl.reachEnd = true;\n        }\n      } else {\n        vl.emit('local::beforeClear vlBeforeClear', vl, vl.fragment);\n        vl.itemsWrapEl.innerHTML = '';\n        vl.emit('local::itemsBeforeInsert vlItemsBeforeInsert', vl, vl.fragment);\n        if (items && items.length === 0) {\n          vl.reachEnd = true;\n          if (vl.params.emptyTemplate) vl.itemsWrapEl.innerHTML = vl.params.emptyTemplate;\n        } else {\n          vl.itemsWrapEl.appendChild(vl.fragment);\n        }\n        vl.emit('local::itemsAfterInsert vlItemsAfterInsert', vl, vl.fragment);\n      }\n      if (typeof forceScrollTop !== 'undefined' && force) {\n        vl.$scrollableParentEl.scrollTop(forceScrollTop, 0);\n      }\n      if (vl.params.renderExternal) {\n        vl.params.renderExternal(vl, {\n          fromIndex: fromIndex,\n          toIndex: toIndex,\n          listHeight: vl.listHeight,\n          topPosition: topPosition,\n          items: renderExternalItems\n        });\n      }\n    }\n\n    // Filter\n  }, {\n    key: \"filterItems\",\n    value: function filterItems(indexes) {\n      var resetScrollTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var vl = this;\n      vl.filteredItems = [];\n      for (var i = 0; i < indexes.length; i += 1) {\n        vl.filteredItems.push(vl.items[indexes[i]]);\n      }\n      if (resetScrollTop) {\n        vl.$scrollableParentEl[0].scrollTop = 0;\n      }\n      vl.update();\n    }\n  }, {\n    key: \"resetFilter\",\n    value: function resetFilter() {\n      var vl = this;\n      if (vl.params.showFilteredItemsOnly) {\n        vl.filteredItems = [];\n      } else {\n        vl.filteredItems = null;\n        delete vl.filteredItems;\n      }\n      vl.update();\n    }\n  }, {\n    key: \"scrollToItem\",\n    value: function scrollToItem(index) {\n      var vl = this;\n      if (index > vl.items.length) return false;\n      var itemTop = 0;\n      if (vl.dynamicHeight) {\n        for (var i = 0; i < index; i += 1) {\n          itemTop += vl.heights[i];\n        }\n      } else {\n        itemTop = index * vl.params.height;\n      }\n      var listTop = vl.$el[0].offsetTop;\n      vl.render(true, listTop + itemTop - parseInt(vl.$scrollableParentEl.css('padding-top'), 10));\n      return true;\n    }\n  }, {\n    key: \"handleScroll\",\n    value: function handleScroll() {\n      var vl = this;\n      vl.render();\n    }\n\n    // Handle resize event\n  }, {\n    key: \"isVisible\",\n    value: function isVisible() {\n      var vl = this;\n      return !!(vl.el.offsetWidth || vl.el.offsetHeight || vl.el.getClientRects().length);\n    }\n  }, {\n    key: \"handleResize\",\n    value: function handleResize() {\n      var vl = this;\n      if (vl.isVisible()) {\n        vl.setListSize();\n        vl.render(true);\n      }\n    }\n\n    // Append\n  }, {\n    key: \"appendItems\",\n    value: function appendItems(items) {\n      var vl = this;\n      for (var i = 0; i < items.length; i += 1) {\n        vl.items.push(items[i]);\n      }\n      vl.update();\n    }\n  }, {\n    key: \"appendItem\",\n    value: function appendItem(item) {\n      var vl = this;\n      vl.appendItems([item]);\n    }\n\n    // Replace\n  }, {\n    key: \"replaceAllItems\",\n    value: function replaceAllItems(items) {\n      var vl = this;\n      vl.items = items;\n      delete vl.filteredItems;\n      vl.domCache = {};\n      vl.update();\n    }\n  }, {\n    key: \"replaceItem\",\n    value: function replaceItem(index, item) {\n      var vl = this;\n      vl.items[index] = item;\n      if (vl.params.cache) delete vl.domCache[index];\n      vl.update();\n    }\n\n    // Prepend\n  }, {\n    key: \"prependItems\",\n    value: function prependItems(items) {\n      var vl = this;\n      for (var i = items.length - 1; i >= 0; i -= 1) {\n        vl.items.unshift(items[i]);\n      }\n      if (vl.params.cache) {\n        var newCache = {};\n        Object.keys(vl.domCache).forEach(function (cached) {\n          newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached];\n        });\n        vl.domCache = newCache;\n      }\n      vl.update();\n    }\n  }, {\n    key: \"prependItem\",\n    value: function prependItem(item) {\n      var vl = this;\n      vl.prependItems([item]);\n    }\n\n    // Move\n  }, {\n    key: \"moveItem\",\n    value: function moveItem(from, to) {\n      var vl = this;\n      var fromIndex = from;\n      var toIndex = to;\n      if (fromIndex === toIndex) return;\n      // remove item from array\n      var item = vl.items.splice(fromIndex, 1)[0];\n      if (toIndex >= vl.items.length) {\n        // Add item to the end\n        vl.items.push(item);\n        toIndex = vl.items.length - 1;\n      } else {\n        // Add item to new index\n        vl.items.splice(toIndex, 0, item);\n      }\n      // Update cache\n      if (vl.params.cache) {\n        var newCache = {};\n        Object.keys(vl.domCache).forEach(function (cached) {\n          var cachedIndex = parseInt(cached, 10);\n          var leftIndex = fromIndex < toIndex ? fromIndex : toIndex;\n          var rightIndex = fromIndex < toIndex ? toIndex : fromIndex;\n          var indexShift = fromIndex < toIndex ? -1 : 1;\n          if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex];\n          if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex];\n          if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex];\n        });\n        vl.domCache = newCache;\n      }\n      vl.update();\n    }\n\n    // Insert before\n  }, {\n    key: \"insertItemBefore\",\n    value: function insertItemBefore(index, item) {\n      var vl = this;\n      if (index === 0) {\n        vl.prependItem(item);\n        return;\n      }\n      if (index >= vl.items.length) {\n        vl.appendItem(item);\n        return;\n      }\n      vl.items.splice(index, 0, item);\n      // Update cache\n      if (vl.params.cache) {\n        var newCache = {};\n        Object.keys(vl.domCache).forEach(function (cached) {\n          var cachedIndex = parseInt(cached, 10);\n          if (cachedIndex >= index) {\n            newCache[cachedIndex + 1] = vl.domCache[cachedIndex];\n          }\n        });\n        vl.domCache = newCache;\n      }\n      vl.update();\n    }\n\n    // Delete\n  }, {\n    key: \"deleteItems\",\n    value: function deleteItems(indexes) {\n      var vl = this;\n      var prevIndex;\n      var indexShift = 0;\n      var _loop = function _loop() {\n        var index = indexes[i];\n        if (typeof prevIndex !== 'undefined') {\n          if (index > prevIndex) {\n            indexShift = -i;\n          }\n        }\n        index += indexShift;\n        prevIndex = indexes[i];\n        // Delete item\n        var deletedItem = vl.items.splice(index, 1)[0];\n\n        // Delete from filtered\n        if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) {\n          vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1);\n        }\n        // Update cache\n        if (vl.params.cache) {\n          var newCache = {};\n          Object.keys(vl.domCache).forEach(function (cached) {\n            var cachedIndex = parseInt(cached, 10);\n            if (cachedIndex === index) {\n              delete vl.domCache[index];\n            } else if (parseInt(cached, 10) > index) {\n              newCache[cachedIndex - 1] = vl.domCache[cached];\n            } else {\n              newCache[cachedIndex] = vl.domCache[cached];\n            }\n          });\n          vl.domCache = newCache;\n        }\n      };\n      for (var i = 0; i < indexes.length; i += 1) {\n        _loop();\n      }\n      vl.update();\n    }\n  }, {\n    key: \"deleteAllItems\",\n    value: function deleteAllItems() {\n      var vl = this;\n      vl.items = [];\n      delete vl.filteredItems;\n      if (vl.params.cache) vl.domCache = {};\n      vl.update();\n    }\n  }, {\n    key: \"deleteItem\",\n    value: function deleteItem(index) {\n      var vl = this;\n      vl.deleteItems([index]);\n    }\n\n    // Clear cache\n  }, {\n    key: \"clearCache\",\n    value: function clearCache() {\n      var vl = this;\n      vl.domCache = {};\n    }\n\n    // Update Virtual List\n  }, {\n    key: \"update\",\n    value: function update(deleteCache) {\n      var vl = this;\n      if (deleteCache && vl.params.cache) {\n        vl.domCache = {};\n      }\n      vl.setListSize();\n      vl.render(true);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var vl = this;\n      vl.attachEvents();\n      vl.setListSize();\n      vl.render();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var vl = this;\n      vl.detachEvents();\n      vl.$el[0].f7VirtualList = null;\n      delete vl.$el[0].f7VirtualList;\n      utils[\"default\"].deleteProps(vl);\n      vl = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var virtual_list_class = (virtual_list_class_VirtualList);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/virtual-list/virtual-list.js\n\n\n/* harmony default export */ var virtual_list = ({\n  name: 'virtualList',\n  static: {\n    VirtualList: virtual_list_class\n  },\n  create: function create() {\n    var app = this;\n    app.virtualList = constructor_methods({\n      defaultSelector: '.virtual-list',\n      constructor: virtual_list_class,\n      app: app,\n      domProp: 'f7VirtualList'\n    });\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/list-index/list-index-class.js\n\n\n\n\n\nfunction list_index_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, list_index_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction list_index_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (list_index_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar list_index_class_ListIndex = /*#__PURE__*/function (_Framework7Class) {\n  function ListIndex(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, ListIndex);\n    _this = list_index_class_callSuper(this, ListIndex, [params, [app]]);\n    var index = _this;\n    var defaults = {\n      el: null,\n      // where to render indexes\n      listEl: null,\n      // list el to generate indexes\n      indexes: 'auto',\n      // or array of indexes\n      iosItemHeight: 14,\n      mdItemHeight: 14,\n      auroraItemHeight: 14,\n      scrollList: true,\n      label: false,\n      // eslint-disable-next-line\n      renderItem: function renderItem(itemContent, itemIndex) {\n        return \"\\n          <li>\".concat(itemContent, \"</li>\\n        \").trim();\n      },\n      renderSkipPlaceholder: function renderSkipPlaceholder() {\n        return '<li class=\"list-index-skip-placeholder\"></li>';\n      },\n      on: {}\n    };\n\n    // Extend defaults with modules params\n    index.useModulesParams(defaults);\n    index.params = utils[\"default\"].extend(defaults, params);\n    var $el;\n    var $listEl;\n    var $pageContentEl;\n    var $ul;\n    if (index.params.el) {\n      $el = Object(dom7_module[\"default\"])(index.params.el);\n    } else {\n      return possibleConstructorReturn_default()(_this, index);\n    }\n    if ($el[0].f7ListIndex) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7ListIndex);\n    }\n    $ul = $el.find('ul');\n    if ($ul.length === 0) {\n      $ul = Object(dom7_module[\"default\"])('<ul></ul>');\n      $el.append($ul);\n    }\n    if (index.params.listEl) {\n      $listEl = Object(dom7_module[\"default\"])(index.params.listEl);\n    }\n    if (index.params.indexes === 'auto' && !$listEl) {\n      return possibleConstructorReturn_default()(_this, index);\n    }\n    if ($listEl) {\n      $pageContentEl = $listEl.parents('.page-content').eq(0);\n    } else {\n      $pageContentEl = $el.siblings('.page-content').eq(0);\n      if ($pageContentEl.length === 0) {\n        $pageContentEl = $el.parents('.page').eq(0).find('.page-content').eq(0);\n      }\n    }\n    $el[0].f7ListIndex = index;\n    utils[\"default\"].extend(index, {\n      app: app,\n      $el: $el,\n      el: $el && $el[0],\n      $ul: $ul,\n      ul: $ul && $ul[0],\n      $listEl: $listEl,\n      listEl: $listEl && $listEl[0],\n      $pageContentEl: $pageContentEl,\n      pageContentEl: $pageContentEl && $pageContentEl[0],\n      indexes: params.indexes,\n      height: 0,\n      skipRate: 0\n    });\n\n    // Install Modules\n    index.useModules();\n\n    // Attach events\n    function handleResize() {\n      var height = {\n        index: index\n      };\n      index.calcSize();\n      if (height !== index.height) {\n        index.render();\n      }\n    }\n    function handleClick(e) {\n      var $clickedLi = Object(dom7_module[\"default\"])(e.target).closest('li');\n      if (!$clickedLi.length) return;\n      var itemIndex = $clickedLi.index();\n      if (index.skipRate > 0) {\n        var percentage = itemIndex / ($clickedLi.siblings('li').length - 1);\n        itemIndex = Math.round((index.indexes.length - 1) * percentage);\n      }\n      var itemContent = index.indexes[itemIndex];\n      index.$el.trigger('listindex:click', {\n        content: itemContent,\n        index: itemIndex\n      });\n      index.emit('local::click listIndexClick', index, itemContent, itemIndex);\n      index.$el.trigger('listindex:select', {\n        content: itemContent,\n        index: itemIndex\n      });\n      index.emit('local::select listIndexSelect', index, itemContent, itemIndex);\n      if (index.$listEl && index.params.scrollList) {\n        index.scrollListToIndex(itemContent, itemIndex);\n      }\n    }\n    var touchesStart = {};\n    var isTouched;\n    var isMoved;\n    var topPoint;\n    var bottomPoint;\n    var $labelEl;\n    var previousIndex = null;\n    function handleTouchStart(e) {\n      var $children = $ul.children();\n      if (!$children.length) return;\n      topPoint = $children[0].getBoundingClientRect().top;\n      bottomPoint = $children[$children.length - 1].getBoundingClientRect().top + $children[0].offsetHeight;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      isTouched = true;\n      isMoved = false;\n      previousIndex = null;\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      if (!isMoved && index.params.label) {\n        $labelEl = Object(dom7_module[\"default\"])('<span class=\"list-index-label\"></span>');\n        $el.append($labelEl);\n      }\n      isMoved = true;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      e.preventDefault();\n      var percentage = (pageY - topPoint) / (bottomPoint - topPoint);\n      percentage = Math.min(Math.max(percentage, 0), 1);\n      var itemIndex = Math.round((index.indexes.length - 1) * percentage);\n      var itemContent = index.indexes[itemIndex];\n      var ulHeight = bottomPoint - topPoint;\n      var bubbleBottom = (index.height - ulHeight) / 2 + (1 - percentage) * ulHeight;\n      if (itemIndex !== previousIndex) {\n        if (index.params.label) {\n          $labelEl.html(itemContent).transform(\"translateY(-\".concat(bubbleBottom, \"px)\"));\n        }\n        if (index.$listEl && index.params.scrollList) {\n          index.scrollListToIndex(itemContent, itemIndex);\n        }\n      }\n      previousIndex = itemIndex;\n      index.$el.trigger('listindex:select');\n      index.emit('local::select listIndexSelect', index, itemContent, itemIndex);\n    }\n    function handleTouchEnd() {\n      if (!isTouched) return;\n      isTouched = false;\n      isMoved = false;\n      if (index.params.label) {\n        if ($labelEl) $labelEl.remove();\n        $labelEl = undefined;\n      }\n    }\n    var passiveListener = app.support.passiveListener ? {\n      passive: true\n    } : false;\n    index.attachEvents = function attachEvents() {\n      $el.parents('.tab').on('tab:show', handleResize);\n      $el.parents('.page').on('page:reinit', handleResize);\n      $el.parents('.panel').on('panel:open', handleResize);\n      $el.parents('.sheet-modal, .actions-modal, .popup, .popover, .login-screen, .dialog, .toast').on('modal:open', handleResize);\n      app.on('resize', handleResize);\n      $el.on('click', handleClick);\n      $el.on(app.touchEvents.start, handleTouchStart, passiveListener);\n      app.on('touchmove:active', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n    };\n    index.detachEvents = function attachEvents() {\n      $el.parents('.tab').off('tab:show', handleResize);\n      $el.parents('.page').off('page:reinit', handleResize);\n      $el.parents('.panel').off('panel:open', handleResize);\n      $el.parents('.sheet-modal, .actions-modal, .popup, .popover, .login-screen, .dialog, .toast').off('modal:open', handleResize);\n      app.off('resize', handleResize);\n      $el.off('click', handleClick);\n      $el.off(app.touchEvents.start, handleTouchStart, passiveListener);\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n    };\n    // Init\n    index.init();\n    return possibleConstructorReturn_default()(_this, index);\n  }\n  // eslint-disable-next-line\n  inherits_default()(ListIndex, _Framework7Class);\n  return createClass_default()(ListIndex, [{\n    key: \"scrollListToIndex\",\n    value: function scrollListToIndex(itemContent, itemIndex) {\n      var index = this;\n      var $listEl = index.$listEl,\n        $pageContentEl = index.$pageContentEl,\n        app = index.app;\n      if (!$listEl || !$pageContentEl || $pageContentEl.length === 0) return index;\n      var $scrollToEl;\n      $listEl.find('.list-group-title, .item-divider').each(function (elIndex, el) {\n        if ($scrollToEl) return;\n        var $el = Object(dom7_module[\"default\"])(el);\n        if ($el.text() === itemContent) {\n          $scrollToEl = $el;\n        }\n      });\n      if (!$scrollToEl || $scrollToEl.length === 0) return index;\n      var parentTop = $scrollToEl.parent().offset().top;\n      var paddingTop = parseInt($pageContentEl.css('padding-top'), 10);\n      var scrollTop = $pageContentEl[0].scrollTop;\n      var scrollToElTop = $scrollToEl.offset().top;\n      if ($pageContentEl.parents('.page-with-navbar-large').length) {\n        var navbarInnerEl = app.navbar.getElByPage($pageContentEl.parents('.page-with-navbar-large').eq(0));\n        var $titleLargeEl = Object(dom7_module[\"default\"])(navbarInnerEl).find('.title-large');\n        if ($titleLargeEl.length) {\n          paddingTop -= $titleLargeEl[0].offsetHeight || 0;\n        }\n      }\n      if (parentTop <= paddingTop) {\n        $pageContentEl.scrollTop(parentTop + scrollTop - paddingTop);\n      } else {\n        $pageContentEl.scrollTop(scrollToElTop + scrollTop - paddingTop);\n      }\n      return index;\n    }\n  }, {\n    key: \"renderSkipPlaceholder\",\n    value: function renderSkipPlaceholder() {\n      var index = this;\n      return index.params.renderSkipPlaceholder.call(index);\n    }\n  }, {\n    key: \"renderItem\",\n    value: function renderItem(itemContent, itemIndex) {\n      var index = this;\n      return index.params.renderItem.call(index, itemContent, itemIndex);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var index = this;\n      var $ul = index.$ul,\n        indexes = index.indexes,\n        skipRate = index.skipRate;\n      var wasSkipped;\n      var html = indexes.map(function (itemContent, itemIndex) {\n        if (itemIndex % skipRate !== 0 && skipRate > 0) {\n          wasSkipped = true;\n          return '';\n        }\n        var itemHtml = index.renderItem(itemContent, itemIndex);\n        if (wasSkipped) {\n          itemHtml = index.renderSkipPlaceholder() + itemHtml;\n        }\n        wasSkipped = false;\n        return itemHtml;\n      }).join('');\n      $ul.html(html);\n      return index;\n    }\n  }, {\n    key: \"calcSize\",\n    value: function calcSize() {\n      var index = this;\n      var app = index.app,\n        params = index.params,\n        el = index.el,\n        indexes = index.indexes;\n      var height = el.offsetHeight;\n      var itemHeight = params[\"\".concat(app.theme, \"ItemHeight\")];\n      var maxItems = Math.floor(height / itemHeight);\n      var items = indexes.length;\n      var skipRate = 0;\n      if (items > maxItems) {\n        skipRate = Math.ceil((items * 2 - 1) / maxItems);\n      }\n      index.height = height;\n      index.skipRate = skipRate;\n      return index;\n    }\n  }, {\n    key: \"calcIndexes\",\n    value: function calcIndexes() {\n      var index = this;\n      if (index.params.indexes === 'auto') {\n        index.indexes = [];\n        index.$listEl.find('.list-group-title, .item-divider').each(function (elIndex, el) {\n          var elContent = Object(dom7_module[\"default\"])(el).text();\n          if (index.indexes.indexOf(elContent) < 0) {\n            index.indexes.push(elContent);\n          }\n        });\n      } else {\n        index.indexes = index.params.indexes;\n      }\n      return index;\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var index = this;\n      index.calcIndexes();\n      index.calcSize();\n      index.render();\n      return index;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var index = this;\n      index.calcIndexes();\n      index.calcSize();\n      index.render();\n      index.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var index = this;\n      index.$el.trigger('listindex:beforedestroy', index);\n      index.emit('local::beforeDestroy listIndexBeforeDestroy');\n      index.detachEvents();\n      if (index.$el[0]) {\n        index.$el[0].f7ListIndex = null;\n        delete index.$el[0].f7ListIndex;\n      }\n      utils[\"default\"].deleteProps(index);\n      index = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var list_index_class = (list_index_class_ListIndex);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/list-index/list-index.js\n\n\n\n\n/* harmony default export */ var list_index = ({\n  name: 'listIndex',\n  static: {\n    ListIndex: list_index_class\n  },\n  create: function create() {\n    var app = this;\n    app.listIndex = constructor_methods({\n      defaultSelector: '.list-index',\n      constructor: list_index_class,\n      app: app,\n      domProp: 'f7ListIndex'\n    });\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.list-index-init').each(function (index, listIndexEl) {\n        var params = utils[\"default\"].extend(Object(dom7_module[\"default\"])(listIndexEl).dataset(), {\n          el: listIndexEl\n        });\n        app.listIndex.create(params);\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.list-index-init').each(function (index, listIndexEl) {\n        if (listIndexEl.f7ListIndex) listIndexEl.f7ListIndex.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.list-index-init').each(function (index, listIndexEl) {\n        var params = utils[\"default\"].extend(Object(dom7_module[\"default\"])(listIndexEl).dataset(), {\n          el: listIndexEl\n        });\n        app.listIndex.create(params);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.list-index-init').each(function (index, listIndexEl) {\n        if (listIndexEl.f7ListIndex) listIndexEl.f7ListIndex.destroy();\n      });\n    }\n  },\n  vnode: {\n    'list-index-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var listIndexEl = vnode.elm;\n        var params = utils[\"default\"].extend(Object(dom7_module[\"default\"])(listIndexEl).dataset(), {\n          el: listIndexEl\n        });\n        app.listIndex.create(params);\n      },\n      destroy: function destroy(vnode) {\n        var listIndexEl = vnode.elm;\n        if (listIndexEl.f7ListIndex) listIndexEl.f7ListIndex.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/timeline/timeline.js\n/* harmony default export */ var timeline = ({\n  name: 'timeline'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/tabs/tabs.js\n\n\nvar Tab = {\n  show: function show() {\n    var app = this;\n    var tabEl;\n    var tabLinkEl;\n    var animate;\n    var tabRoute;\n    var animatedInit;\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    if (args.length === 1 && args[0] && args[0].constructor === Object) {\n      tabEl = args[0].tabEl;\n      tabLinkEl = args[0].tabLinkEl;\n      animate = args[0].animate;\n      tabRoute = args[0].tabRoute;\n      animatedInit = args[0].animatedInit;\n    } else {\n      tabEl = args[0];\n      tabLinkEl = args[1];\n      animate = args[2];\n      tabRoute = args[3];\n      if (typeof args[1] === 'boolean') {\n        tabEl = args[0];\n        animate = args[1];\n        tabLinkEl = args[2];\n        tabRoute = args[3];\n        if (args.length > 2 && tabLinkEl.constructor === Object) {\n          tabEl = args[0];\n          animate = args[1];\n          tabRoute = args[2];\n          tabLinkEl = args[3];\n        }\n      }\n    }\n    if (typeof animate === 'undefined') animate = true;\n    var $newTabEl = Object(dom7_module[\"default\"])(tabEl);\n    if (tabRoute && $newTabEl[0]) {\n      $newTabEl[0].f7TabRoute = tabRoute;\n    }\n    if (!animatedInit && ($newTabEl.length === 0 || $newTabEl.hasClass('tab-active'))) {\n      return {\n        $newTabEl: $newTabEl,\n        newTabEl: $newTabEl[0]\n      };\n    }\n    var $tabLinkEl;\n    if (tabLinkEl) $tabLinkEl = Object(dom7_module[\"default\"])(tabLinkEl);\n    var $tabsEl = $newTabEl.parent('.tabs');\n    if ($tabsEl.length === 0) {\n      return {\n        $newTabEl: $newTabEl,\n        newTabEl: $newTabEl[0]\n      };\n    }\n\n    // Release swipeouts in hidden tabs\n    if (app.swipeout) app.swipeout.allowOpen = true;\n\n    // Animated tabs\n    var tabsChangedCallbacks = [];\n    function onTabsChanged(callback) {\n      tabsChangedCallbacks.push(callback);\n    }\n    function tabsChanged() {\n      tabsChangedCallbacks.forEach(function (callback) {\n        callback();\n      });\n    }\n    var animated = false;\n    if ($tabsEl.parent().hasClass('tabs-animated-wrap')) {\n      $tabsEl.parent()[animate ? 'removeClass' : 'addClass']('not-animated');\n      var transitionDuration = parseFloat($tabsEl.css('transition-duration').replace(',', '.'));\n      if (animate && transitionDuration) {\n        $tabsEl.transitionEnd(tabsChanged);\n        animated = true;\n      }\n      var tabsTranslate = (app.rtl ? $newTabEl.index() : -$newTabEl.index()) * 100;\n      $tabsEl.transform(\"translate3d(\".concat(tabsTranslate, \"%,0,0)\"));\n    }\n\n    // Swipeable tabs\n    var swiper;\n    if ($tabsEl.parent().hasClass('tabs-swipeable-wrap') && app.swiper) {\n      swiper = $tabsEl.parent()[0].swiper;\n      if (swiper && swiper.activeIndex !== $newTabEl.index()) {\n        animated = true;\n        swiper.once('slideChangeTransitionEnd', function () {\n          tabsChanged();\n        }).slideTo($newTabEl.index(), animate ? undefined : 0);\n      } else if (swiper && swiper.animating) {\n        animated = true;\n        swiper.once('slideChangeTransitionEnd', function () {\n          tabsChanged();\n        });\n      }\n    }\n\n    // Remove active class from old tabs\n    var $oldTabEl = $tabsEl.children('.tab-active');\n    $oldTabEl.removeClass('tab-active');\n    if (!animatedInit && (!swiper || swiper && !swiper.animating || swiper && tabRoute)) {\n      if ($oldTabEl.hasClass('view') && $oldTabEl.children('.page').length) {\n        $oldTabEl.children('.page').each(function (pageIndex, pageEl) {\n          Object(dom7_module[\"default\"])(pageEl).trigger('page:tabhide');\n          app.emit('pageTabHide', pageEl);\n        });\n      }\n      $oldTabEl.trigger('tab:hide');\n      app.emit('tabHide', $oldTabEl[0]);\n    }\n\n    // Trigger 'show' event on new tab\n    $newTabEl.addClass('tab-active');\n    if (!animatedInit && (!swiper || swiper && !swiper.animating || swiper && tabRoute)) {\n      if ($newTabEl.hasClass('view') && $newTabEl.children('.page').length) {\n        $newTabEl.children('.page').each(function (pageIndex, pageEl) {\n          Object(dom7_module[\"default\"])(pageEl).trigger('page:tabshow');\n          app.emit('pageTabShow', pageEl);\n        });\n      }\n      $newTabEl.trigger('tab:show');\n      app.emit('tabShow', $newTabEl[0]);\n    }\n\n    // Find related link for new tab\n    if (!$tabLinkEl) {\n      // Search by id\n      if (typeof tabEl === 'string') $tabLinkEl = Object(dom7_module[\"default\"])(\".tab-link[href=\\\"\".concat(tabEl, \"\\\"]\"));else $tabLinkEl = Object(dom7_module[\"default\"])(\".tab-link[href=\\\"#\".concat($newTabEl.attr('id'), \"\\\"]\"));\n      // Search by data-tab\n      if (!$tabLinkEl || $tabLinkEl && $tabLinkEl.length === 0) {\n        Object(dom7_module[\"default\"])('[data-tab]').each(function (index, el) {\n          if ($newTabEl.is(Object(dom7_module[\"default\"])(el).attr('data-tab'))) $tabLinkEl = Object(dom7_module[\"default\"])(el);\n        });\n      }\n      if (tabRoute && (!$tabLinkEl || $tabLinkEl && $tabLinkEl.length === 0)) {\n        $tabLinkEl = Object(dom7_module[\"default\"])(\"[data-route-tab-id=\\\"\".concat(tabRoute.route.tab.id, \"\\\"]\"));\n        if ($tabLinkEl.length === 0) {\n          $tabLinkEl = Object(dom7_module[\"default\"])(\".tab-link[href=\\\"\".concat(tabRoute.url, \"\\\"]\"));\n        }\n      }\n      if ($tabLinkEl.length > 1 && $newTabEl.parents('.page').length) {\n        // eslint-disable-next-line\n        $tabLinkEl = $tabLinkEl.filter(function (index, tabLinkElement) {\n          return Object(dom7_module[\"default\"])(tabLinkElement).parents('.page')[0] === $newTabEl.parents('.page')[0];\n        });\n        if (app.theme === 'ios' && $tabLinkEl.length === 0 && tabRoute) {\n          var $pageEl = $newTabEl.parents('.page');\n          var $navbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($pageEl));\n          $tabLinkEl = $navbarEl.find(\"[data-route-tab-id=\\\"\".concat(tabRoute.route.tab.id, \"\\\"]\"));\n          if ($tabLinkEl.length === 0) {\n            $tabLinkEl = $navbarEl.find(\".tab-link[href=\\\"\".concat(tabRoute.url, \"\\\"]\"));\n          }\n        }\n      }\n    }\n    if ($tabLinkEl.length > 0) {\n      // Find related link for old tab\n      var $oldTabLinkEl;\n      if ($oldTabEl && $oldTabEl.length > 0) {\n        // Search by id\n        var oldTabId = $oldTabEl.attr('id');\n        if (oldTabId) {\n          $oldTabLinkEl = Object(dom7_module[\"default\"])(\".tab-link[href=\\\"#\".concat(oldTabId, \"\\\"]\"));\n          // Search by data-route-tab-id\n          if (!$oldTabLinkEl || $oldTabLinkEl && $oldTabLinkEl.length === 0) {\n            $oldTabLinkEl = Object(dom7_module[\"default\"])(\".tab-link[data-route-tab-id=\\\"\".concat(oldTabId, \"\\\"]\"));\n          }\n        }\n        // Search by data-tab\n        if (!$oldTabLinkEl || $oldTabLinkEl && $oldTabLinkEl.length === 0) {\n          Object(dom7_module[\"default\"])('[data-tab]').each(function (index, tabLinkElement) {\n            if ($oldTabEl.is(Object(dom7_module[\"default\"])(tabLinkElement).attr('data-tab'))) $oldTabLinkEl = Object(dom7_module[\"default\"])(tabLinkElement);\n          });\n        }\n        if (!$oldTabLinkEl || $oldTabLinkEl && $oldTabLinkEl.length === 0) {\n          $oldTabLinkEl = $tabLinkEl.siblings('.tab-link-active');\n        }\n      } else if (tabRoute) {\n        $oldTabLinkEl = $tabLinkEl.siblings('.tab-link-active');\n      }\n      if ($oldTabLinkEl && $oldTabLinkEl.length > 1 && $oldTabEl && $oldTabEl.parents('.page').length) {\n        // eslint-disable-next-line\n        $oldTabLinkEl = $oldTabLinkEl.filter(function (index, tabLinkElement) {\n          return Object(dom7_module[\"default\"])(tabLinkElement).parents('.page')[0] === $oldTabEl.parents('.page')[0];\n        });\n      }\n      if ($oldTabLinkEl && $oldTabLinkEl.length > 0) $oldTabLinkEl.removeClass('tab-link-active');\n\n      // Update links' classes\n      if ($tabLinkEl && $tabLinkEl.length > 0) {\n        $tabLinkEl.addClass('tab-link-active');\n        // Material Highlight\n        if (app.theme === 'md' && app.toolbar) {\n          var $tabbarEl = $tabLinkEl.parents('.tabbar, .tabbar-labels');\n          if ($tabbarEl.length > 0) {\n            app.toolbar.setHighlight($tabbarEl);\n          }\n        }\n      }\n    }\n    return {\n      $newTabEl: $newTabEl,\n      newTabEl: $newTabEl[0],\n      $oldTabEl: $oldTabEl,\n      oldTabEl: $oldTabEl[0],\n      onTabsChanged: onTabsChanged,\n      animated: animated\n    };\n  }\n};\n/* harmony default export */ var tabs = ({\n  name: 'tabs',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      tab: {\n        show: Tab.show.bind(app)\n      }\n    });\n  },\n  on: {\n    'pageInit tabMounted': function onInit(pageOrTabEl) {\n      var $el = Object(dom7_module[\"default\"])(pageOrTabEl.el || pageOrTabEl);\n      var animatedTabEl = $el.find('.tabs-animated-wrap > .tabs > .tab-active')[0];\n      if (!animatedTabEl) return;\n      var app = this;\n      app.tab.show({\n        tabEl: animatedTabEl,\n        animatedInit: true,\n        animate: false\n      });\n    }\n  },\n  clicks: {\n    '.tab-link': function tabLinkClick($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      if ($clickedEl.attr('href') && $clickedEl.attr('href').indexOf('#') === 0 || $clickedEl.attr('data-tab')) {\n        var app = this;\n        app.tab.show({\n          tabEl: data.tab || $clickedEl.attr('href'),\n          tabLinkEl: $clickedEl,\n          animate: data.animate\n        });\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/panel/swipe-panel.js\n\n\nfunction swipePanel(panel) {\n  var app = panel.app;\n  if (panel.swipeInitialized) {\n    return;\n  }\n  utils[\"default\"].extend(panel, {\n    swipeable: true,\n    swipeInitialized: true\n  });\n  var params = panel.params;\n  var $el = panel.$el,\n    $backdropEl = panel.$backdropEl,\n    side = panel.side,\n    effect = panel.effect;\n  var otherPanel;\n  var isTouched;\n  var isGestureStarted;\n  var isMoved;\n  var isScrolling;\n  var isInterrupted;\n  var touchesStart = {};\n  var touchStartTime;\n  var touchesDiff;\n  var translate;\n  var backdropOpacity;\n  var panelWidth;\n  var direction;\n  var $viewEl;\n  var touchMoves = 0;\n  function handleTouchStart(e) {\n    if (!panel.swipeable || isGestureStarted) return;\n    if (!app.panel.allowOpen || !params.swipe && !params.swipeOnlyClose || isTouched) return;\n    if (Object(dom7_module[\"default\"])('.modal-in:not(.toast):not(.notification), .photo-browser-in').length > 0) return;\n    otherPanel = app.panel.get(side === 'left' ? 'right' : 'left') || {};\n    var otherPanelOpened = otherPanel.opened && otherPanel.$el && !otherPanel.$el.hasClass('panel-in-breakpoint');\n    if (!panel.opened && otherPanelOpened) {\n      return;\n    }\n    if (!params.swipeOnlyClose) {\n      if (otherPanelOpened) return;\n    }\n    if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return;\n    if (Object(dom7_module[\"default\"])(e.target).closest('.range-slider, .tabs-swipeable-wrap, .calendar-months, .no-swipe-panel, .card-opened').length > 0) return;\n    touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n    touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    if (params.swipeOnlyClose && !panel.opened) {\n      return;\n    }\n    if (params.swipeActiveArea && !panel.opened) {\n      if (side === 'left') {\n        if (touchesStart.x > params.swipeActiveArea) return;\n      }\n      if (side === 'right') {\n        if (touchesStart.x < app.width - params.swipeActiveArea) return;\n      }\n    }\n    touchMoves = 0;\n    $viewEl = Object(dom7_module[\"default\"])(panel.getViewEl());\n    isMoved = false;\n    isTouched = true;\n    isScrolling = undefined;\n    isInterrupted = false;\n    touchStartTime = utils[\"default\"].now();\n    direction = undefined;\n  }\n  function handleTouchMove(e) {\n    if (!isTouched || isGestureStarted || isInterrupted) return;\n    touchMoves += 1;\n    if (touchMoves < 2) return;\n    if (e.f7PreventSwipePanel || app.preventSwipePanelBySwipeBack || app.preventSwipePanel) {\n      isTouched = false;\n      return;\n    }\n    var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n    var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n    if (typeof isScrolling === 'undefined') {\n      isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n    }\n    if (isScrolling) {\n      isTouched = false;\n      return;\n    }\n    if (!direction) {\n      if (pageX > touchesStart.x) {\n        direction = 'to-right';\n      } else {\n        direction = 'to-left';\n      }\n      if (params.swipeActiveArea > 0 && !panel.opened) {\n        if (side === 'left' && touchesStart.x > params.swipeActiveArea) {\n          isTouched = false;\n          return;\n        }\n        if (side === 'right' && touchesStart.x < app.width - params.swipeActiveArea) {\n          isTouched = false;\n          return;\n        }\n      }\n      if ($el.hasClass('panel-in-breakpoint')) {\n        isTouched = false;\n        return;\n      }\n      if (side === 'left' && direction === 'to-left' && !$el.hasClass('panel-in') || side === 'right' && direction === 'to-right' && !$el.hasClass('panel-in')) {\n        isTouched = false;\n        return;\n      }\n    }\n    var threshold = panel.opened ? 0 : -params.swipeThreshold;\n    if (side === 'right') threshold = -threshold;\n    if (!isMoved) {\n      if (!panel.opened) {\n        panel.insertToRoot();\n        $el.addClass('panel-in-swipe');\n        $backdropEl.css('visibility', 'visible');\n        $el.trigger('panel:swipeopen');\n        panel.emit('local::swipeOpen panelSwipeOpen', panel);\n      }\n      panelWidth = $el[0].offsetWidth;\n      if (effect === 'reveal' && $el.hasClass('panel-in-collapsed')) {\n        panelWidth -= parseFloat($viewEl.css(\"margin-\".concat(side)));\n      }\n      $el.transition(0);\n    }\n    isMoved = true;\n    e.preventDefault();\n    touchesDiff = pageX - touchesStart.x + threshold;\n    if (side === 'right') {\n      if (effect === 'cover') {\n        translate = touchesDiff + (panel.opened ? 0 : panelWidth);\n        if (translate < 0) translate = 0;\n        if (translate > panelWidth) {\n          translate = panelWidth;\n        }\n      } else {\n        translate = touchesDiff - (panel.opened ? panelWidth : 0);\n        if (translate > 0) translate = 0;\n        if (translate < -panelWidth) {\n          translate = -panelWidth;\n        }\n      }\n    } else {\n      translate = touchesDiff + (panel.opened ? panelWidth : 0);\n      if (translate < 0) translate = 0;\n      if (translate > panelWidth) {\n        translate = panelWidth;\n      }\n    }\n    var noFollowProgress = Math.abs(translate / panelWidth);\n    if (effect === 'reveal') {\n      if (!params.swipeNoFollow) {\n        $viewEl.transform(\"translate3d(\".concat(translate, \"px,0,0)\")).transition(0);\n        $backdropEl.transform(\"translate3d(\".concat(translate, \"px,0,0)\")).transition(0);\n      }\n      $el.trigger('panel:swipe', Math.abs(translate / panelWidth));\n      panel.emit('local::swipe panelSwipe', panel, Math.abs(translate / panelWidth));\n    } else {\n      if (side === 'left') translate -= panelWidth;\n      if (!params.swipeNoFollow) {\n        $el.transform(\"translate3d(\".concat(translate, \"px,0,0)\")).transition(0);\n        $backdropEl.transition(0);\n        backdropOpacity = 1 - Math.abs(translate / panelWidth);\n        $backdropEl.css({\n          opacity: backdropOpacity\n        });\n      }\n      $el.trigger('panel:swipe', Math.abs(translate / panelWidth));\n      panel.emit('local::swipe panelSwipe', panel, Math.abs(translate / panelWidth));\n    }\n    if (params.swipeNoFollow) {\n      var stateChanged = panel.opened && noFollowProgress === 0 || !panel.opened && noFollowProgress === 1;\n      if (stateChanged) {\n        isInterrupted = true;\n        // eslint-disable-next-line\n        handleTouchEnd(e);\n      }\n    }\n  }\n  function handleTouchEnd(e) {\n    if (!isTouched || !isMoved) {\n      isTouched = false;\n      isMoved = false;\n      return;\n    }\n    var isGesture = e.type === 'gesturestart' || isGestureStarted;\n    isTouched = false;\n    isMoved = false;\n    var timeDiff = new Date().getTime() - touchStartTime;\n    var action;\n    var edge = (translate === 0 || Math.abs(translate) === panelWidth) && !params.swipeNoFollow;\n    var threshold = params.swipeThreshold || 0;\n    if (isGesture) {\n      action = 'reset';\n    } else if (!panel.opened) {\n      if (Math.abs(touchesDiff) < threshold) {\n        action = 'reset';\n      } else if (effect === 'cover') {\n        if (translate === 0) {\n          action = 'swap'; // open\n        } else if (timeDiff < 300 && Math.abs(translate) > 0) {\n          action = 'swap'; // open\n        } else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n          action = 'swap'; // open\n        } else {\n          action = 'reset'; // close\n        }\n      } else if (translate === 0) {\n        action = 'reset';\n      } else if (timeDiff < 300 && Math.abs(translate) > 0 || timeDiff >= 300 && Math.abs(translate) >= panelWidth / 2) {\n        action = 'swap';\n      } else {\n        action = 'reset';\n      }\n    } else if (effect === 'cover') {\n      if (translate === 0) {\n        action = 'reset'; // open\n      } else if (timeDiff < 300 && Math.abs(translate) > 0) {\n        action = 'swap'; // open\n      } else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n        action = 'reset'; // open\n      } else {\n        action = 'swap'; // close\n      }\n    } else if (translate === -panelWidth) {\n      action = 'reset';\n    } else if (timeDiff < 300 && Math.abs(translate) >= 0 || timeDiff >= 300 && Math.abs(translate) <= panelWidth / 2) {\n      if (side === 'left' && translate === panelWidth) action = 'reset';else action = 'swap';\n    } else {\n      action = 'reset';\n    }\n    if (action === 'swap') {\n      if (panel.opened) {\n        panel.close(!edge);\n      } else {\n        panel.open(!edge);\n      }\n    }\n    var removePanelInClass = true;\n    if (action === 'reset') {\n      if (!panel.opened) {\n        if (edge) {\n          // edge position\n          $el.removeClass('panel-in-swipe');\n        } else {\n          removePanelInClass = false;\n          var target = effect === 'reveal' ? $viewEl : $el;\n          Object(dom7_module[\"default\"])('html').addClass('with-panel-closing');\n          target.transitionEnd(function () {\n            if ($el.hasClass('panel-in')) return;\n            $el.removeClass('panel-in-swipe');\n            Object(dom7_module[\"default\"])('html').removeClass('with-panel-closing');\n          });\n        }\n      }\n    }\n    if (effect === 'reveal') {\n      utils[\"default\"].nextFrame(function () {\n        $viewEl.transition('');\n        $viewEl.transform('');\n      });\n    }\n    if (removePanelInClass) {\n      $el.removeClass('panel-in-swipe');\n    }\n    $el.transition('').transform('');\n    $backdropEl.transform('').transition('').css({\n      opacity: '',\n      visibility: ''\n    });\n  }\n  function handleGestureStart(e) {\n    isGestureStarted = true;\n    handleTouchEnd(e);\n  }\n  function handleGestureEnd() {\n    isGestureStarted = false;\n  }\n\n  // Add Events\n  app.on('touchstart:passive', handleTouchStart);\n  app.on('touchmove:active', handleTouchMove);\n  app.on('touchend:passive', handleTouchEnd);\n  app.on('gesturestart', handleGestureStart);\n  app.on('gestureend', handleGestureEnd);\n  panel.on('panelDestroy', function () {\n    app.off('touchstart:passive', handleTouchStart);\n    app.off('touchmove:active', handleTouchMove);\n    app.off('touchend:passive', handleTouchEnd);\n    app.off('gesturestart', handleGestureStart);\n    app.off('gestureend', handleGestureEnd);\n  });\n}\n/* harmony default export */ var swipe_panel = (swipePanel);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/panel/resizable-panel.js\n\n\n\nfunction resizablePanel(panel) {\n  var app = panel.app;\n  if (panel.resizableInitialized) return;\n  utils[\"default\"].extend(panel, {\n    resizable: true,\n    resizableWidth: null,\n    resizableInitialized: true\n  });\n  var $htmlEl = Object(dom7_module[\"default\"])('html');\n  var $el = panel.$el,\n    $backdropEl = panel.$backdropEl,\n    side = panel.side,\n    effect = panel.effect;\n  if (!$el) return;\n  var isTouched;\n  var isMoved;\n  var touchesStart = {};\n  var touchesDiff;\n  var panelWidth;\n  var $viewEl;\n  var panelMinWidth;\n  var panelMaxWidth;\n  var visibleByBreakpoint;\n  function transformCSSWidth(v) {\n    if (!v) return null;\n    if (v.indexOf('%') >= 0 || v.indexOf('vw') >= 0) {\n      return parseInt(v, 10) / 100 * app.width;\n    }\n    var newV = parseInt(v, 10);\n    if (Number.isNaN(newV)) return null;\n    return newV;\n  }\n  function isResizable() {\n    return panel.resizable && $el.hasClass('panel-resizable');\n  }\n  function handleTouchStart(e) {\n    if (!isResizable()) return;\n    touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n    touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    isMoved = false;\n    isTouched = true;\n    panelMinWidth = transformCSSWidth($el.css('min-width'));\n    panelMaxWidth = transformCSSWidth($el.css('max-width'));\n    visibleByBreakpoint = $el.hasClass('panel-in-breakpoint');\n  }\n  function handleTouchMove(e) {\n    if (!isTouched) return;\n    var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n    if (!isMoved) {\n      panelWidth = $el[0].offsetWidth;\n      $el.transition(0);\n      $el.addClass('panel-resizing');\n      $htmlEl.css('cursor', 'col-resize');\n      if (effect === 'reveal' || visibleByBreakpoint) {\n        $viewEl = Object(dom7_module[\"default\"])(panel.getViewEl());\n      }\n      if (effect === 'reveal' && !visibleByBreakpoint) {\n        $backdropEl.transition(0);\n        $viewEl.transition(0);\n      }\n    }\n    isMoved = true;\n    e.preventDefault();\n    touchesDiff = pageX - touchesStart.x;\n    var newPanelWidth = side === 'left' ? panelWidth + touchesDiff : panelWidth - touchesDiff;\n    if (panelMinWidth && !Number.isNaN(panelMinWidth)) {\n      newPanelWidth = Math.max(newPanelWidth, panelMinWidth);\n    }\n    if (panelMaxWidth && !Number.isNaN(panelMaxWidth)) {\n      newPanelWidth = Math.min(newPanelWidth, panelMaxWidth);\n    }\n    newPanelWidth = Math.min(Math.max(newPanelWidth, 0), app.width);\n    panel.resizableWidth = newPanelWidth;\n    $el[0].style.width = \"\".concat(newPanelWidth, \"px\");\n    if (effect === 'reveal' && !visibleByBreakpoint) {\n      if ($viewEl) {\n        $viewEl.transform(\"translate3d(\".concat(side === 'left' ? newPanelWidth : -newPanelWidth, \"px, 0, 0)\"));\n      }\n      if ($backdropEl) {\n        $backdropEl.transform(\"translate3d(\".concat(side === 'left' ? newPanelWidth : -newPanelWidth, \"px, 0, 0)\"));\n      }\n    } else if (visibleByBreakpoint && $viewEl) {\n      $viewEl.css(\"margin-\".concat(side), \"\".concat(newPanelWidth, \"px\"));\n    }\n    $el.trigger('panel:resize', newPanelWidth);\n    panel.emit('local::resize panelResize', panel, newPanelWidth);\n  }\n  function handleTouchEnd() {\n    Object(dom7_module[\"default\"])('html').css('cursor', '');\n    if (!isTouched || !isMoved) {\n      isTouched = false;\n      isMoved = false;\n      return;\n    }\n    isTouched = false;\n    isMoved = false;\n    $htmlEl[0].style.setProperty(\"--f7-panel-\".concat(side, \"-width\"), \"\".concat(panel.resizableWidth, \"px\"));\n    $el[0].style.width = '';\n    if (effect === 'reveal' && !visibleByBreakpoint) {\n      $viewEl.transform('');\n      $backdropEl.transform('');\n    }\n    $el.removeClass('panel-resizing');\n    utils[\"default\"].nextFrame(function () {\n      $el.transition('');\n      if (effect === 'reveal') {\n        $backdropEl.transition('');\n        if ($viewEl) $viewEl.transition('');\n      }\n    });\n  }\n  function handleResize() {\n    if (!panel.opened || !panel.resizableWidth) return;\n    panelMinWidth = transformCSSWidth($el.css('min-width'));\n    panelMaxWidth = transformCSSWidth($el.css('max-width'));\n    if (panelMinWidth && !Number.isNaN(panelMinWidth) && panel.resizableWidth < panelMinWidth) {\n      panel.resizableWidth = Math.max(panel.resizableWidth, panelMinWidth);\n    }\n    if (panelMaxWidth && !Number.isNaN(panelMaxWidth) && panel.resizableWidth > panelMaxWidth) {\n      panel.resizableWidth = Math.min(panel.resizableWidth, panelMaxWidth);\n    }\n    panel.resizableWidth = Math.min(Math.max(panel.resizableWidth, 0), app.width);\n    $htmlEl[0].style.setProperty(\"--f7-panel-\".concat(side, \"-width\"), \"\".concat(panel.resizableWidth, \"px\"));\n  }\n  if (panel.$el.find('.panel-resize-handler').length === 0) {\n    panel.$el.append('<div class=\"panel-resize-handler\"></div>');\n  }\n  panel.$resizeHandlerEl = panel.$el.children('.panel-resize-handler');\n  $el.addClass('panel-resizable');\n\n  // Add Events\n  var passive = utils_support[\"default\"].passiveListener ? {\n    passive: true\n  } : false;\n  panel.$el.on(app.touchEvents.start, '.panel-resize-handler', handleTouchStart, passive);\n  app.on('touchmove:active', handleTouchMove);\n  app.on('touchend:passive', handleTouchEnd);\n  app.on('resize', handleResize);\n  panel.on('beforeOpen', handleResize);\n  panel.once('panelDestroy', function () {\n    $el.removeClass('panel-resizable');\n    panel.$resizeHandlerEl.remove();\n    panel.$el.off(app.touchEvents.start, '.panel-resize-handler', handleTouchStart, passive);\n    app.off('touchmove:active', handleTouchMove);\n    app.off('touchend:passive', handleTouchEnd);\n    app.off('resize', handleResize);\n    panel.off('beforeOpen', handleResize);\n  });\n}\n/* harmony default export */ var resizable_panel = (resizablePanel);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/panel/panel-class.js\n\n\n\n\n\n\nfunction panel_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, panel_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction panel_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (panel_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar panel_class_Panel = /*#__PURE__*/function (_Framework7Class) {\n  function Panel(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Panel);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.panel, params);\n    _this = panel_class_callSuper(this, Panel, [extendedParams, [app]]);\n    var panel = _this;\n    panel.params = extendedParams;\n    panel.$containerEl = panel.params.containerEl ? Object(dom7_module[\"default\"])(panel.params.containerEl).eq(0) : app.root;\n    panel.containerEl = panel.$containerEl[0];\n    var $el;\n    if (panel.params.el) {\n      $el = Object(dom7_module[\"default\"])(panel.params.el).eq(0);\n    } else if (panel.params.content) {\n      $el = Object(dom7_module[\"default\"])(panel.params.content).filter(function (elIndex, node) {\n        return node.nodeType === 1;\n      }).eq(0);\n    }\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, panel);\n    if ($el[0].f7Panel) return possibleConstructorReturn_default()(_this, $el[0].f7Panel);\n    $el[0].f7Panel = panel;\n    var _panel$params = panel.params,\n      side = _panel$params.side,\n      effect = _panel$params.effect,\n      resizable = _panel$params.resizable;\n    if (typeof side === 'undefined') side = $el.hasClass('panel-left') ? 'left' : 'right';\n    if (typeof effect === 'undefined') effect = $el.hasClass('panel-cover') ? 'cover' : 'reveal';\n    if (typeof resizable === 'undefined') resizable = $el.hasClass('panel-resizable');\n    var $backdropEl;\n    if (panel.params.backdrop && panel.params.backdropEl) {\n      $backdropEl = Object(dom7_module[\"default\"])(panel.params.backdropEl);\n    } else if (panel.params.backdrop) {\n      $backdropEl = panel.$containerEl.children('.panel-backdrop');\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"panel-backdrop\"></div>');\n        panel.$containerEl.prepend($backdropEl);\n      }\n    }\n    utils[\"default\"].extend(panel, {\n      app: app,\n      side: side,\n      effect: effect,\n      resizable: resizable,\n      $el: $el,\n      el: $el[0],\n      opened: false,\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0]\n    });\n\n    // Install Modules\n    panel.useModules();\n\n    // Init\n    panel.init();\n    return possibleConstructorReturn_default()(_this, panel);\n  }\n  inherits_default()(Panel, _Framework7Class);\n  return createClass_default()(Panel, [{\n    key: \"getViewEl\",\n    value: function getViewEl() {\n      var panel = this;\n      var viewEl;\n      if (panel.$containerEl.children('.views').length > 0) {\n        viewEl = panel.$containerEl.children('.views')[0];\n      } else {\n        viewEl = panel.$containerEl.children('.view')[0];\n      }\n      return viewEl;\n    }\n  }, {\n    key: \"enableVisibleBreakpoint\",\n    value: function enableVisibleBreakpoint() {\n      var panel = this;\n      panel.visibleBreakpointDisabled = false;\n      panel.setVisibleBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"disableVisibleBreakpoint\",\n    value: function disableVisibleBreakpoint() {\n      var panel = this;\n      panel.visibleBreakpointDisabled = true;\n      panel.setVisibleBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"toggleVisibleBreakpoint\",\n    value: function toggleVisibleBreakpoint() {\n      var panel = this;\n      panel.visibleBreakpointDisabled = !panel.visibleBreakpointDisabled;\n      panel.setVisibleBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"setVisibleBreakpoint\",\n    value: function setVisibleBreakpoint() {\n      var emitEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var panel = this;\n      var app = panel.app;\n      if (!panel.visibleBreakpointResizeHandler) {\n        panel.visibleBreakpointResizeHandler = function visibleBreakpointResizeHandler() {\n          panel.setVisibleBreakpoint();\n        };\n        app.on('resize', panel.visibleBreakpointResizeHandler);\n      }\n      var side = panel.side,\n        $el = panel.$el,\n        params = panel.params,\n        visibleBreakpointDisabled = panel.visibleBreakpointDisabled;\n      var breakpoint = params.visibleBreakpoint;\n      var $viewEl = Object(dom7_module[\"default\"])(panel.getViewEl());\n      var wasVisible = $el.hasClass('panel-in-breakpoint');\n      if (app.width >= breakpoint && typeof breakpoint !== 'undefined' && breakpoint !== null && !visibleBreakpointDisabled) {\n        if (!wasVisible) {\n          Object(dom7_module[\"default\"])('html').removeClass(\"with-panel-\".concat(side, \"-reveal with-panel-\").concat(side, \"-cover with-panel\"));\n          $el.addClass('panel-in-breakpoint').removeClass('panel-in panel-in-collapsed');\n          panel.onOpen(false);\n          panel.onOpened();\n          $viewEl.css(defineProperty_default()({}, \"margin-\".concat(side), \"\".concat($el.width(), \"px\")));\n          app.allowPanelOpen = true;\n          if (emitEvents) {\n            panel.emit('local::breakpoint panelBreakpoint', panel);\n            panel.$el.trigger('panel:breakpoint');\n          }\n        } else {\n          $viewEl.css(defineProperty_default()({}, \"margin-\".concat(side), \"\".concat($el.width(), \"px\")));\n        }\n      } else if (wasVisible) {\n        $el.removeClass('panel-in-breakpoint panel-in');\n        panel.onClose();\n        panel.onClosed();\n        $viewEl.css(defineProperty_default()({}, \"margin-\".concat(side), ''));\n        if (emitEvents) {\n          panel.emit('local::breakpoint panelBreakpoint', panel);\n          panel.$el.trigger('panel:breakpoint');\n        }\n      }\n    }\n  }, {\n    key: \"enableCollapsedBreakpoint\",\n    value: function enableCollapsedBreakpoint() {\n      var panel = this;\n      panel.collapsedBreakpointDisabled = false;\n      panel.setCollapsedBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"disableCollapsedBreakpoint\",\n    value: function disableCollapsedBreakpoint() {\n      var panel = this;\n      panel.collapsedBreakpointDisabled = true;\n      panel.setCollapsedBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"toggleCollapsedBreakpoint\",\n    value: function toggleCollapsedBreakpoint() {\n      var panel = this;\n      panel.collapsedBreakpointDisabled = !panel.collapsedBreakpointDisabled;\n      panel.setCollapsedBreakpoint();\n      return panel;\n    }\n  }, {\n    key: \"setCollapsedBreakpoint\",\n    value: function setCollapsedBreakpoint(emitEvents) {\n      var panel = this;\n      var app = panel.app;\n      if (!panel.collapsedBreakpointResizeHandler) {\n        panel.collapsedBreakpointResizeHandler = function collapsedBreakpointResizeHandler() {\n          panel.setCollapsedBreakpoint();\n        };\n        app.on('resize', panel.collapsedBreakpointResizeHandler);\n      }\n      var side = panel.side,\n        $el = panel.$el,\n        params = panel.params,\n        collapsedBreakpointDisabled = panel.collapsedBreakpointDisabled;\n      if ($el.hasClass('panel-in-breakpoint')) return;\n      var breakpoint = params.collapsedBreakpoint;\n      var wasVisible = $el.hasClass('panel-in-collapsed');\n      if (app.width >= breakpoint && typeof breakpoint !== 'undefined' && breakpoint !== null && !collapsedBreakpointDisabled) {\n        if (!wasVisible) {\n          Object(dom7_module[\"default\"])('html').removeClass(\"with-panel-\".concat(side, \"-reveal with-panel-\").concat(side, \"-cover with-panel\"));\n          $el.addClass('panel-in-collapsed').removeClass('panel-in');\n          panel.collapsed = true;\n          app.allowPanelOpen = true;\n          if (emitEvents) {\n            panel.emit('local::collapsedBreakpoint panelCollapsedBreakpoint', panel);\n            panel.$el.trigger('panel:collapsedbreakpoint');\n          }\n        }\n      } else if (wasVisible) {\n        $el.removeClass('panel-in-collapsed panel-in');\n        panel.collapsed = false;\n        if (emitEvents) {\n          panel.emit('local::collapsedBreakpoint panelCollapsedBreakpoint', panel);\n          panel.$el.trigger('panel:collapsedbreakpoint');\n        }\n      }\n    }\n  }, {\n    key: \"enableResizable\",\n    value: function enableResizable() {\n      var panel = this;\n      if (panel.resizableInitialized) {\n        panel.resizable = true;\n        panel.$el.addClass('panel-resizable');\n      } else {\n        resizable_panel(panel);\n      }\n      return panel;\n    }\n  }, {\n    key: \"disableResizable\",\n    value: function disableResizable() {\n      var panel = this;\n      panel.resizable = false;\n      panel.$el.removeClass('panel-resizable');\n      return panel;\n    }\n  }, {\n    key: \"enableSwipe\",\n    value: function enableSwipe() {\n      var panel = this;\n      if (panel.swipeInitialized) {\n        panel.swipeable = true;\n      } else {\n        swipe_panel(panel);\n      }\n      return panel;\n    }\n  }, {\n    key: \"disableSwipe\",\n    value: function disableSwipe() {\n      var panel = this;\n      panel.swipeable = false;\n      return panel;\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen() {\n      var modifyHtmlClasses = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var panel = this;\n      var app = panel.app;\n      panel.opened = true;\n      app.panel.allowOpen = false;\n      panel.$el.trigger('panel:beforeopen');\n      panel.emit('local::beforeOpen panelBeforeOpen', panel);\n      if (modifyHtmlClasses) {\n        Object(dom7_module[\"default\"])('html').addClass(\"with-panel with-panel-\".concat(panel.side, \"-\").concat(panel.effect));\n      }\n      panel.$el.trigger('panel:open');\n      panel.emit('local::open panelOpen', panel);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var panel = this;\n      var app = panel.app;\n      app.panel.allowOpen = true;\n      panel.$el.trigger('panel:opened');\n      panel.emit('local::opened panelOpened', panel);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var panel = this;\n      var app = panel.app;\n      panel.opened = false;\n      app.panel.allowOpen = false;\n      panel.$el.trigger('panel:beforeclose');\n      panel.emit('local::beforeClose panelBeforeClose', panel);\n      Object(dom7_module[\"default\"])('html').addClass('with-panel-closing');\n      Object(dom7_module[\"default\"])('html').removeClass(\"with-panel with-panel-\".concat(panel.side, \"-\").concat(panel.effect));\n      panel.$el.trigger('panel:close');\n      panel.emit('local::close panelClose', panel);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var panel = this;\n      var app = panel.app;\n      app.panel.allowOpen = true;\n      Object(dom7_module[\"default\"])('html').removeClass('with-panel-closing');\n      panel.$el.removeClass('panel-out');\n      if (panel.$backdropEl) {\n        var otherPanel = app.panel.get('.panel-in');\n        var shouldHideBackdrop = !otherPanel || otherPanel && !otherPanel.$backdropEl;\n        if (shouldHideBackdrop) {\n          panel.$backdropEl.removeClass('panel-backdrop-in');\n        }\n      }\n      panel.$el.trigger('panel:closed');\n      panel.emit('local::closed panelClosed', panel);\n    }\n  }, {\n    key: \"toggle\",\n    value: function toggle() {\n      var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var panel = this;\n      var breakpoint = panel.params.visibleBreakpoint;\n      var app = panel.app;\n      if (app.width >= breakpoint && typeof breakpoint !== 'undefined' && breakpoint !== null) {\n        return panel.toggleVisibleBreakpoint();\n      }\n      if (panel.opened) panel.close(animate);else panel.open(animate);\n      return panel;\n    }\n  }, {\n    key: \"insertToRoot\",\n    value: function insertToRoot() {\n      var panel = this;\n      var $el = panel.$el,\n        $backdropEl = panel.$backdropEl,\n        $containerEl = panel.$containerEl;\n      var $panelParentEl = $el.parent();\n      var wasInDom = $el.parents(document).length > 0;\n      if (!$panelParentEl.is($containerEl) || $el.prevAll('.views, .view').length) {\n        var $insertBeforeEl = $containerEl.children('.panel, .views, .view').eq(0);\n        var $insertAfterEl = $containerEl.children('.panel-backdrop').eq(0);\n        if ($insertBeforeEl.length) {\n          $el.insertBefore($insertBeforeEl);\n        } else if ($insertAfterEl) {\n          $el.insertBefore($insertAfterEl);\n        } else {\n          $containerEl.prepend($el);\n        }\n        if ($backdropEl && $backdropEl.length && (!$backdropEl.parent().is($containerEl) && $backdropEl.nextAll('.panel').length === 0 || $backdropEl.parent().is($containerEl) && $backdropEl.nextAll('.panel').length === 0)) {\n          $backdropEl.insertBefore($el);\n        }\n        panel.once('panelClosed', function () {\n          if (wasInDom) {\n            $panelParentEl.append($el);\n          } else {\n            $el.remove();\n          }\n        });\n      }\n    }\n  }, {\n    key: \"open\",\n    value: function open() {\n      var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var panel = this;\n      var app = panel.app;\n      if (!app.panel.allowOpen) return false;\n      var effect = panel.effect,\n        $el = panel.$el,\n        $backdropEl = panel.$backdropEl,\n        opened = panel.opened;\n      if (!$el || $el.hasClass('panel-in')) {\n        return panel;\n      }\n      panel.insertToRoot();\n\n      // Ignore if opened\n      if (opened || $el.hasClass('panel-in-breakpoint') || $el.hasClass('panel-in')) return false;\n\n      // Close if some panel is opened\n      var otherOpenedPanel = app.panel.get('.panel-in');\n      if (otherOpenedPanel && otherOpenedPanel !== panel) {\n        otherOpenedPanel.close(animate);\n      }\n      $el[animate ? 'removeClass' : 'addClass']('not-animated');\n      $el.addClass('panel-in');\n      if ($backdropEl) {\n        $backdropEl.addClass('panel-backdrop-in');\n        $backdropEl[animate ? 'removeClass' : 'addClass']('not-animated');\n      }\n      if (panel.effect === 'cover') {\n        /* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n        panel._clientLeft = $el[0].clientLeft;\n      }\n\n      // Transitionend\n      var transitionEndTarget = effect === 'reveal' ? $el.nextAll('.view, .views').eq(0) : $el;\n      function panelTransitionEnd() {\n        transitionEndTarget.transitionEnd(function (e) {\n          if (Object(dom7_module[\"default\"])(e.target).is(transitionEndTarget)) {\n            if ($el.hasClass('panel-out')) {\n              panel.onClosed();\n            } else {\n              panel.onOpened();\n            }\n          } else panelTransitionEnd();\n        });\n      }\n      if (animate) {\n        if ($backdropEl) {\n          $backdropEl.removeClass('not-animated');\n        }\n        panelTransitionEnd();\n        $el.removeClass('panel-out not-animated').addClass('panel-in');\n        panel.onOpen();\n      } else {\n        if ($backdropEl) {\n          $backdropEl.addClass('not-animated');\n        }\n        $el.removeClass('panel-out').addClass('panel-in not-animated');\n        panel.onOpen();\n        panel.onOpened();\n      }\n      return true;\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var panel = this;\n      var effect = panel.effect,\n        $el = panel.$el,\n        $backdropEl = panel.$backdropEl,\n        opened = panel.opened;\n      if (!opened || $el.hasClass('panel-in-breakpoint') || !$el.hasClass('panel-in')) return panel;\n      $el[animate ? 'removeClass' : 'addClass']('not-animated');\n      if ($backdropEl) {\n        $backdropEl[animate ? 'removeClass' : 'addClass']('not-animated');\n      }\n      var transitionEndTarget = effect === 'reveal' ? $el.nextAll('.view, .views').eq(0) : $el;\n      function transitionEnd() {\n        if ($el.hasClass('panel-out')) {\n          panel.onClosed();\n        } else if ($el.hasClass('panel-in')) {\n          panel.onOpened();\n        }\n        Object(dom7_module[\"default\"])('html').removeClass('with-panel-closing');\n      }\n      if (animate) {\n        transitionEndTarget.transitionEnd(function () {\n          transitionEnd();\n        });\n        $el.removeClass('panel-in').addClass('panel-out');\n        // Emit close\n        panel.onClose();\n      } else {\n        $el.addClass('not-animated').removeClass('panel-in').addClass('panel-out');\n        // Emit close\n        panel.onClose();\n        panel.onClosed();\n      }\n      return panel;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var panel = this;\n      // const app = panel.app;\n      if (typeof panel.params.visibleBreakpoint !== 'undefined') {\n        panel.setVisibleBreakpoint();\n      }\n      if (typeof panel.params.collapsedBreakpoint !== 'undefined') {\n        panel.setCollapsedBreakpoint();\n      }\n      if (panel.params.swipe) {\n        panel.enableSwipe();\n      }\n      if (panel.resizable) {\n        panel.enableResizable();\n      }\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var panel = this;\n      var app = panel.app;\n      if (!panel.$el) {\n        // Panel already destroyed\n        return;\n      }\n      panel.emit('local::beforeDestroy panelBeforeDestroy', panel);\n      panel.$el.trigger('panel:beforedestroy');\n      if (panel.visibleBreakpointResizeHandler) {\n        app.off('resize', panel.visibleBreakpointResizeHandler);\n      }\n      if (panel.collapsedBreakpointResizeHandler) {\n        app.off('resize', panel.collapsedBreakpointResizeHandler);\n      }\n      if (panel.$el.hasClass('panel-in-breakpoint') || panel.$el.hasClass('panel-in-collapsed')) {\n        var $viewEl = Object(dom7_module[\"default\"])(panel.getViewEl());\n        panel.$el.removeClass('panel-in-breakpoint panel-in-collapsed panel-in');\n        $viewEl.css(defineProperty_default()({}, \"margin-\".concat(panel.side), ''));\n        panel.emit('local::breakpoint panelBreakpoint', panel);\n        panel.$el.trigger('panel:breakpoint');\n      }\n      panel.$el.trigger('panel:destroy');\n      panel.emit('local::destroy panelDestroy', panel);\n      if (panel.el) {\n        panel.el.f7Panel = null;\n        delete panel.el.f7Panel;\n      }\n      utils[\"default\"].deleteProps(panel);\n      panel = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var panel_class = (panel_class_Panel);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/panel/panel.js\n\n\n\n/* harmony default export */ var panel_panel = ({\n  name: 'panel',\n  params: {\n    panel: {\n      opened: undefined,\n      // default based on panel-in class\n      side: undefined,\n      // default based on panel class\n      effect: undefined,\n      // default based on panel class\n      resizable: undefined,\n      // default based on panel-resizable class\n      backdrop: true,\n      backdropEl: undefined,\n      visibleBreakpoint: undefined,\n      collapsedBreakpoint: undefined,\n      swipe: false,\n      // or true\n      swipeNoFollow: false,\n      // or true\n      swipeOnlyClose: false,\n      swipeActiveArea: 0,\n      swipeThreshold: 0,\n      closeByBackdropClick: true,\n      containerEl: undefined\n    }\n  },\n  static: {\n    Panel: panel_class\n  },\n  instance: {\n    panel: {\n      allowOpen: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app.panel, {\n      create: function create(params) {\n        return new panel_class(app, params);\n      },\n      get: function get() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.panel';\n        if (el instanceof panel_class) return el;\n        if (el === 'left' || el === 'right') el = \".panel-\".concat(el); // eslint-disable-line\n        var $el = Object(dom7_module[\"default\"])(el);\n        if ($el.length === 0 || $el.length > 1) return undefined;\n        return $el[0].f7Panel;\n      },\n      destroy: function destroy() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.panel';\n        var panel = app.panel.get(el);\n        if (panel && panel.destroy) return panel.destroy();\n        return undefined;\n      },\n      open: function open() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.panel';\n        var animate = arguments.length > 1 ? arguments[1] : undefined;\n        if (el === 'left' || el === 'right') el = \".panel-\".concat(el); // eslint-disable-line\n        var panel = app.panel.get(el);\n        if (panel && panel.open) return panel.open(animate);\n        if (!panel) {\n          panel = app.panel.create({\n            el: el\n          });\n          return panel.open(animate);\n        }\n        return undefined;\n      },\n      close: function close() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.panel-in';\n        var animate = arguments.length > 1 ? arguments[1] : undefined;\n        if (el === 'left' || el === 'right') el = \".panel-\".concat(el); // eslint-disable-line\n        var panel = app.panel.get(el);\n        if (panel && panel.open) return panel.close(animate);\n        if (!panel) {\n          panel = app.panel.create({\n            el: el\n          });\n          return panel.close(animate);\n        }\n        return undefined;\n      },\n      toggle: function toggle() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.panel';\n        var animate = arguments.length > 1 ? arguments[1] : undefined;\n        if (el === 'left' || el === 'right') el = \".panel-\".concat(el); // eslint-disable-line\n        var panel = app.panel.get(el);\n        if (panel && panel.toggle) return panel.toggle(animate);\n        if (!panel) {\n          panel = app.panel.create({\n            el: el\n          });\n          return panel.toggle(animate);\n        }\n        return undefined;\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      Object(dom7_module[\"default\"])('.panel-init').each(function (index, panelEl) {\n        var params = Object.assign({\n          el: panelEl\n        }, Object(dom7_module[\"default\"])(panelEl).dataset() || {});\n        app.panel.create(params);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.panel-init').each(function (index, panelEl) {\n        var params = Object.assign({\n          el: panelEl\n        }, Object(dom7_module[\"default\"])(panelEl).dataset() || {});\n        app.panel.create(params);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.panel-init').each(function (index, panelEl) {\n        var panel = app.panel.get(panelEl);\n        if (panel && panel.destroy) panel.destroy();\n      });\n    }\n  },\n  vnode: {\n    'panel-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var panelEl = vnode.elm;\n        var params = Object.assign({\n          el: panelEl\n        }, Object(dom7_module[\"default\"])(panelEl).dataset() || {});\n        app.panel.create(params);\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var panelEl = vnode.elm;\n        var panel = app.panel.get(panelEl);\n        if (panel && panel.destroy) panel.destroy();\n      }\n    }\n  },\n  clicks: {\n    '.panel-open': function open(clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.panel.open(data.panel, data.animate);\n    },\n    '.panel-close': function close(clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.panel.close(data.panel, data.animate);\n    },\n    '.panel-toggle': function close(clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.panel.toggle(data.panel, data.animate);\n    },\n    '.panel-backdrop': function close() {\n      var app = this;\n      var $panelEl = Object(dom7_module[\"default\"])('.panel-in:not(.panel-out)');\n      if (!$panelEl.length) return;\n      var instance = $panelEl[0] && $panelEl[0].f7Panel;\n      $panelEl.trigger('panel:backdrop-click');\n      if (instance) {\n        instance.emit('backdropClick', instance);\n      }\n      app.emit('panelBackdropClick', instance || $panelEl[0]);\n      if (app.params.panel.closeByBackdropClick) app.panel.close();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/card/card.js\n/* eslint no-param-reassign: \"off\" */\n\n\n\nvar CardExpandable = {\n  open: function open() {\n    var cardEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.card-expandable';\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $cardEl = Object(dom7_module[\"default\"])(cardEl).eq(0);\n    if (!$cardEl || !$cardEl.length) return;\n    if ($cardEl.hasClass('card-opened') || $cardEl.hasClass('card-opening') || $cardEl.hasClass('card-closing')) return;\n    var $pageEl = $cardEl.parents('.page').eq(0);\n    if (!$pageEl.length) return;\n    if ($pageEl.find('.card-opened').length) {\n      return;\n    }\n    var prevented;\n    function prevent() {\n      prevented = true;\n    }\n    $cardEl.trigger('card:beforeopen', {\n      prevent: prevent\n    });\n    app.emit('cardBeforeOpen', $cardEl[0], prevent);\n    if (prevented) return;\n    var cardParams = Object.assign({\n      animate: animate\n    }, app.params.card, $cardEl.dataset());\n    var $pageContentEl = $cardEl.parents('.page-content');\n    var $backdropEl;\n    if ($cardEl.attr('data-backdrop-el')) {\n      $backdropEl = Object(dom7_module[\"default\"])($cardEl.attr('data-backdrop-el'));\n    }\n    if (!$backdropEl && cardParams.backdrop) {\n      $backdropEl = $pageContentEl.find('.card-backdrop');\n      if (!$backdropEl.length) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"card-backdrop\"></div>');\n        $pageContentEl.append($backdropEl);\n      }\n    }\n    var $navbarEl;\n    var $toolbarEl;\n    if (cardParams.hideNavbarOnOpen) {\n      $navbarEl = $pageEl.children('.navbar');\n      if (!$navbarEl.length) {\n        if ($pageEl[0].f7Page) $navbarEl = $pageEl[0].f7Page.$navbarEl;\n      }\n    }\n    if (cardParams.hideToolbarOnOpen) {\n      $toolbarEl = $pageEl.children('.toolbar');\n      if (!$toolbarEl.length) {\n        $toolbarEl = $pageEl.parents('.view').children('.toolbar');\n      }\n      if (!$toolbarEl.length) {\n        $toolbarEl = $pageEl.parents('.views').children('.toolbar');\n      }\n    }\n    var currTransform = $cardEl.css('transform');\n    var hasTransform;\n    if (currTransform && currTransform.match(/[2-9]/)) {\n      hasTransform = true;\n    }\n    var $cardContentEl = $cardEl.children('.card-content');\n    var $cardSizeEl = Object(dom7_module[\"default\"])(document.createElement('div')).addClass('card-expandable-size');\n    $cardEl.append($cardSizeEl);\n    var cardWidth = $cardEl[0].offsetWidth;\n    var cardHeight = $cardEl[0].offsetHeight;\n    var pageWidth = $pageEl[0].offsetWidth;\n    var pageHeight = $pageEl[0].offsetHeight;\n    var maxWidth = $cardSizeEl[0].offsetWidth || pageWidth;\n    var maxHeight = $cardSizeEl[0].offsetHeight || pageHeight;\n    var statusbarHeight;\n    if ($navbarEl && !cardParams.hideStatusbarOnOpen && maxHeight === pageHeight) {\n      statusbarHeight = parseInt($navbarEl.css('--f7-safe-area-top'), 10);\n      if (Number.isNaN(statusbarHeight)) statusbarHeight = 0;\n    }\n    if (statusbarHeight) {\n      maxHeight -= statusbarHeight;\n    }\n    var scaleX = maxWidth / cardWidth;\n    var scaleY = maxHeight / cardHeight;\n    var offset = $cardEl.offset();\n    var pageOffset = $pageEl.offset();\n    if (statusbarHeight) {\n      pageOffset.top += statusbarHeight / 2;\n    }\n    offset.left -= pageOffset.left;\n    var cardLeftOffset;\n    var cardTopOffset;\n    if (hasTransform) {\n      var transformValues = currTransform.replace(/matrix\\(|\\)/g, '').split(',').map(function (el) {\n        return el.trim();\n      });\n      if (transformValues && transformValues.length > 1) {\n        var scale = parseFloat(transformValues[0]);\n        cardLeftOffset = offset.left - cardWidth * (1 - scale) / 2;\n        cardTopOffset = offset.top - pageOffset.top - cardHeight * (1 - scale) / 2;\n        if (app.rtl) cardLeftOffset -= $cardEl[0].scrollLeft;\n      } else {\n        cardLeftOffset = $cardEl[0].offsetLeft;\n        cardTopOffset = $cardEl[0].offsetTop - ($pageContentEl.length ? $pageContentEl[0].scrollTop : 0);\n      }\n    } else {\n      cardLeftOffset = offset.left;\n      cardTopOffset = offset.top - pageOffset.top;\n      if (app.rtl) cardLeftOffset -= $cardEl[0].scrollLeft;\n    }\n    cardLeftOffset -= (pageWidth - maxWidth) / 2;\n    cardTopOffset -= (pageHeight - maxHeight) / 2;\n    var cardRightOffset = maxWidth - cardWidth - cardLeftOffset;\n    if (app.rtl) {\n      var _ref = [cardRightOffset, cardLeftOffset];\n      cardLeftOffset = _ref[0];\n      cardRightOffset = _ref[1];\n    }\n    var cardBottomOffset = maxHeight - cardHeight - cardTopOffset;\n    var translateX = (cardRightOffset - cardLeftOffset) / 2;\n    var translateY = (cardBottomOffset - cardTopOffset) / 2;\n    if (cardParams.hideNavbarOnOpen && $navbarEl && $navbarEl.length) {\n      if ($navbarEl.closest('.navbar-hidden').length) {\n        // Was hidden\n        $cardEl[0].f7KeepNavbarOnClose = true;\n      } else {\n        delete $cardEl[0].f7KeepNavbarOnClose;\n        app.navbar.hide($navbarEl, cardParams.animate, cardParams.hideStatusbarOnOpen);\n      }\n    }\n    if (cardParams.hideToolbarOnOpen && $toolbarEl && $toolbarEl.length) {\n      if ($toolbarEl.closest('.toolbar-hidden').length) {\n        // Was hidden\n        $cardEl[0].f7KeepToolbarOnClose = true;\n      } else {\n        delete $cardEl[0].f7KeepToolbarOnClose;\n        app.toolbar.hide($toolbarEl, cardParams.animate);\n      }\n    }\n    if ($backdropEl) {\n      $backdropEl.removeClass('card-backdrop-out').addClass('card-backdrop-in');\n    }\n    $cardEl.removeClass('card-transitioning');\n    if (cardParams.animate) {\n      $cardEl.addClass('card-opening');\n    }\n    $cardEl.trigger('card:open');\n    app.emit('cardOpen', $cardEl[0]);\n    function transitionEnd() {\n      $pageEl.addClass('page-with-card-opened');\n      if (app.device.ios && $pageContentEl.length) {\n        $pageContentEl.css('height', \"\".concat($pageContentEl[0].offsetHeight + 1, \"px\"));\n        setTimeout(function () {\n          $pageContentEl.css('height', '');\n        });\n      }\n      $cardEl.addClass('card-opened');\n      $cardEl.removeClass('card-opening');\n      $cardEl.trigger('card:opened');\n      app.emit('cardOpened', $cardEl[0], $pageEl[0]);\n    }\n    $cardContentEl.css({\n      width: \"\".concat(maxWidth, \"px\"),\n      height: \"\".concat(maxHeight, \"px\")\n    }).transform(\"translate3d(\".concat(app.rtl ? cardLeftOffset + translateX : -cardLeftOffset - translateX, \"px, 0px, 0) scale(\").concat(1 / scaleX, \", \").concat(1 / scaleY, \")\"));\n    $cardEl.transform(\"translate3d(\".concat(app.rtl ? -translateX : translateX, \"px, \").concat(translateY, \"px, 0) scale(\").concat(scaleX, \", \").concat(scaleY, \")\"));\n    if (cardParams.animate) {\n      $cardEl.transitionEnd(function () {\n        transitionEnd();\n      });\n    } else {\n      transitionEnd();\n    }\n    function onResize() {\n      $cardEl.removeClass('card-transitioning');\n      cardWidth = $cardEl[0].offsetWidth;\n      cardHeight = $cardEl[0].offsetHeight;\n      pageWidth = $pageEl[0].offsetWidth;\n      pageHeight = $pageEl[0].offsetHeight;\n      maxWidth = $cardSizeEl[0].offsetWidth || pageWidth;\n      maxHeight = $cardSizeEl[0].offsetHeight || pageHeight;\n      statusbarHeight = 0;\n      if ($navbarEl && !cardParams.hideStatusbarOnOpen && maxHeight === pageHeight) {\n        statusbarHeight = parseInt($navbarEl.css('--f7-safe-area-top'), 10);\n        if (Number.isNaN(statusbarHeight)) statusbarHeight = 0;\n      }\n      if (statusbarHeight) {\n        maxHeight -= statusbarHeight;\n      }\n      scaleX = maxWidth / cardWidth;\n      scaleY = maxHeight / cardHeight;\n      $cardEl.transform('translate3d(0px, 0px, 0) scale(1)');\n      offset = $cardEl.offset();\n      pageOffset = $pageEl.offset();\n      if (statusbarHeight) {\n        pageOffset.top += statusbarHeight / 2;\n      }\n      offset.left -= pageOffset.left;\n      offset.top -= pageOffset.top;\n      cardLeftOffset = offset.left - (pageWidth - maxWidth) / 2;\n      if (app.rtl) cardLeftOffset -= $cardEl[0].scrollLeft;\n      cardTopOffset = offset.top - (pageHeight - maxHeight) / 2;\n      cardRightOffset = maxWidth - cardWidth - cardLeftOffset;\n      cardBottomOffset = maxHeight - cardHeight - cardTopOffset;\n      if (app.rtl) {\n        var _ref2 = [cardRightOffset, cardLeftOffset];\n        cardLeftOffset = _ref2[0];\n        cardRightOffset = _ref2[1];\n      }\n      translateX = (cardRightOffset - cardLeftOffset) / 2;\n      translateY = (cardBottomOffset - cardTopOffset) / 2;\n      $cardEl.transform(\"translate3d(\".concat(app.rtl ? -translateX : translateX, \"px, \").concat(translateY, \"px, 0) scale(\").concat(scaleX, \", \").concat(scaleY, \")\"));\n      $cardContentEl.css({\n        width: \"\".concat(maxWidth, \"px\"),\n        height: \"\".concat(maxHeight, \"px\")\n      }).transform(\"translate3d(\".concat(app.rtl ? cardLeftOffset + translateX : -cardLeftOffset - translateX, \"px, 0px, 0) scale(\").concat(1 / scaleX, \", \").concat(1 / scaleY, \")\"));\n    }\n    var cardScrollTop;\n    var isTouched;\n    var isMoved;\n    var touchStartX;\n    var touchStartY;\n    var touchEndX;\n    var touchEndY;\n    var isScrolling;\n    var progress;\n    var isV;\n    var isH;\n    var $cardScrollableEl;\n    function onTouchStart(e) {\n      if (!Object(dom7_module[\"default\"])(e.target).closest($cardEl).length) return;\n      if (!$cardEl.hasClass('card-opened')) return;\n      $cardScrollableEl = $cardEl.find(cardParams.scrollableEl);\n      if ($cardScrollableEl[0] && $cardScrollableEl[0] !== $cardContentEl[0] && !$cardScrollableEl[0].contains(e.target)) {\n        cardScrollTop = 0;\n      } else {\n        cardScrollTop = $cardScrollableEl.scrollTop();\n      }\n      isTouched = true;\n      touchStartX = e.targetTouches[0].pageX;\n      touchStartY = e.targetTouches[0].pageY;\n      isScrolling = undefined;\n      isV = false;\n      isH = false;\n    }\n    function onTouchMove(e) {\n      if (!isTouched) return;\n      touchEndX = e.targetTouches[0].pageX;\n      touchEndY = e.targetTouches[0].pageY;\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(touchEndY - touchStartY) > Math.abs(touchEndX - touchStartX));\n      }\n      if (!isH && !isV) {\n        if (!isScrolling && e.targetTouches[0].clientX <= 50) {\n          isH = true;\n        } else {\n          isV = true;\n        }\n      }\n      if (!(isH || isV) || isV && cardScrollTop !== 0) {\n        isTouched = true;\n        isMoved = true;\n        return;\n      }\n      if (!isMoved) {\n        $cardEl.removeClass('card-transitioning');\n      }\n      isMoved = true;\n      progress = isV ? Math.max((touchEndY - touchStartY) / 150, 0) : Math.max((touchEndX - touchStartX) / (cardWidth / 2), 0);\n      if (progress > 0 && isV || isH) {\n        if (isV && app.device.ios && $cardScrollableEl[0] === $cardContentEl[0]) {\n          $cardScrollableEl.css('-webkit-overflow-scrolling', 'auto');\n          $cardScrollableEl.scrollTop(0);\n        }\n        e.preventDefault();\n      }\n      if (progress > 1) progress = Math.pow(progress, 0.3);\n      if (progress > (isV ? 1.3 : 1.1)) {\n        isTouched = false;\n        isMoved = false;\n        app.card.close($cardEl);\n      } else {\n        $cardEl.transform(\"translate3d(\".concat(app.rtl ? -translateX : translateX, \"px, \").concat(translateY, \"px, 0) scale(\").concat(scaleX * (1 - progress * 0.2), \", \").concat(scaleY * (1 - progress * 0.2), \")\"));\n      }\n    }\n    function onTouchEnd() {\n      if (!isTouched || !isMoved) return;\n      isTouched = false;\n      isMoved = false;\n      if (app.device.ios) {\n        $cardScrollableEl.css('-webkit-overflow-scrolling', '');\n      }\n      if (progress >= 0.8) {\n        app.card.close($cardEl);\n      } else {\n        $cardEl.addClass('card-transitioning').transform(\"translate3d(\".concat(app.rtl ? -translateX : translateX, \"px, \").concat(translateY, \"px, 0) scale(\").concat(scaleX, \", \").concat(scaleY, \")\"));\n      }\n    }\n    $cardEl[0].detachEventHandlers = function detachEventHandlers() {\n      app.off('resize', onResize);\n      if (utils_support[\"default\"].touch && cardParams.swipeToClose) {\n        app.off('touchstart:passive', onTouchStart);\n        app.off('touchmove:active', onTouchMove);\n        app.off('touchend:passive', onTouchEnd);\n      }\n    };\n    app.on('resize', onResize);\n    if (utils_support[\"default\"].touch && cardParams.swipeToClose) {\n      app.on('touchstart:passive', onTouchStart);\n      app.on('touchmove:active', onTouchMove);\n      app.on('touchend:passive', onTouchEnd);\n    }\n  },\n  close: function close() {\n    var cardEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.card-expandable.card-opened';\n    var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var app = this;\n    var $cardEl = Object(dom7_module[\"default\"])(cardEl).eq(0);\n    if (!$cardEl || !$cardEl.length) return;\n    if (!$cardEl.hasClass('card-opened') || $cardEl.hasClass('card-opening') || $cardEl.hasClass('card-closing')) return;\n    var $cardContentEl = $cardEl.children('.card-content');\n    var $pageContentEl = $cardEl.parents('.page-content');\n    var $pageEl = $cardEl.parents('.page').eq(0);\n    if (!$pageEl.length) return;\n    var cardParams = Object.assign({\n      animate: animate\n    }, app.params.card, $cardEl.dataset());\n    var $cardScrollableEl = $cardEl.find(cardParams.scrollableEl);\n    var $navbarEl;\n    var $toolbarEl;\n    var $backdropEl;\n    if ($cardEl.attr('data-backdrop-el')) {\n      $backdropEl = Object(dom7_module[\"default\"])($cardEl.attr('data-backdrop-el'));\n    }\n    if (cardParams.backdrop) {\n      $backdropEl = $cardEl.parents('.page-content').find('.card-backdrop');\n    }\n    if (cardParams.hideNavbarOnOpen) {\n      $navbarEl = $pageEl.children('.navbar');\n      if (!$navbarEl.length) {\n        if ($pageEl[0].f7Page) $navbarEl = $pageEl[0].f7Page.$navbarEl;\n      }\n      if ($navbarEl && $navbarEl.length && !$cardEl[0].f7KeepNavbarOnClose) {\n        app.navbar.show($navbarEl, cardParams.animate);\n      }\n    }\n    if (cardParams.hideToolbarOnOpen) {\n      $toolbarEl = $pageEl.children('.toolbar');\n      if (!$toolbarEl.length) {\n        $toolbarEl = $pageEl.parents('.view').children('.toolbar');\n      }\n      if (!$toolbarEl.length) {\n        $toolbarEl = $pageEl.parents('.views').children('.toolbar');\n      }\n      if ($toolbarEl && $toolbarEl.length && !$cardEl[0].f7KeepToolbarOnClose) {\n        app.toolbar.show($toolbarEl, cardParams.animate);\n      }\n    }\n    $pageEl.removeClass('page-with-card-opened');\n    if (app.device.ios && $pageContentEl.length) {\n      $pageContentEl.css('height', \"\".concat($pageContentEl[0].offsetHeight + 1, \"px\"));\n      setTimeout(function () {\n        $pageContentEl.css('height', '');\n      });\n    }\n    if ($backdropEl && $backdropEl.length) {\n      $backdropEl.removeClass('card-backdrop-in').addClass('card-backdrop-out');\n    }\n    $cardEl.removeClass('card-opened card-transitioning');\n    if (cardParams.animate) {\n      $cardEl.addClass('card-closing');\n    } else {\n      $cardEl.addClass('card-no-transition');\n    }\n    $cardEl.transform('');\n    $cardEl.trigger('card:close');\n    app.emit('cardClose', $cardEl[0], $pageEl[0]);\n    var animateWidth = $cardEl.hasClass('card-expandable-animate-width');\n    function transitionEnd() {\n      if (!animateWidth) {\n        $cardContentEl.css({\n          width: '',\n          height: ''\n        });\n      }\n      if ($backdropEl && $backdropEl.length) {\n        $backdropEl.removeClass('card-backdrop-in card-backdrop-out');\n      }\n      $cardEl.removeClass('card-closing card-no-transition');\n      $cardEl.trigger('card:closed');\n      $cardEl.find('.card-expandable-size').remove();\n      app.emit('cardClosed', $cardEl[0], $pageEl[0]);\n    }\n    if (animateWidth) {\n      $cardContentEl.css({\n        width: '',\n        height: ''\n      });\n    }\n    $cardContentEl.transform('').scrollTop(0, animate ? 300 : 0);\n    if ($cardScrollableEl.length && $cardScrollableEl[0] !== $cardContentEl[0]) {\n      $cardScrollableEl.scrollTop(0, animate ? 300 : 0);\n    }\n    if (animate) {\n      $cardContentEl.transitionEnd(function () {\n        transitionEnd();\n      });\n    } else {\n      transitionEnd();\n    }\n    if ($cardEl[0].detachEventHandlers) {\n      $cardEl[0].detachEventHandlers();\n      delete $cardEl[0].detachEventHandlers;\n    }\n  },\n  toggle: function toggle() {\n    var cardEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.card-expandable';\n    var animate = arguments.length > 1 ? arguments[1] : undefined;\n    var app = this;\n    var $cardEl = Object(dom7_module[\"default\"])(cardEl).eq(0);\n    if (!$cardEl.length) return;\n    if ($cardEl.hasClass('card-opened')) {\n      app.card.close($cardEl, animate);\n    } else {\n      app.card.open($cardEl, animate);\n    }\n  }\n};\n/* harmony default export */ var card = ({\n  name: 'card',\n  params: {\n    card: {\n      hideNavbarOnOpen: true,\n      hideStatusbarOnOpen: true,\n      hideToolbarOnOpen: true,\n      scrollableEl: '.card-content',\n      swipeToClose: true,\n      closeByBackdropClick: true,\n      backdrop: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      card: {\n        open: CardExpandable.open.bind(app),\n        close: CardExpandable.close.bind(app),\n        toggle: CardExpandable.toggle.bind(app)\n      }\n    });\n  },\n  on: {\n    pageBeforeIn: function pageBeforeIn(page) {\n      var app = this;\n      if (app.params.card.hideNavbarOnOpen && page.navbarEl && page.$el.find('.card-opened.card-expandable').length) {\n        app.navbar.hide(page.navbarEl, true, app.params.card.hideStatusbarOnOpen);\n      }\n      if (app.params.card.hideToolbarOnOpen && page.$el.find('.card-opened.card-expandable').length) {\n        var $toolbarEl = page.$el.children('.toolbar');\n        if (!$toolbarEl.length) {\n          $toolbarEl = page.$el.parents('.view').children('.toolbar');\n        }\n        if (!$toolbarEl.length) {\n          $toolbarEl = page.$el.parents('.views').children('.toolbar');\n        }\n        if ($toolbarEl && $toolbarEl.length) {\n          app.toolbar.hide($toolbarEl);\n        }\n      }\n    }\n  },\n  clicks: {\n    '.card-close': function closeCard($clickedEl, data) {\n      var app = this;\n      app.card.close(data.card, data.animate);\n    },\n    '.card-open': function closeCard($clickedEl, data) {\n      var app = this;\n      app.card.open(data.card, data.animate);\n    },\n    '.card-expandable': function toggleExpandableCard($clickedEl, data, e) {\n      var app = this;\n      if ($clickedEl.hasClass('card-opened') || $clickedEl.hasClass('card-opening') || $clickedEl.hasClass('card-closing')) return;\n      if (Object(dom7_module[\"default\"])(e.target).closest('.card-prevent-open, .card-close').length) return;\n      app.card.open($clickedEl);\n    },\n    '.card-backdrop-in': function onBackdropClick() {\n      var app = this;\n      var needToClose = false;\n      if (app.params.card.closeByBackdropClick) needToClose = true;\n      var $openedCardEl = Object(dom7_module[\"default\"])('.card-opened');\n      if (!$openedCardEl.length) return;\n      if ($openedCardEl.attr('data-close-by-backdrop-click') === 'true') {\n        needToClose = true;\n      } else if ($openedCardEl.attr('data-close-by-backdrop-click') === 'false') {\n        needToClose = false;\n      }\n      if (needToClose) app.card.close($openedCardEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/chip/chip.js\n/* harmony default export */ var chip_chip = ({\n  name: 'chip'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/form/form.js\n\n\n\n\n// Form Data\nvar form_FormData = {\n  store: function store(form, data) {\n    var app = this;\n    var formId = form;\n    var $formEl = Object(dom7_module[\"default\"])(form);\n    if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {\n      formId = $formEl.attr('id');\n    }\n    // Store form data in app.formsData\n    app.form.data[\"form-\".concat(formId)] = data;\n\n    // Store form data in local storage also\n    ssr_window_esm[\"window\"].localStorage[\"f7form-\".concat(formId)] = JSON.stringify(data);\n  },\n  get: function get(form) {\n    var app = this;\n    var formId = form;\n    var $formEl = Object(dom7_module[\"default\"])(form);\n    if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {\n      formId = $formEl.attr('id');\n    }\n    if (ssr_window_esm[\"window\"].localStorage[\"f7form-\".concat(formId)]) {\n      return JSON.parse(ssr_window_esm[\"window\"].localStorage[\"f7form-\".concat(formId)]);\n    }\n    if (app.form.data[\"form-\".concat(formId)]) {\n      return app.form.data[\"form-\".concat(formId)];\n    }\n    return undefined;\n  },\n  remove: function remove(form) {\n    var app = this;\n    var formId = form;\n    var $formEl = Object(dom7_module[\"default\"])(form);\n    if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {\n      formId = $formEl.attr('id');\n    }\n\n    // Delete form data from app.formsData\n    if (app.form.data[\"form-\".concat(formId)]) {\n      app.form.data[\"form-\".concat(formId)] = '';\n      delete app.form.data[\"form-\".concat(formId)];\n    }\n\n    // Delete form data from local storage also\n    if (ssr_window_esm[\"window\"].localStorage[\"f7form-\".concat(formId)]) {\n      ssr_window_esm[\"window\"].localStorage[\"f7form-\".concat(formId)] = '';\n      ssr_window_esm[\"window\"].localStorage.removeItem(\"f7form-\".concat(formId));\n    }\n  }\n};\n\n// Form Storage\nvar FormStorage = {\n  init: function init(formEl) {\n    var app = this;\n    var $formEl = Object(dom7_module[\"default\"])(formEl);\n    var formId = $formEl.attr('id');\n    if (!formId) return;\n    var initialData = app.form.getFormData(formId);\n    if (initialData) {\n      app.form.fillFromData($formEl, initialData);\n    }\n    function store() {\n      var data = app.form.convertToData($formEl);\n      if (!data) return;\n      app.form.storeFormData(formId, data);\n      $formEl.trigger('form:storedata', data);\n      app.emit('formStoreData', $formEl[0], data);\n    }\n    $formEl.on('change submit', store);\n  },\n  destroy: function destroy(formEl) {\n    var $formEl = Object(dom7_module[\"default\"])(formEl);\n    $formEl.off('change submit');\n  }\n};\n\n// Form To/From Data\nfunction formToData(formEl) {\n  var app = this;\n  var $formEl = Object(dom7_module[\"default\"])(formEl).eq(0);\n  if ($formEl.length === 0) return undefined;\n\n  // Form data\n  var data = {};\n\n  // Skip input types\n  var skipTypes = ['submit', 'image', 'button', 'file'];\n  var skipNames = [];\n  $formEl.find('input, select, textarea').each(function (inputIndex, inputEl) {\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    if ($inputEl.hasClass('ignore-store-data') || $inputEl.hasClass('no-store-data')) {\n      return;\n    }\n    var name = $inputEl.attr('name');\n    var type = $inputEl.attr('type');\n    var tag = inputEl.nodeName.toLowerCase();\n    if (skipTypes.indexOf(type) >= 0) return;\n    if (skipNames.indexOf(name) >= 0 || !name) return;\n    if (tag === 'select' && $inputEl.prop('multiple')) {\n      skipNames.push(name);\n      data[name] = [];\n      $formEl.find(\"select[name=\\\"\".concat(name, \"\\\"] option\")).each(function (index, el) {\n        if (el.selected) data[name].push(el.value);\n      });\n    } else {\n      switch (type) {\n        case 'checkbox':\n          skipNames.push(name);\n          data[name] = [];\n          $formEl.find(\"input[name=\\\"\".concat(name, \"\\\"]\")).each(function (index, el) {\n            if (el.checked) data[name].push(el.value);\n          });\n          break;\n        case 'radio':\n          skipNames.push(name);\n          $formEl.find(\"input[name=\\\"\".concat(name, \"\\\"]\")).each(function (index, el) {\n            if (el.checked) data[name] = el.value;\n          });\n          break;\n        default:\n          data[name] = $inputEl.val();\n          break;\n      }\n    }\n  });\n  $formEl.trigger('form:todata', data);\n  app.emit('formToData', $formEl[0], data);\n  return data;\n}\nfunction formFromData(formEl, formData) {\n  var app = this;\n  var $formEl = Object(dom7_module[\"default\"])(formEl).eq(0);\n  if (!$formEl.length) return;\n  var data = formData;\n  var formId = $formEl.attr('id');\n  if (!data && formId) {\n    data = app.form.getFormData(formId);\n  }\n  if (!data) return;\n\n  // Skip input types\n  var skipTypes = ['submit', 'image', 'button', 'file'];\n  var skipNames = [];\n  $formEl.find('input, select, textarea').each(function (inputIndex, inputEl) {\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    if ($inputEl.hasClass('ignore-store-data') || $inputEl.hasClass('no-store-data')) {\n      return;\n    }\n    var name = $inputEl.attr('name');\n    var type = $inputEl.attr('type');\n    var tag = inputEl.nodeName.toLowerCase();\n    if (typeof data[name] === 'undefined' || data[name] === null) return;\n    if (skipTypes.indexOf(type) >= 0) return;\n    if (skipNames.indexOf(name) >= 0 || !name) return;\n    if (tag === 'select' && $inputEl.prop('multiple')) {\n      skipNames.push(name);\n      $formEl.find(\"select[name=\\\"\".concat(name, \"\\\"] option\")).each(function (index, el) {\n        var selectEl = el;\n        if (data[name].indexOf(el.value) >= 0) selectEl.selected = true;else selectEl.selected = false;\n      });\n    } else {\n      switch (type) {\n        case 'checkbox':\n          skipNames.push(name);\n          $formEl.find(\"input[name=\\\"\".concat(name, \"\\\"]\")).each(function (index, el) {\n            var checkboxEl = el;\n            if (data[name].indexOf(el.value) >= 0) checkboxEl.checked = true;else checkboxEl.checked = false;\n          });\n          break;\n        case 'radio':\n          skipNames.push(name);\n          $formEl.find(\"input[name=\\\"\".concat(name, \"\\\"]\")).each(function (index, el) {\n            var radioEl = el;\n            if (data[name] === el.value) radioEl.checked = true;else radioEl.checked = false;\n          });\n          break;\n        default:\n          $inputEl.val(data[name]);\n          break;\n      }\n    }\n    if (tag === 'select' || tag === 'input' || tag === 'textarea') {\n      $inputEl.trigger('change', 'fromdata');\n    }\n  });\n  $formEl.trigger('form:fromdata', data);\n  app.emit('formFromData', $formEl[0], data);\n}\nfunction initAjaxForm() {\n  var app = this;\n  function onSubmitChange(e, fromData) {\n    var $formEl = Object(dom7_module[\"default\"])(this);\n    if (e.type === 'change' && !$formEl.hasClass('form-ajax-submit-onchange')) return;\n    if (e.type === 'submit') e.preventDefault();\n    if (e.type === 'change' && fromData === 'fromdata') return;\n    var method = ($formEl.attr('method') || 'GET').toUpperCase();\n    var contentType = $formEl.prop('enctype') || $formEl.attr('enctype');\n    var url = $formEl.attr('action');\n    if (!url) return;\n    var data;\n    if (method === 'POST') {\n      if (contentType === 'application/x-www-form-urlencoded') {\n        data = app.form.convertToData($formEl[0]);\n      } else {\n        data = new ssr_window_esm[\"window\"].FormData($formEl[0]);\n      }\n    } else {\n      data = utils[\"default\"].serializeObject(app.form.convertToData($formEl[0]));\n    }\n    app.request({\n      method: method,\n      url: url,\n      contentType: contentType,\n      data: data,\n      beforeSend: function beforeSend(xhr) {\n        $formEl.trigger('formajax:beforesend', {\n          data: data,\n          xhr: xhr\n        });\n        app.emit('formAjaxBeforeSend', $formEl[0], data, xhr);\n      },\n      error: function error(xhr) {\n        $formEl.trigger('formajax:error', {\n          data: data,\n          xhr: xhr\n        });\n        app.emit('formAjaxError', $formEl[0], data, xhr);\n      },\n      complete: function complete(xhr) {\n        $formEl.trigger('formajax:complete', {\n          data: data,\n          xhr: xhr\n        });\n        app.emit('formAjaxComplete', $formEl[0], data, xhr);\n      },\n      success: function success(response, status, xhr) {\n        $formEl.trigger('formajax:success', {\n          data: data,\n          xhr: xhr\n        });\n        app.emit('formAjaxSuccess', $formEl[0], data, xhr);\n      }\n    });\n  }\n  Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('submit change', 'form.form-ajax-submit, form.form-ajax-submit-onchange', onSubmitChange);\n}\n/* harmony default export */ var form_form = ({\n  name: 'form',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      form: {\n        data: {},\n        storeFormData: form_FormData.store.bind(app),\n        getFormData: form_FormData.get.bind(app),\n        removeFormData: form_FormData.remove.bind(app),\n        convertToData: formToData.bind(app),\n        fillFromData: formFromData.bind(app),\n        storage: {\n          init: FormStorage.init.bind(app),\n          destroy: FormStorage.destroy.bind(app)\n        }\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      initAjaxForm.call(app);\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.form-store-data').each(function (index, formEl) {\n        app.form.storage.destroy(formEl);\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.form-store-data').each(function (index, formEl) {\n        app.form.storage.init(formEl);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.form-store-data').each(function (index, formEl) {\n        app.form.storage.destroy(formEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.form-store-data').each(function (index, formEl) {\n        app.form.storage.init(formEl);\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/input/input.js\n\n\n\n\nvar Input = {\n  ignoreTypes: ['checkbox', 'button', 'submit', 'range', 'radio', 'image'],\n  createTextareaResizableShadow: function createTextareaResizableShadow() {\n    var $shadowEl = Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"].createElement('textarea'));\n    $shadowEl.addClass('textarea-resizable-shadow');\n    $shadowEl.prop({\n      disabled: true,\n      readonly: true\n    });\n    Input.textareaResizableShadow = $shadowEl;\n  },\n  textareaResizableShadow: undefined,\n  resizeTextarea: function resizeTextarea(textareaEl) {\n    var app = this;\n    var $textareaEl = Object(dom7_module[\"default\"])(textareaEl);\n    if (!Input.textareaResizableShadow) {\n      Input.createTextareaResizableShadow();\n    }\n    var $shadowEl = Input.textareaResizableShadow;\n    if (!$textareaEl.length) return;\n    if (!$textareaEl.hasClass('resizable')) return;\n    if (Input.textareaResizableShadow.parents().length === 0) {\n      app.root.append($shadowEl);\n    }\n    var styles = ssr_window_esm[\"window\"].getComputedStyle($textareaEl[0]);\n    'padding-top padding-bottom padding-left padding-right margin-left margin-right margin-top margin-bottom width font-size font-family font-style font-weight line-height font-variant text-transform letter-spacing border box-sizing display'.split(' ').forEach(function (style) {\n      var styleValue = styles[style];\n      if ('font-size line-height letter-spacing width'.split(' ').indexOf(style) >= 0) {\n        styleValue = styleValue.replace(',', '.');\n      }\n      $shadowEl.css(style, styleValue);\n    });\n    var currentHeight = $textareaEl[0].clientHeight;\n    $shadowEl.val('');\n    var initialHeight = $shadowEl[0].scrollHeight;\n    $shadowEl.val($textareaEl.val());\n    $shadowEl.css('height', 0);\n    var scrollHeight = $shadowEl[0].scrollHeight;\n    if (currentHeight !== scrollHeight) {\n      if (scrollHeight > initialHeight) {\n        $textareaEl.css('height', \"\".concat(scrollHeight, \"px\"));\n      } else if (scrollHeight < currentHeight) {\n        $textareaEl.css('height', '');\n      }\n      if (scrollHeight > initialHeight || scrollHeight < currentHeight) {\n        $textareaEl.trigger('textarea:resize', {\n          initialHeight: initialHeight,\n          currentHeight: currentHeight,\n          scrollHeight: scrollHeight\n        });\n        app.emit('textareaResize', {\n          initialHeight: initialHeight,\n          currentHeight: currentHeight,\n          scrollHeight: scrollHeight\n        });\n      }\n    }\n  },\n  validate: function validate(inputEl) {\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    if (!$inputEl.length) return true;\n    var $itemInputEl = $inputEl.parents('.item-input');\n    var $inputWrapEl = $inputEl.parents('.input');\n    function unsetReadonly() {\n      if ($inputEl[0].f7ValidateReadonly) {\n        $inputEl[0].readOnly = false;\n      }\n    }\n    function setReadonly() {\n      if ($inputEl[0].f7ValidateReadonly) {\n        $inputEl[0].readOnly = true;\n      }\n    }\n    unsetReadonly();\n    var validity = $inputEl[0].validity;\n    var validationMessage = $inputEl.dataset().errorMessage || $inputEl[0].validationMessage || '';\n    if (!validity) {\n      setReadonly();\n      return true;\n    }\n    if (!validity.valid) {\n      var $errorEl = $inputEl.nextAll('.item-input-error-message, .input-error-message');\n      if (validationMessage) {\n        if ($errorEl.length === 0) {\n          $errorEl = Object(dom7_module[\"default\"])(\"<div class=\\\"\".concat($inputWrapEl.length ? 'input-error-message' : 'item-input-error-message', \"\\\"></div>\"));\n          $errorEl.insertAfter($inputEl);\n        }\n        $errorEl.text(validationMessage);\n      }\n      if ($errorEl.length > 0) {\n        $itemInputEl.addClass('item-input-with-error-message');\n        $inputWrapEl.addClass('input-with-error-message');\n      }\n      $itemInputEl.addClass('item-input-invalid');\n      $inputWrapEl.addClass('input-invalid');\n      $inputEl.addClass('input-invalid');\n      setReadonly();\n      return false;\n    }\n    $itemInputEl.removeClass('item-input-invalid item-input-with-error-message');\n    $inputWrapEl.removeClass('input-invalid input-with-error-message');\n    $inputEl.removeClass('input-invalid');\n    setReadonly();\n    return true;\n  },\n  validateInputs: function validateInputs(el) {\n    var app = this;\n    var validates = Object(dom7_module[\"default\"])(el).find('input, textarea, select').toArray().map(function (inputEl) {\n      return app.input.validate(inputEl);\n    });\n    return validates.indexOf(false) < 0;\n  },\n  focus: function focus(inputEl) {\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    var type = $inputEl.attr('type');\n    if (Input.ignoreTypes.indexOf(type) >= 0) return;\n    $inputEl.parents('.item-input').addClass('item-input-focused');\n    $inputEl.parents('.input').addClass('input-focused');\n    $inputEl.addClass('input-focused');\n  },\n  blur: function blur(inputEl) {\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    $inputEl.parents('.item-input').removeClass('item-input-focused');\n    $inputEl.parents('.input').removeClass('input-focused');\n    $inputEl.removeClass('input-focused');\n  },\n  checkEmptyState: function checkEmptyState(inputEl) {\n    var app = this;\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    if (!$inputEl.is('input, select, textarea, .item-input [contenteditable]')) {\n      $inputEl = $inputEl.find('input, select, textarea, .item-input [contenteditable]').eq(0);\n    }\n    if (!$inputEl.length) return;\n    var isContentEditable = $inputEl[0].hasAttribute('contenteditable');\n    var value;\n    if (isContentEditable) {\n      if ($inputEl.find('.text-editor-placeholder').length) value = '';else value = $inputEl.html();\n    } else {\n      value = $inputEl.val();\n    }\n    var $itemInputEl = $inputEl.parents('.item-input');\n    var $inputWrapEl = $inputEl.parents('.input');\n    if (value && typeof value === 'string' && value.trim() !== '' || Array.isArray(value) && value.length > 0) {\n      $itemInputEl.addClass('item-input-with-value');\n      $inputWrapEl.addClass('input-with-value');\n      $inputEl.addClass('input-with-value');\n      $inputEl.trigger('input:notempty');\n      app.emit('inputNotEmpty', $inputEl[0]);\n    } else {\n      $itemInputEl.removeClass('item-input-with-value');\n      $inputWrapEl.removeClass('input-with-value');\n      $inputEl.removeClass('input-with-value');\n      $inputEl.trigger('input:empty');\n      app.emit('inputEmpty', $inputEl[0]);\n    }\n  },\n  scrollIntoView: function scrollIntoView(inputEl) {\n    var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    var centered = arguments.length > 2 ? arguments[2] : undefined;\n    var force = arguments.length > 3 ? arguments[3] : undefined;\n    var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n    var $scrollableEl = $inputEl.parents('.page-content, .panel, .card-expandable .card-content').eq(0);\n    if (!$scrollableEl.length) {\n      return false;\n    }\n    var contentHeight = $scrollableEl[0].offsetHeight;\n    var contentScrollTop = $scrollableEl[0].scrollTop;\n    var contentPaddingTop = parseInt($scrollableEl.css('padding-top'), 10);\n    var contentPaddingBottom = parseInt($scrollableEl.css('padding-bottom'), 10);\n    var contentOffsetTop = $scrollableEl.offset().top - contentScrollTop;\n    var inputOffsetTop = $inputEl.offset().top - contentOffsetTop;\n    var inputHeight = $inputEl[0].offsetHeight;\n    var min = inputOffsetTop + contentScrollTop - contentPaddingTop;\n    var max = inputOffsetTop + contentScrollTop - contentHeight + contentPaddingBottom + inputHeight;\n    var centeredPosition = min + (max - min) / 2;\n    if (contentScrollTop > min) {\n      $scrollableEl.scrollTop(centered ? centeredPosition : min, duration);\n      return true;\n    }\n    if (contentScrollTop < max) {\n      $scrollableEl.scrollTop(centered ? centeredPosition : max, duration);\n      return true;\n    }\n    if (force) {\n      $scrollableEl.scrollTop(centered ? centeredPosition : max, duration);\n    }\n    return false;\n  },\n  init: function init() {\n    var app = this;\n    Input.createTextareaResizableShadow();\n    function onFocus() {\n      var inputEl = this;\n      if (app.params.input.scrollIntoViewOnFocus) {\n        if (device[\"default\"].android) {\n          Object(dom7_module[\"default\"])(ssr_window_esm[\"window\"]).once('resize', function () {\n            if (ssr_window_esm[\"document\"] && ssr_window_esm[\"document\"].activeElement === inputEl) {\n              app.input.scrollIntoView(inputEl, app.params.input.scrollIntoViewDuration, app.params.input.scrollIntoViewCentered, app.params.input.scrollIntoViewAlways);\n            }\n          });\n        } else {\n          app.input.scrollIntoView(inputEl, app.params.input.scrollIntoViewDuration, app.params.input.scrollIntoViewCentered, app.params.input.scrollIntoViewAlways);\n        }\n      }\n      app.input.focus(inputEl);\n    }\n    function onBlur() {\n      var $inputEl = Object(dom7_module[\"default\"])(this);\n      var tag = $inputEl[0].nodeName.toLowerCase();\n      app.input.blur($inputEl);\n      if ($inputEl.dataset().validate || $inputEl.attr('validate') !== null || $inputEl.attr('data-validate-on-blur') !== null) {\n        app.input.validate($inputEl);\n      }\n      // Resize textarea\n      if (tag === 'textarea' && $inputEl.hasClass('resizable')) {\n        if (Input.textareaResizableShadow) Input.textareaResizableShadow.remove();\n      }\n    }\n    function onChange() {\n      var $inputEl = Object(dom7_module[\"default\"])(this);\n      var type = $inputEl.attr('type');\n      var tag = $inputEl[0].nodeName.toLowerCase();\n      var isContentEditable = $inputEl[0].hasAttribute('contenteditable');\n      if (Input.ignoreTypes.indexOf(type) >= 0) return;\n\n      // Check Empty State\n      app.input.checkEmptyState($inputEl);\n      if (isContentEditable) return;\n\n      // Check validation\n      if ($inputEl.attr('data-validate-on-blur') === null && ($inputEl.dataset().validate || $inputEl.attr('validate') !== null)) {\n        app.input.validate($inputEl);\n      }\n\n      // Resize textarea\n      if (tag === 'textarea' && $inputEl.hasClass('resizable')) {\n        app.input.resizeTextarea($inputEl);\n      }\n    }\n    function onInvalid(e) {\n      var $inputEl = Object(dom7_module[\"default\"])(this);\n      if ($inputEl.attr('data-validate-on-blur') === null && ($inputEl.dataset().validate || $inputEl.attr('validate') !== null)) {\n        e.preventDefault();\n        app.input.validate($inputEl);\n      }\n    }\n    function clearInput() {\n      var $clicked = Object(dom7_module[\"default\"])(this);\n      var $inputEl = $clicked.siblings('input, textarea').eq(0);\n      var previousValue = $inputEl.val();\n      $inputEl.val('').trigger('input change').focus().trigger('input:clear', previousValue);\n      app.emit('inputClear', previousValue);\n    }\n    function preventDefault(e) {\n      e.preventDefault();\n    }\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('click', '.input-clear-button', clearInput);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('mousedown', '.input-clear-button', preventDefault);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('change input', 'input, textarea, select, .item-input [contenteditable]', onChange, true);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('focus', 'input, textarea, select, .item-input [contenteditable]', onFocus, true);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('blur', 'input, textarea, select, .item-input [contenteditable]', onBlur, true);\n    Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('invalid', 'input, textarea, select', onInvalid, true);\n  }\n};\n/* harmony default export */ var input_input = ({\n  name: 'input',\n  params: {\n    input: {\n      scrollIntoViewOnFocus: device[\"default\"].android,\n      scrollIntoViewCentered: false,\n      scrollIntoViewDuration: 0,\n      scrollIntoViewAlways: false\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      input: {\n        scrollIntoView: Input.scrollIntoView.bind(app),\n        focus: Input.focus.bind(app),\n        blur: Input.blur.bind(app),\n        validate: Input.validate.bind(app),\n        validateInputs: Input.validateInputs.bind(app),\n        checkEmptyState: Input.checkEmptyState.bind(app),\n        resizeTextarea: Input.resizeTextarea.bind(app),\n        init: Input.init.bind(app)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      app.input.init();\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      $tabEl.find('.item-input, .input').each(function (itemInputIndex, itemInputEl) {\n        var $itemInputEl = Object(dom7_module[\"default\"])(itemInputEl);\n        $itemInputEl.find('input, select, textarea, [contenteditable]').each(function (inputIndex, inputEl) {\n          var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n          if (Input.ignoreTypes.indexOf($inputEl.attr('type')) >= 0) return;\n          app.input.checkEmptyState($inputEl);\n        });\n      });\n      $tabEl.find('textarea.resizable').each(function (textareaIndex, textareaEl) {\n        app.input.resizeTextarea(textareaEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      var $pageEl = page.$el;\n      $pageEl.find('.item-input, .input').each(function (itemInputIndex, itemInputEl) {\n        var $itemInputEl = Object(dom7_module[\"default\"])(itemInputEl);\n        $itemInputEl.find('input, select, textarea, [contenteditable]').each(function (inputIndex, inputEl) {\n          var $inputEl = Object(dom7_module[\"default\"])(inputEl);\n          if (Input.ignoreTypes.indexOf($inputEl.attr('type')) >= 0) return;\n          app.input.checkEmptyState($inputEl);\n        });\n      });\n      $pageEl.find('textarea.resizable').each(function (textareaIndex, textareaEl) {\n        app.input.resizeTextarea(textareaEl);\n      });\n    },\n    'panelBreakpoint panelCollapsedBreakpoint panelResize panelOpen panelSwipeOpen resize viewMasterDetailBreakpoint': function onPanelOpen(instance) {\n      var app = this;\n      if (instance && instance.$el) {\n        instance.$el.find('textarea.resizable').each(function (textareaIndex, textareaEl) {\n          app.input.resizeTextarea(textareaEl);\n        });\n      } else {\n        Object(dom7_module[\"default\"])('textarea.resizable').each(function (textareaIndex, textareaEl) {\n          app.input.resizeTextarea(textareaEl);\n        });\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/checkbox/checkbox.js\n/* harmony default export */ var checkbox_checkbox = ({\n  name: 'checkbox'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/radio/radio.js\n/* harmony default export */ var radio_radio = ({\n  name: 'radio'\n});\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/readOnlyError.js\nvar readOnlyError = __webpack_require__(\"./node_modules/@babel/runtime/helpers/readOnlyError.js\");\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/toggle/toggle-class.js\n\n\n\n\n\n\nfunction toggle_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, toggle_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction toggle_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (toggle_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar toggle_class_Toggle = /*#__PURE__*/function (_Framework7Class) {\n  function Toggle(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Toggle);\n    _this = toggle_class_callSuper(this, Toggle, [params, [app]]);\n    var toggle = _this;\n    var defaults = {};\n\n    // Extend defaults with modules params\n    toggle.useModulesParams(defaults);\n    toggle.params = utils[\"default\"].extend(defaults, params);\n    var el = toggle.params.el;\n    if (!el) return possibleConstructorReturn_default()(_this, toggle);\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, toggle);\n    if ($el[0].f7Toggle) return possibleConstructorReturn_default()(_this, $el[0].f7Toggle);\n    var $inputEl = $el.children('input[type=\"checkbox\"]');\n    utils[\"default\"].extend(toggle, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $inputEl: $inputEl,\n      inputEl: $inputEl[0],\n      disabled: $el.hasClass('disabled') || $inputEl.hasClass('disabled') || $inputEl.attr('disabled') || $inputEl[0].disabled\n    });\n    Object.defineProperty(toggle, 'checked', {\n      enumerable: true,\n      configurable: true,\n      set: function set(checked) {\n        if (!toggle || typeof toggle.$inputEl === 'undefined') return;\n        if (toggle.checked === checked) return;\n        $inputEl[0].checked = checked;\n        toggle.$inputEl.trigger('change');\n      },\n      get: function get() {\n        return $inputEl[0].checked;\n      }\n    });\n    $el[0].f7Toggle = toggle;\n    var isTouched;\n    var touchesStart = {};\n    var isScrolling;\n    var touchesDiff;\n    var toggleWidth;\n    var touchStartTime;\n    var touchStartChecked;\n    function handleTouchStart(e) {\n      if (isTouched || toggle.disabled) return;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      touchesDiff = 0;\n      isTouched = true;\n      isScrolling = undefined;\n      touchStartTime = utils[\"default\"].now();\n      touchStartChecked = toggle.checked;\n      toggleWidth = $el[0].offsetWidth;\n      utils[\"default\"].nextTick(function () {\n        if (isTouched) {\n          $el.addClass('toggle-active-state');\n        }\n      });\n    }\n    function handleTouchMove(e) {\n      if (!isTouched || toggle.disabled) return;\n      var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      var inverter = app.rtl ? -1 : 1;\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        return;\n      }\n      e.preventDefault();\n      touchesDiff = pageX - touchesStart.x;\n      var changed;\n      if (touchesDiff * inverter < 0 && Math.abs(touchesDiff) > toggleWidth / 3 && touchStartChecked) {\n        changed = true;\n      }\n      if (touchesDiff * inverter > 0 && Math.abs(touchesDiff) > toggleWidth / 3 && !touchStartChecked) {\n        changed = true;\n      }\n      if (changed) {\n        touchesStart.x = pageX;\n        toggle.checked = !touchStartChecked;\n        touchStartChecked = !touchStartChecked;\n      }\n    }\n    function handleTouchEnd() {\n      if (!isTouched || toggle.disabled) {\n        if (isScrolling) $el.removeClass('toggle-active-state');\n        isTouched = false;\n        return;\n      }\n      var inverter = app.rtl ? -1 : 1;\n      isTouched = false;\n      $el.removeClass('toggle-active-state');\n      var changed;\n      if (utils[\"default\"].now() - touchStartTime < 300) {\n        if (touchesDiff * inverter < 0 && touchStartChecked) {\n          changed = true;\n        }\n        if (touchesDiff * inverter > 0 && !touchStartChecked) {\n          changed = true;\n        }\n        if (changed) {\n          toggle.checked = !touchStartChecked;\n        }\n      }\n    }\n    function handleInputChange() {\n      toggle.$el.trigger('toggle:change');\n      toggle.emit('local::change toggleChange', toggle);\n    }\n    toggle.attachEvents = function attachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      $el.on(app.touchEvents.start, handleTouchStart, passive);\n      app.on('touchmove', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n      toggle.$inputEl.on('change', handleInputChange);\n    };\n    toggle.detachEvents = function detachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      $el.off(app.touchEvents.start, handleTouchStart, passive);\n      app.off('touchmove', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      toggle.$inputEl.off('change', handleInputChange);\n    };\n\n    // Install Modules\n    toggle.useModules();\n\n    // Init\n    toggle.init();\n    return _this;\n  }\n  inherits_default()(Toggle, _Framework7Class);\n  return createClass_default()(Toggle, [{\n    key: \"toggle\",\n    value: function toggle() {\n      var toggle = this;\n      toggle.checked = !toggle.checked;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var toggle = this;\n      toggle.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var toggle = this;\n      toggle.$el.trigger('toggle:beforedestroy');\n      toggle.emit('local::beforeDestroy toggleBeforeDestroy', toggle);\n      delete toggle.$el[0].f7Toggle;\n      toggle.detachEvents();\n      utils[\"default\"].deleteProps(toggle);\n      toggle = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var toggle_class = (toggle_class_Toggle);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/toggle/toggle.js\n\n\n\n/* harmony default export */ var toggle_toggle = ({\n  name: 'toggle',\n  create: function create() {\n    var app = this;\n    app.toggle = constructor_methods({\n      defaultSelector: '.toggle',\n      constructor: toggle_class,\n      app: app,\n      domProp: 'f7Toggle'\n    });\n  },\n  static: {\n    Toggle: toggle_class\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.toggle-init').each(function (index, toggleEl) {\n        return app.toggle.create({\n          el: toggleEl\n        });\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.toggle-init').each(function (index, toggleEl) {\n        if (toggleEl.f7Toggle) toggleEl.f7Toggle.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.toggle-init').each(function (index, toggleEl) {\n        return app.toggle.create({\n          el: toggleEl\n        });\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.toggle-init').each(function (index, toggleEl) {\n        if (toggleEl.f7Toggle) toggleEl.f7Toggle.destroy();\n      });\n    }\n  },\n  vnode: {\n    'toggle-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var toggleEl = vnode.elm;\n        app.toggle.create({\n          el: toggleEl\n        });\n      },\n      destroy: function destroy(vnode) {\n        var toggleEl = vnode.elm;\n        if (toggleEl.f7Toggle) toggleEl.f7Toggle.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/range/range-class.js\n\n\n\n\n\n\nfunction range_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, range_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction range_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (range_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar range_class_Range = /*#__PURE__*/function (_Framework7Class) {\n  function Range(app, params) {\n    var _this;\n    classCallCheck_default()(this, Range);\n    _this = range_class_callSuper(this, Range, [params, [app]]);\n    var range = _this;\n    var defaults = {\n      el: null,\n      inputEl: null,\n      dual: false,\n      step: 1,\n      label: false,\n      min: 0,\n      max: 100,\n      value: 0,\n      draggableBar: true,\n      vertical: false,\n      verticalReversed: false,\n      formatLabel: null,\n      scale: false,\n      scaleSteps: 5,\n      scaleSubSteps: 0,\n      formatScaleLabel: null,\n      limitKnobPosition: app.theme === 'ios'\n    };\n\n    // Extend defaults with modules params\n    range.useModulesParams(defaults);\n    range.params = utils[\"default\"].extend(defaults, params);\n    var el = range.params.el;\n    if (!el) return possibleConstructorReturn_default()(_this, range);\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, range);\n    if ($el[0].f7Range) return possibleConstructorReturn_default()(_this, $el[0].f7Range);\n    var dataset = $el.dataset();\n    'step min max value scaleSteps scaleSubSteps'.split(' ').forEach(function (paramName) {\n      if (typeof params[paramName] === 'undefined' && typeof dataset[paramName] !== 'undefined') {\n        range.params[paramName] = parseFloat(dataset[paramName]);\n      }\n    });\n    'dual label vertical verticalReversed scale'.split(' ').forEach(function (paramName) {\n      if (typeof params[paramName] === 'undefined' && typeof dataset[paramName] !== 'undefined') {\n        range.params[paramName] = dataset[paramName];\n      }\n    });\n    if (!range.params.value) {\n      if (typeof dataset.value !== 'undefined') range.params.value = dataset.value;\n      if (typeof dataset.valueLeft !== 'undefined' && typeof dataset.valueRight !== 'undefined') {\n        range.params.value = [parseFloat(dataset.valueLeft), parseFloat(dataset.valueRight)];\n      }\n    }\n    var $inputEl;\n    if (!range.params.dual) {\n      if (range.params.inputEl) {\n        $inputEl = Object(dom7_module[\"default\"])(range.params.inputEl);\n      } else if ($el.find('input[type=\"range\"]').length) {\n        $inputEl = $el.find('input[type=\"range\"]').eq(0);\n      }\n    }\n    var _range$params = range.params,\n      dual = _range$params.dual,\n      step = _range$params.step,\n      label = _range$params.label,\n      min = _range$params.min,\n      max = _range$params.max,\n      value = _range$params.value,\n      vertical = _range$params.vertical,\n      verticalReversed = _range$params.verticalReversed,\n      scale = _range$params.scale,\n      scaleSteps = _range$params.scaleSteps,\n      scaleSubSteps = _range$params.scaleSubSteps,\n      limitKnobPosition = _range$params.limitKnobPosition;\n    utils[\"default\"].extend(range, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $inputEl: $inputEl,\n      inputEl: $inputEl ? $inputEl[0] : undefined,\n      dual: dual,\n      step: step,\n      label: label,\n      min: min,\n      max: max,\n      value: value,\n      previousValue: value,\n      vertical: vertical,\n      verticalReversed: verticalReversed,\n      scale: scale,\n      scaleSteps: scaleSteps,\n      scaleSubSteps: scaleSubSteps,\n      limitKnobPosition: limitKnobPosition\n    });\n    if ($inputEl) {\n      'step min max'.split(' ').forEach(function (paramName) {\n        if (!params[paramName] && $inputEl.attr(paramName)) {\n          range.params[paramName] = parseFloat($inputEl.attr(paramName));\n          range[paramName] = parseFloat($inputEl.attr(paramName));\n        }\n      });\n      if (typeof $inputEl.val() !== 'undefined') {\n        range.params.value = parseFloat($inputEl.val());\n        range.value = parseFloat($inputEl.val());\n      }\n    }\n\n    // Dual\n    if (range.dual) {\n      $el.addClass('range-slider-dual');\n    }\n    if (range.label) {\n      $el.addClass('range-slider-label');\n    }\n\n    // Vertical\n    if (range.vertical) {\n      $el.addClass('range-slider-vertical');\n      if (range.verticalReversed) {\n        $el.addClass('range-slider-vertical-reversed');\n      }\n    } else {\n      $el.addClass('range-slider-horizontal');\n    }\n\n    // Check for layout\n    var $barEl = Object(dom7_module[\"default\"])('<div class=\"range-bar\"></div>');\n    var $barActiveEl = Object(dom7_module[\"default\"])('<div class=\"range-bar-active\"></div>');\n    $barEl.append($barActiveEl);\n\n    // Create Knobs\n    var knobHTML = \"\\n      <div class=\\\"range-knob-wrap\\\">\\n        <div class=\\\"range-knob\\\"></div>\\n        \".concat(range.label ? '<div class=\"range-knob-label\"></div>' : '', \"\\n      </div>\\n    \");\n    var knobs = [Object(dom7_module[\"default\"])(knobHTML)];\n    if (range.dual) {\n      knobs.push(Object(dom7_module[\"default\"])(knobHTML));\n    }\n    $el.append($barEl);\n    knobs.forEach(function ($knobEl) {\n      $el.append($knobEl);\n    });\n\n    // Labels\n    var labels = [];\n    if (range.label) {\n      labels.push(knobs[0].find('.range-knob-label'));\n      if (range.dual) {\n        labels.push(knobs[1].find('.range-knob-label'));\n      }\n    }\n\n    // Scale\n    var $scaleEl;\n    if (range.scale && range.scaleSteps >= 1) {\n      $scaleEl = Object(dom7_module[\"default\"])(\"\\n        <div class=\\\"range-scale\\\">\\n          \".concat(range.renderScale(), \"\\n        </div>\\n      \"));\n      $el.append($scaleEl);\n    }\n    utils[\"default\"].extend(range, {\n      knobs: knobs,\n      labels: labels,\n      $barEl: $barEl,\n      $barActiveEl: $barActiveEl,\n      $scaleEl: $scaleEl\n    });\n    $el[0].f7Range = range;\n\n    // Touch Events\n    var isTouched;\n    var touchesStart = {};\n    var isScrolling;\n    var rangeOffset;\n    var rangeOffsetLeft;\n    var rangeOffsetTop;\n    var $touchedKnobEl;\n    var dualValueIndex;\n    var valueChangedByTouch;\n    var targetTouchIdentifier;\n    function onTouchChange() {\n      valueChangedByTouch = true;\n    }\n    function handleTouchStart(e) {\n      if (isTouched) return;\n      if (!range.params.draggableBar) {\n        if (Object(dom7_module[\"default\"])(e.target).closest('.range-knob').length === 0) {\n          return;\n        }\n      }\n      valueChangedByTouch = false;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      if (e.type === 'touchstart') {\n        targetTouchIdentifier = e.targetTouches[0].identifier;\n      }\n      isTouched = true;\n      isScrolling = undefined;\n      rangeOffset = $el.offset();\n      rangeOffsetLeft = rangeOffset.left;\n      rangeOffsetTop = rangeOffset.top;\n      var progress;\n      if (range.vertical) {\n        progress = (touchesStart.y - rangeOffsetTop) / range.rangeHeight;\n        if (!range.verticalReversed) progress = 1 - progress;\n      } else if (range.app.rtl) {\n        progress = (rangeOffsetLeft + range.rangeWidth - touchesStart.x) / range.rangeWidth;\n      } else {\n        progress = (touchesStart.x - rangeOffsetLeft) / range.rangeWidth;\n      }\n      var newValue = progress * (range.max - range.min) + range.min;\n      if (range.dual) {\n        if (Math.abs(range.value[0] - newValue) < Math.abs(range.value[1] - newValue)) {\n          dualValueIndex = 0;\n          $touchedKnobEl = range.knobs[0];\n          newValue = [newValue, range.value[1]];\n        } else {\n          dualValueIndex = 1;\n          $touchedKnobEl = range.knobs[1];\n          newValue = [range.value[0], newValue];\n        }\n      } else {\n        $touchedKnobEl = range.knobs[0];\n        newValue = progress * (range.max - range.min) + range.min;\n      }\n      utils[\"default\"].nextTick(function () {\n        if (isTouched) $touchedKnobEl.addClass('range-knob-active-state');\n      }, 70);\n      range.on('change', onTouchChange);\n      range.setValue(newValue, true);\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var pageX;\n      var pageY;\n      if (e.type === 'touchmove') {\n        for (var i = 0; i < e.targetTouches.length; i += 1) {\n          if (e.targetTouches[i].identifier === targetTouchIdentifier) {\n            pageX = e.targetTouches[i].pageX;\n            pageY = e.targetTouches[i].pageY;\n          }\n        }\n      } else {\n        pageX = e.pageX;\n        pageY = e.pageY;\n      }\n      if (typeof pageX === 'undefined' && typeof pageY === 'undefined') return;\n      if (typeof isScrolling === 'undefined' && !range.vertical) {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        return;\n      }\n      e.preventDefault();\n      var progress;\n      if (range.vertical) {\n        progress = (pageY - rangeOffsetTop) / range.rangeHeight;\n        if (!range.verticalReversed) progress = 1 - progress;\n      } else if (range.app.rtl) {\n        progress = (rangeOffsetLeft + range.rangeWidth - pageX) / range.rangeWidth;\n      } else {\n        progress = (pageX - rangeOffsetLeft) / range.rangeWidth;\n      }\n      var newValue = progress * (range.max - range.min) + range.min;\n      if (range.dual) {\n        var leftValue;\n        var rightValue;\n        if (dualValueIndex === 0) {\n          leftValue = newValue;\n          rightValue = range.value[1];\n          if (leftValue > rightValue) {\n            rightValue = leftValue;\n          }\n        } else {\n          leftValue = range.value[0];\n          rightValue = newValue;\n          if (rightValue < leftValue) {\n            leftValue = rightValue;\n          }\n        }\n        newValue = [leftValue, rightValue];\n      }\n      range.setValue(newValue, true);\n    }\n    function handleTouchEnd(e) {\n      if (e.type === 'touchend') {\n        var touchEnded;\n        for (var i = 0; i < e.changedTouches.length; i += 1) {\n          if (e.changedTouches[i].identifier === targetTouchIdentifier) touchEnded = true;\n        }\n        if (!touchEnded) return;\n      }\n      if (!isTouched) {\n        if (isScrolling) $touchedKnobEl.removeClass('range-knob-active-state');\n        isTouched = false;\n        return;\n      }\n      range.off('change', onTouchChange);\n      isTouched = false;\n      $touchedKnobEl.removeClass('range-knob-active-state');\n      if (valueChangedByTouch && range.$inputEl && !range.dual) {\n        range.$inputEl.trigger('change');\n      }\n      valueChangedByTouch = false;\n      if (typeof range.previousValue !== 'undefined') {\n        if (range.dual && (range.previousValue[0] !== range.value[0] || range.previousValue[1] !== range.value[1]) || !range.dual && range.previousValue !== range.value) {\n          range.$el.trigger('range:changed', range.value);\n          range.emit('local::changed rangeChanged', range, range.value);\n        }\n      }\n    }\n    function handleResize() {\n      range.calcSize();\n      range.layout();\n    }\n    var parentModals;\n    var parentPanel;\n    var parentPage;\n    range.attachEvents = function attachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      range.$el.on(app.touchEvents.start, handleTouchStart, passive);\n      app.on('touchmove', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n      app.on('tabShow', handleResize);\n      app.on('resize', handleResize);\n      parentModals = range.$el.parents('.sheet-modal, .actions-modal, .popup, .popover, .login-screen, .dialog, .toast');\n      parentModals.on('modal:open', handleResize);\n      parentPanel = range.$el.parents('.panel');\n      parentPanel.on('panel:open panel:resize', handleResize);\n      parentPage = range.$el.parents('.page').eq(0);\n      parentPage.on('page:reinit', handleResize);\n    };\n    range.detachEvents = function detachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      range.$el.off(app.touchEvents.start, handleTouchStart, passive);\n      app.off('touchmove', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      app.off('tabShow', handleResize);\n      app.off('resize', handleResize);\n      if (parentModals) {\n        parentModals.off('modal:open', handleResize);\n      }\n      if (parentPanel) {\n        parentPanel.off('panel:open panel:resize', handleResize);\n      }\n      if (parentPage) {\n        parentPage.off('page:reinit', handleResize);\n      }\n      parentModals = null;\n      parentPanel = null;\n      parentPage = null;\n    };\n\n    // Install Modules\n    range.useModules();\n\n    // Init\n    range.init();\n    return possibleConstructorReturn_default()(_this, range);\n  }\n  inherits_default()(Range, _Framework7Class);\n  return createClass_default()(Range, [{\n    key: \"calcSize\",\n    value: function calcSize() {\n      var range = this;\n      if (range.vertical) {\n        var height = range.$el.outerHeight();\n        if (height === 0) return;\n        range.rangeHeight = height;\n        range.knobHeight = range.knobs[0].outerHeight();\n      } else {\n        var width = range.$el.outerWidth();\n        if (width === 0) return;\n        range.rangeWidth = width;\n        range.knobWidth = range.knobs[0].outerWidth();\n      }\n    }\n  }, {\n    key: \"layout\",\n    value: function layout() {\n      var range = this;\n      var app = range.app,\n        knobWidth = range.knobWidth,\n        knobHeight = range.knobHeight,\n        rangeWidth = range.rangeWidth,\n        rangeHeight = range.rangeHeight,\n        min = range.min,\n        max = range.max,\n        knobs = range.knobs,\n        $barActiveEl = range.$barActiveEl,\n        value = range.value,\n        label = range.label,\n        labels = range.labels,\n        vertical = range.vertical,\n        verticalReversed = range.verticalReversed,\n        limitKnobPosition = range.limitKnobPosition;\n      var knobSize = vertical ? knobHeight : knobWidth;\n      var rangeSize = vertical ? rangeHeight : rangeWidth;\n      // eslint-disable-next-line\n      var positionProperty = vertical ? verticalReversed ? 'top' : 'bottom' : app.rtl ? 'right' : 'left';\n      if (range.dual) {\n        var progress = [(value[0] - min) / (max - min), (value[1] - min) / (max - min)];\n        $barActiveEl.css(defineProperty_default()(defineProperty_default()({}, positionProperty, \"\".concat(progress[0] * 100, \"%\")), vertical ? 'height' : 'width', \"\".concat((progress[1] - progress[0]) * 100, \"%\")));\n        knobs.forEach(function ($knobEl, knobIndex) {\n          var startPos = rangeSize * progress[knobIndex];\n          if (limitKnobPosition) {\n            var realStartPos = rangeSize * progress[knobIndex] - knobSize / 2;\n            if (realStartPos < 0) startPos = knobSize / 2;\n            if (realStartPos + knobSize > rangeSize) startPos = rangeSize - knobSize / 2;\n          }\n          $knobEl.css(positionProperty, \"\".concat(startPos, \"px\"));\n          if (label) labels[knobIndex].text(range.formatLabel(value[knobIndex], labels[knobIndex][0]));\n        });\n      } else {\n        var _progress = (value - min) / (max - min);\n        $barActiveEl.css(vertical ? 'height' : 'width', \"\".concat(_progress * 100, \"%\"));\n        var startPos = rangeSize * _progress;\n        if (limitKnobPosition) {\n          var realStartPos = rangeSize * _progress - knobSize / 2;\n          if (realStartPos < 0) startPos = knobSize / 2;\n          if (realStartPos + knobSize > rangeSize) startPos = rangeSize - knobSize / 2;\n        }\n        knobs[0].css(positionProperty, \"\".concat(startPos, \"px\"));\n        if (label) labels[0].text(range.formatLabel(value, labels[0][0]));\n      }\n      if (range.dual && value.indexOf(min) >= 0 || !range.dual && value === min) {\n        range.$el.addClass('range-slider-min');\n      } else {\n        range.$el.removeClass('range-slider-min');\n      }\n      if (range.dual && value.indexOf(max) >= 0 || !range.dual && value === max) {\n        range.$el.addClass('range-slider-max');\n      } else {\n        range.$el.removeClass('range-slider-max');\n      }\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(newValue, byTouchMove) {\n      var range = this;\n      var step = range.step,\n        min = range.min,\n        max = range.max;\n      var valueChanged;\n      var oldValue;\n      if (range.dual) {\n        oldValue = [range.value[0], range.value[1]];\n        var newValues = newValue;\n        if (!Array.isArray(newValues)) newValues = [newValue, newValue];\n        if (newValue[0] > newValue[1]) {\n          newValues = [newValues[0], newValues[0]];\n        }\n        newValues = newValues.map(function (value) {\n          return Math.max(Math.min(Math.round(value / step) * step, max), min);\n        });\n        if (newValues[0] === range.value[0] && newValues[1] === range.value[1]) {\n          return range;\n        }\n        newValues.forEach(function (value, valueIndex) {\n          range.value[valueIndex] = value;\n        });\n        valueChanged = oldValue[0] !== newValues[0] || oldValue[1] !== newValues[1];\n        range.layout();\n      } else {\n        oldValue = range.value;\n        var value = Math.max(Math.min(Math.round(newValue / step) * step, max), min);\n        range.value = value;\n        range.layout();\n        valueChanged = oldValue !== value;\n      }\n      if (valueChanged) {\n        range.previousValue = oldValue;\n      }\n      // Events\n      if (!valueChanged) return range;\n      range.$el.trigger('range:change', range.value);\n      if (range.$inputEl && !range.dual) {\n        range.$inputEl.val(range.value);\n        if (!byTouchMove) {\n          range.$inputEl.trigger('input change');\n        } else {\n          range.$inputEl.trigger('input');\n        }\n      }\n      if (!byTouchMove) {\n        range.$el.trigger('range:changed', range.value);\n        range.emit('local::changed rangeChanged', range, range.value);\n      }\n      range.emit('local::change rangeChange', range, range.value);\n      return range;\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      return this.value;\n    }\n  }, {\n    key: \"formatLabel\",\n    value: function formatLabel(value, labelEl) {\n      var range = this;\n      if (range.params.formatLabel) return range.params.formatLabel.call(range, value, labelEl);\n      return value;\n    }\n  }, {\n    key: \"formatScaleLabel\",\n    value: function formatScaleLabel(value) {\n      var range = this;\n      if (range.params.formatScaleLabel) return range.params.formatScaleLabel.call(range, value);\n      return value;\n    }\n  }, {\n    key: \"renderScale\",\n    value: function renderScale() {\n      var range = this;\n      var app = range.app,\n        verticalReversed = range.verticalReversed,\n        vertical = range.vertical;\n\n      // eslint-disable-next-line\n      var positionProperty = vertical ? verticalReversed ? 'top' : 'bottom' : app.rtl ? 'right' : 'left';\n      var html = '';\n      Array.from({\n        length: range.scaleSteps + 1\n      }).forEach(function (scaleEl, index) {\n        var scaleStepValue = (range.max - range.min) / range.scaleSteps;\n        var scaleValue = range.min + scaleStepValue * index;\n        var progress = (scaleValue - range.min) / (range.max - range.min);\n        html += \"<div class=\\\"range-scale-step\\\" style=\\\"\".concat(positionProperty, \": \").concat(progress * 100, \"%\\\">\").concat(range.formatScaleLabel(scaleValue), \"</div>\");\n        if (range.scaleSubSteps && range.scaleSubSteps > 1 && index < range.scaleSteps) {\n          Array.from({\n            length: range.scaleSubSteps - 1\n          }).forEach(function (subStepEl, subIndex) {\n            var subStep = scaleStepValue / range.scaleSubSteps;\n            var scaleSubValue = scaleValue + subStep * (subIndex + 1);\n            var subProgress = (scaleSubValue - range.min) / (range.max - range.min);\n            html += \"<div class=\\\"range-scale-step range-scale-substep\\\" style=\\\"\".concat(positionProperty, \": \").concat(subProgress * 100, \"%\\\"></div>\");\n          });\n        }\n      });\n      return html;\n    }\n  }, {\n    key: \"updateScale\",\n    value: function updateScale() {\n      var range = this;\n      if (!range.scale || range.scaleSteps < 1) {\n        if (range.$scaleEl) range.$scaleEl.remove();\n        delete range.$scaleEl;\n        return;\n      }\n      if (!range.$scaleEl) {\n        range.$scaleEl = Object(dom7_module[\"default\"])('<div class=\"range-scale\"></div>');\n        range.$el.append(range.$scaleEl);\n      }\n      range.$scaleEl.html(range.renderScale());\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var range = this;\n      range.calcSize();\n      range.layout();\n      range.attachEvents();\n      return range;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var range = this;\n      range.$el.trigger('range:beforedestroy');\n      range.emit('local::beforeDestroy rangeBeforeDestroy', range);\n      delete range.$el[0].f7Range;\n      range.detachEvents();\n      utils[\"default\"].deleteProps(range);\n      range = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var range_class = (range_class_Range);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/range/range.js\n\n\n\n\n/* harmony default export */ var range_range = ({\n  name: 'range',\n  create: function create() {\n    var app = this;\n    app.range = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: '.range-slider',\n      constructor: range_class,\n      app: app,\n      domProp: 'f7Range'\n    }), {\n      getValue: function getValue() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.range-slider';\n        var range = app.range.get(el);\n        if (range) return range.getValue();\n        return undefined;\n      },\n      setValue: function setValue() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.range-slider';\n        var value = arguments.length > 1 ? arguments[1] : undefined;\n        var range = app.range.get(el);\n        if (range) return range.setValue(value);\n        return undefined;\n      }\n    });\n  },\n  static: {\n    Range: range_class\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.range-slider-init').each(function (index, rangeEl) {\n        return new range_class(app, {\n          el: rangeEl\n        });\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.range-slider-init').each(function (index, rangeEl) {\n        if (rangeEl.f7Range) rangeEl.f7Range.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.range-slider-init').each(function (index, rangeEl) {\n        return new range_class(app, {\n          el: rangeEl\n        });\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.range-slider-init').each(function (index, rangeEl) {\n        if (rangeEl.f7Range) rangeEl.f7Range.destroy();\n      });\n    }\n  },\n  vnode: {\n    'range-slider-init': {\n      insert: function insert(vnode) {\n        var rangeEl = vnode.elm;\n        var app = this;\n        app.range.create({\n          el: rangeEl\n        });\n      },\n      destroy: function destroy(vnode) {\n        var rangeEl = vnode.elm;\n        if (rangeEl.f7Range) rangeEl.f7Range.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/stepper/stepper-class.js\n\n\n\n\n\nfunction stepper_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, stepper_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction stepper_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (stepper_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar stepper_class_Stepper = /*#__PURE__*/function (_Framework7Class) {\n  function Stepper(app, params) {\n    var _this;\n    classCallCheck_default()(this, Stepper);\n    _this = stepper_class_callSuper(this, Stepper, [params, [app]]);\n    var stepper = _this;\n    var defaults = {\n      el: null,\n      inputEl: null,\n      valueEl: null,\n      value: 0,\n      formatValue: null,\n      step: 1,\n      min: 0,\n      max: 100,\n      watchInput: true,\n      autorepeat: false,\n      autorepeatDynamic: false,\n      wraps: false,\n      manualInputMode: false,\n      decimalPoint: 4,\n      buttonsEndInputMode: true\n    };\n\n    // Extend defaults with modules params\n    stepper.useModulesParams(defaults);\n    stepper.params = utils[\"default\"].extend(defaults, params);\n    if (stepper.params.value < stepper.params.min) {\n      stepper.params.value = stepper.params.min;\n    }\n    if (stepper.params.value > stepper.params.max) {\n      stepper.params.value = stepper.params.max;\n    }\n    var el = stepper.params.el;\n    if (!el) return possibleConstructorReturn_default()(_this, stepper);\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, stepper);\n    if ($el[0].f7Stepper) return possibleConstructorReturn_default()(_this, $el[0].f7Stepper);\n    var $inputEl;\n    if (stepper.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(stepper.params.inputEl);\n    } else if ($el.find('.stepper-input-wrap').find('input, textarea').length) {\n      $inputEl = $el.find('.stepper-input-wrap').find('input, textarea').eq(0);\n    }\n    if ($inputEl && $inputEl.length) {\n      'step min max'.split(' ').forEach(function (paramName) {\n        if (!params[paramName] && $inputEl.attr(paramName)) {\n          stepper.params[paramName] = parseFloat($inputEl.attr(paramName));\n        }\n      });\n      var _decimalPoint = parseInt(stepper.params.decimalPoint, 10);\n      if (Number.isNaN(_decimalPoint)) {\n        stepper.params.decimalPoint = 0;\n      } else {\n        stepper.params.decimalPoint = _decimalPoint;\n      }\n      var inputValue = parseFloat($inputEl.val());\n      if (typeof params.value === 'undefined' && !Number.isNaN(inputValue) && (inputValue || inputValue === 0)) {\n        stepper.params.value = inputValue;\n      }\n    }\n    var $valueEl;\n    if (stepper.params.valueEl) {\n      $valueEl = Object(dom7_module[\"default\"])(stepper.params.valueEl);\n    } else if ($el.find('.stepper-value').length) {\n      $valueEl = $el.find('.stepper-value').eq(0);\n    }\n    var $buttonPlusEl = $el.find('.stepper-button-plus');\n    var $buttonMinusEl = $el.find('.stepper-button-minus');\n    var _stepper$params = stepper.params,\n      step = _stepper$params.step,\n      min = _stepper$params.min,\n      max = _stepper$params.max,\n      value = _stepper$params.value,\n      decimalPoint = _stepper$params.decimalPoint;\n    utils[\"default\"].extend(stepper, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $buttonPlusEl: $buttonPlusEl,\n      buttonPlusEl: $buttonPlusEl[0],\n      $buttonMinusEl: $buttonMinusEl,\n      buttonMinusEl: $buttonMinusEl[0],\n      $inputEl: $inputEl,\n      inputEl: $inputEl ? $inputEl[0] : undefined,\n      $valueEl: $valueEl,\n      valueEl: $valueEl ? $valueEl[0] : undefined,\n      step: step,\n      min: min,\n      max: max,\n      value: value,\n      decimalPoint: decimalPoint,\n      typeModeChanged: false\n    });\n    $el[0].f7Stepper = stepper;\n\n    // Handle Events\n    var touchesStart = {};\n    var isTouched;\n    var isScrolling;\n    var preventButtonClick;\n    var intervalId;\n    var timeoutId;\n    var autorepeatAction = null;\n    var autorepeatInAction = false;\n    var manualInput = false;\n    function dynamicRepeat(current, progressions, startsIn, progressionStep, repeatEvery, action) {\n      clearTimeout(timeoutId);\n      timeoutId = setTimeout(function () {\n        if (current === 1) {\n          preventButtonClick = true;\n          autorepeatInAction = true;\n        }\n        clearInterval(intervalId);\n        action();\n        intervalId = setInterval(function () {\n          action();\n        }, repeatEvery);\n        if (current < progressions) {\n          dynamicRepeat(current + 1, progressions, startsIn, progressionStep, repeatEvery / 2, action);\n        }\n      }, current === 1 ? startsIn : progressionStep);\n    }\n    function onTouchStart(e) {\n      if (isTouched) return;\n      if (manualInput) {\n        return;\n      }\n      if (Object(dom7_module[\"default\"])(e.target).closest($buttonPlusEl).length) {\n        autorepeatAction = 'increment';\n      } else if (Object(dom7_module[\"default\"])(e.target).closest($buttonMinusEl).length) {\n        autorepeatAction = 'decrement';\n      }\n      if (!autorepeatAction) return;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      isTouched = true;\n      isScrolling = undefined;\n      var progressions = stepper.params.autorepeatDynamic ? 4 : 1;\n      dynamicRepeat(1, progressions, 500, 1000, 300, function () {\n        stepper[autorepeatAction]();\n      });\n    }\n    function onTouchMove(e) {\n      if (!isTouched) return;\n      if (manualInput) {\n        return;\n      }\n      var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      if (typeof isScrolling === 'undefined' && !autorepeatInAction) {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n      }\n      var distance = Math.pow(Math.pow(pageX - touchesStart.x, 2) + Math.pow(pageY - touchesStart.y, 2), 0.5);\n      if (isScrolling || distance > 20) {\n        isTouched = false;\n        clearTimeout(timeoutId);\n        clearInterval(intervalId);\n      }\n    }\n    function onTouchEnd() {\n      clearTimeout(timeoutId);\n      clearInterval(intervalId);\n      autorepeatAction = null;\n      autorepeatInAction = false;\n      isTouched = false;\n    }\n    function onMinusClick() {\n      if (manualInput) {\n        if (stepper.params.buttonsEndInputMode) {\n          manualInput = false;\n          stepper.endTypeMode(true);\n        }\n        return;\n      }\n      if (preventButtonClick) {\n        preventButtonClick = false;\n        return;\n      }\n      stepper.decrement(true);\n    }\n    function onPlusClick() {\n      if (manualInput) {\n        if (stepper.params.buttonsEndInputMode) {\n          manualInput = false;\n          stepper.endTypeMode(true);\n        }\n        return;\n      }\n      if (preventButtonClick) {\n        preventButtonClick = false;\n        return;\n      }\n      stepper.increment(true);\n    }\n    function onInputClick(e) {\n      if (!e.target.readOnly && stepper.params.manualInputMode) {\n        manualInput = true;\n        if (typeof e.target.selectionStart === 'number') {\n          e.target.selectionStart = e.target.value.length;\n          e.target.selectionEnd = e.target.value.length;\n        }\n      }\n    }\n    function onInputKey(e) {\n      if (e.keyCode === 13 || e.which === 13) {\n        e.preventDefault();\n        manualInput = false;\n        stepper.endTypeMode();\n      }\n    }\n    function onInputBlur() {\n      manualInput = false;\n      stepper.endTypeMode(true);\n    }\n    function onInput(e) {\n      if (manualInput) {\n        stepper.typeValue(e.target.value);\n        return;\n      }\n      if (e.detail && e.detail.sentByF7Stepper) return;\n      stepper.setValue(e.target.value, true);\n    }\n    stepper.attachEvents = function attachEvents() {\n      $buttonMinusEl.on('click', onMinusClick);\n      $buttonPlusEl.on('click', onPlusClick);\n      if (stepper.params.watchInput && $inputEl && $inputEl.length) {\n        $inputEl.on('input', onInput);\n        $inputEl.on('click', onInputClick);\n        $inputEl.on('blur', onInputBlur);\n        $inputEl.on('keyup', onInputKey);\n      }\n      if (stepper.params.autorepeat) {\n        app.on('touchstart:passive', onTouchStart);\n        app.on('touchmove:active', onTouchMove);\n        app.on('touchend:passive', onTouchEnd);\n      }\n    };\n    stepper.detachEvents = function detachEvents() {\n      $buttonMinusEl.off('click', onMinusClick);\n      $buttonPlusEl.off('click', onPlusClick);\n      if (stepper.params.watchInput && $inputEl && $inputEl.length) {\n        $inputEl.off('input', onInput);\n        $inputEl.off('click', onInputClick);\n        $inputEl.off('blur', onInputBlur);\n        $inputEl.off('keyup', onInputKey);\n      }\n    };\n\n    // Install Modules\n    stepper.useModules();\n\n    // Init\n    stepper.init();\n    return possibleConstructorReturn_default()(_this, stepper);\n  }\n  inherits_default()(Stepper, _Framework7Class);\n  return createClass_default()(Stepper, [{\n    key: \"minus\",\n    value: function minus() {\n      return this.decrement();\n    }\n  }, {\n    key: \"plus\",\n    value: function plus() {\n      return this.increment();\n    }\n  }, {\n    key: \"decrement\",\n    value: function decrement() {\n      var stepper = this;\n      return stepper.setValue(stepper.value - stepper.step, false, true);\n    }\n  }, {\n    key: \"increment\",\n    value: function increment() {\n      var stepper = this;\n      return stepper.setValue(stepper.value + stepper.step, false, true);\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(newValue, forceUpdate, withWraps) {\n      var stepper = this;\n      var step = stepper.step,\n        min = stepper.min,\n        max = stepper.max;\n      var oldValue = stepper.value;\n      var value = Math.round(newValue / step) * step;\n      if (stepper.params.wraps && withWraps) {\n        if (value > max) value = min;\n        if (value < min) value = max;\n      } else {\n        value = Math.max(Math.min(value, max), min);\n      }\n      if (Number.isNaN(value)) {\n        value = oldValue;\n      }\n      stepper.value = value;\n      var valueChanged = oldValue !== value;\n\n      // Events\n      if (!valueChanged && !forceUpdate) return stepper;\n      stepper.$el.trigger('stepper:change', stepper.value);\n      var formattedValue = stepper.formatValue(stepper.value);\n      if (stepper.$inputEl && stepper.$inputEl.length) {\n        stepper.$inputEl.val(formattedValue);\n        stepper.$inputEl.trigger('input change', {\n          sentByF7Stepper: true\n        });\n      }\n      if (stepper.$valueEl && stepper.$valueEl.length) {\n        stepper.$valueEl.html(formattedValue);\n      }\n      stepper.emit('local::change stepperChange', stepper, stepper.value);\n      return stepper;\n    }\n  }, {\n    key: \"endTypeMode\",\n    value: function endTypeMode(noBlur) {\n      var stepper = this;\n      var min = stepper.min,\n        max = stepper.max;\n      var value = parseFloat(stepper.value);\n      if (Number.isNaN(value)) value = 0;\n      value = Math.max(Math.min(value, max), min);\n      stepper.value = value;\n      if (!stepper.typeModeChanged) {\n        if (stepper.$inputEl && stepper.$inputEl.length && !noBlur) {\n          stepper.$inputEl.blur();\n        }\n        return stepper;\n      }\n      stepper.typeModeChanged = false;\n      stepper.$el.trigger('stepper:change', stepper.value);\n      var formattedValue = stepper.formatValue(stepper.value);\n      if (stepper.$inputEl && stepper.$inputEl.length) {\n        stepper.$inputEl.val(formattedValue);\n        stepper.$inputEl.trigger('input change', {\n          sentByF7Stepper: true\n        });\n        if (!noBlur) stepper.$inputEl.blur();\n      }\n      if (stepper.$valueEl && stepper.$valueEl.length) {\n        stepper.$valueEl.html(formattedValue);\n      }\n      stepper.emit('local::change stepperChange', stepper, stepper.value);\n      return stepper;\n    }\n  }, {\n    key: \"typeValue\",\n    value: function typeValue(value) {\n      var stepper = this;\n      stepper.typeModeChanged = true;\n      var inputTxt = String(value);\n      if (inputTxt.lastIndexOf('.') + 1 === inputTxt.length || inputTxt.lastIndexOf(',') + 1 === inputTxt.length) {\n        if (inputTxt.lastIndexOf('.') !== inputTxt.indexOf('.') || inputTxt.lastIndexOf(',') !== inputTxt.indexOf(',')) {\n          inputTxt = inputTxt.slice(0, -1);\n          stepper.value = inputTxt;\n          stepper.$inputEl.val(stepper.value);\n          return stepper;\n        }\n      } else {\n        var newValue = parseFloat(inputTxt.replace(',', '.'));\n        if (newValue === 0) {\n          stepper.value = inputTxt.replace(',', '.');\n          stepper.$inputEl.val(stepper.value);\n          return stepper;\n        }\n        if (Number.isNaN(newValue)) {\n          stepper.value = 0;\n          stepper.$inputEl.val(stepper.value);\n          return stepper;\n        }\n        var powVal = Math.pow(10, stepper.params.decimalPoint);\n        newValue = Math.round(newValue * powVal).toFixed(stepper.params.decimalPoint + 1) / powVal;\n        stepper.value = parseFloat(String(newValue).replace(',', '.'));\n        stepper.$inputEl.val(stepper.value);\n        return stepper;\n      }\n      stepper.value = inputTxt;\n      stepper.$inputEl.val(inputTxt);\n      return stepper;\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      return this.value;\n    }\n  }, {\n    key: \"formatValue\",\n    value: function formatValue(value) {\n      var stepper = this;\n      if (!stepper.params.formatValue) return value;\n      return stepper.params.formatValue.call(stepper, value);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var stepper = this;\n      stepper.attachEvents();\n      if (stepper.$valueEl && stepper.$valueEl.length) {\n        var formattedValue = stepper.formatValue(stepper.value);\n        stepper.$valueEl.html(formattedValue);\n      }\n      return stepper;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var stepper = this;\n      stepper.$el.trigger('stepper:beforedestroy');\n      stepper.emit('local::beforeDestroy stepperBeforeDestroy', stepper);\n      delete stepper.$el[0].f7Stepper;\n      stepper.detachEvents();\n      utils[\"default\"].deleteProps(stepper);\n      stepper = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var stepper_class = (stepper_class_Stepper);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/stepper/stepper.js\n\n\n\n\n/* harmony default export */ var stepper_stepper = ({\n  name: 'stepper',\n  create: function create() {\n    var app = this;\n    app.stepper = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: '.stepper',\n      constructor: stepper_class,\n      app: app,\n      domProp: 'f7Stepper'\n    }), {\n      getValue: function getValue() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.stepper';\n        var stepper = app.stepper.get(el);\n        if (stepper) return stepper.getValue();\n        return undefined;\n      },\n      setValue: function setValue() {\n        var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.stepper';\n        var value = arguments.length > 1 ? arguments[1] : undefined;\n        var stepper = app.stepper.get(el);\n        if (stepper) return stepper.setValue(value);\n        return undefined;\n      }\n    });\n  },\n  static: {\n    Stepper: stepper_class\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.stepper-init').each(function (index, stepperEl) {\n        var dataset = Object(dom7_module[\"default\"])(stepperEl).dataset();\n        app.stepper.create(utils[\"default\"].extend({\n          el: stepperEl\n        }, dataset || {}));\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.stepper-init').each(function (index, stepperEl) {\n        if (stepperEl.f7Stepper) stepperEl.f7Stepper.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.stepper-init').each(function (index, stepperEl) {\n        var dataset = Object(dom7_module[\"default\"])(stepperEl).dataset();\n        app.stepper.create(utils[\"default\"].extend({\n          el: stepperEl\n        }, dataset || {}));\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.stepper-init').each(function (index, stepperEl) {\n        if (stepperEl.f7Stepper) stepperEl.f7Stepper.destroy();\n      });\n    }\n  },\n  vnode: {\n    'stepper-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var stepperEl = vnode.elm;\n        var dataset = Object(dom7_module[\"default\"])(stepperEl).dataset();\n        app.stepper.create(utils[\"default\"].extend({\n          el: stepperEl\n        }, dataset || {}));\n      },\n      destroy: function destroy(vnode) {\n        var stepperEl = vnode.elm;\n        if (stepperEl.f7Stepper) stepperEl.f7Stepper.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/smart-select/smart-select-class.js\n\n\n\n\n\n\nfunction smart_select_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, smart_select_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction smart_select_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (smart_select_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar smart_select_class_SmartSelect = /*#__PURE__*/function (_Framework7Class) {\n  function SmartSelect(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, SmartSelect);\n    _this = smart_select_class_callSuper(this, SmartSelect, [params, [app]]);\n    var ss = _this;\n    var defaults = utils[\"default\"].extend({\n      on: {}\n    }, app.params.smartSelect);\n    if (typeof defaults.searchbarDisableButton === 'undefined') {\n      defaults.searchbarDisableButton = app.theme !== 'aurora';\n    }\n\n    // Extend defaults with modules params\n    ss.useModulesParams(defaults);\n    ss.params = utils[\"default\"].extend({}, defaults, params);\n    ss.app = app;\n    var $el = Object(dom7_module[\"default\"])(ss.params.el).eq(0);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, ss);\n    if ($el[0].f7SmartSelect) return possibleConstructorReturn_default()(_this, $el[0].f7SmartSelect);\n    var $selectEl = $el.find('select').eq(0);\n    if ($selectEl.length === 0) return possibleConstructorReturn_default()(_this, ss);\n    var $valueEl;\n    if (ss.params.setValueText) {\n      $valueEl = Object(dom7_module[\"default\"])(ss.params.valueEl);\n      if ($valueEl.length === 0) {\n        $valueEl = $el.find('.item-after');\n      }\n      if ($valueEl.length === 0) {\n        $valueEl = Object(dom7_module[\"default\"])('<div class=\"item-after\"></div>');\n        $valueEl.insertAfter($el.find('.item-title'));\n      }\n    }\n\n    // Url\n    var url = params.url;\n    if (!url) {\n      if ($el.attr('href') && $el.attr('href') !== '#') url = $el.attr('href');else if ($selectEl.attr('name')) url = \"\".concat($selectEl.attr('name').toLowerCase(), \"-select/\");\n    }\n    if (!url) url = ss.params.url;\n    var multiple = $selectEl[0].multiple;\n    var inputType = multiple ? 'checkbox' : 'radio';\n    var id = utils[\"default\"].id();\n    utils[\"default\"].extend(ss, {\n      $el: $el,\n      el: $el[0],\n      $selectEl: $selectEl,\n      selectEl: $selectEl[0],\n      $valueEl: $valueEl,\n      valueEl: $valueEl && $valueEl[0],\n      url: url,\n      multiple: multiple,\n      inputType: inputType,\n      id: id,\n      inputName: \"\".concat(inputType, \"-\").concat(id),\n      selectName: $selectEl.attr('name'),\n      maxLength: $selectEl.attr('maxlength') || params.maxLength\n    });\n    $el[0].f7SmartSelect = ss;\n\n    // Events\n    function onClick() {\n      ss.open();\n    }\n    function onChange() {\n      var value = ss.$selectEl.val();\n      ss.$el.trigger('smartselect:change', value);\n      ss.emit('local::change smartSelectChange', ss, value);\n      if (ss.vl) {\n        ss.vl.clearCache();\n      }\n      ss.setValueText();\n    }\n    ss.attachEvents = function attachEvents() {\n      $el.on('click', onClick);\n      $el.on('change', 'select', onChange);\n    };\n    ss.detachEvents = function detachEvents() {\n      $el.off('click', onClick);\n      $el.off('change', 'select', onChange);\n    };\n    function handleInputChange() {\n      var optionEl;\n      var text;\n      var inputEl = this;\n      var value = inputEl.value;\n      var optionText = [];\n      var displayAs;\n      if (inputEl.type === 'checkbox') {\n        for (var i = 0; i < ss.selectEl.options.length; i += 1) {\n          optionEl = ss.selectEl.options[i];\n          if (optionEl.value === value) {\n            optionEl.selected = inputEl.checked;\n          }\n          if (optionEl.selected) {\n            displayAs = optionEl.dataset ? optionEl.dataset.displayAs : Object(dom7_module[\"default\"])(optionEl).data('display-value-as');\n            text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl.textContent;\n            optionText.push(text.trim());\n          }\n        }\n        if (ss.maxLength) {\n          ss.checkMaxLength();\n        }\n      } else {\n        optionEl = ss.$selectEl.find(\"option[value=\\\"\".concat(value, \"\\\"]\"))[0];\n        if (!optionEl) {\n          optionEl = ss.$selectEl.find('option').filter(function (index, optEl) {\n            return optEl.value === value;\n          })[0];\n        }\n        displayAs = optionEl.dataset ? optionEl.dataset.displayAs : Object(dom7_module[\"default\"])(optionEl).data('display-as');\n        text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl.textContent;\n        optionText = [text];\n        ss.selectEl.value = value;\n      }\n      ss.$selectEl.trigger('change');\n      if (ss.params.setValueText) {\n        ss.$valueEl.text(ss.formatValueText(optionText));\n      }\n      if (ss.params.closeOnSelect && ss.inputType === 'radio') {\n        ss.close();\n      }\n    }\n    ss.attachInputsEvents = function attachInputsEvents() {\n      ss.$containerEl.on('change', 'input[type=\"checkbox\"], input[type=\"radio\"]', handleInputChange);\n    };\n    ss.detachInputsEvents = function detachInputsEvents() {\n      ss.$containerEl.off('change', 'input[type=\"checkbox\"], input[type=\"radio\"]', handleInputChange);\n    };\n\n    // Install Modules\n    ss.useModules();\n\n    // Init\n    ss.init();\n    return possibleConstructorReturn_default()(_this, ss);\n  }\n  inherits_default()(SmartSelect, _Framework7Class);\n  return createClass_default()(SmartSelect, [{\n    key: \"setValue\",\n    value: function setValue(value) {\n      var ss = this;\n      var newValue = value;\n      var optionText = [];\n      var optionEl;\n      var displayAs;\n      var text;\n      if (ss.multiple) {\n        if (!Array.isArray(newValue)) newValue = [newValue];\n        for (var i = 0; i < ss.selectEl.options.length; i += 1) {\n          optionEl = ss.selectEl.options[i];\n          if (newValue.indexOf(optionEl.value) >= 0) {\n            optionEl.selected = true;\n          } else {\n            optionEl.selected = false;\n          }\n          if (optionEl.selected) {\n            displayAs = optionEl.dataset ? optionEl.dataset.displayAs : Object(dom7_module[\"default\"])(optionEl).data('display-value-as');\n            text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl.textContent;\n            optionText.push(text.trim());\n          }\n        }\n      } else {\n        optionEl = ss.$selectEl.find(\"option[value=\\\"\".concat(newValue, \"\\\"]\"))[0];\n        if (optionEl) {\n          displayAs = optionEl.dataset ? optionEl.dataset.displayAs : Object(dom7_module[\"default\"])(optionEl).data('display-as');\n          text = displayAs && typeof displayAs !== 'undefined' ? displayAs : optionEl.textContent;\n          optionText = [text];\n        }\n        ss.selectEl.value = newValue;\n      }\n      if (ss.params.setValueText) {\n        ss.$valueEl.text(ss.formatValueText(optionText));\n      }\n      ss.$selectEl.trigger('change');\n      return ss;\n    }\n  }, {\n    key: \"unsetValue\",\n    value: function unsetValue() {\n      var ss = this;\n      if (ss.params.setValueText) {\n        ss.$valueEl.text(ss.formatValueText([]));\n      }\n      ss.$selectEl.find('option').each(function (optionIndex, optionEl) {\n        optionEl.selected = false;\n        optionEl.checked = false;\n      });\n      ss.$selectEl[0].value = null;\n      if (ss.$containerEl) {\n        ss.$containerEl.find(\"input[name=\\\"\".concat(ss.inputName, \"\\\"][type=\\\"checkbox\\\"], input[name=\\\"\").concat(ss.inputName, \"\\\"][type=\\\"radio\\\"]\")).prop('checked', false);\n      }\n      ss.$selectEl.trigger('change');\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var ss = this;\n      return ss.$selectEl.val();\n    }\n  }, {\n    key: \"view\",\n    get: function get() {\n      var params = this.params,\n        $el = this.$el;\n      var view;\n      if (params.view) {\n        view = params.view;\n      }\n      if (!view) {\n        view = $el.parents('.view').length && $el.parents('.view')[0].f7View;\n      }\n      if (!view && params.openIn === 'page') {\n        throw Error('Smart Select requires initialized View');\n      }\n      return view;\n    }\n  }, {\n    key: \"checkMaxLength\",\n    value: function checkMaxLength() {\n      var ss = this;\n      var $containerEl = ss.$containerEl;\n      if (ss.selectEl.selectedOptions.length >= ss.maxLength) {\n        $containerEl.find('input[type=\"checkbox\"]').each(function (index, inputEl) {\n          if (!inputEl.checked) {\n            Object(dom7_module[\"default\"])(inputEl).parents('li').addClass('disabled');\n          } else {\n            Object(dom7_module[\"default\"])(inputEl).parents('li').removeClass('disabled');\n          }\n        });\n      } else {\n        $containerEl.find('.disabled').removeClass('disabled');\n      }\n    }\n  }, {\n    key: \"formatValueText\",\n    value: function formatValueText(values) {\n      var ss = this;\n      var textValue;\n      if (ss.params.formatValueText) {\n        textValue = ss.params.formatValueText.call(ss, values, ss);\n      } else {\n        textValue = values.join(', ');\n      }\n      return textValue;\n    }\n  }, {\n    key: \"setValueText\",\n    value: function setValueText(value) {\n      var ss = this;\n      var valueArray = [];\n      if (typeof value !== 'undefined') {\n        if (Array.isArray(value)) {\n          valueArray = value;\n        } else {\n          valueArray = [value];\n        }\n      } else {\n        ss.$selectEl.find('option').each(function (optionIndex, optionEl) {\n          var $optionEl = Object(dom7_module[\"default\"])(optionEl);\n          if (optionEl.selected) {\n            var displayAs = optionEl.dataset ? optionEl.dataset.displayAs : $optionEl.data('display-value-as');\n            if (displayAs && typeof displayAs !== 'undefined') {\n              valueArray.push(displayAs);\n            } else {\n              valueArray.push(optionEl.textContent.trim());\n            }\n          }\n        });\n      }\n      if (ss.params.setValueText) {\n        ss.$valueEl.text(ss.formatValueText(valueArray));\n      }\n    }\n  }, {\n    key: \"getItemsData\",\n    value: function getItemsData() {\n      var ss = this;\n      var theme = ss.app.theme;\n      var items = [];\n      var previousGroupEl;\n      ss.$selectEl.find('option').each(function (index, optionEl) {\n        var $optionEl = Object(dom7_module[\"default\"])(optionEl);\n        var optionData = $optionEl.dataset();\n        var optionImage = optionData.optionImage || ss.params.optionImage;\n        var optionIcon = optionData.optionIcon || ss.params.optionIcon;\n        var optionIconIos = theme === 'ios' && (optionData.optionIconIos || ss.params.optionIconIos);\n        var optionIconMd = theme === 'md' && (optionData.optionIconMd || ss.params.optionIconMd);\n        var optionIconAurora = theme === 'aurora' && (optionData.optionIconAurora || ss.params.optionIconAurora);\n        var optionHasMedia = optionImage || optionIcon || optionIconIos || optionIconMd || optionIconAurora;\n        var optionColor = optionData.optionColor;\n        var optionClassName = optionData.optionClass || '';\n        if ($optionEl[0].disabled) optionClassName += ' disabled';\n        var optionGroupEl = $optionEl.parent('optgroup')[0];\n        var optionGroupLabel = optionGroupEl && optionGroupEl.label;\n        var optionIsLabel = false;\n        if (optionGroupEl && optionGroupEl !== previousGroupEl) {\n          optionIsLabel = true;\n          previousGroupEl = optionGroupEl;\n          items.push({\n            groupLabel: optionGroupLabel,\n            isLabel: optionIsLabel\n          });\n        }\n        items.push({\n          value: $optionEl[0].value,\n          text: $optionEl[0].textContent.trim(),\n          selected: $optionEl[0].selected,\n          groupEl: optionGroupEl,\n          groupLabel: optionGroupLabel,\n          image: optionImage,\n          icon: optionIcon,\n          iconIos: optionIconIos,\n          iconMd: optionIconMd,\n          iconAurora: optionIconAurora,\n          color: optionColor,\n          className: optionClassName,\n          disabled: $optionEl[0].disabled,\n          id: ss.id,\n          hasMedia: optionHasMedia,\n          checkbox: ss.inputType === 'checkbox',\n          radio: ss.inputType === 'radio',\n          inputName: ss.inputName,\n          inputType: ss.inputType\n        });\n      });\n      ss.items = items;\n      return items;\n    }\n  }, {\n    key: \"renderSearchbar\",\n    value: function renderSearchbar() {\n      var ss = this;\n      if (ss.params.renderSearchbar) return ss.params.renderSearchbar.call(ss);\n      var searchbarHTML = \"\\n      <form class=\\\"searchbar\\\">\\n        <div class=\\\"searchbar-inner\\\">\\n          <div class=\\\"searchbar-input-wrap\\\">\\n            <input type=\\\"search\\\" spellcheck=\\\"\".concat(ss.params.searchbarSpellcheck || 'false', \"\\\" placeholder=\\\"\").concat(ss.params.searchbarPlaceholder, \"\\\"/>\\n            <i class=\\\"searchbar-icon\\\"></i>\\n            <span class=\\\"input-clear-button\\\"></span>\\n          </div>\\n          \").concat(ss.params.searchbarDisableButton ? \"\\n          <span class=\\\"searchbar-disable-button\\\">\".concat(ss.params.searchbarDisableText, \"</span>\\n          \") : '', \"\\n        </div>\\n      </form>\\n    \");\n      return searchbarHTML;\n    }\n  }, {\n    key: \"renderItem\",\n    value: function renderItem(item, index) {\n      var ss = this;\n      if (ss.params.renderItem) return ss.params.renderItem.call(ss, item, index);\n      function getIconContent() {\n        var iconValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n        if (iconValue.indexOf(':') >= 0) {\n          return iconValue.split(':')[1];\n        }\n        return '';\n      }\n      function getIconClass() {\n        var iconValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n        if (iconValue.indexOf(':') >= 0) {\n          var className = iconValue.split(':')[0];\n          if (className === 'f7') className = 'f7-icons';\n          if (className === 'material') className = 'material-icons';\n          return className;\n        }\n        return iconValue;\n      }\n      var itemHtml;\n      if (item.isLabel) {\n        itemHtml = \"<li class=\\\"item-divider\\\">\".concat(item.groupLabel, \"</li>\");\n      } else {\n        var selected = item.selected;\n        var disabled;\n        if (ss.params.virtualList) {\n          var ssValue = ss.getValue();\n          selected = ss.multiple ? ssValue.indexOf(item.value) >= 0 : ssValue === item.value;\n          if (ss.multiple) {\n            disabled = ss.multiple && !selected && ssValue.length === parseInt(ss.maxLength, 10);\n          }\n        }\n        var icon = item.icon,\n          iconIos = item.iconIos,\n          iconMd = item.iconMd,\n          iconAurora = item.iconAurora;\n        var hasIcon = icon || iconIos || iconMd || iconAurora;\n        var iconContent = getIconContent(icon || iconIos || iconMd || iconAurora || '');\n        var iconClass = getIconClass(icon || iconIos || iconMd || iconAurora || '');\n        itemHtml = \"\\n        <li class=\\\"\".concat(item.className || '').concat(disabled ? ' disabled' : '', \"\\\">\\n          <label class=\\\"item-\").concat(item.inputType, \" item-content\\\">\\n            <input type=\\\"\").concat(item.inputType, \"\\\" name=\\\"\").concat(item.inputName, \"\\\" value=\\\"\").concat(item.value, \"\\\" \").concat(selected ? 'checked' : '', \"/>\\n            <i class=\\\"icon icon-\").concat(item.inputType, \"\\\"></i>\\n            \").concat(item.hasMedia ? \"\\n              <div class=\\\"item-media\\\">\\n                \".concat(hasIcon ? \"<i class=\\\"icon \".concat(iconClass, \"\\\">\").concat(iconContent, \"</i>\") : '', \"\\n                \").concat(item.image ? \"<img src=\\\"\".concat(item.image, \"\\\">\") : '', \"\\n              </div>\\n            \") : '', \"\\n            <div class=\\\"item-inner\\\">\\n              <div class=\\\"item-title\").concat(item.color ? \" text-color-\".concat(item.color) : '', \"\\\">\").concat(item.text, \"</div>\\n            </div>\\n          </label>\\n        </li>\\n      \");\n      }\n      return itemHtml;\n    }\n  }, {\n    key: \"renderItems\",\n    value: function renderItems() {\n      var ss = this;\n      if (ss.params.renderItems) return ss.params.renderItems.call(ss, ss.items);\n      var itemsHtml = \"\\n      \".concat(ss.items.map(function (item, index) {\n        return \"\".concat(ss.renderItem(item, index));\n      }).join(''), \"\\n    \");\n      return itemsHtml;\n    }\n  }, {\n    key: \"renderPage\",\n    value: function renderPage() {\n      var ss = this;\n      if (ss.params.renderPage) return ss.params.renderPage.call(ss, ss.items);\n      var pageTitle = ss.params.pageTitle;\n      if (typeof pageTitle === 'undefined') {\n        var $itemTitleEl = ss.$el.find('.item-title');\n        pageTitle = $itemTitleEl.length ? $itemTitleEl.text().trim() : '';\n      }\n      var cssClass = ss.params.cssClass;\n      var pageHtml = \"\\n      <div class=\\\"page smart-select-page \".concat(cssClass, \"\\\" data-name=\\\"smart-select-page\\\" data-select-name=\\\"\").concat(ss.selectName, \"\\\">\\n        <div class=\\\"navbar \").concat(ss.params.navbarColorTheme ? \"color-\".concat(ss.params.navbarColorTheme) : '', \"\\\">\\n          <div class=\\\"navbar-bg\\\"></div>\\n          <div class=\\\"navbar-inner sliding \").concat(ss.params.navbarColorTheme ? \"color-\".concat(ss.params.navbarColorTheme) : '', \"\\\">\\n            <div class=\\\"left\\\">\\n              <a class=\\\"link back\\\">\\n                <i class=\\\"icon icon-back\\\"></i>\\n                <span class=\\\"if-not-md\\\">\").concat(ss.params.pageBackLinkText, \"</span>\\n              </a>\\n            </div>\\n            \").concat(pageTitle ? \"<div class=\\\"title\\\">\".concat(pageTitle, \"</div>\") : '', \"\\n            \").concat(ss.params.searchbar ? \"<div class=\\\"subnavbar\\\">\".concat(ss.renderSearchbar(), \"</div>\") : '', \"\\n          </div>\\n        </div>\\n        \").concat(ss.params.searchbar ? '<div class=\"searchbar-backdrop\"></div>' : '', \"\\n        <div class=\\\"page-content\\\">\\n          <div class=\\\"list smart-select-list-\").concat(ss.id, \" \").concat(ss.params.virtualList ? ' virtual-list' : '', \" \").concat(ss.params.formColorTheme ? \"color-\".concat(ss.params.formColorTheme) : '', \"\\\">\\n            <ul>\").concat(!ss.params.virtualList && ss.renderItems(ss.items), \"</ul>\\n          </div>\\n        </div>\\n      </div>\\n    \");\n      return pageHtml;\n    }\n  }, {\n    key: \"renderPopup\",\n    value: function renderPopup() {\n      var ss = this;\n      if (ss.params.renderPopup) return ss.params.renderPopup.call(ss, ss.items);\n      var pageTitle = ss.params.pageTitle;\n      if (typeof pageTitle === 'undefined') {\n        var $itemTitleEl = ss.$el.find('.item-title');\n        pageTitle = $itemTitleEl.length ? $itemTitleEl.text().trim() : '';\n      }\n      var cssClass = ss.params.cssClass || '';\n      var popupHtml = \"\\n      <div class=\\\"popup smart-select-popup \".concat(cssClass, \" \").concat(ss.params.popupTabletFullscreen ? 'popup-tablet-fullscreen' : '', \"\\\" data-select-name=\\\"\").concat(ss.selectName, \"\\\">\\n        <div class=\\\"view\\\">\\n          <div class=\\\"page smart-select-page \").concat(ss.params.searchbar ? 'page-with-subnavbar' : '', \"\\\" data-name=\\\"smart-select-page\\\">\\n            <div class=\\\"navbar \").concat(ss.params.navbarColorTheme ? \"color-\".concat(ss.params.navbarColorTheme) : '', \"\\\">\\n              <div class=\\\"navbar-bg\\\"></div>\\n              <div class=\\\"navbar-inner sliding\\\">\\n                \").concat(pageTitle ? \"<div class=\\\"title\\\">\".concat(pageTitle, \"</div>\") : '', \"\\n                <div class=\\\"right\\\">\\n                  <a class=\\\"link popup-close\\\" data-popup=\\\".smart-select-popup[data-select-name='\").concat(ss.selectName, \"']\\\">\").concat(ss.params.popupCloseLinkText, \"</span></a>\\n                </div>\\n                \").concat(ss.params.searchbar ? \"<div class=\\\"subnavbar\\\">\".concat(ss.renderSearchbar(), \"</div>\") : '', \"\\n              </div>\\n            </div>\\n            \").concat(ss.params.searchbar ? '<div class=\"searchbar-backdrop\"></div>' : '', \"\\n            <div class=\\\"page-content\\\">\\n              <div class=\\\"list smart-select-list-\").concat(ss.id, \" \").concat(ss.params.virtualList ? ' virtual-list' : '', \" \").concat(ss.params.formColorTheme ? \"color-\".concat(ss.params.formColorTheme) : '', \"\\\">\\n                <ul>\").concat(!ss.params.virtualList && ss.renderItems(ss.items), \"</ul>\\n              </div>\\n            </div>\\n          </div>\\n        </div>\\n      </div>\\n    \");\n      return popupHtml;\n    }\n  }, {\n    key: \"renderSheet\",\n    value: function renderSheet() {\n      var ss = this;\n      if (ss.params.renderSheet) return ss.params.renderSheet.call(ss, ss.items);\n      var cssClass = ss.params.cssClass;\n      var sheetHtml = \"\\n      <div class=\\\"sheet-modal smart-select-sheet \".concat(cssClass, \"\\\" data-select-name=\\\"\").concat(ss.selectName, \"\\\">\\n        <div class=\\\"toolbar toolbar-top \").concat(ss.params.toolbarColorTheme ? \"color-\".concat(ss.params.toolbarColorTheme) : '', \"\\\">\\n          <div class=\\\"toolbar-inner\\\">\\n            <div class=\\\"left\\\"></div>\\n            <div class=\\\"right\\\">\\n              <a class=\\\"link sheet-close\\\">\").concat(ss.params.sheetCloseLinkText, \"</a>\\n            </div>\\n          </div>\\n        </div>\\n        <div class=\\\"sheet-modal-inner\\\">\\n          <div class=\\\"page-content\\\">\\n            <div class=\\\"list smart-select-list-\").concat(ss.id, \" \").concat(ss.params.virtualList ? ' virtual-list' : '', \" \").concat(ss.params.formColorTheme ? \"color-\".concat(ss.params.formColorTheme) : '', \"\\\">\\n              <ul>\").concat(!ss.params.virtualList && ss.renderItems(ss.items), \"</ul>\\n            </div>\\n          </div>\\n        </div>\\n      </div>\\n    \");\n      return sheetHtml;\n    }\n  }, {\n    key: \"renderPopover\",\n    value: function renderPopover() {\n      var ss = this;\n      if (ss.params.renderPopover) return ss.params.renderPopover.call(ss, ss.items);\n      var cssClass = ss.params.cssClass;\n      var popoverHtml = \"\\n      <div class=\\\"popover smart-select-popover \".concat(cssClass, \"\\\" data-select-name=\\\"\").concat(ss.selectName, \"\\\">\\n        <div class=\\\"popover-inner\\\">\\n          <div class=\\\"list smart-select-list-\").concat(ss.id, \" \").concat(ss.params.virtualList ? ' virtual-list' : '', \" \").concat(ss.params.formColorTheme ? \"color-\".concat(ss.params.formColorTheme) : '', \"\\\">\\n            <ul>\").concat(!ss.params.virtualList && ss.renderItems(ss.items), \"</ul>\\n          </div>\\n        </div>\\n      </div>\\n    \");\n      return popoverHtml;\n    }\n  }, {\n    key: \"scrollToSelectedItem\",\n    value: function scrollToSelectedItem() {\n      var ss = this;\n      var params = ss.params,\n        $containerEl = ss.$containerEl;\n      if (!ss.opened) return ss;\n      if (params.virtualList) {\n        var selectedIndex;\n        ss.vl.items.forEach(function (item, index) {\n          if (typeof selectedIndex === 'undefined' && item.selected) {\n            selectedIndex = index;\n          }\n        });\n        if (typeof selectedIndex !== 'undefined') {\n          ss.vl.scrollToItem(selectedIndex);\n        }\n      } else {\n        var $selectedItemEl = $containerEl.find('input:checked').parents('li');\n        if (!$selectedItemEl.length) return ss;\n        var $pageContentEl = $containerEl.find('.page-content');\n        $pageContentEl.scrollTop($selectedItemEl.offset().top - $pageContentEl.offset().top - parseInt($pageContentEl.css('padding-top'), 10));\n      }\n      return ss;\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen(type, containerEl) {\n      var ss = this;\n      var app = ss.app;\n      var $containerEl = Object(dom7_module[\"default\"])(containerEl);\n      ss.$containerEl = $containerEl;\n      ss.openedIn = type;\n      ss.opened = true;\n\n      // Init VL\n      if (ss.params.virtualList) {\n        ss.vl = app.virtualList.create({\n          el: $containerEl.find('.virtual-list'),\n          items: ss.items,\n          renderItem: ss.renderItem.bind(ss),\n          height: ss.params.virtualListHeight,\n          searchByItem: function searchByItem(query, item) {\n            if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >= 0) return true;\n            return false;\n          }\n        });\n      }\n      if (ss.params.scrollToSelectedItem) {\n        ss.scrollToSelectedItem();\n      }\n\n      // Init SB\n      if (ss.params.searchbar) {\n        var $searchbarEl = $containerEl.find('.searchbar');\n        if (type === 'page' && app.theme === 'ios') {\n          $searchbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($containerEl)).find('.searchbar');\n        }\n        if (ss.params.appendSearchbarNotFound && (type === 'page' || type === 'popup')) {\n          var $notFoundEl = null;\n          if (typeof ss.params.appendSearchbarNotFound === 'string') {\n            $notFoundEl = Object(dom7_module[\"default\"])(\"<div class=\\\"block searchbar-not-found\\\">\".concat(ss.params.appendSearchbarNotFound, \"</div>\"));\n          } else if (typeof ss.params.appendSearchbarNotFound === 'boolean') {\n            $notFoundEl = Object(dom7_module[\"default\"])('<div class=\"block searchbar-not-found\">Nothing found</div>');\n          } else {\n            $notFoundEl = ss.params.appendSearchbarNotFound;\n          }\n          if ($notFoundEl) {\n            $containerEl.find('.page-content').append($notFoundEl[0]);\n          }\n        }\n        var searchbarParams = utils[\"default\"].extend({\n          el: $searchbarEl,\n          backdropEl: $containerEl.find('.searchbar-backdrop'),\n          searchContainer: \".smart-select-list-\".concat(ss.id),\n          searchIn: '.item-title'\n        }, typeof_default()(ss.params.searchbar) === 'object' ? ss.params.searchbar : {});\n        ss.searchbar = app.searchbar.create(searchbarParams);\n      }\n\n      // Check for max length\n      if (ss.maxLength) {\n        ss.checkMaxLength();\n      }\n\n      // Close on select\n      if (ss.params.closeOnSelect) {\n        ss.$containerEl.find(\"input[type=\\\"radio\\\"][name=\\\"\".concat(ss.inputName, \"\\\"]:checked\")).parents('label').once('click', function () {\n          ss.close();\n        });\n      }\n\n      // Attach input events\n      ss.attachInputsEvents();\n      ss.$el.trigger('smartselect:open');\n      ss.emit('local::open smartSelectOpen', ss);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var ss = this;\n      ss.$el.trigger('smartselect:opened');\n      ss.emit('local::opened smartSelectOpened', ss);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var ss = this;\n      if (ss.destroyed) return;\n\n      // Destroy VL\n      if (ss.vl && ss.vl.destroy) {\n        ss.vl.destroy();\n        ss.vl = null;\n        delete ss.vl;\n      }\n\n      // Destroy SB\n      if (ss.searchbar && ss.searchbar.destroy) {\n        ss.searchbar.destroy();\n        ss.searchbar = null;\n        delete ss.searchbar;\n      }\n      // Detach events\n      ss.detachInputsEvents();\n      ss.$el.trigger('smartselect:close');\n      ss.emit('local::close smartSelectClose', ss);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var ss = this;\n      if (ss.destroyed) return;\n      ss.opened = false;\n      ss.$containerEl = null;\n      delete ss.$containerEl;\n      ss.$el.trigger('smartselect:closed');\n      ss.emit('local::closed smartSelectClosed', ss);\n    }\n  }, {\n    key: \"openPage\",\n    value: function openPage() {\n      var ss = this;\n      if (ss.opened) return ss;\n      ss.getItemsData();\n      var pageHtml = ss.renderPage(ss.items);\n      ss.view.router.navigate({\n        url: ss.url,\n        route: {\n          content: pageHtml,\n          path: ss.url,\n          on: {\n            pageBeforeIn: function pageBeforeIn(e, page) {\n              ss.onOpen('page', page.el);\n            },\n            pageAfterIn: function pageAfterIn(e, page) {\n              ss.onOpened('page', page.el);\n            },\n            pageBeforeOut: function pageBeforeOut(e, page) {\n              ss.onClose('page', page.el);\n            },\n            pageAfterOut: function pageAfterOut(e, page) {\n              ss.onClosed('page', page.el);\n            }\n          }\n        }\n      });\n      return ss;\n    }\n  }, {\n    key: \"openPopup\",\n    value: function openPopup() {\n      var ss = this;\n      if (ss.opened) return ss;\n      ss.getItemsData();\n      var popupHtml = ss.renderPopup(ss.items);\n      var popupParams = {\n        content: popupHtml,\n        push: ss.params.popupPush,\n        swipeToClose: ss.params.popupSwipeToClose,\n        on: {\n          popupOpen: function popupOpen(popup) {\n            ss.onOpen('popup', popup.el);\n          },\n          popupOpened: function popupOpened(popup) {\n            ss.onOpened('popup', popup.el);\n          },\n          popupClose: function popupClose(popup) {\n            ss.onClose('popup', popup.el);\n          },\n          popupClosed: function popupClosed(popup) {\n            ss.onClosed('popup', popup.el);\n          }\n        }\n      };\n      if (ss.params.routableModals && ss.view) {\n        ss.view.router.navigate({\n          url: ss.url,\n          route: {\n            path: ss.url,\n            popup: popupParams\n          }\n        });\n      } else {\n        ss.modal = ss.app.popup.create(popupParams).open();\n      }\n      return ss;\n    }\n  }, {\n    key: \"openSheet\",\n    value: function openSheet() {\n      var ss = this;\n      if (ss.opened) return ss;\n      ss.getItemsData();\n      var sheetHtml = ss.renderSheet(ss.items);\n      var sheetParams = {\n        content: sheetHtml,\n        backdrop: false,\n        scrollToEl: ss.$el,\n        closeByOutsideClick: true,\n        push: ss.params.sheetPush,\n        swipeToClose: ss.params.sheetSwipeToClose,\n        on: {\n          sheetOpen: function sheetOpen(sheet) {\n            ss.onOpen('sheet', sheet.el);\n          },\n          sheetOpened: function sheetOpened(sheet) {\n            ss.onOpened('sheet', sheet.el);\n          },\n          sheetClose: function sheetClose(sheet) {\n            ss.onClose('sheet', sheet.el);\n          },\n          sheetClosed: function sheetClosed(sheet) {\n            ss.onClosed('sheet', sheet.el);\n          }\n        }\n      };\n      if (ss.params.routableModals && ss.view) {\n        ss.view.router.navigate({\n          url: ss.url,\n          route: {\n            path: ss.url,\n            sheet: sheetParams\n          }\n        });\n      } else {\n        ss.modal = ss.app.sheet.create(sheetParams).open();\n      }\n      return ss;\n    }\n  }, {\n    key: \"openPopover\",\n    value: function openPopover() {\n      var ss = this;\n      if (ss.opened) return ss;\n      ss.getItemsData();\n      var popoverHtml = ss.renderPopover(ss.items);\n      var popoverParams = {\n        content: popoverHtml,\n        targetEl: ss.$el,\n        on: {\n          popoverOpen: function popoverOpen(popover) {\n            ss.onOpen('popover', popover.el);\n          },\n          popoverOpened: function popoverOpened(popover) {\n            ss.onOpened('popover', popover.el);\n          },\n          popoverClose: function popoverClose(popover) {\n            ss.onClose('popover', popover.el);\n          },\n          popoverClosed: function popoverClosed(popover) {\n            ss.onClosed('popover', popover.el);\n          }\n        }\n      };\n      if (ss.params.routableModals && ss.view) {\n        ss.view.router.navigate({\n          url: ss.url,\n          route: {\n            path: ss.url,\n            popover: popoverParams\n          }\n        });\n      } else {\n        ss.modal = ss.app.popover.create(popoverParams).open();\n      }\n      return ss;\n    }\n  }, {\n    key: \"open\",\n    value: function open(type) {\n      var ss = this;\n      if (ss.opened) return ss;\n      var prevented = false;\n      function prevent() {\n        prevented = true;\n      }\n      if (ss.$el) {\n        ss.$el.trigger('smartselect:beforeopen', {\n          prevent: prevent\n        });\n      }\n      ss.emit('local::beforeOpen smartSelectBeforeOpen', ss, prevent);\n      if (prevented) return ss;\n      var openIn = type || ss.params.openIn;\n      ss[\"open\".concat(openIn.split('').map(function (el, index) {\n        if (index === 0) return el.toUpperCase();\n        return el;\n      }).join(''))]();\n      return ss;\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var ss = this;\n      if (!ss.opened) return ss;\n      if (ss.params.routableModals && ss.view || ss.openedIn === 'page') {\n        ss.view.router.back();\n      } else {\n        ss.modal.once('modalClosed', function () {\n          utils[\"default\"].nextTick(function () {\n            if (ss.destroyed) return;\n            ss.modal.destroy();\n            delete ss.modal;\n          });\n        });\n        ss.modal.close();\n      }\n      return ss;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var ss = this;\n      ss.attachEvents();\n      ss.setValueText();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var ss = this;\n      ss.emit('local::beforeDestroy smartSelectBeforeDestroy', ss);\n      ss.$el.trigger('smartselect:beforedestroy');\n      ss.detachEvents();\n      delete ss.$el[0].f7SmartSelect;\n      utils[\"default\"].deleteProps(ss);\n      ss.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var smart_select_class = (smart_select_class_SmartSelect);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/smart-select/smart-select.js\n\n\n\n\n/* harmony default export */ var smart_select = ({\n  name: 'smartSelect',\n  params: {\n    smartSelect: {\n      el: undefined,\n      valueEl: undefined,\n      setValueText: true,\n      formatValueText: null,\n      openIn: 'page',\n      // or 'popup' or 'sheet' or 'popover'\n      popupPush: false,\n      popupSwipeToClose: undefined,\n      // defaults to app\n      sheetPush: false,\n      sheetSwipeToClose: undefined,\n      // defaults to app\n      pageTitle: undefined,\n      pageBackLinkText: 'Back',\n      popupCloseLinkText: 'Close',\n      popupTabletFullscreen: false,\n      sheetCloseLinkText: 'Done',\n      searchbar: false,\n      searchbarPlaceholder: 'Search',\n      searchbarDisableText: 'Cancel',\n      searchbarDisableButton: undefined,\n      searchbarSpellcheck: false,\n      closeOnSelect: false,\n      virtualList: false,\n      virtualListHeight: undefined,\n      scrollToSelectedItem: false,\n      formColorTheme: undefined,\n      navbarColorTheme: undefined,\n      routableModals: true,\n      url: 'select/',\n      cssClass: '',\n      /*\n        Custom render functions\n      */\n      renderPage: undefined,\n      renderPopup: undefined,\n      renderSheet: undefined,\n      renderPopover: undefined,\n      renderItems: undefined,\n      renderItem: undefined,\n      renderSearchbar: undefined\n    }\n  },\n  static: {\n    SmartSelect: smart_select_class\n  },\n  create: function create() {\n    var app = this;\n    app.smartSelect = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: '.smart-select',\n      constructor: smart_select_class,\n      app: app,\n      domProp: 'f7SmartSelect'\n    }), {\n      open: function open(smartSelectEl) {\n        var ss = app.smartSelect.get(smartSelectEl);\n        if (ss && ss.open) return ss.open();\n        return undefined;\n      },\n      close: function close(smartSelectEl) {\n        var ss = app.smartSelect.get(smartSelectEl);\n        if (ss && ss.close) return ss.close();\n        return undefined;\n      }\n    });\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.smart-select-init').each(function (index, smartSelectEl) {\n        app.smartSelect.create(utils[\"default\"].extend({\n          el: smartSelectEl\n        }, Object(dom7_module[\"default\"])(smartSelectEl).dataset()));\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.smart-select-init').each(function (index, smartSelectEl) {\n        if (smartSelectEl.f7SmartSelect && smartSelectEl.f7SmartSelect.destroy) {\n          smartSelectEl.f7SmartSelect.destroy();\n        }\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.smart-select-init').each(function (index, smartSelectEl) {\n        app.smartSelect.create(utils[\"default\"].extend({\n          el: smartSelectEl\n        }, Object(dom7_module[\"default\"])(smartSelectEl).dataset()));\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.smart-select-init').each(function (index, smartSelectEl) {\n        if (smartSelectEl.f7SmartSelect && smartSelectEl.f7SmartSelect.destroy) {\n          smartSelectEl.f7SmartSelect.destroy();\n        }\n      });\n    }\n  },\n  clicks: {\n    '.smart-select': function open($clickedEl, data) {\n      var app = this;\n      if (!$clickedEl[0].f7SmartSelect) {\n        var ss = app.smartSelect.create(utils[\"default\"].extend({\n          el: $clickedEl\n        }, data));\n        ss.open();\n      }\n    }\n  },\n  vnode: {\n    'smart-select-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var smartSelectEl = vnode.elm;\n        app.smartSelect.create(utils[\"default\"].extend({\n          el: smartSelectEl\n        }, Object(dom7_module[\"default\"])(smartSelectEl).dataset()));\n      },\n      destroy: function destroy(vnode) {\n        var smartSelectEl = vnode.elm;\n        if (smartSelectEl.f7SmartSelect && smartSelectEl.f7SmartSelect.destroy) {\n          smartSelectEl.f7SmartSelect.destroy();\n        }\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js\nvar slicedToArray = __webpack_require__(\"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\nvar slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);\n\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/calendar/calendar-class.js\n\n\n\n\n\n\n\n\n\nfunction calendar_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, calendar_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction calendar_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (calendar_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar calendar_class_Calendar = /*#__PURE__*/function (_Framework7Class) {\n  function Calendar(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Calendar);\n    _this = calendar_class_callSuper(this, Calendar, [params, [app]]);\n    var calendar = _this;\n    calendar.params = utils[\"default\"].extend({}, app.params.calendar, params);\n    var $containerEl;\n    if (calendar.params.containerEl) {\n      $containerEl = Object(dom7_module[\"default\"])(calendar.params.containerEl);\n      if ($containerEl.length === 0) return possibleConstructorReturn_default()(_this, calendar);\n    }\n    var $inputEl;\n    if (calendar.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(calendar.params.inputEl);\n    }\n    var isHorizontal = calendar.params.direction === 'horizontal';\n    var inverter = 1;\n    if (isHorizontal) {\n      inverter = app.rtl ? -1 : 1;\n    }\n    utils[\"default\"].extend(calendar, {\n      app: app,\n      $containerEl: $containerEl,\n      containerEl: $containerEl && $containerEl[0],\n      inline: $containerEl && $containerEl.length > 0,\n      $inputEl: $inputEl,\n      inputEl: $inputEl && $inputEl[0],\n      initialized: false,\n      opened: false,\n      url: calendar.params.url,\n      isHorizontal: isHorizontal,\n      inverter: inverter,\n      animating: false,\n      hasTimePicker: calendar.params.timePicker && !calendar.params.rangePicker && !calendar.params.multiple\n    });\n    calendar.dayFormatter = new Intl.DateTimeFormat(calendar.params.locale, {\n      day: 'numeric'\n    });\n    calendar.monthFormatter = new Intl.DateTimeFormat(calendar.params.locale, {\n      month: 'long'\n    });\n    calendar.yearFormatter = new Intl.DateTimeFormat(calendar.params.locale, {\n      year: 'numeric'\n    });\n    calendar.timeSelectorFormatter = new Intl.DateTimeFormat(calendar.params.locale, calendar.params.timePickerFormat);\n\n    // Auto names\n    var _calendar$params = calendar.params,\n      monthNames = _calendar$params.monthNames,\n      monthNamesShort = _calendar$params.monthNamesShort,\n      dayNames = _calendar$params.dayNames,\n      dayNamesShort = _calendar$params.dayNamesShort;\n    var _calendar$getIntlName = calendar.getIntlNames(),\n      monthNamesIntl = _calendar$getIntlName.monthNamesIntl,\n      monthNamesShortIntl = _calendar$getIntlName.monthNamesShortIntl,\n      dayNamesIntl = _calendar$getIntlName.dayNamesIntl,\n      dayNamesShortIntl = _calendar$getIntlName.dayNamesShortIntl;\n    if (monthNames === 'auto') monthNames = monthNamesIntl;\n    if (monthNamesShort === 'auto') monthNamesShort = monthNamesShortIntl;\n    if (dayNames === 'auto') dayNames = dayNamesIntl;\n    if (dayNamesShort === 'auto') dayNamesShort = dayNamesShortIntl;\n    utils[\"default\"].extend(calendar, {\n      monthNames: monthNames,\n      monthNamesShort: monthNamesShort,\n      dayNames: dayNames,\n      dayNamesShort: dayNamesShort\n    });\n    function onInputClick() {\n      calendar.open();\n    }\n    function onInputFocus(e) {\n      e.preventDefault();\n    }\n    function onInputClear() {\n      calendar.setValue([]);\n      if (calendar.opened) {\n        calendar.update();\n      }\n    }\n    function onHtmlClick(e) {\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      if (calendar.destroyed || !calendar.params) return;\n      if (calendar.isPopover()) return;\n      if (!calendar.opened || calendar.closing) return;\n      if ($targetEl.closest('[class*=\"backdrop\"]').length) return;\n      if ($inputEl && $inputEl.length > 0) {\n        if ($targetEl[0] !== $inputEl[0] && $targetEl.closest('.sheet-modal, .calendar-modal').length === 0) {\n          calendar.close();\n        }\n      } else if (Object(dom7_module[\"default\"])(e.target).closest('.sheet-modal, .calendar-modal').length === 0) {\n        calendar.close();\n      }\n    }\n\n    // Events\n    utils[\"default\"].extend(calendar, {\n      attachInputEvents: function attachInputEvents() {\n        calendar.$inputEl.on('click', onInputClick);\n        calendar.$inputEl.on('input:clear', onInputClear);\n        if (calendar.params.inputReadOnly) {\n          calendar.$inputEl.on('focus mousedown', onInputFocus);\n          if (calendar.$inputEl[0]) {\n            calendar.$inputEl[0].f7ValidateReadonly = true;\n          }\n        }\n      },\n      detachInputEvents: function detachInputEvents() {\n        calendar.$inputEl.off('click', onInputClick);\n        calendar.$inputEl.off('input:clear', onInputClear);\n        if (calendar.params.inputReadOnly) {\n          calendar.$inputEl.off('focus mousedown', onInputFocus);\n          if (calendar.$inputEl[0]) {\n            delete calendar.$inputEl[0].f7ValidateReadonly;\n          }\n        }\n      },\n      attachHtmlEvents: function attachHtmlEvents() {\n        app.on('click', onHtmlClick);\n      },\n      detachHtmlEvents: function detachHtmlEvents() {\n        app.off('click', onHtmlClick);\n      }\n    });\n    calendar.attachCalendarEvents = function attachCalendarEvents() {\n      var allowItemClick = true;\n      var isTouched;\n      var isMoved;\n      var touchStartX;\n      var touchStartY;\n      var touchCurrentX;\n      var touchCurrentY;\n      var touchStartTime;\n      var touchEndTime;\n      var currentTranslate;\n      var wrapperWidth;\n      var wrapperHeight;\n      var percentage;\n      var touchesDiff;\n      var isScrolling;\n      var $el = calendar.$el,\n        $wrapperEl = calendar.$wrapperEl;\n      function handleTouchStart(e) {\n        if (isMoved || isTouched) return;\n        isTouched = true;\n        touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n        touchCurrentX = touchStartX;\n        touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n        touchCurrentY = touchStartY;\n        touchStartTime = new Date().getTime();\n        percentage = 0;\n        allowItemClick = true;\n        isScrolling = undefined;\n        currentTranslate = calendar.monthsTranslate;\n      }\n      function handleTouchMove(e) {\n        if (!isTouched) return;\n        var isH = calendar.isHorizontal;\n        touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n        touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n        if (typeof isScrolling === 'undefined') {\n          isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));\n        }\n        if (isH && isScrolling) {\n          isTouched = false;\n          return;\n        }\n        e.preventDefault();\n        if (calendar.animating) {\n          isTouched = false;\n          return;\n        }\n        allowItemClick = false;\n        if (!isMoved) {\n          // First move\n          isMoved = true;\n          wrapperWidth = $wrapperEl[0].offsetWidth;\n          wrapperHeight = $wrapperEl[0].offsetHeight;\n          $wrapperEl.transition(0);\n        }\n        touchesDiff = isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY;\n        percentage = touchesDiff / (isH ? wrapperWidth : wrapperHeight);\n        currentTranslate = (calendar.monthsTranslate * calendar.inverter + percentage) * 100;\n\n        // Transform wrapper\n        $wrapperEl.transform(\"translate3d(\".concat(isH ? currentTranslate : 0, \"%, \").concat(isH ? 0 : currentTranslate, \"%, 0)\"));\n      }\n      function handleTouchEnd() {\n        if (!isTouched || !isMoved) {\n          isTouched = false;\n          isMoved = false;\n          return;\n        }\n        isTouched = false;\n        isMoved = false;\n        touchEndTime = new Date().getTime();\n        if (touchEndTime - touchStartTime < 300) {\n          if (Math.abs(touchesDiff) < 10) {\n            calendar.resetMonth();\n          } else if (touchesDiff >= 10) {\n            if (app.rtl) calendar.nextMonth();else calendar.prevMonth();\n          } else if (app.rtl) calendar.prevMonth();else calendar.nextMonth();\n        } else if (percentage <= -0.5) {\n          if (app.rtl) calendar.prevMonth();else calendar.nextMonth();\n        } else if (percentage >= 0.5) {\n          if (app.rtl) calendar.nextMonth();else calendar.prevMonth();\n        } else {\n          calendar.resetMonth();\n        }\n\n        // Allow click\n        setTimeout(function () {\n          allowItemClick = true;\n        }, 100);\n      }\n      function handleDayClick(e) {\n        if (!allowItemClick) return;\n        var $dayEl = Object(dom7_module[\"default\"])(e.target).parents('.calendar-day');\n        if ($dayEl.length === 0 && Object(dom7_module[\"default\"])(e.target).hasClass('calendar-day')) {\n          $dayEl = Object(dom7_module[\"default\"])(e.target);\n        }\n        if ($dayEl.length === 0) return;\n        if ($dayEl.hasClass('calendar-day-disabled')) return;\n        if (!calendar.params.rangePicker) {\n          if ($dayEl.hasClass('calendar-day-next')) calendar.nextMonth();\n          if ($dayEl.hasClass('calendar-day-prev')) calendar.prevMonth();\n        }\n        var dateYear = parseInt($dayEl.attr('data-year'), 10);\n        var dateMonth = parseInt($dayEl.attr('data-month'), 10);\n        var dateDay = parseInt($dayEl.attr('data-day'), 10);\n        calendar.emit('local::dayClick calendarDayClick', calendar, $dayEl[0], dateYear, dateMonth, dateDay);\n        if (!$dayEl.hasClass('calendar-day-selected') || calendar.params.multiple || calendar.params.rangePicker) {\n          var valueToAdd = new Date(dateYear, dateMonth, dateDay, 0, 0, 0);\n          if (calendar.hasTimePicker) {\n            if (calendar.value && calendar.value[0]) {\n              valueToAdd.setHours(calendar.value[0].getHours(), calendar.value[0].getMinutes());\n            } else {\n              valueToAdd.setHours(new Date().getHours(), new Date().getMinutes());\n            }\n          }\n          calendar.addValue(valueToAdd);\n        }\n        if (calendar.params.closeOnSelect) {\n          if (calendar.params.rangePicker && calendar.value.length === 2 || !calendar.params.rangePicker) {\n            calendar.close();\n          }\n        }\n      }\n      function onNextMonthClick() {\n        calendar.nextMonth();\n      }\n      function onPrevMonthClick() {\n        calendar.prevMonth();\n      }\n      function onNextYearClick() {\n        calendar.nextYear();\n      }\n      function onPrevYearClick() {\n        calendar.prevYear();\n      }\n      function onMonthSelectorClick() {\n        $el.append(calendar.renderMonthPicker());\n      }\n      function onMonthSelectorItemClick() {\n        var $clickedEl = Object(dom7_module[\"default\"])(this);\n        if ($clickedEl.hasClass('calendar-month-picker-item-current')) {\n          $el.find('.calendar-month-picker').remove();\n          return;\n        }\n        $el.find('.calendar-month-picker-item-current').add($clickedEl).toggleClass('calendar-month-picker-item-current');\n        var index = $clickedEl.index();\n        var localeMonthIndex = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);\n        var monthIndex = calendar.currentMonth;\n        var diff = localeMonthIndex - monthIndex;\n        var diffIndex = index - diff;\n        calendar.setYearMonth(calendar.currentYear, diffIndex, 0);\n        setTimeout(function () {\n          $el.find('.calendar-month-picker').remove();\n        }, 200);\n      }\n      function onYearSelectorClick() {\n        $el.append(calendar.renderYearPicker());\n        var $currentEl = $el.find('.calendar-year-picker-item-current');\n        var $yearPickerEl = $el.find('.calendar-year-picker');\n        if (!$currentEl || !$currentEl.length) return;\n        $yearPickerEl.scrollTop($currentEl[0].offsetTop - $yearPickerEl[0].offsetHeight / 2 + $currentEl[0].offsetHeight / 2);\n      }\n      function onYearSelectorItemClick() {\n        var $clickedEl = Object(dom7_module[\"default\"])(this);\n        if ($clickedEl.hasClass('calendar-year-picker-item-current')) {\n          $el.find('.calendar-year-picker').remove();\n          return;\n        }\n        $el.find('.calendar-year-picker-item-current').add($clickedEl).toggleClass('calendar-year-picker-item-current');\n        var year = parseInt($clickedEl.attr('data-year'), 10);\n        calendar.setYearMonth(year, undefined, 0);\n        setTimeout(function () {\n          $el.find('.calendar-year-picker').remove();\n        }, 200);\n      }\n      function onTimeSelectorClick() {\n        calendar.openTimePicker();\n      }\n      function onTimePickerCloseClick() {\n        calendar.closeTimePicker();\n      }\n      var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {\n        passive: true,\n        capture: false\n      } : false;\n      // Selectors clicks\n      $el.find('.calendar-prev-month-button').on('click', onPrevMonthClick);\n      $el.find('.calendar-next-month-button').on('click', onNextMonthClick);\n      $el.find('.calendar-prev-year-button').on('click', onPrevYearClick);\n      $el.find('.calendar-next-year-button').on('click', onNextYearClick);\n      if (calendar.params.monthPicker) {\n        $el.find('.current-month-value').on('click', onMonthSelectorClick);\n        $el.on('click', '.calendar-month-picker-item', onMonthSelectorItemClick);\n      }\n      if (calendar.params.yearPicker) {\n        $el.find('.current-year-value').on('click', onYearSelectorClick);\n        $el.on('click', '.calendar-year-picker-item', onYearSelectorItemClick);\n      }\n      if (calendar.hasTimePicker) {\n        $el.find('.calendar-time-selector a').on('click', onTimeSelectorClick);\n        $el.on('click', '.calendar-time-picker-close', onTimePickerCloseClick);\n      }\n      // Day clicks\n      $wrapperEl.on('click', handleDayClick);\n      // Touch events\n      if (calendar.params.touchMove) {\n        $wrapperEl.on(app.touchEvents.start, handleTouchStart, passiveListener);\n        app.on('touchmove:active', handleTouchMove);\n        app.on('touchend:passive', handleTouchEnd);\n      }\n      calendar.detachCalendarEvents = function detachCalendarEvents() {\n        $el.find('.calendar-prev-month-button').off('click', onPrevMonthClick);\n        $el.find('.calendar-next-month-button').off('click', onNextMonthClick);\n        $el.find('.calendar-prev-year-button').off('click', onPrevYearClick);\n        $el.find('.calendar-next-year-button').off('click', onNextYearClick);\n        if (calendar.params.monthPicker) {\n          $el.find('.current-month-value').off('click', onMonthSelectorClick);\n          $el.off('click', '.calendar-month-picker-item', onMonthSelectorItemClick);\n        }\n        if (calendar.params.yearPicker) {\n          $el.find('.current-year-value').off('click', onYearSelectorClick);\n          $el.off('click', '.calendar-year-picker-item', onYearSelectorItemClick);\n        }\n        if (calendar.hasTimePicker) {\n          $el.find('.calendar-time-selector a').off('click', onTimeSelectorClick);\n          $el.off('click', '.calendar-time-picker-close', onTimePickerCloseClick);\n        }\n        $wrapperEl.off('click', handleDayClick);\n        if (calendar.params.touchMove) {\n          $wrapperEl.off(app.touchEvents.start, handleTouchStart, passiveListener);\n          app.off('touchmove:active', handleTouchMove);\n          app.off('touchend:passive', handleTouchEnd);\n        }\n      };\n    };\n    calendar.init();\n    return possibleConstructorReturn_default()(_this, calendar);\n  }\n  inherits_default()(Calendar, _Framework7Class);\n  return createClass_default()(Calendar, [{\n    key: \"view\",\n    get: function get() {\n      var $inputEl = this.$inputEl,\n        app = this.app,\n        params = this.params;\n      var view;\n      if (params.view) {\n        view = params.view;\n      } else if ($inputEl) {\n        view = $inputEl.parents('.view').length && $inputEl.parents('.view')[0].f7View;\n      }\n      if (!view) view = app.views.main;\n      return view;\n    }\n  }, {\n    key: \"getIntlNames\",\n    value: function getIntlNames() {\n      var calendar = this;\n      var locale = calendar.params.locale;\n      var monthNamesIntl = [];\n      var monthNamesShortIntl = [];\n      var dayNamesIntl = [];\n      var dayNamesShortIntl = [];\n      var formatterMonthNames = new Intl.DateTimeFormat(locale, {\n        month: 'long'\n      });\n      var formatterMonthNamesShort = new Intl.DateTimeFormat(locale, {\n        month: 'short'\n      });\n      var formatterDayNames = new Intl.DateTimeFormat(locale, {\n        weekday: 'long'\n      });\n      var formatterDayNamesShort = new Intl.DateTimeFormat(locale, {\n        weekday: 'short'\n      });\n      var year;\n      var yearStarted;\n      var yearEnded;\n      for (var i = 0; i < 24; i += 1) {\n        var date = new Date().setMonth(i, 1);\n        var currentYear = calendar.yearFormatter.format(date);\n        if (year && currentYear !== year) {\n          if (yearStarted) yearEnded = true;\n          yearStarted = true;\n          year = currentYear;\n        }\n        if (!year) {\n          year = currentYear;\n        }\n        if (yearStarted && year === currentYear && !yearEnded) {\n          monthNamesIntl.push(formatterMonthNames.format(date));\n          monthNamesShortIntl.push(formatterMonthNamesShort.format(date));\n        }\n      }\n      var weekDay = new Date().getDay();\n      for (var _i = 0; _i < 7; _i += 1) {\n        var _date = new Date().getTime() + (_i - weekDay) * 24 * 60 * 60 * 1000;\n        dayNamesIntl.push(formatterDayNames.format(_date));\n        dayNamesShortIntl.push(formatterDayNamesShort.format(_date));\n      }\n      return {\n        monthNamesIntl: monthNamesIntl,\n        monthNamesShortIntl: monthNamesShortIntl,\n        dayNamesIntl: dayNamesIntl,\n        dayNamesShortIntl: dayNamesShortIntl\n      };\n    }\n  }, {\n    key: \"normalizeDate\",\n    value: function normalizeDate(date) {\n      var calendar = this;\n      var d = new Date(date);\n      if (calendar.hasTimePicker) {\n        return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes());\n      }\n      return new Date(d.getFullYear(), d.getMonth(), d.getDate());\n    }\n  }, {\n    key: \"normalizeValues\",\n    value: function normalizeValues(values) {\n      var calendar = this;\n      var newValues = [];\n      if (values && Array.isArray(values)) {\n        newValues = values.map(function (val) {\n          return calendar.normalizeDate(val);\n        });\n      }\n      return newValues;\n    }\n  }, {\n    key: \"initInput\",\n    value: function initInput() {\n      var calendar = this;\n      if (!calendar.$inputEl) return;\n      if (calendar.params.inputReadOnly) calendar.$inputEl.prop('readOnly', true);\n    }\n  }, {\n    key: \"isPopover\",\n    value: function isPopover() {\n      var calendar = this;\n      var app = calendar.app,\n        modal = calendar.modal,\n        params = calendar.params;\n      if (params.openIn === 'sheet') return false;\n      if (modal && modal.type !== 'popover') return false;\n      if (!calendar.inline && calendar.inputEl) {\n        if (params.openIn === 'popover') return true;\n        if (app.device.ios) {\n          return !!app.device.ipad;\n        }\n        if (app.width >= 768) {\n          return true;\n        }\n        if (app.device.desktop && app.theme === 'aurora') {\n          return true;\n        }\n      }\n      return false;\n    }\n  }, {\n    key: \"formatDate\",\n    value: function formatDate(d) {\n      var calendar = this;\n      var date = new Date(d);\n      var year = date.getFullYear();\n      var month = date.getMonth();\n      var month1 = month + 1;\n      var day = date.getDate();\n      var weekDay = date.getDay();\n      var monthNames = calendar.monthNames,\n        monthNamesShort = calendar.monthNamesShort,\n        dayNames = calendar.dayNames,\n        dayNamesShort = calendar.dayNamesShort;\n      var _calendar$params2 = calendar.params,\n        dateFormat = _calendar$params2.dateFormat,\n        locale = _calendar$params2.locale;\n      function twoDigits(number) {\n        return number < 10 ? \"0\".concat(number) : number;\n      }\n      if (typeof dateFormat === 'string') {\n        var tokens = {\n          yyyy: year,\n          yy: String(year).substring(2),\n          mm: twoDigits(month1),\n          m: month1,\n          MM: monthNames[month],\n          M: monthNamesShort[month],\n          dd: twoDigits(day),\n          d: day,\n          DD: dayNames[weekDay],\n          D: dayNamesShort[weekDay]\n        };\n        if (calendar.params.timePicker) {\n          var hours = date.getHours();\n          var minutes = date.getMinutes();\n          var seconds = date.getSeconds();\n          var hours12 = hours;\n          if (hours > 12) hours12 = hours - 12;\n          if (hours === 0) hours12 = 12;\n          var a = hours >= 12 && hours !== 0 ? 'pm' : 'am';\n          Object.assign(tokens, {\n            HH: twoDigits(hours),\n            H: hours,\n            hh: twoDigits(hours12),\n            h: hours12,\n            ss: twoDigits(seconds),\n            s: seconds,\n            ':mm': twoDigits(minutes),\n            ':m': minutes,\n            a: a,\n            A: a.toUpperCase()\n          });\n        }\n        var regexp = new RegExp(Object.keys(tokens).map(function (t) {\n          return \"(\".concat(t, \")\");\n        }).join('|'), 'g');\n        return dateFormat.replace(regexp, function (token) {\n          if (token in tokens) return tokens[token];\n          return token;\n        });\n      }\n      if (typeof dateFormat === 'function') {\n        return dateFormat(date);\n      }\n      // Intl Object\n      var formatter = new Intl.DateTimeFormat(locale, dateFormat);\n      return formatter.format(date);\n    }\n  }, {\n    key: \"formatValue\",\n    value: function formatValue() {\n      var calendar = this;\n      var value = calendar.value;\n      if (calendar.params.formatValue) {\n        return calendar.params.formatValue.call(calendar, value);\n      }\n      return value.map(function (v) {\n        return calendar.formatDate(v);\n      }).join(calendar.params.rangePicker ? ' - ' : ', ');\n    }\n  }, {\n    key: \"addValue\",\n    value: function addValue(newValue) {\n      var calendar = this;\n      var _calendar$params3 = calendar.params,\n        multiple = _calendar$params3.multiple,\n        rangePicker = _calendar$params3.rangePicker,\n        rangePickerMinDays = _calendar$params3.rangePickerMinDays,\n        rangePickerMaxDays = _calendar$params3.rangePickerMaxDays;\n      if (multiple) {\n        if (!calendar.value) calendar.value = [];\n        var inValuesIndex;\n        for (var i = 0; i < calendar.value.length; i += 1) {\n          if (new Date(newValue).getTime() === new Date(calendar.value[i]).getTime()) {\n            inValuesIndex = i;\n          }\n        }\n        if (typeof inValuesIndex === 'undefined') {\n          calendar.value.push(newValue);\n        } else {\n          calendar.value.splice(inValuesIndex, 1);\n        }\n        calendar.updateValue();\n      } else if (rangePicker) {\n        if (!calendar.value) calendar.value = [];\n        if (calendar.value.length === 2 || calendar.value.length === 0) {\n          calendar.value = [];\n        }\n        if (calendar.value.length === 0 || Math.abs(calendar.value[0].getTime() - newValue.getTime()) >= (rangePickerMinDays - 1) * 60 * 60 * 24 * 1000 && (rangePickerMaxDays === 0 || Math.abs(calendar.value[0].getTime() - newValue.getTime()) <= (rangePickerMaxDays - 1) * 60 * 60 * 24 * 1000)) calendar.value.push(newValue);else calendar.value = [];\n        calendar.value.sort(function (a, b) {\n          return a - b;\n        });\n        calendar.updateValue();\n      } else {\n        calendar.value = [newValue];\n        calendar.updateValue();\n      }\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(values) {\n      var calendar = this;\n      var currentValue = calendar.value;\n      if (Array.isArray(currentValue) && Array.isArray(values) && currentValue.length === values.length) {\n        var equal = true;\n        currentValue.forEach(function (v, index) {\n          if (v !== values[index]) equal = false;\n        });\n        if (equal) return;\n      }\n      calendar.value = values;\n      calendar.updateValue();\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var calendar = this;\n      return calendar.value;\n    }\n  }, {\n    key: \"updateValue\",\n    value: function updateValue(onlyHeader) {\n      var calendar = this;\n      var $el = calendar.$el,\n        $wrapperEl = calendar.$wrapperEl,\n        $inputEl = calendar.$inputEl,\n        value = calendar.value,\n        params = calendar.params;\n      var i;\n      if ($el && $el.length > 0) {\n        $wrapperEl.find('.calendar-day-selected').removeClass('calendar-day-selected');\n        var valueDate;\n        if (params.rangePicker && value.length === 2) {\n          for (i = new Date(value[0]).getTime(); i <= new Date(value[1]).getTime(); i += 24 * 60 * 60 * 1000) {\n            valueDate = new Date(i);\n            $wrapperEl.find(\".calendar-day[data-date=\\\"\".concat(valueDate.getFullYear(), \"-\").concat(valueDate.getMonth(), \"-\").concat(valueDate.getDate(), \"\\\"]\")).addClass('calendar-day-selected');\n          }\n          valueDate = new Date(new Date(value[1]).getTime());\n          $wrapperEl.find(\".calendar-day[data-date=\\\"\".concat(valueDate.getFullYear(), \"-\").concat(valueDate.getMonth(), \"-\").concat(valueDate.getDate(), \"\\\"]\")).addClass('calendar-day-selected');\n        } else {\n          for (i = 0; i < calendar.value.length; i += 1) {\n            valueDate = new Date(value[i]);\n            $wrapperEl.find(\".calendar-day[data-date=\\\"\".concat(valueDate.getFullYear(), \"-\").concat(valueDate.getMonth(), \"-\").concat(valueDate.getDate(), \"\\\"]\")).addClass('calendar-day-selected');\n          }\n        }\n      }\n      if (!onlyHeader) {\n        calendar.emit('local::change calendarChange', calendar, value);\n      }\n      if ($el && $el.length > 0 && calendar.hasTimePicker) {\n        $el.find('.calendar-time-selector a').text(value && value.length ? calendar.timeSelectorFormatter.format(value[0]) : calendar.params.timePickerPlaceholder);\n      }\n      if ($inputEl && $inputEl.length || params.header) {\n        var inputValue = calendar.formatValue(value);\n        if (params.header && $el && $el.length) {\n          $el.find('.calendar-selected-date').text(inputValue);\n        }\n        if ($inputEl && $inputEl.length && !onlyHeader) {\n          $inputEl.val(inputValue);\n          $inputEl.trigger('change');\n        }\n      }\n    }\n  }, {\n    key: \"updateCurrentMonthYear\",\n    value: function updateCurrentMonthYear(dir) {\n      var calendar = this;\n      var $months = calendar.$months,\n        $el = calendar.$el,\n        monthNames = calendar.monthNames;\n      var currentLocaleMonth;\n      var currentLocaleYear;\n      if (typeof dir === 'undefined') {\n        calendar.currentMonth = parseInt($months.eq(1).attr('data-month'), 10);\n        calendar.currentYear = parseInt($months.eq(1).attr('data-year'), 10);\n        currentLocaleMonth = $months.eq(1).attr('data-locale-month');\n        currentLocaleYear = $months.eq(1).attr('data-locale-year');\n      } else {\n        calendar.currentMonth = parseInt($months.eq(dir === 'next' ? $months.length - 1 : 0).attr('data-month'), 10);\n        calendar.currentYear = parseInt($months.eq(dir === 'next' ? $months.length - 1 : 0).attr('data-year'), 10);\n        currentLocaleMonth = $months.eq(dir === 'next' ? $months.length - 1 : 0).attr('data-locale-month');\n        currentLocaleYear = $months.eq(dir === 'next' ? $months.length - 1 : 0).attr('data-locale-year');\n      }\n      $el.find('.current-month-value').text(monthNames[currentLocaleMonth]);\n      $el.find('.current-year-value').text(currentLocaleYear);\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var calendar = this;\n      var currentYear = calendar.currentYear,\n        currentMonth = calendar.currentMonth,\n        $wrapperEl = calendar.$wrapperEl;\n      var currentDate = new Date(currentYear, currentMonth);\n      var prevMonthHtml = calendar.renderMonth(currentDate, 'prev');\n      var currentMonthHtml = calendar.renderMonth(currentDate);\n      var nextMonthHtml = calendar.renderMonth(currentDate, 'next');\n      $wrapperEl.transition(0).html(\"\".concat(prevMonthHtml).concat(currentMonthHtml).concat(nextMonthHtml)).transform('translate3d(0,0,0)');\n      calendar.$months = $wrapperEl.find('.calendar-month');\n      calendar.monthsTranslate = 0;\n      calendar.setMonthsTranslate();\n      calendar.$months.each(function (index, monthEl) {\n        calendar.emit('local::monthAdd calendarMonthAdd', monthEl);\n      });\n    }\n  }, {\n    key: \"onMonthChangeStart\",\n    value: function onMonthChangeStart(dir) {\n      var calendar = this;\n      var $months = calendar.$months,\n        currentYear = calendar.currentYear,\n        currentMonth = calendar.currentMonth;\n      calendar.updateCurrentMonthYear(dir);\n      $months.removeClass('calendar-month-current calendar-month-prev calendar-month-next');\n      var currentIndex = dir === 'next' ? $months.length - 1 : 0;\n      $months.eq(currentIndex).addClass('calendar-month-current');\n      $months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'calendar-month-prev' : 'calendar-month-next');\n      calendar.emit('local::monthYearChangeStart calendarMonthYearChangeStart', calendar, currentYear, currentMonth);\n    }\n  }, {\n    key: \"onMonthChangeEnd\",\n    value: function onMonthChangeEnd(dir, rebuildBoth) {\n      var calendar = this;\n      var currentYear = calendar.currentYear,\n        currentMonth = calendar.currentMonth,\n        $wrapperEl = calendar.$wrapperEl,\n        monthsTranslate = calendar.monthsTranslate;\n      calendar.animating = false;\n      var nextMonthHtml;\n      var prevMonthHtml;\n      var currentMonthHtml;\n      $wrapperEl.find('.calendar-month:not(.calendar-month-prev):not(.calendar-month-current):not(.calendar-month-next)').remove();\n      if (typeof dir === 'undefined') {\n        dir = 'next'; // eslint-disable-line\n        rebuildBoth = true; // eslint-disable-line\n      }\n      if (!rebuildBoth) {\n        currentMonthHtml = calendar.renderMonth(new Date(currentYear, currentMonth), dir);\n      } else {\n        $wrapperEl.find('.calendar-month-next, .calendar-month-prev').remove();\n        prevMonthHtml = calendar.renderMonth(new Date(currentYear, currentMonth), 'prev');\n        nextMonthHtml = calendar.renderMonth(new Date(currentYear, currentMonth), 'next');\n      }\n      if (dir === 'next' || rebuildBoth) {\n        $wrapperEl.append(currentMonthHtml || nextMonthHtml);\n      }\n      if (dir === 'prev' || rebuildBoth) {\n        $wrapperEl.prepend(currentMonthHtml || prevMonthHtml);\n      }\n      var $months = $wrapperEl.find('.calendar-month');\n      calendar.$months = $months;\n      calendar.setMonthsTranslate(monthsTranslate);\n      calendar.emit('local::monthAdd calendarMonthAdd', calendar, dir === 'next' ? $months.eq($months.length - 1)[0] : $months.eq(0)[0]);\n      calendar.emit('local::monthYearChangeEnd calendarMonthYearChangeEnd', calendar, currentYear, currentMonth);\n    }\n  }, {\n    key: \"setMonthsTranslate\",\n    value: function setMonthsTranslate(translate) {\n      var calendar = this;\n      var $months = calendar.$months,\n        isH = calendar.isHorizontal,\n        inverter = calendar.inverter;\n      // eslint-disable-next-line\n      translate = translate || calendar.monthsTranslate || 0;\n      if (typeof calendar.monthsTranslate === 'undefined') {\n        calendar.monthsTranslate = translate;\n      }\n      $months.removeClass('calendar-month-current calendar-month-prev calendar-month-next');\n      var prevMonthTranslate = -(translate + 1) * 100 * inverter;\n      var currentMonthTranslate = -translate * 100 * inverter;\n      var nextMonthTranslate = -(translate - 1) * 100 * inverter;\n      $months.eq(0).transform(\"translate3d(\".concat(isH ? prevMonthTranslate : 0, \"%, \").concat(isH ? 0 : prevMonthTranslate, \"%, 0)\")).addClass('calendar-month-prev');\n      $months.eq(1).transform(\"translate3d(\".concat(isH ? currentMonthTranslate : 0, \"%, \").concat(isH ? 0 : currentMonthTranslate, \"%, 0)\")).addClass('calendar-month-current');\n      $months.eq(2).transform(\"translate3d(\".concat(isH ? nextMonthTranslate : 0, \"%, \").concat(isH ? 0 : nextMonthTranslate, \"%, 0)\")).addClass('calendar-month-next');\n    }\n  }, {\n    key: \"nextMonth\",\n    value: function nextMonth(transition) {\n      var calendar = this;\n      var params = calendar.params,\n        $wrapperEl = calendar.$wrapperEl,\n        inverter = calendar.inverter,\n        isH = calendar.isHorizontal;\n      if (typeof transition === 'undefined' || typeof_default()(transition) === 'object') {\n        transition = ''; // eslint-disable-line\n        if (!params.animate) transition = 0; // eslint-disable-line\n      }\n      var nextMonth = parseInt(calendar.$months.eq(calendar.$months.length - 1).attr('data-month'), 10);\n      var nextYear = parseInt(calendar.$months.eq(calendar.$months.length - 1).attr('data-year'), 10);\n      var nextDate = new Date(nextYear, nextMonth);\n      var nextDateTime = nextDate.getTime();\n      var transitionEndCallback = !calendar.animating;\n      if (params.maxDate) {\n        if (nextDateTime > new Date(params.maxDate).getTime()) {\n          calendar.resetMonth();\n          return;\n        }\n      }\n      calendar.monthsTranslate -= 1;\n      if (nextMonth === calendar.currentMonth) {\n        var nextMonthTranslate = -calendar.monthsTranslate * 100 * inverter;\n        var nextMonthHtml = Object(dom7_module[\"default\"])(calendar.renderMonth(nextDateTime, 'next')).transform(\"translate3d(\".concat(isH ? nextMonthTranslate : 0, \"%, \").concat(isH ? 0 : nextMonthTranslate, \"%, 0)\")).addClass('calendar-month-next');\n        $wrapperEl.append(nextMonthHtml[0]);\n        calendar.$months = $wrapperEl.find('.calendar-month');\n        calendar.emit('local::monthAdd calendarMonthAdd', calendar.$months.eq(calendar.$months.length - 1)[0]);\n      }\n      calendar.animating = true;\n      calendar.onMonthChangeStart('next');\n      var translate = calendar.monthsTranslate * 100 * inverter;\n      $wrapperEl.transition(transition).transform(\"translate3d(\".concat(isH ? translate : 0, \"%, \").concat(isH ? 0 : translate, \"%, 0)\"));\n      if (transitionEndCallback) {\n        $wrapperEl.transitionEnd(function () {\n          calendar.onMonthChangeEnd('next');\n        });\n      }\n      if (!params.animate) {\n        calendar.onMonthChangeEnd('next');\n      }\n    }\n  }, {\n    key: \"prevMonth\",\n    value: function prevMonth(transition) {\n      var calendar = this;\n      var params = calendar.params,\n        $wrapperEl = calendar.$wrapperEl,\n        inverter = calendar.inverter,\n        isH = calendar.isHorizontal;\n      if (typeof transition === 'undefined' || typeof_default()(transition) === 'object') {\n        transition = ''; // eslint-disable-line\n        if (!params.animate) transition = 0; // eslint-disable-line\n      }\n      var prevMonth = parseInt(calendar.$months.eq(0).attr('data-month'), 10);\n      var prevYear = parseInt(calendar.$months.eq(0).attr('data-year'), 10);\n      var prevDate = new Date(prevYear, prevMonth + 1, -1);\n      var prevDateTime = prevDate.getTime();\n      var transitionEndCallback = !calendar.animating;\n      if (params.minDate) {\n        var minDate = new Date(params.minDate);\n        minDate = new Date(minDate.getFullYear(), minDate.getMonth(), 1);\n        if (prevDateTime < minDate.getTime()) {\n          calendar.resetMonth();\n          return;\n        }\n      }\n      calendar.monthsTranslate += 1;\n      if (prevMonth === calendar.currentMonth) {\n        var prevMonthTranslate = -calendar.monthsTranslate * 100 * inverter;\n        var prevMonthHtml = Object(dom7_module[\"default\"])(calendar.renderMonth(prevDateTime, 'prev')).transform(\"translate3d(\".concat(isH ? prevMonthTranslate : 0, \"%, \").concat(isH ? 0 : prevMonthTranslate, \"%, 0)\")).addClass('calendar-month-prev');\n        $wrapperEl.prepend(prevMonthHtml[0]);\n        calendar.$months = $wrapperEl.find('.calendar-month');\n        calendar.emit('local::monthAdd calendarMonthAdd', calendar.$months.eq(0)[0]);\n      }\n      calendar.animating = true;\n      calendar.onMonthChangeStart('prev');\n      var translate = calendar.monthsTranslate * 100 * inverter;\n      $wrapperEl.transition(transition).transform(\"translate3d(\".concat(isH ? translate : 0, \"%, \").concat(isH ? 0 : translate, \"%, 0)\"));\n      if (transitionEndCallback) {\n        $wrapperEl.transitionEnd(function () {\n          calendar.onMonthChangeEnd('prev');\n        });\n      }\n      if (!params.animate) {\n        calendar.onMonthChangeEnd('prev');\n      }\n    }\n  }, {\n    key: \"resetMonth\",\n    value: function resetMonth() {\n      var transition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var calendar = this;\n      var $wrapperEl = calendar.$wrapperEl,\n        inverter = calendar.inverter,\n        isH = calendar.isHorizontal,\n        monthsTranslate = calendar.monthsTranslate;\n      var translate = monthsTranslate * 100 * inverter;\n      $wrapperEl.transition(transition).transform(\"translate3d(\".concat(isH ? translate : 0, \"%, \").concat(isH ? 0 : translate, \"%, 0)\"));\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"setYearMonth\",\n    value: function setYearMonth(year, month, transition) {\n      var calendar = this;\n      var params = calendar.params,\n        isH = calendar.isHorizontal,\n        $wrapperEl = calendar.$wrapperEl,\n        inverter = calendar.inverter;\n      // eslint-disable-next-line\n      if (typeof year === 'undefined') year = calendar.currentYear;\n      // eslint-disable-next-line\n      if (typeof month === 'undefined') month = calendar.currentMonth;\n      if (typeof transition === 'undefined' || typeof_default()(transition) === 'object') {\n        // eslint-disable-next-line\n        transition = '';\n        // eslint-disable-next-line\n        if (!params.animate) transition = 0;\n      }\n      var targetDate;\n      if (year < calendar.currentYear) {\n        targetDate = new Date(year, month + 1, -1).getTime();\n      } else {\n        targetDate = new Date(year, month).getTime();\n      }\n      if (params.maxDate && targetDate > new Date(params.maxDate).getTime()) {\n        return false;\n      }\n      if (params.minDate) {\n        var minDate = new Date(params.minDate);\n        minDate = new Date(minDate.getFullYear(), minDate.getMonth(), 1);\n        if (targetDate < minDate.getTime()) {\n          return false;\n        }\n      }\n      var currentDate = new Date(calendar.currentYear, calendar.currentMonth).getTime();\n      var dir = targetDate > currentDate ? 'next' : 'prev';\n      var newMonthHTML = calendar.renderMonth(new Date(year, month));\n      calendar.monthsTranslate = calendar.monthsTranslate || 0;\n      var prevTranslate = calendar.monthsTranslate;\n      var monthTranslate;\n      var transitionEndCallback = !calendar.animating && transition !== 0;\n      if (targetDate > currentDate) {\n        // To next\n        calendar.monthsTranslate -= 1;\n        if (!calendar.animating) calendar.$months.eq(calendar.$months.length - 1).remove();\n        $wrapperEl.append(newMonthHTML);\n        calendar.$months = $wrapperEl.find('.calendar-month');\n        monthTranslate = -(prevTranslate - 1) * 100 * inverter;\n        calendar.$months.eq(calendar.$months.length - 1).transform(\"translate3d(\".concat(isH ? monthTranslate : 0, \"%, \").concat(isH ? 0 : monthTranslate, \"%, 0)\")).addClass('calendar-month-next');\n      } else {\n        // To prev\n        calendar.monthsTranslate += 1;\n        if (!calendar.animating) calendar.$months.eq(0).remove();\n        $wrapperEl.prepend(newMonthHTML);\n        calendar.$months = $wrapperEl.find('.calendar-month');\n        monthTranslate = -(prevTranslate + 1) * 100 * inverter;\n        calendar.$months.eq(0).transform(\"translate3d(\".concat(isH ? monthTranslate : 0, \"%, \").concat(isH ? 0 : monthTranslate, \"%, 0)\")).addClass('calendar-month-prev');\n      }\n      calendar.emit('local::monthAdd calendarMonthAdd', dir === 'next' ? calendar.$months.eq(calendar.$months.length - 1)[0] : calendar.$months.eq(0)[0]);\n      calendar.animating = true;\n      calendar.onMonthChangeStart(dir);\n      var wrapperTranslate = calendar.monthsTranslate * 100 * inverter;\n      $wrapperEl.transition(transition).transform(\"translate3d(\".concat(isH ? wrapperTranslate : 0, \"%, \").concat(isH ? 0 : wrapperTranslate, \"%, 0)\"));\n      if (transitionEndCallback) {\n        $wrapperEl.transitionEnd(function () {\n          calendar.onMonthChangeEnd(dir, true);\n        });\n      }\n      if (!params.animate || transition === 0) {\n        calendar.onMonthChangeEnd(dir, true);\n      }\n    }\n  }, {\n    key: \"nextYear\",\n    value: function nextYear() {\n      var calendar = this;\n      calendar.setYearMonth(calendar.currentYear + 1);\n    }\n  }, {\n    key: \"prevYear\",\n    value: function prevYear() {\n      var calendar = this;\n      calendar.setYearMonth(calendar.currentYear - 1);\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"dateInRange\",\n    value: function dateInRange(dayDate, range) {\n      var match = false;\n      var i;\n      if (!range) return false;\n      if (Array.isArray(range)) {\n        for (i = 0; i < range.length; i += 1) {\n          if (range[i].from || range[i].to) {\n            if (range[i].from && range[i].to) {\n              if (dayDate <= new Date(range[i].to).getTime() && dayDate >= new Date(range[i].from).getTime()) {\n                match = true;\n              }\n            } else if (range[i].from) {\n              if (dayDate >= new Date(range[i].from).getTime()) {\n                match = true;\n              }\n            } else if (range[i].to) {\n              if (dayDate <= new Date(range[i].to).getTime()) {\n                match = true;\n              }\n            }\n          } else if (range[i].date) {\n            if (dayDate === new Date(range[i].date).getTime()) {\n              match = true;\n            }\n          } else if (dayDate === new Date(range[i]).getTime()) {\n            match = true;\n          }\n        }\n      } else if (range.from || range.to) {\n        if (range.from && range.to) {\n          if (dayDate <= new Date(range.to).getTime() && dayDate >= new Date(range.from).getTime()) {\n            match = true;\n          }\n        } else if (range.from) {\n          if (dayDate >= new Date(range.from).getTime()) {\n            match = true;\n          }\n        } else if (range.to) {\n          if (dayDate <= new Date(range.to).getTime()) {\n            match = true;\n          }\n        }\n      } else if (range.date) {\n        match = dayDate === new Date(range.date).getTime();\n      } else if (typeof range === 'function') {\n        match = range(new Date(dayDate));\n      }\n      return match;\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"daysInMonth\",\n    value: function daysInMonth(date) {\n      var d = new Date(date);\n      return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();\n    }\n  }, {\n    key: \"renderMonths\",\n    value: function renderMonths(date) {\n      var calendar = this;\n      if (calendar.params.renderMonths) {\n        return calendar.params.renderMonths.call(calendar, date);\n      }\n      return \"\\n    <div class=\\\"calendar-months-wrapper\\\">\\n    \".concat(calendar.renderMonth(date, 'prev'), \"\\n    \").concat(calendar.renderMonth(date), \"\\n    \").concat(calendar.renderMonth(date, 'next'), \"\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderMonth\",\n    value: function renderMonth(d, offset) {\n      var calendar = this;\n      var params = calendar.params,\n        value = calendar.value;\n      if (params.renderMonth) {\n        return params.renderMonth.call(calendar, d, offset);\n      }\n      var date = new Date(d);\n      var year = date.getFullYear();\n      var month = date.getMonth();\n      var localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter.format(date));\n      if (localeMonth < 0) localeMonth = month;\n      var localeYear = calendar.yearFormatter.format(date);\n      if (offset === 'next') {\n        if (month === 11) date = new Date(year + 1, 0);else date = new Date(year, month + 1, 1);\n      }\n      if (offset === 'prev') {\n        if (month === 0) date = new Date(year - 1, 11);else date = new Date(year, month - 1, 1);\n      }\n      if (offset === 'next' || offset === 'prev') {\n        month = date.getMonth();\n        year = date.getFullYear();\n        localeMonth = calendar.monthNames.indexOf(calendar.monthFormatter.format(date));\n        if (localeMonth < 0) localeMonth = month;\n        localeYear = calendar.yearFormatter.format(date);\n      }\n      var currentValues = [];\n      var today = new Date().setHours(0, 0, 0, 0);\n      var minDate = params.minDate ? new Date(params.minDate).getTime() : null;\n      var maxDate = params.maxDate ? new Date(params.maxDate).getTime() : null;\n      var rows = 6;\n      var cols = 7;\n      var daysInPrevMonth = calendar.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000);\n      var daysInMonth = calendar.daysInMonth(date);\n      var minDayNumber = params.firstDay === 6 ? 0 : 1;\n      var monthHtml = '';\n      var dayIndex = 0 + (params.firstDay - 1);\n      var disabled;\n      var hasEvents;\n      var firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay();\n      if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7;\n      if (value && value.length) {\n        for (var i = 0; i < value.length; i += 1) {\n          currentValues.push(new Date(value[i]).setHours(0, 0, 0, 0));\n        }\n      }\n      for (var row = 1; row <= rows; row += 1) {\n        var rowHtml = '';\n        var _loop = function _loop() {\n          dayIndex += 1;\n          var dayDate;\n          var dayNumber = dayIndex - firstDayOfMonthIndex;\n          var addClass = '';\n          if (row === 1 && col === 1 && dayNumber > minDayNumber && params.firstDay !== 1) {\n            dayIndex -= 7;\n            dayNumber = dayIndex - firstDayOfMonthIndex;\n          }\n          var weekDayIndex = col - 1 + params.firstDay > 6 ? col - 1 - 7 + params.firstDay : col - 1 + params.firstDay;\n          if (dayNumber < 0) {\n            dayNumber = daysInPrevMonth + dayNumber + 1;\n            addClass += ' calendar-day-prev';\n            dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime();\n          } else {\n            dayNumber += 1;\n            if (dayNumber > daysInMonth) {\n              dayNumber -= daysInMonth;\n              addClass += ' calendar-day-next';\n              dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime();\n            } else {\n              dayDate = new Date(year, month, dayNumber).getTime();\n            }\n          }\n          // Today\n          if (dayDate === today) addClass += ' calendar-day-today';\n\n          // Selected\n          if (params.rangePicker && currentValues.length === 2) {\n            if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' calendar-day-selected';\n          } else if (currentValues.indexOf(dayDate) >= 0) addClass += ' calendar-day-selected';\n          // Weekend\n          if (params.weekendDays.indexOf(weekDayIndex) >= 0) {\n            addClass += ' calendar-day-weekend';\n          }\n          // Events\n          var eventsHtml = '';\n          hasEvents = false;\n          if (params.events) {\n            if (calendar.dateInRange(dayDate, params.events)) {\n              hasEvents = true;\n            }\n          }\n          if (hasEvents) {\n            addClass += ' calendar-day-has-events';\n            eventsHtml = \"\\n            <span class=\\\"calendar-day-events\\\">\\n              <span class=\\\"calendar-day-event\\\"></span>\\n            </span>\\n          \";\n            if (Array.isArray(params.events)) {\n              var eventDots = [];\n              params.events.forEach(function (ev) {\n                var color = ev.color || '';\n                if (eventDots.indexOf(color) < 0 && calendar.dateInRange(dayDate, ev)) {\n                  eventDots.push(color);\n                }\n              });\n              eventsHtml = \"\\n              <span class=\\\"calendar-day-events\\\">\\n                \".concat(eventDots.map(function (color) {\n                return \"\\n                  <span class=\\\"calendar-day-event\\\" style=\\\"\".concat(color ? \"background-color: \".concat(color) : '', \"\\\"></span>\\n                \").trim();\n              }).join(''), \"\\n              </span>\\n            \");\n            }\n          }\n          // Custom Ranges\n          if (params.rangesClasses) {\n            for (var k = 0; k < params.rangesClasses.length; k += 1) {\n              if (calendar.dateInRange(dayDate, params.rangesClasses[k].range)) {\n                addClass += \" \".concat(params.rangesClasses[k].cssClass);\n              }\n            }\n          }\n          // Disabled\n          disabled = false;\n          if (minDate && dayDate < minDate || maxDate && dayDate > maxDate) {\n            disabled = true;\n          }\n          if (params.disabled) {\n            if (calendar.dateInRange(dayDate, params.disabled)) {\n              disabled = true;\n            }\n          }\n          if (disabled) {\n            addClass += ' calendar-day-disabled';\n          }\n          dayDate = new Date(dayDate);\n          var dayYear = dayDate.getFullYear();\n          var dayMonth = dayDate.getMonth();\n          var dayNumberDisplay = calendar.dayFormatter.format(dayDate);\n          rowHtml += \"\\n          <div data-year=\\\"\".concat(dayYear, \"\\\" data-month=\\\"\").concat(dayMonth, \"\\\" data-day=\\\"\").concat(dayNumber, \"\\\" class=\\\"calendar-day\").concat(addClass, \"\\\" data-date=\\\"\").concat(dayYear, \"-\").concat(dayMonth, \"-\").concat(dayNumber, \"\\\">\\n            <span class=\\\"calendar-day-number\\\">\").concat(dayNumberDisplay).concat(eventsHtml, \"</span>\\n          </div>\").trim();\n        };\n        for (var col = 1; col <= cols; col += 1) {\n          _loop();\n        }\n        monthHtml += \"<div class=\\\"calendar-row\\\">\".concat(rowHtml, \"</div>\");\n      }\n      monthHtml = \"<div class=\\\"calendar-month\\\" data-year=\\\"\".concat(year, \"\\\" data-month=\\\"\").concat(month, \"\\\" data-locale-year=\\\"\").concat(localeYear, \"\\\" data-locale-month=\\\"\").concat(localeMonth, \"\\\">\").concat(monthHtml, \"</div>\");\n      return monthHtml;\n    }\n  }, {\n    key: \"renderWeekHeader\",\n    value: function renderWeekHeader() {\n      var calendar = this;\n      if (calendar.params.renderWeekHeader) {\n        return calendar.params.renderWeekHeader.call(calendar);\n      }\n      var params = calendar.params;\n      var weekDaysHtml = '';\n      for (var i = 0; i < 7; i += 1) {\n        var dayIndex = i + params.firstDay > 6 ? i - 7 + params.firstDay : i + params.firstDay;\n        var dayName = calendar.dayNamesShort[dayIndex];\n        weekDaysHtml += \"<div class=\\\"calendar-week-day\\\">\".concat(dayName, \"</div>\");\n      }\n      return \"\\n    <div class=\\\"calendar-week-header\\\">\\n      \".concat(weekDaysHtml, \"\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderMonthSelector\",\n    value: function renderMonthSelector() {\n      var calendar = this;\n      if (calendar.params.renderMonthSelector) {\n        return calendar.params.renderMonthSelector.call(calendar);\n      }\n      return \"\\n    <div class=\\\"calendar-month-selector\\\">\\n      <a class=\\\"link icon-only calendar-prev-month-button\\\">\\n        <i class=\\\"icon icon-prev\\\"></i>\\n      </a>\\n      \".concat(calendar.params.monthPicker ? \"\\n        <a class=\\\"current-month-value link\\\"></a>\\n      \" : \"\\n        <span class=\\\"current-month-value\\\"></span>\\n      \", \"\\n      <a class=\\\"link icon-only calendar-next-month-button\\\">\\n        <i class=\\\"icon icon-next\\\"></i>\\n      </a>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderMonthPicker\",\n    value: function renderMonthPicker() {\n      var calendar = this;\n      var localeMonth = parseInt(calendar.$el.find('.calendar-month-current').attr('data-locale-month'), 10);\n      return \"\\n      <div class=\\\"calendar-month-picker\\\">\\n        \".concat(calendar.monthNames.map(function (m, index) {\n        return \"\\n          <div class=\\\"calendar-month-picker-item \".concat(localeMonth === index ? 'calendar-month-picker-item-current' : '', \"\\\">\\n            <span>\").concat(m, \"</span>\\n          </div>\\n        \");\n      }).join(''), \"\\n      </div>\\n    \");\n    }\n  }, {\n    key: \"renderYearSelector\",\n    value: function renderYearSelector() {\n      var calendar = this;\n      if (calendar.params.renderYearSelector) {\n        return calendar.params.renderYearSelector.call(calendar);\n      }\n      return \"\\n    <div class=\\\"calendar-year-selector\\\">\\n      <a class=\\\"link icon-only calendar-prev-year-button\\\">\\n        <i class=\\\"icon icon-prev\\\"></i>\\n      </a>\\n      \".concat(calendar.params.yearPicker ? \"\\n        <a class=\\\"current-year-value link\\\"></a>\\n      \" : \"\\n        <span class=\\\"current-year-value\\\"></span>\\n      \", \"\\n      <a class=\\\"link icon-only calendar-next-year-button\\\">\\n        <i class=\\\"icon icon-next\\\"></i>\\n      </a>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderYearPicker\",\n    value: function renderYearPicker() {\n      var calendar = this;\n      var currentYear = calendar.currentYear;\n      var yearMin = calendar.params.yearPickerMin || new Date().getFullYear() - 100;\n      if (calendar.params.minDate) {\n        yearMin = Math.max(yearMin, new Date(calendar.params.minDate).getFullYear());\n      }\n      var yearMax = calendar.params.yearPickerMax || new Date().getFullYear() + 100;\n      if (calendar.params.maxDate) {\n        yearMax = Math.min(yearMax, new Date(calendar.params.maxDate).getFullYear());\n      }\n      var years = [];\n      for (var i = yearMin; i <= yearMax; i += 1) {\n        years.push(i);\n      }\n      return \"\\n      <div class=\\\"calendar-year-picker\\\">\\n        \".concat(years.map(function (year) {\n        return \"\\n          <div data-year=\\\"\".concat(year, \"\\\" class=\\\"calendar-year-picker-item \").concat(year === currentYear ? 'calendar-year-picker-item-current' : '', \"\\\">\\n            <span>\").concat(calendar.yearFormatter.format(new Date().setFullYear(year)), \"</span>\\n          </div>\\n        \");\n      }).join(''), \"\\n      </div>\\n    \");\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"renderTimeSelector\",\n    value: function renderTimeSelector() {\n      var calendar = this;\n      var value = calendar.value && calendar.value[0];\n      var timeString;\n      if (value) timeString = calendar.timeSelectorFormatter.format(value);\n      return \"\\n      <div class=\\\"calendar-time-selector\\\"><a class=\\\"link\\\">\".concat(timeString || calendar.params.timePickerPlaceholder, \"</a></div>\\n    \");\n    }\n  }, {\n    key: \"renderHeader\",\n    value: function renderHeader() {\n      var calendar = this;\n      if (calendar.params.renderHeader) {\n        return calendar.params.renderHeader.call(calendar);\n      }\n      return \"\\n    <div class=\\\"calendar-header\\\">\\n      <div class=\\\"calendar-selected-date\\\">\".concat(calendar.params.headerPlaceholder, \"</div>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderFooter\",\n    value: function renderFooter() {\n      var calendar = this;\n      var app = calendar.app;\n      if (calendar.params.renderFooter) {\n        return calendar.params.renderFooter.call(calendar);\n      }\n      return \"\\n    <div class=\\\"calendar-footer\\\">\\n      <a class=\\\"\".concat(app.theme === 'md' ? 'button' : 'link', \" calendar-close sheet-close popover-close\\\">\").concat(calendar.params.toolbarCloseText, \"</a>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderToolbar\",\n    value: function renderToolbar() {\n      var calendar = this;\n      if (calendar.params.renderToolbar) {\n        return calendar.params.renderToolbar.call(calendar, calendar);\n      }\n      return \"\\n    <div class=\\\"toolbar toolbar-top no-shadow\\\">\\n      <div class=\\\"toolbar-inner\\\">\\n        \".concat(calendar.params.monthSelector ? calendar.renderMonthSelector() : '', \"\\n        \").concat(calendar.params.yearSelector ? calendar.renderYearSelector() : '', \"\\n      </div>\\n    </div>\\n  \").trim();\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"renderInline\",\n    value: function renderInline() {\n      var calendar = this;\n      var _calendar$params4 = calendar.params,\n        cssClass = _calendar$params4.cssClass,\n        toolbar = _calendar$params4.toolbar,\n        header = _calendar$params4.header,\n        footer = _calendar$params4.footer,\n        rangePicker = _calendar$params4.rangePicker,\n        weekHeader = _calendar$params4.weekHeader;\n      var value = calendar.value,\n        hasTimePicker = calendar.hasTimePicker;\n      var date = value && value.length ? value[0] : new Date().setHours(0, 0, 0);\n      var inlineHtml = \"\\n    <div class=\\\"calendar calendar-inline \".concat(rangePicker ? 'calendar-range' : '', \" \").concat(cssClass || '', \"\\\">\\n      \").concat(header ? calendar.renderHeader() : '', \"\\n      \").concat(toolbar ? calendar.renderToolbar() : '', \"\\n      \").concat(weekHeader ? calendar.renderWeekHeader() : '', \"\\n      <div class=\\\"calendar-months\\\">\\n        \").concat(calendar.renderMonths(date), \"\\n      </div>\\n      \").concat(hasTimePicker ? calendar.renderTimeSelector() : '', \"\\n      \").concat(footer ? calendar.renderFooter() : '', \"\\n    </div>\\n  \").trim();\n      return inlineHtml;\n    }\n  }, {\n    key: \"renderCustomModal\",\n    value: function renderCustomModal() {\n      var calendar = this;\n      var _calendar$params5 = calendar.params,\n        cssClass = _calendar$params5.cssClass,\n        toolbar = _calendar$params5.toolbar,\n        header = _calendar$params5.header,\n        footer = _calendar$params5.footer,\n        rangePicker = _calendar$params5.rangePicker,\n        weekHeader = _calendar$params5.weekHeader;\n      var value = calendar.value,\n        hasTimePicker = calendar.hasTimePicker;\n      var date = value && value.length ? value[0] : new Date().setHours(0, 0, 0);\n      var sheetHtml = \"\\n    <div class=\\\"calendar calendar-modal \".concat(rangePicker ? 'calendar-range' : '', \" \").concat(cssClass || '', \"\\\">\\n      \").concat(header ? calendar.renderHeader() : '', \"\\n      \").concat(toolbar ? calendar.renderToolbar() : '', \"\\n      \").concat(weekHeader ? calendar.renderWeekHeader() : '', \"\\n      <div class=\\\"calendar-months\\\">\\n        \").concat(calendar.renderMonths(date), \"\\n      </div>\\n      \").concat(hasTimePicker ? calendar.renderTimeSelector() : '', \"\\n      \").concat(footer ? calendar.renderFooter() : '', \"\\n    </div>\\n  \").trim();\n      return sheetHtml;\n    }\n  }, {\n    key: \"renderSheet\",\n    value: function renderSheet() {\n      var calendar = this;\n      var _calendar$params6 = calendar.params,\n        cssClass = _calendar$params6.cssClass,\n        toolbar = _calendar$params6.toolbar,\n        header = _calendar$params6.header,\n        footer = _calendar$params6.footer,\n        rangePicker = _calendar$params6.rangePicker,\n        weekHeader = _calendar$params6.weekHeader;\n      var value = calendar.value,\n        hasTimePicker = calendar.hasTimePicker;\n      var date = value && value.length ? value[0] : new Date().setHours(0, 0, 0);\n      var sheetHtml = \"\\n    <div class=\\\"sheet-modal calendar calendar-sheet \".concat(rangePicker ? 'calendar-range' : '', \" \").concat(cssClass || '', \"\\\">\\n      \").concat(header ? calendar.renderHeader() : '', \"\\n      \").concat(toolbar ? calendar.renderToolbar() : '', \"\\n      \").concat(weekHeader ? calendar.renderWeekHeader() : '', \"\\n      <div class=\\\"sheet-modal-inner calendar-months\\\">\\n        \").concat(calendar.renderMonths(date), \"\\n      </div>\\n      \").concat(hasTimePicker ? calendar.renderTimeSelector() : '', \"\\n      \").concat(footer ? calendar.renderFooter() : '', \"\\n    </div>\\n  \").trim();\n      return sheetHtml;\n    }\n  }, {\n    key: \"renderPopover\",\n    value: function renderPopover() {\n      var calendar = this;\n      var _calendar$params7 = calendar.params,\n        cssClass = _calendar$params7.cssClass,\n        toolbar = _calendar$params7.toolbar,\n        header = _calendar$params7.header,\n        footer = _calendar$params7.footer,\n        rangePicker = _calendar$params7.rangePicker,\n        weekHeader = _calendar$params7.weekHeader;\n      var value = calendar.value,\n        hasTimePicker = calendar.hasTimePicker;\n      var date = value && value.length ? value[0] : new Date().setHours(0, 0, 0);\n      var popoverHtml = \"\\n    <div class=\\\"popover calendar-popover\\\">\\n      <div class=\\\"popover-inner\\\">\\n        <div class=\\\"calendar \".concat(rangePicker ? 'calendar-range' : '', \" \").concat(cssClass || '', \"\\\">\\n        \").concat(header ? calendar.renderHeader() : '', \"\\n        \").concat(toolbar ? calendar.renderToolbar() : '', \"\\n        \").concat(weekHeader ? calendar.renderWeekHeader() : '', \"\\n        <div class=\\\"calendar-months\\\">\\n          \").concat(calendar.renderMonths(date), \"\\n        </div>\\n        \").concat(hasTimePicker ? calendar.renderTimeSelector() : '', \"\\n        \").concat(footer ? calendar.renderFooter() : '', \"\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n      return popoverHtml;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var calendar = this;\n      var params = calendar.params;\n      if (params.render) return params.render.call(calendar);\n      if (!calendar.inline) {\n        var modalType = params.openIn;\n        if (modalType === 'auto') modalType = calendar.isPopover() ? 'popover' : 'sheet';\n        if (modalType === 'popover') return calendar.renderPopover();\n        if (modalType === 'sheet') return calendar.renderSheet();\n        return calendar.renderCustomModal();\n      }\n      return calendar.renderInline();\n    }\n  }, {\n    key: \"openTimePicker\",\n    value: function openTimePicker() {\n      var calendar = this;\n      var $el = calendar.$el,\n        app = calendar.app;\n      if (!$el || !$el.length) return;\n      $el.append('<div class=\"calendar-time-picker\"></div>');\n      var hoursArr = [];\n      var minutesArr = [];\n      for (var i = 0; i <= 23; i += 1) {\n        hoursArr.push(i);\n      }\n      for (var _i2 = 0; _i2 <= 59; _i2 += 1) {\n        minutesArr.push(_i2);\n      }\n      var value;\n      if (calendar.value && calendar.value.length) {\n        value = [calendar.value[0].getHours(), calendar.value[0].getMinutes()];\n      } else {\n        value = [new Date().getHours(), new Date().getMinutes()];\n      }\n      calendar.timePickerInstance = app.picker.create({\n        containerEl: $el.find('.calendar-time-picker'),\n        value: value,\n        toolbar: true,\n        rotateEffect: false,\n        toolbarCloseText: calendar.params.toolbarCloseText,\n        cols: [{\n          values: hoursArr\n        }, {\n          divider: true,\n          content: ':'\n        }, {\n          values: minutesArr,\n          displayValues: minutesArr.map(function (m) {\n            return m < 10 ? \"0\".concat(m) : m;\n          })\n        }]\n      });\n      calendar.timePickerInstance.$el.find('.toolbar a').removeClass('sheet-close popover-close').addClass('calendar-time-picker-close');\n    }\n  }, {\n    key: \"closeTimePicker\",\n    value: function closeTimePicker() {\n      var calendar = this;\n      if (calendar.timePickerInstance) {\n        var _calendar$timePickerI = calendar.timePickerInstance.value.map(function (v) {\n            return parseInt(v, 10);\n          }),\n          _calendar$timePickerI2 = slicedToArray_default()(_calendar$timePickerI, 2),\n          hours = _calendar$timePickerI2[0],\n          minutes = _calendar$timePickerI2[1];\n        var value = calendar.value && calendar.value.length && calendar.value[0];\n        if (!value) {\n          value = new Date();\n          value.setHours(hours, minutes, 0, 0);\n        } else {\n          value = new Date(value);\n          value.setHours(hours, minutes);\n        }\n        calendar.setValue([value]);\n        calendar.timePickerInstance.close();\n        calendar.timePickerInstance.destroy();\n        delete calendar.timePickerInstance;\n      }\n      if (calendar.$el && calendar.$el.length) {\n        calendar.$el.find('.calendar-time-picker').remove();\n      }\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen() {\n      var calendar = this;\n      var initialized = calendar.initialized,\n        $el = calendar.$el,\n        app = calendar.app,\n        $inputEl = calendar.$inputEl,\n        inline = calendar.inline,\n        value = calendar.value,\n        params = calendar.params;\n      calendar.closing = false;\n      calendar.opened = true;\n      calendar.opening = true;\n\n      // Init main events\n      calendar.attachCalendarEvents();\n      var updateValue = !value && params.value;\n\n      // Set value\n      if (!initialized) {\n        if (value) calendar.setValue(value, 0);else if (params.value) {\n          calendar.setValue(calendar.normalizeValues(params.value), 0);\n        }\n      } else if (value) {\n        calendar.setValue(value, 0);\n      }\n\n      // Update current month and year\n      calendar.updateCurrentMonthYear();\n\n      // Set initial translate\n      calendar.monthsTranslate = 0;\n      calendar.setMonthsTranslate();\n\n      // Update input value\n      if (updateValue) calendar.updateValue();else if (params.header && value) {\n        calendar.updateValue(true);\n      }\n\n      // Extra focus\n      if (!inline && $inputEl && $inputEl.length && app.theme === 'md') {\n        $inputEl.trigger('focus');\n      }\n      calendar.initialized = true;\n      calendar.$months.each(function (index, monthEl) {\n        calendar.emit('local::monthAdd calendarMonthAdd', monthEl);\n      });\n\n      // Trigger events\n      if ($el) {\n        $el.trigger('calendar:open');\n      }\n      if ($inputEl) {\n        $inputEl.trigger('calendar:open');\n      }\n      calendar.emit('local::open calendarOpen', calendar);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var calendar = this;\n      calendar.opening = false;\n      if (calendar.$el) {\n        calendar.$el.trigger('calendar:opened');\n      }\n      if (calendar.$inputEl) {\n        calendar.$inputEl.trigger('calendar:opened');\n      }\n      calendar.emit('local::opened calendarOpened', calendar);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var calendar = this;\n      var app = calendar.app;\n      calendar.opening = false;\n      calendar.closing = true;\n      if (calendar.$inputEl) {\n        if (app.theme === 'md') {\n          calendar.$inputEl.trigger('blur');\n        } else {\n          var validate = calendar.$inputEl.attr('validate');\n          var required = calendar.$inputEl.attr('required');\n          if (validate && required) {\n            app.input.validate(calendar.$inputEl);\n          }\n        }\n      }\n      if (calendar.detachCalendarEvents) {\n        calendar.detachCalendarEvents();\n      }\n      if (calendar.$el) {\n        calendar.$el.trigger('calendar:close');\n      }\n      if (calendar.$inputEl) {\n        calendar.$inputEl.trigger('calendar:close');\n      }\n      calendar.emit('local::close calendarClose', calendar);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var calendar = this;\n      calendar.opened = false;\n      calendar.closing = false;\n      if (!calendar.inline) {\n        utils[\"default\"].nextTick(function () {\n          if (calendar.modal && calendar.modal.el && calendar.modal.destroy) {\n            if (!calendar.params.routableModals) {\n              calendar.modal.destroy();\n            }\n          }\n          delete calendar.modal;\n        });\n      }\n      if (calendar.timePickerInstance) {\n        if (calendar.timePickerInstance.destroy) calendar.timePickerInstance.destroy();\n        delete calendar.timePickerInstance;\n      }\n      if (calendar.$el) {\n        calendar.$el.trigger('calendar:closed');\n      }\n      if (calendar.$inputEl) {\n        calendar.$inputEl.trigger('calendar:closed');\n      }\n      calendar.emit('local::closed calendarClosed', calendar);\n    }\n  }, {\n    key: \"open\",\n    value: function open() {\n      var calendar = this;\n      var app = calendar.app,\n        opened = calendar.opened,\n        inline = calendar.inline,\n        $inputEl = calendar.$inputEl,\n        params = calendar.params;\n      if (opened) return;\n      if (inline) {\n        calendar.$el = Object(dom7_module[\"default\"])(calendar.render());\n        calendar.$el[0].f7Calendar = calendar;\n        calendar.$wrapperEl = calendar.$el.find('.calendar-months-wrapper');\n        calendar.$months = calendar.$wrapperEl.find('.calendar-month');\n        calendar.$containerEl.append(calendar.$el);\n        calendar.onOpen();\n        calendar.onOpened();\n        return;\n      }\n      var modalType = params.openIn;\n      if (modalType === 'auto') {\n        modalType = calendar.isPopover() ? 'popover' : 'sheet';\n      }\n      var modalContent = calendar.render();\n      var modalParams = {\n        targetEl: $inputEl,\n        scrollToEl: params.scrollToInput ? $inputEl : undefined,\n        content: modalContent,\n        backdrop: params.backdrop === true || modalType === 'popover' && app.params.popover.backdrop !== false && params.backdrop !== false,\n        closeByBackdropClick: params.closeByBackdropClick,\n        on: {\n          open: function open() {\n            var modal = this;\n            calendar.modal = modal;\n            calendar.$el = modalType === 'popover' ? modal.$el.find('.calendar') : modal.$el;\n            calendar.$wrapperEl = calendar.$el.find('.calendar-months-wrapper');\n            calendar.$months = calendar.$wrapperEl.find('.calendar-month');\n            calendar.$el[0].f7Calendar = calendar;\n            if (modalType === 'customModal') {\n              Object(dom7_module[\"default\"])(calendar.$el).find('.calendar-close').once('click', function () {\n                calendar.close();\n              });\n            }\n            calendar.onOpen();\n          },\n          opened: function opened() {\n            calendar.onOpened();\n          },\n          close: function close() {\n            calendar.onClose();\n          },\n          closed: function closed() {\n            calendar.onClosed();\n          }\n        }\n      };\n      if (modalType === 'sheet') {\n        modalParams.push = params.sheetPush;\n        modalParams.swipeToClose = params.sheetSwipeToClose;\n      }\n      if (params.routableModals && calendar.view) {\n        calendar.view.router.navigate({\n          url: calendar.url,\n          route: defineProperty_default()({\n            path: calendar.url\n          }, modalType, modalParams)\n        });\n      } else {\n        calendar.modal = app[modalType].create(modalParams);\n        calendar.modal.open();\n      }\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var calendar = this;\n      var opened = calendar.opened,\n        inline = calendar.inline;\n      if (!opened) return;\n      if (inline) {\n        calendar.onClose();\n        calendar.onClosed();\n        return;\n      }\n      if (calendar.params.routableModals && calendar.view) {\n        calendar.view.router.back();\n      } else {\n        calendar.modal.close();\n      }\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var calendar = this;\n      calendar.initInput();\n      if (calendar.inline) {\n        calendar.open();\n        calendar.emit('local::init calendarInit', calendar);\n        return;\n      }\n      if (!calendar.initialized && calendar.params.value) {\n        calendar.setValue(calendar.normalizeValues(calendar.params.value));\n      }\n\n      // Attach input Events\n      if (calendar.$inputEl) {\n        calendar.attachInputEvents();\n      }\n      if (calendar.params.closeByOutsideClick) {\n        calendar.attachHtmlEvents();\n      }\n      calendar.emit('local::init calendarInit', calendar);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var calendar = this;\n      if (calendar.destroyed) return;\n      var $el = calendar.$el;\n      calendar.emit('local::beforeDestroy calendarBeforeDestroy', calendar);\n      if ($el) $el.trigger('calendar:beforedestroy');\n      calendar.close();\n\n      // Detach Events\n      if (calendar.$inputEl) {\n        calendar.detachInputEvents();\n      }\n      if (calendar.params.closeByOutsideClick) {\n        calendar.detachHtmlEvents();\n      }\n      if (calendar.timePickerInstance) {\n        if (calendar.timePickerInstance.destroy) calendar.timePickerInstance.destroy();\n        delete calendar.timePickerInstance;\n      }\n      if ($el && $el.length) delete calendar.$el[0].f7Calendar;\n      utils[\"default\"].deleteProps(calendar);\n      calendar.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var calendar_class = (calendar_class_Calendar);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/calendar/calendar.js\n\n\n\n/* harmony default export */ var calendar_calendar = ({\n  name: 'calendar',\n  static: {\n    Calendar: calendar_class\n  },\n  create: function create() {\n    var app = this;\n    app.calendar = constructor_methods({\n      defaultSelector: '.calendar',\n      constructor: calendar_class,\n      app: app,\n      domProp: 'f7Calendar'\n    });\n    app.calendar.close = function close() {\n      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.calendar';\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return;\n      var calendar = $el[0].f7Calendar;\n      if (!calendar || calendar && !calendar.opened) return;\n      calendar.close();\n    };\n  },\n  params: {\n    calendar: {\n      // Calendar settings\n      dateFormat: undefined,\n      monthNames: 'auto',\n      monthNamesShort: 'auto',\n      dayNames: 'auto',\n      dayNamesShort: 'auto',\n      locale: undefined,\n      firstDay: 1,\n      // First day of the week, Monday\n      weekendDays: [0, 6],\n      // Sunday and Saturday\n      multiple: false,\n      rangePicker: false,\n      rangePickerMinDays: 1,\n      // when calendar is used as rangePicker\n      rangePickerMaxDays: 0,\n      // when calendar is used as rangePicker, 0 means unlimited\n      direction: 'horizontal',\n      // or 'vertical'\n      minDate: null,\n      maxDate: null,\n      disabled: null,\n      // dates range of disabled days\n      events: null,\n      // dates range of days with events\n      rangesClasses: null,\n      // array with custom classes date ranges\n      touchMove: true,\n      animate: true,\n      closeOnSelect: false,\n      monthSelector: true,\n      monthPicker: true,\n      yearSelector: true,\n      yearPicker: true,\n      yearPickerMin: undefined,\n      yearPickerMax: undefined,\n      timePicker: false,\n      timePickerFormat: {\n        hour: 'numeric',\n        minute: 'numeric'\n      },\n      timePickerPlaceholder: 'Select time',\n      weekHeader: true,\n      value: null,\n      // Common opener settings\n      containerEl: null,\n      openIn: 'auto',\n      // or 'popover' or 'sheet' or 'customModal'\n      sheetPush: false,\n      sheetSwipeToClose: undefined,\n      formatValue: null,\n      inputEl: null,\n      inputReadOnly: true,\n      closeByOutsideClick: true,\n      scrollToInput: true,\n      header: false,\n      headerPlaceholder: 'Select date',\n      toolbar: true,\n      toolbarCloseText: 'Done',\n      footer: false,\n      cssClass: null,\n      routableModals: true,\n      view: null,\n      url: 'date/',\n      backdrop: null,\n      closeByBackdropClick: true,\n      // Render functions\n      renderWeekHeader: null,\n      renderMonths: null,\n      renderMonth: null,\n      renderMonthSelector: null,\n      renderYearSelector: null,\n      renderHeader: null,\n      renderFooter: null,\n      renderToolbar: null,\n      renderInline: null,\n      renderPopover: null,\n      renderSheet: null,\n      render: null\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/picker/picker-column.js\n\n\n/* harmony default export */ var picker_column = (function (colEl, updateItems) {\n  var picker = this;\n  var app = picker.app;\n  var $colEl = Object(dom7_module[\"default\"])(colEl);\n  var colIndex = $colEl.index();\n  var col = picker.cols[colIndex];\n  if (col.divider) return;\n  col.$el = $colEl;\n  col.el = $colEl[0];\n  col.$itemsEl = col.$el.find('.picker-items');\n  col.items = col.$itemsEl.find('.picker-item');\n  var itemHeight;\n  var itemsHeight;\n  var minTranslate;\n  var maxTranslate;\n  var animationFrameId;\n  function updateDuringScroll() {\n    animationFrameId = utils[\"default\"].requestAnimationFrame(function () {\n      col.updateItems(undefined, undefined, 0);\n      updateDuringScroll();\n    });\n  }\n  col.replaceValues = function replaceColValues(values, displayValues) {\n    col.detachEvents();\n    col.values = values;\n    col.displayValues = displayValues;\n    col.$itemsEl.html(picker.renderColumn(col, true));\n    col.items = col.$itemsEl.find('.picker-item');\n    col.calcSize();\n    col.setValue(col.values[0], 0, true);\n    col.attachEvents();\n  };\n  col.calcSize = function calcColSize() {\n    if (picker.params.rotateEffect) {\n      col.$el.removeClass('picker-column-absolute');\n      if (!col.width) col.$el.css({\n        width: ''\n      });\n    }\n    var colWidth = 0;\n    var colHeight = col.$el[0].offsetHeight;\n    itemHeight = col.items[0].offsetHeight;\n    itemsHeight = itemHeight * col.items.length;\n    minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2;\n    maxTranslate = colHeight / 2 - itemHeight / 2;\n    if (col.width) {\n      colWidth = col.width;\n      if (parseInt(colWidth, 10) === colWidth) colWidth += 'px';\n      col.$el.css({\n        width: colWidth\n      });\n    }\n    if (picker.params.rotateEffect) {\n      if (!col.width) {\n        col.items.each(function (index, itemEl) {\n          var item = Object(dom7_module[\"default\"])(itemEl).children('span');\n          colWidth = Math.max(colWidth, item[0].offsetWidth);\n        });\n        col.$el.css({\n          width: \"\".concat(colWidth + 2, \"px\")\n        });\n      }\n      col.$el.addClass('picker-column-absolute');\n    }\n  };\n  col.setValue = function setColValue(newValue) {\n    var transition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var valueCallbacks = arguments.length > 2 ? arguments[2] : undefined;\n    var newActiveIndex = col.$itemsEl.find(\".picker-item[data-picker-value=\\\"\".concat(newValue, \"\\\"]\")).index();\n    if (typeof newActiveIndex === 'undefined' || newActiveIndex === -1) {\n      return;\n    }\n    var newTranslate = -newActiveIndex * itemHeight + maxTranslate;\n    // Update wrapper\n    col.$itemsEl.transition(transition);\n    col.$itemsEl.transform(\"translate3d(0,\".concat(newTranslate, \"px,0)\"));\n\n    // Watch items\n    if (picker.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex) {\n      utils[\"default\"].cancelAnimationFrame(animationFrameId);\n      col.$itemsEl.transitionEnd(function () {\n        utils[\"default\"].cancelAnimationFrame(animationFrameId);\n      });\n      updateDuringScroll();\n    }\n\n    // Update items\n    col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks);\n  };\n  col.updateItems = function updateColItems(activeIndex, translate, transition, valueCallbacks) {\n    if (typeof translate === 'undefined') {\n      // eslint-disable-next-line\n      translate = utils[\"default\"].getTranslate(col.$itemsEl[0], 'y');\n    }\n    // eslint-disable-next-line\n    if (typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate) / itemHeight);\n    // eslint-disable-next-line\n    if (activeIndex < 0) activeIndex = 0;\n    // eslint-disable-next-line\n    if (activeIndex >= col.items.length) activeIndex = col.items.length - 1;\n    var previousActiveIndex = col.activeIndex;\n    col.activeIndex = activeIndex;\n    col.$itemsEl.find('.picker-item-selected').removeClass('picker-item-selected');\n    col.items.transition(transition);\n    var selectedItem = col.items.eq(activeIndex).addClass('picker-item-selected').transform('');\n\n    // Set 3D rotate effect\n    if (picker.params.rotateEffect) {\n      col.items.each(function (index, itemEl) {\n        var $itemEl = Object(dom7_module[\"default\"])(itemEl);\n        var itemOffsetTop = $itemEl.index() * itemHeight;\n        var translateOffset = maxTranslate - translate;\n        var itemOffset = itemOffsetTop - translateOffset;\n        var percentage = itemOffset / itemHeight;\n        var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1;\n        var angle = -18 * percentage;\n        if (angle > 180) angle = 180;\n        if (angle < -180) angle = -180;\n        if (Math.abs(percentage) > itemsFit) {\n          $itemEl.addClass('picker-item-far');\n        } else {\n          $itemEl.removeClass('picker-item-far');\n        }\n        $itemEl.transform(\"translate3d(0, \".concat(-translate + maxTranslate, \"px, \").concat(picker.needsOriginFix ? -110 : 0, \"px) rotateX(\").concat(angle, \"deg)\"));\n      });\n    }\n    if (valueCallbacks || typeof valueCallbacks === 'undefined') {\n      // Update values\n      col.value = selectedItem.attr('data-picker-value');\n      col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value;\n      // On change callback\n      if (previousActiveIndex !== activeIndex) {\n        if (col.onChange) {\n          col.onChange(picker, col.value, col.displayValue);\n        }\n        picker.updateValue();\n      }\n    }\n  };\n  var allowItemClick = true;\n  var isTouched;\n  var isMoved;\n  var touchStartY;\n  var touchCurrentY;\n  var touchStartTime;\n  var touchEndTime;\n  var startTranslate;\n  var returnTo;\n  var currentTranslate;\n  var prevTranslate;\n  var velocityTranslate;\n  function handleTouchStart(e) {\n    if (isMoved || isTouched) return;\n    e.preventDefault();\n    isTouched = true;\n    touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    touchCurrentY = touchStartY;\n    touchStartTime = new Date().getTime();\n    allowItemClick = true;\n    startTranslate = utils[\"default\"].getTranslate(col.$itemsEl[0], 'y');\n    currentTranslate = startTranslate;\n  }\n  function handleTouchMove(e) {\n    if (!isTouched) return;\n    e.preventDefault();\n    allowItemClick = false;\n    touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n    if (!isMoved) {\n      // First move\n      utils[\"default\"].cancelAnimationFrame(animationFrameId);\n      isMoved = true;\n      startTranslate = utils[\"default\"].getTranslate(col.$itemsEl[0], 'y');\n      currentTranslate = startTranslate;\n      col.$itemsEl.transition(0);\n    }\n    var diff = touchCurrentY - touchStartY;\n    currentTranslate = startTranslate + diff;\n    returnTo = undefined;\n\n    // Normalize translate\n    if (currentTranslate < minTranslate) {\n      currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8);\n      returnTo = 'min';\n    }\n    if (currentTranslate > maxTranslate) {\n      currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8);\n      returnTo = 'max';\n    }\n    // Transform wrapper\n    col.$itemsEl.transform(\"translate3d(0,\".concat(currentTranslate, \"px,0)\"));\n\n    // Update items\n    col.updateItems(undefined, currentTranslate, 0, picker.params.updateValuesOnTouchmove);\n\n    // Calc velocity\n    velocityTranslate = currentTranslate - prevTranslate || currentTranslate;\n    prevTranslate = currentTranslate;\n  }\n  function handleTouchEnd() {\n    if (!isTouched || !isMoved) {\n      isTouched = false;\n      isMoved = false;\n      return;\n    }\n    isTouched = false;\n    isMoved = false;\n    col.$itemsEl.transition('');\n    if (returnTo) {\n      if (returnTo === 'min') {\n        col.$itemsEl.transform(\"translate3d(0,\".concat(minTranslate, \"px,0)\"));\n      } else {\n        col.$itemsEl.transform(\"translate3d(0,\".concat(maxTranslate, \"px,0)\"));\n      }\n    }\n    touchEndTime = new Date().getTime();\n    var newTranslate;\n    if (touchEndTime - touchStartTime > 300) {\n      newTranslate = currentTranslate;\n    } else {\n      newTranslate = currentTranslate + velocityTranslate * picker.params.momentumRatio;\n    }\n    newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate);\n\n    // Active Index\n    var activeIndex = Math.round(Math.abs((newTranslate - maxTranslate) / itemHeight));\n\n    // Normalize translate\n    if (!picker.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate;\n\n    // Transform wrapper\n    col.$itemsEl.transform(\"translate3d(0,\".concat(parseInt(newTranslate, 10), \"px,0)\"));\n\n    // Update items\n    col.updateItems(activeIndex, newTranslate, '', true);\n\n    // Watch items\n    if (picker.params.updateValuesOnMomentum) {\n      updateDuringScroll();\n      col.$itemsEl.transitionEnd(function () {\n        utils[\"default\"].cancelAnimationFrame(animationFrameId);\n      });\n    }\n\n    // Allow click\n    setTimeout(function () {\n      allowItemClick = true;\n    }, 100);\n  }\n  var mousewheelTimeout;\n  function handleMouseWheel(e) {\n    var deltaX = e.deltaX,\n      deltaY = e.deltaY;\n    if (Math.abs(deltaX) > Math.abs(deltaY)) return;\n    clearTimeout(mousewheelTimeout);\n    e.preventDefault();\n    utils[\"default\"].cancelAnimationFrame(animationFrameId);\n    startTranslate = utils[\"default\"].getTranslate(col.$itemsEl[0], 'y');\n    col.$itemsEl.transition(0);\n    currentTranslate = startTranslate - deltaY;\n    returnTo = undefined;\n\n    // Normalize translate\n    if (currentTranslate < minTranslate) {\n      currentTranslate = minTranslate;\n      returnTo = 'min';\n    }\n    if (currentTranslate > maxTranslate) {\n      currentTranslate = maxTranslate;\n      returnTo = 'max';\n    }\n    // Transform wrapper\n    col.$itemsEl.transform(\"translate3d(0,\".concat(currentTranslate, \"px,0)\"));\n\n    // Update items\n    col.updateItems(undefined, currentTranslate, 0, picker.params.updateValuesOnMousewheel);\n\n    // On end\n    mousewheelTimeout = setTimeout(function () {\n      col.$itemsEl.transition('');\n      if (returnTo) {\n        if (returnTo === 'min') {\n          col.$itemsEl.transform(\"translate3d(0,\".concat(minTranslate, \"px,0)\"));\n        } else {\n          col.$itemsEl.transform(\"translate3d(0,\".concat(maxTranslate, \"px,0)\"));\n        }\n      }\n      touchEndTime = new Date().getTime();\n      var newTranslate = currentTranslate;\n      newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate);\n\n      // Active Index\n      var activeIndex = Math.round(Math.abs((newTranslate - maxTranslate) / itemHeight));\n\n      // Normalize translate\n      if (!picker.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate;\n\n      // Transform wrapper\n      col.$itemsEl.transform(\"translate3d(0,\".concat(parseInt(newTranslate, 10), \"px,0)\"));\n\n      // Update items\n      col.updateItems(activeIndex, newTranslate, '', true);\n    }, 200);\n  }\n  function handleClick() {\n    if (!allowItemClick) return;\n    utils[\"default\"].cancelAnimationFrame(animationFrameId);\n    var value = Object(dom7_module[\"default\"])(this).attr('data-picker-value');\n    col.setValue(value);\n  }\n  var activeListener = app.support.passiveListener ? {\n    passive: false,\n    capture: false\n  } : false;\n  col.attachEvents = function attachColEvents() {\n    col.$el.on(app.touchEvents.start, handleTouchStart, activeListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n    if (picker.params.mousewheel) {\n      col.$el.on('wheel', handleMouseWheel);\n    }\n    col.items.on('click', handleClick);\n  };\n  col.detachEvents = function detachColEvents() {\n    col.$el.off(app.touchEvents.start, handleTouchStart, activeListener);\n    app.off('touchmove:active', handleTouchMove);\n    app.off('touchend:passive', handleTouchEnd);\n    if (picker.params.mousewheel) {\n      col.$el.off('wheel', handleMouseWheel);\n    }\n    col.items.off('click', handleClick);\n  };\n  col.init = function initCol() {\n    col.calcSize();\n    col.$itemsEl.transform(\"translate3d(0,\".concat(maxTranslate, \"px,0)\")).transition(0);\n    if (colIndex === 0) col.$el.addClass('picker-column-first');\n    if (colIndex === picker.cols.length - 1) col.$el.addClass('picker-column-last');\n    // Update items on init\n    if (updateItems) col.updateItems(0, maxTranslate, 0);\n    col.attachEvents();\n  };\n  col.destroy = function destroyCol() {\n    col.detachEvents();\n  };\n  col.init();\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/picker/picker-class.js\n\n\n\n\n\n\nfunction picker_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, picker_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction picker_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (picker_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar picker_class_Picker = /*#__PURE__*/function (_Framework7Class) {\n  function Picker(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Picker);\n    _this = picker_class_callSuper(this, Picker, [params, [app]]);\n    var picker = _this;\n    picker.params = utils[\"default\"].extend({}, app.params.picker, params);\n    var $containerEl;\n    if (picker.params.containerEl) {\n      $containerEl = Object(dom7_module[\"default\"])(picker.params.containerEl);\n      if ($containerEl.length === 0) return possibleConstructorReturn_default()(_this, picker);\n    }\n    var $inputEl;\n    if (picker.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(picker.params.inputEl);\n    }\n    var $scrollToEl = picker.params.scrollToInput ? $inputEl : undefined;\n    if (picker.params.scrollToEl) {\n      var scrollToEl = Object(dom7_module[\"default\"])(picker.params.scrollToEl);\n      if (scrollToEl.length > 0) {\n        $scrollToEl = scrollToEl;\n      }\n    }\n    utils[\"default\"].extend(picker, {\n      app: app,\n      $containerEl: $containerEl,\n      containerEl: $containerEl && $containerEl[0],\n      inline: $containerEl && $containerEl.length > 0,\n      needsOriginFix: app.device.ios || ssr_window_esm[\"window\"].navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && ssr_window_esm[\"window\"].navigator.userAgent.toLowerCase().indexOf('chrome') < 0 && !app.device.android,\n      cols: [],\n      $inputEl: $inputEl,\n      inputEl: $inputEl && $inputEl[0],\n      $scrollToEl: $scrollToEl,\n      initialized: false,\n      opened: false,\n      url: picker.params.url\n    });\n    function onResize() {\n      picker.resizeCols();\n    }\n    function onInputClick() {\n      picker.open();\n    }\n    function onInputFocus(e) {\n      e.preventDefault();\n    }\n    function onHtmlClick(e) {\n      if (picker.destroyed || !picker.params) return;\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      if (picker.isPopover()) return;\n      if (!picker.opened || picker.closing) return;\n      if ($targetEl.closest('[class*=\"backdrop\"]').length) return;\n      if ($inputEl && $inputEl.length > 0) {\n        if ($targetEl[0] !== $inputEl[0] && $targetEl.closest('.sheet-modal').length === 0) {\n          picker.close();\n        }\n      } else if (Object(dom7_module[\"default\"])(e.target).closest('.sheet-modal').length === 0) {\n        picker.close();\n      }\n    }\n\n    // Events\n    utils[\"default\"].extend(picker, {\n      attachResizeEvent: function attachResizeEvent() {\n        app.on('resize', onResize);\n      },\n      detachResizeEvent: function detachResizeEvent() {\n        app.off('resize', onResize);\n      },\n      attachInputEvents: function attachInputEvents() {\n        picker.$inputEl.on('click', onInputClick);\n        if (picker.params.inputReadOnly) {\n          picker.$inputEl.on('focus mousedown', onInputFocus);\n          if (picker.$inputEl[0]) {\n            picker.$inputEl[0].f7ValidateReadonly = true;\n          }\n        }\n      },\n      detachInputEvents: function detachInputEvents() {\n        picker.$inputEl.off('click', onInputClick);\n        if (picker.params.inputReadOnly) {\n          picker.$inputEl.off('focus mousedown', onInputFocus);\n          if (picker.$inputEl[0]) {\n            delete picker.$inputEl[0].f7ValidateReadonly;\n          }\n        }\n      },\n      attachHtmlEvents: function attachHtmlEvents() {\n        app.on('click', onHtmlClick);\n      },\n      detachHtmlEvents: function detachHtmlEvents() {\n        app.off('click', onHtmlClick);\n      }\n    });\n    picker.init();\n    return possibleConstructorReturn_default()(_this, picker);\n  }\n  inherits_default()(Picker, _Framework7Class);\n  return createClass_default()(Picker, [{\n    key: \"view\",\n    get: function get() {\n      var app = this.app,\n        params = this.params,\n        $inputEl = this.$inputEl;\n      var view;\n      if (params.view) {\n        view = params.view;\n      } else if ($inputEl) {\n        view = $inputEl.parents('.view').length && $inputEl.parents('.view')[0].f7View;\n      }\n      if (!view) view = app.views.main;\n      return view;\n    }\n  }, {\n    key: \"initInput\",\n    value: function initInput() {\n      var picker = this;\n      if (!picker.$inputEl) return;\n      if (picker.params.inputReadOnly) picker.$inputEl.prop('readOnly', true);\n    }\n  }, {\n    key: \"resizeCols\",\n    value: function resizeCols() {\n      var picker = this;\n      if (!picker.opened) return;\n      for (var i = 0; i < picker.cols.length; i += 1) {\n        if (!picker.cols[i].divider) {\n          picker.cols[i].calcSize();\n          picker.cols[i].setValue(picker.cols[i].value, 0, false);\n        }\n      }\n    }\n  }, {\n    key: \"isPopover\",\n    value: function isPopover() {\n      var picker = this;\n      var app = picker.app,\n        modal = picker.modal,\n        params = picker.params;\n      if (params.openIn === 'sheet') return false;\n      if (modal && modal.type !== 'popover') return false;\n      if (!picker.inline && picker.inputEl) {\n        if (params.openIn === 'popover') return true;\n        if (app.device.ios) {\n          return !!app.device.ipad;\n        }\n        if (app.width >= 768) {\n          return true;\n        }\n        if (app.device.desktop && app.theme === 'aurora') {\n          return true;\n        }\n      }\n      return false;\n    }\n  }, {\n    key: \"formatValue\",\n    value: function formatValue() {\n      var picker = this;\n      var value = picker.value,\n        displayValue = picker.displayValue;\n      if (picker.params.formatValue) {\n        return picker.params.formatValue.call(picker, value, displayValue);\n      }\n      return value.join(' ');\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(values, transition) {\n      var picker = this;\n      var valueIndex = 0;\n      if (picker.cols.length === 0) {\n        picker.value = values;\n        picker.updateValue(values);\n        return;\n      }\n      for (var i = 0; i < picker.cols.length; i += 1) {\n        if (picker.cols[i] && !picker.cols[i].divider) {\n          picker.cols[i].setValue(values[valueIndex], transition);\n          valueIndex += 1;\n        }\n      }\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var picker = this;\n      return picker.value;\n    }\n  }, {\n    key: \"updateValue\",\n    value: function updateValue(forceValues) {\n      var picker = this;\n      var newValue = forceValues || [];\n      var newDisplayValue = [];\n      var column;\n      if (picker.cols.length === 0) {\n        var noDividerColumns = picker.params.cols.filter(function (c) {\n          return !c.divider;\n        });\n        for (var i = 0; i < noDividerColumns.length; i += 1) {\n          column = noDividerColumns[i];\n          if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== -1) {\n            newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]);\n          } else {\n            newDisplayValue.push(newValue[i]);\n          }\n        }\n      } else {\n        for (var _i = 0; _i < picker.cols.length; _i += 1) {\n          if (!picker.cols[_i].divider) {\n            newValue.push(picker.cols[_i].value);\n            newDisplayValue.push(picker.cols[_i].displayValue);\n          }\n        }\n      }\n      if (newValue.indexOf(undefined) >= 0) {\n        return;\n      }\n      picker.value = newValue;\n      picker.displayValue = newDisplayValue;\n      picker.emit('local::change pickerChange', picker, picker.value, picker.displayValue);\n      if (picker.inputEl) {\n        picker.$inputEl.val(picker.formatValue());\n        picker.$inputEl.trigger('change');\n      }\n    }\n  }, {\n    key: \"initColumn\",\n    value: function initColumn(colEl, updateItems) {\n      var picker = this;\n      picker_column.call(picker, colEl, updateItems);\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"destroyColumn\",\n    value: function destroyColumn(colEl) {\n      var picker = this;\n      var $colEl = Object(dom7_module[\"default\"])(colEl);\n      var index = $colEl.index();\n      if (picker.cols[index] && picker.cols[index].destroy) {\n        picker.cols[index].destroy();\n      }\n    }\n  }, {\n    key: \"renderToolbar\",\n    value: function renderToolbar() {\n      var picker = this;\n      if (picker.params.renderToolbar) return picker.params.renderToolbar.call(picker, picker);\n      return \"\\n      <div class=\\\"toolbar toolbar-top no-shadow\\\">\\n        <div class=\\\"toolbar-inner\\\">\\n          <div class=\\\"left\\\"></div>\\n          <div class=\\\"right\\\">\\n            <a class=\\\"link sheet-close popover-close\\\">\".concat(picker.params.toolbarCloseText, \"</a>\\n          </div>\\n        </div>\\n      </div>\\n    \").trim();\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"renderColumn\",\n    value: function renderColumn(col, onlyItems) {\n      var colClasses = \"picker-column \".concat(col.textAlign ? \"picker-column-\".concat(col.textAlign) : '', \" \").concat(col.cssClass || '');\n      var columnHtml;\n      var columnItemsHtml;\n      if (col.divider) {\n        columnHtml = \"\\n        <div class=\\\"\".concat(colClasses, \" picker-column-divider\\\">\").concat(col.content, \"</div>\\n      \");\n      } else {\n        columnItemsHtml = col.values.map(function (value, index) {\n          return \"\\n        <div class=\\\"picker-item\\\" data-picker-value=\\\"\".concat(value, \"\\\">\\n          <span>\").concat(col.displayValues ? col.displayValues[index] : value, \"</span>\\n        </div>\\n      \");\n        }).join('');\n        columnHtml = \"\\n        <div class=\\\"\".concat(colClasses, \"\\\">\\n          <div class=\\\"picker-items\\\">\").concat(columnItemsHtml, \"</div>\\n        </div>\\n      \");\n      }\n      return onlyItems ? columnItemsHtml.trim() : columnHtml.trim();\n    }\n  }, {\n    key: \"renderInline\",\n    value: function renderInline() {\n      var picker = this;\n      var _picker$params = picker.params,\n        rotateEffect = _picker$params.rotateEffect,\n        cssClass = _picker$params.cssClass,\n        toolbar = _picker$params.toolbar;\n      var inlineHtml = \"\\n      <div class=\\\"picker picker-inline \".concat(rotateEffect ? 'picker-3d' : '', \" \").concat(cssClass || '', \"\\\">\\n        \").concat(toolbar ? picker.renderToolbar() : '', \"\\n        <div class=\\\"picker-columns\\\">\\n          \").concat(picker.cols.map(function (col) {\n        return picker.renderColumn(col);\n      }).join(''), \"\\n          <div class=\\\"picker-center-highlight\\\"></div>\\n        </div>\\n      </div>\\n    \").trim();\n      return inlineHtml;\n    }\n  }, {\n    key: \"renderSheet\",\n    value: function renderSheet() {\n      var picker = this;\n      var _picker$params2 = picker.params,\n        rotateEffect = _picker$params2.rotateEffect,\n        cssClass = _picker$params2.cssClass,\n        toolbar = _picker$params2.toolbar;\n      var sheetHtml = \"\\n      <div class=\\\"sheet-modal picker picker-sheet \".concat(rotateEffect ? 'picker-3d' : '', \" \").concat(cssClass || '', \"\\\">\\n        \").concat(toolbar ? picker.renderToolbar() : '', \"\\n        <div class=\\\"sheet-modal-inner picker-columns\\\">\\n          \").concat(picker.cols.map(function (col) {\n        return picker.renderColumn(col);\n      }).join(''), \"\\n          <div class=\\\"picker-center-highlight\\\"></div>\\n        </div>\\n      </div>\\n    \").trim();\n      return sheetHtml;\n    }\n  }, {\n    key: \"renderPopover\",\n    value: function renderPopover() {\n      var picker = this;\n      var _picker$params3 = picker.params,\n        rotateEffect = _picker$params3.rotateEffect,\n        cssClass = _picker$params3.cssClass,\n        toolbar = _picker$params3.toolbar;\n      var popoverHtml = \"\\n      <div class=\\\"popover picker-popover\\\">\\n        <div class=\\\"popover-inner\\\">\\n          <div class=\\\"picker \".concat(rotateEffect ? 'picker-3d' : '', \" \").concat(cssClass || '', \"\\\">\\n            \").concat(toolbar ? picker.renderToolbar() : '', \"\\n            <div class=\\\"picker-columns\\\">\\n              \").concat(picker.cols.map(function (col) {\n        return picker.renderColumn(col);\n      }).join(''), \"\\n              <div class=\\\"picker-center-highlight\\\"></div>\\n            </div>\\n          </div>\\n        </div>\\n      </div>\\n    \").trim();\n      return popoverHtml;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var picker = this;\n      if (picker.params.render) return picker.params.render.call(picker);\n      if (!picker.inline) {\n        if (picker.isPopover()) return picker.renderPopover();\n        return picker.renderSheet();\n      }\n      return picker.renderInline();\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen() {\n      var picker = this;\n      var initialized = picker.initialized,\n        $el = picker.$el,\n        app = picker.app,\n        $inputEl = picker.$inputEl,\n        inline = picker.inline,\n        value = picker.value,\n        params = picker.params;\n      picker.opened = true;\n      picker.closing = false;\n      picker.opening = true;\n\n      // Init main events\n      picker.attachResizeEvent();\n\n      // Init cols\n      $el.find('.picker-column').each(function (index, colEl) {\n        var updateItems = true;\n        if (!initialized && params.value || initialized && value) {\n          updateItems = false;\n        }\n        picker.initColumn(colEl, updateItems);\n      });\n\n      // Set value\n      if (!initialized) {\n        if (value) picker.setValue(value, 0);else if (params.value) {\n          picker.setValue(params.value, 0);\n        }\n      } else if (value) {\n        picker.setValue(value, 0);\n      }\n\n      // Extra focus\n      if (!inline && $inputEl && $inputEl.length && app.theme === 'md') {\n        $inputEl.trigger('focus');\n      }\n      picker.initialized = true;\n\n      // Trigger events\n      if ($el) {\n        $el.trigger('picker:open');\n      }\n      if ($inputEl) {\n        $inputEl.trigger('picker:open');\n      }\n      picker.emit('local::open pickerOpen', picker);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var picker = this;\n      picker.opening = false;\n      if (picker.$el) {\n        picker.$el.trigger('picker:opened');\n      }\n      if (picker.$inputEl) {\n        picker.$inputEl.trigger('picker:opened');\n      }\n      picker.emit('local::opened pickerOpened', picker);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var picker = this;\n      var app = picker.app;\n      picker.opening = false;\n      picker.closing = true;\n\n      // Detach events\n      picker.detachResizeEvent();\n      picker.cols.forEach(function (col) {\n        if (col.destroy) col.destroy();\n      });\n      if (picker.$inputEl) {\n        if (app.theme === 'md') {\n          picker.$inputEl.trigger('blur');\n        } else {\n          var validate = picker.$inputEl.attr('validate');\n          var required = picker.$inputEl.attr('required');\n          if (validate && required) {\n            app.input.validate(picker.$inputEl);\n          }\n        }\n      }\n      if (picker.$el) {\n        picker.$el.trigger('picker:close');\n      }\n      if (picker.$inputEl) {\n        picker.$inputEl.trigger('picker:close');\n      }\n      picker.emit('local::close pickerClose', picker);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var picker = this;\n      picker.opened = false;\n      picker.closing = false;\n      if (!picker.inline) {\n        utils[\"default\"].nextTick(function () {\n          if (picker.modal && picker.modal.el && picker.modal.destroy) {\n            if (!picker.params.routableModals) {\n              picker.modal.destroy();\n            }\n          }\n          delete picker.modal;\n        });\n      }\n      if (picker.$el) {\n        picker.$el.trigger('picker:closed');\n      }\n      if (picker.$inputEl) {\n        picker.$inputEl.trigger('picker:closed');\n      }\n      picker.emit('local::closed pickerClosed', picker);\n    }\n  }, {\n    key: \"open\",\n    value: function open() {\n      var picker = this;\n      var app = picker.app,\n        opened = picker.opened,\n        inline = picker.inline,\n        $inputEl = picker.$inputEl,\n        $scrollToEl = picker.$scrollToEl,\n        params = picker.params;\n      if (opened) return;\n      if (picker.cols.length === 0 && params.cols.length) {\n        params.cols.forEach(function (col) {\n          picker.cols.push(col);\n        });\n      }\n      if (inline) {\n        picker.$el = Object(dom7_module[\"default\"])(picker.render());\n        picker.$el[0].f7Picker = picker;\n        picker.$containerEl.append(picker.$el);\n        picker.onOpen();\n        picker.onOpened();\n        return;\n      }\n      var isPopover = picker.isPopover();\n      var modalType = isPopover ? 'popover' : 'sheet';\n      var modalParams = {\n        targetEl: $inputEl,\n        scrollToEl: $scrollToEl,\n        content: picker.render(),\n        backdrop: typeof params.backdrop !== 'undefined' ? params.backdrop : isPopover,\n        on: {\n          open: function open() {\n            var modal = this;\n            picker.modal = modal;\n            picker.$el = isPopover ? modal.$el.find('.picker') : modal.$el;\n            picker.$el[0].f7Picker = picker;\n            picker.onOpen();\n          },\n          opened: function opened() {\n            picker.onOpened();\n          },\n          close: function close() {\n            picker.onClose();\n          },\n          closed: function closed() {\n            picker.onClosed();\n          }\n        }\n      };\n      if (modalType === 'sheet') {\n        modalParams.push = params.sheetPush;\n        modalParams.swipeToClose = params.sheetSwipeToClose;\n      }\n      if (params.routableModals && picker.view) {\n        picker.view.router.navigate({\n          url: picker.url,\n          route: defineProperty_default()({\n            path: picker.url\n          }, modalType, modalParams)\n        });\n      } else {\n        picker.modal = app[modalType].create(modalParams);\n        picker.modal.open();\n      }\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var picker = this;\n      var opened = picker.opened,\n        inline = picker.inline;\n      if (!opened) return;\n      if (inline) {\n        picker.onClose();\n        picker.onClosed();\n        return;\n      }\n      if (picker.params.routableModals && picker.view) {\n        picker.view.router.back();\n      } else {\n        picker.modal.close();\n      }\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var picker = this;\n      picker.initInput();\n      if (picker.inline) {\n        picker.open();\n        picker.emit('local::init pickerInit', picker);\n        return;\n      }\n      if (!picker.initialized && picker.params.value) {\n        picker.setValue(picker.params.value);\n      }\n\n      // Attach input Events\n      if (picker.$inputEl) {\n        picker.attachInputEvents();\n      }\n      if (picker.params.closeByOutsideClick) {\n        picker.attachHtmlEvents();\n      }\n      picker.emit('local::init pickerInit', picker);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var picker = this;\n      if (picker.destroyed) return;\n      var $el = picker.$el;\n      picker.emit('local::beforeDestroy pickerBeforeDestroy', picker);\n      if ($el) $el.trigger('picker:beforedestroy');\n      picker.close();\n\n      // Detach Events\n      if (picker.$inputEl) {\n        picker.detachInputEvents();\n      }\n      if (picker.params.closeByOutsideClick) {\n        picker.detachHtmlEvents();\n      }\n      if ($el && $el.length) delete picker.$el[0].f7Picker;\n      utils[\"default\"].deleteProps(picker);\n      picker.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var picker_class = (picker_class_Picker);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/picker/picker.js\n\n\n\n/* harmony default export */ var picker_picker = ({\n  name: 'picker',\n  static: {\n    Picker: picker_class\n  },\n  create: function create() {\n    var app = this;\n    app.picker = constructor_methods({\n      defaultSelector: '.picker',\n      constructor: picker_class,\n      app: app,\n      domProp: 'f7Picker'\n    });\n    app.picker.close = function close() {\n      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.picker';\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return;\n      var picker = $el[0].f7Picker;\n      if (!picker || picker && !picker.opened) return;\n      picker.close();\n    };\n  },\n  params: {\n    picker: {\n      // Picker settings\n      updateValuesOnMomentum: false,\n      updateValuesOnTouchmove: true,\n      updateValuesOnMousewheel: true,\n      mousewheel: true,\n      rotateEffect: false,\n      momentumRatio: 7,\n      freeMode: false,\n      cols: [],\n      // Common opener settings\n      containerEl: null,\n      openIn: 'auto',\n      // or 'popover' or 'sheet'\n      sheetPush: false,\n      sheetSwipeToClose: undefined,\n      backdrop: undefined,\n      // uses Popover or Sheet defaults\n      formatValue: null,\n      inputEl: null,\n      inputReadOnly: true,\n      closeByOutsideClick: true,\n      scrollToInput: true,\n      scrollToEl: undefined,\n      toolbar: true,\n      toolbarCloseText: 'Done',\n      cssClass: null,\n      routableModals: true,\n      view: null,\n      url: 'select/',\n      // Render functions\n      renderToolbar: null,\n      render: null\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/infinite-scroll/infinite-scroll.js\n\n\nvar InfiniteScroll = {\n  handleScroll: function handleScroll(el, e) {\n    var app = this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var scrollTop = $el[0].scrollTop;\n    var scrollHeight = $el[0].scrollHeight;\n    var height = $el[0].offsetHeight;\n    var distance = $el[0].getAttribute('data-infinite-distance');\n    var virtualListContainer = $el.find('.virtual-list');\n    var virtualList;\n    var onTop = $el.hasClass('infinite-scroll-top');\n    if (!distance) distance = 50;\n    if (typeof distance === 'string' && distance.indexOf('%') >= 0) {\n      distance = parseInt(distance, 10) / 100 * height;\n    }\n    if (distance > height) distance = height;\n    if (onTop) {\n      if (scrollTop < distance) {\n        $el.trigger('infinite', e);\n        app.emit('infinite', $el[0], e);\n      }\n    } else if (scrollTop + height >= scrollHeight - distance) {\n      if (virtualListContainer.length > 0) {\n        virtualList = virtualListContainer.eq(-1)[0].f7VirtualList;\n        if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) {\n          return;\n        }\n      }\n      $el.trigger('infinite', e);\n      app.emit('infinite', $el[0], e);\n    }\n  },\n  create: function create(el) {\n    var $el = Object(dom7_module[\"default\"])(el);\n    var app = this;\n    function scrollHandler(e) {\n      app.infiniteScroll.handle(this, e);\n    }\n    $el.each(function (index, element) {\n      element.f7InfiniteScrollHandler = scrollHandler;\n      element.addEventListener('scroll', element.f7InfiniteScrollHandler);\n    });\n  },\n  destroy: function destroy(el) {\n    var $el = Object(dom7_module[\"default\"])(el);\n    $el.each(function (index, element) {\n      element.removeEventListener('scroll', element.f7InfiniteScrollHandler);\n      delete element.f7InfiniteScrollHandler;\n    });\n  }\n};\n/* harmony default export */ var infinite_scroll = ({\n  name: 'infiniteScroll',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      infiniteScroll: {\n        handle: InfiniteScroll.handleScroll.bind(app),\n        create: InfiniteScroll.create.bind(app),\n        destroy: InfiniteScroll.destroy.bind(app)\n      }\n    });\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      var $isEls = $tabEl.find('.infinite-scroll-content');\n      if ($tabEl.is('.infinite-scroll-content')) $isEls.add($tabEl);\n      $isEls.each(function (index, el) {\n        app.infiniteScroll.create(el);\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      var app = this;\n      var $isEls = $tabEl.find('.infinite-scroll-content');\n      if ($tabEl.is('.infinite-scroll-content')) $isEls.add($tabEl);\n      $isEls.each(function (index, el) {\n        app.infiniteScroll.destroy(el);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.infinite-scroll-content').each(function (index, el) {\n        app.infiniteScroll.create(el);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.infinite-scroll-content').each(function (index, el) {\n        app.infiniteScroll.destroy(el);\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/pull-to-refresh/pull-to-refresh-class.js\n\n\n\n\n\nfunction pull_to_refresh_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, pull_to_refresh_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction pull_to_refresh_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (pull_to_refresh_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\nvar pull_to_refresh_class_PullToRefresh = /*#__PURE__*/function (_Framework7Class) {\n  function PullToRefresh(app, el) {\n    var _this;\n    classCallCheck_default()(this, PullToRefresh);\n    _this = pull_to_refresh_class_callSuper(this, PullToRefresh, [{}, [app]]);\n    var ptr = _this;\n    var $el = Object(dom7_module[\"default\"])(el);\n    var $preloaderEl = $el.find('.ptr-preloader');\n    ptr.$el = $el;\n    ptr.el = $el[0];\n    ptr.app = app;\n    ptr.bottom = ptr.$el.hasClass('ptr-bottom');\n\n    // Extend defaults with modules params\n    ptr.useModulesParams({});\n    var isMaterial = app.theme === 'md';\n    var isIos = app.theme === 'ios';\n    var isAurora = app.theme === 'aurora';\n\n    // Done\n    ptr.done = function done() {\n      var $transitionTarget = isMaterial ? $preloaderEl : $el;\n      $transitionTarget.transitionEnd(function () {\n        $el.removeClass('ptr-transitioning ptr-pull-up ptr-pull-down ptr-closing');\n        $el.trigger('ptr:done');\n        ptr.emit('local::done ptrDone', $el[0]);\n      });\n      $el.removeClass('ptr-refreshing').addClass('ptr-transitioning ptr-closing');\n      return ptr;\n    };\n    ptr.refresh = function refresh() {\n      if ($el.hasClass('ptr-refreshing')) return ptr;\n      $el.addClass('ptr-transitioning ptr-refreshing');\n      $el.trigger('ptr:refresh', ptr.done);\n      ptr.emit('local::refresh ptrRefresh', $el[0], ptr.done);\n      return ptr;\n    };\n\n    // Mousewheel\n    ptr.mousewheel = $el.attr('data-ptr-mousewheel') === 'true';\n\n    // Events handling\n    var touchId;\n    var isTouched;\n    var isMoved;\n    var touchesStart = {};\n    var isScrolling;\n    var touchesDiff;\n    var refresh = false;\n    var useTranslate = false;\n    var forceUseTranslate = false;\n    var startTranslate = 0;\n    var translate;\n    var scrollTop;\n    var wasScrolled;\n    var triggerDistance;\n    var dynamicTriggerDistance;\n    var pullStarted;\n    var hasNavbar = false;\n    var scrollHeight;\n    var offsetHeight;\n    var maxScrollTop;\n    var $pageEl = $el.parents('.page');\n    if ($pageEl.find('.navbar').length > 0 || $pageEl.parents('.view').children('.navbars').length > 0) hasNavbar = true;\n    if ($pageEl.hasClass('no-navbar')) hasNavbar = false;\n    if (!ptr.bottom) {\n      var pageNavbarEl = app.navbar.getElByPage($pageEl[0]);\n      if (pageNavbarEl) {\n        var $pageNavbarEl = Object(dom7_module[\"default\"])(pageNavbarEl);\n        var isLargeTransparent = $pageNavbarEl.hasClass('navbar-large-transparent') || $pageNavbarEl.hasClass('navbar-large') && $pageNavbarEl.hasClass('navbar-transparent');\n        var isTransparent = $pageNavbarEl.hasClass('navbar-transparent') && !$pageNavbarEl.hasClass('navbar-large');\n        if (isLargeTransparent) {\n          $el.addClass('ptr-with-navbar-large-transparent');\n        } else if (isTransparent) {\n          $el.addClass('ptr-with-navbar-transparent');\n        }\n      }\n    }\n    if (!hasNavbar && !ptr.bottom) $el.addClass('ptr-no-navbar');\n\n    // Define trigger distance\n    if ($el.attr('data-ptr-distance')) {\n      dynamicTriggerDistance = true;\n    } else if (isMaterial) {\n      triggerDistance = 66;\n    } else if (isIos) {\n      triggerDistance = 44;\n    } else if (isAurora) {\n      triggerDistance = 38;\n    }\n    function handleTouchStart(e) {\n      if (isTouched) {\n        if (device[\"default\"].os === 'android') {\n          if ('targetTouches' in e && e.targetTouches.length > 1) return;\n        } else return;\n      }\n      if ($el.hasClass('ptr-refreshing')) {\n        return;\n      }\n      if (Object(dom7_module[\"default\"])(e.target).closest('.sortable-handler, .ptr-ignore, .card-expandable.card-opened').length) return;\n      isMoved = false;\n      pullStarted = false;\n      isTouched = true;\n      isScrolling = undefined;\n      wasScrolled = undefined;\n      if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var pageX;\n      var pageY;\n      var touch;\n      if (e.type === 'touchmove') {\n        if (touchId && e.touches) {\n          for (var i = 0; i < e.touches.length; i += 1) {\n            if (e.touches[i].identifier === touchId) {\n              touch = e.touches[i];\n            }\n          }\n        }\n        if (!touch) touch = e.targetTouches[0];\n        pageX = touch.pageX;\n        pageY = touch.pageY;\n      } else {\n        pageX = e.pageX;\n        pageY = e.pageY;\n      }\n      if (!pageX || !pageY) return;\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n      }\n      if (!isScrolling) {\n        isTouched = false;\n        return;\n      }\n      scrollTop = $el[0].scrollTop;\n      if (!isMoved) {\n        $el.removeClass('ptr-transitioning');\n        var targetIsScrollable;\n        scrollHeight = $el[0].scrollHeight;\n        offsetHeight = $el[0].offsetHeight;\n        if (ptr.bottom) {\n          maxScrollTop = scrollHeight - offsetHeight;\n        }\n        if (scrollTop > scrollHeight) {\n          isTouched = false;\n          return;\n        }\n        var $ptrWatchScrollable = Object(dom7_module[\"default\"])(e.target).closest('.ptr-watch-scroll');\n        if ($ptrWatchScrollable.length) {\n          $ptrWatchScrollable.each(function (ptrScrollableIndex, ptrScrollableEl) {\n            if (ptrScrollableEl === el) return;\n            if (ptrScrollableEl.scrollHeight > ptrScrollableEl.offsetHeight && Object(dom7_module[\"default\"])(ptrScrollableEl).css('overflow') === 'auto' && (!ptr.bottom && ptrScrollableEl.scrollTop > 0 || ptr.bottom && ptrScrollableEl.scrollTop < ptrScrollableEl.scrollHeight - ptrScrollableEl.offsetHeight)) {\n              targetIsScrollable = true;\n            }\n          });\n        }\n        if (targetIsScrollable) {\n          isTouched = false;\n          return;\n        }\n        if (dynamicTriggerDistance) {\n          triggerDistance = $el.attr('data-ptr-distance');\n          if (triggerDistance.indexOf('%') >= 0) triggerDistance = scrollHeight * parseInt(triggerDistance, 10) / 100;\n        }\n        startTranslate = $el.hasClass('ptr-refreshing') ? triggerDistance : 0;\n        if (scrollHeight === offsetHeight || device[\"default\"].os !== 'ios' || isMaterial) {\n          useTranslate = true;\n        } else {\n          useTranslate = false;\n        }\n        forceUseTranslate = false;\n      }\n      isMoved = true;\n      touchesDiff = pageY - touchesStart.y;\n      if (typeof wasScrolled === 'undefined' && (ptr.bottom ? scrollTop !== maxScrollTop : scrollTop !== 0)) wasScrolled = true;\n      var ptrStarted = ptr.bottom ? touchesDiff < 0 && scrollTop >= maxScrollTop || scrollTop > maxScrollTop : touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0;\n      if (ptrStarted) {\n        // iOS 8 fix\n        if (device[\"default\"].os === 'ios' && parseInt(device[\"default\"].osVersion.split('.')[0], 10) > 7) {\n          if (!ptr.bottom && scrollTop === 0 && !wasScrolled) useTranslate = true;\n          if (ptr.bottom && scrollTop === maxScrollTop && !wasScrolled) useTranslate = true;\n        }\n        if (!useTranslate && ptr.bottom && !isMaterial) {\n          $el.css('-webkit-overflow-scrolling', 'auto');\n          $el.scrollTop(maxScrollTop);\n          forceUseTranslate = true;\n        }\n        if (useTranslate || forceUseTranslate) {\n          if (e.cancelable) {\n            e.preventDefault();\n          }\n          translate = (ptr.bottom ? -1 * Math.pow(Math.abs(touchesDiff), 0.85) : Math.pow(touchesDiff, 0.85)) + startTranslate;\n          if (isMaterial) {\n            $preloaderEl.transform(\"translate3d(0,\".concat(translate, \"px,0)\")).find('.ptr-arrow').transform(\"rotate(\".concat(180 * (Math.abs(touchesDiff) / 66) + 100, \"deg)\"));\n          } else {\n            // eslint-disable-next-line\n            if (ptr.bottom) {\n              $el.children().transform(\"translate3d(0,\".concat(translate, \"px,0)\"));\n            } else {\n              $el.transform(\"translate3d(0,\".concat(translate, \"px,0)\"));\n            }\n          }\n        }\n        if ((useTranslate || forceUseTranslate) && Math.pow(Math.abs(touchesDiff), 0.85) > triggerDistance || !useTranslate && Math.abs(touchesDiff) >= triggerDistance * 2) {\n          refresh = true;\n          $el.addClass('ptr-pull-up').removeClass('ptr-pull-down');\n        } else {\n          refresh = false;\n          $el.removeClass('ptr-pull-up').addClass('ptr-pull-down');\n        }\n        if (!pullStarted) {\n          $el.trigger('ptr:pullstart');\n          ptr.emit('local::pullStart ptrPullStart', $el[0]);\n          pullStarted = true;\n        }\n        $el.trigger('ptr:pullmove', {\n          event: e,\n          scrollTop: scrollTop,\n          translate: translate,\n          touchesDiff: touchesDiff\n        });\n        ptr.emit('local::pullMove ptrPullMove', $el[0], {\n          event: e,\n          scrollTop: scrollTop,\n          translate: translate,\n          touchesDiff: touchesDiff\n        });\n      } else {\n        pullStarted = false;\n        $el.removeClass('ptr-pull-up ptr-pull-down');\n        refresh = false;\n      }\n    }\n    function handleTouchEnd(e) {\n      if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) {\n        if (e.changedTouches[0].identifier !== touchId) {\n          isTouched = false;\n          isScrolling = false;\n          isMoved = false;\n          touchId = null;\n          return;\n        }\n      }\n      if (!isTouched || !isMoved) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      if (translate) {\n        $el.addClass('ptr-transitioning');\n        translate = 0;\n      }\n      if (isMaterial) {\n        $preloaderEl.transform('').find('.ptr-arrow').transform('');\n      } else {\n        // eslint-disable-next-line\n        if (ptr.bottom) {\n          $el.children().transform('');\n        } else {\n          $el.transform('');\n        }\n      }\n      if (!useTranslate && ptr.bottom && !isMaterial) {\n        $el.css('-webkit-overflow-scrolling', '');\n      }\n      if (refresh) {\n        $el.addClass('ptr-refreshing');\n        $el.trigger('ptr:refresh', ptr.done);\n        ptr.emit('local::refresh ptrRefresh', $el[0], ptr.done);\n      } else {\n        $el.removeClass('ptr-pull-down');\n      }\n      isTouched = false;\n      isMoved = false;\n      if (pullStarted) {\n        $el.trigger('ptr:pullend');\n        ptr.emit('local::pullEnd ptrPullEnd', $el[0]);\n      }\n    }\n    var mousewheelTimeout;\n    var mousewheelMoved;\n    var mousewheelAllow = true;\n    var mousewheelTranslate = 0;\n    function handleMouseWheelRelease() {\n      mousewheelAllow = true;\n      mousewheelMoved = false;\n      mousewheelTranslate = 0;\n      if (translate) {\n        $el.addClass('ptr-transitioning');\n        translate = 0;\n      }\n      if (isMaterial) {\n        $preloaderEl.transform('').find('.ptr-arrow').transform('');\n      } else {\n        // eslint-disable-next-line\n        if (ptr.bottom) {\n          $el.children().transform('');\n        } else {\n          $el.transform('');\n        }\n      }\n      if (refresh) {\n        $el.addClass('ptr-refreshing');\n        $el.trigger('ptr:refresh', ptr.done);\n        ptr.emit('local::refresh ptrRefresh', $el[0], ptr.done);\n      } else {\n        $el.removeClass('ptr-pull-down');\n      }\n      if (pullStarted) {\n        $el.trigger('ptr:pullend');\n        ptr.emit('local::pullEnd ptrPullEnd', $el[0]);\n      }\n    }\n    function handleMouseWheel(e) {\n      if (!mousewheelAllow) return;\n      var deltaX = e.deltaX,\n        deltaY = e.deltaY;\n      if (Math.abs(deltaX) > Math.abs(deltaY)) return;\n      if ($el.hasClass('ptr-refreshing')) {\n        return;\n      }\n      if (Object(dom7_module[\"default\"])(e.target).closest('.sortable-handler, .ptr-ignore, .card-expandable.card-opened').length) return;\n      clearTimeout(mousewheelTimeout);\n      scrollTop = $el[0].scrollTop;\n      if (!mousewheelMoved) {\n        $el.removeClass('ptr-transitioning');\n        var targetIsScrollable;\n        scrollHeight = $el[0].scrollHeight;\n        offsetHeight = $el[0].offsetHeight;\n        if (ptr.bottom) {\n          maxScrollTop = scrollHeight - offsetHeight;\n        }\n        if (scrollTop > scrollHeight) {\n          mousewheelAllow = false;\n          return;\n        }\n        var $ptrWatchScrollable = Object(dom7_module[\"default\"])(e.target).closest('.ptr-watch-scroll');\n        if ($ptrWatchScrollable.length) {\n          $ptrWatchScrollable.each(function (ptrScrollableIndex, ptrScrollableEl) {\n            if (ptrScrollableEl === el) return;\n            if (ptrScrollableEl.scrollHeight > ptrScrollableEl.offsetHeight && Object(dom7_module[\"default\"])(ptrScrollableEl).css('overflow') === 'auto' && (!ptr.bottom && ptrScrollableEl.scrollTop > 0 || ptr.bottom && ptrScrollableEl.scrollTop < ptrScrollableEl.scrollHeight - ptrScrollableEl.offsetHeight)) {\n              targetIsScrollable = true;\n            }\n          });\n        }\n        if (targetIsScrollable) {\n          mousewheelAllow = false;\n          return;\n        }\n        if (dynamicTriggerDistance) {\n          triggerDistance = $el.attr('data-ptr-distance');\n          if (triggerDistance.indexOf('%') >= 0) triggerDistance = scrollHeight * parseInt(triggerDistance, 10) / 100;\n        }\n      }\n      isMoved = true;\n      mousewheelTranslate -= deltaY;\n      touchesDiff = mousewheelTranslate; // pageY - touchesStart.y;\n\n      if (typeof wasScrolled === 'undefined' && (ptr.bottom ? scrollTop !== maxScrollTop : scrollTop !== 0)) wasScrolled = true;\n      var ptrStarted = ptr.bottom ? touchesDiff < 0 && scrollTop >= maxScrollTop || scrollTop > maxScrollTop : touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0;\n      if (ptrStarted) {\n        if (e.cancelable) {\n          e.preventDefault();\n        }\n        translate = touchesDiff;\n        if (Math.abs(translate) > triggerDistance) {\n          translate = triggerDistance + Math.pow(Math.abs(translate) - triggerDistance, 0.7);\n          if (ptr.bottom) translate = -translate;\n        }\n        if (isMaterial) {\n          $preloaderEl.transform(\"translate3d(0,\".concat(translate, \"px,0)\")).find('.ptr-arrow').transform(\"rotate(\".concat(180 * (Math.abs(touchesDiff) / 66) + 100, \"deg)\"));\n        } else {\n          // eslint-disable-next-line\n          if (ptr.bottom) {\n            $el.children().transform(\"translate3d(0,\".concat(translate, \"px,0)\"));\n          } else {\n            $el.transform(\"translate3d(0,\".concat(translate, \"px,0)\"));\n          }\n        }\n        if (Math.abs(translate) > triggerDistance) {\n          refresh = true;\n          $el.addClass('ptr-pull-up').removeClass('ptr-pull-down');\n        } else {\n          refresh = false;\n          $el.removeClass('ptr-pull-up').addClass('ptr-pull-down');\n        }\n        if (!pullStarted) {\n          $el.trigger('ptr:pullstart');\n          ptr.emit('local::pullStart ptrPullStart', $el[0]);\n          pullStarted = true;\n        }\n        $el.trigger('ptr:pullmove', {\n          event: e,\n          scrollTop: scrollTop,\n          translate: translate,\n          touchesDiff: touchesDiff\n        });\n        ptr.emit('local::pullMove ptrPullMove', $el[0], {\n          event: e,\n          scrollTop: scrollTop,\n          translate: translate,\n          touchesDiff: touchesDiff\n        });\n      } else {\n        pullStarted = false;\n        $el.removeClass('ptr-pull-up ptr-pull-down');\n        refresh = false;\n      }\n      mousewheelTimeout = setTimeout(handleMouseWheelRelease, 300);\n    }\n    if (!$pageEl.length || !$el.length) return possibleConstructorReturn_default()(_this, ptr);\n    $el[0].f7PullToRefresh = ptr;\n\n    // Events\n    ptr.attachEvents = function attachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      $el.on(app.touchEvents.start, handleTouchStart, passive);\n      app.on('touchmove:active', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n      if (ptr.mousewheel && !ptr.bottom) {\n        $el.on('wheel', handleMouseWheel);\n      }\n    };\n    ptr.detachEvents = function detachEvents() {\n      var passive = utils_support[\"default\"].passiveListener ? {\n        passive: true\n      } : false;\n      $el.off(app.touchEvents.start, handleTouchStart, passive);\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      if (ptr.mousewheel && !ptr.bottom) {\n        $el.off('wheel', handleMouseWheel);\n      }\n    };\n\n    // Install Modules\n    ptr.useModules();\n\n    // Init\n    ptr.init();\n    return possibleConstructorReturn_default()(_this, ptr);\n  }\n  inherits_default()(PullToRefresh, _Framework7Class);\n  return createClass_default()(PullToRefresh, [{\n    key: \"init\",\n    value: function init() {\n      var ptr = this;\n      ptr.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var ptr = this;\n      ptr.emit('local::beforeDestroy ptrBeforeDestroy', ptr);\n      ptr.$el.trigger('ptr:beforedestroy');\n      delete ptr.el.f7PullToRefresh;\n      ptr.detachEvents();\n      utils[\"default\"].deleteProps(ptr);\n      ptr = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var pull_to_refresh_class = (pull_to_refresh_class_PullToRefresh);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/pull-to-refresh/pull-to-refresh.js\n\n\n\n\n/* harmony default export */ var pull_to_refresh = ({\n  name: 'pullToRefresh',\n  create: function create() {\n    var app = this;\n    app.ptr = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: '.ptr-content',\n      constructor: pull_to_refresh_class,\n      app: app,\n      domProp: 'f7PullToRefresh'\n    }), {\n      done: function done(el) {\n        var ptr = app.ptr.get(el);\n        if (ptr) return ptr.done();\n        return undefined;\n      },\n      refresh: function refresh(el) {\n        var ptr = app.ptr.get(el);\n        if (ptr) return ptr.refresh();\n        return undefined;\n      }\n    });\n  },\n  static: {\n    PullToRefresh: pull_to_refresh_class\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      var $ptrEls = $tabEl.find('.ptr-content');\n      if ($tabEl.is('.ptr-content')) $ptrEls.add($tabEl);\n      $ptrEls.each(function (index, el) {\n        app.ptr.create(el);\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      var app = this;\n      var $ptrEls = $tabEl.find('.ptr-content');\n      if ($tabEl.is('.ptr-content')) $ptrEls.add($tabEl);\n      $ptrEls.each(function (index, el) {\n        app.ptr.destroy(el);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.ptr-content').each(function (index, el) {\n        app.ptr.create(el);\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.ptr-content').each(function (index, el) {\n        app.ptr.destroy(el);\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/lazy/lazy.js\n\n\n\n\nvar Lazy = {\n  destroy: function destroy(pageEl) {\n    var $pageEl = Object(dom7_module[\"default\"])(pageEl).closest('.page');\n    if (!$pageEl.length) return;\n    if ($pageEl[0].f7LazyDestroy) {\n      $pageEl[0].f7LazyDestroy();\n    }\n  },\n  create: function create(pageEl) {\n    var app = this;\n    var $pageEl = Object(dom7_module[\"default\"])(pageEl).closest('.page').eq(0);\n\n    // Lazy images\n    var $lazyLoadImages = $pageEl.find('.lazy');\n    if ($lazyLoadImages.length === 0 && !$pageEl.hasClass('lazy')) return;\n\n    // Placeholder\n    var placeholderSrc = app.params.lazy.placeholder;\n    if (placeholderSrc !== false) {\n      $lazyLoadImages.each(function (index, lazyEl) {\n        if (Object(dom7_module[\"default\"])(lazyEl).attr('data-src') && !Object(dom7_module[\"default\"])(lazyEl).attr('src')) Object(dom7_module[\"default\"])(lazyEl).attr('src', placeholderSrc);\n      });\n    }\n\n    // load image\n    var imagesSequence = [];\n    var imageIsLoading = false;\n    function onImageComplete(lazyEl) {\n      if (imagesSequence.indexOf(lazyEl) >= 0) {\n        imagesSequence.splice(imagesSequence.indexOf(lazyEl), 1);\n      }\n      imageIsLoading = false;\n      if (app.params.lazy.sequential && imagesSequence.length > 0) {\n        imageIsLoading = true;\n        app.lazy.loadImage(imagesSequence[0], onImageComplete);\n      }\n    }\n    function observerCallback(entries, observer) {\n      entries.forEach(function (entry) {\n        if (entry.isIntersecting) {\n          if (app.params.lazy.sequential && imageIsLoading) {\n            if (imagesSequence.indexOf(entry.target) < 0) imagesSequence.push(entry.target);\n            return;\n          }\n          // Load image\n          imageIsLoading = true;\n          app.lazy.loadImage(entry.target, onImageComplete);\n          // Detach\n          observer.unobserve(entry.target);\n        }\n      });\n    }\n    if (app.params.lazy.observer && utils_support[\"default\"].intersectionObserver) {\n      var observer = $pageEl[0].f7LazyObserver;\n      if (!observer) {\n        observer = new ssr_window_esm[\"window\"].IntersectionObserver(observerCallback, {\n          root: $pageEl[0]\n        });\n      }\n      $lazyLoadImages.each(function (index, el) {\n        if (el.f7LazyObserverAdded) return;\n        el.f7LazyObserverAdded = true;\n        observer.observe(el);\n      });\n      if (!$pageEl[0].f7LazyDestroy) {\n        $pageEl[0].f7LazyDestroy = function () {\n          observer.disconnect();\n          delete $pageEl[0].f7LazyDestroy;\n          delete $pageEl[0].f7LazyObserver;\n        };\n      }\n      return;\n    }\n    function lazyHandler() {\n      app.lazy.load($pageEl, function (lazyEl) {\n        if (app.params.lazy.sequential && imageIsLoading) {\n          if (imagesSequence.indexOf(lazyEl) < 0) imagesSequence.push(lazyEl);\n          return;\n        }\n        imageIsLoading = true;\n        app.lazy.loadImage(lazyEl, onImageComplete);\n      });\n    }\n    function attachEvents() {\n      $pageEl[0].f7LazyAttached = true;\n      $pageEl.on('lazy', lazyHandler);\n      $pageEl.on('scroll', lazyHandler, true);\n      $pageEl.find('.tab').on('tab:mounted tab:show', lazyHandler);\n      app.on('resize', lazyHandler);\n    }\n    function detachEvents() {\n      $pageEl[0].f7LazyAttached = false;\n      delete $pageEl[0].f7LazyAttached;\n      $pageEl.off('lazy', lazyHandler);\n      $pageEl.off('scroll', lazyHandler, true);\n      $pageEl.find('.tab').off('tab:mounted tab:show', lazyHandler);\n      app.off('resize', lazyHandler);\n    }\n\n    // Store detach function\n    if (!$pageEl[0].f7LazyDestroy) {\n      $pageEl[0].f7LazyDestroy = detachEvents;\n    }\n\n    // Attach events\n    if (!$pageEl[0].f7LazyAttached) {\n      attachEvents();\n    }\n\n    // Run loader on page load/init\n    lazyHandler();\n  },\n  isInViewport: function isInViewport(lazyEl) {\n    var app = this;\n    var rect = lazyEl.getBoundingClientRect();\n    var threshold = app.params.lazy.threshold || 0;\n    return rect.top >= 0 - threshold && rect.left >= 0 - threshold && rect.top <= app.height + threshold && rect.left <= app.width + threshold;\n  },\n  loadImage: function loadImage(imageEl, callback) {\n    var app = this;\n    var $imageEl = Object(dom7_module[\"default\"])(imageEl);\n    var bg = $imageEl.attr('data-background');\n    var src = bg || $imageEl.attr('data-src');\n    function onLoad() {\n      $imageEl.removeClass('lazy').addClass('lazy-loaded');\n      if (bg) {\n        $imageEl.css('background-image', \"url(\".concat(src, \")\"));\n      } else if (src) {\n        $imageEl.attr('src', src);\n      }\n      if (callback) callback(imageEl);\n      $imageEl.trigger('lazy:loaded');\n      app.emit('lazyLoaded', $imageEl[0]);\n    }\n    if (!src) {\n      $imageEl.trigger('lazy:load');\n      app.emit('lazyLoad', $imageEl[0]);\n      onLoad();\n      return;\n    }\n    function onError() {\n      $imageEl.removeClass('lazy').addClass('lazy-loaded');\n      if (bg) {\n        $imageEl.css('background-image', \"url(\".concat(app.params.lazy.placeholder || '', \")\"));\n      } else {\n        $imageEl.attr('src', app.params.lazy.placeholder || '');\n      }\n      if (callback) callback(imageEl);\n      $imageEl.trigger('lazy:error');\n      app.emit('lazyError', $imageEl[0]);\n    }\n    var image = new ssr_window_esm[\"window\"].Image();\n    image.onload = onLoad;\n    image.onerror = onError;\n    image.src = src;\n    $imageEl.removeAttr('data-src').removeAttr('data-background');\n\n    // Add loaded callback and events\n    $imageEl.trigger('lazy:load');\n    app.emit('lazyLoad', $imageEl[0]);\n  },\n  load: function load(pageEl, callback) {\n    var app = this;\n    var $pageEl = Object(dom7_module[\"default\"])(pageEl);\n    if (!$pageEl.hasClass('page')) $pageEl = $pageEl.parents('.page').eq(0);\n    if ($pageEl.length === 0) {\n      return;\n    }\n    $pageEl.find('.lazy').each(function (index, lazyEl) {\n      var $lazyEl = Object(dom7_module[\"default\"])(lazyEl);\n      if ($lazyEl.parents('.tab:not(.tab-active)').length > 0) {\n        return;\n      }\n      if (app.lazy.isInViewport(lazyEl)) {\n        if (callback) callback(lazyEl);else app.lazy.loadImage(lazyEl);\n      }\n    });\n  }\n};\n/* harmony default export */ var lazy = ({\n  name: 'lazy',\n  params: {\n    lazy: {\n      placeholder: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==',\n      threshold: 0,\n      sequential: true,\n      observer: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      lazy: {\n        create: Lazy.create.bind(app),\n        destroy: Lazy.destroy.bind(app),\n        loadImage: Lazy.loadImage.bind(app),\n        load: Lazy.load.bind(app),\n        isInViewport: Lazy.isInViewport.bind(app)\n      }\n    });\n  },\n  on: {\n    pageInit: function pageInit(page) {\n      var app = this;\n      if (page.$el.find('.lazy').length > 0 || page.$el.hasClass('lazy')) {\n        app.lazy.create(page.$el);\n      }\n    },\n    pageAfterIn: function pageAfterIn(page) {\n      var app = this;\n      if (app.params.lazy.observer && utils_support[\"default\"].intersectionObserver) return;\n      if (page.$el.find('.lazy').length > 0 || page.$el.hasClass('lazy')) {\n        app.lazy.create(page.$el);\n      }\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      if (page.$el.find('.lazy').length > 0 || page.$el.hasClass('lazy')) {\n        app.lazy.destroy(page.$el);\n      }\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      if ($tabEl.find('.lazy').length > 0 || $tabEl.hasClass('lazy')) {\n        app.lazy.create($tabEl);\n      }\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      if (app.params.lazy.observer && utils_support[\"default\"].intersectionObserver) return;\n      var $tabEl = Object(dom7_module[\"default\"])(tabEl);\n      if ($tabEl.find('.lazy').length > 0 || $tabEl.hasClass('lazy')) {\n        app.lazy.destroy($tabEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/data-table/data-table-class.js\n\n\n\n\n\nfunction data_table_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, data_table_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction data_table_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (data_table_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar data_table_class_DataTable = /*#__PURE__*/function (_Framework7Class) {\n  function DataTable(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, DataTable);\n    _this = data_table_class_callSuper(this, DataTable, [params, [app]]);\n    var table = _this;\n    var defaults = {};\n\n    // Extend defaults with modules params\n    table.useModulesParams(defaults);\n    table.params = utils[\"default\"].extend(defaults, params);\n\n    // El\n    var $el = Object(dom7_module[\"default\"])(table.params.el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, undefined);\n    table.$el = $el;\n    table.el = $el[0];\n    if (table.$el[0].f7DataTable) {\n      var instance = table.$el[0].f7DataTable;\n      table.destroy();\n      return possibleConstructorReturn_default()(_this, instance);\n    }\n    table.$el[0].f7DataTable = table;\n    utils[\"default\"].extend(table, {\n      collapsible: $el.hasClass('data-table-collapsible'),\n      // Headers\n      $headerEl: $el.find('.data-table-header'),\n      $headerSelectedEl: $el.find('.data-table-header-selected')\n    });\n\n    // Events\n    function handleChange(e) {\n      if (e.detail && e.detail.sentByF7DataTable) {\n        // Scripted event, don't do anything\n        return;\n      }\n      var $inputEl = Object(dom7_module[\"default\"])(this);\n      var checked = $inputEl[0].checked;\n      var columnIndex = $inputEl.parents('td,th').index();\n      if ($inputEl.parents('thead').length > 0) {\n        if (columnIndex === 0) {\n          $el.find('tbody tr')[checked ? 'addClass' : 'removeClass']('data-table-row-selected');\n        }\n        $el.find(\"tbody tr td:nth-child(\".concat(columnIndex + 1, \") input\")).prop('checked', checked).trigger('change', {\n          sentByF7DataTable: true\n        });\n        $inputEl.prop('indeterminate', false);\n      } else {\n        if (columnIndex === 0) {\n          $inputEl.parents('tr')[checked ? 'addClass' : 'removeClass']('data-table-row-selected');\n        }\n        var checkedRows = $el.find(\"tbody .checkbox-cell:nth-child(\".concat(columnIndex + 1, \") input[type=\\\"checkbox\\\"]:checked\")).length;\n        var totalRows = $el.find('tbody tr').length;\n        var $headCheckboxEl = $el.find(\"thead .checkbox-cell:nth-child(\".concat(columnIndex + 1, \") input[type=\\\"checkbox\\\"]\"));\n        if (!checked) {\n          $headCheckboxEl.prop('checked', false);\n        } else if (checkedRows === totalRows) {\n          $headCheckboxEl.prop('checked', true).trigger('change', {\n            sentByF7DataTable: true\n          });\n        }\n        $headCheckboxEl.prop('indeterminate', checkedRows > 0 && checkedRows < totalRows);\n      }\n      table.checkSelectedHeader();\n    }\n    function handleSortableClick() {\n      var $cellEl = Object(dom7_module[\"default\"])(this);\n      var isActive = $cellEl.hasClass('sortable-cell-active');\n      var currentSort = $cellEl.hasClass('sortable-desc') ? 'desc' : 'asc';\n      var newSort;\n      if (isActive) {\n        newSort = currentSort === 'desc' ? 'asc' : 'desc';\n        $cellEl.removeClass('sortable-desc sortable-asc').addClass(\"sortable-\".concat(newSort));\n      } else {\n        $el.find('thead .sortable-cell-active').removeClass('sortable-cell-active');\n        $cellEl.addClass('sortable-cell-active');\n        newSort = currentSort;\n      }\n      $cellEl.trigger('datatable:sort', newSort);\n      table.emit('local::sort dataTableSort', table, newSort);\n    }\n    table.attachEvents = function attachEvents() {\n      table.$el.on('change', '.checkbox-cell input[type=\"checkbox\"]', handleChange);\n      table.$el.find('thead .sortable-cell').on('click', handleSortableClick);\n    };\n    table.detachEvents = function detachEvents() {\n      table.$el.off('change', '.checkbox-cell input[type=\"checkbox\"]', handleChange);\n      table.$el.find('thead .sortable-cell').off('click', handleSortableClick);\n    };\n\n    // Install Modules\n    table.useModules();\n\n    // Init\n    table.init();\n    return possibleConstructorReturn_default()(_this, table);\n  }\n  inherits_default()(DataTable, _Framework7Class);\n  return createClass_default()(DataTable, [{\n    key: \"setCollapsibleLabels\",\n    value: function setCollapsibleLabels() {\n      var table = this;\n      if (!table.collapsible) return;\n      table.$el.find('tbody td:not(.checkbox-cell)').each(function (index, el) {\n        var $el = Object(dom7_module[\"default\"])(el);\n        var elIndex = $el.index();\n        var collpsibleTitle = $el.attr('data-collapsible-title');\n        if (!collpsibleTitle && collpsibleTitle !== '') {\n          $el.attr('data-collapsible-title', table.$el.find('thead th').eq(elIndex).text());\n        }\n      });\n    }\n  }, {\n    key: \"checkSelectedHeader\",\n    value: function checkSelectedHeader() {\n      var table = this;\n      if (table.$headerEl.length > 0 && table.$headerSelectedEl.length > 0) {\n        var checkedItems = table.$el.find('tbody .checkbox-cell input:checked').length;\n        table.$el[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked');\n        table.$headerSelectedEl.find('.data-table-selected-count').text(checkedItems);\n      }\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var table = this;\n      table.attachEvents();\n      table.setCollapsibleLabels();\n      table.checkSelectedHeader();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var table = this;\n      table.$el.trigger('datatable:beforedestroy');\n      table.emit('local::beforeDestroy dataTableBeforeDestroy', table);\n      table.attachEvents();\n      if (table.$el[0]) {\n        table.$el[0].f7DataTable = null;\n        delete table.$el[0].f7DataTable;\n      }\n      utils[\"default\"].deleteProps(table);\n      table = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var data_table_class = (data_table_class_DataTable);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/data-table/data-table.js\n\n\n\n/* harmony default export */ var data_table = ({\n  name: 'dataTable',\n  static: {\n    DataTable: data_table_class\n  },\n  create: function create() {\n    var app = this;\n    app.dataTable = constructor_methods({\n      defaultSelector: '.data-table',\n      constructor: data_table_class,\n      app: app,\n      domProp: 'f7DataTable'\n    });\n  },\n  on: {\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.data-table-init').each(function (index, tableEl) {\n        app.dataTable.destroy(tableEl);\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.data-table-init').each(function (index, tableEl) {\n        app.dataTable.create({\n          el: tableEl\n        });\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.data-table-init').each(function (index, tableEl) {\n        app.dataTable.destroy(tableEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.data-table-init').each(function (index, tableEl) {\n        app.dataTable.create({\n          el: tableEl\n        });\n      });\n    }\n  },\n  vnode: {\n    'data-table-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var tableEl = vnode.elm;\n        app.dataTable.create({\n          el: tableEl\n        });\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var tableEl = vnode.elm;\n        app.dataTable.destroy(tableEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/fab/fab.js\n\n\nvar Fab = {\n  morphOpen: function morphOpen(fabEl, targetEl) {\n    var app = this;\n    var $fabEl = Object(dom7_module[\"default\"])(fabEl);\n    var $targetEl = Object(dom7_module[\"default\"])(targetEl);\n    if ($targetEl.length === 0) return;\n    $targetEl.transition(0).addClass('fab-morph-target-visible');\n    var target = {\n      width: $targetEl[0].offsetWidth,\n      height: $targetEl[0].offsetHeight,\n      offset: $targetEl.offset(),\n      borderRadius: $targetEl.css('border-radius'),\n      zIndex: $targetEl.css('z-index')\n    };\n    var fab = {\n      width: $fabEl[0].offsetWidth,\n      height: $fabEl[0].offsetHeight,\n      offset: $fabEl.offset(),\n      translateX: utils[\"default\"].getTranslate($fabEl[0], 'x'),\n      translateY: utils[\"default\"].getTranslate($fabEl[0], 'y')\n    };\n    $fabEl[0].f7FabMorphData = {\n      $targetEl: $targetEl,\n      target: target,\n      fab: fab\n    };\n    var diffX = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;\n    var diffY = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;\n    var scaleX = target.width / fab.width;\n    var scaleY = target.height / fab.height;\n    var borderRadius = Math.ceil(parseInt(target.borderRadius, 10) / Math.max(scaleX, scaleY));\n    if (borderRadius > 0) borderRadius += 2;\n    $fabEl[0].f7FabMorphResizeHandler = function resizeHandler() {\n      $fabEl.transition(0).transform('');\n      $targetEl.transition(0);\n      target.width = $targetEl[0].offsetWidth;\n      target.height = $targetEl[0].offsetHeight;\n      target.offset = $targetEl.offset();\n      fab.offset = $fabEl.offset();\n      var diffXNew = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;\n      var diffYNew = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;\n      var scaleXNew = target.width / fab.width;\n      var scaleYNew = target.height / fab.height;\n      $fabEl.transform(\"translate3d(\".concat(-diffXNew, \"px, \").concat(-diffYNew, \"px, 0) scale(\").concat(scaleXNew, \", \").concat(scaleYNew, \")\"));\n    };\n    $targetEl.css('opacity', 0).transform(\"scale(\".concat(1 / scaleX, \", \").concat(1 / scaleY, \")\"));\n    $fabEl.addClass('fab-opened').css('z-index', target.zIndex - 1).transform(\"translate3d(\".concat(-diffX, \"px, \").concat(-diffY, \"px, 0)\"));\n    $fabEl.transitionEnd(function () {\n      $targetEl.transition('');\n      utils[\"default\"].nextFrame(function () {\n        $targetEl.css('opacity', 1).transform('scale(1,1)');\n        $fabEl.transform(\"translate3d(\".concat(-diffX, \"px, \").concat(-diffY, \"px, 0) scale(\").concat(scaleX, \", \").concat(scaleY, \")\")).css('border-radius', \"\".concat(borderRadius, \"px\")).css('box-shadow', 'none').css('opacity', '0');\n      });\n      app.on('resize', $fabEl[0].f7FabMorphResizeHandler);\n      if ($targetEl.parents('.page-content').length > 0) {\n        $targetEl.parents('.page-content').on('scroll', $fabEl[0].f7FabMorphResizeHandler);\n      }\n    });\n  },\n  morphClose: function morphClose(fabEl) {\n    var app = this;\n    var $fabEl = Object(dom7_module[\"default\"])(fabEl);\n    var morphData = $fabEl[0].f7FabMorphData;\n    if (!morphData) return;\n    var $targetEl = morphData.$targetEl,\n      target = morphData.target,\n      fab = morphData.fab;\n    if ($targetEl.length === 0) return;\n    var diffX = fab.offset.left + fab.width / 2 - (target.offset.left + target.width / 2) - fab.translateX;\n    var diffY = fab.offset.top + fab.height / 2 - (target.offset.top + target.height / 2) - fab.translateY;\n    var scaleX = target.width / fab.width;\n    var scaleY = target.height / fab.height;\n    app.off('resize', $fabEl[0].f7FabMorphResizeHandler);\n    if ($targetEl.parents('.page-content').length > 0) {\n      $targetEl.parents('.page-content').off('scroll', $fabEl[0].f7FabMorphResizeHandler);\n    }\n    $targetEl.css('opacity', 0).transform(\"scale(\".concat(1 / scaleX, \", \").concat(1 / scaleY, \")\"));\n    $fabEl.transition('').css('box-shadow', '').css('border-radius', '').css('opacity', '1').transform(\"translate3d(\".concat(-diffX, \"px, \").concat(-diffY, \"px, 0)\"));\n    $fabEl.transitionEnd(function () {\n      $fabEl.css('z-index', '').removeClass('fab-opened').transform('');\n      utils[\"default\"].nextFrame(function () {\n        $fabEl.transitionEnd(function () {\n          $targetEl.removeClass('fab-morph-target-visible').css('opacity', '').transform('').transition('');\n        });\n      });\n    });\n  },\n  open: function open(fabEl, targetEl) {\n    var app = this;\n    var $fabEl = Object(dom7_module[\"default\"])(fabEl).eq(0);\n    var $buttonsEl = $fabEl.find('.fab-buttons');\n    if (!$fabEl.length) return;\n    if ($fabEl.hasClass('fab-opened')) return;\n    if (!$buttonsEl.length && !$fabEl.hasClass('fab-morph')) return;\n    if (app.fab.openedEl) {\n      if (app.fab.openedEl === $fabEl[0]) return;\n      app.fab.close(app.fab.openedEl);\n    }\n    app.fab.openedEl = $fabEl[0];\n    if ($fabEl.hasClass('fab-morph')) {\n      app.fab.morphOpen($fabEl, targetEl || $fabEl.attr('data-morph-to'));\n    } else {\n      $fabEl.addClass('fab-opened');\n    }\n    $fabEl.siblings('.fab-backdrop').addClass('backdrop-in');\n    $fabEl.trigger('fab:open');\n  },\n  close: function close() {\n    var fabEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.fab-opened';\n    var app = this;\n    var $fabEl = Object(dom7_module[\"default\"])(fabEl).eq(0);\n    var $buttonsEl = $fabEl.find('.fab-buttons');\n    if (!$fabEl.length) return;\n    if (!$fabEl.hasClass('fab-opened')) return;\n    if (!$buttonsEl.length && !$fabEl.hasClass('fab-morph')) return;\n    app.fab.openedEl = null;\n    if ($fabEl.hasClass('fab-morph')) {\n      app.fab.morphClose($fabEl);\n    } else {\n      $fabEl.removeClass('fab-opened');\n    }\n    $fabEl.siblings('.fab-backdrop').removeClass('backdrop-in');\n    $fabEl.trigger('fab:close');\n  },\n  toggle: function toggle(fabEl) {\n    var app = this;\n    var $fabEl = Object(dom7_module[\"default\"])(fabEl);\n    if (!$fabEl.hasClass('fab-opened')) app.fab.open(fabEl);else app.fab.close(fabEl);\n  }\n};\n/* harmony default export */ var fab_fab = ({\n  name: 'fab',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      fab: {\n        openedEl: null,\n        morphOpen: Fab.morphOpen.bind(app),\n        morphClose: Fab.morphClose.bind(app),\n        open: Fab.open.bind(app),\n        close: Fab.close.bind(app),\n        toggle: Fab.toggle.bind(app)\n      }\n    });\n  },\n  clicks: {\n    '.fab > a': function open($clickedEl) {\n      var app = this;\n      app.fab.toggle($clickedEl.parents('.fab'));\n    },\n    '.fab-open': function open($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.fab.open(data.fab);\n    },\n    '.fab-close': function close($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      app.fab.close(data.fab);\n    },\n    '.fab-backdrop': function close() {\n      var app = this;\n      app.fab.close();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/searchbar/searchbar-class.js\n\n\n\n\n\nfunction searchbar_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, searchbar_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction searchbar_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (searchbar_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar searchbar_class_Searchbar = /*#__PURE__*/function (_FrameworkClass) {\n  function Searchbar(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Searchbar);\n    _this = searchbar_class_callSuper(this, Searchbar, [params, [app]]);\n    var sb = _this;\n    var defaults = {\n      el: undefined,\n      inputEl: undefined,\n      inputEvents: 'change input compositionend',\n      disableButton: true,\n      disableButtonEl: undefined,\n      backdropEl: undefined,\n      searchContainer: undefined,\n      // container to search, HTMLElement or CSS selector\n      searchItem: 'li',\n      // single item selector, CSS selector\n      searchIn: undefined,\n      // where to search in item, CSS selector\n      searchGroup: '.list-group',\n      searchGroupTitle: '.item-divider, .list-group-title',\n      ignore: '.searchbar-ignore',\n      foundEl: '.searchbar-found',\n      notFoundEl: '.searchbar-not-found',\n      hideOnEnableEl: '.searchbar-hide-on-enable',\n      hideOnSearchEl: '.searchbar-hide-on-search',\n      backdrop: undefined,\n      removeDiacritics: true,\n      customSearch: false,\n      hideDividers: true,\n      hideGroups: true,\n      disableOnBackdropClick: true,\n      expandable: false,\n      inline: false\n    };\n\n    // Extend defaults with modules params\n    sb.useModulesParams(defaults);\n    sb.params = utils[\"default\"].extend(defaults, params);\n    var $el = Object(dom7_module[\"default\"])(sb.params.el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, sb);\n    if ($el[0].f7Searchbar) return possibleConstructorReturn_default()(_this, $el[0].f7Searchbar);\n    $el[0].f7Searchbar = sb;\n    var $pageEl;\n    var $navbarEl = $el.parents('.navbar');\n    if ($el.parents('.page').length > 0) {\n      $pageEl = $el.parents('.page');\n    } else if ($navbarEl.length > 0) {\n      $pageEl = Object(dom7_module[\"default\"])(app.navbar.getPageByEl($navbarEl[0]));\n      if (!$pageEl.length) {\n        var $currentPageEl = $el.parents('.view').find('.page-current');\n        if ($currentPageEl[0] && $currentPageEl[0].f7Page && $currentPageEl[0].f7Page.navbarEl === $navbarEl[0]) {\n          $pageEl = $currentPageEl;\n        }\n      }\n    }\n    var $foundEl;\n    if (params.foundEl) {\n      $foundEl = Object(dom7_module[\"default\"])(params.foundEl);\n    } else if (typeof sb.params.foundEl === 'string' && $pageEl) {\n      $foundEl = $pageEl.find(sb.params.foundEl);\n    }\n    var $notFoundEl;\n    if (params.notFoundEl) {\n      $notFoundEl = Object(dom7_module[\"default\"])(params.notFoundEl);\n    } else if (typeof sb.params.notFoundEl === 'string' && $pageEl) {\n      $notFoundEl = $pageEl.find(sb.params.notFoundEl);\n    }\n    var $hideOnEnableEl;\n    if (params.hideOnEnableEl) {\n      $hideOnEnableEl = Object(dom7_module[\"default\"])(params.hideOnEnableEl);\n    } else if (typeof sb.params.hideOnEnableEl === 'string' && $pageEl) {\n      $hideOnEnableEl = $pageEl.find(sb.params.hideOnEnableEl);\n    }\n    var $hideOnSearchEl;\n    if (params.hideOnSearchEl) {\n      $hideOnSearchEl = Object(dom7_module[\"default\"])(params.hideOnSearchEl);\n    } else if (typeof sb.params.hideOnSearchEl === 'string' && $pageEl) {\n      $hideOnSearchEl = $pageEl.find(sb.params.hideOnSearchEl);\n    }\n    var expandable = sb.params.expandable || $el.hasClass('searchbar-expandable');\n    var inline = sb.params.inline || $el.hasClass('searchbar-inline');\n    if (typeof sb.params.backdrop === 'undefined') {\n      if (!inline) sb.params.backdrop = app.theme !== 'aurora';else sb.params.backdrop = false;\n    }\n    var $backdropEl;\n    if (sb.params.backdrop) {\n      if (sb.params.backdropEl) {\n        $backdropEl = Object(dom7_module[\"default\"])(sb.params.backdropEl);\n      } else if ($pageEl && $pageEl.length > 0) {\n        $backdropEl = $pageEl.find('.searchbar-backdrop');\n      } else {\n        $backdropEl = $el.siblings('.searchbar-backdrop');\n      }\n      if ($backdropEl.length === 0) {\n        $backdropEl = Object(dom7_module[\"default\"])('<div class=\"searchbar-backdrop\"></div>');\n        if ($pageEl && $pageEl.length) {\n          if ($el.parents($pageEl).length > 0 && $navbarEl && $el.parents($navbarEl).length === 0) {\n            $backdropEl.insertBefore($el);\n          } else {\n            $backdropEl.insertBefore($pageEl.find('.page-content').eq(0));\n          }\n        } else {\n          $backdropEl.insertBefore($el);\n        }\n      }\n    }\n    var $searchContainer;\n    if (sb.params.searchContainer) {\n      $searchContainer = Object(dom7_module[\"default\"])(sb.params.searchContainer);\n    }\n    var $inputEl;\n    if (sb.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(sb.params.inputEl);\n    } else {\n      $inputEl = $el.find('input[type=\"search\"]').eq(0);\n    }\n    var $disableButtonEl;\n    if (sb.params.disableButton) {\n      if (sb.params.disableButtonEl) {\n        $disableButtonEl = Object(dom7_module[\"default\"])(sb.params.disableButtonEl);\n      } else {\n        $disableButtonEl = $el.find('.searchbar-disable-button');\n      }\n    }\n    utils[\"default\"].extend(sb, {\n      app: app,\n      view: app.views.get($el.parents('.view')),\n      $el: $el,\n      el: $el[0],\n      $backdropEl: $backdropEl,\n      backdropEl: $backdropEl && $backdropEl[0],\n      $searchContainer: $searchContainer,\n      searchContainer: $searchContainer && $searchContainer[0],\n      $inputEl: $inputEl,\n      inputEl: $inputEl[0],\n      $disableButtonEl: $disableButtonEl,\n      disableButtonEl: $disableButtonEl && $disableButtonEl[0],\n      disableButtonHasMargin: false,\n      $pageEl: $pageEl,\n      pageEl: $pageEl && $pageEl[0],\n      $navbarEl: $navbarEl,\n      navbarEl: $navbarEl && $navbarEl[0],\n      $foundEl: $foundEl,\n      foundEl: $foundEl && $foundEl[0],\n      $notFoundEl: $notFoundEl,\n      notFoundEl: $notFoundEl && $notFoundEl[0],\n      $hideOnEnableEl: $hideOnEnableEl,\n      hideOnEnableEl: $hideOnEnableEl && $hideOnEnableEl[0],\n      $hideOnSearchEl: $hideOnSearchEl,\n      hideOnSearchEl: $hideOnSearchEl && $hideOnSearchEl[0],\n      previousQuery: '',\n      query: '',\n      isVirtualList: $searchContainer && $searchContainer.hasClass('virtual-list'),\n      virtualList: undefined,\n      enabled: false,\n      expandable: expandable,\n      inline: inline\n    });\n\n    // Events\n    function preventSubmit(e) {\n      e.preventDefault();\n    }\n    function onInputFocus(e) {\n      sb.enable(e);\n      sb.$el.addClass('searchbar-focused');\n    }\n    function onInputBlur() {\n      sb.$el.removeClass('searchbar-focused');\n      if (app.theme === 'aurora' && (!$disableButtonEl || !$disableButtonEl.length || !sb.params.disableButton) && !sb.query) {\n        sb.disable();\n      }\n    }\n    function onInputChange() {\n      var value = sb.$inputEl.val().trim();\n      if (sb.$searchContainer && sb.$searchContainer.length > 0 && (sb.params.searchIn || sb.isVirtualList || sb.params.searchIn === sb.params.searchItem) || sb.params.customSearch) {\n        sb.search(value, true);\n      }\n    }\n    function onInputClear(e, previousValue) {\n      sb.$el.trigger('searchbar:clear', previousValue);\n      sb.emit('local::clear searchbarClear', sb, previousValue);\n    }\n    function disableOnClick(e) {\n      sb.disable(e);\n    }\n    function onPageBeforeOut() {\n      if (!sb || sb && !sb.$el) return;\n      if (sb.enabled) {\n        sb.$el.removeClass('searchbar-enabled');\n        if (sb.expandable) {\n          sb.$el.parents('.navbar').removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition');\n        }\n      }\n    }\n    function onPageBeforeIn() {\n      if (!sb || sb && !sb.$el) return;\n      if (sb.enabled) {\n        sb.$el.addClass('searchbar-enabled');\n        if (sb.expandable) {\n          sb.$el.parents('.navbar').addClass('with-searchbar-expandable-enabled-no-transition');\n        }\n      }\n    }\n    sb.attachEvents = function attachEvents() {\n      $el.on('submit', preventSubmit);\n      if (sb.params.disableButton) {\n        sb.$disableButtonEl.on('click', disableOnClick);\n      }\n      if (sb.params.disableOnBackdropClick && sb.$backdropEl) {\n        sb.$backdropEl.on('click', disableOnClick);\n      }\n      if (sb.expandable && app.theme === 'ios' && sb.view && $navbarEl.length && sb.$pageEl) {\n        sb.$pageEl.on('page:beforeout', onPageBeforeOut);\n        sb.$pageEl.on('page:beforein', onPageBeforeIn);\n      }\n      sb.$inputEl.on('focus', onInputFocus);\n      sb.$inputEl.on('blur', onInputBlur);\n      sb.$inputEl.on(sb.params.inputEvents, onInputChange);\n      sb.$inputEl.on('input:clear', onInputClear);\n    };\n    sb.detachEvents = function detachEvents() {\n      $el.off('submit', preventSubmit);\n      if (sb.params.disableButton) {\n        sb.$disableButtonEl.off('click', disableOnClick);\n      }\n      if (sb.params.disableOnBackdropClick && sb.$backdropEl) {\n        sb.$backdropEl.off('click', disableOnClick);\n      }\n      if (sb.expandable && app.theme === 'ios' && sb.view && $navbarEl.length && sb.$pageEl) {\n        sb.$pageEl.off('page:beforeout', onPageBeforeOut);\n        sb.$pageEl.off('page:beforein', onPageBeforeIn);\n      }\n      sb.$inputEl.off('focus', onInputFocus);\n      sb.$inputEl.off('blur', onInputBlur);\n      sb.$inputEl.off(sb.params.inputEvents, onInputChange);\n      sb.$inputEl.off('input:clear', onInputClear);\n    };\n\n    // Install Modules\n    sb.useModules();\n\n    // Init\n    sb.init();\n    return possibleConstructorReturn_default()(_this, sb);\n  }\n  inherits_default()(Searchbar, _FrameworkClass);\n  return createClass_default()(Searchbar, [{\n    key: \"clear\",\n    value: function clear(e) {\n      var sb = this;\n      if (!sb.query && e && Object(dom7_module[\"default\"])(e.target).hasClass('searchbar-clear')) {\n        sb.disable();\n        return sb;\n      }\n      var previousQuery = sb.value;\n      sb.$inputEl.val('').trigger('change').focus();\n      sb.$el.trigger('searchbar:clear', previousQuery);\n      sb.emit('local::clear searchbarClear', sb, previousQuery);\n      return sb;\n    }\n  }, {\n    key: \"setDisableButtonMargin\",\n    value: function setDisableButtonMargin() {\n      var sb = this;\n      if (sb.expandable) return;\n      var app = sb.app;\n      sb.$disableButtonEl.transition(0).show();\n      sb.$disableButtonEl.css(\"margin-\".concat(app.rtl ? 'left' : 'right'), \"\".concat(-sb.disableButtonEl.offsetWidth, \"px\"));\n      /* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n      sb._clientLeft = sb.$disableButtonEl[0].clientLeft;\n      sb.$disableButtonEl.transition('');\n      sb.disableButtonHasMargin = true;\n    }\n  }, {\n    key: \"enable\",\n    value: function enable(setFocus) {\n      var sb = this;\n      if (sb.enabled) return sb;\n      var app = sb.app;\n      sb.enabled = true;\n      function enable() {\n        if (sb.$backdropEl && (sb.$searchContainer && sb.$searchContainer.length || sb.params.customSearch) && !sb.$el.hasClass('searchbar-enabled') && !sb.query) {\n          sb.backdropShow();\n        }\n        sb.$el.addClass('searchbar-enabled');\n        if (!sb.$disableButtonEl || sb.$disableButtonEl && sb.$disableButtonEl.length === 0) {\n          sb.$el.addClass('searchbar-enabled-no-disable-button');\n        }\n        if (!sb.expandable && sb.$disableButtonEl && sb.$disableButtonEl.length > 0 && app.theme !== 'md') {\n          if (!sb.disableButtonHasMargin) {\n            sb.setDisableButtonMargin();\n          }\n          sb.$disableButtonEl.css(\"margin-\".concat(app.rtl ? 'left' : 'right'), '0px');\n        }\n        if (sb.expandable) {\n          var $navbarEl = sb.$el.parents('.navbar');\n          if ($navbarEl.hasClass('navbar-large') && sb.$pageEl) {\n            var $pageContentEl = sb.$pageEl.find('.page-content');\n            var $titleLargeEl = $navbarEl.find('.title-large');\n            $pageContentEl.addClass('with-searchbar-expandable-enabled');\n            if ($navbarEl.hasClass('navbar-large') && $navbarEl.hasClass('navbar-large-collapsed') && $titleLargeEl.length && $pageContentEl.length) {\n              $pageContentEl.transition(0);\n              $pageContentEl[0].scrollTop -= $titleLargeEl[0].offsetHeight;\n              setTimeout(function () {\n                $pageContentEl.transition('');\n              }, 200);\n            }\n          }\n          if (app.theme === 'md' && $navbarEl.length) {\n            $navbarEl.addClass('with-searchbar-expandable-enabled');\n          } else {\n            $navbarEl.addClass('with-searchbar-expandable-enabled');\n            if ($navbarEl.hasClass('navbar-large')) {\n              $navbarEl.addClass('navbar-large-collapsed');\n            }\n          }\n        }\n        if (sb.$hideOnEnableEl) sb.$hideOnEnableEl.addClass('hidden-by-searchbar');\n        sb.$el.trigger('searchbar:enable');\n        sb.emit('local::enable searchbarEnable', sb);\n      }\n      var needsFocus = false;\n      if (setFocus === true) {\n        if (ssr_window_esm[\"document\"].activeElement !== sb.inputEl) {\n          needsFocus = true;\n        }\n      }\n      var isIos = app.device.ios && app.theme === 'ios';\n      if (isIos) {\n        if (sb.expandable) {\n          if (needsFocus) sb.$inputEl.focus();\n          enable();\n        } else {\n          if (needsFocus) sb.$inputEl.focus();\n          if (setFocus && (setFocus.type === 'focus' || setFocus === true)) {\n            utils[\"default\"].nextTick(function () {\n              enable();\n            }, 400);\n          } else {\n            enable();\n          }\n        }\n      } else {\n        if (needsFocus) sb.$inputEl.focus();\n        if (app.theme === 'md' && sb.expandable) {\n          sb.$el.parents('.page, .view, .navbar-inner, .navbar').scrollLeft(app.rtl ? 100 : 0);\n        }\n        enable();\n      }\n      return sb;\n    }\n  }, {\n    key: \"disable\",\n    value: function disable() {\n      var sb = this;\n      if (!sb.enabled) return sb;\n      var app = sb.app;\n      sb.$inputEl.val('').trigger('change');\n      sb.$el.removeClass('searchbar-enabled searchbar-focused searchbar-enabled-no-disable-button');\n      if (sb.expandable) {\n        var $navbarEl = sb.$el.parents('.navbar');\n        var $pageContentEl = sb.$pageEl && sb.$pageEl.find('.page-content');\n        if ($navbarEl.hasClass('navbar-large') && $pageContentEl.length) {\n          var $titleLargeEl = $navbarEl.find('.title-large');\n          sb.$el.transitionEnd(function () {\n            $pageContentEl.removeClass('with-searchbar-expandable-closing');\n          });\n          if ($navbarEl.hasClass('navbar-large') && $navbarEl.hasClass('navbar-large-collapsed') && $titleLargeEl.length) {\n            var scrollTop = $pageContentEl[0].scrollTop;\n            var titleLargeHeight = $titleLargeEl[0].offsetHeight;\n            if (scrollTop > titleLargeHeight) {\n              $pageContentEl.transition(0);\n              $pageContentEl[0].scrollTop = scrollTop + titleLargeHeight;\n              setTimeout(function () {\n                $pageContentEl.transition('');\n              }, 200);\n            }\n          }\n          $pageContentEl.removeClass('with-searchbar-expandable-enabled').addClass('with-searchbar-expandable-closing');\n        }\n        if (app.theme === 'md' && $navbarEl.length) {\n          $navbarEl.removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition').addClass('with-searchbar-expandable-closing');\n          sb.$el.transitionEnd(function () {\n            $navbarEl.removeClass('with-searchbar-expandable-closing');\n          });\n        } else {\n          $navbarEl.removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition').addClass('with-searchbar-expandable-closing');\n          sb.$el.transitionEnd(function () {\n            $navbarEl.removeClass('with-searchbar-expandable-closing');\n          });\n          if (sb.$pageEl) {\n            sb.$pageEl.find('.page-content').trigger('scroll');\n          }\n        }\n      }\n      if (!sb.expandable && sb.$disableButtonEl && sb.$disableButtonEl.length > 0 && app.theme !== 'md') {\n        sb.$disableButtonEl.css(\"margin-\".concat(app.rtl ? 'left' : 'right'), \"\".concat(-sb.disableButtonEl.offsetWidth, \"px\"));\n      }\n      if (sb.$backdropEl && (sb.$searchContainer && sb.$searchContainer.length || sb.params.customSearch)) {\n        sb.backdropHide();\n      }\n      sb.enabled = false;\n      sb.$inputEl.blur();\n      if (sb.$hideOnEnableEl) sb.$hideOnEnableEl.removeClass('hidden-by-searchbar');\n      sb.$el.trigger('searchbar:disable');\n      sb.emit('local::disable searchbarDisable', sb);\n      return sb;\n    }\n  }, {\n    key: \"toggle\",\n    value: function toggle() {\n      var sb = this;\n      if (sb.enabled) sb.disable();else sb.enable(true);\n      return sb;\n    }\n  }, {\n    key: \"backdropShow\",\n    value: function backdropShow() {\n      var sb = this;\n      if (sb.$backdropEl) {\n        sb.$backdropEl.addClass('searchbar-backdrop-in');\n      }\n      return sb;\n    }\n  }, {\n    key: \"backdropHide\",\n    value: function backdropHide() {\n      var sb = this;\n      if (sb.$backdropEl) {\n        sb.$backdropEl.removeClass('searchbar-backdrop-in');\n      }\n      return sb;\n    }\n  }, {\n    key: \"search\",\n    value: function search(query, internal) {\n      var sb = this;\n      sb.previousQuery = sb.query || '';\n      if (query === sb.previousQuery) return sb;\n      if (!internal) {\n        if (!sb.enabled) {\n          sb.enable();\n        }\n        sb.$inputEl.val(query);\n        sb.$inputEl.trigger('input');\n      }\n      sb.query = query;\n      sb.value = query;\n      var $searchContainer = sb.$searchContainer,\n        $el = sb.$el,\n        $foundEl = sb.$foundEl,\n        $notFoundEl = sb.$notFoundEl,\n        $hideOnSearchEl = sb.$hideOnSearchEl,\n        isVirtualList = sb.isVirtualList;\n\n      // Hide on search element\n      if (query.length > 0 && $hideOnSearchEl) {\n        $hideOnSearchEl.addClass('hidden-by-searchbar');\n      } else if ($hideOnSearchEl) {\n        $hideOnSearchEl.removeClass('hidden-by-searchbar');\n      }\n      // Add active/inactive classes on overlay\n      if ($searchContainer && $searchContainer.length && $el.hasClass('searchbar-enabled') || sb.params.customSearch && $el.hasClass('searchbar-enabled')) {\n        if (query.length === 0) {\n          sb.backdropShow();\n        } else {\n          sb.backdropHide();\n        }\n      }\n      if (sb.params.customSearch) {\n        $el.trigger('searchbar:search', {\n          query: query,\n          previousQuery: sb.previousQuery\n        });\n        sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery);\n        return sb;\n      }\n      var foundItems = [];\n      var vlQuery;\n      if (isVirtualList) {\n        sb.virtualList = $searchContainer[0].f7VirtualList;\n        if (query.trim() === '') {\n          sb.virtualList.resetFilter();\n          if ($notFoundEl) $notFoundEl.hide();\n          if ($foundEl) $foundEl.show();\n          $el.trigger('searchbar:search', {\n            query: query,\n            previousQuery: sb.previousQuery\n          });\n          sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery);\n          return sb;\n        }\n        vlQuery = sb.params.removeDiacritics ? utils[\"default\"].removeDiacritics(query) : query;\n        if (sb.virtualList.params.searchAll) {\n          foundItems = sb.virtualList.params.searchAll(vlQuery, sb.virtualList.items) || [];\n        } else if (sb.virtualList.params.searchByItem) {\n          for (var i = 0; i < sb.virtualList.items.length; i += 1) {\n            if (sb.virtualList.params.searchByItem(vlQuery, sb.virtualList.params.items[i], i)) {\n              foundItems.push(i);\n            }\n          }\n        }\n      } else {\n        var values;\n        if (sb.params.removeDiacritics) values = utils[\"default\"].removeDiacritics(query.trim().toLowerCase()).split(' ');else {\n          values = query.trim().toLowerCase().split(' ');\n        }\n        $searchContainer.find(sb.params.searchItem).removeClass('hidden-by-searchbar').each(function (itemIndex, itemEl) {\n          var $itemEl = Object(dom7_module[\"default\"])(itemEl);\n          var compareWithText = [];\n          var $searchIn = sb.params.searchIn ? $itemEl.find(sb.params.searchIn) : $itemEl;\n          if (sb.params.searchIn === sb.params.searchItem) {\n            $searchIn = $itemEl;\n          }\n          $searchIn.each(function (searchInIndex, searchInEl) {\n            var itemText = Object(dom7_module[\"default\"])(searchInEl).text().trim().toLowerCase();\n            if (sb.params.removeDiacritics) itemText = utils[\"default\"].removeDiacritics(itemText);\n            compareWithText.push(itemText);\n          });\n          compareWithText = compareWithText.join(' ');\n          var wordsMatch = 0;\n          for (var _i = 0; _i < values.length; _i += 1) {\n            if (compareWithText.indexOf(values[_i]) >= 0) wordsMatch += 1;\n          }\n          if (wordsMatch !== values.length && !(sb.params.ignore && $itemEl.is(sb.params.ignore))) {\n            $itemEl.addClass('hidden-by-searchbar');\n          } else {\n            foundItems.push($itemEl[0]);\n          }\n        });\n        if (sb.params.hideDividers) {\n          $searchContainer.find(sb.params.searchGroupTitle).each(function (titleIndex, titleEl) {\n            var $titleEl = Object(dom7_module[\"default\"])(titleEl);\n            var $nextElements = $titleEl.nextAll(sb.params.searchItem);\n            var hide = true;\n            for (var _i2 = 0; _i2 < $nextElements.length; _i2 += 1) {\n              var $nextEl = $nextElements.eq(_i2);\n              if ($nextEl.is(sb.params.searchGroupTitle)) break;\n              if (!$nextEl.hasClass('hidden-by-searchbar')) {\n                hide = false;\n              }\n            }\n            var ignore = sb.params.ignore && $titleEl.is(sb.params.ignore);\n            if (hide && !ignore) $titleEl.addClass('hidden-by-searchbar');else $titleEl.removeClass('hidden-by-searchbar');\n          });\n        }\n        if (sb.params.hideGroups) {\n          $searchContainer.find(sb.params.searchGroup).each(function (groupIndex, groupEl) {\n            var $groupEl = Object(dom7_module[\"default\"])(groupEl);\n            var ignore = sb.params.ignore && $groupEl.is(sb.params.ignore);\n            // eslint-disable-next-line\n            var notHidden = $groupEl.find(sb.params.searchItem).filter(function (index, el) {\n              return !Object(dom7_module[\"default\"])(el).hasClass('hidden-by-searchbar');\n            });\n            if (notHidden.length === 0 && !ignore) {\n              $groupEl.addClass('hidden-by-searchbar');\n            } else {\n              $groupEl.removeClass('hidden-by-searchbar');\n            }\n          });\n        }\n      }\n      if (foundItems.length === 0) {\n        if ($notFoundEl) $notFoundEl.show();\n        if ($foundEl) $foundEl.hide();\n      } else {\n        if ($notFoundEl) $notFoundEl.hide();\n        if ($foundEl) $foundEl.show();\n      }\n      if (isVirtualList && sb.virtualList) {\n        sb.virtualList.filterItems(foundItems);\n      }\n      $el.trigger('searchbar:search', {\n        query: query,\n        previousQuery: sb.previousQuery,\n        foundItems: foundItems\n      });\n      sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery, foundItems);\n      return sb;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var sb = this;\n      if (sb.expandable && sb.$el) sb.$el.addClass('searchbar-expandable');\n      if (sb.inline && sb.$el) sb.$el.addClass('searchbar-inline');\n      sb.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var sb = this;\n      sb.emit('local::beforeDestroy searchbarBeforeDestroy', sb);\n      sb.$el.trigger('searchbar:beforedestroy');\n      sb.detachEvents();\n      if (sb.$el[0]) {\n        sb.$el[0].f7Searchbar = null;\n        delete sb.$el[0].f7Searchbar;\n      }\n      utils[\"default\"].deleteProps(sb);\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var searchbar_class = (searchbar_class_Searchbar);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/searchbar/searchbar.js\n\n\n\n\n/* harmony default export */ var searchbar = ({\n  name: 'searchbar',\n  static: {\n    Searchbar: searchbar_class\n  },\n  create: function create() {\n    var app = this;\n    app.searchbar = constructor_methods({\n      defaultSelector: '.searchbar',\n      constructor: searchbar_class,\n      app: app,\n      domProp: 'f7Searchbar',\n      addMethods: 'clear enable disable toggle search'.split(' ')\n    });\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.searchbar-init').each(function (index, searchbarEl) {\n        var $searchbarEl = Object(dom7_module[\"default\"])(searchbarEl);\n        app.searchbar.create(utils[\"default\"].extend($searchbarEl.dataset(), {\n          el: searchbarEl\n        }));\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.searchbar-init').each(function (index, searchbarEl) {\n        if (searchbarEl.f7Searchbar && searchbarEl.f7Searchbar.destroy) {\n          searchbarEl.f7Searchbar.destroy();\n        }\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.searchbar-init').each(function (index, searchbarEl) {\n        var $searchbarEl = Object(dom7_module[\"default\"])(searchbarEl);\n        app.searchbar.create(utils[\"default\"].extend($searchbarEl.dataset(), {\n          el: searchbarEl\n        }));\n      });\n      if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {\n        page.$navbarEl.find('.searchbar-init').each(function (index, searchbarEl) {\n          var $searchbarEl = Object(dom7_module[\"default\"])(searchbarEl);\n          app.searchbar.create(utils[\"default\"].extend($searchbarEl.dataset(), {\n            el: searchbarEl\n          }));\n        });\n      }\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.searchbar-init').each(function (index, searchbarEl) {\n        if (searchbarEl.f7Searchbar && searchbarEl.f7Searchbar.destroy) {\n          searchbarEl.f7Searchbar.destroy();\n        }\n      });\n      if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {\n        page.$navbarEl.find('.searchbar-init').each(function (index, searchbarEl) {\n          if (searchbarEl.f7Searchbar && searchbarEl.f7Searchbar.destroy) {\n            searchbarEl.f7Searchbar.destroy();\n          }\n        });\n      }\n    }\n  },\n  clicks: {\n    '.searchbar-clear': function clear($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      var sb = app.searchbar.get(data.searchbar);\n      if (sb) sb.clear();\n    },\n    '.searchbar-enable': function enable($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      var sb = app.searchbar.get(data.searchbar);\n      if (sb) sb.enable(true);\n    },\n    '.searchbar-disable': function disable($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      var sb = app.searchbar.get(data.searchbar);\n      if (sb) sb.disable();\n    },\n    '.searchbar-toggle': function toggle($clickedEl) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var app = this;\n      var sb = app.searchbar.get(data.searchbar);\n      if (sb) sb.toggle();\n    }\n  },\n  vnode: {\n    'searchbar-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var searchbarEl = vnode.elm;\n        var $searchbarEl = Object(dom7_module[\"default\"])(searchbarEl);\n        app.searchbar.create(utils[\"default\"].extend($searchbarEl.dataset(), {\n          el: searchbarEl\n        }));\n      },\n      destroy: function destroy(vnode) {\n        var searchbarEl = vnode.elm;\n        if (searchbarEl.f7Searchbar && searchbarEl.f7Searchbar.destroy) {\n          searchbarEl.f7Searchbar.destroy();\n        }\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/messages/messages-class.js\n\n\n\n\n\nfunction messages_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, messages_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction messages_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (messages_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar messages_class_Messages = /*#__PURE__*/function (_Framework7Class) {\n  function Messages(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Messages);\n    _this = messages_class_callSuper(this, Messages, [params, [app]]);\n    var m = _this;\n    var defaults = {\n      autoLayout: true,\n      messages: [],\n      newMessagesFirst: false,\n      scrollMessages: true,\n      scrollMessagesOnEdge: true,\n      firstMessageRule: undefined,\n      lastMessageRule: undefined,\n      tailMessageRule: undefined,\n      sameNameMessageRule: undefined,\n      sameHeaderMessageRule: undefined,\n      sameFooterMessageRule: undefined,\n      sameAvatarMessageRule: undefined,\n      customClassMessageRule: undefined,\n      renderMessage: undefined\n    };\n\n    // Extend defaults with modules params\n    m.useModulesParams(defaults);\n    m.params = utils[\"default\"].extend(defaults, params);\n    var $el = Object(dom7_module[\"default\"])(params.el).eq(0);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, m);\n    if ($el[0].f7Messages) return possibleConstructorReturn_default()(_this, $el[0].f7Messages);\n    $el[0].f7Messages = m;\n    var $pageContentEl = $el.closest('.page-content').eq(0);\n    utils[\"default\"].extend(m, {\n      messages: m.params.messages,\n      $el: $el,\n      el: $el[0],\n      $pageContentEl: $pageContentEl,\n      pageContentEl: $pageContentEl[0]\n    });\n    // Install Modules\n    m.useModules();\n\n    // Init\n    m.init();\n    return possibleConstructorReturn_default()(_this, m);\n  }\n  // eslint-disable-next-line\n  inherits_default()(Messages, _Framework7Class);\n  return createClass_default()(Messages, [{\n    key: \"getMessageData\",\n    value: function getMessageData(messageEl) {\n      var $messageEl = Object(dom7_module[\"default\"])(messageEl);\n      var data = {\n        name: $messageEl.find('.message-name').html(),\n        header: $messageEl.find('.message-header').html(),\n        textHeader: $messageEl.find('.message-text-header').html(),\n        textFooter: $messageEl.find('.message-text-footer').html(),\n        footer: $messageEl.find('.message-footer').html(),\n        isTitle: $messageEl.hasClass('messages-title'),\n        type: $messageEl.hasClass('message-sent') ? 'sent' : 'received',\n        text: $messageEl.find('.message-text').html(),\n        image: $messageEl.find('.message-image').html(),\n        imageSrc: $messageEl.find('.message-image img').attr('src'),\n        typing: $messageEl.hasClass('message-typing')\n      };\n      if (data.isTitle) {\n        data.text = $messageEl.html();\n      }\n      if (data.text && data.textHeader) {\n        data.text = data.text.replace(\"<div class=\\\"message-text-header\\\">\".concat(data.textHeader, \"</div>\"), '');\n      }\n      if (data.text && data.textFooter) {\n        data.text = data.text.replace(\"<div class=\\\"message-text-footer\\\">\".concat(data.textFooter, \"</div>\"), '');\n      }\n      var avatar = $messageEl.find('.message-avatar').css('background-image');\n      if (avatar === 'none' || avatar === '') avatar = undefined;\n      if (avatar && typeof avatar === 'string') {\n        avatar = avatar.replace('url(', '').replace(')', '').replace(/\"/g, '').replace(/'/g, '');\n      } else {\n        avatar = undefined;\n      }\n      data.avatar = avatar;\n      return data;\n    }\n  }, {\n    key: \"getMessagesData\",\n    value: function getMessagesData() {\n      var m = this;\n      var data = [];\n      m.$el.find('.message, .messages-title').each(function (index, messageEl) {\n        data.push(m.getMessageData(messageEl));\n      });\n      return data;\n    }\n  }, {\n    key: \"renderMessage\",\n    value: function renderMessage(messageToRender) {\n      var m = this;\n      var message = utils[\"default\"].extend({\n        type: 'sent',\n        attrs: {}\n      }, messageToRender);\n      if (m.params.renderMessage) {\n        return m.params.renderMessage.call(m, message);\n      }\n      if (message.isTitle) {\n        return \"<div class=\\\"messages-title\\\">\".concat(message.text, \"</div>\");\n      }\n      var attrs = Object.keys(message.attrs).map(function (attr) {\n        return \"\".concat(attr, \"=\\\"\").concat(message.attrs[attr], \"\\\"\");\n      }).join(' ');\n      return \"\\n      <div class=\\\"message message-\".concat(message.type, \" \").concat(message.isTyping ? 'message-typing' : '', \" \").concat(message.cssClass || '', \"\\\" \").concat(attrs, \">\\n        \").concat(message.avatar ? \"\\n        <div class=\\\"message-avatar\\\" style=\\\"background-image:url(\".concat(message.avatar, \")\\\"></div>\\n        \") : '', \"\\n        <div class=\\\"message-content\\\">\\n          \").concat(message.name ? \"<div class=\\\"message-name\\\">\".concat(message.name, \"</div>\") : '', \"\\n          \").concat(message.header ? \"<div class=\\\"message-header\\\">\".concat(message.header, \"</div>\") : '', \"\\n          <div class=\\\"message-bubble\\\">\\n            \").concat(message.textHeader ? \"<div class=\\\"message-text-header\\\">\".concat(message.textHeader, \"</div>\") : '', \"\\n            \").concat(message.image ? \"<div class=\\\"message-image\\\">\".concat(message.image, \"</div>\") : '', \"\\n            \").concat(message.imageSrc && !message.image ? \"<div class=\\\"message-image\\\"><img src=\\\"\".concat(message.imageSrc, \"\\\"></div>\") : '', \"\\n            \").concat(message.text || message.isTyping ? \"<div class=\\\"message-text\\\">\".concat(message.text || '').concat(message.isTyping ? '<div class=\"message-typing-indicator\"><div></div><div></div><div></div></div>' : '', \"</div>\") : '', \"\\n            \").concat(message.textFooter ? \"<div class=\\\"message-text-footer\\\">\".concat(message.textFooter, \"</div>\") : '', \"\\n          </div>\\n          \").concat(message.footer ? \"<div class=\\\"message-footer\\\">\".concat(message.footer, \"</div>\") : '', \"\\n        </div>\\n      </div>\\n    \");\n    }\n  }, {\n    key: \"renderMessages\",\n    value: function renderMessages() {\n      var messagesToRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.messages;\n      var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.newMessagesFirst ? 'prepend' : 'append';\n      var m = this;\n      var html = messagesToRender.map(function (message) {\n        return m.renderMessage(message);\n      }).join('');\n      m.$el[method](html);\n    }\n  }, {\n    key: \"isFirstMessage\",\n    value: function isFirstMessage() {\n      var _m$params;\n      var m = this;\n      if (m.params.firstMessageRule) return (_m$params = m.params).firstMessageRule.apply(_m$params, arguments);\n      return false;\n    }\n  }, {\n    key: \"isLastMessage\",\n    value: function isLastMessage() {\n      var _m$params2;\n      var m = this;\n      if (m.params.lastMessageRule) return (_m$params2 = m.params).lastMessageRule.apply(_m$params2, arguments);\n      return false;\n    }\n  }, {\n    key: \"isTailMessage\",\n    value: function isTailMessage() {\n      var _m$params3;\n      var m = this;\n      if (m.params.tailMessageRule) return (_m$params3 = m.params).tailMessageRule.apply(_m$params3, arguments);\n      return false;\n    }\n  }, {\n    key: \"isSameNameMessage\",\n    value: function isSameNameMessage() {\n      var _m$params4;\n      var m = this;\n      if (m.params.sameNameMessageRule) return (_m$params4 = m.params).sameNameMessageRule.apply(_m$params4, arguments);\n      return false;\n    }\n  }, {\n    key: \"isSameHeaderMessage\",\n    value: function isSameHeaderMessage() {\n      var _m$params5;\n      var m = this;\n      if (m.params.sameHeaderMessageRule) return (_m$params5 = m.params).sameHeaderMessageRule.apply(_m$params5, arguments);\n      return false;\n    }\n  }, {\n    key: \"isSameFooterMessage\",\n    value: function isSameFooterMessage() {\n      var _m$params6;\n      var m = this;\n      if (m.params.sameFooterMessageRule) return (_m$params6 = m.params).sameFooterMessageRule.apply(_m$params6, arguments);\n      return false;\n    }\n  }, {\n    key: \"isSameAvatarMessage\",\n    value: function isSameAvatarMessage() {\n      var _m$params7;\n      var m = this;\n      if (m.params.sameAvatarMessageRule) return (_m$params7 = m.params).sameAvatarMessageRule.apply(_m$params7, arguments);\n      return false;\n    }\n  }, {\n    key: \"isCustomClassMessage\",\n    value: function isCustomClassMessage() {\n      var _m$params8;\n      var m = this;\n      if (m.params.customClassMessageRule) return (_m$params8 = m.params).customClassMessageRule.apply(_m$params8, arguments);\n      return undefined;\n    }\n  }, {\n    key: \"layout\",\n    value: function layout() {\n      var m = this;\n      m.$el.find('.message, .messages-title').each(function (index, messageEl) {\n        var $messageEl = Object(dom7_module[\"default\"])(messageEl);\n        if (!m.messages) {\n          m.messages = m.getMessagesData();\n        }\n        var classes = [];\n        var message = m.messages[index];\n        var previousMessage = m.messages[index - 1];\n        var nextMessage = m.messages[index + 1];\n        if (m.isFirstMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-first');\n        }\n        if (m.isLastMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-last');\n        }\n        if (m.isTailMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-tail');\n        }\n        if (m.isSameNameMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-same-name');\n        }\n        if (m.isSameHeaderMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-same-header');\n        }\n        if (m.isSameFooterMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-same-footer');\n        }\n        if (m.isSameAvatarMessage(message, previousMessage, nextMessage)) {\n          classes.push('message-same-avatar');\n        }\n        var customMessageClasses = m.isCustomClassMessage(message, previousMessage, nextMessage);\n        if (customMessageClasses && customMessageClasses.length) {\n          if (typeof customMessageClasses === 'string') {\n            customMessageClasses = customMessageClasses.split(' ');\n          }\n          customMessageClasses.forEach(function (customClass) {\n            classes.push(customClass);\n          });\n        }\n        $messageEl.removeClass('message-first message-last message-tail message-same-name message-same-header message-same-footer message-same-avatar');\n        classes.forEach(function (className) {\n          $messageEl.addClass(className);\n        });\n      });\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      var m = this;\n      m.messages = [];\n      m.$el.html('');\n    }\n  }, {\n    key: \"removeMessage\",\n    value: function removeMessage(messageToRemove) {\n      var layout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var m = this;\n      // Index or El\n      var index;\n      var $el;\n      if (typeof messageToRemove === 'number') {\n        index = messageToRemove;\n        $el = m.$el.find('.message, .messages-title').eq(index);\n      } else if (m.messages && m.messages.indexOf(messageToRemove) >= 0) {\n        index = m.messages.indexOf(messageToRemove);\n        $el = m.$el.children().eq(index);\n      } else {\n        $el = Object(dom7_module[\"default\"])(messageToRemove);\n        index = $el.index();\n      }\n      if ($el.length === 0) {\n        return m;\n      }\n      $el.remove();\n      m.messages.splice(index, 1);\n      if (m.params.autoLayout && layout) m.layout();\n      return m;\n    }\n  }, {\n    key: \"removeMessages\",\n    value: function removeMessages(messagesToRemove) {\n      var layout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var m = this;\n      if (Array.isArray(messagesToRemove)) {\n        var messagesToRemoveEls = [];\n        messagesToRemove.forEach(function (messageToRemoveIndex) {\n          messagesToRemoveEls.push(m.$el.find('.message, .messages-title').eq(messageToRemoveIndex));\n        });\n        messagesToRemoveEls.forEach(function (messageToRemove) {\n          m.removeMessage(messageToRemove, false);\n        });\n      } else {\n        Object(dom7_module[\"default\"])(messagesToRemove).each(function (index, messageToRemove) {\n          m.removeMessage(messageToRemove, false);\n        });\n      }\n      if (m.params.autoLayout && layout) m.layout();\n      return m;\n    }\n  }, {\n    key: \"addMessage\",\n    value: function addMessage() {\n      var m = this;\n      var messageToAdd;\n      var animate;\n      var method;\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      if (typeof args[1] === 'boolean') {\n        messageToAdd = args[0];\n        animate = args[1];\n        method = args[2];\n      } else {\n        messageToAdd = args[0];\n        method = args[1];\n        animate = args[2];\n      }\n      if (typeof animate === 'undefined') {\n        animate = true;\n      }\n      if (typeof method === 'undefined') {\n        method = m.params.newMessagesFirst ? 'prepend' : 'append';\n      }\n      return m.addMessages([messageToAdd], animate, method);\n    }\n  }, {\n    key: \"addMessages\",\n    value: function addMessages() {\n      var m = this;\n      var messagesToAdd;\n      var animate;\n      var method;\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      if (typeof args[1] === 'boolean') {\n        messagesToAdd = args[0];\n        animate = args[1];\n        method = args[2];\n      } else {\n        messagesToAdd = args[0];\n        method = args[1];\n        animate = args[2];\n      }\n      if (typeof animate === 'undefined') {\n        animate = true;\n      }\n      if (typeof method === 'undefined') {\n        method = m.params.newMessagesFirst ? 'prepend' : 'append';\n      }\n\n      // Define scroll positions before new messages added\n      var scrollHeightBefore = m.pageContentEl.scrollHeight;\n      var heightBefore = m.pageContentEl.offsetHeight;\n      var scrollBefore = m.pageContentEl.scrollTop;\n\n      // Add message to DOM and data\n      var messagesHTML = '';\n      var typingMessage = m.messages.filter(function (el) {\n        return el.isTyping;\n      })[0];\n      messagesToAdd.forEach(function (messageToAdd) {\n        if (typingMessage) {\n          if (method === 'append') {\n            m.messages.splice(m.messages.indexOf(typingMessage), 0, messageToAdd);\n          } else {\n            m.messages.splice(m.messages.indexOf(typingMessage) + 1, 0, messageToAdd);\n          }\n        } else {\n          m.messages[method === 'append' ? 'push' : 'unshift'](messageToAdd);\n        }\n        messagesHTML += m.renderMessage(messageToAdd);\n      });\n      var $messagesEls = Object(dom7_module[\"default\"])(messagesHTML);\n      if (animate) {\n        if (method === 'append' && !m.params.newMessagesFirst) {\n          $messagesEls.addClass('message-appear-from-bottom');\n        }\n        if (method === 'prepend' && m.params.newMessagesFirst) {\n          $messagesEls.addClass('message-appear-from-top');\n        }\n      }\n      if (typingMessage) {\n        if (method === 'append') {\n          $messagesEls.insertBefore(m.$el.find('.message-typing'));\n        } else {\n          $messagesEls.insertAfter(m.$el.find('.message-typing'));\n        }\n      } else {\n        m.$el[method]($messagesEls);\n      }\n\n      // Layout\n      if (m.params.autoLayout) m.layout();\n      if (method === 'prepend' && !typingMessage) {\n        m.pageContentEl.scrollTop = scrollBefore + (m.pageContentEl.scrollHeight - scrollHeightBefore);\n      }\n      if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst || method === 'prepend' && m.params.newMessagesFirst && !typingMessage)) {\n        if (m.params.scrollMessagesOnEdge) {\n          var onEdge = false;\n          if (m.params.newMessagesFirst && scrollBefore === 0) {\n            onEdge = true;\n          }\n          if (!m.params.newMessagesFirst && scrollBefore - (scrollHeightBefore - heightBefore) >= -10) {\n            onEdge = true;\n          }\n          if (onEdge) m.scroll(animate ? undefined : 0);\n        } else {\n          m.scroll(animate ? undefined : 0);\n        }\n      }\n      return m;\n    }\n  }, {\n    key: \"showTyping\",\n    value: function showTyping() {\n      var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var m = this;\n      var typingMessage = m.messages.filter(function (el) {\n        return el.isTyping;\n      })[0];\n      if (typingMessage) {\n        m.removeMessage(m.messages.indexOf(typingMessage));\n      }\n      m.addMessage(utils[\"default\"].extend({\n        type: 'received',\n        isTyping: true\n      }, message));\n      return m;\n    }\n  }, {\n    key: \"hideTyping\",\n    value: function hideTyping() {\n      var m = this;\n      var typingMessageIndex;\n      var typingFound;\n      m.messages.forEach(function (message, index) {\n        if (message.isTyping) typingMessageIndex = index;\n      });\n      if (typeof typingMessageIndex !== 'undefined') {\n        if (m.$el.find('.message').eq(typingMessageIndex).hasClass('message-typing')) {\n          typingFound = true;\n          m.removeMessage(typingMessageIndex);\n        }\n      }\n      if (!typingFound) {\n        var $typingMessageEl = m.$el.find('.message-typing');\n        if ($typingMessageEl.length) {\n          m.removeMessage($typingMessageEl);\n        }\n      }\n      return m;\n    }\n  }, {\n    key: \"scroll\",\n    value: function scroll() {\n      var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;\n      var scrollTop = arguments.length > 1 ? arguments[1] : undefined;\n      var m = this;\n      var currentScroll = m.pageContentEl.scrollTop;\n      var newScrollTop;\n      if (typeof scrollTop !== 'undefined') newScrollTop = scrollTop;else {\n        newScrollTop = m.params.newMessagesFirst ? 0 : m.pageContentEl.scrollHeight - m.pageContentEl.offsetHeight;\n        if (newScrollTop === currentScroll) return m;\n      }\n      m.$pageContentEl.scrollTop(newScrollTop, duration);\n      return m;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var m = this;\n      if (!m.messages || m.messages.length === 0) {\n        m.messages = m.getMessagesData();\n      }\n      if (m.params.messages && m.params.messages.length) {\n        m.renderMessages();\n      }\n      if (m.params.autoLayout) m.layout();\n      if (m.params.scrollMessages) m.scroll(0);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var m = this;\n      m.emit('local::beforeDestroy messagesBeforeDestroy', m);\n      m.$el.trigger('messages:beforedestroy');\n      if (m.$el[0]) {\n        m.$el[0].f7Messages = null;\n        delete m.$el[0].f7Messages;\n      }\n      utils[\"default\"].deleteProps(m);\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var messages_class = (messages_class_Messages);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/messages/messages.js\n\n\n\n/* harmony default export */ var messages = ({\n  name: 'messages',\n  static: {\n    Messages: messages_class\n  },\n  create: function create() {\n    var app = this;\n    app.messages = constructor_methods({\n      defaultSelector: '.messages',\n      constructor: messages_class,\n      app: app,\n      domProp: 'f7Messages',\n      addMethods: 'renderMessages layout scroll clear removeMessage removeMessages addMessage addMessages'.split(' ')\n    });\n  },\n  on: {\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.messages-init').each(function (index, messagesEl) {\n        app.messages.destroy(messagesEl);\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.messages-init').each(function (index, messagesEl) {\n        app.messages.create({\n          el: messagesEl\n        });\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.messages-init').each(function (index, messagesEl) {\n        app.messages.destroy(messagesEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.messages-init').each(function (index, messagesEl) {\n        app.messages.create({\n          el: messagesEl\n        });\n      });\n    }\n  },\n  vnode: {\n    'messages-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var messagesEl = vnode.elm;\n        app.messages.create({\n          el: messagesEl\n        });\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var messagesEl = vnode.elm;\n        app.messages.destroy(messagesEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/messagebar/messagebar-class.js\n\n\n\n\n\nfunction messagebar_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, messagebar_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction messagebar_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (messagebar_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\nvar messagebar_class_Messagebar = /*#__PURE__*/function (_Framework7Class) {\n  function Messagebar(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Messagebar);\n    _this = messagebar_class_callSuper(this, Messagebar, [params, [app]]);\n    var messagebar = _this;\n    var defaults = {\n      top: false,\n      topOffset: 0,\n      bottomOffset: 0,\n      attachments: [],\n      renderAttachments: undefined,\n      renderAttachment: undefined,\n      maxHeight: null,\n      resizePage: true\n    };\n\n    // Extend defaults with modules params\n    messagebar.useModulesParams(defaults);\n    messagebar.params = utils[\"default\"].extend(defaults, params);\n\n    // El\n    var $el = Object(dom7_module[\"default\"])(messagebar.params.el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, messagebar);\n    if ($el[0].f7Messagebar) return possibleConstructorReturn_default()(_this, $el[0].f7Messagebar);\n    $el[0].f7Messagebar = messagebar;\n\n    // Page and PageContent\n    var $pageEl = $el.parents('.page').eq(0);\n    var $pageContentEl = $pageEl.find('.page-content').eq(0);\n\n    // Area\n    var $areaEl = $el.find('.messagebar-area');\n\n    // Textarea\n    var $textareaEl;\n    if (messagebar.params.textareaEl) {\n      $textareaEl = Object(dom7_module[\"default\"])(messagebar.params.textareaEl);\n    } else {\n      $textareaEl = $el.find('textarea');\n    }\n\n    // Attachments & Library\n    var $attachmentsEl = $el.find('.messagebar-attachments');\n    var $sheetEl = $el.find('.messagebar-sheet');\n    if (messagebar.params.top) {\n      $el.addClass('messagebar-top');\n    }\n    utils[\"default\"].extend(messagebar, {\n      $el: $el,\n      el: $el[0],\n      $areaEl: $areaEl,\n      areaEl: $areaEl[0],\n      $textareaEl: $textareaEl,\n      textareaEl: $textareaEl[0],\n      $attachmentsEl: $attachmentsEl,\n      attachmentsEl: $attachmentsEl[0],\n      attachmentsVisible: $attachmentsEl.hasClass('messagebar-attachments-visible'),\n      $sheetEl: $sheetEl,\n      sheetEl: $sheetEl[0],\n      sheetVisible: $sheetEl.hasClass('messagebar-sheet-visible'),\n      $pageEl: $pageEl,\n      pageEl: $pageEl[0],\n      $pageContentEl: $pageContentEl,\n      pageContentEl: $pageContentEl,\n      top: $el.hasClass('messagebar-top') || messagebar.params.top,\n      attachments: []\n    });\n\n    // Events\n    function onAppResize() {\n      if (messagebar.params.resizePage) {\n        messagebar.resizePage();\n      }\n    }\n    function onSubmit(e) {\n      e.preventDefault();\n    }\n    function onAttachmentClick(e) {\n      var index = Object(dom7_module[\"default\"])(this).index();\n      if (Object(dom7_module[\"default\"])(e.target).closest('.messagebar-attachment-delete').length) {\n        Object(dom7_module[\"default\"])(this).trigger('messagebar:attachmentdelete', index);\n        messagebar.emit('local::attachmentDelete messagebarAttachmentDelete', messagebar, this, index);\n      } else {\n        Object(dom7_module[\"default\"])(this).trigger('messagebar:attachmentclick', index);\n        messagebar.emit('local::attachmentClick messagebarAttachmentClick', messagebar, this, index);\n      }\n    }\n    function onTextareaChange() {\n      messagebar.checkEmptyState();\n      messagebar.$el.trigger('messagebar:change');\n      messagebar.emit('local::change messagebarChange', messagebar);\n    }\n    function onTextareaFocus() {\n      messagebar.sheetHide();\n      messagebar.$el.addClass('messagebar-focused');\n      messagebar.$el.trigger('messagebar:focus');\n      messagebar.emit('local::focus messagebarFocus', messagebar);\n    }\n    function onTextareaBlur() {\n      messagebar.$el.removeClass('messagebar-focused');\n      messagebar.$el.trigger('messagebar:blur');\n      messagebar.emit('local::blur messagebarBlur', messagebar);\n    }\n    messagebar.attachEvents = function attachEvents() {\n      $el.on('textarea:resize', onAppResize);\n      $el.on('submit', onSubmit);\n      $el.on('click', '.messagebar-attachment', onAttachmentClick);\n      $textareaEl.on('change input', onTextareaChange);\n      $textareaEl.on('focus', onTextareaFocus);\n      $textareaEl.on('blur', onTextareaBlur);\n      app.on('resize', onAppResize);\n    };\n    messagebar.detachEvents = function detachEvents() {\n      $el.off('textarea:resize', onAppResize);\n      $el.off('submit', onSubmit);\n      $el.off('click', '.messagebar-attachment', onAttachmentClick);\n      $textareaEl.off('change input', onTextareaChange);\n      $textareaEl.off('focus', onTextareaFocus);\n      $textareaEl.off('blur', onTextareaBlur);\n      app.off('resize', onAppResize);\n    };\n\n    // Install Modules\n    messagebar.useModules();\n\n    // Init\n    messagebar.init();\n    return possibleConstructorReturn_default()(_this, messagebar);\n  }\n  inherits_default()(Messagebar, _Framework7Class);\n  return createClass_default()(Messagebar, [{\n    key: \"focus\",\n    value: function focus() {\n      var messagebar = this;\n      messagebar.$textareaEl.focus();\n      return messagebar;\n    }\n  }, {\n    key: \"blur\",\n    value: function blur() {\n      var messagebar = this;\n      messagebar.$textareaEl.blur();\n      return messagebar;\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      var messagebar = this;\n      messagebar.$textareaEl.val('').trigger('change');\n      return messagebar;\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var messagebar = this;\n      return messagebar.$textareaEl.val().trim();\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(value) {\n      var messagebar = this;\n      messagebar.$textareaEl.val(value).trigger('change');\n      return messagebar;\n    }\n  }, {\n    key: \"setPlaceholder\",\n    value: function setPlaceholder(placeholder) {\n      var messagebar = this;\n      messagebar.$textareaEl.attr('placeholder', placeholder);\n      return messagebar;\n    }\n  }, {\n    key: \"resizePage\",\n    value: function resizePage() {\n      var messagebar = this;\n      var params = messagebar.params,\n        $el = messagebar.$el,\n        top = messagebar.top,\n        $pageEl = messagebar.$pageEl,\n        $pageContentEl = messagebar.$pageContentEl,\n        $areaEl = messagebar.$areaEl,\n        $textareaEl = messagebar.$textareaEl,\n        $sheetEl = messagebar.$sheetEl,\n        $attachmentsEl = messagebar.$attachmentsEl;\n      var elHeight = $el[0].offsetHeight;\n      var maxHeight = params.maxHeight;\n      if (top) {\n        /*\n        Disable at the moment\n        const requiredPaddingTop = elHeight + params.topOffset;\n        const currentPaddingTop = parseInt($pageContentEl.css('padding-top'), 10);\n        if (requiredPaddingTop !== currentPaddingTop) {\n          if (!maxHeight) {\n            maxHeight = $pageEl[0].offsetHeight - currentPaddingTop - $sheetEl.outerHeight() - $attachmentsEl.outerHeight() - parseInt($areaEl.css('margin-top'), 10) - parseInt($areaEl.css('margin-bottom'), 10);\n          }\n          $textareaEl.css('max-height', `${maxHeight}px`);\n          $pageContentEl.css('padding-top', `${requiredPaddingTop}px`);\n          $el.trigger('messagebar:resizePage');\n          messagebar.emit('local::resizepage messagebarResizePage');\n        }\n        */\n      } else {\n        var currentPaddingBottom = parseInt($pageContentEl.css('padding-bottom'), 10);\n        var requiredPaddingBottom = elHeight + params.bottomOffset;\n        if (requiredPaddingBottom !== currentPaddingBottom && $pageContentEl.length) {\n          var currentPaddingTop = parseInt($pageContentEl.css('padding-top'), 10);\n          var pageScrollHeight = $pageContentEl[0].scrollHeight;\n          var pageOffsetHeight = $pageContentEl[0].offsetHeight;\n          var pageScrollTop = $pageContentEl[0].scrollTop;\n          var scrollOnBottom = pageScrollTop === pageScrollHeight - pageOffsetHeight;\n          if (!maxHeight) {\n            maxHeight = $pageEl[0].offsetHeight - currentPaddingTop - $sheetEl.outerHeight() - $attachmentsEl.outerHeight() - parseInt($areaEl.css('margin-top'), 10) - parseInt($areaEl.css('margin-bottom'), 10);\n          }\n          $textareaEl.css('max-height', \"\".concat(maxHeight, \"px\"));\n          $pageContentEl.css('padding-bottom', \"\".concat(requiredPaddingBottom, \"px\"));\n          if (scrollOnBottom) {\n            $pageContentEl.scrollTop($pageContentEl[0].scrollHeight - pageOffsetHeight);\n          }\n          $el.trigger('messagebar:resizepage');\n          messagebar.emit('local::resizePage messagebarResizePage', messagebar);\n        }\n      }\n    }\n  }, {\n    key: \"checkEmptyState\",\n    value: function checkEmptyState() {\n      var messagebar = this;\n      var $el = messagebar.$el,\n        $textareaEl = messagebar.$textareaEl;\n      var value = $textareaEl.val().trim();\n      if (value && value.length) {\n        $el.addClass('messagebar-with-value');\n      } else {\n        $el.removeClass('messagebar-with-value');\n      }\n    }\n  }, {\n    key: \"attachmentsCreate\",\n    value: function attachmentsCreate() {\n      var innerHTML = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var messagebar = this;\n      var $attachmentsEl = Object(dom7_module[\"default\"])(\"<div class=\\\"messagebar-attachments\\\">\".concat(innerHTML, \"</div>\"));\n      $attachmentsEl.insertBefore(messagebar.$textareaEl);\n      utils[\"default\"].extend(messagebar, {\n        $attachmentsEl: $attachmentsEl,\n        attachmentsEl: $attachmentsEl[0]\n      });\n      return messagebar;\n    }\n  }, {\n    key: \"attachmentsShow\",\n    value: function attachmentsShow() {\n      var innerHTML = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var messagebar = this;\n      messagebar.$attachmentsEl = messagebar.$el.find('.messagebar-attachments');\n      if (messagebar.$attachmentsEl.length === 0) {\n        messagebar.attachmentsCreate(innerHTML);\n      }\n      messagebar.$el.addClass('messagebar-attachments-visible');\n      messagebar.attachmentsVisible = true;\n      if (messagebar.params.resizePage) {\n        messagebar.resizePage();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"attachmentsHide\",\n    value: function attachmentsHide() {\n      var messagebar = this;\n      messagebar.$el.removeClass('messagebar-attachments-visible');\n      messagebar.attachmentsVisible = false;\n      if (messagebar.params.resizePage) {\n        messagebar.resizePage();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"attachmentsToggle\",\n    value: function attachmentsToggle() {\n      var messagebar = this;\n      if (messagebar.attachmentsVisible) {\n        messagebar.attachmentsHide();\n      } else {\n        messagebar.attachmentsShow();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"renderAttachment\",\n    value: function renderAttachment(attachment) {\n      var messagebar = this;\n      if (messagebar.params.renderAttachment) {\n        return messagebar.params.renderAttachment.call(messagebar, attachment);\n      }\n      return \"\\n      <div class=\\\"messagebar-attachment\\\">\\n        <img src=\\\"\".concat(attachment, \"\\\">\\n        <span class=\\\"messagebar-attachment-delete\\\"></span>\\n      </div>\\n    \");\n    }\n  }, {\n    key: \"renderAttachments\",\n    value: function renderAttachments() {\n      var messagebar = this;\n      var html;\n      if (messagebar.params.renderAttachments) {\n        html = messagebar.params.renderAttachments.call(messagebar, messagebar.attachments);\n      } else {\n        html = \"\".concat(messagebar.attachments.map(function (attachment) {\n          return messagebar.renderAttachment(attachment);\n        }).join(''));\n      }\n      if (messagebar.$attachmentsEl.length === 0) {\n        messagebar.attachmentsCreate(html);\n      } else {\n        messagebar.$attachmentsEl.html(html);\n      }\n    }\n  }, {\n    key: \"sheetCreate\",\n    value: function sheetCreate() {\n      var innerHTML = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var messagebar = this;\n      var $sheetEl = Object(dom7_module[\"default\"])(\"<div class=\\\"messagebar-sheet\\\">\".concat(innerHTML, \"</div>\"));\n      messagebar.$el.append($sheetEl);\n      utils[\"default\"].extend(messagebar, {\n        $sheetEl: $sheetEl,\n        sheetEl: $sheetEl[0]\n      });\n      return messagebar;\n    }\n  }, {\n    key: \"sheetShow\",\n    value: function sheetShow() {\n      var innerHTML = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n      var messagebar = this;\n      messagebar.$sheetEl = messagebar.$el.find('.messagebar-sheet');\n      if (messagebar.$sheetEl.length === 0) {\n        messagebar.sheetCreate(innerHTML);\n      }\n      messagebar.$el.addClass('messagebar-sheet-visible');\n      messagebar.sheetVisible = true;\n      if (messagebar.params.resizePage) {\n        messagebar.resizePage();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"sheetHide\",\n    value: function sheetHide() {\n      var messagebar = this;\n      messagebar.$el.removeClass('messagebar-sheet-visible');\n      messagebar.sheetVisible = false;\n      if (messagebar.params.resizePage) {\n        messagebar.resizePage();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"sheetToggle\",\n    value: function sheetToggle() {\n      var messagebar = this;\n      if (messagebar.sheetVisible) {\n        messagebar.sheetHide();\n      } else {\n        messagebar.sheetShow();\n      }\n      return messagebar;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var messagebar = this;\n      messagebar.attachEvents();\n      messagebar.checkEmptyState();\n      return messagebar;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var messagebar = this;\n      messagebar.emit('local::beforeDestroy messagebarBeforeDestroy', messagebar);\n      messagebar.$el.trigger('messagebar:beforedestroy');\n      messagebar.detachEvents();\n      if (messagebar.$el[0]) {\n        messagebar.$el[0].f7Messagebar = null;\n        delete messagebar.$el[0].f7Messagebar;\n      }\n      utils[\"default\"].deleteProps(messagebar);\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var messagebar_class = (messagebar_class_Messagebar);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/messagebar/messagebar.js\n\n\n\n\n/* harmony default export */ var messagebar_messagebar = ({\n  name: 'messagebar',\n  static: {\n    Messagebar: messagebar_class\n  },\n  create: function create() {\n    var app = this;\n    app.messagebar = constructor_methods({\n      defaultSelector: '.messagebar',\n      constructor: messagebar_class,\n      app: app,\n      domProp: 'f7Messagebar',\n      addMethods: 'clear getValue setValue setPlaceholder resizePage focus blur attachmentsCreate attachmentsShow attachmentsHide attachmentsToggle renderAttachments sheetCreate sheetShow sheetHide sheetToggle'.split(' ')\n    });\n  },\n  on: {\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.messagebar-init').each(function (index, messagebarEl) {\n        app.messagebar.destroy(messagebarEl);\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.messagebar-init').each(function (index, messagebarEl) {\n        app.messagebar.create(utils[\"default\"].extend({\n          el: messagebarEl\n        }, Object(dom7_module[\"default\"])(messagebarEl).dataset()));\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.messagebar-init').each(function (index, messagebarEl) {\n        app.messagebar.destroy(messagebarEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.messagebar-init').each(function (index, messagebarEl) {\n        app.messagebar.create(utils[\"default\"].extend({\n          el: messagebarEl\n        }, Object(dom7_module[\"default\"])(messagebarEl).dataset()));\n      });\n    }\n  },\n  vnode: {\n    'messagebar-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var messagebarEl = vnode.elm;\n        app.messagebar.create(utils[\"default\"].extend({\n          el: messagebarEl\n        }, Object(dom7_module[\"default\"])(messagebarEl).dataset()));\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var messagebarEl = vnode.elm;\n        app.messagebar.destroy(messagebarEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/dom.js\n\n/* harmony default export */ var dom = (dom7_module[\"default\"]);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/utils.js\n\n/* harmony default export */ var swiper_src_utils_utils = (utils[\"default\"]);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/support.js\n\n/* harmony default export */ var swiper_src_utils_support = (utils_support[\"default\"]);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/class.js\n\n/* harmony default export */ var swiper_src_utils_class = (utils_class);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateSize.js\n\n/* harmony default export */ var update_updateSize = (function () {\n  var swiper = this;\n  var width;\n  var height;\n  var $el = swiper.$el;\n  if (typeof swiper.params.width !== 'undefined') {\n    width = swiper.params.width;\n  } else {\n    width = $el[0].clientWidth;\n  }\n  if (typeof swiper.params.height !== 'undefined') {\n    height = swiper.params.height;\n  } else {\n    height = $el[0].clientHeight;\n  }\n  if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n    return;\n  }\n\n  // Subtract paddings\n  width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);\n  height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);\n  swiper_src_utils_utils.extend(swiper, {\n    width: width,\n    height: height,\n    size: swiper.isHorizontal() ? width : height\n  });\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateSlides.js\n\n\n/* harmony default export */ var updateSlides = (function () {\n  var swiper = this;\n  var params = swiper.params;\n  var $wrapperEl = swiper.$wrapperEl,\n    swiperSize = swiper.size,\n    rtl = swiper.rtlTranslate,\n    wrongRTL = swiper.wrongRTL;\n  var isVirtual = swiper.virtual && params.virtual.enabled;\n  var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n  var slides = $wrapperEl.children(\".\".concat(swiper.params.slideClass));\n  var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n  var snapGrid = [];\n  var slidesGrid = [];\n  var slidesSizesGrid = [];\n  function slidesForMargin(slideIndex) {\n    if (!params.cssMode) return true;\n    if (slideIndex === slides.length - 1) {\n      return false;\n    }\n    return true;\n  }\n  var offsetBefore = params.slidesOffsetBefore;\n  if (typeof offsetBefore === 'function') {\n    offsetBefore = params.slidesOffsetBefore.call(swiper);\n  }\n  var offsetAfter = params.slidesOffsetAfter;\n  if (typeof offsetAfter === 'function') {\n    offsetAfter = params.slidesOffsetAfter.call(swiper);\n  }\n  var previousSnapGridLength = swiper.snapGrid.length;\n  var previousSlidesGridLength = swiper.snapGrid.length;\n  var spaceBetween = params.spaceBetween;\n  var slidePosition = -offsetBefore;\n  var prevSlideSize = 0;\n  var index = 0;\n  if (typeof swiperSize === 'undefined') {\n    return;\n  }\n  if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n    spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n  }\n  swiper.virtualSize = -spaceBetween;\n\n  // reset margins\n  if (rtl) slides.css({\n    marginLeft: '',\n    marginTop: ''\n  });else slides.css({\n    marginRight: '',\n    marginBottom: ''\n  });\n  var slidesNumberEvenToRows;\n  if (params.slidesPerColumn > 1) {\n    if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {\n      slidesNumberEvenToRows = slidesLength;\n    } else {\n      slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;\n    }\n    if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {\n      slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);\n    }\n  }\n\n  // Calc slides\n  var slideSize;\n  var slidesPerColumn = params.slidesPerColumn;\n  var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n  var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);\n  for (var i = 0; i < slidesLength; i += 1) {\n    slideSize = 0;\n    var slide = slides.eq(i);\n    if (params.slidesPerColumn > 1) {\n      // Set slides order\n      var newSlideOrderIndex = void 0;\n      var column = void 0;\n      var row = void 0;\n      if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) {\n        var groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn));\n        var slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex;\n        var columnsInGroup = groupIndex === 0 ? params.slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup);\n        row = Math.floor(slideIndexInGroup / columnsInGroup);\n        column = slideIndexInGroup - row * columnsInGroup + groupIndex * params.slidesPerGroup;\n        newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n        slide.css({\n          '-webkit-box-ordinal-group': newSlideOrderIndex,\n          '-moz-box-ordinal-group': newSlideOrderIndex,\n          '-ms-flex-order': newSlideOrderIndex,\n          '-webkit-order': newSlideOrderIndex,\n          order: newSlideOrderIndex\n        });\n      } else if (params.slidesPerColumnFill === 'column') {\n        column = Math.floor(i / slidesPerColumn);\n        row = i - column * slidesPerColumn;\n        if (column > numFullColumns || column === numFullColumns && row === slidesPerColumn - 1) {\n          row += 1;\n          if (row >= slidesPerColumn) {\n            row = 0;\n            column += 1;\n          }\n        }\n      } else {\n        row = Math.floor(i / slidesPerRow);\n        column = i - row * slidesPerRow;\n      }\n      slide.css(\"margin-\".concat(swiper.isHorizontal() ? 'top' : 'left'), row !== 0 && params.spaceBetween && \"\".concat(params.spaceBetween, \"px\"));\n    }\n    if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n    if (params.slidesPerView === 'auto') {\n      var slideStyles = ssr_window_esm[\"window\"].getComputedStyle(slide[0], null);\n      var currentTransform = slide[0].style.transform;\n      var currentWebKitTransform = slide[0].style.webkitTransform;\n      if (currentTransform) {\n        slide[0].style.transform = 'none';\n      }\n      if (currentWebKitTransform) {\n        slide[0].style.webkitTransform = 'none';\n      }\n      if (params.roundLengths) {\n        slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n      } else {\n        // eslint-disable-next-line\n        if (swiper.isHorizontal()) {\n          var width = parseFloat(slideStyles.getPropertyValue('width'));\n          var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));\n          var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));\n          var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));\n          var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));\n          var boxSizing = slideStyles.getPropertyValue('box-sizing');\n          if (boxSizing && boxSizing === 'border-box') {\n            slideSize = width + marginLeft + marginRight;\n          } else {\n            slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;\n          }\n        } else {\n          var height = parseFloat(slideStyles.getPropertyValue('height'));\n          var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));\n          var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));\n          var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));\n          var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));\n          var _boxSizing = slideStyles.getPropertyValue('box-sizing');\n          if (_boxSizing && _boxSizing === 'border-box') {\n            slideSize = height + marginTop + marginBottom;\n          } else {\n            slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;\n          }\n        }\n      }\n      if (currentTransform) {\n        slide[0].style.transform = currentTransform;\n      }\n      if (currentWebKitTransform) {\n        slide[0].style.webkitTransform = currentWebKitTransform;\n      }\n      if (params.roundLengths) slideSize = Math.floor(slideSize);\n    } else {\n      slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n      if (params.roundLengths) slideSize = Math.floor(slideSize);\n      if (slides[i]) {\n        if (swiper.isHorizontal()) {\n          slides[i].style.width = \"\".concat(slideSize, \"px\");\n        } else {\n          slides[i].style.height = \"\".concat(slideSize, \"px\");\n        }\n      }\n    }\n    if (slides[i]) {\n      slides[i].swiperSlideSize = slideSize;\n    }\n    slidesSizesGrid.push(slideSize);\n    if (params.centeredSlides) {\n      slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n      if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n      if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n      if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n      if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n      if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n      slidesGrid.push(slidePosition);\n    } else {\n      if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n      if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n      slidesGrid.push(slidePosition);\n      slidePosition = slidePosition + slideSize + spaceBetween;\n    }\n    swiper.virtualSize += slideSize + spaceBetween;\n    prevSlideSize = slideSize;\n    index += 1;\n  }\n  swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n  var newSlidesGrid;\n  if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n    $wrapperEl.css({\n      width: \"\".concat(swiper.virtualSize + params.spaceBetween, \"px\")\n    });\n  }\n  if (params.setWrapperSize) {\n    if (swiper.isHorizontal()) $wrapperEl.css({\n      width: \"\".concat(swiper.virtualSize + params.spaceBetween, \"px\")\n    });else $wrapperEl.css({\n      height: \"\".concat(swiper.virtualSize + params.spaceBetween, \"px\")\n    });\n  }\n  if (params.slidesPerColumn > 1) {\n    swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;\n    swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;\n    if (swiper.isHorizontal()) $wrapperEl.css({\n      width: \"\".concat(swiper.virtualSize + params.spaceBetween, \"px\")\n    });else $wrapperEl.css({\n      height: \"\".concat(swiper.virtualSize + params.spaceBetween, \"px\")\n    });\n    if (params.centeredSlides) {\n      newSlidesGrid = [];\n      for (var _i = 0; _i < snapGrid.length; _i += 1) {\n        var slidesGridItem = snapGrid[_i];\n        if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n        if (snapGrid[_i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n      }\n      snapGrid = newSlidesGrid;\n    }\n  }\n\n  // Remove last grid elements depending on width\n  if (!params.centeredSlides) {\n    newSlidesGrid = [];\n    for (var _i2 = 0; _i2 < snapGrid.length; _i2 += 1) {\n      var _slidesGridItem = snapGrid[_i2];\n      if (params.roundLengths) _slidesGridItem = Math.floor(_slidesGridItem);\n      if (snapGrid[_i2] <= swiper.virtualSize - swiperSize) {\n        newSlidesGrid.push(_slidesGridItem);\n      }\n    }\n    snapGrid = newSlidesGrid;\n    if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n      snapGrid.push(swiper.virtualSize - swiperSize);\n    }\n  }\n  if (snapGrid.length === 0) snapGrid = [0];\n  if (params.spaceBetween !== 0) {\n    if (swiper.isHorizontal()) {\n      if (rtl) slides.filter(slidesForMargin).css({\n        marginLeft: \"\".concat(spaceBetween, \"px\")\n      });else slides.filter(slidesForMargin).css({\n        marginRight: \"\".concat(spaceBetween, \"px\")\n      });\n    } else slides.filter(slidesForMargin).css({\n      marginBottom: \"\".concat(spaceBetween, \"px\")\n    });\n  }\n  if (params.centeredSlides && params.centeredSlidesBounds) {\n    var allSlidesSize = 0;\n    slidesSizesGrid.forEach(function (slideSizeValue) {\n      allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n    });\n    allSlidesSize -= params.spaceBetween;\n    var maxSnap = allSlidesSize - swiperSize;\n    snapGrid = snapGrid.map(function (snap) {\n      if (snap < 0) return -offsetBefore;\n      if (snap > maxSnap) return maxSnap + offsetAfter;\n      return snap;\n    });\n  }\n  if (params.centerInsufficientSlides) {\n    var _allSlidesSize = 0;\n    slidesSizesGrid.forEach(function (slideSizeValue) {\n      _allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n    });\n    _allSlidesSize -= params.spaceBetween;\n    if (_allSlidesSize < swiperSize) {\n      var allSlidesOffset = (swiperSize - _allSlidesSize) / 2;\n      snapGrid.forEach(function (snap, snapIndex) {\n        snapGrid[snapIndex] = snap - allSlidesOffset;\n      });\n      slidesGrid.forEach(function (snap, snapIndex) {\n        slidesGrid[snapIndex] = snap + allSlidesOffset;\n      });\n    }\n  }\n  swiper_src_utils_utils.extend(swiper, {\n    slides: slides,\n    snapGrid: snapGrid,\n    slidesGrid: slidesGrid,\n    slidesSizesGrid: slidesSizesGrid\n  });\n  if (slidesLength !== previousSlidesLength) {\n    swiper.emit('slidesLengthChange');\n  }\n  if (snapGrid.length !== previousSnapGridLength) {\n    if (swiper.params.watchOverflow) swiper.checkOverflow();\n    swiper.emit('snapGridLengthChange');\n  }\n  if (slidesGrid.length !== previousSlidesGridLength) {\n    swiper.emit('slidesGridLengthChange');\n  }\n  if (params.watchSlidesProgress || params.watchSlidesVisibility) {\n    swiper.updateSlidesOffset();\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateAutoHeight.js\n/* harmony default export */ var updateAutoHeight = (function (speed) {\n  var swiper = this;\n  var activeSlides = [];\n  var newHeight = 0;\n  var i;\n  if (typeof speed === 'number') {\n    swiper.setTransition(speed);\n  } else if (speed === true) {\n    swiper.setTransition(swiper.params.speed);\n  }\n  // Find slides currently in view\n  if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n    if (swiper.params.centeredSlides) {\n      swiper.visibleSlides.each(function (index, slide) {\n        activeSlides.push(slide);\n      });\n    } else {\n      for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n        var index = swiper.activeIndex + i;\n        if (index > swiper.slides.length) break;\n        activeSlides.push(swiper.slides.eq(index)[0]);\n      }\n    }\n  } else {\n    activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);\n  }\n\n  // Find new height from highest slide in view\n  for (i = 0; i < activeSlides.length; i += 1) {\n    if (typeof activeSlides[i] !== 'undefined') {\n      var height = activeSlides[i].offsetHeight;\n      newHeight = height > newHeight ? height : newHeight;\n    }\n  }\n\n  // Update Height\n  if (newHeight) swiper.$wrapperEl.css('height', \"\".concat(newHeight, \"px\"));\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateSlidesOffset.js\n/* harmony default export */ var updateSlidesOffset = (function () {\n  var swiper = this;\n  var slides = swiper.slides;\n  for (var i = 0; i < slides.length; i += 1) {\n    slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateSlidesProgress.js\n\n/* harmony default export */ var updateSlidesProgress = (function () {\n  var translate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this && this.translate || 0;\n  var swiper = this;\n  var params = swiper.params;\n  var slides = swiper.slides,\n    rtl = swiper.rtlTranslate;\n  if (slides.length === 0) return;\n  if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n  var offsetCenter = -translate;\n  if (rtl) offsetCenter = translate;\n\n  // Visible Slides\n  slides.removeClass(params.slideVisibleClass);\n  swiper.visibleSlidesIndexes = [];\n  swiper.visibleSlides = [];\n  for (var i = 0; i < slides.length; i += 1) {\n    var slide = slides[i];\n    var slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n    if (params.watchSlidesVisibility || params.centeredSlides && params.autoHeight) {\n      var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n      var slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n      var isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n      if (isVisible) {\n        swiper.visibleSlides.push(slide);\n        swiper.visibleSlidesIndexes.push(i);\n        slides.eq(i).addClass(params.slideVisibleClass);\n      }\n    }\n    slide.progress = rtl ? -slideProgress : slideProgress;\n  }\n  swiper.visibleSlides = dom(swiper.visibleSlides);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateProgress.js\n\n/* harmony default export */ var updateProgress = (function (translate) {\n  var swiper = this;\n  if (typeof translate === 'undefined') {\n    var multiplier = swiper.rtlTranslate ? -1 : 1;\n    // eslint-disable-next-line\n    translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n  }\n  var params = swiper.params;\n  var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n  var progress = swiper.progress,\n    isBeginning = swiper.isBeginning,\n    isEnd = swiper.isEnd;\n  var wasBeginning = isBeginning;\n  var wasEnd = isEnd;\n  if (translatesDiff === 0) {\n    progress = 0;\n    isBeginning = true;\n    isEnd = true;\n  } else {\n    progress = (translate - swiper.minTranslate()) / translatesDiff;\n    isBeginning = progress <= 0;\n    isEnd = progress >= 1;\n  }\n  swiper_src_utils_utils.extend(swiper, {\n    progress: progress,\n    isBeginning: isBeginning,\n    isEnd: isEnd\n  });\n  if (params.watchSlidesProgress || params.watchSlidesVisibility || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n  if (isBeginning && !wasBeginning) {\n    swiper.emit('reachBeginning toEdge');\n  }\n  if (isEnd && !wasEnd) {\n    swiper.emit('reachEnd toEdge');\n  }\n  if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n    swiper.emit('fromEdge');\n  }\n  swiper.emit('progress', progress);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateSlidesClasses.js\n/* harmony default export */ var updateSlidesClasses = (function () {\n  var swiper = this;\n  var slides = swiper.slides,\n    params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl,\n    activeIndex = swiper.activeIndex,\n    realIndex = swiper.realIndex;\n  var isVirtual = swiper.virtual && params.virtual.enabled;\n  slides.removeClass(\"\".concat(params.slideActiveClass, \" \").concat(params.slideNextClass, \" \").concat(params.slidePrevClass, \" \").concat(params.slideDuplicateActiveClass, \" \").concat(params.slideDuplicateNextClass, \" \").concat(params.slideDuplicatePrevClass));\n  var activeSlide;\n  if (isVirtual) {\n    activeSlide = swiper.$wrapperEl.find(\".\".concat(params.slideClass, \"[data-swiper-slide-index=\\\"\").concat(activeIndex, \"\\\"]\"));\n  } else {\n    activeSlide = slides.eq(activeIndex);\n  }\n\n  // Active classes\n  activeSlide.addClass(params.slideActiveClass);\n  if (params.loop) {\n    // Duplicate to all looped slides\n    if (activeSlide.hasClass(params.slideDuplicateClass)) {\n      $wrapperEl.children(\".\".concat(params.slideClass, \":not(.\").concat(params.slideDuplicateClass, \")[data-swiper-slide-index=\\\"\").concat(realIndex, \"\\\"]\")).addClass(params.slideDuplicateActiveClass);\n    } else {\n      $wrapperEl.children(\".\".concat(params.slideClass, \".\").concat(params.slideDuplicateClass, \"[data-swiper-slide-index=\\\"\").concat(realIndex, \"\\\"]\")).addClass(params.slideDuplicateActiveClass);\n    }\n  }\n  // Next Slide\n  var nextSlide = activeSlide.nextAll(\".\".concat(params.slideClass)).eq(0).addClass(params.slideNextClass);\n  if (params.loop && nextSlide.length === 0) {\n    nextSlide = slides.eq(0);\n    nextSlide.addClass(params.slideNextClass);\n  }\n  // Prev Slide\n  var prevSlide = activeSlide.prevAll(\".\".concat(params.slideClass)).eq(0).addClass(params.slidePrevClass);\n  if (params.loop && prevSlide.length === 0) {\n    prevSlide = slides.eq(-1);\n    prevSlide.addClass(params.slidePrevClass);\n  }\n  if (params.loop) {\n    // Duplicate to all looped slides\n    if (nextSlide.hasClass(params.slideDuplicateClass)) {\n      $wrapperEl.children(\".\".concat(params.slideClass, \":not(.\").concat(params.slideDuplicateClass, \")[data-swiper-slide-index=\\\"\").concat(nextSlide.attr('data-swiper-slide-index'), \"\\\"]\")).addClass(params.slideDuplicateNextClass);\n    } else {\n      $wrapperEl.children(\".\".concat(params.slideClass, \".\").concat(params.slideDuplicateClass, \"[data-swiper-slide-index=\\\"\").concat(nextSlide.attr('data-swiper-slide-index'), \"\\\"]\")).addClass(params.slideDuplicateNextClass);\n    }\n    if (prevSlide.hasClass(params.slideDuplicateClass)) {\n      $wrapperEl.children(\".\".concat(params.slideClass, \":not(.\").concat(params.slideDuplicateClass, \")[data-swiper-slide-index=\\\"\").concat(prevSlide.attr('data-swiper-slide-index'), \"\\\"]\")).addClass(params.slideDuplicatePrevClass);\n    } else {\n      $wrapperEl.children(\".\".concat(params.slideClass, \".\").concat(params.slideDuplicateClass, \"[data-swiper-slide-index=\\\"\").concat(prevSlide.attr('data-swiper-slide-index'), \"\\\"]\")).addClass(params.slideDuplicatePrevClass);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateActiveIndex.js\n\n/* harmony default export */ var updateActiveIndex = (function (newActiveIndex) {\n  var swiper = this;\n  var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n  var slidesGrid = swiper.slidesGrid,\n    snapGrid = swiper.snapGrid,\n    params = swiper.params,\n    previousIndex = swiper.activeIndex,\n    previousRealIndex = swiper.realIndex,\n    previousSnapIndex = swiper.snapIndex;\n  var activeIndex = newActiveIndex;\n  var snapIndex;\n  if (typeof activeIndex === 'undefined') {\n    for (var i = 0; i < slidesGrid.length; i += 1) {\n      if (typeof slidesGrid[i + 1] !== 'undefined') {\n        if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n          activeIndex = i;\n        } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n          activeIndex = i + 1;\n        }\n      } else if (translate >= slidesGrid[i]) {\n        activeIndex = i;\n      }\n    }\n    // Normalize slideIndex\n    if (params.normalizeSlideIndex) {\n      if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n    }\n  }\n  if (snapGrid.indexOf(translate) >= 0) {\n    snapIndex = snapGrid.indexOf(translate);\n  } else {\n    var skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n    snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n  }\n  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n  if (activeIndex === previousIndex) {\n    if (snapIndex !== previousSnapIndex) {\n      swiper.snapIndex = snapIndex;\n      swiper.emit('snapIndexChange');\n    }\n    return;\n  }\n\n  // Get real index\n  var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n  swiper_src_utils_utils.extend(swiper, {\n    snapIndex: snapIndex,\n    realIndex: realIndex,\n    previousIndex: previousIndex,\n    activeIndex: activeIndex\n  });\n  swiper.emit('activeIndexChange');\n  swiper.emit('snapIndexChange');\n  if (previousRealIndex !== realIndex) {\n    swiper.emit('realIndexChange');\n  }\n  if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n    swiper.emit('slideChange');\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/updateClickedSlide.js\n\n/* harmony default export */ var updateClickedSlide = (function (e) {\n  var swiper = this;\n  var params = swiper.params;\n  var slide = dom(e.target).closest(\".\".concat(params.slideClass))[0];\n  var slideFound = false;\n  if (slide) {\n    for (var i = 0; i < swiper.slides.length; i += 1) {\n      if (swiper.slides[i] === slide) slideFound = true;\n    }\n  }\n  if (slide && slideFound) {\n    swiper.clickedSlide = slide;\n    if (swiper.virtual && swiper.params.virtual.enabled) {\n      swiper.clickedIndex = parseInt(dom(slide).attr('data-swiper-slide-index'), 10);\n    } else {\n      swiper.clickedIndex = dom(slide).index();\n    }\n  } else {\n    swiper.clickedSlide = undefined;\n    swiper.clickedIndex = undefined;\n    return;\n  }\n  if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n    swiper.slideToClickedSlide();\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/update/index.js\n\n\n\n\n\n\n\n\n\n/* harmony default export */ var core_update = ({\n  updateSize: update_updateSize,\n  updateSlides: updateSlides,\n  updateAutoHeight: updateAutoHeight,\n  updateSlidesOffset: updateSlidesOffset,\n  updateSlidesProgress: updateSlidesProgress,\n  updateProgress: updateProgress,\n  updateSlidesClasses: updateSlidesClasses,\n  updateActiveIndex: updateActiveIndex,\n  updateClickedSlide: updateClickedSlide\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/getTranslate.js\n\n/* harmony default export */ var getTranslate = (function () {\n  var axis = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.isHorizontal() ? 'x' : 'y';\n  var swiper = this;\n  var params = swiper.params,\n    rtl = swiper.rtlTranslate,\n    translate = swiper.translate,\n    $wrapperEl = swiper.$wrapperEl;\n  if (params.virtualTranslate) {\n    return rtl ? -translate : translate;\n  }\n  if (params.cssMode) {\n    return translate;\n  }\n  var currentTranslate = swiper_src_utils_utils.getTranslate($wrapperEl[0], axis);\n  if (rtl) currentTranslate = -currentTranslate;\n  return currentTranslate || 0;\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/setTranslate.js\n/* harmony default export */ var translate_setTranslate = (function (translate, byController) {\n  var swiper = this;\n  var rtl = swiper.rtlTranslate,\n    params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl,\n    wrapperEl = swiper.wrapperEl,\n    progress = swiper.progress;\n  var x = 0;\n  var y = 0;\n  var z = 0;\n  if (swiper.isHorizontal()) {\n    x = rtl ? -translate : translate;\n  } else {\n    y = translate;\n  }\n  if (params.roundLengths) {\n    x = Math.floor(x);\n    y = Math.floor(y);\n  }\n  if (params.cssMode) {\n    wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n  } else if (!params.virtualTranslate) {\n    $wrapperEl.transform(\"translate3d(\".concat(x, \"px, \").concat(y, \"px, \").concat(z, \"px)\"));\n  }\n  swiper.previousTranslate = swiper.translate;\n  swiper.translate = swiper.isHorizontal() ? x : y;\n\n  // Check if we need to update progress\n  var newProgress;\n  var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n  if (translatesDiff === 0) {\n    newProgress = 0;\n  } else {\n    newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n  }\n  if (newProgress !== progress) {\n    swiper.updateProgress(translate);\n  }\n  swiper.emit('setTranslate', swiper.translate, byController);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/minTranslate.js\n/* harmony default export */ var translate_minTranslate = (function () {\n  return -this.snapGrid[0];\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/maxTranslate.js\n/* harmony default export */ var translate_maxTranslate = (function () {\n  return -this.snapGrid[this.snapGrid.length - 1];\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/translateTo.js\n\n/* harmony default export */ var translateTo = (function () {\n  var translate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed;\n  var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  var translateBounds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n  var internal = arguments.length > 4 ? arguments[4] : undefined;\n  var swiper = this;\n  var params = swiper.params,\n    wrapperEl = swiper.wrapperEl;\n  if (swiper.animating && params.preventInteractionOnTransition) {\n    return false;\n  }\n  var minTranslate = swiper.minTranslate();\n  var maxTranslate = swiper.maxTranslate();\n  var newTranslate;\n  if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n  // Update progress\n  swiper.updateProgress(newTranslate);\n  if (params.cssMode) {\n    var isH = swiper.isHorizontal();\n    if (speed === 0) {\n      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n    } else {\n      // eslint-disable-next-line\n      if (wrapperEl.scrollTo) {\n        wrapperEl.scrollTo(defineProperty_default()(defineProperty_default()({}, isH ? 'left' : 'top', -newTranslate), \"behavior\", 'smooth'));\n      } else {\n        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n      }\n    }\n    return true;\n  }\n  if (speed === 0) {\n    swiper.setTransition(0);\n    swiper.setTranslate(newTranslate);\n    if (runCallbacks) {\n      swiper.emit('beforeTransitionStart', speed, internal);\n      swiper.emit('transitionEnd');\n    }\n  } else {\n    swiper.setTransition(speed);\n    swiper.setTranslate(newTranslate);\n    if (runCallbacks) {\n      swiper.emit('beforeTransitionStart', speed, internal);\n      swiper.emit('transitionStart');\n    }\n    if (!swiper.animating) {\n      swiper.animating = true;\n      if (!swiper.onTranslateToWrapperTransitionEnd) {\n        swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n          if (!swiper || swiper.destroyed) return;\n          if (e.target !== this) return;\n          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n          swiper.onTranslateToWrapperTransitionEnd = null;\n          delete swiper.onTranslateToWrapperTransitionEnd;\n          if (runCallbacks) {\n            swiper.emit('transitionEnd');\n          }\n        };\n      }\n      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n    }\n  }\n  return true;\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/translate/index.js\n\n\n\n\n\n/* harmony default export */ var core_translate = ({\n  getTranslate: getTranslate,\n  setTranslate: translate_setTranslate,\n  minTranslate: translate_minTranslate,\n  maxTranslate: translate_maxTranslate,\n  translateTo: translateTo\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/transition/setTransition.js\n/* harmony default export */ var transition_setTransition = (function (duration, byController) {\n  var swiper = this;\n  if (!swiper.params.cssMode) {\n    swiper.$wrapperEl.transition(duration);\n  }\n  swiper.emit('setTransition', duration, byController);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/transition/transitionStart.js\n/* harmony default export */ var transitionStart = (function () {\n  var runCallbacks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  var direction = arguments.length > 1 ? arguments[1] : undefined;\n  var swiper = this;\n  var activeIndex = swiper.activeIndex,\n    params = swiper.params,\n    previousIndex = swiper.previousIndex;\n  if (params.cssMode) return;\n  if (params.autoHeight) {\n    swiper.updateAutoHeight();\n  }\n  var dir = direction;\n  if (!dir) {\n    if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n  }\n  swiper.emit('transitionStart');\n  if (runCallbacks && activeIndex !== previousIndex) {\n    if (dir === 'reset') {\n      swiper.emit('slideResetTransitionStart');\n      return;\n    }\n    swiper.emit('slideChangeTransitionStart');\n    if (dir === 'next') {\n      swiper.emit('slideNextTransitionStart');\n    } else {\n      swiper.emit('slidePrevTransitionStart');\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/transition/transitionEnd.js\n/* harmony default export */ var transition_transitionEnd = (function () {\n  var runCallbacks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  var direction = arguments.length > 1 ? arguments[1] : undefined;\n  var swiper = this;\n  var activeIndex = swiper.activeIndex,\n    previousIndex = swiper.previousIndex,\n    params = swiper.params;\n  swiper.animating = false;\n  if (params.cssMode) return;\n  swiper.setTransition(0);\n  var dir = direction;\n  if (!dir) {\n    if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n  }\n  swiper.emit('transitionEnd');\n  if (runCallbacks && activeIndex !== previousIndex) {\n    if (dir === 'reset') {\n      swiper.emit('slideResetTransitionEnd');\n      return;\n    }\n    swiper.emit('slideChangeTransitionEnd');\n    if (dir === 'next') {\n      swiper.emit('slideNextTransitionEnd');\n    } else {\n      swiper.emit('slidePrevTransitionEnd');\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/transition/index.js\n\n\n\n/* harmony default export */ var core_transition = ({\n  setTransition: transition_setTransition,\n  transitionStart: transitionStart,\n  transitionEnd: transition_transitionEnd\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideTo.js\n\n/* harmony default export */ var slideTo = (function () {\n  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed;\n  var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  var internal = arguments.length > 3 ? arguments[3] : undefined;\n  var swiper = this;\n  var slideIndex = index;\n  if (slideIndex < 0) slideIndex = 0;\n  var params = swiper.params,\n    snapGrid = swiper.snapGrid,\n    slidesGrid = swiper.slidesGrid,\n    previousIndex = swiper.previousIndex,\n    activeIndex = swiper.activeIndex,\n    rtl = swiper.rtlTranslate,\n    wrapperEl = swiper.wrapperEl;\n  if (swiper.animating && params.preventInteractionOnTransition) {\n    return false;\n  }\n  var skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n  var snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n  if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n    swiper.emit('beforeSlideChangeStart');\n  }\n  var translate = -snapGrid[snapIndex];\n\n  // Update progress\n  swiper.updateProgress(translate);\n\n  // Normalize slideIndex\n  if (params.normalizeSlideIndex) {\n    for (var i = 0; i < slidesGrid.length; i += 1) {\n      if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {\n        slideIndex = i;\n      }\n    }\n  }\n  // Directions locks\n  if (swiper.initialized && slideIndex !== activeIndex) {\n    if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n      return false;\n    }\n    if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n      if ((activeIndex || 0) !== slideIndex) return false;\n    }\n  }\n  var direction;\n  if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n  // Update Index\n  if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n    swiper.updateActiveIndex(slideIndex);\n    // Update Height\n    if (params.autoHeight) {\n      swiper.updateAutoHeight();\n    }\n    swiper.updateSlidesClasses();\n    if (params.effect !== 'slide') {\n      swiper.setTranslate(translate);\n    }\n    if (direction !== 'reset') {\n      swiper.transitionStart(runCallbacks, direction);\n      swiper.transitionEnd(runCallbacks, direction);\n    }\n    return false;\n  }\n  if (params.cssMode) {\n    var isH = swiper.isHorizontal();\n    var t = -translate;\n    if (rtl) {\n      t = wrapperEl.scrollWidth - wrapperEl.offsetWidth - t;\n    }\n    if (speed === 0) {\n      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n    } else {\n      // eslint-disable-next-line\n      if (wrapperEl.scrollTo) {\n        wrapperEl.scrollTo(defineProperty_default()(defineProperty_default()({}, isH ? 'left' : 'top', t), \"behavior\", 'smooth'));\n      } else {\n        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n      }\n    }\n    return true;\n  }\n  if (speed === 0) {\n    swiper.setTransition(0);\n    swiper.setTranslate(translate);\n    swiper.updateActiveIndex(slideIndex);\n    swiper.updateSlidesClasses();\n    swiper.emit('beforeTransitionStart', speed, internal);\n    swiper.transitionStart(runCallbacks, direction);\n    swiper.transitionEnd(runCallbacks, direction);\n  } else {\n    swiper.setTransition(speed);\n    swiper.setTranslate(translate);\n    swiper.updateActiveIndex(slideIndex);\n    swiper.updateSlidesClasses();\n    swiper.emit('beforeTransitionStart', speed, internal);\n    swiper.transitionStart(runCallbacks, direction);\n    if (!swiper.animating) {\n      swiper.animating = true;\n      if (!swiper.onSlideToWrapperTransitionEnd) {\n        swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n          if (!swiper || swiper.destroyed) return;\n          if (e.target !== this) return;\n          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n          swiper.onSlideToWrapperTransitionEnd = null;\n          delete swiper.onSlideToWrapperTransitionEnd;\n          swiper.transitionEnd(runCallbacks, direction);\n        };\n      }\n      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n    }\n  }\n  return true;\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideToLoop.js\n/* harmony default export */ var slideToLoop = (function () {\n  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n  var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed;\n  var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  var internal = arguments.length > 3 ? arguments[3] : undefined;\n  var swiper = this;\n  var newIndex = index;\n  if (swiper.params.loop) {\n    newIndex += swiper.loopedSlides;\n  }\n  return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideNext.js\n/* eslint no-unused-vars: \"off\" */\n/* harmony default export */ var slideNext = (function () {\n  var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed;\n  var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var internal = arguments.length > 2 ? arguments[2] : undefined;\n  var swiper = this;\n  var params = swiper.params,\n    animating = swiper.animating;\n  var increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup;\n  if (params.loop) {\n    if (animating) return false;\n    swiper.loopFix();\n    // eslint-disable-next-line\n    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n  }\n  return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slidePrev.js\n/* eslint no-unused-vars: \"off\" */\n/* harmony default export */ var slidePrev = (function () {\n  var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed;\n  var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var internal = arguments.length > 2 ? arguments[2] : undefined;\n  var swiper = this;\n  var params = swiper.params,\n    animating = swiper.animating,\n    snapGrid = swiper.snapGrid,\n    slidesGrid = swiper.slidesGrid,\n    rtlTranslate = swiper.rtlTranslate;\n  if (params.loop) {\n    if (animating) return false;\n    swiper.loopFix();\n    // eslint-disable-next-line\n    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n  }\n  var translate = rtlTranslate ? swiper.translate : -swiper.translate;\n  function normalize(val) {\n    if (val < 0) return -Math.floor(Math.abs(val));\n    return Math.floor(val);\n  }\n  var normalizedTranslate = normalize(translate);\n  var normalizedSnapGrid = snapGrid.map(function (val) {\n    return normalize(val);\n  });\n  var normalizedSlidesGrid = slidesGrid.map(function (val) {\n    return normalize(val);\n  });\n  var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];\n  var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n  if (typeof prevSnap === 'undefined' && params.cssMode) {\n    snapGrid.forEach(function (snap) {\n      if (!prevSnap && normalizedTranslate >= snap) prevSnap = snap;\n    });\n  }\n  var prevIndex;\n  if (typeof prevSnap !== 'undefined') {\n    prevIndex = slidesGrid.indexOf(prevSnap);\n    if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n  }\n  return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideReset.js\n/* eslint no-unused-vars: \"off\" */\n/* harmony default export */ var slideReset = (function () {\n  var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed;\n  var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var internal = arguments.length > 2 ? arguments[2] : undefined;\n  var swiper = this;\n  return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideToClosest.js\n/* eslint no-unused-vars: \"off\" */\n/* harmony default export */ var slideToClosest = (function () {\n  var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed;\n  var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var internal = arguments.length > 2 ? arguments[2] : undefined;\n  var threshold = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.5;\n  var swiper = this;\n  var index = swiper.activeIndex;\n  var skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n  var snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n  var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n  if (translate >= swiper.snapGrid[snapIndex]) {\n    // The current translate is on or after the current snap index, so the choice\n    // is between the current index and the one after it.\n    var currentSnap = swiper.snapGrid[snapIndex];\n    var nextSnap = swiper.snapGrid[snapIndex + 1];\n    if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n      index += swiper.params.slidesPerGroup;\n    }\n  } else {\n    // The current translate is before the current snap index, so the choice\n    // is between the current index and the one before it.\n    var prevSnap = swiper.snapGrid[snapIndex - 1];\n    var _currentSnap = swiper.snapGrid[snapIndex];\n    if (translate - prevSnap <= (_currentSnap - prevSnap) * threshold) {\n      index -= swiper.params.slidesPerGroup;\n    }\n  }\n  index = Math.max(index, 0);\n  index = Math.min(index, swiper.slidesGrid.length - 1);\n  return swiper.slideTo(index, speed, runCallbacks, internal);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/slideToClickedSlide.js\n\n\n/* harmony default export */ var slideToClickedSlide = (function () {\n  var swiper = this;\n  var params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl;\n  var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n  var slideToIndex = swiper.clickedIndex;\n  var realIndex;\n  if (params.loop) {\n    if (swiper.animating) return;\n    realIndex = parseInt(dom(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n    if (params.centeredSlides) {\n      if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n        swiper.loopFix();\n        slideToIndex = $wrapperEl.children(\".\".concat(params.slideClass, \"[data-swiper-slide-index=\\\"\").concat(realIndex, \"\\\"]:not(.\").concat(params.slideDuplicateClass, \")\")).eq(0).index();\n        swiper_src_utils_utils.nextTick(function () {\n          swiper.slideTo(slideToIndex);\n        });\n      } else {\n        swiper.slideTo(slideToIndex);\n      }\n    } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n      swiper.loopFix();\n      slideToIndex = $wrapperEl.children(\".\".concat(params.slideClass, \"[data-swiper-slide-index=\\\"\").concat(realIndex, \"\\\"]:not(.\").concat(params.slideDuplicateClass, \")\")).eq(0).index();\n      swiper_src_utils_utils.nextTick(function () {\n        swiper.slideTo(slideToIndex);\n      });\n    } else {\n      swiper.slideTo(slideToIndex);\n    }\n  } else {\n    swiper.slideTo(slideToIndex);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/slide/index.js\n\n\n\n\n\n\n\n/* harmony default export */ var core_slide = ({\n  slideTo: slideTo,\n  slideToLoop: slideToLoop,\n  slideNext: slideNext,\n  slidePrev: slidePrev,\n  slideReset: slideReset,\n  slideToClosest: slideToClosest,\n  slideToClickedSlide: slideToClickedSlide\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/loop/loopCreate.js\n\n\n/* harmony default export */ var loopCreate = (function () {\n  var swiper = this;\n  var params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl;\n  // Remove duplicated slides\n  $wrapperEl.children(\".\".concat(params.slideClass, \".\").concat(params.slideDuplicateClass)).remove();\n  var slides = $wrapperEl.children(\".\".concat(params.slideClass));\n  if (params.loopFillGroupWithBlank) {\n    var blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n    if (blankSlidesNum !== params.slidesPerGroup) {\n      for (var i = 0; i < blankSlidesNum; i += 1) {\n        var blankNode = dom(ssr_window_esm[\"document\"].createElement('div')).addClass(\"\".concat(params.slideClass, \" \").concat(params.slideBlankClass));\n        $wrapperEl.append(blankNode);\n      }\n      slides = $wrapperEl.children(\".\".concat(params.slideClass));\n    }\n  }\n  if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n  swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n  swiper.loopedSlides += params.loopAdditionalSlides;\n  if (swiper.loopedSlides > slides.length) {\n    swiper.loopedSlides = slides.length;\n  }\n  var prependSlides = [];\n  var appendSlides = [];\n  slides.each(function (index, el) {\n    var slide = dom(el);\n    if (index < swiper.loopedSlides) appendSlides.push(el);\n    if (index < slides.length && index >= slides.length - swiper.loopedSlides) prependSlides.push(el);\n    slide.attr('data-swiper-slide-index', index);\n  });\n  for (var _i = 0; _i < appendSlides.length; _i += 1) {\n    $wrapperEl.append(dom(appendSlides[_i].cloneNode(true)).addClass(params.slideDuplicateClass));\n  }\n  for (var _i2 = prependSlides.length - 1; _i2 >= 0; _i2 -= 1) {\n    $wrapperEl.prepend(dom(prependSlides[_i2].cloneNode(true)).addClass(params.slideDuplicateClass));\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/loop/loopFix.js\n/* harmony default export */ var loopFix = (function () {\n  var swiper = this;\n  swiper.emit('beforeLoopFix');\n  var activeIndex = swiper.activeIndex,\n    slides = swiper.slides,\n    loopedSlides = swiper.loopedSlides,\n    allowSlidePrev = swiper.allowSlidePrev,\n    allowSlideNext = swiper.allowSlideNext,\n    snapGrid = swiper.snapGrid,\n    rtl = swiper.rtlTranslate;\n  var newIndex;\n  swiper.allowSlidePrev = true;\n  swiper.allowSlideNext = true;\n  var snapTranslate = -snapGrid[activeIndex];\n  var diff = snapTranslate - swiper.getTranslate();\n\n  // Fix For Negative Oversliding\n  if (activeIndex < loopedSlides) {\n    newIndex = slides.length - loopedSlides * 3 + activeIndex;\n    newIndex += loopedSlides;\n    var slideChanged = swiper.slideTo(newIndex, 0, false, true);\n    if (slideChanged && diff !== 0) {\n      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n    }\n  } else if (activeIndex >= slides.length - loopedSlides) {\n    // Fix For Positive Oversliding\n    newIndex = -slides.length + activeIndex + loopedSlides;\n    newIndex += loopedSlides;\n    var _slideChanged = swiper.slideTo(newIndex, 0, false, true);\n    if (_slideChanged && diff !== 0) {\n      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n    }\n  }\n  swiper.allowSlidePrev = allowSlidePrev;\n  swiper.allowSlideNext = allowSlideNext;\n  swiper.emit('loopFix');\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/loop/loopDestroy.js\n/* harmony default export */ var loopDestroy = (function () {\n  var swiper = this;\n  var $wrapperEl = swiper.$wrapperEl,\n    params = swiper.params,\n    slides = swiper.slides;\n  $wrapperEl.children(\".\".concat(params.slideClass, \".\").concat(params.slideDuplicateClass, \",.\").concat(params.slideClass, \".\").concat(params.slideBlankClass)).remove();\n  slides.removeAttr('data-swiper-slide-index');\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/loop/index.js\n\n\n\n/* harmony default export */ var core_loop = ({\n  loopCreate: loopCreate,\n  loopFix: loopFix,\n  loopDestroy: loopDestroy\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/grab-cursor/setGrabCursor.js\n\n/* harmony default export */ var setGrabCursor = (function (moving) {\n  var swiper = this;\n  if (swiper_src_utils_support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n  var el = swiper.el;\n  el.style.cursor = 'move';\n  el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n  el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n  el.style.cursor = moving ? 'grabbing' : 'grab';\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/grab-cursor/unsetGrabCursor.js\n\n/* harmony default export */ var unsetGrabCursor = (function () {\n  var swiper = this;\n  if (swiper_src_utils_support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n  swiper.el.style.cursor = '';\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/grab-cursor/index.js\n\n\n/* harmony default export */ var grab_cursor = ({\n  setGrabCursor: setGrabCursor,\n  unsetGrabCursor: unsetGrabCursor\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/appendSlide.js\n\n\n/* harmony default export */ var manipulation_appendSlide = (function (slides) {\n  var swiper = this;\n  var $wrapperEl = swiper.$wrapperEl,\n    params = swiper.params;\n  if (params.loop) {\n    swiper.loopDestroy();\n  }\n  if (typeof_default()(slides) === 'object' && 'length' in slides) {\n    for (var i = 0; i < slides.length; i += 1) {\n      if (slides[i]) $wrapperEl.append(slides[i]);\n    }\n  } else {\n    $wrapperEl.append(slides);\n  }\n  if (params.loop) {\n    swiper.loopCreate();\n  }\n  if (!(params.observer && swiper_src_utils_support.observer)) {\n    swiper.update();\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/prependSlide.js\n\n\n/* harmony default export */ var prependSlide = (function (slides) {\n  var swiper = this;\n  var params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl,\n    activeIndex = swiper.activeIndex;\n  if (params.loop) {\n    swiper.loopDestroy();\n  }\n  var newActiveIndex = activeIndex + 1;\n  if (typeof_default()(slides) === 'object' && 'length' in slides) {\n    for (var i = 0; i < slides.length; i += 1) {\n      if (slides[i]) $wrapperEl.prepend(slides[i]);\n    }\n    newActiveIndex = activeIndex + slides.length;\n  } else {\n    $wrapperEl.prepend(slides);\n  }\n  if (params.loop) {\n    swiper.loopCreate();\n  }\n  if (!(params.observer && swiper_src_utils_support.observer)) {\n    swiper.update();\n  }\n  swiper.slideTo(newActiveIndex, 0, false);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/addSlide.js\n\n\n/* harmony default export */ var addSlide = (function (index, slides) {\n  var swiper = this;\n  var $wrapperEl = swiper.$wrapperEl,\n    params = swiper.params,\n    activeIndex = swiper.activeIndex;\n  var activeIndexBuffer = activeIndex;\n  if (params.loop) {\n    activeIndexBuffer -= swiper.loopedSlides;\n    swiper.loopDestroy();\n    swiper.slides = $wrapperEl.children(\".\".concat(params.slideClass));\n  }\n  var baseLength = swiper.slides.length;\n  if (index <= 0) {\n    swiper.prependSlide(slides);\n    return;\n  }\n  if (index >= baseLength) {\n    swiper.appendSlide(slides);\n    return;\n  }\n  var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n  var slidesBuffer = [];\n  for (var i = baseLength - 1; i >= index; i -= 1) {\n    var currentSlide = swiper.slides.eq(i);\n    currentSlide.remove();\n    slidesBuffer.unshift(currentSlide);\n  }\n  if (typeof_default()(slides) === 'object' && 'length' in slides) {\n    for (var _i = 0; _i < slides.length; _i += 1) {\n      if (slides[_i]) $wrapperEl.append(slides[_i]);\n    }\n    newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n  } else {\n    $wrapperEl.append(slides);\n  }\n  for (var _i2 = 0; _i2 < slidesBuffer.length; _i2 += 1) {\n    $wrapperEl.append(slidesBuffer[_i2]);\n  }\n  if (params.loop) {\n    swiper.loopCreate();\n  }\n  if (!(params.observer && swiper_src_utils_support.observer)) {\n    swiper.update();\n  }\n  if (params.loop) {\n    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n  } else {\n    swiper.slideTo(newActiveIndex, 0, false);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/removeSlide.js\n\n\n/* harmony default export */ var removeSlide = (function (slidesIndexes) {\n  var swiper = this;\n  var params = swiper.params,\n    $wrapperEl = swiper.$wrapperEl,\n    activeIndex = swiper.activeIndex;\n  var activeIndexBuffer = activeIndex;\n  if (params.loop) {\n    activeIndexBuffer -= swiper.loopedSlides;\n    swiper.loopDestroy();\n    swiper.slides = $wrapperEl.children(\".\".concat(params.slideClass));\n  }\n  var newActiveIndex = activeIndexBuffer;\n  var indexToRemove;\n  if (typeof_default()(slidesIndexes) === 'object' && 'length' in slidesIndexes) {\n    for (var i = 0; i < slidesIndexes.length; i += 1) {\n      indexToRemove = slidesIndexes[i];\n      if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n      if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n    }\n    newActiveIndex = Math.max(newActiveIndex, 0);\n  } else {\n    indexToRemove = slidesIndexes;\n    if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n    if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n    newActiveIndex = Math.max(newActiveIndex, 0);\n  }\n  if (params.loop) {\n    swiper.loopCreate();\n  }\n  if (!(params.observer && swiper_src_utils_support.observer)) {\n    swiper.update();\n  }\n  if (params.loop) {\n    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n  } else {\n    swiper.slideTo(newActiveIndex, 0, false);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/removeAllSlides.js\n/* harmony default export */ var removeAllSlides = (function () {\n  var swiper = this;\n  var slidesIndexes = [];\n  for (var i = 0; i < swiper.slides.length; i += 1) {\n    slidesIndexes.push(i);\n  }\n  swiper.removeSlide(slidesIndexes);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/manipulation/index.js\n\n\n\n\n\n/* harmony default export */ var manipulation = ({\n  appendSlide: manipulation_appendSlide,\n  prependSlide: prependSlide,\n  addSlide: addSlide,\n  removeSlide: removeSlide,\n  removeAllSlides: removeAllSlides\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/device.js\n\n/* harmony default export */ var utils_device = (device[\"default\"]);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onTouchStart.js\n\n\n\n/* harmony default export */ var events_onTouchStart = (function (event) {\n  var swiper = this;\n  var data = swiper.touchEventsData;\n  var params = swiper.params,\n    touches = swiper.touches;\n  if (swiper.animating && params.preventInteractionOnTransition) {\n    return;\n  }\n  var e = event;\n  if (e.originalEvent) e = e.originalEvent;\n  var $targetEl = dom(e.target);\n  if (params.touchEventsTarget === 'wrapper') {\n    if (!$targetEl.closest(swiper.wrapperEl).length) return;\n  }\n  data.isTouchEvent = e.type === 'touchstart';\n  if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n  if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n  if (data.isTouched && data.isMoved) return;\n  if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : \".\".concat(params.noSwipingClass))[0]) {\n    swiper.allowClick = true;\n    return;\n  }\n  if (params.swipeHandler) {\n    if (!$targetEl.closest(params.swipeHandler)[0]) return;\n  }\n  touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n  touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n  var startX = touches.currentX;\n  var startY = touches.currentY;\n\n  // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n\n  var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n  var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n  if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= ssr_window_esm[\"window\"].screen.width - edgeSwipeThreshold)) {\n    return;\n  }\n  swiper_src_utils_utils.extend(data, {\n    isTouched: true,\n    isMoved: false,\n    allowTouchCallbacks: true,\n    isScrolling: undefined,\n    startMoving: undefined\n  });\n  touches.startX = startX;\n  touches.startY = startY;\n  data.touchStartTime = swiper_src_utils_utils.now();\n  swiper.allowClick = true;\n  swiper.updateSize();\n  swiper.swipeDirection = undefined;\n  if (params.threshold > 0) data.allowThresholdMove = false;\n  if (e.type !== 'touchstart') {\n    var preventDefault = true;\n    if ($targetEl.is(data.formElements)) preventDefault = false;\n    if (ssr_window_esm[\"document\"].activeElement && dom(ssr_window_esm[\"document\"].activeElement).is(data.formElements) && ssr_window_esm[\"document\"].activeElement !== $targetEl[0]) {\n      ssr_window_esm[\"document\"].activeElement.blur();\n    }\n    var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n    if (params.touchStartForcePreventDefault || shouldPreventDefault) {\n      e.preventDefault();\n    }\n  }\n  swiper.emit('touchStart', e);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onTouchMove.js\n\n\n\n/* harmony default export */ var events_onTouchMove = (function (event) {\n  var swiper = this;\n  var data = swiper.touchEventsData;\n  var params = swiper.params,\n    touches = swiper.touches,\n    rtl = swiper.rtlTranslate;\n  var e = event;\n  if (e.originalEvent) e = e.originalEvent;\n  if (!data.isTouched) {\n    if (data.startMoving && data.isScrolling) {\n      swiper.emit('touchMoveOpposite', e);\n    }\n    return;\n  }\n  if (data.isTouchEvent && e.type !== 'touchmove') return;\n  var targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n  var pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n  var pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n  if (e.preventedByNestedSwiper) {\n    touches.startX = pageX;\n    touches.startY = pageY;\n    return;\n  }\n  if (!swiper.allowTouchMove) {\n    // isMoved = true;\n    swiper.allowClick = false;\n    if (data.isTouched) {\n      swiper_src_utils_utils.extend(touches, {\n        startX: pageX,\n        startY: pageY,\n        currentX: pageX,\n        currentY: pageY\n      });\n      data.touchStartTime = swiper_src_utils_utils.now();\n    }\n    return;\n  }\n  if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n    if (swiper.isVertical()) {\n      // Vertical\n      if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n        data.isTouched = false;\n        data.isMoved = false;\n        return;\n      }\n    } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n      return;\n    }\n  }\n  if (data.isTouchEvent && ssr_window_esm[\"document\"].activeElement) {\n    if (e.target === ssr_window_esm[\"document\"].activeElement && dom(e.target).is(data.formElements)) {\n      data.isMoved = true;\n      swiper.allowClick = false;\n      return;\n    }\n  }\n  if (data.allowTouchCallbacks) {\n    swiper.emit('touchMove', e);\n  }\n  if (e.targetTouches && e.targetTouches.length > 1) return;\n  touches.currentX = pageX;\n  touches.currentY = pageY;\n  var diffX = touches.currentX - touches.startX;\n  var diffY = touches.currentY - touches.startY;\n  if (swiper.params.threshold && Math.sqrt(Math.pow(diffX, 2) + Math.pow(diffY, 2)) < swiper.params.threshold) return;\n  if (typeof data.isScrolling === 'undefined') {\n    var touchAngle;\n    if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n      data.isScrolling = false;\n    } else {\n      // eslint-disable-next-line\n      if (diffX * diffX + diffY * diffY >= 25) {\n        touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n        data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n      }\n    }\n  }\n  if (data.isScrolling) {\n    swiper.emit('touchMoveOpposite', e);\n  }\n  if (typeof data.startMoving === 'undefined') {\n    if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n      data.startMoving = true;\n    }\n  }\n  if (data.isScrolling) {\n    data.isTouched = false;\n    return;\n  }\n  if (!data.startMoving) {\n    return;\n  }\n  swiper.allowClick = false;\n  if (!params.cssMode && e.cancelable) {\n    e.preventDefault();\n  }\n  if (params.touchMoveStopPropagation && !params.nested) {\n    e.stopPropagation();\n  }\n  if (!data.isMoved) {\n    if (params.loop) {\n      swiper.loopFix();\n    }\n    data.startTranslate = swiper.getTranslate();\n    swiper.setTransition(0);\n    if (swiper.animating) {\n      swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n    }\n    data.allowMomentumBounce = false;\n    // Grab Cursor\n    if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n      swiper.setGrabCursor(true);\n    }\n    swiper.emit('sliderFirstMove', e);\n  }\n  swiper.emit('sliderMove', e);\n  data.isMoved = true;\n  var diff = swiper.isHorizontal() ? diffX : diffY;\n  touches.diff = diff;\n  diff *= params.touchRatio;\n  if (rtl) diff = -diff;\n  swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n  data.currentTranslate = diff + data.startTranslate;\n  var disableParentSwiper = true;\n  var resistanceRatio = params.resistanceRatio;\n  if (params.touchReleaseOnEdges) {\n    resistanceRatio = 0;\n  }\n  if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n    disableParentSwiper = false;\n    if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + Math.pow(-swiper.minTranslate() + data.startTranslate + diff, resistanceRatio);\n  } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n    disableParentSwiper = false;\n    if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - Math.pow(swiper.maxTranslate() - data.startTranslate - diff, resistanceRatio);\n  }\n  if (disableParentSwiper) {\n    e.preventedByNestedSwiper = true;\n  }\n\n  // Directions locks\n  if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n    data.currentTranslate = data.startTranslate;\n  }\n  if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n    data.currentTranslate = data.startTranslate;\n  }\n\n  // Threshold\n  if (params.threshold > 0) {\n    if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n      if (!data.allowThresholdMove) {\n        data.allowThresholdMove = true;\n        touches.startX = touches.currentX;\n        touches.startY = touches.currentY;\n        data.currentTranslate = data.startTranslate;\n        touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n        return;\n      }\n    } else {\n      data.currentTranslate = data.startTranslate;\n      return;\n    }\n  }\n  if (!params.followFinger || params.cssMode) return;\n\n  // Update active index in free mode\n  if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {\n    swiper.updateActiveIndex();\n    swiper.updateSlidesClasses();\n  }\n  if (params.freeMode) {\n    // Velocity\n    if (data.velocities.length === 0) {\n      data.velocities.push({\n        position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n        time: data.touchStartTime\n      });\n    }\n    data.velocities.push({\n      position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n      time: swiper_src_utils_utils.now()\n    });\n  }\n  // Update progress\n  swiper.updateProgress(data.currentTranslate);\n  // Update translate\n  swiper.setTranslate(data.currentTranslate);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onTouchEnd.js\n\n/* harmony default export */ var events_onTouchEnd = (function (event) {\n  var swiper = this;\n  var data = swiper.touchEventsData;\n  var params = swiper.params,\n    touches = swiper.touches,\n    rtl = swiper.rtlTranslate,\n    $wrapperEl = swiper.$wrapperEl,\n    slidesGrid = swiper.slidesGrid,\n    snapGrid = swiper.snapGrid;\n  var e = event;\n  if (e.originalEvent) e = e.originalEvent;\n  if (data.allowTouchCallbacks) {\n    swiper.emit('touchEnd', e);\n  }\n  data.allowTouchCallbacks = false;\n  if (!data.isTouched) {\n    if (data.isMoved && params.grabCursor) {\n      swiper.setGrabCursor(false);\n    }\n    data.isMoved = false;\n    data.startMoving = false;\n    return;\n  }\n  // Return Grab Cursor\n  if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n    swiper.setGrabCursor(false);\n  }\n\n  // Time diff\n  var touchEndTime = swiper_src_utils_utils.now();\n  var timeDiff = touchEndTime - data.touchStartTime;\n\n  // Tap, doubleTap, Click\n  if (swiper.allowClick) {\n    swiper.updateClickedSlide(e);\n    swiper.emit('tap click', e);\n    if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n      swiper.emit('doubleTap doubleClick', e);\n    }\n  }\n  data.lastClickTime = swiper_src_utils_utils.now();\n  swiper_src_utils_utils.nextTick(function () {\n    if (!swiper.destroyed) swiper.allowClick = true;\n  });\n  if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n    data.isTouched = false;\n    data.isMoved = false;\n    data.startMoving = false;\n    return;\n  }\n  data.isTouched = false;\n  data.isMoved = false;\n  data.startMoving = false;\n  var currentPos;\n  if (params.followFinger) {\n    currentPos = rtl ? swiper.translate : -swiper.translate;\n  } else {\n    currentPos = -data.currentTranslate;\n  }\n  if (params.cssMode) {\n    return;\n  }\n  if (params.freeMode) {\n    if (currentPos < -swiper.minTranslate()) {\n      swiper.slideTo(swiper.activeIndex);\n      return;\n    }\n    if (currentPos > -swiper.maxTranslate()) {\n      if (swiper.slides.length < snapGrid.length) {\n        swiper.slideTo(snapGrid.length - 1);\n      } else {\n        swiper.slideTo(swiper.slides.length - 1);\n      }\n      return;\n    }\n    if (params.freeModeMomentum) {\n      if (data.velocities.length > 1) {\n        var lastMoveEvent = data.velocities.pop();\n        var velocityEvent = data.velocities.pop();\n        var distance = lastMoveEvent.position - velocityEvent.position;\n        var time = lastMoveEvent.time - velocityEvent.time;\n        swiper.velocity = distance / time;\n        swiper.velocity /= 2;\n        if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {\n          swiper.velocity = 0;\n        }\n        // this implies that the user stopped moving a finger then released.\n        // There would be no events with distance zero, so the last event is stale.\n        if (time > 150 || swiper_src_utils_utils.now() - lastMoveEvent.time > 300) {\n          swiper.velocity = 0;\n        }\n      } else {\n        swiper.velocity = 0;\n      }\n      swiper.velocity *= params.freeModeMomentumVelocityRatio;\n      data.velocities.length = 0;\n      var momentumDuration = 1000 * params.freeModeMomentumRatio;\n      var momentumDistance = swiper.velocity * momentumDuration;\n      var newPosition = swiper.translate + momentumDistance;\n      if (rtl) newPosition = -newPosition;\n      var doBounce = false;\n      var afterBouncePosition;\n      var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;\n      var needsLoopFix;\n      if (newPosition < swiper.maxTranslate()) {\n        if (params.freeModeMomentumBounce) {\n          if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n            newPosition = swiper.maxTranslate() - bounceAmount;\n          }\n          afterBouncePosition = swiper.maxTranslate();\n          doBounce = true;\n          data.allowMomentumBounce = true;\n        } else {\n          newPosition = swiper.maxTranslate();\n        }\n        if (params.loop && params.centeredSlides) needsLoopFix = true;\n      } else if (newPosition > swiper.minTranslate()) {\n        if (params.freeModeMomentumBounce) {\n          if (newPosition - swiper.minTranslate() > bounceAmount) {\n            newPosition = swiper.minTranslate() + bounceAmount;\n          }\n          afterBouncePosition = swiper.minTranslate();\n          doBounce = true;\n          data.allowMomentumBounce = true;\n        } else {\n          newPosition = swiper.minTranslate();\n        }\n        if (params.loop && params.centeredSlides) needsLoopFix = true;\n      } else if (params.freeModeSticky) {\n        var nextSlide;\n        for (var j = 0; j < snapGrid.length; j += 1) {\n          if (snapGrid[j] > -newPosition) {\n            nextSlide = j;\n            break;\n          }\n        }\n        if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n          newPosition = snapGrid[nextSlide];\n        } else {\n          newPosition = snapGrid[nextSlide - 1];\n        }\n        newPosition = -newPosition;\n      }\n      if (needsLoopFix) {\n        swiper.once('transitionEnd', function () {\n          swiper.loopFix();\n        });\n      }\n      // Fix duration\n      if (swiper.velocity !== 0) {\n        if (rtl) {\n          momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n        } else {\n          momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n        }\n        if (params.freeModeSticky) {\n          // If freeModeSticky is active and the user ends a swipe with a slow-velocity\n          // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n          // It's easy to see this when simulating touch with mouse events. To fix this,\n          // limit single-slide swipes to the default slide duration. This also has the\n          // nice side effect of matching slide speed if the user stopped moving before\n          // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n          // For faster swipes, also apply limits (albeit higher ones).\n          var moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n          var currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n          if (moveDistance < currentSlideSize) {\n            momentumDuration = params.speed;\n          } else if (moveDistance < 2 * currentSlideSize) {\n            momentumDuration = params.speed * 1.5;\n          } else {\n            momentumDuration = params.speed * 2.5;\n          }\n        }\n      } else if (params.freeModeSticky) {\n        swiper.slideToClosest();\n        return;\n      }\n      if (params.freeModeMomentumBounce && doBounce) {\n        swiper.updateProgress(afterBouncePosition);\n        swiper.setTransition(momentumDuration);\n        swiper.setTranslate(newPosition);\n        swiper.transitionStart(true, swiper.swipeDirection);\n        swiper.animating = true;\n        $wrapperEl.transitionEnd(function () {\n          if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n          swiper.emit('momentumBounce');\n          swiper.setTransition(params.speed);\n          setTimeout(function () {\n            swiper.setTranslate(afterBouncePosition);\n            $wrapperEl.transitionEnd(function () {\n              if (!swiper || swiper.destroyed) return;\n              swiper.transitionEnd();\n            });\n          }, 0);\n        });\n      } else if (swiper.velocity) {\n        swiper.updateProgress(newPosition);\n        swiper.setTransition(momentumDuration);\n        swiper.setTranslate(newPosition);\n        swiper.transitionStart(true, swiper.swipeDirection);\n        if (!swiper.animating) {\n          swiper.animating = true;\n          $wrapperEl.transitionEnd(function () {\n            if (!swiper || swiper.destroyed) return;\n            swiper.transitionEnd();\n          });\n        }\n      } else {\n        swiper.updateProgress(newPosition);\n      }\n      swiper.updateActiveIndex();\n      swiper.updateSlidesClasses();\n    } else if (params.freeModeSticky) {\n      swiper.slideToClosest();\n      return;\n    }\n    if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {\n      swiper.updateProgress();\n      swiper.updateActiveIndex();\n      swiper.updateSlidesClasses();\n    }\n    return;\n  }\n\n  // Find current slide\n  var stopIndex = 0;\n  var groupSize = swiper.slidesSizesGrid[0];\n  for (var i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n    var _increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n    if (typeof slidesGrid[i + _increment] !== 'undefined') {\n      if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + _increment]) {\n        stopIndex = i;\n        groupSize = slidesGrid[i + _increment] - slidesGrid[i];\n      }\n    } else if (currentPos >= slidesGrid[i]) {\n      stopIndex = i;\n      groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n    }\n  }\n\n  // Find current slide size\n  var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n  var increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n  if (timeDiff > params.longSwipesMs) {\n    // Long touches\n    if (!params.longSwipes) {\n      swiper.slideTo(swiper.activeIndex);\n      return;\n    }\n    if (swiper.swipeDirection === 'next') {\n      if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n    }\n    if (swiper.swipeDirection === 'prev') {\n      if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n    }\n  } else {\n    // Short swipes\n    if (!params.shortSwipes) {\n      swiper.slideTo(swiper.activeIndex);\n      return;\n    }\n    var isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n    if (!isNavButtonTarget) {\n      if (swiper.swipeDirection === 'next') {\n        swiper.slideTo(stopIndex + increment);\n      }\n      if (swiper.swipeDirection === 'prev') {\n        swiper.slideTo(stopIndex);\n      }\n    } else if (e.target === swiper.navigation.nextEl) {\n      swiper.slideTo(stopIndex + increment);\n    } else {\n      swiper.slideTo(stopIndex);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onResize.js\n/* harmony default export */ var events_onResize = (function () {\n  var swiper = this;\n  var params = swiper.params,\n    el = swiper.el;\n  if (el && el.offsetWidth === 0) return;\n\n  // Breakpoints\n  if (params.breakpoints) {\n    swiper.setBreakpoint();\n  }\n\n  // Save locks\n  var allowSlideNext = swiper.allowSlideNext,\n    allowSlidePrev = swiper.allowSlidePrev,\n    snapGrid = swiper.snapGrid;\n\n  // Disable locks on resize\n  swiper.allowSlideNext = true;\n  swiper.allowSlidePrev = true;\n  swiper.updateSize();\n  swiper.updateSlides();\n  swiper.updateSlidesClasses();\n  if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n    swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n  } else {\n    swiper.slideTo(swiper.activeIndex, 0, false, true);\n  }\n  if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n    swiper.autoplay.run();\n  }\n  // Return locks after resize\n  swiper.allowSlidePrev = allowSlidePrev;\n  swiper.allowSlideNext = allowSlideNext;\n  if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n    swiper.checkOverflow();\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onClick.js\n/* harmony default export */ var events_onClick = (function (e) {\n  var swiper = this;\n  if (!swiper.allowClick) {\n    if (swiper.params.preventClicks) e.preventDefault();\n    if (swiper.params.preventClicksPropagation && swiper.animating) {\n      e.stopPropagation();\n      e.stopImmediatePropagation();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/onScroll.js\n/* harmony default export */ var onScroll = (function () {\n  var swiper = this;\n  var wrapperEl = swiper.wrapperEl,\n    rtlTranslate = swiper.rtlTranslate;\n  swiper.previousTranslate = swiper.translate;\n  if (swiper.isHorizontal()) {\n    if (rtlTranslate) {\n      swiper.translate = wrapperEl.scrollWidth - wrapperEl.offsetWidth - wrapperEl.scrollLeft;\n    } else {\n      swiper.translate = -wrapperEl.scrollLeft;\n    }\n  } else {\n    swiper.translate = -wrapperEl.scrollTop;\n  }\n  // eslint-disable-next-line\n  if (swiper.translate === -0) swiper.translate = 0;\n  swiper.updateActiveIndex();\n  swiper.updateSlidesClasses();\n  var newProgress;\n  var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n  if (translatesDiff === 0) {\n    newProgress = 0;\n  } else {\n    newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n  }\n  if (newProgress !== swiper.progress) {\n    swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n  }\n  swiper.emit('setTranslate', swiper.translate, false);\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/events/index.js\n\n\n\n\n\n\n\n\n\nvar dummyEventAttached = false;\nfunction dummyEventListener() {}\nfunction events_attachEvents() {\n  var swiper = this;\n  var params = swiper.params,\n    touchEvents = swiper.touchEvents,\n    el = swiper.el,\n    wrapperEl = swiper.wrapperEl;\n  swiper.onTouchStart = events_onTouchStart.bind(swiper);\n  swiper.onTouchMove = events_onTouchMove.bind(swiper);\n  swiper.onTouchEnd = events_onTouchEnd.bind(swiper);\n  if (params.cssMode) {\n    swiper.onScroll = onScroll.bind(swiper);\n  }\n  swiper.onClick = events_onClick.bind(swiper);\n  var capture = !!params.nested;\n\n  // Touch Events\n  if (!swiper_src_utils_support.touch && swiper_src_utils_support.pointerEvents) {\n    el.addEventListener(touchEvents.start, swiper.onTouchStart, false);\n    ssr_window_esm[\"document\"].addEventListener(touchEvents.move, swiper.onTouchMove, capture);\n    ssr_window_esm[\"document\"].addEventListener(touchEvents.end, swiper.onTouchEnd, false);\n  } else {\n    if (swiper_src_utils_support.touch) {\n      var passiveListener = touchEvents.start === 'touchstart' && swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n        passive: true,\n        capture: false\n      } : false;\n      el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);\n      el.addEventListener(touchEvents.move, swiper.onTouchMove, swiper_src_utils_support.passiveListener ? {\n        passive: false,\n        capture: capture\n      } : capture);\n      el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);\n      if (touchEvents.cancel) {\n        el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n      }\n      if (!dummyEventAttached) {\n        ssr_window_esm[\"document\"].addEventListener('touchstart', dummyEventListener);\n        dummyEventAttached = true;\n      }\n    }\n    if (params.simulateTouch && !utils_device.ios && !utils_device.android || params.simulateTouch && !swiper_src_utils_support.touch && utils_device.ios) {\n      el.addEventListener('mousedown', swiper.onTouchStart, false);\n      ssr_window_esm[\"document\"].addEventListener('mousemove', swiper.onTouchMove, capture);\n      ssr_window_esm[\"document\"].addEventListener('mouseup', swiper.onTouchEnd, false);\n    }\n  }\n  // Prevent Links Clicks\n  if (params.preventClicks || params.preventClicksPropagation) {\n    el.addEventListener('click', swiper.onClick, true);\n  }\n  if (params.cssMode) {\n    wrapperEl.addEventListener('scroll', swiper.onScroll);\n  }\n\n  // Resize handler\n  if (params.updateOnWindowResize) {\n    swiper.on(utils_device.ios || utils_device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', events_onResize, true);\n  } else {\n    swiper.on('observerUpdate', events_onResize, true);\n  }\n}\nfunction events_detachEvents() {\n  var swiper = this;\n  var params = swiper.params,\n    touchEvents = swiper.touchEvents,\n    el = swiper.el,\n    wrapperEl = swiper.wrapperEl;\n  var capture = !!params.nested;\n\n  // Touch Events\n  if (!swiper_src_utils_support.touch && swiper_src_utils_support.pointerEvents) {\n    el.removeEventListener(touchEvents.start, swiper.onTouchStart, false);\n    ssr_window_esm[\"document\"].removeEventListener(touchEvents.move, swiper.onTouchMove, capture);\n    ssr_window_esm[\"document\"].removeEventListener(touchEvents.end, swiper.onTouchEnd, false);\n  } else {\n    if (swiper_src_utils_support.touch) {\n      var passiveListener = touchEvents.start === 'onTouchStart' && swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n        passive: true,\n        capture: false\n      } : false;\n      el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);\n      el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);\n      el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);\n      if (touchEvents.cancel) {\n        el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n      }\n    }\n    if (params.simulateTouch && !utils_device.ios && !utils_device.android || params.simulateTouch && !swiper_src_utils_support.touch && utils_device.ios) {\n      el.removeEventListener('mousedown', swiper.onTouchStart, false);\n      ssr_window_esm[\"document\"].removeEventListener('mousemove', swiper.onTouchMove, capture);\n      ssr_window_esm[\"document\"].removeEventListener('mouseup', swiper.onTouchEnd, false);\n    }\n  }\n  // Prevent Links Clicks\n  if (params.preventClicks || params.preventClicksPropagation) {\n    el.removeEventListener('click', swiper.onClick, true);\n  }\n  if (params.cssMode) {\n    wrapperEl.removeEventListener('scroll', swiper.onScroll);\n  }\n\n  // Resize handler\n  swiper.off(utils_device.ios || utils_device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', events_onResize);\n}\n/* harmony default export */ var core_events = ({\n  attachEvents: events_attachEvents,\n  detachEvents: events_detachEvents\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/breakpoints/setBreakpoint.js\n\n/* harmony default export */ var setBreakpoint = (function () {\n  var swiper = this;\n  var activeIndex = swiper.activeIndex,\n    initialized = swiper.initialized,\n    _swiper$loopedSlides = swiper.loopedSlides,\n    loopedSlides = _swiper$loopedSlides === void 0 ? 0 : _swiper$loopedSlides,\n    params = swiper.params,\n    $el = swiper.$el;\n  var breakpoints = params.breakpoints;\n  if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n  // Get breakpoint for window width and update parameters\n  var breakpoint = swiper.getBreakpoint(breakpoints);\n  if (breakpoint && swiper.currentBreakpoint !== breakpoint) {\n    var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n    if (breakpointOnlyParams) {\n      ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach(function (param) {\n        var paramValue = breakpointOnlyParams[param];\n        if (typeof paramValue === 'undefined') return;\n        if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {\n          breakpointOnlyParams[param] = 'auto';\n        } else if (param === 'slidesPerView') {\n          breakpointOnlyParams[param] = parseFloat(paramValue);\n        } else {\n          breakpointOnlyParams[param] = parseInt(paramValue, 10);\n        }\n      });\n    }\n    var breakpointParams = breakpointOnlyParams || swiper.originalParams;\n    var wasMultiRow = params.slidesPerColumn > 1;\n    var isMultiRow = breakpointParams.slidesPerColumn > 1;\n    if (wasMultiRow && !isMultiRow) {\n      $el.removeClass(\"\".concat(params.containerModifierClass, \"multirow \").concat(params.containerModifierClass, \"multirow-column\"));\n    } else if (!wasMultiRow && isMultiRow) {\n      $el.addClass(\"\".concat(params.containerModifierClass, \"multirow\"));\n      if (breakpointParams.slidesPerColumnFill === 'column') {\n        $el.addClass(\"\".concat(params.containerModifierClass, \"multirow-column\"));\n      }\n    }\n    var directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n    var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n    if (directionChanged && initialized) {\n      swiper.changeDirection();\n    }\n    swiper_src_utils_utils.extend(swiper.params, breakpointParams);\n    swiper_src_utils_utils.extend(swiper, {\n      allowTouchMove: swiper.params.allowTouchMove,\n      allowSlideNext: swiper.params.allowSlideNext,\n      allowSlidePrev: swiper.params.allowSlidePrev\n    });\n    swiper.currentBreakpoint = breakpoint;\n    if (needsReLoop && initialized) {\n      swiper.loopDestroy();\n      swiper.loopCreate();\n      swiper.updateSlides();\n      swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n    }\n    swiper.emit('breakpoint', breakpointParams);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/breakpoints/getBreakpoint.js\n\n/* harmony default export */ var getBreakpoint = (function (breakpoints) {\n  // Get breakpoint for window width\n  if (!breakpoints) return undefined;\n  var breakpoint = false;\n  var points = Object.keys(breakpoints).map(function (point) {\n    if (typeof point === 'string' && point.indexOf('@') === 0) {\n      var minRatio = parseFloat(point.substr(1));\n      var value = ssr_window_esm[\"window\"].innerHeight * minRatio;\n      return {\n        value: value,\n        point: point\n      };\n    }\n    return {\n      value: point,\n      point: point\n    };\n  });\n  points.sort(function (a, b) {\n    return parseInt(a.value, 10) - parseInt(b.value, 10);\n  });\n  for (var i = 0; i < points.length; i += 1) {\n    var _points$i = points[i],\n      point = _points$i.point,\n      value = _points$i.value;\n    if (value <= ssr_window_esm[\"window\"].innerWidth) {\n      breakpoint = point;\n    }\n  }\n  return breakpoint || 'max';\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/breakpoints/index.js\n\n\n/* harmony default export */ var core_breakpoints = ({\n  setBreakpoint: setBreakpoint,\n  getBreakpoint: getBreakpoint\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/classes/addClasses.js\n\n/* harmony default export */ var addClasses = (function () {\n  var swiper = this;\n  var classNames = swiper.classNames,\n    params = swiper.params,\n    rtl = swiper.rtl,\n    $el = swiper.$el;\n  var suffixes = [];\n  suffixes.push('initialized');\n  suffixes.push(params.direction);\n  if (params.freeMode) {\n    suffixes.push('free-mode');\n  }\n  if (params.autoHeight) {\n    suffixes.push('autoheight');\n  }\n  if (rtl) {\n    suffixes.push('rtl');\n  }\n  if (params.slidesPerColumn > 1) {\n    suffixes.push('multirow');\n    if (params.slidesPerColumnFill === 'column') {\n      suffixes.push('multirow-column');\n    }\n  }\n  if (utils_device.android) {\n    suffixes.push('android');\n  }\n  if (utils_device.ios) {\n    suffixes.push('ios');\n  }\n  if (params.cssMode) {\n    suffixes.push('css-mode');\n  }\n  suffixes.forEach(function (suffix) {\n    classNames.push(params.containerModifierClass + suffix);\n  });\n  $el.addClass(classNames.join(' '));\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/classes/removeClasses.js\n/* harmony default export */ var removeClasses = (function () {\n  var swiper = this;\n  var $el = swiper.$el,\n    classNames = swiper.classNames;\n  $el.removeClass(classNames.join(' '));\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/classes/index.js\n\n\n/* harmony default export */ var core_classes = ({\n  addClasses: addClasses,\n  removeClasses: removeClasses\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/images/loadImage.js\n\n\n/* harmony default export */ var images_loadImage = (function (imageEl, src, srcset, sizes, checkForComplete, callback) {\n  var image;\n  function onReady() {\n    if (callback) callback();\n  }\n  var isPicture = dom(imageEl).parent('picture')[0];\n  if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n    if (src) {\n      image = new ssr_window_esm[\"window\"].Image();\n      image.onload = onReady;\n      image.onerror = onReady;\n      if (sizes) {\n        image.sizes = sizes;\n      }\n      if (srcset) {\n        image.srcset = srcset;\n      }\n      if (src) {\n        image.src = src;\n      }\n    } else {\n      onReady();\n    }\n  } else {\n    // image already loaded...\n    onReady();\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/images/preloadImages.js\n/* harmony default export */ var preloadImages = (function () {\n  var swiper = this;\n  swiper.imagesToLoad = swiper.$el.find('img');\n  function onReady() {\n    if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n    if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n    if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n      if (swiper.params.updateOnImagesReady) swiper.update();\n      swiper.emit('imagesReady');\n    }\n  }\n  for (var i = 0; i < swiper.imagesToLoad.length; i += 1) {\n    var imageEl = swiper.imagesToLoad[i];\n    swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/images/index.js\n\n\n/* harmony default export */ var core_images = ({\n  loadImage: images_loadImage,\n  preloadImages: preloadImages\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/check-overflow/index.js\nfunction checkOverflow() {\n  var swiper = this;\n  var params = swiper.params;\n  var wasLocked = swiper.isLocked;\n  var lastSlidePosition = swiper.slides.length > 0 && params.slidesOffsetBefore + params.spaceBetween * (swiper.slides.length - 1) + swiper.slides[0].offsetWidth * swiper.slides.length;\n  if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) {\n    swiper.isLocked = lastSlidePosition <= swiper.size;\n  } else {\n    swiper.isLocked = swiper.snapGrid.length === 1;\n  }\n  swiper.allowSlideNext = !swiper.isLocked;\n  swiper.allowSlidePrev = !swiper.isLocked;\n\n  // events\n  if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n  if (wasLocked && wasLocked !== swiper.isLocked) {\n    swiper.isEnd = false;\n    swiper.navigation.update();\n  }\n}\n/* harmony default export */ var check_overflow = ({\n  checkOverflow: checkOverflow\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/defaults.js\n/* harmony default export */ var core_defaults = ({\n  init: true,\n  direction: 'horizontal',\n  touchEventsTarget: 'container',\n  initialSlide: 0,\n  speed: 300,\n  cssMode: false,\n  updateOnWindowResize: true,\n  //\n  preventInteractionOnTransition: false,\n  // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n  edgeSwipeDetection: false,\n  edgeSwipeThreshold: 20,\n  // Free mode\n  freeMode: false,\n  freeModeMomentum: true,\n  freeModeMomentumRatio: 1,\n  freeModeMomentumBounce: true,\n  freeModeMomentumBounceRatio: 1,\n  freeModeMomentumVelocityRatio: 1,\n  freeModeSticky: false,\n  freeModeMinimumVelocity: 0.02,\n  // Autoheight\n  autoHeight: false,\n  // Set wrapper width\n  setWrapperSize: false,\n  // Virtual Translate\n  virtualTranslate: false,\n  // Effects\n  effect: 'slide',\n  // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n  // Breakpoints\n  breakpoints: undefined,\n  // Slides grid\n  spaceBetween: 0,\n  slidesPerView: 1,\n  slidesPerColumn: 1,\n  slidesPerColumnFill: 'column',\n  slidesPerGroup: 1,\n  slidesPerGroupSkip: 0,\n  centeredSlides: false,\n  centeredSlidesBounds: false,\n  slidesOffsetBefore: 0,\n  // in px\n  slidesOffsetAfter: 0,\n  // in px\n  normalizeSlideIndex: true,\n  centerInsufficientSlides: false,\n  // Disable swiper and hide navigation when container not overflow\n  watchOverflow: false,\n  // Round length\n  roundLengths: false,\n  // Touches\n  touchRatio: 1,\n  touchAngle: 45,\n  simulateTouch: true,\n  shortSwipes: true,\n  longSwipes: true,\n  longSwipesRatio: 0.5,\n  longSwipesMs: 300,\n  followFinger: true,\n  allowTouchMove: true,\n  threshold: 0,\n  touchMoveStopPropagation: false,\n  touchStartPreventDefault: true,\n  touchStartForcePreventDefault: false,\n  touchReleaseOnEdges: false,\n  // Unique Navigation Elements\n  uniqueNavElements: true,\n  // Resistance\n  resistance: true,\n  resistanceRatio: 0.85,\n  // Progress\n  watchSlidesProgress: false,\n  watchSlidesVisibility: false,\n  // Cursor\n  grabCursor: false,\n  // Clicks\n  preventClicks: true,\n  preventClicksPropagation: true,\n  slideToClickedSlide: false,\n  // Images\n  preloadImages: true,\n  updateOnImagesReady: true,\n  // loop\n  loop: false,\n  loopAdditionalSlides: 0,\n  loopedSlides: null,\n  loopFillGroupWithBlank: false,\n  // Swiping/no swiping\n  allowSlidePrev: true,\n  allowSlideNext: true,\n  swipeHandler: null,\n  // '.swipe-handler',\n  noSwiping: true,\n  noSwipingClass: 'swiper-no-swiping',\n  noSwipingSelector: null,\n  // Passive Listeners\n  passiveListeners: true,\n  // NS\n  containerModifierClass: 'swiper-container-',\n  // NEW\n  slideClass: 'swiper-slide',\n  slideBlankClass: 'swiper-slide-invisible-blank',\n  slideActiveClass: 'swiper-slide-active',\n  slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n  slideVisibleClass: 'swiper-slide-visible',\n  slideDuplicateClass: 'swiper-slide-duplicate',\n  slideNextClass: 'swiper-slide-next',\n  slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n  slidePrevClass: 'swiper-slide-prev',\n  slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n  wrapperClass: 'swiper-wrapper',\n  // Callbacks\n  runCallbacksOnInit: true\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/core/core-class.js\n\n\n\n\n\n\nfunction core_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, core_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction core_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (core_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint no-param-reassign: \"off\" */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar prototypes = {\n  update: core_update,\n  translate: core_translate,\n  transition: core_transition,\n  slide: core_slide,\n  loop: core_loop,\n  grabCursor: grab_cursor,\n  manipulation: manipulation,\n  events: core_events,\n  breakpoints: core_breakpoints,\n  checkOverflow: check_overflow,\n  classes: core_classes,\n  images: core_images\n};\nvar extendedDefaults = {};\nvar core_class_Swiper = /*#__PURE__*/function (_SwiperClass) {\n  function Swiper() {\n    var _this;\n    classCallCheck_default()(this, Swiper);\n    var el;\n    var params;\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {\n      params = args[0];\n    } else {\n      el = args[0];\n      params = args[1];\n    }\n    if (!params) params = {};\n    params = swiper_src_utils_utils.extend({}, params);\n    if (el && !params.el) params.el = el;\n    _this = core_class_callSuper(this, Swiper, [params]);\n    Object.keys(prototypes).forEach(function (prototypeGroup) {\n      Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) {\n        if (!Swiper.prototype[protoMethod]) {\n          Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n        }\n      });\n    });\n\n    // Swiper Instance\n    var swiper = _this;\n    if (typeof swiper.modules === 'undefined') {\n      swiper.modules = {};\n    }\n    Object.keys(swiper.modules).forEach(function (moduleName) {\n      var module = swiper.modules[moduleName];\n      if (module.params) {\n        var moduleParamName = Object.keys(module.params)[0];\n        var moduleParams = module.params[moduleParamName];\n        if (typeof_default()(moduleParams) !== 'object' || moduleParams === null) return;\n        if (!(moduleParamName in params && 'enabled' in moduleParams)) return;\n        if (params[moduleParamName] === true) {\n          params[moduleParamName] = {\n            enabled: true\n          };\n        }\n        if (typeof_default()(params[moduleParamName]) === 'object' && !('enabled' in params[moduleParamName])) {\n          params[moduleParamName].enabled = true;\n        }\n        if (!params[moduleParamName]) params[moduleParamName] = {\n          enabled: false\n        };\n      }\n    });\n\n    // Extend defaults with modules params\n    var swiperParams = swiper_src_utils_utils.extend({}, core_defaults);\n    swiper.useModulesParams(swiperParams);\n\n    // Extend defaults with passed params\n    swiper.params = swiper_src_utils_utils.extend({}, swiperParams, extendedDefaults, params);\n    swiper.originalParams = swiper_src_utils_utils.extend({}, swiper.params);\n    swiper.passedParams = swiper_src_utils_utils.extend({}, params);\n\n    // Save Dom lib\n    swiper.$ = dom;\n\n    // Find el\n    var $el = dom(swiper.params.el);\n    el = $el[0];\n    if (!el) {\n      return possibleConstructorReturn_default()(_this, undefined);\n    }\n    if ($el.length > 1) {\n      var swipers = [];\n      $el.each(function (index, containerEl) {\n        var newParams = swiper_src_utils_utils.extend({}, params, {\n          el: containerEl\n        });\n        swipers.push(new Swiper(newParams));\n      });\n      return possibleConstructorReturn_default()(_this, swipers);\n    }\n    el.swiper = swiper;\n    $el.data('swiper', swiper);\n\n    // Find Wrapper\n    var $wrapperEl;\n    if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n      $wrapperEl = dom(el.shadowRoot.querySelector(\".\".concat(swiper.params.wrapperClass)));\n      // Children needs to return slot items\n      $wrapperEl.children = function (options) {\n        return $el.children(options);\n      };\n    } else {\n      $wrapperEl = $el.children(\".\".concat(swiper.params.wrapperClass));\n    }\n    // Extend Swiper\n    swiper_src_utils_utils.extend(swiper, {\n      $el: $el,\n      el: el,\n      $wrapperEl: $wrapperEl,\n      wrapperEl: $wrapperEl[0],\n      // Classes\n      classNames: [],\n      // Slides\n      slides: dom(),\n      slidesGrid: [],\n      snapGrid: [],\n      slidesSizesGrid: [],\n      // isDirection\n      isHorizontal: function isHorizontal() {\n        return swiper.params.direction === 'horizontal';\n      },\n      isVertical: function isVertical() {\n        return swiper.params.direction === 'vertical';\n      },\n      // RTL\n      rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n      rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n      wrongRTL: $wrapperEl.css('display') === '-webkit-box',\n      // Indexes\n      activeIndex: 0,\n      realIndex: 0,\n      //\n      isBeginning: true,\n      isEnd: false,\n      // Props\n      translate: 0,\n      previousTranslate: 0,\n      progress: 0,\n      velocity: 0,\n      animating: false,\n      // Locks\n      allowSlideNext: swiper.params.allowSlideNext,\n      allowSlidePrev: swiper.params.allowSlidePrev,\n      // Touch Events\n      touchEvents: function touchEvents() {\n        var touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n        var desktop = ['mousedown', 'mousemove', 'mouseup'];\n        if (swiper_src_utils_support.pointerEvents) {\n          desktop = ['pointerdown', 'pointermove', 'pointerup'];\n        }\n        swiper.touchEventsTouch = {\n          start: touch[0],\n          move: touch[1],\n          end: touch[2],\n          cancel: touch[3]\n        };\n        swiper.touchEventsDesktop = {\n          start: desktop[0],\n          move: desktop[1],\n          end: desktop[2]\n        };\n        return swiper_src_utils_support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n      }(),\n      touchEventsData: {\n        isTouched: undefined,\n        isMoved: undefined,\n        allowTouchCallbacks: undefined,\n        touchStartTime: undefined,\n        isScrolling: undefined,\n        currentTranslate: undefined,\n        startTranslate: undefined,\n        allowThresholdMove: undefined,\n        // Form elements to match\n        formElements: 'input, select, option, textarea, button, video, label',\n        // Last click time\n        lastClickTime: swiper_src_utils_utils.now(),\n        clickTimeout: undefined,\n        // Velocities\n        velocities: [],\n        allowMomentumBounce: undefined,\n        isTouchEvent: undefined,\n        startMoving: undefined\n      },\n      // Clicks\n      allowClick: true,\n      // Touches\n      allowTouchMove: swiper.params.allowTouchMove,\n      touches: {\n        startX: 0,\n        startY: 0,\n        currentX: 0,\n        currentY: 0,\n        diff: 0\n      },\n      // Images\n      imagesToLoad: [],\n      imagesLoaded: 0\n    });\n\n    // Install Modules\n    swiper.useModules();\n\n    // Init\n    if (swiper.params.init) {\n      swiper.init();\n    }\n\n    // Return app instance\n    return possibleConstructorReturn_default()(_this, swiper);\n  }\n  inherits_default()(Swiper, _SwiperClass);\n  return createClass_default()(Swiper, [{\n    key: \"slidesPerViewDynamic\",\n    value: function slidesPerViewDynamic() {\n      var swiper = this;\n      var params = swiper.params,\n        slides = swiper.slides,\n        slidesGrid = swiper.slidesGrid,\n        swiperSize = swiper.size,\n        activeIndex = swiper.activeIndex;\n      var spv = 1;\n      if (params.centeredSlides) {\n        var slideSize = slides[activeIndex].swiperSlideSize;\n        var breakLoop;\n        for (var i = activeIndex + 1; i < slides.length; i += 1) {\n          if (slides[i] && !breakLoop) {\n            slideSize += slides[i].swiperSlideSize;\n            spv += 1;\n            if (slideSize > swiperSize) breakLoop = true;\n          }\n        }\n        for (var _i = activeIndex - 1; _i >= 0; _i -= 1) {\n          if (slides[_i] && !breakLoop) {\n            slideSize += slides[_i].swiperSlideSize;\n            spv += 1;\n            if (slideSize > swiperSize) breakLoop = true;\n          }\n        }\n      } else {\n        for (var _i2 = activeIndex + 1; _i2 < slides.length; _i2 += 1) {\n          if (slidesGrid[_i2] - slidesGrid[activeIndex] < swiperSize) {\n            spv += 1;\n          }\n        }\n      }\n      return spv;\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var swiper = this;\n      if (!swiper || swiper.destroyed) return;\n      var snapGrid = swiper.snapGrid,\n        params = swiper.params;\n      // Breakpoints\n      if (params.breakpoints) {\n        swiper.setBreakpoint();\n      }\n      swiper.updateSize();\n      swiper.updateSlides();\n      swiper.updateProgress();\n      swiper.updateSlidesClasses();\n      function setTranslate() {\n        var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n        var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n        swiper.setTranslate(newTranslate);\n        swiper.updateActiveIndex();\n        swiper.updateSlidesClasses();\n      }\n      var translated;\n      if (swiper.params.freeMode) {\n        setTranslate();\n        if (swiper.params.autoHeight) {\n          swiper.updateAutoHeight();\n        }\n      } else {\n        if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n          translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n        } else {\n          translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n        }\n        if (!translated) {\n          setTranslate();\n        }\n      }\n      if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n        swiper.checkOverflow();\n      }\n      swiper.emit('update');\n    }\n  }, {\n    key: \"changeDirection\",\n    value: function changeDirection(newDirection) {\n      var needUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var swiper = this;\n      var currentDirection = swiper.params.direction;\n      if (!newDirection) {\n        // eslint-disable-next-line\n        newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n      }\n      if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n        return swiper;\n      }\n      swiper.$el.removeClass(\"\".concat(swiper.params.containerModifierClass).concat(currentDirection)).addClass(\"\".concat(swiper.params.containerModifierClass).concat(newDirection));\n      swiper.params.direction = newDirection;\n      swiper.slides.each(function (slideIndex, slideEl) {\n        if (newDirection === 'vertical') {\n          slideEl.style.width = '';\n        } else {\n          slideEl.style.height = '';\n        }\n      });\n      swiper.emit('changeDirection');\n      if (needUpdate) swiper.update();\n      return swiper;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var swiper = this;\n      if (swiper.initialized) return;\n      swiper.emit('beforeInit');\n\n      // Set breakpoint\n      if (swiper.params.breakpoints) {\n        swiper.setBreakpoint();\n      }\n\n      // Add Classes\n      swiper.addClasses();\n\n      // Create loop\n      if (swiper.params.loop) {\n        swiper.loopCreate();\n      }\n\n      // Update size\n      swiper.updateSize();\n\n      // Update slides\n      swiper.updateSlides();\n      if (swiper.params.watchOverflow) {\n        swiper.checkOverflow();\n      }\n\n      // Set Grab Cursor\n      if (swiper.params.grabCursor) {\n        swiper.setGrabCursor();\n      }\n      if (swiper.params.preloadImages) {\n        swiper.preloadImages();\n      }\n\n      // Slide To Initial Slide\n      if (swiper.params.loop) {\n        swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);\n      } else {\n        swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);\n      }\n\n      // Attach events\n      swiper.attachEvents();\n\n      // Init Flag\n      swiper.initialized = true;\n\n      // Emit\n      swiper.emit('init');\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var deleteInstance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var cleanStyles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var swiper = this;\n      var params = swiper.params,\n        $el = swiper.$el,\n        $wrapperEl = swiper.$wrapperEl,\n        slides = swiper.slides;\n      if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n        return null;\n      }\n      swiper.emit('beforeDestroy');\n\n      // Init Flag\n      swiper.initialized = false;\n\n      // Detach events\n      swiper.detachEvents();\n\n      // Destroy loop\n      if (params.loop) {\n        swiper.loopDestroy();\n      }\n\n      // Cleanup styles\n      if (cleanStyles) {\n        swiper.removeClasses();\n        $el.removeAttr('style');\n        $wrapperEl.removeAttr('style');\n        if (slides && slides.length) {\n          slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n        }\n      }\n      swiper.emit('destroy');\n\n      // Detach emitter events\n      Object.keys(swiper.eventsListeners).forEach(function (eventName) {\n        swiper.off(eventName);\n      });\n      if (deleteInstance !== false) {\n        swiper.$el[0].swiper = null;\n        swiper.$el.data('swiper', null);\n        swiper_src_utils_utils.deleteProps(swiper);\n      }\n      swiper.destroyed = true;\n      return null;\n    }\n  }], [{\n    key: \"extendDefaults\",\n    value: function extendDefaults(newDefaults) {\n      swiper_src_utils_utils.extend(extendedDefaults, newDefaults);\n    }\n  }, {\n    key: \"extendedDefaults\",\n    get: function get() {\n      return extendedDefaults;\n    }\n  }, {\n    key: \"defaults\",\n    get: function get() {\n      return core_defaults;\n    }\n  }, {\n    key: \"Class\",\n    get: function get() {\n      return swiper_src_utils_class;\n    }\n  }, {\n    key: \"$\",\n    get: function get() {\n      return dom;\n    }\n  }]);\n}(swiper_src_utils_class);\n/* harmony default export */ var core_class = (core_class_Swiper);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/modules/device/device.js\n\n/* harmony default export */ var modules_device_device = ({\n  name: 'device',\n  proto: {\n    device: utils_device\n  },\n  static: {\n    device: utils_device\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/modules/support/support.js\n\n/* harmony default export */ var modules_support_support = ({\n  name: 'support',\n  proto: {\n    support: swiper_src_utils_support\n  },\n  static: {\n    support: swiper_src_utils_support\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/utils/browser.js\n\nvar browser_Browser = function Browser() {\n  function isSafari() {\n    var ua = ssr_window_esm[\"window\"].navigator.userAgent.toLowerCase();\n    return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n  }\n  return {\n    isEdge: !!ssr_window_esm[\"window\"].navigator.userAgent.match(/Edge/g),\n    isSafari: isSafari(),\n    isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ssr_window_esm[\"window\"].navigator.userAgent)\n  };\n}();\n/* harmony default export */ var browser = (browser_Browser);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/modules/browser/browser.js\n\n/* harmony default export */ var browser_browser = ({\n  name: 'browser',\n  proto: {\n    browser: browser\n  },\n  static: {\n    browser: browser\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/modules/resize/resize.js\n\n\n/* harmony default export */ var modules_resize_resize = ({\n  name: 'resize',\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      resize: {\n        resizeHandler: function resizeHandler() {\n          if (!swiper || swiper.destroyed || !swiper.initialized) return;\n          swiper.emit('beforeResize');\n          swiper.emit('resize');\n        },\n        orientationChangeHandler: function orientationChangeHandler() {\n          if (!swiper || swiper.destroyed || !swiper.initialized) return;\n          swiper.emit('orientationchange');\n        }\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      // Emit resize\n      ssr_window_esm[\"window\"].addEventListener('resize', swiper.resize.resizeHandler);\n\n      // Emit orientationchange\n      ssr_window_esm[\"window\"].addEventListener('orientationchange', swiper.resize.orientationChangeHandler);\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      ssr_window_esm[\"window\"].removeEventListener('resize', swiper.resize.resizeHandler);\n      ssr_window_esm[\"window\"].removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/modules/observer/observer.js\n\n\n\nvar Observer = {\n  func: ssr_window_esm[\"window\"].MutationObserver || ssr_window_esm[\"window\"].WebkitMutationObserver,\n  attach: function attach(target) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var swiper = this;\n    var ObserverFunc = Observer.func;\n    var observer = new ObserverFunc(function (mutations) {\n      // The observerUpdate event should only be triggered\n      // once despite the number of mutations.  Additional\n      // triggers are redundant and are very costly\n      if (mutations.length === 1) {\n        swiper.emit('observerUpdate', mutations[0]);\n        return;\n      }\n      var observerUpdate = function observerUpdate() {\n        swiper.emit('observerUpdate', mutations[0]);\n      };\n      if (ssr_window_esm[\"window\"].requestAnimationFrame) {\n        ssr_window_esm[\"window\"].requestAnimationFrame(observerUpdate);\n      } else {\n        ssr_window_esm[\"window\"].setTimeout(observerUpdate, 0);\n      }\n    });\n    observer.observe(target, {\n      attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n      childList: typeof options.childList === 'undefined' ? true : options.childList,\n      characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n    });\n    swiper.observer.observers.push(observer);\n  },\n  init: function init() {\n    var swiper = this;\n    if (!swiper_src_utils_support.observer || !swiper.params.observer) return;\n    if (swiper.params.observeParents) {\n      var containerParents = swiper.$el.parents();\n      for (var i = 0; i < containerParents.length; i += 1) {\n        swiper.observer.attach(containerParents[i]);\n      }\n    }\n    // Observe container\n    swiper.observer.attach(swiper.$el[0], {\n      childList: swiper.params.observeSlideChildren\n    });\n\n    // Observe wrapper\n    swiper.observer.attach(swiper.$wrapperEl[0], {\n      attributes: false\n    });\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    swiper.observer.observers.forEach(function (observer) {\n      observer.disconnect();\n    });\n    swiper.observer.observers = [];\n  }\n};\n/* harmony default export */ var observer_observer = ({\n  name: 'observer',\n  params: {\n    observer: false,\n    observeParents: false,\n    observeSlideChildren: false\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      observer: {\n        init: Observer.init.bind(swiper),\n        attach: Observer.attach.bind(swiper),\n        destroy: Observer.destroy.bind(swiper),\n        observers: []\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      swiper.observer.init();\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      swiper.observer.destroy();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/virtual/virtual.js\n\n\n\nvar Virtual = {\n  update: function update(force) {\n    var swiper = this;\n    var _swiper$params = swiper.params,\n      slidesPerView = _swiper$params.slidesPerView,\n      slidesPerGroup = _swiper$params.slidesPerGroup,\n      centeredSlides = _swiper$params.centeredSlides;\n    var _swiper$params$virtua = swiper.params.virtual,\n      addSlidesBefore = _swiper$params$virtua.addSlidesBefore,\n      addSlidesAfter = _swiper$params$virtua.addSlidesAfter;\n    var _swiper$virtual = swiper.virtual,\n      previousFrom = _swiper$virtual.from,\n      previousTo = _swiper$virtual.to,\n      slides = _swiper$virtual.slides,\n      previousSlidesGrid = _swiper$virtual.slidesGrid,\n      renderSlide = _swiper$virtual.renderSlide,\n      previousOffset = _swiper$virtual.offset;\n    swiper.updateActiveIndex();\n    var activeIndex = swiper.activeIndex || 0;\n    var offsetProp;\n    if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n    var slidesAfter;\n    var slidesBefore;\n    if (centeredSlides) {\n      slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n      slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n    } else {\n      slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;\n      slidesBefore = slidesPerGroup + addSlidesAfter;\n    }\n    var from = Math.max((activeIndex || 0) - slidesBefore, 0);\n    var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n    var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n    swiper_src_utils_utils.extend(swiper.virtual, {\n      from: from,\n      to: to,\n      offset: offset,\n      slidesGrid: swiper.slidesGrid\n    });\n    function onRendered() {\n      swiper.updateSlides();\n      swiper.updateProgress();\n      swiper.updateSlidesClasses();\n      if (swiper.lazy && swiper.params.lazy.enabled) {\n        swiper.lazy.load();\n      }\n    }\n    if (previousFrom === from && previousTo === to && !force) {\n      if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n        swiper.slides.css(offsetProp, \"\".concat(offset, \"px\"));\n      }\n      swiper.updateProgress();\n      return;\n    }\n    if (swiper.params.virtual.renderExternal) {\n      swiper.params.virtual.renderExternal.call(swiper, {\n        offset: offset,\n        from: from,\n        to: to,\n        slides: function getSlides() {\n          var slidesToRender = [];\n          for (var i = from; i <= to; i += 1) {\n            slidesToRender.push(slides[i]);\n          }\n          return slidesToRender;\n        }()\n      });\n      onRendered();\n      return;\n    }\n    var prependIndexes = [];\n    var appendIndexes = [];\n    if (force) {\n      swiper.$wrapperEl.find(\".\".concat(swiper.params.slideClass)).remove();\n    } else {\n      for (var i = previousFrom; i <= previousTo; i += 1) {\n        if (i < from || i > to) {\n          swiper.$wrapperEl.find(\".\".concat(swiper.params.slideClass, \"[data-swiper-slide-index=\\\"\").concat(i, \"\\\"]\")).remove();\n        }\n      }\n    }\n    for (var _i = 0; _i < slides.length; _i += 1) {\n      if (_i >= from && _i <= to) {\n        if (typeof previousTo === 'undefined' || force) {\n          appendIndexes.push(_i);\n        } else {\n          if (_i > previousTo) appendIndexes.push(_i);\n          if (_i < previousFrom) prependIndexes.push(_i);\n        }\n      }\n    }\n    appendIndexes.forEach(function (index) {\n      swiper.$wrapperEl.append(renderSlide(slides[index], index));\n    });\n    prependIndexes.sort(function (a, b) {\n      return b - a;\n    }).forEach(function (index) {\n      swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n    });\n    swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, \"\".concat(offset, \"px\"));\n    onRendered();\n  },\n  renderSlide: function renderSlide(slide, index) {\n    var swiper = this;\n    var params = swiper.params.virtual;\n    if (params.cache && swiper.virtual.cache[index]) {\n      return swiper.virtual.cache[index];\n    }\n    var $slideEl = params.renderSlide ? dom(params.renderSlide.call(swiper, slide, index)) : dom(\"<div class=\\\"\".concat(swiper.params.slideClass, \"\\\" data-swiper-slide-index=\\\"\").concat(index, \"\\\">\").concat(slide, \"</div>\"));\n    if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n    if (params.cache) swiper.virtual.cache[index] = $slideEl;\n    return $slideEl;\n  },\n  appendSlide: function appendSlide(slides) {\n    var swiper = this;\n    if (typeof_default()(slides) === 'object' && 'length' in slides) {\n      for (var i = 0; i < slides.length; i += 1) {\n        if (slides[i]) swiper.virtual.slides.push(slides[i]);\n      }\n    } else {\n      swiper.virtual.slides.push(slides);\n    }\n    swiper.virtual.update(true);\n  },\n  prependSlide: function prependSlide(slides) {\n    var swiper = this;\n    var activeIndex = swiper.activeIndex;\n    var newActiveIndex = activeIndex + 1;\n    var numberOfNewSlides = 1;\n    if (Array.isArray(slides)) {\n      for (var i = 0; i < slides.length; i += 1) {\n        if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n      }\n      newActiveIndex = activeIndex + slides.length;\n      numberOfNewSlides = slides.length;\n    } else {\n      swiper.virtual.slides.unshift(slides);\n    }\n    if (swiper.params.virtual.cache) {\n      var cache = swiper.virtual.cache;\n      var newCache = {};\n      Object.keys(cache).forEach(function (cachedIndex) {\n        var $cachedEl = cache[cachedIndex];\n        var cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n        if (cachedElIndex) {\n          $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1);\n        }\n        newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n      });\n      swiper.virtual.cache = newCache;\n    }\n    swiper.virtual.update(true);\n    swiper.slideTo(newActiveIndex, 0);\n  },\n  removeSlide: function removeSlide(slidesIndexes) {\n    var swiper = this;\n    if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n    var activeIndex = swiper.activeIndex;\n    if (Array.isArray(slidesIndexes)) {\n      for (var i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n        swiper.virtual.slides.splice(slidesIndexes[i], 1);\n        if (swiper.params.virtual.cache) {\n          delete swiper.virtual.cache[slidesIndexes[i]];\n        }\n        if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n        activeIndex = Math.max(activeIndex, 0);\n      }\n    } else {\n      swiper.virtual.slides.splice(slidesIndexes, 1);\n      if (swiper.params.virtual.cache) {\n        delete swiper.virtual.cache[slidesIndexes];\n      }\n      if (slidesIndexes < activeIndex) activeIndex -= 1;\n      activeIndex = Math.max(activeIndex, 0);\n    }\n    swiper.virtual.update(true);\n    swiper.slideTo(activeIndex, 0);\n  },\n  removeAllSlides: function removeAllSlides() {\n    var swiper = this;\n    swiper.virtual.slides = [];\n    if (swiper.params.virtual.cache) {\n      swiper.virtual.cache = {};\n    }\n    swiper.virtual.update(true);\n    swiper.slideTo(0, 0);\n  }\n};\n/* harmony default export */ var virtual = ({\n  name: 'virtual',\n  params: {\n    virtual: {\n      enabled: false,\n      slides: [],\n      cache: true,\n      renderSlide: null,\n      renderExternal: null,\n      addSlidesBefore: 0,\n      addSlidesAfter: 0\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      virtual: {\n        update: Virtual.update.bind(swiper),\n        appendSlide: Virtual.appendSlide.bind(swiper),\n        prependSlide: Virtual.prependSlide.bind(swiper),\n        removeSlide: Virtual.removeSlide.bind(swiper),\n        removeAllSlides: Virtual.removeAllSlides.bind(swiper),\n        renderSlide: Virtual.renderSlide.bind(swiper),\n        slides: swiper.params.virtual.slides,\n        cache: {}\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (!swiper.params.virtual.enabled) return;\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"virtual\"));\n      var overwriteParams = {\n        watchSlidesProgress: true\n      };\n      swiper_src_utils_utils.extend(swiper.params, overwriteParams);\n      swiper_src_utils_utils.extend(swiper.originalParams, overwriteParams);\n      if (!swiper.params.initialSlide) {\n        swiper.virtual.update();\n      }\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (!swiper.params.virtual.enabled) return;\n      swiper.virtual.update();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/keyboard/keyboard.js\n\n\n\nvar Keyboard = {\n  handle: function handle(event) {\n    var swiper = this;\n    var rtl = swiper.rtlTranslate;\n    var e = event;\n    if (e.originalEvent) e = e.originalEvent; // jquery fix\n    var kc = e.keyCode || e.charCode;\n    // Directions locks\n    if (!swiper.allowSlideNext && (swiper.isHorizontal() && kc === 39 || swiper.isVertical() && kc === 40 || kc === 34)) {\n      return false;\n    }\n    if (!swiper.allowSlidePrev && (swiper.isHorizontal() && kc === 37 || swiper.isVertical() && kc === 38 || kc === 33)) {\n      return false;\n    }\n    if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n      return undefined;\n    }\n    if (ssr_window_esm[\"document\"].activeElement && ssr_window_esm[\"document\"].activeElement.nodeName && (ssr_window_esm[\"document\"].activeElement.nodeName.toLowerCase() === 'input' || ssr_window_esm[\"document\"].activeElement.nodeName.toLowerCase() === 'textarea')) {\n      return undefined;\n    }\n    if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) {\n      var inView = false;\n      // Check that swiper should be inside of visible area of window\n      if (swiper.$el.parents(\".\".concat(swiper.params.slideClass)).length > 0 && swiper.$el.parents(\".\".concat(swiper.params.slideActiveClass)).length === 0) {\n        return undefined;\n      }\n      var windowWidth = ssr_window_esm[\"window\"].innerWidth;\n      var windowHeight = ssr_window_esm[\"window\"].innerHeight;\n      var swiperOffset = swiper.$el.offset();\n      if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n      var swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]];\n      for (var i = 0; i < swiperCoord.length; i += 1) {\n        var point = swiperCoord[i];\n        if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n          inView = true;\n        }\n      }\n      if (!inView) return undefined;\n    }\n    if (swiper.isHorizontal()) {\n      if (kc === 33 || kc === 34 || kc === 37 || kc === 39) {\n        if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n      }\n      if ((kc === 34 || kc === 39) && !rtl || (kc === 33 || kc === 37) && rtl) swiper.slideNext();\n      if ((kc === 33 || kc === 37) && !rtl || (kc === 34 || kc === 39) && rtl) swiper.slidePrev();\n    } else {\n      if (kc === 33 || kc === 34 || kc === 38 || kc === 40) {\n        if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n      }\n      if (kc === 34 || kc === 40) swiper.slideNext();\n      if (kc === 33 || kc === 38) swiper.slidePrev();\n    }\n    swiper.emit('keyPress', kc);\n    return undefined;\n  },\n  enable: function enable() {\n    var swiper = this;\n    if (swiper.keyboard.enabled) return;\n    dom(ssr_window_esm[\"document\"]).on('keydown', swiper.keyboard.handle);\n    swiper.keyboard.enabled = true;\n  },\n  disable: function disable() {\n    var swiper = this;\n    if (!swiper.keyboard.enabled) return;\n    dom(ssr_window_esm[\"document\"]).off('keydown', swiper.keyboard.handle);\n    swiper.keyboard.enabled = false;\n  }\n};\n/* harmony default export */ var keyboard = ({\n  name: 'keyboard',\n  params: {\n    keyboard: {\n      enabled: false,\n      onlyInViewport: true\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      keyboard: {\n        enabled: false,\n        enable: Keyboard.enable.bind(swiper),\n        disable: Keyboard.disable.bind(swiper),\n        handle: Keyboard.handle.bind(swiper)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.keyboard.enabled) {\n        swiper.keyboard.enable();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (swiper.keyboard.enabled) {\n        swiper.keyboard.disable();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/mousewheel/mousewheel.js\n\n\n\nfunction isEventSupported() {\n  var eventName = 'onwheel';\n  var isSupported = eventName in ssr_window_esm[\"document\"];\n  if (!isSupported) {\n    var element = ssr_window_esm[\"document\"].createElement('div');\n    element.setAttribute(eventName, 'return;');\n    isSupported = typeof element[eventName] === 'function';\n  }\n  if (!isSupported && ssr_window_esm[\"document\"].implementation && ssr_window_esm[\"document\"].implementation.hasFeature\n  // always returns true in newer browsers as per the standard.\n  // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n  && ssr_window_esm[\"document\"].implementation.hasFeature('', '') !== true) {\n    // This is the only way to test support for the `wheel` event in IE9+.\n    isSupported = ssr_window_esm[\"document\"].implementation.hasFeature('Events.wheel', '3.0');\n  }\n  return isSupported;\n}\nvar Mousewheel = {\n  lastScrollTime: swiper_src_utils_utils.now(),\n  lastEventBeforeSnap: undefined,\n  recentWheelEvents: [],\n  event: function event() {\n    if (ssr_window_esm[\"window\"].navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';\n    return isEventSupported() ? 'wheel' : 'mousewheel';\n  },\n  normalize: function normalize(e) {\n    // Reasonable defaults\n    var PIXEL_STEP = 10;\n    var LINE_HEIGHT = 40;\n    var PAGE_HEIGHT = 800;\n    var sX = 0;\n    var sY = 0; // spinX, spinY\n    var pX = 0;\n    var pY = 0; // pixelX, pixelY\n\n    // Legacy\n    if ('detail' in e) {\n      sY = e.detail;\n    }\n    if ('wheelDelta' in e) {\n      sY = -e.wheelDelta / 120;\n    }\n    if ('wheelDeltaY' in e) {\n      sY = -e.wheelDeltaY / 120;\n    }\n    if ('wheelDeltaX' in e) {\n      sX = -e.wheelDeltaX / 120;\n    }\n\n    // side scrolling on FF with DOMMouseScroll\n    if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n      sX = sY;\n      sY = 0;\n    }\n    pX = sX * PIXEL_STEP;\n    pY = sY * PIXEL_STEP;\n    if ('deltaY' in e) {\n      pY = e.deltaY;\n    }\n    if ('deltaX' in e) {\n      pX = e.deltaX;\n    }\n    if (e.shiftKey && !pX) {\n      // if user scrolls with shift he wants horizontal scroll\n      pX = pY;\n      pY = 0;\n    }\n    if ((pX || pY) && e.deltaMode) {\n      if (e.deltaMode === 1) {\n        // delta in LINE units\n        pX *= LINE_HEIGHT;\n        pY *= LINE_HEIGHT;\n      } else {\n        // delta in PAGE units\n        pX *= PAGE_HEIGHT;\n        pY *= PAGE_HEIGHT;\n      }\n    }\n\n    // Fall-back if spin cannot be determined\n    if (pX && !sX) {\n      sX = pX < 1 ? -1 : 1;\n    }\n    if (pY && !sY) {\n      sY = pY < 1 ? -1 : 1;\n    }\n    return {\n      spinX: sX,\n      spinY: sY,\n      pixelX: pX,\n      pixelY: pY\n    };\n  },\n  handleMouseEnter: function handleMouseEnter() {\n    var swiper = this;\n    swiper.mouseEntered = true;\n  },\n  handleMouseLeave: function handleMouseLeave() {\n    var swiper = this;\n    swiper.mouseEntered = false;\n  },\n  handle: function handle(event) {\n    var e = event;\n    var swiper = this;\n    var params = swiper.params.mousewheel;\n    if (swiper.params.cssMode) {\n      e.preventDefault();\n    }\n    var target = swiper.$el;\n    if (swiper.params.mousewheel.eventsTarged !== 'container') {\n      target = dom(swiper.params.mousewheel.eventsTarged);\n    }\n    if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n    if (e.originalEvent) e = e.originalEvent; // jquery fix\n    var delta = 0;\n    var rtlFactor = swiper.rtlTranslate ? -1 : 1;\n    var data = Mousewheel.normalize(e);\n    if (params.forceToAxis) {\n      if (swiper.isHorizontal()) {\n        if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;else return true;\n      } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;else return true;\n    } else {\n      delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n    }\n    if (delta === 0) return true;\n    if (params.invert) delta = -delta;\n    if (!swiper.params.freeMode) {\n      // Register the new event in a variable which stores the relevant data\n      var newEvent = {\n        time: swiper_src_utils_utils.now(),\n        delta: Math.abs(delta),\n        direction: Math.sign(delta),\n        raw: event\n      };\n\n      // Keep the most recent events\n      var recentWheelEvents = swiper.mousewheel.recentWheelEvents;\n      if (recentWheelEvents.length >= 2) {\n        recentWheelEvents.shift(); // only store the last N events\n      }\n      var prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n      recentWheelEvents.push(newEvent);\n\n      // If there is at least one previous recorded event:\n      //   If direction has changed or\n      //   if the scroll is quicker than the previous one:\n      //     Animate the slider.\n      // Else (this is the first time the wheel is moved):\n      //     Animate the slider.\n      if (prevEvent) {\n        if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n          swiper.mousewheel.animateSlider(newEvent);\n        }\n      } else {\n        swiper.mousewheel.animateSlider(newEvent);\n      }\n\n      // If it's time to release the scroll:\n      //   Return now so you don't hit the preventDefault.\n      if (swiper.mousewheel.releaseScroll(newEvent)) {\n        return true;\n      }\n    } else {\n      // Freemode or scrollContainer:\n\n      // If we recently snapped after a momentum scroll, then ignore wheel events\n      // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n      // or if it's a new scroll (larger delta or inverse sign as last event before\n      // an end-of-momentum snap).\n      var _newEvent = {\n        time: swiper_src_utils_utils.now(),\n        delta: Math.abs(delta),\n        direction: Math.sign(delta)\n      };\n      var lastEventBeforeSnap = swiper.mousewheel.lastEventBeforeSnap;\n      var ignoreWheelEvents = lastEventBeforeSnap && _newEvent.time < lastEventBeforeSnap.time + 500 && _newEvent.delta <= lastEventBeforeSnap.delta && _newEvent.direction === lastEventBeforeSnap.direction;\n      if (!ignoreWheelEvents) {\n        swiper.mousewheel.lastEventBeforeSnap = undefined;\n        if (swiper.params.loop) {\n          swiper.loopFix();\n        }\n        var position = swiper.getTranslate() + delta * params.sensitivity;\n        var wasBeginning = swiper.isBeginning;\n        var wasEnd = swiper.isEnd;\n        if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n        if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n        swiper.setTransition(0);\n        swiper.setTranslate(position);\n        swiper.updateProgress();\n        swiper.updateActiveIndex();\n        swiper.updateSlidesClasses();\n        if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {\n          swiper.updateSlidesClasses();\n        }\n        if (swiper.params.freeModeSticky) {\n          // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n          // the end of a momentum scroll by storing recent (N=15?) wheel events.\n          // 1. do all N events have decreasing or same (absolute value) delta?\n          // 2. did all N events arrive in the last M (M=500?) msecs?\n          // 3. does the earliest event have an (absolute value) delta that's\n          //    at least P (P=1?) larger than the most recent event's delta?\n          // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n          // If 1-4 are \"yes\" then we're near the end of a momuntum scroll deceleration.\n          // Snap immediately and ignore remaining wheel events in this scroll.\n          // See comment above for \"remaining wheel events in this scroll\" determination.\n          // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n          clearTimeout(swiper.mousewheel.timeout);\n          swiper.mousewheel.timeout = undefined;\n          var _recentWheelEvents = swiper.mousewheel.recentWheelEvents;\n          if (_recentWheelEvents.length >= 15) {\n            _recentWheelEvents.shift(); // only store the last N events\n          }\n          var _prevEvent = _recentWheelEvents.length ? _recentWheelEvents[_recentWheelEvents.length - 1] : undefined;\n          var firstEvent = _recentWheelEvents[0];\n          _recentWheelEvents.push(_newEvent);\n          if (_prevEvent && (_newEvent.delta > _prevEvent.delta || _newEvent.direction !== _prevEvent.direction)) {\n            // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n            _recentWheelEvents.splice(0);\n          } else if (_recentWheelEvents.length >= 15 && _newEvent.time - firstEvent.time < 500 && firstEvent.delta - _newEvent.delta >= 1 && _newEvent.delta <= 6) {\n            // We're at the end of the deceleration of a momentum scroll, so there's no need\n            // to wait for more events. Snap ASAP on the next tick.\n            // Also, because there's some remaining momentum we'll bias the snap in the\n            // direction of the ongoing scroll because it's better UX for the scroll to snap\n            // in the same direction as the scroll instead of reversing to snap.  Therefore,\n            // if it's already scrolled more than 20% in the current direction, keep going.\n            var snapToThreshold = delta > 0 ? 0.8 : 0.2;\n            swiper.mousewheel.lastEventBeforeSnap = _newEvent;\n            _recentWheelEvents.splice(0);\n            swiper.mousewheel.timeout = swiper_src_utils_utils.nextTick(function () {\n              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n            }, 0); // no delay; move on next tick\n          }\n          if (!swiper.mousewheel.timeout) {\n            // if we get here, then we haven't detected the end of a momentum scroll, so\n            // we'll consider a scroll \"complete\" when there haven't been any wheel events\n            // for 500ms.\n            swiper.mousewheel.timeout = swiper_src_utils_utils.nextTick(function () {\n              var snapToThreshold = 0.5;\n              swiper.mousewheel.lastEventBeforeSnap = _newEvent;\n              _recentWheelEvents.splice(0);\n              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n            }, 500);\n          }\n        }\n\n        // Emit event\n        if (!ignoreWheelEvents) swiper.emit('scroll', e);\n\n        // Stop autoplay\n        if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();\n        // Return page scroll on edge positions\n        if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n      }\n    }\n    if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n    return false;\n  },\n  animateSlider: function animateSlider(newEvent) {\n    var swiper = this;\n    // If the movement is NOT big enough and\n    // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n    //   Don't go any further (avoid insignificant scroll movement).\n    if (newEvent.delta >= 6 && swiper_src_utils_utils.now() - swiper.mousewheel.lastScrollTime < 60) {\n      // Return false as a default\n      return true;\n    }\n    // If user is scrolling towards the end:\n    //   If the slider hasn't hit the latest slide or\n    //   if the slider is a loop and\n    //   if the slider isn't moving right now:\n    //     Go to next slide and\n    //     emit a scroll event.\n    // Else (the user is scrolling towards the beginning) and\n    // if the slider hasn't hit the first slide or\n    // if the slider is a loop and\n    // if the slider isn't moving right now:\n    //   Go to prev slide and\n    //   emit a scroll event.\n    if (newEvent.direction < 0) {\n      if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n        swiper.slideNext();\n        swiper.emit('scroll', newEvent.raw);\n      }\n    } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n      swiper.slidePrev();\n      swiper.emit('scroll', newEvent.raw);\n    }\n    // If you got here is because an animation has been triggered so store the current time\n    swiper.mousewheel.lastScrollTime = new ssr_window_esm[\"window\"].Date().getTime();\n    // Return false as a default\n    return false;\n  },\n  releaseScroll: function releaseScroll(newEvent) {\n    var swiper = this;\n    var params = swiper.params.mousewheel;\n    if (newEvent.direction < 0) {\n      if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n        // Return true to animate scroll on edges\n        return true;\n      }\n    } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n      // Return true to animate scroll on edges\n      return true;\n    }\n    return false;\n  },\n  enable: function enable() {\n    var swiper = this;\n    var event = Mousewheel.event();\n    if (swiper.params.cssMode) {\n      swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle);\n      return true;\n    }\n    if (!event) return false;\n    if (swiper.mousewheel.enabled) return false;\n    var target = swiper.$el;\n    if (swiper.params.mousewheel.eventsTarged !== 'container') {\n      target = dom(swiper.params.mousewheel.eventsTarged);\n    }\n    target.on('mouseenter', swiper.mousewheel.handleMouseEnter);\n    target.on('mouseleave', swiper.mousewheel.handleMouseLeave);\n    target.on(event, swiper.mousewheel.handle);\n    swiper.mousewheel.enabled = true;\n    return true;\n  },\n  disable: function disable() {\n    var swiper = this;\n    var event = Mousewheel.event();\n    if (swiper.params.cssMode) {\n      swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle);\n      return true;\n    }\n    if (!event) return false;\n    if (!swiper.mousewheel.enabled) return false;\n    var target = swiper.$el;\n    if (swiper.params.mousewheel.eventsTarged !== 'container') {\n      target = dom(swiper.params.mousewheel.eventsTarged);\n    }\n    target.off(event, swiper.mousewheel.handle);\n    swiper.mousewheel.enabled = false;\n    return true;\n  }\n};\n/* harmony default export */ var mousewheel = ({\n  name: 'mousewheel',\n  params: {\n    mousewheel: {\n      enabled: false,\n      releaseOnEdges: false,\n      invert: false,\n      forceToAxis: false,\n      sensitivity: 1,\n      eventsTarged: 'container'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      mousewheel: {\n        enabled: false,\n        enable: Mousewheel.enable.bind(swiper),\n        disable: Mousewheel.disable.bind(swiper),\n        handle: Mousewheel.handle.bind(swiper),\n        handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),\n        handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),\n        animateSlider: Mousewheel.animateSlider.bind(swiper),\n        releaseScroll: Mousewheel.releaseScroll.bind(swiper),\n        lastScrollTime: swiper_src_utils_utils.now(),\n        lastEventBeforeSnap: undefined,\n        recentWheelEvents: []\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n        swiper.mousewheel.disable();\n      }\n      if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (swiper.params.cssMode) {\n        swiper.mousewheel.enable();\n      }\n      if (swiper.mousewheel.enabled) swiper.mousewheel.disable();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/navigation/navigation.js\n\n\nvar Navigation = {\n  update: function update() {\n    // Update Navigation Buttons\n    var swiper = this;\n    var params = swiper.params.navigation;\n    if (swiper.params.loop) return;\n    var _swiper$navigation = swiper.navigation,\n      $nextEl = _swiper$navigation.$nextEl,\n      $prevEl = _swiper$navigation.$prevEl;\n    if ($prevEl && $prevEl.length > 0) {\n      if (swiper.isBeginning) {\n        $prevEl.addClass(params.disabledClass);\n      } else {\n        $prevEl.removeClass(params.disabledClass);\n      }\n      $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n    }\n    if ($nextEl && $nextEl.length > 0) {\n      if (swiper.isEnd) {\n        $nextEl.addClass(params.disabledClass);\n      } else {\n        $nextEl.removeClass(params.disabledClass);\n      }\n      $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n    }\n  },\n  onPrevClick: function onPrevClick(e) {\n    var swiper = this;\n    e.preventDefault();\n    if (swiper.isBeginning && !swiper.params.loop) return;\n    swiper.slidePrev();\n  },\n  onNextClick: function onNextClick(e) {\n    var swiper = this;\n    e.preventDefault();\n    if (swiper.isEnd && !swiper.params.loop) return;\n    swiper.slideNext();\n  },\n  init: function init() {\n    var swiper = this;\n    var params = swiper.params.navigation;\n    if (!(params.nextEl || params.prevEl)) return;\n    var $nextEl;\n    var $prevEl;\n    if (params.nextEl) {\n      $nextEl = dom(params.nextEl);\n      if (swiper.params.uniqueNavElements && typeof params.nextEl === 'string' && $nextEl.length > 1 && swiper.$el.find(params.nextEl).length === 1) {\n        $nextEl = swiper.$el.find(params.nextEl);\n      }\n    }\n    if (params.prevEl) {\n      $prevEl = dom(params.prevEl);\n      if (swiper.params.uniqueNavElements && typeof params.prevEl === 'string' && $prevEl.length > 1 && swiper.$el.find(params.prevEl).length === 1) {\n        $prevEl = swiper.$el.find(params.prevEl);\n      }\n    }\n    if ($nextEl && $nextEl.length > 0) {\n      $nextEl.on('click', swiper.navigation.onNextClick);\n    }\n    if ($prevEl && $prevEl.length > 0) {\n      $prevEl.on('click', swiper.navigation.onPrevClick);\n    }\n    swiper_src_utils_utils.extend(swiper.navigation, {\n      $nextEl: $nextEl,\n      nextEl: $nextEl && $nextEl[0],\n      $prevEl: $prevEl,\n      prevEl: $prevEl && $prevEl[0]\n    });\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    var _swiper$navigation2 = swiper.navigation,\n      $nextEl = _swiper$navigation2.$nextEl,\n      $prevEl = _swiper$navigation2.$prevEl;\n    if ($nextEl && $nextEl.length) {\n      $nextEl.off('click', swiper.navigation.onNextClick);\n      $nextEl.removeClass(swiper.params.navigation.disabledClass);\n    }\n    if ($prevEl && $prevEl.length) {\n      $prevEl.off('click', swiper.navigation.onPrevClick);\n      $prevEl.removeClass(swiper.params.navigation.disabledClass);\n    }\n  }\n};\n/* harmony default export */ var navigation = ({\n  name: 'navigation',\n  params: {\n    navigation: {\n      nextEl: null,\n      prevEl: null,\n      hideOnClick: false,\n      disabledClass: 'swiper-button-disabled',\n      hiddenClass: 'swiper-button-hidden',\n      lockClass: 'swiper-button-lock'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      navigation: {\n        init: Navigation.init.bind(swiper),\n        update: Navigation.update.bind(swiper),\n        destroy: Navigation.destroy.bind(swiper),\n        onNextClick: Navigation.onNextClick.bind(swiper),\n        onPrevClick: Navigation.onPrevClick.bind(swiper)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      swiper.navigation.init();\n      swiper.navigation.update();\n    },\n    toEdge: function toEdge() {\n      var swiper = this;\n      swiper.navigation.update();\n    },\n    fromEdge: function fromEdge() {\n      var swiper = this;\n      swiper.navigation.update();\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      swiper.navigation.destroy();\n    },\n    click: function click(e) {\n      var swiper = this;\n      var _swiper$navigation3 = swiper.navigation,\n        $nextEl = _swiper$navigation3.$nextEl,\n        $prevEl = _swiper$navigation3.$prevEl;\n      if (swiper.params.navigation.hideOnClick && !dom(e.target).is($prevEl) && !dom(e.target).is($nextEl)) {\n        var isHidden;\n        if ($nextEl) {\n          isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n        } else if ($prevEl) {\n          isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n        }\n        if (isHidden === true) {\n          swiper.emit('navigationShow', swiper);\n        } else {\n          swiper.emit('navigationHide', swiper);\n        }\n        if ($nextEl) {\n          $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n        }\n        if ($prevEl) {\n          $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n        }\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/pagination/pagination.js\n\n\nvar Pagination = {\n  update: function update() {\n    // Render || Update Pagination bullets/items\n    var swiper = this;\n    var rtl = swiper.rtl;\n    var params = swiper.params.pagination;\n    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n    var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n    var $el = swiper.pagination.$el;\n    // Current/Total\n    var current;\n    var total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n    if (swiper.params.loop) {\n      current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n      if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n        current -= slidesLength - swiper.loopedSlides * 2;\n      }\n      if (current > total - 1) current -= total;\n      if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n    } else if (typeof swiper.snapIndex !== 'undefined') {\n      current = swiper.snapIndex;\n    } else {\n      current = swiper.activeIndex || 0;\n    }\n    // Types\n    if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n      var bullets = swiper.pagination.bullets;\n      var firstIndex;\n      var lastIndex;\n      var midIndex;\n      if (params.dynamicBullets) {\n        swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n        $el.css(swiper.isHorizontal() ? 'width' : 'height', \"\".concat(swiper.pagination.bulletSize * (params.dynamicMainBullets + 4), \"px\"));\n        if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n          swiper.pagination.dynamicBulletIndex += current - swiper.previousIndex;\n          if (swiper.pagination.dynamicBulletIndex > params.dynamicMainBullets - 1) {\n            swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;\n          } else if (swiper.pagination.dynamicBulletIndex < 0) {\n            swiper.pagination.dynamicBulletIndex = 0;\n          }\n        }\n        firstIndex = current - swiper.pagination.dynamicBulletIndex;\n        lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n        midIndex = (lastIndex + firstIndex) / 2;\n      }\n      bullets.removeClass(\"\".concat(params.bulletActiveClass, \" \").concat(params.bulletActiveClass, \"-next \").concat(params.bulletActiveClass, \"-next-next \").concat(params.bulletActiveClass, \"-prev \").concat(params.bulletActiveClass, \"-prev-prev \").concat(params.bulletActiveClass, \"-main\"));\n      if ($el.length > 1) {\n        bullets.each(function (index, bullet) {\n          var $bullet = dom(bullet);\n          var bulletIndex = $bullet.index();\n          if (bulletIndex === current) {\n            $bullet.addClass(params.bulletActiveClass);\n          }\n          if (params.dynamicBullets) {\n            if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n              $bullet.addClass(\"\".concat(params.bulletActiveClass, \"-main\"));\n            }\n            if (bulletIndex === firstIndex) {\n              $bullet.prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev\")).prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev-prev\"));\n            }\n            if (bulletIndex === lastIndex) {\n              $bullet.next().addClass(\"\".concat(params.bulletActiveClass, \"-next\")).next().addClass(\"\".concat(params.bulletActiveClass, \"-next-next\"));\n            }\n          }\n        });\n      } else {\n        var $bullet = bullets.eq(current);\n        var bulletIndex = $bullet.index();\n        $bullet.addClass(params.bulletActiveClass);\n        if (params.dynamicBullets) {\n          var $firstDisplayedBullet = bullets.eq(firstIndex);\n          var $lastDisplayedBullet = bullets.eq(lastIndex);\n          for (var i = firstIndex; i <= lastIndex; i += 1) {\n            bullets.eq(i).addClass(\"\".concat(params.bulletActiveClass, \"-main\"));\n          }\n          if (swiper.params.loop) {\n            if (bulletIndex >= bullets.length - params.dynamicMainBullets) {\n              for (var _i = params.dynamicMainBullets; _i >= 0; _i -= 1) {\n                bullets.eq(bullets.length - _i).addClass(\"\".concat(params.bulletActiveClass, \"-main\"));\n              }\n              bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(\"\".concat(params.bulletActiveClass, \"-prev\"));\n            } else {\n              $firstDisplayedBullet.prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev\")).prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev-prev\"));\n              $lastDisplayedBullet.next().addClass(\"\".concat(params.bulletActiveClass, \"-next\")).next().addClass(\"\".concat(params.bulletActiveClass, \"-next-next\"));\n            }\n          } else {\n            $firstDisplayedBullet.prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev\")).prev().addClass(\"\".concat(params.bulletActiveClass, \"-prev-prev\"));\n            $lastDisplayedBullet.next().addClass(\"\".concat(params.bulletActiveClass, \"-next\")).next().addClass(\"\".concat(params.bulletActiveClass, \"-next-next\"));\n          }\n        }\n      }\n      if (params.dynamicBullets) {\n        var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n        var bulletsOffset = (swiper.pagination.bulletSize * dynamicBulletsLength - swiper.pagination.bulletSize) / 2 - midIndex * swiper.pagination.bulletSize;\n        var offsetProp = rtl ? 'right' : 'left';\n        bullets.css(swiper.isHorizontal() ? offsetProp : 'top', \"\".concat(bulletsOffset, \"px\"));\n      }\n    }\n    if (params.type === 'fraction') {\n      $el.find(\".\".concat(params.currentClass)).text(params.formatFractionCurrent(current + 1));\n      $el.find(\".\".concat(params.totalClass)).text(params.formatFractionTotal(total));\n    }\n    if (params.type === 'progressbar') {\n      var progressbarDirection;\n      if (params.progressbarOpposite) {\n        progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n      } else {\n        progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n      }\n      var scale = (current + 1) / total;\n      var scaleX = 1;\n      var scaleY = 1;\n      if (progressbarDirection === 'horizontal') {\n        scaleX = scale;\n      } else {\n        scaleY = scale;\n      }\n      $el.find(\".\".concat(params.progressbarFillClass)).transform(\"translate3d(0,0,0) scaleX(\".concat(scaleX, \") scaleY(\").concat(scaleY, \")\")).transition(swiper.params.speed);\n    }\n    if (params.type === 'custom' && params.renderCustom) {\n      $el.html(params.renderCustom(swiper, current + 1, total));\n      swiper.emit('paginationRender', swiper, $el[0]);\n    } else {\n      swiper.emit('paginationUpdate', swiper, $el[0]);\n    }\n    $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n  },\n  render: function render() {\n    // Render Container\n    var swiper = this;\n    var params = swiper.params.pagination;\n    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n    var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n    var $el = swiper.pagination.$el;\n    var paginationHTML = '';\n    if (params.type === 'bullets') {\n      var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n      for (var i = 0; i < numberOfBullets; i += 1) {\n        if (params.renderBullet) {\n          paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n        } else {\n          paginationHTML += \"<\".concat(params.bulletElement, \" class=\\\"\").concat(params.bulletClass, \"\\\"></\").concat(params.bulletElement, \">\");\n        }\n      }\n      $el.html(paginationHTML);\n      swiper.pagination.bullets = $el.find(\".\".concat(params.bulletClass));\n    }\n    if (params.type === 'fraction') {\n      if (params.renderFraction) {\n        paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n      } else {\n        paginationHTML = \"<span class=\\\"\".concat(params.currentClass, \"\\\"></span>\") + ' / ' + \"<span class=\\\"\".concat(params.totalClass, \"\\\"></span>\");\n      }\n      $el.html(paginationHTML);\n    }\n    if (params.type === 'progressbar') {\n      if (params.renderProgressbar) {\n        paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n      } else {\n        paginationHTML = \"<span class=\\\"\".concat(params.progressbarFillClass, \"\\\"></span>\");\n      }\n      $el.html(paginationHTML);\n    }\n    if (params.type !== 'custom') {\n      swiper.emit('paginationRender', swiper.pagination.$el[0]);\n    }\n  },\n  init: function init() {\n    var swiper = this;\n    var params = swiper.params.pagination;\n    if (!params.el) return;\n    var $el = dom(params.el);\n    if ($el.length === 0) return;\n    if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && swiper.$el.find(params.el).length === 1) {\n      $el = swiper.$el.find(params.el);\n    }\n    if (params.type === 'bullets' && params.clickable) {\n      $el.addClass(params.clickableClass);\n    }\n    $el.addClass(params.modifierClass + params.type);\n    if (params.type === 'bullets' && params.dynamicBullets) {\n      $el.addClass(\"\".concat(params.modifierClass).concat(params.type, \"-dynamic\"));\n      swiper.pagination.dynamicBulletIndex = 0;\n      if (params.dynamicMainBullets < 1) {\n        params.dynamicMainBullets = 1;\n      }\n    }\n    if (params.type === 'progressbar' && params.progressbarOpposite) {\n      $el.addClass(params.progressbarOppositeClass);\n    }\n    if (params.clickable) {\n      $el.on('click', \".\".concat(params.bulletClass), function onClick(e) {\n        e.preventDefault();\n        var index = dom(this).index() * swiper.params.slidesPerGroup;\n        if (swiper.params.loop) index += swiper.loopedSlides;\n        swiper.slideTo(index);\n      });\n    }\n    swiper_src_utils_utils.extend(swiper.pagination, {\n      $el: $el,\n      el: $el[0]\n    });\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    var params = swiper.params.pagination;\n    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n    var $el = swiper.pagination.$el;\n    $el.removeClass(params.hiddenClass);\n    $el.removeClass(params.modifierClass + params.type);\n    if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n    if (params.clickable) {\n      $el.off('click', \".\".concat(params.bulletClass));\n    }\n  }\n};\n/* harmony default export */ var pagination = ({\n  name: 'pagination',\n  params: {\n    pagination: {\n      el: null,\n      bulletElement: 'span',\n      clickable: false,\n      hideOnClick: false,\n      renderBullet: null,\n      renderProgressbar: null,\n      renderFraction: null,\n      renderCustom: null,\n      progressbarOpposite: false,\n      type: 'bullets',\n      // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n      dynamicBullets: false,\n      dynamicMainBullets: 1,\n      formatFractionCurrent: function formatFractionCurrent(number) {\n        return number;\n      },\n      formatFractionTotal: function formatFractionTotal(number) {\n        return number;\n      },\n      bulletClass: 'swiper-pagination-bullet',\n      bulletActiveClass: 'swiper-pagination-bullet-active',\n      modifierClass: 'swiper-pagination-',\n      // NEW\n      currentClass: 'swiper-pagination-current',\n      totalClass: 'swiper-pagination-total',\n      hiddenClass: 'swiper-pagination-hidden',\n      progressbarFillClass: 'swiper-pagination-progressbar-fill',\n      progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',\n      clickableClass: 'swiper-pagination-clickable',\n      // NEW\n      lockClass: 'swiper-pagination-lock'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      pagination: {\n        init: Pagination.init.bind(swiper),\n        render: Pagination.render.bind(swiper),\n        update: Pagination.update.bind(swiper),\n        destroy: Pagination.destroy.bind(swiper),\n        dynamicBulletIndex: 0\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      swiper.pagination.init();\n      swiper.pagination.render();\n      swiper.pagination.update();\n    },\n    activeIndexChange: function activeIndexChange() {\n      var swiper = this;\n      if (swiper.params.loop) {\n        swiper.pagination.update();\n      } else if (typeof swiper.snapIndex === 'undefined') {\n        swiper.pagination.update();\n      }\n    },\n    snapIndexChange: function snapIndexChange() {\n      var swiper = this;\n      if (!swiper.params.loop) {\n        swiper.pagination.update();\n      }\n    },\n    slidesLengthChange: function slidesLengthChange() {\n      var swiper = this;\n      if (swiper.params.loop) {\n        swiper.pagination.render();\n        swiper.pagination.update();\n      }\n    },\n    snapGridLengthChange: function snapGridLengthChange() {\n      var swiper = this;\n      if (!swiper.params.loop) {\n        swiper.pagination.render();\n        swiper.pagination.update();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      swiper.pagination.destroy();\n    },\n    click: function click(e) {\n      var swiper = this;\n      if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && swiper.pagination.$el.length > 0 && !dom(e.target).hasClass(swiper.params.pagination.bulletClass)) {\n        var isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass);\n        if (isHidden === true) {\n          swiper.emit('paginationShow', swiper);\n        } else {\n          swiper.emit('paginationHide', swiper);\n        }\n        swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/scrollbar/scrollbar.js\n\n\n\n\nvar Scrollbar = {\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n    var scrollbar = swiper.scrollbar,\n      rtl = swiper.rtlTranslate,\n      progress = swiper.progress;\n    var dragSize = scrollbar.dragSize,\n      trackSize = scrollbar.trackSize,\n      $dragEl = scrollbar.$dragEl,\n      $el = scrollbar.$el;\n    var params = swiper.params.scrollbar;\n    var newSize = dragSize;\n    var newPos = (trackSize - dragSize) * progress;\n    if (rtl) {\n      newPos = -newPos;\n      if (newPos > 0) {\n        newSize = dragSize - newPos;\n        newPos = 0;\n      } else if (-newPos + dragSize > trackSize) {\n        newSize = trackSize + newPos;\n      }\n    } else if (newPos < 0) {\n      newSize = dragSize + newPos;\n      newPos = 0;\n    } else if (newPos + dragSize > trackSize) {\n      newSize = trackSize - newPos;\n    }\n    if (swiper.isHorizontal()) {\n      $dragEl.transform(\"translate3d(\".concat(newPos, \"px, 0, 0)\"));\n      $dragEl[0].style.width = \"\".concat(newSize, \"px\");\n    } else {\n      $dragEl.transform(\"translate3d(0px, \".concat(newPos, \"px, 0)\"));\n      $dragEl[0].style.height = \"\".concat(newSize, \"px\");\n    }\n    if (params.hide) {\n      clearTimeout(swiper.scrollbar.timeout);\n      $el[0].style.opacity = 1;\n      swiper.scrollbar.timeout = setTimeout(function () {\n        $el[0].style.opacity = 0;\n        $el.transition(400);\n      }, 1000);\n    }\n  },\n  setTransition: function setTransition(duration) {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n    swiper.scrollbar.$dragEl.transition(duration);\n  },\n  updateSize: function updateSize() {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n    var scrollbar = swiper.scrollbar;\n    var $dragEl = scrollbar.$dragEl,\n      $el = scrollbar.$el;\n    $dragEl[0].style.width = '';\n    $dragEl[0].style.height = '';\n    var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n    var divider = swiper.size / swiper.virtualSize;\n    var moveDivider = divider * (trackSize / swiper.size);\n    var dragSize;\n    if (swiper.params.scrollbar.dragSize === 'auto') {\n      dragSize = trackSize * divider;\n    } else {\n      dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n    }\n    if (swiper.isHorizontal()) {\n      $dragEl[0].style.width = \"\".concat(dragSize, \"px\");\n    } else {\n      $dragEl[0].style.height = \"\".concat(dragSize, \"px\");\n    }\n    if (divider >= 1) {\n      $el[0].style.display = 'none';\n    } else {\n      $el[0].style.display = '';\n    }\n    if (swiper.params.scrollbar.hide) {\n      $el[0].style.opacity = 0;\n    }\n    swiper_src_utils_utils.extend(scrollbar, {\n      trackSize: trackSize,\n      divider: divider,\n      moveDivider: moveDivider,\n      dragSize: dragSize\n    });\n    scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n  },\n  getPointerPosition: function getPointerPosition(e) {\n    var swiper = this;\n    if (swiper.isHorizontal()) {\n      return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX;\n    }\n    return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY;\n  },\n  setDragPosition: function setDragPosition(e) {\n    var swiper = this;\n    var scrollbar = swiper.scrollbar,\n      rtl = swiper.rtlTranslate;\n    var $el = scrollbar.$el,\n      dragSize = scrollbar.dragSize,\n      trackSize = scrollbar.trackSize,\n      dragStartPos = scrollbar.dragStartPos;\n    var positionRatio;\n    positionRatio = (scrollbar.getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n    positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n    if (rtl) {\n      positionRatio = 1 - positionRatio;\n    }\n    var position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n    swiper.updateProgress(position);\n    swiper.setTranslate(position);\n    swiper.updateActiveIndex();\n    swiper.updateSlidesClasses();\n  },\n  onDragStart: function onDragStart(e) {\n    var swiper = this;\n    var params = swiper.params.scrollbar;\n    var scrollbar = swiper.scrollbar,\n      $wrapperEl = swiper.$wrapperEl;\n    var $el = scrollbar.$el,\n      $dragEl = scrollbar.$dragEl;\n    swiper.scrollbar.isTouched = true;\n    swiper.scrollbar.dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n    e.preventDefault();\n    e.stopPropagation();\n    $wrapperEl.transition(100);\n    $dragEl.transition(100);\n    scrollbar.setDragPosition(e);\n    clearTimeout(swiper.scrollbar.dragTimeout);\n    $el.transition(0);\n    if (params.hide) {\n      $el.css('opacity', 1);\n    }\n    if (swiper.params.cssMode) {\n      swiper.$wrapperEl.css('scroll-snap-type', 'none');\n    }\n    swiper.emit('scrollbarDragStart', e);\n  },\n  onDragMove: function onDragMove(e) {\n    var swiper = this;\n    var scrollbar = swiper.scrollbar,\n      $wrapperEl = swiper.$wrapperEl;\n    var $el = scrollbar.$el,\n      $dragEl = scrollbar.$dragEl;\n    if (!swiper.scrollbar.isTouched) return;\n    if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n    scrollbar.setDragPosition(e);\n    $wrapperEl.transition(0);\n    $el.transition(0);\n    $dragEl.transition(0);\n    swiper.emit('scrollbarDragMove', e);\n  },\n  onDragEnd: function onDragEnd(e) {\n    var swiper = this;\n    var params = swiper.params.scrollbar;\n    var scrollbar = swiper.scrollbar,\n      $wrapperEl = swiper.$wrapperEl;\n    var $el = scrollbar.$el;\n    if (!swiper.scrollbar.isTouched) return;\n    swiper.scrollbar.isTouched = false;\n    if (swiper.params.cssMode) {\n      swiper.$wrapperEl.css('scroll-snap-type', '');\n      $wrapperEl.transition('');\n    }\n    if (params.hide) {\n      clearTimeout(swiper.scrollbar.dragTimeout);\n      swiper.scrollbar.dragTimeout = swiper_src_utils_utils.nextTick(function () {\n        $el.css('opacity', 0);\n        $el.transition(400);\n      }, 1000);\n    }\n    swiper.emit('scrollbarDragEnd', e);\n    if (params.snapOnRelease) {\n      swiper.slideToClosest();\n    }\n  },\n  enableDraggable: function enableDraggable() {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el) return;\n    var scrollbar = swiper.scrollbar,\n      touchEventsTouch = swiper.touchEventsTouch,\n      touchEventsDesktop = swiper.touchEventsDesktop,\n      params = swiper.params;\n    var $el = scrollbar.$el;\n    var target = $el[0];\n    var activeListener = swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n      passive: false,\n      capture: false\n    } : false;\n    var passiveListener = swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n      passive: true,\n      capture: false\n    } : false;\n    if (!swiper_src_utils_support.touch) {\n      target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);\n      ssr_window_esm[\"document\"].addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);\n      ssr_window_esm[\"document\"].addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);\n    } else {\n      target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);\n      target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);\n      target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);\n    }\n  },\n  disableDraggable: function disableDraggable() {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el) return;\n    var scrollbar = swiper.scrollbar,\n      touchEventsTouch = swiper.touchEventsTouch,\n      touchEventsDesktop = swiper.touchEventsDesktop,\n      params = swiper.params;\n    var $el = scrollbar.$el;\n    var target = $el[0];\n    var activeListener = swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n      passive: false,\n      capture: false\n    } : false;\n    var passiveListener = swiper_src_utils_support.passiveListener && params.passiveListeners ? {\n      passive: true,\n      capture: false\n    } : false;\n    if (!swiper_src_utils_support.touch) {\n      target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);\n      ssr_window_esm[\"document\"].removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);\n      ssr_window_esm[\"document\"].removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);\n    } else {\n      target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);\n      target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);\n      target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);\n    }\n  },\n  init: function init() {\n    var swiper = this;\n    if (!swiper.params.scrollbar.el) return;\n    var scrollbar = swiper.scrollbar,\n      $swiperEl = swiper.$el;\n    var params = swiper.params.scrollbar;\n    var $el = dom(params.el);\n    if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n      $el = $swiperEl.find(params.el);\n    }\n    var $dragEl = $el.find(\".\".concat(swiper.params.scrollbar.dragClass));\n    if ($dragEl.length === 0) {\n      $dragEl = dom(\"<div class=\\\"\".concat(swiper.params.scrollbar.dragClass, \"\\\"></div>\"));\n      $el.append($dragEl);\n    }\n    swiper_src_utils_utils.extend(scrollbar, {\n      $el: $el,\n      el: $el[0],\n      $dragEl: $dragEl,\n      dragEl: $dragEl[0]\n    });\n    if (params.draggable) {\n      scrollbar.enableDraggable();\n    }\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    swiper.scrollbar.disableDraggable();\n  }\n};\n/* harmony default export */ var scrollbar_scrollbar = ({\n  name: 'scrollbar',\n  params: {\n    scrollbar: {\n      el: null,\n      dragSize: 'auto',\n      hide: false,\n      draggable: false,\n      snapOnRelease: true,\n      lockClass: 'swiper-scrollbar-lock',\n      dragClass: 'swiper-scrollbar-drag'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      scrollbar: {\n        init: Scrollbar.init.bind(swiper),\n        destroy: Scrollbar.destroy.bind(swiper),\n        updateSize: Scrollbar.updateSize.bind(swiper),\n        setTranslate: Scrollbar.setTranslate.bind(swiper),\n        setTransition: Scrollbar.setTransition.bind(swiper),\n        enableDraggable: Scrollbar.enableDraggable.bind(swiper),\n        disableDraggable: Scrollbar.disableDraggable.bind(swiper),\n        setDragPosition: Scrollbar.setDragPosition.bind(swiper),\n        getPointerPosition: Scrollbar.getPointerPosition.bind(swiper),\n        onDragStart: Scrollbar.onDragStart.bind(swiper),\n        onDragMove: Scrollbar.onDragMove.bind(swiper),\n        onDragEnd: Scrollbar.onDragEnd.bind(swiper),\n        isTouched: false,\n        timeout: null,\n        dragTimeout: null\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      swiper.scrollbar.init();\n      swiper.scrollbar.updateSize();\n      swiper.scrollbar.setTranslate();\n    },\n    update: function update() {\n      var swiper = this;\n      swiper.scrollbar.updateSize();\n    },\n    resize: function resize() {\n      var swiper = this;\n      swiper.scrollbar.updateSize();\n    },\n    observerUpdate: function observerUpdate() {\n      var swiper = this;\n      swiper.scrollbar.updateSize();\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      swiper.scrollbar.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      swiper.scrollbar.setTransition(duration);\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      swiper.scrollbar.destroy();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/parallax/parallax.js\n\n\nvar Parallax = {\n  setTransform: function setTransform(el, progress) {\n    var swiper = this;\n    var rtl = swiper.rtl;\n    var $el = dom(el);\n    var rtlFactor = rtl ? -1 : 1;\n    var p = $el.attr('data-swiper-parallax') || '0';\n    var x = $el.attr('data-swiper-parallax-x');\n    var y = $el.attr('data-swiper-parallax-y');\n    var scale = $el.attr('data-swiper-parallax-scale');\n    var opacity = $el.attr('data-swiper-parallax-opacity');\n    if (x || y) {\n      x = x || '0';\n      y = y || '0';\n    } else if (swiper.isHorizontal()) {\n      x = p;\n      y = '0';\n    } else {\n      y = p;\n      x = '0';\n    }\n    if (x.indexOf('%') >= 0) {\n      x = \"\".concat(parseInt(x, 10) * progress * rtlFactor, \"%\");\n    } else {\n      x = \"\".concat(x * progress * rtlFactor, \"px\");\n    }\n    if (y.indexOf('%') >= 0) {\n      y = \"\".concat(parseInt(y, 10) * progress, \"%\");\n    } else {\n      y = \"\".concat(y * progress, \"px\");\n    }\n    if (typeof opacity !== 'undefined' && opacity !== null) {\n      var currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n      $el[0].style.opacity = currentOpacity;\n    }\n    if (typeof scale === 'undefined' || scale === null) {\n      $el.transform(\"translate3d(\".concat(x, \", \").concat(y, \", 0px)\"));\n    } else {\n      var currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n      $el.transform(\"translate3d(\".concat(x, \", \").concat(y, \", 0px) scale(\").concat(currentScale, \")\"));\n    }\n  },\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    var $el = swiper.$el,\n      slides = swiper.slides,\n      progress = swiper.progress,\n      snapGrid = swiper.snapGrid;\n    $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, el) {\n      swiper.parallax.setTransform(el, progress);\n    });\n    slides.each(function (slideIndex, slideEl) {\n      var slideProgress = slideEl.progress;\n      if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n        slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n      }\n      slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n      dom(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, el) {\n        swiper.parallax.setTransform(el, slideProgress);\n      });\n    });\n  },\n  setTransition: function setTransition() {\n    var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed;\n    var swiper = this;\n    var $el = swiper.$el;\n    $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, parallaxEl) {\n      var $parallaxEl = dom(parallaxEl);\n      var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n      if (duration === 0) parallaxDuration = 0;\n      $parallaxEl.transition(parallaxDuration);\n    });\n  }\n};\n/* harmony default export */ var parallax = ({\n  name: 'parallax',\n  params: {\n    parallax: {\n      enabled: false\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      parallax: {\n        setTransform: Parallax.setTransform.bind(swiper),\n        setTranslate: Parallax.setTranslate.bind(swiper),\n        setTransition: Parallax.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (!swiper.params.parallax.enabled) return;\n      swiper.params.watchSlidesProgress = true;\n      swiper.originalParams.watchSlidesProgress = true;\n    },\n    init: function init() {\n      var swiper = this;\n      if (!swiper.params.parallax.enabled) return;\n      swiper.parallax.setTranslate();\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (!swiper.params.parallax.enabled) return;\n      swiper.parallax.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      if (!swiper.params.parallax.enabled) return;\n      swiper.parallax.setTransition(duration);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/zoom/zoom.js\n\n\n\n\nvar Zoom = {\n  // Calc Scale From Multi-touches\n  getDistanceBetweenTouches: function getDistanceBetweenTouches(e) {\n    if (e.targetTouches.length < 2) return 1;\n    var x1 = e.targetTouches[0].pageX;\n    var y1 = e.targetTouches[0].pageY;\n    var x2 = e.targetTouches[1].pageX;\n    var y2 = e.targetTouches[1].pageY;\n    var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n    return distance;\n  },\n  // Events\n  onGestureStart: function onGestureStart(e) {\n    var swiper = this;\n    var params = swiper.params.zoom;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture;\n    zoom.fakeGestureTouched = false;\n    zoom.fakeGestureMoved = false;\n    if (!swiper_src_utils_support.gestures) {\n      if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n        return;\n      }\n      zoom.fakeGestureTouched = true;\n      gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);\n    }\n    if (!gesture.$slideEl || !gesture.$slideEl.length) {\n      gesture.$slideEl = dom(e.target).closest(\".\".concat(swiper.params.slideClass));\n      if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n      gesture.$imageWrapEl = gesture.$imageEl.parent(\".\".concat(params.containerClass));\n      gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n      if (gesture.$imageWrapEl.length === 0) {\n        gesture.$imageEl = undefined;\n        return;\n      }\n    }\n    if (gesture.$imageEl) {\n      gesture.$imageEl.transition(0);\n    }\n    swiper.zoom.isScaling = true;\n  },\n  onGestureChange: function onGestureChange(e) {\n    var swiper = this;\n    var params = swiper.params.zoom;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture;\n    if (!swiper_src_utils_support.gestures) {\n      if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n        return;\n      }\n      zoom.fakeGestureMoved = true;\n      gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);\n    }\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    if (swiper_src_utils_support.gestures) {\n      zoom.scale = e.scale * zoom.currentScale;\n    } else {\n      zoom.scale = gesture.scaleMove / gesture.scaleStart * zoom.currentScale;\n    }\n    if (zoom.scale > gesture.maxRatio) {\n      zoom.scale = gesture.maxRatio - 1 + Math.pow(zoom.scale - gesture.maxRatio + 1, 0.5);\n    }\n    if (zoom.scale < params.minRatio) {\n      zoom.scale = params.minRatio + 1 - Math.pow(params.minRatio - zoom.scale + 1, 0.5);\n    }\n    gesture.$imageEl.transform(\"translate3d(0,0,0) scale(\".concat(zoom.scale, \")\"));\n  },\n  onGestureEnd: function onGestureEnd(e) {\n    var swiper = this;\n    var params = swiper.params.zoom;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture;\n    if (!swiper_src_utils_support.gestures) {\n      if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {\n        return;\n      }\n      if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !utils_device.android) {\n        return;\n      }\n      zoom.fakeGestureTouched = false;\n      zoom.fakeGestureMoved = false;\n    }\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n    gesture.$imageEl.transition(swiper.params.speed).transform(\"translate3d(0,0,0) scale(\".concat(zoom.scale, \")\"));\n    zoom.currentScale = zoom.scale;\n    zoom.isScaling = false;\n    if (zoom.scale === 1) gesture.$slideEl = undefined;\n  },\n  onTouchStart: function onTouchStart(e) {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture,\n      image = zoom.image;\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    if (image.isTouched) return;\n    if (utils_device.android && e.cancelable) e.preventDefault();\n    image.isTouched = true;\n    image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n    image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n  },\n  onTouchMove: function onTouchMove(e) {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture,\n      image = zoom.image,\n      velocity = zoom.velocity;\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    swiper.allowClick = false;\n    if (!image.isTouched || !gesture.$slideEl) return;\n    if (!image.isMoved) {\n      image.width = gesture.$imageEl[0].offsetWidth;\n      image.height = gesture.$imageEl[0].offsetHeight;\n      image.startX = swiper_src_utils_utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n      image.startY = swiper_src_utils_utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n      gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n      gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n      gesture.$imageWrapEl.transition(0);\n      if (swiper.rtl) {\n        image.startX = -image.startX;\n        image.startY = -image.startY;\n      }\n    }\n    // Define if we need image drag\n    var scaledWidth = image.width * zoom.scale;\n    var scaledHeight = image.height * zoom.scale;\n    if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n    image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n    image.maxX = -image.minX;\n    image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n    image.maxY = -image.minY;\n    image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n    image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n    if (!image.isMoved && !zoom.isScaling) {\n      if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {\n        image.isTouched = false;\n        return;\n      }\n      if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {\n        image.isTouched = false;\n        return;\n      }\n    }\n    if (e.cancelable) {\n      e.preventDefault();\n    }\n    e.stopPropagation();\n    image.isMoved = true;\n    image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n    image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n    if (image.currentX < image.minX) {\n      image.currentX = image.minX + 1 - Math.pow(image.minX - image.currentX + 1, 0.8);\n    }\n    if (image.currentX > image.maxX) {\n      image.currentX = image.maxX - 1 + Math.pow(image.currentX - image.maxX + 1, 0.8);\n    }\n    if (image.currentY < image.minY) {\n      image.currentY = image.minY + 1 - Math.pow(image.minY - image.currentY + 1, 0.8);\n    }\n    if (image.currentY > image.maxY) {\n      image.currentY = image.maxY - 1 + Math.pow(image.currentY - image.maxY + 1, 0.8);\n    }\n\n    // Velocity\n    if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n    if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n    if (!velocity.prevTime) velocity.prevTime = Date.now();\n    velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n    velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n    if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n    if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n    velocity.prevPositionX = image.touchesCurrent.x;\n    velocity.prevPositionY = image.touchesCurrent.y;\n    velocity.prevTime = Date.now();\n    gesture.$imageWrapEl.transform(\"translate3d(\".concat(image.currentX, \"px, \").concat(image.currentY, \"px,0)\"));\n  },\n  onTouchEnd: function onTouchEnd() {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture,\n      image = zoom.image,\n      velocity = zoom.velocity;\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    if (!image.isTouched || !image.isMoved) {\n      image.isTouched = false;\n      image.isMoved = false;\n      return;\n    }\n    image.isTouched = false;\n    image.isMoved = false;\n    var momentumDurationX = 300;\n    var momentumDurationY = 300;\n    var momentumDistanceX = velocity.x * momentumDurationX;\n    var newPositionX = image.currentX + momentumDistanceX;\n    var momentumDistanceY = velocity.y * momentumDurationY;\n    var newPositionY = image.currentY + momentumDistanceY;\n\n    // Fix duration\n    if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n    if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n    var momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n    image.currentX = newPositionX;\n    image.currentY = newPositionY;\n\n    // Define if we need image drag\n    var scaledWidth = image.width * zoom.scale;\n    var scaledHeight = image.height * zoom.scale;\n    image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n    image.maxX = -image.minX;\n    image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n    image.maxY = -image.minY;\n    image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n    image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n    gesture.$imageWrapEl.transition(momentumDuration).transform(\"translate3d(\".concat(image.currentX, \"px, \").concat(image.currentY, \"px,0)\"));\n  },\n  onTransitionEnd: function onTransitionEnd() {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var gesture = zoom.gesture;\n    if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n      if (gesture.$imageEl) {\n        gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n      }\n      if (gesture.$imageWrapEl) {\n        gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n      }\n      zoom.scale = 1;\n      zoom.currentScale = 1;\n      gesture.$slideEl = undefined;\n      gesture.$imageEl = undefined;\n      gesture.$imageWrapEl = undefined;\n    }\n  },\n  // Toggle Zoom\n  toggle: function toggle(e) {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    if (zoom.scale && zoom.scale !== 1) {\n      // Zoom Out\n      zoom.out();\n    } else {\n      // Zoom In\n      zoom.in(e);\n    }\n  },\n  in: function _in(e) {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var params = swiper.params.zoom;\n    var gesture = zoom.gesture,\n      image = zoom.image;\n    if (!gesture.$slideEl) {\n      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n        gesture.$slideEl = swiper.$wrapperEl.children(\".\".concat(swiper.params.slideActiveClass));\n      } else {\n        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n      }\n      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n      gesture.$imageWrapEl = gesture.$imageEl.parent(\".\".concat(params.containerClass));\n    }\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    gesture.$slideEl.addClass(\"\".concat(params.zoomedSlideClass));\n    var touchX;\n    var touchY;\n    var offsetX;\n    var offsetY;\n    var diffX;\n    var diffY;\n    var translateX;\n    var translateY;\n    var imageWidth;\n    var imageHeight;\n    var scaledWidth;\n    var scaledHeight;\n    var translateMinX;\n    var translateMinY;\n    var translateMaxX;\n    var translateMaxY;\n    var slideWidth;\n    var slideHeight;\n    if (typeof image.touchesStart.x === 'undefined' && e) {\n      touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n      touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n    } else {\n      touchX = image.touchesStart.x;\n      touchY = image.touchesStart.y;\n    }\n    zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n    zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n    if (e) {\n      slideWidth = gesture.$slideEl[0].offsetWidth;\n      slideHeight = gesture.$slideEl[0].offsetHeight;\n      offsetX = gesture.$slideEl.offset().left;\n      offsetY = gesture.$slideEl.offset().top;\n      diffX = offsetX + slideWidth / 2 - touchX;\n      diffY = offsetY + slideHeight / 2 - touchY;\n      imageWidth = gesture.$imageEl[0].offsetWidth;\n      imageHeight = gesture.$imageEl[0].offsetHeight;\n      scaledWidth = imageWidth * zoom.scale;\n      scaledHeight = imageHeight * zoom.scale;\n      translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n      translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n      translateMaxX = -translateMinX;\n      translateMaxY = -translateMinY;\n      translateX = diffX * zoom.scale;\n      translateY = diffY * zoom.scale;\n      if (translateX < translateMinX) {\n        translateX = translateMinX;\n      }\n      if (translateX > translateMaxX) {\n        translateX = translateMaxX;\n      }\n      if (translateY < translateMinY) {\n        translateY = translateMinY;\n      }\n      if (translateY > translateMaxY) {\n        translateY = translateMaxY;\n      }\n    } else {\n      translateX = 0;\n      translateY = 0;\n    }\n    gesture.$imageWrapEl.transition(300).transform(\"translate3d(\".concat(translateX, \"px, \").concat(translateY, \"px,0)\"));\n    gesture.$imageEl.transition(300).transform(\"translate3d(0,0,0) scale(\".concat(zoom.scale, \")\"));\n  },\n  out: function out() {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    var params = swiper.params.zoom;\n    var gesture = zoom.gesture;\n    if (!gesture.$slideEl) {\n      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n        gesture.$slideEl = swiper.$wrapperEl.children(\".\".concat(swiper.params.slideActiveClass));\n      } else {\n        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n      }\n      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n      gesture.$imageWrapEl = gesture.$imageEl.parent(\".\".concat(params.containerClass));\n    }\n    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n    zoom.scale = 1;\n    zoom.currentScale = 1;\n    gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n    gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n    gesture.$slideEl.removeClass(\"\".concat(params.zoomedSlideClass));\n    gesture.$slideEl = undefined;\n  },\n  // Attach/Detach Events\n  enable: function enable() {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    if (zoom.enabled) return;\n    zoom.enabled = true;\n    var passiveListener = swiper.touchEvents.start === 'touchstart' && swiper_src_utils_support.passiveListener && swiper.params.passiveListeners ? {\n      passive: true,\n      capture: false\n    } : false;\n    var activeListenerWithCapture = swiper_src_utils_support.passiveListener ? {\n      passive: false,\n      capture: true\n    } : true;\n    var slideSelector = \".\".concat(swiper.params.slideClass);\n\n    // Scale image\n    if (swiper_src_utils_support.gestures) {\n      swiper.$wrapperEl.on('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);\n      swiper.$wrapperEl.on('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);\n      swiper.$wrapperEl.on('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);\n    } else if (swiper.touchEvents.start === 'touchstart') {\n      swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);\n      swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);\n      swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);\n      if (swiper.touchEvents.cancel) {\n        swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);\n      }\n    }\n\n    // Move image\n    swiper.$wrapperEl.on(swiper.touchEvents.move, \".\".concat(swiper.params.zoom.containerClass), zoom.onTouchMove, activeListenerWithCapture);\n  },\n  disable: function disable() {\n    var swiper = this;\n    var zoom = swiper.zoom;\n    if (!zoom.enabled) return;\n    swiper.zoom.enabled = false;\n    var passiveListener = swiper.touchEvents.start === 'touchstart' && swiper_src_utils_support.passiveListener && swiper.params.passiveListeners ? {\n      passive: true,\n      capture: false\n    } : false;\n    var activeListenerWithCapture = swiper_src_utils_support.passiveListener ? {\n      passive: false,\n      capture: true\n    } : true;\n    var slideSelector = \".\".concat(swiper.params.slideClass);\n\n    // Scale image\n    if (swiper_src_utils_support.gestures) {\n      swiper.$wrapperEl.off('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);\n      swiper.$wrapperEl.off('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);\n      swiper.$wrapperEl.off('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);\n    } else if (swiper.touchEvents.start === 'touchstart') {\n      swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);\n      swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);\n      swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);\n      if (swiper.touchEvents.cancel) {\n        swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);\n      }\n    }\n\n    // Move image\n    swiper.$wrapperEl.off(swiper.touchEvents.move, \".\".concat(swiper.params.zoom.containerClass), zoom.onTouchMove, activeListenerWithCapture);\n  }\n};\n/* harmony default export */ var zoom_zoom = ({\n  name: 'zoom',\n  params: {\n    zoom: {\n      enabled: false,\n      maxRatio: 3,\n      minRatio: 1,\n      toggle: true,\n      containerClass: 'swiper-zoom-container',\n      zoomedSlideClass: 'swiper-slide-zoomed'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    var zoom = {\n      enabled: false,\n      scale: 1,\n      currentScale: 1,\n      isScaling: false,\n      gesture: {\n        $slideEl: undefined,\n        slideWidth: undefined,\n        slideHeight: undefined,\n        $imageEl: undefined,\n        $imageWrapEl: undefined,\n        maxRatio: 3\n      },\n      image: {\n        isTouched: undefined,\n        isMoved: undefined,\n        currentX: undefined,\n        currentY: undefined,\n        minX: undefined,\n        minY: undefined,\n        maxX: undefined,\n        maxY: undefined,\n        width: undefined,\n        height: undefined,\n        startX: undefined,\n        startY: undefined,\n        touchesStart: {},\n        touchesCurrent: {}\n      },\n      velocity: {\n        x: undefined,\n        y: undefined,\n        prevPositionX: undefined,\n        prevPositionY: undefined,\n        prevTime: undefined\n      }\n    };\n    'onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out'.split(' ').forEach(function (methodName) {\n      zoom[methodName] = Zoom[methodName].bind(swiper);\n    });\n    swiper_src_utils_utils.extend(swiper, {\n      zoom: zoom\n    });\n    var scale = 1;\n    Object.defineProperty(swiper.zoom, 'scale', {\n      get: function get() {\n        return scale;\n      },\n      set: function set(value) {\n        if (scale !== value) {\n          var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;\n          var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;\n          swiper.emit('zoomChange', value, imageEl, slideEl);\n        }\n        scale = value;\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.zoom.enabled) {\n        swiper.zoom.enable();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      swiper.zoom.disable();\n    },\n    touchStart: function touchStart(e) {\n      var swiper = this;\n      if (!swiper.zoom.enabled) return;\n      swiper.zoom.onTouchStart(e);\n    },\n    touchEnd: function touchEnd(e) {\n      var swiper = this;\n      if (!swiper.zoom.enabled) return;\n      swiper.zoom.onTouchEnd(e);\n    },\n    doubleTap: function doubleTap(e) {\n      var swiper = this;\n      if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n        swiper.zoom.toggle(e);\n      }\n    },\n    transitionEnd: function transitionEnd() {\n      var swiper = this;\n      if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n        swiper.zoom.onTransitionEnd();\n      }\n    },\n    slideChange: function slideChange() {\n      var swiper = this;\n      if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n        swiper.zoom.onTransitionEnd();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/lazy/lazy.js\n\n\nvar lazy_Lazy = {\n  loadInSlide: function loadInSlide(index) {\n    var loadInDuplicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    var swiper = this;\n    var params = swiper.params.lazy;\n    if (typeof index === 'undefined') return;\n    if (swiper.slides.length === 0) return;\n    var isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n    var $slideEl = isVirtual ? swiper.$wrapperEl.children(\".\".concat(swiper.params.slideClass, \"[data-swiper-slide-index=\\\"\").concat(index, \"\\\"]\")) : swiper.slides.eq(index);\n    var $images = $slideEl.find(\".\".concat(params.elementClass, \":not(.\").concat(params.loadedClass, \"):not(.\").concat(params.loadingClass, \")\"));\n    if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {\n      $images = $images.add($slideEl[0]);\n    }\n    if ($images.length === 0) return;\n    $images.each(function (imageIndex, imageEl) {\n      var $imageEl = dom(imageEl);\n      $imageEl.addClass(params.loadingClass);\n      var background = $imageEl.attr('data-background');\n      var src = $imageEl.attr('data-src');\n      var srcset = $imageEl.attr('data-srcset');\n      var sizes = $imageEl.attr('data-sizes');\n      var $pictureEl = $imageEl.parent('picture');\n      swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, function () {\n        if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return;\n        if (background) {\n          $imageEl.css('background-image', \"url(\\\"\".concat(background, \"\\\")\"));\n          $imageEl.removeAttr('data-background');\n        } else {\n          if (srcset) {\n            $imageEl.attr('srcset', srcset);\n            $imageEl.removeAttr('data-srcset');\n          }\n          if (sizes) {\n            $imageEl.attr('sizes', sizes);\n            $imageEl.removeAttr('data-sizes');\n          }\n          if ($pictureEl.length) {\n            $pictureEl.children('source').each(function (sourceIndex, sourceEl) {\n              var $source = dom(sourceEl);\n              if ($source.attr('data-srcset')) {\n                $source.attr('srcset', $source.attr('data-srcset'));\n                $source.removeAttr('data-srcset');\n              }\n            });\n          }\n          if (src) {\n            $imageEl.attr('src', src);\n            $imageEl.removeAttr('data-src');\n          }\n        }\n        $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n        $slideEl.find(\".\".concat(params.preloaderClass)).remove();\n        if (swiper.params.loop && loadInDuplicate) {\n          var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n          if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n            var originalSlide = swiper.$wrapperEl.children(\"[data-swiper-slide-index=\\\"\".concat(slideOriginalIndex, \"\\\"]:not(.\").concat(swiper.params.slideDuplicateClass, \")\"));\n            swiper.lazy.loadInSlide(originalSlide.index(), false);\n          } else {\n            var duplicatedSlide = swiper.$wrapperEl.children(\".\".concat(swiper.params.slideDuplicateClass, \"[data-swiper-slide-index=\\\"\").concat(slideOriginalIndex, \"\\\"]\"));\n            swiper.lazy.loadInSlide(duplicatedSlide.index(), false);\n          }\n        }\n        swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n        if (swiper.params.autoHeight) {\n          swiper.updateAutoHeight();\n        }\n      });\n      swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n    });\n  },\n  load: function load() {\n    var swiper = this;\n    var $wrapperEl = swiper.$wrapperEl,\n      swiperParams = swiper.params,\n      slides = swiper.slides,\n      activeIndex = swiper.activeIndex;\n    var isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n    var params = swiperParams.lazy;\n    var slidesPerView = swiperParams.slidesPerView;\n    if (slidesPerView === 'auto') {\n      slidesPerView = 0;\n    }\n    function slideExist(index) {\n      if (isVirtual) {\n        if ($wrapperEl.children(\".\".concat(swiperParams.slideClass, \"[data-swiper-slide-index=\\\"\").concat(index, \"\\\"]\")).length) {\n          return true;\n        }\n      } else if (slides[index]) return true;\n      return false;\n    }\n    function slideIndex(slideEl) {\n      if (isVirtual) {\n        return dom(slideEl).attr('data-swiper-slide-index');\n      }\n      return dom(slideEl).index();\n    }\n    if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;\n    if (swiper.params.watchSlidesVisibility) {\n      $wrapperEl.children(\".\".concat(swiperParams.slideVisibleClass)).each(function (elIndex, slideEl) {\n        var index = isVirtual ? dom(slideEl).attr('data-swiper-slide-index') : dom(slideEl).index();\n        swiper.lazy.loadInSlide(index);\n      });\n    } else if (slidesPerView > 1) {\n      for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n        if (slideExist(i)) swiper.lazy.loadInSlide(i);\n      }\n    } else {\n      swiper.lazy.loadInSlide(activeIndex);\n    }\n    if (params.loadPrevNext) {\n      if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) {\n        var amount = params.loadPrevNextAmount;\n        var spv = slidesPerView;\n        var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n        var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);\n        // Next Slides\n        for (var _i = activeIndex + slidesPerView; _i < maxIndex; _i += 1) {\n          if (slideExist(_i)) swiper.lazy.loadInSlide(_i);\n        }\n        // Prev Slides\n        for (var _i2 = minIndex; _i2 < activeIndex; _i2 += 1) {\n          if (slideExist(_i2)) swiper.lazy.loadInSlide(_i2);\n        }\n      } else {\n        var nextSlide = $wrapperEl.children(\".\".concat(swiperParams.slideNextClass));\n        if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));\n        var prevSlide = $wrapperEl.children(\".\".concat(swiperParams.slidePrevClass));\n        if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));\n      }\n    }\n  }\n};\n/* harmony default export */ var lazy_lazy = ({\n  name: 'lazy',\n  params: {\n    lazy: {\n      enabled: false,\n      loadPrevNext: false,\n      loadPrevNextAmount: 1,\n      loadOnTransitionStart: false,\n      elementClass: 'swiper-lazy',\n      loadingClass: 'swiper-lazy-loading',\n      loadedClass: 'swiper-lazy-loaded',\n      preloaderClass: 'swiper-lazy-preloader'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      lazy: {\n        initialImageLoaded: false,\n        load: lazy_Lazy.load.bind(swiper),\n        loadInSlide: lazy_Lazy.loadInSlide.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n        swiper.params.preloadImages = false;\n      }\n    },\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {\n        swiper.lazy.load();\n      }\n    },\n    scroll: function scroll() {\n      var swiper = this;\n      if (swiper.params.freeMode && !swiper.params.freeModeSticky) {\n        swiper.lazy.load();\n      }\n    },\n    resize: function resize() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled) {\n        swiper.lazy.load();\n      }\n    },\n    scrollbarDragMove: function scrollbarDragMove() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled) {\n        swiper.lazy.load();\n      }\n    },\n    transitionStart: function transitionStart() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled) {\n        if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded) {\n          swiper.lazy.load();\n        }\n      }\n    },\n    transitionEnd: function transitionEnd() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n        swiper.lazy.load();\n      }\n    },\n    slideChange: function slideChange() {\n      var swiper = this;\n      if (swiper.params.lazy.enabled && swiper.params.cssMode) {\n        swiper.lazy.load();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/controller/controller.js\n/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\n\n\nvar Controller = {\n  LinearSpline: function LinearSpline(x, y) {\n    var binarySearch = function search() {\n      var maxIndex;\n      var minIndex;\n      var guess;\n      return function (array, val) {\n        minIndex = -1;\n        maxIndex = array.length;\n        while (maxIndex - minIndex > 1) {\n          guess = maxIndex + minIndex >> 1;\n          if (array[guess] <= val) {\n            minIndex = guess;\n          } else {\n            maxIndex = guess;\n          }\n        }\n        return maxIndex;\n      };\n    }();\n    this.x = x;\n    this.y = y;\n    this.lastIndex = x.length - 1;\n    // Given an x value (x2), return the expected y2 value:\n    // (x1,y1) is the known point before given value,\n    // (x3,y3) is the known point after given value.\n    var i1;\n    var i3;\n    this.interpolate = function interpolate(x2) {\n      if (!x2) return 0;\n\n      // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n      i3 = binarySearch(this.x, x2);\n      i1 = i3 - 1;\n\n      // We have our indexes i1 & i3, so we can calculate already:\n      // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n      return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];\n    };\n    return this;\n  },\n  // xxx: for now i will just save one spline function to to\n  getInterpolateFunction: function getInterpolateFunction(c) {\n    var swiper = this;\n    if (!swiper.controller.spline) {\n      swiper.controller.spline = swiper.params.loop ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);\n    }\n  },\n  setTranslate: function setTranslate(_setTranslate, byController) {\n    var swiper = this;\n    var controlled = swiper.controller.control;\n    var multiplier;\n    var controlledTranslate;\n    function setControlledTranslate(c) {\n      // this will create an Interpolate function based on the snapGrids\n      // x is the Grid of the scrolled scroller and y will be the controlled scroller\n      // it makes sense to create this only once and recall it for the interpolation\n      // the function does a lot of value caching for performance\n      var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n      if (swiper.params.controller.by === 'slide') {\n        swiper.controller.getInterpolateFunction(c);\n        // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n        // but it did not work out\n        controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n      }\n      if (!controlledTranslate || swiper.params.controller.by === 'container') {\n        multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n        controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n      }\n      if (swiper.params.controller.inverse) {\n        controlledTranslate = c.maxTranslate() - controlledTranslate;\n      }\n      c.updateProgress(controlledTranslate);\n      c.setTranslate(controlledTranslate, swiper);\n      c.updateActiveIndex();\n      c.updateSlidesClasses();\n    }\n    if (Array.isArray(controlled)) {\n      for (var i = 0; i < controlled.length; i += 1) {\n        if (controlled[i] !== byController && controlled[i] instanceof core_class) {\n          setControlledTranslate(controlled[i]);\n        }\n      }\n    } else if (controlled instanceof core_class && byController !== controlled) {\n      setControlledTranslate(controlled);\n    }\n  },\n  setTransition: function setTransition(duration, byController) {\n    var swiper = this;\n    var controlled = swiper.controller.control;\n    var i;\n    function setControlledTransition(c) {\n      c.setTransition(duration, swiper);\n      if (duration !== 0) {\n        c.transitionStart();\n        if (c.params.autoHeight) {\n          swiper_src_utils_utils.nextTick(function () {\n            c.updateAutoHeight();\n          });\n        }\n        c.$wrapperEl.transitionEnd(function () {\n          if (!controlled) return;\n          if (c.params.loop && swiper.params.controller.by === 'slide') {\n            c.loopFix();\n          }\n          c.transitionEnd();\n        });\n      }\n    }\n    if (Array.isArray(controlled)) {\n      for (i = 0; i < controlled.length; i += 1) {\n        if (controlled[i] !== byController && controlled[i] instanceof core_class) {\n          setControlledTransition(controlled[i]);\n        }\n      }\n    } else if (controlled instanceof core_class && byController !== controlled) {\n      setControlledTransition(controlled);\n    }\n  }\n};\n/* harmony default export */ var controller = ({\n  name: 'controller',\n  params: {\n    controller: {\n      control: undefined,\n      inverse: false,\n      by: 'slide' // or 'container'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      controller: {\n        control: swiper.params.controller.control,\n        getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),\n        setTranslate: Controller.setTranslate.bind(swiper),\n        setTransition: Controller.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    update: function update() {\n      var swiper = this;\n      if (!swiper.controller.control) return;\n      if (swiper.controller.spline) {\n        swiper.controller.spline = undefined;\n        delete swiper.controller.spline;\n      }\n    },\n    resize: function resize() {\n      var swiper = this;\n      if (!swiper.controller.control) return;\n      if (swiper.controller.spline) {\n        swiper.controller.spline = undefined;\n        delete swiper.controller.spline;\n      }\n    },\n    observerUpdate: function observerUpdate() {\n      var swiper = this;\n      if (!swiper.controller.control) return;\n      if (swiper.controller.spline) {\n        swiper.controller.spline = undefined;\n        delete swiper.controller.spline;\n      }\n    },\n    setTranslate: function setTranslate(translate, byController) {\n      var swiper = this;\n      if (!swiper.controller.control) return;\n      swiper.controller.setTranslate(translate, byController);\n    },\n    setTransition: function setTransition(duration, byController) {\n      var swiper = this;\n      if (!swiper.controller.control) return;\n      swiper.controller.setTransition(duration, byController);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/history/history.js\n\n\nvar history_History = {\n  init: function init() {\n    var swiper = this;\n    if (!swiper.params.history) return;\n    if (!ssr_window_esm[\"window\"].history || !ssr_window_esm[\"window\"].history.pushState) {\n      swiper.params.history.enabled = false;\n      swiper.params.hashNavigation.enabled = true;\n      return;\n    }\n    var history = swiper.history;\n    history.initialized = true;\n    history.paths = history_History.getPathValues();\n    if (!history.paths.key && !history.paths.value) return;\n    history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);\n    if (!swiper.params.history.replaceState) {\n      ssr_window_esm[\"window\"].addEventListener('popstate', swiper.history.setHistoryPopState);\n    }\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    if (!swiper.params.history.replaceState) {\n      ssr_window_esm[\"window\"].removeEventListener('popstate', swiper.history.setHistoryPopState);\n    }\n  },\n  setHistoryPopState: function setHistoryPopState() {\n    var swiper = this;\n    swiper.history.paths = history_History.getPathValues();\n    swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);\n  },\n  getPathValues: function getPathValues() {\n    var pathArray = ssr_window_esm[\"window\"].location.pathname.slice(1).split('/').filter(function (part) {\n      return part !== '';\n    });\n    var total = pathArray.length;\n    var key = pathArray[total - 2];\n    var value = pathArray[total - 1];\n    return {\n      key: key,\n      value: value\n    };\n  },\n  setHistory: function setHistory(key, index) {\n    var swiper = this;\n    if (!swiper.history.initialized || !swiper.params.history.enabled) return;\n    var slide = swiper.slides.eq(index);\n    var value = history_History.slugify(slide.attr('data-history'));\n    if (!ssr_window_esm[\"window\"].location.pathname.includes(key)) {\n      value = \"\".concat(key, \"/\").concat(value);\n    }\n    var currentState = ssr_window_esm[\"window\"].history.state;\n    if (currentState && currentState.value === value) {\n      return;\n    }\n    if (swiper.params.history.replaceState) {\n      ssr_window_esm[\"window\"].history.replaceState({\n        value: value\n      }, null, value);\n    } else {\n      ssr_window_esm[\"window\"].history.pushState({\n        value: value\n      }, null, value);\n    }\n  },\n  slugify: function slugify(text) {\n    return text.toString().replace(/\\s+/g, '-').replace(/[^\\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n  },\n  scrollToSlide: function scrollToSlide(speed, value, runCallbacks) {\n    var swiper = this;\n    if (value) {\n      for (var i = 0, length = swiper.slides.length; i < length; i += 1) {\n        var slide = swiper.slides.eq(i);\n        var slideHistory = history_History.slugify(slide.attr('data-history'));\n        if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n          var index = slide.index();\n          swiper.slideTo(index, speed, runCallbacks);\n        }\n      }\n    } else {\n      swiper.slideTo(0, speed, runCallbacks);\n    }\n  }\n};\n/* harmony default export */ var components_history_history = ({\n  name: 'history',\n  params: {\n    history: {\n      enabled: false,\n      replaceState: false,\n      key: 'slides'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      history: {\n        init: history_History.init.bind(swiper),\n        setHistory: history_History.setHistory.bind(swiper),\n        setHistoryPopState: history_History.setHistoryPopState.bind(swiper),\n        scrollToSlide: history_History.scrollToSlide.bind(swiper),\n        destroy: history_History.destroy.bind(swiper)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.history.enabled) {\n        swiper.history.init();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (swiper.params.history.enabled) {\n        swiper.history.destroy();\n      }\n    },\n    transitionEnd: function transitionEnd() {\n      var swiper = this;\n      if (swiper.history.initialized) {\n        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);\n      }\n    },\n    slideChange: function slideChange() {\n      var swiper = this;\n      if (swiper.history.initialized && swiper.params.cssMode) {\n        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/hash-navigation/hash-navigation.js\n\n\n\nvar HashNavigation = {\n  onHashCange: function onHashCange() {\n    var swiper = this;\n    swiper.emit('hashChange');\n    var newHash = ssr_window_esm[\"document\"].location.hash.replace('#', '');\n    var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n    if (newHash !== activeSlideHash) {\n      var newIndex = swiper.$wrapperEl.children(\".\".concat(swiper.params.slideClass, \"[data-hash=\\\"\").concat(newHash, \"\\\"]\")).index();\n      if (typeof newIndex === 'undefined') return;\n      swiper.slideTo(newIndex);\n    }\n  },\n  setHash: function setHash() {\n    var swiper = this;\n    if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;\n    if (swiper.params.hashNavigation.replaceState && ssr_window_esm[\"window\"].history && ssr_window_esm[\"window\"].history.replaceState) {\n      ssr_window_esm[\"window\"].history.replaceState(null, null, \"#\".concat(swiper.slides.eq(swiper.activeIndex).attr('data-hash')) || false);\n      swiper.emit('hashSet');\n    } else {\n      var slide = swiper.slides.eq(swiper.activeIndex);\n      var hash = slide.attr('data-hash') || slide.attr('data-history');\n      ssr_window_esm[\"document\"].location.hash = hash || '';\n      swiper.emit('hashSet');\n    }\n  },\n  init: function init() {\n    var swiper = this;\n    if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;\n    swiper.hashNavigation.initialized = true;\n    var hash = ssr_window_esm[\"document\"].location.hash.replace('#', '');\n    if (hash) {\n      var speed = 0;\n      for (var i = 0, length = swiper.slides.length; i < length; i += 1) {\n        var slide = swiper.slides.eq(i);\n        var slideHash = slide.attr('data-hash') || slide.attr('data-history');\n        if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n          var index = slide.index();\n          swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n        }\n      }\n    }\n    if (swiper.params.hashNavigation.watchState) {\n      dom(ssr_window_esm[\"window\"]).on('hashchange', swiper.hashNavigation.onHashCange);\n    }\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    if (swiper.params.hashNavigation.watchState) {\n      dom(ssr_window_esm[\"window\"]).off('hashchange', swiper.hashNavigation.onHashCange);\n    }\n  }\n};\n/* harmony default export */ var hash_navigation = ({\n  name: 'hash-navigation',\n  params: {\n    hashNavigation: {\n      enabled: false,\n      replaceState: false,\n      watchState: false\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      hashNavigation: {\n        initialized: false,\n        init: HashNavigation.init.bind(swiper),\n        destroy: HashNavigation.destroy.bind(swiper),\n        setHash: HashNavigation.setHash.bind(swiper),\n        onHashCange: HashNavigation.onHashCange.bind(swiper)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.hashNavigation.enabled) {\n        swiper.hashNavigation.init();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (swiper.params.hashNavigation.enabled) {\n        swiper.hashNavigation.destroy();\n      }\n    },\n    transitionEnd: function transitionEnd() {\n      var swiper = this;\n      if (swiper.hashNavigation.initialized) {\n        swiper.hashNavigation.setHash();\n      }\n    },\n    slideChange: function slideChange() {\n      var swiper = this;\n      if (swiper.hashNavigation.initialized && swiper.params.cssMode) {\n        swiper.hashNavigation.setHash();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/a11y/a11y.js\n\n\nvar a11y = {\n  makeElFocusable: function makeElFocusable($el) {\n    $el.attr('tabIndex', '0');\n    return $el;\n  },\n  makeElNotFocusable: function makeElNotFocusable($el) {\n    $el.attr('tabIndex', '-1');\n    return $el;\n  },\n  addElRole: function addElRole($el, role) {\n    $el.attr('role', role);\n    return $el;\n  },\n  addElLabel: function addElLabel($el, label) {\n    $el.attr('aria-label', label);\n    return $el;\n  },\n  disableEl: function disableEl($el) {\n    $el.attr('aria-disabled', true);\n    return $el;\n  },\n  enableEl: function enableEl($el) {\n    $el.attr('aria-disabled', false);\n    return $el;\n  },\n  onEnterKey: function onEnterKey(e) {\n    var swiper = this;\n    var params = swiper.params.a11y;\n    if (e.keyCode !== 13) return;\n    var $targetEl = dom(e.target);\n    if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n      if (!(swiper.isEnd && !swiper.params.loop)) {\n        swiper.slideNext();\n      }\n      if (swiper.isEnd) {\n        swiper.a11y.notify(params.lastSlideMessage);\n      } else {\n        swiper.a11y.notify(params.nextSlideMessage);\n      }\n    }\n    if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n      if (!(swiper.isBeginning && !swiper.params.loop)) {\n        swiper.slidePrev();\n      }\n      if (swiper.isBeginning) {\n        swiper.a11y.notify(params.firstSlideMessage);\n      } else {\n        swiper.a11y.notify(params.prevSlideMessage);\n      }\n    }\n    if (swiper.pagination && $targetEl.is(\".\".concat(swiper.params.pagination.bulletClass))) {\n      $targetEl[0].click();\n    }\n  },\n  notify: function notify(message) {\n    var swiper = this;\n    var notification = swiper.a11y.liveRegion;\n    if (notification.length === 0) return;\n    notification.html('');\n    notification.html(message);\n  },\n  updateNavigation: function updateNavigation() {\n    var swiper = this;\n    if (swiper.params.loop || !swiper.navigation) return;\n    var _swiper$navigation = swiper.navigation,\n      $nextEl = _swiper$navigation.$nextEl,\n      $prevEl = _swiper$navigation.$prevEl;\n    if ($prevEl && $prevEl.length > 0) {\n      if (swiper.isBeginning) {\n        swiper.a11y.disableEl($prevEl);\n        swiper.a11y.makeElNotFocusable($prevEl);\n      } else {\n        swiper.a11y.enableEl($prevEl);\n        swiper.a11y.makeElFocusable($prevEl);\n      }\n    }\n    if ($nextEl && $nextEl.length > 0) {\n      if (swiper.isEnd) {\n        swiper.a11y.disableEl($nextEl);\n        swiper.a11y.makeElNotFocusable($nextEl);\n      } else {\n        swiper.a11y.enableEl($nextEl);\n        swiper.a11y.makeElFocusable($nextEl);\n      }\n    }\n  },\n  updatePagination: function updatePagination() {\n    var swiper = this;\n    var params = swiper.params.a11y;\n    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {\n      swiper.pagination.bullets.each(function (bulletIndex, bulletEl) {\n        var $bulletEl = dom(bulletEl);\n        swiper.a11y.makeElFocusable($bulletEl);\n        swiper.a11y.addElRole($bulletEl, 'button');\n        swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1));\n      });\n    }\n  },\n  init: function init() {\n    var swiper = this;\n    swiper.$el.append(swiper.a11y.liveRegion);\n\n    // Navigation\n    var params = swiper.params.a11y;\n    var $nextEl;\n    var $prevEl;\n    if (swiper.navigation && swiper.navigation.$nextEl) {\n      $nextEl = swiper.navigation.$nextEl;\n    }\n    if (swiper.navigation && swiper.navigation.$prevEl) {\n      $prevEl = swiper.navigation.$prevEl;\n    }\n    if ($nextEl) {\n      swiper.a11y.makeElFocusable($nextEl);\n      swiper.a11y.addElRole($nextEl, 'button');\n      swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);\n      $nextEl.on('keydown', swiper.a11y.onEnterKey);\n    }\n    if ($prevEl) {\n      swiper.a11y.makeElFocusable($prevEl);\n      swiper.a11y.addElRole($prevEl, 'button');\n      swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);\n      $prevEl.on('keydown', swiper.a11y.onEnterKey);\n    }\n\n    // Pagination\n    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {\n      swiper.pagination.$el.on('keydown', \".\".concat(swiper.params.pagination.bulletClass), swiper.a11y.onEnterKey);\n    }\n  },\n  destroy: function destroy() {\n    var swiper = this;\n    if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();\n    var $nextEl;\n    var $prevEl;\n    if (swiper.navigation && swiper.navigation.$nextEl) {\n      $nextEl = swiper.navigation.$nextEl;\n    }\n    if (swiper.navigation && swiper.navigation.$prevEl) {\n      $prevEl = swiper.navigation.$prevEl;\n    }\n    if ($nextEl) {\n      $nextEl.off('keydown', swiper.a11y.onEnterKey);\n    }\n    if ($prevEl) {\n      $prevEl.off('keydown', swiper.a11y.onEnterKey);\n    }\n\n    // Pagination\n    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {\n      swiper.pagination.$el.off('keydown', \".\".concat(swiper.params.pagination.bulletClass), swiper.a11y.onEnterKey);\n    }\n  }\n};\n/* harmony default export */ var a11y_a11y = ({\n  name: 'a11y',\n  params: {\n    a11y: {\n      enabled: true,\n      notificationClass: 'swiper-notification',\n      prevSlideMessage: 'Previous slide',\n      nextSlideMessage: 'Next slide',\n      firstSlideMessage: 'This is the first slide',\n      lastSlideMessage: 'This is the last slide',\n      paginationBulletMessage: 'Go to slide {{index}}'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      a11y: {\n        liveRegion: dom(\"<span class=\\\"\".concat(swiper.params.a11y.notificationClass, \"\\\" aria-live=\\\"assertive\\\" aria-atomic=\\\"true\\\"></span>\"))\n      }\n    });\n    Object.keys(a11y).forEach(function (methodName) {\n      swiper.a11y[methodName] = a11y[methodName].bind(swiper);\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (!swiper.params.a11y.enabled) return;\n      swiper.a11y.init();\n      swiper.a11y.updateNavigation();\n    },\n    toEdge: function toEdge() {\n      var swiper = this;\n      if (!swiper.params.a11y.enabled) return;\n      swiper.a11y.updateNavigation();\n    },\n    fromEdge: function fromEdge() {\n      var swiper = this;\n      if (!swiper.params.a11y.enabled) return;\n      swiper.a11y.updateNavigation();\n    },\n    paginationUpdate: function paginationUpdate() {\n      var swiper = this;\n      if (!swiper.params.a11y.enabled) return;\n      swiper.a11y.updatePagination();\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (!swiper.params.a11y.enabled) return;\n      swiper.a11y.destroy();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/autoplay/autoplay.js\n/* eslint no-underscore-dangle: \"off\" */\n\nvar Autoplay = {\n  run: function run() {\n    var swiper = this;\n    var $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n    var delay = swiper.params.autoplay.delay;\n    if ($activeSlideEl.attr('data-swiper-autoplay')) {\n      delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n    }\n    clearTimeout(swiper.autoplay.timeout);\n    swiper.autoplay.timeout = swiper_src_utils_utils.nextTick(function () {\n      if (swiper.params.autoplay.reverseDirection) {\n        if (swiper.params.loop) {\n          swiper.loopFix();\n          swiper.slidePrev(swiper.params.speed, true, true);\n          swiper.emit('autoplay');\n        } else if (!swiper.isBeginning) {\n          swiper.slidePrev(swiper.params.speed, true, true);\n          swiper.emit('autoplay');\n        } else if (!swiper.params.autoplay.stopOnLastSlide) {\n          swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n          swiper.emit('autoplay');\n        } else {\n          swiper.autoplay.stop();\n        }\n      } else if (swiper.params.loop) {\n        swiper.loopFix();\n        swiper.slideNext(swiper.params.speed, true, true);\n        swiper.emit('autoplay');\n      } else if (!swiper.isEnd) {\n        swiper.slideNext(swiper.params.speed, true, true);\n        swiper.emit('autoplay');\n      } else if (!swiper.params.autoplay.stopOnLastSlide) {\n        swiper.slideTo(0, swiper.params.speed, true, true);\n        swiper.emit('autoplay');\n      } else {\n        swiper.autoplay.stop();\n      }\n      if (swiper.params.cssMode && swiper.autoplay.running) swiper.autoplay.run();\n    }, delay);\n  },\n  start: function start() {\n    var swiper = this;\n    if (typeof swiper.autoplay.timeout !== 'undefined') return false;\n    if (swiper.autoplay.running) return false;\n    swiper.autoplay.running = true;\n    swiper.emit('autoplayStart');\n    swiper.autoplay.run();\n    return true;\n  },\n  stop: function stop() {\n    var swiper = this;\n    if (!swiper.autoplay.running) return false;\n    if (typeof swiper.autoplay.timeout === 'undefined') return false;\n    if (swiper.autoplay.timeout) {\n      clearTimeout(swiper.autoplay.timeout);\n      swiper.autoplay.timeout = undefined;\n    }\n    swiper.autoplay.running = false;\n    swiper.emit('autoplayStop');\n    return true;\n  },\n  pause: function pause(speed) {\n    var swiper = this;\n    if (!swiper.autoplay.running) return;\n    if (swiper.autoplay.paused) return;\n    if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);\n    swiper.autoplay.paused = true;\n    if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n      swiper.autoplay.paused = false;\n      swiper.autoplay.run();\n    } else {\n      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);\n      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);\n    }\n  }\n};\n/* harmony default export */ var autoplay = ({\n  name: 'autoplay',\n  params: {\n    autoplay: {\n      enabled: false,\n      delay: 3000,\n      waitForTransition: true,\n      disableOnInteraction: true,\n      stopOnLastSlide: false,\n      reverseDirection: false\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      autoplay: {\n        running: false,\n        paused: false,\n        run: Autoplay.run.bind(swiper),\n        start: Autoplay.start.bind(swiper),\n        stop: Autoplay.stop.bind(swiper),\n        pause: Autoplay.pause.bind(swiper),\n        onVisibilityChange: function onVisibilityChange() {\n          if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n            swiper.autoplay.pause();\n          }\n          if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n            swiper.autoplay.run();\n            swiper.autoplay.paused = false;\n          }\n        },\n        onTransitionEnd: function onTransitionEnd(e) {\n          if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n          if (e.target !== this) return;\n          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);\n          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);\n          swiper.autoplay.paused = false;\n          if (!swiper.autoplay.running) {\n            swiper.autoplay.stop();\n          } else {\n            swiper.autoplay.run();\n          }\n        }\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var swiper = this;\n      if (swiper.params.autoplay.enabled) {\n        swiper.autoplay.start();\n        document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);\n      }\n    },\n    beforeTransitionStart: function beforeTransitionStart(speed, internal) {\n      var swiper = this;\n      if (swiper.autoplay.running) {\n        if (internal || !swiper.params.autoplay.disableOnInteraction) {\n          swiper.autoplay.pause(speed);\n        } else {\n          swiper.autoplay.stop();\n        }\n      }\n    },\n    sliderFirstMove: function sliderFirstMove() {\n      var swiper = this;\n      if (swiper.autoplay.running) {\n        if (swiper.params.autoplay.disableOnInteraction) {\n          swiper.autoplay.stop();\n        } else {\n          swiper.autoplay.pause();\n        }\n      }\n    },\n    touchEnd: function touchEnd() {\n      var swiper = this;\n      if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n        swiper.autoplay.run();\n      }\n    },\n    destroy: function destroy() {\n      var swiper = this;\n      if (swiper.autoplay.running) {\n        swiper.autoplay.stop();\n      }\n      document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/effect-fade/effect-fade.js\n\nvar Fade = {\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    var slides = swiper.slides;\n    for (var i = 0; i < slides.length; i += 1) {\n      var $slideEl = swiper.slides.eq(i);\n      var offset = $slideEl[0].swiperSlideOffset;\n      var tx = -offset;\n      if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n      var ty = 0;\n      if (!swiper.isHorizontal()) {\n        ty = tx;\n        tx = 0;\n      }\n      var slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n      $slideEl.css({\n        opacity: slideOpacity\n      }).transform(\"translate3d(\".concat(tx, \"px, \").concat(ty, \"px, 0px)\"));\n    }\n  },\n  setTransition: function setTransition(duration) {\n    var swiper = this;\n    var slides = swiper.slides,\n      $wrapperEl = swiper.$wrapperEl;\n    slides.transition(duration);\n    if (swiper.params.virtualTranslate && duration !== 0) {\n      var eventTriggered = false;\n      slides.transitionEnd(function () {\n        if (eventTriggered) return;\n        if (!swiper || swiper.destroyed) return;\n        eventTriggered = true;\n        swiper.animating = false;\n        var triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n        for (var i = 0; i < triggerEvents.length; i += 1) {\n          $wrapperEl.trigger(triggerEvents[i]);\n        }\n      });\n    }\n  }\n};\n/* harmony default export */ var effect_fade = ({\n  name: 'effect-fade',\n  params: {\n    fadeEffect: {\n      crossFade: false\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      fadeEffect: {\n        setTranslate: Fade.setTranslate.bind(swiper),\n        setTransition: Fade.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (swiper.params.effect !== 'fade') return;\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"fade\"));\n      var overwriteParams = {\n        slidesPerView: 1,\n        slidesPerColumn: 1,\n        slidesPerGroup: 1,\n        watchSlidesProgress: true,\n        spaceBetween: 0,\n        virtualTranslate: true\n      };\n      swiper_src_utils_utils.extend(swiper.params, overwriteParams);\n      swiper_src_utils_utils.extend(swiper.originalParams, overwriteParams);\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (swiper.params.effect !== 'fade') return;\n      swiper.fadeEffect.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      if (swiper.params.effect !== 'fade') return;\n      swiper.fadeEffect.setTransition(duration);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/effect-cube/effect-cube.js\n\n\n\nvar Cube = {\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    var $el = swiper.$el,\n      $wrapperEl = swiper.$wrapperEl,\n      slides = swiper.slides,\n      swiperWidth = swiper.width,\n      swiperHeight = swiper.height,\n      rtl = swiper.rtlTranslate,\n      swiperSize = swiper.size;\n    var params = swiper.params.cubeEffect;\n    var isHorizontal = swiper.isHorizontal();\n    var isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n    var wrapperRotate = 0;\n    var $cubeShadowEl;\n    if (params.shadow) {\n      if (isHorizontal) {\n        $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n        if ($cubeShadowEl.length === 0) {\n          $cubeShadowEl = dom('<div class=\"swiper-cube-shadow\"></div>');\n          $wrapperEl.append($cubeShadowEl);\n        }\n        $cubeShadowEl.css({\n          height: \"\".concat(swiperWidth, \"px\")\n        });\n      } else {\n        $cubeShadowEl = $el.find('.swiper-cube-shadow');\n        if ($cubeShadowEl.length === 0) {\n          $cubeShadowEl = dom('<div class=\"swiper-cube-shadow\"></div>');\n          $el.append($cubeShadowEl);\n        }\n      }\n    }\n    for (var i = 0; i < slides.length; i += 1) {\n      var $slideEl = slides.eq(i);\n      var slideIndex = i;\n      if (isVirtual) {\n        slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n      }\n      var slideAngle = slideIndex * 90;\n      var round = Math.floor(slideAngle / 360);\n      if (rtl) {\n        slideAngle = -slideAngle;\n        round = Math.floor(-slideAngle / 360);\n      }\n      var progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n      var tx = 0;\n      var ty = 0;\n      var tz = 0;\n      if (slideIndex % 4 === 0) {\n        tx = -round * 4 * swiperSize;\n        tz = 0;\n      } else if ((slideIndex - 1) % 4 === 0) {\n        tx = 0;\n        tz = -round * 4 * swiperSize;\n      } else if ((slideIndex - 2) % 4 === 0) {\n        tx = swiperSize + round * 4 * swiperSize;\n        tz = swiperSize;\n      } else if ((slideIndex - 3) % 4 === 0) {\n        tx = -swiperSize;\n        tz = 3 * swiperSize + swiperSize * 4 * round;\n      }\n      if (rtl) {\n        tx = -tx;\n      }\n      if (!isHorizontal) {\n        ty = tx;\n        tx = 0;\n      }\n      var transform = \"rotateX(\".concat(isHorizontal ? 0 : -slideAngle, \"deg) rotateY(\").concat(isHorizontal ? slideAngle : 0, \"deg) translate3d(\").concat(tx, \"px, \").concat(ty, \"px, \").concat(tz, \"px)\");\n      if (progress <= 1 && progress > -1) {\n        wrapperRotate = slideIndex * 90 + progress * 90;\n        if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n      }\n      $slideEl.transform(transform);\n      if (params.slideShadows) {\n        // Set shadows\n        var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n        var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n        if (shadowBefore.length === 0) {\n          shadowBefore = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(isHorizontal ? 'left' : 'top', \"\\\"></div>\"));\n          $slideEl.append(shadowBefore);\n        }\n        if (shadowAfter.length === 0) {\n          shadowAfter = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(isHorizontal ? 'right' : 'bottom', \"\\\"></div>\"));\n          $slideEl.append(shadowAfter);\n        }\n        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n      }\n    }\n    $wrapperEl.css({\n      '-webkit-transform-origin': \"50% 50% -\".concat(swiperSize / 2, \"px\"),\n      '-moz-transform-origin': \"50% 50% -\".concat(swiperSize / 2, \"px\"),\n      '-ms-transform-origin': \"50% 50% -\".concat(swiperSize / 2, \"px\"),\n      'transform-origin': \"50% 50% -\".concat(swiperSize / 2, \"px\")\n    });\n    if (params.shadow) {\n      if (isHorizontal) {\n        $cubeShadowEl.transform(\"translate3d(0px, \".concat(swiperWidth / 2 + params.shadowOffset, \"px, \").concat(-swiperWidth / 2, \"px) rotateX(90deg) rotateZ(0deg) scale(\").concat(params.shadowScale, \")\"));\n      } else {\n        var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n        var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n        var scale1 = params.shadowScale;\n        var scale2 = params.shadowScale / multiplier;\n        var offset = params.shadowOffset;\n        $cubeShadowEl.transform(\"scale3d(\".concat(scale1, \", 1, \").concat(scale2, \") translate3d(0px, \").concat(swiperHeight / 2 + offset, \"px, \").concat(-swiperHeight / 2 / scale2, \"px) rotateX(-90deg)\"));\n      }\n    }\n    var zFactor = browser.isSafari || browser.isUiWebView ? -swiperSize / 2 : 0;\n    $wrapperEl.transform(\"translate3d(0px,0,\".concat(zFactor, \"px) rotateX(\").concat(swiper.isHorizontal() ? 0 : wrapperRotate, \"deg) rotateY(\").concat(swiper.isHorizontal() ? -wrapperRotate : 0, \"deg)\"));\n  },\n  setTransition: function setTransition(duration) {\n    var swiper = this;\n    var $el = swiper.$el,\n      slides = swiper.slides;\n    slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n    if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n      $el.find('.swiper-cube-shadow').transition(duration);\n    }\n  }\n};\n/* harmony default export */ var effect_cube = ({\n  name: 'effect-cube',\n  params: {\n    cubeEffect: {\n      slideShadows: true,\n      shadow: true,\n      shadowOffset: 20,\n      shadowScale: 0.94\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      cubeEffect: {\n        setTranslate: Cube.setTranslate.bind(swiper),\n        setTransition: Cube.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (swiper.params.effect !== 'cube') return;\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"cube\"));\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"3d\"));\n      var overwriteParams = {\n        slidesPerView: 1,\n        slidesPerColumn: 1,\n        slidesPerGroup: 1,\n        watchSlidesProgress: true,\n        resistanceRatio: 0,\n        spaceBetween: 0,\n        centeredSlides: false,\n        virtualTranslate: true\n      };\n      swiper_src_utils_utils.extend(swiper.params, overwriteParams);\n      swiper_src_utils_utils.extend(swiper.originalParams, overwriteParams);\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (swiper.params.effect !== 'cube') return;\n      swiper.cubeEffect.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      if (swiper.params.effect !== 'cube') return;\n      swiper.cubeEffect.setTransition(duration);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/effect-flip/effect-flip.js\n\n\nvar Flip = {\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    var slides = swiper.slides,\n      rtl = swiper.rtlTranslate;\n    for (var i = 0; i < slides.length; i += 1) {\n      var $slideEl = slides.eq(i);\n      var progress = $slideEl[0].progress;\n      if (swiper.params.flipEffect.limitRotation) {\n        progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n      }\n      var offset = $slideEl[0].swiperSlideOffset;\n      var rotate = -180 * progress;\n      var rotateY = rotate;\n      var rotateX = 0;\n      var tx = -offset;\n      var ty = 0;\n      if (!swiper.isHorizontal()) {\n        ty = tx;\n        tx = 0;\n        rotateX = -rotateY;\n        rotateY = 0;\n      } else if (rtl) {\n        rotateY = -rotateY;\n      }\n      $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n      if (swiper.params.flipEffect.slideShadows) {\n        // Set shadows\n        var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n        var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n        if (shadowBefore.length === 0) {\n          shadowBefore = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(swiper.isHorizontal() ? 'left' : 'top', \"\\\"></div>\"));\n          $slideEl.append(shadowBefore);\n        }\n        if (shadowAfter.length === 0) {\n          shadowAfter = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(swiper.isHorizontal() ? 'right' : 'bottom', \"\\\"></div>\"));\n          $slideEl.append(shadowAfter);\n        }\n        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n      }\n      $slideEl.transform(\"translate3d(\".concat(tx, \"px, \").concat(ty, \"px, 0px) rotateX(\").concat(rotateX, \"deg) rotateY(\").concat(rotateY, \"deg)\"));\n    }\n  },\n  setTransition: function setTransition(duration) {\n    var swiper = this;\n    var slides = swiper.slides,\n      activeIndex = swiper.activeIndex,\n      $wrapperEl = swiper.$wrapperEl;\n    slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n    if (swiper.params.virtualTranslate && duration !== 0) {\n      var eventTriggered = false;\n      // eslint-disable-next-line\n      slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {\n        if (eventTriggered) return;\n        if (!swiper || swiper.destroyed) return;\n        // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;\n        eventTriggered = true;\n        swiper.animating = false;\n        var triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n        for (var i = 0; i < triggerEvents.length; i += 1) {\n          $wrapperEl.trigger(triggerEvents[i]);\n        }\n      });\n    }\n  }\n};\n/* harmony default export */ var effect_flip = ({\n  name: 'effect-flip',\n  params: {\n    flipEffect: {\n      slideShadows: true,\n      limitRotation: true\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      flipEffect: {\n        setTranslate: Flip.setTranslate.bind(swiper),\n        setTransition: Flip.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (swiper.params.effect !== 'flip') return;\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"flip\"));\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"3d\"));\n      var overwriteParams = {\n        slidesPerView: 1,\n        slidesPerColumn: 1,\n        slidesPerGroup: 1,\n        watchSlidesProgress: true,\n        spaceBetween: 0,\n        virtualTranslate: true\n      };\n      swiper_src_utils_utils.extend(swiper.params, overwriteParams);\n      swiper_src_utils_utils.extend(swiper.originalParams, overwriteParams);\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (swiper.params.effect !== 'flip') return;\n      swiper.flipEffect.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      if (swiper.params.effect !== 'flip') return;\n      swiper.flipEffect.setTransition(duration);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/effect-coverflow/effect-coverflow.js\n\n\n\nvar Coverflow = {\n  setTranslate: function setTranslate() {\n    var swiper = this;\n    var swiperWidth = swiper.width,\n      swiperHeight = swiper.height,\n      slides = swiper.slides,\n      $wrapperEl = swiper.$wrapperEl,\n      slidesSizesGrid = swiper.slidesSizesGrid;\n    var params = swiper.params.coverflowEffect;\n    var isHorizontal = swiper.isHorizontal();\n    var transform = swiper.translate;\n    var center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n    var rotate = isHorizontal ? params.rotate : -params.rotate;\n    var translate = params.depth;\n    // Each slide offset from center\n    for (var i = 0, length = slides.length; i < length; i += 1) {\n      var $slideEl = slides.eq(i);\n      var slideSize = slidesSizesGrid[i];\n      var slideOffset = $slideEl[0].swiperSlideOffset;\n      var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier;\n      var rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n      var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;\n      // var rotateZ = 0\n      var translateZ = -translate * Math.abs(offsetMultiplier);\n      var stretch = params.stretch;\n      // Allow percentage to make a relative stretch for responsive sliders\n      if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n        stretch = parseFloat(params.stretch) / 100 * slideSize;\n      }\n      var translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n      var translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n\n      // Fix for ultra small values\n      if (Math.abs(translateX) < 0.001) translateX = 0;\n      if (Math.abs(translateY) < 0.001) translateY = 0;\n      if (Math.abs(translateZ) < 0.001) translateZ = 0;\n      if (Math.abs(rotateY) < 0.001) rotateY = 0;\n      if (Math.abs(rotateX) < 0.001) rotateX = 0;\n      var slideTransform = \"translate3d(\".concat(translateX, \"px,\").concat(translateY, \"px,\").concat(translateZ, \"px)  rotateX(\").concat(rotateX, \"deg) rotateY(\").concat(rotateY, \"deg)\");\n      $slideEl.transform(slideTransform);\n      $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n      if (params.slideShadows) {\n        // Set shadows\n        var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n        var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n        if ($shadowBeforeEl.length === 0) {\n          $shadowBeforeEl = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(isHorizontal ? 'left' : 'top', \"\\\"></div>\"));\n          $slideEl.append($shadowBeforeEl);\n        }\n        if ($shadowAfterEl.length === 0) {\n          $shadowAfterEl = dom(\"<div class=\\\"swiper-slide-shadow-\".concat(isHorizontal ? 'right' : 'bottom', \"\\\"></div>\"));\n          $slideEl.append($shadowAfterEl);\n        }\n        if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n        if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n      }\n    }\n\n    // Set correct perspective for IE10\n    if (swiper_src_utils_support.pointerEvents || swiper_src_utils_support.prefixedPointerEvents) {\n      var ws = $wrapperEl[0].style;\n      ws.perspectiveOrigin = \"\".concat(center, \"px 50%\");\n    }\n  },\n  setTransition: function setTransition(duration) {\n    var swiper = this;\n    swiper.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n  }\n};\n/* harmony default export */ var effect_coverflow = ({\n  name: 'effect-coverflow',\n  params: {\n    coverflowEffect: {\n      rotate: 50,\n      stretch: 0,\n      depth: 100,\n      modifier: 1,\n      slideShadows: true\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      coverflowEffect: {\n        setTranslate: Coverflow.setTranslate.bind(swiper),\n        setTransition: Coverflow.setTransition.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      if (swiper.params.effect !== 'coverflow') return;\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"coverflow\"));\n      swiper.classNames.push(\"\".concat(swiper.params.containerModifierClass, \"3d\"));\n      swiper.params.watchSlidesProgress = true;\n      swiper.originalParams.watchSlidesProgress = true;\n    },\n    setTranslate: function setTranslate() {\n      var swiper = this;\n      if (swiper.params.effect !== 'coverflow') return;\n      swiper.coverflowEffect.setTranslate();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      if (swiper.params.effect !== 'coverflow') return;\n      swiper.coverflowEffect.setTransition(duration);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-src/components/thumbs/thumbs.js\n\n\nvar Thumbs = {\n  init: function init() {\n    var swiper = this;\n    var thumbsParams = swiper.params.thumbs;\n    var SwiperClass = swiper.constructor;\n    if (thumbsParams.swiper instanceof SwiperClass) {\n      swiper.thumbs.swiper = thumbsParams.swiper;\n      swiper_src_utils_utils.extend(swiper.thumbs.swiper.originalParams, {\n        watchSlidesProgress: true,\n        slideToClickedSlide: false\n      });\n      swiper_src_utils_utils.extend(swiper.thumbs.swiper.params, {\n        watchSlidesProgress: true,\n        slideToClickedSlide: false\n      });\n    } else if (swiper_src_utils_utils.isObject(thumbsParams.swiper)) {\n      swiper.thumbs.swiper = new SwiperClass(swiper_src_utils_utils.extend({}, thumbsParams.swiper, {\n        watchSlidesVisibility: true,\n        watchSlidesProgress: true,\n        slideToClickedSlide: false\n      }));\n      swiper.thumbs.swiperCreated = true;\n    }\n    swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n    swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);\n  },\n  onThumbClick: function onThumbClick() {\n    var swiper = this;\n    var thumbsSwiper = swiper.thumbs.swiper;\n    if (!thumbsSwiper) return;\n    var clickedIndex = thumbsSwiper.clickedIndex;\n    var clickedSlide = thumbsSwiper.clickedSlide;\n    if (clickedSlide && dom(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;\n    if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n    var slideToIndex;\n    if (thumbsSwiper.params.loop) {\n      slideToIndex = parseInt(dom(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n    } else {\n      slideToIndex = clickedIndex;\n    }\n    if (swiper.params.loop) {\n      var currentIndex = swiper.activeIndex;\n      if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n        swiper.loopFix();\n        // eslint-disable-next-line\n        swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n        currentIndex = swiper.activeIndex;\n      }\n      var prevIndex = swiper.slides.eq(currentIndex).prevAll(\"[data-swiper-slide-index=\\\"\".concat(slideToIndex, \"\\\"]\")).eq(0).index();\n      var nextIndex = swiper.slides.eq(currentIndex).nextAll(\"[data-swiper-slide-index=\\\"\".concat(slideToIndex, \"\\\"]\")).eq(0).index();\n      if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;\n    }\n    swiper.slideTo(slideToIndex);\n  },\n  update: function update(initial) {\n    var swiper = this;\n    var thumbsSwiper = swiper.thumbs.swiper;\n    if (!thumbsSwiper) return;\n    var slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n    var autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n    var useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n    if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n      var currentThumbsIndex = thumbsSwiper.activeIndex;\n      var newThumbsIndex;\n      var direction;\n      if (thumbsSwiper.params.loop) {\n        if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {\n          thumbsSwiper.loopFix();\n          // eslint-disable-next-line\n          thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n          currentThumbsIndex = thumbsSwiper.activeIndex;\n        }\n        // Find actual thumbs index to slide to\n        var prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(\"[data-swiper-slide-index=\\\"\".concat(swiper.realIndex, \"\\\"]\")).eq(0).index();\n        var nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(\"[data-swiper-slide-index=\\\"\".concat(swiper.realIndex, \"\\\"]\")).eq(0).index();\n        if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;else newThumbsIndex = prevThumbsIndex;\n        direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n      } else {\n        newThumbsIndex = swiper.realIndex;\n        direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n      }\n      if (useOffset) {\n        newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n      }\n      if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n        if (thumbsSwiper.params.centeredSlides) {\n          if (newThumbsIndex > currentThumbsIndex) {\n            newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n          } else {\n            newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n          }\n        } else if (newThumbsIndex > currentThumbsIndex) {\n          newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n        }\n        thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n      }\n    }\n\n    // Activate thumbs\n    var thumbsToActivate = 1;\n    var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n    if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n      thumbsToActivate = swiper.params.slidesPerView;\n    }\n    if (!swiper.params.thumbs.multipleActiveThumbs) {\n      thumbsToActivate = 1;\n    }\n    thumbsToActivate = Math.floor(thumbsToActivate);\n    thumbsSwiper.slides.removeClass(thumbActiveClass);\n    if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n      for (var i = 0; i < thumbsToActivate; i += 1) {\n        thumbsSwiper.$wrapperEl.children(\"[data-swiper-slide-index=\\\"\".concat(swiper.realIndex + i, \"\\\"]\")).addClass(thumbActiveClass);\n      }\n    } else {\n      for (var _i = 0; _i < thumbsToActivate; _i += 1) {\n        thumbsSwiper.slides.eq(swiper.realIndex + _i).addClass(thumbActiveClass);\n      }\n    }\n  }\n};\n/* harmony default export */ var thumbs = ({\n  name: 'thumbs',\n  params: {\n    thumbs: {\n      swiper: null,\n      multipleActiveThumbs: true,\n      autoScrollOffset: 0,\n      slideThumbActiveClass: 'swiper-slide-thumb-active',\n      thumbsContainerClass: 'swiper-container-thumbs'\n    }\n  },\n  create: function create() {\n    var swiper = this;\n    swiper_src_utils_utils.extend(swiper, {\n      thumbs: {\n        swiper: null,\n        init: Thumbs.init.bind(swiper),\n        update: Thumbs.update.bind(swiper),\n        onThumbClick: Thumbs.onThumbClick.bind(swiper)\n      }\n    });\n  },\n  on: {\n    beforeInit: function beforeInit() {\n      var swiper = this;\n      var thumbs = swiper.params.thumbs;\n      if (!thumbs || !thumbs.swiper) return;\n      swiper.thumbs.init();\n      swiper.thumbs.update(true);\n    },\n    slideChange: function slideChange() {\n      var swiper = this;\n      if (!swiper.thumbs.swiper) return;\n      swiper.thumbs.update();\n    },\n    update: function update() {\n      var swiper = this;\n      if (!swiper.thumbs.swiper) return;\n      swiper.thumbs.update();\n    },\n    resize: function resize() {\n      var swiper = this;\n      if (!swiper.thumbs.swiper) return;\n      swiper.thumbs.update();\n    },\n    observerUpdate: function observerUpdate() {\n      var swiper = this;\n      if (!swiper.thumbs.swiper) return;\n      swiper.thumbs.update();\n    },\n    setTransition: function setTransition(duration) {\n      var swiper = this;\n      var thumbsSwiper = swiper.thumbs.swiper;\n      if (!thumbsSwiper) return;\n      thumbsSwiper.setTransition(duration);\n    },\n    beforeDestroy: function beforeDestroy() {\n      var swiper = this;\n      var thumbsSwiper = swiper.thumbs.swiper;\n      if (!thumbsSwiper) return;\n      if (swiper.thumbs.swiperCreated && thumbsSwiper) {\n        thumbsSwiper.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper-class.js\n// Swiper Class\n\n\n// Core Modules\n\n\n\n\n\n\n// Components\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ncore_class.use([modules_device_device, browser_browser, modules_support_support, modules_resize_resize, observer_observer, virtual, keyboard, mousewheel, navigation, pagination, scrollbar_scrollbar, parallax, zoom_zoom, lazy_lazy, controller, components_history_history, hash_navigation, a11y_a11y, autoplay, effect_fade, effect_cube, effect_flip, effect_coverflow, thumbs]);\n/* harmony default export */ var swiper_class = (core_class);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/swiper/swiper.js\n\n\n\nif (false) {}\nfunction initSwiper(swiperEl) {\n  var app = this;\n  var $swiperEl = Object(dom7_module[\"default\"])(swiperEl);\n  if ($swiperEl.length === 0) return;\n  if ($swiperEl[0].swiper) return;\n  var initialSlide;\n  var params = {};\n  var isTabs;\n  var isRoutableTabs;\n  if ($swiperEl.hasClass('tabs-swipeable-wrap')) {\n    $swiperEl.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide');\n    initialSlide = $swiperEl.children('.tabs').children('.tab-active').index();\n    isTabs = true;\n    isRoutableTabs = $swiperEl.find('.tabs-routable').length > 0;\n  }\n  if ($swiperEl.attr('data-swiper')) {\n    params = JSON.parse($swiperEl.attr('data-swiper'));\n  } else if ($swiperEl[0].f7SwiperParams) {\n    params = $swiperEl[0].f7SwiperParams;\n  } else {\n    params = $swiperEl.dataset();\n    Object.keys(params).forEach(function (key) {\n      var value = params[key];\n      if (typeof value === 'string' && value.indexOf('{') === 0 && value.indexOf('}') > 0) {\n        try {\n          params[key] = JSON.parse(value);\n        } catch (e) {\n          // not JSON\n        }\n      }\n    });\n  }\n  if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') {\n    params.initialSlide = initialSlide;\n  }\n  var swiper = app.swiper.create($swiperEl[0], params);\n  function updateSwiper() {\n    swiper.update();\n  }\n  var $tabEl = $swiperEl.parents('.tab').filter(function (tabElIndex, tabEl) {\n    return Object(dom7_module[\"default\"])(tabEl).parent('.tabs').parent('.tabs-animated-wrap, .tabs-swipeable-wrap').length === 0;\n  }).eq(0);\n  $swiperEl.parents('.popup, .login-screen, .sheet-modal, .popover').on('modal:open', updateSwiper);\n  $swiperEl.parents('.panel').on('panel:open', updateSwiper);\n  if ($tabEl && $tabEl.length) {\n    $tabEl.on('tab:show', updateSwiper);\n  }\n  swiper.on('beforeDestroy', function () {\n    $swiperEl.parents('.popup, .login-screen, .sheet-modal, .popover').off('modal:open', updateSwiper);\n    $swiperEl.parents('.panel').off('panel:open', updateSwiper);\n    if ($tabEl && $tabEl.length) {\n      $tabEl.off('tab:show', updateSwiper);\n    }\n  });\n  if (isTabs) {\n    swiper.on('slideChange', function () {\n      if (isRoutableTabs) {\n        var view = app.views.get($swiperEl.parents('.view'));\n        if (!view) view = app.views.main;\n        var router = view.router;\n        var tabRoute = router.findTabRoute(swiper.slides.eq(swiper.activeIndex)[0]);\n        if (tabRoute) {\n          setTimeout(function () {\n            router.navigate(tabRoute.path);\n          }, 0);\n        }\n      } else {\n        app.tab.show({\n          tabEl: swiper.slides.eq(swiper.activeIndex)\n        });\n      }\n    });\n  }\n}\n/* harmony default export */ var swiper_swiper = ({\n  name: 'swiper',\n  static: {\n    Swiper: swiper_class\n  },\n  create: function create() {\n    var app = this;\n    app.swiper = constructor_methods({\n      defaultSelector: '.swiper-container',\n      constructor: swiper_class,\n      domProp: 'swiper'\n    });\n  },\n  on: {\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        app.swiper.destroy(swiperEl);\n      });\n    },\n    pageMounted: function pageMounted(page) {\n      var app = this;\n      page.$el.find('.tabs-swipeable-wrap').each(function (index, swiperEl) {\n        initSwiper.call(app, swiperEl);\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        initSwiper.call(app, swiperEl);\n      });\n    },\n    pageReinit: function pageReinit(page) {\n      var app = this;\n      page.$el.find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        var swiper = app.swiper.get(swiperEl);\n        if (swiper && swiper.update) swiper.update();\n      });\n    },\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        initSwiper.call(app, swiperEl);\n      });\n    },\n    tabShow: function tabShow(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        var swiper = app.swiper.get(swiperEl);\n        if (swiper && swiper.update) swiper.update();\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.swiper-init, .tabs-swipeable-wrap').each(function (index, swiperEl) {\n        app.swiper.destroy(swiperEl);\n      });\n    }\n  },\n  vnode: {\n    'swiper-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var swiperEl = vnode.elm;\n        initSwiper.call(app, swiperEl);\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var swiperEl = vnode.elm;\n        app.swiper.destroy(swiperEl);\n      }\n    },\n    'tabs-swipeable-wrap': {\n      insert: function insert(vnode) {\n        var app = this;\n        var swiperEl = vnode.elm;\n        initSwiper.call(app, swiperEl);\n      },\n      destroy: function destroy(vnode) {\n        var app = this;\n        var swiperEl = vnode.elm;\n        app.swiper.destroy(swiperEl);\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/photo-browser/photo-browser-class.js\n\n\n\n\n\nfunction photo_browser_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, photo_browser_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction photo_browser_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (photo_browser_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint indent: [\"off\"] */\n\n\n\nvar photo_browser_class_PhotoBrowser = /*#__PURE__*/function (_Framework7Class) {\n  function PhotoBrowser(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, PhotoBrowser);\n    _this = photo_browser_class_callSuper(this, PhotoBrowser, [params, [app]]);\n    var pb = _this;\n    pb.app = app;\n    var defaults = utils[\"default\"].extend({\n      on: {}\n    }, app.params.photoBrowser);\n\n    // Extend defaults with modules params\n    pb.useModulesParams(defaults);\n    pb.params = utils[\"default\"].extend(defaults, params);\n    utils[\"default\"].extend(pb, {\n      exposed: false,\n      opened: false,\n      activeIndex: pb.params.swiper.initialSlide,\n      url: pb.params.url,\n      swipeToClose: {\n        allow: true,\n        isTouched: false,\n        diff: undefined,\n        start: undefined,\n        current: undefined,\n        started: false,\n        activeSlide: undefined,\n        timeStart: undefined\n      }\n    });\n\n    // Install Modules\n    pb.useModules();\n\n    // Init\n    pb.init();\n    return _this;\n  }\n  inherits_default()(PhotoBrowser, _Framework7Class);\n  return createClass_default()(PhotoBrowser, [{\n    key: \"view\",\n    get: function get() {\n      var params = this.params,\n        app = this.app;\n      return params.view || app.views.main;\n    }\n  }, {\n    key: \"onSlideChange\",\n    value: function onSlideChange(swiper) {\n      var pb = this;\n      pb.activeIndex = swiper.activeIndex;\n      var current = swiper.activeIndex + 1;\n      var total = pb.params.virtualSlides ? pb.params.photos.length : swiper.slides.length;\n      if (swiper.params.loop) {\n        total -= 2;\n        current -= swiper.loopedSlides;\n        if (current < 1) current = total + current;\n        if (current > total) current -= total;\n      }\n      var $activeSlideEl = pb.params.virtualSlides ? swiper.$wrapperEl.find(\".swiper-slide[data-swiper-slide-index=\\\"\".concat(swiper.activeIndex, \"\\\"]\")) : swiper.slides.eq(swiper.activeIndex);\n      var $previousSlideEl = pb.params.virtualSlides ? swiper.$wrapperEl.find(\".swiper-slide[data-swiper-slide-index=\\\"\".concat(swiper.previousIndex, \"\\\"]\")) : swiper.slides.eq(swiper.previousIndex);\n      var $currentEl = pb.$el.find('.photo-browser-current');\n      var $totalEl = pb.$el.find('.photo-browser-total');\n      var navbarEl;\n      if (pb.params.type === 'page' && pb.params.navbar && $currentEl.length === 0 && pb.app.theme === 'ios') {\n        navbarEl = pb.app.navbar.getElByPage(pb.$el);\n        if (navbarEl) {\n          $currentEl = Object(dom7_module[\"default\"])(navbarEl).find('.photo-browser-current');\n          $totalEl = Object(dom7_module[\"default\"])(navbarEl).find('.photo-browser-total');\n        }\n      }\n      if ($currentEl.length && $totalEl.length) {\n        $currentEl.text(current);\n        $totalEl.text(total);\n        if (!navbarEl) navbarEl = $currentEl.parents('.navbar')[0];\n        if (navbarEl) {\n          pb.app.navbar.size(navbarEl);\n        }\n      }\n\n      // Update captions\n      if (pb.captions.length > 0) {\n        var captionIndex = swiper.params.loop ? $activeSlideEl.attr('data-swiper-slide-index') : pb.activeIndex;\n        pb.$captionsContainerEl.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active');\n        pb.$captionsContainerEl.find(\"[data-caption-index=\\\"\".concat(captionIndex, \"\\\"]\")).addClass('photo-browser-caption-active');\n      }\n\n      // Stop Video\n      var previousSlideVideo = $previousSlideEl.find('video');\n      if (previousSlideVideo.length > 0) {\n        if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause();\n      }\n    }\n  }, {\n    key: \"onTouchStart\",\n    value: function onTouchStart() {\n      var pb = this;\n      var swipeToClose = pb.swipeToClose;\n      if (!swipeToClose.allow) return;\n      swipeToClose.isTouched = true;\n    }\n  }, {\n    key: \"onTouchMove\",\n    value: function onTouchMove(e) {\n      var pb = this;\n      var swipeToClose = pb.swipeToClose;\n      if (!swipeToClose.isTouched) return;\n      if (!swipeToClose.started) {\n        swipeToClose.started = true;\n        swipeToClose.start = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n        if (pb.params.virtualSlides) {\n          swipeToClose.activeSlide = pb.swiper.$wrapperEl.children('.swiper-slide-active');\n        } else {\n          swipeToClose.activeSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);\n        }\n        swipeToClose.timeStart = utils[\"default\"].now();\n      }\n      e.preventDefault();\n      swipeToClose.current = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      swipeToClose.diff = swipeToClose.start - swipeToClose.current;\n      pb.$el.transition(0).transform(\"translate3d(0,\".concat(-swipeToClose.diff, \"px,0)\"));\n    }\n  }, {\n    key: \"onTouchEnd\",\n    value: function onTouchEnd() {\n      var pb = this;\n      var swipeToClose = pb.swipeToClose;\n      swipeToClose.isTouched = false;\n      if (!swipeToClose.started) {\n        swipeToClose.started = false;\n        return;\n      }\n      swipeToClose.started = false;\n      swipeToClose.allow = false;\n      var diff = Math.abs(swipeToClose.diff);\n      var timeDiff = new Date().getTime() - swipeToClose.timeStart;\n      if (timeDiff < 300 && diff > 20 || timeDiff >= 300 && diff > 100) {\n        utils[\"default\"].nextTick(function () {\n          if (pb.$el) {\n            if (swipeToClose.diff < 0) pb.$el.addClass('swipe-close-to-bottom');else pb.$el.addClass('swipe-close-to-top');\n          }\n          pb.emit('local::swipeToClose', pb);\n          pb.$el.transform('').transition('');\n          pb.close();\n          swipeToClose.allow = true;\n        });\n        return;\n      }\n      if (diff !== 0) {\n        pb.$el.addClass('photo-browser-transitioning').transitionEnd(function () {\n          swipeToClose.allow = true;\n          pb.$el.removeClass('photo-browser-transitioning');\n        });\n      } else {\n        swipeToClose.allow = true;\n      }\n      utils[\"default\"].nextTick(function () {\n        pb.$el.transform('').transition('');\n      });\n    }\n\n    // Render Functions\n  }, {\n    key: \"renderNavbar\",\n    value: function renderNavbar() {\n      var pb = this;\n      if (pb.params.renderNavbar) return pb.params.renderNavbar.call(pb);\n      var iconsColor = pb.params.iconsColor;\n      if (!pb.params.iconsColor && pb.params.theme === 'dark') iconsColor = 'white';\n      var pageBackLinkText = (pb.app.theme === 'ios' || pb.app.theme === 'aurora') && pb.params.pageBackLinkText ? pb.params.pageBackLinkText : '';\n      var renderNavbarCount = typeof pb.params.navbarShowCount === 'undefined' ? pb.params.photos.length > 1 : pb.params.navbarShowCount;\n      var isPopup = pb.params.type !== 'page';\n      var navbarHtml = \"\\n      <div class=\\\"navbar navbar-photo-browser \".concat(pb.params.theme === 'dark' ? 'navbar-photo-browser-dark' : '', \"\\\">\\n        <div class=\\\"navbar-bg\\\"></div>\\n        <div class=\\\"navbar-inner navbar-inner-centered-title sliding\\\">\\n          \").concat(!isPopup ? \"\\n          <div class=\\\"left\\\">\\n            <a class=\\\"link \".concat(!pageBackLinkText ? 'icon-only' : '', \" back\\\">\\n              <i class=\\\"icon icon-back \").concat(iconsColor ? \"color-\".concat(iconsColor) : '', \"\\\"></i>\\n              \").concat(pageBackLinkText ? \"<span>\".concat(pageBackLinkText, \"</span>\") : '', \"\\n            </a>\\n          </div>\\n          \") : '', \"\\n          \").concat(renderNavbarCount ? \"\\n          <div class=\\\"title\\\">\\n            <span class=\\\"photo-browser-current\\\"></span>\\n            <span class=\\\"photo-browser-of\\\">\".concat(pb.params.navbarOfText, \"</span>\\n            <span class=\\\"photo-browser-total\\\"></span>\\n          </div>\\n          \") : '', \"\\n          \").concat(isPopup ? \"\\n          <div class=\\\"right\\\">\\n            <a class=\\\"link popup-close\\\" data-popup=\\\".photo-browser-popup\\\">\\n              <span>\".concat(pb.params.popupCloseLinkText, \"</span>\\n            </a>\\n          </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \").trim();\n      return navbarHtml;\n    }\n  }, {\n    key: \"renderToolbar\",\n    value: function renderToolbar() {\n      var pb = this;\n      if (pb.params.renderToolbar) return pb.params.renderToolbar.call(pb);\n      var iconsColor = pb.params.iconsColor;\n      if (!pb.params.iconsColor && pb.params.theme === 'dark') iconsColor = 'white';\n      var toolbarHtml = \"\\n      <div class=\\\"toolbar toolbar-bottom tabbar\\\">\\n        <div class=\\\"toolbar-inner\\\">\\n          <a class=\\\"link photo-browser-prev\\\">\\n            <i class=\\\"icon icon-back \".concat(iconsColor ? \"color-\".concat(iconsColor) : '', \"\\\"></i>\\n          </a>\\n          <a class=\\\"link photo-browser-next\\\">\\n            <i class=\\\"icon icon-forward \").concat(iconsColor ? \"color-\".concat(iconsColor) : '', \"\\\"></i>\\n          </a>\\n        </div>\\n      </div>\\n    \").trim();\n      return toolbarHtml;\n    }\n  }, {\n    key: \"renderCaption\",\n    value: function renderCaption(caption, index) {\n      var pb = this;\n      if (pb.params.renderCaption) return pb.params.renderCaption.call(pb, caption, index);\n      var captionHtml = \"\\n      <div class=\\\"photo-browser-caption\\\" data-caption-index=\\\"\".concat(index, \"\\\">\\n        \").concat(caption, \"\\n      </div>\\n    \").trim();\n      return captionHtml;\n    }\n  }, {\n    key: \"renderObject\",\n    value: function renderObject(photo, index) {\n      var pb = this;\n      if (pb.params.renderObject) return pb.params.renderObject.call(pb, photo, index);\n      var objHtml = \"\\n      <div class=\\\"photo-browser-slide photo-browser-object-slide swiper-slide\\\" data-swiper-slide-index=\\\"\".concat(index, \"\\\">\").concat(photo.html ? photo.html : photo, \"</div>\\n    \");\n      return objHtml;\n    }\n  }, {\n    key: \"renderLazyPhoto\",\n    value: function renderLazyPhoto(photo, index) {\n      var pb = this;\n      if (pb.params.renderLazyPhoto) return pb.params.renderLazyPhoto.call(pb, photo, index);\n      var photoHtml = \"\\n      <div class=\\\"photo-browser-slide photo-browser-slide-lazy swiper-slide\\\" data-swiper-slide-index=\\\"\".concat(index, \"\\\">\\n          <div class=\\\"swiper-lazy-preloader\\\"></div>\\n          <span class=\\\"swiper-zoom-container\\\">\\n              <img data-src=\\\"\").concat(photo.url ? photo.url : photo, \"\\\" class=\\\"swiper-lazy\\\">\\n          </span>\\n      </div>\\n    \").trim();\n      return photoHtml;\n    }\n  }, {\n    key: \"renderPhoto\",\n    value: function renderPhoto(photo, index) {\n      var pb = this;\n      if (pb.params.renderPhoto) return pb.params.renderPhoto.call(pb, photo, index);\n      var photoHtml = \"\\n      <div class=\\\"photo-browser-slide swiper-slide\\\" data-swiper-slide-index=\\\"\".concat(index, \"\\\">\\n        <span class=\\\"swiper-zoom-container\\\">\\n          <img src=\\\"\").concat(photo.url ? photo.url : photo, \"\\\">\\n        </span>\\n      </div>\\n    \").trim();\n      return photoHtml;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var pb = this;\n      if (pb.params.render) return pb.params.render.call(pb, pb.params);\n      var html = \"\\n      <div class=\\\"photo-browser photo-browser-\".concat(pb.params.theme, \"\\\">\\n        <div class=\\\"view\\\">\\n          <div class=\\\"page photo-browser-page photo-browser-page-\").concat(pb.params.theme, \" no-toolbar \").concat(!pb.params.navbar ? 'no-navbar' : '', \"\\\" data-name=\\\"photo-browser-page\\\">\\n            \").concat(pb.params.navbar ? pb.renderNavbar() : '', \"\\n            \").concat(pb.params.toolbar ? pb.renderToolbar() : '', \"\\n            <div class=\\\"photo-browser-captions photo-browser-captions-\").concat(pb.params.captionsTheme || pb.params.theme, \"\\\">\\n              \").concat(pb.params.photos.map(function (photo, index) {\n        if (photo.caption) return pb.renderCaption(photo.caption, index);\n        return '';\n      }).join(' '), \"\\n            </div>\\n            <div class=\\\"photo-browser-swiper-container swiper-container\\\">\\n              <div class=\\\"photo-browser-swiper-wrapper swiper-wrapper\\\">\\n                \").concat(pb.params.virtualSlides ? '' : pb.params.photos.map(function (photo, index) {\n        if (photo.html || (typeof photo === 'string' || photo instanceof String) && photo.indexOf('<') >= 0 && photo.indexOf('>') >= 0) {\n          return pb.renderObject(photo, index);\n        }\n        if (pb.params.swiper.lazy === true || pb.params.swiper.lazy && pb.params.swiper.lazy.enabled) {\n          return pb.renderLazyPhoto(photo, index);\n        }\n        return pb.renderPhoto(photo, index);\n      }).join(' '), \"\\n              </div>\\n            </div>\\n          </div>\\n        </div>\\n      </div>\\n    \").trim();\n      return html;\n    }\n  }, {\n    key: \"renderStandalone\",\n    value: function renderStandalone() {\n      var pb = this;\n      if (pb.params.renderStandalone) return pb.params.renderStandalone.call(pb);\n      var standaloneHtml = \"<div class=\\\"popup photo-browser-popup photo-browser-standalone popup-tablet-fullscreen\\\">\".concat(pb.render(), \"</div>\");\n      return standaloneHtml;\n    }\n  }, {\n    key: \"renderPage\",\n    value: function renderPage() {\n      var pb = this;\n      if (pb.params.renderPage) return pb.params.renderPage.call(pb);\n      var pageHtml = pb.render();\n      return pageHtml;\n    }\n  }, {\n    key: \"renderPopup\",\n    value: function renderPopup() {\n      var pb = this;\n      if (pb.params.renderPopup) return pb.params.renderPopup.call(pb);\n      var popupHtml = \"<div class=\\\"popup photo-browser-popup\\\">\".concat(pb.render(), \"</div>\");\n      return popupHtml;\n    }\n\n    // Callbacks\n  }, {\n    key: \"onOpen\",\n    value: function onOpen(type, el) {\n      var pb = this;\n      var app = pb.app;\n      var $el = Object(dom7_module[\"default\"])(el);\n      $el[0].f7PhotoBrowser = pb;\n      pb.$el = $el;\n      pb.el = $el[0];\n      pb.openedIn = type;\n      pb.opened = true;\n      pb.$swiperContainerEl = pb.$el.find('.photo-browser-swiper-container');\n      pb.$swiperWrapperEl = pb.$el.find('.photo-browser-swiper-wrapper');\n      pb.slides = pb.$el.find('.photo-browser-slide');\n      pb.$captionsContainerEl = pb.$el.find('.photo-browser-captions');\n      pb.captions = pb.$el.find('.photo-browser-caption');\n\n      // Init Swiper\n      var clickTimeout;\n      var swiperParams = utils[\"default\"].extend({}, pb.params.swiper, {\n        initialSlide: pb.activeIndex,\n        on: {\n          click: function click(e) {\n            clearTimeout(clickTimeout);\n            if (pb.params.exposition) {\n              clickTimeout = setTimeout(function () {\n                pb.expositionToggle();\n              }, 350);\n            }\n            pb.emit('local::tap', e);\n            pb.emit('local::click', e);\n          },\n          doubleClick: function doubleClick(e) {\n            clearTimeout(clickTimeout);\n            pb.emit('local::doubleTap', e);\n            pb.emit('local::doubleClick', e);\n          },\n          slideChange: function slideChange() {\n            var swiper = this;\n            pb.onSlideChange(swiper);\n            for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n              args[_key] = arguments[_key];\n            }\n            pb.emit.apply(pb, ['local::slideChange'].concat(args));\n          },\n          transitionStart: function transitionStart() {\n            for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n              args[_key2] = arguments[_key2];\n            }\n            pb.emit.apply(pb, ['local::transitionStart'].concat(args));\n          },\n          transitionEnd: function transitionEnd() {\n            for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n              args[_key3] = arguments[_key3];\n            }\n            pb.emit.apply(pb, ['local::transitionEnd'].concat(args));\n          },\n          slideChangeTransitionStart: function slideChangeTransitionStart() {\n            var swiper = this;\n            pb.onSlideChange(swiper);\n            for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n              args[_key4] = arguments[_key4];\n            }\n            pb.emit.apply(pb, ['local::slideChangeTransitionStart'].concat(args));\n          },\n          slideChangeTransitionEnd: function slideChangeTransitionEnd() {\n            for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n              args[_key5] = arguments[_key5];\n            }\n            pb.emit.apply(pb, ['local::slideChangeTransitionEnd'].concat(args));\n          },\n          lazyImageLoad: function lazyImageLoad() {\n            for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n              args[_key6] = arguments[_key6];\n            }\n            pb.emit.apply(pb, ['local::lazyImageLoad'].concat(args));\n          },\n          lazyImageReady: function lazyImageReady() {\n            for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n              args[_key7] = arguments[_key7];\n            }\n            var slideEl = args[0];\n            Object(dom7_module[\"default\"])(slideEl).removeClass('photo-browser-slide-lazy');\n            pb.emit.apply(pb, ['local::lazyImageReady'].concat(args));\n          }\n        }\n      });\n      if (pb.params.swipeToClose && pb.params.type !== 'page') {\n        utils[\"default\"].extend(swiperParams.on, {\n          touchStart: function touchStart(e) {\n            pb.onTouchStart(e);\n            pb.emit('local::touchStart', e);\n          },\n          touchMoveOpposite: function touchMoveOpposite(e) {\n            pb.onTouchMove(e);\n            pb.emit('local::touchMoveOpposite', e);\n          },\n          touchEnd: function touchEnd(e) {\n            pb.onTouchEnd(e);\n            pb.emit('local::touchEnd', e);\n          }\n        });\n      }\n      if (pb.params.virtualSlides) {\n        utils[\"default\"].extend(swiperParams, {\n          virtual: {\n            slides: pb.params.photos,\n            renderSlide: function renderSlide(photo, index) {\n              if (photo.html || (typeof photo === 'string' || photo instanceof String) && photo.indexOf('<') >= 0 && photo.indexOf('>') >= 0) {\n                return pb.renderObject(photo, index);\n              }\n              if (pb.params.swiper.lazy === true || pb.params.swiper.lazy && pb.params.swiper.lazy.enabled) {\n                return pb.renderLazyPhoto(photo, index);\n              }\n              return pb.renderPhoto(photo, index);\n            }\n          }\n        });\n      }\n      pb.swiper = app.swiper.create(pb.$swiperContainerEl, swiperParams);\n      if (pb.activeIndex === 0) {\n        pb.onSlideChange(pb.swiper);\n      }\n      if (pb.$el) {\n        pb.$el.trigger('photobrowser:open');\n      }\n      pb.emit('local::open photoBrowserOpen', pb);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var pb = this;\n      if (pb.$el && pb.params.type === 'standalone') {\n        pb.$el.css('animation', 'none');\n      }\n      if (pb.$el) {\n        pb.$el.trigger('photobrowser:opened');\n      }\n      pb.emit('local::opened photoBrowserOpened', pb);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var pb = this;\n      if (pb.destroyed) return;\n\n      // Destroy Swiper\n      if (pb.swiper && pb.swiper.destroy) {\n        pb.swiper.destroy(true, false);\n        pb.swiper = null;\n        delete pb.swiper;\n      }\n      if (pb.$el) {\n        pb.$el.trigger('photobrowser:close');\n      }\n      pb.emit('local::close photoBrowserClose', pb);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var pb = this;\n      if (pb.destroyed) return;\n      pb.opened = false;\n      pb.$el = null;\n      pb.el = null;\n      delete pb.$el;\n      delete pb.el;\n      if (pb.$el) {\n        pb.$el.trigger('photobrowser:closed');\n      }\n      pb.emit('local::closed photoBrowserClosed', pb);\n    }\n\n    // Open\n  }, {\n    key: \"openPage\",\n    value: function openPage() {\n      var pb = this;\n      if (pb.opened) return pb;\n      var pageHtml = pb.renderPage();\n      pb.view.router.navigate({\n        url: pb.url,\n        route: {\n          content: pageHtml,\n          path: pb.url,\n          on: {\n            pageBeforeIn: function pageBeforeIn(e, page) {\n              pb.view.$el.addClass(\"with-photo-browser-page with-photo-browser-page-\".concat(pb.params.theme));\n              pb.onOpen('page', page.el);\n            },\n            pageAfterIn: function pageAfterIn(e, page) {\n              pb.onOpened('page', page.el);\n            },\n            pageBeforeOut: function pageBeforeOut(e, page) {\n              pb.view.$el.removeClass(\"with-photo-browser-page with-photo-browser-page-exposed with-photo-browser-page-\".concat(pb.params.theme));\n              pb.onClose('page', page.el);\n            },\n            pageAfterOut: function pageAfterOut(e, page) {\n              pb.onClosed('page', page.el);\n            }\n          }\n        }\n      });\n      return pb;\n    }\n  }, {\n    key: \"openStandalone\",\n    value: function openStandalone() {\n      var pb = this;\n      if (pb.opened) return pb;\n      var standaloneHtml = pb.renderStandalone();\n      var popupParams = {\n        backdrop: false,\n        content: standaloneHtml,\n        on: {\n          popupOpen: function popupOpen(popup) {\n            pb.onOpen('popup', popup.el);\n          },\n          popupOpened: function popupOpened(popup) {\n            pb.onOpened('popup', popup.el);\n          },\n          popupClose: function popupClose(popup) {\n            pb.onClose('popup', popup.el);\n          },\n          popupClosed: function popupClosed(popup) {\n            pb.onClosed('popup', popup.el);\n          }\n        }\n      };\n      if (pb.params.routableModals && pb.view) {\n        pb.view.router.navigate({\n          url: pb.url,\n          route: {\n            path: pb.url,\n            popup: popupParams\n          }\n        });\n      } else {\n        pb.modal = pb.app.popup.create(popupParams).open();\n      }\n      return pb;\n    }\n  }, {\n    key: \"openPopup\",\n    value: function openPopup() {\n      var pb = this;\n      if (pb.opened) return pb;\n      var popupHtml = pb.renderPopup();\n      var popupParams = {\n        content: popupHtml,\n        push: pb.params.popupPush,\n        on: {\n          popupOpen: function popupOpen(popup) {\n            pb.onOpen('popup', popup.el);\n          },\n          popupOpened: function popupOpened(popup) {\n            pb.onOpened('popup', popup.el);\n          },\n          popupClose: function popupClose(popup) {\n            pb.onClose('popup', popup.el);\n          },\n          popupClosed: function popupClosed(popup) {\n            pb.onClosed('popup', popup.el);\n          }\n        }\n      };\n      if (pb.params.routableModals && pb.view) {\n        pb.view.router.navigate({\n          url: pb.url,\n          route: {\n            path: pb.url,\n            popup: popupParams\n          }\n        });\n      } else {\n        pb.modal = pb.app.popup.create(popupParams).open();\n      }\n      return pb;\n    }\n\n    // Exposition\n  }, {\n    key: \"expositionEnable\",\n    value: function expositionEnable() {\n      var pb = this;\n      if (pb.params.type === 'page') {\n        pb.view.$el.addClass('with-photo-browser-page-exposed');\n      }\n      if (pb.$el) pb.$el.addClass('photo-browser-exposed');\n      if (pb.params.expositionHideCaptions) pb.$captionsContainerEl.addClass('photo-browser-captions-exposed');\n      pb.exposed = true;\n      return pb;\n    }\n  }, {\n    key: \"expositionDisable\",\n    value: function expositionDisable() {\n      var pb = this;\n      if (pb.params.type === 'page') {\n        pb.view.$el.removeClass('with-photo-browser-page-exposed');\n      }\n      if (pb.$el) pb.$el.removeClass('photo-browser-exposed');\n      if (pb.params.expositionHideCaptions) pb.$captionsContainerEl.removeClass('photo-browser-captions-exposed');\n      pb.exposed = false;\n      return pb;\n    }\n  }, {\n    key: \"expositionToggle\",\n    value: function expositionToggle() {\n      var pb = this;\n      if (pb.params.type === 'page') {\n        pb.view.$el.toggleClass('with-photo-browser-page-exposed');\n      }\n      if (pb.$el) pb.$el.toggleClass('photo-browser-exposed');\n      if (pb.params.expositionHideCaptions) pb.$captionsContainerEl.toggleClass('photo-browser-captions-exposed');\n      pb.exposed = !pb.exposed;\n      return pb;\n    }\n  }, {\n    key: \"open\",\n    value: function open(index) {\n      var pb = this;\n      var type = pb.params.type;\n      if (pb.opened) {\n        if (pb.swiper && typeof index !== 'undefined') {\n          pb.swiper.slideTo(parseInt(index, 10));\n        }\n        return pb;\n      }\n      if (typeof index !== 'undefined') {\n        pb.activeIndex = index;\n      }\n      if (type === 'standalone') {\n        pb.openStandalone();\n      }\n      if (type === 'page') {\n        pb.openPage();\n      }\n      if (type === 'popup') {\n        pb.openPopup();\n      }\n      return pb;\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var pb = this;\n      if (!pb.opened) return pb;\n      if (pb.params.routableModals && pb.view || pb.openedIn === 'page') {\n        pb.view.router.back();\n      } else {\n        pb.modal.once('modalClosed', function () {\n          utils[\"default\"].nextTick(function () {\n            if (pb.destroyed) return;\n            pb.modal.destroy();\n            delete pb.modal;\n          });\n        });\n        pb.modal.close();\n      }\n      return pb;\n    }\n    // eslint-disable-next-line\n  }, {\n    key: \"init\",\n    value: function init() {}\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var pb = this;\n      pb.emit('local::beforeDestroy photoBrowserBeforeDestroy', pb);\n      if (pb.$el) {\n        pb.$el.trigger('photobrowser:beforedestroy');\n        pb.$el[0].f7PhotoBrowser = null;\n        delete pb.$el[0].f7PhotoBrowser;\n      }\n      utils[\"default\"].deleteProps(pb);\n      pb.destroyed = true;\n      pb = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var photo_browser_class = (photo_browser_class_PhotoBrowser);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/photo-browser/photo-browser.js\n\n\n/* harmony default export */ var photo_browser = ({\n  name: 'photoBrowser',\n  params: {\n    photoBrowser: {\n      photos: [],\n      exposition: true,\n      expositionHideCaptions: false,\n      type: 'standalone',\n      navbar: true,\n      toolbar: true,\n      theme: 'light',\n      captionsTheme: undefined,\n      iconsColor: undefined,\n      popupPush: false,\n      swipeToClose: true,\n      pageBackLinkText: 'Back',\n      popupCloseLinkText: 'Close',\n      navbarOfText: 'of',\n      navbarShowCount: undefined,\n      view: undefined,\n      url: 'photos/',\n      routableModals: true,\n      virtualSlides: true,\n      renderNavbar: undefined,\n      renderToolbar: undefined,\n      renderCaption: undefined,\n      renderObject: undefined,\n      renderLazyPhoto: undefined,\n      renderPhoto: undefined,\n      renderPage: undefined,\n      renderPopup: undefined,\n      renderStandalone: undefined,\n      swiper: {\n        initialSlide: 0,\n        spaceBetween: 20,\n        speed: 300,\n        loop: false,\n        preloadImages: true,\n        navigation: {\n          nextEl: '.photo-browser-next',\n          prevEl: '.photo-browser-prev'\n        },\n        zoom: {\n          enabled: true,\n          maxRatio: 3,\n          minRatio: 1\n        },\n        lazy: {\n          enabled: true\n        }\n      }\n    }\n  },\n  create: function create() {\n    var app = this;\n    app.photoBrowser = constructor_methods({\n      defaultSelector: '.photo-browser-popup, .photo-browser-page',\n      constructor: photo_browser_class,\n      app: app,\n      domProp: 'f7PhotoBrowser'\n    });\n  },\n  static: {\n    PhotoBrowser: photo_browser_class\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/notification/notification-class.js\n\n\n\n\n\nfunction notification_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, notification_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction notification_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (notification_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar notification_class_Notification = /*#__PURE__*/function (_Modal) {\n  function Notification(app, params) {\n    var _this;\n    classCallCheck_default()(this, Notification);\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.notification, params);\n\n    // Extends with open/close Modal methods;\n    _this = notification_class_callSuper(this, Notification, [app, extendedParams]);\n    var notification = _this;\n    notification.app = app;\n    notification.params = extendedParams;\n    var _notification$params = notification.params,\n      icon = _notification$params.icon,\n      title = _notification$params.title,\n      titleRightText = _notification$params.titleRightText,\n      subtitle = _notification$params.subtitle,\n      text = _notification$params.text,\n      closeButton = _notification$params.closeButton,\n      closeTimeout = _notification$params.closeTimeout,\n      cssClass = _notification$params.cssClass,\n      closeOnClick = _notification$params.closeOnClick;\n    var $el;\n    if (!notification.params.el) {\n      // Find Element\n      var notificationHtml = notification.render({\n        icon: icon,\n        title: title,\n        titleRightText: titleRightText,\n        subtitle: subtitle,\n        text: text,\n        closeButton: closeButton,\n        cssClass: cssClass\n      });\n      $el = Object(dom7_module[\"default\"])(notificationHtml);\n    } else {\n      $el = Object(dom7_module[\"default\"])(notification.params.el);\n    }\n    if ($el && $el.length > 0 && $el[0].f7Modal) {\n      return possibleConstructorReturn_default()(_this, $el[0].f7Modal);\n    }\n    if ($el.length === 0) {\n      return possibleConstructorReturn_default()(_this, notification.destroy());\n    }\n    utils[\"default\"].extend(notification, {\n      $el: $el,\n      el: $el[0],\n      type: 'notification'\n    });\n    $el[0].f7Modal = notification;\n    if (closeButton) {\n      $el.find('.notification-close-button').on('click', function () {\n        notification.close();\n      });\n    }\n    $el.on('click', function (e) {\n      if (closeButton && Object(dom7_module[\"default\"])(e.target).closest('.notification-close-button').length) {\n        return;\n      }\n      notification.emit('local::click notificationClick', notification);\n      if (closeOnClick) notification.close();\n    });\n    notification.on('beforeDestroy', function () {\n      $el.off('click');\n    });\n\n    /* Touch Events */\n    var isTouched;\n    var isMoved;\n    var isScrolling;\n    var touchesDiff;\n    var touchStartTime;\n    var notificationHeight;\n    var touchesStart = {};\n    function handleTouchStart(e) {\n      if (isTouched) return;\n      isTouched = true;\n      isMoved = false;\n      isScrolling = undefined;\n      touchStartTime = utils[\"default\"].now();\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      if (typeof isScrolling === 'undefined') {\n        isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) < Math.abs(pageX - touchesStart.x));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        return;\n      }\n      e.preventDefault();\n      if (!isMoved) {\n        notification.$el.removeClass('notification-transitioning');\n        notification.$el.transition(0);\n        notificationHeight = notification.$el[0].offsetHeight / 2;\n      }\n      isMoved = true;\n      touchesDiff = pageY - touchesStart.y;\n      var newTranslate = touchesDiff;\n      if (touchesDiff > 0) {\n        newTranslate = Math.pow(touchesDiff, 0.8);\n      }\n      notification.$el.transform(\"translate3d(0, \".concat(newTranslate, \"px, 0)\"));\n    }\n    function handleTouchEnd() {\n      if (!isTouched || !isMoved) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      isTouched = false;\n      isMoved = false;\n      if (touchesDiff === 0) {\n        return;\n      }\n      var timeDiff = utils[\"default\"].now() - touchStartTime;\n      notification.$el.transition('');\n      notification.$el.addClass('notification-transitioning');\n      notification.$el.transform('');\n      if (touchesDiff < -10 && timeDiff < 300 || -touchesDiff >= notificationHeight / 1) {\n        notification.close();\n      }\n    }\n    function attachTouchEvents() {\n      notification.$el.on(app.touchEvents.start, handleTouchStart, {\n        passive: true\n      });\n      app.on('touchmove:active', handleTouchMove);\n      app.on('touchend:passive', handleTouchEnd);\n    }\n    function detachTouchEvents() {\n      notification.$el.off(app.touchEvents.start, handleTouchStart, {\n        passive: true\n      });\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n    }\n    var timeoutId;\n    function closeOnTimeout() {\n      timeoutId = utils[\"default\"].nextTick(function () {\n        if (isTouched && isMoved) {\n          closeOnTimeout();\n          return;\n        }\n        notification.close();\n      }, closeTimeout);\n    }\n    notification.on('open', function () {\n      if (notification.params.swipeToClose) {\n        attachTouchEvents();\n      }\n      Object(dom7_module[\"default\"])('.notification.modal-in').each(function (index, openedEl) {\n        var notificationInstance = app.notification.get(openedEl);\n        if (openedEl !== notification.el && notificationInstance) {\n          notificationInstance.close();\n        }\n      });\n      if (closeTimeout) {\n        closeOnTimeout();\n      }\n    });\n    notification.on('close beforeDestroy', function () {\n      if (notification.params.swipeToClose) {\n        detachTouchEvents();\n      }\n      ssr_window_esm[\"window\"].clearTimeout(timeoutId);\n    });\n    return possibleConstructorReturn_default()(_this, notification);\n  }\n  inherits_default()(Notification, _Modal);\n  return createClass_default()(Notification, [{\n    key: \"render\",\n    value: function render() {\n      var notification = this;\n      if (notification.params.render) return notification.params.render.call(notification, notification);\n      var _notification$params2 = notification.params,\n        icon = _notification$params2.icon,\n        title = _notification$params2.title,\n        titleRightText = _notification$params2.titleRightText,\n        subtitle = _notification$params2.subtitle,\n        text = _notification$params2.text,\n        closeButton = _notification$params2.closeButton,\n        cssClass = _notification$params2.cssClass;\n      return \"\\n      <div class=\\\"notification \".concat(cssClass || '', \"\\\">\\n        <div class=\\\"notification-header\\\">\\n          \").concat(icon ? \"<div class=\\\"notification-icon\\\">\".concat(icon, \"</div>\") : '', \"\\n          \").concat(title ? \"<div class=\\\"notification-title\\\">\".concat(title, \"</div>\") : '', \"\\n          \").concat(titleRightText ? \"<div class=\\\"notification-title-right-text\\\">\".concat(titleRightText, \"</div>\") : '', \"\\n          \").concat(closeButton ? '<span class=\"notification-close-button\"></span>' : '', \"\\n        </div>\\n        <div class=\\\"notification-content\\\">\\n          \").concat(subtitle ? \"<div class=\\\"notification-subtitle\\\">\".concat(subtitle, \"</div>\") : '', \"\\n          \").concat(text ? \"<div class=\\\"notification-text\\\">\".concat(text, \"</div>\") : '', \"\\n        </div>\\n      </div>\\n    \").trim();\n    }\n  }]);\n}(modal_class);\n/* harmony default export */ var notification_class = (notification_class_Notification);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/notification/notification.js\n\n\n\n/* harmony default export */ var notification_notification = ({\n  name: 'notification',\n  static: {\n    Notification: notification_class\n  },\n  create: function create() {\n    var app = this;\n    app.notification = utils[\"default\"].extend({}, modal_methods({\n      app: app,\n      constructor: notification_class,\n      defaultSelector: '.notification.modal-in'\n    }));\n  },\n  params: {\n    notification: {\n      icon: null,\n      title: null,\n      titleRightText: null,\n      subtitle: null,\n      text: null,\n      closeButton: false,\n      closeTimeout: null,\n      closeOnClick: false,\n      swipeToClose: true,\n      cssClass: null,\n      render: null\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/autocomplete/autocomplete-class.js\n\n\n\n\n\n\n\nfunction autocomplete_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, autocomplete_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction autocomplete_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (autocomplete_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint \"no-useless-escape\": \"off\" */\n\n\n\nvar autocomplete_class_Autocomplete = /*#__PURE__*/function (_Framework7Class) {\n  function Autocomplete(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Autocomplete);\n    _this = autocomplete_class_callSuper(this, Autocomplete, [params, [app]]);\n    var ac = _this;\n    ac.app = app;\n    var defaults = utils[\"default\"].extend({\n      on: {}\n    }, app.params.autocomplete);\n    if (typeof defaults.searchbarDisableButton === 'undefined') {\n      defaults.searchbarDisableButton = app.theme !== 'aurora';\n    }\n\n    // Extend defaults with modules params\n    ac.useModulesParams(defaults);\n    ac.params = utils[\"default\"].extend(defaults, params);\n    var $openerEl;\n    if (ac.params.openerEl) {\n      $openerEl = Object(dom7_module[\"default\"])(ac.params.openerEl);\n      if ($openerEl.length) $openerEl[0].f7Autocomplete = ac;\n    }\n    var $inputEl;\n    if (ac.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(ac.params.inputEl);\n      if ($inputEl.length) $inputEl[0].f7Autocomplete = ac;\n    }\n    var id = utils[\"default\"].id();\n    var url = params.url;\n    if (!url && $openerEl && $openerEl.length) {\n      if ($openerEl.attr('href')) url = $openerEl.attr('href');else if ($openerEl.find('a').length > 0) {\n        url = $openerEl.find('a').attr('href');\n      }\n    }\n    if (!url || url === '#' || url === '') url = ac.params.url;\n    var inputType = ac.params.multiple ? 'checkbox' : 'radio';\n    utils[\"default\"].extend(ac, {\n      $openerEl: $openerEl,\n      openerEl: $openerEl && $openerEl[0],\n      $inputEl: $inputEl,\n      inputEl: $inputEl && $inputEl[0],\n      id: id,\n      url: url,\n      value: ac.params.value || [],\n      inputType: inputType,\n      inputName: \"\".concat(inputType, \"-\").concat(id),\n      $modalEl: undefined,\n      $dropdownEl: undefined\n    });\n    var previousQuery = '';\n    function onInputChange() {\n      var query = ac.$inputEl.val().trim();\n      if (!ac.params.source) return;\n      ac.params.source.call(ac, query, function (items) {\n        var itemsHTML = '';\n        var limit = ac.params.limit ? Math.min(ac.params.limit, items.length) : items.length;\n        ac.items = items;\n        var regExp;\n        if (ac.params.highlightMatches) {\n          query = query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n          regExp = new RegExp(\"(\".concat(query, \")\"), 'i');\n        }\n        var firstValue;\n        var firstItem;\n        for (var i = 0; i < limit; i += 1) {\n          var itemValue = typeof_default()(items[i]) === 'object' ? items[i][ac.params.valueProperty] : items[i];\n          var itemText = typeof_default()(items[i]) === 'object' ? items[i][ac.params.textProperty] : items[i];\n          if (i === 0) {\n            firstValue = itemValue;\n            firstItem = ac.items[i];\n          }\n          itemsHTML += ac.renderItem({\n            value: itemValue,\n            text: ac.params.highlightMatches ? itemText.replace(regExp, '<b>$1</b>') : itemText\n          }, i);\n        }\n        if (itemsHTML === '' && query === '' && ac.params.dropdownPlaceholderText) {\n          itemsHTML += ac.renderItem({\n            placeholder: true,\n            text: ac.params.dropdownPlaceholderText\n          });\n        }\n        ac.$dropdownEl.find('ul').html(itemsHTML);\n        if (ac.params.typeahead) {\n          if (!firstValue || !firstItem) {\n            return;\n          }\n          if (firstValue.toLowerCase().indexOf(query.toLowerCase()) !== 0) {\n            return;\n          }\n          if (previousQuery.toLowerCase() === query.toLowerCase()) {\n            ac.value = [];\n            return;\n          }\n          if (previousQuery.toLowerCase().indexOf(query.toLowerCase()) === 0) {\n            previousQuery = query;\n            ac.value = [];\n            return;\n          }\n          $inputEl.val(firstValue);\n          $inputEl[0].setSelectionRange(query.length, firstValue.length);\n          var previousValue = typeof_default()(ac.value[0]) === 'object' ? ac.value[0][ac.params.valueProperty] : ac.value[0];\n          if (!previousValue || firstValue.toLowerCase() !== previousValue.toLowerCase()) {\n            ac.value = [firstItem];\n            ac.emit('local::change autocompleteChange', [firstItem]);\n          }\n        }\n        previousQuery = query;\n      });\n    }\n    function onPageInputChange() {\n      var input = this;\n      var value = input.value;\n      var isValues = Object(dom7_module[\"default\"])(input).parents('.autocomplete-values').length > 0;\n      var item;\n      var itemValue;\n      var aValue;\n      if (isValues) {\n        if (ac.inputType === 'checkbox' && !input.checked) {\n          for (var i = 0; i < ac.value.length; i += 1) {\n            aValue = typeof ac.value[i] === 'string' ? ac.value[i] : ac.value[i][ac.params.valueProperty];\n            if (aValue === value || aValue * 1 === value * 1) {\n              ac.value.splice(i, 1);\n            }\n          }\n          ac.updateValues();\n          ac.emit('local::change autocompleteChange', ac.value);\n        }\n        return;\n      }\n\n      // Find Related Item\n      for (var _i = 0; _i < ac.items.length; _i += 1) {\n        itemValue = typeof_default()(ac.items[_i]) === 'object' ? ac.items[_i][ac.params.valueProperty] : ac.items[_i];\n        if (itemValue === value || itemValue * 1 === value * 1) item = ac.items[_i];\n      }\n      if (ac.inputType === 'radio') {\n        ac.value = [item];\n      } else if (input.checked) {\n        ac.value.push(item);\n      } else {\n        for (var _i2 = 0; _i2 < ac.value.length; _i2 += 1) {\n          aValue = typeof_default()(ac.value[_i2]) === 'object' ? ac.value[_i2][ac.params.valueProperty] : ac.value[_i2];\n          if (aValue === value || aValue * 1 === value * 1) {\n            ac.value.splice(_i2, 1);\n          }\n        }\n      }\n\n      // Update Values Block\n      ac.updateValues();\n\n      // On Select Callback\n      if (ac.inputType === 'radio' && input.checked || ac.inputType === 'checkbox') {\n        ac.emit('local::change autocompleteChange', ac.value);\n      }\n    }\n    function onHtmlClick(e) {\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      if ($targetEl.is(ac.$inputEl[0]) || ac.$dropdownEl && $targetEl.closest(ac.$dropdownEl[0]).length) return;\n      ac.close();\n    }\n    function onOpenerClick() {\n      ac.open();\n    }\n    function onInputFocus() {\n      ac.open();\n    }\n    function onInputBlur() {\n      if (ac.$dropdownEl.find('label.active-state').length > 0) return;\n      setTimeout(function () {\n        ac.close();\n      }, 0);\n    }\n    function onResize() {\n      ac.positionDropdown();\n    }\n    function onKeyDown(e) {\n      if (!ac.opened) return;\n      if (e.keyCode === 27) {\n        // ESC\n        e.preventDefault();\n        ac.$inputEl.blur();\n        return;\n      }\n      if (e.keyCode === 13) {\n        // Enter\n        var $selectedItemLabel = ac.$dropdownEl.find('.autocomplete-dropdown-selected label');\n        if ($selectedItemLabel.length) {\n          e.preventDefault();\n          $selectedItemLabel.trigger('click');\n          ac.$inputEl.blur();\n          return;\n        }\n        if (ac.params.typeahead) {\n          e.preventDefault();\n          ac.$inputEl.blur();\n        }\n        return;\n      }\n      if (e.keyCode !== 40 && e.keyCode !== 38) return;\n      e.preventDefault();\n      var $selectedItem = ac.$dropdownEl.find('.autocomplete-dropdown-selected');\n      var $newItem;\n      if ($selectedItem.length) {\n        $newItem = $selectedItem[e.keyCode === 40 ? 'next' : 'prev']('li');\n        if (!$newItem.length) {\n          $newItem = ac.$dropdownEl.find('li').eq(e.keyCode === 40 ? 0 : ac.$dropdownEl.find('li').length - 1);\n        }\n      } else {\n        $newItem = ac.$dropdownEl.find('li').eq(e.keyCode === 40 ? 0 : ac.$dropdownEl.find('li').length - 1);\n      }\n      if ($newItem.hasClass('autocomplete-dropdown-placeholder')) return;\n      $selectedItem.removeClass('autocomplete-dropdown-selected');\n      $newItem.addClass('autocomplete-dropdown-selected');\n    }\n    function onDropdownClick() {\n      var $clickedEl = Object(dom7_module[\"default\"])(this);\n      var clickedItem;\n      for (var i = 0; i < ac.items.length; i += 1) {\n        var itemValue = typeof_default()(ac.items[i]) === 'object' ? ac.items[i][ac.params.valueProperty] : ac.items[i];\n        var value = $clickedEl.attr('data-value');\n        if (itemValue === value || itemValue * 1 === value * 1) {\n          clickedItem = ac.items[i];\n        }\n      }\n      if (ac.params.updateInputValueOnSelect) {\n        ac.$inputEl.val(typeof_default()(clickedItem) === 'object' ? clickedItem[ac.params.valueProperty] : clickedItem);\n        ac.$inputEl.trigger('input change');\n      }\n      ac.value = [clickedItem];\n      ac.emit('local::change autocompleteChange', [clickedItem]);\n      ac.close();\n    }\n    ac.attachEvents = function attachEvents() {\n      if (ac.params.openIn !== 'dropdown' && ac.$openerEl) {\n        ac.$openerEl.on('click', onOpenerClick);\n      }\n      if (ac.params.openIn === 'dropdown' && ac.$inputEl) {\n        ac.$inputEl.on('focus', onInputFocus);\n        ac.$inputEl.on(ac.params.inputEvents, onInputChange);\n        if (app.device.android) {\n          Object(dom7_module[\"default\"])('html').on('click', onHtmlClick);\n        } else {\n          ac.$inputEl.on('blur', onInputBlur);\n        }\n        ac.$inputEl.on('keydown', onKeyDown);\n      }\n    };\n    ac.detachEvents = function attachEvents() {\n      if (ac.params.openIn !== 'dropdown' && ac.$openerEl) {\n        ac.$openerEl.off('click', onOpenerClick);\n      }\n      if (ac.params.openIn === 'dropdown' && ac.$inputEl) {\n        ac.$inputEl.off('focus', onInputFocus);\n        ac.$inputEl.off(ac.params.inputEvents, onInputChange);\n        if (app.device.android) {\n          Object(dom7_module[\"default\"])('html').off('click', onHtmlClick);\n        } else {\n          ac.$inputEl.off('blur', onInputBlur);\n        }\n        ac.$inputEl.off('keydown', onKeyDown);\n      }\n    };\n    ac.attachDropdownEvents = function attachDropdownEvents() {\n      ac.$dropdownEl.on('click', 'label', onDropdownClick);\n      app.on('resize', onResize);\n    };\n    ac.detachDropdownEvents = function detachDropdownEvents() {\n      ac.$dropdownEl.off('click', 'label', onDropdownClick);\n      app.off('resize', onResize);\n    };\n    ac.attachPageEvents = function attachPageEvents() {\n      ac.$el.on('change', 'input[type=\"radio\"], input[type=\"checkbox\"]', onPageInputChange);\n      if (ac.params.closeOnSelect && !ac.params.multiple) {\n        ac.$el.once('click', '.list label', function () {\n          utils[\"default\"].nextTick(function () {\n            ac.close();\n          });\n        });\n      }\n    };\n    ac.detachPageEvents = function detachPageEvents() {\n      ac.$el.off('change', 'input[type=\"radio\"], input[type=\"checkbox\"]', onPageInputChange);\n    };\n\n    // Install Modules\n    ac.useModules();\n\n    // Init\n    ac.init();\n    return possibleConstructorReturn_default()(_this, ac);\n  }\n  inherits_default()(Autocomplete, _Framework7Class);\n  return createClass_default()(Autocomplete, [{\n    key: \"view\",\n    get: function get() {\n      var ac = this;\n      var $openerEl = ac.$openerEl,\n        $inputEl = ac.$inputEl,\n        app = ac.app;\n      var view;\n      if (ac.params.view) {\n        view = ac.params.view;\n      } else if ($openerEl || $inputEl) {\n        var $el = $openerEl || $inputEl;\n        view = $el.closest('.view').length && $el.closest('.view')[0].f7View;\n      }\n      if (!view) view = app.views.main;\n      return view;\n    }\n  }, {\n    key: \"positionDropdown\",\n    value: function positionDropdown() {\n      var ac = this;\n      var $inputEl = ac.$inputEl,\n        app = ac.app,\n        $dropdownEl = ac.$dropdownEl;\n      var $pageContentEl = $inputEl.parents('.page-content');\n      if ($pageContentEl.length === 0) return;\n      var inputOffset = $inputEl.offset();\n      var inputOffsetWidth = $inputEl[0].offsetWidth;\n      var inputOffsetHeight = $inputEl[0].offsetHeight;\n      var $listEl = $inputEl.parents('.list');\n      var $listParent;\n      $listEl.parents().each(function (index, parentEl) {\n        if ($listParent) return;\n        var $parentEl = Object(dom7_module[\"default\"])(parentEl);\n        if ($parentEl.parent($pageContentEl).length) $listParent = $parentEl;\n      });\n      var listOffset = $listEl.offset();\n      var paddingBottom = parseInt($pageContentEl.css('padding-bottom'), 10);\n      var listOffsetLeft = $listEl.length > 0 ? listOffset.left - $pageContentEl.offset().left : 0;\n      var inputOffsetLeft = inputOffset.left - ($listEl.length > 0 ? listOffset.left : 0) - (app.rtl ? 0 : 0);\n      var inputOffsetTop = inputOffset.top - ($pageContentEl.offset().top - $pageContentEl[0].scrollTop);\n      var maxHeight = $pageContentEl[0].scrollHeight - paddingBottom - (inputOffsetTop + $pageContentEl[0].scrollTop) - $inputEl[0].offsetHeight;\n      var paddingProp = app.rtl ? 'padding-right' : 'padding-left';\n      var paddingValue;\n      if ($listEl.length && !ac.params.expandInput) {\n        paddingValue = (app.rtl ? $listEl[0].offsetWidth - inputOffsetLeft - inputOffsetWidth : inputOffsetLeft) - (app.theme === 'md' ? 16 : 15);\n      }\n      $dropdownEl.css({\n        left: \"\".concat($listEl.length > 0 ? listOffsetLeft : inputOffsetLeft, \"px\"),\n        top: \"\".concat(inputOffsetTop + $pageContentEl[0].scrollTop + inputOffsetHeight, \"px\"),\n        width: \"\".concat($listEl.length > 0 ? $listEl[0].offsetWidth : inputOffsetWidth, \"px\")\n      });\n      $dropdownEl.children('.autocomplete-dropdown-inner').css(defineProperty_default()({\n        maxHeight: \"\".concat(maxHeight, \"px\")\n      }, paddingProp, $listEl.length > 0 && !ac.params.expandInput ? \"\".concat(paddingValue, \"px\") : ''));\n    }\n  }, {\n    key: \"focus\",\n    value: function focus() {\n      var ac = this;\n      ac.$el.find('input[type=search]').focus();\n    }\n  }, {\n    key: \"source\",\n    value: function source(query) {\n      var ac = this;\n      if (!ac.params.source) return;\n      var $el = ac.$el;\n      ac.params.source.call(ac, query, function (items) {\n        var itemsHTML = '';\n        var limit = ac.params.limit ? Math.min(ac.params.limit, items.length) : items.length;\n        ac.items = items;\n        for (var i = 0; i < limit; i += 1) {\n          var selected = false;\n          var itemValue = typeof_default()(items[i]) === 'object' ? items[i][ac.params.valueProperty] : items[i];\n          for (var j = 0; j < ac.value.length; j += 1) {\n            var aValue = typeof_default()(ac.value[j]) === 'object' ? ac.value[j][ac.params.valueProperty] : ac.value[j];\n            if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true;\n          }\n          itemsHTML += ac.renderItem({\n            value: itemValue,\n            text: typeof_default()(items[i]) === 'object' ? items[i][ac.params.textProperty] : items[i],\n            inputType: ac.inputType,\n            id: ac.id,\n            inputName: ac.inputName,\n            selected: selected\n          }, i);\n        }\n        $el.find('.autocomplete-found ul').html(itemsHTML);\n        if (items.length === 0) {\n          if (query.length !== 0) {\n            $el.find('.autocomplete-not-found').show();\n            $el.find('.autocomplete-found, .autocomplete-values').hide();\n          } else {\n            $el.find('.autocomplete-values').show();\n            $el.find('.autocomplete-found, .autocomplete-not-found').hide();\n          }\n        } else {\n          $el.find('.autocomplete-found').show();\n          $el.find('.autocomplete-not-found, .autocomplete-values').hide();\n        }\n      });\n    }\n  }, {\n    key: \"updateValues\",\n    value: function updateValues() {\n      var ac = this;\n      var valuesHTML = '';\n      for (var i = 0; i < ac.value.length; i += 1) {\n        valuesHTML += ac.renderItem({\n          value: typeof_default()(ac.value[i]) === 'object' ? ac.value[i][ac.params.valueProperty] : ac.value[i],\n          text: typeof_default()(ac.value[i]) === 'object' ? ac.value[i][ac.params.textProperty] : ac.value[i],\n          inputType: ac.inputType,\n          id: ac.id,\n          inputName: \"\".concat(ac.inputName, \"-checked}\"),\n          selected: true\n        }, i);\n      }\n      ac.$el.find('.autocomplete-values ul').html(valuesHTML);\n    }\n  }, {\n    key: \"preloaderHide\",\n    value: function preloaderHide() {\n      var ac = this;\n      if (ac.params.openIn === 'dropdown' && ac.$dropdownEl) {\n        ac.$dropdownEl.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n      } else {\n        Object(dom7_module[\"default\"])('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n      }\n    }\n  }, {\n    key: \"preloaderShow\",\n    value: function preloaderShow() {\n      var ac = this;\n      if (ac.params.openIn === 'dropdown' && ac.$dropdownEl) {\n        ac.$dropdownEl.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n      } else {\n        Object(dom7_module[\"default\"])('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n      }\n    }\n  }, {\n    key: \"renderPreloader\",\n    value: function renderPreloader() {\n      var ac = this;\n      return \"\\n      <div class=\\\"autocomplete-preloader preloader \".concat(ac.params.preloaderColor ? \"color-\".concat(ac.params.preloaderColor) : '', \"\\\">\").concat(utils[\"default\"][\"\".concat(ac.app.theme, \"PreloaderContent\")] || '', \"</div>\\n    \").trim();\n    }\n  }, {\n    key: \"renderSearchbar\",\n    value: function renderSearchbar() {\n      var ac = this;\n      if (ac.params.renderSearchbar) return ac.params.renderSearchbar.call(ac);\n      var searchbarHTML = \"\\n      <form class=\\\"searchbar\\\">\\n        <div class=\\\"searchbar-inner\\\">\\n          <div class=\\\"searchbar-input-wrap\\\">\\n            <input type=\\\"search\\\" spellcheck=\\\"\".concat(ac.params.searchbarSpellcheck || 'false', \"\\\" placeholder=\\\"\").concat(ac.params.searchbarPlaceholder, \"\\\"/>\\n            <i class=\\\"searchbar-icon\\\"></i>\\n            <span class=\\\"input-clear-button\\\"></span>\\n          </div>\\n          \").concat(ac.params.searchbarDisableButton ? \"\\n          <span class=\\\"searchbar-disable-button\\\">\".concat(ac.params.searchbarDisableText, \"</span>\\n          \") : '', \"\\n        </div>\\n      </form>\\n    \").trim();\n      return searchbarHTML;\n    }\n  }, {\n    key: \"renderItem\",\n    value: function renderItem(item, index) {\n      var ac = this;\n      if (ac.params.renderItem) return ac.params.renderItem.call(ac, item, index);\n      var itemHtml;\n      var itemValue = item.value && typeof item.value === 'string' ? item.value.replace(/\"/g, '&quot;') : item.value;\n      if (ac.params.openIn !== 'dropdown') {\n        itemHtml = \"\\n        <li>\\n          <label class=\\\"item-\".concat(item.inputType, \" item-content\\\">\\n            <input type=\\\"\").concat(item.inputType, \"\\\" name=\\\"\").concat(item.inputName, \"\\\" value=\\\"\").concat(itemValue, \"\\\" \").concat(item.selected ? 'checked' : '', \">\\n            <i class=\\\"icon icon-\").concat(item.inputType, \"\\\"></i>\\n            <div class=\\\"item-inner\\\">\\n              <div class=\\\"item-title\\\">\").concat(item.text, \"</div>\\n            </div>\\n          </label>\\n        </li>\\n      \");\n      } else if (!item.placeholder) {\n        // Dropdown\n        itemHtml = \"\\n        <li>\\n          <label class=\\\"item-radio item-content\\\" data-value=\\\"\".concat(itemValue, \"\\\">\\n            <div class=\\\"item-inner\\\">\\n              <div class=\\\"item-title\\\">\").concat(item.text, \"</div>\\n            </div>\\n          </label>\\n        </li>\\n      \");\n      } else {\n        // Dropwdown placeholder\n        itemHtml = \"\\n        <li class=\\\"autocomplete-dropdown-placeholder\\\">\\n          <label class=\\\"item-content\\\">\\n            <div class=\\\"item-inner\\\">\\n              <div class=\\\"item-title\\\">\".concat(item.text, \"</div>\\n            </div>\\n          </label>\\n        </li>\\n      \");\n      }\n      return itemHtml.trim();\n    }\n  }, {\n    key: \"renderNavbar\",\n    value: function renderNavbar() {\n      var ac = this;\n      if (ac.params.renderNavbar) return ac.params.renderNavbar.call(ac);\n      var pageTitle = ac.params.pageTitle;\n      if (typeof pageTitle === 'undefined' && ac.$openerEl && ac.$openerEl.length) {\n        pageTitle = ac.$openerEl.find('.item-title').text().trim();\n      }\n      var inPopup = ac.params.openIn === 'popup';\n      var navbarLeft = inPopup ? \"\\n        \".concat(ac.params.preloader ? \"\\n        <div class=\\\"left\\\">\\n          \".concat(ac.renderPreloader(), \"\\n        </div>\\n        \") : '', \"\\n      \") : \"\\n        <div class=\\\"left sliding\\\">\\n          <a class=\\\"link back\\\">\\n            <i class=\\\"icon icon-back\\\"></i>\\n            <span class=\\\"if-not-md\\\">\".concat(ac.params.pageBackLinkText, \"</span>\\n          </a>\\n        </div>\\n      \");\n      var navbarRight = inPopup ? \"\\n        <div class=\\\"right\\\">\\n          <a class=\\\"link popup-close\\\" data-popup=\\\".autocomplete-popup\\\">\\n            \".concat(ac.params.popupCloseLinkText, \"\\n          </a>\\n        </div>\\n      \") : \"\\n        \".concat(ac.params.preloader ? \"\\n        <div class=\\\"right\\\">\\n          \".concat(ac.renderPreloader(), \"\\n        </div>\\n        \") : '', \"\\n      \");\n      var navbarHtml = \"\\n      <div class=\\\"navbar \".concat(ac.params.navbarColorTheme ? \"color-\".concat(ac.params.navbarColorTheme) : '', \"\\\">\\n        <div class=\\\"navbar-bg\\\"></div>\\n        <div class=\\\"navbar-inner \").concat(ac.params.navbarColorTheme ? \"color-\".concat(ac.params.navbarColorTheme) : '', \"\\\">\\n          \").concat(navbarLeft, \"\\n          \").concat(pageTitle ? \"<div class=\\\"title sliding\\\">\".concat(pageTitle, \"</div>\") : '', \"\\n          \").concat(navbarRight, \"\\n          <div class=\\\"subnavbar sliding\\\">\").concat(ac.renderSearchbar(), \"</div>\\n        </div>\\n      </div>\\n    \").trim();\n      return navbarHtml;\n    }\n  }, {\n    key: \"renderDropdown\",\n    value: function renderDropdown() {\n      var ac = this;\n      if (ac.params.renderDropdown) return ac.params.renderDropdown.call(ac, ac.items);\n      var dropdownHtml = \"\\n      <div class=\\\"autocomplete-dropdown\\\">\\n        <div class=\\\"autocomplete-dropdown-inner\\\">\\n          <div class=\\\"list \".concat(!ac.params.expandInput ? 'no-safe-areas' : '', \"\\\">\\n            <ul></ul>\\n          </div>\\n        </div>\\n        \").concat(ac.params.preloader ? ac.renderPreloader() : '', \"\\n      </div>\\n    \").trim();\n      return dropdownHtml;\n    }\n  }, {\n    key: \"renderPage\",\n    value: function renderPage(inPopup) {\n      var ac = this;\n      if (ac.params.renderPage) return ac.params.renderPage.call(ac, ac.items);\n      var pageHtml = \"\\n      <div class=\\\"page page-with-subnavbar autocomplete-page\\\" data-name=\\\"autocomplete-page\\\">\\n        \".concat(ac.renderNavbar(inPopup), \"\\n        <div class=\\\"searchbar-backdrop\\\"></div>\\n        <div class=\\\"page-content\\\">\\n          <div class=\\\"list autocomplete-list autocomplete-found autocomplete-list-\").concat(ac.id, \" \").concat(ac.params.formColorTheme ? \"color-\".concat(ac.params.formColorTheme) : '', \"\\\">\\n            <ul></ul>\\n          </div>\\n          <div class=\\\"list autocomplete-not-found\\\">\\n            <ul>\\n              <li class=\\\"item-content\\\"><div class=\\\"item-inner\\\"><div class=\\\"item-title\\\">\").concat(ac.params.notFoundText, \"</div></div></li>\\n            </ul>\\n          </div>\\n          <div class=\\\"list autocomplete-values\\\">\\n            <ul></ul>\\n          </div>\\n        </div>\\n      </div>\\n    \").trim();\n      return pageHtml;\n    }\n  }, {\n    key: \"renderPopup\",\n    value: function renderPopup() {\n      var ac = this;\n      if (ac.params.renderPopup) return ac.params.renderPopup.call(ac, ac.items);\n      var popupHtml = \"\\n      <div class=\\\"popup autocomplete-popup\\\">\\n        <div class=\\\"view\\\">\\n          \".concat(ac.renderPage(true), \";\\n        </div>\\n      </div>\\n    \").trim();\n      return popupHtml;\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen(type, el) {\n      var ac = this;\n      var app = ac.app;\n      var $el = Object(dom7_module[\"default\"])(el);\n      ac.$el = $el;\n      ac.el = $el[0];\n      ac.openedIn = type;\n      ac.opened = true;\n      if (ac.params.openIn === 'dropdown') {\n        ac.attachDropdownEvents();\n        ac.$dropdownEl.addClass('autocomplete-dropdown-in');\n        ac.$inputEl.trigger('input');\n      } else {\n        // Init SB\n        var $searchbarEl = $el.find('.searchbar');\n        if (ac.params.openIn === 'page' && app.theme === 'ios' && $searchbarEl.length === 0) {\n          $searchbarEl = Object(dom7_module[\"default\"])(app.navbar.getElByPage($el)).find('.searchbar');\n        }\n        ac.searchbar = app.searchbar.create({\n          el: $searchbarEl,\n          backdropEl: $el.find('.searchbar-backdrop'),\n          customSearch: true,\n          on: {\n            search: function search(sb, query) {\n              if (query.length === 0 && ac.searchbar.enabled) {\n                ac.searchbar.backdropShow();\n              } else {\n                ac.searchbar.backdropHide();\n              }\n              ac.source(query);\n            }\n          }\n        });\n\n        // Attach page events\n        ac.attachPageEvents();\n\n        // Update Values On Page Init\n        ac.updateValues();\n\n        // Source on load\n        if (ac.params.requestSourceOnOpen) ac.source('');\n      }\n      ac.emit('local::open autocompleteOpen', ac);\n    }\n  }, {\n    key: \"autoFocus\",\n    value: function autoFocus() {\n      var ac = this;\n      if (ac.searchbar && ac.searchbar.$inputEl) {\n        ac.searchbar.$inputEl.focus();\n      }\n      return ac;\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var ac = this;\n      if (ac.params.openIn !== 'dropdown' && ac.params.autoFocus) {\n        ac.autoFocus();\n      }\n      ac.emit('local::opened autocompleteOpened', ac);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var ac = this;\n      if (ac.destroyed) return;\n\n      // Destroy SB\n      if (ac.searchbar && ac.searchbar.destroy) {\n        ac.searchbar.destroy();\n        ac.searchbar = null;\n        delete ac.searchbar;\n      }\n      if (ac.params.openIn === 'dropdown') {\n        ac.detachDropdownEvents();\n        ac.$dropdownEl.removeClass('autocomplete-dropdown-in').remove();\n        ac.$inputEl.parents('.item-content-dropdown-expanded').removeClass('item-content-dropdown-expanded');\n      } else {\n        ac.detachPageEvents();\n      }\n      ac.emit('local::close autocompleteClose', ac);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var ac = this;\n      if (ac.destroyed) return;\n      ac.opened = false;\n      ac.$el = null;\n      ac.el = null;\n      delete ac.$el;\n      delete ac.el;\n      ac.emit('local::closed autocompleteClosed', ac);\n    }\n  }, {\n    key: \"openPage\",\n    value: function openPage() {\n      var ac = this;\n      if (ac.opened) return ac;\n      var pageHtml = ac.renderPage();\n      ac.view.router.navigate({\n        url: ac.url,\n        route: {\n          content: pageHtml,\n          path: ac.url,\n          on: {\n            pageBeforeIn: function pageBeforeIn(e, page) {\n              ac.onOpen('page', page.el);\n            },\n            pageAfterIn: function pageAfterIn(e, page) {\n              ac.onOpened('page', page.el);\n            },\n            pageBeforeOut: function pageBeforeOut(e, page) {\n              ac.onClose('page', page.el);\n            },\n            pageAfterOut: function pageAfterOut(e, page) {\n              ac.onClosed('page', page.el);\n            }\n          },\n          options: {\n            animate: ac.params.animate\n          }\n        }\n      });\n      return ac;\n    }\n  }, {\n    key: \"openPopup\",\n    value: function openPopup() {\n      var ac = this;\n      if (ac.opened) return ac;\n      var popupHtml = ac.renderPopup();\n      var popupParams = {\n        content: popupHtml,\n        animate: ac.params.animate,\n        push: ac.params.popupPush,\n        swipeToClose: ac.params.popupSwipeToClose,\n        on: {\n          popupOpen: function popupOpen(popup) {\n            ac.onOpen('popup', popup.el);\n          },\n          popupOpened: function popupOpened(popup) {\n            ac.onOpened('popup', popup.el);\n          },\n          popupClose: function popupClose(popup) {\n            ac.onClose('popup', popup.el);\n          },\n          popupClosed: function popupClosed(popup) {\n            ac.onClosed('popup', popup.el);\n          }\n        }\n      };\n      if (ac.params.routableModals && ac.view) {\n        ac.view.router.navigate({\n          url: ac.url,\n          route: {\n            path: ac.url,\n            popup: popupParams\n          }\n        });\n      } else {\n        ac.modal = ac.app.popup.create(popupParams).open(ac.params.animate);\n      }\n      return ac;\n    }\n  }, {\n    key: \"openDropdown\",\n    value: function openDropdown() {\n      var ac = this;\n      if (!ac.$dropdownEl) {\n        ac.$dropdownEl = Object(dom7_module[\"default\"])(ac.renderDropdown());\n      }\n      var $listEl = ac.$inputEl.parents('.list');\n      if ($listEl.length && ac.$inputEl.parents('.item-content').length > 0 && ac.params.expandInput) {\n        ac.$inputEl.parents('.item-content').addClass('item-content-dropdown-expanded');\n      }\n      var $pageContentEl = ac.$inputEl.parents('.page-content');\n      if (ac.params.dropdownContainerEl) {\n        Object(dom7_module[\"default\"])(ac.params.dropdownContainerEl).append(ac.$dropdownEl);\n      } else if ($pageContentEl.length === 0) {\n        ac.$dropdownEl.insertAfter(ac.$inputEl);\n      } else {\n        ac.positionDropdown();\n        $pageContentEl.append(ac.$dropdownEl);\n      }\n      ac.onOpen('dropdown', ac.$dropdownEl);\n      ac.onOpened('dropdown', ac.$dropdownEl);\n    }\n  }, {\n    key: \"open\",\n    value: function open() {\n      var ac = this;\n      if (ac.opened) return ac;\n      var openIn = ac.params.openIn;\n      ac[\"open\".concat(openIn.split('').map(function (el, index) {\n        if (index === 0) return el.toUpperCase();\n        return el;\n      }).join(''))]();\n      return ac;\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var ac = this;\n      if (!ac.opened) return ac;\n      if (ac.params.openIn === 'dropdown') {\n        ac.onClose();\n        ac.onClosed();\n      } else if (ac.params.routableModals && ac.view || ac.openedIn === 'page') {\n        ac.view.router.back({\n          animate: ac.params.animate\n        });\n      } else {\n        ac.modal.once('modalClosed', function () {\n          utils[\"default\"].nextTick(function () {\n            if (ac.destroyed) return;\n            ac.modal.destroy();\n            delete ac.modal;\n          });\n        });\n        ac.modal.close();\n      }\n      return ac;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var ac = this;\n      ac.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var ac = this;\n      ac.emit('local::beforeDestroy autocompleteBeforeDestroy', ac);\n      ac.detachEvents();\n      if (ac.$inputEl && ac.$inputEl[0]) {\n        delete ac.$inputEl[0].f7Autocomplete;\n      }\n      if (ac.$openerEl && ac.$openerEl[0]) {\n        delete ac.$openerEl[0].f7Autocomplete;\n      }\n      utils[\"default\"].deleteProps(ac);\n      ac.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var autocomplete_class = (autocomplete_class_Autocomplete);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/autocomplete/autocomplete.js\n\n\n\n/* harmony default export */ var autocomplete = ({\n  name: 'autocomplete',\n  params: {\n    autocomplete: {\n      openerEl: undefined,\n      inputEl: undefined,\n      view: undefined,\n      // DropDown\n      dropdownContainerEl: undefined,\n      dropdownPlaceholderText: undefined,\n      typeahead: false,\n      highlightMatches: true,\n      expandInput: false,\n      updateInputValueOnSelect: true,\n      inputEvents: 'input',\n      value: undefined,\n      multiple: false,\n      source: undefined,\n      limit: undefined,\n      valueProperty: 'id',\n      textProperty: 'text',\n      openIn: 'page',\n      // or 'popup' or 'dropdown'\n      pageBackLinkText: 'Back',\n      popupCloseLinkText: 'Close',\n      pageTitle: undefined,\n      searchbarPlaceholder: 'Search...',\n      searchbarDisableText: 'Cancel',\n      searchbarDisableButton: undefined,\n      searchbarSpellcheck: false,\n      popupPush: false,\n      popupSwipeToClose: undefined,\n      animate: true,\n      autoFocus: false,\n      closeOnSelect: false,\n      notFoundText: 'Nothing found',\n      requestSourceOnOpen: false,\n      // Preloader\n      preloaderColor: undefined,\n      preloader: false,\n      // Colors\n      formColorTheme: undefined,\n      navbarColorTheme: undefined,\n      // Routing\n      routableModals: true,\n      url: 'select/',\n      // Custom render functions\n      renderDropdown: undefined,\n      renderPage: undefined,\n      renderPopup: undefined,\n      renderItem: undefined,\n      renderSearchbar: undefined,\n      renderNavbar: undefined\n    }\n  },\n  static: {\n    Autocomplete: autocomplete_class\n  },\n  create: function create() {\n    var app = this;\n    app.autocomplete = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: undefined,\n      constructor: autocomplete_class,\n      app: app,\n      domProp: 'f7Autocomplete'\n    }), {\n      open: function open(autocompleteEl) {\n        var ac = app.autocomplete.get(autocompleteEl);\n        if (ac && ac.open) return ac.open();\n        return undefined;\n      },\n      close: function close(autocompleteEl) {\n        var ac = app.autocomplete.get(autocompleteEl);\n        if (ac && ac.close) return ac.close();\n        return undefined;\n      }\n    });\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/tooltip/tooltip-class.js\n\n\n\n\n\nfunction tooltip_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, tooltip_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction tooltip_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (tooltip_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar tooltip_class_Tooltip = /*#__PURE__*/function (_Framework7Class) {\n  function Tooltip(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Tooltip);\n    _this = tooltip_class_callSuper(this, Tooltip, [params, [app]]);\n    var tooltip = _this;\n    var defaults = utils[\"default\"].extend({}, app.params.tooltip);\n\n    // Extend defaults with modules params\n    tooltip.useModulesParams(defaults);\n    tooltip.params = utils[\"default\"].extend(defaults, params);\n    if (typeof params.offset === 'undefined' && utils_support[\"default\"].touch && tooltip.params.trigger === 'hover') {\n      tooltip.params.offset = 10;\n    }\n    var targetEl = tooltip.params.targetEl;\n    if (!targetEl) return possibleConstructorReturn_default()(_this, tooltip);\n    var $targetEl = Object(dom7_module[\"default\"])(targetEl);\n    if ($targetEl.length === 0) return possibleConstructorReturn_default()(_this, tooltip);\n    if ($targetEl[0].f7Tooltip) return possibleConstructorReturn_default()(_this, $targetEl[0].f7Tooltip);\n    var $el = Object(dom7_module[\"default\"])(tooltip.render()).eq(0);\n    utils[\"default\"].extend(tooltip, {\n      app: app,\n      $targetEl: $targetEl,\n      targetEl: $targetEl && $targetEl[0],\n      $el: $el,\n      el: $el && $el[0],\n      text: tooltip.params.text || '',\n      visible: false,\n      opened: false\n    });\n    $targetEl[0].f7Tooltip = tooltip;\n    var touchesStart = {};\n    var isTouched;\n    function handleClick() {\n      if (tooltip.opened) tooltip.hide();else tooltip.show(this);\n    }\n    function handleClickOut(e) {\n      if (tooltip.opened && (Object(dom7_module[\"default\"])(e.target).closest($targetEl).length || Object(dom7_module[\"default\"])(e.target).closest(tooltip.$el).length)) return;\n      tooltip.hide();\n    }\n    function handleTouchStart(e) {\n      if (isTouched) return;\n      isTouched = true;\n      touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      tooltip.show(this);\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      var y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      var distance = Math.pow(Math.pow(x - touchesStart.x, 2) + Math.pow(y - touchesStart.y, 2), 0.5);\n      if (distance > 50) {\n        isTouched = false;\n        tooltip.hide();\n      }\n    }\n    function handleTouchEnd() {\n      if (!isTouched) return;\n      isTouched = false;\n      tooltip.hide();\n    }\n    function handleMouseEnter() {\n      tooltip.show(this);\n    }\n    function handleMouseLeave() {\n      tooltip.hide();\n    }\n    function handleTransitionEnd() {\n      if (!$el.hasClass('tooltip-in')) {\n        $el.removeClass('tooltip-out').remove();\n      }\n    }\n    tooltip.attachEvents = function attachEvents() {\n      $el.on('transitionend', handleTransitionEnd);\n      if (tooltip.params.trigger === 'click') {\n        $targetEl.on('click', handleClick);\n        Object(dom7_module[\"default\"])('html').on('click', handleClickOut);\n        return;\n      }\n      if (utils_support[\"default\"].touch) {\n        var passive = utils_support[\"default\"].passiveListener ? {\n          passive: true\n        } : false;\n        $targetEl.on(app.touchEvents.start, handleTouchStart, passive);\n        app.on('touchmove', handleTouchMove);\n        app.on('touchend:passive', handleTouchEnd);\n      } else {\n        $targetEl.on(utils_support[\"default\"].pointerEvents ? 'pointerenter' : 'mouseenter', handleMouseEnter);\n        $targetEl.on(utils_support[\"default\"].pointerEvents ? 'pointerleave' : 'mouseleave', handleMouseLeave);\n      }\n    };\n    tooltip.detachEvents = function detachEvents() {\n      $el.off('transitionend', handleTransitionEnd);\n      if (tooltip.params.trigger === 'click') {\n        $targetEl.off('click', handleClick);\n        Object(dom7_module[\"default\"])('html').off('click', handleClickOut);\n        return;\n      }\n      if (utils_support[\"default\"].touch) {\n        var passive = utils_support[\"default\"].passiveListener ? {\n          passive: true\n        } : false;\n        $targetEl.off(app.touchEvents.start, handleTouchStart, passive);\n        app.off('touchmove', handleTouchMove);\n        app.off('touchend:passive', handleTouchEnd);\n      } else {\n        $targetEl.off(utils_support[\"default\"].pointerEvents ? 'pointerenter' : 'mouseenter', handleMouseEnter);\n        $targetEl.off(utils_support[\"default\"].pointerEvents ? 'pointerleave' : 'mouseleave', handleMouseLeave);\n      }\n    };\n\n    // Install Modules\n    tooltip.useModules();\n    tooltip.init();\n    return possibleConstructorReturn_default()(_this, tooltip);\n  }\n  inherits_default()(Tooltip, _Framework7Class);\n  return createClass_default()(Tooltip, [{\n    key: \"position\",\n    value: function position(targetEl) {\n      var tooltip = this;\n      var $el = tooltip.$el,\n        app = tooltip.app;\n      var tooltipOffset = tooltip.params.offset || 0;\n      $el.css({\n        left: '',\n        top: ''\n      });\n      var $targetEl = Object(dom7_module[\"default\"])(targetEl || tooltip.targetEl);\n      var _ref = [$el.width(), $el.height()],\n        width = _ref[0],\n        height = _ref[1];\n      $el.css({\n        left: '',\n        top: ''\n      });\n      var targetWidth;\n      var targetHeight;\n      var targetOffsetLeft;\n      var targetOffsetTop;\n      if ($targetEl && $targetEl.length > 0) {\n        targetWidth = $targetEl.outerWidth();\n        targetHeight = $targetEl.outerHeight();\n        if (typeof targetWidth === 'undefined' && typeof targetHeight === 'undefined') {\n          var clientRect = $targetEl[0].getBoundingClientRect();\n          targetWidth = clientRect.width;\n          targetHeight = clientRect.height;\n        }\n        var targetOffset = $targetEl.offset();\n        targetOffsetLeft = targetOffset.left - app.left;\n        targetOffsetTop = targetOffset.top - app.top;\n        var targetParentPage = $targetEl.parents('.page');\n        if (targetParentPage.length > 0) {\n          targetOffsetTop -= targetParentPage[0].scrollTop;\n        }\n      }\n      var _ref2 = [0, 0, 0],\n        left = _ref2[0],\n        top = _ref2[1];\n\n      // Top Position\n      var position = 'top';\n      if (height + tooltipOffset < targetOffsetTop) {\n        // On top\n        top = targetOffsetTop - height - tooltipOffset;\n      } else if (height < app.height - targetOffsetTop - targetHeight) {\n        // On bottom\n        position = 'bottom';\n        top = targetOffsetTop + targetHeight + tooltipOffset;\n      } else {\n        // On middle\n        position = 'middle';\n        top = targetHeight / 2 + targetOffsetTop - height / 2;\n        if (top <= 0) {\n          top = 8;\n        } else if (top + height >= app.height) {\n          top = app.height - height - 8;\n        }\n      }\n\n      // Horizontal Position\n      if (position === 'top' || position === 'bottom') {\n        left = targetWidth / 2 + targetOffsetLeft - width / 2;\n        if (left < 8) left = 8;\n        if (left + width > app.width) left = app.width - width - 8;\n        if (left < 0) left = 0;\n      } else if (position === 'middle') {\n        left = targetOffsetLeft - width;\n        if (left < 8 || left + width > app.width) {\n          if (left < 8) left = targetOffsetLeft + targetWidth;\n          if (left + width > app.width) left = app.width - width - 8;\n        }\n      }\n\n      // Apply Styles\n      $el.css({\n        top: \"\".concat(top, \"px\"),\n        left: \"\".concat(left, \"px\")\n      });\n    }\n  }, {\n    key: \"show\",\n    value: function show(aroundEl) {\n      var tooltip = this;\n      var app = tooltip.app,\n        $el = tooltip.$el,\n        $targetEl = tooltip.$targetEl;\n      app.root.append($el);\n      tooltip.position(aroundEl);\n      var $aroundEl = Object(dom7_module[\"default\"])(aroundEl);\n      tooltip.visible = true;\n      tooltip.opened = true;\n      $targetEl.trigger('tooltip:show');\n      $el.trigger('tooltip:show');\n      if ($aroundEl.length && $aroundEl[0] !== $targetEl[0]) {\n        $aroundEl.trigger('tooltip:show');\n      }\n      tooltip.emit('local::show tooltipShow', tooltip);\n      $el.removeClass('tooltip-out').addClass('tooltip-in');\n      return tooltip;\n    }\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      var tooltip = this;\n      var $el = tooltip.$el,\n        $targetEl = tooltip.$targetEl;\n      tooltip.visible = false;\n      tooltip.opened = false;\n      $targetEl.trigger('tooltip:hide');\n      $el.trigger('tooltip:hide');\n      tooltip.emit('local::hide tooltipHide', tooltip);\n      $el.addClass('tooltip-out').removeClass('tooltip-in');\n      return tooltip;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var tooltip = this;\n      if (tooltip.params.render) return tooltip.params.render.call(tooltip, tooltip);\n      var _tooltip$params = tooltip.params,\n        cssClass = _tooltip$params.cssClass,\n        text = _tooltip$params.text;\n      return \"\\n      <div class=\\\"tooltip \".concat(cssClass || '', \"\\\">\\n        <div class=\\\"tooltip-content\\\">\").concat(text || '', \"</div>\\n      </div>\\n    \").trim();\n    }\n  }, {\n    key: \"setText\",\n    value: function setText(newText) {\n      var tooltip = this;\n      if (typeof newText === 'undefined') {\n        return tooltip;\n      }\n      tooltip.params.text = newText;\n      tooltip.text = newText;\n      if (tooltip.$el) {\n        tooltip.$el.children('.tooltip-content').html(newText);\n      }\n      if (tooltip.opened) {\n        tooltip.position();\n      }\n      return tooltip;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var tooltip = this;\n      tooltip.attachEvents();\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var tooltip = this;\n      if (!tooltip.$targetEl || tooltip.destroyed) return;\n      tooltip.$targetEl.trigger('tooltip:beforedestroy');\n      tooltip.emit('local::beforeDestroy tooltipBeforeDestroy', tooltip);\n      tooltip.$el.remove();\n      delete tooltip.$targetEl[0].f7Tooltip;\n      tooltip.detachEvents();\n      utils[\"default\"].deleteProps(tooltip);\n      tooltip.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var tooltip_class = (tooltip_class_Tooltip);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/tooltip/tooltip.js\n\n\n\n/* harmony default export */ var tooltip_tooltip = ({\n  name: 'tooltip',\n  static: {\n    Tooltip: tooltip_class\n  },\n  create: function create() {\n    var app = this;\n    app.tooltip = constructor_methods({\n      defaultSelector: '.tooltip',\n      constructor: tooltip_class,\n      app: app,\n      domProp: 'f7Tooltip'\n    });\n    app.tooltip.show = function show(el) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return undefined;\n      var tooltip = $el[0].f7Tooltip;\n      if (!tooltip) return undefined;\n      tooltip.show($el[0]);\n      return tooltip;\n    };\n    app.tooltip.hide = function hide(el) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return undefined;\n      var tooltip = $el[0].f7Tooltip;\n      if (!tooltip) return undefined;\n      tooltip.hide();\n      return tooltip;\n    };\n    app.tooltip.setText = function text(el, newText) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return undefined;\n      var tooltip = $el[0].f7Tooltip;\n      if (!tooltip) return undefined;\n      tooltip.setText(newText);\n      return tooltip;\n    };\n  },\n  params: {\n    tooltip: {\n      targetEl: null,\n      text: null,\n      cssClass: null,\n      render: null,\n      offset: 0,\n      trigger: 'hover'\n    }\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.tooltip-init').each(function (index, el) {\n        var text = Object(dom7_module[\"default\"])(el).attr('data-tooltip');\n        if (!text) return;\n        app.tooltip.create({\n          targetEl: el,\n          text: text\n        });\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.tooltip-init').each(function (index, el) {\n        if (el.f7Tooltip) el.f7Tooltip.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.tooltip-init').each(function (index, el) {\n        var text = Object(dom7_module[\"default\"])(el).attr('data-tooltip');\n        if (!text) return;\n        app.tooltip.create({\n          targetEl: el,\n          text: text\n        });\n      });\n      if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {\n        page.$navbarEl.find('.tooltip-init').each(function (index, el) {\n          var text = Object(dom7_module[\"default\"])(el).attr('data-tooltip');\n          if (!text) return;\n          app.tooltip.create({\n            targetEl: el,\n            text: text\n          });\n        });\n      }\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      var app = this;\n      page.$el.find('.tooltip-init').each(function (index, el) {\n        if (el.f7Tooltip) el.f7Tooltip.destroy();\n      });\n      if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {\n        page.$navbarEl.find('.tooltip-init').each(function (index, el) {\n          if (el.f7Tooltip) el.f7Tooltip.destroy();\n        });\n      }\n    }\n  },\n  vnode: {\n    'tooltip-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var el = vnode.elm;\n        var text = Object(dom7_module[\"default\"])(el).attr('data-tooltip');\n        if (!text) return;\n        app.tooltip.create({\n          targetEl: el,\n          text: text\n        });\n      },\n      update: function update(vnode) {\n        var el = vnode.elm;\n        if (!el.f7Tooltip) return;\n        if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['data-tooltip']) {\n          el.f7Tooltip.setText(vnode.data.attrs['data-tooltip']);\n        }\n      },\n      destroy: function destroy(vnode) {\n        var el = vnode.elm;\n        if (el.f7Tooltip) el.f7Tooltip.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/gauge/gauge-class.js\n\n\n\n\n\nfunction gauge_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, gauge_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction gauge_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (gauge_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint no-nested-ternary: off */\n\n\n\nvar gauge_class_Gauge = /*#__PURE__*/function (_Framework7Class) {\n  function Gauge(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Gauge);\n    // Extends with open/close Modal methods;\n    _this = gauge_class_callSuper(this, Gauge, [params, [app]]);\n    var gauge = _this;\n    var defaults = utils[\"default\"].extend({}, app.params.gauge);\n\n    // Extend defaults with modules params\n    gauge.useModulesParams(defaults);\n    gauge.params = utils[\"default\"].extend(defaults, params);\n    var el = gauge.params.el;\n    if (!el) return possibleConstructorReturn_default()(_this, gauge);\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, gauge);\n    if ($el[0].f7Gauge) return possibleConstructorReturn_default()(_this, $el[0].f7Gauge);\n    utils[\"default\"].extend(gauge, {\n      app: app,\n      $el: $el,\n      el: $el && $el[0]\n    });\n    $el[0].f7Gauge = gauge;\n\n    // Install Modules\n    gauge.useModules();\n    gauge.init();\n    return possibleConstructorReturn_default()(_this, gauge);\n  }\n  inherits_default()(Gauge, _Framework7Class);\n  return createClass_default()(Gauge, [{\n    key: \"calcRadius\",\n    value: function calcRadius() {\n      var gauge = this;\n      var _gauge$params = gauge.params,\n        size = _gauge$params.size,\n        borderWidth = _gauge$params.borderWidth;\n      return size / 2 - borderWidth / 2;\n    }\n  }, {\n    key: \"calcBorderLength\",\n    value: function calcBorderLength() {\n      var gauge = this;\n      var radius = gauge.calcRadius();\n      return 2 * Math.PI * radius;\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var gauge = this;\n      if (gauge.params.render) return gauge.params.render.call(gauge, gauge);\n      var _gauge$params2 = gauge.params,\n        type = _gauge$params2.type,\n        value = _gauge$params2.value,\n        size = _gauge$params2.size,\n        bgColor = _gauge$params2.bgColor,\n        borderBgColor = _gauge$params2.borderBgColor,\n        borderColor = _gauge$params2.borderColor,\n        borderWidth = _gauge$params2.borderWidth,\n        valueText = _gauge$params2.valueText,\n        valueTextColor = _gauge$params2.valueTextColor,\n        valueFontSize = _gauge$params2.valueFontSize,\n        valueFontWeight = _gauge$params2.valueFontWeight,\n        labelText = _gauge$params2.labelText,\n        labelTextColor = _gauge$params2.labelTextColor,\n        labelFontSize = _gauge$params2.labelFontSize,\n        labelFontWeight = _gauge$params2.labelFontWeight;\n      var semiCircle = type === 'semicircle';\n      var radius = gauge.calcRadius();\n      var length = gauge.calcBorderLength();\n      var progress = Math.max(Math.min(value, 1), 0);\n      return \"\\n      <svg class=\\\"gauge-svg\\\" width=\\\"\".concat(size, \"px\\\" height=\\\"\").concat(semiCircle ? size / 2 : size, \"px\\\" viewBox=\\\"0 0 \").concat(size, \" \").concat(semiCircle ? size / 2 : size, \"\\\">\\n        \").concat(semiCircle ? \"\\n          <path\\n            class=\\\"gauge-back-semi\\\"\\n            d=\\\"M\".concat(size - borderWidth / 2, \",\").concat(size / 2, \" a1,1 0 0,0 -\").concat(size - borderWidth, \",0\\\"\\n            stroke=\\\"\").concat(borderBgColor, \"\\\"\\n            stroke-width=\\\"\").concat(borderWidth, \"\\\"\\n            fill=\\\"\").concat(bgColor || 'none', \"\\\"\\n          />\\n          <path\\n            class=\\\"gauge-front-semi\\\"\\n            d=\\\"M\").concat(size - borderWidth / 2, \",\").concat(size / 2, \" a1,1 0 0,0 -\").concat(size - borderWidth, \",0\\\"\\n            stroke=\\\"\").concat(borderColor, \"\\\"\\n            stroke-width=\\\"\").concat(borderWidth, \"\\\"\\n            stroke-dasharray=\\\"\").concat(length / 2, \"\\\"\\n            stroke-dashoffset=\\\"\").concat(length / 2 * (1 + progress), \"\\\"\\n            fill=\\\"\").concat(borderBgColor ? 'none' : bgColor || 'none', \"\\\"\\n          />\\n        \") : \"\\n          \".concat(borderBgColor ? \"\\n            <circle\\n              class=\\\"gauge-back-circle\\\"\\n              stroke=\\\"\".concat(borderBgColor, \"\\\"\\n              stroke-width=\\\"\").concat(borderWidth, \"\\\"\\n              fill=\\\"\").concat(bgColor || 'none', \"\\\"\\n              cx=\\\"\").concat(size / 2, \"\\\"\\n              cy=\\\"\").concat(size / 2, \"\\\"\\n              r=\\\"\").concat(radius, \"\\\"\\n            ></circle>\\n          \") : '', \"\\n          <circle\\n            class=\\\"gauge-front-circle\\\"\\n            transform=\\\"\", \"rotate(-90 \".concat(size / 2, \" \").concat(size / 2, \")\"), \"\\\"\\n            stroke=\\\"\").concat(borderColor, \"\\\"\\n            stroke-width=\\\"\").concat(borderWidth, \"\\\"\\n            stroke-dasharray=\\\"\").concat(length, \"\\\"\\n            stroke-dashoffset=\\\"\").concat(length * (1 - progress), \"\\\"\\n            fill=\\\"\").concat(borderBgColor ? 'none' : bgColor || 'none', \"\\\"\\n            cx=\\\"\").concat(size / 2, \"\\\"\\n            cy=\\\"\").concat(size / 2, \"\\\"\\n            r=\\\"\").concat(radius, \"\\\"\\n          ></circle>\\n        \"), \"\\n        \").concat(valueText ? \"\\n          <text\\n            class=\\\"gauge-value-text\\\"\\n            x=\\\"50%\\\"\\n            y=\\\"\".concat(semiCircle ? '100%' : '50%', \"\\\"\\n            font-weight=\\\"\").concat(valueFontWeight, \"\\\"\\n            font-size=\\\"\").concat(valueFontSize, \"\\\"\\n            fill=\\\"\").concat(valueTextColor, \"\\\"\\n            dy=\\\"\").concat(semiCircle ? labelText ? -labelFontSize - 15 : -5 : 0, \"\\\"\\n            text-anchor=\\\"middle\\\"\\n            dominant-baseline=\\\"\").concat(!semiCircle && 'middle', \"\\\"\\n          >\").concat(valueText, \"</text>\\n        \") : '', \"\\n        \").concat(labelText ? \"\\n          <text\\n            class=\\\"gauge-label-text\\\"\\n            x=\\\"50%\\\"\\n            y=\\\"\".concat(semiCircle ? '100%' : '50%', \"\\\"\\n            font-weight=\\\"\").concat(labelFontWeight, \"\\\"\\n            font-size=\\\"\").concat(labelFontSize, \"\\\"\\n            fill=\\\"\").concat(labelTextColor, \"\\\"\\n            dy=\\\"\").concat(semiCircle ? -5 : valueText ? valueFontSize / 2 + 10 : 0, \"\\\"\\n            text-anchor=\\\"middle\\\"\\n            dominant-baseline=\\\"\").concat(!semiCircle && 'middle', \"\\\"\\n          >\").concat(labelText, \"</text>\\n        \") : '', \"\\n      </svg>\\n    \").trim();\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var newParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var gauge = this;\n      var params = gauge.params,\n        $gaugeSvgEl = gauge.$gaugeSvgEl;\n      Object.keys(newParams).forEach(function (param) {\n        if (typeof newParams[param] !== 'undefined') {\n          params[param] = newParams[param];\n        }\n      });\n      if ($gaugeSvgEl.length === 0) return gauge;\n      var value = params.value,\n        size = params.size,\n        bgColor = params.bgColor,\n        borderBgColor = params.borderBgColor,\n        borderColor = params.borderColor,\n        borderWidth = params.borderWidth,\n        valueText = params.valueText,\n        valueTextColor = params.valueTextColor,\n        valueFontSize = params.valueFontSize,\n        valueFontWeight = params.valueFontWeight,\n        labelText = params.labelText,\n        labelTextColor = params.labelTextColor,\n        labelFontSize = params.labelFontSize,\n        labelFontWeight = params.labelFontWeight;\n      var length = gauge.calcBorderLength();\n      var progress = Math.max(Math.min(value, 1), 0);\n      var radius = gauge.calcRadius();\n      var semiCircle = params.type === 'semicircle';\n      var svgAttrs = {\n        width: \"\".concat(size, \"px\"),\n        height: \"\".concat(semiCircle ? size / 2 : size, \"px\"),\n        viewBox: \"0 0 \".concat(size, \" \").concat(semiCircle ? size / 2 : size)\n      };\n      Object.keys(svgAttrs).forEach(function (attr) {\n        $gaugeSvgEl.attr(attr, svgAttrs[attr]);\n      });\n      if (semiCircle) {\n        var backAttrs = {\n          d: \"M\".concat(size - borderWidth / 2, \",\").concat(size / 2, \" a1,1 0 0,0 -\").concat(size - borderWidth, \",0\"),\n          stroke: borderBgColor,\n          'stroke-width': borderWidth,\n          fill: bgColor || 'none'\n        };\n        var frontAttrs = {\n          d: \"M\".concat(size - borderWidth / 2, \",\").concat(size / 2, \" a1,1 0 0,0 -\").concat(size - borderWidth, \",0\"),\n          stroke: borderColor,\n          'stroke-width': borderWidth,\n          'stroke-dasharray': length / 2,\n          'stroke-dashoffset': length / 2 * (1 + progress),\n          fill: borderBgColor ? 'none' : bgColor || 'none'\n        };\n        Object.keys(backAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-back-semi').attr(attr, backAttrs[attr]);\n        });\n        Object.keys(frontAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-front-semi').attr(attr, frontAttrs[attr]);\n        });\n      } else {\n        var _backAttrs = {\n          stroke: borderBgColor,\n          'stroke-width': borderWidth,\n          fill: bgColor || 'none',\n          cx: size / 2,\n          cy: size / 2,\n          r: radius\n        };\n        var _frontAttrs = {\n          transform: \"rotate(-90 \".concat(size / 2, \" \").concat(size / 2, \")\"),\n          stroke: borderColor,\n          'stroke-width': borderWidth,\n          'stroke-dasharray': length,\n          'stroke-dashoffset': length * (1 - progress),\n          fill: borderBgColor ? 'none' : bgColor || 'none',\n          cx: size / 2,\n          cy: size / 2,\n          r: radius\n        };\n        Object.keys(_backAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-back-circle').attr(attr, _backAttrs[attr]);\n        });\n        Object.keys(_frontAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-front-circle').attr(attr, _frontAttrs[attr]);\n        });\n      }\n      if (valueText) {\n        if (!$gaugeSvgEl.find('.gauge-value-text').length) {\n          var textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n          textEl.classList.add('gauge-value-text');\n          $gaugeSvgEl.append(textEl);\n        }\n        var textAttrs = {\n          x: '50%',\n          y: semiCircle ? '100%' : '50%',\n          'font-weight': valueFontWeight,\n          'font-size': valueFontSize,\n          fill: valueTextColor,\n          dy: semiCircle ? labelText ? -labelFontSize - 15 : -5 : 0,\n          'text-anchor': 'middle',\n          'dominant-baseline': !semiCircle && 'middle'\n        };\n        Object.keys(textAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-value-text').attr(attr, textAttrs[attr]);\n        });\n        $gaugeSvgEl.find('.gauge-value-text').text(valueText);\n      } else {\n        $gaugeSvgEl.find('.gauge-value-text').remove();\n      }\n      if (labelText) {\n        if (!$gaugeSvgEl.find('.gauge-label-text').length) {\n          var _textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n          _textEl.classList.add('gauge-label-text');\n          $gaugeSvgEl.append(_textEl);\n        }\n        var labelAttrs = {\n          x: '50%',\n          y: semiCircle ? '100%' : '50%',\n          'font-weight': labelFontWeight,\n          'font-size': labelFontSize,\n          fill: labelTextColor,\n          dy: semiCircle ? -5 : valueText ? valueFontSize / 2 + 10 : 0,\n          'text-anchor': 'middle',\n          'dominant-baseline': !semiCircle && 'middle'\n        };\n        Object.keys(labelAttrs).forEach(function (attr) {\n          $gaugeSvgEl.find('.gauge-label-text').attr(attr, labelAttrs[attr]);\n        });\n        $gaugeSvgEl.find('.gauge-label-text').text(labelText);\n      } else {\n        $gaugeSvgEl.find('.gauge-label-text').remove();\n      }\n      return gauge;\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var gauge = this;\n      var $gaugeSvgEl = Object(dom7_module[\"default\"])(gauge.render()).eq(0);\n      $gaugeSvgEl.f7Gauge = gauge;\n      utils[\"default\"].extend(gauge, {\n        $gaugeSvgEl: $gaugeSvgEl,\n        gaugeSvgEl: $gaugeSvgEl && $gaugeSvgEl[0]\n      });\n      gauge.$el.append($gaugeSvgEl);\n      return gauge;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var gauge = this;\n      if (!gauge.$el || gauge.destroyed) return;\n      gauge.$el.trigger('gauge:beforedestroy');\n      gauge.emit('local::beforeDestroy gaugeBeforeDestroy', gauge);\n      gauge.$gaugeSvgEl.remove();\n      delete gauge.$el[0].f7Gauge;\n      utils[\"default\"].deleteProps(gauge);\n      gauge.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var gauge_class = (gauge_class_Gauge);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/gauge/gauge.js\n\n\n\n\n/* harmony default export */ var gauge_gauge = ({\n  name: 'gauge',\n  static: {\n    Gauge: gauge_class\n  },\n  create: function create() {\n    var app = this;\n    app.gauge = constructor_methods({\n      defaultSelector: '.gauge',\n      constructor: gauge_class,\n      app: app,\n      domProp: 'f7Gauge'\n    });\n    app.gauge.update = function update(el, newParams) {\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return undefined;\n      var gauge = app.gauge.get(el);\n      if (!gauge) return undefined;\n      gauge.update(newParams);\n      return gauge;\n    };\n  },\n  params: {\n    gauge: {\n      el: null,\n      type: 'circle',\n      value: 0,\n      size: 200,\n      bgColor: 'transparent',\n      borderBgColor: '#eeeeee',\n      borderColor: '#000000',\n      borderWidth: 10,\n      valueText: null,\n      valueTextColor: '#000000',\n      valueFontSize: 31,\n      valueFontWeight: 500,\n      labelText: null,\n      labelTextColor: '#888888',\n      labelFontSize: 14,\n      labelFontWeight: 400\n    }\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.gauge-init').each(function (index, el) {\n        app.gauge.create(utils[\"default\"].extend({\n          el: el\n        }, Object(dom7_module[\"default\"])(el).dataset() || {}));\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.gauge-init').each(function (index, el) {\n        if (el.f7Gauge) el.f7Gauge.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.gauge-init').each(function (index, el) {\n        app.gauge.create(utils[\"default\"].extend({\n          el: el\n        }, Object(dom7_module[\"default\"])(el).dataset() || {}));\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.gauge-init').each(function (index, el) {\n        if (el.f7Gauge) el.f7Gauge.destroy();\n      });\n    }\n  },\n  vnode: {\n    'gauge-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var el = vnode.elm;\n        app.gauge.create(utils[\"default\"].extend({\n          el: el\n        }, Object(dom7_module[\"default\"])(el).dataset() || {}));\n      },\n      destroy: function destroy(vnode) {\n        var el = vnode.elm;\n        if (el.f7Gauge) el.f7Gauge.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/skeleton/skeleton.js\n/* harmony default export */ var skeleton = ({\n  name: 'skeleton'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/menu/menu.js\n\nvar Menu = {\n  open: function open() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.menu-item-dropdown';\n    var app = this;\n    if (!el) return;\n    var $el = Object(dom7_module[\"default\"])(el).closest('.menu-item-dropdown');\n    if (!$el.length) return;\n    var $menuEl = $el.closest('.menu').eq(0);\n    if ($menuEl.length) {\n      var zIndex = $menuEl.css('z-index');\n      var originalZIndex = $menuEl[0].style.zIndex;\n      $menuEl.css('z-index', parseInt(zIndex || 0, 0) + 1);\n      $menuEl[0].f7MenuZIndex = originalZIndex;\n    }\n    $el.eq(0).addClass('menu-item-dropdown-opened').trigger('menu:opened');\n    app.emit('menuOpened', $el.eq(0)[0]);\n  },\n  close: function close() {\n    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.menu-item-dropdown-opened';\n    var app = this;\n    if (!el) return;\n    var $el = Object(dom7_module[\"default\"])(el).closest('.menu-item-dropdown-opened');\n    if (!$el.length) return;\n    var $menuEl = $el.closest('.menu').eq(0);\n    if ($menuEl.length) {\n      var zIndex = $menuEl[0].f7MenuZIndex;\n      $menuEl.css('z-index', zIndex);\n      delete $menuEl[0].f7MenuZIndex;\n    }\n    $el.eq(0).removeClass('menu-item-dropdown-opened').trigger('menu:closed');\n    app.emit('menuClosed', $el.eq(0)[0]);\n  }\n};\n/* harmony default export */ var menu_menu = ({\n  name: 'menu',\n  create: function create() {\n    var app = this;\n    app.menu = {\n      open: Menu.open.bind(app),\n      close: Menu.close.bind(app)\n    };\n  },\n  on: {\n    click: function click(e) {\n      var app = this;\n      var openedMenus = Object(dom7_module[\"default\"])('.menu-item-dropdown-opened');\n      if (!openedMenus.length) return;\n      openedMenus.each(function (index, el) {\n        if (!Object(dom7_module[\"default\"])(e.target).closest('.menu-item-dropdown-opened').length) {\n          app.menu.close(el);\n        }\n      });\n    }\n  },\n  clicks: {\n    '.menu-item-dropdown': function onClick($clickedEl, dataset, e) {\n      var app = this;\n      if ($clickedEl.hasClass('menu-item-dropdown-opened')) {\n        if (Object(dom7_module[\"default\"])(e.target).closest('.menu-dropdown').length) return;\n        app.menu.close($clickedEl);\n      } else {\n        app.menu.open($clickedEl);\n      }\n    },\n    '.menu-close': function onClick() {\n      var app = this;\n      app.menu.close();\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/alpha-slider.js\n/* harmony default export */ var alpha_slider = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      sliderLabel = _self$params.sliderLabel,\n      sliderValue = _self$params.sliderValue,\n      sliderValueEditable = _self$params.sliderValueEditable,\n      alphaLabelText = _self$params.alphaLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-alpha-slider\\\">\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \".concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(alphaLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-alpha\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.01\\\" min=\\\"0\\\" max=\\\"1\\\" class=\\\"color-picker-value-alpha\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-alpha\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.alphaRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-alpha'),\n      min: 0,\n      max: 1,\n      step: 0.01,\n      value: 1,\n      on: {\n        change: function change(range, value) {\n          var alpha = Math.floor(value * 100) / 100;\n          self.setValue({\n            alpha: alpha\n          });\n        }\n      }\n    });\n    function handleInputChange(e) {\n      var alpha = self.value.alpha;\n      var value = parseFloat(e.target.value);\n      if (Number.isNaN(value)) {\n        e.target.value = alpha;\n        return;\n      }\n      value = Math.max(0, Math.min(1, value));\n      self.setValue({\n        alpha: value\n      });\n    }\n    self.$el.on('change', '.color-picker-module-alpha-slider input', handleInputChange);\n    self.destroyAlphaSliderEvents = function destroyAlphaSliderEvents() {\n      self.$el.off('change', '.color-picker-module-alpha-slider input', handleInputChange);\n    };\n  },\n  update: function update(self) {\n    var value = self.value;\n    var _self$params2 = self.params,\n      sliderValue = _self$params2.sliderValue,\n      sliderValueEditable = _self$params2.sliderValueEditable;\n    var alpha = value.alpha;\n    self.alphaRangeSlider.value = alpha;\n    self.alphaRangeSlider.layout();\n    if (sliderValue && sliderValueEditable) {\n      self.$el.find('input.color-picker-value-alpha').val(alpha);\n    } else {\n      self.$el.find('span.color-picker-value-alpha').text(alpha);\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.alphaRangeSlider && self.alphaRangeSlider.destroy) {\n      self.alphaRangeSlider.destroy();\n    }\n    delete self.alphaRangeSlider;\n    if (self.destroyAlphaSliderEvents) self.destroyAlphaSliderEvents();\n    delete self.destroyAlphaSliderEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/current-color.js\n/* harmony default export */ var current_color = ({\n  render: function render() {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-current-color\\\">\\n        <div class=\\\"color-picker-current-color\\\"></div>\\n      </div>\\n    \";\n  },\n  update: function update(self) {\n    self.$el.find('.color-picker-module-current-color .color-picker-current-color').css('background-color', self.value.hex);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/hex.js\n/* harmony default export */ var modules_hex = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      hexLabel = _self$params.hexLabel,\n      hexLabelText = _self$params.hexLabelText,\n      hexValueEditable = _self$params.hexValueEditable;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-hex\\\">\\n        <div class=\\\"color-picker-hex-wrap\\\">\\n          \".concat(hexLabel ? \"\\n            <div class=\\\"color-picker-hex-label\\\">\".concat(hexLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"color-picker-hex-value\\\">\\n            \").concat(hexValueEditable ? \"\\n              <input type=\\\"text\\\" class=\\\"color-picker-value-hex\\\">\\n            \" : \"\\n              <span class=\\\"color-picker-value-hex\\\"></span>\\n            \", \"\\n          </div>\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    function handleInputChange(e) {\n      var hex = self.value.hex;\n      var value = e.target.value.replace(/#/g, '');\n      if (Number.isNaN(value) || !value || value.length !== 3 && value.length !== 6) {\n        e.target.value = hex;\n        return;\n      }\n      var min = 0;\n      var current = parseInt(value, 16);\n      var max = parseInt('ffffff', 16); // eslint-disable-line\n      if (current > max) {\n        value = 'fff';\n      }\n      if (current < min) {\n        value = '000';\n      }\n      self.setValue({\n        hex: value\n      });\n    }\n    self.$el.on('change', '.color-picker-module-hex input', handleInputChange);\n    self.destroyHexEvents = function destroyHexEvents() {\n      self.$el.off('change', '.color-picker-module-hex input', handleInputChange);\n    };\n  },\n  update: function update(self) {\n    var value = self.value;\n    var hexValueEditable = self.params.hexValueEditable;\n    var hex = value.hex;\n    if (hexValueEditable) {\n      self.$el.find('input.color-picker-value-hex').val(hex);\n    } else {\n      self.$el.find('span.color-picker-value-hex').text(hex);\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.destroyHexEvents) self.destroyHexEvents();\n    delete self.destroyHexEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/hsb-sliders.js\n\n\n\n/* harmony default export */ var hsb_sliders = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      sliderLabel = _self$params.sliderLabel,\n      sliderValue = _self$params.sliderValue,\n      sliderValueEditable = _self$params.sliderValueEditable,\n      hueLabelText = _self$params.hueLabelText,\n      saturationLabelText = _self$params.saturationLabelText,\n      brightnessLabelText = _self$params.brightnessLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-hsb-sliders\\\">\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \".concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(hueLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-hue\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.1\\\" min=\\\"0\\\" max=\\\"360\\\" class=\\\"color-picker-value-hue\\\" data-color-index=\\\"0\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-hue\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \").concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(saturationLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-saturation\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.1\\\" min=\\\"0\\\" max=\\\"100\\\" class=\\\"color-picker-value-saturation\\\" data-color-index=\\\"1\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-saturation\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \").concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(brightnessLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-brightness\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.1\\\" min=\\\"0\\\" max=\\\"100\\\" class=\\\"color-picker-value-brightness\\\" data-color-index=\\\"2\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-brightness\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.hueRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-hue'),\n      min: 0,\n      max: 360,\n      step: 0.1,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            hue: value\n          });\n        }\n      }\n    });\n    self.saturationRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-saturation'),\n      min: 0,\n      max: 1,\n      step: 0.001,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          var s = Math.floor(value * 1000) / 1000;\n          self.setValue({\n            hsb: [self.value.hsb[0], s, self.value.hsb[2]]\n          });\n        }\n      }\n    });\n    self.brightnessRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-brightness'),\n      min: 0,\n      max: 1,\n      step: 0.001,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          var b = Math.floor(value * 1000) / 1000;\n          self.setValue({\n            hsb: [self.value.hsb[0], self.value.hsb[1], b]\n          });\n        }\n      }\n    });\n    function handleInputChange(e) {\n      var hsb = toConsumableArray_default()(self.value.hsb);\n      var index = parseInt(Object(dom7_module[\"default\"])(e.target).attr('data-color-index'), 10);\n      var value = parseFloat(e.target.value);\n      if (Number.isNaN(value)) {\n        e.target.value = hsb[index];\n        return;\n      }\n      if (index === 0) {\n        value = Math.max(0, Math.min(360, value));\n      } else {\n        value = Math.max(0, Math.min(100, value)) / 100;\n      }\n      hsb[index] = value;\n      self.setValue({\n        hsb: hsb\n      });\n    }\n    self.$el.on('change', '.color-picker-module-hsb-sliders input', handleInputChange);\n    self.destroyHsbSlidersEvents = function destroyHsbSlidersEvents() {\n      self.$el.off('change', '.color-picker-module-hsb-sliders input', handleInputChange);\n    };\n  },\n  update: function update(self) {\n    var app = self.app,\n      value = self.value;\n    var _self$params2 = self.params,\n      sliderValue = _self$params2.sliderValue,\n      sliderValueEditable = _self$params2.sliderValueEditable;\n    var hsb = value.hsb,\n      hue = value.hue;\n    self.hueRangeSlider.value = hue;\n    self.saturationRangeSlider.value = hsb[1];\n    self.brightnessRangeSlider.value = hsb[2];\n    self.hueRangeSlider.layout();\n    self.saturationRangeSlider.layout();\n    self.brightnessRangeSlider.layout();\n    var hslCurrent = utils[\"default\"].colorHsbToHsl(hsb[0], hsb[1], 1);\n    var hslLeft = utils[\"default\"].colorHsbToHsl(hsb[0], 0, 1);\n    var hslRight = utils[\"default\"].colorHsbToHsl(hsb[0], 1, 1);\n    var brightness = hsb[2];\n    self.hueRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"hsl(\".concat(hue, \", 100%, 50%)\"));\n    self.saturationRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"hsl(\".concat(hslCurrent[0], \", \").concat(hslCurrent[1] * 100, \"%, \").concat(hslCurrent[2] * 100, \"%)\"));\n    self.brightnessRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"rgb(\".concat(brightness * 255, \", \").concat(brightness * 255, \", \").concat(brightness * 255, \")\"));\n    self.saturationRangeSlider.$el.find('.range-bar').css('background-image', \"linear-gradient(\".concat(app.rtl ? 'to left' : 'to right', \", hsl(\").concat(hslLeft[0], \", \").concat(hslLeft[1] * 100, \"%, \").concat(hslLeft[2] * 100, \"%), hsl(\").concat(hslRight[0], \", \").concat(hslRight[1] * 100, \"%, \").concat(hslRight[2] * 100, \"%))\"));\n    if (sliderValue && sliderValueEditable) {\n      self.$el.find('input.color-picker-value-hue').val(\"\".concat(hue));\n      self.$el.find('input.color-picker-value-saturation').val(\"\".concat(hsb[1] * 1000 / 10));\n      self.$el.find('input.color-picker-value-brightness').val(\"\".concat(hsb[2] * 1000 / 10));\n    } else if (sliderValue) {\n      self.$el.find('span.color-picker-value-hue').text(\"\".concat(hue));\n      self.$el.find('span.color-picker-value-saturation').text(\"\".concat(hsb[1] * 1000 / 10));\n      self.$el.find('span.color-picker-value-brightness').text(\"\".concat(hsb[2] * 1000 / 10));\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.hueRangeSlider && self.hueRangeSlider.destroy) {\n      self.hueRangeSlider.destroy();\n    }\n    if (self.saturationRangeSlider && self.saturationRangeSlider.destroy) {\n      self.saturationRangeSlider.destroy();\n    }\n    if (self.brightnessRangeSlider && self.brightnessRangeSlider.destroy) {\n      self.brightnessRangeSlider.destroy();\n    }\n    delete self.hueRangeSlider;\n    delete self.saturationRangeSlider;\n    delete self.brightnessRangeSlider;\n    if (self.destroyHsbSlidersEvents) self.destroyHsbSlidersEvents();\n    delete self.destroyHsbSlidersEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/hue-slider.js\n/* harmony default export */ var hue_slider = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      sliderLabel = _self$params.sliderLabel,\n      sliderValue = _self$params.sliderValue,\n      sliderValueEditable = _self$params.sliderValueEditable,\n      hueLabelText = _self$params.hueLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-hue-slider\\\">\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \".concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(hueLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-hue\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.1\\\" min=\\\"0\\\" max=\\\"360\\\" class=\\\"color-picker-value-hue\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-hue\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.hueRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-hue'),\n      min: 0,\n      max: 360,\n      step: 0.1,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            hue: value\n          });\n        }\n      }\n    });\n  },\n  update: function update(self) {\n    var value = self.value;\n    var _self$params2 = self.params,\n      sliderValue = _self$params2.sliderValue,\n      sliderValueEditable = _self$params2.sliderValueEditable;\n    var hue = value.hue;\n    self.hueRangeSlider.value = hue;\n    self.hueRangeSlider.layout();\n    self.hueRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"hsl(\".concat(hue, \", 100%, 50%)\"));\n    if (sliderValue && sliderValueEditable) {\n      self.$el.find('input.color-picker-value-hue').val(\"\".concat(hue));\n    } else if (sliderValue) {\n      self.$el.find('span.color-picker-value-hue').text(\"\".concat(hue));\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.hueRangeSlider && self.hueRangeSlider.destroy) {\n      self.hueRangeSlider.destroy();\n    }\n    delete self.hueRangeSlider;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/brightness-slider.js\n\n/* harmony default export */ var brightness_slider = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      sliderLabel = _self$params.sliderLabel,\n      sliderValue = _self$params.sliderValue,\n      sliderValueEditable = _self$params.sliderValueEditable,\n      brightnessLabelText = _self$params.brightnessLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-brightness-slider\\\">\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \".concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(brightnessLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-brightness\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"0.1\\\" min=\\\"0\\\" max=\\\"100\\\" class=\\\"color-picker-value-brightness\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-brightness\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.brightnessRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-brightness'),\n      min: 0,\n      max: 1,\n      step: 0.001,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          var b = Math.floor(value * 1000) / 1000;\n          self.setValue({\n            hsb: [self.value.hsb[0], self.value.hsb[1], b]\n          });\n        }\n      }\n    });\n  },\n  update: function update(self) {\n    var value = self.value,\n      app = self.app;\n    var _self$params2 = self.params,\n      sliderValue = _self$params2.sliderValue,\n      sliderValueEditable = _self$params2.sliderValueEditable;\n    var hsb = value.hsb;\n    self.brightnessRangeSlider.value = hsb[2];\n    self.brightnessRangeSlider.layout();\n    var hslCurrent = utils[\"default\"].colorHsbToHsl(hsb[0], hsb[1], hsb[2]);\n    var hslLeft = utils[\"default\"].colorHsbToHsl(hsb[0], hsb[1], 0);\n    var hslRight = utils[\"default\"].colorHsbToHsl(hsb[0], hsb[1], 1);\n    self.brightnessRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"hsl(\".concat(hslCurrent[0], \", \").concat(hslCurrent[1] * 100, \"%, \").concat(hslCurrent[2] * 100, \"%)\"));\n    self.brightnessRangeSlider.$el.find('.range-bar').css('background-image', \"linear-gradient(\".concat(app.rtl ? 'to left' : 'to right', \", hsl(\").concat(hslLeft[0], \", \").concat(hslLeft[1] * 100, \"%, \").concat(hslLeft[2] * 100, \"%), hsl(\").concat(hslRight[0], \", \").concat(hslRight[1] * 100, \"%, \").concat(hslRight[2] * 100, \"%))\"));\n    if (sliderValue && sliderValueEditable) {\n      self.$el.find('input.color-picker-value-brightness').val(\"\".concat(hsb[2] * 1000 / 10));\n    } else if (sliderValue) {\n      self.$el.find('span.color-picker-value-brightness').text(\"\".concat(hsb[2] * 1000 / 10));\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.brightnessRangeSlider && self.brightnessRangeSlider.destroy) {\n      self.brightnessRangeSlider.destroy();\n    }\n    delete self.brightnessRangeSlider;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/palette.js\n/* eslint indent: [\"off\"] */\n\n/* harmony default export */ var palette = ({\n  render: function render(self) {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-palette\\\">\\n        <div class=\\\"color-picker-palette\\\">\\n          \".concat(self.params.palette.map(function (p) {\n      if (Array.isArray(p)) {\n        var row = '<div class=\"color-picker-palette-row\">';\n        row += p.map(function (c) {\n          return \"\\n                <div class=\\\"color-picker-palette-value\\\" data-palette-color=\\\"\".concat(c, \"\\\" style=\\\"background-color: \").concat(c, \"\\\"></div>\\n              \");\n        }).join('');\n        row += '</div>';\n        return row;\n      }\n      return \"\\n              <div class=\\\"color-picker-palette-value\\\" data-palette-color=\\\"\".concat(p, \"\\\" style=\\\"background-color: \").concat(p, \"\\\"></div>\\n            \");\n    }).join(''), \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    function handlePaletteClick(e) {\n      var hex = Object(dom7_module[\"default\"])(e.target).attr('data-palette-color');\n      self.setValue({\n        hex: hex\n      });\n    }\n    self.$el.on('click', '.color-picker-module-palette .color-picker-palette-value', handlePaletteClick);\n    self.destroyPaletteEvents = function destroyPaletteEvents() {\n      self.$el.off('click', '.color-picker-module-hex input', handlePaletteClick);\n    };\n  },\n  destroy: function destroy(self) {\n    if (self.destroyPaletteEvents) {\n      self.destroyPaletteEvents();\n    }\n    delete self.destroyPaletteEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/initial-current-colors.js\n/* harmony default export */ var initial_current_colors = ({\n  render: function render() {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-initial-current-colors\\\">\\n        <div class=\\\"color-picker-initial-current-colors\\\">\\n          <div class=\\\"color-picker-initial-color\\\"></div>\\n          <div class=\\\"color-picker-current-color\\\"></div>\\n        </div>\\n      </div>\\n    \";\n  },\n  init: function init(self) {\n    function handleInitialColorClick() {\n      if (self.initialValue) {\n        var _self$initialValue = self.initialValue,\n          hex = _self$initialValue.hex,\n          alpha = _self$initialValue.alpha;\n        self.setValue({\n          hex: hex,\n          alpha: alpha\n        });\n      }\n    }\n    self.$el.on('click', '.color-picker-initial-color', handleInitialColorClick);\n    self.destroyInitialCurrentEvents = function destroyInitialCurrentEvents() {\n      self.$el.off('click', '.color-picker-initial-color', handleInitialColorClick);\n    };\n  },\n  update: function update(self) {\n    self.$el.find('.color-picker-module-initial-current-colors .color-picker-initial-color').css('background-color', self.initialValue.hex);\n    self.$el.find('.color-picker-module-initial-current-colors .color-picker-current-color').css('background-color', self.value.hex);\n  },\n  destroy: function destroy(self) {\n    if (self.destroyInitialCurrentEvents) {\n      self.destroyInitialCurrentEvents();\n    }\n    delete self.destroyInitialCurrentEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/rgb-bars.js\n\n\n/* harmony default export */ var rgb_bars = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      barLabel = _self$params.barLabel,\n      barValue = _self$params.barValue,\n      barValueEditable = _self$params.barValueEditable,\n      redLabelText = _self$params.redLabelText,\n      greenLabelText = _self$params.greenLabelText,\n      blueLabelText = _self$params.blueLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-rgb-bars\\\">\\n        <div class=\\\"color-picker-bar-wrap\\\">\\n          \".concat(barLabel ? \"\\n            <div class=\\\"color-picker-bar-label\\\">\".concat(redLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-bar color-picker-bar-red\\\"></div>\\n          \").concat(barValue ? \"\\n            <div class=\\\"color-picker-bar-value\\\">\\n              \".concat(barValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-bar-red\\\" data-color-index=\\\"0\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-bar-red\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-bar-wrap\\\">\\n          \").concat(barLabel ? \"\\n            <div class=\\\"color-picker-bar-label\\\">\".concat(greenLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-bar color-picker-bar-green\\\"></div>\\n          \").concat(barValue ? \"\\n            <div class=\\\"color-picker-bar-value\\\">\\n              \".concat(barValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-bar-green\\\" data-color-index=\\\"1\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-bar-green\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-bar-wrap\\\">\\n          \").concat(barLabel ? \"\\n            <div class=\\\"color-picker-bar-label\\\">\".concat(blueLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-bar color-picker-bar-blue\\\"></div>\\n          \").concat(barValue ? \"\\n            <div class=\\\"color-picker-bar-value\\\">\\n              \".concat(barValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-bar-blue\\\" data-color-index=\\\"2\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-bar-blue\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.redBar = self.app.range.create({\n      el: self.$el.find('.color-picker-bar-red'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      vertical: true,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [value, self.value.rgb[1], self.value.rgb[2]]\n          });\n        }\n      }\n    });\n    self.greenBar = self.app.range.create({\n      el: self.$el.find('.color-picker-bar-green'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      vertical: true,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [self.value.rgb[0], value, self.value.rgb[2]]\n          });\n        }\n      }\n    });\n    self.blueBar = self.app.range.create({\n      el: self.$el.find('.color-picker-bar-blue'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      vertical: true,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [self.value.rgb[0], self.value.rgb[1], value]\n          });\n        }\n      }\n    });\n    function handleInputChange(e) {\n      var rgb = toConsumableArray_default()(self.value.rgb);\n      var index = parseInt(Object(dom7_module[\"default\"])(e.target).attr('data-color-index'), 10);\n      var value = parseInt(e.target.value, 10);\n      if (Number.isNaN(value)) {\n        e.target.value = rgb[index];\n        return;\n      }\n      value = Math.max(0, Math.min(255, value));\n      rgb[index] = value;\n      self.setValue({\n        rgb: rgb\n      });\n    }\n    self.$el.on('change', '.color-picker-module-rgb-bars input', handleInputChange);\n    self.destroyRgbBarsEvents = function destroyRgbBarsEvents() {\n      self.$el.off('change', '.color-picker-module-rgb-bars input', handleInputChange);\n    };\n  },\n  update: function update(self) {\n    var value = self.value,\n      redBar = self.redBar,\n      greenBar = self.greenBar,\n      blueBar = self.blueBar;\n    var _self$params2 = self.params,\n      barValue = _self$params2.barValue,\n      barValueEditable = _self$params2.barValueEditable;\n    var rgb = value.rgb;\n    redBar.value = rgb[0];\n    greenBar.value = rgb[1];\n    blueBar.value = rgb[2];\n    redBar.layout();\n    greenBar.layout();\n    blueBar.layout();\n    redBar.$el.find('.range-bar').css('background-image', \"linear-gradient(to top, rgb(0, \".concat(rgb[1], \", \").concat(rgb[2], \"), rgb(255, \").concat(rgb[1], \", \").concat(rgb[2], \"))\"));\n    greenBar.$el.find('.range-bar').css('background-image', \"linear-gradient(to top, rgb(\".concat(rgb[0], \", 0, \").concat(rgb[2], \"), rgb(\").concat(rgb[0], \", 255, \").concat(rgb[2], \"))\"));\n    blueBar.$el.find('.range-bar').css('background-image', \"linear-gradient(to top, rgb(\".concat(rgb[0], \", \").concat(rgb[1], \", 0), rgb(\").concat(rgb[0], \", \").concat(rgb[1], \", 255))\"));\n    if (barValue && barValueEditable) {\n      self.$el.find('input.color-picker-value-bar-red').val(rgb[0]);\n      self.$el.find('input.color-picker-value-bar-green').val(rgb[1]);\n      self.$el.find('input.color-picker-value-bar-blue').val(rgb[2]);\n    } else if (barValue) {\n      self.$el.find('span.color-picker-value-bar-red').text(rgb[0]);\n      self.$el.find('span.color-picker-value-bar-green').text(rgb[1]);\n      self.$el.find('span.color-picker-value-bar-blue').text(rgb[2]);\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.redBar && self.redBar.destroy) {\n      self.redBar.destroy();\n    }\n    if (self.greenBar && self.greenBar.destroy) {\n      self.greenBar.destroy();\n    }\n    if (self.blueBar && self.blueBar.destroy) {\n      self.blueBar.destroy();\n    }\n    delete self.redBar;\n    delete self.greenBar;\n    delete self.blueBar;\n    if (self.destroyRgbBarsEvents) self.destroyRgbBarsEvents();\n    delete self.destroyRgbBarsEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/rgb-sliders.js\n\n\n/* harmony default export */ var rgb_sliders = ({\n  render: function render(self) {\n    var _self$params = self.params,\n      sliderLabel = _self$params.sliderLabel,\n      sliderValue = _self$params.sliderValue,\n      sliderValueEditable = _self$params.sliderValueEditable,\n      redLabelText = _self$params.redLabelText,\n      greenLabelText = _self$params.greenLabelText,\n      blueLabelText = _self$params.blueLabelText;\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-rgb-sliders\\\">\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \".concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(redLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-red\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-red\\\" data-color-index=\\\"0\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-red\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \").concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(greenLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-green\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-green\\\" data-color-index=\\\"1\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-green\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n        <div class=\\\"color-picker-slider-wrap\\\">\\n          \").concat(sliderLabel ? \"\\n            <div class=\\\"color-picker-slider-label\\\">\".concat(blueLabelText, \"</div>\\n          \") : '', \"\\n          <div class=\\\"range-slider color-picker-slider color-picker-slider-blue\\\"></div>\\n          \").concat(sliderValue ? \"\\n            <div class=\\\"color-picker-slider-value\\\">\\n              \".concat(sliderValueEditable ? \"\\n                <input type=\\\"number\\\" step=\\\"1\\\" min=\\\"0\\\" max=\\\"255\\\" class=\\\"color-picker-value-blue\\\" data-color-index=\\\"2\\\">\\n              \" : \"\\n                <span class=\\\"color-picker-value-blue\\\"></span>\\n              \", \"\\n            </div>\\n          \") : '', \"\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    self.redRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-red'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [value, self.value.rgb[1], self.value.rgb[2]]\n          });\n        }\n      }\n    });\n    self.greenRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-green'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [self.value.rgb[0], value, self.value.rgb[2]]\n          });\n        }\n      }\n    });\n    self.blueRangeSlider = self.app.range.create({\n      el: self.$el.find('.color-picker-slider-blue'),\n      min: 0,\n      max: 255,\n      step: 1,\n      value: 0,\n      on: {\n        change: function change(range, value) {\n          self.setValue({\n            rgb: [self.value.rgb[0], self.value.rgb[1], value]\n          });\n        }\n      }\n    });\n    function handleInputChange(e) {\n      var rgb = toConsumableArray_default()(self.value.rgb);\n      var index = parseInt(Object(dom7_module[\"default\"])(e.target).attr('data-color-index'), 10);\n      var value = parseInt(e.target.value, 10);\n      if (Number.isNaN(value)) {\n        e.target.value = rgb[index];\n        return;\n      }\n      value = Math.max(0, Math.min(255, value));\n      rgb[index] = value;\n      self.setValue({\n        rgb: rgb\n      });\n    }\n    self.$el.on('change', '.color-picker-module-rgb-sliders input', handleInputChange);\n    self.destroyRgbSlidersEvents = function destroyRgbSlidersEvents() {\n      self.$el.off('change', '.color-picker-module-rgb-sliders input', handleInputChange);\n    };\n  },\n  update: function update(self) {\n    var app = self.app,\n      value = self.value,\n      redRangeSlider = self.redRangeSlider,\n      greenRangeSlider = self.greenRangeSlider,\n      blueRangeSlider = self.blueRangeSlider;\n    var _self$params2 = self.params,\n      sliderValue = _self$params2.sliderValue,\n      sliderValueEditable = _self$params2.sliderValueEditable;\n    var rgb = value.rgb;\n    redRangeSlider.value = rgb[0];\n    greenRangeSlider.value = rgb[1];\n    blueRangeSlider.value = rgb[2];\n    redRangeSlider.layout();\n    greenRangeSlider.layout();\n    blueRangeSlider.layout();\n    redRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"rgb(\".concat(rgb[0], \", \").concat(rgb[1], \", \").concat(rgb[2], \")\"));\n    greenRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"rgb(\".concat(rgb[0], \", \").concat(rgb[1], \", \").concat(rgb[2], \")\"));\n    blueRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', \"rgb(\".concat(rgb[0], \", \").concat(rgb[1], \", \").concat(rgb[2], \")\"));\n    var direction = app.rtl ? 'to left' : 'to right';\n    redRangeSlider.$el.find('.range-bar').css('background-image', \"linear-gradient(\".concat(direction, \", rgb(0, \").concat(rgb[1], \", \").concat(rgb[2], \"), rgb(255, \").concat(rgb[1], \", \").concat(rgb[2], \"))\"));\n    greenRangeSlider.$el.find('.range-bar').css('background-image', \"linear-gradient(\".concat(direction, \", rgb(\").concat(rgb[0], \", 0, \").concat(rgb[2], \"), rgb(\").concat(rgb[0], \", 255, \").concat(rgb[2], \"))\"));\n    blueRangeSlider.$el.find('.range-bar').css('background-image', \"linear-gradient(\".concat(direction, \", rgb(\").concat(rgb[0], \", \").concat(rgb[1], \", 0), rgb(\").concat(rgb[0], \", \").concat(rgb[1], \", 255))\"));\n    if (sliderValue && sliderValueEditable) {\n      self.$el.find('input.color-picker-value-red').val(rgb[0]);\n      self.$el.find('input.color-picker-value-green').val(rgb[1]);\n      self.$el.find('input.color-picker-value-blue').val(rgb[2]);\n    } else if (sliderValue) {\n      self.$el.find('span.color-picker-value-red').text(rgb[0]);\n      self.$el.find('span.color-picker-value-green').text(rgb[1]);\n      self.$el.find('span.color-picker-value-blue').text(rgb[2]);\n    }\n  },\n  destroy: function destroy(self) {\n    if (self.redRangeSlider && self.redRangeSlider.destroy) {\n      self.redRangeSlider.destroy();\n    }\n    if (self.greenRangeSlider && self.greenRangeSlider.destroy) {\n      self.greenRangeSlider.destroy();\n    }\n    if (self.blueRangeSlider && self.blueRangeSlider.destroy) {\n      self.blueRangeSlider.destroy();\n    }\n    delete self.redRangeSlider;\n    delete self.greenRangeSlider;\n    delete self.blueRangeSlider;\n    if (self.destroyRgbSlidersEvents) self.destroyRgbSlidersEvents();\n    delete self.destroyRgbSlidersEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/sb-spectrum.js\n\n/* harmony default export */ var sb_spectrum = ({\n  render: function render() {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-sb-spectrum\\\">\\n        <div class=\\\"color-picker-sb-spectrum\\\" style=\\\"background-color: hsl(0, 100%, 50%)\\\">\\n          <div class=\\\"color-picker-sb-spectrum-handle\\\"></div>\\n        </div>\\n      </div>\\n    \";\n  },\n  init: function init(self) {\n    var app = self.app;\n    var isTouched;\n    var isMoved;\n    var touchStartX;\n    var touchStartY;\n    var touchCurrentX;\n    var touchCurrentY;\n    var specterRect;\n    var specterIsTouched;\n    var specterHandleIsTouched;\n    var $el = self.$el;\n    function setSBFromSpecterCoords(x, y) {\n      var s = (x - specterRect.left) / specterRect.width;\n      var b = (y - specterRect.top) / specterRect.height;\n      s = Math.max(0, Math.min(1, s));\n      b = 1 - Math.max(0, Math.min(1, b));\n      self.setValue({\n        hsb: [self.value.hue, s, b]\n      });\n    }\n    function handleTouchStart(e) {\n      if (isMoved || isTouched) return;\n      touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentX = touchStartX;\n      touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      touchCurrentY = touchStartY;\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      specterHandleIsTouched = $targetEl.closest('.color-picker-sb-spectrum-handle').length > 0;\n      if (!specterHandleIsTouched) {\n        specterIsTouched = $targetEl.closest('.color-picker-sb-spectrum').length > 0;\n      }\n      if (specterIsTouched) {\n        specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();\n        setSBFromSpecterCoords(touchStartX, touchStartY);\n      }\n      if (specterHandleIsTouched || specterIsTouched) {\n        $el.find('.color-picker-sb-spectrum-handle').addClass('color-picker-sb-spectrum-handle-pressed');\n      }\n    }\n    function handleTouchMove(e) {\n      if (!(specterIsTouched || specterHandleIsTouched)) return;\n      touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      e.preventDefault();\n      if (!isMoved) {\n        // First move\n        isMoved = true;\n        if (specterHandleIsTouched) {\n          specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();\n        }\n      }\n      if (specterIsTouched || specterHandleIsTouched) {\n        setSBFromSpecterCoords(touchCurrentX, touchCurrentY);\n      }\n    }\n    function handleTouchEnd() {\n      isMoved = false;\n      if (specterIsTouched || specterHandleIsTouched) {\n        $el.find('.color-picker-sb-spectrum-handle').removeClass('color-picker-sb-spectrum-handle-pressed');\n      }\n      specterIsTouched = false;\n      specterHandleIsTouched = false;\n    }\n    function handleResize() {\n      self.modules['sb-spectrum'].update(self);\n    }\n    var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {\n      passive: true,\n      capture: false\n    } : false;\n    self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n    app.on('resize', handleResize);\n    self.destroySpectrumEvents = function destroySpectrumEvents() {\n      self.$el.off(app.touchEvents.start, handleTouchStart, passiveListener);\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      app.off('resize', handleResize);\n    };\n  },\n  update: function update(self) {\n    var value = self.value;\n    var hsl = value.hsl,\n      hsb = value.hsb;\n    var specterWidth = self.$el.find('.color-picker-sb-spectrum')[0].offsetWidth;\n    var specterHeight = self.$el.find('.color-picker-sb-spectrum')[0].offsetHeight;\n    self.$el.find('.color-picker-sb-spectrum').css('background-color', \"hsl(\".concat(hsl[0], \", 100%, 50%)\"));\n    self.$el.find('.color-picker-sb-spectrum-handle').css('background-color', \"hsl(\".concat(hsl[0], \", \").concat(hsl[1] * 100, \"%, \").concat(hsl[2] * 100, \"%)\")).transform(\"translate(\".concat(specterWidth * hsb[1], \"px, \").concat(specterHeight * (1 - hsb[2]), \"px)\"));\n  },\n  destroy: function destroy(self) {\n    if (self.destroySpectrumEvents) self.destroySpectrumEvents();\n    delete self.destroySpectrumEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/hs-spectrum.js\n\n\n/* harmony default export */ var hs_spectrum = ({\n  render: function render() {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-hs-spectrum\\\">\\n        <div class=\\\"color-picker-hs-spectrum\\\">\\n          <div class=\\\"color-picker-hs-spectrum-handle\\\"></div>\\n        </div>\\n      </div>\\n    \";\n  },\n  init: function init(self) {\n    var app = self.app;\n    var isTouched;\n    var isMoved;\n    var touchStartX;\n    var touchStartY;\n    var touchCurrentX;\n    var touchCurrentY;\n    var specterRect;\n    var specterIsTouched;\n    var specterHandleIsTouched;\n    var $el = self.$el;\n    function setHSFromSpecterCoords(x, y) {\n      var h = (x - specterRect.left) / specterRect.width * 360;\n      var s = (y - specterRect.top) / specterRect.height;\n      h = Math.max(0, Math.min(360, h));\n      s = 1 - Math.max(0, Math.min(1, s));\n      self.setValue({\n        hsb: [h, s, self.value.hsb[2]]\n      });\n    }\n    function handleTouchStart(e) {\n      if (isMoved || isTouched) return;\n      touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentX = touchStartX;\n      touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      touchCurrentY = touchStartY;\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      specterHandleIsTouched = $targetEl.closest('.color-picker-hs-spectrum-handle').length > 0;\n      if (!specterHandleIsTouched) {\n        specterIsTouched = $targetEl.closest('.color-picker-hs-spectrum').length > 0;\n      }\n      if (specterIsTouched) {\n        specterRect = $el.find('.color-picker-hs-spectrum')[0].getBoundingClientRect();\n        setHSFromSpecterCoords(touchStartX, touchStartY);\n      }\n      if (specterHandleIsTouched || specterIsTouched) {\n        $el.find('.color-picker-hs-spectrum-handle').addClass('color-picker-hs-spectrum-handle-pressed');\n      }\n    }\n    function handleTouchMove(e) {\n      if (!(specterIsTouched || specterHandleIsTouched)) return;\n      touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      e.preventDefault();\n      if (!isMoved) {\n        // First move\n        isMoved = true;\n        if (specterHandleIsTouched) {\n          specterRect = $el.find('.color-picker-hs-spectrum')[0].getBoundingClientRect();\n        }\n      }\n      if (specterIsTouched || specterHandleIsTouched) {\n        setHSFromSpecterCoords(touchCurrentX, touchCurrentY);\n      }\n    }\n    function handleTouchEnd() {\n      isMoved = false;\n      if (specterIsTouched || specterHandleIsTouched) {\n        $el.find('.color-picker-hs-spectrum-handle').removeClass('color-picker-hs-spectrum-handle-pressed');\n      }\n      specterIsTouched = false;\n      specterHandleIsTouched = false;\n    }\n    function handleResize() {\n      self.modules['hs-spectrum'].update(self);\n    }\n    var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {\n      passive: true,\n      capture: false\n    } : false;\n    self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n    app.on('resize', handleResize);\n    self.destroySpectrumEvents = function destroySpectrumEvents() {\n      self.$el.off(app.touchEvents.start, handleTouchStart, passiveListener);\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      app.off('resize', handleResize);\n    };\n  },\n  update: function update(self) {\n    var value = self.value;\n    var hsb = value.hsb;\n    var specterWidth = self.$el.find('.color-picker-hs-spectrum')[0].offsetWidth;\n    var specterHeight = self.$el.find('.color-picker-hs-spectrum')[0].offsetHeight;\n    var hslBright = utils[\"default\"].colorHsbToHsl(hsb[0], hsb[1], 1);\n    self.$el.find('.color-picker-hs-spectrum-handle').css('background-color', \"hsl(\".concat(hslBright[0], \", \").concat(hslBright[1] * 100, \"%, \").concat(hslBright[2] * 100, \"%)\")).transform(\"translate(\".concat(specterWidth * (hsb[0] / 360), \"px, \").concat(specterHeight * (1 - hsb[1]), \"px)\"));\n  },\n  destroy: function destroy(self) {\n    if (self.destroySpectrumEvents) self.destroySpectrumEvents();\n    delete self.destroySpectrumEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/modules/wheel.js\n\nfunction svgWheelCircles() {\n  var total = 256;\n  var circles = '';\n  for (var i = total; i > 0; i -= 1) {\n    var angle = i * Math.PI / (total / 2);\n    var hue = 360 / total * i;\n    circles += \"<circle cx=\\\"\".concat(150 - Math.sin(angle) * 125, \"\\\" cy=\\\"\").concat(150 - Math.cos(angle) * 125, \"\\\" r=\\\"25\\\" fill=\\\"hsl(\").concat(hue, \", 100%, 50%)\\\"></circle>\");\n  }\n  return circles;\n}\n/* harmony default export */ var modules_wheel = ({\n  render: function render() {\n    return \"\\n      <div class=\\\"color-picker-module color-picker-module-wheel\\\">\\n        <div class=\\\"color-picker-wheel\\\">\\n          <svg viewBox=\\\"0 0 300 300\\\" width=\\\"300\\\" height=\\\"300\\\">\".concat(svgWheelCircles(), \"</svg>\\n          <div class=\\\"color-picker-wheel-handle\\\"></div>\\n          <div class=\\\"color-picker-sb-spectrum\\\" style=\\\"background-color: hsl(0, 100%, 50%)\\\">\\n            <div class=\\\"color-picker-sb-spectrum-handle\\\"></div>\\n          </div>\\n        </div>\\n      </div>\\n    \");\n  },\n  init: function init(self) {\n    var app = self.app;\n    var isTouched;\n    var isMoved;\n    var touchStartX;\n    var touchStartY;\n    var touchCurrentX;\n    var touchCurrentY;\n    var wheelRect;\n    var wheelIsTouched;\n    var wheelHandleIsTouched;\n    var specterRect;\n    var specterIsTouched;\n    var specterHandleIsTouched;\n    var $el = self.$el;\n    function setHueFromWheelCoords(x, y) {\n      var wheelCenterX = wheelRect.left + wheelRect.width / 2;\n      var wheelCenterY = wheelRect.top + wheelRect.height / 2;\n      var angleRad = Math.atan2(y - wheelCenterY, x - wheelCenterX);\n      var angleDeg = angleRad * 180 / Math.PI + 90;\n      if (angleDeg < 0) angleDeg += 360;\n      angleDeg = 360 - angleDeg;\n      self.setValue({\n        hue: angleDeg\n      });\n    }\n    function setSBFromSpecterCoords(x, y) {\n      var s = (x - specterRect.left) / specterRect.width;\n      var b = (y - specterRect.top) / specterRect.height;\n      s = Math.max(0, Math.min(1, s));\n      b = 1 - Math.max(0, Math.min(1, b));\n      self.setValue({\n        hsb: [self.value.hue, s, b]\n      });\n    }\n    function handleTouchStart(e) {\n      if (isMoved || isTouched) return;\n      touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentX = touchStartX;\n      touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n      touchCurrentY = touchStartY;\n      var $targetEl = Object(dom7_module[\"default\"])(e.target);\n      wheelHandleIsTouched = $targetEl.closest('.color-picker-wheel-handle').length > 0;\n      wheelIsTouched = $targetEl.closest('circle').length > 0;\n      specterHandleIsTouched = $targetEl.closest('.color-picker-sb-spectrum-handle').length > 0;\n      if (!specterHandleIsTouched) {\n        specterIsTouched = $targetEl.closest('.color-picker-sb-spectrum').length > 0;\n      }\n      if (wheelIsTouched) {\n        wheelRect = $el.find('.color-picker-wheel')[0].getBoundingClientRect();\n        setHueFromWheelCoords(touchStartX, touchStartY);\n      }\n      if (specterIsTouched) {\n        specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();\n        setSBFromSpecterCoords(touchStartX, touchStartY);\n      }\n      if (specterHandleIsTouched || specterIsTouched) {\n        $el.find('.color-picker-sb-spectrum-handle').addClass('color-picker-sb-spectrum-handle-pressed');\n      }\n    }\n    function handleTouchMove(e) {\n      if (!(wheelIsTouched || wheelHandleIsTouched) && !(specterIsTouched || specterHandleIsTouched)) return;\n      touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n      touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n      e.preventDefault();\n      if (!isMoved) {\n        // First move\n        isMoved = true;\n        if (wheelHandleIsTouched) {\n          wheelRect = $el.find('.color-picker-wheel')[0].getBoundingClientRect();\n        }\n        if (specterHandleIsTouched) {\n          specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();\n        }\n      }\n      if (wheelIsTouched || wheelHandleIsTouched) {\n        setHueFromWheelCoords(touchCurrentX, touchCurrentY);\n      }\n      if (specterIsTouched || specterHandleIsTouched) {\n        setSBFromSpecterCoords(touchCurrentX, touchCurrentY);\n      }\n    }\n    function handleTouchEnd() {\n      isMoved = false;\n      if (specterIsTouched || specterHandleIsTouched) {\n        $el.find('.color-picker-sb-spectrum-handle').removeClass('color-picker-sb-spectrum-handle-pressed');\n      }\n      wheelIsTouched = false;\n      wheelHandleIsTouched = false;\n      specterIsTouched = false;\n      specterHandleIsTouched = false;\n    }\n    function handleResize() {\n      self.modules.wheel.update(self);\n    }\n    var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {\n      passive: true,\n      capture: false\n    } : false;\n    self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);\n    app.on('touchmove:active', handleTouchMove);\n    app.on('touchend:passive', handleTouchEnd);\n    app.on('resize', handleResize);\n    self.destroyWheelEvents = function destroyWheelEvents() {\n      self.$el.off(app.touchEvents.start, handleTouchStart, passiveListener);\n      app.off('touchmove:active', handleTouchMove);\n      app.off('touchend:passive', handleTouchEnd);\n      app.off('resize', handleResize);\n    };\n  },\n  update: function update(self) {\n    var value = self.value;\n    var hsl = value.hsl,\n      hsb = value.hsb;\n    var specterWidth = self.$el.find('.color-picker-sb-spectrum')[0].offsetWidth;\n    var specterHeight = self.$el.find('.color-picker-sb-spectrum')[0].offsetHeight;\n    var wheelSize = self.$el.find('.color-picker-wheel')[0].offsetWidth;\n    var wheelHalfSize = wheelSize / 2;\n    var angleRad = value.hue * Math.PI / 180;\n    var handleSize = wheelSize / 6;\n    var handleHalfSize = handleSize / 2;\n    var tX = wheelHalfSize - Math.sin(angleRad) * (wheelHalfSize - handleHalfSize) - handleHalfSize;\n    var tY = wheelHalfSize - Math.cos(angleRad) * (wheelHalfSize - handleHalfSize) - handleHalfSize;\n    self.$el.find('.color-picker-wheel-handle').css('background-color', \"hsl(\".concat(hsl[0], \", 100%, 50%)\")).transform(\"translate(\".concat(tX, \"px, \").concat(tY, \"px)\"));\n    self.$el.find('.color-picker-sb-spectrum').css('background-color', \"hsl(\".concat(hsl[0], \", 100%, 50%)\"));\n    self.$el.find('.color-picker-sb-spectrum-handle').css('background-color', \"hsl(\".concat(hsl[0], \", \").concat(hsl[1] * 100, \"%, \").concat(hsl[2] * 100, \"%)\")).transform(\"translate(\".concat(specterWidth * hsb[1], \"px, \").concat(specterHeight * (1 - hsb[2]), \"px)\"));\n  },\n  destroy: function destroy(self) {\n    if (self.destroyWheelEvents) self.destroyWheelEvents();\n    delete self.destroyWheelEvents;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/color-picker-class.js\n\n\n\n\n\n\n\n\nfunction color_picker_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, color_picker_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction color_picker_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (color_picker_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar color_picker_class_ColorPicker = /*#__PURE__*/function (_Framework7Class) {\n  function ColorPicker(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, ColorPicker);\n    _this = color_picker_class_callSuper(this, ColorPicker, [params, [app]]);\n    var self = _this;\n    self.params = utils[\"default\"].extend({}, app.params.colorPicker, params);\n    var $containerEl;\n    if (self.params.containerEl) {\n      $containerEl = Object(dom7_module[\"default\"])(self.params.containerEl);\n      if ($containerEl.length === 0) return possibleConstructorReturn_default()(_this, self);\n    }\n    var $inputEl;\n    if (self.params.inputEl) {\n      $inputEl = Object(dom7_module[\"default\"])(self.params.inputEl);\n    }\n    var $targetEl;\n    if (self.params.targetEl) {\n      $targetEl = Object(dom7_module[\"default\"])(self.params.targetEl);\n    }\n    utils[\"default\"].extend(self, {\n      app: app,\n      $containerEl: $containerEl,\n      containerEl: $containerEl && $containerEl[0],\n      inline: $containerEl && $containerEl.length > 0,\n      $inputEl: $inputEl,\n      inputEl: $inputEl && $inputEl[0],\n      $targetEl: $targetEl,\n      targetEl: $targetEl && $targetEl[0],\n      initialized: false,\n      opened: false,\n      url: self.params.url,\n      modules: {\n        'alpha-slider': alpha_slider,\n        'current-color': current_color,\n        'hex': modules_hex,\n        // eslint-disable-line\n        'hsb-sliders': hsb_sliders,\n        'hue-slider': hue_slider,\n        'brightness-slider': brightness_slider,\n        'palette': palette,\n        // eslint-disable-line\n        'initial-current-colors': initial_current_colors,\n        'rgb-bars': rgb_bars,\n        'rgb-sliders': rgb_sliders,\n        'sb-spectrum': sb_spectrum,\n        'hs-spectrum': hs_spectrum,\n        'wheel': modules_wheel // eslint-disable-line\n      }\n    });\n    function onInputClick() {\n      self.open();\n    }\n    function onInputFocus(e) {\n      e.preventDefault();\n    }\n    function onTargetClick() {\n      self.open();\n    }\n    function onHtmlClick(e) {\n      if (self.destroyed || !self.params) return;\n      if (self.params.openIn === 'page') return;\n      var $clickTargetEl = Object(dom7_module[\"default\"])(e.target);\n      if (!self.opened || self.closing) return;\n      if ($clickTargetEl.closest('[class*=\"backdrop\"]').length) return;\n      if ($clickTargetEl.closest('.color-picker-popup, .color-picker-popover').length) return;\n      if ($inputEl && $inputEl.length > 0) {\n        if ($clickTargetEl[0] !== $inputEl[0] && $clickTargetEl.closest('.sheet-modal').length === 0) {\n          self.close();\n        }\n      } else if (Object(dom7_module[\"default\"])(e.target).closest('.sheet-modal').length === 0) {\n        self.close();\n      }\n    }\n\n    // Events\n    utils[\"default\"].extend(self, {\n      attachInputEvents: function attachInputEvents() {\n        self.$inputEl.on('click', onInputClick);\n        if (self.params.inputReadOnly) {\n          self.$inputEl.on('focus mousedown', onInputFocus);\n          if (self.$inputEl[0]) {\n            self.$inputEl[0].f7ValidateReadonly = true;\n          }\n        }\n      },\n      detachInputEvents: function detachInputEvents() {\n        self.$inputEl.off('click', onInputClick);\n        if (self.params.inputReadOnly) {\n          self.$inputEl.off('focus mousedown', onInputFocus);\n          if (self.$inputEl[0]) {\n            delete self.$inputEl[0].f7ValidateReadonly;\n          }\n        }\n      },\n      attachTargetEvents: function attachTargetEvents() {\n        self.$targetEl.on('click', onTargetClick);\n      },\n      detachTargetEvents: function detachTargetEvents() {\n        self.$targetEl.off('click', onTargetClick);\n      },\n      attachHtmlEvents: function attachHtmlEvents() {\n        app.on('click', onHtmlClick);\n      },\n      detachHtmlEvents: function detachHtmlEvents() {\n        app.off('click', onHtmlClick);\n      }\n    });\n    self.init();\n    return possibleConstructorReturn_default()(_this, self);\n  }\n  inherits_default()(ColorPicker, _Framework7Class);\n  return createClass_default()(ColorPicker, [{\n    key: \"view\",\n    get: function get() {\n      var $inputEl = this.$inputEl,\n        $targetEl = this.$targetEl,\n        app = this.app,\n        params = this.params;\n      var view;\n      if (params.view) {\n        view = params.view;\n      } else {\n        if ($inputEl) {\n          view = $inputEl.parents('.view').length && $inputEl.parents('.view')[0].f7View;\n        }\n        if (!view && $targetEl) {\n          view = $targetEl.parents('.view').length && $targetEl.parents('.view')[0].f7View;\n        }\n      }\n      if (!view) view = app.views.main;\n      return view;\n    }\n  }, {\n    key: \"attachEvents\",\n    value: function attachEvents() {\n      var self = this;\n      self.centerModules = self.centerModules.bind(self);\n      if (self.params.centerModules) {\n        self.app.on('resize', self.centerModules);\n      }\n    }\n  }, {\n    key: \"detachEvents\",\n    value: function detachEvents() {\n      var self = this;\n      if (self.params.centerModules) {\n        self.app.off('resize', self.centerModules);\n      }\n    }\n  }, {\n    key: \"centerModules\",\n    value: function centerModules() {\n      var self = this;\n      if (!self.opened || !self.$el || self.inline) return;\n      var $pageContentEl = self.$el.find('.page-content');\n      if (!$pageContentEl.length) return;\n      var _$pageContentEl$ = $pageContentEl[0],\n        scrollHeight = _$pageContentEl$.scrollHeight,\n        offsetHeight = _$pageContentEl$.offsetHeight;\n      if (scrollHeight <= offsetHeight) {\n        $pageContentEl.addClass('justify-content-center');\n      } else {\n        $pageContentEl.removeClass('justify-content-center');\n      }\n    }\n  }, {\n    key: \"initInput\",\n    value: function initInput() {\n      var self = this;\n      if (!self.$inputEl) return;\n      if (self.params.inputReadOnly) self.$inputEl.prop('readOnly', true);\n    }\n  }, {\n    key: \"getModalType\",\n    value: function getModalType() {\n      var self = this;\n      var app = self.app,\n        modal = self.modal,\n        params = self.params;\n      var openIn = params.openIn,\n        openInPhone = params.openInPhone;\n      if (modal && modal.type) return modal.type;\n      if (openIn !== 'auto') return openIn;\n      if (self.inline) return null;\n      if (app.device.ios) {\n        return app.device.ipad ? 'popover' : openInPhone;\n      }\n      if (app.width >= 768 || app.device.desktop && app.theme === 'aurora') {\n        return 'popover';\n      }\n      return openInPhone;\n    }\n  }, {\n    key: \"formatValue\",\n    value: function formatValue() {\n      var self = this;\n      var value = self.value;\n      if (self.params.formatValue) {\n        return self.params.formatValue.call(self, value);\n      }\n      return value.hex;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"normalizeHsValues\",\n    value: function normalizeHsValues(arr) {\n      return [Math.floor(arr[0] * 10) / 10, Math.floor(arr[1] * 1000) / 1000, Math.floor(arr[2] * 1000) / 1000];\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var updateModules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var self = this;\n      if (typeof value === 'undefined') return;\n      var _ref = self.value || {},\n        hex = _ref.hex,\n        rgb = _ref.rgb,\n        hsl = _ref.hsl,\n        hsb = _ref.hsb,\n        _ref$alpha = _ref.alpha,\n        alpha = _ref$alpha === void 0 ? 1 : _ref$alpha,\n        hue = _ref.hue,\n        rgba = _ref.rgba,\n        hsla = _ref.hsla;\n      var needChangeEvent = self.value || !self.value && !self.params.value;\n      var valueChanged;\n      Object.keys(value).forEach(function (k) {\n        if (!self.value || typeof self.value[k] === 'undefined') {\n          valueChanged = true;\n          return;\n        }\n        var v = value[k];\n        if (Array.isArray(v)) {\n          v.forEach(function (subV, subIndex) {\n            if (subV !== self.value[k][subIndex]) {\n              valueChanged = true;\n            }\n          });\n        } else if (v !== self.value[k]) {\n          valueChanged = true;\n        }\n      });\n      if (!valueChanged) return;\n      if (value.rgb || value.rgba) {\n        var _ref2 = value.rgb || value.rgba,\n          _ref3 = slicedToArray_default()(_ref2, 4),\n          r = _ref3[0],\n          g = _ref3[1],\n          b = _ref3[2],\n          _ref3$ = _ref3[3],\n          a = _ref3$ === void 0 ? alpha : _ref3$;\n        rgb = [r, g, b];\n        hex = utils[\"default\"].colorRgbToHex.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsl = utils[\"default\"].colorRgbToHsl.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsb = utils[\"default\"].colorHslToHsb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hsl = self.normalizeHsValues(hsl);\n        hsb = self.normalizeHsValues(hsb);\n        hue = hsb[0];\n        alpha = a;\n        rgba = [rgb[0], rgb[1], rgb[2], a];\n        hsla = [hsl[0], hsl[1], hsl[2], a];\n      }\n      if (value.hsl || value.hsla) {\n        var _ref4 = value.hsl || value.hsla,\n          _ref5 = slicedToArray_default()(_ref4, 4),\n          h = _ref5[0],\n          s = _ref5[1],\n          l = _ref5[2],\n          _ref5$ = _ref5[3],\n          _a = _ref5$ === void 0 ? alpha : _ref5$;\n        hsl = [h, s, l];\n        rgb = utils[\"default\"].colorHslToRgb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hex = utils[\"default\"].colorRgbToHex.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsb = utils[\"default\"].colorHslToHsb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hsl = self.normalizeHsValues(hsl);\n        hsb = self.normalizeHsValues(hsb);\n        hue = hsb[0];\n        alpha = _a;\n        rgba = [rgb[0], rgb[1], rgb[2], _a];\n        hsla = [hsl[0], hsl[1], hsl[2], _a];\n      }\n      if (value.hsb) {\n        var _value$hsb = slicedToArray_default()(value.hsb, 4),\n          _h = _value$hsb[0],\n          _s = _value$hsb[1],\n          _b = _value$hsb[2],\n          _value$hsb$ = _value$hsb[3],\n          _a2 = _value$hsb$ === void 0 ? alpha : _value$hsb$;\n        hsb = [_h, _s, _b];\n        hsl = utils[\"default\"].colorHsbToHsl.apply(utils[\"default\"], toConsumableArray_default()(hsb));\n        rgb = utils[\"default\"].colorHslToRgb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hex = utils[\"default\"].colorRgbToHex.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsl = self.normalizeHsValues(hsl);\n        hsb = self.normalizeHsValues(hsb);\n        hue = hsb[0];\n        alpha = _a2;\n        rgba = [rgb[0], rgb[1], rgb[2], _a2];\n        hsla = [hsl[0], hsl[1], hsl[2], _a2];\n      }\n      if (value.hex) {\n        rgb = utils[\"default\"].colorHexToRgb(value.hex);\n        hex = utils[\"default\"].colorRgbToHex.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsl = utils[\"default\"].colorRgbToHsl.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsb = utils[\"default\"].colorHslToHsb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hsl = self.normalizeHsValues(hsl);\n        hsb = self.normalizeHsValues(hsb);\n        hue = hsb[0];\n        rgba = [rgb[0], rgb[1], rgb[2], alpha];\n        hsla = [hsl[0], hsl[1], hsl[2], alpha];\n      }\n      if (typeof value.alpha !== 'undefined') {\n        alpha = value.alpha;\n        if (typeof rgb !== 'undefined') {\n          rgba = [rgb[0], rgb[1], rgb[2], alpha];\n        }\n        if (typeof hsl !== 'undefined') {\n          hsla = [hsl[0], hsl[1], hsl[2], alpha];\n        }\n      }\n      if (typeof value.hue !== 'undefined') {\n        var _hsl = hsl,\n          _hsl2 = slicedToArray_default()(_hsl, 3),\n          _h2 = _hsl2[0],\n          _s2 = _hsl2[1],\n          _l = _hsl2[2]; // eslint-disable-line\n        hsl = [value.hue, _s2, _l];\n        hsb = utils[\"default\"].colorHslToHsb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        rgb = utils[\"default\"].colorHslToRgb.apply(utils[\"default\"], toConsumableArray_default()(hsl));\n        hex = utils[\"default\"].colorRgbToHex.apply(utils[\"default\"], toConsumableArray_default()(rgb));\n        hsl = self.normalizeHsValues(hsl);\n        hsb = self.normalizeHsValues(hsb);\n        hue = hsb[0];\n        rgba = [rgb[0], rgb[1], rgb[2], alpha];\n        hsla = [hsl[0], hsl[1], hsl[2], alpha];\n      }\n      self.value = {\n        hex: hex,\n        alpha: alpha,\n        hue: hue,\n        rgb: rgb,\n        hsl: hsl,\n        hsb: hsb,\n        rgba: rgba,\n        hsla: hsla\n      };\n      if (!self.initialValue) self.initialValue = utils[\"default\"].extend({}, self.value);\n      self.updateValue(needChangeEvent);\n      if (self.opened && updateModules) {\n        self.updateModules();\n      }\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var self = this;\n      return self.value;\n    }\n  }, {\n    key: \"updateValue\",\n    value: function updateValue() {\n      var fireEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var self = this;\n      var $inputEl = self.$inputEl,\n        value = self.value,\n        $targetEl = self.$targetEl;\n      if ($targetEl && self.params.targetElSetBackgroundColor) {\n        var rgba = value.rgba;\n        $targetEl.css('background-color', \"rgba(\".concat(rgba.join(', '), \")\"));\n      }\n      if (fireEvents) {\n        self.emit('local::change colorPickerChange', self, value);\n      }\n      if ($inputEl && $inputEl.length) {\n        var inputValue = self.formatValue(value);\n        if ($inputEl && $inputEl.length) {\n          $inputEl.val(inputValue);\n          if (fireEvents) {\n            $inputEl.trigger('change');\n          }\n        }\n      }\n    }\n  }, {\n    key: \"updateModules\",\n    value: function updateModules() {\n      var self = this;\n      var modules = self.modules;\n      self.params.modules.forEach(function (m) {\n        if (typeof m === 'string' && modules[m] && modules[m].update) {\n          modules[m].update(self);\n        } else if (m && m.update) {\n          m.update(self);\n        }\n      });\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var self = this;\n      self.updateModules();\n    }\n  }, {\n    key: \"renderPicker\",\n    value: function renderPicker() {\n      var self = this;\n      var params = self.params,\n        modules = self.modules;\n      var html = '';\n      params.modules.forEach(function (m) {\n        if (typeof m === 'string' && modules[m] && modules[m].render) {\n          html += modules[m].render(self);\n        } else if (m && m.render) {\n          html += m.render(self);\n        }\n      });\n      return html;\n    }\n  }, {\n    key: \"renderNavbar\",\n    value: function renderNavbar() {\n      var self = this;\n      if (self.params.renderNavbar) {\n        return self.params.renderNavbar.call(self, self);\n      }\n      var _self$params = self.params,\n        openIn = _self$params.openIn,\n        navbarTitleText = _self$params.navbarTitleText,\n        navbarBackLinkText = _self$params.navbarBackLinkText,\n        navbarCloseText = _self$params.navbarCloseText;\n      return \"\\n    <div class=\\\"navbar\\\">\\n      <div class=\\\"navbar-bg\\\"></div>\\n      <div class=\\\"navbar-inner sliding\\\">\\n        \".concat(openIn === 'page' ? \"\\n        <div class=\\\"left\\\">\\n          <a class=\\\"link back\\\">\\n            <i class=\\\"icon icon-back\\\"></i>\\n            <span class=\\\"if-not-md\\\">\".concat(navbarBackLinkText, \"</span>\\n          </a>\\n        </div>\\n        \") : '', \"\\n        <div class=\\\"title\\\">\").concat(navbarTitleText, \"</div>\\n        \").concat(openIn !== 'page' ? \"\\n        <div class=\\\"right\\\">\\n          <a class=\\\"link popup-close\\\" data-popup=\\\".color-picker-popup\\\">\".concat(navbarCloseText, \"</a>\\n        </div>\\n        \") : '', \"\\n      </div>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderToolbar\",\n    value: function renderToolbar() {\n      var self = this;\n      if (self.params.renderToolbar) {\n        return self.params.renderToolbar.call(self, self);\n      }\n      return \"\\n    <div class=\\\"toolbar toolbar-top no-shadow\\\">\\n      <div class=\\\"toolbar-inner\\\">\\n        <div class=\\\"left\\\"></div>\\n        <div class=\\\"right\\\">\\n          <a class=\\\"link sheet-close popover-close\\\" data-sheet=\\\".color-picker-sheet-modal\\\" data-popover=\\\".color-picker-popover\\\">\".concat(self.params.toolbarCloseText, \"</a>\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n    }\n  }, {\n    key: \"renderInline\",\n    value: function renderInline() {\n      var self = this;\n      var _self$params2 = self.params,\n        cssClass = _self$params2.cssClass,\n        groupedModules = _self$params2.groupedModules;\n      var inlineHtml = \"\\n    <div class=\\\"color-picker color-picker-inline \".concat(groupedModules ? 'color-picker-grouped-modules' : '', \" \").concat(cssClass || '', \"\\\">\\n      \").concat(self.renderPicker(), \"\\n    </div>\\n  \").trim();\n      return inlineHtml;\n    }\n  }, {\n    key: \"renderSheet\",\n    value: function renderSheet() {\n      var self = this;\n      var _self$params3 = self.params,\n        cssClass = _self$params3.cssClass,\n        toolbarSheet = _self$params3.toolbarSheet,\n        groupedModules = _self$params3.groupedModules;\n      var sheetHtml = \"\\n    <div class=\\\"sheet-modal color-picker color-picker-sheet-modal \".concat(groupedModules ? 'color-picker-grouped-modules' : '', \" \").concat(cssClass || '', \"\\\">\\n      \").concat(toolbarSheet ? self.renderToolbar() : '', \"\\n      <div class=\\\"sheet-modal-inner\\\">\\n        <div class=\\\"page-content\\\">\\n          \").concat(self.renderPicker(), \"\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n      return sheetHtml;\n    }\n  }, {\n    key: \"renderPopover\",\n    value: function renderPopover() {\n      var self = this;\n      var _self$params4 = self.params,\n        cssClass = _self$params4.cssClass,\n        toolbarPopover = _self$params4.toolbarPopover,\n        groupedModules = _self$params4.groupedModules;\n      var popoverHtml = \"\\n    <div class=\\\"popover color-picker-popover \".concat(cssClass || '', \"\\\">\\n      <div class=\\\"popover-inner\\\">\\n        <div class=\\\"color-picker \").concat(groupedModules ? 'color-picker-grouped-modules' : '', \"\\\">\\n          \").concat(toolbarPopover ? self.renderToolbar() : '', \"\\n          <div class=\\\"page-content\\\">\\n            \").concat(self.renderPicker(), \"\\n          </div>\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n      return popoverHtml;\n    }\n  }, {\n    key: \"renderPopup\",\n    value: function renderPopup() {\n      var self = this;\n      var _self$params5 = self.params,\n        cssClass = _self$params5.cssClass,\n        navbarPopup = _self$params5.navbarPopup,\n        groupedModules = _self$params5.groupedModules;\n      var popupHtml = \"\\n    <div class=\\\"popup color-picker-popup \".concat(cssClass || '', \"\\\">\\n      <div class=\\\"page\\\">\\n        \").concat(navbarPopup ? self.renderNavbar() : '', \"\\n        <div class=\\\"color-picker \").concat(groupedModules ? 'color-picker-grouped-modules' : '', \"\\\">\\n          <div class=\\\"page-content\\\">\\n            \").concat(self.renderPicker(), \"\\n          </div>\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n      return popupHtml;\n    }\n  }, {\n    key: \"renderPage\",\n    value: function renderPage() {\n      var self = this;\n      var _self$params6 = self.params,\n        cssClass = _self$params6.cssClass,\n        groupedModules = _self$params6.groupedModules;\n      var pageHtml = \"\\n    <div class=\\\"page color-picker-page \".concat(cssClass || '', \"\\\" data-name=\\\"color-picker-page\\\">\\n      \").concat(self.renderNavbar(), \"\\n      <div class=\\\"color-picker \").concat(groupedModules ? 'color-picker-grouped-modules' : '', \"\\\">\\n        <div class=\\\"page-content\\\">\\n          \").concat(self.renderPicker(), \"\\n        </div>\\n      </div>\\n    </div>\\n  \").trim();\n      return pageHtml;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"render\",\n    value: function render() {\n      var self = this;\n      var params = self.params;\n      if (params.render) return params.render.call(self);\n      if (self.inline) return self.renderInline();\n      if (params.openIn === 'page') {\n        return self.renderPage();\n      }\n      var modalType = self.getModalType();\n      if (modalType === 'popover') return self.renderPopover();\n      if (modalType === 'sheet') return self.renderSheet();\n      if (modalType === 'popup') return self.renderPopup();\n    }\n  }, {\n    key: \"onOpen\",\n    value: function onOpen() {\n      var self = this;\n      var initialized = self.initialized,\n        $el = self.$el,\n        app = self.app,\n        $inputEl = self.$inputEl,\n        inline = self.inline,\n        value = self.value,\n        params = self.params,\n        modules = self.modules;\n      self.closing = false;\n      self.opened = true;\n      self.opening = true;\n\n      // Init main events\n      self.attachEvents();\n      params.modules.forEach(function (m) {\n        if (typeof m === 'string' && modules[m] && modules[m].init) {\n          modules[m].init(self);\n        } else if (m && m.init) {\n          m.init(self);\n        }\n      });\n      var updateValue = !value && params.value;\n\n      // Set value\n      if (!initialized) {\n        if (value) self.setValue(value);else if (params.value) {\n          self.setValue(params.value, false);\n        } else if (!params.value) {\n          self.setValue({\n            hex: '#ff0000'\n          }, false);\n        }\n      } else if (value) {\n        self.initialValue = utils[\"default\"].extend({}, value);\n        self.setValue(value, false);\n      }\n\n      // Update input value\n      if (updateValue) self.updateValue();\n      self.updateModules();\n\n      // Center modules\n      if (params.centerModules) {\n        self.centerModules();\n      }\n\n      // Extra focus\n      if (!inline && $inputEl && $inputEl.length && app.theme === 'md') {\n        $inputEl.trigger('focus');\n      }\n      self.initialized = true;\n\n      // Trigger events\n      if ($el) {\n        $el.trigger('colorpicker:open');\n      }\n      if ($inputEl) {\n        $inputEl.trigger('colorpicker:open');\n      }\n      self.emit('local::open colorPickerOpen', self);\n    }\n  }, {\n    key: \"onOpened\",\n    value: function onOpened() {\n      var self = this;\n      self.opening = false;\n      if (self.$el) {\n        self.$el.trigger('colorpicker:opened');\n      }\n      if (self.$inputEl) {\n        self.$inputEl.trigger('colorpicker:opened');\n      }\n      self.emit('local::opened colorPickerOpened', self);\n    }\n  }, {\n    key: \"onClose\",\n    value: function onClose() {\n      var self = this;\n      var app = self.app,\n        params = self.params,\n        modules = self.modules;\n      self.opening = false;\n      self.closing = true;\n\n      // Detach events\n      self.detachEvents();\n      if (self.$inputEl) {\n        if (app.theme === 'md') {\n          self.$inputEl.trigger('blur');\n        } else {\n          var validate = self.$inputEl.attr('validate');\n          var required = self.$inputEl.attr('required');\n          if (validate && required) {\n            app.input.validate(self.$inputEl);\n          }\n        }\n      }\n      params.modules.forEach(function (m) {\n        if (typeof m === 'string' && modules[m] && modules[m].destroy) {\n          modules[m].destroy(self);\n        } else if (m && m.destroy) {\n          m.destroy(self);\n        }\n      });\n      if (self.$el) {\n        self.$el.trigger('colorpicker:close');\n      }\n      if (self.$inputEl) {\n        self.$inputEl.trigger('colorpicker:close');\n      }\n      self.emit('local::close colorPickerClose', self);\n    }\n  }, {\n    key: \"onClosed\",\n    value: function onClosed() {\n      var self = this;\n      self.opened = false;\n      self.closing = false;\n      if (!self.inline) {\n        utils[\"default\"].nextTick(function () {\n          if (self.modal && self.modal.el && self.modal.destroy) {\n            if (!self.params.routableModals) {\n              self.modal.destroy();\n            }\n          }\n          delete self.modal;\n        });\n      }\n      if (self.$el) {\n        self.$el.trigger('colorpicker:closed');\n      }\n      if (self.$inputEl) {\n        self.$inputEl.trigger('colorpicker:closed');\n      }\n      self.emit('local::closed colorPickerClosed', self);\n    }\n  }, {\n    key: \"open\",\n    value: function open() {\n      var self = this;\n      var app = self.app,\n        opened = self.opened,\n        inline = self.inline,\n        $inputEl = self.$inputEl,\n        $targetEl = self.$targetEl,\n        params = self.params;\n      if (opened) return;\n      if (inline) {\n        self.$el = Object(dom7_module[\"default\"])(self.render());\n        self.$el[0].f7ColorPicker = self;\n        self.$containerEl.append(self.$el);\n        self.onOpen();\n        self.onOpened();\n        return;\n      }\n      var colorPickerContent = self.render();\n      if (params.openIn === 'page') {\n        self.view.router.navigate({\n          url: self.url,\n          route: {\n            content: colorPickerContent,\n            path: self.url,\n            on: {\n              pageBeforeIn: function pageBeforeIn(e, page) {\n                self.$el = page.$el.find('.color-picker');\n                self.$el[0].f7ColorPicker = self;\n                self.onOpen();\n              },\n              pageAfterIn: function pageAfterIn() {\n                self.onOpened();\n              },\n              pageBeforeOut: function pageBeforeOut() {\n                self.onClose();\n              },\n              pageAfterOut: function pageAfterOut() {\n                self.onClosed();\n                if (self.$el && self.$el[0]) {\n                  self.$el[0].f7ColorPicker = null;\n                  delete self.$el[0].f7ColorPicker;\n                }\n              }\n            }\n          }\n        });\n      } else {\n        var modalType = self.getModalType();\n        var backdrop = params.backdrop;\n        if (backdrop === null || typeof backdrop === 'undefined') {\n          if (modalType === 'popover' && app.params.popover.backdrop !== false) backdrop = true;\n          if (modalType === 'popup') backdrop = true;\n        }\n        var modalParams = {\n          targetEl: $targetEl || $inputEl,\n          scrollToEl: params.scrollToInput ? $targetEl || $inputEl : undefined,\n          content: colorPickerContent,\n          backdrop: backdrop,\n          closeByBackdropClick: params.closeByBackdropClick,\n          on: {\n            open: function open() {\n              var modal = this;\n              self.modal = modal;\n              self.$el = modalType === 'popover' || modalType === 'popup' ? modal.$el.find('.color-picker') : modal.$el;\n              self.$el[0].f7ColorPicker = self;\n              self.onOpen();\n            },\n            opened: function opened() {\n              self.onOpened();\n            },\n            close: function close() {\n              self.onClose();\n            },\n            closed: function closed() {\n              self.onClosed();\n              if (self.$el && self.$el[0]) {\n                self.$el[0].f7ColorPicker = null;\n                delete self.$el[0].f7ColorPicker;\n              }\n            }\n          }\n        };\n        if (modalType === 'popup') {\n          modalParams.push = params.popupPush;\n          modalParams.swipeToClose = params.popupSwipeToClose;\n        }\n        if (modalType === 'sheet') {\n          modalParams.push = params.sheetPush;\n          modalParams.swipeToClose = params.sheetSwipeToClose;\n        }\n        if (params.routableModals && self.view) {\n          self.view.router.navigate({\n            url: self.url,\n            route: defineProperty_default()({\n              path: self.url\n            }, modalType, modalParams)\n          });\n        } else {\n          self.modal = app[modalType].create(modalParams);\n          self.modal.open();\n        }\n      }\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      var self = this;\n      var opened = self.opened,\n        inline = self.inline;\n      if (!opened) return;\n      if (inline) {\n        self.onClose();\n        self.onClosed();\n        return;\n      }\n      if (self.params.routableModals && self.view || self.params.openIn === 'page') {\n        self.view.router.back();\n      } else {\n        self.modal.close();\n      }\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var self = this;\n      self.initInput();\n      if (self.inline) {\n        self.open();\n        self.emit('local::init colorPickerInit', self);\n        return;\n      }\n      if (!self.initialized && self.params.value) {\n        self.setValue(self.params.value);\n      }\n\n      // Attach input Events\n      if (self.$inputEl) {\n        self.attachInputEvents();\n      }\n      if (self.$targetEl) {\n        self.attachTargetEvents();\n      }\n      if (self.params.closeByOutsideClick) {\n        self.attachHtmlEvents();\n      }\n      self.emit('local::init colorPickerInit', self);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var self = this;\n      if (self.destroyed) return;\n      var $el = self.$el;\n      self.emit('local::beforeDestroy colorPickerBeforeDestroy', self);\n      if ($el) $el.trigger('colorpicker:beforedestroy');\n      self.close();\n\n      // Detach Events\n      self.detachEvents();\n      if (self.$inputEl) {\n        self.detachInputEvents();\n      }\n      if (self.$targetEl) {\n        self.detachTargetEvents();\n      }\n      if (self.params.closeByOutsideClick) {\n        self.detachHtmlEvents();\n      }\n      if ($el && $el.length) delete self.$el[0].f7ColorPicker;\n      utils[\"default\"].deleteProps(self);\n      self.destroyed = true;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var color_picker_class = (color_picker_class_ColorPicker);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/color-picker/color-picker.js\n\n\n\n/* harmony default export */ var color_picker = ({\n  name: 'colorPicker',\n  static: {\n    ColorPicker: color_picker_class\n  },\n  create: function create() {\n    var app = this;\n    app.colorPicker = constructor_methods({\n      defaultSelector: '.color-picker',\n      constructor: color_picker_class,\n      app: app,\n      domProp: 'f7ColorPicker'\n    });\n    app.colorPicker.close = function close() {\n      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.color-picker';\n      var $el = Object(dom7_module[\"default\"])(el);\n      if ($el.length === 0) return;\n      var colorPicker = $el[0].f7ColorPicker;\n      if (!colorPicker || colorPicker && !colorPicker.opened) return;\n      colorPicker.close();\n    };\n  },\n  params: {\n    colorPicker: {\n      // Color picker settings\n      value: null,\n      modules: ['wheel'],\n      palette: [['#FFEBEE', '#FFCDD2', '#EF9A9A', '#E57373', '#EF5350', '#F44336', '#E53935', '#D32F2F', '#C62828', '#B71C1C'], ['#F3E5F5', '#E1BEE7', '#CE93D8', '#BA68C8', '#AB47BC', '#9C27B0', '#8E24AA', '#7B1FA2', '#6A1B9A', '#4A148C'], ['#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E'], ['#E1F5FE', '#B3E5FC', '#81D4FA', '#4FC3F7', '#29B6F6', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B'], ['#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40'], ['#F1F8E9', '#DCEDC8', '#C5E1A5', '#AED581', '#9CCC65', '#8BC34A', '#7CB342', '#689F38', '#558B2F', '#33691E'], ['#FFFDE7', '#FFF9C4', '#FFF59D', '#FFF176', '#FFEE58', '#FFEB3B', '#FDD835', '#FBC02D', '#F9A825', '#F57F17'], ['#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100']],\n      groupedModules: false,\n      centerModules: true,\n      sliderLabel: false,\n      sliderValue: false,\n      sliderValueEdiable: false,\n      barLabel: false,\n      barValue: false,\n      barValueEdiable: false,\n      hexLabel: false,\n      hexValueEditable: false,\n      redLabelText: 'R',\n      greenLabelText: 'G',\n      blueLabelText: 'B',\n      hueLabelText: 'H',\n      saturationLabelText: 'S',\n      brightnessLabelText: 'B',\n      hexLabelText: 'HEX',\n      alphaLabelText: 'A',\n      // Common opener settings\n      containerEl: null,\n      openIn: 'popover',\n      // or 'popover' or 'sheet' or 'popup' or 'page' or 'auto'\n      openInPhone: 'popup',\n      // or 'popover' or 'sheet' or 'popup' or 'page'\n      popupPush: false,\n      popupSwipeToClose: undefined,\n      sheetPush: false,\n      sheetSwipeToClose: undefined,\n      formatValue: null,\n      targetEl: null,\n      targetElSetBackgroundColor: false,\n      inputEl: null,\n      inputReadOnly: true,\n      closeByOutsideClick: true,\n      scrollToInput: true,\n      toolbarSheet: true,\n      toolbarPopover: false,\n      toolbarCloseText: 'Done',\n      navbarPopup: true,\n      navbarCloseText: 'Done',\n      navbarTitleText: 'Color',\n      navbarBackLinkText: 'Back',\n      cssClass: null,\n      routableModals: true,\n      view: null,\n      url: 'color/',\n      backdrop: null,\n      closeByBackdropClick: true,\n      // Render functions\n      renderToolbar: null,\n      renderNavbar: null,\n      renderInline: null,\n      renderPopover: null,\n      renderSheet: null,\n      renderPopup: null,\n      render: null\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/treeview/treeview.js\n\n\nvar Treeview = {\n  open: function open(itemEl) {\n    var app = this;\n    var $itemEl = Object(dom7_module[\"default\"])(itemEl).eq(0);\n    if (!$itemEl.length) return;\n    $itemEl.addClass('treeview-item-opened');\n    $itemEl.trigger('treeview:open');\n    app.emit('treeviewOpen', $itemEl[0]);\n    function done(cancel) {\n      if (cancel) {\n        $itemEl.removeClass('treeview-item-opened');\n        $itemEl.trigger('treeview:close');\n        app.emit('treeviewClose', $itemEl[0]);\n      } else {\n        $itemEl[0].f7TreeviewChildrenLoaded = true;\n      }\n      $itemEl.find('.treeview-toggle').removeClass('treeview-toggle-hidden');\n      $itemEl.find('.treeview-preloader').remove();\n    }\n    if ($itemEl.hasClass('treeview-load-children') && !$itemEl[0].f7TreeviewChildrenLoaded) {\n      $itemEl.trigger('treeview:loadchildren', done);\n      app.emit('treeviewLoadChildren', $itemEl[0], done);\n      $itemEl.find('.treeview-toggle').addClass('treeview-toggle-hidden');\n      $itemEl.find('.treeview-item-root').prepend(\"<div class=\\\"preloader treeview-preloader\\\">\".concat(utils[\"default\"][\"\".concat(app.theme, \"PreloaderContent\")], \"</div>\"));\n    }\n  },\n  close: function close(itemEl) {\n    var app = this;\n    var $itemEl = Object(dom7_module[\"default\"])(itemEl).eq(0);\n    if (!$itemEl.length) return;\n    $itemEl.removeClass('treeview-item-opened');\n    $itemEl.trigger('treeview:close');\n    app.emit('treeviewClose', $itemEl[0]);\n  },\n  toggle: function toggle(itemEl) {\n    var app = this;\n    var $itemEl = Object(dom7_module[\"default\"])(itemEl).eq(0);\n    if (!$itemEl.length) return;\n    var wasOpened = $itemEl.hasClass('treeview-item-opened');\n    app.treeview[wasOpened ? 'close' : 'open']($itemEl);\n  }\n};\n/* harmony default export */ var treeview = ({\n  name: 'treeview',\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      treeview: {\n        open: Treeview.open.bind(app),\n        close: Treeview.close.bind(app),\n        toggle: Treeview.toggle.bind(app)\n      }\n    });\n  },\n  clicks: {\n    '.treeview-toggle': function toggle($clickedEl, clickedData, e) {\n      var app = this;\n      if ($clickedEl.parents('.treeview-item-toggle').length) return;\n      var $treeviewItemEl = $clickedEl.parents('.treeview-item').eq(0);\n      if (!$treeviewItemEl.length) return;\n      e.preventF7Router = true;\n      app.treeview.toggle($treeviewItemEl[0]);\n    },\n    '.treeview-item-toggle': function toggle($clickedEl, clickedData, e) {\n      var app = this;\n      var $treeviewItemEl = $clickedEl.closest('.treeview-item').eq(0);\n      if (!$treeviewItemEl.length) return;\n      e.preventF7Router = true;\n      app.treeview.toggle($treeviewItemEl[0]);\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/text-editor/text-editor-class.js\n\n\n\n\n\nfunction text_editor_class_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, text_editor_class_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction text_editor_class_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (text_editor_class_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\nvar textEditorButtonsMap = {\n  // f7-icon, material-icon, command\n  bold: ['bold', 'format_bold', 'bold'],\n  italic: ['italic', 'format_italic', 'italic'],\n  underline: ['underline', 'format_underlined', 'underline'],\n  strikeThrough: ['strikethrough', 'strikethrough_s', 'strikeThrough'],\n  orderedList: ['list_number', 'format_list_numbered', 'insertOrderedList'],\n  unorderedList: ['list_bullet', 'format_list_bulleted', 'insertUnorderedList'],\n  link: ['link', 'link', 'createLink'],\n  image: ['photo', 'image', 'insertImage'],\n  paragraph: ['paragraph', '<i class=\"icon\">¶</i>', 'formatBlock.P'],\n  h1: ['<i class=\"icon\">H<sub>1</sub></i>', '<i class=\"icon\">H<sub>1</sub></i>', 'formatBlock.H1'],\n  h2: ['<i class=\"icon\">H<sub>2</sub></i>', '<i class=\"icon\">H<sub>2</sub></i>', 'formatBlock.H2'],\n  h3: ['<i class=\"icon\">H<sub>3</sub></i>', '<i class=\"icon\">H<sub>3</sub></i>', 'formatBlock.H3'],\n  alignLeft: ['text_alignleft', 'format_align_left', 'justifyLeft'],\n  alignCenter: ['text_aligncenter', 'format_align_center', 'justifyCenter'],\n  alignRight: ['text_alignright', 'format_align_right', 'justifyRight'],\n  alignJustify: ['text_justify', 'format_align_justify', 'justifyFull'],\n  subscript: ['textformat_subscript', '<i class=\"icon\">A<sub>1</sub></i>', 'subscript'],\n  superscript: ['textformat_superscript', '<i class=\"icon\">A<sup>1</sup></i>', 'superscript'],\n  indent: ['increase_indent', 'format_indent_increase', 'indent'],\n  outdent: ['decrease_indent', 'format_indent_decrease', 'outdent']\n};\nvar text_editor_class_TextEditor = /*#__PURE__*/function (_Framework7Class) {\n  function TextEditor(app, params) {\n    var _this;\n    classCallCheck_default()(this, TextEditor);\n    _this = text_editor_class_callSuper(this, TextEditor, [params, [app]]);\n    var self = _this;\n    var defaults = utils[\"default\"].extend({}, app.params.textEditor);\n\n    // Extend defaults with modules params\n    self.useModulesParams(defaults);\n    self.params = utils[\"default\"].extend(defaults, params);\n    var el = self.params.el;\n    if (!el) return possibleConstructorReturn_default()(_this, self);\n    var $el = Object(dom7_module[\"default\"])(el);\n    if ($el.length === 0) return possibleConstructorReturn_default()(_this, self);\n    if ($el[0].f7TextEditor) return possibleConstructorReturn_default()(_this, $el[0].f7TextEditor);\n    var $contentEl = $el.children('.text-editor-content');\n    if (!$contentEl.length) {\n      $el.append('<div class=\"text-editor-content\" contenteditable></div>');\n      $contentEl = $el.children('.text-editor-content');\n    }\n    utils[\"default\"].extend(self, {\n      app: app,\n      $el: $el,\n      el: $el[0],\n      $contentEl: $contentEl,\n      contentEl: $contentEl[0]\n    });\n    if ('value' in params) {\n      self.value = self.params.value;\n    }\n    if (self.params.mode === 'keyboard-toolbar') {\n      if (!app.device.cordova && !app.device.android) {\n        self.params.mode = 'popover';\n      }\n    }\n    if (typeof self.params.buttons === 'string') {\n      try {\n        self.params.buttons = JSON.parse(self.params.buttons);\n      } catch (err) {\n        throw new Error('Framework7: TextEditor: wrong \"buttons\" parameter format');\n      }\n    }\n    $el[0].f7TextEditor = self;\n\n    // Bind\n    self.onButtonClick = self.onButtonClick.bind(self);\n    self.onFocus = self.onFocus.bind(self);\n    self.onBlur = self.onBlur.bind(self);\n    self.onInput = self.onInput.bind(self);\n    self.onPaste = self.onPaste.bind(self);\n    self.onSelectionChange = self.onSelectionChange.bind(self);\n    self.closeKeyboardToolbar = self.closeKeyboardToolbar.bind(self);\n\n    // Handle Events\n    self.attachEvents = function attachEvents() {\n      if (self.params.mode === 'toolbar') {\n        self.$el.find('.text-editor-toolbar').on('click', 'button', self.onButtonClick);\n      }\n      if (self.params.mode === 'keyboard-toolbar') {\n        self.$keyboardToolbarEl.on('click', 'button', self.onButtonClick);\n        self.$el.parents('.page').on('page:beforeout', self.closeKeyboardToolbar);\n      }\n      if (self.params.mode === 'popover' && self.popover) {\n        self.popover.$el.on('click', 'button', self.onButtonClick);\n      }\n      self.$contentEl.on('paste', self.onPaste);\n      self.$contentEl.on('focus', self.onFocus);\n      self.$contentEl.on('blur', self.onBlur);\n      self.$contentEl.on('input', self.onInput, true);\n      Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).on('selectionchange', self.onSelectionChange);\n    };\n    self.detachEvents = function detachEvents() {\n      if (self.params.mode === 'toolbar') {\n        self.$el.find('.text-editor-toolbar').off('click', 'button', self.onButtonClick);\n      }\n      if (self.params.mode === 'keyboard-toolbar') {\n        self.$keyboardToolbarEl.off('click', 'button', self.onButtonClick);\n        self.$el.parents('.page').off('page:beforeout', self.closeKeyboardToolbar);\n      }\n      if (self.params.mode === 'popover' && self.popover) {\n        self.popover.$el.off('click', 'button', self.onButtonClick);\n      }\n      self.$contentEl.off('paste', self.onPaste);\n      self.$contentEl.off('focus', self.onFocus);\n      self.$contentEl.off('blur', self.onBlur);\n      self.$contentEl.off('input', self.onInput, true);\n      Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"]).off('selectionchange', self.onSelectionChange);\n    };\n\n    // Install Modules\n    self.useModules();\n\n    // Init\n    self.init();\n    return possibleConstructorReturn_default()(_this, self);\n  }\n  inherits_default()(TextEditor, _Framework7Class);\n  return createClass_default()(TextEditor, [{\n    key: \"setValue\",\n    value: function setValue(newValue) {\n      var self = this;\n      var currentValue = self.value;\n      if (currentValue === newValue) return self;\n      self.value = newValue;\n      self.$contentEl.html(newValue);\n      self.$el.trigger('texteditor:change', self.value);\n      self.emit('local::change textEditorChange', self, self.value);\n      return self;\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      var self = this;\n      return self.value;\n    }\n  }, {\n    key: \"createLink\",\n    value: function createLink() {\n      var self = this;\n      var currentSelection = ssr_window_esm[\"window\"].getSelection();\n      var selectedNodes = [];\n      var $selectedLinks;\n      if (currentSelection && currentSelection.anchorNode && Object(dom7_module[\"default\"])(currentSelection.anchorNode).parents(self.$el).length) {\n        var anchorNode = currentSelection.anchorNode;\n        while (anchorNode) {\n          selectedNodes.push(anchorNode);\n          if (!anchorNode.nextSibling || anchorNode === currentSelection.focusNode) {\n            anchorNode = null;\n          }\n          if (anchorNode) {\n            anchorNode = anchorNode.nextSibling;\n          }\n        }\n        $selectedLinks = Object(dom7_module[\"default\"])(selectedNodes).closest('a').add(Object(dom7_module[\"default\"])(selectedNodes).children('a'));\n      }\n      if ($selectedLinks && $selectedLinks.length) {\n        $selectedLinks.each(function (linkIndex, linkNode) {\n          var selection = ssr_window_esm[\"window\"].getSelection();\n          var range = ssr_window_esm[\"document\"].createRange();\n          range.selectNodeContents(linkNode);\n          selection.removeAllRanges();\n          selection.addRange(range);\n          ssr_window_esm[\"document\"].execCommand('unlink', false);\n          selection.removeAllRanges();\n        });\n        return self;\n      }\n      var currentRange = self.getSelectionRange();\n      if (!currentRange) return self;\n      var dialog = self.app.dialog.prompt(self.params.linkUrlText, '', function (link) {\n        if (link && link.trim().length) {\n          self.setSelectionRange(currentRange);\n          ssr_window_esm[\"document\"].execCommand('createLink', false, link.trim());\n        }\n      });\n      dialog.$el.find('input').focus();\n      return self;\n    }\n  }, {\n    key: \"insertImage\",\n    value: function insertImage() {\n      var self = this;\n      var currentRange = self.getSelectionRange();\n      if (!currentRange) return self;\n      var dialog = self.app.dialog.prompt(self.params.imageUrlText, '', function (imageUrl) {\n        if (imageUrl && imageUrl.trim().length) {\n          self.setSelectionRange(currentRange);\n          ssr_window_esm[\"document\"].execCommand('insertImage', false, imageUrl.trim());\n        }\n      });\n      dialog.$el.find('input').focus();\n      return self;\n    }\n  }, {\n    key: \"removePlaceholder\",\n    value: function removePlaceholder() {\n      var self = this;\n      self.$contentEl.find('.text-editor-placeholder').remove();\n    }\n  }, {\n    key: \"insertPlaceholder\",\n    value: function insertPlaceholder() {\n      var self = this;\n      self.$contentEl.append(\"<div class=\\\"text-editor-placeholder\\\">\".concat(self.params.placeholder, \"</div>\"));\n    }\n  }, {\n    key: \"onSelectionChange\",\n    value: function onSelectionChange() {\n      var self = this;\n      if (self.params.mode === 'toolbar') return;\n      var selection = ssr_window_esm[\"window\"].getSelection();\n      var selectionIsInContent = Object(dom7_module[\"default\"])(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;\n      if (self.params.mode === 'keyboard-toolbar') {\n        if (!selectionIsInContent) {\n          self.closeKeyboardToolbar();\n        } else {\n          self.openKeyboardToolbar();\n        }\n        return;\n      }\n      if (self.params.mode === 'popover') {\n        var selectionIsInPopover = Object(dom7_module[\"default\"])(selection.anchorNode).parents(self.popover.el).length || selection.anchorNode === self.popover.el;\n        if (!selectionIsInContent && !selectionIsInPopover) {\n          self.closePopover();\n          return;\n        }\n        if (!selection.isCollapsed && selection.rangeCount) {\n          var range = selection.getRangeAt(0);\n          var rect = range.getBoundingClientRect();\n          var rootEl = self.app.root[0] || ssr_window_esm[\"document\"].body;\n          self.openPopover(rect.x + (ssr_window_esm[\"window\"].scrollX || 0) - rootEl.offsetLeft, rect.y + (ssr_window_esm[\"window\"].scrollY || 0) - rootEl.offsetTop, rect.width, rect.height);\n        } else if (selection.isCollapsed) {\n          self.closePopover();\n        }\n      }\n    }\n  }, {\n    key: \"onPaste\",\n    value: function onPaste(e) {\n      var self = this;\n      if (self.params.clearFormattingOnPaste && e.clipboardData && e.clipboardData.getData) {\n        var text = e.clipboardData.getData('text/plain');\n        e.preventDefault();\n        ssr_window_esm[\"document\"].execCommand('insertText', false, text);\n      }\n    }\n  }, {\n    key: \"onInput\",\n    value: function onInput() {\n      var self = this;\n      var value = self.$contentEl.html();\n      self.$el.trigger('texteditor:input');\n      self.emit('local:input textEditorInput', self);\n      self.value = value;\n      self.$el.trigger('texteditor:change', self.value);\n      self.emit('local::change textEditorChange', self, self.value);\n    }\n  }, {\n    key: \"onFocus\",\n    value: function onFocus() {\n      var self = this;\n      self.removePlaceholder();\n      self.$contentEl.focus();\n      self.$el.trigger('texteditor:focus');\n      self.emit('local::focus textEditorFocus', self);\n    }\n  }, {\n    key: \"onBlur\",\n    value: function onBlur() {\n      var self = this;\n      if (self.params.placeholder && self.$contentEl.html() === '') {\n        self.insertPlaceholder();\n      }\n      if (self.params.mode === 'popover') {\n        var selection = ssr_window_esm[\"window\"].getSelection();\n        var selectionIsInContent = Object(dom7_module[\"default\"])(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;\n        var inPopover = ssr_window_esm[\"document\"].activeElement && self.popover && Object(dom7_module[\"default\"])(ssr_window_esm[\"document\"].activeElement).closest(self.popover.$el).length;\n        if (!inPopover && !selectionIsInContent) {\n          self.closePopover();\n        }\n      }\n      if (self.params.mode === 'keyboard-toolbar') {\n        var _selection = ssr_window_esm[\"window\"].getSelection();\n        var _selectionIsInContent = Object(dom7_module[\"default\"])(_selection.anchorNode).parents(self.contentEl).length || _selection.anchorNode === self.contentEl;\n        if (!_selectionIsInContent) {\n          self.closeKeyboardToolbar();\n        }\n      }\n      self.$el.trigger('texteditor:blur');\n      self.emit('local::blur textEditorBlur', self);\n    }\n  }, {\n    key: \"onButtonClick\",\n    value: function onButtonClick(e) {\n      var self = this;\n      var selection = ssr_window_esm[\"window\"].getSelection();\n      var selectionIsInContent = Object(dom7_module[\"default\"])(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;\n      if (!selectionIsInContent) return;\n      var $buttonEl = Object(dom7_module[\"default\"])(e.target).closest('button');\n      if ($buttonEl.parents('form').length) {\n        e.preventDefault();\n      }\n      var button = $buttonEl.attr('data-button');\n      var buttonData = self.params.customButtons && self.params.customButtons[button];\n      if (!button || !(textEditorButtonsMap[button] || buttonData)) return;\n      $buttonEl.trigger('texteditor:buttonclick', button);\n      self.emit('local::buttonClick textEditorButtonClick', self, button);\n      if (buttonData) {\n        if (buttonData.onClick) buttonData.onClick(self, $buttonEl[0]);\n        return;\n      }\n      var command = textEditorButtonsMap[button][2];\n      if (command === 'createLink') {\n        self.createLink();\n        return;\n      }\n      if (command === 'insertImage') {\n        self.insertImage();\n        return;\n      }\n      if (command.indexOf('formatBlock') === 0) {\n        var tagName = command.split('.')[1];\n        var $anchorNode = Object(dom7_module[\"default\"])(selection.anchorNode);\n        if ($anchorNode.parents(tagName.toLowerCase()).length || $anchorNode.is(tagName)) {\n          ssr_window_esm[\"document\"].execCommand('formatBlock', false, 'div');\n        } else {\n          ssr_window_esm[\"document\"].execCommand('formatBlock', false, tagName);\n        }\n        return;\n      }\n      ssr_window_esm[\"document\"].execCommand(command, false);\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"getSelectionRange\",\n    value: function getSelectionRange() {\n      if (ssr_window_esm[\"window\"].getSelection) {\n        var sel = ssr_window_esm[\"window\"].getSelection();\n        if (sel.getRangeAt && sel.rangeCount) {\n          return sel.getRangeAt(0);\n        }\n      } else if (ssr_window_esm[\"document\"].selection && ssr_window_esm[\"document\"].selection.createRange) {\n        return ssr_window_esm[\"document\"].selection.createRange();\n      }\n      return null;\n    }\n\n    // eslint-disable-next-line\n  }, {\n    key: \"setSelectionRange\",\n    value: function setSelectionRange(range) {\n      if (range) {\n        if (ssr_window_esm[\"window\"].getSelection) {\n          var sel = ssr_window_esm[\"window\"].getSelection();\n          sel.removeAllRanges();\n          sel.addRange(range);\n        } else if (ssr_window_esm[\"document\"].selection && range.select) {\n          range.select();\n        }\n      }\n    }\n  }, {\n    key: \"renderButtons\",\n    value: function renderButtons() {\n      var self = this;\n      var html = '';\n      function renderButton(button) {\n        var iconClass = self.app.theme === 'md' ? 'material-icons' : 'f7-icons';\n        if (self.params.customButtons && self.params.customButtons[button]) {\n          var buttonData = self.params.customButtons[button];\n          return \"<button type=\\\"button\\\" class=\\\"text-editor-button\\\" data-button=\\\"\".concat(button, \"\\\">\").concat(buttonData.content || '', \"</button>\");\n        }\n        if (!textEditorButtonsMap[button]) return '';\n        var iconContent = textEditorButtonsMap[button][self.app.theme === 'md' ? 1 : 0];\n        return \"<button type=\\\"button\\\" class=\\\"text-editor-button\\\" data-button=\\\"\".concat(button, \"\\\">\").concat(iconContent.indexOf('<') >= 0 ? iconContent : \"<i class=\\\"\".concat(iconClass, \"\\\">\").concat(iconContent, \"</i>\"), \"</button>\").trim();\n      }\n      self.params.buttons.forEach(function (button, buttonIndex) {\n        if (Array.isArray(button)) {\n          button.forEach(function (b) {\n            html += renderButton(b);\n          });\n          if (buttonIndex < self.params.buttons.length - 1 && self.params.dividers) {\n            html += '<div class=\"text-editor-button-divider\"></div>';\n          }\n        } else {\n          html += renderButton(button);\n        }\n      });\n      return html;\n    }\n  }, {\n    key: \"createToolbar\",\n    value: function createToolbar() {\n      var self = this;\n      self.$el.prepend(\"<div class=\\\"text-editor-toolbar\\\">\".concat(self.renderButtons(), \"</div>\"));\n    }\n  }, {\n    key: \"createKeyboardToolbar\",\n    value: function createKeyboardToolbar() {\n      var self = this;\n      var isDark = self.$el.closest('.theme-dark').length > 0 || self.app.device.prefersColorScheme() === 'dark';\n      self.$keyboardToolbarEl = Object(dom7_module[\"default\"])(\"<div class=\\\"toolbar toolbar-bottom text-editor-keyboard-toolbar \".concat(isDark ? 'theme-dark' : '', \"\\\"><div class=\\\"toolbar-inner\\\">\").concat(self.renderButtons(), \"</div></div>\"));\n    }\n  }, {\n    key: \"createPopover\",\n    value: function createPopover() {\n      var self = this;\n      var isDark = self.$el.closest('.theme-dark').length > 0;\n      self.popover = self.app.popover.create({\n        content: \"\\n        <div class=\\\"popover \".concat(isDark ? 'theme-light' : 'theme-dark', \" text-editor-popover\\\">\\n          <div class=\\\"popover-inner\\\">\").concat(self.renderButtons(), \"</div>\\n        </div>\\n      \"),\n        closeByOutsideClick: false,\n        backdrop: false\n      });\n    }\n  }, {\n    key: \"openKeyboardToolbar\",\n    value: function openKeyboardToolbar() {\n      var self = this;\n      if (self.$keyboardToolbarEl.parent(self.app.root).length) return;\n      self.$el.trigger('texteditor:keyboardopen');\n      self.emit('local::keyboardOpen textEditorKeyboardOpen', self);\n      self.app.root.append(self.$keyboardToolbarEl);\n    }\n  }, {\n    key: \"closeKeyboardToolbar\",\n    value: function closeKeyboardToolbar() {\n      var self = this;\n      self.$keyboardToolbarEl.remove();\n      self.$el.trigger('texteditor:keyboardclose');\n      self.emit('local::keyboardClose textEditorKeyboardClose', self);\n    }\n  }, {\n    key: \"openPopover\",\n    value: function openPopover(targetX, targetY, targetWidth, targetHeight) {\n      var self = this;\n      if (!self.popover) return;\n      Object.assign(self.popover.params, {\n        targetX: targetX,\n        targetY: targetY,\n        targetWidth: targetWidth,\n        targetHeight: targetHeight\n      });\n      clearTimeout(self.popoverTimeout);\n      self.popoverTimeout = setTimeout(function () {\n        if (!self.popover) return;\n        if (self.popover.opened) {\n          self.popover.resize();\n        } else {\n          self.$el.trigger('texteditor:popoveropen');\n          self.emit('local::popoverOpen textEditorPopoverOpen', self);\n          self.popover.open();\n        }\n      }, 400);\n    }\n  }, {\n    key: \"closePopover\",\n    value: function closePopover() {\n      var self = this;\n      clearTimeout(self.popoverTimeout);\n      if (!self.popover || !self.popover.opened) return;\n      self.popoverTimeout = setTimeout(function () {\n        if (!self.popover) return;\n        self.$el.trigger('texteditor:popoverclose');\n        self.emit('local::popoverClose textEditorPopoverClose', self);\n        self.popover.close();\n      }, 400);\n    }\n  }, {\n    key: \"init\",\n    value: function init() {\n      var self = this;\n      if (self.value) {\n        self.$contentEl.html(self.value);\n      } else {\n        self.value = self.$contentEl.html();\n      }\n      if (self.params.placeholder && self.value === '') {\n        self.insertPlaceholder();\n      }\n      if (self.params.mode === 'toolbar') {\n        self.createToolbar();\n      } else if (self.params.mode === 'popover') {\n        self.createPopover();\n      } else if (self.params.mode === 'keyboard-toolbar') {\n        self.createKeyboardToolbar();\n      }\n      self.attachEvents();\n      self.$el.trigger('texteditor:init');\n      self.emit('local::init textEditorInit', self);\n      return self;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var self = this;\n      self.$el.trigger('texteditor:beforedestroy');\n      self.emit('local::beforeDestroy textEditorBeforeDestroy', self);\n      self.detachEvents();\n      if (self.params.mode === 'keyboard-toolbar' && self.$keyboardToolbarEl) {\n        self.$keyboardToolbarEl.remove();\n      }\n      if (self.popover) {\n        self.popover.close(false);\n        self.popover.destroy();\n      }\n      delete self.$el[0].f7TextEditor;\n      utils[\"default\"].deleteProps(self);\n      self = null;\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var text_editor_class = (text_editor_class_TextEditor);\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/text-editor/text-editor.js\n\n\n\n\n/* harmony default export */ var text_editor = ({\n  name: 'textEditor',\n  params: {\n    textEditor: {\n      el: null,\n      mode: 'toolbar',\n      // or 'popover'\n      value: undefined,\n      // will use html content\n      customButtons: null,\n      buttons: [['bold', 'italic', 'underline', 'strikeThrough'], ['orderedList', 'unorderedList'], ['link', 'image'], ['paragraph', 'h1', 'h2', 'h3'], ['alignLeft', 'alignCenter', 'alignRight', 'alignJustify'], ['subscript', 'superscript'], ['indent', 'outdent']],\n      dividers: true,\n      imageUrlText: 'Insert image URL',\n      linkUrlText: 'Insert link URL',\n      placeholder: null,\n      clearFormattingOnPaste: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    app.textEditor = utils[\"default\"].extend(constructor_methods({\n      defaultSelector: '.text-editor',\n      constructor: text_editor_class,\n      app: app,\n      domProp: 'f7TextEditor'\n    }));\n  },\n  static: {\n    TextEditor: text_editor_class\n  },\n  on: {\n    tabMounted: function tabMounted(tabEl) {\n      var app = this;\n      Object(dom7_module[\"default\"])(tabEl).find('.text-editor-init').each(function (index, editorEl) {\n        var dataset = Object(dom7_module[\"default\"])(editorEl).dataset();\n        app.textEditor.create(utils[\"default\"].extend({\n          el: editorEl\n        }, dataset || {}));\n      });\n    },\n    tabBeforeRemove: function tabBeforeRemove(tabEl) {\n      Object(dom7_module[\"default\"])(tabEl).find('.text-editor-init').each(function (index, editorEl) {\n        if (editorEl.f7TextEditor) editorEl.f7TextEditor.destroy();\n      });\n    },\n    pageInit: function pageInit(page) {\n      var app = this;\n      page.$el.find('.text-editor-init').each(function (index, editorEl) {\n        var dataset = Object(dom7_module[\"default\"])(editorEl).dataset();\n        app.textEditor.create(utils[\"default\"].extend({\n          el: editorEl\n        }, dataset || {}));\n      });\n    },\n    pageBeforeRemove: function pageBeforeRemove(page) {\n      page.$el.find('.text-editor-init').each(function (index, editorEl) {\n        if (editorEl.f7TextEditor) editorEl.f7TextEditor.destroy();\n      });\n    }\n  },\n  vnode: {\n    'text-editor-init': {\n      insert: function insert(vnode) {\n        var app = this;\n        var editorEl = vnode.elm;\n        var dataset = Object(dom7_module[\"default\"])(editorEl).dataset();\n        app.textEditor.create(utils[\"default\"].extend({\n          el: editorEl\n        }, dataset || {}));\n      },\n      destroy: function destroy(vnode) {\n        var editorEl = vnode.elm;\n        if (editorEl.f7TextEditor) editorEl.f7TextEditor.destroy();\n      }\n    }\n  }\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/elevation/elevation.js\n/* harmony default export */ var elevation = ({\n  name: 'elevation'\n});\n// CONCATENATED MODULE: ./node_modules/framework7-v575/components/typography/typography.js\n/* harmony default export */ var typography_typography = ({\n  name: 'typography'\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/book-navigation/book-navigation.js\nvar book_navigation = __webpack_require__(\"./src/core/custom_plugins/book-navigation/book-navigation.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-citations/css/citations-popup.less\nvar citations_popup = __webpack_require__(\"./src/core/custom_plugins/builder-citations/css/citations-popup.less\");\n\n// EXTERNAL MODULE: ./node_modules/jquery/dist/jquery.js\nvar jquery = __webpack_require__(\"./node_modules/jquery/dist/jquery.js\");\nvar jquery_default = /*#__PURE__*/__webpack_require__.n(jquery);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-citations/standards/iso690.js\nvar iso690 = __webpack_require__(\"./src/core/custom_plugins/builder-citations/standards/iso690.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-citations/standards/apa.js\n\n\n\n//https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/\n//https://www.scribbr.com/apa-examples/website/ -> APA generator i dobré vysvětlivky\nvar apa_APA = /*#__PURE__*/function () {\n  function APA(app) {\n    var _this = this;\n    classCallCheck_default()(this, APA);\n    this.app = app;\n    this.book = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.book\");\n      },\n      key: \"book\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"editor\", \"edition\", \"publishPlace\", \"publisher\", \"publishYear\", \"isbn\", \"doi\", \"url\"]\n    };\n    this.web = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.web\");\n      },\n      key: \"web\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"organization\", \"webName\", \"publishYear\", \"url\", \"where\", \"date\"]\n    };\n    this.note = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.custom\");\n      },\n      key: \"note\",\n      items: [\"apaRef\", \"description\"]\n    };\n    this.periodical = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.article\");\n      },\n      key: \"periodical\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"editor\", \"periodicName\", \"periodicSubname\", \"periodicNumber\", \"periodicIssue\", \"publisher\", \"publishYear\", \"range\", \"issn\", \"doi\", \"url\"]\n    };\n    this.standard = {\n      name: \"apa\",\n      items: [this.book, this.periodical, this.web, this.note]\n    };\n  }\n  return createClass_default()(APA, [{\n    key: \"periodicalString\",\n    value: function periodicalString(citation) {\n      var citationString = \"\";\n      // autoři\n      citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n\n      //rok vydání\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString += \" (\" + citation.publishYear + \") \";\n      }\n      citationString += citation.title;\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString += \": \" + citation.subtitle;\n      }\n      citationString += \". \";\n      if (citation.hasOwnProperty(\"editors\") && typeof citation.subtitle !== \"undefined\" && citation.editors.length > 0 && citation.editors[0].name != \"\" && citation.editors[0].surname != \"\") {\n        citationString += \"In \" + this.createCitationAuthorString(citation.editors);\n        if (citation.editors.length == 1) {\n          citationString += \" (Ed.)\";\n        } else {\n          citationString += \" (Eds.)\";\n        }\n        citationString += \". \";\n      }\n      if (citation.hasOwnProperty(\"name\") && citation.name !== \"\" && typeof citation.name !== \"undefined\") {\n        citationString += \"<em>\" + citation.name;\n      }\n      if (citation.hasOwnProperty(\"subname\") && citation.subname !== \"\" && typeof citation.subname !== \"undefined\") {\n        citationString += \": \" + citation.subname;\n      }\n      citationString += \"</em> \";\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\" || citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\" && citation.hasOwnProperty(\"edition\")) {\n        citationString = citationString + \", \";\n      } else {\n        citationString = citationString + \". \";\n      }\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString += citation.edition;\n      }\n      if (citation.hasOwnProperty(\"issue\") && citation.issue !== \"\" && typeof citation.issue !== \"undefined\") {\n        citationString += \"(\" + citation.issue + \") \";\n      }\n      if (citation.hasOwnProperty(\"range\") && citation.range !== \"\" && typeof citation.range !== \"undefined\") {\n        citationString += \", \";\n        citationString += citation.range;\n        citationString += \". \";\n      }\n\n      //  vydavatel\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString += citation.publisher + \". \";\n      }\n\n      //ISSN\n      if (citation.hasOwnProperty(\"issn\") && citation.issn !== \"\" && typeof citation.issn !== \"undefined\") {\n        citationString += citation.issn + \" \";\n      }\n\n      //ISSN + DOI oddělení\n      if (citation.hasOwnProperty(\"issn\") && citation.issn !== \"\" && typeof citation.issn !== \"undefined\" && citation.hasOwnProperty(\"doi\") && citation.doi !== \"\" && typeof citation.doi !== \"undefined\") {\n        citationString += \". \";\n      }\n\n      //  DOI/URL\n      if (citation.hasOwnProperty(\"doi\") && citation.doi !== \"\" && typeof citation.doi !== \"undefined\") {\n        citationString += 'DOI <a href=\"' + citation.doi + '\" class=\"external\" target=\"_blank\">' + citation.doi + \"</a> \";\n      }\n      if (citation.hasOwnProperty(\"url\") && citation.url !== \"\" && typeof citation.url !== \"undefined\" && citation.hasOwnProperty(\"doi\") && citation.doi !== \"\" && typeof citation.doi !== \"undefined\") {\n        citationString += \". \";\n      }\n      if (citation.hasOwnProperty(\"url\") && citation.url !== \"\" && typeof citation.url !== \"undefined\") {\n        citationString = citationString + this.app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      }\n      return citationString;\n    }\n  }, {\n    key: \"webString\",\n    value: function webString(citation) {\n      var citationString = \"\";\n      var authorCount = citation.authors.length;\n      if (authorCount == 0 || citation.authors[0].name == \"\" && citation.authors[0].surname == \"\") {\n        if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n          citationString += citation.publisher;\n        }\n      } else {\n        citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n      }\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString += \" (\" + citation.publishYear + \") \";\n      }\n      if (citation.hasOwnProperty(\"title\") && citation.title !== \"\" && typeof citation.title !== \"undefined\") {\n        citationString += \"<em>\" + citation.title + \"</em>\";\n        if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n          citationString += \"<em>: \" + citation.subtitle + \"</em>\";\n        }\n        citationString += \". \";\n      }\n      if (citation.hasOwnProperty(\"name\") && citation.name !== \"\" && typeof citation.name !== \"undefined\") {\n        citationString += citation.name;\n      }\n      citationString += \". \";\n      citationString += \"Retrieved \" + citation.date + \", \";\n      citationString += 'from <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      return citationString;\n    }\n  }, {\n    key: \"bookString\",\n    value: function bookString(citation) {\n      var citationString = \"\";\n      // autoři\n      if (citation.authors.length > 0) {\n        citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n      } else if (citation.hasOwnProperty(\"editors\") && citation.editors.length > 0) {\n        citationString = this.createCitationAuthorString(citation.editors);\n      }\n      //rok vydání\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString += \" (\" + citation.publishYear + \") \";\n      }\n\n      // název knihy\n      if (citation.hasOwnProperty(\"title\") && citation.title !== \"\" && typeof citation.title !== \"undefined\") {\n        citationString += \"<em>\" + citation.title + \"</em>\";\n      }\n\n      // podnázev knihy\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString += \"<em>: \" + citation.subtitle + \"</em>\";\n        citationString += \". \";\n      } else {\n        citationString += \". \";\n      }\n      if (citation.authors.length > 0) {\n        if (citation.hasOwnProperty(\"editors\") && typeof citation.subtitle !== \"undefined\" && citation.editors.length > 0 && citation.editors[0].name != \"\" && citation.editors[0].surname != \"\") {\n          citationString += \"In \" + this.createCitationAuthorString(citation.editors);\n          if (citation.editors.length == 1) {\n            citationString += \" (Ed.)\";\n          } else {\n            citationString += \" (Eds.)\";\n          }\n          citationString += \". \";\n        }\n      }\n\n      //Rozsah v knize\n      if (citation.hasOwnProperty(\"range\") && citation.range !== \"\" && typeof citation.range !== \"undefined\") {\n        citationString += \" (\" + citation.range + \"). \";\n      }\n\n      //poradi vydani\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString += \" (\" + citation.edition + \") \";\n      }\n\n      //místo vydání\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace != \"\" && typeof_default()(citation.publishPlace) != undefined) {\n        citationString += citation.publishPlace;\n        if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n          citationString += \": \";\n        }\n      }\n\n      //  vydavatel\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString += citation.publisher + \". \";\n      }\n\n      //  ISBN\n      if (citation.hasOwnProperty(\"isbn\") && citation.isbn !== \"\" && typeof citation.isbn !== \"undefined\") {\n        citationString += \"ISBN \" + citation.isbn + \". \";\n      }\n\n      //  DOI\n      if (citation.hasOwnProperty(\"doi\") && citation.doi !== \"\" && typeof citation.doi !== \"undefined\") {\n        citationString += 'DOI <a href=\"' + citation.doi + '\">' + citation.doi + \"</a>. \";\n      }\n      if (citation.hasOwnProperty(\"url\") && citation.url !== \"\" && typeof citation.url !== \"undefined\") {\n        citationString = citationString + this.app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      }\n      return citationString;\n    }\n  }, {\n    key: \"createCitationAuthorString\",\n    value: function createCitationAuthorString(authors, col) {\n      var _this2 = this;\n      var authorsString = \"\";\n      var countAuthors = authors.length;\n      authors.forEach(function (author, i) {\n        //TODO fix\n\n        if (author.surname && author.surname.length > 0) {\n          if (_this2.app.citations.params.fixNameCase) {\n            authorsString += author.surname.charAt(0).toUpperCase() + author.surname.slice(1).toLowerCase();\n          } else {\n            authorsString += author.surname;\n          }\n        }\n        if (author.name && author.name.length > 0) {\n          authorsString += \", \";\n          authorsString += author.name.charAt(0).toUpperCase() + \".\";\n        }\n        if (countAuthors > 1 && i != countAuthors - 1) {\n          authorsString += \", \";\n        }\n        if (countAuthors == 2 && i != countAuthors - 1) {\n          authorsString += \"& \";\n        }\n      });\n      if (col && col.length > 0) {\n        authorsString += \" \" + this.app.translation.t(\"citations:strings.colective\");\n      }\n      return authorsString;\n    }\n  }, {\n    key: \"rangeString\",\n    value: function rangeString(citation) {\n      var rangeString = \"\";\n      var refCit = _.find(this.app.citations.params.data, function (o) {\n        return o.id == citation.ref && !o.deleted;\n      });\n      var refCitCopy = _.cloneDeep(refCit);\n      refCitCopy[\"range\"] = citation.range;\n      switch (refCit.type) {\n        case \"book\":\n          rangeString = this.bookString(refCitCopy);\n          break;\n        case \"web\":\n          rangeString = this.webString(refCitCopy);\n          break;\n        case \"jurnal\":\n          rangeString = this.jurnalString(refCitCopy);\n          break;\n        case \"academic_work\":\n          break;\n        case \"periodical\":\n          rangeString = this.periodicalString(refCitCopy);\n          break;\n      }\n      return rangeString;\n    }\n  }, {\n    key: \"getStandard\",\n    value: function getStandard() {\n      return this.standard;\n    }\n  }]);\n}();\n/* harmony default export */ var apa = ({\n  APA: apa_APA\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-citations/citationStandards.js\n\n\nvar factories = {\n  iso690: iso690[\"default\"].ISO690,\n  apa: apa.APA\n};\n/* harmony default export */ var citationStandards = ({\n  get: function get(name, app) {\n    var standard = factories[name];\n    return new standard(app);\n  },\n  getAll: function getAll() {\n    var all = [];\n    Object.keys(factories).forEach(function (key) {\n      all.push(key);\n    });\n    return all;\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-citations/citationsAttributes.js\n\n\nvar citationsAttributes_CitationsAttributes = /*#__PURE__*/function () {\n  function CitationsAttributes(app) {\n    var _this = this;\n    classCallCheck_default()(this, CitationsAttributes);\n    this.app = app;\n\n    //objekt validation musí být definován i když je prazdný\n    this.attributes = [{\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.title\");\n      },\n      key: \"title\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.subtitle\");\n      },\n      key: \"subtitle\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.edition\");\n      },\n      key: \"edition\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.publishPlace\");\n      },\n      key: \"publishPlace\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.authorsCol\");\n      },\n      key: \"authorsCol\",\n      type: \"bool\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.publisher\");\n      },\n      key: \"publisher\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.publishYear\");\n      },\n      key: \"publishYear\",\n      type: \"number\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.range\");\n      },\n      key: \"range\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return \"ISBN\";\n      },\n      key: \"isbn\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return \"DOI\";\n      },\n      key: \"doi\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.webName\");\n      },\n      key: \"name\",\n      subKey: \"webName\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.organization\");\n      },\n      key: \"publisher\",\n      subKey: \"organization\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return \"URL\";\n      },\n      key: \"url\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.where\");\n      },\n      key: \"where\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.date\");\n      },\n      key: \"date\",\n      type: \"date\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.description\");\n      },\n      key: \"description\",\n      type: \"textarea\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.periodicName\");\n      },\n      key: \"name\",\n      subKey: \"periodicName\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.periodicSubname\");\n      },\n      key: \"subname\",\n      subKey: \"periodicSubname\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.number\");\n      },\n      key: \"edition\",\n      subKey: \"periodicNumber\",\n      type: \"number\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.issue\");\n      },\n      key: \"issue\",\n      subKey: \"periodicIssue\",\n      type: \"number\",\n      validation: {}\n    }, {\n      label: function label() {\n        return \"ISSN\";\n      },\n      key: \"issn\",\n      type: \"text\",\n      validation: {}\n    }, {\n      label: function label() {\n        return _this.app.translation.t(\"citations:attributes.apaRef\");\n      },\n      key: \"apaRef\",\n      type: \"text\",\n      validation: {\n        required: true\n      }\n    }];\n    this.author = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:attributes.authors\");\n      },\n      key: \"authors\",\n      addNextText: function addNextText() {\n        return _this.app.translation.t(\"citations:attributes.addAuthor\");\n      },\n      removeText: function removeText() {\n        return _this.app.translation.t(\"citations:attributes.removeAuthor\");\n      },\n      items: [{\n        label: function label() {\n          return _this.app.translation.t(\"citations:attributes.authorName\");\n        },\n        key: \"name\",\n        type: \"text\",\n        validation: {}\n      }, {\n        label: function label() {\n          return _this.app.translation.t(\"citations:attributes.authorSurname\");\n        },\n        key: \"surname\",\n        type: \"text\",\n        validation: {}\n      }]\n    };\n    this.editor = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:attributes.editors\");\n      },\n      key: \"editors\",\n      addNextText: function addNextText() {\n        return _this.app.translation.t(\"citations:attributes.addEditor\");\n      },\n      removeText: function removeText() {\n        return _this.app.translation.t(\"citations:attributes.removeEditor\");\n      },\n      items: [{\n        label: function label() {\n          return _this.app.translation.t(\"citations:attributes.editorName\");\n        },\n        key: \"name\",\n        type: \"text\",\n        validation: {}\n      }, {\n        label: function label() {\n          return _this.app.translation.t(\"citations:attributes.editorSurname\");\n        },\n        key: \"surname\",\n        type: \"text\",\n        validation: {}\n      }]\n    };\n  }\n  return createClass_default()(CitationsAttributes, [{\n    key: \"getAttributesDefinition\",\n    value: function getAttributesDefinition(searchKey) {\n      switch (searchKey) {\n        case \"author\":\n          return this.author;\n        case \"editor\":\n          return this.editor;\n        default:\n          return _.find(this.attributes, function (o) {\n            return o.key == searchKey || o.subKey == searchKey;\n          });\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var citationsAttributes = ({\n  CitationsAttributes: citationsAttributes_CitationsAttributes\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-citations/citations.js\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n\n\n\nvar citations_Citations = /*#__PURE__*/function () {\n  function Citations(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Citations);\n    this.app = app;\n    var citations = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.citations, params);\n    citations.params = extendedParams;\n    app.on(\"init\", function () {\n      // debugger;\n      if (app.data.hasOwnProperty(\"myEvents\")) {\n        app.data.myEvents.on(\"builder:ready\", function (e) {\n          app.citations.standardFunctions = citationStandards.get(app.citations.params.standard, app);\n          app.builder.beforeRender = app.utils.extender(app.builder.beforeRender, function (f) {\n            if (typeof f === \"string\") {\n              var standard = app.citations.params.standard;\n              var reCit = new RegExp(/{{citation:[\\d+:]*}}/gm, \"gmi\");\n              var citationMatch = f.match(reCit);\n              if (citationMatch != null) {\n                var citationList = app.citations.params.data;\n                citationMatch.forEach(function (item) {\n                  var allCitIn = item.match(/\\d+/gm);\n                  // debugger;\n                  // let citationId = item.replace(/\\D+/gm, \"\");\n                  var citText = \"\";\n                  var citationEl = \"<span class='citation-container \".concat(standard, \"'>\");\n                  if (standard == \"apa\") {\n                    citationEl += '<span class=\"citation-bracket\">(</span>';\n                  }\n                  allCitIn.forEach(function (citationId, index) {\n                    var citation = _.find(citationList, function (o) {\n                      return o.id == citationId && o.deleted === false;\n                    });\n\n                    // debugger;\n\n                    var rangeRef = null;\n                    if (citation != undefined) {\n                      switch (standard) {\n                        case \"apa\":\n                          if (citation.type == \"range\") {\n                            rangeRef = citation.id;\n                            citation = _.find(app.citations.params.data, function (o) {\n                              return citation.ref == o.id;\n                            });\n                          }\n                          var author = \"\";\n                          if (citation.hasOwnProperty(\"authors\") && citation.authors.length > 0 && citation.authors[0].name != \"\" && citation.authors[0].surname != \"\") {\n                            var formatSurname = function formatSurname(surname) {\n                              return app.citations.params.fixNameCase ? surname.charAt(0).toUpperCase() + surname.slice(1).toLowerCase() : surname;\n                            };\n                            if (citation.authors.length === 1) {\n                              author += formatSurname(citation.authors[0].surname);\n                            } else if (citation.authors.length === 2) {\n                              author += \"\".concat(formatSurname(citation.authors[0].surname), \" & \").concat(formatSurname(citation.authors[1].surname));\n                            } else if (citation.authors.length > 2) {\n                              author += \"\".concat(formatSurname(citation.authors[0].surname), \" et al.\");\n                            }\n                            // debugger;\n                          } else if (citation.hasOwnProperty(\"publisher\") && citation.publisher != \"\") {\n                            author += citation.publisher;\n                          } else if (citation.type == \"web\" && citation.hasOwnProperty(\"name\") && citation.name != \"\") {\n                            author += citation.name;\n                          }\n                          if (citation.hasOwnProperty(\"authors\") && citation.authors.length > 0 && author != \"\" || citation.hasOwnProperty(\"publisher\") && citation.publisher != \"\") {\n                            citText += \"<span class=\\\"citation-author\\\">\".concat(author, \", </span>\");\n                          }\n                          if (citation.publishYear != undefined && citation.publishYear != \"\") {\n                            citText += \"<span class=\\\"citation-year\\\">\".concat(citation.publishYear, \"</span>\");\n                          } else {\n                            if (citation.type != \"note\") {\n                              citText += \"<span class=\\\"citation-year\\\">n.d.</span>\";\n                            }\n                          }\n                          if (citation.type == \"note\") {\n                            if (citation.hasOwnProperty(\"apaRef\")) {\n                              citText += citation.apaRef;\n                            } else {\n                              citText += app.translation.t(\"citations:popup.prevNotFound\");\n                            }\n                          }\n                          break;\n                        case \"iso690\":\n                          citText = citation.position;\n                          break;\n                      }\n                    }\n                    if (citation && !citation.deleted) {\n                      if (standard == \"iso690\") {\n                        citationEl += \"<span style=\\\"visibility: hidden;\\\">\".concat(citText, \"</span>\");\n                      }\n                      citationEl += \"<a class=\\\"citation \".concat(standard, \"\\\" href=\\\"#\\\" data-citation=\\\"\").concat(rangeRef == null ? citation.id : rangeRef, \"\\\">\").concat(citText, \"</a>\");\n                    }\n                    if (allCitIn.length != index + 1) {\n                      citationEl += \"; \";\n                    }\n                    citText = \"\";\n                    // debugger;\n                  });\n                  if (standard == \"apa\") {\n                    citationEl += '<span class=\"citation-bracket\">)</span>';\n                  }\n                  citationEl += \"</span>\";\n                  var reCit2 = new RegExp(/{{citation:[\\d+:]*}}/m, \"mi\");\n                  f = f.replace(reCit2, citationEl);\n                });\n              }\n            }\n            return f;\n          });\n        });\n      }\n      app.translation.addResourceBundle(\"cs\", \"citations\", app.citations.params.lang.cs);\n      app.translation.addResourceBundle(\"en\", \"citations\", app.citations.params.lang.en);\n      app.citations.attributes = new citationsAttributes.CitationsAttributes(app);\n\n      //překlad citačního popupu\n      if (app.citations.params.title == \"Citace\") {\n        app.citations.params.title = app.translation.t(\"citations:popup.title\");\n      }\n      if (app.citations.params.close == \"Zavřít\") {\n        app.citations.params.close = app.translation.t(\"citations:popup.close\");\n      }\n    });\n    this.createCitationString = this.createCitationString.bind(this);\n    this.openCitation = this.openCitation.bind(this);\n    this.allStandards = citationStandards.getAll();\n  }\n  return createClass_default()(Citations, [{\n    key: \"createCitationString\",\n    value: function createCitationString(citationId) {\n      var citationList = this.app.citations.params.data;\n      var citation;\n      var standFunctions = citationStandards.get(this.app.citations.params.standard, this.app);\n      if (citationList) {\n        if (Array.isArray(citationList) && citationList.length && citationList[0].hasOwnProperty(\"id\")) {\n          citation = _.find(this.app.citations.params.data, function (o) {\n            return o.id === citationId;\n          });\n        } else {\n          citation = this.app.citations.params.data[citationId];\n        }\n      } else {\n        return \"Citace s ID \\\"\".concat(citationId, \"\\\" nebyla nalezena.\");\n      }\n      var citationString = \"\";\n      switch (citation.type) {\n        case \"book\":\n          citationString = standFunctions.bookString(citation);\n          break;\n        case \"web\":\n          citationString = standFunctions.webString(citation);\n          break;\n        case \"note\":\n          // debugger;\n          citationString = citation.description.replaceAll(\"<a\", '<a class=\"external\" target=\"_blank\" ');\n          citationString = citationString.replaceAll('href=\"www.', 'href=\"https://www.');\n          break;\n        case \"jurnal\":\n          citationString = standFunctions.jurnalString(citation);\n          break;\n        case \"periodical\":\n          citationString = standFunctions.periodicalString(citation);\n          break;\n        case \"academic_work\":\n          citationString = standFunctions.academicString(citation);\n          break;\n        case \"range\":\n          citationString = standFunctions.rangeString(citation);\n          break;\n      }\n      return citationString;\n    }\n  }, {\n    key: \"openCitation\",\n    value: function openCitation($citationEL) {\n      var _this = this;\n      var citationId = parseInt($citationEL.attr(\"data-citation\"));\n      if (!citationId) {\n        this.app.dialog.alert(\"Citace \" + citationId + \" nenalezena. Kontaktujte prosím správce knihy.\", \"Upozornění\");\n      }\n      var citationString = this.createCitationString(citationId);\n      var app = this.app;\n      var popup = this.app.popup.create({\n        content: \"\\n        <div class=\\\"popup citations-popup\\\">\\n        <div class=\\\"block\\\">\\n          <h2>\\n            \".concat(app.citations.params.title, \"\\n\\n            \").concat(app.builder && app.builder.params.development.enable ? '<i class=\"icon material-icons edit-citation-btn\">edit</i>' : \"\", \"\\n          </h2>\\n\\n        <p class=\\\"citation-text\\\">\\n        \").concat(citationString, \"\\n        </p>\\n        <p style=\\\"text-align: left;\\\">\\n          <a href=\\\"#\\\" class=\\\"link popup-close\\\">\\n          \").concat(app.citations.params.close, \"\\n          </a>\\n        </p>\\n        </div>\\n        </div>\\n        \")\n      });\n      var popupEl = popup.$el;\n      var edit = popupEl.find(\".edit-citation-btn\");\n      var citTxtEl = popupEl.find(\".citation-text\")[0];\n      edit.off(\"click\");\n      edit.on(\"click\", function (e) {\n        var citCreationPopup = app.popup.create({\n          content: \"\\n          <div class=\\\"popup popup-citations-create\\\" data-edit=\\\"\".concat(citationId, \"\\\">\\n              <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n              <div class=\\\"toolbar\\\">\\n                  <div class=\\\"toolbar-inner\\\">\\n                      <h2 class=\\\"\\\">\").concat(app.translation.t(\"citations:list.edit\"), \"</h2>\\n                  </div>\\n              </div>\\n              <div class=\\\"view view-citation-popup\\\"></div>\\n          </div>\\n      \"),\n          on: {\n            open: function open(el) {\n              app.views.create(\".view-citation-popup\", {\n                url: \"/builder-citations-create/\",\n                pushState: false,\n                reloadCurrent: true\n              });\n            },\n            close: function close(el) {\n              var editedString = _this.createCitationString(citationId);\n              citTxtEl.innerHTML = editedString;\n            }\n          }\n        });\n        citCreationPopup.open();\n      });\n      popup.open();\n      // debugger;\n    }\n  }]);\n}();\n/* harmony default export */ var builder_citations_citations = ({\n  name: \"citations\",\n  params: {\n    citations: {\n      title: \"Citace\",\n      close: \"Zavřít\",\n      data: [],\n      standard: \"iso690\",\n      fixNameCase: true,\n      lang: {\n        cs: {\n          list: {\n            title: \"Správa citací\",\n            norm: \"Citační norma\",\n            add: \"Přidat novou citaci\",\n            create: \"Vytvoření citace\",\n            edit: \"Úprava citace\",\n            range: \"Vyvořit rozsah\",\n            selectRange: \"Zvolte rozsah citace\",\n            addCtiation: \"Vytvořit citaci\",\n            editCitation: \"Upravit citaci\",\n            editRange: \"Upravit rozsah citace\"\n          },\n          attributes: {\n            title: \"Název\",\n            subtitle: \"Podnázev\",\n            edition: \"Vydání\",\n            publishPlace: \"Místo vydání\",\n            publisher: \"Nakladatelství\",\n            publishYear: \"Rok vydání\",\n            webName: \"Název webu\",\n            where: \"Nosič\",\n            date: \"Datum citování\",\n            description: \"Text citace\",\n            periodicName: \"Název periodika\",\n            periodicSubname: \"Podnázev periodika\",\n            number: \"Číslo vydání\",\n            authors: \"Autoři\",\n            addAuthor: \"Přidat autora\",\n            removeAuthor: \"Odebrat autora\",\n            authorName: \"Jméno\",\n            authorSurname: \"Příjmení\",\n            editors: \"Editoři\",\n            addEditor: \"Přidat editora\",\n            removeEditor: \"Odebrat editora\",\n            editorName: \"Jméno\",\n            editorSurname: \"Příjmení\",\n            issue: \"Vydání\",\n            apaRef: \"Náhled v textu\",\n            organization: \"Organizace\",\n            range: \"Rozsah stran\",\n            authorsCol: \"Přidat a kol.\"\n          },\n          strings: {\n            available: \"Dostupné z\",\n            and: \"a\",\n            colective: \"a kol.\"\n          },\n          types: {\n            book: \"Kniha\",\n            article: \"Článek\",\n            web: \"Webová stránka\",\n            custom: \"Volná citace\"\n          },\n          popup: {\n            title: \"Citace\",\n            close: \"Zavřít\",\n            prevNotFound: \"Náhled nebyl zadán\"\n          }\n        },\n        en: {\n          list: {\n            title: \"Citations management\",\n            norm: \"Citation standard\",\n            add: \"Add new citation\",\n            create: \"Create citation\",\n            edit: \"Edit citation\",\n            range: \"Create a range\",\n            selectRange: \"Enter a range of the citation\",\n            addCtiation: \"Create citation\",\n            editCitation: \"Edit citation\",\n            editRange: \"Edit citation range\"\n          },\n          attributes: {\n            title: \"Title\",\n            subtitle: \"Subtitle\",\n            edition: \"Edition\",\n            publishPlace: \"Publish place\",\n            publisher: \"Publisher\",\n            publishYear: \"Publish year\",\n            webName: \"Website name\",\n            where: \"Carrier\",\n            date: \"Date of citation\",\n            description: \"Citation text\",\n            periodicName: \"Periodical title\",\n            periodicSubname: \"Periodical subtitle\",\n            number: \"Volume\",\n            authors: \"Authors\",\n            addAuthor: \"Add author\",\n            removeAuthor: \"Remove author\",\n            authorName: \"Name\",\n            authorSurname: \"Surname\",\n            editors: \"Editors\",\n            addEditor: \"Add editor\",\n            removeEditor: \"Remove editor\",\n            editorName: \"Name\",\n            editorSurname: \"Surname\",\n            issue: \"Issue\",\n            apaRef: \"Preview in text\",\n            organization: \"Organization\",\n            range: \"Range of pages\",\n            authorsCol: \"Append et al.\"\n          },\n          strings: {\n            available: \"Available from\",\n            and: \"and\",\n            colective: \"et al.\"\n          },\n          types: {\n            book: \"Book\",\n            article: \"Article\",\n            web: \"Website\",\n            custom: \"Custom citation\"\n          },\n          popup: {\n            title: \"Citation\",\n            close: \"Close\",\n            prevNotFound: \"Preview is unset\"\n          }\n        }\n      }\n    }\n  },\n  static: {\n    Citations: citations_Citations\n  },\n  create: function create() {\n    var app = this;\n    app.citations = new citations_Citations(app);\n  },\n  clicks: {\n    \".citation, a.citation\": function open($clickedEl, e) {\n      // debugger;\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      return new citations_Citations(app).openCitation($clickedEl);\n    }\n  }\n});\n// EXTERNAL MODULE: ./node_modules/rangetouch/dist/rangetouch.js\nvar rangetouch = __webpack_require__(\"./node_modules/rangetouch/dist/rangetouch.js\");\nvar rangetouch_default = /*#__PURE__*/__webpack_require__.n(rangetouch);\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/is.js\n// ==========================================================================\r\n// Type checking utils\r\n// ==========================================================================\r\n\r\nconst getConstructor = input => (input !== null && typeof input !== 'undefined' ? input.constructor : null);\r\nconst instanceOf = (input, constructor) => Boolean(input && constructor && input instanceof constructor);\r\nconst isNullOrUndefined = input => input === null || typeof input === 'undefined';\r\nconst isObject = input => getConstructor(input) === Object;\r\nconst isNumber = input => getConstructor(input) === Number && !Number.isNaN(input);\r\nconst isString = input => getConstructor(input) === String;\r\nconst isBoolean = input => getConstructor(input) === Boolean;\r\nconst isFunction = input => getConstructor(input) === Function;\r\nconst isArray = input => Array.isArray(input);\r\nconst isWeakMap = input => instanceOf(input, WeakMap);\r\nconst isNodeList = input => instanceOf(input, NodeList);\r\nconst is_isElement = input => instanceOf(input, Element);\r\nconst isTextNode = input => getConstructor(input) === Text;\r\nconst isEvent = input => instanceOf(input, Event);\r\nconst isKeyboardEvent = input => instanceOf(input, KeyboardEvent);\r\nconst isCue = input => instanceOf(input, window.TextTrackCue) || instanceOf(input, window.VTTCue);\r\nconst isTrack = input => instanceOf(input, TextTrack) || (!isNullOrUndefined(input) && isString(input.kind));\r\nconst isPromise = input => instanceOf(input, Promise);\r\n\r\nconst isEmpty = input =>\r\n    isNullOrUndefined(input) ||\r\n    ((isString(input) || isArray(input) || isNodeList(input)) && !input.length) ||\r\n    (isObject(input) && !Object.keys(input).length);\r\n\r\nconst isUrl = input => {\r\n    // Accept a URL object\r\n    if (instanceOf(input, window.URL)) {\r\n        return true;\r\n    }\r\n\r\n    // Must be string from here\r\n    if (!isString(input)) {\r\n        return false;\r\n    }\r\n\r\n    // Add the protocol if required\r\n    let string = input;\r\n    if (!input.startsWith('http://') || !input.startsWith('https://')) {\r\n        string = `http://${input}`;\r\n    }\r\n\r\n    try {\r\n        return !isEmpty(new URL(string).hostname);\r\n    } catch (e) {\r\n        return false;\r\n    }\r\n};\r\n\r\n/* harmony default export */ var utils_is = ({\r\n    nullOrUndefined: isNullOrUndefined,\r\n    object: isObject,\r\n    number: isNumber,\r\n    string: isString,\r\n    boolean: isBoolean,\r\n    function: isFunction,\r\n    array: isArray,\r\n    weakMap: isWeakMap,\r\n    nodeList: isNodeList,\r\n    element: is_isElement,\r\n    textNode: isTextNode,\r\n    event: isEvent,\r\n    keyboardEvent: isKeyboardEvent,\r\n    cue: isCue,\r\n    track: isTrack,\r\n    promise: isPromise,\r\n    url: isUrl,\r\n    empty: isEmpty,\r\n});\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/events.js\n// ==========================================================================\r\n// Event utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n// Check for passive event listener support\r\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n// https://www.youtube.com/watch?v=NPM6172J22g\r\nconst supportsPassiveListeners = (() => {\r\n    // Test via a getter in the options object to see if the passive property is accessed\r\n    let supported = false;\r\n    try {\r\n        const options = Object.defineProperty({}, 'passive', {\r\n            get() {\r\n                supported = true;\r\n                return null;\r\n            },\r\n        });\r\n        window.addEventListener('test', null, options);\r\n        window.removeEventListener('test', null, options);\r\n    } catch (e) {\r\n        // Do nothing\r\n    }\r\n\r\n    return supported;\r\n})();\r\n\r\n// Toggle event listener\r\nfunction toggleListener(element, event, callback, toggle = false, passive = true, capture = false) {\r\n    // Bail if no element, event, or callback\r\n    if (!element || !('addEventListener' in element) || utils_is.empty(event) || !utils_is.function(callback)) {\r\n        return;\r\n    }\r\n\r\n    // Allow multiple events\r\n    const events = event.split(' ');\r\n\r\n    // Build options\r\n    // Default to just the capture boolean for browsers with no passive listener support\r\n    let options = capture;\r\n\r\n    // If passive events listeners are supported\r\n    if (supportsPassiveListeners) {\r\n        options = {\r\n            // Whether the listener can be passive (i.e. default never prevented)\r\n            passive,\r\n            // Whether the listener is a capturing listener or not\r\n            capture,\r\n        };\r\n    }\r\n\r\n    // If a single node is passed, bind the event listener\r\n    events.forEach(type => {\r\n        if (this && this.eventListeners && toggle) {\r\n            // Cache event listener\r\n            this.eventListeners.push({ element, type, callback, options });\r\n        }\r\n\r\n        element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options);\r\n    });\r\n}\r\n\r\n// Bind event handler\r\nfunction events_on(element, events = '', callback, passive = true, capture = false) {\r\n    toggleListener.call(this, element, events, callback, true, passive, capture);\r\n}\r\n\r\n// Unbind event handler\r\nfunction off(element, events = '', callback, passive = true, capture = false) {\r\n    toggleListener.call(this, element, events, callback, false, passive, capture);\r\n}\r\n\r\n// Bind once-only event handler\r\nfunction events_once(element, events = '', callback, passive = true, capture = false) {\r\n    const onceCallback = (...args) => {\r\n        off(element, events, onceCallback, passive, capture);\r\n        callback.apply(this, args);\r\n    };\r\n\r\n    toggleListener.call(this, element, events, onceCallback, true, passive, capture);\r\n}\r\n\r\n// Trigger event\r\nfunction triggerEvent(element, type = '', bubbles = false, detail = {}) {\r\n    // Bail if no element\r\n    if (!utils_is.element(element) || utils_is.empty(type)) {\r\n        return;\r\n    }\r\n\r\n    // Create and dispatch the event\r\n    const event = new CustomEvent(type, {\r\n        bubbles,\r\n        detail: Object.assign({}, detail, {\r\n            plyr: this,\r\n        }),\r\n    });\r\n\r\n    // Dispatch the event\r\n    element.dispatchEvent(event);\r\n}\r\n\r\n// Unbind all cached event listeners\r\nfunction unbindListeners() {\r\n    if (this && this.eventListeners) {\r\n        this.eventListeners.forEach(item => {\r\n            const { element, type, callback, options } = item;\r\n            element.removeEventListener(type, callback, options);\r\n        });\r\n\r\n        this.eventListeners = [];\r\n    }\r\n}\r\n\r\n// Run method when / if player is ready\r\nfunction ready() {\r\n    return new Promise(resolve =>\r\n        this.ready ? setTimeout(resolve, 0) : events_on.call(this, this.elements.container, 'ready', resolve),\r\n    ).then(() => {});\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/elements.js\n// ==========================================================================\r\n// Element utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n// Wrap an element\r\nfunction wrap(elements, wrapper) {\r\n    // Convert `elements` to an array, if necessary.\r\n    const targets = elements.length ? elements : [elements];\r\n\r\n    // Loops backwards to prevent having to clone the wrapper on the\r\n    // first element (see `child` below).\r\n    Array.from(targets)\r\n        .reverse()\r\n        .forEach((element, index) => {\r\n            const child = index > 0 ? wrapper.cloneNode(true) : wrapper;\r\n\r\n            // Cache the current parent and sibling.\r\n            const parent = element.parentNode;\r\n            const sibling = element.nextSibling;\r\n\r\n            // Wrap the element (is automatically removed from its current\r\n            // parent).\r\n            child.appendChild(element);\r\n\r\n            // If the element had a sibling, insert the wrapper before\r\n            // the sibling to maintain the HTML structure; otherwise, just\r\n            // append it to the parent.\r\n            if (sibling) {\r\n                parent.insertBefore(child, sibling);\r\n            } else {\r\n                parent.appendChild(child);\r\n            }\r\n        });\r\n}\r\n\r\n// Set attributes\r\nfunction setAttributes(element, attributes) {\r\n    if (!utils_is.element(element) || utils_is.empty(attributes)) {\r\n        return;\r\n    }\r\n\r\n    // Assume null and undefined attributes should be left out,\r\n    // Setting them would otherwise convert them to \"null\" and \"undefined\"\r\n    Object.entries(attributes)\r\n        .filter(([, value]) => !utils_is.nullOrUndefined(value))\r\n        .forEach(([key, value]) => element.setAttribute(key, value));\r\n}\r\n\r\n// Create a DocumentFragment\r\nfunction elements_createElement(type, attributes, text) {\r\n    // Create a new <element>\r\n    const element = document.createElement(type);\r\n\r\n    // Set all passed attributes\r\n    if (utils_is.object(attributes)) {\r\n        setAttributes(element, attributes);\r\n    }\r\n\r\n    // Add text node\r\n    if (utils_is.string(text)) {\r\n        element.innerText = text;\r\n    }\r\n\r\n    // Return built element\r\n    return element;\r\n}\r\n\r\n// Inaert an element after another\r\nfunction insertAfter(element, target) {\r\n    if (!utils_is.element(element) || !utils_is.element(target)) {\r\n        return;\r\n    }\r\n\r\n    target.parentNode.insertBefore(element, target.nextSibling);\r\n}\r\n\r\n// Insert a DocumentFragment\r\nfunction insertElement(type, parent, attributes, text) {\r\n    if (!utils_is.element(parent)) {\r\n        return;\r\n    }\r\n\r\n    parent.appendChild(elements_createElement(type, attributes, text));\r\n}\r\n\r\n// Remove element(s)\r\nfunction removeElement(element) {\r\n    if (utils_is.nodeList(element) || utils_is.array(element)) {\r\n        Array.from(element).forEach(removeElement);\r\n        return;\r\n    }\r\n\r\n    if (!utils_is.element(element) || !utils_is.element(element.parentNode)) {\r\n        return;\r\n    }\r\n\r\n    element.parentNode.removeChild(element);\r\n}\r\n\r\n// Remove all child elements\r\nfunction emptyElement(element) {\r\n    if (!utils_is.element(element)) {\r\n        return;\r\n    }\r\n\r\n    let { length } = element.childNodes;\r\n\r\n    while (length > 0) {\r\n        element.removeChild(element.lastChild);\r\n        length -= 1;\r\n    }\r\n}\r\n\r\n// Replace element\r\nfunction replaceElement(newChild, oldChild) {\r\n    if (!utils_is.element(oldChild) || !utils_is.element(oldChild.parentNode) || !utils_is.element(newChild)) {\r\n        return null;\r\n    }\r\n\r\n    oldChild.parentNode.replaceChild(newChild, oldChild);\r\n\r\n    return newChild;\r\n}\r\n\r\n// Get an attribute object from a string selector\r\nfunction getAttributesFromSelector(sel, existingAttributes) {\r\n    // For example:\r\n    // '.test' to { class: 'test' }\r\n    // '#test' to { id: 'test' }\r\n    // '[data-test=\"test\"]' to { 'data-test': 'test' }\r\n\r\n    if (!utils_is.string(sel) || utils_is.empty(sel)) {\r\n        return {};\r\n    }\r\n\r\n    const attributes = {};\r\n    const existing = existingAttributes;\r\n\r\n    sel.split(',').forEach(s => {\r\n        // Remove whitespace\r\n        const selector = s.trim();\r\n        const className = selector.replace('.', '');\r\n        const stripped = selector.replace(/[[\\]]/g, '');\r\n\r\n        // Get the parts and value\r\n        const parts = stripped.split('=');\r\n        const key = parts[0];\r\n        const value = parts.length > 1 ? parts[1].replace(/[\"']/g, '') : '';\r\n\r\n        // Get the first character\r\n        const start = selector.charAt(0);\r\n\r\n        switch (start) {\r\n            case '.':\r\n                // Add to existing classname\r\n                if (utils_is.object(existing) && utils_is.string(existing.class)) {\r\n                    existing.class += ` ${className}`;\r\n                }\r\n\r\n                attributes.class = className;\r\n                break;\r\n\r\n            case '#':\r\n                // ID selector\r\n                attributes.id = selector.replace('#', '');\r\n                break;\r\n\r\n            case '[':\r\n                // Attribute selector\r\n                attributes[key] = value;\r\n\r\n                break;\r\n\r\n            default:\r\n                break;\r\n        }\r\n    });\r\n\r\n    return attributes;\r\n}\r\n\r\n// Toggle hidden\r\nfunction toggleHidden(element, hidden) {\r\n    if (!utils_is.element(element)) {\r\n        return;\r\n    }\r\n\r\n    let hide = hidden;\r\n\r\n    if (!utils_is.boolean(hide)) {\r\n        hide = !element.hidden;\r\n    }\r\n\r\n    if (hide) {\r\n        element.setAttribute('hidden', '');\r\n    } else {\r\n        element.removeAttribute('hidden');\r\n    }\r\n}\r\n\r\n// Mirror Element.classList.toggle, with IE compatibility for \"force\" argument\r\nfunction toggleClass(element, className, force) {\r\n    if (utils_is.nodeList(element)) {\r\n        return Array.from(element).map(e => toggleClass(e, className, force));\r\n    }\r\n\r\n    if (utils_is.element(element)) {\r\n        let method = 'toggle';\r\n        if (typeof force !== 'undefined') {\r\n            method = force ? 'add' : 'remove';\r\n        }\r\n\r\n        element.classList[method](className);\r\n        return element.classList.contains(className);\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\n// Has class name\r\nfunction hasClass(element, className) {\r\n    return utils_is.element(element) && element.classList.contains(className);\r\n}\r\n\r\n// Element matches selector\r\nfunction elements_matches(element, selector) {\r\n    const prototype = { Element };\r\n\r\n    function match() {\r\n        return Array.from(document.querySelectorAll(selector)).includes(this);\r\n    }\r\n\r\n    const matches =\r\n        prototype.matches ||\r\n        prototype.webkitMatchesSelector ||\r\n        prototype.mozMatchesSelector ||\r\n        prototype.msMatchesSelector ||\r\n        match;\r\n\r\n    return matches.call(element, selector);\r\n}\r\n\r\n// Find all elements\r\nfunction getElements(selector) {\r\n    return this.elements.container.querySelectorAll(selector);\r\n}\r\n\r\n// Find a single element\r\nfunction getElement(selector) {\r\n    return this.elements.container.querySelector(selector);\r\n}\r\n\r\n// Trap focus inside container\r\nfunction trapFocus(element = null, toggle = false) {\r\n    if (!utils_is.element(element)) {\r\n        return;\r\n    }\r\n\r\n    const focusable = getElements.call(this, 'button:not(:disabled), input:not(:disabled), [tabindex]');\r\n    const first = focusable[0];\r\n    const last = focusable[focusable.length - 1];\r\n\r\n    const trap = event => {\r\n        // Bail if not tab key or not fullscreen\r\n        if (event.key !== 'Tab' || event.keyCode !== 9) {\r\n            return;\r\n        }\r\n\r\n        // Get the current focused element\r\n        const focused = document.activeElement;\r\n\r\n        if (focused === last && !event.shiftKey) {\r\n            // Move focus to first element that can be tabbed if Shift isn't used\r\n            first.focus();\r\n            event.preventDefault();\r\n        } else if (focused === first && event.shiftKey) {\r\n            // Move focus to last element that can be tabbed if Shift is used\r\n            last.focus();\r\n            event.preventDefault();\r\n        }\r\n    };\r\n\r\n    toggleListener.call(this, this.elements.container, 'keydown', trap, toggle, false);\r\n}\r\n\r\n// Set focus and tab focus class\r\nfunction elements_setFocus(element = null, tabFocus = false) {\r\n    if (!utils_is.element(element)) {\r\n        return;\r\n    }\r\n\r\n    // Set regular focus\r\n    element.focus({ preventScroll: true });\r\n\r\n    // If we want to mimic keyboard focus via tab\r\n    if (tabFocus) {\r\n        toggleClass(element, this.config.classNames.tabFocus);\r\n    }\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/animation.js\n// ==========================================================================\r\n// Animation utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\nconst transitionEndEvent = (() => {\r\n    const element = document.createElement('span');\r\n\r\n    const events = {\r\n        WebkitTransition: 'webkitTransitionEnd',\r\n        MozTransition: 'transitionend',\r\n        OTransition: 'oTransitionEnd otransitionend',\r\n        transition: 'transitionend',\r\n    };\r\n\r\n    const type = Object.keys(events).find(event => element.style[event] !== undefined);\r\n\r\n    return utils_is.string(type) ? events[type] : false;\r\n})();\r\n\r\n// Force repaint of element\r\nfunction repaint(element) {\r\n    setTimeout(() => {\r\n        try {\r\n            toggleHidden(element, true);\r\n            element.offsetHeight; // eslint-disable-line\r\n            toggleHidden(element, false);\r\n        } catch (e) {\r\n            // Do nothing\r\n        }\r\n    }, 0);\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/browser.js\n// ==========================================================================\r\n// Browser sniffing\r\n// Unfortunately, due to mixed support, UA sniffing is required\r\n// ==========================================================================\r\n\r\nconst utils_browser_browser = {\r\n    isIE: /* @cc_on!@ */  false || !!document.documentMode,\r\n    isEdge: window.navigator.userAgent.includes('Edge'),\r\n    isWebkit: 'WebkitAppearance' in document.documentElement.style && !/Edge/.test(navigator.userAgent),\r\n    isIPhone: /(iPhone|iPod)/gi.test(navigator.platform),\r\n    isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform),\r\n};\r\n\r\n/* harmony default export */ var utils_browser = (utils_browser_browser);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/support.js\n// ==========================================================================\r\n// Plyr support checks\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Default codecs for checking mimetype support\r\nconst defaultCodecs = {\r\n    'audio/ogg': 'vorbis',\r\n    'audio/wav': '1',\r\n    'video/webm': 'vp8, vorbis',\r\n    'video/mp4': 'avc1.42E01E, mp4a.40.2',\r\n    'video/ogg': 'theora',\r\n};\r\n\r\n// Check for feature support\r\nconst js_support_support = {\r\n    // Basic support\r\n    audio: 'canPlayType' in document.createElement('audio'),\r\n    video: 'canPlayType' in document.createElement('video'),\r\n\r\n    // Check for support\r\n    // Basic functionality vs full UI\r\n    check(type, provider, playsinline) {\r\n        const canPlayInline = utils_browser.isIPhone && playsinline && js_support_support.playsinline;\r\n        const api = js_support_support[type] || provider !== 'html5';\r\n        const ui = api && js_support_support.rangeInput && (type !== 'video' || !utils_browser.isIPhone || canPlayInline);\r\n\r\n        return {\r\n            api,\r\n            ui,\r\n        };\r\n    },\r\n\r\n    // Picture-in-picture support\r\n    // Safari & Chrome only currently\r\n    pip: (() => {\r\n        if (utils_browser.isIPhone) {\r\n            return false;\r\n        }\r\n\r\n        // Safari\r\n        // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls\r\n        if (utils_is.function(elements_createElement('video').webkitSetPresentationMode)) {\r\n            return true;\r\n        }\r\n\r\n        // Chrome\r\n        // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture\r\n        if (document.pictureInPictureEnabled && !elements_createElement('video').disablePictureInPicture) {\r\n            return true;\r\n        }\r\n\r\n        return false;\r\n    })(),\r\n\r\n    // Airplay support\r\n    // Safari only currently\r\n    airplay: utils_is.function(window.WebKitPlaybackTargetAvailabilityEvent),\r\n\r\n    // Inline playback support\r\n    // https://webkit.org/blog/6784/new-video-policies-for-ios/\r\n    playsinline: 'playsInline' in document.createElement('video'),\r\n\r\n    // Check for mime type support against a player instance\r\n    // Credits: http://diveintohtml5.info/everything.html\r\n    // Related: http://www.leanbackplayer.com/test/h5mt.html\r\n    mime(input) {\r\n        if (utils_is.empty(input)) {\r\n            return false;\r\n        }\r\n\r\n        const [mediaType] = input.split('/');\r\n        let type = input;\r\n\r\n        // Verify we're using HTML5 and there's no media type mismatch\r\n        if (!this.isHTML5 || mediaType !== this.type) {\r\n            return false;\r\n        }\r\n\r\n        // Add codec if required\r\n        if (Object.keys(defaultCodecs).includes(type)) {\r\n            type += `; codecs=\"${defaultCodecs[input]}\"`;\r\n        }\r\n\r\n        try {\r\n            return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));\r\n        } catch (e) {\r\n            return false;\r\n        }\r\n    },\r\n\r\n    // Check for textTracks support\r\n    textTracks: 'textTracks' in document.createElement('video'),\r\n\r\n    // <input type=\"range\"> Sliders\r\n    rangeInput: (() => {\r\n        const range = document.createElement('input');\r\n        range.type = 'range';\r\n        return range.type === 'range';\r\n    })(),\r\n\r\n    // Touch\r\n    // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event\r\n    touch: 'ontouchstart' in document.documentElement,\r\n\r\n    // Detect transitions support\r\n    transitions: transitionEndEvent !== false,\r\n\r\n    // Reduced motion iOS & MacOS setting\r\n    // https://webkit.org/blog/7551/responsive-design-for-motion/\r\n    reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches,\r\n};\r\n\r\n/* harmony default export */ var js_support = (js_support_support);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/html5.js\n// ==========================================================================\r\n// Plyr HTML5 helpers\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst html5 = {\r\n    getSources() {\r\n        if (!this.isHTML5) {\r\n            return [];\r\n        }\r\n\r\n        const sources = Array.from(this.media.querySelectorAll('source'));\r\n\r\n        // Filter out unsupported sources (if type is specified)\r\n        return sources.filter(source => {\r\n            const type = source.getAttribute('type');\r\n\r\n            if (utils_is.empty(type)) {\r\n                return true;\r\n            }\r\n\r\n            return js_support.mime.call(this, type);\r\n        });\r\n    },\r\n\r\n    // Get quality levels\r\n    getQualityOptions() {\r\n        // Get sizes from <source> elements\r\n        return html5.getSources\r\n            .call(this)\r\n            .map(source => Number(source.getAttribute('size')))\r\n            .filter(Boolean);\r\n    },\r\n\r\n    extend() {\r\n        if (!this.isHTML5) {\r\n            return;\r\n        }\r\n\r\n        const player = this;\r\n\r\n        // Quality\r\n        Object.defineProperty(player.media, 'quality', {\r\n            get() {\r\n                // Get sources\r\n                const sources = html5.getSources.call(player);\r\n                const source = sources.find(source => source.getAttribute('src') === player.source);\r\n\r\n                // Return size, if match is found\r\n                return source && Number(source.getAttribute('size'));\r\n            },\r\n            set(input) {\r\n                // Get sources\r\n                const sources = html5.getSources.call(player);\r\n\r\n                // Get first match for requested size\r\n                const source = sources.find(source => Number(source.getAttribute('size')) === input);\r\n\r\n                // No matching source found\r\n                if (!source) {\r\n                    return;\r\n                }\r\n\r\n                // Get current state\r\n                const { currentTime, paused, preload, readyState } = player.media;\r\n\r\n                // Set new source\r\n                player.media.src = source.getAttribute('src');\r\n\r\n                // Prevent loading if preload=\"none\" and the current source isn't loaded (#1044)\r\n                if (preload !== 'none' || readyState) {\r\n                    // Restore time\r\n                    player.once('loadedmetadata', () => {\r\n                        player.currentTime = currentTime;\r\n\r\n                        // Resume playing\r\n                        if (!paused) {\r\n                            player.play();\r\n                        }\r\n                    });\r\n\r\n                    // Load new source\r\n                    player.media.load();\r\n                }\r\n\r\n                // Trigger change event\r\n                triggerEvent.call(player, player.media, 'qualitychange', false, {\r\n                    quality: input,\r\n                });\r\n            },\r\n        });\r\n    },\r\n\r\n    // Cancel current network requests\r\n    // See https://github.com/sampotts/plyr/issues/174\r\n    cancelRequests() {\r\n        if (!this.isHTML5) {\r\n            return;\r\n        }\r\n\r\n        // Remove child sources\r\n        removeElement(html5.getSources.call(this));\r\n\r\n        // Set blank video src attribute\r\n        // This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error\r\n        // Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection\r\n        this.media.setAttribute('src', this.config.blankVideo);\r\n\r\n        // Load the new empty source\r\n        // This will cancel existing requests\r\n        // See https://github.com/sampotts/plyr/issues/174\r\n        this.media.load();\r\n\r\n        // Debugging\r\n        this.debug.log('Cancelled network requests');\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_html5 = (html5);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/arrays.js\n// ==========================================================================\r\n// Array utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n// Remove duplicates in an array\r\nfunction dedupe(array) {\r\n    if (!utils_is.array(array)) {\r\n        return array;\r\n    }\r\n\r\n    return array.filter((item, index) => array.indexOf(item) === index);\r\n}\r\n\r\n// Get the closest value in an array\r\nfunction closest(array, value) {\r\n    if (!utils_is.array(array) || !array.length) {\r\n        return null;\r\n    }\r\n\r\n    return array.reduce((prev, curr) => (Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev));\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/objects.js\n// ==========================================================================\r\n// Object utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n// Clone nested objects\r\nfunction cloneDeep(object) {\r\n    return JSON.parse(JSON.stringify(object));\r\n}\r\n\r\n// Get a nested value in an object\r\nfunction getDeep(object, path) {\r\n    return path.split('.').reduce((obj, key) => obj && obj[key], object);\r\n}\r\n\r\n// Deep extend destination object with N more objects\r\nfunction extend(target = {}, ...sources) {\r\n    if (!sources.length) {\r\n        return target;\r\n    }\r\n\r\n    const source = sources.shift();\r\n\r\n    if (!utils_is.object(source)) {\r\n        return target;\r\n    }\r\n\r\n    Object.keys(source).forEach(key => {\r\n        if (utils_is.object(source[key])) {\r\n            if (!Object.keys(target).includes(key)) {\r\n                Object.assign(target, { [key]: {} });\r\n            }\r\n\r\n            extend(target[key], source[key]);\r\n        } else {\r\n            Object.assign(target, { [key]: source[key] });\r\n        }\r\n    });\r\n\r\n    return extend(target, ...sources);\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/strings.js\n// ==========================================================================\r\n// String utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n// Generate a random ID\r\nfunction generateId(prefix) {\r\n    return `${prefix}-${Math.floor(Math.random() * 10000)}`;\r\n}\r\n\r\n// Format string\r\nfunction strings_format(input, ...args) {\r\n    if (utils_is.empty(input)) {\r\n        return input;\r\n    }\r\n\r\n    return input.toString().replace(/{(\\d+)}/g, (match, i) => args[i].toString());\r\n}\r\n\r\n// Get percentage\r\nfunction getPercentage(current, max) {\r\n    if (current === 0 || max === 0 || Number.isNaN(current) || Number.isNaN(max)) {\r\n        return 0;\r\n    }\r\n\r\n    return ((current / max) * 100).toFixed(2);\r\n}\r\n\r\n// Replace all occurances of a string in a string\r\nfunction replaceAll(input = '', find = '', replace = '') {\r\n    return input.replace(\r\n        new RegExp(find.toString().replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1'), 'g'),\r\n        replace.toString(),\r\n    );\r\n}\r\n\r\n// Convert to title case\r\nfunction toTitleCase(input = '') {\r\n    return input.toString().replace(/\\w\\S*/g, text => text.charAt(0).toUpperCase() + text.substr(1).toLowerCase());\r\n}\r\n\r\n// Convert string to pascalCase\r\nfunction toPascalCase(input = '') {\r\n    let string = input.toString();\r\n\r\n    // Convert kebab case\r\n    string = replaceAll(string, '-', ' ');\r\n\r\n    // Convert snake case\r\n    string = replaceAll(string, '_', ' ');\r\n\r\n    // Convert to title case\r\n    string = toTitleCase(string);\r\n\r\n    // Convert to pascal case\r\n    return replaceAll(string, ' ', '');\r\n}\r\n\r\n// Convert string to pascalCase\r\nfunction strings_toCamelCase(input = '') {\r\n    let string = input.toString();\r\n\r\n    // Convert to pascal case\r\n    string = toPascalCase(string);\r\n\r\n    // Convert first character to lowercase\r\n    return string.charAt(0).toLowerCase() + string.slice(1);\r\n}\r\n\r\n// Remove HTML from a string\r\nfunction stripHTML(source) {\r\n    const fragment = document.createDocumentFragment();\r\n    const element = document.createElement('div');\r\n    fragment.appendChild(element);\r\n    element.innerHTML = source;\r\n    return fragment.firstChild.innerText;\r\n}\r\n\r\n// Like outerHTML, but also works for DocumentFragment\r\nfunction getHTML(element) {\r\n    const wrapper = document.createElement('div');\r\n    wrapper.appendChild(element);\r\n    return wrapper.innerHTML;\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/i18n.js\n// ==========================================================================\r\n// Plyr internationalization\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n// Skip i18n for abbreviations and brand names\r\nconst resources = {\r\n    pip: 'PIP',\r\n    airplay: 'AirPlay',\r\n    html5: 'HTML5',\r\n    vimeo: 'Vimeo',\r\n    youtube: 'YouTube',\r\n};\r\n\r\nconst i18n = {\r\n    get(key = '', config = {}) {\r\n        if (utils_is.empty(key) || utils_is.empty(config)) {\r\n            return '';\r\n        }\r\n\r\n        let string = getDeep(config.i18n, key);\r\n\r\n        if (utils_is.empty(string)) {\r\n            if (Object.keys(resources).includes(key)) {\r\n                return resources[key];\r\n            }\r\n\r\n            return '';\r\n        }\r\n\r\n        const replace = {\r\n            '{seektime}': config.seekTime,\r\n            '{title}': config.title,\r\n        };\r\n\r\n        Object.entries(replace).forEach(([key, value]) => {\r\n            string = replaceAll(string, key, value);\r\n        });\r\n\r\n        return string;\r\n    },\r\n};\r\n\r\n/* harmony default export */ var utils_i18n = (i18n);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/storage.js\n// ==========================================================================\r\n// Plyr storage\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\nclass storage_Storage {\r\n    constructor(player) {\r\n        this.enabled = player.config.storage.enabled;\r\n        this.key = player.config.storage.key;\r\n    }\r\n\r\n    // Check for actual support (see if we can use it)\r\n    static get supported() {\r\n        try {\r\n            if (!('localStorage' in window)) {\r\n                return false;\r\n            }\r\n\r\n            const test = '___test';\r\n\r\n            // Try to use it (it might be disabled, e.g. user is in private mode)\r\n            // see: https://github.com/sampotts/plyr/issues/131\r\n            window.localStorage.setItem(test, test);\r\n            window.localStorage.removeItem(test);\r\n\r\n            return true;\r\n        } catch (e) {\r\n            return false;\r\n        }\r\n    }\r\n\r\n    get(key) {\r\n        if (!storage_Storage.supported || !this.enabled) {\r\n            return null;\r\n        }\r\n\r\n        const store = window.localStorage.getItem(this.key);\r\n\r\n        if (utils_is.empty(store)) {\r\n            return null;\r\n        }\r\n\r\n        const json = JSON.parse(store);\r\n\r\n        return utils_is.string(key) && key.length ? json[key] : json;\r\n    }\r\n\r\n    set(object) {\r\n        // Bail if we don't have localStorage support or it's disabled\r\n        if (!storage_Storage.supported || !this.enabled) {\r\n            return;\r\n        }\r\n\r\n        // Can only store objectst\r\n        if (!utils_is.object(object)) {\r\n            return;\r\n        }\r\n\r\n        // Get current storage\r\n        let storage = this.get();\r\n\r\n        // Default to empty object\r\n        if (utils_is.empty(storage)) {\r\n            storage = {};\r\n        }\r\n\r\n        // Update the working copy of the values\r\n        extend(storage, object);\r\n\r\n        // Update storage\r\n        window.localStorage.setItem(this.key, JSON.stringify(storage));\r\n    }\r\n}\r\n\r\n/* harmony default export */ var js_storage = (storage_Storage);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/fetch.js\n// ==========================================================================\r\n// Fetch wrapper\r\n// Using XHR to avoid issues with older browsers\r\n// ==========================================================================\r\n\r\nfunction fetch_fetch(url, responseType = 'text') {\r\n    return new Promise((resolve, reject) => {\r\n        try {\r\n            const request = new XMLHttpRequest();\r\n\r\n            // Check for CORS support\r\n            if (!('withCredentials' in request)) {\r\n                return;\r\n            }\r\n\r\n            request.addEventListener('load', () => {\r\n                if (responseType === 'text') {\r\n                    try {\r\n                        resolve(JSON.parse(request.responseText));\r\n                    } catch (e) {\r\n                        resolve(request.responseText);\r\n                    }\r\n                } else {\r\n                    resolve(request.response);\r\n                }\r\n            });\r\n\r\n            request.addEventListener('error', () => {\r\n                throw new Error(request.status);\r\n            });\r\n\r\n            request.open('GET', url, true);\r\n\r\n            // Set the required response type\r\n            request.responseType = responseType;\r\n\r\n            request.send();\r\n        } catch (e) {\r\n            reject(e);\r\n        }\r\n    });\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/loadSprite.js\n// ==========================================================================\r\n// Sprite loader\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n// Load an external SVG sprite\r\nfunction loadSprite(url, id) {\r\n    if (!utils_is.string(url)) {\r\n        return;\r\n    }\r\n\r\n    const prefix = 'cache';\r\n    const hasId = utils_is.string(id);\r\n    let isCached = false;\r\n\r\n    const exists = () => document.getElementById(id) !== null;\r\n\r\n    const update = (container, data) => {\r\n        container.innerHTML = data;\r\n\r\n        // Check again incase of race condition\r\n        if (hasId && exists()) {\r\n            return;\r\n        }\r\n\r\n        // Inject the SVG to the body\r\n        document.body.insertAdjacentElement('afterbegin', container);\r\n    };\r\n\r\n    // Only load once if ID set\r\n    if (!hasId || !exists()) {\r\n        const useStorage = js_storage.supported;\r\n\r\n        // Create container\r\n        const container = document.createElement('div');\r\n        container.setAttribute('hidden', '');\r\n\r\n        if (hasId) {\r\n            container.setAttribute('id', id);\r\n        }\r\n\r\n        // Check in cache\r\n        if (useStorage) {\r\n            const cached = window.localStorage.getItem(`${prefix}-${id}`);\r\n            isCached = cached !== null;\r\n\r\n            if (isCached) {\r\n                const data = JSON.parse(cached);\r\n                update(container, data.content);\r\n            }\r\n        }\r\n\r\n        // Get the sprite\r\n        fetch_fetch(url)\r\n            .then(result => {\r\n                if (utils_is.empty(result)) {\r\n                    return;\r\n                }\r\n\r\n                if (useStorage) {\r\n                    window.localStorage.setItem(\r\n                        `${prefix}-${id}`,\r\n                        JSON.stringify({\r\n                            content: result,\r\n                        }),\r\n                    );\r\n                }\r\n\r\n                update(container, result);\r\n            })\r\n            .catch(() => {});\r\n    }\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/time.js\n// ==========================================================================\r\n// Time utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n// Time helpers\r\nconst getHours = value => Math.trunc((value / 60 / 60) % 60, 10);\r\nconst getMinutes = value => Math.trunc((value / 60) % 60, 10);\r\nconst getSeconds = value => Math.trunc(value % 60, 10);\r\n\r\n// Format time to UI friendly string\r\nfunction formatTime(time = 0, displayHours = false, inverted = false) {\r\n    // Bail if the value isn't a number\r\n    if (!utils_is.number(time)) {\r\n        return formatTime(null, displayHours, inverted);\r\n    }\r\n\r\n    // Format time component to add leading zero\r\n    const format = value => `0${value}`.slice(-2);\r\n\r\n    // Breakdown to hours, mins, secs\r\n    let hours = getHours(time);\r\n    const mins = getMinutes(time);\r\n    const secs = getSeconds(time);\r\n\r\n    // Do we need to display hours?\r\n    if (displayHours || hours > 0) {\r\n        hours = `${hours}:`;\r\n    } else {\r\n        hours = '';\r\n    }\r\n\r\n    // Render\r\n    return `${inverted && time > 0 ? '-' : ''}${hours}${format(mins)}:${format(secs)}`;\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/controls.js\n// ==========================================================================\r\n// Plyr controls\r\n// TODO: This needs to be split into smaller files and cleaned up\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// TODO: Don't export a massive object - break down and create class\r\nconst controls_controls = {\r\n    // Get icon URL\r\n    getIconUrl() {\r\n        const url = new URL(this.config.iconUrl, window.location);\r\n        const cors = url.host !== window.location.host || (utils_browser.isIE && !window.svg4everybody);\r\n\r\n        return {\r\n            url: this.config.iconUrl,\r\n            cors,\r\n        };\r\n    },\r\n\r\n    // Find the UI controls\r\n    findElements() {\r\n        try {\r\n            this.elements.controls = getElement.call(this, this.config.selectors.controls.wrapper);\r\n\r\n            // Buttons\r\n            this.elements.buttons = {\r\n                play: getElements.call(this, this.config.selectors.buttons.play),\r\n                pause: getElement.call(this, this.config.selectors.buttons.pause),\r\n                restart: getElement.call(this, this.config.selectors.buttons.restart),\r\n                rewind: getElement.call(this, this.config.selectors.buttons.rewind),\r\n                fastForward: getElement.call(this, this.config.selectors.buttons.fastForward),\r\n                mute: getElement.call(this, this.config.selectors.buttons.mute),\r\n                pip: getElement.call(this, this.config.selectors.buttons.pip),\r\n                airplay: getElement.call(this, this.config.selectors.buttons.airplay),\r\n                settings: getElement.call(this, this.config.selectors.buttons.settings),\r\n                captions: getElement.call(this, this.config.selectors.buttons.captions),\r\n                fullscreen: getElement.call(this, this.config.selectors.buttons.fullscreen),\r\n            };\r\n\r\n            // Progress\r\n            this.elements.progress = getElement.call(this, this.config.selectors.progress);\r\n\r\n            // Inputs\r\n            this.elements.inputs = {\r\n                seek: getElement.call(this, this.config.selectors.inputs.seek),\r\n                volume: getElement.call(this, this.config.selectors.inputs.volume),\r\n            };\r\n\r\n            // Display\r\n            this.elements.display = {\r\n                buffer: getElement.call(this, this.config.selectors.display.buffer),\r\n                currentTime: getElement.call(this, this.config.selectors.display.currentTime),\r\n                duration: getElement.call(this, this.config.selectors.display.duration),\r\n            };\r\n\r\n            // Seek tooltip\r\n            if (utils_is.element(this.elements.progress)) {\r\n                this.elements.display.seekTooltip = this.elements.progress.querySelector(\r\n                    `.${this.config.classNames.tooltip}`,\r\n                );\r\n            }\r\n\r\n            return true;\r\n        } catch (error) {\r\n            // Log it\r\n            this.debug.warn('It looks like there is a problem with your custom controls HTML', error);\r\n\r\n            // Restore native video controls\r\n            this.toggleNativeControls(true);\r\n\r\n            return false;\r\n        }\r\n    },\r\n\r\n    // Create <svg> icon\r\n    createIcon(type, attributes) {\r\n        const namespace = 'http://www.w3.org/2000/svg';\r\n        const iconUrl = controls_controls.getIconUrl.call(this);\r\n        const iconPath = `${!iconUrl.cors ? iconUrl.url : ''}#${this.config.iconPrefix}`;\r\n\r\n        // Create <svg>\r\n        const icon = document.createElementNS(namespace, 'svg');\r\n        setAttributes(\r\n            icon,\r\n            extend(attributes, {\r\n                role: 'presentation',\r\n                focusable: 'false',\r\n            }),\r\n        );\r\n\r\n        // Create the <use> to reference sprite\r\n        const use = document.createElementNS(namespace, 'use');\r\n        const path = `${iconPath}-${type}`;\r\n\r\n        // Set `href` attributes\r\n        // https://github.com/sampotts/plyr/issues/460\r\n        // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\r\n        if ('href' in use) {\r\n            use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n        }\r\n\r\n        // Always set the older attribute even though it's \"deprecated\" (it'll be around for ages)\r\n        use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path);\r\n\r\n        // Add <use> to <svg>\r\n        icon.appendChild(use);\r\n\r\n        return icon;\r\n    },\r\n\r\n    // Create hidden text label\r\n    createLabel(key, attr = {}) {\r\n        const text = utils_i18n.get(key, this.config);\r\n\r\n        const attributes = Object.assign({}, attr, {\r\n            class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' '),\r\n        });\r\n\r\n        return elements_createElement('span', attributes, text);\r\n    },\r\n\r\n    // Create a badge\r\n    createBadge(text) {\r\n        if (utils_is.empty(text)) {\r\n            return null;\r\n        }\r\n\r\n        const badge = elements_createElement('span', {\r\n            class: this.config.classNames.menu.value,\r\n        });\r\n\r\n        badge.appendChild(\r\n            elements_createElement(\r\n                'span',\r\n                {\r\n                    class: this.config.classNames.menu.badge,\r\n                },\r\n                text,\r\n            ),\r\n        );\r\n\r\n        return badge;\r\n    },\r\n\r\n    // Create a <button>\r\n    createButton(buttonType, attr) {\r\n        const attributes = Object.assign({}, attr);\r\n        let type = strings_toCamelCase(buttonType);\r\n\r\n        const props = {\r\n            element: 'button',\r\n            toggle: false,\r\n            label: null,\r\n            icon: null,\r\n            labelPressed: null,\r\n            iconPressed: null,\r\n        };\r\n\r\n        ['element', 'icon', 'label'].forEach(key => {\r\n            if (Object.keys(attributes).includes(key)) {\r\n                props[key] = attributes[key];\r\n                delete attributes[key];\r\n            }\r\n        });\r\n\r\n        // Default to 'button' type to prevent form submission\r\n        if (props.element === 'button' && !Object.keys(attributes).includes('type')) {\r\n            attributes.type = 'button';\r\n        }\r\n\r\n        // Set class name\r\n        if (Object.keys(attributes).includes('class')) {\r\n            if (!attributes.class.includes(this.config.classNames.control)) {\r\n                attributes.class += ` ${this.config.classNames.control}`;\r\n            }\r\n        } else {\r\n            attributes.class = this.config.classNames.control;\r\n        }\r\n\r\n        // Large play button\r\n        switch (buttonType) {\r\n            case 'play':\r\n                props.toggle = true;\r\n                props.label = 'play';\r\n                props.labelPressed = 'pause';\r\n                props.icon = 'play';\r\n                props.iconPressed = 'pause';\r\n                break;\r\n\r\n            case 'mute':\r\n                props.toggle = true;\r\n                props.label = 'mute';\r\n                props.labelPressed = 'unmute';\r\n                props.icon = 'volume';\r\n                props.iconPressed = 'muted';\r\n                break;\r\n\r\n            case 'captions':\r\n                props.toggle = true;\r\n                props.label = 'enableCaptions';\r\n                props.labelPressed = 'disableCaptions';\r\n                props.icon = 'captions-off';\r\n                props.iconPressed = 'captions-on';\r\n                break;\r\n\r\n            case 'fullscreen':\r\n                props.toggle = true;\r\n                props.label = 'enterFullscreen';\r\n                props.labelPressed = 'exitFullscreen';\r\n                props.icon = 'enter-fullscreen';\r\n                props.iconPressed = 'exit-fullscreen';\r\n                break;\r\n\r\n            case 'play-large':\r\n                attributes.class += ` ${this.config.classNames.control}--overlaid`;\r\n                type = 'play';\r\n                props.label = 'play';\r\n                props.icon = 'play';\r\n                break;\r\n\r\n            default:\r\n                if (utils_is.empty(props.label)) {\r\n                    props.label = type;\r\n                }\r\n                if (utils_is.empty(props.icon)) {\r\n                    props.icon = buttonType;\r\n                }\r\n        }\r\n\r\n        const button = elements_createElement(props.element);\r\n\r\n        // Setup toggle icon and labels\r\n        if (props.toggle) {\r\n            // Icon\r\n            button.appendChild(\r\n                controls_controls.createIcon.call(this, props.iconPressed, {\r\n                    class: 'icon--pressed',\r\n                }),\r\n            );\r\n            button.appendChild(\r\n                controls_controls.createIcon.call(this, props.icon, {\r\n                    class: 'icon--not-pressed',\r\n                }),\r\n            );\r\n\r\n            // Label/Tooltip\r\n            button.appendChild(\r\n                controls_controls.createLabel.call(this, props.labelPressed, {\r\n                    class: 'label--pressed',\r\n                }),\r\n            );\r\n            button.appendChild(\r\n                controls_controls.createLabel.call(this, props.label, {\r\n                    class: 'label--not-pressed',\r\n                }),\r\n            );\r\n        } else {\r\n            button.appendChild(controls_controls.createIcon.call(this, props.icon));\r\n            button.appendChild(controls_controls.createLabel.call(this, props.label));\r\n        }\r\n\r\n        // Merge and set attributes\r\n        extend(attributes, getAttributesFromSelector(this.config.selectors.buttons[type], attributes));\r\n        setAttributes(button, attributes);\r\n\r\n        // We have multiple play buttons\r\n        if (type === 'play') {\r\n            if (!utils_is.array(this.elements.buttons[type])) {\r\n                this.elements.buttons[type] = [];\r\n            }\r\n\r\n            this.elements.buttons[type].push(button);\r\n        } else {\r\n            this.elements.buttons[type] = button;\r\n        }\r\n\r\n        return button;\r\n    },\r\n\r\n    // Create an <input type='range'>\r\n    createRange(type, attributes) {\r\n        // Seek input\r\n        const input = elements_createElement(\r\n            'input',\r\n            extend(\r\n                getAttributesFromSelector(this.config.selectors.inputs[type]),\r\n                {\r\n                    type: 'range',\r\n                    min: 0,\r\n                    max: 100,\r\n                    step: 0.01,\r\n                    value: 0,\r\n                    autocomplete: 'off',\r\n                    // A11y fixes for https://github.com/sampotts/plyr/issues/905\r\n                    role: 'slider',\r\n                    'aria-label': utils_i18n.get(type, this.config),\r\n                    'aria-valuemin': 0,\r\n                    'aria-valuemax': 100,\r\n                    'aria-valuenow': 0,\r\n                },\r\n                attributes,\r\n            ),\r\n        );\r\n\r\n        this.elements.inputs[type] = input;\r\n\r\n        // Set the fill for webkit now\r\n        controls_controls.updateRangeFill.call(this, input);\r\n\r\n        // Improve support on touch devices\r\n        rangetouch_default.a.setup(input);\r\n\r\n        return input;\r\n    },\r\n\r\n    // Create a <progress>\r\n    createProgress(type, attributes) {\r\n        const progress = elements_createElement(\r\n            'progress',\r\n            extend(\r\n                getAttributesFromSelector(this.config.selectors.display[type]),\r\n                {\r\n                    min: 0,\r\n                    max: 100,\r\n                    value: 0,\r\n                    role: 'progressbar',\r\n                    'aria-hidden': true,\r\n                },\r\n                attributes,\r\n            ),\r\n        );\r\n\r\n        // Create the label inside\r\n        if (type !== 'volume') {\r\n            progress.appendChild(elements_createElement('span', null, '0'));\r\n\r\n            const suffixKey = {\r\n                played: 'played',\r\n                buffer: 'buffered',\r\n            }[type];\r\n            const suffix = suffixKey ? utils_i18n.get(suffixKey, this.config) : '';\r\n\r\n            progress.innerText = `% ${suffix.toLowerCase()}`;\r\n        }\r\n\r\n        this.elements.display[type] = progress;\r\n\r\n        return progress;\r\n    },\r\n\r\n    // Create time display\r\n    createTime(type) {\r\n        const attributes = getAttributesFromSelector(this.config.selectors.display[type]);\r\n\r\n        const container = elements_createElement(\r\n            'div',\r\n            extend(attributes, {\r\n                class: `${this.config.classNames.display.time} ${attributes.class ? attributes.class : ''}`.trim(),\r\n                'aria-label': utils_i18n.get(type, this.config),\r\n            }),\r\n            '00:00',\r\n        );\r\n\r\n        // Reference for updates\r\n        this.elements.display[type] = container;\r\n\r\n        return container;\r\n    },\r\n\r\n    // Bind keyboard shortcuts for a menu item\r\n    // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\r\n    bindMenuItemShortcuts(menuItem, type) {\r\n        // Navigate through menus via arrow keys and space\r\n        events_on(\r\n            menuItem,\r\n            'keydown keyup',\r\n            event => {\r\n                // We only care about space and ⬆️ ⬇️️ ➡️\r\n                if (![32, 38, 39, 40].includes(event.which)) {\r\n                    return;\r\n                }\r\n\r\n                // Prevent play / seek\r\n                event.preventDefault();\r\n                event.stopPropagation();\r\n\r\n                // We're just here to prevent the keydown bubbling\r\n                if (event.type === 'keydown') {\r\n                    return;\r\n                }\r\n\r\n                const isRadioButton = elements_matches(menuItem, '[role=\"menuitemradio\"]');\r\n\r\n                // Show the respective menu\r\n                if (!isRadioButton && [32, 39].includes(event.which)) {\r\n                    controls_controls.showMenuPanel.call(this, type, true);\r\n                } else {\r\n                    let target;\r\n\r\n                    if (event.which !== 32) {\r\n                        if (event.which === 40 || (isRadioButton && event.which === 39)) {\r\n                            target = menuItem.nextElementSibling;\r\n\r\n                            if (!utils_is.element(target)) {\r\n                                target = menuItem.parentNode.firstElementChild;\r\n                            }\r\n                        } else {\r\n                            target = menuItem.previousElementSibling;\r\n\r\n                            if (!utils_is.element(target)) {\r\n                                target = menuItem.parentNode.lastElementChild;\r\n                            }\r\n                        }\r\n\r\n                        elements_setFocus.call(this, target, true);\r\n                    }\r\n                }\r\n            },\r\n            false,\r\n        );\r\n\r\n        // Enter will fire a `click` event but we still need to manage focus\r\n        // So we bind to keyup which fires after and set focus here\r\n        events_on(menuItem, 'keyup', event => {\r\n            if (event.which !== 13) {\r\n                return;\r\n            }\r\n\r\n            controls_controls.focusFirstMenuItem.call(this, null, true);\r\n        });\r\n    },\r\n\r\n    // Create a settings menu item\r\n    createMenuItem({ value, list, type, title, badge = null, checked = false }) {\r\n        const attributes = getAttributesFromSelector(this.config.selectors.inputs[type]);\r\n\r\n        const menuItem = elements_createElement(\r\n            'button',\r\n            extend(attributes, {\r\n                type: 'button',\r\n                role: 'menuitemradio',\r\n                class: `${this.config.classNames.control} ${attributes.class ? attributes.class : ''}`.trim(),\r\n                'aria-checked': checked,\r\n                value,\r\n            }),\r\n        );\r\n\r\n        const flex = elements_createElement('span');\r\n\r\n        // We have to set as HTML incase of special characters\r\n        flex.innerHTML = title;\r\n\r\n        if (utils_is.element(badge)) {\r\n            flex.appendChild(badge);\r\n        }\r\n\r\n        menuItem.appendChild(flex);\r\n\r\n        // Replicate radio button behaviour\r\n        Object.defineProperty(menuItem, 'checked', {\r\n            enumerable: true,\r\n            get() {\r\n                return menuItem.getAttribute('aria-checked') === 'true';\r\n            },\r\n            set(checked) {\r\n                // Ensure exclusivity\r\n                if (checked) {\r\n                    Array.from(menuItem.parentNode.children)\r\n                        .filter(node => elements_matches(node, '[role=\"menuitemradio\"]'))\r\n                        .forEach(node => node.setAttribute('aria-checked', 'false'));\r\n                }\r\n\r\n                menuItem.setAttribute('aria-checked', checked ? 'true' : 'false');\r\n            },\r\n        });\r\n\r\n        this.listeners.bind(\r\n            menuItem,\r\n            'click keyup',\r\n            event => {\r\n                if (utils_is.keyboardEvent(event) && event.which !== 32) {\r\n                    return;\r\n                }\r\n\r\n                event.preventDefault();\r\n                event.stopPropagation();\r\n\r\n                menuItem.checked = true;\r\n\r\n                switch (type) {\r\n                    case 'language':\r\n                        this.currentTrack = Number(value);\r\n                        break;\r\n\r\n                    case 'quality':\r\n                        this.quality = value;\r\n                        break;\r\n\r\n                    case 'speed':\r\n                        this.speed = parseFloat(value);\r\n                        break;\r\n\r\n                    default:\r\n                        break;\r\n                }\r\n\r\n                controls_controls.showMenuPanel.call(this, 'home', utils_is.keyboardEvent(event));\r\n            },\r\n            type,\r\n            false,\r\n        );\r\n\r\n        controls_controls.bindMenuItemShortcuts.call(this, menuItem, type);\r\n\r\n        list.appendChild(menuItem);\r\n    },\r\n\r\n    // Format a time for display\r\n    formatTime(time = 0, inverted = false) {\r\n        // Bail if the value isn't a number\r\n        if (!utils_is.number(time)) {\r\n            return time;\r\n        }\r\n\r\n        // Always display hours if duration is over an hour\r\n        const forceHours = getHours(this.duration) > 0;\r\n\r\n        return formatTime(time, forceHours, inverted);\r\n    },\r\n\r\n    // Update the displayed time\r\n    updateTimeDisplay(target = null, time = 0, inverted = false) {\r\n        // Bail if there's no element to display or the value isn't a number\r\n        if (!utils_is.element(target) || !utils_is.number(time)) {\r\n            return;\r\n        }\r\n\r\n        // eslint-disable-next-line no-param-reassign\r\n        target.innerText = controls_controls.formatTime(time, inverted);\r\n    },\r\n\r\n    // Update volume UI and storage\r\n    updateVolume() {\r\n        if (!this.supported.ui) {\r\n            return;\r\n        }\r\n\r\n        // Update range\r\n        if (utils_is.element(this.elements.inputs.volume)) {\r\n            controls_controls.setRange.call(this, this.elements.inputs.volume, this.muted ? 0 : this.volume);\r\n        }\r\n\r\n        // Update mute state\r\n        if (utils_is.element(this.elements.buttons.mute)) {\r\n            this.elements.buttons.mute.pressed = this.muted || this.volume === 0;\r\n        }\r\n    },\r\n\r\n    // Update seek value and lower fill\r\n    setRange(target, value = 0) {\r\n        if (!utils_is.element(target)) {\r\n            return;\r\n        }\r\n\r\n        // eslint-disable-next-line\r\n        target.value = value;\r\n\r\n        // Webkit range fill\r\n        controls_controls.updateRangeFill.call(this, target);\r\n    },\r\n\r\n    // Update <progress> elements\r\n    updateProgress(event) {\r\n        if (!this.supported.ui || !utils_is.event(event)) {\r\n            return;\r\n        }\r\n\r\n        let value = 0;\r\n\r\n        const setProgress = (target, input) => {\r\n            const value = utils_is.number(input) ? input : 0;\r\n            const progress = utils_is.element(target) ? target : this.elements.display.buffer;\r\n\r\n            // Update value and label\r\n            if (utils_is.element(progress)) {\r\n                progress.value = value;\r\n\r\n                // Update text label inside\r\n                const label = progress.getElementsByTagName('span')[0];\r\n                if (utils_is.element(label)) {\r\n                    label.childNodes[0].nodeValue = value;\r\n                }\r\n            }\r\n        };\r\n\r\n        if (event) {\r\n            switch (event.type) {\r\n                // Video playing\r\n                case 'timeupdate':\r\n                case 'seeking':\r\n                case 'seeked':\r\n                    value = getPercentage(this.currentTime, this.duration);\r\n\r\n                    // Set seek range value only if it's a 'natural' time event\r\n                    if (event.type === 'timeupdate') {\r\n                        controls_controls.setRange.call(this, this.elements.inputs.seek, value);\r\n                    }\r\n\r\n                    break;\r\n\r\n                // Check buffer status\r\n                case 'playing':\r\n                case 'progress':\r\n                    setProgress(this.elements.display.buffer, this.buffered * 100);\r\n\r\n                    break;\r\n\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    },\r\n\r\n    // Webkit polyfill for lower fill range\r\n    updateRangeFill(target) {\r\n        // Get range from event if event passed\r\n        const range = utils_is.event(target) ? target.target : target;\r\n\r\n        // Needs to be a valid <input type='range'>\r\n        if (!utils_is.element(range) || range.getAttribute('type') !== 'range') {\r\n            return;\r\n        }\r\n\r\n        // Set aria values for https://github.com/sampotts/plyr/issues/905\r\n        if (elements_matches(range, this.config.selectors.inputs.seek)) {\r\n            range.setAttribute('aria-valuenow', this.currentTime);\r\n            const currentTime = controls_controls.formatTime(this.currentTime);\r\n            const duration = controls_controls.formatTime(this.duration);\r\n            const format = utils_i18n.get('seekLabel', this.config);\r\n            range.setAttribute(\r\n                'aria-valuetext',\r\n                format.replace('{currentTime}', currentTime).replace('{duration}', duration),\r\n            );\r\n        } else if (elements_matches(range, this.config.selectors.inputs.volume)) {\r\n            const percent = range.value * 100;\r\n            range.setAttribute('aria-valuenow', percent);\r\n            range.setAttribute('aria-valuetext', `${percent.toFixed(1)}%`);\r\n        } else {\r\n            range.setAttribute('aria-valuenow', range.value);\r\n        }\r\n\r\n        // WebKit only\r\n        if (!utils_browser.isWebkit) {\r\n            return;\r\n        }\r\n\r\n        // Set CSS custom property\r\n        range.style.setProperty('--value', `${(range.value / range.max) * 100}%`);\r\n    },\r\n\r\n    // Update hover tooltip for seeking\r\n    updateSeekTooltip(event) {\r\n        // Bail if setting not true\r\n        if (\r\n            !this.config.tooltips.seek ||\r\n            !utils_is.element(this.elements.inputs.seek) ||\r\n            !utils_is.element(this.elements.display.seekTooltip) ||\r\n            this.duration === 0\r\n        ) {\r\n            return;\r\n        }\r\n\r\n        // Calculate percentage\r\n        let percent = 0;\r\n        const clientRect = this.elements.progress.getBoundingClientRect();\r\n        const visible = `${this.config.classNames.tooltip}--visible`;\r\n\r\n        const toggle = toggle => {\r\n            toggleClass(this.elements.display.seekTooltip, visible, toggle);\r\n        };\r\n\r\n        // Hide on touch\r\n        if (this.touch) {\r\n            toggle(false);\r\n            return;\r\n        }\r\n\r\n        // Determine percentage, if already visible\r\n        if (utils_is.event(event)) {\r\n            percent = (100 / clientRect.width) * (event.pageX - clientRect.left);\r\n        } else if (hasClass(this.elements.display.seekTooltip, visible)) {\r\n            percent = parseFloat(this.elements.display.seekTooltip.style.left, 10);\r\n        } else {\r\n            return;\r\n        }\r\n\r\n        // Set bounds\r\n        if (percent < 0) {\r\n            percent = 0;\r\n        } else if (percent > 100) {\r\n            percent = 100;\r\n        }\r\n\r\n        // Display the time a click would seek to\r\n        controls_controls.updateTimeDisplay.call(this, this.elements.display.seekTooltip, (this.duration / 100) * percent);\r\n\r\n        // Set position\r\n        this.elements.display.seekTooltip.style.left = `${percent}%`;\r\n\r\n        // Show/hide the tooltip\r\n        // If the event is a moues in/out and percentage is inside bounds\r\n        if (utils_is.event(event) && ['mouseenter', 'mouseleave'].includes(event.type)) {\r\n            toggle(event.type === 'mouseenter');\r\n        }\r\n    },\r\n\r\n    // Handle time change event\r\n    timeUpdate(event) {\r\n        // Only invert if only one time element is displayed and used for both duration and currentTime\r\n        const invert = !utils_is.element(this.elements.display.duration) && this.config.invertTime;\r\n\r\n        // Duration\r\n        controls_controls.updateTimeDisplay.call(\r\n            this,\r\n            this.elements.display.currentTime,\r\n            invert ? this.duration - this.currentTime : this.currentTime,\r\n            invert,\r\n        );\r\n\r\n        // Ignore updates while seeking\r\n        if (event && event.type === 'timeupdate' && this.media.seeking) {\r\n            return;\r\n        }\r\n\r\n        // Playing progress\r\n        controls_controls.updateProgress.call(this, event);\r\n    },\r\n\r\n    // Show the duration on metadataloaded or durationchange events\r\n    durationUpdate() {\r\n        // Bail if no UI or durationchange event triggered after playing/seek when invertTime is false\r\n        if (!this.supported.ui || (!this.config.invertTime && this.currentTime)) {\r\n            return;\r\n        }\r\n\r\n        // If duration is the 2**32 (shaka), Infinity (HLS), DASH-IF (Number.MAX_SAFE_INTEGER || Number.MAX_VALUE) indicating live we hide the currentTime and progressbar.\r\n        // https://github.com/video-dev/hls.js/blob/5820d29d3c4c8a46e8b75f1e3afa3e68c1a9a2db/src/controller/buffer-controller.js#L415\r\n        // https://github.com/google/shaka-player/blob/4d889054631f4e1cf0fbd80ddd2b71887c02e232/lib/media/streaming_engine.js#L1062\r\n        // https://github.com/Dash-Industry-Forum/dash.js/blob/69859f51b969645b234666800d4cb596d89c602d/src/dash/models/DashManifestModel.js#L338\r\n        if (this.duration >= 2 ** 32) {\r\n            toggleHidden(this.elements.display.currentTime, true);\r\n            toggleHidden(this.elements.progress, true);\r\n            return;\r\n        }\r\n\r\n        // Update ARIA values\r\n        if (utils_is.element(this.elements.inputs.seek)) {\r\n            this.elements.inputs.seek.setAttribute('aria-valuemax', this.duration);\r\n        }\r\n\r\n        // If there's a spot to display duration\r\n        const hasDuration = utils_is.element(this.elements.display.duration);\r\n\r\n        // If there's only one time display, display duration there\r\n        if (!hasDuration && this.config.displayDuration && this.paused) {\r\n            controls_controls.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration);\r\n        }\r\n\r\n        // If there's a duration element, update content\r\n        if (hasDuration) {\r\n            controls_controls.updateTimeDisplay.call(this, this.elements.display.duration, this.duration);\r\n        }\r\n\r\n        // Update the tooltip (if visible)\r\n        controls_controls.updateSeekTooltip.call(this);\r\n    },\r\n\r\n    // Hide/show a tab\r\n    toggleMenuButton(setting, toggle) {\r\n        toggleHidden(this.elements.settings.buttons[setting], !toggle);\r\n    },\r\n\r\n    // Update the selected setting\r\n    updateSetting(setting, container, input) {\r\n        const pane = this.elements.settings.panels[setting];\r\n        let value = null;\r\n        let list = container;\r\n\r\n        if (setting === 'captions') {\r\n            value = this.currentTrack;\r\n        } else {\r\n            value = !utils_is.empty(input) ? input : this[setting];\r\n\r\n            // Get default\r\n            if (utils_is.empty(value)) {\r\n                value = this.config[setting].default;\r\n            }\r\n\r\n            // Unsupported value\r\n            if (!utils_is.empty(this.options[setting]) && !this.options[setting].includes(value)) {\r\n                this.debug.warn(`Unsupported value of '${value}' for ${setting}`);\r\n                return;\r\n            }\r\n\r\n            // Disabled value\r\n            if (!this.config[setting].options.includes(value)) {\r\n                this.debug.warn(`Disabled value of '${value}' for ${setting}`);\r\n                return;\r\n            }\r\n        }\r\n\r\n        // Get the list if we need to\r\n        if (!utils_is.element(list)) {\r\n            list = pane && pane.querySelector('[role=\"menu\"]');\r\n        }\r\n\r\n        // If there's no list it means it's not been rendered...\r\n        if (!utils_is.element(list)) {\r\n            return;\r\n        }\r\n\r\n        // Update the label\r\n        const label = this.elements.settings.buttons[setting].querySelector(`.${this.config.classNames.menu.value}`);\r\n        label.innerHTML = controls_controls.getLabel.call(this, setting, value);\r\n\r\n        // Find the radio option and check it\r\n        const target = list && list.querySelector(`[value=\"${value}\"]`);\r\n\r\n        if (utils_is.element(target)) {\r\n            target.checked = true;\r\n        }\r\n    },\r\n\r\n    // Translate a value into a nice label\r\n    getLabel(setting, value) {\r\n        switch (setting) {\r\n            case 'speed':\r\n                return value === 1 ? utils_i18n.get('normal', this.config) : `${value}&times;`;\r\n\r\n            case 'quality':\r\n                if (utils_is.number(value)) {\r\n                    const label = utils_i18n.get(`qualityLabel.${value}`, this.config);\r\n\r\n                    if (!label.length) {\r\n                        return `${value}p`;\r\n                    }\r\n\r\n                    return label;\r\n                }\r\n\r\n                return toTitleCase(value);\r\n\r\n            case 'captions':\r\n                return js_captions.getLabel.call(this);\r\n\r\n            default:\r\n                return null;\r\n        }\r\n    },\r\n\r\n    // Set the quality menu\r\n    setQualityMenu(options) {\r\n        // Menu required\r\n        if (!utils_is.element(this.elements.settings.panels.quality)) {\r\n            return;\r\n        }\r\n\r\n        const type = 'quality';\r\n        const list = this.elements.settings.panels.quality.querySelector('[role=\"menu\"]');\r\n\r\n        // Set options if passed and filter based on uniqueness and config\r\n        if (utils_is.array(options)) {\r\n            this.options.quality = dedupe(options).filter(quality => this.config.quality.options.includes(quality));\r\n        }\r\n\r\n        // Toggle the pane and tab\r\n        const toggle = !utils_is.empty(this.options.quality) && this.options.quality.length > 1;\r\n        controls_controls.toggleMenuButton.call(this, type, toggle);\r\n\r\n        // Empty the menu\r\n        emptyElement(list);\r\n\r\n        // Check if we need to toggle the parent\r\n        controls_controls.checkMenu.call(this);\r\n\r\n        // If we're hiding, nothing more to do\r\n        if (!toggle) {\r\n            return;\r\n        }\r\n\r\n        // Get the badge HTML for HD, 4K etc\r\n        const getBadge = quality => {\r\n            const label = utils_i18n.get(`qualityBadge.${quality}`, this.config);\r\n\r\n            if (!label.length) {\r\n                return null;\r\n            }\r\n\r\n            return controls_controls.createBadge.call(this, label);\r\n        };\r\n\r\n        // Sort options by the config and then render options\r\n        this.options.quality\r\n            .sort((a, b) => {\r\n                const sorting = this.config.quality.options;\r\n                return sorting.indexOf(a) > sorting.indexOf(b) ? 1 : -1;\r\n            })\r\n            .forEach(quality => {\r\n                controls_controls.createMenuItem.call(this, {\r\n                    value: quality,\r\n                    list,\r\n                    type,\r\n                    title: controls_controls.getLabel.call(this, 'quality', quality),\r\n                    badge: getBadge(quality),\r\n                });\r\n            });\r\n\r\n        controls_controls.updateSetting.call(this, type, list);\r\n    },\r\n\r\n    // Set the looping options\r\n    /* setLoopMenu() {\r\n        // Menu required\r\n        if (!is.element(this.elements.settings.panels.loop)) {\r\n            return;\r\n        }\r\n\r\n        const options = ['start', 'end', 'all', 'reset'];\r\n        const list = this.elements.settings.panels.loop.querySelector('[role=\"menu\"]');\r\n\r\n        // Show the pane and tab\r\n        toggleHidden(this.elements.settings.buttons.loop, false);\r\n        toggleHidden(this.elements.settings.panels.loop, false);\r\n\r\n        // Toggle the pane and tab\r\n        const toggle = !is.empty(this.loop.options);\r\n        controls.toggleMenuButton.call(this, 'loop', toggle);\r\n\r\n        // Empty the menu\r\n        emptyElement(list);\r\n\r\n        options.forEach(option => {\r\n            const item = createElement('li');\r\n\r\n            const button = createElement(\r\n                'button',\r\n                extend(getAttributesFromSelector(this.config.selectors.buttons.loop), {\r\n                    type: 'button',\r\n                    class: this.config.classNames.control,\r\n                    'data-plyr-loop-action': option,\r\n                }),\r\n                i18n.get(option, this.config)\r\n            );\r\n\r\n            if (['start', 'end'].includes(option)) {\r\n                const badge = controls.createBadge.call(this, '00:00');\r\n                button.appendChild(badge);\r\n            }\r\n\r\n            item.appendChild(button);\r\n            list.appendChild(item);\r\n        });\r\n    }, */\r\n\r\n    // Get current selected caption language\r\n    // TODO: rework this to user the getter in the API?\r\n\r\n    // Set a list of available captions languages\r\n    setCaptionsMenu() {\r\n        // Menu required\r\n        if (!utils_is.element(this.elements.settings.panels.captions)) {\r\n            return;\r\n        }\r\n\r\n        // TODO: Captions or language? Currently it's mixed\r\n        const type = 'captions';\r\n        const list = this.elements.settings.panels.captions.querySelector('[role=\"menu\"]');\r\n        const tracks = js_captions.getTracks.call(this);\r\n        const toggle = Boolean(tracks.length);\r\n\r\n        // Toggle the pane and tab\r\n        controls_controls.toggleMenuButton.call(this, type, toggle);\r\n\r\n        // Empty the menu\r\n        emptyElement(list);\r\n\r\n        // Check if we need to toggle the parent\r\n        controls_controls.checkMenu.call(this);\r\n\r\n        // If there's no captions, bail\r\n        if (!toggle) {\r\n            return;\r\n        }\r\n\r\n        // Generate options data\r\n        const options = tracks.map((track, value) => ({\r\n            value,\r\n            checked: this.captions.toggled && this.currentTrack === value,\r\n            title: js_captions.getLabel.call(this, track),\r\n            badge: track.language && controls_controls.createBadge.call(this, track.language.toUpperCase()),\r\n            list,\r\n            type: 'language',\r\n        }));\r\n\r\n        // Add the \"Disabled\" option to turn off captions\r\n        options.unshift({\r\n            value: -1,\r\n            checked: !this.captions.toggled,\r\n            title: utils_i18n.get('disabled', this.config),\r\n            list,\r\n            type: 'language',\r\n        });\r\n\r\n        // Generate options\r\n        options.forEach(controls_controls.createMenuItem.bind(this));\r\n\r\n        controls_controls.updateSetting.call(this, type, list);\r\n    },\r\n\r\n    // Set a list of available captions languages\r\n    setSpeedMenu(options) {\r\n        // Menu required\r\n        if (!utils_is.element(this.elements.settings.panels.speed)) {\r\n            return;\r\n        }\r\n\r\n        const type = 'speed';\r\n        const list = this.elements.settings.panels.speed.querySelector('[role=\"menu\"]');\r\n\r\n        // Set the speed options\r\n        if (utils_is.array(options)) {\r\n            this.options.speed = options;\r\n        } else if (this.isHTML5 || this.isVimeo) {\r\n            this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];\r\n        }\r\n\r\n        // Set options if passed and filter based on config\r\n        this.options.speed = this.options.speed.filter(speed => this.config.speed.options.includes(speed));\r\n\r\n        // Toggle the pane and tab\r\n        const toggle = !utils_is.empty(this.options.speed) && this.options.speed.length > 1;\r\n        controls_controls.toggleMenuButton.call(this, type, toggle);\r\n\r\n        // Empty the menu\r\n        emptyElement(list);\r\n\r\n        // Check if we need to toggle the parent\r\n        controls_controls.checkMenu.call(this);\r\n\r\n        // If we're hiding, nothing more to do\r\n        if (!toggle) {\r\n            return;\r\n        }\r\n\r\n        // Create items\r\n        this.options.speed.forEach(speed => {\r\n            controls_controls.createMenuItem.call(this, {\r\n                value: speed,\r\n                list,\r\n                type,\r\n                title: controls_controls.getLabel.call(this, 'speed', speed),\r\n            });\r\n        });\r\n\r\n        controls_controls.updateSetting.call(this, type, list);\r\n    },\r\n\r\n    // Check if we need to hide/show the settings menu\r\n    checkMenu() {\r\n        const { buttons } = this.elements.settings;\r\n        const visible = !utils_is.empty(buttons) && Object.values(buttons).some(button => !button.hidden);\r\n\r\n        toggleHidden(this.elements.settings.menu, !visible);\r\n    },\r\n\r\n    // Focus the first menu item in a given (or visible) menu\r\n    focusFirstMenuItem(pane, tabFocus = false) {\r\n        if (this.elements.settings.popup.hidden) {\r\n            return;\r\n        }\r\n\r\n        let target = pane;\r\n\r\n        if (!utils_is.element(target)) {\r\n            target = Object.values(this.elements.settings.panels).find(pane => !pane.hidden);\r\n        }\r\n\r\n        const firstItem = target.querySelector('[role^=\"menuitem\"]');\r\n\r\n        elements_setFocus.call(this, firstItem, tabFocus);\r\n    },\r\n\r\n    // Show/hide menu\r\n    toggleMenu(input) {\r\n        const { popup } = this.elements.settings;\r\n        const button = this.elements.buttons.settings;\r\n\r\n        // Menu and button are required\r\n        if (!utils_is.element(popup) || !utils_is.element(button)) {\r\n            return;\r\n        }\r\n\r\n        // True toggle by default\r\n        const { hidden } = popup;\r\n        let show = hidden;\r\n\r\n        if (utils_is.boolean(input)) {\r\n            show = input;\r\n        } else if (utils_is.keyboardEvent(input) && input.which === 27) {\r\n            show = false;\r\n        } else if (utils_is.event(input)) {\r\n            const isMenuItem = popup.contains(input.target);\r\n\r\n            // If the click was inside the menu or if the click\r\n            // wasn't the button or menu item and we're trying to\r\n            // show the menu (a doc click shouldn't show the menu)\r\n            if (isMenuItem || (!isMenuItem && input.target !== button && show)) {\r\n                return;\r\n            }\r\n        }\r\n\r\n        // Set button attributes\r\n        button.setAttribute('aria-expanded', show);\r\n\r\n        // Show the actual popup\r\n        toggleHidden(popup, !show);\r\n\r\n        // Add class hook\r\n        toggleClass(this.elements.container, this.config.classNames.menu.open, show);\r\n\r\n        // Focus the first item if key interaction\r\n        if (show && utils_is.keyboardEvent(input)) {\r\n            controls_controls.focusFirstMenuItem.call(this, null, true);\r\n        } else if (!show && !hidden) {\r\n            // If closing, re-focus the button\r\n            elements_setFocus.call(this, button, utils_is.keyboardEvent(input));\r\n        }\r\n    },\r\n\r\n    // Get the natural size of a menu panel\r\n    getMenuSize(tab) {\r\n        const clone = tab.cloneNode(true);\r\n        clone.style.position = 'absolute';\r\n        clone.style.opacity = 0;\r\n        clone.removeAttribute('hidden');\r\n\r\n        // Append to parent so we get the \"real\" size\r\n        tab.parentNode.appendChild(clone);\r\n\r\n        // Get the sizes before we remove\r\n        const width = clone.scrollWidth;\r\n        const height = clone.scrollHeight;\r\n\r\n        // Remove from the DOM\r\n        removeElement(clone);\r\n\r\n        return {\r\n            width,\r\n            height,\r\n        };\r\n    },\r\n\r\n    // Show a panel in the menu\r\n    showMenuPanel(type = '', tabFocus = false) {\r\n        const target = document.getElementById(`plyr-settings-${this.id}-${type}`);\r\n\r\n        // Nothing to show, bail\r\n        if (!utils_is.element(target)) {\r\n            return;\r\n        }\r\n\r\n        // Hide all other panels\r\n        const container = target.parentNode;\r\n        const current = Array.from(container.children).find(node => !node.hidden);\r\n\r\n        // If we can do fancy animations, we'll animate the height/width\r\n        if (js_support.transitions && !js_support.reducedMotion) {\r\n            // Set the current width as a base\r\n            container.style.width = `${current.scrollWidth}px`;\r\n            container.style.height = `${current.scrollHeight}px`;\r\n\r\n            // Get potential sizes\r\n            const size = controls_controls.getMenuSize.call(this, target);\r\n\r\n            // Restore auto height/width\r\n            const restore = event => {\r\n                // We're only bothered about height and width on the container\r\n                if (event.target !== container || !['width', 'height'].includes(event.propertyName)) {\r\n                    return;\r\n                }\r\n\r\n                // Revert back to auto\r\n                container.style.width = '';\r\n                container.style.height = '';\r\n\r\n                // Only listen once\r\n                off.call(this, container, transitionEndEvent, restore);\r\n            };\r\n\r\n            // Listen for the transition finishing and restore auto height/width\r\n            events_on.call(this, container, transitionEndEvent, restore);\r\n\r\n            // Set dimensions to target\r\n            container.style.width = `${size.width}px`;\r\n            container.style.height = `${size.height}px`;\r\n        }\r\n\r\n        // Set attributes on current tab\r\n        toggleHidden(current, true);\r\n\r\n        // Set attributes on target\r\n        toggleHidden(target, false);\r\n\r\n        // Focus the first item\r\n        controls_controls.focusFirstMenuItem.call(this, target, tabFocus);\r\n    },\r\n\r\n    // Set the download link\r\n    setDownloadLink() {\r\n        const button = this.elements.buttons.download;\r\n\r\n        // Bail if no button\r\n        if (!utils_is.element(button)) {\r\n            return;\r\n        }\r\n\r\n        // Set download link\r\n        button.setAttribute('href', this.download);\r\n    },\r\n\r\n    // Build the default HTML\r\n    // TODO: Set order based on order in the config.controls array?\r\n    create(data) {\r\n        // Create the container\r\n        const container = elements_createElement('div', getAttributesFromSelector(this.config.selectors.controls.wrapper));\r\n\r\n        // Restart button\r\n        if (this.config.controls.includes('restart')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'restart'));\r\n        }\r\n\r\n        // Rewind button\r\n        if (this.config.controls.includes('rewind')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'rewind'));\r\n        }\r\n\r\n        // Play/Pause button\r\n        if (this.config.controls.includes('play')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'play'));\r\n        }\r\n\r\n        // Fast forward button\r\n        if (this.config.controls.includes('fast-forward')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'fast-forward'));\r\n        }\r\n\r\n        // Progress\r\n        if (this.config.controls.includes('progress')) {\r\n            const progress = elements_createElement('div', getAttributesFromSelector(this.config.selectors.progress));\r\n\r\n            // Seek range slider\r\n            progress.appendChild(\r\n                controls_controls.createRange.call(this, 'seek', {\r\n                    id: `plyr-seek-${data.id}`,\r\n                }),\r\n            );\r\n\r\n            // Buffer progress\r\n            progress.appendChild(controls_controls.createProgress.call(this, 'buffer'));\r\n\r\n            // TODO: Add loop display indicator\r\n\r\n            // Seek tooltip\r\n            if (this.config.tooltips.seek) {\r\n                const tooltip = elements_createElement(\r\n                    'span',\r\n                    {\r\n                        class: this.config.classNames.tooltip,\r\n                    },\r\n                    '00:00',\r\n                );\r\n\r\n                progress.appendChild(tooltip);\r\n                this.elements.display.seekTooltip = tooltip;\r\n            }\r\n\r\n            this.elements.progress = progress;\r\n            container.appendChild(this.elements.progress);\r\n        }\r\n\r\n        // Media current time display\r\n        if (this.config.controls.includes('current-time')) {\r\n            container.appendChild(controls_controls.createTime.call(this, 'currentTime'));\r\n        }\r\n\r\n        // Media duration display\r\n        if (this.config.controls.includes('duration')) {\r\n            container.appendChild(controls_controls.createTime.call(this, 'duration'));\r\n        }\r\n\r\n        // Volume controls\r\n        if (this.config.controls.includes('mute') || this.config.controls.includes('volume')) {\r\n            const volume = elements_createElement('div', {\r\n                class: 'plyr__volume',\r\n            });\r\n\r\n            // Toggle mute button\r\n            if (this.config.controls.includes('mute')) {\r\n                volume.appendChild(controls_controls.createButton.call(this, 'mute'));\r\n            }\r\n\r\n            // Volume range control\r\n            if (this.config.controls.includes('volume')) {\r\n                // Set the attributes\r\n                const attributes = {\r\n                    max: 1,\r\n                    step: 0.05,\r\n                    value: this.config.volume,\r\n                };\r\n\r\n                // Create the volume range slider\r\n                volume.appendChild(\r\n                    controls_controls.createRange.call(\r\n                        this,\r\n                        'volume',\r\n                        extend(attributes, {\r\n                            id: `plyr-volume-${data.id}`,\r\n                        }),\r\n                    ),\r\n                );\r\n\r\n                this.elements.volume = volume;\r\n            }\r\n\r\n            container.appendChild(volume);\r\n        }\r\n\r\n        // Toggle captions button\r\n        if (this.config.controls.includes('captions')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'captions'));\r\n        }\r\n\r\n        // Settings button / menu\r\n        if (this.config.controls.includes('settings') && !utils_is.empty(this.config.settings)) {\r\n            const control = elements_createElement('div', {\r\n                class: 'plyr__menu',\r\n                hidden: '',\r\n            });\r\n\r\n            control.appendChild(\r\n                controls_controls.createButton.call(this, 'settings', {\r\n                    'aria-haspopup': true,\r\n                    'aria-controls': `plyr-settings-${data.id}`,\r\n                    'aria-expanded': false,\r\n                }),\r\n            );\r\n\r\n            const popup = elements_createElement('div', {\r\n                class: 'plyr__menu__container',\r\n                id: `plyr-settings-${data.id}`,\r\n                hidden: '',\r\n            });\r\n\r\n            const inner = elements_createElement('div');\r\n\r\n            const home = elements_createElement('div', {\r\n                id: `plyr-settings-${data.id}-home`,\r\n            });\r\n\r\n            // Create the menu\r\n            const menu = elements_createElement('div', {\r\n                role: 'menu',\r\n            });\r\n\r\n            home.appendChild(menu);\r\n            inner.appendChild(home);\r\n            this.elements.settings.panels.home = home;\r\n\r\n            // Build the menu items\r\n            this.config.settings.forEach(type => {\r\n                // TODO: bundle this with the createMenuItem helper and bindings\r\n                const menuItem = elements_createElement(\r\n                    'button',\r\n                    extend(getAttributesFromSelector(this.config.selectors.buttons.settings), {\r\n                        type: 'button',\r\n                        class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`,\r\n                        role: 'menuitem',\r\n                        'aria-haspopup': true,\r\n                        hidden: '',\r\n                    }),\r\n                );\r\n\r\n                // Bind menu shortcuts for keyboard users\r\n                controls_controls.bindMenuItemShortcuts.call(this, menuItem, type);\r\n\r\n                // Show menu on click\r\n                events_on(menuItem, 'click', () => {\r\n                    controls_controls.showMenuPanel.call(this, type, false);\r\n                });\r\n\r\n                const flex = elements_createElement('span', null, utils_i18n.get(type, this.config));\r\n\r\n                const value = elements_createElement('span', {\r\n                    class: this.config.classNames.menu.value,\r\n                });\r\n\r\n                // Speed contains HTML entities\r\n                value.innerHTML = data[type];\r\n\r\n                flex.appendChild(value);\r\n                menuItem.appendChild(flex);\r\n                menu.appendChild(menuItem);\r\n\r\n                // Build the panes\r\n                const pane = elements_createElement('div', {\r\n                    id: `plyr-settings-${data.id}-${type}`,\r\n                    hidden: '',\r\n                });\r\n\r\n                // Back button\r\n                const backButton = elements_createElement('button', {\r\n                    type: 'button',\r\n                    class: `${this.config.classNames.control} ${this.config.classNames.control}--back`,\r\n                });\r\n\r\n                // Visible label\r\n                backButton.appendChild(\r\n                    elements_createElement(\r\n                        'span',\r\n                        {\r\n                            'aria-hidden': true,\r\n                        },\r\n                        utils_i18n.get(type, this.config),\r\n                    ),\r\n                );\r\n\r\n                // Screen reader label\r\n                backButton.appendChild(\r\n                    elements_createElement(\r\n                        'span',\r\n                        {\r\n                            class: this.config.classNames.hidden,\r\n                        },\r\n                        utils_i18n.get('menuBack', this.config),\r\n                    ),\r\n                );\r\n\r\n                // Go back via keyboard\r\n                events_on(\r\n                    pane,\r\n                    'keydown',\r\n                    event => {\r\n                        // We only care about <-\r\n                        if (event.which !== 37) {\r\n                            return;\r\n                        }\r\n\r\n                        // Prevent seek\r\n                        event.preventDefault();\r\n                        event.stopPropagation();\r\n\r\n                        // Show the respective menu\r\n                        controls_controls.showMenuPanel.call(this, 'home', true);\r\n                    },\r\n                    false,\r\n                );\r\n\r\n                // Go back via button click\r\n                events_on(backButton, 'click', () => {\r\n                    controls_controls.showMenuPanel.call(this, 'home', false);\r\n                });\r\n\r\n                // Add to pane\r\n                pane.appendChild(backButton);\r\n\r\n                // Menu\r\n                pane.appendChild(\r\n                    elements_createElement('div', {\r\n                        role: 'menu',\r\n                    }),\r\n                );\r\n\r\n                inner.appendChild(pane);\r\n\r\n                this.elements.settings.buttons[type] = menuItem;\r\n                this.elements.settings.panels[type] = pane;\r\n            });\r\n\r\n            popup.appendChild(inner);\r\n            control.appendChild(popup);\r\n            container.appendChild(control);\r\n\r\n            this.elements.settings.popup = popup;\r\n            this.elements.settings.menu = control;\r\n        }\r\n\r\n        // Picture in picture button\r\n        if (this.config.controls.includes('pip') && js_support.pip) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'pip'));\r\n        }\r\n\r\n        // Airplay button\r\n        if (this.config.controls.includes('airplay') && js_support.airplay) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'airplay'));\r\n        }\r\n\r\n        // Download button\r\n        if (this.config.controls.includes('download')) {\r\n            const attributes = {\r\n                element: 'a',\r\n                href: this.download,\r\n                target: '_blank',\r\n            };\r\n\r\n            const { download } = this.config.urls;\r\n\r\n            if (!utils_is.url(download) && this.isEmbed) {\r\n                extend(attributes, {\r\n                    icon: `logo-${this.provider}`,\r\n                    label: this.provider,\r\n                });\r\n            }\r\n\r\n            container.appendChild(controls_controls.createButton.call(this, 'download', attributes));\r\n        }\r\n\r\n        // Toggle fullscreen button\r\n        if (this.config.controls.includes('fullscreen')) {\r\n            container.appendChild(controls_controls.createButton.call(this, 'fullscreen'));\r\n        }\r\n\r\n        // Larger overlaid play button\r\n        if (this.config.controls.includes('play-large')) {\r\n            this.elements.container.appendChild(controls_controls.createButton.call(this, 'play-large'));\r\n        }\r\n\r\n        this.elements.controls = container;\r\n\r\n        // Set available quality levels\r\n        if (this.isHTML5) {\r\n            controls_controls.setQualityMenu.call(this, js_html5.getQualityOptions.call(this));\r\n        }\r\n\r\n        controls_controls.setSpeedMenu.call(this);\r\n\r\n        return container;\r\n    },\r\n\r\n    // Insert controls\r\n    inject() {\r\n        // Sprite\r\n        if (this.config.loadSprite) {\r\n            const icon = controls_controls.getIconUrl.call(this);\r\n\r\n            // Only load external sprite using AJAX\r\n            if (icon.cors) {\r\n                loadSprite(icon.url, 'sprite-plyr');\r\n            }\r\n        }\r\n\r\n        // Create a unique ID\r\n        this.id = Math.floor(Math.random() * 10000);\r\n\r\n        // Null by default\r\n        let container = null;\r\n        this.elements.controls = null;\r\n\r\n        // Set template properties\r\n        const props = {\r\n            id: this.id,\r\n            seektime: this.config.seekTime,\r\n            title: this.config.title,\r\n        };\r\n        let update = true;\r\n\r\n        // If function, run it and use output\r\n        if (utils_is.function(this.config.controls)) {\r\n            this.config.controls = this.config.controls.call(this, props);\r\n        }\r\n\r\n        // Convert falsy controls to empty array (primarily for empty strings)\r\n        if (!this.config.controls) {\r\n            this.config.controls = [];\r\n        }\r\n\r\n        if (utils_is.element(this.config.controls) || utils_is.string(this.config.controls)) {\r\n            // HTMLElement or Non-empty string passed as the option\r\n            container = this.config.controls;\r\n        } else {\r\n            // Create controls\r\n            container = controls_controls.create.call(this, {\r\n                id: this.id,\r\n                seektime: this.config.seekTime,\r\n                speed: this.speed,\r\n                quality: this.quality,\r\n                captions: js_captions.getLabel.call(this),\r\n                // TODO: Looping\r\n                // loop: 'None',\r\n            });\r\n            update = false;\r\n        }\r\n\r\n        // Replace props with their value\r\n        const replace = input => {\r\n            let result = input;\r\n\r\n            Object.entries(props).forEach(([key, value]) => {\r\n                result = replaceAll(result, `{${key}}`, value);\r\n            });\r\n\r\n            return result;\r\n        };\r\n\r\n        // Update markup\r\n        if (update) {\r\n            if (utils_is.string(this.config.controls)) {\r\n                container = replace(container);\r\n            } else if (utils_is.element(container)) {\r\n                container.innerHTML = replace(container.innerHTML);\r\n            }\r\n        }\r\n\r\n        // Controls container\r\n        let target;\r\n\r\n        // Inject to custom location\r\n        if (utils_is.string(this.config.selectors.controls.container)) {\r\n            target = document.querySelector(this.config.selectors.controls.container);\r\n        }\r\n\r\n        // Inject into the container by default\r\n        if (!utils_is.element(target)) {\r\n            target = this.elements.container;\r\n        }\r\n\r\n        // Inject controls HTML (needs to be before captions, hence \"afterbegin\")\r\n        const insertMethod = utils_is.element(container) ? 'insertAdjacentElement' : 'insertAdjacentHTML';\r\n        target[insertMethod]('afterbegin', container);\r\n\r\n        // Find the elements if need be\r\n        if (!utils_is.element(this.elements.controls)) {\r\n            controls_controls.findElements.call(this);\r\n        }\r\n\r\n        // Add pressed property to buttons\r\n        if (!utils_is.empty(this.elements.buttons)) {\r\n            const addProperty = button => {\r\n                const className = this.config.classNames.controlPressed;\r\n                Object.defineProperty(button, 'pressed', {\r\n                    enumerable: true,\r\n                    get() {\r\n                        return hasClass(button, className);\r\n                    },\r\n                    set(pressed = false) {\r\n                        toggleClass(button, className, pressed);\r\n                    },\r\n                });\r\n            };\r\n\r\n            // Toggle classname when pressed property is set\r\n            Object.values(this.elements.buttons)\r\n                .filter(Boolean)\r\n                .forEach(button => {\r\n                    if (utils_is.array(button) || utils_is.nodeList(button)) {\r\n                        Array.from(button)\r\n                            .filter(Boolean)\r\n                            .forEach(addProperty);\r\n                    } else {\r\n                        addProperty(button);\r\n                    }\r\n                });\r\n        }\r\n\r\n        // Edge sometimes doesn't finish the paint so force a repaint\r\n        if (utils_browser.isEdge) {\r\n            repaint(target);\r\n        }\r\n\r\n        // Setup tooltips\r\n        if (this.config.tooltips.controls) {\r\n            const { classNames, selectors } = this.config;\r\n            const selector = `${selectors.controls.wrapper} ${selectors.labels} .${classNames.hidden}`;\r\n            const labels = getElements.call(this, selector);\r\n\r\n            Array.from(labels).forEach(label => {\r\n                toggleClass(label, this.config.classNames.hidden, false);\r\n                toggleClass(label, this.config.classNames.tooltip, true);\r\n            });\r\n        }\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_controls = (controls_controls);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/urls.js\n// ==========================================================================\r\n// URL utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n/**\r\n * Parse a string to a URL object\r\n * @param {String} input - the URL to be parsed\r\n * @param {Boolean} safe - failsafe parsing\r\n */\r\nfunction parseUrl(input, safe = true) {\r\n    let url = input;\r\n\r\n    if (safe) {\r\n        const parser = document.createElement('a');\r\n        parser.href = url;\r\n        url = parser.href;\r\n    }\r\n\r\n    try {\r\n        return new URL(url);\r\n    } catch (e) {\r\n        return null;\r\n    }\r\n}\r\n\r\n// Convert object to URLSearchParams\r\nfunction buildUrlParams(input) {\r\n    const params = new URLSearchParams();\r\n\r\n    if (utils_is.object(input)) {\r\n        Object.entries(input).forEach(([key, value]) => {\r\n            params.set(key, value);\r\n        });\r\n    }\r\n\r\n    return params;\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/captions.js\n// ==========================================================================\r\n// Plyr Captions\r\n// TODO: Create as class\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst captions = {\r\n    // Setup captions\r\n    setup() {\r\n        // Requires UI support\r\n        if (!this.supported.ui) {\r\n            return;\r\n        }\r\n\r\n        // Only Vimeo and HTML5 video supported at this point\r\n        if (!this.isVideo || this.isYouTube || (this.isHTML5 && !js_support.textTracks)) {\r\n            // Clear menu and hide\r\n            if (\r\n                utils_is.array(this.config.controls) &&\r\n                this.config.controls.includes('settings') &&\r\n                this.config.settings.includes('captions')\r\n            ) {\r\n                js_controls.setCaptionsMenu.call(this);\r\n            }\r\n\r\n            return;\r\n        }\r\n\r\n        // Inject the container\r\n        if (!utils_is.element(this.elements.captions)) {\r\n            this.elements.captions = elements_createElement('div', getAttributesFromSelector(this.config.selectors.captions));\r\n\r\n            insertAfter(this.elements.captions, this.elements.wrapper);\r\n        }\r\n\r\n        // Fix IE captions if CORS is used\r\n        // Fetch captions and inject as blobs instead (data URIs not supported!)\r\n        if (utils_browser.isIE && window.URL) {\r\n            const elements = this.media.querySelectorAll('track');\r\n\r\n            Array.from(elements).forEach(track => {\r\n                const src = track.getAttribute('src');\r\n                const url = parseUrl(src);\r\n\r\n                if (\r\n                    url !== null &&\r\n                    url.hostname !== window.location.href.hostname &&\r\n                    ['http:', 'https:'].includes(url.protocol)\r\n                ) {\r\n                    fetch_fetch(src, 'blob')\r\n                        .then(blob => {\r\n                            track.setAttribute('src', window.URL.createObjectURL(blob));\r\n                        })\r\n                        .catch(() => {\r\n                            removeElement(track);\r\n                        });\r\n                }\r\n            });\r\n        }\r\n\r\n        // Get and set initial data\r\n        // The \"preferred\" options are not realized unless / until the wanted language has a match\r\n        // * languages: Array of user's browser languages.\r\n        // * language:  The language preferred by user settings or config\r\n        // * active:    The state preferred by user settings or config\r\n        // * toggled:   The real captions state\r\n\r\n        const browserLanguages = navigator.languages || [navigator.language || navigator.userLanguage || 'en'];\r\n        const languages = dedupe(browserLanguages.map(language => language.split('-')[0]));\r\n\r\n        let language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase();\r\n\r\n        // Use first browser language when language is 'auto'\r\n        if (language === 'auto') {\r\n            [language] = languages;\r\n        }\r\n\r\n        let active = this.storage.get('captions');\r\n        if (!utils_is.boolean(active)) {\r\n            ({ active } = this.config.captions);\r\n        }\r\n\r\n        Object.assign(this.captions, {\r\n            toggled: false,\r\n            active,\r\n            language,\r\n            languages,\r\n        });\r\n\r\n        // Watch changes to textTracks and update captions menu\r\n        if (this.isHTML5) {\r\n            const trackEvents = this.config.captions.update ? 'addtrack removetrack' : 'removetrack';\r\n            events_on.call(this, this.media.textTracks, trackEvents, captions.update.bind(this));\r\n        }\r\n\r\n        // Update available languages in list next tick (the event must not be triggered before the listeners)\r\n        setTimeout(captions.update.bind(this), 0);\r\n    },\r\n\r\n    // Update available language options in settings based on tracks\r\n    update() {\r\n        const tracks = captions.getTracks.call(this, true);\r\n        // Get the wanted language\r\n        const { active, language, meta, currentTrackNode } = this.captions;\r\n        const languageExists = Boolean(tracks.find(track => track.language === language));\r\n\r\n        // Handle tracks (add event listener and \"pseudo\"-default)\r\n        if (this.isHTML5 && this.isVideo) {\r\n            tracks.filter(track => !meta.get(track)).forEach(track => {\r\n                this.debug.log('Track added', track);\r\n                // Attempt to store if the original dom element was \"default\"\r\n                meta.set(track, {\r\n                    default: track.mode === 'showing',\r\n                });\r\n\r\n                // Turn off native caption rendering to avoid double captions\r\n                track.mode = 'hidden';\r\n\r\n                // Add event listener for cue changes\r\n                events_on.call(this, track, 'cuechange', () => captions.updateCues.call(this));\r\n            });\r\n        }\r\n\r\n        // Update language first time it matches, or if the previous matching track was removed\r\n        if ((languageExists && this.language !== language) || !tracks.includes(currentTrackNode)) {\r\n            captions.setLanguage.call(this, language);\r\n            captions.toggle.call(this, active && languageExists);\r\n        }\r\n\r\n        // Enable or disable captions based on track length\r\n        toggleClass(this.elements.container, this.config.classNames.captions.enabled, !utils_is.empty(tracks));\r\n\r\n        // Update available languages in list\r\n        if ((this.config.controls || []).includes('settings') && this.config.settings.includes('captions')) {\r\n            js_controls.setCaptionsMenu.call(this);\r\n        }\r\n    },\r\n\r\n    // Toggle captions display\r\n    // Used internally for the toggleCaptions method, with the passive option forced to false\r\n    toggle(input, passive = true) {\r\n        // If there's no full support\r\n        if (!this.supported.ui) {\r\n            return;\r\n        }\r\n\r\n        const { toggled } = this.captions; // Current state\r\n        const activeClass = this.config.classNames.captions.active;\r\n\r\n        // Get the next state\r\n        // If the method is called without parameter, toggle based on current value\r\n        const active = utils_is.nullOrUndefined(input) ? !toggled : input;\r\n\r\n        // Update state and trigger event\r\n        if (active !== toggled) {\r\n            // When passive, don't override user preferences\r\n            if (!passive) {\r\n                this.captions.active = active;\r\n                this.storage.set({ captions: active });\r\n            }\r\n\r\n            // Force language if the call isn't passive and there is no matching language to toggle to\r\n            if (!this.language && active && !passive) {\r\n                const tracks = captions.getTracks.call(this);\r\n                const track = captions.findTrack.call(this, [this.captions.language, ...this.captions.languages], true);\r\n\r\n                // Override user preferences to avoid switching languages if a matching track is added\r\n                this.captions.language = track.language;\r\n\r\n                // Set caption, but don't store in localStorage as user preference\r\n                captions.set.call(this, tracks.indexOf(track));\r\n                return;\r\n            }\r\n\r\n            // Toggle button if it's enabled\r\n            if (this.elements.buttons.captions) {\r\n                this.elements.buttons.captions.pressed = active;\r\n            }\r\n\r\n            // Add class hook\r\n            toggleClass(this.elements.container, activeClass, active);\r\n\r\n            this.captions.toggled = active;\r\n\r\n            // Update settings menu\r\n            js_controls.updateSetting.call(this, 'captions');\r\n\r\n            // Trigger event (not used internally)\r\n            triggerEvent.call(this, this.media, active ? 'captionsenabled' : 'captionsdisabled');\r\n        }\r\n    },\r\n\r\n    // Set captions by track index\r\n    // Used internally for the currentTrack setter with the passive option forced to false\r\n    set(index, passive = true) {\r\n        const tracks = captions.getTracks.call(this);\r\n\r\n        // Disable captions if setting to -1\r\n        if (index === -1) {\r\n            captions.toggle.call(this, false, passive);\r\n            return;\r\n        }\r\n\r\n        if (!utils_is.number(index)) {\r\n            this.debug.warn('Invalid caption argument', index);\r\n            return;\r\n        }\r\n\r\n        if (!(index in tracks)) {\r\n            this.debug.warn('Track not found', index);\r\n            return;\r\n        }\r\n\r\n        if (this.captions.currentTrack !== index) {\r\n            this.captions.currentTrack = index;\r\n            const track = tracks[index];\r\n            const { language } = track || {};\r\n\r\n            // Store reference to node for invalidation on remove\r\n            this.captions.currentTrackNode = track;\r\n\r\n            // Update settings menu\r\n            js_controls.updateSetting.call(this, 'captions');\r\n\r\n            // When passive, don't override user preferences\r\n            if (!passive) {\r\n                this.captions.language = language;\r\n                this.storage.set({ language });\r\n            }\r\n\r\n            // Handle Vimeo captions\r\n            if (this.isVimeo) {\r\n                this.embed.enableTextTrack(language);\r\n            }\r\n\r\n            // Trigger event\r\n            triggerEvent.call(this, this.media, 'languagechange');\r\n        }\r\n\r\n        // Show captions\r\n        captions.toggle.call(this, true, passive);\r\n\r\n        if (this.isHTML5 && this.isVideo) {\r\n            // If we change the active track while a cue is already displayed we need to update it\r\n            captions.updateCues.call(this);\r\n        }\r\n    },\r\n\r\n    // Set captions by language\r\n    // Used internally for the language setter with the passive option forced to false\r\n    setLanguage(input, passive = true) {\r\n        if (!utils_is.string(input)) {\r\n            this.debug.warn('Invalid language argument', input);\r\n            return;\r\n        }\r\n        // Normalize\r\n        const language = input.toLowerCase();\r\n        this.captions.language = language;\r\n\r\n        // Set currentTrack\r\n        const tracks = captions.getTracks.call(this);\r\n        const track = captions.findTrack.call(this, [language]);\r\n        captions.set.call(this, tracks.indexOf(track), passive);\r\n    },\r\n\r\n    // Get current valid caption tracks\r\n    // If update is false it will also ignore tracks without metadata\r\n    // This is used to \"freeze\" the language options when captions.update is false\r\n    getTracks(update = false) {\r\n        // Handle media or textTracks missing or null\r\n        const tracks = Array.from((this.media || {}).textTracks || []);\r\n        // For HTML5, use cache instead of current tracks when it exists (if captions.update is false)\r\n        // Filter out removed tracks and tracks that aren't captions/subtitles (for example metadata)\r\n        return tracks\r\n            .filter(track => !this.isHTML5 || update || this.captions.meta.has(track))\r\n            .filter(track => ['captions', 'subtitles'].includes(track.kind));\r\n    },\r\n\r\n    // Match tracks based on languages and get the first\r\n    findTrack(languages, force = false) {\r\n        const tracks = captions.getTracks.call(this);\r\n        const sortIsDefault = track => Number((this.captions.meta.get(track) || {}).default);\r\n        const sorted = Array.from(tracks).sort((a, b) => sortIsDefault(b) - sortIsDefault(a));\r\n        let track;\r\n        languages.every(language => {\r\n            track = sorted.find(track => track.language === language);\r\n            return !track; // Break iteration if there is a match\r\n        });\r\n        // If no match is found but is required, get first\r\n        return track || (force ? sorted[0] : undefined);\r\n    },\r\n\r\n    // Get the current track\r\n    getCurrentTrack() {\r\n        return captions.getTracks.call(this)[this.currentTrack];\r\n    },\r\n\r\n    // Get UI label for track\r\n    getLabel(track) {\r\n        let currentTrack = track;\r\n\r\n        if (!utils_is.track(currentTrack) && js_support.textTracks && this.captions.toggled) {\r\n            currentTrack = captions.getCurrentTrack.call(this);\r\n        }\r\n\r\n        if (utils_is.track(currentTrack)) {\r\n            if (!utils_is.empty(currentTrack.label)) {\r\n                return currentTrack.label;\r\n            }\r\n\r\n            if (!utils_is.empty(currentTrack.language)) {\r\n                return track.language.toUpperCase();\r\n            }\r\n\r\n            return utils_i18n.get('enabled', this.config);\r\n        }\r\n\r\n        return utils_i18n.get('disabled', this.config);\r\n    },\r\n\r\n    // Update captions using current track's active cues\r\n    // Also optional array argument in case there isn't any track (ex: vimeo)\r\n    updateCues(input) {\r\n        // Requires UI\r\n        if (!this.supported.ui) {\r\n            return;\r\n        }\r\n\r\n        if (!utils_is.element(this.elements.captions)) {\r\n            this.debug.warn('No captions element to render to');\r\n            return;\r\n        }\r\n\r\n        // Only accept array or empty input\r\n        if (!utils_is.nullOrUndefined(input) && !Array.isArray(input)) {\r\n            this.debug.warn('updateCues: Invalid input', input);\r\n            return;\r\n        }\r\n\r\n        let cues = input;\r\n\r\n        // Get cues from track\r\n        if (!cues) {\r\n            const track = captions.getCurrentTrack.call(this);\r\n            cues = Array.from((track || {}).activeCues || [])\r\n                .map(cue => cue.getCueAsHTML())\r\n                .map(getHTML);\r\n        }\r\n\r\n        // Set new caption text\r\n        const content = cues.map(cueText => cueText.trim()).join('\\n');\r\n        const changed = content !== this.elements.captions.innerHTML;\r\n\r\n        if (changed) {\r\n            // Empty the container and create a new child element\r\n            emptyElement(this.elements.captions);\r\n            const caption = elements_createElement('span', getAttributesFromSelector(this.config.selectors.caption));\r\n            caption.innerHTML = content;\r\n            this.elements.captions.appendChild(caption);\r\n\r\n            // Trigger event\r\n            triggerEvent.call(this, this.media, 'cuechange');\r\n        }\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_captions = (captions);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/config/defaults.js\n// ==========================================================================\r\n// Plyr default config\r\n// ==========================================================================\r\n\r\nconst defaults_defaults = {\r\n    // Disable\r\n    enabled: true,\r\n\r\n    // Custom media title\r\n    title: '',\r\n\r\n    // Logging to console\r\n    debug: false,\r\n\r\n    // Auto play (if supported)\r\n    autoplay: false,\r\n\r\n    // Only allow one media playing at once (vimeo only)\r\n    autopause: true,\r\n\r\n    // Allow inline playback on iOS (this effects YouTube/Vimeo - HTML5 requires the attribute present)\r\n    // TODO: Remove iosNative fullscreen option in favour of this (logic needs work)\r\n    playsinline: true,\r\n\r\n    // Default time to skip when rewind/fast forward\r\n    seekTime: 10,\r\n\r\n    // Default volume\r\n    volume: 1,\r\n    muted: false,\r\n\r\n    // Pass a custom duration\r\n    duration: null,\r\n\r\n    // Display the media duration on load in the current time position\r\n    // If you have opted to display both duration and currentTime, this is ignored\r\n    displayDuration: true,\r\n\r\n    // Invert the current time to be a countdown\r\n    invertTime: true,\r\n\r\n    // Clicking the currentTime inverts it's value to show time left rather than elapsed\r\n    toggleInvert: true,\r\n\r\n    // Aspect ratio (for embeds)\r\n    ratio: '16:9',\r\n\r\n    // Click video container to play/pause\r\n    clickToPlay: true,\r\n\r\n    // Auto hide the controls\r\n    hideControls: true,\r\n\r\n    // Reset to start when playback ended\r\n    resetOnEnd: false,\r\n\r\n    // Disable the standard context menu\r\n    disableContextMenu: true,\r\n\r\n    // Sprite (for icons)\r\n    loadSprite: true,\r\n    iconPrefix: 'plyr',\r\n    iconUrl: 'https://cdn.plyr.io/3.5.2/plyr.svg',\r\n\r\n    // Blank video (used to prevent errors on source change)\r\n    blankVideo: 'https://cdn.plyr.io/static/blank.mp4',\r\n\r\n    // Quality default\r\n    quality: {\r\n        default: 576,\r\n        options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240],\r\n    },\r\n\r\n    // Set loops\r\n    loop: {\r\n        active: false,\r\n        // start: null,\r\n        // end: null,\r\n    },\r\n\r\n    // Speed default and options to display\r\n    speed: {\r\n        selected: 1,\r\n        options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],\r\n    },\r\n\r\n    // Keyboard shortcut settings\r\n    keyboard: {\r\n        focused: true,\r\n        global: false,\r\n    },\r\n\r\n    // Display tooltips\r\n    tooltips: {\r\n        controls: false,\r\n        seek: true,\r\n    },\r\n\r\n    // Captions settings\r\n    captions: {\r\n        active: false,\r\n        language: 'auto',\r\n        // Listen to new tracks added after Plyr is initialized.\r\n        // This is needed for streaming captions, but may result in unselectable options\r\n        update: false,\r\n    },\r\n\r\n    // Fullscreen settings\r\n    fullscreen: {\r\n        enabled: true, // Allow fullscreen?\r\n        fallback: true, // Fallback using full viewport/window\r\n        iosNative: false, // Use the native fullscreen in iOS (disables custom controls)\r\n    },\r\n\r\n    // Local storage\r\n    storage: {\r\n        enabled: true,\r\n        key: 'plyr',\r\n    },\r\n\r\n    // Default controls\r\n    controls: [\r\n        'play-large',\r\n        // 'restart',\r\n        // 'rewind',\r\n        'play',\r\n        // 'fast-forward',\r\n        'progress',\r\n        'current-time',\r\n        'mute',\r\n        'volume',\r\n        'captions',\r\n        'settings',\r\n        'pip',\r\n        'airplay',\r\n        // 'download',\r\n        'fullscreen',\r\n    ],\r\n    settings: ['captions', 'quality', 'speed'],\r\n\r\n    // Localisation\r\n    i18n: {\r\n        restart: 'Restart',\r\n        rewind: 'Rewind {seektime}s',\r\n        play: 'Play',\r\n        pause: 'Pause',\r\n        fastForward: 'Forward {seektime}s',\r\n        seek: 'Seek',\r\n        seekLabel: '{currentTime} of {duration}',\r\n        played: 'Played',\r\n        buffered: 'Buffered',\r\n        currentTime: 'Current time',\r\n        duration: 'Duration',\r\n        volume: 'Volume',\r\n        mute: 'Mute',\r\n        unmute: 'Unmute',\r\n        enableCaptions: 'Enable captions',\r\n        disableCaptions: 'Disable captions',\r\n        download: 'Download',\r\n        enterFullscreen: 'Enter fullscreen',\r\n        exitFullscreen: 'Exit fullscreen',\r\n        frameTitle: 'Player for {title}',\r\n        captions: 'Captions',\r\n        settings: 'Settings',\r\n        menuBack: 'Go back to previous menu',\r\n        speed: 'Speed',\r\n        normal: 'Normal',\r\n        quality: 'Quality',\r\n        loop: 'Loop',\r\n        start: 'Start',\r\n        end: 'End',\r\n        all: 'All',\r\n        reset: 'Reset',\r\n        disabled: 'Disabled',\r\n        enabled: 'Enabled',\r\n        advertisement: 'Ad',\r\n        qualityBadge: {\r\n            2160: '4K',\r\n            1440: 'HD',\r\n            1080: 'HD',\r\n            720: 'HD',\r\n            576: 'SD',\r\n            480: 'SD',\r\n        },\r\n    },\r\n\r\n    // URLs\r\n    urls: {\r\n        download: null,\r\n        vimeo: {\r\n            sdk: 'https://player.vimeo.com/api/player.js',\r\n            iframe: 'https://player.vimeo.com/video/{0}?{1}',\r\n            api: 'https://vimeo.com/api/v2/video/{0}.json',\r\n        },\r\n        youtube: {\r\n            sdk: 'https://www.youtube.com/iframe_api',\r\n            api:\r\n                'https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet',\r\n        },\r\n        googleIMA: {\r\n            sdk: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js',\r\n        },\r\n    },\r\n\r\n    // Custom control listeners\r\n    listeners: {\r\n        seek: null,\r\n        play: null,\r\n        pause: null,\r\n        restart: null,\r\n        rewind: null,\r\n        fastForward: null,\r\n        mute: null,\r\n        volume: null,\r\n        captions: null,\r\n        download: null,\r\n        fullscreen: null,\r\n        pip: null,\r\n        airplay: null,\r\n        speed: null,\r\n        quality: null,\r\n        loop: null,\r\n        language: null,\r\n    },\r\n\r\n    // Events to watch and bubble\r\n    events: [\r\n        // Events to watch on HTML5 media elements and bubble\r\n        // https://developer.mozilla.org/en/docs/Web/Guide/Events/Media_events\r\n        'ended',\r\n        'progress',\r\n        'stalled',\r\n        'playing',\r\n        'waiting',\r\n        'canplay',\r\n        'canplaythrough',\r\n        'loadstart',\r\n        'loadeddata',\r\n        'loadedmetadata',\r\n        'timeupdate',\r\n        'volumechange',\r\n        'play',\r\n        'pause',\r\n        'error',\r\n        'seeking',\r\n        'seeked',\r\n        'emptied',\r\n        'ratechange',\r\n        'cuechange',\r\n\r\n        // Custom events\r\n        'download',\r\n        'enterfullscreen',\r\n        'exitfullscreen',\r\n        'captionsenabled',\r\n        'captionsdisabled',\r\n        'languagechange',\r\n        'controlshidden',\r\n        'controlsshown',\r\n        'ready',\r\n\r\n        // YouTube\r\n        'statechange',\r\n\r\n        // Quality\r\n        'qualitychange',\r\n\r\n        // Ads\r\n        'adsloaded',\r\n        'adscontentpause',\r\n        'adscontentresume',\r\n        'adstarted',\r\n        'adsmidpoint',\r\n        'adscomplete',\r\n        'adsallcomplete',\r\n        'adsimpression',\r\n        'adsclick',\r\n    ],\r\n\r\n    // Selectors\r\n    // Change these to match your template if using custom HTML\r\n    selectors: {\r\n        editable: 'input, textarea, select, [contenteditable]',\r\n        container: '.plyr',\r\n        controls: {\r\n            container: null,\r\n            wrapper: '.plyr__controls',\r\n        },\r\n        labels: '[data-plyr]',\r\n        buttons: {\r\n            play: '[data-plyr=\"play\"]',\r\n            pause: '[data-plyr=\"pause\"]',\r\n            restart: '[data-plyr=\"restart\"]',\r\n            rewind: '[data-plyr=\"rewind\"]',\r\n            fastForward: '[data-plyr=\"fast-forward\"]',\r\n            mute: '[data-plyr=\"mute\"]',\r\n            captions: '[data-plyr=\"captions\"]',\r\n            download: '[data-plyr=\"download\"]',\r\n            fullscreen: '[data-plyr=\"fullscreen\"]',\r\n            pip: '[data-plyr=\"pip\"]',\r\n            airplay: '[data-plyr=\"airplay\"]',\r\n            settings: '[data-plyr=\"settings\"]',\r\n            loop: '[data-plyr=\"loop\"]',\r\n        },\r\n        inputs: {\r\n            seek: '[data-plyr=\"seek\"]',\r\n            volume: '[data-plyr=\"volume\"]',\r\n            speed: '[data-plyr=\"speed\"]',\r\n            language: '[data-plyr=\"language\"]',\r\n            quality: '[data-plyr=\"quality\"]',\r\n        },\r\n        display: {\r\n            currentTime: '.plyr__time--current',\r\n            duration: '.plyr__time--duration',\r\n            buffer: '.plyr__progress__buffer',\r\n            loop: '.plyr__progress__loop', // Used later\r\n            volume: '.plyr__volume--display',\r\n        },\r\n        progress: '.plyr__progress',\r\n        captions: '.plyr__captions',\r\n        caption: '.plyr__caption',\r\n        menu: {\r\n            quality: '.js-plyr__menu__list--quality',\r\n        },\r\n    },\r\n\r\n    // Class hooks added to the player in different states\r\n    classNames: {\r\n        type: 'plyr--{0}',\r\n        provider: 'plyr--{0}',\r\n        video: 'plyr__video-wrapper',\r\n        embed: 'plyr__video-embed',\r\n        embedContainer: 'plyr__video-embed__container',\r\n        poster: 'plyr__poster',\r\n        posterEnabled: 'plyr__poster-enabled',\r\n        ads: 'plyr__ads',\r\n        control: 'plyr__control',\r\n        controlPressed: 'plyr__control--pressed',\r\n        playing: 'plyr--playing',\r\n        paused: 'plyr--paused',\r\n        stopped: 'plyr--stopped',\r\n        loading: 'plyr--loading',\r\n        hover: 'plyr--hover',\r\n        tooltip: 'plyr__tooltip',\r\n        cues: 'plyr__cues',\r\n        hidden: 'plyr__sr-only',\r\n        hideControls: 'plyr--hide-controls',\r\n        isIos: 'plyr--is-ios',\r\n        isTouch: 'plyr--is-touch',\r\n        uiSupported: 'plyr--full-ui',\r\n        noTransition: 'plyr--no-transition',\r\n        display: {\r\n            time: 'plyr__time',\r\n        },\r\n        menu: {\r\n            value: 'plyr__menu__value',\r\n            badge: 'plyr__badge',\r\n            open: 'plyr--menu-open',\r\n        },\r\n        captions: {\r\n            enabled: 'plyr--captions-enabled',\r\n            active: 'plyr--captions-active',\r\n        },\r\n        fullscreen: {\r\n            enabled: 'plyr--fullscreen-enabled',\r\n            fallback: 'plyr--fullscreen-fallback',\r\n        },\r\n        pip: {\r\n            supported: 'plyr--pip-supported',\r\n            active: 'plyr--pip-active',\r\n        },\r\n        airplay: {\r\n            supported: 'plyr--airplay-supported',\r\n            active: 'plyr--airplay-active',\r\n        },\r\n        tabFocus: 'plyr__tab-focus',\r\n        previewThumbnails: {\r\n            // Tooltip thumbs\r\n            thumbContainer: 'plyr__preview-thumb',\r\n            thumbContainerShown: 'plyr__preview-thumb--is-shown',\r\n            imageContainer: 'plyr__preview-thumb__image-container',\r\n            timeContainer: 'plyr__preview-thumb__time-container',\r\n            // Scrubbing\r\n            scrubbingContainer: 'plyr__preview-scrubbing',\r\n            scrubbingContainerShown: 'plyr__preview-scrubbing--is-shown',\r\n        },\r\n    },\r\n\r\n    // Embed attributes\r\n    attributes: {\r\n        embed: {\r\n            provider: 'data-plyr-provider',\r\n            id: 'data-plyr-embed-id',\r\n        },\r\n    },\r\n\r\n    // API keys\r\n    keys: {\r\n        google: null,\r\n    },\r\n\r\n    // Advertisements plugin\r\n    // Register for an account here: http://vi.ai/publisher-video-monetization/?aid=plyrio\r\n    ads: {\r\n        enabled: false,\r\n        publisherId: '',\r\n        tagUrl: '',\r\n    },\r\n\r\n    // Preview Thumbnails plugin\r\n    previewThumbnails: {\r\n        enabled: false,\r\n        src: '',\r\n    },\r\n\r\n    // Vimeo plugin\r\n    vimeo: {\r\n        byline: false,\r\n        portrait: false,\r\n        title: false,\r\n        speed: true,\r\n        transparent: false,\r\n    },\r\n\r\n    // YouTube plugin\r\n    youtube: {\r\n        noCookie: false, // Whether to use an alternative version of YouTube without cookies\r\n        rel: 0, // No related vids\r\n        showinfo: 0, // Hide info\r\n        iv_load_policy: 3, // Hide annotations\r\n        modestbranding: 1, // Hide logos as much as possible (they still show one in the corner when paused)\r\n    },\r\n};\r\n\r\n/* harmony default export */ var config_defaults = (defaults_defaults);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/config/states.js\n// ==========================================================================\r\n// Plyr states\r\n// ==========================================================================\r\n\r\nconst pip = {\r\n    active: 'picture-in-picture',\r\n    inactive: 'inline',\r\n};\r\n\r\n/* harmony default export */ var states = ({ pip });\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/config/types.js\n// ==========================================================================\r\n// Plyr supported types and providers\r\n// ==========================================================================\r\n\r\nconst providers = {\r\n    html5: 'html5',\r\n    youtube: 'youtube',\r\n    vimeo: 'vimeo',\r\n};\r\n\r\nconst types = {\r\n    audio: 'audio',\r\n    video: 'video',\r\n};\r\n\r\n/**\r\n * Get provider by URL\r\n * @param {String} url\r\n */\r\nfunction getProviderByUrl(url) {\r\n    // YouTube\r\n    if (/^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtube-nocookie\\.com|youtu\\.?be)\\/.+$/.test(url)) {\r\n        return providers.youtube;\r\n    }\r\n\r\n    // Vimeo\r\n    if (/^https?:\\/\\/player.vimeo.com\\/video\\/\\d{0,9}(?=\\b|\\/)/.test(url)) {\r\n        return providers.vimeo;\r\n    }\r\n\r\n    return null;\r\n}\r\n\r\n/* harmony default export */ var config_types = ({ providers, types });\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/console.js\n// ==========================================================================\r\n// Console wrapper\r\n// ==========================================================================\r\n\r\nconst noop = () => {};\r\n\r\nclass Console {\r\n    constructor(enabled = false) {\r\n        this.enabled = window.console && enabled;\r\n\r\n        if (this.enabled) {\r\n            this.log('Debugging enabled');\r\n        }\r\n    }\r\n\r\n    get log() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.log, console) : noop;\r\n    }\r\n\r\n    get warn() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.warn, console) : noop;\r\n    }\r\n\r\n    get error() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;\r\n    }\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/fullscreen.js\n// ==========================================================================\r\n// Fullscreen wrapper\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API#prefixing\r\n// https://webkit.org/blog/7929/designing-websites-for-iphone-x/\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction fullscreen_onChange() {\r\n    if (!this.enabled) {\r\n        return;\r\n    }\r\n\r\n    // Update toggle button\r\n    const button = this.player.elements.buttons.fullscreen;\r\n    if (utils_is.element(button)) {\r\n        button.pressed = this.active;\r\n    }\r\n\r\n    // Trigger an event\r\n    triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true);\r\n\r\n    // Trap focus in container\r\n    if (!utils_browser.isIos) {\r\n        trapFocus.call(this.player, this.target, this.active);\r\n    }\r\n}\r\n\r\nfunction toggleFallback(toggle = false) {\r\n    // Store or restore scroll position\r\n    if (toggle) {\r\n        this.scrollPosition = {\r\n            x: window.scrollX || 0,\r\n            y: window.scrollY || 0,\r\n        };\r\n    } else {\r\n        window.scrollTo(this.scrollPosition.x, this.scrollPosition.y);\r\n    }\r\n\r\n    // Toggle scroll\r\n    document.body.style.overflow = toggle ? 'hidden' : '';\r\n\r\n    // Toggle class hook\r\n    toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle);\r\n\r\n    // Force full viewport on iPhone X+\r\n    if (utils_browser.isIos) {\r\n        let viewport = document.head.querySelector('meta[name=\"viewport\"]');\r\n        const property = 'viewport-fit=cover';\r\n\r\n        // Inject the viewport meta if required\r\n        if (!viewport) {\r\n            viewport = document.createElement('meta');\r\n            viewport.setAttribute('name', 'viewport');\r\n        }\r\n\r\n        // Check if the property already exists\r\n        const hasProperty = utils_is.string(viewport.content) && viewport.content.includes(property);\r\n\r\n        if (toggle) {\r\n            this.cleanupViewport = !hasProperty;\r\n\r\n            if (!hasProperty) {\r\n                viewport.content += `,${property}`;\r\n            }\r\n        } else if (this.cleanupViewport) {\r\n            viewport.content = viewport.content\r\n                .split(',')\r\n                .filter(part => part.trim() !== property)\r\n                .join(',');\r\n        }\r\n\r\n        // Force a repaint as sometimes Safari doesn't want to fill the screen\r\n        setTimeout(() => repaint(this.target), 100);\r\n    }\r\n\r\n    // Toggle button and fire events\r\n    fullscreen_onChange.call(this);\r\n}\r\n\r\nclass fullscreen_Fullscreen {\r\n    constructor(player) {\r\n        // Keep reference to parent\r\n        this.player = player;\r\n\r\n        // Get prefix\r\n        this.prefix = fullscreen_Fullscreen.prefix;\r\n        this.property = fullscreen_Fullscreen.property;\r\n\r\n        // Scroll position\r\n        this.scrollPosition = { x: 0, y: 0 };\r\n\r\n        // Force the use of 'full window/browser' rather than fullscreen\r\n        this.forceFallback = player.config.fullscreen.fallback === 'force';\r\n\r\n        // Register event listeners\r\n        // Handle event (incase user presses escape etc)\r\n        events_on.call(\r\n            this.player,\r\n            document,\r\n            this.prefix === 'ms' ? 'MSFullscreenChange' : `${this.prefix}fullscreenchange`,\r\n            () => {\r\n                // TODO: Filter for target??\r\n                fullscreen_onChange.call(this);\r\n            },\r\n        );\r\n\r\n        // Fullscreen toggle on double click\r\n        events_on.call(this.player, this.player.elements.container, 'dblclick', event => {\r\n            // Ignore double click in controls\r\n            if (utils_is.element(this.player.elements.controls) && this.player.elements.controls.contains(event.target)) {\r\n                return;\r\n            }\r\n\r\n            this.toggle();\r\n        });\r\n\r\n        // Update the UI\r\n        this.update();\r\n    }\r\n\r\n    // Determine if native supported\r\n    static get native() {\r\n        return !!(\r\n            document.fullscreenEnabled ||\r\n            document.webkitFullscreenEnabled ||\r\n            document.mozFullScreenEnabled ||\r\n            document.msFullscreenEnabled\r\n        );\r\n    }\r\n\r\n    // If we're actually using native\r\n    get usingNative() {\r\n        return fullscreen_Fullscreen.native && !this.forceFallback;\r\n    }\r\n\r\n    // Get the prefix for handlers\r\n    static get prefix() {\r\n        // No prefix\r\n        if (utils_is.function(document.exitFullscreen)) {\r\n            return '';\r\n        }\r\n\r\n        // Check for fullscreen support by vendor prefix\r\n        let value = '';\r\n        const prefixes = ['webkit', 'moz', 'ms'];\r\n\r\n        prefixes.some(pre => {\r\n            if (utils_is.function(document[`${pre}ExitFullscreen`]) || utils_is.function(document[`${pre}CancelFullScreen`])) {\r\n                value = pre;\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        });\r\n\r\n        return value;\r\n    }\r\n\r\n    static get property() {\r\n        return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';\r\n    }\r\n\r\n    // Determine if fullscreen is enabled\r\n    get enabled() {\r\n        return (\r\n            (fullscreen_Fullscreen.native || this.player.config.fullscreen.fallback) &&\r\n            this.player.config.fullscreen.enabled &&\r\n            this.player.supported.ui &&\r\n            this.player.isVideo\r\n        );\r\n    }\r\n\r\n    // Get active state\r\n    get active() {\r\n        if (!this.enabled) {\r\n            return false;\r\n        }\r\n\r\n        // Fallback using classname\r\n        if (!fullscreen_Fullscreen.native || this.forceFallback) {\r\n            return hasClass(this.target, this.player.config.classNames.fullscreen.fallback);\r\n        }\r\n\r\n        const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`];\r\n\r\n        return element === this.target;\r\n    }\r\n\r\n    // Get target element\r\n    get target() {\r\n        return utils_browser.isIos && this.player.config.fullscreen.iosNative\r\n            ? this.player.media\r\n            : this.player.elements.container;\r\n    }\r\n\r\n    // Update UI\r\n    update() {\r\n        if (this.enabled) {\r\n            let mode;\r\n\r\n            if (this.forceFallback) {\r\n                mode = 'Fallback (forced)';\r\n            } else if (fullscreen_Fullscreen.native) {\r\n                mode = 'Native';\r\n            } else {\r\n                mode = 'Fallback';\r\n            }\r\n\r\n            this.player.debug.log(`${mode} fullscreen enabled`);\r\n        } else {\r\n            this.player.debug.log('Fullscreen not supported and fallback disabled');\r\n        }\r\n\r\n        // Add styling hook to show button\r\n        toggleClass(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);\r\n    }\r\n\r\n    // Make an element fullscreen\r\n    enter() {\r\n        if (!this.enabled) {\r\n            return;\r\n        }\r\n\r\n        // iOS native fullscreen doesn't need the request step\r\n        if (utils_browser.isIos && this.player.config.fullscreen.iosNative) {\r\n            this.target.webkitEnterFullscreen();\r\n        } else if (!fullscreen_Fullscreen.native || this.forceFallback) {\r\n            toggleFallback.call(this, true);\r\n        } else if (!this.prefix) {\r\n            this.target.requestFullscreen();\r\n        } else if (!utils_is.empty(this.prefix)) {\r\n            this.target[`${this.prefix}Request${this.property}`]();\r\n        }\r\n    }\r\n\r\n    // Bail from fullscreen\r\n    exit() {\r\n        if (!this.enabled) {\r\n            return;\r\n        }\r\n\r\n        // iOS native fullscreen\r\n        if (utils_browser.isIos && this.player.config.fullscreen.iosNative) {\r\n            this.target.webkitExitFullscreen();\r\n            this.player.play();\r\n        } else if (!fullscreen_Fullscreen.native || this.forceFallback) {\r\n            toggleFallback.call(this, false);\r\n        } else if (!this.prefix) {\r\n            (document.cancelFullScreen || document.exitFullscreen).call(document);\r\n        } else if (!utils_is.empty(this.prefix)) {\r\n            const action = this.prefix === 'moz' ? 'Cancel' : 'Exit';\r\n            document[`${this.prefix}${action}${this.property}`]();\r\n        }\r\n    }\r\n\r\n    // Toggle state\r\n    toggle() {\r\n        if (!this.active) {\r\n            this.enter();\r\n        } else {\r\n            this.exit();\r\n        }\r\n    }\r\n}\r\n\r\n/* harmony default export */ var fullscreen = (fullscreen_Fullscreen);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/loadImage.js\n// ==========================================================================\r\n// Load image avoiding xhr/fetch CORS issues\r\n// Server status can't be obtained this way unfortunately, so this uses \"naturalWidth\" to determine if the image has loaded\r\n// By default it checks if it is at least 1px, but you can add a second argument to change this\r\n// ==========================================================================\r\n\r\nfunction loadImage_loadImage(src, minWidth = 1) {\r\n    return new Promise((resolve, reject) => {\r\n        const image = new Image();\r\n\r\n        const handler = () => {\r\n            delete image.onload;\r\n            delete image.onerror;\r\n            (image.naturalWidth >= minWidth ? resolve : reject)(image);\r\n        };\r\n\r\n        Object.assign(image, { onload: handler, onerror: handler, src });\r\n    });\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/ui.js\n// ==========================================================================\r\n// Plyr UI\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ui_ui = {\r\n    addStyleHook() {\r\n        toggleClass(this.elements.container, this.config.selectors.container.replace('.', ''), true);\r\n        toggleClass(this.elements.container, this.config.classNames.uiSupported, this.supported.ui);\r\n    },\r\n\r\n    // Toggle native HTML5 media controls\r\n    toggleNativeControls(toggle = false) {\r\n        if (toggle && this.isHTML5) {\r\n            this.media.setAttribute('controls', '');\r\n        } else {\r\n            this.media.removeAttribute('controls');\r\n        }\r\n    },\r\n\r\n    // Setup the UI\r\n    build() {\r\n        // Re-attach media element listeners\r\n        // TODO: Use event bubbling?\r\n        this.listeners.media();\r\n\r\n        // Don't setup interface if no support\r\n        if (!this.supported.ui) {\r\n            this.debug.warn(`Basic support only for ${this.provider} ${this.type}`);\r\n\r\n            // Restore native controls\r\n            ui_ui.toggleNativeControls.call(this, true);\r\n\r\n            // Bail\r\n            return;\r\n        }\r\n\r\n        // Inject custom controls if not present\r\n        if (!utils_is.element(this.elements.controls)) {\r\n            // Inject custom controls\r\n            js_controls.inject.call(this);\r\n\r\n            // Re-attach control listeners\r\n            this.listeners.controls();\r\n        }\r\n\r\n        // Remove native controls\r\n        ui_ui.toggleNativeControls.call(this);\r\n\r\n        // Setup captions for HTML5\r\n        if (this.isHTML5) {\r\n            js_captions.setup.call(this);\r\n        }\r\n\r\n        // Reset volume\r\n        this.volume = null;\r\n\r\n        // Reset mute state\r\n        this.muted = null;\r\n\r\n        // Reset speed\r\n        this.speed = null;\r\n\r\n        // Reset loop state\r\n        this.loop = null;\r\n\r\n        // Reset quality setting\r\n        this.quality = null;\r\n\r\n        // Reset volume display\r\n        js_controls.updateVolume.call(this);\r\n\r\n        // Reset time display\r\n        js_controls.timeUpdate.call(this);\r\n\r\n        // Update the UI\r\n        ui_ui.checkPlaying.call(this);\r\n\r\n        // Check for picture-in-picture support\r\n        toggleClass(\r\n            this.elements.container,\r\n            this.config.classNames.pip.supported,\r\n            js_support.pip && this.isHTML5 && this.isVideo,\r\n        );\r\n\r\n        // Check for airplay support\r\n        toggleClass(this.elements.container, this.config.classNames.airplay.supported, js_support.airplay && this.isHTML5);\r\n\r\n        // Add iOS class\r\n        toggleClass(this.elements.container, this.config.classNames.isIos, utils_browser.isIos);\r\n\r\n        // Add touch class\r\n        toggleClass(this.elements.container, this.config.classNames.isTouch, this.touch);\r\n\r\n        // Ready for API calls\r\n        this.ready = true;\r\n\r\n        // Ready event at end of execution stack\r\n        setTimeout(() => {\r\n            triggerEvent.call(this, this.media, 'ready');\r\n        }, 0);\r\n\r\n        // Set the title\r\n        ui_ui.setTitle.call(this);\r\n\r\n        // Assure the poster image is set, if the property was added before the element was created\r\n        if (this.poster) {\r\n            ui_ui.setPoster.call(this, this.poster, false).catch(() => {});\r\n        }\r\n\r\n        // Manually set the duration if user has overridden it.\r\n        // The event listeners for it doesn't get called if preload is disabled (#701)\r\n        if (this.config.duration) {\r\n            js_controls.durationUpdate.call(this);\r\n        }\r\n    },\r\n\r\n    // Setup aria attribute for play and iframe title\r\n    setTitle() {\r\n        // Find the current text\r\n        let label = utils_i18n.get('play', this.config);\r\n\r\n        // If there's a media title set, use that for the label\r\n        if (utils_is.string(this.config.title) && !utils_is.empty(this.config.title)) {\r\n            label += `, ${this.config.title}`;\r\n        }\r\n\r\n        // If there's a play button, set label\r\n        Array.from(this.elements.buttons.play || []).forEach(button => {\r\n            button.setAttribute('aria-label', label);\r\n        });\r\n\r\n        // Set iframe title\r\n        // https://github.com/sampotts/plyr/issues/124\r\n        if (this.isEmbed) {\r\n            const iframe = getElement.call(this, 'iframe');\r\n\r\n            if (!utils_is.element(iframe)) {\r\n                return;\r\n            }\r\n\r\n            // Default to media type\r\n            const title = !utils_is.empty(this.config.title) ? this.config.title : 'video';\r\n            const format = utils_i18n.get('frameTitle', this.config);\r\n\r\n            iframe.setAttribute('title', format.replace('{title}', title));\r\n        }\r\n    },\r\n\r\n    // Toggle poster\r\n    togglePoster(enable) {\r\n        toggleClass(this.elements.container, this.config.classNames.posterEnabled, enable);\r\n    },\r\n\r\n    // Set the poster image (async)\r\n    // Used internally for the poster setter, with the passive option forced to false\r\n    setPoster(poster, passive = true) {\r\n        // Don't override if call is passive\r\n        if (passive && this.poster) {\r\n            return Promise.reject(new Error('Poster already set'));\r\n        }\r\n\r\n        // Set property synchronously to respect the call order\r\n        this.media.setAttribute('poster', poster);\r\n\r\n        // Wait until ui is ready\r\n        return (\r\n            ready\r\n                .call(this)\r\n                // Load image\r\n                .then(() => loadImage_loadImage(poster))\r\n                .catch(err => {\r\n                    // Hide poster on error unless it's been set by another call\r\n                    if (poster === this.poster) {\r\n                        ui_ui.togglePoster.call(this, false);\r\n                    }\r\n                    // Rethrow\r\n                    throw err;\r\n                })\r\n                .then(() => {\r\n                    // Prevent race conditions\r\n                    if (poster !== this.poster) {\r\n                        throw new Error('setPoster cancelled by later call to setPoster');\r\n                    }\r\n                })\r\n                .then(() => {\r\n                    Object.assign(this.elements.poster.style, {\r\n                        backgroundImage: `url('${poster}')`,\r\n                        // Reset backgroundSize as well (since it can be set to \"cover\" for padded thumbnails for youtube)\r\n                        backgroundSize: '',\r\n                    });\r\n                    ui_ui.togglePoster.call(this, true);\r\n                    return poster;\r\n                })\r\n        );\r\n    },\r\n\r\n    // Check playing state\r\n    checkPlaying(event) {\r\n        // Class hooks\r\n        toggleClass(this.elements.container, this.config.classNames.playing, this.playing);\r\n        toggleClass(this.elements.container, this.config.classNames.paused, this.paused);\r\n        toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped);\r\n\r\n        // Set state\r\n        Array.from(this.elements.buttons.play || []).forEach(target => {\r\n            target.pressed = this.playing;\r\n        });\r\n\r\n        // Only update controls on non timeupdate events\r\n        if (utils_is.event(event) && event.type === 'timeupdate') {\r\n            return;\r\n        }\r\n\r\n        // Toggle controls\r\n        ui_ui.toggleControls.call(this);\r\n    },\r\n\r\n    // Check if media is loading\r\n    checkLoading(event) {\r\n        this.loading = ['stalled', 'waiting'].includes(event.type);\r\n\r\n        // Clear timer\r\n        clearTimeout(this.timers.loading);\r\n\r\n        // Timer to prevent flicker when seeking\r\n        this.timers.loading = setTimeout(() => {\r\n            // Update progress bar loading class state\r\n            toggleClass(this.elements.container, this.config.classNames.loading, this.loading);\r\n\r\n            // Update controls visibility\r\n            ui_ui.toggleControls.call(this);\r\n        }, this.loading ? 250 : 0);\r\n    },\r\n\r\n    // Toggle controls based on state and `force` argument\r\n    toggleControls(force) {\r\n        const { controls } = this.elements;\r\n\r\n        if (controls && this.config.hideControls) {\r\n            // Don't hide controls if a touch-device user recently seeked. (Must be limited to touch devices, or it occasionally prevents desktop controls from hiding.)\r\n            const recentTouchSeek = (this.touch && this.lastSeekTime + 2000 > Date.now());\r\n\r\n            // Show controls if force, loading, paused, button interaction, or recent seek, otherwise hide\r\n            this.toggleControls(Boolean(force || this.loading || this.paused || controls.pressed || controls.hover || recentTouchSeek));\r\n        }\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_ui = (ui_ui);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/style.js\n// ==========================================================================\r\n// Style utils\r\n// ==========================================================================\r\n\r\n\r\n\r\n/* function reduceAspectRatio(width, height) {\r\n    const getRatio = (w, h) => (h === 0 ? w : getRatio(h, w % h));\r\n    const ratio = getRatio(width, height);\r\n    return `${width / ratio}:${height / ratio}`;\r\n} */\r\n\r\n// Set aspect ratio for responsive container\r\nfunction setAspectRatio(input) {\r\n    let ratio = input;\r\n\r\n    if (!utils_is.string(ratio) && !utils_is.nullOrUndefined(this.embed)) {\r\n        ({ ratio } = this.embed);\r\n    }\r\n\r\n    if (!utils_is.string(ratio)) {\r\n        ({ ratio } = this.config);\r\n    }\r\n\r\n    const [x, y] = ratio.split(':').map(Number);\r\n    const padding = (100 / x) * y;\r\n\r\n    this.elements.wrapper.style.paddingBottom = `${padding}%`;\r\n\r\n    // For Vimeo we have an extra <div> to hide the standard controls and UI\r\n    if (this.isVimeo && this.supported.ui) {\r\n        const height = 240;\r\n        const offset = (height - padding) / (height / 50);\r\n        this.media.style.transform = `translateY(-${offset}%)`;\r\n    }\r\n\r\n    return { padding, ratio };\r\n}\r\n\r\n/* harmony default export */ var utils_style = ({ setAspectRatio });\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/listeners.js\n// ==========================================================================\r\n// Plyr Event Listeners\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass listeners_Listeners {\r\n    constructor(player) {\r\n        this.player = player;\r\n        this.lastKey = null;\r\n        this.focusTimer = null;\r\n        this.lastKeyDown = null;\r\n\r\n        this.handleKey = this.handleKey.bind(this);\r\n        this.toggleMenu = this.toggleMenu.bind(this);\r\n        this.setTabFocus = this.setTabFocus.bind(this);\r\n        this.firstTouch = this.firstTouch.bind(this);\r\n    }\r\n\r\n    // Handle key presses\r\n    handleKey(event) {\r\n        const { player } = this;\r\n        const { elements } = player;\r\n        const code = event.keyCode ? event.keyCode : event.which;\r\n        const pressed = event.type === 'keydown';\r\n        const repeat = pressed && code === this.lastKey;\r\n\r\n        // Bail if a modifier key is set\r\n        if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\r\n            return;\r\n        }\r\n\r\n        // If the event is bubbled from the media element\r\n        // Firefox doesn't get the keycode for whatever reason\r\n        if (!utils_is.number(code)) {\r\n            return;\r\n        }\r\n\r\n        // Seek by the number keys\r\n        const seekByKey = () => {\r\n            // Divide the max duration into 10th's and times by the number value\r\n            player.currentTime = (player.duration / 10) * (code - 48);\r\n        };\r\n\r\n        // Handle the key on keydown\r\n        // Reset on keyup\r\n        if (pressed) {\r\n            // Check focused element\r\n            // and if the focused element is not editable (e.g. text input)\r\n            // and any that accept key input http://webaim.org/techniques/keyboard/\r\n            const focused = document.activeElement;\r\n            if (utils_is.element(focused)) {\r\n                const { editable } = player.config.selectors;\r\n                const { seek } = elements.inputs;\r\n\r\n                if (focused !== seek && elements_matches(focused, editable)) {\r\n                    return;\r\n                }\r\n\r\n                if (event.which === 32 && elements_matches(focused, 'button, [role^=\"menuitem\"]')) {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            // Which keycodes should we prevent default\r\n            const preventDefault = [32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 56, 57, 67, 70, 73, 75, 76, 77, 79];\r\n\r\n            // If the code is found prevent default (e.g. prevent scrolling for arrows)\r\n            if (preventDefault.includes(code)) {\r\n                event.preventDefault();\r\n                event.stopPropagation();\r\n            }\r\n\r\n            switch (code) {\r\n                case 48:\r\n                case 49:\r\n                case 50:\r\n                case 51:\r\n                case 52:\r\n                case 53:\r\n                case 54:\r\n                case 55:\r\n                case 56:\r\n                case 57:\r\n                    // 0-9\r\n                    if (!repeat) {\r\n                        seekByKey();\r\n                    }\r\n                    break;\r\n\r\n                case 32:\r\n                case 75:\r\n                    // Space and K key\r\n                    if (!repeat) {\r\n                        player.togglePlay();\r\n                    }\r\n                    break;\r\n\r\n                case 38:\r\n                    // Arrow up\r\n                    player.increaseVolume(0.1);\r\n                    break;\r\n\r\n                case 40:\r\n                    // Arrow down\r\n                    player.decreaseVolume(0.1);\r\n                    break;\r\n\r\n                case 77:\r\n                    // M key\r\n                    if (!repeat) {\r\n                        player.muted = !player.muted;\r\n                    }\r\n                    break;\r\n\r\n                case 39:\r\n                    // Arrow forward\r\n                    player.forward();\r\n                    break;\r\n\r\n                case 37:\r\n                    // Arrow back\r\n                    player.rewind();\r\n                    break;\r\n\r\n                case 70:\r\n                    // F key\r\n                    player.fullscreen.toggle();\r\n                    break;\r\n\r\n                case 67:\r\n                    // C key\r\n                    if (!repeat) {\r\n                        player.toggleCaptions();\r\n                    }\r\n                    break;\r\n\r\n                case 76:\r\n                    // L key\r\n                    player.loop = !player.loop;\r\n                    break;\r\n\r\n                    /* case 73:\r\n                    this.setLoop('start');\r\n                    break;\r\n\r\n                case 76:\r\n                    this.setLoop();\r\n                    break;\r\n\r\n                case 79:\r\n                    this.setLoop('end');\r\n                    break; */\r\n\r\n                default:\r\n                    break;\r\n            }\r\n\r\n            // Escape is handle natively when in full screen\r\n            // So we only need to worry about non native\r\n            if (code === 27 && !player.fullscreen.usingNative && player.fullscreen.active) {\r\n                player.fullscreen.toggle();\r\n            }\r\n\r\n            // Store last code for next cycle\r\n            this.lastKey = code;\r\n        } else {\r\n            this.lastKey = null;\r\n        }\r\n    }\r\n\r\n    // Toggle menu\r\n    toggleMenu(event) {\r\n        js_controls.toggleMenu.call(this.player, event);\r\n    }\r\n\r\n    // Device is touch enabled\r\n    firstTouch() {\r\n        const { player } = this;\r\n        const { elements } = player;\r\n\r\n        player.touch = true;\r\n\r\n        // Add touch class\r\n        toggleClass(elements.container, player.config.classNames.isTouch, true);\r\n    }\r\n\r\n    setTabFocus(event) {\r\n        const { player } = this;\r\n        const { elements } = player;\r\n\r\n        clearTimeout(this.focusTimer);\r\n\r\n        // Ignore any key other than tab\r\n        if (event.type === 'keydown' && event.which !== 9) {\r\n            return;\r\n        }\r\n\r\n        // Store reference to event timeStamp\r\n        if (event.type === 'keydown') {\r\n            this.lastKeyDown = event.timeStamp;\r\n        }\r\n\r\n        // Remove current classes\r\n        const removeCurrent = () => {\r\n            const className = player.config.classNames.tabFocus;\r\n            const current = getElements.call(player, `.${className}`);\r\n            toggleClass(current, className, false);\r\n        };\r\n\r\n        // Determine if a key was pressed to trigger this event\r\n        const wasKeyDown = event.timeStamp - this.lastKeyDown <= 20;\r\n\r\n        // Ignore focus events if a key was pressed prior\r\n        if (event.type === 'focus' && !wasKeyDown) {\r\n            return;\r\n        }\r\n\r\n        // Remove all current\r\n        removeCurrent();\r\n\r\n        // Delay the adding of classname until the focus has changed\r\n        // This event fires before the focusin event\r\n        this.focusTimer = setTimeout(() => {\r\n            const focused = document.activeElement;\r\n\r\n            // Ignore if current focus element isn't inside the player\r\n            if (!elements.container.contains(focused)) {\r\n                return;\r\n            }\r\n\r\n            toggleClass(document.activeElement, player.config.classNames.tabFocus, true);\r\n        }, 10);\r\n    }\r\n\r\n    // Global window & document listeners\r\n    global(toggle = true) {\r\n        const { player } = this;\r\n\r\n        // Keyboard shortcuts\r\n        if (player.config.keyboard.global) {\r\n            toggleListener.call(player, window, 'keydown keyup', this.handleKey, toggle, false);\r\n        }\r\n\r\n        // Click anywhere closes menu\r\n        toggleListener.call(player, document.body, 'click', this.toggleMenu, toggle);\r\n\r\n        // Detect touch by events\r\n        events_once.call(player, document.body, 'touchstart', this.firstTouch);\r\n\r\n        // Tab focus detection\r\n        toggleListener.call(player, document.body, 'keydown focus blur', this.setTabFocus, toggle, false, true);\r\n    }\r\n\r\n    // Container listeners\r\n    container() {\r\n        const { player } = this;\r\n        const { config, elements, timers } = player;\r\n\r\n        // Keyboard shortcuts\r\n        if (!config.keyboard.global && config.keyboard.focused) {\r\n            events_on.call(player, elements.container, 'keydown keyup', this.handleKey, false);\r\n        }\r\n\r\n        // Toggle controls on mouse events and entering fullscreen\r\n        events_on.call(\r\n            player,\r\n            elements.container,\r\n            'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen',\r\n            event => {\r\n                const { controls } = elements;\r\n\r\n                // Remove button states for fullscreen\r\n                if (controls && event.type === 'enterfullscreen') {\r\n                    controls.pressed = false;\r\n                    controls.hover = false;\r\n                }\r\n\r\n                // Show, then hide after a timeout unless another control event occurs\r\n                const show = ['touchstart', 'touchmove', 'mousemove'].includes(event.type);\r\n\r\n                let delay = 0;\r\n\r\n                if (show) {\r\n                    js_ui.toggleControls.call(player, true);\r\n                    // Use longer timeout for touch devices\r\n                    delay = player.touch ? 3000 : 2000;\r\n                }\r\n\r\n                // Clear timer\r\n                clearTimeout(timers.controls);\r\n\r\n                // Set new timer to prevent flicker when seeking\r\n                timers.controls = setTimeout(() => js_ui.toggleControls.call(player, false), delay);\r\n            },\r\n        );\r\n\r\n        // Force edge to repaint on exit fullscreen\r\n        // TODO: Fix weird bug where Edge doesn't re-draw when exiting fullscreen\r\n        /* if (browser.isEdge) {\r\n            on.call(player, elements.container, 'exitfullscreen', () => {\r\n                setTimeout(() => repaint(elements.container), 100);\r\n            });\r\n        } */\r\n\r\n        // Set a gutter for Vimeo\r\n        const setGutter = (ratio, padding, toggle) => {\r\n            if (!player.isVimeo) {\r\n                return;\r\n            }\r\n\r\n            const target = player.elements.wrapper.firstChild;\r\n            const [, height] = ratio.split(':').map(Number);\r\n            const [videoWidth, videoHeight] = player.embed.ratio.split(':').map(Number);\r\n\r\n            target.style.maxWidth = toggle ? `${(height / videoHeight) * videoWidth}px` : null;\r\n            target.style.margin = toggle ? '0 auto' : null;\r\n        };\r\n\r\n        // Resize on fullscreen change\r\n        const setPlayerSize = measure => {\r\n            // If we don't need to measure the viewport\r\n            if (!measure) {\r\n                return setAspectRatio.call(player);\r\n            }\r\n\r\n            const rect = elements.container.getBoundingClientRect();\r\n            const { width, height } = rect;\r\n\r\n            return setAspectRatio.call(player, `${width}:${height}`);\r\n        };\r\n\r\n        const resized = () => {\r\n            window.clearTimeout(timers.resized);\r\n            timers.resized = window.setTimeout(setPlayerSize, 50);\r\n        };\r\n\r\n        events_on.call(player, elements.container, 'enterfullscreen exitfullscreen', event => {\r\n            const { target, usingNative } = player.fullscreen;\r\n\r\n            // Ignore for iOS native\r\n            if (!player.isEmbed || target !== elements.container) {\r\n                return;\r\n            }\r\n\r\n            const isEnter = event.type === 'enterfullscreen';\r\n\r\n            // Set the player size when entering fullscreen to viewport size\r\n            const { padding, ratio } = setPlayerSize(isEnter);\r\n\r\n            // Set Vimeo gutter\r\n            setGutter(ratio, padding, isEnter);\r\n\r\n            // If not using native fullscreen, we need to check for resizes of viewport\r\n            if (!usingNative) {\r\n                if (isEnter) {\r\n                    events_on.call(player, window, 'resize', resized);\r\n                } else {\r\n                    off.call(player, window, 'resize', resized);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    // Listen for media events\r\n    media() {\r\n        const { player } = this;\r\n        const { elements } = player;\r\n\r\n        // Time change on media\r\n        events_on.call(player, player.media, 'timeupdate seeking seeked', event => js_controls.timeUpdate.call(player, event));\r\n\r\n        // Display duration\r\n        events_on.call(player, player.media, 'durationchange loadeddata loadedmetadata', event =>\r\n            js_controls.durationUpdate.call(player, event),\r\n        );\r\n\r\n        // Check for audio tracks on load\r\n        // We can't use `loadedmetadata` as it doesn't seem to have audio tracks at that point\r\n        events_on.call(player, player.media, 'canplay loadeddata', () => {\r\n            toggleHidden(elements.volume, !player.hasAudio);\r\n            toggleHidden(elements.buttons.mute, !player.hasAudio);\r\n        });\r\n\r\n        // Handle the media finishing\r\n        events_on.call(player, player.media, 'ended', () => {\r\n            // Show poster on end\r\n            if (player.isHTML5 && player.isVideo && player.config.resetOnEnd) {\r\n                // Restart\r\n                player.restart();\r\n            }\r\n        });\r\n\r\n        // Check for buffer progress\r\n        events_on.call(player, player.media, 'progress playing seeking seeked', event =>\r\n            js_controls.updateProgress.call(player, event),\r\n        );\r\n\r\n        // Handle volume changes\r\n        events_on.call(player, player.media, 'volumechange', event => js_controls.updateVolume.call(player, event));\r\n\r\n        // Handle play/pause\r\n        events_on.call(player, player.media, 'playing play pause ended emptied timeupdate', event =>\r\n            js_ui.checkPlaying.call(player, event),\r\n        );\r\n\r\n        // Loading state\r\n        events_on.call(player, player.media, 'waiting canplay seeked playing', event => js_ui.checkLoading.call(player, event));\r\n\r\n        // Click video\r\n        if (player.supported.ui && player.config.clickToPlay && !player.isAudio) {\r\n            // Re-fetch the wrapper\r\n            const wrapper = getElement.call(player, `.${player.config.classNames.video}`);\r\n\r\n            // Bail if there's no wrapper (this should never happen)\r\n            if (!utils_is.element(wrapper)) {\r\n                return;\r\n            }\r\n\r\n            // On click play, pause or restart\r\n            events_on.call(player, elements.container, 'click', event => {\r\n                const targets = [elements.container, wrapper];\r\n\r\n                // Ignore if click if not container or in video wrapper\r\n                if (!targets.includes(event.target) && !wrapper.contains(event.target)) {\r\n                    return;\r\n                }\r\n\r\n                // Touch devices will just show controls (if hidden)\r\n                if (player.touch && player.config.hideControls) {\r\n                    return;\r\n                }\r\n\r\n                if (player.ended) {\r\n                    this.proxy(event, player.restart, 'restart');\r\n                    this.proxy(event, player.play, 'play');\r\n                } else {\r\n                    this.proxy(event, player.togglePlay, 'play');\r\n                }\r\n            });\r\n        }\r\n\r\n        // Disable right click\r\n        if (player.supported.ui && player.config.disableContextMenu) {\r\n            events_on.call(\r\n                player,\r\n                elements.wrapper,\r\n                'contextmenu',\r\n                event => {\r\n                    event.preventDefault();\r\n                },\r\n                false,\r\n            );\r\n        }\r\n\r\n        // Volume change\r\n        events_on.call(player, player.media, 'volumechange', () => {\r\n            // Save to storage\r\n            player.storage.set({\r\n                volume: player.volume,\r\n                muted: player.muted,\r\n            });\r\n        });\r\n\r\n        // Speed change\r\n        events_on.call(player, player.media, 'ratechange', () => {\r\n            // Update UI\r\n            js_controls.updateSetting.call(player, 'speed');\r\n\r\n            // Save to storage\r\n            player.storage.set({ speed: player.speed });\r\n        });\r\n\r\n        // Quality change\r\n        events_on.call(player, player.media, 'qualitychange', event => {\r\n            // Update UI\r\n            js_controls.updateSetting.call(player, 'quality', null, event.detail.quality);\r\n        });\r\n\r\n        // Update download link when ready and if quality changes\r\n        events_on.call(player, player.media, 'ready qualitychange', () => {\r\n            js_controls.setDownloadLink.call(player);\r\n        });\r\n\r\n        // Proxy events to container\r\n        // Bubble up key events for Edge\r\n        const proxyEvents = player.config.events.concat(['keyup', 'keydown']).join(' ');\r\n\r\n        events_on.call(player, player.media, proxyEvents, event => {\r\n            let { detail = {} } = event;\r\n\r\n            // Get error details from media\r\n            if (event.type === 'error') {\r\n                detail = player.media.error;\r\n            }\r\n\r\n            triggerEvent.call(player, elements.container, event.type, true, detail);\r\n        });\r\n    }\r\n\r\n    // Run default and custom handlers\r\n    proxy(event, defaultHandler, customHandlerKey) {\r\n        const { player } = this;\r\n        const customHandler = player.config.listeners[customHandlerKey];\r\n        const hasCustomHandler = utils_is.function(customHandler);\r\n        let returned = true;\r\n\r\n        // Execute custom handler\r\n        if (hasCustomHandler) {\r\n            returned = customHandler.call(player, event);\r\n        }\r\n\r\n        // Only call default handler if not prevented in custom handler\r\n        if (returned && utils_is.function(defaultHandler)) {\r\n            defaultHandler.call(player, event);\r\n        }\r\n    }\r\n\r\n    // Trigger custom and default handlers\r\n    bind(element, type, defaultHandler, customHandlerKey, passive = true) {\r\n        const { player } = this;\r\n        const customHandler = player.config.listeners[customHandlerKey];\r\n        const hasCustomHandler = utils_is.function(customHandler);\r\n\r\n        events_on.call(\r\n            player,\r\n            element,\r\n            type,\r\n            event => this.proxy(event, defaultHandler, customHandlerKey),\r\n            passive && !hasCustomHandler,\r\n        );\r\n    }\r\n\r\n    // Listen for control events\r\n    controls() {\r\n        const { player } = this;\r\n        const { elements } = player;\r\n\r\n        // IE doesn't support input event, so we fallback to change\r\n        const inputEvent = utils_browser.isIE ? 'change' : 'input';\r\n\r\n        // Play/pause toggle\r\n        if (elements.buttons.play) {\r\n            Array.from(elements.buttons.play).forEach(button => {\r\n                this.bind(button, 'click', player.togglePlay, 'play');\r\n            });\r\n        }\r\n\r\n        // Pause\r\n        this.bind(elements.buttons.restart, 'click', player.restart, 'restart');\r\n\r\n        // Rewind\r\n        this.bind(elements.buttons.rewind, 'click', player.rewind, 'rewind');\r\n\r\n        // Rewind\r\n        this.bind(elements.buttons.fastForward, 'click', player.forward, 'fastForward');\r\n\r\n        // Mute toggle\r\n        this.bind(\r\n            elements.buttons.mute,\r\n            'click',\r\n            () => {\r\n                player.muted = !player.muted;\r\n            },\r\n            'mute',\r\n        );\r\n\r\n        // Captions toggle\r\n        this.bind(elements.buttons.captions, 'click', () => player.toggleCaptions());\r\n\r\n        // Download\r\n        this.bind(\r\n            elements.buttons.download,\r\n            'click',\r\n            () => {\r\n                triggerEvent.call(player, player.media, 'download');\r\n            },\r\n            'download',\r\n        );\r\n\r\n        // Fullscreen toggle\r\n        this.bind(\r\n            elements.buttons.fullscreen,\r\n            'click',\r\n            () => {\r\n                player.fullscreen.toggle();\r\n            },\r\n            'fullscreen',\r\n        );\r\n\r\n        // Picture-in-Picture\r\n        this.bind(\r\n            elements.buttons.pip,\r\n            'click',\r\n            () => {\r\n                player.pip = 'toggle';\r\n            },\r\n            'pip',\r\n        );\r\n\r\n        // Airplay\r\n        this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay');\r\n\r\n        // Settings menu - click toggle\r\n        this.bind(elements.buttons.settings, 'click', event => {\r\n            // Prevent the document click listener closing the menu\r\n            event.stopPropagation();\r\n\r\n            js_controls.toggleMenu.call(player, event);\r\n        });\r\n\r\n        // Settings menu - keyboard toggle\r\n        // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\r\n        // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\r\n        this.bind(\r\n            elements.buttons.settings,\r\n            'keyup',\r\n            event => {\r\n                const code = event.which;\r\n\r\n                // We only care about space and return\r\n                if (![13, 32].includes(code)) {\r\n                    return;\r\n                }\r\n\r\n                // Because return triggers a click anyway, all we need to do is set focus\r\n                if (code === 13) {\r\n                    js_controls.focusFirstMenuItem.call(player, null, true);\r\n                    return;\r\n                }\r\n\r\n                // Prevent scroll\r\n                event.preventDefault();\r\n\r\n                // Prevent playing video (Firefox)\r\n                event.stopPropagation();\r\n\r\n                // Toggle menu\r\n                js_controls.toggleMenu.call(player, event);\r\n            },\r\n            null,\r\n            false, // Can't be passive as we're preventing default\r\n        );\r\n\r\n        // Escape closes menu\r\n        this.bind(elements.settings.menu, 'keydown', event => {\r\n            if (event.which === 27) {\r\n                js_controls.toggleMenu.call(player, event);\r\n            }\r\n        });\r\n\r\n        // Set range input alternative \"value\", which matches the tooltip time (#954)\r\n        this.bind(elements.inputs.seek, 'mousedown mousemove', event => {\r\n            const rect = elements.progress.getBoundingClientRect();\r\n            const percent = (100 / rect.width) * (event.pageX - rect.left);\r\n            event.currentTarget.setAttribute('seek-value', percent);\r\n        });\r\n\r\n        // Pause while seeking\r\n        this.bind(elements.inputs.seek, 'mousedown mouseup keydown keyup touchstart touchend', event => {\r\n            const seek = event.currentTarget;\r\n            const code = event.keyCode ? event.keyCode : event.which;\r\n            const attribute = 'play-on-seeked';\r\n\r\n            if (utils_is.keyboardEvent(event) && (code !== 39 && code !== 37)) {\r\n                return;\r\n            }\r\n\r\n            // Record seek time so we can prevent hiding controls for a few seconds after seek\r\n            player.lastSeekTime = Date.now();\r\n\r\n            // Was playing before?\r\n            const play = seek.hasAttribute(attribute);\r\n\r\n            // Done seeking\r\n            const done = ['mouseup', 'touchend', 'keyup'].includes(event.type);\r\n\r\n            // If we're done seeking and it was playing, resume playback\r\n            if (play && done) {\r\n                seek.removeAttribute(attribute);\r\n                player.play();\r\n            } else if (!done && player.playing) {\r\n                seek.setAttribute(attribute, '');\r\n                player.pause();\r\n            }\r\n        });\r\n\r\n        // Fix range inputs on iOS\r\n        // Super weird iOS bug where after you interact with an <input type=\"range\">,\r\n        // it takes over further interactions on the page. This is a hack\r\n        if (utils_browser.isIos) {\r\n            const inputs = getElements.call(player, 'input[type=\"range\"]');\r\n            Array.from(inputs).forEach(input => this.bind(input, inputEvent, event => repaint(event.target)));\r\n        }\r\n\r\n        // Seek\r\n        this.bind(\r\n            elements.inputs.seek,\r\n            inputEvent,\r\n            event => {\r\n                const seek = event.currentTarget;\r\n\r\n                // If it exists, use seek-value instead of \"value\" for consistency with tooltip time (#954)\r\n                let seekTo = seek.getAttribute('seek-value');\r\n\r\n                if (utils_is.empty(seekTo)) {\r\n                    seekTo = seek.value;\r\n                }\r\n\r\n                seek.removeAttribute('seek-value');\r\n\r\n                player.currentTime = (seekTo / seek.max) * player.duration;\r\n            },\r\n            'seek',\r\n        );\r\n\r\n        // Seek tooltip\r\n        this.bind(elements.progress, 'mouseenter mouseleave mousemove', event =>\r\n            js_controls.updateSeekTooltip.call(player, event),\r\n        );\r\n\r\n        // Preview thumbnails plugin\r\n        // TODO: Really need to work on some sort of plug-in wide event bus or pub-sub for this\r\n        this.bind(elements.progress, 'mousemove touchmove', event => {\r\n            const { previewThumbnails } = player;\r\n\r\n            if (previewThumbnails && previewThumbnails.loaded) {\r\n                previewThumbnails.startMove(event);\r\n            }\r\n        });\r\n\r\n        // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering\r\n        this.bind(elements.progress, 'mouseleave click', () => {\r\n            const { previewThumbnails } = player;\r\n\r\n            if (previewThumbnails && previewThumbnails.loaded) {\r\n                previewThumbnails.endMove(false, true);\r\n            }\r\n        });\r\n\r\n        // Show scrubbing preview\r\n        this.bind(elements.progress, 'mousedown touchstart', event => {\r\n            const { previewThumbnails } = player;\r\n\r\n            if (previewThumbnails && previewThumbnails.loaded) {\r\n                previewThumbnails.startScrubbing(event);\r\n            }\r\n        });\r\n\r\n        this.bind(elements.progress, 'mouseup touchend', event => {\r\n            const { previewThumbnails } = player;\r\n\r\n            if (previewThumbnails && previewThumbnails.loaded) {\r\n                previewThumbnails.endScrubbing(event);\r\n            }\r\n        });\r\n\r\n        // Polyfill for lower fill in <input type=\"range\"> for webkit\r\n        if (utils_browser.isWebkit) {\r\n            Array.from(getElements.call(player, 'input[type=\"range\"]')).forEach(element => {\r\n                this.bind(element, 'input', event => js_controls.updateRangeFill.call(player, event.target));\r\n            });\r\n        }\r\n\r\n        // Current time invert\r\n        // Only if one time element is used for both currentTime and duration\r\n        if (player.config.toggleInvert && !utils_is.element(elements.display.duration)) {\r\n            this.bind(elements.display.currentTime, 'click', () => {\r\n                // Do nothing if we're at the start\r\n                if (player.currentTime === 0) {\r\n                    return;\r\n                }\r\n\r\n                player.config.invertTime = !player.config.invertTime;\r\n\r\n                js_controls.timeUpdate.call(player);\r\n            });\r\n        }\r\n\r\n        // Volume\r\n        this.bind(\r\n            elements.inputs.volume,\r\n            inputEvent,\r\n            event => {\r\n                player.volume = event.target.value;\r\n            },\r\n            'volume',\r\n        );\r\n\r\n        // Update controls.hover state (used for ui.toggleControls to avoid hiding when interacting)\r\n        this.bind(elements.controls, 'mouseenter mouseleave', event => {\r\n            elements.controls.hover = !player.touch && event.type === 'mouseenter';\r\n        });\r\n\r\n        // Update controls.pressed state (used for ui.toggleControls to avoid hiding when interacting)\r\n        this.bind(elements.controls, 'mousedown mouseup touchstart touchend touchcancel', event => {\r\n            elements.controls.pressed = ['mousedown', 'touchstart'].includes(event.type);\r\n        });\r\n\r\n        // Show controls when they receive focus (e.g., when using keyboard tab key)\r\n        this.bind(elements.controls, 'focusin', () => {\r\n            const { config, elements, timers } = player;\r\n\r\n            // Skip transition to prevent focus from scrolling the parent element\r\n            toggleClass(elements.controls, config.classNames.noTransition, true);\r\n\r\n            // Toggle\r\n            js_ui.toggleControls.call(player, true);\r\n\r\n            // Restore transition\r\n            setTimeout(() => {\r\n                toggleClass(elements.controls, config.classNames.noTransition, false);\r\n            }, 0);\r\n\r\n            // Delay a little more for mouse users\r\n            const delay = this.touch ? 3000 : 4000;\r\n\r\n            // Clear timer\r\n            clearTimeout(timers.controls);\r\n\r\n            // Hide again after delay\r\n            timers.controls = setTimeout(() => js_ui.toggleControls.call(player, false), delay);\r\n        });\r\n\r\n        // Mouse wheel for volume\r\n        this.bind(\r\n            elements.inputs.volume,\r\n            'wheel',\r\n            event => {\r\n                // Detect \"natural\" scroll - suppored on OS X Safari only\r\n                // Other browsers on OS X will be inverted until support improves\r\n                const inverted = event.webkitDirectionInvertedFromDevice;\r\n\r\n                // Get delta from event. Invert if `inverted` is true\r\n                const [x, y] = [event.deltaX, -event.deltaY].map(value => (inverted ? -value : value));\r\n\r\n                // Using the biggest delta, normalize to 1 or -1 (or 0 if no delta)\r\n                const direction = Math.sign(Math.abs(x) > Math.abs(y) ? x : y);\r\n\r\n                // Change the volume by 2%\r\n                player.increaseVolume(direction / 50);\r\n\r\n                // Don't break page scrolling at max and min\r\n                const { volume } = player.media;\r\n                if ((direction === 1 && volume < 1) || (direction === -1 && volume > 0)) {\r\n                    event.preventDefault();\r\n                }\r\n            },\r\n            'volume',\r\n            false,\r\n        );\r\n    }\r\n}\r\n\r\n/* harmony default export */ var listeners = (listeners_Listeners);\r\n\n// EXTERNAL MODULE: ./node_modules/loadjs/dist/loadjs.umd.js\nvar loadjs_umd = __webpack_require__(\"./node_modules/loadjs/dist/loadjs.umd.js\");\nvar loadjs_umd_default = /*#__PURE__*/__webpack_require__.n(loadjs_umd);\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/utils/loadScript.js\n// ==========================================================================\r\n// Load an external script\r\n// ==========================================================================\r\n\r\n\r\n\r\nfunction loadScript_loadScript(url) {\r\n    return new Promise((resolve, reject) => {\r\n        loadjs_umd_default()(url, {\r\n            success: resolve,\r\n            error: reject,\r\n        });\r\n    });\r\n}\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/plugins/vimeo.js\n// ==========================================================================\r\n// Vimeo plugin\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Parse Vimeo ID from URL\r\nfunction parseId(url) {\r\n    if (utils_is.empty(url)) {\r\n        return null;\r\n    }\r\n\r\n    if (utils_is.number(Number(url))) {\r\n        return url;\r\n    }\r\n\r\n    const regex = /^.*(vimeo.com\\/|video\\/)(\\d+).*/;\r\n    return url.match(regex) ? RegExp.$2 : url;\r\n}\r\n\r\n// Set playback state and trigger change (only on actual change)\r\nfunction assurePlaybackState(play) {\r\n    if (play && !this.embed.hasPlayed) {\r\n        this.embed.hasPlayed = true;\r\n    }\r\n    if (this.media.paused === play) {\r\n        this.media.paused = !play;\r\n        triggerEvent.call(this, this.media, play ? 'play' : 'pause');\r\n    }\r\n}\r\n\r\nconst vimeo = {\r\n    setup() {\r\n        // Add embed class for responsive\r\n        toggleClass(this.elements.wrapper, this.config.classNames.embed, true);\r\n\r\n        // Set intial ratio\r\n        setAspectRatio.call(this);\r\n\r\n        // Load the API if not already\r\n        if (!utils_is.object(window.Vimeo)) {\r\n            loadScript_loadScript(this.config.urls.vimeo.sdk)\r\n                .then(() => {\r\n                    vimeo.ready.call(this);\r\n                })\r\n                .catch(error => {\r\n                    this.debug.warn('Vimeo API failed to load', error);\r\n                });\r\n        } else {\r\n            vimeo.ready.call(this);\r\n        }\r\n    },\r\n\r\n    // API Ready\r\n    ready() {\r\n        const player = this;\r\n        const config = player.config.vimeo;\r\n\r\n        // Get Vimeo params for the iframe\r\n        const params = buildUrlParams(\r\n            extend(\r\n                {},\r\n                {\r\n                    loop: player.config.loop.active,\r\n                    autoplay: player.autoplay,\r\n                    muted: player.muted,\r\n                    gesture: 'media',\r\n                    playsinline: !this.config.fullscreen.iosNative,\r\n                },\r\n                config,\r\n            ),\r\n        );\r\n\r\n        // Get the source URL or ID\r\n        let source = player.media.getAttribute('src');\r\n\r\n        // Get from <div> if needed\r\n        if (utils_is.empty(source)) {\r\n            source = player.media.getAttribute(player.config.attributes.embed.id);\r\n        }\r\n\r\n        const id = parseId(source);\r\n\r\n        // Build an iframe\r\n        const iframe = elements_createElement('iframe');\r\n        const src = strings_format(player.config.urls.vimeo.iframe, id, params);\r\n        iframe.setAttribute('src', src);\r\n        iframe.setAttribute('allowfullscreen', '');\r\n        iframe.setAttribute('allowtransparency', '');\r\n        iframe.setAttribute('allow', 'autoplay');\r\n\r\n        // Get poster, if already set\r\n        const { poster } = player;\r\n\r\n        // Inject the package\r\n        const wrapper = elements_createElement('div', { poster, class: player.config.classNames.embedContainer });\r\n        wrapper.appendChild(iframe);\r\n        player.media = replaceElement(wrapper, player.media);\r\n\r\n        // Get poster image\r\n        fetch_fetch(strings_format(player.config.urls.vimeo.api, id), 'json').then(response => {\r\n            if (utils_is.empty(response)) {\r\n                return;\r\n            }\r\n\r\n            // Get the URL for thumbnail\r\n            const url = new URL(response[0].thumbnail_large);\r\n\r\n            // Get original image\r\n            url.pathname = `${url.pathname.split('_')[0]}.jpg`;\r\n\r\n            // Set and show poster\r\n            js_ui.setPoster.call(player, url.href).catch(() => {});\r\n        });\r\n\r\n        // Setup instance\r\n        // https://github.com/vimeo/player.js\r\n        player.embed = new window.Vimeo.Player(iframe, {\r\n            autopause: player.config.autopause,\r\n            muted: player.muted,\r\n        });\r\n\r\n        player.media.paused = true;\r\n        player.media.currentTime = 0;\r\n\r\n        // Disable native text track rendering\r\n        if (player.supported.ui) {\r\n            player.embed.disableTextTrack();\r\n        }\r\n\r\n        // Create a faux HTML5 API using the Vimeo API\r\n        player.media.play = () => {\r\n            assurePlaybackState.call(player, true);\r\n            return player.embed.play();\r\n        };\r\n\r\n        player.media.pause = () => {\r\n            assurePlaybackState.call(player, false);\r\n            return player.embed.pause();\r\n        };\r\n\r\n        player.media.stop = () => {\r\n            player.pause();\r\n            player.currentTime = 0;\r\n        };\r\n\r\n        // Seeking\r\n        let { currentTime } = player.media;\r\n        Object.defineProperty(player.media, 'currentTime', {\r\n            get() {\r\n                return currentTime;\r\n            },\r\n            set(time) {\r\n                // Vimeo will automatically play on seek if the video hasn't been played before\r\n\r\n                // Get current paused state and volume etc\r\n                const { embed, media, paused, volume } = player;\r\n                const restorePause = paused && !embed.hasPlayed;\r\n\r\n                // Set seeking state and trigger event\r\n                media.seeking = true;\r\n                triggerEvent.call(player, media, 'seeking');\r\n\r\n                // If paused, mute until seek is complete\r\n                Promise.resolve(restorePause && embed.setVolume(0))\r\n                    // Seek\r\n                    .then(() => embed.setCurrentTime(time))\r\n                    // Restore paused\r\n                    .then(() => restorePause && embed.pause())\r\n                    // Restore volume\r\n                    .then(() => restorePause && embed.setVolume(volume))\r\n                    .catch(() => {\r\n                        // Do nothing\r\n                    });\r\n            },\r\n        });\r\n\r\n        // Playback speed\r\n        let speed = player.config.speed.selected;\r\n        Object.defineProperty(player.media, 'playbackRate', {\r\n            get() {\r\n                return speed;\r\n            },\r\n            set(input) {\r\n                player.embed\r\n                    .setPlaybackRate(input)\r\n                    .then(() => {\r\n                        speed = input;\r\n                        triggerEvent.call(player, player.media, 'ratechange');\r\n                    })\r\n                    .catch(error => {\r\n                        // Hide menu item (and menu if empty)\r\n                        if (error.name === 'Error') {\r\n                            js_controls.setSpeedMenu.call(player, []);\r\n                        }\r\n                    });\r\n            },\r\n        });\r\n\r\n        // Volume\r\n        let { volume } = player.config;\r\n        Object.defineProperty(player.media, 'volume', {\r\n            get() {\r\n                return volume;\r\n            },\r\n            set(input) {\r\n                player.embed.setVolume(input).then(() => {\r\n                    volume = input;\r\n                    triggerEvent.call(player, player.media, 'volumechange');\r\n                });\r\n            },\r\n        });\r\n\r\n        // Muted\r\n        let { muted } = player.config;\r\n        Object.defineProperty(player.media, 'muted', {\r\n            get() {\r\n                return muted;\r\n            },\r\n            set(input) {\r\n                const toggle = utils_is.boolean(input) ? input : false;\r\n\r\n                player.embed.setVolume(toggle ? 0 : player.config.volume).then(() => {\r\n                    muted = toggle;\r\n                    triggerEvent.call(player, player.media, 'volumechange');\r\n                });\r\n            },\r\n        });\r\n\r\n        // Loop\r\n        let { loop } = player.config;\r\n        Object.defineProperty(player.media, 'loop', {\r\n            get() {\r\n                return loop;\r\n            },\r\n            set(input) {\r\n                const toggle = utils_is.boolean(input) ? input : player.config.loop.active;\r\n\r\n                player.embed.setLoop(toggle).then(() => {\r\n                    loop = toggle;\r\n                });\r\n            },\r\n        });\r\n\r\n        // Source\r\n        let currentSrc;\r\n        player.embed\r\n            .getVideoUrl()\r\n            .then(value => {\r\n                currentSrc = value;\r\n                js_controls.setDownloadLink.call(player);\r\n            })\r\n            .catch(error => {\r\n                this.debug.warn(error);\r\n            });\r\n\r\n        Object.defineProperty(player.media, 'currentSrc', {\r\n            get() {\r\n                return currentSrc;\r\n            },\r\n        });\r\n\r\n        // Ended\r\n        Object.defineProperty(player.media, 'ended', {\r\n            get() {\r\n                return player.currentTime === player.duration;\r\n            },\r\n        });\r\n\r\n        // Set aspect ratio based on video size\r\n        Promise.all([player.embed.getVideoWidth(), player.embed.getVideoHeight()]).then(dimensions => {\r\n            const [width, height] = dimensions;\r\n            player.embed.ratio = `${width}:${height}`;\r\n            setAspectRatio.call(this, player.embed.ratio);\r\n        });\r\n\r\n        // Set autopause\r\n        player.embed.setAutopause(player.config.autopause).then(state => {\r\n            player.config.autopause = state;\r\n        });\r\n\r\n        // Get title\r\n        player.embed.getVideoTitle().then(title => {\r\n            player.config.title = title;\r\n            js_ui.setTitle.call(this);\r\n        });\r\n\r\n        // Get current time\r\n        player.embed.getCurrentTime().then(value => {\r\n            currentTime = value;\r\n            triggerEvent.call(player, player.media, 'timeupdate');\r\n        });\r\n\r\n        // Get duration\r\n        player.embed.getDuration().then(value => {\r\n            player.media.duration = value;\r\n            triggerEvent.call(player, player.media, 'durationchange');\r\n        });\r\n\r\n        // Get captions\r\n        player.embed.getTextTracks().then(tracks => {\r\n            player.media.textTracks = tracks;\r\n            js_captions.setup.call(player);\r\n        });\r\n\r\n        player.embed.on('cuechange', ({ cues = [] }) => {\r\n            const strippedCues = cues.map(cue => stripHTML(cue.text));\r\n            js_captions.updateCues.call(player, strippedCues);\r\n        });\r\n\r\n        player.embed.on('loaded', () => {\r\n            // Assure state and events are updated on autoplay\r\n            player.embed.getPaused().then(paused => {\r\n                assurePlaybackState.call(player, !paused);\r\n                if (!paused) {\r\n                    triggerEvent.call(player, player.media, 'playing');\r\n                }\r\n            });\r\n\r\n            if (utils_is.element(player.embed.element) && player.supported.ui) {\r\n                const frame = player.embed.element;\r\n\r\n                // Fix keyboard focus issues\r\n                // https://github.com/sampotts/plyr/issues/317\r\n                frame.setAttribute('tabindex', -1);\r\n            }\r\n        });\r\n\r\n        player.embed.on('play', () => {\r\n            assurePlaybackState.call(player, true);\r\n            triggerEvent.call(player, player.media, 'playing');\r\n        });\r\n\r\n        player.embed.on('pause', () => {\r\n            assurePlaybackState.call(player, false);\r\n        });\r\n\r\n        player.embed.on('timeupdate', data => {\r\n            player.media.seeking = false;\r\n            currentTime = data.seconds;\r\n            triggerEvent.call(player, player.media, 'timeupdate');\r\n        });\r\n\r\n        player.embed.on('progress', data => {\r\n            player.media.buffered = data.percent;\r\n            triggerEvent.call(player, player.media, 'progress');\r\n\r\n            // Check all loaded\r\n            if (parseInt(data.percent, 10) === 1) {\r\n                triggerEvent.call(player, player.media, 'canplaythrough');\r\n            }\r\n\r\n            // Get duration as if we do it before load, it gives an incorrect value\r\n            // https://github.com/sampotts/plyr/issues/891\r\n            player.embed.getDuration().then(value => {\r\n                if (value !== player.media.duration) {\r\n                    player.media.duration = value;\r\n                    triggerEvent.call(player, player.media, 'durationchange');\r\n                }\r\n            });\r\n        });\r\n\r\n        player.embed.on('seeked', () => {\r\n            player.media.seeking = false;\r\n            triggerEvent.call(player, player.media, 'seeked');\r\n        });\r\n\r\n        player.embed.on('ended', () => {\r\n            player.media.paused = true;\r\n            triggerEvent.call(player, player.media, 'ended');\r\n        });\r\n\r\n        player.embed.on('error', detail => {\r\n            player.media.error = detail;\r\n            triggerEvent.call(player, player.media, 'error');\r\n        });\r\n\r\n        // Rebuild UI\r\n        setTimeout(() => js_ui.build.call(player), 0);\r\n    },\r\n};\r\n\r\n/* harmony default export */ var plugins_vimeo = (vimeo);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/plugins/youtube.js\n// ==========================================================================\r\n// YouTube plugin\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Parse YouTube ID from URL\r\nfunction youtube_parseId(url) {\r\n    if (utils_is.empty(url)) {\r\n        return null;\r\n    }\r\n\r\n    const regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|&v=)([^#&?]*).*/;\r\n    return url.match(regex) ? RegExp.$2 : url;\r\n}\r\n\r\n// Set playback state and trigger change (only on actual change)\r\nfunction youtube_assurePlaybackState(play) {\r\n    if (play && !this.embed.hasPlayed) {\r\n        this.embed.hasPlayed = true;\r\n    }\r\n    if (this.media.paused === play) {\r\n        this.media.paused = !play;\r\n        triggerEvent.call(this, this.media, play ? 'play' : 'pause');\r\n    }\r\n}\r\n\r\nconst youtube = {\r\n    setup() {\r\n        // Add embed class for responsive\r\n        toggleClass(this.elements.wrapper, this.config.classNames.embed, true);\r\n\r\n        // Set aspect ratio\r\n        setAspectRatio.call(this);\r\n\r\n        // Setup API\r\n        if (utils_is.object(window.YT) && utils_is.function(window.YT.Player)) {\r\n            youtube.ready.call(this);\r\n        } else {\r\n            // Load the API\r\n            loadScript_loadScript(this.config.urls.youtube.sdk).catch(error => {\r\n                this.debug.warn('YouTube API failed to load', error);\r\n            });\r\n\r\n            // Setup callback for the API\r\n            // YouTube has it's own system of course...\r\n            window.onYouTubeReadyCallbacks = window.onYouTubeReadyCallbacks || [];\r\n\r\n            // Add to queue\r\n            window.onYouTubeReadyCallbacks.push(() => {\r\n                youtube.ready.call(this);\r\n            });\r\n\r\n            // Set callback to process queue\r\n            window.onYouTubeIframeAPIReady = () => {\r\n                window.onYouTubeReadyCallbacks.forEach(callback => {\r\n                    callback();\r\n                });\r\n            };\r\n        }\r\n    },\r\n\r\n    // Get the media title\r\n    getTitle(videoId) {\r\n        // Try via undocumented API method first\r\n        // This method disappears now and then though...\r\n        // https://github.com/sampotts/plyr/issues/709\r\n        if (utils_is.function(this.embed.getVideoData)) {\r\n            const { title } = this.embed.getVideoData();\r\n\r\n            if (utils_is.empty(title)) {\r\n                this.config.title = title;\r\n                js_ui.setTitle.call(this);\r\n                return;\r\n            }\r\n        }\r\n\r\n        // Or via Google API\r\n        const key = this.config.keys.google;\r\n        if (utils_is.string(key) && !utils_is.empty(key)) {\r\n            const url = strings_format(this.config.urls.youtube.api, videoId, key);\r\n\r\n            fetch_fetch(url)\r\n                .then(result => {\r\n                    if (utils_is.object(result)) {\r\n                        this.config.title = result.items[0].snippet.title;\r\n                        js_ui.setTitle.call(this);\r\n                    }\r\n                })\r\n                .catch(() => {});\r\n        }\r\n    },\r\n\r\n    // API ready\r\n    ready() {\r\n        const player = this;\r\n\r\n        // Ignore already setup (race condition)\r\n        const currentId = player.media.getAttribute('id');\r\n        if (!utils_is.empty(currentId) && currentId.startsWith('youtube-')) {\r\n            return;\r\n        }\r\n\r\n        // Get the source URL or ID\r\n        let source = player.media.getAttribute('src');\r\n\r\n        // Get from <div> if needed\r\n        if (utils_is.empty(source)) {\r\n            source = player.media.getAttribute(this.config.attributes.embed.id);\r\n        }\r\n\r\n        // Replace the <iframe> with a <div> due to YouTube API issues\r\n        const videoId = youtube_parseId(source);\r\n        const id = generateId(player.provider);\r\n\r\n        // Get poster, if already set\r\n        const { poster } = player;\r\n\r\n        // Replace media element\r\n        const container = elements_createElement('div', { id, poster });\r\n        player.media = replaceElement(container, player.media);\r\n\r\n        // Id to poster wrapper\r\n        const posterSrc = format => `https://img.youtube.com/vi/${videoId}/${format}default.jpg`;\r\n\r\n        // Check thumbnail images in order of quality, but reject fallback thumbnails (120px wide)\r\n        loadImage_loadImage(posterSrc('maxres'), 121) // Higest quality and unpadded\r\n            .catch(() => loadImage_loadImage(posterSrc('sd'), 121)) // 480p padded 4:3\r\n            .catch(() => loadImage_loadImage(posterSrc('hq'))) // 360p padded 4:3. Always exists\r\n            .then(image => js_ui.setPoster.call(player, image.src))\r\n            .then(posterSrc => {\r\n                // If the image is padded, use background-size \"cover\" instead (like youtube does too with their posters)\r\n                if (!posterSrc.includes('maxres')) {\r\n                    player.elements.poster.style.backgroundSize = 'cover';\r\n                }\r\n            })\r\n            .catch(() => {});\r\n\r\n        const config = player.config.youtube;\r\n\r\n        // Setup instance\r\n        // https://developers.google.com/youtube/iframe_api_reference\r\n        player.embed = new window.YT.Player(id, {\r\n            videoId,\r\n            host: config.noCookie ? 'https://www.youtube-nocookie.com' : undefined,\r\n            playerVars: extend(\r\n                {},\r\n                {\r\n                    autoplay: player.config.autoplay ? 1 : 0, // Autoplay\r\n                    hl: player.config.hl, // iframe interface language\r\n                    controls: player.supported.ui ? 0 : 1, // Only show controls if not fully supported\r\n                    disablekb: 1, // Disable keyboard as we handle it\r\n                    playsinline: !player.config.fullscreen.iosNative ? 1 : 0, // Allow iOS inline playback\r\n                    // Captions are flaky on YouTube\r\n                    cc_load_policy: player.captions.active ? 1 : 0,\r\n                    cc_lang_pref: player.config.captions.language,\r\n                    // Tracking for stats\r\n                    widget_referrer: window ? window.location.href : null,\r\n                },\r\n                config,\r\n            ),\r\n            events: {\r\n                onError(event) {\r\n                    // YouTube may fire onError twice, so only handle it once\r\n                    if (!player.media.error) {\r\n                        const code = event.data;\r\n                        // Messages copied from https://developers.google.com/youtube/iframe_api_reference#onError\r\n                        const message =\r\n                            {\r\n                                2: 'The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.',\r\n                                5: 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.',\r\n                                100: 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.',\r\n                                101: 'The owner of the requested video does not allow it to be played in embedded players.',\r\n                                150: 'The owner of the requested video does not allow it to be played in embedded players.',\r\n                            }[code] || 'An unknown error occured';\r\n\r\n                        player.media.error = { code, message };\r\n\r\n                        triggerEvent.call(player, player.media, 'error');\r\n                    }\r\n                },\r\n                onPlaybackRateChange(event) {\r\n                    // Get the instance\r\n                    const instance = event.target;\r\n\r\n                    // Get current speed\r\n                    player.media.playbackRate = instance.getPlaybackRate();\r\n\r\n                    triggerEvent.call(player, player.media, 'ratechange');\r\n                },\r\n                onReady(event) {\r\n                    // Bail if onReady has already been called. See issue #1108\r\n                    if (utils_is.function(player.media.play)) {\r\n                        return;\r\n                    }\r\n                    // Get the instance\r\n                    const instance = event.target;\r\n\r\n                    // Get the title\r\n                    youtube.getTitle.call(player, videoId);\r\n\r\n                    // Create a faux HTML5 API using the YouTube API\r\n                    player.media.play = () => {\r\n                        youtube_assurePlaybackState.call(player, true);\r\n                        instance.playVideo();\r\n                    };\r\n\r\n                    player.media.pause = () => {\r\n                        youtube_assurePlaybackState.call(player, false);\r\n                        instance.pauseVideo();\r\n                    };\r\n\r\n                    player.media.stop = () => {\r\n                        instance.stopVideo();\r\n                    };\r\n\r\n                    player.media.duration = instance.getDuration();\r\n                    player.media.paused = true;\r\n\r\n                    // Seeking\r\n                    player.media.currentTime = 0;\r\n                    Object.defineProperty(player.media, 'currentTime', {\r\n                        get() {\r\n                            return Number(instance.getCurrentTime());\r\n                        },\r\n                        set(time) {\r\n                            // If paused and never played, mute audio preventively (YouTube starts playing on seek if the video hasn't been played yet).\r\n                            if (player.paused && !player.embed.hasPlayed) {\r\n                                player.embed.mute();\r\n                            }\r\n\r\n                            // Set seeking state and trigger event\r\n                            player.media.seeking = true;\r\n                            triggerEvent.call(player, player.media, 'seeking');\r\n\r\n                            // Seek after events sent\r\n                            instance.seekTo(time);\r\n                        },\r\n                    });\r\n\r\n                    // Playback speed\r\n                    Object.defineProperty(player.media, 'playbackRate', {\r\n                        get() {\r\n                            return instance.getPlaybackRate();\r\n                        },\r\n                        set(input) {\r\n                            instance.setPlaybackRate(input);\r\n                        },\r\n                    });\r\n\r\n                    // Volume\r\n                    let { volume } = player.config;\r\n                    Object.defineProperty(player.media, 'volume', {\r\n                        get() {\r\n                            return volume;\r\n                        },\r\n                        set(input) {\r\n                            volume = input;\r\n                            instance.setVolume(volume * 100);\r\n                            triggerEvent.call(player, player.media, 'volumechange');\r\n                        },\r\n                    });\r\n\r\n                    // Muted\r\n                    let { muted } = player.config;\r\n                    Object.defineProperty(player.media, 'muted', {\r\n                        get() {\r\n                            return muted;\r\n                        },\r\n                        set(input) {\r\n                            const toggle = utils_is.boolean(input) ? input : muted;\r\n                            muted = toggle;\r\n                            instance[toggle ? 'mute' : 'unMute']();\r\n                            triggerEvent.call(player, player.media, 'volumechange');\r\n                        },\r\n                    });\r\n\r\n                    // Source\r\n                    Object.defineProperty(player.media, 'currentSrc', {\r\n                        get() {\r\n                            return instance.getVideoUrl();\r\n                        },\r\n                    });\r\n\r\n                    // Ended\r\n                    Object.defineProperty(player.media, 'ended', {\r\n                        get() {\r\n                            return player.currentTime === player.duration;\r\n                        },\r\n                    });\r\n\r\n                    // Get available speeds\r\n                    player.options.speed = instance.getAvailablePlaybackRates();\r\n\r\n                    // Set the tabindex to avoid focus entering iframe\r\n                    if (player.supported.ui) {\r\n                        player.media.setAttribute('tabindex', -1);\r\n                    }\r\n\r\n                    triggerEvent.call(player, player.media, 'timeupdate');\r\n                    triggerEvent.call(player, player.media, 'durationchange');\r\n\r\n                    // Reset timer\r\n                    clearInterval(player.timers.buffering);\r\n\r\n                    // Setup buffering\r\n                    player.timers.buffering = setInterval(() => {\r\n                        // Get loaded % from YouTube\r\n                        player.media.buffered = instance.getVideoLoadedFraction();\r\n\r\n                        // Trigger progress only when we actually buffer something\r\n                        if (player.media.lastBuffered === null || player.media.lastBuffered < player.media.buffered) {\r\n                            triggerEvent.call(player, player.media, 'progress');\r\n                        }\r\n\r\n                        // Set last buffer point\r\n                        player.media.lastBuffered = player.media.buffered;\r\n\r\n                        // Bail if we're at 100%\r\n                        if (player.media.buffered === 1) {\r\n                            clearInterval(player.timers.buffering);\r\n\r\n                            // Trigger event\r\n                            triggerEvent.call(player, player.media, 'canplaythrough');\r\n                        }\r\n                    }, 200);\r\n\r\n                    // Rebuild UI\r\n                    setTimeout(() => js_ui.build.call(player), 50);\r\n                },\r\n                onStateChange(event) {\r\n                    // Get the instance\r\n                    const instance = event.target;\r\n\r\n                    // Reset timer\r\n                    clearInterval(player.timers.playing);\r\n\r\n                    const seeked = player.media.seeking && [1, 2].includes(event.data);\r\n\r\n                    if (seeked) {\r\n                        // Unset seeking and fire seeked event\r\n                        player.media.seeking = false;\r\n                        triggerEvent.call(player, player.media, 'seeked');\r\n                    }\r\n\r\n                    // Handle events\r\n                    // -1   Unstarted\r\n                    // 0    Ended\r\n                    // 1    Playing\r\n                    // 2    Paused\r\n                    // 3    Buffering\r\n                    // 5    Video cued\r\n                    switch (event.data) {\r\n                        case -1:\r\n                            // Update scrubber\r\n                            triggerEvent.call(player, player.media, 'timeupdate');\r\n\r\n                            // Get loaded % from YouTube\r\n                            player.media.buffered = instance.getVideoLoadedFraction();\r\n                            triggerEvent.call(player, player.media, 'progress');\r\n\r\n                            break;\r\n\r\n                        case 0:\r\n                            youtube_assurePlaybackState.call(player, false);\r\n\r\n                            // YouTube doesn't support loop for a single video, so mimick it.\r\n                            if (player.media.loop) {\r\n                                // YouTube needs a call to `stopVideo` before playing again\r\n                                instance.stopVideo();\r\n                                instance.playVideo();\r\n                            } else {\r\n                                triggerEvent.call(player, player.media, 'ended');\r\n                            }\r\n\r\n                            break;\r\n\r\n                        case 1:\r\n                            // Restore paused state (YouTube starts playing on seek if the video hasn't been played yet)\r\n                            if (player.media.paused && !player.embed.hasPlayed) {\r\n                                player.media.pause();\r\n                            } else {\r\n                                youtube_assurePlaybackState.call(player, true);\r\n\r\n                                triggerEvent.call(player, player.media, 'playing');\r\n\r\n                                // Poll to get playback progress\r\n                                player.timers.playing = setInterval(() => {\r\n                                    triggerEvent.call(player, player.media, 'timeupdate');\r\n                                }, 50);\r\n\r\n                                // Check duration again due to YouTube bug\r\n                                // https://github.com/sampotts/plyr/issues/374\r\n                                // https://code.google.com/p/gdata-issues/issues/detail?id=8690\r\n                                if (player.media.duration !== instance.getDuration()) {\r\n                                    player.media.duration = instance.getDuration();\r\n                                    triggerEvent.call(player, player.media, 'durationchange');\r\n                                }\r\n                            }\r\n\r\n                            break;\r\n\r\n                        case 2:\r\n                            // Restore audio (YouTube starts playing on seek if the video hasn't been played yet)\r\n                            if (!player.muted) {\r\n                                player.embed.unMute();\r\n                            }\r\n                            youtube_assurePlaybackState.call(player, false);\r\n\r\n                            break;\r\n\r\n                        default:\r\n                            break;\r\n                    }\r\n\r\n                    triggerEvent.call(player, player.elements.container, 'statechange', false, {\r\n                        code: event.data,\r\n                    });\r\n                },\r\n            },\r\n        });\r\n    },\r\n};\r\n\r\n/* harmony default export */ var plugins_youtube = (youtube);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/media.js\n// ==========================================================================\r\n// Plyr Media\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst media_media = {\r\n    // Setup media\r\n    setup() {\r\n        // If there's no media, bail\r\n        if (!this.media) {\r\n            this.debug.warn('No media element found!');\r\n            return;\r\n        }\r\n\r\n        // Add type class\r\n        toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', this.type), true);\r\n\r\n        // Add provider class\r\n        toggleClass(this.elements.container, this.config.classNames.provider.replace('{0}', this.provider), true);\r\n\r\n        // Add video class for embeds\r\n        // This will require changes if audio embeds are added\r\n        if (this.isEmbed) {\r\n            toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', 'video'), true);\r\n        }\r\n\r\n        // Inject the player wrapper\r\n        if (this.isVideo) {\r\n            // Create the wrapper div\r\n            this.elements.wrapper = elements_createElement('div', {\r\n                class: this.config.classNames.video,\r\n            });\r\n\r\n            // Wrap the video in a container\r\n            wrap(this.media, this.elements.wrapper);\r\n\r\n            // Faux poster container\r\n            this.elements.poster = elements_createElement('div', {\r\n                class: this.config.classNames.poster,\r\n            });\r\n\r\n            this.elements.wrapper.appendChild(this.elements.poster);\r\n        }\r\n\r\n        if (this.isHTML5) {\r\n            js_html5.extend.call(this);\r\n        } else if (this.isYouTube) {\r\n            plugins_youtube.setup.call(this);\r\n        } else if (this.isVimeo) {\r\n            plugins_vimeo.setup.call(this);\r\n        }\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_media = (media_media);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/plugins/ads.js\n// ==========================================================================\r\n// Advertisement plugin using Google IMA HTML5 SDK\r\n// Create an account with our ad partner, vi here:\r\n// https://www.vi.ai/publisher-video-monetization/\r\n// ==========================================================================\r\n\r\n/* global google */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ads_Ads {\r\n    /**\r\n     * Ads constructor.\r\n     * @param {Object} player\r\n     * @return {Ads}\r\n     */\r\n    constructor(player) {\r\n        this.player = player;\r\n        this.config = player.config.ads;\r\n        this.playing = false;\r\n        this.initialized = false;\r\n        this.elements = {\r\n            container: null,\r\n            displayContainer: null,\r\n        };\r\n        this.manager = null;\r\n        this.loader = null;\r\n        this.cuePoints = null;\r\n        this.events = {};\r\n        this.safetyTimer = null;\r\n        this.countdownTimer = null;\r\n\r\n        // Setup a promise to resolve when the IMA manager is ready\r\n        this.managerPromise = new Promise((resolve, reject) => {\r\n            // The ad is loaded and ready\r\n            this.on('loaded', resolve);\r\n\r\n            // Ads failed\r\n            this.on('error', reject);\r\n        });\r\n\r\n        this.load();\r\n    }\r\n\r\n    get enabled() {\r\n        const { config } = this;\r\n\r\n        return (\r\n            this.player.isHTML5 &&\r\n            this.player.isVideo &&\r\n            config.enabled &&\r\n            (!utils_is.empty(config.publisherId) || utils_is.url(config.tagUrl))\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Load the IMA SDK\r\n     */\r\n    load() {\r\n        if (this.enabled) {\r\n            // Check if the Google IMA3 SDK is loaded or load it ourselves\r\n            if (!utils_is.object(window.google) || !utils_is.object(window.google.ima)) {\r\n                loadScript_loadScript(this.player.config.urls.googleIMA.sdk)\r\n                    .then(() => {\r\n                        this.ready();\r\n                    })\r\n                    .catch(() => {\r\n                        // Script failed to load or is blocked\r\n                        this.trigger('error', new Error('Google IMA SDK failed to load'));\r\n                    });\r\n            } else {\r\n                this.ready();\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Get the ads instance ready\r\n     */\r\n    ready() {\r\n        // Start ticking our safety timer. If the whole advertisement\r\n        // thing doesn't resolve within our set time; we bail\r\n        this.startSafetyTimer(12000, 'ready()');\r\n\r\n        // Clear the safety timer\r\n        this.managerPromise.then(() => {\r\n            this.clearSafetyTimer('onAdsManagerLoaded()');\r\n        });\r\n\r\n        // Set listeners on the Plyr instance\r\n        this.listeners();\r\n\r\n        // Setup the IMA SDK\r\n        this.setupIMA();\r\n    }\r\n\r\n    // Build the tag URL\r\n    get tagUrl() {\r\n        const { config } = this;\r\n\r\n        if (utils_is.url(config.tagUrl)) {\r\n            return config.tagUrl;\r\n        }\r\n\r\n        const params = {\r\n            AV_PUBLISHERID: '58c25bb0073ef448b1087ad6',\r\n            AV_CHANNELID: '5a0458dc28a06145e4519d21',\r\n            AV_URL: window.location.hostname,\r\n            cb: Date.now(),\r\n            AV_WIDTH: 640,\r\n            AV_HEIGHT: 480,\r\n            AV_CDIM2: this.publisherId,\r\n        };\r\n\r\n        const base = 'https://go.aniview.com/api/adserver6/vast/';\r\n\r\n        return `${base}?${buildUrlParams(params)}`;\r\n    }\r\n\r\n    /**\r\n     * In order for the SDK to display ads for our video, we need to tell it where to put them,\r\n     * so here we define our ad container. This div is set up to render on top of the video player.\r\n     * Using the code below, we tell the SDK to render ads within that div. We also provide a\r\n     * handle to the content video player - the SDK will poll the current time of our player to\r\n     * properly place mid-rolls. After we create the ad display container, we initialize it. On\r\n     * mobile devices, this initialization is done as the result of a user action.\r\n     */\r\n    setupIMA() {\r\n        // Create the container for our advertisements\r\n        this.elements.container = elements_createElement('div', {\r\n            class: this.player.config.classNames.ads,\r\n        });\r\n\r\n        this.player.elements.container.appendChild(this.elements.container);\r\n\r\n        // So we can run VPAID2\r\n        google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED);\r\n\r\n        // Set language\r\n        google.ima.settings.setLocale(this.player.config.ads.language);\r\n\r\n        // Set playback for iOS10+\r\n        google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline);\r\n\r\n        // We assume the adContainer is the video container of the plyr element that will house the ads\r\n        this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media);\r\n\r\n        // Request video ads to be pre-loaded\r\n        this.requestAds();\r\n    }\r\n\r\n    /**\r\n     * Request advertisements\r\n     */\r\n    requestAds() {\r\n        const { container } = this.player.elements;\r\n\r\n        try {\r\n            // Create ads loader\r\n            this.loader = new google.ima.AdsLoader(this.elements.displayContainer);\r\n\r\n            // Listen and respond to ads loaded and error events\r\n            this.loader.addEventListener(\r\n                google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,\r\n                event => this.onAdsManagerLoaded(event),\r\n                false,\r\n            );\r\n            this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, error => this.onAdError(error), false);\r\n\r\n            // Request video ads\r\n            const request = new google.ima.AdsRequest();\r\n            request.adTagUrl = this.tagUrl;\r\n\r\n            // Specify the linear and nonlinear slot sizes. This helps the SDK\r\n            // to select the correct creative if multiple are returned\r\n            request.linearAdSlotWidth = container.offsetWidth;\r\n            request.linearAdSlotHeight = container.offsetHeight;\r\n            request.nonLinearAdSlotWidth = container.offsetWidth;\r\n            request.nonLinearAdSlotHeight = container.offsetHeight;\r\n\r\n            // We only overlay ads as we only support video.\r\n            request.forceNonLinearFullSlot = false;\r\n\r\n            // Mute based on current state\r\n            request.setAdWillPlayMuted(!this.player.muted);\r\n\r\n            this.loader.requestAds(request);\r\n        } catch (e) {\r\n            this.onAdError(e);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Update the ad countdown\r\n     * @param {Boolean} start\r\n     */\r\n    pollCountdown(start = false) {\r\n        if (!start) {\r\n            clearInterval(this.countdownTimer);\r\n            this.elements.container.removeAttribute('data-badge-text');\r\n            return;\r\n        }\r\n\r\n        const update = () => {\r\n            const time = formatTime(Math.max(this.manager.getRemainingTime(), 0));\r\n            const label = `${utils_i18n.get('advertisement', this.player.config)} - ${time}`;\r\n            this.elements.container.setAttribute('data-badge-text', label);\r\n        };\r\n\r\n        this.countdownTimer = setInterval(update, 100);\r\n    }\r\n\r\n    /**\r\n     * This method is called whenever the ads are ready inside the AdDisplayContainer\r\n     * @param {Event} adsManagerLoadedEvent\r\n     */\r\n    onAdsManagerLoaded(event) {\r\n        // Load could occur after a source change (race condition)\r\n        if (!this.enabled) {\r\n            return;\r\n        }\r\n\r\n        // Get the ads manager\r\n        const settings = new google.ima.AdsRenderingSettings();\r\n\r\n        // Tell the SDK to save and restore content video state on our behalf\r\n        settings.restoreCustomPlaybackStateOnAdBreakComplete = true;\r\n        settings.enablePreloading = true;\r\n\r\n        // The SDK is polling currentTime on the contentPlayback. And needs a duration\r\n        // so it can determine when to start the mid- and post-roll\r\n        this.manager = event.getAdsManager(this.player, settings);\r\n\r\n        // Get the cue points for any mid-rolls by filtering out the pre- and post-roll\r\n        this.cuePoints = this.manager.getCuePoints();\r\n\r\n        // Set volume to match player\r\n        this.manager.setVolume(this.player.volume);\r\n\r\n        // Add listeners to the required events\r\n        // Advertisement error events\r\n        this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, error => this.onAdError(error));\r\n\r\n        // Advertisement regular events\r\n        Object.keys(google.ima.AdEvent.Type).forEach(type => {\r\n            this.manager.addEventListener(google.ima.AdEvent.Type[type], event => this.onAdEvent(event));\r\n        });\r\n\r\n        // Resolve our adsManager\r\n        this.trigger('loaded');\r\n    }\r\n\r\n    addCuePoints() {\r\n        // Add advertisement cue's within the time line if available\r\n        if (!utils_is.empty(this.cuePoints)) {\r\n            this.cuePoints.forEach(cuePoint => {\r\n                if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < this.player.duration) {\r\n                    const seekElement = this.player.elements.progress;\r\n\r\n                    if (utils_is.element(seekElement)) {\r\n                        const cuePercentage = (100 / this.player.duration) * cuePoint;\r\n                        const cue = elements_createElement('span', {\r\n                            class: this.player.config.classNames.cues,\r\n                        });\r\n\r\n                        cue.style.left = `${cuePercentage.toString()}%`;\r\n                        seekElement.appendChild(cue);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * This is where all the event handling takes place. Retrieve the ad from the event. Some\r\n     * events (e.g. ALL_ADS_COMPLETED) don't have the ad object associated\r\n     * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\r\n     * @param {Event} event\r\n     */\r\n    onAdEvent(event) {\r\n        const { container } = this.player.elements;\r\n\r\n        // Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)\r\n        // don't have ad object associated\r\n        const ad = event.getAd();\r\n        const adData = event.getAdData();\r\n\r\n        // Proxy event\r\n        const dispatchEvent = type => {\r\n            const event = `ads${type.replace(/_/g, '').toLowerCase()}`;\r\n            triggerEvent.call(this.player, this.player.media, event);\r\n        };\r\n\r\n        switch (event.type) {\r\n            case google.ima.AdEvent.Type.LOADED:\r\n                // This is the first event sent for an ad - it is possible to determine whether the\r\n                // ad is a video ad or an overlay\r\n                this.trigger('loaded');\r\n\r\n                // Bubble event\r\n                dispatchEvent(event.type);\r\n\r\n                // Start countdown\r\n                this.pollCountdown(true);\r\n\r\n                if (!ad.isLinear()) {\r\n                    // Position AdDisplayContainer correctly for overlay\r\n                    ad.width = container.offsetWidth;\r\n                    ad.height = container.offsetHeight;\r\n                }\r\n\r\n                // console.info('Ad type: ' + event.getAd().getAdPodInfo().getPodIndex());\r\n                // console.info('Ad time: ' + event.getAd().getAdPodInfo().getTimeOffset());\r\n                break;\r\n\r\n            case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:\r\n                // All ads for the current videos are done. We can now request new advertisements\r\n                // in case the video is re-played\r\n\r\n                // Fire event\r\n                dispatchEvent(event.type);\r\n\r\n                // TODO: Example for what happens when a next video in a playlist would be loaded.\r\n                // So here we load a new video when all ads are done.\r\n                // Then we load new ads within a new adsManager. When the video\r\n                // Is started - after - the ads are loaded, then we get ads.\r\n                // You can also easily test cancelling and reloading by running\r\n                // player.ads.cancel() and player.ads.play from the console I guess.\r\n                // this.player.source = {\r\n                //     type: 'video',\r\n                //     title: 'View From A Blue Moon',\r\n                //     sources: [{\r\n                //         src:\r\n                // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4', type:\r\n                // 'video/mp4', }], poster:\r\n                // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg', tracks:\r\n                // [ { kind: 'captions', label: 'English', srclang: 'en', src:\r\n                // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt',\r\n                // default: true, }, { kind: 'captions', label: 'French', srclang: 'fr', src:\r\n                // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt', }, ],\r\n                // };\r\n\r\n                // TODO: So there is still this thing where a video should only be allowed to start\r\n                // playing when the IMA SDK is ready or has failed\r\n\r\n                this.loadAds();\r\n                break;\r\n\r\n            case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:\r\n                // This event indicates the ad has started - the video player can adjust the UI,\r\n                // for example display a pause button and remaining time. Fired when content should\r\n                // be paused. This usually happens right before an ad is about to cover the content\r\n\r\n                dispatchEvent(event.type);\r\n\r\n                this.pauseContent();\r\n\r\n                break;\r\n\r\n            case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:\r\n                // This event indicates the ad has finished - the video player can perform\r\n                // appropriate UI actions, such as removing the timer for remaining time detection.\r\n                // Fired when content should be resumed. This usually happens when an ad finishes\r\n                // or collapses\r\n\r\n                dispatchEvent(event.type);\r\n\r\n                this.pollCountdown();\r\n\r\n                this.resumeContent();\r\n\r\n                break;\r\n\r\n            case google.ima.AdEvent.Type.STARTED:\r\n            case google.ima.AdEvent.Type.MIDPOINT:\r\n            case google.ima.AdEvent.Type.COMPLETE:\r\n            case google.ima.AdEvent.Type.IMPRESSION:\r\n            case google.ima.AdEvent.Type.CLICK:\r\n                dispatchEvent(event.type);\r\n                break;\r\n\r\n            case google.ima.AdEvent.Type.LOG:\r\n                if (adData.adError) {\r\n                    this.player.debug.warn(`Non-fatal ad error: ${adData.adError.getMessage()}`);\r\n                }\r\n                break;\r\n\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Any ad error handling comes through here\r\n     * @param {Event} event\r\n     */\r\n    onAdError(event) {\r\n        this.cancel();\r\n        this.player.debug.warn('Ads error', event);\r\n    }\r\n\r\n    /**\r\n     * Setup hooks for Plyr and window events. This ensures\r\n     * the mid- and post-roll launch at the correct time. And\r\n     * resize the advertisement when the player resizes\r\n     */\r\n    listeners() {\r\n        const { container } = this.player.elements;\r\n        let time;\r\n\r\n        this.player.on('canplay', () => {\r\n            this.addCuePoints();\r\n        });\r\n\r\n        this.player.on('ended', () => {\r\n            this.loader.contentComplete();\r\n        });\r\n\r\n        this.player.on('timeupdate', () => {\r\n            time = this.player.currentTime;\r\n        });\r\n\r\n        this.player.on('seeked', () => {\r\n            const seekedTime = this.player.currentTime;\r\n\r\n            if (utils_is.empty(this.cuePoints)) {\r\n                return;\r\n            }\r\n\r\n            this.cuePoints.forEach((cuePoint, index) => {\r\n                if (time < cuePoint && cuePoint < seekedTime) {\r\n                    this.manager.discardAdBreak();\r\n                    this.cuePoints.splice(index, 1);\r\n                }\r\n            });\r\n        });\r\n\r\n        // Listen to the resizing of the window. And resize ad accordingly\r\n        // TODO: eventually implement ResizeObserver\r\n        window.addEventListener('resize', () => {\r\n            if (this.manager) {\r\n                this.manager.resize(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\r\n            }\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Initialize the adsManager and start playing advertisements\r\n     */\r\n    play() {\r\n        const { container } = this.player.elements;\r\n\r\n        if (!this.managerPromise) {\r\n            this.resumeContent();\r\n        }\r\n\r\n        // Play the requested advertisement whenever the adsManager is ready\r\n        this.managerPromise\r\n            .then(() => {\r\n                // Initialize the container. Must be done via a user action on mobile devices\r\n                this.elements.displayContainer.initialize();\r\n\r\n                try {\r\n                    if (!this.initialized) {\r\n                        // Initialize the ads manager. Ad rules playlist will start at this time\r\n                        this.manager.init(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\r\n\r\n                        // Call play to start showing the ad. Single video and overlay ads will\r\n                        // start at this time; the call will be ignored for ad rules\r\n                        this.manager.start();\r\n                    }\r\n\r\n                    this.initialized = true;\r\n                } catch (adError) {\r\n                    // An error may be thrown if there was a problem with the\r\n                    // VAST response\r\n                    this.onAdError(adError);\r\n                }\r\n            })\r\n            .catch(() => {});\r\n    }\r\n\r\n    /**\r\n     * Resume our video\r\n     */\r\n    resumeContent() {\r\n        // Hide the advertisement container\r\n        this.elements.container.style.zIndex = '';\r\n\r\n        // Ad is stopped\r\n        this.playing = false;\r\n\r\n        // Play video\r\n        this.player.media.play();\r\n    }\r\n\r\n    /**\r\n     * Pause our video\r\n     */\r\n    pauseContent() {\r\n        // Show the advertisement container\r\n        this.elements.container.style.zIndex = 3;\r\n\r\n        // Ad is playing\r\n        this.playing = true;\r\n\r\n        // Pause our video.\r\n        this.player.media.pause();\r\n    }\r\n\r\n    /**\r\n     * Destroy the adsManager so we can grab new ads after this. If we don't then we're not\r\n     * allowed to call new ads based on google policies, as they interpret this as an accidental\r\n     * video requests. https://developers.google.com/interactive-\r\n     * media-ads/docs/sdks/android/faq#8\r\n     */\r\n    cancel() {\r\n        // Pause our video\r\n        if (this.initialized) {\r\n            this.resumeContent();\r\n        }\r\n\r\n        // Tell our instance that we're done for now\r\n        this.trigger('error');\r\n\r\n        // Re-create our adsManager\r\n        this.loadAds();\r\n    }\r\n\r\n    /**\r\n     * Re-create our adsManager\r\n     */\r\n    loadAds() {\r\n        // Tell our adsManager to go bye bye\r\n        this.managerPromise\r\n            .then(() => {\r\n                // Destroy our adsManager\r\n                if (this.manager) {\r\n                    this.manager.destroy();\r\n                }\r\n\r\n                // Re-set our adsManager promises\r\n                this.managerPromise = new Promise(resolve => {\r\n                    this.on('loaded', resolve);\r\n                    this.player.debug.log(this.manager);\r\n                });\r\n\r\n                // Now request some new advertisements\r\n                this.requestAds();\r\n            })\r\n            .catch(() => {});\r\n    }\r\n\r\n    /**\r\n     * Handles callbacks after an ad event was invoked\r\n     * @param {String} event - Event type\r\n     */\r\n    trigger(event, ...args) {\r\n        const handlers = this.events[event];\r\n\r\n        if (utils_is.array(handlers)) {\r\n            handlers.forEach(handler => {\r\n                if (utils_is.function(handler)) {\r\n                    handler.apply(this, args);\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Add event listeners\r\n     * @param {String} event - Event type\r\n     * @param {Function} callback - Callback for when event occurs\r\n     * @return {Ads}\r\n     */\r\n    on(event, callback) {\r\n        if (!utils_is.array(this.events[event])) {\r\n            this.events[event] = [];\r\n        }\r\n\r\n        this.events[event].push(callback);\r\n\r\n        return this;\r\n    }\r\n\r\n    /**\r\n     * Setup a safety timer for when the ad network doesn't respond for whatever reason.\r\n     * The advertisement has 12 seconds to get its things together. We stop this timer when the\r\n     * advertisement is playing, or when a user action is required to start, then we clear the\r\n     * timer on ad ready\r\n     * @param {Number} time\r\n     * @param {String} from\r\n     */\r\n    startSafetyTimer(time, from) {\r\n        this.player.debug.log(`Safety timer invoked from: ${from}`);\r\n\r\n        this.safetyTimer = setTimeout(() => {\r\n            this.cancel();\r\n            this.clearSafetyTimer('startSafetyTimer()');\r\n        }, time);\r\n    }\r\n\r\n    /**\r\n     * Clear our safety timer(s)\r\n     * @param {String} from\r\n     */\r\n    clearSafetyTimer(from) {\r\n        if (!utils_is.nullOrUndefined(this.safetyTimer)) {\r\n            this.player.debug.log(`Safety timer cleared from: ${from}`);\r\n\r\n            clearTimeout(this.safetyTimer);\r\n            this.safetyTimer = null;\r\n        }\r\n    }\r\n}\r\n\r\n/* harmony default export */ var ads = (ads_Ads);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/plugins/previewThumbnails.js\n\r\n\r\n\r\n\r\n\r\n\r\n// Arg: vttDataString example: \"WEBVTT\\n\\n1\\n00:00:05.000 --> 00:00:10.000\\n1080p-00001.jpg\"\r\nconst parseVtt = vttDataString => {\r\n    const processedList = [];\r\n    const frames = vttDataString.split(/\\r\\n\\r\\n|\\n\\n|\\r\\r/);\r\n\r\n    frames.forEach(frame => {\r\n        const result = {};\r\n        const lines = frame.split(/\\r\\n|\\n|\\r/);\r\n\r\n        lines.forEach(line => {\r\n            if (!utils_is.number(result.startTime)) {\r\n                // The line with start and end times on it is the first line of interest\r\n                const matchTimes = line.match(\r\n                    /([0-9]{2}):([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2}):([0-9]{2}):([0-9]{2}).([0-9]{2,3})/,\r\n                ); // Note that this currently ignores caption formatting directives that are optionally on the end of this line - fine for non-captions VTT\r\n\r\n                if (matchTimes) {\r\n                    result.startTime =\r\n                        Number(matchTimes[1]) * 60 * 60 +\r\n                        Number(matchTimes[2]) * 60 +\r\n                        Number(matchTimes[3]) +\r\n                        Number(`0.${matchTimes[4]}`);\r\n                    result.endTime =\r\n                        Number(matchTimes[6]) * 60 * 60 +\r\n                        Number(matchTimes[7]) * 60 +\r\n                        Number(matchTimes[8]) +\r\n                        Number(`0.${matchTimes[9]}`);\r\n                }\r\n            } else if (!utils_is.empty(line.trim()) && utils_is.empty(result.text)) {\r\n                // If we already have the startTime, then we're definitely up to the text line(s)\r\n                const lineSplit = line.trim().split('#xywh=');\r\n                [result.text] = lineSplit;\r\n\r\n                // If there's content in lineSplit[1], then we have sprites. If not, then it's just one frame per image\r\n                if (lineSplit[1]) {\r\n                    [result.x, result.y, result.w, result.h] = lineSplit[1].split(',');\r\n                }\r\n            }\r\n        });\r\n\r\n        if (result.text) {\r\n            processedList.push(result);\r\n        }\r\n    });\r\n\r\n    return processedList;\r\n};\r\n\r\n/**\r\n * Preview thumbnails for seek hover and scrubbing\r\n * Seeking: Hover over the seek bar (desktop only): shows a small preview container above the seek bar\r\n * Scrubbing: Click and drag the seek bar (desktop and mobile): shows the preview image over the entire video, as if the video is scrubbing at very high speed\r\n *\r\n * Notes:\r\n * - Thumbs are set via JS settings on Plyr init, not HTML5 'track' property. Using the track property would be a bit gross, because it doesn't support custom 'kinds'. kind=metadata might be used for something else, and we want to allow multiple thumbnails tracks. Tracks must have a unique combination of 'kind' and 'label'. We would have to do something like kind=metadata,label=thumbnails1 / kind=metadata,label=thumbnails2. Square peg, round hole\r\n * - VTT info: the image URL is relative to the VTT, not the current document. But if the url starts with a slash, it will naturally be relative to the current domain. https://support.jwplayer.com/articles/how-to-add-preview-thumbnails\r\n * - This implementation uses multiple separate img elements. Other implementations use background-image on one element. This would be nice and simple, but Firefox and Safari have flickering issues with replacing backgrounds of larger images. It seems that YouTube perhaps only avoids this because they don't have the option for high-res previews (even the fullscreen ones, when mousedown/seeking). Images appear over the top of each other, and previous ones are discarded once the new ones have been rendered\r\n */\r\n\r\nclass previewThumbnails_PreviewThumbnails {\r\n    /**\r\n     * PreviewThumbnails constructor.\r\n     * @param {Plyr} player\r\n     * @return {PreviewThumbnails}\r\n     */\r\n    constructor(player) {\r\n        this.player = player;\r\n        this.thumbnails = [];\r\n        this.loaded = false;\r\n        this.lastMouseMoveTime = Date.now();\r\n        this.mouseDown = false;\r\n        this.loadedImages = [];\r\n\r\n        this.elements = {\r\n            thumb: {},\r\n            scrubbing: {},\r\n        };\r\n\r\n        this.load();\r\n    }\r\n\r\n    get enabled() {\r\n        return this.player.isHTML5 && this.player.isVideo && this.player.config.previewThumbnails.enabled;\r\n    }\r\n\r\n    load() {\r\n        // Togglethe regular seek tooltip\r\n        if (this.player.elements.display.seekTooltip) {\r\n            this.player.elements.display.seekTooltip.hidden = this.enabled;\r\n        }\r\n\r\n        if (!this.enabled) {\r\n            return;\r\n        }\r\n\r\n        this.getThumbnails().then(() => {\r\n            // Render DOM elements\r\n            this.render();\r\n\r\n            // Check to see if thumb container size was specified manually in CSS\r\n            this.determineContainerAutoSizing();\r\n\r\n            this.loaded = true;\r\n        });\r\n    }\r\n\r\n    // Download VTT files and parse them\r\n    getThumbnails() {\r\n        return new Promise(resolve => {\r\n            const { src } = this.player.config.previewThumbnails;\r\n\r\n            if (utils_is.empty(src)) {\r\n                throw new Error('Missing previewThumbnails.src config attribute');\r\n            }\r\n\r\n            // If string, convert into single-element list\r\n            const urls = utils_is.string(src) ? [src] : src;\r\n\r\n            // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails\r\n            const promises = urls.map(u => this.getThumbnail(u));\r\n\r\n            Promise.all(promises).then(() => {\r\n                // Sort smallest to biggest (e.g., [120p, 480p, 1080p])\r\n                this.thumbnails.sort((x, y) => x.height - y.height);\r\n\r\n                this.player.debug.log('Preview thumbnails', this.thumbnails);\r\n\r\n                resolve();\r\n            });\r\n        });\r\n    }\r\n\r\n    // Process individual VTT file\r\n    getThumbnail(url) {\r\n        return new Promise(resolve => {\r\n            fetch_fetch(url).then(response => {\r\n                const thumbnail = {\r\n                    frames: parseVtt(response),\r\n                    height: null,\r\n                    urlPrefix: '',\r\n                };\r\n\r\n                // If the URLs don't start with '/', then we need to set their relative path to be the location of the VTT file\r\n                // If the URLs do start with '/', then they obviously don't need a prefix, so it will remain blank\r\n                if (!thumbnail.frames[0].text.startsWith('/')) {\r\n                    thumbnail.urlPrefix = url.substring(0, url.lastIndexOf('/') + 1);\r\n                }\r\n\r\n                // Download the first frame, so that we can determine/set the height of this thumbnailsDef\r\n                const tempImage = new Image();\r\n\r\n                tempImage.onload = () => {\r\n                    thumbnail.height = tempImage.naturalHeight;\r\n                    thumbnail.width = tempImage.naturalWidth;\r\n\r\n                    this.thumbnails.push(thumbnail);\r\n\r\n                    resolve();\r\n                };\r\n\r\n                tempImage.src = thumbnail.urlPrefix + thumbnail.frames[0].text;\r\n            });\r\n        });\r\n    }\r\n\r\n    startMove(event) {\r\n        if (!this.loaded) {\r\n            return;\r\n        }\r\n\r\n        if (!utils_is.event(event) || !['touchmove', 'mousemove'].includes(event.type)) {\r\n            return;\r\n        }\r\n\r\n        // Wait until media has a duration\r\n        if (!this.player.media.duration) {\r\n            return;\r\n        }\r\n\r\n        if (event.type === 'touchmove') {\r\n            // Calculate seek hover position as approx video seconds\r\n            this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);\r\n        } else {\r\n            // Calculate seek hover position as approx video seconds\r\n            const clientRect = this.player.elements.progress.getBoundingClientRect();\r\n            const percentage = (100 / clientRect.width) * (event.pageX - clientRect.left);\r\n            this.seekTime = this.player.media.duration * (percentage / 100);\r\n\r\n            if (this.seekTime < 0) {\r\n                // The mousemove fires for 10+px out to the left\r\n                this.seekTime = 0;\r\n            }\r\n\r\n            if (this.seekTime > this.player.media.duration - 1) {\r\n                // Took 1 second off the duration for safety, because different players can disagree on the real duration of a video\r\n                this.seekTime = this.player.media.duration - 1;\r\n            }\r\n\r\n            this.mousePosX = event.pageX;\r\n\r\n            // Set time text inside image container\r\n            this.elements.thumb.time.innerText = formatTime(this.seekTime);\r\n        }\r\n\r\n        // Download and show image\r\n        this.showImageAtCurrentTime();\r\n    }\r\n\r\n    endMove() {\r\n        this.toggleThumbContainer(false, true);\r\n    }\r\n\r\n    startScrubbing(event) {\r\n        // Only act on left mouse button (0), or touch device (event.button is false)\r\n        if (event.button === false || event.button === 0) {\r\n            this.mouseDown = true;\r\n\r\n            // Wait until media has a duration\r\n            if (this.player.media.duration) {\r\n                this.toggleScrubbingContainer(true);\r\n                this.toggleThumbContainer(false, true);\r\n\r\n                // Download and show image\r\n                this.showImageAtCurrentTime();\r\n            }\r\n        }\r\n    }\r\n\r\n    endScrubbing() {\r\n        this.mouseDown = false;\r\n\r\n        // Hide scrubbing preview. But wait until the video has successfully seeked before hiding the scrubbing preview\r\n        if (Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime)) {\r\n            // The video was already seeked/loaded at the chosen time - hide immediately\r\n            this.toggleScrubbingContainer(false);\r\n        } else {\r\n            // The video hasn't seeked yet. Wait for that\r\n            events_once.call(this.player, this.player.media, 'timeupdate', () => {\r\n                // Re-check mousedown - we might have already started scrubbing again\r\n                if (!this.mouseDown) {\r\n                    this.toggleScrubbingContainer(false);\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Setup hooks for Plyr and window events\r\n     */\r\n    listeners() {\r\n        // Hide thumbnail preview - on mouse click, mouse leave (in listeners.js for now), and video play/seek. All four are required, e.g., for buffering\r\n        this.player.on('play', () => {\r\n            this.toggleThumbContainer(false, true);\r\n        });\r\n\r\n        this.player.on('seeked', () => {\r\n            this.toggleThumbContainer(false);\r\n        });\r\n\r\n        this.player.on('timeupdate', () => {\r\n            this.lastTime = this.player.media.currentTime;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Create HTML elements for image containers\r\n     */\r\n    render() {\r\n        // Create HTML element: plyr__preview-thumbnail-container\r\n        this.elements.thumb.container = elements_createElement('div', {\r\n            class: this.player.config.classNames.previewThumbnails.thumbContainer,\r\n        });\r\n\r\n        // Wrapper for the image for styling\r\n        this.elements.thumb.imageContainer = elements_createElement('div', {\r\n            class: this.player.config.classNames.previewThumbnails.imageContainer,\r\n        });\r\n        this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);\r\n\r\n        // Create HTML element, parent+span: time text (e.g., 01:32:00)\r\n        const timeContainer = elements_createElement('div', {\r\n            class: this.player.config.classNames.previewThumbnails.timeContainer,\r\n        });\r\n\r\n        this.elements.thumb.time = elements_createElement('span', {}, '00:00');\r\n        timeContainer.appendChild(this.elements.thumb.time);\r\n\r\n        this.elements.thumb.container.appendChild(timeContainer);\r\n\r\n        // Inject the whole thumb\r\n        this.player.elements.progress.appendChild(this.elements.thumb.container);\r\n\r\n        // Create HTML element: plyr__preview-scrubbing-container\r\n        this.elements.scrubbing.container = elements_createElement('div', {\r\n            class: this.player.config.classNames.previewThumbnails.scrubbingContainer,\r\n        });\r\n\r\n        this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);\r\n    }\r\n\r\n    showImageAtCurrentTime() {\r\n        if (this.mouseDown) {\r\n            this.setScrubbingContainerSize();\r\n        } else {\r\n            this.setThumbContainerSizeAndPos();\r\n        }\r\n\r\n        // Find the desired thumbnail index\r\n        // TODO: Handle a video longer than the thumbs where thumbNum is null\r\n        const thumbNum = this.thumbnails[0].frames.findIndex(\r\n            frame => this.seekTime >= frame.startTime && this.seekTime <= frame.endTime,\r\n        );\r\n        const hasThumb = thumbNum >= 0;\r\n        let qualityIndex = 0;\r\n\r\n        // Show the thumb container if we're not scrubbing\r\n        if (!this.mouseDown) {\r\n            this.toggleThumbContainer(hasThumb);\r\n        }\r\n\r\n        // No matching thumb found\r\n        if (!hasThumb) {\r\n            return;\r\n        }\r\n\r\n        // Check to see if we've already downloaded higher quality versions of this image\r\n        this.thumbnails.forEach((thumbnail, index) => {\r\n            if (this.loadedImages.includes(thumbnail.frames[thumbNum].text)) {\r\n                qualityIndex = index;\r\n            }\r\n        });\r\n\r\n        // Only proceed if either thumbnum or thumbfilename has changed\r\n        if (thumbNum !== this.showingThumb) {\r\n            this.showingThumb = thumbNum;\r\n            this.loadImage(qualityIndex);\r\n        }\r\n    }\r\n\r\n    // Show the image that's currently specified in this.showingThumb\r\n    loadImage(qualityIndex = 0) {\r\n        const thumbNum = this.showingThumb;\r\n        const thumbnail = this.thumbnails[qualityIndex];\r\n        const { urlPrefix } = thumbnail;\r\n        const frame = thumbnail.frames[thumbNum];\r\n        const thumbFilename = thumbnail.frames[thumbNum].text;\r\n        const thumbUrl = urlPrefix + thumbFilename;\r\n\r\n        if (!this.currentImageElement || this.currentImageElement.dataset.filename !== thumbFilename) {\r\n            // If we're already loading a previous image, remove its onload handler - we don't want it to load after this one\r\n            // Only do this if not using sprites. Without sprites we really want to show as many images as possible, as a best-effort\r\n            if (this.loadingImage && this.usingSprites) {\r\n                this.loadingImage.onload = null;\r\n            }\r\n\r\n            // We're building and adding a new image. In other implementations of similar functionality (YouTube), background image\r\n            // is instead used. But this causes issues with larger images in Firefox and Safari - switching between background\r\n            // images causes a flicker. Putting a new image over the top does not\r\n            const previewImage = new Image();\r\n            previewImage.src = thumbUrl;\r\n            previewImage.dataset.index = thumbNum;\r\n            previewImage.dataset.filename = thumbFilename;\r\n            this.showingThumbFilename = thumbFilename;\r\n\r\n            this.player.debug.log(`Loading image: ${thumbUrl}`);\r\n\r\n            // For some reason, passing the named function directly causes it to execute immediately. So I've wrapped it in an anonymous function...\r\n            previewImage.onload = () =>\r\n                this.showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, true);\r\n            this.loadingImage = previewImage;\r\n            this.removeOldImages(previewImage);\r\n        } else {\r\n            // Update the existing image\r\n            this.showImage(this.currentImageElement, frame, qualityIndex, thumbNum, thumbFilename, false);\r\n            this.currentImageElement.dataset.index = thumbNum;\r\n            this.removeOldImages(this.currentImageElement);\r\n        }\r\n    }\r\n\r\n    showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, newImage = true) {\r\n        this.player.debug.log(\r\n            `Showing thumb: ${thumbFilename}. num: ${thumbNum}. qual: ${qualityIndex}. newimg: ${newImage}`,\r\n        );\r\n        this.setImageSizeAndOffset(previewImage, frame);\r\n\r\n        if (newImage) {\r\n            this.currentImageContainer.appendChild(previewImage);\r\n            this.currentImageElement = previewImage;\r\n\r\n            if (!this.loadedImages.includes(thumbFilename)) {\r\n                this.loadedImages.push(thumbFilename);\r\n            }\r\n        }\r\n\r\n        // Preload images before and after the current one\r\n        // Show higher quality of the same frame\r\n        // Each step here has a short time delay, and only continues if still hovering/seeking the same spot. This is to protect slow connections from overloading\r\n        this.preloadNearby(thumbNum, true)\r\n            .then(this.preloadNearby(thumbNum, false))\r\n            .then(this.getHigherQuality(qualityIndex, previewImage, frame, thumbFilename));\r\n    }\r\n\r\n    // Remove all preview images that aren't the designated current image\r\n    removeOldImages(currentImage) {\r\n        // Get a list of all images, convert it from a DOM list to an array\r\n        Array.from(this.currentImageContainer.children).forEach(image => {\r\n            if (image.tagName.toLowerCase() !== 'img') {\r\n                return;\r\n            }\r\n\r\n            const removeDelay = this.usingSprites ? 500 : 1000;\r\n\r\n            if (image.dataset.index !== currentImage.dataset.index && !image.dataset.deleting) {\r\n                // Wait 200ms, as the new image can take some time to show on certain browsers (even though it was downloaded before showing). This will prevent flicker, and show some generosity towards slower clients\r\n                // First set attribute 'deleting' to prevent multi-handling of this on repeat firing of this function\r\n                image.dataset.deleting = true;\r\n                // This has to be set before the timeout - to prevent issues switching between hover and scrub\r\n                const { currentImageContainer } = this;\r\n\r\n                setTimeout(() => {\r\n                    currentImageContainer.removeChild(image);\r\n                    this.player.debug.log(`Removing thumb: ${image.dataset.filename}`);\r\n                }, removeDelay);\r\n            }\r\n        });\r\n    }\r\n\r\n    // Preload images before and after the current one. Only if the user is still hovering/seeking the same frame\r\n    // This will only preload the lowest quality\r\n    preloadNearby(thumbNum, forward = true) {\r\n        return new Promise(resolve => {\r\n            setTimeout(() => {\r\n                const oldThumbFilename = this.thumbnails[0].frames[thumbNum].text;\r\n\r\n                if (this.showingThumbFilename === oldThumbFilename) {\r\n                    // Find the nearest thumbs with different filenames. Sometimes it'll be the next index, but in the case of sprites, it might be 100+ away\r\n                    let thumbnailsClone;\r\n                    if (forward) {\r\n                        thumbnailsClone = this.thumbnails[0].frames.slice(thumbNum);\r\n                    } else {\r\n                        thumbnailsClone = this.thumbnails[0].frames.slice(0, thumbNum).reverse();\r\n                    }\r\n\r\n                    let foundOne = false;\r\n\r\n                    thumbnailsClone.forEach(frame => {\r\n                        const newThumbFilename = frame.text;\r\n\r\n                        if (newThumbFilename !== oldThumbFilename) {\r\n                            // Found one with a different filename. Make sure it hasn't already been loaded on this page visit\r\n                            if (!this.loadedImages.includes(newThumbFilename)) {\r\n                                foundOne = true;\r\n                                this.player.debug.log(`Preloading thumb filename: ${newThumbFilename}`);\r\n\r\n                                const { urlPrefix } = this.thumbnails[0];\r\n                                const thumbURL = urlPrefix + newThumbFilename;\r\n\r\n                                const previewImage = new Image();\r\n                                previewImage.src = thumbURL;\r\n                                previewImage.onload = () => {\r\n                                    this.player.debug.log(`Preloaded thumb filename: ${newThumbFilename}`);\r\n                                    if (!this.loadedImages.includes(newThumbFilename))\r\n                                        this.loadedImages.push(newThumbFilename);\r\n\r\n                                    // We don't resolve until the thumb is loaded\r\n                                    resolve();\r\n                                };\r\n                            }\r\n                        }\r\n                    });\r\n\r\n                    // If there are none to preload then we want to resolve immediately\r\n                    if (!foundOne) {\r\n                        resolve();\r\n                    }\r\n                }\r\n            }, 300);\r\n        });\r\n    }\r\n\r\n    // If user has been hovering current image for half a second, look for a higher quality one\r\n    getHigherQuality(currentQualityIndex, previewImage, frame, thumbFilename) {\r\n        if (currentQualityIndex < this.thumbnails.length - 1) {\r\n            // Only use the higher quality version if it's going to look any better - if the current thumb is of a lower pixel density than the thumbnail container\r\n            let previewImageHeight = previewImage.naturalHeight;\r\n\r\n            if (this.usingSprites) {\r\n                previewImageHeight = frame.h;\r\n            }\r\n\r\n            if (previewImageHeight < this.thumbContainerHeight) {\r\n                // Recurse back to the loadImage function - show a higher quality one, but only if the viewer is on this frame for a while\r\n                setTimeout(() => {\r\n                    // Make sure the mouse hasn't already moved on and started hovering at another image\r\n                    if (this.showingThumbFilename === thumbFilename) {\r\n                        this.player.debug.log(`Showing higher quality thumb for: ${thumbFilename}`);\r\n                        this.loadImage(currentQualityIndex + 1);\r\n                    }\r\n                }, 300);\r\n            }\r\n        }\r\n    }\r\n\r\n    get currentImageContainer() {\r\n        if (this.mouseDown) {\r\n            return this.elements.scrubbing.container;\r\n        }\r\n\r\n        return this.elements.thumb.imageContainer;\r\n    }\r\n\r\n    get usingSprites() {\r\n        return Object.keys(this.thumbnails[0].frames[0]).includes('w');\r\n    }\r\n\r\n    get thumbAspectRatio() {\r\n        if (this.usingSprites) {\r\n            return this.thumbnails[0].frames[0].w / this.thumbnails[0].frames[0].h;\r\n        }\r\n\r\n        return this.thumbnails[0].width / this.thumbnails[0].height;\r\n    }\r\n\r\n    get thumbContainerHeight() {\r\n        if (this.mouseDown) {\r\n            // Can't use media.clientHeight - HTML5 video goes big and does black bars above and below\r\n            return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio);\r\n        }\r\n\r\n        return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4);\r\n    }\r\n\r\n    get currentImageElement() {\r\n        if (this.mouseDown) {\r\n            return this.currentScrubbingImageElement;\r\n        }\r\n\r\n        return this.currentThumbnailImageElement;\r\n    }\r\n\r\n    set currentImageElement(element) {\r\n        if (this.mouseDown) {\r\n            this.currentScrubbingImageElement = element;\r\n        } else {\r\n            this.currentThumbnailImageElement = element;\r\n        }\r\n    }\r\n\r\n    toggleThumbContainer(toggle = false, clearShowing = false) {\r\n        const className = this.player.config.classNames.previewThumbnails.thumbContainerShown;\r\n        this.elements.thumb.container.classList.toggle(className, toggle);\r\n\r\n        if (!toggle && clearShowing) {\r\n            this.showingThumb = null;\r\n            this.showingThumbFilename = null;\r\n        }\r\n    }\r\n\r\n    toggleScrubbingContainer(toggle = false) {\r\n        const className = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;\r\n        this.elements.scrubbing.container.classList.toggle(className, toggle);\r\n\r\n        if (!toggle) {\r\n            this.showingThumb = null;\r\n            this.showingThumbFilename = null;\r\n        }\r\n    }\r\n\r\n    determineContainerAutoSizing() {\r\n        if (this.elements.thumb.imageContainer.clientHeight > 20) {\r\n            // This will prevent auto sizing in this.setThumbContainerSizeAndPos()\r\n            this.sizeSpecifiedInCSS = true;\r\n        }\r\n    }\r\n\r\n    // Set the size to be about a quarter of the size of video. Unless option dynamicSize === false, in which case it needs to be set in CSS\r\n    setThumbContainerSizeAndPos() {\r\n        if (!this.sizeSpecifiedInCSS) {\r\n            const thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio);\r\n            this.elements.thumb.imageContainer.style.height = `${this.thumbContainerHeight}px`;\r\n            this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`;\r\n        }\r\n\r\n        this.setThumbContainerPos();\r\n    }\r\n\r\n    setThumbContainerPos() {\r\n        const seekbarRect = this.player.elements.progress.getBoundingClientRect();\r\n        const plyrRect = this.player.elements.container.getBoundingClientRect();\r\n        const { container } = this.elements.thumb;\r\n\r\n        // Find the lowest and highest desired left-position, so we don't slide out the side of the video container\r\n        const minVal = plyrRect.left - seekbarRect.left + 10;\r\n        const maxVal = plyrRect.right - seekbarRect.left - container.clientWidth - 10;\r\n\r\n        // Set preview container position to: mousepos, minus seekbar.left, minus half of previewContainer.clientWidth\r\n        let previewPos = this.mousePosX - seekbarRect.left - container.clientWidth / 2;\r\n\r\n        if (previewPos < minVal) {\r\n            previewPos = minVal;\r\n        }\r\n\r\n        if (previewPos > maxVal) {\r\n            previewPos = maxVal;\r\n        }\r\n\r\n        container.style.left = `${previewPos}px`;\r\n    }\r\n\r\n    // Can't use 100% width, in case the video is a different aspect ratio to the video container\r\n    setScrubbingContainerSize() {\r\n        this.elements.scrubbing.container.style.width = `${this.player.media.clientWidth}px`;\r\n        // Can't use media.clientHeight - html5 video goes big and does black bars above and below\r\n        this.elements.scrubbing.container.style.height = `${this.player.media.clientWidth / this.thumbAspectRatio}px`;\r\n    }\r\n\r\n    // Sprites need to be offset to the correct location\r\n    setImageSizeAndOffset(previewImage, frame) {\r\n        if (!this.usingSprites) {\r\n            return;\r\n        }\r\n\r\n        // Find difference between height and preview container height\r\n        const multiplier = this.thumbContainerHeight / frame.h;\r\n\r\n        previewImage.style.height = `${Math.floor(previewImage.naturalHeight * multiplier)}px`;\r\n        previewImage.style.width = `${Math.floor(previewImage.naturalWidth * multiplier)}px`;\r\n        previewImage.style.left = `-${frame.x * multiplier}px`;\r\n        previewImage.style.top = `-${frame.y * multiplier}px`;\r\n    }\r\n}\r\n\r\n/* harmony default export */ var previewThumbnails = (previewThumbnails_PreviewThumbnails);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/source.js\n// ==========================================================================\r\n// Plyr source update\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst source_source = {\r\n    // Add elements to HTML5 media (source, tracks, etc)\r\n    insertElements(type, attributes) {\r\n        if (utils_is.string(attributes)) {\r\n            insertElement(type, this.media, {\r\n                src: attributes,\r\n            });\r\n        } else if (utils_is.array(attributes)) {\r\n            attributes.forEach(attribute => {\r\n                insertElement(type, this.media, attribute);\r\n            });\r\n        }\r\n    },\r\n\r\n    // Update source\r\n    // Sources are not checked for support so be careful\r\n    change(input) {\r\n        if (!getDeep(input, 'sources.length')) {\r\n            this.debug.warn('Invalid source format');\r\n            return;\r\n        }\r\n\r\n        // Cancel current network requests\r\n        js_html5.cancelRequests.call(this);\r\n\r\n        // Destroy instance and re-setup\r\n        this.destroy.call(\r\n            this,\r\n            () => {\r\n                // Reset quality options\r\n                this.options.quality = [];\r\n\r\n                // Remove elements\r\n                removeElement(this.media);\r\n                this.media = null;\r\n\r\n                // Reset class name\r\n                if (utils_is.element(this.elements.container)) {\r\n                    this.elements.container.removeAttribute('class');\r\n                }\r\n\r\n                // Set the type and provider\r\n                const { sources, type } = input;\r\n                const [{ provider = providers.html5, src }] = sources;\r\n                const tagName = provider === 'html5' ? type : 'div';\r\n                const attributes = provider === 'html5' ? {} : { src };\r\n\r\n                Object.assign(this, {\r\n                    provider,\r\n                    type,\r\n                    // Check for support\r\n                    supported: js_support.check(type, provider, this.config.playsinline),\r\n                    // Create new element\r\n                    media: elements_createElement(tagName, attributes),\r\n                });\r\n\r\n                // Inject the new element\r\n                this.elements.container.appendChild(this.media);\r\n\r\n                // Autoplay the new source?\r\n                if (utils_is.boolean(input.autoplay)) {\r\n                    this.config.autoplay = input.autoplay;\r\n                }\r\n\r\n                // Set attributes for audio and video\r\n                if (this.isHTML5) {\r\n                    if (this.config.crossorigin) {\r\n                        this.media.setAttribute('crossorigin', '');\r\n                    }\r\n                    if (this.config.autoplay) {\r\n                        this.media.setAttribute('autoplay', '');\r\n                    }\r\n                    if (!utils_is.empty(input.poster)) {\r\n                        this.poster = input.poster;\r\n                    }\r\n                    if (this.config.loop.active) {\r\n                        this.media.setAttribute('loop', '');\r\n                    }\r\n                    if (this.config.muted) {\r\n                        this.media.setAttribute('muted', '');\r\n                    }\r\n                    if (this.config.playsinline) {\r\n                        this.media.setAttribute('playsinline', '');\r\n                    }\r\n                }\r\n\r\n                // Restore class hook\r\n                js_ui.addStyleHook.call(this);\r\n\r\n                // Set new sources for html5\r\n                if (this.isHTML5) {\r\n                    source_source.insertElements.call(this, 'source', sources);\r\n                }\r\n\r\n                // Set video title\r\n                this.config.title = input.title;\r\n\r\n                // Set up from scratch\r\n                js_media.setup.call(this);\r\n\r\n                // HTML5 stuff\r\n                if (this.isHTML5) {\r\n                    // Setup captions\r\n                    if (Object.keys(input).includes('tracks')) {\r\n                        source_source.insertElements.call(this, 'track', input.tracks);\r\n                    }\r\n                }\r\n\r\n                // If HTML5 or embed but not fully supported, setupInterface and call ready now\r\n                if (this.isHTML5 || (this.isEmbed && !this.supported.ui)) {\r\n                    // Setup interface\r\n                    js_ui.build.call(this);\r\n                }\r\n\r\n                // Load HTML5 sources\r\n                if (this.isHTML5) {\r\n                    this.media.load();\r\n                }\r\n\r\n                // Reload thumbnails\r\n                if (this.previewThumbnails) {\r\n                    this.previewThumbnails.load();\r\n                }\r\n\r\n                // Update the fullscreen support\r\n                this.fullscreen.update();\r\n            },\r\n            true,\r\n        );\r\n    },\r\n};\r\n\r\n/* harmony default export */ var js_source = (source_source);\r\n\n// CONCATENATED MODULE: ./src/vendor/libs_external/plyr/src/js/plyr.js\n// ==========================================================================\r\n// Plyr\r\n// plyr.js v3.5.2\r\n// https://github.com/sampotts/plyr\r\n// License: The MIT License (MIT)\r\n// ==========================================================================\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Private properties\r\n// TODO: Use a WeakMap for private globals\r\n// const globals = new WeakMap();\r\n\r\n// Plyr instance\r\nclass plyr_Plyr {\r\n    constructor(target, options) {\r\n        this.timers = {};\r\n\r\n        // State\r\n        this.ready = false;\r\n        this.loading = false;\r\n        this.failed = false;\r\n\r\n        // Touch device\r\n        this.touch = js_support.touch;\r\n\r\n        // Set the media element\r\n        this.media = target;\r\n\r\n        // String selector passed\r\n        if (utils_is.string(this.media)) {\r\n            this.media = document.querySelectorAll(this.media);\r\n        }\r\n\r\n        // jQuery, NodeList or Array passed, use first element\r\n        if ( utils_is.nodeList(this.media) || utils_is.array(this.media)) {\r\n            // eslint-disable-next-line\r\n            this.media = this.media[0];\r\n        }\r\n\r\n        // Set config\r\n        this.config = extend(\r\n            {},\r\n            config_defaults,\r\n            plyr_Plyr.defaults,\r\n            options || {},\r\n            (() => {\r\n                try {\r\n                    return JSON.parse(this.media.getAttribute('data-plyr-config'));\r\n                } catch (e) {\r\n                    return {};\r\n                }\r\n            })(),\r\n        );\r\n\r\n        // Elements cache\r\n        this.elements = {\r\n            container: null,\r\n            captions: null,\r\n            buttons: {},\r\n            display: {},\r\n            progress: {},\r\n            inputs: {},\r\n            settings: {\r\n                popup: null,\r\n                menu: null,\r\n                panels: {},\r\n                buttons: {},\r\n            },\r\n        };\r\n\r\n        // Captions\r\n        this.captions = {\r\n            active: null,\r\n            currentTrack: -1,\r\n            meta: new WeakMap(),\r\n        };\r\n\r\n        // Fullscreen\r\n        this.fullscreen = {\r\n            active: false,\r\n        };\r\n\r\n        // Options\r\n        this.options = {\r\n            speed: [],\r\n            quality: [],\r\n        };\r\n\r\n        // Debugging\r\n        // TODO: move to globals\r\n        this.debug = new Console(this.config.debug);\r\n\r\n        // Log config options and support\r\n        this.debug.log('Config', this.config);\r\n        this.debug.log('Support', js_support);\r\n\r\n        // We need an element to setup\r\n        if (utils_is.nullOrUndefined(this.media) || !utils_is.element(this.media)) {\r\n            this.debug.error('Setup failed: no suitable element passed');\r\n            return;\r\n        }\r\n\r\n        // Bail if the element is initialized\r\n        if (this.media.plyr) {\r\n            this.debug.warn('Target already setup');\r\n            return;\r\n        }\r\n\r\n        // Bail if not enabled\r\n        if (!this.config.enabled) {\r\n            this.debug.error('Setup failed: disabled by config');\r\n            return;\r\n        }\r\n\r\n        // Bail if disabled or no basic support\r\n        // You may want to disable certain UAs etc\r\n        if (!js_support.check().api) {\r\n            this.debug.error('Setup failed: no support');\r\n            return;\r\n        }\r\n\r\n        // Cache original element state for .destroy()\r\n        const clone = this.media.cloneNode(true);\r\n        clone.autoplay = false;\r\n        this.elements.original = clone;\r\n\r\n        // Set media type based on tag or data attribute\r\n        // Supported: video, audio, vimeo, youtube\r\n        const type = this.media.tagName.toLowerCase();\r\n\r\n        // Embed properties\r\n        let iframe = null;\r\n        let url = null;\r\n\r\n        // Different setup based on type\r\n        switch (type) {\r\n            case 'div':\r\n                // Find the frame\r\n                iframe = this.media.querySelector('iframe');\r\n\r\n                // <iframe> type\r\n                if (utils_is.element(iframe)) {\r\n                    // Detect provider\r\n                    url = parseUrl(iframe.getAttribute('src'));\r\n                    this.provider = getProviderByUrl(url.toString());\r\n\r\n                    // Rework elements\r\n                    this.elements.container = this.media;\r\n                    this.media = iframe;\r\n\r\n                    // Reset classname\r\n                    this.elements.container.className = '';\r\n\r\n                    // Get attributes from URL and set config\r\n                    if (url.search.length) {\r\n                        const truthy = ['1', 'true'];\r\n\r\n                        if (truthy.includes(url.searchParams.get('autoplay'))) {\r\n                            this.config.autoplay = true;\r\n                        }\r\n                        if (truthy.includes(url.searchParams.get('loop'))) {\r\n                            this.config.loop.active = true;\r\n                        }\r\n\r\n                        // TODO: replace fullscreen.iosNative with this playsinline config option\r\n                        // YouTube requires the playsinline in the URL\r\n                        if (this.isYouTube) {\r\n                            this.config.playsinline = truthy.includes(url.searchParams.get('playsinline'));\r\n                            this.config.youtube.hl = url.searchParams.get('hl'); // TODO: Should this be setting language?\r\n                        } else {\r\n                            this.config.playsinline = true;\r\n                        }\r\n                    }\r\n                } else {\r\n                    // <div> with attributes\r\n                    this.provider = this.media.getAttribute(this.config.attributes.embed.provider);\r\n\r\n                    // Remove attribute\r\n                    this.media.removeAttribute(this.config.attributes.embed.provider);\r\n                }\r\n\r\n                // Unsupported or missing provider\r\n                if (utils_is.empty(this.provider) || !Object.keys(providers).includes(this.provider)) {\r\n                    this.debug.error('Setup failed: Invalid provider');\r\n                    return;\r\n                }\r\n\r\n                // Audio will come later for external providers\r\n                this.type = types.video;\r\n\r\n                break;\r\n\r\n            case 'video':\r\n            case 'audio':\r\n                this.type = type;\r\n                this.provider = providers.html5;\r\n\r\n                // Get config from attributes\r\n                if (this.media.hasAttribute('crossorigin')) {\r\n                    this.config.crossorigin = true;\r\n                }\r\n                if (this.media.hasAttribute('autoplay')) {\r\n                    this.config.autoplay = true;\r\n                }\r\n                if (this.media.hasAttribute('playsinline') || this.media.hasAttribute('webkit-playsinline')) {\r\n                    this.config.playsinline = true;\r\n                }\r\n                if (this.media.hasAttribute('muted')) {\r\n                    this.config.muted = true;\r\n                }\r\n                if (this.media.hasAttribute('loop')) {\r\n                    this.config.loop.active = true;\r\n                }\r\n\r\n                break;\r\n\r\n            default:\r\n                this.debug.error('Setup failed: unsupported type');\r\n                return;\r\n        }\r\n\r\n        // Check for support again but with type\r\n        this.supported = js_support.check(this.type, this.provider, this.config.playsinline);\r\n\r\n        // If no support for even API, bail\r\n        if (!this.supported.api) {\r\n            this.debug.error('Setup failed: no support');\r\n            return;\r\n        }\r\n\r\n        this.eventListeners = [];\r\n\r\n        // Create listeners\r\n        this.listeners = new listeners(this);\r\n\r\n        // Setup local storage for user settings\r\n        this.storage = new js_storage(this);\r\n\r\n        // Store reference\r\n        this.media.plyr = this;\r\n\r\n        // Wrap media\r\n        if (!utils_is.element(this.elements.container)) {\r\n            this.elements.container = elements_createElement('div', { tabindex: 0 });\r\n            wrap(this.media, this.elements.container);\r\n        }\r\n\r\n        // Add style hook\r\n        js_ui.addStyleHook.call(this);\r\n\r\n        // Setup media\r\n        js_media.setup.call(this);\r\n\r\n        // Listen for events if debugging\r\n        if (this.config.debug) {\r\n            events_on.call(this, this.elements.container, this.config.events.join(' '), event => {\r\n                this.debug.log(`event: ${event.type}`);\r\n            });\r\n        }\r\n\r\n        // Setup interface\r\n        // If embed but not fully supported, build interface now to avoid flash of controls\r\n        if (this.isHTML5 || (this.isEmbed && !this.supported.ui)) {\r\n            js_ui.build.call(this);\r\n        }\r\n\r\n        // Container listeners\r\n        this.listeners.container();\r\n\r\n        // Global listeners\r\n        this.listeners.global();\r\n\r\n        // Setup fullscreen\r\n        this.fullscreen = new fullscreen(this);\r\n\r\n        // Setup ads if provided\r\n        if (this.config.ads.enabled) {\r\n            this.ads = new ads(this);\r\n        }\r\n\r\n        // Autoplay if required\r\n        if (this.config.autoplay) {\r\n            this.play();\r\n        }\r\n\r\n        // Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek\r\n        this.lastSeekTime = 0;\r\n\r\n        // Setup preview thumbnails if enabled\r\n        if (this.config.previewThumbnails.enabled) {\r\n            this.previewThumbnails = new previewThumbnails(this);\r\n        }\r\n    }\r\n\r\n    // ---------------------------------------\r\n    // API\r\n    // ---------------------------------------\r\n\r\n    /**\r\n     * Types and provider helpers\r\n     */\r\n    get isHTML5() {\r\n        return Boolean(this.provider === providers.html5);\r\n    }\r\n\r\n    get isEmbed() {\r\n        return Boolean(this.isYouTube || this.isVimeo);\r\n    }\r\n\r\n    get isYouTube() {\r\n        return Boolean(this.provider === providers.youtube);\r\n    }\r\n\r\n    get isVimeo() {\r\n        return Boolean(this.provider === providers.vimeo);\r\n    }\r\n\r\n    get isVideo() {\r\n        return Boolean(this.type === types.video);\r\n    }\r\n\r\n    get isAudio() {\r\n        return Boolean(this.type === types.audio);\r\n    }\r\n\r\n    /**\r\n     * Play the media, or play the advertisement (if they are not blocked)\r\n     */\r\n    play() {\r\n        if (!utils_is.function(this.media.play)) {\r\n            return null;\r\n        }\r\n\r\n        // Intecept play with ads\r\n        if (this.ads && this.ads.enabled) {\r\n            this.ads.managerPromise.then(() => this.ads.play()).catch(() => this.media.play());\r\n        }\r\n\r\n        // Return the promise (for HTML5)\r\n        return this.media.play();\r\n    }\r\n\r\n    /**\r\n     * Pause the media\r\n     */\r\n    pause() {\r\n        if (!this.playing || !utils_is.function(this.media.pause)) {\r\n            return;\r\n        }\r\n\r\n        this.media.pause();\r\n    }\r\n\r\n    /**\r\n     * Get playing state\r\n     */\r\n    get playing() {\r\n        return Boolean(this.ready && !this.paused && !this.ended);\r\n    }\r\n\r\n    /**\r\n     * Get paused state\r\n     */\r\n    get paused() {\r\n        return Boolean(this.media.paused);\r\n    }\r\n\r\n    /**\r\n     * Get stopped state\r\n     */\r\n    get stopped() {\r\n        return Boolean(this.paused && this.currentTime === 0);\r\n    }\r\n\r\n    /**\r\n     * Get ended state\r\n     */\r\n    get ended() {\r\n        return Boolean(this.media.ended);\r\n    }\r\n\r\n    /**\r\n     * Toggle playback based on current status\r\n     * @param {Boolean} input\r\n     */\r\n    togglePlay(input) {\r\n        // Toggle based on current state if nothing passed\r\n        const toggle = utils_is.boolean(input) ? input : !this.playing;\r\n\r\n        if (toggle) {\r\n            this.play();\r\n        } else {\r\n            this.pause();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Stop playback\r\n     */\r\n    stop() {\r\n        if (this.isHTML5) {\r\n            this.pause();\r\n            this.restart();\r\n        } else if (utils_is.function(this.media.stop)) {\r\n            this.media.stop();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Restart playback\r\n     */\r\n    restart() {\r\n        this.currentTime = 0;\r\n    }\r\n\r\n    /**\r\n     * Rewind\r\n     * @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime\r\n     */\r\n    rewind(seekTime) {\r\n        this.currentTime = this.currentTime - (utils_is.number(seekTime) ? seekTime : this.config.seekTime);\r\n    }\r\n\r\n    /**\r\n     * Fast forward\r\n     * @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime\r\n     */\r\n    forward(seekTime) {\r\n        this.currentTime = this.currentTime + (utils_is.number(seekTime) ? seekTime : this.config.seekTime);\r\n    }\r\n\r\n    /**\r\n     * Seek to a time\r\n     * @param {Number} input - where to seek to in seconds. Defaults to 0 (the start)\r\n     */\r\n    set currentTime(input) {\r\n        // Bail if media duration isn't available yet\r\n        if (!this.duration) {\r\n            return;\r\n        }\r\n\r\n        // Validate input\r\n        const inputIsValid = utils_is.number(input) && input > 0;\r\n\r\n        // Set\r\n        this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0;\r\n\r\n        // Logging\r\n        this.debug.log(`Seeking to ${this.currentTime} seconds`);\r\n    }\r\n\r\n    /**\r\n     * Get current time\r\n     */\r\n    get currentTime() {\r\n        return Number(this.media.currentTime);\r\n    }\r\n\r\n    /**\r\n     * Get buffered\r\n     */\r\n    get buffered() {\r\n        const { buffered } = this.media;\r\n\r\n        // YouTube / Vimeo return a float between 0-1\r\n        if (utils_is.number(buffered)) {\r\n            return buffered;\r\n        }\r\n\r\n        // HTML5\r\n        // TODO: Handle buffered chunks of the media\r\n        // (i.e. seek to another section buffers only that section)\r\n        if (buffered && buffered.length && this.duration > 0) {\r\n            return buffered.end(0) / this.duration;\r\n        }\r\n\r\n        return 0;\r\n    }\r\n\r\n    /**\r\n     * Get seeking status\r\n     */\r\n    get seeking() {\r\n        return Boolean(this.media.seeking);\r\n    }\r\n\r\n    /**\r\n     * Get the duration of the current media\r\n     */\r\n    get duration() {\r\n        // Faux duration set via config\r\n        const fauxDuration = parseFloat(this.config.duration);\r\n\r\n        // Media duration can be NaN or Infinity before the media has loaded\r\n        const realDuration = (this.media || {}).duration;\r\n        const duration = !utils_is.number(realDuration) || realDuration === Infinity ? 0 : realDuration;\r\n\r\n        // If config duration is funky, use regular duration\r\n        return fauxDuration || duration;\r\n    }\r\n\r\n    /**\r\n     * Set the player volume\r\n     * @param {Number} value - must be between 0 and 1. Defaults to the value from local storage and config.volume if not set in storage\r\n     */\r\n    set volume(value) {\r\n        let volume = value;\r\n        const max = 1;\r\n        const min = 0;\r\n\r\n        if (utils_is.string(volume)) {\r\n            volume = Number(volume);\r\n        }\r\n\r\n        // Load volume from storage if no value specified\r\n        if (!utils_is.number(volume)) {\r\n            volume = this.storage.get('volume');\r\n        }\r\n\r\n        // Use config if all else fails\r\n        if (!utils_is.number(volume)) {\r\n            ({ volume } = this.config);\r\n        }\r\n\r\n        // Maximum is volumeMax\r\n        if (volume > max) {\r\n            volume = max;\r\n        }\r\n        // Minimum is volumeMin\r\n        if (volume < min) {\r\n            volume = min;\r\n        }\r\n\r\n        // Update config\r\n        this.config.volume = volume;\r\n\r\n        // Set the player volume\r\n        this.media.volume = volume;\r\n\r\n        // If muted, and we're increasing volume manually, reset muted state\r\n        if (!utils_is.empty(value) && this.muted && volume > 0) {\r\n            this.muted = false;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Get the current player volume\r\n     */\r\n    get volume() {\r\n        return Number(this.media.volume);\r\n    }\r\n\r\n    /**\r\n     * Increase volume\r\n     * @param {Boolean} step - How much to decrease by (between 0 and 1)\r\n     */\r\n    increaseVolume(step) {\r\n        const volume = this.media.muted ? 0 : this.volume;\r\n        this.volume = volume + (utils_is.number(step) ? step : 0);\r\n    }\r\n\r\n    /**\r\n     * Decrease volume\r\n     * @param {Boolean} step - How much to decrease by (between 0 and 1)\r\n     */\r\n    decreaseVolume(step) {\r\n        this.increaseVolume(-step);\r\n    }\r\n\r\n    /**\r\n     * Set muted state\r\n     * @param {Boolean} mute\r\n     */\r\n    set muted(mute) {\r\n        let toggle = mute;\r\n\r\n        // Load muted state from storage\r\n        if (!utils_is.boolean(toggle)) {\r\n            toggle = this.storage.get('muted');\r\n        }\r\n\r\n        // Use config if all else fails\r\n        if (!utils_is.boolean(toggle)) {\r\n            toggle = this.config.muted;\r\n        }\r\n\r\n        // Update config\r\n        this.config.muted = toggle;\r\n\r\n        // Set mute on the player\r\n        this.media.muted = toggle;\r\n    }\r\n\r\n    /**\r\n     * Get current muted state\r\n     */\r\n    get muted() {\r\n        return Boolean(this.media.muted);\r\n    }\r\n\r\n    /**\r\n     * Check if the media has audio\r\n     */\r\n    get hasAudio() {\r\n        // Assume yes for all non HTML5 (as we can't tell...)\r\n        if (!this.isHTML5) {\r\n            return true;\r\n        }\r\n\r\n        if (this.isAudio) {\r\n            return true;\r\n        }\r\n\r\n        // Get audio tracks\r\n        return (\r\n            Boolean(this.media.mozHasAudio) ||\r\n            Boolean(this.media.webkitAudioDecodedByteCount) ||\r\n            Boolean(this.media.audioTracks && this.media.audioTracks.length)\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Set playback speed\r\n     * @param {Number} speed - the speed of playback (0.5-2.0)\r\n     */\r\n    set speed(input) {\r\n        let speed = null;\r\n\r\n        if (utils_is.number(input)) {\r\n            speed = input;\r\n        }\r\n\r\n        if (!utils_is.number(speed)) {\r\n            speed = this.storage.get('speed');\r\n        }\r\n\r\n        if (!utils_is.number(speed)) {\r\n            speed = this.config.speed.selected;\r\n        }\r\n\r\n        // Set min/max\r\n        if (speed < 0.1) {\r\n            speed = 0.1;\r\n        }\r\n        if (speed > 2.0) {\r\n            speed = 2.0;\r\n        }\r\n\r\n        if (!this.config.speed.options.includes(speed)) {\r\n            this.debug.warn(`Unsupported speed (${speed})`);\r\n            return;\r\n        }\r\n\r\n        // Update config\r\n        this.config.speed.selected = speed;\r\n\r\n        // Set media speed\r\n        this.media.playbackRate = speed;\r\n    }\r\n\r\n    /**\r\n     * Get current playback speed\r\n     */\r\n    get speed() {\r\n        return Number(this.media.playbackRate);\r\n    }\r\n\r\n    /**\r\n     * Set playback quality\r\n     * Currently HTML5 & YouTube only\r\n     * @param {Number} input - Quality level\r\n     */\r\n    set quality(input) {\r\n        const config = this.config.quality;\r\n        const options = this.options.quality;\r\n\r\n        if (!options.length) {\r\n            return;\r\n        }\r\n\r\n        let quality = [\r\n            !utils_is.empty(input) && Number(input),\r\n            this.storage.get('quality'),\r\n            config.selected,\r\n            config.default,\r\n        ].find(utils_is.number);\r\n\r\n        let updateStorage = true;\r\n\r\n        if (!options.includes(quality)) {\r\n            const value = closest(options, quality);\r\n            this.debug.warn(`Unsupported quality option: ${quality}, using ${value} instead`);\r\n            quality = value;\r\n\r\n            // Don't update storage if quality is not supported\r\n            updateStorage = false;\r\n        }\r\n\r\n        // Update config\r\n        config.selected = quality;\r\n\r\n        // Set quality\r\n        this.media.quality = quality;\r\n\r\n        // Save to storage\r\n        if (updateStorage) {\r\n            this.storage.set({ quality });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Get current quality level\r\n     */\r\n    get quality() {\r\n        return this.media.quality;\r\n    }\r\n\r\n    /**\r\n     * Toggle loop\r\n     * TODO: Finish fancy new logic. Set the indicator on load as user may pass loop as config\r\n     * @param {Boolean} input - Whether to loop or not\r\n     */\r\n    set loop(input) {\r\n        const toggle = utils_is.boolean(input) ? input : this.config.loop.active;\r\n        this.config.loop.active = toggle;\r\n        this.media.loop = toggle;\r\n\r\n        // Set default to be a true toggle\r\n        /* const type = ['start', 'end', 'all', 'none', 'toggle'].includes(input) ? input : 'toggle';\r\n\r\n        switch (type) {\r\n            case 'start':\r\n                if (this.config.loop.end && this.config.loop.end <= this.currentTime) {\r\n                    this.config.loop.end = null;\r\n                }\r\n                this.config.loop.start = this.currentTime;\r\n                // this.config.loop.indicator.start = this.elements.display.played.value;\r\n                break;\r\n\r\n            case 'end':\r\n                if (this.config.loop.start >= this.currentTime) {\r\n                    return this;\r\n                }\r\n                this.config.loop.end = this.currentTime;\r\n                // this.config.loop.indicator.end = this.elements.display.played.value;\r\n                break;\r\n\r\n            case 'all':\r\n                this.config.loop.start = 0;\r\n                this.config.loop.end = this.duration - 2;\r\n                this.config.loop.indicator.start = 0;\r\n                this.config.loop.indicator.end = 100;\r\n                break;\r\n\r\n            case 'toggle':\r\n                if (this.config.loop.active) {\r\n                    this.config.loop.start = 0;\r\n                    this.config.loop.end = null;\r\n                } else {\r\n                    this.config.loop.start = 0;\r\n                    this.config.loop.end = this.duration - 2;\r\n                }\r\n                break;\r\n\r\n            default:\r\n                this.config.loop.start = 0;\r\n                this.config.loop.end = null;\r\n                break;\r\n        } */\r\n    }\r\n\r\n    /**\r\n     * Get current loop state\r\n     */\r\n    get loop() {\r\n        return Boolean(this.media.loop);\r\n    }\r\n\r\n    /**\r\n     * Set new media source\r\n     * @param {Object} input - The new source object (see docs)\r\n     */\r\n    set source(input) {\r\n        js_source.change.call(this, input);\r\n    }\r\n\r\n    /**\r\n     * Get current source\r\n     */\r\n    get source() {\r\n        return this.media.currentSrc;\r\n    }\r\n\r\n    /**\r\n     * Get a download URL (either source or custom)\r\n     */\r\n    get download() {\r\n        const { download } = this.config.urls;\r\n\r\n        return utils_is.url(download) ? download : this.source;\r\n    }\r\n\r\n    /**\r\n     * Set the poster image for a video\r\n     * @param {String} input - the URL for the new poster image\r\n     */\r\n    set poster(input) {\r\n        if (!this.isVideo) {\r\n            this.debug.warn('Poster can only be set for video');\r\n            return;\r\n        }\r\n\r\n        js_ui.setPoster.call(this, input, false).catch(() => {});\r\n    }\r\n\r\n    /**\r\n     * Get the current poster image\r\n     */\r\n    get poster() {\r\n        if (!this.isVideo) {\r\n            return null;\r\n        }\r\n\r\n        return this.media.getAttribute('poster');\r\n    }\r\n\r\n    /**\r\n     * Set the autoplay state\r\n     * @param {Boolean} input - Whether to autoplay or not\r\n     */\r\n    set autoplay(input) {\r\n        const toggle = utils_is.boolean(input) ? input : this.config.autoplay;\r\n        this.config.autoplay = toggle;\r\n    }\r\n\r\n    /**\r\n     * Get the current autoplay state\r\n     */\r\n    get autoplay() {\r\n        return Boolean(this.config.autoplay);\r\n    }\r\n\r\n    /**\r\n     * Toggle captions\r\n     * @param {Boolean} input - Whether to enable captions\r\n     */\r\n    toggleCaptions(input) {\r\n        js_captions.toggle.call(this, input, false);\r\n    }\r\n\r\n    /**\r\n     * Set the caption track by index\r\n     * @param {Number} - Caption index\r\n     */\r\n    set currentTrack(input) {\r\n        js_captions.set.call(this, input, false);\r\n    }\r\n\r\n    /**\r\n     * Get the current caption track index (-1 if disabled)\r\n     */\r\n    get currentTrack() {\r\n        const { toggled, currentTrack } = this.captions;\r\n        return toggled ? currentTrack : -1;\r\n    }\r\n\r\n    /**\r\n     * Set the wanted language for captions\r\n     * Since tracks can be added later it won't update the actual caption track until there is a matching track\r\n     * @param {String} - Two character ISO language code (e.g. EN, FR, PT, etc)\r\n     */\r\n    set language(input) {\r\n        js_captions.setLanguage.call(this, input, false);\r\n    }\r\n\r\n    /**\r\n     * Get the current track's language\r\n     */\r\n    get language() {\r\n        return (js_captions.getCurrentTrack.call(this) || {}).language;\r\n    }\r\n\r\n    /**\r\n     * Toggle picture-in-picture playback on WebKit/MacOS\r\n     * TODO: update player with state, support, enabled\r\n     * TODO: detect outside changes\r\n     */\r\n    set pip(input) {\r\n        // Bail if no support\r\n        if (!js_support.pip) {\r\n            return;\r\n        }\r\n\r\n        // Toggle based on current state if not passed\r\n        const toggle = utils_is.boolean(input) ? input : !this.pip;\r\n\r\n        // Toggle based on current state\r\n        // Safari\r\n        if (utils_is.function(this.media.webkitSetPresentationMode)) {\r\n            this.media.webkitSetPresentationMode(toggle ? pip.active : pip.inactive);\r\n        }\r\n\r\n        // Chrome\r\n        if (utils_is.function(this.media.requestPictureInPicture)) {\r\n            if (!this.pip && toggle) {\r\n                this.media.requestPictureInPicture();\r\n            } else if (this.pip && !toggle) {\r\n                document.exitPictureInPicture();\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Get the current picture-in-picture state\r\n     */\r\n    get pip() {\r\n        if (!js_support.pip) {\r\n            return null;\r\n        }\r\n\r\n        // Safari\r\n        if (!utils_is.empty(this.media.webkitPresentationMode)) {\r\n            return this.media.webkitPresentationMode === pip.active;\r\n        }\r\n\r\n        // Chrome\r\n        return this.media === document.pictureInPictureElement;\r\n    }\r\n\r\n    /**\r\n     * Trigger the airplay dialog\r\n     * TODO: update player with state, support, enabled\r\n     */\r\n    airplay() {\r\n        // Show dialog if supported\r\n        if (js_support.airplay) {\r\n            this.media.webkitShowPlaybackTargetPicker();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Toggle the player controls\r\n     * @param {Boolean} [toggle] - Whether to show the controls\r\n     */\r\n    toggleControls(toggle) {\r\n        // Don't toggle if missing UI support or if it's audio\r\n        if (this.supported.ui && !this.isAudio) {\r\n            // Get state before change\r\n            const isHidden = hasClass(this.elements.container, this.config.classNames.hideControls);\r\n\r\n            // Negate the argument if not undefined since adding the class to hides the controls\r\n            const force = typeof toggle === 'undefined' ? undefined : !toggle;\r\n\r\n            // Apply and get updated state\r\n            const hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force);\r\n\r\n            // Close menu\r\n            if (hiding && this.config.controls.includes('settings') && !utils_is.empty(this.config.settings)) {\r\n                js_controls.toggleMenu.call(this, false);\r\n            }\r\n\r\n            // Trigger event on change\r\n            if (hiding !== isHidden) {\r\n                const eventName = hiding ? 'controlshidden' : 'controlsshown';\r\n                triggerEvent.call(this, this.media, eventName);\r\n            }\r\n\r\n            return !hiding;\r\n        }\r\n\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * Add event listeners\r\n     * @param {String} event - Event type\r\n     * @param {Function} callback - Callback for when event occurs\r\n     */\r\n    on(event, callback) {\r\n        events_on.call(this, this.elements.container, event, callback);\r\n    }\r\n\r\n    /**\r\n     * Add event listeners once\r\n     * @param {String} event - Event type\r\n     * @param {Function} callback - Callback for when event occurs\r\n     */\r\n    once(event, callback) {\r\n        events_once.call(this, this.elements.container, event, callback);\r\n    }\r\n\r\n    /**\r\n     * Remove event listeners\r\n     * @param {String} event - Event type\r\n     * @param {Function} callback - Callback for when event occurs\r\n     */\r\n    off(event, callback) {\r\n        off(this.elements.container, event, callback);\r\n    }\r\n\r\n    /**\r\n     * Destroy an instance\r\n     * Event listeners are removed when elements are removed\r\n     * http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory\r\n     * @param {Function} callback - Callback for when destroy is complete\r\n     * @param {Boolean} soft - Whether it's a soft destroy (for source changes etc)\r\n     */\r\n    destroy(callback, soft = false) {\r\n        if (!this.ready) {\r\n            return;\r\n        }\r\n\r\n        const done = () => {\r\n            // Reset overflow (incase destroyed while in fullscreen)\r\n            document.body.style.overflow = '';\r\n\r\n            // GC for embed\r\n            this.embed = null;\r\n\r\n            // If it's a soft destroy, make minimal changes\r\n            if (soft) {\r\n                if (Object.keys(this.elements).length) {\r\n                    // Remove elements\r\n                    removeElement(this.elements.buttons.play);\r\n                    removeElement(this.elements.captions);\r\n                    removeElement(this.elements.controls);\r\n                    removeElement(this.elements.wrapper);\r\n\r\n                    // Clear for GC\r\n                    this.elements.buttons.play = null;\r\n                    this.elements.captions = null;\r\n                    this.elements.controls = null;\r\n                    this.elements.wrapper = null;\r\n                }\r\n\r\n                // Callback\r\n                if (utils_is.function(callback)) {\r\n                    callback();\r\n                }\r\n            } else {\r\n                // Unbind listeners\r\n                unbindListeners.call(this);\r\n\r\n                // Replace the container with the original element provided\r\n                replaceElement(this.elements.original, this.elements.container);\r\n\r\n                // Event\r\n                triggerEvent.call(this, this.elements.original, 'destroyed', true);\r\n\r\n                // Callback\r\n                if (utils_is.function(callback)) {\r\n                    callback.call(this.elements.original);\r\n                }\r\n\r\n                // Reset state\r\n                this.ready = false;\r\n\r\n                // Clear for garbage collection\r\n                setTimeout(() => {\r\n                    this.elements = null;\r\n                    this.media = null;\r\n                }, 200);\r\n            }\r\n        };\r\n\r\n        // Stop playback\r\n        this.stop();\r\n\r\n        // Provider specific stuff\r\n        if (this.isHTML5) {\r\n            // Clear timeout\r\n            clearTimeout(this.timers.loading);\r\n\r\n            // Restore native video controls\r\n            js_ui.toggleNativeControls.call(this, true);\r\n\r\n            // Clean up\r\n            done();\r\n        } else if (this.isYouTube) {\r\n            // Clear timers\r\n            clearInterval(this.timers.buffering);\r\n            clearInterval(this.timers.playing);\r\n\r\n            // Destroy YouTube API\r\n            if (this.embed !== null && utils_is.function(this.embed.destroy)) {\r\n                this.embed.destroy();\r\n            }\r\n\r\n            // Clean up\r\n            done();\r\n        } else if (this.isVimeo) {\r\n            // Destroy Vimeo API\r\n            // then clean up (wait, to prevent postmessage errors)\r\n            if (this.embed !== null) {\r\n                this.embed.unload().then(done);\r\n            }\r\n\r\n            // Vimeo does not always return\r\n            setTimeout(done, 200);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Check for support for a mime type (HTML5 only)\r\n     * @param {String} type - Mime type\r\n     */\r\n    supports(type) {\r\n        return js_support.mime.call(this, type);\r\n    }\r\n\r\n    /**\r\n     * Check for support\r\n     * @param {String} type - Player type (audio/video)\r\n     * @param {String} provider - Provider (html5/youtube/vimeo)\r\n     * @param {Boolean} inline - Where player has `playsinline` sttribute\r\n     */\r\n    static supported(type, provider, inline) {\r\n        return js_support.check(type, provider, inline);\r\n    }\r\n\r\n    /**\r\n     * Load an SVG sprite into the page\r\n     * @param {String} url - URL for the SVG sprite\r\n     * @param {String} [id] - Unique ID\r\n     */\r\n    static loadSprite(url, id) {\r\n        return loadSprite(url, id);\r\n    }\r\n\r\n    /**\r\n     * Setup multiple instances\r\n     * @param {*} selector\r\n     * @param {Object} options\r\n     */\r\n    static setup(selector, options = {}) {\r\n        let targets = null;\r\n\r\n        if (utils_is.string(selector)) {\r\n            targets = Array.from(document.querySelectorAll(selector));\r\n        } else if (utils_is.nodeList(selector)) {\r\n            targets = Array.from(selector);\r\n        } else if (utils_is.array(selector)) {\r\n            targets = selector.filter(utils_is.element);\r\n        }\r\n\r\n        if (utils_is.empty(targets)) {\r\n            return null;\r\n        }\r\n\r\n        return targets.map(t => new plyr_Plyr(t, options));\r\n    }\r\n}\r\n\r\nplyr_Plyr.defaults = cloneDeep(config_defaults);\r\n\r\n/* harmony default export */ var plyr = (plyr_Plyr);\r\n\n// EXTERNAL MODULE: ./src/vendor/libs_external/plyr/dist/plyr.css\nvar dist_plyr = __webpack_require__(\"./src/vendor/libs_external/plyr/dist/plyr.css\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-audio-player/css/builder-audio-player.less\nvar builder_audio_player = __webpack_require__(\"./src/core/custom_plugins/builder-audio-player/css/builder-audio-player.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-audio-player/css/audio.less\nvar css_audio = __webpack_require__(\"./src/core/custom_plugins/builder-audio-player/css/audio.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-audio-player/builder-audio-player.js\n\n\n\n\n\n\n\n\n// import { firstLetter } from \"glamor\";\nvar builder_audio_player_Audio = /*#__PURE__*/function () {\n  function Audio(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Audio);\n    this.app = app;\n    var audio = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.audio, params);\n    audio.params = extendedParams;\n    audio.tracks = _.filter(audio.params.data, function (o) {\n      return o.deleted == false;\n    });\n\n    // audio.enablePlaylist = true;\n\n    audio.index = 1;\n    var isPlaying = false;\n    var sheet = jquery_default()(\"\\n    <div class=\\\"sheet-modal audio-player-wrapper\\\">\\n      <div class=\\\"sheet-modal-inner\\\">\\n       <div id=\\\"nowPlay\\\">\\n                      <span id=\\\"npAction\\\">Zastaveno...</span><span id=\\\"npTitle\\\"></span>\\n                  </div>\\n                  <div id=\\\"audiowrap\\\">\\n                      <div id=\\\"audio0\\\">\\n                          <audio id=\\\"audio1\\\" preload controls>Your browser does not support HTML5 Audio! \\uD83D\\uDE22</audio>\\n                      </div>\\n                    <div id=\\\"tracks\\\">\\n                          <a id=\\\"btnPrev\\\">&larr;</a><a id=\\\"btnNext\\\">&rarr;</a><a id=\\\"playlist\\\"><i class=\\\"icon material-icons\\\">playlist_add</i></a>\\n                     </div>\\n                  </div>\\n                  <div id=\\\"plwrap\\\">\\n                     <ul id=\\\"plList\\\"></ul>\\n              </div>\\n      <a id=\\\"btnClose\\\" href=\\\"#\\\" class=\\\"link sheet-close\\\"><i class=\\\"icon material-icons\\\">close</i></a>\\n      </div>\\n     </div> \");\n\n    // Create dynamic Sheet\n    this.dynamicSheet = app.sheet.create({\n      backdrop: false,\n      content: sheet,\n      // Events\n      on: {}\n    });\n    // Events also can be assigned on instance later\n    this.dynamicSheet.on(\"close\", function (sheet) {\n      audio.player.pause();\n    });\n    this.dynamicSheet.on(\"closed\", function (sheet) {});\n    $$(\".dynamic-sheet\").on(\"click\", function () {\n      // Close inline sheet before\n      app.sheet.close(\".my-sheet\");\n\n      // Open dynamic sheet\n      dynamicSheet.open();\n    });\n    var supportsAudio = !!document.createElement(\"audio\").canPlayType;\n    if (supportsAudio) {\n      sheet.find(\"#playlist\").on(\"click\", function () {\n        sheet.find(\"#plList\").toggle();\n      });\n      // initialize plyr\n      this.player = new plyr(sheet.find(\"#audio1\")[0], {\n        controls: [\"restart\", \"play\", \"progress\", \"current-time\", \"duration\", \"mute\", \"volume\"]\n      });\n      var npAction = $$(sheet).find(\"#npAction\");\n      var npTitle = $$(sheet).find(\"#npTitle\");\n      this.player.on(\"play\", function () {\n        isPlaying = true;\n        // alert(\"isPlaying\");\n        npAction.text(\"Nyní hraje:\");\n        var title = audio.player.config.title;\n        npTitle.text(title);\n      });\n      this.player.on(\"pause\", function () {\n        // alert(\"paused\");\n        isPlaying = false;\n        npAction.text(\"Zastaveno:\");\n      });\n      this.player.on(\"ended\", function () {\n        npAction.text(\"Zastaveno:\");\n        audio.player.pause();\n        if (audio.params.enablePlaylist) {\n          var trackCount = audio.tracks.length;\n          if (audio.index + 1 < trackCount) {\n            audio.index++;\n            var id = audio.tracks[audio.index].track;\n            audio.playAudio(id);\n            if (audio.isPlaying) {\n              audio.player.play();\n            }\n          } else {\n            audio.player.pause();\n            audio.index = 0;\n            var _id = audio.tracks[audio.index].track;\n            audio.playAudio(_id);\n          }\n        }\n      });\n    }\n  }\n  return createClass_default()(Audio, [{\n    key: \"openAudioPopup\",\n    value: function openAudioPopup(selectedText) {\n      var edit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var trackId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var app = this.app;\n      var id = app.utils.id(\"xxxx-xxxx-xxxx\");\n      return new Promise(function (resolve, reject) {\n        var audioModal = app.popup.create({\n          content: \"\\n      <div class=\\\"popup popup-audio\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.audioTitle\"), \"</h2>\\n            </div>\\n\\n          </div>\\n          <div class=\\\"view view-main-audio-popup audio-view\\\" data-compId=\\\"\").concat(id, \"\\\"></div>\\n      </div>\"),\n          // Events\n          on: {\n            open: function open(popover) {\n              app.views.create(\".view-main-audio-popup\", {\n                name: \"audio-\".concat(id),\n                url: \"/builder-audio-list/\".concat(id),\n                pushState: false,\n                selectedText: selectedText,\n                edit: edit,\n                trackId: trackId\n              });\n            },\n            opened: function opened(popover) {\n              app.data.myEvents.off(\"audio:useAudio\");\n              app.data.myEvents.on(\"audio:useAudio\", function (res) {\n                var audioLink = app.audio.createAudioElement(res);\n                resolve(audioLink);\n                audioModal.close();\n              });\n            }\n          }\n        });\n        audioModal.open();\n      });\n    }\n  }, {\n    key: \"createAudioElement\",\n    value: function createAudioElement(obj) {\n      if (obj.trackNumber == \"deleted\") {\n        return \"<span>\".concat(obj.title, \"</span>\");\n      } else {\n        return \"<a href=\\\"#\\\" class=\\\"link builder-audio-player\\\" data-track=\\\"\".concat(obj.trackNumber, \"\\\">\").concat(obj.title, \"</a>\");\n      }\n    }\n  }, {\n    key: \"openPlayer\",\n    value: function openPlayer() {\n      this.dynamicSheet.open();\n    }\n  }, {\n    key: \"playAudio\",\n    value: function playAudio(track) {\n      this.loadTrack(track);\n      if (!this.isPlaying) {\n        this.player.play();\n      }\n    }\n  }, {\n    key: \"setPlaylist\",\n    value: function setPlaylist() {\n      var self = this;\n      var el = $$(self.dynamicSheet.$el);\n      var plist = $$(el).find(\"#plList\");\n      $$(plist).empty();\n      this.tracks = _.filter(this.params.data, function (o) {\n        return o.deleted == false;\n      });\n      var buildPlaylist = this.tracks.forEach(function (value) {\n        var trackNumber = value.track,\n          trackName = value.name,\n          trackDuration = value.duration;\n        if (trackNumber.toString().length === 1) {\n          trackNumber = \"0\" + trackNumber;\n        }\n        if (self.params.enablePlaylist) {\n          $$(plist).append('<li id=\"tn-' + value.track + '\" data-track-number=\"' + value.track + '\"> \\\r\n                  <div class=\"plItem\"> \\\r\n                      <span class=\"plNum\">' + trackNumber + '.</span> \\\r\n                      <span class=\"plTitle\">' + trackName + '</span> \\\r\n                      <span class=\"plLength\">' + trackDuration + \"</span> \\\r\n                  </div> \\\r\n              </li>\");\n        }\n      });\n      $$(el).find(\"#btnPrev\").on(\"click\", function () {\n        if (self.index - 1 > -1) {\n          self.index--;\n          var id = self.tracks[self.index].track;\n          self.playAudio(id);\n          if (self.isPlaying) {\n            self.player.play();\n          }\n        } else {\n          self.player.pause();\n          self.index = 0;\n          var _id2 = self.tracks[self.index].track;\n          self.playAudio(_id2);\n        }\n      }), $$(el).find(\"#btnNext\").on(\"click\", function () {\n        var trackCount = self.tracks.length;\n        if (self.index + 1 < trackCount) {\n          self.index++;\n          var id = self.tracks[self.index].track;\n          self.playAudio(id);\n          if (self.isPlaying) {\n            self.player.play();\n          }\n        } else {\n          self.player.pause();\n          self.index = 0;\n          var _id3 = self.tracks[self.index].track;\n          self.playAudio(_id3);\n        }\n      });\n      $$(el).find(\"#plList li\").on(\"click\", function () {\n        var id = parseInt(jquery_default()(this).attr(\"data-track-number\"));\n        // if (id !== index) {\n        self.playAudio(id);\n        // }\n      });\n    }\n  }, {\n    key: \"loadTrack\",\n    value: function loadTrack(id) {\n      var el = $$(this.dynamicSheet.$el);\n      var currentTrack = this.tracks.find(function (obj) {\n        return obj.track == id;\n      });\n      var index = this.tracks.findIndex(function (obj) {\n        return obj.track == id;\n      });\n      this.index = index;\n      $$(el).find(\".plSel\").removeClass(\"plSel\");\n      $$(el).find(\"#plList #tn-\" + id + \"\").addClass(\"plSel\");\n      this.player.source = {\n        type: \"audio\",\n        title: currentTrack.name,\n        sources: [{\n          src: currentTrack.file,\n          type: \"audio/mp3\"\n        }]\n      };\n    }\n  }, {\n    key: \"deleteTrack\",\n    value: function deleteTrack(id) {\n      var item = _.find(this.params.data, function (o) {\n        return o.track == id;\n      });\n      item[\"deleted\"] = true;\n      this.tracks = _.filter(this.params.data, function (o) {\n        return o.deleted == false;\n      });\n    }\n  }, {\n    key: \"startTrack\",\n    value: function startTrack($clickedEl) {\n      var app = this.app;\n      var track = $clickedEl.attr(\"data-track\");\n      if (track) {\n        this.setPlaylist();\n        this.openPlayer();\n        this.playAudio(track);\n      } else {\n        var _app = this.app;\n        var dialog = _app.dialog.alert(\"Nebyl vybrán nebo nalezen zvuk k přehrání.\", \"Nelze přehrát!\");\n        dialog.open();\n      }\n    }\n  }, {\n    key: \"get\",\n    value: function get() {\n      return this;\n    }\n  }]);\n}();\n/* harmony default export */ var builder_audio_player_builder_audio_player = ({\n  name: \"audio\",\n  params: {\n    audio: {\n      data: [],\n      enablePlaylist: true\n    }\n  },\n  static: {\n    Audio: builder_audio_player_Audio\n  },\n  create: function create() {\n    var app = this;\n    app.audio = new builder_audio_player_Audio(app);\n  },\n  clicks: {\n    \".builder-audio-player, a.builder-audio-player\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      return app.audio.startTrack($clickedEl);\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/translation/translation.js + 12 modules\nvar translation = __webpack_require__(\"./src/core/custom_plugins/translation/translation.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/search/templates/right_menu.f7.html\nvar right_menu_f7 = __webpack_require__(\"./src/core/custom_plugins/search/templates/right_menu.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/search/search.js\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\nvar search_Search = /*#__PURE__*/function () {\n  function Search(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Search);\n    this.app = app;\n    var search = this;\n    search.routesx = app.routes;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.search, params);\n    search.params = extendedParams;\n    search.founded = [];\n    app.on(\"init\", function () {\n      app.translation.addResourceBundle(\"cs\", \"search\", app.search.params.lang.cs);\n      app.translation.addResourceBundle(\"en\", \"search\", app.search.params.lang.en);\n    });\n  }\n  return createClass_default()(Search, [{\n    key: \"occurrencesx\",\n    value: function occurrencesx(string, subString, allowOverlapping) {\n      string += \"\";\n      subString += \"\";\n      if (subString.length <= 0) return string.length + 1;\n      var n = 0,\n        pos = 0,\n        step = allowOverlapping ? 1 : subString.length;\n      while (true) {\n        pos = string.indexOf(subString, pos);\n        if (pos >= 0) {\n          ++n;\n          pos += step;\n        } else break;\n      }\n      return n;\n    }\n  }, {\n    key: \"x\",\n    value: function x(searchString) {\n      var routes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.routesx;\n      var search = this;\n      searchString = search.app.utils.removeDiacritics(searchString).toLowerCase();\n      routes.forEach(function (route) {\n        if (route.chapter) {\n          //assync https://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui\n          var searchIn = route.component.cleanText;\n          // debugger\n          searchIn = search.app.utils.removeDiacritics(searchIn).toLowerCase();\n          var occurrences = search.occurrencesx(searchIn, searchString, false);\n          search.founded.push({\n            id: route.id,\n            val: occurrences\n          });\n          if (occurrences > 0) {}\n          if (route.hasOwnProperty(\"routes\")) {\n            search.founded.push(search.x(searchString, route.routes));\n          }\n\n          // if(searchIn.indexOf(searchString) > -1){\n          // }else{\n          //\n          // }\n        }\n      });\n      return search.founded;\n    }\n  }, {\n    key: \"builderSearch\",\n    value: function builderSearch(searchString) {\n      var search = this;\n      var app = this.app;\n      searchString = search.app.utils.removeDiacritics(searchString).toLowerCase();\n      var searchData = app.builder.cleanText;\n      Object.keys(searchData).forEach(function (val, key) {\n        var searchIn = searchData[val];\n        searchIn = search.app.utils.removeDiacritics(searchIn).toLowerCase();\n        var occurrences = search.occurrencesx(searchIn, searchString, false);\n        search.founded.push({\n          id: val,\n          val: occurrences\n        });\n      });\n      return search.founded;\n    }\n  }, {\n    key: \"chapterSearch\",\n    value: function chapterSearch(searchString) {\n      var search = this;\n      var app = this.app;\n      search.founded = [];\n      if (app.hasOwnProperty(\"builder\")) {\n        return search.builderSearch(searchString);\n      } else {\n        return search.x(searchString);\n      }\n    }\n  }, {\n    key: \"setSearchString\",\n    value: function setSearchString(string) {\n      var search = this;\n      var leftPanel = search.app.panel.get(\"right\");\n      leftPanel.open();\n      var leftView = search.app.views.get($$(\".view-right\"));\n      var fu = leftView.$el.find(\".searchbar\");\n      search.app.searchbar.search(fu, string);\n      // debugger;\n      // search.chapterSearch(string);\n    }\n  }]);\n}();\n/* harmony default export */ var search_search = ({\n  name: \"search\",\n  params: {\n    search: {\n      active: true,\n      lang: {\n        cs: {\n          search: \"Vyhledávání\",\n          lookingFor: \"Co hledáte?\",\n          notFound: \"Nic nenalezeno\"\n        },\n        en: {\n          search: \"Search\",\n          lookingFor: \"What are you looking for?\",\n          notFound: \"Nothing found\"\n        }\n      }\n    }\n  },\n  static: {\n    Search: search_Search\n  },\n  create: function create() {\n    var app = this;\n    app.search = new search_Search(app);\n    app.routes.push({\n      name: \"Pravé menu\",\n      path: \"/right-menu/\",\n      component: right_menu_f7[\"default\"]\n    });\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"book:chaptersLoaded\", function () {\n        app.views.create(\".view-right\", {\n          url: \"/right-menu/\",\n          pushState: false\n        });\n      });\n    });\n\n    // app.data.user = app.user;\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/popover-with-data/popover-with-data.less\nvar popover_with_data = __webpack_require__(\"./src/core/custom_plugins/popover-with-data/popover-with-data.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/popover-with-data/popover-with-data.js\n\n/* harmony default export */ var popover_with_data_popover_with_data = ({\n  name: \"PopoverWithData\",\n  clicks: {\n    \".page .popover-with-data\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      var dataText = decodeURIComponent($clickedEl.data(\"text\"));\n      dataText = app.apiManager.replaceMediaServerPlaceholder(dataText);\n      var pop = app.popover.create({\n        content: '<div class=\"popover\"><div class=\"popover-inner\"><div class=\"block\">' + dataText + \"</div></div></div>\"\n      });\n      pop.open($clickedEl);\n      var el = pop.$el.find(\".popover-inner\");\n      var navs = el.find(\".navigate\");\n\n      //zavře popover při navigaci\n      navs.on(\"click\", function () {\n        pop.close();\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/book-navbar/bookNavbar.js\n\n\n\n\n\nfunction bookNavbar_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, bookNavbar_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction bookNavbar_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (bookNavbar_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\nvar bookNavbar_BookNavbar = /*#__PURE__*/function (_Framework7Class) {\n  function BookNavbar(app) {\n    var _this;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, BookNavbar);\n    _this = bookNavbar_callSuper(this, BookNavbar, [params, [app]]);\n    var bookNavbar = _this;\n    _this.app = app;\n    _this.$slide = null;\n    bookNavbar.page = null;\n\n    // bookNavbar = Utils.extend(bookNavbar, app.params.bookNavbar);\n\n    var defaults = utils[\"default\"].extend({}, app.params.bookNavbar);\n\n    // Extend defaults with modules params\n    bookNavbar.useModulesParams(defaults);\n    bookNavbar.params = utils[\"default\"].extend(defaults, params);\n    app.on(\"init\", function (page) {\n      app.data.myEvents.on(\"page:init\", function (page) {\n        bookNavbar.page = page;\n        bookNavbar.hideNavbarOnScroll(page);\n      });\n    });\n    return possibleConstructorReturn_default()(_this, bookNavbar);\n  }\n  inherits_default()(BookNavbar, _Framework7Class);\n  return createClass_default()(BookNavbar, [{\n    key: \"hideNavbarOnScroll\",\n    value: function hideNavbarOnScroll(page) {\n      var bookNavbar = this;\n      if (bookNavbar.autoHide) {\n        var $page = page.$el;\n        var lastScrollTop = 0;\n        var app = this.app;\n        bookNavbar.$slide = $page.closest(\".swiper-slide\");\n        var heightx = bookNavbar.$slide.outerHeight(true);\n        heightx = heightx + 30; // zobrazt 30px před kocem stránky\n        bookNavbar.$slide.on(\"scroll\", function (event) {\n          if (bookNavbar.autoHide) {\n            var st = $$(this).scrollTop();\n            if (st > lastScrollTop && st > 64) {\n              // downscroll code\n\n              app.navbar.hide(\"#main-navbar\", true);\n              var $height = $page.outerHeight(true);\n              var th = st + heightx;\n              if ($height < th) {\n                app.navbar.show(\"#main-navbar\", true);\n              }\n            } else {\n              // upscroll code\n\n              app.navbar.show(\"#main-navbar\", true);\n            }\n            lastScrollTop = st;\n          }\n        });\n      } else {\n        var _$page = page.$el;\n        bookNavbar.$slide = _$page.closest(\".swiper-slide\");\n      }\n    }\n  }, {\n    key: \"setVisible\",\n    value: function setVisible() {\n      var bookNavbar = this;\n      var app = this.app;\n      app.bookNavbar.autoHide = false;\n      bookNavbar.$slide.off(\"scroll\", function (event) {});\n      app.navbar.show(\"#main-navbar\", true);\n    }\n  }, {\n    key: \"setHideable\",\n    value: function setHideable() {\n      var bookNavbar = this;\n      var app = this.app;\n      bookNavbar.$slide.off(\"scroll\");\n      app.bookNavbar.autoHide = true;\n      bookNavbar.hideNavbarOnScroll(bookNavbar.page);\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var book_navbar_bookNavbar = ({\n  name: \"bookNavbar\",\n  params: {\n    bookNavbar: {\n      autoHide: true,\n      enable: true\n    }\n  },\n  static: {\n    BookNavbar: bookNavbar_BookNavbar\n  },\n  create: function create(params) {\n    var app = this;\n    app.bookNavbar = new bookNavbar_BookNavbar(app, params);\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/book-settings/book-setting.less\nvar book_setting = __webpack_require__(\"./src/core/custom_plugins/book-settings/book-setting.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/book-settings/templates/settings-default.f7.html\n/* harmony default export */ var settings_default_f7 = ({\n  data: function () {\n    return {};\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let $loginForm = page.$el.find('#refresh');\n      $loginForm.on('click', async function () {\n        let loged = await app.user.refresh();\n      });\n      let autohide = app.bookNavbar.autoHide;\n      autohide = autohide + '';\n      let leftPanel = app.panel.get('.panel-left');\n      let vb = leftPanel.params.hideLeftMenu;\n      vb = vb + '';\n      let formData = {\n        'hidePannel': autohide,\n        'hideLeftMenu': vb\n      };\n      app.form.fillFromData('#my-form', formData);\n      let toastCenter = app.toast.create({\n        text: 'Nastavení bylo uloženo',\n        position: 'center',\n        closeTimeout: 2000\n      });\n      function isTrue(myValue) {\n        return myValue == 'true';\n      }\n      page.$el.find('.convert-form-to-data').on('click', function () {\n        let formData = app.form.convertToData('#my-form');\n        let hidePannel = isTrue(formData['hidePannel'][0]);\n        let hideLeftMenu = isTrue(formData['hideLeftMenu'][0]);\n        if (app.bookNavbar.autoHide !== hidePannel) {\n          if (hidePannel) {\n            app.bookNavbar.setHideable();\n          } else {\n            app.bookNavbar.setVisible();\n          }\n        }\n        if (isTrue(vb) !== hideLeftMenu) {\n          leftPanel.params.visibleBreakpoint = 1080;\n          if (hideLeftMenu) {\n            leftPanel.enableVisibleBreakpoint();\n          } else {\n            leftPanel.disableVisibleBreakpoint();\n          }\n          app.swiper.get('#main-swiper').update();\n          leftPanel.open();\n        }\n        toastCenter.open();\n      });\n    }\n  },\n  id: '09fe067ee4',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('settings'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n\\n      <form class=\"list\" id=\"my-form\">\\n        <ul>\\n\\n\\n\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('bookSettings:hideTopPanel'), ctx_1);\n      r += '</div>\\n                <div class=\"item-after\">\\n                  <label class=\"toggle toggle-init\">\\n                    <input type=\"checkbox\" name=\"hidePannel\" value=\"true\"><i class=\"toggle-icon\"></i>\\n                  </label>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('bookSettings:keepLeftMenu'), ctx_1);\n      r += '</div>\\n                <div class=\"item-after\">\\n                  <label class=\"toggle toggle-init\">\\n                    <input type=\"checkbox\" name=\"hideLeftMenu\" value=\"true\"><i class=\"toggle-icon\"></i>\\n                  </label>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n        </ul>\\n      </form>\\n\\n      <div class=\"block block-strong row\">\\n        <div class=\"col\"><a class=\"button convert-form-to-data\" href=\"#\">';\n      r += c(ctx_1.$app.translation.t('save'), ctx_1);\n      r += '</a></div>\\n      </div>\\n\\n    </div>\\n\\n\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"settings\")}} {{$app.translation.t(\"bookSettings:hideTopPanel\")}} {{$app.translation.t(\"bookSettings:keepLeftMenu\")}} {{$app.translation.t(\"save\")}} `\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/book-settings/bookSettings.js\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\nvar bookSettings_BookSettings = /*#__PURE__*/function () {\n  function BookSettings(app, params) {\n    classCallCheck_default()(this, BookSettings);\n    var bookSettings = this;\n\n    // const defaults = Utils.extend({}, app.params);\n    // user.params = Utils.extend(defaults, params);\n\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.bookSettings, params);\n    bookSettings.params = extendedParams;\n    this.app = app;\n    app.on(\"init\", function (page) {\n      if (bookSettings.params.colorTheme === \"auto\") {\n        bookSettings.enableAutoDarkMode();\n      }\n      var vb = bookSettings.params.hideLeftMenu;\n      if (!vb) {\n        bookSettings.resizeSwiperOnOpenPanel();\n        bookSettings.openLeftPanel();\n      }\n    });\n    bookSettings.app.translation.addResourceBundle(\"cs\", \"bookSettings\", bookSettings.params.lang.cs);\n    bookSettings.app.translation.addResourceBundle(\"en\", \"bookSettings\", bookSettings.params.lang.en);\n  }\n  return createClass_default()(BookSettings, [{\n    key: \"resizeSwiperOnOpenPanel\",\n    value: function resizeSwiperOnOpenPanel() {\n      var app = this.app;\n      var leftPanel = app.panel.get('.panel-left');\n      leftPanel.on(\"resize\", function (panel, newWidth) {\n        if (leftPanel.opened) {\n          app.swiper.get(\"#main-swiper\").update();\n        }\n      });\n      var $app = $$('#app');\n      leftPanel.on(\"open\", function (panel, newWidth) {\n        // debugger\n        if (leftPanel.opened) {\n          $app.addClass('fixed-panel-open');\n        } else {\n          $app.removeClass('fixed-panel-open');\n        }\n      });\n      leftPanel.on(\"close\", function (panel, newWidth) {\n        // debugger\n        if (leftPanel.opened) {\n          $app.addClass('fixed-panel-open');\n        } else {\n          $app.removeClass('fixed-panel-open');\n        }\n      });\n    }\n  }, {\n    key: \"openLeftPanel\",\n    value: function openLeftPanel() {\n      var app = this.app;\n      var leftPanel = app.panel.get('.panel-left');\n      leftPanel.params.visibleBreakpoint = this.params.leftPanelVisibleBreakpoint;\n      leftPanel.enableVisibleBreakpoint();\n\n      // app.swiper.get(\"#main-swiper\").update();\n\n      if (window.outerWidth > this.params.leftPanelVisibleBreakpoint) {\n        leftPanel.open();\n      }\n    }\n\n    //Může být theme-default,theme-dark nebo auto\n  }, {\n    key: \"setTheme\",\n    value: function setTheme(theme) {\n      var app = this.app;\n      var bookSettings = this;\n      bookSettings.params.colorTheme = theme;\n      //debugger\n\n      $$(\"html\").removeClass(\"theme-dark theme-default\");\n      if (theme === \"auto\") {\n        bookSettings.enableAutoDarkMode();\n      } else {\n        bookSettings.disableAutoDarkMode();\n        $$(\"html\").addClass(theme);\n      }\n    }\n\n    //Může být theme-default,theme-dark nebo auto\n  }, {\n    key: \"getCurrentThemeSettings\",\n    value: function getCurrentThemeSettings() {\n      var app = this.app;\n      var bs = this;\n      if (bs.params.colorTheme === \"auto\") {\n        return \"auto\";\n      } else {\n        var classes = $$(\"html\").attr(\"class\");\n        var res = classes.match(/theme-(\\S+)\\s?/g);\n        if (!res) {\n          res = \"theme-light\";\n          //alert('1 '+ res)\n        } else {\n          res = res[0].trim();\n          //alert('2 '+ res)\n        }\n        return res;\n      }\n    }\n  }, {\n    key: \"getCurrentThemeName\",\n    value: function getCurrentThemeName() {\n      var app = this.app;\n      var bs = this;\n      var classes = $$(\"html\").attr(\"class\");\n      var res = classes.match(/theme-(\\S+)\\s?/g);\n      if (!res) {\n        res = \"theme-default\";\n        //alert('1 '+ res)\n      } else {\n        res = res[0].trim();\n        //alert('2 '+ res)\n      }\n      if (res === \"theme-default\") {\n        return \"Světlé zobrazení\";\n      } else {\n        return \"Tmavé zobrazení\";\n      }\n    }\n  }, {\n    key: \"notifyAutoDarkIsEnabled\",\n    value: function notifyAutoDarkIsEnabled() {\n      var app = this.app;\n      var bs = this;\n      var toastWithCallback = app.toast.create({\n        text: 'Byl automaticky aktivován noční režim. <a id=\"set\" href=\"#\">Nastavení</a>',\n        closeButton: false,\n        closeTimeout: 4000,\n        closeButtonText: \"Nastavení\"\n      });\n      setTimeout(function () {\n        toastWithCallback.$el.find(\"#set\").on(\"click\", function () {\n          var leftView = app.views.get($$(\".view-left\"));\n          var path = \"/color-themes/\";\n          leftView.router.navigate(path, {\n            reloadCurrent: true,\n            ignoreCache: true\n          });\n          var leftPanel = app.panel.get(\".panel-left\");\n          leftPanel.open();\n        });\n        toastWithCallback.open();\n      }, 5000);\n    }\n  }, {\n    key: \"enableAutoDarkMode\",\n    value: function enableAutoDarkMode() {\n      var app = this.app;\n      var bs = this;\n      app.enableAutoDarkTheme();\n      app.on(\"darkThemeChange\", function (isDark) {\n        var $root = app.root;\n        if (isDark) {\n          //alert('color scheme changed to Dark')\n          // $root.find('input[value=\"theme-dark\"]').attr('checked', 'checked');\n          bs.notifyAutoDarkIsEnabled();\n        } else {\n          //alert('color scheme changed to light theme-default')\n          // $root.find('input[value=\"theme-default\"]').attr('checked', 'checked');\n        }\n      });\n      if (app.darkTheme) {\n        bs.notifyAutoDarkIsEnabled();\n      }\n    }\n  }, {\n    key: \"disableAutoDarkMode\",\n    value: function disableAutoDarkMode() {\n      var app = this.app;\n      var bs = this;\n      app.disableAutoDarkTheme();\n      app.off(\"darkThemeChange\");\n    }\n  }]);\n}();\n/* harmony default export */ var book_settings_bookSettings = ({\n  name: \"bookSettings\",\n  params: {\n    bookSettings: {\n      hideLeftMenu: true,\n      hidePannel: false,\n      leftPanelVisibleBreakpoint: 1080,\n      colorTheme: \"theme-default\",\n      translationIcon: \"g_translate\",\n      showTranslation: true,\n      hideLeftMenuOnRedirect: false,\n      lang: {\n        cs: {\n          hideTopPanel: \"Skrývat horní panel\",\n          keepLeftMenu: \"Nechat zobrazené levé menu\"\n        },\n        en: {\n          hideTopPanel: \"Hide the top panel\",\n          keepLeftMenu: \"Keep shown the left menu\"\n        }\n      }\n    }\n  },\n  static: {\n    user: bookSettings_BookSettings\n  },\n  create: function create(params) {\n    var app = this;\n    app.routes.push({\n      name: \"Nastavení Výchozí\",\n      path: \"/settings-default/\",\n      component: settings_default_f7\n    });\n    app.bookSettings = new bookSettings_BookSettings(app, params);\n\n    // app.data.user = app.user;\n  }\n});\n// CONCATENATED MODULE: ./node_modules/ssr-window/ssr-window.esm.js\n/**\n * SSR Window 3.0.0\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2020, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: November 9, 2020\n */\n/* eslint-disable no-param-reassign */\nfunction ssr_window_esm_isObject(obj) {\n    return (obj !== null &&\n        typeof obj === 'object' &&\n        'constructor' in obj &&\n        obj.constructor === Object);\n}\nfunction ssr_window_esm_extend(target, src) {\n    if (target === void 0) { target = {}; }\n    if (src === void 0) { src = {}; }\n    Object.keys(src).forEach(function (key) {\n        if (typeof target[key] === 'undefined')\n            target[key] = src[key];\n        else if (ssr_window_esm_isObject(src[key]) &&\n            ssr_window_esm_isObject(target[key]) &&\n            Object.keys(src[key]).length > 0) {\n            ssr_window_esm_extend(target[key], src[key]);\n        }\n    });\n}\n\nvar ssrDocument = {\n    body: {},\n    addEventListener: function () { },\n    removeEventListener: function () { },\n    activeElement: {\n        blur: function () { },\n        nodeName: '',\n    },\n    querySelector: function () {\n        return null;\n    },\n    querySelectorAll: function () {\n        return [];\n    },\n    getElementById: function () {\n        return null;\n    },\n    createEvent: function () {\n        return {\n            initEvent: function () { },\n        };\n    },\n    createElement: function () {\n        return {\n            children: [],\n            childNodes: [],\n            style: {},\n            setAttribute: function () { },\n            getElementsByTagName: function () {\n                return [];\n            },\n        };\n    },\n    createElementNS: function () {\n        return {};\n    },\n    importNode: function () {\n        return null;\n    },\n    location: {\n        hash: '',\n        host: '',\n        hostname: '',\n        href: '',\n        origin: '',\n        pathname: '',\n        protocol: '',\n        search: '',\n    },\n};\nfunction getDocument() {\n    var doc = typeof document !== 'undefined' ? document : {};\n    ssr_window_esm_extend(doc, ssrDocument);\n    return doc;\n}\n\nvar ssrWindow = {\n    document: ssrDocument,\n    navigator: {\n        userAgent: '',\n    },\n    location: {\n        hash: '',\n        host: '',\n        hostname: '',\n        href: '',\n        origin: '',\n        pathname: '',\n        protocol: '',\n        search: '',\n    },\n    history: {\n        replaceState: function () { },\n        pushState: function () { },\n        go: function () { },\n        back: function () { },\n    },\n    CustomEvent: function CustomEvent() {\n        return this;\n    },\n    addEventListener: function () { },\n    removeEventListener: function () { },\n    getComputedStyle: function () {\n        return {\n            getPropertyValue: function () {\n                return '';\n            },\n        };\n    },\n    Image: function () { },\n    Date: function () { },\n    screen: {},\n    setTimeout: function () { },\n    clearTimeout: function () { },\n    matchMedia: function () {\n        return {};\n    },\n    requestAnimationFrame: function (callback) {\n        if (typeof setTimeout === 'undefined') {\n            callback();\n            return null;\n        }\n        return setTimeout(callback, 0);\n    },\n    cancelAnimationFrame: function (id) {\n        if (typeof setTimeout === 'undefined') {\n            return;\n        }\n        clearTimeout(id);\n    },\n};\nfunction getWindow() {\n    var win = typeof window !== 'undefined' ? window : {};\n    ssr_window_esm_extend(win, ssrWindow);\n    return win;\n}\n\n\n\n// CONCATENATED MODULE: ./src/core/override/_resizable-grid/grid.js\n\n\n// import { extend } from \"framework7-v575/utils/utils\";\n\nfunction getElMinSize(dimension, $el) {\n  var minSize = $el.css(\"min-\".concat(dimension));\n  if (minSize === \"auto\" || minSize === \"none\") {\n    minSize = 0;\n  } else if (minSize.indexOf(\"px\") >= 0) {\n    minSize = parseFloat(minSize);\n  } else if (minSize.indexOf(\"%\") >= 0) {\n    minSize = $el.parent()[0][dimension === \"height\" ? \"offsetHeight\" : \"offsetWidth\"] * parseFloat(minSize) / 100;\n  }\n  return minSize;\n}\nfunction getElMaxSize(dimension, $el) {\n  var maxSize = $el.css(\"max-\".concat(dimension));\n  if (maxSize === \"auto\" || maxSize === \"none\") {\n    maxSize = null;\n  } else if (maxSize.indexOf(\"px\") >= 0) {\n    maxSize = parseFloat(maxSize);\n  } else if (maxSize.indexOf(\"%\") >= 0) {\n    maxSize = $el.parent()[0][dimension === \"height\" ? \"offsetHeight\" : \"offsetWidth\"] * parseFloat(maxSize) / 100;\n  }\n  return maxSize;\n}\nvar Grid = {\n  init: function init() {\n    var app = this;\n    var isTouched;\n    var isMoved;\n    var touchStartX;\n    var touchStartY;\n    var $resizeHandlerEl;\n    var $prevResizableEl;\n    var $nextResizableEl;\n    var prevElSize;\n    var prevElMinSize;\n    var prevElMaxSize;\n    var nextElSize;\n    var nextElMinSize;\n    var nextElMaxSize;\n    var parentSize;\n    var itemsInFlow;\n    var gapSize;\n    var isScrolling;\n    function handleTouchStart(e) {\n      if (isTouched || isMoved) return;\n      $resizeHandlerEl = Object(dom7_module[\"default\"])(e.target).closest(\".resize-handler\");\n      touchStartX = e.type === \"touchstart\" ? e.targetTouches[0].pageX : e.pageX;\n      touchStartY = e.type === \"touchstart\" ? e.targetTouches[0].pageY : e.pageY;\n      isTouched = true;\n      $prevResizableEl = undefined;\n      $nextResizableEl = undefined;\n      isScrolling = undefined;\n    }\n    function handleTouchMove(e) {\n      if (!isTouched) return;\n      var isRow = $resizeHandlerEl.parent(\".row\").length === 1;\n      var sizeProp = isRow ? \"height\" : \"width\";\n      var getSizeProp = isRow ? \"offsetHeight\" : \"offsetWidth\";\n      if (!isMoved) {\n        $prevResizableEl = $resizeHandlerEl.parent(isRow ? \".row\" : \".col\");\n        if ($prevResizableEl.length && (!$prevResizableEl.hasClass(\"resizable\") || $prevResizableEl.hasClass(\"resizable-fixed\"))) {\n          $prevResizableEl = $prevResizableEl.prevAll(\".resizable:not(.resizable-fixed)\").eq(0);\n        }\n        $nextResizableEl = $prevResizableEl.next(isRow ? \".row\" : \".col\");\n        if ($nextResizableEl.length && (!$nextResizableEl.hasClass(\"resizable\") || $nextResizableEl.hasClass(\"resizable-fixed\"))) {\n          $nextResizableEl = $nextResizableEl.nextAll(\".resizable:not(.resizable-fixed)\").eq(0);\n        }\n        if ($prevResizableEl.length) {\n          prevElSize = $prevResizableEl[0][getSizeProp];\n          prevElMinSize = getElMinSize(sizeProp, $prevResizableEl);\n          prevElMaxSize = getElMaxSize(sizeProp, $prevResizableEl);\n          parentSize = $prevResizableEl.parent()[0][getSizeProp];\n          itemsInFlow = $prevResizableEl.parent().children(isRow ? \".row\" : '[class*=\"col-\"], .col').length;\n          gapSize = parseFloat($prevResizableEl.css(isRow ? \"--f7-grid-row-gap\" : \"--f7-grid-gap\"));\n        }\n        if ($nextResizableEl.length) {\n          nextElSize = $nextResizableEl[0][getSizeProp];\n          nextElMinSize = getElMinSize(sizeProp, $nextResizableEl);\n          nextElMaxSize = getElMaxSize(sizeProp, $nextResizableEl);\n          if (!$prevResizableEl.length) {\n            parentSize = $nextResizableEl.parent()[0][getSizeProp];\n            itemsInFlow = $nextResizableEl.parent().children(isRow ? \".row\" : '[class*=\"col-\"], .col').length;\n            gapSize = parseFloat($nextResizableEl.css(isRow ? \"--f7-grid-row-gap\" : \"--f7-grid-gap\"));\n          }\n        }\n      }\n      isMoved = true;\n      var touchCurrentX = e.type === \"touchmove\" ? e.targetTouches[0].pageX : e.pageX;\n      var touchCurrentY = e.type === \"touchmove\" ? e.targetTouches[0].pageY : e.pageY;\n      if (typeof isScrolling === \"undefined\" && !isRow) {\n        isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));\n      }\n      if (isScrolling) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      var isAbsolute = $prevResizableEl.hasClass(\"resizable-absolute\") || $nextResizableEl.hasClass(\"resizable-absolute\");\n      var resizeNextEl = !isRow || isRow && !isAbsolute;\n      if (resizeNextEl && !$nextResizableEl.length || !$prevResizableEl.length) {\n        isTouched = false;\n        isMoved = false;\n        return;\n      }\n      e.preventDefault();\n      var diff = isRow ? touchCurrentY - touchStartY : touchCurrentX - touchStartX;\n      var prevElNewSize;\n      var nextElNewSize;\n      if ($prevResizableEl.length) {\n        prevElNewSize = prevElSize + diff;\n        if (prevElNewSize < prevElMinSize) {\n          prevElNewSize = prevElMinSize;\n          diff = prevElNewSize - prevElSize;\n        }\n        if (prevElMaxSize && prevElNewSize > prevElMaxSize) {\n          prevElNewSize = prevElMaxSize;\n          diff = prevElNewSize - prevElSize;\n        }\n      }\n      if ($nextResizableEl.length && resizeNextEl) {\n        nextElNewSize = nextElSize - diff;\n        if (nextElNewSize < nextElMinSize) {\n          nextElNewSize = nextElMinSize;\n          diff = nextElSize - nextElNewSize;\n          prevElNewSize = prevElSize + diff;\n        }\n        if (nextElMaxSize && nextElNewSize > nextElMaxSize) {\n          nextElNewSize = nextElMaxSize;\n          diff = nextElSize - nextElNewSize;\n          prevElNewSize = prevElSize + diff;\n        }\n      }\n      if (isAbsolute) {\n        $prevResizableEl[0].style[sizeProp] = \"\".concat(prevElNewSize, \"px\");\n        if (resizeNextEl) {\n          $nextResizableEl[0].style[sizeProp] = \"\".concat(nextElNewSize, \"px\");\n        }\n        // $prevResizableEl.trigger('grid:resize');\n        // $nextResizableEl.trigger('grid:resize');\n        app.emit(\"gridResize\", \"50\");\n        app.emit(\"gridResize\", \"52\");\n        return;\n      }\n      var gapAddSize = (itemsInFlow - 1) * gapSize / itemsInFlow;\n      var gapAddSizeCSS = isRow ? \"\".concat(itemsInFlow - 1, \" * var(--f7-grid-row-gap) / \").concat(itemsInFlow) : \"(var(--f7-cols-per-row) - 1) * var(--f7-grid-gap) / var(--f7-cols-per-row)\";\n      var prevElNewSizeNormalized = prevElNewSize + gapAddSize;\n      var nextElNewSizeNormalized = nextElNewSize + gapAddSize;\n      $prevResizableEl[0].style[sizeProp] = \"calc(\".concat(prevElNewSizeNormalized / parentSize * 100, \"% - \").concat(gapAddSizeCSS, \")\");\n      $nextResizableEl[0].style[sizeProp] = \"calc(\".concat(nextElNewSizeNormalized / parentSize * 100, \"% - \").concat(gapAddSizeCSS, \")\");\n      // let xux = (nextElNewSizeNormalized / parentSize) * 100;\n      $prevResizableEl.fux = prevElNewSizeNormalized / parentSize * 100;\n      $nextResizableEl.fux = nextElNewSizeNormalized / parentSize * 100;\n      $prevResizableEl.trigger(\"grid:resize\");\n      $nextResizableEl.trigger(\"grid:resize\");\n      app.emit(\"gridResize\", \"53\");\n      app.emit(\"gridResize\", \"54\");\n    }\n    function handleTouchEnd() {\n      if (!isTouched) return;\n      if (!isMoved) {\n        isTouched = false;\n      }\n      isTouched = false;\n      isMoved = false;\n    }\n    var document = getDocument();\n    Object(dom7_module[\"default\"])(document).on(app.touchEvents.start, \".col > .resize-handler, .row > .resize-handler\", handleTouchStart);\n    app.on(\"touchmove\", handleTouchMove);\n    app.on(\"touchend\", handleTouchEnd);\n  }\n};\n/* harmony default export */ var grid = ({\n  name: \"grid\",\n  create: function create() {\n    var app = this;\n    utils[\"default\"].extend(app, {\n      grid: {\n        init: Grid.init.bind(app)\n      }\n    });\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      app.grid.init();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/book/book.js\nvar book_book = __webpack_require__(\"./src/core/custom_plugins/book/book.js\");\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js\nvar asyncToGenerator = __webpack_require__(\"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\nvar asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js\nvar regenerator = __webpack_require__(\"./node_modules/@babel/runtime/regenerator/index.js\");\nvar regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);\n\n// EXTERNAL MODULE: ./node_modules/bowser/es5.js\nvar es5 = __webpack_require__(\"./node_modules/bowser/es5.js\");\nvar es5_default = /*#__PURE__*/__webpack_require__.n(es5);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/browser-support/browser-support.js\n\n\n\n\n\n\nvar browser_support_BrowserSupport = /*#__PURE__*/function () {\n  function BrowserSupport(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, BrowserSupport);\n    this.app = app;\n    var support = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.browserSupport, params);\n    support.params = extendedParams;\n    support.params.browser = es5_default.a.getParser(window.navigator.userAgent);\n    app.on(\"init\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n      var browserName;\n      return regenerator_default.a.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            _context.next = 2;\n            return support.checkIfSupported();\n          case 2:\n            support.params.isSupported = _context.sent;\n            browserName = support.params.browser.parsedResult.browser.name.toLowerCase();\n            $$(\"html\").addClass(\"browser-\".concat(browserName));\n            if (!support.params.isSupported) {\n              app.dialog.alert(app.translation.t(\"support:text\"), app.translation.t(\"support:title\"));\n            }\n            app.translation.addResourceBundle(\"cs\", \"support\", app.browserSupport.params.lang.cs);\n            app.translation.addResourceBundle(\"en\", \"support\", app.browserSupport.params.lang.en);\n          case 8:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    })));\n    this.checkIfSupported = this.checkIfSupported.bind(this);\n  }\n  return createClass_default()(BrowserSupport, [{\n    key: \"checkIfSupported\",\n    value: function () {\n      var _checkIfSupported = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n        var self;\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              self = this;\n              return _context2.abrupt(\"return\", self.params.browser.satisfies({\n                mobile: {\n                  chrome: \">=97\",\n                  firefox: \">=89\",\n                  opera: \">=66\",\n                  safari: \">=15\"\n                },\n                tablet: {\n                  chrome: \">=97\",\n                  firefox: \">=89\",\n                  opera: \">=66\",\n                  safari: \">=15\"\n                },\n                desktop: {\n                  edge: \">= 88\",\n                  chrome: \">=88\",\n                  firefox: \">=89\",\n                  opera: \">=74\",\n                  safari: \">=15\"\n                }\n              }));\n            case 2:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function checkIfSupported() {\n        return _checkIfSupported.apply(this, arguments);\n      }\n      return checkIfSupported;\n    }()\n  }]);\n}();\n/* harmony default export */ var browser_support = ({\n  name: \"Book BrowserSupport\",\n  params: {\n    browserSupport: {\n      browser: {},\n      isSupported: true,\n      lang: {\n        cs: {\n          title: \"Nepodporovaná verze prohlížeče\",\n          text: \"Používáte nepodporovanou verzi prohlížeče, některé funkce knihy nemusí být dostupné nebo nemusí fungovat správně.\"\n        },\n        en: {\n          title: \"Your browser is not supported\",\n          text: \"You are using an unsupported browser version, some features of the book may not be available or may not work properly.\"\n        }\n      }\n    }\n  },\n  static: {\n    BrowserSupport: browser_support_BrowserSupport\n  },\n  create: function create() {\n    var app = this;\n    app.browserSupport = new browser_support_BrowserSupport(app);\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/book-reading-position/reading-position.js\n\n\n\n\n//TODO offline stažení\n\n\nvar reading_position_ReadingPosition = /*#__PURE__*/function () {\n  function ReadingPosition(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, ReadingPosition);\n    this.app = app;\n    var readingPosition = this;\n    var intervalCounter = null;\n    var oldScroll = -1;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.readingPosition, params);\n    readingPosition.params = extendedParams;\n    app.on(\"init\", function () {\n      // debugger;\n      if (readingPosition.params.enabled) {\n        // if(!readingPosition.params.enabled){\n        app.data.myEvents.on(\"page:show\", function (page) {\n          if (!readingPosition.app.params.builder.development.enable) {\n            // if (readingPosition.app.params.builder.development.enable) {\n\n            // readingPosition.sendReadData(page);\n\n            clearInterval(intervalCounter);\n            oldScroll = -1;\n            intervalCounter = setInterval(function () {\n              var currScroll = app.book.scrollProgress[page.url];\n              if (!currScroll) {\n                currScroll = 0;\n              }\n              if (Math.floor(oldScroll) != Math.floor(currScroll)) {\n                oldScroll = currScroll;\n                if (!readingPosition.params.initialPageLoad) {\n                  readingPosition.sendReadData(page, currScroll);\n                }\n              }\n            }, 2000);\n          }\n        });\n        app.data.myEvents.on(\"message:auth\", function (token, user) {\n          var interval = setInterval(function () {\n            if (app.book.initialUrl) {\n              clearInterval(interval);\n              readingPosition.getReadData();\n            }\n          }, 1000);\n        });\n      }\n\n      // app.data.myEvents.on(\"builder:ready\", (e) => {\n      //   //Pouze ve verzi pro čtení\n      //   if (this.app.params.builder.development.enable) {\n      //     //Pouze prvotní kontrola zda je kniha rozečtena\n      //     if (this.initialPageLoad) {\n      //       this.initialPageLoad = false;\n      //       this.getReadData(currentPage);\n      //     } else {\n      //       this.sendReadData(currentPage); //aktualizace pozice v knize\n      //     }\n      // }\n      // });\n    });\n    this.getReadData = this.getReadData.bind(this);\n    this.sendReadData = this.sendReadData.bind(this);\n    this.restorePosition = this.restorePosition.bind(this);\n  }\n  return createClass_default()(ReadingPosition, [{\n    key: \"getReadData\",\n    value: function () {\n      var _getReadData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n        var _this = this;\n        var app, self, currPage, response, data, index, toast;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              app = this.app;\n              self = this;\n              if (!app.user.isLoggedBool) {\n                _context.next = 21;\n                break;\n              }\n              currPage = app.book.getSlideByUrl(app.book.initialUrl);\n              _context.next = 6;\n              return app.utils.axios.get(app.apiManager.params.getReadData + \"/\" + app.id, {\n                withCredentials: true\n              });\n            case 6:\n              response = _context.sent;\n              if (!(response.status == 200 && response.data.hasOwnProperty(\"data\"))) {\n                _context.next = 21;\n                break;\n              }\n              data = response.data.data;\n              if (!data) {\n                _context.next = 20;\n                break;\n              }\n              if (!(currPage.id != data.chapter_id)) {\n                _context.next = 15;\n                break;\n              }\n              index = _.findIndex(app.book.getBookChaptersFlatten(), function (o) {\n                return o.id == data.chapter_id;\n              });\n              if (this.params.showToastAfterLogin) {\n                toast = app.toast.create({\n                  text: \"<div class=\\\"moveToUserReaded\\\" style=\\\"cursor:pointer;\\\">P\\u0159ejete si pokra\\u010Dovat ve \\u010Dten\\xED kapitoly: \" + \"<div>\".concat(data.name, \" \").concat(parseFloat(data.scroll_position).toFixed(0) > 0 ? \"[\".concat(parseFloat(data.scroll_position).toFixed(0), \"%]\") : '', \" (\").concat(data.pos, \"/\").concat(data.book_length, \") </div>\") + \"<p><strong>Ano pokra\\u010Dovat</strong></p></div>\",\n                  closeButton: true,\n                  closeButtonText: \"<i class=\\\"icon material-icons\\\" style=\\\"color:white;\\\" data-type=\\\"material-icons\\\" data-icon=\\\"close\\\"></i>\",\n                  horizontalPosition: \"center\",\n                  position: \"top\"\n                });\n                toast.open();\n                //pustit až po scrollu\n                self.params.initialPageLoad = false;\n                $$(\".moveToUserReaded\").off(\"click\");\n                $$(\".moveToUserReaded\").on(\"click\", function () {\n                  // app.book.scrollProgress[data.path] = data.scroll_position;\n                  app.data.myEvents.off(\"page:show\", function (page) {\n                    return _this.restorePosition(data, page);\n                  });\n                  app.data.myEvents.on(\"page:show\", function (page) {\n                    return _this.restorePosition(data, page);\n                  });\n                  app.swiper.get(\"#main-swiper\").slideTo(index, 300);\n\n                  //  div.scrollTop =\n\n                  toast.close();\n                });\n              }\n              _context.next = 18;\n              break;\n            case 15:\n              _context.next = 17;\n              return this.restorePosition(data);\n            case 17:\n              //pustit až po scrollu na aktualní stránce\n              // //console.log(\"afterScroll\");\n              self.params.initialPageLoad = false;\n            case 18:\n              _context.next = 21;\n              break;\n            case 20:\n              //pustit poku nejsou data\n              self.params.initialPageLoad = false;\n            case 21:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function getReadData() {\n        return _getReadData.apply(this, arguments);\n      }\n      return getReadData;\n    }()\n  }, {\n    key: \"restorePosition\",\n    value: function () {\n      var _restorePosition = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(data) {\n        var page,\n          div,\n          imgs,\n          loaded,\n          scrollPos,\n          _args2 = arguments;\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              page = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;\n              div = null;\n              if (page) {\n                div = page.$el.parent(\".swiper-slide\")[0];\n              } else {\n                div = $$(\".swiper-slide-active\")[0];\n              }\n              imgs = $$(div).find(\"img\");\n              loaded = 0;\n              if (!(page && imgs.length > 0)) {\n                _context2.next = 9;\n                break;\n              }\n              imgs.on(\"load\", function (o) {\n                loaded++;\n                if (loaded == imgs.length) {\n                  var scrollPos = (div.scrollHeight - div.clientHeight) * (parseFloat(data.scroll_position) / 100);\n                  div.scrollTo({\n                    top: scrollPos,\n                    behavior: \"smooth\"\n                  });\n                  return true;\n                }\n              });\n              _context2.next = 12;\n              break;\n            case 9:\n              scrollPos = (div.scrollHeight - div.clientHeight) * (parseFloat(data.scroll_position) / 100);\n              div.scrollTo({\n                top: scrollPos,\n                behavior: \"smooth\"\n              });\n              //LOAD SCROLLING\n              // //console.log(\"inScroll\");\n              return _context2.abrupt(\"return\", true);\n            case 12:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2);\n      }));\n      function restorePosition(_x) {\n        return _restorePosition.apply(this, arguments);\n      }\n      return restorePosition;\n    }()\n  }, {\n    key: \"sendReadData\",\n    value: function () {\n      var _sendReadData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(pageObj, currScroll) {\n        var app, currPage, allChapters, length, position, fData, response;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              app = this.app;\n              currPage = app.book.getSlideByUrl(pageObj.url);\n              allChapters = app.book.getBookChaptersFlatten();\n              length = allChapters.length;\n              position = _.findIndex(allChapters, function (o) {\n                return currPage.id == o.id;\n              });\n              if (!app.user.isLoggedBool) {\n                _context3.next = 18;\n                break;\n              }\n              fData = new FormData();\n              fData.append(\"bookId\", app.id);\n              fData.append(\"name\", currPage.name);\n              fData.append(\"pos\", position + 1); // Zanoření???\n              fData.append(\"date\", new Date().getTime());\n              fData.append(\"chapterId\", currPage.id);\n              fData.append(\"path\", currPage.path);\n              fData.append(\"bookLength\", length);\n              fData.append(\"scroll_position\", currScroll);\n              _context3.next = 17;\n              return app.utils.axios.post(app.apiManager.params.saveReadData, fData, {\n                withCredentials: true\n              });\n            case 17:\n              response = _context3.sent;\n            case 18:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function sendReadData(_x2, _x3) {\n        return _sendReadData.apply(this, arguments);\n      }\n      return sendReadData;\n    }()\n  }]);\n}();\n/* harmony default export */ var reading_position = ({\n  name: \"readingPosition\",\n  params: {\n    readingPosition: {\n      enabled: false,\n      showToastAfterLogin: true,\n      initialPageLoad: true\n    }\n  },\n  create: function create() {\n    var app = this;\n    app.readingPosition = new reading_position_ReadingPosition(app);\n  },\n  clicks: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/highlights-comments/highlights-comments.less\nvar highlights_comments = __webpack_require__(\"./src/core/custom_plugins/highlights-comments/highlights-comments.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/group-comments-list.f7.html\n\n      \n      const Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var group_comments_list_f7 = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      highlights: null,\n      app: this.$app,\n      bookCahpters: this.$app.bookChapters,\n      isLogged: app.user.isLogged()\n    };\n  },\n  methods: {\n    loadHighlights: async function (selPos, filter = null) {\n      let app = this.$app;\n      let lodash = app.database.lodash();\n      let highlights = await app.highlightComments.getAllHighlights();\n      highlights = lodash.filter(highlights, { 'type': 'gc' });\n      if (filter) {\n        highlights = lodash.filter(highlights, JSON.parse(filter));\n      }\n      highlights = lodash.orderBy(highlights, [\n        'pagePosition',\n        'selPos'\n      ]);\n      async function asignCounts() {\n        let i;\n        let notes = await (await app.database.table('notes-select-gc')).getAll();\n        for (i = 0; i < highlights.length; i++) {\n          let value = highlights[i];\n          let count = _.filter(notes, {\n            'parent_js_id': parseInt(value.js_id),\n            'readed': 0\n          });\n          if (count) {\n            count = count.length;\n          }\n          value['unread_count'] = count;\n          let totalCount = _.filter(notes, { 'parent_js_id': parseInt(value.js_id) });\n          if (totalCount) {\n            totalCount = totalCount.length;\n          }\n          value['total_count'] = totalCount;\n        }\n      }\n      await asignCounts();\n      if (!highlights.length) {\n        highlights = null;\n      }\n      this.$setState({ highlights: highlights });\n    },\n    removeHighlight: async function (id) {\n      let app = this.app;\n      let myId = parseInt(id);\n      this.$app.highlightComments.removeHighlight(myId);\n    },\n    navigateRole: function () {\n      let app = this.app;\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.open();\n      let leftView = app.views.get($$('.view-left'));\n      let path = '/user-role/';\n      leftView.router.navigate(path, {\n        reloadCurrent: true,\n        ignoreCache: true\n      });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let c = this;\n      this.loadHighlights();\n      app.data.myEvents.off('highlights:change');\n      app.data.myEvents.on('highlights:change', function () {\n        if (typeof c.loadHighlights !== 'undefined') {\n          c.loadHighlights();\n        }\n      });\n      app.data.myEvents.off('highlight:wsupdate');\n      app.data.myEvents.on('highlight:wsupdate', function (item) {\n        if (typeof c.loadHighlights !== 'undefined') {\n          c.loadHighlights();\n        }\n      });\n    }\n  },\n  id: '2f6239ee6a',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"/left-menu/\" class=\"link back\">\\n            <i class=\"f7-icons\">chevron_left</i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Skupinové komentáře</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n      ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.isLogged, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      ';\n          r += Template7Helpers.if.call(ctx_2, ctx_2.$app.user.isEditor, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n      ';\n              r += Template7Helpers.js_if.call(ctx_3, 'this.highlights != null', {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n      <div class=\"list media-list chevron-center\">\\n        <ul id=\"hl-list\">\\n          ';\n                  r += Template7Helpers.each.call(ctx_4, ctx_4.highlights, {\n                    hash: {},\n                    data: data_4 || {},\n                    fn: function (ctx_5, data_5) {\n                      var r = '';\n                      r += '\\n\\n          ';\n                      r += Template7Helpers.if.call(ctx_5, ctx_5.resolved, {\n                        hash: {},\n                        data: data_5 || {},\n                        fn: function (ctx_6, data_6) {\n                          var r = '';\n                          r += '\\n          <li style=\"opacity: 0.6;\">\\n            ';\n                          return r;\n                        },\n                        inverse: function (ctx_6, data_6) {\n                          var r = '';\n                          r += '\\n          </li><li>\\n            ';\n                          return r;\n                        },\n                        root: root,\n                        parents: [\n                          ctx_4,\n                          ctx_3,\n                          ctx_2,\n                          ctx_1\n                        ]\n                      });\n                      r += '\\n            <a href=\"/gc-detail/';\n                      r += c(ctx_5.js_id, ctx_5);\n                      r += '/\" class=\"item-link item-content\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title-row\">\\n                  <div class=\"item-title\">';\n                      r += c(ctx_5.pageName, ctx_5);\n                      r += '</div>\\n                  <div class=\"item-after\">\\n\\n                    ';\n                      r += Template7Helpers.if.call(ctx_5, root.$app.user.isLogged(), {\n                        hash: {},\n                        data: data_5 || {},\n                        fn: function (ctx_6, data_6) {\n                          var r = '';\n                          r += '\\n                    ';\n                          r += Template7Helpers.if.call(ctx_6, ctx_6.df, {\n                            hash: {},\n                            data: data_6 || {},\n                            fn: function (ctx_7, data_7) {\n                              var r = '';\n                              r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Čeká na synchronizaci.\">cloud_upload_fill</i>\\n                    ';\n                              return r;\n                            },\n                            inverse: function (ctx_7, data_7) {\n                              var r = '';\n                              r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Synchronizováno se serverem.\">cloud_fill</i>\\n                    ';\n                              return r;\n                            },\n                            root: root,\n                            parents: [\n                              ctx_5,\n                              ctx_4,\n                              ctx_3,\n                              ctx_2,\n                              ctx_1\n                            ]\n                          });\n                          r += '\\n                    ';\n                          return r;\n                        },\n                        inverse: function (ctx_6, data_6) {\n                          var r = '';\n                          r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Pro synchronizaci se nejdříve přihlaste\">person_round</i>\\n                    ';\n                          return r;\n                        },\n                        root: root,\n                        parents: [\n                          ctx_4,\n                          ctx_3,\n                          ctx_2,\n                          ctx_1\n                        ]\n                      });\n                      r += '\\n                    <span style=\"width: 10px; height: 10px; border-radius: 50%\" class=\"';\n                      r += c(ctx_5.color, ctx_5);\n                      r += '\"></span>\\n                  </div>\\n                </div>\\n                <div class=\"item-subtitle\" style=\"font-style: italic;\">';\n                      r += c(ctx_5.text, ctx_5);\n                      r += '</div>\\n                <div class=\"item-text\">\\n                  <span class=\"badge\">';\n                      r += c(ctx_5.total_count, ctx_5);\n                      r += '</span> komentářů.';\n                      r += Template7Helpers.if.call(ctx_5, ctx_5.unread_count, {\n                        hash: {},\n                        data: data_5 || {},\n                        fn: function (ctx_6, data_6) {\n                          var r = '';\n                          r += ' Z\\xA0toho <span class=\"badge color-red\" style=\"color: #fff;\">';\n                          r += c(ctx_6.unread_count, ctx_6);\n                          r += '</span> nepřečtené.';\n                          return r;\n                        },\n                        inverse: function empty() {\n                          return '';\n                        },\n                        root: root,\n                        parents: [\n                          ctx_4,\n                          ctx_3,\n                          ctx_2,\n                          ctx_1\n                        ]\n                      });\n                      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n\\n            ';\n                      return r;\n                    },\n                    inverse: function empty() {\n                      return '';\n                    },\n                    root: root,\n                    parents: [\n                      ctx_3,\n                      ctx_2,\n                      ctx_1\n                    ]\n                  });\n                  r += '\\n        </li></ul>\\n      </div>\\n\\n      ';\n                  return r;\n                },\n                inverse: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n      <div class=\"block\">\\n        <h3>Dosud nemáte žádné skupinové komentáře.</h3>\\n      </div>\\n      ';\n                  return r;\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n      ';\n              return r;\n            },\n            inverse: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n      <div style=\"padding: 10px;\">\\n        <h3 style=\"margin: 0;\">Sdílené komentování</h3>\\n        <div>Tato funkce je dostupná pouze schváleným editorům knihy.</div>\\n        <a @click=\"navigateRole\" href=\"#\" class=\"col button button-small\">Zažádat o\\xA0editorství</a>\\n      </div>\\n      ';\n              return r;\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n      ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <div class=\"list media-list\">\\n        <ul>\\n          <li>\\n            <a id=\"hc-group-login\" href=\"/login/\" data-view=\".view-left\" data-panel=\".panel-left\" class=\"item-link item-content panel-open\">\\n              <div class=\"item-media\">\\n                <i class=\"material-icons\">\\n                  person\\n                </i>\\n              </div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title-row\">\\n                  <div class=\"item-title\">PŘIHLASTE SE</div>\\n\\n                </div>\\n\\n                <div class=\"item-text\" style=\"-webkit-line-clamp: initial; max-height:100px;\">Přihlášením získáte\\n                  možnost komentovat knihu v\\xA0rámci sdílené diskuze.</div>\\n              </div>\\n            </a>\\n          </li>\\n\\n        </ul>\\n      </div>\\n      ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n    </div>\\n\\n  </div>\\n  \\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-2f6239ee6a] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Skupinové komentáře {{#if isLogged}} {{#if $app.user.isEditor}} {{#js_if \"this.highlights != null\"}} {{#each highlights}} {{#if resolved}} {{else}} {{/if}} {{pageName}} {{#if @root.$app.user.isLogged()}} {{#if df}} {{else}} {{/if}} {{else}} {{/if}} {{text}} {{total_count}} komentářů.{{#if unread_count}} Z toho {{unread_count}} nepřečtené.{{/if}} {{/each}} {{else}} Dosud nemáte žádné skupinové komentáře. {{/js_if}} {{else}} Sdílené komentování Tato funkce je dostupná pouze schváleným editorům knihy. Zažádat o editorství {{/if}} {{else}} person PŘIHLASTE SE Přihlášením získáte možnost komentovat knihu v rámci sdílené diskuze. {{/if}} `\n});\n    \n// EXTERNAL MODULE: ./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html\nvar gc_detail_f7 = __webpack_require__(\"./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/annotation-list.f7.html\n\n      \n      const annotation_list_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var annotation_list_f7 = ({\n  data: function () {\n    return {\n      highlights: null,\n      app: this.$app,\n      routes: this.$app.book.getBookChaptersFlatten(),\n      highlightClasses: this.$app.highlightComments.params.highlightClasses\n    };\n  },\n  methods: {\n    loadHighlights: async function (filter = null) {\n      let lodash = this.app.database.lodash();\n      let highlights = await this.$app.highlightComments.getAllHighlights();\n      if (filter) {\n        let i;\n        let types = [];\n        let chapters = [];\n        for (i = 0; i < filter.length; i++) {\n          if (filter[i].includes('type:')) {\n            types.push(filter[i].split('type:')[1]);\n          } else if (filter[i].includes('chapter:')) {\n            chapters.push(filter[i].split('chapter:')[1]);\n          }\n        }\n        highlights = lodash.filter(highlights, function (highlight) {\n          return types.includes(highlight.type) && chapters.includes(highlight.pageUrl);\n        });\n      }\n      highlights = lodash.orderBy(highlights, [\n        'pagePosition',\n        'selPos'\n      ]);\n      this.$setState({ highlights: highlights });\n    },\n    removeHighlight: async function (id) {\n      let app = this.app;\n      let myId = parseInt(id);\n      this.$app.highlightComments.removeHighlight(myId);\n    },\n    detail: async function (id) {\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let c = this;\n      this.loadHighlights();\n      app.data.myEvents.on('highlights:change', function () {\n        c.loadHighlights();\n      });\n      app.data.myEvents.off('highlights:change');\n      app.data.myEvents.on('highlights:change', function (item) {\n        if (typeof c.loadHighlights !== 'undefined') {\n          c.loadHighlights();\n        }\n      });\n      app.data.myEvents.off('highlight:wsupdate');\n      app.data.myEvents.on('highlight:wsupdate', function (item) {\n        if (typeof c.loadHighlights !== 'undefined') {\n          c.loadHighlights();\n        }\n      });\n      let smartSelect = page.app.smartSelect.create({\n        el: page.$el.find('.smart-select'),\n        searchbar: true,\n        pageBackLinkText: 'Provést filtr'\n      });\n      smartSelect.open();\n      smartSelect.on('close', function () {\n        let val = smartSelect.getValue();\n        c.loadHighlights(val);\n      });\n      let val = smartSelect.getValue();\n      app.data.myEvents.on('logged', function () {\n        c.$setState({});\n      });\n    }\n  },\n  id: '42b49a6366',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Nástroje</div>\\n        <div class=\"right\"></div>\\n        <!--<div class=\"subnavbar\">\\n          <div class=\"subnavbar-inner\">\\n            <div class=\"segmented segmented-raised\">\\n              <a class=\"button tab-link tab-link-active\" href=\"#tab1\"><i class=\"f7-icons size-inherit\">tags</i> Zvýraznění</a>\\n              <!-a class=\"button tab-link\" href=\"#tab2\"><i class=\"f7-icons size-inherit\">favorites</i> Zvýraznění</a->\\n              <a class=\"button tab-link\" href=\"#tab3\"><i class=\"f7-icons size-inherit\">favorites_alt</i> Poznámky</a>\\n            </div>\\n          </div>\\n        </div>-->\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <!--<div class=\"tab\" id=\"tab2\">\\n        <div class=\"block\">\\n          <p>Donec iaculis posuere massa sed dignissim...</p>\\n        </div>\\n      </div>\\n      <div class=\"tab\" id=\"tab3\">\\n        <div class=\"block\">\\n          <p>Etiam non interdum erat. Curabitur erat lacus...</p>\\n        </div>\\n      </div>-->\\n\\n      <div id=\"filter\" class=\"list\">\\n        <ul>\\n          <li>\\n            <a class=\"item-link smart-select \" data-open-in=\"page\" data-searchbar=\"true\" data-searchbar-placeholder=\"Search car\">\\n              <select name=\"Filtr\" multiple>\\n                <optgroup label=\"Zobrazit\">\\n                  <option value=\"type:h\" selected>Zvýraznění</option>\\n                  <option value=\"type:c\" selected>Poznámky</option>\\n                </optgroup>\\n                <optgroup label=\"Barvy\">\\n                  ';\n      r += annotation_list_f7_Template7Helpers.each.call(ctx_1, ctx_1.highlightClasses, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                  <option value=\"color:';\n          r += c(ctx_2, ctx_2);\n          r += '\" selected style=\"width: 100%;\" class=\"';\n          r += c(ctx_2, ctx_2);\n          r += '\">\\n                    ';\n          r += c(ctx_2, ctx_2);\n          r += '\\n                  </option>\\n                  ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                </optgroup>\\n                <optgroup label=\"Kapitoly\">\\n                  ';\n      r += annotation_list_f7_Template7Helpers.each.call(ctx_1, ctx_1.routes, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                  <option value=\"chapter:';\n          r += c(ctx_2.path, ctx_2);\n          r += '\" selected>';\n          r += c(ctx_2.name, ctx_2);\n          r += '</option>\\n                  ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                </optgroup>\\n              </select>\\n              <div class=\"item-content\">\\n                <div class=\"item-inner\">\\n                  <div class=\"item-title\">Filtr</div>\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <!--<span @click=\"removeHighlight(\\'{ { id}}\\')\">Odstranit cipe ';\n      r += c(ctx_1.id, ctx_1);\n      r += '</span>-->\\n      <div class=\"list media-list chevron-center\">\\n        <ul id=\"hl-list\">\\n          ';\n      r += annotation_list_f7_Template7Helpers.each.call(ctx_1, ctx_1.highlights, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          <li>\\n            <a class=\"navigate prevent-router item-link item-content\" href=\"';\n          r += c(ctx_2.pageUrl, ctx_2);\n          r += '\" data-highlight-id=\"#h';\n          r += c(ctx_2.js_id, ctx_2);\n          r += '\">\\n              <!--<a href=\"/annotation-detail/';\n          r += c(ctx_2.id, ctx_2);\n          r += '/\"  class=\"item-link item-content\">-->\\n              <div class=\"item-inner\">\\n                <div class=\"item-title-row\">\\n                  <div class=\"item-title\">';\n          r += c(ctx_2.pageName, ctx_2);\n          r += '</div>\\n                  <div class=\"item-after\">\\n\\n                    ';\n          r += annotation_list_f7_Template7Helpers.if.call(ctx_2, root.$app.user.isLogged(), {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n                    ';\n              r += annotation_list_f7_Template7Helpers.if.call(ctx_3, ctx_3.df, {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Čeká na synchronizaci.\">cloud_upload_fill</i>\\n                    ';\n                  return r;\n                },\n                inverse: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Synchronizováno se serverem.\">cloud_fill</i>\\n                    ';\n                  return r;\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n                    ';\n              return r;\n            },\n            inverse: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n                    <i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Pro synchronizaci se nejdříve přihlaste\">person_round</i>\\n                    ';\n              return r;\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n                    <span style=\"width: 10px; height: 10px; border-radius: 50%\" class=\"';\n          r += c(ctx_2.color, ctx_2);\n          r += '\"></span>\\n                  </div>\\n                </div>\\n                <div class=\"item-subtitle\">';\n          r += c(ctx_2.text, ctx_2);\n          r += '</div>\\n                <div class=\"item-text\">';\n          r += c(ctx_2.note, ctx_2);\n          r += '</div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n            ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          </li><li>No properties</li>\\n          ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n        </ul>\\n      </div>\\n\\n\\n      <!-- <a @click=\"loadHighlights\" class=\"red-link\">loadHighlights</a>\\n\\n      <a @click=\"loadHighlights(\\'selPos\\')\" class=\"red-link\">loadHighlights selPos</a>\\n      <a @click=\"loadHighlights(\\'id\\')\" class=\"red-link\">loadHighlights id</a>\\n\\n      <a @click=\"loadHighlights(\\'id\\', \\'{ \\'id\\':2}\\' )\" class=\"red-link\">loadHighlights id = 2</a>\\n-->\\n\\n\\n    </div>\\n\\n  </div>\\n  \\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-42b49a6366] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Nástroje Zvýraznění Zvýraznění Poznámky --> Donec iaculis posuere massa sed dignissim... Etiam non interdum erat. Curabitur erat lacus... --> Zvýraznění Poznámky {{#each highlightClasses}} {{this}} {{/each}} {{#each routes}} {{name}} {{/each}} Filtr {{#each highlights}} {{pageName}} {{#if @root.$app.user.isLogged()}} {{#if df}} {{else}} {{/if}} {{else}} {{/if}} {{text}} {{note}} {{else}} No properties {{/each}} loadHighlights loadHighlights selPos loadHighlights id loadHighlights id = 2 --> `\n});\n    \n// EXTERNAL MODULE: ./src/core/custom_plugins/highlights-comments/templates/info.f7.html\nvar info_f7 = __webpack_require__(\"./src/core/custom_plugins/highlights-comments/templates/info.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/annotations-detail.f7.html\n\n      \n      const annotations_detail_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var annotations_detail_f7 = ({\n  data: function () {\n    return { currentHighlight: null };\n  },\n  methods: {\n    getCurrentHighlight: async function (id) {\n      let ch = await this.$app.highlightComments.getHighlightById(parseInt(id));\n      this.$setState({ currentHighlight: ch });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let params = page.router.currentRoute.params;\n      let hid = params.id;\n      let c = this;\n      c.getCurrentHighlight(hid);\n    }\n  },\n  id: '91a3453b97',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Štítek</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <textarea class=\"resizable\"></textarea>\\n\\n\\n      ';\n      r += annotations_detail_f7_Template7Helpers.if.call(ctx_1, ctx_1.currentHighlight, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      ';\n          r += c(ctx_2.currentHighlight.id, ctx_2);\n          r += '\\n\\n      <h1>';\n          r += c(ctx_2.currentHighlight.name, ctx_2);\n          r += '</h1>\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      <!--<div class=\"list media-list chevron-center\">-->\\n      <!--<ul>-->\\n      <!--<li>-->\\n      <!--<a href=\"#\" class=\"item-link item-content\">-->\\n      <!--<div class=\"item-inner\">-->\\n      <!--<div class=\"item-title-row\">-->\\n      <!--<div class=\"item-title\">Uvedení do problematiky</div>-->\\n      <!--<div class=\"item-after\"><i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Synchronizováno se serverem.\">cloud_fill</i></div>-->\\n      <!--</div>-->\\n      <!--<div class=\"item-subtitle\">Zvýrazněná část v&nbsp;kapitole Uvedení do problematiky. Obsahově se věnuje poněkud opomíjené oblasti didaktiky lexikologie a&nbsp;lexikografie, a&nbsp;naopak leckdy hypertrofované výuce lexikálního pravopisu a&nbsp;morfologie.</div>-->\\n      <!--<div class=\"item-text\">Poznámka k&nbsp;zvýrazněné části v&nbsp;kapitole Uvedení do problematiky. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sagittis tellus ut turpis condimentum, ut dignissim lacus tincidunt. Cras dolor metus, ultrices condimentum sodales sit amet, pharetra sodales eros. Phasellus vel felis tellus. Mauris rutrum ligula nec dapibus feugiat. In vel dui laoreet, commodo augue id, pulvinar lacus.</div>-->\\n      <!--</div>-->\\n      <!--</a>-->\\n      <!--</li>-->\\n\\n      <!--</ul>-->\\n      <!--</div>-->\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-91a3453b97] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Štítek {{#if currentHighlight}} {{currentHighlight.id}} {{currentHighlight.name}} {{/if}} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/insert-comment.f7.html\n/* harmony default export */ var insert_comment_f7 = ({\n  data: function () {\n    var colors = {\n      red: 'Červená',\n      green: 'Zelená',\n      blue: 'Modrá',\n      pink: 'Růžová',\n      yellow: 'Žlutá',\n      orange: 'Oranžová',\n      gray: 'Šedá',\n      black: 'Černá',\n      brown: 'brown'\n    };\n    return {\n      colors: colors,\n      colorsAmount: colors.length\n    };\n  },\n  methods: {\n    setLayoutTheme: function (theme) {\n      var self = this;\n      var app = self.$app;\n      app.root.removeClass('theme-dark theme-light').addClass('theme-' + theme);\n    },\n    setColorTheme: function (color) {\n      var self = this;\n      var app = self.$app;\n      var currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n      if (currentColorClass)\n        app.root.removeClass(currentColorClass[0]);\n      app.root.addClass('color-theme-' + color);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      var $body = $$('body');\n      var range = app.range.create({\n        el: '.range-slider',\n        on: {\n          change: function (range) {\n            $body.css('zoom', range.value);\n          }\n        }\n      });\n    }\n  },\n  id: 'e6f822a38b',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Vložit komentář</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <div class=\"block\">\\n        <h3>Napiště svůj komentář</h3>\\n        <textarea class=\"resizable comments\"></textarea>\\n        <br>\\n        <button class=\"col button button-fill button-round\">Uložit</button>\\n      </div>\\n\\n      <!--<div class=\"list media-list chevron-center\">-->\\n      <!--<ul>-->\\n      <!--<li>-->\\n      <!--<a href=\"#\" class=\"item-link item-content\">-->\\n      <!--<div class=\"item-inner\">-->\\n      <!--<div class=\"item-title-row\">-->\\n      <!--<div class=\"item-title\">Uvedení do problematiky</div>-->\\n      <!--<div class=\"item-after\"><i class=\"f7-icons tooltip-init\" style=\"font-size: 16px;\" data-tooltip=\"Synchronizováno se serverem.\">cloud_fill</i></div>-->\\n      <!--</div>-->\\n      <!--<div class=\"item-subtitle\">Zvýrazněná část v&nbsp;kapitole Uvedení do problematiky. Obsahově se věnuje poněkud opomíjené oblasti didaktiky lexikologie a&nbsp;lexikografie, a&nbsp;naopak leckdy hypertrofované výuce lexikálního pravopisu a&nbsp;morfologie.</div>-->\\n      <!--<div class=\"item-text\">Poznámka k&nbsp;zvýrazněné části v&nbsp;kapitole Uvedení do problematiky. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sagittis tellus ut turpis condimentum, ut dignissim lacus tincidunt. Cras dolor metus, ultrices condimentum sodales sit amet, pharetra sodales eros. Phasellus vel felis tellus. Mauris rutrum ligula nec dapibus feugiat. In vel dui laoreet, commodo augue id, pulvinar lacus.</div>-->\\n      <!--</div>-->\\n      <!--</a>-->\\n      <!--</li>-->\\n\\n      <!--</ul>-->\\n      <!--</div>-->\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-e6f822a38b] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Vložit komentář Napiště svůj komentář Uložit `\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/popover/default.f7.html\n/* harmony default export */ var default_f7 = ({\n  data: function () {\n    return {\n      highlights: null,\n      app: this.$app,\n      count: 0\n    };\n  },\n  methods: {\n    removeHighlight: async function (id) {\n      let app = this.app;\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let c = this;\n      let highlightComments = app.highlightComments;\n      let $highlightColorfillButton = page.$el.find('.highlight-colorfill');\n      $highlightColorfillButton.on('click', async function () {\n        if (highlightComments.Rangy.stringSelection().trim() !== '') {\n          let type = 'h';\n          let id = Date.now();\n          let idOfWrapper = app.views.main.$el.attr('id');\n          let str0 = app.highlightComments.Rangy.stringSelection();\n          let selection = app.highlightComments.Rangy.apply(app.highlightComments.Rangy.selection(), id, app.highlightComments.lastHighlightClass, type, idOfWrapper);\n          let str = app.highlightComments.Rangy.stringSelection();\n          let testRowIndex = {\n            pageUrl: app.router.params.url,\n            selection: selection,\n            selPos: parseInt(selection.split('$')[0]),\n            color: app.highlightComments.lastHighlightClass,\n            note: null,\n            text: str0,\n            works: 1,\n            type: type,\n            del: 0,\n            df: 1,\n            ts: null,\n            js_id: id,\n            id: null,\n            user: app.user.getUserId(),\n            wrapper_id: idOfWrapper\n          };\n          await (await app.database.table('notes-select')).insert(testRowIndex);\n          app.data.myEvents.emit('highlights:change');\n          let $newEl = app.router.$el.find('highlight[data-id=\"' + id + '\"]').eq(app.router.$el.find('highlight[data-id=\"' + id + '\"]').length - 1);\n          app.highlightComments.setHighlightId(id);\n          app.highlightComments.removeSelection();\n          app.highlightComments.open = false;\n          app.highlightComments.$popover.close();\n          app.highlightComments.clickHighlightColor($newEl, 2);\n        }\n      });\n      let $highlightCommentButton = page.$el.find('.highlight-comment');\n      $highlightCommentButton.on('click', async function () {\n        if (highlightComments.Rangy.stringSelection().trim() !== '') {\n          let type = 'c';\n          let id = Date.now();\n          let idOfWrapper = app.views.main.$el.attr('id');\n          let selection = highlightComments.Rangy.apply(highlightComments.Rangy.selection(), id, highlightComments.lastHighlightCommentClass, type, idOfWrapper);\n          highlightComments.addNoteIcon(id, app.views.main.$el);\n          let testRowIndex = {\n            pageUrl: app.router.params.url,\n            selection: selection,\n            selPos: parseInt(selection.split('$')[0]),\n            color: highlightComments.lastHighlightCommentClass,\n            note: null,\n            text: highlightComments.Rangy.stringSelection(),\n            works: 1,\n            type: type,\n            del: 0,\n            df: 1,\n            ts: null,\n            js_id: id,\n            id: null,\n            user: app.user.getUserId(),\n            wrapper_id: idOfWrapper\n          };\n          await (await app.database.table('notes-select')).insert(testRowIndex);\n          app.data.myEvents.emit('highlights:change');\n          let $newEl = app.router.$el.find('highlight[data-id=\"' + id + '\"]').eq(app.router.$el.find('highlight[data-id=\"' + id + '\"]').length - 1);\n          highlightComments.setHighlightId(id);\n          highlightComments.removeSelection();\n          highlightComments.open = false;\n          highlightComments.$popover.close();\n          highlightComments.clickHighlightColor($newEl, 3);\n        }\n      });\n      let $highlightSearchButton = page.$el.find('.highlight-search');\n      $highlightSearchButton.on('click', async function () {\n        let string = highlightComments.Rangy.stringSelection();\n        string = string.trim();\n        app.search.setSearchString(string);\n        highlightComments.open = false;\n        highlightComments.$popover.close();\n      });\n      let $addGroupComment = page.$el.find('.highlight-group-comment-trigger');\n      $addGroupComment.on('click', async function () {\n        if (highlightComments.Rangy.stringSelection().trim() !== '') {\n          let type = 'gc';\n          let id = Date.now();\n          let idOfWrapper = app.views.main.$el.attr('id');\n          let selection = app.highlightComments.Rangy.apply(app.highlightComments.Rangy.selection(), id, 'highlight-group-comment', type, idOfWrapper);\n          let testRowIndex = {\n            pageUrl: app.router.params.url,\n            selection: selection,\n            selPos: parseInt(selection.split('$')[0]),\n            color: 'highlight-group-comment',\n            note: null,\n            text: app.highlightComments.Rangy.stringSelection().toString(),\n            works: 1,\n            type: type,\n            del: 0,\n            df: 0,\n            ts: null,\n            js_id: id,\n            id: null,\n            user: app.user.getUserId(),\n            wrapper_id: idOfWrapper,\n            insert: 0\n          };\n          highlightComments.removeSelection();\n          await (await app.database.table('notes-select')).insert(testRowIndex);\n          app.data.myEvents.emit('highlights:change');\n          let $newEl = app.router.$el.find('highlight[data-id=\"' + id + '\"]').eq(app.router.$el.find('highlight[data-id=\"' + id + '\"]').length - 1);\n          highlightComments.setHighlightId(id);\n          highlightComments.clickHighlightColor($newEl, 4);\n          highlightComments.removeGroupComment = true;\n        }\n      });\n      let $highlightChangeButton = page.$el.find('.highlight-change');\n    }\n  },\n  id: 'ae9f4cf263',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <ul id=\"highlight-popover-inner-1\" class=\"highlight-icon-list\">\\n      <li class=\"highlight-icon-list-item\">\\n        <a href=\"/#/\" class=\"highlight-colorfill\">\\n          <i class=\"material-icons\">format_paint</i>\\n        </a>\\n      </li>\\n      <li class=\"highlight-icon-list-item\">\\n        <a href=\"#\" class=\"highlight-comment\">\\n          <i class=\"material-icons\">rate_review</i>\\n        </a>\\n      </li>\\n      <!--<li class=\"highlight-icon-list-divider\"></li>-->\\n      <li class=\"highlight-icon-list-item\">\\n        <a href=\"#\" class=\"highlight-search\">\\n          <i class=\"material-icons\">search</i>\\n        </a>\\n      </li>\\n      <li class=\"highlight-icon-list-item\">\\n        <a href=\"#\" class=\"highlight-group-comment-trigger\">\\n          <i class=\"material-icons\">comment</i>\\n        </a>\\n      </li>\\n      <!--<li class=\"highlight-icon-list-item\">-->\\n      <!--<a href=\"#\" class=\"highlight-change\">-->\\n      <!--<i class=\"material-icons\">format_clear</i>-->\\n      <!--</a>-->\\n      <!--</li>-->\\n      <!--<li class=\"highlight-icon-list-item\">-->\\n      <!--<a href=\"#\" class=\"highlight-share\">-->\\n      <!--<i class=\"material-icons\">share</i>-->\\n      <!--</a>-->\\n      <!--</li>-->\\n    </ul>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n\n`,\n  styleScoped: true,\n  cleanText: ` `\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight.f7.html\n\n      \n      const hc_highlight_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var hc_highlight_f7 = ({\n  data: function () {\n    return {\n      highlights: null,\n      app: this.$app,\n      count: 0,\n      highlightClasses: [\n        'highlight-1',\n        'highlight-2',\n        'highlight-3',\n        'highlight-4',\n        'highlight-5'\n      ]\n    };\n  },\n  methods: {\n    removeHighlight: async function (id) {\n      let app = this.app;\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let c = this;\n      let highlightComments = app.highlightComments;\n      let $highlightColorChangeButton = page.$el.find('.highlight-colorchange');\n      let $highlightColorRemoveButton = page.$el.find('.highlight-remove');\n      $highlightColorChangeButton.on('click', async function () {\n        let highlightId = app.highlightComments.getHighlightId();\n        let $currentPage = app.router.$el;\n        let $newEl = $currentPage.find('highlight[data-id=\"' + highlightId + '\"]');\n        let type = $newEl.attr('data-hc-type');\n        let color = $$(this).data('color');\n        $newEl.removeAttr('class').addClass(color);\n        if (type === 'c') {\n          $newEl.addClass('h-icon');\n        }\n        let changedH = await (await app.database.table('notes-select')).filter(item => item['js_id'] === highlightId).update({\n          color: color,\n          df: 1\n        });\n        app.data.myEvents.emit('highlights:change');\n        app.highlightComments.lastHighlightClass = color;\n      });\n      $highlightColorRemoveButton.on('click', async function () {\n        let highlightId = highlightComments.getHighlightId();\n        highlightComments.removeHighlight(highlightId);\n        highlightComments.open = false;\n        highlightComments.$popover.close();\n      });\n    }\n  },\n  id: 'ce09a62f0b',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <ul id=\"highlight-popover-inner-2\" class=\"highlight-color-list\">\\n      ';\n      r += hc_highlight_f7_Template7Helpers.each.call(ctx_1, ctx_1.highlightClasses, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <li class=\"highlight-color-list-item\">\\n        <a href=\"#\" class=\"highlight-colorchange ';\n          r += c(ctx_2, ctx_2);\n          r += '\" data-color=\"';\n          r += c(ctx_2, ctx_2);\n          r += '\">\\n          <i class=\"material-icons\">format_paint</i>\\n        </a>\\n      </li>\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      <li class=\"highlight-color-list-item\">\\n        <a href=\"#\" class=\"highlight-remove\">\\n          <i class=\"material-icons\">delete</i>\\n        </a>\\n      </li>\\n    </ul>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n\n`,\n  styleScoped: true,\n  cleanText: ` {{#each highlightClasses}} {{/each}} `\n});\n    \n// EXTERNAL MODULE: ./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html\nvar hc_highlight_comment_f7 = __webpack_require__(\"./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/highlights-comments/highlights-comments-class.js\nvar highlights_comments_class = __webpack_require__(\"./src/core/custom_plugins/highlights-comments/highlights-comments-class.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/highlights-comments/highlights-comments.js\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n// import HighlightPopover from './highlighlight-popover';\n\n\n\n\n\n\n\n\n// import GroupComments from \"./templates/popover/group-comments.f7.html\";\n\n\n\n/* harmony default export */ var highlights_comments_highlights_comments = ({\n  name: \"highlight-comments\",\n  params: {\n    highlightComments: {\n      autostart: true,\n      //inicializování popupu pro zadání poznámky\n      enabled: false,\n      //Povolit modul pro zvýrazňování a komentáře\n      highlightClasses: [\"highlight-1\", \"highlight-2\", \"highlight-3\", \"highlight-4\", \"highlight-5\"],\n      highlightCommentClasses: [\"highlight-comment-1\", \"highlight-comment-2\", \"highlight-comment-3\", \"highlight-comment-4\", \"highlight-comment-5\"]\n    }\n  },\n  static: {\n    HighlightComments: highlights_comments_class[\"default\"]\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      app.highlightComments = new highlights_comments_class[\"default\"](app);\n      //zapnout pro starou knihu (nemá builder)\n\n      if (app.builder == undefined) app.highlightComments.params.enabled = true;\n    }\n  },\n  create: function create(params) {\n    var app = this;\n    app.routes.push({\n      name: \"Hc Default\",\n      path: \"/hc-default/\",\n      component: default_f7\n    }, {\n      name: \"Hc highlight\",\n      path: \"/hc-highlight/\",\n      component: hc_highlight_f7\n    }, {\n      name: \"Hc highlight comment\",\n      path: \"/hc-highlight-comment/\",\n      component: hc_highlight_comment_f7[\"default\"]\n    }, {\n      name: \"Nastroje\",\n      path: \"/nastroje/\",\n      component: annotation_list_f7\n    }, {\n      name: \"Komentář - vložit\",\n      path: \"/vlozit-komentar/\",\n      component: insert_comment_f7\n    }, {\n      name: \"Informace\",\n      path: \"/info/\",\n      component: info_f7[\"default\"]\n    }, {\n      name: \"Detail anotace\",\n      path: \"/annotation-detail/:id/\",\n      component: annotations_detail_f7\n    }, {\n      name: \"Detail anotace\",\n      path: \"/gc-detail/:id/\",\n      component: gc_detail_f7[\"default\"]\n    }, {\n      name: \"Přehled komentářů\",\n      path: \"/gc-list/\",\n      component: group_comments_list_f7\n    });\n  }\n});\n// EXTERNAL MODULE: ./node_modules/lodash/array.js\nvar lodash_array = __webpack_require__(\"./node_modules/lodash/array.js\");\nvar array_default = /*#__PURE__*/__webpack_require__.n(lodash_array);\n\n// EXTERNAL MODULE: ./node_modules/lodash/lodash.js\nvar lodash_lodash = __webpack_require__(\"./node_modules/lodash/lodash.js\");\nvar lodash_default = /*#__PURE__*/__webpack_require__.n(lodash_lodash);\n\n// EXTERNAL MODULE: ./node_modules/localforage/dist/localforage.js\nvar localforage = __webpack_require__(\"./node_modules/localforage/dist/localforage.js\");\nvar localforage_default = /*#__PURE__*/__webpack_require__.n(localforage);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/database/database.js\n\n\n\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n// la\n\n\nvar database_Database = /*#__PURE__*/function () {\n  function Database(app, params) {\n    classCallCheck_default()(this, Database);\n    var database = this;\n    // debugger\n\n    this.app = app;\n    this.params = params;\n    this.localForage = localforage_default.a;\n    window.localForage = localforage_default.a;\n    this.localForage.config({\n      name: app.id\n    });\n    return database;\n  }\n  return createClass_default()(Database, [{\n    key: \"table\",\n    value: function () {\n      var _table = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(key) {\n        var table, ble;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              table = new database_Table(this.app, this.localForage);\n              _context.next = 3;\n              return table.table(key);\n            case 3:\n              ble = _context.sent;\n              return _context.abrupt(\"return\", ble);\n            case 5:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function table(_x) {\n        return _table.apply(this, arguments);\n      }\n      return table;\n    }()\n  }, {\n    key: \"lodash\",\n    value: function lodash() {\n      return lodash_default.a;\n    }\n  }]);\n}();\nvar database_Table = /*#__PURE__*/function () {\n  function Table(app, lf) {\n    classCallCheck_default()(this, Table);\n    utils[\"default\"].extend(this, array_default.a);\n    var table = this;\n    // debugger\n\n    this.app = app;\n    this.localForage = lf;\n    this.tableKey = null;\n    this.value = null;\n    this.filterValue = null;\n    this.isFiltered = false;\n    return table;\n  }\n  return createClass_default()(Table, [{\n    key: \"lodash\",\n    value: function lodash() {\n      return lodash_default.a;\n    }\n  }, {\n    key: \"table\",\n    value: function () {\n      var _table2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(key) {\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              this.tableKey = key;\n              _context2.next = 3;\n              return this.localForage.getItem(this.getTableKey());\n            case 3:\n              this.value = _context2.sent;\n              if (this.value === null) {\n                this.value = [];\n              }\n              this.isFiltered = false;\n              return _context2.abrupt(\"return\", this);\n            case 7:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function table(_x2) {\n        return _table2.apply(this, arguments);\n      }\n      return table;\n    }() //Odstraní vyfiltrované záznamy\n  }, {\n    key: \"delete\",\n    value: function () {\n      var _delete2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n        var filterValue;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              _context3.prev = 0;\n              // this.value.splice(keyIndex, 1);\n              // this.getValue()\n              filterValue = this.getValue();\n              this.value = this.lodash().difference(this.value, filterValue);\n              this.set(this.value);\n              return _context3.abrupt(\"return\", this.value);\n            case 7:\n              _context3.prev = 7;\n              _context3.t0 = _context3[\"catch\"](0);\n              alert(_context3.t0);\n            case 10:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this, [[0, 7]]);\n      }));\n      function _delete() {\n        return _delete2.apply(this, arguments);\n      }\n      return _delete;\n    }()\n  }, {\n    key: \"deleteTable\",\n    value: function () {\n      var _deleteTable = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n        return regenerator_default.a.wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              _context4.next = 2;\n              return this.localForage.removeItem(this.getTableKey());\n            case 2:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function deleteTable() {\n        return _deleteTable.apply(this, arguments);\n      }\n      return deleteTable;\n    }()\n  }, {\n    key: \"getTableKey\",\n    value: function getTableKey() {\n      if (this.tableKey === null) {\n        alert(\"Nastavte název tabulky/klíče.\");\n      }\n      return this.tableKey;\n    }\n  }, {\n    key: \"set\",\n    value: function () {\n      var _set = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5() {\n        var _fu, tableKey;\n        return regenerator_default.a.wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              _context5.prev = 0;\n              _context5.next = 3;\n              return this.localForage.setItem(this.getTableKey(), this.value);\n            case 3:\n              _fu = _context5.sent;\n              tableKey = this.getTableKey();\n              this.app.data.myEvents.emit(\"database:change\", tableKey);\n              return _context5.abrupt(\"return\", _fu);\n            case 9:\n              _context5.prev = 9;\n              _context5.t0 = _context5[\"catch\"](0);\n              alert(_context5.t0);\n            case 12:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5, this, [[0, 9]]);\n      }));\n      function set() {\n        return _set.apply(this, arguments);\n      }\n      return set;\n    }()\n  }, {\n    key: \"getAll\",\n    value: function getAll() {\n      try {\n        return this.value;\n      } catch (error) {\n        alert(error);\n      }\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue() {\n      if (this.isFiltered) {\n        this.filterValue = this.modifyToNull(this.filterValue);\n        return this.filterValue;\n      } else {\n        this.value = this.modifyToNull(this.value);\n        return this.value;\n      }\n    }\n  }, {\n    key: \"getByIndex\",\n    value: function () {\n      var _getByIndex = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6(keyIndex) {\n        return regenerator_default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              _context6.prev = 0;\n              this.value = this.value[keyIndex];\n              return _context6.abrupt(\"return\", this.value);\n            case 5:\n              _context6.prev = 5;\n              _context6.t0 = _context6[\"catch\"](0);\n              alert(_context6.t0);\n            case 8:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6, this, [[0, 5]]);\n      }));\n      function getByIndex(_x3) {\n        return _getByIndex.apply(this, arguments);\n      }\n      return getByIndex;\n    }()\n  }, {\n    key: \"setAsDeleted\",\n    value: function () {\n      var _setAsDeleted = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee7(keyIndex) {\n        var object, updateObject, arr, _fu2;\n        return regenerator_default.a.wrap(function _callee7$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              _context7.prev = 0;\n              object = this.value[keyIndex];\n              if (!(typeof_default()(object) !== \"object\")) {\n                _context7.next = 4;\n                break;\n              }\n              throw \"Index \" + index + \" is not object!\";\n            case 4:\n              updateObject = jquery_default.a.extend({}, object, {\n                del: 1\n              });\n              arr = [];\n              arr.push(updateObject);\n              _context7.next = 9;\n              return this.update(arr);\n            case 9:\n              _fu2 = _context7.sent;\n              return _context7.abrupt(\"return\", _fu2);\n            case 13:\n              _context7.prev = 13;\n              _context7.t0 = _context7[\"catch\"](0);\n              alert(_context7.t0);\n            case 16:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee7, this, [[0, 13]]);\n      }));\n      function setAsDeleted(_x4) {\n        return _setAsDeleted.apply(this, arguments);\n      }\n      return setAsDeleted;\n    }()\n  }, {\n    key: \"removeOne\",\n    value: function () {\n      var _removeOne = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee8(keyIndex) {\n        return regenerator_default.a.wrap(function _callee8$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              _context8.prev = 0;\n              this.value.splice(keyIndex, 1);\n              this.set(fu);\n              return _context8.abrupt(\"return\", fu);\n            case 6:\n              _context8.prev = 6;\n              _context8.t0 = _context8[\"catch\"](0);\n              alert(_context8.t0);\n            case 9:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee8, this, [[0, 6]]);\n      }));\n      function removeOne(_x5) {\n        return _removeOne.apply(this, arguments);\n      }\n      return removeOne;\n    }() // async push(value){\n    //\n    //   try {\n    //\n    //\n    //     let index = this.value.push(value);\n    //     index = index -1;\n    //     await this.set();\n    //\n    //     return index;\n    //\n    //   }catch (error) {\n    //     alert(error)\n    //   }\n    // }\n    // Stejné jako push\n  }, {\n    key: \"insert\",\n    value: function () {\n      var _insert = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee9(value) {\n        var _index, x;\n        return regenerator_default.a.wrap(function _callee9$(_context9) {\n          while (1) switch (_context9.prev = _context9.next) {\n            case 0:\n              _context9.prev = 0;\n              _index = this.value.push(value);\n              x = this.value;\n              _index = _index - 1;\n              _context9.next = 6;\n              return this.set();\n            case 6:\n              return _context9.abrupt(\"return\", _index);\n            case 9:\n              _context9.prev = 9;\n              _context9.t0 = _context9[\"catch\"](0);\n              alert(_context9.t0);\n            case 12:\n            case \"end\":\n              return _context9.stop();\n          }\n        }, _callee9, this, [[0, 9]]);\n      }));\n      function insert(_x6) {\n        return _insert.apply(this, arguments);\n      }\n      return insert;\n    }()\n  }, {\n    key: \"update\",\n    value: function () {\n      var _update = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee0(updatetes) {\n        var database;\n        return regenerator_default.a.wrap(function _callee0$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              _context0.prev = 0;\n              database = this;\n              if (this.isFiltered) {\n                this.filterValue.forEach(function (val, i) {\n                  if (database.filterValue[i][\"type\"] == \"gc\" && database.filterValue[i][\"df\"] == 1) {\n                    var fv = database.filterValue[i];\n                    // debugger;\n                  }\n                  database.filterValue[i] = jquery_default.a.extend({}, database.filterValue[i], updatetes);\n                });\n                this.value = this.unionBy(this.filterValue, this.value, \"js_id\");\n                this.set();\n              }\n              return _context0.abrupt(\"return\", this);\n            case 6:\n              _context0.prev = 6;\n              _context0.t0 = _context0[\"catch\"](0);\n              alert(_context0.t0);\n            case 9:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee0, this, [[0, 6]]);\n      }));\n      function update(_x7) {\n        return _update.apply(this, arguments);\n      }\n      return update;\n    }()\n  }, {\n    key: \"arrayLength\",\n    value: function () {\n      var _arrayLength = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee1() {\n        var al;\n        return regenerator_default.a.wrap(function _callee1$(_context1) {\n          while (1) switch (_context1.prev = _context1.next) {\n            case 0:\n              _context1.prev = 0;\n              al = this.value.length;\n              return _context1.abrupt(\"return\", al);\n            case 5:\n              _context1.prev = 5;\n              _context1.t0 = _context1[\"catch\"](0);\n              alert(_context1.t0);\n            case 8:\n            case \"end\":\n              return _context1.stop();\n          }\n        }, _callee1, this, [[0, 5]]);\n      }));\n      function arrayLength() {\n        return _arrayLength.apply(this, arguments);\n      }\n      return arrayLength;\n    }()\n  }, {\n    key: \"modifyToNull\",\n    value: function modifyToNull(val) {\n      if (typeof val === \"undefined\") {\n        // debugger\n        val = [];\n      }\n      return val;\n    }\n  }, {\n    key: \"isUndefined\",\n    value: function isUndefined(val) {\n      if (typeof val === \"undefined\") {\n        return true;\n      }\n      return false;\n    }\n  }, {\n    key: \"count\",\n    value: function count() {\n      try {\n        // let count = this.getValue().length;\n        return this.getValue().length;\n      } catch (error) {\n        alert(error);\n      }\n    }\n  }, {\n    key: \"where\",\n    value: function where(property, value) {\n      try {\n        var arr;\n        if (Array.isArray(this.filterValue)) {\n          arr = this.filterValue;\n        } else {\n          arr = [];\n        }\n        this.filterValue = this.getValue().filter(function (x) {\n          return x[property] === value;\n        });\n\n        // if(!this.isUndefined(this.filterValue)){\n        //   arr.push(this.filterValue);\n        // }\n\n        this.isFiltered = true;\n        // this.filterValue = arr;\n        return this;\n      } catch (error) {\n        alert(error);\n      }\n    }\n  }, {\n    key: \"whereNot\",\n    value: function whereNot(property, value) {\n      try {\n        var arr;\n        if (Array.isArray(this.filterValue)) {\n          arr = this.filterValue;\n        } else {\n          arr = [];\n        }\n        this.filterValue = this.getValue().filter(function (x) {\n          return x[property] !== value;\n        });\n\n        // if(!this.isUndefined(this.filterValue)){\n        //   arr.push(this.filterValue);\n        // }\n\n        this.isFiltered = true;\n        // this.filterValue = arr;\n        return this;\n      } catch (error) {\n        alert(error);\n      }\n    }\n  }, {\n    key: \"max\",\n    value: function max(key) {\n      var xx = this.value.map(function (o) {\n        return o[key];\n      });\n      var maxId = Math.max.apply(Math, xx);\n      if (maxId === -Infinity) {\n        maxId = 0;\n      }\n      return maxId;\n    }\n  }, {\n    key: \"filter\",\n    value: function filter(_filter) {\n      try {\n        // this.filterValue = JSON.decode(JSON.stringify(this.))\n\n        // uděláme pole\n\n        this.filterValue = this.value.filter(_filter);\n        this.isFiltered = true;\n        return this;\n      } catch (error) {\n        alert(error);\n      }\n    }\n  }, {\n    key: \"findAllByProperty\",\n    value: function () {\n      var _findAllByProperty = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee10(property, value) {\n        var items;\n        return regenerator_default.a.wrap(function _callee10$(_context10) {\n          while (1) switch (_context10.prev = _context10.next) {\n            case 0:\n              _context10.prev = 0;\n              items = this.value.filter(function (item) {\n                return item[property] === value;\n              });\n              return _context10.abrupt(\"return\", items);\n            case 5:\n              _context10.prev = 5;\n              _context10.t0 = _context10[\"catch\"](0);\n              alert(_context10.t0);\n            case 8:\n            case \"end\":\n              return _context10.stop();\n          }\n        }, _callee10, this, [[0, 5]]);\n      }));\n      function findAllByProperty(_x8, _x9) {\n        return _findAllByProperty.apply(this, arguments);\n      }\n      return findAllByProperty;\n    }() // async keys(){\n    //   try {\n    //\n    //     let fu = await this.localForage.keys();\n    //     return fu;\n    //\n    //   }catch (error) {\n    //     alert(error)\n    //   }\n    // }\n    //\n    // async length(){\n    //   try {\n    //\n    //     let fu = await this.localForage.length();\n    //     return fu;\n    //\n    //   }catch (error) {\n    //     alert(error)\n    //   }\n    // }\n    //\n    // iterate(){\n    //\n    //     this.localForage.iterate(function(value, key, iterationNumber) {\n    //       // Resulting key/value pair -- this callback\n    //       // will be executed for every item in the\n    //       // database.\n    //     }).then(function() {\n    //     }).catch(function(err) {\n    //       // This code runs if there were any errors\n    //     });\n    // }\n  }]);\n}();\n/* harmony default export */ var database_database = ({\n  name: \"database\",\n  params: {\n    citations: {\n      title: \"Citace\",\n      close: \"Zavřít\"\n    }\n  },\n  static: {\n    Database: database_Database\n  },\n  create: function create(params) {\n    var app = this;\n    app.database = new database_Database(app, params);\n  }\n});\n// EXTERNAL MODULE: ./node_modules/jwt-decode/lib/index.js\nvar lib = __webpack_require__(\"./node_modules/jwt-decode/lib/index.js\");\nvar lib_default = /*#__PURE__*/__webpack_require__.n(lib);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/user/templates/user-default.f7.html\n\n      \n      const user_default_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var user_default_f7 = ({\n  data: function () {\n    return {};\n  },\n  methods: {\n    logOut: async function () {\n      this.$app.user.logout().then(res => {\n        if (this.$app.user.params.mustBeLoggedIn) {\n          location.reload();\n        } else {\n          this.$app.views.get('.view-left').router.navigate('/login/true', {\n            reloadCurrent: true,\n            ignoreCache: true\n          });\n        }\n      });\n    }\n  },\n  on: {\n    pageAfterIn: function (e, page) {\n      let app = page.app;\n      let $loginForm = page.$el.find('#refresh');\n      $loginForm.on('click', async function () {\n        let loged = await app.user.refresh();\n      });\n      if (!app.user.isLogged) {\n        page.router.navigate('/login/true', {\n          reloadCurrent: true,\n          ignoreCache: true\n        });\n      }\n    }\n  },\n  id: 'e0bd069fa6',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"/left-menu/\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('user:user'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n      <div class=\"list\">\\n        <ul>\\n\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media\"><i class=\"f7-icons\">person_round</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.user.identity.fullname, ctx_1);\n      r += '</div>\\n              </div>\\n            </div>\\n          </li>\\n\\n          <li>\\n            <a href=\"/user-role/\" class=\"item-link item-content\">\\n              <div class=\"item-media\"><i class=\"material-icons\">vpn_key</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  <div class=\"item-header\">';\n      r += c(ctx_1.$app.translation.t('user:permission'), ctx_1);\n      r += '</div>\\n                  ';\n      r += user_default_f7_Template7Helpers.if.call(ctx_1, ctx_1.$app.user.isEditor, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += ' ';\n          r += c(ctx_2.$app.translation.t('user:editor'), ctx_2);\n          r += ' ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                  ';\n          r += c(ctx_2.$app.translation.t('user:reader'), ctx_2);\n          r += ' ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                </div>\\n                <div class=\"item-after\">';\n      r += c(ctx_1.$app.translation.t('more'), ctx_1);\n      r += '</div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n\\n            <a href=\"#\" @click=\"logOut\" class=\"item-content item-link\">\\n              <div class=\"item-media\"><i class=\"f7-icons\">exit</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('user:logOut'), ctx_1);\n      r += '</div>\\n              </div>\\n            </a>\\n\\n          </li>\\n        </ul>\\n      </div>\\n    </div>\\n\\n\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-e0bd069fa6] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"user:user\")}} {{$app.user.identity.fullname}} {{$app.translation.t(\"user:permission\")}} {{#if $app.user.isEditor}} {{$app.translation.t(\"user:editor\")}} {{else}} {{$app.translation.t(\"user:reader\")}} {{/if}} {{$app.translation.t(\"more\")}} {{$app.translation.t(\"user:logOut\")}} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/user/templates/user-login.f7.html\n\n      \n      const user_login_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var user_login_f7 = ({\n  data: function (e, page) {\n    let app = this.$app;\n    return { sideMenu: false };\n  },\n  methods: {\n    showGauge: function () {\n      this.$app.data.isLogged = true;\n      this.$setState({});\n    },\n    notifyMe: function () {\n      alert(Notification.permission);\n      if (Notification.permission !== 'granted')\n        Notification.requestPermission();\n      else {\n        var notification = new Notification('Notification title', {\n          icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png',\n          body: 'Hey there! You\\'ve been notified!'\n        });\n        notification.onclick = function () {\n          window.open('http://stackoverflow.com/a/13328397/1269037');\n        };\n      }\n    },\n    test: function () {\n      var source = new EventSource('http://192.168.0.105/weby/websocket-demo/web/?do=stream');\n      source.onmessage = function (event) {\n      };\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let routeX = page.route;\n      this.sideMenu = routeX.params.sideMenu;\n      let $loginButton = page.$el.find('#loginButton');\n      let $loginForm = page.$el.find('#loginForm');\n      $loginButton.on('click', async function () {\n        let val = app.input.validateInputs(page.$el.find('#loginForm'));\n        if ($loginForm.find('.input-invalid').length < 1) {\n          let formData = new FormData($loginForm[0]);\n          let formEntries = Array.from(formData.entries());\n          let loged = await app.user.login(formData.get('username'), formData.get('password'), formData.get('remember'));\n          if (loged) {\n            let sidemenu = routeX.params.sideMenu;\n            if (sidemenu == 'true') {\n              page.view.router.navigate('/left-menu/', {\n                reloadCurrent: true,\n                ignoreCache: true\n              });\n            } else {\n              app.view.main.router.navigate('/main-view/', {\n                reloadCurrent: true,\n                ignoreCache: true\n              });\n            }\n          }\n        }\n      });\n    }\n  },\n  id: 'c9e41aa904',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          ';\n      r += user_login_f7_Template7Helpers.if.call(ctx_1, ctx_1.sideMenu, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          <a href=\"/left-menu/\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n          r += c(ctx_2.$app.translation.t('back'), ctx_2);\n          r += '</span>\\n          </a>\\n          ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('user:logIn'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n\\n      ';\n      r += user_login_f7_Template7Helpers.if.call(ctx_1, ctx_1.sideMenu, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <div class=\" login-screen-content\">\\n        ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        <div class=\"master-login login-screen-content\">\\n\\n          ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n          <div class=\"login-screen-title\">';\n      r += c(ctx_1.$app.translation.t('book:logIn'), ctx_1);\n      r += '</div>\\n          <form id=\"loginForm\">\\n            <div class=\"list\">\\n              <ul>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:userName'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"email\" name=\"username\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterUsername'), ctx_1);\n      r += '\" class required validate>\\n                      <div class=\"item-input-info\"></div>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:pass'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"password\" name=\"password\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterPassword'), ctx_1);\n      r += '\" required validate>\\n                      <div class=\"item-input-info\"></div>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li>\\n                  <label class=\"item-checkbox item-content\">\\n                    <input type=\"checkbox\" name=\"remember\" value=\"true\" checked=\"checked\">\\n                    <i class=\"icon icon-checkbox\"></i>\\n                    <div class=\"item-inner\">\\n                      <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('user:rememberLogIn'), ctx_1);\n      r += '</div>\\n                    </div>\\n\\n\\n                  </label>\\n                </li>\\n              </ul>\\n            </div>\\n            <div class=\"list\">\\n              <ul>\\n                <li><a id=\"loginButton\" class=\"item-link list-button\" href=\"#\">';\n      r += c(ctx_1.$app.translation.t('user:logIn'), ctx_1);\n      r += '</a>\\n                </li>\\n                ';\n      r += user_login_f7_Template7Helpers.if.call(ctx_1, ctx_1.sideMenu, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                <li><a class=\"item-link list-button\" href=\"/register/true\">';\n          r += c(ctx_2.$app.translation.t('user:notYetRegister'), ctx_2);\n          r += '</a>\\n                </li>\\n                ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                <li><a class=\"item-link list-button\" href=\"/register/false\">';\n          r += c(ctx_2.$app.translation.t('user:notYetRegister'), ctx_2);\n          r += '</a>\\n                </li>\\n                ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n              </ul>\\n              <div class=\"block-footer\">\\n\\n              </div>\\n            </div>\\n          </form>\\n\\n        </div>\\n\\n      </div>\\n      ';\n      r += '\\n\\n    </div>\\n</div></body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-c9e41aa904] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n\n[data-f7-c9e41aa904] .master-login .list {\n    margin: 0 auto;\n  }\n\n[data-f7-c9e41aa904] .master-login {\n    top: 50%;\n    position: relative;\n    height: 350px;\n    margin-top: -239px;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{#if sideMenu}} {{$app.translation.t(\"back\")}} {{/if }} {{$app.translation.t(\"user:logIn\")}} {{#if sideMenu}} {{else}} {{/if }} {{$app.translation.t(\"book:logIn\")}} {{$app.translation.t(\"user:userName\")}} {{$app.translation.t(\"user:pass\")}} {{$app.translation.t(\"user:rememberLogIn\")}} {{$app.translation.t(\"user:logIn\")}} {{#if sideMenu}} {{$app.translation.t(\"user:notYetRegister\")}} {{else}} {{$app.translation.t(\"user:notYetRegister\")}} {{/if }} {{/if }} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/user/templates/user-role.f7.html\n\n      \n      const user_role_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var user_role_f7 = ({\n  data: function () {\n    return {};\n  },\n  methods: {\n    logOut: async function () {\n      await this.$app.user.logout();\n      this.$app.views.get('.view-left').router.navigate('/login/true', {\n        reloadCurrent: true,\n        ignoreCache: true\n      });\n    },\n    editorRequest: async function () {\n      let app = this.$app;\n      app.user.askForAccess();\n    }\n  },\n  on: {\n    pageAfterIn: function (e, page) {\n      let app = page.app;\n      if (!app.user.isLogged) {\n        page.router.navigate('/login/', {\n          reloadCurrent: true,\n          ignoreCache: true\n        });\n      }\n    }\n  },\n  id: '0f528acbbf',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"/user/\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('user:permHeader'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n\\n      <div class=\"block\">\\n        ';\n      r += user_role_f7_Template7Helpers.if.call(ctx_1, ctx_1.$app.user.isEditor, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        <p>';\n          r += c(ctx_2.$app.translation.t('user:permission'), ctx_2);\n          r += ' <b>';\n          r += c(ctx_2.$app.translation.t('user:editor'), ctx_2);\n          r += '</b>.</p>\\n        <p>';\n          r += c(ctx_2.$app.translation.t('user:editorText'), ctx_2);\n          r += '\\n        </p>\\n        <p>\\n          ';\n          r += c(ctx_2.$app.translation.t('user:editorText2'), ctx_2);\n          r += '\\n        </p>\\n\\n        ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        <p>';\n          r += c(ctx_2.$app.translation.t('user:permission'), ctx_2);\n          r += '<b>';\n          r += c(ctx_2.$app.translation.t('user:reader'), ctx_2);\n          r += '</b>.</p>\\n        <p>';\n          r += c(ctx_2.$app.translation.t('user:readerText'), ctx_2);\n          r += '\\n        </p>\\n        <p>\\n          <b>';\n          r += c(ctx_2.$app.translation.t('user:editor'), ctx_2);\n          r += '</b> ';\n          r += c(ctx_2.$app.translation.t('user:editorText3'), ctx_2);\n          r += '\\n        </p>\\n        <a @click=\"editorRequest\" href=\"#\" class=\"col button button-small\">';\n          r += c(ctx_2.$app.translation.t('user:requestEditor'), ctx_2);\n          r += '</a>\\n\\n        ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      </div>\\n    </div>\\n\\n\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-0f528acbbf] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"user:permHeader\")}} {{#if $app.user.isEditor}} {{$app.translation.t(\"user:permission\")}} {{$app.translation.t(\"user:editor\")}} . {{$app.translation.t(\"user:editorText\")}} {{$app.translation.t(\"user:editorText2\")}} {{else}} {{$app.translation.t(\"user:permission\")}} {{$app.translation.t(\"user:reader\")}} . {{$app.translation.t(\"user:readerText\")}} {{$app.translation.t(\"user:editor\")}} {{$app.translation.t(\"user:editorText3\")}} {{$app.translation.t(\"user:requestEditor\")}} {{/if}} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/user/templates/user-register.f7.html\n\n      \n      const user_register_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var user_register_f7 = ({\n  data: function () {\n    return { sideMenu: false };\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let router = page.route;\n      this.sideMenu = router.params.sideMenu;\n      let toggle = page.$el.find('.toggle-input');\n      let passInput = page.$el.find('.pass');\n      let emailInput = page.$el.find('.email');\n      let secondPass = page.$el.find('.pass-2');\n      toggle.on('change', function () {\n        if (toggle[0].checked) {\n          passInput[0].type = 'text';\n          passInput[1].type = 'text';\n        } else {\n          passInput[0].type = 'password';\n          passInput[1].type = 'password';\n        }\n      });\n      emailInput.on('blur', async function () {\n        let invalidMail = await app.user.validateEmail(emailInput[0].value);\n        if (invalidMail) {\n          emailInput[0].setCustomValidity('Email je již zaregistrován.');\n          page.app.input.validate(emailInput);\n        } else {\n          emailInput[0].setCustomValidity('');\n          page.app.input.validate(emailInput);\n        }\n      });\n      secondPass.on('blur', function () {\n        if (passInput[0].value != passInput[1].value) {\n          secondPass[0].setCustomValidity('Hesla se neshodují');\n          page.app.input.validate(secondPass);\n        } else {\n          secondPass[0].setCustomValidity('');\n          page.app.input.validate(secondPass);\n        }\n      });\n      let $registerButton = page.$el.find('#registerButton');\n      let $registerForm = page.$el.find('#registerForm');\n      $registerButton.on('click', async function () {\n        let val = app.input.validateInputs(page.$el.find('#registerForm'));\n        if ($registerForm.find('.input-invalid').length < 1) {\n          let formData = new FormData($registerForm[0]);\n          let formEntries = Array.from(formData.entries());\n          let register = await app.user.register(formData.get('email'), formData.get('name'), formData.get('surname'), formData.get('password'), formData.get('password2'));\n          if (register) {\n            if (app.user.login(formData.get('email'), formData.get('password'))) {\n              if (router.params.sideMenu) {\n                page.router.navigate('/left-menu/', {\n                  reloadCurrent: true,\n                  ignoreCache: true\n                });\n              }\n            }\n          }\n        }\n      });\n    }\n  },\n  id: '19e6cca860',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"/left-menu/\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('user:back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('user:register'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n\\n    <div class=\"page-content\">\\n      <!--<div class=\"login-screen\">-->\\n      ';\n      r += user_register_f7_Template7Helpers.if.call(ctx_1, ctx_1.sideMenu, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <div class=\" login-screen-content\">\\n        ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        <div class=\"master-login login-screen-content\">\\n\\n          ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n          <div class=\"login-screen-title\">';\n      r += c(ctx_1.$app.translation.t('user:register'), ctx_1);\n      r += '</div>\\n          <form id=\"registerForm\">\\n            <div class=\"list\">\\n              <ul>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:email'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"email\" class=\"email\" name=\"email\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterUsername'), ctx_1);\n      r += '\" required validate>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:name'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"text\" name=\"name\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:name'), ctx_1);\n      r += '\" required validate>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:surname'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"text\" name=\"surname\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterSurname'), ctx_1);\n      r += '\" required validate>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:pass'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input class=\"pass\" type=\"password\" name=\"password\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterPassword'), ctx_1);\n      r += '\" required validate minlength=\"8\">\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('user:passAgain'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input class=\"pass pass-2\" type=\"password\" name=\"password2\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('user:enterPassAgain'), ctx_1);\n      r += '\" required validate>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"password-show\">\\n                  <span>';\n      r += c(ctx_1.$app.translation.t('user:showPass'), ctx_1);\n      r += '</span>\\n                  <label class=\"toggle toggle-init\">\\n                    <input type=\"checkbox\" class=\"toggle-input\">\\n                    <span class=\"toggle-icon\"></span>\\n                  </label>\\n                </li>\\n              </ul>\\n            </div>\\n            <div class=\"list\">\\n              <ul>\\n                <li><a id=\"registerButton\" class=\"item-link list-button\" href=\"#\">';\n      r += c(ctx_1.$app.translation.t('user:doRegistration'), ctx_1);\n      r += '</a></li>\\n              </ul>\\n              <div class=\"block-footer\">\\n                <!--<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>-->\\n                <!--<p><a class=\"link login-screen-close\" href=\"#\">Close Login Screen</a></p>-->\\n\\n                <!--<a href=\"#\" class=\"button\" @click=\"showGauge\">ok ';\n      r += c(ctx_1.$root.isLogged, ctx_1);\n      r += '</a>-->\\n              </div>\\n            </div>\\n          </form>\\n\\n        </div>\\n        <!--</div>-->\\n      </div>\\n\\n\\n    </div>\\n</div></body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-19e6cca860] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n\n[data-f7-19e6cca860] .password-show {\n    display: flex;\n    width: 100%;\n    justify-content: space-between;\n    padding: 16px;\n  }\n\n[data-f7-19e6cca860] .master-login .list {\n    margin: 0 auto;\n  }\n\n[data-f7-19e6cca860] .master-login {\n    top: 50%;\n    height: 500px;\n    position: relative;\n    margin-top: -314px\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"user:back\")}} {{$app.translation.t(\"user:register\")}} {{#if sideMenu}} {{else}} {{/if }} {{$app.translation.t(\"user:register\")}} {{$app.translation.t(\"user:email\")}} {{$app.translation.t(\"user:name\")}} {{$app.translation.t(\"user:surname\")}} {{$app.translation.t(\"user:pass\")}} {{$app.translation.t(\"user:passAgain\")}} {{$app.translation.t(\"user:showPass\")}} {{$app.translation.t(\"user:doRegistration\")}} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/user/user.js\n\n\n\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n\n\n\n\n\n// let URL = \"https://auth.futurebooks.cz\";\n// let pubURL = \"https://futurebooks.cz\";\nvar user_User = /*#__PURE__*/function () {\n  function User(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, User);\n    var user = this;\n\n    // const defaults = Utils.extend({}, app.params);\n    // user.params = Utils.extend(defaults, params);\n\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.user, params);\n\n    // debugger\n    user.params = extendedParams;\n    this.app = app;\n    this.identity = null;\n    this.jwt = null;\n    this.isLoggedBool = false;\n    this.isEditor = false;\n    app.on(\"init\", function (page) {\n      if (user.params.autoLogin) {\n        user.checkIfIsLogged();\n      } else {\n        app.data.myEvents.emit(\"user:loadBook\");\n      }\n    });\n    user.app.translation.addResourceBundle(\"cs\", \"user\", user.params.lang.cs);\n    user.app.translation.addResourceBundle(\"en\", \"user\", user.params.lang.en);\n\n    // return user;\n  }\n  return createClass_default()(User, [{\n    key: \"getUserIdentity\",\n    value: function getUserIdentity() {\n      return this.identity;\n    }\n  }, {\n    key: \"getUserId\",\n    value: function getUserId() {\n      if (this.identity && this.identity.id) {\n        return this.identity.id;\n      }\n      return null;\n    }\n  }, {\n    key: \"openLoginPage\",\n    value: function () {\n      var _openLoginPage = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n        var leftPanel, leftView, path;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              _context.next = 2;\n              return this.logout();\n            case 2:\n              leftPanel = this.app.panel.get(\"left\");\n              leftPanel.open();\n              leftView = this.app.views.get($$(\".view-left\"));\n              path = \"/builder/\";\n              leftView.router.navigate(\"/login/true\", {\n                reloadCurrent: true,\n                ignoreCache: true\n              });\n            case 7:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function openLoginPage() {\n        return _openLoginPage.apply(this, arguments);\n      }\n      return openLoginPage;\n    }()\n  }, {\n    key: \"checkIfIsLogged\",\n    value: function checkIfIsLogged() {\n      var context = this;\n      var user = context;\n      var app = context.app;\n      var dialog;\n      if (app.user.params.mustBeLoggedIn) {\n        dialog = app.dialog.preloader(app.translation.t(\"user:checkingLogin\"));\n        app.data.myEvents.off(\"message:logout\");\n        app.data.myEvents.on(\"message:logout\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n          return regenerator_default.a.wrap(function _callee2$(_context2) {\n            while (1) switch (_context2.prev = _context2.next) {\n              case 0:\n                // app.dialog.alert(\"Musíte být přihlášen/a.\");\n\n                app.data.myEvents.emit(\"user:loadMasterLogin\");\n                dialog.close();\n                if (app.user.dynamicPopup.length) {\n                  app.user.dynamicPopup.remove();\n                }\n              case 3:\n              case \"end\":\n                return _context2.stop();\n            }\n          }, _callee2);\n        })));\n      } else {\n        //TODO offline check if locked\n        // if(navigator.onLine)\n        //console.log(\"user:checkLogin\");\n        app.data.myEvents.emit(\"user:loadBook\");\n      }\n      var iframeUrl = app.apiManager.params.authIframeUrl;\n      if (app.user.params.hasOwnProperty(\"authIframeUrl\") && app.user.params.authIframeUrl) {\n        iframeUrl = app.user.params.authIframeUrl;\n      }\n      app.user.dynamicPopup = $$(\"<iframe id=\\\"myframe1\\\" style=\\\"display: none;\\\" src=\\\"\".concat(iframeUrl, \"\\\" ></iframe>\"));\n      app.root.append(app.user.dynamicPopup[0]);\n\n      // app.data.myEvents.emit(\"message:logout\");\n\n      // app.user.dynamicPopup.open();\n      app.data.myEvents.off(\"message:auth\");\n      app.data.myEvents.on(\"message:auth\", function (token, user) {\n        // debugger\n        context.setUserData(token, user);\n        if (app.user.dynamicPopup.length) {\n          app.user.dynamicPopup.remove();\n        }\n\n        // debugger\n        window.dial = dialog;\n        if (dialog) dialog.close();\n        var toastBottom = app.toast.create({\n          text: app.translation.t(\"user:succLogin\"),\n          closeTimeout: 3000\n        }).open();\n      });\n    }\n  }, {\n    key: \"refreshToken\",\n    value: function () {\n      var _refreshToken = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n        var context, user, app, dialog;\n        return regenerator_default.a.wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              // debugger;\n              context = this;\n              user = context;\n              app = context.app;\n              return _context4.abrupt(\"return\", new Promise(function (resolve, reject) {\n                app.user.dynamicPopup = $$(\"<iframe id=\\\"myframe1\\\" style=\\\"display: none;\\\" src=\\\"\".concat(app.apiManager.params.authIframeUrl, \"\\\" ></iframe>\"));\n                app.root.append(app.user.dynamicPopup[0]);\n                app.data.myEvents.off(\"message:auth\");\n                app.data.myEvents.on(\"message:auth\", /*#__PURE__*/function () {\n                  var _ref2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(token, user) {\n                    return regenerator_default.a.wrap(function _callee3$(_context3) {\n                      while (1) switch (_context3.prev = _context3.next) {\n                        case 0:\n                          // debugger\n                          context.setUserData(token, user, true);\n                          if (app.user.dynamicPopup.length) {\n                            app.user.dynamicPopup.remove();\n                          }\n\n                          // debugger\n                          window.dial = dialog;\n                          if (dialog) dialog.close();\n                          if (token) {\n                            resolve();\n                          }\n\n                          // alert(\"token refreshed\");\n                        case 5:\n                        case \"end\":\n                          return _context3.stop();\n                      }\n                    }, _callee3);\n                  }));\n                  return function (_x, _x2) {\n                    return _ref2.apply(this, arguments);\n                  };\n                }());\n                setTimeout(function () {\n                  reject();\n                }, 2000);\n              }));\n            case 4:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function refreshToken() {\n        return _refreshToken.apply(this, arguments);\n      }\n      return refreshToken;\n    }()\n  }, {\n    key: \"decodeJwt\",\n    value: function () {\n      var _decodeJwt = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5(jwToken) {\n        var app, user;\n        return regenerator_default.a.wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              app = this.app;\n              user = lib_default()(jwToken); // debugger;\n            case 2:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5, this);\n      }));\n      function decodeJwt(_x3) {\n        return _decodeJwt.apply(this, arguments);\n      }\n      return decodeJwt;\n    }()\n  }, {\n    key: \"checkClient\",\n    value: function checkClient(user) {\n      var registered = false;\n      var clients = user.identity.clients;\n      for (var i = 0; i < clients.length; i++) {\n        if (clients[i] == this.app.params.user.client_string) {\n          registered = true;\n          break;\n        }\n      }\n      if (!registered) {\n        var dynamicPopup = app.popup.create({\n          content: '<div class=\"popup\">' + '<div class=\"block\">' + \"<h3>U tohoto klienta nemáte registraci.</h3>\" + \"<p>Chcete použít stávájící účet k registraci?</p>\" + \"<p>\\xDA\\u010Det: <strong>\".concat(user.identity.email, \"</strong></p>\") + '<p><a id=\"register\" class=\"button button-round button-fill\">Zregistrovat se a pokračovat.</a></p>' + '<p><a href=\"#\" class=\"link popup-close\">Zavřít.</a></p>' + \"</div>\" + \"</div>\",\n          on: {\n            open: function open(popup) {\n              var registerBtn = $$(popup.el).find(\"#register\");\n              $$(registerBtn).on(\"click\", function () {\n                alert(\"REGISTERED\");\n              });\n            }\n          }\n        });\n        dynamicPopup.open();\n      }\n    }\n\n    /**\r\n     * Funkce slouží k ověření zda má uživatel roli Editora.\r\n     * @return {bool} True - je editor, False - není editor nebo není možné vytvořit požadavek\r\n     */\n  }, {\n    key: \"isEditorApi\",\n    value: (function () {\n      var _isEditorApi = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6() {\n        var _this, app, user, formData, response, isEditor, _alert;\n        return regenerator_default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              _this = this;\n              app = this.app;\n              user = app.user;\n              formData = new FormData();\n              formData.append(\"bookId\", app.id); //15 TODO app.id\n              _context6.next = 7;\n              return app.utils.axios.post(app.apiManager.params.psIsEditorUrl, formData, {\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 7:\n              response = _context6.sent;\n              isEditor = false;\n              if (response.hasOwnProperty(\"data\") && response.data.hasOwnProperty(\"data\")) {\n                isEditor = response.data.data;\n              }\n              if (!isEditor) {\n                _context6.next = 14;\n                break;\n              }\n              app.user.isEditor = isEditor;\n              _context6.next = 23;\n              break;\n            case 14:\n              //Pokud není editor, tak raději odstraníme všechny předchozí  skupinové komentáře\n              app.user.isEditor = false;\n              _context6.next = 17;\n              return app.database.table(\"notes-select-gc\");\n            case 17:\n              _context6.sent.delete();\n              _context6.next = 20;\n              return app.database.table(\"notes-select\");\n            case 20:\n              _context6.next = 22;\n              return _context6.sent.where(\"type\", \"gc\").delete();\n            case 22:\n              if (app.builder) {\n                if (app.builder.params.development.enable) {\n                  _alert = app.dialog.alert(app.translation.t(\"user:notEditorText\"), app.translation.t(\"user:notEditor\"), function (callback) {\n                    //redirect\n                    var bookUrl = app.book.params.nazevKnihy;\n                    bookUrl = bookUrl.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\").replace(/\\s/g, \"-\").toLowerCase();\n                    var origin = window.location.href;\n                    var newOrigin = origin.replace(\"/builder/editing/\".concat(app.id), \"/book/\".concat(bookUrl));\n                    window.location.replace(newOrigin);\n                  });\n                }\n              }\n            case 23:\n              return _context6.abrupt(\"return\", isEditor);\n            case 24:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6, this);\n      }));\n      function isEditorApi() {\n        return _isEditorApi.apply(this, arguments);\n      }\n      return isEditorApi;\n    }() //todo  zatím se nepoužívá\n    )\n  }, {\n    key: \"getUsersApi\",\n    value: function () {\n      var _getUsersApi = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee7() {\n        var _this, app, user, ts, formData, response, serverComments, _iterator, _step, item, serverComment, localComment;\n        return regenerator_default.a.wrap(function _callee7$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              _this = this;\n              app = this.app; // let notes = await (await app.database.table('allowed-users')).where('df',1).whereNot('user',null).getValue();\n              user = app.user; // try {\n              _context7.next = 5;\n              return app.database.table(\"allowed-users\");\n            case 5:\n              _context7.next = 7;\n              return _context7.sent.max(\"ts\");\n            case 7:\n              ts = _context7.sent;\n              formData = new FormData();\n              formData.append(\"timestamp\", ts);\n              formData.append(\"bookId\", app.id); //15 TODO app.id\n              // formData.append(\"data\", JSON.stringify(notes));\n              _context7.next = 13;\n              return app.utils.axios.post(app.apiManager.params.psGetEditorsUrl, formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 13:\n              response = _context7.sent;\n              serverComments = response.data.data;\n              if (!Array.isArray(serverComments)) {\n                _context7.next = 47;\n                break;\n              }\n              // musí být použít forcyklus, jinak negunguje await při použití forEach\n              _iterator = _createForOfIteratorHelper(serverComments);\n              _context7.prev = 17;\n              _iterator.s();\n            case 19:\n              if ((_step = _iterator.n()).done) {\n                _context7.next = 39;\n                break;\n              }\n              item = _step.value;\n              serverComment = item;\n              serverComment.js_id = parseInt(serverComment.js_id);\n              _context7.next = 25;\n              return app.database.table(\"allowed-users\");\n            case 25:\n              _context7.next = 27;\n              return _context7.sent.where(\"js_id\", serverComment.js_id);\n            case 27:\n              localComment = _context7.sent;\n              if (!localComment.count()) {\n                _context7.next = 33;\n                break;\n              }\n              _context7.next = 31;\n              return localComment.update(serverComment);\n            case 31:\n              _context7.next = 37;\n              break;\n            case 33:\n              _context7.next = 35;\n              return app.database.table(\"allowed-users\");\n            case 35:\n              _context7.next = 37;\n              return _context7.sent.insert(serverComment);\n            case 37:\n              _context7.next = 19;\n              break;\n            case 39:\n              _context7.next = 44;\n              break;\n            case 41:\n              _context7.prev = 41;\n              _context7.t0 = _context7[\"catch\"](17);\n              _iterator.e(_context7.t0);\n            case 44:\n              _context7.prev = 44;\n              _iterator.f();\n              return _context7.finish(44);\n            case 47:\n              return _context7.abrupt(\"return\", true);\n            case 48:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee7, this, [[17, 41, 44, 47]]);\n      }));\n      function getUsersApi() {\n        return _getUsersApi.apply(this, arguments);\n      }\n      return getUsersApi;\n    }()\n    /**\r\n     * Funkce slouží k poslaní žádosti o přístup ke knize.\r\n     * @param {string} accessType\r\n     *    Role přístupu.\r\n     */\n  }, {\n    key: \"askForAccess\",\n    value: (function () {\n      var _askForAccess = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee8() {\n        var accessType,\n          _this,\n          app,\n          user,\n          formData,\n          response,\n          serverComments,\n          _args8 = arguments;\n        return regenerator_default.a.wrap(function _callee8$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              accessType = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : \"editor\";\n              _this = this;\n              app = this.app;\n              user = app.user; // commit(\"LOGIN_REQUEST\");\n              _context8.prev = 4;\n              app.dialog.preloader(\"Odesílám žádost o editorství knihy.\");\n              formData = new FormData();\n              formData.append(\"type\", accessType);\n              formData.append(\"book\", app.id); //15 TODO app.id\n              _context8.next = 11;\n              return app.utils.axios.post(app.apiManager.params.psAskForAccessUrl, formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\",\n                  client: \"nqa6a79bilmsbsvd3s1r\"\n                }\n              });\n            case 11:\n              response = _context8.sent;\n              serverComments = response.data.data;\n              app.dialog.close();\n              app.dialog.alert(\"Odeslání žádosti proběhlo úspěšně. Nyní vyčkejte na její vyřízení, budete informováni e-mailem.\", \"Skvělé!\");\n              return _context8.abrupt(\"return\", true);\n            case 18:\n              _context8.prev = 18;\n              _context8.t0 = _context8[\"catch\"](4);\n              app.dialog.close();\n              app.dialog.alert(\"Při odesílání žádosti došlo k chybě. Zkuste to prosím za chvíli znovu.\");\n              // let launchAgain = await this.proccessError(error);\n              // if (launchAgain) {\n              //   _this.askForAccess(accessType);\n              // }\n            case 22:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee8, this, [[4, 18]]);\n      }));\n      function askForAccess() {\n        return _askForAccess.apply(this, arguments);\n      }\n      return askForAccess;\n    }())\n  }, {\n    key: \"setUserData\",\n    value: function () {\n      var _setUserData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee9(jwToken, userx) {\n        var refresh,\n          app,\n          user,\n          time,\n          _args9 = arguments;\n        return regenerator_default.a.wrap(function _callee9$(_context9) {\n          while (1) switch (_context9.prev = _context9.next) {\n            case 0:\n              refresh = _args9.length > 2 && _args9[2] !== undefined ? _args9[2] : false;\n              app = this.app;\n              user = this; // let userData = jwt_decode(jwToken);\n              // debugger\n              this.identity = userx;\n              // debugger\n              // app.dialog.close();\n\n              user.identity = this.identity;\n              user.identity.fullname = user.identity.name + \" \" + user.identity.surname;\n              user.isLoggedBool = true;\n              user.jwt = jwToken;\n              user.isEditor = false;\n              if (refresh) {\n                _context9.next = 17;\n                break;\n              }\n              if (app.errorHandler) {\n                app.errorHandler.throwRollbarEvent(\"info\", \"User\", {\n                  message: \"User (\" + user.identity.id + \") \" + user.identity.fullname + \" opened book (\" + app.id + \") \" + app.book.params.nazevKnihy\n                }, \"setUserData\");\n              }\n              _context9.next = 13;\n              return user.isEditorApi();\n            case 13:\n              app.data.myEvents.emit(\"logged\", user.identity);\n              app.data.myEvents.emit(\"user:loadBook\");\n              time = app.user.params.refreshTokenTime * 60 * 1000 - 60000; //o minutu dříve než vyprší\n              setInterval(function () {\n                console.info(\"[User] (setUserData) Token refreshed.\");\n                user.refreshToken();\n              }, time);\n            case 17:\n            case \"end\":\n              return _context9.stop();\n          }\n        }, _callee9, this);\n      }));\n      function setUserData(_x4, _x5) {\n        return _setUserData.apply(this, arguments);\n      }\n      return setUserData;\n    }()\n  }, {\n    key: \"register\",\n    value: function () {\n      var _register = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee0(email, name, surname, password, password2) {\n        var formData, msg, app, dialog;\n        return regenerator_default.a.wrap(function _callee0$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              formData = new FormData();\n              formData.append(\"email\", email);\n              formData.append(\"password\", password);\n              formData.append(\"password_confirmation\", password2);\n              formData.append(\"name\", name);\n              formData.append(\"surname\", surname);\n              msg = [];\n              app = this.app;\n              dialog = app.dialog.preloader(\"Registruji...\");\n              return _context0.abrupt(\"return\", app.utils.axios({\n                url: app.apiManager.params.authRegistrationUrl,\n                method: \"POST\",\n                data: formData,\n                headers: {\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\",\n                  client: app.params.user.client_string\n                },\n                withCredentials: true\n              }).then(function (res) {\n                dialog.close();\n                if (res.data.status == \"failed\") {\n                  res.data.errors.forEach(function (item) {\n                    msg.push(item);\n                  });\n                  alert(msg);\n                  return false;\n                } else {\n                  return true;\n                }\n              }).catch(function (err) {\n                dialog.close();\n                return false;\n              }));\n            case 10:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee0, this);\n      }));\n      function register(_x6, _x7, _x8, _x9, _x0) {\n        return _register.apply(this, arguments);\n      }\n      return register;\n    }()\n  }, {\n    key: \"validateEmail\",\n    value: function () {\n      var _validateEmail = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee1(email) {\n        var formData, axiosData, app;\n        return regenerator_default.a.wrap(function _callee1$(_context1) {\n          while (1) switch (_context1.prev = _context1.next) {\n            case 0:\n              formData = new FormData();\n              app = this.app;\n              formData.append(\"email\", email);\n              _context1.next = 5;\n              return app.utils.axios.post(app.apiManager.params.psUrl + \"/api/auth/validate-email\", formData, {\n                headers: {\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\",\n                  client: app.params.user.client_string\n                }\n              }).then(function (res) {\n                return res.data;\n              });\n            case 5:\n              axiosData = _context1.sent;\n              if (!(axiosData.status != \"ok\")) {\n                _context1.next = 9;\n                break;\n              }\n              if (!(axiosData.errors[0] == \"Email already exists\")) {\n                _context1.next = 9;\n                break;\n              }\n              return _context1.abrupt(\"return\", true);\n            case 9:\n              return _context1.abrupt(\"return\", false);\n            case 10:\n            case \"end\":\n              return _context1.stop();\n          }\n        }, _callee1, this);\n      }));\n      function validateEmail(_x1) {\n        return _validateEmail.apply(this, arguments);\n      }\n      return validateEmail;\n    }()\n  }, {\n    key: \"login\",\n    value: function () {\n      var _login = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee10() {\n        var username,\n          password,\n          remember,\n          app,\n          user,\n          dialog,\n          response,\n          message,\n          fu,\n          t,\n          u,\n          _args10 = arguments;\n        return regenerator_default.a.wrap(function _callee10$(_context10) {\n          while (1) switch (_context10.prev = _context10.next) {\n            case 0:\n              username = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : \"admin@futurebooks.cz\";\n              password = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : \"666666\";\n              remember = _args10.length > 2 && _args10[2] !== undefined ? _args10[2] : false;\n              app = this.app;\n              user = this; // commit(\"LOGIN_REQUEST\");\n              _context10.prev = 5;\n              dialog = app.dialog.preloader(app.translation.t(\"user:logingIn\"));\n              _context10.next = 9;\n              return app.utils.axios.post(app.apiManager.params.authLoginUrl,\n              //\"/oauth/token\",\n              {\n                grant_type: \"password\",\n                client_id: \"4\",\n                client_secret: \"PUU6ibisICoIOL7RqqV1t4cm68cmk6MvBp9DQUmE\",\n                login: username,\n                password: password\n              }, {\n                withCredentials: true\n              });\n            case 9:\n              response = _context10.sent;\n              // user.jwt = response.data.access_token;\n\n              dialog.close();\n              _context10.next = 21;\n              break;\n            case 13:\n              _context10.prev = 13;\n              _context10.t0 = _context10[\"catch\"](5);\n              // debugger;\n              dialog.close();\n              message = \"Při přihlašování se vyskytla neznámá chyba :-(\";\n              fu = _context10.t0;\n              if (_context10.t0.hasOwnProperty(\"data\") && _context10.t0.data.hasOwnProperty(\"description\")) {\n                message = _context10.t0.data.description;\n              }\n              app.dialog.alert(message, \"Upozornění!\");\n              // debugger\n              // let toastWithCustomButton = app.notification.create({\n              //   text: message,\n              //   closeButton: true,\n              //   closeButtonText: 'Rozumím',\n              //   closeButtonColor: 'red',\n              // });\n              // toastWithCustomButton.open();\n              return _context10.abrupt(\"return\", false);\n            case 21:\n              t = response.data.token;\n              u = response.data.user;\n              if (!(response.status !== 200)) {\n                _context10.next = 26;\n                break;\n              }\n              app.dialog.alert(app.translation.t(\"user:wrongCredentials\"), app.translation.t(\"warning\"));\n              return _context10.abrupt(\"return\", false);\n            case 26:\n              _context10.next = 28;\n              return this.setUserData(response.data.token, response.data.user);\n            case 28:\n              return _context10.abrupt(\"return\", true);\n            case 29:\n            case \"end\":\n              return _context10.stop();\n          }\n        }, _callee10, this, [[5, 13]]);\n      }));\n      function login() {\n        return _login.apply(this, arguments);\n      }\n      return login;\n    }()\n  }, {\n    key: \"isLogged\",\n    value: function isLogged() {\n      return this.isLoggedBool;\n    }\n  }, {\n    key: \"logout\",\n    value: function () {\n      var _logout = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee12() {\n        var app;\n        return regenerator_default.a.wrap(function _callee12$(_context12) {\n          while (1) switch (_context12.prev = _context12.next) {\n            case 0:\n              app = this.app;\n              return _context12.abrupt(\"return\", new Promise(/*#__PURE__*/function () {\n                var _ref3 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee11(resolve, reject) {\n                  var response;\n                  return regenerator_default.a.wrap(function _callee11$(_context11) {\n                    while (1) switch (_context11.prev = _context11.next) {\n                      case 0:\n                        _context11.next = 2;\n                        return app.utils.axios({\n                          url: app.apiManager.params.authLogoutUrl,\n                          method: \"GET\",\n                          withCredentials: true\n                        });\n                      case 2:\n                        response = _context11.sent;\n                        // let response = await app.utils.axios.get(\n                        //   app.apiManager.params.authLogoutUrl\n                        // );\n\n                        // app.offline.removeAccessData();\n                        app.data.myEvents.emit(\"user:logout\");\n                        resolve(response);\n                      case 5:\n                      case \"end\":\n                        return _context11.stop();\n                    }\n                  }, _callee11);\n                }));\n                return function (_x10, _x11) {\n                  return _ref3.apply(this, arguments);\n                };\n              }()));\n            case 2:\n            case \"end\":\n              return _context12.stop();\n          }\n        }, _callee12, this);\n      }));\n      function logout() {\n        return _logout.apply(this, arguments);\n      }\n      return logout;\n    }()\n  }, {\n    key: \"logout2\",\n    value: function () {\n      var _logout2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee14() {\n        var app;\n        return regenerator_default.a.wrap(function _callee14$(_context14) {\n          while (1) switch (_context14.prev = _context14.next) {\n            case 0:\n              app = this.app;\n              return _context14.abrupt(\"return\", new Promise(function (resolve, reject) {\n                app.user.dynamicPopup = $$(\"<iframe id=\\\"myframe2\\\" src=\\\"\".concat(app.apiManager.params.authLogoutUrl, \"\\\" width=\\\"0\\\" height=\\\"0\\\" style=\\\"display: none;\\\"></iframe>\"));\n                app.root.append(app.user.dynamicPopup[0]);\n                app.data.myEvents.off(\"message:logout\");\n                app.data.myEvents.on(\"message:logout\", /*#__PURE__*/function () {\n                  var _ref4 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee13(token) {\n                    return regenerator_default.a.wrap(function _callee13$(_context13) {\n                      while (1) switch (_context13.prev = _context13.next) {\n                        case 0:\n                          // debugger\n                          app.user.identity = null;\n                          app.user.isLoggedBool = false;\n                          app.user.jwt = false;\n                          _context13.next = 5;\n                          return app.database.table(\"uda\");\n                        case 5:\n                          _context13.next = 7;\n                          return _context13.sent.delete();\n                        case 7:\n                          app.data.myEvents.emit(\"user:logout\");\n                          if (app.user.dynamicPopup.length) {\n                            app.user.dynamicPopup.remove();\n                          }\n                          resolve(\"logged out!\");\n                        case 10:\n                        case \"end\":\n                          return _context13.stop();\n                      }\n                    }, _callee13);\n                  }));\n                  return function (_x12) {\n                    return _ref4.apply(this, arguments);\n                  };\n                }());\n                if (app.user.params.mustBeLoggedIn) {\n                  var leftPanel = app.panel.get(\".panel-left\");\n                  leftPanel.close();\n                }\n              }));\n            case 2:\n            case \"end\":\n              return _context14.stop();\n          }\n        }, _callee14, this);\n      }));\n      function logout2() {\n        return _logout2.apply(this, arguments);\n      }\n      return logout2;\n    }()\n  }]);\n}();\n/* harmony default export */ var user_user = ({\n  name: \"user\",\n  params: {\n    user: {\n      autoLogin: true,\n      authIframeUrl: false,\n      // default je fu.domainPath + \"/frontend/auth/signin\";\n      client_string: null,\n      mustBeLoggedIn: false,\n      refreshTokenTime: 1440,\n      //V minutách (1440 = 24h)\n      lang: {\n        cs: {\n          user: \"Uživatel\",\n          permission: \"Vaše opravnění je\",\n          editor: \"EDITOR\",\n          reader: \"ČTENÁŘ\",\n          logOut: \"Odhlásit se\",\n          logIn: \"Přihlásit\",\n          userName: \"E-mail\",\n          pass: \"Heslo\",\n          rememberLogIn: \"Zapamatovat přihlášení\",\n          notYetRegister: \"Ještě nemáte účet? Zaregistrujte se!\",\n          register: \"Registrace\",\n          email: \"E-mail\",\n          name: \"Jméno\",\n          surname: \"Příjmení\",\n          passAgain: \"Heslo znovu\",\n          showPass: \"Zobrazit heslo\",\n          doRegistration: \"Zaregistrovat se\",\n          permHeader: \"Oprávnění\",\n          editorText: \"Můžete k této knize přidávat poznámky zvýraznění ad. Tato data budou synchronizována k této knize, kdykoloiv se přihlásíte napříč všemi Vašimi zařízeními.\",\n          editorText2: \"Jako <b>Editor</b> se m\\u016F\\u017Ee tak\\xE9 pod\\xEDlet na tvorb\\u011B a oprav\\xE1ch obsahu knihy. Tato role je\\n          v\\u011Bt\\u0161inou vyhrazena autor\\u016Fm, spoluautor\\u016Fm, korektor\\u016Fm, grafik\\u016Fm, program\\xE1tor\\u016Fm a dal\\u0161\\xEDm lidem\\n          pod\\xEDlej\\xEDc\\xEDm se na tvorb\\u011B knihy.\",\n          readerText: \"Jako \\u010Dten\\xE1\\u0159 m\\u016F\\u017Eete k t\\xE9to knize p\\u0159id\\xE1vat pozn\\xE1mky zv\\xFDrazn\\u011Bn\\xED ad.\\n          Tato data budou synchronizov\\xE1na k t\\xE9to knize, kdykoloiv se p\\u0159ihl\\xE1s\\xEDte nap\\u0159\\xED\\u010D v\\u0161emi Va\\u0161imi za\\u0159\\xEDzen\\xEDmi.\",\n          editorText3: \"se m\\u016F\\u017Ee tak\\xE9 pod\\xEDlet na tvorb\\u011B a oprav\\xE1ch obsahu knihy. Tato role je\\n          v\\u011Bt\\u0161inou vyhrazena autor\\u016Fm, spoluautor\\u016Fm, korektor\\u016Fm, grafik\\u016Fm, program\\xE1tor\\u016Fm a dal\\u0161\\xEDm lidem\\n          pod\\xEDlej\\xEDc\\xEDm se na tvorb\\u011B knihy.\\n          <br>\\n          Pokud za\\u0159\\xE1d\\xE1te o editorstv\\xED knihy, bude vyhodnoceno zda m\\xE1te n\\xE1rok knihu spravovat jako editor\\n          a n\\xE1sledn\\u011B V\\xE1m bude zasl\\xE1n mail s informac\\xED o schv\\xE1len\\xED, \\u010Di zam\\xEDtnut\\xED \\u017E\\xE1dosti.\",\n          requestEditor: \"Zažádat o editorství\",\n          enterUsername: \"Vyplňte e-mail\",\n          enterPassword: \"Vyplňte heslo\",\n          enterName: \"Vyplňte jméno\",\n          enterPassAgain: \"Vyplňte heslo znovu\",\n          enterSurname: \"Vyplňte příjmení\",\n          checkingLogin: \"Ověřuji přihlášení\",\n          logingIn: \"Přihlašuji...\",\n          wrongCredentials: \"Chybné přihlašovací údaje\",\n          succLogin: \"Byli jste automaticky přihlášeni.\",\n          notEditor: \"Nejste editor\",\n          notEditorText: \"Nemáte oprávnění editora pro tuto knihu. Dojde k přesměrování zpět do verze pro čtení.\"\n        },\n        en: {\n          user: \"User\",\n          permission: \"Your permission is\",\n          editor: \"EDITOR\",\n          reader: \"READER\",\n          logOut: \"Log out\",\n          logIn: \"Log in\",\n          userName: \"Username\",\n          pass: \"Password\",\n          rememberLogIn: \"Remember Log in\",\n          notYetRegister: \"Not yet registered? Do it now!\",\n          register: \"Registration\",\n          email: \"E-mail\",\n          name: \"Name\",\n          surname: \"Surname\",\n          passAgain: \"Password again\",\n          showPass: \"Show password\",\n          doRegistration: \"Register\",\n          permHeader: \"Permission\",\n          editorText: \"You can add highlighted notes ad. This data will be synchronized to this book when you log in on another device.\",\n          editorText2: \"As <b>Editor</b> you may also participate in the creation and correction of the books content. This role is usually reserved for authors, co-authors, proofreaders, graphic designers, programmers and other people involved in the creation of the book.\",\n          readerText: \"As a reader, you can add highlighted notes ad. This data will be synchronized to this book when you log in another devices.\",\n          editorText3: \"may also participate in the creation and correction of the books content. This role is usually reserved for authors, co-authors, proofreaders, graphic designers, programmers and other people involved in the production of the book.\\n          <br>\\n          If you apply to be an editor of a book, you will be evaluated to see if you qualify to manage the book as an editor and then you will be sent an email informing you about result of your application.\\n          \",\n          requestEditor: \"Apply to be an editor\",\n          enterUsername: \"Enter your e-mail\",\n          enterPassword: \"Enter your password\",\n          enterName: \"Enter your name\",\n          enterPassAgain: \"Enter your password again\",\n          enterSurname: \"Enter your surname\",\n          checkingLogin: \"Checking log in status\",\n          logingIn: \"Loging in...\",\n          wrongCredentials: \"E-mail and password does not match\",\n          succLogin: \"You have been automatically logged in\",\n          notEditor: \"You are not an editor\",\n          notEditorText: \"You don't have editor authorization for this book. You will be redirected back to read version.\"\n        }\n      }\n    }\n  },\n  static: {\n    user: user_User\n  },\n  create: function create() {\n    var app = this;\n    app.routes.push({\n      name: \"Uživatel\",\n      path: \"/user/\",\n      component: user_default_f7\n    });\n    app.routes.push({\n      name: \"Přihlášení\",\n      path: \"/login/:sideMenu\",\n      component: user_login_f7\n    });\n    app.routes.push({\n      name: \"Role\",\n      path: \"/user-role/\",\n      component: user_role_f7\n    });\n    app.routes.push({\n      name: \"Registrace\",\n      path: \"/register/:sideMenu\",\n      component: user_register_f7\n    });\n    app.user = new user_User(app);\n\n    // app.data.user = app.user;\n  }\n});\n// EXTERNAL MODULE: ./node_modules/pusher-js/dist/web/pusher.js\nvar pusher = __webpack_require__(\"./node_modules/pusher-js/dist/web/pusher.js\");\n\n// EXTERNAL MODULE: ./node_modules/laravel-echo/dist/echo.js\nvar echo = __webpack_require__(\"./node_modules/laravel-echo/dist/echo.js\");\n\n// EXTERNAL MODULE: ./node_modules/sortablejs/modular/sortable.esm.js\nvar sortable_esm = __webpack_require__(\"./node_modules/sortablejs/modular/sortable.esm.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/api-manager/apiManager.js\n\n\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n//TODO jak udělat push notifikaci https://medium.com/@sagarmaheshwary31/push-notifications-with-laravel-and-webpush-446884265aaa\n\n\n\n\n\nvar apiInterval = 86340000; //23h 59m\nvar domain = \"https://vovcr.futurebooks.cz/server\";\nvar apiManager_ApiManager = /*#__PURE__*/function () {\n  function ApiManager(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, ApiManager);\n    this.app = app;\n    var apiManager = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, params, app.params.apiManager);\n    apiManager.params = extendedParams;\n    window.historyX = [];\n    window.globalData = [];\n    window.solution = [];\n    app.utils.axios.defaults.headers.common[\"App-Key\"] = apiManager.params.AppKey;\n\n    // debugger\n    if (apiManager.params.enable) {\n      // debugger\n      apiManager.init();\n    }\n  }\n  return createClass_default()(ApiManager, [{\n    key: \"init\",\n    value: function init() {\n      var apiManager = this;\n      var app = apiManager.app;\n      var timer = null;\n      var socket = null;\n\n      /**\r\n       * Event se spusí po přihlášení\r\n       */\n      app.data.myEvents.on(\"logged\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              /**\r\n               * Inicializace a spuštění WebSocketu\r\n               * Provede se pouze pokud je server dostupný a uživatel je editorem\r\n               */\n              socket = new echo[\"default\"]({\n                broadcaster: \"pusher\",\n                key: app.apiManager.params.key,\n                wsHost: app.apiManager.params.wsHost,\n                //Adresa na websockets server\n                wsPort: app.apiManager.params.wsPort,\n                //Port kde běží websocket server,\n                wssPort: app.apiManager.params.wssPort,\n                cluster: app.apiManager.params.cluster,\n                authEndpoint: app.apiManager.params.authEndpoint,\n                disableStats: true,\n                forceTLS: true,\n                //Nastavení autorizačního headeru\n                auth: {\n                  headers: {\n                    Accept: \"application/json\",\n                    Authorization: \"Bearer \" + app.user.jwt\n                  }\n                },\n                encrypted: true,\n                enabledTransports: [\"ws\", \"wss\"]\n              });\n\n              /**\r\n               *  Nastavení pro Socket connection\r\n               */\n              socket.connector.pusher.connection.bind(\"connected\", function () {\n                // alert('websocket připojen');\n                app.utils.axios.defaults.headers.common[\"X-Socket-Id\"] = socket.socketId(); //Nastavení hlavičky se socket id -> zamezí zasílání WS uživateli, který data odeslal\n\n                app.data.myEvents.emit(\"ws:connected\", socket);\n              });\n\n              /**\r\n               *  Nastavení pro Socket connection\r\n               */\n              socket.connector.pusher.connection.bind(\"error\", function (error) {\n                console.error(error);\n              });\n              socket.connector.pusher.connection.bind(\"state_change\", function (states) {\n                console.info(\"[ApiManager] WEBSOCKET status changed to: \", states.current);\n                // alert('websocket change');\n              });\n            case 4:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee);\n      })));\n      app.data.myEvents.on(\"user:logout\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              socket.disconnect();\n            case 1:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2);\n      })));\n    }\n\n    /**\r\n     * todo přestalo se používat\r\n     * Funkce k ověření, zda je možné odeslat požadavek.\r\n     * Kontroluje zda je uživatel přihlášen a zda je server dostupný.\r\n     * @return {bool} True - je možné vytvořit požadavek na API, False - není možné vytvořit požadavek\r\n     */\n  }, {\n    key: \"couldMakeRequest\",\n    value: (function () {\n      var _couldMakeRequest = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n        var app, timestamp;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              // debugger;\n              app = fu.app;\n              if (app.user.isLogged()) {\n                _context3.next = 3;\n                break;\n              }\n              return _context3.abrupt(\"return\", false);\n            case 3:\n              _context3.next = 5;\n              return fu.getTime();\n            case 5:\n              timestamp = _context3.sent;\n              if (timestamp) {\n                _context3.next = 8;\n                break;\n              }\n              return _context3.abrupt(\"return\", false);\n            case 8:\n              return _context3.abrupt(\"return\", true);\n            case 9:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3);\n      }));\n      function couldMakeRequest() {\n        return _couldMakeRequest.apply(this, arguments);\n      }\n      return couldMakeRequest;\n    }()\n    /**\r\n     * Funkce k řešení eroru.\r\n     * Pokud se chybu nepodaří vyřešit -> vytvoří alert s příčinou erroru.\r\n     * @param {object} error\r\n     *    Objekt obsahující informace o chybě.\r\n     * @return {bool} True - podařilo se vyřešit chybu (můžeme se pokusit o opakování požadavku), False - nepodařilo se vyřešit chybu\r\n     */\n    )\n  }, {\n    key: \"proccessError\",\n    value: (function () {\n      var _proccessError = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5(error) {\n        var app, status, message, rfr, _rfr, isLogged;\n        return regenerator_default.a.wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              _rfr = function _rfr3() {\n                _rfr = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n                  return regenerator_default.a.wrap(function _callee4$(_context4) {\n                    while (1) switch (_context4.prev = _context4.next) {\n                      case 0:\n                        if (!rfr) {\n                          _context4.next = 2;\n                          break;\n                        }\n                        return _context4.abrupt(\"return\", true);\n                      case 2:\n                      case \"end\":\n                        return _context4.stop();\n                    }\n                  }, _callee4);\n                }));\n                return _rfr.apply(this, arguments);\n              };\n              rfr = function _rfr2() {\n                return _rfr.apply(this, arguments);\n              };\n              app = fu.app;\n              status = 0;\n              message = null;\n              if (error.response && error.response.status) {\n                status = error.response.status;\n              }\n              // debugger\n              if (error.response && error.response.data && error.response.data.message) {\n                message = error.response.data.message;\n              } else if (error.response && error.response.data && error.response.data.error_description) {\n                message = error.response.data.error_description;\n              }\n              _context5.t0 = status;\n              _context5.next = _context5.t0 === 401 ? 10 : _context5.t0 === 403 ? 15 : _context5.t0 === 500 ? 16 : _context5.t0 === 0 ? 18 : 19;\n              break;\n            case 10:\n              _context5.next = 12;\n              return rfr();\n            case 12:\n              isLogged = _context5.sent;\n              if (!isLogged) {\n                message = \"Musíte být přihlášen/a.\";\n              }\n              return _context5.abrupt(\"break\", 20);\n            case 15:\n              return _context5.abrupt(\"break\", 20);\n            case 16:\n              message = \"Na serveru došlo k chybě.\";\n              return _context5.abrupt(\"break\", 20);\n            case 18:\n              return _context5.abrupt(\"break\", 20);\n            case 19:\n              message = message;\n            case 20:\n              if (message) {\n                // app.dialog.alert(message, \"Upozornění!\");\n              }\n              return _context5.abrupt(\"return\", false);\n            case 22:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5);\n      }));\n      function proccessError(_x) {\n        return _proccessError.apply(this, arguments);\n      }\n      return proccessError;\n    }())\n  }, {\n    key: \"replaceMediaServerPlaceholder\",\n    value: function replaceMediaServerPlaceholder(string) {\n      var self = this;\n      var app = self.app;\n      return string.replace(/{{mediaServerDomain}}/g, app.apiManager.params.mediaUrlDomain);\n    }\n\n    /**\r\n     * Funkce získá čas ze serveru.\r\n     * @return {number} Funkce vrací timestamp\r\n     */\n  }, {\n    key: \"getTime\",\n    value: (function () {\n      var _getTime = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6() {\n        var app, response, timestamp;\n        return regenerator_default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              app = fu.app;\n              _context6.prev = 1;\n              _context6.next = 4;\n              return app.utils.axios.post(app.apiManager.params.psUrl + \"/api/time/get\");\n            case 4:\n              response = _context6.sent;\n              timestamp = response.data.timestamp;\n              return _context6.abrupt(\"return\", timestamp);\n            case 9:\n              _context6.prev = 9;\n              _context6.t0 = _context6[\"catch\"](1);\n              fu.proccessError(_context6.t0);\n            case 12:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6, null, [[1, 9]]);\n      }));\n      function getTime() {\n        return _getTime.apply(this, arguments);\n      }\n      return getTime;\n    }())\n  }]);\n}();\n/* harmony default export */ var api_manager_apiManager = ({\n  name: \"apiManager\",\n  params: {\n    apiManager: {\n      enable: true,\n      domain: \"https://vovcr.futurebooks.cz\",\n      domainPath: \"https://vovcr.futurebooks.cz/server\",\n      mediaUrl: \"https://mediats.futurebooks.cz\",\n      mediaUrlDomain: \"https://mediats.futurebooks.cz\",\n      key: \"x7FeLQH6rczqXcBEbQkqmuwKAbw9SGKj\",\n      wsHost: \"wsocket.futurebooks.cz\",\n      //Adresa na websockets server\n      wsPort: \"6002\",\n      //Port kde běží webparamssocket server,\n      wssPort: \"6002\",\n      cluster: \"HGG12p2jby\",\n      AppKey: \"\"\n    }\n  },\n  static: {\n    Storage: apiManager_ApiManager\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      var fu = {};\n      fu.domainPath = app.params.apiManager.domainPath;\n      fu.domain = app.params.apiManager.domain;\n      fu.mediaPath = app.params.apiManager.mediaUrlDomain;\n      var params = {\n        get psUrl() {\n          return fu.domainPath;\n        },\n        get psIsEditorUrl() {\n          return fu.domainPath + \"/api/book/is-editor\";\n        },\n        get psGetEditorsUrl() {\n          return fu.domainPath + \"/api/book/get-users-edit-book\";\n        },\n        get psAskForAccessUrl() {\n          return fu.domainPath + \"/api/book/request-book/\";\n        },\n        get psUserAccessData() {\n          return fu.domainPath + \"/api/book/user-books-access\";\n        },\n        get psListVersionUrl() {\n          return fu.domainPath + \"/api/builder/list-version/\";\n        },\n        get psGetVersionUrl() {\n          return fu.domainPath + \"/api/builder/get-version/\";\n        },\n        get psGetDataUserUrl() {\n          return fu.domainPath + \"/api/builder/get-data-user\";\n        },\n        get psBuilderSaveUrl() {\n          return fu.domainPath + \"/api/builder/save\";\n        },\n        get psSaveVersionUrl() {\n          return fu.domainPath + \"/api/builder/save-version\";\n        },\n        get psSaveDataUserUrl() {\n          return fu.domainPath + \"/api/builder/save-data-user\";\n        },\n        get psSetPublicUrl() {\n          return fu.domainPath + \"/api/builder/set-public/\";\n        },\n        get bookBuilderUrl() {\n          return fu.domainPath + \"/builder/editing/\" + app.id;\n        },\n        get wsHistoryComponentUrl() {\n          return fu.domainPath + \"/api/builder/history-component\";\n        },\n        get psHistoryUrl() {\n          return fu.domainPath + \"/api/builder/all-history\";\n        },\n        get authUrl() {\n          return fu.domain;\n        },\n        get authIframeUrl() {\n          return fu.domainPath + \"/frontend/auth/signin\";\n        },\n        get authLoginUrl() {\n          return fu.domainPath + \"/api/auth/login\";\n        },\n        get authLogoutUrl() {\n          return fu.domainPath + \"/api/auth/logout\";\n        },\n        get authRegistrationUrl() {\n          return fu.domainPath + \"/api/auth/register\";\n        },\n        get authGetMeUrl() {\n          return fu.domainPath + \"/api/auth/me\";\n        },\n        //TODO zatím není použit},\n        get psCheckBookHash() {\n          return fu.domainPath + \"/book-admin/comparison-open/\" + app.id;\n        },\n        get mediaPublicPath() {\n          return fu.mediaPath + \"/public/\";\n        },\n        get saveReadData() {\n          return fu.domainPath + \"/api/builder/reading-positions\";\n        },\n        get getReadData() {\n          return fu.domainPath + \"/api/builder/reading-position\";\n        },\n        get authEndpoint() {\n          return fu.domainPath + \"/broadcasting/auth\";\n        } //TODO zjistit\n      };\n      app.apiManager = new apiManager_ApiManager(app, params);\n    }\n  },\n  create: function create() {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/websocket/templates/websocket.f7.html\n/* harmony default export */ var websocket_f7 = ({\n  data: function () {\n    return {};\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n    }\n  },\n  id: 'fd3ef54291',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Websocket</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n\\n      <h1>Websocket</h1>\\n\\n    </div>\\n\\n\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Websocket Websocket `\n});\n// EXTERNAL MODULE: ./node_modules/socket.io-client/lib/index.js\nvar socket_io_client_lib = __webpack_require__(\"./node_modules/socket.io-client/lib/index.js\");\nvar socket_io_client_lib_default = /*#__PURE__*/__webpack_require__.n(socket_io_client_lib);\n\n// EXTERNAL MODULE: ./node_modules/axios/index.js\nvar axios = __webpack_require__(\"./node_modules/axios/index.js\");\nvar axios_default = /*#__PURE__*/__webpack_require__.n(axios);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/websocket/websocket.js\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n\n\n\n\nvar websocket_URL = \"https://autorizace.futurebooks.cz\";\nvar websocket_Websocket = /*#__PURE__*/function () {\n  function Websocket(app, params) {\n    classCallCheck_default()(this, Websocket);\n    var bookSettings = this;\n\n    // const defaults = Utils.extend({}, app.params);\n    // user.params = Utils.extend(defaults, params);\n\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.user, params);\n    bookSettings.params = extendedParams;\n    this.app = app;\n    app.on(\"init\", function (page) {});\n  }\n  return createClass_default()(Websocket, [{\n    key: \"connect\",\n    value: function connect() {\n      // var connection = new autobahn.Connection({url: 'ws://192.168.0.105:8443', realm: 'realm1'});\n\n      // WAMP server\n      // var wsuri = \"ws://192.168.0.105:8443\";\n\n      var wsuri = \"ws://localhost:3000\";\n      var socket = socket_io_client_lib_default()(wsuri);\n      socket.on(\"connect\", function () {\n        alert(\"connected\");\n      });\n      socket.on(\"event\", function (data) {});\n      socket.on(\"disconnect\", function () {\n        alert(\"disconected\");\n      });\n      echo[\"default\"].private(\"App.User.1\").notification(function (notification) {\n        alert(notification.type);\n      });\n    }\n  }, {\n    key: \"connect2\",\n    value: function connect2() {\n      var _this = this;\n      window.axios = axios_default.a;\n      window.axios.defaults.headers.common[\"X-Requested-With\"] = \"XMLHttpRequest\";\n      window.axios.defaults.headers.common[\"X-CSRF-TOKEN\"] = \"AVZlVUfqqU81tmqAp8W1antpuerI36FsMxRlsvOH\";\n      var socket = new echo[\"default\"]({\n        broadcaster: \"pusher\",\n        key: \"websocketkey\",\n        wsHost: \"ws.futurebooks.cz\",\n        wsPort: 6001,\n        authEndpoint: \"https://ws.futurebooks.cz/broadcasting/auth\",\n        disableStats: false,\n        auth: {\n          headers: {\n            Authorization: \"Bearer \" + \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjgyMjMxMDQ0MDI2MzcxYzE5YWJhN2E1YWMxM2ZlOTdmMTJiZmRjMDNhMzEzNDdhNmFkMGY5YjE1ZDlmNzgwZWMzMDhhN2Q2NzYxMjE0Mjg1In0.eyJhdWQiOiIyIiwianRpIjoiODIyMzEwNDQwMjYzNzFjMTlhYmE3YTVhYzEzZmU5N2YxMmJmZGMwM2EzMTM0N2E2YWQwZjliMTVkOWY3ODBlYzMwOGE3ZDY3NjEyMTQyODUiLCJpYXQiOjE1ODMxNTIxODUsIm5iZiI6MTU4MzE1MjE4NSwiZXhwIjoxNTgzMjM4NTg1LCJzdWIiOiI4MzMiLCJzY29wZXMiOltdLCJpZGVudGl0eSI6eyJpZCI6ODMzLCJzaGliYm9sZXRoIjpudWxsLCJuYW1lIjoiQWRtaW4gVGVzdG92aVx1MDEwZCIsImVtYWlsIjoibWVsaWNoYXJAc29mdHJlc291cmNlLmN6Iiwicm9sZSI6Miwic3RhciI6MCwiZ2xvYmFsIjoxLCJ2ZXJpZmllZCI6MSwiY3JlYXRlZCI6IjIwMjAtMDEtMjEgMTQ6MTg6MzUiLCJsYXN0X2xvZ2luIjpudWxsLCJsYXN0X2xvZ2luX3R5cGUiOm51bGwsImxhc3RfbG9naW5fY2xpZW50X2lkIjpudWxsLCJ1c2VyX2luZm9faWQiOm51bGwsInJlZ2lzdHJhdG9yX2lkIjpudWxsfX0.NYC7EQh4tsmDppOGz3XnvufUDRbLNb1GKlWsM3ccqf7XDHPtluZEDElpmXRsQwdljhwntxhZvwnyv2jhRPRd_4LxnsIk8Ld1UpJYgc4JJYCiU9KJv2yIJcGpyq8gYcShwefxH_Ql2D8GjNNKXQmi_qPZG7_enkZ5Xu4hZWY-ehQEJ7cs-7fJE72ZxFav6eaugU6ESIjJfeSP6YeiBH-6S65z6HLjnSd9pCDb40JieWfmrFmq4wqvOqnk1HOXNa7VhjGglXKQVmEbRyBOKt2p0h0GzFC0ESpBaDNOldij0MK1B7bNzjiksD-eu0VItJ9UyjJlNBQHB-7OmPUhbBMnXlfofc8mZ_mqZeAf_8dPUbM-8CSGiFRNZUlfmGWBHZEHufoc5zl7Wj7y52lVaEKcNh2ZehNIR0TpizjrleQKFAi_eh3lmkOWKt8krrqT1weVd308Pb6rOv9N91IC12UsAWe4mWRCAilUeXypNl1o6YSdFGNp4dZkzm6PI5Dd_uazvzM_DkdW8gXeL27uy22oWo_NVYoU3sLvveNs9cRqr_20mNiOpPiWuhYo3r1xBTPJAq23on-wHXbgql_owmDtnqYQJaAUtq61jyOx0mW5D6rp4rIuiMRyTamdQfE5OY53BNj35WTifxUmmoHXOylBxWmaaNrCbpuw2RgUYgo3mLc\"\n          }\n        }\n      });\n      var roomId = 1;\n      this.users = [];\n      this.messages = [];\n      socket.join(\"chat\").here(function (users) {\n        _this.users = users;\n      }).joining(function (user) {\n        _this.users.push(user);\n      }).leaving(function (user) {\n        _this.users = _this.users.filter(function (u) {\n          return u.id !== user.id;\n        });\n      }).listenForWhisper(\"typing\", function (_ref) {\n        var id = _ref.id,\n          name = _ref.name;\n        _this.users.forEach(function (user, index) {\n          if (user.id === id) {\n            user.typing = true;\n\n            // this.$set(this.users, index, user);\n          }\n        });\n      }).listen(\".MessageSent\", function (event) {\n        _this.messages.push({\n          message: event.message.message,\n          user: event.user\n        });\n        _this.users.forEach(function (user, index) {\n          if (user.id === event.user.id) {\n            user.typing = false;\n\n            // this.$set(this.users, index, user);\n          }\n        });\n      });\n    }\n  }]);\n}();\n/* harmony default export */ var websocket = ({\n  name: \"websocket\",\n  params: {\n    bookSettings: {}\n  },\n  static: {\n    websocket: websocket_Websocket\n  },\n  create: function create(params) {\n    var app = this;\n    app.routes.push({\n      name: \"Websocket\",\n      path: \"/websocket/\",\n      component: websocket_f7\n    });\n    app.websocket = new websocket_Websocket(app, params);\n\n    // app.data.user = app.user;\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/jsToCss.js\n\nvar _JSToCSS = function JSToCSS(JS) {\n  var prepend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  var cssString = '';\n  for (var objectKey in JS) {\n    if (typeof_default()(JS[objectKey]) !== 'object') {\n      cssString += prepend + objectKey.replace(/([A-Z])/g, function (g) {\n        return \"-\".concat(g[0].toLowerCase());\n      }) + \": \" + JS[objectKey] + \";\";\n    } else {\n      prepend = objectKey.replace(/([A-Z])/g, function (g) {\n        return \"-\".concat(g[0].toLowerCase());\n      }) + '-';\n      cssString += _JSToCSS(JS[objectKey], prepend);\n      prepend = '';\n    }\n  }\n  return cssString;\n};\n/* harmony default export */ var jsToCss = (_JSToCSS);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderComponent.js\n\n\n\n\n\n\n\n\n\n\nfunction builderComponent_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction builderComponent_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? builderComponent_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : builderComponent_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction builderComponent_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderComponent_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderComponent_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderComponent_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderComponent_arrayLikeToArray(r, a) : void 0; } }\nfunction builderComponent_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction builderComponent_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, builderComponent_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction builderComponent_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (builderComponent_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint no-nested-ternary: off */\n// import $ from 'dom7';\n\n\n// https://github.com/sindresorhus/on-change\nvar builderComponent_onChange = __webpack_require__(/*! on-change */ \"./node_modules/on-change/index.js\");\n\n// import $$ from 'dom7';\n\n// import {css} from \"glamor\";\n// import cssReset from \"glamor/reset\";\n//https://medium.com/@tkh44/writing-a-css-in-js-library-from-scratch-96cd23a017b4\n//https://www.styled-components.com/docs/advanced#style-objects\n// http://fela.js.org/docs/basics/Renderer.html\n//https://medium.com/warsawjs/css-in-js-in-real-life-e0b50bbbd740\n\n//https://github.com/Khan/aphrodite\n// import { StyleSheet, css } from 'aphrodite';\n//\n// // import xtest from 'jss-pluhn'\n\n\n\n//TODO vypadá dobře https://cssinjs.org/?v=v10.0.0\n// import jss from \"jss\";\n// import preset from \"jss-preset-default\";\n\n\n// import somePlugin from 'jss-plugin-rule-value-function'\nvar builderComponent_BuilderComponent = /*#__PURE__*/function (_Framework7Class) {\n  function BuilderComponent(app) {\n    var _this2;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, BuilderComponent);\n    // Extends with open/close Modal methods;\n    _this2 = builderComponent_callSuper(this, BuilderComponent, [params, [app]]);\n    var builderComponent = _this2;\n    builderComponent.app = app;\n    var builder = app.builder;\n    builderComponent.allowHistory = true;\n    builderComponent.builder = builder;\n    builderComponent.reRenderVariable = false;\n    var defaults = utils[\"default\"].extend({}, app.params.builderComponent);\n\n    // Extend defaults with modules params\n    builderComponent.useModulesParams(defaults);\n    builderComponent.params = utils[\"default\"].extend(defaults, params);\n    utils[\"default\"].extend(builderComponent, {\n      app: app\n    });\n    builderComponent.initData();\n\n    // jss.use(somePlugin());\n    // jss.setup(preset());\n\n    builderComponent.useModules();\n    return possibleConstructorReturn_default()(_this2, builderComponent);\n  }\n  inherits_default()(BuilderComponent, _Framework7Class);\n  return createClass_default()(BuilderComponent, [{\n    key: \"isFirstInReference\",\n    value: function isFirstInReference() {\n      var builderComponent = this;\n      var componentsReferenceUndeleted = this.componentsReferenceUndeleted();\n      var index = _.findIndex(componentsReferenceUndeleted, function (o) {\n        return o.params.id == builderComponent.params.id;\n      });\n      if (index === 0) {\n        return true;\n      } else {\n        return false;\n      }\n    }\n  }, {\n    key: \"isLastInReference\",\n    value: function isLastInReference() {\n      var componentsReferenceUndeleted = this.componentsReferenceUndeleted();\n      var builderComponent = this;\n      var index = _.findIndex(componentsReferenceUndeleted, function (o) {\n        return o.params.id == builderComponent.params.id;\n      });\n      var index2 = componentsReferenceUndeleted.length - 1;\n      // debugger\n\n      if (index === index2) {\n        return true;\n      } else {\n        return false;\n      }\n    }\n  }, {\n    key: \"componentsReferenceUndeleted\",\n    value: function componentsReferenceUndeleted() {\n      var builderComponent = this;\n      var componentsInSameLevel = builderComponent.componentsReference;\n      var componentsInSameLevelUndeleted = _.filter(componentsInSameLevel, function (o) {\n        return o.params.content.delete === false;\n      });\n      componentsInSameLevelUndeleted = _.orderBy(componentsInSameLevelUndeleted, \"params.content.position\");\n      return componentsInSameLevelUndeleted;\n    }\n  }, {\n    key: \"initData\",\n    value: function initData() {\n      var builderComponent = this;\n      var app = builderComponent.app;\n      var builder = app.builder;\n      if (!builderComponent.params.hasOwnProperty(\"userContent\")) {\n        builderComponent.params.userContent = {};\n      }\n      if (!builderComponent.params.content.hasOwnProperty(\"customClasses\")) {\n        builderComponent.params.content.customClasses = \"\";\n      }\n      if (!builderComponent.params.content.hasOwnProperty(\"customAnimation\")) {\n        builderComponent.params.content.customAnimation = {\n          enabled: false,\n          class: null,\n          duration: 0,\n          repeat: false,\n          delay: 0\n        };\n      }\n      function isPrimitive(test) {\n        return test !== Object(test) && typeof test === \"string\";\n      }\n      function stripHtmlToText(html) {\n        var regex = /(<([^>]+)>)/gi,\n          res = html.replace(regex, \"\");\n\n        // res.replace(\"\\u200B\", \"\"); // zero width space\n        // res.replace(\"&nbps;\", \"\");\n        res = res.replace(/\\u200B/g, \"\");\n        res = res.replace(/&nbsp;/g, \" \");\n        res = res.trim();\n        return res;\n      }\n      function replaceMarks(content) {\n        if (content) {\n          Object.keys(content).forEach(function (cont) {\n            if (isPrimitive(content[cont])) {\n              if (cont !== \"id\" && cont !== \"deleted\" && cont !== \"delete\" && cont !== \"pageId\" && cont !== \"position\" && cont !== \"selected\") {\n                var string = content[cont];\n                // debugger\n                // if(string.includes('other editors')){\n                //   debugger\n                // }\n                // string = string.replace(\"{{mediaServerDomain}}\", app.apiManager.params.mediaUrlDomain);\n                string = stripHtmlToText(string);\n\n                // if (!window.navigator.onLine) {\n                //   if (string.includes(\"https://mediats.futurebooks.cz/public\")) {\n                //     content[cont] = string.replace(\n                //       \"https://mediats.futurebooks.cz/public\",\n                //       \"./media\"\n                //     );\n                //   }\n                // }\n                if (!builder.cleanText.hasOwnProperty(builderComponent.params.content.pageId)) {\n                  builder.cleanText[builderComponent.params.content.pageId] = \"\";\n                } else {\n                  builder.cleanText[builderComponent.params.content.pageId] = builder.cleanText[builderComponent.params.content.pageId] + \" \" + string;\n                }\n              }\n            } else {\n              if (typeof_default()(content[cont]) === \"object\") {\n                replaceMarks(content[cont]);\n              }\n              if (Array.isArray(content[cont])) {\n                //Přidá povinné atributy do pole, pokud tam nejsou\n                var i = 1;\n                var _iterator = builderComponent_createForOfIteratorHelper(content[cont]),\n                  _step;\n                try {\n                  for (_iterator.s(); !(_step = _iterator.n()).done;) {\n                    var item = _step.value;\n                    if (Array.isArray(item) || isPrimitive(item)) {\n                      replaceMarks(item);\n                      break;\n                    }\n                    if (item) {\n                      // debugger;\n                      if (!item.hasOwnProperty(\"id\") && !item.id) {\n                        // debugger;\n                        item[\"id\"] = app.utils.id(\"xxxx-xxxx-xxxx\");\n                      }\n                      if (!item.hasOwnProperty(\"position\")) {\n                        item[\"position\"] = i;\n                      }\n                      if (!item.hasOwnProperty(\"deleted\")) {\n                        item[\"deleted\"] = false;\n                      }\n                    }\n                    i++;\n                  }\n                } catch (err) {\n                  _iterator.e(err);\n                } finally {\n                  _iterator.f();\n                }\n              }\n            }\n          });\n        }\n      }\n      replaceMarks(builderComponent.params.content);\n\n      //Nabindování componenty do metod\n      if (builderComponent.params.hasOwnProperty(\"methods\")) {\n        Object.keys(builderComponent.params.methods).forEach(function (key, index) {\n          // if (key === \"getRefData\") {\n          //   debugger;\n          // }\n          builderComponent.params.methods[key] = builderComponent.params.methods[key].bind(builderComponent);\n        });\n      }\n      if (!builderComponent.params.id) {\n        var id = app.utils.id(\"xxxx-xxxx-xxxx-xxxx\");\n        builderComponent.params.id = \"bb-\".concat(id);\n        builderComponent.params.content.delete = false;\n        var undoContent = builderComponent.params.content;\n        undoContent = builderComponent_objectSpread(builderComponent_objectSpread({}, undoContent), {}, {\n          delete: true\n        });\n        app.builder.serverData.add(builderComponent.params.id, builderComponent.params.content, undoContent, builderComponent.params.name, builderComponent.params.parentId, builderComponent.params.subKey);\n        if (app.builder.history.ignoreAddHistory === false) {\n          builder.history.addHistory(builderComponent.params.id, \"add\");\n        }\n      }\n      this.reloadProxy = function () {\n        // debugger\n        var i = 0;\n        var watchedContent = builderComponent_onChange(builderComponent.params.content, /*#__PURE__*/function () {\n          var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(path, value, previousValue) {\n            var builderHistory, undoContent, content, newVal, newArray, newArray2;\n            return regenerator_default.a.wrap(function _callee$(_context) {\n              while (1) switch (_context.prev = _context.next) {\n                case 0:\n                  builderHistory = app.builder.history;\n                  if (!builderHistory.ignoreHistory) {}\n                  undoContent = {};\n                  content = {}; //Jestliže je hodnota pole, což je například v případě že komponenta obsahuje typ array,\n                  // třeba list, tak to znamená, že do pole bylo něco přidáno a v tu cvíli chci hodnotu zpět\n                  // takovou, že bude obshovat i novou hodnotu, jenom z příznakem smazáno.\n                  if (Array.isArray(value) && value.length !== previousValue.length) {\n                    newVal = _.cloneDeep(value);\n                    newVal[newVal.length - 1][\"deleted\"] = true;\n                    newArray = [];\n                    newArray[newVal.length - 1] = newVal[newVal.length - 1];\n                    newArray2 = [];\n                    newArray2[value.length - 1] = value[value.length - 1];\n                    _.set(undoContent, path, newArray);\n                    _.set(content, path, newArray2);\n                  } else {\n                    _.set(undoContent, path, previousValue);\n                    _.set(content, path, value);\n                  }\n                  if (!builderHistory.ignoreHistory) {\n                    app.builder.serverData.update(builderComponent.params.id, content, undoContent);\n                  }\n\n                  //Delete a position obsluhjí metody movedown/up a un/delete\n                  if (!builderHistory.ignoreHistory && !path.endsWith(\"delete\") && !path.endsWith(\"position\") && !builderHistory.ignoreAddHistory) {\n                    app.builder.history.addHistory(builderComponent.params.id, \"content\");\n                  }\n\n                  // builderComponent.pageComponentContext.$options.updated = function () {\n                  //\n                  // }\n                  //todo reload\n                  _context.next = 9;\n                  return builderComponent.reload(true);\n                case 9:\n                case \"end\":\n                  return _context.stop();\n              }\n            }, _callee);\n          }));\n          return function (_x, _x2, _x3) {\n            return _ref.apply(this, arguments);\n          };\n        }(), {\n          ignoreKeys: [\"length\"]\n        });\n        builderComponent.params.content = watchedContent;\n        var watchedUserContent = builderComponent_onChange(builderComponent.params.userContent, /*#__PURE__*/function () {\n          var _ref2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(path, value, previousValue) {\n            var builderHistory, undoContent, content, newVal, newArray, newArray2, item;\n            return regenerator_default.a.wrap(function _callee2$(_context2) {\n              while (1) switch (_context2.prev = _context2.next) {\n                case 0:\n                  builderHistory = app.builder.history;\n                  if (!builderHistory.ignoreHistory) {}\n                  undoContent = {};\n                  content = {}; //Jestliže je hodnota pole, což je například v případě že komponenta obsahuje typ array,\n                  // třeba list, tak to znamená, že do pole bylo něco přidáno a v tu cvíli chci hodnotu zpět\n                  // takovou, že bude obshovat i novou hodnotu, jenom z příznakem smazáno.\n                  if (Array.isArray(value) && value.length !== previousValue.length) {\n                    newVal = _.cloneDeep(value);\n                    newVal[newVal.length - 1][\"deleted\"] = true;\n                    newArray = [];\n                    newArray[newVal.length - 1] = newVal[newVal.length - 1];\n                    newArray2 = [];\n                    newArray2[value.length - 1] = value[value.length - 1];\n                    _.set(undoContent, path, newArray);\n                    _.set(content, path, newArray2);\n                  } else {\n                    _.set(undoContent, path, previousValue);\n                    _.set(content, path, value);\n                  }\n                  item = {\n                    id: builderComponent.params.id,\n                    data: value\n                  };\n                  if (!app.builder.api.ignoreUserContent) {\n                    app.builder.api.saveUserContentData(item);\n                  }\n                case 7:\n                case \"end\":\n                  return _context2.stop();\n              }\n            }, _callee2);\n          }));\n          return function (_x4, _x5, _x6) {\n            return _ref2.apply(this, arguments);\n          };\n        }(), {\n          ignoreKeys: [\"length\"]\n        });\n        // debugger;\n        builderComponent.params.userContent = watchedUserContent;\n      };\n      this.reloadProxy();\n    }\n  }, {\n    key: \"changeTo\",\n    value: function changeTo(componentName) {\n      var ignoreHistory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var builderComponent = this;\n      var app = builderComponent.app;\n      var builder = app.builder;\n      var clearedParams = builder.clearParams(builderComponent.params);\n      var newComponent = builder.helpers.getCategoryComponentByName(componentName);\n      var oldName = builderComponent.params.name;\n      app.builder.history.ignoreAddHistory = true;\n\n      // tady ty 4 atributy, jsou jediné, které zůstanou z původní komponenty\n      //content, id, parentId, SubKey\n\n      clearedParams.content = _.cloneDeep(clearedParams.content);\n      // debugger\n\n      // Merge objektů. pokud je stejný atribut v obou objektech zachová se ten z master\n      newComponent.content = Object.assign(newComponent.content,\n      //slave\n      clearedParams.content //master\n      );\n      newComponent.id = clearedParams.id;\n      newComponent.parentId = clearedParams.parentId;\n      newComponent.subKey = clearedParams.subKey;\n      builderComponent.params.content = null;\n      builderComponent.params.contentSetting = null;\n      builderComponent.params = utils[\"default\"].extend(builderComponent.params, newComponent);\n      // debugger\n      builderComponent.initData();\n\n      // debugger\n      //Eventy, které poskytuje Framework7 Class, např. local::init se musí znovu nabindovat todo\n      if (builderComponent.params && builderComponent.params.on) {\n        Object.keys(builderComponent.params.on).forEach(function (eventName) {\n          builderComponent.off(eventName);\n          builderComponent.on(eventName, builderComponent.params.on[eventName]);\n        });\n      }\n      var content = {\n        name: componentName,\n        content: newComponent.content\n      };\n      var undoContent = {\n        name: oldName,\n        content: newComponent.content\n      };\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.serverData.clearContent();\n      if (!ignoreHistory) {\n        app.builder.serverData.update(builderComponent.params.id, content, undoContent);\n        app.builder.history.addHistory(builderComponent.params.id, \"componentSettings\", \"componentSettings\");\n      }\n      // builderComponent = newComponent;\n\n      builderComponent.reload(true);\n      // builderComponent.reloadProxy(); // Začne fungovat watcher, ale občas hazí chybu\n      return builderComponent;\n    }\n\n    //Vrátí všechny podkoponenty a také sebe\n  }, {\n    key: \"getAllSubComponents\",\n    value: function getAllSubComponents() {\n      return this.app.builder.flattenComponents([this], [], this.params.parentId, false);\n    }\n  }, {\n    key: \"getComponentsParams\",\n    value: function getComponentsParams() {\n      var allComponents = this.getAllSubComponents();\n      var componentsParams = [];\n      var _this = this;\n      allComponents.forEach(function (component) {\n        componentsParams.push(_this.app.builder.clearParams(component.params));\n      });\n      return componentsParams;\n    }\n  }, {\n    key: \"getComponentsParamsData\",\n    value: function getComponentsParamsData() {\n      var allComponents = this.getComponentsParams();\n      var componentsParams = [];\n      var _this = this;\n      allComponents.forEach(function (component) {\n        var copyComp = {};\n        copyComp.id = component.id;\n        copyComp.name = component.name;\n        copyComp.content = component.content;\n        copyComp.subKey = component.subKey;\n        copyComp.parentId = component.parentId;\n        var clon = _.cloneDeep(copyComp);\n        componentsParams.push(clon);\n      });\n      var xu = componentsParams;\n      return componentsParams;\n    }\n  }, {\n    key: \"addToClipBoard\",\n    value: function addToClipBoard() {\n      var _this3 = this;\n      var data = this.getComponentsParamsData();\n      data.forEach(function (component) {\n        _this3.app.builder.copyToCb.push(component);\n      });\n    }\n  }, {\n    key: \"forceToClipBoard\",\n    value: function forceToClipBoard() {\n      var data = this.getComponentsParamsData();\n      this.app.builder.copyToCb = data;\n    }\n  }, {\n    key: \"generateNewId\",\n    value: function generateNewId() {\n      return this.app.utils.id(\"xxxx-xxxx-xxxx\");\n    }\n  }, {\n    key: \"getAllowedSwitchComponents\",\n    value: function getAllowedSwitchComponents() {\n      var builderComponent = this;\n      var app = builderComponent.app;\n      var builder = app.builder;\n      var allowed = [];\n      builderComponent.params.castComponents.forEach(function (cat) {\n        var c = _.clone(cat);\n        if (c.name === builderComponent.params.name) {\n          c.defaultt = 1;\n        } else {\n          c.defaultt = 0;\n        }\n        allowed.push(c);\n      });\n      return allowed;\n    }\n  }, {\n    key: \"reRender\",\n    value: function () {\n      var _reRender = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n        var builderComponent;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              builderComponent = this;\n              builderComponent.reRenderVariable = true;\n              _context3.next = 4;\n              return builderComponent.reload(true);\n            case 4:\n              // debugger\n              builderComponent.reRenderVariable = false;\n              _context3.next = 7;\n              return builderComponent.reload();\n            case 7:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function reRender() {\n        return _reRender.apply(this, arguments);\n      }\n      return reRender;\n    }() //Znovu načte proměnné do komponenty\n    //pokud true, tak znovu zavolá script init.\n  }, {\n    key: \"reload\",\n    value: function () {\n      var _reload = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n        var change,\n          builderComponent,\n          app,\n          builder,\n          $block,\n          founded,\n          _args4 = arguments;\n        return regenerator_default.a.wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              change = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : false;\n              // debugger;\n              builderComponent = this;\n              app = builderComponent.app;\n              builder = app.builder; // debugger\n              if (!builderComponent.hasOwnProperty(\"pageComponentContext\")) {\n                _context4.next = 12;\n                break;\n              }\n              builderComponent.pageComponentContext.$setState();\n              if (!change) {\n                _context4.next = 12;\n                break;\n              }\n              _context4.next = 9;\n              return builderComponent.pageComponentContext.$tick();\n            case 9:\n              $block = app.root.find(\"#\" + builderComponent.params.id);\n              founded = _.find(builder.globalCl, function (o) {\n                return o.id === builderComponent.params.id;\n              });\n              if (!founded) {\n                if ($block && $block.length) {\n                  // debugger\n                  $block.removeClass(\"reloaded\");\n                  // debugger\n                  builder.applyScripts([{\n                    c: builderComponent,\n                    block: $block\n                  }], builderComponent.pageComponentContext);\n                }\n              }\n            case 12:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function reload() {\n        return _reload.apply(this, arguments);\n      }\n      return reload;\n    }()\n  }, {\n    key: \"animateCSS\",\n    value: function animateCSS(element, animation) {\n      var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"animate__\";\n      // We create a Promise and return it\n      new Promise(function (resolve, reject) {\n        var animationName = \"\".concat(prefix).concat(animation);\n        var node = element;\n        node.classList.add(\"\".concat(prefix, \"animated\"), animationName);\n\n        // When the animation ends, we clean the classes and resolve the Promise\n        function handleAnimationEnd(event) {\n          event.stopPropagation();\n          node.classList.remove(\"\".concat(prefix, \"animated\"), animationName);\n          resolve(\"Animation ended\");\n        }\n        node.addEventListener(\"animationend\", handleAnimationEnd, {\n          once: true\n        });\n      });\n    }\n  }, {\n    key: \"startAnimation\",\n    value: function startAnimation() {\n      var _self = this;\n      var $block = _self.$block;\n\n      // _self.\n\n      setTimeout(function () {\n        $block.css(\"visibility\", \"visible\");\n        // $block.addClass('animate__animated animate__' +$block.attr('data-anim'));\n        _self.animateCSS($block[0], $block.attr(\"data-anim-class\"));\n        $block.attr(\"data-anim\", false);\n      }, 0);\n    }\n  }, {\n    key: \"lookdeep\",\n    value: function lookdeep(object) {\n      var parentItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var _self = this;\n      var collection = {},\n        index = 0,\n        next,\n        item;\n      var _loop = function _loop() {\n        if (object.hasOwnProperty(item)) {\n          next = object[item];\n          if (typeof_default()(next) == \"object\" && next != null) {\n            var parit = String(item).split(/(?=[A-Z])/).join(\"-\").toLowerCase();\n            collection[item] = _self.lookdeep(next, parit);\n          } else {\n            if (parentItem) {\n              var it = String(item);\n              var it2 = it.split(/(?=[A-Z])/).join(\"-\").toLowerCase();\n              var _parit = String(parentItem);\n              collection[it2] = function (f) {\n                if (f[_parit]) {\n                  if (it === \"fontSize\") {}\n                  return f[_parit][it2];\n                }\n              };\n            } else {\n              collection[item] = function (f) {\n                return f[String(item)];\n              };\n            }\n          }\n        }\n      };\n      for (item in object) {\n        _loop();\n      }\n      return collection;\n    }\n\n    //METHODS\n  }, {\n    key: \"haveParentComponent\",\n    value: function haveParentComponent() {\n      var builderComponent = this;\n      if (builderComponent.hasOwnProperty(\"parentComponent\") && builderComponent.parentComponent) {\n        return true;\n      } else {\n        return false;\n      }\n    }\n\n    // Return true, if component have some subcomponents\n  }, {\n    key: \"haveComponents\",\n    value: function haveComponents() {\n      var component = this;\n      if (!component.hasOwnProperty(\"components\")) {\n        return false;\n      }\n      var bool = _.isEmpty(component.components);\n      return !bool;\n    }\n  }, {\n    key: \"renderComponents\",\n    value: function renderComponents() {\n      var subobject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var wrapBefore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n      var wrapAfter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n      var shuffle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n      var component = this;\n      var builder = component.app.builder;\n      var components;\n      var addNewId;\n      var componentId = component.params.id;\n      if (subobject) {\n        if (!component.components) {\n          component.components = {};\n        }\n        if (!component.components[subobject]) {\n          component.components[subobject] = [];\n        }\n        components = component.components[subobject];\n        addNewId = \"builder-add-new-button-\".concat(subobject);\n        // debugger\n        // debugger\n      } else {\n        components = component.components;\n        addNewId = \"builder-add-new-button\";\n      }\n      if (!components) {\n        components = component.components = [];\n      }\n      var cs = lodash_default.a.sortBy(components, [\"params.content.position\"]);\n\n      // if (cs.length === 0) {\n      //   return `\n      //   <div class=\"row\">\n      //     <div class=\"tablet-33\"></div>\n      //     <a href=\"#\"  class=\"tablet-33 col-100 button button-raised button-fill\">Vložte první element</a>\n      //     <div class=\"tablet-33\"></div>\n      //   </div>\n      //   `;\n      // }\n      return builder.renderComponents(cs, shuffle, wrapBefore, wrapAfter, componentId, subobject);\n      // let rString = '';\n      // let i;\n      // for(i = 0; i < cs.length; i++){\n      //   rString = rString + `${cs[i].html()}`\n      // }\n      // return rString;\n      //\n      // return`\n      // ${cs.map((component) => `\n      //     ${wrapBefore}\n      //       ${component.html()}\n      //   ${wrapAfter}\n      //   `).join('')}\n      //   `;\n      //  cs.forEach(function (item) {\n      //    item.html();\n      // })\n    }\n  }, {\n    key: \"html\",\n    value: function html() {\n      var iterator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      var shuffle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var builderComponent = this;\n      if (builderComponent.reRenderVariable) {\n        // debugger;\n        return \"\";\n      }\n      if (builderComponent.params.id == \"bb-5550-7ad4-9c71-07a7\") {\n        // debugger\n      }\n      // if (builderComponent.params.render) return builderComponent.params.render.call(builderComponent, builderComponent);\n\n      var app = builderComponent.app;\n\n      // úroveň zanoření komponenty\n      if (!builderComponent.haveParentComponent()) {\n        builderComponent.nestedLevel = 0;\n      } else {\n        builderComponent.nestedLevel = builderComponent.parentComponent.nestedLevel + 1;\n      }\n\n      //TODO třídy pro rozhodnutí zda je komponenta první, nebo poslední ve svém kontextu\n      var isFirstInRederence = builderComponent.isFirstInReference();\n      var isLastInReference = builderComponent.isLastInReference();\n      var firstLastClass = \"\";\n      if (isFirstInRederence) {\n        firstLastClass += \"c-is-first\";\n      }\n      if (isLastInReference) {\n        firstLastClass += \" c-is-last\";\n      }\n      var _builderComponent$par = builderComponent.params,\n        html = _builderComponent$par.html,\n        id = _builderComponent$par.id,\n        name = _builderComponent$par.name,\n        styles = _builderComponent$par.styles;\n      var components = builderComponent.components;\n      var buildMode = app.builder.params.development.enable;\n      var controls = \"\";\n      if (buildMode) {\n        var moveButtons = \"\";\n        if (!shuffle) {\n          moveButtons = \"<a id=\\\"bm-move-up\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">keyboard_arrow_up</i></a>\\n    <a id=\\\"bm-move-down\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">keyboard_arrow_down</i></a>\";\n        }\n        var shareButton = \"\";\n        if (builderComponent.params.content.hasOwnProperty(\"share\") && builderComponent.params.content.share) {\n          shareButton = \"<a id=\\\"bm-form-share\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">share</i> Sd\\xEDlen\\xED</a>\";\n        }\n        controls = \"\\n<div class=\\\"bm-controls bm-hidden controls-2\\\">\\n    <!--<a id=\\\"bm-image\\\" class=\\\"bm-image button\\\"><i class=\\\"material-icons\\\">image</i></a>-->\\n    <a id=\\\"bm-copy\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">content_copy</i></a>\\n    <a id=\\\"bm-delete\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">delete</i></a>\\n    \".concat(moveButtons, \"\\n    <a id=\\\"bm-more\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">more_vert</i></a>\\n    <!--bm-copy_to_cb-->\\n</div>\\n        <div class=\\\"bm-controls bm-hidden controls-1\\\">\\n    <a id=\\\"bm-content\\\" class=\\\"button\\\"><i class=\\\"material-icons\\\">edit</i></a>\\n     <!--\").concat(shareButton, \"-->\\n     <a id=\\\"bm-check-component\\\" data-position=\\\"\").concat(builderComponent.params.content.position, \"\\\" class=\\\"bm-check button\\\"><i class=\\\"material-icons\\\">check_box_outline_blank</i></a>\\n</div>\\n<!--builderComponent.params.content.position-->\\n\\n<div class=\\\"bm-divider top bm-hidden\\\"></div>\\n<div class=\\\"bm-divider bm-hidden\\\"></div>\\n<div id=\\\"bm-add-next\\\" class=\\\"bm-add-next bm-hidden\\\">+</div>\\n      \");\n      }\n      var stylesCss = {};\n      if (builderComponent.params.styles !== \"undefined\" && builderComponent.params.styles !== null && typeof_default()(builderComponent.params.styles) === \"object\") {} else {\n        builderComponent.params[\"styles\"] = {};\n      }\n      var wrapper = {\n        bm: {},\n        bmWrapper: {}\n      };\n      var stylesAll = builderComponent.params.styles;\n      var stylesx = [];\n      var styleSheet = [];\n      for (var objectKey in stylesAll) {\n        var xx = jsToCss(stylesAll[objectKey]);\n        stylesx[objectKey] = \"data-style=\\\"\".concat(objectKey, \"\\\" style=\\\"\").concat(xx, \"\\\"\");\n        styleSheet[objectKey] = [];\n        styleSheet[objectKey][\"string\"] = \"data-style=\\\"\".concat(objectKey, \"\\\" style=\\\"\").concat(xx, \"\\\"\");\n        styleSheet[objectKey][\"selector\"] = \"*[data-style=\\\"\".concat(objectKey, \"\\\"]\");\n      }\n      function isPrimitive(test) {\n        return test !== Object(test);\n      }\n      var newContent = lodash_default.a.cloneDeep(builderComponent.params.content);\n      function replaceMarksOnRender(content) {\n        Object.keys(content).forEach(function (cont) {\n          if (isPrimitive(content[cont])) {\n            // let a2 = builderComponent.a1(content[cont]).bind(builderComponent);\n\n            if (cont !== \"id\" && cont !== \"deleted\" && cont !== \"delete\" && cont !== \"pageId\" && cont !== \"position\" && cont !== \"selected\" && typeof content[cont] === \"string\") {\n              content[cont] = builderComponent.builder.beforeRender(content, cont, builderComponent);\n            }\n          } else {\n            if (typeof_default()(content[cont]) === \"object\") {\n              // debugger\n              replaceMarksOnRender(content[cont]);\n            }\n            if (Array.isArray(content[cont])) {\n              var result = _.filter(content[cont], function (o) {\n                if (o && o.hasOwnProperty(\"deleted\") && o.deleted) {\n                  return false;\n                } else {\n                  return true;\n                }\n              });\n              result = _.orderBy(result, [\"position\"], [\"asc\"]);\n              content[cont] = result;\n              // for(const content[cont] of )\n              // newContent[cont] = content[cont];\n            }\n          }\n        });\n      }\n      replaceMarksOnRender(newContent);\n      builderComponent.renderedContent = newContent;\n      var xhtml = html(newContent, builderComponent.params, stylesx, builderComponent, builderComponent.params.userContent);\n      var subcomponentClass = \"bm-top\";\n      if (this.haveParentComponent()) {\n        subcomponentClass = \"bm-sk\";\n      }\n      var bgr = \"\";\n      if (builderComponent.params.content.hasOwnProperty(\"delete\") && builderComponent.params.content.delete) {\n        bgr = \" style=\\\"background-color: red;\\\" \";\n      }\n      var componentWrapper = \"\";\n      if (builderComponent.haveComponents()) {\n        componentWrapper = \"component-wrapper\";\n      }\n      var nestedLevelClass = \"level-\" + builderComponent.nestedLevel;\n      var customClasses = builderComponent.params.content.customClasses;\n      var customAnimation = builderComponent.params.content.customAnimation;\n      var visibility = \"\";\n      var animDatas = \"\";\n      if (customAnimation.enabled) {\n        visibility = \"visibility: hidden;\";\n        animDatas = \"\\n      data-anim=\\\"\".concat(customAnimation.enabled, \"\\\"\\n      data-anim-class=\\\"\").concat(customAnimation.class, \"\\\"\\n      data-anim-duration=\\\"\").concat(customAnimation.duration, \"\\\"\\n      data-anim-delay=\\\"\").concat(customAnimation.delay, \"\\\"\\n      data-anim-repeat=\\\"\").concat(customAnimation.repeat, \"\\\"\\n       \");\n      }\n\n      // customClasses = customClasses.replace('animate__animated', 'animate__animatedx');\n\n      //$name : název komponenty\n      //.bm-top: pomocná třída, která vybere každou komponentu na stránce\n      //.reloaded: pomocná třída pro vykreslování, nemazat, nepoužívat\n      //$subcomponentClass: může být \".bm-sk\" pokud se jedná o podkomponentu, nebo nic, pokud ne\n      //$componentWrapper: pokud má nějaké \"děti\" neboli podkomponenty, tak se přidá třída \".component-wrapper\" jinaknic. Pozor, zobrazí s ejenom pokud jsou již nějaké děti a né pokud ještě není nic vložené\n      //$nestedLevelClass: zobrazítřídu .level-X kde x je úroveň zanoření kompoenty, počítáni od 0 (nuly).\n      return \"\\n  <div key=\\\"\".concat(id, \"\\\" id=\\\"\").concat(id, \"\\\" \").concat(bgr, \"\\n  class=\\\"\").concat(name, \" \").concat(customClasses, \" bm-component reloaded \").concat(subcomponentClass, \" \").concat(componentWrapper, \" \").concat(nestedLevelClass, \" \").concat(firstLastClass, \"\\\"\\n  \").concat(animDatas, \"\\n  style=\\\"\").concat(visibility, \"\\\">\\n    <div class=\\\"bm\\\" \").concat(stylesx.bm, \">\\n      \").concat(controls, \"\\n      <div class=\\\"bm-wrapper inner-\").concat(name, \"\\\" id=\\\"inner-\").concat(id, \"\\\" \").concat(stylesx.bmWrapper, \"  >\\n      \").concat(xhtml, \"\\n      </div>\\n    </div>\\n  </div>\");\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var builder_builderComponent = (builderComponent_BuilderComponent);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderChapters.js\n\n\nfunction builderChapters_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderChapters_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderChapters_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderChapters_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderChapters_arrayLikeToArray(r, a) : void 0; } }\nfunction builderChapters_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n//////////\n//////////// Práce s kapitolami knihy\n//////////\n\n\n\n// https://github.com/sindresorhus/on-change\nvar builderChapters_onChange = __webpack_require__(/*! on-change */ \"./node_modules/on-change/index.js\");\nvar builderChapters_BuilderChapters = /*#__PURE__*/function () {\n  function BuilderChapters(app, builder) {\n    classCallCheck_default()(this, BuilderChapters);\n    var builderChapters = this;\n    builderChapters.app = app;\n    builderChapters.history = [];\n    var objectsToWatch = {\n      color: function color(value) {\n        bookContext.setThemeColor(value);\n      },\n      nazevKnihy: function nazevKnihy() {}\n    };\n\n    // builderChapters.reloadViews();\n\n    app.data.myEvents.on(\"versions:loaded\", function () {\n      // debugger\n      builder.params.dataChapters = builderChapters.watch(builder.params.dataChapters, \"datax\", function (value) {\n        app.builder.chapters.setBookChapters();\n      }, builder);\n    });\n    return builderChapters;\n  }\n  return createClass_default()(BuilderChapters, [{\n    key: \"watch\",\n    value: function watch(params, objectPath) {\n      var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (value) {};\n      var builder = arguments.length > 3 ? arguments[3] : undefined;\n      var _context = this;\n      var app = _context.app;\n      var builderHistory = builder.history;\n      // debugger\n      var i = 0;\n      var watchedObject = builderChapters_onChange(params, function (path, value, previousValue, name) {\n        var val = _.cloneDeep(value);\n        if (Array.isArray(val) && value && previousValue && value.length > previousValue.length && path.length === 0) {\n          val = val[val.length - 1];\n          previousValue = _.cloneDeep(val);\n          previousValue[\"deleted\"] = true;\n        }\n        var item;\n        var id;\n        if (path.length) {\n          item = _.result(params, path[0]);\n          id = item.id;\n          path.shift();\n        } else {\n          id = val.id;\n        }\n        var content = {};\n        var undoContent = {};\n        if (path.length) {\n          _.set(content, path, val);\n          _.set(undoContent, path, previousValue);\n        } else {\n          content = val;\n          undoContent = previousValue;\n        }\n        callback(val);\n        if (builderHistory.ignoreHistory === false) {\n          app.builder.serverData.update(id, content, undoContent);\n          // debugger;\n          if (builderHistory.ignoreAddHistory === false) {\n            app.builder.history.addHistory(id, \"chapters\", \"chapters\");\n\n            //todo odeslat data na server\n          }\n        }\n      }, {\n        pathAsArray: true,\n        ignoreKeys: [\"number\"]\n      });\n      return watchedObject;\n    }\n  }, {\n    key: \"updateChapter\",\n    value: function updateChapter(chapter, newVals) {}\n  }, {\n    key: \"addChapter\",\n    value: function addChapter(chapter) {\n      routes.splice(chapter.position - 1, 0, chapter);\n      console.info(\"[BuilderChapters] (addChapter) Chapter \".concat(chapter.id, \" added to end.\"));\n    }\n  }, {\n    key: \"unflatChapters\",\n    value: function unflatChapters(globalData, data, parentId, id) {\n      var context = this;\n      var app = context.app;\n      var _iterator = builderChapters_createForOfIteratorHelper(data),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var ch = _step.value;\n          // debugger;\n          var finded = false;\n          if (ch.hasOwnProperty(\"routes\") && ch.routes.length > 0) {\n            finded = context.unflatChapters(globalData, ch.routes, parentId, id);\n          }\n          if (finded) {\n            return true;\n          }\n          if (ch.id == parentId) {\n            if (!ch.hasOwnProperty(\"routes\")) {\n              ch[\"routes\"] = [];\n            }\n            var chapter = _.find(globalData, function (o) {\n              return o.id == id;\n            });\n            ch[\"routes\"].push(chapter);\n            _.remove(globalData, chapter);\n            return true;\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      return false;\n    }\n  }, {\n    key: \"getParentChapter\",\n    value: function getParentChapter(id) {\n      var chapters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var context = this;\n      var app = context.app;\n      var founded = null;\n      for (var chapter in chapters) {\n        chapter = chapters[chapter];\n        if (chapter.id === id) {\n          founded = chapter;\n          break;\n        }\n        if (chapter.hasOwnProperty(\"routes\")) {\n          founded = context.getParentChapter(id, chapter.routes);\n          if (founded) {\n            return founded;\n          }\n        }\n      }\n      return founded;\n    }\n  }, {\n    key: \"unflatChapters2\",\n    value: function unflatChapters2(data) {\n      var nestedChapters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var context = this;\n      var app = context.app;\n      data.forEach(function (chapter) {\n        if (!chapter.parentId) {\n          nestedChapters.push(chapter);\n        } else {\n          var nChapter = context.getParentChapter(chapter.parentId, data);\n          if (!nChapter) {\n            // debugger;\n            return nestedChapters;\n          }\n          if (!nChapter.hasOwnProperty(\"routes\")) {\n            nChapter[\"routes\"] = [];\n          }\n          nChapter[\"routes\"].push(chapter);\n        }\n      });\n      return nestedChapters;\n    }\n  }, {\n    key: \"findChapterById\",\n    value: function findChapterById(id) {\n      var chapters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var context = this;\n      var app = context.app;\n      var founded;\n      if (!chapters.length) {\n        chapters = app.builder.params.dataChapters;\n      }\n      for (var chapter in chapters) {\n        chapter = chapters[chapter];\n        if (chapter.id === id) {\n          founded = chapter;\n          break;\n        }\n      }\n      return founded;\n    }\n  }, {\n    key: \"getLevel\",\n    value: function getLevel(chapter) {\n      var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var context = this;\n      var app = context.app;\n      // debugger;\n      if (chapter.parentId == null) {\n        return 1;\n      } else {\n        var parent = app.builder.chapters.findChapterById(chapter.parentId);\n        level += context.getLevel(parent, level);\n      }\n      return level;\n    }\n  }, {\n    key: \"deleteChapterById\",\n    value: function deleteChapterById(id) {\n      var context = this;\n      var app = context.app;\n      // debugger\n\n      var founded = context.findChapterById(id);\n      app.builder.history.ignoreAddHistory = true;\n      founded[\"deleted\"] = true;\n      var _iterator2 = builderChapters_createForOfIteratorHelper(app.builder.params.dataChapters),\n        _step2;\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var chapter = _step2.value;\n          if (chapter.parentId == founded.parentId) {\n            if (chapter.position > founded.position) {\n              chapter.position--;\n            }\n          }\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n      var chapterCount = _.filter(app.builder.params.dataChapters, function (o) {\n        return o.deleted == false;\n      });\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.history.addHistory(founded.id, \"chapters\", \"chapters\");\n      if (chapterCount.length == 0) {\n        app.data.myEvents.emit(\"builder:empty\");\n      }\n      app.builder.chapters.getChapterNumbering();\n      context.reloadViews();\n      console.info(\"[BuilderChapters] (deleteChapterById) Chapter (\".concat(id, \") deleted.\"));\n\n      // debugger\n    }\n  }, {\n    key: \"enlargeChapterPosition\",\n    value: function enlargeChapterPosition(componentsReference, from, to, parentId) {\n      var id = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      if (componentsReference && componentsReference.length) {\n        var _iterator3 = builderChapters_createForOfIteratorHelper(componentsReference),\n          _step3;\n        try {\n          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n            var c = _step3.value;\n            if (c.position >= from && parentId == c.parentId && c.position <= to) {\n              if (id == null || id != c.id) {\n                c.position = c.position + 1;\n              }\n            }\n          }\n        } catch (err) {\n          _iterator3.e(err);\n        } finally {\n          _iterator3.f();\n        }\n      }\n    }\n  }, {\n    key: \"lowerChapterPosition\",\n    value: function lowerChapterPosition(componentsReference, from, to, parentId) {\n      var id = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      if (componentsReference && componentsReference.length) {\n        var _iterator4 = builderChapters_createForOfIteratorHelper(componentsReference),\n          _step4;\n        try {\n          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n            var c = _step4.value;\n            if (c.position >= from && parentId == c.parentId && c.position <= to) {\n              if (id == null || id != c.id) {\n                if (c.position == 1) {\n                  c.position = 1;\n                } else {\n                  c.position = c.position - 1;\n                }\n              }\n            }\n          }\n        } catch (err) {\n          _iterator4.e(err);\n        } finally {\n          _iterator4.f();\n        }\n      }\n    }\n\n    /*\r\n     * parentId : id nového rodiče\r\n     * position: nová pozice v rámci nocého rodiče\r\n     * newChapter : kapitola, kterou chceme přesunot (bez reference!)\r\n     * oldPosition: původní pozice na které kapitola byla\r\n     * oldParentId: původní id rodiče, pod kterým se kapitola nacházela\r\n     * */\n  }, {\n    key: \"moveChapter\",\n    value: function moveChapter(parentId, position, newChapter, oldPosition, oldParentId) {\n      var context = this;\n      var app = context.app;\n      var chapters = app.builder.params.dataChapters;\n      if (parentId === \"null\") {\n        parentId = null;\n      }\n      if (oldParentId === \"null\") {\n        oldParentId = null;\n      }\n      var oldUrl = newChapter.fullPath;\n      var urlsToUpdate = [];\n      app.builder.history.ignoreAddHistory = true;\n      newChapter.position = position + 1;\n      if (parentId != oldParentId) {\n        newChapter.parentId = parentId;\n        var str = app.utils.removeDiacritics(newChapter.name);\n        str = str.replace(/[^a-z0-9\\u0400-\\u04FF]/ig, '-');\n        str = str.replace(/\\-+/g, '-');\n        if (str[0] == '-') {\n          str = str.substring(1, str.length);\n        }\n        if (str[str.length - 1] == '-') {\n          str = str.substring(0, str.length - 1);\n        }\n        str = str.toLowerCase();\n        newChapter.path = \"/\".concat(str, \"/\");\n        var fullPath = context.getFullPath(newChapter);\n\n        //Kontrola jestli je kapitola unikatní podle fullPath\n        var uniquePath = context.getUniquePath(newChapter.id, newChapter.path, fullPath); //vrací nový unikatní path\n\n        if (uniquePath != newChapter.path) {\n          //pokud unikatní path není původní path přepiš path i fullPath\n          newChapter.path = uniquePath;\n          fullPath = context.getFullPath(newChapter);\n        }\n        newChapter.fullPath = fullPath;\n        urlsToUpdate.push({\n          new: newChapter.fullPath,\n          old: oldUrl\n        });\n        context.enlargeChapterPosition(chapters, newChapter.position, chapters.length, parentId, newChapter.id);\n        context.lowerChapterPosition(chapters, oldPosition + 1, chapters.length, oldParentId, newChapter.id);\n        var _rebuildPaths = function rebuildPaths(chapters, id) {\n          var _iterator5 = builderChapters_createForOfIteratorHelper(chapters),\n            _step5;\n          try {\n            var _loop = function _loop() {\n              var chapter = _step5.value;\n              if (chapter.parentId == id) {\n                oldUrl = chapter.fullPath;\n                chapter.fullPath = context.getFullPath(chapter);\n                urlsToUpdate.push({\n                  new: chapter.fullPath,\n                  old: oldUrl\n                });\n                var next = _.find(chapters, function (o) {\n                  return o.parentId == chapter.id;\n                });\n                if (next) {\n                  _rebuildPaths(chapters, chapter.id);\n                }\n              }\n            };\n            for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n              _loop();\n            }\n          } catch (err) {\n            _iterator5.e(err);\n          } finally {\n            _iterator5.f();\n          }\n        };\n        _rebuildPaths(chapters, newChapter.id);\n      } else {\n        // debugger;\n        if (oldPosition > position) {\n          context.enlargeChapterPosition(chapters, newChapter.position, oldPosition, parentId, newChapter.id);\n        } else {\n          context.lowerChapterPosition(chapters, oldPosition, newChapter.position, parentId, newChapter.id);\n        }\n      }\n      newChapter.level = app.builder.chapters.getLevel(newChapter);\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.history.addHistory(newChapter.id, \"chapters\", \"chapters\");\n      app.builder.chapters.getChapterNumbering();\n      var index = 0;\n      //START - Projde všechen content v knize a přepíše původní url na novou\n      var updateAllInBook = function updateAllInBook(content) {\n        var newUrl = urlsToUpdate[index].new;\n        var old = urlsToUpdate[index].old;\n        if (content == old) {\n          return newUrl;\n        }\n        var dataReg = /data-text=\"([^\"]+)\"/;\n        var regex = new RegExp(\"([\\\\s'\\\"])\".concat(old, \"([\\\\s'\\\"])\"), 'g');\n\n        // Specialní nahrazení obsahu data-text v původním textu kvůli encode\n        content = content.replace(dataReg, function (match, dataTextContent) {\n          var modifiedContent = decodeURIComponent(dataTextContent);\n          modifiedContent = modifiedContent.replace(regex, \"$1\".concat(newUrl, \"$2\"));\n          return 'data-text=\"' + encodeURIComponent(modifiedContent) + '\"';\n        });\n        var update = content.replace(regex, \"$1\".concat(newUrl, \"$2\"));\n        return update;\n      };\n      urlsToUpdate.forEach(function () {\n        app.builder.helpers.findAndReplaceContent(updateAllInBook, true);\n        index++;\n      });\n      context.reloadViews();\n      console.info(\"[BuilderChapters] (moveChapter) Chapter (\".concat(newChapter.id, \") moved. From position \").concat(oldPosition, \" (Parent: \").concat(oldParentId, \") to \").concat(position, \" (Parent: \").concat(parentId, \")\"));\n    }\n  }, {\n    key: \"getChapterKey\",\n    value: function getChapterKey(chapters, id) {\n      var anchor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var context = this;\n      var returned;\n      // debugger;\n      for (var i = 0; i < chapters.length; i++) {\n        if (anchor) {\n          if (chapters[i].anchorId == id) {\n            returned = i;\n          }\n        } else {\n          if (chapters[i].id == id) {\n            returned = i;\n          } else if (chapters[i].hasOwnProperty(\"routes\") && chapters[i].routes.length > 0) {\n            returned = context.getChapterKey(chapters[i].routes, id);\n          }\n        }\n        if (returned) {\n          break;\n        }\n      }\n      return returned;\n    }\n  }, {\n    key: \"getFullPath\",\n    value: function getFullPath(chapter) {\n      var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n      var context = this;\n      var parentId = chapter.parentId;\n      path = chapter.path + path;\n      path = path.replace(\"//\", \"/\");\n      if (chapter.hasOwnProperty(\"parentId\") && parentId && parentId !== \"null\") {\n        var parentElem = context.findChapterById(parentId);\n        return context.getFullPath(parentElem, path);\n      }\n      path = path.replace(\"//\", \"/\");\n      return path;\n    }\n  }, {\n    key: \"getContextRoutesOfChapter\",\n    value: function getContextRoutesOfChapter(chapter) {\n      var context = this;\n      var app = context.app;\n      var parentId = chapter.parentId;\n      var routes;\n      if (!parentId || parentId === \"null\" || parentId === null) {\n        routes = app.book.bookChapters;\n      } else {\n        var parentElem = context.findChapterById(parentId);\n        if (!parentElem.hasOwnProperty(\"routes\") || !parentElem.routes.length) {\n          parentElem.routes = [];\n        }\n        routes = parentElem.routes;\n      }\n      return routes;\n    }\n\n    // TSbookChapters\n  }, {\n    key: \"setBookChapters\",\n    value: function setBookChapters() {\n      var context = this;\n      var app = context.app;\n      var data = _.cloneDeep(app.builder.params.dataChapters);\n\n      // debugger\n      var _iterator6 = builderChapters_createForOfIteratorHelper(data),\n        _step6;\n      try {\n        for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n          var d = _step6.value;\n          if (d.hasOwnProperty(\"_id\")) delete d._id;\n          if (!d.hasOwnProperty(\"isNumbered\")) {\n            d[\"isNumbered\"] = true;\n          }\n        }\n      } catch (err) {\n        _iterator6.e(err);\n      } finally {\n        _iterator6.f();\n      }\n      var dataNew = app.builder.chapters.unflatChapters2(data);\n      var fux = dataNew;\n      app.book.bookChapters = dataNew;\n      app.builder.chapters.sortChaptersByPosition();\n      app.builder.chapters.getChapterNumbering();\n      app.builder.chapters.reloadViews();\n    }\n  }, {\n    key: \"findChapterByFullPath\",\n    value: function findChapterByFullPath(fullPath) {\n      var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var context = this;\n      var app = context.app;\n      var founded = _.find(app.builder.params.dataChapters, function (o) {\n        return fullPath == o.fullPath && id != o.id;\n      });\n      return founded;\n    }\n  }, {\n    key: \"getUniquePath\",\n    value: function getUniquePath(id, path, fullPath) {\n      var context = this;\n      var app = context.app;\n      var newPath = path;\n      var founded = context.findChapterByFullPath(fullPath, id);\n      if (!founded) {\n        return newPath;\n      }\n      var isUnique = false;\n      var increment = 1;\n      while (!isUnique) {\n        var newFPath = fullPath.slice(0, -1) + '-' + increment + \"/\";\n        founded = context.findChapterByFullPath(newFPath, id);\n        if (!founded) {\n          newPath = path.slice(0, -1) + '-' + increment + \"/\";\n          isUnique = true;\n        } else {\n          increment++;\n        }\n      }\n      return newPath;\n    }\n  }, {\n    key: \"addNextChapter\",\n    value: function addNextChapter(parentId, position, name, url) {\n      var context = this;\n      var app = context.app;\n      var undoContent = _.cloneDeep(app.book.getBookChaptersFlatten());\n      position = parseInt(position);\n      if (parentId === \"null\") {\n        parentId = null;\n      }\n      var id = app.utils.id(\"xxxx-xxxx-xxxx-xxxx\");\n      var newChapter = {\n        name: name,\n        position: position,\n        id: id,\n        parentId: parentId,\n        path: \"/\".concat(url, \"/\"),\n        fullPath: \"\",\n        builderChapter: true,\n        data: [],\n        anchors: [],\n        deleted: false,\n        isNumbered: true\n      };\n      var fullPath = context.getFullPath(newChapter);\n\n      //Kontrola jestli je kapitola unikatní podle fullPath\n      var uniquePath = context.getUniquePath(newChapter.id, newChapter.path, fullPath); //vrací nový unikatní path\n\n      if (uniquePath != newChapter.path) {\n        //pokud unikatní path není původní path přepiš path i fullPath\n        newChapter.path = uniquePath;\n        fullPath = context.getFullPath(newChapter);\n      }\n      newChapter[\"fullPath\"] = \"\".concat(fullPath);\n      var level = app.builder.chapters.getLevel(newChapter);\n      newChapter[\"level\"] = level;\n      var routes = app.builder.params.dataChapters;\n      app.builder.history.ignoreAddHistory = true;\n      context.enlargeChapterPosition(routes, position, routes.length, parentId);\n      // routes.splice(position - 1, 0, newChapter);\n      routes.push(newChapter);\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.history.addHistory(id, \"chapters\", \"chapters\");\n      app.builder.chapters.getChapterNumbering();\n      console.info(\"[BuilderChapters] (addNexChapter) Chapter \".concat(id, \" added to parent (\").concat(parentId, \") at position \").concat(position));\n      // context.setBookChapters();\n    }\n  }, {\n    key: \"renameChapter\",\n    value: function renameChapter(id, name, url) {\n      var context = this;\n      var app = context.app;\n      var chapters = app.builder.params.dataChapters;\n      var founded = context.findChapterById(id);\n      app.builder.history.ignoreAddHistory = true;\n      var oldUrl = founded[\"fullPath\"];\n      var urlsToUpdate = [];\n      founded[\"name\"] = name;\n      founded[\"path\"] = \"/\".concat(url, \"/\");\n      // let fullPath =\n\n      founded[\"fullPath\"] = context.getFullPath(founded);\n\n      //Kontrola jestli je kapitola unikatní podle fullPath\n      var uniquePath = context.getUniquePath(id, founded.path, founded.fullPath); //vrací nový unikatní path\n\n      if (uniquePath != founded.path) {\n        //pokud unikatní path není původní path přepiš path i fullPath\n        founded[\"path\"] = uniquePath;\n        founded[\"fullPath\"] = context.getFullPath(founded);\n      }\n      urlsToUpdate.push({\n        new: founded.fullPath,\n        old: oldUrl\n      });\n      var _rebuildPaths2 = function rebuildPaths(chapters, id) {\n        var _iterator7 = builderChapters_createForOfIteratorHelper(chapters),\n          _step7;\n        try {\n          var _loop2 = function _loop2() {\n            var chapter = _step7.value;\n            if (chapter.parentId == id) {\n              oldUrl = chapter.fullPath;\n              chapter.fullPath = context.getFullPath(chapter);\n              urlsToUpdate.push({\n                new: chapter.fullPath,\n                old: oldUrl\n              });\n              var next = _.find(chapters, function (o) {\n                return o.parentId == chapter.id;\n              });\n              if (next) {\n                _rebuildPaths2(chapters, chapter.id);\n              }\n            }\n          };\n          for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n            _loop2();\n          }\n        } catch (err) {\n          _iterator7.e(err);\n        } finally {\n          _iterator7.f();\n        }\n      };\n      _rebuildPaths2(chapters, founded.id);\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.history.addHistory(id, \"chapters\", \"chapters\");\n      var index = 0;\n      //START - Projde všechen content v knize a přepíše původní url na novou\n      var updateAllInBook = function updateAllInBook(content) {\n        var newUrl = urlsToUpdate[index].new;\n        var old = urlsToUpdate[index].old;\n        if (content == old) {\n          return newUrl;\n        }\n        var dataReg = /data-text=\"([^\"]+)\"/;\n        var regex = new RegExp(\"([\\\\s'\\\"])\".concat(old, \"([\\\\s'\\\"])\"), 'g');\n\n        // Specialní nahrazení obsahu data-text v původním textu kvůli encode\n        content = content.replace(dataReg, function (match, dataTextContent) {\n          var modifiedContent = decodeURIComponent(dataTextContent);\n          modifiedContent = modifiedContent.replace(regex, \"$1\".concat(newUrl, \"$2\"));\n          return 'data-text=\"' + encodeURIComponent(modifiedContent) + '\"';\n        });\n        var update = content.replace(regex, \"$1\".concat(newUrl, \"$2\"));\n        return update;\n      };\n      urlsToUpdate.forEach(function () {\n        app.builder.helpers.findAndReplaceContent(updateAllInBook, true);\n        index++;\n      });\n\n      // context.setBookChapters();\n      console.info(\"[BuilderChapters] (renameChapter) Chapter \".concat(id, \" renamed to \\\"\").concat(name, \"\\\"\"));\n    }\n  }, {\n    key: \"addAnchorChapter\",\n    value: function addAnchorChapter(parentId, name, id) {\n      var context = this;\n      var app = context.app;\n      var history = app.builder.history;\n      var anchorId = app.utils.id(\"xxxx-xxxx-xxxx-xxxx\");\n      var parent = context.findChapterById(parentId);\n      var pos = parent.anchors.length + 1;\n\n      // app.builder.history.ignoreAddHistory = true;\n\n      var newAnchor = {\n        id: id,\n        anchorId: anchorId,\n        name: name,\n        deleted: false,\n        position: pos\n      };\n      parent.anchors.push(newAnchor);\n      console.info(\"[BuilderChapters] (addAnchorChapter) Anchor (\".concat(id, \") addet to \").concat(parentId));\n    }\n  }, {\n    key: \"moveAnchor\",\n    value: function moveAnchor(id, parentId, newPos, oldPos) {\n      var context = this;\n      var app = context.app;\n      var founded = context.findChapterById(parentId);\n      var anchor = context.findAnchorInChapter(id, founded);\n      app.builder.history.ignoreAddHistory = true;\n      anchor[\"position\"] = newPos + 1;\n      if (oldPos > newPos) {\n        for (var i = 0; i < founded.anchors.length; i++) {\n          if (founded.anchors[i].position > newPos && founded.anchors[i].anchorId !== anchor.anchorId) {\n            founded.anchors[i].position = founded.anchors[i].position + 1;\n          }\n        }\n      } else {\n        for (var _i = 0; _i < founded.anchors.length; _i++) {\n          // debugger;\n          if (founded.anchors[_i].position > oldPos + 1 && founded.anchors[_i].position <= newPos + 1 && founded.anchors[_i].anchorId !== anchor.anchorId) {\n            founded.anchors[_i].position = founded.anchors[_i].position - 1;\n          }\n        }\n      }\n      app.builder.history.ignoreAddHistory = false;\n      app.builder.history.addHistory(id, \"anchors\", \"chapters\");\n      console.info(\"[BuilderChapters] (moveAnchor) Anchor (\".concat(id, \") moved. From position \").concat(oldPos, \" to \").concat(newPos, \".\"));\n    }\n  }, {\n    key: \"renameAnchor\",\n    value: function renameAnchor(id, parentId, name) {\n      var context = this;\n      var app = context.app;\n      var founded = context.findChapterById(parentId);\n      var anchor = context.findAnchorInChapter(id, founded);\n      anchor[\"name\"] = name;\n      var history = app.builder.history;\n      console.info(\"[BuilderChapters] (renameAnchor) Anchor (\".concat(id, \") renamed to \\\"\").concat(name, \"\\\".\"));\n    }\n  }, {\n    key: \"changeAnchorId\",\n    value: function changeAnchorId(id, parentId, newIdentifer) {\n      var context = this;\n      var app = context.app;\n      var founded = context.findChapterById(parentId);\n      var anchor = context.findAnchorInChapter(id, founded);\n      anchor[\"id\"] = newIdentifer;\n      console.info(\"[BuilderChapters] (renameAnchor) Anchor (\".concat(id, \") changed to (\").concat(newIdentifer, \").\"));\n    }\n  }, {\n    key: \"deleteAnchor\",\n    value: function deleteAnchor(id, parentId) {\n      var context = this;\n      var app = context.app;\n      var founded = context.findChapterById(parentId);\n      var anchor = context.findAnchorInChapter(id, founded);\n      anchor[\"deleted\"] = true;\n      console.info(\"[BuilderChapters] (renameAnchor) Anchor (\".concat(id, \") deleted.\"));\n    }\n  }, {\n    key: \"findAnchorInChapter\",\n    value: function findAnchorInChapter(id, parentObject) {\n      var _iterator8 = builderChapters_createForOfIteratorHelper(parentObject.anchors),\n        _step8;\n      try {\n        for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n          var item = _step8.value;\n          if (item.anchorId == id) {\n            return item;\n          }\n        }\n      } catch (err) {\n        _iterator8.e(err);\n      } finally {\n        _iterator8.f();\n      }\n    }\n\n    //TSbookChapters\n  }, {\n    key: \"sortChaptersByPosition\",\n    value: function sortChaptersByPosition() {\n      var context = this;\n      var app = context.app;\n      var sortedChapters = _.sortBy(app.book.bookChapters, function (o) {\n        return o.position;\n      });\n      app.book.bookChapters = sortedChapters;\n    }\n  }, {\n    key: \"getChapterNumbering\",\n    value: function getChapterNumbering() {\n      var _this = this;\n      var app = this.app;\n      var data = _.cloneDeep(app.builder.params.dataChapters);\n      var chapters = app.builder.chapters.unflatChapters2(data);\n      chapters = _.sortBy(chapters, function (o) {\n        return o.position;\n      });\n      app.builder.params.chapterNumbers = [];\n      var counter = 1;\n      chapters.forEach(function (chapter, index) {\n        if (!chapter.hasOwnProperty(\"isNumbered\")) {\n          chapter[\"isNumbered\"] = true;\n        }\n        if (chapter.isNumbered && !chapter.deleted) {\n          _this.setChapterNumber(chapter, counter, chapter.parentId);\n          counter++;\n        }\n      });\n    }\n  }, {\n    key: \"setChapterNumber\",\n    value: function setChapterNumber(chapter, counter, parentNumber) {\n      var _this2 = this;\n      var app = this.app;\n      var obj = _.find(app.builder.params.dataChapters, function (o) {\n        return o.id == chapter.id;\n      });\n      if (parentNumber != null) {\n        obj.number = parentNumber + counter + \".\";\n      } else {\n        obj.number = counter + \".\";\n      }\n      if (chapter.hasOwnProperty(\"routes\") && chapter.routes.length > 0) {\n        var ctr = 1;\n        chapter.routes = _.sortBy(chapter.routes, function (o) {\n          return o.position;\n        });\n        chapter.routes.forEach(function (route) {\n          if (!route.hasOwnProperty(\"isNumbered\")) {\n            route[\"isNumbered\"] = true;\n          }\n          if (route.isNumbered && !route.deleted) {\n            _this2.setChapterNumber(route, ctr, obj.number);\n            ctr++;\n          }\n        });\n      }\n      app.builder.params.chapterNumbers.push({\n        id: obj.id,\n        name: obj.name,\n        number: obj.number\n      });\n    }\n  }, {\n    key: \"reloadViews\",\n    value: function reloadViews() {\n      var context = this;\n      var app = context.app;\n      var _iterator9 = builderChapters_createForOfIteratorHelper(app.views.currentBookViews),\n        _step9;\n      try {\n        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n          var view = _step9.value;\n          if (view.hasOwnProperty(\"destroy\")) {\n            view.destroy();\n          }\n        }\n        // app.views.currentBookViews[2].destroy()\n      } catch (err) {\n        _iterator9.e(err);\n      } finally {\n        _iterator9.f();\n      }\n      var bookContext = app.book;\n      if (bookContext.mainSwiper) {\n        bookContext.mainSwiper.virtual.slides = app.book.getChaptersUrl();\n        bookContext.mainSwiper.virtual.update(true);\n        bookContext.preloadViews();\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var builder_builderChapters = (builderChapters_BuilderChapters);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderHistory.js\n\n\n\n\nfunction builderHistory_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction builderHistory_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? builderHistory_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : builderHistory_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction builderHistory_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderHistory_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderHistory_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderHistory_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderHistory_arrayLikeToArray(r, a) : void 0; } }\nfunction builderHistory_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n//////////\n//////////// Práce s kapitolami knihy\n//////////\n\n// import * as jsdiff from \"diff\";\n\n// https://github.com/sindresorhus/on-change\nvar builderHistory_onChange = __webpack_require__(/*! on-change */ \"./node_modules/on-change/index.js\");\nvar builderHistory_BuilderHistory = /*#__PURE__*/function () {\n  function BuilderHistory(app) {\n    classCallCheck_default()(this, BuilderHistory);\n    var builderHistory = this;\n    builderHistory.app = app;\n    builderHistory.content = {};\n    builderHistory.ignoreHistory = false;\n    builderHistory.ignoreAddHistory = false;\n    builderHistory.ignoreMerge = false;\n    builderHistory.chapterHistory = [];\n    builderHistory.currentUser = null;\n    builderHistory.timeoutHandle = null;\n    builderHistory.content = {};\n    builderHistory.content[\"undo\"] = [];\n    builderHistory.content[\"redo\"] = [];\n    builderHistory.content[\"lastUndo\"] = false;\n    app.data.myEvents.on(\"page:show\", function (page) {\n      var chapter = app.book.getSlideByUrl(\"/\" + page.route.params.id);\n      //if kvůli prvnímu spuštění kdy není žádná kapitola\n      if (chapter) {\n        var id = chapter.id;\n        builderHistory.setPageId(id);\n      }\n    });\n    app.data.myEvents.on(\"logged\", function (user) {\n      builderHistory.currentUser = user.id;\n    });\n    return builderHistory;\n  }\n  return createClass_default()(BuilderHistory, [{\n    key: \"watch\",\n    value: function watch(params, objectPath) {\n      var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (value) {};\n      var _context = this;\n      var app = _context.app;\n      var builderHistory = this;\n      // debugger\n      var i = 0;\n      var watchedObject = builderHistory_onChange(params, function (path, value, previousValue, name) {\n        var val = _.cloneDeep(value);\n        if (Array.isArray(val) && value && previousValue && value.length > previousValue.length) {\n          var length = val.length;\n          for (var key in val) {\n            if (key != length - 1) {\n              delete val[key];\n            }\n          }\n          previousValue = _.cloneDeep(val);\n          previousValue[previousValue.length - 1][\"deleted\"] = true;\n        }\n        var id = \"\".concat(objectPath, \".\") + path;\n        var content = {};\n        var undoContent = {};\n        if (path !== \"\") {\n          _.set(content, \"\".concat(objectPath, \".\") + path, val);\n          _.set(undoContent, \"\".concat(objectPath, \".\") + path, previousValue);\n        } else {\n          _.set(content, \"\".concat(objectPath), val);\n          _.set(undoContent, \"\".concat(objectPath), previousValue);\n        }\n        callback(val);\n        if (builderHistory.ignoreHistory === false) {\n          app.builder.serverData.update(id, content, undoContent);\n          // debugger;\n          if (builderHistory.ignoreAddHistory === false) {\n            app.builder.history.addHistory(id, \"chapters\");\n\n            //todo odeslat data na server\n          }\n        }\n      });\n      return watchedObject;\n    }\n  }, {\n    key: \"getLatestContent\",\n    value: function getLatestContent() {\n      var builderHistory = this;\n      var app = builderHistory.app;\n      var builderServer = app.builder.serverData;\n      var user = app.user;\n      var c = _.cloneDeep(builderServer.content);\n\n      // debugger\n      builderServer.content = [];\n\n      //přechody\n      /* switch (item.type) {\r\n       case \"moveDown\":\r\n         builderHistory.redoPush({...item, type :\"moveUp\"}, false)\r\n         break;\r\n       case \"moveUp\":\r\n         builderHistory.redoPush({...item, type :\"moveDown\"}, false)\r\n         break;\r\n       case \"delete\":\r\n         builderHistory.redoPush({...item, type :\"unDelete\"}, false)\r\n         break;\r\n       case \"unDelete\":\r\n         builderHistory.redoPush({...item, type :\"delete\"}, false)\r\n         break;\r\n       case \"content\":\r\n         builderHistory.redoPush({...item, type :\"content\"}, false)\r\n         break;\r\n       default:\r\n         break;\r\n      }*/\n\n      return c;\n    }\n  }, {\n    key: \"setPageId\",\n    value: function setPageId(pageId) {\n      var builderHistory = this;\n      builderHistory.pageId = pageId;\n    }\n  }, {\n    key: \"addHistory\",\n    value: function addHistory(id, type) {\n      var requestType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"component\";\n      var builderHistory = this;\n      var item = {\n        id: id,\n        type: type,\n        userId: builderHistory.currentUser,\n        data: builderHistory.getLatestContent(),\n        requestType: requestType\n      };\n      builderHistory.redo(item, true, false, true);\n    }\n  }, {\n    key: \"addSettingsHistory\",\n    value: function addSettingsHistory(id, type) {\n      var builderHistory = this;\n      var item = {\n        id: id,\n        type: type,\n        userId: builderHistory.currentUser,\n        data: builderHistory.getLatestContent(),\n        requestType: \"other\"\n      };\n      builderHistory.redo(item, true, false, true);\n    }\n  }, {\n    key: \"addChapterHistory\",\n    value: function addChapterHistory(id, type, data) {\n      var undoContent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      var builderHistory = this;\n      var obj = {\n        id: \"smyslene\",\n        content: data,\n        undoContent: undoContent\n      };\n      var _iterator = builderHistory_createForOfIteratorHelper(data),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var d = _step.value;\n          delete d.data;\n          delete d.routes;\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      var item = {\n        id: id,\n        type: type,\n        userId: builderHistory.currentUser,\n        data: data,\n        requestType: \"chapter\"\n      };\n      // debugger;\n      builderHistory.chapterHistory.push(item);\n      builderHistory.sendToServer(item);\n\n      // debugger\n\n      // builderHistory.redo(item, true, false, true);\n      // app.data.myEvents.emit(\"api:sts\", item);\n      // builderHistory.redo(item, true, false, true);\n    }\n  }, {\n    key: \"sendToServer\",\n    value: function sendToServer(item) {\n      var builderHistory = this;\n      var app = builderHistory.app;\n      app.data.myEvents.emit(\"api:sts\", item);\n    }\n  }, {\n    key: \"compareKeys\",\n    value: function compareKeys(a, b) {\n      var aKeys = Object.keys(a).sort();\n      var bKeys = Object.keys(b).sort();\n      return JSON.stringify(aKeys) === JSON.stringify(bKeys);\n    }\n  }, {\n    key: \"getDeepKeys\",\n    value: function getDeepKeys(obj) {\n      var keys = [];\n      for (var key in obj) {\n        keys.push(key);\n        if (typeof_default()(obj[key]) === \"object\") {\n          var subkeys = this.getDeepKeys(obj[key]);\n          keys = keys.concat(subkeys.map(function (subkey) {\n            return key + \".\" + subkey;\n          }));\n        }\n      }\n      return keys;\n    }\n  }, {\n    key: \"compareKeysDeeply\",\n    value: function compareKeysDeeply(obj1, obj2) {\n      var keys1 = this.getDeepKeys(obj1);\n      var keys2 = this.getDeepKeys(obj2);\n      // debugger;\n      //console.log(\"Compare\", _.sortBy(keys1), _.sortBy(keys2));\n      return _.isEqual(_.sortBy(keys1), _.sortBy(keys2));\n    }\n  }, {\n    key: \"undoPush\",\n    value: function undoPush(item, pageId) {\n      var builderHistory = this;\n      if (!item.hasOwnProperty(\"historyId\")) {\n        item[\"historyId\"] = this.app.utils.id(\"xxxx-xxxx-xxxx-xxxx\");\n      }\n      if (item.requestType === \"component\") {\n        item = builderHistory_objectSpread(builderHistory_objectSpread({}, item), {}, {\n          h: \"undo\",\n          pageId: pageId\n        });\n      } else {\n        item = builderHistory_objectSpread(builderHistory_objectSpread({}, item), {}, {\n          h: \"undo\"\n        });\n      }\n      var lastUndo = builderHistory.content[\"undo\"][builderHistory.content[\"undo\"].length - 1];\n\n      // if (lastUndo) {\n      //   debugger;\n      //   //console.log(lastUndo.data[0].content, item.data[0].content);\n      // }\n      /*\r\n       * Pokud je poslední ovlivněný atribut stejný, tak se historie nepřidá, ale sloučí.\r\n       * Je to kvůli psaní.\r\n       * */\n      if (lastUndo && lastUndo.type !== \"tableContent\" && (lastUndo.type === \"content\" || lastUndo.type === \"settings\") && (item.type === \"content\" || item.type === \"settings\") && item.type !== \"tableContent\" && lastUndo.id === item.id && lastUndo.userId === builderHistory.currentUser &&\n      // lastUndo.data.length === item.data.length &&\n      // builderHistory.compareKeys(\n      //   lastUndo.data[0].content,\n      //   item.data[0].content\n      // ) &&\n      builderHistory.compareKeysDeeply(lastUndo.data[0].content, item.data[0].content)\n\n      // !Array.isArray(lastUndo.data[0].content[Object.keys(lastUndo.data[0].content)[0]])\n      ) {\n        // lastUndo.data[0].content = item.data[0].content;\n\n        var historyObject = item.data[0];\n        var exist = _.find(lastUndo.data, function (o) {\n          return o.id == historyObject.id;\n        });\n        if (exist) {\n          exist.content = historyObject.content;\n        } else {\n          lastUndo.data.push(item.data[0]);\n        }\n        return lastUndo;\n      } else {\n        builderHistory.content[\"undo\"].push(item);\n      }\n      return item;\n    }\n  }, {\n    key: \"redoPush\",\n    value: function redoPush(item, pageId) {\n      var builderHistory = this;\n      if (item.hasOwnProperty(\"update\")) {\n        delete item.update;\n      }\n      item = builderHistory_objectSpread(builderHistory_objectSpread({}, item), {}, {\n        h: \"redo\"\n      });\n      builderHistory.content[\"redo\"].push(item);\n      return item;\n    }\n  }, {\n    key: \"undoButton\",\n    value: function undoButton() {\n      var _context = this;\n      var builderHistory = this;\n      var app = _context.app;\n\n      // builderHistory.pageId;\n\n      var undo = builderHistory.content[\"undo\"];\n      var item = _.findLast(undo, function (o) {\n        return o.userId === builderHistory.currentUser;\n      });\n      if (item && item.hasOwnProperty(\"pageId\") && item.pageId !== builderHistory.pageId) {\n        var flattenRoutes = app.router.flattenRoutes(app.book.getBookChaptersTree());\n\n        // let obj = flattenRoutes.find((o) => o.path === url);\n        var obj = _.find(flattenRoutes, function (o) {\n          return o.id === item.pageId;\n        });\n        var chapterindex = flattenRoutes.indexOf(obj);\n        app.swiper.get(\"#main-swiper\").slideTo(chapterindex);\n      } else {\n        _context.undo();\n      }\n    }\n  }, {\n    key: \"redoButton\",\n    value: function redoButton() {\n      var _context = this;\n      var builderHistory = this;\n      var app = _context.app;\n\n      // builderHistory.pageId;\n\n      var undo = builderHistory.content[\"redo\"];\n      var item = _.findLast(undo, function (o) {\n        return o.userId === builderHistory.currentUser;\n      });\n      // debugger;\n      if (item && item.hasOwnProperty(\"pageId\") && item.pageId !== builderHistory.pageId) {\n        var flattenRoutes = app.router.flattenRoutes(app.book.getBookChaptersTree());\n\n        // let obj = flattenRoutes.find((o) => o.path === url);\n        var obj = _.find(flattenRoutes, function (o) {\n          return o.id === item.pageId;\n        });\n        var chapterindex = flattenRoutes.indexOf(obj);\n        app.swiper.get(\"#main-swiper\").slideTo(chapterindex);\n      } else {\n        _context.redo();\n      }\n    }\n  }, {\n    key: \"undo\",\n    value: function undo() {\n      var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var sendToServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var apply = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n      var push = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n      var pageId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var builderHistory = this;\n      var app = builderHistory.app;\n      if (!pageId) {\n        pageId = builderHistory.pageId;\n      }\n      if (!builderHistory.content) {\n        builderHistory.content = {};\n        builderHistory.content[\"redo\"] = [];\n        builderHistory.content[\"undo\"] = [];\n      }\n      var undo = builderHistory.content[\"undo\"];\n      if (!item) {\n        item = _.findLast(undo, function (o) {\n          return o.userId === builderHistory.currentUser;\n        });\n      }\n      if (item) {\n        var itemn = item;\n        if (push) {\n          itemn = builderHistory.redoPush(item, pageId);\n        }\n        if (sendToServer) {\n          builderHistory.sendToServer(itemn);\n        }\n        if (apply) {\n          app.builder.action.applyContent(itemn, sendToServer);\n        }\n        _.pull(undo, item);\n      } else {\n        alert(\"Dále dozadu to už nejde.\");\n      }\n    }\n  }, {\n    key: \"redo\",\n    value: function redo() {\n      var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var sendToServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var apply = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n      var push = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n      var pageId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var builderHistory = this;\n      var app = builderHistory.app;\n      if (!pageId) {\n        pageId = builderHistory.pageId;\n      }\n      if (!builderHistory.content) {\n        builderHistory.content = {};\n        builderHistory.content[\"redo\"] = [];\n        builderHistory.content[\"undo\"] = [];\n      }\n      var redo = builderHistory.content[\"redo\"];\n      if (!item) {\n        item = _.findLast(redo, function (o) {\n          return o.userId === builderHistory.currentUser;\n        });\n      }\n      if (item) {\n        var itemn = item;\n        if (push) {\n          itemn = builderHistory.undoPush(item, pageId);\n        }\n        if (sendToServer) {\n          builderHistory.sendToServer(itemn);\n        }\n        if (apply) {\n          app.builder.action.applyContent(itemn, sendToServer);\n        }\n        _.pull(redo, item);\n      } else {\n        alert(\"Dále dopředu to již nejde\");\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var builder_builderHistory = (builderHistory_BuilderHistory);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderActions.js\n\n\nfunction builderActions_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderActions_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderActions_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderActions_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderActions_arrayLikeToArray(r, a) : void 0; } }\nfunction builderActions_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n//////////\n//////////// Práce s kapitolami knihy\n//////////\n\n\nvar builderActions_BuilderActions = /*#__PURE__*/function () {\n  function BuilderActions(app) {\n    classCallCheck_default()(this, BuilderActions);\n    var builderActions = this;\n    builderActions.app = app;\n    return builderActions;\n  }\n  return createClass_default()(BuilderActions, [{\n    key: \"mergeAppContent\",\n    value: function mergeAppContent(toApply) {\n      var app = this.app;\n      var seachCustomizer = function seachCustomizer(objValue, srcValue) {\n        //TODO //console.log(\"TS\", objValue, srcValue);\n        if (lodash_default.a.isArray(objValue)) {\n          for (var i = 0; i < srcValue.length; i++) {\n            if (srcValue[i] === null) {\n              // srcValue.splice(i--,1);\n              delete srcValue[i];\n            }\n          }\n          var x = _.merge(objValue, srcValue);\n          // debugger\n          return x;\n        }\n      };\n      _.mergeWith(app, toApply, seachCustomizer);\n      // debugger;\n      if (toApply.hasOwnProperty(\"styles\")) {\n        app.data.myEvents.emit(\"styles:regenerate\");\n      }\n\n      // _.merge(app, toApply);\n    }\n    /*\r\n     * requestType's:\r\n     * chapters: slouží k synchr. kapitol\r\n     * other: synchro. nastavení\r\n     * component: úpravy komponenty\r\n     * componentSettings: castování komponenty\r\n     *\r\n     * */\n  }, {\n    key: \"applyContent\",\n    value: function applyContent(item) {\n      var data = item.data;\n      var type = item.h;\n      var pageId = item.pageId;\n      var builderActions = this;\n      var app = builderActions.app;\n      var builder = app.builder;\n      var builderHistory = app.builder.history;\n      var chapters = app.builder.chapters;\n      var content;\n      if (type === \"undo\") {\n        content = \"content\";\n      } else if (type === \"redo\") {\n        content = \"undoContent\";\n      }\n      builderHistory.ignoreHistory = true;\n      // debugger;\n      if (item.requestType === \"chapters\") {\n        var datas = item.data;\n        var _iterator = builderActions_createForOfIteratorHelper(datas),\n          _step;\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var _data = _step.value;\n            // debugger\n            var chapterData = _data[content];\n            var existChapter = chapters.findChapterById(_data.id);\n            if (existChapter) {\n              var updatedExistChapter = _.merge(existChapter, chapterData);\n            } else {\n              app.builder.params.dataChapters.push(chapterData);\n            }\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n      } else if (item.requestType === \"other\") {\n        var toApply = item.data[0][content];\n        builderActions.mergeAppContent(toApply);\n        // if(item.type === 'chapters'){\n        //   app.builder.chapters.setBookChapters();\n        // }\n      } else if (item.requestType === \"component\") {\n        // srcValue\n        var searchCustomizer = function searchCustomizer(objValue, srcValue) {\n          if (lodash_default.a.isArray(srcValue)) {\n            var i;\n            for (i = 0; i < srcValue.length; i++) {\n              if (srcValue[i] === null) {\n                // srcValue.splice(i--,1);\n                delete srcValue[i];\n              }\n            }\n            srcValue = _.merge(objValue, srcValue);\n            return srcValue;\n            var mergedList = _.map(srcValue, function (item) {\n              return _.extend(item, _.find(objValue, {\n                id: item.id\n              }));\n            });\n            return mergedList;\n          }\n        };\n        data = _.reverse(data);\n        // debugger\n        var _iterator2 = builderActions_createForOfIteratorHelper(data),\n          _step2;\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var c = _step2.value;\n            // debugger\n            var component = builder.helpers.findComponentById(c.id);\n            if (!component) {\n              //Pokud komponenta na serveru není nasazená, ale je v datech teno IF zabrání pokusu o znovu-vytvoření a vyvolání chyby \"Není k dispozici komponenta s názvem UNDEFINED\"\n              if (c.hasOwnProperty(\"name\")) {\n                app.builder.createComponent(c, pageId);\n              }\n              // break;\n            } else {\n              component = _.mergeWith(component.params.content, c[content], searchCustomizer);\n            }\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n      } else if (item.requestType === \"componentSettings\") {\n        // srcValue\n\n        data = _.reverse(data);\n        // debugger\n        var _iterator3 = builderActions_createForOfIteratorHelper(data),\n          _step3;\n        try {\n          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n            var _c = _step3.value;\n            var tomezajima = _c;\n            var _component = builder.helpers.findComponentById(_c.id);\n            if (!_component) {\n              var err = \"Chybí komponenta s názvem: \" + _c[content].name;\n              app.errorHandler.throwRollbarEvent(\"error\", \"BuilderAction\", err, \"ApplyContent\");\n              // alert(\"to se nemůže stát :-)\");\n            } else {\n              var _data2 = _c[content];\n              if (_data2.hasOwnProperty(\"name\")) {\n                _component.changeTo(_data2.name, true);\n              }\n            }\n          }\n        } catch (err) {\n          _iterator3.e(err);\n        } finally {\n          _iterator3.f();\n        }\n      }\n      builderHistory.ignoreHistory = false;\n    }\n  }, {\n    key: \"moveUp\",\n    value: function moveUp(component) {\n      var historyAllowed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var app = component.app;\n      var history = app.builder.history;\n      var tictacr = component.componentsReference;\n      tictacr = lodash_default.a.sortBy(tictacr, [\"params.content.position\"]);\n      var firstVisiblePosition = function firstVisiblePosition() {\n        var i;\n        var fp;\n        for (i = 0; i < tictacr.length; i++) {\n          if (!tictacr[i].params.content.hasOwnProperty(\"delete\") || !tictacr[i].params.content.delete) {\n            fp = tictacr[i].params.content.position;\n            break;\n          }\n        }\n        return fp;\n      };\n      var fp = firstVisiblePosition();\n      if (component.params.content.position > fp) {\n        var position = component.params.content.position;\n        var _findPrev = function findPrev(pos) {\n          var pk = lodash_default.a.findKey(tictacr, {\n            params: {\n              content: {\n                position: pos - 1,\n                delete: false\n              }\n            }\n          });\n\n          // debugger\n\n          if (tictacr.hasOwnProperty(pk) && tictacr[pk].params.content.hasOwnProperty(\"delete\") && tictacr[pk].params.content.delete) {\n            position--;\n            component.params.content.position = component.params.content.position - 1;\n            tictacr[pk].params.content.position = tictacr[pk].params.content.position + 1;\n            return _findPrev(position);\n          } else if (tictacr.hasOwnProperty(pk)) {\n            component.params.content.position = component.params.content.position - 1;\n            tictacr[pk].params.content.position = tictacr[pk].params.content.position + 1;\n          }\n          return pk;\n        };\n        var prevKey = _findPrev(position);\n        if (historyAllowed) {\n          history.addHistory(component.params.id, \"moveUp\");\n        }\n      } else {\n        if (historyAllowed) {\n          alert(\"Již jste nahoře.\");\n        }\n      }\n    }\n  }, {\n    key: \"moveDown\",\n    value: function moveDown(component) {\n      var historyAllowed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var app = component.app;\n      var history = app.builder.history;\n      var tictacr = component.componentsReference;\n      var position = component.params.content.position;\n      tictacr = lodash_default.a.sortBy(tictacr, [\"params.content.position\"]).reverse();\n      var firstVisiblePosition = function firstVisiblePosition() {\n        var i;\n        var fp;\n        for (i = 0; i < tictacr.length; i++) {\n          if (!tictacr[i].params.content.hasOwnProperty(\"delete\") || !tictacr[i].params.content.delete) {\n            fp = tictacr[i].params.content.position;\n            break;\n          }\n        }\n        return fp;\n      };\n      var fp = firstVisiblePosition();\n      if (component.params.content.position < fp) {\n        var _findNext = function findNext(pos) {\n          var nk = lodash_default.a.findKey(tictacr, {\n            params: {\n              content: {\n                position: pos + 1,\n                delete: false\n              }\n            }\n          });\n          if (tictacr.hasOwnProperty(nk) && tictacr[nk].params.content.hasOwnProperty(\"delete\") && tictacr[nk].params.content.delete) {\n            position++;\n            component.params.content.position = component.params.content.position + 1;\n            tictacr[nk].params.content.position = tictacr[nk].params.content.position - 1;\n            return _findNext(position);\n          } else if (tictacr.hasOwnProperty(nk)) {\n            component.params.content.position = component.params.content.position + 1;\n            tictacr[nk].params.content.position = tictacr[nk].params.content.position - 1;\n          }\n          return nk;\n        };\n        var nextKey = _findNext(position);\n        if (historyAllowed) {\n          history.addHistory(component.params.id, \"moveDown\");\n        }\n      } else {\n        if (historyAllowed) {\n          alert(\"Již jste dole.\");\n        }\n      }\n    }\n  }, {\n    key: \"remove\",\n    value: function remove(component) {\n      var historyAllowed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var app = component.app;\n      var history = app.builder.history;\n      app.builder.history.ignoreAddHistory = true;\n      component.params.content.delete = true;\n      app.styles.deleteStyle(component.params.id);\n\n      // let subcomponents = app.builder.flattenComponents(\n      //   component.components\n      // );\n      // // debugger;\n      //\n      // subcomponents.forEach((subComponent) => {\n      //\n      // })\n      app.builder.reducePosition(component.componentsReference, component.params.content.position);\n      // debugger;\n      app.builder.history.ignoreAddHistory = false;\n      if (historyAllowed) {\n        history.addHistory(component.params.id, \"remove\");\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var builder_builderActions = (builderActions_BuilderActions);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderServer.js\n\n\n//////////\n//////////// Pole se změňěnými daty, které využívá builder Historie\n//////////\nvar builderServer_BuilderServer = /*#__PURE__*/function () {\n  function BuilderServer(app) {\n    classCallCheck_default()(this, BuilderServer);\n    var builderServer = this;\n    builderServer.app = app;\n    builderServer.content = [];\n    builderServer.toServer = [];\n    builderServer.completHistory = [];\n    return builderServer;\n  }\n  return createClass_default()(BuilderServer, [{\n    key: \"add\",\n    value: function add(id, content, undoContent, name) {\n      var parentId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var subKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n      var builderServer = this;\n      var obj = {\n        id: id,\n        name: name,\n        parentId: parentId,\n        subKey: subKey,\n        content: content,\n        undoContent: undoContent,\n        update: false\n      };\n      var exist = _.find(builderServer.content, {\n        id: id\n      });\n      if (exist) {\n        exist.content = _.cloneDeep(obj.content);\n      } else {\n        builderServer.content.push(obj);\n      }\n    }\n  }, {\n    key: \"update\",\n    value: function update(id, content, undoContent) {\n      var builderServer = this;\n      var obj = {\n        id: id,\n        content: content,\n        undoContent: undoContent\n      };\n      var exist = _.find(builderServer.content, {\n        id: id\n      });\n      if (exist) {\n        var comp = this.app.builder.history.compareKeysDeeply(exist.content, obj.content);\n        if (comp) {\n          exist.content = _.cloneDeep(obj.content);\n        } else {\n          builderServer.content.push(obj);\n        }\n      } else {\n        builderServer.content.push(obj);\n      }\n    }\n  }, {\n    key: \"clearContent\",\n    value: function clearContent() {\n      var builderServer = this;\n      builderServer.content = [];\n    }\n  }]);\n}();\n/* harmony default export */ var builder_builderServer = (builderServer_BuilderServer);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderHelpers.js\n\n\n\n\nvar builderHelpers_BuilderHelper = /*#__PURE__*/function () {\n  function BuilderHelper(app, builder) {\n    classCallCheck_default()(this, BuilderHelper);\n    var builderHelper = this;\n    builderHelper.app = app;\n    builderHelper.builder = builder;\n\n    // this.customBeforeRender();\n\n    //Console.watch EXTENDER\n    console.watch = function (oObj, sProp) {\n      var sPrivateProp = \"$_\" + sProp + \"_$\";\n      oObj[sPrivateProp] = oObj[sProp];\n\n      // overwrite with accessor\n      Object.defineProperty(oObj, sProp, {\n        get: function get() {\n          return oObj[sPrivateProp];\n        },\n        set: function set(value) {\n          oObj[sPrivateProp] = value;\n        }\n      });\n    };\n    return builderHelper;\n  }\n\n  /**\r\n   * Metoda pro navázání customBeforeRender eventu\r\n   * @param {function} fn - Funkce, která určuje akci na before render.\r\n   */\n  return createClass_default()(BuilderHelper, [{\n    key: \"customBeforeRender\",\n    value: function customBeforeRender(fn) {\n      var app = this.app;\n      this.builder.beforeRender = app.utils.extender(this.builder.beforeRender, function (f) {\n        return fn(f);\n      });\n    }\n\n    /**\r\n     * Metoda která v celé knize najde a nahradí content podle fn v parametru.\r\n     * @param {function} fn - Funkce, podle které se bude hledat a nahrazovat.\r\n     * @param {bool} save - Určuje, zda se má změna okamžitě poslat na server. (default false)\r\n     * @param {array} keys - Pole string hodnot, které určují klíče v kterých se má nahrazovat. Prazdné pole znamená nahradit všude (default [])\r\n    */\n  }, {\n    key: \"findAndReplaceContent\",\n    value: function findAndReplaceContent(fn) {\n      var save = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n      var self = this;\n      var allComponents = this.builder.getSortedComponentsReference();\n      var app = this.app;\n      if (!save) {\n        app.builder.history.ignoreHistory = true;\n      }\n      allComponents.forEach(function (component) {\n        var content = component.params.content;\n\n        // //console.log(\"-------------------------------------\");\n        // //console.log(\"CNT BSE:\", component.params.name, content);\n        // //console.log(\"\\n\");\n\n        var _loopThrough = function loopThrough(content) {\n          Object.keys(content).forEach(function (cont) {\n            if (content[cont] !== Object(content[cont])) {\n              if (cont !== \"id\" && cont !== \"deleted\" && cont !== \"delete\" && cont !== \"pageId\" && cont !== \"position\" && cont !== \"selected\" && typeof content[cont] === \"string\") {\n                var res = null;\n                if (keys.length == 0 || keys.length > 0 && keys.includes(cont)) {\n                  res = fn.call(self, content[cont]);\n                  if (content[cont] != res) {\n                    console.info(\"Replaced\", \"(\".concat(component.params.id, \")\"), component.params.name, \": \".concat(cont), \"|\", content[cont], \"\\n ---to--- \\n\", res);\n                  }\n                  content[cont] = res;\n                }\n\n                // }\n              }\n            } else {\n              // debugger;\n              // //console.log(\"CNT2\", cont, content[cont]);\n              if (typeof_default()(content[cont]) === \"object\") {\n                // debugger\n                _loopThrough(content[cont]);\n              } else {\n                //console.log(\"CNT2\", cont, content[cont]);\n              }\n            }\n          });\n        };\n        _loopThrough(content);\n\n        // //console.log(\"-------------------------------------\");\n        // //console.log(\"Content\", content);\n      });\n      app.builder.history.ignoreHistory = false;\n    }\n\n    /**\r\n     * Metoda která v celé knize najde a vypíše content podle fn v parametru.\r\n     * @param {function} fn - Funkce, podle které se bude hledat a nahrazovat.\r\n     * @param {array} keys - Pole string hodnot, které určují klíče v kterých se má nahrazovat. Prazdné pole znamená nahradit všude (default [])\r\n     */\n  }, {\n    key: \"findAndGet\",\n    value: function findAndGet(fn) {\n      var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var self = this;\n      var allComponents = this.builder.getSortedComponentsReference();\n      var app = this.app;\n      var result = [];\n      allComponents.forEach(function (component) {\n        var content = component.params.content;\n        var _loopThrough2 = function loopThrough(content) {\n          Object.keys(content).forEach(function (cont) {\n            if (content[cont] !== Object(content[cont])) {\n              if (cont !== \"id\" && cont !== \"deleted\" && cont !== \"delete\" && cont !== \"pageId\" && cont !== \"position\" && cont !== \"selected\" && typeof content[cont] === \"string\") {\n                var res = null;\n                if (keys.length == 0 || keys.length > 0 && keys.includes(cont)) {\n                  res = fn.call(self, content[cont], component);\n                  if (res) {\n                    // console.info(\"Find and get\", res);\n                    result = result.concat(res);\n                  }\n                }\n\n                // }\n              }\n            } else {\n              if (typeof_default()(content[cont]) === \"object\") {\n                _loopThrough2(content[cont]);\n              } else {\n                //console.log(\"CNT2\", cont, content[cont]);\n              }\n            }\n          });\n        };\n        _loopThrough2(content);\n      });\n      return result;\n    }\n\n    // ----------------------------- Funkce pro vyhledávání/nahrazování -----------------------------\n  }, {\n    key: \"replaceApaFreeCitation\",\n    value: function replaceApaFreeCitation(f) {\n      var context = this;\n      var app = context.app;\n      // TEST\n      var regex = /\\(([A-Za-záčďéěíňóřšťúůýžÁČĎÉĚÍŇÓŘŠŤÚÝŽ\\'\\’\\s\\&\\;\\,\\-]+[\\d\\-]+[\\s\\,\\;]*)*\\)/gm;\n      var foundCit = f.match(regex);\n      if (foundCit) {\n        //console.log(\"CIT in text:\", foundCit[0]);\n        var regName = /[a-zA-záčďéěíňóřšťúůýžÁČĎÉĚÍŇÓŘŠŤÚÝŽ\\-\\'\\’\\n]+\\s*[a-zA-z\\']+/gm;\n        var regYear = /[\\d\\-]+/gm;\n        var foundName = foundCit[0].match(regName);\n        var foundYear = foundCit[0].match(regYear);\n\n        //console.log(\"CIT Name:\", foundName);\n\n        var citations = _.filter(app.citations.params.data, function (o) {\n          return !o.deleted && o.type == \"note\";\n        });\n        var finalCitations = \"\";\n        for (var i = 0; i < foundName.length; i++) {\n          foundName[i] = foundName[i].replace(\"\\n\", \"\");\n          var findCit = _.find(citations, function (o) {\n            return o.description.toLowerCase().includes(foundName[i].toLowerCase()) && o.description.toLowerCase().includes(foundYear[0].toLowerCase());\n          });\n          if (findCit) {\n            finalCitations = findCit;\n            break;\n          }\n        }\n        if (finalCitations.length != \"\") {\n          //console.log(\"CIT Founded:\", finalCitations);\n          //console.log(\"\\n\");\n        }\n      }\n      return f;\n      //END TEST\n    }\n\n    // END ----------------------------- Funkce pro vyhledávání/nahrazování -----------------------------\n\n    /**\r\n     * Metoda která nalezne komponenty se zadaným jménem v celé knize\r\n     * @param {string} name - \"name\" hledané komponenty\r\n     * @param {bool} showDeleted - zobrazit deleted komponenty (default FALSE)\r\n     */\n  }, {\n    key: \"findAllComponentWithName\",\n    value: function findAllComponentWithName(name) {\n      var showDeleted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var context = this;\n      var app = context.app;\n      var allComponents = app.builder.components;\n      var founded = [];\n      for (var _i = 0, _Object$entries = Object.entries(allComponents); _i < _Object$entries.length; _i++) {\n        var _Object$entries$_i = slicedToArray_default()(_Object$entries[_i], 2),\n          key = _Object$entries$_i[0],\n          value = _Object$entries$_i[1];\n        var itemFound = context.findAllComponentInChapterWithName(name, value);\n        if (itemFound.length > 0) {\n          founded = _.flatten(founded.concat(itemFound));\n        }\n      }\n      founded = _.flatten(founded);\n\n      // debugger;\n      if (!showDeleted) {\n        founded = _.filter(founded, function (o) {\n          return !o.params.content.delete;\n        });\n      }\n      return founded;\n    }\n\n    /**\r\n     * Pomocná metoda na hledání kompnent podle jména v kapitolách\r\n     * @param {string} id - identifikátor hledané komponenty\r\n     * @param {array} components - pole komponent určité kapitoly\r\n     */\n  }, {\n    key: \"findAllComponentInChapterWithName\",\n    value: function findAllComponentInChapterWithName(name, components) {\n      var context = this;\n      var app = context.app;\n      var founded = [];\n      if (!components || !components.length) {\n        return null;\n      }\n      for (var c in components) {\n        var component = components[c];\n        if (component.params.name === name) {\n          founded.push(component);\n          // debugger;\n        } else if (component.hasOwnProperty(\"components\")) {\n          if (Array.isArray(component.components)) {\n            var helper = context.findAllComponentInChapterWithName(name, component.components);\n            if (helper != null && Array.isArray(helper) && helper.length > 0) {\n              founded.push(helper);\n            }\n          } else if (!Array.isArray(component.components)) {\n            for (var key in Object.keys(component.components)) {\n              var k = Object.keys(component.components)[key];\n              var _helper = context.findAllComponentInChapterWithName(name, component.components[k]);\n              if (_helper != null && Array.isArray(_helper) && _helper.length > 0) {\n                founded.push(_helper);\n              }\n            }\n          }\n        }\n      }\n      return founded;\n    }\n\n    /**\r\n     * Metoda která nalezne komponentu podle zadaného ID\r\n     * @param {string} id - identifikátor hledané komponenty\r\n     */\n  }, {\n    key: \"findComponentById\",\n    value: function findComponentById(id) {\n      var context = this;\n      var app = context.app;\n      var allComponents = app.builder.components;\n      for (var _i2 = 0, _Object$entries2 = Object.entries(allComponents); _i2 < _Object$entries2.length; _i2++) {\n        var _Object$entries2$_i = slicedToArray_default()(_Object$entries2[_i2], 2),\n          key = _Object$entries2$_i[0],\n          value = _Object$entries2$_i[1];\n        var founded = context.findComponentInChapterById(id, value);\n        if (founded) {\n          return founded;\n        }\n      }\n      return null;\n    }\n\n    /**\r\n     * Metoda která nalezne komponentu v určité kapitole podle zadaného ID (Hledá jen v poli koapitoly, které je předáno jako parametr)\r\n     * @param {string} id - identifikátor hledané komponenty\r\n     * @param {array} components - pole komponent určité kapitoly\r\n     */\n  }, {\n    key: \"findComponentInChapterById\",\n    value: function findComponentInChapterById(id, components) {\n      var context = this;\n      var app = context.app;\n      var founded = null;\n      if (!components || !components.length) {\n        return null;\n      }\n      for (var c in components) {\n        var component = components[c];\n        if (component.params.id === id) {\n          founded = component;\n          // break;\n          return founded;\n        } else if (component.hasOwnProperty(\"components\")) {\n          if (Array.isArray(component.components)) {\n            founded = context.findComponentInChapterById(id, component.components);\n            if (founded != null) {\n              // break;\n              return founded;\n            }\n          } else if (!Array.isArray(component.components)) {\n            for (var key in Object.keys(component.components)) {\n              var k = Object.keys(component.components)[key];\n              founded = context.findComponentInChapterById(id, component.components[k]);\n              if (founded != null) {\n                // break;\n                return founded;\n              }\n            }\n          }\n        }\n      }\n      return founded;\n    }\n\n    //??? -> přejmenovat?\n  }, {\n    key: \"getCategoryComponentByName\",\n    value: function getCategoryComponentByName(componentName) {\n      var app = this.app;\n      var founded = _.filter(app.builder.defaultComponentsFlat, function (o) {\n        return o.name === componentName;\n      });\n      var copyComp = _.cloneDeep(founded[0]);\n      return copyComp;\n    }\n\n    /*\r\n     * Vrátí seznam názvů (\"name\") všech komponent, které má bulder k dispozici.\r\n     * Včetně podnázvu \"subtitle\"\r\n     */\n  }, {\n    key: \"getAllDefaultComponentsNames\",\n    value: function getAllDefaultComponentsNames() {\n      var app = this.app;\n      var all = this.getAllDefaultComponents();\n      function name(c) {\n        var suffix = \"\";\n        if (c.subtitle) {\n          suffix = \" - \" + c.subtitle;\n        }\n        return c.name + \": \" + c.title + suffix;\n      }\n      return _.map(all, name);\n    }\n\n    /*\r\n     * Vrátí seznam všech komponent, které má bulder k dispozici.\r\n     */\n  }, {\n    key: \"getAllDefaultComponents\",\n    value: function getAllDefaultComponents() {\n      var app = this.app;\n      var all = this.builder.defaultComponentsFlat;\n      return _.uniq(all);\n    }\n\n    /*\r\n     * Vrátí seznam všech kategorií, které má bulder k dispozici.\r\n     */\n  }, {\n    key: \"getAllDefaultCategories\",\n    value: function getAllDefaultCategories() {\n      var app = this.app;\n      var all = this.builder.helpers.defaultCategoryFlatten(app.builder.categories);\n      return _.uniq(all);\n    }\n\n    /*\r\n     * Pomocná metoda pro getAllDefaultCategories()\r\n     */\n  }, {\n    key: \"defaultCategoryFlatten\",\n    value: function defaultCategoryFlatten(category) {\n      var builder = this;\n      var categories = [];\n      var componentsx = [];\n      Object.keys(category).forEach(function (groupId) {\n        if (category[groupId].components) {\n          category[groupId].components.forEach(function (category) {\n            if (category.components) {\n              categories.push(category);\n            }\n          });\n        }\n      });\n      return categories;\n\n      // let components = builder.categoriesFromGroups(category);\n      // components.forEach((component) => {\n      //   builder.categoryComponents.push(component);\n      // });\n      //\n      // return builder.categoryComponents;\n    }\n  }]);\n}();\n/* harmony default export */ var builderHelpers = (builderHelpers_BuilderHelper);\n// EXTERNAL MODULE: ./node_modules/underscore/modules/index-all.js + 159 modules\nvar index_all = __webpack_require__(\"./node_modules/underscore/modules/index-all.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderVersions.js\n\n\n\n\nfunction builderVersions_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderVersions_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderVersions_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderVersions_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderVersions_arrayLikeToArray(r, a) : void 0; } }\nfunction builderVersions_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n//////////\n//////////// Práce s verzemi knihy\n//////////\n\n\nvar builderVersions_BuilderVersions = /*#__PURE__*/function () {\n  function BuilderVersions(app) {\n    classCallCheck_default()(this, BuilderVersions);\n    var builderVersions = this;\n    builderVersions.app = app;\n    builderVersions.versionsList = [];\n    builderVersions.currentVersion = null;\n    builderVersions.currentName = null;\n    builderVersions.componentHistory = [];\n    builderVersions.componentHistoryPopover = null;\n    builderVersions.currHistory = [];\n    builderVersions.templateFilter = {};\n    builderVersions.templateFilter.timestampFrom = null;\n    builderVersions.templateFilter.timestampTo = null;\n    builderVersions.templateFilter.name;\n    builderVersions.templateFilter.type;\n    builderVersions.templateFilter.smartSelectValues = null;\n    builderVersions.templateFilter.calendarRange = null;\n    builderVersions.templateFilter.page = null;\n    builderVersions.templateFilter.lastViewId = 0;\n    return builderVersions;\n  }\n  return createClass_default()(BuilderVersions, [{\n    key: \"setCurrentVersion\",\n    value: function setCurrentVersion(id) {\n      var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var context = this;\n      var app = context.app;\n      var oldVersion = context.currentVersion;\n      context.currentVersion = id;\n      if (name != null) {\n        context.currentName = name;\n      } else {\n        context.currentName = \"Bezejmenná\";\n      }\n      if (oldVersion != context.currentVersion) {\n        app.toast.create({\n          text: app.translation.t(\"builder:version.wasLoaded\") + \": \" + context.currentName,\n          closeTimeout: 2500,\n          horizontalPosition: \"center\",\n          position: \"top\"\n        }).open();\n      }\n      setTimeout(function () {\n        app.data.myEvents.emit(\"versions:nameSet\");\n      }, 500);\n    }\n  }, {\n    key: \"addToVersionList\",\n    value: function addToVersionList(data) {\n      var context = this;\n      var app = context.app;\n      context.versionsList.unshift(data);\n      app.data.myEvents.emit(\"versions:added\");\n    }\n  }, {\n    key: \"setVersionsList\",\n    value: function setVersionsList(data) {\n      var context = this;\n      var app = context.app;\n      context.versionsList = data;\n      app.data.myEvents.emit(\"versions:added\");\n    }\n  }, {\n    key: \"getVersionsList\",\n    value: function getVersionsList() {\n      var context = this;\n      var app = context.app;\n      return context.versionsList;\n    }\n  }, {\n    key: \"getCurrName\",\n    value: function getCurrName() {\n      var context = this;\n      var app = context.app;\n      return context.currentName;\n    }\n  }, {\n    key: \"createNewVersion\",\n    value: function () {\n      var _createNewVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(name) {\n        var context, app, versionId, bookId;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              context = this;\n              app = context.app;\n              versionId = context.currentVersion;\n              bookId = app.id;\n              _context.next = 6;\n              return app.builder.api.sendNewVersion(bookId, versionId, name);\n            case 6:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function createNewVersion(_x) {\n        return _createNewVersion.apply(this, arguments);\n      }\n      return createNewVersion;\n    }()\n  }, {\n    key: \"loadVersion\",\n    value: function () {\n      var _loadVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(id) {\n        var context, app;\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              context = this;\n              app = context.app;\n              _context2.next = 4;\n              return app.builder.api.getBookbyVersion(id, true);\n            case 4:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function loadVersion(_x2) {\n        return _loadVersion.apply(this, arguments);\n      }\n      return loadVersion;\n    }()\n  }, {\n    key: \"setVersionData\",\n    value: function setVersionData(data, rerender) {\n      var context = this;\n      var app = context.app;\n      var _iterator = builderVersions_createForOfIteratorHelper(data),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var d = _step.value;\n          delete d._id;\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      var item = data;\n      var _iterator2 = builderVersions_createForOfIteratorHelper(item),\n        _step2;\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var ch = _step2.value;\n          app.builder.chapters.unflatChapters(data, data, ch.parentId, ch.id);\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n      var fux = data;\n      // debugger\n\n      app.book.bookChapters = data;\n      app.builder.chapters.sortChaptersByPosition();\n      // app.builder.components = [];\n      // app.builder.setDataFromRoutes();\n\n      if (rerender) {\n        app.builder.chapters.reloadViews();\n      }\n\n      //\n      // app.book.mainSwiper.virtual.slides = app.book.getChaptersUrl();\n      // app.book.mainSwiper.virtual.update(true);\n      // app.book.preloadViews();\n\n      // app.dialog.alert(\"Verze byla načtena\", \"Upozornění\");\n    }\n  }, {\n    key: \"setComponentVersion\",\n    value: function setComponentVersion(id) {\n      var context = this;\n      var app = context.app;\n      context.componentVersion = id;\n    }\n  }, {\n    key: \"publicateVersion\",\n    value: function publicateVersion(id) {\n      var context = this;\n      var app = context.app;\n      app.builder.api.publicateBookVersion(id);\n    }\n  }, {\n    key: \"getComponentHistory\",\n    value: function getComponentHistory(id) {\n      var context = this;\n      var app = context.app;\n      var version = context.currentVersion;\n      app.builder.api.getComponentHistoryApi(id, version);\n    }\n  }, {\n    key: \"createHistoryList\",\n    value: function () {\n      var _createHistoryList = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(data) {\n        var showComponentInfo,\n          context,\n          app,\n          history,\n          content,\n          _args3 = arguments;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              showComponentInfo = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : false;\n              context = this;\n              app = context.app;\n              history = data;\n              content = \"\";\n              content = '<div class=\"list media-list\"><ul>';\n              history.data.forEach(function (element) {\n                content += context.createHistoryRecordElement(element, showComponentInfo);\n              });\n              content += \"</ul></div>\";\n              return _context3.abrupt(\"return\", content);\n            case 9:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function createHistoryList(_x3) {\n        return _createHistoryList.apply(this, arguments);\n      }\n      return createHistoryList;\n    }()\n  }, {\n    key: \"createHistoryRecordElement\",\n    value: function createHistoryRecordElement(item, showInfo) {\n      // //console.log(\"CHRE\", item);\n\n      var redoFlag = false;\n      // debugger;\n      var el = \"<li data-hisotryId='\".concat(item.historyId, \"'>\");\n      el += this.genHeader(item);\n      el += \"<div class=\\\"item-text\\\">\";\n      if (showInfo) {\n        el += this.genInfo(item);\n      }\n      el += \"<div class=\\\"content\\\">\";\n      var data = _.filter(item.data, function (o) {\n        return o.id == item.id;\n      });\n      if (item.h == \"redo\") {\n        redoFlag = true;\n      }\n      switch (item.type) {\n        case \"add\":\n          el += this.genAddItem(data[0], redoFlag);\n          break;\n        case \"addMultiple\":\n          // debugger;\n          var addedMultipleTitle = \"Bylo použito <strong>kopírování</strong>\";\n          if (redoFlag) {\n            addedMultipleTitle = \"Zkopírované komponenty byly <strong>smazány</strong>.\";\n          }\n          el += \"<div>\".concat(addedMultipleTitle, \"</div>\");\n          break;\n        case \"remove\":\n          // debugger;\n          el += this.genRemoveItem(data, redoFlag);\n          break;\n        case \"content\":\n          el += this.genContentItem(data, redoFlag);\n          break;\n        case \"componentSettings\":\n          el += \"<div>Component changed to another</div>\";\n          break;\n        case \"moveDown\":\n        case \"moveUp\":\n          el += this.genMoveItem(item.type, data[0], redoFlag);\n          break;\n        case \"chapters\":\n          el += this.genChaptersItem(data[0], redoFlag);\n          break;\n        case \"settings\":\n          ////console.log(\"ITEM\", item);\n          el += this.genSettingsItem(data[0], redoFlag);\n          break;\n      }\n      if (item.type == \"content\") {\n        el += \"<div class=\\\"item-after\\\"><i class=\\\"icon material-icons revert-action\\\" data-id=\\\"\".concat(item.historyId, \"\\\" data-type=\\\"material-icons\\\" data-icon=\\\"keyboard_return\\\"></i></div>\");\n      }\n      el += \"</div>\";\n      el += \"</div></li>\";\n      return el;\n    }\n  }, {\n    key: \"genHeader\",\n    value: function genHeader(item) {\n      var icon = \"\";\n      switch (item.type) {\n        case \"add\":\n          icon = \"<i class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"add_circle_outline\\\"></i>\";\n          break;\n        case \"content\":\n          icon = \"<i class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"edit\\\"></i>\";\n          break;\n        case \"moveUp\":\n          icon = \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"chevron_up_round\\\"></i>\";\n          break;\n        case \"moveDown\":\n          icon = \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"chevron_down_round\\\"></i>\";\n          break;\n        case \"remove\":\n          icon = \"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"remove_circle\\\"></i>\";\n          break;\n        case \"addMultiple\":\n          icon = \"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"add_to_photos\\\"></i>\";\n          break;\n        case \"settings\":\n          icon = \"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"settings\\\"></i>\";\n          break;\n        case \"chapters\":\n          icon = \"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"book\\\"></i>\";\n          break;\n      }\n      return \"\\n    <div class=\\\"item-inner item-content\\\">\\n      <div class=\\\"item-title-row\\\">\\n        <div class=\\\"item-media\\\">\\n        \".concat(icon, \"\\n        </div>\\n        <div class=\\\"item-title\\\">\").concat(item.userName, \"</div>\\n        <div class=\\\"item-after\\\">\").concat(item.create_date, \"</div>\\n      </div>\");\n    }\n  }, {\n    key: \"genInfo\",\n    value: function genInfo(item) {\n      var app = this.app;\n      // let compName = item.data[0].name;\n      var compId = item.id;\n      var comp = app.builder.helpers.findComponentById(compId);\n      var compPage = item.pageId || item.id;\n      var page = compPage ? app.builder.chapters.findChapterById(compPage) : null;\n\n      /* if(!comp){\r\n        debugger\r\n      }\r\n        if(!page){\r\n        debugger\r\n      }*/\n      var el = \"<div class=\\\"comp-info\\\">\";\n      if (comp && page) {\n        el += \"<div>\\n                <a class=\\\"navigate link prevent-router\\\" href=\\\"\".concat(page.fullPath, \"\\\" data-scroll-to=\\\"#\").concat(compId, \"\\\" data-scroll-to-highlight=\\\"true\\\">\\n                  <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"tag\\\"></i>\\n                  <span  style=\\\"white-space: nowrap;\\\">\").concat(comp.params.name, \"</span>\\n                </a>\\n              </div>\");\n      } else if (comp) {\n        el += \"<div>\\n                  <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"tag\\\"></i>\\n                  <span  style=\\\"white-space: nowrap;\\\">\".concat(comp.params.name, \"</span>\\n              </div>\");\n      } else {\n        el += \"<div style=\\\"white-space: nowrap;\\\">\\n                  <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"tag\\\"></i>\\n                  <span style=\\\"white-space: nowrap;\\\">Deleted</span>\\n              </div>\";\n      }\n      if (page) {\n        el += \"<div>\\n              <a class=\\\"navigate link prevent-router\\\" href=\\\"\".concat(page.fullPath, \"\\\">\\n                <i class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"find_in_page\\\"></i>\\n                <span style=\\\"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\\\">\").concat(page.name, \"</span>\\n              </a>\\n            </div>\");\n      } else {\n        el += \"<div  style=\\\"white-space: nowrap;\\\">\\n                <i class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"find_in_page\\\"></i>\\n                <span style=\\\"white-space: nowrap;\\\">Deleted</span>\\n            </div>\";\n      }\n      if (item.h == \"redo\") {\n        el += \"<div>\\n                <i class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"undo\\\"></i>\\n                <span style=\\\"white-space: nowrap;\\\">History back</span>\\n            </div>\";\n      }\n      el += \"</div>\";\n      return el;\n    }\n  }, {\n    key: \"escape\",\n    value: function escape(s) {\n      var lookup = {\n        \"&\": \"&amp;\",\n        '\"': \"&quot;\",\n        \"'\": \"&apos;\",\n        \"<\": \"&lt;\",\n        \">\": \"&gt;\",\n        \"/\": \"&frasl;\"\n      };\n      s = s.replace(/[&\"'<>]/g, function (c) {\n        return lookup[c];\n      });\n      //s = s.replaceAll('var', 'varx');\n      return s;\n    }\n  }, {\n    key: \"fixBrackets\",\n    value: function fixBrackets(data) {\n      if (_.isString(data)) {\n        data = data.replaceAll(\" />\", \">\");\n        data = data.replaceAll(\"/>\", \">\");\n        data = data.replaceAll(\"</ \", \"<\");\n        data = data.replaceAll(\"</\", \"<\");\n        data = data.replaceAll(\">\", \"> \");\n        data = data.replaceAll(\"<\", \" <\");\n        data = data.replaceAll(\"< \", \"<\");\n        data = data.replaceAll(\" <\", \"<\");\n        data = data.replaceAll('class=\"\"', \"\");\n      }\n      return data;\n    }\n  }, {\n    key: \"flat\",\n    value: function flat(item) {\n      var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n      var newObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var concatenator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \".\";\n      var builderVersions = this;\n      Object.keys(item).forEach(function (key) {\n        var val = item[key];\n        if (val != null) {\n          var k = \"\".concat(prefix).concat(key);\n          if (typeof val === \"array\") {}\n          if (typeof_default()(val) === \"object\") {\n            builderVersions.flat(val, \"\".concat(k, \".\"), newObj);\n          } else {\n            newObj[k] = val;\n          }\n        }\n      });\n      return newObj;\n    }\n  }, {\n    key: \"genContentItem\",\n    value: function genContentItem(data, redo) {\n      var _this = this;\n      var Diff = __webpack_require__(/*! diff */ \"./node_modules/diff/dist/diff.js\");\n      var builderVersions = this;\n      var contentData = data[data.length - 1].content;\n      var undoData = data[0].undoContent;\n      contentData = builderVersions.flat(contentData);\n      undoData = builderVersions.flat(undoData);\n      //debugger TODO pro změnu v polích, jako je např. Lists, to nefunguje\n      var keys = Object.keys(contentData);\n      if (redo) {\n        var holder = contentData;\n        contentData = undoData;\n        undoData = holder;\n      }\n      if (keys.length > 1 || keys.length == 0) {\n        // debugger\n      }\n      var element = \"<div>\";\n      //sanitizeHtml\n      keys.forEach(function (key) {\n        var valueC = contentData[key];\n        var valueUc = undoData[key];\n        // //console.log(\"HA1\", valueC, \"|\", valueUc);\n        // //console.log(\"HA2\", valueCC, \"|\", valueUcc);\n        //debugger;\n        if (typeof_default()(valueC) === \"object\" || typeof_default()(valueUc) === \"object\") {\n          debugger;\n          var diffJson = Diff.diffJson(valueUc, valueC);\n          var subString = \"\";\n          diffJson.forEach(function (part) {\n            if (part.value.length > 0) {\n              var color = part.added ? \"new\" : part.removed ? \"old\" : \"\";\n              ////console.log(\"PART\", part);\n\n              subString += \"<span \".concat(color.length > 0 ? \" class='\".concat(color, \"'\") : \"\", \"> \").concat(_this.escape(part.value), \" </span>\");\n            }\n          });\n          element += \"<div><strong>\".concat(key, \":</strong> \").concat(subString, \" </div>\");\n        } else if (typeof valueC === \"string\" || typeof valueUc === \"string\") {\n          //Pokud se objeví číslo, tak to padá\n          valueC = \"\".concat(valueC);\n          valueUc = \"\".concat(valueUc);\n          if (valueC === valueUc) {\n            element += \"<div>Element without change.</div>\";\n            return;\n          }\n          valueC = _this.fixBrackets(valueC);\n          valueUc = _this.fixBrackets(valueUc);\n          var diffChars = Diff.diffWords(valueUc, valueC);\n\n          //console.log(\"HE\", valueUc);\n          //console.log(\"HEX\", valueC);\n\n          // let diffChars = Diff.diffWords(valueUcc, valueCC);\n          // let diffChars = Diff.diffWordsWithSpace(valueC, valueUc);\n          var _subString = \"\";\n          diffChars.forEach(function (part) {\n            if (part.value.length > 0) {\n              var color = part.added ? \"new\" : part.removed ? \"old\" : \"\";\n              ////console.log(\"PART\", part);\n              _subString += \"<span \".concat(color.length > 0 ? \" class='\".concat(color, \"'\") : \"\", \"> \").concat(_this.escape(part.value), \" </span>\");\n            }\n          });\n          element += \"<div><strong>\".concat(key, \":</strong> \").concat(_subString, \" </div>\");\n        }\n      });\n      element += \"</div>\";\n      return element;\n      // //console.log(\"DIFFCHARS\", diff.diffChars(data));\n    }\n  }, {\n    key: \"genAddItem\",\n    value: function genAddItem(data, redo) {\n      var app = this.app;\n      var name = data.name;\n      var el = \"\";\n      if (!redo) {\n        el = \"<div class=\\\"new\\\">Byla <strong>p\\u0159id\\xE1na</strong> komponenta <strong>\".concat(name, \"</strong></div>\");\n      } else {\n        el = \"<div class=\\\"old\\\"><strong>P\\u0159idan\\xE1</strong> komponenta <strong>\".concat(name, \"</strong> byla <strong>odebr\\xE1na</strong> (navr\\xE1cen\\xED).</div>\");\n      }\n      return el;\n    }\n  }, {\n    key: \"genSettingsItem\",\n    value: function genSettingsItem(data, redo) {\n      var Diff = __webpack_require__(/*! diff */ \"./node_modules/diff/dist/diff.js\");\n      var app = this.app;\n      var id = data.id;\n      var objectC = _.get(data.content, id);\n      var objectUc = _.get(data.undoContent, id);\n      var element = \"\";\n      if (id == \"book.params.color\") {\n        element += \"<div>Barva knihy byla zm\\u011Bn\\u011Bna z <storng style=\\\"color:\".concat(objectUc, \"\\\">\").concat(objectUc, \"</storng> na <storng style=\\\"color:\").concat(objectC, \"\\\">\").concat(objectC, \"</storng></div>\");\n      } else {\n        var diffJson = Diff.diffJson(objectUc, objectC);\n        if (redo) {\n          diffJson = Diff.diffJson(objectC, objectUc);\n        }\n        var subString = \"\";\n        diffJson.forEach(function (part) {\n          if (part.value.length > 0) {\n            var color = part.added ? \"new\" : part.removed ? \"old\" : \"\";\n            ////console.log(\"PART\", part);\n\n            subString += \"<span \".concat(color.length > 0 ? \" class='\".concat(color, \"'\") : \"\", \"> \").concat(part.value, \" </span>\");\n          }\n        });\n        element += \"<div>Bylo zm\\u011Bn\\u011Bno nastaven\\xED knihy <strong>\".concat(id, \"</strong>: \").concat(subString, \"</div>\");\n      }\n\n      //  else if (id.includes(\"styles\")) {\n      //   //TODO\n      // } else if (id.includes(\"icons\")) {\n      //   // if(id.includes(\"deleted\")){\n      //   //   //TODO : SMAZANA IKONA\n      //   // }else{\n      //   //   //TODO : Přidaná ikona\n      //   // }\n      // }\n\n      // if (id.includes(\"bookSettings\")) {\n      //   //console.log(\"bookSettings\", data);\n      // }\n      return element;\n      // debugger;\n    }\n  }, {\n    key: \"genMoveItem\",\n    value: function genMoveItem(direction, data, redo) {\n      var app = this.app;\n      var component = app.builder.helpers.findComponentById(data.id);\n      // debugger;\n      var move = \"\";\n      if (direction === \"moveUp\") {\n        move = redo ? \"dolů\" : \"nahoru\";\n      } else {\n        move = redo ? \"nahoru\" : \"dolů\";\n      }\n      var element = \"\";\n      if (!redo) {\n        element = \"<div>Komponenta <strong>\".concat(component ? component.params.name : \"\", \"</strong> byla posunuta <strong>\").concat(move, \"</strong>. Z pozice <strong class=\\\"old\\\">\").concat(data.content.position, \"</strong> na <strong class=\\\"new\\\">\").concat(data.undoContent.position, \"</strong>. </div>\");\n      } else {\n        element = \"<div>Komponenta <strong>\".concat(component ? component.params.name : \"\", \"</strong> byla posunuta zp\\u011Bt <strong>\").concat(move, \"</strong>. Z pozice <strong class=\\\"old\\\">\").concat(data.undoContent.position, \"</strong> na <strong class=\\\"new\\\">\").concat(data.content.position, \"</strong>. </div>\");\n      }\n      return element;\n    }\n  }, {\n    key: \"genRemoveItem\",\n    value: function genRemoveItem(data, redo) {\n      if (redo) {\n        return \"<div class=\\\"new\\\"><strong>Odstran\\u011Bn\\xE1</strong> komponenta byla <strong>navr\\xE1cena</strong>.</div>\";\n      } else {\n        return \"<div class=\\\"old\\\">Komponenta byla <strong>odstran\\u011Bna</strong>.</div>\";\n      }\n    }\n  }, {\n    key: \"genChaptersItem\",\n    value: function genChaptersItem(data, redo) {\n      var element = \"\";\n      var app = this.app;\n      var keys = Object.keys(data.content);\n      var chapter = app.builder.chapters.findChapterById(data.id);\n      var chapterName = \"[Deleted Chapter]\";\n      if (chapter && chapter.name) {\n        chapterName = chapter.name;\n      }\n      if (!chapter && !keys.includes(\"deleted\")) {\n        // debugger\n      }\n      if (keys.length == 1) {\n        if (keys.includes(\"deleted\")) {\n          element += \"<div class=\\\"old\\\">Kapitola <strong>\".concat(chapterName, \"</strong> byla smaz\\xE1na.</div>\");\n        } else if (keys.includes(\"isNumbered\")) {\n          if (data.content.isNumbered) {\n            if (!redo) {\n              element += \"<div class=\\\"new\\\">Bylo <strong>zapnuto</strong> \\u010D\\xEDslov\\xE1n\\xED u kapitoly<strong>\".concat(chapterName, \"</strong></div>\");\n            } else {\n              element += \"<div class=\\\"old\\\">Bylo <strong>vypnuto</strong> \\u010D\\xEDslov\\xE1n\\xED u kapitoly<strong>\".concat(chapterName, \"</strong></div>\");\n            }\n          } else {\n            if (redo) {\n              element += \"<div class=\\\"new\\\">Bylo <strong>zapnuto</strong> \\u010D\\xEDslov\\xE1n\\xED u kapitoly<strong>\".concat(chapterName, \"</strong></div>\");\n            } else {\n              element += \"<div class=\\\"old\\\">Bylo <strong>vypnuto</strong> \\u010D\\xEDslov\\xE1n\\xED u kapitoly<strong>\".concat(chapterName, \"</strong></div>\");\n            }\n          }\n        } else if (keys.includes(\"position\")) {\n          if (!redo) {\n            element += \"<div>Kapitola <strong>\".concat(chapterName, \"</strong> byla <strong>p\\u0159esunuta</strong> z pozice <span class=\\\"old\\\"><strong>\").concat(data.undoContent.position, \"</strong></span> na <span class=\\\"new\\\"><strong>\").concat(data.content.position, \"</strong></span></div>\");\n          } else {\n            element += \"<div>Kapitola <strong>\".concat(chapterName, \"</strong> byla <strong>navr\\xE1cena</strong> z pozice <span class=\\\"old\\\"><strong>\").concat(data.content.position, \"</strong></span> na <span class=\\\"new\\\"><strong>\").concat(data.undoContent.position, \"</strong></span></div>\");\n          }\n        } else if (keys.includes(\"name\")) {\n          if (!redo) {\n            element += \"<div>Kapitola <span class=\\\"old\\\"><strong>\".concat(data.undoContent.name, \"</strong></span> byla p\\u0159ejmenov\\xE1na na <span class=\\\"new\\\"><strong>\").concat(data.content.name, \"</strong></span></div>\");\n          } else {\n            element += \"<div>Jm\\xE9no kapitoly <span class=\\\"old\\\"><strong>\".concat(data.content.name, \"</strong></span> bylo vr\\xE1ceno na <span class=\\\"new\\\"><strong>\").concat(data.undoContent.name, \"</strong></span></div>\");\n          }\n        }\n      } else {\n        element += \"<div class=\\\"new\\\">Byla p\\u0159id\\xE1na kapitola <strong>\".concat(data.content.name, \"</strong></div>\");\n      }\n      return element;\n    }\n  }, {\n    key: \"openHistoryPopup\",\n    value: function openHistoryPopup() {\n      var context = this;\n      context.componentHistoryPopover.open();\n    }\n  }]);\n}();\n/* harmony default export */ var builder_builderVersions = (builderVersions_BuilderVersions);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderApi.js\n\n\n\nfunction builderApi_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = builderApi_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction builderApi_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return builderApi_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? builderApi_arrayLikeToArray(r, a) : void 0; } }\nfunction builderApi_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n\nvar builderApi_BuilderApi = /*#__PURE__*/function () {\n  function BuilderApi(app) {\n    classCallCheck_default()(this, BuilderApi);\n    var builderApi = this;\n    builderApi.app = app;\n    builderApi.ignoreUserContent = false;\n    var reqArr = [];\n    var i = 1;\n    var runnig = false;\n    app.data.myEvents.on(\"book:chaptersLoaded\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n      return regenerator_default.a.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            setTimeout(function () {\n              builderApi.getUserContentData();\n            }, 300);\n          case 1:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    })));\n    app.data.myEvents.on(\"logged\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n      return regenerator_default.a.wrap(function _callee2$(_context2) {\n        while (1) switch (_context2.prev = _context2.next) {\n          case 0:\n            builderApi.syncUserContentData().then(function (res) {\n              builderApi.getUserContentData();\n            });\n          case 1:\n          case \"end\":\n            return _context2.stop();\n        }\n      }, _callee2);\n    })));\n    function makeRequest() {\n      return _makeRequest.apply(this, arguments);\n    }\n    function _makeRequest() {\n      _makeRequest = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5() {\n        var _iterator2, _step2, item, rightPath, obj, toSend, seachCustomizer, _iterator3, _step3, historyItem, datas, _iterator4, _step4, data, exist, res, version, name;\n        return regenerator_default.a.wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              if (!(reqArr.length === 0 || runnig)) {\n                _context5.next = 2;\n                break;\n              }\n              return _context5.abrupt(\"return\");\n            case 2:\n              //stop recursion\n              // let obj=reqArr.shift();\n\n              if (reqArr[0].chapter) {\n                _iterator2 = builderApi_createForOfIteratorHelper(reqArr[0].data);\n                try {\n                  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n                    item = _step2.value;\n                    if (item.hasOwnProperty(\"path\")) {\n                      rightPath = item.path.split(\"/\");\n                      item[\"path\"] = \"/\" + rightPath[rightPath.length - 2] + \"/\";\n                    }\n                  }\n                } catch (err) {\n                  _iterator2.e(err);\n                } finally {\n                  _iterator2.f();\n                }\n              }\n              obj = new FormData();\n              obj.append(\"data\", JSON.stringify(reqArr));\n              obj.append(\"book_id\", app.id);\n              obj.append(\"version_id\", app.builder.versions.currentVersion);\n              toSend = _.cloneDeep(reqArr);\n              reqArr = [];\n              runnig = true;\n              seachCustomizer = function seachCustomizer(objValue, srcValue) {\n                if (lodash_default.a.isArray(objValue)) {\n                  return srcValue;\n                }\n              };\n              _iterator3 = builderApi_createForOfIteratorHelper(toSend);\n              try {\n                for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n                  historyItem = _step3.value;\n                  datas = historyItem.data;\n                  window.historyX.push(historyItem);\n                  _iterator4 = builderApi_createForOfIteratorHelper(datas);\n                  try {\n                    for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n                      data = _step4.value;\n                      window.globalData.push(data);\n                      exist = _.find(window.solution, {\n                        id: data.id\n                      });\n                      if (exist) {\n                        _.mergeWith(exist, data, seachCustomizer);\n                      } else {\n                        window.solution.push(data);\n                      }\n                    }\n                  } catch (err) {\n                    _iterator4.e(err);\n                  } finally {\n                    _iterator4.f();\n                  }\n                }\n              } catch (err) {\n                _iterator3.e(err);\n              } finally {\n                _iterator3.f();\n              }\n              _context5.next = 15;\n              return app.utils.axios.post(app.apiManager.params.psBuilderSaveUrl, obj, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 15:\n              res = _context5.sent;\n              if (!res) {\n                _context5.next = 28;\n                break;\n              }\n              if (!res.data.hasOwnProperty(\"version_id\")) {\n                _context5.next = 28;\n                break;\n              }\n              if (!(app.builder.versions.versionsList.length == 0)) {\n                _context5.next = 21;\n                break;\n              }\n              _context5.next = 21;\n              return builderApi.getBookVersionList();\n            case 21:\n              version = _.find(app.builder.versions.versionsList, function (o) {\n                return o.id === res.data.version_id;\n              });\n              if (version) {\n                _context5.next = 26;\n                break;\n              }\n              _context5.next = 25;\n              return builderApi.getBookVersionList();\n            case 25:\n              version = _.find(app.builder.versions.versionsList, function (o) {\n                return o.id === res.data.version_id;\n              });\n            case 26:\n              name = version.name;\n              app.builder.versions.setCurrentVersion(res.data.version_id, name);\n            case 28:\n              runnig = false;\n              i++;\n              return _context5.abrupt(\"return\", makeRequest());\n            case 31:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5);\n      }));\n      return _makeRequest.apply(this, arguments);\n    }\n    builderApi.syncServer = app.params.builder.development.syncServer;\n    if (builderApi.syncServer) {\n      app.data.myEvents.on(\"api:sts\", /*#__PURE__*/function () {\n        var _ref3 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(item) {\n          var inArrIndex;\n          return regenerator_default.a.wrap(function _callee3$(_context3) {\n            while (1) switch (_context3.prev = _context3.next) {\n              case 0:\n                // debugger;\n                inArrIndex = _.findIndex(reqArr, function (o) {\n                  return o.historyId == item.historyId;\n                }); // //console.log(\"huh\", inArrIndex);\n                if (inArrIndex >= 0) {\n                  reqArr.splice(inArrIndex, 1, item);\n                } else {\n                  reqArr.push(item);\n                }\n                app.stats.resetActivity(xapp.user.identity.id);\n                makeRequest();\n              case 4:\n              case \"end\":\n                return _context3.stop();\n            }\n          }, _callee3);\n        }));\n        return function (_x) {\n          return _ref3.apply(this, arguments);\n        };\n      }());\n      app.data.myEvents.on(\"ws:connected\", function (socket) {\n        // debugger\n\n        // BUILDER\n        socket.private(\"builder.\" + app.id).listen(\".SaveHistoryEvent\", /*#__PURE__*/function () {\n          var _ref4 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4(event) {\n            var data, items, versionId, currVersion, version, _iterator, _step, item;\n            return regenerator_default.a.wrap(function _callee4$(_context4) {\n              while (1) switch (_context4.prev = _context4.next) {\n                case 0:\n                  // alert(event);\n                  // debugger;\n                  data = JSON.parse(event.data);\n                  items = data;\n                  versionId = event.version_id;\n                  currVersion = app.builder.versions.currentVersion;\n                  app.stats.resetActivity(event.user.id);\n                  if (currVersion) {\n                    _context4.next = 13;\n                    break;\n                  }\n                  // await app.builder.versions.getVersionsList();\n                  version = _.find(app.builder.versions.versionsList, function (o) {\n                    return o.id === versionId;\n                  });\n                  if (version) {\n                    _context4.next = 11;\n                    break;\n                  }\n                  _context4.next = 10;\n                  return app.builder.versions.getVersionsList();\n                case 10:\n                  version = _.find(app.builder.versions.versionsList, function (o) {\n                    return o.id === versionId;\n                  });\n                case 11:\n                  app.builder.versions.setCurrentVersion(versionId, version.name);\n                  currVersion = app.builder.versions.currentVersion;\n                case 13:\n                  if (versionId === currVersion) {\n                    _iterator = builderApi_createForOfIteratorHelper(items);\n                    try {\n                      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n                        item = _step.value;\n                        if (item.h === \"undo\") {\n                          app.builder.history.redo(item, false, true, true, item.pageId);\n                        } else if (item.h === \"redo\") {\n                          app.builder.history.undo(item, false, true, true, item.pageId);\n                        }\n                      }\n                    } catch (err) {\n                      _iterator.e(err);\n                    } finally {\n                      _iterator.f();\n                    }\n                  }\n                case 14:\n                case \"end\":\n                  return _context4.stop();\n              }\n            }, _callee4);\n          }));\n          return function (_x2) {\n            return _ref4.apply(this, arguments);\n          };\n        }());\n        socket.private(\"builder-version.\" + app.id).listen(\".SaveNewVersionEvent\", function (event) {\n          // alert(\"1\");\n          var data = event.data;\n          app.builder.versions.addToVersionList(data);\n          // let items = data;\n        });\n\n        //Sledování aktivity uživatelů\n        socket.join(\"book-state.\".concat(app.id)).here(function (users) {\n          users.forEach(function (user) {\n            app.stats.addUser(user);\n          });\n        }).joining(function (user) {\n          app.stats.addUser(user);\n        }).leaving(function (user) {\n          app.stats.removeUser(user);\n        });\n      });\n    }\n    return builderApi;\n  }\n\n  //Do reqArr přidat vše co je v undo v history a zavolat tuto metodu.\n  return createClass_default()(BuilderApi, [{\n    key: \"manualSend\",\n    value: function manualSend() {\n      var app = this.app;\n      var reqArr = [];\n      if (reqArr.length === 0) return; //stop recursion\n      // let obj=reqArr.shift();\n\n      if (reqArr[0].chapter) {\n        var _iterator5 = builderApi_createForOfIteratorHelper(reqArr[0].data),\n          _step5;\n        try {\n          for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n            var item = _step5.value;\n            if (item.hasOwnProperty(\"path\")) {\n              var rightPath = item.path.split(\"/\");\n              item[\"path\"] = \"/\" + rightPath[rightPath.length - 2] + \"/\";\n            }\n          }\n        } catch (err) {\n          _iterator5.e(err);\n        } finally {\n          _iterator5.f();\n        }\n      }\n      var obj = new FormData();\n      obj.append(\"data\", JSON.stringify(reqArr));\n      obj.append(\"book_id\", app.id);\n      obj.append(\"version_id\", app.builder.versions.currentVersion);\n      var toSend = _.cloneDeep(reqArr);\n      reqArr = [];\n      var res = app.utils.axios.post(app.apiManager.params.psBuilderSaveUrl, obj, {\n        headers: {\n          Authorization: \"Bearer \" + app.user.jwt,\n          \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n        }\n      });\n      return res;\n    }\n  }, {\n    key: \"sendNewVersion\",\n    value: function () {\n      var _sendNewVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6(bookId, versionId, name) {\n        var self, app, obj;\n        return regenerator_default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              self = this;\n              if (self.syncServer) {\n                _context6.next = 3;\n                break;\n              }\n              return _context6.abrupt(\"return\");\n            case 3:\n              app = self.app;\n              obj = new FormData();\n              obj.append(\"book_id\", bookId);\n              obj.append(\"version_id\", versionId);\n              obj.append(\"name\", name);\n              _context6.next = 10;\n              return app.utils.axios.post(app.apiManager.params.psSaveVersionUrl, obj, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              }).then(function (res) {\n                var data = res.data.data;\n                app.builder.versions.addToVersionList(data);\n                app.builder.versions.setCurrentVersion(data.id, data.name);\n                // resolve(\"succes\");\n              });\n            case 10:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6, this);\n      }));\n      function sendNewVersion(_x3, _x4, _x5) {\n        return _sendNewVersion.apply(this, arguments);\n      }\n      return sendNewVersion;\n    }()\n  }, {\n    key: \"getBookbyVersion\",\n    value: function () {\n      var _getBookbyVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee7() {\n        var versionId,\n          rerender,\n          self,\n          app,\n          url,\n          dialog,\n          response,\n          bookData,\n          config,\n          settings,\n          id,\n          name,\n          _args7 = arguments;\n        return regenerator_default.a.wrap(function _callee7$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              versionId = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : null;\n              rerender = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : false;\n              self = this;\n              if (self.syncServer) {\n                _context7.next = 5;\n                break;\n              }\n              return _context7.abrupt(\"return\");\n            case 5:\n              app = self.app;\n              url = \";\";\n              dialog = app.dialog.preloader(app.translation.t(\"builder:version.loading\"));\n              if (versionId == null) {\n                url = app.apiManager.params.psGetVersionUrl + app.id;\n              } else {\n                url = app.apiManager.params.psGetVersionUrl + app.id + \"/\" + versionId;\n              }\n              _context7.next = 11;\n              return app.utils.axios.get(url, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 11:\n              response = _context7.sent;\n              if (response.data.data != null) {\n                bookData = response.data.data.content;\n                config = response.data.data; // debugger\n                settings = response.data.settings;\n                app.builder.history.ignoreHistory = true;\n                app.builder.action.mergeAppContent(config);\n                app.builder.params.dataChapters = config.builder.params.dataChapters; // dataChapters se přepíšou místo merge\n                app.builder.chapters.setBookChapters();\n                app.builder.history.ignoreHistory = false;\n                // debugger\n                id = response.data.data[\"_id\"][\"$oid\"];\n                name = response.data.data.name; //\n                // debugger\n                // app.builder.versions.setVersionData(response.data.data.builder.params.dataChapters, rerender);\n                // app.builder.chapters.setBookChapters();\n                app.builder.chapters.getChapterNumbering();\n                app.builder.createComponentsFromData();\n                app.builder.versions.setCurrentVersion(id, name);\n                app.builder.history.content.undo = [];\n                app.builder.history.content.redo = [];\n                //\n              }\n              app.data.myEvents.emit(\"versions:loaded\");\n              dialog.close();\n            case 15:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee7, this);\n      }));\n      function getBookbyVersion() {\n        return _getBookbyVersion.apply(this, arguments);\n      }\n      return getBookbyVersion;\n    }()\n  }, {\n    key: \"publicateBookVersion\",\n    value: function publicateBookVersion(id) {\n      var self = this;\n      if (!self.syncServer) return;\n      var app = self.app;\n      app.utils.axios.get(app.apiManager.params.psSetPublicUrl + app.id + \"/\" + id, {\n        headers: {\n          Authorization: \"Bearer \" + app.user.jwt,\n          \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n        }\n      }).then(function (res) {\n        if (res.status == 200) {\n          app.dialog.alert(app.translation.t(\"builder:version.published\"));\n          app.builder.api.getBookVersionList();\n        } else {\n          app.dialog.alert(app.translation.t(\"builder:version.error\"));\n        }\n      });\n    }\n  }, {\n    key: \"getComponentHistoryApi\",\n    value: function () {\n      var _getComponentHistoryApi = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee8(id, version) {\n        var limit,\n          page,\n          filter,\n          self,\n          app,\n          obj,\n          answer,\n          _args8 = arguments;\n        return regenerator_default.a.wrap(function _callee8$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              limit = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : 30;\n              page = _args8.length > 3 && _args8[3] !== undefined ? _args8[3] : 0;\n              filter = _args8.length > 4 && _args8[4] !== undefined ? _args8[4] : null;\n              self = this;\n              if (self.syncServer) {\n                _context8.next = 6;\n                break;\n              }\n              return _context8.abrupt(\"return\");\n            case 6:\n              app = self.app;\n              obj = new FormData();\n              obj.append(\"component_id\", id);\n              obj.append(\"version_id\", version);\n              obj.append(\"limit\", limit);\n              obj.append(\"page\", page);\n              if (filter != null) {\n                obj.append(\"filters\", JSON.stringify(filter));\n              }\n              _context8.next = 15;\n              return app.utils.axios.post(app.apiManager.params.wsHistoryComponentUrl, obj, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 15:\n              answer = _context8.sent;\n              return _context8.abrupt(\"return\", answer.data.data);\n            case 17:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee8, this);\n      }));\n      function getComponentHistoryApi(_x6, _x7) {\n        return _getComponentHistoryApi.apply(this, arguments);\n      }\n      return getComponentHistoryApi;\n    }()\n  }, {\n    key: \"getBookHistory\",\n    value: function () {\n      var _getBookHistory = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee9() {\n        var limit,\n          page,\n          filter,\n          self,\n          app,\n          obj,\n          answer,\n          _args9 = arguments;\n        return regenerator_default.a.wrap(function _callee9$(_context9) {\n          while (1) switch (_context9.prev = _context9.next) {\n            case 0:\n              limit = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : 30;\n              page = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : 0;\n              filter = _args9.length > 2 && _args9[2] !== undefined ? _args9[2] : null;\n              self = this;\n              app = self.app;\n              obj = new FormData();\n              obj.append(\"book_id\", app.id);\n              obj.append(\"limit\", limit);\n              obj.append(\"page\", page);\n              if (filter != null) {\n                obj.append(\"filters\", JSON.stringify(filter));\n              }\n              _context9.next = 12;\n              return app.utils.axios.post(app.apiManager.params.psHistoryUrl, obj, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 12:\n              answer = _context9.sent;\n              return _context9.abrupt(\"return\", answer.data.data);\n            case 14:\n            case \"end\":\n              return _context9.stop();\n          }\n        }, _callee9, this);\n      }));\n      function getBookHistory() {\n        return _getBookHistory.apply(this, arguments);\n      }\n      return getBookHistory;\n    }()\n  }, {\n    key: \"getBookVersionList\",\n    value: function () {\n      var _getBookVersionList = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee0() {\n        var self, app, response, versionData;\n        return regenerator_default.a.wrap(function _callee0$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              self = this;\n              if (self.syncServer) {\n                _context0.next = 3;\n                break;\n              }\n              return _context0.abrupt(\"return\");\n            case 3:\n              app = self.app;\n              _context0.next = 6;\n              return app.utils.axios.get(app.apiManager.params.psListVersionUrl + app.id, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 6:\n              response = _context0.sent;\n              versionData = response.data.data;\n              app.builder.versions.setVersionsList(versionData);\n            case 9:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee0, this);\n      }));\n      function getBookVersionList() {\n        return _getBookVersionList.apply(this, arguments);\n      }\n      return getBookVersionList;\n    }()\n  }, {\n    key: \"saveUserContentData\",\n    value: function () {\n      var _saveUserContentData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee1(item) {\n        var self, app, arrItem, fData, response, exists;\n        return regenerator_default.a.wrap(function _callee1$(_context1) {\n          while (1) switch (_context1.prev = _context1.next) {\n            case 0:\n              self = this; // if (!self.syncServer) return;\n              app = self.app;\n              if (!app.user.isLogged()) {\n                _context1.next = 12;\n                break;\n              }\n              arrItem = [];\n              arrItem.push(item);\n              arrItem = JSON.stringify(arrItem);\n              fData = new FormData();\n              fData.append(\"book_id\", app.id);\n              fData.append(\"data\", arrItem);\n              response = app.utils.axios.post(app.apiManager.params.psSaveDataUserUrl, fData, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n              _context1.next = 27;\n              break;\n            case 12:\n              _context1.next = 14;\n              return app.database.table(\"user-data\");\n            case 14:\n              _context1.next = 16;\n              return _context1.sent.filter(function (o) {\n                return o[\"id\"] === item.id;\n              }).getValue();\n            case 16:\n              exists = _context1.sent;\n              if (!(exists.length > 0)) {\n                _context1.next = 24;\n                break;\n              }\n              _context1.next = 20;\n              return app.database.table(\"user-data\");\n            case 20:\n              _context1.next = 22;\n              return _context1.sent.where(\"id\", item.id).update({\n                id: item.id,\n                data: item.data\n              });\n            case 22:\n              _context1.next = 27;\n              break;\n            case 24:\n              _context1.next = 26;\n              return app.database.table(\"user-data\");\n            case 26:\n              _context1.sent.insert(item);\n            case 27:\n            case \"end\":\n              return _context1.stop();\n          }\n        }, _callee1, this);\n      }));\n      function saveUserContentData(_x8) {\n        return _saveUserContentData.apply(this, arguments);\n      }\n      return saveUserContentData;\n    }()\n  }, {\n    key: \"syncUserContentData\",\n    value: function () {\n      var _syncUserContentData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee10() {\n        return regenerator_default.a.wrap(function _callee10$(_context10) {\n          while (1) switch (_context10.prev = _context10.next) {\n            case 0:\n              return _context10.abrupt(\"return\", new Promise(function (resolve, reject) {\n                //   let values = await (await app.database.table(\"user-data\")).getValue();\n                //   let arrItem = [];\n                //   for (let element of values) {\n                //     arrItem.push(item);\n                //     arrItem = JSON.stringify(arrItem);\n                //     let fData = new FormData();\n                //     fData.append(\"book_id\", app.id);\n                //     fData.append(\"data\", arrItem);\n                //   }\n                //   let response = app.utils.axios.post(\n                //     app.apiManager.params.wsUrl + \"/api/builder/save-data-user\",\n                //     fData,\n                //     {\n                //       headers: {\n                //         Authorization: \"Bearer \" + app.user.jwt,\n                //         \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\",\n                //       },\n                //     }\n                //   );\n              }));\n            case 1:\n            case \"end\":\n              return _context10.stop();\n          }\n        }, _callee10);\n      }));\n      function syncUserContentData() {\n        return _syncUserContentData.apply(this, arguments);\n      }\n      return syncUserContentData;\n    }()\n  }, {\n    key: \"getUserContentData\",\n    value: function () {\n      var _getUserContentData = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee11() {\n        var self, app, values, _iterator6, _step6, element, component, fData;\n        return regenerator_default.a.wrap(function _callee11$(_context11) {\n          while (1) switch (_context11.prev = _context11.next) {\n            case 0:\n              self = this;\n              app = self.app;\n              app.builder.api.ignoreUserContent = true;\n              _context11.next = 5;\n              return app.database.table(\"user-data\");\n            case 5:\n              _context11.next = 7;\n              return _context11.sent.getValue();\n            case 7:\n              values = _context11.sent;\n              _iterator6 = builderApi_createForOfIteratorHelper(values);\n              try {\n                for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n                  element = _step6.value;\n                  component = app.builder.helpers.findComponentById(element.id);\n                  if (component && !component.params.content.deleted) {\n                    component.params.userContent.data = element.data;\n                  }\n                }\n              } catch (err) {\n                _iterator6.e(err);\n              } finally {\n                _iterator6.f();\n              }\n              if (app.user.isLogged()) {\n                fData = new FormData();\n                fData.append(\"book_id\", app.id);\n                app.utils.axios.post(app.apiManager.params.psGetDataUserUrl, fData, {\n                  headers: {\n                    Authorization: \"Bearer \" + app.user.jwt,\n                    \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                  }\n                }).then(function (response) {\n                  var data = response.data.data;\n                  var _iterator7 = builderApi_createForOfIteratorHelper(data),\n                    _step7;\n                  try {\n                    for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n                      var element = _step7.value;\n                      var component = app.builder.helpers.findComponentById(element.id);\n                      if (component && !component.params.content.deleted) {\n                        component.params.userContent.data = element.data;\n                        component.reload();\n                      }\n                    }\n                  } catch (err) {\n                    _iterator7.e(err);\n                  } finally {\n                    _iterator7.f();\n                  }\n                  app.builder.api.ignoreUserContent = false;\n                });\n              }\n            case 11:\n            case \"end\":\n              return _context11.stop();\n          }\n        }, _callee11, this);\n      }));\n      function getUserContentData() {\n        return _getUserContentData.apply(this, arguments);\n      }\n      return getUserContentData;\n    }()\n  }]);\n}();\n/* harmony default export */ var builder_builderApi = (builderApi_BuilderApi);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/BuilderSettings.js\n\n\n// https://github.com/sindresorhus/on-change\nvar BuilderSettings_onChange = __webpack_require__(/*! on-change */ \"./node_modules/on-change/index.js\");\nvar BuilderSettings_BuilderSettings = /*#__PURE__*/function () {\n  function BuilderSettings(app, builder) {\n    classCallCheck_default()(this, BuilderSettings);\n    var builderSettings = this;\n    builderSettings.builder = builder;\n    builderSettings.app = app;\n    builderSettings.syncServer = app.params.builder.development.syncServer;\n    if (builderSettings.syncServer) {\n      builderSettings.init();\n    }\n    return builderSettings;\n  }\n  return createClass_default()(BuilderSettings, [{\n    key: \"init\",\n    value: function init() {\n      var _context = this;\n      var app = this.app;\n      _context.bookWatcher();\n      _context.citationsWatcher();\n      _context.dictionaryWatcher();\n      _context.audioWatcher();\n      _context.iconWatcher();\n      _context.bookSettingsWatcher();\n      _context.colorsWatcher();\n      _context.stylesWatcher();\n    }\n  }, {\n    key: \"citationsWatcher\",\n    value: function citationsWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var citationsContext = app.citations;\n      var objectsToWatch = {\n        data: function data(value) {},\n        title: function title(value) {},\n        standard: function standard(value) {},\n        fixNameCase: function fixNameCase(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n      // alert(\"WATCHING\");\n\n      citationsContext.params = _context.watch(objectsToWatch, citationsContext.params, \"citations\");\n    }\n  }, {\n    key: \"stylesWatcher\",\n    value: function stylesWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var stylesContext = app.styles;\n      var objectsToWatch = {\n        data: function data(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n      // alert(\"WATCHING\");\n\n      stylesContext.params = _context.watch(objectsToWatch, stylesContext.params, \"styles\");\n    }\n  }, {\n    key: \"colorsWatcher\",\n    value: function colorsWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var citationsContext = app.colors;\n      var objectsToWatch = {\n        // selectedColor: function (value) {},\n        data: function data(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n      // alert(\"WATCHING\");\n\n      citationsContext.params = _context.watch(objectsToWatch, citationsContext.params, \"colors\");\n    }\n  }, {\n    key: \"iconWatcher\",\n    value: function iconWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var iconContext = app.icons;\n      var objectsToWatch = {\n        customIcons: function customIcons(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n      // alert(\"WATCHING\");\n\n      iconContext.params = _context.watch(objectsToWatch, iconContext.params, \"icons\");\n    }\n  }, {\n    key: \"dictionaryWatcher\",\n    value: function dictionaryWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var dictionaryContext = app.dictionary;\n      var objectsToWatch = {\n        data: function data(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n\n      dictionaryContext.params = _context.watch(objectsToWatch, dictionaryContext.params, \"dictionary\");\n    }\n  }, {\n    key: \"audioWatcher\",\n    value: function audioWatcher() {\n      var _context = this;\n      var app = this.app;\n      var builder = _context.builder;\n      var audioContext = app.audio;\n      var objectsToWatch = {\n        data: function data(value) {},\n        enablePlaylist: function enablePlaylist(value) {}\n      };\n\n      // builder.history.watch(builder.params.dataChapters, 'builder.params.dataChapters');\n\n      audioContext.params = _context.watch(objectsToWatch, audioContext.params, \"audio\");\n    }\n  }, {\n    key: \"bookWatcher\",\n    value: function bookWatcher() {\n      var _context = this;\n      var app = this.app;\n      var bookContext = app.book;\n      var objectsToWatch = {\n        color: function color(value) {\n          bookContext.setThemeColor(value);\n        },\n        nazevKnihy: function nazevKnihy() {}\n      };\n      bookContext.params = _context.watch(objectsToWatch, bookContext.params, \"book\");\n    }\n  }, {\n    key: \"bookSettingsWatcher\",\n    value: function bookSettingsWatcher() {\n      var _context = this;\n      var app = this.app;\n      var bookSettings = app.bookSettings;\n      var objectsToWatch = {\n        colorTheme: function colorTheme(value) {\n          bookSettings.setTheme(value);\n        },\n        translationIcon: function translationIcon(value) {},\n        showTranslation: function showTranslation(value) {}\n      };\n      bookSettings.params = _context.watch(objectsToWatch, bookSettings.params, \"bookSettings\");\n    }\n  }, {\n    key: \"watch\",\n    value: function watch(test, params, parent) {\n      var _context = this;\n      var app = _context.app;\n      var builderHistory = _context.builder.history;\n      // debugger\n      var i = 0;\n      var watchedObject = BuilderSettings_onChange(params, function (path, value, previousValue, name) {\n        for (var key in test) {\n          // debugger\n          if (path.startsWith(key)) {\n            var id = \"\".concat(parent, \".params.\") + path;\n            test[key](value);\n            if (builderHistory.ignoreHistory === false) {\n              var content = {};\n              var undoContent = {};\n              _.set(content, \"\".concat(parent, \".params.\") + path, value);\n              _.set(undoContent, \"\".concat(parent, \".params.\") + path, previousValue);\n              app.builder.serverData.update(id, content, undoContent);\n              app.builder.history.addSettingsHistory(id, \"settings\");\n\n              //todo odeslat data na server\n            }\n          }\n        }\n      });\n      return watchedObject;\n    }\n  }]);\n}();\n/* harmony default export */ var builder_BuilderSettings = (BuilderSettings_BuilderSettings);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builderClass.js\n\n\n\n\n\n\n\n\nfunction builderClass_callSuper(t, o, e) { return o = getPrototypeOf_default()(o), possibleConstructorReturn_default()(t, builderClass_isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf_default()(t).constructor) : o.apply(t, e)); }\nfunction builderClass_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (builderClass_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n/* eslint no-nested-ternary: off */\n// import $ from 'dom7';\n\n\n\n\n\n\n\n\n\n\n\n\nvar builderClass_Builder = /*#__PURE__*/function (_Framework7Class) {\n  function Builder(app) {\n    var _this2;\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Builder);\n    // Extends with open/close Modal methods;\n    _this2 = builderClass_callSuper(this, Builder, [params, [app]]);\n    var builder = _this2;\n\n    /*\r\n     * Proměnné builderu (moduly)\r\n     */\n    builder.app = app;\n    builder.components = [];\n    builder.componentContext = null;\n    builder.data = [];\n    builder.methods = [];\n    builder.defaultComponentsFlat = []; //Všechny komponenty flat\n    builder.xxx = []; //obsahuje všechny (až 3) page z book swiperu\n    builder.addNextId = null; // číslo označující pozici, na kterou se umístí nová komponenta\n    builder.copyToCb = null; // komponenta ve schránce\n    builder.globalCl = []; // Obsahuje komponenty, které se vkládají do fyzické schránky ke kopírování mezi knihami\n    builder.cleanText = {}; //Čistý text určený pro vyhledávání\n\n    var defaults = utils[\"default\"].extend({}, app.params.builder);\n    builder.useModulesParams(defaults); // Extend defaults with modules params\n    builder.params = utils[\"default\"].extend(defaults, params);\n    utils[\"default\"].extend(builder, {\n      app: app\n    });\n\n    /*\r\n     * Metody builderu (moduly)\r\n     */\n    builder.useModules();\n    builder.history = new builder_builderHistory(app);\n    builder.chapters = new builder_builderChapters(app, builder);\n    builder.action = new builder_builderActions(app);\n    builder.serverData = new builder_builderServer(app);\n    builder.versions = new builder_builderVersions(app);\n    builder.api = new builder_builderApi(app);\n    builder.settings = new builder_BuilderSettings(app, builder);\n    builder.helpers = new builderHelpers(app, builder);\n    builder.seachCustomizer = function (objValue, srcValue) {\n      if (lodash_default.a.isArray(objValue)) {\n        return srcValue;\n      }\n    };\n    return possibleConstructorReturn_default()(_this2, builder);\n  }\n\n  // Před vykreslením komponenty se volá tato metoda, používá ji několik modulů\n  inherits_default()(Builder, _Framework7Class);\n  return createClass_default()(Builder, [{\n    key: \"beforeRender\",\n    value: function beforeRender(content, cont, builderComponent) {\n      // let builderComponent = this;\n      var app = builderComponent.app;\n      var f = content[cont];\n      if (f && typeof f === \"string\") {\n        f = f.replace(/{{position}}/g, builderComponent.params.content.position);\n        f = app.apiManager.replaceMediaServerPlaceholder(f);\n        f = f.replace(/\\n/g, \" \");\n      }\n      return f;\n    }\n\n    //Sloučí základní atributy s daty komponenty\n  }, {\n    key: \"addDefaultsToComponentData\",\n    value: function addDefaultsToComponentData(component, componentName) {\n      var builder = this;\n      var app = builder.app;\n      var copyComp = builder.helpers.getCategoryComponentByName(componentName);\n      if (!copyComp) {\n        // alert('Není k dispozici komponenta s názvem \"' + componentName + '\"');\n        app.errorHandler.throwRollbarEvent(\"warning\", \"BuilderClass\", {\n          message: 'Není k dispozici komponenta s názvem \"' + componentName + '\"'\n        });\n        return null;\n      }\n      var componentNew = lodash_default.a.mergeWith(copyComp, component, builder.seachCustomizer);\n      return componentNew;\n    }\n\n    /*\r\n     * Vrací nesmazané komponenty seřazené podle stránek a jejich pořadí ve stránce\r\n     * Pokud je nastaveno pageId vrací komponenty z dané kapitoly, jinak vrací z celé knihy.\r\n     */\n  }, {\n    key: \"getSortedComponentsReference\",\n    value: function getSortedComponentsReference() {\n      var _this3 = this;\n      var pageId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var app = this.app;\n      var sortedChapters = [];\n\n      //pořadí kapitol nebo jedna kapitola\n      if (pageId) {\n        var chapter = _.find(app.builder.params.dataChapters, function (o) {\n          return o.id == pageId;\n        });\n        sortedChapters.push(_.cloneDeep(chapter));\n      } else {\n        var chapters = [];\n        chapters = _.cloneDeep(app.builder.params.dataChapters).filter(function (o) {\n          return !o.deleted;\n        });\n        chapters = _.sortBy(chapters, [\"position\", \"level\"]);\n        chapters.forEach(function (el) {\n          if (el.parentId == null) {\n            sortedChapters.push(el);\n          }\n        });\n\n        //podkapitoli seřadit za parent kapitolu\n        chapters.forEach(function (el) {\n          if (el.parentId != null) {\n            var index = _.findIndex(sortedChapters, function (o) {\n              return el.parentId == o.id;\n            });\n            sortedChapters.splice(index + 1, 0, el);\n          }\n        });\n      }\n      var allComponents = [];\n\n      //všechny komponenty tak jak jdou\n      sortedChapters.forEach(function (page) {\n        var components = [];\n        if (app.builder.components[page.id]) {\n          components = _this3.flattenComponents(app.builder.components[page.id]);\n        } else {\n          return;\n        }\n\n        //console.log('THAT components', components);\n        components = _.filter(components, function (o) {\n          return !o.params.content.delete;\n        });\n        allComponents = allComponents.concat(components);\n\n        /*\r\n          components = _.sortBy(components, \"params.content.position\");\r\n          let sortedComponents = [];\r\n          components.forEach((el) => {\r\n          if (el.params.parentId == null) {\r\n            sortedComponents.push(el);\r\n          }else{\r\n            let index = _.findIndex(sortedComponents, (o) => {\r\n              return el.params.parentId == o.params.id;\r\n            });\r\n              sortedComponents.splice(index + 1, 0, el);\r\n          }\r\n        });\r\n            allComponents = allComponents.concat(sortedComponents);*/\n      });\n      return allComponents;\n    }\n\n    /*\r\n     * Vytvoří componentu z textové předlohy JSONu\r\n     * */\n  }, {\n    key: \"createComponent\",\n    value: function createComponent(component, pageId) {\n      // debugger;\n      var builder = this;\n      var app = builder.app;\n      component = builder.addDefaultsToComponentData(component, component.name);\n      if (component == null || component == undefined) {\n        return false;\n      }\n      component.pageId = pageId;\n      component.content.pageId = pageId;\n      if (!component.parentId) {\n        if (!app.builder.components[pageId]) {\n          app.builder.components[pageId] = [];\n        }\n        return app.builder.addComponent(component, app.builder.components[pageId], component.content.position);\n      } else {\n        var parentComponentContext = app.builder.helpers.findComponentInChapterById(component.parentId, app.builder.components[pageId]);\n        parentComponentContext = parentComponentContext;\n        if (!parentComponentContext) {\n          return false;\n        }\n        var context;\n        var key = null;\n        if (component.hasOwnProperty(\"subKey\") && component.subKey) {\n          key = component.subKey;\n          if (!parentComponentContext.components) parentComponentContext.components = {};\n          if (!parentComponentContext.components.hasOwnProperty(key)) parentComponentContext.components[key] = [];\n          context = parentComponentContext.components[key];\n        } else {\n          if (!parentComponentContext.components) parentComponentContext.components = [];\n          context = parentComponentContext.components;\n        }\n\n        // //console.log(\n        //   \"CREATE:\",\n        //   component,\n        //   context,\n        //   component.content.position,\n        //   parentComponentContext,\n        //   key\n        // );\n        return app.builder.addComponent(component, context, component.content.position, parentComponentContext, key);\n      }\n    }\n  }, {\n    key: \"addComponent\",\n    value: function addComponent(component) {\n      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var parrentcomponent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n      var subKey = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      // alert('1');\n\n      var builder = this;\n      var app = builder.app;\n      var copyComp = lodash_default.a.cloneDeep(component);\n      var components = context;\n      if (!components) {\n        components = [];\n      }\n      if (!position) {\n        if (builder.addNextId) {\n          position = builder.addNextId;\n          // alert(position);\n          builder.enlargePosition(context, position);\n        } else {\n          position = components.length + 1;\n        }\n      }\n      copyComp.content.position = position;\n      if (!component.pageId) {\n        // // builder.componentContext.$setState();\n        // let chapter = app.book.getSlideByUrl(\n        //   \"/\" + builder.componentContext.$route.params.id\n        // );\n        // let id = chapter.id;\n        var id = app.builder.history.pageId;\n        copyComp.content.pageId = id;\n      }\n      if (parrentcomponent) {\n        copyComp.parentId = parrentcomponent.params.id;\n        if (subKey) {\n          copyComp.subKey = subKey;\n        }\n      }\n      var chapter = _.find(app.builder.params.dataChapters, function (o) {\n        return o.id == copyComp.content.pageId;\n      });\n      var c = new builder_builderComponent(builder.app, copyComp);\n      c[\"chapterReference\"] = chapter;\n\n      // builder.components[url].splice(position, 0, c);\n\n      components.push(c);\n      c.update = true;\n      c.componentsReference = components;\n\n      //Vrací všechny nesmazané komponenty na stránce (seřazené podle výskytu)\n      c.getPageComponentsReference = function () {\n        return builder.getSortedComponentsReference(c.params.content.pageId);\n      };\n\n      //Vrací všechny aktivní komponenty v knize (seřazené podle výskytu)\n      c.getAllComponentsReference = function () {\n        return builder.getSortedComponentsReference();\n      };\n      // debugger;\n\n      if (parrentcomponent) {\n        if (subKey) {\n          c.subKey = subKey;\n          c.params.subKey = subKey;\n          if (!parrentcomponent.components) parrentcomponent.components = {};\n          if (!parrentcomponent.components.hasOwnProperty(subKey)) parrentcomponent.components[subKey] = [];\n          if (!parrentcomponent.params[\"components\"]) {\n            parrentcomponent.params[\"components\"] = [];\n          }\n          if (!parrentcomponent.params[\"components\"][subKey]) {\n            parrentcomponent.params[\"components\"][subKey] = [];\n          }\n          parrentcomponent.params[\"components\"][subKey].push(copyComp);\n        } else {\n          if (!parrentcomponent.params[\"components\"]) {\n            parrentcomponent.params[\"components\"] = [];\n          }\n          if (parrentcomponent.params[\"components\"].hasOwnProperty(\"x0\")) {\n            parrentcomponent.params[\"components\"][\"x0\"].push(copyComp);\n          } else {\n            parrentcomponent.params[\"components\"].push(copyComp);\n          }\n        }\n        c.parentComponent = parrentcomponent;\n      }\n      if (builder.xxx[c.params.content.pageId]) {\n        builder.setState(builder.components[c.params.content.pageId], builder.xxx[c.params.content.pageId]);\n      }\n      return c;\n    }\n  }, {\n    key: \"addNext\",\n    value: function addNext(addNextId, componentsReference, allowedGroup, pageComponentContext) {\n      var parentComponent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var subKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n      var builder = this;\n\n      // alert(component.params.position + 1);\n      builder.addNextId = addNextId;\n      builder.componentsReference = componentsReference;\n      builder.currentGroup = allowedGroup;\n      builder.parentComponent = parentComponent;\n      builder.subKey = subKey;\n      builder.componentContext = pageComponentContext;\n      builder.openLeft(0);\n    }\n    //url = 0 - /builder/ || 1 - /builder-content/\n  }, {\n    key: \"openLeft\",\n    value: function openLeft(url) {\n      var builder = this;\n      var app = builder.app;\n      var leftPanel = app.panel.get(\".panel-left\");\n      leftPanel.open();\n      var leftView = app.views.get($$(\".view-left\"));\n      var path = \"/builder/\";\n      if (url === 1) {\n        path = \"/builder-content/\";\n      } else if (url === 2) {\n        path = \"/builder-css/\";\n      } else if (url === 3) {\n        path = \"/builder-form-share/\";\n      } else if (url === 4) {\n        path = \"/builder-chapters/\";\n      } else if (url === 5) {\n        path = \"/builder-select-version/\";\n      } else if (url === 6) {\n        path = \"/builder-menu/\";\n      }\n      leftView.router.navigate(path, {\n        reloadCurrent: true,\n        ignoreCache: true\n      });\n      leftPanel.on(\"close\", function () {\n        leftView.router.navigate(\"/left-menu/\", {\n          reloadCurrent: true,\n          ignoreCache: true\n        });\n        builder.addNextId = null;\n        builder.editComponent = null;\n      });\n    }\n  }, {\n    key: \"setState\",\n    value: function setState(state, pageComponentContext) {\n      var builder = this;\n      pageComponentContext.$setState({\n        kompx: lodash_default.a.sortBy(state, [\"params.content.position\"])\n      });\n    }\n  }, {\n    key: \"enlargePosition\",\n    value: function enlargePosition(componentsReference, from) {\n      var elementId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var ignoreId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n      var app = this.app;\n      componentsReference.forEach(function (c, i) {\n        if (c.params.content.position >= from) {\n          if (elementId == null || elementId != c.params.id) {\n            // debugger;\n            if (!ignoreId.includes(c.params.id)) {\n              c.update = true;\n              c.params.content.position = c.params.content.position + 1;\n            }\n          }\n        }\n      });\n    }\n  }, {\n    key: \"reducePosition\",\n    value: function reducePosition(componentsReference, from) {\n      var elementId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      componentsReference.forEach(function (c, i) {\n        if (c.params.content.position > from) {\n          if (elementId == null || elementId != c.params.id) {\n            c.update = true;\n            c.params.content.position = c.params.content.position - 1;\n          }\n        }\n      });\n    }\n  }, {\n    key: \"checkComponent\",\n    value: function checkComponent(component) {\n      var builder = this;\n      var app = builder.app;\n      var id = component.params.id;\n      var $checkIcon = component.$block.find(\"#bm-check-component\");\n      if (component.$block.hasClass(\"checked\")) {\n        component.$block.removeClass(\"checked\");\n        $checkIcon.html('<i class=\"material-icons\">check_box_outline_blank</i>');\n        // debugger;\n        _.remove(builder.copyToCb, function (o) {\n          return o.id == component.params.id;\n        });\n        var subComps = [];\n        if (component.hasOwnProperty(\"components\")) {\n          subComps = builder.flattenComponents(component.components, [], null, false);\n          subComps.forEach(function (element) {\n            element.$block.removeClass(\"checked\");\n            _.remove(builder.copyToCb, function (o) {\n              return o.id == element.params.id;\n            });\n          });\n        }\n        if (builder.copyToCb.length == 0) {\n          builder.copyToCb = null;\n        }\n      } else {\n        component.$block.addClass(\"checked\");\n        $checkIcon.html('<i class=\"material-icons\">check_box</i>');\n        var copyComp = lodash_default.a.cloneDeep(component.params);\n        copyComp.id = null;\n        copyComp.pageId = null;\n        if (!Array.isArray(builder.copyToCb)) {\n          builder.copyToCb = [];\n        }\n        var _subComps = [];\n\n        // let childCheck = component.$block.children(\".bm-wrapper\").find(\".checked\");\n\n        if (component.hasOwnProperty(\"components\")) {\n          _subComps = builder.flattenComponents(component.components, [], null, false);\n        }\n        var x = _subComps;\n        // debugger\n        _subComps.forEach(function (element) {\n          if (element.hasOwnProperty(\"$block\")) {\n            element.$block.removeClass(\"checked\");\n            var $ico = element.$block.find(\"#bm-check-component\");\n            $ico.html('<i class=\"material-icons\">check_box_outline_blank</i>');\n            _.remove(builder.copyToCb, function (o) {\n              return o.id == element.id;\n            });\n          }\n        });\n\n        // builder.copyToCb.push(component);\n        component.addToClipBoard();\n      }\n      app.data.myEvents.emit(\"copyToCb:changed\");\n    }\n  }, {\n    key: \"copyComponent\",\n    value: function copyComponent(component) {\n      var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var subKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n      var builder = this;\n      var app = builder.app;\n\n      // let components = component.componentsReference;\n\n      if (!Array.isArray(component)) {\n        component = [component];\n      }\n      component.reverse();\n      component.forEach(function (element) {\n        builder.componentContext = element.pageComponentContext;\n        var copyComp = _.cloneDeep(element.params);\n        copyComp.id = null;\n        copyComp.pageId = null;\n        copyComp.content.position = position;\n        if (parentId) {\n          copyComp.parentId = parentId;\n        }\n        if (subKey) {\n          copyComp.subKey = subKey;\n        }\n        var nevComponent = builder.createComponent(copyComp, app.builder.history.pageId);\n        if (position) {\n          builder.enlargePosition(nevComponent.componentsReference, position);\n        }\n\n        // let createSubcomponent = function (component, parentId) {\n        //   if (component.hasOwnProperty(\"components\") && component.components) {\n        //     let components = component.components;\n        //     Object.keys(components).forEach(function (key) {\n        //       if (Array.isArray(components[key])) {\n        //         components[key].forEach(function (subComponent) {\n        //           debugger;\n        //           if (subComponent.content.delete == false) {\n        //             let copyComp2 = _.cloneDeep(subComponent);\n        //             copyComp2.id = null;\n        //             copyComp2.parentId = parentId;\n\n        //\n        //             let newC = builder.createComponent(\n        //               copyComp2,\n        //               nevComponent.params.pageId\n        //             );\n        //             createSubcomponent(subComponent, newC.params.id);\n        //           }\n        //         });\n        //       }\n        //     });\n        //   }\n        // };\n\n        // createSubcomponent(element.params, nevComponent.params.id);\n      });\n    }\n  }, {\n    key: \"pasteComponent\",\n    value: function pasteComponent(component) {\n      var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var subKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n      var builder = this;\n      var app = builder.app;\n\n      // let components = component.componentsReference;\n\n      if (!Array.isArray(component)) {\n        component = [component];\n      }\n      var firstComponent = {};\n      var oldId = \"\";\n      var parentComponent = null;\n      if (app.builder.parentComponent != null) {\n        parentComponent = app.builder.parentComponent.params.id;\n      }\n      var sameNestCouter = 0;\n      app.builder.history.ignoreAddHistory = true;\n      var ids = [];\n      component.forEach(function (element, i) {\n        oldId = element.id;\n        element.id = null;\n        var haveParentIn = _.find(component, function (o) {\n          return element.parentId == o.id && element.parentId != null && element.id != o.id;\n        });\n        if (haveParentIn == undefined) {\n          element.parentId = null;\n        }\n        // debugger;\n        // if (parentId != null) {\n        //   element.parentId = parentId;\n        // }\n        if (element.parentId == null) {\n          if (parentComponent != null) {\n            element.parentId = parentComponent;\n          }\n          var cc = element;\n          element.content.position = app.builder.addNextId + sameNestCouter;\n          element.subKey = app.builder.subKey;\n          sameNestCouter++;\n        }\n        if (position != null) {\n          element.content.position = position;\n        }\n\n        //pozice app.builder.addNextId\n\n        var newComponent = builder.createComponent(element, app.builder.history.pageId);\n        ids.push(newComponent.params.id);\n        if (newComponent.params.content.position) {\n          builder.enlargePosition(newComponent.componentsReference, element.content.position, newComponent.params.id, ids);\n        }\n        component.forEach(function (subel, index) {\n          if (subel.parentId == oldId) {\n            component[index].parentId = newComponent.params.id;\n          }\n        });\n        component[i].id = newComponent.params.id;\n        // if (historyAllowed) {\n\n        // }\n      });\n      var history = app.builder.history;\n      history.addHistory(app.utils.id(\"xxxx-xxxx-xxxx-xxxx\"), \"addMultiple\");\n      app.builder.history.ignoreAddHistory = false;\n    }\n  }, {\n    key: \"applyScripts\",\n    value: function applyScripts(components, pageContext) {\n      var lala = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      // debugger;\n      var componentContext = pageContext;\n      var builder = this;\n      var app = builder.app;\n      builder.componentContext = pageContext;\n      var copy = function copy(component, position) {\n        return function () {\n          var parentId = null;\n          if (component.parentComponent) {\n            app.builder.parentComponent = component.parentComponent;\n            parentId = app.builder.parentComponent.params.id;\n            app.builder.subKey = component.params.subKey;\n            app.builder.addNextId = component.params.content.position + 1;\n          } else {\n            app.builder.parentComponent = null;\n            app.builder.subKey = null;\n            app.builder.addNextId = component.params.content.position + 1;\n          }\n          var copyComp = component.getComponentsParamsData();\n          builder.pasteComponent(copyComp);\n        };\n      };\n\n      // let app = this.$app;\n      // let builder = app.builder;\n\n      // let parentId = null;\n      // if (app.builder.parentComponent) {\n      //   parentId = app.builder.parentComponent.params.id;\n      // }\n      // let subKey = null;\n      // if (app.builder.subKey) {\n      //   subKey = app.builder.subKey;\n      // }\n      // app.builder.pasteComponent(app.builder.copyToCb, null, parentId, subKey);\n\n      var copyToCb = function copyToCb(component, morePopover) {\n        return function () {\n          morePopover.close();\n          var components = component.componentsReference;\n          var copyComp = lodash_default.a.cloneDeep(component.params);\n          copyComp.id = null;\n          copyComp.pageId = null;\n          builder.copyToCb = component.getComponentsParamsData();\n          app.data.myEvents.emit(\"copyToCb:changed\");\n        };\n      };\n      var createAnchor = function createAnchor(component, morePopover) {\n        return function () {\n          morePopover.close();\n          var dialog = app.dialog.prompt(\"Zadejte název kotvy?\", function (name) {\n            app.builder.chapters.addAnchorChapter(component.params.pageId, name, component.params.id);\n          });\n        };\n      };\n      var copyAnchorId = function copyAnchorId(component, morePopover) {\n        return function () {\n          morePopover.close();\n\n          //copy to cb\n          var el = document.createElement(\"textarea\");\n          el.value = component.params.id;\n          el.setAttribute(\"readonly\", \"\");\n          el.style = {\n            position: \"absolute\",\n            left: \"-9999px\"\n          };\n          document.body.appendChild(el);\n          el.select();\n          document.execCommand(\"copy\");\n          document.body.removeChild(el);\n          var toast = app.toast.create({\n            text: \"ID kotvy bylo zkopírováno do schránky\",\n            horizontalPosition: \"right\",\n            position: \"bottom\",\n            closeTimeout: 2500\n          });\n          toast.open();\n        };\n      };\n      var consoleLog = function consoleLog(component, morePopover) {\n        return function () {\n          console.info(component);\n          morePopover.close();\n        };\n      };\n      var addNext = function addNext(component) {\n        // return function () {\n\n        var allowedGroup;\n        // let x = new Builder(app, app.builder.components[1].params);\n\n        // alert(\"copy \"+component.params.id);\n        // let tictac = component.componentsReference;\n        // let i = tictac.indexOf(component);\n\n        if (component.hasOwnProperty(\"subKey\") && component.subKey) {\n          builder.subKey = component.subKey;\n          if (component.parentComponent && component.parentComponent.params.componentsAllowedGroup != undefined && component.parentComponent.params.componentsAllowedGroup[builder.subKey]) {\n            allowedGroup = component.parentComponent.params.componentsAllowedGroup[builder.subKey];\n          }\n        }\n        if (!allowedGroup) {\n          allowedGroup = \"basicGroup\";\n        }\n        // alert(component.params.position + 1);\n        builder.addNextId = component.params.content.position + 1;\n        builder.componentsReference = component.componentsReference;\n        if (component.parentComponent) {\n          builder.parentComponent = component.parentComponent;\n          // builder.componentsReference = component.parentComponent.components;\n        } else {\n          builder.parentComponent = null;\n        }\n        builder.componentContext = component.pageComponentContext;\n        builder.currentGroup = allowedGroup;\n        builder.openLeft(0);\n        // };\n      };\n      var editContent = function editContent(component) {\n        return function () {\n          builder.editComponent = component;\n          builder.openLeft(1);\n        };\n      };\n      var editStyle = function editStyle(component) {\n        return function () {\n          builder.editComponent = component;\n          builder.openLeft(2);\n        };\n      };\n      var checkC = function checkC(component) {\n        return function () {\n          builder.checkComponent(component);\n        };\n      };\n      var formShare = function formShare(component) {\n        return function () {\n          builder.editComponent = component;\n          builder.openLeft(3);\n        };\n      };\n      var remove = function remove(component) {\n        return function () {\n          builder.action.remove(component);\n        };\n      };\n      var moveUp = function moveUp(component) {\n        return function () {\n          builder.action.moveUp(component);\n        };\n      };\n      var moveDown = function moveDown(component) {\n        return function () {\n          builder.action.moveDown(component);\n        };\n      };\n      var eventList = [\"click\", \"blur\", \"focus\", \"focusin\", \"focusout\", \"keyup\", \"keydown\", \"keypress\", \"submit\", \"change\", \"mousedown\", \"mousemove\", \"mouseup\", \"mouseenter\", \"mouseleave\", \"mouseout\", \"mouseover\", \"touchstart\", \"touchend\", \"touchmove\", \"resize\", \"scrol\"];\n\n      // Start observing visbility of element. On change, the\n      //   the callback is called with Boolean visibility as\n      //   argument:\n\n      function buildThresholdList() {\n        var thresholds = [];\n        var numSteps = 1000;\n        for (var i = 1.0; i <= numSteps; i++) {\n          var ratio = i / numSteps;\n          thresholds.push(ratio);\n        }\n        thresholds.push(0);\n        return thresholds;\n      }\n\n      //https://stackoverflow.com/questions/65642562/intersectionobserver-and-transform-transition\n      function respondToVisibility(c, element, callback) {\n        // let options = {\n        //   root: componentContext.$el.parent()[0],\n        // };\n\n        var options = {\n          root: null,\n          rootMargin: \"0px\",\n          threshold: buildThresholdList()\n        };\n        var observer = new IntersectionObserver(function (entries, observer) {\n          entries.forEach(function (entry) {\n            // c.params.constructor\n\n            callback(entry.intersectionRatio > 0);\n          });\n        }, options);\n        observer.observe(element);\n        c.observer = observer;\n      }\n      components.forEach(function (o, i) {\n        var component = o.c;\n        var $block = o.block;\n        utils[\"default\"].extend(component, {\n          $block: $block,\n          block: $block && $block[0],\n          pageComponentContext: componentContext\n        });\n        $block.find(\"#\" + \"bm-copy\").eq(0).off(\"click\").on(\"click\", copy(component, component.params.content.position + 1));\n        var morePopover = app.popover.create({\n          targetEl: $block.find(\"#\" + \"bm-more\").eq(0),\n          backdrop: false,\n          content: \"\\n        <div class=\\\"popover popover-links\\\">\\n          <div class=\\\"popover-inner\\\">\\n            <div class=\\\"list\\\" style=\\\"margin-top: 0; margin-bottom: 0; color: var(--f7-theme-color);\\\">\\n              <ul>\\n                <li id=\\\"bm-copy_to_cb\\\">\\n      <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n        <div class=\\\"item-media\\\"><i class=\\\"material-icons\\\">move_to_inbox</i></div>\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title\\\">\".concat(app.translation.t(\"builder:controls.copy\"), \"</div>\\n          <!--<div class=\\\"item-after\\\">CEO</div>-->\\n        </div>\\n      </a>\\n    </li>\\n    <li id=\\\"bm-console_log\\\">\\n      <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n        <div class=\\\"item-media\\\"><i class=\\\"material-icons\\\">print</i></div>\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title\\\">\").concat(app.translation.t(\"builder:controls.console\"), \"</div>\\n\\n        </div>\\n      </a>\\n    </li>\\n    <li id=\\\"bm-copy_anchor_id\\\">\\n    <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n      <div class=\\\"item-media\\\"><i class=\\\"f7-icons\\\">link</i></div>\\n      <div class=\\\"item-inner\\\">\\n        <div class=\\\"item-title\\\">\").concat(app.translation.t(\"builder:controls.copyAnchor\"), \"</div>\\n\\n      </div>\\n    </a>\\n  </li>\\n    <li id=\\\"bm-create_anchor\\\">\\n    <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n      <div class=\\\"item-media\\\"><i class=\\\"f7-icons\\\">bookmark</i></div>\\n      <div class=\\\"item-inner\\\">\\n        <div class=\\\"item-title\\\">\").concat(app.translation.t(\"builder:controls.anchor\"), \"</div>\\n\\n      </div>\\n    </a>\\n  </li>\\n              </ul>\\n            </div>\\n          </div>\\n        </div>\\n        \"),\n          // Events\n          on: {\n            open: function open(popover) {},\n            opened: function opened(popover) {}\n          }\n        });\n        morePopover.$el.find(\"#\" + \"bm-copy_to_cb\").eq(0).off(\"click\").on(\"click\", copyToCb(component, morePopover));\n        morePopover.$el.find(\"#\" + \"bm-create_anchor\").eq(0).off(\"click\").on(\"click\", createAnchor(component, morePopover));\n        morePopover.$el.find(\"#\" + \"bm-copy_anchor_id\").eq(0).off(\"click\").on(\"click\", copyAnchorId(component, morePopover));\n        morePopover.$el.find(\"#\" + \"bm-console_log\").eq(0).off(\"click\").on(\"click\", consoleLog(component, morePopover));\n        $block.find(\"#\" + \"bm-more\").eq(0).off(\"click\").on(\"click\", function () {\n          morePopover.open();\n        });\n\n        // $block\n        //   .find(\"#\" + \"bm-copy_to_cb\")\n        //   .eq(0)\n        //   .off(\"click\")\n        //   .on(\"click\", copyToCb(component));\n        $block.find(\"#\" + \"bm-delete\").eq(0).off(\"click\").on(\"click\", remove(component));\n        $block.find(\"#\" + \"bm-move-up\").eq(0).off(\"click\").on(\"click\", moveUp(component));\n        $block.find(\"#\" + \"bm-move-down\").eq(0).off(\"click\").on(\"click\", moveDown(component));\n        $block.find(\"#\" + \"bm-add-next\").eq(0).off(\"click\").on(\"click\", function (e) {\n          e.preventDefault();\n          e.stopPropagation();\n          addNext(component);\n        });\n        // $block.find('#'+\"builder-add-new-button\").eq(0).on(\"click\", addNext2() );\n\n        $block.find(\"#\" + \"bm-content\").eq(0).off(\"click\").on(\"click\", editContent(component));\n        $block.find(\"#\" + \"bm-style\").eq(0).off(\"click\").on(\"click\", editStyle(component));\n        $block.find(\"#\" + \"bm-check-component\").eq(0).off(\"click\").on(\"click\", checkC(component));\n        $block.find(\"#\" + \"bm-form-share\").eq(0).off(\"click\").on(\"click\", formShare(component));\n\n        // if($block.hasClass('animate__animated')){\n        //   $block.removeClass('animate__animated');\n        //   $block.addClass('animate__animatedx');\n        //   component.params.on.visible = function (){\n        //     alert('visi');\n        //     $block.addClass('animate__animated')\n        //   }\n        // }\n\n        var animateCSS = function animateCSS(element, animation) {\n          var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"animate__\";\n          return (\n            // We create a Promise and return it\n            new Promise(function (resolve, reject) {\n              var animationName = \"\".concat(prefix).concat(animation);\n              var node = element;\n              node.classList.add(\"\".concat(prefix, \"animated\"), animationName);\n\n              // When the animation ends, we clean the classes and resolve the Promise\n              function handleAnimationEnd(event) {\n                event.stopPropagation();\n                node.classList.remove(\"\".concat(prefix, \"animated\"), animationName);\n                resolve(\"Animation ended\");\n              }\n              node.addEventListener(\"animationend\", handleAnimationEnd, {\n                once: true\n              });\n            })\n          );\n        };\n        respondToVisibility(component, $block[0], function (visible) {\n          var feedbackEl = document.getElementById(\"visibilityFeedback\");\n          if (visible) {\n            if ($block.attr(\"data-anim\") === \"true\") {\n              var delay = 0;\n              var delayData = parseInt($block.attr(\"data-anim-delay\"));\n              if (delayData) {\n                delay = delayData;\n              }\n              setTimeout(function () {\n                $block.css(\"visibility\", \"visible\");\n                // $block.addClass('animate__animated animate__' +$block.attr('data-anim'));\n                animateCSS($block[0], $block.attr(\"data-anim-class\"));\n                $block.attr(\"data-anim\", false);\n              }, delay);\n            }\n            component.emit(\"local::visible\", $block, component, component.renderedContent);\n          } else {\n            if ($block.attr(\"data-anim-repeat\") === \"true\") {\n              $block.attr(\"data-anim\", true);\n            }\n          }\n        });\n        var observerWidth = function observerWidth(element, $element) {\n          var observer = new ResizeObserver(function (entries) {\n            var e = entries[0]; // should be only one\n            var width = e.contentRect.width;\n            if (width < 240 && width > 190) {\n              $element.removeClass(\"big-controls\");\n              $element.removeClass(\"esmall-controls\");\n              $element.addClass(\"small-controls\");\n            } else if (width < 190) {\n              $element.removeClass(\"big-controls\");\n              $element.removeClass(\"small-controls\");\n              $element.addClass(\"esmall-controls\");\n            } else {\n              $element.removeClass(\"small-controls\");\n              $element.removeClass(\"esmall-controls\");\n              $element.addClass(\"big-controls\");\n            }\n          });\n\n          // start listening for size changes\n          observer.observe(element);\n        };\n        observerWidth($block[0], $block);\n        component.emit(\"local::init\", $block, component, component.renderedContent);\n      });\n    }\n  }, {\n    key: \"renderPageComponents\",\n    value: function renderPageComponents(url, pageContext) {\n      // url = '/c'+url;\n\n      // if(url === '100d-f7df-414a-c449'){\n      //   debugger\n      // }\n\n      var builder = this;\n      var context = this;\n      var app = builder.app;\n\n      // let data = app.builder.params.dataComponents;\n      //\n      // let i = 0;\n      // if (data) {\n      //   let numCallbackRuns = 0;\n      //\n      //   let compOfPage = _.filter(data, function(o){\n      //     return o && o.content.pageId === url;\n      //   })\n      //\n      //   // compOfPage = _.orderBy(compOfPage, ['parentId'],['desc']);\n      //\n      //\n      //   // app.builder.components = [];\n      //   if(compOfPage){\n      //     compOfPage.forEach((component) => {\n      //\n      //       let c = _.cloneDeep(component);\n      //       context.createComponent(c, c.content.pageId);\n      //       // delete app.builder.params.dataComponents[numCallbackRuns];\n      //\n      //       data.splice(_.findIndex(data, function (o) {\n      //         return o.id === component.id;\n      //       }), 1)\n      //       numCallbackRuns++;\n      //     });\n      //   }else{\n      //     app.builder.components[url] = [];\n      //   }\n      //   // app.builder.chapters.reloadViews();\n      // }\n\n      builder.xxx[url] = pageContext;\n      var firstIteration = true;\n\n      // let componentContext = pageContext;\n\n      // builder.componentContext = pageContext;\n\n      if (!builder.components.hasOwnProperty(url)) {\n        builder.components[url] = [];\n      }\n      var tictac = builder.components[url];\n\n      // let tictac = _.find(builder.components, function (o) {\n      //   return o.params.content.pageId === url\n      // })\n      // tictac = _.\n      window.tictac = tictac;\n\n      //debugger\n      //let xxx = pageContext;\n      pageContext.$options.beforeDestroy = function () {};\n      pageContext.$options.created = function () {};\n      pageContext.$options.mounted = function () {\n        var cl = [];\n        pageContext.$el.find(\".reloaded\").forEach(function () {\n          var _this = $$(this);\n          var id = $$(this).attr(\"id\");\n          var c = builder.helpers.findComponentInChapterById(id, builder.components[url]);\n          cl.push({\n            id: id,\n            c: c,\n            block: _this\n          });\n        });\n        pageContext.$el.find(\".reloaded\").removeClass(\"reloaded\");\n        var fux = cl;\n        builder.applyScripts(cl, pageContext);\n      };\n      pageContext.$options.updated = function () {\n        // debugger\n        var cl = [];\n        $$(\".reloaded\").forEach(function () {\n          var _this = $$(this);\n          var id = $$(this).attr(\"id\");\n          var c = builder.helpers.findComponentInChapterById(id, builder.components[url]);\n          cl.push({\n            id: id,\n            c: c,\n            block: _this\n          });\n        });\n\n        // pageContext.$el.find(\".bm-component\").forEach(function () {\n        //   let _this = $$(this);\n        //   let id = $$(this).attr(\"id\");\n        //   let c = builder.helpers.findComponentInChapterById(id, builder.components[url]);\n        //\n        //   cl.push({\n        //     id: id,\n        //     c: c,\n        //     block: _this,\n        //   });\n        // });\n\n        $$(\".reloaded\").removeClass(\"reloaded\");\n        builder.globalCl = cl;\n        if (cl.length > 0) {\n          //debugger\n        }\n        builder.applyScripts(cl, pageContext);\n      };\n      return tictac;\n    }\n  }, {\n    key: \"render\",\n    value: function render(components) {\n      return this.renderComponents(components);\n    }\n  }, {\n    key: \"renderComponents\",\n    value: function renderComponents(components) {\n      var shuffle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var wrapBefore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n      var wrapAfter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"\";\n      var componentId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var subkey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n      components = lodash_default.a.sortBy(components, [\"params.content.position\"]);\n      components = _.reject(components, function (o) {\n        if (o.params.content.hasOwnProperty(\"delete\") && o.params.content.delete) {\n          return true;\n        } else {\n          return false;\n        }\n      });\n      var buildMode = this.app.builder.params.development.enable;\n      // alert(components);\n      if (!components || components.length === 0) {\n        if (buildMode) {\n          /*return `\r\n          <div class=\"row\">\r\n          <div class=\"tablet-33\"></div>\r\n          <a href=\"#\" @click=\"addToPageComponent('${componentId}','${subkey}')\" class=\"bm-action tablet-33 col-100 button button-raised button-fill\">Vložte první element</a>\r\n          <div class=\"tablet-33\"></div>\r\n          </div>\r\n          `;*/\n          var subSomponents = \"\";\n          if (subkey) {\n            subSomponents = \"subcomponents\";\n          }\n          return \"\\n      <div>\\n        <a href=\\\"#\\\" @click=\\\"addToPageComponent('\".concat(componentId, \"','\").concat(subkey, \"')\\\" class=\\\"add-first-element \").concat(subSomponents, \"\\\">+</a>\\n      </div>\\n      \");\n        } else {\n          return \"\";\n        }\n      }\n      if (shuffle) {\n        components = _.shuffle(components);\n      } else {}\n      var rString = \"\";\n      var i;\n      for (i = 0; i < components.length; i++) {\n        components[i].loaded = false;\n        rString = rString + \"\".concat(wrapBefore).concat(components[i].html(i + 1, shuffle)).concat(wrapAfter);\n      }\n      return rString;\n    }\n  }, {\n    key: \"flattenComponents\",\n    value: function flattenComponents(components) {\n      var flattenedComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      var deleted = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n      var builder = this;\n      // debugger;\n      if (typeof_default()(components) === \"object\" && !Array.isArray(components)) {\n        Object.keys(components).forEach(function (key) {\n          if (Array.isArray(components[key])) {\n            builder.flattenComponents(components[key], flattenedComponents, null, deleted);\n          }\n        });\n      }\n      // routes.forEach((route) => {\n\n      if (components.length) {\n        Object.keys(components).forEach(function (componentId) {\n          // debugger\n          var cont = true;\n          var component = components[componentId];\n          component.params[\"parentId\"] = parentId;\n          if (deleted) {\n            flattenedComponents.push(component);\n          } else {\n            if (!component.params.content.delete) {\n              flattenedComponents.push(component);\n            } else {\n              cont = false;\n            }\n          }\n          if (cont) {\n            if (component.components && typeof_default()(component.components) === \"object\" && Array.isArray(component.components)) {\n              builder.flattenComponents(component.components, flattenedComponents, component.params.id, deleted);\n            } else if (component.components && typeof_default()(component.components) === \"object\" && !Array.isArray(component.components)) {\n              Object.keys(component.components).forEach(function (key) {\n                if (Array.isArray(component.components[key])) {\n                  builder.flattenComponents(component.components[key], flattenedComponents, component.params.id, deleted);\n                }\n              });\n            }\n          }\n        });\n      }\n      return flattenedComponents;\n    }\n\n    // Získá parametry komponenty očištěné o výchozí nastavení a metody.\n    // konkrtně vrátí content, id, name a v případě že se jená o podkoponentu vrátí parentId a subkey.\n  }, {\n    key: \"clearParams\",\n    value: function clearParams(params) {\n      var newParams = {};\n      newParams.content = params.content;\n      newParams.id = params.id;\n      newParams.content.position = params.content.position;\n      newParams.parentId = params.parentId;\n      newParams.name = params.name;\n      newParams.subKey = params.subKey;\n      return newParams;\n    }\n  }, {\n    key: \"diffVersions\",\n    value: function () {\n      var _diffVersions = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n        var v1,\n          v2,\n          builder,\n          app,\n          bookContext,\n          data1,\n          data2,\n          _compare,\n          _args = arguments;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              v1 = _args.length > 0 && _args[0] !== undefined ? _args[0] : \"1\";\n              v2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : \"2\";\n              builder = this;\n              app = builder.app;\n              bookContext = app.book;\n              _context.next = 7;\n              return app.database.table(\"builder-data\");\n            case 7:\n              _context.next = 9;\n              return _context.sent.where(\"name\", v1).getValue();\n            case 9:\n              data1 = _context.sent;\n              data1 = JSON.parse(data1[0].data);\n              _context.next = 13;\n              return app.database.table(\"builder-data\");\n            case 13:\n              _context.next = 15;\n              return _context.sent.where(\"name\", v2).getValue();\n            case 15:\n              data2 = _context.sent;\n              data2 = JSON.parse(data2[0].data);\n\n              // _.mergeWith(data1, data2, function (objectValue, sourceValue, key, object, source) {\n              //   if ( !(_.isEqual(objectValue, sourceValue)) && (Object(objectValue) !== objectValue)) {\n              //   }\n              // });\n\n              //https://stackoverflow.com/questions/31683075/how-to-do-a-deep-comparison-between-2-objects-with-lodash\n              _compare = function compare(a, b) {\n                var result = {\n                  different: [],\n                  missing_from_first: [],\n                  missing_from_second: []\n                };\n                _.reduce(a, function (result, value, key) {\n                  if (b.hasOwnProperty(key)) {\n                    if (_.isEqual(value, b[key])) {\n                      return result;\n                    } else {\n                      if (typeof_default()(a[key]) != typeof_default()({}) || typeof_default()(b[key]) != typeof_default()({})) {\n                        //dead end.\n                        result.different.push(key);\n                        return result;\n                      } else {\n                        var deeper = _compare(a[key], b[key]);\n                        result.different = result.different.concat(_.map(deeper.different, function (sub_path) {\n                          return key + \".\" + sub_path;\n                        }));\n                        result.missing_from_second = result.missing_from_second.concat(_.map(deeper.missing_from_second, function (sub_path) {\n                          return key + \".\" + sub_path;\n                        }));\n                        result.missing_from_first = result.missing_from_first.concat(_.map(deeper.missing_from_first, function (sub_path) {\n                          return key + \".\" + sub_path;\n                        }));\n                        return result;\n                      }\n                    }\n                  } else {\n                    result.missing_from_second.push(key);\n                    return result;\n                  }\n                }, result);\n                _.reduce(b, function (result, value, key) {\n                  if (a.hasOwnProperty(key)) {\n                    return result;\n                  } else {\n                    result.missing_from_first.push(key);\n                    return result;\n                  }\n                }, result);\n                return result;\n              };\n            case 18:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function diffVersions() {\n        return _diffVersions.apply(this, arguments);\n      }\n      return diffVersions;\n    }()\n  }, {\n    key: \"saveVersion\",\n    value: function () {\n      var _saveVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n        var builder, app, name;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              builder = this;\n              app = builder.app;\n              name = \"\";\n              app.dialog.prompt(\"Název verze:\", \"\", /*#__PURE__*/function () {\n                var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(nameVal) {\n                  var p;\n                  return regenerator_default.a.wrap(function _callee2$(_context2) {\n                    while (1) switch (_context2.prev = _context2.next) {\n                      case 0:\n                        name = nameVal;\n                        p = builder.getAllComponentsParams();\n                        p = JSON.stringify(p);\n                        _context2.next = 5;\n                        return app.database.table(\"builder-data\");\n                      case 5:\n                        _context2.next = 7;\n                        return _context2.sent.insert({\n                          name: name,\n                          data: p\n                        });\n                      case 7:\n                      case \"end\":\n                        return _context2.stop();\n                    }\n                  }, _callee2);\n                }));\n                return function (_x) {\n                  return _ref.apply(this, arguments);\n                };\n              }(), function () {\n                return false;\n              });\n            case 4:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function saveVersion() {\n        return _saveVersion.apply(this, arguments);\n      }\n      return saveVersion;\n    }()\n  }, {\n    key: \"saveLatestVersion\",\n    value: function () {\n      var _saveLatestVersion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n        var builder, app, p;\n        return regenerator_default.a.wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              builder = this;\n              app = builder.app;\n              p = builder.getAllComponentsParams();\n              p = JSON.stringify(p);\n              _context4.next = 6;\n              return app.database.table(\"builder-data\");\n            case 6:\n              _context4.next = 8;\n              return _context4.sent.delete();\n            case 8:\n              _context4.next = 10;\n              return app.database.table(\"builder-data\");\n            case 10:\n              _context4.next = 12;\n              return _context4.sent.insert({\n                name: \"latest\",\n                data: p\n              });\n            case 12:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function saveLatestVersion() {\n        return _saveLatestVersion.apply(this, arguments);\n      }\n      return saveLatestVersion;\n    }()\n    /* async setLatestVersion() {\r\n      const builder = this;\r\n      let app = builder.app;\r\n      // let database = builder.database;\r\n        let bookContext = app.book;\r\n        let data = await (await app.database.table(\"builder-data\"))\r\n        .where(\"name\", \"latest\")\r\n        .getValue();\r\n        if (data[0]) {\r\n        let versionData = JSON.parse(data[0].data);\r\n        app.book.bookChapters = versionData;\r\n        app.builder.chapters.sortChaptersByPosition();\r\n          builder.components = [];\r\n        builder.setDataFromRoutes();\r\n      } else {\r\n        app.builder.setDataFromRoutes();\r\n      }\r\n    }\r\n      async setVersion() {\r\n      const builder = this;\r\n      let app = builder.app;\r\n      // let database = builder.database;\r\n        let name = \"\";\r\n      app.dialog.prompt(\r\n        \"Název verze:\",\r\n        \"\",\r\n        async function (nameVal) {\r\n          name = nameVal;\r\n            let bookContext = app.book;\r\n            let data = await (await app.database.table(\"builder-data\"))\r\n            .where(\"name\", name)\r\n            .getValue();\r\n          let versionData = JSON.parse(data[0].data);\r\n          app.book.bookChapters = versionData;\r\n          app.builder.chapters.sortChaptersByPosition();\r\n            builder.components = [];\r\n            builder.setDataFromRoutes();\r\n            bookContext.mainSwiper.virtual.slides = app.book.getChaptersUrl();\r\n          bookContext.mainSwiper.virtual.update(true);\r\n          bookContext.preloadViews();\r\n    \r\n        },\r\n        function () {\r\n          return false;\r\n        }\r\n      );\r\n    }*/\n  }, {\n    key: \"getOfflineParams\",\n    value: function getOfflineParams() {\n      var dataComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      var dataChapters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n      var builder = this;\n      var app = builder.app;\n      var chapters = app.book.getBookChaptersFlatten();\n      chapters.forEach(function (page) {\n        var data = builder.getComponetsParams(page.id);\n        dataChapters.push(page);\n        if (data) {\n          data.forEach(function (d) {\n            dataComponents.push(d);\n          });\n        }\n      });\n      return {\n        dataComponents: dataComponents,\n        dataChapters: dataChapters\n      };\n    }\n  }, {\n    key: \"getAllComponentsParams\",\n    value: function getAllComponentsParams() {\n      var pages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var builder = this;\n      var app = builder.app;\n      if (!pages) {\n        pages = app.book.getBookChaptersTree();\n      }\n      pages.forEach(function (page) {\n        var data = builder.getComponetsParams(page.id);\n        page.data = data;\n        if (page.hasOwnProperty(\"routes\") && page.routes && page.routes.length) {\n          builder.getAllComponentsParams(page.routes);\n        }\n      });\n      return pages;\n    }\n  }, {\n    key: \"getComponetsParams\",\n    value: function getComponetsParams(id) {\n      var builder = this;\n      var app = builder.app;\n      var params = [];\n      var allComponents = builder.flattenComponents(app.builder.components[id]);\n      allComponents.forEach(function (component) {\n        var clearParams = builder.clearParams(component.params);\n        params.push(clearParams);\n      });\n      return params;\n    }\n  }, {\n    key: \"getComponetsData\",\n    value: function getComponetsData() {\n      var builder = this;\n      var allComponents = builder.app.builder.components;\n      allComponents.forEach(function (page) {\n        builder.flattenComponents(page);\n      });\n    }\n  }, {\n    key: \"categoriesFromGroups\",\n    value: function categoriesFromGroups(groups) {}\n  }, {\n    key: \"createComponentsFromData\",\n    value: function createComponentsFromData() {\n      var context = this;\n      var app = context.app;\n      var numCallbackRuns = 0;\n      var data = app.builder.params.dataComponents;\n      var i = 0;\n      if (data) {\n        app.builder.components = [];\n        data.forEach(function (component) {\n          if (!component.content.delete) {\n            var c = _.cloneDeep(component);\n            context.createComponent(c, c.content.pageId);\n            delete app.builder.params.dataComponents[numCallbackRuns];\n            numCallbackRuns++;\n          }\n        });\n        console.info(\"[BuilderClass] (createComponentsFromData) #\".concat(numCallbackRuns, \" components was created.\"));\n        app.builder.chapters.reloadViews();\n      }\n    }\n  }, {\n    key: \"setDataFromRoutes\",\n    value: function setDataFromRoutes() {\n      var context = this;\n      var app = context.app;\n      var allData = app.book.getBookChaptersFlatten();\n      allData.forEach(function (pages) {\n        var isBuilderChapter = false;\n        if (pages.hasOwnProperty(\"builderChapter\") && pages.builderChapter) {\n          isBuilderChapter = true;\n        }\n        if (isBuilderChapter) {\n          var data = pages.data;\n          var numCallbackRuns = 0;\n          app.builder.components[pages.id] = [];\n\n          // if (data) {\n          //   data.forEach((component) => {\n          //     context.createComponent(component, pages.id);\n          //     numCallbackRuns++;\n          //   });\n          // }\n        }\n      });\n    }\n  }, {\n    key: \"defaultComponentsFlatten\",\n    value: function defaultComponentsFlatten(category) {\n      var builder = this;\n      var componentsx = [];\n      Object.keys(category).forEach(function (groupId) {\n        if (category[groupId].components) {\n          category[groupId].components.forEach(function (category) {\n            if (category.components) {\n              if (!category.cast) {\n                category.cast = false;\n              }\n              category.components.forEach(function (component) {\n                component.castComponents = [];\n                component.componentsInSameCategory = category.components;\n                if (category.cast === \"all\") {\n                  component.castComponents = category.components.filter(function (o) {\n                    return !o.deleted;\n                  });\n                } else {\n                  category.castComponents = [];\n                }\n                component.categoryId = category.id;\n                // componentsx.push(component);\n                builder.defaultComponentsFlat.push(component);\n              });\n              // componentsx = componentsx.concat(category.components);\n            }\n          });\n        }\n      });\n      builder.assignSingleCast();\n      return builder.defaultComponentsFlat;\n    }\n  }, {\n    key: \"assignSingleCast\",\n    value: function assignSingleCast() {\n      var builder = this;\n      var app = builder.app;\n\n      //\n      var allDefaultComponents = builder.helpers.getAllDefaultComponents();\n      var castable = _.filter(allDefaultComponents, function (o) {\n        return o.cast;\n      });\n      castable.forEach(function (item, index) {\n        var itemToAssign = item;\n        var couldBeCastToArray = item.cast;\n        itemToAssign.castComponents.push(itemToAssign);\n        couldBeCastToArray.forEach(function (nameComponent) {\n          var componentToCast = _.find(allDefaultComponents, {\n            name: nameComponent\n          });\n          itemToAssign.castComponents.push(componentToCast);\n        });\n        itemToAssign.castComponents = _.uniq(itemToAssign.castComponents);\n      });\n    }\n  }]);\n}(utils_class);\n/* harmony default export */ var builderClass = (builderClass_Builder);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/templates/builder_components.f7.html\nvar builder_components_f7 = __webpack_require__(\"./src/core/custom_plugins/builder/templates/builder_components.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_menu.f7.html\n/* harmony default export */ var builder_menu_f7 = ({\n  data: function () {\n    let app = this.$app;\n    return { mediaUrl: app.apiManager.params.mediaUrl };\n  },\n  methods: {\n    openAlert: function () {\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n    },\n    pageAfterOut: function () {\n    },\n    pageAfterIn: async function () {\n    }\n  },\n  id: '01da8d39ca',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.navigation'), ctx_1);\n      r += '</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.development'), ctx_1);\n      r += '</div>\\n      <div class=\"list links-list\">\\n        <ul>\\n\\n          <li><a href=\"/builder-chapters/\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.chapters'), ctx_1);\n      r += '</a></li>\\n          <li><a href=\"/builder-variables/\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.variables'), ctx_1);\n      r += '</a></li>\\n          <li><a href=\"/builder-citations/\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.citations'), ctx_1);\n      r += '</a></li>\\n          <li><a href=\"/builder-audio-list/';\n      r += c(ctx_1.$app.utils.id('xxxx-xxxx-xxxx'), ctx_1);\n      r += '\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.audio'), ctx_1);\n      r += '</a>\\n          </li>\\n          <li><a href=\"/builder-dictionary/\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.translate'), ctx_1);\n      r += '</a></li>\\n          <li><a class=\"external\" target=\"_blank\" href=\"';\n      r += c(ctx_1.mediaUrl, ctx_1);\n      r += '\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.media'), ctx_1);\n      r += '</a>\\n          </li>\\n          <li><a href=\"/builder-history/\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.history'), ctx_1);\n      r += '</a></li>\\n        </ul>\\n      </div>\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n`,\n  styleScoped: false,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"builder:menu.navigation\")}} {{$app.translation.t(\"builder:menu.development\")}} {{$app.translation.t(\"builder:menu.chapters\")}} {{$app.translation.t(\"builder:menu.variables\")}} {{$app.translation.t(\"builder:menu.citations\")}} {{$app.translation.t(\"builder:menu.audio\")}} {{$app.translation.t(\"builder:menu.translate\")}} {{$app.translation.t(\"builder:menu.media\")}} {{$app.translation.t(\"builder:menu.history\")}} `\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_variables.f7.es.html\n/* harmony default export */ var builder_variables_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      categories: 0,\n      color: app.book.params.color\n    };\n  },\n  methods: {\n    test: function () {\n      let context = this;\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let self = this;\n      let colorPicker = page.$el.find('#book-color-palete');\n      let item = page.$el.find('#book-color-palete-input');\n      colorPicker.off('click');\n      colorPicker.on('click', function () {\n        let defaultColor = app.book.params.color;\n        let obj = { hex: item.val() };\n        app.colors.params.selectedColor = obj;\n        app.colors.openColorPallete(colorPicker, null, defaultColor).then(res => {\n          if (res.id != 'deleted') {\n            let hex = app.colors.substractAlphaChannel(res.hex).hex;\n            app.book.params.color = hex;\n            self.$setState({ color: app.book.params.color });\n            app.colors.params.selectedColor = null;\n          }\n        });\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '353a69d877',\n  render() {\n    return `\n  <div class=\"page\">\n    <div class=\"navbar\">\n      <div class=\"navbar-bg\"></div>\n      <div class=\"navbar-inner sliding\">\n        <div class=\"left\">\n          <a href=\"#\" class=\"link back\">\n            <i class=\"icon icon-back\"></i>\n            <span class=\"ios-only\">${ this.$app.translation.t('back') }</span>\n          </a>\n        </div>\n        <div class=\"title\">${ this.$app.translation.t('builder:variables.variablesSettings') }</div>\n      </div>\n    </div>\n    <div class=\"page-content\">\n\n      <h1>${ this.$app.translation.t('builder:variables.variables') }</h1>\n\n\n      <div class=\"list no-hairlines-md\">\n        <ul>\n          <li id=\"book-color-palete\">\n            <div class=\"item-content item-input\">\n              <div class=\"item-media\">\n                <span class=\"color-circle\" style=\"background-color: ${ this.color }\"></span>\n              </div>\n              <div class=\"item-inner\">\n                <div class=\"item-input-wrap\">\n                  <input type=\"text\" placeholder=\"Color\" value=\"${ this.color }\" readonly=\"readonly\"\n                    id=\"book-color-palete-input\" />\n                </div>\n              </div>\n            </div>\n          </li>\n        </ul>\n      </div>\n\n    </div>\n  </div>\n\n`;\n  },\n  style: `\n  #demo-color-picker-palette-value {\n    width: 50px;\n    height: 50px;\n  }\n\n  .color-picker-palette-row .color-picker-palette-value {\n    width: 36px;\n  }\n\n  .color-circle {\n    height: 25px;\n    width: 25px;\n    border-radius: 50%;\n    display: inline-block;\n    margin-right: 1rem;\n  }\n`,\n  styleScoped: false\n});\n// EXTERNAL MODULE: ./node_modules/katex/dist/katex.js\nvar katex = __webpack_require__(\"./node_modules/katex/dist/katex.js\");\nvar katex_default = /*#__PURE__*/__webpack_require__.n(katex);\n\n// EXTERNAL MODULE: ./node_modules/sanitize-html/index.js\nvar sanitize_html = __webpack_require__(\"./node_modules/sanitize-html/index.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/genHelp.js\nvar genHelp = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/genHelp.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textArea.js\n\nfunction textArea(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                  <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n                  <div class=\\\"item-input-wrap\\\">\\n                    <textarea class=\\\"resizable\\\">\").concat(content[key], \"</textarea>\\n                    <span class=\\\"input-clear-button\\\"></span>\\n                  </div>\\n                </div>\\n              </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $textarea = $el.find(\"textarea\");\n\n  // let $textarea = $$(`<textarea style=\"width: 100%;\">${content[key]}</textarea>`);\n  $textarea.on(\"keyup change\", function () {\n    // alert($$(this).val());\n    // alert('k ch')\n    var val = $$(this).val();\n    content[key] = \"\".concat(val);\n  });\n  // alert($apEl.length);\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_textArea = (textArea);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/input.js\n\nfunction builder_content_settings_input_input(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap\\\">\\n              <input type=\\\"number\\\" value=\\\"\").concat(content[key], \"\\\">\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $textarea = $el.find(\"input\");\n\n  // let $textarea = $$(`<textarea style=\"width: 100%;\">${content[key]}</textarea>`);\n  $textarea.on(\"keyup change\", function () {\n    // alert($$(this).val());\n    var val = $$(this).val();\n    content[key] = \"\".concat(val);\n    // app.builder.editComponent.update = true;\n    // app.builder.editComponent.pageComponentContext.$setState();\n  });\n  // alert($apEl.length);\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_input = (builder_content_settings_input_input);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/dateTime.js\n\nfunction dateTime(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap\\\">\\n              <input type=\\\"datetime-local\\\" value=\\\"\").concat(content[key], \"\\\">\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $textarea = $el.find(\"input\");\n\n  // let $textarea = $$(`<textarea style=\"width: 100%;\">${content[key]}</textarea>`);\n  $textarea.on(\"keyup change\", function () {\n    // alert($$(this).val());\n    var val = $$(this).val();\n    content[key] = \"\".concat(val);\n    // app.builder.editComponent.update = true;\n    // app.builder.editComponent.pageComponentContext.$setState();\n  });\n  // alert($apEl.length);\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_dateTime = (dateTime);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/select.js\n\nfunction select_select(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <label class=\\\"select-label\\\">\\n              <select name=\\\"cars\\\" id=\\\"\\\">\\n            </select>\\n              </label>\\n          </div>\\n        </li>\");\n  var options = \"\";\n  contentSettingObj.options.forEach(function (element) {\n    options += \" <option value=\\\"\".concat(element.value, \"\\\">\").concat(element.title, \"</option>\");\n  });\n  var $el = $$(el);\n  var optEl = $el.find(\"select\");\n  optEl.append(options);\n  $apEl.append($el[0]);\n  if (content[key].hasOwnProperty(\"selected\")) {\n    $$(optEl).val(content[key].selected);\n  } else {\n    $$(optEl).val(content[key]);\n  }\n  $$(optEl).on(\"change\", function (e) {\n    //Select byl změněn tak, aby hodnota content nemusela obsahovat podobjekt selected, id slouží k zachování zpětné kompatibility\n    if (content[key].hasOwnProperty(\"selected\")) {\n      content[key].selected = $$(e.target)[0].value;\n    } else {\n      content[key] = $$(e.target)[0].value;\n    }\n  });\n}\n/* harmony default export */ var builder_content_settings_select = (select_select);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/bool.js\n\nfunction bool(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var rnd = app.utils.id(\"xxxx\");\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap yes-no-radio\\\">\\n              <input id=\\\"yes-\").concat(key).concat(rnd, \"\\\" class=\\\"toggle toggle-on\\\"  type=\\\"radio\\\" name=\\\"bool-radio-\").concat(key).concat(rnd, \"\\\" value=\\\"true\\\" \").concat(content[key] ? \"checked\" : \"\", \">\\n              <label for=\\\"yes-\").concat(key).concat(rnd, \"\\\" class=\\\"radio-btn\\\">\").concat(app.translation.t(\"builder:content.controlYes\"), \"</label>\\n              <input id=\\\"no-\").concat(key).concat(rnd, \"\\\" class=\\\"toggle toggle-off\\\"  type=\\\"radio\\\" name=\\\"bool-radio-\").concat(key).concat(rnd, \"\\\" value=\\\"false\\\" \").concat(content[key] ? \"\" : \"checked\", \">\\n              <label for=\\\"no-\").concat(key).concat(rnd, \"\\\" class=\\\"radio-btn\\\">\").concat(app.translation.t(\"builder:content.controlNo\"), \"</label>\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $boolRadio = $el.find(\"input[name=bool-radio-\".concat(key).concat(rnd, \"]\"));\n  $boolRadio.off(\"click\");\n  $boolRadio.on(\"click\", function () {\n    var val = $el.find(\"input[name=bool-radio-\".concat(key).concat(rnd, \"]:checked\")).val();\n    val = val === \"true\";\n    content[key] = val;\n    if (contentSettingObj.hasOwnProperty(\"hidden\")) {\n      app.data.myEvents.emit(\"contentSettings:reload\");\n    }\n  });\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_bool = (bool);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/equation.js\n\nfunction equation_equation(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap\\\">\\n              <button class=\\\"button button-fill edit-equation\\\">\").concat(app.translation.t(\"builder:content.editEquation\"), \"</button>\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $btn = $el.find(\".edit-equation\");\n  var value = content[key];\n  // debugger;\n  $btn.off(\"click\");\n  $btn.on(\"click\", function (e) {\n    app.equation.openEquationPopup(value).then(function (res) {\n      content[key] = res;\n    });\n  });\n  $apEl.append($el);\n}\n/* harmony default export */ var builder_content_settings_equation = (equation_equation);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/image.js\n\nfunction image_image(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var file;\n  if (content[key]) {\n    var f = content[key];\n    var url = \"\";\n    //https://regex101.com/r/mTrS0T/1\n    if (f && typeof f === \"string\") {\n      url = app.apiManager.replaceMediaServerPlaceholder(f);\n    }\n    file = \"<div class=\\\"img-container\\\"><img src=\\\"\".concat(url, \"\\\" data-id=\\\"\").concat(key, \"\\\" style=\\\"width: 60px\\\" /><span>\").concat(app.translation.t(\"builder:content.imgChange\"), \"</span></div>\");\n  } else {\n    file = \"<div class=\\\"img-container\\\"><img src=\\\"https://placehold.jp/60x60.png\\\" data-id=\\\"\".concat(key, \"\\\" style=\\\"width: 60px\\\" /><span>\").concat(app.translation.t(\"builder:content.imgChange\"), \"</span></div>\");\n  }\n  // let $name = $$(\n  //   `<div class=\"img-label\"><h3>${contentSettingObj.name}</h3></div>`\n  // );\n  //$apEl.append($name[0]);\n  //$apEl.append($file[0]);\n\n  var el = \"<li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                  <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n                  <div id=\\\"file\\\" class=\\\"item-input-wrap\\\">\\n                    \").concat(file, \"\\n                  </div>\\n                </div>\\n              </li>\");\n  var $el = $$(el);\n  $apEl.append($el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".img-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $file = $el.find('#file');\n  $file.on(\"click\", function () {\n    app.builder.imagePopup.open();\n    app.builder.data.referenceContent = content;\n    app.builder.data.referenceKey = key;\n    app.builder.data.referenceObject = $$(this);\n  });\n}\n/* harmony default export */ var builder_content_settings_image = (image_image);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/audio.js\n\nfunction audio_audio(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var $file;\n  $file = $$(\"<div href=\\\"#\\\" id=\\\"audio-label\\\"  data-id=\\\"\".concat(key, \"\\\"><i class=\\\"video-icon icon material-icons\\\" data-id=\\\"\").concat(key, \"\\\">volume_up</i><span>\").concat(app.translation.t(\"builder:content.audioChange\"), \"</span></div>\"));\n  var $name = $$(\"<div class=\\\"img-label\\\"><h3>\".concat(contentSettingObj.name, \"</h3></div>\"));\n  $apEl.append($name[0]);\n  $apEl.append($file[0]);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $$(help);\n    $name.append($helpEl[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  $file.on(\"click\", function () {\n    app.builder.audioPopup.open();\n    app.builder.data.referenceContent = content;\n    app.builder.data.referenceKey = key;\n    app.builder.data.referenceObject = $$(this);\n  });\n}\n/* harmony default export */ var builder_content_settings_audio = (audio_audio);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/video.js\n\nfunction video_video(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var $file;\n  $file = $$(\"<div class=\\\"item-content img-container\\\"><i class=\\\"video-icon icon material-icons\\\" data-id=\\\"\".concat(key, \"\\\">videocam</i><span>\").concat(app.translation.t(\"builder:content.videoChange\"), \"</span></div>\"));\n  var $name = $$(\"<div class=\\\"item-content item-title item-label\\\">\".concat(contentSettingObj.name, \"</div></li>\"));\n  $apEl.append($name[0]);\n  $apEl.append($file[0]);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $apEl.find(\".item-title\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  $file.on(\"click\", function () {\n    app.builder.videoPopup.open();\n    app.builder.data.referenceContent = content;\n    app.builder.data.referenceKey = key;\n    app.builder.data.referenceObject = $$(this);\n  });\n}\n/* harmony default export */ var builder_content_settings_video = (video_video);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/json.js\n\nfunction json_json(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var $file;\n  $file = $$(\"<div class=\\\"item-content img-container\\\"><i class=\\\"video-icon icon material-icons\\\" data-id=\\\"\".concat(key, \"\\\">videocam</i><span>\").concat(app.translation.t(\"builder:content.videoChange\"), \"</span></div>\"));\n  var $name = $$(\"<div class=\\\"item-content item-title item-label\\\">\".concat(contentSettingObj.name, \"</div></li>\"));\n  $apEl.append($name[0]);\n  $apEl.append($file[0]);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $apEl.find(\".item-title\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  $file.on(\"click\", function () {\n    app.builder.jsonPopup.open();\n    app.builder.data.referenceContent = content;\n    app.builder.data.referenceKey = key;\n    app.builder.data.referenceObject = $$(this);\n  });\n}\n/* harmony default export */ var builder_content_settings_json = (json_json);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/iconPicker.js\n\n\nfunction iconPicker(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var $cont;\n\n  // if (content[key]) {\n  var f = content[key];\n  $cont = \"\\n      <li class=\\\"item-content item-input\\\">\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"icon-container\\\">\\n         \\n             <span class=\\\"icon-sel\\\">\\n             \").concat(content[key] ? \"\".concat(typeof_default()(f) == \"object\" ? \"<i class=\\\"icon \".concat(f.type, \"\\\" data-icon=\\\"\").concat(f.name, \"\\\">\") : f, \"\\n             </i>\") : \"\", \"\\n              <span>\").concat(app.translation.t(\"builder:content.iconChange\"), \"</span></span>\\n              <span class=\\\"icon-del\\\"> <i class=\\\"icon material-icons\\\" data-icon=\\\"delete\\\"></i></span>\\n            </div>\\n        </div>\\n      </li>\\n          \");\n  // }\n\n  // debugger;\n  var el = $$($apEl[$apEl.length - 1]);\n  el.append($cont);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var btn = el.find(\".icon-sel\");\n  var del = el.find(\".icon-del\");\n\n  // btn.off('click');\n  btn.on(\"click\", function () {\n    app.icons.openIconPopup().then(function (res) {\n      // debugger;\n      // content[key] = res;\n      content[key] = app.icons.createIconElement(res);\n\n      //U karty přepsaní starého typu icon\n      if (content.hasOwnProperty(\"icon\") && content.hasOwnProperty(\"type\")) {\n        delete content[\"icon\"];\n        delete content[\"type\"];\n      }\n    });\n  });\n  del.on(\"click\", function () {\n    content[key] = app.icons.createIconElement(null);\n  });\n}\n/* harmony default export */ var builder_content_settings_iconPicker = (iconPicker);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/action.js\n\nfunction action_action(contentSettingObj, content, key, $apEl, componentId) {\n  // debugger;\n  var app = this;\n  var id = content.id;\n  if (id == undefined) {\n    id = componentId;\n  }\n  var selEl = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n              <div class=\\\"action-view-container-link-\").concat(id, \" act-view\\\" data-compId=\\\"\").concat(id, \"\\\" style=\\\"width: 100%\\\"></div>\\n          </div>\\n        </li>\\n        \");\n  var $el = $$(selEl);\n  var appElCurr = $$($apEl[$apEl.length - 1]);\n  appElCurr.append($el);\n  // debugger;\n  try {\n    app.views.create(\".action-view-container-link-\".concat(id), {\n      name: \"link-\".concat(id),\n      restoreScrollTopOnBack: false,\n      url: \"/builder-link/\".concat(id),\n      paramId: id,\n      pushState: false,\n      type: \"content\",\n      selectedText: \"\",\n      isAction: true,\n      link: content[key]\n    });\n  } catch (e) {}\n\n  //Link action\n  // app.data.myEvents.off(\"link:useLink\");\n  app.data.myEvents.on(\"link:useLink\", function (res) {\n    var data = res.data;\n    var eventId = res.id;\n    // debugger;\n    if (eventId == content.id || eventId == componentId) {\n      content[key] = data;\n    }\n  });\n}\n/* harmony default export */ var builder_content_settings_action = (action_action);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/button.js\nfunction button_button(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var methodName = contentSettingObj.method;\n  var name = contentSettingObj.name;\n  var el = \"<button class=\\\"button\\\">\".concat(name, \"</button>\");\n  var $el = $$(el);\n  $el.on(\"click\", function () {\n    app.builder.editComponent.params.methods[methodName]();\n  });\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_button = (button_button);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/colorPicker.js\n\nfunction colorPicker_colorPicker(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var $cont;\n  $cont = \"\\n  <li class=\\\"item-content item-input\\\">\\n    <div class=\\\"item-inner\\\">\\n      <div class=\\\"component-color-palete\\\">\\n        <div class=\\\"block-title\\\">\".concat(contentSettingObj.name, \"</div>\\n        <div class=\\\"item-content item-input\\\">\\n        <div class=\\\"item-media\\\">\\n          <span class=\\\"component-color-circle\\\" style=\\\"background-color: \").concat(content[key], \"\\\"></span>\\n        </div>\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-input-wrap\\\">\\n            <input type=\\\"text\\\" placeholder=\\\"Color\\\" value=\\\"\").concat(content[key], \"\\\" readonly=\\\"readonly\\\"\\n              class=\\\"component-color-palete-input\\\" />\\n          </div>\\n        </div>\\n      </div>\\n    </div>\\n  </div>\\n</li>\\n      \");\n  // debugger;\n  var $el = $$($cont);\n\n  // debugger;\n  var colorPickerEl = $el.find(\".component-color-palete\");\n  var item = $el.find(\".component-color-palete-input\");\n  var colorCircle = $el.find(\".component-color-circle\");\n  colorPickerEl.on(\"click\", function () {\n    var defaultColor = content[key];\n    app.colors.openColorPallete(colorPickerEl, null, defaultColor).then(function (res) {\n      // let hex = app.colors.substractAlphaChannel(res.hex).hex;\n      if (res.id != \"deleted\") {\n        item.val(res.hex);\n        colorCircle.css(\"backgroundColor\", res.hex);\n        content[key] = res.hex;\n      } else {\n        item.val(\"transparent\");\n        colorCircle.css(\"backgroundColor\", \"transparent\");\n        content[key] = \"transparent\";\n      }\n    });\n  });\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_colorPicker = (colorPicker_colorPicker);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\nvar textEditor_utils = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/equation.js\n\nfunction createEquation(buttonEl) {\n  var app = this;\n  var currentRange = Object(textEditor_utils[\"getSelectionRange\"])();\n  var currentSelection = window.getSelection();\n  var selectedText = currentSelection.toString();\n  var eqContent = selectedText.replaceAll(/\\s/g, \"\");\n  if (selectedText.includes(\"[[[\")) {\n    eqContent = eqContent.substring(3);\n  }\n  if (selectedText.includes(\"]]]\")) {\n    eqContent = eqContent.slice(0, -3);\n  }\n  app.equation.openEquationPopup(eqContent).then(function (res) {\n    Object(textEditor_utils[\"setSelectionRange\"])(currentRange);\n    document.execCommand(\"insertHTML\", false, res);\n  });\n}\n/* harmony default export */ var custom_components_equation = (createEquation);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js\nvar custom_components_audio = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/color.js\n\nfunction openColorModal(buttonEl) {\n  var app = this;\n  var currentRange = Object(textEditor_utils[\"getSelectionRange\"])();\n  var cont = null;\n  //console.log(currentRange.commonAncestorContainer.className);\n  if (currentRange.commonAncestorContainer.className != undefined && currentRange.commonAncestorContainer.className.includes(\"fb-color\")) {\n    cont = $$(currentRange.commonAncestorContainer);\n  } else {\n    cont = $$(currentRange.commonAncestorContainer).parents(\".fb-color\");\n  }\n  if (cont.length > 0) {\n    var color = cont.css(\"color\");\n    var obj = {\n      hex: app.colors.rgbToHex(color)\n    };\n    app.colors.params.selectedColor = obj;\n    Object(textEditor_utils[\"addToSelection\"])(cont[0]);\n  }\n  currentRange = Object(textEditor_utils[\"getSelectionRange\"])();\n  var currentSelection = window.getSelection();\n  var selectedText = Object(textEditor_utils[\"getSelectionHtml\"])();\n  // debugger;\n  selectedText = selectedText.replace(/class=\\\"fb-color\\sfb-color-[^\"]+/gm, \"\");\n  app.colors.openColorPallete(buttonEl).then(function (res) {\n    // if (res.class == null) {\n    //   //hex\n    // setSelectionRange(currentRange);\n    // document.execCommand(\"styleWithCSS\", false, true);\n    // document.execCommand(\"foreColor\", false, `var(--fb-color-${res.id})`);\n    // document.execCommand(\"styleWithCSS\", false, false); //fix - jinak textEditor začne rvát vše do inlinestyle (bold...)\n    // } else {\n    //   //class\n    Object(textEditor_utils[\"setSelectionRange\"])(currentRange);\n    var newEl = \"\";\n    if (res.id == \"deleted\") {\n      newEl = \"\".concat(selectedText);\n    } else {\n      newEl = \"<span class=\\\"fb-color fb-color-\".concat(res.id, \"\\\">\").concat(selectedText, \"</span>\");\n    }\n    document.execCommand(\"insertHTML\", false, newEl);\n    // }\n  });\n}\n/* harmony default export */ var custom_components_color = (openColorModal);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/tooltip.js\n\nfunction createTooltip() {\n  var $clickedEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n  var app = this;\n  var tooltipText = \"\";\n  var buttonText = app.translation.t(\"builder:content.tooltipAdd\");\n\n  // debugger;\n\n  if ($clickedEl) {\n    tooltipText = $clickedEl.data(\"tooltip\");\n    buttonText = app.translation.t(\"builder:content.tooltipEdit\");\n    Object(textEditor_utils[\"addToSelection\"])($clickedEl[0]);\n  }\n  var currentRange = Object(textEditor_utils[\"getSelectionRange\"])();\n  var currentSelection = window.getSelection();\n  var selectedText = currentSelection.toString();\n  var tooltipModal = app.popup.create({\n    content: \"\\n              <div class=\\\"popup popup-citations\\\">\\n                <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n                  <div class=\\\"toolbar tabbar\\\">\\n                    <div class=\\\"toolbar-inner\\\">\\n                     <h2>Tooltip</h2>\\n                    </div>\\n  \\n                  </div>\\n                  <div class=\\\"block\\\">\\n                    <div class=\\\"list inline-labels no-hairlines-md\\\">\\n                      <ul>\\n                          <li class=\\\"item-content item-input\\\">\\n                          <div class=\\\"item-inner\\\">\\n                            <div class=\\\"item-title item-label\\\">\".concat(app.translation.t(\"builder:content.tooltipText\"), \"</div>\\n                            <div class=\\\"item-input-wrap\\\">\\n                              <input id=\\\"content\\\" type=\\\"text\\\" value=\\\"\").concat(selectedText, \"\\\">\\n                              <span class=\\\"input-clear-button\\\"></span>\\n                            </div>\\n                          </div>\\n                        </li>\\n                        <li class=\\\"item-content item-input\\\">\\n                        <div class=\\\"item-inner\\\">\\n                        <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.tooltipText\"), \"</div>\\n                        <div class=\\\"item-input-wrap\\\">\\n                          <textarea id=\\\"tooltip-content\\\" class=\\\" resizable\\\" placeholder=\\\"Text\\\">\").concat(tooltipText, \"</textarea>\\n                        </div>\\n                      </div>\\n                        </li>\\n                      </ul>\\n                      </div>\\n                      <button class=\\\"tooltip-add button button-fill\\\">\").concat(buttonText, \"</button>\\n                      <button class=\\\"tooltip-remove button\\\">\").concat(app.translation.t(\"builder:content.tooltipDelete\"), \"</button>\\n                  </div>\\n              </div>\\n              \")\n  });\n  var $tooltipEl = tooltipModal.$el;\n  tooltipModal.open();\n  $tooltipEl.find(\".tooltip-add\").on(\"click\", function (e) {\n    var val = \"\";\n    var tooltipContent = $tooltipEl.find(\"#tooltip-content\").val();\n    var tooltipText = $tooltipEl.find(\"#content\").val();\n    if (tooltipContent.length > 0) {\n      Object(textEditor_utils[\"setSelectionRange\"])(currentRange);\n      var tooltip = \"<span class=\\\"tooltip-decor tooltip-init\\\" data-tooltip=\\\"\".concat(tooltipContent, \"\\\" >\").concat(tooltipText, \"</span>\");\n      document.execCommand(\"insertHTML\", false, tooltip);\n      tooltipModal.close();\n    }\n  });\n  $tooltipEl.find(\".tooltip-remove\").on(\"click\", function (e) {\n    var tooltipText = $tooltipEl.find(\"#content\").val();\n    var tooltipEl = \"<span>\".concat(tooltipText, \"</span>\");\n    Object(textEditor_utils[\"setSelectionRange\"])(currentRange);\n    document.execCommand(\"insertHTML\", false, tooltipEl);\n    tooltipModal.close();\n  });\n\n  // if ($$(currentSelection.baseNode.parentElement).hasClass(\"tooltip-init\")) {\n  //   let origin = $$(currentSelection.baseNode.parentElement).text();\n  //   $$(currentSelection.baseNode.parentElement).remove();\n  //   setSelectionRange(currentRange);\n  //   document.execCommand(\"insertHTML\", false, origin);\n  // } else {\n  //   app.dialog.prompt(\n  //     app.translation.t(\"builder:content.tooltipText\"),\n  //     \"Tooltip\",\n  //     function (text) {\n  //       setSelectionRange(currentRange);\n  //       let tooltip = `<span class=\"tooltip-decor tooltip-init\" data-tooltip=\"${text}\" >${selectedText}</span>`;\n  //       document.execCommand(\"insertHTML\", false, tooltip);\n  //     }\n  //   );\n  // }\n}\n/* harmony default export */ var custom_components_tooltip = (createTooltip);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js\nvar custom_components_icon = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js\nvar custom_components_image = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js\nvar custom_components_citation = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js\nvar custom_components_link = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js\nvar custom_components_popover = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbspace.js\n\nfunction insertNbSpace(buttonEl) {\n  var app = this;\n  var currentRange = Object(textEditor_utils[\"getSelectionRange\"])();\n  document.execCommand('insertHTML', false, '&nbsp;');\n}\n/* harmony default export */ var nbspace = (insertNbSpace);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js\nvar nbelement = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction removeEmptyElementsFromHtml(htmlString) {\n  // Create a temporary DOM element to parse the HTML string\n  var tempDiv = document.createElement('div');\n  tempDiv.innerHTML = htmlString;\n\n  // Helper function to remove empty elements\n  function removeEmptyElements(element) {\n    var nodes = element.childNodes;\n    for (var i = nodes.length - 1; i >= 0; i--) {\n      var node = nodes[i];\n      if (node.nodeType === Node.ELEMENT_NODE) {\n        // Recursively remove empty elements from child nodes\n        removeEmptyElements(node);\n\n        // Check if the element is empty\n        if (!node.hasChildNodes() && !node.textContent.trim()) {\n          element.removeChild(node);\n        }\n      } else if (node.nodeType === Node.TEXT_NODE) {\n        // Remove empty text nodes\n        if (!node.textContent.trim()) {\n          element.removeChild(node);\n        }\n      }\n    }\n  }\n\n  // Remove empty elements from the temporary div\n  removeEmptyElements(tempDiv);\n\n  // Return the cleaned HTML string\n  return tempDiv.innerHTML;\n}\nfunction textEditor_textEditor(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  // debugger;\n  //TODO do icon dát: &#8203;\n\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap\\\">\\n              <!--<textarea class=\\\"resizable\\\"></textarea>-->\\n              <div class=\\\"text-editor text-editor-resizable\\\" data-placeholder=\\\"Enter text...\\\" data-buttons='[\\\"bold\\\", \\\"italic\\\", \\\"underline\\\", \\\"strikeThrough\\\"]'>\\n              <div class=\\\"text-editor-content\\\" contenteditable>\").concat(textEditor_utils[\"parserIn\"].call(app, content[key]), \"</div>\\n              </div>\\n\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  var help = \"\";\n  help = Object(genHelp[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $el.find(\".item-label\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  var $textEditor = $el.find(\".text-editor\");\n  var textEditor = app.textEditor.create({\n    el: $textEditor,\n    mode: \"toolbar\",\n    clearFormattingOnPaste: false,\n    customButtons: {\n      // property key is the button id\n      icon: {\n        content: '<i class=\"icon material-icons\" data-icon=\"widgets\" ></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_icon[\"default\"].call(app, buttonEl);\n        }\n      },\n      customLink: {\n        content: '<i class=\"icon material-icons\" data-icon=\"link\" ></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_link[\"default\"].call(app);\n        }\n      },\n      citation: {\n        content: '<i class=\"icon material-icons\" data-icon=\"format_quote\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_citation[\"default\"].call(app, buttonEl);\n        }\n      },\n      popover: {\n        content: '<i class=\"icon material-icons\" data-icon=\"speaker_notes\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_popover[\"default\"].call(app);\n        }\n      },\n      audio: {\n        content: '<i class=\"icon material-icons\" data-icon=\"audiotrack\">xxx</i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_audio[\"default\"].call(app);\n        }\n      },\n      colors: {\n        content: '<i class=\"icon material-icons\" data-icon=\"palette\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_color.call(app, buttonEl);\n        }\n      },\n      customImage: {\n        content: '<i class=\"icon material-icons\" data-icon=\"insert_photo\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_image[\"default\"].call(app, buttonEl);\n        }\n      },\n      toolTip: {\n        content: '<i class=\"icon material-icons\" data-icon=\"info\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_tooltip.call(app);\n        }\n      },\n      equation: {\n        content: '<i class=\"icon material-icons\" data-icon=\"functions\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          custom_components_equation.call(app, buttonEl);\n        }\n      },\n      clear: {\n        content: '<i class=\"icon material-icons\" data-icon=\"clear\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          var dialog = app.dialog.confirm(\"\".concat(app.translation.t(\"builder:content.clearText\")), \"\".concat(app.translation.t(\"builder:content.clearTitle\")), function () {\n            textEditor.setValue(\"\");\n          }, function () {});\n          dialog.open();\n        }\n      },\n      nbspace: {\n        content: '<i class=\"icon material-icons\" data-icon=\"space_bar\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          nbspace.call(app, buttonEl);\n        }\n      },\n      nbelement: {\n        content: '<i class=\"icon material-icons\" data-icon=\"crop_7_5\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          nbelement[\"default\"].call(event, buttonEl);\n        }\n      }\n    },\n    buttons: [[\"bold\", \"italic\", \"underline\", \"colors\", \"strikeThrough\", \"subscript\", \"superscript\"], [\"orderedList\", \"unorderedList\", \"indent\", \"outdent\"], [\"alignLeft\", \"alignCenter\", \"alignRight\", \"alignJustify\"], [\"customLink\", \"audio\"], [\"citation\", \"equation\"], [\"icon\", \"customImage\"], [\"popover\", \"toolTip\"], [\"nbspace\", \"nbelement\"], [\"clear\"]],\n    on: {\n      change: function change(editor, value) {\n        value = Object(textEditor_utils[\"removeBadInlineStyles\"])(value);\n        //value = removeEmptyElementsFromHtml(value);\n\n        console.log(\"nbelement 2\", value);\n        // debugger;\n        // editor.setValue(parserIn.call(app, value)); //skáče kurzor\n        content[key] = \"\".concat(textEditor_utils[\"parserOut\"].call(app, value));\n        // debugger;\n        bindButtonsToEditor.call(app, editor);\n      },\n      buttonclick: function buttonclick(editor, value) {},\n      input: function input(editor, value) {}\n    }\n  });\n  bindButtonsToEditor.call(app, textEditor);\n  $apEl.append($el[0]);\n  $textEditor.off(\"paste\");\n  $textEditor.on(\"paste\", function (e) {\n    e.preventDefault();\n    var range = textEditor.getSelectionRange(); // uložení výběru textu\n    var html = e.clipboardData.getData(\"text/html\"); //získání html ze schránky\n    var formatedText = \"\";\n    // debugger;\n    if (!html || html == \"\") {\n      //pokud kopírovaný text není html je nutné získat plain text\n      formatedText = e.clipboardData.getData(\"text/plain\");\n    } else {\n      formatedText = Object(textEditor_utils[\"formatPasteHtml\"])(html); //funkce na očištění html\n    }\n    textEditor.setSelectionRange(range); //nastavení původního výběru\n    document.execCommand(\"insertHTML\", false, formatedText); // vložení očištěního html do editoru\n  });\n  $textEditor.find(\".text-editor-content\").find(\".icon\").html(\"&#8203;\");\n}\nfunction bindButtonsToEditor(textEditor) {\n  var app = this;\n  var $editorContent = textEditor.$contentEl;\n\n  // debugger;\n  // $editorContent.html(parserIn.call(app, $editorContent.html()));\n\n  //-------- Links --------\n  var $link = $editorContent.find([\".disabled-navigate\", \".disabled-popup-open\", \".disabled-link-prev-page\", \".disabled-link-next-page\", \".disabled-link-anchor-page\", \".external\"]);\n  $link.css(\"pointer-events\", \"auto\");\n  $link.off(\"click\");\n  $link.on(\"click\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    var $el = $$(this);\n    custom_components_link[\"default\"].call(app, $el);\n    return false;\n  });\n\n  //-------- Image --------\n  var $img = $editorContent.find(\"img\");\n  $img.off(\"click\");\n  $img.on(\"click\", /*#__PURE__*/function () {\n    var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(e) {\n      var target, url, style, split, width, height;\n      return regenerator_default.a.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            target = $$(e.target);\n            url = textEditor_utils[\"parserOut\"].call(app, target.attr(\"src\"));\n            style = target.attr(\"style\");\n            split = style.split(\";\");\n            width = \"100%\";\n            height = \"auto\";\n            if (split.length > 0) {\n              split.forEach(function (o) {\n                var val = o.split(\":\");\n                if (val[0].includes(\"height\")) height = val[1].trim();\n                if (val[0].includes(\"width\")) width = val[1].trim();\n              });\n            }\n            custom_components_image[\"default\"].call(app, null, url, width, height).then(function (ret) {\n              if (ret.delete) {\n                target.remove();\n              } else {\n                target.attr(\"src\", ret.url);\n                target.css(\"width\", ret.width);\n                target.css(\"height\", ret.height);\n              }\n              var val = $editorContent.html();\n              textEditor.emit(\"change\", textEditor, val);\n            });\n          case 8:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    }));\n    return function (_x) {\n      return _ref.apply(this, arguments);\n    };\n  }());\n  $img.off(\"dragstart drop\");\n  $img.on(\"dragstart drop\", function (e) {\n    e.preventDefault();\n    return false;\n  });\n\n  //-------- Popover --------\n  var $pe = $editorContent.find(\".disabled-popover-with-data\");\n  $pe.css(\"pointer-events\", \"auto\");\n\n  // $pe.attr('contenteditable', 'false');\n  $pe.off(\"click\");\n  $pe.on(\"click\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    var $el = $$(this);\n    custom_components_popover[\"default\"].call(app, $el);\n    return false;\n  });\n\n  //-------- Tooltip --------\n  var $tool = $editorContent.find(\".tooltip-decor\");\n  $tool.off(\"click\");\n  $tool.on(\"click\", function (e) {\n    var $el = $$(this);\n    custom_components_tooltip.call(app, $el);\n    return false;\n  });\n\n  //-------- Audio --------\n  var $audio = $editorContent.find(\".disabled-builder-audio-player\");\n  $audio.css(\"pointer-events\", \"auto\");\n  $audio.off(\"click\");\n  $audio.on(\"click\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    var $el = $$(this);\n    custom_components_audio[\"default\"].call(app, $el);\n    return false;\n  });\n}\n/* harmony default export */ var builder_content_settings_textEditor_textEditor = (textEditor_textEditor);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/instruction.js\n// import genHelp from \"./genHelp\";\n\nfunction instruction(contentSettingObj, content, key, $apEl) {\n  var app = this;\n  var el = \"<li class=\\\"item-content item-input\\\">\\n          <div class=\\\"item-inner\\\">\\n            <div class=\\\"item-title item-label\\\">\".concat(contentSettingObj.name, \"</div>\\n            <div class=\\\"item-input-wrap\\\">\\n              <div>\").concat(contentSettingObj.text, \"</div>\\n            </div>\\n          </div>\\n        </li>\");\n  var $el = $$(el);\n  $apEl.append($el[0]);\n}\n/* harmony default export */ var builder_content_settings_instruction = (instruction);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js\nvar interactivePoint = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js\nvar interactiveArea = __webpack_require__(\"./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder-content-settings/builder_content.f7.html\n\n      \n      const builder_content_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      \n\n\n\nlet jsdiff = __webpack_require__(/*! diff */ \"./node_modules/diff/dist/diff.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ var builder_content_f7 = ({\n  data: function () {\n    let app = this.$app;\n    let ec = app.builder.editComponent;\n    let ecCast = '';\n    if (ec.params.hasOwnProperty('castComponents') && Array.isArray(ec.params.castComponents)) {\n      ecCast = ec.params.castComponents.length;\n      if (ecCast > 0) {\n        ecCast = `<span class=\"ec-cast\">${ ecCast }</span>`;\n      } else {\n        ecCast = '';\n      }\n    }\n    return {\n      editComponent: app.builder.editComponent,\n      ecCastCount: ecCast,\n      switchComponents: app.builder.editComponent.getAllowedSwitchComponents(),\n      defaultName: app.builder.editComponent.params.name\n    };\n  },\n  methods: {\n    switchComponent: function (name) {\n      let self = this;\n      let app = self.$app;\n      app.builder.editComponent.changeTo(name);\n    },\n    mytest: function () {\n      alert('ok');\n    },\n    addComponent: function (categoryIndex, componentIndex) {\n      let app = this.$app;\n      let catI = parseInt(categoryIndex);\n      let catC = parseInt(componentIndex);\n      app.builder.addComponent(app.builder.categories[catI].components[catC], '/components/');\n    },\n    close: function () {\n      let app = this.$app;\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.close();\n    },\n    changeClassName: function (e) {\n      let app = this.$app;\n      let content = app.builder.editComponent.params.content;\n      let val = e.target.value;\n      content.customClasses = val;\n    },\n    changeAnim: function (e) {\n      let app = this.$app;\n      let contentAnim = app.builder.editComponent.params.content.customAnimation;\n      let val = e.target.value;\n      let name = e.target.name;\n      if (name == undefined) {\n        name = e.target.className;\n      }\n      switch (name) {\n      case 'animDelay':\n        if (val == '' || val < 0) {\n          val = 0;\n        }\n        contentAnim.delay = parseInt(val);\n        break;\n      case 'animDuration':\n        if (val == '' || val < 0) {\n          val = 0;\n        }\n        contentAnim.duration = parseInt(val);\n        break;\n      case 'radio-btn':\n        contentAnim.enabled = val === 'true';\n        break;\n      case 'animRepeat':\n        let ch = e.target.checked;\n        contentAnim.repeat = ch;\n        break;\n      }\n      this.$setState({ editComponent: app.builder.editComponent });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      if (page == undefined) {\n        return;\n      }\n      let app = page.app;\n      let $el = page.$el;\n      let cs = app.builder.editComponent.params.contentSetting;\n      let contents = app.builder.editComponent.params.content;\n      let componentId = app.builder.editComponent.params.id;\n      let $apEl = page.$el.find('#editContent');\n      let as = page.app.smartSelect.create({\n        el: $el.find('#animSmart'),\n        searchbar: true,\n        pageBackLinkText: 'Provést filtr',\n        pageTitle: app.translation.t('builder:content.animationSelect'),\n        openIn: 'popup',\n        on: {\n          close: () => {\n            let val = as.getValue();\n            let content = app.builder.editComponent.params.content;\n            content.customAnimation.class = val;\n            app.builder.editComponent.startAnimation();\n          }\n        }\n      });\n      let addBlank = function (contentSetting, content, key, $apEl) {\n        let li = _.findLastIndex(content[key], function (o) {\n          return o.deleted != true;\n        });\n        let previousObject = {};\n        if (li == -1) {\n          li = 0;\n          if (content[key] && content[key].hasOwnProperty(li)) {\n            previousObject = content[key][li];\n            previousObject = _.cloneDeep(previousObject);\n          }\n        } else {\n          previousObject = content[key][li];\n          previousObject = _.cloneDeep(previousObject);\n        }\n        let newObj = {};\n        if (previousObject !== undefined) {\n          newObj = previousObject;\n        }\n        if (!content[key]) {\n          content[key] = [];\n        }\n        newObj['id'] = app.utils.id('xxxx-xxxx-xxxx');\n        newObj['position'] = content[key].length + 1;\n        newObj['deleted'] = false;\n        let iterateChild = obj => {\n          for (let key in obj) {\n            if (Array.isArray(obj[key])) {\n              let edited = iterateChild(obj[key]);\n              obj[key] = edited;\n            } else if (typeof obj[key] == 'object') {\n              for (let item in obj[key]) {\n                if (item == 'id') {\n                  obj[key][item] = app.utils.id('xxxx-xxxx-xxxx');\n                }\n              }\n            } else {\n              if (key == 'id') {\n                obj[key] = app.utils.id('xxxx-xxxx-xxxx');\n              }\n            }\n          }\n          return obj;\n        };\n        newObj = iterateChild(newObj);\n        let $delBtn = $$(`<li><i class=\"handle icon f7-icons\">move</i><a class=\"del\" href=\"#\"><i class=\"icon f7-icons\">trash</i></a><ul class=\"inside-list\"></ul><hr></li>`);\n        $apEl.append($delBtn[0]);\n        let $newEl = $apEl.find('.inside-list');\n        let $delClick = $delBtn.find('.del');\n        $delClick.on('click', function (e) {\n          app.builder.history.globalMerge = 1;\n          removeItem(content[key], newObj, $newEl[$newEl.length - 1].parentNode, e);\n          app.builder.history.globalMerge = false;\n        });\n        if (!Array.isArray(content[key])) {\n          content[key] = [];\n        }\n        content[key].push(newObj);\n        let fu = content[key][content[key].length - 1];\n        iterate(contentSetting, fu, $newEl);\n      };\n      let removeItem = (content, key, el, e) => {\n        key['deleted'] = true;\n        app.builder.history.addHistory(componentId, 'contentArrayDelete');\n        $$(el).remove();\n      };\n      let positionChange = (content, e) => {\n        let itemId = $$(e.item).attr('data-id');\n        let item = _.find(content, [\n          'id',\n          itemId\n        ]);\n        let newIndex = e.newIndex;\n        let newPosition = e.newIndex + 1;\n        if (e.newIndex < e.oldIndex) {\n          for (let k = newIndex; k > 0; k--) {\n            if (content[k].hasOwnProperty('deleted') && content[k].deleted) {\n              newIndex--;\n              newPosition = content[newIndex].position;\n            } else {\n              break;\n            }\n          }\n          let biggers = _.filter(content, obj => {\n            return obj.position >= newPosition && obj.id !== itemId && obj.position < e.oldIndex + 1;\n          });\n          for (let key in biggers) {\n            biggers[key].position = biggers[key].position + 1;\n          }\n        }\n        if (e.newIndex > e.oldIndex) {\n          for (let k = newIndex; k < content.length; k++) {\n            if (content[k].hasOwnProperty('deleted') && content[k].deleted) {\n              newIndex++;\n              newPosition = content[newIndex].position;\n            } else {\n              break;\n            }\n          }\n          let smallers = _.filter(content, obj => obj.position <= newPosition && obj.id !== itemId);\n          for (let key in smallers) {\n            smallers[key].position = smallers[key].position - 1;\n          }\n        }\n        item.position = newPosition;\n        app.builder.history.addHistory(componentId, 'contentArrayMove');\n      };\n      let iterate = function (contentSetting, content, $apEl) {\n        Object.keys(contentSetting).forEach(function (key, value) {\n          if (typeof contentSetting[key] === 'object' && contentSetting[key] !== null && !contentSetting[key].hasOwnProperty('type')) {\n            iterate(contentSetting[key], content[key], $apEl);\n          } else {\n            let contentSettingObj = contentSetting[key];\n            if (contentSettingObj.hasOwnProperty('dependOn')) {\n              if (!app.utils.resolve(contentSettingObj.dependOn, app.builder.editComponent.params)) {\n                return true;\n              }\n            }\n            switch (contentSettingObj.type) {\n            case 'button':\n              builder_content_settings_button.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'textarea':\n              builder_content_settings_textArea.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'textEditor':\n              builder_content_settings_textEditor_textEditor.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'input-number':\n              builder_content_settings_input.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'input-datetime':\n              builder_content_settings_dateTime.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'action':\n              if (typeof content[key] != 'object' && content.hasOwnProperty('link')) {\n                content[key] = content.link;\n              }\n              builder_content_settings_action.call(app, contentSettingObj, content, key, $apEl, componentId);\n              break;\n            case 'image':\n              builder_content_settings_image.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'audio':\n              builder_content_settings_audio.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'video':\n              builder_content_settings_video.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'json':\n              builder_content_settings_json.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'equation':\n              builder_content_settings_equation.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'color':\n              builder_content_settings_colorPicker.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'select':\n              builder_content_settings_select.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'icon':\n              builder_content_settings_iconPicker.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'interactive-point':\n              interactivePoint[\"default\"].call(app, contentSettingObj, content, key, $apEl, contents);\n              break;\n            case 'interactive-area':\n              interactiveArea[\"default\"].call(app, contentSettingObj, content, key, $apEl, contents);\n              break;\n            case 'instruction':\n              builder_content_settings_instruction.call(app, contentSettingObj, content, key, $apEl);\n              break;\n            case 'bool':\n              builder_content_settings_bool.call(app, contentSettingObj, content, key, $apEl);\n              if (contentSettingObj.hasOwnProperty('hidden') && content[key]) {\n                let $sublist = $$(`<li><div class=\"block-title sublist\"></div></li>`);\n                $apEl.append($sublist[0]);\n                let $apElx = $sublist.find('.sublist');\n                let $header = $$(`<ul class=\"firstlist\"></ul>`);\n                $apElx.append($header[0]);\n                let $apEll = $apEl.find('.firstlist');\n                iterate(contentSettingObj.hidden, content, $apEll);\n              }\n              break;\n            case 'array':\n              let $sublist = $$(`<li><div class=\"block-title sublist\"></div></li>`);\n              $apEl.append($sublist[0]);\n              $apEl = $sublist.find('.sublist');\n              let $header = $$(`<div class=\"list no-hairlines-md\"><div class=\"block-title\">${ contentSettingObj.name }</div><ul class=\"sortable firstlist\"></ul><div class=\"add-container\"></div></div>`);\n              $apEl.append($header[0]);\n              let $apEll = $apEl.find('.firstlist');\n              let $addEll = $apEl.find('.add-container');\n              let el = document.querySelectorAll('.sortable.firstlist');\n              for (var i = 0; i < el.length; i++) {\n                let sortable = new sortable_esm[\"default\"](el[i], {\n                  group: {\n                    name: 'nested',\n                    pull: false,\n                    put: false\n                  },\n                  handle: '.handle',\n                  animation: 150,\n                  swapThreshold: 0.8,\n                  invertSwap: true,\n                  onUpdate: function (evt) {\n                    positionChange(content[key], evt);\n                  }\n                });\n              }\n              if (content[key]) {\n                let sorted = _.orderBy(content[key], ['position'], ['asc']);\n                sorted.forEach(function (key2, value2) {\n                  if (!key2.deleted) {\n                    let $delBtn = $$(`<li data-id=\"${ key2.id }\" data-position=\"${ key2.position }\"><i class=\"handle icon f7-icons\">move</i>${ key2.position }<a class=\"del\" href=\"#\"><i class=\"icon f7-icons\">trash</i></a><ul class=\"inside-list\"></ul><hr></li>`);\n                    $apEll.append($delBtn[0]);\n                    let $apElin = $apEll.find('.inside-list');\n                    let $delClick = $delBtn.find('.del');\n                    $delClick.on('click', function (e) {\n                      removeItem(content[key], key2, $apElin[$apElin.length - 1].parentNode, e);\n                    });\n                    iterate(contentSettingObj.values, key2, $apElin);\n                  }\n                });\n              }\n              let $addButton = $$(`<a class=\"add\" href=\"#\">${ app.translation.t('builder:content.addNext') }<i class=\"icon material-icons\">add_circle_outline</i></a>`);\n              $addButton.on('click', function () {\n                addBlank(contentSettingObj.values, content, key, $apEll);\n              });\n              $addEll.append($addButton[0]);\n              break;\n            }\n          }\n        });\n        $apEl.append(``);\n      };\n      if (as.$selectEl && app.builder.editComponent.params.content.customAnimation.class != null) {\n        as.$selectEl.val(app.builder.editComponent.params.content.customAnimation.class).parent().find('.item-after').html(app.builder.editComponent.params.content.customAnimation.class);\n      }\n      page.$el.find(`input[value=${ app.builder.editComponent.params.name }]`).attr('checked', 'checked');\n      $apEl.append('<div class=\"list no-hairlines-md\"><ul class=\"firstlist\"></ul></div>');\n      $apEl = $apEl.find('.firstlist');\n      app.data.myEvents.off('link:useLink');\n      iterate(cs, contents, $apEl);\n      $$('.show-history').on('click', () => {\n        app.builder.versions.openHistoryPopup();\n      });\n      app.builder.data.changeIndex = null;\n      app.builder.data.referenceContent = null;\n      app.builder.data.referenceKey = null;\n      app.builder.data.referenceObject = null;\n      let getContent = function (title, url) {\n        return `<div class=\"popup popup-big\">\n            <p><span style=\"margin-left: 10px\"><strong>${ title }</strong></span>\n\n\n              <a style=\"float: right; margin-right: 10px;\" class=\"link popup-close\" href=\"#\">\n                <i class=\"icon material-icons\">highlight_off</i>\n              </a>\n              <span style=\"float: right; margin-right: 10px;\">|</span>\n              <a style=\"float: right; margin-right: 10px;\" class=\"link external\" target=\"_blank\" href=\"${ app.apiManager.params.mediaUrl }\">\n                ${ app.translation.t('builder:content.openInNextWindow') }\n              </a>\n            </p>\n\n            ` + `<iframe id=\"imgframe\" src=\"${ url }\" width=\"100%\" height=\"100%\"></iframe>` + '</div>';\n      };\n      let mediaServerPath = app.apiManager.params.mediaUrl;\n      app.builder.imagePopup = app.popup.create({\n        content: getContent('Výběr obrázku', `${ mediaServerPath }&editor=1&filters=[\"png\",\"jpg\",\"jpeg\",\"gif\"]`),\n        on: {\n          closed: function (popup) {\n            $$('#imgframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"png\",\"jpg\",\"jpeg\",\"gif\"]';\n            $$('#videoframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"m3u8\"]';\n            $$('#audioframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"mp3\",\"MP3\"]';\n            $$('#jsonframe').attr('src', app.apiManager.params.mediaUrl + '&editor=1&filters=[\\'json\\']');\n          }\n        }\n      });\n      app.builder.videoPopup = app.popup.create({\n        content: getContent('Výběr streamu', `${ mediaServerPath }&editor=1&filters=[\"m3u8\"]`),\n        on: {\n          closed: function (popup) {\n            $$('#imgframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"png\",\"jpg\",\"jpeg\",\"gif\"]';\n            $$('#videoframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"m3u8\"]';\n            $$('#audioframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"mp3\",\"MP3\"]';\n            $$('#jsonframe').attr('src', app.apiManager.params.mediaUrl + '&editor=1&filters=[\\'json\\']');\n          }\n        }\n      });\n      app.builder.jsonPopup = app.popup.create({\n        content: getContent('Výběr souboru JSON', `${ mediaServerPath }&editor=1&filters=['json']`),\n        on: {\n          closed: function (popup) {\n            $$('#imgframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"png\",\"jpg\",\"jpeg\",\"gif\"]';\n            $$('#videoframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"m3u8\"]';\n            $$('#audioframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"mp3\",\"MP3\"]';\n            $$('#jsonframe').attr('src', app.apiManager.params.mediaUrl + '&editor=1&filters=[\\'json\\']');\n          }\n        }\n      });\n      app.builder.audioPopup = app.popup.create({\n        content: getContent('Výběr MP3 souboru', `${ mediaServerPath }&editor=1&filters=[\"mp3\",\"MP3\"]`),\n        on: {\n          closed: function (popup) {\n            $$('#imgframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"png\",\"jpg\",\"jpeg\",\"gif\"]';\n            $$('#videoframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&types=[\"m3u8\"]';\n            $$('#audioframe').attr('src', app.apiManager.params.mediaUrl) + '&editor=1&filters=[\"mp3\",\"MP3\"]';\n            $$('#jsonframe').attr('src', app.apiManager.params.mediaUrl + '&editor=1&filters=[\\'json\\']');\n          }\n        }\n      });\n      function setNewUrlToReference(url) {\n        app.builder.data.referenceContent[app.builder.data.referenceKey] = url;\n        app.builder.data.referenceObject.attr('src', url);\n      }\n      app.data.myEvents.off('message:media');\n      app.data.myEvents.on('message:media', function (url) {\n        setNewUrlToReference(url);\n        app.builder.imagePopup.close();\n        app.builder.videoPopup.close();\n        app.builder.audioPopup.close();\n        app.builder.jsonPopup.close();\n      });\n      app.data.myEvents.off('contentSettings:reload');\n      app.data.myEvents.on('contentSettings:reload', () => {\n        $apEl = $$('body').find('#editContent');\n        $apEl.html('');\n        $apEl.append('<div class=\"list no-hairlines-md\"><ul class=\"firstlist\"></ul></div>');\n        $apEl = $apEl.find('.firstlist');\n        iterate(cs, contents, $apEl);\n      });\n      let stylesEl = $el.find('#view-styles');\n      if (stylesEl.length > 0) {\n        app.views.create(stylesEl, {\n          name: 'styles',\n          url: '/builder-styles/',\n          pushState: false\n        });\n      }\n      let historyEl = $el.find('#view-history');\n      if (historyEl.length > 0) {\n        app.views.create(historyEl, {\n          name: 'history',\n          url: '/builder-history/',\n          pushState: false,\n          inComponent: true\n        });\n      }\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '2549be3e42',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" @click=\"close\" class=\"link\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('settings'), ctx_1);\n      r += '</div>\\n        <div class=\"subnavbar\">\\n          <div class=\"subnavbar-inner\">\\n            <div class=\"segmented segmented-raised\">\\n              <a class=\"button tab-link tab-link-active\" href=\"#tab1\"><i class=\"icon material-icons\">edit</i></a>\\n              <a class=\"button tab-link\" href=\"#tab2\"><i class=\"icon material-icons\">rotate_90_degrees_ccw</i>\\n                ';\n      r += c(ctx_1.ecCastCount, ctx_1);\n      r += ' </a>\\n              <a class=\"button tab-link\" href=\"#tabClass\"><i class=\"icon material-icons\">brush</i></a>\\n              <a class=\"button tab-link\" href=\"#tab3\"><i class=\"icon material-icons tooltip-init\" data-tooltip=\"Zobrazit historii úprav\">history</i></a>\\n\\n            </div>\\n          </div>\\n        </div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <div class=\"content-title\">\\n        <h1>';\n      r += c(ctx_1.editComponent.params.title, ctx_1);\n      r += '</h1>\\n        <h2>';\n      r += c(ctx_1.editComponent.params.subtitle, ctx_1);\n      r += '</h2>\\n\\n        <hr>\\n      </div>\\n\\n      <div class=\"tabs\">\\n        <div class=\"tab tab-active\" id=\"tab1\">\\n          <div id=\"editContent\"></div>\\n        </div>\\n        <div class=\"tab\" id=\"tab2\">\\n          <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('builder:content.switchComponent'), ctx_1);\n      r += '</div>\\n          <div class=\"list\">\\n            <ul>\\n              ';\n      r += builder_content_f7_Template7Helpers.each.call(ctx_1, ctx_1.switchComponents, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n              <li>\\n                <label class=\"item-radio item-radio-icon-end item-content\">\\n                  <input class=\"theme\" type=\"radio\" name=\"switch-component\" value=\"';\n          r += c(ctx_2.name, ctx_2);\n          r += '\">\\n                  <i class=\"icon icon-radio\"></i>\\n                  <div class=\"item-inner\" @click=\"switchComponent(\\'';\n          r += c(ctx_2.name, ctx_2);\n          r += '\\')\">\\n                    <div class=\"item-title\">';\n          r += c(ctx_2.title, ctx_2);\n          r += '\\n                      <div class=\"item-footer\">';\n          r += c(ctx_2.subtitle, ctx_2);\n          r += '</div>\\n                    </div>\\n                  </div>\\n                </label>\\n              </li>\\n              ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n            </ul>\\n          </div>\\n        </div>\\n        <div class=\"tab\" id=\"tabClass\">\\n          <div id=\"classEditor\">\\n\\n            <!-- STYLES -->\\n\\n            <div style=\"width: 100%\" id=\"view-styles\"></div>\\n\\n            <!-- END STYLES -->\\n            <div class=\"list\">\\n              <ul>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('builder:content.customClass'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"text\" @blur=\"changeClassName\" name=\"className\" value=\"';\n      r += c(ctx_1.editComponent.params.content.customClasses, ctx_1);\n      r += '\">\\n                      <span class=\"input-clear-button\"></span>\\n                    </div>\\n                  </div>\\n                </li>\\n                <li class=\"item-content item-input\">\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('builder:content.animationEnable'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap yes-no-radio\">\\n                      ';\n      r += builder_content_f7_Template7Helpers.if.call(ctx_1, ctx_1.editComponent.params.content.customAnimation.enabled, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                      <input id=\"yes-animation\" class=\"toggle toggle-on\" type=\"radio\" name=\"bool-radio-animation\" value=\"true\" checked>\\n                      <label name=\"animBool\" for=\" yes-animation\" class=\"radio-btn\" @click=\"changeAnim\" value=\"true\">';\n          r += c(ctx_2.$app.translation.t('builder:content.controlYes'), ctx_2);\n          r += '</label>\\n                      <input id=\"no-animation\" class=\"toggle toggle-off\" type=\"radio\" name=\"bool-radio-animation\" value=\"false\">\\n                      <label name=\"animBool\" for=\"no-animation\" class=\"radio-btn\" @click=\"changeAnim\" value=\"false\">';\n          r += c(ctx_2.$app.translation.t('builder:content.controlNo'), ctx_2);\n          r += '</label>\\n                      ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                      <input id=\"yes-animation\" class=\"toggle toggle-on\" @click=\"changeAnim\" type=\"radio\" name=\"bool-radio-animation\" value=\"true\">\\n                      <label name=\"animBool\" for=\" yes-animation\" class=\"radio-btn\" @click=\"changeAnim\" value=\"true\">';\n          r += c(ctx_2.$app.translation.t('builder:content.controlYes'), ctx_2);\n          r += '</label>\\n                      <input id=\"no-animation\" class=\"toggle toggle-off\" type=\"radio\" name=\"bool-radio-animation\" value=\"false\" checked>\\n                      <label name=\"animBool\" for=\"no-animation\" class=\"radio-btn\" @click=\"changeAnim\" value=\"false\">';\n          r += c(ctx_2.$app.translation.t('builder:content.controlNo'), ctx_2);\n          r += '</label>\\n                      ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                    </div>\\n                  </div>\\n                </li>\\n                ';\n      r += builder_content_f7_Template7Helpers.if.call(ctx_1, ctx_1.editComponent.params.content.customAnimation.enabled, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                <li>\\n                  ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                </li><li class=\"hide\">\\n                  ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                  <a id=\"animSmart\" class=\"item-link smart-select\" data-open-in=\"popup\" data-searchbar=\"true\" data-searchbar-placeholder=\"';\n      r += c(ctx_1.$app.translation.t('builder:content.animationName'), ctx_1);\n      r += '\">\\n                    <select name=\"';\n      r += c(ctx_1.$app.translation.t('builder:content.animation'), ctx_1);\n      r += '\">\\n                      <optgroup label=\"Attention seekers\">\\n                        <option value=\"bounce\">bounce</option>\\n                        <option value=\"flash\">flash</option>\\n                        <option value=\"pulse\">pulse</option>\\n                        <option value=\"rubberBand\">rubberBand</option>\\n                        <option value=\"shakeX\">shakeX</option>\\n                        <option value=\"shakeY\">shakeY</option>\\n                        <option value=\"headShake\">headShake</option>\\n                        <option value=\"swing\">swing</option>\\n                        <option value=\"tada\">tada</option>\\n                        <option value=\"wobble\">wobble</option>\\n                        <option value=\"jello\">jello</option>\\n                        <option value=\"heartBeat\">heartBeat</option>\\n                      </optgroup>\\n                      <optgroup label=\"Back entrances\">\\n                        <option value=\"backInDown\">backInDown</option>\\n                        <option value=\"backInLeft\">backInLeft</option>\\n                        <option value=\"backInRight\">backInRight</option>\\n                        <option value=\"backInUp\">backInUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Back exits\">\\n                        <option value=\"backOutDown\">backOutDown</option>\\n                        <option value=\"backOutLeft\">backOutLeft</option>\\n                        <option value=\"backOutRight\">backOutRight</option>\\n                        <option value=\"backOutUp\">backOutUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Bouncing entrances\">\\n                        <option value=\"bounceIn\">bounceIn</option>\\n                        <option value=\"bounceInDown\">bounceInDown</option>\\n                        <option value=\"bounceInLeft\">bounceInLeft</option>\\n                        <option value=\"bounceInRight\">bounceInRight</option>\\n                        <option value=\"bounceInUp\">bounceInUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Bouncing exits\">\\n                        <option value=\"bounceOut\">bounceOut</option>\\n                        <option value=\"bounceOutDown\">bounceOutDown</option>\\n                        <option value=\"bounceOutLeft\">bounceOutLeft</option>\\n                        <option value=\"bounceOutRight\">bounceOutRight</option>\\n                        <option value=\"bounceOutUp\">bounceOutUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Fading entrances\">\\n                        <option value=\"fadeIn\">fadeIn</option>\\n                        <option value=\"fadeInDown\">fadeInDown</option>\\n                        <option value=\"fadeInDownBig\">fadeInDownBig</option>\\n                        <option value=\"fadeInLeft\">fadeInLeft</option>\\n                        <option value=\"fadeInLeftBig\">fadeInLeftBig</option>\\n                        <option value=\"fadeInRight\">fadeInRight</option>\\n                        <option value=\"fadeInRightBig\">fadeInRightBig</option>\\n                        <option value=\"fadeInUp\">fadeInUp</option>\\n                        <option value=\"fadeInUpBig\">fadeInUpBig</option>\\n                        <option value=\"fadeInTopLeft\">fadeInTopLeft</option>\\n                        <option value=\"fadeInTopRight\">fadeInTopRight</option>\\n                        <option value=\"fadeInBottomLeft\">fadeInBottomLeft</option>\\n                        <option value=\"fadeInBottomRight\">fadeInBottomRight</option>\\n                      </optgroup>\\n                      <optgroup label=\"Fading exits\">\\n                        <option value=\"fadeOut\">fadeOut</option>\\n                        <option value=\"fadeOutDown\">fadeOutDown</option>\\n                        <option value=\"fadeOutDownBig\">fadeOutDownBig</option>\\n                        <option value=\"fadeOutLeft\">fadeOutLeft</option>\\n                        <option value=\"fadeOutLeftBig\">fadeOutLeftBig</option>\\n                        <option value=\"fadeOutRight\">fadeOutRight</option>\\n                        <option value=\"fadeOutRightBig\">fadeOutRightBig</option>\\n                        <option value=\"fadeOutUp\">fadeOutUp</option>\\n                        <option value=\"fadeOutUpBig\">fadeOutUpBig</option>\\n                        <option value=\"fadeOutTopLeft\">fadeOutTopLeft</option>\\n                        <option value=\"fadeOutTopRight\">fadeOutTopRight</option>\\n                        <option value=\"fadeOutBottomRight\">fadeOutBottomRight</option>\\n                        <option value=\"fadeOutBottomLeft\">fadeOutBottomLeft</option>\\n                      </optgroup>\\n                      <optgroup label=\"Flippers\">\\n                        <option value=\"flip\">flip</option>\\n                        <option value=\"flipInX\">flipInX</option>\\n                        <option value=\"flipInY\">flipInY</option>\\n                        <option value=\"flipOutX\">flipOutX</option>\\n                        <option value=\"flipOutY\">flipOutY</option>\\n                      </optgroup>\\n                      <optgroup label=\"Lightspeed\">\\n                        <option value=\"lightSpeedInRight\">lightSpeedInRight</option>\\n                        <option value=\"lightSpeedInLeft\">lightSpeedInLeft</option>\\n                        <option value=\"lightSpeedOutRight\">lightSpeedOutRight</option>\\n                        <option value=\"lightSpeedOutLeft\">lightSpeedOutLeft</option>\\n                      </optgroup>\\n                      <optgroup label=\"Rotating entrances\">\\n                        <option value=\"rotateIn\">rotateIn</option>\\n                        <option value=\"rotateInDownLeft\">rotateInDownLeft</option>\\n                        <option value=\"rotateInDownRight\">rotateInDownRight</option>\\n                        <option value=\"rotateInUpLeft\">rotateInUpLeft</option>\\n                        <option value=\"rotateInUpRight\">rotateInUpRight</option>\\n                      </optgroup>\\n                      <optgroup label=\"Rotating exits\">\\n                        <option value=\"rotateOut\">rotateOut</option>\\n                        <option value=\"rotateOutDownLeft\">rotateOutDownLeft</option>\\n                        <option value=\"rotateOutDownRight\">rotateOutDownRight</option>\\n                        <option value=\"rotateOutUpLeft\">rotateOutUpLeft</option>\\n                        <option value=\"rotateOutUpRight\">rotateOutUpRight</option>\\n                      </optgroup>\\n                      <optgroup label=\"Specials\">\\n                        <option value=\"hinge\">hinge</option>\\n                        <option value=\"jackInTheBox\">jackInTheBox</option>\\n                        <option value=\"rollIn\">rollIn</option>\\n                        <option value=\"rollOut\">rollOut</option>\\n                      </optgroup>\\n                      <optgroup label=\"Zooming entrances\">\\n                        <option value=\"zoomIn\">zoomIn</option>\\n                        <option value=\"zoomInDown\">zoomInDown</option>\\n                        <option value=\"zoomInLeft\">zoomInLeft</option>\\n                        <option value=\"zoomInRight\">zoomInRight</option>\\n                        <option value=\"zoomInUp\">zoomInUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Zooming exits\">\\n                        <option value=\"zoomOut\">zoomOut</option>\\n                        <option value=\"zoomOutDown\">zoomOutDown</option>\\n                        <option value=\"zoomOutLeft\">zoomOutLeft</option>\\n                        <option value=\"zoomOutRight\">zoomOutRight</option>\\n                        <option value=\"zoomOutUp\">zoomOutUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Sliding entrances\">\\n                        <option value=\"slideInDown\">slideInDown</option>\\n                        <option value=\"slideInLeft\">slideInLeft</option>\\n                        <option value=\"slideInRight\">slideInRight</option>\\n                        <option value=\"slideInUp\">slideInUp</option>\\n                      </optgroup>\\n                      <optgroup label=\"Sliding exits\">\\n                        <option value=\"slideOutDown\">slideOutDown</option>\\n                        <option value=\"slideOutLeft\">slideOutLeft</option>\\n                        <option value=\"slideOutRight\">slideOutRight</option>\\n                        <option value=\"slideOutUp\">slideOutUp</option>\\n                      </optgroup>\\n                    </select>\\n                    <div class=\"item-content\">\\n                      <div class=\"item-inner\">\\n                        <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('builder:content.animation'), ctx_1);\n      r += '</div>\\n                      </div>\\n                    </div>\\n                  </a>\\n                </li>\\n                ';\n      r += builder_content_f7_Template7Helpers.if.call(ctx_1, ctx_1.editComponent.params.content.customAnimation.enabled, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                <li class=\"item-content item-input\">\\n                  ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                </li><li class=\"hide\">\\n                  ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title item-label\">';\n      r += c(ctx_1.$app.translation.t('builder:content.animationDelay'), ctx_1);\n      r += '</div>\\n                    <div class=\"item-input-wrap\">\\n                      <input type=\"number\" min=\"0\" @blur=\"changeAnim\" name=\"animDelay\" value=\"';\n      r += c(ctx_1.editComponent.params.content.customAnimation.delay, ctx_1);\n      r += '\">\\n                      <span class=\"input-clear-button\"></span>\\n                    </div>\\n                  </div>\\n                </li>\\n                ';\n      r += builder_content_f7_Template7Helpers.if.call(ctx_1, ctx_1.editComponent.params.content.customAnimation.enabled, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                <li>\\n                  ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                </li><li class=\"hide\">\\n                  ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                  <label class=\"item-checkbox item-content\">\\n                    ';\n      r += builder_content_f7_Template7Helpers.if.call(ctx_1, ctx_1.editComponent.params.content.customAnimation.repeat, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                    <input type=\"checkbox\" name=\"animRepeat\" @change=\"changeAnim\" checked>\\n                    ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n                    <input type=\"checkbox\" name=\"animRepeat\" @change=\"changeAnim\">\\n                    ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n                    <i class=\"icon icon-checkbox\"></i>\\n                    <div class=\"item-inner\">\\n                      <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('builder:content.animationRepeat'), ctx_1);\n      r += '</div>\\n                    </div>\\n                  </label>\\n                </li>\\n\\n              </ul>\\n            </div>\\n          </div>\\n        </div>\\n        <div class=\"tab\" id=\"tab3\">\\n          <!-- <div class=\"show-history\"><i class=\"icon material-icons app-theme-color  tooltip-init\"\\n              data-tooltip=\"';\n      r += c(ctx_1.$app.translation.t('builder:content.tooltipHistory'), ctx_1);\n      r += '\">history</i></div> -->\\n          <div style=\"width: 100%\" id=\"view-history\"></div>\\n        </div>\\n      </div>\\n      <input type=\"text\" @keyup=\"mytest\">\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  styleScoped: false,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"settings\")}} {{ecCastCount}} {{editComponent.params.title}} {{editComponent.params.subtitle}} {{$app.translation.t(\"builder:content.switchComponent\")}} {{#each switchComponents}} {{title}} {{subtitle}} {{/each}} {{$app.translation.t(\"builder:content.customClass\")}} {{$app.translation.t(\"builder:content.animationEnable\")}} {{#if this.editComponent.params.content.customAnimation.enabled}} {{$app.translation.t(\"builder:content.controlYes\")}} {{$app.translation.t(\"builder:content.controlNo\")}} {{else}} {{$app.translation.t(\"builder:content.controlYes\")}} {{$app.translation.t(\"builder:content.controlNo\")}} {{/if}} {{#if this.editComponent.params.content.customAnimation.enabled}} {{else}} {{/if}} bounce flash pulse rubberBand shakeX shakeY headShake swing tada wobble jello heartBeat backInDown backInLeft backInRight backInUp backOutDown backOutLeft backOutRight backOutUp bounceIn bounceInDown bounceInLeft bounceInRight bounceInUp bounceOut bounceOutDown bounceOutLeft bounceOutRight bounceOutUp fadeIn fadeInDown fadeInDownBig fadeInLeft fadeInLeftBig fadeInRight fadeInRightBig fadeInUp fadeInUpBig fadeInTopLeft fadeInTopRight fadeInBottomLeft fadeInBottomRight fadeOut fadeOutDown fadeOutDownBig fadeOutLeft fadeOutLeftBig fadeOutRight fadeOutRightBig fadeOutUp fadeOutUpBig fadeOutTopLeft fadeOutTopRight fadeOutBottomRight fadeOutBottomLeft flip flipInX flipInY flipOutX flipOutY lightSpeedInRight lightSpeedInLeft lightSpeedOutRight lightSpeedOutLeft rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight hinge jackInTheBox rollIn rollOut zoomIn zoomInDown zoomInLeft zoomInRight zoomInUp zoomOut zoomOutDown zoomOutLeft zoomOutRight zoomOutUp slideInDown slideInLeft slideInRight slideInUp slideOutDown slideOutLeft slideOutRight slideOutUp {{$app.translation.t('builder:content.animation')}} {{#if this.editComponent.params.content.customAnimation.enabled}} {{else}} {{/if}} {{$app.translation.t(\"builder:content.animationDelay\")}} {{#if this.editComponent.params.content.customAnimation.enabled}} {{else}} {{/if}} {{#if this.editComponent.params.content.customAnimation.repeat}} {{else}} {{/if}} {{$app.translation.t(\"builder:content.animationRepeat\")}} history --> `\n});\n    \n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html\nvar builder_css_generator_f7 = __webpack_require__(\"./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_page_component.f7.es.html\n/* harmony default export */ var builder_page_component_f7_es = ({\n  data: function () {\n    let getId = function () {\n      return 1;\n    };\n    let _this = this;\n    let app = this.$app;\n    let chapter = app.book.getSlideByUrl('/' + _this.$route.params.id);\n    let id = chapter.id;\n    _this.url = '/' + _this.$route.params.id;\n    return {\n      kompx: app.builder.renderPageComponents(id, _this),\n      basePath: this.$root.basePath,\n      builder: app.builder\n    };\n  },\n  methods: {\n    addToPageComponent: function (componentId = null, key = null) {\n      let _this = this;\n      let app = this.$app;\n      let chapter = app.book.getSlideByUrl('/' + _this.$route.params.id);\n      let id = chapter.id;\n      let tictac = app.builder.components[id];\n      if (componentId && componentId !== null && componentId !== 'null') {\n        let component = app.builder.helpers.findComponentInChapterById(componentId, tictac);\n        if (key && key !== 'null') {\n          let allowed = '';\n          if (component.params.componentsAllowedGroup == undefined) {\n            allowed = 'basicGroup';\n          } else {\n            if (component.params.componentsAllowedGroup.hasOwnProperty(key)) {\n              allowed = component.params.componentsAllowedGroup[key];\n            } else {\n              if (component.params.componentsAllowedGroup && typeof component.params.componentsAllowedGroup !== 'object') {\n                allowed = component.params.componentsAllowedGroup;\n              }\n            }\n          }\n          app.builder.addNext(1, component.components[key], allowed, component.pageComponentContext, component, key);\n        }\n      } else {\n        app.builder.addNext(1, tictac, 'basicGroup', _this, null);\n      }\n    }\n  },\n  on: {\n    pageMounted: function (t, page) {\n    },\n    pageInit: function (t, page) {\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '1d11bdde9d',\n  render() {\n    return `\n\n  <div class=\"page builder-page\">\n\n    <!--<br>-->\n    <!--<br>-->\n    <!--<br>-->\n    <!--<h1 @click=\"ap()\">Change 1</h1>-->\n\n\n\n\n\n\n\n    ${ this.builder.renderComponents(this.kompx) }\n\n\n\n\n  </div>\n`;\n  },\n  style: `\n  /* .testtttt {\n    color: yellow !important;\n  } */\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_page_component2.f7.es.html\n/* harmony default export */ var builder_page_component2_f7_es = ({\n  data: function () {\n    let getId = function () {\n      return 1;\n    };\n    let _this = this;\n    let app = this.$app;\n    let id = _this.$route.params.id;\n    _this.url = '/' + _this.$route.params.id;\n    return {\n      kompx: app.builder.renderPageComponents(id, _this),\n      basePath: this.$root.basePath,\n      builder: app.builder\n    };\n  },\n  methods: {\n    addToPageComponent: function (componentId = null, key = null) {\n      let _this = this;\n      let app = this.$app;\n      let chapter = app.book.getSlideByUrl('/' + _this.$route.params.id);\n      let id = chapter.id;\n      let tictac = app.builder.components[id];\n      if (componentId && componentId !== null && componentId !== 'null') {\n        let component = app.builder.helpers.findComponentInChapterById(componentId, tictac);\n        if (key && key !== 'null') {\n          let allowed = '';\n          if (component.params.componentsAllowedGroup == undefined) {\n            allowed = 'basicGroup';\n          } else {\n            if (component.params.componentsAllowedGroup.hasOwnProperty(key)) {\n              allowed = component.params.componentsAllowedGroup[key];\n            } else {\n              if (component.params.componentsAllowedGroup && typeof component.params.componentsAllowedGroup !== 'object') {\n                allowed = component.params.componentsAllowedGroup;\n              }\n            }\n          }\n          app.builder.addNext(1, component.components[key], allowed, component.pageComponentContext, component, key);\n        }\n      } else {\n        app.builder.addNext(1, tictac, 'basicGroup', _this, null);\n      }\n    }\n  },\n  on: {\n    pageMounted: function (t, page) {\n    },\n    pageInit: function (t, page) {\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '40f41e1cf6',\n  render() {\n    return `\n\n  <div class=\"page builder-page\">\n\n    <!--<br>-->\n    <!--<br>-->\n    <!--<br>-->\n    <!--<h1 @click=\"ap()\">Change 1</h1>-->\n\n\n\n\n\n\n\n    ${ this.builder.renderComponents(this.kompx) }\n\n\n\n\n  </div>\n`;\n  },\n  style: `\n  /* .testtttt {\n    color: yellow !important;\n  } */\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_chapters_new.f7.es.html\n\n\n/* harmony default export */ var builder_chapters_new_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      categories: app.book.getBookChaptersTree(),\n      newCat: app.builder.params.dataChapters\n    };\n  },\n  methods: {\n    render: function (data, root = null) {\n      let context = this;\n      let d = ``;\n      let curIndex = 1;\n      d = `${ d } <div class=\"list\" style=\"margin:0;\"><ul class=\"sortableChapters\">`;\n      data = _.sortBy(data, 'position');\n      let rootChapters = _.filter(data, o => {\n        return o.parentId == root && !o.deleted;\n      });\n      rootChapters.forEach(chapter => {\n        if ((!chapter.hasOwnProperty('deleted') || !chapter.deleted) && chapter.name != 'Prázdná') {\n          d = d + `<li class=\"draggable-chapters ${ chapter.isNumbered ? '' : 'no-numbered' }\" data-position=\"${ chapter.position }\" data-id=\"${ chapter.id }\" data-parent=\"${ chapter.parentId }\">\n                        <div class=\"item-content\">\n                          <div class=\"item-inner\">\n                            <i class=\"handle icon f7-icons\">move</i>\n                            <div class=\"item-title\"> ${ chapter.name }</div>\n                            <div class=\"item-after\"><label class=\"chapter-checkbox checkbox\"><input type=\"checkbox\" data-oid=\"${ chapter.id }\" @click=\"changeNumbering\" ${ chapter.isNumbered ? 'checked' : '' }/><i class=\"icon-checkbox\"></i></label><a href=\"#\" @click=\"contextMenu\" data-oldname=\"${ chapter.name }\" data-position=\"${ curIndex }\" data-parent=\"${ chapter.parentId }\" data-oid=\"${ chapter.id }\" ><i class=\"f7-icons color-black\" data-position=\"${ curIndex }\" data-parent=\"${ chapter.parentId }\" data-oid=\"${ chapter.id }\"  data-oldname=\"${ chapter.name }\">more_vertical_fill</i></a></div>\n                          </div>\n                        </div>\n `;\n          if (chapter.anchors) {\n            if (chapter.hasOwnProperty('anchors')) {\n              let anch = _.sortBy(chapter.anchors, o => {\n                return o.position;\n              });\n              d = d + `<div class=\"list\" style=\"margin:0;\"><ul class=\"ignore-sortable sortableAnchors\">`;\n              anch.forEach((anchor, index) => {\n                if (!anchor.deleted) {\n                  d = d + `<li class=\"ignore-sortable draggable-anchors\" data-id=\"${ anchor.anchorId }\" data-parent=\"${ chapter.id }\">\n                    <div class=\"item-content\">\n                            <div class=\"item-inner\">\n                              <i class=\"anchors-handle icon f7-icons\">move</i>\n                              <span class=\"anchor-identifier\">#</span>\n                              <div class=\"item-title\">${ anchor.position } ${ anchor.name }</div>\n                              <div class=\"item-after\"><a href=\"#\" @click=\"anchorsContextMenu\" data-oldname=\"${ anchor.name }\" data-position=\"${ anchor.position }\" data-parent=\"${ chapter.id }\" data-identifier=\"${ anchor.position }\" data-oid=\"${ anchor.anchorId }\" ><i class=\"f7-icons color-black\" data-position=\"${ index }\" data-parent=\"${ chapter.id }\" data-identifier=\"${ anchor.id }\" data-oid=\"${ anchor.anchorId }\"  data-oldname=\"${ anchor.name }\">more_vertical_fill</i></a></div>\n                            </div>\n                  </li>\n                  `;\n                }\n              });\n              d = d + `</ul></div>`;\n            }\n          }\n        }\n        let routes = _.filter(data, o => {\n          return o.id == chapter.parentId;\n        });\n        if (routes) {\n          root = chapter.id;\n          d = d + context.render(data, root);\n          d = `${ d } </li>`;\n        }\n        curIndex++;\n      });\n      d = `${ d }</ul></div>`;\n      return d;\n    },\n    delete: function (id) {\n      let app = this.$app;\n      let context = this;\n      app.builder.chapters.deleteChapterById(id);\n      context.$setState({ categories: app.book.getBookChaptersTree() });\n      context.$tick(function () {\n        context.makeSortable();\n      });\n    },\n    add: function () {\n      let app = this.$app;\n      let parent = null;\n      let position = _.filter(app.builder.params.dataChapters, o => {\n        return o.parentId == null && o.deleted == false;\n      });\n      position = position.length + 1;\n      let context = this;\n      let name = '';\n      app.dialog.prompt(app.translation.t('builder:chapters.typeChapterName') + ':', '', function (nameVal) {\n        name = nameVal;\n        name = name.replaceAll('\"', '');\n        let str = app.utils.removeDiacritics(name);\n        str = str.replace(/[^a-z0-9\\u0400-\\u04FF]/ig, '-');\n        str = str.replace(/\\-+/g, '-');\n        if (str[0] == '-') {\n          str = str.substring(1, str.length);\n        }\n        if (str[str.length - 1] == '-') {\n          str = str.substring(0, str.length - 1);\n        }\n        str = str.toLowerCase();\n        app.builder.chapters.addNextChapter(parent, position, name, str);\n        context.$setState({\n          categories: app.book.getBookChaptersTree(),\n          newCat: app.builder.params.dataChapters\n        });\n        context.$tick(function () {\n          context.makeSortable();\n        });\n      }, function () {\n        return false;\n      });\n    },\n    addNext: function (parent, position) {\n      let app = this.$app;\n      let context = this;\n      let name = '';\n      app.dialog.prompt(app.translation.t('builder:chapters.typeChapterName') + ':', '', function (nameVal) {\n        name = nameVal;\n        name = name.replaceAll('\"', '');\n        let str = app.utils.removeDiacritics(name);\n        str = str.replace(/[^a-z0-9\\u0400-\\u04FF]/ig, '-');\n        str = str.replace(/\\-+/g, '-');\n        if (str[0] == '-') {\n          str = str.substring(1, str.length);\n        }\n        if (str[str.length - 1] == '-') {\n          str = str.substring(0, str.length - 1);\n        }\n        str = str.toLowerCase();\n        app.builder.chapters.addNextChapter(parent, position, name, str);\n        context.$setState({ categories: app.book.getBookChaptersTree() });\n        context.$tick(function () {\n          context.makeSortable();\n        });\n      }, function () {\n        return false;\n      });\n    },\n    changeNumbering(e) {\n      let app = this.$app;\n      let $el = $$(e.target);\n      let id = $el.attr('data-oid');\n      let chapter = app.builder.chapters.findChapterById(id);\n      chapter.isNumbered = $el[0].checked;\n      app.builder.chapters.getChapterNumbering();\n      this.$setState({ categories: app.book.getBookChaptersTree() });\n      this.$tick(function () {\n        this.makeSortable();\n      });\n    },\n    addAnchor(parentId, name, id) {\n      let context = this;\n      let app = context.$app;\n      app.builder.chapters.addAnchorChapter(parentId, name, id);\n      context.$setState({ categories: app.book.getBookChaptersTree() });\n      context.$tick(function () {\n        context.makeSortable();\n      });\n    },\n    openAnchorMenu: function (parent) {\n      let context = this;\n      let app = context.$app;\n      let popup = app.popup.create({\n        content: `<div class=\"popup anchor-popup\">\n            <div class=\"block\">\n              <div class=\"list no-hairlines-md\">\n                <ul>\n                  <li class=\"item-content item-input\">\n                    <div class=\"item-media\">\n                      <i class=\"icon demo-list-icon\"></i>\n                    </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title item-label\">${ app.translation.t('builder:chapters.anchorName') }</div>\n                      <div class=\"item-input-wrap\">\n                        <input class=\"anchor-name\" type=\"text\" placeholder=\"${ app.translation.t('builder:chapters.anchorName') }\">\n                        <span class=\"input-clear-button\"></span>\n                      </div>\n                    </div>\n                  </li>\n                  <li class=\"item-content item-input\">\n                    <div class=\"item-media\">\n                      <i class=\"icon demo-list-icon\"></i>\n                    </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title item-label\">${ app.translation.t('builder:chapters.anchorId') }</div>\n                      <div class=\"item-input-wrap\">\n                        <input class=\"anchor-id\" type=\"text\" placeholder=\"${ app.translation.t('builder:chapters.anchorId') }\">\n                        <span class=\"input-clear-button\"></span>\n                      </div>\n                    </div>\n                  </li>\n                  <li class=\"item-content\" style=\"justify-content: flex-end;\">\n                    <a  class=\"col link popup-close button\">${ app.translation.t('cancel') }</a>\n                    <a id=\"submit-anchor\" class=\"col button\">${ app.translation.t('ok') }</a>\n                    </li>\n                </ul>\n              </div>\n            </div>\n            `\n      }).open();\n      let $el = $$(document).find('.anchor-popup');\n      let $btn = $el.find('#submit-anchor');\n      $btn.on('click', () => {\n        let name = $el.find('.anchor-name').val();\n        let id = $el.find('.anchor-id').val();\n        context.addAnchor(parent, name, id);\n        popup.close();\n      });\n    },\n    rename: function (id, oldName) {\n      let app = this.$app;\n      let context = this;\n      let name = '';\n      app.dialog.prompt(app.translation.t('builder:chapters.typeNewChapterName'), '', function (nameVal) {\n        name = nameVal;\n        name = name.replaceAll('\"', '');\n        let str = app.utils.removeDiacritics(name);\n        str = str.replace(/[^a-z0-9\\u0400-\\u04FF]/ig, '-');\n        str = str.replace(/\\-+/g, '-');\n        if (str[0] == '-') {\n          str = str.substring(1, str.length);\n        }\n        if (str[str.length - 1] == '-') {\n          str = str.substring(0, str.length - 1);\n        }\n        str = str.toLowerCase();\n        app.builder.chapters.renameChapter(id, name, str);\n        context.$setState({ categories: app.book.getBookChaptersTree() });\n      }, function () {\n        return false;\n      }, oldName);\n    },\n    contextMenu: function (e) {\n      let app = this.$app;\n      let context = this;\n      let $el = $$(e.target);\n      let parent = $el.attr('data-parent');\n      let position = $el.attr('data-position');\n      let id = $el.attr('data-oid');\n      let oldName = $el.attr('data-oldname');\n      app.dialog.create({\n        title: app.translation.t('builder:chapters.chapterOptions'),\n        text: app.translation.t('selectAction'),\n        closeByBackdropClick: true,\n        buttons: [\n          {\n            text: app.translation.t('builder:chapters.addChapterAfter'),\n            onClick: function (dialog, e) {\n              position = parseInt(position);\n              position++;\n              context.addNext(parent, position);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.addSubchapter'),\n            onClick: function (dialog, e) {\n              context.addNext(id, 1);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.addAnchor'),\n            onClick: function (dialog, e) {\n              context.openAnchorMenu(id, 1);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.renameChapter'),\n            onClick: function (dialog, e) {\n              context.rename(id, oldName);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.deleteChapter'),\n            onClick: function (dialog, e) {\n              context.delete(id);\n            }\n          }\n        ],\n        verticalButtons: true\n      }).open();\n    },\n    anchorsContextMenu: function (e) {\n      let app = this.$app;\n      let context = this;\n      let $el = $$(e.target);\n      let parent = $el.attr('data-parent');\n      let position = $el.attr('data-position');\n      let id = $el.attr('data-oid');\n      let oldName = $el.attr('data-oldname');\n      let oldIdentifier = $el.attr('data-identifier');\n      app.dialog.create({\n        title: app.translation.t('builder:chapters.anchorOptions'),\n        text: app.translation.t('selectAction'),\n        closeByBackdropClick: true,\n        buttons: [\n          {\n            text: app.translation.t('builder:chapters.renameAnchor'),\n            onClick: function (dialog, e) {\n              context.anchorRename(id, parent, oldName);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.changeAnchorElement'),\n            onClick: function (dialog, e) {\n              context.anchorChangeEl(id, parent, oldIdentifier);\n            }\n          },\n          {\n            text: app.translation.t('builder:chapters.deleteAnchor'),\n            onClick: function (dialog, e) {\n              context.anchorDelete(id, parent);\n            }\n          }\n        ],\n        verticalButtons: true\n      }).open();\n    },\n    anchorChangeEl: function (id, parentId, oldIdentifier) {\n      let app = this.$app;\n      let context = this;\n      let newId = '';\n      app.dialog.prompt(app.translation.t('builder:chapters.typeAnchorId') + ':', '', function (identifier) {\n        newId = identifier;\n        app.builder.chapters.changeAnchorId(id, parentId, newId);\n        ;\n        context.$setState({ categories: app.book.getBookChaptersTree() });\n      }, function () {\n        return false;\n      }, oldIdentifier);\n    },\n    anchorRename: function (id, parentId, oldName) {\n      let app = this.$app;\n      let context = this;\n      let name = '';\n      app.dialog.prompt(app.translation.t('builder:chapters.typeNewAnchorName') + ':', '', function (nameVal) {\n        name = nameVal;\n        name = name.replaceAll('\"', '');\n        app.builder.chapters.renameAnchor(id, parentId, name);\n        ;\n        context.$setState({ categories: app.book.getBookChaptersTree() });\n      }, function () {\n        return false;\n      }, oldName);\n    },\n    anchorDelete: function (id, parentId) {\n      let app = this.$app;\n      let context = this;\n      app.builder.chapters.deleteAnchor(id, parentId);\n      context.$setState({ categories: app.book.getBookChaptersTree() });\n      context.$tick(function () {\n        context.makeSortable();\n      });\n    },\n    makeSortable: function () {\n      let app = this.$app;\n      let context = this;\n      let $lists = null;\n      $lists = this.$el.find('.sortableChapters');\n      let $anchors = null;\n      $anchors = this.$el.find('.sortableAnchors');\n      for (var i = 0; i < $lists.length; i++) {\n        let sortable = sortable_esm[\"default\"].create($lists[i], {\n          handle: '.handle',\n          filter: '.ignore-sortable',\n          draggable: '.draggable-chapters',\n          group: {\n            name: 'menu',\n            pull: true,\n            put: true\n          },\n          removeCloneOnHide: true,\n          fallbackClass: 'sortable-fallback',\n          animation: 150,\n          swapThreshold: 0.65,\n          onAdd: async function (e) {\n            let self = this;\n            let sibling = $$(e.item).siblings('li')[0];\n            let itemId = $$(e.item).data('id');\n            let newParent = $$(sibling).data('parent');\n            let oldParent = $$(e.item).data('parent');\n            let newIndex = e.newDraggableIndex;\n            let oldIndex = e.oldDraggableIndex;\n            let chapter = app.builder.chapters.findChapterById(itemId);\n            if (newParent == undefined) {\n              let parent = $$(e.item).parents('li')[0];\n              newParent = $$(parent).data('id');\n            }\n            let chapters = app.builder.params.dataChapters;\n            await app.builder.chapters.moveChapter(newParent, newIndex, chapter, oldIndex, oldParent);\n            let leftView = app.views.get($$('.view-left'));\n            let path = '/builder-chapters/';\n            leftView.router.navigate(path, {\n              reloadCurrent: true,\n              ignoreCache: true\n            });\n          },\n          onUpdate: async function (e) {\n            let sibling = $$(e.item).siblings('li')[0];\n            let itemId = $$(e.item).data('id');\n            let newParent = $$(sibling).data('parent');\n            let oldParent = $$(e.item).data('parent');\n            let newIndex = e.newDraggableIndex;\n            let oldIndex = e.oldDraggableIndex;\n            let chapter = app.builder.chapters.findChapterById(itemId);\n            let chapters = app.builder.params.dataChapters;\n            await app.builder.chapters.moveChapter(newParent, newIndex, chapter, oldIndex, oldParent);\n            let leftView = app.views.get($$('.view-left'));\n            let path = '/builder-chapters/';\n            leftView.router.navigate(path, {\n              reloadCurrent: true,\n              ignoreCache: true\n            });\n          },\n          onSort: function (evt) {\n          }\n        });\n      }\n      for (let i = 0; i < $anchors.length; i++) {\n        let sortableAnchors = sortable_esm[\"default\"].create($anchors[i], {\n          handle: '.anchors-handle',\n          removeCloneOnHide: true,\n          fallbackClass: 'sortable-fallback',\n          draggable: '.draggable-anchors',\n          animation: 150,\n          swapThreshold: 0.65,\n          group: {\n            name: 'anchors',\n            pull: false,\n            put: false\n          },\n          onUpdate: async function (e) {\n            let id = $$(e.item).data('id');\n            let parent = $$(e.item).data('parent');\n            let newIndex = e.newDraggableIndex;\n            let oldIndex = e.oldDraggableIndex;\n            let chapter = app.builder.chapters.findChapterById(parent);\n            await app.builder.chapters.moveAnchor(id, parent, newIndex, oldIndex);\n            let leftView = app.views.get($$('.view-left'));\n            let path = '/builder-chapters/';\n            leftView.router.navigate(path, {\n              reloadCurrent: true,\n              ignoreCache: true\n            });\n          },\n          onSort: function (evt) {\n          }\n        });\n      }\n    },\n    reRender() {\n      let context = this;\n      let app = this.$app;\n      context.$setState({\n        categories: app.book.getBookChaptersTree(),\n        newCat: app.builder.params.dataChapters\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      this.makeSortable();\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '7f30ef0fca',\n  render() {\n    return `\n  <div class=\"page\">\n    <div class=\"navbar\">\n      <div class=\"navbar-bg\"></div>\n      <div class=\"navbar-inner sliding\">\n        <div class=\"left\">\n          <a href=\"#\" class=\"link back\">\n            <i class=\"icon icon-back\"></i>\n            <span class=\"ios-only\">${ this.$app.translation.t('back') }</span>\n          </a>\n        </div>\n        <div class=\"title\">${ this.$app.translation.t('builder:menu.chapters') }</div>\n      </div>\n    </div>\n    <div class=\"page-content\">\n      <div class=\"chapters-container\" id=\"editChapters\">\n        ${ this.render(this.newCat, null) }\n      </div>\n\n      <div class=\"list\">\n        <ul>\n          <li><a @click=\"add\" class=\"item-link list-button\" href=\"#\">+\n              ${ this.$app.translation.t('builder:chapters.add') }</a>\n          </li>\n        </ul>\n      </div>\n\n      <!--<div class=\"btn button\" @click=\"reRender\">-->\n      <!--RERENDER!-->\n      <!--</div>-->\n\n    </div>\n  </div>\n\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/templates/builder_history.f7.html\nvar builder_history_f7 = __webpack_require__(\"./src/core/custom_plugins/builder/templates/builder_history.f7.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_version_select.f7.es.html\n\n\n/* harmony default export */ var builder_version_select_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      versions: app.builder.versions.getVersionsList(),\n      currentVersion: app.builder.versions.currentVersion\n    };\n  },\n  methods: {\n    render: function (data) {\n      let context = this;\n      let app = context.$app;\n      let cls = ' ';\n      let d = ``;\n      d = `<div class=\"list\"> <ul>`;\n      data.forEach(version => {\n        let parent = null;\n        if (version.parentVersion) {\n          parent = _.find(data, o => {\n            return o.id === version.parentVersion['$oid'];\n          });\n        }\n        cls = '';\n        if (version.id == this.currentVersion) {\n          cls = 'selected';\n        }\n        d = d + `<li class=\"version-item ${ cls }\" data-id=\"${ version.id }\">\n                        <a href=\"#\" class=\"item-link item-content\" @click=\"contextMenu\">\n                            ${ version.public ? '<div class=\"item-media\"><i class=\"icon material-icons\">public</i></div>' : '' }\n                        <div class=\"item-inner\">\n                        <div class=\"item-title\">\n                            <div class=\"item-header\"> ${ version.final ? '<i class=\"icon material-icons\">lock</i>' : '' } ${ version.name }</div>\n\n                            <div class=\"item-date\">\n                                <div>\n                                    ${ parent ? '<i class=\\'icon material-icons\\'>undo</i> ' + parent.name : '<div>&nbsp</div>' }\n                                </div>\n                                <div>\n                                    <i class=\"icon material-icons\">today</i>${ version.create_date }\n                                </div>\n                            </div>\n                            <div class=\"item-footer\">\n                                <div>\n                                    <i class=\"icon material-icons\">account_circle</i> ${ version.user.name }\n                                </div>\n\n                            </div>\n                        </div>\n   `;\n        if (version.id == this.currentVersion) {\n          d += `\n                            <div class=\"item-after\">${ app.translation.t('builder:versionSelect.actual') }</div>\n                                                    </div>\n                                                </a>\n                            `;\n        } else {\n          d += `\n                            <div class=\"item-after\">${ app.translation.t('select') }</div>\n                                                    </div>\n                                                </a>\n                            `;\n        }\n        d = `${ d } </li>`;\n      });\n      d = `${ d }</ul></div>`;\n      return d;\n    },\n    contextMenu: function (event) {\n      let app = this.$app;\n      let context = this;\n      let $el = $$(event.target);\n      let $parent = $el.parents('.version-item');\n      let id = $parent.attr('data-id');\n      if (id == this.currentVersion) {\n        app.dialog.create({\n          title: app.translation.t('builder:versionSelect.selectOptions'),\n          text: app.translation.t('selectAction'),\n          closeByBackdropClick: true,\n          buttons: [{\n              text: app.translation.t('builder:versionSelect.publish'),\n              onClick: function (dialog, e) {\n                context.publicateVersion(event);\n              }\n            }],\n          verticalButtons: true\n        }).open();\n      } else {\n        app.dialog.create({\n          title: app.translation.t('builder:versionSelect.selectOptions'),\n          text: app.translation.t('selectAction'),\n          closeByBackdropClick: true,\n          buttons: [\n            {\n              text: app.translation.t('builder:versionSelect.edit'),\n              onClick: async function (dialog, e) {\n                await context.loadVersion(event);\n              }\n            },\n            {\n              text: app.translation.t('builder:versionSelect.publish'),\n              onClick: function (dialog, e) {\n                context.publicateVersion(event);\n              }\n            }\n          ],\n          verticalButtons: true\n        }).open();\n      }\n    },\n    publicateVersion(e) {\n      let context = this;\n      let app = context.$app;\n      let $el = $$(e.target);\n      let $parent = $el.parents('.version-item');\n      let id = $parent.attr('data-id');\n      app.dialog.create({\n        title: app.translation.t('builder:versionSelect.publication'),\n        text: app.translation.t('builder:versionSelect.publicationConfirm'),\n        closeByBackdropClick: true,\n        buttons: [\n          {\n            text: app.translation.t('cancel'),\n            onClick: function (dialog, e) {\n              dialog.close();\n            }\n          },\n          {\n            text: app.translation.t('yes'),\n            onClick: function (dialog, e) {\n              app.builder.versions.publicateVersion(id);\n            }\n          }\n        ]\n      }).open();\n    },\n    loadVersion(e) {\n      let context = this;\n      let app = context.$app;\n      let $el = $$(e.target);\n      let $parent = $el.parents('.version-item');\n      let id = $parent.attr('data-id');\n      app.dialog.create({\n        title: app.translation.t('builder:versionSelect.loadVersion'),\n        text: app.translation.t('builder:versionSelect.loadVersionConfirm'),\n        closeByBackdropClick: true,\n        buttons: [\n          {\n            text: app.translation.t('cancel'),\n            onClick: function (dialog, e) {\n              dialog.close();\n            }\n          },\n          {\n            text: app.translation.t('yes'),\n            onClick: async function (dialog, e) {\n              await app.builder.versions.loadVersion(id);\n              context.$setState({\n                versions: app.builder.versions.getVersionsList(),\n                currentVersion: app.builder.versions.currentVersion\n              });\n            }\n          }\n        ]\n      }).open();\n    },\n    createVersion() {\n      let context = this;\n      let app = context.$app;\n      let name = '';\n      app.dialog.prompt(app.translation.t('builder:versionSelect.typeVersionName') + ':', '', async function (nameVal) {\n        name = nameVal;\n        await app.builder.versions.createNewVersion(name);\n        context.$setState({\n          versions: app.builder.versions.getVersionsList(),\n          currentVersion: app.builder.versions.currentVersion\n        });\n      }, function () {\n        return false;\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let self = this;\n      app.data.myEvents.off('versions:added');\n      app.data.myEvents.on('versions:added', () => {\n        self.$setState({ versions: app.builder.versions.getVersionsList() });\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: 'acface7d69',\n  render() {\n    return `\n    <div class=\"page\">\n        <div class=\"navbar\">\n            <div class=\"navbar-bg\"></div>\n            <div class=\"navbar-inner sliding\">\n                <div class=\"left\">\n                    <a href=\"#\" class=\"link back\">\n                        <i class=\"icon icon-back\"></i>\n                        <span class=\"ios-only\">${ this.$app.translation.t('back') }</span>\n                    </a>\n                </div>\n                <div class=\"title\">${ this.$app.translation.t('builder:versionSelect.versionSelect') }</div>\n            </div>\n        </div>\n        <div class=\"page-content\">\n            ${ this.render(this.versions) }\n\n            <div class=\"list\">\n                <ul>\n                    <li><a @click=\"createVersion\" class=\"item-link list-button\" href=\"#\">+\n                            ${ this.$app.translation.t('builder:versionSelect.createNewVersion') }</a></li>\n                </ul>\n            </div>\n        </div>\n    </div>\n\n`;\n  },\n  style: `\n[data-f7-acface7d69] .item-inner {\n        padding-left: 10px;\n        margin: 0 !important;\n    }\n\n[data-f7-acface7d69] .item-media i {\n        font-size: 18px !important;\n    }\n\n[data-f7-acface7d69] .item-header {\n        font-weight: bold;\n        font-size: 1.1em;\n    }\n\n[data-f7-acface7d69] .item-date {\n        font-size: var(--f7-list-item-footer-font-size);\n        color: var(--f7-list-item-footer-text-color);\n    }\n\n[data-f7-acface7d69] .item-title i {\n        font-size: 14px;\n    }\n\n    .selected,\n    .selected .item-date,\n    .selected .item-after,\n    .selected .item-footer,\n    .selected i,\n[data-f7-acface7d69] .selected .item-inner::before {\n        color: var(--f7-theme-color) !important;\n    }\n\n[data-f7-acface7d69] .selected {\n        border-left: 4px solid var(--f7-theme-color);\n    }\n`,\n  styleScoped: true\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html\nvar citation_list_f7_es = __webpack_require__(\"./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-citations/templates/citation_popup.f7.es.html\n/* harmony default export */ var citation_popup_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      config: app.citations.standardFunctions.getStandard(),\n      counters: {},\n      popupEl: '',\n      citation: null\n    };\n  },\n  methods: {\n    getAttributes: function (attr) {\n      let app = this.$app;\n      let definition = [];\n      attr.forEach(attribute => {\n        definition.push(app.citations.attributes.getAttributesDefinition(attribute));\n      });\n      return definition;\n    },\n    createCitation: function (type) {\n      let app = this.$app;\n      let formId = '#' + type + '-form';\n      let formData = {};\n      let validity = $$(formId)[0].checkValidity();\n      if (!validity) {\n        return false;\n      }\n      if (type == 'note') {\n        let textEditor = app.textEditor.get('.note-citation-area');\n        formData['description'] = textEditor.getValue();\n        formData['type'] = type;\n        let fData = app.form.convertToData(formId);\n        if (fData.hasOwnProperty('apaRef')) {\n          formData['apaRef'] = fData.apaRef;\n        }\n      } else {\n        formData = app.form.convertToData(formId);\n        formData['type'] = type;\n        Object.keys(this.counters).forEach(function (key) {\n          let cls = '.' + key + '-input';\n          let inputs = $$(formId).find(cls);\n          let obj = {};\n          formData[key] = [];\n          let pair = 0;\n          inputs.forEach(el => {\n            let $el = $$(el);\n            if ($$(el).data('pair') == pair) {\n              obj[$el.data('key')] = $el.val();\n            } else {\n              formData[key].push(obj);\n              obj = {};\n              pair++;\n              obj[$el.data('key')] = $el.val();\n            }\n          });\n          formData[key].push(obj);\n        });\n      }\n      if (this.citation != null) {\n        formData['id'] = this.citation.id;\n        formData['position'] = this.citation.position;\n        formData['deleted'] = false;\n        let index = _.findIndex(app.citations.params.data, o => {\n          return o.id == formData['id'];\n        });\n        app.citations.params['data'][index] = formData;\n      } else {\n        let numId = _.maxBy(app.citations.params['data'], o => {\n          return o.id;\n        });\n        let pos = _.maxBy(app.citations.params['data'], o => {\n          if (!o.deleted) {\n            return o.position;\n          }\n        });\n        if (numId === null || numId === undefined) {\n          numId = 1;\n        } else {\n          numId = numId.id + 1;\n        }\n        if (pos === null || pos === undefined) {\n          pos = 1;\n        } else {\n          pos = pos.position + 1;\n        }\n        formData['id'] = numId;\n        formData['position'] = pos;\n        formData['deleted'] = false;\n        app.citations.params['data'].push(formData);\n      }\n      app.popup.get(this.popupEl).close();\n    },\n    getCounter: function (key) {\n      if (this.counters.hasOwnProperty(key)) {\n        return this.counters[key];\n      } else {\n        this.createCounter(key);\n        return this.counters[key];\n      }\n    },\n    createCounter: function (key) {\n      this.counters[key] = 1;\n    },\n    incrementCounter: function (e) {\n      let key = $$(e.target).data('key');\n      this.counters[key]++;\n      this.$setState({ counters: this.counters });\n    },\n    decrementCounter: function (e) {\n      let key = $$(e.target).data('key');\n      if (this.counters[key] > 1) {\n        this.counters[key]--;\n      }\n      this.$setState({ counters: this.counters });\n    },\n    loadData(type) {\n      let app = this.$app;\n      let self = this;\n      let formId = '#' + type + '-form';\n      if (type == 'note') {\n        let textEditor = app.textEditor.get('.note-citation-area');\n        textEditor.setValue(self.citation.description);\n        app.form.fillFromData(formId, self.citation);\n      } else {\n        Object.keys(this.counters).forEach(key => {\n          if (Array.isArray(self.citation[key])) {\n            self.counters[key] = self.citation[key].length;\n          }\n        });\n        app.form.fillFromData(formId, self.citation);\n      }\n    },\n    storno() {\n      let app = this.$app;\n      app.popup.get(this.popupEl).close();\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let self = this;\n      this.popupEl = $$('.popup-citations-create');\n      let edit = this.popupEl.data('edit');\n      let $textEditor = $$('.note-citation-area');\n      let textEditor = app.textEditor.create({\n        el: $textEditor,\n        mode: 'toolbar',\n        buttons: [[\n            'italic',\n            'link'\n          ]]\n      });\n      if (edit != undefined) {\n        this.citation = _.find(app.citations.params.data, o => {\n          return edit == o.id;\n        });\n        if (this.citation.type == 'range') {\n          let ref = this.citation.ref;\n          this.citation = _.find(app.citations.params.data, o => {\n            return ref == o.id;\n          });\n        }\n        let cfg = _.cloneDeep(app.citations.standardFunctions.getStandard());\n        let item = _.find(cfg.items, o => {\n          return o.key == self.citation.type;\n        });\n        cfg.items = [item];\n        self.$setState({ config: cfg });\n        self.loadData(self.citation.type);\n      }\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: 'f0f35029ce',\n  render() {\n    return `\n    <div class=\"create-citation page\">\n        <div class=\"toolbar tabbar toolbar-top\">\n            <div class=\"toolbar-inner\">\n                ${ this.config.items.map((cfg, firstIndex) => `\n                ${ this.citation == null && cfg.key == 'none' ? '' : ` <a href=\"#${ cfg.key }\"\n                    class=\"tab-link ${ firstIndex == 0 ? 'tab-link-active' : '' }\">${ cfg.name() }</a>` }\n                `).join('') }\n            </div>\n        </div>\n        <div class=\"tabs-animated-wrap\">\n            <div class=\"tabs\">\n                ${ this.config.items.map((cfg, i) => `\n                <div id=\"${ cfg.key }\" class=\"tab ${ i == 0 ? 'tab-active' : '' }\">\n                    <div class=\"block\">\n                        <form class=\"list inline-labels no-hairlines citation-form\" id=\"${ cfg.key }-form\">\n                            <ul>\n                                ${ this.getAttributes(cfg.items).map(el => `\n                                ${ el.hasOwnProperty('items') ? `\n                                <li class=\"item-content list-block-start\">\n                                    <div class=\"item-inner no-line-after\">\n                                        <strong class=\"list-block-name\">${ el.name() }</strong>\n                                    </div>\n                                </li>\n                                ${ Array(this.getCounter(el.key)).join(0).split(0).map((it, i) => `\n                                <li class=\"item-content\">\n                                    <div class=\"item-inner no-line-after\">\n                                        <div class=\"row\" style=\"width: 100%\">\n                                            ${ el.items.map(inner => `\n                                            <div class=\"col-50 item-input\">\n                                                <div class=\"item-title item-label\">${ inner.label() }</div>\n                                                <div class=\"item-input-wrap \">\n                                                    <input class=\"${ el.key }-input\" data-key=\"${ inner.key }\"\n                                                        key=\"${ inner.key }\" data-pair=\"${ i }\" type=\"${ inner.type }\"\n                                                        placeholder=\"${ inner.label() }\"\n                                                        value=\"${ this.citation != null && Array.isArray(this.citation[el.key]) && this.citation[el.key].length > i ? `${ this.citation[el.key][i][inner.key] }` : `` }\">\n                                                    <span class=\"input-clear-button\"></span>\n                                                </div>\n                                            </div>\n                                            `).join('') }\n                                        </div>\n                                    </div>\n                                </li>\n                                `).join('') }\n                                <li\n                                    class=\"item-content ${ JSON.stringify(this.getAttributes(cfg.items)).includes('authorsCol') ? '' : 'list-block-end' }\">\n                                    <div class=\"item-inner no-line-after\">\n                                        <div class=\"row\" style=\"width: 100%\">\n                                            <div class=\"col-50\">\n                                                <div class=\"button\" data-key=\"${ el.key }\" @click=\"decrementCounter\"><i\n                                                        class=\"icon material-icons\">remove_circle_outline</i>\n                                                    ${ el.removeText() }\n                                                </div>\n                                            </div>\n                                            <div class=\"col-50\">\n                                                <div class=\"button\" data-key=\"${ el.key }\" @click=\"incrementCounter\"><i\n                                                        class=\"icon material-icons\">add_circle_outline</i>\n                                                    ${ el.addNextText() }\n                                                </div>\n                                            </div>\n\n                                        </div>\n                                    </div>\n                                </li>\n                                ` : `\n                                <li class=\"item-content ${ el.type == 'bool' ? '' : 'item-input' } ${ el.key == 'authorsCol' ? 'list-block-end' : '' }\"\n                                    key=\"${ el.key }\">\n                                    <div class=\"item-inner\">\n                                        ${ el.type == 'textarea' ? `\n                                        <div class=\"item-input\" style=\"width: 100%;\">\n                                            <div class=\"item-title item-label\">${ el.label() }</div>\n                                            <div class=\"item-input-wrap\">\n                                                <div class=\"note-citation-area\"></div>\n                                            </div>\n                                        </div>\n\n                                        ` : `` }\n                                        ${ el.type == 'text' || el.type == 'number' ? `\n                                        <div class=\"item-title item-label\">${ el.label() }</div>\n                                        <div class=\"item-input-wrap\">\n                                            <input name=\"${ el.key }\" id=\"${ el.key }\" type=\"${ el.type }\"\n                                                placeholder=\"${ el.label() }\" ${ el.validation.hasOwnProperty('required') && el.validation.required ? 'required validate' : '' }>\n                                            <span class=\"input-clear-button\"></span>\n                                        </div>\n                                        ` : `` }\n                                        ${ el.type == 'bool' ? `\n                                        <label class=\"item-checkbox item-content\">\n                                            <div class=\"item-inner\">\n                                                <div class=\"item-title\">${ el.label() }</div>\n                                            </div>\n                                            <input type=\"checkbox\" name=\"${ el.key }\" id=\"${ el.key }\">\n                                            <i class=\" icon icon-checkbox\"></i>\n\n                                        </label>\n                                        ` : `` }\n\n                                    </div>\n\n                                </li>\n                                ` }\n                                `).join('') }\n                            </ul>\n                        </form>\n                        <div class=\"list no-hairlines\">\n                            <ul class=\"button-list\">\n                                <li class=\"item-content\">\n                                    <div class=\"item-inner no-line-after\">\n                                        <div class=\"row\" style=\"width: 100%\">\n                                            <div class=\"col-50\">\n                                                <div class=\"button button-fill\" data-type=\"${ cfg.key }\" @click=\"storno\">\n                                                    <i class=\"icon material-icons\">clear</i>\n                                                    Storno\n                                                </div>\n                                            </div>\n                                            <div class=\"col-50\">\n                                                <div class=\"button button-fill\" data-type=\"${ cfg.key }\"\n                                                    @click=\"createCitation('${ cfg.key }')\"><i\n                                                        class=\"icon material-icons\">\n                                                        ${ this.citation == null ? 'add_circle' : 'edit' }</i>\n                                                    ${ this.citation == null ? `${ this.$app.translation.t('citations:list.addCtiation') }` : `${ this.$app.translation.t('citations:list.editCitation') }` }\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n\n                                </li>\n                                <li class=\"item-content\">\n                                    <div class=\"item-inner\">\n                                        <div class=\"item-after\">\n\n                                        </div>\n                                    </div>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                </div>\n                `).join('') }\n            </div>\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-equation/templates/equation_editor.f7.es.html\n\n/* harmony default export */ var equation_editor_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let params = this.$f7.views.equation.params;\n    return { eqContent: params.eqContent };\n  },\n  methods: {},\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n      let $container = $block.find('.text-area-container');\n      let $vzorec = $block.find('.katex-container');\n      $container.on('input', e => {\n        let katexEquationTextRendered;\n        try {\n          katexEquationTextRendered = katex_default.a.renderToString(e.target.value, {\n            throwOnError: true,\n            displayMode: false\n          });\n        } catch (err) {\n          katexEquationTextRendered = app.translation.t('builder:content.eqErr');\n        }\n        $vzorec.html(katexEquationTextRendered);\n      });\n      if (this.eqContent.length > 0) {\n        $container.val(this.eqContent);\n        $container[0].dispatchEvent(new Event('input'));\n      }\n      $block.find('.eq-add').on('click', e => {\n        if ($container[0].value.length > 0) {\n          let val = $container[0].value;\n          let res = app.equation.replaceWhiteSpaces(val);\n          app.data.myEvents.emit('equation:useEquation', res);\n        } else {\n          app.data.myEvents.emit('equation:useEquation', '');\n        }\n      });\n    }\n  },\n  id: '9bda1b1cc0',\n  render() {\n    return `\n    <div class=\"create-equation page\">\n        <div class=\"block\">\n            <div class=\"block-header\">Informace</div>\n            <p>\n                ${ this.$app.translation.t('builder:content.eqText') }\n            </p>\n            <div class=\"block-footer\">\n\n            </div>\n        </div>\n\n        <div class=\"block\">\n\n\n            ${ this.$app.translation.t('builder:content.eqTex') }\n            <textarea class=\"text-area-container resizable\"></textarea>\n            <br />\n            <br />\n            <div class=\"katex-container\">\n\n            </div>\n            <br />\n            <br />\n            <button class=\"eq-add button button-fill\">${ this.$app.translation.t('builder:content.eqAdd') }</button>\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-icons/templates/icon_picker.f7.es.html\n\n/* harmony default export */ var icon_picker_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let params = this.$f7.views.icons.params;\n    return {\n      materialIcons: [\n        '3d_rotation',\n        'ac_unit',\n        'access_alarm',\n        'access_alarms',\n        'access_time',\n        'accessibility',\n        'accessible',\n        'account_balance',\n        'account_balance_wallet',\n        'account_box',\n        'account_circle',\n        'adb',\n        'add',\n        'add_a_photo',\n        'add_alarm',\n        'add_alert',\n        'add_box',\n        'add_circle',\n        'add_circle_outline',\n        'add_location',\n        'add_shopping_cart',\n        'add_to_photos',\n        'add_to_queue',\n        'adjust',\n        'airline_seat_flat',\n        'airline_seat_flat_angled',\n        'airline_seat_individual_suite',\n        'airline_seat_legroom_extra',\n        'airline_seat_legroom_normal',\n        'airline_seat_legroom_reduced',\n        'airline_seat_recline_extra',\n        'airline_seat_recline_normal',\n        'airplanemode_active',\n        'airplanemode_inactive',\n        'airplay',\n        'airport_shuttle',\n        'alarm',\n        'alarm_add',\n        'alarm_off',\n        'alarm_on',\n        'album',\n        'all_inclusive',\n        'all_out',\n        'android',\n        'announcement',\n        'apps',\n        'archive',\n        'arrow_back',\n        'arrow_downward',\n        'arrow_drop_down',\n        'arrow_drop_down_circle',\n        'arrow_drop_up',\n        'arrow_forward',\n        'arrow_upward',\n        'art_track',\n        'aspect_ratio',\n        'assessment',\n        'assignment',\n        'assignment_ind',\n        'assignment_late',\n        'assignment_return',\n        'assignment_returned',\n        'assignment_turned_in',\n        'assistant',\n        'assistant_photo',\n        'attach_file',\n        'attach_money',\n        'attachment',\n        'audiotrack',\n        'autorenew',\n        'av_timer',\n        'backspace',\n        'backup',\n        'battery_alert',\n        'battery_charging_full',\n        'battery_full',\n        'battery_std',\n        'battery_unknown',\n        'beach_access',\n        'beenhere',\n        'block',\n        'bluetooth',\n        'bluetooth_audio',\n        'bluetooth_connected',\n        'bluetooth_disabled',\n        'bluetooth_searching',\n        'blur_circular',\n        'blur_linear',\n        'blur_off',\n        'blur_on',\n        'book',\n        'bookmark',\n        'bookmark_border',\n        'border_all',\n        'border_bottom',\n        'border_clear',\n        'border_color',\n        'border_horizontal',\n        'border_inner',\n        'border_left',\n        'border_outer',\n        'border_right',\n        'border_style',\n        'border_top',\n        'border_vertical',\n        'branding_watermark',\n        'brightness_1',\n        'brightness_2',\n        'brightness_3',\n        'brightness_4',\n        'brightness_5',\n        'brightness_6',\n        'brightness_7',\n        'brightness_auto',\n        'brightness_high',\n        'brightness_low',\n        'brightness_medium',\n        'broken_image',\n        'brush',\n        'bubble_chart',\n        'bug_report',\n        'build',\n        'burst_mode',\n        'business',\n        'business_center',\n        'cached',\n        'cake',\n        'call',\n        'call_end',\n        'call_made',\n        'call_merge',\n        'call_missed',\n        'call_missed_outgoing',\n        'call_received',\n        'call_split',\n        'call_to_action',\n        'camera',\n        'camera_alt',\n        'camera_enhance',\n        'camera_front',\n        'camera_rear',\n        'camera_roll',\n        'cancel',\n        'card_giftcard',\n        'card_membership',\n        'card_travel',\n        'casino',\n        'cast',\n        'cast_connected',\n        'center_focus_strong',\n        'center_focus_weak',\n        'change_history',\n        'chat',\n        'chat_bubble',\n        'chat_bubble_outline',\n        'check',\n        'check_box',\n        'check_box_outline_blank',\n        'check_circle',\n        'chevron_left',\n        'chevron_right',\n        'child_care',\n        'child_friendly',\n        'chrome_reader_mode',\n        'class',\n        'clear',\n        'clear_all',\n        'close',\n        'closed_caption',\n        'cloud',\n        'cloud_circle',\n        'cloud_done',\n        'cloud_download',\n        'cloud_off',\n        'cloud_queue',\n        'cloud_upload',\n        'code',\n        'collections',\n        'collections_bookmark',\n        'color_lens',\n        'colorize',\n        'comment',\n        'compare',\n        'compare_arrows',\n        'computer',\n        'confirmation_number',\n        'contact_mail',\n        'contact_phone',\n        'contacts',\n        'content_copy',\n        'content_cut',\n        'content_paste',\n        'control_point',\n        'control_point_duplicate',\n        'copyright',\n        'create',\n        'create_new_folder',\n        'credit_card',\n        'crop',\n        'crop_16_9',\n        'crop_3_2',\n        'crop_5_4',\n        'crop_7_5',\n        'crop_din',\n        'crop_free',\n        'crop_landscape',\n        'crop_original',\n        'crop_portrait',\n        'crop_rotate',\n        'crop_square',\n        'dashboard',\n        'data_usage',\n        'date_range',\n        'dehaze',\n        'delete',\n        'delete_forever',\n        'delete_sweep',\n        'description',\n        'desktop_mac',\n        'desktop_windows',\n        'details',\n        'developer_board',\n        'developer_mode',\n        'device_hub',\n        'devices',\n        'devices_other',\n        'dialer_sip',\n        'dialpad',\n        'directions',\n        'directions_bike',\n        'directions_boat',\n        'directions_bus',\n        'directions_car',\n        'directions_railway',\n        'directions_run',\n        'directions_subway',\n        'directions_transit',\n        'directions_walk',\n        'disc_full',\n        'dns',\n        'do_not_disturb',\n        'do_not_disturb_alt',\n        'do_not_disturb_off',\n        'do_not_disturb_on',\n        'dock',\n        'domain',\n        'done',\n        'done_all',\n        'donut_large',\n        'donut_small',\n        'drafts',\n        'drag_handle',\n        'drive_eta',\n        'dvr',\n        'edit',\n        'edit_location',\n        'eject',\n        'email',\n        'enhanced_encryption',\n        'equalizer',\n        'error',\n        'error_outline',\n        'euro_symbol',\n        'ev_station',\n        'event',\n        'event_available',\n        'event_busy',\n        'event_note',\n        'event_seat',\n        'exit_to_app',\n        'expand_less',\n        'expand_more',\n        'explicit',\n        'explore',\n        'exposure',\n        'exposure_neg_1',\n        'exposure_neg_2',\n        'exposure_plus_1',\n        'exposure_plus_2',\n        'exposure_zero',\n        'extension',\n        'face',\n        'fast_forward',\n        'fast_rewind',\n        'favorite',\n        'favorite_border',\n        'featured_play_list',\n        'featured_video',\n        'feedback',\n        'fiber_dvr',\n        'fiber_manual_record',\n        'fiber_new',\n        'fiber_pin',\n        'fiber_smart_record',\n        'file_download',\n        'file_upload',\n        'filter',\n        'filter_1',\n        'filter_2',\n        'filter_3',\n        'filter_4',\n        'filter_5',\n        'filter_6',\n        'filter_7',\n        'filter_8',\n        'filter_9',\n        'filter_9_plus',\n        'filter_b_and_w',\n        'filter_center_focus',\n        'filter_drama',\n        'filter_frames',\n        'filter_hdr',\n        'filter_list',\n        'filter_none',\n        'filter_tilt_shift',\n        'filter_vintage',\n        'find_in_page',\n        'find_replace',\n        'fingerprint',\n        'first_page',\n        'fitness_center',\n        'flag',\n        'flare',\n        'flash_auto',\n        'flash_off',\n        'flash_on',\n        'flight',\n        'flight_land',\n        'flight_takeoff',\n        'flip',\n        'flip_to_back',\n        'flip_to_front',\n        'folder',\n        'folder_open',\n        'folder_shared',\n        'folder_special',\n        'font_download',\n        'format_align_center',\n        'format_align_justify',\n        'format_align_left',\n        'format_align_right',\n        'format_bold',\n        'format_clear',\n        'format_color_fill',\n        'format_color_reset',\n        'format_color_text',\n        'format_indent_decrease',\n        'format_indent_increase',\n        'format_italic',\n        'format_line_spacing',\n        'format_list_bulleted',\n        'format_list_numbered',\n        'format_paint',\n        'format_quote',\n        'format_shapes',\n        'format_size',\n        'format_strikethrough',\n        'format_textdirection_l_to_r',\n        'format_textdirection_r_to_l',\n        'format_underlined',\n        'forum',\n        'forward',\n        'forward_10',\n        'forward_30',\n        'forward_5',\n        'free_breakfast',\n        'fullscreen',\n        'fullscreen_exit',\n        'functions',\n        'g_translate',\n        'gamepad',\n        'games',\n        'gavel',\n        'gesture',\n        'get_app',\n        'gif',\n        'golf_course',\n        'gps_fixed',\n        'gps_not_fixed',\n        'gps_off',\n        'grade',\n        'gradient',\n        'grain',\n        'graphic_eq',\n        'grid_off',\n        'grid_on',\n        'group',\n        'group_add',\n        'group_work',\n        'hd',\n        'hdr_off',\n        'hdr_on',\n        'hdr_strong',\n        'hdr_weak',\n        'headset',\n        'headset_mic',\n        'healing',\n        'hearing',\n        'help',\n        'help_outline',\n        'high_quality',\n        'highlight',\n        'highlight_off',\n        'history',\n        'home',\n        'hot_tub',\n        'hotel',\n        'hourglass_empty',\n        'hourglass_full',\n        'http',\n        'https',\n        'image',\n        'image_aspect_ratio',\n        'import_contacts',\n        'import_export',\n        'important_devices',\n        'inbox',\n        'indeterminate_check_box',\n        'info',\n        'info_outline',\n        'input',\n        'insert_chart',\n        'insert_comment',\n        'insert_drive_file',\n        'insert_emoticon',\n        'insert_invitation',\n        'insert_link',\n        'insert_photo',\n        'invert_colors',\n        'invert_colors_off',\n        'iso',\n        'keyboard',\n        'keyboard_arrow_down',\n        'keyboard_arrow_left',\n        'keyboard_arrow_right',\n        'keyboard_arrow_up',\n        'keyboard_backspace',\n        'keyboard_capslock',\n        'keyboard_hide',\n        'keyboard_return',\n        'keyboard_tab',\n        'keyboard_voice',\n        'kitchen',\n        'label',\n        'label_outline',\n        'landscape',\n        'language',\n        'laptop',\n        'laptop_chromebook',\n        'laptop_mac',\n        'laptop_windows',\n        'last_page',\n        'launch',\n        'layers',\n        'layers_clear',\n        'leak_add',\n        'leak_remove',\n        'lens',\n        'library_add',\n        'library_books',\n        'library_music',\n        'lightbulb_outline',\n        'line_style',\n        'line_weight',\n        'linear_scale',\n        'link',\n        'linked_camera',\n        'list',\n        'live_help',\n        'live_tv',\n        'local_activity',\n        'local_airport',\n        'local_atm',\n        'local_bar',\n        'local_cafe',\n        'local_car_wash',\n        'local_convenience_store',\n        'local_dining',\n        'local_drink',\n        'local_florist',\n        'local_gas_station',\n        'local_grocery_store',\n        'local_hospital',\n        'local_hotel',\n        'local_laundry_service',\n        'local_library',\n        'local_mall',\n        'local_movies',\n        'local_offer',\n        'local_parking',\n        'local_pharmacy',\n        'local_phone',\n        'local_pizza',\n        'local_play',\n        'local_post_office',\n        'local_printshop',\n        'local_see',\n        'local_shipping',\n        'local_taxi',\n        'location_city',\n        'location_disabled',\n        'location_off',\n        'location_on',\n        'location_searching',\n        'lock',\n        'lock_open',\n        'lock_outline',\n        'looks',\n        'looks_3',\n        'looks_4',\n        'looks_5',\n        'looks_6',\n        'looks_one',\n        'looks_two',\n        'loop',\n        'loupe',\n        'low_priority',\n        'loyalty',\n        'mail',\n        'mail_outline',\n        'map',\n        'markunread',\n        'markunread_mailbox',\n        'memory',\n        'menu',\n        'merge_type',\n        'message',\n        'mic',\n        'mic_none',\n        'mic_off',\n        'mms',\n        'mode_comment',\n        'mode_edit',\n        'monetization_on',\n        'money_off',\n        'monochrome_photos',\n        'mood',\n        'mood_bad',\n        'more',\n        'more_horiz',\n        'more_vert',\n        'motorcycle',\n        'mouse',\n        'move_to_inbox',\n        'movie',\n        'movie_creation',\n        'movie_filter',\n        'multiline_chart',\n        'music_note',\n        'music_video',\n        'my_location',\n        'nature',\n        'nature_people',\n        'navigate_before',\n        'navigate_next',\n        'navigation',\n        'near_me',\n        'network_cell',\n        'network_check',\n        'network_locked',\n        'network_wifi',\n        'new_releases',\n        'next_week',\n        'nfc',\n        'no_encryption',\n        'no_sim',\n        'not_interested',\n        'note',\n        'note_add',\n        'notifications',\n        'notifications_active',\n        'notifications_none',\n        'notifications_off',\n        'notifications_paused',\n        'offline_pin',\n        'ondemand_video',\n        'opacity',\n        'open_in_browser',\n        'open_in_new',\n        'open_with',\n        'pages',\n        'pageview',\n        'palette',\n        'pan_tool',\n        'panorama',\n        'panorama_fish_eye',\n        'panorama_horizontal',\n        'panorama_vertical',\n        'panorama_wide_angle',\n        'party_mode',\n        'pause',\n        'pause_circle_filled',\n        'pause_circle_outline',\n        'payment',\n        'people',\n        'people_outline',\n        'perm_camera_mic',\n        'perm_contact_calendar',\n        'perm_data_setting',\n        'perm_device_information',\n        'perm_identity',\n        'perm_media',\n        'perm_phone_msg',\n        'perm_scan_wifi',\n        'person',\n        'person_add',\n        'person_outline',\n        'person_pin',\n        'person_pin_circle',\n        'personal_video',\n        'pets',\n        'phone',\n        'phone_android',\n        'phone_bluetooth_speaker',\n        'phone_forwarded',\n        'phone_in_talk',\n        'phone_iphone',\n        'phone_locked',\n        'phone_missed',\n        'phone_paused',\n        'phonelink',\n        'phonelink_erase',\n        'phonelink_lock',\n        'phonelink_off',\n        'phonelink_ring',\n        'phonelink_setup',\n        'photo',\n        'photo_album',\n        'photo_camera',\n        'photo_filter',\n        'photo_library',\n        'photo_size_select_actual',\n        'photo_size_select_large',\n        'photo_size_select_small',\n        'picture_as_pdf',\n        'picture_in_picture',\n        'picture_in_picture_alt',\n        'pie_chart',\n        'pie_chart_outlined',\n        'pin_drop',\n        'place',\n        'play_arrow',\n        'play_circle_filled',\n        'play_circle_outline',\n        'play_for_work',\n        'playlist_add',\n        'playlist_add_check',\n        'playlist_play',\n        'plus_one',\n        'poll',\n        'polymer',\n        'pool',\n        'portable_wifi_off',\n        'portrait',\n        'power',\n        'power_input',\n        'power_settings_new',\n        'pregnant_woman',\n        'present_to_all',\n        'print',\n        'priority_high',\n        'public',\n        'publish',\n        'query_builder',\n        'question_answer',\n        'queue',\n        'queue_music',\n        'queue_play_next',\n        'radio',\n        'radio_button_checked',\n        'radio_button_unchecked',\n        'rate_review',\n        'receipt',\n        'recent_actors',\n        'record_voice_over',\n        'redeem',\n        'redo',\n        'refresh',\n        'remove',\n        'remove_circle',\n        'remove_circle_outline',\n        'remove_from_queue',\n        'remove_red_eye',\n        'remove_shopping_cart',\n        'reorder',\n        'repeat',\n        'repeat_one',\n        'replay',\n        'replay_10',\n        'replay_30',\n        'replay_5',\n        'reply',\n        'reply_all',\n        'report',\n        'report_problem',\n        'restaurant',\n        'restaurant_menu',\n        'restore',\n        'restore_page',\n        'ring_volume',\n        'room',\n        'room_service',\n        'rotate_90_degrees_ccw',\n        'rotate_left',\n        'rotate_right',\n        'rounded_corner',\n        'router',\n        'rowing',\n        'rss_feed',\n        'rv_hookup',\n        'satellite',\n        'save',\n        'scanner',\n        'schedule',\n        'school',\n        'screen_lock_landscape',\n        'screen_lock_portrait',\n        'screen_lock_rotation',\n        'screen_rotation',\n        'screen_share',\n        'sd_card',\n        'sd_storage',\n        'search',\n        'security',\n        'select_all',\n        'send',\n        'sentiment_dissatisfied',\n        'sentiment_neutral',\n        'sentiment_satisfied',\n        'sentiment_very_dissatisfied',\n        'sentiment_very_satisfied',\n        'settings',\n        'settings_applications',\n        'settings_backup_restore',\n        'settings_bluetooth',\n        'settings_brightness',\n        'settings_cell',\n        'settings_ethernet',\n        'settings_input_antenna',\n        'settings_input_component',\n        'settings_input_composite',\n        'settings_input_hdmi',\n        'settings_input_svideo',\n        'settings_overscan',\n        'settings_phone',\n        'settings_power',\n        'settings_remote',\n        'settings_system_daydream',\n        'settings_voice',\n        'share',\n        'shop',\n        'shop_two',\n        'shopping_basket',\n        'shopping_cart',\n        'short_text',\n        'show_chart',\n        'shuffle',\n        'signal_cellular_4_bar',\n        'signal_cellular_connected_no_internet_4_bar',\n        'signal_cellular_no_sim',\n        'signal_cellular_null',\n        'signal_cellular_off',\n        'signal_wifi_4_bar',\n        'signal_wifi_4_bar_lock',\n        'signal_wifi_off',\n        'sim_card',\n        'sim_card_alert',\n        'skip_next',\n        'skip_previous',\n        'slideshow',\n        'slow_motion_video',\n        'smartphone',\n        'smoke_free',\n        'smoking_rooms',\n        'sms',\n        'sms_failed',\n        'snooze',\n        'sort',\n        'sort_by_alpha',\n        'spa',\n        'space_bar',\n        'speaker',\n        'speaker_group',\n        'speaker_notes',\n        'speaker_notes_off',\n        'speaker_phone',\n        'spellcheck',\n        'star',\n        'star_border',\n        'star_half',\n        'stars',\n        'stay_current_landscape',\n        'stay_current_portrait',\n        'stay_primary_landscape',\n        'stay_primary_portrait',\n        'stop',\n        'stop_screen_share',\n        'storage',\n        'store',\n        'store_mall_directory',\n        'straighten',\n        'streetview',\n        'strikethrough_s',\n        'style',\n        'subdirectory_arrow_left',\n        'subdirectory_arrow_right',\n        'subject',\n        'subscriptions',\n        'subtitles',\n        'subway',\n        'supervisor_account',\n        'surround_sound',\n        'swap_calls',\n        'swap_horiz',\n        'swap_vert',\n        'swap_vertical_circle',\n        'switch_camera',\n        'switch_video',\n        'sync',\n        'sync_disabled',\n        'sync_problem',\n        'system_update',\n        'system_update_alt',\n        'tab',\n        'tab_unselected',\n        'tablet',\n        'tablet_android',\n        'tablet_mac',\n        'tag_faces',\n        'tap_and_play',\n        'terrain',\n        'text_fields',\n        'text_format',\n        'textsms',\n        'texture',\n        'theaters',\n        'thumb_down',\n        'thumb_up',\n        'thumbs_up_down',\n        'time_to_leave',\n        'timelapse',\n        'timeline',\n        'timer',\n        'timer_10',\n        'timer_3',\n        'timer_off',\n        'title',\n        'toc',\n        'today',\n        'toll',\n        'tonality',\n        'touch_app',\n        'toys',\n        'track_changes',\n        'traffic',\n        'train',\n        'tram',\n        'transfer_within_a_station',\n        'transform',\n        'translate',\n        'trending_down',\n        'trending_flat',\n        'trending_up',\n        'tune',\n        'turned_in',\n        'turned_in_not',\n        'tv',\n        'unarchive',\n        'undo',\n        'unfold_less',\n        'unfold_more',\n        'update',\n        'usb',\n        'verified_user',\n        'vertical_align_bottom',\n        'vertical_align_center',\n        'vertical_align_top',\n        'vibration',\n        'video_call',\n        'video_label',\n        'video_library',\n        'videocam',\n        'videocam_off',\n        'videogame_asset',\n        'view_agenda',\n        'view_array',\n        'view_carousel',\n        'view_column',\n        'view_comfy',\n        'view_compact',\n        'view_day',\n        'view_headline',\n        'view_list',\n        'view_module',\n        'view_quilt',\n        'view_stream',\n        'view_week',\n        'vignette',\n        'visibility',\n        'visibility_off',\n        'voice_chat',\n        'voicemail',\n        'volume_down',\n        'volume_mute',\n        'volume_off',\n        'volume_up',\n        'vpn_key',\n        'vpn_lock',\n        'wallpaper',\n        'warning',\n        'watch',\n        'watch_later',\n        'wb_auto',\n        'wb_cloudy',\n        'wb_incandescent',\n        'wb_iridescent',\n        'wb_sunny',\n        'wc',\n        'web',\n        'web_asset',\n        'weekend',\n        'whatshot',\n        'widgets',\n        'wifi',\n        'wifi_lock',\n        'wifi_tethering',\n        'work',\n        'wrap_text',\n        'youtube_searched_for',\n        'zoom_in',\n        'zoom_out',\n        'zoom_out_map'\n      ],\n      f7icons: [\n        'abc',\n        'abc_square',\n        'abc_square_fill',\n        'add',\n        'add_round',\n        'add_round_fill',\n        'alarm',\n        'alarm_fill',\n        'albums',\n        'albums_fill',\n        'alert',\n        'alert_fill',\n        'arrow_down',\n        'arrow_down_round_fill',\n        'arrow_left',\n        'arrow_left_round_fill',\n        'arrow_right',\n        'arrow_right_round_fill',\n        'arrow_up',\n        'arrow_up_round_fill',\n        'at',\n        'at_round',\n        'at_round_fill',\n        'attachment',\n        'bag',\n        'bag_fill',\n        'barcode',\n        'barcode_fill',\n        'bars',\n        'bars_chart',\n        'bars_chart_round',\n        'bars_chart_round_fill',\n        'bars_chart_square',\n        'bars_chart_square_fill',\n        'bell',\n        'bell_fill',\n        'bell_off',\n        'bitcoin',\n        'bitcoin_round',\n        'bitcoin_round_fill',\n        'bolt',\n        'bolt_fill',\n        'bolt_round',\n        'bolt_round_fill',\n        'book',\n        'book_fill',\n        'bookmark',\n        'bookmark_fill',\n        'box',\n        'box_fill',\n        'briefcase',\n        'briefcase_fill',\n        'bulb',\n        'bulb_fill',\n        'business',\n        'business_fill',\n        'calendar',\n        'calendar_fill',\n        'calendar_today',\n        'calendar_today_fill',\n        'camera',\n        'camera_fill',\n        'camera_round',\n        'camera_round_fill',\n        'card',\n        'card_fill',\n        'cat',\n        'chat',\n        'chat_bubble',\n        'chat_bubble_fill',\n        'chat_fill',\n        'check',\n        'check_round',\n        'check_round_fill',\n        'chevron_down',\n        'chevron_down_round',\n        'chevron_down_round_fill',\n        'chevron_left',\n        'chevron_left_round',\n        'chevron_left_round_fill',\n        'chevron_right',\n        'chevron_right_round',\n        'chevron_right_round_fill',\n        'chevron_up',\n        'chevron_up_round',\n        'chevron_up_round_fill',\n        'circle',\n        'circle_fill',\n        'circle_half',\n        'close',\n        'close_round',\n        'close_round_fill',\n        'cloud',\n        'cloud_download',\n        'cloud_download_fill',\n        'cloud_fill',\n        'cloud_upload',\n        'cloud_upload_fill',\n        'collection',\n        'collection_fill',\n        'color_filter',\n        'color_filter_fill',\n        'compass',\n        'compass_fill',\n        'compose',\n        'compose_fill',\n        'data',\n        'data_fill',\n        'delete',\n        'delete_round',\n        'delete_round_fill',\n        'desktop',\n        'document',\n        'document_chart',\n        'document_chart_fill',\n        'document_check',\n        'document_check_fill',\n        'document_fill',\n        'document_person',\n        'document_person_fill',\n        'document_text',\n        'document_text_fill',\n        'dog',\n        'download',\n        'download_fill',\n        'download_round',\n        'download_round_fill',\n        'drawer',\n        'drawer_fill',\n        'drawers',\n        'drawers_fill',\n        'edit',\n        'email',\n        'email_fill',\n        'enter',\n        'enter_fill',\n        'enter_round',\n        'enter_round_fill',\n        'exit',\n        'exit_fill',\n        'exit_round',\n        'exit_round_fill',\n        'expand',\n        'eye',\n        'eye_fill',\n        'eye_off',\n        'fastforward',\n        'fastforward_fill',\n        'fastforward_round',\n        'fastforward_round_fill',\n        'favorites',\n        'favorites_alt',\n        'favorites_alt_fill',\n        'favorites_fill',\n        'film',\n        'film_fill',\n        'filter',\n        'fire',\n        'fire_fill',\n        'flag',\n        'flag_fill',\n        'folder',\n        'folder_fill',\n        'forward',\n        'forward_fill',\n        'gamepad',\n        'gear',\n        'gear_fill',\n        'gift',\n        'gift_fill',\n        'graph_round',\n        'graph_round_fill',\n        'graph_square',\n        'graph_square_fill',\n        'hand',\n        'hand_alt',\n        'heart',\n        'heart_fill',\n        'help',\n        'help_round',\n        'help_round_fill',\n        'home',\n        'home_fill',\n        'images',\n        'images_fill',\n        'infinite',\n        'info',\n        'info_round',\n        'info_round_fill',\n        'keyboard',\n        'keyboard_fill',\n        'laptop',\n        'layers',\n        'layers_alt',\n        'layers_alt_fill',\n        'layers_fill',\n        'library',\n        'library_fill',\n        'link',\n        'list',\n        'list_fill',\n        'lock',\n        'lock_fill',\n        'logo_android',\n        'logo_android_text',\n        'logo_apple',\n        'logo_facebook',\n        'logo_github',\n        'logo_google',\n        'logo_google_text',\n        'logo_googleplus',\n        'logo_instagram',\n        'logo_ios',\n        'logo_linkedin',\n        'logo_macos',\n        'logo_microsoft',\n        'logo_rss',\n        'logo_twitter',\n        'logo_windows',\n        'map',\n        'menu',\n        'message',\n        'message_fill',\n        'mic',\n        'mic_fill',\n        'mic_off',\n        'mic_round',\n        'mic_round_fill',\n        'money_dollar',\n        'money_dollar_round',\n        'money_dollar_round_fill',\n        'money_euro',\n        'money_euro_round',\n        'money_euro_round_fill',\n        'money_pound',\n        'money_pound_round',\n        'money_pound_round_fill',\n        'money_rubl',\n        'money_rubl_round',\n        'money_rubl_round_fill',\n        'money_yen',\n        'money_yen_round',\n        'money_yen_round_fill',\n        'more',\n        'more_fill',\n        'more_round',\n        'more_round_fill',\n        'more_vertical',\n        'more_vertical_fill',\n        'more_vertical_round',\n        'more_vertical_round_fill',\n        'move',\n        'navigation',\n        'navigation_fill',\n        'navigation_round',\n        'navigation_round_fill',\n        'numbers',\n        'numbers_square',\n        'numbers_square_fill',\n        'paper_plane',\n        'paper_plane_fill',\n        'pause',\n        'pause_fill',\n        'pause_round',\n        'pause_round_fill',\n        'paw',\n        'person',\n        'person_round',\n        'person_round_fill',\n        'persons',\n        'persons_round',\n        'persons_round_fill',\n        'phone',\n        'phone_fill',\n        'phone_landscape',\n        'phone_portrait',\n        'phone_round',\n        'phone_round_fill',\n        'photos',\n        'photos_fill',\n        'piano',\n        'pie_chart',\n        'pie_chart_fill',\n        'placemark',\n        'placemark_fill',\n        'play',\n        'play_fill',\n        'play_round',\n        'play_round_fill',\n        'poultry_leg',\n        'print',\n        'qrcode',\n        'radio',\n        'redo',\n        'refresh',\n        'refresh_round',\n        'refresh_round_fill',\n        'reload',\n        'reload_round',\n        'reload_round_fill',\n        'reply',\n        'reply_fill',\n        'resize',\n        'resize_h',\n        'resize_v',\n        'rewind',\n        'rewind_fill',\n        'rewind_round',\n        'rewind_round_fill',\n        'rocket',\n        'rocket_fill',\n        'save',\n        'scissors',\n        'search',\n        'settings',\n        'settings_fill',\n        'share',\n        'share_fill',\n        'shopping_cart',\n        'sort',\n        'sort_down',\n        'sort_down_round',\n        'sort_down_round_fill',\n        'sort_round',\n        'sort_round_fill',\n        'sort_up',\n        'sort_up_round',\n        'sort_up_round_fill',\n        'star',\n        'star_fill',\n        'star_half',\n        'star_round_fill',\n        'stopwatch',\n        'stopwatch_fill',\n        'tablet_landscape',\n        'tablet_portrait',\n        'tabs',\n        'tabs_fill',\n        'tag',\n        'tag_fill',\n        'tags',\n        'tags_fill',\n        'tape',\n        'tape_fill',\n        'thumbs_down',\n        'thumbs_up',\n        'ticket',\n        'ticket_fill',\n        'tickets',\n        'tickets_fill',\n        'time',\n        'time_fill',\n        'timer',\n        'timer_fill',\n        'today',\n        'today_fill',\n        'trash',\n        'trash_fill',\n        'tree',\n        'tune',\n        'tune_fill',\n        'undo',\n        'unlock',\n        'unlock_fill',\n        'upload_round',\n        'upload_round_fill',\n        'videocam',\n        'videocam_fill',\n        'videocam_round',\n        'videocam_round_fill',\n        'volume',\n        'volume_fill',\n        'volume_low',\n        'volume_low_fill',\n        'volume_mute',\n        'volume_mute_fill',\n        'volume_off',\n        'waterdrop',\n        'waterdrop_fill',\n        'world',\n        'world_fill',\n        'zoom_in',\n        'zoom_out'\n      ],\n      customIcons: app.icons.params.customIcons.filter(o => {\n        return !o.deleted;\n      }),\n      editMode: false\n    };\n  },\n  methods: {\n    filter: function (e) {\n    },\n    createCustomIcon: function (id = null) {\n      let app = this.$app;\n      let context = this;\n      return new Promise((resolve, reject) => {\n        let createIconModal = app.popup.create({\n          content: `\n                        <div class=\"popup popup-icons create-icon-popup\">\n                            <a class=\"link popup-close\"><i class=\"icon material-icons\">highlight_off</i></a>\n                            <div class=\"toolbar tabbar\">\n                                <div class=\"toolbar-inner\">\n                                <h2>Create custom icon</h2>\n                                </div>\n                            </div>\n                            <div class=\"view view-create-icon\"></div>\n                        </div>\n                        `,\n          on: {\n            open: function (popover) {\n              app.views.create('.view-create-icon', {\n                name: 'createIcon',\n                url: '/builder-icons-create/',\n                pushState: false,\n                iconId: id\n              });\n            },\n            opened: function (popover) {\n              app.data.myEvents.off('icons:createIcon');\n              app.data.myEvents.on('icons:createIcon', res => {\n                context.$setState({\n                  customIcons: app.icons.params.customIcons.filter(o => {\n                    return !o.deleted;\n                  })\n                });\n                resolve(res);\n                createIconModal.close();\n              });\n            }\n          }\n        });\n        createIconModal.open();\n      });\n    },\n    editModeToggle: function () {\n      let app = this.$app;\n      let context = this;\n      context.$setState({ editMode: !context.editMode });\n    },\n    customIconClick: function (e) {\n      let context = this;\n      let app = this.$app;\n      let id = $$(e.target).data('id');\n      if (this.editMode) {\n        let popover = app.popover.create({\n          targetEl: $$(e.target),\n          content: `\n                            <div class=\"popover popover-links-edit\">\n                            <div class=\"popover-inner\">\n                                <div class=\"list\">\n                                <ul>\n                                    <li>\n                                    <div class=\"item-content\">\n                                        <div class=\"item-media\"><i class=\"icon material-icons\">edit</i></div>\n                                        <div class=\"item-inner\">\n                                        <div class=\"item-title\">\n                                            <a class=\"list-button item-link edit-link\" href=\"#\">${ app.translation.t('base:edit') }</a>\n                                        </div>                         \n                                        </div>\n                                    </div>  \n                                    </li>\n                                    <li>\n                                    <div class=\"item-content\">\n                                        <div class=\"item-media\"><i class=\"icon material-icons\">delete</i></div>\n                                        <div class=\"item-inner\">\n                                        <div class=\"item-title\">\n                                            <a class=\"list-button item-link remove-link\" href=\"#\">${ app.translation.t('base:delete') }</a>\n                                        </div>\n                                        </div>\n                                    </div>  \n                                    </li>\n                                    \n                                </ul>\n                                </div>\n                            </div>\n                            </div>\n                            `,\n          on: {\n            opened: e => {\n              let editBtn = e.$el.find('.edit-link');\n              let removeBtn = e.$el.find('.remove-link');\n              removeBtn.off('click');\n              removeBtn.on('click', e => {\n                let index = _.findIndex(app.icons.params.customIcons, o => {\n                  return id == o.id;\n                });\n                app.icons.params.customIcons[index]['deleted'] = true;\n                context.$setState({\n                  customIcons: app.icons.params.customIcons.filter(o => {\n                    return !o.deleted;\n                  })\n                });\n                popover.close();\n                return self;\n              });\n              editBtn.off('click');\n              editBtn.on('click', e => {\n                context.createCustomIcon(id);\n                popover.close();\n              });\n            }\n          }\n        });\n        popover.open();\n      } else {\n        let iconObject = {};\n        iconObject['id'] = id;\n        iconObject['custom'] = true;\n        app.data.myEvents.emit('icons:useIcon', iconObject);\n        app.data.myEvents.emit('icons:useIcon', iconObject);\n      }\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n      let btns = $block.find('.icon-button');\n      btns.off('click');\n      btns.on('click', e => {\n        let iconObject = {};\n        let target = $$(e.target);\n        iconObject['name'] = target.data('icon');\n        iconObject['type'] = target.data('type');\n        iconObject['custom'] = false;\n        app.data.myEvents.emit('icons:useIcon', iconObject);\n      });\n      function resetSearch() {\n        let allIcons = page.$el.find('.icon-button');\n        allIcons.forEach(function (icon) {\n          $$(icon).removeClass('hidden');\n        });\n      }\n      let searchBar = this.$app.searchbar.create({\n        el: '#pick-icon-page .searchbar',\n        inputEl: '#pick-icon-page .searchbarx',\n        customSearch: true,\n        backdrop: false,\n        disableButton: false,\n        on: {\n          search: function (searchbar, q) {\n            let query = q;\n            query = q.toLowerCase();\n            if (query.length > 0) {\n              let allIcons = page.$el.find('.icon-button');\n              allIcons.forEach(function (icon) {\n                let iconEl = $$(icon);\n                let name = iconEl.data('icon').toLowerCase();\n                if (name.includes(query)) {\n                  iconEl.removeClass('hidden');\n                } else {\n                  iconEl.addClass('hidden');\n                }\n              });\n            } else {\n              resetSearch();\n            }\n          },\n          clear: function (searchbar, q) {\n            resetSearch();\n          },\n          disable: function (searchbar, q) {\n            resetSearch();\n          }\n        }\n      });\n    }\n  },\n  id: '67dee41bd3',\n  render() {\n    return `\n    <div id=\"pick-icon-page\" class=\"pick-icon page\">\n        <div class=\"icon-page-inner\">\n            <div class=\"toolbar tabbar toolbar-bottom\">\n                <div class=\"toolbar-inner\">\n                    <a href=\"#tabIcon1\" class=\"tab-link tab-link-active\">ICONS</a>\n                    <a href=\"#tabIcon3\" class=\"tab-link\">CUSTOM</a>\n                </div>\n                <div class=\"subnavbar\">\n                    <form class=\"searchbar searchbar-enabled\">\n                        <div class=\"searchbar-inner\">\n                            <div class=\"searchbar-input-wrap\"><input class=\"searchbarx\" type=\"search\"\n                                    placeholder=\"Search\" class=\"\"><i class=\"searchbar-icon\"></i><span\n                                    class=\"input-clear-button\"></span>\n                            </div><span class=\"searchbar-disable-button if-not-aurora\"\n                                style=\"display: block; margin-right: 0px;\">Cancel</span>\n                        </div>\n                    </form>\n                </div>\n            </div>\n            <div class=\"tabs-animated-wrap\">\n                <div class=\"tabs\">\n                    <div id=\"tabIcon1\" class=\"tab tab-active md-icons-tab\">\n                        <div class='icon-main-container'>\n                            ${ this.materialIcons.map(item => `\n                            <span class=\"icon-button\" data-type=\"f7-icons\" data-icon=\"${ item }\">\n                                <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"${ item }\"></i>\n                                <span class=\"icon-name\">${ item }</span>\n                            </span>\n                            `).join('') }\n                            ${ this.f7icons.map(item => `\n                            <span class=\"icon-button\" data-type=\"f7-icons\" data-icon=\"${ item }\">\n                                <i class=\"icon f7-icons\" data-type=\"f7-icons\" data-icon=\"${ item }\"></i>\n                                <span class=\"icon-name\">${ item }</span>\n                            </span>\n                            `).join('') }\n                        </div>\n                    </div>\n\n                    <div id=\"tabIcon3\" class=\"tab  custom-icons-tab\">\n                        ${ this.editMode ? `<div class=\"edit-panel\">Editing mode enabled</div>` : '' }\n                        <div class='icon-search-container'>\n                            ${ this.customIcons.map(item => `\n                            <img class=\"custom-icon\" @click=\"customIconClick\" src=\"${ item.url }\" data-id=\"${ item.id }\">\n                            `).join('') }\n                        </div>\n                        <div class=\"block\">\n                            <div class=\"list\">\n                                <ul>\n                                    <li> <button class=\"new-icon button button-fill\"\n                                            @click=\"createCustomIcon(null)\">Create\n                                            new\n                                            icon</button></li>\n                                    <li> <button class=\"new-icon button\" @click=\"editModeToggle\">${ !this.editMode ? `Edit` : `Turn off\n                                            edit` }</button></li>\n                                </ul>\n                            </div>\n                        </div>\n\n\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: true\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-icons/templates/new_icon.f7.es.html\n/* harmony default export */ var new_icon_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let params = this.$f7.views.createIcon.params;\n    return { iconId: params.iconId };\n  },\n  methods: {\n    saveCustomIcon: function () {\n      let app = this.$app;\n      let id = _.maxBy(app.icons.params.customIcons, o => {\n        return o.id;\n      });\n      if (id == undefined) {\n        id = 1;\n      } else {\n        id = id.id + 1;\n      }\n      let formData = app.form.convertToData('#create-icon');\n      let obj = {\n        id: id,\n        url: formData.url,\n        deleted: false\n      };\n      if (!this.iconId) {\n        app.icons.params.customIcons.push(obj);\n      } else {\n        let index = _.findIndex(app.icons.params.customIcons, o => {\n          return o.id == this.iconId;\n        });\n        let newObject = _.cloneDeep(app.icons.params.customIcons[index]);\n        newObject['url'] = formData.url;\n        app.icons.params.customIcons.splice(index, 1, newObject);\n      }\n      app.data.myEvents.emit('icons:createIcon', obj);\n    },\n    selectIcon: function () {\n      let app = this.$app;\n      let self = this;\n      app.data.myEvents.off('message:media');\n      app.builder.imagePopup.open();\n      app.data.myEvents.on('message:media', async function (url) {\n        let source = url;\n        source = app.apiManager.replaceMediaServerPlaceholder(source);\n        app.form.fillFromData('#create-icon', formData);\n        app.builder.imagePopup.close();\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n      if (this.iconId) {\n        let obj = _.find(app.icons.params.customIcons, o => {\n          return o.id == this.iconId;\n        });\n        let formData = { 'url': obj.url };\n        app.form.fillFromData('#create-icon', formData);\n      }\n    }\n  },\n  id: '7b4db9f957',\n  render() {\n    return `\n    <div class=\"create-icon page\">\n        <div class=\"block\">\n            <form class=\"list\" id=\"create-icon\">\n                <ul>\n                    <li>\n\n                    </li>\n                    <li class=\"item-content no-hairlines-between\">\n                        <div class=\"item-inner\">\n                            <div class=\"row\">\n                                <div class=\"col-90 item-input\">\n                                    <div class=\"item-content item-input\">\n                                        <div class=\"item-inner\">\n                                            <div class=\"item-title item-label\">Icon link</div>\n                                            <div class=\"item-input-wrap\">\n                                                <input type=\"text\" name=\"url\" placeholder=\"icon link\" />\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"col-10 item-input\">\n                                    <i class=\"icon material-icons select-audio\" @click=\"selectIcon\">library_add</i>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                    <li><a class=\"list-button button button-fill\" @click=\"saveCustomIcon\">Save icon</a></li>\n                </ul>\n            </form>\n\n        </div>\n    </div>\n`;\n  },\n  style: `\n    #create-icon .row {\n        align-items: center;\n    }\n`,\n  styleScoped: false\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-link/css/link.less\nvar css_link = __webpack_require__(\"./src/core/custom_plugins/builder-link/css/link.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-link/templates/link_creation.f7.es.html\n\n\n\n/* harmony default export */ var link_creation_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let paramId = $$(this.$router.$el).closest('.act-view').data('compId');\n    let params = this.$f7.views[`link-${ paramId }`].params;\n    let flatChapters = app.book.getBookChaptersFlatten().filter(o => {\n      return o.deleted == false;\n    });\n    let prevLabel = app.translation.t('builder:content.linkPrevPage');\n    let nextLabel = app.translation.t('builder:content.linkNextPage');\n    flatChapters.unshift({\n      name: prevLabel,\n      fullPath: 'PREV'\n    }, {\n      name: nextLabel,\n      fullPath: 'NEXT'\n    });\n    let linkParams = params.link;\n    let edit = false;\n    if (linkParams.url != null) {\n      edit = true;\n    }\n    if (linkParams == undefined) {\n      linkParams = {\n        anchor: '',\n        class: '',\n        title: '',\n        type: '',\n        url: ''\n      };\n    } else {\n      Object.keys(linkParams).forEach(key => {\n        if (linkParams[key] == null) {\n          linkParams[key] = '';\n        }\n      });\n    }\n    return {\n      id: paramId,\n      type: params.type,\n      isAction: params.isAction,\n      showAnchor: false,\n      chapters: flatChapters,\n      linkClassShow: false,\n      linkObj: linkParams,\n      modal: [],\n      actions: [\n        'modal',\n        'audio',\n        'popover'\n      ],\n      selectedAction: 'modal',\n      selectedAudio: '',\n      selectedModal: '',\n      selectedPopover: '',\n      linkType: linkParams.type,\n      edit: edit\n    };\n  },\n  methods: {\n    changed: function ($block) {\n      let app = this.$app;\n      let flag = true;\n      let selType = '';\n      let selName = $block.find('.link-text-value').val();\n      let selClass = $block.find('.class-value').val();\n      let selVal = '';\n      let idVal = '';\n      if (selName == '' && !this.isAction) {\n        app.dialog.alert(app.translation.t('builder:content.linkErrorEmpty'));\n        flag = false;\n      }\n      switch (this.linkType) {\n      case 'internal':\n        selType = 'internal';\n        idVal = $block.find('.inbook-anchor-value').val();\n        selVal = $block.find('.inbook-url').val();\n        break;\n      case 'external':\n        selType = 'external';\n        selVal = $block.find('.external-url').val();\n        selVal = selVal.replace(/\\s/g, '');\n        const regex = RegExp(/[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/ig);\n        if (selVal != '') {\n          if (regex.test(selVal) && selVal) {\n            if (!selVal.startsWith('https://') && !selVal.startsWith('http://') && !selVal.startsWith('mailto:') && !selVal.startsWith('tel:')) {\n              selVal = 'https://' + selVal;\n            }\n          }\n        }\n        break;\n      case 'action':\n        switch (this.selectedAction) {\n        case 'modal':\n          selType = 'modal';\n          idVal = this.selectedModal;\n          break;\n        case 'audio':\n          selType = 'audio';\n          idVal = this.selectedAudio;\n          break;\n        case 'popover':\n          selType = 'popover';\n          idVal = this.selectedPopover;\n          break;\n        }\n        break;\n      }\n      if (flag) {\n        let obj = {\n          url: selVal,\n          title: selName,\n          anchor: idVal,\n          type: selType,\n          class: selClass\n        };\n        if (selType == 'internal' && !this.showAnchor) {\n          obj['anchor'] = '';\n        }\n        if (selType == 'internal' && this.showAnchor) {\n          obj['url'] = 'ANCHOR';\n        }\n        if (!this.linkClassShow) {\n          obj['class'] = '';\n        }\n        app.data.myEvents.emit('link:useLink', {\n          data: obj,\n          id: this.id\n        });\n      }\n    },\n    remove: function ($block) {\n      let app = this.$app;\n      let selName = $block.find('.link-text-value').val();\n      let obj = {\n        url: '',\n        title: selName,\n        anchor: '',\n        type: 'deleted',\n        class: ''\n      };\n      app.data.myEvents.emit('link:useLink', {\n        data: obj,\n        id: this.id\n      });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      e.stopImmediatePropagation();\n      let self = this;\n      let app = page.app;\n      let $block = page.$el;\n      let defaultType = 'internal';\n      let defaultAction = 'modal';\n      if (this.linkObj.type == 'modal' || this.linkObj.type == 'audio' || this.linkObj.type == 'popover') {\n        defaultType = 'action';\n        defaultAction = this.linkObj.type;\n        if (this.linkObj.type == 'modal') {\n          this.selectedModal = this.linkObj.anchor;\n        } else if (this.linkObj.type == 'audio') {\n          this.selectedAudio = this.linkObj.anchor;\n        } else {\n          this.selectedPopover = this.linkObj.anchor;\n        }\n      } else if (this.linkObj.type != '' && this.linkObj.type != undefined) {\n        defaultType = this.linkObj.type;\n      }\n      let modal = $$('.swiper-slide-active').find('.builder-popup');\n      let modalId = [];\n      modal.forEach(o => {\n        let obj = {\n          id: o.id,\n          name: $$(o).data('name')\n        };\n        modalId.push(obj);\n      });\n      this.$setState({\n        linkType: defaultType,\n        selectedAction: defaultAction,\n        modal: modalId\n      });\n      app.views.create(`.action-view-container-audio-${ this.id }`, {\n        name: `audio-${ this.id }`,\n        restoreScrollTopOnBack: false,\n        url: `/builder-audio-list/${ this.id }`,\n        pushState: false,\n        isAction: true,\n        audio: this.linkObj.type == 'audio' ? { trackNumber: this.linkObj.anchor } : null\n      });\n      let btn = $block.find('.toggle-type');\n      btn.on('change', e => {\n        let val = e.target.id;\n        let type = '';\n        if (val.includes('link-internal')) {\n          type = 'internal';\n        } else if (val.includes('link-external')) {\n          type = 'external';\n        } else if (val.includes('link-action')) {\n          type = 'action';\n          let modal = $$('#modal').val();\n          this.$setState({ selectedModal: modal });\n        }\n        this.$setState({ linkType: type });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let el = $block.find('.inbook-url');\n      el.off('change');\n      el.on('change', e => {\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let inpUrl = $block.find('.external-url');\n      inpUrl.off('blur');\n      inpUrl.on('blur', e => {\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let anchorUrl = $block.find('.inbook-anchor-value');\n      anchorUrl.off('blur');\n      anchorUrl.on('blur', e => {\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let tgl = $block.find('.toggle-anchors');\n      if (this.linkObj.anchor.length > 0) {\n        this.$setState({ showAnchor: true });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      }\n      tgl.off('change');\n      tgl.on('change', e => {\n        let val = e.target.checked;\n        let int = false;\n        if (val) {\n          int = true;\n        }\n        this.$setState({ showAnchor: int });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let linkClassTgl = $block.find('.toggle-link-class');\n      if (this.linkObj.class.length > 0) {\n        this.$setState({ linkClassShow: true });\n      }\n      linkClassTgl.off('change');\n      linkClassTgl.on('change', e => {\n        let val = e.target.checked;\n        let int = false;\n        if (val) {\n          int = true;\n        }\n        this.$setState({ linkClassShow: int });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let actionSelect = $block.find('#actionTypeSelect');\n      actionSelect.off('change');\n      actionSelect.on('change', e => {\n        let val = $$(e.target).val();\n        let modal = $$('#modal').val();\n        this.$setState({\n          selectedAction: val,\n          selectedModal: modal\n        });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      app.data.myEvents.off('audio:useAudio');\n      app.data.myEvents.on('audio:useAudio', res => {\n        this.$setState({ selectedAudio: res.trackNumber });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      let modalSelect = $block.find('#modal');\n      if (modalId.length > 0 && modal[0].hasOwnProperty('id')) {\n        this.$setState({ selectedModal: modalId[0].id });\n      }\n      modalSelect.off('change');\n      modalSelect.on('change', e => {\n        let val = $$(e.target).val();\n        this.$setState({ selectedModal: val });\n        if (this.type == 'content') {\n          this.changed($block);\n        }\n      });\n      if (this.type == 'modal') {\n        let submitBtn = $block.find('.submit');\n        submitBtn.off('click');\n        submitBtn.on('click', e => {\n          this.changed($block);\n        });\n      }\n      let removeBtn = $block.find('.remove');\n      removeBtn.off('click');\n      removeBtn.on('click', e => {\n        this.remove($block);\n      });\n      let $container = $block.find('.popover-text-editor');\n      let textEditor = app.textEditor.create({\n        el: $container,\n        mode: 'toolbar',\n        clearFormattingOnPaste: false,\n        customButtons: {\n          icon: {\n            content: '<i class=\"icon material-icons\" data-icon=\"widgets\" ></i>',\n            onClick(event, buttonEl) {\n              openIconModal.call(app, buttonEl);\n            }\n          },\n          customLink: {\n            content: '<i class=\"icon material-icons\" data-icon=\"link\" ></i>',\n            onClick(event, buttonEl) {\n              openLinkModal.call(app);\n            }\n          },\n          citation: {\n            content: '<i class=\"icon material-icons\" data-icon=\"format_quote\"></i>',\n            onClick(event, buttonEl) {\n              openCitationModal.call(app, buttonEl);\n            }\n          },\n          audio: {\n            content: '<i class=\"icon material-icons\" data-icon=\"audiotrack\"></i>',\n            onClick(event, buttonEl) {\n              openAudioModal.call(app);\n            }\n          },\n          customImage: {\n            content: '<i class=\"icon material-icons\" data-icon=\"insert_photo\"></i>',\n            onClick(event, buttonEl) {\n              openCustomImageModal.call(app, buttonEl);\n            }\n          }\n        },\n        buttons: [[\n            'bold',\n            'italic',\n            'underline',\n            'strikeThrough',\n            'subscript',\n            'superscript'\n          ]],\n        on: {\n          init: function (editor) {\n            editor.setValue(`${ self.selectedPopover }`);\n          },\n          blur: function (editor) {\n            let value = Object(textEditor_utils[\"removeBadInlineStyles\"])(editor.value);\n            self.$setState({ selectedPopover: value });\n            self.changed($block);\n          },\n          input: function (editor, value) {\n          }\n        }\n      });\n    }\n  },\n  id: 'fe31e28683',\n  render() {\n    return `\n    <div class=\"create-link ${ this.isAction ? 'page in-action' : 'page' } \">\n        <div class=\"block\">\n            <div class=\"item-input-wrap yes-no-radio\">\n                <input id=\"link-internal-${ this.id }\" class=\"toggle toggle-type\" type=\"radio\"\n                    name=\"bool-radio-link-${ this.id }\" ${ this.linkType == 'internal' ? 'checked' : '' }>\n                <label for=\"link-internal-${ this.id }\"\n                    class=\"radio-btn\">${ this.$app.translation.t('builder:content.linkIn') }</label>\n\n                <input id=\"link-external-${ this.id }\" class=\"toggle toggle-type\" type=\"radio\"\n                    name=\"bool-radio-link-${ this.id }\" ${ this.linkType == 'external' ? 'checked' : '' }>\n                <label for=\"link-external-${ this.id }\"\n                    class=\"radio-btn\">${ this.$app.translation.t('builder:content.linkExternal') }</label>\n\n                <input id=\"link-action-${ this.id }\" class=\"toggle toggle-type\" type=\"radio\"\n                    name=\"bool-radio-link-${ this.id }\" ${ this.linkType == 'action' ? 'checked' : '' }>\n                <label for=\"link-action-${ this.id }\"\n                    class=\"radio-btn\">${ this.$app.translation.t('builder:content.linkAction') }</label>\n            </div>\n            <div class=\"link-content-container\">\n\n                <div class=\"list ${ this.isAction ? 'hidden' : '' }\">\n                    <ul>\n                        <li class=\"item-content item-input item-input-with-value\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-title item-label\">\n                                    ${ this.$app.translation.t('builder:content.linkLinkText') }\n                                </div>\n                                <div class=\"item-input-wrap\">\n                                    <input type=\"text\" value=\"${ this.linkObj.text }\"\n                                        class=\"input-with-value link-text-value\">\n                                </div>\n                        </li>\n                    </ul>\n                </div>\n\n\n                <div class='internal ${ this.linkType == 'internal' ? '' : 'hidden' }'>\n\n                    <div class=\"list\">\n                        <ul>\n                            <li class=\"item-content item-input item-input-with-value ${ this.showAnchor ? 'hidden' : '' }\">\n                                <div class=\"item-inner\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.linkChapter') }\n                                    </div>\n                                    <label class=\"select-label\">\n                                        <select class=\"input-with-value inbook-url\" name=\"chapters\" id=\"chapters\">\n                                            ${ this.chapters.map(chapter => `\n                                            <option value=\"${ chapter.fullPath }\" ${ chapter.fullPath == this.linkObj.url ? 'selected' : '' }>${ chapter.name }</option>\n                                            `).join('') }\n                                        </select>\n                                    </label>\n                                </div>\n                            </li>\n                            <li class=\"item-content item-input item-input-with-value\">\n                                <div class=\"item-inner\">\n                                    <div class=\"row\" style=\"width: 100%;  align-items: center;\">\n                                        <div class=\"${ this.isAction ? 'col-100' : 'col-30' }\">\n                                            <span class=\"item-title item-label\"\n                                                style=\"margin-right: 15px\">${ this.$app.translation.t('builder:content.linkUseAnchor') }</span>\n                                            <label class=\"toggle toggle-init\"><input type=\"checkbox\"\n                                                    class=\"toggle-anchors\" ${ this.linkObj.anchor != '' ? 'checked' : '' }><span class=\"toggle-icon\"></span></label>\n                                        </div>\n                                        <div class=\"${ this.isAction ? 'col-100' : 'col-70' }\">\n                                            <div class=' ${ this.showAnchor ? '' : 'hidden' } inbook-anchor-container'>\n                                                <div class=\"item-title item-label\">\n                                                    ${ this.$app.translation.t('builder:content.linkAnchorId') }</div>\n                                                <div class=\"item-input-wrap\"><input type=\"text\"\n                                                        value=\"${ this.linkObj.anchor }\"\n                                                        class=\" input-with-value inbook-anchor-value\"></div>\n                                            </div>\n                                        </div>\n                                        <div class=\"col-100\">\n                                            <div class=' ${ this.showAnchor ? '' : 'hidden' } inbook-anchor-container'>\n                                                <p class=\"item-label\">\n                                                    ${ this.$app.translation.t('builder:content.anchorTutorial') }</p>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </li>\n\n                        </ul>\n                    </div>\n                </div>\n\n                <div class='external ${ this.linkType == 'external' ? '' : 'hidden' }'>\n\n                    <div class=\"list\">\n                        <ul>\n                            <li class=\"item-content item-input item-input-with-value\">\n                                <div class=\"item-inner\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.linkUrl') }\n                                    </div>\n                                    <div class=\"item-input-wrap\"><input type=\"text\"\n                                            value=\"${ this.linkObj.type == 'external' ? this.linkObj.url : '' }\"\n                                            class=\"input-with-value external-url\"></div>\n                                </div>\n                            </li>\n                        </ul>\n                    </div>\n\n                </div>\n\n                <div class='external ${ this.linkType == 'action' ? '' : 'hidden' }'>\n\n                    <div class=\"list\">\n                        <ul>\n                            <li class=\"item-content item-input item-input-with-value\">\n                                <div class=\"item-inner\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.actionType') }\n                                    </div>\n                                    <label class=\"select-label\">\n                                        <select class=\"input-with-value\" name=\"actionType\" id=\"actionTypeSelect\">\n                                            ${ this.actions.map(act => `\n                                            <option value=\"${ act }\" ${ this.selectedAction == act ? 'selected' : '' }>${ act }\n                                            </option>\n                                            `).join('') }\n                                        </select>\n                                    </label>\n                                </div>\n                            </li>\n\n                            <div class=\"divider ${ this.isAction ? 'hidden' : '' }\"></div>\n                            <li class=\"item-content item-input item-input-with-value ${ this.selectedAction == 'modal' ? '' : 'hidden' }\">\n                                <div class=\"item-inner\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.linkChapter') }\n                                    </div>\n                                    <label class=\"select-label\">\n                                        <select class=\"input-with-value action-modal-value\" name=\"modal\" id=\"modal\">\n                                            ${ this.modal.map(modal => `\n                                            <option value=\"${ modal.id }\" ${ this.linkObj.anchor == modal.id ? 'selected' : '' }>\n                                                ${ modal.name }</option>\n                                            `).join('') }\n                                        </select>\n                                    </label>\n                                </div>\n                            </li>\n                            <li class=\"${ this.selectedAction == 'audio' ? '' : 'hidden' }\">\n                                <div class=\"action-view-container-audio-${ this.id } audio-view\" data-compId=\"${ this.id }\"\n                                    style=\"width: 100%\">\n\n                                </div>\n                            </li>\n                            <li class=\"${ this.selectedAction == 'popover' ? '' : 'hidden' }\">\n                               <div class=\"popover-text-editor\"></div>\n                            </li>\n                        </ul>\n                    </div>\n\n                </div>\n\n            </div>\n\n\n            <div class=\"divider ${ this.isAction ? 'hidden' : '' }\"></div>\n\n            <div class=\"list ${ this.isAction ? 'hidden' : '' }\">\n                <ul>\n                    <li class=\"item-content item-input item-input-with-value\">\n                        <div class=\"item-inner\">\n                            <div class=\"row\" style=\"width: 100%;  align-items: center;\">\n                                <div class=\"col-30\">\n                                    <span class=\"item-title item-label\"\n                                        style=\"margin-right: 15px\">${ this.$app.translation.t('builder:content.linkClassUrl') }</span>\n                                    <label class=\"toggle toggle-init\"><input type=\"checkbox\" class=\"toggle-link-class\"\n                                            ${ this.linkObj.class != '' ? 'checked' : '' }><span\n                                            class=\"toggle-icon\"></span></label>\n                                </div>\n                                <div class=\"col-70\">\n                                    <div class=' ${ this.linkClassShow ? '' : 'hidden' } '>\n                                        <div class=\"item-title item-label\">\n                                            ${ this.$app.translation.t('builder:content.linkClassUrl') }</div>\n                                        <div class=\"item-input-wrap\"><input type=\"text\" value=\"${ this.linkObj.class }\"\n                                                class=\" input-with-value class-value\"></div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n\n                </ul>\n            </div>\n            <div class=\"list ${ this.type == 'content' ? 'hidden' : '' }\">\n                <ul>\n                    <li>\n                        <button\n                            class=\"button button-fill submit\">${ this.$app.translation.t('builder:content.linkAdd') }</button>\n                    </li>\n                    ${ !this.isAction && this.edit ? `\n                    <li>\n                        <button class=\"button remove\">${ this.$app.translation.t('builder:content.linkDelete') }</button>\n                    </li>\n                    ` : '' }\n                </ul>\n            </div>\n        </div>\n    </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-dictionary/templates/dictionary.f7.es.html\n\n/* harmony default export */ var dictionary_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      dictionary: app.dictionary.params.data,\n      bookSettings: app.bookSettings\n    };\n  },\n  methods: {\n    render: function (data) {\n      let app = this.$app;\n      let self = this;\n      let html = '';\n      if (data !== null) {\n        data.forEach((item, index) => {\n          if (item.deleted == false) {\n            html += `\n                            <li class=\"item-content item-input\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-title item-label\">Originál</div>\n                                <div class=\"item-input-wrap\">\n                                <input type=\"text\" placeholder=\"Originál\" @change=\"changeSaver\" class=\"translate-input\" data-id=\"${ item.id }\" data-type=\"original\" value=\"${ item.original }\">\n                                <span class=\"input-clear-button\"></span>\n                                </div>\n                            </div>\n                            </li>\n                            <li class=\"item-content item-input\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-title item-label\">Překlad</div>\n                                <div class=\"item-input-wrap\">\n                                <input type=\"text\" placeholder=\"Překlad\" @change=\"changeSaver\" class=\"translate-input\" data-id=\"${ item.id }\" data-type=\"translated\"  value=\"${ item.translated }\">\n                                <span class=\"input-clear-button\"></span>\n                                </div>\n                            </div>\n                            </li>\n                            <li>\n                            <div style=\"text-align: right;\">\n                                <i class=\"icon material-icons delete-translate\" @click=\"deleteTranslation\" data-id=\"${ item.id }\">\n                                    delete_forever\n                                </i>\n                                <div class=\"spacer\"></div>\n                            </div>\n                            </li>\n                            `;\n          }\n        });\n      }\n      return html;\n    },\n    toggleTranslation: function (e) {\n      let self = this;\n      let app = this.$app;\n      let checked = $$(e.target)[0].checked;\n      if (checked) {\n        app.bookSettings.params.showTranslation = true;\n      } else {\n        app.bookSettings.params.showTranslation = false;\n      }\n    },\n    addNew: function () {\n      let self = this;\n      let app = this.$app;\n      let numId = self.getId();\n      let obj = {};\n      obj['id'] = numId;\n      obj['original'] = 'null';\n      obj['translated'] = 'null;';\n      obj['deleted'] = false;\n      app.dictionary.params.data.push(obj);\n      let html = `\n                            <li class=\"item-content item-input\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-title item-label\">Originál</div>\n                                <div class=\"item-input-wrap\">\n                                <input type=\"text\" placeholder=\"Originál\"  class=\"translate-input\" data-id=\"${ numId }\" data-type=\"original\" value=\"\">\n                                <span class=\"input-clear-button\"></span>\n                                </div>\n                            </div>\n                            </li>\n                            <li class=\"item-content item-input\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-title item-label\">Překlad</div>\n                                <div class=\"item-input-wrap\">\n                                <input type=\"text\" placeholder=\"Překlad\"  class=\"translate-input\" data-id=\"${ numId }\" data-type=\"translated\"  value=\"\">\n                                <span class=\"input-clear-button\"></span>\n                                </div>\n                            </div>\n                            </li>\n                            <li>\n                            <div style=\"text-align: right;\">\n                                <i class=\"icon material-icons delete-translate\"   data-id=\"${ numId }\" >\n                                    delete_forever\n                                </i>\n                                <div class=\"spacer\"></div>\n                            </div>\n                            </li>\n                            `;\n      $$('.dictionary-list').append(html);\n      $$('.translate-input').off('blur');\n      $$('.translate-input').on('blur', e => {\n        self.changeSaver(e);\n      });\n      $$('.delete-translate').off('click');\n      $$('.delete-translate').on('click', e => {\n        self.deleteTranslation(e);\n      });\n    },\n    getId() {\n      let app = this.$app;\n      let id = _.maxBy(app.dictionary.params.data, o => {\n        return o.id;\n      });\n      let numId = 0;\n      if (id) {\n        numId = id.id;\n        numId = numId + 1;\n      } else {\n        numId = 0;\n      }\n      return numId;\n    },\n    changeSaver(e) {\n      let app = this.$app;\n      let $target = $$(e.target);\n      let value = $target.val();\n      let id = $target.data('id');\n      let type = $target.data('type');\n      let ref = _.find(app.dictionary.params.data, o => {\n        return o.id == id;\n      });\n      if (ref) {\n        if (type == 'original') {\n          ref.original = value;\n        } else {\n          ref.translated = value;\n        }\n      }\n    },\n    addFromText() {\n      let app = this.$app;\n      let dictionaryPopup = app.popup.create({\n        content: `\n            <div class=\"popup popup-dictionary\">\n              <a class=\"link popup-close\"><i class=\"icon material-icons\">highlight_off</i></a>\n                <div class=\"toolbar tabbar toolbar-bottom\">\n                  <div class=\"toolbar-inner\">\n                   <h2>Přidat z textu</h2>\n                  </div>\n                </div>\n                <div class=\"block\" style=\"height: 400px;\">\n                    <textarea id=\"dictionaryText\" name=\"dictionary\" style=\"width:100%;height: 100%; border: 1px solid gray;\"></textarea>\n               </div>\n               <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content\">\n                        <div class=\"item-inner\">\n                            <div class=\"item-after\">\n                                <div class=\"button add-from-text-button\"><i\n                                        class=\"icon material-icons\">description</i>Přidat</div>\n                            </div>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n            </div>`,\n        on: {\n          open: function (popover) {\n          },\n          opened: function (popover) {\n          }\n        }\n      }).open();\n      $$('.add-from-text-button').on('click', e => {\n        let self = this;\n        let app = this.$app;\n        let text = $$('#dictionaryText').val();\n        let line = text.split('\\n');\n        for (let item of line) {\n          let splited = '';\n          if (item.includes(' - ')) {\n            splited = item.split(' - ');\n          } else if (item.includes(' \\u2013 ')) {\n            splited = item.split(' \\u2013 ');\n          } else {\n            alert('chybný formát');\n            break;\n          }\n          let obj = {};\n          let numId = self.getId();\n          if (splited.length == 2) {\n            obj['id'] = numId;\n            obj['original'] = splited[0];\n            obj['translated'] = splited[1];\n            obj['deleted'] = false;\n            app.dictionary.params.data.push(obj);\n          } else {\n            alert('Chyba!');\n            break;\n          }\n        }\n        dictionaryPopup.close();\n        self.rerender(app.dictionary.params.data);\n      });\n    },\n    deleteTranslation(e) {\n      let self = this;\n      let app = this.$app;\n      let id = $$(e.target).data('id');\n      let ref = _.find(app.dictionary.params.data, o => {\n        return o.id == id;\n      });\n      ref['deleted'] = true;\n      self.rerender();\n    },\n    changeIcon(e) {\n      let self = this;\n      let app = this.$app;\n      let val = $$(e.target).val();\n      app.bookSettings.params.translationIcon = val;\n    },\n    rerender() {\n      let self = this;\n      let app = this.$app;\n      self.$setState({ dictionary: app.dictionary.params.data });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let self = this;\n      $$('.translation-toggle')[0].checked = app.bookSettings.params.showTranslation;\n      $$('.translation-icon-input').val(app.bookSettings.params.translationIcon);\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: 'aec28d66b4',\n  render() {\n    return `\n    <div class=\"page\">\n        <div class=\"navbar\">\n            <div class=\"navbar-bg\"></div>\n            <div class=\"navbar-inner sliding\">\n                <div class=\"left\">\n                    <a href=\"#\" class=\"link back\">\n                        <i class=\"icon icon-back\"></i>\n                        <span class=\"ios-only\">Back</span>\n                    </a>\n                </div>\n                <div class=\"title\">Správa překladu</div>\n            </div>\n        </div>\n        <div class=\"page-content\">\n            <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content\">\n                        <div class=\"item-inner\">\n                            <span>Zapnout překlad</span>\n                            <label class=\"toggle toggle-init\">\n                                <input type=\"checkbox\" @change=\"toggleTranslation\" class=\"translation-toggle\">\n                                <span class=\"toggle-icon\"></span>\n                            </label>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n            <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content item-input\">\n                        <div class=\"item-inner\">\n                            <div class=\"item-title item-label\">Ikona překladu</div>\n                            <div class=\"item-input-wrap\">\n                                <input type=\"text\" placeholder=\"Ikona\" @change=\"changeIcon\"\n                                    class=\"translation-icon-input\">\n                                <span class=\"input-clear-button\"></span>\n                            </div>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n            <div class=\"block\">\n                <div class=\"dictionary-list-container list\">\n                    <ul class=\"dictionary-list\">\n                        ${ this.render(this.dictionary) }\n                    </ul>\n                </div>\n            </div>\n            <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content\">\n                        <div class=\"item-inner\">\n                            <div class=\"button add-dictionary\" @click=\"addNew\"><i\n                                    class=\"icon material-icons\">add_circle</i> Přidat\n                                nový překlad</div>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n            <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content\">\n                        <div class=\"item-inner\">\n                            <div class=\"button add-dictionary\" @click=\"addFromText\"><i\n                                    class=\"icon material-icons\">description</i> Přidat ze schránky</div>\n\n                        </div>\n                    </li>\n                </ul>\n            </div>\n        </div>\n    </div>\n\n`;\n  },\n  style: `\n[data-f7-aec28d66b4] .item-inner {\n        padding-left: 10px;\n    }\n\n[data-f7-aec28d66b4] .item-header {\n        font-weight: bold;\n        font-size: 1.1em;\n    }\n\n[data-f7-aec28d66b4] .item-date {\n        font-size: var(--f7-list-item-footer-font-size);\n        color: var(--f7-list-item-footer-text-color);\n    }\n\n[data-f7-aec28d66b4] .item-title i {\n        font-size: 14px;\n    }\n\n[data-f7-aec28d66b4] .spacer {\n        border-bottom: 3px solid var(--f7-theme-color);\n        margin: 5px 0;\n    }\n\n[data-f7-aec28d66b4] .delete {\n        margin: 5px 0;\n    }\n`,\n  styleScoped: true\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-audio-player/templates/audio_list.f7.es.html\n/* harmony default export */ var audio_list_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let paramId = $$(this.$router.$el).closest('.audio-view').data('compId');\n    let params = {};\n    if (paramId == undefined) {\n      params.isAction = false;\n      params.selectedText = '';\n      params.audio = null;\n      params.sideMenu = true;\n      params.edit = false;\n      params.selected = null;\n    } else {\n      params = this.$f7.views[`audio-${ paramId }`].params;\n    }\n    let selected = params.audio;\n    if (selected) {\n      selected = selected.trackNumber;\n    } else if (params.trackId) {\n      selected = params.trackId;\n    } else {\n      selected = '';\n    }\n    return {\n      isAction: params.isAction,\n      text: params.selectedText,\n      audioList: app.audio.params.data.filter(o => {\n        return !o.deleted;\n      }),\n      selectedText: params.selectedText,\n      editing: params.edit,\n      selectedAudio: selected,\n      sideMenu: params.sideMenu\n    };\n  },\n  methods: {\n    addAudio: function () {\n      let app = this.$app;\n      let self = this;\n      let paramId = $$(this.$router.$el).closest('.audio-view').data('compId');\n      return new Promise((resolve, reject) => {\n        let createAudioPopup = app.popup.create({\n          content: `\n                        <div class=\"popup popup-audio-create\">\n                            <a class=\"link popup-close\"><i class=\"icon material-icons\">highlight_off</i></a>\n                            <div class=\"toolbar tabbar toolbar-bottom\">\n                                <div class=\"toolbar-inner\">\n                                    <h2>${ app.translation.t('builder:content.audioNew') }</h2>\n                                </div>\n                            </div>\n                            <div class=\"view view-audio-create-popup\" data-compId=\"${ paramId }\"></div>\n                        </div>`,\n          on: {\n            open: function (popover) {\n              app.views.create('.view-audio-create-popup', {\n                name: 'audioCreate',\n                url: '/builder-audio-create/',\n                pushState: false\n              });\n            },\n            opened: function (popover) {\n              app.data.myEvents.off('audio:audioCreated');\n              app.data.myEvents.on('audio:audioCreated', res => {\n                createAudioPopup.close();\n                self.$setState({\n                  audioList: app.audio.params.data.filter(o => {\n                    return !o.deleted;\n                  })\n                });\n              });\n            }\n          }\n        });\n        createAudioPopup.open();\n      });\n    },\n    removeAudio: function () {\n      let app = this.$app;\n      let obj = {};\n      obj['title'] = this.selectedText;\n      obj['trackNumber'] = 'deleted';\n      app.data.myEvents.emit('audio:useAudio', obj);\n    },\n    delete: function (id) {\n      let app = this.$app;\n      app.audio.deleteTrack(id);\n      this.$setState({\n        audioList: app.audio.params.data.filter(o => {\n          return !o.deleted;\n        })\n      });\n    },\n    edit: function (id) {\n      let app = this.$app;\n      let index = _.findIndex(app.audio.params.data, o => {\n        return o.track == id;\n      });\n      let prompt = app.dialog.prompt(app.translation.t('builder:content.audioName'), app.translation.t('builder:content.audioEdit'), name => {\n        app.audio.params.data[index].name = name;\n        this.$setState({\n          audioList: app.audio.params.data.filter(o => {\n            return !o.deleted;\n          })\n        });\n      }, () => {\n      }, app.audio.params.data[index].name);\n    },\n    useAudio: function (id) {\n      let app = this.$app;\n      let audioTrack = _.find(app.audio.params.data, o => {\n        return o.track == id;\n      });\n      let obj = {};\n      obj['title'] = this.selectedText;\n      obj['trackNumber'] = audioTrack.track;\n      app.data.myEvents.emit('audio:useAudio', obj);\n      this.$setState({\n        selectedAudio: audioTrack.track,\n        audioList: app.audio.params.data.filter(o => {\n          return !o.deleted;\n        })\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n    }\n  },\n  id: '18adb8e077',\n  render() {\n    return `\n    <div class=\"audio-list ${ this.isAction ? 'page in-action' : 'page' } \">\n        ${ this.sideMenu ? `\n        <div class=\"navbar left-panel-nav \">\n            <div class=\"navbar-bg\"></div>\n            <div class=\"navbar-inner sliding\">\n                <div class=\"left\">\n                    <a href=\"#\" class=\"link back\">\n                        <i class=\"icon icon-back\"></i>\n                        <span class=\"ios-only\">${ this.$app.translation.t('back') }</span>\n                    </a>\n                </div>\n                <div class=\"title\">${ this.$app.translation.t('builder:content.audioTitle') }</div>\n            </div>\n        </div>\n        ` : '' }\n        <div class=\"page-content\">\n            <div class=\" block\">\n                <div class=\"audio-list-container list\">\n                    <ul class=\"audio-list\">\n                        ${ this.audioList.map(item => `\n                        <li class=\"${ item.track == this.selectedAudio ? 'selected' : '' }\">\n                            <div class=\"item-content\">\n                                <div class=\"item-media\">\n                                    <strong>Track: ${ item.track }</strong>\n                                </div>\n                                <div class=\"item-inner\">\n                                    <div>${ item.name } (${ item.duration })</div>\n                                </div>\n                                <div class=\"item-after\">\n                                    ${ this.sideMenu ? `` : `<i class=\"material-icons use-audio\" data-id=\"${ item.track }\"\n                                        @click=\"this.useAudio(${ item.track })\">done</i>` }\n                                    <i class=\"material-icons edit-audio\" data-id=\"${ item.track }\"\n                                        @click=\"this.edit(${ item.track })\">edit</i>\n                                    <i class=\"material-icons delete-audio\" data-id=\"${ item.track }\"\n                                        @click=\"this.delete(${ item.track })\">delete</i>\n                                </div>\n                            </div>\n                        </li>\n                        `).join('') }\n\n                    </ul>\n                </div>\n\n                <div class=\"list\">\n                    <ul class=\"button-list\">\n                        <li class=\"item-content\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-after\">\n                                    <div class=\"button add-audio\" @click=\"this.addAudio()\"><i\n                                            class=\"icon material-icons\">add_circle</i>${ this.$app.translation.t('builder:content.audioAdd') }\n                                    </div>\n                                </div>\n                            </div>\n                        </li>\n                        ${ this.editing ? `\n                        </li>\n                        <div class=\"button remove-audio\" @click=\"this.removeAudio()\">\n                            ${ this.$app.translation.t('builder:content.audioDelete') }\n                        </div>\n                        </li>\n                        ` : '' }\n                    </ul>\n                </div>\n            </div>\n        </div>\n    </div>\n`;\n  },\n  styleScoped: false\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html\nvar create_audio_f7_es = __webpack_require__(\"./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-colors/templates/color_picker.f7.es.html\n/* harmony default export */ var color_picker_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let params = this.$f7.views.colors.params;\n    let theme = app.utils.colorThemeCSSProperties(app.book.params.color);\n    let objTheme = [\n      {\n        id: 'theme',\n        name: 'theme',\n        hex: theme['--f7-theme-color'] + 'ff'\n      },\n      {\n        id: 'theme-tint',\n        name: 'theme-tint',\n        hex: theme['--f7-theme-color-tint'] + 'ff'\n      },\n      {\n        id: 'theme-shade',\n        name: 'theme-shade',\n        hex: theme['--f7-theme-color-shade'] + 'ff'\n      }\n    ];\n    return {\n      colors: app.colors.params.data,\n      defaultClr: app.colors.params.currentSettings.defaultColors || app.colors.params.defaultColors,\n      themeClr: objTheme,\n      settings: app.colors.params.currentSettings\n    };\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n      let self = this;\n      let colorPickerEl = $block.find('.color-picker-container');\n      let viewColorPickerContainer = colorPickerEl.parents('.view-color-picker-container');\n      let defualtAlpha = '1';\n      let defaultColor = '#000000';\n      let defaultValue = {\n        hex: defaultColor,\n        alpha: defualtAlpha\n      };\n      if (viewColorPickerContainer.data('value')) {\n        defaultColor = viewColorPickerContainer.data('value');\n        if (viewColorPickerContainer.data('value') == 'transparent') {\n          defaultColor = '#00000000';\n        }\n        defaultValue = app.colors.substractAlphaChannel(defaultColor);\n      }\n      if (app.colors.params.selectedColor) {\n        let obj = app.colors.substractAlphaChannel(app.colors.params.selectedColor.hex);\n        defaultColor = obj.hex;\n        defualtAlpha = obj.alpha;\n      }\n      let colorPicker = app.colorPicker.create({\n        containerEl: colorPickerEl,\n        hexLabel: true,\n        hexValueEditable: true,\n        modules: [\n          'sb-spectrum',\n          'hue-slider',\n          'alpha-slider',\n          'hex'\n        ],\n        value: defaultValue,\n        on: {\n          change: function (picker, value) {\n          }\n        }\n      });\n      let addButton = $block.find('.add-color');\n      addButton.off('click');\n      addButton.on('click', e => {\n        let color = colorPicker.getValue();\n        this.addNewColor(this.addAlphaChannel(color.hex, color.alpha));\n      });\n    }\n  },\n  methods: {\n    applyColor() {\n      let app = this.$app;\n      let self = this;\n      let colorPickerEl = this.$el.find('.color-picker');\n      let colorPicker = app.colorPicker.get(colorPickerEl);\n      let value = colorPicker.getValue();\n      let color = self.addAlphaChannel(value.hex, value.alpha);\n      let find = _.find(app.colors.params.data, o => {\n        return o.hex == color && !o.deleted;\n      });\n      let def = _.find(app.colors.params.defaultColors, o => {\n        return o.hex == color;\n      });\n      let theme = _.find(self.themeClr, o => {\n        return o.hex == color;\n      });\n      if (find || def || theme) {\n        app.colors.params.selectedColor = find || def || theme;\n      } else {\n        app.colors.params.selectedColor = self.addNewColor(color, color);\n      }\n      app.data.myEvents.emit('colors:close', true);\n    },\n    cancel() {\n      let app = this.$app;\n      app.data.myEvents.emit('colors:close', false);\n    },\n    remove() {\n      let app = this.$app;\n      app.colors.params.selectedColor = { id: 'deleted' };\n      app.data.myEvents.emit('colors:close', true);\n    },\n    addNewColor(color, name = null) {\n      let app = this.$app;\n      let self = this;\n      let id = _.maxBy(app.colors.params.data, o => {\n        return o.id;\n      });\n      if (id == undefined) {\n        id = 1;\n      } else {\n        id = id.id + 1;\n      }\n      if (name == null) {\n        app.dialog.prompt(app.translation.t('colors:newColorText'), app.translation.t('colors:newColor'), function (newName) {\n          let obj = {\n            id: id,\n            name: newName,\n            hex: color,\n            deleted: false\n          };\n          app.colors.params.data.push(obj);\n          self.$setState({ colors: app.colors.params.data });\n          app.colors.generateStyles();\n          return obj;\n        });\n      } else {\n        let obj = {\n          id: id,\n          name: name,\n          hex: color,\n          deleted: false\n        };\n        app.colors.params.data.push(obj);\n        self.$setState({ colors: app.colors.params.data });\n        app.colors.generateStyles();\n        return obj;\n      }\n    },\n    addAlphaChannel(hex, opacity) {\n      if (opacity === 0 || opacity == '0' || opacity == '0.0') {\n        return hex + '00';\n      }\n      const _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255);\n      const alphaHex = _opacity.toString(16).padStart(2, '0');\n      let newHex = hex + alphaHex;\n      return newHex;\n    },\n    setColor(id, type) {\n      let app = this.$app;\n      let self = this;\n      let colorPickerEl = this.$el.find('.color-picker');\n      let colorPicker = app.colorPicker.get(colorPickerEl);\n      let target = undefined;\n      switch (type) {\n      case 'theme':\n        target = _.find(self.themeClr, o => {\n          return o.id == id;\n        });\n        break;\n      case 'custom':\n        target = _.find(app.colors.params.data, o => {\n          return o.id == id && !o.deleted;\n        });\n        break;\n      case 'default':\n        target = _.find(app.colors.params.defaultColors, o => {\n          return o.id == id;\n        });\n        break;\n      }\n      if (target) {\n        let color = app.colors.substractAlphaChannel(target.hex);\n        colorPicker.setValue({\n          hex: color.hex,\n          alpha: color.alpha\n        });\n      }\n    },\n    removeColor(id) {\n      let app = this.$app;\n      app.dialog.confirm(app.translation.t('colors:removeColorText'), app.translation.t('colors:removeColor'), () => {\n        let index = _.findIndex(app.colors.params.data, o => {\n          return o.id == id && !o.deleted;\n        });\n        app.colors.params.data[index].deleted = true;\n        this.$setState({ colors: app.colors.params.data });\n        app.colors.generateStyles();\n      });\n    },\n    editColor(id) {\n      let app = this.$app;\n      let self = this;\n      let index = _.findIndex(app.colors.params.data, o => {\n        return o.id == id && !o.deleted;\n      });\n      let obj = app.colors.params.data[index];\n      let popupHTML = `\n                    <div class=\"popup edit-color-popup\">\n                        <div class=\"page-content\">\n                        <div class=\"edit-color-picker\"></div>\n                        <div class=\"list no-hairlines-md\">\n                            <ul>\n                                <li class=\"item-content item-input\">\n                                    <div class=\"item-inner\">\n                                    <div class=\"item-title item-label\">${ app.translation.t('colors:colorName') }</div>\n                                    <div class=\"item-input-wrap\">\n                                        <input class=\"color-edit-name\" type=\"text\" placeholder=\"${ app.translation.t('colors:colorName') }\" />\n                                    </div>\n                                    </div>\n                                </li>\n                            </ul>\n                        </div>\n                        <div class=\"color-controls\">\n                            <div class=\"row\">\n                                <button class=\"button col edit-cancel\">${ app.translation.t('cancel') }</button>\n                                <button class=\"button button-fill col edit-apply\">${ app.translation.t('apply') }</button>\n                            </div>\n                        </div>\n                        </div>\n                    </div>\n                `;\n      let clr = app.colors.substractAlphaChannel(obj.hex);\n      let dColor = clr.hex;\n      let dAlpha = clr.alpha;\n      let editModal = app.popup.create({\n        content: popupHTML,\n        closeByBackdropClick: true,\n        closeByOutsideClick: false,\n        on: {\n          open: function (popup) {\n            let cPicker = popup.$el.find('.edit-color-picker');\n            let newColorPicker = app.colorPicker.create({\n              containerEl: cPicker,\n              hexLabel: true,\n              hexValueEditable: true,\n              modules: [\n                'sb-spectrum',\n                'hue-slider',\n                'alpha-slider',\n                'hex'\n              ],\n              value: {\n                hex: dColor,\n                alpha: dAlpha\n              },\n              on: {\n                change: function (picker, value) {\n                }\n              }\n            });\n            let input = popup.$el.find('.color-edit-name');\n            input.val(obj.name);\n            app.data.myEvents.off('colors:closeParent');\n            app.data.myEvents.on('colors:closeParent', function () {\n              popup.close();\n            });\n            let cancelBtn = popup.$el.find('.edit-cancel');\n            cancelBtn.click(function () {\n              popup.close();\n            });\n            let applyBtn = popup.$el.find('.edit-apply');\n            applyBtn.click(function () {\n              let newName = input.val();\n              let newVal = newColorPicker.getValue();\n              let newClr = self.addAlphaChannel(newVal.hex, newVal.alpha);\n              obj.hex = newClr;\n              obj.name = newName;\n              app.colors.params.data[index] = obj;\n              self.$setState({ colors: app.colors.params.data });\n              popup.close();\n              app.colors.generateStyles();\n            });\n          },\n          close: function () {\n          }\n        }\n      });\n      editModal.open();\n    }\n  },\n  id: '16ea059882',\n  render() {\n    return `\n    <div class=\"color-page page\">\n        <div class=\"color-block\">\n            <div class=\"color-picker-container\"></div>\n            <div class=\"color-select-container\">\n                ${ this.settings.showThemeColors ? `\n                <div class=\"theme-colors\">\n                    <span>${ this.$app.translation.t('colors:themeColors') }</span>\n                    <div class=\"preset-colors-inner\">\n                        ${ this.themeClr.map(clr => `\n                        <span @click=\"setColor('${ clr.id }','theme')\" class=\"color-label\">\n                            <span class=\"color-circle\" style=\"background-color:${ clr.hex }\"></span>\n                        </span>\n                        `).join('') }\n                    </div>\n                </div>\n                ` : '' }\n                <div class=\"preset-colors\">\n                    <span>${ this.$app.translation.t('colors:defaultColors') }</span>\n                    <div class=\"preset-colors-inner\">\n                        ${ this.defaultClr.map(clr => `\n                        <span @click=\"setColor('${ clr.id }','default')\" class=\"color-label\">\n                            <span class=\"color-circle\" style=\"background-color:${ clr.hex }\"></span>\n                        </span>\n                        `).join('') }\n                    </div>\n                </div>\n                ${ this.settings.showCustomColors ? `\n                <div class=\"custom-colors\">\n                    <div class=\"custom-colors-header\">\n                        <span>${ this.$app.translation.t('colors:customColors') }</span>\n                        <span><i class=\"icon material-icons add-color\">add</i></span>\n                    </div>\n                    <div class=\"custom-colors-inner\">\n                        <ul class='custom-color-list'>\n                            ${ this.colors.map(color => `\n                            ${ !color.deleted ? `\n                            <li>\n                                <span @click=\"this.setColor(${ color.id }, 'custom')\" class=\"color-label\"><span\n                                        class=\"color-circle\"\n                                        style=\"background-color:${ color.hex }\"></span><span>${ color.name }</span></span>\n                                <span><i class=\"icon material-icons edit-color\"\n                                        @click=\"this.editColor(${ color.id })\">edit</i><i\n                                        class=\"icon material-icons remove-color\"\n                                        @click=\"this.removeColor(${ color.id })\">delete</i></span>\n                            </li>\n                            ` : '' }\n                            `).join('') }\n                        </ul>\n                    </div>\n                </div>\n                ` : '' }\n            </div>\n            <div class=\"color-controls\">\n                <div class=\"row\">\n                    ${ this.settings.showDeleteButton ? `<button @click=\"remove\"\n                        class=\"button col\">${ this.$app.translation.t('colors:remove') }</button>` : `<button\n                        @click=\"cancel\" class=\"button col\">${ this.$app.translation.t('colors:cancel') }</button>` }\n                    <button @click=\"applyColor\"\n                        class=\"button button-fill col\">${ this.$app.translation.t('apply') }</button>\n                </div>\n            </div>\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-styles/css/styles.less\nvar css_styles = __webpack_require__(\"./src/core/custom_plugins/builder-styles/css/styles.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-styles/libs/prism.css\nvar prism = __webpack_require__(\"./src/core/custom_plugins/builder-styles/libs/prism.css\");\n\n// CONCATENATED MODULE: ./node_modules/codejar/codejar.js\nconst globalWindow = window;\nfunction CodeJar(editor, highlight, opt = {}) {\n    const options = Object.assign({ tab: '\\t', indentOn: /[({\\[]$/, moveToNewLine: /^[)}\\]]/, spellcheck: false, catchTab: true, preserveIdent: true, addClosing: true, history: true, window: globalWindow }, opt);\n    const window = options.window;\n    const document = window.document;\n    let listeners = [];\n    let history = [];\n    let at = -1;\n    let focus = false;\n    let callback;\n    let prev; // code content prior keydown event\n    editor.setAttribute('contenteditable', 'plaintext-only');\n    editor.setAttribute('spellcheck', options.spellcheck ? 'true' : 'false');\n    editor.style.outline = 'none';\n    editor.style.overflowWrap = 'break-word';\n    editor.style.overflowY = 'auto';\n    editor.style.whiteSpace = 'pre-wrap';\n    let isLegacy = false; // true if plaintext-only is not supported\n    highlight(editor);\n    if (editor.contentEditable !== 'plaintext-only')\n        isLegacy = true;\n    if (isLegacy)\n        editor.setAttribute('contenteditable', 'true');\n    const debounceHighlight = debounce(() => {\n        const pos = save();\n        highlight(editor, pos);\n        restore(pos);\n    }, 30);\n    let recording = false;\n    const shouldRecord = (event) => {\n        return !isUndo(event) && !isRedo(event)\n            && event.key !== 'Meta'\n            && event.key !== 'Control'\n            && event.key !== 'Alt'\n            && !event.key.startsWith('Arrow');\n    };\n    const debounceRecordHistory = debounce((event) => {\n        if (shouldRecord(event)) {\n            recordHistory();\n            recording = false;\n        }\n    }, 300);\n    const on = (type, fn) => {\n        listeners.push([type, fn]);\n        editor.addEventListener(type, fn);\n    };\n    on('keydown', event => {\n        if (event.defaultPrevented)\n            return;\n        prev = toString();\n        if (options.preserveIdent)\n            handleNewLine(event);\n        else\n            legacyNewLineFix(event);\n        if (options.catchTab)\n            handleTabCharacters(event);\n        if (options.addClosing)\n            handleSelfClosingCharacters(event);\n        if (options.history) {\n            handleUndoRedo(event);\n            if (shouldRecord(event) && !recording) {\n                recordHistory();\n                recording = true;\n            }\n        }\n        if (isLegacy && !isCopy(event))\n            restore(save());\n    });\n    on('keyup', event => {\n        if (event.defaultPrevented)\n            return;\n        if (event.isComposing)\n            return;\n        if (prev !== toString())\n            debounceHighlight();\n        debounceRecordHistory(event);\n        if (callback)\n            callback(toString());\n    });\n    on('focus', _event => {\n        focus = true;\n    });\n    on('blur', _event => {\n        focus = false;\n    });\n    on('paste', event => {\n        recordHistory();\n        handlePaste(event);\n        recordHistory();\n        if (callback)\n            callback(toString());\n    });\n    function save() {\n        const s = getSelection();\n        const pos = { start: 0, end: 0, dir: undefined };\n        let { anchorNode, anchorOffset, focusNode, focusOffset } = s;\n        if (!anchorNode || !focusNode)\n            throw 'error1';\n        // If the anchor and focus are the editor element, return either a full\n        // highlight or a start/end cursor position depending on the selection\n        if (anchorNode === editor && focusNode === editor) {\n            pos.start = (anchorOffset > 0 && editor.textContent) ? editor.textContent.length : 0;\n            pos.end = (focusOffset > 0 && editor.textContent) ? editor.textContent.length : 0;\n            pos.dir = (focusOffset >= anchorOffset) ? '->' : '<-';\n            return pos;\n        }\n        // Selection anchor and focus are expected to be text nodes,\n        // so normalize them.\n        if (anchorNode.nodeType === Node.ELEMENT_NODE) {\n            const node = document.createTextNode('');\n            anchorNode.insertBefore(node, anchorNode.childNodes[anchorOffset]);\n            anchorNode = node;\n            anchorOffset = 0;\n        }\n        if (focusNode.nodeType === Node.ELEMENT_NODE) {\n            const node = document.createTextNode('');\n            focusNode.insertBefore(node, focusNode.childNodes[focusOffset]);\n            focusNode = node;\n            focusOffset = 0;\n        }\n        visit(editor, el => {\n            if (el === anchorNode && el === focusNode) {\n                pos.start += anchorOffset;\n                pos.end += focusOffset;\n                pos.dir = anchorOffset <= focusOffset ? '->' : '<-';\n                return 'stop';\n            }\n            if (el === anchorNode) {\n                pos.start += anchorOffset;\n                if (!pos.dir) {\n                    pos.dir = '->';\n                }\n                else {\n                    return 'stop';\n                }\n            }\n            else if (el === focusNode) {\n                pos.end += focusOffset;\n                if (!pos.dir) {\n                    pos.dir = '<-';\n                }\n                else {\n                    return 'stop';\n                }\n            }\n            if (el.nodeType === Node.TEXT_NODE) {\n                if (pos.dir != '->')\n                    pos.start += el.nodeValue.length;\n                if (pos.dir != '<-')\n                    pos.end += el.nodeValue.length;\n            }\n        });\n        // collapse empty text nodes\n        editor.normalize();\n        return pos;\n    }\n    function restore(pos) {\n        const s = getSelection();\n        let startNode, startOffset = 0;\n        let endNode, endOffset = 0;\n        if (!pos.dir)\n            pos.dir = '->';\n        if (pos.start < 0)\n            pos.start = 0;\n        if (pos.end < 0)\n            pos.end = 0;\n        // Flip start and end if the direction reversed\n        if (pos.dir == '<-') {\n            const { start, end } = pos;\n            pos.start = end;\n            pos.end = start;\n        }\n        let current = 0;\n        visit(editor, el => {\n            if (el.nodeType !== Node.TEXT_NODE)\n                return;\n            const len = (el.nodeValue || '').length;\n            if (current + len > pos.start) {\n                if (!startNode) {\n                    startNode = el;\n                    startOffset = pos.start - current;\n                }\n                if (current + len > pos.end) {\n                    endNode = el;\n                    endOffset = pos.end - current;\n                    return 'stop';\n                }\n            }\n            current += len;\n        });\n        if (!startNode)\n            startNode = editor, startOffset = editor.childNodes.length;\n        if (!endNode)\n            endNode = editor, endOffset = editor.childNodes.length;\n        // Flip back the selection\n        if (pos.dir == '<-') {\n            [startNode, startOffset, endNode, endOffset] = [endNode, endOffset, startNode, startOffset];\n        }\n        s.setBaseAndExtent(startNode, startOffset, endNode, endOffset);\n    }\n    function beforeCursor() {\n        const s = getSelection();\n        const r0 = s.getRangeAt(0);\n        const r = document.createRange();\n        r.selectNodeContents(editor);\n        r.setEnd(r0.startContainer, r0.startOffset);\n        return r.toString();\n    }\n    function afterCursor() {\n        const s = getSelection();\n        const r0 = s.getRangeAt(0);\n        const r = document.createRange();\n        r.selectNodeContents(editor);\n        r.setStart(r0.endContainer, r0.endOffset);\n        return r.toString();\n    }\n    function handleNewLine(event) {\n        if (event.key === 'Enter') {\n            const before = beforeCursor();\n            const after = afterCursor();\n            let [padding] = findPadding(before);\n            let newLinePadding = padding;\n            // If last symbol is \"{\" ident new line\n            if (options.indentOn.test(before)) {\n                newLinePadding += options.tab;\n            }\n            // Preserve padding\n            if (newLinePadding.length > 0) {\n                preventDefault(event);\n                event.stopPropagation();\n                insert('\\n' + newLinePadding);\n            }\n            else {\n                legacyNewLineFix(event);\n            }\n            // Place adjacent \"}\" on next line\n            if (newLinePadding !== padding && options.moveToNewLine.test(after)) {\n                const pos = save();\n                insert('\\n' + padding);\n                restore(pos);\n            }\n        }\n    }\n    function legacyNewLineFix(event) {\n        // Firefox does not support plaintext-only mode\n        // and puts <div><br></div> on Enter. Let's help.\n        if (isLegacy && event.key === 'Enter') {\n            preventDefault(event);\n            event.stopPropagation();\n            if (afterCursor() == '') {\n                insert('\\n ');\n                const pos = save();\n                pos.start = --pos.end;\n                restore(pos);\n            }\n            else {\n                insert('\\n');\n            }\n        }\n    }\n    function handleSelfClosingCharacters(event) {\n        const open = `([{'\"`;\n        const close = `)]}'\"`;\n        const codeAfter = afterCursor();\n        const codeBefore = beforeCursor();\n        const escapeCharacter = codeBefore.substr(codeBefore.length - 1) === '\\\\';\n        const charAfter = codeAfter.substr(0, 1);\n        if (close.includes(event.key) && !escapeCharacter && charAfter === event.key) {\n            // We already have closing char next to cursor.\n            // Move one char to right.\n            const pos = save();\n            preventDefault(event);\n            pos.start = ++pos.end;\n            restore(pos);\n        }\n        else if (open.includes(event.key)\n            && !escapeCharacter\n            && (`\"'`.includes(event.key) || ['', ' ', '\\n'].includes(charAfter))) {\n            preventDefault(event);\n            const pos = save();\n            const wrapText = pos.start == pos.end ? '' : getSelection().toString();\n            const text = event.key + wrapText + close[open.indexOf(event.key)];\n            insert(text);\n            pos.start++;\n            pos.end++;\n            restore(pos);\n        }\n    }\n    function handleTabCharacters(event) {\n        if (event.key === 'Tab') {\n            preventDefault(event);\n            if (event.shiftKey) {\n                const before = beforeCursor();\n                let [padding, start,] = findPadding(before);\n                if (padding.length > 0) {\n                    const pos = save();\n                    // Remove full length tab or just remaining padding\n                    const len = Math.min(options.tab.length, padding.length);\n                    restore({ start, end: start + len });\n                    document.execCommand('delete');\n                    pos.start -= len;\n                    pos.end -= len;\n                    restore(pos);\n                }\n            }\n            else {\n                insert(options.tab);\n            }\n        }\n    }\n    function handleUndoRedo(event) {\n        if (isUndo(event)) {\n            preventDefault(event);\n            at--;\n            const record = history[at];\n            if (record) {\n                editor.innerHTML = record.html;\n                restore(record.pos);\n            }\n            if (at < 0)\n                at = 0;\n        }\n        if (isRedo(event)) {\n            preventDefault(event);\n            at++;\n            const record = history[at];\n            if (record) {\n                editor.innerHTML = record.html;\n                restore(record.pos);\n            }\n            if (at >= history.length)\n                at--;\n        }\n    }\n    function recordHistory() {\n        if (!focus)\n            return;\n        const html = editor.innerHTML;\n        const pos = save();\n        const lastRecord = history[at];\n        if (lastRecord) {\n            if (lastRecord.html === html\n                && lastRecord.pos.start === pos.start\n                && lastRecord.pos.end === pos.end)\n                return;\n        }\n        at++;\n        history[at] = { html, pos };\n        history.splice(at + 1);\n        const maxHistory = 300;\n        if (at > maxHistory) {\n            at = maxHistory;\n            history.splice(0, 1);\n        }\n    }\n    function handlePaste(event) {\n        preventDefault(event);\n        const text = (event.originalEvent || event)\n            .clipboardData\n            .getData('text/plain')\n            .replace(/\\r/g, '');\n        const pos = save();\n        insert(text);\n        highlight(editor);\n        restore({\n            start: Math.min(pos.start, pos.end) + text.length,\n            end: Math.min(pos.start, pos.end) + text.length,\n            dir: '<-',\n        });\n    }\n    function visit(editor, visitor) {\n        const queue = [];\n        if (editor.firstChild)\n            queue.push(editor.firstChild);\n        let el = queue.pop();\n        while (el) {\n            if (visitor(el) === 'stop')\n                break;\n            if (el.nextSibling)\n                queue.push(el.nextSibling);\n            if (el.firstChild)\n                queue.push(el.firstChild);\n            el = queue.pop();\n        }\n    }\n    function isCtrl(event) {\n        return event.metaKey || event.ctrlKey;\n    }\n    function isUndo(event) {\n        return isCtrl(event) && !event.shiftKey && getKeyCode(event) === 'Z';\n    }\n    function isRedo(event) {\n        return isCtrl(event) && event.shiftKey && getKeyCode(event) === 'Z';\n    }\n    function isCopy(event) {\n        return isCtrl(event) && getKeyCode(event) === 'C';\n    }\n    function getKeyCode(event) {\n        let key = event.key || event.keyCode || event.which;\n        if (!key)\n            return undefined;\n        return (typeof key === 'string' ? key : String.fromCharCode(key)).toUpperCase();\n    }\n    function insert(text) {\n        text = text\n            .replace(/&/g, '&amp;')\n            .replace(/</g, '&lt;')\n            .replace(/>/g, '&gt;')\n            .replace(/\"/g, '&quot;')\n            .replace(/'/g, '&#039;');\n        document.execCommand('insertHTML', false, text);\n    }\n    function debounce(cb, wait) {\n        let timeout = 0;\n        return (...args) => {\n            clearTimeout(timeout);\n            timeout = window.setTimeout(() => cb(...args), wait);\n        };\n    }\n    function findPadding(text) {\n        // Find beginning of previous line.\n        let i = text.length - 1;\n        while (i >= 0 && text[i] !== '\\n')\n            i--;\n        i++;\n        // Find padding of the line.\n        let j = i;\n        while (j < text.length && /[ \\t]/.test(text[j]))\n            j++;\n        return [text.substring(i, j) || '', i, j];\n    }\n    function toString() {\n        return editor.textContent || '';\n    }\n    function preventDefault(event) {\n        event.preventDefault();\n    }\n    function getSelection() {\n        var _a;\n        if (((_a = editor.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) == Node.DOCUMENT_FRAGMENT_NODE) {\n            return editor.parentNode.getSelection();\n        }\n        return window.getSelection();\n    }\n    return {\n        updateOptions(newOptions) {\n            Object.assign(options, newOptions);\n        },\n        updateCode(code) {\n            editor.textContent = code;\n            highlight(editor);\n        },\n        onUpdate(cb) {\n            callback = cb;\n        },\n        toString,\n        save,\n        restore,\n        recordHistory,\n        destroy() {\n            for (let [type, fn] of listeners) {\n                editor.removeEventListener(type, fn);\n            }\n        },\n    };\n}\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-styles/templates/styles_editor.f7.es.html\n\n\n\n/* harmony default export */ var styles_editor_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let component = app.builder.editComponent;\n    let styles = app.styles.params.data;\n    let id = component.params.id;\n    let name = component.params.name;\n    let global = _.filter(styles, o => {\n      return o.type == 'global' && !o.deleted && o.name == name;\n    });\n    let local = _.filter(styles, o => {\n      return o.type == 'local' && !o.deleted && id == o.id;\n    });\n    return {\n      globalStyles: global,\n      localStyles: local,\n      id: id,\n      name: name\n    };\n  },\n  methods: {\n    initEditor: function (el) {\n      let $el = $$(el);\n      let app = this.$app;\n      let editorEl = $el.find('.editor');\n      let wrapperEl = $el.find('.wrapper-input');\n      let typeEl = $el.find('.select-type');\n      let delBtnEl = $el.find('.delete-btn');\n      let wrapper = $$(wrapperEl).val();\n      let type = $$(typeEl).val();\n      let styleId = $el.data('id');\n      let style = null;\n      if (!styleId || styleId == 'undefined') {\n        let data = type == 'global' ? this.globalStyles : this.localStyles;\n        style = _.find(data, o => {\n          return o.wrappedBy == wrapper;\n        });\n        style['styleId'] = app.utils.id('xxxx-xxxx-xxxx-xxxx');\n      } else {\n        style = _.find(app.styles.params.data, o => {\n          return o.styleId == styleId;\n        });\n      }\n      const Prism = __webpack_require__(/*! ../libs/prism.js */ \"./src/core/custom_plugins/builder-styles/libs/prism.js\");\n      const jar = new CodeJar(editorEl[0], editor => {\n        editor.innerHTML = Prism.highlight(editor.textContent, Prism.languages.scss, 'scss');\n      }, { spellcheck: true });\n      jar.updateCode(style.css);\n      editorEl.off('blur');\n      editorEl.on('blur', e => {\n        app.styles.updateStyle(style, 'css', jar.toString());\n      });\n      editorEl.off('keydown');\n      editorEl.on('keydown', e => {\n        if (e.keyCode == 13) {\n          app.styles.updateStyle(style, 'css', jar.toString());\n        }\n      });\n      wrapperEl.off('blur');\n      wrapperEl.on('blur', e => {\n        let target = e.target;\n        let value = $$(target).val();\n        app.styles.updateStyle(style, 'wrappedBy', value);\n      });\n      typeEl.off('change');\n      typeEl.on('change', e => {\n        let target = e.target;\n        let value = $$(target).val();\n        app.styles.updateStyle(style, 'type', value);\n        if (value == 'global') {\n          app.styles.updateStyle(style, 'id', '');\n        } else {\n          app.styles.updateStyle(style, 'id', this.id);\n        }\n      });\n      delBtnEl.on('click', e => {\n        app.styles.updateStyle(style, 'deleted', true);\n        this.update();\n      });\n    },\n    addNewStyle: function () {\n      let app = this.$app;\n      let newId = app.styles.createStyle(this.name);\n      this.update();\n    },\n    update: function () {\n      let app = this.$app;\n      let styles = app.styles.params.data;\n      let global = _.filter(styles, o => {\n        return o.type == 'global' && !o.deleted && this.name == o.name;\n      });\n      let local = _.filter(styles, o => {\n        return o.type == 'local' && !o.deleted && this.id == o.id;\n      });\n      this.$setState({\n        globalStyles: global,\n        localStyles: local\n      }, () => {\n        let styleEl = this.$el.find('.style-item');\n        styleEl.forEach(element => {\n          this.initEditor(element);\n        });\n      });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      e.stopImmediatePropagation();\n      let app = page.app;\n      let $block = page.$el;\n      let self = this;\n      let styleEl = $block.find('.style-item');\n      let addEl = $block.find('.add-new');\n      styleEl.forEach(element => {\n        this.initEditor(element);\n      });\n      addEl.off('click');\n      addEl.on('click', e => {\n        this.addNewStyle();\n      });\n    }\n  },\n  id: '75b0e5ed25',\n  render() {\n    return `\n    <div class=\"styles-container list no-hairlines\">\n        <ul class=\"styles-list\">\n            ${ this.globalStyles.map(data => `\n            <li class=\"style-item\" data-id=\"${ data.styleId }\">\n                <div class=\"item-title\">\n                    <div><strong>Style: [ ${ data.styleId ? data.styleId : '' } ]</strong></div>\n                    <div class=\"delete-btn\" data-id=\"${ data.styleId }\">\n                        <i class=\"icon f7-icons\" data-type=\"material-icons\" data-icon=\"trash\"></i>\n                    </div>\n                </div>\n                <div>\n                    <div class=\"wrapper-container\">\n                        <lable>Wrapper element:</lable>\n                        <input type=\"text\" class=\"wrapper-input\" value=\"${ data.wrappedBy }\" />\n                    </div>\n                    <div class=\"select-container\">\n                        <lable>Type of style:</lable>\n                        <select name=\"type\" class=\"select-type\">\n                            <option value=\"global\" ${ data.type == 'global' ? 'selected' : '' }>Global (all components of\n                                same type)</option>\n                            <option value=\"local\" ${ data.type == 'local' ? 'selected' : '' }>Local (this component only)\n                            </option>\n                        </select>\n                    </div>\n                    <lable>SCSS:</lable>\n                    <div class=\"editor language-scss\" id=\"global-styles\"></div>\n                </div>\n            </li>\n            `).join('') }\n            ${ this.localStyles.map(data => `\n            <li class=\"style-item\" data-id=\"${ data.styleId }\">\n                <div class=\"item-title\">\n                    <div><strong>Style: [ ${ data.styleId ? data.styleId : '' } ]</strong></div>\n                    <div class=\"delete-btn\" data-id=\"${ data.styleId }\">\n                        <i class=\"icon f7-icons\" data-type=\"material-icons\" data-icon=\"trash\"></i>\n                    </div>\n                </div>\n                <div>\n                    <div class=\"wrapper-container\">\n                        <lable>Wrapper element:</lable>\n                        <input type=\"text\" class=\"wrapper-input\" value=\"${ data.wrappedBy }\" />\n                    </div>\n                    <div class=\"select-container\">\n                        <lable>Type of style:</lable>\n                        <select name=\"type\" class=\"select-type\">\n                            <option value=\"global\" ${ data.type == 'global' ? 'selected' : '' }>Global (all components of\n                                same type)</option>\n                            <option value=\"local\" ${ data.type == 'local' ? 'selected' : '' }>Local (this component only)\n                            </option>\n                        </select>\n                    </div>\n                    <lable>SCSS:</lable>\n                    <div class=\"editor language-scss\" id=\"global-styles\"></div>\n                </div>\n            </li>\n            `).join('') }\n        </ul>\n        <div class=\"list no-hairlines\">\n            <ul>\n                <li class=\"add-new\">\n                    <button class=\"button button-outline\">ADD <i class=\"icon f7-icons\" data-type=\"f7-icons\"\n                            data-icon=\"add_round_fill\"></i></button>\n                </li>\n            </ul>\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_form-share.f7.es.html\n/* harmony default export */ var builder_form_share_f7_es = ({\n  data: function () {\n    let app = this.$app;\n    let currentGroup = app.builder.currentGroup;\n    return { categories: app.book.getBookChaptersTree() };\n  },\n  methods: {\n    reRender() {\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '2c4d1eac30',\n  render() {\n    return `\n  <div class=\"page\">\n    <div class=\"navbar\">\n      <div class=\"navbar-bg\"></div>\n      <div class=\"navbar-inner sliding\">\n        <div class=\"left\">\n          <a href=\"#\" class=\"link back\">\n            <i class=\"icon icon-back\"></i>\n            <span class=\"ios-only\">Back</span>\n          </a>\n        </div>\n        <div class=\"title\">Tvorba kapitol</div>\n        <div class=\"subnavbar\">\n          <div class=\"subnavbar-inner\">\n            <div class=\"segmented segmented-raised\">\n              <a class=\"button tab-link tab-link-active\" href=\"#tab1\">Tab 1</a>\n              <a class=\"button tab-link\" href=\"#tab2\">Tab 2</a>\n              <a class=\"button tab-link\" href=\"#tab3\">Tab 3</a>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class=\"page-content\">\n\n      <div class=\"block\">\n        Sdílení formuláře\n      </div>\n      <div class=\"block\">\n        Pomocí mailu\n      </div>\n      <div class=\"block-title\">Floating Labels</div>\n      <div class=\"list no-hairlines-md\">\n        <ul>\n          <li class=\"item-content item-input\">\n            <div class=\"item-media\">\n              <i class=\"icon demo-list-icon\"></i>\n            </div>\n            <div class=\"item-inner\">\n              <div class=\"item-title item-floating-label\">E-mail</div>\n              <div class=\"item-input-wrap\">\n                <input type=\"email\" placeholder=\"Your e-mail\">\n                <span class=\"input-clear-button\"></span>\n              </div>\n            </div>\n          </li>\n        </ul>\n      </div>\n\n    </div>\n  </div>\n\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder-navigation-bottom.f7.html\n\n      \n      const builder_navigation_bottom_f7_Template7Helpers = template7_esm[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ var builder_navigation_bottom_f7 = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      builderParams: app.builder.params,\n      currentVersionName: null,\n      haveRightMargin: false,\n      copyToCb: app.builder.copyToCb,\n      users: app.stats.users,\n      activeText: app.translation.t('builder:bottomMenu.active'),\n      inactiveText: app.translation.t('builder:bottomMenu.inactive')\n    };\n  },\n  methods: {\n    marginright: function () {\n      let fux = this.haveRightMargin;\n      if (this.haveRightMargin === true) {\n        return '';\n      } else {\n        this.haveRightMargin = true;\n        return ' style=\"margin-left: auto\" ';\n      }\n    },\n    undo: function () {\n      let app = this.$app;\n      let history = app.builder.history;\n      history.undoButton();\n    },\n    redo: function () {\n      let app = this.$app;\n      let history = app.builder.history;\n      history.redoButton();\n    },\n    save: function () {\n      let app = this.$app;\n      let data = app.builder.getOfflineParams();\n      app.builder.params.development.controls.saveButton.onSaveCallback(data);\n      app.dialog.alert('Uloženo');\n    },\n    saveHistory: function () {\n      let app = this.$app;\n      let data = app.builder.saveVersion();\n    },\n    setHistory: function () {\n      let app = this.$app;\n      let data = app.builder.setVersion();\n    },\n    chapters: function () {\n      let app = this.$app;\n      let data = app.builder.openLeft(4);\n    },\n    settings: function () {\n      let app = this.$app;\n      let data = app.builder.openLeft(6);\n    },\n    diff: function () {\n      let app = this.$app;\n      let data = app.builder.diffVersions();\n    },\n    selectVersion: function () {\n      let app = this.$app;\n      let data = app.builder.openLeft(5);\n    },\n    selectAll: function () {\n      let app = this.$app;\n      let page = app.router.currentPageEl;\n      let directChild = $$(page).children('.bm-component');\n      directChild.forEach(element => {\n        if (!$$(element).hasClass('checked')) {\n          let id = $$(element).attr('id');\n          let component = app.builder.helpers.findComponentById(id);\n          app.builder.checkComponent(component);\n        }\n      });\n      app.data.myEvents.emit('copyToCb:changed');\n    },\n    cancelSelection: function () {\n      let app = this.$app;\n      app.builder.copyToCb = null;\n      let page = app.router.currentPageEl;\n      let checked = $$(page).find('.checked');\n      checked.forEach(element => {\n        $$(element).removeClass('checked');\n        let ico = $$(element).find('#bm-check-component');\n        ico.html('<i class=\"material-icons\">check_box_outline_blank</i>');\n      });\n      app.data.myEvents.emit('copyToCb:changed');\n    },\n    copyToClipboard: async function () {\n      let app = this.$app;\n      const type = 'text/plain';\n      let text = JSON.stringify(app.builder.copyToCb);\n      let blob = new Blob([text], { type });\n      let data = [new ClipboardItem({ [type]: blob })];\n      await navigator.clipboard.write(data);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let self = this;\n      app.data.myEvents.on('versions:nameSet', function () {\n        self.$setState({\n          currentVersionName: page.app.builder.versions.getCurrName(),\n          haveRightMargin: false\n        });\n      });\n      app.data.myEvents.on('copyToCb:changed', function () {\n        self.$setState({\n          copyToCb: app.builder.copyToCb,\n          haveRightMargin: false\n        });\n      });\n    },\n    pageMounted: function (e, page) {\n      let app = page.app;\n      let self = this;\n      app.data.myEvents.on('stats:usersChanged', function () {\n        let stats = [];\n        app.stats.getAllUsers().forEach(function (item) {\n          stats.push({\n            id: item.id,\n            name: item.name\n          });\n        });\n        console.info(`[Stats] (usersChanged) Users in book: ${ JSON.stringify(stats) }`);\n        self.$setState({\n          users: app.stats.getAllUsers(),\n          haveRightMargin: false\n        });\n      });\n    }\n  },\n  id: '4a60b36dac',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"builder-navigation-bottom\" style=\"    position: fixed;\\n    bottom: 0;\\n    left: 0;\\n    width: 100%;\">\\n\\n      <div class=\"menu\">\\n        <div class=\"menu-inner\">\\n\\n          ';\n      r += builder_navigation_bottom_f7_Template7Helpers.js_if.call(ctx_1, 'Array.isArray(this.$app.builder.copyToCb)', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          <span class=\"menu-item\">\\n            <div class=\"menu-item-content\">(';\n          r += builder_navigation_bottom_f7_Template7Helpers.js.call(ctx_2, 'this.$app.builder.copyToCb.length', {\n            hash: {},\n            data: data_2 || {},\n            fn: function empty() {\n              return '';\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += ')</div>\\n          </span>\\n          <a href=\"#\" @click=\"selectAll\" class=\"menu-item\">\\n            <div class=\"menu-item-content\">';\n          r += c(ctx_2.$app.translation.t('builder:bottomMenu.selectAll'), ctx_2);\n          r += '</div>\\n          </a>\\n          <a href=\"#\" @click=\"cancelSelection\" class=\"menu-item\">\\n            <div class=\"menu-item-content\">';\n          r += c(ctx_2.$app.translation.t('builder:bottomMenu.cancelSelection'), ctx_2);\n          r += '</div>\\n          </a>\\n          <a href=\"#\" @click=\"copyToClipboard\" class=\"menu-item\">\\n            <div class=\"menu-item-content\">';\n          r += c(ctx_2.$app.translation.t('builder:bottomMenu.copyToGlobalClip'), ctx_2);\n          r += '</div>\\n          </a>\\n          ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n\\n          ';\n          r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_2, ctx_2.builderParams.development.controls.editChapters, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          <a href=\"#\" @click=\"settings\" class=\"menu-item\">\\n            <div class=\"menu-item-content\"><i class=\"material-icons\">settings</i></div>\\n          </a>\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n\\n          ';\n          r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_2, ctx_2.builderParams.development.controls.editChapters, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          <a href=\"#\" @click=\"chapters\" class=\"menu-item\">\\n            <div class=\"menu-item-content\"><i class=\"material-icons\">book</i></div>\\n          </a>\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n\\n\\n          ';\n          r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_2, ctx_2.builderParams.development.syncServer, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          <a href=\"#\" @click=\"selectVersion\" class=\"menu-item icon-only\">\\n            <div class=\"menu-item-content\">\\n              <span> ';\n              r += c(ctx_3.$app.translation.t('builder:bottomMenu.versionText'), ctx_3);\n              r += ': <strong>\\n                  ';\n              r += c(ctx_3.currentVersionName, ctx_3);\n              r += '</strong></span>\\n            </div>\\n          </a>\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n\\n          ';\n          r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_2, ctx_2.builderParams.development.controls.saveButton.enable, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          <a href=\"#\" @click=\"save\" ';\n              r += c(ctx_3.marginright(), ctx_3);\n              r += ' class=\"menu-item icon-only\">\\n            <div class=\"menu-item-content\">\\n              <i class=\"f7-icons\">save</i>\\n            </div>\\n          </a>\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n\\n\\n          <div class=\"active-user-menu\">\\n            <div class=\"user-menu-inner\">\\n              ';\n          r += builder_navigation_bottom_f7_Template7Helpers.each.call(ctx_2, ctx_2.users, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n              <a class=\"link user-popover-open popover-open\" href=\"#\" data-popover=\".popover-user-';\n              r += c(ctx_3.id, ctx_3);\n              r += '\">\\n                <div class=\"user ';\n              r += c(ctx_3.color, ctx_3);\n              r += '\">\\n                  ';\n              r += c(ctx_3.initials, ctx_3);\n              r += '\\n                  ';\n              r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_3, ctx_3.active, {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n                  <span class=\"active-badge badge color-green\"></span>\\n                  ';\n                  return r;\n                },\n                inverse: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n                  <span class=\"active-badge badge\"></span>\\n                  ';\n                  return r;\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n                </div>\\n              </a>\\n              <div data-backdrop=\"false\" class=\"popover popover-user popover-user-';\n              r += c(ctx_3.id, ctx_3);\n              r += '\">\\n                <div class=\"popover-inner\">\\n                  <div class=\"block\">\\n                    <p class=\"user-name\"><strong>';\n              r += c(ctx_3.name, ctx_3);\n              r += '</strong></p>\\n                    ';\n              r += builder_navigation_bottom_f7_Template7Helpers.if.call(ctx_3, ctx_3.active, {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n\\n                    <p class=\"user-active\">';\n                  r += c(ctx_2.activeText, ctx_4);\n                  r += '</p>\\n                    ';\n                  return r;\n                },\n                inverse: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n\\n                    <p class=\"user-inactive\">';\n                  r += c(ctx_2.inactiveText, ctx_4);\n                  r += '</p>\\n                    ';\n                  return r;\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n                  </div>\\n                </div>\\n              </div>\\n              ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n            </div>\\n          </div>\\n\\n          <a href=\"#\" @click=\"undo\" ';\n          r += c(ctx_2.marginright(), ctx_2);\n          r += ' class=\"menu-item icon-only\">\\n            <div class=\"menu-item-content\">\\n              <i class=\"f7-icons\">undo</i>\\n            </div>\\n          </a>\\n          <a href=\"#\" @click=\"redo\" ';\n          r += c(ctx_2.marginright(), ctx_2);\n          r += ' class=\"menu-item icon-only\">\\n            <div class=\"menu-item-content\">\\n              <i class=\"f7-icons\">redo</i>\\n            </div>\\n          </a>\\n\\n        </div>\\n      </div>\\n      ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n\n`,\n  styleScoped: true,\n  cleanText: ` {{#js_if \"Array.isArray(this.$app.builder.copyToCb)\"}} ({{js \"this.$app.builder.copyToCb.length\"}}) {{$app.translation.t(\"builder:bottomMenu.selectAll\")}} {{$app.translation.t(\"builder:bottomMenu.cancelSelection\")}} {{$app.translation.t(\"builder:bottomMenu.copyToGlobalClip\")}} {{else}} {{#if builderParams.development.controls.editChapters}} {{/if}} {{#if builderParams.development.controls.editChapters}} {{/if}} {{#if builderParams.development.syncServer}} {{$app.translation.t(\"builder:bottomMenu.versionText\")}}: {{currentVersionName}} {{/if}} {{#if builderParams.development.controls.saveButton.enable}} {{/if}} {{#each users}} {{initials}} {{#if active}} {{else}} {{/if}} {{name}} {{#if active}} {{../../activeText}} {{else}} {{../../inactiveText}} {{/if}} {{/each}} {{/js_if}} `\n});\n    \n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/templates/builder_empty_book_chapters.f7.html\n/* harmony default export */ var builder_empty_book_chapters_f7 = ({\n  data: function () {\n  },\n  methods: {},\n  on: {\n    pageInit: function (i, page) {\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: 'a045eb1cc2',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"page-content hide-nav\">\\n\\n      <div class=\"row\">\\n        <div class=\"col-100\" style=\"text-align: center;\">\\n          <h1>';\n      r += c(ctx_1.$app.translation.t('builder:emptyPage.starting'), ctx_1);\n      r += '</h1>\\n          <p>';\n      r += c(ctx_1.$app.translation.t('builder:emptyPage.makeChapter'), ctx_1);\n      r += '</p>\\n          <p>';\n      r += c(ctx_1.$app.translation.t('builder:emptyPage.chapterMenu'), ctx_1);\n      r += '</p>\\n        </div>\\n      </div>\\n      <div class>\\n\\n\\n        <i class=\"icon material-icons arrow-animated bounce\">arrow_downward</i>\\n      </div>\\n\\n    </div>\\n  </div>\\n\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-a045eb1cc2] .page-content {\n    max-width: 100vw;\n    height: 100vh;\n  }\n\n[data-f7-a045eb1cc2] .arrow-animated {\n    bottom: 35px;\n    position: absolute;\n    left: 25px;\n    font-size: 85px;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"builder:emptyPage.starting\")}} {{$app.translation.t(\"builder:emptyPage.makeChapter\")}} {{$app.translation.t(\"builder:emptyPage.chapterMenu\")}} `\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/builder-controls.less\nvar builder_controls = __webpack_require__(\"./src/core/custom_plugins/builder/css/builder-controls.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/builderMenu.less\nvar builderMenu = __webpack_require__(\"./src/core/custom_plugins/builder/css/builderMenu.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/edit-content.less\nvar edit_content = __webpack_require__(\"./src/core/custom_plugins/builder/css/edit-content.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/navigationBottom.less\nvar navigationBottom = __webpack_require__(\"./src/core/custom_plugins/builder/css/navigationBottom.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/selectable.less\nvar selectable = __webpack_require__(\"./src/core/custom_plugins/builder/css/selectable.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/list-numbering.less\nvar list_numbering = __webpack_require__(\"./src/core/custom_plugins/builder/css/list-numbering.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/bounce.less\nvar bounce = __webpack_require__(\"./src/core/custom_plugins/builder/css/bounce.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/css/add-first-button.less\nvar add_first_button = __webpack_require__(\"./src/core/custom_plugins/builder/css/add-first-button.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/builder-page_new.less\nvar builder_page_new = __webpack_require__(\"./src/core/custom_plugins/builder/components/builder-page_new.less\");\n\n// EXTERNAL MODULE: ./node_modules/animate.css/animate.css\nvar animate_css_animate = __webpack_require__(\"./node_modules/animate.css/animate.css\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-01.less\nvar tx_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-01.js\n\n/* harmony default export */ var text_tx_01 = ({\n  name: \"tx-01\",\n  title: \"Text block\",\n  subtitle: \"plain text block\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n  <div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\">\".concat(content.text, \"</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      // $block.find('.bm-wrapper').css('color', 'red');\n      // let vw = $block.find('.bm-wrapper').css('--fb-wrapper-width');\n      // let styles = $block.find('.bm-wrapper')[0].style.setProperty(\"--fb-wrapper-width\", \"300px\");;\n      // debugger\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // if (app.params.builder.development) {\n      //   let $el = $block.find(\".tx\");\n      //   $el.on(\"click\", (e) => {\n      //     app.builder.editComponent = builder;\n      //     app.builder.openLeft(1);\n      //   });\n      // }\n    },\n    visible: function visible(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      0;\n      setTimeout(function () {\n        // $block.css('color','red');\n        // $block.addClass('animate__animated animate__fadeInDown');\n      }, 0);\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-02.less\nvar tx_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-02.js\n\n/* harmony default export */ var text_tx_02 = ({\n  name: \"tx-02\",\n  title: \"Text block\",\n  subtitle: \"in two columns\",\n  deleted: true,\n  contentSetting: {\n    text: {\n      name: \"Column 1\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    text2: {\n      name: \"Column 2\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: \"<a class=\\\"button button-round button-outline button-small tooltip-init\\\" data-tooltip=\\\"Button tooltip text\\\">Button with Tooltip</a> Book <strong>design</strong> is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \\\"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied.\\\" Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.\",\n    text2: '2 Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder) {\n    return \"\\n<div class=\\\"row\\\">\\n<div class=\\\"col-100 medium-50\\\">\\n <div field=\\\"text\\\">\".concat(content.text, \"</div>\\n</div>\\n<div class=\\\"col-100 medium-50\\\">\\n <div field=\\\"text\\\">\").concat(content.text2, \"</div>\\n</div>\\n</div>\\n\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-03.less\nvar tx_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-03.js\n\n/* harmony default export */ var text_tx_03 = ({\n  name: \"tx-03\",\n  title: \"Text block\",\n  subtitle: \"with quotes\",\n  deleted: true,\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"quote-highlight\\\">\\n        <img src=\\\"\".concat(component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/rrke19b2t78ozf7l46uihazjx00pciavmsa1lq7npfkcw8igqrv3vo90uk2y21kt.png'), \"\\\" alt=\\\"\\\">\\n            <div class=\\\"text-container\\\">\\n              \").concat(content.text, \"\\n            </div>\\n       <img src=\\\"\").concat(component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/rrke19b2t78ozf7l46uihazjx00pciavmsa1lq7npfkcw8igqrv3vo90uk2y21kt.png'), \"\\\" alt=\\\"\\\">\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      // $block.find('.bm-wrapper').css('color', 'red');\n      // let vw = $block.find('.bm-wrapper').css('--fb-wrapper-width');\n      // let styles = $block.find('.bm-wrapper')[0].style.setProperty(\"--fb-wrapper-width\", \"300px\");;\n      // debugger\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // if (app.params.builder.development) {\n      //   let $el = $block.find(\".tx\");\n      //   $el.on(\"click\", (e) => {\n      //     app.builder.editComponent = builder;\n      //     app.builder.openLeft(1);\n      //   });\n      // }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-04.less\nvar tx_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-04.js\n\n/* harmony default export */ var text_tx_04 = ({\n  name: \"tx-04\",\n  title: \"Text block\",\n  subtitle: \"with border\",\n  deleted: true,\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder) {\n    return \"\\n  <div class=\\\"tx-border tx selectable\\\" data-c=\\\"text\\\" field=\\\"text\\\">\".concat(content.text, \"</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      // $block.find('.bm-wrapper').css('color', 'red');\n      // let vw = $block.find('.bm-wrapper').css('--fb-wrapper-width');\n      // let styles = $block.find('.bm-wrapper')[0].style.setProperty(\"--fb-wrapper-width\", \"300px\");;\n      // debugger\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // if (app.params.builder.development) {\n      //   let $el = $block.find(\".tx\");\n      //   $el.on(\"click\", (e) => {\n      //     app.builder.editComponent = builder;\n      //     app.builder.openLeft(1);\n      //   });\n      // }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-05.less\nvar tx_05 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-05.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-05.js\n\n/* harmony default export */ var text_tx_05 = ({\n  name: \"tx-05\",\n  title: \"Text block\",\n  subtitle: \"with border in two columns\",\n  deleted: true,\n  contentSetting: {\n    text: {\n      name: \"Text of first column\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    text2: {\n      name: \"Text of second column\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.',\n    text2: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder) {\n    return \"\\n  <div class=\\\"tx-border tx selectable\\\" data-c=\\\"text\\\" field=\\\"text\\\">\\n  <div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-50\\\">\\n    <div field=\\\"text\\\">\".concat(content.text, \"</div>\\n    </div>\\n    <div class=\\\"col-100 medium-50\\\">\\n    <div field=\\\"text\\\">\").concat(content.text2, \"</div>\\n    </div>\\n  </div>\\n  </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      // $block.find('.bm-wrapper').css('color', 'red');\n      // let vw = $block.find('.bm-wrapper').css('--fb-wrapper-width');\n      // let styles = $block.find('.bm-wrapper')[0].style.setProperty(\"--fb-wrapper-width\", \"300px\");;\n      // debugger\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // if (app.params.builder.development) {\n      //   let $el = $block.find(\".tx\");\n      //   $el.on(\"click\", (e) => {\n      //     app.builder.editComponent = builder;\n      //     app.builder.openLeft(1);\n      //   });\n      // }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-06.less\nvar tx_06 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-06.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-06.js\n\n/* harmony default export */ var text_tx_06 = ({\n  name: \"tx-06\",\n  title: \"Text block\",\n  subtitle: \"as list with images instead of bullets\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    bullet: {\n      name: \"Image of bullet\",\n      // not necessary there\n      type: \"image\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.',\n    bullet: \"{{mediaServerDomain}}/public/g7aj8pepw8bynb0492sgku81gcee9o2jrauem1gcs8mpm920ac20vsidzezjrneg.png\"\n  },\n  html: function html(content, builder) {\n    return \"\\n  <div class=\\\"list-billet-container\\\"><div class=\\\"list-bullet\\\"><img src=\\\"\".concat(content.bullet, \"\\\"></img></div><div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\">\").concat(content.text, \"</div></div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      // $block.find('.bm-wrapper').css('color', 'red');\n      // let vw = $block.find('.bm-wrapper').css('--fb-wrapper-width');\n      // let styles = $block.find('.bm-wrapper')[0].style.setProperty(\"--fb-wrapper-width\", \"300px\");;\n      // debugger\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // if (app.params.builder.development) {\n      //   let $el = $block.find(\".tx\");\n      //   $el.on(\"click\", (e) => {\n      //     app.builder.editComponent = builder;\n      //     app.builder.openLeft(1);\n      //   });\n      // }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-07.less\nvar tx_07 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-07.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-07.js\n\n/* harmony default export */ var text_tx_07 = ({\n  name: \"tx-07\",\n  title: \"Text block\",\n  subtitle: \"with big first letter \",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder) {\n    var wholeText = content.text;\n    var wholeText2 = content.text;\n    var firstChar = wholeText.slice(0, 1);\n    // debugger\n    if (firstChar === \"<\") {\n      //let regex = /(?<=>)([a-zA-Z])/;\n      //var pCL = 'a-zA-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ';\n      // https://regex101.com/r/YkSmoa/1\n      // let regex = /((?:<[^>]+>)+)([^\\u0000-\\u007E]|[0-9]|[A-Z])([\\s\\S]+)?/;\n      var regex = /((?:<[^>]+>)+)([^\\\\u0000-\\\\u007E]|[0-9]|[A-Z])([\\s\\S]+)/;\n      var match = wholeText2.match(regex);\n      if (match) {\n        wholeText = \"\".concat(match[1], \"<span class=\\\"dropped\\\">\").concat(match[2], \"</span>\").concat(match[3]);\n      }\n\n      // debugger\n      // wholeText = wholeText2.replace(regex, '<span class=\"dropped\">$0</span>');\n    } else {\n      var rest = wholeText.slice(1, content.text.length);\n      wholeText = \"<span class=\\\"dropped\\\">\".concat(firstChar, \"</span>\").concat(rest);\n    }\n    return \"\\n  <div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\">\\n    \".concat(wholeText, \"\\n\\n</div>\\n\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-08.less\nvar tx_08 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-08.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-08.js\n\n/* harmony default export */ var text_tx_08 = ({\n  name: \"tx-08\",\n  title: \"Text block with component wrapping\",\n  subtitle: \"Components on left side\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      type: \"textEditor\"\n    },\n    componentWidth: {\n      name: \"Width of component box (with unit - %, px)\",\n      type: \"textarea\"\n    },\n    topOffset: {\n      name: \"Width of component box (in px)\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    text: \"Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \\\"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.\\n    Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \\\"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.\",\n    componentWidth: \"40%\",\n    topOffset: \"0\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    if (content.componentWidth.includes(\"%\") && parseInt(content.componentWidth) > 100) {\n      content.componentWidth = \"100%\";\n    }\n    return \"\\n    <div class=\\\"shape-container\\\" style=\\\"--width: \".concat(content.componentWidth, \"; --offsetTop: \").concat(content.topOffset, \"px;\\\" >\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    <div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\">\").concat(content.text, \"</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-09.less\nvar tx_09 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-09.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-09.js\n\n/* harmony default export */ var text_tx_09 = ({\n  name: \"tx-09\",\n  title: \"Text block with component wrapping\",\n  subtitle: \"Components on right side\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      type: \"textEditor\"\n    },\n    componentWidth: {\n      name: \"Width of component box (with unit - %, px)\",\n      type: \"textarea\"\n    },\n    topOffset: {\n      name: \"Width of component box (in px)\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    text: \"Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \\\"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.\\n    Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \\\"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.\",\n    componentWidth: \"40%\",\n    topOffset: \"0\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    if (content.componentWidth.includes(\"%\") && parseInt(content.componentWidth) > 100) {\n      content.componentWidth = \"100%\";\n    }\n    return \"\\n    <div class=\\\"shape-container\\\" style=\\\"--width: \".concat(content.componentWidth, \"; --offsetTop: \").concat(content.topOffset, \"px;\\\" >\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    <div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\">\").concat(content.text, \"</div>\\n\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-10.less\nvar tx_10 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/tx-10.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/tx-10.js\n\n/* harmony default export */ var text_tx_10 = ({\n  name: \"tx-10\",\n  title: \"Text block\",\n  subtitle: \"in column\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    columns: {\n      name: \"Number of columns\",\n      type: \"select\",\n      options: [{\n        title: \"2\",\n        value: 2\n      }, {\n        title: \"3\",\n        value: 3\n      }]\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.',\n    columns: 2\n  },\n  html: function html(content, builder) {\n    return \"\\n  <div class=\\\"tx selectable tx-justify-break-hyphens\\\" data-c=\\\"text\\\" field=\\\"text\\\" style=\\\"--fb-tx-10-columns: \".concat(content.columns, \";\\\">\").concat(content.text, \"</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/text/todo-01.less\nvar todo_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/text/todo-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/text/todo-01.js\n\n/* harmony default export */ var text_todo_01 = ({\n  name: \"todo-01\",\n  title: \"Todo block\",\n  subtitle: \"to redmine missing matterials\",\n  contentSetting: {\n    text: {\n      name: \"Text value\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: \"Missing image\"\n  },\n  html: function html(content, builder) {\n    return \"\\n    <div class=\\\"tx selectable todo-container\\\">\\n        <span class=\\\"todo-heading\\\">TODO: </span>\\n        <span class=\\\"todo-text\\\">\\n        \".concat(content.text, \"\\n        </span>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-01.less\nvar gl_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/gallery/gl-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-utils.js\nfunction gl_utils_getRef() {\n  var _this = this;\n  var refArray = [];\n  var components = this.getPageComponentsReference();\n  var chapter = this.chapterReference;\n  var counter = 1;\n  var flag = true;\n  components.forEach(function (el, index) {\n    if (el.params.id == _this.params.id) {\n      flag = false;\n      return;\n    }\n    var methods = el.params.methods;\n    if (methods && methods.hasOwnProperty(\"getImagesReference\") && flag) {\n      counter++;\n    }\n  });\n\n  // debugger;\n\n  var chapterNumber = \"\";\n  var numbered = true;\n  if (chapter.isNumbered) {\n    chapterNumber = chapter.number;\n  } else {\n    chapterNumber = chapter.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") + \".\";\n    numbered = false;\n  }\n  var alphabet = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n  var photos = this.params.content.photos.filter(function (o) {\n    return !o.deleted;\n  });\n  photos.forEach(function (photo, index) {\n    var refObj = {};\n    var subCounter = \"\";\n    if (_this.params.content.photos.length > 1) {\n      subCounter = alphabet[index];\n    }\n    refObj[\"string\"] = chapterNumber + counter + subCounter;\n    refObj[\"title\"] = photo.title;\n    refObj[\"id\"] = _this.params.id;\n    refObj[\"chapterName\"] = chapter.name;\n    refObj[\"chapterLink\"] = chapter.fullPath;\n    refObj[\"isNumbered\"] = numbered;\n    refArray.push(refObj);\n  });\n  return refArray;\n}\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-01.js\n\n\n/* harmony default export */ var gallery_gl_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"gl-01\",\n  group: \"gallery\",\n  title: \"Gallery 1\",\n  subtitle: \"Standard gallery\",\n  contentSetting: {\n    number: {\n      name: \"Number of images per line\",\n      type: \"input-number\"\n    },\n    decoration: {\n      name: \"Border style\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Shadow\",\n        value: \"elevation\"\n      }, {\n        title: \"Card\",\n        value: \"card\"\n      }, {\n        title: \"Border (simple)\",\n        value: \"basic-border\"\n      }, {\n        title: \"Border (papyrus)\",\n        value: \"papyrus\"\n      }]\n    },\n    showNumbering: {\n      name: \"Show numbering in image description\",\n      type: \"bool\"\n    },\n    photos: {\n      name: \"Photo\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Image description\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    photos: [{\n      path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      title: \"Popisek 1\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\"\n    }],\n    number: 2,\n    decoration: {\n      selected: \"card\"\n    },\n    showNumbering: false\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var columns = 100;\n    if (parseInt(content.number) > 0) {\n      columns = Math.trunc(100 / parseInt(content.number));\n    }\n    var decor = \"\";\n    var ref = component.params.methods.getImagesReference();\n    // debugger;\n    switch (content.decoration.selected) {\n      case \"none\":\n        decor = \"\";\n        break;\n      case \"elevation\":\n        decor = \"elevation-10\";\n        break;\n      case \"card\":\n        decor = \"card card-content-padding\";\n        break;\n      case \"papyrus\":\n        decor = \"papyrus\";\n        break;\n      case \"basic-border\":\n        decor = \"basic-border\";\n        break;\n    }\n    return \"\\n\\n<div class=\\\"row\\\">\\n              \".concat(content.photos.map(function (photo, index) {\n      return \"\\n<div class=\\\"col-\".concat(columns, \" col-fixed-height\\\"  \").concat(styles.authorx, \">\\n                  <div class=\\\"\").concat(decor, \"\\\">\\n                    <img class=\\\"open-gallery\\\" alt=\\\"\").concat(encodeURIComponent(photo.title), \"\\\" src=\\\"\").concat(photo.path, \"\\\">\\n                    \").concat(photo.title.length > 0 ? \"<div class=\\\"photo-title\\\">\".concat(content.showNumbering ? ref[index].string + \": \" : \"\").concat(photo.title, \"</div>\") : \"\", \"\\n                </div>\\n            </div>\\n          \");\n    }).join(\"\"), \"\\n\\n              </div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $block = $builderEl;\n      // alert(builder.params.id);\n      $block.find(\"img\").off(\"click\").off(\"click\").on(\"click\", function () {\n        // alert(\"img\");\n      });\n      // this.params.methods.getImagesReference();\n    },\n    update: function update($builderEl, builder) {\n      // alert(\"builder \"+builder.name +\"updated\");\n\n      $builderEl.find(\"img\").off(\"click\").on(\"click\", function () {\n        // alert(\"img\");\n      });\n    }\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return gl_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-02.less\nvar gl_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/gallery/gl-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-02.js\n\n\n/* harmony default export */ var gallery_gl_02 = ({\n  name: \"gl-02\",\n  group: \"gallery\",\n  title: \"Gallery 2\",\n  subtitle: \"Sliding gallery\",\n  contentSetting: {\n    photos: {\n      name: \"Photo\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Image description\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    photos: [{\n      path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      title: \"Popisek 1\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\"\n    }]\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n<!--swiper-init data-space-between=\\\"10\\\" data-slides-per-view=\\\"auto\\\" data-centered-slides=\\\"true\\\"-->\\n      <div>\\n        <div key=\\\"gl-02\\\" id=\\\"gl-02\\\" data-pagination='{\\\"el\\\": \\\".swiper-pagination\\\"}' data-centered-slides=\\\"true\\\" data-space-between=\\\"50\\\"  class=\\\"swiper-init swiper-container demo-swiper\\\">\\n          \".concat(content.photos.length < 2 ? \"\" : '<div class=\"swiper-pagination\"></div>', \"\\n          <div class=\\\"swiper-wrapper\\\">\\n            \").concat(content.photos.map(function (photo, index) {\n      return \"\\n        <div class=\\\"swiper-slide\\\" id=\\\"k-\".concat(index, \"\\\">\\n                    <img class=\\\"gl-02-mh\\\" alt=\\\"\").concat(encodeURIComponent(photo.title), \"\\\" src=\\\"\").concat(photo.path, \"\\\">\\n                    </div>\\n                  \");\n    }).join(\"\"), \"\\n          </div>\\n        </div>\\n      </div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $block = $builderEl;\n      builder.app.swiper.create($builderEl.find(\"#gl-02\"), {\n        spaceBetween: 50,\n        slidesPerView: 1,\n        centeredSlides: true,\n        pagination: {\n          el: \".swiper-pagination\"\n        }\n      });\n\n      //   builder.params.methods.getImagesReference =\n      //     gl01.methods.getImagesReference.bind(builder);\n      // },\n    }\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return gl_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-03.less\nvar gl_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/gallery/gl-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/image-source/get-source.js\nvar getSource = function getSource(source) {\n  if (!source) {\n    return '';\n  }\n  return \"<div class=\\\"source-container\\\">\\n<span class=\\\"info-button\\\">\\n<i class=\\\"icon material-icons\\\" data-icon=\\\"info\\\"></i>\\n<span class=\\\"source-text\\\">\".concat(source, \"</span></span></div>\");\n};\n/* harmony default export */ var get_source = (getSource);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-03.js\n\n\n\n/* harmony default export */ var gallery_gl_03 = ({\n  name: \"gl-03\",\n  title: \"Gallery 3\",\n  group: \"gallery\",\n  subtitle: \"Sliding gallery with thumbnails\",\n  contentSetting: {\n    ratio: {\n      name: \"Ratio style\",\n      type: \"select\",\n      options: [{\n        title: \"none\",\n        value: \"none\"\n      }, {\n        title: \"16/9\",\n        value: 1.77\n      }, {\n        title: \"4/3\",\n        value: 1.33\n      }, {\n        title: \"1/1\",\n        value: 1\n      }, {\n        title: \"2/1\",\n        value: 2\n      }]\n    },\n    photos: {\n      name: \"Photo\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Image description\",\n          type: \"textEditor\"\n        },\n        source: {\n          name: \"Image source\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    photos: [{\n      path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      title: \"Popisek 1\",\n      source: \"\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\",\n      source: \"\"\n    }],\n    ratio: \"none\"\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div class=\\\"gallery-container\\\">\\n      <div class=\\\"swiper-container gallery-top\\\">\\n        <div class=\\\"swiper-wrapper\\\">\\n        \".concat(content.photos.map(function (photo, index) {\n      return \"\\n            <div class=\\\"swiper-slide\\\" style=\\\"position: relative;\\\">\\n              <img class=\\\"open-gallery\\\" alt=\\\"\".concat(encodeURIComponent(photo.title), \"\\\" src=\\\"\").concat(photo.path, \"\\\" style=\\\"aspect-ratio: \").concat(content.ratio, \"\\\" />\\n               \").concat(get_source(photo.source), \"\\n            </div>\\n              \");\n    }).join(\"\"), \"\\n\\n        </div>\\n        <div class=\\\"swiper-button-next swiper-button-white\\\"></div>\\n        <div class=\\\"swiper-button-prev swiper-button-white\\\"></div>\\n      </div>\\n      <div class=\\\"image-title\\\">\\n      \").concat(content.photos[0].title, \"\\n      </div>\\n      <div class=\\\"swiper-container gallery-thumbs\\\">\\n        <div class=\\\"swiper-wrapper\\\">\\n        \").concat(content.photos.map(function (photo, index) {\n      return \"\\n            <div class=\\\"swiper-slide\\\" >\\n            <img  src=\\\"\".concat(photo.path, \"\\\" style=\\\"aspect-ratio: \").concat(content.ratio, \"\\\" />\\n</div>\\n              \");\n    }).join(\"\"), \"\\n        </div>\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var _this = this;\n      var $block = $builderEl;\n      // builder.app.swiper.create($builderEl.find(\"#gl-02\"), {\n      //   spaceBetween: 50,\n      //   slidesPerView: 1,\n      //   centeredSlides: true,\n      //   pagination: { el: \".swiper-pagination\" },\n      // });\n\n      var galleryThumbs = builder.app.swiper.create($block.find(\".gallery-thumbs\"), {\n        spaceBetween: 10,\n        slidesPerView: 4,\n        freeMode: true,\n        watchSlidesVisibility: true,\n        watchSlidesProgress: true\n      });\n      var galleryTop = builder.app.swiper.create($block.find(\".gallery-top\"), {\n        spaceBetween: 10,\n        navigation: {\n          nextEl: \".swiper-button-next\",\n          prevEl: \".swiper-button-prev\"\n        },\n        thumbs: {\n          swiper: galleryThumbs\n        }\n      });\n      galleryTop.on(\"slideChange\", function () {\n        var images = _.filter(_this.params.content.photos, function (o) {\n          return !o.deleted;\n        });\n        $builderEl.find(\".image-title\").html(images[galleryTop.activeIndex].title);\n      });\n    }\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return gl_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-04.less\nvar gl_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/gallery/gl-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-04.js\n\n\n\n/* harmony default export */ var gallery_gl_04 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"gl-04\",\n  group: \"gallery\",\n  title: \"Gallery 4\",\n  subtitle: \"Standard gallery\",\n  contentSetting: {\n    number: {\n      name: \"Number of images per line\",\n      type: \"input-number\"\n    },\n    showNumbering: {\n      name: \"Show numbering in image description\",\n      type: \"bool\"\n    },\n    ratio: {\n      name: \"Ratio style\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"16/9\",\n        value: 1.77\n      }, {\n        title: \"4/3\",\n        value: 1.33\n      }, {\n        title: \"1/1\",\n        value: 1\n      }, {\n        title: \"2/1\",\n        value: 2\n      }]\n    },\n    photos: {\n      name: \"Photo\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Image description\",\n          type: \"textEditor\"\n        },\n        source: {\n          name: \"Image source\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    photos: [{\n      path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      title: \"Popisek 1\",\n      source: \"\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\",\n      source: \"\"\n    }],\n    number: 2,\n    showNumbering: false,\n    ratio: \"none\"\n  },\n  html: function html(content, builder, styles, component) {\n    var decor = \"\";\n    var columns = 100;\n    var ref = component.params.methods.getImagesReference();\n    if (parseInt(content.number) > 0) {\n      columns = Math.trunc(100 / parseInt(content.number));\n    }\n    return \"<div class=\\\"row\\\">\\n              \".concat(content.photos.map(function (photo, index) {\n      return \"<div class=\\\"col-\".concat(columns, \" img-container\\\">\\n                  <div class=\\\"\").concat(decor, \"\\\">\\n                    <div style=\\\"position:relative\\\">\\n                    <img class=\\\"open-gallery\\\" alt=\\\"\").concat(encodeURIComponent(photo.title), \"\\\" src=\\\"\").concat(photo.path, \"\\\" style=\\\"aspect-ratio: \").concat(content.ratio, \"\\\"/>\\n                      \").concat(get_source(photo.source), \"\\n                    </div>\\n                    \").concat(photo.title.length > 0 ? \"<div class=\\\"image-title\\\">\".concat(content.showNumbering ? ref[index].string + \": \" : \"\").concat(photo.title, \"</div>\") : \"\", \"\\n                </div>\\n            </div>\");\n    }).join(\"\"), \"\\n            </div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return gl_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./node_modules/masonry-layout/masonry.js\nvar masonry = __webpack_require__(\"./node_modules/masonry-layout/masonry.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-05.less\nvar gl_05 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/gallery/gl-05.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/gallery/gl-05.js\n\n\n\n\n/* harmony default export */ var gallery_gl_05 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"gl-05\",\n  group: \"gallery\",\n  title: \"Gallery 5\",\n  subtitle: \"Masonry gallery\",\n  contentSetting: {\n    showNumbering: {\n      name: \"Show numbering in image description\",\n      type: \"bool\"\n    },\n    number: {\n      name: \"Number of columns (number of images per line)\",\n      type: \"input-number\"\n    },\n    gap: {\n      name: \"Gap between images (with unit)\",\n      type: \"textarea\"\n    },\n    photos: {\n      name: \"Photo\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        column: {\n          name: \"Column span\",\n          type: \"input-number\"\n        },\n        row: {\n          name: \"Row span\",\n          type: \"input-number\"\n        },\n        title: {\n          name: \"Image description\",\n          type: \"textEditor\"\n        },\n        source: {\n          name: \"Image source\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    photos: [{\n      path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      title: \"Popisek 1\",\n      source: \"\",\n      row: 1,\n      col: 1\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\",\n      source: \"\",\n      row: 1,\n      col: 1\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\",\n      source: \"\",\n      row: 2,\n      col: 1\n    }, {\n      path: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      title: \"Popisek 2\",\n      source: \"\",\n      row: 1,\n      col: 2\n    }],\n    gap: \"1rem\",\n    number: 3,\n    showNumbering: false,\n    ratio: \"none\"\n  },\n  html: function html(content, builder, styles, component) {\n    var ref = component.params.methods.getImagesReference();\n    return \"<div class=\\\"grid\\\" style=\\\"--columns: \".concat(content.number, \";  --gap:\").concat(content.gap, \"\\\">\\n              \").concat(content.photos.map(function (photo, index) {\n      return \"\\n                  <div class=\\\"grid-item\\\" style=\\\"--columns: \".concat(photo.column, \"; --rows:  \").concat(photo.row, \";\\\">\\n                    <img class=\\\"open-gallery \\\" alt=\\\"\").concat(encodeURIComponent(photo.title), \"\\\" src=\\\"\").concat(photo.path, \"\\\"/>\\n                    \").concat(get_source(photo.source), \"\\n                    </div>\");\n    }).join(\"\"), \"\\n            </div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return gl_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/title/tl-01.less\nvar tl_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/title/tl-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/title/tl-01.js\n\n\n// make css rules\n// let rule =\n\n// možnost, jak udělat náhled elementu:\n//   https://github.com/tsayen/dom-to-image\n\nvar globalFont = 30;\nvar sg = \"green\";\n/* harmony default export */ var title_tl_01 = ({\n  name: \"tl-01\",\n  title: \"Big title\",\n  subtitle: \"Optional: note and subtitle\",\n  contentSetting: {\n    author: {\n      type: \"textEditor\",\n      name: \"Note\"\n    },\n    head: {\n      type: \"textEditor\",\n      name: \"Main title\"\n    },\n    subhead: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    author: \"John Doe x\",\n    head: \"How to write headlines that actually work?\",\n    subhead: \"A headline's purpose is to quickly and briefly draw attention to the story. It is generally written by a copy editor, but may also be written by the writer, the page layout designer, or other editors.\"\n  },\n  // styles:{\n  //   bm:{\n  //     // borderColor: 'pink',\n  //     border: {\n  //       color: 'pink',\n  //       width: 1,\n  //       style: 'solid'\n  //     },\n  //     'background-color' : \"green\"\n  //   },\n  //   author: {\n  //     backgroundColor: 'red'\n  //   },\n  //   head: {},\n  //   subhead: {}\n  // },\n  html: function html(content, builder, styles) {\n    return \"\\n  <div class=\\\"author selectable\\\" data-c=\\\"author\\\" \".concat(styles.author, \" field=\\\"author\\\">\").concat(content.author, \"</div>\\n  <h1 class=\\\"head\\\" \").concat(styles.head, \" field=\\\"\\\"><span class=\\\"selectable\\\"  data-c=\\\"head\\\">\").concat(content.head, \"</span></h1>\\n  <div class=\\\"subhead selectable\\\" \").concat(styles.subhead, \" field=\\\"subhead\\\"  data-c=\\\"subhead\\\">\").concat(content.subhead, \"</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/title/tl-02.less\nvar tl_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/title/tl-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/title/tl-02.js\n\n\n// make css rules\n// let rule =\n\n// možnost, jak udělat náhled elementu:\n//   https://github.com/tsayen/dom-to-image\n\nvar tl_02_globalFont = 30;\nvar tl_02_sg = \"green\";\n/* harmony default export */ var title_tl_02 = ({\n  name: \"tl-02\",\n  title: \"Title\",\n  subtitle: \"simple title aligned to left\",\n  contentSetting: {\n    size: {\n      name: \"Size of the title\",\n      type: \"select\",\n      options: [{\n        title: \"h1\",\n        value: \"h1\"\n      }, {\n        title: \"h2\",\n        value: \"h2\"\n      }, {\n        title: \"h3\",\n        value: \"h3\"\n      }, {\n        title: \"h4\",\n        value: \"h4\"\n      }, {\n        title: \"h5\",\n        value: \"h5\"\n      }, {\n        title: \"h6\",\n        value: \"h6\"\n      }]\n    },\n    type: {\n      name: \"Title decoration\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Side lines\",\n        value: \"middle-line\"\n      }, {\n        title: \"Underline\",\n        value: \"under-line\"\n      }]\n    },\n    head: {\n      type: \"textEditor\",\n      name: \"Main title\"\n    }\n  },\n  content: {\n    head: \"Nadpis 1\",\n    size: {\n      selected: \"h2\"\n    },\n    type: {\n      selected: \"none\"\n    }\n  },\n  // styles:{\n  //   bm:{\n  //     // borderColor: 'pink',\n  //     border: {\n  //       color: 'pink',\n  //       width: 1,\n  //       style: 'solid'\n  //     },\n  //     'background-color' : \"green\"\n  //   },\n  //   author: {\n  //     backgroundColor: 'red'\n  //   },\n  //   head: {},\n  //   subhead: {}\n  // },\n  html: function html(content, builder, styles) {\n    return \"\\n    \".concat(content.type.selected == \"middle-line\" ? \"<div class='middle-line-container'>\" : \"\", \"\\n        \").concat(content.type.selected == \"under-line\" ? \"<div class='under-line-container'>\" : \"\", \"\\n  <\").concat(content.size.selected, \" class=\\\"head\\\" \").concat(styles.head, \" field=\\\"\\\"><span>\").concat(content.head, \"</span></\").concat(content.size.selected, \">\\n  \").concat(content.type.selected == \"none\" ? \"\" : \"</div>\", \"\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js\nvar sc_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js\nvar sc_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js\nvar sc_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/frm-01.less\nvar frm_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/frm-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/frm-01.js\n\n\n\n\n//Inspirace: https://data-driven-forms.org/\n//https://elfsight.com/online-form-builder/html/#demo\n\n/* harmony default export */ var forms_frm_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"frm-01\",\n  title: \"Form\",\n  subtitle: \"editable\",\n  contentSetting: {\n    formName: {\n      name: \"Form title\",\n      type: \"textEditor\"\n    },\n    saveUserData: {\n      name: \"Save user data?\",\n      help: \"If the user fills something in the form, his data will remain in the form even after leaving and re-loading the page.\",\n      type: \"bool\",\n      hidden: {\n        saveUserDataLogin: {\n          name: \"Save data only for logged user?\",\n          type: \"bool\"\n        }\n      }\n    },\n    results: {\n      name: \"Display as a quiz?\",\n      help: \"After evaluating the test, the user can see the correct results, points and user is able to redo the test.\",\n      type: \"bool\",\n      hidden: {\n        buttons: {\n          send: {\n            name: \"Evaluation button text\",\n            type: \"textarea\"\n          }\n        },\n        resetButton: {\n          name: \"Reset button text\",\n          type: \"textarea\"\n        },\n        showResult: {\n          name: \"Show points after evaluation?\",\n          type: \"bool\"\n        },\n        requireAnswers: {\n          name: \"Require fill answers to allow evaluation\",\n          type: \"bool\"\n        },\n        showCorrectAnswers: {\n          name: \"Show correct answer after evaluation?\",\n          type: \"bool\"\n        },\n        showGraph: {\n          name: \"Show graph with results after evaluation?\",\n          type: \"bool\"\n        },\n        showResultText: {\n          name: \"Show text after evaluation?\",\n          type: \"bool\",\n          hidden: {\n            resultTexts: {\n              name: \"Text after evaluation\",\n              type: \"array\",\n              values: {\n                pointsFrom: {\n                  name: \"If result value is greater or equal then:\",\n                  type: \"input-number\"\n                },\n                pointsTo: {\n                  name: \"If result value is less or equal then:\",\n                  type: \"input-number\"\n                },\n                text: {\n                  name: \"Text to display\",\n                  type: \"textEditor\"\n                }\n              }\n            }\n          }\n        },\n        start: {\n          name: \"Start test after request?\",\n          help: \"Test questions will not be visible until the user presses the button to run the test, you have the option to set confirm popup.\",\n          type: \"bool\",\n          hidden: {\n            startText: {\n              name: \"Text before start\",\n              type: \"textEditor\"\n            },\n            startButton: {\n              name: \"Start button text\",\n              type: \"textarea\"\n            },\n            timeLimit: {\n              name: \"Limit the time to complete the test?\",\n              type: \"bool\",\n              hidden: {\n                timeLimitVal: {\n                  name: \"Time in minutes:\",\n                  type: \"input-number\"\n                }\n              }\n            },\n            oneStart: {\n              name: \"Allow to start only once?\",\n              help: \"User must be logged in befor starting the test\"\n            },\n            confirmStart: {\n              name: \"Show confirmation before start of the test?\",\n              type: \"bool\",\n              hidden: {\n                confirmStartText: {\n                  name: \"Confirmation text\",\n                  type: \"textEditor\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    shuffle: {\n      name: \"Automatically shuffle questions in the test?\",\n      type: \"bool\"\n    },\n    share: {\n      name: \"Allow share of the form?\",\n      type: \"bool\"\n    }\n    // mustBelogged:{\n    //   name: 'Pouze pro přihlášené uživatele?',\n    //   type: 'bool'\n    // },\n    //\n    // dateTimeLimit:{\n    //   name: \"Časově omezit možnost spuštění testu do:\",\n    //   type: \"input-datetime\"\n    // },\n  },\n  content: {\n    buttons: {\n      send: \"Vyhodnotit\"\n    },\n    // cancel: 'zrušit',\n    formName: \"Název formuláře\",\n    results: true,\n    showResult: true,\n    showCorrectAnswers: true,\n    shuffle: false,\n    share: true,\n    requireAnswers: false,\n    mustBelogged: false,\n    dateTimeLimit: \"\",\n    timeLimit: \"\",\n    start: false,\n    startText: \"Tlačítkem níže zahájíte vyplňování testu\",\n    startButton: \"Spustit test\",\n    oneStart: false,\n    confirmStart: true,\n    confirmStartText: \"Opvravdu si přejete spustit test?\",\n    resetButton: \"Resetovat test\",\n    showGraph: true,\n    showResultText: true,\n    resultTexts: [{\n      pointsFrom: 0,\n      pointsTo: 5,\n      text: \"Špatně!\"\n    }, {\n      pointsFrom: 6,\n      pointsTo: 30,\n      text: \"Výborně!\"\n    }],\n    saveUserData: true,\n    saveUserDataLogin: false\n  },\n  userContent: {\n    //informace o nejlepším výsledku dosaženém uživatelem\n    points: 0\n  },\n  helpVariables: {\n    evaluated: false,\n    totalPoints: 0,\n    userPoints: 0,\n    loadTest: true,\n    startOnRequest: false,\n    allowedToEval: true\n  },\n  componentsAllowedGroup: {\n    q: \"formElGroup\",\n    s: \"basicGroup\"\n  },\n  components: [],\n  html: function html(content, builder, styles, component, userContent) {\n    var app = component.app;\n    var helpVariables = component.params.helpVariables;\n    // let helpVariables = component.params.helpVariables;\n    if (content.start) {\n      return \"\\n      \".concat(content.formName.length > 0 ? \"<h1>\" + content.formName + \"</h1>\" : \"\", \"\\n\\n      <div class=\\\"block\\\">\\n      \").concat(content.startText, \"\\n\\n    </div>\\n<div class=\\\"row\\\">\\n     <a id=\\\"startTest\\\" class=\\\"col-33 button button-fill\\\" href=\\\"#\\\">\").concat(content.startButton, \"</a>\\n     <!--<a class=\\\"col button button-outline\\\" href=\\\"#\\\">\").concat(content.cancel, \"</a>-->\\n     </div>\\n      \");\n    } else {\n      var gauge = \"\";\n      var percentage = Math.round(helpVariables.userPoints / helpVariables.totalPoints * 100);\n      if (content.showGraph && helpVariables.evaluated) {\n        gauge = \"<div\\n        id=\\\"gauge-\".concat(percentage, \"\\\"\\n        class=\\\"gauge gauge-init my-gauge\\\"\\n        data-type=\\\"circle\\\"\\n        data-value=\\\"\").concat(percentage / 100, \"\\\"\\n        data-value-text=\\\"\").concat(percentage, \" %\\\"\\n        data-value-text-color=\\\"\").concat(app.book.params.color, \"\\\"\\n        data-border-color=\\\"\").concat(app.book.params.color, \"\\\"\\n        data-label-text=\\\"\").concat(helpVariables.userPoints, \" / \").concat(helpVariables.totalPoints, \"\\\"\\n      ></div>\");\n      } else {\n        gauge = \"\";\n      }\n      var resText = \"\";\n      if (content.showResultText && helpVariables.evaluated) {\n        for (var i = 0; i < content.resultTexts.length; i++) {\n          if (parseFloat(helpVariables.userPoints) >= parseFloat(content.resultTexts[i].pointsFrom) && parseFloat(helpVariables.userPoints) <= parseFloat(content.resultTexts[i].pointsTo)) {\n            resText = \"<div class=\\\"resText\\\">\".concat(content.resultTexts[i].text, \"</div>\");\n            break;\n          }\n        }\n      }\n      var resetButton = \"\";\n      if (helpVariables.evaluated) {\n        resetButton = \"<a id=\\\"reset\\\" href=\\\"#\\\" class=\\\"button\\\">\".concat(content.resetButton, \"</a>\");\n      }\n      var resultsButtons = \"\";\n      if (content.results) {\n        resultsButtons = \"<div class=\\\"block button-result\\\">\\n  <p class=\\\"segmented segmented-raised\\\">\\n    <a id=\\\"test\\\" href=\\\"#\\\" class=\\\"button  button-active\\\">\".concat(content.buttons.send, \"</a>\\n    \").concat(resetButton, \"\\n  </p>\\n</div>\\n     <!--<a id=\\\"getUserData\\\" class=\\\"col-33 button button-outline\\\" href=\\\"#\\\">UserData</a>-->\\n\\n         <!--<a id=\\\"t-show\\\" class=\\\"col-33 button button-outline\\\" href=\\\"#\\\">show</a>-->\\n    <!---->\\n     <!--<a id=\\\"t-hide\\\" class=\\\"col-33 button button-outline\\\" href=\\\"#\\\">hide</a>-->\\n\");\n      }\n      if (helpVariables.loadTest) {\n        return \"\\n\\n        \".concat(content.formName.length > 0 ? \"<h2>\" + content.formName + \"</h2>\" : \"\", \"\\n\\n<form class=\\\"list\\\" id=\\\"my-form\\\" >\\n  <ul id=\\\"rrr\\\">\\n\\n              \").concat(component.renderComponents(\"q\", \"\", \"\", content.shuffle), \"\\n<!--            <li>-->\\n<!--</li>-->\\n\\n\").concat(gauge, \"\\n\\n\\n\").concat(resText, \"\\n\\n  </ul>\\n\\n\\n</form>\\n\\n\\n\\n     \").concat(resultsButtons, \"\\n\\n\\n\\n\\n            \");\n      } else {\n        return \"\";\n      }\n    }\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var app = component.app;\n      // let formComponent = component;\n      component.params.bindEvalButton($builderEl, component);\n      component.params.bindStarButton($builderEl, component);\n      component.params.bindReset($builderEl, component);\n      // component.params.bindUserData($builderEl, component);\n    }\n  },\n  bindStarButton: function bindStarButton($builderEl, formComponent) {\n    // debugger\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    $builderEl.find(\"#startTest\").off(\"click\").on(\"click\", function (e) {\n      if (content.confirmStart) {\n        app.dialog.confirm(\"\", content.confirmStartText, function () {\n          content.start = false;\n          // formComponent.pageComponentContext.$setState();\n        }, function () {});\n      } else {\n        content.start = false;\n        // formComponent.pageComponentContext.$setState();\n      }\n    });\n  },\n  bindUserData: function bindUserData($builderEl, formComponent) {\n    // debugger\n    var app = formComponent.app;\n    $builderEl.find(\"#getUserData\").off(\"click\").on(\"click\", /*#__PURE__*/function () {\n      var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(e) {\n        var points, maxPoints, subcomponents;\n        return regenerator_default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              // builder.app.dialog.alert('click');\n              points = 0;\n              maxPoints = 0;\n              subcomponents = app.builder.flattenComponents(formComponent.components); // debugger\n              subcomponents.forEach(function (subComponent) {\n                if (subComponent.params.hasOwnProperty(\"getUserData\")) {\n                  var vals = subComponent.params.getUserData(subComponent);\n                  var data = {\n                    id: subComponent.params.id,\n                    data: vals\n                  };\n                }\n              });\n            case 4:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee);\n      }));\n      return function (_x) {\n        return _ref.apply(this, arguments);\n      };\n    }());\n  },\n  bindEvalButton: function bindEvalButton($builderEl, formComponent) {\n    // debugger\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpVariables = formComponent.params.helpVariables;\n    $builderEl.find(\"#test\").off(\"click\").off(\"click\").on(\"click\", /*#__PURE__*/function () {\n      var _ref2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(e) {\n        var points, maxPoints, subcomponents;\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              formComponent.params.helpVariables.allowedToEval = true;\n              if (content.results) {\n                points = 0;\n                maxPoints = 0;\n                subcomponents = app.builder.flattenComponents(formComponent.components, [], null, false); // debugger;\n                subcomponents.forEach(function (subComponent) {\n                  if (subComponent.params.methods && subComponent.params.methods.eval && !subComponent.params.content.delete && subComponent.$block //Možná může nastat chyba, pokud bude třeba vyhodnocovat komponentu bez $block\n                  ) {\n                    if (content.requireAnswers && subComponent.params.methods.hasOwnProperty(\"isAnswered\") && subComponent.params.methods.isAnswered(subComponent, formComponent) || !content.requireAnswers || !subComponent.params.methods.hasOwnProperty(\"isAnswered\")) {\n                      var obj = subComponent.params.methods.eval(subComponent, formComponent);\n                      points += parseFloat(obj.points);\n                      maxPoints += parseFloat(obj.totalPoints);\n                    } else {\n                      var title = app.translation.t(\"builder:content.requestAnswerTitle\");\n                      var text = app.translation.t(\"builder:content.requestAnswerText\");\n                      app.dialog.alert(text, title);\n                      formComponent.params.helpVariables.allowedToEval = false;\n                    }\n                  }\n                });\n                if (formComponent.params.helpVariables.allowedToEval) {\n                  formComponent.params.helpVariables.totalPoints = maxPoints;\n                  formComponent.params.helpVariables.userPoints = points;\n                  formComponent.params.helpVariables.evaluated = true;\n                  //nejlepší výsledek je uložen do user Content\n\n                  if (formComponent.params.userContent.points < points) {\n                    formComponent.params.userContent.points = points;\n                  }\n                }\n                formComponent.reload(true);\n              }\n            case 2:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2);\n      }));\n      return function (_x2) {\n        return _ref2.apply(this, arguments);\n      };\n    }());\n  },\n  bindReset: function bindReset($builderEl, formComponent) {\n    var app = formComponent.app;\n    $builderEl.find(\"#reset\").off(\"click\").on(\"click\", /*#__PURE__*/function () {\n      var _ref3 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(e) {\n        var subcomponents;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              formComponent.params.helpVariables.evaluated = false;\n              formComponent.params.helpVariables.allowedToEval = true;\n              formComponent.reRender();\n              subcomponents = app.builder.flattenComponents(formComponent.components, [], null, false);\n              subcomponents.forEach(function (subComponent) {\n                if (subComponent.params && subComponent.params.methods && subComponent.params.methods && subComponent.params.methods.getUserData) {\n                  subComponent.params.userContent.data = {};\n                }\n                if (subComponent.params.helpVariables && subComponent.params.helpVariables.resText) {\n                  subComponent.params.helpVariables.resText = \"\";\n                }\n\n                // subComponent.reload();\n              });\n\n              // debugger;\n              app.data.myEvents.emit(\"form:reset\");\n            case 6:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3);\n      }));\n      return function (_x3) {\n        return _ref3.apply(this, arguments);\n      };\n    }());\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/frm-02.less\nvar frm_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/frm-02.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\nvar parsePoints = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/frm-02.js\n\n\n\n//Inspirace: https://data-driven-forms.org/\n//https://elfsight.com/online-form-builder/html/#demo\n\n/* harmony default export */ var forms_frm_02 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"frm-02\",\n  title: \"Form\",\n  subtitle: \"with steps\",\n  contentSetting: {\n    showPublic: {\n      name: \"Show version for read\",\n      type: \"bool\"\n    },\n    checkSteps: {\n      name: \"Check answer after one step\",\n      type: \"bool\"\n    },\n    randomizeOrder: {\n      name: \"Randomize order of questions\",\n      type: \"bool\"\n    },\n    shuffleAnswers: {\n      name: \"Shuffle answers\",\n      type: \"bool\"\n    },\n    showStart: {\n      name: \"Show start screen?\",\n      type: \"bool\",\n      hidden: {\n        startButton: {\n          name: \"Start button text\",\n          type: \"textarea\"\n        },\n        showTimer: {\n          name: \"Show timer?\",\n          type: \"bool\",\n          hidden: {\n            timerStartText: {\n              name: \"Total time text\",\n              type: \"textarea\"\n            },\n            timerText: {\n              name: \"Running timer text\",\n              type: \"textarea\"\n            },\n            countdown: {\n              name: \"Use timer as countdown\",\n              type: \"bool\",\n              hidden: {\n                countdownText: {\n                  name: \"Countdown text\",\n                  type: \"textarea\"\n                },\n                timeIsUpText: {\n                  name: \"Time is up text\",\n                  type: \"textarea\"\n                },\n                limit: {\n                  name: \"Time limit (seconds)\",\n                  type: \"input-number\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    showResultText: {\n      name: \"Show text after evaluation?\",\n      type: \"bool\",\n      hidden: {\n        resultTexts: {\n          name: \"Text after evaluation\",\n          type: \"array\",\n          values: {\n            pointsFrom: {\n              name: \"If result value is greater or equal then:\",\n              type: \"input-number\"\n            },\n            pointsTo: {\n              name: \"If result value is less or equal then:\",\n              type: \"input-number\"\n            },\n            text: {\n              name: \"Text to display\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    },\n    noTimerText: {\n      name: \"Text without timer\",\n      type: \"textarea\"\n    },\n    resetButton: {\n      name: \"Reset button text\",\n      type: \"textarea\"\n    },\n    nextButton: {\n      name: \"Next button text\",\n      type: \"textarea\"\n    },\n    checkButton: {\n      name: \"Check answer button text\",\n      type: \"textarea\"\n    },\n    finishButton: {\n      name: \"Finish button text\",\n      type: \"textarea\"\n    },\n    showGraph: {\n      name: \"Show graph with results after evaluation?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    showPublic: false,\n    showStart: true,\n    showTimer: false,\n    countdown: false,\n    showCorrectAnswers: true,\n    showResult: true,\n    limit: 60,\n    startButton: \"Spustit test\",\n    resetButton: \"Restartovat test\",\n    nextButton: \"Další\",\n    checkButton: \"Zkontrolovat otázku\",\n    timerStartText: \"Časový limit testu\",\n    finishButton: \"Dokončit test\",\n    countdownText: \"Zbývající čas\",\n    noTimerText: \"Test není časově omezen\",\n    timerText: \"Čas od spuštění\",\n    timeIsUpText: \"Čas vypršel\",\n    showGraph: true,\n    showResultText: true,\n    randomizeOrder: false,\n    resultTexts: [{\n      pointsFrom: 0,\n      pointsTo: 5,\n      text: \"Špatně!\"\n    }, {\n      pointsFrom: 6,\n      pointsTo: 30,\n      text: \"Výborně!\"\n    }]\n  },\n  helpVariables: {\n    time: 0,\n    stage: \"start\",\n    interval: null,\n    step: 0,\n    checkStep: true,\n    totalPoints: 0,\n    userPoints: 0,\n    currentStepId: null\n  },\n  componentsAllowedGroup: {\n    q: \"formElGroup2\",\n    start: \"basicGroup\",\n    finish: \"basicGroup\"\n  },\n  components: [],\n  html: function html(content, builder, styles, component, userContent) {\n    var app = component.app;\n    var helpers = component.params.helpVariables;\n    var methods = component.params;\n    var gauge = \"\";\n    if (content.showGraph) {\n      var percentage = Math.round(helpers.userPoints / helpers.totalPoints * 100);\n      gauge = \"<div\\n        id=\\\"gauge-\".concat(percentage, \"\\\"\\n        class=\\\"gauge gauge-init my-gauge\\\"\\n        data-type=\\\"circle\\\"\\n        data-value=\\\"\").concat(percentage / 100, \"\\\"\\n        data-value-text=\\\"\").concat(percentage, \" %\\\"\\n        data-value-text-color=\\\"\").concat(app.book.params.color, \"\\\"\\n        data-border-color=\\\"\").concat(app.book.params.color, \"\\\"\\n        data-label-text=\\\"\").concat(Object(parsePoints[\"formatNumber\"])(helpers.userPoints), \" / \").concat(Object(parsePoints[\"formatNumber\"])(helpers.totalPoints), \"\\\"\\n      ></div>\");\n    }\n    var resText = \"\";\n    if (content.showResultText) {\n      for (var i = 0; i < content.resultTexts.length; i++) {\n        if (parseFloat(helpers.userPoints) >= parseFloat(content.resultTexts[i].pointsFrom) && parseFloat(helpers.userPoints) <= parseFloat(content.resultTexts[i].pointsTo)) {\n          resText = \"<div class=\\\"resText\\\">\".concat(content.resultTexts[i].text, \"</div>\");\n          break;\n        }\n      }\n    }\n    return \"\\n    \\n    <div class=\\\"form-container \".concat(content.showPublic || !app.builder.params.development.enable ? 'read' : 'dev', \"\\\">\\n      <div class=\\\"custom-tab-layout\\\">\\n        <div class=\\\"toolbar tabbar\\\">\\n          <div class=\\\"toolbar-inner\\\">\\n          \").concat(content.showStart ? \"\\n            <span  data-id=\\\"start\\\" class=\\\"start tab-link custom-tab-link custom-tab-link-active\\\">\\n                <span class=\\\"icon-container\\\"><i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"timer_fill\\\"></i></span>\\n                Start\\n            </span>\" : '', \"\\n\\n          <span data-id=\\\"form\\\" class=\\\"form tab-link custom-tab-link \").concat(!content.showStart ? 'custom-tab-link-active' : '', \"\\\">\\n              <span class=\\\"icon-container\\\"><i class=\\\"icon material-icons input-with-value\\\" contenteditable=\\\"false\\\" data-icon=\\\"assignment\\\"></i></span>\\n              Form\\n              </span>\\n          <span  data-id=\\\"results\\\" class=\\\"results tab-link custom-tab-link\\\">\\n              <span class=\\\"icon-container\\\"><i class=\\\"icon material-icons input-with-value\\\" contenteditable=\\\"false\\\" data-icon=\\\"assignment_turned_in\\\"></i></span>\\n              Results\\n              </span>\\n          </div>\\n        </div>\\n        <div class=\\\"tabs-wrap\\\">\\n          <div class=\\\"tabs\\\">\\n            \").concat(content.showStart ? \"<div id=\\\"start\\\" class=\\\"custom-tab custom-tab-active\\\"> \\n              \".concat(component.renderComponents(\"start\"), \"\\n              \\n              <div class=\\\"control-row\\\">\\n                  <div class=\\\"timer-container\\\">\\n                    <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"timer_fill\\\"></i>\\n                    \").concat(content.showTimer && content.countdown ? \"\".concat(content.timerStartText, \": \").concat(methods.formatTime(content.limit)) : content.noTimerText, \" \\n                  </div>\\n                  <div class=\\\"btn\\\">\\n                    <a id=\\\"startTest\\\" class=\\\"button button-fill\\\" href=\\\"#\\\">\").concat(content.startButton, \"</a>\\n                  </div>\\n              </div>\\n              </div>\") : '', \"\\n            <div id=\\\"form\\\" class=\\\"custom-tab \").concat(!content.showStart ? 'custom-tab-active' : '', \"\\\">\\n             <form class=\\\"list\\\" id=\\\"my-form\\\">\\n             \").concat(component.renderComponents(\"q\"), \"\\n\\n             <div class=\\\"control-row\\\">\\n               <div class=\\\"timer-container\\\">\\n               <span class=\\\" \").concat(content.showTimer ? '' : 'hidden', \"\\\">\\n                 <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"timer_fill\\\"></i>\\n                 <span>\").concat(content.countdown ? content.countdownText : content.timerText, \": <span class=\\\"timer\\\">\").concat(methods.formatTime(helpers.time), \"</span></span>\\n               </span>\\n                 </div>\\n                 <div class=\\\"stepper\\\">\\n                     \\n                 </div>\\n               <div class=\\\"btn\\\">\\n                 <a id=\\\"stepButton\\\" class=\\\"button button-fill\\\" href=\\\"#\\\">\").concat(content.nextButton, \"</a>\\n                 <a id=\\\"finishButton\\\" class=\\\"button button-fill hidden\\\" href=\\\"#\\\">\").concat(content.finishButton, \"</a>\\n                 <a id=\\\"checkButton\\\" class=\\\"button button-fill hidden\\\" href=\\\"#\\\">\").concat(content.checkButton, \"</a>\\n               </div>\\n             </div>\\n             </form>\\n              \\n            </div>\\n            <div id=\\\"results\\\" class=\\\"custom-tab \\\">\\n              \").concat(component.renderComponents(\"finish\"), \"\\n              \").concat(gauge, \"\\n              \").concat(resText, \"\\n              <div class=\\\"control-row\\\">\\n              <div class=\\\"timer-container\\\">\\n                <span class=\\\" \").concat(content.showTimer ? '' : 'hidden', \"\\\">\\n                  <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"timer_fill\\\"></i>\\n                  <span>\").concat(content.countdown ? content.countdownText : content.timerText, \": \").concat(content.countdown && helpers.time == 0 ? content.timeIsUpText : methods.formatTime(helpers.time), \"</span>\\n                </span>\\n              </div>\\n              <div class=\\\"btn\\\">\\n                <a id=\\\"resetTest\\\" class=\\\"button button-fill\\\" href=\\\"#\\\">\").concat(content.resetButton, \"</a>\\n              </div>\\n            </div>\\n            </div>\\n          </div>\\n        </div>\\n\\n      </div>\\n    </div>\\n    \\n    \");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var app = component.app;\n      var content = component.params.content;\n      var helpers = component.params.helpVariables;\n      if (content.showPublic || !app.builder.params.development.enable) {\n        if (content.showStart) {\n          component.params.bindStarButton($builderEl, component);\n        } else {\n          helpers.stage = \"test\";\n        }\n        component.params.setQuestionOrder($builderEl, component);\n        component.params.setFormStage($builderEl, component);\n        component.params.bindNextButton($builderEl, component);\n        component.params.bindFinishButton($builderEl, component);\n        component.params.bindResetButton($builderEl, component);\n        component.params.bindAnswerChecker($builderEl, component);\n        if (content.checkSteps) {\n          component.params.bindCheckButton($builderEl, component);\n        }\n      } else {\n        component.params.bindDevTabs($builderEl, component);\n      }\n    }\n  },\n  setQuestionOrder: function setQuestionOrder($builderEl, formComponent) {\n    var content = formComponent.params.content;\n    var formEl = $builderEl.find(\"#form\");\n    var components = formEl.find(\".bm-component\");\n\n    //   components.forEach(function(element, index) {\n    //     var classes = $(element).attr('class');\n    //     var filteredClasses = (classes.match(/(^|\\s)order-\\S+/g) || []).join(' ');\n    //     $(element).removeClass(filteredClasses);\n    // });\n\n    var order = Array.from({\n      length: components.length\n    }, function (_, index) {\n      return index;\n    });\n    if (content.randomizeOrder) {\n      order.sort(function () {\n        return Math.random() - 0.5;\n      });\n    }\n    components.forEach(function (element, index) {\n      var currentOrder = order[index];\n      $$(element).attr('data-order', currentOrder);\n      // $$(element).classList.add('order-' + order[index]);\n    });\n  },\n  bindAnswerChecker: function bindAnswerChecker($builderEl, formComponent) {\n    var app = formComponent.app;\n    formComponent.params.allowNextStep({\n      id: null,\n      isAnswered: false\n    }, $builderEl, formComponent);\n    app.data.myEvents.off(\"form:answer\", function (e) {\n      return formComponent.params.allowNextStep(e, $builderEl, formComponent);\n    });\n    app.data.myEvents.on(\"form:answer\", function (e) {\n      return formComponent.params.allowNextStep(e, $builderEl, formComponent);\n    });\n  },\n  allowNextStep: function allowNextStep(obj, $builderEl, formComponent) {\n    var self = this;\n    var helpers = formComponent.params.helpVariables;\n    var content = formComponent.params.content;\n    var stepButton = $builderEl.find(\"#stepButton\");\n    var checkButton = $builderEl.find(\"#checkButton\");\n    var finButton = $builderEl.find(\"#finishButton\");\n    if (obj.id == helpers.currentStepId) {\n      if (obj.isAnswered) {\n        //Enable\n        if (!content.checkSteps) {\n          $$(stepButton).removeClass(\"disabled\");\n          $$(finButton).removeClass(\"disabled\");\n        }\n        $$(checkButton).removeClass(\"disabled\");\n      } else {\n        //Disable\n        if (!content.checkSteps) {\n          $$(stepButton).addClass(\"disabled\");\n          $$(finButton).addClass(\"disabled\");\n        }\n        $$(checkButton).addClass(\"disabled\");\n      }\n    }\n  },\n  bindDevTabs: function bindDevTabs($builderEl, formComponent) {\n    var $buttons = $builderEl.find(\".custom-tab-link\");\n    $buttons.off(\"click\");\n    $buttons.on(\"click\", function (e) {\n      var target = $$(e.target);\n      if (!target.hasClass(\"custom-tab-link\")) {\n        target = target.parents(\".custom-tab-link\");\n      }\n      var id = target.data(\"id\");\n      var old = $builderEl.find(\".custom-tab-active\");\n      old.removeClass(\"custom-tab-active\");\n      if (!target.hasClass(\"custom-tab-link-active\")) {\n        var tab = $builderEl.find(\"#\".concat(id));\n        var oldLink = $builderEl.find(\".custom-tab-link-active\");\n        oldLink.removeClass(\"custom-tab-link-active\");\n        tab.addClass(\"custom-tab-active\");\n        target.addClass(\"custom-tab-link-active\");\n      } else {\n        target.removeClass(\"custom-tab-link-active\");\n      }\n    });\n  },\n  bindNextButton: function bindNextButton($builderEl, formComponent) {\n    var helpers = formComponent.params.helpVariables;\n    $builderEl.find(\"#stepButton\").off(\"click\").on(\"click\", function (e) {\n      helpers.step++;\n      helpers.checkStep = true;\n      formComponent.params.setFormStep($builderEl, formComponent);\n    });\n  },\n  bindCheckButton: function bindCheckButton($builderEl, formComponent) {\n    var app = formComponent.app;\n    var helpers = formComponent.params.helpVariables;\n    var form = $builderEl.find(\"#form\")[0];\n    $builderEl.find(\"#checkButton\").off(\"click\").on(\"click\", function (e) {\n      helpers.checkStep = false;\n      var activeEl = $$(form).find(\".active\");\n      var id = activeEl[0].id;\n      var component = app.builder.helpers.findComponentById(id);\n      if (component.params.methods && component.params.methods.eval && !component.params.content.delete && component.$block //Možná může nastat chyba, pokud bude třeba vyhodnocovat komponentu bez $block\n      ) {\n        component.params.methods.eval(component, formComponent);\n      }\n      helpers.checkStep = false;\n      formComponent.params.setFormStep($builderEl, formComponent);\n    });\n  },\n  bindFinishButton: function bindFinishButton($builderEl, formComponent) {\n    var helpers = formComponent.params.helpVariables;\n    $builderEl.find(\"#finishButton\").off(\"click\").on(\"click\", function (e) {\n      helpers.stage = \"finish\";\n      clearInterval(helpers.interval);\n      formComponent.params.setFormStage($builderEl, formComponent);\n    });\n  },\n  bindResetButton: function bindResetButton($builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    $builderEl.find(\"#resetTest\").off(\"click\").on(\"click\", function (e) {\n      helpers.stage = \"start\";\n      helpers.time = 0;\n      helpers.step = 0;\n      formComponent.reRender();\n      var subcomponents = app.builder.flattenComponents(formComponent.components, [], null, false);\n      subcomponents.forEach(function (subComponent) {\n        if (subComponent.params && subComponent.params.methods && subComponent.params.methods && subComponent.params.methods.getUserData) {\n          subComponent.params.userContent.data = {};\n        }\n        if (subComponent.params.helpVariables && subComponent.params.helpVariables.resText) {\n          subComponent.params.helpVariables.resText = \"\";\n        }\n      });\n      app.data.myEvents.emit(\"form:reset\");\n    });\n  },\n  bindStarButton: function bindStarButton($builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    var methods = formComponent.params;\n    var form = $builderEl.find(\"#form\")[0];\n    var timer = $$(form).find(\".timer\");\n    if (content.showTimer && content.countdown) {\n      helpers.time = content.limit;\n      timer.text(methods.formatTime(helpers.time));\n    }\n    $builderEl.find(\"#startTest\").off(\"click\").on(\"click\", function (e) {\n      helpers.stage = \"test\";\n      formComponent.params.setFormStage($builderEl, formComponent);\n      // debugger;\n      if (content.showTimer && content.countdown) {\n        helpers.interval = setInterval(function () {\n          helpers.time--;\n          timer.text(methods.formatTime(helpers.time));\n          if (helpers.time == 0) {\n            helpers.stage = \"finish\";\n            formComponent.params.setFormStage($builderEl, formComponent);\n          }\n        }, 1000);\n      } else {\n        helpers.interval = setInterval(function () {\n          helpers.time++;\n          timer.text(methods.formatTime(helpers.time));\n        }, 1000);\n      }\n    });\n  },\n  setFormStage: function setFormStage($builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    var startEl = $builderEl.find(\"#start\");\n    var formEl = $builderEl.find(\"#form\");\n    var resultEl = $builderEl.find(\"#results\");\n    switch (helpers.stage) {\n      case 'start':\n        formEl.addClass(\"hidden\");\n        resultEl.addClass(\"hidden\");\n        break;\n      case 'test':\n        startEl.addClass(\"hidden\");\n        formEl.removeClass(\"hidden\");\n        resultEl.addClass(\"hidden\");\n        formComponent.params.setFormStep($builderEl, formComponent);\n        break;\n      case 'finish':\n        startEl.addClass(\"hidden\");\n        formEl.removeClass(\"hidden\");\n        resultEl.removeClass(\"hidden\");\n        var components = formEl.find(\".bm-component\");\n        formEl.find(\".control-row\").addClass(\"hidden\");\n        components.forEach(function (element, index) {\n          $$(element).removeClass(\"hidden\");\n          $$(element).removeClass(\"active\");\n        });\n        helpers.stage = \"done\";\n        formComponent.params.evalAll($builderEl, formComponent);\n        break;\n      default:\n      case \"done\":\n        break;\n    }\n  },\n  evalAll: function evalAll($builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    var points = 0;\n    var maxPoints = 0;\n    var subcomponents = app.builder.flattenComponents(formComponent.components, [], null, false);\n    // debugger;\n\n    subcomponents.forEach(function (subComponent) {\n      if (subComponent.params.methods && subComponent.params.methods.eval && !subComponent.params.content.delete && subComponent.$block //Možná může nastat chyba, pokud bude třeba vyhodnocovat komponentu bez $block\n      ) {\n        var obj = subComponent.params.methods.eval(subComponent, formComponent);\n        points += parseFloat(obj.points);\n        maxPoints += parseFloat(obj.totalPoints);\n      }\n    });\n    helpers.totalPoints = maxPoints;\n    helpers.userPoints = points;\n    formComponent.reload();\n  },\n  setFormStep: function setFormStep($builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    var formEl = $builderEl.find(\"#form\");\n    var components = formEl.find(\".bm-component\");\n\n    //Update stepper\n\n    formComponent.params.updateStepper(components.length, $builderEl, formComponent);\n    components.forEach(function (element, index) {\n      var $el = $$(element);\n      var order = $el.data(\"order\");\n      if (order == helpers.step) {\n        $el.removeClass(\"hidden\");\n        $el.addClass(\"active\");\n        helpers.currentStepId = element.id;\n        formComponent.params.allowNextStep({\n          id: helpers.currentStepId,\n          isAnswered: false\n        }, $builderEl, formComponent);\n      } else {\n        $el.addClass(\"hidden\");\n        $el.removeClass(\"active\");\n      }\n    });\n    if (content.checkSteps && helpers.checkStep) {\n      formComponent.params.showFormButton(\"check\", $builderEl);\n    } else if (components.length == helpers.step + 1) {\n      formComponent.params.showFormButton(\"finish\", $builderEl);\n    } else {\n      formComponent.params.showFormButton(\"step\", $builderEl);\n    }\n  },\n  updateStepper: function updateStepper(totalLength, $builderEl, formComponent) {\n    var app = formComponent.app;\n    var content = formComponent.params.content;\n    var helpers = formComponent.params.helpVariables;\n    var el = $builderEl.find(\".stepper\");\n    var text = \"\".concat(helpers.step + 1, \"/\").concat(totalLength);\n    $$(el).text(text);\n  },\n  showFormButton: function showFormButton(type, $builderEl) {\n    var stepButton = $builderEl.find(\"#stepButton\");\n    var checkButton = $builderEl.find(\"#checkButton\");\n    var finButton = $builderEl.find(\"#finishButton\");\n    $$(stepButton).addClass(\"hidden\");\n    $$(finButton).addClass(\"hidden\");\n    $$(checkButton).addClass(\"hidden\");\n    switch (type) {\n      case \"step\":\n        $$(stepButton).removeClass(\"hidden\");\n        break;\n      case \"finish\":\n        $$(finButton).removeClass(\"hidden\");\n        break;\n      case \"check\":\n        $$(checkButton).removeClass(\"hidden\");\n        break;\n    }\n  },\n  formatTime: function formatTime(seconds) {\n    var minutes = Math.floor(seconds / 60);\n    var remainingSeconds = seconds % 60;\n    var minPrefix = \"\";\n    if (minutes < 10) {\n      minPrefix = \"0\";\n    }\n    var secPrefix = \"\";\n    if (remainingSeconds < 10) {\n      secPrefix = \"0\";\n    }\n    return \"\".concat(minPrefix).concat(minutes, \":\").concat(secPrefix).concat(remainingSeconds);\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.less\nvar chm_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js\nvar resultText = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.js\n\n\n\nvar chm_01_o = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"chm-01\",\n  title: \"Checkbox\",\n  subtitle: \"multiple correct answers\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    negativePoints: {\n      name: \"Possibility to get negative points?\",\n      type: \"bool\"\n    },\n    shuffle: {\n      name: \"Automatically shufle answers?\",\n      type: \"bool\"\n    },\n    showExplanation: {\n      name: \"Show explanation for each checkbox\",\n      type: \"bool\"\n    },\n    checkboxes: {\n      name: \"Values of checkboxes\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Text\",\n          type: \"textEditor\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        },\n        explanation: {\n          name: \"Explanation after evaluation\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"A question with one or <b>more correct answers</b>.\",\n    negativePoints: false,\n    showExplanation: false,\n    checkboxes: [{\n      label: \"Truth\",\n      value: \"1\",\n      userCheck: false,\n      explanation: \"\"\n    }, {\n      label: \"Lie\",\n      value: \"0\",\n      userCheck: false,\n      explanation: \"\"\n    }, {\n      label: \"Super truth (+2 points)\",\n      value: \"2\",\n      userCheck: false,\n      explanation: \"\"\n    }],\n    shuffle: false\n  },\n  userContent: {\n    data: {}\n  },\n  helpVariables: {\n    resText: \"\",\n    shuffledCheckboxes: [],\n    reset: false\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpVariables = component.params.helpVariables;\n    var changed = false;\n    if (content.shuffle) {\n      var diff = _.differenceBy(helpVariables.shuffledCheckboxes, content.checkboxes, \"id\");\n      if (diff.length > 0 || component.params.helpVariables.shuffledCheckboxes.length == 0) {\n        changed = true;\n      }\n      if (helpVariables.reset || changed) {\n        helpVariables.shuffledCheckboxes = [];\n        helpVariables.shuffledCheckboxes = _.shuffle(content.checkboxes);\n        helpVariables.reset = false;\n      }\n    } else {\n      helpVariables.shuffledCheckboxes = content.checkboxes;\n    }\n    return \"\\n\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"list\\\">\\n  <ul>\\n\\n  \").concat(helpVariables.shuffledCheckboxes.map(function (data) {\n      return \"\\n\\n                  <li>\\n      <label class=\\\"item-checkbox item-content\\\">\\n        <input type=\\\"checkbox\\\" id=\\\"\".concat(data.id, \"\\\" name=\\\"demo-checkbox\\\" \").concat(userContent.data[data.id] ? \"checked\" : \"\", \"/>\\n        <i class=\\\"icon icon-checkbox\\\"></i>\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title\\\" data-id=\\\"\").concat(data.id, \"\\\">\").concat(data.label, \"</div>\\n        </div>\\n      </label>\\n    </li>\\n\\n          \");\n    }).join(\"\"), \"\\n\\n\\n  </ul>\\n</div>\\n\").concat(helpVariables.resText, \"\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var checkBox = $builderEl.find(\"input[type='checkbox']\");\n      checkBox.off(\"change\");\n      checkBox.on(\"change\", function () {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(checkBox, $builderEl, builder);\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpVariables.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(elems, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var isAnswered = false;\n      elems.forEach(function (el) {\n        var check = el.checked;\n        if (check) {\n          isAnswered = true;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: isAnswered\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find('input[type=\"checkbox\"]').each(function () {\n        var val = $$(this).is(\":checked\");\n        var id = $$(this).attr(\"id\");\n        if (val) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var answers = component.params.content.checkboxes;\n      var negativePoints = component.params.content.negativePoints;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\".item-checkbox\");\n      var points = 0;\n      var maxPoints = 0;\n      $input.forEach(function (element) {\n        var value = $$(element).find(\".item-title\");\n        var check = $$(element).find(\"input\");\n        if (check[0].checked) {\n          var id = value.attr(\"data-id\");\n          var res = _.find(answers, function (o) {\n            return o.id == id;\n          });\n          if (res && res.value) {\n            points += parseFloat(res.value);\n          }\n        }\n      });\n      if (!negativePoints) {\n        if (points < 0) {\n          points = 0;\n        }\n      }\n      answers.forEach(function (element) {\n        if (!element.deleted && element.value > 0) {\n          maxPoints += parseFloat(element.value);\n        }\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      var $exp = $builderEl.find(\".item-explanation\");\n      $exp.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      if (component.params.content.showExplanation) {\n        this.params.methods.explanation(component);\n      }\n      this.params.helpVariables.resText = this.params.methods.resultText(points);\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    explanation: function explanation(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answers = component.params.content.checkboxes;\n      var $input = $builderEl.find(\".item-checkbox\");\n      $input.forEach(function (element) {\n        var el = $$(element).find(\".item-title\");\n        var check = $$(element).find(\"input\");\n        var checkId = $$(check).attr(\"id\");\n        var answer = _.find(answers, function (o) {\n          return o.id == checkId;\n        });\n        // debugger;\n        if (answer.explanation != undefined && answer.explanation.length > 0) {\n          var expEl = \"<span class=\\\"item-explanation\\\">\".concat(answer.explanation, \"</span>\");\n          $$(el).parent().append(expEl);\n        }\n      });\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answers = component.params.content.checkboxes;\n      var $input = $builderEl.find(\".item-checkbox\");\n      $input.forEach(function (element) {\n        var value = $$(element).find(\".item-title\");\n        var check = $$(element).find(\"input\");\n        var id = value.attr(\"data-id\");\n        var res = _.find(answers, function (o) {\n          return o.id == id;\n        });\n        if (res && res.value > 0) {\n          var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n          // $$(correct).insertAfter($(value));\n          $$(value).append(correct);\n          var target = $$(value).find(\".solution\");\n          if (check[0].checked) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: res.value + \"b\"\n          });\n        } else {\n          var _correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"cancel\"></i></span>';\n          // $$(correct).insertAfter($(value));\n          // $$(value).append(correct);\n          var _target = $$(value).find(\".solution\");\n          if (check[0].checked) {\n            $$(value).append(_correct);\n          }\n        }\n      });\n    }\n  }\n};\nvar chm_01_x = _.merge({}, chm_01_o, resultText[\"default\"]);\n/* harmony default export */ var checkbox_multiple_chm_01 = (chm_01_x);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.less\nvar sel_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.js\n\n\n/* harmony default export */ var selectbox_sel_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sel-01\",\n  title: \"Selectbox\",\n  subtitle: \"\",\n  contentSetting: {\n    text: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    },\n    checkboxes: {\n      name: \"Selectbox values\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Text\",\n          type: \"textarea\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    text: \"Select <b>one correct answer</b> from the list\",\n    checkboxes: [{\n      label: \"..Choose answer\",\n      value: \"0\"\n    }, {\n      label: \"Truth\",\n      value: \"1\"\n    }, {\n      label: \"Lie\",\n      value: \"0\"\n    }, {\n      label: \"Lie\",\n      value: \"0\",\n      userCheck: true\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n\\n        <span class=\\\"result-badge\\\"></span>\\n        <div id=\\\"fxx\\\" class=\\\"item-title item-label\\\">\".concat(content.text, \"</div>\\n        <div class=\\\"item-input-wrap\\\">\\n          <label class=\\\"select-label\\\">\\n            <select id=\\\"\").concat(builder.id, \"\\\" >\\n              \").concat(content.checkboxes.map(function (data) {\n      return \"\\n                  <option id=\\\"\".concat(data.id, \"\\\" value=\\\"\").concat(data.value, \"\\\">\").concat(data.label, \"</option>\\n                \");\n    }).join(\"\"), \"\\n            </select>\\n          </label>\\n        </div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      // alert('selectbox');\n      $builderEl.find(\"#fxx\").off(\"click\").on(\"click\", function () {\n        // alert(\"selectbox\");\n      });\n      var select = $builderEl.find(\"select\");\n      select.off(\"change\");\n      select.on(\"change\", function (e) {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      var ud = {};\n      component.$block.find(\"option\").each(function () {\n        var val = this.selected;\n        var id = $$(this).attr(\"id\");\n        if (val) {\n          ud[id] = val;\n        }\n      });\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\"option\").filter(function (o) {\n        return !o.deleted;\n      });\n      var points = 0;\n      var maxPoints = _.maxBy(component.params.content.checkboxes, function (o) {\n        return parseFloat(o.value) && !o.deleted;\n      });\n      maxPoints = maxPoints.value;\n      $input.forEach(function (el) {\n        var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n        if (el.selected) {\n          points = parseFloat(component.params.content.checkboxes[i].value);\n        }\n        i++;\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answers = component.params.content.checkboxes;\n      var container = $builderEl.find(\".item-input-wrap\");\n      var answerIcon = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(container).append(answerIcon);\n      var target = $$(container).find(\".solution\");\n      var answerString = \"\";\n      answers.forEach(function (element, i) {\n        if (element.value > 0 && !element.deleted) {\n          answerString += element.label + \" (\" + element.value + \"b)\";\n          if (i != answers.length - 1) {\n            answerString += \", \";\n          }\n        }\n      });\n      var selected = $builderEl.find(\"option\");\n      var res = null;\n      selected.forEach(function (element) {\n        if (element.selected) {\n          res = _.find(answers, function (o) {\n            return o.id == $$(element).attr('id');\n          });\n        }\n      });\n      if (res) {\n        if (res.value > 0) {\n          $$(target).addClass(\"selected\");\n        }\n      }\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: answerString\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js\nvar sel_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js\nvar rad_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.less\nvar rad_img_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.js\n\n\n\nvar rad_img_01_o = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"rad-img-01\",\n  title: \"Radiolist\",\n  subtitle: \"with images\",\n  contentSetting: {\n    label: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    },\n    checkboxes: {\n      name: \"Images\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image file\",\n          type: \"image\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"A image question with <b>one correct answer</b>. Which picture contain Statue of Freedom?\",\n    checkboxes: [{\n      path: \"{{mediaServerDomain}}/public/oddaolt5za0iy9oox55nkemk0hfn1bj0a8n7tr8e1nyqv0rzay7a88uovs7gx0mj.jpg\",\n      value: \"0\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/2qfrqmxoqvatg1npfag90a08rahlab847rplm2fibnlfhsr1yeq8eub021plhgbi.jpg\",\n      value: \"1\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/3bihqp9xr4yv3lzmvxq5zo9snz3xs4gpllbwe1n69o6ix60znjuv1xsw88ujdshe.jpg\",\n      value: \"0\"\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpVariables = component.params.helpVariables;\n    return \"\\n\\n\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"list\\\">\\n  <div class=\\\"row\\\">\\n\\n\\n    \").concat(content.checkboxes.map(function (data) {\n      return \"\\n\\n\\n      <div class=\\\"col-100 medium-50\\\">\\n        <label class=\\\"item-radio item-content\\\">\\n          <input type=\\\"radio\\\" name=\\\"radio-\".concat(builder.id, \"\\\" id=\\\"\").concat(data.id, \"\\\" \").concat(userContent.data[data.id] ? \"checked\" : \"\", \"/>\\n          <div class=\\\"item-inner\\\">\\n              <div class=\\\"img-container\\\"><img data-id=\\\"\").concat(data.id, \"\\\" src=\\\"\").concat(data.path, \"\\\"></div>\\n          </div>\\n        </label>\\n      </div>\\n\\n          \");\n    }).join(\"\"), \"\\n  </div>\\n</div>\\n\").concat(helpVariables.resText, \"\\n\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var radioBtns = $builderEl.find(\"input[type='radio']\");\n      radioBtns.off(\"change\");\n      radioBtns.on(\"change\", function (e) {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    getUserData: function getUserData() {\n      var component = this;\n      var ud = {};\n      component.$block.find('input[type=\"radio\"]').each(function (index) {\n        var val = $$(this).is(\":checked\");\n        var id = $$(this).attr(\"id\");\n        if (val) {\n          ud[id] = val;\n        }\n      });\n      component.params.userContent.data = ud;\n    },\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\"input\");\n      var points = 0;\n      var chFilter = _.filter(component.params.content.checkboxes, function (o) {\n        return o.deleted !== true;\n      });\n      var maxPoints = _.maxBy(chFilter, function (o) {\n        return parseFloat(o.value);\n      });\n      maxPoints = maxPoints.value;\n      $input.forEach(function (el, i) {\n        $$(el).removeClass(\"success\");\n        $$(el).removeClass(\"fail\");\n        var p = parseFloat(component.params.content.checkboxes[i].value);\n        if (el.checked) {\n          points = p;\n          if (showResult) {\n            if (points > 0) {\n              $$(el).addClass(\"success\");\n            } else {\n              $$(el).addClass(\"fail\");\n            }\n          }\n        }\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      this.params.helpVariables.resText = this.params.methods.resultText(points);\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var array = component.params.content.checkboxes;\n      var $input = $builderEl.find(\".item-radio\");\n      $input.forEach(function (element, i) {\n        var imgEl = $$(element).find(\"img\");\n        var value = imgEl.data(\"id\");\n        var check = $$(element).find(\"input\");\n        var res = _.find(array, function (o) {\n          return o.id == value;\n        });\n        if (res.value > 0) {\n          var answerIcon = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n          var parent = $$(imgEl).closest(\"div\");\n          $$(parent).append(answerIcon);\n          var target = $$(parent).find(\".solution\");\n          if (check[0].checked) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: res.value + \"b\"\n          });\n        }\n      });\n    }\n  }\n};\nvar rad_img_01_x = _.merge({}, rad_img_01_o, resultText[\"default\"]);\n/* harmony default export */ var radiolist_rad_img_01 = (rad_img_01_x);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js\nvar chm_img_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js\nvar dd_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js\nvar dd_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js\nvar dd_groups_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js\nvar dd_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.less\nvar dd_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.js\n\n/* harmony default export */ var drag_drop_dd_04 = ({\n  name: \"dd-04\",\n  title: \"Table\",\n  subtitle: \"\",\n  contentSetting: {\n    rows: {\n      name: \"Number of collums\",\n      type: \"input-number\"\n    },\n    cels: {\n      name: \"Number of rows\",\n      type: \"input-number\"\n    },\n    table: {\n      name: \"Table\",\n      type: \"table\"\n    }\n  },\n  content: {\n    rows: 2,\n    cels: 3,\n    table: [[\"Sloupec 1\", \"Sloupec 2\"], [\"Hodnota 1\", \"Hodnota 2\"], [\"1\", \"2\"][\"1\"]]\n  },\n  html: function html(content, builder, styles, component) {\n    /*<tr>\r\n        <td class=\"label-cell\">Frozen yogurt</td>\r\n        <td class=\"numeric-cell\">159</td>\r\n        ...\r\n        <td class=\"medium-only\">I like it!</td>\r\n      </tr>*/\n    var tableInner = \"\";\n    var dataCelsLenght = content.table[0].length;\n    for (var i = 0; i < content.table.length; i++) {\n      // debugger\n      var cells = \"\";\n      for (var x = 0; x < dataCelsLenght; x++) {\n        var key = i + \"_\" + x;\n        var c = content.table[i][x];\n        if (!c) {\n          c = \"nic\";\n        }\n        cells = cells + \"<td class=\\\"label-cell\\\">\".concat(c, \"</td>\");\n      }\n      tableInner = tableInner + \"<tr>\".concat(cells, \"</tr>\");\n    }\n    return \"   \\n    <div class=\\\"data-table swiper-no-swiping\\\">\\n  <table>\\n    <tbody>\\n\".concat(tableInner, \"\\n    </tbody>\\n  </table>\\n</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      // let $block = builderEl;\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js\nvar dd_pairs_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.less\nvar grid_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.js\n\n\n//Inspirace: https://data-driven-forms.org/\n\n/* harmony default export */ var grid_grid_01 = ({\n  name: \"form-grid-01\",\n  title: \"Two columns\",\n  subtitle: \"on mobile bllow\",\n  contentSetting: {\n    label: {\n      name: \"Title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    label: \"\"\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"formElGroup\",\n    leftColumn: \"formElGroup\"\n  },\n  components: {\n    leftColumn: [],\n    rightColumn: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-50\\\">\").concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-50\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n</div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('#test').on('click', function (e) {\n      //   builder.app.dialog.alert('click');\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.less\nvar grid_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.js\n\n\n//Inspirace: https://data-driven-forms.org/\n\n/* harmony default export */ var grid_grid_02 = ({\n  name: \"form-grid-02\",\n  title: \"Three columns\",\n  subtitle: \"on mobile bellow\",\n  contentSetting: {\n    label: {\n      name: \"Title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    label: \"\"\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"formElGroup\",\n    middleColumn: \"formElGroup\",\n    leftColumn: \"formElGroup\"\n  },\n  components: {\n    leftColumn: [],\n    rightColumn: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-33\\\">\").concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-33\\\">\").concat(component.renderComponents(\"middleColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-33\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n\\n</div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('#test').on('click', function (e) {\n      //   builder.app.dialog.alert('click');\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/code/code-01.less\nvar code_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/code/code-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/code/code-01.js\n\n/* harmony default export */ var code_code_01 = ({\n  name: \"code-01\",\n  title: \"Source code\",\n  subtitle: \"Block for source code\",\n  contentSetting: {\n    code: {\n      type: \"textEditor\",\n      name: \"Enter source code\"\n    },\n    descBool: {\n      name: \"Allow comments?\",\n      type: \"bool\",\n      hidden: {\n        desc: {\n          type: \"textEditor\",\n          name: \"Text of the comment\"\n        }\n      }\n    },\n    copyBool: {\n      name: \"Enable the copy to clipboard button?\",\n      type: \"bool\",\n      hidden: {\n        copyText: {\n          type: \"textarea\",\n          name: \"Confirmation text for copy to clipboard.\"\n        }\n      }\n    }\n  },\n  content: {\n    code: \"//komentar\\nfunction(){\\n  test\\n}\",\n    desc: \"Popis zdrojového kódu\",\n    descBool: false,\n    copyBool: true,\n    copyText: \"Zkop\\xEDrov\\xE1no do schr\\xE1nky\"\n  },\n  // styles:{\n  //   bm:{\n  //     // borderColor: 'pink',\n  //     border: {\n  //       color: 'pink',\n  //       width: 1,\n  //       style: 'solid'\n  //     },\n  //     'background-color' : \"green\"\n  //   },\n  //   author: {\n  //     backgroundColor: 'red'\n  //   },\n  //   head: {},\n  //   subhead: {}\n  // },\n  html: function html(content, builder, styles) {\n    return \"\\n<div class=\\\"code-01-background\\\">\\n<pre><code>\".concat(content.code, \"</code></pre>\\n<div class=\\\"code-01-tools\\\">\\n\").concat(content.descBool ? \"<span class=\\\"code-01-description\\\">\".concat(content.desc, \"</span>\") : \"\", \"\\n\").concat(content.copyBool ? \"<a id=\\\"code-01-copy\\\" class=\\\"c01-copy\\\"><i class=\\\"material-icons\\\">content_copy</i></a>\" : \"\", \"\\n\\n<div class=\\\"clearfix\\\"></div>\\n</div>\\n</div>\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      var app = component.app;\n      function copyTextToClipboard(text) {\n        var textArea = document.createElement(\"textarea\");\n\n        //\n        // *** This styling is an extra step which is likely not required. ***\n        //\n        // Why is it here? To ensure:\n        // 1. the element is able to have focus and selection.\n        // 2. if element was to flash render it has minimal visual impact.\n        // 3. less flakyness with selection and copying which **might** occur if\n        //    the textarea element is not visible.\n        //\n        // The likelihood is the element won't even render, not even a\n        // flash, so some of these are just precautions. However in\n        // Internet Explorer the element is visible whilst the popup\n        // box asking the user for permission for the web page to\n        // copy to the clipboard.\n        //\n\n        // Place in top-left corner of screen regardless of scroll position.\n        textArea.style.position = \"fixed\";\n        textArea.style.top = 0;\n        textArea.style.left = 0;\n\n        // Ensure it has a small width and height. Setting to 1px / 1em\n        // doesn't work as this gives a negative w/h on some browsers.\n        textArea.style.width = \"2em\";\n        textArea.style.height = \"2em\";\n\n        // We don't need padding, reducing the size if it does flash render.\n        textArea.style.padding = 0;\n\n        // Clean up any borders.\n        textArea.style.border = \"none\";\n        textArea.style.outline = \"none\";\n        textArea.style.boxShadow = \"none\";\n\n        // Avoid flash of white box if rendered for any reason.\n        textArea.style.background = \"transparent\";\n        textArea.value = text;\n        document.body.appendChild(textArea);\n        textArea.focus();\n        textArea.select();\n        try {\n          var successful = document.execCommand(\"copy\");\n          var msg = successful ? \"successful\" : \"unsuccessful\";\n        } catch (err) {}\n        document.body.removeChild(textArea);\n      }\n      var $copyButton = builderEl.find(\"#code-01-copy\");\n      $copyButton.off(\"click\");\n      $copyButton.on(\"click\", function () {\n        copyTextToClipboard(component.params.content.code);\n        var toastCenter = app.toast.create({\n          text: component.params.content.copyText,\n          position: \"center\",\n          closeTimeout: 2000\n        });\n        toastCenter.open();\n        //alert('Zkopírováno.');\n      });\n      /*\r\n       *\r\n       * */\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/iframe/if-01.less\nvar if_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/iframe/if-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/iframe/if-01.js\n\n/* harmony default export */ var iframe_if_01 = ({\n  name: \"if-01\",\n  title: \"Iframe\",\n  help: \"Paste any URL address.\",\n  contentSetting: {\n    url: {\n      type: \"textarea\",\n      name: \"URL\",\n      help: \"If you want to embed a YouTube video, press the \\\"share\\\" button below the video and then \\\"Embed video\\\". The URL you need is in the \\\"src\\\" tag and contains the url of the video and the keyword \\\"embed\\\". Correct URL address looks like: \\\"https://www.youtube.com/<b>embed</b>/ZkYz1zkPMXM\\\"\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format (width / height)\"\n    },\n    useHeight: {\n      name: \"Use height parameter instead of aspect ratio\",\n      type: \"bool\",\n      hidden: {\n        height: {\n          type: \"input-number\",\n          name: \"Iframe height\"\n        }\n      }\n    },\n    useThumbnail: {\n      name: \"Use thumbnail?\",\n      help: \"If enabled, a thumbnail image will be displayed instead of the iframe. The iframe will be loaded when the thumbnail is clicked. The thumbnail has to be set.\",\n      type: \"bool\",\n      hidden: {\n        thumbnail: {\n          type: \"image\",\n          name: \"Thumbnail image\"\n        }\n      }\n    }\n  },\n  content: {\n    url: \"https://www.google.com/maps/d/embed?mid=1d0-EBvLnvIp5RSnF3JVNODrVJIuRwhoD\",\n    height: 480,\n    useHeight: true,\n    aspectRatio: \"16/9\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div class=\\\"iframe-wrapper\\\">\\n      \".concat(content.useThumbnail ? \"<img class=\\\"iframe-thumbnail\\\" height=\\\"\".concat(content.useHeight ? content.height : \"auto\", \"\\\" \").concat(!content.useHeight ? \"style=\\\"aspect-ratio: \".concat(content.aspectRatio, \"\\\"\") : \"\", \" src=\\\"\").concat(content.thumbnail, \"\\\"/>\") : \"\\n      <iframe src=\\\"\".concat(content.url, \"\\\" width=\\\"100%\\\" height=\\\"\").concat(content.useHeight ? content.height : \"auto\", \"\\\"\\n      style=\\\"\").concat(!content.useHeight ? \"--fb-iframe-aspect-ratio: \".concat(content.aspectRatio) : \"\", \"\\\"\\n      ></iframe>\\n    \"), \"\\n\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var content = builder.params.content;\n      if (content.useThumbnail) {\n        var thumbnailEl = builderEl.find(\".iframe-thumbnail\");\n        thumbnailEl.off(\"click\");\n        thumbnailEl.on(\"click\", function () {\n          var iframeEl = document.createElement(\"iframe\");\n          iframeEl.src = content.url;\n          iframeEl.width = \"100%\";\n          iframeEl.height = content.useHeight ? content.height : \"auto\";\n          iframeEl.setAttribute(\"allow\", \"autoplay; fullscreen; encrypted-media; picture-in-picture\");\n          if (!content.useHeight) {\n            iframeEl.style.setProperty(\"--fb-iframe-aspect-ratio\", content.aspectRatio);\n          }\n          thumbnailEl[0].replaceWith(iframeEl);\n        });\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.less\nvar inp_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.js\nfunction inp_01_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = inp_01_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction inp_01_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return inp_01_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? inp_01_arrayLikeToArray(r, a) : void 0; } }\nfunction inp_01_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n\n\nvar inp_01_o = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"inp-01\",\n  title: \"Text input\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity?\",\n      type: \"bool\"\n    },\n    placeholder: {\n      name: \"Placeholder\",\n      type: \"textarea\"\n    },\n    correctAnswers: {\n      name: \"Correct answers (Enter one or more correct answers)\",\n      type: \"array\",\n      values: {\n        value: {\n          name: \"Correct answer\",\n          type: \"textarea\"\n        },\n        point: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>Number answer</b> - How many is 1 + 1?\",\n    placeholder: \"Type here\",\n    diacritics: true,\n    uppercase: false,\n    text: \"ano\",\n    correctAnswers: [{\n      value: \"2\",\n      point: 1\n    }],\n    value: null\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var val = \"\";\n    if (userContent.data.hasOwnProperty(builder.id)) {\n      val = userContent.data[builder.id];\n    } else if (content.value) {\n      val = content.value;\n    }\n    var helpVariables = component.params.helpVariables;\n    return \"\\n\\n      <div class=\\\"item-contentx item-input item-input-outline\\\">\\n        <div class=\\\"\\\">\\n          <div class=\\\"item-title item-label\\\">\".concat(content.label, \" <span class=\\\"result-badge\\\"></span></div>\\n          <div class=\\\"item-input-wrap\\\">\\n            <input autocomplete=\\\"off\\\" type=\\\"text\\\" name=\\\"name\\\" id=\\\"\").concat(builder.id, \"\\\" placeholder=\\\"\").concat(content.placeholder, \"\\\"  value=\\\"\").concat(val, \"\\\" >\\n          </div>\\n          <div class=\\\"correct-answers\\\"></div>\\n        </div>\\n      </div>\\n\").concat(helpVariables.resText, \"\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var input = $builderEl.find(\"input[type='text']\");\n      input.off(\"change\");\n      input.on(\"change\", function () {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor($builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var content = builder.params.content;\n      var id = $builderEl[0].id;\n      var input = $builderEl.find(\"input\");\n      var val = input[0].value;\n      var res = false;\n      if (val.length > 0) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      var val = component.$block.find(\"input\").eq(0).val();\n      var id = component.$block.find(\"input\").eq(0).attr(\"id\");\n      val = val.trim();\n      var ud = {};\n      if (val !== \"\") {\n        ud[id] = val;\n      }\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\"input\");\n      var userAnswer = $input.val();\n      if (!userAnswer) {\n        userAnswer = \"\";\n      }\n      if (component.params.content.diacritics) {\n        userAnswer = app.utils.removeDiacritics(userAnswer);\n      }\n      if (component.params.content.uppercase) {\n        userAnswer = userAnswer.toUpperCase();\n      }\n      var correctAnswers = component.params.content.correctAnswers;\n      correctAnswers = _.filter(correctAnswers, function (o) {\n        return o.deleted !== true;\n      });\n      var correctAnswersString = \"\";\n\n      //S polem správných otázek porovnáváme odpověď, pokud nalezneme shodu, zapíšeme body přerušíme cyklus\n      var points = 0;\n      var _iterator = inp_01_createForOfIteratorHelper(correctAnswers),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var answer = _step.value;\n          var correctAnswer = answer.value;\n          if (parseFloat(answer.point)) {\n            correctAnswersString = \"\".concat(correctAnswersString, \" \").concat(correctAnswer, \" - \").concat(answer.point, \" <br>\");\n          }\n          if (component.params.content.diacritics) {\n            correctAnswer = app.utils.removeDiacritics(correctAnswer);\n          }\n          if (component.params.content.uppercase) {\n            correctAnswer = correctAnswer.toUpperCase();\n          }\n          if (correctAnswer === userAnswer) {\n            points = answer.point;\n          }\n        }\n\n        // Maximální počet počet bodů za toto cvičení je největší hodnota z pole správných otázek\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      var totalPoints = _.maxBy(correctAnswers, function (o) {\n        return o.point;\n      });\n      totalPoints = totalPoints.point;\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      totalPoints = Object(parsePoints[\"formatNumber\"])(totalPoints);\n\n      //Pokud nám to nastavení formuláře umožní, zobrazíme výsledky\n      if (showResult) {\n        var classResult = points === totalPoints ? \"result-success\" : \"result-fail\";\n        // debugger\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(totalPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        // $builderEl.find('.correct-answers').html(correctAnswersString);\n        this.params.methods.solution(component);\n      }\n      this.params.helpVariables.resText = this.params.methods.resultText(points);\n      return {\n        points: points,\n        totalPoints: totalPoints\n      };\n      // alert(points +'/'+totalPoints);\n    },\n    solution: function solution(component) {\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $container = $builderEl.find(\".item-input-wrap\");\n      var correctAnswers = component.params.content.correctAnswers;\n      correctAnswers = _.filter(correctAnswers, function (o) {\n        return o.deleted !== true;\n      });\n      var answerIcon = '<span class=\"solution\"><i class=\"icon result-icon material-icons\">check_circleheck_circle</i></span>';\n      $container.append(answerIcon);\n      var $input = $builderEl.find(\"input\");\n      var userAnswer = $input.val();\n      var res = _.find(correctAnswers, function (o) {\n        var val = o.value;\n        if (component.params.content.diacritics) {\n          val = app.utils.removeDiacritics(val);\n          userAnswer = app.utils.removeDiacritics(userAnswer);\n        }\n        if (component.params.content.uppercase) {\n          val = val.toUpperCase();\n          userAnswer = userAnswer.toUpperCase();\n        }\n        return val == userAnswer;\n      });\n      var target = $builderEl.find(\".solution\");\n      if (res) {\n        $$(target).addClass(\"selected\");\n      }\n      var answerString = \"\";\n      for (var i = 0; i < correctAnswers.length; i++) {\n        answerString += correctAnswers[i].value + \" (\" + correctAnswers[i].point + \"b)\";\n        if (i != correctAnswers.length - 1) {\n          answerString += \", \";\n        }\n      }\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: answerString\n      });\n    }\n  }\n};\nvar inp_01_x = _.merge({}, inp_01_o, resultText[\"default\"]);\n/* harmony default export */ var input_inp_01 = (inp_01_x);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.less\nvar tarea_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.js\n\n/* harmony default export */ var input_tarea_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"tarea-01\",\n  title: \"Text with free answer\",\n  subtitle: \"without evaluation\",\n  contentSetting: {\n    label: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    }\n    // placeholder:{\n    //   name: 'Obsah formuláře',\n    //   type: 'textarea'\n    // },\n  },\n  content: {\n    label: \"Assignment and subsequent answer with a <b>free text answer</b> without evaluation\"\n    // placeholder:'Zde můžete volně vyplnit svoji odpověď.',\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    // let fux = userContent.data[builder.id];\n    // debugger\n    return \"\\n\\n      <div class=\\\"item-contentx item-input item-input-outline\\\">\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n          <div class=\\\"item-input-wrap\\\">\\n            <textarea id=\\\"\").concat(builder.id, \"\\\" class=\\\"resizable\\\">\").concat(userContent.data[builder.id] ? userContent.data[builder.id] : \"\", \"</textarea>\\n          </div>\\n        </div>\\n      </div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var textArea = $builderEl.find(\"textarea\");\n      textArea.off(\"change\");\n      textArea.on(\"change\", function () {\n        builder.params.methods.getUserData();\n      });\n    }\n  },\n  methods: {\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      var txt = component.$block.find(\"textarea\");\n      var val = $$(txt).val();\n      var id = $$(txt).attr(\"id\");\n      ud[id] = val;\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    }\n  },\n  eval: function _eval() {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.less\nvar inp_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.js\n\n\nvar myoBj;\n/* harmony default export */ var sentences_inp_02 = (myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"inp-02\",\n  title: \"Typing text into sentences\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics\",\n      type: \"bool\",\n      hidden: {\n        text: {\n          name: \"Text\",\n          type: \"textarea\"\n        }\n      }\n    },\n    points: {\n      name: \"Evaluate answer with points?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity?\",\n      type: \"bool\"\n    },\n    spaces: {\n      name: \"Ignore spaces?\",\n      type: \"bool\"\n    },\n    sentences: {\n      name: \"Sentences (enter text and other parameters)\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Sentence text (BEFORE field for answer)\",\n          type: \"textEditor\"\n        },\n        textAfterInput: {\n          name: \"Sentence text (AFTER field for answer)\",\n          type: \"textEditor\"\n        },\n        input: {\n          name: \"Length of field for answer\",\n          type: \"input-number\"\n        },\n        correctAnswers: {\n          name: \"Correct answers. (One or more)\",\n          type: \"array\",\n          dependOn: \"content.points\",\n          values: {\n            value: {\n              name: \"Text\",\n              type: \"textarea\"\n            },\n            point: {\n              name: \"Point value\",\n              type: \"input-number\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Add colors to the text <b>by typing</b>\",\n    diacritics: false,\n    uppercase: false,\n    spaces: false,\n    text: \"ano\",\n    points: true,\n    sentences: [{\n      text: \"The fruit includes a banana, which is \",\n      textAfterInput: \". \",\n      input: 7,\n      correctAnswers: [{\n        value: \"yellow\",\n        point: 1\n      }]\n    }, {\n      text: \"Watermelon is a vegetable,  \",\n      textAfterInput: \"\",\n      input: 6,\n      correctAnswers: [{\n        value: \"green\",\n        point: 1\n      }]\n    }, {\n      text: \"on the surface and \",\n      textAfterInput: \"on the inside. \",\n      input: 4,\n      correctAnswers: [{\n        value: \"red\",\n        point: 1\n      }]\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n      \").concat(content.sentences.map(function (data, index) {\n      return \"\\n    <span class=\\\"inp-text\\\">\\n    \".concat(data.text).concat(data.input != 0 ? \"<span class=\\\"ce\\\" id=\\\"\".concat(builder.id + \"-\" + index, \"\\\" contenteditable=\\\"true\\\" style=\\\"min-width: \").concat(data.input * 7, \"px \\\">\\n                \\n                </span>\") : \"\").concat(data.textAfterInput, \"\\n    </span>\\n          \");\n    }).join(\"\"), \"\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var inputs = $builderEl.find(\".ce\");\n      inputs.off(\"focusout\");\n      inputs.on(\"focusout\", function (e) {\n        // $$(this).text(\"\");\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var content = builder.params.content;\n      var id = $builderEl[0].id;\n      var inputs = $builderEl.find(\".ce\");\n      var res = true;\n      inputs.forEach(function (inp) {\n        var f = inp.innerText;\n        if (f.length == 0) {\n          res = false;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find(\".ce\").each(function () {\n        var val = $$(this).text();\n        var id = $$(this).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var checkAnswers = component.params.content.points;\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      rightAnswersPool = _.sortBy(rightAnswersPool, \"position\");\n      if (!component.hasOwnProperty(\"$block\")) {\n        debugger;\n      }\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n      var $inputs = $builderEl.find(\".ce\");\n      $inputs.forEach(function (element, i) {\n        $$(element).removeClass(\"success\");\n        $$(element).removeClass(\"fail\");\n        if (checkAnswers) {\n          var answer = $$(element).text();\n          var rightAnswers = rightAnswersPool[i].correctAnswers;\n          if (rightAnswers.length > 0) {\n            var findedAnswer = _.find(rightAnswers, function (o) {\n              if (o.deleted) {\n                return false;\n              }\n              var ra = o.value;\n              ra = self.params.methods.parse(ra, uppercase, diacritic, spaces);\n              answer = self.params.methods.parse(answer, uppercase, diacritic, spaces);\n              return ra == answer;\n            });\n            if (findedAnswer) {\n              points += parseFloat(findedAnswer.point);\n              if (showResult) {\n                $$(element).addClass(\"success\");\n              }\n            } else {\n              if (showResult) {\n                $$(element).addClass(\"fail\");\n              }\n            }\n          }\n        }\n      });\n      if (checkAnswers) {\n        component.params.content.sentences.forEach(function (element) {\n          if (!element.deleted) {\n            var ca = _.filter(element.correctAnswers, function (o) {\n              return o.deleted === false;\n            });\n            var mPoints = _.maxBy(ca, function (o) {\n              return parseFloat(o.point);\n            });\n            if (mPoints) {\n              maxPoints += parseFloat(mPoints.point);\n            }\n          }\n        });\n      }\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    isAnswered: function isAnswered(component, formComponent) {\n      var block = component.$block;\n      var $inputs = block.find(\".ce\");\n      for (var i = 0; i < $inputs.length; i++) {\n        var answer = $$($inputs[i]).text();\n        if (answer.length == 0) {\n          return false;\n        }\n      }\n      return true;\n    },\n    parse: function parse(word, uppercase, diacritic, spaces) {\n      if (uppercase) {\n        word = word.toUpperCase();\n      }\n      if (diacritic) {\n        word = word.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n      }\n      if (spaces) {\n        word = word.replace(/\\s+/g, \"\");\n      }\n      return word;\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\".ce\");\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      rightAnswersPool = _.sortBy(rightAnswersPool, \"position\");\n      $inputs.forEach(function (element, i) {\n        // debugger;\n        var rightAnswers = rightAnswersPool[i].correctAnswers.filter(function (o) {\n          return !o.deleted;\n        });\n        var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n        var answerString = \"\";\n        var flag = false;\n        for (var _i = 0; _i < rightAnswers.length; _i++) {\n          // debugger;\n          if (!rightAnswers[_i].deleted) {\n            answerString += rightAnswers[_i].value + \" (\" + rightAnswers[_i].point + \"b)\";\n            if (_i != rightAnswers.length - 1) {\n              answerString += \", \";\n            }\n          }\n          var ra = self.params.methods.parse(rightAnswers[_i].value, uppercase, diacritic, spaces);\n          var el = self.params.methods.parse($$(element).text(), uppercase, diacritic, spaces);\n          if (ra == el) {\n            flag = true;\n          }\n        }\n        if (rightAnswers.length > 0) {\n          $$(answerIcon).insertAfter($$(element));\n          var target = $$(element).next(\".solution\");\n          if (flag) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: answerString\n          });\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.less\nvar sent_inp_math_range = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.js\n\n\nvar sent_inp_math_range_myoBj;\n/* harmony default export */ var sentences_sent_inp_math_range = (sent_inp_math_range_myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sent-inp-math-range\",\n  title: \"Typing math range into sentences\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics\",\n      type: \"bool\",\n      hidden: {\n        text: {\n          name: \"Text\",\n          type: \"textarea\"\n        }\n      }\n    },\n    points: {\n      name: \"Evaluate answer with points?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity?\",\n      type: \"bool\"\n    },\n    spaces: {\n      name: \"Ignore spaces?\",\n      type: \"bool\"\n    },\n    sentences: {\n      name: \"Sentences (enter text and other parameters)\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Sentence text (BEFORE field for answer)\",\n          type: \"textEditor\"\n        },\n        textAfterInput: {\n          name: \"Sentence text (AFTER field for answer)\",\n          type: \"textEditor\"\n        },\n        input: {\n          name: \"Length of field for answer\",\n          type: \"input-number\"\n        },\n        correctAnswers: {\n          name: \"Correct answers. (One or more)\",\n          type: \"array\",\n          dependOn: \"content.points\",\n          values: {\n            value: {\n              name: \"From number\",\n              type: \"input-number\"\n            },\n            valueTo: {\n              name: \"To number\",\n              type: \"input-number\"\n            },\n            point: {\n              name: \"Point value\",\n              type: \"input-number\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Add colors to the text <b>by typing</b>\",\n    diacritics: false,\n    uppercase: false,\n    spaces: false,\n    text: \"ano\",\n    points: true,\n    sentences: [{\n      text: \"Type number in range from five to ten \",\n      textAfterInput: \". \",\n      input: 7,\n      correctAnswers: [{\n        value: \"5\",\n        valueTo: \"10\",\n        point: 1\n      }]\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n      \").concat(content.sentences.map(function (data, index) {\n      return \"\\n    <span class=\\\"inp-text\\\">\\n    \".concat(data.text).concat(data.input != 0 ? \"<span class=\\\"ce\\\" id=\\\"\".concat(builder.id + \"-\" + index, \"\\\" contenteditable=\\\"true\\\" style=\\\"min-width: \").concat(data.input * 7, \"px \\\">\\n\\n                </span>\") : \"\").concat(data.textAfterInput, \"\\n    </span>\\n          \");\n    }).join(\"\"), \"\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var inputs = $builderEl.find(\".ce\");\n      inputs.off(\"focusout\");\n      inputs.on(\"focusout\", function (e) {\n        // $$(this).text(\"\");\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var content = builder.params.content;\n      var id = $builderEl[0].id;\n      var inputs = $builderEl.find(\".ce\");\n      var res = true;\n      inputs.forEach(function (inp) {\n        var f = inp.innerText;\n        if (f.length == 0) {\n          res = false;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find(\".ce\").each(function () {\n        var val = $$(this).text();\n        var id = $$(this).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    },\n    isNumberInRange: function isNumberInRange(valueFrom, valueTo, answer) {\n      // Převedení textových hodnot na čísla nebo floaty\n      if (!valueFrom) {\n        valueFrom = \"\";\n      }\n      if (!valueTo) {\n        valueTo = \"\";\n      }\n      if (!answer) {\n        answer = \"\";\n      }\n      var parsedValueFrom = parseFloat(valueFrom.replace(/[\\s]/g, '').replace(',', '.'));\n      var parsedValueTo = parseFloat(valueTo.replace(/[\\s]/g, '').replace(',', '.'));\n      var parsedAnswer = parseFloat(answer.replace(/[\\s]/g, '').replace(',', '.'));\n\n      // Kontrola, zda jsou hodnoty platné čísla nebo floaty\n      if (isNaN(parsedValueFrom) || isNaN(parsedAnswer) || valueTo && isNaN(parsedValueTo)) {\n        console.error('Některá z hodnot není platné číslo nebo float.');\n        return false;\n      }\n\n      // Kontrola, zda je hodnota \"answer\" v rozsahu mezi \"valueFrom\" a \"valueTo\" nebo rovna hodnotě \"valueFrom\"\n      if (parsedAnswer >= parsedValueFrom && parsedAnswer <= parsedValueTo || parsedAnswer === parsedValueFrom) {\n        console.log('Hodnota je v rozsahu.');\n        return true;\n      } else {\n        console.log('Hodnota není v rozsahu.');\n        return false;\n      }\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var checkAnswers = component.params.content.points;\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      if (!component.hasOwnProperty(\"$block\")) {\n        debugger;\n      }\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n      var $inputs = $builderEl.find(\".ce\");\n      $inputs.forEach(function (element, i) {\n        $$(element).removeClass(\"success\");\n        $$(element).removeClass(\"fail\");\n        if (checkAnswers) {\n          var answer = $$(element).text();\n          var rightAnswers = rightAnswersPool[i].correctAnswers;\n          rightAnswers = _.filter(rightAnswers, function (o) {\n            return o.deleted == false;\n          });\n          if (rightAnswers.length > 0) {\n            var findedAnswer = _.find(rightAnswers, function (o) {\n              var valueFrom = o.value;\n              var valueTo = o.valueTo;\n              return self.params.methods.isNumberInRange(valueFrom, valueTo, answer);\n\n              //return ra == answer;\n            });\n            if (findedAnswer) {\n              points += parseFloat(findedAnswer.point);\n              if (showResult) {\n                $$(element).addClass(\"success\");\n              }\n            } else {\n              if (showResult) {\n                $$(element).addClass(\"fail\");\n              }\n            }\n          }\n        }\n      });\n      if (checkAnswers) {\n        component.params.content.sentences.forEach(function (element) {\n          if (!element.deleted) {\n            var ca = _.filter(element.correctAnswers, function (o) {\n              return o.deleted === false;\n            });\n            var mPoints = _.maxBy(ca, function (o) {\n              return parseFloat(o.point);\n            });\n            if (mPoints) {\n              maxPoints += parseFloat(mPoints.point);\n            }\n          }\n        });\n      }\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    isAnswered: function isAnswered(component, formComponent) {\n      var block = component.$block;\n      var $inputs = block.find(\".ce\");\n      for (var i = 0; i < $inputs.length; i++) {\n        var answer = $$($inputs[i]).text();\n        if (answer.length == 0) {\n          return false;\n        }\n      }\n      return true;\n    },\n    parse: function parse(word, uppercase, diacritic, spaces) {\n      if (uppercase) {\n        word = word.toUpperCase();\n      }\n      if (diacritic) {\n        word = word.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n      }\n      if (spaces) {\n        word = word.replace(/\\s+/g, \"\");\n      }\n      return word;\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\".ce\");\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      $inputs.forEach(function (element, i) {\n        // debugger;\n        var rightAnswers = rightAnswersPool[i].correctAnswers;\n        var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n        var answerString = \"\";\n        var flag = false;\n        for (var _i = 0; _i < rightAnswers.length; _i++) {\n          // debugger;\n          if (!rightAnswers[_i].deleted) {\n            answerString += rightAnswers[_i].value;\n            if (rightAnswers[_i].hasOwnProperty(\"valueTo\") && rightAnswers[_i].valueTo && rightAnswers[_i].valueTo != \"\") {\n              answerString += \" to \" + rightAnswers[_i].valueTo;\n            }\n            answerString += \" (\" + rightAnswers[_i].point + \"b)\";\n            if (_i != rightAnswers.length - 1) {\n              answerString += \", \";\n            }\n          }\n          var answer = $$(element).text();\n          var isCorrect = self.params.methods.isNumberInRange(rightAnswers[_i].value, rightAnswers[_i].valueTo, answer);\n          if (isCorrect) {\n            flag = true;\n          }\n        }\n        if (rightAnswers.length > 0) {\n          $$(answerIcon).insertAfter($$(element));\n          var target = $$(element).next(\".solution\");\n          if (flag) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: answerString\n          });\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.less\nvar inp_select_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.js\n\n\nvar inp_select_01_myoBj;\n/* harmony default export */ var sentences_inp_select_01 = (inp_select_01_myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"inp-select-01\",\n  title: \"Selecting correct words in sentences\",\n  subtitle: \"with selection\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics\",\n      type: \"bool\",\n      hidden: {\n        text: {\n          name: \"Text\",\n          type: \"textarea\"\n        }\n      }\n    },\n    points: {\n      name: \"Evaluate answer with points?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity\",\n      type: \"bool\"\n    },\n    spaces: {\n      name: \"Ignore spaces?\",\n      type: \"bool\"\n    },\n    sentences: {\n      name: \"Sentences (enter text and other parameters)\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Sentence text (BEFORE field for answer)\",\n          type: \"textEditor\"\n        },\n        textAfterInput: {\n          name: \"Sentence text (AFTER field for answer)\",\n          type: \"textEditor\"\n        },\n        input: {\n          name: \"Length of field for answer\",\n          type: \"input-number\"\n        },\n        correctAnswers: {\n          name: \"Correct answers. (One or more)\",\n          type: \"array\",\n          dependOn: \"content.points\",\n          values: {\n            value: {\n              name: \"Text\",\n              type: \"textarea\"\n            },\n            point: {\n              name: \"Point value\",\n              type: \"input-number\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Add colors to the text <b>by select correct answer</b>\",\n    diacritics: false,\n    uppercase: false,\n    spaces: false,\n    text: \"ano\",\n    points: true,\n    sentences: [{\n      text: \"The fruit includes a banana, which is \",\n      textAfterInput: \". \",\n      input: 7,\n      correctAnswers: [{\n        value: \"\",\n        point: 0\n      }, {\n        value: \"red\",\n        point: 0\n      }, {\n        value: \"yellow\",\n        point: 1\n      }, {\n        value: \"green\",\n        point: 0\n      }]\n    }, {\n      text: \"Watermelon is a vegetable,  \",\n      textAfterInput: \"\",\n      input: 6,\n      correctAnswers: [{\n        value: \"\",\n        point: 0\n      }, {\n        value: \"red\",\n        point: 0\n      }, {\n        value: \"yellow\",\n        point: 0\n      }, {\n        value: \"green\",\n        point: 1\n      }]\n    }, {\n      text: \"on the surface and \",\n      textAfterInput: \"on the inside. \",\n      input: 4,\n      correctAnswers: [{\n        value: \"\",\n        point: 0\n      }, {\n        value: \"red\",\n        point: 1\n      }, {\n        value: \"yellow\",\n        point: 0\n      }, {\n        value: \"green\",\n        point: 0\n      }]\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n      \").concat(content.sentences.map(function (data, index) {\n      return \"\\n    <span class=\\\"inp-select\\\">\\n\\n\\n    \".concat(data.text, \"<label class=\\\"select-label\\\"><select id=\\\"\").concat(builder.id + \"-\" + index, \"\\\" style=\\\"min-width: \").concat(data.input * 7, \"px\\\">\\n    \").concat(data.correctAnswers.map(function (ans, i) {\n        return \"\\n        <option value=\\\"\".concat(ans.value, \"\\\">\").concat(ans.value, \"</option>\\n      \");\n      }).join(\"\"), \"\\n      </select></label>\").concat(data.textAfterInput, \"\\n    </span>\\n          \");\n    }).join(\"\"), \"\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var _this = this;\n      // $builderEl\n      //   .find(\".item-title\")\n      //   .off(\"click\")\n      //   .on(\"click\", function () {\n      //     alert(\"ok2\");\n      //   });\n      var input = $builderEl.find(\"select\");\n      input.off(\"change\");\n      input.on(\"change\", function () {\n        $$(_this).text(\"\");\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor($builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var content = builder.params.content;\n      var id = $builderEl[0].id;\n      var inputs = $builderEl.find(\"select\");\n      var res = true;\n      inputs.forEach(function (inp) {\n        var selectedValue = inp.value;\n        if (selectedValue.length == 0) {\n          res = false;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find(\".ce\").each(function () {\n        var val = $$(this).text();\n        var id = $$(this).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var checkAnswers = component.params.content.points;\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      if (!component.hasOwnProperty(\"$block\")) {\n        debugger;\n      }\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n      var $inputs = $builderEl.find(\"select\");\n      $inputs.forEach(function (element, i) {\n        $$(element).removeClass(\"success\");\n        $$(element).removeClass(\"fail\");\n        if (checkAnswers) {\n          var answer = $$(element).val();\n          var rightAnswers = rightAnswersPool[i].correctAnswers.filter(function (o) {\n            return !o.deleted && parseInt(o.point) > 0;\n          });\n\n          // debugger;\n          if (rightAnswers.length > 0) {\n            var findedAnswer = _.find(rightAnswers, function (o) {\n              var ra = o.value;\n              ra = self.params.methods.parse(ra, uppercase, diacritic, spaces);\n              answer = self.params.methods.parse(answer, uppercase, diacritic, spaces);\n              return ra == answer;\n            });\n            if (findedAnswer) {\n              if (findedAnswer.point == 0) {\n                if (showResult) {\n                  $$(element).addClass(\"fail\");\n                }\n              } else {\n                points += parseFloat(findedAnswer.point);\n                if (showResult) {\n                  $$(element).addClass(\"success\");\n                }\n              }\n            }\n          }\n        }\n      });\n      if (checkAnswers) {\n        component.params.content.sentences.forEach(function (element) {\n          if (!element.deleted) {\n            var ca = _.filter(element.correctAnswers, function (o) {\n              return o.deleted === false;\n            });\n            var mPoints = _.maxBy(ca, function (o) {\n              return parseFloat(o.point);\n            });\n            if (mPoints) {\n              maxPoints += parseFloat(mPoints.point);\n            }\n          }\n        });\n      }\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    parse: function parse(word, uppercase, diacritic, spaces) {\n      if (uppercase) {\n        word = word.toUpperCase();\n      }\n      if (diacritic) {\n        word = word.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n      }\n      if (spaces) {\n        word = word.replace(/\\s+/g, \"\");\n      }\n      return word;\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\"select\");\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      $inputs.forEach(function (element, i) {\n        // debugger;\n        var rightAnswers = rightAnswersPool[i].correctAnswers.filter(function (o) {\n          return !o.deleted && parseInt(o.point) > 0;\n        });\n        var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n        var answerString = \"\";\n        var flag = false;\n        for (var _i = 0; _i < rightAnswers.length; _i++) {\n          answerString += rightAnswers[_i].value + \" (\" + rightAnswers[_i].point + \"b)\";\n          if (_i != rightAnswers.length - 1) {\n            answerString += \", \";\n          }\n          var ra = self.params.methods.parse(rightAnswers[_i].value, uppercase, diacritic, spaces);\n          var el = self.params.methods.parse($$(element).val(), uppercase, diacritic, spaces);\n          if (ra == el) {\n            flag = true;\n          }\n        }\n        if (rightAnswers.length > 0) {\n          $$(answerIcon).insertAfter($$(element));\n          var target = $$(element).next(\".solution\");\n          if (flag) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: answerString\n          });\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js\nvar inp_drag_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js\nvar chip_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img.less\nvar chip_img = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\nvar getParentForm = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img-01.js\n\n\n\n\n\n\n// import lodash from \"lodash\";\n\nvar chipImgSorted01 = lodash_default.a.cloneDeep(chip_01[\"default\"]);\nchipImgSorted01.name = \"chip-img-01\", chipImgSorted01.title = \"Chips with images\";\nchipImgSorted01.contentSetting.chips.values[\"label\"] = {\n  name: \"Chip image\",\n  type: \"image\"\n};\ndelete chipImgSorted01.contentSetting.chips.values[\"color\"];\nchipImgSorted01.content = {\n  label: \"Select a house.\",\n  chips: [{\n    label: \"{{mediaServerDomain}}/public/gqdmuwvqnabox8c8uj4ochupvfszo2d0380cgg0u2zv5s0bverguumycyt2gb7nn.png\",\n    value: \"0\"\n  }, {\n    label: \"{{mediaServerDomain}}/public/ai5goiljol1t5qrkeluwljeu0623vfw5qbnzc8bybqp7a4lcmzyw0gljozp3evhw.png\",\n    pos: \"2\",\n    value: \"0\"\n  }, {\n    label: \"{{mediaServerDomain}}/public/umlzf9t0j2w8ub2plnbh7ttgklf3pspgawg7rfp756ujyb7pozs3diocuakwyci1.png\",\n    value: \"1\"\n  }]\n};\nchipImgSorted01.html = function (content, builder, styles, component) {\n  var helpers = component.params.helpers;\n  var parentForm = Object(getParentForm[\"getParentForm\"])(component);\n  var parentContent = null;\n  if (parentForm) {\n    parentContent = parentForm.params.content;\n  }\n  var preFillChips = content.hasOwnProperty(\"preFillChips\") ? content.preFillChips : [];\n  // let filteredChips = _.xor(content.chips, preFillChips);\n  var filteredChips = [];\n  var predefChips = [];\n  var i = 0;\n  for (i; i < content.chips.length; i++) {\n    var chip = content.chips[i];\n    if (lodash_default.a.find(preFillChips, {\n      label: chip.label\n    })) {\n      predefChips.push(chip);\n    } else {\n      filteredChips.push(chip);\n    }\n  }\n  filteredChips = lodash_default.a.sortBy(filteredChips, function (o) {\n    return o.defaultPos;\n  });\n  var changed = false;\n  if (parentContent && parentContent.shuffleAnswers) {\n    var diff = lodash_default.a.differenceBy(component.params.helpers.shuffledChips, filteredChips, \"label\");\n    if (diff.length > 0 || component.params.helpers.shuffledChips.length == 0) {\n      changed = true;\n    }\n    if (helpers.reset || changed) {\n      helpers.shuffledChips = [];\n      helpers.shuffledChips = lodash_default.a.shuffle(filteredChips);\n      helpers.reset = false;\n    }\n  } else {\n    helpers.shuffledChips = filteredChips;\n  }\n  return \"\\n<span class=\\\"result-badge\\\"></span>\\n  <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n  <div class=\\\"chips-excersise\\\">\\n    <div class=\\\"chips-target\\\">\\n    \").concat(predefChips.map(function (data) {\n    return \"\\n        <a href=\\\"#\\\" class=\\\"chip-item\\\"><div class=\\\"chip-img\\\"  data-id=\\\"\".concat(data.id, \"\\\"><img src=\\\"\").concat(data.label, \"\\\" /></div></a>\\n      \");\n  }).join(\"\"), \"\\n</div>\\n    <div class=\\\"chips-source\\\">\\n      \").concat(helpers.shuffledChips.map(function (data) {\n    return \"\\n        <a href=\\\"#\\\" class=\\\"chip-item\\\"><div class=\\\"chip-img\\\" data-id=\\\"\".concat(data.id, \"\\\"><img  src=\\\"\").concat(data.label, \"\\\" /></div></a>\\n      \");\n  }).join(\"\"), \"\\n    </div>\\n  </div>\\n\");\n};\nchipImgSorted01.methods.eval = function (component, formComponent) {\n  var formComponentParams = formComponent.params;\n  var showResult = formComponentParams.content.showResult;\n  var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n  var $builderEl = component.$block;\n  var app = component.app;\n  var $target = $builderEl.find(\".chips-target\");\n  var $input = $$($target).find(\".chip-img\");\n  var points = 0;\n  var maxPoints = 0;\n  var answears = [];\n  $input.forEach(function (element) {\n    answears.push($$(element).data(\"id\"));\n  });\n  var i = 0;\n  answears.forEach(function (element) {\n    var res = lodash_default.a.find(component.params.content.chips, function (o) {\n      return o.id == element;\n    });\n    points += parseFloat(res.value);\n  });\n  component.params.content.chips.forEach(function (element) {\n    if (element.value > 0 && !element.deleted) {\n      maxPoints += parseFloat(element.value);\n    }\n  });\n  if (!component.params.content.negativePoints) {\n    if (points < 0) {\n      points = 0;\n    }\n  }\n  points = Object(parsePoints[\"formatNumber\"])(points);\n  maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n  if (showResult) {\n    var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n    var $resultBadge = $builderEl.find(\".result-badge\");\n    $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n    if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n    if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n    $resultBadge.addClass(classResult);\n    $resultBadge.css(\"display\", \"block\");\n  }\n  var $solutions = $builderEl.find(\".solution\");\n  $solutions.remove();\n  if (showCorrectAnswers) {\n    chipImgSorted01.methods.solution(component);\n  }\n  return {\n    points: points,\n    totalPoints: maxPoints\n  };\n};\nchipImgSorted01.methods.solution = function (component) {\n  var app = component.app;\n  var $builderEl = component.$block;\n  var correctAnswer = component.params.content.chips;\n  var source = $builderEl.find(\".chips-source\");\n  var trg = $builderEl.find(\".chips-target\");\n  var selectedChips = trg.find(\".chip-img\");\n  var nonSelectedChips = source.find(\".chip-img\");\n  selectedChips.forEach(function (element) {\n    var text = $$(element).data(\"id\");\n    var res = lodash_default.a.find(correctAnswer, function (o) {\n      return o.id == text;\n    });\n    if (res) {\n      if (res.value > 0) {\n        var correct = '<span class=\"selected solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n        $$(element).append(correct);\n        var target = $$(element).find(\".solution\");\n        app.tooltip.create({\n          targetEl: $$(target),\n          text: res.value + \"b\"\n        });\n      }\n    }\n  });\n  nonSelectedChips.forEach(function (element) {\n    var text = $$(element).data(\"id\");\n    var res = lodash_default.a.find(correctAnswer, function (o) {\n      return o.id == text;\n    });\n    if (res) {\n      if (res.value > 0) {\n        var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n        $$(element).append(correct);\n        var target = $$(element).find(\".solution\");\n        app.tooltip.create({\n          targetEl: $$(target),\n          text: res.value + \"b\"\n        });\n      }\n    }\n  });\n};\n/* harmony default export */ var chip_img_01 = (chipImgSorted01);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less\nvar chips_chip = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-sorted-01.js\n\n\n// import lodash from \"lodash\";\n\nvar chipSorted01 = _.cloneDeep(chip_01[\"default\"]);\nchipSorted01.name = \"chip-sorted-01\", chipSorted01.title = \"Sorted chips\";\nchipSorted01.contentSetting.chips.values[\"pos\"] = {\n  name: \"Correct position\",\n  type: \"textarea\",\n  help: \"For multiple correct positons, separate the numbers by comma (,) | 0 = Option that does not belong to the ordered selection\"\n};\nchipSorted01.contentSetting.chips.values[\"position\"] = {\n  name: \"Default position\",\n  type: \"input-number\"\n};\nchipSorted01.content = {\n  label: \"The same type of exercise like chips, but with the need to choose the right order. <b>Sort from largest to smallest.</b> Click to largest first.\",\n  chips: [{\n    label: \"ball\",\n    pos: \"4\",\n    value: \"1\",\n    color: \"black\"\n  }, {\n    label: \"motorcycle\",\n    pos: \"3\",\n    value: \"1\",\n    color: \"black\"\n  }, {\n    label: \"car\",\n    pos: \"2\",\n    value: \"1\",\n    color: \"black\"\n  }, {\n    label: \"house\",\n    pos: \"1\",\n    value: \"1\",\n    color: \"black\"\n  }]\n};\nchipSorted01.methods.answerEmittor = function (e, $builderEl, builder) {\n  var app = builder.app;\n  var id = $builderEl[0].id;\n  var $target = $builderEl.find(\".chips-target\");\n  var $input = $$($target).find(\".chip-item\");\n  var inputs = _.filter(builder.params.content.chips, function (e) {\n    return !e.deleted;\n  });\n  var res = false;\n  if ($input.length == inputs.length) {\n    res = true;\n  }\n  app.data.myEvents.emit(\"form:answer\", {\n    id: id,\n    isAnswered: res\n  });\n}, chipSorted01.methods.eval = function (component, formComponent) {\n  var formComponentParams = formComponent.params;\n  var showResult = formComponentParams.content.showResult;\n  var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n  var $builderEl = component.$block;\n  var app = component.app;\n  var $target = $builderEl.find(\".chips-target\");\n  var $input = $$($target).find(\".chip-text\");\n  var points = 0;\n  var maxPoints = 0;\n  var answears = [];\n  $input.forEach(function (element) {\n    answears.push($$(element).data(\"id\"));\n  });\n  var i = 0;\n  answears.forEach(function (element) {\n    i++;\n    var res = _.find(component.params.content.chips, function (o) {\n      return o.id == element;\n    });\n    if (res.pos.includes(\",\")) {\n      var corr = res.pos.split(\",\");\n      corr.forEach(function (p) {\n        if (p == i) {\n          points += parseFloat(res.value);\n        }\n      });\n    } else if (res.pos == i || res.pos == 0) {\n      points += parseFloat(res.value);\n    }\n  });\n  component.params.content.chips.forEach(function (element) {\n    if (element.value > 0 && !element.deleted && element.pos != 0) {\n      maxPoints += parseFloat(element.value);\n    }\n  });\n  if (!component.params.content.negativePoints) {\n    if (points < 0) {\n      points = 0;\n    }\n  }\n  points = Object(parsePoints[\"formatNumber\"])(points);\n  maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n  if (showResult) {\n    var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n    var $resultBadge = $builderEl.find(\".result-badge\");\n    $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n    if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n    if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n    $resultBadge.addClass(classResult);\n    $resultBadge.css(\"display\", \"block\");\n  }\n  var $solutions = $builderEl.find(\".solution\");\n  $solutions.remove();\n  if (showCorrectAnswers) {\n    chipSorted01.methods.solution(component);\n  }\n  return {\n    points: points,\n    totalPoints: maxPoints\n  };\n};\nchipSorted01.methods.solution = function (component) {\n  var app = component.app;\n  var $builderEl = component.$block;\n  var correctAnswer = component.params.content.chips;\n  var source = $builderEl.find(\".chips-source\");\n  var trg = $builderEl.find(\".chips-target\");\n  var selectedChips = trg.find(\".chip-text\");\n  var nonSelectedChips = source.find(\".chip-text\");\n  selectedChips.forEach(function (element, i) {\n    var text = $$(element).data(\"id\");\n    var res = _.find(correctAnswer, function (o) {\n      return o.id == text && o.pos != 0;\n    });\n    if (res) {\n      var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(element).append(correct);\n      var target = $$(element).find(\".solution\");\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: \"Pozice: \" + res.pos + \" (\" + res.value + \"b)\"\n      });\n      if (res.pos.includes(\",\")) {\n        var corr = res.pos.split(\",\");\n        corr.forEach(function (p) {\n          if (p == i + 1) {\n            $$(target).addClass(\"selected\");\n          }\n        });\n      } else if (res.pos == i + 1) {\n        $$(target).addClass(\"selected\");\n      }\n    }\n  });\n  nonSelectedChips.forEach(function (element) {\n    var text = $$(element).data(\"id\");\n    var res = _.find(correctAnswer, function (o) {\n      return o.id == text && o.pos != 0;\n    });\n    if (res) {\n      var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(element).append(correct);\n      var target = $$(element).find(\".solution\");\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: \"Pozice: \" + res.pos + \" (\" + res.value + \"b)\"\n      });\n    }\n  });\n};\n/* harmony default export */ var chip_sorted_01 = (chipSorted01);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img-sorted-01.js\n\n\n\n// import lodash from \"lodash\";\n\nvar chip_img_sorted_01_chipImgSorted01 = lodash_default.a.cloneDeep(chip_01[\"default\"]);\nchip_img_sorted_01_chipImgSorted01.name = \"chip-img-sorted-01\", chip_img_sorted_01_chipImgSorted01.title = \"Sorted chips with images\";\nchip_img_sorted_01_chipImgSorted01.contentSetting.chips.values[\"pos\"] = {\n  name: \"Correct position\",\n  type: \"textarea\",\n  help: \"For multiple correct positons, separate the numbers by comma (,) | 0 = Option that does not belong to the ordered selection\"\n};\nchip_img_sorted_01_chipImgSorted01.contentSetting.chips.values[\"defaultPos\"] = {\n  name: \"Default position\",\n  type: \"input-number\"\n};\nchip_img_sorted_01_chipImgSorted01.contentSetting.chips.values[\"label\"] = {\n  name: \"Chip image\",\n  type: \"image\"\n};\ndelete chip_img_sorted_01_chipImgSorted01.contentSetting.chips.values[\"color\"];\nchip_img_sorted_01_chipImgSorted01.content = {\n  label: \"The same type of exercise like sorted chips, but with images.<b>Sort from largest to smallest.</b> Click to largest first.\",\n  chips: [{\n    label: \"{{mediaServerDomain}}/public/gqdmuwvqnabox8c8uj4ochupvfszo2d0380cgg0u2zv5s0bverguumycyt2gb7nn.png\",\n    pos: \"3\",\n    value: \"1\",\n    defaultPos: \"1\"\n  }, {\n    label: \"{{mediaServerDomain}}/public/ai5goiljol1t5qrkeluwljeu0623vfw5qbnzc8bybqp7a4lcmzyw0gljozp3evhw.png\",\n    pos: \"2\",\n    value: \"1\",\n    defaultPos: \"2\"\n  }, {\n    label: \"{{mediaServerDomain}}/public/umlzf9t0j2w8ub2plnbh7ttgklf3pspgawg7rfp756ujyb7pozs3diocuakwyci1.png\",\n    pos: \"1\",\n    value: \"1\",\n    defaultPos: \"3\"\n  }]\n};\nchip_img_sorted_01_chipImgSorted01.methods.answerEmittor = function (e, $builderEl, builder) {\n  var app = builder.app;\n  var id = $builderEl[0].id;\n  var $target = $builderEl.find(\".chips-target\");\n  var $input = $$($target).find(\".chip-item\");\n  var inputs = lodash_default.a.filter(builder.params.content.chips, function (e) {\n    return !e.deleted;\n  });\n  var res = false;\n  if ($input.length == inputs.length) {\n    res = true;\n  }\n  app.data.myEvents.emit(\"form:answer\", {\n    id: id,\n    isAnswered: res\n  });\n};\nchip_img_sorted_01_chipImgSorted01.html = function (content, builder, styles) {\n  var preFillChips = content.hasOwnProperty(\"preFillChips\") ? content.preFillChips : [];\n  // let filteredChips = _.xor(content.chips, preFillChips);\n  var filteredChips = [];\n  var predefChips = [];\n  var i = 0;\n  for (i; i < content.chips.length; i++) {\n    var chip = content.chips[i];\n    if (lodash_default.a.find(preFillChips, {\n      label: chip.label\n    })) {\n      predefChips.push(chip);\n    } else {\n      filteredChips.push(chip);\n    }\n  }\n  filteredChips = lodash_default.a.sortBy(filteredChips, function (o) {\n    return o.defaultPos;\n  });\n  return \"\\n<span class=\\\"result-badge\\\"></span>\\n  <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n  <div class=\\\"chips-excersise\\\">\\n    <div class=\\\"chips-target\\\">\\n    \").concat(predefChips.map(function (data) {\n    return \"\\n        <a href=\\\"#\\\" class=\\\"chip-item\\\"><div class=\\\"chip-img\\\"  data-id=\\\"\".concat(data.id, \"\\\"><img src=\\\"\").concat(data.label, \"\\\" /></div></a>\\n      \");\n  }).join(\"\"), \"\\n</div>\\n    <div class=\\\"chips-source\\\">\\n      \").concat(filteredChips.map(function (data) {\n    return \"\\n        <a href=\\\"#\\\" class=\\\"chip-item\\\"><div class=\\\"chip-img\\\" data-id=\\\"\".concat(data.id, \"\\\"><img  src=\\\"\").concat(data.label, \"\\\" /></div></a>\\n      \");\n  }).join(\"\"), \"\\n    </div>\\n  </div>\\n\");\n};\nchip_img_sorted_01_chipImgSorted01.methods.eval = function (component, formComponent) {\n  var formComponentParams = formComponent.params;\n  var showResult = formComponentParams.content.showResult;\n  var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n  var $builderEl = component.$block;\n  var app = component.app;\n  var $target = $builderEl.find(\".chips-target\");\n  var $input = $$($target).find(\".chip-img\");\n  var points = 0;\n  var maxPoints = 0;\n  var answears = [];\n  $input.forEach(function (element) {\n    answears.push($$(element).data(\"id\"));\n  });\n  var i = 0;\n  answears.forEach(function (element) {\n    i++;\n    var res = lodash_default.a.find(component.params.content.chips, function (o) {\n      return o.id == element;\n    });\n    if (res.pos.includes(\",\")) {\n      var corr = res.pos.split(\",\");\n      corr.forEach(function (p) {\n        if (p == i) {\n          points += parseFloat(res.value);\n        }\n      });\n    } else if (res.pos == i || res.pos == 0) {\n      points += parseFloat(res.value);\n    }\n  });\n  if (!component.params.content.negativePoints) {\n    if (points < 0) {\n      points = 0;\n    }\n  }\n  component.params.content.chips.forEach(function (element) {\n    if (element.value > 0 && !element.deleted && element.pos != 0) {\n      maxPoints += parseFloat(element.value);\n    }\n  });\n  points = Object(parsePoints[\"formatNumber\"])(points);\n  maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n  if (showResult) {\n    var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n    var $resultBadge = $builderEl.find(\".result-badge\");\n    $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n    if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n    if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n    $resultBadge.addClass(classResult);\n    $resultBadge.css(\"display\", \"block\");\n  }\n  var $solutions = $builderEl.find(\".solution\");\n  $solutions.remove();\n  if (showCorrectAnswers) {\n    chip_img_sorted_01_chipImgSorted01.methods.solution(component);\n  }\n  return {\n    points: points,\n    totalPoints: maxPoints\n  };\n};\nchip_img_sorted_01_chipImgSorted01.methods.solution = function (component) {\n  var app = component.app;\n  var $builderEl = component.$block;\n  var correctAnswer = component.params.content.chips;\n  var source = $builderEl.find(\".chips-source\");\n  var trg = $builderEl.find(\".chips-target\");\n  var selectedChips = trg.find(\".chip-img\");\n  var nonSelectedChips = source.find(\".chip-img\");\n  selectedChips.forEach(function (element, i) {\n    var id = $$(element).data(\"id\");\n    var res = lodash_default.a.find(correctAnswer, function (o) {\n      return o.id == id && o.pos != 0;\n    });\n    if (res) {\n      var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(element).append(correct);\n      var target = $$(element).find(\".solution\");\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: \"Pozice: \" + res.pos + \" (\" + res.value + \"b)\"\n      });\n      if (res.pos.includes(\",\")) {\n        var corr = res.pos.split(\",\");\n        corr.forEach(function (p) {\n          if (p == i + 1) {\n            $$(target).addClass(\"selected\");\n          }\n        });\n      } else if (res.pos == i + 1) {\n        $$(target).addClass(\"selected\");\n      }\n    }\n  });\n  nonSelectedChips.forEach(function (element) {\n    var id = $$(element).data(\"id\");\n    var res = lodash_default.a.find(correctAnswer, function (o) {\n      return o.id == id && o.pos != 0;\n    });\n    if (res) {\n      var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(element).append(correct);\n      var target = $$(element).find(\".solution\");\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: \"Pozice: \" + res.pos + \" (\" + res.value + \"b)\"\n      });\n    }\n  });\n};\n/* harmony default export */ var chip_img_sorted_01 = (chip_img_sorted_01_chipImgSorted01);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.less\nvar table_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.js\n\n/* harmony default export */ var tables_table_01 = ({\n  name: \"frm-table-01\",\n  title: \"Table\",\n  subtitle: \"\",\n  contentSetting: {\n    tableTitle: {\n      name: \"Table description\",\n      type: \"textEditor\"\n    },\n    border: {\n      name: \"Border type\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Card\",\n        value: \"card-table\"\n      }, {\n        title: \"Border\",\n        value: \"border-table\"\n      }]\n    },\n    rows: {\n      name: \"Number of rows\",\n      type: \"input-number\"\n    },\n    cels: {\n      name: \"Number of columns\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    rows: 2,\n    cels: 3,\n    border: {\n      selected: \"none\"\n    },\n    tableTitle: \"\"\n  },\n  componentsAllowedGroup: \"formTableGroup\",\n  html: function html(content, builder, styles, component) {\n    var decor = \"\";\n    switch (content.border.selected) {\n      case \"none\":\n        decor = \"\";\n        break;\n      case \"card-table\":\n        decor = \"card card-content-padding\";\n        break;\n      case \"border-table\":\n        decor = \"border-table\";\n        break;\n    }\n\n    /*<tr>\r\n        <td class=\"label-cell\">Frozen yogurt</td>\r\n        <td class=\"numeric-cell\">159</td>\r\n        ...\r\n        <td class=\"medium-only\">I like it!</td>\r\n      </tr>*/\n    var tableInner = \"\";\n    for (var i = 1; i <= content.rows; i++) {\n      var cells = \"\";\n      for (var x = 1; x <= content.cels; x++) {\n        var key = i + \"_\" + x;\n        cells = cells + \"<td>\".concat(component.renderComponents(key), \"</td>\");\n      }\n      tableInner = tableInner + \"<tr>\".concat(cells, \"</tr>\");\n    }\n    return \"\\n    <div class=\\\"data-table \".concat(decor, \"\\\">\\n  <table>\\n    <tbody>\\n\").concat(tableInner, \"\\n    </tbody>\\n  </table>\\n</div>\\n\").concat(content.tableTitle.length > 0 ? '<div class=\"tableTitle\">' + content.tableTitle + \"</div>\" : \"\", \"\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      // let $block = builderEl;\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-01.js\nvar c_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.less\nvar c_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.js\n\n/* harmony default export */ var deleted_c_02 = ({\n  el: \"f\",\n  url: \"/components/\",\n  deleted: true,\n  name: \"c-02\",\n  title: \"Card 2\",\n  subtitle: \"Card - two columns\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"basicGroup\",\n    leftColumn: \"basicGroup\"\n  },\n  components: {\n    leftColumn: [],\n    rightColumn: []\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card\\\">\\n  \".concat(content.header ? \"<div class=\\\"card-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content card-content-padding\\\">\\n  <div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-50\\\">\").concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-50\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n</div>\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-03.less\nvar c_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-03.js\n\n/* harmony default export */ var cards_c_03 = ({\n  name: \"c-03\",\n  title: \"Card 3\",\n  subtitle: \"\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    var bg = component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/ztzrec0l6003mzdd7ouafa777pneflrehtyaeny9c7uecnacxu0zyyfhpqeiknat.jpg');\n    return \"\\n    <div class=\\\"card\\\">\\n  \".concat(content.header ? \"<div class=\\\"card-header\\\" style=\\\"background-image: url(\".concat(bg, \");\\\">\").concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n\\n  \").concat(component.renderComponents(\"x0\"), \"\\n</div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.less\nvar c_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.js\n\n/* harmony default export */ var deleted_c_04 = ({\n  name: \"c-04\",\n  title: \"Quote card\",\n  deleted: true,\n  subtitle: \"Card with quotes\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    body: {\n      name: \"Card text\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"quote-highlight\\\">\\n  \".concat(content.header ? \"<div class=\\\"citation-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"quote-content\\\">\\n    <i class=\\\"icon material-icons quote-img\\\">format_quote</i>\\n        <p>\\n          \").concat(content.body, \"\\n        </p>\\n        <i class=\\\"icon material-icons quote-img\\\">format_quote</i>\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"citation-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-05.less\nvar c_05 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-05.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-05.js\n\n\n/* harmony default export */ var cards_c_05 = ({\n  name: \"c-05\",\n  title: \"Card 5 with icon\",\n  subtitle: \"Colored card with icon in header\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    color: {\n      name: \"Color\",\n      type: \"select\",\n      options: [{\n        title: \"Theme\",\n        value: \"theme\"\n      }, {\n        title: \"Blue\",\n        value: \"blue\"\n      }, {\n        title: \"Turquoise\",\n        value: \"turquoise\"\n      }, {\n        title: \"Purple\",\n        value: \"purple\"\n      }, {\n        title: \"Green\",\n        value: \"green\"\n      }, {\n        title: \"Red\",\n        value: \"red\"\n      }, {\n        title: \"Orange\",\n        value: \"orange\"\n      }, {\n        title: \"Yellow\",\n        value: \"yellow\"\n      }]\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\",\n    color: \"theme\",\n    iconNew: {\n      name: \"help\",\n      type: \"material-icons\"\n    }\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    // debugger;\n\n    var icon = \"\";\n    if (content.hasOwnProperty(\"icon\") && content.hasOwnProperty(\"type\")) {\n      if (content.type || content.type == undefined) {\n        icon = \"<i class=\\\"icon material-icons\\\">\".concat(content.icon, \"</i>\");\n      } else {\n        icon = \"<i class=\\\"icon f7-icons\\\">\".concat(content.icon, \"</i>\");\n      }\n    } else {\n      if (typeof_default()(content.iconNew) == \"object\") {\n        icon = \"<i class=\\\"icon \".concat(content.iconNew.type, \"\\\" data-icon=\\\"\").concat(content.iconNew.name, \"\\\"></i>\");\n      } else {\n        icon = content.iconNew;\n      }\n    }\n    return \"\\n    <div class=\\\"card \".concat(content.color, \"\\\">\\n    <div class=\\\"card-header\\\">\\n      <div class=\\\"card-icon\\\">\\n      \").concat(icon, \"\\n      </div>\\n    </div>\\n\\n    \").concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n\\n  <div class=\\\"card-content\\\">\\n    \").concat(component.renderComponents(\"x0\"), \"\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-06.less\nvar c_06 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-06.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-06.js\n\n/* harmony default export */ var cards_c_06 = ({\n  name: \"c-06\",\n  title: \"Card 6\",\n  subtitle: \"With 'wafe' border.\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\",\n    iconNew: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"tx-border \".concat(content.iconNew.length > 0 ? \"with-icon\" : \"\", \"\\\">\\n    \").concat(content.iconNew.length > 0 ? \"<div class=\\\"icon-container\\\">\".concat(content.iconNew, \"</div>\") : \"\", \"\\n    \").concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n      \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-07.less\nvar c_07 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-07.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-07.js\n\n/* harmony default export */ var cards_c_07 = ({\n  name: \"c-07\",\n  title: \"Card 7\",\n  subtitle: \"With theme-color header background\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card\\\">\\n  \".concat(content.header ? \"<div class=\\\"card-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n    \").concat(component.renderComponents(\"x0\"), \"\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.less\nvar c_08 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08-helper.js\n\n\nvar c_08_helper_Color = /*#__PURE__*/function () {\n  function Color(r, g, b) {\n    classCallCheck_default()(this, Color);\n    this.set(r, g, b);\n  }\n  return createClass_default()(Color, [{\n    key: \"toString\",\n    value: function toString() {\n      return \"rgb(\".concat(Math.round(this.r), \", \").concat(Math.round(this.g), \", \").concat(Math.round(this.b), \")\");\n    }\n  }, {\n    key: \"set\",\n    value: function set(r, g, b) {\n      this.r = this.clamp(r);\n      this.g = this.clamp(g);\n      this.b = this.clamp(b);\n    }\n  }, {\n    key: \"hueRotate\",\n    value: function hueRotate() {\n      var angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      angle = angle / 180 * Math.PI;\n      var sin = Math.sin(angle);\n      var cos = Math.cos(angle);\n      this.multiply([0.213 + cos * 0.787 - sin * 0.213, 0.715 - cos * 0.715 - sin * 0.715, 0.072 - cos * 0.072 + sin * 0.928, 0.213 - cos * 0.213 + sin * 0.143, 0.715 + cos * 0.285 + sin * 0.14, 0.072 - cos * 0.072 - sin * 0.283, 0.213 - cos * 0.213 - sin * 0.787, 0.715 - cos * 0.715 + sin * 0.715, 0.072 + cos * 0.928 + sin * 0.072]);\n    }\n  }, {\n    key: \"grayscale\",\n    value: function grayscale() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.multiply([0.2126 + 0.7874 * (1 - value), 0.7152 - 0.7152 * (1 - value), 0.0722 - 0.0722 * (1 - value), 0.2126 - 0.2126 * (1 - value), 0.7152 + 0.2848 * (1 - value), 0.0722 - 0.0722 * (1 - value), 0.2126 - 0.2126 * (1 - value), 0.7152 - 0.7152 * (1 - value), 0.0722 + 0.9278 * (1 - value)]);\n    }\n  }, {\n    key: \"sepia\",\n    value: function sepia() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.multiply([0.393 + 0.607 * (1 - value), 0.769 - 0.769 * (1 - value), 0.189 - 0.189 * (1 - value), 0.349 - 0.349 * (1 - value), 0.686 + 0.314 * (1 - value), 0.168 - 0.168 * (1 - value), 0.272 - 0.272 * (1 - value), 0.534 - 0.534 * (1 - value), 0.131 + 0.869 * (1 - value)]);\n    }\n  }, {\n    key: \"saturate\",\n    value: function saturate() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.multiply([0.213 + 0.787 * value, 0.715 - 0.715 * value, 0.072 - 0.072 * value, 0.213 - 0.213 * value, 0.715 + 0.285 * value, 0.072 - 0.072 * value, 0.213 - 0.213 * value, 0.715 - 0.715 * value, 0.072 + 0.928 * value]);\n    }\n  }, {\n    key: \"multiply\",\n    value: function multiply(matrix) {\n      var newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);\n      var newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);\n      var newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);\n      this.r = newR;\n      this.g = newG;\n      this.b = newB;\n    }\n  }, {\n    key: \"brightness\",\n    value: function brightness() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.linear(value);\n    }\n  }, {\n    key: \"contrast\",\n    value: function contrast() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.linear(value, -(0.5 * value) + 0.5);\n    }\n  }, {\n    key: \"linear\",\n    value: function linear() {\n      var slope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      var intercept = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n      this.r = this.clamp(this.r * slope + intercept * 255);\n      this.g = this.clamp(this.g * slope + intercept * 255);\n      this.b = this.clamp(this.b * slope + intercept * 255);\n    }\n  }, {\n    key: \"invert\",\n    value: function invert() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n      this.r = this.clamp((value + this.r / 255 * (1 - 2 * value)) * 255);\n      this.g = this.clamp((value + this.g / 255 * (1 - 2 * value)) * 255);\n      this.b = this.clamp((value + this.b / 255 * (1 - 2 * value)) * 255);\n    }\n  }, {\n    key: \"hsl\",\n    value: function hsl() {\n      // Code taken from https://stackoverflow.com/a/9493060/2688027, licensed under CC BY-SA.\n      var r = this.r / 255;\n      var g = this.g / 255;\n      var b = this.b / 255;\n      var max = Math.max(r, g, b);\n      var min = Math.min(r, g, b);\n      var h,\n        s,\n        l = (max + min) / 2;\n      if (max === min) {\n        h = s = 0;\n      } else {\n        var d = max - min;\n        s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n        switch (max) {\n          case r:\n            h = (g - b) / d + (g < b ? 6 : 0);\n            break;\n          case g:\n            h = (b - r) / d + 2;\n            break;\n          case b:\n            h = (r - g) / d + 4;\n            break;\n        }\n        h /= 6;\n      }\n      return {\n        h: h * 100,\n        s: s * 100,\n        l: l * 100\n      };\n    }\n  }, {\n    key: \"clamp\",\n    value: function clamp(value) {\n      if (value > 255) {\n        value = 255;\n      } else if (value < 0) {\n        value = 0;\n      }\n      return value;\n    }\n  }]);\n}();\nvar c_08_helper_Solver = /*#__PURE__*/function () {\n  function Solver(target, baseColor) {\n    classCallCheck_default()(this, Solver);\n    this.target = target;\n    this.targetHSL = target.hsl();\n    this.reusedColor = new c_08_helper_Color(0, 0, 0);\n  }\n  return createClass_default()(Solver, [{\n    key: \"solve\",\n    value: function solve() {\n      var result = this.solveNarrow(this.solveWide());\n      return {\n        values: result.values,\n        loss: result.loss,\n        filter: this.css(result.values)\n      };\n    }\n  }, {\n    key: \"solveWide\",\n    value: function solveWide() {\n      var A = 5;\n      var c = 15;\n      var a = [60, 180, 18000, 600, 1.2, 1.2];\n      var best = {\n        loss: Infinity\n      };\n      for (var i = 0; best.loss > 25 && i < 3; i++) {\n        var initial = [50, 20, 3750, 50, 100, 100];\n        var result = this.spsa(A, a, c, initial, 1000);\n        if (result.loss < best.loss) {\n          best = result;\n        }\n      }\n      return best;\n    }\n  }, {\n    key: \"solveNarrow\",\n    value: function solveNarrow(wide) {\n      var A = wide.loss;\n      var c = 2;\n      var A1 = A + 1;\n      var a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];\n      return this.spsa(A, a, c, wide.values, 500);\n    }\n  }, {\n    key: \"spsa\",\n    value: function spsa(A, a, c, values, iters) {\n      var alpha = 1;\n      var gamma = 0.16666666666666666;\n      var best = null;\n      var bestLoss = Infinity;\n      var deltas = new Array(6);\n      var highArgs = new Array(6);\n      var lowArgs = new Array(6);\n      for (var k = 0; k < iters; k++) {\n        var ck = c / Math.pow(k + 1, gamma);\n        for (var i = 0; i < 6; i++) {\n          deltas[i] = Math.random() > 0.5 ? 1 : -1;\n          highArgs[i] = values[i] + ck * deltas[i];\n          lowArgs[i] = values[i] - ck * deltas[i];\n        }\n        var lossDiff = this.loss(highArgs) - this.loss(lowArgs);\n        for (var _i = 0; _i < 6; _i++) {\n          var g = lossDiff / (2 * ck) * deltas[_i];\n          var ak = a[_i] / Math.pow(A + k + 1, alpha);\n          values[_i] = fix(values[_i] - ak * g, _i);\n        }\n        var loss = this.loss(values);\n        if (loss < bestLoss) {\n          best = values.slice(0);\n          bestLoss = loss;\n        }\n      }\n      return {\n        values: best,\n        loss: bestLoss\n      };\n      function fix(value, idx) {\n        var max = 100;\n        if (idx === 2 /* saturate */) {\n          max = 7500;\n        } else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {\n          max = 200;\n        }\n        if (idx === 3 /* hue-rotate */) {\n          if (value > max) {\n            value %= max;\n          } else if (value < 0) {\n            value = max + value % max;\n          }\n        } else if (value < 0) {\n          value = 0;\n        } else if (value > max) {\n          value = max;\n        }\n        return value;\n      }\n    }\n  }, {\n    key: \"loss\",\n    value: function loss(filters) {\n      // Argument is array of percentages.\n      var color = this.reusedColor;\n      color.set(0, 0, 0);\n      color.invert(filters[0] / 100);\n      color.sepia(filters[1] / 100);\n      color.saturate(filters[2] / 100);\n      color.hueRotate(filters[3] * 3.6);\n      color.brightness(filters[4] / 100);\n      color.contrast(filters[5] / 100);\n      var colorHSL = color.hsl();\n      return Math.abs(color.r - this.target.r) + Math.abs(color.g - this.target.g) + Math.abs(color.b - this.target.b) + Math.abs(colorHSL.h - this.targetHSL.h) + Math.abs(colorHSL.s - this.targetHSL.s) + Math.abs(colorHSL.l - this.targetHSL.l);\n    }\n  }, {\n    key: \"css\",\n    value: function css(filters) {\n      function fmt(idx) {\n        var multiplier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n        return Math.round(filters[idx] * multiplier);\n      }\n      return \"filter: invert(\".concat(fmt(0), \"%) sepia(\").concat(fmt(1), \"%) saturate(\").concat(fmt(2), \"%) hue-rotate(\").concat(fmt(3, 3.6), \"deg) brightness(\").concat(fmt(4), \"%) contrast(\").concat(fmt(5), \"%);\");\n    }\n  }]);\n}();\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.js\n\n\n\n/* harmony default export */ var deleted_c_08 = ({\n  name: \"c-08\",\n  deleted: true,\n  title: \"Card with border and image\",\n  subtitle: \"Theme color border\",\n  contentSetting: {\n    image: {\n      name: \"Card image\",\n      type: \"image\"\n    },\n    imgFilter: {\n      name: \"Use color filter on image?\",\n      help: \"Color filter make color theme overlay over the image (color accuracy is not 100% guaranteed)\",\n      type: \"bool\"\n    },\n    background: {\n      name: \"Background\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Shade of theme color\",\n        value: \"theme\"\n      }]\n    }\n  },\n  content: {\n    image: \"{{mediaServerDomain}}/public/g7aj8pepw8bynb0492sgku81gcee9o2jrauem1gcs8mpm920ac20vsidzezjrneg.png\",\n    background: \"theme\",\n    imgFilter: false\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    var filter = \"\";\n    if (content.imgFilter) {\n      // debugger;\n      var rgb = component.params.methods.hexToRgb(component.app.book.params.color);\n      var color = new c_08_helper_Color(rgb[0], rgb[1], rgb[2]);\n      var solver = new c_08_helper_Solver(color);\n      var _result = solver.solve();\n      filter = _result.filter;\n    }\n    return \"\\n    <div class=\\\"card-container \".concat(content.background, \"\\\">\\n      <div class=\\\"card-content\\\">\\n        <div class=\\\"card-image\\\" style=\\\"\").concat(content.imgFilter ? filter : \"\", \"\\\">\\n          <img src=\\\"\").concat(content.image, \"\\\"></img>\\n        </div>\\n        <div class=\\\"subcomponent\\\">\\n          \").concat(component.renderComponents(\"x0\"), \"\\n        </div>\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    hexToRgb: function hexToRgb(hex) {\n      var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n      hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n        return r + r + g + g + b + b;\n      });\n      var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n      return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : null;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-09.less\nvar c_09 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-09.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-09.js\n\n/* harmony default export */ var cards_c_09 = ({\n  name: \"c-09\",\n  title: \"Card 9\",\n  subtitle: \"Vertical line on left side\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n\\n<div class=\\\"c09-content\\\">\\n\".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n\\n      \").concat(component.renderComponents(\"x0\"), \"\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-10.less\nvar c_10 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-10.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-10.js\n\n/* harmony default export */ var cards_c_10 = ({\n  name: \"c-10\",\n  title: \"Card 10\",\n  subtitle: 'With thin border around in theme-color',\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"c10-border\\\">\\n  \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n    \").concat(component.renderComponents(\"x0\"), \"\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-11.less\nvar c_11 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-11.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-11.js\n\n/* harmony default export */ var cards_c_11 = ({\n  name: \"c-11\",\n  title: \"Card 11\",\n  subtitle: \"With title label on the left side (vertical)\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-container\\\">\\n      \".concat(content.header ? \"<div class=\\\"card-title-container\\\"><span class=\\\"card-title\\\">\".concat(content.header, \"</span></div>\") : \"\", \"\\n      <div class=\\\"card-border\\\">\\n        <div class=\\\"card-content\\\">\\n        \").concat(component.renderComponents(\"x0\"), \"\\n        </div>\\n        \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n      </div>\\n\\n\\n    </div>\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-12.less\nvar c_12 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-12.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-12.js\n\n/* harmony default export */ var cards_c_12 = ({\n  name: \"c-12\",\n  title: \"Card 12\",\n  subtitle: \"With title label on the right side (vertical)\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-container\\\">\\n      <div class=\\\"card-border\\\">\\n        <div class=\\\"card-content\\\">\\n            \".concat(component.renderComponents(\"x0\"), \"\\n        </div>\\n        \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n      </div>\\n      \").concat(content.header ? \"<div class=\\\"card-title-container\\\"><span class=\\\"card-title\\\">\".concat(content.header, \"</span></div>\") : \"\", \"\\n    </div>\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-13.less\nvar c_13 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-13.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-13.js\n\n\n/* harmony default export */ var cards_c_13 = ({\n  name: \"c-13\",\n  title: \"Card 13\",\n  subtitle: \"With inline icon\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    color: {\n      name: \"Color\",\n      type: \"select\",\n      options: [{\n        title: \"Theme\",\n        value: \"theme\"\n      }, {\n        title: \"Blue\",\n        value: \"blue\"\n      }, {\n        title: \"Turquoise\",\n        value: \"turquoise\"\n      }, {\n        title: \"Purple\",\n        value: \"purple\"\n      }, {\n        title: \"Green\",\n        value: \"green\"\n      }, {\n        title: \"Red\",\n        value: \"red\"\n      }, {\n        title: \"Orange\",\n        value: \"orange\"\n      }, {\n        title: \"Yellow\",\n        value: \"yellow\"\n      }]\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"\",\n    color: \"theme\",\n    iconNew: {\n      name: \"help\",\n      type: \"material-icons\",\n      custom: false,\n      id: \"\"\n    }\n    // iconNew: \"\",\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-container \".concat(content.color, \"\\\">\\n    <div class=\\\"card-icon\\\">\\n    \").concat(typeof_default()(content.iconNew) == \"object\" ? \"<i class=\\\"icon \".concat(content.iconNew.type, \"\\\" data-icon=\\\"\").concat(content.iconNew.name, \"\\\"></i>\") : \"\".concat(content.iconNew), \"\\n    </div>\\n    <div class=\\\"card-body\\\">\\n\\n\\n\\n\\n    \").concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n\\n      <div class=\\\"card-content\\\">\\n      \").concat(component.renderComponents(\"x0\"), \"\\n      </div>\\n      \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n      </div>\\n    </div>\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-14.less\nvar c_14 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-14.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-14.js\n\n/* harmony default export */ var cards_c_14 = ({\n  name: \"c-14\",\n  title: \"Card 14\",\n  subtitle: \"Quote card\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n\\n<div class=\\\"c14-content\\\">\\n\".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n    <img class=\\\"quote-start\\\" src=\\\"\").concat(component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/rrke19b2t78ozf7l46uihazjx00pciavmsa1lq7npfkcw8igqrv3vo90uk2y21kt.png'), \"\\\" alt=\\\"\\\">\\n      \").concat(component.renderComponents(\"x0\"), \"\\n    <img class=\\\"quote-end\\\" src=\\\"\").concat(component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/rrke19b2t78ozf7l46uihazjx00pciavmsa1lq7npfkcw8igqrv3vo90uk2y21kt.png'), \"\\\" alt=\\\"\\\">\\n  </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-15.less\nvar c_15 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-15.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-15.js\n\n/* harmony default export */ var cards_c_15 = ({\n  name: \"c-15\",\n  title: \"Card 15\",\n  subtitle: \"with icon in header divider\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    iconNew: '<i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"format_quote\"></i>'\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card\\\">\\n  \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"separator\\\">\\n    \").concat(content.iconNew, \"\\n    <div class=\\\"separator-line\\\"></div>\\n  </div>\\n  <div class=\\\"card-content\\\">\\n\\n  \").concat(component.renderComponents(\"x0\"), \"\\n </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.less\nvar c_paper_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.js\n\n/* harmony default export */ var cards_c_paper_01 = ({\n  name: \"c-paper-01\",\n  title: \"Card paper 01\",\n  subtitle: \"notepad paper, clip top\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <svg class=\\\"top-svg\\\" viewBox=\\\"0 0 800 123\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n    <path d=\\\"M800 123V31H760.917L757.082 60.5861C760.077 61.8713 762.606 64.3451 764.242 67.5892C765.878 70.8333 766.521 74.6488 766.062 78.3907C765.602 82.1326 764.069 85.5714 761.721 88.1258C759.373 90.6802 756.354 92.1935 753.175 92.4099C749.996 92.6263 746.851 91.5326 744.273 89.3135C741.694 87.0945 739.84 83.8863 739.024 80.2313C738.207 76.5762 738.479 72.6985 739.792 69.2536C741.105 65.8087 743.38 63.0079 746.231 61.3247V31H682.614L678.778 60.5861C681.773 61.8713 684.303 64.3451 685.939 67.5892C687.575 70.8333 688.218 74.6488 687.758 78.3907C687.299 82.1326 685.766 85.5714 683.418 88.1258C681.07 90.6802 678.051 92.1935 674.872 92.4099C671.692 92.6263 668.548 91.5326 665.969 89.3135C663.391 87.0945 661.537 83.8863 660.72 80.2313C659.904 76.5762 660.175 72.6985 661.488 69.2536C662.802 65.8087 665.076 63.0079 667.928 61.3247V31H604.311L600.475 60.5861C603.47 61.8713 605.999 64.3451 607.635 67.5892C609.272 70.8333 609.914 74.6488 609.455 78.3907C608.996 82.1326 607.462 85.5714 605.114 88.1258C602.766 90.6802 599.747 92.1935 596.568 92.4099C593.389 92.6263 590.245 91.5326 587.666 89.3135C585.088 87.0945 583.233 83.8863 582.417 80.2313C581.601 76.5762 581.872 72.6985 583.185 69.2536C584.498 65.8087 586.773 63.0079 589.625 61.3247V31H526.008L522.172 60.5861C525.167 61.8713 527.696 64.3451 529.332 67.5892C530.968 70.8333 531.611 74.6488 531.152 78.3907C530.692 82.1326 529.159 85.5714 526.811 88.1258C524.463 90.6802 521.444 92.1935 518.265 92.4099C515.086 92.6263 511.941 91.5326 509.363 89.3135C506.784 87.0945 504.93 83.8863 504.114 80.2313C503.297 76.5762 503.569 72.6985 504.882 69.2536C506.195 65.8087 508.47 63.0079 511.321 61.3247V31H447.704L443.868 60.5861C446.86 61.8761 449.385 64.3527 451.017 67.5975C452.649 70.8423 453.288 74.6565 452.827 78.3961C452.365 82.1356 450.83 85.5713 448.482 88.123C446.134 90.6746 443.117 92.1858 439.939 92.4015C436.762 92.6171 433.619 91.5239 431.041 89.3064C428.464 87.089 426.61 83.8833 425.792 80.2305C424.975 76.5778 425.244 72.702 426.554 69.2575C427.864 65.813 430.135 63.0111 432.983 61.3247V31H369.401L365.565 60.5861C368.557 61.8761 371.082 64.3527 372.714 67.5975C374.346 70.8423 374.985 74.6565 374.523 78.3961C374.061 82.1356 372.527 85.5713 370.179 88.123C367.831 90.6746 364.813 92.1858 361.636 92.4015C358.458 92.6171 355.315 91.5239 352.738 89.3064C350.16 87.089 348.306 83.8833 347.489 80.2305C346.671 76.5778 346.94 72.702 348.25 69.2575C349.561 65.813 351.832 63.0111 354.68 61.3247V31H291.063L287.227 60.5861C290.222 61.8713 292.751 64.3451 294.388 67.5892C296.024 70.8333 296.667 74.6488 296.207 78.3907C295.748 82.1326 294.215 85.5714 291.866 88.1258C289.518 90.6802 286.5 92.1935 283.32 92.4099C280.141 92.6263 276.997 91.5326 274.418 89.3135C271.84 87.0945 269.986 83.8863 269.169 80.2313C268.353 76.5762 268.624 72.6985 269.937 69.2536C271.251 65.8087 273.525 63.0079 276.377 61.3247V31H212.76L208.924 60.5861C211.919 61.8713 214.448 64.3451 216.084 67.5892C217.72 70.8333 218.363 74.6488 217.904 78.3907C217.444 82.1326 215.911 85.5714 213.563 88.1258C211.215 90.6802 208.196 92.1935 205.017 92.4099C201.838 92.6263 198.693 91.5326 196.115 89.3135C193.536 87.0945 191.682 83.8863 190.866 80.2313C190.049 76.5762 190.321 72.6985 191.634 69.2536C192.947 65.8087 195.222 63.0079 198.074 61.3247V31H134.456L130.621 60.5861C133.616 61.8713 136.145 64.3451 137.781 67.5892C139.417 70.8333 140.06 74.6488 139.601 78.3907C139.141 82.1326 137.608 85.5714 135.26 88.1258C132.912 90.6802 129.893 92.1935 126.714 92.4099C123.535 92.6263 120.39 91.5326 117.812 89.3135C115.233 87.0945 113.379 83.8863 112.563 80.2313C111.746 76.5762 112.017 72.6985 113.331 69.2536C114.644 65.8087 116.919 63.0079 119.77 61.3247V31H56.1531L52.3174 60.5861C55.3122 61.8713 57.8415 64.3451 59.4777 67.5892C61.1139 70.8333 61.7566 74.6488 61.2972 78.3907C60.8379 82.1326 59.3046 85.5714 56.9565 88.1258C54.6085 90.6802 51.5897 92.1935 48.4106 92.4099C45.2314 92.6263 42.0868 91.5326 39.5083 89.3135C36.9299 87.0945 35.0757 83.8863 34.2592 80.2313C33.4428 76.5762 33.7141 72.6985 35.0274 69.2536C36.3407 65.8087 38.6154 63.0079 41.4669 61.3247V31H0V123H800Z\\\" fill=\\\"var(--f7-card-bg-color)\\\"/>\\n    <path d=\\\"M712.915 3.65258C710.297 5.18486 708.062 7.3115 706.337 9.91093C704.612 12.5104 703.432 15.5316 702.863 18.8018C702.295 22.0721 702.349 25.5272 703.023 28.9697C703.434 30.9999 703.489 31.0071 703.489 31.0071L708.489 31.0071C708.489 31.0071 708.539 31.1742 707.893 28.4207C707.248 25.6672 707.114 22.8805 707.499 20.2309C707.884 17.5813 708.781 15.1246 710.133 13.0109C711.486 10.8972 713.267 9.171 715.368 7.93781C717.468 6.70461 719.843 5.99036 722.348 5.83868C724.853 5.68701 727.435 6.10112 729.937 7.0557C732.438 8.01028 734.806 9.48527 736.896 11.3905C738.987 13.2957 740.755 15.5911 742.093 18.1363L786.519 93.7954C787.993 96.3211 788.56 99.2379 788.093 101.906C787.627 104.575 786.166 106.777 784.031 108.031L782.062 109.187C779.927 110.441 777.292 110.644 774.734 109.751C772.176 108.858 769.905 106.942 768.418 104.424L730.212 39.3572C729.801 38.6586 729.173 38.1265 728.465 37.8781C727.757 37.6297 727.026 37.6852 726.435 38.0325C725.844 38.3798 725.439 38.9904 725.311 39.7299C725.183 40.4695 725.341 41.2774 725.752 41.976L764.024 107.155C766.331 111.07 769.859 114.05 773.834 115.44C777.808 116.829 781.903 116.516 785.221 114.567L787.19 113.411C790.508 111.463 792.777 108.039 793.5 103.892C794.223 99.7442 793.34 95.2115 791.045 91.2887L746.619 15.6296C742.975 9.38051 737.378 4.60903 731.059 2.36331C724.739 0.117591 718.214 0.58131 712.915 3.65258Z\\\" fill=\\\"var(--f7-theme-color)\\\"/>\\n    </svg>\\n    <div class=\\\"card-inner\\\">\\n    \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n    <svg class=\\\"bottom-svg\\\"   viewBox=\\\"0 0 800 58\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n    <path d=\\\"M800 -0.000976562V22.7501L797.386 21.3218L788.907 19.0263L781.383 24.3315L772.458 18.7202L764.998 24.561L756.646 23.4898L748.55 24.1529L740.867 28.3869L732.866 29.9682L724.131 25.6578L715.779 24.561L708.448 31.167L699.841 28.1573L691.425 26.3974L683.519 28.9225L675.773 32.4933L666.879 27.1371L659.962 37.1098L651.227 32.9269L643.832 39.0993L635.416 37.5434L627.606 40.4766L618.808 35.8091L611.38 41.9049L602.805 38.9973L594.198 35.8856L586.739 41.5733L578.674 42.3895L570.704 44.1494L562.703 45.6798L554.638 46.4449L545.394 38.4106L537.424 40.0685L528.977 38.0791L521.199 41.5733L514.249 51.2145L505.451 46.598L497.418 47.9243L489.735 52.0052L481.033 48.0773L472.649 46.649L464.393 46.1134L455.945 44.3025L448.677 51.3675L440.644 52.6938L431.782 47.6437L424.578 55.3974L416.289 54.9638L407.714 51.9797L400.287 57.999L391.776 55.576L382.977 50.9339V50.5258L378.259 56.3156L370.609 48.8425L362.066 54.1987L353.969 53.1784L346.254 46.3939L337.934 48.5109L329.71 49.3781L321.422 51.1125L312.974 55.3719L305.069 51.5716L296.972 50.5514L288.46 55.474L280.937 46.1134L272.968 42.9251L264.648 45.2207L256.583 43.8689L247.816 52.2347L239.719 51.7756L231.623 50.5258L223.589 49.072L215.461 48.5619L207.682 43.1547L199.267 46.598L190.883 49.8117L183.105 44.0219L174.562 48.9955L166.592 46.3684L158.304 48.2303L150.526 42.3385L142.047 46.853L134.555 37.1353L125.98 42.8231L118.043 39.5584L110.01 37.3394L101.69 39.4054L93.3057 42.7211L85.5594 36.3957L77.3032 37.824L68.7918 42.4405L60.7268 41.1653L52.8212 37.2119L44.6924 36.8548L36.4042 38.2321L28.6261 32.6974L20.0191 38.6147L12.2091 33.6156L3.85719 36.2426L0 37.824V-0.000976562H391.744H800Z\\\" fill=\\\"var(--f7-card-bg-color)\\\"/>\\n    </svg>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.less\nvar c_paper_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.js\n\n/* harmony default export */ var cards_c_paper_02 = ({\n  name: \"c-paper-02\",\n  title: \"Card paper 02\",\n  subtitle: \"sharp edges, with icon\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    iconNew: '<i class=\"icon f7-icons\" contenteditable=\"false\" data-icon=\"gamepad\"></i>'\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    \".concat(content.iconNew ? \"<div class=\\\"card-icon\\\">\\n      \".concat(content.iconNew, \"\\n      </div>\") : \"\", \"\\n\\n    <svg viewBox=\\\"0 0 799 37\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n    <path d=\\\"M0 0.998047V36.4981H799.5V0.998047L749.5 10.0001L684.5 0.998047L582.5 10.0001L474.5 0.998047L347 10.0001L262.5 0.998047L164.5 10.0001L105.5 0.998047L22 10.0001L0 0.998047Z\\\" fill=\\\"var(--f7-card-bg-color)\\\"/>\\n    </svg>\\n    <div class=\\\"card-inner\\\">\\n    \").concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n    <svg class=\\\"svg-bottom\\\"  viewBox=\\\"0 0 799 46\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n    <path d=\\\"M0 35.9972V0.497185H799.5V35.9972L749.5 26.9951L684.5 35.9972L582.5 26.9951L474.5 35.9972L347 26.9951L246.5 35.9972L164.5 26.9951L82 41.9951L30 35.9972H0Z\\\" fill=\\\"var(--f7-card-bg-color)\\\"/>\\n    </svg>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.less\nvar c_paper_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.js\n\n\n/* harmony default export */ var cards_c_paper_03 = ({\n  name: \"c-paper-03\",\n  title: \"Card paper 03\",\n  subtitle: \"\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\",\n    iconNew: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    var icon = \"\";\n    var customStyle = \"\";\n    if (content.iconNew != \"\") {\n      icon = \"<div class=\\\"card-icon\\\">\\n        \".concat(typeof_default()(content.iconNew) == \"object\" ? \"<i class=\\\"icon \".concat(content.iconNew.type, \"\\\" data-icon=\\\"\").concat(content.iconNew.name, \"\\\"></i>\") : \"\".concat(content.iconNew), \"\\n    </div>\");\n      customStyle = \" style=\\\"margin-top: var(--fb-card-01-icon-top)\\\" \";\n    }\n    return \"\\n    <div class=\\\"card\\\" \".concat(customStyle, \">\\n\\n    \").concat(icon, \"\\n\\n  \").concat(content.header ? \"<div class=\\\"card-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n\\n  \").concat(component.renderComponents(\"x0\"), \"\\n </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\\n\".concat(content.footer, \"\\n\\n<svg id=\\\"right-corner-paper\\\" width=\\\"85\\\" height=\\\"85\\\" viewBox=\\\"0 0 85 85\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path d=\\\"M0 85V0H85V51.5L0 85Z\\\" fill=\\\"var(--f7-card-bg-color)\\\"/>\\n<path d=\\\"M29 37L0 85L85 51.5L29 37Z\\\" fill=\\\"#6B6B6B\\\"/>\\n</svg>\\n\\n\\n</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.less\nvar c_sf_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.js\n\n/* harmony default export */ var cards_c_sf_01 = ({\n  name: \"c-sf-01\",\n  title: \"Card SF 01\",\n  subtitle: \"notepad paper, tape top\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <svg class=\\\"tape-left\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 86 139\\\" fill=\\\"F3F0EB\\\">\\n        <path opacity=\\\"0.8\\\" d=\\\"M21.0039 137.786C24.58 133.335 28.6459 129.047 33.1553 124.972C38.7366 129.61 44.8909 133.946 51.5626 137.919C52.385 135.367 53.8912 132.912 56.0073 130.698C58.8626 132.615 61.718 134.532 64.5733 136.443C67.3086 133.147 69.6372 129.707 71.5315 126.169C75.3941 130.686 80.2731 134.829 85.9746 138.415C83.3133 95.7999 79.0996 53.3666 78.8593 10.2984C76.965 13.0438 73.6753 19.339 71.781 22.0844C63.4552 17.7788 63.1318 10.1291 54.7968 5.82346C52.3203 13.6244 49.8438 21.4192 47.3766 29.2201C43.6526 18.3714 35.5116 8.18792 24.0256 0C21.4382 8.21211 19.4515 16.5028 18.0746 24.8359C13.1494 16.7689 7.09678 8.9922 0 1.64484C0.231015 10.6431 1.60786 18.952 2.2085 24.7815C3.15105 33.9853 4.12131 43.1952 5.2117 52.393C7.36476 70.6072 9.96137 88.8093 13.6207 106.927C15.6998 117.249 18.1208 127.542 20.9947 137.786H21.0039Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <svg class=\\\"tape-right\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"  viewBox=\\\"0 0 86 139\\\" fill=\\\"none\\\">\\n        <path opacity=\\\"0.8\\\" d=\\\"M21.0039 137.786C24.58 133.335 28.6459 129.047 33.1553 124.972C38.7366 129.61 44.8909 133.946 51.5626 137.919C52.385 135.367 53.8912 132.912 56.0073 130.698C58.8626 132.615 61.718 134.532 64.5733 136.443C67.3086 133.147 69.6372 129.707 71.5315 126.169C75.3941 130.686 80.2731 134.829 85.9746 138.415C83.3133 95.7999 79.0996 53.3666 78.8593 10.2984C76.965 13.0438 73.6753 19.339 71.781 22.0844C63.4552 17.7788 63.1318 10.1291 54.7968 5.82346C52.3203 13.6244 49.8438 21.4192 47.3766 29.2201C43.6526 18.3714 35.5116 8.18792 24.0256 0C21.4382 8.21211 19.4515 16.5028 18.0746 24.8359C13.1494 16.7689 7.09678 8.9922 0 1.64484C0.231015 10.6431 1.60786 18.952 2.2085 24.7815C3.15105 33.9853 4.12131 43.1952 5.2117 52.393C7.36476 70.6072 9.96137 88.8093 13.6207 106.927C15.6998 117.249 18.1208 127.542 20.9947 137.786H21.0039Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <svg class=\\\"card-top\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"100%\\\" viewBox=\\\"0 0 867 90\\\">\\n        <path d=\\\"M786.717 0H809.542C840.904 0 866.335 16.6419 866.335 37.1662V90H0V79.0831V37.1662C0 16.6419 25.4301 0 56.7928 0H70.9309V22.417C61.4778 23.6688 54.3532 29.1355 54.3532 35.6906C54.3532 43.171 63.6123 49.2303 75.043 49.2303C86.4736 49.2303 95.7327 43.171 95.7327 35.6906C95.7327 28.9117 88.1184 23.2999 78.1848 22.3082V0H159.465V22.417C150.012 23.6688 142.887 29.1355 142.887 35.6906C142.887 43.171 152.147 49.2303 163.577 49.2303C175.008 49.2303 184.267 43.171 184.267 35.6906C184.267 28.9117 176.653 23.2999 166.719 22.3082V0H248.036V22.417C238.583 23.6688 231.459 29.1355 231.459 35.6906C231.459 43.171 240.718 49.2303 252.148 49.2303C263.579 49.2303 272.838 43.171 272.838 35.6906C272.838 28.9117 265.224 23.2999 255.29 22.3082V0H336.608V22.417C327.154 23.6688 320.03 29.1355 320.03 35.6906C320.03 43.171 329.289 49.2303 340.72 49.2303C352.15 49.2303 361.409 43.171 361.409 35.6906C361.409 28.9117 353.795 23.2999 343.861 22.3082V0H425.179V22.417C415.726 23.6688 408.601 29.1355 408.601 35.6906C408.601 43.171 417.86 49.2303 429.291 49.2303C440.721 49.2303 449.981 43.171 449.981 35.6906C449.981 28.9117 442.366 23.2999 432.433 22.3082V0H513.75V22.417C504.297 23.6688 497.172 29.1355 497.172 35.6906C497.172 43.171 506.431 49.2303 517.862 49.2303C529.293 49.2303 538.552 43.171 538.552 35.6906C538.552 28.9117 530.938 23.2999 521.004 22.3082V0H602.321V22.417C592.868 23.6688 585.744 29.1355 585.744 35.6906C585.744 43.171 595.003 49.2303 606.433 49.2303C617.864 49.2303 627.123 43.171 627.123 35.6906C627.123 28.9117 619.509 23.2999 609.575 22.3082V0H690.892V22.417C681.439 23.6688 674.315 29.1355 674.315 35.6906C674.315 43.171 683.574 49.2303 695.004 49.2303C706.435 49.2303 715.694 43.171 715.694 35.6906C715.694 28.9117 708.08 23.2999 698.146 22.3082V0H779.464V22.417C770.01 23.6688 762.886 29.1355 762.886 35.6906C762.886 43.171 772.145 49.2303 783.576 49.2303C795.006 49.2303 804.265 43.171 804.265 35.6906C804.265 28.9117 796.651 23.2999 786.717 22.3082V0Z\\\" fill=\\\"#F3F0EB\\\"/>\\n    </svg>\\n    <div class=\\\"card-inner\\\">\\n    \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n    <svg class=\\\"card-bottom\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 867 52\\\" fill=\\\"none\\\">\\n    <path d=\\\"M8.98187 30.2625C5.95095 29.6577 2.90155 30.0629 0 31.0123V0H866.335V46.6685C860.504 45.7554 854.377 45.2656 848.519 44.8786C838.372 44.2013 828.18 43.524 818.006 43.9715C819.198 40.6878 820.381 37.4042 821.564 34.1206C815.021 33.8182 808.479 33.5098 801.937 33.2074C803.36 39.0128 791.957 44.171 784.158 41.2502C786.607 38.916 789.046 36.5757 791.495 34.2415C779.611 30.8853 767.719 27.5291 755.835 24.1729C752.629 23.2658 749.274 22.3406 745.782 22.4131C734.453 22.649 723.225 32.7599 714.844 27.765L714.29 19.4017L680.247 19.964C684.673 25.8117 682.733 33.4493 675.645 38.0452L653.75 36.8569C646.452 36.4609 639.154 36.0648 631.854 35.6687C632.834 31.8589 633.813 28.0431 634.793 24.2273C617.966 22.141 599.734 25.8057 587.592 33.7033C576.087 34.1387 564.583 34.5802 553.078 35.0216C551.137 32.899 551.831 29.8996 554.649 28.2427L512.521 28.406C512.133 36.219 510.1 45.6889 499.085 48.7125C489.229 51.4153 478.519 47.1539 469.342 43.5025L468.97 43.3546C459.711 39.6719 446.774 36.7753 438.938 41.6796C436.693 38.2024 434.447 34.7192 432.202 31.2361C420.327 34.6769 407.825 37.1804 395.045 38.6741C395.322 35.3965 395.609 32.1189 395.886 28.8413C378.015 30.9034 360.134 32.9595 342.263 35.0216C342.448 37.3075 342.623 39.5993 342.808 41.8912C336.585 42.7587 330.362 43.6202 324.14 44.4816L324.068 44.4915C312.721 37.4344 295.422 34.7797 280.462 37.7912C268.976 48.5311 240.838 48.7185 229.019 38.1359C218.291 42.3931 204.291 42.889 192.925 39.4058C186.485 37.4344 180.367 34.2052 173.271 34.4955C166.553 34.7737 161.165 38.1541 154.826 39.6296C143.285 42.3206 130.81 38.4201 118.585 37.8698C106.359 37.3195 91.1031 44.3041 96.6383 51.4579C84.5608 53.006 72.9731 48.3013 61.3484 45.6586C50.2966 43.1551 35.2067 43.5421 29.228 51.0951C20.9577 46.1183 20.1076 32.4697 8.98187 30.2625Z\\\" fill=\\\"#F3F0EB\\\"/>\\n    <path d=\\\"M818.033 28.793C819.216 25.5093 820.399 22.2257 821.591 18.9421C815.049 18.6397 808.506 18.3313 801.964 18.0289C803.387 23.8342 791.984 28.9925 784.185 26.0717C786.634 23.7375 789.073 21.3972 791.522 19.063C779.639 15.7068 767.746 12.3506 755.863 8.9944C752.647 8.08732 749.302 7.1621 745.809 7.23466C734.48 7.47655 723.253 17.5814 714.871 12.5864C714.686 9.79868 714.502 7.01091 714.317 4.22314C702.969 4.41061 691.622 4.59809 680.274 4.78555C684.701 10.6332 682.751 18.2769 675.673 22.8667C661.073 22.0745 646.482 21.2823 631.881 20.4901C632.861 16.6743 633.84 12.8586 634.82 9.04883C618.002 6.96858 599.761 10.6271 587.619 18.5248C576.114 18.9662 564.61 19.4077 553.105 19.8431C551.165 17.7145 551.858 14.7151 554.676 13.0642C540.63 13.1186 526.585 13.173 512.548 13.2275C512.16 21.0404 510.127 30.5104 499.112 33.534C489.114 36.2794 478.256 31.865 468.997 28.1762C459.738 24.4934 446.801 21.5968 438.965 26.5011C436.72 23.0179 434.474 19.5347 432.229 16.0576C420.364 19.5045 407.861 22.008 395.072 23.4956C395.35 20.218 395.636 16.9404 395.913 13.6629C378.042 15.7249 360.161 17.781 342.29 19.8431C342.475 22.135 342.66 24.4269 342.835 26.7127C336.589 27.5775 330.342 28.4422 324.095 29.313C312.748 22.262 295.45 19.6012 280.489 22.6127C269.003 33.3465 240.865 33.54 229.047 22.9574C218.318 27.2207 204.319 27.7105 192.953 24.2273C186.512 22.2559 180.395 19.0207 173.298 19.317C166.58 19.5951 161.193 22.9755 154.854 24.4511C143.312 27.1421 130.837 23.2416 118.612 22.6913C106.387 22.141 91.1305 29.1195 96.6656 36.2794C84.5881 37.8275 73.0004 33.1167 61.3757 30.4801C50.3332 27.9705 35.234 28.3636 29.2554 35.9166C20.985 30.9397 20.1349 17.2972 9.00921 15.0839C5.97829 14.4792 2.92889 14.8844 0.0273438 15.8338V31.0184C2.92889 30.0689 5.97829 29.6638 9.00921 30.2685C20.1349 32.4757 20.985 46.1243 29.2554 51.1011C35.234 43.5481 50.324 43.1611 61.3757 45.6647C73.0004 48.3073 84.5881 53.0121 96.6656 51.464C91.1305 44.3101 106.387 37.3256 118.612 37.8759C130.837 38.4262 143.312 42.3266 154.854 39.6356C161.193 38.1601 166.58 34.7797 173.298 34.5016C180.395 34.2113 186.512 37.4405 192.953 39.4119C204.319 42.8951 218.318 42.3992 229.047 38.1419C240.865 48.7246 269.003 48.5371 280.489 37.7973C295.45 34.7857 312.748 37.4405 324.095 44.4976C330.342 43.6328 336.589 42.7681 342.835 41.8973C342.651 39.6054 342.475 37.3135 342.29 35.0277C360.161 32.9656 378.042 30.9095 395.913 28.8474C395.636 32.125 395.35 35.4026 395.072 38.6802C407.852 37.1865 420.355 34.683 432.229 31.2421C434.474 34.7253 436.72 38.2085 438.965 41.6856C446.801 36.7813 459.738 39.6779 468.997 43.3607C478.256 47.0434 489.123 51.4579 499.112 48.7185C510.127 45.6949 512.16 36.225 512.548 28.412C526.594 28.3576 540.64 28.3031 554.676 28.2487C551.858 29.9057 551.165 32.9051 553.105 35.0277C564.61 34.5862 576.114 34.1448 587.619 33.7094C599.761 25.8117 617.993 22.1471 634.82 24.2334C633.84 28.0492 632.861 31.865 631.881 35.6747C646.482 36.4669 661.073 37.2591 675.673 38.0513C682.76 33.4554 684.701 25.8177 680.274 19.9701C691.622 19.7826 702.969 19.5952 714.317 19.4077C714.502 22.1955 714.686 24.9832 714.871 27.771C723.253 32.766 734.48 22.655 745.809 22.4192C749.302 22.3466 752.656 23.2719 755.863 24.179C767.746 27.5352 779.639 30.8913 791.522 34.2475C789.073 36.5818 786.634 38.9221 784.185 41.2563C791.984 44.1771 803.387 39.0188 801.964 33.2135C808.506 33.5159 815.049 33.8242 821.591 34.1266C820.408 37.4102 819.225 40.6939 818.033 43.9775C828.207 43.53 838.4 44.2073 848.546 44.8846C854.404 45.2716 860.531 45.7614 866.362 46.6746V31.49C860.531 30.5769 854.404 30.0931 848.546 29.7001C838.409 29.0228 828.207 28.3515 818.033 28.793V28.793Z\\\" fill=\\\"#C9C9C9\\\"/>\\n    </svg>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.less\nvar c_sf_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.js\n\n/* harmony default export */ var cards_c_sf_02 = ({\n  name: \"c-sf-02\",\n  title: \"Card SF 02\",\n  subtitle: \"Top left and bottom right tape\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n\\n\\n    <svg class=\\\"card-top\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 799 29\\\" >\\n    <path d=\\\"M0.743601 14.1498C0.135226 16.076 -0.100385 18.0172 0.038761 19.9571C0.240535 22.2072 0.477464 24.9907 0.743601 28.2158H798.847C797.853 18.7432 796.941 10.6058 796.177 4.49926C776.383 4.31982 757.981 4.25457 739.588 3.99357L737.658 3.96593C723.07 3.75735 708.455 3.5484 693.917 2.92346C683.21 2.44061 672.579 2.8158 661.67 1.9447L660.879 1.88123C648.858 0.917048 636.261 -0.0933195 623.576 1.43901C616.553 2.28727 608.12 2.07847 601.113 1.04425C592.538 -0.218345 584.357 -0.215083 576.092 0.414584C565.427 1.22043 555.089 2.76686 544.449 3.5466C525.444 4.94622 506.447 6.68515 486.938 4.72763C476.34 3.65426 465.541 2.25791 454.91 2.31011C437.281 2.39493 419.299 2.68856 402.232 4.49273C387.707 6.02612 373.107 8.29031 358.54 7.73894C329.038 6.6199 300.484 10.7894 270.73 9.15814C245.339 7.77483 219.419 9.09289 193.735 9.20708C192.117 9.2464 190.494 9.21686 188.893 9.11899C168.923 7.51709 148.818 6.7504 128.764 7.72915C113.744 8.46974 99.5801 5.73902 84.4765 5.85973C60.7386 6.04895 37.2441 7.14842 13.7495 8.26094C6.88575 8.5872 1.81764 10.5773 0.743601 14.1498Z\\\" fill=\\\"#F3F0EB\\\"/>\\n    </svg>\\n    <div class=\\\"card-inner\\\">\\n    \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n     <svg class=\\\"tape-left\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"  viewBox=\\\"0 0 138 83\\\" >\\n      <path opacity=\\\"0.8\\\" d=\\\"M113.294 0.783203C114.947 2.06586 116.468 3.17622 117.891 4.35837C124.058 9.46348 130.211 14.5957 136.35 19.755C136.801 20.1413 137.199 20.5546 137.541 20.9898C137.841 21.3385 137.951 21.7484 137.851 22.1469C137.751 22.5454 137.447 22.9069 136.995 23.1675C133.89 25.1633 130.786 27.1495 127.436 28.9777C125.333 30.136 122.677 30.6433 120.701 31.9259C118.025 33.6027 115.035 35.0287 111.808 36.1664C111.56 36.2667 111.325 36.3821 111.107 36.511C107.47 38.4685 104.064 40.6844 100.133 42.3116C95.5282 44.2261 92.3746 47.2173 87.9175 49.2083C85.717 50.1655 84.1402 51.7497 82.4092 53.152C80.2944 54.7773 77.9467 56.254 75.4012 57.5599C73.804 58.3217 72.0912 58.9635 70.2924 59.4744C67.0687 60.5416 64.749 62.346 62.3523 64.0402C61.0068 64.9975 59.8715 66.0982 58.5329 67.0602C57.513 67.8327 56.2438 68.4325 54.8257 68.8119C53.5421 69.1461 52.4073 69.7018 51.5319 70.4248C50.0252 71.717 47.9508 72.4637 45.9816 73.1864C44.2296 73.8277 42.7999 74.7035 41.1671 75.4166C38.8474 76.4217 36.6329 77.5321 34.4113 78.6329C31.7273 79.9634 29.0852 81.3322 26.219 82.7871C17.6552 75.8953 9.04933 69.0656 0.835938 61.8004C3.6041 60.4172 6.21109 59.1154 8.81106 57.804C9.20366 57.5926 9.56937 57.3588 9.90431 57.1053C10.1211 56.9061 10.3551 56.7159 10.6051 56.5357C13.7027 54.8415 16.5129 52.8696 20.5285 52.0991C22.5328 51.7162 23.591 50.5197 24.7333 49.4141C25.1784 48.9777 25.7036 48.582 26.2961 48.2368C27.6977 47.4231 29.0993 46.6191 30.585 45.882C31.761 45.3203 32.9823 44.8042 34.2431 44.3361C35.4345 43.8575 36.6819 43.4794 37.8943 43.0391C38.1628 42.9572 38.4019 42.8363 38.5951 42.6849C39.6393 41.766 40.6485 40.8232 41.6997 39.8995C41.9678 39.6685 42.2815 39.4639 42.6317 39.2916C44.8533 38.1813 47.1239 37.1092 49.3174 35.9701C52.0155 34.5583 54.6575 33.0985 57.2995 31.6627C57.7013 31.3785 58.0693 31.0728 58.3998 30.7486C60.2878 29.3216 62.4718 28.0913 64.8822 27.0968C65.897 26.7151 66.8386 26.2489 67.6854 25.7089C69.9063 24.0606 72.665 22.7931 75.7376 22.0093C76.2826 21.8857 76.7753 21.6734 77.1734 21.3908C77.5714 21.1081 77.8627 20.7635 78.0222 20.3868C78.8351 18.7978 80.9025 17.9411 82.8437 17.0797C85.7661 15.7826 88.7585 14.567 91.7159 13.3178C91.7845 13.2993 91.8483 13.2734 91.9051 13.2413C93.0965 11.9969 94.7784 11.0875 96.3552 10.0968C97.6797 9.26406 98.6608 8.1537 100.069 7.41665C104.281 5.172 108.668 3.07093 113.294 0.783203Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <svg class=\\\"tape-right\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"  viewBox=\\\"0 0 138 83\\\" >\\n      <path opacity=\\\"0.8\\\" d=\\\"M113.294 0.783203C114.947 2.06586 116.468 3.17622 117.891 4.35837C124.058 9.46348 130.211 14.5957 136.35 19.755C136.801 20.1413 137.199 20.5546 137.541 20.9898C137.841 21.3385 137.951 21.7484 137.851 22.1469C137.751 22.5454 137.447 22.9069 136.995 23.1675C133.89 25.1633 130.786 27.1495 127.436 28.9777C125.333 30.136 122.677 30.6433 120.701 31.9259C118.025 33.6027 115.035 35.0287 111.808 36.1664C111.56 36.2667 111.325 36.3821 111.107 36.511C107.47 38.4685 104.064 40.6844 100.133 42.3116C95.5282 44.2261 92.3746 47.2173 87.9175 49.2083C85.717 50.1655 84.1402 51.7497 82.4092 53.152C80.2944 54.7773 77.9467 56.254 75.4012 57.5599C73.804 58.3217 72.0912 58.9635 70.2924 59.4744C67.0687 60.5416 64.749 62.346 62.3523 64.0402C61.0068 64.9975 59.8715 66.0982 58.5329 67.0602C57.513 67.8327 56.2438 68.4325 54.8257 68.8119C53.5421 69.1461 52.4073 69.7018 51.5319 70.4248C50.0252 71.717 47.9508 72.4637 45.9816 73.1864C44.2296 73.8277 42.7999 74.7035 41.1671 75.4166C38.8474 76.4217 36.6329 77.5321 34.4113 78.6329C31.7273 79.9634 29.0852 81.3322 26.219 82.7871C17.6552 75.8953 9.04933 69.0656 0.835938 61.8004C3.6041 60.4172 6.21109 59.1154 8.81106 57.804C9.20366 57.5926 9.56937 57.3588 9.90431 57.1053C10.1211 56.9061 10.3551 56.7159 10.6051 56.5357C13.7027 54.8415 16.5129 52.8696 20.5285 52.0991C22.5328 51.7162 23.591 50.5197 24.7333 49.4141C25.1784 48.9777 25.7036 48.582 26.2961 48.2368C27.6977 47.4231 29.0993 46.6191 30.585 45.882C31.761 45.3203 32.9823 44.8042 34.2431 44.3361C35.4345 43.8575 36.6819 43.4794 37.8943 43.0391C38.1628 42.9572 38.4019 42.8363 38.5951 42.6849C39.6393 41.766 40.6485 40.8232 41.6997 39.8995C41.9678 39.6685 42.2815 39.4639 42.6317 39.2916C44.8533 38.1813 47.1239 37.1092 49.3174 35.9701C52.0155 34.5583 54.6575 33.0985 57.2995 31.6627C57.7013 31.3785 58.0693 31.0728 58.3998 30.7486C60.2878 29.3216 62.4718 28.0913 64.8822 27.0968C65.897 26.7151 66.8386 26.2489 67.6854 25.7089C69.9063 24.0606 72.665 22.7931 75.7376 22.0093C76.2826 21.8857 76.7753 21.6734 77.1734 21.3908C77.5714 21.1081 77.8627 20.7635 78.0222 20.3868C78.8351 18.7978 80.9025 17.9411 82.8437 17.0797C85.7661 15.7826 88.7585 14.567 91.7159 13.3178C91.7845 13.2993 91.8483 13.2734 91.9051 13.2413C93.0965 11.9969 94.7784 11.0875 96.3552 10.0968C97.6797 9.26406 98.6608 8.1537 100.069 7.41665C104.281 5.172 108.668 3.07093 113.294 0.783203Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <svg class=\\\"card-bottom\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 801 20\\\">\\n      <path d=\\\"M0.970703 0.0820312C1.55807 6.08181 2.9006 12.0653 4.0166 18.7828C35.7342 19.2428 65.4297 19.9084 95.0832 19.9997C104.934 20.0291 114.684 18.1597 124.602 17.7453C136.434 17.2494 148.34 17.1874 159.685 15.2691C160.046 15.2103 160.482 15.305 160.885 15.3245C180.125 16.2968 199.323 17.4256 218.623 18.1825C231.427 18.6882 244.819 19.4125 256.122 15.7911C262.171 13.8336 267.466 13.5073 274.179 14.4861C291.884 17.0504 309.714 17.7225 327.965 16.1826C334.182 15.6606 340.845 16.2185 347.264 16.486C362.887 17.1352 378.453 17.3114 393.842 15.7617C396.98 15.4452 400.051 14.7536 403.189 14.7144C422.027 14.4991 440.873 14.2968 459.719 14.336C475.007 14.3686 490.295 14.7699 505.583 14.9526C507.991 14.9907 510.397 14.8682 512.699 14.5905C521.836 13.4323 530.899 12.1566 540.028 11.0017C541.6 10.8485 543.247 10.8552 544.811 11.0213C552.329 11.6509 559.797 12.4535 567.349 12.9788C575.236 13.5236 583.191 14.0652 591.129 14.1761C601.298 14.3164 611.493 14.1207 621.646 13.8792C625.989 13.7751 630.261 13.4017 634.3 12.7732C644.637 11.155 655.168 9.17142 665.925 11.2627C687.515 15.4648 709.592 13.9412 731.601 13.7487C733.59 13.7324 735.494 13.2528 737.474 13.1125C740.192 12.8767 742.964 12.7499 745.748 12.7341C763.663 12.907 771.516 11.527 800.339 10.1991C800.236 7.25327 800.078 3.85628 799.873 0.0820312H0.970703Z\\\" fill=\\\"#F3F0EB\\\"/>\\n    </svg>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.less\nvar c_sf_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.js\n\n/* harmony default export */ var cards_c_sf_03 = ({\n  name: \"c-sf-03\",\n  title: \"Card SF 03\",\n  subtitle: \"classic card wih tape on top\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <svg class=\\\"tape-left\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 97 108\\\">\\n    <path opacity=\\\"0.8\\\" d=\\\"M96.7644 26.5474C92.8548 27.5356 88.874 28.2484 84.8632 28.6725C85.6698 24.0114 86.0937 19.2877 86.1261 14.5588C84.3153 15.6088 82.3234 16.3325 80.2589 16.6925C80.4005 14.5528 80.5422 12.4131 80.679 10.2727C77.7541 10.9733 74.8878 11.9032 72.115 13.058C73.4526 9.13365 74.2125 5.00946 74.3528 0.865303C49.8792 24.7285 26.0543 49.1012 0.460419 72.2661C2.76229 71.5353 7.67126 69.4482 9.96907 68.7118C10.3216 74.2681 5.87514 78.488 6.22771 84.0443L22.783 74.4081C17.6221 81.6712 14.4032 90.2954 13.5498 99.1637C19.3513 95.7755 24.994 92.1085 30.4454 88.1823C27.3603 94.4256 24.8504 100.952 22.9568 107.649C28.2432 102.737 32.7121 97.7516 35.9788 94.3976C41.1372 89.0992 46.2875 83.7898 51.3901 78.4389C61.4965 67.8398 71.4362 57.0784 80.9557 45.9498C86.3795 39.6085 91.6691 33.1489 96.7651 26.5426L96.7644 26.5474Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <svg class=\\\"tape-right\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 97 108\\\">\\n    <path opacity=\\\"0.8\\\" d=\\\"M96.7644 26.5474C92.8548 27.5356 88.874 28.2484 84.8632 28.6725C85.6698 24.0114 86.0937 19.2877 86.1261 14.5588C84.3153 15.6088 82.3234 16.3325 80.2589 16.6925C80.4005 14.5528 80.5422 12.4131 80.679 10.2727C77.7541 10.9733 74.8878 11.9032 72.115 13.058C73.4526 9.13365 74.2125 5.00946 74.3528 0.865303C49.8792 24.7285 26.0543 49.1012 0.460419 72.2661C2.76229 71.5353 7.67126 69.4482 9.96907 68.7118C10.3216 74.2681 5.87514 78.488 6.22771 84.0443L22.783 74.4081C17.6221 81.6712 14.4032 90.2954 13.5498 99.1637C19.3513 95.7755 24.994 92.1085 30.4454 88.1823C27.3603 94.4256 24.8504 100.952 22.9568 107.649C28.2432 102.737 32.7121 97.7516 35.9788 94.3976C41.1372 89.0992 46.2875 83.7898 51.3901 78.4389C61.4965 67.8398 71.4362 57.0784 80.9557 45.9498C86.3795 39.6085 91.6691 33.1489 96.7651 26.5426L96.7644 26.5474Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <div class=\\\"card-inner\\\">\\n    \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.less\nvar c_sf_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.js\n\n/* harmony default export */ var cards_c_sf_04 = ({\n  name: \"c-sf-04\",\n  title: \"Card SF 04\",\n  subtitle: \"bottom folded\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    iconNew: '<i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"format_quote\"></i>'\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <div class=\\\"card-icon\\\">\\n    \".concat(content.iconNew, \"\\n    </div>\\n    <div class=\\\"card-inner\\\">\\n    <div class=\\\"card-title\\\">\").concat(content.header ? \"\".concat(content.header) : \"\", \"</div>\\n    <div class=\\\"card-content\\\">\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    <div class=\\\"fb-card-footer\\\">    \").concat(content.footer ? \"\".concat(content.footer) : \"\", \"</div>\\n    </div>\\n    <svg class=\\\"card-fold\\\" width=\\\"79\\\" height=\\\"77\\\" viewBox=\\\"0 0 79 77\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n    <path d=\\\"M0 9.78846C0 9.78846 17.5859 11.0941 37.1488 10.48C50.1517 10.0723 78.7847 0.468018 78.7847 0.468018C78.7847 0.468018 73.8446 26.4528 70.125 46.6987C67.3912 61.5876 69.8212 76.1721 69.8212 76.1721L0 9.78846Z\\\" fill=\\\"#C9C9C9\\\"/>\\n    </svg>\\n    \\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.less\nvar c_sf_05 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.js\n\n/* harmony default export */ var cards_c_sf_05 = ({\n  name: \"c-sf-05\",\n  title: \"Card SF 05\",\n  subtitle: \"title on tape\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n      <div class=\\\"title-container\\\">\\n        <svg class=\\\"tape\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 139 41\\\" fill=\\\"none\\\">\\n        <path opacity=\\\"0.8\\\" d=\\\"M74.8714 2.43932L112.265 2.0675H116.426C117.462 2.04246 118.498 2.07995 119.529 2.17975C120.545 2.26895 121.542 2.50526 122.49 2.88128C123.413 3.24186 124.226 3.83667 124.848 4.60705C125.22 5.96802 124.624 10.8647 125.733 6.19251C124.757 11.2295 122.869 13.0886 126.161 7.96739C122.876 13.1307 121.852 13.2078 126.287 9.2091C121.852 13.2078 121.199 13.1447 126.35 10.4648C121.199 13.1447 120.876 13.0956 126.392 11.7136C120.876 13.1166 120.904 13.1166 126.498 13.2499C120.883 13.1096 121.325 13.1938 126.68 14.7722C121.325 13.1938 122.104 13.3131 126.933 16.2805C122.104 13.3131 125.494 14.9406 127.368 19.9706C125.564 15.572 123.283 13.5516 127.256 17.7818C123.283 13.5305 127.256 21.6473 127.108 22.6224C126.961 23.5975 126.673 23.6747 126.666 23.1135C126.659 22.5522 124.891 14.653 127.635 19.2691C124.891 14.653 126.147 22.5873 125.655 23.3029C125.164 24.0184 124.954 24.1447 125.164 23.7519C125.375 23.359 125.936 19.4234 127.6 21.1281C125.936 19.4234 125.255 23.352 124.869 23.7939C124.483 24.2359 124.61 24.2149 125.164 23.7168C125.719 23.2187 126.245 18.5886 128.077 20.7423C126.245 18.5886 125.726 23.2187 125.185 23.7378C124.645 24.257 124.561 24.3271 125.003 23.9693C125.445 23.6115 126.364 21.6262 128.014 21.7104C126.364 21.6262 125.312 23.6045 124.729 24.0255C123.564 24.8673 124.526 24.3973 128.042 23.0854C122.764 25.0497 123.508 25.19 128.575 22.2015C123.508 25.176 123.332 25.1619 128.744 23.1135C123.332 25.1619 123.522 25.2181 129.115 23.6536C123.501 25.197 123.655 25.2251 129.375 24.299C123.655 25.2251 123.915 25.2742 129.705 25.0918C123.915 25.2742 124.14 25.3093 129.923 25.5758C124.14 25.3093 124.743 25.3794 130.344 26.5229C124.729 25.3794 124.687 25.3724 130.344 26.4177C124.729 25.3724 125.361 25.4285 130.688 27.1894C125.361 25.4285 125.585 25.4425 130.793 27.4068C125.585 25.4425 126.161 25.4636 131.046 27.94C126.133 25.4636 126.926 25.4636 131.361 28.5714C126.926 25.4636 126.666 25.4776 131.516 27.7085C126.666 25.4776 127.712 25.4425 131.677 29.2098C127.712 25.4425 127.824 25.4425 132.098 28.6135C127.824 25.4425 128.968 25.3513 132.337 30.4655C128.968 25.3513 129.066 25.3373 132.856 30.0797C129.066 25.3373 129.635 25.3724 133.018 31.7142C129.635 25.4005 131.214 27.1823 133.719 32.956C131.305 27.3437 134.695 33.2646 134.421 34.1906C135.032 33.8609 134.906 35.0114 135.123 35.4183C135.341 35.8252 135.614 36.2391 135.86 36.639C136.604 37.8597 137.355 39.0663 138.099 40.2589L100.965 37.579C93.947 37.081 86.9288 36.5759 80.0088 37.1581C73.7766 37.6843 67.6777 39.0733 61.4525 39.6416C55.2273 40.2098 49.1004 39.9643 42.9103 39.7187L34.6077 39.396C33.2041 39.3399 31.8004 39.2276 30.4529 39.2347C29.0492 39.1154 27.6877 39.1014 26.2981 39.0733C24.9085 39.0452 23.4417 38.5612 22.1433 38.912C20.7989 38.495 19.3683 38.4394 17.9955 38.7506C16.6562 38.2917 15.2116 38.2356 13.8407 38.5893C12.5184 38.0478 11.0477 37.9882 9.68589 38.4209C8.37348 37.8807 6.17676 36.3163 5.53108 38.2595C5.06085 35.8322 4.75206 33.2927 4.95559 36.4987C4.61871 32.8577 4.70995 31.7142 4.44326 34.7168C4.66082 31.5318 4.85031 31.2091 3.95197 32.7736C4.82925 31.125 4.83627 31.0758 3.60106 31.1179C4.82925 31.0197 4.17656 30.7812 2.68167 27.954C4.08532 30.5146 4.08532 30.3182 3.01153 27.47C4.05725 30.2761 2.68167 28.0102 1.67104 25.1549C2.57639 27.7857 3.53088 29.4132 2.86415 26.3265C3.56597 29.3781 1.93774 26.5159 1.13064 24.4323C1.78334 26.2914 2.79396 28.0312 2.62552 25.2461C2.79396 27.9961 1.28504 25.2461 0.800781 23.7659C1.23591 24.7059 1.55174 24.0255 2.49218 22.896C1.55174 23.9834 1.08853 23.9553 0.856929 23.1696C1.12362 23.7308 1.51665 22.8609 2.49218 22.1173C1.51665 22.8188 1.17275 23.359 1.08853 22.8188C1.26399 23.2047 1.64999 22.3909 2.55534 21.7104C1.6149 22.4119 1.55875 22.8188 1.77632 22.3348C2.09214 22.3348 2.70974 21.3877 3.30629 20.2793C2.71676 21.3526 2.14828 22.1734 1.90264 22.1945C1.69209 22.5522 1.76929 22.1103 2.60447 21.3246C1.76228 22.1033 1.81843 22.3137 2.16934 21.9068C2.84687 21.2247 3.34584 20.3862 3.62212 19.4655C3.37951 20.2984 2.9333 21.0578 2.32374 21.6753C2.0009 21.9419 1.94475 21.6753 2.61851 20.7493C1.91668 21.6613 2.11319 21.7946 2.52025 21.3947C3.18259 20.669 3.64033 19.7805 3.8467 18.8201C3.65906 19.7516 3.21414 20.6119 2.56236 21.3035C2.1553 21.6683 1.97283 21.4999 2.56236 20.5459C1.3482 22.4189 3.79757 20.4827 4.14147 18.0694C3.88881 20.2723 1.91668 21.8297 2.58341 19.7812C1.88159 21.8156 4.45729 19.3182 4.62573 17.2557C4.56256 19.0937 2.52025 21.065 2.59745 19.0235C2.50621 21.058 4.78013 18.8061 4.87838 17.0312C4.8082 18.9113 2.44305 21.4298 2.81502 19.4304C2.44305 21.4158 5.07489 18.5044 5.18016 16.7155C5.18016 18.1747 3.27822 20.0618 2.75887 18.2378C3.28524 20.0548 5.39774 17.9853 5.41879 16.5822C5.41879 18.2448 2.89222 21.1422 3.06066 19.22C2.89222 21.1351 5.56617 18.1115 5.62232 16.47C5.67846 17.7467 3.7695 19.4865 2.93433 17.8309C3.7695 19.4795 6.08552 17.4661 6.18378 16.2314C6.31713 17.6345 4.03619 20.2021 3.51684 18.4272C4.03619 20.2021 6.32414 17.5854 6.18378 16.2034C6.08552 17.403 3.81863 19.3392 2.91327 17.7257C3.81161 19.3392 5.72057 17.6275 5.68548 16.3998C5.64337 17.9923 3.01153 21.0229 3.09575 19.1147C3.01855 21.0299 5.66442 18.0203 5.70653 16.4138C5.75566 17.6415 3.86775 19.22 2.89923 17.6485C3.85371 19.2129 6.00832 16.9821 6.03639 15.8526C6.09254 16.8067 4.36606 18.1466 2.94135 16.9119C4.345 18.1326 6.38731 16.5822 6.45048 15.6071C6.59084 16.3928 5.20825 16.8418 3.29226 15.9789C5.20825 16.8418 6.70313 16.3928 6.62593 15.586C6.59084 16.5191 4.7661 17.6906 3.11681 16.6103C4.75908 17.6906 6.75928 16.7436 6.8856 15.7754C7.0751 16.8488 5.33457 18.1466 3.73441 16.8839C4.76609 18.2869 6.36626 17.1925 6.68208 15.9157C7.06107 16.8488 6.89964 16.5331 6.33818 15.6492C6.1698 15.9096 5.94696 16.1305 5.685 16.2967C5.42304 16.4628 5.12818 16.5702 4.82071 16.6116C4.51323 16.6529 4.20045 16.6271 3.90389 16.5361C3.60732 16.445 3.33401 16.2908 3.10277 16.0841C4.95559 16.947 6.4224 16.042 6.33818 15.2423C6.28905 15.6913 5.01875 15.2423 2.92731 14.7582C5.03279 15.2142 6.1136 15.4597 6.05043 14.9757C6.00832 15.4106 4.80118 15.1511 2.75185 14.7372C4.80118 15.1511 5.93814 15.3405 5.93814 14.9055C5.93814 15.2914 4.84329 14.9687 2.79396 14.5337C4.84329 14.9546 5.93814 15.1581 5.95218 14.7302C5.95218 14.9266 4.95559 14.2882 2.98346 13.6287C4.95559 14.2882 5.97323 14.8915 5.96622 14.681C5.96622 15.0388 4.90646 14.681 2.87116 14.197C4.91348 14.681 5.93814 14.9897 5.93814 14.6109C5.93814 14.7372 4.95558 14.0567 3.05363 13.2499C4.95558 14.0567 5.91708 14.7091 5.89603 14.5828C5.89603 14.9266 4.85031 14.5828 2.82906 14.0847C4.84329 14.5828 5.78374 14.8634 5.72057 14.5127C5.66443 14.5969 4.62572 13.9515 2.77992 13.2008C4.62572 13.9515 5.58723 14.4776 5.67846 14.2882C5.75567 14.3794 4.92751 13.748 3.16593 12.7308C4.92751 13.748 5.74163 14.3092 5.68548 14.1339C5.68548 14.1759 4.73802 13.4955 3.08873 12.3941C4.74504 13.4814 5.43984 13.9655 5.41177 13.762C4.79619 12.8873 4.13069 12.0487 3.41859 11.2506C5.86094 14.2251 4.67485 13.3552 3.71335 9.77734C4.68889 13.285 3.21506 11.8819 4.05024 8.30412C3.25717 11.7416 2.03599 8.47951 4.52747 5.80667C2.12021 7.75693 3.55895 5.04902 4.52747 3.32325C3.39753 3.7161 4.21165 1.73077 3.93794 0.846839C5.30535 0.612625 6.68587 0.462682 8.07169 0.397859C17.8972 -0.261581 29.7791 2.28498 39.338 2.46036C51.1848 2.67082 63.0316 2.55858 74.8714 2.43932Z\\\" fill=\\\"#86C11F\\\"/>\\n        </svg>\\n        \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n      </div>\\n    <div class=\\\"card-inner\\\">\\n    <div class=\\\"card-content\\\">\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n    <div class=\\\"card-background\\\">\\n    </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.less\nvar c_sf_06 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.js\n\n/* harmony default export */ var cards_c_sf_06 = ({\n  name: \"c-sf-06\",\n  title: \"Card SF 06\",\n  subtitle: \"with image\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    image: {\n      name: \"Image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    image: \"{{mediaServerDomain}}/public/t6dbo1lkb2hkombm456na5h457sdixioqyj9aiux6cl7qsxvvz0ai6y3phw74wj4.png\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <div class=\\\"card-inner\\\">\\n      <div class=\\\"left\\\">\\n      \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n      <div class=\\\"card-content\\\">\\n      \").concat(component.renderComponents(\"x0\"), \"\\n      </div>\\n      \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n      </div>\\n      <div class=\\\"right\\\">\\n      <svg class=\\\"separator\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 189 269\\\">\\n      <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M-297.257 314.317C-272.399 335.812 -243.19 351.27 -211.783 359.551C-180.377 367.832 -147.572 368.726 -115.787 362.166C-115.34 362.752 -115.001 363.418 -114.787 364.13C-112.937 368.762 -112.146 369.062 -108.134 366.747C-108.134 366.819 -108.244 366.891 -108.244 366.933C-108.199 367.041 -108.172 367.156 -108.164 367.274C-106.584 365.847 -105.023 366.24 -103.473 367.347C-100.402 369.58 -98.0509 372.61 -95.6603 375.557C-94.8042 376.493 -93.8741 377.354 -92.8795 378.131C-92.7396 379.165 -91.8792 379.434 -91.219 379.889C-90.8964 379.806 -90.5584 379.815 -90.24 379.913C-89.9215 380.011 -89.6344 380.196 -89.4083 380.447C-88.935 380.87 -88.3646 381.161 -87.7516 381.291C-87.1386 381.422 -86.5035 381.388 -85.907 381.192C-83.956 380.303 -82.6156 381.048 -81.2752 382.227C-80.1241 383.57 -78.866 384.812 -77.5141 385.939C-77.1168 386.306 -76.6116 386.524 -76.0798 386.557C-75.548 386.591 -75.0207 386.439 -74.5829 386.125C-73.5323 385.298 -74.4726 384.523 -74.9127 383.696C-75.5228 382.507 -74.9124 381.049 -75.6325 379.777C-75.8525 379.364 -75.7824 378.805 -76.2126 378.506C-76.2825 378.102 -76.3225 377.72 -76.3925 377.317C-76.3227 376.643 -76.0413 376.011 -75.5914 375.519C-75.1415 375.026 -74.5478 374.699 -73.9011 374.588C-72.2304 374.257 -70.7196 373.316 -69.0189 373.399C-68.7946 373.442 -68.5642 373.436 -68.342 373.383C-68.1199 373.329 -67.9108 373.229 -67.7277 373.089C-67.5447 372.948 -67.3916 372.77 -67.2781 372.566C-67.1646 372.361 -67.093 372.135 -67.0679 371.9C-66.8198 370.91 -66.3346 370 -65.657 369.254C-65.2568 369.182 -66.0873 370.288 -65.0067 369.854C-63.2945 369.212 -61.5433 368.687 -59.7644 368.283C-57.4834 368.17 -55.1724 368.056 -52.8614 367.984C-52.3912 367.984 -51.921 367.984 -51.7409 367.426C-51.5608 366.868 -52.0209 366.712 -52.311 366.454C-53.7492 365.035 -55.5391 364.054 -57.4828 363.621C-58.1098 363.421 -58.7245 363.183 -59.3235 362.907C-59.4032 362.802 -59.5017 362.715 -59.6136 362.649C-59.7235 361.749 -59.3234 361.904 -58.8232 362.204C-58.5418 361.852 -58.3878 361.41 -58.3877 360.953C-58.3877 360.497 -58.5415 360.054 -58.8229 359.702C-58.7579 359.657 -58.7087 359.592 -58.6828 359.516C-58.2551 359.707 -57.7869 359.779 -57.324 359.727C-56.861 359.674 -56.4192 359.498 -56.0416 359.217C-54.8811 358.359 -53.1504 359.103 -52.1398 357.646C-51.8096 357.16 -51.0493 356.86 -50.729 356.26C-49.9285 354.844 -48.9181 354.7 -47.6577 355.517C-47.1875 355.93 -46.2772 356.158 -47.1877 357.016C-47.0986 357.111 -47.0015 357.197 -46.8976 357.274C-46.8275 357.16 -46.7475 357.088 -46.6774 356.974C-45.7771 357.119 -44.9067 357.274 -44.0364 357.461C-42.7059 357.947 -41.8654 356.675 -40.7149 356.531C-40.632 356.439 -40.5583 356.338 -40.4948 356.231C-41.4351 355.517 -42.6256 355.517 -43.716 355.197C-44.5885 354.561 -45.6572 354.281 -46.7171 354.41C-48.4634 353.649 -49.9849 352.426 -51.1285 350.864C-51.1805 350.657 -51.2173 350.446 -51.2385 350.233C-51.0584 350.233 -50.6983 350.233 -50.6982 350.119C-50.3679 348.662 -49.0274 348.662 -48.0569 348.104C-47.6816 348.517 -47.1919 348.801 -46.6546 348.916C-46.1174 349.031 -45.5589 348.971 -45.0557 348.745C-43.6451 348.259 -42.2043 347.133 -40.934 349.149C-40.794 349.376 -40.5438 348.704 -40.6138 348.332C-40.5037 347.888 -40.4336 347.402 -40.3235 346.947C-39.9932 345.458 -40.4332 344.559 -42.0539 344.558C-42.9405 344.602 -43.8212 344.388 -44.5957 343.94C-45.3703 343.492 -46.0077 342.829 -46.4354 342.025C-46.7554 340.681 -47.2254 339.296 -46.0647 338.107C-44.994 336.039 -43.2031 334.303 -42.5025 332.049C-38.4004 329.382 -34.375 326.557 -30.4263 323.573C-29.426 324.348 -28.4257 325.155 -27.4254 325.941C-26.5222 326.825 -25.7201 327.814 -25.0348 328.888C-24.8797 329.098 -24.7127 329.298 -24.5346 329.487C-24.0867 330.857 -23.1393 331.992 -21.8939 332.651C-21.3767 332.864 -20.8994 333.168 -20.4835 333.551C-19.9834 334.378 -19.6934 335.308 -19.2233 336.167C-19.1557 336.472 -19.1289 336.785 -19.1434 337.097C-18.8235 339.341 -18.1435 341.233 -15.7126 341.946L-14.9923 342.401C-14.6322 342.846 -13.992 343.073 -13.912 343.776C-12.7984 346.87 -10.6378 349.441 -7.83043 351.014C-7.4003 351.386 -7.00018 351.728 -6.57004 352.048C-6.50526 352.296 -6.3788 352.522 -6.2033 352.703C-6.0278 352.884 -5.80937 353.015 -5.56976 353.082C-5.40613 353.141 -5.23259 353.166 -5.05954 353.154C-4.31687 354.057 -3.32018 354.696 -2.2086 354.985C-2.13299 355.104 -2.03421 355.206 -1.91851 355.285C-0.438007 356.215 1.3727 356.588 2.64306 357.901C3.00321 357.901 3.1433 357.673 3.11334 357.301C2.81325 357.043 2.49314 356.815 2.20305 356.557C3.13654 356.805 4.10322 356.892 5.06422 356.816C5.74444 357.302 6.32459 358.046 7.66518 357.85C6.94495 357.291 6.43479 356.816 5.89461 356.433C4.89443 354.572 2.71364 353.641 1.95359 351.543L1.88357 351.656C1.26342 350.767 0.613246 349.868 -0.0369065 348.937C-0.25694 348.482 -0.396914 347.903 -0.757019 347.552C-3.50786 345.122 -6.32874 342.775 -9.76001 341.502L-11.0204 340.603L-12.0208 339.827C-12.741 339.042 -13.4611 338.214 -14.1813 337.439C-14.5818 336.344 -15.3019 335.404 -16.2419 334.751C-17.1203 333.868 -17.8745 332.862 -18.4824 331.763C-18.5923 330.904 -19.3926 330.563 -19.6827 329.86C-20.1828 329.219 -20.6829 328.588 -21.1931 327.958C-21.7032 327.327 -21.9932 326.686 -22.3533 326.045C-23.3535 324.597 -23.1832 322.943 -22.8929 321.382C-22.5326 320.348 -23.2929 319.78 -23.9831 319.48C-24.2306 319.379 -24.4712 319.262 -24.7034 319.128C-12.6337 309.363 -1.5934 298.31 8.23463 286.153C9.07511 285.119 9.9156 284.085 10.7361 283.052C11.0917 283.209 11.4093 283.446 11.6664 283.744C11.8164 283.93 11.9564 284.075 12.1065 283.817C12.757 282.7 14.1076 282.06 13.9878 280.457C14.8387 280.001 15.5779 279.351 16.1489 278.555C16.4389 279.413 15.3584 279.744 15.4284 280.53C16.3688 280.116 16.6192 278.255 17.6295 278.855C19.12 279.744 20.8907 280.53 21.4606 282.546C21.4606 282.701 20.8101 284.614 22.4609 283.58C23.3611 285.069 23.3308 286.94 24.4611 288.316C26.3231 290.926 29.0775 292.704 32.1637 293.289C32.9193 293.451 33.7057 293.338 34.3906 292.971C35.0756 292.604 35.6176 292.005 35.9255 291.274C37.116 291.563 38.3467 290.003 39.7171 291.905C39.4245 290.949 38.9329 290.07 38.2768 289.331C39.1072 288.958 39.8675 288.659 40.6179 288.297C42.4288 287.325 42.3587 287.325 42.209 284.751C42.2091 284.234 42.8994 283.666 43.2597 283.107C44.199 282.993 45.1061 282.683 45.9263 282.196C46.7465 281.709 47.4629 281.056 48.032 280.275C48.4381 279.651 48.9838 279.137 49.6229 278.776C50.1499 278.662 50.615 278.344 50.9235 277.888C50.9234 278.653 51.0534 279.076 51.3936 279.159C53.2043 279.377 54.975 279.532 55.5856 277.092C55.6543 276.904 55.7801 276.744 55.9442 276.636C56.1084 276.528 56.302 276.477 56.496 276.493C56.8863 275.748 57.2466 274.963 57.6868 274.105C55.7359 275.304 55.2957 275.138 54.6857 272.915C54.0756 271.881 53.4955 270.899 52.8754 269.886C50.785 266.526 51.3256 263.166 52.8767 259.847C53.0968 260.033 53.1367 260.561 53.5669 260.292C53.747 260.147 53.9971 259.806 53.9671 259.661C53.7872 258.989 53.1669 259.547 52.8067 259.32C50.9262 256.973 50.9663 256.415 52.9573 255.185C54.3598 255.047 55.721 254.618 56.9591 253.924C57.9596 253.469 57.6397 251.68 58.6502 250.936C58.8704 250.709 57.8199 250.936 58.4702 250.337C59.1467 249.722 59.7511 249.029 60.2713 248.269C60.1655 248.475 60.1302 248.712 60.1711 248.941C60.5013 248.528 60.8215 248.114 61.1717 247.711C63.3427 247.411 64.1728 249.2 65.0029 250.617C66.0031 252.56 66.9132 254.576 69.1241 255.29C70.924 255.866 72.7788 256.241 74.6562 256.407C75.9167 256.521 76.7474 254.236 76.2774 252.417C76.1374 251.817 75.6273 251.383 75.7774 250.69C75.8475 250.69 75.8775 250.546 75.9175 250.546C76.2076 250.546 75.6275 250.029 76.1377 250.173C76.928 250.401 76.858 249.915 76.748 249.388C75.8874 248.731 75.1314 247.939 74.5074 247.041C73.1369 246.4 73.2771 244.838 72.667 243.753L72.667 243.639L77.5092 242.296C77.5092 242.296 77.5793 242.368 77.5793 242.409C77.6618 242.531 77.7822 242.621 77.9205 242.662C78.0588 242.703 78.2067 242.695 78.3395 242.637C80.0803 242.451 80.6904 244.012 81.7007 244.953C81.8163 245.047 81.9529 245.11 82.098 245.135C82.243 245.16 82.3919 245.148 82.531 245.098C83.2217 241.811 85.7128 241.48 88.3139 241.325C89.1142 241.325 89.9046 241.212 90.6649 241.181C91.8898 241.384 93.1447 241.131 94.2065 240.468C94.6467 239.951 95.0769 239.434 95.5072 238.824C96.0875 238.049 96.6679 237.294 97.2482 236.55C98.9489 236.891 99.8891 238.38 101.19 239.311C102.13 239.952 103.03 240.583 104.191 240.169C107.122 238.981 110.053 240.284 112.974 239.953C114.095 239.84 115.185 239.799 116.306 239.654C116.471 239.647 116.634 239.603 116.781 239.525C116.929 239.447 117.058 239.337 117.161 239.202C117.263 239.068 117.337 238.912 117.376 238.746C117.415 238.579 117.418 238.406 117.386 238.238C117.804 237.512 118.406 236.919 119.127 236.522C120.818 235.809 121.369 234.124 122.229 232.707C122.472 232.737 122.718 232.674 122.919 232.529C123.12 232.384 123.263 232.168 123.32 231.922L123.72 231.922C124.284 231.955 124.824 232.164 125.27 232.522C126.791 233.463 128.382 234.321 129.822 235.365C131.262 236.41 132.063 235.552 132.753 234.652C133.444 233.753 132.533 232.895 131.923 232.305C130.66 230.995 129.696 229.409 129.103 227.663C128.343 226.577 127.622 225.502 126.892 224.417C126.398 223.65 126.058 222.789 125.892 221.883C126.072 221.015 125.382 220.054 126.283 219.299C126.283 219.299 126.433 219.382 126.433 219.413L126.433 219.826C126.643 220.157 127.013 220.054 127.293 220.054C127.693 217.924 129.074 219.785 129.864 219.382C132.448 220.17 135.097 220.707 137.777 220.986L140.568 222.743L141.108 223.333C141.979 224.005 142.809 224.718 143.639 225.401C146.82 227.831 149.781 230.571 153.182 232.639C154.112 233.373 155.183 233.895 156.323 234.169L158.454 235.297C158.876 235.726 159.381 236.058 159.936 236.27C160.492 236.483 161.084 236.57 161.675 236.527C164.456 236.641 165.107 235.256 163.807 232.341C163.917 231.482 163.197 231.11 162.436 230.479C164.527 230.18 166.158 229.549 168.039 230.108C168.585 230.272 169.161 230.292 169.717 230.168C170.272 230.043 170.789 229.778 171.22 229.395C171.62 229.137 171.94 228.878 171.36 228.465C170.06 227.265 168.8 225.962 167.029 225.476C165.591 224.636 164.076 223.943 162.507 223.408L161.997 223.408C160.997 222.994 159.996 222.539 158.996 222.095C157.996 221.65 156.995 220.823 155.745 220.936C153.534 220.936 151.623 219.819 149.592 219.075C148.982 218.733 148.362 218.433 147.752 218.888C147.031 217.989 146.411 217.089 147.432 215.973C147.553 215.828 147.627 215.647 147.642 215.456C148.142 215.202 148.604 214.875 149.013 214.484C149.483 215.187 150.173 214.856 150.793 214.857C152.794 215.456 154.655 214.63 156.536 214.03C157.296 213.772 157.987 213.255 157.697 212.387C157.337 211.27 158.017 210.753 158.527 210.081C161.238 210.567 163.259 209.255 165.07 207.425C165.391 207.053 165.941 206.608 165.611 206.009C165.281 205.409 164.56 204.592 163.91 204.737C161.269 205.378 158.488 205.377 156.177 207.052C156.003 207.111 155.819 207.136 155.636 207.124C155.283 207.054 154.919 207.069 154.572 207.168C154.225 207.266 153.905 207.446 153.636 207.692C151.835 207.627 150.04 207.929 148.353 208.581C145.902 208.694 143.441 209.407 140.95 209.066L137.839 209.065C137.228 208.952 136.648 208.879 136.068 208.765C134.548 207.731 132.707 207.876 131.066 207.307C131.566 206.563 132.507 206.005 131.967 204.847C132.037 204.516 132.837 204.102 132.037 203.875C130.807 203.544 131.927 203.172 131.927 202.841C131.827 201.583 131.508 200.354 130.987 199.212C130.487 198.354 130.737 197.609 131.678 197.01C132.618 196.41 133.629 196.193 134.249 195.222C135.76 195.036 136.81 193.837 138.151 193.279C139.091 192.876 138.441 191.749 138.911 191.118L141.833 189.288L141.623 188.958C140.352 189.774 139.562 188.616 138.622 188.203C138.122 187.644 138.041 188.73 137.621 188.502C137.261 187.985 139.062 187.417 137.621 186.9C137.047 187.552 136.516 188.242 136.031 188.967C135.03 190.528 133.819 191.686 131.868 191.686C131.398 191.985 130.708 191.841 130.318 192.399C128.687 192.616 126.986 192.398 125.476 193.287C123.665 193.473 123.084 194.972 122.574 196.388C122.273 197.268 121.848 198.097 121.313 198.849C121.063 199.149 120.773 199.448 120.483 199.79C120.153 199.19 121.093 198.932 120.733 198.404C119.732 198.962 119.582 200.42 118.312 200.678C117.647 200.219 117.142 199.553 116.871 198.776C116.431 196.987 115.461 197.545 114.48 198.062C114.016 198.333 113.568 198.633 113.14 198.962C111.409 200.378 110.138 199.995 109.598 197.845C109.388 196.945 109.389 196.128 108.188 196.014C107.692 195.916 107.179 195.995 106.733 196.239C106.287 196.484 105.936 196.879 105.737 197.358C105.543 197.879 105.23 198.343 104.824 198.711C104.417 199.078 103.931 199.338 103.406 199.467C103.035 199.353 102.825 199.55 102.605 199.808C101.725 199.813 100.86 200.052 100.094 200.5C99.0936 200.614 98.5032 201.844 97.3528 201.358C96.2624 201.255 95.1819 201.099 94.1315 200.985C92.791 200.427 91.2403 200.654 90.0099 199.682C88.269 198.6 86.5982 197.401 85.0083 196.094C84.3708 195.613 83.8315 195.006 83.4213 194.309C83.0111 193.611 82.7381 192.837 82.6178 192.031L83.3383 191.059C84.5516 189.37 86.0334 187.905 87.7206 186.728L90.3217 187.256C91.9358 188.272 93.337 189.611 94.4429 191.195C95.2766 191.756 96.2116 192.137 97.1916 192.315C98.1716 192.493 99.1763 192.464 100.145 192.23C100.925 192.127 101.71 192.065 102.496 192.044C102.176 190.917 102.106 189.914 103.187 189.087C103.304 189.015 103.397 188.909 103.456 188.782C103.514 188.655 103.535 188.513 103.516 188.374C103.497 188.235 103.438 188.104 103.348 188C103.257 187.895 103.139 187.82 103.007 187.784C102.007 187.371 101.126 186.926 101.527 185.623C101.622 185.242 101.807 184.89 102.065 184.6C102.324 184.309 102.647 184.089 103.007 183.959C103.44 183.918 103.875 183.918 104.308 183.959C105.028 184.032 105.719 184.104 106.189 183.432L106.189 183.319C107.866 183.527 109.5 184.009 111.031 184.746C111.791 185.191 112.231 184.519 112.841 184.591C113.672 184.405 114.502 184.178 115.333 183.992C116.743 183.92 118.194 184.364 119.604 183.775C120.075 184.22 120.605 183.217 121.045 183.889C123.046 184.148 124.156 182.277 125.997 181.822C125.791 181.531 125.507 181.308 125.18 181.181C124.853 181.054 124.497 181.029 124.157 181.108C122.813 180.736 121.408 180.662 120.035 180.891C119.275 181.035 118.444 181.149 118.154 179.991C117.864 178.833 117.324 180.89 116.924 179.991C116.854 176.889 115.484 174.956 112.302 174.728C112.126 174.719 111.95 174.758 111.792 174.842C111.701 174.885 111.602 174.91 111.502 174.914C111.221 174.909 110.944 174.843 110.69 174.72C110.435 174.597 110.208 174.42 110.024 174.201C109.84 173.981 109.703 173.724 109.622 173.446C109.54 173.168 109.516 172.876 109.552 172.588C109.442 170.313 110.092 168.525 111.683 167.739C113.684 166.809 116.135 167.109 116.995 168.412C117.185 168.577 117.366 168.753 117.535 168.939C118.582 170.418 119.953 171.62 121.537 172.445C121.76 172.591 122.002 172.702 122.257 172.775C122.691 172.928 123.141 173.029 123.597 173.075C127.4 172.673 131.168 171.982 134.872 171.009C136.143 170.751 136.363 169.335 137.264 168.694C137.664 169.035 137.124 169.252 137.194 169.728C137.79 169.044 138.531 168.51 139.358 168.168C140.185 167.826 141.077 167.684 141.966 167.754C142.546 167.867 143.156 167.981 143.736 168.126C146.988 169.584 150.279 168.385 153.571 168.313C154.091 168.306 154.599 168.144 155.034 167.847C155.468 167.551 155.811 167.131 156.022 166.639C156.114 166.454 156.15 166.244 156.125 166.037C156.1 165.831 156.015 165.637 155.882 165.481C154.942 164.695 154.041 163.951 153.101 163.123L153.221 163.123C153.441 162.637 153.651 162.09 153.872 161.593C153.886 161.006 154.119 160.447 154.522 160.032C154.594 159.922 154.678 159.822 154.772 159.733C155.062 159.733 155.392 159.846 155.683 159.877C158.934 159.878 162.075 159.061 165.327 159.062C169.558 158.99 173.75 159.208 177.982 159.508C180.653 159.695 183.334 159.922 186.045 159.85C186.736 159.85 187.856 160.15 188.046 159.065C188.175 158.488 188.118 157.884 187.883 157.345C187.648 156.805 187.249 156.36 186.746 156.077C186.083 155.594 185.271 155.381 184.465 155.477C182.734 155.218 181.324 153.76 179.463 154.06C178.673 153.533 177.803 153.915 176.972 153.987C173.861 154.245 170.75 154.503 167.648 154.803C166.478 154.599 165.287 154.561 164.107 154.689C163.306 154.988 162.616 154.244 161.856 154.471L159.115 154.688C157.664 154.316 156.183 155.029 154.743 154.501C152.02 153.929 149.211 153.956 146.499 154.583C145.499 154.8 144.258 154.014 143.498 155.255C142.818 155.254 143.498 154.583 143.108 154.427C141.908 153.828 140.717 153.155 139.346 153.982L139.266 153.982C138.987 151.139 139.707 150.25 142.668 149.847C143.389 149.775 144.119 149.62 144.839 149.517C146.122 149.193 147.344 148.648 148.451 147.905C148.709 147.731 148.922 147.495 149.071 147.218C149.221 146.94 149.303 146.629 149.31 146.311C149.317 145.993 149.249 145.678 149.111 145.394C148.974 145.11 148.771 144.864 148.521 144.679C147.911 143.18 147.181 141.763 146.521 140.275C145.581 138.072 143.42 137.4 141.069 138.258C141.018 138.362 140.981 138.474 140.959 138.589C140.089 139.116 139.078 138.402 138.208 138.929L137.708 138.929C137.088 137.544 137.058 135.941 136.408 134.525C136.298 134.339 137.348 134.143 137.308 133.491L140.74 133.678C143.622 133.652 146.501 133.891 149.343 134.392C149.337 134.52 149.361 134.648 149.413 134.765C149.659 135.182 150.027 135.507 150.465 135.693C150.902 135.879 151.385 135.916 151.844 135.799C152.594 136.026 153.145 135.468 153.755 135.241C154.225 134.61 154.695 133.938 155.206 133.297C155.856 130.506 155.776 130.32 153.105 129.461C149.564 125.873 144.933 125.015 140.311 124.197C139.933 123.918 139.502 123.726 139.046 123.635C138.59 123.544 138.121 123.556 137.67 123.67C136.299 123.184 135.139 123.783 133.988 124.383C132.385 124.677 130.827 125.191 129.356 125.912C127.625 126.801 125.884 127.659 124.183 128.558L123.183 128.672C122.563 128.599 121.952 128.558 121.372 128.485C120.722 128.113 120.002 128.485 119.371 128.372C119.582 127.684 119.561 126.943 119.31 126.271C119.059 125.598 118.594 125.033 117.991 124.67C116.871 123.967 115.99 125.052 114.99 125.704C113.434 126.849 112.066 128.245 110.938 129.838C110.798 129.322 109.747 129.135 110.508 128.195C109.787 128.536 109.317 129.094 108.587 128.98C108.157 128.494 107.286 129.094 106.966 128.349C106.746 127.905 107.256 128.163 107.356 128.008C107.036 126.519 105.696 126.405 104.646 125.888C104.145 125.661 103.565 125.888 103.275 124.854C102.985 123.82 102.625 125.226 102.195 125.299C100.194 125.598 98.193 125.143 96.2621 125.743C95.6895 125.638 95.1001 125.702 94.5613 125.928C94.2514 125.772 93.9131 125.685 93.5684 125.672C93.2237 125.66 92.8803 125.722 92.5605 125.856C91.854 125.459 91.029 125.352 90.2496 125.556C88.799 124.997 87.3884 125.555 85.9778 125.71C84.3504 125.908 82.7032 125.841 81.0958 125.513C77.3743 124.365 73.763 123.093 71.6626 119.309C71.4023 118.601 71.2815 117.847 71.3074 117.091C71.3333 116.335 71.5053 115.591 71.8132 114.905C72.7139 112.403 72.3939 111.317 69.2826 111.276C68.0358 111.37 66.793 111.043 65.7413 110.345C65.2011 110.272 65.2711 109.9 65.3412 109.487C65.0912 109.187 65.5214 108.329 64.6511 108.453C64.5511 108.225 63.9308 107.925 64.1809 107.925C64.9112 107.925 64.8714 106.509 65.7417 107.14C66.1418 107.398 66.3919 107.853 67.0021 107.781C67.2624 106.747 66.1419 106.747 66.002 106.023C66.6923 105.682 67.6327 105.61 68.003 104.721C69.4437 103.687 71.1143 103.967 72.735 103.894C74.4357 104.339 75.8863 104.308 76.927 102.479C77.6875 101.176 79.6382 101.548 80.5788 100.308C81.511 99.9541 82.5342 99.952 83.4677 100.302C84.4012 100.652 85.185 101.332 85.6807 102.221C86.4709 103.379 87.9214 103.566 88.2818 101.994C89.1126 98.3758 92.224 97.2906 94.5753 95.3887C95.5757 95.3888 96.126 94.4585 97.0264 94.1898C97.4471 93.9788 97.7732 93.6087 97.937 93.156C98.077 93.5282 97.3967 93.6729 97.6067 94.1278C100.108 94.7174 102.529 95.6895 105.16 95.5762C106.023 95.5912 106.886 95.5046 107.731 95.318C109.281 94.8323 110.442 94.0157 109.282 92.1133C108.602 91.6583 108.202 90.7692 107.191 90.8724C106.34 90.5415 105.401 90.5413 104.55 90.8721C103.427 90.8575 102.309 91.0105 101.229 91.3265C98.7275 91.8845 96.3763 93.2695 93.7053 92.5145C92.7049 91.9561 91.5744 92.5142 90.524 92.1109C88.7132 92.6689 86.6924 92.2551 84.9915 93.2991C83.9911 93.3713 82.9907 93.4849 82.0703 93.5572C81.52 93.6398 80.9098 93.4847 80.5096 94.0843L80.5095 94.1566C80.3278 94.207 80.1345 94.185 79.9677 94.095C79.801 94.005 79.673 93.8535 79.6092 93.6706C78.3785 95.1282 76.7479 94.7041 75.2273 94.7039L74.2969 94.59C74.1601 94.5269 74.0083 94.507 73.8606 94.5327C73.7128 94.5584 73.5757 94.6287 73.4665 94.7347C73.4057 94.6277 73.3076 94.5487 73.1922 94.5141C73.0769 94.4795 72.9531 94.4918 72.8463 94.5485C71.9319 94.8289 70.9705 94.9063 70.0251 94.7756C69.0847 94.7031 68.1143 94.5892 67.1739 94.5167C66.8758 94.3073 66.6226 94.0367 66.4299 93.7219C66.2372 93.4071 66.1091 93.0548 66.0537 92.6867C65.2935 91.3426 65.2938 89.5851 64.2435 88.396C64.1336 87.4965 63.2432 87.362 62.7631 86.8244C61.5727 85.7904 60.3023 84.8494 60.2325 83.0195C60.3137 82.3353 60.188 81.6419 59.8726 81.0345C60.2728 80.9622 60.5929 80.7037 60.9931 80.6624C61.3933 80.6211 61.8935 80.9624 61.3133 80.2903C60.8832 79.8043 60.9232 79.5872 61.4935 79.3909C61.7836 79.6597 62.1137 79.8768 62.4038 80.1043C63.2641 80.1768 63.6644 79.4325 64.2847 79.0191C64.8177 78.834 65.2755 78.4702 65.5854 77.9854C65.8355 77.8303 66.1256 77.727 66.3758 77.5719C67.8965 76.9001 69.5571 77.2725 71.0778 76.7558L72.0182 76.7559C72.3783 77.0144 72.7085 76.756 73.0186 76.756C74.1691 76.9733 75.1096 76.2291 76.16 76.0845C76.4236 75.7718 76.7523 75.5248 77.1213 75.3619C77.4903 75.199 77.8902 75.1245 78.2911 75.1439C78.9414 74.441 79.8818 74.3688 80.6822 73.9967C83.5035 73.4698 85.8547 71.7126 88.4859 70.7101C89.6764 70.2657 88.7462 69.3661 89.2464 68.8803C89.0665 68.1669 88.246 69.18 88.096 68.4356C86.9357 68.0786 85.7185 67.9625 84.5146 68.0939C82.5137 68.2798 81.9135 67.5767 82.274 65.447C82.4542 64.4132 82.7444 63.4311 82.8846 62.4179C83.2451 59.699 83.0351 59.4405 80.2439 59.4401C76.9226 59.0572 76.0923 58.5712 77.3232 54.9942C78.264 52.3787 80.7151 51.2211 82.026 48.9882C83.6066 49.619 84.027 47.6445 85.3476 47.3758C86.8093 46.9791 88.1913 46.3177 89.4295 45.4224C90.804 44.6267 92.274 44.022 93.8016 43.624C97.7443 43.1973 101.718 43.1632 105.667 43.5222C106.607 43.5223 106.927 43.0364 107.397 42.4886C108.518 41.1137 109.399 39.3873 111.159 38.7982C112.014 37.997 113.022 37.3907 114.119 37.0185C115.215 36.6464 116.375 36.5168 117.522 36.6383C119.426 36.8724 121.356 36.6535 123.165 35.9981C123.345 35.5122 123.845 35.4812 124.165 35.2125L124.125 35.2124C126.126 34.3546 127.277 32.4938 128.578 30.8502C128.885 30.5363 129.119 30.1546 129.263 29.7339C129.407 29.3132 129.456 28.8642 129.408 28.4208C129.339 24.0993 128.249 22.7138 124.407 22.2171C123.848 21.9248 123.211 21.8337 122.596 21.9584C121.798 21.7982 120.977 21.8072 120.183 21.9848C119.388 22.1624 118.637 22.5049 117.974 22.9916C117.464 22.4333 117.975 21.8337 117.975 21.2755C117.975 20.9446 117.795 20.9756 117.654 21.1307C117.513 21.2588 117.392 21.4087 117.294 21.5752C116.294 22.247 116.564 21.5751 116.674 21.0168C116.894 19.7866 116.534 19.0008 115.194 18.8559C114.522 18.5231 113.78 18.3686 113.036 18.4064C112.292 18.4442 111.569 18.6731 110.932 19.0724C109.707 19.3261 108.628 20.069 107.93 21.1397C107.59 21.8099 107.024 22.3283 106.34 22.5973C104.499 23.0829 105.259 25.2024 104.168 26.1741L103.408 27.2078C102.467 27.6936 101.527 28.1794 100.266 28.8099L101.267 27.1352C99.1257 29.368 97.0345 31.5698 94.0731 32.655C93.8954 32.6328 93.7152 32.648 93.5433 32.6995C93.3714 32.7509 93.2113 32.8377 93.0727 32.9547L90.7516 33.6264C90.4509 33.4881 90.1254 33.4166 89.7962 33.4166C89.4671 33.4165 89.1416 33.4879 88.8408 33.6261C86.7758 33.7117 84.7212 33.9742 82.6981 34.4111C82.5539 34.3791 82.4036 34.3936 82.2676 34.4528C82.1316 34.5119 82.0165 34.6128 81.9378 34.7418C77.936 35.8578 73.7643 35.3404 69.7225 35.9395C66.2111 35.5255 62.8896 36.683 59.5281 37.1994C57.3571 37.5713 56.2668 36.8268 55.8369 34.7798C56.017 34.511 56.2371 34.294 56.4172 34.0252C57.7481 31.265 60.4195 29.5181 61.5503 26.6442L62.6309 25.4037C62.9609 26.1585 61.8705 26.4374 62.2005 27.2025C62.8108 26.4169 63.4312 25.7036 63.9315 24.9283C64.4391 24.2123 65.0951 23.6227 65.8515 23.2024C66.608 22.7821 67.4458 22.5419 68.3037 22.4993C69.5042 22.3444 70.7347 22.2722 71.4852 21.1144C71.5951 21.0777 71.6947 21.0138 71.7753 20.9283C73.266 20.0394 73.9165 18.3543 74.9971 17.0828C75.6075 16.5246 76.1878 15.9665 76.8081 15.4083C78.2488 14.6227 80.1996 14.9228 81.1402 13.1343C81.3603 13.3515 81.4703 13.8788 81.8705 13.5066C82.8662 12.6964 84.1052 12.2723 85.3721 12.3078C89.894 12.3084 92.3754 9.476 94.7368 6.10598C95.8611 4.23805 97.3671 2.64682 99.1493 1.44388C100.81 0.410254 101.791 -1.35748 102.721 -3.07354C102.871 -3.33198 102.801 -3.44571 102.541 -3.33202C102.281 -3.21833 102.261 -3.07362 102.111 -2.91856C103.012 -5.42034 104.503 -7.25006 107.244 -7.50817C109.307 -7.63604 111.246 -8.571 112.666 -10.1231C115.168 -11.2496 117.669 -12.3245 120.22 -13.4097C122.221 -14.2262 123.402 -16.211 125.223 -17.286C127.464 -19.3534 129.745 -21.3174 131.986 -23.3331C133.107 -23.5604 133.287 -24.863 134.157 -25.3488C134.517 -24.8319 133.577 -24.4908 133.897 -23.8601C136.069 -27.0339 139.259 -29.3085 142.902 -30.2792C145.363 -30.5373 146.704 -32.6255 148.544 -33.8555C150.385 -35.0856 152.016 -36.4707 153.747 -37.7731C157.839 -39.0442 160.941 -41.9076 164.092 -44.6779C164.563 -44.9776 164.993 -45.3187 165.433 -45.6185C166.486 -45.738 167.45 -46.2839 168.113 -47.1365C168.777 -47.989 169.087 -49.0788 168.975 -50.167L168.425 -50.4255C168.715 -52.3381 167.745 -53.4547 166.224 -54.2406C164.094 -54.5717 162.393 -53.6415 160.732 -52.4838C159.731 -52.2978 159.461 -51.3674 158.961 -50.6955C158.271 -49.5377 156.86 -49.3828 156.069 -48.38C155.222 -48.1525 154.488 -47.6072 154.008 -46.8502L152.157 -45.279C150.937 -45.3929 150.247 -44.6073 149.526 -43.7906C148.806 -42.974 148.435 -41.7231 147.245 -41.4027C147.367 -41.5583 147.465 -41.7327 147.535 -41.9196C147.535 -42.1884 147.425 -42.3745 147.285 -42.0747C146.595 -40.8446 145.114 -40.6483 144.283 -39.6042C143.453 -39.6043 142.833 -38.9738 142.112 -38.7154C140.992 -38.4468 140.702 -37.3716 140.111 -36.648C139.021 -35.1491 137.11 -35.3044 135.769 -34.4775C135.479 -34.4775 135.189 -34.5499 134.869 -34.5499C133.638 -33.661 132.188 -33.0616 131.317 -31.759C130.747 -31.573 129.876 -32.0177 129.656 -30.9735C128.395 -29.7744 126.655 -29.3714 125.424 -28.0586C125.034 -27.5417 124.634 -26.9732 124.203 -26.4563C123.833 -26.2289 123.733 -25.6397 123.153 -25.8258C123.263 -26.0119 123.443 -26.198 123.443 -26.3427C123.293 -26.9734 123.083 -26.4565 123.003 -26.3428C122.228 -25.1227 121.021 -24.2653 119.641 -23.955C119.641 -24.0274 119.721 -24.0687 119.721 -24.1411C119.721 -24.2135 119.641 -24.3685 119.641 -24.4409C118.701 -23.2418 117.26 -22.9525 116.139 -22.1256C115.773 -22.0829 115.409 -22.0208 115.049 -21.9396C115.049 -22.2394 115.739 -22.4254 115.199 -22.839C114.198 -20.5647 111.767 -21.1956 110.097 -20.2241C109.517 -20.2927 108.93 -20.1888 108.406 -19.9245C107.914 -19.9214 107.439 -19.7383 107.065 -19.4077C105.231 -18.0171 103.255 -16.8386 101.172 -15.8934C99.0414 -15.5215 97.9507 -13.4746 96.1698 -12.503C95.8496 -12.0895 95.5194 -11.7174 95.1692 -11.3039C95.0154 -11.3078 94.8635 -11.2686 94.7296 -11.1903C94.5957 -11.112 94.4848 -10.9977 94.4089 -10.8595C93.9786 -10.4873 93.5384 -10.1462 93.1082 -9.77409L91.2272 -8.20289C90.867 -8.28564 90.6869 -8.01686 90.5068 -7.79978C90.068 -7.7396 89.6481 -7.57711 89.2789 -7.32463C88.9097 -7.07214 88.6009 -6.73628 88.3758 -6.34235C87.0752 -6.00135 87.035 -4.74002 86.6747 -3.79927C86.4893 -3.00878 86.2103 -2.24495 85.8441 -1.52496C84.3632 0.304755 82.9824 2.20687 80.9214 3.39552C79.6208 3.39535 78.6503 4.48077 77.3797 4.70805C76.3793 4.5942 75.5389 5.2971 74.6385 5.5968C73.7381 5.8965 72.9677 6.38233 72.1373 6.79576L72.1373 6.98182C71.4869 7.79848 70.8765 8.6255 70.2261 9.44215C68.8156 9.14215 67.5852 8.13914 66.0646 8.13894C64.8041 7.61152 64.2937 8.92443 63.3933 9.2965C62.4929 9.66856 62.0926 10.3302 61.2222 10.5265C59.9726 11.7165 58.543 12.6872 56.9901 13.4C55.4394 13.8134 54.7889 15.5295 53.3782 16.16C53.5583 15.8291 53.7785 15.5294 53.9886 15.1882C53.6431 15.5393 53.2308 15.8123 52.7779 15.9902C52.325 16.1681 51.8413 16.247 51.3574 16.2217C49.6182 16.4356 47.9268 16.9527 46.3551 17.7512C44.8043 18.423 43.4239 17.7508 42.2735 16.5203C42.3437 15.2487 41.2734 14.0597 42.0539 12.7468L45.526 8.19834C46.2464 6.85444 47.3669 6.6685 48.7375 6.85476C51.4356 7.2898 54.1906 7.16361 56.8409 6.48361C57.4593 6.34521 58.0411 6.06913 58.5456 5.6746C59.0502 5.28006 59.4654 4.77656 59.7624 4.1992C60.603 2.59685 60.1329 1.66634 58.4323 1.25259C57.294 0.870626 56.1148 0.634355 54.9209 0.5491C53.1503 -0.836478 51.0896 -1.99463 51.09 -4.91007L50.0094 -3.78332C49.7594 -4.75516 50.3297 -5.31338 50.77 -5.9543C50.7 -6.44022 51.1303 -7.11215 50.33 -7.32936C50.0098 -6.91586 49.6496 -6.5127 49.3294 -6.0992C48.4327 -4.69053 47.2932 -3.46417 45.9675 -2.48119C45.6774 -2.22277 45.7473 -1.8816 45.8273 -1.55076C44.0563 0.919897 42.4653 3.618 39.4639 4.7962C38.4634 4.86844 37.723 5.72645 36.8926 6.21225C36.2123 6.6257 35.5219 7.55607 34.6917 6.29467C34.3616 5.76737 34.2615 6.43937 34.0714 6.58408C32.0703 8.11391 33.6008 9.57183 34.2209 11.0296C34.6909 12.4461 34.3605 14.1312 35.5609 15.3203C35.5755 15.4819 35.5754 15.6445 35.5608 15.8061L35.5608 15.8785C35.495 15.8346 35.419 15.8096 35.3407 15.8061C33.6799 16.7777 32.8493 18.5352 31.4786 19.8066C30.0682 18.4211 29.4778 19.8064 28.7273 20.6954C28.6296 20.0824 28.7317 19.4532 29.0177 18.9068C28.0172 19.0928 26.7766 19.7233 27.1371 17.7074C27.2027 17.4384 27.2529 17.1657 27.2872 16.8906C27.4674 15.6604 27.7177 14.275 26.7074 13.4168C25.6971 12.5586 24.4265 13.2304 23.346 13.7576C22.6386 13.6753 21.9843 13.3298 21.5053 12.7855C21.3814 12.6368 21.2279 12.5175 21.0552 12.4357C20.8826 12.3539 20.6949 12.3115 20.505 12.3115C20.3151 12.3115 20.1274 12.3538 19.9547 12.4356C19.7821 12.5173 19.6285 12.6366 19.5045 12.7853C19.2747 12.4978 18.974 12.2798 18.6342 12.1545C17.4073 10.3761 16.1503 8.61498 14.8633 6.87107L15.0934 6.55063C16.4641 6.13727 17.0945 4.79333 17.945 3.86298C18.7955 2.93263 17.7352 1.58854 16.7248 1.13352C15.0443 0.231744 13.239 -0.396246 11.3728 -0.728134C10.0323 -0.883383 9.56223 -1.88626 8.66192 -2.41363C7.76161 -2.94101 8.98213 -2.97189 9.05221 -3.38542C9.34249 -4.64667 9.92251 -2.85804 10.4328 -3.38524C10.1828 -4.12964 9.05231 -4.20214 8.98241 -5.20497C9.8128 -5.54604 10.1028 -4.46044 10.9832 -4.50168C10.5831 -5.06001 10.263 -5.53565 9.98293 -6.03193L9.983 -6.63154C12.3344 -9.73277 14.6157 -12.7823 16.9871 -15.8112C18.2852 -17.1932 19.1109 -18.9755 19.3388 -20.8871C19.4623 -21.6311 19.7768 -22.3273 20.2494 -22.9029C21.2502 -26.0043 24.1117 -28.0716 24.8024 -31.3695C25.0926 -31.8244 25.3828 -32.2276 25.6629 -32.6824C25.9431 -33.1373 26.3533 -33.5404 26.6635 -33.9125C27.1738 -34.4708 27.604 -35.029 27.0239 -35.8148C28.5847 -37.0449 28.9051 -38.9884 29.5556 -40.6322C30.6764 -43.4234 32.3074 -46.0801 32.778 -49.1713C33.0772 -50.2262 33.6237 -51.1885 34.369 -51.9728C35.7098 -53.7302 37.2207 -55.3738 37.9813 -57.9066C37.3009 -57.0176 36.7906 -56.3767 36.2103 -55.591C35.9203 -56.749 36.6107 -57.4209 37.011 -58.1755C36.5408 -58.5478 36.4607 -57.6897 36.0705 -57.8758C36.0503 -57.9747 36.0503 -58.0768 36.0706 -58.1756C36.6933 -59.9842 37.6217 -61.6643 38.8123 -63.1378C39.0674 -63.4074 39.2588 -63.7343 39.3717 -64.0929C39.4845 -64.4515 39.5157 -64.8322 39.4629 -65.2053C39.6341 -65.6241 39.7223 -66.074 39.7224 -66.5286C39.7224 -66.9832 39.6343 -67.4332 39.4632 -67.852C39.0633 -70.0541 40.004 -72.4835 38.4636 -74.4997C38.4216 -74.8828 38.3041 -75.2529 38.1183 -75.5872C37.9325 -75.9215 37.6824 -76.2129 37.3834 -76.4435C37.2334 -76.8881 37.0934 -77.374 36.9434 -77.8186C36.668 -79.4875 36.17 -81.1089 35.4634 -82.6364C35.0387 -83.2277 34.432 -83.6521 33.7431 -83.8401C33.0541 -84.028 32.3238 -83.9683 31.672 -83.6708C30.6702 -83.0338 29.8007 -82.1979 29.1136 -81.2113C28.4266 -80.2247 27.9358 -79.1071 27.6696 -77.9231L27.0592 -76.9617C26.3388 -75.99 25.5783 -75.0183 24.8479 -74.0879C25.208 -73.633 25.3982 -74.6462 25.7883 -74.2326C25.2479 -72.961 23.8372 -72.2168 23.727 -70.6867C22.7264 -69.012 22.8261 -66.7686 21.1953 -65.3835C18.6736 -60.5351 14.9815 -56.3174 14.0004 -50.6831C12.6296 -49.0808 12.6693 -46.6926 10.8183 -45.4212C11.3985 -44.9352 11.5087 -45.7934 11.9789 -45.6072C11.7287 -45.2351 11.5086 -44.8629 11.2884 -44.4907C10.7481 -43.7361 10.1678 -42.9918 9.58742 -42.2475C8.97722 -42.6198 9.84761 -42.9608 9.48751 -43.3331C9.05568 -43.0404 8.70919 -42.6317 8.48527 -42.1509C8.26135 -41.67 8.16849 -41.1352 8.21665 -40.6039C6.91582 -38.402 4.60464 -36.7584 4.27414 -33.9257C4.09386 -32.2819 3.01325 -31.1655 2.18274 -29.8527C1.92259 -29.5529 1.67245 -29.2221 1.4223 -28.9223C1.22663 -27.0139 0.535029 -25.1956 -0.579214 -23.6603C-0.829357 -23.3605 -1.08951 -23.0297 -1.37967 -22.73L-1.62975 -22.9884C-1.57393 -23.17 -1.53702 -23.3571 -1.51963 -23.5467C-1.6697 -23.4744 -1.84978 -23.3607 -2.02987 -23.2883L-2.68025 -22.4303C-2.81331 -22.648 -3.02021 -22.8065 -3.26044 -22.8749C-3.08032 -23.2161 -2.75015 -23.5055 -2.97018 -23.9915C-3.22032 -23.702 -3.47047 -23.3609 -3.73061 -23.0611C-4.38077 -23.9193 -3.08015 -24.5601 -3.44019 -25.4182C-4.6706 -26.2351 -5.06051 -28.1374 -6.87126 -28.2514C-8.26949 -28.5833 -9.71667 -28.6327 -11.133 -28.3967C-12.0735 -28.1797 -13.0139 -27.8386 -13.1341 -26.5774C-13.33 -25.847 -13.3092 -25.0726 -13.0743 -24.3546L-12.1541 -23.4964C-11.6438 -23.579 -11.0936 -23.641 -11.0437 -23.1344C-11.0085 -22.73 -10.859 -22.3453 -10.6136 -22.0281C-10.2635 -21.7076 -9.91342 -21.3767 -9.61334 -20.9942C-9.23961 -20.7336 -8.90292 -20.4204 -8.61303 -20.0636L-7.42269 -18.9055L-7.28261 -19.0295C-7.28263 -18.9158 -7.23261 -18.8021 -7.21262 -18.6987L-7.42269 -18.9055C-7.80289 -18.5954 -8.15305 -18.5541 -8.253 -19.2158C-8.30946 -19.5229 -8.43255 -19.8127 -8.61303 -20.0636L-9.61334 -20.9942C-9.98505 -21.2969 -10.3208 -21.6439 -10.6136 -22.0281C-11.1238 -22.5245 -11.6139 -23.0621 -12.1541 -23.4964L-12.6243 -23.4034C-12.7155 -23.4959 -12.8124 -23.5822 -12.9144 -23.6619C-12.9143 -23.8893 -13.0244 -24.1271 -13.0743 -24.3546C-14.9549 -26.0917 -16.8688 -27.815 -18.8161 -29.5246C-110.724 -108.853 -247.593 -96.2575 -324.417 -1.30886C-401.242 93.6398 -389.175 234.947 -297.257 314.317ZM141.546 160.775L141.687 160.775C142.807 160.475 143.247 159.173 144.328 158.873C144.398 158.873 144.398 158.987 144.398 159.059C145.516 159.548 146.727 159.767 147.939 159.701C148.519 160.962 148.739 162.533 149.94 163.433C148.349 163.691 146.688 163.763 145.278 164.776L145.278 164.849C144.615 164.638 143.91 164.61 143.233 164.765C142.556 164.921 141.93 165.256 141.416 165.737C140.426 164.021 140.926 162.419 141.546 160.775ZM79.1812 232.175C82.3926 232.175 83.183 231.358 83.4435 228.143C83.4436 227.326 83.5538 226.499 83.5839 225.683C84.3144 224.556 85.0748 223.481 86.6954 224.525C86.4054 223.109 85.3249 223.408 84.3146 223.108C85.145 222.509 86.0854 222.468 86.5857 221.765L86.5857 221.837C87.856 223.44 90.0569 223.326 91.4673 224.712L91.3973 224.784C92.211 226.737 92.5342 228.871 92.3369 230.987C91.903 231.276 91.5835 231.716 91.4364 232.228C91.3263 232.517 91.1762 232.9 91.5063 233.158C91.537 233.191 91.5736 233.216 91.6139 233.234C91.6543 233.251 91.6976 233.26 91.7414 233.26C91.7851 233.26 91.8284 233.251 91.8688 233.234C91.9091 233.216 91.9457 233.191 91.9765 233.158C91.6945 233.538 91.4403 233.939 91.216 234.358L90.6757 234.73C90.4957 234.585 90.8157 235.484 90.1255 234.885C89.4353 234.285 88.7548 235.443 88.2845 236.228C88.1045 236.073 87.9244 235.929 87.7443 235.97C84.743 236.642 81.7417 237.158 78.6703 237.83L78.6003 237.902C78.1659 237.502 77.6191 237.255 77.0397 237.199C77.69 236.785 78.5303 236.972 79.2107 236.413C79.1008 235.379 78.2704 235.628 77.2599 236.113C77.8003 235.328 78.1605 234.811 78.5607 234.253C77.6604 233.725 77.7301 236.113 76.6498 234.811C77.4403 233.849 77.9507 232.66 79.1812 232.175ZM60.8817 247.142C60.9307 247.196 60.9682 247.259 60.9917 247.328C60.8316 247.525 60.6415 247.711 60.4914 247.918C60.6411 247.67 60.7716 247.411 60.8817 247.142ZM11.5064 -28.1766C11.4264 -28.1766 11.1062 -27.8872 10.9261 -27.7322C11.2507 -28.8442 11.3962 -30.0037 11.3567 -31.1645C11.5068 -31.3195 11.6169 -31.4643 11.757 -31.6193C12.5147 -32.9147 13.0307 -34.3453 13.2781 -35.8372C13.2782 -35.9096 13.1681 -35.9406 13.1681 -35.982C13.3401 -35.9935 13.5081 -36.0408 13.662 -36.1211C13.8158 -36.2013 13.9525 -36.3128 14.0636 -36.4489C14.1748 -36.585 14.2583 -36.7429 14.309 -36.9131C14.3597 -37.0833 14.3767 -37.2624 14.3588 -37.4395C14.4708 -37.3784 14.593 -37.3398 14.7189 -37.3258C15.2573 -37.4957 15.7453 -37.8038 16.1372 -38.2214C16.5291 -38.639 16.8122 -39.1524 16.9602 -39.7137C17.8003 -42.2171 18.4889 -44.772 19.022 -47.3638C19.222 -47.5168 19.4407 -47.642 19.6724 -47.7359C20.973 -48.4078 21.4433 -49.7517 21.9937 -50.9819C23.3247 -54.0833 24.9958 -56.9571 25.9966 -60.1309C26.0702 -60.4536 26.1811 -60.766 26.3268 -61.0613C26.8372 -61.4285 27.4398 -61.6347 28.0613 -61.6548C28.6829 -61.6749 29.2967 -61.5081 29.8283 -61.1746C29.7583 -61.0609 29.7283 -60.9161 29.6482 -60.8024C28.9977 -58.9726 28.4172 -57.0704 27.9168 -55.1682C27.086 -51.9531 25.2749 -49.2653 23.914 -46.319C22.9062 -44.3277 22.2456 -42.1685 21.9623 -39.9405C22.1254 -39.8973 22.2832 -39.8348 22.4325 -39.7543C22.3823 -39.7244 22.3254 -39.7086 22.2674 -39.7086C22.2095 -39.7086 22.1525 -39.7244 22.1023 -39.7543C21.1019 -39.4857 20.7316 -38.4829 20.3714 -37.6869C19.5921 -35.9732 18.7201 -34.3062 17.7596 -32.6937C17.7082 -32.5079 17.7081 -32.311 17.7595 -32.1251C16.9291 -31.0914 16.0986 -29.9232 15.1881 -28.8792C14.5077 -28.1349 14.1073 -26.7186 12.5568 -27.6906L12.5568 -27.5355C11.9766 -27.9181 11.7262 -26.0056 10.6759 -26.8638C10.8986 -27.1091 11.1026 -27.3718 11.2863 -27.6494C11.4664 -27.7735 11.8965 -27.9181 11.5064 -28.1766Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n    <img src=\\\"\").concat(content.image, \"\\\" class=\\\"card-image\\\"/>\\n      </div>\\n    </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.less\nvar c_sf_07 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.js\n\n/* harmony default export */ var cards_c_sf_07 = ({\n  name: \"c-sf-07\",\n  title: \"Card SF 07\",\n  subtitle: \"with image\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    image: {\n      name: \"Background image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    image: \"{{mediaServerDomain}}/public/k1zbmu3nypzni4qitd2ipxscywyj7yjxykihyum4bwd60lhz5pddn2ns81k343ua.jpeg\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card-cont\\\">\\n    <div class=\\\"card-inner\\\">\\n      <div class=\\\"left\\\">\\n      \".concat(content.header ? \"<div class=\\\"card-title\\\">\".concat(content.header, \" <div class=\\\"underline\\\"></div></div> \") : \"\", \"\\n      <div class=\\\"card-content\\\">\\n      \").concat(component.renderComponents(\"x0\"), \"\\n      </div>\\n      \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n      </div>\\n      <div class=\\\"right\\\" style=\\\"background-image: url('\").concat(content.image, \"');\\\">\\n      <svg class=\\\"separator\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 189 269\\\">\\n      <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M-297.257 314.317C-272.399 335.812 -243.19 351.27 -211.783 359.551C-180.377 367.832 -147.572 368.726 -115.787 362.166C-115.34 362.752 -115.001 363.418 -114.787 364.13C-112.937 368.762 -112.146 369.062 -108.134 366.747C-108.134 366.819 -108.244 366.891 -108.244 366.933C-108.199 367.041 -108.172 367.156 -108.164 367.274C-106.584 365.847 -105.023 366.24 -103.473 367.347C-100.402 369.58 -98.0509 372.61 -95.6603 375.557C-94.8042 376.493 -93.8741 377.354 -92.8795 378.131C-92.7396 379.165 -91.8792 379.434 -91.219 379.889C-90.8964 379.806 -90.5584 379.815 -90.24 379.913C-89.9215 380.011 -89.6344 380.196 -89.4083 380.447C-88.935 380.87 -88.3646 381.161 -87.7516 381.291C-87.1386 381.422 -86.5035 381.388 -85.907 381.192C-83.956 380.303 -82.6156 381.048 -81.2752 382.227C-80.1241 383.57 -78.866 384.812 -77.5141 385.939C-77.1168 386.306 -76.6116 386.524 -76.0798 386.557C-75.548 386.591 -75.0207 386.439 -74.5829 386.125C-73.5323 385.298 -74.4726 384.523 -74.9127 383.696C-75.5228 382.507 -74.9124 381.049 -75.6325 379.777C-75.8525 379.364 -75.7824 378.805 -76.2126 378.506C-76.2825 378.102 -76.3225 377.72 -76.3925 377.317C-76.3227 376.643 -76.0413 376.011 -75.5914 375.519C-75.1415 375.026 -74.5478 374.699 -73.9011 374.588C-72.2304 374.257 -70.7196 373.316 -69.0189 373.399C-68.7946 373.442 -68.5642 373.436 -68.342 373.383C-68.1199 373.329 -67.9108 373.229 -67.7277 373.089C-67.5447 372.948 -67.3916 372.77 -67.2781 372.566C-67.1646 372.361 -67.093 372.135 -67.0679 371.9C-66.8198 370.91 -66.3346 370 -65.657 369.254C-65.2568 369.182 -66.0873 370.288 -65.0067 369.854C-63.2945 369.212 -61.5433 368.687 -59.7644 368.283C-57.4834 368.17 -55.1724 368.056 -52.8614 367.984C-52.3912 367.984 -51.921 367.984 -51.7409 367.426C-51.5608 366.868 -52.0209 366.712 -52.311 366.454C-53.7492 365.035 -55.5391 364.054 -57.4828 363.621C-58.1098 363.421 -58.7245 363.183 -59.3235 362.907C-59.4032 362.802 -59.5017 362.715 -59.6136 362.649C-59.7235 361.749 -59.3234 361.904 -58.8232 362.204C-58.5418 361.852 -58.3878 361.41 -58.3877 360.953C-58.3877 360.497 -58.5415 360.054 -58.8229 359.702C-58.7579 359.657 -58.7087 359.592 -58.6828 359.516C-58.2551 359.707 -57.7869 359.779 -57.324 359.727C-56.861 359.674 -56.4192 359.498 -56.0416 359.217C-54.8811 358.359 -53.1504 359.103 -52.1398 357.646C-51.8096 357.16 -51.0493 356.86 -50.729 356.26C-49.9285 354.844 -48.9181 354.7 -47.6577 355.517C-47.1875 355.93 -46.2772 356.158 -47.1877 357.016C-47.0986 357.111 -47.0015 357.197 -46.8976 357.274C-46.8275 357.16 -46.7475 357.088 -46.6774 356.974C-45.7771 357.119 -44.9067 357.274 -44.0364 357.461C-42.7059 357.947 -41.8654 356.675 -40.7149 356.531C-40.632 356.439 -40.5583 356.338 -40.4948 356.231C-41.4351 355.517 -42.6256 355.517 -43.716 355.197C-44.5885 354.561 -45.6572 354.281 -46.7171 354.41C-48.4634 353.649 -49.9849 352.426 -51.1285 350.864C-51.1805 350.657 -51.2173 350.446 -51.2385 350.233C-51.0584 350.233 -50.6983 350.233 -50.6982 350.119C-50.3679 348.662 -49.0274 348.662 -48.0569 348.104C-47.6816 348.517 -47.1919 348.801 -46.6546 348.916C-46.1174 349.031 -45.5589 348.971 -45.0557 348.745C-43.6451 348.259 -42.2043 347.133 -40.934 349.149C-40.794 349.376 -40.5438 348.704 -40.6138 348.332C-40.5037 347.888 -40.4336 347.402 -40.3235 346.947C-39.9932 345.458 -40.4332 344.559 -42.0539 344.558C-42.9405 344.602 -43.8212 344.388 -44.5957 343.94C-45.3703 343.492 -46.0077 342.829 -46.4354 342.025C-46.7554 340.681 -47.2254 339.296 -46.0647 338.107C-44.994 336.039 -43.2031 334.303 -42.5025 332.049C-38.4004 329.382 -34.375 326.557 -30.4263 323.573C-29.426 324.348 -28.4257 325.155 -27.4254 325.941C-26.5222 326.825 -25.7201 327.814 -25.0348 328.888C-24.8797 329.098 -24.7127 329.298 -24.5346 329.487C-24.0867 330.857 -23.1393 331.992 -21.8939 332.651C-21.3767 332.864 -20.8994 333.168 -20.4835 333.551C-19.9834 334.378 -19.6934 335.308 -19.2233 336.167C-19.1557 336.472 -19.1289 336.785 -19.1434 337.097C-18.8235 339.341 -18.1435 341.233 -15.7126 341.946L-14.9923 342.401C-14.6322 342.846 -13.992 343.073 -13.912 343.776C-12.7984 346.87 -10.6378 349.441 -7.83043 351.014C-7.4003 351.386 -7.00018 351.728 -6.57004 352.048C-6.50526 352.296 -6.3788 352.522 -6.2033 352.703C-6.0278 352.884 -5.80937 353.015 -5.56976 353.082C-5.40613 353.141 -5.23259 353.166 -5.05954 353.154C-4.31687 354.057 -3.32018 354.696 -2.2086 354.985C-2.13299 355.104 -2.03421 355.206 -1.91851 355.285C-0.438007 356.215 1.3727 356.588 2.64306 357.901C3.00321 357.901 3.1433 357.673 3.11334 357.301C2.81325 357.043 2.49314 356.815 2.20305 356.557C3.13654 356.805 4.10322 356.892 5.06422 356.816C5.74444 357.302 6.32459 358.046 7.66518 357.85C6.94495 357.291 6.43479 356.816 5.89461 356.433C4.89443 354.572 2.71364 353.641 1.95359 351.543L1.88357 351.656C1.26342 350.767 0.613246 349.868 -0.0369065 348.937C-0.25694 348.482 -0.396914 347.903 -0.757019 347.552C-3.50786 345.122 -6.32874 342.775 -9.76001 341.502L-11.0204 340.603L-12.0208 339.827C-12.741 339.042 -13.4611 338.214 -14.1813 337.439C-14.5818 336.344 -15.3019 335.404 -16.2419 334.751C-17.1203 333.868 -17.8745 332.862 -18.4824 331.763C-18.5923 330.904 -19.3926 330.563 -19.6827 329.86C-20.1828 329.219 -20.6829 328.588 -21.1931 327.958C-21.7032 327.327 -21.9932 326.686 -22.3533 326.045C-23.3535 324.597 -23.1832 322.943 -22.8929 321.382C-22.5326 320.348 -23.2929 319.78 -23.9831 319.48C-24.2306 319.379 -24.4712 319.262 -24.7034 319.128C-12.6337 309.363 -1.5934 298.31 8.23463 286.153C9.07511 285.119 9.9156 284.085 10.7361 283.052C11.0917 283.209 11.4093 283.446 11.6664 283.744C11.8164 283.93 11.9564 284.075 12.1065 283.817C12.757 282.7 14.1076 282.06 13.9878 280.457C14.8387 280.001 15.5779 279.351 16.1489 278.555C16.4389 279.413 15.3584 279.744 15.4284 280.53C16.3688 280.116 16.6192 278.255 17.6295 278.855C19.12 279.744 20.8907 280.53 21.4606 282.546C21.4606 282.701 20.8101 284.614 22.4609 283.58C23.3611 285.069 23.3308 286.94 24.4611 288.316C26.3231 290.926 29.0775 292.704 32.1637 293.289C32.9193 293.451 33.7057 293.338 34.3906 292.971C35.0756 292.604 35.6176 292.005 35.9255 291.274C37.116 291.563 38.3467 290.003 39.7171 291.905C39.4245 290.949 38.9329 290.07 38.2768 289.331C39.1072 288.958 39.8675 288.659 40.6179 288.297C42.4288 287.325 42.3587 287.325 42.209 284.751C42.2091 284.234 42.8994 283.666 43.2597 283.107C44.199 282.993 45.1061 282.683 45.9263 282.196C46.7465 281.709 47.4629 281.056 48.032 280.275C48.4381 279.651 48.9838 279.137 49.6229 278.776C50.1499 278.662 50.615 278.344 50.9235 277.888C50.9234 278.653 51.0534 279.076 51.3936 279.159C53.2043 279.377 54.975 279.532 55.5856 277.092C55.6543 276.904 55.7801 276.744 55.9442 276.636C56.1084 276.528 56.302 276.477 56.496 276.493C56.8863 275.748 57.2466 274.963 57.6868 274.105C55.7359 275.304 55.2957 275.138 54.6857 272.915C54.0756 271.881 53.4955 270.899 52.8754 269.886C50.785 266.526 51.3256 263.166 52.8767 259.847C53.0968 260.033 53.1367 260.561 53.5669 260.292C53.747 260.147 53.9971 259.806 53.9671 259.661C53.7872 258.989 53.1669 259.547 52.8067 259.32C50.9262 256.973 50.9663 256.415 52.9573 255.185C54.3598 255.047 55.721 254.618 56.9591 253.924C57.9596 253.469 57.6397 251.68 58.6502 250.936C58.8704 250.709 57.8199 250.936 58.4702 250.337C59.1467 249.722 59.7511 249.029 60.2713 248.269C60.1655 248.475 60.1302 248.712 60.1711 248.941C60.5013 248.528 60.8215 248.114 61.1717 247.711C63.3427 247.411 64.1728 249.2 65.0029 250.617C66.0031 252.56 66.9132 254.576 69.1241 255.29C70.924 255.866 72.7788 256.241 74.6562 256.407C75.9167 256.521 76.7474 254.236 76.2774 252.417C76.1374 251.817 75.6273 251.383 75.7774 250.69C75.8475 250.69 75.8775 250.546 75.9175 250.546C76.2076 250.546 75.6275 250.029 76.1377 250.173C76.928 250.401 76.858 249.915 76.748 249.388C75.8874 248.731 75.1314 247.939 74.5074 247.041C73.1369 246.4 73.2771 244.838 72.667 243.753L72.667 243.639L77.5092 242.296C77.5092 242.296 77.5793 242.368 77.5793 242.409C77.6618 242.531 77.7822 242.621 77.9205 242.662C78.0588 242.703 78.2067 242.695 78.3395 242.637C80.0803 242.451 80.6904 244.012 81.7007 244.953C81.8163 245.047 81.9529 245.11 82.098 245.135C82.243 245.16 82.3919 245.148 82.531 245.098C83.2217 241.811 85.7128 241.48 88.3139 241.325C89.1142 241.325 89.9046 241.212 90.6649 241.181C91.8898 241.384 93.1447 241.131 94.2065 240.468C94.6467 239.951 95.0769 239.434 95.5072 238.824C96.0875 238.049 96.6679 237.294 97.2482 236.55C98.9489 236.891 99.8891 238.38 101.19 239.311C102.13 239.952 103.03 240.583 104.191 240.169C107.122 238.981 110.053 240.284 112.974 239.953C114.095 239.84 115.185 239.799 116.306 239.654C116.471 239.647 116.634 239.603 116.781 239.525C116.929 239.447 117.058 239.337 117.161 239.202C117.263 239.068 117.337 238.912 117.376 238.746C117.415 238.579 117.418 238.406 117.386 238.238C117.804 237.512 118.406 236.919 119.127 236.522C120.818 235.809 121.369 234.124 122.229 232.707C122.472 232.737 122.718 232.674 122.919 232.529C123.12 232.384 123.263 232.168 123.32 231.922L123.72 231.922C124.284 231.955 124.824 232.164 125.27 232.522C126.791 233.463 128.382 234.321 129.822 235.365C131.262 236.41 132.063 235.552 132.753 234.652C133.444 233.753 132.533 232.895 131.923 232.305C130.66 230.995 129.696 229.409 129.103 227.663C128.343 226.577 127.622 225.502 126.892 224.417C126.398 223.65 126.058 222.789 125.892 221.883C126.072 221.015 125.382 220.054 126.283 219.299C126.283 219.299 126.433 219.382 126.433 219.413L126.433 219.826C126.643 220.157 127.013 220.054 127.293 220.054C127.693 217.924 129.074 219.785 129.864 219.382C132.448 220.17 135.097 220.707 137.777 220.986L140.568 222.743L141.108 223.333C141.979 224.005 142.809 224.718 143.639 225.401C146.82 227.831 149.781 230.571 153.182 232.639C154.112 233.373 155.183 233.895 156.323 234.169L158.454 235.297C158.876 235.726 159.381 236.058 159.936 236.27C160.492 236.483 161.084 236.57 161.675 236.527C164.456 236.641 165.107 235.256 163.807 232.341C163.917 231.482 163.197 231.11 162.436 230.479C164.527 230.18 166.158 229.549 168.039 230.108C168.585 230.272 169.161 230.292 169.717 230.168C170.272 230.043 170.789 229.778 171.22 229.395C171.62 229.137 171.94 228.878 171.36 228.465C170.06 227.265 168.8 225.962 167.029 225.476C165.591 224.636 164.076 223.943 162.507 223.408L161.997 223.408C160.997 222.994 159.996 222.539 158.996 222.095C157.996 221.65 156.995 220.823 155.745 220.936C153.534 220.936 151.623 219.819 149.592 219.075C148.982 218.733 148.362 218.433 147.752 218.888C147.031 217.989 146.411 217.089 147.432 215.973C147.553 215.828 147.627 215.647 147.642 215.456C148.142 215.202 148.604 214.875 149.013 214.484C149.483 215.187 150.173 214.856 150.793 214.857C152.794 215.456 154.655 214.63 156.536 214.03C157.296 213.772 157.987 213.255 157.697 212.387C157.337 211.27 158.017 210.753 158.527 210.081C161.238 210.567 163.259 209.255 165.07 207.425C165.391 207.053 165.941 206.608 165.611 206.009C165.281 205.409 164.56 204.592 163.91 204.737C161.269 205.378 158.488 205.377 156.177 207.052C156.003 207.111 155.819 207.136 155.636 207.124C155.283 207.054 154.919 207.069 154.572 207.168C154.225 207.266 153.905 207.446 153.636 207.692C151.835 207.627 150.04 207.929 148.353 208.581C145.902 208.694 143.441 209.407 140.95 209.066L137.839 209.065C137.228 208.952 136.648 208.879 136.068 208.765C134.548 207.731 132.707 207.876 131.066 207.307C131.566 206.563 132.507 206.005 131.967 204.847C132.037 204.516 132.837 204.102 132.037 203.875C130.807 203.544 131.927 203.172 131.927 202.841C131.827 201.583 131.508 200.354 130.987 199.212C130.487 198.354 130.737 197.609 131.678 197.01C132.618 196.41 133.629 196.193 134.249 195.222C135.76 195.036 136.81 193.837 138.151 193.279C139.091 192.876 138.441 191.749 138.911 191.118L141.833 189.288L141.623 188.958C140.352 189.774 139.562 188.616 138.622 188.203C138.122 187.644 138.041 188.73 137.621 188.502C137.261 187.985 139.062 187.417 137.621 186.9C137.047 187.552 136.516 188.242 136.031 188.967C135.03 190.528 133.819 191.686 131.868 191.686C131.398 191.985 130.708 191.841 130.318 192.399C128.687 192.616 126.986 192.398 125.476 193.287C123.665 193.473 123.084 194.972 122.574 196.388C122.273 197.268 121.848 198.097 121.313 198.849C121.063 199.149 120.773 199.448 120.483 199.79C120.153 199.19 121.093 198.932 120.733 198.404C119.732 198.962 119.582 200.42 118.312 200.678C117.647 200.219 117.142 199.553 116.871 198.776C116.431 196.987 115.461 197.545 114.48 198.062C114.016 198.333 113.568 198.633 113.14 198.962C111.409 200.378 110.138 199.995 109.598 197.845C109.388 196.945 109.389 196.128 108.188 196.014C107.692 195.916 107.179 195.995 106.733 196.239C106.287 196.484 105.936 196.879 105.737 197.358C105.543 197.879 105.23 198.343 104.824 198.711C104.417 199.078 103.931 199.338 103.406 199.467C103.035 199.353 102.825 199.55 102.605 199.808C101.725 199.813 100.86 200.052 100.094 200.5C99.0936 200.614 98.5032 201.844 97.3528 201.358C96.2624 201.255 95.1819 201.099 94.1315 200.985C92.791 200.427 91.2403 200.654 90.0099 199.682C88.269 198.6 86.5982 197.401 85.0083 196.094C84.3708 195.613 83.8315 195.006 83.4213 194.309C83.0111 193.611 82.7381 192.837 82.6178 192.031L83.3383 191.059C84.5516 189.37 86.0334 187.905 87.7206 186.728L90.3217 187.256C91.9358 188.272 93.337 189.611 94.4429 191.195C95.2766 191.756 96.2116 192.137 97.1916 192.315C98.1716 192.493 99.1763 192.464 100.145 192.23C100.925 192.127 101.71 192.065 102.496 192.044C102.176 190.917 102.106 189.914 103.187 189.087C103.304 189.015 103.397 188.909 103.456 188.782C103.514 188.655 103.535 188.513 103.516 188.374C103.497 188.235 103.438 188.104 103.348 188C103.257 187.895 103.139 187.82 103.007 187.784C102.007 187.371 101.126 186.926 101.527 185.623C101.622 185.242 101.807 184.89 102.065 184.6C102.324 184.309 102.647 184.089 103.007 183.959C103.44 183.918 103.875 183.918 104.308 183.959C105.028 184.032 105.719 184.104 106.189 183.432L106.189 183.319C107.866 183.527 109.5 184.009 111.031 184.746C111.791 185.191 112.231 184.519 112.841 184.591C113.672 184.405 114.502 184.178 115.333 183.992C116.743 183.92 118.194 184.364 119.604 183.775C120.075 184.22 120.605 183.217 121.045 183.889C123.046 184.148 124.156 182.277 125.997 181.822C125.791 181.531 125.507 181.308 125.18 181.181C124.853 181.054 124.497 181.029 124.157 181.108C122.813 180.736 121.408 180.662 120.035 180.891C119.275 181.035 118.444 181.149 118.154 179.991C117.864 178.833 117.324 180.89 116.924 179.991C116.854 176.889 115.484 174.956 112.302 174.728C112.126 174.719 111.95 174.758 111.792 174.842C111.701 174.885 111.602 174.91 111.502 174.914C111.221 174.909 110.944 174.843 110.69 174.72C110.435 174.597 110.208 174.42 110.024 174.201C109.84 173.981 109.703 173.724 109.622 173.446C109.54 173.168 109.516 172.876 109.552 172.588C109.442 170.313 110.092 168.525 111.683 167.739C113.684 166.809 116.135 167.109 116.995 168.412C117.185 168.577 117.366 168.753 117.535 168.939C118.582 170.418 119.953 171.62 121.537 172.445C121.76 172.591 122.002 172.702 122.257 172.775C122.691 172.928 123.141 173.029 123.597 173.075C127.4 172.673 131.168 171.982 134.872 171.009C136.143 170.751 136.363 169.335 137.264 168.694C137.664 169.035 137.124 169.252 137.194 169.728C137.79 169.044 138.531 168.51 139.358 168.168C140.185 167.826 141.077 167.684 141.966 167.754C142.546 167.867 143.156 167.981 143.736 168.126C146.988 169.584 150.279 168.385 153.571 168.313C154.091 168.306 154.599 168.144 155.034 167.847C155.468 167.551 155.811 167.131 156.022 166.639C156.114 166.454 156.15 166.244 156.125 166.037C156.1 165.831 156.015 165.637 155.882 165.481C154.942 164.695 154.041 163.951 153.101 163.123L153.221 163.123C153.441 162.637 153.651 162.09 153.872 161.593C153.886 161.006 154.119 160.447 154.522 160.032C154.594 159.922 154.678 159.822 154.772 159.733C155.062 159.733 155.392 159.846 155.683 159.877C158.934 159.878 162.075 159.061 165.327 159.062C169.558 158.99 173.75 159.208 177.982 159.508C180.653 159.695 183.334 159.922 186.045 159.85C186.736 159.85 187.856 160.15 188.046 159.065C188.175 158.488 188.118 157.884 187.883 157.345C187.648 156.805 187.249 156.36 186.746 156.077C186.083 155.594 185.271 155.381 184.465 155.477C182.734 155.218 181.324 153.76 179.463 154.06C178.673 153.533 177.803 153.915 176.972 153.987C173.861 154.245 170.75 154.503 167.648 154.803C166.478 154.599 165.287 154.561 164.107 154.689C163.306 154.988 162.616 154.244 161.856 154.471L159.115 154.688C157.664 154.316 156.183 155.029 154.743 154.501C152.02 153.929 149.211 153.956 146.499 154.583C145.499 154.8 144.258 154.014 143.498 155.255C142.818 155.254 143.498 154.583 143.108 154.427C141.908 153.828 140.717 153.155 139.346 153.982L139.266 153.982C138.987 151.139 139.707 150.25 142.668 149.847C143.389 149.775 144.119 149.62 144.839 149.517C146.122 149.193 147.344 148.648 148.451 147.905C148.709 147.731 148.922 147.495 149.071 147.218C149.221 146.94 149.303 146.629 149.31 146.311C149.317 145.993 149.249 145.678 149.111 145.394C148.974 145.11 148.771 144.864 148.521 144.679C147.911 143.18 147.181 141.763 146.521 140.275C145.581 138.072 143.42 137.4 141.069 138.258C141.018 138.362 140.981 138.474 140.959 138.589C140.089 139.116 139.078 138.402 138.208 138.929L137.708 138.929C137.088 137.544 137.058 135.941 136.408 134.525C136.298 134.339 137.348 134.143 137.308 133.491L140.74 133.678C143.622 133.652 146.501 133.891 149.343 134.392C149.337 134.52 149.361 134.648 149.413 134.765C149.659 135.182 150.027 135.507 150.465 135.693C150.902 135.879 151.385 135.916 151.844 135.799C152.594 136.026 153.145 135.468 153.755 135.241C154.225 134.61 154.695 133.938 155.206 133.297C155.856 130.506 155.776 130.32 153.105 129.461C149.564 125.873 144.933 125.015 140.311 124.197C139.933 123.918 139.502 123.726 139.046 123.635C138.59 123.544 138.121 123.556 137.67 123.67C136.299 123.184 135.139 123.783 133.988 124.383C132.385 124.677 130.827 125.191 129.356 125.912C127.625 126.801 125.884 127.659 124.183 128.558L123.183 128.672C122.563 128.599 121.952 128.558 121.372 128.485C120.722 128.113 120.002 128.485 119.371 128.372C119.582 127.684 119.561 126.943 119.31 126.271C119.059 125.598 118.594 125.033 117.991 124.67C116.871 123.967 115.99 125.052 114.99 125.704C113.434 126.849 112.066 128.245 110.938 129.838C110.798 129.322 109.747 129.135 110.508 128.195C109.787 128.536 109.317 129.094 108.587 128.98C108.157 128.494 107.286 129.094 106.966 128.349C106.746 127.905 107.256 128.163 107.356 128.008C107.036 126.519 105.696 126.405 104.646 125.888C104.145 125.661 103.565 125.888 103.275 124.854C102.985 123.82 102.625 125.226 102.195 125.299C100.194 125.598 98.193 125.143 96.2621 125.743C95.6895 125.638 95.1001 125.702 94.5613 125.928C94.2514 125.772 93.9131 125.685 93.5684 125.672C93.2237 125.66 92.8803 125.722 92.5605 125.856C91.854 125.459 91.029 125.352 90.2496 125.556C88.799 124.997 87.3884 125.555 85.9778 125.71C84.3504 125.908 82.7032 125.841 81.0958 125.513C77.3743 124.365 73.763 123.093 71.6626 119.309C71.4023 118.601 71.2815 117.847 71.3074 117.091C71.3333 116.335 71.5053 115.591 71.8132 114.905C72.7139 112.403 72.3939 111.317 69.2826 111.276C68.0358 111.37 66.793 111.043 65.7413 110.345C65.2011 110.272 65.2711 109.9 65.3412 109.487C65.0912 109.187 65.5214 108.329 64.6511 108.453C64.5511 108.225 63.9308 107.925 64.1809 107.925C64.9112 107.925 64.8714 106.509 65.7417 107.14C66.1418 107.398 66.3919 107.853 67.0021 107.781C67.2624 106.747 66.1419 106.747 66.002 106.023C66.6923 105.682 67.6327 105.61 68.003 104.721C69.4437 103.687 71.1143 103.967 72.735 103.894C74.4357 104.339 75.8863 104.308 76.927 102.479C77.6875 101.176 79.6382 101.548 80.5788 100.308C81.511 99.9541 82.5342 99.952 83.4677 100.302C84.4012 100.652 85.185 101.332 85.6807 102.221C86.4709 103.379 87.9214 103.566 88.2818 101.994C89.1126 98.3758 92.224 97.2906 94.5753 95.3887C95.5757 95.3888 96.126 94.4585 97.0264 94.1898C97.4471 93.9788 97.7732 93.6087 97.937 93.156C98.077 93.5282 97.3967 93.6729 97.6067 94.1278C100.108 94.7174 102.529 95.6895 105.16 95.5762C106.023 95.5912 106.886 95.5046 107.731 95.318C109.281 94.8323 110.442 94.0157 109.282 92.1133C108.602 91.6583 108.202 90.7692 107.191 90.8724C106.34 90.5415 105.401 90.5413 104.55 90.8721C103.427 90.8575 102.309 91.0105 101.229 91.3265C98.7275 91.8845 96.3763 93.2695 93.7053 92.5145C92.7049 91.9561 91.5744 92.5142 90.524 92.1109C88.7132 92.6689 86.6924 92.2551 84.9915 93.2991C83.9911 93.3713 82.9907 93.4849 82.0703 93.5572C81.52 93.6398 80.9098 93.4847 80.5096 94.0843L80.5095 94.1566C80.3278 94.207 80.1345 94.185 79.9677 94.095C79.801 94.005 79.673 93.8535 79.6092 93.6706C78.3785 95.1282 76.7479 94.7041 75.2273 94.7039L74.2969 94.59C74.1601 94.5269 74.0083 94.507 73.8606 94.5327C73.7128 94.5584 73.5757 94.6287 73.4665 94.7347C73.4057 94.6277 73.3076 94.5487 73.1922 94.5141C73.0769 94.4795 72.9531 94.4918 72.8463 94.5485C71.9319 94.8289 70.9705 94.9063 70.0251 94.7756C69.0847 94.7031 68.1143 94.5892 67.1739 94.5167C66.8758 94.3073 66.6226 94.0367 66.4299 93.7219C66.2372 93.4071 66.1091 93.0548 66.0537 92.6867C65.2935 91.3426 65.2938 89.5851 64.2435 88.396C64.1336 87.4965 63.2432 87.362 62.7631 86.8244C61.5727 85.7904 60.3023 84.8494 60.2325 83.0195C60.3137 82.3353 60.188 81.6419 59.8726 81.0345C60.2728 80.9622 60.5929 80.7037 60.9931 80.6624C61.3933 80.6211 61.8935 80.9624 61.3133 80.2903C60.8832 79.8043 60.9232 79.5872 61.4935 79.3909C61.7836 79.6597 62.1137 79.8768 62.4038 80.1043C63.2641 80.1768 63.6644 79.4325 64.2847 79.0191C64.8177 78.834 65.2755 78.4702 65.5854 77.9854C65.8355 77.8303 66.1256 77.727 66.3758 77.5719C67.8965 76.9001 69.5571 77.2725 71.0778 76.7558L72.0182 76.7559C72.3783 77.0144 72.7085 76.756 73.0186 76.756C74.1691 76.9733 75.1096 76.2291 76.16 76.0845C76.4236 75.7718 76.7523 75.5248 77.1213 75.3619C77.4903 75.199 77.8902 75.1245 78.2911 75.1439C78.9414 74.441 79.8818 74.3688 80.6822 73.9967C83.5035 73.4698 85.8547 71.7126 88.4859 70.7101C89.6764 70.2657 88.7462 69.3661 89.2464 68.8803C89.0665 68.1669 88.246 69.18 88.096 68.4356C86.9357 68.0786 85.7185 67.9625 84.5146 68.0939C82.5137 68.2798 81.9135 67.5767 82.274 65.447C82.4542 64.4132 82.7444 63.4311 82.8846 62.4179C83.2451 59.699 83.0351 59.4405 80.2439 59.4401C76.9226 59.0572 76.0923 58.5712 77.3232 54.9942C78.264 52.3787 80.7151 51.2211 82.026 48.9882C83.6066 49.619 84.027 47.6445 85.3476 47.3758C86.8093 46.9791 88.1913 46.3177 89.4295 45.4224C90.804 44.6267 92.274 44.022 93.8016 43.624C97.7443 43.1973 101.718 43.1632 105.667 43.5222C106.607 43.5223 106.927 43.0364 107.397 42.4886C108.518 41.1137 109.399 39.3873 111.159 38.7982C112.014 37.997 113.022 37.3907 114.119 37.0185C115.215 36.6464 116.375 36.5168 117.522 36.6383C119.426 36.8724 121.356 36.6535 123.165 35.9981C123.345 35.5122 123.845 35.4812 124.165 35.2125L124.125 35.2124C126.126 34.3546 127.277 32.4938 128.578 30.8502C128.885 30.5363 129.119 30.1546 129.263 29.7339C129.407 29.3132 129.456 28.8642 129.408 28.4208C129.339 24.0993 128.249 22.7138 124.407 22.2171C123.848 21.9248 123.211 21.8337 122.596 21.9584C121.798 21.7982 120.977 21.8072 120.183 21.9848C119.388 22.1624 118.637 22.5049 117.974 22.9916C117.464 22.4333 117.975 21.8337 117.975 21.2755C117.975 20.9446 117.795 20.9756 117.654 21.1307C117.513 21.2588 117.392 21.4087 117.294 21.5752C116.294 22.247 116.564 21.5751 116.674 21.0168C116.894 19.7866 116.534 19.0008 115.194 18.8559C114.522 18.5231 113.78 18.3686 113.036 18.4064C112.292 18.4442 111.569 18.6731 110.932 19.0724C109.707 19.3261 108.628 20.069 107.93 21.1397C107.59 21.8099 107.024 22.3283 106.34 22.5973C104.499 23.0829 105.259 25.2024 104.168 26.1741L103.408 27.2078C102.467 27.6936 101.527 28.1794 100.266 28.8099L101.267 27.1352C99.1257 29.368 97.0345 31.5698 94.0731 32.655C93.8954 32.6328 93.7152 32.648 93.5433 32.6995C93.3714 32.7509 93.2113 32.8377 93.0727 32.9547L90.7516 33.6264C90.4509 33.4881 90.1254 33.4166 89.7962 33.4166C89.4671 33.4165 89.1416 33.4879 88.8408 33.6261C86.7758 33.7117 84.7212 33.9742 82.6981 34.4111C82.5539 34.3791 82.4036 34.3936 82.2676 34.4528C82.1316 34.5119 82.0165 34.6128 81.9378 34.7418C77.936 35.8578 73.7643 35.3404 69.7225 35.9395C66.2111 35.5255 62.8896 36.683 59.5281 37.1994C57.3571 37.5713 56.2668 36.8268 55.8369 34.7798C56.017 34.511 56.2371 34.294 56.4172 34.0252C57.7481 31.265 60.4195 29.5181 61.5503 26.6442L62.6309 25.4037C62.9609 26.1585 61.8705 26.4374 62.2005 27.2025C62.8108 26.4169 63.4312 25.7036 63.9315 24.9283C64.4391 24.2123 65.0951 23.6227 65.8515 23.2024C66.608 22.7821 67.4458 22.5419 68.3037 22.4993C69.5042 22.3444 70.7347 22.2722 71.4852 21.1144C71.5951 21.0777 71.6947 21.0138 71.7753 20.9283C73.266 20.0394 73.9165 18.3543 74.9971 17.0828C75.6075 16.5246 76.1878 15.9665 76.8081 15.4083C78.2488 14.6227 80.1996 14.9228 81.1402 13.1343C81.3603 13.3515 81.4703 13.8788 81.8705 13.5066C82.8662 12.6964 84.1052 12.2723 85.3721 12.3078C89.894 12.3084 92.3754 9.476 94.7368 6.10598C95.8611 4.23805 97.3671 2.64682 99.1493 1.44388C100.81 0.410254 101.791 -1.35748 102.721 -3.07354C102.871 -3.33198 102.801 -3.44571 102.541 -3.33202C102.281 -3.21833 102.261 -3.07362 102.111 -2.91856C103.012 -5.42034 104.503 -7.25006 107.244 -7.50817C109.307 -7.63604 111.246 -8.571 112.666 -10.1231C115.168 -11.2496 117.669 -12.3245 120.22 -13.4097C122.221 -14.2262 123.402 -16.211 125.223 -17.286C127.464 -19.3534 129.745 -21.3174 131.986 -23.3331C133.107 -23.5604 133.287 -24.863 134.157 -25.3488C134.517 -24.8319 133.577 -24.4908 133.897 -23.8601C136.069 -27.0339 139.259 -29.3085 142.902 -30.2792C145.363 -30.5373 146.704 -32.6255 148.544 -33.8555C150.385 -35.0856 152.016 -36.4707 153.747 -37.7731C157.839 -39.0442 160.941 -41.9076 164.092 -44.6779C164.563 -44.9776 164.993 -45.3187 165.433 -45.6185C166.486 -45.738 167.45 -46.2839 168.113 -47.1365C168.777 -47.989 169.087 -49.0788 168.975 -50.167L168.425 -50.4255C168.715 -52.3381 167.745 -53.4547 166.224 -54.2406C164.094 -54.5717 162.393 -53.6415 160.732 -52.4838C159.731 -52.2978 159.461 -51.3674 158.961 -50.6955C158.271 -49.5377 156.86 -49.3828 156.069 -48.38C155.222 -48.1525 154.488 -47.6072 154.008 -46.8502L152.157 -45.279C150.937 -45.3929 150.247 -44.6073 149.526 -43.7906C148.806 -42.974 148.435 -41.7231 147.245 -41.4027C147.367 -41.5583 147.465 -41.7327 147.535 -41.9196C147.535 -42.1884 147.425 -42.3745 147.285 -42.0747C146.595 -40.8446 145.114 -40.6483 144.283 -39.6042C143.453 -39.6043 142.833 -38.9738 142.112 -38.7154C140.992 -38.4468 140.702 -37.3716 140.111 -36.648C139.021 -35.1491 137.11 -35.3044 135.769 -34.4775C135.479 -34.4775 135.189 -34.5499 134.869 -34.5499C133.638 -33.661 132.188 -33.0616 131.317 -31.759C130.747 -31.573 129.876 -32.0177 129.656 -30.9735C128.395 -29.7744 126.655 -29.3714 125.424 -28.0586C125.034 -27.5417 124.634 -26.9732 124.203 -26.4563C123.833 -26.2289 123.733 -25.6397 123.153 -25.8258C123.263 -26.0119 123.443 -26.198 123.443 -26.3427C123.293 -26.9734 123.083 -26.4565 123.003 -26.3428C122.228 -25.1227 121.021 -24.2653 119.641 -23.955C119.641 -24.0274 119.721 -24.0687 119.721 -24.1411C119.721 -24.2135 119.641 -24.3685 119.641 -24.4409C118.701 -23.2418 117.26 -22.9525 116.139 -22.1256C115.773 -22.0829 115.409 -22.0208 115.049 -21.9396C115.049 -22.2394 115.739 -22.4254 115.199 -22.839C114.198 -20.5647 111.767 -21.1956 110.097 -20.2241C109.517 -20.2927 108.93 -20.1888 108.406 -19.9245C107.914 -19.9214 107.439 -19.7383 107.065 -19.4077C105.231 -18.0171 103.255 -16.8386 101.172 -15.8934C99.0414 -15.5215 97.9507 -13.4746 96.1698 -12.503C95.8496 -12.0895 95.5194 -11.7174 95.1692 -11.3039C95.0154 -11.3078 94.8635 -11.2686 94.7296 -11.1903C94.5957 -11.112 94.4848 -10.9977 94.4089 -10.8595C93.9786 -10.4873 93.5384 -10.1462 93.1082 -9.77409L91.2272 -8.20289C90.867 -8.28564 90.6869 -8.01686 90.5068 -7.79978C90.068 -7.7396 89.6481 -7.57711 89.2789 -7.32463C88.9097 -7.07214 88.6009 -6.73628 88.3758 -6.34235C87.0752 -6.00135 87.035 -4.74002 86.6747 -3.79927C86.4893 -3.00878 86.2103 -2.24495 85.8441 -1.52496C84.3632 0.304755 82.9824 2.20687 80.9214 3.39552C79.6208 3.39535 78.6503 4.48077 77.3797 4.70805C76.3793 4.5942 75.5389 5.2971 74.6385 5.5968C73.7381 5.8965 72.9677 6.38233 72.1373 6.79576L72.1373 6.98182C71.4869 7.79848 70.8765 8.6255 70.2261 9.44215C68.8156 9.14215 67.5852 8.13914 66.0646 8.13894C64.8041 7.61152 64.2937 8.92443 63.3933 9.2965C62.4929 9.66856 62.0926 10.3302 61.2222 10.5265C59.9726 11.7165 58.543 12.6872 56.9901 13.4C55.4394 13.8134 54.7889 15.5295 53.3782 16.16C53.5583 15.8291 53.7785 15.5294 53.9886 15.1882C53.6431 15.5393 53.2308 15.8123 52.7779 15.9902C52.325 16.1681 51.8413 16.247 51.3574 16.2217C49.6182 16.4356 47.9268 16.9527 46.3551 17.7512C44.8043 18.423 43.4239 17.7508 42.2735 16.5203C42.3437 15.2487 41.2734 14.0597 42.0539 12.7468L45.526 8.19834C46.2464 6.85444 47.3669 6.6685 48.7375 6.85476C51.4356 7.2898 54.1906 7.16361 56.8409 6.48361C57.4593 6.34521 58.0411 6.06913 58.5456 5.6746C59.0502 5.28006 59.4654 4.77656 59.7624 4.1992C60.603 2.59685 60.1329 1.66634 58.4323 1.25259C57.294 0.870626 56.1148 0.634355 54.9209 0.5491C53.1503 -0.836478 51.0896 -1.99463 51.09 -4.91007L50.0094 -3.78332C49.7594 -4.75516 50.3297 -5.31338 50.77 -5.9543C50.7 -6.44022 51.1303 -7.11215 50.33 -7.32936C50.0098 -6.91586 49.6496 -6.5127 49.3294 -6.0992C48.4327 -4.69053 47.2932 -3.46417 45.9675 -2.48119C45.6774 -2.22277 45.7473 -1.8816 45.8273 -1.55076C44.0563 0.919897 42.4653 3.618 39.4639 4.7962C38.4634 4.86844 37.723 5.72645 36.8926 6.21225C36.2123 6.6257 35.5219 7.55607 34.6917 6.29467C34.3616 5.76737 34.2615 6.43937 34.0714 6.58408C32.0703 8.11391 33.6008 9.57183 34.2209 11.0296C34.6909 12.4461 34.3605 14.1312 35.5609 15.3203C35.5755 15.4819 35.5754 15.6445 35.5608 15.8061L35.5608 15.8785C35.495 15.8346 35.419 15.8096 35.3407 15.8061C33.6799 16.7777 32.8493 18.5352 31.4786 19.8066C30.0682 18.4211 29.4778 19.8064 28.7273 20.6954C28.6296 20.0824 28.7317 19.4532 29.0177 18.9068C28.0172 19.0928 26.7766 19.7233 27.1371 17.7074C27.2027 17.4384 27.2529 17.1657 27.2872 16.8906C27.4674 15.6604 27.7177 14.275 26.7074 13.4168C25.6971 12.5586 24.4265 13.2304 23.346 13.7576C22.6386 13.6753 21.9843 13.3298 21.5053 12.7855C21.3814 12.6368 21.2279 12.5175 21.0552 12.4357C20.8826 12.3539 20.6949 12.3115 20.505 12.3115C20.3151 12.3115 20.1274 12.3538 19.9547 12.4356C19.7821 12.5173 19.6285 12.6366 19.5045 12.7853C19.2747 12.4978 18.974 12.2798 18.6342 12.1545C17.4073 10.3761 16.1503 8.61498 14.8633 6.87107L15.0934 6.55063C16.4641 6.13727 17.0945 4.79333 17.945 3.86298C18.7955 2.93263 17.7352 1.58854 16.7248 1.13352C15.0443 0.231744 13.239 -0.396246 11.3728 -0.728134C10.0323 -0.883383 9.56223 -1.88626 8.66192 -2.41363C7.76161 -2.94101 8.98213 -2.97189 9.05221 -3.38542C9.34249 -4.64667 9.92251 -2.85804 10.4328 -3.38524C10.1828 -4.12964 9.05231 -4.20214 8.98241 -5.20497C9.8128 -5.54604 10.1028 -4.46044 10.9832 -4.50168C10.5831 -5.06001 10.263 -5.53565 9.98293 -6.03193L9.983 -6.63154C12.3344 -9.73277 14.6157 -12.7823 16.9871 -15.8112C18.2852 -17.1932 19.1109 -18.9755 19.3388 -20.8871C19.4623 -21.6311 19.7768 -22.3273 20.2494 -22.9029C21.2502 -26.0043 24.1117 -28.0716 24.8024 -31.3695C25.0926 -31.8244 25.3828 -32.2276 25.6629 -32.6824C25.9431 -33.1373 26.3533 -33.5404 26.6635 -33.9125C27.1738 -34.4708 27.604 -35.029 27.0239 -35.8148C28.5847 -37.0449 28.9051 -38.9884 29.5556 -40.6322C30.6764 -43.4234 32.3074 -46.0801 32.778 -49.1713C33.0772 -50.2262 33.6237 -51.1885 34.369 -51.9728C35.7098 -53.7302 37.2207 -55.3738 37.9813 -57.9066C37.3009 -57.0176 36.7906 -56.3767 36.2103 -55.591C35.9203 -56.749 36.6107 -57.4209 37.011 -58.1755C36.5408 -58.5478 36.4607 -57.6897 36.0705 -57.8758C36.0503 -57.9747 36.0503 -58.0768 36.0706 -58.1756C36.6933 -59.9842 37.6217 -61.6643 38.8123 -63.1378C39.0674 -63.4074 39.2588 -63.7343 39.3717 -64.0929C39.4845 -64.4515 39.5157 -64.8322 39.4629 -65.2053C39.6341 -65.6241 39.7223 -66.074 39.7224 -66.5286C39.7224 -66.9832 39.6343 -67.4332 39.4632 -67.852C39.0633 -70.0541 40.004 -72.4835 38.4636 -74.4997C38.4216 -74.8828 38.3041 -75.2529 38.1183 -75.5872C37.9325 -75.9215 37.6824 -76.2129 37.3834 -76.4435C37.2334 -76.8881 37.0934 -77.374 36.9434 -77.8186C36.668 -79.4875 36.17 -81.1089 35.4634 -82.6364C35.0387 -83.2277 34.432 -83.6521 33.7431 -83.8401C33.0541 -84.028 32.3238 -83.9683 31.672 -83.6708C30.6702 -83.0338 29.8007 -82.1979 29.1136 -81.2113C28.4266 -80.2247 27.9358 -79.1071 27.6696 -77.9231L27.0592 -76.9617C26.3388 -75.99 25.5783 -75.0183 24.8479 -74.0879C25.208 -73.633 25.3982 -74.6462 25.7883 -74.2326C25.2479 -72.961 23.8372 -72.2168 23.727 -70.6867C22.7264 -69.012 22.8261 -66.7686 21.1953 -65.3835C18.6736 -60.5351 14.9815 -56.3174 14.0004 -50.6831C12.6296 -49.0808 12.6693 -46.6926 10.8183 -45.4212C11.3985 -44.9352 11.5087 -45.7934 11.9789 -45.6072C11.7287 -45.2351 11.5086 -44.8629 11.2884 -44.4907C10.7481 -43.7361 10.1678 -42.9918 9.58742 -42.2475C8.97722 -42.6198 9.84761 -42.9608 9.48751 -43.3331C9.05568 -43.0404 8.70919 -42.6317 8.48527 -42.1509C8.26135 -41.67 8.16849 -41.1352 8.21665 -40.6039C6.91582 -38.402 4.60464 -36.7584 4.27414 -33.9257C4.09386 -32.2819 3.01325 -31.1655 2.18274 -29.8527C1.92259 -29.5529 1.67245 -29.2221 1.4223 -28.9223C1.22663 -27.0139 0.535029 -25.1956 -0.579214 -23.6603C-0.829357 -23.3605 -1.08951 -23.0297 -1.37967 -22.73L-1.62975 -22.9884C-1.57393 -23.17 -1.53702 -23.3571 -1.51963 -23.5467C-1.6697 -23.4744 -1.84978 -23.3607 -2.02987 -23.2883L-2.68025 -22.4303C-2.81331 -22.648 -3.02021 -22.8065 -3.26044 -22.8749C-3.08032 -23.2161 -2.75015 -23.5055 -2.97018 -23.9915C-3.22032 -23.702 -3.47047 -23.3609 -3.73061 -23.0611C-4.38077 -23.9193 -3.08015 -24.5601 -3.44019 -25.4182C-4.6706 -26.2351 -5.06051 -28.1374 -6.87126 -28.2514C-8.26949 -28.5833 -9.71667 -28.6327 -11.133 -28.3967C-12.0735 -28.1797 -13.0139 -27.8386 -13.1341 -26.5774C-13.33 -25.847 -13.3092 -25.0726 -13.0743 -24.3546L-12.1541 -23.4964C-11.6438 -23.579 -11.0936 -23.641 -11.0437 -23.1344C-11.0085 -22.73 -10.859 -22.3453 -10.6136 -22.0281C-10.2635 -21.7076 -9.91342 -21.3767 -9.61334 -20.9942C-9.23961 -20.7336 -8.90292 -20.4204 -8.61303 -20.0636L-7.42269 -18.9055L-7.28261 -19.0295C-7.28263 -18.9158 -7.23261 -18.8021 -7.21262 -18.6987L-7.42269 -18.9055C-7.80289 -18.5954 -8.15305 -18.5541 -8.253 -19.2158C-8.30946 -19.5229 -8.43255 -19.8127 -8.61303 -20.0636L-9.61334 -20.9942C-9.98505 -21.2969 -10.3208 -21.6439 -10.6136 -22.0281C-11.1238 -22.5245 -11.6139 -23.0621 -12.1541 -23.4964L-12.6243 -23.4034C-12.7155 -23.4959 -12.8124 -23.5822 -12.9144 -23.6619C-12.9143 -23.8893 -13.0244 -24.1271 -13.0743 -24.3546C-14.9549 -26.0917 -16.8688 -27.815 -18.8161 -29.5246C-110.724 -108.853 -247.593 -96.2575 -324.417 -1.30886C-401.242 93.6398 -389.175 234.947 -297.257 314.317ZM141.546 160.775L141.687 160.775C142.807 160.475 143.247 159.173 144.328 158.873C144.398 158.873 144.398 158.987 144.398 159.059C145.516 159.548 146.727 159.767 147.939 159.701C148.519 160.962 148.739 162.533 149.94 163.433C148.349 163.691 146.688 163.763 145.278 164.776L145.278 164.849C144.615 164.638 143.91 164.61 143.233 164.765C142.556 164.921 141.93 165.256 141.416 165.737C140.426 164.021 140.926 162.419 141.546 160.775ZM79.1812 232.175C82.3926 232.175 83.183 231.358 83.4435 228.143C83.4436 227.326 83.5538 226.499 83.5839 225.683C84.3144 224.556 85.0748 223.481 86.6954 224.525C86.4054 223.109 85.3249 223.408 84.3146 223.108C85.145 222.509 86.0854 222.468 86.5857 221.765L86.5857 221.837C87.856 223.44 90.0569 223.326 91.4673 224.712L91.3973 224.784C92.211 226.737 92.5342 228.871 92.3369 230.987C91.903 231.276 91.5835 231.716 91.4364 232.228C91.3263 232.517 91.1762 232.9 91.5063 233.158C91.537 233.191 91.5736 233.216 91.6139 233.234C91.6543 233.251 91.6976 233.26 91.7414 233.26C91.7851 233.26 91.8284 233.251 91.8688 233.234C91.9091 233.216 91.9457 233.191 91.9765 233.158C91.6945 233.538 91.4403 233.939 91.216 234.358L90.6757 234.73C90.4957 234.585 90.8157 235.484 90.1255 234.885C89.4353 234.285 88.7548 235.443 88.2845 236.228C88.1045 236.073 87.9244 235.929 87.7443 235.97C84.743 236.642 81.7417 237.158 78.6703 237.83L78.6003 237.902C78.1659 237.502 77.6191 237.255 77.0397 237.199C77.69 236.785 78.5303 236.972 79.2107 236.413C79.1008 235.379 78.2704 235.628 77.2599 236.113C77.8003 235.328 78.1605 234.811 78.5607 234.253C77.6604 233.725 77.7301 236.113 76.6498 234.811C77.4403 233.849 77.9507 232.66 79.1812 232.175ZM60.8817 247.142C60.9307 247.196 60.9682 247.259 60.9917 247.328C60.8316 247.525 60.6415 247.711 60.4914 247.918C60.6411 247.67 60.7716 247.411 60.8817 247.142ZM11.5064 -28.1766C11.4264 -28.1766 11.1062 -27.8872 10.9261 -27.7322C11.2507 -28.8442 11.3962 -30.0037 11.3567 -31.1645C11.5068 -31.3195 11.6169 -31.4643 11.757 -31.6193C12.5147 -32.9147 13.0307 -34.3453 13.2781 -35.8372C13.2782 -35.9096 13.1681 -35.9406 13.1681 -35.982C13.3401 -35.9935 13.5081 -36.0408 13.662 -36.1211C13.8158 -36.2013 13.9525 -36.3128 14.0636 -36.4489C14.1748 -36.585 14.2583 -36.7429 14.309 -36.9131C14.3597 -37.0833 14.3767 -37.2624 14.3588 -37.4395C14.4708 -37.3784 14.593 -37.3398 14.7189 -37.3258C15.2573 -37.4957 15.7453 -37.8038 16.1372 -38.2214C16.5291 -38.639 16.8122 -39.1524 16.9602 -39.7137C17.8003 -42.2171 18.4889 -44.772 19.022 -47.3638C19.222 -47.5168 19.4407 -47.642 19.6724 -47.7359C20.973 -48.4078 21.4433 -49.7517 21.9937 -50.9819C23.3247 -54.0833 24.9958 -56.9571 25.9966 -60.1309C26.0702 -60.4536 26.1811 -60.766 26.3268 -61.0613C26.8372 -61.4285 27.4398 -61.6347 28.0613 -61.6548C28.6829 -61.6749 29.2967 -61.5081 29.8283 -61.1746C29.7583 -61.0609 29.7283 -60.9161 29.6482 -60.8024C28.9977 -58.9726 28.4172 -57.0704 27.9168 -55.1682C27.086 -51.9531 25.2749 -49.2653 23.914 -46.319C22.9062 -44.3277 22.2456 -42.1685 21.9623 -39.9405C22.1254 -39.8973 22.2832 -39.8348 22.4325 -39.7543C22.3823 -39.7244 22.3254 -39.7086 22.2674 -39.7086C22.2095 -39.7086 22.1525 -39.7244 22.1023 -39.7543C21.1019 -39.4857 20.7316 -38.4829 20.3714 -37.6869C19.5921 -35.9732 18.7201 -34.3062 17.7596 -32.6937C17.7082 -32.5079 17.7081 -32.311 17.7595 -32.1251C16.9291 -31.0914 16.0986 -29.9232 15.1881 -28.8792C14.5077 -28.1349 14.1073 -26.7186 12.5568 -27.6906L12.5568 -27.5355C11.9766 -27.9181 11.7262 -26.0056 10.6759 -26.8638C10.8986 -27.1091 11.1026 -27.3718 11.2863 -27.6494C11.4664 -27.7735 11.8965 -27.9181 11.5064 -28.1766Z\\\" fill=\\\"#86C11F\\\"/>\\n    </svg>\\n\\n      </div>\\n    </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-01.less\nvar _en_grid_grid_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/grid/grid-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-01.js\n\n\n//Inspirace: https://data-driven-forms.org/\n\n/* harmony default export */ var components_en_grid_grid_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"grid-01\",\n  title: \"Two columns\",\n  subtitle: \"On phone bellow\",\n  contentSetting: {},\n  content: {\n    // formName: 'Název formuláře'\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"basicGroup\",\n    leftColumn: \"basicGroup\"\n  },\n  components: {\n    leftColumn: [],\n    rightColumn: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-50\\\">\".concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-50\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n</div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('#test').on('click', function (e) {\n      //   builder.app.dialog.alert('click');\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-02.less\nvar _en_grid_grid_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/grid/grid-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-02.js\n\n\n//Inspirace: https://data-driven-forms.org/\n\n/* harmony default export */ var components_en_grid_grid_02 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"grid-02\",\n  title: \"Three columns\",\n  subtitle: \"On phone bellow\",\n  contentSetting: {\n    // formName: {\n    //   name: \"Název formuláře\",\n    //   type: \"textarea\",\n    // },\n  },\n  content: {\n    // formName: 'Název formuláře'\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"basicGroup\",\n    leftColumn: \"basicGroup\"\n  },\n  components: {\n    leftColumn: [],\n    middleColumn: [],\n    rightColumn: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-33\\\">\".concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-33\\\">\").concat(component.renderComponents(\"middleColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-33\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n</div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('#test').on('click', function (e) {\n      //   builder.app.dialog.alert('click');\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-03.less\nvar grid_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/grid/grid-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-03.js\n\n\n//Inspirace: https://data-driven-forms.org/\n\n/* harmony default export */ var grid_grid_03 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"grid-03\",\n  title: \"Two columns with width settings\",\n  subtitle: \"On phone bellow\",\n  contentSetting: {\n    leftWidth: {\n      name: \"Left colum width (%)\",\n      type: \"input-number\"\n    },\n    rightWidth: {\n      name: \"Right colum width (%)\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    // formName: 'Název formuláře'\n    leftWidth: 50,\n    rightWidth: 50\n  },\n  componentsAllowedGroup: {\n    rightColumn: \"basicGroup\",\n    leftColumn: \"basicGroup\"\n  },\n  components: {\n    leftColumn: [],\n    rightColumn: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n\\n\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-100 medium-\".concat(content.leftWidth, \"\\\">\").concat(component.renderComponents(\"leftColumn\"), \"</div>\\n    <div class=\\\"col-100 medium-\").concat(content.rightWidth, \"\\\">\").concat(component.renderComponents(\"rightColumn\"), \"</div>\\n</div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('#test').on('click', function (e) {\n      //   builder.app.dialog.alert('click');\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-04.less\nvar grid_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/grid/grid-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/grid/grid-04.js\n\n//asi nejlepší na testování: https://loading.io/flexbox/\n/* harmony default export */ var grid_grid_04 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"grid-04\",\n  title: \"Grid layout\",\n  subtitle: \"symmetric\",\n  contentSetting: {\n    gapX: {\n      name: \"Space between columns (with unit)\",\n      type: \"textarea\"\n    },\n    gapY: {\n      name: \"Space between rows (with unit)\",\n      type: \"textarea\"\n    },\n    minW: {\n      name: \"Min width of one item\",\n      type: \"textarea\"\n    }\n  },\n  content: {\n    gapX: \"1rem\",\n    gapY: \"1rem\",\n    minW: \"250px\"\n  },\n  components: {\n    grid: []\n  },\n  html: function html(content, builder, styles, component) {\n    // debugger;\n    return \"\\n    <div class=\\\"grid\\\">\\n      \".concat(component.renderComponents(\"grid\"), \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var content = component.params.content;\n      var $el = $componentEl.find(\".grid\");\n      var contW = $el.width();\n      var calc = \"repeat(auto-fit, minmax(\".concat(content.minW, \", 1fr))\");\n      // debugger;\n      $el.css({\n        \"grid-template-columns\": calc,\n        \"row-gap\": content.gapY,\n        \"column-gap\": content.gapX\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.less\nvar resizable_grid_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.js\n\n/* harmony default export */ var _development_resizable_grid_01 = ({\n  name: \"resizable-grid-01\",\n  title: \"resizable-grid-01\",\n  deleted: true,\n  subtitle: \"\",\n  contentSetting: {\n    text: {\n      name: \"Obsah odstavce\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: 'Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, \"methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied. Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.'\n  },\n  html: function html(content, builder) {\n    return \"\\n<div class=\\\"row\\\">\\n    <div class=\\\"col-75\\\">\\n    <div class=\\\"row\\\">\\n      <div class=\\\"col resizable tx-border\\\">\\n      1\\n      <span class=\\\"resize-handler\\\"></span>\\n      </div>\\n      <div class=\\\"col resizable tx-border\\\">\\n      2\\n      <span class=\\\"resize-handler\\\"></span>\\n      </div>\\n      <div class=\\\"col resizable tx-border\\\">\\n      3\\n      <span class=\\\"resize-handler\\\"></span>\\n      </div>\\n    </div>\\n    <div class=\\\"row\\\">\\n      <div class=\\\"col-100 tx-border\\\">100%</div>\\n    </div>\\n    </div>\\n    <div class=\\\"col-25\\\">\\n    <div class=\\\"row\\\">\\n      <div class=\\\"col-100 tx-border\\\">100%</div>\\n    </div>\\n    </div>\\n</div>\\n\\n\\n\";\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n      $block.find(\".resizable\").on(\"grid:resize\", function (element, width) {\n        var fux = element;\n        $$(element).text(width);\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-01.less\nvar hdr_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-01.js\n\n/* harmony default export */ var header_hdr_01 = ({\n  name: \"hdr-01\",\n  title: \"Parallax header\",\n  subtitle: \"with overlap\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter designation\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    overlayOpacity: {\n      name: \"Strength of black overlay (%)\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    chapterTitle: \"Kapitola 1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    overlayOpacity: 30,\n    background: \"{{mediaServerDomain}}/public/ou6skmagl2xddyb761qhwzrujrn5to9qhcslut1lmbpbphuie12ls2kghhe8umgv.png\"\n  },\n  html: function html(content, builder, styles) {\n    var opacityVal = content.overlayOpacity / 100;\n    return \"\\n    <div class=\\\"paralax\\\">\\n    <div class=\\\"overlay\\\" style=\\\"opacity:\".concat(opacityVal, \"\\\">\\n    </div>\\n    <div class=\\\"header\\\" style=\\\"background-image: url(\").concat(content.background, \")\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-text\\\">\\n          <h2 class=\\\"chapter\\\" \").concat(styles.chapterTitle, \" field=\\\"author\\\">\").concat(content.chapterTitle, \"</h2>\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n    </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n\n      // $block.append(\"<h1>x</h1>\");\n      var $pageEl = builder.pageComponentContext.$el;\n      var $swiper = $pageEl.closest(\".swiper-slide\");\n      // debugger;\n\n      // $$(\".swiper-slide-active\").scroll(() => {\n      $$($swiper).scroll(function () {\n        var wScorll = $$($swiper).scrollTop();\n        // alert(wScorll);\n        $$($swiper).find(\".header-text\").css({\n          transform: \"translate(0px, -\" + wScorll / 2 + \"%)\",\n          \"z-index\": 100\n        });\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-02.less\nvar hdr_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-02.js\n\n/* harmony default export */ var header_hdr_02 = ({\n  name: \"hdr-02\",\n  title: \"Header\",\n  subtitle: \"with image on right side\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter designation\",\n      type: \"textEditor\",\n      help: \"Subtitle that appears above the main title\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    chapterTitle: \"Kapitola 1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    background: \"{{mediaServerDomain}}/public/xkazoe78dbn3wkqok67ol49yw9hsgu8vujssbz523gwjkfl243mg23ab4ltujbfb.png\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div class=\\\"header\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-text\\\">\\n          <h2 class=\\\"chapter selectable\\\" data-c=\\\"chapterTitle\\\" \".concat(styles.chapterTitle, \" field=\\\"author\\\">\").concat(content.chapterTitle, \"</h2>\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title selectable\\\" data-c=\\\"title\\\" \").concat(styles.title, \" field=\\\"\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle selectable\\\" data-c=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n        <div class=\\\"header-img\\\">\\n          <img src=\\\"\").concat(content.background, \"\\\" alt=\\\"header\\\">\\n        </div>\\n      </div>\\n    </div>\\n\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-03.less\nvar hdr_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-03.js\n\n/* harmony default export */ var header_hdr_03 = ({\n  name: \"hdr-03\",\n  title: \"Header with wavelet\",\n  subtitle: \"\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\"\n  },\n  html: function html(content, builder, styles) {\n    var opacityVal = content.overlayOpacity / 100;\n    return \"\\n    <div class=\\\"header\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-chapter\\\">\\n        <h2 class=\\\"chapter\\\" \".concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</h2>\\n        </div>\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n      <div class=\\\"wave\\\">\\n      <svg viewBox=\\\"0 0 1428 130\\\" version=\\\"1.1\\\" preserveAspectRatio=\\\"xMidYMax slice\\\">\\n        <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n          <g transform=\\\"translate(-2.000000, 0.000000)\\\" fill=\\\"#FFFFFF\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0,0 C90.7283404,0.927527913 147.912752,27.187927 291.910178,59.9119003 C387.908462,81.7278826 543.605069,89.334785 759,82.7326078 C469.336065,156.254352 216.336065,153.6679 0,74.9732496\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M100,104.708498 C277.413333,72.2345949 426.147877,52.5246657 546.203633,45.5787101 C666.259389,38.6327546 810.524845,41.7979068 979,55.0741668 C931.069965,56.122511 810.303266,74.8455141 616.699903,111.243176 C423.096539,147.640838 250.863238,145.462612 100,104.708498 Z\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M1046,51.6521276 C1130.83045,29.328812 1279.08318,17.607883 1439,40.1656806 L1439,120 C1271.17211,77.9435312 1140.17211,55.1609071 1046,51.6521276 Z\\\" id=\\\"Path-4\\\" opacity=\\\"0.200000003\\\"></path>\\n          </g>\\n          <g transform=\\\"translate(-4.000000, 26.000000)\\\" class=\\\"bottom_wave\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0.457,34.035 C57.086,53.198 98.208,65.809 123.822,71.865 C181.454,85.495 234.295,90.29 272.033,93.459 C311.355,96.759 396.635,95.801 461.025,91.663 C486.76,90.01 518.727,86.372 556.926,80.752 C595.747,74.596 622.372,70.008 636.799,66.991 C663.913,61.324 712.501,49.503 727.605,46.128 C780.47,34.317 818.839,22.532 856.324,15.904 C922.689,4.169 955.676,2.522 1011.185,0.432 C1060.705,1.477 1097.39,3.129 1121.236,5.387 C1161.703,9.219 1208.621,17.821 1235.4,22.304 C1285.855,30.748 1354.351,47.432 1440.886,72.354 L1441.191,104.352 L1.121,104.031 L0.457,34.035 Z\\\"></path>\\n          </g>\\n        </g>\\n      </svg>\\n      </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-04.less\nvar hdr_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-04.js\n\n/* harmony default export */ var header_hdr_04 = ({\n  name: \"hdr-04\",\n  title: \"Header with wavelet\",\n  subtitle: \"chapter number in a ribbon\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\"\n  },\n  html: function html(content, builder, styles) {\n    var opacityVal = content.overlayOpacity / 100;\n    return \"\\n    <div class=\\\"header\\\">\\n      <div class=\\\"container\\\">\\n        \".concat(content.chapterTitle ? \"<div class=\\\"header-chapter\\\"><span class=\\\"chapter\\\" \".concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</span></div>\") : \"\", \"\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n      <div class=\\\"wave\\\">\\n      <svg viewBox=\\\"0 0 1428 130\\\" version=\\\"1.1\\\" preserveAspectRatio=\\\"xMidYMax slice\\\">\\n        <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n          <g transform=\\\"translate(-2.000000, 0.000000)\\\" fill=\\\"#FFFFFF\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0,0 C90.7283404,0.927527913 147.912752,27.187927 291.910178,59.9119003 C387.908462,81.7278826 543.605069,89.334785 759,82.7326078 C469.336065,156.254352 216.336065,153.6679 0,74.9732496\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M100,104.708498 C277.413333,72.2345949 426.147877,52.5246657 546.203633,45.5787101 C666.259389,38.6327546 810.524845,41.7979068 979,55.0741668 C931.069965,56.122511 810.303266,74.8455141 616.699903,111.243176 C423.096539,147.640838 250.863238,145.462612 100,104.708498 Z\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M1046,51.6521276 C1130.83045,29.328812 1279.08318,17.607883 1439,40.1656806 L1439,120 C1271.17211,77.9435312 1140.17211,55.1609071 1046,51.6521276 Z\\\" id=\\\"Path-4\\\" opacity=\\\"0.200000003\\\"></path>\\n          </g>\\n          <g transform=\\\"translate(-4.000000, 26.000000)\\\" class=\\\"bottom_wave\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0.457,34.035 C57.086,53.198 98.208,65.809 123.822,71.865 C181.454,85.495 234.295,90.29 272.033,93.459 C311.355,96.759 396.635,95.801 461.025,91.663 C486.76,90.01 518.727,86.372 556.926,80.752 C595.747,74.596 622.372,70.008 636.799,66.991 C663.913,61.324 712.501,49.503 727.605,46.128 C780.47,34.317 818.839,22.532 856.324,15.904 C922.689,4.169 955.676,2.522 1011.185,0.432 C1060.705,1.477 1097.39,3.129 1121.236,5.387 C1161.703,9.219 1208.621,17.821 1235.4,22.304 C1285.855,30.748 1354.351,47.432 1440.886,72.354 L1441.191,104.352 L1.121,104.031 L0.457,34.035 Z\\\"></path>\\n          </g>\\n        </g>\\n      </svg>\\n      </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-05.less\nvar hdr_05 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-05.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-05.js\n\n/* harmony default export */ var header_hdr_05 = ({\n  name: \"hdr-05\",\n  title: \"Header with wavelet and ribbon\",\n  subtitle: \"\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    background: \"{{mediaServerDomain}}/public/ou6skmagl2xddyb761qhwzrujrn5to9qhcslut1lmbpbphuie12ls2kghhe8umgv.png\"\n  },\n  html: function html(content, builder, styles) {\n    var opacityVal = content.overlayOpacity / 100;\n    return \"\\n    <div class=\\\"header\\\" style=\\\"background-image: url(\".concat(content.background, \")\\\">\\n      <div class=\\\"container\\\">\\n        \").concat(content.chapterTitle ? \"<div class=\\\"header-chapter\\\"><span class=\\\"chapter\\\" \".concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</span></div>\") : \"\", \"\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n      <div class=\\\"wave\\\">\\n      <svg viewBox=\\\"0 0 1428 130\\\" version=\\\"1.1\\\" preserveAspectRatio=\\\"xMidYMax slice\\\">\\n        <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n          <g transform=\\\"translate(-2.000000, 0.000000)\\\" fill=\\\"#FFFFFF\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0,0 C90.7283404,0.927527913 147.912752,27.187927 291.910178,59.9119003 C387.908462,81.7278826 543.605069,89.334785 759,82.7326078 C469.336065,156.254352 216.336065,153.6679 0,74.9732496\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M100,104.708498 C277.413333,72.2345949 426.147877,52.5246657 546.203633,45.5787101 C666.259389,38.6327546 810.524845,41.7979068 979,55.0741668 C931.069965,56.122511 810.303266,74.8455141 616.699903,111.243176 C423.096539,147.640838 250.863238,145.462612 100,104.708498 Z\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M1046,51.6521276 C1130.83045,29.328812 1279.08318,17.607883 1439,40.1656806 L1439,120 C1271.17211,77.9435312 1140.17211,55.1609071 1046,51.6521276 Z\\\" id=\\\"Path-4\\\" opacity=\\\"0.200000003\\\"></path>\\n          </g>\\n          <g transform=\\\"translate(-4.000000, 26.000000)\\\" class=\\\"bottom_wave\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0.457,34.035 C57.086,53.198 98.208,65.809 123.822,71.865 C181.454,85.495 234.295,90.29 272.033,93.459 C311.355,96.759 396.635,95.801 461.025,91.663 C486.76,90.01 518.727,86.372 556.926,80.752 C595.747,74.596 622.372,70.008 636.799,66.991 C663.913,61.324 712.501,49.503 727.605,46.128 C780.47,34.317 818.839,22.532 856.324,15.904 C922.689,4.169 955.676,2.522 1011.185,0.432 C1060.705,1.477 1097.39,3.129 1121.236,5.387 C1161.703,9.219 1208.621,17.821 1235.4,22.304 C1285.855,30.748 1354.351,47.432 1440.886,72.354 L1441.191,104.352 L1.121,104.031 L0.457,34.035 Z\\\"></path>\\n          </g>\\n        </g>\\n      </svg>\\n      </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-06.less\nvar hdr_06 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-06.less\");\n\n// EXTERNAL MODULE: ./node_modules/particles.js/particles.js\nvar particles = __webpack_require__(\"./node_modules/particles.js/particles.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/particleSettings.js\nvar merge = __webpack_require__(/*! lodash.merge */ \"./node_modules/lodash.merge/index.js\");\nvar particleSettings_settings = {\n  \"particles\": {\n    \"number\": {\n      \"value\": 80,\n      \"density\": {\n        \"enable\": true,\n        \"value_area\": 800\n      }\n    },\n    \"color\": {\n      \"value\": \"#ffffff\"\n    },\n    \"shape\": {\n      \"type\": \"circle\",\n      \"stroke\": {\n        \"width\": 0,\n        \"color\": \"#000000\"\n      },\n      \"polygon\": {\n        \"nb_sides\": 5\n      },\n      \"image\": {\n        \"src\": \"server-svgrepo-com.svg\",\n        \"width\": 100,\n        \"height\": 100\n      }\n    },\n    \"opacity\": {\n      \"value\": 0.5,\n      \"random\": false,\n      \"anim\": {\n        \"enable\": false,\n        \"speed\": 1,\n        \"opacity_min\": 0.1,\n        \"sync\": false\n      }\n    },\n    \"size\": {\n      \"value\": 6,\n      \"random\": true,\n      \"anim\": {\n        \"enable\": false,\n        \"speed\": 40,\n        \"size_min\": 0.1,\n        \"sync\": false\n      }\n    },\n    \"line_linked\": {\n      \"enable\": true,\n      \"distance\": 150,\n      \"color\": \"#ffffff\",\n      \"opacity\": 0.4,\n      \"width\": 1\n    },\n    \"move\": {\n      \"enable\": true,\n      \"speed\": 4,\n      \"direction\": \"none\",\n      \"random\": false,\n      \"straight\": false,\n      \"out_mode\": \"out\",\n      \"bounce\": false,\n      \"attract\": {\n        \"enable\": false,\n        \"rotateX\": 600,\n        \"rotateY\": 1200\n      }\n    }\n  },\n  \"interactivity\": {\n    \"detect_on\": \"canvas\",\n    \"events\": {\n      \"onhover\": {\n        \"enable\": false,\n        \"mode\": \"repulse\"\n      },\n      \"onclick\": {\n        \"enable\": true,\n        \"mode\": \"push\"\n      },\n      \"resize\": true\n    },\n    \"modes\": {\n      \"grab\": {\n        \"distance\": 400,\n        \"line_linked\": {\n          \"opacity\": 1\n        }\n      },\n      \"bubble\": {\n        \"distance\": 400,\n        \"size\": 40,\n        \"duration\": 2,\n        \"opacity\": 8,\n        \"speed\": 3\n      },\n      \"repulse\": {\n        \"distance\": 200,\n        \"duration\": 0.4\n      },\n      \"push\": {\n        \"particles_nb\": 4\n      },\n      \"remove\": {\n        \"particles_nb\": 2\n      }\n    }\n  },\n  \"retina_detect\": true\n};\nfunction getSettings(dataOverride) {\n  return merge(particleSettings_settings, dataOverride);\n}\n/* harmony default export */ var particleSettings = (getSettings);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-06.js\n\n\n\n/* harmony default export */ var header_hdr_06 = ({\n  name: \"hdr-06\",\n  title: \"Header with animations\",\n  subtitle: \"\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\"\n  },\n  html: function html(content, component, styles) {\n    // debugger\n    var opacityVal = content.overlayOpacity / 100;\n    return \"\\n    <div class=\\\"header\\\" id=\\\"particles-js-\".concat(component.id, \"\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-chapter\\\">\\n        <h2 class=\\\"chapter\\\" \").concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</h2>\\n        </div>\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n      <div class=\\\"wave\\\">\\n      <svg viewBox=\\\"0 0 1428 130\\\" version=\\\"1.1\\\" preserveAspectRatio=\\\"xMidYMax slice\\\">\\n        <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n          <g transform=\\\"translate(-2.000000, 0.000000)\\\" fill=\\\"#FFFFFF\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0,0 C90.7283404,0.927527913 147.912752,27.187927 291.910178,59.9119003 C387.908462,81.7278826 543.605069,89.334785 759,82.7326078 C469.336065,156.254352 216.336065,153.6679 0,74.9732496\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M100,104.708498 C277.413333,72.2345949 426.147877,52.5246657 546.203633,45.5787101 C666.259389,38.6327546 810.524845,41.7979068 979,55.0741668 C931.069965,56.122511 810.303266,74.8455141 616.699903,111.243176 C423.096539,147.640838 250.863238,145.462612 100,104.708498 Z\\\" opacity=\\\"0.100000001\\\"></path>\\n            <path d=\\\"M1046,51.6521276 C1130.83045,29.328812 1279.08318,17.607883 1439,40.1656806 L1439,120 C1271.17211,77.9435312 1140.17211,55.1609071 1046,51.6521276 Z\\\" id=\\\"Path-4\\\" opacity=\\\"0.200000003\\\"></path>\\n          </g>\\n          <g transform=\\\"translate(-4.000000, 26.000000)\\\" class=\\\"bottom_wave\\\" fill-rule=\\\"nonzero\\\">\\n            <path d=\\\"M0.457,34.035 C57.086,53.198 98.208,65.809 123.822,71.865 C181.454,85.495 234.295,90.29 272.033,93.459 C311.355,96.759 396.635,95.801 461.025,91.663 C486.76,90.01 518.727,86.372 556.926,80.752 C595.747,74.596 622.372,70.008 636.799,66.991 C663.913,61.324 712.501,49.503 727.605,46.128 C780.47,34.317 818.839,22.532 856.324,15.904 C922.689,4.169 955.676,2.522 1011.185,0.432 C1060.705,1.477 1097.39,3.129 1121.236,5.387 C1161.703,9.219 1208.621,17.821 1235.4,22.304 C1285.855,30.748 1354.351,47.432 1440.886,72.354 L1441.191,104.352 L1.121,104.031 L0.457,34.035 Z\\\"></path>\\n          </g>\\n        </g>\\n      </svg>\\n      </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      // debugger\n      var $block = builderEl;\n      $block.find(\".header\");\n      particlesJS(\"particles-js-\" + component.params.id, particleSettings());\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-07.less\nvar hdr_07 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-07.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-07.js\n\n/* harmony default export */ var header_hdr_07 = ({\n  name: \"hdr-07\",\n  title: \"Header 7\",\n  subtitle: \"Header with transition and overlap\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\"\n  },\n  html: function html(content, component, styles) {\n    return \"\\n    <div class=\\\"header\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-chapter\\\">\\n        <h2 class=\\\"chapter\\\" \".concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</h2>\\n        </div>\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n    </div>\\n    <div class=\\\"hdr-bg-page\\\"></div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      // debugger\n      // let $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-08.less\nvar hdr_08 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-08.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-08.js\n\n/* harmony default export */ var header_hdr_08 = ({\n  name: \"hdr-08\",\n  title: \"Header 8\",\n  subtitle: \"Header with transition and overlap\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter designation\",\n      type: \"textEditor\",\n      help: \"Subtitle that appears above the main title\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Background image\",\n      type: \"image\"\n    },\n    rightImage: {\n      name: \"Right image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    chapterTitle: \"Kapitola 1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    background: \"{{mediaServerDomain}}/public/xkazoe78dbn3wkqok67ol49yw9hsgu8vujssbz523gwjkfl243mg23ab4ltujbfb.png\",\n    rightImage: \"{{mediaServerDomain}}/public/xkazoe78dbn3wkqok67ol49yw9hsgu8vujssbz523gwjkfl243mg23ab4ltujbfb.png\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div class=\\\"header\\\" style=\\\"--background: url(\".concat(content.background, \")\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-text\\\">\\n          <h2 class=\\\"chapter selectable\\\" data-c=\\\"chapterTitle\\\" \").concat(styles.chapterTitle, \" field=\\\"author\\\">\").concat(content.chapterTitle, \"</h2>\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title selectable\\\" data-c=\\\"title\\\" \").concat(styles.title, \" field=\\\"\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle selectable\\\" data-c=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n        <div class=\\\"header-img\\\">\\n          <img src=\\\"\").concat(content.rightImage, \"\\\" alt=\\\"header\\\">\\n        </div>\\n      </div>\\n    </div>\\n\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-09.less\nvar hdr_09 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-09.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-09.js\n\n/* harmony default export */ var header_hdr_09 = ({\n  name: \"hdr-09\",\n  title: \"Header 9\",\n  subtitle: \"Header with transition and overlap\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Background image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    background: \"{{mediaServerDomain}}/public/xkazoe78dbn3wkqok67ol49yw9hsgu8vujssbz523gwjkfl243mg23ab4ltujbfb.png\"\n  },\n  html: function html(content, component, styles) {\n    return \"\\n    <div class=\\\"header\\\">\\n      <div class=\\\"container\\\">\\n        <div class=\\\"header-chapter\\\">\\n        <h2 class=\\\"chapter\\\" \".concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</h2>\\n        </div>\\n        <div class=\\\"header-text\\\">\\n          <div class=\\\"title-container\\\">\\n            <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n          </div>\\n          <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n        </div>\\n      </div>\\n      <img src=\\\"\").concat(content.background, \"\\\" class=\\\"img-background\\\">\\n    </div>\\n    <div class=\\\"hdr-bg-page\\\"></div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      // debugger\n      // let $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-10.less\nvar hdr_10 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/header/hdr-10.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/header/hdr-10.js\n\n/* harmony default export */ var header_hdr_10 = ({\n  name: \"hdr-10\",\n  title: \"Header 10\",\n  subtitle: \"Header with side color transition\",\n  contentSetting: {\n    chapterTitle: {\n      name: \"Chapter number\",\n      type: \"textEditor\"\n    },\n    title: {\n      name: \"Main title\",\n      type: \"textEditor\"\n    },\n    subtitle: {\n      name: \"Subtitle\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    background: {\n      name: \"Background image\",\n      type: \"image\"\n    },\n    color: {\n      name: \"Color transition\",\n      type: \"color\"\n    }\n  },\n  content: {\n    chapterTitle: \"1\",\n    title: \"Ukázková kapitola\",\n    subtitle: \"Podnadpis kapitoly\",\n    background: \"{{mediaServerDomain}}/public/xkazoe78dbn3wkqok67ol49yw9hsgu8vujssbz523gwjkfl243mg23ab4ltujbfb.png\",\n    color: \"#5d469eff\"\n  },\n  html: function html(content, component, styles) {\n    return \"\\n    <div class=\\\"header\\\" style=\\\"background-color: \".concat(content.color, \";\\\">\\n      <div class=\\\"container\\\" style=\\\"background-image: url(\").concat(content.background, \")\\\">\\n      <div class=\\\"inner\\\">\\n        <h2 class=\\\"chapter\\\" \").concat(styles.chapterTitle, \" field=\\\"chapter\\\">\").concat(content.chapterTitle, \"</h2>\\n        <h1 class=\\\"title\\\" \").concat(styles.title, \" field=\\\"head\\\">\").concat(content.title, \"</h1>\\n        <h3 class=\\\"subtitle\\\" \").concat(styles.subtitle, \" field=\\\"subhead\\\">\").concat(content.subtitle, \"</h3>\\n      </div>\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      // debugger\n      // let $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/video-player/vp-01.less\nvar vp_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/video-player/vp-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/video-player/vp-utils.js\nfunction vp_utils_getRef() {\n  var _this = this;\n  var refArray = [];\n  var components = this.getPageComponentsReference();\n  var chapter = this.chapterReference;\n  var counter = 1;\n  var flag = true;\n  components.forEach(function (el, index) {\n    if (el.params.id == _this.params.id) {\n      flag = false;\n      return;\n    }\n    var methods = el.params.methods;\n    if (methods && methods.hasOwnProperty(\"getVideosReference\") && flag) {\n      counter++;\n    }\n  });\n  var chapterNumber = \"\";\n  var numbered = true;\n  if (chapter.isNumbered) {\n    chapterNumber = chapter.number;\n  } else {\n    chapterNumber = chapter.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") + \".\";\n    numbered = false;\n  }\n  var video = this.params.content;\n  var refObj = {};\n  refObj[\"string\"] = chapterNumber + counter;\n  refObj[\"title\"] = video.title;\n  refObj[\"id\"] = this.params.id;\n  refObj[\"chapterName\"] = chapter.name;\n  refObj[\"chapterLink\"] = chapter.fullPath;\n  refObj[\"isNumbered\"] = numbered;\n  refArray.push(refObj);\n  return refArray;\n}\n\n// EXTERNAL MODULE: ./node_modules/video.js/dist/video.es.js\nvar video_es = __webpack_require__(\"./node_modules/video.js/dist/video.es.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/video-player/vp-01.js\n\n\n\n/* harmony default export */ var video_player_vp_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"vp-01\",\n  title: \"Video\",\n  group: \"video\",\n  subtitle: \"Video player\",\n  contentSetting: {\n    showNumbering: {\n      name: \"Show numbering in video title\",\n      type: \"bool\"\n    },\n    title: {\n      name: \"Video title\",\n      type: \"textEditor\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      help: \"In format like 16:9,4:3 ...\",\n      type: \"textarea\"\n    },\n    muted: {\n      name: \"Play video with muted sound?\",\n      type: \"bool\"\n    },\n    path: {\n      name: \"Video file\",\n      type: \"video\"\n    },\n    thumbnail: {\n      name: \"Thumbnail\",\n      type: \"image\"\n    }\n  },\n  content: {\n    path: \"{{mediaServerDomain}}/public/rjnh650bp6ih4ndma4f6lqq5oycc2b50hl96wtazuv2bb6rkin0qd4c928f3ujtm.m3u8\",\n    title: \"Video 1\",\n    thumbnail: \"{{mediaServerDomain}}/public/3uc48wpl99brr32nkm6xbjss51k1ba9iuwc8ja3h3tepcd79i3zdaz7c15qyo4ar.png\",\n    showNumbering: false,\n    aspectRatio: \"16:9\",\n    muted: false\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var ref = component.params.methods.getVideosReference();\n    // debugger;\n    return \"\\n    <div key=\\\"vp0\\\" class=\\\"video-player-container\\\" data-src>\\n\\n         <div class=\\\"video-wrapper\\\" id=\\\"video1\\\" data-src=\\\"\".concat(content.path, \"\\\"  \").concat(content.thumbnail.length > 0 ? \"data-poster=\\\"\".concat(content.thumbnail, \"\\\"\") : \"\", \">\\n        </div>\\n        <div class=\\\"title\\\">\").concat(content.showNumbering ? ref[0].string + \": \" : \"\").concat(content.title, \"</div>\\n\\n\\n    </div>\\n           \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var content = builder.params.content;\n      var $videoWrapper = $builderEl.find(\"#video1\");\n      builder.app.videoPlayer.createVideoPlayer($videoWrapper);\n      var el = $videoWrapper.find(\"video\")[0];\n      var ref = Object(video_es[\"default\"])(el);\n      // debugger;\n      ref.aspectRatio(content.aspectRatio);\n      if (content.muted) {\n        ref.muted(true);\n      }\n    },\n    update: function update($builderEl, builder) {\n      // let id = \"video-\" + $builderEl.attr(\"id\");\n      // app.videoPlayer.createVideoPlayer(id);\n    }\n  },\n  methods: {\n    getVideosReference: function getVideosReference() {\n      return vp_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/contract/con-01.less\nvar con_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/contract/con-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/contract/con-01.js\n\nvar con_01_myoBj;\n/* harmony default export */ var contract_con_01 = (con_01_myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"con-01\",\n  title: \"Adding text to sentences\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    sentences: {\n      name: \"Sentences parameters\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Sentence text (BEFORE field for answer)\",\n          type: \"textEditor\"\n        },\n        textAfterInput: {\n          name: \"Sentence text (AFTER field for answer)\",\n          type: \"textEditor\"\n        },\n        input: {\n          name: \"Length of the answer field\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"{{position}} Odstavec do kter\\xE9ho jde doplnit vlastn\\xED pole.\",\n    diacritics: true,\n    uppercase: false,\n    spaces: false,\n    text: \"ano\",\n    points: true,\n    sentences: [{\n      text: \"M\\xE1me klienta a chce vlo\\u017Eit  \",\n      textAfterInput: \" bitcoin\\u016F.\",\n      input: 15,\n      correctAnswers: []\n    }]\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n      \").concat(content.sentences.map(function (data) {\n      return \"\\n    <span class=\\\"inp-text\\\">\\n    \".concat(data.text).concat(data.input ? \"<span class=\\\"ce\\\" contenteditable=\\\"true\\\" style=\\\"min-width: \".concat(data.input * 7, \"px \\\"> </span>\") : \"\").concat(data.textAfterInput, \"\\n    </span>\\n          \");\n    }).join(\"\"), \"\\n  \\n            \");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      // $builderEl.find('.item-title').off('click').on('click', function () {\n      //   alert('ok2')\n      // })\n    },\n    update: function update($builderEl, component) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/list/li-01.less\nvar li_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/list/li-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/list/li-01.js\nfunction li_01_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = li_01_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction li_01_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return li_01_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? li_01_arrayLikeToArray(r, a) : void 0; } }\nfunction li_01_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n/* harmony default export */ var list_li_01 = ({\n  name: \"li-01\",\n  title: \"List\",\n  subtitle: \"with bullets\",\n  contentSetting: {\n    select: {\n      name: \"Type of bullets\",\n      type: \"select\",\n      options: [{\n        title: \"circles\",\n        value: \"circle-list\"\n      }, {\n        title: \"squares\",\n        value: \"square-list\"\n      }, {\n        title: \"pointy\",\n        value: \"pointy-bracket-list\"\n      }, {\n        title: \"straight\",\n        value: \"left-border-list\"\n      }]\n    },\n    list: {\n      name: \"List items\",\n      type: \"array\",\n      values: {\n        // id: {\n        //   name: 'ID položky',\n        //   type: 'input-number'\n        // }\n      }\n    }\n  },\n  content: {\n    select: {\n      selected: \"circle-list\"\n    },\n    list: [{\n      id: \"1\"\n    }, {\n      id: \"2\"\n    }]\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\",\n    x1: \"basicGroup\",\n    x2: \"basicGroup\"\n  },\n  components: {\n    x0: [],\n    x1: [],\n    x3: []\n  },\n  html: function html(content, builder, styles, component) {\n    var texts = \"\";\n    var index = 0;\n    var key = \"\";\n    var _iterator = li_01_createForOfIteratorHelper(content.list),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var txt = _step.value;\n        key = \"x\" + txt.id;\n        // key = \"x\" + index;\n        texts += \" <li>\".concat(component.renderComponents(key), \"</li>\");\n        index++;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    return \"\\n  <div class=\\\"list-container\\\">\\n    <ul class=\\\"\".concat(content.select.selected, \"\\\">\\n    \").concat(texts, \"\\n    </ul>\\n  </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/list/li-02.less\nvar li_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/list/li-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/list/li-02.js\nfunction li_02_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = li_02_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction li_02_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return li_02_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? li_02_arrayLikeToArray(r, a) : void 0; } }\nfunction li_02_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n/* harmony default export */ var list_li_02 = ({\n  name: \"li-02\",\n  title: \"Numbered list\",\n  subtitle: \"\",\n  contentSetting: {\n    starts: {\n      name: \"Beginning of numbering\",\n      type: \"input-number\"\n    },\n    select: {\n      name: \"Numbering type\",\n      type: \"select\",\n      options: [{\n        title: \"number with dot\",\n        value: \"classic-list\"\n      }, {\n        title: \"letter with dot\",\n        value: \"letter-list\"\n      }, {\n        title: \"number with bracket\",\n        value: \"classic-bracket-list\"\n      }, {\n        title: \"letter with bracket\",\n        value: \"letter-bracket-list\"\n      }, {\n        title: \"number in circle\",\n        value: \"circle-number-list\"\n      }, {\n        title: \"letter in circle\",\n        value: \"circle-letter-list\"\n      }, {\n        title: \"number in square\",\n        value: \"square-number-list\"\n      }, {\n        title: \"letter in square\",\n        value: \"square-letter-list\"\n      }]\n    },\n    list: {\n      name: \"List items\",\n      type: \"array\",\n      nested: true,\n      values: {\n        text: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  // componentsAllowedGroup: {\n  //   x0: 'basicGroup',\n  //   x1 : 'basicGroup'\n  // },\n  //   components: {\n  //   x0: [],\n  //   x1: []\n  // },\n  content: {\n    select: {\n      selected: \"classic-list\"\n    },\n    list: [{\n      text: \"Položka listu 1\"\n    }, {\n      text: \"Položka listu 2\"\n    }],\n    starts: 1\n  },\n  html: function html(content, builder, styles, component) {\n    var texts = \"\";\n    var index = 0;\n    var key = \"\";\n    var _iterator = li_02_createForOfIteratorHelper(content.list),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var txt = _step.value;\n        key = \"x\" + index;\n        texts += \" <li>\".concat(component.renderComponents(key), \"</li>\");\n        index++;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    return \"\\n  <div class=\\\"list-container\\\" >\\n    <ul class=\\\"\".concat(content.select.selected, \"\\\" style=\\\"counter-reset: list-counter \").concat(content.starts - 1, \"\\\">\\n    \").concat(texts, \"\\n    </ul>\\n  </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/cover/cover-01.less\nvar cover_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/cover/cover-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/cover/cover-01.js\n\n/* harmony default export */ var cover_cover_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"cover-01\",\n  title: \"Cover 1\",\n  subtitle: \"Cover of the book\",\n  contentSetting: {\n    cover: {\n      path: {\n        name: \"Image\",\n        type: \"image\"\n      }\n    }\n  },\n  content: {\n    cover: {\n      path: \"{{mediaServerDomain}}/public/9mfyrvy2tu35cz2us7r1sfhgkn3fji95vc7gdpjpjxd37z4bvp5cp7mf7buv3s8b.png\"\n    }\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n            <div class=\\\"cover-container\\\">\\n              <img class=\\\"cover open-gallery\\\" src=\\\"\".concat(content.cover.path, \"\\\">\\n            </div>\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $block = $builderEl;\n      // alert(builder.params.id);\n      $block.find(\"img\").off(\"click\").off(\"click\").on(\"click\", function () {\n        // alert(\"img\");\n      });\n\n      // alert('gl');\n    },\n    update: function update($builderEl, builder) {\n      // alert(\"builder \"+builder.name +\"updated\");\n\n      $builderEl.find(\"img\").off(\"click\").on(\"click\", function () {\n        // alert(\"img\");\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/citations/cit-01.less\nvar cit_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/citations/cit-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/citations/cit-01.js\n\n/* harmony default export */ var citations_cit_01 = ({\n  name: \"cit-01\",\n  title: \"Citations list\",\n  subtitle: \"Draws a list of citations used in the book\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    sortOrder: {\n      name: \"Sort by\",\n      type: \"select\",\n      options: [{\n        title: \"Alphabetical\",\n        value: \"alpha\"\n      }, {\n        title: \"ID (by created position)\",\n        value: \"id\"\n      }]\n    },\n    showRanges: {\n      name: \"Show range citations?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"Citace\",\n    sortOrder: \"alpha\",\n    showRanges: false\n  },\n  html: function html(content, builder, styles, component) {\n    //let citationList = JSON.parse(localStorage.getItem(\"citationList\"));\n    var citationList = component.app.citations.params.data;\n    var citations = component.app.citations;\n    var citationString = [];\n    if (!citationList) {\n      citationList = [];\n    }\n    //debugger\n    citationList.forEach(function (element) {\n      if (!element.deleted) {\n        if (!(!content.showRanges && (element.type === \"range\" || element.hasOwnProperty(\"range\") && element.type != \"periodical\"))) {\n          var str = citations.createCitationString(element.id, true);\n          var cleanValue = str.replace(/<\\/?[^>]+(>|$)/g, \"\");\n          var obj = {\n            str: str,\n            cleanValue: cleanValue\n          };\n          citationString.push(obj);\n        }\n      }\n    });\n    var t = citationString;\n    if (content.sortOrder === \"alpha\") {\n      citationString.sort(function (a, b) {\n        return a.cleanValue.localeCompare(b.cleanValue);\n      });\n    }\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    <div class=\\\"\\\">\\n        <ul>\\n        \").concat(citationString.map(function (data) {\n      return \"\\n            <li>\\n                   \".concat(data.str, \"\\n            </li>\\n        \");\n    }).join(\"\"), \"\\n        </ul>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-01.less\nvar contents_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/contents/contents-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-01.js\n\n/* harmony default export */ var contents_contents_01 = ({\n  name: \"contents-01\",\n  title: \"Content\",\n  subtitle: \"\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    heading: \"Obsah\"\n  },\n  html: function html(content, builder, styles, component) {\n    var contents = component.app.book.getBookChaptersTree();\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    \").concat(builder.renderContent(contents), \"\\n    \");\n  },\n  renderContent: function renderContent(contents) {\n    var chapterName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"nic\";\n    var el = \"<ul class=\\\"content-list\\\" data-parentname=\\\"\".concat(chapterName, \"\\\">\");\n    var self = this;\n    contents = _.sortBy(contents, \"position\");\n    contents.forEach(function (chapter) {\n      if (chapter.name != \"Prázdná\") {\n        //otevření li\n        el += \"\\n            <li>\\n              <a class=\\\"navigate link prevent-router route\\\" href=\\\"\".concat(chapter.fullPath, \"\\\">\").concat(chapter.name, \"</a>\\n            \");\n      }\n      //vyrenderování kotev\n\n      if (chapter.anchors && chapter.anchors.length > 0) {\n        el += \"<ul class=\\\"content-list anchors-list\\\">\";\n        chapter.anchors.forEach(function (anchor, index) {\n          if (!anchor.deleted) {\n            el += \"<li>\\n              <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(chapter.fullPath, \"\\\" data-scroll-to=\\\"#\").concat(anchor.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(anchor.name, \"</a>\\n              </li>\\n            \");\n          }\n        });\n        el += \"</ul>\";\n      }\n      //konec vyrenderování kotev\n\n      //vyrenderování pod-route\n\n      if (chapter.routes && chapter.routes.length > 0) {\n        el += self.renderContent(chapter.routes, chapter.name);\n      }\n      //konec vyrenderování pod-route\n\n      //zavření li\n      el += \"</li>\";\n    });\n    el += \"</ul>\";\n    return el;\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-02.less\nvar contents_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/contents/contents-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-02.js\n\n/* harmony default export */ var contents_contents_02 = ({\n  name: \"contents-02\",\n  title: \"Content\",\n  subtitle: \"main section in card\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    heading: \"Obsah\"\n  },\n  html: function html(content, builder, styles, component) {\n    var contents = component.app.book.getBookChaptersTree();\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    \").concat(builder.renderContent(contents), \"\\n    \");\n  },\n  renderContent: function renderContent(contents) {\n    var chapterName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"nic\";\n    var el = \"<ul class=\\\"content-list\\\" data-parentname=\\\"\".concat(chapterName, \"\\\">\");\n    var self = this;\n    contents = _.sortBy(contents, \"position\");\n    contents.forEach(function (chapter) {\n      if (chapter.name != \"Prázdná\") {\n        //otevření li\n        el += \"\\n            <li>\\n              <a class=\\\"navigate link prevent-router route\\\" href=\\\"\".concat(chapter.fullPath, \"\\\">\").concat(chapter.name, \"</a>\\n            \");\n      }\n      //vyrenderování kotev\n\n      if (chapter.anchors && chapter.anchors.length > 0) {\n        el += \"<ul class=\\\"content-list anchors-list\\\">\";\n        chapter.anchors.forEach(function (anchor, index) {\n          if (!anchor.deleted) {\n            el += \"<li>\\n              <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(chapter.fullPath, \"\\\" data-scroll-to=\\\"#\").concat(anchor.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(anchor.name, \"</a>\\n              </li>\\n            \");\n          }\n        });\n        el += \"</ul>\";\n      }\n      //konec vyrenderování kotev\n\n      //vyrenderování pod-route\n\n      if (chapter.routes && chapter.routes.length > 0) {\n        el += self.renderContent(chapter.routes, chapter.name);\n      }\n      //konec vyrenderování pod-route\n\n      //zavření li\n      el += \"</li>\";\n    });\n    el += \"</ul>\";\n    return el;\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-03.less\nvar contents_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/contents/contents-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/contents/contents-03.js\n\n/* harmony default export */ var contents_contents_03 = ({\n  name: \"contents-03\",\n  title: \"Content\",\n  subtitle: \"with numbering\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    heading: \"Obsah\"\n  },\n  html: function html(content, builder, styles, component) {\n    var contents = component.app.book.getBookChaptersTree();\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    \").concat(builder.renderContent(contents), \"\\n    \");\n  },\n  renderContent: function renderContent(contents) {\n    var chapterName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"nic\";\n    var el = \"<ul class=\\\"content-list\\\" data-parentname=\\\"\".concat(chapterName, \"\\\">\");\n    var self = this;\n    // debugger;\n    contents = _.sortBy(contents, \"position\");\n    contents.forEach(function (chapter) {\n      if (chapter.name != \"Prázdná\") {\n        //otevření li\n\n        if (chapter.nameNumber) {\n          chapter.nameNumber = chapter.nameNumber.replace(/\\.\\s*$/, \"\");\n          var firstLevelClass = \"\";\n          if (!chapter.level || chapter.level === 1) {\n            firstLevelClass = \"first-level\";\n            el += \"<li>\";\n            el += \"<span class=\\\"number \".concat(firstLevelClass, \"\\\">\").concat(chapter.nameNumber, \"</span> \");\n          } else {\n            if (chapter.nameNumber.includes(\".\")) {\n              el += \"<li>\";\n              el += \"<div class=\\\"li-with-single-number\\\">\";\n              el += \"<span class=\\\"number\\\">\".concat(chapter.nameNumber ? chapter.nameNumber : \"\", \"</span>\");\n            }\n          }\n        } else {\n          el += \"<li>\";\n        }\n        el += \"<a class=\\\"navigate link prevent-router route\\\" href=\\\"\".concat(chapter.fullPath, \"\\\">\").concat(chapter.nameNumber && !chapter.nameNumber.includes(\".\") && !(!chapter.level || chapter.level === 1) ? chapter.nameNumber : \"\").concat(chapter.nameText, \"</a>\");\n        if (chapter.nameNumber && chapter.nameNumber.includes(\".\")) {\n          el += \"</div>\"; // close <div class=\"li-with-single-number\">\n        }\n      }\n      //vyrenderování kotev\n\n      if (chapter.anchors && chapter.anchors.length > 0) {\n        el += \"<ul class=\\\"content-list anchors-list\\\">\";\n        chapter.anchors.forEach(function (anchor, index) {\n          if (!anchor.deleted) {\n            el += \"<li>\";\n            if (anchor.nameNumber && anchor.nameNumber.includes(\".\")) {\n              anchor.nameNumber = anchor.nameNumber.replace(/\\.\\s*$/, \"\");\n              el += \"<span class=\\\"number\\\">\".concat(anchor.nameNumber, \"</span> \");\n            }\n            el += \"\\n               <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(chapter.fullPath, \"\\\" data-scroll-to=\\\"#\").concat(anchor.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\\n               \").concat(anchor.nameNumber && !anchor.nameNumber.includes(\".\") ? anchor.nameNumber : \"\", \"\\n               \").concat(anchor.nameText, \"\\n               </a>\\n              </li>\\n            \");\n            el += \"</li>\";\n          }\n        });\n        el += \"</ul>\";\n      }\n      //konec vyrenderování kotev\n\n      //vyrenderování pod-route\n\n      if (chapter.routes && chapter.routes.length > 0) {\n        el += self.renderContent(chapter.routes, chapter.name);\n      }\n      //konec vyrenderování pod-route\n\n      //zavření li\n      el += \"</li>\";\n    });\n    el += \"</ul>\";\n    return el;\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js\nvar nr_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js\nvar nr_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js\nvar nr_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js\");\n\n// CONCATENATED MODULE: ./node_modules/piano-chart/piano-chart.esm.js\nconst piano_chart_esm_t={},piano_chart_esm_e=[];function piano_chart_esm_i(e,n){if(Array.isArray(e))for(const t of e)piano_chart_esm_i(t,n);else if(\"object\"!=typeof e)piano_chart_esm_s(Object.getOwnPropertyNames(n)),piano_chart_esm_t[e]=Object.assign(piano_chart_esm_t[e]||{},n);else for(const t in e)piano_chart_esm_i(t,e[t])}function piano_chart_esm_n(e){return piano_chart_esm_t[e]||{}}function piano_chart_esm_s(t){piano_chart_esm_e.push(...t)}function piano_chart_esm_r(t,e){var i,n=t.length,s=[];for(i=0;i<n;i++)s.push(e(t[i]));return s}function piano_chart_esm_h(t){return t%360*Math.PI/180}function piano_chart_esm_o(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function piano_chart_esm_a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function piano_chart_esm_u(t,e,i,n){return null!=e&&null!=i||(n=n||t.bbox(),null==e?e=n.width/n.height*i:null==i&&(i=n.height/n.width*e)),{width:e,height:i}}function piano_chart_esm_l(t,e){const i=t.origin;let n,s;if(\"string\"==typeof i||null==i){const r=(i||\"center\").toLowerCase().trim(),{height:h,width:o,x:a,y:u}=e.bbox(),l=r.includes(\"left\")?a:r.includes(\"right\")?a+o:a+o/2,c=r.includes(\"top\")?u:r.includes(\"bottom\")?u+h:u+h/2;n=null!=t.ox?t.ox:l,s=null!=t.oy?t.oy:c}else n=i[0],s=i[1];return[n,s]}const piano_chart_esm_c=\"http://www.w3.org/2000/svg\",piano_chart_esm_d=\"http://www.w3.org/2000/xmlns/\",piano_chart_esm_f=\"http://www.w3.org/1999/xlink\",piano_chart_esm_p={window:\"undefined\"==typeof window?null:window,document:\"undefined\"==typeof document?null:document};class piano_chart_esm_m{}const piano_chart_esm_y={},piano_chart_esm_g=\"___SYMBOL___ROOT___\";function piano_chart_esm_v(t){return piano_chart_esm_p.document.createElementNS(piano_chart_esm_c,t)}function piano_chart_esm_(t){if(t instanceof piano_chart_esm_m)return t;if(\"object\"==typeof t)return piano_chart_esm_x(t);if(null==t)return new piano_chart_esm_y[piano_chart_esm_g];if(\"string\"==typeof t&&\"<\"!==t.charAt(0))return piano_chart_esm_x(piano_chart_esm_p.document.querySelector(t));var e=piano_chart_esm_v(\"svg\");return e.innerHTML=t,t=piano_chart_esm_x(e.firstChild)}function piano_chart_esm_w(t,e){return e instanceof piano_chart_esm_p.window.Node?e:piano_chart_esm_v(t)}function piano_chart_esm_b(t){if(!t)return null;if(t.instance instanceof piano_chart_esm_m)return t.instance;var e=piano_chart_esm_a(t.nodeName||\"Dom\");return\"LinearGradient\"===e||\"RadialGradient\"===e?e=\"Gradient\":piano_chart_esm_y[e]||(e=\"Dom\"),new piano_chart_esm_y[e](t)}let piano_chart_esm_x=piano_chart_esm_b;function piano_chart_esm_O(t,e=t.name,i=!1){return piano_chart_esm_y[e]=t,i&&(piano_chart_esm_y[piano_chart_esm_g]=t),piano_chart_esm_s(Object.getOwnPropertyNames(t.prototype)),t}let piano_chart_esm_N=1e3;function piano_chart_esm_S(t){return\"Svgjs\"+piano_chart_esm_a(t)+piano_chart_esm_N++}function piano_chart_esm_k(t,e,i){var n,s;for(s=(t=Array.isArray(t)?t:[t]).length-1;s>=0;s--)for(n in e){let r=e[n];i&&(r=piano_chart_esm_T(e[n])),t[s].prototype[n]=r}}function piano_chart_esm_T(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}piano_chart_esm_i(\"Dom\",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),\"function\"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return t>0&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),\"function\"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(t){(t=piano_chart_esm_(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=piano_chart_esm_(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=piano_chart_esm_(t)).before(this),this},insertAfter:function(t){return(t=piano_chart_esm_(t)).after(this),this}});const piano_chart_esm_M=/^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i,piano_chart_esm_A=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i,piano_chart_esm_C=/rgb\\((\\d+),(\\d+),(\\d+)\\)/,piano_chart_esm_E=/(#[a-z0-9\\-_]+)/i,piano_chart_esm_I=/\\)\\s*,?\\s*/,piano_chart_esm_j=/\\s/g,piano_chart_esm_L=/^#[a-f0-9]{3,6}$/i,piano_chart_esm_H=/^rgb\\(/,piano_chart_esm_D=/^(\\s+)?$/,piano_chart_esm_z=/^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,piano_chart_esm_P=/\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i,piano_chart_esm_R=/[\\s,]+/,piano_chart_esm_K=/([^e])-/gi,piano_chart_esm_F=/[MLHVCSQTAZ]/gi,piano_chart_esm_q=/[MLHVCSQTAZ]/i,piano_chart_esm_W=/((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi,piano_chart_esm_Y=/\\./g;piano_chart_esm_i(\"Dom\",{classes:function(){var t=this.attr(\"class\");return null==t?[]:t.trim().split(piano_chart_esm_R)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr(\"class\",e.join(\" \"))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr(\"class\",this.classes().filter((function(e){return e!==t})).join(\" \")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),piano_chart_esm_i(\"Dom\",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\\s*;\\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\\s*:\\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=piano_chart_esm_o(e);i[t]=this.node.style[t]}return i}if(\"string\"==typeof t)return this.node.style[piano_chart_esm_o(t)];if(\"object\"==typeof t)for(const e in t)this.node.style[piano_chart_esm_o(e)]=null==t[e]||piano_chart_esm_D.test(t[e])?\"\":t[e]}return 2===arguments.length&&(this.node.style[piano_chart_esm_o(t)]=null==e||piano_chart_esm_D.test(e)?\"\":e),this},show:function(){return this.css(\"display\",\"\")},hide:function(){return this.css(\"display\",\"none\")},visible:function(){return\"none\"!==this.css(\"display\")}}),piano_chart_esm_i(\"Dom\",{data:function(t,e,i){if(\"object\"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr(\"data-\"+t))}catch(e){return this.attr(\"data-\"+t)}else this.attr(\"data-\"+t,null===e?null:!0===i||\"string\"==typeof e||\"number\"==typeof e?e:JSON.stringify(e));return this}}),piano_chart_esm_i(\"Dom\",{remember:function(t,e){if(\"object\"==typeof arguments[0])for(var i in t)this.remember(i,t[i]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});let piano_chart_esm_B=0;const piano_chart_esm_U={};function piano_chart_esm_X(t){let e=t.getEventHolder();return e===piano_chart_esm_p.window&&(e=piano_chart_esm_U),e.events||(e.events={}),e.events}function piano_chart_esm_G(t){return t.getEventTarget()}function piano_chart_esm_V(t,e,i,n,s){var r=i.bind(n||t),h=piano_chart_esm_(t),o=piano_chart_esm_X(h),a=piano_chart_esm_G(h);e=Array.isArray(e)?e:e.split(piano_chart_esm_R),i._svgjsListenerId||(i._svgjsListenerId=++piano_chart_esm_B),e.forEach((function(t){var e=t.split(\".\")[0],n=t.split(\".\")[1]||\"*\";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][i._svgjsListenerId]=r,a.addEventListener(e,r,s||!1)}))}function piano_chart_esm_$(t,e,i,n){var s=piano_chart_esm_(t),r=piano_chart_esm_X(s),h=piano_chart_esm_G(s);(\"function\"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||\"\").split(piano_chart_esm_R)).forEach((function(t){var e,o,a=t&&t.split(\".\")[0],u=t&&t.split(\".\")[1];if(i)r[a]&&r[a][u||\"*\"]&&(h.removeEventListener(a,r[a][u||\"*\"][i],n||!1),delete r[a][u||\"*\"][i]);else if(a&&u){if(r[a]&&r[a][u]){for(o in r[a][u])piano_chart_esm_$(h,[a,u].join(\".\"),o);delete r[a][u]}}else if(u)for(t in r)for(e in r[t])u===e&&piano_chart_esm_$(h,[t,u].join(\".\"));else if(a){if(r[a]){for(e in r[a])piano_chart_esm_$(h,[a,e].join(\".\"));delete r[a]}}else{for(t in r)piano_chart_esm_$(h,t);!function(t){const e=t.getEventHolder();e.events&&(e.events={})}(s)}}))}function piano_chart_esm_Q(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?\"0\"+i:i}function piano_chart_esm_Z(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function piano_chart_esm_J(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}class piano_chart_esm_tt{constructor(...t){this.init(...t)}init(t=0,e=0,i=0,n=0,s=\"rgb\"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if(\"number\"==typeof t)s=\"string\"==typeof n?n:s,n=\"string\"==typeof n?0:n,Object.assign(this,{_a:t,_b:e,_c:i,_d:n,space:s});else if(t instanceof Array)this.space=e||(\"string\"==typeof t[3]?t[3]:t[4])||\"rgb\",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=piano_chart_esm_Z(t,\"rgb\")?{_a:t.r,_b:t.g,_c:t.b,space:\"rgb\"}:piano_chart_esm_Z(t,\"xyz\")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:\"xyz\"}:piano_chart_esm_Z(t,\"hsl\")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:\"hsl\"}:piano_chart_esm_Z(t,\"lab\")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:\"lab\"}:piano_chart_esm_Z(t,\"lch\")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:\"lch\"}:piano_chart_esm_Z(t,\"cmyk\")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:\"cmyk\"}:{_a:0,_b:0,_c:0,space:\"rgb\"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if(\"string\"==typeof t)if(piano_chart_esm_H.test(t)){const e=t.replace(piano_chart_esm_j,\"\"),[i,n,s]=piano_chart_esm_C.exec(e).slice(1,4).map(t=>parseInt(t));Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:\"rgb\"})}else{if(!piano_chart_esm_L.test(t))throw Error(\"Unsupported string format, can't construct Color\");{const e=t=>parseInt(t,16),[,i,n,s]=piano_chart_esm_A.exec(function(t){return 4===t.length?[\"#\",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(\"\"):t}(t)).map(e);Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:\"rgb\"})}}const{_a:r,_b:h,_c:o,_d:a}=this,u=\"rgb\"===this.space?{r:r,g:h,b:o}:\"xyz\"===this.space?{x:r,y:h,z:o}:\"hsl\"===this.space?{h:r,s:h,l:o}:\"lab\"===this.space?{l:r,a:h,b:o}:\"lch\"===this.space?{l:r,c:h,h:o}:\"cmyk\"===this.space?{c:r,m:h,y:o,k:a}:{};Object.assign(this,u)}rgb(){if(\"rgb\"===this.space)return this;if(\"lab\"===(t=this.space)||\"xyz\"===t||\"lch\"===t){let{x:t,y:e,z:i}=this;if(\"lab\"===this.space||\"lch\"===this.space){let{l:n,a:s,b:r}=this;if(\"lch\"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const h=(n+16)/116,o=s/500+h,a=h-r/200,u=16/116,l=.008856,c=7.787;t=.95047*(o**3>l?o**3:(o-u)/c),e=1*(h**3>l?h**3:(h-u)/c),i=1.08883*(a**3>l?a**3:(a-u)/c)}const n=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,h=Math.pow,o=.0031308,a=n>o?1.055*h(n,1/2.4)-.055:12.92*n,u=s>o?1.055*h(s,1/2.4)-.055:12.92*s,l=r>o?1.055*h(r,1/2.4)-.055:12.92*r;return new piano_chart_esm_tt(255*a,255*u,255*l)}if(\"hsl\"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){return i*=255,new piano_chart_esm_tt(i,i,i)}const n=i<.5?i*(1+e):i+e-i*e,s=2*i-n,r=255*piano_chart_esm_J(s,n,t+1/3),h=255*piano_chart_esm_J(s,n,t),o=255*piano_chart_esm_J(s,n,t-1/3);return new piano_chart_esm_tt(r,h,o)}if(\"cmyk\"===this.space){const{c:t,m:e,y:i,k:n}=this,s=255*(1-Math.min(1,t*(1-n)+n)),r=255*(1-Math.min(1,e*(1-n)+n)),h=255*(1-Math.min(1,i*(1-n)+n));return new piano_chart_esm_tt(s,r,h)}return this;var t}lab(){const{x:t,y:e,z:i}=this.xyz();return new piano_chart_esm_tt(116*e-16,500*(t-e),200*(e-i),\"lab\")}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,r]=[t,e,i].map(t=>t/255),h=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,a=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=(.4124*h+.3576*o+.1805*a)/.95047,l=(.2126*h+.7152*o+.0722*a)/1,c=(.0193*h+.1192*o+.9505*a)/1.08883,d=u>.008856?Math.pow(u,1/3):7.787*u+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new piano_chart_esm_tt(d,f,p,\"xyz\")}lch(){const{l:t,a:e,b:i}=this.lab(),n=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;return s<0&&(s*=-1,s=360-s),new piano_chart_esm_tt(t,n,s,\"lch\")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,r]=[t,e,i].map(t=>t/255),h=Math.max(n,s,r),o=Math.min(n,s,r),a=(h+o)/2,u=h===o,l=h-o;return new piano_chart_esm_tt(360*(u?0:h===n?((s-r)/l+(s<r?6:0))/6:h===s?((r-n)/l+2)/6:h===r?((n-s)/l+4)/6:0),100*(u?0:a>.5?l/(2-h-o):l/(h+o)),100*a,\"hsl\")}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,r]=[t,e,i].map(t=>t/255),h=Math.min(1-n,1-s,1-r);return 1===h?new piano_chart_esm_tt(0,0,0,1,\"cmyk\"):new piano_chart_esm_tt((1-n-h)/(1-h),(1-s-h)/(1-h),(1-r-h)/(1-h),h,\"cmyk\")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:n,min:s,round:r}=Math;return[t,e,i].map(t=>n(0,s(r(t),255)))}toHex(){const[t,e,i]=this._clamped().map(piano_chart_esm_Q);return`#${t}${e}${i}`}toString(){return this.toHex()}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toArray(){const{_a:t,_b:e,_c:i,_d:n,space:s}=this;return[t,e,i,n,s]}static random(t=\"vibrant\",e,i){const{random:n,round:s,sin:r,PI:h}=Math;if(\"vibrant\"===t){const t=24*n()+57,e=38*n()+45,i=360*n();return new piano_chart_esm_tt(t,e,i,\"lch\")}if(\"sine\"===t){const t=s(80*r(2*h*(e=null==e?n():e)/.5+.01)+150),i=s(50*r(2*h*e/.5+4.6)+200),o=s(100*r(2*h*e/.5+2.3)+150);return new piano_chart_esm_tt(t,i,o)}if(\"pastel\"===t){const t=8*n()+86,e=17*n()+9,i=360*n();return new piano_chart_esm_tt(t,e,i,\"lch\")}if(\"dark\"===t){const t=10+10*n(),e=50*n()+86,i=360*n();return new piano_chart_esm_tt(t,e,i,\"lch\")}if(\"rgb\"===t){const t=255*n(),e=255*n(),i=255*n();return new piano_chart_esm_tt(t,e,i)}if(\"lab\"===t){const t=100*n(),e=256*n()-128,i=256*n()-128;return new piano_chart_esm_tt(t,e,i,\"lab\")}if(\"grey\"===t){const t=255*n();return new piano_chart_esm_tt(t,t,t)}}static test(t){return\"string\"==typeof t&&(piano_chart_esm_L.test(t)||piano_chart_esm_H.test(t))}static isRgb(t){return t&&\"number\"==typeof t.r&&\"number\"==typeof t.g&&\"number\"==typeof t.b}static isColor(t){return t&&(t instanceof piano_chart_esm_tt||this.isRgb(t)||this.test(t))}}class piano_chart_esm_et{constructor(...t){this.init(...t)}init(t,e){const i=0,n=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:\"object\"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?n:s.y,this}clone(){return new piano_chart_esm_et(this)}transform(t){return this.clone().transformO(t)}transformO(t){piano_chart_esm_nt.isMatrixLike(t)||(t=new piano_chart_esm_nt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}toArray(){return[this.x,this.y]}}function piano_chart_esm_it(t,e,i){return Math.abs(e-t)<(i||1e-6)}class piano_chart_esm_nt{constructor(...t){this.init(...t)}init(t){var e=piano_chart_esm_nt.fromArray([1,0,0,1,0,0]);return t=t instanceof piano_chart_esm_xt?t.matrixify():\"string\"==typeof t?piano_chart_esm_nt.fromArray(t.split(piano_chart_esm_R).map(parseFloat)):Array.isArray(t)?piano_chart_esm_nt.fromArray(t):\"object\"==typeof t&&piano_chart_esm_nt.isMatrixLike(t)?t:\"object\"==typeof t?(new piano_chart_esm_nt).transform(t):6===arguments.length?piano_chart_esm_nt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}clone(){return new piano_chart_esm_nt(this)}transform(t){if(piano_chart_esm_nt.isMatrixLike(t))return new piano_chart_esm_nt(t).multiplyO(this);var e=piano_chart_esm_nt.formatTransforms(t);const{x:i,y:n}=new piano_chart_esm_et(e.ox,e.oy).transform(this);var s=(new piano_chart_esm_nt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-n).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,n);if(isFinite(e.px)||isFinite(e.py)){const t=new piano_chart_esm_et(i,n).transform(s),r=e.px?e.px-t.x:0,h=e.py?e.py-t.y:0;s.translateO(r,h)}return s.translateO(e.tx,e.ty),s}compose(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,i=t.originY||0,n=t.scaleX||1,s=t.scaleY||1,r=t.shear||0,h=t.rotate||0,o=t.translateX||0,a=t.translateY||0;return(new piano_chart_esm_nt).translateO(-e,-i).scaleO(n,s).shearO(r).rotateO(h).translateO(o,a).lmultiplyO(this).translateO(e,i)}decompose(t=0,e=0){var i=this.a,n=this.b,s=this.c,r=this.d,h=this.e,o=this.f,a=i*r-n*s,u=a>0?1:-1,l=u*Math.sqrt(i*i+n*n),c=Math.atan2(u*n,u*i),d=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),m=(i*s+n*r)/a,y=s*l/(m*i-n)||r*l/(m*n+i);return{scaleX:l,scaleY:y,shear:m,rotate:d,translateX:h-t+t*f*l+e*(m*f*l-p*y),translateY:o-e+t*p*l+e*(m*p*l+f*y),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){var e=t instanceof piano_chart_esm_nt?t:new piano_chart_esm_nt(t);return piano_chart_esm_nt.matrixMultiply(this,e,this)}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){var e=t instanceof piano_chart_esm_nt?t:new piano_chart_esm_nt(t);return piano_chart_esm_nt.matrixMultiply(e,this,this)}inverseO(){var t=this.a,e=this.b,i=this.c,n=this.d,s=this.e,r=this.f,h=t*n-e*i;if(!h)throw new Error(\"Cannot invert \"+this);var o=n/h,a=-e/h,u=-i/h,l=t/h,c=-(o*s+u*r),d=-(a*s+l*r);return this.a=o,this.b=a,this.c=u,this.d=l,this.e=c,this.f=d,this}inverse(){return this.clone().inverseO()}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}scale(t,e,i,n){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t);const{a:s,b:r,c:h,d:o,e:a,f:u}=this;return this.a=s*t,this.b=r*e,this.c=h*t,this.d=o*e,this.e=a*t-i*t+i,this.f=u*e-n*e+n,this}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=piano_chart_esm_h(t);const n=Math.cos(t),s=Math.sin(t),{a:r,b:o,c:a,d:u,e:l,f:c}=this;return this.a=r*n-o*s,this.b=o*n+r*s,this.c=a*n-u*s,this.d=u*n+a*s,this.e=l*n-c*s+i*s-e*n+e,this.f=c*n+l*s-e*s-i*n+i,this}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return\"x\"===t?this.scaleO(-1,1,e,0):\"y\"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:n,b:s,c:r,d:h,e:o,f:a}=this;return this.a=n+s*t,this.c=r+h*t,this.e=o+a*t-i*t,this}skew(t,e,i,n){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t),t=piano_chart_esm_h(t),e=piano_chart_esm_h(e);const s=Math.tan(t),r=Math.tan(e),{a:o,b:a,c:u,d:l,e:c,f:d}=this;return this.a=o+a*s,this.b=a+o*r,this.c=u+l*s,this.d=l+u*r,this.e=c+d*s-n*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewXO(t,e,i){return this.skewO(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}skewYO(t,e,i){return this.skewO(0,t,e,i)}aroundO(t,e,i){var n=t||0,s=e||0;return this.translateO(-n,-s).lmultiplyO(i).translateO(n,s)}around(t,e,i){return this.clone().aroundO(t,e,i)}equals(t){var e=new piano_chart_esm_nt(t);return piano_chart_esm_it(this.a,e.a)&&piano_chart_esm_it(this.b,e.b)&&piano_chart_esm_it(this.c,e.c)&&piano_chart_esm_it(this.d,e.d)&&piano_chart_esm_it(this.e,e.e)&&piano_chart_esm_it(this.f,e.f)}toString(){return\"matrix(\"+this.a+\",\"+this.b+\",\"+this.c+\",\"+this.d+\",\"+this.e+\",\"+this.f+\")\"}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static formatTransforms(t){var e=\"both\"===t.flip||!0===t.flip,i=t.flip&&(e||\"x\"===t.flip)?-1:1,n=t.flip&&(e||\"y\"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,h=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleY)?t.scaleY*n:n,a=t.shear||0,u=t.rotate||t.theta||0,l=new piano_chart_esm_et(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,d=l.y,f=new piano_chart_esm_et(t.position||t.px||t.positionX,t.py||t.positionY),p=f.x,m=f.y,y=new piano_chart_esm_et(t.translate||t.tx||t.translateX,t.ty||t.translateY),g=y.x,v=y.y,_=new piano_chart_esm_et(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:h,scaleY:o,skewX:s,skewY:r,shear:a,theta:u,rx:_.x,ry:_.y,tx:g,ty:v,ox:c,oy:d,px:p,py:m}}static matrixMultiply(t,e,i){var n=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,h=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return i.a=n,i.b=s,i.c=r,i.d=h,i.e=o,i.f=a,i}}function piano_chart_esm_st(){if(!piano_chart_esm_st.nodes){const t=piano_chart_esm_().size(2,0);t.node.style.cssText=[\"opacity: 0\",\"position: absolute\",\"left: -100%\",\"top: -100%\",\"overflow: hidden\"].join(\";\"),t.attr(\"focusable\",\"false\"),t.attr(\"aria-hidden\",\"true\");const e=t.path().node;piano_chart_esm_st.nodes={svg:t,path:e}}if(!piano_chart_esm_st.nodes.svg.node.parentNode){const t=piano_chart_esm_p.document.body||piano_chart_esm_p.document.documentElement;piano_chart_esm_st.nodes.svg.addTo(t)}return piano_chart_esm_st.nodes}function piano_chart_esm_rt(t){return!(t.width||t.height||t.x||t.y)}piano_chart_esm_O(piano_chart_esm_nt,\"Matrix\");class piano_chart_esm_ht{constructor(...t){this.init(...t)}init(t){return t=\"string\"==typeof t?t.split(piano_chart_esm_R).map(parseFloat):Array.isArray(t)?t:\"object\"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),n=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new piano_chart_esm_ht(e,i,n,s)}transform(t){t instanceof piano_chart_esm_nt||(t=new piano_chart_esm_nt(t));let e=1/0,i=-1/0,n=1/0,s=-1/0;return[new piano_chart_esm_et(this.x,this.y),new piano_chart_esm_et(this.x2,this.y),new piano_chart_esm_et(this.x,this.y2),new piano_chart_esm_et(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),n=Math.min(n,r.y),s=Math.max(s,r.y)})),new piano_chart_esm_ht(e,n,i-e,s-n)}addOffset(){return this.x+=piano_chart_esm_p.window.pageXOffset,this.y+=piano_chart_esm_p.window.pageYOffset,this}toString(){return this.x+\" \"+this.y+\" \"+this.width+\" \"+this.height}toArray(){return[this.x,this.y,this.width,this.height]}isNulled(){return piano_chart_esm_rt(this)}}function piano_chart_esm_ot(t,e){let i;try{if(i=t(this.node),piano_chart_esm_rt(i)&&((n=this.node)!==piano_chart_esm_p.document&&!(piano_chart_esm_p.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===piano_chart_esm_p.document}).call(piano_chart_esm_p.document.documentElement,n)))throw new Error(\"Element not in the dom\")}catch(t){i=e(this)}var n;return i}piano_chart_esm_i({viewbox:{viewbox(t,e,i,n){return null==t?new piano_chart_esm_ht(this.attr(\"viewBox\")):this.attr(\"viewBox\",new piano_chart_esm_ht(t,e,i,n))},zoom(t,e){let i=this.node.clientWidth,n=this.node.clientHeight;const s=this.viewbox();if(!i&&!n){var r=window.getComputedStyle(this.node);i=parseFloat(r.getPropertyValue(\"width\")),n=parseFloat(r.getPropertyValue(\"height\"))}const h=i/s.width,o=n/s.height,a=Math.min(h,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MIN_VALUE),e=e||new piano_chart_esm_et(i/2/h+s.x,n/2/o+s.y);const l=new piano_chart_esm_ht(s).transform(new piano_chart_esm_nt({scale:u,origin:e}));return this.viewbox(l)}}}),piano_chart_esm_O(piano_chart_esm_ht,\"Box\");const piano_chart_esm_at=function(){try{return Function(\"name\",\"baseClass\",\"_constructor\",[\"baseClass = baseClass || Array\",\"return {\",\"  [name]: class extends baseClass {\",\"    constructor (...args) {\",\"      super(...args)\",\"      _constructor && _constructor.apply(this, args)\",\"    }\",\"  }\",\"}[name]\"].join(\"\\n\"))}catch(t){return(t,e=Array,i)=>{const n=function(){e.apply(this,arguments),i&&i.apply(this,arguments)};return(n.prototype=Object.create(e.prototype)).constructor=n,n.prototype.map=function(t){const e=new n;return e.push.apply(e,Array.prototype.map.call(this,t)),e},n}}}(),piano_chart_esm_ut=piano_chart_esm_at(\"List\",Array,(function(t=[]){if(\"number\"==typeof t)return this;this.length=0,this.push(...t)}));piano_chart_esm_k(piano_chart_esm_ut,{each(t,...e){return\"function\"==typeof t?this.map(e=>t.call(e,e)):this.map(i=>i[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const piano_chart_esm_lt=[\"toArray\",\"constructor\",\"each\"];function piano_chart_esm_ct(t,e){return new piano_chart_esm_ut(piano_chart_esm_r((e||piano_chart_esm_p.document).querySelectorAll(t),(function(t){return piano_chart_esm_b(t)})))}piano_chart_esm_ut.extend=function(t){t=t.reduce((t,e)=>(piano_chart_esm_lt.includes(e)||\"_\"===e[0]||(t[e]=function(...t){return this.each(e,...t)}),t),{}),piano_chart_esm_k(piano_chart_esm_ut,t)};class piano_chart_esm_dt extends piano_chart_esm_m{constructor({events:t={}}={}){super(),this.events=t}addEventListener(){}dispatch(t,e){return function(t,e,i){var n=piano_chart_esm_G(t);return e instanceof piano_chart_esm_p.window.Event||(e=new piano_chart_esm_p.window.CustomEvent(e,{detail:i,cancelable:!0})),n.dispatchEvent(e),e}(this,t,e)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const n in i[e])i[e][n](t);return!t.defaultPrevented}fire(t,e){return this.dispatch(t,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e){return piano_chart_esm_$(this,t,e),this}on(t,e,i,n){return piano_chart_esm_V(this,t,e,i,n),this}removeEventListener(){}}function piano_chart_esm_ft(){}piano_chart_esm_O(piano_chart_esm_dt,\"EventTarget\");const piano_chart_esm_pt=400,piano_chart_esm_mt=\">\",piano_chart_esm_yt=0,piano_chart_esm_gt={\"fill-opacity\":1,\"stroke-opacity\":1,\"stroke-width\":0,\"stroke-linejoin\":\"miter\",\"stroke-linecap\":\"butt\",fill:\"#000000\",stroke:\"#000000\",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,\"stop-opacity\":1,\"stop-color\":\"#000000\",\"text-anchor\":\"start\"},piano_chart_esm_vt=piano_chart_esm_at(\"SVGArray\",Array,(function(t){this.init(t)}));piano_chart_esm_k(piano_chart_esm_vt,{init(t){return\"number\"==typeof t||(this.length=0,this.push(...this.parse(t))),this},toArray(){return Array.prototype.concat.apply([],this)},toString(){return this.join(\" \")},valueOf(){const t=[];return t.push(...this),t},parse:(t=[])=>t instanceof Array?t:t.trim().split(piano_chart_esm_R).map(parseFloat),clone(){return new this.constructor(this)},toSet(){return new Set(this)}});class piano_chart_piano_chart_esm_t{constructor(...t){this.init(...t)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||\"\",\"number\"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:\"string\"==typeof t?(e=t.match(piano_chart_esm_M))&&(this.value=parseFloat(e[1]),\"%\"===e[5]?this.value/=100:\"s\"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof piano_chart_piano_chart_esm_t&&(this.value=t.valueOf(),this.unit=t.unit),this}toString(){return(\"%\"===this.unit?~~(1e8*this.value)/1e6:\"s\"===this.unit?this.value/1e3:this.value)+this.unit}toJSON(){return this.toString()}toArray(){return[this.value,this.unit]}valueOf(){return this.value}plus(t){return t=new piano_chart_piano_chart_esm_t(t),new piano_chart_piano_chart_esm_t(this+t,this.unit||t.unit)}minus(t){return t=new piano_chart_piano_chart_esm_t(t),new piano_chart_piano_chart_esm_t(this-t,this.unit||t.unit)}times(t){return t=new piano_chart_piano_chart_esm_t(t),new piano_chart_piano_chart_esm_t(this*t,this.unit||t.unit)}divide(t){return t=new piano_chart_piano_chart_esm_t(t),new piano_chart_piano_chart_esm_t(this/t,this.unit||t.unit)}convert(t){return new piano_chart_piano_chart_esm_t(this.value,t)}}const piano_chart_esm_wt=[];class piano_chart_esm_bt extends piano_chart_esm_dt{constructor(t,e){super(t),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return t=piano_chart_esm_(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t){return piano_chart_esm_(t).put(this)}children(){return new piano_chart_esm_ut(piano_chart_esm_r(this.node.children,(function(t){return piano_chart_esm_b(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(){return this.writeDataToDom(),function t(e){for(var i=e.children.length-1;i>=0;i--)t(e.children[i]);return e.id?piano_chart_esm_b(e).id(piano_chart_esm_S(e.nodeName)):piano_chart_esm_b(e)}(this.node.cloneNode(!0))}each(t,e){var i,n,s=this.children();for(i=0,n=s.length;i<n;i++)t.apply(s[i],[i,s]),e&&s[i].each(t,e);return this}element(t){return this.put(new piano_chart_esm_bt(piano_chart_esm_v(t)))}first(){return piano_chart_esm_b(this.node.firstChild)}get(t){return piano_chart_esm_b(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}id(t){return void 0!==t||this.node.id||(this.node.id=piano_chart_esm_S(this.type)),this.attr(\"id\",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return piano_chart_esm_b(this.node.lastChild)}matches(t){const e=this.node;return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}parent(t){var e=this;if(!e.node.parentNode)return null;if(e=piano_chart_esm_b(e.node.parentNode),!t)return e;for(;e;){if(\"string\"==typeof t?e.matches(t):e instanceof t)return e;if(!e.node.parentNode||\"#document\"===e.node.parentNode.nodeName||\"#document-fragment\"===e.node.parentNode.nodeName)return null;e=piano_chart_esm_b(e.node.parentNode)}}put(t,e){return this.add(t,e),t}putIn(t){return piano_chart_esm_(t).add(this)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=piano_chart_esm_(t),this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e){const i=10**t,n=this.attr();e||(e=Object.keys(n));const s={};return e.forEach(t=>{s[t]=Math.round(n[t]*i)/i}),this.attr(s),this}toString(){return this.id()}svg(t,e){var i,n,s;if(!1===t&&(e=!1,t=null),null==t||\"function\"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=piano_chart_esm_b(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return\"\"}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}for(e=null!=e&&e,i=piano_chart_esm_p.document.createElementNS(piano_chart_esm_c,\"svg\"),s=piano_chart_esm_p.document.createDocumentFragment(),i.innerHTML=t,n=i.children.length;n--;)s.appendChild(i.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}words(t){return this.node.textContent=t,this}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}}piano_chart_esm_k(piano_chart_esm_bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=piano_chart_esm_z.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce((t,e)=>(t[e]=this.attr(e),t),{});if(\"object\"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?piano_chart_esm_gt[t]:piano_chart_esm_z.test(e)?parseFloat(e):e;\"number\"==typeof(e=piano_chart_esm_wt.reduce((e,i)=>i(t,e,this),e))?e=new piano_chart_piano_chart_esm_t(e):piano_chart_esm_tt.isColor(e)?e=new piano_chart_esm_tt(e):e.constructor===Array&&(e=new piano_chart_esm_vt(e)),\"leading\"===t?this.leading&&this.leading(e):\"string\"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||\"font-size\"!==t&&\"x\"!==t||this.rebuild()}return this},find:function(t){return piano_chart_esm_ct(t,this.node)},findOne:function(t){return piano_chart_esm_b(this.node.querySelector(t))}}),piano_chart_esm_O(piano_chart_esm_bt,\"Dom\");class piano_chart_esm_xt extends piano_chart_esm_bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,t.hasAttribute(\"svgjs:data\")&&this.setData(JSON.parse(t.getAttribute(\"svgjs:data\"))||{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){return this.root().defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new piano_chart_piano_chart_esm_t(t).plus(this.x()))}dy(t=0){return this.y(new piano_chart_piano_chart_esm_t(t).plus(this.y()))}root(){const t=this.parent(piano_chart_esm_y[piano_chart_esm_g]);return t&&t.root()}getEventHolder(){return this}height(t){return this.attr(\"height\",t)}inside(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height}move(t,e){return this.x(t).y(e)}parents(t=piano_chart_esm_p.document){t=piano_chart_esm_(t);const e=new piano_chart_esm_ut;let i=this;for(;(i=i.parent())&&i.node!==t.node&&i.node!==piano_chart_esm_p.document;)e.push(i);return e}reference(t){if(!(t=this.attr(t)))return null;const e=t.match(piano_chart_esm_E);return e?piano_chart_esm_(e[1]):null}setData(t){return this.dom=t,this}size(t,e){const i=piano_chart_esm_u(this,t,e);return this.width(new piano_chart_piano_chart_esm_t(i.width)).height(new piano_chart_piano_chart_esm_t(i.height))}width(t){return this.attr(\"width\",t)}writeDataToDom(){return this.node.removeAttribute(\"svgjs:data\"),Object.keys(this.dom).length&&this.node.setAttribute(\"svgjs:data\",JSON.stringify(this.dom)),super.writeDataToDom()}x(t){return this.attr(\"x\",t)}y(t){return this.attr(\"y\",t)}}piano_chart_esm_k(piano_chart_esm_xt,{bbox:function(){return new piano_chart_esm_ht(piano_chart_esm_ot.call(this,t=>t.getBBox(),t=>{try{const e=t.clone().addTo(piano_chart_esm_st().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error('Getting bbox of element \"'+t.node.nodeName+'\" is not possible. '+e.toString())}}))},rbox:function(t){const e=new piano_chart_esm_ht(piano_chart_esm_ot.call(this,t=>t.getBoundingClientRect(),t=>{throw new Error('Getting rbox of element \"'+t.node.nodeName+'\" is not possible')}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new piano_chart_esm_et(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new piano_chart_esm_nt(this.node.getCTM())},screenCTM:function(){if(\"function\"==typeof this.isRoot&&!this.isRoot()){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new piano_chart_esm_nt(e)}return new piano_chart_esm_nt(this.node.getScreenCTM())}}),piano_chart_esm_O(piano_chart_esm_xt,\"Element\");var piano_chart_esm_Ot={stroke:[\"color\",\"width\",\"opacity\",\"linecap\",\"linejoin\",\"miterlimit\",\"dasharray\",\"dashoffset\"],fill:[\"color\",\"opacity\",\"rule\"],prefix:function(t,e){return\"color\"===e?t:t+\"-\"+e}};function piano_chart_esm_Nt(t){return this.attr(\"rx\",t)}function piano_chart_esm_St(t){return this.attr(\"ry\",t)}function piano_chart_esm_kt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function piano_chart_esm_Tt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function piano_chart_esm_Mt(t){return null==t?this.attr(\"cx\"):this.attr(\"cx\",t)}function piano_chart_esm_At(t){return null==t?this.attr(\"cy\"):this.attr(\"cy\",t)}function piano_chart_esm_Ct(t){return null==t?2*this.rx():this.rx(new piano_chart_piano_chart_esm_t(t).divide(2))}function piano_chart_esm_Et(t){return null==t?2*this.ry():this.ry(new piano_chart_piano_chart_esm_t(t).divide(2))}[\"fill\",\"stroke\"].forEach((function(t){var e,n={};n[t]=function(i){if(void 0===i)return this.attr(t);if(\"string\"==typeof i||i instanceof piano_chart_esm_tt||piano_chart_esm_tt.isRgb(i)||i instanceof piano_chart_esm_xt)this.attr(t,i);else for(e=piano_chart_esm_Ot[t].length-1;e>=0;e--)null!=i[piano_chart_esm_Ot[t][e]]&&this.attr(piano_chart_esm_Ot.prefix(t,piano_chart_esm_Ot[t][e]),i[piano_chart_esm_Ot[t][e]]);return this},piano_chart_esm_i([\"Element\",\"Runner\"],n)})),piano_chart_esm_i([\"Element\",\"Runner\"],{matrix:function(t,e,i,n,s,r){return null==t?new piano_chart_esm_nt(this):this.attr(\"transform\",new piano_chart_esm_nt(t,e,i,n,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:n},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:n},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var i=\"string\"==typeof t?t:(isFinite(t),\"both\"),n=\"both\"===t&&isFinite(e)?[e,e]:\"x\"===t?[e,0]:\"y\"===t?[0,e]:isFinite(t)?[t,t]:[0,0];return this.transform({flip:i,origin:n},!0)},opacity:function(t){return this.attr(\"opacity\",t)}}),piano_chart_esm_i(\"radius\",{radius:function(t,e){var i=(this._element||this).type;return\"radialGradient\"===i||\"radialGradient\"===i?this.attr(\"r\",new piano_chart_piano_chart_esm_t(t)):this.rx(t).ry(null==e?t:e)}}),piano_chart_esm_i(\"Path\",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new piano_chart_esm_et(this.node.getPointAtLength(t))}}),piano_chart_esm_i([\"Element\",\"Runner\"],{font:function(t,e){if(\"object\"==typeof t){for(e in t)this.font(e,t[e]);return this}return\"leading\"===t?this.leading(e):\"anchor\"===t?this.attr(\"text-anchor\",e):\"size\"===t||\"family\"===t||\"weight\"===t||\"stretch\"===t||\"variant\"===t||\"style\"===t?this.attr(\"font-\"+t,e):this.attr(t,e)}}),piano_chart_esm_i(\"Text\",{ax(t){return this.attr(\"x\",t)},ay(t){return this.attr(\"y\",t)},amove(t,e){return this.ax(t).ay(e)}}),piano_chart_esm_i(\"Element\",[\"click\",\"dblclick\",\"mousedown\",\"mouseup\",\"mouseover\",\"mouseout\",\"mousemove\",\"mouseenter\",\"mouseleave\",\"touchstart\",\"touchmove\",\"touchleave\",\"touchend\",\"touchcancel\"].reduce((function(t,e){return t[e]=function(t){return null===t?piano_chart_esm_$(this,e):piano_chart_esm_V(this,e,t),this},t}),{})),piano_chart_esm_i(\"Element\",{untransform:function(){return this.attr(\"transform\",null)},matrixify:function(){return(this.attr(\"transform\")||\"\").split(piano_chart_esm_I).slice(0,-1).map((function(t){var e=t.trim().split(\"(\");return[e[0],e[1].split(piano_chart_esm_R).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return\"matrix\"===e[0]?t.lmultiply(piano_chart_esm_nt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new piano_chart_esm_nt)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toRoot:function(){return this.toParent(this.root())},transform:function(t,e){if(null==t||\"string\"==typeof t){var i=new piano_chart_esm_nt(this).decompose();return null==t?i:i[t]}piano_chart_esm_nt.isMatrixLike(t)||(t={...t,origin:piano_chart_esm_l(t,this)});var n=new piano_chart_esm_nt(!0===e?this:e||!1).transform(t);return this.attr(\"transform\",n)}});var piano_chart_esm_It,piano_chart_esm_jt=Object.freeze({__proto__:null,rx:piano_chart_esm_Nt,ry:piano_chart_esm_St,x:piano_chart_esm_kt,y:piano_chart_esm_Tt,cx:piano_chart_esm_Mt,cy:piano_chart_esm_At,width:piano_chart_esm_Ct,height:piano_chart_esm_Et});class piano_chart_esm_Lt extends piano_chart_esm_xt{}piano_chart_esm_O(piano_chart_esm_Lt,\"Shape\");class piano_chart_esm_Ht extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"circle\",t),t)}radius(t){return this.attr(\"r\",t)}rx(t){return this.attr(\"r\",t)}ry(t){return this.rx(t)}size(t){return this.radius(new piano_chart_piano_chart_esm_t(t).divide(2))}}piano_chart_esm_k(piano_chart_esm_Ht,{x:piano_chart_esm_kt,y:piano_chart_esm_Tt,cx:piano_chart_esm_Mt,cy:piano_chart_esm_At,width:piano_chart_esm_Ct,height:piano_chart_esm_Et}),piano_chart_esm_i({Container:{circle:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_Ht).size(t).move(0,0)}))}}),piano_chart_esm_O(piano_chart_esm_Ht,\"Circle\");class piano_chart_esm_Dt extends piano_chart_esm_xt{flatten(t){return this.each((function(){return this instanceof piano_chart_esm_Dt?this.flatten(t).ungroup(t):this.toParent(t)})),this.node.firstElementChild||this.remove(),this}ungroup(t){return t=t||this.parent(),this.each((function(){return this.toParent(t)})),this.remove(),this}}piano_chart_esm_O(piano_chart_esm_Dt,\"Container\");class piano_chart_esm_zt extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"defs\",t),t)}flatten(){return this}ungroup(){return this}}piano_chart_esm_O(piano_chart_esm_zt,\"Defs\");class piano_chart_esm_Pt extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"ellipse\",t),t)}size(t,e){var i=piano_chart_esm_u(this,t,e);return this.rx(new piano_chart_piano_chart_esm_t(i.width).divide(2)).ry(new piano_chart_piano_chart_esm_t(i.height).divide(2))}}piano_chart_esm_k(piano_chart_esm_Pt,piano_chart_esm_jt),piano_chart_esm_i(\"Container\",{ellipse:piano_chart_esm_T((function(t=0,e=t){return this.put(new piano_chart_esm_Pt).size(t,e).move(0,0)}))}),piano_chart_esm_O(piano_chart_esm_Pt,\"Ellipse\");class piano_chart_esm_Rt extends piano_chart_esm_xt{constructor(t){super(piano_chart_esm_w(\"stop\",t),t)}update(t){return(\"number\"==typeof t||t instanceof piano_chart_piano_chart_esm_t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr(\"stop-opacity\",t.opacity),null!=t.color&&this.attr(\"stop-color\",t.color),null!=t.offset&&this.attr(\"offset\",new piano_chart_piano_chart_esm_t(t.offset)),this}}function piano_chart_esm_Kt(t,e){return\"radialGradient\"===(this._element||this).type?this.attr({fx:new piano_chart_piano_chart_esm_t(t),fy:new piano_chart_piano_chart_esm_t(e)}):this.attr({x1:new piano_chart_piano_chart_esm_t(t),y1:new piano_chart_piano_chart_esm_t(e)})}function piano_chart_esm_Ft(t,e){return\"radialGradient\"===(this._element||this).type?this.attr({cx:new piano_chart_piano_chart_esm_t(t),cy:new piano_chart_piano_chart_esm_t(e)}):this.attr({x2:new piano_chart_piano_chart_esm_t(t),y2:new piano_chart_piano_chart_esm_t(e)})}piano_chart_esm_O(piano_chart_esm_Rt,\"Stop\");class piano_chart_esm_qt extends piano_chart_esm_Dt{constructor(t,e){super(piano_chart_esm_w(t+\"Gradient\",\"string\"==typeof t?null:t),e)}stop(t,e,i){return this.put(new piano_chart_esm_Rt).update(t,e,i)}update(t){return this.clear(),\"function\"==typeof t&&t.call(this,this),this}url(){return\"url(#\"+this.id()+\")\"}toString(){return this.url()}attr(t,e,i){return\"transform\"===t&&(t=\"gradientTransform\"),super.attr(t,e,i)}targets(){return piano_chart_esm_ct('svg [fill*=\"'+this.id()+'\"]')}bbox(){return new piano_chart_esm_ht}}piano_chart_esm_k(piano_chart_esm_qt,Object.freeze({__proto__:null,from:piano_chart_esm_Kt,to:piano_chart_esm_Ft})),piano_chart_esm_i({Container:{gradient:piano_chart_esm_T((function(t,e){return this.defs().gradient(t,e)}))},Defs:{gradient:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_qt(t)).update(e)}))}}),piano_chart_esm_O(piano_chart_esm_qt,\"Gradient\");class piano_chart_esm_Wt extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"pattern\",t),t)}url(){return\"url(#\"+this.id()+\")\"}update(t){return this.clear(),\"function\"==typeof t&&t.call(this,this),this}toString(){return this.url()}attr(t,e,i){return\"transform\"===t&&(t=\"patternTransform\"),super.attr(t,e,i)}targets(){return piano_chart_esm_ct('svg [fill*=\"'+this.id()+'\"]')}bbox(){return new piano_chart_esm_ht}}piano_chart_esm_i({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:piano_chart_esm_T((function(t,e,i){return this.put(new piano_chart_esm_Wt).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:\"userSpaceOnUse\"})}))}}),piano_chart_esm_O(piano_chart_esm_Wt,\"Pattern\");class piano_chart_esm_Yt extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"image\",t),t)}load(t,e){if(!t)return this;var i=new piano_chart_esm_p.window.Image;return piano_chart_esm_V(i,\"load\",(function(t){var n=this.parent(piano_chart_esm_Wt);0===this.width()&&0===this.height()&&this.size(i.width,i.height),n instanceof piano_chart_esm_Wt&&0===n.width()&&0===n.height()&&n.size(this.width(),this.height()),\"function\"==typeof e&&e.call(this,t)}),this),piano_chart_esm_V(i,\"load error\",(function(){piano_chart_esm_$(i)})),this.attr(\"href\",i.src=t,piano_chart_esm_f)}}piano_chart_esm_It=function(t,e,i){return\"fill\"!==t&&\"stroke\"!==t||piano_chart_esm_P.test(e)&&(e=i.root().defs().image(e)),e instanceof piano_chart_esm_Yt&&(e=i.root().defs().pattern(0,0,t=>{t.add(e)})),e},piano_chart_esm_wt.push(piano_chart_esm_It),piano_chart_esm_i({Container:{image:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_Yt).size(0,0).load(t,e)}))}}),piano_chart_esm_O(piano_chart_esm_Yt,\"Image\");const piano_chart_esm_Bt=piano_chart_esm_at(\"PointArray\",piano_chart_esm_vt);piano_chart_esm_k(piano_chart_esm_Bt,{toString(){for(var t=0,e=this.length,i=[];t<e;t++)i.push(this[t].join(\",\"));return i.join(\" \")},toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at(t){if(!this.destination)return this;for(var e=0,i=this.length,n=[];e<i;e++)n.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new piano_chart_esm_Bt(n)},parse(t=[[0,0]]){var e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(piano_chart_esm_R).map(parseFloat);t.length%2!=0&&t.pop();for(var i=0,n=t.length;i<n;i+=2)e.push([t[i],t[i+1]]);return e},transform(t){const e=[];for(let i=0;i<this.length;i++){const n=this[i];e.push([t.a*n[0]+t.c*n[1]+t.e,t.b*n[0]+t.d*n[1]+t.f])}return new piano_chart_esm_Bt(e)},move(t,e){var i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(var n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this},size(t,e){var i,n=this.bbox();for(i=this.length-1;i>=0;i--)n.width&&(this[i][0]=(this[i][0]-n.x)*t/n.width+n.x),n.height&&(this[i][1]=(this[i][1]-n.y)*e/n.height+n.y);return this},bbox(){var t=-1/0,e=-1/0,i=1/0,n=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),n=Math.min(s[1],n)})),{x:i,y:n,width:t-i,height:e-n}}});const piano_chart_esm_Ut=piano_chart_esm_Bt;var piano_chart_esm_Xt=Object.freeze({__proto__:null,MorphArray:piano_chart_esm_Ut,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}});class piano_chart_esm_Gt extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"line\",t),t)}array(){return new piano_chart_esm_Bt([[this.attr(\"x1\"),this.attr(\"y1\")],[this.attr(\"x2\"),this.attr(\"y2\")]])}plot(t,e,i,n){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:n}:new piano_chart_esm_Bt(t).toLine(),this.attr(t))}move(t,e){return this.attr(this.array().move(t,e).toLine())}size(t,e){var i=piano_chart_esm_u(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}}piano_chart_esm_k(piano_chart_esm_Gt,piano_chart_esm_Xt),piano_chart_esm_i({Container:{line:piano_chart_esm_T((function(...t){return piano_chart_esm_Gt.prototype.plot.apply(this.put(new piano_chart_esm_Gt),null!=t[0]?t:[0,0,0,0])}))}}),piano_chart_esm_O(piano_chart_esm_Gt,\"Line\");class piano_chart_esm_Vt extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"marker\",t),t)}width(t){return this.attr(\"markerWidth\",t)}height(t){return this.attr(\"markerHeight\",t)}ref(t,e){return this.attr(\"refX\",t).attr(\"refY\",e)}update(t){return this.clear(),\"function\"==typeof t&&t.call(this,this),this}toString(){return\"url(#\"+this.id()+\")\"}}function piano_chart_esm_$t(t,e){return function(i){return null==i?this[i]:(this[t]=i,e&&e.call(this),this)}}piano_chart_esm_i({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:piano_chart_esm_T((function(t,e,i){return this.put(new piano_chart_esm_Vt).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr(\"orient\",\"auto\").update(i)}))},marker:{marker(t,e,i,n){var s=[\"marker\"];return\"all\"!==t&&s.push(t),s=s.join(\"-\"),t=arguments[1]instanceof piano_chart_esm_Vt?arguments[1]:this.defs().marker(e,i,n),this.attr(s,t)}}}),piano_chart_esm_O(piano_chart_esm_Vt,\"Marker\");const piano_chart_esm_Qt={\"-\":function(t){return t},\"<>\":function(t){return-Math.cos(t*Math.PI)/2+.5},\">\":function(t){return Math.sin(t*Math.PI/2)},\"<\":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,n){return function(s){return s<0?t>0?e/t*s:i>0?n/i*s:0:s>1?i<1?(1-n)/(1-i)*s+(n-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*n+s**3}},steps:function(t,e=\"end\"){e=e.split(\"-\").reverse()[0];let i=t;return\"none\"===e?--i:\"both\"===e&&++i,(n,s=!1)=>{let r=Math.floor(n*t);const h=n*r%1==0;return\"start\"!==e&&\"both\"!==e||++r,s&&h&&--r,n>=0&&r<0&&(r=0),n<=1&&r>i&&(r=i),r/i}}};class piano_chart_esm_Zt{done(){return!1}}class piano_chart_esm_Jt extends piano_chart_esm_Zt{constructor(t){super(),this.ease=piano_chart_esm_Qt[t||piano_chart_esm_mt]||t}step(t,e,i){return\"number\"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class piano_chart_esm_te extends piano_chart_esm_Zt{constructor(t){super(),this.stepper=t}step(t,e,i,n){return this.stepper(t,e,i,n)}done(t){return t.done}}function piano_chart_esm_ee(){var t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,n=Math.log(e/100+1e-10),s=-n/Math.sqrt(i*i+n*n),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}piano_chart_esm_k(class extends piano_chart_esm_te{constructor(t,e){super(),this.duration(t||500).overshoot(e||0)}step(t,e,i,n){if(\"string\"==typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;var s=n.velocity||0,r=-this.d*s-this.k*(t-e),h=t+s*i+r*i*i/2;return n.velocity=s+r*i,n.done=Math.abs(e-h)+Math.abs(s)<.002,n.done?e:h}},{duration:piano_chart_esm_$t(\"_duration\",piano_chart_esm_ee),overshoot:piano_chart_esm_$t(\"_overshoot\",piano_chart_esm_ee)});piano_chart_esm_k(class extends piano_chart_esm_te{constructor(t,e,i,n){super(),t=null==t?.1:t,e=null==e?.01:e,i=null==i?0:i,n=null==n?1e3:n,this.p(t).i(e).d(i).windup(n)}step(t,e,i,n){if(\"string\"==typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;var s=e-t,r=(n.integral||0)+s*i,h=(s-(n.error||0))/i,o=this.windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),n.error=s,n.integral=r,n.done=Math.abs(s)<.001,n.done?e:t+(this.P*s+this.I*r+this.D*h)}},{windup:piano_chart_esm_$t(\"windup\"),p:piano_chart_esm_$t(\"P\"),i:piano_chart_esm_$t(\"I\"),d:piano_chart_esm_$t(\"D\")});const piano_chart_esm_ie=piano_chart_esm_at(\"PathArray\",piano_chart_esm_vt);function piano_chart_esm_ne(t,e,i,n){return i+n.replace(piano_chart_esm_Y,\" .\")}const piano_chart_esm_se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],[\"M\",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],[\"L\",t[0],t[1]]},H:function(t,e){return e.x=t[0],[\"H\",t[0]]},V:function(t,e){return e.y=t[0],[\"V\",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],[\"C\",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],[\"S\",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],[\"Q\",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],[\"T\",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,[\"Z\"]},A:function(t,e){return e.x=t[5],e.y=t[6],[\"A\",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},piano_chart_esm_re=\"mlhvqtcsaz\".split(\"\");for(var piano_chart_esm_he=0,piano_chart_esm_oe=piano_chart_esm_re.length;piano_chart_esm_he<piano_chart_esm_oe;++piano_chart_esm_he)piano_chart_esm_se[piano_chart_esm_re[piano_chart_esm_he]]=function(t){return function(e,i,n){if(\"H\"===t)e[0]=e[0]+i.x;else if(\"V\"===t)e[0]=e[0]+i.y;else if(\"A\"===t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(var s=0,r=e.length;s<r;++s)e[s]=e[s]+(s%2?i.y:i.x);return piano_chart_esm_se[t](e,i,n)}}(piano_chart_esm_re[piano_chart_esm_he].toUpperCase());piano_chart_esm_k(piano_chart_esm_ie,{toString(){return function(t){for(var e=0,i=t.length,n=\"\";e<i;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=\" \",n+=t[e][2],null!=t[e][3]&&(n+=\" \",n+=t[e][3],n+=\" \",n+=t[e][4],null!=t[e][5]&&(n+=\" \",n+=t[e][5],n+=\" \",n+=t[e][6],null!=t[e][7]&&(n+=\" \",n+=t[e][7])))));return n+\" \"}(this)},move(t,e){var i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(var n,s=this.length-1;s>=0;s--)\"M\"===(n=this[s][0])||\"L\"===n||\"T\"===n?(this[s][1]+=t,this[s][2]+=e):\"H\"===n?this[s][1]+=t:\"V\"===n?this[s][1]+=e:\"C\"===n||\"S\"===n||\"Q\"===n?(this[s][1]+=t,this[s][2]+=e,this[s][3]+=t,this[s][4]+=e,\"C\"===n&&(this[s][5]+=t,this[s][6]+=e)):\"A\"===n&&(this[s][6]+=t,this[s][7]+=e);return this},size(t,e){var i,n,s=this.bbox();for(s.width=0===s.width?1:s.width,s.height=0===s.height?1:s.height,i=this.length-1;i>=0;i--)\"M\"===(n=this[i][0])||\"L\"===n||\"T\"===n?(this[i][1]=(this[i][1]-s.x)*t/s.width+s.x,this[i][2]=(this[i][2]-s.y)*e/s.height+s.y):\"H\"===n?this[i][1]=(this[i][1]-s.x)*t/s.width+s.x:\"V\"===n?this[i][1]=(this[i][1]-s.y)*e/s.height+s.y:\"C\"===n||\"S\"===n||\"Q\"===n?(this[i][1]=(this[i][1]-s.x)*t/s.width+s.x,this[i][2]=(this[i][2]-s.y)*e/s.height+s.y,this[i][3]=(this[i][3]-s.x)*t/s.width+s.x,this[i][4]=(this[i][4]-s.y)*e/s.height+s.y,\"C\"===n&&(this[i][5]=(this[i][5]-s.x)*t/s.width+s.x,this[i][6]=(this[i][6]-s.y)*e/s.height+s.y)):\"A\"===n&&(this[i][1]=this[i][1]*t/s.width,this[i][2]=this[i][2]*e/s.height,this[i][6]=(this[i][6]-s.x)*t/s.width+s.x,this[i][7]=(this[i][7]-s.y)*e/s.height+s.y);return this},equalCommands(t){var e,i,n;for(t=new piano_chart_esm_ie(t),n=this.length===t.length,e=0,i=this.length;n&&e<i;e++)n=this[e][0]===t[e][0];return n},morph(t){return t=new piano_chart_esm_ie(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at(t){if(!this.destination)return this;var e,i,n,s,r=this.destination.value,h=[],o=new piano_chart_esm_ie;for(e=0,i=this.length;e<i;e++){for(h[e]=[this[e][0]],n=1,s=this[e].length;n<s;n++)h[e][n]=this[e][n]+(r[e][n]-this[e][n])*t;\"A\"===h[e][0]&&(h[e][4]=+(0!==h[e][4]),h[e][5]=+(0!==h[e][5]))}return o.value=h,o},parse(t=[[\"M\",0,0]]){if(t instanceof piano_chart_esm_ie)return t;var e,i={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};t=\"string\"==typeof t?t.replace(piano_chart_esm_W,piano_chart_esm_ne).replace(piano_chart_esm_F,\" $& \").replace(piano_chart_esm_K,\"$1 -\").trim().split(piano_chart_esm_R):t.reduce((function(t,e){return[].concat.call(t,e)}),[]);var n=[],s=new piano_chart_esm_et,r=new piano_chart_esm_et,h=0,o=t.length;do{piano_chart_esm_q.test(t[h])?(e=t[h],++h):\"M\"===e?e=\"L\":\"m\"===e&&(e=\"l\"),n.push(piano_chart_esm_se[e].call(null,t.slice(h,h+=i[e.toUpperCase()]).map(parseFloat),s,r))}while(o>h);return n},bbox(){return piano_chart_esm_st().path.setAttribute(\"d\",this.toString()),piano_chart_esm_st.nodes.path.getBBox()}});class piano_chart_esm_ae{constructor(t){this._stepper=t||new piano_chart_esm_Jt(\"-\"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}from(t){return null==t?this._from:(this._from=this._set(t),this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){if(!this._type){var e=typeof t;\"number\"===e?this.type(piano_chart_piano_chart_esm_t):\"string\"===e?piano_chart_esm_tt.isColor(t)?this.type(piano_chart_esm_tt):piano_chart_esm_R.test(t)?this.type(piano_chart_esm_F.test(t)?piano_chart_esm_ie:piano_chart_esm_vt):piano_chart_esm_M.test(t)?this.type(piano_chart_piano_chart_esm_t):this.type(piano_chart_esm_ue):piano_chart_esm_de.indexOf(t.constructor)>-1?this.type(t.constructor):Array.isArray(t)?this.type(piano_chart_esm_vt):\"object\"===e?this.type(piano_chart_esm_ce):this.type(piano_chart_esm_ue)}var i=new this._type(t);return this._type===piano_chart_esm_tt&&(i=this._to?i[this._to[4]]():this._from?i[this._from[4]]():i),i=i.toArray(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(i.length)).map(Object).map((function(t){return t.done=!0,t})),i}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}at(t){var e=this;return this._morphObj.fromArray(this._from.map((function(i,n){return e._stepper.step(i,e._to[n],t,e._context[n],e._context)})))}}class piano_chart_esm_ue{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}valueOf(){return this.value}toArray(){return[this.value]}}class piano_chart_esm_le{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,piano_chart_esm_le.defaults,t),this}toArray(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}piano_chart_esm_le.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};class piano_chart_esm_ce{constructor(...t){this.init(...t)}init(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(const i in t)e.push([i,t[i]]);return e.sort((t,e)=>t[0]-e[0]),this.values=e.reduce((t,e)=>t.concat(e),[]),this}this.values=t}valueOf(){for(var t={},e=this.values,i=0,n=e.length;i<n;i+=2)t[e[i]]=e[i+1];return t}toArray(){return this.values}}const piano_chart_esm_de=[piano_chart_esm_ue,piano_chart_esm_le,piano_chart_esm_ce];class piano_chart_esm_fe extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"path\",t),t)}array(){return this._array||(this._array=new piano_chart_esm_ie(this.attr(\"d\")))}plot(t){return null==t?this.array():this.clear().attr(\"d\",\"string\"==typeof t?t:this._array=new piano_chart_esm_ie(t))}clear(){return delete this._array,this}move(t,e){return this.attr(\"d\",this.array().move(t,e))}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}size(t,e){var i=piano_chart_esm_u(this,t,e);return this.attr(\"d\",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}targets(){return piano_chart_esm_ct('svg textpath [href*=\"'+this.id()+'\"]')}}piano_chart_esm_fe.prototype.MorphArray=piano_chart_esm_ie,piano_chart_esm_i({Container:{path:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_fe).plot(t||new piano_chart_esm_ie)}))}}),piano_chart_esm_O(piano_chart_esm_fe,\"Path\");var piano_chart_esm_pe=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new piano_chart_esm_Bt(this.attr(\"points\")))},plot:function(t){return null==t?this.array():this.clear().attr(\"points\",\"string\"==typeof t?t:this._array=new piano_chart_esm_Bt(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr(\"points\",this.array().move(t,e))},size:function(t,e){const i=piano_chart_esm_u(this,t,e);return this.attr(\"points\",this.array().size(i.width,i.height))}});class piano_chart_esm_me extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"polygon\",t),t)}}piano_chart_esm_i({Container:{polygon:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_me).plot(t||new piano_chart_esm_Bt)}))}}),piano_chart_esm_k(piano_chart_esm_me,piano_chart_esm_Xt),piano_chart_esm_k(piano_chart_esm_me,piano_chart_esm_pe),piano_chart_esm_O(piano_chart_esm_me,\"Polygon\");class piano_chart_esm_ye extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"polyline\",t),t)}}piano_chart_esm_i({Container:{polyline:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_ye).plot(t||new piano_chart_esm_Bt)}))}}),piano_chart_esm_k(piano_chart_esm_ye,piano_chart_esm_Xt),piano_chart_esm_k(piano_chart_esm_ye,piano_chart_esm_pe),piano_chart_esm_O(piano_chart_esm_ye,\"Polyline\");class piano_chart_esm_ge extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"rect\",t),t)}}piano_chart_esm_k(piano_chart_esm_ge,{rx:piano_chart_esm_Nt,ry:piano_chart_esm_St}),piano_chart_esm_i({Container:{rect:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_ge).size(t,e)}))}}),piano_chart_esm_O(piano_chart_esm_ge,\"Rect\");class piano_chart_esm_ve{constructor(){this._first=null,this._last=null}push(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}shift(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}const piano_chart_piano_chart_esm_e={nextDraw:null,frames:new piano_chart_esm_ve,timeouts:new piano_chart_esm_ve,immediates:new piano_chart_esm_ve,timer:()=>piano_chart_esm_p.window.performance||piano_chart_esm_p.window.Date,transforms:[],frame(t){var e=piano_chart_piano_chart_esm_e.frames.push({run:t});return null===piano_chart_piano_chart_esm_e.nextDraw&&(piano_chart_piano_chart_esm_e.nextDraw=piano_chart_esm_p.window.requestAnimationFrame(piano_chart_piano_chart_esm_e._draw)),e},timeout(t,e){e=e||0;var i=piano_chart_piano_chart_esm_e.timer().now()+e,n=piano_chart_piano_chart_esm_e.timeouts.push({run:t,time:i});return null===piano_chart_piano_chart_esm_e.nextDraw&&(piano_chart_piano_chart_esm_e.nextDraw=piano_chart_esm_p.window.requestAnimationFrame(piano_chart_piano_chart_esm_e._draw)),n},immediate(t){var e=piano_chart_piano_chart_esm_e.immediates.push(t);return null===piano_chart_piano_chart_esm_e.nextDraw&&(piano_chart_piano_chart_esm_e.nextDraw=piano_chart_esm_p.window.requestAnimationFrame(piano_chart_piano_chart_esm_e._draw)),e},cancelFrame(t){null!=t&&piano_chart_piano_chart_esm_e.frames.remove(t)},clearTimeout(t){null!=t&&piano_chart_piano_chart_esm_e.timeouts.remove(t)},cancelImmediate(t){null!=t&&piano_chart_piano_chart_esm_e.immediates.remove(t)},_draw(t){for(var e=null,i=piano_chart_piano_chart_esm_e.timeouts.last();(e=piano_chart_piano_chart_esm_e.timeouts.shift())&&(t>=e.time?e.run():piano_chart_piano_chart_esm_e.timeouts.push(e),e!==i););for(var n=null,s=piano_chart_piano_chart_esm_e.frames.last();n!==s&&(n=piano_chart_piano_chart_esm_e.frames.shift());)n.run(t);for(var r=null;r=piano_chart_piano_chart_esm_e.immediates.shift();)r();piano_chart_piano_chart_esm_e.nextDraw=piano_chart_piano_chart_esm_e.timeouts.first()||piano_chart_piano_chart_esm_e.frames.first()?piano_chart_esm_p.window.requestAnimationFrame(piano_chart_piano_chart_esm_e._draw):null}};var piano_chart_esm_we=function(t){var e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}};const piano_chart_esm_be=function(){const t=piano_chart_esm_p.window;return(t.performance||t.Date).now()};class piano_chart_esm_xe extends piano_chart_esm_dt{constructor(t=piano_chart_esm_be){super(),this._timeSource=t,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}schedule(t,e,i){if(null==t)return this._runners.map(piano_chart_esm_we);var n=0,s=this.getEndTime();if(e=e||0,null==i||\"last\"===i||\"after\"===i)n=s;else if(\"absolute\"===i||\"start\"===i)n=e,e=0;else if(\"now\"===i)n=this._time;else{if(\"relative\"!==i)throw new Error('Invalid value for the \"when\" parameter');{const i=this._runners[t.id];i&&(n=i.start+e,e=0)}}t.unschedule(),t.timeline(this);const r=t.persist(),h={persist:null===r?this._persist:r,start:n+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(h),this._runners.sort((t,e)=>t.start-e.start),this._runnerIds=this._runners.map(t=>t.runner.id),this.updateTime()._continue(),this}unschedule(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}getEndTime(){var t=this._runners[this._runnerIds.indexOf(this._lastRunnerId)],e=t?t.runner.duration():0;return(t?t.start:0)+e}getEndTimeOfTimeline(){let t=0;for(var e=0;e<this._runners.length;e++){const n=this._runners[e];var i=n?n.runner.duration():0;const s=(n?n.start:0)+i;s>t&&(t=s)}return t}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}play(){return this._paused=!1,this.updateTime()._continue()}pause(){return this._paused=!0,this._continue()}stop(){return this.time(0),this.pause()}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}speed(t){return null==t?this._speed:(this._speed=t,this)}reverse(t){var e=this.speed();if(null==t)return this.speed(-e);var i=Math.abs(e);return this.speed(t?i:-i)}seek(t){return this.time(this._time+t)}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}persist(t){return null==t?this._persist:(this._persist=t,this)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}_stepFn(t=!1){var e=this._timeSource(),i=e-this._lastSourceTime;t&&(i=0);var n=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=n,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire(\"time\",this._time);for(var s=this._runners.length;s--;){const t=this._runners[s],e=t.runner;this._time-t.start<=0&&e.reset()}for(var r=!1,h=0,o=this._runners.length;h<o;h++){const t=this._runners[h],e=t.runner;let i=n;const s=this._time-t.start;if(s<=0)r=!0;else if(s<i&&(i=s),e.active())if(e.step(i).done){if(!0!==t.persist){e.duration()-e.time()+this._time+t.persist<this._time&&(e.unschedule(),--h,--o)}}else r=!0}return r&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire(\"finished\")),this}_continue(t=!1){return piano_chart_piano_chart_esm_e.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=piano_chart_piano_chart_esm_e.frame(this._step)),this)}active(){return!!this._nextFrame}}piano_chart_esm_i({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new piano_chart_esm_xe,this._timeline):(this._timeline=t,this)}}});class piano_chart_esm_Oe extends piano_chart_esm_dt{constructor(t){super(),this.id=piano_chart_esm_Oe.id++,t=\"function\"==typeof(t=null==t?piano_chart_esm_pt:t)?new piano_chart_esm_te(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=\"number\"==typeof t&&t,this._isDeclarative=t instanceof piano_chart_esm_te,this._stepper=this._isDeclarative?t:new piano_chart_esm_Jt,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new piano_chart_esm_nt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}animate(t,e,i){var n=piano_chart_esm_Oe.sanitise(t,e,i),s=new piano_chart_esm_Oe(n.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(n).schedule(n.delay,n.when)}schedule(t,e,i){if(t instanceof piano_chart_esm_xe||(i=e,e=t,t=this.timeline()),!t)throw Error(\"Runner cannot be scheduled without timeline\");return t.schedule(this,e,i),this}unschedule(){var t=this.timeline();return t&&t.unschedule(this),this}loop(t,e,i){return\"object\"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}delay(t){return this.animate(0,t)}queue(t,e,i,n){return this._queue.push({initialiser:t||piano_chart_esm_ft,runner:e||piano_chart_esm_ft,retarget:i,isTransform:n,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}during(t){return this.queue(null,t)}after(t){return this.on(\"finished\",t)}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}duration(){return this._times*(this._wait+this._duration)-this._wait}loops(t){var e=this._duration+this._wait;if(null==t){var i=Math.floor(this._time/e),n=(this._time-i*e)/this._duration;return Math.min(i+n,this._times)}var s=t%1,r=e*Math.floor(t)+this._duration*s;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){var e,i=this._time,n=this._duration,s=this._wait,r=this._times,h=this._swing,o=this._reverse;if(null==t){const t=function(t){var e=h*Math.floor(t%(2*(s+n))/(s+n)),i=e&&!o||!e&&o,r=Math.pow(-1,i)*(t%(s+n))/n+i;return Math.max(Math.min(r,1),0)};var a=r*(s+n)-s;return e=i<=0?Math.round(t(1e-5)):i<a?t(i):Math.round(t(a-1e-5))}var u=Math.floor(this.loops()),l=h&&u%2==0;return e=u+(l&&!o||o&&l?t:1-t),this.loops(e)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),i=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;var n=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime<n&&this._time>=n;this._lastTime=this._time,s&&this.fire(\"start\",this);var h=this._isDeclarative;if(this.done=!h&&!r&&this._time>=n,this._reseted=!1,i||h){this._initialise(i),this.transforms=new piano_chart_esm_nt;var o=this._run(h?t:e);this.fire(\"step\",this)}return this.done=this.done||o&&h,r&&this.fire(\"finished\",this),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}finish(){return this.step(1/0)}reverse(t){return this._reverse=null==t?!this._reverse:t,this}ease(t){return this._stepper=new piano_chart_esm_Jt(t),this}active(t){return null==t?this.enabled:(this.enabled=t,this)}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){var i=this.timeline();i&&i.play()}}_tryRetarget(t,e,i){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e,i):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var n=this.timeline();return n&&n.play(),!0}return!1}_initialise(t){if(t||this._isDeclarative)for(var e=0,i=this._queue.length;e<i;++e){var n=this._queue[e],s=this._isDeclarative||!n.initialised&&t;t=!n.finished,s&&t&&(n.initialiser.call(this),n.initialised=!0)}}_run(t){for(var e=!0,i=0,n=this._queue.length;i<n;++i){var s=this._queue[i],r=s.runner.call(this,t);s.finished=s.finished||!0===r,e=e&&s.finished}return e}addTransform(t,e){return this.transforms.lmultiplyO(t),this}clearTransform(){return this.transforms=new piano_chart_esm_nt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(t=>!t.isTransform))}static sanitise(t,e,i){var n=1,s=!1,r=0;return e=e||piano_chart_esm_yt,i=i||\"last\",\"object\"!=typeof(t=t||piano_chart_esm_pt)||t instanceof piano_chart_esm_Zt||(e=t.delay||e,i=t.when||i,s=t.swing||s,n=t.times||n,r=t.wait||r,t=t.duration||piano_chart_esm_pt),{duration:t,delay:e,swing:s,times:n,wait:r,when:i}}}piano_chart_esm_Oe.id=0;class piano_chart_esm_Ne{constructor(t=new piano_chart_esm_nt,e=-1,i=!0){this.transforms=t,this.id=e,this.done=i}clearTransformsFromQueue(){}}piano_chart_esm_k([piano_chart_esm_Oe,piano_chart_esm_Ne],{mergeWith(t){return new piano_chart_esm_Ne(t.transforms.lmultiply(this.transforms),t.id)}});const piano_chart_esm_Se=(t,e)=>t.lmultiplyO(e),piano_chart_esm_ke=t=>t.transforms;function piano_chart_esm_Te(){const t=this._transformationRunners.runners.map(piano_chart_esm_ke).reduce(piano_chart_esm_Se,new piano_chart_esm_nt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class piano_chart_esm_Me{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}merge(){let t=null;return this.runners.forEach((e,i)=>{t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))&&(this.remove(e.id),this.edit(t.id,e.mergeWith(t))),t=e}),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}length(){return this.ids.length}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new piano_chart_esm_Ne).forEach(t=>t.clearTransformsFromQueue()),this}}piano_chart_esm_i({Element:{animate(t,e,i){var n=piano_chart_esm_Oe.sanitise(t,e,i),s=this.timeline();return new piano_chart_esm_Oe(n.duration).loop(n).element(this).timeline(s.play()).schedule(n.delay,n.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(piano_chart_esm_ke).reduce(piano_chart_esm_Se,new piano_chart_esm_nt)},_addRunner(t){this._transformationRunners.add(t),piano_chart_piano_chart_esm_e.cancelImmediate(this._frameId),this._frameId=piano_chart_piano_chart_esm_e.immediate(piano_chart_esm_Te.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new piano_chart_esm_Me).add(new piano_chart_esm_Ne(new piano_chart_esm_nt(this))))}}}),piano_chart_esm_k(piano_chart_esm_Oe,{attr(t,e){return this.styleAttr(\"attr\",t,e)},css(t,e){return this.styleAttr(\"css\",t,e)},styleAttr(t,e,i){if(\"object\"==typeof e){for(var n in e)this.styleAttr(t,n,e[n]);return this}var s=new piano_chart_esm_ae(this._stepper).to(i);return this.queue((function(){s=s.from(this.element()[t](e))}),(function(i){return this.element()[t](e,s.at(i)),s.done()})),this},zoom(t,e){if(this._tryRetarget(\"zoom\",piano_chart_esm_Ft,e))return this;var i=new piano_chart_esm_ae(this._stepper).to(new piano_chart_piano_chart_esm_t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,n){e=n,i.to(t)})),this._rememberMorpher(\"zoom\",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget(\"transform\",t))return this;var n=piano_chart_esm_nt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!n;const s=new piano_chart_esm_ae(this._stepper).type(i?piano_chart_esm_le:piano_chart_esm_nt);let r,h,o,a,u;return this.queue((function(){h=h||this.element(),r=r||piano_chart_esm_l(t,h),u=new piano_chart_esm_nt(e?void 0:h),h._addRunner(this),e||h._clearTransformRunnersBefore(this)}),(function(l){e||this.clearTransform();const{x:c,y:d}=new piano_chart_esm_et(r).transform(h._currentTransform(this));let f=new piano_chart_esm_nt({...t,origin:[c,d]}),p=this._isDeclarative&&o?o:u;if(i){f=f.decompose(c,d),p=p.decompose(c,d);const t=f.rotate,e=p.rotate,i=[t-360,t,t+360],n=i.map(t=>Math.abs(t-e)),s=Math.min(...n),r=n.indexOf(s);f.rotate=i[r]}e&&(n||(f.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),s.from(p),s.to(f);const m=s.at(l);return a=m.rotate,o=new piano_chart_esm_nt(m),this.addTransform(o),h._addRunner(this),s.done()}),(function(e){(e.origin||\"center\").toString()!==(t.origin||\"center\").toString()&&(r=piano_chart_esm_l(t,h)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher(\"transform\",s),this},x(t,e){return this._queueNumber(\"x\",t)},y(t){return this._queueNumber(\"y\",t)},dx(t=0){return this._queueNumberDelta(\"x\",t)},dy(t=0){return this._queueNumberDelta(\"y\",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new piano_chart_piano_chart_esm_t(e),this._tryRetarget(t,e))return this;var i=new piano_chart_esm_ae(this._stepper).to(e),n=null;return this.queue((function(){n=this.element()[t](),i.from(n),i.to(n+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(n+new piano_chart_piano_chart_esm_t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;var i=new piano_chart_esm_ae(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new piano_chart_piano_chart_esm_t(e))},cx(t){return this._queueNumber(\"cx\",t)},cy(t){return this._queueNumber(\"cy\",t)},move(t,e){return this.x(t).y(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){var i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber(\"width\",t)},height(t){return this._queueNumber(\"height\",t)},plot(t,e,i,n){if(4===arguments.length)return this.plot([t,e,i,n]);if(this._tryRetarget(\"plot\",t))return this;var s=new piano_chart_esm_ae(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher(\"plot\",s),this},leading(t){return this._queueNumber(\"leading\",t)},viewbox(t,e,i,n){return this._queueObject(\"viewbox\",new piano_chart_esm_ht(t,e,i,n))},update(t){return\"object\"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr(\"stop-opacity\",t.opacity),null!=t.color&&this.attr(\"stop-color\",t.color),null!=t.offset&&this.attr(\"offset\",t.offset),this)}}),piano_chart_esm_k(piano_chart_esm_Oe,{rx:piano_chart_esm_Nt,ry:piano_chart_esm_St,from:piano_chart_esm_Kt,to:piano_chart_esm_Ft}),piano_chart_esm_O(piano_chart_esm_Oe,\"Runner\");class piano_chart_esm_Ae extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"svg\",t),t),this.namespace()}isRoot(){return!(this.node.parentNode&&this.node.parentNode instanceof piano_chart_esm_p.window.SVGElement&&\"#document\"!==this.node.parentNode.nodeName)}root(){return this.isRoot()?this:super.root()}namespace(){return this.isRoot()?this.attr({xmlns:piano_chart_esm_c,version:\"1.1\"}).attr(\"xmlns:xlink\",piano_chart_esm_f,piano_chart_esm_d).attr(\"xmlns:svgjs\",\"http://svgjs.com/svgjs\",piano_chart_esm_d):this.root().namespace()}defs(){return this.isRoot()?piano_chart_esm_b(this.node.querySelector(\"defs\"))||this.put(new piano_chart_esm_zt):this.root().defs()}parent(t){return this.isRoot()?\"#document\"===this.node.parentNode.nodeName?null:piano_chart_esm_b(this.node.parentNode):super.parent(t)}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}}piano_chart_esm_i({Container:{nested:piano_chart_esm_T((function(){return this.put(new piano_chart_esm_Ae)}))}}),piano_chart_esm_O(piano_chart_esm_Ae,\"Svg\",!0);class piano_chart_esm_Ce extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"symbol\",t),t)}}piano_chart_esm_i({Container:{symbol:piano_chart_esm_T((function(){return this.put(new piano_chart_esm_Ce)}))}}),piano_chart_esm_O(piano_chart_esm_Ce,\"Symbol\");var piano_chart_esm_Ee=Object.freeze({__proto__:null,plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(piano_chart_esm_p.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}});class piano_chart_esm_Ie extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"text\",t),t),this.dom.leading=new piano_chart_piano_chart_esm_t(1.3),this._rebuild=!0,this._build=!1}x(t,e=this.bbox()){return null==t?e.x:this.attr(\"x\",this.attr(\"x\")+t-e.x)}y(t,e=this.bbox()){return null==t?e.y:this.attr(\"y\",this.attr(\"y\")+t-e.y)}move(t,e,i=this.bbox()){return this.x(t,i).y(e,i)}cx(t,e=this.bbox()){return null==t?e.cx:this.attr(\"x\",this.attr(\"x\")+t-e.cx)}cy(t,e=this.bbox()){return null==t?e.cy:this.attr(\"y\",this.attr(\"y\")+t-e.cy)}center(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)}text(t){if(void 0===t){var e=this.node.childNodes,i=0;t=\"\";for(var n=0,s=e.length;n<s;++n)\"textPath\"!==e[n].nodeName?(n!==i&&3!==e[n].nodeType&&!0===piano_chart_esm_b(e[n]).dom.newLined&&(t+=\"\\n\"),t+=e[n].textContent):0===n&&(i=1);return t}if(this.clear().build(!0),\"function\"==typeof t)t.call(this,this);else for(var r=0,h=(t=t.split(\"\\n\")).length;r<h;r++)this.tspan(t[r]).newLine();return this.build(!1).rebuild()}leading(t){return null==t?this.dom.leading:(this.dom.leading=new piano_chart_piano_chart_esm_t(t),this.rebuild())}rebuild(t){if(\"boolean\"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,i=0,n=this.dom.leading;this.each((function(){var t=piano_chart_esm_p.window.getComputedStyle(this.node).getPropertyValue(\"font-size\"),s=n*new piano_chart_piano_chart_esm_t(t);this.dom.newLined&&(this.attr(\"x\",e.attr(\"x\")),\"\\n\"===this.text()?i+=s:(this.attr(\"dy\",s+i),i=0))})),this.fire(\"rebuild\")}return this}build(t){return this._build=!!t,this}setData(t){return this.dom=t,this.dom.leading=new piano_chart_piano_chart_esm_t(t.leading||1.3),this}}piano_chart_esm_k(piano_chart_esm_Ie,piano_chart_esm_Ee),piano_chart_esm_i({Container:{text:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_Ie).text(t)})),plain:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_Ie).plain(t)}))}}),piano_chart_esm_O(piano_chart_esm_Ie,\"Text\");class piano_chart_esm_je extends piano_chart_esm_Ie{constructor(t){super(piano_chart_esm_w(\"tspan\",t),t)}text(t){return null==t?this.node.textContent+(this.dom.newLined?\"\\n\":\"\"):(\"function\"==typeof t?t.call(this,this):this.plain(t),this)}dx(t){return this.attr(\"dx\",t)}dy(t){return this.attr(\"dy\",t)}x(t){return this.attr(\"x\",t)}y(t){return this.attr(\"x\",t)}move(t,e){return this.x(t).y(e)}newLine(){var t=this.parent(piano_chart_esm_Ie);this.dom.newLined=!0;var e=piano_chart_esm_p.window.getComputedStyle(this.node).getPropertyValue(\"font-size\"),i=t.dom.leading*new piano_chart_piano_chart_esm_t(e);return this.dy(i).attr(\"x\",t.x())}}piano_chart_esm_k(piano_chart_esm_je,piano_chart_esm_Ee),piano_chart_esm_i({Tspan:{tspan:piano_chart_esm_T((function(t){var e=new piano_chart_esm_je;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)}))}}),piano_chart_esm_O(piano_chart_esm_je,\"Tspan\");class piano_chart_esm_Le extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"clipPath\",t),t)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return piano_chart_esm_ct('svg [clip-path*=\"'+this.id()+'\"]')}}piano_chart_esm_i({Container:{clip:piano_chart_esm_T((function(){return this.defs().put(new piano_chart_esm_Le)}))},Element:{clipWith(t){const e=t instanceof piano_chart_esm_Le?t:this.parent().clip().add(t);return this.attr(\"clip-path\",'url(\"#'+e.id()+'\")')},unclip(){return this.attr(\"clip-path\",null)},clipper(){return this.reference(\"clip-path\")}}}),piano_chart_esm_O(piano_chart_esm_Le,\"ClipPath\");class piano_chart_esm_He extends piano_chart_esm_xt{constructor(t){super(piano_chart_esm_w(\"foreignObject\",t),t)}}piano_chart_esm_i({Container:{foreignObject:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_He).size(t,e)}))}}),piano_chart_esm_O(piano_chart_esm_He,\"ForeignObject\");class piano_chart_esm_De extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"g\",t),t)}x(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}y(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}move(t=0,e=0,i=this.bbox()){const n=t-i.x,s=e-i.y;return this.dmove(n,s)}dx(t){return this.dmove(t,0)}dy(t){return this.dmove(0,t)}dmove(t,e){return this.children().forEach((i,n)=>{const s=i.bbox(),r=new piano_chart_esm_nt(i),h=r.translate(t,e).transform(r.inverse()),o=new piano_chart_esm_et(s.x,s.y).transform(h);i.move(o.x,o.y)}),this}width(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}height(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}size(t,e,i=this.bbox()){const n=piano_chart_esm_u(this,t,e,i),s=n.width/i.width,r=n.height/i.height;return this.children().forEach((t,e)=>{const n=new piano_chart_esm_et(i).transform(new piano_chart_esm_nt(t).inverse());t.scale(s,r,n.x,n.y)}),this}}piano_chart_esm_i({Container:{group:piano_chart_esm_T((function(){return this.put(new piano_chart_esm_De)}))}}),piano_chart_esm_O(piano_chart_esm_De,\"G\");class piano_chart_esm_ze extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"a\",t),t)}to(t){return this.attr(\"href\",t,piano_chart_esm_f)}target(t){return this.attr(\"target\",t)}}piano_chart_esm_i({Container:{link:piano_chart_esm_T((function(t){return this.put(new piano_chart_esm_ze).to(t)}))},Element:{linkTo:function(t){var e=new piano_chart_esm_ze;return\"function\"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),piano_chart_esm_O(piano_chart_esm_ze,\"A\");class piano_chart_esm_Pe extends piano_chart_esm_Dt{constructor(t){super(piano_chart_esm_w(\"mask\",t),t)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return piano_chart_esm_ct('svg [mask*=\"'+this.id()+'\"]')}}piano_chart_esm_i({Container:{mask:piano_chart_esm_T((function(){return this.defs().put(new piano_chart_esm_Pe)}))},Element:{maskWith(t){var e=t instanceof piano_chart_esm_Pe?t:this.parent().mask().add(t);return this.attr(\"mask\",'url(\"#'+e.id()+'\")')},unmask(){return this.attr(\"mask\",null)},masker(){return this.reference(\"mask\")}}}),piano_chart_esm_O(piano_chart_esm_Pe,\"Mask\");class piano_chart_esm_Re extends piano_chart_esm_xt{constructor(t){super(piano_chart_esm_w(\"style\",t),t)}addText(t=\"\"){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule(\"@font-face\",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return\"\";if(!e)return t;var i=t+\"{\";for(var n in e)i+=n.replace(/([A-Z])/g,(function(t,e){return\"-\"+e.toLowerCase()}))+\":\"+e[n]+\";\";return i+=\"}\"}(t,e))}}piano_chart_esm_i(\"Dom\",{style:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_Re).rule(t,e)})),fontface:piano_chart_esm_T((function(t,e,i){return this.put(new piano_chart_esm_Re).font(t,e,i)}))}),piano_chart_esm_O(piano_chart_esm_Re,\"Style\");class piano_chart_esm_Ke extends piano_chart_esm_Ie{constructor(t){super(piano_chart_esm_w(\"textPath\",t),t)}array(){var t=this.track();return t?t.array():null}plot(t){var e=this.track(),i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference(\"href\")}}piano_chart_esm_i({Container:{textPath:piano_chart_esm_T((function(t,e){return t instanceof piano_chart_esm_Ie||(t=this.text(t)),t.path(e)}))},Text:{path:piano_chart_esm_T((function(t,e=!0){var i=new piano_chart_esm_Ke;let n;if(t instanceof piano_chart_esm_fe||(t=this.defs().path(t)),i.attr(\"href\",\"#\"+t,piano_chart_esm_f),e)for(;n=this.node.firstChild;)i.node.appendChild(n);return this.put(i)})),textPath(){return this.findOne(\"textPath\")}},Path:{text:piano_chart_esm_T((function(t){return t instanceof piano_chart_esm_Ie||(t=(new piano_chart_esm_Ie).addTo(this.parent()).text(t)),t.path(this)})),targets(){return piano_chart_esm_ct('svg [href*=\"'+this.id()+'\"]')}}}),piano_chart_esm_Ke.prototype.MorphArray=piano_chart_esm_ie,piano_chart_esm_O(piano_chart_esm_Ke,\"TextPath\");class piano_chart_esm_Fe extends piano_chart_esm_Lt{constructor(t){super(piano_chart_esm_w(\"use\",t),t)}element(t,e){return this.attr(\"href\",(e||\"\")+\"#\"+t,piano_chart_esm_f)}}piano_chart_esm_i({Container:{use:piano_chart_esm_T((function(t,e){return this.put(new piano_chart_esm_Fe).element(t,e)}))}}),piano_chart_esm_O(piano_chart_esm_Fe,\"Use\");const piano_chart_esm_qe=piano_chart_esm_;piano_chart_esm_k([piano_chart_esm_Ae,piano_chart_esm_Ce,piano_chart_esm_Yt,piano_chart_esm_Wt,piano_chart_esm_Vt],piano_chart_esm_n(\"viewbox\")),piano_chart_esm_k([piano_chart_esm_Gt,piano_chart_esm_ye,piano_chart_esm_me,piano_chart_esm_fe],piano_chart_esm_n(\"marker\")),piano_chart_esm_k(piano_chart_esm_Ie,piano_chart_esm_n(\"Text\")),piano_chart_esm_k(piano_chart_esm_fe,piano_chart_esm_n(\"Path\")),piano_chart_esm_k(piano_chart_esm_zt,piano_chart_esm_n(\"Defs\")),piano_chart_esm_k([piano_chart_esm_Ie,piano_chart_esm_je],piano_chart_esm_n(\"Tspan\")),piano_chart_esm_k([piano_chart_esm_ge,piano_chart_esm_Pt,piano_chart_esm_Ht,piano_chart_esm_qt],piano_chart_esm_n(\"radius\")),piano_chart_esm_k(piano_chart_esm_dt,piano_chart_esm_n(\"EventTarget\")),piano_chart_esm_k(piano_chart_esm_bt,piano_chart_esm_n(\"Dom\")),piano_chart_esm_k(piano_chart_esm_xt,piano_chart_esm_n(\"Element\")),piano_chart_esm_k(piano_chart_esm_Lt,piano_chart_esm_n(\"Shape\")),piano_chart_esm_k(piano_chart_esm_Dt,piano_chart_esm_n(\"Container\")),piano_chart_esm_k(piano_chart_esm_Oe,piano_chart_esm_n(\"Runner\")),piano_chart_esm_ut.extend([...new Set(piano_chart_esm_e)]),function(t=[]){piano_chart_esm_de.push(...[].concat(t))}([piano_chart_piano_chart_esm_t,piano_chart_esm_tt,piano_chart_esm_ht,piano_chart_esm_nt,piano_chart_esm_vt,piano_chart_esm_Bt,piano_chart_esm_ie]),piano_chart_esm_k(piano_chart_esm_de,{to(t){return(new piano_chart_esm_ae).type(this.constructor).from(this.valueOf()).to(t)},fromArray(t){return this.init(t),this}});\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\nvar piano_chart_esm_We=function(t,e){return(piano_chart_esm_We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function piano_chart_esm_Ye(t,e){function i(){this.constructor=t}piano_chart_esm_We(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var piano_chart_esm_Be=function(){function t(t){if(\"string\"==typeof t){if(!(t.length>0))throw\"Can't parse this note\";if(this.note=t[0].toUpperCase(),t.length>1){var e=t.substr(1);[\"#\",\"b\"].indexOf(t[1])>-1&&(t.length>2&&t[1]===t[2]?this.accidental=t.substr(1,2):this.accidental=t[1],e=t.substr(this.accidental.toString().length+1)),e.length>0&&(this.octave=Number.parseInt(e))}}else this.note=t.note,this.accidental=t.accidental,this.octave=t.octave;this.toString=this.toString.bind(this)}return Object.defineProperty(t.prototype,\"baseNote\",{get:function(){var t,e=this,i=[{note:\"C\"},{note:\"C\",accidental:\"#\"},{note:\"D\"},{note:\"D\",accidental:\"#\"},{note:\"E\"},{note:\"F\"},{note:\"F\",accidental:\"#\"},{note:\"G\"},{note:\"G\",accidental:\"#\"},{note:\"A\"},{note:\"A\",accidental:\"#\"},{note:\"B\"}],n=i.findIndex((function(t){return t.note===e.note&&t.accidental===e.accidental}));if(n>-1)t={note:i[n].note,accidental:i[n].accidental,octave:this.octave};else{switch(n=i.findIndex((function(t){return t.note===e.note&&void 0===t.accidental})),this.accidental){case\"#\":n+=1;break;case\"##\":n+=2;break;case\"b\":n-=1;break;case\"bb\":n-=2}var s=0;n<0?(n+=12,s=-1):n>11&&(n-=12,s=1),t={note:i[n].note,accidental:i[n].accidental,octave:void 0!==this.octave?this.octave+s:void 0}}return t},enumerable:!0,configurable:!0}),t.prototype.toString=function(){var t=this.note.toString();return void 0!==this.accidental&&(t+=this.accidental.toString()),void 0!==this.octave&&(t+=this.octave.toString()),t},t}(),piano_chart_esm_Ue=function(){function t(){}return t.WHITE_KEY_RATIO=6.4,t.BLACK_KEY_RATIO=6.6,t.WHITE_BLACK_WIDTH_RATIO=1.7,t.NOTE_LIST=[\"C\",\"D\",\"E\",\"F\",\"G\",\"A\",\"B\"],t.BLACK_BASE_NOTE_LIST=[\"C\",\"D\",\"F\",\"G\",\"A\"],t}(),piano_chart_esm_Xe=function(){function t(t,e,i,n){this.container=t,this.onKeyPress=i,this.onKeyRelease=n,this.instrumentSettings=e}return Object.defineProperty(t.prototype,\"boxWidth\",{get:function(){return this.container.bbox().width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"boxHeight\",{get:function(){return this.container.bbox().height},enumerable:!0,configurable:!0}),t.prototype.move=function(t,e){this.container.untransform(),this.container.translate(t,e)},t.prototype.setInstrumentSettings=function(t){this.instrumentSettings=t},t}(),piano_chart_esm_Ge=function(t){function e(e,i,n,s,r,h,o){var a=t.call(this,e,i,n,s)||this;return a.highlightSize=1,a.isPressed=!1,a.isMouseDown=!1,a.width=r,a.height=h,a._note=o,a._displayNote=o,a.addMouseListeners=a.addMouseListeners.bind(a),a.handleInputDown=a.handleInputDown.bind(a),a.handleInputUp=a.handleInputUp.bind(a),a}return piano_chart_esm_Ye(e,t),Object.defineProperty(e.prototype,\"note\",{get:function(){return this._note},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"displayNote\",{get:function(){return this.isHighlighted?this.getNoteIfHighlighted(function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var r=arguments[e],h=0,o=r.length;h<o;h++,s++)n[s]=r[h];return n}(this.instrumentSettings.highlightedNotes,this.instrumentSettings.specialHighlightedNotes)):this._displayNote},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isHighlighted\",{get:function(){return void 0!==this.getNoteIfHighlighted(this.instrumentSettings.highlightedNotes)||this.isSpecialHighlighted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isSpecialHighlighted\",{get:function(){return void 0!==this.getNoteIfHighlighted(this.instrumentSettings.specialHighlightedNotes)},enumerable:!0,configurable:!0}),e.prototype.addMouseListeners=function(){void 0!==this._visual&&(this._visual.on(\"mousedown\",this.handleInputDown),this._visual.on(\"mouseup\",this.handleInputUp),this._visual.on(\"mouseleave\",this.handleInputUp),this._visual.on(\"touchstart\",this.handleInputDown),this._visual.on(\"touchend\",this.handleInputUp))},e.prototype.handleInputDown=function(){this.isMouseDown=!0,void 0!==this.onKeyPress&&this.onKeyPress(this.note)},e.prototype.handleInputUp=function(){this.isMouseDown&&(this.isMouseDown=!1,void 0!==this.onKeyRelease&&this.onKeyRelease(this.note))},e.prototype.press=function(t){this.isPressed=!0,this._displayNote=t,this._label&&\"onpress\"===this.instrumentSettings.showNoteNames&&(this.updateLabel(),this._label.show())},e.prototype.release=function(){this.isPressed=!1,this._label&&\"onpress\"===this.instrumentSettings.showNoteNames&&this._label.hide()},e.prototype.backward=function(){this.container.backward()},e.prototype.accidentalToUnicode=function(t){return t.toString().replace(/#/g,\"♯\").replace(/b/g,\"♭\")},e.prototype.createLabel=function(t){this._label=this.container.group(),this._labelText=this._label.text(\"\"+this.displayNote.note+(this.displayNote.accidental?this.accidentalToUnicode(this.displayNote.accidental):\"\")).fill(t).font({family:\"Helvetica\",size:this.width/2,anchor:\"middle\"}),this._label.attr(\"pointer-events\",\"none\"),this.layout(),\"always\"!==this.instrumentSettings.showNoteNames&&this._label.hide()},e.prototype.updateLabel=function(){this._labelText&&(this._labelText.text(\"\"+this.displayNote.note+(this.displayNote.accidental?this.accidentalToUnicode(this.displayNote.accidental):\"\")),this.layout())},e.prototype.createHighlight=function(t){this.highlightSize=t,this._highlight=this.container.circle(this.highlightSize),this._highlight.center(.5,.5),this._highlight.attr(\"pointer-events\",\"none\");var e=this.instrumentSettings.highlightColor,i=this.instrumentSettings.specialHighlightColor,n=this.container.gradient(\"radial\",(function(t){t.stop(0,\"#fff\"),t.stop(1,e)}));n.attr({cx:.4,cy:.4});var s=this.container.gradient(\"radial\",(function(t){t.stop(0,\"#fff\"),t.stop(1,i)}));s.attr({cx:.4,cy:.4}),this._highlight.fill(this.isSpecialHighlighted?s:n),this.layout()},e.prototype.layout=function(){var t,e,i;null===(t=this._visual)||void 0===t||t.size(this.width,this.height),this._label&&this._labelText&&(this._labelText.font({size:this.width/2}),null===(e=this._label)||void 0===e||e.untransform(),null===(i=this._label)||void 0===i||i.translate(this.width/2,this.height-2*this._labelText.bbox().height),\"onhighlight\"===this.instrumentSettings.showNoteNames&&(this.isHighlighted?this._label.show():this._label.hide())),this._highlight&&(this._highlight.radius(this.highlightSize).untransform().translate(this.width/2,4*this.highlightSize),this.isHighlighted?this._highlight.show():this._highlight.hide())},e.prototype.getNoteIfHighlighted=function(t){var e=void 0!==this.note.baseNote?this.note.baseNote:this.note;return t.find((function(t){var i=void 0!==t.baseNote?t.baseNote:t;return i.note===e.note&&i.accidental===e.accidental&&(i.octave===e.octave||void 0===i.octave)}))},e}(piano_chart_esm_Xe),piano_chart_esm_Ve=function(t){function e(e,i,n,s,r,h){return t.call(this,e,i,n,s,h,h*piano_chart_esm_Ue.WHITE_KEY_RATIO,r)||this}return piano_chart_esm_Ye(e,t),e.prototype.create=function(){this._visual=this.container.rect(this.width,this.height).fill(\"#fff\").stroke({color:\"#000\",width:2}),this.createLabel(\"#000\"),this.createHighlight(this.width/piano_chart_esm_Ue.WHITE_BLACK_WIDTH_RATIO/8),this.addMouseListeners()},e.prototype.resize=function(t){this.width=t,this.height=t*piano_chart_esm_Ue.WHITE_KEY_RATIO,this.layout()},e.prototype.press=function(e){var i,n;\"subtle\"===this.instrumentSettings.keyPressStyle?(n=this.container.gradient(\"linear\",(function(t){t.stop(0,\"#fff\"),t.stop(1,\"#e8e8e8\")}))).attr({x1:0,y1:0,x2:0,y2:1}):n=this.instrumentSettings.vividKeyPressColor,this.isPressed||(t.prototype.press.call(this,e),null===(i=this._visual)||void 0===i||i.fill(n).transform({origin:{x:this.width/2,y:0},skewX:.3}))},e.prototype.release=function(){var e;this.isPressed&&(t.prototype.release.call(this),null===(e=this._visual)||void 0===e||e.fill(\"#fff\").untransform())},e}(piano_chart_esm_Ge),piano_chart_esm_$e=function(t){function e(e,i,n,s,r,h,o){var a=t.call(this,e,i,n,s,o,o*piano_chart_esm_Ue.BLACK_KEY_RATIO,r)||this;return a._baseWhiteKey=h,a}return piano_chart_esm_Ye(e,t),Object.defineProperty(e.prototype,\"baseWhiteKey\",{get:function(){return this._baseWhiteKey},enumerable:!0,configurable:!0}),e.prototype.create=function(){this._visual=this.container.rect(this.width,this.height).fill(\"#000\").stroke({color:\"#000\",width:2}),this.createLabel(\"#fff\"),this.createHighlight(this.width/8),this.addMouseListeners()},e.prototype.resize=function(t){this.width=t,this.height=t*piano_chart_esm_Ue.BLACK_KEY_RATIO,this.layout()},e.prototype.press=function(e){var i,n;\"subtle\"===this.instrumentSettings.keyPressStyle?(n=this.container.gradient(\"linear\",(function(t){t.stop(0,\"#000\"),t.stop(1,\"#555\")}))).attr({x1:0,y1:0,x2:0,y2:1}):(n=(n=new piano_chart_esm_tt(this.instrumentSettings.vividKeyPressColor)).hsl()).l/=1.2,this.isPressed||(t.prototype.press.call(this,e),null===(i=this._visual)||void 0===i||i.fill(n))},e.prototype.release=function(){var e;this.isPressed&&(t.prototype.release.call(this),null===(e=this._visual)||void 0===e||e.fill(\"#000\"))},e}(piano_chart_esm_Ge),piano_chart_esm_Qe=function(t){function e(e,i,n,s,r,h,o,a){var u=t.call(this,e,i,n,s)||this;return u.whiteKeys=[],u.blackKeys=[],u.LABEL_SIZE_RATIO=30,u.container=e,u._octave=r,u.startNote=h,u.endNote=o,u.whiteKeyWidth=a,u.whiteKeyHeight=u.whiteKeyWidth*piano_chart_esm_Ue.WHITE_KEY_RATIO,u}return piano_chart_esm_Ye(e,t),Object.defineProperty(e.prototype,\"octave\",{get:function(){return this._octave},enumerable:!0,configurable:!0}),e.prototype.create=function(){for(var t=!1,e=piano_chart_esm_Ue.NOTE_LIST.indexOf(this.startNote);e<=piano_chart_esm_Ue.NOTE_LIST.indexOf(this.endNote);e++){var i=piano_chart_esm_Ue.NOTE_LIST[e],n=new piano_chart_esm_Ve(this.container.group(),this.instrumentSettings,this.onKeyPress,this.onKeyRelease,new piano_chart_esm_Be({note:i,octave:this._octave}),this.whiteKeyWidth);if(n.create(),this.whiteKeys.push(n),t&&n.backward(),t=!1,piano_chart_esm_Ue.BLACK_BASE_NOTE_LIST.indexOf(i)>-1&&(i!==this.endNote||\"B\"===this.endNote)){var s=new piano_chart_esm_$e(this.container.group(),this.instrumentSettings,this.onKeyPress,this.onKeyRelease,new piano_chart_esm_Be({note:i,accidental:\"#\",octave:this._octave}),n,this.whiteKeyWidth/piano_chart_esm_Ue.WHITE_BLACK_WIDTH_RATIO);s.create(),this.blackKeys.push(s),t=!0}}this.createOctaveNumberLabel()},e.prototype.layout=function(t){var e,i,n=this;this.whiteKeyWidth=t,this.whiteKeyHeight=this.whiteKeyWidth*piano_chart_esm_Ue.WHITE_KEY_RATIO;var s=0;this.whiteKeys.forEach((function(t){t.resize(n.whiteKeyWidth),t.move(s,0),s+=t.boxWidth;var e=n.blackKeys.find((function(e){return e.baseWhiteKey===t}));e&&(e.resize(n.whiteKeyWidth/piano_chart_esm_Ue.WHITE_BLACK_WIDTH_RATIO),e.move(s-e.boxWidth/2,0))})),this._label&&this._labelText&&(this._labelText.font({size:this.whiteKeyHeight/this.LABEL_SIZE_RATIO}),null===(e=this._label)||void 0===e||e.untransform(),null===(i=this._label)||void 0===i||i.translate(this.whiteKeyHeight/this.LABEL_SIZE_RATIO/2,this.whiteKeyHeight-1.5*this._labelText.bbox().height),this.instrumentSettings.showOctaveNumbers?this._label.show():this._label.hide())},Object.defineProperty(e.prototype,\"numberOfWhiteKeys\",{get:function(){return piano_chart_esm_Ue.NOTE_LIST.indexOf(this.endNote)-piano_chart_esm_Ue.NOTE_LIST.indexOf(this.startNote)+1},enumerable:!0,configurable:!0}),e.prototype.keyDown=function(t){var e=new piano_chart_esm_Be(t).baseNote;if(void 0===e.accidental)(i=this.whiteKeys.find((function(t){return t.note.note===e.note})))&&i.press(t);else if(\"#\"===e.accidental){var i;(i=this.blackKeys.find((function(t){return t.note.note===e.note})))&&i.press(t)}},e.prototype.keyUp=function(t){var e=new piano_chart_esm_Be(t).baseNote;if(void 0===e.accidental)(i=this.whiteKeys.find((function(t){return t.note.note===e.note})))&&i.release();else if(\"#\"===e.accidental){var i;(i=this.blackKeys.find((function(t){return t.note.note===e.note})))&&i.release()}},e.prototype.setInstrumentSettings=function(e){t.prototype.setInstrumentSettings.call(this,e),this.whiteKeys.forEach((function(t){return t.setInstrumentSettings(e)})),this.blackKeys.forEach((function(t){return t.setInstrumentSettings(e)}))},e.prototype.createOctaveNumberLabel=function(){this._label=this.container.group(),this._labelText=this._label.text(\"\"+this.octave).fill(\"#000\").font({family:\"Helvetica\",size:this.whiteKeyHeight/this.LABEL_SIZE_RATIO,anchor:\"left\"}),this._label.attr(\"pointer-events\",\"none\")},e}(piano_chart_esm_Xe),piano_chart_esm_Ze=function(t){function e(e,i,n,s,r,h){var o=t.call(this,e,h,i,n)||this;return o.octaves=[],o.availableWidth=s,o.availableHeight=r,o.instrumentSettings=h,o}return piano_chart_esm_Ye(e,t),e.prototype.create=function(){for(var t=this.instrumentSettings.startOctave;t<=this.instrumentSettings.endOctave;t++){var e=new piano_chart_esm_Qe(this.container.group(),this.instrumentSettings,this.onKeyPress,this.onKeyRelease,t,t===this.instrumentSettings.startOctave?this.instrumentSettings.startNote:\"C\",t===this.instrumentSettings.endOctave?this.instrumentSettings.endNote:\"B\",this.whiteKeyWidth);e.create(),this.octaves.push(e)}},e.prototype.layout=function(t,e){var i=this;this.availableWidth=t,this.availableHeight=e;var n=0;this.octaves.forEach((function(t){t.layout(i.whiteKeyWidth),t.move(n,0),n+=t.boxWidth}))},Object.defineProperty(e.prototype,\"numberOfWhiteKeys\",{get:function(){for(var t=0,e=piano_chart_esm_Ue.NOTE_LIST,i=this.instrumentSettings.startOctave;i<=this.instrumentSettings.endOctave;i++)i===this.instrumentSettings.startOctave?this.instrumentSettings.endOctave>this.instrumentSettings.startOctave?t+=7-e.indexOf(this.instrumentSettings.startNote):t=e.indexOf(this.instrumentSettings.endNote)-e.indexOf(this.instrumentSettings.startNote)+1:i===this.instrumentSettings.endOctave?t+=e.indexOf(this.instrumentSettings.endNote)+1:t+=7;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"whiteKeyWidth\",{get:function(){var t=this.availableWidth/this.numberOfWhiteKeys;return t*piano_chart_esm_Ue.WHITE_KEY_RATIO<=this.availableHeight?t:this.availableHeight/piano_chart_esm_Ue.WHITE_KEY_RATIO},enumerable:!0,configurable:!0}),e.prototype.keyDown=function(t){if(this.octaves.length>0&&void 0!==t.octave){var e=new piano_chart_esm_Be(t),i=this.octaves.find((function(t){return t.octave===e.baseNote.octave}));i&&i.keyDown(t)}},e.prototype.keyUp=function(t){if(this.octaves.length>0&&void 0!==t.octave){var e=this.octaves.find((function(e){return e.octave===t.octave}));e&&e.keyUp(t)}},e.prototype.setInstrumentSettings=function(e){t.prototype.setInstrumentSettings.call(this,e),this.octaves.forEach((function(t){return t.setInstrumentSettings(e)}))},e}(piano_chart_esm_Xe),piano_chart_esm_Je=function(){function t(t){this.startOctave=2,this.startNote=\"C\",this.endOctave=6,this.endNote=\"C\",this.showNoteNames=\"onpress\",this.highlightedNotes=[],this.highlightColor=\"#0c0\",this.specialHighlightedNotes=[],this.specialHighlightColor=\"#f00\",this.showOctaveNumbers=!1,this.keyPressStyle=\"subtle\",this.vividKeyPressColor=\"#f33\",this._reloadNeeded=!1,this.applySettings(t)}return Object.defineProperty(t.prototype,\"reloadNeded\",{get:function(){return this._reloadNeeded},enumerable:!0,configurable:!0}),t.prototype.applySettings=function(t){var e=this;this._reloadNeeded=!1,void 0!==t&&(void 0!==t.startOctave&&(this.startOctave=t.startOctave,this._reloadNeeded=!0),void 0!==t.startNote&&(this.startNote=t.startNote,this._reloadNeeded=!0),void 0!==t.endOctave&&(this.endOctave=t.endOctave,this._reloadNeeded=!0),void 0!==t.endNote&&(this.endNote=t.endNote,this._reloadNeeded=!0),void 0!==t.showNoteNames&&(this.showNoteNames=t.showNoteNames,this._reloadNeeded=!0),void 0!==t.highlightedNotes&&(this.highlightedNotes.splice(0),t.highlightedNotes.forEach((function(t){return e.highlightedNotes.push(new piano_chart_esm_Be(t))}))),void 0!==t.highlightColor&&(this.highlightColor=t.highlightColor),void 0!==t.specialHighlightedNotes&&(this.specialHighlightedNotes.splice(0),t.specialHighlightedNotes.forEach((function(t){return e.specialHighlightedNotes.push(new piano_chart_esm_Be(t))}))),void 0!==t.specialHighlightColor&&(this.specialHighlightColor=t.specialHighlightColor),void 0!==t.showOctaveNumbers&&(this.showOctaveNumbers=t.showOctaveNumbers),void 0!==t.keyPressStyle&&(this.keyPressStyle=t.keyPressStyle),void 0!==t.vividKeyPressColor&&(this.vividKeyPressColor=t.vividKeyPressColor))},t}(),piano_chart_esm_ti=function(){function t(t,e){this.keyPressEventHandlers=[],this.keyReleaseEventHandlers=[],this.resizeCounter=0,this.container=t,this.settings=new piano_chart_esm_Je(e),this.create=this.create.bind(this),this.layout=this.layout.bind(this),this.keyDown=this.keyDown.bind(this),this.keyUp=this.keyUp.bind(this),this.destroy=this.destroy.bind(this),this.handleMouseKeyDown=this.handleMouseKeyDown.bind(this),this.handleMouseKeyUp=this.handleMouseKeyUp.bind(this),this.handleResize=this.handleResize.bind(this),this.reload=this.reload.bind(this)}return t.prototype.create=function(){this.img=piano_chart_esm_qe().addTo(this.container).size(\"100%\",\"100%\"),this.img.css(\"-ms-user-select\",\"none\"),this.img.css(\"-webkit-user-select\",\"none\"),this.img.css(\"-moz-user-select\",\"none\"),this.img.css(\"user-select\",\"none\"),this.keybed=new piano_chart_esm_Ze(this.img.group(),this.handleMouseKeyDown,this.handleMouseKeyUp,this.container.clientWidth,this.container.clientHeight,this.settings),this.keybed.create(),this.layout(),window.addEventListener(\"resize\",this.handleResize)},t.prototype.destroy=function(){this.container.removeChild(this.img.node),window.removeEventListener(\"resize\",this.handleResize)},t.prototype.keyDown=function(t){this.keybed&&this.keybed.keyDown(new piano_chart_esm_Be(t))},t.prototype.keyUp=function(t){this.keybed&&this.keybed.keyUp(new piano_chart_esm_Be(t))},t.prototype.addKeyMouseDownListener=function(t){this.keyPressEventHandlers.push(t)},t.prototype.addKeyMouseUpListener=function(t){this.keyReleaseEventHandlers.push(t)},t.prototype.removeKeyMouseDownListener=function(t){void 0!==t?this.keyPressEventHandlers.indexOf(t)>-1&&this.keyPressEventHandlers.splice(this.keyPressEventHandlers.indexOf(t),1):this.keyPressEventHandlers.splice(0)},t.prototype.removeKeyMouseUpListener=function(t){void 0!==t?this.keyReleaseEventHandlers.indexOf(t)>-1&&this.keyReleaseEventHandlers.splice(this.keyReleaseEventHandlers.indexOf(t),1):this.keyReleaseEventHandlers.splice(0)},t.prototype.reload=function(){this.destroy(),this.create()},t.prototype.applySettings=function(t){this.settings.applySettings(t),this.settings.reloadNeded?this.reload():(this.keybed&&this.keybed.setInstrumentSettings(this.settings),this.layout())},t.prototype.handleResize=function(){var t=this;this.resizeCounter++,setTimeout((function(){t.resizeCounter--,t.resizeCounter<=0&&t.layout()}),300)},t.prototype.layout=function(){this.img&&this.keybed&&(this.img.size(\"100%\",\"100%\"),this.keybed.layout(this.container.clientWidth,this.container.clientHeight),this.img.width(this.keybed.boxWidth).height(this.keybed.boxHeight))},t.prototype.handleMouseKeyDown=function(t){this.keyPressEventHandlers.forEach((function(e){return e(t)}))},t.prototype.handleMouseKeyUp=function(t){this.keyReleaseEventHandlers.forEach((function(e){return e(t)}))},t.prototype.rasterize=function(t,e){var i=document.createElement(\"canvas\"),n=document.createElement(\"div\"),s=piano_chart_esm_qe().addTo(n).svg(this.img.svg()).size(this.img.width(),this.img.height());if(e){var r=s.root().group();r.text(e).fill(\"#888\").font({family:\"Helvetica\",size:12,anchor:\"start\"}),s.height(s.height()+r.height()+6),r.translate(s.width()-r.width()-6,s.height()-6)}i.width=s.width(),i.height=s.height();var h=s.svg(),o=i.getContext(\"2d\"),a=window.URL,u=new Image(i.width,i.height);u.setAttribute(\"crossOrigin\",\"anonymous\");var l=new Blob([h],{type:\"image/svg+xml\"}),c=a.createObjectURL(l);u.onload=function(){o.drawImage(u,0,0),a.revokeObjectURL(c),t(i.toDataURL(\"image/png\"))},u.src=c},t}(),piano_chart_esm_ei=function(){function t(t,e){this.notes=[],this.notes=t,this.mode=e}return Object.defineProperty(t.prototype,\"root\",{get:function(){return this.notes.length>0?this.notes[0]:{note:\"C\"}},enumerable:!0,configurable:!0}),t}(),piano_chart_esm_ii=function(){function t(){}return t.getScale=function(e,i){var n=new piano_chart_esm_Be(e).baseNote,s=t.chromatic.notes.findIndex((function(t){return n.note===t.note&&n.accidental===t.accidental})),r=t.modeSteps.get(i),h=[];if(void 0!==r){h.push(n);for(var o=s,a=0;a<r.length;a++)o=(o+r[a])%12,h.push(t.chromatic.notes[o])}return new piano_chart_esm_ei(t.adjustScale(e,h),i)},t.adjustScale=function(e,i){var n=[];return i.forEach((function(i){if(\"b\"===e.accidental&&\"#\"===i.accidental){var s=t.chromatic.notes.findIndex((function(t){return t.note===i.note&&t.accidental===i.accidental}));n.push({note:t.chromatic.notes[s+1].note,accidental:\"b\"})}else n.push(i)})),n},t.chromatic=new piano_chart_esm_ei([new piano_chart_esm_Be(\"C\"),new piano_chart_esm_Be(\"C#\"),new piano_chart_esm_Be(\"D\"),new piano_chart_esm_Be(\"D#\"),new piano_chart_esm_Be(\"E\"),new piano_chart_esm_Be(\"F\"),new piano_chart_esm_Be(\"F#\"),new piano_chart_esm_Be(\"G\"),new piano_chart_esm_Be(\"G#\"),new piano_chart_esm_Be(\"A\"),new piano_chart_esm_Be(\"A#\"),new piano_chart_esm_Be(\"B\")],\"chromatic\"),t.modeSteps=new Map([[\"major\",[2,2,1,2,2,2,1]],[\"minor\",[2,1,2,2,1,2,2]],[\"dorian\",[2,1,2,2,2,1,2]],[\"phrygian\",[1,2,2,2,1,2,2]],[\"lydian\",[2,2,2,1,2,2,1]],[\"mixolydian\",[2,2,1,2,2,1,2]],[\"locrian\",[1,2,2,1,2,2,2]],[\"majorpentatonic\",[2,2,3,2,3]],[\"minorpentatonic\",[3,2,2,3,2]],[\"harmonicminor\",[2,1,2,2,1,3,1]],[\"melodicminor\",[2,1,2,2,2,2,1]]]),t}();\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.less\nvar pn_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.js\n//https://github.com/Tonejs/Tone.js\n\n//https://github.com/ailon/piano-chart\n\n\n/* harmony default export */ var piano_pn_01 = ({\n  name: \"pn-01\",\n  title: \"Piano\",\n  subtitle: \"\",\n  contentSetting: {\n    startOctave: {\n      name: \"Initial octave\",\n      type: \"select\",\n      options: [{\n        title: \"1\",\n        value: \"1\"\n      }, {\n        title: \"2\",\n        value: \"2\"\n      }, {\n        title: \"3\",\n        value: \"3\"\n      }, {\n        title: \"4\",\n        value: \"4\"\n      }, {\n        title: \"5\",\n        value: \"5\"\n      }, {\n        title: \"6\",\n        value: \"6\"\n      }, {\n        title: \"7\",\n        value: \"7\"\n      }, {\n        title: \"8\",\n        value: \"8\"\n      }, {\n        title: \"9\",\n        value: \"9\"\n      }]\n    },\n    endOctave: {\n      name: \"Last octave\",\n      type: \"select\",\n      options: [{\n        title: \"1\",\n        value: \"1\"\n      }, {\n        title: \"2\",\n        value: \"2\"\n      }, {\n        title: \"3\",\n        value: \"3\"\n      }, {\n        title: \"4\",\n        value: \"4\"\n      }, {\n        title: \"5\",\n        value: \"5\"\n      }, {\n        title: \"6\",\n        value: \"6\"\n      }, {\n        title: \"7\",\n        value: \"7\"\n      }, {\n        title: \"8\",\n        value: \"8\"\n      }, {\n        title: \"9\",\n        value: \"9\"\n      }]\n    },\n    endNote: {\n      name: \"Last note on the octave\",\n      type: \"select\",\n      options: [{\n        title: \"C\",\n        value: \"C\"\n      }, {\n        title: \"B\",\n        value: \"B\"\n      }]\n    },\n    answers: {\n      name: \"Correct notes\",\n      type: \"array\",\n      values: {\n        note: {\n          name: \"The right note\",\n          type: \"select\",\n          options: [{\n            title: \"c\",\n            value: \"c\"\n          }, {\n            title: \"c#\",\n            value: \"c#\"\n          }, {\n            title: \"d\",\n            value: \"d\"\n          }, {\n            title: \"d#\",\n            value: \"d#\"\n          }, {\n            title: \"e\",\n            value: \"e\"\n          }, {\n            title: \"f\",\n            value: \"f\"\n          }, {\n            title: \"f#\",\n            value: \"f#\"\n          }, {\n            title: \"g\",\n            value: \"g\"\n          }, {\n            title: \"g#\",\n            value: \"g#\"\n          }, {\n            title: \"a\",\n            value: \"a\"\n          }, {\n            title: \"a#\",\n            value: \"a#\"\n          }, {\n            title: \"h\",\n            value: \"b\"\n          }]\n        },\n        octave: {\n          name: \"Octave\",\n          type: \"select\",\n          options: [{\n            title: \"1\",\n            value: \"1\"\n          }, {\n            title: \"2\",\n            value: \"2\"\n          }, {\n            title: \"3\",\n            value: \"3\"\n          }, {\n            title: \"4\",\n            value: \"4\"\n          }, {\n            title: \"5\",\n            value: \"5\"\n          }, {\n            title: \"6\",\n            value: \"6\"\n          }, {\n            title: \"7\",\n            value: \"7\"\n          }, {\n            title: \"8\",\n            value: \"8\"\n          }, {\n            title: \"9\",\n            value: \"9\"\n          }]\n        }\n      }\n    }\n  },\n  content: {\n    startOctave: 2,\n    endOctave: 5,\n    endNote: \"B\",\n    answers: [{\n      note: \"B\",\n      octave: 2\n    }, {\n      note: \"C\",\n      octave: 2\n    }]\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div id=\\\"pianoContainer\\\"></div>\\n    <div id=\\\"pianoOutput\\\"></div>\\n    <div class=\\\"badAnswersContainer\\\">Po\\u010Det \\u0161patn\\xFDch kl\\xE1ves: <span id=\\\"badAnswers\\\">0</span></div>\\n    <div class=\\\"removeBtnContainer\\\"></div>\\n\";\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var content = builder.params.content;\n      var id = builder.params.id;\n      var app = builder.app;\n      var $piano = $builderEl.find(\"#pianoContainer\");\n      var $pianoOutput = $builderEl.find(\"#pianoOutput\");\n      var $badAnswers = $builderEl.find(\"#badAnswers\");\n      $piano.empty();\n      $pianoOutput.empty();\n      var ended = false;\n\n      // pianoOutput\n\n      var settings = {\n        startOctave: content.startOctave,\n        endOctave: content.endOctave,\n        highlightedNotes: [\"D\", \"E\", \"F#\", \"G\", \"A\", \"B\", \"C#\"],\n        specialHighlightedNotes: [{\n          note: \"D\"\n        }],\n        showNoteNames: \"never\",\n        showOctaveNumbers: true,\n        endNote: content.endNote\n      };\n\n      // $piano[0].destroy();\n\n      var piano = new piano_chart_esm_ti($piano[0], settings);\n      piano.create();\n\n      // piano.keyDown(\"D4\");\n      // piano.keyDown(\"F#4\");\n      // piano.keyDown(\"A4\");\n\n      content.answers.forEach(function (val, index) {\n        if (!val.deleted) {\n          $pianoOutput.append(\"<span class=\\\"note-box\\\" data-filled=\\\"false\\\" data-index=\\\"\".concat(index, \"\\\"></span>\"));\n        }\n      });\n      var badAnswers = 0;\n      piano.addKeyMouseDownListener(function (inote) {\n        if (!ended) {\n          var accidental = \"\";\n          if (inote.accidental) {\n            accidental = inote.accidental;\n          }\n\n          // if (inote.note == \"b\") {\n          //   inote.note = \"h\";\n          // }\n\n          var note = inote.note + accidental + inote.octave;\n          piano.keyDown(note);\n          // $pianoOutput.append(`<span class=\"note-box\">${note}</span>`);\n\n          var $firstBox = $pianoOutput.find('.note-box[data-filled=\"false\"]').eq(0);\n          var $nextBox = $pianoOutput.find('.note-box[data-filled=\"false\"]').eq(1);\n          var index = parseInt($firstBox.attr(\"data-index\"));\n          var correctAnswerObject = content.answers[index];\n          // debugger;\n          // if (correctAnswerObject !== undefined) {\n          var correctAnswer = correctAnswerObject.note + correctAnswerObject.octave;\n          // alert(correctAnswer);\n\n          if (correctAnswer.toLowerCase() === note.toLowerCase()) {\n            $firstBox.html(note.replace(/b/gi, \"h\").toLowerCase());\n            $firstBox.attr(\"data-filled\", true);\n          } else {\n            badAnswers++;\n            $badAnswers.text(badAnswers);\n          }\n          if ($nextBox.length == 0 && correctAnswer.toLowerCase() === note.toLowerCase()) {\n            var removeContainer = $$(\".removeBtnContainer\");\n            removeContainer.append(\"<div class='resetBtn button button-outline'>Restartovat</div>\");\n            var resetBtn = $$(\".resetBtn\");\n            ended = true;\n            resetBtn.off(\"click\");\n            resetBtn.on(\"click\", function (e) {\n              ended = false;\n              badAnswers = 0;\n              $badAnswers.text(badAnswers);\n              // $piano.empty();\n              $pianoOutput.empty();\n              removeContainer.empty();\n              content.answers.forEach(function (val, index) {\n                if (!val.deleted) {\n                  $pianoOutput.append(\"<span class=\\\"note-box\\\" data-filled=\\\"false\\\" data-index=\\\"\".concat(index, \"\\\"></span>\"));\n                }\n              });\n            });\n          }\n          // }\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/impressum/imp-01.less\nvar imp_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/impressum/imp-01.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png\nvar cc_icon = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png\");\nvar cc_icon_default = /*#__PURE__*/__webpack_require__.n(cc_icon);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/impressum/imp-01.js\n\n\n/* harmony default export */ var impressum_imp_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"imp-01\",\n  title: \"Impressum\",\n  subtitle: \"\",\n  contentSetting: {\n    impressum: {\n      name: \"Items of impressum\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Item title\",\n          type: \"textEditor\"\n        },\n        text: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        }\n      }\n    },\n    showLogo: {\n      name: \"Show logo\",\n      type: \"bool\"\n    },\n    logo: {\n      path: {\n        name: \"Image\",\n        type: \"image\"\n      }\n    }\n  },\n  content: {\n    impressum: [{\n      label: \"Název\",\n      text: \"Název knihy\"\n    }, {\n      label: \"Autor\",\n      text: \"Autor Autorovič\"\n    }, {\n      label: \"Vydavatel\",\n      text: \"Vydavatelství\"\n    }, {\n      label: \"ISBN\",\n      text: \"xxx-xx-xxxx-xxx-x\"\n    }],\n    logo: {\n      path: \"\"\n    },\n    showLogo: false\n  },\n  html: function html(content, builder, styles, component) {\n    var year = new Date().getFullYear();\n    var lang = component.app.translation.params.language;\n    var str = \"\";\n    switch (lang) {\n      case \"cs\":\n        str = \"Vytvo\\u0159eno pomoc\\xED software: <a href=\\\"https://www.futurebooks.cz/\\\" class=\\\"external\\\" target=\\\"_blank\\\">Futurebooks.cz</a>, distribuce Softresource, spol. s&nbsp;r.o. \".concat(year, \".\");\n        break;\n      case \"en\":\n      default:\n        str = \"Created with the software: <a href=\\\"https://www.futurebooks.cz/\\\" class=\\\"external\\\" target=\\\"_blank\\\">Futurebooks.cz</a>, distributed by Softresource, spol. s&nbsp;r.o. \".concat(year, \".\");\n        break;\n    }\n    return \"\\n\\n    <div class=\\\"block impressum\\\">\\n    \".concat(content.impressum.map(function (data) {\n      return \"\\n      \".concat(data.text.length > 0 ? \"<div class=\\\"imp-label\\\">\".concat(data.label, \"</div><div class=\\\"imp-text\\\">\").concat(data.text, \"</div>\") : \"\", \"\\n            \");\n    }).join(\"\"), \"\\n      \").concat(content.showLogo ? \"<img src=\\\"\".concat(content.logo.path, \"\\\" style=\\\"max-width: 100%;\\\">\") : \"\", \"\\n    <div class=\\\"imp-label distributor\\\">\\n    \").concat(str, \"\\n    <img style=\\\"width:100px; display: block;\\\" src=\\\"\").concat(cc_icon_default.a, \"\\\">\\n      <span>CC BY-SA 4.0</span>\\n    </div>\\n    <div class=\\\"\\\">\\n\\n    </div>\\n    </div>\\n\\n\");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/popups/pop-01.less\nvar pop_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/popups/pop-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/popups/pop-01.js\n\n/* harmony default export */ var popups_pop_01 = ({\n  name: \"pop-01\",\n  title: \"Popup Window\",\n  type: \"popup\",\n  subtitle: \"with open button\",\n  contentSetting: {\n    buttonText: {\n      name: \"Reveal button text (name of modal)\",\n      type: \"textarea\"\n    },\n    modalHeaderText: {\n      name: \"Modal header title\",\n      type: \"textarea\"\n    },\n    hideInPublished: {\n      name: \"Hide button in reading version\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    buttonText: \"I want to know more\",\n    modalHeaderText: \"Modal header\",\n    hideInPublished: false\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    var isDev = component.app.builder.params.development.enable;\n    return \"\\n\\n    \".concat(content.hideInPublished && !isDev ? \"\" : \"\\n    <a id=\\\"akjdfhoasjd\\\" class=\\\"button button-outline popup-open \".concat(content.hideInPublished ? 'hide-demonstration' : '', \"\\\" href=\\\"#\\\" data-popup=\\\"#modal-\").concat(component.params.id, \"\\\" >\").concat(content.buttonText, \"</a>\\n    \"), \"\\n    <div id=\\\"modal-\").concat(component.params.id, \"\\\" class=\\\"popup builder-popup\\\" data-name=\\\"\").concat(content.buttonText, \"\\\" data-backdrop=\\\"false\\\">\\n    <a class=\\\"link popup-close\\\" style=\\\"float:right;\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n    <div class=\\\"toolbar tabbar\\\">\\n      <div class=\\\"toolbar-inner\\\">\\n       <h2>\").concat(content.modalHeaderText, \"</h2>\\n      </div>\\n    </div>\\n      <div class=\\\"builder-page\\\">\\n        \").concat(component.renderComponents(\"x0\"), \"\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var content = builder.params.content;\n      if (!builder.app.builder.params.development.enable && content.hideInPublished) {\n        var paddingEl = builderEl.find(\".inner-pop-01\");\n        paddingEl.css(\"padding\", \"0px\");\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js\nvar hid_txt_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.less\nvar hid_txt_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.js\n\n/* harmony default export */ var hidden_text_hid_txt_02 = ({\n  name: \"hid-txt-02\",\n  title: \"Hidden text\",\n  subtitle: \"with ejection\",\n  contentSetting: {\n    buttonShow: {\n      name: \"Reveal button text\",\n      type: \"textEditor\"\n    },\n    buttonHide: {\n      name: \"Hide button text\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    buttonShow: \"Odkrýt\",\n    buttonHide: \"Skrýt\"\n  },\n  userContent: {\n    show: false\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <div class=\\\"custom-accordion\\\">\\n      <div class=\\\"accordion-item\\\">\\n        <div class=\\\"button btn-tgl button-outline accordion-item-toggle\\\">\\n          \".concat(userContent.show ? \"\".concat(content.buttonHide) : \"\".concat(content.buttonShow), \"\\n        </div>\\n        <div class=\\\"accordion-item-content\\\">\\n          <p>  \").concat(component.renderComponents(\"x0\"), \"</p>\\n        </div>\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var content = builder.params.content;\n      var userContent = builder.params.userContent;\n      var btnEl = builderEl.find(\".accordion-item-toggle\");\n      btnEl.off(\"click\");\n      btnEl.on(\"click\", function (e) {\n        userContent.show = !userContent.show;\n        if (userContent.show) {\n          btnEl.html(content.buttonHide);\n        } else {\n          btnEl.html(content.buttonShow);\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.less\nvar hid_txt_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.js\n\n/* harmony default export */ var hidden_text_hid_txt_03 = ({\n  name: \"hid-txt-03\",\n  title: \"Hidden text\",\n  subtitle: \"fade in right\",\n  contentSetting: {\n    buttonShow: {\n      name: \"Reveal button text\",\n      type: \"textEditor\"\n    },\n    buttonHide: {\n      name: \"Hide button text\",\n      type: \"textEditor\"\n    },\n    textInside: {\n      name: \"Text inside\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    buttonShow: \"Odkrýt\",\n    buttonHide: \"Skrýt\"\n  },\n  userContent: {\n    show: false,\n    textInside: \"Skrytý text!\"\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <div class=\\\"custom-accordion\\\">\\n      <span class=\\\"button btn-tgl button-outline custom-accordion-item-toggle\\\">\\n        \".concat(userContent.show ? \"\".concat(content.buttonHide) : \"\".concat(content.buttonShow), \"\\n      </span>\\n      <span class=\\\"custom-accordion-item-content\\\">\\n        \").concat(content.textInside, \"\\n      </span>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var content = builder.params.content;\n      var userContent = builder.params.userContent;\n      builderEl.find(\".custom-accordion-item-toggle\").off(\"click\");\n      builderEl.find(\".custom-accordion-item-toggle\").on(\"click\", function () {\n        var showEl = builderEl.find(\".custom-accordion-item-content\");\n        $$(showEl).toggleClass(\"accord-open\");\n        userContent.show = !userContent.show;\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.less\nvar hid_txt_timeline_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.js\n\n/* harmony default export */ var hidden_text_hid_txt_timeline_01 = ({\n  name: \"hid-txt-timeline-01\",\n  title: \"Timeline with text reveal\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    timeline: {\n      name: \"Date/time item on axis\",\n      type: \"array\",\n      values: {\n        dateVal: {\n          name: \"Date\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Časová osa\",\n    timeline: [{\n      dateVal: \"1.1.2020\"\n    }, {\n      dateVal: \"1.4.2020\"\n    }, {\n      dateVal: \"1.8.2020\"\n    }, {\n      dateVal: \"1.12.2020\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var lines = \"\";\n    for (var i = 0; i < content.timeline.length; i++) {\n      var key = content.timeline[i].id;\n      lines = lines + \"<div class=\\\"timeline-item\\\" id=\\\"tl-\".concat(key, \"\\\">\\n        <div class=\\\"timeline-item-date\\\">\").concat(content.timeline[i].dateVal, \"</div>\\n        <div class=\\\"timeline-item-divider\\\"></div>\\n        <div class=\\\"timeline-item-content\\\">\\n          <div class=\\\"timeline-item-inner\\\" data-key=\\\"\").concat(key, \"\\\">\").concat(component.renderComponents(key), \"</div>\\n        </div>\\n      </div>\");\n    }\n    return \"\\n    <div class=\\\"timeline timeline-sides\\\">\\n            \".concat(lines, \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var btns = builderEl.find(\".timeline-item-date\");\n      btns.off(\"click\");\n      btns.on(\"click\", function (e) {\n        var target = $$(e.currentTarget).siblings(\".timeline-item-content\");\n        target.toggleClass(\"showed\");\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/divider/divider-01.less\nvar divider_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/divider/divider-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/divider/divider-01.js\n\n/* harmony default export */ var divider_divider_01 = ({\n  name: \"divider-01\",\n  title: \"Divider\",\n  subtitle: \"Fixed - Half width\",\n  contentSetting: {},\n  content: {},\n  html: function html(content, builder, styles) {\n    return \"<div class=\\\"hr-wrapper\\\"><hr></div>\";\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/divider/divider-02.less\nvar divider_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/divider/divider-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/divider/divider-02.js\n\n/* harmony default export */ var divider_divider_02 = ({\n  name: \"divider-02\",\n  title: \"Divider with text\",\n  subtitle: \"Fixed - Full width\",\n  contentSetting: {\n    text: {\n      name: \"Text of the divider\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    text: \"Oddělovač\"\n  },\n  html: function html(content, builder, styles) {\n    return \"<div class=\\\"divider\\\"><span></span><span>\".concat(content.text, \"</span><span></span></div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tables/table-01.less\nvar _en_tables_table_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tables/table-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tables/table-01.js\n\n/* harmony default export */ var components_en_tables_table_01 = ({\n  name: \"table-01\",\n  title: \"Table\",\n  deleted: true,\n  subtitle: \"\",\n  contentSetting: {\n    tableTitle: {\n      name: \"Table description\",\n      type: \"textEditor\"\n    },\n    border: {\n      name: \"Border type\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Card\",\n        value: \"card-table\"\n      }, {\n        title: \"Border\",\n        value: \"border-table\"\n      }]\n    },\n    rows: {\n      name: \"Number of rows\",\n      type: \"input-number\"\n    },\n    cels: {\n      name: \"Number of columns\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    rows: 2,\n    cels: 3,\n    border: {\n      selected: \"none\"\n    },\n    tableTitle: \"\"\n  },\n  componentsAllowedGroup: \"tableGroup\",\n  html: function html(content, builder, styles, component) {\n    var decor = \"\";\n    switch (content.border.selected) {\n      case \"none\":\n        decor = \"\";\n        break;\n      case \"card-table\":\n        decor = \"card card-content-padding\";\n        break;\n      case \"border-table\":\n        decor = \"border-table\";\n        break;\n    }\n\n    /*<tr>\r\n        <td class=\"label-cell\">Frozen yogurt</td>\r\n        <td class=\"numeric-cell\">159</td>\r\n        ...\r\n        <td class=\"medium-only\">I like it!</td>\r\n      </tr>*/\n    var tableInner = \"\";\n    for (var i = 1; i <= content.rows; i++) {\n      var cells = \"\";\n      for (var x = 1; x <= content.cels; x++) {\n        var key = i + \"_\" + x;\n        cells = cells + \"<td>\".concat(component.renderComponents(key), \"</td>\");\n      }\n      tableInner = tableInner + \"<tr>\".concat(cells, \"</tr>\");\n    }\n    return \"\\n\\n    <div class=\\\"data-table \".concat(decor, \"\\\">\\n  <table>\\n    <tbody>\\n\").concat(tableInner, \"\\n    </tbody>\\n  </table>\\n</div>\\n\").concat(content.tableTitle.length > 0 ? '<div class=\"tableTitle\">' + content.tableTitle + \"</div>\" : \"\", \"\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      // let $block = builderEl;\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tables/table-02.less\nvar table_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tables/table-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tables/table-02.js\n\n/* harmony default export */ var tables_table_02 = ({\n  name: \"table-02\",\n  title: \"Table\",\n  deleted: true,\n  subtitle: \"with data enter\",\n  contentSetting: {\n    tableTitle: {\n      name: \"Table description\",\n      type: \"textEditor\"\n    },\n    border: {\n      name: \"Border type\",\n      type: \"select\",\n      options: [{\n        title: \"None\",\n        value: \"none\"\n      }, {\n        title: \"Card\",\n        value: \"card-table\"\n      }, {\n        title: \"Border\",\n        value: \"border-table\"\n      }]\n    },\n    rows: {\n      name: \"Number of lines\",\n      type: \"input-number\"\n    },\n    cels: {\n      name: \"The number of columns\",\n      type: \"input-number\"\n    },\n    pasteBool: {\n      name: \"Paste from clipboard?\",\n      type: \"bool\",\n      hidden: {\n        colSeparator: {\n          name: \"Column devider\",\n          type: \"textarea\"\n        },\n        rowSeparator: {\n          name: \"Row divider\",\n          type: \"textarea\"\n        },\n        pasteData: {\n          name: \"Paste from clipboard\",\n          type: \"textarea\"\n        },\n        pasteDataButton: {\n          name: \"Load data\",\n          type: \"button\",\n          method: \"moje\"\n        }\n      }\n    }\n  },\n  content: {\n    rows: 2,\n    cels: 3,\n    colSeparator: \"\\t\",\n    rowSeparator: \"\\n\",\n    pasteData: null,\n    pasteBool: false,\n    border: {\n      selected: \"none\"\n    },\n    tableTitle: \"\"\n  },\n  componentsAllowedGroup: \"tableGroup\",\n  html: function html(content, builder, styles, component) {\n    /*<tr>\r\n        <td class=\"label-cell\">Frozen yogurt</td>\r\n        <td class=\"numeric-cell\">159</td>\r\n        ...\r\n        <td class=\"medium-only\">I like it!</td>\r\n      </tr>*/\n\n    var decor = \"\";\n    switch (content.border.selected) {\n      case \"none\":\n        decor = \"\";\n        break;\n      case \"card-table\":\n        decor = \"card card-content-padding\";\n        break;\n      case \"border-table\":\n        decor = \"border-table\";\n        break;\n    }\n    var tableInner = \"\";\n    for (var i = 1; i <= content.rows; i++) {\n      var cells = \"\";\n      for (var x = 1; x <= content.cels; x++) {\n        var key = i + \"_\" + x;\n        cells = cells + \"<td>\".concat(component.renderComponents(key), \"</td>\");\n      }\n      tableInner = tableInner + \"<tr>\".concat(cells, \"</tr>\");\n    }\n    return \"\\n    \".concat(content.tableTitle.length > 0 ? '<div class=\"tableTitle\">' + content.tableTitle + \"</div>\" : \"\", \"\\n    <div class=\\\"data-table \").concat(decor, \"\\\">\\n  <table>\\n    <tbody>\\n\").concat(tableInner, \"\\n    </tbody>\\n  </table>\\n</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      // let $block = builderEl;\n\n      // $block.append(\"<h1>x</h1>\");\n\n      // let data = builder.content.pasteData;\n\n      var $button = builderEl.find(\"#xxx\");\n      $button.off(\"click\");\n      $button.on(\"click\", function () {\n        clip();\n      });\n\n      //zdroj : https://stackoverflow.com/questions/1095131/paste-excel-data-into-html-table\n      // function clip() {\n      //   // get the clipboard text\n\n      //   let clipText = component.params.content.pasteData;\n      //   let clipRows = clipText.split(\"\\n\");\n\n      //   // split rows into columns\n\n      //   for (let i = 0; i < clipRows.length; i++) {\n      //     clipRows[i] = clipRows[i].split(\"\\t\");\n      //   }\n\n      // }\n    }\n  },\n  methods: {\n    moje: function moje() {\n      var component = this;\n      var colSeparator = component.params.content.colSeparator;\n      var rowSeparator = component.params.content.rowSeparator;\n      function render(data, cells, rows) {\n        // alert(\"rendering\");\n\n        for (var val in component.components) {\n          component.components[val].forEach(function (element) {\n            component.app.builder.action.remove(element);\n          });\n        }\n        component.app.builder.history.ignoreAddHistory = true;\n        component.params.content.rows = rows;\n        component.params.content.cels = cells;\n        for (var i = 0; i < data.length; i++) {\n          var cellsToRender = data[i];\n          for (var y = 0; y < cellsToRender.length; y++) {\n            var cellData = cellsToRender[y];\n            var a = i + 1;\n            var b = y + 1;\n            var key = a + \"_\" + b;\n            var obj = {\n              name: \"cell-02\",\n              parentId: component.params.id,\n              subKey: key,\n              content: {\n                data: cellData\n              }\n            };\n            component.app.builder.createComponent(obj, component.params.content.pageId);\n          }\n        }\n        component.app.builder.history.ignoreAddHistory = false;\n        component.app.builder.history.addHistory(component.params.id, \"add\");\n        // component.app.builder.history.ignoreHistory = false;\n\n        // app.builder.history.addHistory(id, \"chapters\", \"chapters\");\n      }\n      function clip() {\n        // get the clipboard text\n        // alert(\"ok\");\n\n        var clipText = component.params.content.pasteData;\n        var clipRows = clipText.split(rowSeparator);\n\n        // split rows into columns\n        var numberOfCels = 0;\n        for (var i = 0; i < clipRows.length; i++) {\n          clipRows[i] = clipRows[i].split(colSeparator);\n          if (clipRows[i].length > numberOfCels) {\n            numberOfCels = clipRows[i].length;\n          }\n        }\n        var numberOfRows = clipRows.length;\n        component.app.dialog.confirm(\"Dojde k přepsání stavajících hodnot tabulky.\", \"Chcete pokračovat?\", function () {\n          render(clipRows, numberOfCels, numberOfRows);\n        });\n      }\n      clip();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.less\nvar cell_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.js\n\n/* harmony default export */ var cells_cell_01 = ({\n  name: \"cell-01\",\n  title: \"Cell with number\",\n  subtitle: \"\",\n  contentSetting: {\n    data: {\n      name: \"Value\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    data: \"1\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"<div class=\\\"numeric-cell\\\">\".concat(content.data, \"</div>\");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.less\nvar cell_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.js\n\n/* harmony default export */ var cells_cell_02 = ({\n  name: \"cell-02\",\n  title: \"Cell with text\",\n  subtitle: \"\",\n  contentSetting: {\n    data: {\n      name: \"Value\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    data: \"1\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"<div class=\\\"text-cell\\\">\".concat(content.data, \"</div>\");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.less\nvar cell_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.js\n\n/* harmony default export */ var cells_cell_03 = ({\n  name: \"cell-03\",\n  title: \"Heading cell\",\n  subtitle: \"\",\n  contentSetting: {\n    data: {\n      name: \"Value\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    data: \"1\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"<div class=\\\"header-cell\\\">\".concat(content.data, \"</div>\");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/hangman.less\nvar hangman = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/hangman.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/hangman.js\n\n/* harmony default export */ var hangman_hangman = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"hang\",\n  title: \"Hangman game\",\n  cast: [\"hang-02\"],\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    wrong: {\n      name: \"Wrong letters title\",\n      type: \"textEditor\"\n    },\n    qPool: {\n      name: \"Answers\",\n      type: \"array\",\n      values: {\n        question: {\n          name: \"Image\",\n          type: \"textEditor\"\n        },\n        answer: {\n          name: \"Answer\",\n          type: \"textEditor\"\n        },\n        hint: {\n          name: \"Help\",\n          type: \"textEditor\"\n        }\n      }\n    },\n    usedLetters: [],\n    currentQuestion: 0,\n    hittedLetters: 0,\n    life: 6\n  },\n  content: {\n    title: \"Hra oběšenec\",\n    wrong: \"Špatná písmena:\",\n    qPool: [{\n      question: \"Hlavní město ČR\",\n      answer: \"Praha\",\n      hint: \"\"\n    }]\n  },\n  html: function html(content, builder, styles, component) {\n    var length = 0;\n    if (content.qPool[0].hasOwnProperty(\"answer\")) {\n      length = content.qPool[0].answer.length;\n      var inputs = \"\";\n      for (var i = 0; i < length; i++) {\n        inputs += \"<span class='letter-input' data-letterId='\".concat(i, \"'></span>\");\n      }\n      var hint = content.qPool[0].hint;\n      return \"\\n        <h2>\".concat(content.title, \"</h2>\\n        <div>\\n            <div class=\\\"hangman-container\\\">\\n\\n                    <div class=\\\"hangman\\\">\\n                    <div class=\\\"trunks\\\">\\n                        <div class=\\\"trunk-1\\\"></div>\\n                        <div class=\\\"trunk-2\\\"></div>\\n                        <div class=\\\"rope\\\">\\n                            <div class=\\\"top-rope\\\"></div>\\n                            <div class=\\\"middle-rope\\\"></div>\\n                            <div class=\\\"bottom-rope\\\"></div>\\n                        </div>\\n                    </div>\\n                    <div class=\\\"person\\\">\\n                        <div class=\\\"head hidden life-5\\\"></div>\\n                        <div class=\\\"person-body hidden life-4\\\"></div>\\n                        <div class=\\\"right-arm hidden life-3\\\"></div>\\n                        <div class=\\\"left-arm hidden life-2\\\"></div>\\n                        <div class=\\\"right-leg hidden life-1\\\"></div>\\n                        <div class=\\\"left-leg hidden life-0\\\" ></div>\\n                    </div>\\n                    </div>\\n\\n                    <div class=\\\"wrong-container\\\">\\n                    \").concat(content.wrong, \"\\n                    <div class=\\\"wrong-letters\\\">\\n\\n                    </div>\\n                    </div>\\n                </div>\\n\\n            <p style=\\\"text-align: center;\\\"><strong class=\\\"question-container\\\">\").concat(content.qPool[0].question, \"</strong></p>\\n            <div class=\\\"letter-container\\\">\\n            \").concat(inputs, \"\\n            </div>\\n            <div class=\\\"hint-container\\\">\\n              <div class=\\\"accordion-item \").concat(hint == \"\" ? \"hide\" : \"\", \"\\\">\\n                <div class=\\\"button btn-tgl button-outline accordion-item-toggle\\\">\\n                    N\\xE1pov\\u011Bda\\n                </div>\\n                <div class=\\\"accordion-item-content\\\">\\n                  <p>  \").concat(hint, \"</p>\\n                </div>\\n              </div>\\n            </div>\\n\\n            <div class=\\\"input-container\\\">\\n            <input autocomplete=\\\"off\\\" type=\\\"text\\\" id=\\\"input-letter\\\" class=\\\"input\\\" maxlength=\\\"1\\\" />\\n            <span class=\\\"icon material-icons input-btn start\\\">\\n            check\\n            </span>\\n            </div>\\n        </div>\\n            \");\n    }\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $block = $builderEl;\n      // alert(builder.params.id);\n      $block.find(\".start\").off(\"click\");\n      $block.find(\".start\").on(\"click\", function (e) {\n        var target = $builderEl.find(\".input\");\n        var letter = $$(target).val();\n        builder.params.methods.tryLetter(letter);\n      });\n      var $target = $builderEl.find(\".input\");\n      $target.keyup(function (e) {\n        if (e.keyCode === 13) {\n          // Enter key = keycode 13\n          // $(this).next().focus();  //Use whatever selector necessary to focus the 'next' input\n          var letter = $target.val();\n          builder.params.methods.tryLetter(letter);\n          return false;\n        }\n      });\n\n      // var input = document.getElementById(\"input-letter\");\n      // input.removeEventListener(\"keyup\", function () {});\n      // input.addEventListener(\"keypress\", function (event) {\n      //   if (event.keyCode === 13) {\n      //     // debugger\n      //     event.preventDefault();\n      //     let target = $builderEl.find(\".input\");\n      //     let letter = $$(target).val();\n      //     builder.params.methods.tryLetter(letter);\n      //     return false;\n      //   }\n      // });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    tryLetter: function tryLetter(letter) {\n      var component = this;\n      letter = letter.toLowerCase();\n      if (letter != \"\" && letter != undefined && letter != \" \") {\n        if (!component.params.contentSetting.usedLetters.includes(letter)) {\n          component.params.methods.checkLetter(letter);\n          component.params.contentSetting.usedLetters.push(letter);\n        } else {\n          component.app.dialog.alert(\"Písmeno již bylo použito!\", \"Pozor!\");\n        }\n      } else {\n        component.app.dialog.alert(\"Neplatný znak!\", \"Pozor!\");\n      }\n      component.$block.find(\".input\").val(\"\");\n      component.$block.find(\".input\").focus();\n    },\n    checkLetter: function checkLetter(letter) {\n      var component = this;\n      var answer = component.params.content.qPool[component.params.contentSetting.currentQuestion].answer;\n      var flag = false;\n      for (var index = 0; index < component.params.content.qPool[component.params.contentSetting.currentQuestion].answer.length; index++) {\n        if (answer[index].toLowerCase() == letter) {\n          component.params.methods.markGood(index, letter);\n          flag = true;\n        }\n      }\n      if (!flag) {\n        var wrongLetters = component.$block.find(\".wrong-letters\");\n        wrongLetters.text(wrongLetters.text() + letter);\n        component.params.methods.takeLife();\n      }\n    },\n    markGood: function markGood(index, letter) {\n      var component = this;\n      var answerLen = component.params.content.qPool[component.params.contentSetting.currentQuestion].answer.length;\n      var inputs = this.$block.find(\".letter-input\");\n      inputs.forEach(function (element) {\n        var $el = $$(element);\n        if ($el.data(\"letterId\") == index) {\n          $el.text(letter);\n        }\n      });\n      component.params.contentSetting.hittedLetters++;\n      if (component.params.contentSetting.hittedLetters == answerLen) {\n        // component.app.dialog.alert(\"Vyhrál jsi!\", \"Gratulujeme!\");\n        component.params.methods.showEnd(1);\n      }\n    },\n    takeLife: function takeLife() {\n      var component = this;\n      component.params.contentSetting.life--;\n      var life = component.params.contentSetting.life;\n      var el = component.$block.find(\".life-\".concat(life));\n      el.removeClass(\"hidden\");\n      if (life == 0) {\n        // component.app.dialog.alert(\"Prohrál jsi!\", \"GameOver!\");\n        component.params.methods.showEnd(0);\n      }\n    },\n    showEnd: function showEnd(flag) {\n      var component = this;\n      var $el = component.$block.find(\".input-container\");\n      var before = $el.html();\n      $el.html(\"\");\n      if (flag) {\n        $el.append(\"<p style='color:green'><strong>Správně!</strong></p>\");\n      } else {\n        $el.append(\"<p style='color:red'><strong>Prohrál jsi!</strong></p>\");\n      }\n      if (component.params.content.qPool.length > component.params.contentSetting.currentQuestion + 1 && flag) {\n        $el.append(\"<span class='icon material-icons input-btn next'>forward</span>\");\n      } else {\n        $el.append(\"<span class='icon material-icons input-btn replay'>replay</span>\");\n      }\n      component.$block.find(\".replay\").on(\"click\", function (e) {\n        $el.html(before);\n        component.params.contentSetting.currentQuestion = 0;\n        component.params.methods.reset(0);\n      });\n      component.$block.find(\".next\").on(\"click\", function (e) {\n        $el.html(before);\n        component.params.contentSetting.currentQuestion += 1;\n        component.params.methods.reset(component.params.contentSetting.currentQuestion);\n      });\n    },\n    //reset????? -> reload komponenty?\n    reset: function reset(position) {\n      var component = this;\n      component.params.contentSetting.usedLetters = [];\n      component.params.contentSetting.life = 6;\n      component.params.contentSetting.hittedLetters = 0;\n\n      //reset doplnovacky\n      var length = component.params.content.qPool[position].answer.length;\n      var inputs = \"\";\n      for (var i = 0; i < length; i++) {\n        inputs += \"<span class='letter-input' data-letterId='\".concat(i, \"'></span>\");\n      }\n\n      //reset otazky\n      component.$block.find(\".question-container\").html(component.params.content.qPool[position].question);\n\n      //reset hint\n      var hint = component.params.content.qPool[position].hint;\n      var hintEl = \"\\n      <div class=\\\"accordion-item \".concat(hint == \"\" ? \"hide\" : \"\", \"\\\">\\n      <div class=\\\"button btn-tgl button-outline accordion-item-toggle\\\">\\n          N\\xE1pov\\u011Bda\\n      </div>\\n      <div class=\\\"accordion-item-content\\\">\\n        <p>  \").concat(hint, \"</p>\\n      </div>\\n    </div>\");\n      var oldHintEl = this.$block.find(\".hint-container\");\n      oldHintEl.html(hintEl);\n\n      //reset písmen\n      component.$block.find(\".wrong-letters\").text(\"\");\n      var oldInputs = this.$block.find(\".letter-container\");\n      oldInputs.html(inputs);\n\n      //reset hangmana\n      var person = component.$block.find(\".person\").children();\n      person.forEach(function (element) {\n        var $el = $$(element);\n        $el.addClass(\"hidden\");\n      });\n\n      //reset start btn\n      component.$block.find(\".start\").off(\"click\");\n      component.$block.find(\".start\").on(\"click\", function (e) {\n        var target = component.$block.find(\".input\");\n        var letter = $$(target).val();\n        component.params.methods.tryLetter(letter);\n      });\n      var input = document.getElementById(\"input-letter\");\n      input.addEventListener(\"keyup\", function (event) {\n        if (event.keyCode === 13) {\n          event.preventDefault();\n          var target = component.$block.find(\".input\");\n          var letter = $$(target).val();\n          component.params.methods.tryLetter(letter);\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.less\nvar hangman_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.less\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg\nvar step_0 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg\");\nvar step_0_default = /*#__PURE__*/__webpack_require__.n(step_0);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg\nvar step_1 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg\");\nvar step_1_default = /*#__PURE__*/__webpack_require__.n(step_1);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg\nvar step_2 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg\");\nvar step_2_default = /*#__PURE__*/__webpack_require__.n(step_2);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg\nvar step_3 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg\");\nvar step_3_default = /*#__PURE__*/__webpack_require__.n(step_3);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg\nvar step_4 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg\");\nvar step_4_default = /*#__PURE__*/__webpack_require__.n(step_4);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg\nvar step_5 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg\");\nvar step_5_default = /*#__PURE__*/__webpack_require__.n(step_5);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg\nvar step_6 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg\");\nvar step_6_default = /*#__PURE__*/__webpack_require__.n(step_6);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg\nvar step_7 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg\");\nvar step_7_default = /*#__PURE__*/__webpack_require__.n(step_7);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.js\n\n\n\n\n\n\n\n\n\n\n\nvar hang02 = lodash_default.a.cloneDeep(hangman_hangman);\nhang02.name = \"hang-02\";\nhang02.title = \"Hangman game 2\";\nhang02.subtitle = \"Falling leaves of a flower\";\nhang02.contentSetting.life = 7;\nhang02.cast = [\"hang\"];\nhang02.html = function (content, builder, styles) {\n  var length = 0;\n  if (content.qPool[0].hasOwnProperty(\"answer\")) {\n    length = content.qPool[0].answer.length;\n    var inputs = \"\";\n    for (var i = 0; i < length; i++) {\n      inputs += \"<span class='letter-input' data-letterId='\".concat(i, \"'></span>\");\n    }\n    var hint = content.qPool[0].hint;\n    return \"\\n      <h2>\".concat(content.title, \"</h2>\\n      <div>\\n          <div class=\\\"hangman-container\\\">\\n            <div class=\\\"hangman\\\">\\n                <img src=\\\"\").concat(step_0_default.a, \"\\\" data-life=\\\"7\\\" class=\\\"life-7 life-img\\\"  />\\n                <img src=\\\"\").concat(step_1_default.a, \"\\\" data-life=\\\"6\\\" class=\\\"hide life-6 life-img\\\" />\\n                <img src=\\\"\").concat(step_2_default.a, \"\\\" data-life=\\\"5\\\" class=\\\"hide life-5 life-img\\\" />\\n                <img src=\\\"\").concat(step_3_default.a, \"\\\" data-life=\\\"4\\\" class=\\\"hide life-4 life-img\\\" />\\n                <img src=\\\"\").concat(step_4_default.a, \"\\\" data-life=\\\"3\\\"  class=\\\"hide life-3 life-img\\\"/>\\n                <img src=\\\"\").concat(step_5_default.a, \"\\\" data-life=\\\"2\\\"  class=\\\"hide life-2 life-img\\\"/>\\n                <img src=\\\"\").concat(step_6_default.a, \"\\\" data-life=\\\"1\\\"  class=\\\"hide life-1 life-img\\\"/>\\n                <img src=\\\"\").concat(step_7_default.a, \"\\\" data-life=\\\"0\\\"  class=\\\"hide life-0 life-img\\\"/>\\n            </div>\\n          <div class=\\\"wrong-container\\\">\\n          \").concat(content.wrong, \"\\n          <div class=\\\"wrong-letters\\\"></div>\\n          </div>\\n         \\n\\n          <p style=\\\"text-align: center;\\\">\\n            <strong class=\\\"question-container\\\">\").concat(content.qPool[0].question, \"</strong>\\n          </p>\\n          <div class=\\\"letter-container\\\">\\n          \").concat(inputs, \"\\n          </div>\\n          <div class=\\\"hint-container\\\">\\n            <div class=\\\"accordion-item \").concat(hint == \"\" ? \"hide\" : \"\", \"\\\">\\n              <div class=\\\"button btn-tgl button-outline accordion-item-toggle\\\">\\n                  N\\xE1pov\\u011Bda\\n              </div>\\n              <div class=\\\"accordion-item-content\\\">\\n                <p>  \").concat(hint, \"</p>\\n              </div>\\n            </div>\\n          </div>\\n\\n          <div class=\\\"input-container\\\">\\n            <input autocomplete=\\\"off\\\" type=\\\"text\\\" id=\\\"input-letter\\\" class=\\\"input\\\" maxlength=\\\"1\\\" />\\n            <span class=\\\"icon material-icons input-btn start\\\">\\n              check\\n            </span>\\n          </div>\\n          </div>\\n      </div>\\n          \");\n  }\n};\nhang02.methods.takeLife = function () {\n  var component = this;\n  var elBefore = component.$block.find(\".life-\".concat(component.params.contentSetting.life));\n  component.params.contentSetting.life--;\n  var life = component.params.contentSetting.life;\n  var el = component.$block.find(\".life-\".concat(life));\n  elBefore.addClass(\"hide\");\n  el.removeClass(\"hide\");\n  if (life == 0) {\n    // component.app.dialog.alert(\"Prohrál jsi!\", \"GameOver!\");\n    component.params.methods.showEnd(0);\n  }\n};\nhang02.methods.reset = function (position) {\n  var component = this;\n  component.params.contentSetting.usedLetters = [];\n  component.params.contentSetting.life = 7;\n  component.params.contentSetting.hittedLetters = 0;\n\n  //reset doplnovacky\n  var length = component.params.content.qPool[position].answer.length;\n  var inputs = \"\";\n  for (var i = 0; i < length; i++) {\n    inputs += \"<span class='letter-input' data-letterId='\".concat(i, \"'></span>\");\n  }\n\n  //reset otazky\n  component.$block.find(\".question-container\").html(component.params.content.qPool[position].question);\n\n  //reset hint\n  var hint = component.params.content.qPool[position].hint;\n  var hintEl = \"\\n  <div class=\\\"accordion-item \".concat(hint == \"\" ? \"hide\" : \"\", \"\\\">\\n  <div class=\\\"button btn-tgl button-outline accordion-item-toggle\\\">\\n      N\\xE1pov\\u011Bda\\n  </div>\\n  <div class=\\\"accordion-item-content\\\">\\n    <p>  \").concat(hint, \"</p>\\n  </div>\\n</div>\");\n  var oldHintEl = this.$block.find(\".hint-container\");\n  oldHintEl.html(hintEl);\n\n  //reset písmen\n  component.$block.find(\".wrong-letters\").text(\"\");\n  var oldInputs = this.$block.find(\".letter-container\");\n  oldInputs.html(inputs);\n\n  //reset hangmana\n  var person = component.$block.find(\".life-img\");\n  person.forEach(function (element) {\n    var $el = $$(element);\n    $el.addClass(\"hide\");\n  });\n  var first = component.$block.find(\".life-7\");\n  var $el = $$(first);\n  $el.removeClass(\"hide\");\n\n  //reset start btn\n  component.$block.find(\".start\").off(\"click\");\n  component.$block.find(\".start\").on(\"click\", function (e) {\n    var target = component.$block.find(\".input\");\n    var letter = $$(target).val();\n    component.params.methods.tryLetter(letter);\n  });\n  var input = document.getElementById(\"input-letter\");\n  input.addEventListener(\"keyup\", function (event) {\n    if (event.keyCode === 13) {\n      event.preventDefault();\n      var target = component.$block.find(\".input\");\n      var letter = $$(target).val();\n      component.params.methods.tryLetter(letter);\n    }\n  });\n};\n/* harmony default export */ var hangman_hangman_02 = (hang02);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js\nvar Winwheel = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js\");\nvar Winwheel_default = /*#__PURE__*/__webpack_require__.n(Winwheel);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js\nvar TweenMax_min = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.less\nvar wheel_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.js\n\n\n\n/* harmony default export */ var wheel_of_fortune_wheel_01 = ({\n  name: \"wheel-01\",\n  title: \"Wheel of fortune\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Header text\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    textSize: {\n      name: \"Size of text inside wheel\",\n      type: \"input-number\"\n    },\n    resultType: {\n      name: \"Show result as\",\n      type: \"select\",\n      options: [{\n        title: \"Segment color\",\n        value: \"color\"\n      }, {\n        title: \"Segment highlight\",\n        value: \"highlight\"\n      }, {\n        title: \"Text\",\n        value: \"text\"\n      }]\n    },\n    segments: {\n      name: \"Segments\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Segment text\",\n          type: \"textarea\"\n        },\n        result: {\n          name: \"Result text\",\n          type: \"textEditor\",\n          help: \"Text will be shown if this segement was selected by wheel. If this field is empty then segment text is shown.\"\n        },\n        color: {\n          name: \"Segment color\",\n          type: \"color\"\n        }\n      }\n    }\n  },\n  content: {\n    title: \"Kolo štěstí\",\n    resultType: \"color\",\n    segments: [{\n      text: \"Hodnota 1\",\n      result: \"\",\n      color: \"#ff0000\"\n    }, {\n      text: \"Hodnota 2\",\n      result: \"\",\n      color: \"#00ff00\"\n    }, {\n      text: \"Hodnota 3\",\n      result: \"\",\n      color: \"#0000ff\"\n    }, {\n      text: \"Hodnota 4\",\n      result: \"\",\n      color: \"#ff00ff\"\n    }]\n  },\n  helpers: {\n    wheel: null,\n    btnRef: null,\n    spinning: false,\n    text: \"\",\n    textSize: 0\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var cursor = component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/ktbb3zfeyebmwy8a13sco2frma065nyqhtgikl9hlsbuw2vu0ocy767tlepr4ysr.svg');\n    return \"\\n    <div class=\\\"wheel-container\\\">\\n    <h2>\".concat(content.title.length > 0 ? \"\".concat(content.title) : \"\", \"</h2>\\n    <div class=\\\"result-container\\\"><div class=\\\"result-text\\\">\").concat(component.params.helpers.text, \"</div></div>\\n    <div class=\\\"game-container\\\">\\n        <div class=\\\"arrow-container\\\">\\n        <img src=\\\"\").concat(component.app.apiManager.replaceMediaServerPlaceholder('{{mediaServerDomain}}/public/2q42k76fav3vs9dxewlo5by2jtep4dfwwu8rq0f0xa67r8ek2fwh1jaxae4mvns8.png'), \"\\\"></img>\\n        </div>\\n        <div class=\\\"canvas-container\\\" style=\\\"cursor: url(\").concat(cursor, \"), pointer;\\\">\\n            <canvas id=\\\"wheel-\").concat(builder.id, \"\\\" width=\\\"600\\\" height=\\\"600\\\" data-responsiveMinWidth=\\\"300\\\" data-responsiveScaleHeight=\\\"true\\\">\\n            <p style=\\\"{color: white}\\\" align=\\\"center\\\">Sorry, your browser doesn't support canvas. Please try another.</p>\\n            </canvas>\\n        </div>\\n    </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(componentEl, component) {\n      var $block = componentEl;\n      var app = component.app;\n      var segments = [];\n      component.params.content.segments.forEach(function (seg) {\n        if (!seg.deleted) {\n          var obj = {\n            text: seg.text,\n            fillStyle: seg.color,\n            id: seg.id\n          };\n          segments.push(obj);\n        }\n      });\n      var cont = componentEl.find(\".canvas-container\");\n      var width = $$(cont).width();\n      var fontSize = component.params.content.textSize;\n      var canvas = componentEl.find(\"#wheel-\".concat(component.params.id));\n      $$(canvas).attr({\n        width: width,\n        height: width\n      });\n      if (fontSize == 0 || !fontSize) {\n        fontSize = window.getComputedStyle(document.querySelector(\":root\")).fontSize;\n        fontSize = fontSize.replaceAll(\"px\", \"\");\n      }\n      var settings = {\n        canvasId: \"wheel-\".concat(component.params.id),\n        numSegments: segments.length,\n        responsive: true,\n        segments: segments,\n        textFontSize: fontSize,\n        pins: {\n          outerRadius: 6,\n          responsive: true\n        },\n        animation: {\n          type: \"spinToStop\",\n          duration: 5,\n          spins: 8,\n          callbackFinished: component.params.methods.spinFinished\n        }\n      };\n\n      //   debugger;\n\n      var wheel = new Winwheel_default.a(settings);\n      component.params.helpers.wheel = wheel;\n      var btn = componentEl.find(\".game-container\");\n      //   component.params.helpers.btnRef = btn;\n\n      btn.on(\"click\", function (e) {\n        component.params.methods.startSpin();\n      });\n    }\n  },\n  methods: {\n    spinFinished: function spinFinished() {\n      // debugger;\n      var wheel = this.params.helpers.wheel;\n      var content = this.params.content;\n      var self = this;\n      var winningSegment = wheel.getIndicatedSegment();\n      var winningSegmentNumber = wheel.getIndicatedSegmentNumber();\n      switch (this.params.content.resultType) {\n        case \"highlight\":\n          for (var x = 1; x < wheel.segments.length; x++) {\n            wheel.segments[x].fillStyle = \"gray\";\n          }\n          wheel.segments[winningSegmentNumber].fillStyle = this.app.book.params.color;\n          break;\n        case \"color\":\n          for (var _x = 1; _x < wheel.segments.length; _x++) {\n            if (winningSegmentNumber != _x) {\n              wheel.segments[_x].fillStyle = \"gray\";\n            }\n          }\n          break;\n        case \"text\":\n          //   let textBlock = `<div class=\"result-container\"><div class=\"result-text\">${winningSegment.text}</div></div>`;\n          //   self.$block.find(\".game-container\").prepend(textBlock);\n          // debugger;\n          var find = _.find(content.segments, function (o) {\n            return !o.deleted && winningSegment.id == o.id;\n          });\n          if (find) {\n            if (find.result && find.result.length > 0) {\n              self.params.helpers.text = find.result;\n            } else {\n              self.params.helpers.text = find.text;\n            }\n          } else {\n            self.params.helpers.text = winningSegment.text;\n          }\n          break;\n      }\n      self.reload();\n      wheel.draw();\n      this.params.helpers.spinning = false;\n      this.$block.find(\".canvas-container\").removeClass(\"spinning\");\n      //   this.params.helpers.btnRef.removeClass(\"disabled\");\n    },\n    startSpin: function startSpin(segment) {\n      var wheel = this.params.helpers.wheel;\n      //   this.params.helpers.btnRef.addClass(\"disabled\");\n      // if (!this.params.helpers.spinning) {\n      this.params.helpers.spinning = true;\n      this.$block.find(\".canvas-container\").addClass(\"spinning\");\n      this.params.methods.resetColors();\n      wheel.stopAnimation(false);\n      wheel.rotationAngle = 0;\n      wheel.draw();\n      setTimeout(function () {\n        wheel.startAnimation();\n      }, 500);\n      // }\n    },\n    resetColors: function resetColors() {\n      var wheel = this.params.helpers.wheel;\n      this.params.helpers.text = \"\";\n      var originalSegments = _.filter(this.params.content.segments, function (o) {\n        return !o.deleted;\n      });\n      for (var x = 1; x < wheel.segments.length; x++) {\n        wheel.segments[x].fillStyle = originalSegments[x - 1].color;\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.less\nvar cross_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.js\n\n\n/* harmony default export */ var crossword_cross_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"cross-01\",\n  title: \"Crossword\",\n  cast: [\"cross-02\"],\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics?\",\n      type: \"bool\"\n    },\n    words: {\n      name: \"Search words\",\n      type: \"array\",\n      values: {\n        question: {\n          name: \"Word description\",\n          type: \"textEditor\"\n        },\n        answer: {\n          name: \"Answer\",\n          help: \"Use only lowercase letters. If you want the letter to be pre-filled, write the letter in uppercase. In case of number, place * before the number. You can alsow use a space between words.\",\n          type: \"textarea\"\n        },\n        offset: {\n          name: \"Secret letter position\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Solve the <b>crossword<b/>\",\n    diacritics: false,\n    words: [{\n      question: \"Four wheel vehicle\",\n      answer: \"car\",\n      offset: 1,\n      value: 1\n    }, {\n      question: \"Citation standard\",\n      answer: \"aPa\",\n      offset: 3,\n      value: 1\n    }, {\n      question: \"God of thunder\",\n      answer: \"thoR\",\n      offset: 1,\n      value: 1\n    }]\n  },\n  helpers: {\n    structure: []\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var structure = [];\n    var rightMenu = \"\";\n    var crossCol = \"large-60\";\n    var questCol = \"large-40\";\n    var findMaxOff = _.maxBy(content.words, function (o) {\n      return parseInt(o.offset);\n    });\n    var findMaxAfterOff = _.maxBy(content.words, function (o) {\n      return parseInt(o.answer.length) - parseInt(o.offset);\n    });\n    if (findMaxAfterOff == undefined || findMaxOff == undefined) {\n      return \"<h2>Chyba ve vykreslen\\xED k\\u0159\\xED\\u017Eovky!</h2>\";\n    }\n    var afterOff = findMaxAfterOff.answer.length - findMaxAfterOff.offset;\n    var maxOffset = findMaxOff.offset;\n    if (parseInt(afterOff) + parseInt(maxOffset) > 13) {\n      crossCol = \"large-100\";\n      questCol = \"large-100\";\n    }\n    // debugger;\n    var order = 0;\n    content.words.forEach(function (element, i) {\n      if (!element.deleted) {\n        var beforeOff = maxOffset - element.offset;\n        // let afterOff = maxDiff - (element.answer.length - element.offset);\n        var beforeOffEl = \"\";\n        for (var index = 0; index < beforeOff; index++) {\n          beforeOffEl += '<span class=\"empty-item\"></span>';\n        }\n        beforeOffEl += '<span class=\"empty-item\">';\n        if (element.answer.length > 0) {\n          order = order + 1;\n          beforeOffEl += order;\n        }\n        beforeOffEl += \"</span>\";\n        var inputsEl = \"\";\n        for (var _index = 0; _index < element.answer.length; _index++) {\n          if (element.answer[_index] != \"*\") {\n            if (_index + 1 == element.offset) {\n              inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item cross-target\" maxlength=\"1\">';\n            } else if (element.answer[_index] == \" \") {\n              inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item cross-space\" maxlength=\"0\" disabled>';\n            } else if (element.answer[_index] === element.answer[_index].toUpperCase() && (isNaN(element.answer[_index]) || !isNaN(element.answer[_index]) && element.answer[_index - 1] == \"*\")) {\n              inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" style=\"font-weight: bold;\" class=\"cross-item\" value=\"' + element.answer[_index] + '\" maxlength=\"0\" disabled>';\n            } else {\n              inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item\" maxlength=\"1\">';\n            }\n          }\n        }\n        structure.push({\n          before: beforeOffEl,\n          inputs: inputsEl,\n          id: element.id\n          // after: afterOff,\n        });\n        if (element.answer.length > 0) {\n          rightMenu += \"<div class=\\\"search-words-element\\\" data-id=\\\"\".concat(element.id, \"\\\">\").concat(order, \". \").concat(element.question, \"</div>\");\n        } else {\n          rightMenu += '<div class=\"search-words-element search-words-element-empty\"></div>';\n        }\n      }\n    });\n    // debugger;\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n    <div class=\\\"row\\\">\\n    <div>\\n        \").concat(structure.map(function (data, index) {\n      return \"<div data-id=\\\"\".concat(data.id, \"\\\" class=\\\"cross-row \").concat(index == 0 ? \"first-row\" : \"row-minus-margin\", \"\\\">\\n            \").concat(data.before, \"\\n            \").concat(data.inputs, \"\\n            </div>\");\n    }).join(\"\"), \"\\n          </div>\\n          <div>\\n          <div class=\\\"search-words\\\">\\n                \").concat(rightMenu, \"\\n          </div>\\n      </div>\\n          </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // builder.params.methods.getStructure();\n      // alert(\"Mount\");\n      $builderEl.find(\".cross-item\").keyup(function (e) {\n        if (this.value.length == this.maxLength) {\n          if ($$(this).next(\".cross-item\").hasClass(\"cross-space\") || $$(this).next(\".cross-item\").is(\":disabled\")) {\n            $$(this).next(\".cross-item\").next(\".cross-item\").focus();\n          }\n          $$(this).next(\".cross-item\").focus();\n        }\n      });\n      $builderEl.find(\".cross-item\").keydown(function (e) {\n        if (e.keyCode == 8) {\n          if (this.value.length != this.maxLength) {\n            // debugger;\n            if ($$(this).prev(\".cross-item\").hasClass(\"cross-space\") || $$(this).prev(\".cross-item\").is(\":disabled\")) {\n              $$(this).prev(\".cross-item\").prev(\".cross-item\").focus();\n            }\n            $$(this).prev(\".cross-item\").focus();\n          }\n        }\n      });\n    }\n  },\n  methods: {\n    // getStructure: function () {\n    //   let component = this;\n    //   let params = component.params;\n    //   let content = params.content;\n    //   let helpers = params.helpers;\n\n    //   helpers.structure = [];\n    //   let findMaxOff = _.maxBy(content.words, (o) => {\n    //     return o.offset;\n    //   });\n    //   let maxOffset = findMaxOff.offset;\n\n    //   content.words.forEach((element, i) => {\n    //     if (!element.deleted) {\n    //       let beforeOff = maxOffset - element.offset;\n    //       // let afterOff = maxDiff - (element.answer.length - element.offset);\n    //       let beforeOffEl = \"\";\n    //       for (let index = 0; index < beforeOff; index++) {\n    //         beforeOffEl += '<span class=\"empty-item\"></span>';\n    //       }\n    //       let order = i + 1;\n    //       beforeOffEl += '<span class=\"empty-item\">' + order + \"</span>\";\n    //       // debugger;\n    //       let inputsEl = \"\";\n    //       for (let index = 0; index < element.answer.length; index++) {\n    //         if (index + 1 == element.offset) {\n    //           inputsEl +=\n    //             '<input type=\"text\" class=\"cross-item cross-target\" maxlength=\"1\">';\n    //         } else {\n    //           inputsEl +=\n    //             '<input type=\"text\" class=\"cross-item\" maxlength=\"1\">';\n    //         }\n    //       }\n\n    //       helpers.structure.push({\n    //         before: beforeOffEl,\n    //         inputs: inputsEl,\n    //         // after: afterOff,\n    //       });\n    //     }\n    //   });\n    //   // debugger;\n    // },\n    eval: function _eval(component, formComponent) {\n      // let component = this;\n      // debugger;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var showCorrectAnswers = formComponent.params.content.showCorrectAnswers;\n      var showResult = formComponent.params.content.showResult;\n      var maxPoints = _.sumBy(component.params.content.words, function (o) {\n        if (o.answer.length > 0 && !o.deleted) {\n          return parseFloat(o.value);\n        } else {\n          return 0;\n        }\n      });\n      var rows = $$($builderEl).find(\".cross-row\");\n      var idList = [];\n      rows.forEach(function (element, index) {\n        var inputs = $$(element).find(\".cross-item\");\n        var $row = $$(element);\n        var answerId = $row.attr(\"data-id\");\n        var answer = \"\";\n        inputs.forEach(function (el) {\n          if ($$(el).hasClass(\"cross-space\")) {\n            answer += \" \";\n          } else {\n            answer += $$(el).val();\n          }\n        });\n        var rightAnsList = _.find(component.params.content.words, {\n          id: answerId\n        });\n        var rightAns = rightAnsList.answer;\n\n        // let rightAns = component.params.content.words[index].answer;\n\n        if (rightAns.length === 0) {\n          return;\n        } else {\n          var rightFlag = false;\n          if (component.params.content.diacritics) {\n            rightFlag = app.utils.removeDiacritics(rightAns).toLowerCase().replaceAll(\"*\", \"\") == app.utils.removeDiacritics(answer).toLowerCase();\n          } else {\n            rightFlag = rightAns.toLowerCase().replaceAll(\"*\", \"\") == answer.toLowerCase();\n          }\n          if (rightFlag) {\n            points += parseFloat(rightAnsList.value);\n            $$(element).addClass(\"result-success\");\n            idList.push(answerId);\n          } else {\n            $$(element).addClass(\"result-fail\");\n          }\n        }\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component, idList);\n      }\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component, rightAns) {\n      var $block = component.$block;\n      var oldEl = $block.find(\".answer\");\n      $$(oldEl).remove();\n      var items = $block.find(\".search-words-element\");\n      items.forEach(function (o) {\n        var id = $$(o).data(\"id\");\n        var res = _.find(component.params.content.words, function (x) {\n          return x.id == id;\n        });\n        var el = \"<div class=\\\"answer \".concat(rightAns.includes(id) ? \"right-answer\" : \"wrong-answer\", \"\\\">\").concat(res.answer.toUpperCase(), \"</div>\");\n        $$(el).insertAfter(o);\n      });\n    },\n    getUserData: function getUserData() {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.less\nvar cross_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.js\n\n\n\nvar cross02 = lodash_default.a.cloneDeep(crossword_cross_01);\ncross02.name = \"cross-02\";\ncross02.subtitle = \"with multiple secrets\";\ncross02.cast = [\"cross-01\"];\ncross02.contentSetting.words.values[\"secret\"] = {\n  name: \"Secret positions\",\n  help: \"Separate positions with ,\",\n  type: \"textarea\"\n};\ncross02.contentSetting.words.values.offset.name = \"Position Prefix\";\ncross02.contentSetting.words.values.offset.help = \"1 = base, 2 = shift by one to left... \";\ncross02.content.words = [{\n  question: \"Four wheel vehicle\",\n  answer: \"car\",\n  offset: 1,\n  value: 1,\n  secret: \"1\"\n}, {\n  question: \"Citation standard\",\n  answer: \"apA\",\n  offset: 3,\n  value: 1,\n  secret: \"1,2\"\n}, {\n  question: \"God of thunder\",\n  answer: \"tHor\",\n  offset: 1,\n  value: 1,\n  secret: \"1,4\"\n}];\ncross02.html = function (content, builder, styles, component, userContent) {\n  var structure = [];\n  var rightMenu = \"\";\n  var crossCol = \"large-60\";\n  var questCol = \"large-40\";\n  var findMaxOff = lodash_default.a.maxBy(content.words, function (o) {\n    return parseInt(o.offset);\n  });\n  var findMaxAfterOff = lodash_default.a.maxBy(content.words, function (o) {\n    return parseInt(o.answer.length) - parseInt(o.offset);\n  });\n  if (findMaxAfterOff == undefined || findMaxOff == undefined) {\n    return \"<h2>Chyba ve vykreslen\\xED k\\u0159\\xED\\u017Eovky!</h2>\";\n  }\n  var afterOff = findMaxAfterOff.answer.length - findMaxAfterOff.offset;\n  var maxOffset = findMaxOff.offset;\n  if (parseInt(afterOff) + parseInt(maxOffset) > 13) {\n    crossCol = \"large-100\";\n    questCol = \"large-100\";\n  }\n  // debugger;\n  var order = 0;\n  content.words.forEach(function (element, i) {\n    if (!element.deleted) {\n      var beforeOff = maxOffset - element.offset;\n      var beforeOffEl = \"\";\n      for (var index = 0; index < beforeOff; index++) {\n        beforeOffEl += '<span class=\"empty-item\"></span>';\n      }\n      beforeOffEl += '<span class=\"empty-item\">';\n      if (element.answer.length > 0) {\n        order = order + 1;\n        beforeOffEl += order;\n      }\n      beforeOffEl += \"</span>\";\n      var inputsEl = \"\";\n      var secretPlaces = element.secret.replace(/\\s/g, \"\").split(\",\");\n      for (var _index = 0; _index < element.answer.length; _index++) {\n        if (element.answer[_index] != \"*\") {\n          var pos = _index + 1;\n          if (secretPlaces.includes(pos.toString())) {\n            inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item cross-target\" maxlength=\"1\">';\n          } else if (element.answer[_index] == \" \") {\n            inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item cross-space\" maxlength=\"0\" disabled>';\n          } else if (element.answer[_index] === element.answer[_index].toUpperCase() && (isNaN(element.answer[_index]) || !isNaN(element.answer[_index]) && element.answer[_index - 1] == \"*\")) {\n            inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" style=\"font-weight: bold;\" class=\"cross-item\" value=\"' + element.answer[_index] + '\" maxlength=\"0\" disabled>';\n          } else {\n            inputsEl += '<input data-pos=\"' + _index + '\" type=\"text\" class=\"cross-item\" maxlength=\"1\">';\n          }\n        }\n      }\n      structure.push({\n        before: beforeOffEl,\n        inputs: inputsEl,\n        id: element.id\n        // after: afterOff,\n      });\n      if (element.answer.length > 0) {\n        rightMenu += \"<div class=\\\"search-words-element\\\" data-id=\\\"\".concat(element.id, \"\\\">\").concat(order, \". \").concat(element.question, \"</div>\");\n      } else {\n        rightMenu += '<div class=\"search-words-element search-words-element-empty\"></div>';\n      }\n    }\n  });\n  // debugger;\n  return \"\\n  <span class=\\\"result-badge\\\"></span>\\n  <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n  <div class=\\\"row\\\">\\n  <div>\\n      \").concat(structure.map(function (data, index) {\n    return \"<div data-id=\\\"\".concat(data.id, \"\\\" class=\\\"cross-row \").concat(index == 0 ? \"first-row\" : \"row-minus-margin\", \"\\\">\\n          \").concat(data.before, \"\\n          \").concat(data.inputs, \"\\n          </div>\");\n  }).join(\"\"), \"\\n        </div>\\n        <div>\\n        <div class=\\\"search-words\\\">\\n              \").concat(rightMenu, \"\\n        </div>\\n    </div>\\n        </div>\\n          \");\n};\n/* harmony default export */ var crossword_cross_02 = (cross02);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js\nvar fw_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.less\nvar mnote_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.js\n// https://demo.swampyplace.com/jsnoteeditor/\n\n\n\n/* harmony default export */ var musicnotation_mnote_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"mnote-01\",\n  title: \"Interactive sheet music\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Video title\",\n      type: \"textEditor\"\n    },\n    resultButton: {\n      name: \"Allow evaluation\",\n      type: \"bool\",\n      hidden: {\n        sheetData: {\n          name: \"JSON with correct answer\",\n          type: \"textarea\"\n        }\n      }\n    }\n  },\n  content: {\n    title: \"Notová osnova\",\n    sheetData: \"\",\n    resultButton: false\n  },\n  html: function html(content, builder, styles) {\n    var res = \"<div class=\\\"resultButton button button-fill\\\">Vyhodnotit</div>\\n    <div class=\\\"saveButton button button-outline\\\">Ulo\\u017Eit jako \\u0158e\\u0161en\\xED</div>\";\n    return \"\\n    <div class=\\\"noteeditor-container\\\">\\n         <h3>\".concat(content.title, \"</h3>\\n         <div class=\\\"noteeditor\\\" id=\\\"\\\">\\n        </div>\\n        <div class=\\\"solutionContainer\\\">\\n        </div>\\n        \").concat(content.resultButton ? res : \"\", \"\\n    </div>\\n           \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var app = builder.app;\n      var $noteWrapper = $builderEl.find(\".noteeditor\");\n      var instance = builder.app.musicSheet.createMusicNotation($noteWrapper, builder.params.content.sheetData);\n\n      // builder.params.instancex = instance;\n\n      // if (builder.params.content.sheetData.length > 0) {\n      //   builder.app.musicSheet.loadJsonNotation(\n      //     instance,\n      //     builder.params.content.sheetData\n      //   );\n      // }\n\n      var $saveBtn = $builderEl.find(\".saveButton\");\n      var $resultBtn = $builderEl.find(\".resultButton\");\n      if (app.builder.params.development.enable) {\n        $$($saveBtn).off(\"click\");\n        $$($saveBtn).on(\"click\", function (e) {\n          // alert(\"save clicked\");\n          builder.params.methods.saveAsDefault(instance);\n        });\n      } else {\n        $saveBtn.hide();\n      }\n      $$($resultBtn).off(\"click\");\n      $$($resultBtn).on(\"click\", function (e) {\n        // alert(\"save clicked\");\n        builder.params.methods.eval(instance);\n      });\n    }\n  },\n  methods: {\n    saveAsDefault: function saveAsDefault(instance) {\n      var component = this;\n      var i = instance;\n      // debugger\n      var json = instance.func(\"getJSON\");\n      component.params.content.sheetData = json;\n      component.app.dialog.alert(\"Noty byly uloženy!\", \"Notová osnova!\");\n    },\n    eval: function _eval(instance) {\n      var component = this;\n      var json = JSON.parse(instance.func(\"getJSON\"));\n      var result = JSON.parse(component.params.content.sheetData);\n      var points = 0;\n      var maxPoints = result.notes.length;\n      var errPos = [];\n      if (result.notes.length > json.notes.length) {\n        result.notes.forEach(function (element, index) {\n          if (_.isEqual(element, json.notes[index])) {\n            points++;\n          } else {\n            errPos.push(index + 1);\n          }\n        });\n      } else {\n        json.notes.forEach(function (element, index) {\n          if (_.isEqual(element, result.notes[index])) {\n            points++;\n          } else {\n            errPos.push(index + 1);\n          }\n        });\n      }\n      var $solEl = $$(component.$block).find(\".solutionContainer\");\n      $solEl.html(\" \");\n      var $result = \"\\n        <div class=\\\"points\\\">V\\xFDsledek: <strong>\".concat(points, \"/\").concat(maxPoints, \"</strong></div>\\n      \");\n      if (errPos.length > 0) {\n        $result += \"<div class=\\\"errors\\\">Chyba na pozici: <strong>\".concat(errPos, \"</strong></div>\");\n      }\n      $solEl.append($result);\n      if (points == maxPoints) {\n        $$($solEl).find(\".points\").addClass(\"success\");\n      } else {\n        $$($solEl).find(\".points\").addClass(\"fail\");\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.less\nvar table_input_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.js\n\n\nvar table_input_01_myoBj;\n/* harmony default export */ var table_input_table_input_01 = (table_input_01_myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"table-input-01\",\n  title: \"Table with inputs\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics?\",\n      type: \"bool\"\n    },\n    points: {\n      name: \"Evaluate answer with points?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity?\",\n      type: \"bool\"\n    },\n    spaces: {\n      name: \"Ignore spaces?\",\n      type: \"bool\"\n    },\n    head: {\n      name: \"First row as heading?\",\n      type: \"bool\"\n    },\n    rows: {\n      name: \"Row\",\n      type: \"array\",\n      values: {\n        cells: {\n          name: \"Column\",\n          type: \"array\",\n          values: {\n            text: {\n              name: \"Cell text\",\n              type: \"textEditor\"\n            },\n            inputBool: {\n              name: \"Cell with input\",\n              type: \"bool\",\n              hidden: {\n                correctAnswers: {\n                  name: \"Correct answer (one or more)\",\n                  type: \"array\",\n                  values: {\n                    value: {\n                      name: \"Correct answer\",\n                      type: \"textarea\"\n                    },\n                    point: {\n                      name: \"Point value.\",\n                      type: \"input-number\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>Fill the table</b> with values for variable B\",\n    diacritics: false,\n    uppercase: false,\n    spaces: false,\n    points: true,\n    head: true,\n    rows: [{\n      cells: [{\n        text: \"A + B = 2\",\n        inputBool: false\n      }, {\n        text: \"A * B = 21\",\n        inputBool: false\n      }, {\n        text: \"A / B = 18\",\n        inputBool: false\n      }]\n    }, {\n      cells: [{\n        text: \"A = 1\",\n        inputBool: false\n      }, {\n        text: \"A = 3\",\n        inputBool: false\n      }, {\n        text: \"A = 72\",\n        inputBool: false\n      }]\n    }, {\n      cells: [{\n        text: \"1\",\n        inputBool: false\n      }, {\n        text: \"\",\n        inputBool: true,\n        correctAnswers: [{\n          value: 7,\n          point: 1\n        }]\n      }, {\n        text: \"\",\n        inputBool: true,\n        correctAnswers: [{\n          value: 4,\n          point: 1\n        }]\n      }]\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n\\n    <div class=\\\"table-container swiper-no-swiping\\\">\\n    <table>\\n    <tbody>\\n    \".concat(content.rows.map(function (rowData, index) {\n      return \"\\n          <tr class=\\\"\".concat(index == 0 && content.head ? \"thead\" : \"\", \"\\\">\\n          \").concat(rowData.cells.map(function (data, i) {\n        return \"\\n              <td class=\\\"\".concat(data.inputBool ? \"input-td\" : \"\", \"\\\">\\n                \").concat(data.text.length > 0 ? data.text : \"\", \"\\n                \").concat(data.inputBool ? \"<textarea class=\\\"user-input\\\" autocomplete=\\\"off\\\" type=\\\"text\\\" id=\\\"\".concat(builder.id + \"_\" + index + \"-\" + i, \"\\\" placeholder=\\\"\\\">\").concat(userContent.data[\"\".concat(builder.id, \"_\").concat(index, \"-\").concat(i)] ? userContent.data[\"\".concat(builder.id, \"_\").concat(index, \"-\").concat(i)] : '', \"</textarea>\") : \"\", \"\\n              </td>\");\n      }).join(\"\"), \"\\n          </tr>\\n        \");\n    }).join(\"\"), \"\\n    </tbody>\\n  </table>\\n  \").concat(content.label.length > 0 ? \"<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n    </div>\\n\\n\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var inputs = $builderEl.find(\"textarea\");\n      inputs.on('change', function (e) {\n        builder.params.methods.answerEmittor($builderEl, builder);\n        builder.params.methods.getUserData();\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var inputs = $builderEl.find(\"textarea\");\n      var res = true;\n      inputs.forEach(function (el) {\n        var text = el.value;\n        if (text.length == 0) {\n          res = false;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      var inputs = component.$block.find(\".user-input\");\n      inputs.forEach(function (inp) {\n        var val = $$(inp).val();\n        var id = $$(inp).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          ;\n        }\n      });\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var checkAnswers = component.params.content.points;\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n\n      //  let $inputs = $builderEl.find(\"input\");\n      var $inputs = $builderEl.find(\"textarea\");\n      var answerPool = [];\n      var index = 0;\n      component.params.content.rows.forEach(function (rows) {\n        if (!rows.deleted) {\n          var i = 0;\n          rows.cells.forEach(function (cells) {\n            if (!cells.deleted) {\n              if (cells.hasOwnProperty(\"correctAnswers\")) {\n                var obj = {};\n                obj[\"id\"] = index + \"-\" + i;\n                obj[\"answers\"] = [];\n                cells.correctAnswers.forEach(function (answer) {\n                  obj[\"answers\"].push(answer);\n                });\n                answerPool.push(obj);\n              }\n              i++;\n            }\n          });\n          index++;\n        }\n      });\n      $inputs.forEach(function (element, i) {\n        $$(element).parent(\"td\").removeClass(\"success\");\n        $$(element).parent(\"td\").removeClass(\"fail\");\n        if (checkAnswers) {\n          var id = element.id.split(\"_\")[1];\n          // debugger;\n          var answer = $$(element).val();\n          var findInAnswer = _.find(answerPool, function (o) {\n            return o.id == id;\n          });\n          var mPoints = _.maxBy(findInAnswer.answers, function (o) {\n            return o.point;\n          });\n          maxPoints += parseFloat(mPoints.point);\n          var ans = _.find(findInAnswer.answers, function (o) {\n            var ra = o.value;\n            ra = self.params.methods.parse(ra, uppercase, diacritic, spaces);\n            answer = self.params.methods.parse(answer, uppercase, diacritic, spaces);\n            var predefAnswer = self.params.methods.parse(o.value, uppercase, diacritic, spaces);\n            return predefAnswer == answer && !o.deleted;\n          });\n          if (ans) {\n            points += parseFloat(ans.point);\n            if (showResult) {\n              $$(element).parent(\"td\").addClass(\"success\");\n            }\n          } else {\n            if (showResult) {\n              $$(element).parent(\"td\").addClass(\"fail\");\n            }\n          }\n        }\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      // debugger;\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    parse: function parse(word, uppercase, diacritic, spaces) {\n      if (uppercase) {\n        word = word.toUpperCase();\n      }\n      if (diacritic) {\n        word = word.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n      }\n      if (spaces) {\n        word = word.replace(/\\s+/g, \"\");\n      }\n      return word;\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\"input\");\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var answerPool = [];\n      var index = 0;\n      component.params.content.rows.forEach(function (rows) {\n        if (!rows.deleted) {\n          var i = 0;\n          rows.cells.forEach(function (cells) {\n            if (!cells.deleted) {\n              if (cells.hasOwnProperty(\"correctAnswers\")) {\n                var obj = {};\n                obj[\"id\"] = index + \"-\" + i;\n                obj[\"answers\"] = [];\n                cells.correctAnswers.forEach(function (answer) {\n                  obj[\"answers\"].push(answer);\n                });\n                answerPool.push(obj);\n              }\n              i++;\n            }\n          });\n          index++;\n        }\n      });\n      $inputs.forEach(function (element, i) {\n        var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n        var id = element.id.split(\"_\")[1];\n        // debugger;\n        var answer = $$(element).val();\n        var findInAnswer = _.find(answerPool, function (o) {\n          return o.id == id;\n        });\n        var answerString = \"\";\n        var flag = false;\n        var rightAnswers = findInAnswer.answers;\n        for (var _i = 0; _i < rightAnswers.length; _i++) {\n          answerString += rightAnswers[_i].value + \" (\" + rightAnswers[_i].point + \"b)\";\n          if (_i != rightAnswers.length - 1) {\n            answerString += \", \";\n          }\n          var ra = self.params.methods.parse(rightAnswers[_i].value, uppercase, diacritic, spaces);\n          var el = self.params.methods.parse(answer, uppercase, diacritic, spaces);\n          if (ra == el) {\n            flag = true;\n          }\n        }\n        if (rightAnswers.length > 0) {\n          $$(answerIcon).insertAfter($$(element));\n          var target = $$(element).next(\".solution\");\n          if (flag) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: answerString\n          });\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js\nvar table_radio_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js\nvar side_menu_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js\nvar side_menu_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js\nvar side_menu_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.less\nvar tab_menu_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.js\n\n/* harmony default export */ var tabs_tab_menu_01 = ({\n  name: \"tab-menu-01\",\n  title: \"Layout with menu\",\n  subtitle: \"tabs\",\n  deleted: true,\n  contentSetting: {\n    label: {\n      name: \"Menu title\",\n      type: \"textEditor\"\n    },\n    defaultTab: {\n      name: \"Default open tab index\",\n      type: \"input-number\",\n      help: \"0 = all closed, 1 = first open ...\"\n    },\n    layoutItems: {\n      name: \"Tabs in menu\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Podkapitoly\",\n    defaultTab: 1,\n    layoutItems: [{\n      item: \"Podkapitola 1\"\n    }, {\n      item: \"Podkapitola 2\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    var layoutCont = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = builder.id + \"_\" + index;\n      menu += \"<a href=\\\"#\".concat(key, \"\\\" class=\\\"tab-link \").concat(content.defaultTab == index + 1 ? \"tab-link-active\" : \"\", \"\\\">\").concat(el.item, \"</a>\");\n      layoutCont += \"<div id=\\\"\".concat(key, \"\\\" class=\\\"tab \").concat(content.defaultTab == index + 1 ? \"tab-active\" : \"\", \"\\\"><div class=\\\"block\\\">\").concat(component.renderComponents(key), \"</div></div>\");\n    });\n    return \"\\n    <div class=\\\"tab-layout\\\">\\n\\n      <div class=\\\"toolbar tabbar\\\">\\n        <div class=\\\"toolbar-inner\\\">\\n          \".concat(menu, \"\\n        </div>\\n      </div>\\n      <div class=\\\"tabs-animated-wrap\\\">\\n        <div class=\\\"tabs\\\">\\n          \").concat(layoutCont, \"\\n        </div>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.less\nvar tab_menu_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.js\n\n/* harmony default export */ var tabs_tab_menu_02 = ({\n  name: \"tab-menu-02\",\n  title: \"Tabs\",\n  subtitle: \"with show/hide toggle\",\n  contentSetting: {\n    // label: {\n    //   name: \"Menu title\",\n    //   type: \"textEditor\",\n    // },\n    defaultTab: {\n      name: \"Default open tab index\",\n      type: \"input-number\",\n      help: \"0 = all closed, 1 = first open ...\"\n    },\n    layoutItems: {\n      name: \"Tabs in menu\",\n      type: \"array\",\n      values: {\n        icon: {\n          name: \"Icon item\",\n          type: \"icon\"\n        },\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    //label: \"Podkapitoly\",\n    defaultTab: 1,\n    layoutItems: [{\n      item: \"Podkapitola 1\",\n      icon: \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"logo_google\\\"></i>\"\n    }, {\n      item: \"Podkapitola 2\",\n      icon: \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"logo_google\\\"></i>\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    var layoutCont = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = \"tab_\" + el.id;\n      var key2 = \"tab_\" + builder.id + el.id;\n      menu += \"<span  data-id=\\\"\".concat(key2, \"\\\" class=\\\"tab-link custom-tab-link \").concat(content.defaultTab == index + 1 ? \"custom-tab-link-active\" : \"\", \"\\\">\").concat(el.icon && el.icon.length > 0 ? \"<span class=\\\"icon-container\\\">\".concat(el.icon, \"</span>\") : \"\", \" \").concat(el.item, \"</span>\");\n      layoutCont += \"<div id=\\\"\".concat(key2, \"\\\" class=\\\"custom-tab \").concat(content.defaultTab == index + 1 ? \"custom-tab-active\" : \"\", \"\\\"><div class=\\\"block\\\">\").concat(component.renderComponents(key), \"</div></div>\");\n    });\n    return \"\\n    <div class=\\\"custom-tab-layout\\\">\\n\\n      <div class=\\\"toolbar tabbar\\\">\\n        <div class=\\\"toolbar-inner\\\">\\n          \".concat(menu, \"\\n        </div>\\n      </div>\\n      <div class=\\\"tabs-wrap\\\">\\n        <div class=\\\"tabs\\\">\\n          \").concat(layoutCont, \"\\n        </div>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      //Remove f7 element, který blokuje styly\n      setTimeout(function () {\n        var high = builderEl.find(\".tab-link-highlight\");\n        high.remove();\n      }, 500);\n      var $buttons = builderEl.find(\".custom-tab-link\");\n      $buttons.off(\"click\");\n      $buttons.on(\"click\", function (e) {\n        var target = $$(e.target);\n        if (!target.hasClass(\"custom-tab-link\")) {\n          target = target.parents(\".custom-tab-link\");\n        }\n        var id = target.data(\"id\");\n        var old = builderEl.find(\".custom-tab-active\");\n        old.removeClass(\"custom-tab-active\");\n        if (!target.hasClass(\"custom-tab-link-active\")) {\n          var tab = builderEl.find(\"#\".concat(id));\n          var oldLink = builderEl.find(\".custom-tab-link-active\");\n          oldLink.removeClass(\"custom-tab-link-active\");\n          tab.addClass(\"custom-tab-active\");\n          target.addClass(\"custom-tab-link-active\");\n        } else {\n          target.removeClass(\"custom-tab-link-active\");\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.less\nvar tab_menu_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.js\n\n/* harmony default export */ var tabs_tab_menu_03 = ({\n  name: \"tab-menu-03\",\n  title: \"Layout with menu\",\n  subtitle: \"tabs\",\n  contentSetting: {\n    label: {\n      name: \"Menu title\",\n      type: \"textEditor\"\n    },\n    defaultTab: {\n      name: \"Default open tab index\",\n      type: \"input-number\",\n      help: \"0 = all closed, 1 = first open ...\"\n    },\n    layoutItems: {\n      name: \"Tabs in menu\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Podkapitoly\",\n    defaultTab: 1,\n    layoutItems: [{\n      item: \"Podkapitola 1\"\n    }, {\n      item: \"Podkapitola 2\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    var layoutCont = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = \"tab_\" + el.id;\n      var key2 = \"tab_\" + builder.id + el.id;\n      menu += \"<a href=\\\"#\".concat(key2, \"\\\" class=\\\"tab-link \").concat(content.defaultTab == index + 1 ? \"tab-link-active\" : \"\", \"\\\">\").concat(el.item, \"</a>\");\n      layoutCont += \"<div id=\\\"\".concat(key2, \"\\\" class=\\\"tab \").concat(content.defaultTab == index + 1 ? \"tab-active\" : \"\", \"\\\"><div class=\\\"block\\\">\").concat(component.renderComponents(key), \"</div></div>\");\n    });\n    return \"\\n    <div class=\\\"tab-layout\\\">\\n\\n      <div class=\\\"toolbar tabbar\\\">\\n        <div class=\\\"toolbar-inner\\\">\\n          \".concat(menu, \"\\n        </div>\\n      </div>\\n      <div class=\\\"tabs-animated-wrap\\\">\\n        <div class=\\\"tabs\\\">\\n          \").concat(layoutCont, \"\\n        </div>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.less\nvar accordion_menu_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.js\n\n/* harmony default export */ var accordions_accordion_menu_01 = ({\n  name: \"accordion-menu-01\",\n  title: \"Accordion layout\",\n  subtitle: \"\",\n  contentSetting: {\n    layoutItems: {\n      name: \"Menu items\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    layoutItems: [{\n      item: \"Podkapitola 1\",\n      version: 2\n    }, {\n      item: \"Podkapitola 2\",\n      version: 2\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      //  let key = builder.id + \"_\" + index;\n\n      //FIX chybného klíče se zachováním dat v původních knihách\n      var key;\n      if (el.version && el.version >= 2) {\n        key = el.id;\n      } else {\n        key = builder.id + \"_\" + index;\n      }\n      menu += \"<li class=\\\"accordion-item\\\">\\n                <a class=\\\"item-content item-link\\\" href=\\\"#\\\">\\n                  <div class=\\\"item-inner\\\">\\n                    <div class=\\\"item-title\\\">\".concat(el.item, \"</div>\\n                  </div>\\n                </a>\\n                <div class=\\\"accordion-item-content\\\">\\n                  <div class=\\\"block\\\">\\n                  \").concat(component.renderComponents(key), \"\\n                  </div>\\n                </div>\\n              </li>\");\n    });\n    return \"\\n    <div class=\\\"accordion-layout\\\">\\n\\n      <div class=\\\"list\\\">\\n        <ul>\\n        \".concat(menu, \"\\n        </ul>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.less\nvar accordion_menu_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.js\n\n/* harmony default export */ var accordions_accordion_menu_02 = ({\n  name: \"accordion-menu-02\",\n  title: \"Accordion layout\",\n  subtitle: \"with images in header\",\n  deleted: true,\n  contentSetting: {\n    layoutItems: {\n      name: \"Menu items\",\n      type: \"array\",\n      values: {\n        images: {\n          name: \"Images\",\n          type: \"array\",\n          values: {\n            path: {\n              name: \"Image\",\n              type: \"image\"\n            }\n          }\n        },\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    layoutItems: [{\n      images: [{\n        path: \"\"\n      }],\n      item: \"Podkapitola 1\",\n      version: 2\n    }, {\n      images: [{\n        path: \"\"\n      }],\n      item: \"Podkapitola 2\",\n      version: 2\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var imagesArr = \"\";\n      el.images.forEach(function (im, index) {\n        imagesArr += \"<div class=\\\"icon-container\\\"><img class=\\\"icon\\\" src=\\\"\".concat(im.path, \"\\\" /></div>\");\n      });\n\n      //FIX chybného klíče se zachováním dat v původních knihách\n      var key;\n      if (el.version && el.version >= 2) {\n        key = el.id;\n      } else {\n        key = builder.id + \"_\" + index;\n      }\n      menu += \"<li class=\\\"accordion-item\\\" id=\\\"accordion-\".concat(component.params.id, \"-\").concat(el.id, \"\\\">\\n                  \").concat(imagesArr, \"\\n                <a class=\\\"item-content item-link\\\" href=\\\"#\\\">\\n                  <div class=\\\"item-inner\\\">\\n                    <div class=\\\"item-title\\\">\\n                    <span>\").concat(el.item, \"</span>\\n                    </div>\\n                  </div>\\n                </a>\\n                <div class=\\\"accordion-item-content\\\">\\n                  <div class=\\\"block\\\">\\n                  \").concat(component.renderComponents(key), \"\\n                  </div>\\n                </div>\\n              </li>\");\n    });\n    return \"\\n    <div class=\\\"accordion-layout\\\">\\n\\n      <div class=\\\"list\\\">\\n        <ul>\\n        \".concat(menu, \"\\n        </ul>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      //naslouchá změně class, pokud je time-highlight otevře accordion\n      var mutationObserver = new MutationObserver(function (mutationsList) {\n        mutationsList.forEach(function (mutation) {\n          if (mutation.attributeName === \"class\") {\n            if (mutation.target.classList.contains(\"time-highlight\") && !mutation.target.classList.contains(\"accordion-item-opened\")) {\n              mutation.target.classList.add(\"accordion-item-opened\");\n            }\n          }\n        });\n      });\n      //zruší naslouchání předešlé (pro případ, že by tam zůstali vyset)\n      mutationObserver.disconnect();\n      var elements = builderEl.find(\".accordion-item\");\n      Array.from(elements).forEach(function (target) {\n        mutationObserver.observe(target, {\n          attributeFilter: [\"class\"]\n        });\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.less\nvar accordion_menu_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.js\n\n/* harmony default export */ var accordions_accordion_menu_03 = ({\n  name: \"accordion-menu-03\",\n  title: \"Accordion layout\",\n  subtitle: \"with images in header\",\n  deleted: true,\n  contentSetting: {\n    images: {\n      name: \"Header images\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        }\n      }\n    },\n    title: {\n      name: \"Accordion title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    images: [{\n      path: \"{{mediaServerDomain}}/public/g7aj8pepw8bynb0492sgku81gcee9o2jrauem1gcs8mpm920ac20vsidzezjrneg.png\"\n    }],\n    title: \"Accordion title\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"accordion-layout\\\">\\n\\n      <div class=\\\"list\\\">\\n        <ul>\\n          <li class=\\\"accordion-item\\\" id=\\\"accordion-\".concat(component.params.id, \"\\\">\\n          \").concat(content.images.map(function (im) {\n      return \"<div class=\\\"icon-container\\\"><img class=\\\"icon\\\" src=\\\"\".concat(im.path, \"\\\" /></div>\");\n    }).join(\"\"), \"\\n                  <a class=\\\"item-content item-link\\\" href=\\\"#\\\">\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title\\\">\\n                      <span>\").concat(content.title, \"</span>\\n                      </div>\\n                    </div>\\n                  </a>\\n                  <div class=\\\"accordion-item-content\\\">\\n                    <div class=\\\"block\\\">\\n                    \").concat(component.renderComponents(\"x0\"), \"\\n                    </div>\\n                  </div>\\n            </li>\\n        </ul>\\n      </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      //naslouchá změně class, pokud je time-highlight otevře accordion\n      var mutationObserver = new MutationObserver(function (mutationsList) {\n        mutationsList.forEach(function (mutation) {\n          if (mutation.attributeName === \"class\") {\n            if (mutation.target.classList.contains(\"time-highlight\") && !mutation.target.classList.contains(\"accordion-item-opened\")) {\n              mutation.target.classList.add(\"accordion-item-opened\");\n            }\n          }\n        });\n      });\n      //zruší naslouchání předešlé (pro případ, že by tam zůstali vyset)\n      mutationObserver.disconnect();\n      var elements = builderEl.find(\".accordion-item\");\n      Array.from(elements).forEach(function (target) {\n        mutationObserver.observe(target, {\n          attributeFilter: [\"class\"]\n        });\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.less\nvar swiper_menu_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.js\n\n/* harmony default export */ var layout_swiper_menu_01 = ({\n  name: \"swiper-menu-01\",\n  title: \"Swiper layout\",\n  subtitle: \"\",\n  contentSetting: {\n    swiperHeight: {\n      name: \"Swiper height\",\n      type: \"input-number\"\n    },\n    layoutItems: {\n      name: \"Menu items\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    swiperHeight: 500,\n    layoutItems: [{\n      item: \"Podkapitola 1\"\n    }, {\n      item: \"Podkapitola 2\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = el.id;\n      menu += \"\\n      <div class=\\\"swiper-slide\\\">\\n        <div class=\\\"swiper-padder\\\">\\n            <div class=\\\"vertically-centered-element\\\">\\n                \".concat(component.renderComponents(key), \"\\n            </div>\\n        </div>\\n      </div>\\n      \");\n    });\n    return \"\\n    <div class=\\\"\\\">\\n      <div class=\\\"swiper-container\\\">\\n        <div class=\\\"swiper-wrapper\\\">\\n          \".concat(menu, \"\\n          </div>\\n          <div class=\\\"swiper-button-next\\\"></div>\\n      <div class=\\\"swiper-button-prev\\\"></div>\\n      <div class=\\\"swiper-pagination\\\"></div>\\n        </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var content = builder.params.content;\n      $builderEl[0].style.setProperty(\"--fb-swiper-height\", content.swiperHeight + \"px\");\n      var swiper = builder.app.swiper.create($builderEl.find(\".swiper-container\"), {\n        // autoHeight: true,\n        spaceBetween: 10,\n        grabCursor: false,\n        direction: \"vertical\",\n        shortSwipes: false,\n        allowTouchMove: false,\n        pagination: {\n          el: \".swiper-pagination\",\n          type: \"progressbar\"\n          // dynamicBullets: true,\n        },\n        navigation: {\n          nextEl: \".swiper-button-next\",\n          prevEl: \".swiper-button-prev\"\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/book/book-01.less\nvar book_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/book/book-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/book/book-01.js\n\n// import \"./turn.js\";\n\n/* harmony default export */ var book_book_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  deleted: true,\n  name: \"book-01\",\n  title: \"Book with pages\",\n  subtitle: \"for pictures\",\n  contentSetting: {\n    pages: {\n      name: \"Pages\",\n      // not necessary there\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Page images\",\n          type: \"image\"\n        }\n      }\n    }\n  },\n  content: {\n    pages: [{\n      path: \"Front\"\n    }]\n  },\n  html: function html(content, builder) {\n    // return `\n    // <div class=\"turn-wrapper magazine-viewport\">\n    // <div class=\"aspect\">\n    // <div class=\"aspect-inner\">\n    // <div class=\"flip-book \" id=\"flipbook\">\n    // <div ignore=\"1\" class=\"next-button\"></div>\n    // <div ignore=\"1\" class=\"previous-button\"></div>\n    // ${content.pages\n    //   .map(\n    //     (photo, index) => `\n    //         <div class=\"page elevation-8 ${\n    //           index == 0 || index == 1 ? \"hard\" : \"\"\n    //         }\">\n    //           <img class=\"\" src=\"${photo.path}\">\n    //         </div>\n    //         `\n    //   )\n    //   .join(\"\")}\n    //   <div class=\"hard\"></div>\n    //   <div class=\" hard\"></div>\n    // </div>\n    // </div>\n    // </div>\n    // </div>\n    // `;\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      //   var flipbookEL = $builderEl.find(\"#flipbook\");\n      //   window.addEventListener(\"resize\", function (e) {\n      //     flipbookEL.style.width = \"\";\n      //     flipbookEL.style.height = \"\";\n      //     $(flipbookEL).turn(\n      //       \"size\",\n      //       flipbookEL.clientWidth,\n      //       flipbookEL.clientHeight\n      //     );\n      //   });\n      //   $(\"#flipbook\").turn({\n      //     display: \"double\",\n      //     acceleration: true,\n      //     autoCenter: true,\n      //     duration: 1500,\n      //     peel: \"tr\",\n      //   });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/games/ge-01.js\nvar ge_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/games/ge-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js\nvar layers01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js\");\n\n// EXTERNAL MODULE: ./node_modules/abcjs/src/synth/instrument-index-to-name.js\nvar instrument_index_to_name = __webpack_require__(\"./node_modules/abcjs/src/synth/instrument-index-to-name.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/image-layers/layers02.less\nvar layers02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/image-layers/layers02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/image-layers/layers02.js\n\n\n/* harmony default export */ var image_layers_layers02 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"layers-02\",\n  title: \"Display layers in steps\",\n  subtitle: \"\",\n  contentSetting: {\n    showDescription: {\n      name: \"Show description\",\n      type: \"bool\"\n    },\n    layers: {\n      name: \"Image layers\",\n      help: \"Layers has to be in order as they should display\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Layer\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Layer description\",\n          type: \"textEditor\"\n        }\n      }\n    },\n    duration: {\n      name: \"Interval between layer display (seconds)\",\n      type: \"input-number\",\n      showDescription: true\n    }\n  },\n  content: {\n    layers: [{\n      path: \"{{mediaServerDomain}}/public/rvwzhms13mlsstzmwehtxyg23xx9u4w5rrg8tr6s2u6ynza1pz8znqh12ign6tv2.png\",\n      title: \"Oranžové puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/8kew1okwalt7d1dld3jkl3aa1iuf2kxnla7gyfdtminev94t4z6jl9cv6nv1nvql.png\",\n      title: \"Zelené puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/1khslrbj9ymd75np5e4gpmtpckjud8588zdmu758hdbjf6ju4y7v41vn3rdoja9h.png\",\n      title: \"Růžové puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/n9dcn1lpf0xn0x322l7w1bs0045dgk6xjk9orcd4dlnh6ugarytplv8v6mxfk2w9.png\",\n      title: \"Modré puzzle\"\n    }],\n    duration: \"2\"\n  },\n  styles: {\n    authorx: {}\n  },\n  helpers: {\n    currentStep: 1\n  },\n  html: function html(content, builder, styles) {\n    var controlls = \"\\n      <div class=\\\"controls\\\">\\n        <div class=\\\"step-control\\\">\\n          <span class=\\\"control-prev tooltip-init\\\" data-tooltip=\\\"Vratit posledn\\xED krok\\\" id=\\\"prev-step\\\"><i class=\\\"icon material-icons\\\">skip_previous</i></span>\\n          <span class=\\\"control-next tooltip-init\\\" data-tooltip=\\\"Zobrazit dal\\u0161\\xED krok\\\" id=\\\"next-step\\\"><i class=\\\"icon material-icons\\\">skip_next</i></span>\\n        </div>\\n        <div class=\\\"main-control\\\">\\n          <span class=\\\"start-presentation\\\"><i class=\\\"icon material-icons tooltip-init\\\" data-tooltip=\\\"Spustit\\\">play_arrow</i></span>\\n          <span class=\\\"stop-presentation hidden tooltip-init\\\" data-tooltip=\\\"Pozastavit\\\"><i class=\\\"icon material-icons\\\">pause</i></span>\\n        </div>\\n        <div class=\\\"steps-show\\\">\\n            <span class=\\\"curr-step\\\">1</span> / <span class=\\\"max-step\\\">\".concat(content.layers.length, \"</span>\\n        </div>\\n        <!-- <div class=\\\"skip-control\\\">\\n          <span class=\\\"control-start tooltip-init\\\" data-tooltip=\\\"Sko\\u010Dit na za\\u010D\\xE1tek\\\" id=\\\"skip-start\\\"><i class=\\\"icon material-icons\\\">fast_rewind</i></span>\\n          <span class=\\\"control-end tooltip-init\\\" data-tooltip=\\\"Sko\\u010Dit na konec\\\" id=\\\"skip-end\\\"><i class=\\\"icon material-icons\\\">fast_forward</i></span>\\n        </div> -->\\n      </div>\\n    \");\n    var data = _.sortBy(content.layers, function (o) {\n      return o.position;\n    });\n    // debugger;\n    return \"\\n      <div class=\\\"image-container\\\">\\n          \".concat(data.map(function (layer, index) {\n      return \"\\n              <img class=\\\"image \".concat(index == 0 ? \"image-main\" : \"image-layer hidden\", \"\\\" src=\\\"\").concat(layer.path, \"\\\" data-step=\\\"\").concat(index + 1, \"\\\" data-imageid=\\\"\").concat(layer.id, \"\\\"/>\\n            \");\n    }).join(\"\"), \"\\n      </div>\\n    \").concat(content.showDescription ? \"\\n          <div class=\\\"description-container\\\">\\n                    <p class=\\\"description\\\"></p>\\n            </div>\\n          \" : \"\", \"\\n      <div class=\\\"controls-container\\\">\\n\\n     \").concat(controlls, \"\\n\\n      </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var $block = $builderEl;\n      var filtered = _.filter(component.params.content.layers, function (o) {\n        return !o.deleted;\n      });\n      var maxSteps = filtered.length;\n      // debugger;\n      // alert(builder.params.id);\n      var nextBtn = $block.find(\".control-next\");\n      var prevBtn = $block.find(\".control-prev\");\n\n      // let skipEndBtn = $block.find(\".control-end\");\n      // let skipStartBtn = $block.find(\".control-start\");\n\n      var startBtn = $block.find(\".start-presentation\");\n      var stopBtn = $block.find(\".stop-presentation\");\n      nextBtn.off(\"click\");\n      prevBtn.off(\"click\");\n      // skipEndBtn.off(\"click\");\n      // skipStartBtn.off(\"click\");\n      startBtn.off(\"click\");\n      stopBtn.off(\"click\");\n      prevBtn.addClass(\"disabled\");\n      component.params.methods.makeStep(1);\n      // skipStartBtn.addClass(\"disabled\");\n\n      nextBtn.on(\"click\", function (e) {\n        if (component.params.helpers.currentStep < maxSteps) {\n          prevBtn.removeClass(\"disabled\");\n          // skipStartBtn.removeClass(\"disabled\");\n          component.params.methods.makeStep(++component.params.helpers.currentStep);\n        }\n        if (component.params.helpers.currentStep == maxSteps) {\n          nextBtn.addClass(\"disabled\");\n          // skipEndBtn.addClass(\"disabled\");\n        }\n      });\n      prevBtn.on(\"click\", function (e) {\n        if (component.params.helpers.currentStep > 1) {\n          nextBtn.removeClass(\"disabled\");\n          // skipEndBtn.removeClass(\"disabled\");\n          component.params.methods.makeStep(--component.params.helpers.currentStep);\n        }\n        if (component.params.helpers.currentStep == 1) {\n          prevBtn.addClass(\"disabled\");\n          // skipStartBtn.addClass(\"disabled\");\n        }\n      });\n      startBtn.on(\"click\", function (e) {\n        startBtn.hide();\n        stopBtn.show();\n        if (component.params.helpers.currentStep < maxSteps) {\n          component.params.methods.startPresentation(maxSteps, startBtn, stopBtn, nextBtn, prevBtn\n          // skipStartBtn,\n          // skipEndBtn\n          );\n        } else {\n          startBtn.show();\n          stopBtn.hide();\n        }\n      });\n    }\n  },\n  methods: {\n    makeStep: function makeStep(currStep) {\n      var _this = this;\n      var images = this.$block.find(\".image\");\n      var description = \"\";\n      images.forEach(function (element) {\n        var el = $$(element);\n        if (el.data(\"step\") == currStep) {\n          var imgId = el.data(\"imageId\");\n          description = _.find(_this.params.content.layers, function (o) {\n            return o.id == imgId && !o.deleted;\n          });\n          description = description.title;\n        }\n        if (el.data(\"step\") <= currStep) {\n          el.removeClass(\"hidden\");\n        } else {\n          el.addClass(\"hidden\");\n        }\n      });\n      this.params.methods.changeStepCounter(currStep);\n      if (this.params.content.showDescription) {\n        this.params.methods.changeDescription(description);\n      }\n    },\n    changeStepCounter: function changeStepCounter(currStep) {\n      var counter = this.$block.find(\".curr-step\");\n      counter.text(currStep);\n    },\n    startPresentation: function startPresentation(maxSteps, startBtn, stopBtn, nextBtn, prevBtn\n    // skipStartBtn,\n    // skipEndBtn\n    ) {\n      var interval = this.params.content.duration * 1000;\n      var self = this;\n      nextBtn.addClass(\"disabled\");\n      // skipEndBtn.addClass(\"disabled\");\n      prevBtn.addClass(\"disabled\");\n      // skipStartBtn.addClass(\"disabled\");\n\n      var presentation = setInterval(function () {\n        if (self.params.helpers.currentStep < maxSteps) {\n          self.params.methods.makeStep(++self.params.helpers.currentStep);\n        } else {\n          clearInterval(presentation);\n          stopBtn.hide();\n          startBtn.show();\n          prevBtn.removeClass(\"disabled\");\n          // skipStartBtn.removeClass(\"disabled\");\n          nextBtn.addClass(\"disabled\");\n          // skipEndBtn.removeClass(\"disabled\");\n        }\n      }, interval);\n      stopBtn.off(\"click\");\n      stopBtn.on(\"click\", function (e) {\n        clearInterval(presentation);\n        stopBtn.hide();\n        startBtn.show();\n        prevBtn.removeClass(\"disabled\");\n        // skipStartBtn.removeClass(\"disabled\");\n        nextBtn.removeClass(\"disabled\");\n        // skipEndBtn.removeClass(\"disabled\");\n      });\n    },\n    changeDescription: function changeDescription(desc) {\n      var el = this.$block.find(\".description\");\n      el.html(desc);\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js\nvar chbot_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_development/recipe-01.less\nvar recipe_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_development/recipe-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_development/recipe-01.js\n\n/* harmony default export */ var _development_recipe_01 = ({\n  name: \"recipe-01\",\n  title: \"Recept\",\n  delete: false,\n  subtitle: \"v rámečku\",\n  contentSetting: {\n    difficulty: {\n      name: \"Text of dificulty\",\n      type: \"textEditor\"\n    },\n    type: {\n      name: \"Text of type\",\n      type: \"textEditor\"\n    },\n    preparation: {\n      name: \"Text of preparation\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    shopping: {\n      name: \"Text of shopping list\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    necessary: {\n      name: \"Text of necessaries\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    budget: {\n      name: \"Text of budget\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    tools: {\n      name: \"Text of tools\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    serving: {\n      name: \"Text of serving\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    tips: {\n      name: \"Text of tips for serving\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    steps: {\n      name: \"Text of steps\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    difficulty: \"snadné\",\n    type: \"dezert\",\n    preparation: \"60 minut\",\n    shopping: \"mouka polohrubá, cukr písek, máslo, vejce, vanilkový cukr\",\n    necessary: \"340g mouky polohrubé, 170g cukr písek...\",\n    budget: \"\",\n    tools: \"větší mísa, elektrický šlehač nebo ruční metla, stěrka...\",\n    serving: \"list tvrdšího papíru\",\n    tips: \"Než se sušenky upečou a vychladnou, máš čas vyrobit na ně košíček.\",\n    steps: \"1. Máslo a cukr ušlehej šlehačem nebo metlou do pěny.\"\n  },\n  html: function html(content, builder) {\n    return \"\\n    <div class=\\\"recipe-container\\\">\\n      <div class=\\\"row\\\">\\n        <div class=\\\"column col-100 xsmall-100 medium-70\\\">\\n            <div class=\\\"row\\\">\\n                <div class=\\\"column col-100 xsmall-100 medium-33 tx-border\\\">\\n                    <h4>N\\xE1ro\\u010Dnost</h4>\\n                    <div class=\\\"text\\\">\".concat(content.difficulty, \"</div>\\n                </div>\\n                <div class=\\\"column col-100 xsmall-100 \\tmedium-33 tx-border\\\">\\n                    <h4>Druh</h4>\\n                    <div class=\\\"text\\\">\").concat(content.type, \"</div>\\n                </div>\\n                <div class=\\\"column col-100 xsmall-100 \\tmedium-33 tx-border\\\">\\n                    <h4>P\\u0159\\xEDprava</h4>\\n                    <div class=\\\"text\\\">\").concat(content.preparation, \"</div>\\n                </div>\\n            </div>\\n            <div class=\\\"row\\\">\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Co je pot\\u0159eba</h4>\\n                    <div class=\\\"text\\\">\").concat(content.necessary, \"</div>\\n                </div>\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>L\\u017E\\xEDce a va\\u0159e\\u010Dky</h4>\\n                    <div class=\\\"text\\\">\").concat(content.tools, \"</div>\\n                </div>\\n            </div>\\n        </div>\\n        <div class=\\\"column col-100 xsmall-100 medium-30\\\">\\n            <div class=\\\"row\\\">\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>N\\xE1kup</h4>\\n                    <div class=\\\"text\\\">\").concat(content.shopping, \"</div>\\n                </div>\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Rozpo\\u010Det</h4>\\n                    <div class=\\\"text\\\">\").concat(content.budget != \"\" ? content.budget : '<li class=\"item-content item-input\"><div class=\"item-media\"><i class=\"icon demo-list-icon\"></i></div><div class=\"item-inner\"><div class=\"item-input-wrap\"><input type=\"text\" placeholder=\"Napiš sem svůj rozpočet\" class=\"\"><span class=\"input-clear-button\"></span></div></div></li>', \"</div>\\n                </div>\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>K serv\\xEDrov\\xE1n\\xED</h4>\\n                    <div class=\\\"text\\\">\").concat(content.serving, \"</div>\\n                </div>\\n            </div>\\n        </div>\\n        \").concat(content.tips.length > 0 ? \"\\n        <div class=\\\"column col-100 tx-border\\\">\\n            <h4>Tip na serv\\xEDrov\\xE1n\\xED</h4>\\n            <div class=\\\"text\\\">\".concat(content.tips, \"</div>\\n        </div>\\n        \") : \"\", \"\\n        \").concat(content.steps.length > 0 ? \"\\n        <div class=\\\"column col-100 tx-border\\\">\\n            <h4>Jak na to</h4>\\n            <div class=\\\"text\\\">\".concat(content.steps, \"</div>\\n        </div>\\n        \") : \"\", \"\\n    </div>\\n</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_development/recipe-02.less\nvar recipe_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_development/recipe-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_development/recipe-02.js\n\n/* harmony default export */ var _development_recipe_02 = ({\n  name: \"recipe-02\",\n  title: \"Crafting recipe\",\n  delete: false,\n  subtitle: \"v rámečku\",\n  contentSetting: {\n    difficulty: {\n      name: \"Text of dificulty\",\n      type: \"textEditor\"\n    },\n    type: {\n      name: \"Text of type\",\n      type: \"textEditor\"\n    },\n    preparation: {\n      name: \"Text of preparation\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    usage: {\n      name: \"Text of usage\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    necessary: {\n      name: \"Text of necessaries\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    skills: {\n      name: \"Text of skills\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    tools: {\n      name: \"Text of tools\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    tutorial: {\n      name: \"Text of tutorial\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    variants: {\n      name: \"Text of variants\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    steps: {\n      name: \"Text of steps\",\n      // not necessary there\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    difficulty: \"snadné\",\n    type: \"truhlář\",\n    preparation: \"60 minut\",\n    necessary: \"340g mouky polohrubé, 170g cukr písek...\",\n    tutorial: \"\",\n    variants: \"\",\n    skills: \"geometrie\",\n    usage: \"podložka pod hrnek\",\n    tools: \"příborová vidlička\",\n    steps: \"Výroba tkalcovského stavu – postupuj podle obrázku č. 1\"\n  },\n  html: function html(content, builder) {\n    return \"\\n    <div class=\\\"recipe-container\\\">\\n      <div class=\\\"row\\\">\\n        <div class=\\\"column col-100 xsmall-100 medium-70\\\">\\n            <div class=\\\"row\\\">\\n            \".concat(content.difficulty.length > 0 ? \"\\n                <div class=\\\"column col-100 xsmall-100 medium-33 tx-border\\\">\\n                    <h4>N\\xE1ro\\u010Dnost</h4>\\n                    <div class=\\\"text\\\">\".concat(content.difficulty, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.type.length > 0 ? \"\\n                <div class=\\\"column col-100 xsmall-100 \\tmedium-33 tx-border\\\">\\n                    <h4>\\u0158emeslo</h4>\\n                    <div class=\\\"text\\\">\".concat(content.type, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.preparation.length > 0 ? \"\\n                <div class=\\\"column col-100 xsmall-100 \\tmedium-33 tx-border\\\">\\n                    <h4>P\\u0159\\xEDprava</h4>\\n                    <div class=\\\"text\\\">\".concat(content.preparation, \"</div>\\n                </div> \") : \"\", \"\\n            </div>\\n            <div class=\\\"row\\\">\\n            \").concat(content.necessary.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Co je pot\\u0159eba</h4>\\n                    <div class=\\\"text\\\">\".concat(content.necessary, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.tools.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Z d\\xEDlny nebo n\\xE1\\u0159ad\\xED odjinud</h4>\\n                    <div class=\\\"text\\\">\".concat(content.tools, \"</div>\\n                </div> \") : \"\", \"\\n            </div>\\n        </div>\\n        <div class=\\\"column col-100 xsmall-100 medium-30\\\">\\n            <div class=\\\"row\\\">\\n            \").concat(content.usage.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Pou\\u017Eit\\xED</h4>\\n                    <div class=\\\"text\\\">\".concat(content.usage, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.skills.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Co vyu\\u017Eiji</h4>\\n                    <div class=\\\"text\\\">\".concat(content.skills, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.tutorial.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                    <h4>Videon\\xE1vod</h4>\\n                    <div class=\\\"text\\\">\".concat(content.tutorial, \"</div>\\n                </div> \") : \"\", \"\\n                \").concat(content.variants.length > 0 ? \"\\n                <div class=\\\"column col-100 tx-border\\\">\\n                <h4>Varianty</h4>\\n                <div class=\\\"text\\\">\".concat(content.variants, \"</div>\\n                </div> \") : \"\", \"\\n            </div>\\n        </div>\\n        \").concat(content.steps.length > 0 ? \"\\n        <div class=\\\"column col-100 tx-border\\\">\\n            <h4>Jak na to</h4>\\n            <div class=\\\"text\\\">\".concat(content.steps, \"</div>\\n        </div>\\n        \") : \"\", \"\\n    </div>\\n</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var app = builder.app;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-01.js\nvar chart_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/charts/chart-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/charts/charts.less\nvar charts = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/charts/charts.less\");\n\n// EXTERNAL MODULE: ./node_modules/chart.js/dist/Chart.js\nvar Chart = __webpack_require__(\"./node_modules/chart.js/dist/Chart.js\");\nvar Chart_default = /*#__PURE__*/__webpack_require__.n(Chart);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-utils.js\nvar chart_utils = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/charts/chart-utils.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-02.js\n\n\n\n\nvar chart_02_settings = {\n  name: \"chart-02\",\n  title: \"Pie chart\",\n  deleted: true,\n  content: {\n    options: \"{}\",\n    data: \"{\\n        labels: [\\n          'Wood',\\n          'Metal',\\n          'Concrete'\\n        ],\\n        datasets: [{\\n          label: 'Used mterial',\\n          data: [60, 10, 30],\\n          backgroundColor: [\\n            'rgb(255, 99, 132)',\\n            'rgb(54, 162, 235)',\\n            'rgb(255, 205, 86)'\\n          ],\\n          hoverOffset: 4\\n        }]\\n      }\"\n  },\n  helpers: {\n    type: \"pie\"\n  }\n};\nvar chart02 = _.merge({}, chart_01[\"default\"], chart_02_settings);\n/* harmony default export */ var chart_02 = (chart02);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-03.js\n\n\n\n\nvar chart_03_settings = {\n  name: \"chart-03\",\n  title: \"Line chart\",\n  deleted: true,\n  content: {\n    options: \"{\\n      scales: {\\n        yAxes: [{\\n          scaleLabel: {\\n            display: true,\\n            labelString: 'Price [CZK]'\\n          }\\n        }]\\n      }     \\n    }\",\n    data: \"{\\n      labels: [\\\"January\\\", \\\"February\\\", \\\"March\\\", \\\"April\\\", \\\"May\\\", \\\"June\\\", \\\"July\\\"],\\n      datasets: [{\\n        label: 'Price of petrol',\\n        data: [28.5, 28.9, 29.2, 30, 31.5, 32.0, 33.9],\\n        fill: false,\\n        borderColor: 'rgb(75, 192, 192)',\\n        tension: 0.1\\n      }]\\n    }\"\n  },\n  helpers: {\n    type: \"line\"\n  }\n};\nvar chart03 = _.merge({}, chart_01[\"default\"], chart_03_settings);\n/* harmony default export */ var chart_03 = (chart03);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-04.js\n\n\n\n\nvar chart_04_settings = {\n  name: \"chart-04\",\n  title: \"Radar chart\",\n  deleted: true,\n  content: {\n    options: \"{\\n      elements: {\\n        line: {\\n          borderWidth: 3\\n        }\\n      }\\n    }\",\n    data: \"{\\n      labels: [\\n        'Eating',\\n        'Drinking',\\n        'Sleeping',\\n        'Designing',\\n        'Coding',\\n        'Cycling',\\n        'Running'\\n      ],\\n      datasets: [{\\n        label: 'Person 1',\\n        data: [65, 59, 90, 81, 56, 55, 40],\\n        fill: true,\\n        backgroundColor: 'rgba(255, 99, 132, 0.2)',\\n        borderColor: 'rgb(255, 99, 132)',\\n        pointBackgroundColor: 'rgb(255, 99, 132)',\\n        pointBorderColor: '#fff',\\n        pointHoverBackgroundColor: '#fff',\\n        pointHoverBorderColor: 'rgb(255, 99, 132)'\\n      }, {\\n        label: 'Person 2',\\n        data: [28, 48, 40, 19, 96, 27, 100],\\n        fill: true,\\n        backgroundColor: 'rgba(54, 162, 235, 0.2)',\\n        borderColor: 'rgb(54, 162, 235)',\\n        pointBackgroundColor: 'rgb(54, 162, 235)',\\n        pointBorderColor: '#fff',\\n        pointHoverBackgroundColor: '#fff',\\n        pointHoverBorderColor: 'rgb(54, 162, 235)'\\n      }]\\n    }\"\n  },\n  helpers: {\n    type: \"radar\"\n  }\n};\nvar chart04 = _.merge({}, chart_01[\"default\"], chart_04_settings);\n/* harmony default export */ var chart_04 = (chart04);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/chart-05.js\n\n\n\n\nvar chart_05_settings = {\n  name: \"chart-05\",\n  title: \"Scatter chart\",\n  deleted: true,\n  content: {\n    options: \"{\\n      tooltips: {\\n        mode: 'index',\\n        intersect: false,\\n      },\\n      hover: {\\n        mode: 'nearest',\\n        intersect: true\\n      },\\n      scales: {\\n        yAxes: [{\\n          ticks: {\\n            beginAtZero:true\\n          }\\n        }]\\n      },\\n    }\",\n    data: \"{\\n      datasets: [\\n        {\\n          label: 'Chart 1',\\n          data: [{x: 1, y: 2}, {x: 2, y: 4}, {x: 3, y: 8},{x: 4, y: 16}],\\n          showLine: true,\\n          fill: false,\\n          borderColor: 'rgba(0, 200, 0, 1)'\\n        },\\n        {\\n          label: 'Chart 2',\\n          data: [{x: 1, y: 3}, {x: 3, y: 4}, {x: 4, y: 6}, {x: 6, y: 9}],\\n          showLine: true,\\n          fill: false,\\n          borderColor: 'rgba(200, 0, 0, 1)'\\n        }\\n      ]\\n    }\"\n  },\n  helpers: {\n    type: \"scatter\"\n  }\n};\nvar chart05 = _.merge({}, chart_01[\"default\"], chart_05_settings);\n/* harmony default export */ var chart_05 = (chart05);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-01.js\n\n\n/* harmony default export */ var new_chart_01 = ({\n  name: \"new-chart-01\",\n  title: \"Line Chart\",\n  subtitle: \"\",\n  contentSetting: {\n    // type: {\n    //   name: \"Type style\",\n    //   type: \"select\",\n    //   options: [\n    //     { title: \"Bar\", value: \"bar\" },\n    //     { title: \"Doughnut\", value: \"doughnut\" },\n    //     { title: \"Line\", value: \"line\" },\n    //     { title: \"Pie\", value: \"pie\" },\n    //     { title: \"PolarArea\", value: \"polarArea\" },\n    //     { title: \"Radar\", value: \"radar\" },\n    //   ],\n    // },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format (width / height)\"\n    },\n    yAxes: {\n      name: \"Y start\",\n      type: \"input-number\"\n    },\n    labels: {\n      name: \"X-axis\",\n      type: \"array\",\n      values: {\n        data: {\n          name: \"Name\",\n          type: \"textarea\"\n        }\n      }\n    },\n    sourceData: {\n      name: \"Datasets\",\n      type: \"array\",\n      values: {\n        labelHeader: {\n          name: \"Title\",\n          type: \"textarea\"\n        },\n        borderWidth: {\n          name: \"Border width\",\n          type: \"input-number\"\n        },\n        fillColor: {\n          name: \"Graph color (line and fill)\",\n          type: \"color\"\n        },\n        fill: {\n          name: \"Fill space under graph\",\n          type: \"bool\"\n        },\n        battery: {\n          name: \"Source\",\n          type: \"array\",\n          values: {\n            data: {\n              name: \"Value\",\n              type: \"input-number\"\n            },\n            backgroundColor: {\n              name: \"Background\",\n              type: \"color\"\n            },\n            borderColor: {\n              name: \"Border color\",\n              type: \"color\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    height: \"\",\n    width: \"\",\n    yAxes: 0,\n    aspectRatio: \"16/9\",\n    labels: [{\n      data: \"January\"\n    }, {\n      data: \"February\"\n    }, {\n      data: \"March\"\n    }],\n    sourceData: [{\n      labelHeader: \"Title\",\n      borderWidth: 1,\n      fill: true,\n      fillColor: \"#ff0000ff\",\n      battery: [{\n        data: 5,\n        backgroundColor: \"#ff000033\",\n        borderColor: \"#ff0000ff\"\n      }, {\n        data: 12,\n        backgroundColor: \"#00ff0033\",\n        borderColor: \"#00ff00ff\"\n      }, {\n        data: 15,\n        backgroundColor: \"#0000ff33\",\n        borderColor: \"#0000ffff\"\n      }]\n    }]\n  },\n  helpers: {\n    type: \"line\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <canvas id=\\\"chart-\".concat(builder.id, \"\\\" width=\\\"500\\\" height=\\\"500\\\">CHART CANNOT BE RENDERED. Your browser does not support the canvas element.</canvas>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder, content) {\n      try {\n        var id = \"chart-\" + builder.params.id;\n        var graphEl = $builderEl.find(\"#\" + id);\n        var oldInstance = _.find(Chart_default.a.instances, function (o) {\n          return o.canvas.id == id;\n        });\n        if (oldInstance != undefined) {\n          oldInstance.destroy();\n        }\n        var dataObj = {\n          labels: builder.params.methods.prepareLables(content),\n          datasets: builder.params.methods.prepareDatasets(content)\n        };\n        var type = builder.params.helpers.type;\n        var config = {\n          type: type,\n          options: builder.params.methods.prepareOptions(content),\n          data: dataObj\n        };\n        var graph = new Chart_default.a(graphEl, config);\n        graph.canvas.parentNode.style.width = \"100%\";\n        graph.options.responsive = true;\n        var splitAspect = content.aspectRatio.split(\"/\");\n        var calcAspectRatio = parseFloat(splitAspect[0]) / parseFloat(splitAspect[1]);\n        if (isNaN(calcAspectRatio)) {\n          graph.aspectRatio = 2;\n        } else {\n          graph.aspectRatio = calcAspectRatio;\n        }\n      } catch (e) {\n        //console.log(\"Nepodařilo se vykreslit graf. (Chyba v zápisu)\", e);\n      }\n    }\n  },\n  methods: {\n    prepareLables: function prepareLables(content) {\n      var returnObj = [];\n      for (var i = 0; i < content.labels.length; i++) {\n        returnObj.push(content.labels[i].data);\n      }\n      return returnObj;\n    },\n    prepareDatasets: function prepareDatasets(content) {\n      var type = this.params.helpers.type;\n      var returnDataset = [];\n      for (var i = 0; i < content.sourceData.length; i++) {\n        var tmpDataset = content.sourceData[i];\n        var returnObj = {\n          data: [],\n          backgroundColor: type == \"line\" || type == \"radar\" ? tmpDataset.fillColor : [],\n          borderColor: type == \"line\" || type == \"radar\" ? tmpDataset.fillColor : [],\n          pointBackgroundColor: [],\n          pointBorderColor: [],\n          borderWidth: parseInt(tmpDataset.borderWidth),\n          label: tmpDataset.labelHeader,\n          fill: tmpDataset.fill\n        };\n        for (var j = 0; j < tmpDataset.battery.length; j++) {\n          var tmpSource = tmpDataset.battery[j];\n\n          //Data\n          var numberData = parseFloat(tmpSource.data);\n          if (isNaN(numberData)) {\n            returnObj.data.push(0);\n          } else {\n            returnObj.data.push(numberData);\n          }\n          if (type != \"line\" && type != \"radar\") {\n            if (tmpSource.backgroundColor !== \"\") {\n              //BackgroundColor\n              returnObj.backgroundColor.push(tmpSource.backgroundColor);\n            }\n\n            //BorderColor\n            if (tmpSource.borderColor !== \"\") {\n              returnObj.borderColor.push(tmpSource.borderColor);\n            }\n          } else {\n            if (tmpSource.backgroundColor !== \"\") {\n              //BackgroundColor\n              returnObj.pointBackgroundColor.push(tmpSource.backgroundColor);\n            }\n\n            //BorderColor\n            if (tmpSource.borderColor !== \"\") {\n              returnObj.pointBorderColor.push(tmpSource.borderColor);\n            }\n          }\n        }\n        if (type != \"line\" && type != \"radar\") {\n          //Korekce barev pro všechny stejné prvky\n          if (returnObj.backgroundColor.length === 1) {\n            returnObj.backgroundColor = returnObj.backgroundColor.shift();\n          }\n          if (returnObj.borderColor.length === 1) {\n            returnObj.borderColor = returnObj.borderColor[0];\n          }\n        } else {\n          if (returnObj.backgroundColor.length === 1) {\n            returnObj.pointBackgroundColor = returnObj.backgroundColor.shift();\n          }\n          if (returnObj.borderColor.length === 1) {\n            returnObj.pointBorderColor = returnObj.borderColor[0];\n          }\n        }\n        returnDataset.push(returnObj);\n      }\n      return returnDataset;\n    },\n    prepareOptions: function prepareOptions(content) {\n      var returnOptions = {};\n\n      //Popisek\n      var hideTitle = false;\n      for (var i = 0; i < content.sourceData.length; i++) {\n        var tmpDataset = content.sourceData[i];\n        if ((tmpDataset.labelHeader === undefined || tmpDataset.labelHeader === \"\") && content.type !== \"pie\") {\n          hideTitle = true;\n        }\n      }\n      if (hideTitle === true) {\n        returnOptions.legend = {\n          display: false\n        };\n      }\n\n      //Start na ose Y\n      returnOptions.scales = {\n        yAxes: [{\n          display: true,\n          ticks: {\n            suggestedMin: content.yAxes\n          }\n        }]\n      };\n      return returnOptions;\n    }\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-02.js\n\n\n\nvar chart2 = _.cloneDeep(new_chart_01);\nchart2.name = \"new-chart-2\";\nchart2.title = \"Pie chart\";\nchart2.helpers.type = \"pie\";\ndelete chart2.contentSetting.sourceData.values.fill;\ndelete chart2.contentSetting.sourceData.values.fillColor;\n/* harmony default export */ var new_chart_02 = (chart2);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-03.js\n\n\n\nvar chart3 = _.cloneDeep(new_chart_01);\nchart3.name = \"new-chart-3\";\nchart3.title = \"Doughnut chart\";\nchart3.helpers.type = \"doughnut\";\ndelete chart3.contentSetting.sourceData.values.fill;\ndelete chart3.contentSetting.sourceData.values.fillColor;\n/* harmony default export */ var new_chart_03 = (chart3);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-04.js\n\n\n\nvar chart4 = _.cloneDeep(new_chart_01);\nchart4.name = \"new-chart-4\";\nchart4.title = \"Bar chart\";\nchart4.helpers.type = \"bar\";\ndelete chart4.contentSetting.sourceData.values.fill;\ndelete chart4.contentSetting.sourceData.values.fillColor;\n/* harmony default export */ var new_chart_04 = (chart4);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-05.js\n\n\n\nvar chart5 = _.cloneDeep(new_chart_01);\nchart5.name = \"new-chart-5\";\nchart5.title = \"Polar Area chart\";\nchart5.helpers.type = \"polarArea\";\ndelete chart5.contentSetting.sourceData.values.fill;\ndelete chart5.contentSetting.sourceData.values.fillColor;\n/* harmony default export */ var new_chart_05 = (chart5);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/charts/new-chart-06.js\n\n\n\nvar chart6 = _.cloneDeep(new_chart_01);\nchart6.name = \"new-chart-6\";\nchart6.title = \"Radar chart\";\nchart6.helpers.type = \"radar\";\n/* harmony default export */ var new_chart_06 = (chart6);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/equation/eq-01.less\nvar eq_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/equation/eq-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/equation/eq-utils.js\nfunction eq_utils_getRef() {\n  var _this = this;\n  var refArray = [];\n  var components = this.getPageComponentsReference();\n  var chapter = this.chapterReference;\n  var counter = 1;\n  var flag = true;\n  components.forEach(function (el, index) {\n    if (el.params.id == _this.params.id) {\n      flag = false;\n      return;\n    }\n    var methods = el.params.methods;\n    if (methods && methods.hasOwnProperty(\"getEquationsReference\") && flag) {\n      counter++;\n    }\n  });\n\n  // debugger;\n\n  var chapterNumber = \"\";\n  var numbered = true;\n  if (chapter.isNumbered) {\n    chapterNumber = chapter.number;\n  } else {\n    chapterNumber = chapter.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") + \".\";\n    numbered = false;\n  }\n  var refObj = {};\n  refObj[\"string\"] = chapterNumber + counter;\n  refObj[\"id\"] = this.params.id;\n  refObj[\"chapterName\"] = chapter.name;\n  refObj[\"chapterLink\"] = chapter.fullPath;\n  refObj[\"isNumbered\"] = numbered;\n  refArray.push(refObj);\n  return refArray;\n}\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/equation/eq-01.js\n\n\n/* harmony default export */ var equation_eq_01 = ({\n  name: \"eq-01\",\n  title: \"Equation\",\n  subtitle: \"with numbering\",\n  contentSetting: {\n    eq: {\n      name: \"Equation\",\n      type: \"equation\"\n    },\n    showNumbering: {\n      name: \"Show numbering?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    eq: \"[[[x=y+1]]]\",\n    showNumbering: \"true\"\n  },\n  html: function html(content, builder, styles, component) {\n    var ref = component.params.methods.getEquationsReference();\n    return \"\\n    <div class=\\\"eq-container\\\">\\n        <div class=\\\"equation\\\">\\n        \".concat(content.eq, \"\\n        </div>\\n        <div class=\\\"eq-number\\\">\\n        \").concat(content.showNumbering ? \"(\".concat(ref[0].string, \")\") : \"\", \"\\n        </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    getEquationsReference: function getEquationsReference() {\n      return eq_utils_getRef.bind(this)();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-styles.less\nvar ref_styles = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/references/ref-styles.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-img-01.js\n\n/* harmony default export */ var ref_img_01 = ({\n  name: \"ref-img-01\",\n  title: \"Image list\",\n  subtitle: \"List of all pictures\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    itemLabel: {\n      name: \"label\",\n      type: \"textEditor\"\n    },\n    showTitle: {\n      name: \"Show image title in reference\",\n      type: \"bool\"\n    },\n    showNonNumbered: {\n      name: \"Show images from non numbered pages?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"Images\",\n    itemLabel: \"Image\",\n    showTitle: false,\n    showNonNumbered: true\n  },\n  html: function html(content, builder, styles, component) {\n    var app = component.app;\n    var components = component.getAllComponentsReference();\n    var refArray = [];\n    // debugger;\n    components.forEach(function (o) {\n      if (o.params.hasOwnProperty(\"methods\") && o.params.methods.hasOwnProperty(\"getImagesReference\")) {\n        var info = o.params.methods.getImagesReference();\n        // debugger;\n        info.forEach(function (inf) {\n          var obj = {};\n          var string = \"\";\n          if (content.showTitle) {\n            string += inf.string + \": \" + inf.title;\n          } else {\n            string = inf.string;\n          }\n          obj[\"string\"] = string;\n          obj[\"id\"] = inf.id;\n          obj[\"link\"] = inf.chapterLink;\n          obj[\"chapterName\"] = inf.chapterName;\n          if (!content.showNonNumbered && !inf.isNumbered) {\n            return;\n          } else {\n            refArray.push(obj);\n          }\n        });\n      }\n    });\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    <div class=\\\"data-table ref-table\\\">\\n        <table>\\n        \").concat(refArray.map(function (data) {\n      return \"\\n            <tr>\\n                <td>\\n                <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(data.link, \"\\\" data-scroll-to=\\\"#\").concat(data.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(content.itemLabel, \" \").concat(data.string, \"</a>\\n                </td>\\n                <td style=\\\"text-align:right\\\">\\n                  \").concat(data.chapterName, \"\\n                </td>\\n            </tr>\\n        \");\n    }).join(\"\"), \"\\n        </table>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-vid-01.js\n\n/* harmony default export */ var ref_vid_01 = ({\n  name: \"ref-vid-01\",\n  title: \"Video list\",\n  subtitle: \"List of all videos\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    itemLabel: {\n      name: \"label\",\n      type: \"textEditor\"\n    },\n    showTitle: {\n      name: \"Show image title in reference\",\n      type: \"bool\"\n    },\n    showNonNumbered: {\n      name: \"Show images from non numbered pages?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"List of all videos\",\n    itemLabel: \"Video\",\n    // showTitle: false,\n    showNonNumbered: true\n  },\n  html: function html(content, builder, styles, component) {\n    var app = component.app;\n    var components = component.getAllComponentsReference();\n    var refArray = [];\n    // debugger;\n    components.forEach(function (o) {\n      if (o.params.hasOwnProperty(\"methods\") && o.params.methods.hasOwnProperty(\"getVideosReference\")) {\n        var info = o.params.methods.getVideosReference();\n        info.forEach(function (inf) {\n          var obj = {};\n          var string = \"\";\n          if (content.showTitle) {\n            string += inf.string + \": \" + inf.title;\n          } else {\n            string = inf.string;\n          }\n          obj[\"string\"] = string;\n          obj[\"id\"] = inf.id;\n          obj[\"link\"] = inf.chapterLink;\n          obj[\"chapterName\"] = inf.chapterName;\n          if (!content.showNonNumbered && !inf.isNumbered) {\n            return;\n          } else {\n            refArray.push(obj);\n          }\n        });\n      }\n    });\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    <div class=\\\"data-table ref-table\\\">\\n        <table>\\n        \").concat(refArray.map(function (data) {\n      return \"\\n            <tr>\\n                <td>\\n                <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(data.link, \"\\\" data-scroll-to=\\\"#\").concat(data.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(content.itemLabel, \" \").concat(data.string, \"</a>\\n                </td>\\n                <td style=\\\"text-align:right\\\">\\n                  \").concat(data.chapterName, \"\\n                </td>\\n            </tr>\\n        \");\n    }).join(\"\"), \"\\n        </table>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-eq-01.js\n\n/* harmony default export */ var ref_eq_01 = ({\n  name: \"ref-eq-01\",\n  title: \"Equation list\",\n  subtitle: \"List of all equations\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    itemLabel: {\n      name: \"label\",\n      type: \"textEditor\"\n    },\n    showNonNumbered: {\n      name: \"Show equations from non numbered pages?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"List of all equations\",\n    itemLabel: \"Equation\",\n    showNonNumbered: true\n  },\n  html: function html(content, builder, styles, component) {\n    var app = component.app;\n    var components = component.getAllComponentsReference();\n    var refArray = [];\n    // debugger;\n    components.forEach(function (o) {\n      if (o.params.hasOwnProperty(\"methods\") && o.params.methods.hasOwnProperty(\"getEquationsReference\")) {\n        var info = o.params.methods.getEquationsReference();\n        info.forEach(function (inf) {\n          var obj = {};\n          var string = inf.string;\n          obj[\"string\"] = string;\n          obj[\"id\"] = inf.id;\n          obj[\"link\"] = inf.chapterLink;\n          obj[\"chapterName\"] = inf.chapterName;\n          if (!content.showNonNumbered && !inf.isNumbered) {\n            return;\n          } else {\n            refArray.push(obj);\n          }\n        });\n      }\n    });\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    <div class=\\\"data-table ref-table\\\">\\n        <table>\\n        \").concat(refArray.map(function (data) {\n      return \"\\n            <tr>\\n                <td>\\n                <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(data.link, \"\\\" data-scroll-to=\\\"#\").concat(data.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(content.itemLabel, \" \").concat(data.string, \"</a>\\n                </td>\\n                <td style=\\\"text-align:right\\\">\\n                  \").concat(data.chapterName, \"\\n                </td>\\n            </tr>\\n        \");\n    }).join(\"\"), \"\\n        </table>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js\nvar ref_popover_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/references/ref-table-01.js\n\n/* harmony default export */ var ref_table_01 = ({\n  name: \"ref-table-01\",\n  title: \"Table list\",\n  subtitle: \"List of all tables\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    itemLabel: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    showNonNumbered: {\n      name: \"Show tables from non numbered pages?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"List of all tables\",\n    itemLabel: \"Table\",\n    showNonNumbered: true\n  },\n  html: function html(content, builder, styles, component) {\n    var app = component.app;\n    var components = component.getAllComponentsReference();\n    var refArray = [];\n    // debugger;\n    components.forEach(function (o) {\n      if (o.params.hasOwnProperty(\"methods\") && o.params.methods.hasOwnProperty(\"getTablesReference\")) {\n        var info = o.params.methods.getTablesReference();\n        info.forEach(function (inf) {\n          var obj = {};\n          var string = inf.string;\n          obj[\"string\"] = string;\n          obj[\"id\"] = inf.id;\n          obj[\"link\"] = inf.chapterLink;\n          obj[\"chapterName\"] = inf.chapterName;\n          if (!content.showNonNumbered && !inf.isNumbered) {\n            return;\n          } else {\n            refArray.push(obj);\n          }\n        });\n      }\n    });\n    return \"\\n    \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n    <div class=\\\"data-table ref-table\\\">\\n        <table>\\n        \").concat(refArray.map(function (data) {\n      return \"\\n            <tr>\\n                <td>\\n                <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(data.link, \"\\\" data-scroll-to=\\\"#\").concat(data.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(content.itemLabel, \" \").concat(data.string, \"</a>\\n                </td>\\n                <td style=\\\"text-align:right\\\">\\n                  \").concat(data.chapterName, \"\\n                </td>\\n            </tr>\\n        \");\n    }).join(\"\"), \"\\n        </table>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-01.less\nvar btn_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/buttons/btn-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-01.js\n\n\nfunction btn_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction btn_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? btn_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : btn_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var buttons_btn_01 = ({\n  name: \"btn-01\",\n  title: \"Button\",\n  subtitle: \"with action\",\n  contentSetting: {\n    text: {\n      name: \"Button text\",\n      type: \"textEditor\"\n    },\n    // type: {\n    //   name: \"Use material design icons?\",\n    //   help: \"When 'no' is selected, icons are used from Frameowrk7\",\n    //   type: \"bool\",\n    // },\n    // icon: {\n    //   name: \"Icon code\",\n    //   type: \"textarea\",\n    // },\n    color: {\n      name: \"Color\",\n      type: \"select\",\n      options: [{\n        title: \"Clear\",\n        value: \"clear\"\n      }, {\n        title: \"Theme\",\n        value: \"theme\"\n      }, {\n        title: \"Blue\",\n        value: \"blue\"\n      }, {\n        title: \"Turquoise\",\n        value: \"turquoise\"\n      }, {\n        title: \"Purple\",\n        value: \"purple\"\n      }, {\n        title: \"Green\",\n        value: \"green\"\n      }, {\n        title: \"Red\",\n        value: \"red\"\n      }, {\n        title: \"Orange\",\n        value: \"orange\"\n      }, {\n        title: \"Yellow\",\n        value: \"yellow\"\n      }]\n    },\n    btnAction: {\n      name: \"Action\",\n      type: \"action\"\n    }\n  },\n  content: {\n    text: \"Button\",\n    color: \"theme\",\n    btnAction: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"\",\n      url: \"\"\n    }\n  },\n  html: function html(content, builder, styles, component) {\n    //Compatibility fix\n    if (typeof_default()(content.btnAction) != \"object\" && content.hasOwnProperty(\"link\")) {\n      // debugger;\n      content[\"btnAction\"] = content.link;\n    }\n    var element = \"<div class=\\\"button button-outline \".concat(content.color, \"\\\">\").concat(content.text, \"</div>\");\n    // debugger;\n    element = component.app.link.createLinkElement(btn_01_objectSpread(btn_01_objectSpread({}, content.btnAction), {}, {\n      title: element\n    }));\n    return \"\\n    \".concat(element, \"\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-02.less\nvar btn_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/buttons/btn-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-02.js\n\n\nfunction btn_02_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction btn_02_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? btn_02_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : btn_02_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var buttons_btn_02 = ({\n  name: \"btn-02\",\n  title: \"Button\",\n  subtitle: \"with icon\",\n  contentSetting: {\n    icon: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    text: {\n      name: \"Button text\",\n      type: \"textEditor\"\n    },\n    color: {\n      name: \"Color\",\n      type: \"select\",\n      options: [{\n        title: \"Clear\",\n        value: \"clear\"\n      }, {\n        title: \"Theme\",\n        value: \"theme\"\n      }, {\n        title: \"Blue\",\n        value: \"blue\"\n      }, {\n        title: \"Turquoise\",\n        value: \"turquoise\"\n      }, {\n        title: \"Purple\",\n        value: \"purple\"\n      }, {\n        title: \"Green\",\n        value: \"green\"\n      }, {\n        title: \"Red\",\n        value: \"red\"\n      }, {\n        title: \"Orange\",\n        value: \"orange\"\n      }, {\n        title: \"Yellow\",\n        value: \"yellow\"\n      }]\n    },\n    iconSize: {\n      name: \"Icon height [px|em|%]\",\n      type: \"textarea\"\n    },\n    btnAction: {\n      name: \"Action\",\n      type: \"action\"\n    }\n  },\n  content: {\n    text: \"Button\",\n    color: \"clear\",\n    iconSize: \"2em\",\n    icon: {\n      name: \"help\",\n      type: \"material-icons\",\n      custom: false,\n      id: \"\"\n    },\n    btnAction: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"\",\n      url: \"\"\n    }\n  },\n  html: function html(content, builder, styles, component) {\n    //Compatibility fix\n    if (typeof_default()(content.btnAction) != \"object\" && content.hasOwnProperty(\"link\")) {\n      content[\"btnAction\"] = content.link;\n    }\n    // debugger;\n    var element = component.app.link.createLinkElement(btn_02_objectSpread(btn_02_objectSpread({}, content.btnAction), {}, {\n      title: \"<div class=\\\"button button-outline \".concat(content.color, \"\\\"><span className=\\\"icon\\\">\\n                  \").concat(typeof_default()(content.icon) == \"object\" ? \"<i class=\\\"icon \".concat(content.icon.type, \"\\\" data-icon=\\\"\").concat(content.icon.name, \"\\\"></i>\") : \"\".concat(content.icon), \"\\n                  </span> \").concat(content.text, \"</div>\")\n    }));\n    return \"\\n    <style>\\n        #\".concat(component.params.id, \".btn-02 {\\n            --fb-btn-02-width: \").concat(content.iconSize, \"\\n        }\\n    </style>\\n\\n    \").concat(element, \"\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-03.less\nvar btn_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/buttons/btn-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-03.js\n\n\nfunction btn_03_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction btn_03_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? btn_03_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : btn_03_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var buttons_btn_03 = ({\n  name: \"btn-03\",\n  title: \"Button\",\n  subtitle: \"with icon\",\n  contentSetting: {\n    icon: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    text: {\n      name: \"Button text\",\n      type: \"textEditor\"\n    },\n    btnAction: {\n      name: \"Action\",\n      type: \"action\"\n    },\n    fillColor: {\n      name: \"Background color\",\n      type: \"color\"\n    }\n  },\n  content: {\n    text: \"Button\",\n    icon: \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"chevron_right\\\"></i>\",\n    btnAction: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"internal\",\n      url: \"NEXT\"\n    }\n  },\n  html: function html(content, builder, styles, component) {\n    // debugger;\n    var element = component.app.link.createLinkElement(btn_03_objectSpread(btn_03_objectSpread({}, content.btnAction), {}, {\n      title: \"<div class=\\\"fb-button\\\"><span>\\n                  \".concat(typeof_default()(content.icon) == \"object\" ? \"<i class=\\\"icon \".concat(content.icon.type, \"\\\" data-icon=\\\"\").concat(content.icon.name, \"\\\"></i>\") : \"\".concat(content.icon), \"\\n                  </span> \").concat(content.text, \"</div>\")\n    }));\n    return \"\\n    <style>\\n        #\".concat(component.params.id, \".btn-02 {\\n            --fb-btn-02-width: \").concat(content.iconSize, \"\\n        }\\n    </style>\\n\\n    \").concat(element, \"\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-04.less\nvar btn_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/buttons/btn-04.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/buttons/btn-04.js\n\n\nfunction btn_04_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction btn_04_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? btn_04_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : btn_04_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var buttons_btn_04 = ({\n  name: \"btn-04\",\n  title: \"Button\",\n  subtitle: \"with icon\",\n  contentSetting: {\n    icon: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    text: {\n      name: \"Button text\",\n      type: \"textEditor\"\n    },\n    btnAction: {\n      name: \"Action\",\n      type: \"action\"\n    },\n    fillColor: {\n      name: \"Background color\",\n      type: \"color\"\n    }\n  },\n  content: {\n    text: \"Button\",\n    icon: \"<i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"chevron_right\\\"></i>\",\n    btnAction: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"internal\",\n      url: \"NEXT\"\n    }\n  },\n  html: function html(content, builder, styles, component) {\n    // debugger;\n    var element = component.app.link.createLinkElement(btn_04_objectSpread(btn_04_objectSpread({}, content.btnAction), {}, {\n      title: \"<div class=\\\"fb-button\\\">\\n                <div class=\\\"fb-button-inner\\\">\\n                <div class=\\\"border\\\">\\n                </div>\\n                <div class=\\\"content\\\">\\n                \".concat(content.text, \"\\n                </div>\\n                <div class=\\\"icon-container\\\">\\n                  \").concat(typeof_default()(content.icon) == \"object\" ? \"<i class=\\\"icon \".concat(content.icon.type, \"\\\" data-icon=\\\"\").concat(content.icon.name, \"\\\"></i>\") : \"\".concat(content.icon), \"\\n                </div> \\n                </div>\\n                </div>\")\n    }));\n    return \"\\n    <style>\\n        #\".concat(component.params.id, \".btn-02 {\\n            --fb-btn-02-width: \").concat(content.iconSize, \"\\n        }\\n    </style>\\n\\n    \").concat(element, \"\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.less\nvar puzzle_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.js\n\n// import headbreaker from \"headbreaker\";\n\n\n/* harmony default export */ var puzzle_puzzle_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"puzzle-01\",\n  title: \"Puzzle\",\n  subtitle: \"\",\n  contentSetting: {\n    photo: {\n      name: \"Background for puzzle\",\n      type: \"image\"\n    },\n    evalPoints: {\n      name: \"Points for completing the puzzle\",\n      type: \"input-number\"\n    },\n    pWidth: {\n      name: \"Width of puzzle\",\n      type: \"input-number\"\n    },\n    pHeight: {\n      name: \"Height of puzzle\",\n      type: \"input-number\"\n    },\n    pHorizontal: {\n      name: \"Number of puzzle in horizontal positon\",\n      type: \"input-number\"\n    },\n    pVertical: {\n      name: \"Number of puzzle in vertical positon\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    photo: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n    pWidth: 500,\n    pHeight: 500,\n    pVertical: 3,\n    pHorizontal: 3,\n    evalPoints: 1\n  },\n  helpers: {\n    finished: false,\n    ref: null\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n\\n    <div id=\\\"puzzle-canvas-\".concat(component.params.id, \"\\\" class=\\\"swiper-no-swiping\\\">\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var headbreaker = __webpack_require__(/*! headbreaker */ \"./node_modules/headbreaker/src/index.js\");\n      var content = builder.params.content;\n      var img = new Image();\n      var helpers = builder.params.helpers;\n      var url = builder.app.apiManager.replaceMediaServerPlaceholder(content.photo);\n      var id = \"puzzle-canvas-\" + builder.params.id;\n      img.src = url;\n      img.onload = function () {\n        var canvas = new headbreaker.Canvas(id, {\n          width: content.pWidth,\n          height: content.pHeight,\n          borderFill: 10,\n          strokeWidth: 2,\n          image: img,\n          pieceSize: 100,\n          proximity: 20,\n          painter: new headbreaker.painters.Konva(),\n          outline: new headbreaker.outline.Rounded(),\n          preventOffstageDrag: true\n        });\n        headbreaker.painters.Konva.showWarnings = false;\n        helpers.ref = canvas;\n        canvas.adjustImagesToPuzzleHeight();\n        canvas.autogenerate({\n          horizontalPiecesCount: content.pHorizontal,\n          verticalPiecesCount: content.pVertical\n        });\n        canvas.shuffle(0.7);\n        canvas.draw();\n        canvas.attachSolvedValidator();\n        canvas.onDisconnect(function (piece, figure, target, targetFigure, xxx) {\n          if (helpers.finished) {\n            helpers.finished = false;\n          }\n        });\n\n        // debugger;\n\n        canvas.onValid(function (e) {\n          if (!helpers.finished) {\n            helpers.finished = true;\n            builder.params.methods.answerEmittor($builderEl, builder);\n          }\n        });\n      };\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    eval: function _eval(component, formComponent) {\n      var $builderEl = component.$block;\n      var showResult = formComponent.params.content.showResult;\n      var showCorrect = formComponent.params.content.showCorrectAnswers;\n      var finished = component.params.helpers.finished;\n      var points = 0;\n      var maxPoints = component.params.content.evalPoints;\n      if (finished) {\n        points = maxPoints;\n      } else {\n        points = 0;\n      }\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        var $canvas = $builderEl.find(\"canvas\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-fail\")) $canvas.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-success\")) $canvas.removeClass(\"result-success\");\n        $resultBadge.addClass(classResult);\n        $canvas.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrect && !finished) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var ref = component.params.helpers.ref;\n      var el = component.$block;\n      ref.solve();\n      ref.redraw();\n      el.find(\".konvajs-content\").addClass(\"disabled\");\n    },\n    getUserData: function getUserData() {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.less\nvar pexeso_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.js\n\n\n// import headbreaker from \"headbreaker\";\n\n\n/* harmony default export */ var pexeso_pexeso_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"pexeso-01\",\n  title: \"Memory card game (Pexeso)\",\n  subtitle: \"\",\n  contentSetting: {\n    showProgress: {\n      name: \"Show game progress?\",\n      help: \"Show number of attempts, number of finded pairs, limit number of attempts\",\n      type: \"bool\",\n      hidden: {\n        findedText: {\n          name: \"Text before the number of pairs found\",\n          type: \"textEditor\"\n        },\n        attemptsText: {\n          name: \"Text before attempt counter\",\n          type: \"textEditor\"\n        },\n        maxAttempts: {\n          name: \"Max attempts\",\n          type: \"input-number\",\n          help: \"0 = infinit number of attempts\"\n        }\n      }\n    },\n    useBackground: {\n      name: \"Use background?\",\n      type: \"bool\",\n      hidden: {\n        bgImage: {\n          name: \"Background image\",\n          type: \"image\"\n        }\n      }\n    },\n    cards: {\n      name: \"Cards\",\n      type: \"array\",\n      values: {\n        photo: {\n          name: \"Card image\",\n          type: \"image\"\n        }\n      }\n    }\n  },\n  content: {\n    cards: [{\n      photo: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\"\n    }, {\n      photo: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\"\n    }],\n    findedText: \"Nalezené páry\",\n    attemptsText: \"Poučet využítých pokusů\",\n    showProgress: true,\n    useBackground: false,\n    bgImage: \"{{mediaServerDomain}}/public/0t37hd1g87p2n17d73z8g40uym3moo4vgu7hbqjhpe7gryt8p1cl2dmqm5yzg82r.jpeg\"\n  },\n  helpers: {\n    selected: null,\n    selRef: null,\n    preventAction: false,\n    counter: 0,\n    maxCount: 0,\n    attempts: 0,\n    cardsSize: 150,\n    puzzleArray: [],\n    reset: true,\n    cards: null\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    component.params.helpers.maxCount = content.cards.filter(function (card) {\n      return !card.deleted;\n    }).length;\n\n    // if (component.params.helpers.reset) {\n    //   content.cards.forEach((card) => {\n    //     let obj = {};\n    //     //   debugger;\n    //     obj[\"photo\"] = card.photo;\n    //     obj[\"id\"] = card.id;\n    //     component.params.helpers.puzzleArray.push(obj);\n    //     component.params.helpers.puzzleArray.push(obj);\n    //   });\n    //   component.params.helpers.puzzleArray = _.shuffle(\n    //     component.params.helpers.puzzleArray\n    //   );\n    //   component.params.helpers.reset = false;\n    // }\n\n    var cardsChanged = false;\n    if (!_.isEqual(component.params.helpers.cards, content.cards)) {\n      cardsChanged = true;\n      // debugger;\n    }\n    if (component.params.helpers.reset || cardsChanged) {\n      component.params.helpers.cards = content.cards;\n      component.params.helpers.puzzleArray = [];\n      content.cards.forEach(function (card) {\n        var obj = {};\n        //   debugger;\n        obj[\"photo\"] = card.photo;\n        obj[\"id\"] = card.id;\n        component.params.helpers.puzzleArray.push(obj);\n        component.params.helpers.puzzleArray.push(obj);\n      });\n      component.params.helpers.puzzleArray = _.shuffle(component.params.helpers.puzzleArray);\n      component.params.helpers.reset = false;\n    }\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n\\n    <div id=\\\"pexeso-container-\".concat(component.params.id, \"\\\">\\n    \").concat(content.showProgress ? \"\\n    <div class=\\\"score-container\\\">\\n        <div class=\\\"row\\\">\\n            <div class=\\\"col-100 \".concat(content.maxAttempts == 0 ? \"medium-100\" : \"medium-50\", \"\\\">\\n            \").concat(content.findedText != \"\" ? \"\\n                  \".concat(content.findedText, \":\\n              \") : \"\", \"\\n            <span class=\\\"score-counter\\\">0</span>\\n            /\\n            <span class=\\\"score-max\\\">\").concat(component.params.helpers.maxCount, \"</span>\\n            </div>\\n            \").concat(content.maxAttempts > 0 ? \"\\n            <div class=\\\"col-100 medium-50 score-attempts-container\\\">\\n            \".concat(content.attemptsText != \"\" ? \"\\n                \".concat(content.attemptsText, \":\\n            \") : \"\", \"\\n            <span class=\\\"score-attempts\\\">0</span>\\n            /\\n            <span class=\\\"score-maxAttempts\\\">\").concat(content.maxAttempts, \"</span>\\n            </div>\\n            \") : \"\", \"\\n        </div>\\n    </div>\\n    \") : \"\", \"\\n    <div class=\\\"pexeso-card-container \").concat(content.useBackground ? 'puzzle-hider' : '', \"\\\" style=\\\"background: url(\").concat(content.useBackground ? content.bgImage : \"\", \")\\\">\\n\\n    \").concat(component.params.helpers.puzzleArray.map(function (data) {\n      return \"\\n        <div class=\\\"pexeso-card\\\">\\n        <div class=\\\"flip-card\\\" data-id=\\\"\".concat(data.id, \"\\\">\\n            <div class=\\\"flip-card-inner\\\">\\n            <div class=\\\"front\\\">\\n            </div>\\n            <div class=\\\"back\\\">\\n                <img class=\\\"\\\" src=\\\"\").concat(data.photo, \"\\\"/>\\n            </div>\\n            </div>\\n        </div>\\n        </div>\\n      \");\n    }).join(\"\"), \"\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var content = builder.params.content;\n      var helpers = builder.params.helpers;\n      $builderEl.find(\".flip-card\").off(\"click\");\n      $builderEl.find(\".flip-card\").on(\"click\", function (e) {\n        var card = $$(e.target).parents(\".flip-card\");\n        if (!card.hasClass(\"clicked\")) {\n          card.addClass(\"clicked\");\n          if (!helpers.preventAction && !card.hasClass(\"good\") && (content.maxAttempts != helpers.attempts || content.maxAttempts == 0 || !content.showProgress)) {\n            var id = card.data(\"id\");\n            card.find(\".flip-card-inner\").css(\"transform\", \"rotateY(180deg)\");\n            if (helpers.selected == null) {\n              helpers.selected = id;\n              helpers.selRef = card;\n            } else {\n              $builderEl.find(\".score-attempts\").text(++helpers.attempts);\n              helpers.preventAction = true;\n              if (helpers.selected == id) {\n                //match\n                //   alert(\"match\");\n                setTimeout(function () {\n                  helpers.selRef.addClass(\"good\");\n                  card.addClass(\"good\");\n                  builder.params.methods.setScore($builderEl, helpers, builder);\n                }, 500);\n                setTimeout(function () {\n                  builder.params.methods.cardReset(card, helpers.selRef, \"good\", helpers);\n                }, 1500);\n              } else {\n                //wrong\n                //   alert(\"wrong\");\n                setTimeout(function () {\n                  helpers.selRef.addClass(\"bad\");\n                  card.addClass(\"bad\");\n                }, 500);\n                setTimeout(function () {\n                  builder.params.methods.cardReset(card, helpers.selRef, \"wrong\", helpers);\n                }, 1500);\n              }\n              //reset\n            }\n\n            //   debugger;\n          } else {\n            card.removeClass(\"clicked\");\n            if (helpers.attempts == content.maxAttempts) {\n              var attemptsEl = $builderEl.find(\".score-attempts-container\");\n              attemptsEl.addClass(\"final\");\n              setTimeout(function () {\n                attemptsEl.removeClass(\"final\");\n              }, 1300);\n            }\n          }\n        }\n      });\n\n      //   builder.app.data.myEvents.on(\"form:reset\");\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpers = builder.params.methods.helpersReset(helpers);\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var helpers = builder.params.helpers;\n      var id = $builderEl[0].id;\n      var res = false;\n      if (helpers.counter == helpers.maxCount) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    cardReset: function cardReset(card1, card2, type, helpersRef) {\n      if (type == \"wrong\") {\n        card1.find(\".flip-card-inner\").css(\"transform\", \"\");\n        card2.find(\".flip-card-inner\").css(\"transform\", \"\");\n        card1.removeClass(\"bad\");\n        card2.removeClass(\"bad\");\n        card1.removeClass(\"clicked\");\n        card2.removeClass(\"clicked\");\n      }\n      if (type == \"good\") {\n        card2.addClass(\"anim-done\");\n        card1.addClass(\"anim-done\");\n      }\n      helpersRef.selected = null;\n      helpersRef.selRef = null;\n      helpersRef.preventAction = false;\n    },\n    helpersReset: function helpersReset(helpersRef) {\n      return helpersRef = {\n        selected: null,\n        selRef: null,\n        preventAction: false,\n        counter: 0,\n        maxCount: 0,\n        attempts: 0,\n        cardsSize: 150,\n        puzzleArray: [],\n        reset: true\n      };\n    },\n    setScore: function setScore($builderEl, helpersRef, builder) {\n      var counterEl = $builderEl.find(\".score-counter\");\n      counterEl.text(++helpersRef.counter);\n      builder.params.methods.answerEmittor($builderEl, builder);\n    },\n    eval: function _eval(component, formComponent) {\n      // let _this = this;\n      //   debugger;\n      var $builderEl = component.$block;\n      var showResult = formComponent.params.content.showResult;\n      var showCorrect = formComponent.params.content.showCorrectAnswers;\n      var helpers = component.params.helpers;\n      var el = component.$block;\n\n      //Získání bodů\n      var points = helpers.counter;\n      var maxPoints = component.params.content.cards.filter(function (card) {\n        return !card.deleted;\n      }).length;\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n\n      //Show result badge\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        var $canvas = $builderEl.find(\"canvas\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-fail\")) $canvas.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-success\")) $canvas.removeClass(\"result-success\");\n        $resultBadge.addClass(classResult);\n        $canvas.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrect) {\n        component.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      //   debugger;\n      var cards = component.$block.find(\".flip-card-inner\");\n      cards.forEach(function (card) {\n        card = $$(card);\n        card.css(\"transform\", \"rotateY(180deg)\");\n        if (card.parents(\".flip-card\").hasClass(\"good\")) {\n          card.addClass(\"result-success\");\n        } else {\n          card.addClass(\"result-fail\");\n        }\n      });\n    },\n    getUserData: function getUserData() {}\n  }\n});\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\nvar wrapNativeSuper = __webpack_require__(\"./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\");\nvar wrapNativeSuper_default = /*#__PURE__*/__webpack_require__.n(wrapNativeSuper);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/get.js\nvar helpers_get = __webpack_require__(\"./node_modules/@babel/runtime/helpers/get.js\");\nvar get_default = /*#__PURE__*/__webpack_require__.n(helpers_get);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component-1.1.1.js\nfunction pdbe_molstar_component_1_1_1_callSuper(t,o,e){return o=getPrototypeOf_default()(o),possibleConstructorReturn_default()(t,pdbe_molstar_component_1_1_1_isNativeReflectConstruct()?Reflect.construct(o,e||[],getPrototypeOf_default()(t).constructor):o.apply(t,e));}function pdbe_molstar_component_1_1_1_isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(pdbe_molstar_component_1_1_1_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=get_default()(getPrototypeOf_default()(1&r?t.prototype:t),o,e);return 2&r&&\"function\"==typeof p?function(t){return p.apply(e,t);}:p;}function pdbe_molstar_component_1_1_1_createForOfIteratorHelper(r,e){var t=\"undefined\"!=typeof Symbol&&r[Symbol.iterator]||r[\"@@iterator\"];if(!t){if(Array.isArray(r)||(t=pdbe_molstar_component_1_1_1_unsupportedIterableToArray(r))||e&&r&&\"number\"==typeof r.length){t&&(r=t);var _n10=0,F=function F(){};return{s:F,n:function n(){return _n10>=r.length?{done:!0}:{done:!1,value:r[_n10++]};},e:function e(r){throw r;},f:F};}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t.return||t.return();}finally{if(u)throw o;}}};}function pdbe_molstar_component_1_1_1_unsupportedIterableToArray(r,a){if(r){if(\"string\"==typeof r)return pdbe_molstar_component_1_1_1_arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return\"Object\"===t&&r.constructor&&(t=r.constructor.name),\"Map\"===t||\"Set\"===t?Array.from(r):\"Arguments\"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pdbe_molstar_component_1_1_1_arrayLikeToArray(r,a):void 0;}}function pdbe_molstar_component_1_1_1_arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}/**\r\n * pdbe-molstar\r\n * @version 1.1.1\r\n * @link https://github.com/PDBeurope/pdbe-molstar\r\n * @license Apache 2.0\r\n *//**\r\n * Copyright 2019-2020 Mandar Deshpande <mandar@ebi.ac.uk>\r\n * European Bioinformatics Institute (EBI, http://www.ebi.ac.uk/)\r\n * European Molecular Biology Laboratory (EMBL, http://www.embl.de/)\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports;}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n});},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof_default()(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t];}.bind(null,i));return n;},r.n=function(e){var t=e&&e.__esModule?function(){return e.default;}:function(){return e;};return r.d(t,\"a\",t),t;},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},r.p=\"\",r(r.s=415);}([function(e,t,r){\"use strict\";r.r(t),r.d(t,\"__extends\",function(){return i;}),r.d(t,\"__assign\",function(){return _a2;}),r.d(t,\"__rest\",function(){return o;}),r.d(t,\"__decorate\",function(){return s;}),r.d(t,\"__param\",function(){return u;}),r.d(t,\"__metadata\",function(){return c;}),r.d(t,\"__awaiter\",function(){return l;}),r.d(t,\"__generator\",function(){return d;}),r.d(t,\"__createBinding\",function(){return f;}),r.d(t,\"__exportStar\",function(){return p;}),r.d(t,\"__values\",function(){return m;}),r.d(t,\"__read\",function(){return h;}),r.d(t,\"__spread\",function(){return g;}),r.d(t,\"__spreadArrays\",function(){return v;}),r.d(t,\"__await\",function(){return b;}),r.d(t,\"__asyncGenerator\",function(){return y;}),r.d(t,\"__asyncDelegator\",function(){return _;}),r.d(t,\"__asyncValues\",function(){return S;}),r.d(t,\"__makeTemplateObject\",function(){return O;}),r.d(t,\"__importStar\",function(){return C;}),r.d(t,\"__importDefault\",function(){return w;}),r.d(t,\"__classPrivateFieldGet\",function(){return P;}),r.d(t,\"__classPrivateFieldSet\",function(){return j;});/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */var _n2=function n(e,t){return(_n2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);})(e,t);};function i(e,t){function r(){this.constructor=e;}_n2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r());}var _a2=function a(){return(_a2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e;}).apply(this,arguments);};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);}return r;}function s(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(\"object\"==(typeof Reflect===\"undefined\"?\"undefined\":typeof_default()(Reflect))&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o;}function u(e,t){return function(r,n){t(r,n,e);};}function c(e,t){if(\"object\"==(typeof Reflect===\"undefined\"?\"undefined\":typeof_default()(Reflect))&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t);}function l(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{u(n.next(e));}catch(e){a(e);}}function s(e){try{u(n.throw(e));}catch(e){a(e);}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(o,s);}u((n=n.apply(e,t||[])).next());});}function d(e,t){var r,n,i,a,o={label:0,sent:function sent(){if(1&i[0])throw i[1];return i[1];},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this;}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError(\"Generator is already executing.\");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue;}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break;}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break;}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break;}i[2]&&o.ops.pop(),o.trys.pop();continue;}a=t.call(e,o);}catch(e){a=[6,e],n=0;}finally{r=i=0;}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0};}([a,s]);};}}var f=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function get(){return t[r];}});}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r];};function p(e,t){for(var r in e)\"default\"===r||t.hasOwnProperty(r)||f(t,e,r);}function m(e){var t=\"function\"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&\"number\"==typeof e.length)return{next:function next(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e};}};throw new TypeError(t?\"Object is not iterable.\":\"Symbol.iterator is not defined.\");}function h(e,t){var r=\"function\"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-->0)&&!(n=a.next()).done;)o.push(n.value);}catch(e){i={error:e};}finally{try{n&&!n.done&&(r=a.return)&&r.call(a);}finally{if(i)throw i.error;}}return o;}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e;}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n;}function b(e){return this instanceof b?(this.v=e,this):new b(e);}function y(e,t,r){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var n,i=r.apply(e,t||[]),a=[];return n={},o(\"next\"),o(\"throw\"),o(\"return\"),n[Symbol.asyncIterator]=function(){return this;},n;function o(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||s(e,t);});});}function s(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(u,c):l(a[0][2],r);}catch(e){l(a[0][3],e);}var r;}function u(e){s(\"next\",e);}function c(e){s(\"throw\",e);}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1]);}}function _(e){var t,r;return t={},n(\"next\"),n(\"throw\",function(e){throw e;}),n(\"return\"),t[Symbol.iterator]=function(){return this;},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:\"return\"===n}:i?i(t):t;}:i;}}function S(e){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n(\"next\"),n(\"throw\"),n(\"return\"),t[Symbol.asyncIterator]=function(){return this;},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r});},t);})(n,i,(t=e[r](t)).done,t.value);});};}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,\"raw\",{value:t}):e.raw=t,e;}var x=Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t});}:function(e,t){e.default=t;};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&f(t,e,r);return x(t,e),t;}function w(e){return e&&e.__esModule?e:{default:e};}function P(e,t){if(!t.has(e))throw new TypeError(\"attempted to get private field on non-instance\");return t.get(e);}function j(e,t,r){if(!t.has(e))throw new TypeError(\"attempted to set private field on non-instance\");return t.set(e,r),r;}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Mat4\",function(){return i.c;}),r.d(t,\"Mat3\",function(){return i.b;}),r.d(t,\"Vec2\",function(){return i.e;}),r.d(t,\"Vec3\",function(){return i.f;}),r.d(t,\"Vec4\",function(){return i.g;}),r.d(t,\"Quat\",function(){return i.d;}),r.d(t,\"EPSILON\",function(){return i.a;}),r.d(t,\"Tensor\",function(){return n;});var n,i=r(25);!function(e){function t(e,t,i){var a=function(e,t,r){for(var n=[],i=0;i<t.length;i++)n[i]=t[t.length-i-1];var a=[1];for(i=1;i<e.length;i++)a[i]=e[n[i-1]];return{dimensions:e,axisOrderFastToSlow:n,axisOrderSlowToFast:t,accessDimensions:a,defaultCtor:r||Float64Array};}(e,t,i),o=r(a),s=o.get,u=o.set,c=o.add,l=o.dataOffset,d=o.getCoords;return{rank:e.length,dimensions:e,axisOrderSlowToFast:t,create:n(a),get:s,set:u,add:c,dataOffset:l,getCoords:d};}function r(e){var t=e.dimensions,r=e.axisOrderFastToSlow;switch(t.length){case 1:return{get:function get(e,t){return e[t];},set:function set(e,t,r){return e[t]=r;},add:function add(e,t,r){return e[t]+=r;},dataOffset:function dataOffset(e){return e;},getCoords:function getCoords(e,t){return t[0]=e,t;}};case 2:if(0===r[0]&&1===r[1]){var n=t[0];return{get:function get(e,t,r){return e[r*n+t];},set:function set(e,t,r,i){return e[r*n+t]=i;},add:function add(e,t,r,i){return e[r*n+t]+=i;},dataOffset:function dataOffset(e,t){return t*n+e;},getCoords:function getCoords(e,t){return t[0]=e%n,t[1]=Math.floor(e/n),t;}};}if(1===r[0]&&0===r[1]){var i=t[1];return{get:function get(e,t,r){return e[t*i+r];},set:function set(e,t,r,n){return e[t*i+r]=n;},add:function add(e,t,r,n){return e[t*i+r]+=n;},dataOffset:function dataOffset(e,t){return e*i+t;},getCoords:function getCoords(e,t){return t[0]=Math.floor(e/i),t[1]=e%i,t;}};}throw new Error(\"bad axis order\");case 3:if(0===r[0]&&1===r[1]&&2===r[2]){var o=t[0],s=t[1],u=o*s;return{get:function get(e,t,r,n){return e[t+r*o+n*u];},set:function set(e,t,r,n,i){return e[t+r*o+n*u]=i;},add:function add(e,t,r,n,i){return e[t+r*o+n*u]+=i;},dataOffset:function dataOffset(e,t,r){return e+t*o+r*u;},getCoords:function getCoords(e,t){var r=Math.floor(e/o);return t[0]=e%o,t[1]=r%s,t[2]=Math.floor(r/s),t;}};}if(0===r[0]&&2===r[1]&&1===r[2]){var c=t[0],l=t[2],d=c*l;return{get:function get(e,t,r,n){return e[t+n*c+r*d];},set:function set(e,t,r,n,i){return e[t+n*c+r*d]=i;},add:function add(e,t,r,n,i){return e[t+n*c+r*d]+=i;},dataOffset:function dataOffset(e,t,r){return e+r*c+t*d;},getCoords:function getCoords(e,t){var r=Math.floor(e/c);return t[0]=e%c,t[1]=Math.floor(r/l),t[2]=r%l,t;}};}if(1===r[0]&&0===r[1]&&2===r[2]){var f=t[1],p=t[0],m=f*p;return{get:function get(e,t,r,n){return e[r+t*f+n*m];},set:function set(e,t,r,n,i){return e[r+t*f+n*m]=i;},add:function add(e,t,r,n,i){return e[r+t*f+n*m]+=i;},dataOffset:function dataOffset(e,t,r){return t+e*f+r*m;},getCoords:function getCoords(e,t){var r=Math.floor(e/f);return t[0]=r%p,t[1]=e%f,t[2]=Math.floor(r/p),t;}};}if(1===r[0]&&2===r[1]&&0===r[2]){var h=t[1],g=t[2],v=h*g;return{get:function get(e,t,r,n){return e[r+n*h+t*v];},set:function set(e,t,r,n,i){return e[r+n*h+t*v]=i;},add:function add(e,t,r,n,i){return e[r+n*h+t*v]+=i;},dataOffset:function dataOffset(e,t,r){return t+r*h+e*v;},getCoords:function getCoords(e,t){var r=Math.floor(e/h);return t[0]=Math.floor(r/g),t[1]=e%h,t[2]=r%g,t;}};}if(2===r[0]&&0===r[1]&&1===r[2]){var b=t[2],y=t[0],_=b*y;return{get:function get(e,t,r,n){return e[n+t*b+r*_];},set:function set(e,t,r,n,i){return e[n+t*b+r*_]=i;},add:function add(e,t,r,n,i){return e[n+t*b+r*_]+=i;},dataOffset:function dataOffset(e,t,r){return r+e*b+t*_;},getCoords:function getCoords(e,t){var r=Math.floor(e/b);return t[0]=r%y,t[1]=Math.floor(r/y),t[2]=e%b,t;}};}if(2===r[0]&&1===r[1]&&0===r[2]){var S=t[2],O=t[1],x=S*O;return{get:function get(e,t,r,n){return e[n+r*S+t*x];},set:function set(e,t,r,n,i){return e[n+r*S+t*x]=i;},add:function add(e,t,r,n,i){return e[n+r*S+t*x]+=i;},dataOffset:function dataOffset(e,t,r){return r+t*S+e*x;},getCoords:function getCoords(e,t){var r=Math.floor(e/S);return t[0]=Math.floor(r/O),t[1]=r%O,t[2]=e%S,t;}};}throw new Error(\"bad axis order\");default:return{get:function get(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return t[a(e,r)];},set:function set(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return t[a(e,r)]=r[r.length-1];},add:function add(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return t[a(e,r)]+=r[r.length-1];},dataOffset:function dataOffset(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(e,t);},getCoords:function getCoords(t,r){return function(e,t,r){for(var n=e.dimensions,i=e.axisOrderFastToSlow,a=n.length,o=t,s=0;s<a;s++){var u=n[i[s]];r[i[s]]=o%u,o=Math.floor(o/u);}return r[i[a+1]]=o,r;}(e,t,r);}};}}function n(e){for(var t=e.dimensions,r=1,n=0,i=t.length;n<i;n++)r*=t[n];return function(t){return new(t||e.defaultCtor)(r);};}function a(e,t){for(var r=e.accessDimensions,n=e.axisOrderFastToSlow,i=r.length-1,a=r[i]*t[n[i]],o=i-1;o>=0;o--)a=(a+t[n[o]])*r[o];return a;}function o(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=e[t[n]];return r;}e.create=function(e,t){return{space:e,data:t};},e.Space=t,e.Data1=function(e){return e;},e.Vector=function(e,r){return t([e],[0],r);},e.ColumnMajorMatrix=function(e,r,n){return t([e,r],[1,0],n);},e.RowMajorMatrix=function(e,r,n){return t([e,r],[0,1],n);},e.toMat4=function(e,t,r){if(2!==t.rank)throw new Error(\"Invalid tensor rank\");for(var n=Math.min(4,t.dimensions[0]),a=Math.min(4,t.dimensions[1]),o=0;o<n;o++)for(var s=0;s<a;s++)i.c.setValue(e,o,s,t.get(r,o,s));return e;},e.toMat3=function(e,t,r){if(2!==t.rank)throw new Error(\"Invalid tensor rank\");for(var n=Math.min(3,t.dimensions[0]),a=Math.min(3,t.dimensions[1]),o=0;o<n;o++)for(var s=0;s<a;s++)i.b.setValue(e,o,s,t.get(r,o,s));return e;},e.toVec3=function(e,t,r){if(1!==t.rank)throw new Error(\"Invalid tensor rank\");for(var n=Math.min(3,t.dimensions[0]),i=0;i<n;i++)e[i]=r[i];return e;},e.toVec4=function(e,t,r){if(1!==t.rank)throw new Error(\"Invalid tensor rank\");for(var n=Math.min(4,t.dimensions[0]),i=0;i<n;i++)e[i]=r[i];return e;},e.areEqualExact=function(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0;},e.invertAxisOrder=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=e[e.length-r-1];return t;},e.convertToCanonicalAxisIndicesFastToSlow=function(e){for(var t=new Int32Array(e.length),r=0;r<e.length;r++)t[e[r]]=r;return function(e){return o(e,t);};},e.convertToCanonicalAxisIndicesSlowToFast=function(e){for(var t=new Int32Array(e.length),r=0;r<e.length;r++)t[e[e.length-r-1]]=r;return function(e){return o(e,t);};};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ParamDefinition\",function(){return n;});var n,i=r(0),a=r(5),o=r(1),s=r(85),u=r(41),c=r(88),l=r(114);!function(e){function t(e,t){return t?(t.label&&(e.label=t.label),t.description&&(e.description=t.description),t.legend&&(e.legend=t.legend),t.fieldLabels&&(e.fieldLabels=t.fieldLabels),t.isHidden&&(e.isHidden=t.isHidden),t.shortLabel&&(e.shortLabel=t.shortLabel),t.twoColumns&&(e.twoColumns=t.twoColumns),t.isEssential&&(e.isEssential=t.isEssential),t.category&&(e.category=t.category),t.hideIf&&(e.hideIf=t.hideIf),t.help&&(e.help=t.help),e):e;}function r(e,r,n){return t({type:\"select\",defaultValue:b(e,r),options:r,cycle:null==n?void 0:n.cycle},n);}function n(e,t){return t?(void 0!==t.min&&(e.min=t.min),void 0!==t.max&&(e.max=t.max),void 0!==t.step&&(e.step=t.step),e):e;}function d(e,r){var n=t({type:\"group\",defaultValue:(null==r?void 0:r.customDefault)||p(e),params:e},r);return(null==r?void 0:r.isExpanded)&&(n.isExpanded=r.isExpanded),(null==r?void 0:r.isFlat)&&(n.isFlat=r.isFlat),(null==r?void 0:r.pivot)&&(n.pivot=r.pivot),n;}function f(){return p(this.element);}function p(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];e[i].isOptional||(t[i]=e[i].defaultValue);}return t;}function m(e,t,r){if(t===r)return!0;if(\"object\"!=typeof_default()(t)||\"object\"!=typeof_default()(r))return!1;for(var n=0,i=Object.keys(e);n<i.length;n++){var a=i[n];if(!h(e[a],t[a],r[a]))return!1;}return!0;}function h(e,t,r){if(t===r)return!0;if(\"group\"===e.type)return m(e.params,t,r);if(\"mapped\"===e.type){var n=r;return(c=t).name===n.name&&h(e.map(c.name),c.params,n.params);}if(\"multi-select\"===e.type){n=r;if((c=t).length!==n.length)return!1;if(c.length<10){for(var i=0,s=c.length;i<s;i++)if(c[i]!==n[i]&&n.indexOf(c[i])<0)return!1;}else{var u=new Set(n);for(i=0,s=c.length;i<s;i++)if(c[i]!==n[i]&&!u.has(c[i]))return!1;}return!0;}if(\"interval\"===e.type)return t[0]===r[0]&&t[1]===r[1];if(\"line-graph\"===e.type){n=r;if((c=t).length!==n.length)return!1;for(i=0,s=c.length;i<s;i++)if(!o.Vec2.areEqual(c[i],n[i]))return!1;return!0;}if(\"vec3\"===e.type)return o.Vec3.equals(t,r);if(\"mat4\"===e.type)return o.Mat4.areEqual(t,r,o.EPSILON);if(\"script\"===e.type){n=r;return(c=t).language===n.language&&c.expression===n.expression;}if(\"object-list\"===e.type){n=r;var c,l=(c=t).length;if(l!==n.length)return!1;for(i=0;i<l;i++)if(!m(e.element,c[i],n[i]))return!1;return!0;}return\"object\"==typeof_default()(t)&&\"object\"==typeof_default()(r)&&Object(a.m)(t,r);}function g(e,t,r){if(void 0===t)return Object(i.__assign)({},r);if(void 0===r)return Object(i.__assign)({},t);for(var n=Object.create(null),a=0,o=Object.keys(e);a<o.length;a++){var s=o[a];n[s]=v(e[s],t[s],r[s]);}return n;}function v(e,t,r){if(void 0===t)return\"object\"!=typeof_default()(r)||Array.isArray(r)?r:Object(i.__assign)({},r);if(void 0===r)return\"object\"!=typeof_default()(t)||Array.isArray(t)?t:Object(i.__assign)({},t);if(\"group\"===e.type)return g(e.params,t,r);if(\"mapped\"===e.type){var n=t,a=r;if(n.name!==a.name)return Object(i.__assign)({},a);var o=e.map(a.name);return{name:a.name,params:v(o,n.params,a.params)};}return\"value\"===e.type?r:\"object\"==typeof_default()(t)&&\"object\"==typeof_default()(r)?Array.isArray(r)?r:Object(i.__assign)(Object(i.__assign)({},t),r):r;}function b(e,t){for(var r=0,n=t;r<n.length;r++){if(n[r][0]===e)return e;}return t.length>0?t[0][0]:void 0;}e.Essential={isEssential:!0},e.Optional=function(e){var t=Object(i.__assign)({},e);return t.isOptional=!0,t;},e.Value=function(e,r){return t({type:\"value\",defaultValue:e},r);},e.Select=r,e.MultiSelect=function(e,r,n){var i=t({type:\"multi-select\",defaultValue:e,options:r},n);return(null==n?void 0:n.emptyValue)&&(i.emptyValue=n.emptyValue),i;},e.Boolean=function(e,r){return t({type:\"boolean\",defaultValue:e},r);},e.Text=function(e,r){return void 0===e&&(e=\"\"),t({type:\"text\",defaultValue:e},r);},e.Color=function(e,r){var n=t({type:\"color\",defaultValue:e},r);return(null==r?void 0:r.isExpanded)&&(n.isExpanded=r.isExpanded),n;},e.ColorList=function(e,r){var n;if(\"string\"==typeof e){var i=Object(c.getColorListFromName)(e);n={kind:\"qualitative\"!==i.type?\"interpolate\":\"set\",colors:i.list};}else n=e;return t({type:\"color-list\",presetKind:(null==r?void 0:r.presetKind)||\"all\",defaultValue:n},r);},e.Vec3=function(e,r,i){return t(n({type:\"vec3\",defaultValue:e},r),i);},e.Mat4=function(e,r){return t({type:\"mat4\",defaultValue:e},r);},e.Url=function(e,r){return t({type:\"url\",defaultValue:\"string\"==typeof e?l.Asset.Url(e):l.Asset.Url(e.url,{body:e.body})},r);},e.File=function(e){var r=t({type:\"file\",defaultValue:null},e);return(null==e?void 0:e.accept)&&(r.accept=e.accept),r;},e.FileList=function(e){var r=t({type:\"file-list\",defaultValue:null},e);return(null==e?void 0:e.accept)&&(r.accept=e.accept),r;},e.Numeric=function(e,r,i){return t(n({type:\"number\",defaultValue:e},r),i);},e.Interval=function(e,r,i){return t(n({type:\"interval\",defaultValue:e},r),i);},e.LineGraph=function(e,r){return t({type:\"line-graph\",defaultValue:e},r);},e.Group=d,e.EmptyGroup=function(e){return d({},e);},e.Mapped=function(e,n,i,a){var o=b(e,n);return t({type:\"mapped\",defaultValue:{name:o,params:i(o).defaultValue},select:r(o,n,a),map:i},a);},e.MappedStatic=function(e,n,i){var a=(null==i?void 0:i.options)?i.options:Object.keys(n).map(function(e){return[e,n[e].label||Object(u.d)(e)];}),o=b(e,a);return t({type:\"mapped\",defaultValue:{name:o,params:n[o].defaultValue},select:r(o,a,i),map:function map(e){return n[e];}},i);},e.ObjectList=function(e,r,n){return t({type:\"object-list\",element:e,getLabel:r,ctor:f,defaultValue:(null==n?void 0:n.defaultValue)||[]},n);},e.Converted=function(e,t,r){return{type:\"converted\",defaultValue:t(r.defaultValue),converted:r,fromValue:e,toValue:t};},e.Conditioned=function(e,n,i,a,o){var s=Object.keys(n).map(function(e){return[e,e];});return t({type:\"conditioned\",select:r(i(e),s,o),defaultValue:e,conditionParams:n,conditionForValue:i,conditionedValue:a},o);},e.Script=function(e,r){return t({type:\"script\",defaultValue:e},r);},e.For=function(e){return 0;},e.getDefaultValues=p,e.setDefaultValues=function(e,t){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];e[i].isOptional||(e[i].defaultValue=t[i]);}},e.clone=function(e){return Object(s.b)(e);},e.validate=function(e,t){},e.areEqual=m,e.isParamEqual=h,e.merge=g,e.mergeParam=v,e.objectToOptions=function(e,t){for(var r=[],n=0,i=Object.keys(e);n<i.length;n++){var a=i[n];if(t){var o=t(a,e[a]);r.push(\"string\"==typeof o?[a,o]:[a,o[0],o[1]]);}else\"string\"==typeof e[a]?r.push([a,e[a]]):r.push([a,null===t?a:Object(u.d)(a)]);}return r;},e.arrayToOptions=function(e,t){for(var r=[],n=0,i=e;n<i.length;n++){var a=i[n];t?r.push([a,t(a)]):r.push([a,null===t?a:Object(u.d)(a)]);}return r;},e.optionLabel=function(e,t){for(var r=0,n=e.options;r<n.length;r++){var i=n[r];if(i[0]===t)return i[1];}return\"\";};}(n||(n={}));},function(e,t,r){\"use strict\";e.exports=r(417);},function(e,t,r){\"use strict\";r.r(t);var n=r(165);r.d(t,\"Time\",function(){return n.b;}),r.d(t,\"Coordinates\",function(){return n.a;});var i=r(398);r.d(t,\"Topology\",function(){return i.a;});var a=r(243);for(var o in a)[\"Time\",\"Coordinates\",\"Topology\",\"default\"].indexOf(o)<0&&function(e){r.d(t,e,function(){return a[e];});}(o);var s=r(27);r.d(t,\"StructureElement\",function(){return s.d;}),r.d(t,\"Bond\",function(){return s.a;}),r.d(t,\"Structure\",function(){return s.c;}),r.d(t,\"Unit\",function(){return s.g;}),r.d(t,\"StructureSymmetry\",function(){return s.f;}),r.d(t,\"StructureProperties\",function(){return s.e;}),r.d(t,\"UnitRing\",function(){return s.h;}),r.d(t,\"UnitRings\",function(){return s.i;}),r.d(t,\"CifExportContext\",function(){return s.b;}),r.d(t,\"mmCIF_Export_Filters\",function(){return s.k;}),r.d(t,\"encode_mmCIF_categories\",function(){return s.j;});var u=r(166);r.d(t,\"QueryContext\",function(){return u.b;}),r.d(t,\"Queries\",function(){return u.a;}),r.d(t,\"StructureSelection\",function(){return u.d;}),r.d(t,\"StructureQuery\",function(){return u.c;});},function(e,t,r){\"use strict\";r.d(t,\"f\",function(){return u.c;}),r.d(t,\"d\",function(){return u.a;}),r.d(t,\"e\",function(){return u.b;}),r.d(t,\"a\",function(){return i.a;}),r.d(t,\"b\",function(){return a.a;}),r.d(t,\"c\",function(){return o.a;}),r.d(t,\"k\",function(){return c;}),r.d(t,\"g\",function(){return l;}),r.d(t,\"h\",function(){return f;}),r.d(t,\"l\",function(){return p;}),r.d(t,\"m\",function(){return m;}),r.d(t,\"i\",function(){return h;}),r.d(t,\"j\",function(){return v;});var n,i=r(207),a=r(106),o=r(194);function s(e,t){return e-t;}!function(e){var t=function(){function e(){this.size=0;}return e.prototype.has=function(e){return!1;},e.prototype.forEach=function(e,t){return t;},e;}(),r=function(){function e(e){this.idx=e,this.size=1;}return e.prototype.has=function(e){return e===this.idx;},e.prototype.forEach=function(e,t){return e(this.idx,t),t;},e;}(),n=function(){function e(e,t){this.mask=e,this.size=t,this.length=e.length;}return e.prototype.has=function(e){return e<this.length&&!!this.mask[e];},e.prototype._forEach=function(e,t){for(var r=0;r<this.length;r++)this.mask[r]&&e(r,t);},e.prototype.forEach=function(e,t){return this._forEach(e,t),t;},e;}(),i=function(){function e(e){this.size=e;}return e.prototype.has=function(e){return!0;},e.prototype._forEach=function(e,t){for(var r=0;r<this.size;r++)e(r,t);},e.prototype.forEach=function(e,t){return this._forEach(e,t),t;},e;}(),a=function(){function e(e){this.set=e,this._flat=void 0,this.size=e.size;}return e.prototype.has=function(e){return this.set.has(e);},e.prototype._forEach=function(e,t){for(var r=0,n=this.flatten();r<n.length;r++){e(n[r],t);}},e.prototype.flatten=function(){if(this._flat)return this._flat;var e,t=new Int32Array(this.size),r=0;return this.set.forEach(function(e){return t[r++]=e;}),e=t,Array.prototype.sort.call(e,s),this._flat=t,this._flat;},e.prototype.forEach=function(e,t){return this._forEach(e,t),t;},e;}();function o(e){return new a(e);}function u(e,t){return new n(e,t);}e.always=function(e){return new i(e);},e.never=new t(),e.ofSet=o,e.singleton=function(e){return new r(e);},e.ofUniqueIndices=function(e){var o=e.length;if(0===o)return new t();if(1===o)return new r(e[0]);for(var s=0,u=0,c=e;u<c.length;u++){(p=c[u])>s&&(s=p);}if(o===s)return new i(o);if(o/s<1/12){for(var l=new Set(),d=0,f=e;d<f.length;d++){var p=f[d];l.add(p);}return new a(l);}for(var m=new Int8Array(s+1),h=0,g=e;h<g.length;h++){m[p=g[h]]=1;}return new n(m,e.length);},e.ofMask=u,e.hasAny=function(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];if(e.has(i))return!0;}return!1;},e.complement=function(e,t){var r=0,n=0;if(t.forEach(function(t){e.has(t)||(r++,t>n&&(n=t));}),r/n<1/12){var i=new Set();return t.forEach(function(t){e.has(t)||i.add(t);}),o(i);}var a=new Uint8Array(n+1);return t.forEach(function(t){e.has(t)||(a[t]=1);}),u(a,r);};}(n||(n={}));var u=r(58),c=function c(){};function l(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0;}var d=Object.prototype.hasOwnProperty;function f(e,t){if(e===t)return!0;var r=Array.isArray(e),n=Array.isArray(t);if(r&&n){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!f(e[i],t[i]))return!1;return!0;}if(r!==n)return!1;if(e&&t&&\"object\"==typeof_default()(e)&&\"object\"==typeof_default()(t)){var a=Object.keys(e);if(a.length!==Object.keys(t).length)return!1;var o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()===t.getTime();if(o!==s)return!1;var u=e instanceof RegExp,c=t instanceof RegExp;if(u&&c)return e.toString()===t.toString();if(u!==c)return!1;for(i=0;i<a.length;i++)if(!d.call(t,a[i]))return!1;for(i=0;i<a.length;i++)if(!f(e[a[i]],t[a[i]]))return!1;return!0;}return!1;}function p(e,t){if(e===t)return!0;var r=Array.isArray(e),n=Array.isArray(t);return r&&n?function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;++r)if(e[r]!==t[r])return!1;return!0;}(e,t):r===n&&!(!e||!t||\"object\"!=typeof_default()(e)||\"object\"!=typeof_default()(t))&&m(e,t);}function m(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e);if(Object.keys(t).length!==r.length)return!1;for(var n=0,i=r;n<i.length;n++){var a=i[n];if(!d.call(e,a)||e[a]!==t[a])return!1;}return!0;}function h(e,t){return void 0!==e?e:t;}Object.assign;function g(e){return(e<10?\"0\":\"\")+e;}function v(e){var t=e.getHours(),r=e.getMinutes(),n=e.getSeconds();return t+\":\"+g(r)+\":\"+g(n);}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Interval\",function(){return D;}),r.d(t,\"OrderedSet\",function(){return Qe;}),r.d(t,\"Segmentation\",function(){return nt;}),r.d(t,\"SortedArray\",function(){return ge;}),r.d(t,\"Tuple\",function(){return a;}),r.d(t,\"LinkedIndex\",function(){return ot;}),r.d(t,\"IntMap\",function(){return st;}),r.d(t,\"Iterator\",function(){return ut.a;});var n,i=r(9);!function(e){e.Zero=0;var t,r,n=(t=new ArrayBuffer(8),r=new ArrayBuffer(8),{_int32:new Int32Array(t),_float64:new Float64Array(t),_int32_1:new Int32Array(r),_float64_1:new Float64Array(r)}),a=n._int32,o=n._float64,s=n._int32_1,u=n._float64_1;e.is=function(e){return\"number\"==typeof e;},e.create=function(e,t){return a[0]=e,a[1]=t,o[0];},e.fst=function(e){return o[0]=e,a[0];},e.snd=function(e){return o[0]=e,a[1];},e.areEqual=function(e,t){return o[0]=e,u[0]=t,a[0]===s[0]&&a[1]===s[1];},e.compare=function(e,t){o[0]=e,u[0]=t;var r=a[0]-s[0];return 0!==r?r:a[1]-s[1];},e.compareInArray=function(e,t,r){o[0]=e[t],u[0]=e[r];var n=a[0]-s[0];return 0!==n?n:a[1]-s[1];},e.hashCode=function(e){return o[0]=e,Object(i.i)(a[0],a[1]);},e.toString=function(e){return o[0]=e,\"(\"+a[0]+\", \"+a[1]+\")\";};}(n||(n={}));var a=n,o=a.Zero;function s(e,t){return t<e?a.create(e,e):a.create(e,t+1);}function u(e,t){return t<=e?a.create(e,e):a.create(e,t);}function c(e){return e<0?a.create(0,0):a.create(0,e);}var l=a.is,d=a.fst,f=a.snd,p=a.fst;function m(e){return a.snd(e)-1;}function h(e){return a.snd(e)-a.fst(e);}var g=a.hashCode,v=a.toString;function b(e,t){return a.fst(e)<=t&&t<a.snd(e);}function y(e,t){var r=d(e);return t>=r&&t<f(e)?t-r:-1;}function _(e,t){return a.fst(e)+t;}var S,O,x=a.areEqual;function C(e,t){var r=h(e),n=h(t);return 0===r&&0===n||r>0&&n>0&&m(e)>=p(t)&&p(e)<=m(t);}function w(e,t){return h(e)?!h(t)||d(e)<=d(t)&&f(e)>=f(t):0===h(t);}function P(e,t){var r=d(e);if(t<=r)return 0;var n=f(e);return t>=n?n-r:t-r;}function j(e,t,r){var n=d(r),i=d(e);if(t<=n+i)return n;var a=f(r);return t>=a+i?a:t-i;}function E(e,t,r){return u(P(e,t),P(e,r+1));}function A(e,t){return C(e,t)?u(Math.max(d(e),d(t)),Math.min(f(e),f(t))):o;}function T(e,t){return h(E(e,p(t),m(t)));}(O=S||(S={})).Empty=o,O.ofSingleton=function(e){return s(e,e);},O.ofRange=s,O.ofBounds=u,O.ofLength=c,O.is=l,O.has=b,O.indexOf=y,O.getAt=_,O.start=d,O.end=f,O.min=p,O.max=m,O.size=h,O.hashCode=g,O.toString=v,O.areEqual=x,O.areIntersecting=C,O.isSubInterval=w,O.findPredecessorIndex=P,O.findPredecessorIndexInInterval=j,O.findRange=E,O.intersectionSize=T,O.intersect=A;var D=S,I=[];function M(e){return[e];}function k(e){return e;}function B(e){return Object(i.q)(e),e;}function V(e,t){if(t<e)return[];for(var r=new Int32Array(t-e+1),n=e;n<=t;n++)r[n-e]=n;return r;}function R(e){return e&&(Array.isArray(e)||!!e.buffer);}function L(e){return e[0];}function N(e){return e[e.length-1]+1;}function F(e){return e[0];}function U(e){return e[e.length-1];}function z(e){return e.length;}function H(e){var t=e.length;return t?t>2?Object(i.k)(t,e[0],e[t-1],e[t>>1]):Object(i.j)(t,e[0],e[t-1]):0;}function G(e){var t=e.length;return t>5?\"[\"+e[0]+\", \"+e[1]+\", ..., \"+e[t-1]+\"], length \"+t:\"[\"+e.join(\", \")+\"]\";}function q(e,t){var r=e.length;return 0===r?-1:e[0]<=t&&t<=e[r-1]?$(e,t,0,r):-1;}function W(e,t,r){return Q(e,t,D.start(r),D.end(r));}function Q(e,t,r,n){return 0===e.length||n<=r?-1:e[r]<=t&&t<=e[n-1]?$(e,t,r,n):-1;}function Y(e,t){return q(e,t)>=0;}function X(e,t){if(e===t)return!0;var r=e.length;if(r!==t.length||e[0]!==t[0]||e[r-1]!==t[r-1])return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0;}function K(e,t){var r=e.length;return t<=e[0]?0:t>e[r-1]?r:ee(e,t,0,r);}function Z(e,t,r){var n=D.start(r),i=D.end(r),a=e[n];return t<=a?n:i>n&&t>e[i-1]?i:t-a<=11?function(e,t,r,n){for(var i=r;i<n;i++)if(t<=e[i])return i;return n;}(e,t,n+1,i):ee(e,t,n,i);}function J(e,t,r){return D.ofBounds(K(e,t),K(e,r+1));}function $(e,t,r,n){for(var i=r,a=n-1;i<=a;){if(i+11>a){for(var o=i;o<=a;o++)if(t===e[o])return o;return-1;}var s=i+a>>1,u=e[s];if(t<u)a=s-1;else{if(!(t>u))return s;i=s+1;}}return-1;}function ee(e,t,r,n){for(var i=r,a=n-1;i<a;){if(i+11>a){for(var o=i;o<=a;o++)if(t<=e[o])return o;return a+1;}var s=i+a>>1,u=e[s];if(t<u)a=s-1;else{if(!(t>u))return s;i=s+1;}}return i>a?a+1:e[i]>=t?i:i+1;}function te(e,t){if(e===t)return!0;for(var r=pe(e,t),n=r.startI,i=r.startJ,a=r.endI,o=r.endJ;n<a&&i<o;){var s=e[n],u=t[i];if(s<u)n++;else{if(!(s>u))return!0;i++;}}return!1;}function re(e,t){if(e===t)return!0;var r=t.length,n=pe(e,t),i=n.startI,a=n.startJ,o=n.endI,s=n.endJ;if(s-a<r||o-i<r)return!1;for(var u=0;i<o&&a<s;){var c=e[i],l=t[a];c<l?i++:c>l?a++:(i++,a++,u++);}return u===r;}function ne(e,t){if(e===t)return e;var r=e.length,n=t.length;if(0===r)return t;if(0===n)return e;if(e[0]>t[0])return ne(t,e);var i=pe(e,t),a=i.startI,o=i.startJ,s=i.endI,u=i.endJ,c=ae(e,t,a,o,s,u);if(c===r&&c===n||c===n)return e;if(c===r)return t;var l=new Int32Array(r+n-c),d=0,f=0,p=0;for(d=0;d<a;d++)l[p++]=e[d];for(;f<u&&e[a]>t[f];)l[p++]=t[f++];for(;d<s&&f<u;){var m=e[d],h=t[f];m<h?(l[p++]=m,d++):m>h?(l[p++]=h,f++):(l[p++]=m,d++,f++);}for(;d<s;d++)l[p++]=e[d];for(;f<u;f++)l[p++]=t[f];for(;d<r;d++)l[p++]=e[d];for(;f<n;f++)l[p++]=t[f];return l;}function ie(e,t){if(e===t)return z(e);var r=pe(e,t);return ae(e,t,r.startI,r.startJ,r.endI,r.endJ);}function ae(e,t,r,n,i,a){for(var o=r,s=n,u=0;o<i&&s<a;){var c=e[o],l=t[s];c<l?o++:c>l?s++:(o++,s++,u++);}return u;}function oe(e,t){if(e===t)return e;var r=pe(e,t),n=r.startI,i=r.startJ,a=r.endI,o=r.endJ,s=ae(e,t,n,i,a,o),u=e.length,c=t.length;if(!s)return I;if(s===u&&s===c||s===c)return t;if(s===u)return e;for(var l=new Int32Array(s),d=0,f=n,p=i;f<a&&p<o;){var m=e[f],h=t[p];m<h?f++:(m>h||(l[d++]=m,f++),p++);}return l;}function se(e,t){if(e===t)return I;for(var r=e.length,n=pe(e,t),i=n.startI,a=n.startJ,o=n.endI,s=n.endJ,u=i,c=a,l=0;u<o&&c<s;){(m=e[u])<(h=t[c])?u++:m>h?c++:(u++,c++,l++);}if(!l)return e;if(l>=r)return I;for(var d=new Int32Array(r-l),f=0,p=0;p<i;p++)d[f++]=e[p];for(u=i,c=a;u<o&&c<s;){var m,h;(m=e[u])<(h=t[c])?(d[f++]=m,u++):(m>h||u++,c++);}for(;u<r;u++)d[f++]=e[u];return d;}function ue(e){if(e.length<2)return e;for(var t=1,r=0,n=e.length-1;r<n;r++)e[r]!==e[r+1]&&t++;if(t===e.length)return e;var i=new Int32Array(t),a=0;for(r=0,n=e.length-1;r<n;r++)e[r]!==e[r+1]&&(i[a++]=e[r]);return i[a]=e[e.length-1],i;}function ce(e,t){if(e===t)return Object(i.g)(0,e.length-1);for(var r=pe(e,t),n=r.startI,a=r.startJ,o=r.endI,s=r.endJ,u=n,c=a,l=0;u<o&&c<s;){(m=e[u])<(h=t[c])?u++:m>h?c++:(u++,c++,l++);}var d=e.length;if(!l)return I;if(l===d)return Object(i.g)(0,e.length-1);var f=new Int32Array(l),p=0;for(u=n,c=a;u<o&&c<s;){var m,h;(m=e[u])<(h=t[c])?u++:(m>h||(f[p++]=u,u++),c++);}return f;}var le,de,fe={startI:0,startJ:0,endI:0,endJ:0};function pe(e,t){var r=e.length,n=t.length,i=r/n;return r>=128||n>=128||i<=.34||i>=2.99?(fe.startI=K(e,L(t)),fe.startJ=K(t,L(e)),fe.endI=K(e,N(t)),fe.endJ=K(t,N(e))):(fe.startI=0,fe.startJ=0,fe.endI=r,fe.endJ=n),fe;}(de=le||(le={})).Empty=I,de.ofUnsortedArray=B,de.ofSingleton=M,de.ofSortedArray=k,de.ofRange=V,de.ofBounds=function(e,t){return V(e,t-1);},de.is=R,de.has=Y,de.indexOf=q,de.indexOfInInterval=W,de.indexOfInRange=Q,de.start=L,de.end=N,de.min=F,de.max=U,de.size=z,de.hashCode=H,de.toString=G,de.areEqual=X,de.areIntersecting=te,de.isSubset=re,de.union=ne,de.intersect=oe,de.subtract=se,de.findPredecessorIndex=K,de.findPredecessorIndexInInterval=Z,de.findRange=J,de.intersectionSize=ie,de.deduplicate=ue,de.indicesOf=ce;var me,he,ge=le,ve=D.Empty,be=D.ofSingleton,ye=D.ofRange,_e=D.ofBounds;function Se(e){return e.length?e[e.length-1]-e[0]+1===e.length?D.ofRange(e[0],e[e.length-1]):e:ve;}function Oe(e){return D.is(e)?D.size(e):ge.size(e);}function xe(e,t){return D.is(e)?D.has(e,t):ge.has(e,t);}function Ce(e,t){return D.is(e)?D.indexOf(e,t):ge.indexOf(e,t);}function we(e,t){return D.is(e)?D.getAt(e,t):e[t];}function Pe(e){return D.is(e)?D.min(e):ge.min(e);}function je(e){return D.is(e)?D.max(e):ge.max(e);}function Ee(e){return D.is(e)?D.start(e):ge.start(e);}function Ae(e){return D.is(e)?D.end(e):ge.end(e);}function Te(e){return D.is(e)?D.hashCode(e):ge.hashCode(e);}function De(e,t){return D.is(e)?D.is(t)?D.areEqual(e,t):Ue(e,t):D.is(t)?Ue(t,e):ge.areEqual(e,t);}function Ie(e,t){return D.is(e)?D.is(t)?D.areIntersecting(e,t):ze(t,e):D.is(t)?ze(e,t):ge.areIntersecting(e,t);}function Me(e,t){return D.is(e)?D.is(t)?D.isSubInterval(e,t):function(e,t){var r=D.min(e),n=D.max(e);if(n-r+1==0)return!1;var i=ge.min(t),a=ge.max(t);return i>=r&&a<=n;}(e,t):D.is(t)?function(e,t){var r=D.min(t),n=D.max(t);if(n-r+1==0)return!0;var i=ge.min(e),a=ge.max(e);if(r<i||n>a)return!1;var o=ge.findRange(e,r,n);return D.size(o)===D.size(t);}(e,t):ge.isSubset(e,t);}function ke(e,t){return D.is(e)?D.findPredecessorIndex(e,t):ge.findPredecessorIndex(e,t);}function Be(e,t,r){return D.is(e)?D.findPredecessorIndexInInterval(e,t,r):ge.findPredecessorIndexInInterval(e,t,r);}function Ve(e,t,r){return D.is(e)?D.findRange(e,t,r):ge.findRange(e,t,r);}function Re(e,t){return D.is(e)?D.is(t)?D.intersectionSize(e,t):Ge(t,e):D.is(t)?Ge(e,t):ge.intersectionSize(e,t);}function Le(e,t){return D.is(e)?D.is(t)?function(e,t){if(D.areEqual(e,t))return e;var r=D.size(e),n=D.size(t);if(!n)return e;if(!r)return t;var i,a,o,s,u=D.min(e),c=D.min(t);if(function(e,t){var r=Oe(e),n=Oe(t);return 0===r&&0===n||r>0&&n>0&&je(e)>=Pe(t)&&Pe(e)<=je(t);}(e,t))return D.ofRange(Math.min(u,c),Math.max(D.max(e),D.max(t)));u<c?(i=r,a=u,o=n,s=c):(i=n,a=c,o=r,s=u);for(var l=new Int32Array(r+n),d=0;d<i;d++)l[d]=d+a;for(d=0;d<o;d++)l[d+i]=d+s;return Se(l);}(e,t):He(t,e):D.is(t)?He(e,t):Se(ge.union(e,t));}function Ne(e,t){return D.is(e)?D.is(t)?D.intersect(e,t):qe(t,e):D.is(t)?qe(e,t):Se(ge.intersect(e,t));}function Fe(e,t){return D.is(e)?D.is(t)?function(e,t){if(D.areEqual(e,t))return ve;if(!D.areIntersecting(e,t))return e;var r=D.min(e),n=D.max(e),i=D.min(t),a=D.max(t);if(n<r||a<i)return e;if(D.isSubInterval(t,e))return ve;if(D.isSubInterval(e,t)){var o=i-r,s=n-a;if(o<=0)return D.ofRange(a+1,a+s);if(s<=0)return D.ofRange(r,r+o-1);for(var u=new Int32Array(o+s),c=0,l=0;l<o;l++)u[c++]=r+l;for(l=1;l<=s;l++)u[c++]=a+l;return Se(u);}return r<i?D.ofRange(r,i-1):D.ofRange(a+1,n);}(e,t):function(e,t){var r=D.min(e),n=D.max(e);if(n<r)return e;var i=n-r+1,a=ge.findRange(t,r,n),o=D.start(a),s=D.end(a),u=s-o;if(0===u)return e;var c=i-u;if(c<=0)return ve;for(var l=new Int32Array(c),d=t.length-1,f=t[Math.min(o,d)],p=t[Math.min(s,d)],m=0,h=r;h<f;h++)l[m++]=h;for(h=f;h<=p;h++)ge.indexOfInInterval(t,h,a)<0&&(l[m++]=h);for(h=p+1;h<=n;h++)l[m++]=h;return Se(l);}(e,t):D.is(t)?function(e,t){var r=D.min(t),n=D.max(t);if(n<r)return e;var i=ge.findRange(e,r,n),a=D.start(i),o=D.end(i),s=e.length-(o-a);if(s<=0)return ve;if(s===e.length)return e;for(var u=new Int32Array(s),c=0,l=0;l<a;l++)u[c++]=e[l];l=o;for(var d=e.length;l<d;l++)u[c++]=e[l];return Se(u);}(e,t):Se(ge.subtract(e,t));}function Ue(e,t){return D.size(e)===ge.size(t)&&D.start(e)===ge.start(t)&&D.end(e)===ge.end(t);}function ze(e,t){return 0!==e.length&&0!==D.size(ge.findRange(e,D.min(t),D.max(t)));}function He(e,t){var r=D.size(t);if(!r)return e;if(function(e,t){return Oe(e)?!Oe(t)||Pe(e)<=Pe(t)&&je(e)>=je(t):0===Oe(t);}(t,e))return t;for(var n=D.min(t),i=D.max(t),a=ge.findRange(e,n,i),o=D.start(a),s=D.end(a),u=new Int32Array(o+(e.length-s)+r),c=0,l=0;l<o;l++)u[c++]=e[l];for(l=n;l<=i;l++)u[c++]=l;l=s;for(var d=e.length;l<d;l++)u[c++]=e[l];return Se(u);}function Ge(e,t){if(!D.size(t))return 0;var r=ge.findRange(e,D.min(t),D.max(t));return D.end(r)-D.start(r);}function qe(e,t){if(!D.size(t))return ve;var r=ge.findRange(e,D.min(t),D.max(t)),n=D.start(r),i=D.end(r),a=i-n;if(!a)return ve;if(a===e.length)return e;for(var o=new Int32Array(a),s=0,u=n;u<i;u++)o[s++]=e[u];return Se(o);}function We(e,t,r){if(t===r)return e;var n=Oe(e),i=t.length,a=r.length;if(0===n||0===i||0===a)return ve;for(var o=ge.findPredecessorIndex(r,t[Pe(e)]),s=ge.findPredecessorIndex(r,t[je(e)]+1),u=0,c=0,l=0,d=o;l<n&&d<s;){(p=t[we(e,l)])<(m=r[d])?l++:(p>m||(u++,l++),d++);}if(0===u)return ve;if(u===i&&u===a)return e;var f=new Int32Array(u);for(c=0,l=0,d=o;l<n&&d<s;){var p,m;(p=t[we(e,l)])<(m=r[d])?l++:(p>m||(f[c++]=d,l++),d++);}return Se(f);}(he=me||(me={})).Empty=ve,he.ofSingleton=be,he.ofRange=ye,he.ofBounds=_e,he.ofSortedArray=Se,he.has=xe,he.indexOf=Ce,he.getAt=we,he.min=Pe,he.max=je,he.start=Ee,he.end=Ae,he.size=Oe,he.hashCode=Te,he.areEqual=De,he.areIntersecting=Ie,he.isSubset=Me,he.union=Le,he.intersect=Ne,he.indexedIntersect=We,he.subtract=Fe,he.findPredecessorIndex=ke,he.findPredecessorIndexInInterval=Be,he.findRange=Ve,he.intersectionSize=Re,he.forEach=function(e,t,r){return function(e,t,r){if(D.is(e))for(var n=D.min(e),i=n,a=D.max(e);i<=a;i++)t(i,i-n,r);else for(i=0,a=e.length;i<a;i++)t(e[i],i,r);return r;}(e,t,r);},he.forEachSegment=function(e,t,r,n){return function(e,t,r,n){if(D.is(e))for(var i=0,a=D.min(e),o=D.max(e);a<=o;a++){for(var s=t(a),u=a+1;u<o&&t(u)===s;)u++;a=u-1,r(s,i,n),i++;}else for(i=0,a=0,o=e.length;a<o;a++){for(s=t(e[a]),u=a+1;u<o&&t(e[u])===s;)u++;a=u-1,r(s,i,n),i++;}return n;}(e,t,r,n);},he.isInterval=function(e){return D.is(e);},he.isSortedArray=function(e){return!D.is(e);},he.toArray=function(e){var t=[];return he.forEach(e,function(e){return t.push(e);}),t;},he.toString=function(e){return function(e){return D.is(e)?D.toString(e):ge.toString(e);}(e);};var Qe=me;function Ye(e){for(var t=ge.ofSortedArray(e),r=ge.max(t),n=new Int32Array(r),i=0,a=e.length-1;i<a;i++)for(var o=e[i],s=e[i+1];o<s;o++)n[o]=i;return{offsets:t,index:n,count:e.length-1};}function Xe(e,t){for(var r=D.start(t),n=new Int32Array(e.length+1),i=0,a=e.length;i<a;i++)n[i]=e[i]-r;return n[e.length]=D.end(t)-r,Ye(n);}function Ke(e){return e.count;}function Ze(e,t){return e.index[t];}function Je(e,t,r){var n=e.offsets,i=r>=Qe.max(n)?-1:Qe.findPredecessorIndex(n,r-1);return Qe.findRange(t,Qe.getAt(n,i),Qe.getAt(n,i+1)-1);}var $e,et,tt=function(){function e(e,t,r,n){this.segments=e,this.segmentMap=t,this.set=r,this.segmentMin=0,this.segmentMax=0,this.setRange=D.Empty,this.value={index:0,start:0,end:0},this.hasNext=!1,this.setRange=n,this.updateSegmentRange();}return e.prototype.move=function(){for(;this.hasNext;){if(this.updateValue()){this.value.index=this.segmentMin++,this.hasNext=this.segmentMax>=this.segmentMin&&D.size(this.setRange)>0;break;}this.updateSegmentRange();}return this.value;},e.prototype.updateValue=function(){var e=this.segments[this.segmentMin+1],t=Qe.findPredecessorIndexInInterval(this.set,e,this.setRange);return this.value.start=D.start(this.setRange),this.value.end=t,this.setRange=D.ofBounds(t,D.end(this.setRange)),t>this.value.start;},e.prototype.updateSegmentRange=function(){var e=D.min(this.setRange),t=D.max(this.setRange);t<e?this.hasNext=!1:(this.segmentMin=this.segmentMap[Qe.getAt(this.set,e)],this.segmentMax=this.segmentMap[Qe.getAt(this.set,t)],this.hasNext=this.segmentMax>=this.segmentMin);},e.prototype.setSegment=function(e){this.setRange=D.ofBounds(e.start,e.end),this.updateSegmentRange();},e;}();function rt(e,t,r){var n=void 0!==r?D.ofBounds(r.start,r.end):D.ofBounds(0,Qe.size(t));return new tt(e.offsets,e.index,t,n);}(et=$e||($e={})).create=Ye,et.ofOffsets=Xe,et.count=Ke,et.getSegment=Ze,et.projectValue=Je,et.transientSegments=rt;var nt=$e;var it,at=function(){function e(e){this.head=e>0?0:-1,this.prev=new Int32Array(e),this.next=new Int32Array(e);for(var t=0;t<e;t++)this.next[t]=t+1,this.prev[t]=t-1;this.prev[0]=-1,this.next[e-1]=-1;}return e.prototype.remove=function(e){var t=this.prev,r=this.next,n=t[e],i=r[e];n>=0&&(r[n]=i,t[e]=-1),i>=0&&(t[i]=n,r[e]=-1),e===this.head&&(this.head=n<0?i:n);},e.prototype.has=function(e){return this.prev[e]>=0||this.next[e]>=0||this.head===e;},e;}(),ot=function ot(e){return new at(e);};!function(e){function t(){return new Map();}e.Empty=new Map(),e.keyArray=function(e){return Object(i.n)(e.keys());},e.Mutable=t,e.asImmutable=function(e){return e;},e.copy=function(e){for(var r=t(),n=e.keys();;){var i=n.next(),a=i.done,o=i.value;if(a)break;r.set(o,e.get(o));}return r;},e.addFrom=function(e,t){for(var r=t.keys();;){var n=r.next(),i=n.done,a=n.value;if(i)break;e.set(a,t.get(a));}return e;};}(it||(it={}));var st=it,ut=r(289);},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return b;}),r.d(t,\"d\",function(){return v;}),r.d(t,\"a\",function(){return u;}),r.d(t,\"b\",function(){return a;});var n,i=r(0),a=r(186),o=r(1),s=r(97);!function(e){var t;function r(e,t){return c(t.T,e,t,1);}function u(e){return l(e);}!function(e){function t(t,r){return void 0===r&&(r=e.float),{\"@type\":\"tensor\",T:t.create(),space:t,valueType:\"tensor\",baseType:r};}e.str={\"@type\":\"str\",T:\"\",valueType:\"str\"},e.int={\"@type\":\"int\",T:0,valueType:\"int\"},e.coord={\"@type\":\"coord\",T:0,valueType:\"float\"},e.float={\"@type\":\"float\",T:0,valueType:\"float\"},e.Str=function(e){return void 0===e&&(e=\"\"),{\"@type\":\"str\",T:e,valueType:\"str\"};},e.Int=function(e){return void 0===e&&(e=0),{\"@type\":\"int\",T:e,valueType:\"int\"};},e.Float=function(e){return void 0===e&&(e=0),{\"@type\":\"float\",T:e,valueType:\"float\"};},e.Tensor=t,e.Vector=function(r,n){return void 0===n&&(n=e.float),t(o.Tensor.Vector(r,\"int\"===n[\"@type\"]?Int32Array:Float64Array),n);},e.Matrix=function(r,n,i){return void 0===i&&(i=e.float),t(o.Tensor.ColumnMajorMatrix(r,n,\"int\"===i[\"@type\"]?Int32Array:Float64Array),i);},e.Aliased=function(e,t){return void 0!==t?Object(i.__assign)(Object(i.__assign)({},e),{T:t}):e;},e.List=function(e,t,r){return void 0===r&&(r=[]),{\"@type\":\"list\",T:r,separator:e,itemParse:t,valueType:\"list\"};};}(t=e.Schema||(e.Schema={})),e.is=function(e){return!!e&&!!e.schema&&!!e.value;},e.Undefined=r,e.ofConst=function(e,t,r){return c(e,t,r,0);},e.ofLambda=u,e.range=function(e,r){return u({value:function value(t){return t+e;},rowCount:Math.max(r-e+1,0),schema:t.int});},e.ofArray=function(e){return d(e);},e.ofIntArray=function(e){return d({array:e,schema:t.int});},e.ofFloatArray=function(e){return d({array:e,schema:t.float});},e.ofStringArray=function(e){return d({array:e,schema:t.str});},e.ofStringAliasArray=function(e){return d({array:e,schema:t.Aliased(t.str)});},e.ofStringListArray=function(e,r){return void 0===r&&(r=\",\"),d({array:e,schema:t.List(r,function(e){return e;})});},e.ofIntTokens=function(e){var r=e.count,n=e.data,i=e.indices;return l({value:function value(e){return Object(s.d)(n,i[2*e],i[2*e+1])||0;},rowCount:r,schema:t.int});},e.ofFloatTokens=function(e){var r=e.count,n=e.data,i=e.indices;return l({value:function value(e){return Object(s.b)(n,i[2*e],i[2*e+1])||0;},rowCount:r,schema:t.float});},e.ofStringTokens=function(e){var r=e.count,n=e.data,i=e.indices;return l({value:function value(e){var t=n.substring(i[2*e],i[2*e+1]);return\".\"===t||\"?\"===t?\"\":t;},rowCount:r,schema:t.str});},e.window=function(e,t,r){return function(e,t,r){return e.isDefined?0===t&&r===e.rowCount?e:e.__array&&a.isTypedArray(e.__array)?function(e,t,r){var n=a.typedArrayWindow(e.__array,{start:t,end:r}),i=e.valueKind;return d({array:n,schema:e.schema,valueKind:function valueKind(e){return i(t+e);}});}(e,t,r):function(e,t,r){var n=e.value,i=e.valueKind,o=e.areValuesEqual,s=0===t?n:function(e){return n(e+t);},u=r-t;return{schema:e.schema,__array:void 0,isDefined:e.isDefined,rowCount:u,value:s,valueKind:0===t?i:function(e){return i(e+t);},toArray:function toArray(e){for(var r=a.createArray(u,e).array,i=0,o=r.length;i<o;i++)r[i]=n(i+t);return r;},areValuesEqual:0===t?o:function(e,r){return o(e+t,r+t);}};}(e,t,r):n.Undefined(r-t,e.schema);}(e,t,r);},e.view=function(e,t,r){return void 0===r&&(r=!0),i=t,o=r,(n=e).isDefined&&0!==n.rowCount?o&&function(e,t){if(e.length!==t)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==r)return!1;return!0;}(i,n.rowCount)?n:n.__array&&typeof_default()(n.value(0))==typeof_default()(n.__array[0])?function(e,t){for(var r=e.__array,n=new r.constructor(t.length),i=0,a=t.length;i<a;i++)n[i]=r[t[i]];var o=e.valueKind;return d({array:n,schema:e.schema,valueKind:function valueKind(e){return o(t[e]);}});}(n,i):function(e,t){var r=e.value,n=e.valueKind,i=e.areValuesEqual,o=t.length;return{schema:e.schema,__array:void 0,isDefined:e.isDefined,rowCount:o,value:function value(e){return r(t[e]);},valueKind:function valueKind(e){return n(t[e]);},toArray:function toArray(e){for(var n=a.createArray(o,e).array,i=0,s=n.length;i<s;i++)n[i]=r(t[i]);return n;},areValuesEqual:function areValuesEqual(e,r){return i(t[e],t[r]);}};}(n,i):n;var n,i,o;},e.createFirstIndexMap=function(e){return function(e){for(var t=new Map(),r=0,n=e.rowCount;r<n;r++){var i=e.value(r);t.has(i)||t.set(e.value(r),r);}return t;}(e);},e.createIndexer=function(e){return function(e){for(var t=new Map(),r=0,n=e.rowCount;r<n;r++){var i=e.value(r);t.has(i)||t.set(e.value(r),r);}return function(e){return t.has(e)?t.get(e):-1;};}(e);},e.mapToArray=function(e,t,r){return function(e,t,r){for(var n=new r(e.rowCount),i=0,a=e.rowCount;i<a;i++)n[i]=t(e.value(i));return n;}(e,t,r||Array);},e.areEqual=function(e,t){return function(e,t){return e===t||e.rowCount===t.rowCount&&e.isDefined===t.isDefined&&e.schema.valueType===t.schema.valueType&&(e.__array&&t.__array?function(e,t){for(var r=e.__array,n=t.__array,i=0,a=e.rowCount;i<a;i++)if(r[i]!==n[i])return!1;return!0;}(e,t):function(e,t){for(var r=e.value,n=t.value,i=0,a=e.rowCount;i<a;i++)if(r(i)!==n(i))return!1;return!0;}(e,t));}(e,t);},e.indicesOf=function(e,t){return function(e,t){for(var r=[],n=e.value,i=0,a=e.rowCount;i<a;i++)t(n(i))&&(r[r.length]=i);return r;}(e,t);},e.asArrayColumn=function(e,t){return e.__array?e:e.isDefined?d({array:e.toArray({array:t}),schema:e.schema,valueKind:e.valueKind}):r(e.rowCount,e.schema);},e.copyToArray=function(e,t,r){if(void 0===r&&(r=0),e.isDefined){var n=e.__array;if(n)for(var i=0,a=n.length;i<a;i++)t[r+i]=n[i];else for(i=0,a=e.rowCount;i<a;i++)t[r+i]=e.value(i);}},e.isIdentity=function(e){for(var t=0,r=e.rowCount;t<r;t++)if(t!==e.value(t))return!1;return!0;};}(n||(n={}));var u=n;function c(e,t,r,n){return{schema:r,__array:void 0,isDefined:0===n,rowCount:t,value:function value(t){return e;},valueKind:function valueKind(e){return n;},toArray:function toArray(r){for(var n=a.createArray(t,r).array,i=0,o=n.length;i<o;i++)n[i]=e;return n;},areValuesEqual:function areValuesEqual(e,t){return!0;}};}function l(e){var t=e.value,r=e.valueKind,n=e.areValuesEqual,i=e.rowCount;return{schema:e.schema,__array:void 0,isDefined:!0,rowCount:i,value:t,valueKind:r||function(e){return 0;},toArray:function toArray(e){for(var r=a.createArray(i,e),n=r.array,o=r.start,s=0,u=n.length;s<u;s++)n[s]=t(s+o);return n;},areValuesEqual:n||function(e,r){return t(e)===t(r);}};}function d(e){var t=e.array,r=e.schema,n=e.valueKind,i=t.length,o=\"str\"===r.valueType?function(e){var r=t[e];return\"string\"==typeof r?r:\"\"+r;}:function(e){return t[e];},s=a.isTypedArray(t);return{schema:r,__array:t,isDefined:!0,rowCount:i,value:o,valueKind:n||function(e){return 0;},toArray:\"str\"===r.valueType?function(e){for(var r=a.getArrayBounds(i,e),n=r.start,o=r.end,s=new(e&&void 0!==e.array?e.array:t.constructor)(o-n),u=0,c=o-n;u<c;u++){var l=t[n+u];s[u]=\"string\"==typeof l?l:\"\"+l;}return s;}:s?function(e){return a.typedArrayWindow(t,e);}:function(e){var r=a.getArrayBounds(i,e),n=r.start,o=r.end;if(0===n&&o===t.length)return t;for(var s=new(e&&void 0!==e.array?e.array:t.constructor)(o-n),u=0,c=o-n;u<c;u++)s[u]=t[n+u];return s;},areValuesEqual:function areValuesEqual(e,r){return t[e]===t[r];}};}var f,p=r(271),m=r(5);!function(e){function t(e,t,r){var n=Object.create(null),i=Object.keys(t);n._rowCount=r.length,n._columns=i,n._schema=t;for(var a=0,o=i;a<o.length;a++){var s=o[a];n[s]=u.view(e[s],r);}return n;}function r(e,t){for(var r=Object.create(null),n=e._columns,i=0;i<n.length;i++){var a=n[i];r[a]=e[a].value(t);}return r;}e.is=function(e){return e&&\"number\"==typeof e._rowCount&&!!e._columns&&!!e._schema;},e.pickColumns=function(e,t,r){void 0===r&&(r={});var n=Object.create(null),i=Object.keys(e);n._rowCount=t._rowCount,n._columns=i,n._schema=e;for(var a=0,o=i;a<o.length;a++){var s=o[a];if(t[s])n[s]=t[s];else{if(!r[s])throw Error(\"Cannot find column '\"+s+\"'.\");n[s]=r[s];}}return n;},e.ofColumns=function(e,t){var r=Object.keys(t),n=t[r[0]].rowCount;return Object(i.__assign)({_rowCount:n,_columns:r,_schema:e},t);},e.ofPartialColumns=function(e,t,r){var n=Object.create(null),i=Object.keys(e);n._rowCount=r,n._columns=i,n._schema=e;for(var a=0,o=i;a<o.length;a++){var s=o[a];n[s]=s in t?t[s]:u.Undefined(r,e[s]);}return n;},e.ofUndefinedColumns=function(e,t){var r=Object.create(null),n=Object.keys(e);r._rowCount=t,r._columns=n,r._schema=e;for(var i=0,a=n;i<a.length;i++){var o=a[i];r[o]=u.Undefined(t,e[o]);}return r;},e.ofRows=function(e,t){var r=Object.create(null),n=t.length,i=Object.keys(e);r._rowCount=n,r._columns=i,r._schema=e;for(var a=function a(i){r[i]=u.ofLambda({rowCount:n,schema:e[i],value:function value(e){return t[e][i];},valueKind:function valueKind(e){return void 0===t[e][i]?1:0;}});},o=0,s=i;o<s.length;o++){a(s[o]);}return r;},e.ofArrays=function(e,t){var r,n=Object.create(null),i=Object.keys(e);n._rowCount=0,n._columns=i,n._schema=e;for(var a=0,o=i;a<o.length;a++){var s=o[a];void 0!==t[s]?(n[s]=u.ofArray({array:t[s],schema:e[s]}),n._rowCount=null===(r=t[s])||void 0===r?void 0:r.length):n[s]=u.Undefined(n._rowCount,e[s]);}return n;},e.view=t,e.pick=function(e,r,n){for(var i=[],a=0,o=e._rowCount;a<o;++a)n(a)&&i.push(a);return t(e,r,i);},e.window=function(e,t,r,n){if(0===r&&n===e._rowCount)return e;var i=Object.create(null),a=Object.keys(t);i._rowCount=n-r,i._columns=a,i._schema=t;for(var o=0,s=a;o<s.length;o++){var c=s[o];i[c]=u.window(e[c],r,n);}return i;},e.concat=function(e,t){var r=Object.create(null),n=Object.keys(t);r._rowCount=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];r._rowCount+=o._rowCount;}for(var s={},c=0,l=n;c<l.length;c++){s[l[c]]=new Array(r._rowCount);}r._columns=n,r._schema=t;for(var d=0,f=0,p=e;f<p.length;f++){o=p[f];for(var m=0,h=n;m<h.length;m++){var g=h[m];u.copyToArray(o[g],s[g],d);}d+=o._rowCount;}for(var v=0,b=n;v<b.length;v++){r[g=b[v]]=u.ofArray({array:s[g],schema:t[g]});}return r;},e.columnToArray=function(e,t,r){e[t]=u.asArrayColumn(e[t],r);},e.sort=function(e,t){for(var r=new Int32Array(e._rowCount),n=0,i=r.length;n<i;n++)r[n]=n;Object(p.c)(r,function(e,r,n){return t(r,n);});var a=!0;for(n=0,i=r.length;n<i;n++)if(r[n]!==n){a=!1;break;}if(a)return e;var o=Object.create(null);o._rowCount=e._rowCount,o._columns=e._columns,o._schema=e._schema;for(var s=0,c=e._columns;s<c.length;s++){var l=c[s];o[l]=u.view(e[l],r,!1);}return o;},e.areEqual=function(e,t){if(e._rowCount!==t._rowCount)return!1;if(e._columns.length!==t._columns.length)return!1;for(var r=0,n=e._columns;r<n.length;r++){if(!t[o=n[r]])return!1;}for(var i=0,a=e._columns;i<a.length;i++){var o=a[i];if(!u.areEqual(e[o],t[o]))return!1;}return!0;},e.getRow=r,e.pickRow=function(e,t){for(var n=0,i=e._rowCount;n<i;++n)if(t(n))return r(e,n);},e.getRows=function(e){for(var t=[],n=e._rowCount,i=0;i<n;i++)t[i]=r(e,i);return t;},e.toArrays=function(e){for(var t={},r=e._columns,n=0;n<r.length;n++){var i=r[n];t[i]=e[i].toArray();}return t;},e.formatToString=function(e){var t=m.b.create(),r=e._columns,n=e._rowCount,i=1;m.b.write(t,\"|\");for(var a=0;a<r.length;a++)m.b.write(t,r[a]),m.b.write(t,\"|\"),i+=r[a].length+1;m.b.newline(t),m.b.write(t,new Array(i+1).join(\"-\")),m.b.newline(t);for(var o=0;o<n;o++){m.b.write(t,\"|\");for(a=0;a<r.length;a++){var s=e[r[a]];0===s.valueKind(o)?(m.b.write(t,s.value(o)),m.b.write(t,\"|\")):m.b.write(t,\".|\");}m.b.newline(t);}return m.b.getString(t);};}(f||(f={}));var h,g,v=f;(g=h||(h={})).ofTables=function(e,t,r){var n=Object.keys(r),i=Object.create(null),a=[];i._name=e,i._tableNames=a,i._schema=t;for(var o=0,s=n;o<s.length;o++){var u=s[o];v.is(r[u])&&(i[u]=r[u],a[a.length]=u);}return i;},g.getTablesAsRows=function(e){for(var t={},r=0,n=e._tableNames;r<n.length;r++){var i=n[r];t[i]=v.getRows(e[i]);}return t;};var b=h;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});var n,i,a=r(0),o=r(13);!function(e){function t(t){return e.Create(Object(a.__assign)(Object(a.__assign)({},t),{typeClass:\"Representation3D\"}));}e.Create=o.StateObject.factory(),e.isRepresentation3D=function(e){return!!e&&\"Representation3D\"===e.type.typeClass;},e.isBehavior=function(e){return!!e&&\"Behavior\"===e.type.typeClass;},e.CreateRepresentation3D=t,e.CreateBehavior=function(t){return e.Create(Object(a.__assign)(Object(a.__assign)({},t),{typeClass:\"Behavior\"}));};var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Root\",typeClass:\"Root\"}));e.Root=r;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Group\",typeClass:\"Group\"}));e.Group=n,function(t){var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"String Data\",typeClass:\"Data\"}));t.String=r;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Binary Data\",typeClass:\"Data\"}));t.Binary=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Data Blob\",typeClass:\"Data\"}));t.Blob=i;}(e.Data||(e.Data={})),function(t){var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"JSON Data\",typeClass:\"Data\"}));t.Json=r;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"CIF File\",typeClass:\"Data\"}));t.Cif=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Cube File\",typeClass:\"Data\"}));t.Cube=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"PSF File\",typeClass:\"Data\"}));t.Psf=o;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"PLY File\",typeClass:\"Data\"}));t.Ply=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"CCP4/MRC/MAP File\",typeClass:\"Data\"}));t.Ccp4=u;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"DSN6/BRIX File\",typeClass:\"Data\"}));t.Dsn6=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"DX File\",typeClass:\"Data\"}));t.Dx=l;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Format Blob\",typeClass:\"Data\"}));t.Blob=d;}(e.Format||(e.Format={})),function(r){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Coordinates\",typeClass:\"Object\"}));r.Coordinates=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Topology\",typeClass:\"Object\"}));r.Topology=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Model\",typeClass:\"Object\"}));r.Model=o;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Trajectory\",typeClass:\"Object\"}));r.Trajectory=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Structure\",typeClass:\"Object\"}));r.Structure=u,function(r){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(t({name:\"Structure 3D\"}));r.Representation3D=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Structure 3D State\",typeClass:\"Object\"}));r.Representation3DState=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Selections\",typeClass:\"Object\"}));r.Selections=o;}(u=r.Structure||(r.Structure={}));}(e.Molecule||(e.Molecule={})),function(r){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Volume\",typeClass:\"Object\"}));r.Data=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(t({name:\"Volume 3D\"}));r.Representation3D=i;}(e.Volume||(e.Volume={})),function(r){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(e.Create({name:\"Shape Provider\",typeClass:\"Object\"}));r.Provider=n;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(t({name:\"Shape 3D\"}));r.Representation3D=i;}(e.Shape||(e.Shape={}));}(n||(n={})),function(e){e.CreateBuiltIn=o.StateTransformer.factory(\"ms-plugin\"),e.BuiltIn=o.StateTransformer.builderFactory(\"ms-plugin\");}(i||(i={}));},function(e,t,r){\"use strict\";var n;r.d(t,\"a\",function(){return n;}),r.d(t,\"o\",function(){return o;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"h\",function(){return c;}),r.d(t,\"i\",function(){return l;}),r.d(t,\"j\",function(){return d;}),r.d(t,\"k\",function(){return f;}),r.d(t,\"m\",function(){return p;}),r.d(t,\"f\",function(){return m;}),r.d(t,\"l\",function(){return h;}),r.d(t,\"e\",function(){return i.a;}),r.d(t,\"q\",function(){return i.c;}),r.d(t,\"p\",function(){return i.b;}),r.d(t,\"c\",function(){return g.a;}),r.d(t,\"n\",function(){return g.d;}),r.d(t,\"g\",function(){return g.c;}),r.d(t,\"d\",function(){return g.b;}),function(e){function t(e){var t=e.growBy*e.elementSize;e.currentSize=t,e.currentIndex=0,e.currentChunk=new e.ctor(t),e.allocatedSize+=t,e.chunks[e.chunks.length]=e.currentChunk;}function r(e,t){var r=e.ctor,n=e.chunks,i=e.currentIndex;if(!n.length)return new r(0);if(1===n.length&&(t||i===e.allocatedSize))return n[0];for(var a=0,o=0,s=n.length-1;o<s;o++)a+=n[o].length;var u=new r(a+=e.currentIndex),c=0;if(u.buffer)for(o=0,s=n.length-1;o<s;o++)u.set(n[o],c),c+=n[o].length;else for(o=0,s=n.length-1;o<s;o++){for(var l=n[o],d=0,f=l.length;d<f;d++)u[c+d]=l[d];c+=l.length;}var p=n[n.length-1];if(u.buffer&&i>=e.currentSize)u.set(p,c);else for(d=0,f=p.length;d<f;d++)u[c+d]=p[d];return u;}e.is=function(e){return e.creator&&e.chunkSize;},e.add4=function(e,r,n,i,a){e.currentIndex>=e.currentSize&&t(e);var o=e.currentChunk;return o[e.currentIndex++]=r,o[e.currentIndex++]=n,o[e.currentIndex++]=i,o[e.currentIndex++]=a,e.elementCount++;},e.add3=function(e,r,n,i){e.currentIndex>=e.currentSize&&t(e);var a=e.currentChunk;return a[e.currentIndex++]=r,a[e.currentIndex++]=n,a[e.currentIndex++]=i,e.elementCount++;},e.add2=function(e,r,n){e.currentIndex>=e.currentSize&&t(e);var i=e.currentChunk;return i[e.currentIndex++]=r,i[e.currentIndex++]=n,e.elementCount++;},e.add=function(e,r){return e.currentIndex>=e.currentSize&&t(e),e.currentChunk[e.currentIndex++]=r,e.elementCount++;},e.addRepeat=function(e,r,n){for(var i=0;i<r;i++)e.currentIndex>=e.currentSize&&t(e),e.currentChunk[e.currentIndex++]=n,e.elementCount++;return e.elementCount;},e.addMany=function(e,r){for(var n=e.elementSize,i=0,a=r.length;i<a;i+=n){e.currentIndex>=e.currentSize&&t(e);for(var o=e.currentChunk,s=0;s<n;s++)o[e.currentIndex++]=r[i+s];e.elementCount++;}return e.elementCount;},e.compact=function(e,t){return void 0===t&&(t=!1),r(e,t);},e._compact=r,e.create=function(e,t,r,n){var i={ctor:e,elementSize:t,growBy:Math.max(1,Math.ceil(r)),allocatedSize:0,elementCount:0,currentSize:0,currentChunk:void 0,currentIndex:0,chunks:[]};if(void 0===n)return i;if(\"number\"==typeof n)return i.currentChunk=new e(n*t),i.allocatedSize=n*t,i.currentSize=i.currentChunk.length,i.chunks[0]=i.currentChunk,i;var a=n;if(a.length%t!=0)throw new Error(\"initialChunk length must be a multiple of the element size.\");return i.currentChunk=a,i.allocatedSize=a.length,i.currentSize=a.length,i.chunks[0]=a,i;};}(n||(n={}));var i=r(271);function a(e,t,r){return e[t].key<e[r].key?-1:1;}function o(e,t,r){var n=r&&r.start||0,o=r&&r.end||e.length;if(o-n<=0)throw new Error(\"Can only bucket non-empty collections.\");return function(e,t,r,n,o){for(var s=new Map(),u=[],c=t(e[0]),l=!0,d=n;d<o;d++){var f=t(e[d]);if(s.has(f))s.get(f).count++,c!==f&&(l=!1);else{var p={key:f,count:1,offset:d};s.set(f,p),u[u.length]=p;}c=f;}var m=new Int32Array(u.length+1);m[u.length]=o;var h=!0;if(r){d=1;for(var g=u.length;d<g;d++)if(u[d-1].key>u[d].key){h=!1;break;}}if(l&&h){for(d=0;d<u.length;d++)m[d]=u[d].offset;return m;}r&&!h&&Object(i.b)(u,0,u.length,a,i.a);var v=0;for(d=0;d<u.length;d++){var b=u[d];b.offset=v,v+=b.count;}var y=new Int32Array(o-n);for(d=n;d<o;d++){f=t(e[d]);y[(p=s.get(f)).offset++]=e[d];}for(d=0,g=y.length;d<g;d++)e[d+n]=y[d];for(m[0]=n,d=1;d<u.length;d++)m[d]=u[d-1].offset+n;return m;}(e,t,!(!r||!r.sort),n,o);}var s=function(){function e(e,t){this.getHash=e,this.areEqual=t,this.id=0,this.byHash=new Map(),this.groups=[];}return e.prototype.createGroup=function(e,t){var r=this.id++,n=[e];return this.groups[r]=n,{id:r,keys:n,value:t};},e.prototype.add=function(e,t){var r=this.getHash(t);if(this.byHash.has(r)){for(var n=this.byHash.get(r),i=0,a=n.length;i<a;i++){var o=n[i];if(this.areEqual(t,o.value))return o.keys[o.keys.length]=e,o.value;}var s=this.createGroup(e,t);return n[n.length]=s,s.value;}s=this.createGroup(e,t);return this.byHash.set(r,[s]),s.value;},e;}();function u(e,t){return new s(e,t);}function c(e){var t=e^e>>4;return t=(3735928559^t)+(t<<5),t^=t>>11;}function l(e,t){var r=23;return r=31*(r=31*r+e|0)+t|0,r=(3735928559^(r^=r>>4))+(r<<5),r^=r>>11;}function d(e,t,r){var n=23;return n=31*(n=31*(n=31*n+e|0)+t|0)+r|0,n=(3735928559^(n^=n>>4))+(n<<5),n^=n>>11;}function f(e,t,r,n){var i=23;return i=31*(i=31*(i=31*(i=31*i+e|0)+t|0)+r|0)+n|0,i=(3735928559^(i^=i>>4))+(i<<5),i^=i>>11;}function p(e){for(var t=0,r=0,n=e.length;r<n;r++)t=(t<<5)-t+e.charCodeAt(r++)|0;return t;}function m(e,t){return(e+t)*(e+t+1)/2+t;}function h(e){for(var t=2166136261,r=0,n=e.length;r<n;++r)t^=e[r],t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0;}r(7),function(){function e(e){this.getKey=e,this.map=new Map(),this.keys=[],this.groups=[];}e.prototype.add=function(e){var t=this.getKey(e);if(this.map.has(t)){(r=this.map.get(t))[r.length]=e;}else{var r=[e];this.map.set(t,r),this.keys[this.keys.length]=t,this.groups[this.groups.length]=r;}},e.prototype.getGrouping=function(){return{keys:this.keys,groups:this.groups,map:this.map};};}();var g=r(338);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"MolScriptBuilder\",function(){return n;});var n,i=r(12);!function(e){e.core=i.a.core,e.struct=i.a.structureQuery,e.internal=i.a.internal,e.atomName=function(t){return e.struct.type.atomName([t]);},e.es=function(t){return e.struct.type.elementSymbol([t]);},e.list=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.core.type.list(t);},e.set=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.core.type.set(t);},e.re=function(t,r){return e.core.type.regex([t,r]);},e.fn=function(t){return e.core.ctrl.fn([t]);},e.evaluate=function(t){return e.core.ctrl.eval([t]);};var t=e.struct.atomProperty.core,r=e.struct.atomProperty.macromolecular,n=e.struct.atomProperty.topology;function a(e){return t[e]();}function o(e){return n[e]();}function s(e){return r[e]();}e.acp=a,e.atp=o,e.ammp=s;var u=e.struct.atomSet.propertySet;e.acpSet=function(e){return u([a(e)]);},e.atpSet=function(e){return u([o(e)]);},e.ammpSet=function(e){return u([s(e)]);};}(n||(n={}));},function(e,t,r){\"use strict\";function n(e,t,r){for(var n=new Float32Array(e),i=0;i<n.length;i++)n[i]=t+r*i;return n;}r.d(t,\"i\",function(){return n;}),r.d(t,\"h\",function(){return i.a;}),r.d(t,\"e\",function(){return f;}),r.d(t,\"f\",function(){return d;}),r.d(t,\"d\",function(){return p;}),r.d(t,\"c\",function(){return b;}),r.d(t,\"b\",function(){return g.a;}),r.d(t,\"g\",function(){return S.a;}),r.d(t,\"a\",function(){return O;});var i=r(135),a=r(1),o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[-1,0,0,0],[0,-1,0,0],[0,0,-1,0],[0,1,0,.5],[1,0,0,.5],[-1,0,0,.5],[0,0,1,.5],[0,-1,0,.5],[0,0,-1,.5],[1,0,0,.25],[0,-1,0,.25],[0,0,1,.25],[-1,0,0,.25],[0,1,0,.25],[0,-1,0,.75],[0,0,1,.75],[0,1,0,.75],[1,0,0,.75],[-1,0,0,.75],[0,0,-1,.25],[0,0,-1,.75],[1,-1,0,0],[-1,1,0,0],[0,0,1,1/3],[0,0,1,2/3],[1,0,0,2/3],[0,1,0,1/3],[0,-1,0,2/3],[1,-1,0,1/3],[-1,1,0,2/3],[-1,0,0,1/3],[1,0,0,1/3],[0,1,0,2/3],[0,-1,0,1/3],[1,-1,0,2/3],[-1,1,0,1/3],[-1,0,0,2/3],[0,0,-1,1/3],[0,0,-1,2/3],[0,0,1,5/6],[0,0,1,1/6],[0,0,-1,5/6],[0,0,-1,1/6]],s=[[0,1,2],[3,4,5],[3,1,5],[3,6,5],[7,6,2],[8,6,5],[0,4,2],[0,4,9],[7,10,2],[7,10,9],[0,10,2],[8,10,5],[3,1,11],[3,6,11],[0,10,9],[8,6,11],[3,4,2],[0,4,5],[3,4,9],[7,10,5],[8,4,9],[8,10,9],[8,10,2],[0,6,9],[3,10,9],[0,10,11],[7,1,9],[8,1,11],[7,4,11],[7,6,9],[7,10,11],[3,10,2],[8,1,5],[0,4,11],[3,1,2],[3,1,9],[7,4,2],[8,1,2],[8,1,9],[3,6,9],[7,4,9],[8,6,2],[8,6,9],[3,6,2],[12,13,14],[15,16,14],[12,17,18],[15,19,18],[20,13,18],[21,16,18],[20,17,14],[21,19,14],[0,1,5],[8,10,11],[7,6,11],[7,6,5],[8,4,2],[7,4,5],[7,1,5],[7,1,11],[0,10,5],[0,1,11],[0,6,11],[0,6,5],[3,10,11],[8,4,11],[15,13,22],[12,16,22],[15,17,23],[12,19,23],[21,13,23],[20,16,23],[21,17,22],[20,19,22],[4,0,2],[1,3,2],[4,0,14],[1,3,18],[4,0,9],[1,3,9],[4,0,18],[1,3,14],[10,7,9],[6,8,9],[4,7,14],[6,3,18],[10,0,18],[1,8,14],[1,3,5],[4,0,5],[6,8,11],[10,7,11],[1,3,11],[4,0,11],[10,7,2],[6,8,2],[3,10,22],[7,1,23],[8,4,23],[0,6,22],[1,0,5],[4,3,5],[1,0,23],[4,3,22],[10,7,14],[6,8,18],[8,6,22],[7,10,23],[4,3,11],[1,0,11],[1,0,22],[4,3,23],[10,7,18],[6,8,14],[8,6,23],[7,10,22],[6,7,11],[10,8,11],[8,1,23],[0,10,22],[3,6,22],[7,4,23],[4,3,2],[1,0,2],[10,8,2],[6,7,2],[4,3,9],[1,0,9],[10,8,9],[6,7,9],[4,8,14],[6,0,18],[10,3,18],[1,7,14],[4,8,18],[6,0,14],[10,3,14],[1,7,18],[6,7,5],[10,8,5],[6,8,5],[10,7,5],[8,1,22],[0,10,23],[3,6,23],[7,4,22],[4,24,2],[25,3,2],[4,24,26],[25,3,27],[4,24,27],[25,3,26],[28,29,26],[30,31,26],[32,33,26],[34,35,27],[36,37,27],[38,39,27],[2,0,1],[1,2,0],[1,25,5],[24,0,5],[39,36,40],[35,38,40],[37,34,40],[33,30,41],[29,32,41],[31,28,41],[5,3,4],[4,5,3],[25,1,5],[0,24,5],[24,4,5],[3,25,5],[4,3,41],[25,1,40],[24,4,41],[3,25,40],[4,3,40],[25,1,41],[24,4,40],[3,25,41],[35,34,40],[37,36,40],[39,38,40],[29,28,41],[31,30,41],[33,32,41],[3,5,4],[5,4,3],[25,1,2],[0,24,2],[24,4,2],[3,25,2],[25,1,9],[0,24,9],[24,4,9],[3,25,9],[30,33,26],[32,29,26],[28,31,26],[36,39,27],[38,35,27],[34,37,27],[0,2,1],[2,1,0],[30,33,42],[32,29,42],[28,31,42],[36,39,43],[38,35,43],[34,37,43],[7,9,6],[9,6,7],[25,1,11],[0,24,11],[24,4,11],[3,25,11],[35,34,44],[37,36,44],[39,38,44],[29,28,45],[31,30,45],[33,32,45],[8,11,10],[11,10,8],[1,25,2],[24,0,2],[1,25,42],[24,0,43],[1,25,43],[24,0,42],[1,25,27],[24,0,26],[1,25,26],[24,0,27],[1,25,9],[24,0,9],[4,24,5],[25,3,5],[4,24,11],[25,3,11],[1,0,40],[4,3,44],[0,24,45],[1,0,41],[4,3,45],[0,24,44],[0,24,40],[0,24,41],[2,3,4],[5,3,1],[5,0,4],[4,2,3],[1,5,3],[4,5,0],[2,7,6],[2,8,10],[5,8,6],[5,7,10],[1,9,7],[4,9,8],[1,11,8],[4,11,7],[9,0,6],[9,3,10],[11,3,6],[11,0,10],[6,2,7],[10,2,8],[6,5,8],[10,5,7],[9,7,1],[9,8,4],[11,8,1],[11,7,4],[6,9,0],[10,9,3],[6,11,3],[10,11,0],[9,7,6],[9,8,10],[11,8,6],[11,7,10],[6,9,7],[10,9,8],[6,11,8],[10,11,7],[2,3,10],[5,8,1],[11,0,4],[10,2,3],[1,5,8],[4,11,0],[5,0,1],[2,0,4],[2,3,1],[1,5,0],[4,2,0],[1,2,3],[11,8,10],[11,7,6],[9,7,10],[9,8,6],[10,11,8],[6,11,7],[10,9,7],[6,9,8],[5,8,10],[5,7,6],[2,7,10],[2,8,6],[4,11,8],[1,11,7],[4,9,7],[1,9,8],[11,3,10],[11,0,6],[9,0,10],[9,3,6],[10,5,8],[6,5,7],[10,2,7],[6,2,8],[11,8,4],[11,7,1],[9,7,4],[9,8,1],[10,11,3],[6,11,0],[10,9,0],[6,9,3],[22,15,13],[22,12,16],[14,12,13],[14,15,16],[13,22,15],[16,22,12],[13,14,12],[16,14,15],[22,21,17],[22,20,19],[14,20,17],[14,21,19],[13,23,21],[16,23,20],[13,18,20],[16,18,21],[23,15,17],[23,12,19],[18,12,17],[18,15,19],[17,22,21],[19,22,20],[17,14,20],[19,14,21],[23,21,13],[23,20,16],[18,20,13],[18,21,16],[17,23,15],[19,23,12],[17,18,12],[19,18,15],[5,0,6],[2,7,4],[9,3,1],[6,5,0],[4,2,7],[1,9,3],[0,2,4],[3,2,1],[0,5,1],[2,1,3],[2,4,0],[5,1,0],[7,9,10],[8,9,6],[7,11,6],[9,6,8],[9,10,7],[11,6,7],[1,7,11],[4,8,11],[1,8,9],[4,7,9],[0,9,10],[3,9,6],[3,11,10],[0,11,6],[2,6,8],[2,10,7],[5,6,7],[5,10,8],[6,0,11],[10,3,11],[6,3,9],[10,0,9],[7,2,10],[8,2,6],[8,5,10],[7,5,6],[9,1,8],[9,4,7],[11,1,7],[11,4,8],[7,9,4],[8,9,1],[8,11,4],[7,11,1],[9,6,3],[9,10,0],[11,6,0],[11,10,3],[19,12,23],[13,15,22],[16,21,18],[17,20,14],[20,14,17],[21,18,16],[15,22,13],[12,23,19],[18,16,21],[14,17,20],[23,19,12],[22,13,15],[19,20,22],[13,21,23],[16,15,14],[17,12,18],[20,18,13],[21,14,19],[15,23,17],[12,22,16],[18,19,15],[14,13,12],[23,16,20],[22,17,21],[16,12,22],[17,15,23],[19,21,14],[13,20,18],[12,14,13],[15,18,19],[21,22,17],[20,23,16],[14,16,15],[18,17,12],[22,19,20],[23,13,21],[16,20,23],[17,21,22],[19,15,18],[13,12,14],[12,18,17],[15,14,16],[21,23,13],[20,22,19],[14,19,21],[18,13,20],[22,16,12],[23,17,15],[19,12,22],[17,21,23],[16,15,18],[13,20,14],[20,14,13],[15,18,16],[21,23,17],[12,22,19],[18,16,15],[14,13,20],[22,19,12],[23,17,21],[3,2,4],[3,5,1],[0,5,4],[2,4,3],[5,1,3],[5,4,0],[1,7,9],[4,8,9],[1,8,11],[4,7,11],[0,9,6],[3,9,10],[3,11,6],[0,11,10],[2,6,7],[2,10,8],[5,6,8],[5,10,7],[6,0,9],[10,3,9],[6,3,11],[10,0,11],[7,2,6],[8,2,10],[8,5,6],[7,5,10],[9,1,7],[9,4,8],[11,1,8],[11,4,7],[7,9,1],[8,9,4],[8,11,1],[7,11,4],[9,6,0],[9,10,3],[11,6,3],[11,10,0],[8,9,10],[8,11,6],[7,11,10],[9,10,8],[11,6,8],[11,10,7],[6,0,2],[10,3,2],[6,3,5],[10,0,5],[7,2,1],[8,2,4],[8,5,1],[7,5,4],[9,1,0],[9,4,3],[11,1,3],[11,4,0],[1,7,2],[4,8,2],[1,8,5],[4,7,5],[0,9,1],[3,9,4],[3,11,1],[0,11,4],[2,6,0],[2,10,3],[5,6,3],[5,10,0],[0,2,6],[3,2,10],[3,5,6],[0,5,10],[2,1,7],[2,4,8],[5,1,8],[5,4,7],[16,12,14],[13,21,18],[19,15,23],[17,20,22],[12,14,16],[21,18,13],[15,23,19],[20,22,17],[14,16,12],[18,13,21],[23,19,15],[22,17,20],[19,20,18],[17,15,14],[16,21,22],[13,12,23],[20,18,19],[15,14,17],[21,22,16],[12,23,13],[18,19,20],[14,17,15],[22,16,21],[23,13,12],[6,0,5],[10,3,5],[6,3,2],[10,0,2],[7,2,4],[8,2,1],[8,5,4],[7,5,1],[9,1,3],[9,4,0],[11,1,0],[11,4,3],[1,7,5],[4,8,5],[1,8,2],[4,7,2],[0,9,4],[3,9,1],[3,11,4],[0,11,1],[2,6,3],[2,10,0],[5,6,0],[5,10,3],[0,2,10],[3,2,6],[3,5,10],[0,5,6],[2,1,8],[2,4,7],[5,1,7],[5,4,8],[21,17,23],[20,16,22],[12,13,18],[15,19,14],[23,21,17],[22,20,16],[18,12,13],[14,15,19],[17,23,21],[16,22,20],[13,18,12],[19,14,15],[21,13,22],[20,19,23],[12,17,14],[15,16,18],[23,15,13],[22,12,19],[18,20,17],[14,21,16],[17,22,15],[16,23,12],[13,14,20],[19,18,21],[15,17,22],[12,16,23],[20,13,14],[21,19,18],[22,21,13],[23,20,19],[14,12,17],[18,15,16],[13,23,15],[19,22,12],[17,18,20],[16,14,21],[15,13,23],[12,19,22],[20,17,18],[21,16,14],[22,15,17],[23,12,16],[14,20,13],[18,21,19],[13,22,21],[19,23,20],[17,14,12],[16,18,15],[6,5,3],[4,9,3],[9,3,4],[5,7,4],[4,5,7],[5,3,6]],u=[[0],[0,1],[0,2],[0,3],[0,2,4,5],[0,6],[0,7],[0,6,4,8],[0,7,4,9],[0,6,2,1],[0,3,1,10],[0,6,2,1,4,8,5,11],[0,12,1,7],[0,1,13,14],[0,12,1,7,4,15,11,9],[0,16,2,17],[0,18,12,17],[0,16,5,19],[0,20,13,19],[0,18,12,17,4,21,15,19],[0,16,2,17,4,22,5,19],[0,16,2,17,23,24,13,25,26,20,27,28,4,22,5,19],[0,16,17,2,29,21,30,15],[0,20,13,19,29,31,32,33],[0,16,6,34],[0,18,7,34],[0,16,7,35],[0,16,36,37],[0,18,36,38],[0,16,14,39],[0,20,40,34],[0,16,8,41],[0,18,8,42],[0,16,9,42],[0,16,6,34,4,22,8,41],[0,18,7,34,4,21,9,41],[0,16,7,35,4,22,9,42],[0,16,6,34,23,24,14,39],[0,16,10,43,23,24,7,35],[0,16,36,37,23,24,9,42],[0,16,8,41,23,24,40,38],[0,16,6,34,23,24,14,39,26,20,40,38,4,22,8,41],[0,16,44,45,23,24,46,47,26,20,48,49,4,22,50,51],[0,16,6,34,29,21,9,42],[0,16,8,41,29,21,7,35],[0,16,36,37,29,21,14,39],[0,16,2,17,1,52,6,34],[0,16,2,17,53,54,9,42],[0,16,12,33,1,52,7,35],[0,16,2,17,11,55,8,41],[0,56,2,57,1,58,6,37],[0,56,15,25,1,58,9,39],[0,20,27,17,1,59,40,34],[0,56,12,28,1,58,7,38],[0,16,5,19,1,52,8,41],[0,22,13,28,1,55,14,38],[0,18,13,60,1,61,14,43],[0,16,15,30,1,52,9,42],[0,16,5,19,11,55,6,34],[0,21,12,19,1,54,7,41],[0,20,13,19,1,59,14,41],[0,20,3,30,1,59,10,42],[0,18,12,17,1,61,7,34,4,21,15,19,11,54,9,41],[0,24,13,17,1,62,14,34,4,20,27,19,11,59,40,41],[0,16,2,17,1,52,6,34,4,22,5,19,11,55,8,41],[0,16,12,33,1,52,7,35,4,22,15,30,11,55,9,42],[0,31,3,17,1,63,10,34,4,56,32,19,11,58,36,41],[0,22,2,19,64,59,14,38,4,16,5,17,65,62,40,39],[0,16,2,17,1,52,6,34,23,24,13,25,64,62,14,39,26,20,27,28,65,59,40,38,4,22,5,19,11,55,8,41],[0,16,2,17,66,67,44,45,23,24,13,25,68,69,46,47,26,20,27,28,70,71,48,49,4,22,5,19,72,73,50,51],[0,16,2,17,1,52,6,34,29,21,15,30,53,54,9,42],[0,16,5,19,1,52,8,41,29,21,12,33,53,54,7,35],[0,20,13,19,1,59,14,41,29,31,32,33,53,63,36,35],[0,31,3,17,1,63,10,34,29,20,27,30,53,59,40,42],[0,16,74,75],[0,18,76,77],[0,16,78,79],[0,18,80,81],[0,16,74,75,29,21,82,83],[0,21,84,85,29,16,86,87],[0,16,88,89],[0,16,88,89,29,21,90,91],[0,16,74,75,1,52,88,89],[0,16,78,79,1,52,92,93],[0,16,94,95,11,55,88,89],[0,16,82,83,53,54,88,89],[0,16,74,75,1,52,88,89,29,21,82,83,53,54,90,91],[0,21,84,85,96,97,88,91,29,16,86,87,98,99,90,89],[0,16,74,75,2,17,100,101],[0,16,94,95,5,19,100,101],[0,18,76,77,2,33,102,103],[0,18,104,105,106,107,100,108],[0,16,78,79,2,17,109,108],[0,16,82,83,15,30,100,101],[0,18,80,81,2,33,110,111],[0,18,112,113,114,115,100,108],[0,16,74,75,2,17,100,101,29,21,82,83,15,30,116,117],[0,21,84,85,118,119,116,101,29,16,86,87,120,121,100,117],[0,16,74,75,6,34,122,123],[0,16,74,75,8,41,124,125],[0,16,78,79,7,35,122,123],[0,16,82,83,9,42,122,123],[0,16,74,75,7,35,126,127],[0,16,74,75,9,42,128,129],[0,16,78,79,6,34,126,127],[0,16,78,79,8,41,128,129],[0,16,74,75,6,34,122,123,29,21,82,83,9,42,128,129],[0,16,74,75,7,35,126,127,29,21,82,83,8,41,124,125],[0,21,84,85,6,42,130,131,29,16,86,87,9,34,132,133],[0,21,84,85,7,41,134,135,29,16,86,87,8,35,136,137],[0,16,89,88,2,17,122,123],[0,16,89,88,12,33,126,127],[0,16,89,88,5,19,124,125],[0,16,89,88,15,30,128,129],[0,16,88,89,6,34,100,101],[0,16,89,88,7,35,109,108],[0,16,89,88,8,41,138,139],[0,16,89,88,9,42,116,117],[0,16,89,88,6,34,100,101,29,21,91,90,9,42,116,117],[0,16,89,88,7,35,109,108,29,21,91,90,8,41,138,139],[0,16,89,88,2,17,122,123,29,21,91,90,15,30,128,129],[0,16,89,88,118,121,132,131,29,21,91,90,120,119,130,133],[0,16,74,75,2,17,100,101,1,52,88,89,6,34,122,123],[0,16,74,75,12,33,109,108,1,52,88,89,7,35,126,127],[0,16,74,75,2,17,100,101,11,55,140,141,8,41,124,125],[0,16,74,75,2,17,100,101,53,54,90,91,9,42,128,129],[0,16,74,75,5,19,138,139,1,52,88,89,8,41,124,125],[0,16,74,75,15,30,116,117,1,52,88,89,9,42,128,129],[0,16,94,95,5,19,100,101,11,55,88,89,6,34,124,125],[0,16,94,95,15,30,109,108,11,55,88,89,7,35,128,129],[0,16,78,79,2,17,109,108,1,52,92,93,6,34,126,127],[0,16,78,79,12,33,100,101,1,52,92,93,7,35,122,123],[0,16,82,83,12,33,138,139,53,54,88,89,8,41,126,127],[0,16,82,83,2,17,116,117,53,54,88,89,9,42,122,123],[0,16,78,79,5,19,116,117,1,52,92,93,8,41,128,129],[0,16,82,83,15,30,100,101,1,52,90,91,9,42,122,123],[0,16,82,83,15,30,100,101,53,54,88,89,6,34,128,129],[0,16,82,83,5,19,109,108,53,54,88,89,7,35,124,125],[0,16,74,75,2,17,100,101,1,52,88,89,6,34,122,123,29,21,82,83,15,30,116,117,53,54,90,91,9,42,128,129],[0,16,74,75,12,33,109,108,1,52,88,89,7,35,126,127,29,21,82,83,5,19,138,139,53,54,90,91,8,41,124,125],[0,21,84,85,118,119,116,101,96,97,88,91,9,34,132,133,29,16,86,87,120,121,100,117,98,99,90,89,6,42,130,131],[0,21,84,85,142,143,138,108,96,97,88,91,8,35,136,137,29,16,86,87,144,145,109,139,98,99,90,89,7,41,134,135],[0,146,147],[0,148,149],[0,150,151],[0,146,147,152,153,154,155,156,157],[0,158,159],[0,146,147,1,160,161],[0,146,147,1,160,161,152,153,154,162,163,164,155,156,157,165,166,167],[0,158,159,1,168,169],[0,146,147,101,170,171],[0,146,147,100,172,173],[0,148,149,174,175,171],[0,148,149,100,176,177],[0,150,151,178,179,171],[0,150,151,100,180,181],[0,146,147,100,172,173,152,153,154,182,183,184,155,156,157,185,186,187],[0,158,159,101,188,189],[0,146,147,122,190,191],[0,146,147,123,192,193],[0,146,147,126,194,195],[0,146,147,127,196,197],[0,146,147,122,190,191,152,153,154,198,199,200,155,156,157,201,202,203],[0,158,159,123,204,205],[0,146,147,126,194,195,152,153,154,206,207,208,155,156,157,209,210,211],[0,158,159,129,212,213],[0,146,147,101,170,171,1,160,161,123,192,193],[0,146,147,108,214,215,1,160,161,127,196,197],[0,146,147,100,172,173,1,160,161,122,190,191],[0,146,147,109,216,217,1,160,161,126,194,195],[0,146,147,100,172,173,1,160,161,122,190,191,152,153,154,182,183,184,162,163,164,198,199,200,155,156,157,185,186,187,165,166,167,201,202,203],[0,158,159,101,188,189,1,168,169,123,204,205],[0,146,147,109,216,217,1,160,161,126,194,195,152,153,154,218,219,220,162,163,164,206,207,208,155,156,157,221,222,223,165,166,167,209,210,211],[0,158,159,117,224,225,1,168,169,129,212,213],[0,146,147,16,226,227],[0,148,149,18,228,229],[0,150,151,18,230,231],[0,150,151,16,232,233],[0,148,149,16,234,235],[0,146,147,18,236,237],[0,146,147,52,238,239],[0,146,147,16,226,227,1,160,161,52,238,239],[0,146,147,18,236,237,1,160,161,61,240,241],[0,146,147,16,226,227,100,172,173,101,170,171],[0,148,149,18,228,229,242,172,181,243,214,244],[0,150,151,18,230,231,245,172,177,246,214,247],[0,150,151,16,232,233,245,172,177,174,170,248],[0,148,149,16,234,235,242,172,181,178,170,249],[0,146,147,18,236,237,100,172,173,108,214,215],[0,146,147,16,226,227,122,190,191,123,192,193],[0,146,147,16,226,227,126,194,195,127,196,197],[0,146,147,18,236,237,126,194,195,123,192,193],[0,146,147,18,236,237,122,190,191,127,196,197],[0,146,147,52,238,239,122,190,191,101,170,171],[0,146,147,61,240,241,126,194,195,101,170,171],[0,146,147,52,238,239,100,172,173,123,192,193],[0,146,147,61,240,241,100,172,173,127,196,197],[0,146,147,16,226,227,100,172,173,101,170,171,1,160,161,52,239,238,122,190,191,123,192,193],[0,146,147,16,226,227,109,216,217,108,214,215,1,160,161,52,239,238,126,194,195,127,196,197],[0,146,147,18,236,237,109,216,217,101,170,171,1,160,161,61,241,240,126,194,195,123,192,193],[0,146,147,18,236,237,100,172,173,108,214,215,1,160,161,61,241,240,122,190,191,127,196,197],[0,16,2,17,158,250,251,252,159,253,254,255],[0,16,2,17,158,250,251,252,159,253,254,255,23,24,13,25,256,257,258,259,260,261,262,263,26,20,27,28,264,265,266,267,268,269,270,271,4,22,5,19,272,273,274,275,276,277,278,279],[0,16,2,17,158,250,251,252,159,253,254,255,29,21,15,30,280,281,282,283,284,285,286,287],[0,20,13,19,158,273,266,259,159,261,278,271],[0,20,13,19,158,273,266,259,159,261,278,271,29,31,32,33,280,288,289,290,284,291,292,293],[0,16,2,17,158,250,251,252,159,253,254,255,1,52,6,34,168,294,295,296,169,297,298,299],[0,16,2,17,158,250,251,252,159,253,254,255,53,54,9,42,300,301,302,303,304,305,306,307],[0,16,2,17,158,250,251,252,159,253,254,255,1,52,6,34,168,294,295,296,169,297,298,299,23,24,13,25,256,257,258,259,260,261,262,263,64,62,14,39,308,309,310,311,312,313,314,315,26,20,27,28,264,265,266,267,268,269,270,271,65,59,40,38,316,317,318,319,320,321,322,323,4,22,5,19,272,273,274,275,276,277,278,279,11,55,8,41,324,325,326,327,328,329,330,331],[0,16,2,17,158,250,251,252,159,253,254,255,66,67,44,45,332,333,334,335,336,337,338,339,23,24,13,25,256,257,258,259,260,261,262,263,68,69,46,47,340,341,342,343,344,345,346,347,26,20,27,28,264,265,266,267,268,269,270,271,70,71,48,49,348,349,350,351,352,353,354,355,4,22,5,19,272,273,274,275,276,277,278,279,72,73,50,51,356,357,358,359,360,361,362,363],[0,16,2,17,158,250,251,252,159,253,254,255,1,52,6,34,168,294,295,296,169,297,298,299,29,21,15,30,280,281,282,283,284,285,286,287,53,54,9,42,300,301,302,303,304,305,306,307],[0,20,13,19,158,273,266,259,159,261,278,271,1,59,14,41,168,325,318,311,169,313,330,323],[0,20,13,19,158,273,266,259,159,261,278,271,1,59,14,41,168,325,318,311,169,313,330,323,29,31,32,33,280,288,289,290,284,291,292,293,53,63,36,35,300,364,365,366,304,367,368,369],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189],[0,16,2,17,158,250,251,252,159,253,254,255,116,117,83,82,376,377,224,378,379,380,381,225],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,23,24,13,25,256,257,258,259,260,261,262,263,382,383,384,385,386,387,388,389,390,391,392,393,26,20,27,28,264,265,266,267,268,269,270,271,394,395,396,397,398,399,400,401,402,403,404,405,4,22,5,19,272,273,274,275,276,277,278,279,138,139,95,94,406,407,408,409,410,411,412,413],[0,24,5,28,158,265,258,275,159,277,270,263,414,415,416,417,418,419,420,421,422,423,424,425,23,16,27,19,256,273,251,267,260,269,278,255,426,427,428,429,430,431,432,433,434,435,436,437,26,22,13,17,264,250,274,259,268,261,254,279,438,439,440,441,442,443,444,445,446,447,448,449,4,20,2,25,272,257,266,252,276,253,262,271,450,451,452,453,454,455,456,457,458,459,460,461],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,29,21,15,30,280,281,282,283,284,285,286,287,116,117,83,82,376,377,224,378,379,380,381,225],[0,20,13,19,158,273,266,259,159,261,278,271,450,415,440,429,454,431,420,445,458,447,436,425],[0,20,13,19,158,273,266,259,159,261,278,271,462,463,464,465,466,467,468,469,470,471,472,473],[0,20,13,19,158,273,266,259,159,261,278,271,462,463,464,465,466,467,468,469,470,471,472,473,29,31,32,33,280,288,289,290,284,291,292,293,450,415,440,429,454,431,420,445,458,447,436,425],[0,16,2,17,158,250,251,252,159,253,254,255,123,122,88,89,204,474,475,476,205,477,478,479],[0,16,2,17,158,250,251,252,159,253,254,255,123,122,88,89,204,474,475,476,205,477,478,479,23,24,13,25,256,257,258,259,260,261,262,263,480,481,482,483,484,485,486,487,488,489,490,491,26,20,27,28,264,265,266,267,268,269,270,271,492,493,494,495,496,497,498,499,500,501,502,503,4,22,5,19,272,273,274,275,276,277,278,279,125,124,140,141,504,505,506,507,508,509,510,511],[0,16,2,17,158,250,251,252,159,253,254,255,123,122,88,89,204,474,475,476,205,477,478,479,29,21,15,30,280,281,282,283,284,285,286,287,129,128,90,91,212,512,513,514,213,515,516,517],[0,16,2,17,158,250,251,252,159,253,254,255,129,128,90,91,212,512,513,514,213,515,516,517],[0,16,2,17,158,250,251,252,159,253,254,255,129,128,90,91,212,512,513,514,213,515,516,517,23,24,13,25,256,257,258,259,260,261,262,263,518,519,520,521,522,523,524,525,526,527,528,529,26,20,27,28,264,265,266,267,268,269,270,271,530,531,532,533,534,535,536,537,538,539,540,541,4,22,5,19,272,273,274,275,276,277,278,279,127,126,92,93,542,543,544,545,546,547,548,549],[0,20,13,19,158,273,266,259,159,261,278,271,550,551,552,553,554,555,556,557,558,559,560,561,29,31,32,33,280,288,289,290,284,291,292,293,562,563,564,565,566,567,568,569,570,571,572,573],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,1,52,6,34,168,294,295,296,169,297,298,299,122,123,89,88,475,476,204,474,479,478,477,205],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,53,54,9,42,300,301,302,303,304,305,306,307,128,129,91,90,513,514,212,512,517,516,515,213],[0,16,2,17,158,250,251,252,159,253,254,255,116,117,83,82,376,377,224,378,379,380,381,225,1,52,6,34,168,294,295,296,169,297,298,299,128,129,91,90,513,514,212,512,517,516,515,213],[0,16,2,17,158,250,251,252,159,253,254,255,116,117,83,82,376,377,224,378,379,380,381,225,53,54,9,42,300,301,302,303,304,305,306,307,122,123,89,88,475,476,204,474,479,478,477,205],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,1,52,6,34,168,294,295,296,169,297,298,299,122,123,89,88,475,476,204,474,479,478,477,205,23,24,13,25,256,257,258,259,260,261,262,263,382,383,384,385,386,387,388,389,390,391,392,393,64,62,14,39,308,309,310,311,312,313,314,315,481,480,483,482,486,487,484,485,491,490,489,488,26,20,27,28,264,265,266,267,268,269,270,271,394,395,396,397,398,399,400,401,402,403,404,405,65,59,40,38,316,317,318,319,320,321,322,323,493,492,495,494,498,499,496,497,503,502,501,500,4,22,5,19,272,273,274,275,276,277,278,279,138,139,95,94,406,407,408,409,410,411,412,413,11,55,8,41,324,325,326,327,328,329,330,331,124,125,141,140,506,507,504,505,511,510,509,508],[0,16,2,17,158,250,251,252,159,253,254,255,116,117,83,82,376,377,224,378,379,380,381,225,1,52,6,34,168,294,295,296,169,297,298,299,128,129,91,90,513,514,212,512,517,516,515,213,23,24,13,25,256,257,258,259,260,261,262,263,574,575,576,577,578,579,580,581,582,583,584,585,64,62,14,39,308,309,310,311,312,313,314,315,519,518,521,520,524,525,522,523,529,528,527,526,26,20,27,28,264,265,266,267,268,269,270,271,586,587,588,589,590,591,592,593,594,595,596,597,65,59,40,38,316,317,318,319,320,321,322,323,531,530,533,532,536,537,534,535,541,540,539,538,4,22,5,19,272,273,274,275,276,277,278,279,109,108,79,78,598,599,600,601,602,603,604,605,11,55,8,41,324,325,326,327,328,329,330,331,126,127,93,92,544,545,542,543,549,548,547,546],[0,24,5,28,158,265,258,275,159,277,270,263,414,415,416,417,418,419,420,421,422,423,424,425,66,69,50,49,332,349,342,359,336,361,354,347,493,123,483,140,498,507,204,485,503,490,509,205,23,16,27,19,256,273,251,267,260,269,278,255,426,427,428,429,430,431,432,433,434,435,436,437,68,67,48,51,340,357,334,351,344,353,362,339,124,480,89,494,506,499,484,474,511,478,501,488,26,22,13,17,264,250,274,259,268,261,254,279,438,439,440,441,442,443,444,445,446,447,448,449,70,73,46,45,348,333,358,343,352,345,338,363,122,492,141,482,475,487,496,505,479,510,489,500,4,20,2,25,272,257,266,252,276,253,262,271,450,451,452,453,454,455,456,457,458,459,460,461,72,71,44,47,356,341,350,335,360,337,346,355,481,125,495,88,486,476,504,497,491,502,477,508],[0,24,5,28,158,265,258,275,159,277,270,263,414,415,416,417,418,419,420,421,422,423,424,425,606,607,608,609,610,611,612,613,614,615,616,617,531,129,521,92,536,545,212,523,541,528,547,213,23,16,27,19,256,273,251,267,260,269,278,255,426,427,428,429,430,431,432,433,434,435,436,437,618,619,620,621,622,623,624,625,626,627,628,629,126,518,91,532,544,537,522,512,549,516,539,526,26,22,13,17,264,250,274,259,268,261,254,279,438,439,440,441,442,443,444,445,446,447,448,449,630,631,632,633,634,635,636,637,638,639,640,641,128,530,93,520,513,525,534,543,517,548,527,538,4,20,2,25,272,257,266,252,276,253,262,271,450,451,452,453,454,455,456,457,458,459,460,461,642,643,644,645,646,647,648,649,650,651,652,653,519,127,533,90,524,514,542,535,529,540,515,546],[0,16,2,17,158,250,251,252,159,253,254,255,100,101,75,74,370,371,188,372,373,374,375,189,1,52,6,34,168,294,295,296,169,297,298,299,122,123,89,88,475,476,204,474,479,478,477,205,29,21,15,30,280,281,282,283,284,285,286,287,116,117,83,82,376,377,224,378,379,380,381,225,53,54,9,42,300,301,302,303,304,305,306,307,128,129,91,90,513,514,212,512,517,516,515,213],[0,20,13,19,158,273,266,259,159,261,278,271,462,463,464,465,466,467,468,469,470,471,472,473,1,59,14,41,168,325,318,311,169,313,330,323,551,550,553,552,556,557,554,555,561,560,559,558,29,31,32,33,280,288,289,290,284,291,292,293,450,415,440,429,454,431,420,445,458,447,436,425,53,63,36,35,300,364,365,366,304,367,368,369,563,562,565,564,568,569,566,567,573,572,571,570],[0,16],[0,18],[0,16,26,20],[0,2,23,13],[0,3,4,32],[0,2,29,15],[0,3,29,27],[0,52],[0,63],[0,52,26,59],[0,63,26,54],[0,52,16,1],[0,18,1,61],[0,52,16,1,26,59,20,65],[0,31,1,63],[0,1,24,62],[0,15,1,9],[0,5,1,8],[0,31,1,63,26,21,65,54],[0,2,57,56],[0,60,3,16],[0,22,57,3],[0,2,28,20],[0,17,13,24],[0,20,19,13,4,24,17,27],[0,22,57,3,4,16,60,32],[0,22,57,3,23,20,30,12,26,24,33,15,4,16,60,32],[0,22,57,3,29,18,27,25],[0,22,3,57,1,55,10,37],[0,22,385,396,3,57,109,117],[0,22,57,3,159,279,654,655,158,274,656,657,29,18,25,27,284,658,262,269,280,659,257,267]],c={\"P 1\":0,\"P -1\":1,\"P 1 2 1\":2,\"P 1 21 1\":3,\"C 1 2 1\":4,\"P 1 m 1\":5,\"P 1 c 1\":6,\"C 1 m 1\":7,\"C 1 c 1\":8,\"P 1 2/m 1\":9,\"P 1 21/m 1\":10,\"C 1 2/m 1\":11,\"P 1 2/c 1\":12,\"P 1 21/c 1\":13,\"C 1 2/c 1\":14,\"P 2 2 2\":15,\"P 2 2 21\":16,\"P 21 21 2\":17,\"P 21 21 21\":18,\"C 2 2 21\":19,\"C 2 2 2\":20,\"F 2 2 2\":21,\"I 2 2 2\":22,\"I 21 21 21\":23,\"P m m 2\":24,\"P m c 21\":25,\"P c c 2\":26,\"P m a 2\":27,\"P c a 21\":28,\"P n c 2\":29,\"P m n 21\":30,\"P b a 2\":31,\"P n a 21\":32,\"P n n 2\":33,\"C m m 2\":34,\"C m c 21\":35,\"C c c 2\":36,\"A m m 2\":37,\"A b m 2\":38,\"A m a 2\":39,\"A b a 2\":40,\"F m m 2\":41,\"F d d 2\":42,\"I m m 2\":43,\"I b a 2\":44,\"I m a 2\":45,\"P 2/m 2/m 2/m\":46,\"P m m m\":46,\"P 2/n 2/n 2/n\":47,\"P n n n\":47,\"P 2/c 2/c 2/m\":48,\"P c c m\":48,\"P 2/b 2/a 2/n\":49,\"P b a n\":49,\"P 21/m 2/m 2/a\":50,\"P m m a\":50,\"P 2/n 21/n 2/a\":51,\"P n n a\":51,\"P 2/m 2/n 21/a\":52,\"P m n a\":52,\"P 21/c 2/c 2/a\":53,\"P c c a\":53,\"P 21/b 21/a 2/m\":54,\"P b a m\":54,\"P 21/c 21/c 2/n\":55,\"P c c n\":55,\"P 2/b 21/c 21/m\":56,\"P b c m\":56,\"P 21/n 21/n 2/m\":57,\"P n n m\":57,\"P 21/m 21/m 2/n\":58,\"P m m n\":58,\"P 21/b 2/c 21/n\":59,\"P b c n\":59,\"P 21/b 21/c 21/a\":60,\"P b c a\":60,\"P 21/n 21/m 21/a\":61,\"P n m a\":61,\"C 2/m 2/c 21/m\":62,\"C m c m\":62,\"C 2/m 2/c 21/a\":63,\"C m c a\":63,\"C 2/m 2/m 2/m\":64,\"C m m m\":64,\"C 2/c 2/c 2/m\":65,\"C c c m\":65,\"C 2/m 2/m 2/a\":66,\"C m m a\":66,\"C 2/c 2/c 2/a\":67,\"C c c a\":67,\"F 2/m 2/m 2/m\":68,\"F m m m\":68,\"F 2/d 2/d 2/d\":69,\"F d d d\":69,\"I 2/m 2/m 2/m\":70,\"I m m m\":70,\"I 2/b 2/a 2/m\":71,\"I b a m\":71,\"I 21/b 21/c 21/a\":72,\"I b c a\":72,\"I 21/m 21/m 21/a\":73,\"I m m a\":73,\"P 4\":74,\"P 41\":75,\"P 42\":76,\"P 43\":77,\"I 4\":78,\"I 41\":79,\"P -4\":80,\"I -4\":81,\"P 4/m\":82,\"P 42/m\":83,\"P 4/n\":84,\"P 42/n\":85,\"I 4/m\":86,\"I 41/a\":87,\"P 4 2 2\":88,\"P 4 21 2\":89,\"P 41 2 2\":90,\"P 41 21 2\":91,\"P 42 2 2\":92,\"P 42 21 2\":93,\"P 43 2 2\":94,\"P 43 21 2\":95,\"I 4 2 2\":96,\"I 41 2 2\":97,\"P 4 m m\":98,\"P 4 b m\":99,\"P 42 c m\":100,\"P 42 n m\":101,\"P 4 c c\":102,\"P 4 n c\":103,\"P 42 m c\":104,\"P 42 b c\":105,\"I 4 m m\":106,\"I 4 c m\":107,\"I 41 m d\":108,\"I 41 c d\":109,\"P -4 2 m\":110,\"P -4 2 c\":111,\"P -4 21 m\":112,\"P -4 21 c\":113,\"P -4 m 2\":114,\"P -4 c 2\":115,\"P -4 b 2\":116,\"P -4 n 2\":117,\"I -4 m 2\":118,\"I -4 c 2\":119,\"I -4 2 m\":120,\"I -4 2 d\":121,\"P 4/m 2/m 2/m\":122,\"P4/m m m\":122,\"P 4/m 2/c 2/c\":123,\"P4/m c c\":123,\"P 4/n 2/b 2/m\":124,\"P4/n b m\":124,\"P 4/n 2/n 2/c\":125,\"P4/n n c\":125,\"P 4/m 21/b 2/m\":126,\"P4/m b m\":126,\"P 4/m 21/n 2/c\":127,\"P4/m n c\":127,\"P 4/n 21/m 2/m\":128,\"P4/n m m\":128,\"P 4/n 2/c 2/c\":129,\"P4/n c c\":129,\"P 42/m 2/m 2/c\":130,\"P42/m m c\":130,\"P 42/m 2/c 2/m\":131,\"P42/m c m\":131,\"P 42/n 2/b 2/c\":132,\"P42/n b c\":132,\"P 42/n 2/n 2/m\":133,\"P42/n n m\":133,\"P 42/m 21/b 2/c\":134,\"P42/m b c\":134,\"P 42/m 21/n 2/m\":135,\"P42/m n m\":135,\"P 42/n 21/m 2/c\":136,\"P42/n m c\":136,\"P 42/n 21/c 2/m\":137,\"P42/n c m\":137,\"I 4/m 2/m 2/m\":138,\"I4/m m m\":138,\"I 4/m 2/c 2/m\":139,\"I4/m c m\":139,\"I 41/a 2/m 2/d\":140,\"I41/a m d\":140,\"I 41/a 2/c 2/d\":141,\"I41/a c d\":141,\"P 3\":142,\"P 31\":143,\"P 32\":144,\"H 3\":145,\"R 3\":146,\"P -3\":147,\"H -3\":148,\"R -3\":149,\"P 3 1 2\":150,\"P 3 2 1\":151,\"P 31 1 2\":152,\"P 31 2 1\":153,\"P 32 1 2\":154,\"P 32 2 1\":155,\"H 3 2\":156,\"R 3 2\":157,\"P 3 m 1\":158,\"P 3 1 m\":159,\"P 3 c 1\":160,\"P 3 1 c\":161,\"H 3 m\":162,\"R 3 m\":163,\"H 3 c\":164,\"R 3 c\":165,\"P -3 1 2/m\":166,\"P -3 1 m\":166,\"P -3 1 2/c\":167,\"P -3 1 c\":167,\"P -3 2/m 1\":168,\"P -3 m 1\":168,\"P -3 2/c 1\":169,\"P -3 c 1\":169,\"H -3 2/m\":170,\"H -3 m\":170,\"R -3 2/m\":171,\"R -3 m\":171,\"H -3 2/c\":172,\"H -3 c\":172,\"R -3 2/c\":173,\"R -3 c\":173,\"P 6\":174,\"P 61\":175,\"P 65\":176,\"P 62\":177,\"P 64\":178,\"P 63\":179,\"P -6\":180,\"P 6/m\":181,\"P 63/m\":182,\"P 6 2 2\":183,\"P 61 2 2\":184,\"P 65 2 2\":185,\"P 62 2 2\":186,\"P 64 2 2\":187,\"P 63 2 2\":188,\"P 6 m m\":189,\"P 6 c c\":190,\"P 63 c m\":191,\"P 63 m c\":192,\"P -6 m 2\":193,\"P -6 c 2\":194,\"P -6 2 m\":195,\"P -6 2 c\":196,\"P 6/m 2/m 2/m\":197,\"P 6/m m m\":197,\"P 6/m 2/c 2/c\":198,\"P 6/m c c\":198,\"P 63/m 2/c 2/m\":199,\"P 63/m c m\":199,\"P 63/m 2/m 2/c\":200,\"P 63/m m c\":200,\"P 2 3\":201,\"F 2 3\":202,\"I 2 3\":203,\"P 21 3\":204,\"I 21 3\":205,\"P 2/m -3\":206,\"P m -3\":206,\"P 2/n -3\":207,\"P n -3\":207,\"F 2/m -3\":208,\"F m -3\":208,\"F 2/d -3\":209,\"F d -3\":209,\"I 2/m -3\":210,\"I m -3\":210,\"P 21/a -3\":211,\"P a -3\":211,\"I 21/a -3\":212,\"I a -3\":212,\"P 4 3 2\":213,\"P 42 3 2\":214,\"F 4 3 2\":215,\"F 41 3 2\":216,\"I 4 3 2\":217,\"P 43 3 2\":218,\"P 41 3 2\":219,\"I 41 3 2\":220,\"P -4 3 m\":221,\"F -4 3 m\":222,\"I -4 3 m\":223,\"P -4 3 n\":224,\"F -4 3 c\":225,\"I -4 3 d\":226,\"P 4/m -3 2/m\":227,\"P m -3 m\":227,\"P 4/n -3 2/n\":228,\"P n -3 n\":228,\"P 42/m -3 2/n\":229,\"P m -3 n\":229,\"P 42/n -3 2/m\":230,\"P n -3 m\":230,\"F 4/m -3 2/m\":231,\"F m -3 m\":231,\"F 4/m -3 2/c\":232,\"F m -3 c\":232,\"F 41/d -3 2/m\":233,\"F d -3 m\":233,\"F 41/d -3 2/c\":234,\"F d -3 c\":234,\"I 4/m -3 2/m\":235,\"I m -3 m\":235,\"I 41/a -3 2/d\":236,\"I a -3 d\":236,\"P 1 1 2\":237,\"P 1 1 21\":238,\"B 1 1 2\":239,\"B 2\":239,\"A 1 2 1\":240,\"C 1 21 1\":241,\"I 1 2 1\":242,\"I 2\":242,\"I 1 21 1\":243,\"P 1 1 m\":244,\"P 1 1 b\":245,\"B 1 1 m\":246,\"B 1 1 b\":247,\"P 1 1 2/m\":248,\"P 1 1 21/m\":249,\"B 1 1 2/m\":250,\"P 1 1 2/b\":251,\"P 1 1 21/b\":252,\"P 1 21/n 1\":253,\"P 1 21/a 1\":254,\"B 1 1 2/b\":255,\"P 21 2 2\":256,\"P 2 21 2\":257,\"P 21 21 2 (a)\":258,\"P 21 2 21\":259,\"P 2 21 21\":260,\"C 2 2 21a)\":261,\"C 2 2 2a\":262,\"F 2 2 2a\":263,\"I 2 2 2a\":264,\"P 21/m 21/m 2/n a\":265,\"P 42 21 2a\":266,\"I 2 3a\":267};function l(e){if(e<146)return e+1;if(146===e)return 1146;if(e<149)return e+1-1;if(149===e)return 1148;if(e<157)return e+1-2;if(157===e)return 1155;if(e<163)return e+1-3;if(163===e)return 1160;if(e<165)return e+1-4;if(165===e)return 1161;if(e<171)return e+1-5;if(171===e)return 1166;if(e<173)return e+1-6;if(173===e)return 1167;if(e<237)return e+1-7;if(237===e)return 1003;if(238===e)return 1004;if(239===e)return 1005;if(240===e)return 2005;if(241===e)return 3005;if(242===e)return 4005;if(243===e)return 5005;if(244===e)return 1006;if(245===e)return 1007;if(246===e)return 1008;if(247===e)return 1009;if(248===e)return 1010;if(249===e)return 1011;if(250===e)return 1012;if(251===e)return 1013;if(252===e)return 1014;if(253===e)return 2014;if(254===e)return 3014;if(255===e)return 1015;if(256===e)return 1017;if(257===e)return 2017;if(258===e)return 1018;if(259===e)return 2018;if(260===e)return 3018;if(261===e)return 1020;if(262===e)return 1021;if(263===e)return 1022;if(264===e)return 1023;if(265===e)return 1059;if(266===e)return 1094;if(267===e)return 1197;throw new Error(\"unknown spacegroup index '\"+e+\"'\");}var d,f,p,m=function(){for(var e=Object.create(null),t=0,r=Object.keys(c);t<r.length;t++){var n=r[t];e[c[n]]=n;}return e;}(),h=function(){for(var e=Object.create(null),t=0,r=Object.keys(c);t<r.length;t++){var n=r[t],i=c[n];e[i]=l(i);}return e;}();!function(e){function t(t,r,n){var i=function(e){var t=\"number\"==typeof e?function(e){switch(e){case 1146:return 146;case 1148:return 149;case 1155:return 157;case 1160:return 163;case 1161:return 165;case 1166:return 171;case 1167:return 173;case 1003:return 237;case 1004:return 238;case 1005:return 239;case 2005:return 240;case 3005:return 241;case 4005:return 242;case 5005:return 243;case 1006:return 244;case 1007:return 245;case 1008:return 246;case 1009:return 247;case 1010:return 248;case 1011:return 249;case 1012:return 250;case 1013:return 251;case 1014:return 252;case 2014:return 253;case 3014:return 254;case 1015:return 255;case 1017:return 256;case 2017:return 257;case 1018:return 258;case 2018:return 259;case 3018:return 260;case 1020:return 261;case 1021:return 262;case 1022:return 263;case 1023:return 264;case 1059:return 265;case 1094:return 266;case 1197:return 267;}var t=0;return e>146&&++t,e>148&&++t,e>155&&++t,e>160&&++t,e>161&&++t,e>166&&++t,e>167&&++t,e-1+t;}(e):c[e];return void 0===t||void 0===m[t]?-1:t;}(t);if(i<0)return console.warn(\"Unknown spacegroup '\"+t+\"', returning a 'P 1' with cellsize [1, 1, 1]\"),e.Zero;var o=r[0]*r[1]*r[2],s=n[0],u=n[1],l=n[2],d=r[0],f=r[1],p=r[2],h=Math.cos(u),g=(Math.cos(s)-Math.cos(u)*Math.cos(l))/Math.sin(l),v=Math.sqrt(1-h*h-g*g),b=[d,0,0],y=[Math.cos(l)*f,Math.sin(l)*f,0],_=[h*p,g*p,v*p],S=a.Mat4.ofRows([[b[0],y[0],_[0],0],[0,y[1],_[1],0],[0,0,_[2],0],[0,0,0,1]]);return{index:i,size:r,volume:o,anglesInRadians:n,toFractional:a.Mat4.invert(a.Mat4.zero(),S),fromFractional:S};}e.Zero=t(\"P 1\",a.Vec3.create(1,1,1),a.Vec3.create(Math.PI/2,Math.PI/2,Math.PI/2)),e.isZero=function(e){return!e||0===e.index&&1===e.size[0]&&1===e.size[1]&&1===e.size[1];},e.create=t;}(d||(d={})),function(e){function t(e){var t=u[e.index].map(function(e){return r=o[(t=s[e])[0]],n=o[t[1]],i=o[t[2]],a.Mat4.ofRows([r,n,i,[0,0,0,1]]);var t,r,n,i;});return{name:m[e.index],num:h[e.index],cell:e,operators:t};}e.ZeroP1=t(d.Zero),e.create=t;var r=Object(a.Vec3)(),n=Object(a.Mat4)();function c(e,t,i,o,s,u){return a.Vec3.set(r,i,o,s),a.Mat4.fromTranslation(n,r),a.Mat4.mul(u,a.Mat4.mul(u,a.Mat4.mul(u,e.cell.fromFractional,n),e.operators[t]),e.cell.toFractional);}e.setOperatorMatrix=c,e.getSymmetryOperator=function(e,t,r,n,o){var s=c(e,t,r,n,o,a.Mat4.zero());return i.a.create(t+1+\"_\"+(5+r)+(5+n)+(5+o),s,{hkl:a.Vec3.create(r,n,o),spgrOp:t});};var l=Object(a.Vec3)(),f=Object(a.Vec3)(),p=Object(a.Vec3)();function g(e,t,n,i,o,s,u){return a.Vec3.set(r,n,i,o),a.Vec3.floor(l,s),a.Mat4.copy(u,e.operators[t]),a.Vec3.floor(f,a.Vec3.transformMat4(f,s,u)),a.Mat4.getTranslation(p,u),a.Vec3.sub(p,p,f),a.Vec3.add(p,p,l),a.Vec3.add(p,p,r),a.Mat4.setTranslation(u,p),a.Mat4.mul(u,e.cell.fromFractional,u),a.Mat4.mul(u,u,e.cell.toFractional),u;}function v(e,t,r){var n=[];if(e>0?n.push(\"+X\"):e<0&&n.push(\"-X\"),t>0?n.push(\"+Y\"):t<0&&n.push(\"-Y\"),r>0?n.push(\"+Z\"):r<0&&n.push(\"-Z\"),1===n.length)return\"+\"===n[0].charAt(0)?n[0].substr(1):n[0];if(2===n.length){var i=n[0].charAt(0),a=n[1].charAt(0);if(\"+\"===i)return\"\"+n[0].substr(1)+n[1];if(\"+\"===a)return\"\"+n[1].substr(1)+n[0];}throw new Error(\"unknown rotation '\"+n+\"', \"+e+\" \"+t+\" \"+r);}function b(e){switch(e){case .5:return\"1/2\";case 1/4:return\"1/4\";case 3/4:return\"3/4\";case 1/3:return\"1/3\";case 2/3:return\"2/3\";case 1/6:return\"1/6\";case 5/6:return\"5/6\";}return\"\";}function y(e,t){return\"\"===t?e:e.length>2?e+\"+\"+t:\"-\"===e.charAt(0)?\"\"+t+e:t+\"+\"+e;}e.setOperatorMatrixRef=g,e.getSymmetryOperatorRef=function(e,t,r,n,o,s){var u=g(e,t,r,n,o,s,a.Mat4.zero());return i.a.create(t+1+\"_\"+(5+r)+(5+n)+(5+o),u,{hkl:a.Vec3.create(r,n,o),spgrOp:t});},e.getOperatorXyz=function(e){return[y(v(e[0],e[4],e[8]),b(e[12])),y(v(e[1],e[5],e[9]),b(e[13])),y(v(e[2],e[6],e[10]),b(e[14]))].join(\",\");};}(f||(f={})),function(e){e.add=function(e,t,r){e.squaredDistances[e.count]=r,e.indices[e.count++]=t;},e.reset=function(e){e.count=0;},e.create=function(){return{count:0,indices:[],squaredDistances:[]};},e.copy=function(e,t){for(var r=0;r<t.count;++r)e.indices[r]=t.indices[r],e.squaredDistances[r]=t.squaredDistances[r];return e.count=t.count,e;};}(p||(p={}));var g=r(230),v=r(6);function b(e,t,r){return new y(e,t,r);}var y=function(){function e(e,t,r){var n=function(e,t,r){var n,i,o=g.a.expand(g.a.empty(),t.box,a.Vec3.create(.5,.5,.5)),s=e.indices,u=g.a.size(a.Vec3.zero(),o),c=v.OrderedSet.size(s),l=\"number\"==typeof r?r:32,d=Array.isArray(r)&&r;if(d)i=[Math.ceil(u[0]/d[0]),Math.ceil(u[1]/d[1]),Math.ceil(u[2]/d[2])],n=d;else if(c>0){var f=Math.ceil(c/l),p=Math.pow(f/(u[0]*u[1]*u[2]),1/3);i=[Math.ceil(u[0]*p),Math.ceil(u[1]*p),Math.ceil(u[2]*p)],n=[u[0]/i[0],u[1]/i[1],u[2]/i[2]];}else n=u,i=[1,1,1];var m={x:e.x,y:e.y,z:e.z,indices:s,radius:e.radius};return function(e){for(var t=e.expandedBox,r=e.size,n=r[0],i=r[1],a=r[2],o=e.data,s=o.x,u=o.y,c=o.z,l=o.radius,d=o.indices,f=e.elementCount,p=e.delta,m=n*i*a,h=t.min,g=h[0],b=h[1],y=h[2],_=0,S=0,O=new Uint32Array(m),x=new Int32Array(f),C=0;C<f;C++){var w=v.OrderedSet.getAt(d,C),P=Math.floor((s[w]-g)/p[0]),j=Math.floor((u[w]-b)/p[1]),E=Math.floor((c[w]-y)/p[2]),A=(P*i+j)*a+E;1===(O[A]+=1)&&(S+=1),x[C]=A;}if(l)for(C=0;C<f;C++){w=v.OrderedSet.getAt(d,C);l[w]>_&&(_=l[w]);}for(var T=new Int32Array(S),D=(w=0,0);w<m;w++){var I=O[w];I>0&&(O[w]=D+1,T[D]=I,D+=1);}var M=new Uint32Array(S);for(w=1;w<S;++w)M[w]+=M[w-1]+T[w-1];var k=new Int32Array(S),B=new Int32Array(f);for(w=0;w<f;w++){var V=O[x[w]];if(V>0){var R=V-1;B[M[R]+k[R]]=w,k[R]+=1;}}return{size:e.size,bucketArray:B,bucketCounts:T,bucketOffset:M,grid:O,delta:p,min:e.expandedBox.min,data:e.data,maxRadius:_,expandedBox:e.expandedBox,boundingBox:e.boundingBox,boundingSphere:e.boundingSphere};}({size:i,data:m,expandedBox:o,boundingBox:t.box,boundingSphere:t.sphere,elementCount:c,delta:n});}(e,t,r);this.ctx={grid:n,x:.1,y:.1,z:.1,radius:.1,result:p.create(),isCheck:!1},this.boundary={box:n.boundingBox,sphere:n.boundingSphere},this.buckets={offset:n.bucketOffset,count:n.bucketCounts,array:n.bucketArray},this.result=this.ctx.result;}return e.prototype.find=function(e,t,r,n){return this.ctx.x=e,this.ctx.y=t,this.ctx.z=r,this.ctx.radius=n,this.ctx.isCheck=!1,_(this.ctx),this.ctx.result;},e.prototype.check=function(e,t,r,n){return this.ctx.x=e,this.ctx.y=t,this.ctx.z=r,this.ctx.radius=n,this.ctx.isCheck=!0,_(this.ctx);},e;}();function _(e){var t=e.grid,r=t.min,n=t.size,i=n[0],a=n[1],o=n[2],s=t.bucketOffset,u=t.bucketCounts,c=t.bucketArray,l=t.grid,d=t.data,f=d.x,m=d.y,h=d.z,g=d.indices,b=d.radius,y=t.delta,_=t.maxRadius,S=e.radius,O=e.isCheck,x=e.x,C=e.y,w=e.z,P=e.result,j=S+_,E=j*j;p.reset(P);var A=Math.max(0,Math.floor((x-j-r[0])/y[0])),T=Math.max(0,Math.floor((C-j-r[1])/y[1])),D=Math.max(0,Math.floor((w-j-r[2])/y[2])),I=Math.min(i-1,Math.floor((x+j-r[0])/y[0])),M=Math.min(a-1,Math.floor((C+j-r[1])/y[1])),k=Math.min(o-1,Math.floor((w+j-r[2])/y[2]));if(A>I||T>M||D>k)return!1;for(var B=A;B<=I;B++)for(var V=T;V<=M;V++)for(var R=D;R<=k;R++){var L=l[(B*a+V)*o+R];if(0!==L)for(var N=L-1,F=s[N],U=F+u[N],z=F;z<U;z++){var H=v.OrderedSet.getAt(g,c[z]),G=f[H]-x,q=m[H]-C,W=h[H]-w,Q=G*G+q*q+W*W;if(Q<=E){if(_>0&&Math.sqrt(Q)-b[H]>S)continue;if(O)return!0;p.add(P,c[z],Q);}}}return P.count>0;}var S=r(273);function O(){return O.empty();}!function(e){function t(){return{origin:Object(a.Vec3)(),dirA:Object(a.Vec3)(),dirB:Object(a.Vec3)(),dirC:Object(a.Vec3)()};}function r(e,t){return a.Vec3.copy(e.origin,t.origin),a.Vec3.copy(e.dirA,t.dirA),a.Vec3.copy(e.dirB,t.dirB),a.Vec3.copy(e.dirC,t.dirC),e;}function n(e,t){return a.Vec3.set(e,2*a.Vec3.magnitude(t.dirA),2*a.Vec3.magnitude(t.dirB),2*a.Vec3.magnitude(t.dirC));}e.create=function(e,t,r,n){return{origin:e,dirA:t,dirB:r,dirC:n};},e.empty=t,e.copy=r,e.clone=function(e){return r(t(),e);},e.size=n;var i=Object(a.Vec3)();e.volume=function(e){return n(i,e),i[0]*i[1]*i[2];},e.normalize=function(e,t){return a.Vec3.copy(e.origin,t.origin),a.Vec3.normalize(e.dirA,t.dirA),a.Vec3.normalize(e.dirB,t.dirB),a.Vec3.normalize(e.dirC,t.dirC),e;};var o=a.Mat3.zero();e.transform=function(e,t,r){a.Vec3.transformMat4(e.origin,t.origin,r);var n=a.Mat3.directionTransform(o,r);return a.Vec3.transformMat3(e.dirA,t.dirA,n),a.Vec3.transformMat3(e.dirB,t.dirB,n),a.Vec3.transformMat3(e.dirC,t.dirC,n),e;};}(O||(O={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(202),i=r(219),a=r(15),o=r(18),s=r(42),u={\"@header\":\"Internal Queries\",generator:{\"@header\":\"Generators\",bundleElement:Object(s.b)(o.b.Dictionary({groupedUnits:Object(o.a)(a.a.Any),set:Object(o.a)(a.a.Any),ranges:Object(o.a)(a.a.Any)}),a.a.Any),bundle:Object(s.b)(o.b.Dictionary({elements:Object(o.a)(a.a.Any)}),i.a.ElementSelectionQuery,\"A selection with single structure containing represented by the bundle.\"),current:Object(s.b)(o.b.None,i.a.ElementSelectionQuery,\"Current selection provided by the query context. Avoid using this in State Transforms.\")}},c={core:n.b,structureQuery:i.b,internal:u};Object(s.a)(c);var l=Object(s.c)(c);!function(){for(var e=Object.create(null),t=0,r=l;t<r.length;t++){var n=r[t];e[n.id]=n;}}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StateObject\",function(){return n;}),r.d(t,\"StateObjectCell\",function(){return i;}),r.d(t,\"StateObjectTracker\",function(){return s;}),r.d(t,\"StateObjectSelector\",function(){return u;}),r.d(t,\"StateObjectRef\",function(){return o;}),r.d(t,\"StateTree\",function(){return c;}),r.d(t,\"TransientTree\",function(){return m;}),r.d(t,\"State\",function(){return V;}),r.d(t,\"StateBuilder\",function(){return O;}),r.d(t,\"StateSelection\",function(){return b;}),r.d(t,\"StateTransformer\",function(){return _.a;}),r.d(t,\"StateTransform\",function(){return d.a;}),r.d(t,\"StateAction\",function(){return ie.a;});var n,i,a=r(5);!function(e){function t(e){var t;return(t=function(){function t(t,r){this.data=t,this.id=a.c.create22(),this.type=e,this.label=r&&r.label||e.name,this.description=r&&r.description;}return t.is=function(t){return!!t&&e===t.type;},t;}()).type=e,t;}e.factory=function(){return function(e){return t(e);};},e.create=t,e.hasTag=function(e,t){if(!e.tags)return!1;for(var r=0,n=e.tags;r<n.length;r++){if(n[r]===t)return!0;}return!1;},e.Null={id:a.c.create22(),type:{name:\"Null\",typeClass:\"Null\"},data:void 0,label:\"Null\"};}(n||(n={})),function(e){e.is=function(e){var t=e;return!!(t&&t.transform&&t.parent&&t.status);},e.resolve=function(t,r){var n=\"string\"==typeof r?r:e.is(r)?r.transform.ref:r.ref;return t.cells.get(n);};}(i||(i={}));var o,s=function(){function e(e){this.state=e,this.version=\"\";}return e.prototype.setQuery=function(e){this.query=b.compile(e);},e.prototype.update=function(){var e=this.state.select(this.query)[0],t=e?e.transform.version:void 0,r=this.cell!==e||this.version!==t;return this.cell=e,this.version=t||\"\",this.data=e&&e.obj?e.obj.data:void 0,r;},e;}(),u=function(){function e(e,t){this.ref=e,this.state=t;}return Object.defineProperty(e.prototype,\"cell\",{get:function get(){var e;return null===(e=this.state)||void 0===e?void 0:e.cells.get(this.ref);},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"obj\",{get:function get(){var e,t;return null===(t=null===(e=this.state)||void 0===e?void 0:e.cells.get(this.ref))||void 0===t?void 0:t.obj;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"data\",{get:function get(){var e;return null===(e=this.obj)||void 0===e?void 0:e.data;},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if(!this.state)throw new Error(\"To use update() from StateObjectSelector, 'state' must be defined.\");return t||(t=this.state.build()),(t||this.state.build()).to(this).update(e),t;},e.prototype.checkValid=function(){if(!this.state)throw new Error(\"Unassigned State.\");var e=this.cell;if(!e)throw new Error(\"Not created at all. Did you await/then the corresponding state update?\");if(\"ok\"===e.status)return!0;if(\"error\"===e.status)throw new Error(e.errorText);if(e.obj===n.Null)throw new Error(\"The object is Null.\");throw new Error(\"Unresolved. Did you await/then the corresponding state update?\");},Object.defineProperty(e.prototype,\"isOk\",{get:function get(){var e=this.cell;return e&&\"ok\"===e.status&&e.obj!==n.Null;},enumerable:!1,configurable:!0}),e;}();!function(e){function t(e,t){if(t)return i.is(t)?t:\"string\"==typeof t?e.cells.get(t):t.cell;}e.resolveRef=function(e){var t;if(e)return\"string\"==typeof e?e:i.is(e)?e.transform.ref:null===(t=e.cell)||void 0===t?void 0:t.transform.ref;},e.resolve=t,e.resolveAndCheck=function(e,r){var n=t(e,r);if(n&&n.obj&&\"ok\"===n.status)return n;};}(o||(o={}));var c,l=r(102),d=r(76),f=r(85),p=r(30),m=function(){function e(e){this.tree=e,this.transforms=this.tree.transforms,this.children=this.tree.children,this.dependencies=this.tree.dependencies,this.changedNodes=!1,this.changedChildren=!1,this.changedDependencies=!1,this._childMutations=void 0,this._dependencyMutations=void 0,this._stateUpdates=void 0;}return Object.defineProperty(e.prototype,\"childMutations\",{get:function get(){return this._childMutations||(this._childMutations=new Map()),this._childMutations;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"dependencyMutations\",{get:function get(){return this._dependencyMutations||(this._dependencyMutations=new Map()),this._dependencyMutations;},enumerable:!1,configurable:!0}),e.prototype.changeNodes=function(){this.changedNodes||(this.changedNodes=!0,this.transforms=this.transforms.asMutable());},e.prototype.changeChildren=function(){this.changedChildren||(this.changedChildren=!0,this.children=this.children.asMutable());},e.prototype.changeDependencies=function(){this.changedDependencies||(this.changedDependencies=!0,this.dependencies=this.dependencies.asMutable());},Object.defineProperty(e.prototype,\"root\",{get:function get(){return this.transforms.get(d.a.RootRef);},enumerable:!1,configurable:!0}),e.prototype.asTransient=function(){return this.asImmutable().asTransient();},e.prototype.addChild=function(e,t){if(this.changeChildren(),this.childMutations.has(e))this.childMutations.get(e).add(t);else{var r=this.children.get(e).asMutable();r.add(t),this.children.set(e,r),this.childMutations.set(e,r);}},e.prototype.removeChild=function(e,t){if(this.changeChildren(),this.childMutations.has(e))this.childMutations.get(e).remove(t);else{var r=this.children.get(e).asMutable();r.remove(t),this.children.set(e,r),this.childMutations.set(e,r);}},e.prototype.clearRoot=function(){var e=d.a.RootRef;if(0!==this.children.get(e).size){this.changeChildren();var t=Object(l.OrderedSet)();this.children.set(e,t),this.childMutations.set(e,t);}},e.prototype.mutateDependency=function(e,t,r){var n=this.dependencyMutations.get(e);if(!n){var i=this.dependencies.get(e);if(!i&&\"remove\"===r)return;this.changeDependencies(),n=i?i.asMutable():Object(l.OrderedSet)().asMutable(),this.dependencyMutations.set(e,n),this.dependencies.set(e,n);}\"add\"===r?n.add(t):n.remove(t);},e.prototype.changeParent=function(e,t){v(this.transforms,e);var r=this.transforms.get(e);this.removeChild(r.parent,e),this.addChild(t,e),this.changeNodes(),this.transforms.set(e,d.a.withParent(r,t));},e.prototype.add=function(e){var t=e.ref;this.transforms.has(e.ref)&&this.transforms.get(e.ref).parent!==e.parent&&function(e){throw new Error(\"Transform '\"+e+\"' is already present in the tree.\");}(e.ref);var r=this.children.get(e.parent);if(r||function(e){throw new Error(\"Parent '\"+e+\"' must be present in the tree.\");}(e.parent),r.has(e.ref)||this.addChild(e.parent,e.ref),this.children.has(e.ref)||(this.changedChildren||(this.changedChildren=!0,this.children=this.children.asMutable()),this.children.set(e.ref,Object(l.OrderedSet)())),this.changeNodes(),this.transforms.set(t,e),e.dependsOn)for(var n=0,i=e.dependsOn;n<i.length;n++){var a=i[n];this.mutateDependency(a,t,\"add\");}return this;},e.prototype.setParams=function(e,t){v(this.transforms,e);var r=this.transforms.get(e);return!Object(f.d)(r.params,t)&&(this.changedNodes||(this.changedNodes=!0,this.transforms=this.transforms.asMutable()),this.transforms.set(r.ref,d.a.withParams(r,t)),!0);},e.prototype.setTags=function(e,t){v(this.transforms,e);var r=this.transforms.get(e),n=d.a.withParams(r,t);return!Object(p.arrayEqual)(r.tags,n.tags)&&(this.changedNodes||(this.changedNodes=!0,this.transforms=this.transforms.asMutable()),this.transforms.set(r.ref,n),!0);},e.prototype.assignState=function(e,t){v(this.transforms,e);var r=this.transforms.get(e);if(this._stateUpdates&&this._stateUpdates.has(e))return d.a.assignState(r.state,t),r;this._stateUpdates||(this._stateUpdates=new Set()),this._stateUpdates.add(r.ref),this.changeNodes();var n=d.a.withState(r,t);return this.transforms.set(e,n),n;},e.prototype.remove=function(e){var t=this.transforms.get(e);if(!t)return[];var r=c.subtreePostOrder(this,t);if(e===d.a.RootRef){if(r.pop(),0===r.length)return r;this.clearRoot();}else{if(0===r.length)return r;this.removeChild(t.parent,t.ref);}this.changeNodes(),this.changeChildren();for(var n=0,i=r;n<i.length;n++){var a=i[n];this.transforms.delete(a.ref),this.children.delete(a.ref),this._childMutations&&this._childMutations.delete(a.ref);}for(var o=[],s=0,u=r;s<u.length;s++){if((a=u[s]).dependsOn)for(var l=0,f=a.dependsOn;l<f.length;l++){var p=f[l];this.transforms.has(p)&&this.mutateDependency(p,a.ref,\"remove\");}if(this.dependencies.has(a.ref)){var m=this.dependencies.get(a.ref).toArray();this.changeDependencies(),this.dependencies.delete(a.ref),this._dependencyMutations&&this._dependencyMutations.delete(a.ref);for(var h=0,g=m;h<g.length;h++){var v=g[h];if(this.transforms.has(v))for(var b=0,y=this.remove(v);b<y.length;b++){var _=y[b];o[o.length]=_;}}}}for(var S=0,O=o;S<O.length;S++){v=O[S];r[r.length]=v;}return r;},e.prototype.asImmutable=function(){return this.changedNodes||this.changedChildren||this._childMutations?(this._childMutations&&this._childMutations.forEach(h,this.children),this._dependencyMutations&&this._dependencyMutations.forEach(g,this.dependencies),c.create(this.changedNodes?this.transforms.asImmutable():this.transforms,this.changedChildren?this.children.asImmutable():this.children,this.changedDependencies?this.dependencies.asImmutable():this.dependencies)):this.tree;},e;}();function h(e,t){this.set(t,e.asImmutable());}function g(e,t){0===e.size?this.delete(t):this.set(t,e.asImmutable());}function v(e,t){if(!e.has(t))throw new Error(\"Node '\"+t+\"' is not present in the tree.\");}!function(e){var t=function(){function e(e,t,r){this.transforms=e,this.children=t,this.dependencies=r;}return Object.defineProperty(e.prototype,\"root\",{get:function get(){return this.transforms.get(d.a.RootRef);},enumerable:!1,configurable:!0}),e.prototype.asTransient=function(){return new m(this);},e;}();function r(e,r,n){return new t(e,r,n);}function n(e){i(this,this.tree.transforms.get(e));}function i(e,t){var r=e.tree.children.get(t.ref);r&&r.size&&r.forEach(n,e),e.f(t,e.tree,e.state);}function a(e,t,r,n){var a={tree:e,state:r,f:n};return i(a,t),a.state;}function o(e){s(this,this.tree.transforms.get(e));}function s(e,t){var r=e.f(t,e.tree,e.state);if(\"boolean\"!=typeof r||r){var n=e.tree.children.get(t.ref);n&&n.size&&n.forEach(o,e);}}function u(e,t,r,n){var i={tree:e,state:r,f:n};return s(i,t),i.state;}function c(e,t,r){r.push(e);}function f(e,t,r){r.push(d.a.toJSON(e));}e.createEmpty=function(e){var t=e||d.a.createRoot();return r(Object(l.Map)([[t.ref,t]]),Object(l.Map)([[t.ref,Object(l.OrderedSet)()]]),Object(l.Map)());},e.create=r,e.doPostOrder=a,e.doPreOrder=u,e.subtreePostOrder=function(e,t){return a(e,t,[],c);},e.toJSON=function(e){var t=[];return u(e,e.root,t,f),{transforms:t};},e.fromJSON=function(e){for(var t=Object(l.Map)().asMutable(),n=Object(l.Map)().asMutable(),i=Object(l.Map)().asMutable(),a=0,o=e.transforms;a<o.length;a++){var s=o[a],u=d.a.fromJSON(s);t.set(u.ref,u),n.has(u.ref)||n.set(u.ref,Object(l.OrderedSet)().asMutable()),u.ref!==u.parent&&n.get(u.parent).add(u.ref);}for(var c=new Set(),f=0,p=e.transforms;f<p.length;f++){var m=(s=p[f]).ref;if(n.set(m,n.get(m).asImmutable()),s.dependsOn)for(var h=0,g=s.dependsOn;h<g.length;h++){var v=g[h];c.add(v),i.has(v)?i.get(v).add(m):i.set(v,Object(l.OrderedSet)([m]).asMutable());}}return c.forEach(function(e){i.set(e,i.get(e).asImmutable());}),r(t.asImmutable(),n.asImmutable(),i.asImmutable());},e.dump=function(e){console.log({tr:e.transforms.keySeq().toArray(),tr1:e.transforms.valueSeq().toArray().map(function(e){return e.ref;}),ch:e.children.keySeq().toArray()});},e.subtreeHasRef=function(e,t,r){return!(!e.transforms.has(t)||!e.transforms.has(r))&&function e(t,r,n){if(r===n)return!0;for(var i=t.children.get(r).values();;){var a=i.next();if(a.done)return!1;if(e(t,a.value,n))return!0;}}(e,t,r);},e.getDecoratorRoot=function e(t,r){var n=t.children.get(r);if(1!==n.size)return r;var i=t.transforms.get(n.first());return i.transformer.definition.isDecorator?e(t,i.ref):r;};}(c||(c={}));var b,y=r(0),_=r(191),S=r(16);!function(e){function t(e,t){return r(e)(t);}function r(e){var t=e||n.root;return void 0!==t.compile?t.compile():function(e){return void 0!==e.transform&&void 0!==e.status;}(t)?n.byValue(t).compile():function(e){return\"function\"==typeof e;}(t)?t:n.byRef(t).compile();}e.select=t,e.compile=r;var n,i={select:function select(e){return t(this,e||this.state);}};function a(e,t){i[e]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.call.apply(t,Object(y.__spreadArrays)([void 0,this],e));};}function o(e){return Object.create(i,{compile:{writable:!1,configurable:!1,value:e}});}function s(e,t){var n=r(e);return o(function(){return function(e){for(var r=[],i=0,a=n(e);i<a.length;i++)for(var o=a[i],s=0,u=t(o,e);s<u.length;s++){var c=u[s];r.push(c);}return r;};});}function u(e,t){var n=r(e);return o(function(){return function(e){for(var r=[],i=0,a=n(e);i<a.length;i++){var o=a[i],s=t(o,e);s&&r.push(s);}return r;};});}function l(e){var t=r(e);return o(function(){return function(e){for(var r=new Set(),n=[],i=0,a=t(e);i<a.length;i++){var o=a[i];o&&(r.has(o.transform.ref)||(r.add(o.transform.ref),n.push(o)));}return n;};});}function f(e){var t=r(e);return o(function(){return function(e){var r=t(e);return r.length?[r[0]]:[];};});}function p(e,t){return s(e,function(e){return t(e)?[e]:[];});}function m(e,t){return p(e,function(e){return e.status===t;});}function h(e,t){return p(e,function(e){return!!e.transform.tags&&e.transform.tags.indexOf(t)>=0;});}function g(e){return s(e,function(e,t){var r=[];return c.doPreOrder(t.tree,t.tree.transforms.get(e.transform.ref),r,function(e,t,r){r.push(e.ref);}),r.map(function(e){return t.cells.get(e);});});}function v(e){return s(e,function(e,t){var r=[];return t.tree.children.get(e.transform.ref).forEach(function(e){return r.push(t.cells.get(e));}),r;});}function b(e,t){return p(e,function(e){return!!e.obj&&e.obj.type===t.type;});}function _(e,t){return l(u(e,function(e,r){return C(r.tree,r.cells,e.transform.ref,t);}));}function S(e,t){return p(e,function(e){return e.transform.transformer===t;});}function O(e,t){return l(u(e,function(e,r){return w(r.tree,r.cells,e.transform.ref,t);}));}function x(e){return l(u(e,function(e,t){return t.cells.get(t.tree.transforms.get(e.transform.ref).parent);}));}function C(e,t,r,n){for(var i=e.transforms.get(r),a=n.length;;){i=e.transforms.get(i.parent);var o=t.get(i.ref);if(!o.obj)return;for(var s=o.obj,u=0;u<a;u++)if(s.type===n[u].type)return o;if(i.ref===d.a.RootRef)return;}}function w(t,r,n,i){for(var a,o=n;;){var s=e.findAncestorOfType(t,r,o,i);if(!s)break;a=s,o=s.transform.ref;}return a;}function P(e,t,r){if(e.tags)for(var n=0,i=e.tags;n<i.length;n++){var a=i[n];if(r.tags.has(a)){r.refs[a]=e.ref;break;}}return!0;}function j(e,t,r){return!(e.tags&&e.tags.indexOf(r.tag)>=0)||(r.ref=e.ref,!1);}function E(e,t,r){if(e.tags)for(var n=r.tags.size,i=0,a=0,o=e.tags;a<o.length;a++){var s=o[a];if(r.tags.has(s)&&++i===n){r.refs.push(e);break;}}else 0===r.tags.size&&r.refs.push(e);}!function(e){function t(e,t,r){var n=r.cells.get(e.ref);return!n||!n.obj||n.obj.type!==r.type||(r.roots.push(n),!1);}function r(e,t,r){var n=r.cells.get(e.ref);return n&&n.obj&&n.obj.type===r.type&&r.ret.push(n),!0;}function n(e,t,r){var n=r.cells.get(e.ref);return n&&n.obj&&n.transform.transformer===r.t&&r.ret.push(n),!0;}function i(e,t,r){var n=r.cells.get(e.ref);return n&&\"error\"===n.status&&n.transform.transformer===r.t&&r.ret.push(n),!0;}e.root=o(function(){return function(e){return[e.cells.get(e.tree.root.ref)];};}),e.byRef=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(function(){return function(t){for(var r=[],n=0,i=e;n<i.length;n++){var a=i[n],o=t.cells.get(a);o&&r.push(o);}return r;};});},e.byValue=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(function(){return function(t){return e;};});},e.rootsOfType=function(e,r){return void 0===r&&(r=d.a.RootRef),o(function(){return function(n){var i={roots:[],cells:n.cells,type:e.type};return c.doPreOrder(n.tree,n.tree.transforms.get(r),i,t),i.roots;};});},e.ofType=function(e,t){return void 0===t&&(t=d.a.RootRef),o(function(){return function(n){var i={ret:[],cells:n.cells,type:e.type};return c.doPreOrder(n.tree,n.tree.transforms.get(t),i,r),i.ret;};});},e.ofTransformer=function(e,t){return void 0===t&&(t=d.a.RootRef),o(function(){return function(r){var i={ret:[],cells:r.cells,t:e};return c.doPreOrder(r.tree,r.tree.transforms.get(t),i,n),i.ret;};});},e.ofTransformerWithError=function(e,t){return void 0===t&&(t=d.a.RootRef),o(function(){return function(r){var n={ret:[],cells:r.cells,t:e};return c.doPreOrder(r.tree,r.tree.transforms.get(t),n,i),n.ret;};});};}(n=e.Generators||(e.Generators={})),a(\"flatMap\",s),e.flatMap=s,a(\"mapObject\",u),e.mapObject=u,a(\"unique\",l),e.unique=l,a(\"first\",f),e.first=f,a(\"filter\",p),e.filter=p,a(\"withStatus\",m),e.withStatus=m,a(\"withTag\",h),e.withTag=h,a(\"subtree\",g),e.subtree=g,a(\"children\",v),e.children=v,a(\"ofType\",b),e.ofType=b,a(\"ancestorOfType\",_),e.ancestorOfType=_,a(\"withTransformer\",S),e.withTransformer=S,a(\"rootOfType\",O),e.rootOfType=O,a(\"parent\",x),e.parent=x,e.findAncestorOfType=C,e.findRootOfType=w,e.findUniqueTagsInSubtree=function(e,t,r){return c.doPreOrder(e,e.transforms.get(t),{refs:{},tags:r},P).refs;},e.findTagInSubtree=function(e,t,r){return c.doPreOrder(e,e.transforms.get(t),{ref:void 0,tag:r},j).ref;},e.findWithAllTags=function(e,t,r){return c.doPreOrder(e,e.transforms.get(t),{refs:[],tags:r},E).refs;},e.tryFindDecorator=function e(t,r,n){if(t.transforms.get(r).transformer===n)return t.cells.get(r);var i=t.tree.children.get(r);if(1===i.size){var a=i.first();return t.transforms.get(a).transformer.definition.isDecorator?e(t,a,n):void 0;}};}(b||(b={}));var O,x=r(180),C=r(151);function w(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=void 0,n=[],i=0,a=e;i<a.length;i++){var o=a[i];if(o)if(r||(r=new Set()),\"string\"==typeof o){if(r.has(o))continue;r.add(o),n.push(o);}else for(var s=0,u=o;s<u.length;s++){var c=u[s];r.has(c)||(r.add(c),n.push(c));}}return n;}!function(e){function t(e){if(!e.state||e.state.tree===e.editInfo.sourceTree)return e.tree.asImmutable();for(var t=e.state.tree.asTransient(),r=0,n=e.actions;r<n.length;r++){var i=n[r];switch(i.kind){case\"add\":t.add(i.transform);break;case\"update\":t.setParams(i.ref,i.params);break;case\"delete\":t.remove(i.ref);break;case\"insert\":var a=t.children.get(i.ref).toArray();t.add(i.transform);for(var o=0,s=a;o<s.length;o++){var u=s[o];t.changeParent(u,i.transform.ref);}}}return e.editInfo.sourceTree=e.tree,t.asImmutable();}e.is=function(e){return!!e&&\"function\"==typeof e.getTree;},e.isTo=function(e){return!!e&&\"function\"==typeof e.getTree&&\"string\"==typeof e.ref;};var r=function(){function e(e,t){this.state={state:t,tree:e.asTransient(),actions:[],editInfo:{applied:!1,sourceTree:e,count:0,lastUpdate:void 0}};}return Object.defineProperty(e.prototype,\"editInfo\",{get:function get(){return this.state.editInfo;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"currentTree\",{get:function get(){return this.state.tree;},enumerable:!1,configurable:!0}),e.prototype.to=function(e){var t=\"string\"==typeof e?e:i.is(e)?e.transform.ref:e.ref;return new n(this.state,t,this);},e.prototype.toRoot=function(){return new n(this.state,this.state.tree.root.ref,this);},e.prototype.delete=function(e){var t=o.resolveRef(e);return t&&this.state.tree.transforms.has(t)?(this.editInfo.count++,this.state.tree.remove(t),this.state.actions.push({kind:\"delete\",ref:t}),this):this;},e.prototype.getTree=function(){return t(this.state);},e.prototype.commit=function(e){if(!this.state.state)throw new Error(\"Cannot commit template tree\");return this.state.state.runTask(this.state.state.updateTree(this,e));},e;}();e.Root=r;var n=function(){function e(e,t,r){if(this.state=e,this.root=r,this.ref=t,!this.state.tree.transforms.has(t))throw new Error(\"Could not find node '\"+t+\"'.\");}return Object.defineProperty(e.prototype,\"editInfo\",{get:function get(){return this.state.editInfo;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"selector\",{get:function get(){return new u(this.ref,this.state.state);},enumerable:!1,configurable:!0}),e.prototype.getApplyRoot=function(){return c.getDecoratorRoot(this.state.tree,this.ref);},e.prototype.apply=function(t,r,n){if(t.definition.isDecorator)return this.insert(t,r,n);var i=this.getApplyRoot(),a=t.apply(i,r,n);return this.state.tree.add(a),this.editInfo.count++,this.editInfo.lastUpdate=a.ref,this.state.actions.push({kind:\"add\",transform:a}),new e(this.state,a.ref,this.root);},e.prototype.applyOrUpdate=function(e,t,r,n){if(this.state.tree.transforms.has(e)){var i=this.to(e);return r&&i.update(r),i;}return this.apply(t,r,Object(y.__assign)(Object(y.__assign)({},n),{ref:e}));},e.prototype.applyOrUpdateTagged=function(t,r,n,i){if(r.definition.isDecorator)throw new Error(\"Can't use applyOrUpdateTagged on decorator transformers.\");for(var a=this.getApplyRoot(),o=this.state.tree.children.get(a).values();;){var s=o.next();if(s.done)break;var u=this.state.tree.transforms.get(s.value);if(u&&d.a.hasTags(u,t)){var c=this.to(s.value);return c.updateTagged(n,w(u.tags,t,i&&i.tags)),c;}}var l=r.apply(a,n,Object(y.__assign)(Object(y.__assign)({},i),{tags:w(t,i&&i.tags)}));return this.state.tree.add(l),this.editInfo.count++,this.editInfo.lastUpdate=l.ref,this.state.actions.push({kind:\"add\",transform:l}),new e(this.state,l.ref,this.root);},e.prototype.group=function(e,t,r){return this.apply(e,t,r);},e.prototype.insert=function(t,r,n){var i=this.state.tree.children.get(this.ref).toArray(),a=t.apply(this.ref,r,n);this.state.tree.add(a);for(var o=0,s=i;o<s.length;o++){var u=s[o];this.state.tree.changeParent(u,a.ref);}return this.editInfo.count++,this.editInfo.lastUpdate=a.ref,this.state.actions.push({kind:\"insert\",ref:this.ref,transform:a}),new e(this.state,a.ref,this.root);},e.prototype.updateTagged=function(e,t){(this.state.tree.setParams(this.ref,e)||this.state.tree.setTags(this.ref,t))&&(this.editInfo.count++,this.editInfo.lastUpdate=this.ref,this.state.actions.push({kind:\"update\",ref:this.ref,params:e}));},e.prototype.update=function(e,t){var r;if(t){var n=this.state.tree.transforms.get(this.ref);r=Object(C.b)(n.params,t);}else r=\"function\"==typeof e?Object(C.b)(this.state.tree.transforms.get(this.ref).params,e):e;return this.state.tree.setParams(this.ref,r)&&(this.editInfo.count++,this.editInfo.lastUpdate=this.ref,this.state.actions.push({kind:\"update\",ref:this.ref,params:r})),this.root;},e.prototype.to=function(e){return this.root.to(e);},e.prototype.toRoot=function(){return this.root.toRoot();},e.prototype.delete=function(e){return this.root.delete(e);},e.prototype.getTree=function(){return t(this.state);},e.prototype.commit=function(e){if(!this.state.state)throw new Error(\"Cannot commit template tree\");return this.state.state.runTask(this.state.state.updateTree(this,e));},e;}();e.To=n;}(O||(O={}));var P,j=function(){function e(){this.ev=x.RxEventHelper.create(),this.actions=new Map(),this.fromTypeIndex=new Map(),this.events={added:this.ev(),removed:this.ev()};}return e.prototype.add=function(e){var t=_.a.is(e)?e.toAction():e;if(this.actions.has(t.id))return this;this.actions.set(t.id,t);for(var r=0,n=t.definition.from;r<n.length;r++){var i=n[r];this.fromTypeIndex.has(i.type)?this.fromTypeIndex.get(i.type).push(t):this.fromTypeIndex.set(i.type,[t]);}return this.events.added.next(),this;},e.prototype.remove=function(e){var t=_.a.is(e)?e.toAction().id:a.c.is(e)?e:e.id,r=this.actions.get(t);if(!r)return this;this.actions.delete(t);for(var n=0,i=r.definition.from;n<i.length;n++){var o=i[n],s=this.fromTypeIndex.get(o.type);s&&(Object(p.arraySetRemove)(s,r),0===s.length&&this.fromTypeIndex.delete(o.type));}return this.events.removed.next(),this;},e.prototype.fromCell=function(e,t){var r=e.obj;if(!r)return[];var n=this.fromTypeIndex.get(r.type);if(!n)return[];for(var i=!1,a=0,o=n;a<o.length;a++){if((l=o[a]).definition.isApplicable){i=!0;break;}}if(!i)return n;for(var s=[],u=0,c=n;u<c.length;u++){var l;(l=c[u]).definition.isApplicable?l.definition.isApplicable(r,e.transform,t)&&s.push(l):s.push(l);}return s;},e.prototype.dispose=function(){this.ev.dispose();},e;}(),E=r(253),A=r(83),T=r(2),D=r(302),I=r(60),M=function(){function e(){this.queue=[],this.signal=new I.a();}return Object.defineProperty(e.prototype,\"length\",{get:function get(){return this.queue.length;},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){return this.queue.push(e),1===this.queue.length||this.waitFor(e);},e.prototype.handled=function(e){Object(p.arrayRemoveInPlace)(this.queue,e),this.queue.length>0&&this.signal.next({v:this.queue[0],stillPresent:!0});},e.prototype.remove=function(e){var t=Object(p.arrayRemoveInPlace)(this.queue,e);return t&&this.signal.next({v:e,stillPresent:!1}),t;},e.prototype.waitFor=function(e){var t=this;return new Promise(function(r){var n=t.signal.subscribe(function(t){var i=t.v,a=t.stillPresent;i===e&&(n.unsubscribe(),r(a));});});},e;}(),k=r(61),B=r(55),V=function(){function e(e,t){this.errorFree=!0,this.ev=x.RxEventHelper.create(),this.globalContext=void 0,this.events={cell:{stateUpdated:this.ev(),created:this.ev(),removed:this.ev()},object:{updated:this.ev(),created:this.ev(),removed:this.ev()},log:this.ev(),changed:this.ev(),historyUpdated:this.ev()},this.behaviors={currentObject:this.ev.behavior({state:this,ref:d.a.RootRef}),isUpdating:this.ev.behavior(!1)},this.actions=new j(),this.cells=new Map(),this.spine=new D.a.Impl(this.cells),this.historyCapacity=5,this.history=[],this.undoingHistory=!1,this.inTransaction=!1,this.inTransactionError=!1,this._inUpdate=!1,this.reverted=!1,this.updateQueue=new M(),this._tree=c.createEmpty(d.a.createRoot(t&&t.rootState)).asTransient();var r=this._tree.root;this.runTask=t.runTask,void 0!==(null==t?void 0:t.historyCapacity)&&(this.historyCapacity=t.historyCapacity),this.cells.set(r.ref,{parent:this,transform:r,sourceRef:void 0,obj:e,status:\"ok\",state:Object(y.__assign)({},r.state),errorText:void 0,params:{definition:{},values:{}},dependencies:{dependentBy:[],dependsOn:[]},cache:{}}),this.globalContext=t&&t.globalContext;}return Object.defineProperty(e.prototype,\"tree\",{get:function get(){return this._tree;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"transforms\",{get:function get(){return this._tree.transforms;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"current\",{get:function get(){return this.behaviors.currentObject.value.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"root\",{get:function get(){return this.cells.get(this._tree.root.ref);},enumerable:!1,configurable:!0}),e.prototype.build=function(){return new O.Root(this.tree,this);},e.prototype.addHistory=function(e,t){0!==this.historyCapacity&&(this.history.unshift([e,t||\"Update\"]),this.history.length>this.historyCapacity&&this.history.pop(),this.events.historyUpdated.next({state:this}));},e.prototype.clearHistory=function(){0!==this.history.length&&(this.history=[],this.events.historyUpdated.next({state:this}));},Object.defineProperty(e.prototype,\"latestUndoLabel\",{get:function get(){return this.history.length>0?this.history[0][1]:void 0;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"canUndo\",{get:function get(){return this.history.length>0;},enumerable:!1,configurable:!0}),e.prototype.undo=function(){var e=this;return S.b.create(\"Undo\",function(t){return Object(y.__awaiter)(e,void 0,void 0,function(){var e;return Object(y.__generator)(this,function(r){switch(r.label){case 0:if(!(e=this.history.shift()))return[2];this.events.historyUpdated.next({state:this}),this.undoingHistory=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.updateTree(e[0],{canUndo:!1}).runInContext(t)];case 2:return r.sent(),[3,4];case 3:return this.undoingHistory=!1,[7];case 4:return[2];}});});});},e.prototype.getSnapshot=function(){return{tree:c.toJSON(this._tree)};},e.prototype.setSnapshot=function(e){var t=c.fromJSON(e.tree);return this.updateTree(t);},e.prototype.setCurrent=function(e){this.behaviors.currentObject.next({state:this,ref:e});},e.prototype.updateCellState=function(e,t){var r=this.cells.get(e);if(r){var n=\"function\"==typeof t?t(r.state):t;d.a.assignState(r.state,n)&&(r.transform=this._tree.assignState(r.transform.ref,n),this.events.cell.stateUpdated.next({state:this,ref:e,cell:r}));}},e.prototype.dispose=function(){this.ev.dispose(),this.actions.dispose();},e.prototype.select=function(e){return b.select(e,this);},e.prototype.selectQ=function(e){return\"string\"==typeof e?b.select(e,this):b.select(e(b.Generators),this);},e.prototype.applyAction=function(e,t,r){var n=this;return void 0===r&&(r=d.a.RootRef),S.b.create(\"Apply Action\",function(i){var a=n.cells.get(r);if(!a)throw new Error(\"'\"+r+\"' does not exist.\");if(\"ok\"!==a.status)throw new Error(\"Action cannot be applied to a cell with status '\"+a.status+\"'\");return ee(e.definition.run({ref:r,cell:a,a:a.obj,params:t,state:n},n.globalContext),i);});},e.prototype.transaction=function(e,t){var r=this;return S.b.create(\"State Transaction\",function(n){return Object(y.__awaiter)(r,void 0,void 0,function(){var r,i,a,o;return Object(y.__generator)(this,function(s){switch(s.label){case 0:r=this.inTransaction,i=this._tree.asImmutable(),a=!1,s.label=1;case 1:return s.trys.push([1,5,8,9]),r||this.behaviors.isUpdating.next(!0),this.inTransaction=!0,this.inTransactionError=!1,[4,e(n)];case 2:return s.sent(),this.inTransactionError?(a=!0,[4,this.updateTree(i).runInContext(n)]):[3,4];case 3:s.sent(),s.label=4;case 4:return[3,9];case 5:return o=s.sent(),a?[3,7]:(a=!0,[4,this.updateTree(i).runInContext(n)]);case 6:s.sent(),this.events.log.error(o),s.label=7;case 7:if(r)throw this.inTransactionError=!0,o;return[3,9];case 8:return r||(this.inTransaction=!1,this.events.changed.next({state:this,inTransaction:!1}),this.behaviors.isUpdating.next(!1),a||((null==t?void 0:t.canUndo)?this.addHistory(i,\"string\"==typeof t.canUndo?t.canUndo:void 0):this.clearHistory())),[7];case 9:return[2];}});});});},Object.defineProperty(e.prototype,\"inUpdate\",{get:function get(){return this._inUpdate;},enumerable:!1,configurable:!0}),e.prototype.updateTree=function(e,t){var r=this,n={tree:e,options:t};return S.b.create(\"Update Tree\",function(i){return Object(y.__awaiter)(r,void 0,void 0,function(){var r,a,o,s;return Object(y.__generator)(this,function(c){switch(c.label){case 0:return[4,this.updateQueue.enqueue(n)];case 1:if(!c.sent())return[2];this._inUpdate=!0,r=(null==t?void 0:t.canUndo)?this._tree.asImmutable():void 0,a=!1,this.inTransaction||this.behaviors.isUpdating.next(!0),c.label=2;case 2:if(c.trys.push([2,,7,8]),O.is(e)){if(e.editInfo.applied)throw new Error(\"This builder has already been applied. Create a new builder for further state updates\");e.editInfo.applied=!0;}return this.reverted=!1,t&&(t.revertIfAborted||t.revertOnError)?[4,this._revertibleTreeUpdate(i,n,t)]:[3,4];case 3:return s=c.sent(),[3,6];case 4:return[4,this._updateTree(i,n)];case 5:s=c.sent(),c.label=6;case 6:return o=s,a=this.reverted,o.ctx.hadError&&(this.inTransactionError=!0),o.cell?[2,new u(o.cell.transform.ref,this)]:[2];case 7:return this._inUpdate=!1,this.updateQueue.handled(n),this.inTransaction||(this.behaviors.isUpdating.next(!1),(null==t?void 0:t.canUndo)?a||this.addHistory(r,\"string\"==typeof t.canUndo?t.canUndo:void 0):this.undoingHistory||this.clearHistory()),[7];case 8:return[2];}});});},function(){r.updateQueue.remove(n);});},e.prototype._revertibleTreeUpdate=function(e,t,r){return Object(y.__awaiter)(this,void 0,void 0,function(){var n,i;return Object(y.__generator)(this,function(a){switch(a.label){case 0:return n=this.tree,[4,this._updateTree(e,t)];case 1:return i=a.sent(),(i.ctx.hadError||i.ctx.wasAborted)&&r.revertOnError||i.ctx.wasAborted&&r.revertIfAborted?(this.reverted=!0,[4,this._updateTree(e,{tree:n,options:t.options})]):[3,3];case 2:return[2,a.sent()];case 3:return[2,i];}});});},e.prototype._updateTree=function(e,t){return Object(y.__awaiter)(this,void 0,void 0,function(){var r,n,i;return Object(y.__generator)(this,function(a){switch(a.label){case 0:r=!1,n=this.updateTreeAndCreateCtx(t.tree,e,t.options),a.label=1;case 1:return a.trys.push([1,,3,4]),[4,L(n)];case 2:return r=a.sent(),O.isTo(t.tree)?(i=this.select(t.tree.ref)[0],[2,{ctx:n,cell:i}]):[2,{ctx:n}];case 3:return this.spine.current=void 0,r&&this.events.changed.next({state:this,inTransaction:this.inTransaction}),[7];case 4:return[2];}});});},e.prototype.updateTreeAndCreateCtx=function(e,t,r){var n=(O.is(e)?e.getTree():e).asTransient(),i=this._tree;this._tree=n;var a={parent:this,editInfo:O.is(e)?e.editInfo:void 0,errorFree:this.errorFree,taskCtx:t,oldTree:i,tree:n,cells:this.cells,spine:this.spine,results:[],options:Object(y.__assign)(Object(y.__assign)({},R),r),changed:!1,hadError:!1,wasAborted:!1,newCurrent:void 0};return this.errorFree=!0,a;},e;}();(P=V||(V={})).create=function(e,t){return new P(e,t);},(P.ObjectEvent||(P.ObjectEvent={})).isCell=function(e,t){return!!t&&e.ref===t.transform.ref&&e.state===t.parent;};var R={doNotLogTiming:!1,doNotUpdateCurrent:!0,revertIfAborted:!1,revertOnError:!1,canUndo:!1};function L(e){return Object(y.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,o,s,u,l,d,f,p,m,h,g,v,b,_,S,O,x,C,w,P,j,E,A,T,D,I;return Object(y.__generator)(this,function(y){switch(y.label){case 0:if(t=!(!e.editInfo||1!==e.editInfo.count||!e.editInfo.lastUpdate||e.editInfo.sourceTree!==e.oldTree),i=[],t)r=[],a=[e.editInfo.lastUpdate];else{for(r=function(e){var t={newTree:e.tree,cells:e.cells,deletes:[]};return c.doPostOrder(e.oldTree,e.oldTree.root,t,F),t.deletes;}(e),D=e.parent.current,o=!1,s=0,u=r;s<u.length;s++)if((b=u[s])===D){o=!0;break;}for(o&&(l=Q(e.oldTree,D,r,e.cells),e.parent.setCurrent(l)),v=r.length-1;v>=0;v--)(x=e.cells.get(r[v]))&&J(x.transform,x.obj,null==x?void 0:x.transform.params,x.cache,e.parent.globalContext);for(d=0,f=r;d<f.length;d++)b=f[d],(x=e.cells.get(b))&&(x.parent=void 0,G(x)),p=x&&x.obj,e.cells.delete(b),i.push(p);M=e.cells,k=e.tree,V={roots:[],cells:M},c.doPreOrder(k,k.root,V,N),a=V.roots;}for(m=function(e,t){for(var r,n={ctx:e,visited:new Set(),added:[]},i=0,a=t;i<a.length;i++){var o=a[i];c.doPreOrder(e.tree,e.tree.transforms.get(o),n,q);}for(var s=0,u=n.added;s<u.length;s++){W(u[s],e);}return n.visited.forEach(function(t){for(var i=0,a=e.cells.get(t).dependencies.dependentBy;i<a.length;i++){var o=a[i];n.visited.has(o.transform.ref)||(r||(r=B.c.create()),B.c.add(r,o.transform.ref,o));}}),{added:n.added,dependent:r?r.array:void 0};}(e,a),h=0,g=m.added;h<g.length;h++)x=g[h],e.parent.events.cell.created.next({state:e.parent,ref:x.transform.ref,cell:x});for(v=0;v<r.length;v++)b=r[v],_=e.oldTree.transforms.get(b).parent,e.parent.events.object.removed.next({state:e.parent,ref:b,obj:i[v]}),e.parent.events.cell.removed.next({state:e.parent,ref:b,parent:_});if(i.length&&(i=[]),m.dependent)for(S=0,O=m.dependent;S<O.length;S++)x=O[S],a.push(x.transform.ref);!function(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];c.doPreOrder(e.tree,e.tree.transforms.get(i),e,H);}}(e,a),C=0,w=a,y.label=1;case 1:return C<w.length?(P=w[C],[4,K(e,P)]):[3,4];case 2:y.sent(),y.label=3;case 3:return C++,[3,1];case 4:for(e.editInfo||function(e){c.doPreOrder(e.tree,e.tree.root,e,U);}(e),j=e.newCurrent,E=0,A=e.results;E<A.length;E++)\"created\"===(T=A[E]).action?(e.parent.events.object.created.next({state:e.parent,ref:T.ref,obj:T.obj}),e.newCurrent||e.tree.transforms.get(T.ref).state.isGhost||T.obj===n.Null||(j=T.ref)):\"updated\"===T.action?e.parent.events.object.updated.next({state:e.parent,ref:T.ref,action:\"in-place\",obj:T.obj}):\"replaced\"===T.action&&e.parent.events.object.updated.next({state:e.parent,ref:T.ref,action:\"recreate\",obj:T.obj,oldObj:T.oldObj});return j?e.options.doNotUpdateCurrent||e.parent.setCurrent(j):(D=e.parent.current,(I=e.cells.get(D))&&(I.obj===n.Null||\"error\"===I.status&&I.errorText===X)&&(j=Q(e.oldTree,D,[],e.cells),e.parent.setCurrent(j))),[2,r.length>0||a.length>0||e.changed];}var M,k,V;});});}function N(e,t,r){var i=r.cells.get(e.ref);return i&&i.transform.version===e.version?\"error\"!==i.status&&(!i||i.obj!==n.Null):(r.roots.push(e.ref),!1);}function F(e,t,r){!r.newTree.transforms.has(e.ref)&&r.cells.has(e.ref)&&r.deletes.push(e.ref);}function U(e,t,r){var n=r.cells.get(e.ref);n&&d.a.syncState(n.state,e.state)&&r.parent.events.cell.stateUpdated.next({state:r.parent,ref:e.ref,cell:n});}function z(e,t,r,n){var i=e.cells.get(t),a=i.status!==r;i.status=r,i.errorText=n,a&&e.parent.events.cell.stateUpdated.next({state:e.parent,ref:t,cell:i});}function H(e,t,r){r.cells.get(e.ref).transform=e,z(r,e.ref,\"pending\");}function G(e){for(var t=0,r=e.dependencies.dependsOn;t<r.length;t++){var n=r[t];Object(p.arraySetRemove)(n.dependencies.dependentBy,e);}}function q(e,t,r){var n=r.ctx,i=r.added;if(r.visited.add(e.ref),!n.cells.has(e.ref)){var a={parent:n.parent,transform:e,sourceRef:void 0,status:\"pending\",state:Object(y.__assign)({},e.state),errorText:void 0,params:void 0,dependencies:{dependentBy:[],dependsOn:[]},cache:void 0};n.cells.set(e.ref,a),i.push(a);}}function W(e,t){if(e.transform.dependsOn)for(var r=0,n=e.transform.dependsOn;r<n.length;r++){var i=n[r];if(!t.tree.transforms.get(i))throw new Error(\"Cannot depend on a non-existent transform.\");var a=t.cells.get(i);Object(p.arraySetAdd)(e.dependencies.dependsOn,a),Object(p.arraySetAdd)(a.dependencies.dependentBy,e);}}function Q(e,t,r,i){return function e(t,r,i,a){if(r===d.a.RootRef)return r;var o=t.transforms.get(r),s=t.children.get(o.parent).values(),u=void 0,c=!1;for(;;){var l=s.next();if(l.done)break;if(!i.has(l.value)){var f=a.get(l.value);if(f&&\"error\"!==f.status&&f.obj!==n.Null){var p=t.transforms.get(l.value);if(!p.state.isGhost)if(l.value!==r){if(c)return p.ref;u=p.ref;}else c=!0,i.has(r)||(u=r);}}}return u||e(t,o.parent,i,a);}(e,t,new Set(r),i);}function Y(e,t,r,n){n||(e.hadError=!0,e.parent.errorFree=!1);var i=e.cells.get(t);if(r){e.wasAborted=e.wasAborted||S.b.isAbort(r);var a=\"\"+r;z(e,t,\"error\",a),n||e.parent.events.log.next({type:\"error\",timestamp:new Date(),message:a});}else i.params=void 0;if(i.obj){var o=i.obj;i.obj=void 0,i.cache=void 0,e.parent.events.object.removed.next({state:e.parent,ref:t,obj:o});}for(var s=e.tree.children.get(t).values();;){var u=s.next();if(u.done)return;Y(e,u.value,void 0,n);}}var X=\"Parent is null\";function K(e,t){return Object(y.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c;return Object(y.__generator)(this,function(l){switch(l.label){case 0:z(e,t,\"processing\"),r=!1,l.label=1;case 1:return l.trys.push([1,3,,4]),i=Object(A.b)(),[4,Z(e,t)];case 2:return a=l.sent(),o=Object(A.b)()-i,\"none\"!==a.action&&(e.changed=!0),z(e,t,\"ok\"),e.results.push(a),\"created\"===a.action?(r=a.obj===n.Null)||e.options.doNotLogTiming||e.parent.events.log.next(E.a.info(\"Created \"+a.obj.label+\" in \"+Object(A.a)(o)+\".\")):(\"updated\"===a.action||\"replaced\"===a.action)&&((r=a.obj===n.Null)||e.options.doNotLogTiming||e.parent.events.log.next(E.a.info(\"Updated \"+a.obj.label+\" in \"+Object(A.a)(o)+\".\"))),[3,4];case 3:return s=l.sent(),e.changed=!0,e.hadError||(e.newCurrent=t),Y(e,t,s,!1),k.b||console.error(s),[2];case 4:u=e.tree.children.get(t).values(),l.label=5;case 5:return(c=u.next()).done?[2]:r?(Y(e,c.value,void 0,!0),[3,8]):[3,6];case 6:return[4,K(e,c.value)];case 7:l.sent(),l.label=8;case 8:return[3,5];case 9:return[2];}});});}function Z(e,t){return Object(y.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c,l,p,m,h,g,v,S;return Object(y.__generator)(this,function(y){switch(y.label){case 0:if(r=e.oldTree,i=e.tree,a=e.cells.get(t),o=a.transform,a.transform.ref===d.a.RootRef)return[2,{action:\"none\"}];if(!(s=0===o.transformer.definition.from.length?e.cells.get(a.transform.parent):b.findAncestorOfType(i,e.cells,t,o.transformer.definition.from)))throw new Error(\"No suitable parent found for '\"+t+\"'\");return e.spine.current=a,u=s.obj,a.sourceRef=s.transform.ref,c=function(e,t,r){var n=t.transformer.definition.params,i=n?n(r,e.parent.globalContext):{},a=T.ParamDefinition.getDefaultValues(i);return t.params=t.params?Object(f.a)(t.params,a):a,{definition:i,values:t.params};}(e,o,u),r.transforms.has(t)&&a.params?[3,2]:(a.params=c,[4,re(e,a,o.transformer,u,c.values)]);case 1:return $(l=y.sent(),o),a.obj=l,[2,{ref:t,action:\"created\",obj:l}];case 2:return p=a.params.values,m=a.cache,h=c.values,a.params=c,a.obj&&a.obj!==n.Null?[4,ne(e,a,o.transformer,u,a.obj,p,h)]:[3,4];case 3:return g=y.sent(),[3,5];case 4:g=_.a.UpdateResult.Recreate,y.label=5;case 5:switch(g){case _.a.UpdateResult.Recreate:return[3,6];case _.a.UpdateResult.Updated:return[3,8];case _.a.UpdateResult.Null:return[3,9];}return[3,10];case 6:return v=a.obj,J(o,v,p,m,e.parent.globalContext),[4,re(e,a,o.transformer,u,h)];case 7:return $(S=y.sent(),o),a.obj=S,[2,{ref:t,action:\"replaced\",oldObj:v,obj:S}];case 8:return $(a.obj,o),[2,{ref:t,action:\"updated\",obj:a.obj}];case 9:return J(o,a.obj,p,m,e.parent.globalContext),a.obj=n.Null,[2,{ref:t,action:\"updated\",obj:a.obj}];case 10:return[2,{action:\"none\"}];}});});}function J(e,t,r,i,a){var o,s;null===(s=(o=e.transformer.definition).dispose)||void 0===s||s.call(o,{b:t!==n.Null?t:void 0,params:r,cache:i},a);}function $(e,t){e&&e!==n.Null&&(e.tags=t.tags);}function ee(e,t){return\"function\"==typeof e.runInContext?e.runInContext(t):e;}function te(e){if(0!==e.dependencies.dependsOn.length){for(var t=Object.create(null),r=0,n=e.dependencies.dependsOn;r<n.length;r++){var i=n[r];if(!i.obj)throw new Error(\"Unresolved dependency.\");t[i.transform.ref]=i.obj;}return t;}}function re(e,t,r,n,i){return t.cache||(t.cache=Object.create(null)),ee(r.definition.apply({a:n,params:i,cache:t.cache,spine:e.spine,dependencies:te(t)},e.parent.globalContext),e.taskCtx);}function ne(e,t,r,n,i,a,o){return Object(y.__awaiter)(this,void 0,void 0,function(){return Object(y.__generator)(this,function(s){return r.definition.update?(t.cache||(t.cache=Object.create(null)),[2,ee(r.definition.update({a:n,oldParams:a,b:i,newParams:o,cache:t.cache,spine:e.spine,dependencies:te(t)},e.parent.globalContext),e.taskCtx)]):[2,_.a.UpdateResult.Recreate];});});}var ie=r(340);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Icon\",function(){return i;}),r.d(t,\"UnionSvg\",function(){return u;}),r.d(t,\"SubtractSvg\",function(){return l;}),r.d(t,\"IntersectSvg\",function(){return f;}),r.d(t,\"SetSvg\",function(){return m;}),r.d(t,\"MoleculeSvg\",function(){return g;}),r.d(t,\"CubeOutlineSvg\",function(){return b;}),r.d(t,\"CursorDefaultOutlineSvg\",function(){return _;}),r.d(t,\"FileOutlineSvg\",function(){return O;}),r.d(t,\"PencilRulerSvg\",function(){return C;}),r.d(t,\"AccountTreeOutlinedSvg\",function(){return P;}),r.d(t,\"AddSvg\",function(){return E;}),r.d(t,\"ArrowDownwardSvg\",function(){return T;}),r.d(t,\"ArrowDropDownSvg\",function(){return I;}),r.d(t,\"ArrowRightSvg\",function(){return k;}),r.d(t,\"ArrowUpwardSvg\",function(){return V;}),r.d(t,\"AutorenewSvg\",function(){return L;}),r.d(t,\"BlurOnSvg\",function(){return F;}),r.d(t,\"BookmarksOutlinedSvg\",function(){return z;}),r.d(t,\"BrushSvg\",function(){return G;}),r.d(t,\"BuildOutlinedSvg\",function(){return W;}),r.d(t,\"BuildSvg\",function(){return Y;}),r.d(t,\"CameraOutlinedSvg\",function(){return K;}),r.d(t,\"CameraSvg\",function(){return J;}),r.d(t,\"CancelOutlinedSvg\",function(){return ee;}),r.d(t,\"CancelSvg\",function(){return re;}),r.d(t,\"CenterFocusStrongSvg\",function(){return ie;}),r.d(t,\"CheckSvg\",function(){return oe;}),r.d(t,\"ClearSvg\",function(){return ue;}),r.d(t,\"CloseSvg\",function(){return le;}),r.d(t,\"CloudUploadSvg\",function(){return fe;}),r.d(t,\"CodeSvg\",function(){return me;}),r.d(t,\"DeleteOutlinedSvg\",function(){return ge;}),r.d(t,\"DeleteSvg\",function(){return be;}),r.d(t,\"ErrorSvg\",function(){return _e;}),r.d(t,\"ExtensionSvg\",function(){return Oe;}),r.d(t,\"FlipToFrontSvg\",function(){return Ce;}),r.d(t,\"FullscreenSvg\",function(){return Pe;}),r.d(t,\"GetAppSvg\",function(){return Ee;}),r.d(t,\"HelpOutlineSvg\",function(){return Te;}),r.d(t,\"HomeOutlinedSvg\",function(){return Ie;}),r.d(t,\"LaunchSvg\",function(){return ke;}),r.d(t,\"LinearScaleSvg\",function(){return Ve;}),r.d(t,\"MoreHorizSvg\",function(){return Le;}),r.d(t,\"NavigateBeforeSvg\",function(){return Fe;}),r.d(t,\"NavigateNextSvg\",function(){return ze;}),r.d(t,\"OpenInBrowserSvg\",function(){return Ge;}),r.d(t,\"PlayArrowSvg\",function(){return We;}),r.d(t,\"RefreshSvg\",function(){return Ye;}),r.d(t,\"RemoveSvg\",function(){return Ke;}),r.d(t,\"RestoreSvg\",function(){return Je;}),r.d(t,\"SaveOutlinedSvg\",function(){return et;}),r.d(t,\"ScatterPlotSvg\",function(){return rt;}),r.d(t,\"SkipPreviousSvg\",function(){return it;}),r.d(t,\"StopSvg\",function(){return ot;}),r.d(t,\"SubscriptionsOutlinedSvg\",function(){return ut;}),r.d(t,\"SwapHorizSvg\",function(){return lt;}),r.d(t,\"TuneSvg\",function(){return ft;}),r.d(t,\"VisibilityOffOutlinedSvg\",function(){return mt;}),r.d(t,\"VisibilityOutlinedSvg\",function(){return gt;}),r.d(t,\"WarningSvg\",function(){return bt;}),r.d(t,\"SelectionModeSvg\",function(){return yt;}),r.d(t,\"SuperposeAtomsSvg\",function(){return _t;}),r.d(t,\"SuperposeChainsSvg\",function(){return St;}),r.d(t,\"SuperpositionSvg\",function(){return Ot;});var n=r(3);function i(e){return e.svg?n.createElement(\"span\",{className:\"msp-icon msp-material-icon\"+(e.inline?\" msp-icon-inline\":\"\"),title:e.title,style:e.style},n.createElement(e.svg,null)):null;}var a=n.createElement(\"circle\",{r:\"6px\",id:\"circle-left\",cy:\"12px\",cx:\"8px\",strokeWidth:\"1px\"}),o=n.createElement(\"circle\",{r:\"6px\",id:\"circle-right\",cy:\"12px\",cx:\"16px\",strokeWidth:\"1px\"}),s=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"defs\",null,a,o),n.createElement(\"g\",null,n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-filled\"}),n.createElement(\"use\",{href:\"#circle-right\",className:\"msp-shape-filled\"}),n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-empty\"})));function u(){return s;}var c=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"defs\",null,a,o,n.createElement(\"mask\",{id:\"mask-left\"},n.createElement(\"use\",{href:\"#circle-left\",fill:\"white\",stroke:\"white\"}),n.createElement(\"use\",{href:\"#circle-right\",fill:\"black\",strokeWidth:\"0px\",stroke:\"white\"}))),n.createElement(\"g\",null,n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-filled\",mask:\"url(#mask-left)\"}),n.createElement(\"use\",{href:\"#circle-right\",className:\"msp-shape-empty\"})));function l(){return c;}var d=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"defs\",null,a,o,n.createElement(\"clipPath\",{id:\"clip-left\"},n.createElement(\"use\",{href:\"#circle-right\"}))),n.createElement(\"g\",null,n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-filled\",clipPath:\"url(#clip-left)\"}),n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-empty\"}),n.createElement(\"use\",{href:\"#circle-right\",className:\"msp-shape-empty\"})));function f(){return d;}var p=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"defs\",null,a,o),n.createElement(\"g\",null,n.createElement(\"use\",{href:\"#circle-left\",className:\"msp-shape-empty\"}),n.createElement(\"use\",{href:\"#circle-right\",className:\"msp-shape-filled\"})));function m(){return p;}var h=n.createElement(\"svg\",{width:\"17px\",height:\"17px\",viewBox:\"0 0 299.463 299.463\",strokeWidth:\"6px\"},n.createElement(\"g\",null,n.createElement(\"path\",{d:\"M256.851,173.832v-48.201c22.916-4.918,34.151-30.668,22.556-50.771c-11.547-20.004-39.486-23.251-55.242-5.844 l-41.746-24.106C189.618,22.603,172.861,0,149.734,0c-23.132,0-39.881,22.609-32.685,44.911L75.305,69.016 C59.522,51.586,31.597,54.88,20.061,74.863c-11.63,20.163-0.298,45.862,22.557,50.769v48.2 c-22.821,4.898-34.195,30.591-22.556,50.771c11.529,19.972,39.454,23.285,55.242,5.845l41.746,24.106 c-7.199,22.308,9.559,44.911,32.685,44.911c23.132,0,39.88-22.609,32.685-44.911l41.745-24.106 c15.817,17.469,43.73,14.099,55.242-5.844c0,0,0-0.001,0.001-0.002c4.587-7.953,5.805-17.213,3.431-26.076 C279.392,185.657,269.129,176.461,256.851,173.832z M249.62,72.088c20.568,0,27.428,27.191,10.008,37.239 c-0.003,0.002-0.006,0.003-0.009,0.005c-10.04,5.81-22.85,1.762-27.877-8.475C225.206,87.548,234.938,72.088,249.62,72.088z M149.734,14.4c11.005,0,19.958,8.954,19.958,19.959c0,11.127-9.077,19.958-19.958,19.958c-10.95,0-19.958-8.9-19.958-19.958 C129.776,23.354,138.729,14.4,149.734,14.4z M39.84,109.328c-17.451-10.067-10.534-37.24,10.01-37.24 c15.311,0,24.922,16.653,17.251,29.942C61.681,111.397,49.517,114.925,39.84,109.328z M59.802,224.702 c-9.535,5.503-21.768,2.229-27.268-7.298c-7.639-13.242,1.887-29.945,17.236-29.945c0.013,0,0.027,0,0.04,0 C70.07,187.48,77.49,214.469,59.802,224.702z M149.734,285.062c-11.005,0-19.958-8.954-19.958-19.958 c0-11.127,9.077-19.958,19.958-19.958c10.954,0,19.958,8.903,19.958,19.958C169.693,276.109,160.74,285.062,149.734,285.062z M216.953,217.982l-41.727,24.095c-13.778-15.22-37.459-14.94-50.983,0l-41.728-24.096c6.196-19.289-5.541-39.835-25.498-44.149 V125.63c19.752-4.268,31.762-24.65,25.498-44.149l41.727-24.095c13.629,15.055,37.32,15.093,50.983,0l41.728,24.096 c-6.196,19.29,5.534,39.835,25.498,44.149v48.202C222.61,178.123,210.721,198.581,216.953,217.982z M266.935,217.404 c-5.501,9.528-17.732,12.802-27.261,7.302c-17.682-10.23-10.301-37.247,10.032-37.247 C264.984,187.459,274.602,204.112,266.935,217.404z\"})));function g(){return h;}var v=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\",strokeWidth:\"0.1px\"},n.createElement(\"path\",{d:\"M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V9.21L13,12.58V19.29L19,15.91Z\"}));function b(){return v;}var y=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z\"}));function _(){return y;}var S=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\",strokeWidth:\"0.1px\"},n.createElement(\"path\",{fill:\"currentColor\",d:\"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z\"}));function O(){return S;}var x=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\",strokeWidth:\"0.1px\"},n.createElement(\"path\",{d:\"M3 17.25V21H6.75L17.81 9.93L14.06 6.18L3 17.25M22.61 18.36L18.36 22.61L13.16 17.41L14.93 15.64L15.93 16.64L18.4 14.16L19.82 15.58L18.36 17L19.42 18L20.84 16.6L22.61 18.36M6.61 10.83L1.39 5.64L5.64 1.39L7.4 3.16L4.93 5.64L6 6.7L8.46 4.22L9.88 5.64L8.46 7.05L9.46 8.05L6.61 10.83M20.71 7C21.1 6.61 21.1 6 20.71 5.59L18.37 3.29C18 2.9 17.35 2.9 16.96 3.29L15.12 5.12L18.87 8.87L20.71 7Z\"}));function C(){return x;}var w=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10h3v4h-3V5z\"}));function P(){return w;}var j=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"}));function E(){return j;}var A=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"}));function T(){return A;}var D=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M7 10l5 5 5-5z\"}));function I(){return D;}var M=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M10 17l5-5-5-5v10z\"}));function k(){return M;}var B=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"}));function V(){return B;}var R=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z\"}));function L(){return R;}var N=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z\"}));function F(){return N;}var U=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M15 7v12.97l-4.21-1.81-.79-.34-.79.34L5 19.97V7h10m4-6H8.99C7.89 1 7 1.9 7 3h10c1.1 0 2 .9 2 2v13l2 1V3c0-1.1-.9-2-2-2zm-4 4H5c-1.1 0-2 .9-2 2v16l7-3 7 3V7c0-1.1-.9-2-2-2z\"}));function z(){return U;}var H=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34a.9959.9959 0 00-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41z\"}));function G(){return H;}var q=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M22.61 18.99l-9.08-9.08c.93-2.34.45-5.1-1.44-7C9.79.61 6.21.4 3.66 2.26L7.5 6.11 6.08 7.52 2.25 3.69C.39 6.23.6 9.82 2.9 12.11c1.86 1.86 4.57 2.35 6.89 1.48l9.11 9.11c.39.39 1.02.39 1.41 0l2.3-2.3c.4-.38.4-1.01 0-1.41zm-3 1.6l-9.46-9.46c-.61.45-1.29.72-2 .82-1.36.2-2.79-.21-3.83-1.25C3.37 9.76 2.93 8.5 3 7.26l3.09 3.09 4.24-4.24-3.09-3.09c1.24-.07 2.49.37 3.44 1.31 1.08 1.08 1.49 2.57 1.24 3.96-.12.71-.42 1.37-.88 1.96l9.45 9.45-.88.89z\"}));function W(){return q;}var Q=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z\"}));function Y(){return Q;}var X=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M14.25 2.26l-.08-.04-.01.02C13.46 2.09 12.74 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-4.75-3.31-8.72-7.75-9.74zM19.41 9h-7.99l2.71-4.7c2.4.66 4.35 2.42 5.28 4.7zM13.1 4.08L10.27 9l-1.15 2L6.4 6.3C7.84 4.88 9.82 4 12 4c.37 0 .74.03 1.1.08zM5.7 7.09L8.54 12l1.15 2H4.26C4.1 13.36 4 12.69 4 12c0-1.85.64-3.55 1.7-4.91zM4.59 15h7.98l-2.71 4.7c-2.4-.67-4.34-2.42-5.27-4.7zm6.31 4.91L14.89 13l2.72 4.7C16.16 19.12 14.18 20 12 20c-.38 0-.74-.04-1.1-.09zm7.4-3l-4-6.91h5.43c.17.64.27 1.31.27 2 0 1.85-.64 3.55-1.7 4.91z\"}));function K(){return X;}var Z=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4.76 8.25C21 16.97 22 14.61 22 12c0-.69-.07-1.35-.2-2zM8.54 12l-3.9-6.75C3.01 7.03 2 9.39 2 12c0 .69.07 1.35.2 2h7.49l-1.15-2zm-6.08 3c.92 2.92 3.15 5.26 6 6.34L12.12 15H2.46zm11.27 0l-3.9 6.76c.7.15 1.42.24 2.17.24 2.4 0 4.6-.85 6.32-2.25l-3.66-6.35-.93 1.6z\"}));function J(){return Z;}var $=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z\"}));function ee(){return $;}var te=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"}));function re(){return te;}var ne=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z\"}));function ie(){return ne;}var ae=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"}));function oe(){return ae;}var se=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"}));function ue(){return se;}var ce=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"}));function le(){return ce;}var de=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z\"}));function fe(){return de;}var pe=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"}));function me(){return pe;}var he=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"}));function ge(){return he;}var ve=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"}));function be(){return ve;}var ye=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"}));function _e(){return ye;}var Se=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z\"}));function Oe(){return Se;}var xe=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\",strokeWidth:\"0.1px\"},n.createElement(\"path\",{d:\"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z\"}));function Ce(){return xe;}var we=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\"}));function Pe(){return we;}var je=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z\"}));function Ee(){return je;}var Ae=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z\"}));function Te(){return Ae;}var De=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z\"}));function Ie(){return De;}var Me=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z\"}));function ke(){return Me;}var Be=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19.5 9.5c-1.03 0-1.9.62-2.29 1.5h-2.92c-.39-.88-1.26-1.5-2.29-1.5s-1.9.62-2.29 1.5H6.79c-.39-.88-1.26-1.5-2.29-1.5C3.12 9.5 2 10.62 2 12s1.12 2.5 2.5 2.5c1.03 0 1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5s1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5 1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5z\"}));function Ve(){return Be;}var Re=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"}));function Le(){return Re;}var Ne=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"}));function Fe(){return Ne;}var Ue=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"}));function ze(){return Ue;}var He=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z\"}));function Ge(){return He;}var qe=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M8 5v14l11-7z\"}));function We(){return qe;}var Qe=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"}));function Ye(){return Qe;}var Xe=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M19 13H5v-2h14v2z\"}));function Ke(){return Xe;}var Ze=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"}));function Je(){return Ze;}var $e=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\",strokeWidth:\"0.1px\"},n.createElement(\"path\",{d:\"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm2 16H5V5h11.17L19 7.83V19zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zM6 6h9v4H6z\"}));function et(){return $e;}var tt=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"circle\",{cx:\"7\",cy:\"14\",r:\"3\"}),n.createElement(\"circle\",{cx:\"11\",cy:\"6\",r:\"3\"}),n.createElement(\"circle\",{cx:\"16.6\",cy:\"17.6\",r:\"3\"}));function rt(){return tt;}var nt=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6 6h2v12H6zm3.5 6l8.5 6V6z\"}));function it(){return nt;}var at=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6 6h12v12H6z\"}));function ot(){return at;}var st=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M4 6h16v2H4zm2-4h12v2H6zm14 8H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm0 10H4v-8h16v8zm-10-7.27v6.53L16 16z\"}));function ut(){return st;}var ct=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z\"}));function lt(){return ct;}var dt=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z\"}));function ft(){return dt;}var pt=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5l2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13zm-3.4-3.4l1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.77-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53z\"}));function mt(){return pt;}var ht=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z\"}));function gt(){return ht;}var vt=n.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},n.createElement(\"path\",{d:\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"}));function bt(){return vt;}var yt=_,_t=rt,St=Ve,Ot=Ce;},function(e,t,r){\"use strict\";var n;!function(e){function t(e,t,r){return{kind:\"value\",namespace:e,name:t,parent:r};}function r(e,t,r,n){for(var i=Object.create(null),a=0,o=n;a<o.length;a++){i[o[a]]=!0;}return{kind:\"oneof\",namespace:e,name:t,type:r,values:i};}e.Variable=function(e,t,r){return{kind:\"variable\",name:e,type:t,isConstraint:r};},e.Value=t,e.Container=function(e,t,r,n){return{kind:\"container\",namespace:e,name:t,child:r,alias:n};},e.Union=function(e){return{kind:\"union\",types:e};},e.OneOf=r,e.Any={kind:\"any\"},e.AnyValue={kind:\"any-value\"},e.Num=t(\"\",\"Number\"),e.Str=t(\"\",\"String\"),e.Bool=r(\"\",\"Bool\",e.Str,[\"true\",\"false\"]),e.oneOfValues=function(e){var t=e.values;return Object.keys(t).sort();};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return a.a;}),r.d(t,\"a\",function(){return s.a;}),r.d(t,\"c\",function(){return l;});var n,i,a=r(255),o=r(265);(n||(n={})).Synchronous=o.a,function(e){e.format=function(e){return function e(t,r){void 0===r&&(r=\"\");var n=t.progress;if(!t.children.length)return n.isIndeterminate?\"\"+r+n.taskName+\": \"+n.message:\"\"+r+n.taskName+\": [\"+n.current+\"/\"+n.max+\"] \"+n.message;var i=r+\"  |_ \",a=t.children.map(function(t){return e(t,i);});return n.isIndeterminate?\"\"+r+n.taskName+\": \"+n.message+\"\\n\"+a.join(\"\\n\"):\"\"+r+n.taskName+\": [\"+n.current+\"/\"+n.max+\"] \"+n.message+\"\\n\"+a.join(\"\\n\");}(e.root);};}(i||(i={}));var s=r(339),u=r(0);var c=r(83);function l(e,t,r,n,i){return Object(u.__awaiter)(this,void 0,void 0,function(){var a,o,s,l,d,f,p;return Object(u.__generator)(this,function(u){switch(u.label){case 0:if(a=Math.max(t,0),o=0,s=0,e.isSynchronous)return n(Number.MAX_SAFE_INTEGER,r),[2,r];l=Object(c.b)(),d=0,f=0,u.label=1;case 1:return(d=n(a,r))>0?(o+=d,p=Object(c.b)()-l,f+=p,s+=p,e.shouldUpdate?[4,i(e,r,o)]:[3,3]):[3,4];case 2:u.sent(),a=Math.round(f*o/s)+1,l=Object(c.b)(),f=0,u.label=3;case 3:return[3,1];case 4:return e.shouldUpdate?[4,i(e,r,o)]:[3,6];case 5:u.sent(),u.label=6;case 6:return[2,r];}});});}},function(e,t,r){\"use strict\";r.d(t,\"l\",function(){return i;}),r.d(t,\"k\",function(){return a;}),r.d(t,\"a\",function(){return o;}),r.d(t,\"i\",function(){return s;}),r.d(t,\"h\",function(){return u;}),r.d(t,\"d\",function(){return c;}),r.d(t,\"c\",function(){return l;}),r.d(t,\"j\",function(){return d;}),r.d(t,\"e\",function(){return f;}),r.d(t,\"f\",function(){return p;}),r.d(t,\"g\",function(){return h;}),r.d(t,\"b\",function(){return _;});var n=r(0);function i(e,t){var r={},n={},i={},a={},o={};return Object.keys(e).forEach(function(s){var u=e[s];\"attribute\"===u.type&&(r[s]=t[s]),\"define\"===u.type&&(n[s]=t[s]),\"texture\"===u.type&&(i[s]=t[s]),\"uniform\"===u.type&&void 0!==t[s]&&(u.isMaterial?o[s]=t[s]:a[s]=t[s]);}),{attributeValues:r,defineValues:n,textureValues:i,uniformValues:a,materialUniformValues:o};}function a(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].ref.version;}),t;}function o(e,t,r){return{type:\"attribute\",kind:e,itemSize:t,divisor:r};}function s(e,t){return void 0===t&&(t=!1),{type:\"uniform\",kind:e,isMaterial:t};}function u(e,t,r,n){return{type:\"texture\",kind:e,format:t,dataType:r,filter:n};}function c(e){return{type:\"elements\",kind:e};}function l(e,t){return{type:\"define\",kind:e,options:t};}function d(e){return{type:\"value\",kind:e};}var f={uModel:s(\"m4\"),uView:s(\"m4\"),uInvView:s(\"m4\"),uModelView:s(\"m4\"),uInvModelView:s(\"m4\"),uProjection:s(\"m4\"),uInvProjection:s(\"m4\"),uModelViewProjection:s(\"m4\"),uInvModelViewProjection:s(\"m4\"),uIsOrtho:s(\"f\"),uPixelRatio:s(\"f\"),uViewportHeight:s(\"f\"),uViewport:s(\"v4\"),uViewOffset:s(\"v2\"),uCameraPosition:s(\"v3\"),uNear:s(\"f\"),uFar:s(\"f\"),uFogNear:s(\"f\"),uFogFar:s(\"f\"),uFogColor:s(\"v3\"),uTransparentBackground:s(\"i\"),uClipObjectType:s(\"i[]\"),uClipObjectPosition:s(\"v3[]\"),uClipObjectRotation:s(\"v4[]\"),uClipObjectScale:s(\"v3[]\"),uLightIntensity:s(\"f\"),uAmbientIntensity:s(\"f\"),uMetalness:s(\"f\"),uRoughness:s(\"f\"),uReflectivity:s(\"f\"),uPickingAlphaThreshold:s(\"f\"),uInteriorDarkening:s(\"f\"),uInteriorColorFlag:s(\"i\"),uInteriorColor:s(\"v3\"),uHighlightColor:s(\"v3\"),uSelectColor:s(\"v3\")},p={uObjectId:s(\"i\")},m={uColor:s(\"v3\",!0),uColorTexDim:s(\"v2\"),tColor:u(\"image-uint8\",\"rgb\",\"ubyte\",\"nearest\"),dColorType:l(\"string\",[\"uniform\",\"attribute\",\"instance\",\"group\",\"group_instance\"])},h={uSize:s(\"f\",!0),uSizeTexDim:s(\"v2\"),tSize:u(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),dSizeType:l(\"string\",[\"uniform\",\"attribute\",\"instance\",\"group\",\"group_instance\"]),uSizeFactor:s(\"f\")},g={uMarkerTexDim:s(\"v2\"),tMarker:u(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\")},v={uOverpaintTexDim:s(\"v2\"),tOverpaint:u(\"image-uint8\",\"rgba\",\"ubyte\",\"nearest\"),dOverpaint:l(\"boolean\")},b={uTransparencyTexDim:s(\"v2\"),tTransparency:u(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),dTransparency:l(\"boolean\"),dTransparencyVariant:l(\"string\",[\"single\",\"multi\"])},y={dClipObjectCount:l(\"number\"),dClipVariant:l(\"string\",[\"instance\",\"pixel\"]),uClippingTexDim:s(\"v2\"),tClipping:u(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),dClipping:l(\"boolean\")},_=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},m),g),v),b),y),{aInstance:o(\"float32\",1,1),aGroup:o(\"float32\",1,0),aTransform:o(\"float32\",16,1),uAlpha:s(\"f\",!0),uInstanceCount:s(\"i\"),uGroupCount:s(\"i\"),uInvariantBoundingSphere:s(\"v4\"),drawCount:d(\"number\"),instanceCount:d(\"number\"),alpha:d(\"number\"),matrix:d(\"m4\"),transform:d(\"float32\"),extraTransform:d(\"float32\"),boundingSphere:d(\"sphere\"),invariantBoundingSphere:d(\"sphere\")});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return n;}),r.d(t,\"d\",function(){return o;}),r.d(t,\"c\",function(){return s;}),r.d(t,\"e\",function(){return u;});var n,i=r(132);function a(e,t){var r=t||{},n=r.description,i=void 0===n?void 0:n,a=r.isOptional,o=void 0!==a&&a,s=r.isRest,u=void 0!==s&&s,c=r.defaultValue;return{type:e,isOptional:o,isRest:u,defaultValue:void 0===c?void 0:c,description:i};}function o(e,t,r,n){var _a3=function a(e){return i.a.Apply(i.a.Symbol(_a3.id),e);};return _a3.info={namespace:\"\",name:e,description:n},_a3.id=\"\",_a3.args=t,_a3.type=r,_a3;}function s(e,t,r,a){var _o2=function o(e){return i.a.Apply(i.a.Symbol(_o2.id),e);};return _o2.info={namespace:e,name:t,description:a},_o2.id=e+\".\"+t,_o2.args=n.None,_o2.type=r,_o2;}function u(e){var t=e;return\"function\"==typeof t&&!!t.info&&!!t.args&&\"string\"==typeof t.info.namespace&&!!t.type;}!function(e){function t(e){return{kind:\"dictionary\",map:e,\"@type\":0};}e.None=t({}),e.Dictionary=t,e.List=function(e,t){var r=(t||{}).nonEmpty;return{kind:\"list\",type:e,nonEmpty:void 0!==r&&r,\"@type\":0};};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ControlGroup\",function(){return s;}),r.d(t,\"TextInput\",function(){return c;}),r.d(t,\"ExpandableControlRow\",function(){return l;}),r.d(t,\"SectionHeader\",function(){return d;}),r.d(t,\"Button\",function(){return f;}),r.d(t,\"IconButton\",function(){return p;}),r.d(t,\"ToggleButton\",function(){return m;}),r.d(t,\"ExpandGroup\",function(){return h;}),r.d(t,\"ControlRow\",function(){return g;});var n=r(0),i=r(3),a=r(24),o=r(14),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!!t.props.initialExpanded},t.headerClicked=function(){t.props.onHeaderClick?t.props.onHeaderClick():t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.hideOffset?\"msp-control-group-children\":\"msp-control-group-children msp-control-offset\";return this.props.childrenClassName&&(e+=\" \"+this.props.childrenClassName),i.createElement(\"div\",{className:\"msp-control-group-wrapper\",style:{position:\"relative\",marginTop:this.props.noTopMargin?0:void 0}},i.createElement(\"div\",{className:\"msp-control-group-header\",style:{marginLeft:this.props.headerLeftMargin},title:this.props.title},i.createElement(f,{onClick:this.headerClicked},!this.props.hideExpander&&i.createElement(o.Icon,{svg:this.state.isExpanded?o.ArrowRightSvg:o.ArrowDropDownSvg}),this.props.topRightIcon&&i.createElement(o.Icon,{svg:this.props.topRightIcon,style:{position:\"absolute\",right:\"2px\",top:0}}),i.createElement(\"b\",null,this.props.header))),this.state.isExpanded&&i.createElement(\"div\",{className:e,style:{display:this.state.isExpanded?\"block\":\"none\",maxHeight:this.props.maxHeight,overflow:\"hidden\",overflowY:\"auto\"}},this.props.children));},t;}(i.Component);function u(e){return e;}var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.input=i.createRef(),t.delayHandle=void 0,t.pendingValue=void 0,t.state={originalValue:\"\",value:\"\"},t.onBlur=function(){t.setState({value:\"\"+t.state.originalValue}),t.props.onBlur&&t.props.onBlur();},t.raiseOnChange=function(){void 0!==t.pendingValue&&(t.props.onChange(t.pendingValue),t.pendingValue=void 0);},t.onChange=function(e){var r=e.target.value;if(t.props.isValid&&!t.props.isValid(r)||t.props.numeric&&Number.isNaN(+r))return t.clearTimeout(),void t.setState({value:r});if(t.props.numeric)t.setState({value:r},function(){return t.triggerChanged(r,+r);});else{var n=(t.props.toValue||u)(r),i=(t.props.fromValue||u)(n);t.setState({value:i},function(){return t.triggerChanged(i,n);});}},t.onKeyUp=function(e){27!==e.charCode&&27!==e.keyCode||t.props.blurOnEscape&&t.input.current&&t.input.current.blur();},t.onKeyPress=function(e){13!==e.keyCode&&13!==e.charCode||(t.isPending&&(t.clearTimeout(),t.raiseOnChange()),t.props.blurOnEnter&&t.input.current&&t.input.current.blur(),t.props.onEnter&&t.props.onEnter()),e.stopPropagation();},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"isPending\",{get:function get(){return void 0!==this.delayHandle;},enumerable:!1,configurable:!0}),t.prototype.clearTimeout=function(){this.isPending&&(clearTimeout(this.delayHandle),this.delayHandle=void 0);},t.prototype.triggerChanged=function(e,t){this.clearTimeout(),e!==this.state.originalValue&&(this.props.delayMs?(this.pendingValue=t,this.delayHandle=setTimeout(this.raiseOnChange,this.props.delayMs)):this.props.onChange(t));},t.getDerivedStateFromProps=function(e,t){var r=e.fromValue?e.fromValue(e.value):e.value;return r===t.originalValue?null:{originalValue:r,value:r};},t.prototype.render=function(){return i.createElement(\"input\",{type:\"text\",className:this.props.className,style:this.props.style,ref:this.input,onBlur:this.onBlur,value:this.state.value,placeholder:this.props.placeholder,onChange:this.onChange,onKeyPress:this.props.onEnter||this.props.blurOnEnter||this.props.blurOnEscape?this.onKeyPress:void 0,onKeyDown:this.props.blurOnEscape?this.onKeyUp:void 0,disabled:!!this.props.isDisabled});},t;}(i.PureComponent),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.label,r=e.pivot,n=e.controls;return i.createElement(i.Fragment,null,i.createElement(g,{label:i.createElement(i.Fragment,null,t,i.createElement(\"button\",{className:\"msp-btn-link msp-btn-icon msp-control-group-expander\",onClick:this.toggleExpanded,title:(this.state.isExpanded?\"Less\":\"More\")+\" options\",style:{background:\"transparent\",textAlign:\"left\",padding:\"0\"}},i.createElement(o.Icon,{svg:this.state.isExpanded?o.RemoveSvg:o.AddSvg,style:{display:\"inline-block\"}}))),control:r},this.props.colorStripe&&i.createElement(\"div\",{className:\"msp-expandable-group-color-stripe\",style:{backgroundColor:a.Color.toStyle(this.props.colorStripe)}})),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},n));},t;}(i.Component);function d(e){return i.createElement(\"div\",{className:\"msp-section-header\"+(e.accent?\" msp-transform-header-brand-\"+e.accent:\"\")},e.icon&&i.createElement(o.Icon,{svg:e.icon}),e.title,\" \",i.createElement(\"small\",null,e.desc));}function f(e){var t=\"msp-btn\";e.inline||(t+=\" msp-btn-block\"),e.noOverflow&&(t+=\" msp-no-overflow\"),e.flex&&(t+=\" msp-flex-item\"),(\"on\"===e.commit||e.commit)&&(t+=\" msp-btn-commit msp-btn-commit-on\"),\"off\"===e.commit&&(t+=\" msp-btn-commit msp-btn-commit-off\"),e.children||(t+=\" msp-btn-childless\"),e.className&&(t+=\" \"+e.className);var r=void 0;return e.flex&&(\"number\"==typeof e.flex?r={flex:\"0 0 \"+e.flex+\"px\",padding:0,maxWidth:e.flex+\"px\"}:\"string\"==typeof e.flex&&(r={flex:\"0 0 \"+e.flex,padding:0,maxWidth:e.flex})),e.style&&(r?Object.assign(r,e.style):r=e.style),i.createElement(\"button\",{onClick:e.onClick,title:e.title,disabled:e.disabled,style:r,className:t,\"data-id\":e[\"data-id\"],\"data-color\":e[\"data-color\"],onContextMenu:e.onContextMenu,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},e.icon&&i.createElement(o.Icon,{svg:e.icon}),e.children);}function p(e){var t=\"msp-btn msp-btn-icon\"+(e.small?\"-small\":\"\")+(e.className?\" \"+e.className:\"\");void 0!==e.toggleState&&(t+=\" msp-btn-link-toggle-\"+(e.toggleState?\"on\":\"off\")),e.transparent&&(t+=\" msp-transparent-bg\");var r=void 0;return e.flex&&(r=\"boolean\"==typeof e.flex?{flex:\"0 0 32px\",padding:0}:\"number\"==typeof e.flex?{flex:\"0 0 \"+e.flex+\"px\",padding:0,maxWidth:e.flex+\"px\"}:{flex:\"0 0 \"+e.flex,padding:0,maxWidth:e.flex}),e.style&&(r?Object.assign(r,e.style):r=e.style),i.createElement(\"button\",{className:t,onClick:e.onClick,title:e.title,disabled:e.disabled,\"data-id\":e[\"data-id\"],style:r},e.svg&&i.createElement(o.Icon,{svg:e.svg}),e.extraContent);}var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){e.currentTarget.blur(),t.props.toggle();},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.label,r=e.isSelected?(e.className||\"\")+\" msp-control-current\":e.className;return i.createElement(f,{icon:this.props.icon,onClick:this.onClick,title:this.props.title,disabled:e.disabled,style:e.style,className:r},t&&this.props.isSelected?i.createElement(\"b\",null,t):t);},t;}(i.PureComponent),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!!t.props.initiallyExpanded},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-control-group-header\",style:{marginTop:void 0!==this.props.marginTop?this.props.marginTop:\"1px\",marginLeft:this.props.headerLeftMargin}},i.createElement(\"button\",{className:\"msp-btn msp-form-control msp-btn-block\",onClick:this.toggleExpanded,style:this.props.headerStyle},i.createElement(o.Icon,{svg:this.state.isExpanded?o.ArrowDropDownSvg:o.ArrowRightSvg}),this.props.header)),this.state.isExpanded&&(this.props.noOffset?this.props.children:i.createElement(\"div\",{className:this.props.accent?\"msp-accent-offset\":\"msp-control-offset\"},this.props.children)));},t;}(i.PureComponent);function g(e){var t=\"msp-control-row\";return e.className&&(t+=\" \"+e.className),i.createElement(\"div\",{className:t},i.createElement(\"span\",{className:\"msp-control-row-label\",title:e.title},e.label),i.createElement(\"div\",{className:\"msp-control-row-ctrl\"},e.control),e.children);}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"c\",function(){return s;}),r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(16);function o(e){return{data:e,position:0,length:e.length,lineNumber:1,tokenStart:0,tokenEnd:0};}function s(e,t,r){for(var n=t,i=r-1,a=e.charCodeAt(n);(9===a||32===a)&&n<=i;)a=e.charCodeAt(++n);for(a=e.charCodeAt(i);(9===a||32===a)&&i>=n;)a=e.charCodeAt(--i);return e.substring(n,i+1);}!function(e){function t(e){return e.data.substring(e.tokenStart,e.tokenEnd);}function r(e){for(var t=e.data;e.position<e.length;)switch(t.charCodeAt(e.position)){case 10:return e.tokenEnd=e.position,++e.position,++e.lineNumber,!0;case 13:return e.tokenEnd=e.position,++e.position,++e.lineNumber,10===t.charCodeAt(e.position)&&++e.position,!0;default:++e.position;}return e.tokenEnd=e.position,e.tokenStart!==e.tokenEnd;}function o(e){return e.tokenStart=e.position,r(e);}function s(e,t,r){for(var i=0,a=0;a<t;a++){if(!o(e))return i;n.addUnchecked(r,e.tokenStart,e.tokenEnd),i++;}return i;}e.getTokenString=t,e.reset=function(e){e.position=0,e.lineNumber=1,e.tokenStart=0,e.tokenEnd=0;},e.eatLine=r,e.markStart=function(e){e.tokenStart=e.position;},e.markLine=o,e.readLine=function(e){return o(e),t(e);},e.markLines=function(e,t){var r=n.create(e.data,2*t);return s(e,t,r),r;},e.readLines=function(t,r){for(var n=[],i=0;i<r;i++)n.push(e.readLine(t));return n;},e.readLinesAsync=function(e,t,r,o){return void 0===o&&(o=1e5),Object(i.__awaiter)(this,void 0,void 0,function(){var u,c,l;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return u=e.length,c=n.create(e.data,2*t),l=0,[4,Object(a.c)(r,o,e,function(e,r){var n=Math.min(t-l,e);return s(r,n,c),l+=n,n;},function(e,t){return e.update({message:\"Parsing...\",current:t.position,max:u});})];case 1:return i.sent(),[2,c];}});});},e.readAllLines=function(t){for(var r=e(t),i=n.create(r.data,Math.max(t.length/80,2));o(r);)n.add(i,r.tokenStart,r.tokenEnd);return i;},e.readAllLinesAsync=function(t,r,s){return void 0===s&&(s=1e5),Object(i.__awaiter)(this,void 0,void 0,function(){var u,c;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return u=e(t),c=n.create(u.data,Math.max(t.length/80,2)),[4,Object(a.c)(r,s,u,function(e,t){return function(e,t,r){for(var i=0,a=0;a<t;a++){if(!o(e))return i;n.add(r,e.tokenStart,e.tokenEnd),i++;}}(t,e,c),t.position<t.length?e:0;},function(e,t){return e.update({message:\"Parsing...\",current:t.position,max:length});})];case 1:return i.sent(),[2,c];}});});},e.eatValue=function(e){for(;e.position<e.length;)switch(e.data.charCodeAt(e.position)){case 9:case 10:case 13:case 32:return void(e.tokenEnd=e.position);default:++e.position;}e.tokenEnd=e.position;},e.skipWhitespace=function(e){for(var t=-1;e.position<e.length;){var r=e.data.charCodeAt(e.position);switch(r){case 9:case 32:t=r,++e.position;break;case 10:13!==t&&++e.lineNumber,t=r,++e.position;break;case 13:t=r,++e.position,++e.lineNumber;break;default:return t;}}return t;},e.trim=function(e,t,r){for(var n=e.data,i=t,a=r-1,o=n.charCodeAt(i);(9===o||32===o)&&i<=a;)o=n.charCodeAt(++i);for(o=n.charCodeAt(a);(9===o||32===o)&&a>=i;)o=n.charCodeAt(--a);return e.tokenStart=i,e.tokenEnd=a+1,e.position=r,e;};}(o||(o={})),function(e){function t(e,t,r){var n=e;n.offset>n.indicesLenMinus2&&function(e){var t=new Uint32Array(1.61*e.indices.length|0);t.set(e.indices),e.indices=t,e.indicesLenMinus2=t.length-2|0;}(n),n.indices[n.offset++]=t,n.indices[n.offset++]=r,e.count++;}e.add=t,e.addToken=function(e,r){t(e,r.tokenStart,r.tokenEnd);},e.addUnchecked=function(e,t,r){e.indices[e.offset++]=t,e.indices[e.offset++]=r,e.count++;},e.create=function(e,t){return{data:e,indicesLenMinus2:(t=Math.max(10,t))-2|0,count:0,offset:0,indices:new Uint32Array(t)};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */var _n3=function n(e,t){return(_n3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);})(e,t);};function i(e,t){function r(){this.constructor=e;}_n3(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r());}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ElementSymbol\",function(){return c;}),r.d(t,\"getElementFromAtomicNumber\",function(){return d;}),r.d(t,\"PolymerTypeAtomRoleId\",function(){return f;}),r.d(t,\"ProteinBackboneAtoms\",function(){return p;}),r.d(t,\"NucleicBackboneAtoms\",function(){return m;}),r.d(t,\"DProteinComponentTypeNames\",function(){return h;}),r.d(t,\"LProteinComponentTypeNames\",function(){return g;}),r.d(t,\"GammaProteinComponentTypeNames\",function(){return v;}),r.d(t,\"BetaProteinComponentTypeNames\",function(){return b;}),r.d(t,\"ProteinTerminusComponentTypeNames\",function(){return y;}),r.d(t,\"OtherProteinComponentTypeNames\",function(){return _;}),r.d(t,\"ProteinComponentTypeNames\",function(){return S;}),r.d(t,\"DNAComponentTypeNames\",function(){return O;}),r.d(t,\"RNAComponentTypeNames\",function(){return x;}),r.d(t,\"SaccharideComponentTypeNames\",function(){return C;}),r.d(t,\"OtherComponentTypeNames\",function(){return w;}),r.d(t,\"IonComponentTypeNames\",function(){return P;}),r.d(t,\"LipidComponentTypeNames\",function(){return j;}),r.d(t,\"WaterNames\",function(){return E;}),r.d(t,\"AminoAcidNamesL\",function(){return A;}),r.d(t,\"AminoAcidNamesD\",function(){return T;}),r.d(t,\"AminoAcidNames\",function(){return D;}),r.d(t,\"RnaBaseNames\",function(){return I;}),r.d(t,\"DnaBaseNames\",function(){return M;}),r.d(t,\"PeptideBaseNames\",function(){return k;}),r.d(t,\"PurineBaseNames\",function(){return B;}),r.d(t,\"PyrimidineBaseNames\",function(){return V;}),r.d(t,\"BaseNames\",function(){return R;}),r.d(t,\"isPurineBase\",function(){return L;}),r.d(t,\"isPyrimidineBase\",function(){return N;}),r.d(t,\"PolymerNames\",function(){return F;}),r.d(t,\"getMoleculeType\",function(){return U;}),r.d(t,\"getPolymerType\",function(){return z;}),r.d(t,\"getComponentType\",function(){return H;}),r.d(t,\"getDefaultChemicalComponent\",function(){return G;}),r.d(t,\"getEntityType\",function(){return q;}),r.d(t,\"getEntitySubtype\",function(){return W;}),r.d(t,\"isPolymer\",function(){return Q;}),r.d(t,\"isNucleic\",function(){return Y;}),r.d(t,\"isProtein\",function(){return X;}),r.d(t,\"IonNames\",function(){return J;}),r.d(t,\"SecondaryStructureType\",function(){return K;}),r.d(t,\"MaxAsa\",function(){return ee;}),r.d(t,\"DefaultMaxAsa\",function(){return te;}),r.d(t,\"BondType\",function(){return $;}),r.d(t,\"ResidueHydrophobicity\",function(){return re;}),r.d(t,\"DefaultResidueHydrophobicity\",function(){return ne;});var n,i=r(207),a=r(178),o=r(90),s=new Set([\"DAPC\",\"DBPC\",\"DFPC\",\"DGPC\",\"DIPC\",\"DLPC\",\"DNPC\",\"DOPC\",\"DPPC\",\"DRPC\",\"DTPC\",\"DVPC\",\"DXPC\",\"DYPC\",\"LPPC\",\"PAPC\",\"PEPC\",\"PGPC\",\"PIPC\",\"POPC\",\"PRPC\",\"PUPC\",\"DAPE\",\"DBPE\",\"DFPE\",\"DGPE\",\"DIPE\",\"DLPE\",\"DNPE\",\"DOPE\",\"DPPE\",\"DRPE\",\"DTPE\",\"DUPE\",\"DVPE\",\"DXPE\",\"DYPE\",\"LPPE\",\"PAPE\",\"PGPE\",\"PIPE\",\"POPE\",\"PQPE\",\"PRPE\",\"PUPE\",\"DAPS\",\"DBPS\",\"DFPS\",\"DGPS\",\"DIPS\",\"DLPS\",\"DNPS\",\"DOPS\",\"DPPS\",\"DRPS\",\"DTPS\",\"DUPS\",\"DVPS\",\"DXPS\",\"DYPS\",\"LPPS\",\"PAPS\",\"PGPS\",\"PIPS\",\"POPS\",\"PQPS\",\"PRPS\",\"PUPS\",\"DAPG\",\"DBPG\",\"DFPG\",\"DGPG\",\"DIPG\",\"DLPG\",\"DNPG\",\"DOPG\",\"DPPG\",\"DRPG\",\"DTPG\",\"DVPG\",\"DXPG\",\"DYPG\",\"LPPG\",\"PAPG\",\"PGPG\",\"PIPG\",\"POPG\",\"PRPG\",\"DAPA\",\"DBPA\",\"DFPA\",\"DGPA\",\"DIPA\",\"DLPA\",\"DNPA\",\"DOPA\",\"DPPA\",\"DRPA\",\"DTPA\",\"DVPA\",\"DXPA\",\"DYPA\",\"LPPA\",\"PAPA\",\"PGPA\",\"PIPA\",\"POPA\",\"PRPA\",\"PUPA\",\"DPP\",\"DPPI\",\"PAPI\",\"PIPI\",\"POP\",\"POPI\",\"PUPI\",\"PVP\",\"PVPI\",\"PADG\",\"PIDG\",\"PODG\",\"PUDG\",\"PVDG\",\"APC\",\"CPC\",\"IPC\",\"LPC\",\"OPC\",\"PPC\",\"TPC\",\"UPC\",\"VPC\",\"BNSM\",\"DBSM\",\"DPSM\",\"DXSM\",\"PGSM\",\"PNSM\",\"POSM\",\"PVSM\",\"XNSM\",\"DPCE\",\"DXCE\",\"PNCE\",\"XNCE\"]),u=function(){for(var e=Object.create(null),t=[],r=\"A\".charCodeAt(0);r<=\"Z\".charCodeAt(0);r++)t[t.length]=String.fromCharCode(r);for(r=\"a\".charCodeAt(0);r<=\"z\".charCodeAt(0);r++)t[t.length]=String.fromCharCode(r);for(r=\"0\".charCodeAt(0);r<=\"9\".charCodeAt(0);r++)t[t.length]=String.fromCharCode(r);for(var n=0,i=t;n<i.length;n++){var a=i[n];e[a]=a.toUpperCase();for(var o=0,s=t;o<s.length;o++){var u=s[o];e[a+u]=(a+u).toUpperCase();for(var c=0,l=t;c<l.length;c++){var d=l[c];e[a+u+d]=(a+u+d).toUpperCase();}}}return e;}();function c(e){return u[e]||e.toUpperCase();}var l=new Map([[1,\"H\"],[2,\"He\"],[3,\"Li\"],[4,\"Be\"],[5,\"B\"],[6,\"C\"],[7,\"N\"],[8,\"O\"],[9,\"F\"],[10,\"Ne\"],[11,\"Na\"],[12,\"Mg\"],[13,\"Al\"],[14,\"Si\"],[15,\"P\"],[16,\"S\"],[17,\"Cl\"],[18,\"Ar\"],[19,\"K\"],[20,\"Ca\"],[21,\"Sc\"],[22,\"Ti\"],[23,\"V\"],[24,\"Cr\"],[25,\"Mn\"],[26,\"Fe\"],[27,\"Co\"],[28,\"Ni\"],[29,\"Cu\"],[30,\"Zn\"],[31,\"Ga\"],[32,\"Ge\"],[33,\"As\"],[34,\"Se\"],[35,\"Br\"],[36,\"Kr\"],[37,\"Rb\"],[38,\"Sr\"],[39,\"Y\"],[40,\"Zr\"],[41,\"Nb\"],[42,\"Mo\"],[43,\"Tc\"],[44,\"Ru\"],[45,\"Rh\"],[46,\"Pd\"],[47,\"Ag\"],[48,\"Cd\"],[49,\"In\"],[50,\"Sn\"],[51,\"Sb\"],[52,\"Te\"],[53,\"I\"],[54,\"Xe\"],[55,\"Cs\"],[56,\"Ba\"],[57,\"La\"],[58,\"Ce\"],[59,\"Pr\"],[60,\"Nd\"],[61,\"Pm\"],[62,\"Sm\"],[63,\"Eu\"],[64,\"Gd\"],[65,\"Tb\"],[66,\"Dy\"],[67,\"Ho\"],[68,\"Er\"],[69,\"Tm\"],[70,\"Yb\"],[71,\"Lu\"],[72,\"Hf\"],[73,\"Ta\"],[74,\"W\"],[75,\"Re\"],[76,\"Os\"],[77,\"Ir\"],[78,\"Pt\"],[79,\"Au\"],[80,\"Hg\"],[81,\"Tl\"],[82,\"Pb\"],[83,\"Bi\"],[84,\"Po\"],[85,\"At\"],[86,\"Rn\"],[87,\"Fr\"],[88,\"Ra\"],[89,\"Ac\"],[90,\"Th\"],[91,\"Pa\"],[92,\"U\"],[93,\"Np\"],[94,\"Pu\"],[95,\"Am\"],[96,\"Cm\"],[97,\"Bk\"],[98,\"Cf\"],[99,\"Es\"],[100,\"Fm\"],[101,\"Md\"],[102,\"No\"],[103,\"Lr\"],[104,\"Rf\"],[105,\"Db\"],[106,\"Sg\"],[107,\"Bh\"],[108,\"Hs\"],[109,\"Mt\"],[110,\"Ds\"],[111,\"Rg\"],[112,\"Cn\"],[113,\"Uut\"],[114,\"Fl\"],[115,\"Uup\"],[116,\"Lv\"],[117,\"Uus\"],[118,\"Uuo\"]].map(function(e){return[e[0],c(e[1])];}));function d(e){return l.has(e)?l.get(e):c(\"H\");}var f=((n={})[0]={trace:new Set(),directionFrom:new Set(),directionTo:new Set(),backboneStart:new Set(),backboneEnd:new Set(),coarseBackbone:new Set()},n[1]={trace:new Set([\"CA\"]),directionFrom:new Set([\"C\"]),directionTo:new Set([\"O\",\"OC1\",\"O1\",\"OX1\",\"OXT\"]),backboneStart:new Set([\"N\"]),backboneEnd:new Set([\"C\"]),coarseBackbone:new Set([\"CA\",\"BB\",\"CA1\"])},n[2]={trace:new Set([\"CA\"]),directionFrom:new Set([\"C\"]),directionTo:new Set([\"O\"]),backboneStart:new Set([\"N\"]),backboneEnd:new Set([\"CD\"]),coarseBackbone:new Set([\"CA\"])},n[3]={trace:new Set([\"CA\"]),directionFrom:new Set([\"C\"]),directionTo:new Set([\"O\"]),backboneStart:new Set([\"N\"]),backboneEnd:new Set([\"CG\"]),coarseBackbone:new Set([\"CA\"])},n[4]={trace:new Set([\"O3'\",\"O3*\"]),directionFrom:new Set([\"C4'\",\"C4*\"]),directionTo:new Set([\"C3'\",\"C3*\"]),backboneStart:new Set([\"P\"]),backboneEnd:new Set([\"O3'\",\"O3*\"]),coarseBackbone:new Set([\"P\"])},n[5]={trace:new Set([\"O3'\",\"O3*\"]),directionFrom:new Set([\"C3'\",\"C3*\"]),directionTo:new Set([\"C1'\",\"C1*\"]),backboneStart:new Set([\"P\"]),backboneEnd:new Set([\"O3'\",\"O3*\"]),coarseBackbone:new Set([\"P\"])},n[6]={trace:new Set([\"N4'\",\"N4*\"]),directionFrom:new Set([\"N4'\",\"N4*\"]),directionTo:new Set([\"C7'\",\"C7*\"]),backboneStart:new Set([\"N1'\",\"N1*\"]),backboneEnd:new Set([\"C'\",\"C*\"]),coarseBackbone:new Set([\"P\"])},n),p=new Set([\"CA\",\"C\",\"N\",\"O\",\"O1\",\"O2\",\"OC1\",\"OC2\",\"OT1\",\"OT2\",\"OX1\",\"OXT\",\"H\",\"H1\",\"H2\",\"H3\",\"HA\",\"HN\",\"HXT\",\"BB\"]),m=new Set([\"P\",\"OP1\",\"OP2\",\"HOP2\",\"HOP3\",\"O2'\",\"O3'\",\"O4'\",\"O5'\",\"C1'\",\"C2'\",\"C3'\",\"C4'\",\"C5'\",\"H1'\",\"H2'\",\"H2''\",\"HO2'\",\"H3'\",\"H4'\",\"H5'\",\"H5''\",\"HO3'\",\"HO5'\",\"O2*\",\"O3*\",\"O4*\",\"O5*\",\"C1*\",\"C2*\",\"C3*\",\"C4*\",\"C5*\"]),h=new Set([\"D-PEPTIDE LINKING\",\"D-PEPTIDE NH3 AMINO TERMINUS\",\"D-PEPTIDE COOH CARBOXY TERMINUS\",\"D-GAMMA-PEPTIDE, C-DELTA LINKING\",\"D-BETA-PEPTIDE, C-GAMMA LINKING\"]),g=new Set([\"L-PEPTIDE LINKING\",\"L-PEPTIDE NH3 AMINO TERMINUS\",\"L-PEPTIDE COOH CARBOXY TERMINUS\",\"L-GAMMA-PEPTIDE, C-DELTA LINKING\",\"L-BETA-PEPTIDE, C-GAMMA LINKING\"]),v=new Set([\"D-GAMMA-PEPTIDE, C-DELTA LINKING\",\"L-GAMMA-PEPTIDE, C-DELTA LINKING\"]),b=new Set([\"D-BETA-PEPTIDE, C-GAMMA LINKING\",\"L-BETA-PEPTIDE, C-GAMMA LINKING\"]),y=new Set([\"D-PEPTIDE NH3 AMINO TERMINUS\",\"D-PEPTIDE COOH CARBOXY TERMINUS\",\"L-PEPTIDE NH3 AMINO TERMINUS\",\"L-PEPTIDE COOH CARBOXY TERMINUS\"]),_=new Set([\"PEPTIDE LINKING\",\"PEPTIDE-LIKE\"]),S=o.a.unionMany(h,g,_),O=new Set([\"DNA LINKING\",\"L-DNA LINKING\",\"DNA OH 5 PRIME TERMINUS\",\"DNA OH 3 PRIME TERMINUS\"]),x=new Set([\"RNA LINKING\",\"L-RNA LINKING\",\"RNA OH 5 PRIME TERMINUS\",\"RNA OH 3 PRIME TERMINUS\"]),C=new Set([\"D-SACCHARIDE, BETA LINKING\",\"L-SACCHARIDE, BETA LINKING\",\"D-SACCHARIDE, ALPHA LINKING\",\"L-SACCHARIDE, ALPHA LINKING\",\"L-SACCHARIDE\",\"D-SACCHARIDE\",\"SACCHARIDE\",\"D-SACCHARIDE 1,4 AND 1,4 LINKING\",\"L-SACCHARIDE 1,4 AND 1,4 LINKING\",\"D-SACCHARIDE 1,4 AND 1,6 LINKING\",\"L-SACCHARIDE 1,4 AND 1,6 LINKING\"]),w=new Set([\"NON-POLYMER\",\"OTHER\"]),P=new Set([\"ION\"]),j=new Set([\"LIPID\"]),E=new Set([\"SOL\",\"WAT\",\"HOH\",\"H2O\",\"W\",\"DOD\",\"D3O\",\"TIP\",\"TIP3\",\"TIP4\",\"SPC\"]),A=new Set([\"HIS\",\"ARG\",\"LYS\",\"ILE\",\"PHE\",\"LEU\",\"TRP\",\"ALA\",\"MET\",\"PRO\",\"CYS\",\"ASN\",\"VAL\",\"GLY\",\"SER\",\"GLN\",\"TYR\",\"ASP\",\"GLU\",\"THR\",\"SEC\",\"PYL\",\"UNK\"]),T=new Set([\"DAL\",\"DAR\",\"DSG\",\"DAS\",\"DCY\",\"DGL\",\"DGN\",\"DHI\",\"DIL\",\"DLE\",\"DLY\",\"MED\",\"DPN\",\"DPR\",\"DSN\",\"DTH\",\"DTR\",\"DTY\",\"DVA\",\"DNE\"]),D=o.a.unionMany(A,T),I=new Set([\"A\",\"C\",\"T\",\"G\",\"I\",\"U\",\"N\"]),M=new Set([\"DA\",\"DC\",\"DT\",\"DG\",\"DI\",\"DU\",\"DN\"]),k=new Set([\"APN\",\"CPN\",\"TPN\",\"GPN\"]),B=new Set([\"A\",\"G\",\"I\",\"DA\",\"DG\",\"DI\",\"APN\",\"GPN\"]),V=new Set([\"C\",\"T\",\"U\",\"DC\",\"DT\",\"DU\",\"CPN\",\"TPN\"]),R=o.a.unionMany(I,M,k),L=function L(e){return B.has(e.toUpperCase());},N=function N(e){return V.has(e.toUpperCase());},F=o.a.unionMany(D,R);function U(e,t){return e=e.toUpperCase(),t=t.toUpperCase(),k.has(t)?8:S.has(e)?5:x.has(e)?6:O.has(e)?7:C.has(e)?9:E.has(t)?2:J.has(t)?3:s.has(t)?4:w.has(e)?a.c.has(t)?9:1:0;}function z(e,t){return e=e.toUpperCase(),5===t?v.has(e)?2:b.has(e)?3:y.has(e)?0:1:6===t?4:7===t?5:8===t?6:0;}function H(e){return e=e.toUpperCase(),D.has(e)?\"peptide linking\":I.has(e)?\"RNA linking\":M.has(e)?\"DNA linking\":a.c.has(e)?\"saccharide\":\"other\";}function G(e){return{formula:\"\",formula_weight:0,id:e,name:e,mon_nstd_flag:F.has(e)?\"y\":\"n\",pdbx_synonyms:[],type:H(e)};}function q(e){return e=e.toUpperCase(),E.has(e)?\"water\":F.has(e)?\"polymer\":a.c.has(e)?\"branched\":\"non-polymer\";}function W(e,t){return e=e.toUpperCase(),t=t.toUpperCase(),g.has(t)?\"polypeptide(L)\":h.has(t)?\"polypeptide(D)\":x.has(t)?\"polyribonucleotide\":O.has(t)?\"polydeoxyribonucleotide\":C.has(t)||a.c.has(e)?\"oligosaccharide\":k.has(e)?\"peptide nucleic acid\":A.has(e)?\"polypeptide(L)\":T.has(e)?\"polypeptide(D)\":I.has(e)?\"polyribonucleotide\":M.has(e)?\"polydeoxyribonucleotide\":P.has(t)||J.has(e)?\"ion\":j.has(t)||s.has(e)?\"lipid\":\"other\";}function Q(e){return Y(e)||X(e);}function Y(e){return 7===e||6===e||8===e;}function X(e){return 5===e;}var K,Z,J=new Set([\"118\",\"119\",\"1AL\",\"1CU\",\"2FK\",\"2HP\",\"2OF\",\"3CO\",\"3MT\",\"3NI\",\"3OF\",\"3P8\",\"4MO\",\"4PU\",\"543\",\"6MO\",\"ACT\",\"AG\",\"AL\",\"ALF\",\"AM\",\"ATH\",\"AU\",\"AU3\",\"AUC\",\"AZI\",\"BA\",\"BCT\",\"BEF\",\"BF4\",\"BO4\",\"BR\",\"BS3\",\"BSY\",\"CA\",\"CAC\",\"CD\",\"CD1\",\"CD3\",\"CD5\",\"CE\",\"CHT\",\"CL\",\"CO\",\"CO3\",\"CO5\",\"CON\",\"CR\",\"CS\",\"CSB\",\"CU\",\"CU1\",\"CU3\",\"CUA\",\"CUZ\",\"CYN\",\"DME\",\"DMI\",\"DSC\",\"DTI\",\"DY\",\"E4N\",\"EDR\",\"EMC\",\"ER3\",\"EU\",\"EU3\",\"F\",\"FE\",\"FE2\",\"FPO\",\"GA\",\"GD3\",\"GEP\",\"HAI\",\"HG\",\"HGC\",\"IN\",\"IOD\",\"IR\",\"IR3\",\"IRI\",\"IUM\",\"K\",\"KO4\",\"LA\",\"LCO\",\"LCP\",\"LI\",\"LU\",\"MAC\",\"MG\",\"MH2\",\"MH3\",\"MLI\",\"MLT\",\"MMC\",\"MN\",\"MN3\",\"MN5\",\"MN6\",\"MO1\",\"MO2\",\"MO3\",\"MO4\",\"MO5\",\"MO6\",\"MOO\",\"MOS\",\"MOW\",\"MW1\",\"MW2\",\"MW3\",\"NA\",\"NA2\",\"NA5\",\"NA6\",\"NAO\",\"NAW\",\"NCO\",\"NET\",\"NH4\",\"NI\",\"NI1\",\"NI2\",\"NI3\",\"NO2\",\"NO3\",\"NRU\",\"O4M\",\"OAA\",\"OC1\",\"OC2\",\"OC3\",\"OC4\",\"OC5\",\"OC6\",\"OC7\",\"OC8\",\"OCL\",\"OCM\",\"OCN\",\"OCO\",\"OF1\",\"OF2\",\"OF3\",\"OH\",\"OS\",\"OS4\",\"OXL\",\"PB\",\"PBM\",\"PD\",\"PDV\",\"PER\",\"PI\",\"PO3\",\"PO4\",\"PR\",\"PT\",\"PT4\",\"PTN\",\"RB\",\"RH3\",\"RHD\",\"RU\",\"SB\",\"SCN\",\"SE4\",\"SEK\",\"SM\",\"SMO\",\"SO3\",\"SO4\",\"SR\",\"T1A\",\"TB\",\"TBA\",\"TCN\",\"TEA\",\"TH\",\"THE\",\"TL\",\"TMA\",\"TRA\",\"UNX\",\"V\",\"VN3\",\"VO4\",\"W\",\"WO5\",\"Y1\",\"YB\",\"YB2\",\"YH\",\"YT3\",\"ZCM\",\"ZN\",\"ZN2\",\"ZN3\",\"ZNO\",\"ZO3\",\"OHX\"]);(Z=K||(K={})).is=i.a.has,Z.create=i.a.create,Z.SecondaryStructureMmcif={HELX_LH_27_P:1058,HELX_LH_3T_P:2082,HELX_LH_AL_P:4130,HELX_LH_A_N:524321,HELX_LH_B_N:1048609,HELX_LH_GA_P:8226,HELX_LH_N:33,HELX_LH_OM_P:16418,HELX_LH_OT_N:131105,HELX_LH_OT_P:546,HELX_LH_P:34,HELX_LH_PI_P:32802,HELX_LH_PP_P:65570,HELX_LH_Z_N:262177,HELX_N:1,HELX_OT_N:1,HELX_OT_P:2,HELX_P:2,HELX_RH_27_P:1090,HELX_RH_3T_P:2114,HELX_RH_AL_P:4162,HELX_RH_A_N:524353,HELX_RH_B_N:1048641,HELX_RH_GA_P:8258,HELX_RH_N:65,HELX_RH_OM_P:16450,HELX_RH_OT_N:131137,HELX_RH_OT_P:578,HELX_RH_P:66,HELX_RH_PI_P:32834,HELX_RH_PP_P:65602,HELX_RH_Z_N:262209,STRN:4194308,TURN_OT_P:33554448,TURN_P:16,TURN_TY1P_P:67109136,TURN_TY1_P:67109008,TURN_TY2P_P:134218e3,TURN_TY2_P:134217872,TURN_TY3P_P:268435728,TURN_TY3_P:268435600},Z.SecondaryStructurePdb={1:4162,2:16450,3:32834,4:8258,5:2114,6:4130,7:16418,8:8226,9:1026,10:65538},Z.SecondaryStructureStride={H:4098,G:2050,I:32770,E:8388612,B:4194308,T:16,C:536870912},Z.SecondaryStructureDssp={H:4098,B:4194308,E:8388612,G:2050,I:32770,T:16,S:8};var $,ee={ALA:121,ARG:265,ASN:187,ASP:187,CYS:148,GLU:214,GLN:214,GLY:97,HIS:216,ILE:195,LEU:191,LYS:230,MET:203,PHE:228,PRO:154,SER:143,THR:163,TRP:264,TYR:255,VAL:165},te=121;!function(e){function t(e){switch(e){case\"covalent\":return 1;case\"metal-coordination\":return 2;case\"hydrogen-bond\":return 4;case\"disulfide\":return 8;case\"aromatic\":return 16;case\"computed\":return 32;}}e.is=i.a.has,e.create=function(e){return i.a.create(e);},e.isCovalent=function(e){return 0!=(1&e);},e.Names={covalent:1,\"metal-coordination\":2,\"hydrogen-bond\":4,disulfide:4,aromatic:4,computed:4},e.isName=function(t){return t in e.Names;},e.fromName=t,e.fromNames=function(e){for(var r=0,n=0,i=e.length;n<i;++n)r|=t(e[n]);return r;};}($||($={}));var re={ALA:[.17,.5,.33],ARG:[.81,1.81,1],ASN:[.42,.85,.43],ASP:[1.23,3.64,2.41],ASH:[-.07,.43,.5],CYS:[-.24,-.02,.22],GLN:[.58,.77,.19],GLU:[2.02,3.63,1.61],GLH:[-.01,.11,.12],GLY:[.01,1.15,1.14],HIS:[.17,.11,-.06],ILE:[-.31,-1.12,-.81],LEU:[-.56,-1.25,-.69],LYS:[.99,2.8,1.81],MET:[-.23,-.67,-.44],PHE:[-1.13,-1.71,-.58],PRO:[.45,.14,-.31],SER:[.13,.46,.33],THR:[.14,.25,.11],TRP:[-1.85,-2.09,-.24],TYR:[-.94,-.71,.23],VAL:[.07,-.46,-.53]},ne=[0,0,0];},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"EveryLoci\",function(){return m;}),r.d(t,\"isEveryLoci\",function(){return h;}),r.d(t,\"EmptyLoci\",function(){return v;}),r.d(t,\"isEmptyLoci\",function(){return b;}),r.d(t,\"isDataLoci\",function(){return y;}),r.d(t,\"areDataLociEqual\",function(){return _;}),r.d(t,\"isDataLociEmpty\",function(){return S;}),r.d(t,\"DataLoci\",function(){return O;}),r.d(t,\"Loci\",function(){return g;});var n=r(4),i=r(159),a=r(49),o=r(11),s=r(1),u=r(27),c=r(2),l=r(5),d=r(126),f=r(41),p=r(137),m={kind:\"every-loci\"};function h(e){return!!e&&\"every-loci\"===e.kind;}var g,v={kind:\"empty-loci\"};function b(e){return!!e&&\"empty-loci\"===e.kind;}function y(e){return!!e&&\"data-loci\"===e.kind;}function _(e,t){if(!Object(l.l)(e.data,t.data)||e.tag!==t.tag)return!1;if(e.elements.length!==t.elements.length)return!1;for(var r=0,n=e.elements.length;r<n;++r)if(!Object(l.l)(e.elements[r],t.elements[r]))return!1;return!0;}function S(e){return 0===e.elements.length;}function O(e,t,r,n,i){return{kind:\"data-loci\",tag:e,data:t,elements:r,getBoundingSphere:n,getLabel:i};}!function(e){var t=new d.a(\"98\");function r(e,t){if(\"every-loci\"!==e.kind&&\"empty-loci\"!==e.kind)return t||(t=Object(o.g)()),\"structure-loci\"===e.kind?o.g.copy(t,e.structure.boundary.sphere):\"element-loci\"===e.kind?o.g.copy(t,n.StructureElement.Loci.getBoundary(e).sphere):\"bond-loci\"===e.kind?i.a.getBoundingSphere(e,t):\"shape-loci\"===e.kind?o.g.copy(t,e.shape.geometry.boundingSphere):\"group-loci\"===e.kind?a.b.getBoundingSphere(e,t):\"data-loci\"===e.kind?e.getBoundingSphere(t):\"volume-loci\"===e.kind?p.a.getBoundingSphere(e.volume,t):\"isosurface-loci\"===e.kind?p.a.Isosurface.getBoundingSphere(e.volume,e.isoValue,t):\"cell-loci\"===e.kind?p.a.Cell.getBoundingSphere(e.volume,e.indices,t):void 0;}e.getBundleBoundingSphere=function(e){var n=e.loci.map(function(e){return r(e);}).filter(function(e){return!!e;});t.reset();for(var i=0,a=n;i<a.length;i++){var o=a[i];t.includePositionRadius(o.center,o.radius);}t.finishedIncludeStep();for(var s=0,u=n;s<u.length;s++){o=u[s];t.radiusPositionRadius(o.center,o.radius);}return t.getSphere();},e.areEqual=function(e,t){return!(!h(e)||!h(t))||!(!b(e)||!b(t))||(y(e)&&y(t)?_(e,t):u.c.isLoci(e)&&u.c.isLoci(t)?u.c.areLociEqual(e,t):n.StructureElement.Loci.is(e)&&n.StructureElement.Loci.is(t)?n.StructureElement.Loci.areEqual(e,t):i.a.isLoci(e)&&i.a.isLoci(t)?i.a.areLociEqual(e,t):a.a.isLoci(e)&&a.a.isLoci(t)?a.a.areLociEqual(e,t):a.b.isLoci(e)&&a.b.isLoci(t)?a.b.areLociEqual(e,t):p.a.isLoci(e)&&p.a.isLoci(t)?p.a.areLociEqual(e,t):p.a.Isosurface.isLoci(e)&&p.a.Isosurface.isLoci(t)?p.a.Isosurface.areLociEqual(e,t):!(!p.a.Cell.isLoci(e)||!p.a.Cell.isLoci(t))&&p.a.Cell.areLociEqual(e,t));},e.isEvery=function(e){return!!e&&\"every-loci\"===e.kind;},e.isEmpty=function(e){return!h(e)&&(!!b(e)||(y(e)?S(e):u.c.isLoci(e)?u.c.isLociEmpty(e):n.StructureElement.Loci.is(e)?n.StructureElement.Loci.isEmpty(e):i.a.isLoci(e)?i.a.isLociEmpty(e):a.a.isLoci(e)?a.a.isLociEmpty(e):a.b.isLoci(e)?a.b.isLociEmpty(e):p.a.isLoci(e)?p.a.isLociEmpty(e):p.a.Isosurface.isLoci(e)?p.a.Isosurface.isLociEmpty(e):!!p.a.Cell.isLoci(e)&&p.a.Cell.isLociEmpty(e)));},e.remap=function(e,t){return t instanceof u.c&&(n.StructureElement.Loci.is(e)?e=n.StructureElement.Loci.remap(e,t):u.c.isLoci(e)?e=u.c.remapLoci(e,t):i.a.isLoci(e)&&(e=i.a.remapLoci(e,t))),e;},e.getBoundingSphere=r;var l=o.g.zero();e.getCenter=function(e,t){var n=r(e,l);return n?s.Vec3.copy(t||Object(s.Vec3)(),n.center):void 0;},e.getPrincipalAxes=function(e){if(\"every-loci\"!==e.kind&&\"empty-loci\"!==e.kind)return\"structure-loci\"===e.kind?n.StructureElement.Loci.getPrincipalAxes(u.c.toStructureElementLoci(e.structure)):\"element-loci\"===e.kind?n.StructureElement.Loci.getPrincipalAxes(e):void(\"bond-loci\"!==e.kind&&\"shape-loci\"!==e.kind&&\"group-loci\"!==e.kind&&\"data-loci\"!==e.kind&&\"volume-loci\"!==e.kind&&\"isosurface-loci\"!==e.kind&&e.kind);};var m={element:function element(e){return e;},residue:function residue(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToWholeResidues(e,!0):e;},chain:function chain(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToWholeChains(e):e;},entity:function entity(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToWholeEntities(e):e;},model:function model(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToWholeModels(e):e;},structure:function structure(e){return n.StructureElement.Loci.is(e)?u.c.toStructureElementLoci(e.structure):a.b.isLoci(e)?a.a.Loci(e.shape):e;},elementInstances:function elementInstances(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToAllInstances(e):e;},residueInstances:function residueInstances(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToAllInstances(n.StructureElement.Loci.extendToWholeResidues(e,!0)):e;},chainInstances:function chainInstances(e){return n.StructureElement.Loci.is(e)?n.StructureElement.Loci.extendToAllInstances(n.StructureElement.Loci.extendToWholeChains(e)):e;}};function g(e,t){return m[t](e);}e.GranularityOptions=c.ParamDefinition.objectToOptions(m,function(e){switch(e){case\"element\":return\"Atom/Coarse Element\";case\"elementInstances\":return[\"Atom/Coarse Element Instances\",\"With Symmetry\"];case\"structure\":return\"Structure/Shape\";default:return e.indexOf(\"Instances\")?[Object(f.d)(e),\"With Symmetry\"]:Object(f.d)(e);}}),e.applyGranularity=g,e.normalize=function(e,t){return\"element\"!==t&&i.a.isLoci(e)&&(e=i.a.toStructureElementLoci(e)),u.c.isLoci(e)&&(e=u.c.toStructureElementLoci(e.structure)),n.StructureElement.Loci.is(e)&&(e=n.StructureElement.Loci.remap(e,e.structure.root)),t&&(e=g(e,t)),e;};}(g||(g={}));},function(e,t,r){\"use strict\";r.r(t);var n=r(43);r.d(t,\"Color\",function(){return n.Color;}),r.d(t,\"ColorMap\",function(){return n.ColorMap;}),r.d(t,\"ColorTable\",function(){return n.ColorTable;});var i=r(337);r.d(t,\"ColorScale\",function(){return i.a;});},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return n.a;}),r.d(t,\"b\",function(){return a;}),r.d(t,\"e\",function(){return s;}),r.d(t,\"f\",function(){return u.a;}),r.d(t,\"g\",function(){return l;}),r.d(t,\"d\",function(){return p;}),r.d(t,\"a\",function(){return d.a;});var n=r(105);function i(){return i.zero();}!function(e){function t(){var e=[.1,0,0,0,0,0,0,0,0];return e[0]=0,e;}function r(){var e=t();return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e;}e.zero=t,e.identity=r,e.setIdentity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e;},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3],t[r+4]=e[4],t[r+5]=e[5],t[r+6]=e[6],t[r+7]=e[7],t[r+8]=e[8],t;},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],e[4]=t[r+4],e[5]=t[r+5],e[6]=t[r+6],e[7]=t[r+7],e[8]=t[r+8],e;},e.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e;},e.create=function(e,r,n,i,a,o,s,u,c){var l=t();return l[0]=e,l[1]=r,l[2]=n,l[3]=i,l[4]=a,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l;};var n=r();function i(e,t,r){for(var n=0;n<9;n++)if(Math.abs(e[n]-t[n])>r)return!1;return!0;}function a(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8];return t*(c*a-o*u)+r*(-c*i+o*s)+n*(u*i-a*s);}function o(e){return e[0]+e[4]+e[8];}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e;}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e;}e.isIdentity=function(e,t){return i(e,n,void 0===t?d.a:t);},e.hasNaN=function(e){for(var t=0;t<9;t++)if(isNaN(e[t]))return!0;return!1;},e.clone=function(t){return e.copy(e.zero(),t);},e.areEqual=i,e.setValue=function(e,t,r,n){e[3*r+t]=n;},e.getValue=function(e,t,r){return e[3*r+t];},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e;},e.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i;}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e;},e.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,m=r*d+n*f+i*p;return m?(m=1/m,e[0]=d*m,e[1]=(-l*n+i*c)*m,e[2]=(s*n-i*o)*m,e[3]=f*m,e[4]=(l*r-i*u)*m,e[5]=(-s*r+i*a)*m,e[6]=p*m,e[7]=(-c*r+n*u)*m,e[8]=(o*r-n*a)*m,e):(console.warn(\"non-invertible matrix.\",t),e);},e.symmtricFromUpper=function(e,t){return e===t?(e[3]=t[1],e[6]=t[2],e[7]=t[5]):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[1],e[4]=t[4],e[5]=t[5],e[6]=t[2],e[7]=t[5],e[8]=t[8]),e;},e.symmtricFromLower=function(e,t){return e===t?(e[1]=t[3],e[2]=t[6],e[5]=t[7]):(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[3],e[4]=t[4],e[5]=t[7],e[6]=t[6],e[7]=t[7],e[8]=t[8]),e;},e.determinant=a,e.trace=o,e.sub=s,e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e;},e.mul=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=r[0],p=r[1],m=r[2],h=r[3],g=r[4],v=r[5],b=r[6],y=r[7],_=r[8];return e[0]=f*n+p*o+m*c,e[1]=f*i+p*s+m*l,e[2]=f*a+p*u+m*d,e[3]=h*n+g*o+v*c,e[4]=h*i+g*s+v*l,e[5]=h*a+g*u+v*d,e[6]=b*n+y*o+_*c,e[7]=b*i+y*s+_*l,e[8]=b*a+y*u+_*d,e;},e.subScalar=function(e,t,r){return e[0]=t[0]-r,e[1]=t[1]-r,e[2]=t[2]-r,e[3]=t[3]-r,e[4]=t[4]-r,e[5]=t[5]-r,e[6]=t[6]-r,e[7]=t[7]-r,e[8]=t[8]-r,e;},e.addScalar=function(e,t,r){return e[0]=t[0]+r,e[1]=t[1]+r,e[2]=t[2]+r,e[3]=t[3]+r,e[4]=t[4]+r,e[5]=t[5]+r,e[6]=t[6]+r,e[7]=t[7]+r,e[8]=t[8]+r,e;},e.mulScalar=c;var l=Math.PI/3,f=e();e.symmetricEigenvalues=function(t,r){var n=r[1]*r[1]+r[2]*r[2]+r[5]*r[5];if(0===n)t[0]=r[0],t[1]=r[4],t[2]=r[8];else{var i=o(r)/3,u=r[0]-i,d=r[4]-i,p=r[8]-i,m=u*u+d*d+p*p+2*n,h=Math.sqrt(m/6);c(f,e.Identity,i),s(f,r,f),c(f,f,1/h);var g=a(f)/2,v=g<=-1?l:g>=1?0:Math.acos(g)/3;t[0]=i+2*h*Math.cos(v),t[2]=i+2*h*Math.cos(v+2*l),t[1]=3*i-t[0]-t[2];}return t;};var p=[.1,0,0],m=[.1,0,0],h=[.1,0,0],g=[.1,0,0],v=[.1,0,0],b=[.1,0,0];e.eigenvector=function(e,t,r){u.a.set(p,t[0]-r,t[1],t[2]),u.a.set(m,t[1],t[4]-r,t[5]),u.a.set(h,t[2],t[5],t[8]-r),u.a.cross(g,p,m),u.a.cross(v,p,h),u.a.cross(b,m,h);var n=u.a.dot(g,g),i=u.a.dot(v,v),a=u.a.dot(b,b),o=n,s=0;return i>o&&(o=i,s=1),a>o&&(s=2),0===s?u.a.scale(e,g,1/Math.sqrt(n)):1===s?u.a.scale(e,v,1/Math.sqrt(i)):u.a.scale(e,b,1/Math.sqrt(a)),e;},e.directionTransform=function(t,r){return e.fromMat4(t,r),e.invert(t,t),e.transpose(t,t),t;},e.Identity=r();}(i||(i={}));var a=i;function o(){return o.zero();}!function(e){function t(){var e=[.1,0];return e[0]=0,e;}e.zero=t,e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r;},e.create=function(e,r){var n=t();return n[0]=e,n[1]=r,n;},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1]);},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t;},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e;},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e;},e.set=function(e,t,r){return e[0]=t,e[1]=r,e;},e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e;},e.sub=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e;},e.mul=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e;},e.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e;},e.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e;},e.round=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e;},e.ceil=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e;},e.floor=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e;},e.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n);},e.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n;},e.magnitude=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r);},e.squaredMagnitude=function(e){var t=e[0],r=e[1];return t*t+r*r;},e.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e;},e.areEqual=function(e,t){return e[0]===t[0]&&e[1]===t[1];},e.toString=function(e,t){return\"[\"+e[0].toPrecision(t)+\" \"+e[1].toPrecision(t)+\"}]\";};}(o||(o={}));var s=o,u=r(136);function c(){return c.zero();}!function(e){function t(){var e=[.1,0,0,0];return e[0]=0,e;}function r(e,t){return e[0]=t.center[0],e[1]=t.center[1],e[2]=t.center[2],e[3]=t.radius,e;}e.zero=t,e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r;},e.create=function(e,r,n,i){var a=t();return a[0]=e,a[1]=r,a[2]=n,a[3]=i,a;},e.fromSphere=r,e.ofSphere=function(e){return r(t(),e);},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2])||isNaN(e[3]);},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3],t;},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],e;},e.toVec3Array=function(e,t,r){t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2];},e.fromVec3Array=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=0,e;},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e;},e.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e;},e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e;},e.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a);},e.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[4]=t[4]*r,e;},e.round=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e;},e.ceil=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e;},e.floor=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e;},e.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a;},e.norm=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i);},e.squaredNorm=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i;},e.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e;},e.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3];},e.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e;},e.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3];},e.equals=function(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=d.a*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=d.a*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=d.a*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=d.a*Math.max(1,Math.abs(a),Math.abs(c));},e.toString=function(e,t){return\"[\"+e[0].toPrecision(t)+\" \"+e[1].toPrecision(t)+\" \"+e[2].toPrecision(t)+\"  \"+e[3].toPrecision(t)+\"]\";};}(c||(c={}));var l=c,d=r(82);function f(){return f.zero();}!function(e){function t(){var e=[.1,0,0,0];return e[0]=0,e;}function r(){var e=t();return e[3]=1,e;}function n(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e;}function i(e,t,r,n){var i,a,o,s,u,c=t[0],l=t[1],d=t[2],f=t[3],p=r[0],m=r[1],h=r[2],g=r[3];return(a=c*p+l*m+d*h+f*g)<0&&(a=-a,p=-p,m=-m,h=-h,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,u=Math.sin(n*i)/o):(s=1-n,u=n),e[0]=s*c+u*p,e[1]=s*l+u*m,e[2]=s*d+u*h,e[3]=s*f+u*g,e;}e.zero=t,e.identity=r,e.setIdentity=function(e){e[0]=0,e[1]=0,e[2]=0,e[3]=1;},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2])||isNaN(e[3]);},e.create=function(e,t,n,i){var a=r();return a[0]=e,a[1]=t,a[2]=n,a[3]=i,a;},e.setAxisAngle=n,e.getAxisAngle=function(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return 0!==n?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r;},e.multiply=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],l=r[3];return e[0]=n*l+o*s+i*c-a*u,e[1]=i*l+o*u+a*s-n*c,e[2]=a*l+o*c+n*u-i*s,e[3]=o*l-n*s-i*u-a*c,e;},e.rotateX=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-n*s,e;},e.rotateY=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=i*u+o*s,e[2]=a*u+n*s,e[3]=o*u-i*s,e;},e.rotateZ=function(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e;},e.calculateW=function(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e;},e.slerp=i,e.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e;},e.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e;},e.fromMat3=function(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r;}return e;};var o=Object(u.a)();function s(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o),e;}e.fromUnitVec3=function(e,t,r){var n=u.a.dot(t,r)+1;return n<d.a?(n=0,Math.abs(t[0])>Math.abs(t[2])?u.a.set(o,-t[1],t[0],0):u.a.set(o,0,-t[2],t[1])):u.a.cross(o,t,r),e[0]=o[0],e[1]=o[1],e[2]=o[2],e[3]=n,s(e,e),e;},e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r;},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3],t;},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],e;},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e;},e.set=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e;},e.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e;},e.normalize=s;var c=Object(u.a)(),l=u.a.create(1,0,0),f=u.a.create(0,1,0);e.rotationTo=function(e,t,r){var i=u.a.dot(t,r);return i<-.999999?(u.a.cross(c,l,t),u.a.magnitude(c)<1e-6&&u.a.cross(c,f,t),u.a.normalize(c,c),n(e,c,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(u.a.cross(c,t,r),e[0]=c[0],e[1]=c[1],e[2]=c[2],e[3]=1+i,s(e,e));};var p=e(),m=e();e.sqlerp=function(e,t,r,n,a,o){return i(p,t,a,o),i(m,r,n,o),i(e,p,m,2*o*(1-o)),e;};var h=a();e.setAxes=function(t,r,n,i){return h[0]=n[0],h[3]=n[1],h[6]=n[2],h[1]=i[0],h[4]=i[1],h[7]=i[2],h[2]=-r[0],h[5]=-r[1],h[8]=-r[2],s(t,e.fromMat3(t,h));},e.toString=function(e,t){return\"[\"+e[0].toPrecision(t)+\" \"+e[1].toPrecision(t)+\" \"+e[2].toPrecision(t)+\"  \"+e[3].toPrecision(t)+\"]\";},e.Identity=r();}(f||(f={}));var p=f;},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PluginCommands\",function(){return i;});var n=r(95),i={State:{SetCurrentObject:Object(n.a)(),ApplyAction:Object(n.a)(),Update:Object(n.a)(),RemoveObject:Object(n.a)(),ToggleExpanded:Object(n.a)(),ToggleVisibility:Object(n.a)(),Snapshots:{Add:Object(n.a)(),Replace:Object(n.a)(),Move:Object(n.a)(),Remove:Object(n.a)(),Apply:Object(n.a)(),Clear:Object(n.a)(),Upload:Object(n.a)(),Fetch:Object(n.a)(),DownloadToFile:Object(n.a)(),OpenFile:Object(n.a)(),OpenUrl:Object(n.a)()}},Interactivity:{Object:{Highlight:Object(n.a)()},Structure:{Highlight:Object(n.a)(),Select:Object(n.a)()},ClearHighlights:Object(n.a)()},Layout:{Update:Object(n.a)()},Toast:{Show:Object(n.a)(),Hide:Object(n.a)()},Camera:{Reset:Object(n.a)(),SetSnapshot:Object(n.a)(),Focus:Object(n.a)()},Canvas3D:{SetSettings:Object(n.a)(),ResetSettings:Object(n.a)()}};},function(e,t,r){\"use strict\";r.d(t,\"d\",function(){return n.a;}),r.d(t,\"a\",function(){return s.a;}),r.d(t,\"c\",function(){return i.a;}),r.d(t,\"g\",function(){return a.a;}),r.d(t,\"f\",function(){return o.a;}),r.d(t,\"e\",function(){return u.a;}),r.d(t,\"h\",function(){return c.a;}),r.d(t,\"i\",function(){return c.b;}),r.d(t,\"b\",function(){return H;}),r.d(t,\"k\",function(){return Z;}),r.d(t,\"j\",function(){return $;});var n=r(129),i=r(112),a=r(37),o=r(239),s=r(159),u=r(168),c=r(201),l=r(62),d=r(251),f=r(0),p=r(6),m=r(279),h=l.a.Field,g={name:\"struct_conf\",instance:function instance(e){var t=S(e,\"helix\");return{fields:y,source:[{data:t,rowCount:t.length}]};}},v={name:\"struct_sheet_range\",instance:function instance(e){var t=S(e,\"sheet\").sort(b);return{fields:_,source:[{data:t,rowCount:t.length}]};}};function b(e,t){var r=e.element,n=t.element;return r.sheet_id<n.sheet_id?-1:r.sheet_id===n.sheet_id?e.start.element-t.start.element:1;}var y=Object(f.__spreadArrays)([h.str(\"conf_type_id\",function(e,t){return t[e].element.type_id;}),h.str(\"id\",function(e,t,r){return\"\"+t[e].element.type_id+(r+1);})],Object(d.b)(function(e,t){return t[e].start;},{prefix:\"beg\"}),Object(d.b)(function(e,t){return t[e].end;},{prefix:\"end\"}),[h.str(\"pdbx_PDB_helix_class\",function(e,t){return t[e].element.helix_class;}),h.str(\"details\",function(e,t){return t[e].element.details||\"\";},{valueKind:function valueKind(e,t){return t[e].element.details?0:2;}}),h.int(\"pdbx_PDB_helix_length\",function(e,t){return t[e].length;})]),_=Object(f.__spreadArrays)([h.str(\"sheet_id\",function(e,t){return t[e].element.sheet_id;}),h.index(\"id\")],Object(d.b)(function(e,t){return t[e].start;},{prefix:\"beg\"}),Object(d.b)(function(e,t){return t[e].end;},{prefix:\"end\"}),[h.str(\"symmetry\",function(e,t){return\"\";},{valueKind:function valueKind(e,t){return 2;}})]);function S(e,t){var r=m.a.Provider.get(e.firstModel);if(!r)return[];for(var i=r.key,o=r.elements,s=[],u=e.structures[0],c=0,l=u.units;c<l.length;c++){var d=l[c];if(a.a.isAtomic(d)&&d.conformation.operator.isIdentity)for(var f=d.model.atomicHierarchy.residueAtomSegments,h=p.Segmentation.transientSegments(f,d.elements),g=void 0,v=!0;h.hasNext;){v&&(g=h.move());var b=g.index,y=i[b],_=o[y];if(_.kind===t){for(var S=b;h.hasNext;)if(S=g.index,y!==i[(g=h.move()).index]){v=!1,s[s.length]={start:n.a.Location.create(u,d,f.offsets[b]),end:n.a.Location.create(u,d,f.offsets[S]),length:S-b+1,element:_};break;}}else v=!0;}}return s;}var O=r(7),x=r(90),C=r(55),w=r(9),P=r(72),j=r(31);function E(e,t){if(P.a.is(e.sourceData))return e.sourceData.data.db[t];}function A(e){return x.a.unionMany.apply(x.a,e.map(function(e){return e.uniqueResidueNames;}));}function T(e){if(0===e.length)return[];if(1===e.length)return e[0].entityIndices;for(var t=C.c.create(),r=0,n=e;r<n.length;r++)for(var i=0,a=n[r].entityIndices;i<a.length;i++){var o=a[i];C.c.add(t,o,o);}return Object(w.q)(t.array),t.array;}function D(e,t){return{name:e,instance:function instance(r){var n=r.structures;if(t&&!t(n[0]))return l.a.Category.Empty;var i=n[0].model;if(!P.a.is(i.sourceData))return l.a.Category.Empty;var a=i.sourceData.data.db[e];return a&&a._rowCount?l.a.Category.ofTable(a):l.a.Category.Empty;}};}function I(e,t,r){if(P.a.is(t.firstModel.sourceData)){var n=l.a.fields();if(e.isBinary)for(var i=0,a=r.fieldNames;i<a.length;i++){var o=M(d=a[i],r.getField(d));n.add(o);}else for(var s=function s(e){var t=r.getField(e);n.str(e,function(e){return t.str(e);});},u=0,c=r.fieldNames;u<c.length;u++){var d;s(d=c[u]);}var f=n.getFields();return{name:r.name,instance:function instance(){return{fields:f,source:[{data:void 0,rowCount:r.rowCount}]};}};}}function M(e,t){var r=Object(j.d)(t);return\"str\"===r[\"@type\"]?{name:e,type:0,value:t.str,valueKind:t.valueKind}:\"float\"===r[\"@type\"]?l.a.Field.float(e,t.float,{valueKind:t.valueKind,typedArray:Float64Array}):l.a.Field.int(e,t.int,{valueKind:t.valueKind,typedArray:Int32Array});}var k=l.a.Category,B={name:\"chem_comp\",instance:function instance(e){e.firstModel;var t=e.structures,r=e.cache,n=E(t[0].model,\"chem_comp\");if(!n)return k.Empty;var i=n.id,a=r.uniqueResidueNames||(r.uniqueResidueNames=A(t)),o=O.a.indicesOf(i,function(e){return a.has(e);});return k.ofTable(n,o);}},V={name:\"pdbx_chem_comp_identifier\",instance:function instance(e){var t=e.firstModel,r=e.structures,n=e.cache,i=E(t,\"pdbx_chem_comp_identifier\");if(!i)return k.Empty;var a=i.comp_id,o=n.uniqueResidueNames||(n.uniqueResidueNames=A(r)),s=O.a.indicesOf(a,function(e){return o.has(e);});return k.ofTable(i,s);}},R={name:\"pdbx_nonpoly_scheme\",instance:function instance(e){var t=e.firstModel,r=(e.structures,e.cache,E(t,\"pdbx_nonpoly_scheme\"));return r?k.ofTable(r):k.Empty;}},L=l.a.Category,N=z(\"struct_asym\"),F=z(\"entity_poly\"),U=z(\"entity_poly_seq\");function z(e){return{name:e,instance:function instance(t){var r=t.structures,n=t.cache;return function(e,t,r){var n=E(e[0].model,t);if(!n)return L.Empty;var i=n.entity_id,a=r.uniqueEntityIds||(r.uniqueEntityIds=function(e){if(0===e.length)return new Set();var t=e[0].model.entities.data.id;return new Set(T(e).map(function(e){return t.value(e);}));}(e)),o=O.a.indicesOf(i,function(e){return a.has(e);});return L.ofTable(n,o);}(r,e,n);}};}var H,G=r(66),q=r(325),W=l.a.Category;!function(e){e.create=function(e){var t=Array.isArray(e)?e:[e];return{structures:t,firstModel:t[0].model,cache:Object.create(null)};};}(H||(H={}));var Q={name:\"entity\",instance:function instance(e){var t=e.structures,r=T(t);return W.ofTable(t[0].model.entities.data,r);}};function Y(e){return e.units.every(function(e){return e.conformation.operator.isIdentity;});}var X,K=[D(\"entry\"),D(\"exptl\"),Q,D(\"cell\",Y),D(\"symmetry\",Y),D(\"pdbx_struct_assembly\",Y),D(\"pdbx_struct_assembly_gen\",Y),D(\"pdbx_struct_oper_list\",Y),g,v,N,F,U,D(\"pdbx_entity_branch\"),D(\"pdbx_entity_branch_link\"),D(\"pdbx_branch_scheme\"),B,V,D(\"atom_sites\"),R,d.a];!function(e){e.AtomSitePositionsFieldNames=new Set([\"id\",\"Cartn_x\",\"Cartn_y\",\"Cartn_z\"]);}(X||(X={}));var Z={onlyPositions:{includeCategory:function includeCategory(e){return\"atom_site\"===e;},includeField:function includeField(e,t){return X.AtomSitePositionsFieldNames.has(t);}}};function J(e,t,r){var n;if(!e.cifExport||0===e.cifExport.categories.length)return[];var i=e.cifExport.prefix,a=e.cifExport.categories,o=t;if(e.cifExport.context){var s=G.CustomPropertyDescriptor.getUUID(e);t.cache[s+\"__ctx\"]?o=t.cache[s+\"__ctx\"]:(o=e.cifExport.context(t)||t,t.cache[s+\"__ctx\"]=o);}for(var u=[],c=0,l=a;c<l.length;c++){var d=l[c];if(!(null===(n=null==r?void 0:r.skipCategoryNames)||void 0===n?void 0:n.has(d.name))){if(0!==d.name.indexOf(i))throw new Error(\"Custom category '\"+d.name+\"' name must start with prefix '\"+i+\".'\");u.push([d,o]);}}return u;}function $(e,t,r){var n=(Array.isArray(t)?t[0]:t).models;if(1!==n.length)throw\"Can't export stucture composed from multiple models.\";var i=(null==r?void 0:r.exportCtx)||H.create(t);(null==r?void 0:r.copyAllCategories)&&P.a.is(n[0].sourceData)?function(e,t){for(var r=new Map(),n=0,i=K;n<i.length;n++){var a=i[n];r.set(a.name,[a,t]);}var o=Object(q.b)(t);o&&r.set(o[0].name,o);for(var s=0,u=t.firstModel.customProperties.all;s<u.length;s++)for(var c=u[s],l=0,d=J(c,t);l<d.length;l++){var f=d[l];r.set(f[0].name,f);}for(var p=0,m=t.structures;p<m.length;p++){var h=m[p];if(h.hasCustomProperties)for(var g=0,v=h.customPropertyDescriptors.all;g<v.length;g++){c=v[g];for(var b=0,y=J(c,t);b<y.length;b++){f=y[b];r.set(f[0].name,f);}}}for(var _=new Set(),S=t.firstModel.sourceData.data,O=0,x=S.frame.categoryNames;O<x.length;O++){var C=x[O];if(_.add(C),r.has(C)){f=r.get(C);e.writeCategory(f[0],f[1],f[2]);}else if(S.db[C]){a=D(C);e.writeCategory(a,t);}else{(a=I(e,t,S.frame.categories[C]))&&e.writeCategory(a);}}r.forEach(function(t,r){_.has(r)||e.writeCategory(t[0],t[1],t[2]);});}(e,i):function(e,t,r){for(var n,i=0,a=K;i<a.length;i++){var o=a[i];(null==r?void 0:r.skipCategoryNames)&&(null==r?void 0:r.skipCategoryNames.has(o.name))||e.writeCategory(o,t);}if(!(null===(n=null==r?void 0:r.skipCategoryNames)||void 0===n?void 0:n.has(\"atom_site\"))&&e.isCategoryIncluded(\"atom_site\")){var s=Object(q.b)(t);s&&e.writeCategory(s[0],s[1],s[2]);}for(var u=r||{},c=0,l=t.firstModel.customProperties.all;c<l.length;c++)for(var d=l[c],f=0,p=J(d,t,u);f<p.length;f++){var m=p[f],h=(o=m[0],m[1]);e.writeCategory(o,h);}for(var g=0,v=t.structures;g<v.length;g++){var b=v[g];if(b.hasCustomProperties)for(var y=0,_=b.customPropertyDescriptors.all;y<_.length;y++){d=_[y];for(var S=0,O=J(d,t,u);S<O.length;S++){var x=O[S];o=x[0],h=x[1];e.writeCategory(o,h);}}}}(e,i,r);}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StateTransforms\",function(){return V;});var n={};r.r(n),r.d(n,\"CreateGroup\",function(){return d;});var i={};r.r(i),r.d(i,\"VolumeFromCcp4\",function(){return T;}),r.d(i,\"VolumeFromDsn6\",function(){return D;}),r.d(i,\"VolumeFromCube\",function(){return I;}),r.d(i,\"VolumeFromDx\",function(){return M;}),r.d(i,\"AssignColorVolume\",function(){return B;}),r.d(i,\"VolumeFromDensityServerCif\",function(){return k;});var a,o=r(287),s=r(13),u=r(5),c=r(2),l=r(8),d=l.b.BuiltIn({name:\"create-group\",display:{name:\"Group\"},from:[],to:l.a.Group,params:{label:c.ParamDefinition.Text(\"Group\"),description:c.ParamDefinition.Optional(c.ParamDefinition.Text(\"\"))}})({apply:function apply(e){var t=e.params;return new l.a.Group({},t);},update:function update(e){var t=e.oldParams,r=e.newParams,n=e.b;return Object(u.m)(t,r)?s.StateTransformer.UpdateResult.Unchanged:(n.label=r.label,n.description=r.description,s.StateTransformer.UpdateResult.Updated);}}),f=r(315),p=r(0),m=r(31),h=r(1),g=r(16),v=r(11),b=r(46),y=r(365),_=r(193),S=r(30),O=r(66);function x(e,t){var r=this;return g.b.create(\"Create Volume\",function(n){return Object(p.__awaiter)(r,void 0,void 0,function(){var r,n,i,o,s,u,c,l,d,f,m,g,x,C,w,P,j;return Object(p.__generator)(this,function(p){return r=e.header,n=e.values,i=h.Vec3.create(r.xLength,r.yLength,r.zLength),t&&t.voxelSize&&h.Vec3.mul(i,i,t.voxelSize),o=h.Vec3.create(Object(b.c)(r.alpha),Object(b.c)(r.beta),Object(b.c)(r.gamma)),s=r.ISPG>65536?0:r.ISPG,u=v.f.create(s||\"P 1\",i,o),c=h.Vec3.create(r.MAPC-1,r.MAPR-1,r.MAPS-1),l=h.Tensor.convertToCanonicalAxisIndicesFastToSlow(c),d=[r.NX,r.NY,r.NZ],f=l([r.NC,r.NR,r.NS]),m=function(e){return 0===e.originX&&0===e.originY&&0===e.originZ?h.Vec3.create(e.NCSTART,e.NRSTART,e.NSSTART):h.Vec3.create(e.originX/(e.xLength/e.NX),e.originY/(e.yLength/e.NY),e.originZ/(e.zLength/e.NZ));}(r),(null==t?void 0:t.offset)&&h.Vec3.add(m,m,t.offset),g=l(m),x=h.Vec3.create(g[0]/d[0],g[1]/d[1],g[2]/d[2]),C=h.Vec3.create(f[0]/d[0],f[1]/d[1],f[2]/d[2]),w=h.Tensor.Space(f,h.Tensor.invertAxisOrder(c),function(e){var t=Object(y.a)(e);switch(t){case _.a.Float32:return Float32Array;case _.a.Int8:return Int8Array;case _.a.Int16:return Int16Array;case _.a.Uint16:return Uint16Array;}throw Error(t+\" is not a supported value format.\");}(r)),P=h.Tensor.create(w,h.Tensor.Data1(n)),j=0===r.AMIN&&0===r.AMAX&&0===r.AMEAN&&0===r.ARMS,[2,{label:null==t?void 0:t.label,grid:{transform:{kind:\"spacegroup\",cell:u,fractionalBox:v.b.create(x,h.Vec3.add(h.Vec3.zero(),x,C))},cells:P,stats:{min:isNaN(r.AMIN)||j?Object(S.arrayMin)(n):r.AMIN,max:isNaN(r.AMAX)||j?Object(S.arrayMax)(n):r.AMAX,mean:isNaN(r.AMEAN)||j?Object(S.arrayMean)(n):r.AMEAN,sigma:isNaN(r.ARMS)||0===r.ARMS?Object(S.arrayRms)(n):r.ARMS}},sourceData:a.create(e),customProperties:new O.CustomProperties(),_propertyData:Object.create(null)}];});});});}!function(e){e.is=function(e){return\"ccp4\"===e.kind;},e.create=function(e){return{kind:\"ccp4\",name:e.name,data:e};};}(a||(a={}));var C,w=r(363);function P(e,t){var r=this;return g.b.create(\"Create Volume\",function(n){return Object(p.__awaiter)(r,void 0,void 0,function(){var r,n,i,a,o,s,u,c,l,d,f,m;return Object(p.__generator)(this,function(p){return r=e.header,n=e.values,i=h.Vec3.create(r.xlen,r.ylen,r.zlen),t&&t.voxelSize&&h.Vec3.mul(i,i,t.voxelSize),a=h.Vec3.create(Object(b.c)(r.alpha),Object(b.c)(r.beta),Object(b.c)(r.gamma)),o=v.f.create(\"P 1\",i,a),s=[r.xRate,r.yRate,r.zRate],u=[r.xExtent,r.yExtent,r.zExtent],c=[r.xStart,r.yStart,r.zStart],l=h.Vec3.create(c[0]/s[0],c[1]/s[1],c[2]/s[2]),d=h.Vec3.create(u[0]/s[0],u[1]/s[1],u[2]/s[2]),f=h.Tensor.Space(u,[0,1,2],Float32Array),m=h.Tensor.create(f,h.Tensor.Data1(n)),[2,{label:null==t?void 0:t.label,grid:{transform:{kind:\"spacegroup\",cell:o,fractionalBox:v.b.create(l,h.Vec3.add(h.Vec3.zero(),l,d))},cells:m,stats:{min:Object(S.arrayMin)(n),max:Object(S.arrayMax)(n),mean:Object(S.arrayMean)(n),sigma:void 0!==r.sigma?r.sigma:Object(S.arrayRms)(n)}},sourceData:C.create(e),customProperties:new O.CustomProperties(),_propertyData:Object.create(null)}];});});});}!function(e){e.is=function(e){return\"dsn6\"===e.kind;},e.create=function(e){return{kind:\"dsn6\",name:e.name,data:e};};}(C||(C={}));var j,E=r(354);function A(e,t){var r=this;return g.b.create(\"Create Volume\",function(){return Object(p.__awaiter)(r,void 0,void 0,function(){var r,n,i,a,o,s;return Object(p.__generator)(this,function(u){return r=e.header,n=e.values,i=h.Tensor.Space(r.dim,[0,1,2],Float64Array),a=h.Tensor.create(i,h.Tensor.Data1(n)),o=h.Mat4.fromTranslation(Object(h.Mat4)(),r.min),s=h.Mat4.fromScaling(Object(h.Mat4)(),r.h),h.Mat4.mul(o,o,s),[2,{label:null==t?void 0:t.label,grid:{transform:{kind:\"matrix\",matrix:o},cells:a,stats:{min:Object(S.arrayMin)(n),max:Object(S.arrayMax)(n),mean:Object(S.arrayMean)(n),sigma:Object(S.arrayRms)(n)}},sourceData:j.create(e),customProperties:new O.CustomProperties(),_propertyData:Object.create(null)}];});});});}!function(e){e.is=function(e){return\"dx\"===e.kind;},e.create=function(e){return{kind:\"dx\",name:e.name,data:e};};}(j||(j={}));var T=l.b.BuiltIn({name:\"volume-from-ccp4\",display:{name:\"Volume from CCP4/MRC/MAP\",description:\"Create Volume from CCP4/MRC/MAP data\"},from:l.a.Format.Ccp4,to:l.a.Volume.Data,params:function params(e){return{voxelSize:c.ParamDefinition.Vec3(h.Vec3.create(1,1,1)),offset:c.ParamDefinition.Vec3(h.Vec3.create(0,0,0))};}})({apply:function apply(e){var t=this,r=e.a,n=e.params;return g.b.create(\"Create volume from CCP4/MRC/MAP\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(p.__generator)(this,function(a){switch(a.label){case 0:return[4,x(r.data,Object(p.__assign)(Object(p.__assign)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=a.sent(),i={label:t.label||\"Volume\",description:\"Volume \"+r.data.header.NX+\"×\"+r.data.header.NX+\"×\"+r.data.header.NX},[2,new l.a.Volume.Data(t,i)];}});});});}}),D=l.b.BuiltIn({name:\"volume-from-dsn6\",display:{name:\"Volume from DSN6/BRIX\",description:\"Create Volume from DSN6/BRIX data\"},from:l.a.Format.Dsn6,to:l.a.Volume.Data,params:function params(e){return{voxelSize:c.ParamDefinition.Vec3(h.Vec3.create(1,1,1))};}})({apply:function apply(e){var t=this,r=e.a,n=e.params;return g.b.create(\"Create volume from DSN6/BRIX\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(p.__generator)(this,function(a){switch(a.label){case 0:return[4,P(r.data,Object(p.__assign)(Object(p.__assign)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=a.sent(),i={label:t.label||\"Volume\",description:\"Volume \"+r.data.header.xExtent+\"×\"+r.data.header.yExtent+\"×\"+r.data.header.zExtent},[2,new l.a.Volume.Data(t,i)];}});});});}}),I=l.b.BuiltIn({name:\"volume-from-cube\",display:{name:\"Volume from Cube\",description:\"Create Volume from Cube data\"},from:l.a.Format.Cube,to:l.a.Volume.Data,params:function params(e){return e?{dataIndex:c.ParamDefinition.Select(0,e.data.header.dataSetIds.map(function(e,t){return[t,\"\"+e];}))}:{dataIndex:c.ParamDefinition.Numeric(0)};}})({apply:function apply(e){var t=this,r=e.a,n=e.params;return g.b.create(\"Create volume from Cube\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(p.__generator)(this,function(a){switch(a.label){case 0:return[4,Object(E.b)(r.data,Object(p.__assign)(Object(p.__assign)({},n),{label:r.data.name||r.label})).runInContext(e)];case 1:return t=a.sent(),i={label:t.label||\"Volume\",description:\"Volume \"+r.data.header.dim[0]+\"×\"+r.data.header.dim[1]+\"×\"+r.data.header.dim[2]},[2,new l.a.Volume.Data(t,i)];}});});});}}),M=l.b.BuiltIn({name:\"volume-from-dx\",display:{name:\"Parse DX\",description:\"Create volume from DX data.\"},from:l.a.Format.Dx,to:l.a.Volume.Data})({apply:function apply(e){var t=this,r=e.a;return g.b.create(\"Parse DX\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var t,n;return Object(p.__generator)(this,function(i){switch(i.label){case 0:return console.log(r),[4,A(r.data,{label:r.data.name||r.label}).runInContext(e)];case 1:return t=i.sent(),n={label:t.label||\"Volume\",description:\"Volume \"+r.data.header.dim[0]+\"×\"+r.data.header.dim[1]+\"×\"+r.data.header.dim[2]},[2,new l.a.Volume.Data(t,n)];}});});});}}),k=l.b.BuiltIn({name:\"volume-from-density-server-cif\",display:{name:\"Volume from density-server CIF\",description:\"Identify and create all separate models in the specified CIF data block\"},from:l.a.Format.Cif,to:l.a.Volume.Data,params:function params(e){if(!e)return{blockHeader:c.ParamDefinition.Optional(c.ParamDefinition.Text(void 0,{description:\"Header of the block to parse. If none is specifed, the 1st data block in the file is used.\"}))};var t=e.data.blocks.slice(1);return{blockHeader:c.ParamDefinition.Optional(c.ParamDefinition.Select(t[0]&&t[0].header,t.map(function(e){return[e.header,e.header];}),{description:\"Header of the block to parse\"}))};}})({isApplicable:function isApplicable(e){return e.data.blocks.length>0;},apply:function apply(e){var t=this,r=e.a,n=e.params;return g.b.create(\"Parse density-server CIF\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var t,i,a,o,s,u,c,d,f;return Object(p.__generator)(this,function(p){switch(p.label){case 0:if(t=n.blockHeader||r.data.blocks[1].header,!(i=r.data.blocks.find(function(e){return e.header===t;})))throw new Error(\"Data block '\"+[t]+\"' not found.\");return a=m.a.schema.densityServer(i),[4,Object(w.a)(a).runInContext(e)];case 1:return o=p.sent(),s=o.grid.cells.space.dimensions,u=s[0],c=s[1],d=s[2],f={label:a.volume_data_3d_info.name.value(0),description:\"Volume \"+u+\"×\"+c+\"×\"+d},[2,new l.a.Volume.Data(o,f)];}});});});}}),B=l.b.BuiltIn({name:\"assign-color-volume\",display:{name:\"Assign Color Volume\",description:\"Assigns another volume to be available for coloring.\"},from:l.a.Volume.Data,to:l.a.Volume.Data,isDecorator:!0,params:function params(e,t){if(!e)return{ref:c.ParamDefinition.Text()};var r=t.state.data.select(s.StateSelection.Generators.root.subtree().ofType(l.a.Volume.Data).filter(function(t){var r;return!!t.obj&&!(null===(r=t.obj)||void 0===r?void 0:r.data.colorVolume)&&t.obj!==e;}));return 0===r.length?{ref:c.ParamDefinition.Text(\"\",{isHidden:!0})}:{ref:c.ParamDefinition.Select(r[0].transform.ref,r.map(function(e){return[e.transform.ref,e.obj.label];}))};}})({apply:function apply(e){var t=this,r=e.a,n=e.params,i=e.dependencies;return g.b.create(\"Assign Color Volume\",function(e){return Object(p.__awaiter)(t,void 0,void 0,function(){var e,t,a;return Object(p.__generator)(this,function(o){if(!i||!i[n.ref])throw new Error(\"Dependency not available.\");return e=i[n.ref].data,t=Object(p.__assign)(Object(p.__assign)({},r.data),{colorVolume:e}),a={label:r.label,description:\"Volume + Colors\"},[2,new l.a.Volume.Data(t,a)];});});});}}),V={Data:o,Misc:n,Model:f,Volume:i,Representation:r(198)};},function(e,t,r){\"use strict\";r.d(t,\"i\",function(){return i;}),r.d(t,\"h\",function(){return a;}),r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return s;}),r.d(t,\"e\",function(){return u;}),r.d(t,\"c\",function(){return c;}),r.d(t,\"d\",function(){return l;}),r.d(t,\"f\",function(){return d;}),r.d(t,\"g\",function(){return f;});var n=r(22);r(6);function i(e,t){return e.model.atomicHierarchy.atoms.type_symbol.value(e.elements[t]);}function a(e,t){return e.model.atomicHierarchy.atoms.pdbx_formal_charge.value(e.elements[t]);}function o(e,t){return e.model.atomicHierarchy.atoms.label_atom_id.value(e.elements[t]);}function s(e,t){return e.model.atomicHierarchy.atoms.label_alt_id.value(e.elements[t]);}function u(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(e.elements[t]);}function c(e,t,r){return function(e,t,r){for(var i=0,a=e.interUnitBonds.getEdgeIndices(r,t),o=0,s=a.length;o<s;++o){var u=e.interUnitBonds.edges[a[o]];n.BondType.isCovalent(u.props.flag)&&(i+=1);}return i;}(e,t,r)+function(e,t){for(var r=0,i=e.bonds,a=i.offset,o=i.edgeProps.flags,s=a[t],u=a[t+1];s<u;++s)n.BondType.isCovalent(o[s])&&(r+=1);return r;}(t,r);}function l(e,t,r,n){var a=0;return f(e,t,r,function(e,t){i(e,t)===n&&(a+=1);}),a;}function d(e,t,r,i,a){return t===i?function(e,t,r){var i=e.bonds,a=i.offset,o=i.b,s=i.edgeProps.flags;n.BondType.is;for(var u=a[t],c=a[t+1];u<c;++u)if(o[u]===r&&n.BondType.isCovalent(s[u]))return!0;return!1;}(t,r,a):function(e,t,r,i,a){var o=e.interUnitBonds.getEdge(r,t,a,i);return o&&n.BondType.isCovalent(o.props.flag);}(e,t,r,i,a);}function f(e,t,r,i){!function(e,t,r,i){for(var a=e.interUnitBonds.getEdgeIndices(r,t),o=0,s=a.length;o<s;++o){var u=e.interUnitBonds.edges[a[o]];n.BondType.isCovalent(u.props.flag)&&i(u.unitB,u.indexB);}}(e,t,r,i),function(e,t,r){for(var i=e.bonds,a=i.offset,o=i.b,s=i.edgeProps.flags,u=a[t],c=a[t+1];u<c;++u)n.BondType.isCovalent(s[u])&&r(e,o[u]);}(t,r,i);}},function(e,t,r){\"use strict\";function n(e){for(var t=-1/0,r=0,n=e.length;r<n;++r)e[r]>t&&(t=e[r]);return t;}function i(e){for(var t=1/0,r=0,n=e.length;r<n;++r)e[r]<t&&(t=e[r]);return t;}function a(e){for(var t=1/0,r=-1/0,n=0,i=e.length;n<i;++n)e[n]<t&&(t=e[n]),e[n]>r&&(r=e[n]);return[t,r];}function o(e,t,r){void 0===t&&(t=1),void 0===r&&(r=0);for(var n=e.length,i=0,a=r;a<n;a+=t)i+=e[a];return i;}function s(e,t,r){return void 0===t&&(t=1),void 0===r&&(r=0),o(e,t,r)/(e.length/t);}function u(e){for(var t=e.length,r=0,n=0;n<t;++n){var i=e[n];r+=i*i;}return Math.sqrt(r/t);}function c(e,t){for(var r=0,n=t?Math.min(t,e.length):e.length;r<n;++r)e[r]=r;return e;}function l(e,t){for(var r=0,n=e.length,i=!1;r<n;r++)if(e[r]===t){i=!0;break;}return!!i&&(d(e,r),!0);}function d(e,t){for(var r=t,n=e.length-1;r<n;r++)e[r]=e[r+1];e.pop();}function f(e,t){return!(e.indexOf(t)>=0)&&(e.push(t),!0);}function p(e,t){var r=e.indexOf(t);if(r<0)return!1;for(var n=r,i=e.length-1;n<i;n++)e[n]=e[n+1];return e.pop(),!0;}function m(e,t){if(!e||0===e.length)return!t||0===t.length;if(!t)return!1;var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0;}function h(e){for(var t=0,r=e.length;t<r;t++)if(e[t]!==t)return!1;return!0;}r.r(t),r.d(t,\"arrayMax\",function(){return n;}),r.d(t,\"arrayMin\",function(){return i;}),r.d(t,\"arrayMinMax\",function(){return a;}),r.d(t,\"arraySum\",function(){return o;}),r.d(t,\"arrayMean\",function(){return s;}),r.d(t,\"arrayRms\",function(){return u;}),r.d(t,\"fillSerial\",function(){return c;}),r.d(t,\"arrayRemoveInPlace\",function(){return l;}),r.d(t,\"arrayRemoveAtInPlace\",function(){return d;}),r.d(t,\"arraySetAdd\",function(){return f;}),r.d(t,\"arraySetRemove\",function(){return p;}),r.d(t,\"arrayEqual\",function(){return m;}),r.d(t,\"arrayIsIdentity\",function(){return h;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return fe;}),r.d(t,\"b\",function(){return i.b;}),r.d(t,\"c\",function(){return i.c;}),r.d(t,\"d\",function(){return i.f;});var n=r(0),i=r(128),a=r(20),o=r(65),s=r(16);function u(e){for(;e.position<e.length;)switch(e.data.charCodeAt(e.position)){case 9:case 10:case 13:case 32:return void(e.tokenEnd=e.position);default:++e.position;}e.tokenEnd=e.position;}function c(e){return!(e.length-e.position<2)&&39===e.data.charCodeAt(e.position+1)&&39===e.data.charCodeAt(e.position+2);}function l(e,t,r){var n,i=r-t,a=e.tokenStart-t,o=e.tokenEnd-e.tokenStart;if(o<i)return!1;for(n=t;n<r;++n)if(e.data.charCodeAt(n)!==e.data.charCodeAt(n+a))return!1;return i===o||46===e.data.charCodeAt(n+a);}function d(e){var t;for(t=e.tokenStart;t<e.tokenEnd;++t)if(46===e.data.charCodeAt(t))return t;return t;}function f(e,t){return e.data.substring(e.tokenStart,t);}function p(e){return e.data.substring(e.tokenStart,e.tokenEnd);}function m(e){var t=function(e){for(var t=10;e.position<e.length;){var r=e.data.charCodeAt(e.position);switch(r){case 9:case 32:t=r,++e.position;break;case 10:13!==t&&++e.lineNumber,t=r,++e.position;break;case 13:t=r,++e.position,++e.lineNumber;break;default:return t;}}return t;}(e);if(e.position>=e.length)e.tokenType=6;else{e.tokenStart=e.position,e.tokenEnd=e.position,e.isEscaped=!1;var r=e.data.charCodeAt(e.position);switch(r){case 35:!function(e){for(;e.position<e.length;){var t=e.data.charCodeAt(e.position);if(10===t||13===t)return;++e.position;}}(e),e.tokenType=5;break;case 39:if(c(e)){!function(e){for(e.position+=3;e.position<e.length;){if(39===e.data.charCodeAt(e.position)&&c(e))return e.tokenStart+=3,e.tokenEnd=e.position,e.isEscaped=!0,void(e.position+=3);++e.position;}e.tokenEnd=e.position;}(e),e.tokenType=3;break;}case 34:!function(e,t){var r,n;for(++e.position;e.position<e.length;)if((n=e.data.charCodeAt(e.position))===t)switch(r=e.data.charCodeAt(e.position+1)){case 9:case 10:case 13:case 32:return e.tokenStart++,e.tokenEnd=e.position,e.isEscaped=!0,void++e.position;default:if(void 0===r)return e.tokenStart++,e.tokenEnd=e.position,e.isEscaped=!0,void++e.position;++e.position;}else{if(10===n||13===n)return void(e.tokenEnd=e.position);++e.position;}e.tokenEnd=e.position;}(e,r),e.tokenType=3;break;case 59:10===t||13===t?function(e){for(var t,r=59,n=e.position+1;n<e.length;){if(59===(t=e.data.charCodeAt(n))&&(10===r||13===r)){for(e.position=n+1,e.tokenStart++,n--,t=e.data.charCodeAt(n);10===t||13===t;)n--,t=e.data.charCodeAt(n);return e.tokenEnd=n+1,void(e.isEscaped=!0);}(13===t||10===t&&13!==r)&&e.lineNumber++,r=t,++n;}e.position=n;}(e):u(e),e.tokenType=3;break;default:e.isImportGet?function(e){for(;e.position<e.length;)switch(e.data.charCodeAt(e.position)){case 93:return++e.position,e.tokenEnd=e.position,void(e.isImportGet=!1);default:++e.position;}}(e):u(e),e.isEscaped?e.tokenType=3:95===e.data.charCodeAt(e.tokenStart)?(e.inSaveFrame&&function(e){return e.tokenEnd-e.tokenStart==11&&105===e.data.charCodeAt(e.tokenStart+1)&&109===e.data.charCodeAt(e.tokenStart+2)&&112===e.data.charCodeAt(e.tokenStart+3)&&111===e.data.charCodeAt(e.tokenStart+4)&&114===e.data.charCodeAt(e.tokenStart+5)&&116===e.data.charCodeAt(e.tokenStart+6)&&46===e.data.charCodeAt(e.tokenStart+7)&&103===e.data.charCodeAt(e.tokenStart+8)&&101===e.data.charCodeAt(e.tokenStart+9)&&116===e.data.charCodeAt(e.tokenStart+10);}(e)&&(e.isImportGet=!0),e.tokenType=4):e.tokenEnd-e.tokenStart>=5&&95===e.data.charCodeAt(e.tokenStart+4)?!function(e){var t=e.data.charCodeAt(e.tokenStart);return(68===t||100===t)&&(65===(t=e.data.charCodeAt(e.tokenStart+1))||97===t)&&(84===(t=e.data.charCodeAt(e.tokenStart+2))||116===t)&&(65===(t=e.data.charCodeAt(e.tokenStart+3))||97===t);}(e)?!function(e){var t=e.data.charCodeAt(e.tokenStart);return(83===t||115===t)&&(65===(t=e.data.charCodeAt(e.tokenStart+1))||97===t)&&(86===(t=e.data.charCodeAt(e.tokenStart+2))||118===t)&&(69===(t=e.data.charCodeAt(e.tokenStart+3))||101===t);}(e)?!function(e){if(e.tokenEnd-e.tokenStart!=5)return!1;var t=e.data.charCodeAt(e.tokenStart);return(76===t||108===t)&&(79===(t=e.data.charCodeAt(e.tokenStart+1))||111===t)&&(79===(t=e.data.charCodeAt(e.tokenStart+2))||111===t)&&(80===(t=e.data.charCodeAt(e.tokenStart+3))||112===t);}(e)?e.tokenType=3:e.tokenType=2:e.tokenType=1:e.tokenType=0:e.tokenType=3;}}}function h(e){for(m(e);5===e.tokenType;)m(e);}function g(){return{categoryNames:[],categoryData:Object.create(null)};}function v(e,t){for(var r=Object.create(null),n=0,a=e;n<a.length;n++){var o=a[n],s=t[o];r[o]=i.b(s.name,s.rowCount,s.fieldNames,s.fields);}return r;}function b(e,t,r){return i.a(e.categoryNames,v(e.categoryNames,e.categoryData),t,r);}function y(e,t,r,n,i){var a;if(t in e.categoryData){var o=e.categoryData[t];(a=o.fieldNames).push.apply(a,n),Object.assign(o.fields,i);}else e.categoryData[t]={name:t,rowCount:r,fieldNames:n,fields:i},e.categoryNames.push(t);}function _(e,t){for(var r=t.tokenizer,n=t.tokens,i=t.fieldCount,o=t.tokenCount,s=0;3===r.tokenType&&s<e;)a.a.add(n[o++%i],r.tokenStart,r.tokenEnd),h(r),s++;return t.tokenCount=o,s;}function S(e,t){return e.update({message:\"Parsing...\",current:t.tokenizer.position,max:t.tokenizer.data.length});}function O(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,o,u,c,l,m,g,v,b,O,x;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(r=e.lineNumber,h(e),o=f(e,d(e)),u=function(e){var t;for(t=e.tokenStart;t<e.tokenEnd;++t)if(46===e.data.charCodeAt(t))return!1;return!0;}(e),c=[];4===e.tokenType;)c[c.length]=u?p(e):p(e).substring(o.length+1),h(e);for(l=\"_atom_site\"===o?e.data.length/100|0:32,m=[],g=c.length,x=0;x<g;x++)m[x]=a.a.create(e.data,l);return v={fieldCount:g,tokenCount:0,tokenizer:e,tokens:m},[4,Object(s.c)(e.runtimeCtx,1e6,v,_,S)];case 1:if(n.sent(),v.tokenCount%g!=0)return[2,{hasError:!0,errorLine:e.lineNumber,errorMessage:\"The number of values for loop starting at line \"+r+\" is not a multiple of the number of columns.\"}];if(b=v.tokenCount/g|0,u)for(x=0;x<g;x++)O={\"\":i.c.ofTokens(m[x])},y(t,c[x].substr(1),b,[\"\"],O);else{for(O=Object.create(null),x=0;x<g;x++)O[c[x]]=i.c.ofTokens(m[x]);y(t,o.substr(1),b,c,O);}return[2,{hasError:!1,errorLine:0,errorMessage:\"\"}];}});});}function x(e,t){return o.a.error(t,e);}function C(e){return o.a.success(e);}function w(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,o,s,u,c,m,_,S,w,P;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=[],o=function(e,t){return{data:e,length:e.length,position:0,tokenStart:0,tokenEnd:0,tokenType:6,lineNumber:1,isEscaped:!1,isImportGet:!1,inSaveFrame:!1,runtimeCtx:t};}(e,t),s=\"\",u=g(),c=[],m=g(),_=i.e(m.categoryNames,v(m.categoryNames,m.categoryData),\"\"),S=\"\",t.update({message:\"Parsing...\",current:0,max:e.length}),h(o),n.label=1;case 1:return 6===o.tokenType?[3,7]:0!==(w=o.tokenType)?[3,2]:o.inSaveFrame?[2,x(o.lineNumber,\"Unexpected data block inside a save frame.\")]:(u.categoryNames.length>0&&r.push(b(u,s,c)),s=e.substring(o.tokenStart+5,o.tokenEnd),u=g(),c=[],h(o),[3,6]);case 2:if(1!==w)return[3,3];if(o.tokenEnd-o.tokenStart==5)m.categoryNames.length>0&&(c[c.length]=(j=m,E=S,i.a(j.categoryNames,v(j.categoryNames,j.categoryData),E))),o.inSaveFrame=!1;else{if(o.inSaveFrame)return[2,x(o.lineNumber,\"Save frames cannot be nested.\")];o.inSaveFrame=!0,S=e.substring(o.tokenStart+5,o.tokenEnd),m=g();}return h(o),[3,6];case 3:return 2!==w?[3,5]:[4,O(o,o.inSaveFrame?m:u)];case 4:return(P=n.sent()).hasError?[2,x(P.errorLine,P.errorMessage)]:[3,6];case 5:if(4!==w)return console.log(o.tokenType,a.b.getTokenString(o)),[2,x(o.lineNumber,\"Unexpected token. Expected data_, loop_, or data name.\")];if((P=function(e,t){for(var r=e.tokenStart,n=d(e),a=f(e,n),o=Object.create(null),s=[],u=!0;u;){if(4!==e.tokenType||!l(e,r,n)){u=!1;break;}var c=p(e).substring(a.length+1);if(h(e),3!==e.tokenType)return{hasError:!0,errorLine:e.lineNumber,errorMessage:\"Expected value.\"};o[c]=i.c.ofTokens({data:e.data,indices:[e.tokenStart,e.tokenEnd],count:1}),s[s.length]=c,h(e);}return y(t,a.substr(1),1,s,o),{hasError:!1,errorLine:0,errorMessage:\"\"};}(o,o.inSaveFrame?m:u)).hasError)return[2,x(P.errorLine,P.errorMessage)];n.label=6;case 6:return[3,1];case 7:return o.inSaveFrame?[2,x(o.lineNumber,\"Unfinished save frame (\"+_.header+\").\")]:((u.categoryNames.length>0||c.length>0)&&r.push(b(u,s,c)),[2,C(i.d(r))]);}var j,E;});});}function P(e){var t=this;return s.b.create(\"Parse CIF\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,w(e,r)];case 1:return[2,t.sent()];}});});});}var j=r(7),E=r(121),A=r(97);var T=r(357);function D(e){for(var t=Object.create(null),r=Object.create(null),n=0,i=e.columns;n<i.length;n++){var a=i[n];t[a.name]=a;}return{rowCount:e.rowCount,name:e.name.substr(1),fieldNames:e.columns.map(function(e){return e.name;}),getField:function getField(e){var n=t[e];if(n)return r[e]||(r[e]=function(e){var t=e.mask?Object(E.d)(e.mask):void 0,r=Object(E.d)(e.data),n=j.b.isTypedArray(r),i=n?t?function(e){return 0===t[e]?\"\"+r[e]:\"\";}:function(e){return\"\"+r[e];}:t?function(e){return 0===t[e]?r[e]:\"\";}:function(e){return r[e];},a=n?function(e){return r[e];}:function(e){var t=r[e];return Object(A.d)(t,0,t.length);},o=n?function(e){return r[e];}:function(e){var t=r[e];return Object(A.b)(t,0,t.length);},s=t?function(e){return t[e];}:function(e){return 0;},u=r.length;return{__array:r,binaryEncoding:e.data.encoding,isDefined:!0,rowCount:u,str:i,int:a,float:o,valueKind:s,areValuesEqual:function areValuesEqual(e,t){return r[e]===r[t];},toStringArray:function toStringArray(e){return j.b.createAndFillArray(u,i,e);},toIntArray:n?function(e){return j.b.typedArrayWindow(r,e);}:function(e){return j.b.createAndFillArray(u,a,e);},toFloatArray:n?function(e){return j.b.typedArrayWindow(r,e);}:function(e){return j.b.createAndFillArray(u,o,e);}};}(n)),r[e];}};}function I(e){var t=this;return s.b.create(\"Parse BinaryCIF\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r,a;return Object(n.__generator)(this,function(n){t=[0,3];try{return r=Object(T.a)(e),function(e,t){for(var r=0;r<2;r++)if(e[r]>t[r])return!1;return!0;}(t,r.version.match(/(\\d)\\.(\\d)\\.\\d/).slice(1).map(function(e){return+e;}))?(a=i.d(r.dataBlocks.map(function(e){for(var t=Object.create(null),r=0,n=e.categories;r<n.length;r++){var a=n[r];t[a.name.substr(1)]=D(a);}return i.a(e.categories.map(function(e){return e.name.substr(1);}),t,e.header);})),[2,o.a.success(a)]):[2,o.a.error(\"Unsupported format version. Current \"+r.version+\", required \"+t.join(\".\")+\".\")];}catch(e){return[2,o.a.error(\"\"+e)];}return[2];});});});}var M=r(148),k=r(57),B=j.a.Schema,V=B.str,R=B.float,L=B.List,N=B.Aliased,F=B.int,U=B.coord,z={chem_comp:{formula:V,formula_weight:R,id:V,mon_nstd_parent_comp_id:L(\",\",function(e){return e;}),name:V,one_letter_code:V,three_letter_code:V,type:N(V),pdbx_synonyms:L(\";\",function(e){return e;}),pdbx_type:V,pdbx_ambiguous_flag:V,pdbx_replaced_by:V,pdbx_replaces:V,pdbx_formal_charge:F,pdbx_model_coordinates_details:V,pdbx_model_coordinates_db_code:V,pdbx_ideal_coordinates_details:V,pdbx_ideal_coordinates_missing_flag:N(V),pdbx_model_coordinates_missing_flag:N(V),pdbx_initial_date:V,pdbx_modified_date:V,pdbx_release_status:N(V),pdbx_processing_site:N(V)},chem_comp_atom:{alt_atom_id:V,atom_id:V,charge:F,model_Cartn_x:U,model_Cartn_y:U,model_Cartn_z:U,comp_id:V,type_symbol:V,pdbx_align:F,pdbx_ordinal:F,pdbx_model_Cartn_x_ideal:U,pdbx_model_Cartn_y_ideal:U,pdbx_model_Cartn_z_ideal:U,pdbx_stereo_config:N(V),pdbx_aromatic_flag:N(V),pdbx_leaving_atom_flag:N(V)},chem_comp_bond:{atom_id_1:V,atom_id_2:V,comp_id:V,value_order:N(V),pdbx_ordinal:F,pdbx_stereo_config:N(V),pdbx_aromatic_flag:N(V)},pdbx_chem_comp_descriptor:{comp_id:V,descriptor:V,type:N(V),program:V,program_version:V},pdbx_chem_comp_identifier:{comp_id:V,identifier:V,type:N(V),program:V,program_version:V}},H=j.a.Schema,G=H.str,q=H.float,W=H.Aliased,Q=H.int,Y={pdbx_reference_molecule:{prd_id:G,formula_weight:q,formula:G,type:W(G),type_evidence_code:G,class:W(G),class_evidence_code:G,name:G,represent_as:W(G),chem_comp_id:G,compound_details:G,description:G,representative_PDB_id_code:G,release_status:W(G),replaces:G,replaced_by:G},pdbx_reference_entity_list:{prd_id:G,ref_entity_id:G,type:W(G),details:G,component_id:Q},pdbx_reference_entity_nonpoly:{prd_id:G,ref_entity_id:G,name:G,chem_comp_id:G},pdbx_reference_entity_link:{link_id:Q,prd_id:G,details:G,ref_entity_id_1:G,ref_entity_id_2:G,entity_seq_num_1:Q,entity_seq_num_2:Q,comp_id_1:G,comp_id_2:G,atom_id_1:G,atom_id_2:G,value_order:W(G),component_1:Q,component_2:Q,link_class:W(G)},pdbx_reference_entity_poly_link:{link_id:Q,prd_id:G,ref_entity_id:G,component_id:Q,entity_seq_num_1:Q,entity_seq_num_2:Q,comp_id_1:G,comp_id_2:G,atom_id_1:G,atom_id_2:G,value_order:W(G)},pdbx_reference_entity_poly:{prd_id:G,ref_entity_id:G,type:W(G),db_code:G,db_name:G},pdbx_reference_entity_poly_seq:{prd_id:G,ref_entity_id:G,mon_id:G,parent_mon_id:G,num:Q,observed:W(G),hetero:W(G)},pdbx_reference_entity_sequence:{prd_id:G,ref_entity_id:G,type:W(G),NRP_flag:W(G),one_letter_codes:G},pdbx_reference_entity_src_nat:{prd_id:G,ref_entity_id:G,ordinal:Q,organism_scientific:G,taxid:G,db_code:G,db_name:G},pdbx_prd_audit:{prd_id:G,date:G,processing_site:W(G),action_type:W(G)}},X=j.a.Schema,K=X.str,Z={datablock:{id:K,description:K},dictionary:{title:K,datablock_id:K,version:K},dictionary_history:{version:K,update:K,revision:K},sub_category:{id:K,description:K},category_group_list:{id:K,parent_id:K,description:K},item_type_list:{code:K,primitive_code:K,construct:K,detail:K},item_units_list:{code:K,detail:K},item_units_conversion:{from_code:K,to_code:K,operator:K,factor:X.float}},J=j.a.Schema,$=J.str,ee=J.int,te=J.float,re=J.Aliased,ne=J.Vector,ie=(re($),re($),re($),re($),ne(3),ne(3),{volume_data_3d_info:{name:$,axis_order:ne(3,ee),origin:ne(3),dimensions:ne(3),sample_rate:ee,sample_count:ne(3,ee),spacegroup_number:ee,spacegroup_cell_size:ne(3),spacegroup_cell_angles:ne(3),mean_source:te,mean_sampled:te,sigma_source:te,sigma_sampled:te,min_source:te,min_sampled:te,max_source:te,max_sampled:te},volume_data_3d:{values:te}}),ae=j.a.Schema,oe=ae.int,se=ae.float,ue=ae.str,ce=ae.Matrix,le={cell:{formula_units_Z:oe,volume:se,angle_alpha:se,angle_beta:se,angle_gamma:se,length_a:se,length_b:se,length_c:se},chemical:{melting_point:se,name_common:ue,name_systematic:ue},chemical_formula:{moiety:ue,sum:ue,weight:se},space_group:{crystal_system:ue,IT_number:oe,\"name_H-M_full\":ue},space_group_symop:{operation_xyz:ue},geom_bond:{atom_site_label_1:ue,atom_site_label_2:ue,distance:se,publ_flag:ue,site_symmetry_1:ue,site_symmetry_2:ue,valence:se},audit:{block_doi:ue},database_code:{COD:ue,CSD:ue,depnum_ccdc_archive:ue,depnum_ccdc_fiz:ue,ICSD:ue,MDF:ue,NBS:ue},atom_site:{adp_type:ue,calc_flag:ue,disorder_assembly:ue,disorder_group:ue,fract_x:se,fract_y:se,fract_z:se,label:ue,occupancy:se,refinement_flags:ue,site_symmetry_multiplicity:oe,type_symbol:ue,U_iso_or_equiv:se},atom_site_aniso:{label:ue,U_11:se,U:ce(3,3),U_11_su:se,U_su:ce(3,3),U_12:se,U_12_su:se,U_13:se,U_13_su:se,U_22:se,U_22_su:se,U_23:se,U_23_su:se,U_33:se,U_33_su:se},atom_type:{description:ue,symbol:ue},atom_type_scat:{dispersion_imag:se,dispersion_real:se,source:ue}},de={\"atom_site_aniso.U\":[\"atom_site_anisotrop_U\"],\"atom_site_aniso.U_su\":[\"atom_site_aniso_U_esd\",\"atom_site_anisotrop_U_esd\"],\"space_group.IT_number\":[\"symmetry_Int_Tables_number\"],\"space_group.name_H-M_full\":[\"symmetry_space_group_name_H-M\"],\"space_group_symop.operation_xyz\":[\"symmetry_equiv_pos_as_xyz\"],\"geom_bond.atom_site_label_1\":[\"geom_bond_atom_site_id_1\"],\"geom_bond.atom_site_label_2\":[\"geom_bond_atom_site_id_2\"],\"geom_bond.distance\":[\"geom_bond_dist\"],\"atom_site.adp_type\":[\"atom_site_thermal_displace_type\"],\"atom_site.label\":[\"atom_site_id\"],\"atom_site.site_symmetry_multiplicity\":[\"atom_site_symmetry_multiplicity\"],\"atom_site_aniso.label\":[\"atom_site_anisotrop_id\"],\"atom_site_aniso.U_11\":[\"atom_site_anisotrop_U_11\"],\"atom_site_aniso.U_11_su\":[\"atom_site_aniso_U_11_esd\",\"atom_site_anisotrop_U_11_esd\"],\"atom_site_aniso.U_12\":[\"atom_site_anisotrop_U_12\"],\"atom_site_aniso.U_12_su\":[\"atom_site_aniso_U_12_esd\",\"atom_site_anisotrop_U_12_esd\"],\"atom_site_aniso.U_13\":[\"atom_site_anisotrop_U_13\"],\"atom_site_aniso.U_13_su\":[\"atom_site_aniso_U_13_esd\",\"atom_site_anisotrop_U_13_esd\"],\"atom_site_aniso.U_22\":[\"atom_site_anisotrop_U_22\"],\"atom_site_aniso.U_22_su\":[\"atom_site_aniso_U_22_esd\",\"atom_site_anisotrop_U_22_esd\"],\"atom_site_aniso.U_23\":[\"atom_site_anisotrop_U_23\"],\"atom_site_aniso.U_23_su\":[\"atom_site_aniso_U_23_esd\",\"atom_site_anisotrop_U_23_esd\"],\"atom_site_aniso.U_33\":[\"atom_site_anisotrop_U_33\"],\"atom_site_aniso.U_33_su\":[\"atom_site_aniso_U_33_esd\",\"atom_site_anisotrop_U_33_esd\"]},fe={parse:function parse(e){return\"string\"==typeof e?P(e):I(e);},parseText:P,parseBinary:I,toDatabaseCollection:M.b,toDatabase:M.a,schema:{mmCIF:function mmCIF(e){return Object(M.a)(k.a,e);},CCD:function CCD(e){return Object(M.a)(z,e);},BIRD:function BIRD(e){return Object(M.a)(Y,e);},dic:function dic(e){return Object(M.a)(Z,e);},cifCore:function cifCore(e){return Object(M.a)(le,e,de);},densityServer:function densityServer(e){return Object(M.a)(ie,e);}}};},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PluginReactContext\",function(){return s;}),r.d(t,\"PluginUIComponent\",function(){return u;}),r.d(t,\"PurePluginUIComponent\",function(){return c;}),r.d(t,\"CollapsableControls\",function(){return l;});var n=r(0),i=r(3),a=r(19),o=r(14),s=i.createContext(void 0),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.subs=void 0,n.plugin=r,n.init&&n.init(),n;}return Object(n.__extends)(t,e),t.prototype.subscribe=function(e,t){void 0===this.subs&&(this.subs=[]),this.subs.push(e.subscribe(t));},t.prototype.componentWillUnmount=function(){if(this.subs){for(var e=0,t=this.subs;e<t.length;e++){t[e].unsubscribe();}this.subs=void 0;}},t.contextType=s,t;}(i.Component),c=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.subs=void 0,n.plugin=r,n.init&&n.init(),n;}return Object(n.__extends)(t,e),t.prototype.subscribe=function(e,t){void 0===this.subs&&(this.subs=[]),this.subs.push(e.subscribe(t));},t.prototype.componentWillUnmount=function(){if(this.subs){for(var e=0,t=this.subs;e<t.length;e++){t[e].unsubscribe();}this.subs=void 0;}},t.contextType=s,t;}(i.PureComponent),l=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.toggleCollapsed=function(){n.setState({isCollapsed:!n.state.isCollapsed});};var i=n.defaultState();return void 0!==t.initiallyCollapsed&&(i.isCollapsed=t.initiallyCollapsed),void 0!==t.header&&(i.header=t.header),n.state=i,n;}return Object(n.__extends)(t,e),t.prototype.componentDidUpdate=function(e){void 0!==this.props.initiallyCollapsed&&e.initiallyCollapsed!==this.props.initiallyCollapsed&&this.setState({isCollapsed:this.props.initiallyCollapsed});},t.prototype.render=function(){var e;if(this.state.isHidden)return null;var t=this.state.isCollapsed?\"msp-transform-wrapper msp-transform-wrapper-collapsed\":\"msp-transform-wrapper\";return i.createElement(\"div\",{className:t},i.createElement(\"div\",{className:\"msp-transform-header\"},i.createElement(a.Button,{icon:this.state.brand?void 0:this.state.isCollapsed?o.ArrowRightSvg:o.ArrowDropDownSvg,noOverflow:!0,onClick:this.toggleCollapsed,className:this.state.brand?\"msp-transform-header-brand msp-transform-header-brand-\"+this.state.brand.accent:void 0,title:\"Click to \"+(this.state.isCollapsed?\"expand\":\"collapse\")},i.createElement(o.Icon,{svg:null===(e=this.state.brand)||void 0===e?void 0:e.svg,inline:!0}),this.state.header,i.createElement(\"small\",{style:{margin:\"0 6px\"}},this.state.isCollapsed?\"\":this.state.description))),!this.state.isCollapsed&&this.renderControls());},t;}(u);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return p;}),r.d(t,\"a\",function(){return n;});var n,i=r(5),a=r(86),o=r(2),s=r(182),u=r(47),c=r(143),l=r(355),d=r(356),f=Object.keys({custom:{},auto:{},highest:{},higher:{},high:{},medium:{},low:{},lower:{},lowest:{}}),p=o.ParamDefinition.arrayToOptions(f);!function(e){e.Params={alpha:o.ParamDefinition.Numeric(1,{min:0,max:1,step:.01},{label:\"Opacity\",isEssential:!0,description:\"How opaque/transparent the representation is rendered.\"}),quality:o.ParamDefinition.Select(\"auto\",p,{isEssential:!0,description:\"Visual/rendering quality of the representation.\"})},e.ShadingCategory={category:\"Shading\"},e.CustomQualityParamInfo={category:\"Custom Quality\",hideIf:function hideIf(e){return void 0!==e.quality&&\"custom\"!==e.quality;}},e.createSimple=function(e,t,r){return void 0===e&&(e=u.a.grey),void 0===t&&(t=1),r||(r=Object(s.a)()),{transform:r,locationIterator:Object(a.a)(1,r.instanceCount.ref.value,function(){return c.b;},!1,function(){return!1;}),theme:{color:Object(l.a)({},{value:e}),size:Object(d.a)({},{value:t})}};},e.createValues=function(e,t){return{alpha:i.e.create(e.alpha),uAlpha:i.e.create(e.alpha),uGroupCount:i.e.create(t.groupCount),drawCount:i.e.create(t.drawCount)};},e.updateValues=function(e,t){i.e.updateIfChanged(e.alpha,t.alpha);},e.createRenderableState=function(e){void 0===e&&(e={});var t=void 0===e.alpha||1===e.alpha;return{visible:!0,alphaFactor:1,pickable:!0,opaque:t,writeDepth:t};},e.updateRenderableState=function(e,t){e.opaque=t.alpha*e.alphaFactor>=1,e.writeDepth=e.opaque;};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(1),a=r(9),o=r(39),s=r(75),u=r(81),c=i.Vec3.zero(),l=i.Mat3.zero(),d=i.Vec3.zero(),f=i.Vec3.zero(),p=i.Vec3.zero(),m=i.Vec3.zero();!function(e){function t(e,t,r,n){var o=e.vertices,s=e.normals,u=e.indices,l=e.groups,d=e.currentGroup,f=o.elementCount;a.a.add3(o,t[0],t[1],t[2]),a.a.add3(o,r[0],r[1],r[2]),a.a.add3(o,n[0],n[1],n[2]),i.Vec3.triangleNormal(c,t,r,n);for(var p=0;p<3;++p)a.a.add3(s,c[0],c[1],c[2]),a.a.add(l,d);a.a.add3(u,f,f+1,f+2);}e.createState=function(e,t,r){return void 0===e&&(e=2048),void 0===t&&(t=1024),{currentGroup:-1,vertices:a.a.create(Float32Array,3,t,r?r.vertexBuffer.ref.value:e),normals:a.a.create(Float32Array,3,t,r?r.normalBuffer.ref.value:e),indices:a.a.create(Uint32Array,3,3*t,r?r.indexBuffer.ref.value:3*e),groups:a.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e),mesh:r};},e.addTriangle=t,e.addTriangleStrip=function(e,r,n){i.Vec3.fromArray(p,r,3*n[0]),i.Vec3.fromArray(m,r,3*n[1]);for(var a=2,o=n.length;a<o;a+=2)i.Vec3.copy(d,p),i.Vec3.copy(f,m),i.Vec3.fromArray(p,r,3*n[a]),i.Vec3.fromArray(m,r,3*n[a+1]),t(e,d,f,p),t(e,f,m,p);},e.addTriangleFan=function(e,r,n){i.Vec3.fromArray(d,r,3*n[0]);for(var a=2,o=n.length;a<o;++a)i.Vec3.fromArray(f,r,3*n[a-1]),i.Vec3.fromArray(p,r,3*n[a]),t(e,d,p,f);},e.addPrimitive=function(e,t,r){for(var n=r.vertices,o=r.normals,s=r.indices,u=e.vertices,d=e.normals,f=e.indices,p=e.groups,m=e.currentGroup,h=u.elementCount,g=i.Mat3.directionTransform(l,t),v=0,b=n.length;v<b;v+=3)i.Vec3.transformMat4(c,i.Vec3.fromArray(c,n,v),t),a.a.add3(u,c[0],c[1],c[2]),i.Vec3.transformMat3(c,i.Vec3.fromArray(c,o,v),g),a.a.add3(d,c[0],c[1],c[2]),a.a.add(p,m);for(v=0,b=s.length;v<b;v+=3)a.a.add3(f,s[v]+h,s[v+1]+h,s[v+2]+h);},e.addPrimitiveFlipped=function(e,t,r){for(var n=r.vertices,o=r.normals,s=r.indices,u=e.vertices,d=e.normals,f=e.indices,p=e.groups,m=e.currentGroup,h=u.elementCount,g=i.Mat3.directionTransform(l,t),v=0,b=n.length;v<b;v+=3)i.Vec3.transformMat4(c,i.Vec3.fromArray(c,n,v),t),a.a.add3(u,c[0],c[1],c[2]),i.Vec3.transformMat3(c,i.Vec3.fromArray(c,o,v),g),a.a.add3(d,-c[0],-c[1],-c[2]),a.a.add(p,m);for(v=0,b=s.length;v<b;v+=3)a.a.add3(f,s[v+2]+h,s[v+1]+h,s[v]+h);},e.addCage=function(e,t,r,n,a,o){for(var c=r.vertices,l=r.edges,p={radiusTop:n,radiusBottom:n,radialSegments:o},m=0,h=l.length;m<h;m+=2)i.Vec3.fromArray(d,c,3*l[m]),i.Vec3.fromArray(f,c,3*l[m+1]),i.Vec3.transformMat4(d,d,t),i.Vec3.transformMat4(f,f,t),Object(s.a)(e,d,n,a),Object(s.a)(e,f,n,a),Object(u.a)(e,d,f,1,p);},e.getMesh=function(e){var t=e.vertices,r=e.normals,n=e.indices,i=e.groups,s=e.mesh,u=a.a.compact(t,!0),c=a.a.compact(n,!0),l=a.a.compact(r,!0),d=a.a.compact(i,!0);return o.a.create(u,c,l,d,e.vertices.elementCount,e.indices.elementCount,s);};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(21),i=r(215),a=r(312),o=r(69),s=r(276),u=r(175),c=r(248),l=function(e){function t(r,n,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a.a;break;case 1:if(!r){o.destination=a.a;break;}if(\"object\"==typeof_default()(r)){r instanceof t?(o.syncErrorThrowable=r.syncErrorThrowable,o.destination=r,r.add(o)):(o.syncErrorThrowable=!0,o.destination=new d(o,r));break;}default:o.syncErrorThrowable=!0,o.destination=new d(o,r,n,i);}return o;}return n.a(t,e),t.prototype[s.a]=function(){return this;},t.create=function(e,r,n){var i=new t(e,r,n);return i.syncErrorThrowable=!1,i;},t.prototype.next=function(e){this.isStopped||this._next(e);},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e));},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete());},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this));},t.prototype._next=function(e){this.destination.next(e);},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe();},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe();},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this;},t;}(o.a),d=function(e){function t(t,r,n,o){var s,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return Object(i.a)(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.a&&(c=Object.create(r),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=n,u._complete=o,u;}return n.a(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e);}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(c.a)(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Object(c.a)(e);}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function r(){return e._complete.call(e._context);};u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe());}else this.unsubscribe();}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t);}catch(e){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw e;Object(c.a)(e);}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error(\"bad call\");try{t.call(this._context,r);}catch(t){return u.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Object(c.a)(t),!0);}return!1;},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe();},t;}(l);},function(e,t,r){\"use strict\";var n=r(137);r.d(t,\"b\",function(){return n.a;});var i=r(249);r.d(t,\"a\",function(){return i.a;});},function(e,t,r){\"use strict\";var n=r(0),i=r(135),a=r(11),o=r(159),s=r(5),u=r(201),c=r(6),l=r(9),d=r(4),f=r(79),p=r(22);var m=r(227),h=r(1),g=h.Vec3.zero();function v(e){var t=function(e){for(var t=e.conformation.invariantPosition,r=e.elements,n=new Float32Array(3*r.length),i=0,a=r.length;i<a;i++)t(r[i],g),h.Vec3.toArray(g,n,3*i);return n;}(e);return m.a.ofPositions(t);}var b,y=r(185);!function(e){function t(e){var t={};return{elements:e[0].elements,units:e,get unitIndexMap(){return t.unitIndexMap||(t.unitIndexMap=function(e){for(var t=c.IntMap.Mutable(),r=0,n=e.length;r<n;r++)t.set(e[r].id,r);return t;}(e)),t.unitIndexMap;},hashCode:r(e[0]),transformHash:Object(l.l)(e.map(function(e){return e.id;}))};}function r(e){return Object(l.i)(e.invariantId,c.SortedArray.hashCode(e.elements));}function m(){return{boundary:s.f.create(void 0),lookup3d:s.f.create(void 0),principalAxes:s.f.create(void 0),polymerElements:s.f.create(void 0),gapElements:s.f.create(void 0)};}e.isAtomic=function(e){return 0===e.kind;},e.isCoarse=function(e){return 1===e.kind||2===e.kind;},e.isSpheres=function(e){return 1===e.kind;},e.isGaussians=function(e){return 2===e.kind;},e.create=function(e,t,r,n,a,o,s,u){switch(a){case 0:return new h(e,t,r,n,o,u,i.a.createMapping(s,o.atomicConformation,void 0),g());case 1:return S(e,t,r,n,o,1,u,i.a.createMapping(s,o.coarseConformation.spheres,function(e){var t=e.coarseConformation.spheres.radius;return function(e){return t[e];};}(o)),_());case 2:return S(e,t,r,n,o,2,u,i.a.createMapping(s,o.coarseConformation.gaussians,function(e){return 0;}),_());}},e.SymmetryGroup=t,function(e){e.areInvariantElementsEqual=function(e,t){return e.hashCode===t.hashCode&&c.SortedArray.areEqual(e.elements,t.elements);},e.getUnitSymmetryGroupsIndexMap=function(e){for(var t=c.IntMap.Mutable(),r=0,n=e.length;r<n;r++)t.set(e[r].units[0].invariantId,r);return t;};}(t=e.SymmetryGroup||(e.SymmetryGroup={})),e.conformationId=function(t){return e.isAtomic(t)?t.model.atomicConformation.id:t.model.coarseConformation.id;},e.hashUnit=r,function(e){e.is=s.a.has,e.create=s.a.create;}(e.Traits||(e.Traits={}));var h=function(){function e(e,t,r,n,i,a,o,s){this.kind=0,this.objectPrimitive=\"atomistic\",this.id=e,this.invariantId=t,this.chainGroupId=r,this.traits=n,this.model=i,this.elements=a,this.conformation=o,this.residueIndex=i.atomicHierarchy.residueAtomSegments.index,this.chainIndex=i.atomicHierarchy.chainAtomSegments.index,this.props=s;}return e.prototype.getChild=function(t){return t.length===this.elements.length?this:new e(this.id,this.invariantId,this.chainGroupId,this.traits,this.model,t,this.conformation,g());},e.prototype.applyOperator=function(t,r,n){void 0===n&&(n=!1);var a=n?r:i.a.compose(this.conformation.operator,r);return new e(t,this.invariantId,this.chainGroupId,this.traits,this.model,this.elements,i.a.createMapping(a,this.model.atomicConformation,this.conformation.r),this.props);},Object.defineProperty(e.prototype,\"boundary\",{get:function get(){if(this.props.boundary.ref)return this.props.boundary.ref;var e=this.model.atomicConformation,t=e.x,r=e.y,n=e.z;return this.props.boundary.ref=Object(y.a)({x:t,y:r,z:n,indices:this.elements}),this.props.boundary.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"lookup3d\",{get:function get(){if(this.props.lookup3d.ref)return this.props.lookup3d.ref;var e=this.model.atomicConformation,t=e.x,r=e.y,n=e.z;return this.props.lookup3d.ref=Object(a.c)({x:t,y:r,z:n,indices:this.elements},this.boundary),this.props.lookup3d.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"principalAxes\",{get:function get(){return this.props.principalAxes.ref||(this.props.principalAxes.ref=v(this)),this.props.principalAxes.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"bonds\",{get:function get(){return this.props.bonds.ref||(this.props.bonds.ref=Object(o.c)(this)),this.props.bonds.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"rings\",{get:function get(){return this.props.rings.ref||(this.props.rings.ref=u.b.create(this)),this.props.rings.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"polymerElements\",{get:function get(){return this.props.polymerElements.ref||(this.props.polymerElements.ref=function(e){for(var t=[],r=e.elements,n=e.model,i=e.model.atomicHierarchy.residueAtomSegments,a=n.atomicHierarchy.derived.residue.traceElementIndex,o=f.a.transientSegments(e.model.atomicRanges.polymerRanges,r),s=c.Segmentation.transientSegments(i,r);o.hasNext;){var u=o.move();for(s.setSegment(u);s.hasNext;){var l=s.move(),d=l.start,p=l.end,m=l.index;if(c.OrderedSet.areIntersecting(c.Interval.ofRange(r[d],r[p-1]),r)){var h=a[m];t.push(-1===h?i.offsets[m]:h);}}}return c.SortedArray.ofSortedArray(t);}(this)),this.props.polymerElements.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"gapElements\",{get:function get(){return this.props.gapElements.ref||(this.props.gapElements.ref=function(e){for(var t=[],r=e.elements,n=e.model,i=e.residueIndex,a=e.model.atomicHierarchy.residueAtomSegments,o=n.atomicHierarchy.derived.residue.traceElementIndex,s=f.a.transientSegments(e.model.atomicRanges.gapRanges,e.elements);s.hasNext;){var u=s.move(),l=i[r[u.start]],d=i[r[u.end-1]],p=o[l],m=o[d];t.push(-1===p?a.offsets[l]:p),t.push(-1===m?a.offsets[d]:m);}return c.SortedArray.ofSortedArray(t);}(this)),this.props.gapElements.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"nucleotideElements\",{get:function get(){return this.props.nucleotideElements.ref||(this.props.nucleotideElements.ref=function(e){for(var t=[],r=e.elements,n=e.model,i=n.atomicHierarchy,a=i.chainAtomSegments,o=i.residueAtomSegments,s=n.atomicHierarchy.derived.residue,u=s.moleculeType,l=s.traceElementIndex,d=c.Segmentation.transientSegments(a,r),f=c.Segmentation.transientSegments(o,r);d.hasNext;)for(f.setSegment(d.move());f.hasNext;){var m=f.move().index;if(Object(p.isNucleic)(u[m])){var h=l[m];t.push(-1===h?o.offsets[m]:h);}}return c.SortedArray.ofSortedArray(t);}(this)),this.props.nucleotideElements.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"proteinElements\",{get:function get(){return this.props.proteinElements.ref||(this.props.proteinElements.ref=function(e){for(var t=[],r=e.elements,n=e.model,i=n.atomicHierarchy,a=i.chainAtomSegments,o=i.residueAtomSegments,s=n.atomicHierarchy.derived.residue,u=s.moleculeType,l=s.traceElementIndex,d=c.Segmentation.transientSegments(a,r),f=c.Segmentation.transientSegments(o,r);d.hasNext;)for(f.setSegment(d.move());f.hasNext;){var m=f.move().index;if(Object(p.isProtein)(u[m])){var h=l[m];t.push(-1===h?o.offsets[m]:h);}}return c.SortedArray.ofSortedArray(t);}(this)),this.props.proteinElements.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"residueCount\",{get:function get(){if(void 0!==this.props.residueCount.ref)return this.props.residueCount.ref;for(var e=0,t=c.Segmentation.transientSegments(this.model.atomicHierarchy.residueAtomSegments,this.elements);t.hasNext;)t.move(),e+=1;return this.props.residueCount.ref=e,this.props.residueCount.ref;},enumerable:!1,configurable:!0}),e.prototype.getResidueIndex=function(e){return this.residueIndex[this.elements[e]];},e;}();function g(){return Object(n.__assign)(Object(n.__assign)({},m()),{bonds:s.f.create(void 0),rings:s.f.create(void 0),nucleotideElements:s.f.create(void 0),proteinElements:s.f.create(void 0),residueCount:s.f.create(void 0)});}e.Atomic=h;var b=function(){function e(e,t,r,n,i,a,o,s,u){this.kind=a,this.objectPrimitive=1===a?\"sphere\":\"gaussian\",this.id=e,this.invariantId=t,this.chainGroupId=r,this.traits=n,this.model=i,this.elements=o,this.conformation=s,this.coarseElements=1===a?i.coarseHierarchy.spheres:i.coarseHierarchy.gaussians,this.coarseConformation=1===a?i.coarseConformation.spheres:i.coarseConformation.gaussians,this.props=u;}return e.prototype.getChild=function(e){return e.length===this.elements.length?this:S(this.id,this.invariantId,this.chainGroupId,this.traits,this.model,this.kind,e,this.conformation,_());},e.prototype.applyOperator=function(e,t,r){void 0===r&&(r=!1);var n=r?t:i.a.compose(this.conformation.operator,t);return S(e,this.invariantId,this.chainGroupId,this.traits,this.model,this.kind,this.elements,i.a.createMapping(n,this.getCoarseConformation(),this.conformation.r),this.props);},Object.defineProperty(e.prototype,\"boundary\",{get:function get(){if(this.props.boundary.ref)return this.props.boundary.ref;var e=this.getCoarseConformation(),t=e.x,r=e.y,n=e.z;return this.props.boundary.ref=Object(y.a)({x:t,y:r,z:n,indices:this.elements}),this.props.boundary.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"lookup3d\",{get:function get(){if(this.props.lookup3d.ref)return this.props.lookup3d.ref;var e=this.getCoarseConformation(),t=e.x,r=e.y,n=e.z;return this.props.lookup3d.ref=Object(a.c)({x:t,y:r,z:n,indices:this.elements},this.boundary),this.props.lookup3d.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"principalAxes\",{get:function get(){return this.props.principalAxes.ref||(this.props.principalAxes.ref=v(this)),this.props.principalAxes.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"polymerElements\",{get:function get(){return this.props.polymerElements.ref||(this.props.polymerElements.ref=function(e){for(var t=[],r=e.elements,n=e.model.coarseHierarchy,i=n.spheres,a=n.gaussians,o=d.Unit.isSpheres(e)?i.polymerRanges:a.polymerRanges,s=f.a.transientSegments(o,r);s.hasNext;)for(var u=s.move(),l=u.start,p=u.end,m=l;m<p;++m)t.push(r[m]);return c.SortedArray.ofSortedArray(t);}(this)),this.props.polymerElements.ref;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"gapElements\",{get:function get(){return this.props.gapElements.ref||(this.props.gapElements.ref=function(e){for(var t=[],r=e.elements,n=e.model.coarseHierarchy,i=n.spheres,a=n.gaussians,o=d.Unit.isSpheres(e)?i.gapRanges:a.gapRanges,s=f.a.transientSegments(o,r);s.hasNext;){var u=s.move(),l=u.start,p=u.end;t.push(r[l],r[p-1]);}return c.SortedArray.ofSortedArray(t);}(this)),this.props.gapElements.ref;},enumerable:!1,configurable:!0}),e.prototype.getCoarseConformation=function(){return 1===this.kind?this.model.coarseConformation.spheres:this.model.coarseConformation.gaussians;},e;}();function _(){return m();}function S(e,t,r,n,i,a,o,s,u){return new b(e,t,r,n,i,a,o,s,u);}var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t;}(b);e.Spheres=O;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t;}(b);e.Gaussians=x,e.areSameChainOperatorGroup=function(e,t){return e.chainGroupId===t.chainGroupId&&e.conformation.operator.name===t.conformation.operator.name;};}(b||(b={}));t.a=b;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(55),a=r(27),o=r(156),s=r(6);!function(e){function t(e,t){return{kind:\"singletons\",source:e,structure:t};}function r(e,t){return{kind:\"sequence\",source:e,structures:t};}function n(e){return t(e,a.c.Empty);}function u(e){return\"singletons\"===e.kind;}function c(e){return u(e)?0===e.structure.units.length:0===e.structures.length;}function l(e){return c(e)?a.c.Empty:u(e)?e.structure:Object(o.e)(e.source,e.structures);}function d(e,i,a){return 0===i.length?n(e):a?t(e,Object(o.e)(e,i)):r(e,i);}e.Singletons=t,e.Sequence=r,e.Empty=n,e.isSingleton=u,e.isEmpty=c,e.structureCount=function(e){return u(e)?e.structure.elementCount:e.structures.length;},e.unionStructure=l,e.toLociWithCurrentUnits=function(e){for(var t=[],r=e.source.unitMap,n=0,i=l(e).units;n<i.length;n++){var o=i[n];o===r.get(o.id)?t[t.length]={unit:o,indices:s.OrderedSet.ofBounds(0,o.elements.length)}:t[t.length]={unit:o,indices:s.OrderedSet.ofSortedArray(s.SortedArray.indicesOf(r.get(o.id).elements,o.elements))};}return a.d.Loci(e.source,t);},e.toLociWithSourceUnits=function(e){for(var t=[],r=e.source.unitMap,n=0,i=l(e).units;n<i.length;n++){var o=i[n],u=r.get(o.id);t[t.length]=u===o?{unit:u,indices:s.OrderedSet.ofBounds(0,u.elements.length)}:{unit:u,indices:s.OrderedSet.ofSortedArray(s.SortedArray.indicesOf(u.elements,o.elements))};}return a.d.Loci(e.source,t);};var f=function(){function e(e){this.source=e,this.structures=[],this.allSingletons=!0;}return e.prototype.add=function(e){var t=e.elementCount;0!==t&&(this.structures[this.structures.length]=e,1!==t&&(this.allSingletons=!1));},e.prototype.getSelection=function(){return d(this.source,this.structures,this.allSingletons);},e;}(),p=function(){function e(e){this.structure=e,this.structures=[],this.allSingletons=!0,this.uniqueSets=Object(i.a)(a.c.hashCode,a.c.areUnitAndIndicesEqual);}return e.prototype.add=function(e){var t=e.elementCount;0!==t&&this.uniqueSets.add(e)&&(this.structures[this.structures.length]=e,1!==t&&(this.allSingletons=!1));},e.prototype.getSelection=function(){return d(this.structure,this.structures,this.allSingletons);},e;}();e.LinearBuilder=function(e){return new f(e);},e.UniqueBuilder=function(e){return new p(e);},e.forEach=function(t,r){var n=0;if(e.isSingleton(t))for(var i=0,o=t.structure.units;i<o.length;i++)for(var u=o[i],c=u.elements,l=0,d=c.length;l<d;l++){r(a.c.create([u.getChild(s.SortedArray.ofSingleton(c[l]))],{parent:t.source}),n++);}else for(var f=0,p=t.structures;f<p.length;f++){r(p[f],n++);}},e.withInputStructure=function(e,n){return u(e)?t(n,e.structure):r(n,e.structures);};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(1),s=r(11),u=r(124),c=r(125),l=r(117),d=r(9),f=r(2),p=r(53),m=r(33),h=r(134),g=r(141),v=r(142);!function(e){function t(e,t,r,i,o,c,l){return l?function(e,t,r,n,i,o,s){return s.vertexCount=i,s.triangleCount=o,a.e.update(s.vertexBuffer,e),a.e.update(s.indexBuffer,t),a.e.update(s.normalBuffer,r),a.e.update(s.groupBuffer,n),s;}(e,t,r,i,o,c,l):function(e,t,r,i,o,c){var l,d=Object(s.g)(),f=-1,m=-1,h={kind:\"mesh\",vertexCount:o,triangleCount:c,vertexBuffer:a.e.create(e),indexBuffer:a.e.create(t),normalBuffer:a.e.create(r),groupBuffer:a.e.create(i),get boundingSphere(){var e=n(h);if(e!==f){var t=Object(p.a)(h.vertexBuffer.ref.value,h.vertexCount,1);s.g.copy(d,t),f=e;}return d;},get groupMapping(){return h.groupBuffer.ref.version!==m&&(l=Object(u.c)(h.groupBuffer.ref.value,h.vertexCount),m=h.groupBuffer.ref.version),l;},setBoundingSphere:function setBoundingSphere(e){s.g.copy(d,e),f=n(h);}};return h;}(e,t,r,i,o,c);}function r(e){return t(e?e.vertexBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.normalBuffer.ref.value:new Float32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),0,0,e);}function n(e){return Object(d.l)([e.vertexCount,e.triangleCount,e.vertexBuffer.ref.version,e.indexBuffer.ref.version,e.normalBuffer.ref.version,e.groupBuffer.ref.version]);}e.create=t,e.createEmpty=r,e.computeNormals=function(e){var t=e.vertexCount,r=e.triangleCount,n=e.vertexBuffer.ref.value,i=e.indexBuffer.ref.value,o=e.normalBuffer.ref.value.length>=3*t?e.normalBuffer.ref.value:new Float32Array(3*t);o===e.normalBuffer.ref.value&&o.fill(0,0,3*t),Object(u.b)(n,i,o,t,r),a.e.update(e.normalBuffer,o);},e.checkForDuplicateVertices=function(e,t){void 0===t&&(t=3);for(var r=e.vertexBuffer.ref.value,n=new Map(),i=function i(e,t){return e[0].toFixed(t)+\"|\"+e[1].toFixed(t)+\"|\"+e[2].toFixed(t);},a=0,s=Object(o.Vec3)(),u=0,c=e.vertexCount;u<c;++u){o.Vec3.fromArray(s,r,3*u);var l=i(s,t),d=n.get(l);void 0!==d?(a+=1,n.set(l,d+1)):n.set(l,1);}return a;};var b=Object(o.Mat3)();function y(e,t,r,n,u){var d=r.instanceCount,f=r.groupCount;if(d!==t.instanceCount.ref.value)throw new Error(\"instanceCount values in TransformData and LocationIterator differ\");var b=Object(l.a)(r,n.color),y=Object(c.a)(d*f),_=Object(h.c)(),S=Object(g.c)(),O=Object(v.d)(),x={drawCount:3*e.triangleCount,groupCount:f,instanceCount:d},C=s.g.clone(e.boundingSphere),w=Object(p.b)(C,t.aTransform.ref.value,d);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({aPosition:e.vertexBuffer,aNormal:e.normalBuffer,aGroup:e.groupBuffer,elements:e.indexBuffer,boundingSphere:a.e.create(w),invariantBoundingSphere:a.e.create(C),uInvariantBoundingSphere:a.e.create(o.Vec4.ofSphere(C))},b),y),_),S),O),t),m.a.createValues(u,x)),{dDoubleSided:a.e.create(u.doubleSided),dFlatShaded:a.e.create(u.flatShaded),dFlipSided:a.e.create(u.flipSided),dIgnoreLight:a.e.create(u.ignoreLight)});}e.transform=function(e,t){var r=e.vertexBuffer.ref.value;if(Object(u.e)(t,r,0,e.vertexCount),!o.Mat4.isTranslationAndUniformScaling(t)){var n=o.Mat3.directionTransform(b,t);Object(u.d)(n,e.normalBuffer.ref.value,0,e.vertexCount);}a.e.update(e.vertexBuffer,r);},e.uniformTriangleGroup=function(e,t){void 0===t&&(t=!0);var r=e.indexBuffer,n=e.vertexBuffer,i=e.groupBuffer,s=e.normalBuffer,u=e.triangleCount,c=e.vertexCount,l=r.ref.value,f=n.ref.value,p=i.ref.value,m=s.ref.value,h=d.a.create(Uint32Array,3,1024,u),g=d.a.create(Float32Array,3,1024,f);g.currentIndex=3*c,g.elementCount=c;var v=d.a.create(Float32Array,3,1024,m);v.currentIndex=3*c,v.elementCount=c;var b=d.a.create(Float32Array,1,1024,p);b.currentIndex=c,b.elementCount=c;var y=Object(o.Vec3)(),_=Object(o.Vec3)(),S=Object(o.Vec3)(),O=Object(o.Vec3)(),x=Object(o.Vec3)(),C=Object(o.Vec3)();function w(e){o.Vec3.fromArray(y,f,3*e),o.Vec3.fromArray(O,m,3*e),d.a.add3(g,y[0],y[1],y[2]),d.a.add3(v,O[0],O[1],O[2]);}function P(e,t){o.Vec3.fromArray(y,f,3*e),o.Vec3.fromArray(_,f,3*t),o.Vec3.scale(y,o.Vec3.add(y,y,_),.5),o.Vec3.fromArray(O,m,3*e),o.Vec3.fromArray(x,m,3*t),o.Vec3.scale(O,o.Vec3.add(O,O,x),.5),d.a.add3(g,y[0],y[1],y[2]),d.a.add3(v,O[0],O[1],O[2]);}function j(e,t,r){o.Vec3.fromArray(y,f,3*e),o.Vec3.fromArray(_,f,3*t),o.Vec3.fromArray(S,f,3*r),o.Vec3.scale(y,o.Vec3.add(y,o.Vec3.add(y,y,_),S),1/3),o.Vec3.fromArray(O,m,3*e),o.Vec3.fromArray(x,m,3*t),o.Vec3.fromArray(C,m,3*r),o.Vec3.scale(O,o.Vec3.add(O,o.Vec3.add(O,O,x),C),1/3),d.a.add3(g,y[0],y[1],y[2]),d.a.add3(v,O[0],O[1],O[2]);}function E(e,t,r,n,i){++T,w(e),P(e,t),P(e,r),d.a.add3(h,A,A+1,A+2);for(var a=0;a<3;++a)d.a.add(b,n);A+=3,T+=2,w(t),w(r),P(e,t),P(e,r),d.a.add3(h,A,A+1,A+3),d.a.add3(h,A,A+3,A+2);for(a=0;a<4;++a)d.a.add(b,i);A+=4;}var A=c,T=0;if(t)for(var D=0,I=u;D<I;++D){var M=l[3*D],k=l[3*D+1],B=l[3*D+2],V=p[M],R=p[k],L=p[B];if(V===R&&V===L)++T,d.a.add3(h,M,k,B);else if(V===R)E(B,M,k,L,V);else if(V===L)E(k,B,M,R,L);else if(R===L)E(M,k,B,V,R);else{T+=2,w(M),P(M,k),P(M,B),j(M,k,B),d.a.add3(h,A,A+1,A+3),d.a.add3(h,A,A+3,A+2);for(var N=0;N<4;++N)d.a.add(b,V);A+=4,T+=2,w(k),P(k,B),P(k,M),j(M,k,B),d.a.add3(h,A,A+1,A+3),d.a.add3(h,A,A+3,A+2);for(N=0;N<4;++N)d.a.add(b,R);A+=4,T+=2,w(B),P(B,k),P(B,M),j(M,k,B),d.a.add3(h,A+3,A+1,A),d.a.add3(h,A+2,A+3,A);for(N=0;N<4;++N)d.a.add(b,L);A+=4;}}else for(D=0,I=u;D<I;++D){M=l[3*D],k=l[3*D+1],B=l[3*D+2],V=p[M],R=p[k],L=p[B];if(V!==R||V!==L){++T,w(M),w(k),w(B),d.a.add3(h,A,A+1,A+2);var F=R===L?R:V;for(N=0;N<3;++N)d.a.add(b,F);A+=3;}else++T,d.a.add3(h,M,k,B);}var U=d.a.compact(h),z=d.a.compact(g),H=d.a.compact(v),G=d.a.compact(b);return e.vertexCount=A,e.triangleCount=T,a.e.update(n,z),a.e.update(i,G),a.e.update(r,U),a.e.update(s,H),e;},e.Params=Object(i.__assign)(Object(i.__assign)({},m.a.Params),{doubleSided:f.ParamDefinition.Boolean(!1,m.a.CustomQualityParamInfo),flipSided:f.ParamDefinition.Boolean(!1,m.a.ShadingCategory),flatShaded:f.ParamDefinition.Boolean(!1,m.a.ShadingCategory),ignoreLight:f.ParamDefinition.Boolean(!1,m.a.ShadingCategory)}),e.Utils={Params:e.Params,createEmpty:r,createValues:y,createValuesSimple:function createValuesSimple(t,r,n,a,o){var s=m.a.createSimple(n,a,o),u=Object(i.__assign)(Object(i.__assign)({},f.ParamDefinition.getDefaultValues(e.Params)),r);return y(t,s.transform,s.locationIterator,s.theme,u);},updateValues:function updateValues(e,t){m.a.updateValues(e,t),a.e.updateIfChanged(e.dDoubleSided,t.doubleSided),a.e.updateIfChanged(e.dFlatShaded,t.flatShaded),a.e.updateIfChanged(e.dFlipSided,t.flipSided),a.e.updateIfChanged(e.dIgnoreLight,t.ignoreLight);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=s.g.clone(t.boundingSphere),n=Object(p.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);s.g.equals(n,e.boundingSphere.ref.value)||a.e.update(e.boundingSphere,n);s.g.equals(r,e.invariantBoundingSphere.ref.value)||(a.e.update(e.invariantBoundingSphere,r),a.e.update(e.uInvariantBoundingSphere,o.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:m.a.createRenderableState,updateRenderableState:m.a.updateRenderableState};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return S;}),r.d(t,\"a\",function(){return _;});var n,i=r(0),a=r(2),o=r(89),s=r(60),u=r(16),c=r(45),l=r(23),d=r(130),f=r(131),p=r(1),m=r(164),h=r(33),g=r(68),v=r(77);!function(e){e.getDetaultParams=function(e,t,r){return a.ParamDefinition.getDefaultValues(e.getParams(t,r));};}(n||(n={}));var b={label:\"\",description:\"\",factory:function factory(){return _.Empty;},getParams:function getParams(){return{};},defaultValues:{}};function y(e){return e.map(function(e){return[e.name,e.provider.label];});}var _,S=function(){function e(){this._list=[],this._map=new Map(),this._name=new Map();}return Object.defineProperty(e.prototype,\"default\",{get:function get(){return this._list[0];},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"types\",{get:function get(){return y(this._list);},enumerable:!1,configurable:!0}),e.prototype.add=function(e){if(this._map.has(e.name))throw new Error(e.name+\" already registered.\");this._list.push({name:e.name,provider:e}),this._map.set(e.name,e),this._name.set(e,e.name);},e.prototype.getName=function(e){if(!this._name.has(e))throw new Error(\"'\"+e.label+\"' is not a registered represenatation provider.\");return this._name.get(e);},e.prototype.remove=function(e){var t=e.name;this._list.splice(this._list.findIndex(function(e){return e.name===t;}),1);var r=this._map.get(t);r&&(this._map.delete(t),this._name.delete(r));},e.prototype.get=function(e){return this._map.get(e)||b;},Object.defineProperty(e.prototype,\"list\",{get:function get(){return this._list;},enumerable:!1,configurable:!0}),e.prototype.getApplicableList=function(e){return this._list.filter(function(t){return t.provider.isApplicable(e);});},e.prototype.getApplicableTypes=function(e){return y(this.getApplicableList(e));},e;}();!function(e){function t(){return{visible:!0,alphaFactor:1,pickable:!0,syncManually:!1,transform:p.Mat4.identity(),overpaint:d.a.Empty,transparency:f.a.Empty,clipping:v.a.Empty,markerActions:c.b.All};}function r(e,t){void 0!==t.visible&&(e.visible=t.visible),void 0!==t.alphaFactor&&(e.alphaFactor=t.alphaFactor),void 0!==t.pickable&&(e.pickable=t.pickable),void 0!==t.overpaint&&(e.overpaint=t.overpaint),void 0!==t.transparency&&(e.transparency=t.transparency),void 0!==t.clipping&&(e.clipping=t.clipping),void 0!==t.syncManually&&(e.syncManually=t.syncManually),void 0!==t.transform&&p.Mat4.copy(e.transform,t.transform),void 0!==t.markerActions&&(e.markerActions=t.markerActions);}!function(e){e.areEqual=function(e,t){return e.repr===t.repr&&l.Loci.areEqual(e.loci,t.loci);},e.Empty={loci:l.EmptyLoci};}(e.Loci||(e.Loci={})),e.createState=t,e.updateState=r,e.StateBuilder={create:t,update:r},e.Empty={label:\"\",groupCount:0,renderObjects:[],props:{},params:{},updated:new s.a(),state:t(),theme:o.a.createEmpty(),createOrUpdate:function createOrUpdate(){return u.b.constant(\"\",void 0);},setState:function setState(){},setTheme:function setTheme(){},getLoci:function getLoci(){return l.EmptyLoci;},mark:function mark(){return!1;},destroy:function destroy(){}},e.createMulti=function(e,t,r,n,c){var d,f,p,h=this,g=0,v=new s.a(),b=n.create(),y=o.a.createEmpty(),_={},S=Object.keys(c).map(function(e,n){_[n]=e;var i=c[e](t,r);return i.setState(b),i;});return{label:e,updated:v,get groupCount(){var e=0;if(f)for(var t=f.visuals,r=0,n=S.length;r<n;++r)t&&!t.includes(_[r])||(e+=S[r].groupCount);return e;},get renderObjects(){var e=[];if(f)for(var t=f.visuals,r=0,n=S.length;r<n;++r)t&&!t.includes(_[r])||e.push.apply(e,S[r].renderObjects);return e;},get props(){return f;},get params(){return d;},createOrUpdate:function createOrUpdate(n,o){void 0===n&&(n={}),o&&o!==p&&(d=r(t,o),p=o,f||(f=a.ParamDefinition.getDefaultValues(d)));var s=Object(m.b)(Object.assign({},f,n),p);Object.assign(f,n,s);var c=f.visuals;return u.b.create(\"Creating or updating '\"+e+\"' representation\",function(e){return Object(i.__awaiter)(h,void 0,void 0,function(){var t,r;return Object(i.__generator)(this,function(n){switch(n.label){case 0:t=0,r=S.length,n.label=1;case 1:return t<r?c&&!c.includes(_[t])?[3,3]:[4,S[t].createOrUpdate(f,p).runInContext(e)]:[3,4];case 2:n.sent(),n.label=3;case 3:return++t,[3,1];case 4:return v.next(g++),[2];}});});});},get state(){return b;},get theme(){return y;},getLoci:function getLoci(e){for(var t=f.visuals,r=0,n=S.length;r<n;++r)if(!t||t.includes(_[r])){var i=S[r].getLoci(e);if(!Object(l.isEmptyLoci)(i))return i;}return l.EmptyLoci;},mark:function mark(e,t){for(var r=!1,n=0,i=S.length;n<i;++n)r=S[n].mark(e,t)||r;return r;},setState:function setState(e){n.update(b,e);for(var t=0,r=S.length;t<r;++t)S[t].setState(b);},setTheme:function setTheme(e){for(var t=0,r=S.length;t<r;++t)S[t].setTheme(e);},destroy:function destroy(){for(var e=0,t=S.length;e<t;++e)S[e].destroy();}};},e.fromRenderObject=function(t,r){var n=this,c=0,d=new s.a(),f=e.createState(),p=o.a.createEmpty(),v=a.ParamDefinition.clone(h.a.Params),b=a.ParamDefinition.getDefaultValues(h.a.Params);return{label:t,updated:d,get groupCount(){return r.values.uGroupCount.ref.value;},get renderObjects(){return[r];},get props(){return b;},get params(){return v;},createOrUpdate:function createOrUpdate(e){void 0===e&&(e={});var r=Object(m.b)(Object.assign({},b,e));return Object.assign(b,e,r),u.b.create(\"Updating '\"+t+\"' representation\",function(e){return Object(i.__awaiter)(n,void 0,void 0,function(){return Object(i.__generator)(this,function(e){return d.next(c++),[2];});});});},get state(){return f;},get theme(){return p;},getLoci:function getLoci(){return l.EmptyLoci;},mark:function mark(e,t){return!1;},setState:function setState(t){void 0!==t.visible&&g.a.setVisibility(r,t.visible),void 0!==t.alphaFactor&&g.a.setAlphaFactor(r,t.alphaFactor),void 0!==t.pickable&&g.a.setPickable(r,t.pickable),t.overpaint,t.transparency,void 0!==t.transform&&g.a.setTransform(r,t.transform),e.updateState(f,t);},setTheme:function setTheme(){},destroy:function destroy(){}};};}(_||(_={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;}),r.d(t,\"g\",function(){return s;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"d\",function(){return d;}),r.d(t,\"f\",function(){return f;}),r.d(t,\"c\",function(){return p;}),r.d(t,\"e\",function(){return m;});var n=r(0);function i(e,t){return void 0===t&&(t=\" \"),e.replace(/([a-z\\xE0-\\xFF])([A-Z\\xC0\\xDF])/g,\"$1\"+t+\"$2\");}function a(e){return u(i(e));}var o=function o(e){return e.toUpperCase();};function s(e){return e?\"string\"==typeof e?e.toUpperCase():(\"\"+e).toUpperCase():\"\";}function u(e){return e.toLowerCase().replace(/^\\w|\\s\\w/g,o);}function c(e){return e.replace(/_/g,\" \");}function l(e){return e.replace(/-/g,\" \");}function d(e){return u(i(c(l(e))));}function f(e,t,r,n){var i=n.length;if(i>r-t)return!1;for(var a=0;a<i;a++)if(e.charCodeAt(t+a)!==n.charCodeAt(a))return!1;return!0;}function p(e,t){var r=Object.keys(t),i=Object.values(t);return new(Function.bind.apply(Function,Object(n.__spreadArrays)([void 0],r,[\"return `\"+e+\"`;\"])))().apply(void 0,i);}function m(e){return e.replace(/<\\/?[^>]+>/g,\"\");}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return i;}),r.d(t,\"a\",function(){return a;}),r.d(t,\"c\",function(){return o;});var n=r(18);function i(e,t,r){return Object(n.d)(\"\",e,t,r);}function a(e){!function e(t,r,i){if(Object(n.e)(i))return i.info.namespace=t,i.info.name=i.info.name||s(r),void(i.id=i.info.namespace+\".\"+i.info.name);for(var a=\"\"+(i[\"@namespace\"]||s(r)),o=t?t+\".\"+a:a,u=0,c=Object.keys(i);u<c.length;u++){var l=c[u];(\"object\"==typeof_default()(i[l])||Object(n.e)(i[l]))&&e(o,l,i[l]);}}(\"\",\"\",e);}function o(e){var t=[];return function e(t,r){if(Object(n.e)(t))return void r.push(t);for(var i=0,a=Object.keys(t);i<a.length;i++){var o=a[i];(\"object\"==typeof_default()(t[o])||Object(n.e)(t[o]))&&e(t[o],r);}}(e,t),t;}function s(e){var t=/([a-z])([A-Z])([a-z]|$)/g;return e.replace(t,function(e,t,r,n){return t+\"-\"+r.toLocaleLowerCase()+n;}).replace(t,function(e,t,r,n){return t+\"-\"+r.toLocaleLowerCase()+n;});}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Color\",function(){return a;}),r.d(t,\"ColorList\",function(){return o;}),r.d(t,\"ColorTable\",function(){return s;}),r.d(t,\"ColorMap\",function(){return u;}),r.d(t,\"getAdjustedColorMap\",function(){return c;}),r.d(t,\"ColorSwatch\",function(){return l;});var n=r(233),i=r(161);function a(e){return e;}function o(e,t,r,n){return{label:e,description:r,list:n,type:t};}function s(e){return e;}function u(e){return e;}function c(e,t,r){var n={};for(var i in e){var o=e[i];o=a.saturate(o,t),o=a.darken(o,-r),n[i]=o;}return n;}function l(e){return e;}!function(e){function t(e,t,r){return e<<16|t<<8|r;}function r(e,t,r){return 255*e<<16|255*t<<8|255*r;}e.toStyle=function(e){return\"rgb(\"+(e>>16&255)+\", \"+(e>>8&255)+\", \"+(255&e)+\")\";},e.toHexString=function(e){return\"0x\"+(\"000000\"+e.toString(16)).slice(-6);},e.toRgbString=function(t){return\"RGB: \"+e.toRgb(t).join(\", \");},e.toRgb=function(e){return[e>>16&255,e>>8&255,255&e];},e.toRgbNormalized=function(e){return[(e>>16&255)/255,(e>>8&255)/255,(255&e)/255];},e.fromRgb=t,e.fromNormalizedRgb=r,e.fromArray=function(e,r){return t(e[r],e[r+1],e[r+2]);},e.fromNormalizedArray=function(e,t){return r(e[t],e[t+1],e[t+2]);},e.toArray=function(e,t,r){return t[r]=e>>16&255,t[r+1]=e>>8&255,t[r+2]=255&e,t;},e.toArrayNormalized=function(e,t,r){return t[r]=(e>>16&255)/255,t[r+1]=(e>>8&255)/255,t[r+2]=(255&e)/255,t;},e.toVec3=function(e,t){return e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t,e;},e.toVec3Normalized=function(e,t){return e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e;},e.interpolate=function(e,t,r){var n=e>>16&255,i=e>>8&255,a=255&e;return n+((t>>16&255)-n)*r<<16|i+((t>>8&255)-i)*r<<8|a+((255&t)-a)*r;};var a=[0,0,0];function o(e,t){return n.a.fromColor(a,e),n.a.toColor(n.a.saturate(a,a,t));}e.saturate=o,e.desaturate=function(e,t){return o(e,-t);};var s=[0,0,0];function u(e,t){return i.a.fromColor(s,e),i.a.toColor(i.a.darken(s,s,t));}e.darken=u,e.lighten=function(e,t){return u(e,-t);};}(a||(a={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(301),i=r(35),a=r(276),o=r(312);var s=r(203),u=r(272),c=r(175),l=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e);}return e.prototype.lift=function(t){var r=new e();return r.source=this,r.operator=t,r;},e.prototype.subscribe=function(e,t,r){var n=this.operator,s=function(e,t,r){if(e){if(e instanceof i.a)return e;if(e[a.a])return e[a.a]();}return e||t||r?new i.a(e,t,r):new i.a(o.a);}(e,t,r);if(n?s.add(n.call(s,this.source)):s.add(this.source||c.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s;},e.prototype._trySubscribe=function(e){try{return this._subscribe(e);}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Object(n.a)(e)?e.error(t):console.warn(t);}},e.prototype.forEach=function(e,t){var r=this;return new(t=d(t))(function(t,n){var i;i=r.subscribe(function(t){try{e(t);}catch(e){n(e),i&&i.unsubscribe();}},n,t);});},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e);},e.prototype[s.a]=function(){return this;},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:Object(u.b)(e)(this);},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,r){var n;t.subscribe(function(e){return n=e;},function(e){return r(e);},function(){return e(n);});});},e.create=function(t){return new e(t);},e;}();function d(e){if(e||(e=c.a.Promise||Promise),!e)throw new Error(\"no Promise impl found\");return e;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;}),r.d(t,\"d\",function(){return s;}),r.d(t,\"c\",function(){return u;});var n,i,a=r(6),o=r(207);function s(e,t,r){var i=e[t];switch(r){case n.Highlight:return i%2==0&&(e[t]=i+1,!0);case n.RemoveHighlight:return i%2!=0&&(e[t]=i-1,!0);case n.Select:return i<2&&(e[t]=i+2,!0);case n.Deselect:return e[t]=i%2,e[t]!==i;case n.Toggle:return e[t]=i>=2?i-2:i+2,!0;case n.Clear:return e[t]=0,0!==i;}return!1;}function u(e,t,r){var n=!1;if(a.Interval.is(t))for(var i=a.Interval.start(t),o=a.Interval.end(t);i<o;i++)n=s(e,i,r)||n;else for(i=0,o=t.length;i<o;i++)n=s(e,t[i],r)||n;return n;}!function(e){e[e.None=0]=\"None\",e[e.Highlight=1]=\"Highlight\",e[e.RemoveHighlight=2]=\"RemoveHighlight\",e[e.Select=4]=\"Select\",e[e.Deselect=8]=\"Deselect\",e[e.Toggle=16]=\"Toggle\",e[e.Clear=32]=\"Clear\";}(n||(n={})),function(e){e.is=o.a.has,e.All=n.Highlight|n.RemoveHighlight|n.Select|n.Deselect|n.Toggle|n.Clear,e.Highlighting=n.Highlight|n.RemoveHighlight|n.Clear,e.Selecting=n.Select|n.Deselect|n.Toggle|n.Clear;}(i||(i={}));},function(e,t,r){\"use strict\";r.d(t,\"d\",function(){return n;}),r.d(t,\"c\",function(){return i;}),r.d(t,\"f\",function(){return a;}),r.d(t,\"e\",function(){return o;}),r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;});var n=Math.PI/2;function i(e){return .01745*e;}function a(e){return 57.29578*e;}function o(e){return 0!==e&&0==(e&e-1);}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=0,i=0,a=e.length;i<a;++i){var o=e[i],s=Math.abs(o);s>n&&(r=o,n=s);}return r;}function u(e,t){return e*t;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n,i=r(43),a=Object(i.ColorMap)({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflower:6591981,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,laserlemon:16777044,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrod:16448210,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,maroon2:8323072,maroon3:11546720,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,purple2:8323199,purple3:10494192,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});n=new Map(),Object.keys(a).forEach(function(e){n.set(a[e],e);});},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return P;}),r.d(t,\"d\",function(){return j;}),r.d(t,\"g\",function(){return E;}),r.d(t,\"h\",function(){return A;}),r.d(t,\"e\",function(){return T;}),r.d(t,\"f\",function(){return D;}),r.d(t,\"a\",function(){return I;}),r.d(t,\"b\",function(){return M;}),r.d(t,\"i\",function(){return k;}),r.d(t,\"j\",function(){return B;});var n=r(0),i=r(4),a=r(68),o=r(144),s=r(89),u=r(51),c=r(115),l=r(23),d=r(6),f=r(164),p=r(196),m=r(125),h=r(5),g=r(145),v=r(117),b=r(39),y=r(150),_=r(257),S=r(256),O=r(74),x=(r(123),r(264),r(258)),C=r(94);function w(e,t){var r,n,b,y,_,S,O,x=e.defaultProps,C=e.createGeometry,w=e.createLocationIterator,P=e.getLoci,j=e.eachLocation,E=e.setUpdateState,A=e.geometryUtils,T=A.createEmpty,D=A.updateValues,I=A.updateBoundingSphere,M=A.updateRenderableState,k=f.a.create(),B=Object.assign({},x),V=s.a.createEmpty();function R(e){if(k.createNew){if(O=w(n),!e)throw new Error(\"expected geometry to be given\");r=function(e,t,r,n,i,a){var s=o.a.getUtils(t),l=s.createValues,d=s.createRenderableState,f=l(t,Object(u.c)(e),r,n,i),p=d(i);return Object(c.a)(t.kind,f,p,a);}(n.group,e,O,V,B,t);}else{if(!r)throw new Error(\"expected renderObject to be available\");if(k.updateTransform){var i=(O=w(n)).instanceCount,a=O.groupCount;Object(m.a)(i*a,r.values);}if(k.updateMatrix&&Object(u.c)(n.group,r.values),k.createGeometry){if(!e)throw new Error(\"expected geometry to be given\");h.e.update(r.values.drawCount,o.a.getDrawCount(e));}(k.updateTransform||k.createGeometry)&&I(r.values,e||S),k.updateSize&&\"uSize\"in r.values&&Object(g.a)(O,V.size,r.values),k.updateColor&&Object(v.a)(O,V.color,r.values),D(r.values,B),M(r.state,B);}b=B,y=V,_=n,e&&(S=e);}function L(e,t,r){return function(e){return!!Object(l.isEveryLoci)(e)||!(!i.Structure.isLoci(e)||!i.Structure.areRootsEquivalent(e.structure,_.structure))||!!(i.StructureElement.Loci.is(e)&&i.Structure.areRootsEquivalent(e.structure,_.structure)&&i.StructureElement.Loci.isWholeStructure(e));}(e)?t(d.Interval.ofBounds(0,O.groupCount*O.instanceCount)):j(e,_,t,r);}return{get groupCount(){return O?O.count:0;},get renderObject(){return O&&O.count?r:void 0;},createOrUpdate:function createOrUpdate(e,t,a,o){if(void 0===a&&(a={}),function(e,t,a){if(void 0===t&&(t={}),!a&&!_)throw new Error(\"missing structureGroup\");if(B=Object.assign({},b,t),V=e,n=a,f.a.reset(k),r&&_&&i.Unit.SymmetryGroup.areInvariantElementsEqual(n.group,_.group)||(k.createNew=!0),k.createNew)k.createGeometry=!0;else{E(k,B,b,V,y,n,_),p.a.areEqual(V.color,y.color)||(k.updateColor=!0),Object(h.h)(B.unitKinds,b.unitKinds)||(k.createGeometry=!0),n.group.transformHash!==_.group.transformHash&&(n.group.units.length!==_.group.units.length||k.updateColor?k.updateTransform=!0:k.updateMatrix=!0);var o=n.group.units[0],s=_.group.units[0];i.Unit.conformationId(o)===i.Unit.conformationId(s)&&o.conformation===s.conformation||(k.updateTransform=!0,k.createGeometry=!0),k.updateTransform&&(k.updateColor=!0,k.updateSize=!0,k.updateMatrix=!0),k.createGeometry&&(k.updateColor=!0,k.updateSize=!0);}}(t,a,o||_),k.createGeometry){var s=function(e,t,r,n,i,a){return Object(u.j)(i.unitKinds,t)?C(e,t,r,n,i,a):T(a);}(e,n.group.units[0],n.structure,V,B,S);return s instanceof Promise?s.then(R):R(s);}R();},getLoci:function getLoci(e){return r?P(e,_,r.id):l.EmptyLoci;},mark:function mark(e,t){return a.a.mark(r,e,t,L);},setVisibility:function setVisibility(e){a.a.setVisibility(r,e);},setAlphaFactor:function setAlphaFactor(e){a.a.setAlphaFactor(r,e);},setPickable:function setPickable(e){a.a.setPickable(r,e);},setTransform:function setTransform(e,t){a.a.setTransform(r,e,t);},setOverpaint:function setOverpaint(e){a.a.setOverpaint(r,e,L,!0);},setTransparency:function setTransparency(e){a.a.setTransparency(r,e,L,!0);},setClipping:function setClipping(e){a.a.setClipping(r,e,L,!0);},destroy:function destroy(){r=void 0;}};}var P=Object(n.__assign)(Object(n.__assign)({},C.c),C.d);function j(e,t){return w(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.createGeometry=!0);},geometryUtils:b.a.Utils}),t);}var E=Object(n.__assign)(Object(n.__assign)({},C.f),C.d);function A(e,t){return w(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0);},geometryUtils:_.a.Utils}),t);}var T=Object(n.__assign)(Object(n.__assign)({},C.e),C.d);function D(e,t){return w(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0);},geometryUtils:S.a.Utils}),t);}var I=Object(n.__assign)(Object(n.__assign)({},C.b),C.d);function M(e,t){return w(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0);},geometryUtils:O.a.Utils}),t);}Object(n.__assign)(Object(n.__assign)({},C.g),C.d);Object(n.__assign)(Object(n.__assign)({},C.a),C.d);var k=Object(n.__assign)(Object(n.__assign)({},C.h),C.d);function B(e,t){return w(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.createGeometry=!0);},geometryUtils:x.a.Utils}),t);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});var n,i,a=r(5),o=r(6),s=r(144),u=r(1),c=r(11),l=r(195),d=r(360),f=r(361),p=r(182),m=r(115),h=r(86);!function(e){function t(e){var t=e.transforms.length,r=i.Location(e);return Object(h.a)(e.groupCount,t,function(e,t){return r.group=e,r.instance=t,r;});}e.create=function(e,t,r,n,i,o,c){return{id:a.c.create22(),name:e,sourceData:t,geometry:r,transforms:c||[u.Mat4.identity()],get groupCount(){return s.a.getGroupCount(r);},getColor:n,getSize:i,getLabel:o};},e.getTheme=function(e){return{color:Object(f.a)({shape:e},{}),size:Object(d.a)({shape:e},{})};},e.groupIterator=t,e.createTransform=function(e,t){for(var r=t&&t.aTransform.ref.value.length>=16*e.length?t.aTransform.ref.value:new Float32Array(16*e.length),n=0,i=e.length;n<i;++n)u.Mat4.toArray(e[n],r,16*n);return Object(p.b)(r,e.length,t);},e.createRenderObject=function(r,n){var i=e.getTheme(r),a=s.a.getUtils(r.geometry),o=Object(m.c)(),u=t(r),c=e.createTransform(r.transforms),l=a.createValues(r.geometry,c,u,i,n),d=a.createRenderableState(n);return Object(m.a)(r.geometry.kind,l,d,o);},e.Loci=function(e){return{kind:\"shape-loci\",shape:e};},e.isLoci=function(e){return!!e&&\"shape-loci\"===e.kind;},e.areLociEqual=function(e,t){return e.shape===t.shape;},e.isLociEmpty=function(e){return 0===e.shape.groupCount;};}(n||(n={})),function(e){function t(e){for(var t=0,r=0,n=e.groups;r<n.length;r++){var i=n[r];t+=o.OrderedSet.size(i.ids);}return t;}e.Location=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=0),{kind:\"group-location\",shape:e,group:t,instance:r};},e.isLocation=function(e){return!!e&&\"group-location\"===e.kind;},e.Loci=function(e,t){return{kind:\"group-loci\",shape:e,groups:t};},e.isLoci=function(e){return!!e&&\"group-loci\"===e.kind;},e.areLociEqual=function(e,t){if(e.shape!==t.shape)return!1;if(e.groups.length!==t.groups.length)return!1;for(var r=0,n=e.groups.length;r<n;++r){var i=e.groups[r],a=i.ids,s=i.instance,u=t.groups[r],c=u.ids;if(s!==u.instance)return!1;if(!o.OrderedSet.areEqual(a,c))return!1;}return!0;},e.isLociEmpty=function(e){return 0===t(e);},e.size=t;var r=new l.a(),n=u.Vec3.zero();function i(e,t,i,a){for(var s=t.indices,c=t.offsets,l=function l(e,t){o.OrderedSet.forEach(e,function(e){for(var o=c[e],l=c[e+1];o<l;++o)u.Vec3.fromArray(n,i,3*s[o]),u.Vec3.transformMat4(n,n,a[t]),r.includeStep(n);});},d=0,f=e;d<f.length;d++){var p=f[d];l(p.ids,p.instance);}}function a(e,t,i,a){for(var s=t.indices,c=t.offsets,l=function l(e,t){o.OrderedSet.forEach(e,function(e){for(var o=c[e],l=c[e+1];o<l;++o)u.Vec3.fromArray(n,i,3*s[o]),u.Vec3.transformMat4(n,n,a[t]),r.radiusStep(n);});},d=0,f=e;d<f.length;d++){var p=f[d];l(p.ids,p.instance);}}e.getBoundingSphere=function(e,t){t||(t=Object(c.g)()),r.reset();var n=0,s=e.shape,l=s.geometry,d=s.transforms;if(\"mesh\"===l.kind||\"points\"===l.kind){var f=\"mesh\"===l.kind?l.vertexBuffer.ref.value:l.centerBuffer.ref.value;i(e.groups,l.groupMapping,f,d),r.finishedIncludeStep(),a(e.groups,l.groupMapping,f,d);}else if(\"lines\"===l.kind){var p=l.startBuffer.ref.value,m=l.endBuffer.ref.value;i(e.groups,l.groupMapping,p,d),i(e.groups,l.groupMapping,m,d),r.finishedIncludeStep(),a(e.groups,l.groupMapping,p,d),a(e.groups,l.groupMapping,m,d);}else{if(\"spheres\"!==l.kind&&\"text\"!==l.kind)return c.g.copy(t,l.boundingSphere);f=l.centerBuffer.ref.value;i(e.groups,l.groupMapping,f,d),r.finishedIncludeStep(),a(e.groups,l.groupMapping,f,d);for(var h=function h(t,r){o.OrderedSet.forEach(t,function(t){var i=e.shape.getSize(t,r);n<i&&(n=i);});},g=0,v=e.groups;g<v.length;g++){var b=v[g];h(b.ids,b.instance);}}return u.Vec3.copy(t.center,r.center),t.radius=Math.sqrt(r.radiusSq),c.g.expand(t,t,n),t;};}(i||(i={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(167),i=r(285),a=r(44);function o(e,t,r,o,s){if(void 0===s&&(s=new n.a(e,r,o)),!s.closed)return t instanceof a.a?t.subscribe(s):Object(i.a)(t)(s);}},function(e,t,r){\"use strict\";r.d(t,\"g\",function(){return h;}),r.d(t,\"e\",function(){return g;}),r.d(t,\"f\",function(){return v;}),r.d(t,\"c\",function(){return b;}),r.d(t,\"b\",function(){return y;}),r.d(t,\"j\",function(){return _;}),r.d(t,\"d\",function(){return S;}),r.d(t,\"a\",function(){return O;}),r.d(t,\"i\",function(){return w;}),r.d(t,\"h\",function(){return P;}),r.d(t,\"k\",function(){return E;}),r.d(t,\"l\",function(){return A;});var n=r(0),i=r(4),a=r(1),o=r(182),s=r(6),u=r(23),c=r(281),l=r(119),d=r(30),f=r(2),p=r(185),m=r(11);function h(e,t,r){var n=t.elements,a=t.model;if(-1!==s.OrderedSet.indexOf(n,r)){for(var o=a.atomicHierarchy.residueAtomSegments,c=o.index,l=o.offsets,d=c[r],f=[],p=l[d],m=l[d+1];p<m;++p){var h=s.OrderedSet.indexOf(n,p);-1!==h&&f.push(h);}var g=s.OrderedSet.ofSortedArray(s.SortedArray.ofSortedArray(f));return i.StructureElement.Loci(e,[{unit:t,indices:g}]);}return u.EmptyLoci;}function g(e,t,r){var n=t.elements,a=t.model,o=a.atomicHierarchy.atoms.label_alt_id.value(r);return-1!==s.OrderedSet.indexOf(n,r)?v(e,t,a.atomicHierarchy.residueAtomSegments.index[r],o):i.StructureElement.Loci(e,[]);}function v(e,t,r,n){for(var a=t.elements,o=t.model,u=o.atomicHierarchy.atoms.label_alt_id,c=o.atomicHierarchy.residueAtomSegments.offsets,l=[],d=c[r],f=c[r+1];d<f;++d){var p=s.OrderedSet.indexOf(a,d);if(-1!==p){var m=u.value(d);n!==m&&\"\"!==m||l.push(p);}}var h=s.OrderedSet.ofSortedArray(s.SortedArray.ofSortedArray(l));return i.StructureElement.Loci(e,[{unit:t,indices:h}]);}function b(e,t){for(var r=e.units,n=r.length,i=16*n,s=t&&t.aTransform.ref.value.length>=i?t.aTransform.ref.value:new Float32Array(i),u=0;u<n;u++)a.Mat4.toArray(r[u].conformation.operator.matrix,s,16*u);return Object(o.b)(s,n,t);}var y=f.ParamDefinition.objectToOptions({atomic:{},spheres:{},gaussians:{}});function _(e,t){for(var r=0,n=e.length;r<n;++r){if(i.Unit.isAtomic(t)&&\"atomic\"===e[r])return!0;if(i.Unit.isSpheres(t)&&\"spheres\"===e[r])return!0;if(i.Unit.isGaussians(t)&&\"gaussians\"===e[r])return!0;}return!1;}function S(e,t){var r=m.b.volume(e),i=r/t.resolution>5e8?r/5e8:t.resolution;return Object(n.__assign)(Object(n.__assign)({},t),{resolution:i});}var O={ignoreHydrogens:f.ParamDefinition.Boolean(!1,{description:\"Whether or not to include hydrogen atoms in the surface calculation.\"}),traceOnly:f.ParamDefinition.Boolean(!1,{description:\"Whether or not to only use trace atoms in the surface calculation.\"}),includeParent:f.ParamDefinition.Boolean(!1,{description:\"Include elements of the parent structure in surface calculation to get a surface patch of the current structure.\"})},x=(f.ParamDefinition.getDefaultValues(O),Object(a.Vec3)());function C(e,t,r,n){return a.Vec3.squaredDistance(a.Vec3.set(x,e,t,r),n);}function w(e,t,r){var n,a,o=r.ignoreHydrogens,u=r.traceOnly,l=r.includeParent,f=l?e.root.unitMap.get(t.id):t,m=function(e){switch(e.kind){case 0:return e.model.atomicConformation;case 1:return e.model.coarseConformation.spheres;case 2:return e.model.coarseConformation.gaussians;}}(f),h=m.x,g=m.y,v=m.z,b=f.elements,y=t.boundary.sphere,_=y.center,S=y.radius,O=(S+7)*(S+7);if(o||l&&f!==t){for(var x=[],w=[],P=0,j=b.length;P<j;++P){var T=b[P];o&&E(f,T)||u&&!A(f,T)||l&&C(h[T],g[T],v[T],_)>O||(x.push(T),w.push(P));}n=s.SortedArray.ofSortedArray(x),a=w;}else n=b,a=Object(d.fillSerial)(new Int32Array(n.length));l&&f!==t&&function(e,t,r){for(var n=0,i=t.length,a=0,o=r.length;a<o;++a){var u=s.SortedArray.indexOfInRange(t,r[a],n,i);-1===u?e[a]=-2:(e[a]=u,n=u);}}(a,t.elements,n);var D={indices:n,x:h,y:g,z:v,id:a},I=t===f?t.boundary:Object(p.a)(D),M=i.StructureElement.Location.create(e,f),k=Object(c.a)({},{scale:1});return{position:D,boundary:I,radius:function radius(e){return M.element=e,k.size(M);}};}function P(e,t,r){var n,a,o,u,l,f=i.StructureElement.Location.create(e),p=Object(c.a)({},{scale:1});if(t||r){for(var m=[],h=[],g=[],v=[],b=[],y=0,_=0,S=e.units.length;y<S;++y){var O=(M=e.units[y]).elements,x=M.conformation,C=x.x,w=x.y,P=x.z;f.unit=M;for(var j=0,T=O.length;j<T;++j){var D=O[j];t&&E(M,D)||r&&!A(M,D)||(m.push(C(D)),h.push(w(D)),g.push(P(D)),f.element=D,v.push(p.size(f)),b.push(_+j));}_+=O.length;}n=m,a=h,o=g,u=v,l=b;}else{var I=e.elementCount;for(m=new Float32Array(I),h=new Float32Array(I),g=new Float32Array(I),v=new Float32Array(I),y=0,_=0,S=e.units.length;y<S;++y){O=(M=e.units[y]).elements;var M,k=M.conformation;C=k.x,w=k.y,P=k.z;f.unit=M;for(j=0,T=O.length;j<T;++j){D=O[j];var B=_+j;m[B]=C(D),h[B]=w(D),g[B]=P(D),f.element=D,v[B]=p.size(f);}_+=O.length;}n=m,a=h,o=g,u=v,l=Object(d.fillSerial)(new Uint32Array(I));}return{position:{indices:s.OrderedSet.ofRange(0,l.length),x:n,y:a,z:o,id:l},radius:function radius(e){return u[e];}};}var j=l.AtomicNumbers.H;function E(e,t){return!i.Unit.isCoarse(e)&&Object(l.AtomNumber)(e.model.atomicHierarchy.atoms.type_symbol.value(t))===j;}function A(e,t){if(i.Unit.isCoarse(e))return!0;var r=e.model.atomicHierarchy.atoms.label_atom_id.value(t);return\"CA\"===r||\"P\"===r;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(21),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t);},t.prototype.notifyError=function(e,t){this.destination.error(e);},t.prototype.notifyComplete=function(e){this.destination.complete();},t;}(r(35).a);},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return o;}),r.d(t,\"d\",function(){return s;}),r.d(t,\"a\",function(){return f;}),r.d(t,\"b\",function(){return p;});var n=r(11),i=r(1),a=r(126);function o(e,t,r,n){var i=function(e,t){var r=Math.sqrt(e),n=Math.ceil(r),i=(n+=(t-n%t)%t)>0?Math.ceil(e/n):0;return{width:n,height:i,length:n*i*t};}(e,t),a=i.length,o=i.width,s=i.height;return{array:n=n&&n.length>=a?n:new r(a),width:o,height:s};}function s(e,t){void 0===t&&(t=1);var r=e.array,n=e.width,i=e.height,a=r.length/(n*i),o=new Uint8ClampedArray(n*i*4);if(1===a)for(var s=0;s<i;++s)for(var u=0;u<n;++u)o[4*(s*n+u)+3]=r[s*n+u];else 4===a?o.set(r):console.warn(\"itemSize '\"+a+\"' not supported\");return function(e,t,r){void 0===t&&(t=1);void 0===r&&(r=!1);var n=document.createElement(\"canvas\");n.width=e.width,n.height=e.height;var i=n.getContext(\"2d\");if(!i)throw new Error(\"Could not create canvas 2d context\");i.putImageData(e,0,0),n.toBlob(function(n){var i=window.URL.createObjectURL(n),a=document.createElement(\"img\");a.src=i,a.style.width=e.width*t+\"px\",a.style.height=e.height*t+\"px\",r&&(a.style.imageRendering=\"pixelated\"),a.style.position=\"absolute\",a.style.top=\"0px\",a.style.left=\"0px\",a.style.border=\"solid grey\",document.body.appendChild(a);},\"image/png\");}(new ImageData(o,n,i),t);}var u=i.Vec3.zero(),c=new a.a(\"14\"),l=new a.a(\"98\");function d(e){return e>5e5?c:l;}function f(e,t,r){var a=3*r,o=d(t);o.reset();for(var s=0,c=3*t;s<c;s+=a)i.Vec3.fromArray(u,e,s),o.includePosition(u);o.finishedIncludeStep();for(s=0,c=3*t;s<c;s+=a)i.Vec3.fromArray(u,e,s),o.radiusPosition(u);var l=o.getSphere();if(t<=98){var f=[];for(s=0,c=3*t;s<c;s+=a)f.push(i.Vec3.fromArray(Object(i.Vec3)(),e,s));n.g.setExtrema(l,f);}return l;}function p(e,t,r){var n=d(r);n.reset();var a=e.center,o=e.radius,s=e.extrema;if(s&&r<50){for(var c=0,l=r;c<l;++c)for(var f=0,p=s;f<p.length;f++){var m=p[f];i.Vec3.transformMat4Offset(u,m,t,0,0,16*c),n.includePosition(u);}n.finishedIncludeStep();for(c=0,l=r;c<l;++c)for(var h=0,g=s;h<g.length;h++){m=g[h];i.Vec3.transformMat4Offset(u,m,t,0,0,16*c),n.radiusPosition(u);}}else{for(c=0,l=r;c<l;++c)i.Vec3.transformMat4Offset(u,a,t,0,0,16*c),n.includePositionRadius(u,o);n.finishedIncludeStep();for(c=0,l=r;c<l;++c)i.Vec3.transformMat4Offset(u,a,t,0,0,16*c),n.radiusPositionRadius(u,o);}return n.getSphere();}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return s;}),r.d(t,\"b\",function(){return u;});var n=r(0),i=r(40),a=r(222);r.d(t,\"a\",function(){return a.a;});r(110);var o=r(104);r.d(t,\"d\",function(){return o.a;});r(48);var s={create:function create(){return Object(n.__assign)(Object(n.__assign)({},i.a.createState()),{unitTransforms:null,unitTransformsVersion:-1});},update:function update(e,t){i.a.updateState(e,t),void 0!==t.unitTransforms&&(e.unitTransforms=t.unitTransforms);}};function u(e){return e;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"b\",function(){return a;}),r.d(t,\"c\",function(){return s;});var n=function(){function e(e,t){this.getHash=e,this.areEqual=t,this.size=0,this.byHash=new Map();}return e.prototype.add=function(e){var t=this.getHash(e);if(this.byHash.has(t)){for(var r=this.byHash.get(t),n=0,i=r.length;n<i;n++)if(this.areEqual(e,r[n]))return!1;return r[r.length]=e,this.size++,!0;}return this.byHash.set(t,[e]),this.size++,!0;},e.prototype.has=function(e){var t=this.getHash(e);if(!this.byHash.has(t))return!1;for(var r=this.byHash.get(t),n=0,i=r.length;n<i;n++)if(this.areEqual(e,r[n]))return!0;return!1;},e;}();function i(e,t){return new n(e,t);}function a(){return new u();}function o(e){return{previous:null,next:null,inList:!0,value:e};}var s,u=function(){function e(){this.count=0,this.first=null,this.last=null;}return e.prototype.addFirst=function(e){var t=o(e);return t.inList=!0,this.first&&(this.first.previous=t),t.next=this.first,this.first=t,this.count++,this.last||(this.last=t),t;},e.prototype.addLast=function(e){var t=o(e);return null!==this.last&&(this.last.next=t),t.previous=this.last,this.last=t,null===this.first&&(this.first=t),t.inList=!0,this.count++,t;},e.prototype.removeFirst=function(){var e=this.first;if(e)return this.remove(e),e.value;},e.prototype.removeLast=function(){var e=this.last;if(e)return this.remove(e),e.value;},e.prototype.remove=function(e){e.inList&&(e.inList=!1,null!==e.previous?e.previous.next=e.next:null===e.previous&&(this.first=e.next),null!==e.next?e.next.previous=e.previous:null===e.next&&(this.last=e.previous),e.next=null,e.previous=null,this.count--);},e.prototype.find=function(e){for(var t=this.first;null!==t;){if(t.value===e)return t;t=t.next;}},e;}();!function(e){e.create=function(){return{keys:new Set(),array:[]};},e.add=function(e,t,r){var n=e.keys,i=e.array;return!n.has(t)&&(n.add(t),i[i.length]=r,!0);},e.has=function(e,t){return e.keys.has(t);};}(s||(s={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(0),i=r(3),a=r(19),o=r(14),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hide=function(){return t.props.onSelect(void 0);},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=i.createElement(u,{items:e.items,onSelect:e.onSelect,current:e.current,multiselect:this.props.multiselect,noOffset:this.props.noOffset,noAccent:this.props.noAccent});return i.createElement(\"div\",{className:\"msp-action-menu-options\"+(e.header?\"\":\" msp-action-menu-options-no-header\")},e.header&&i.createElement(a.ControlGroup,{header:e.header,title:e.title,initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.hide,topRightIcon:o.CloseSvg},t),!e.header&&t);},t;}(i.PureComponent);!function(e){function t(t,r){for(var n=r||{},i=n.label,a=n.value,o=n.category,s=n.selected,u=n.icon,c=n.addOn,l=n.description,d=void 0,f=[],p=0;p<t.length;p++){var m=t[p];if(!(null==r?void 0:r.filter)||r.filter(m)){var h=null==o?void 0:o(m),g=i?i(m):\"\"+m,v=a?a(m):m,b=l?l(m):\"string\"==typeof m?m:void 0,y=void 0;h?(d||(d=new Map()),(y=d.get(h))||(y=[e.Header(h,{description:h})],d.set(h,y),f.push(y))):y=f;var _=null==c?void 0:c(m);y.push({kind:\"item\",label:g,value:v,icon:u?u(m):void 0,selected:s?s(m):void 0,addOn:_,description:b});}}return f;}e.Header=function(e,t){return t?Object(n.__assign)({kind:\"header\",label:e},t):{kind:\"header\",label:e};},e.Item=function(e,t,r){return Object(n.__assign)({kind:\"item\",label:e,value:t},r);},e.createItems=t;var r={value:function value(e){return e[0];},label:function label(e){return e[1];},category:function category(e){return e[2];}};e.createItemsFromSelectOptions=function(e,i){return t(e,i?Object(n.__assign)(Object(n.__assign)({},r),i):r);},e.hasSelectedItem=function e(t){if(f(t))return!1;if(d(t))return!!t.selected;for(var r=0,n=t;r<n.length;r++){if(e(n[r]))return!0;}return!1;},e.findItem=function e(t,r){if(!f(t)){if(d(t))return t.value===r?t:void 0;for(var n=0,i=t;n<i.length;n++){var a=e(i[n],r);if(a)return a;}}},e.getFirstItem=function e(t){if(!f(t)){if(d(t))return t;for(var r=0,n=t;r<n.length;r++){var i=e(n[r]);if(i)return i;}}};}(s||(s={}));var u=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.state=t.createState(r.props),r.toggleExpanded=function(e){r.setState({isExpanded:!r.state.isExpanded}),e.currentTarget.blur();},r.selectAll=function(){var e=p(r.props.items,[]).filter(function(e){return!e.selected;});r.props.onSelect(e);},r.selectNone=function(){var e=p(r.props.items,[]).filter(function(e){return!!e.selected;});r.props.onSelect(e);},r;}return Object(n.__extends)(t,e),t.createState=function(e,t){var r=l(e.items)&&f(e.items[0])?e.items[0]:void 0,n=!(null==r?void 0:r.isIndependent)&&(e.multiselect?s.hasSelectedItem(e.items):!!e.current&&!!s.findItem(e.items,e.current.value)||s.hasSelectedItem(e.items));return{header:r,hasCurrent:n,isExpanded:n||(null!=t?t:!!(null==r?void 0:r.initiallyExpanded))};},t.prototype.componentDidUpdate=function(e){if(this.props.items!==e.items||this.props.current!==e.current){var r=l(this.props.items)&&l(e.items)&&f(this.props.items[0])&&f(e.items[0])&&this.props.items[0].label===e.items[0].label?this.state.isExpanded:void 0;this.setState(t.createState(this.props,r));}},Object.defineProperty(t.prototype,\"multiselectHeader\",{get:function get(){var e=this.state,t=e.header,r=e.hasCurrent;return i.createElement(\"div\",{className:\"msp-flex-row msp-control-group-header\"},i.createElement(a.Button,{icon:this.state.isExpanded?o.ArrowDropDownSvg:o.ArrowRightSvg,flex:!0,noOverflow:!0,onClick:this.toggleExpanded,title:\"Click to \"+(this.state.isExpanded?\"collapse\":\"expand\")+\".\"+((null==t?void 0:t.description)?\" \"+(null==t?void 0:t.description):\"\")},r?i.createElement(\"b\",null,null==t?void 0:t.label):null==t?void 0:t.label),i.createElement(a.Button,{icon:o.CheckSvg,flex:!0,onClick:this.selectAll,style:{flex:\"0 0 50px\",textAlign:\"right\"}},\"All\"),i.createElement(a.Button,{icon:o.CloseSvg,flex:!0,onClick:this.selectNone,style:{flex:\"0 0 50px\",textAlign:\"right\"}},\"None\"));},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"basicHeader\",{get:function get(){var e=this.state,t=e.header,r=e.hasCurrent;return i.createElement(\"div\",{className:\"msp-control-group-header\",style:{marginTop:\"1px\"}},i.createElement(a.Button,{noOverflow:!0,icon:this.state.isExpanded?o.ArrowDropDownSvg:o.ArrowRightSvg,onClick:this.toggleExpanded,title:\"Click to \"+(this.state.isExpanded?\"collapse\":\"expand\")+\". \"+((null==t?void 0:t.description)?null==t?void 0:t.description:\"\")},r?i.createElement(\"b\",null,null==t?void 0:t.label):null==t?void 0:t.label));},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,r=this.props,n=r.items,a=r.onSelect,o=r.current;if(f(n))return null;if(d(n))return i.createElement(c,{item:n,onSelect:a,current:o,multiselect:this.props.multiselect});var s=this.state.header;return i.createElement(i.Fragment,null,s&&(this.props.multiselect&&this.state.isExpanded?this.multiselectHeader:this.basicHeader),i.createElement(\"div\",{className:this.props.noOffset?void 0:this.props.noAccent?\"msp-control-offset\":\"msp-accent-offset\"},(!s||this.state.isExpanded)&&n.map(function(r,n){return f(r)?null:d(r)?i.createElement(c,{key:n,item:r,onSelect:a,current:o,multiselect:e.props.multiselect}):i.createElement(t,{key:n,items:r,onSelect:a,current:o,multiselect:e.props.multiselect,noAccent:!0});})));},t;}(i.PureComponent),c=function c(e){var t=e.item,r=e.onSelect,n=e.current,o=e.multiselect,s=n===t,u=t.addOn?{position:\"relative\"}:void 0;return i.createElement(a.Button,{icon:t.icon,noOverflow:!0,className:\"msp-action-menu-button\",onClick:function onClick(e){return r(o?[t]:t,e);},disabled:t.disabled,style:u,title:t.description},s||t.selected?i.createElement(\"b\",null,t.label):t.label,t.addOn);};function l(e){return!!e&&Array.isArray(e);}function d(e){return e&&\"item\"===e.kind;}function f(e){return e&&\"header\"===e.kind;}function p(e,t){if(f(e))return t;if(d(e))return t.push(e),t;for(var r=0,n=e;r<n.length;r++){p(n[r],t);}return t;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return f;});var n=r(7).a.Schema,i=n.str,a=n.int,o=n.float,s=n.coord,u=n.Aliased,c=n.Matrix,l=n.Vector,d=n.List,f={atom_site:{auth_asym_id:i,auth_atom_id:i,auth_comp_id:i,auth_seq_id:a,B_iso_or_equiv:o,Cartn_x:s,Cartn_y:s,Cartn_z:s,group_PDB:u(i),id:a,label_alt_id:i,label_asym_id:i,label_atom_id:i,label_comp_id:i,label_entity_id:i,label_seq_id:a,occupancy:o,type_symbol:i,pdbx_PDB_ins_code:i,pdbx_PDB_model_num:a,pdbx_formal_charge:a,ihm_model_id:a},atom_site_anisotrop:{id:a,type_symbol:i,U:c(3,3),U_esd:c(3,3),pdbx_auth_seq_id:i,pdbx_auth_asym_id:i,pdbx_auth_atom_id:i,pdbx_auth_comp_id:i,pdbx_label_seq_id:a,pdbx_label_alt_id:i,pdbx_label_asym_id:i,pdbx_label_atom_id:i,pdbx_label_comp_id:i,pdbx_PDB_ins_code:i},atom_sites:{entry_id:i,fract_transf_matrix:c(3,3),fract_transf_vector:l(3)},audit_author:{name:i,pdbx_ordinal:a,identifier_ORCID:i},audit_conform:{dict_location:i,dict_name:i,dict_version:i},cell:{angle_alpha:o,angle_beta:o,angle_gamma:o,entry_id:i,length_a:o,length_b:o,length_c:o,Z_PDB:a,pdbx_unique_axis:i},chem_comp:{formula:i,formula_weight:o,id:i,mon_nstd_flag:u(i),name:i,type:u(i),pdbx_synonyms:d(\";\",function(e){return e;})},chem_comp_bond:{atom_id_1:i,atom_id_2:i,comp_id:i,value_order:u(i),pdbx_ordinal:a,pdbx_stereo_config:u(i),pdbx_aromatic_flag:u(i)},citation:{book_publisher:i,country:i,id:i,journal_abbrev:i,journal_id_ASTM:i,journal_id_CSD:i,journal_id_ISSN:i,journal_volume:i,page_first:i,page_last:i,title:i,year:a,pdbx_database_id_DOI:i,pdbx_database_id_PubMed:a},citation_author:{citation_id:i,name:i,ordinal:a},database_2:{database_id:u(i),database_code:i},entity:{details:i,formula_weight:o,id:i,src_method:u(i),type:u(i),pdbx_description:d(\",\",function(e){return e;}),pdbx_number_of_molecules:a,pdbx_mutation:i,pdbx_fragment:i,pdbx_ec:d(\",\",function(e){return e;})},entity_poly:{entity_id:i,nstd_linkage:u(i),nstd_monomer:u(i),type:u(i),pdbx_strand_id:d(\",\",function(e){return e;}),pdbx_seq_one_letter_code:i,pdbx_seq_one_letter_code_can:i,pdbx_target_identifier:i},entity_poly_seq:{entity_id:i,hetero:u(i),mon_id:i,num:a},entry:{id:i},exptl:{entry_id:i,method:u(i)},struct:{entry_id:i,title:i,pdbx_descriptor:i},struct_asym:{details:i,entity_id:i,id:i,pdbx_modified:i,pdbx_blank_PDB_chainid_flag:u(i)},struct_conf:{beg_label_asym_id:i,beg_label_comp_id:i,beg_label_seq_id:a,beg_auth_asym_id:i,beg_auth_comp_id:i,beg_auth_seq_id:a,conf_type_id:u(i),details:i,end_label_asym_id:i,end_label_comp_id:i,end_label_seq_id:a,end_auth_asym_id:i,end_auth_comp_id:i,end_auth_seq_id:a,id:i,pdbx_beg_PDB_ins_code:i,pdbx_end_PDB_ins_code:i,pdbx_PDB_helix_class:i,pdbx_PDB_helix_length:a,pdbx_PDB_helix_id:i},struct_conn:{conn_type_id:u(i),details:i,id:i,ptnr1_label_asym_id:i,ptnr1_label_atom_id:i,ptnr1_label_comp_id:i,ptnr1_label_seq_id:a,ptnr1_auth_asym_id:i,ptnr1_auth_comp_id:i,ptnr1_auth_seq_id:a,ptnr1_symmetry:i,ptnr2_label_asym_id:i,ptnr2_label_atom_id:i,ptnr2_label_comp_id:i,ptnr2_label_seq_id:a,ptnr2_auth_asym_id:i,ptnr2_auth_comp_id:i,ptnr2_auth_seq_id:a,ptnr2_symmetry:i,pdbx_ptnr1_PDB_ins_code:i,pdbx_ptnr1_label_alt_id:i,pdbx_ptnr1_standard_comp_id:i,pdbx_ptnr2_PDB_ins_code:i,pdbx_ptnr2_label_alt_id:i,pdbx_ptnr3_PDB_ins_code:i,pdbx_ptnr3_label_alt_id:i,pdbx_ptnr3_label_asym_id:i,pdbx_ptnr3_label_atom_id:i,pdbx_ptnr3_label_comp_id:i,pdbx_ptnr3_label_seq_id:a,pdbx_PDB_id:i,pdbx_dist_value:o,pdbx_value_order:u(i)},struct_conn_type:{criteria:i,id:u(i),reference:i},struct_keywords:{entry_id:i,text:d(\",\",function(e){return e;}),pdbx_keywords:i},struct_ncs_oper:{code:u(i),details:i,id:i,matrix:c(3,3),vector:l(3)},struct_sheet_range:{beg_label_asym_id:i,beg_label_comp_id:i,beg_label_seq_id:a,end_label_asym_id:i,end_label_comp_id:i,end_label_seq_id:a,beg_auth_asym_id:i,beg_auth_comp_id:i,beg_auth_seq_id:a,end_auth_asym_id:i,end_auth_comp_id:i,end_auth_seq_id:a,id:i,sheet_id:i,pdbx_beg_PDB_ins_code:i,pdbx_end_PDB_ins_code:i},struct_site:{details:i,id:i,pdbx_num_residues:a,pdbx_evidence_code:i,pdbx_auth_asym_id:i,pdbx_auth_comp_id:i,pdbx_auth_seq_id:i,pdbx_auth_ins_code:i},struct_site_gen:{details:i,id:i,label_alt_id:i,label_asym_id:i,label_atom_id:i,label_comp_id:i,label_seq_id:a,auth_asym_id:i,auth_comp_id:i,auth_seq_id:i,site_id:i,symmetry:i,pdbx_auth_ins_code:i,pdbx_num_res:a},symmetry:{entry_id:i,cell_setting:u(i),Int_Tables_number:a,space_group_name_Hall:i,\"space_group_name_H-M\":i},pdbx_database_status:{status_code:u(i),status_code_sf:u(i),status_code_mr:u(i),entry_id:i,recvd_initial_deposition_date:i,SG_entry:u(i),deposit_site:u(i),process_site:u(i),status_code_cs:u(i),methods_development_category:u(i),pdb_format_compatible:u(i)},pdbx_nonpoly_scheme:{asym_id:i,entity_id:i,mon_id:i,pdb_strand_id:i,ndb_seq_num:i,pdb_seq_num:i,auth_seq_num:i,pdb_mon_id:i,auth_mon_id:i,pdb_ins_code:i},pdbx_database_related:{db_name:i,details:i,db_id:i,content_type:u(i)},pdbx_entity_nonpoly:{entity_id:i,comp_id:i,name:i},pdbx_chem_comp_synonyms:{name:i,comp_id:i,provenance:u(i)},pdbx_chem_comp_identifier:{comp_id:i,identifier:i,type:u(i),program:i,program_version:i},pdbx_unobs_or_zero_occ_residues:{id:a,polymer_flag:u(i),occupancy_flag:u(a),PDB_model_num:a,auth_asym_id:i,auth_comp_id:i,auth_seq_id:i,PDB_ins_code:i,label_asym_id:i,label_comp_id:i,label_seq_id:a},pdbx_struct_mod_residue:{id:a,auth_asym_id:i,auth_comp_id:i,auth_seq_id:a,PDB_ins_code:i,label_asym_id:i,label_comp_id:i,label_seq_id:a,parent_comp_id:i,details:i},pdbx_struct_oper_list:{id:i,type:u(i),name:i,symmetry_operation:i,matrix:c(3,3),vector:l(3)},pdbx_struct_assembly:{method_details:i,oligomeric_details:i,oligomeric_count:a,details:i,id:i},pdbx_struct_assembly_gen:{asym_id_list:d(\",\",function(e){return e;}),assembly_id:i,oper_expression:i},pdbx_reference_entity_list:{prd_id:i,ref_entity_id:i,type:u(i),details:i,component_id:a},pdbx_reference_entity_link:{link_id:a,prd_id:i,details:i,ref_entity_id_1:i,ref_entity_id_2:i,entity_seq_num_1:a,entity_seq_num_2:a,comp_id_1:i,comp_id_2:i,atom_id_1:i,atom_id_2:i,value_order:u(i),component_1:a,component_2:a,link_class:u(i)},pdbx_reference_entity_poly_link:{link_id:a,prd_id:i,ref_entity_id:i,component_id:a,entity_seq_num_1:a,entity_seq_num_2:a,comp_id_1:i,comp_id_2:i,atom_id_1:i,atom_id_2:i,value_order:u(i)},pdbx_molecule:{prd_id:i,instance_id:a,asym_id:i},pdbx_molecule_features:{prd_id:i,class:u(i),type:u(i),name:i,details:i},entity_src_nat:{entity_id:i,pdbx_organism_scientific:i,pdbx_plasmid_name:i,pdbx_src_id:a,pdbx_beg_seq_num:a,pdbx_end_seq_num:a},entity_src_gen:{entity_id:i,pdbx_gene_src_gene:d(\",\",function(e){return e;}),pdbx_gene_src_scientific_name:i,plasmid_name:i,pdbx_src_id:a,pdbx_beg_seq_num:a,pdbx_end_seq_num:a},pdbx_entity_src_syn:{organism_scientific:i,entity_id:i,pdbx_src_id:a,pdbx_beg_seq_num:a,pdbx_end_seq_num:a},pdbx_entity_branch_descriptor:{entity_id:i,descriptor:i,type:u(i),program:i,program_version:i,ordinal:a},pdbx_entity_instance_feature:{details:i,feature_type:u(i),auth_asym_id:i,asym_id:i,auth_seq_num:i,seq_num:a,comp_id:i,auth_comp_id:i,ordinal:a},pdbx_entity_branch_list:{entity_id:i,hetero:u(i),comp_id:i,num:a},pdbx_entity_branch_link:{link_id:a,details:i,entity_id:i,entity_branch_list_num_1:a,entity_branch_list_num_2:a,comp_id_1:i,comp_id_2:i,atom_id_1:i,leaving_atom_id_1:i,atom_stereo_config_1:u(i),atom_id_2:i,leaving_atom_id_2:i,atom_stereo_config_2:u(i),value_order:u(i)},pdbx_entity_branch:{entity_id:i,type:u(i)},pdbx_branch_scheme:{entity_id:i,hetero:u(i),asym_id:i,mon_id:i,num:a,pdb_asym_id:i,pdb_seq_num:i,pdb_mon_id:i,auth_asym_id:i,auth_seq_num:i,auth_mon_id:i},ihm_starting_model_details:{starting_model_id:i,entity_id:i,entity_description:i,asym_id:i,entity_poly_segment_id:a,starting_model_source:u(i),starting_model_auth_asym_id:i,starting_model_sequence_offset:a,dataset_list_id:a},ihm_starting_comparative_models:{id:a,starting_model_id:i,starting_model_auth_asym_id:i,starting_model_seq_id_begin:a,starting_model_seq_id_end:a,template_auth_asym_id:i,template_seq_id_begin:a,template_seq_id_end:a,template_sequence_identity:o,template_sequence_identity_denominator:u(a),template_dataset_list_id:a,alignment_file_id:a},ihm_starting_model_seq_dif:{id:a,entity_id:i,asym_id:i,seq_id:a,comp_id:i,starting_model_id:i,db_asym_id:i,db_seq_id:a,db_comp_id:i,details:i},ihm_model_representation:{id:a,name:i,details:i},ihm_model_representation_details:{id:a,representation_id:a,entity_poly_segment_id:a,entity_id:i,entity_description:i,entity_asym_id:i,model_object_primitive:u(i),starting_model_id:i,model_mode:u(i),model_granularity:u(i),model_object_count:a},ihm_struct_assembly_details:{id:a,assembly_id:a,parent_assembly_id:a,entity_description:i,entity_id:i,asym_id:i,entity_poly_segment_id:a},ihm_struct_assembly:{id:a,name:i,description:i},ihm_modeling_protocol:{id:a,num_steps:a,protocol_name:i},ihm_modeling_protocol_details:{id:a,protocol_id:a,step_id:a,struct_assembly_id:a,dataset_group_id:a,struct_assembly_description:i,step_name:i,step_method:i,num_models_begin:a,num_models_end:a,multi_scale_flag:u(i),multi_state_flag:u(i),ordered_flag:u(i),script_file_id:a,software_id:a},ihm_multi_state_modeling:{state_id:a,state_group_id:a,population_fraction:o,population_fraction_sd:o,state_type:i,state_name:i,experiment_type:u(i),details:i},ihm_modeling_post_process:{id:a,protocol_id:a,analysis_id:a,step_id:a,type:u(i),feature:u(i),num_models_begin:a,num_models_end:a},ihm_ensemble_info:{ensemble_id:a,ensemble_name:i,post_process_id:a,model_group_id:a,ensemble_clustering_method:u(i),ensemble_clustering_feature:u(i),num_ensemble_models:a,num_ensemble_models_deposited:a,ensemble_precision_value:o,ensemble_file_id:a},ihm_model_list:{model_id:a,model_name:i,assembly_id:a,protocol_id:a,representation_id:a},ihm_model_group:{id:a,name:i,details:i},ihm_model_group_link:{model_id:a,group_id:a},ihm_model_representative:{id:a,model_group_id:a,model_id:a,selection_criteria:u(i)},ihm_dataset_list:{id:a,data_type:u(i),database_hosted:u(i)},ihm_dataset_group:{id:a,name:i,application:u(i),details:i},ihm_dataset_group_link:{dataset_list_id:a,group_id:a},ihm_related_datasets:{dataset_list_id_derived:a,dataset_list_id_primary:a},ihm_dataset_related_db_reference:{id:a,dataset_list_id:a,db_name:u(i),accession_code:i,version:i,details:i},ihm_external_reference_info:{reference_id:a,reference_provider:i,reference_type:u(i),reference:i,refers_to:u(i),associated_url:i},ihm_external_files:{id:a,reference_id:a,file_path:i,content_type:u(i),file_size_bytes:o,details:i},ihm_dataset_external_reference:{id:a,dataset_list_id:a,file_id:a},ihm_localization_density_files:{id:a,file_id:a,ensemble_id:a,entity_id:i,entity_poly_segment_id:a,asym_id:i},ihm_predicted_contact_restraint:{id:a,group_id:a,entity_id_1:i,entity_id_2:i,asym_id_1:i,asym_id_2:i,comp_id_1:i,comp_id_2:i,seq_id_1:a,seq_id_2:a,rep_atom_1:u(i),rep_atom_2:u(i),distance_lower_limit:o,distance_upper_limit:o,probability:o,restraint_type:u(i),model_granularity:u(i),dataset_list_id:a,software_id:a},ihm_cross_link_list:{id:a,group_id:a,entity_description_1:i,entity_description_2:i,entity_id_1:i,entity_id_2:i,comp_id_1:i,comp_id_2:i,seq_id_1:a,seq_id_2:a,linker_type:u(i),dataset_list_id:a},ihm_cross_link_restraint:{id:a,group_id:a,entity_id_1:i,entity_id_2:i,asym_id_1:i,asym_id_2:i,comp_id_1:i,comp_id_2:i,seq_id_1:a,seq_id_2:a,atom_id_1:i,atom_id_2:i,restraint_type:u(i),conditional_crosslink_flag:u(i),model_granularity:u(i),distance_threshold:o,psi:o,sigma_1:o,sigma_2:o},ihm_cross_link_result_parameters:{id:a,restraint_id:a,model_id:a,psi:o,sigma_1:o,sigma_2:o},ihm_2dem_class_average_restraint:{id:a,dataset_list_id:a,number_raw_micrographs:a,pixel_size_width:o,pixel_size_height:o,image_resolution:o,image_segment_flag:u(i),number_of_projections:a,struct_assembly_id:a,details:i},ihm_2dem_class_average_fitting:{id:a,restraint_id:a,model_id:a,cross_correlation_coefficient:o,rot_matrix:c(3,3),tr_vector:l(3)},ihm_3dem_restraint:{id:a,dataset_list_id:a,model_id:a,struct_assembly_id:a,fitting_method:i,number_of_gaussians:a,cross_correlation_coefficient:o},ihm_sas_restraint:{id:a,dataset_list_id:a,model_id:a,struct_assembly_id:a,profile_segment_flag:u(i),fitting_atom_type:i,fitting_method:i,fitting_state:u(i),radius_of_gyration:o,chi_value:o,details:i},ihm_starting_model_coord:{ordinal_id:a,starting_model_id:i,group_PDB:u(i),id:a,type_symbol:i,entity_id:i,atom_id:i,comp_id:i,seq_id:a,asym_id:i,Cartn_x:o,Cartn_y:o,Cartn_z:o,B_iso_or_equiv:o},ihm_sphere_obj_site:{id:a,entity_id:i,seq_id_begin:a,seq_id_end:a,asym_id:i,Cartn_x:o,Cartn_y:o,Cartn_z:o,object_radius:o,rmsf:o,model_id:a},ihm_gaussian_obj_site:{id:a,entity_id:i,seq_id_begin:a,seq_id_end:a,asym_id:i,mean_Cartn_x:o,mean_Cartn_y:o,mean_Cartn_z:o,weight:o,covariance_matrix:c(3,3),model_id:a},ihm_gaussian_obj_ensemble:{id:a,entity_id:i,seq_id_begin:a,seq_id_end:a,asym_id:i,mean_Cartn_x:o,mean_Cartn_y:o,mean_Cartn_z:o,weight:o,covariance_matrix:c(3,3),ensemble_id:a},ihm_feature_list:{feature_id:a,feature_type:u(i),entity_type:u(i)},ihm_poly_residue_feature:{ordinal_id:a,feature_id:a,entity_id:i,asym_id:i,comp_id_begin:i,comp_id_end:i,seq_id_begin:a,seq_id_end:a},ihm_derived_distance_restraint:{id:a,group_id:a,feature_id_1:a,feature_id_2:a,group_conditionality:u(i),random_exclusion_fraction:o,distance_upper_limit:o,restraint_type:u(i),dataset_list_id:a},pdbx_chem_comp_related:{comp_id:i,related_comp_id:i,relationship_type:u(i),details:i}};},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return n;}),r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return o;});var n,i=r(96);!function(e){e.create=function(e){return{ref:e};},e.set=function(e,t){return e.ref=t,e;};}(n||(n={}));var a,o,s=Object(i.a)(0,2147483647);!function(e){e.create=function(e,t){return{id:s(),version:0,value:e,metadata:t};},e.withValue=function(e,t){return{id:e.id,version:e.version+1,value:t,metadata:e.metadata};};}(a||(a={})),function(e){function t(e,t){return n.set(e,a.withValue(e.ref,t));}e.create=function(e,t){return n.create(a.create(e,t));},e.update=t,e.set=function(e,t){return n.set(e,t);},e.updateIfChanged=function(e,r){return e.ref.value!==r?t(e,r):e;};}(o||(o={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(84),i=r(41);function a(e,t,r){return void 0===t&&(t=\"\"),void 0===r&&(r=\"\"),a.create(e,t,r);}!function(e){function t(e){return e.triggers.map(r.format).join(\" or \");}function r(e,t){return r.create(e,t);}e.create=function(e,t,r){return void 0===t&&(t=\"\"),void 0===r&&(r=\"\"),{triggers:e,action:t,description:r};},e.Empty={triggers:[],action:\"\",description:\"\"},e.isEmpty=function(e){return 0===e.triggers.length||e.triggers.every(function(e){return void 0===e.buttons&&void 0===e.modifiers;});},e.match=function(e,t,n){return e.triggers.some(function(e){return r.match(e,t,n);});},e.formatTriggers=t,e.format=function(e,r){void 0===r&&(r=\"\");var n=e.description||Object(i.d)(r);return Object(i.c)(n,{triggers:\"<i>\"+t(e)+\"</i>\"});},e.Trigger=r,function(e){e.create=function(e,t){return{buttons:e,modifiers:t};},e.Empty={},e.match=function(e,t,r){var i=e.buttons,a=e.modifiers;return void 0!==i&&(i===t||n.a.has(i,t))&&(!a||n.b.areEqual(a,r));},e.format=function(e){var t=[],r=function(e){var t=[];void 0===e?t.push(\"any mouse button\"):0===e?t.push(\"mouse hover\"):(o.has(e,1)&&t.push(\"left mouse button\"),o.has(e,2)&&t.push(\"right mouse button\"),o.has(e,4)&&t.push(\"wheel/middle mouse button\"),o.has(e,8)&&t.push(\"three fingers\"));return t.join(\" + \");}(e.buttons);r&&t.push(r);var n=function(e,t){var r=[];e?(e.alt&&r.push(\"alt key\"),e.control&&r.push(\"control key\"),e.meta&&r.push(\"meta/command key\"),e.shift&&r.push(\"shift key\"),t&&0===r.length&&r.push(\"no key\")):t&&r.push(\"any key\");return r.join(\" + \");}(e.modifiers);return n&&t.push(n),t.join(\" + \");};}(r=e.Trigger||(e.Trigger={}));}(a||(a={}));var o=n.a;},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return l;}),r.d(t,\"a\",function(){return d;});var n=r(21),i=r(44),a=r(35),o=r(69),s=r(208),u=r(353),c=r(276),l=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r;}return n.a(t,e),t;}(a.a),d=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t;}return n.a(t,e),t.prototype[c.a]=function(){return new l(this);},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t;},t.prototype.next=function(e){if(this.closed)throw new s.a();if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].next(e);},t.prototype.error=function(e){if(this.closed)throw new s.a();this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].error(e);this.observers.length=0;},t.prototype.complete=function(){if(this.closed)throw new s.a();this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0;},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null;},t.prototype._trySubscribe=function(t){if(this.closed)throw new s.a();return e.prototype._trySubscribe.call(this,t);},t.prototype._subscribe=function(e){if(this.closed)throw new s.a();return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.isStopped?(e.complete(),o.a.EMPTY):(this.observers.push(e),new u.a(this,e));},t.prototype.asObservable=function(){var e=new i.a();return e.source=this,e;},t.create=function(e,t){return new f(e,t);},t;}(i.a),f=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n;}return n.a(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e);},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e);},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete();},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):o.a.EMPTY;},t;}(d);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});var n=!0,i=!1;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return P;});var n,i,a,o,s=r(106),u=r(0),c=r(289),l=r(121);function d(e){return function(t,r){return r[e].value(t);};}function f(e){return function(t,r){return r[e].value(t).join(r[e].schema.separator);};}function p(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(r,n){var i;return(i=n[e].schema.space).get.apply(i,Object(u.__spreadArrays)([n[e].value(r)],t));};}function m(e){return function(t,r){return r[e].valueKind(t);};}function h(e,t){var r=[],n=m(e);if(1===t.rank)for(var i=t.dimensions[0],a=0;a<i;a++){var o=e+\"[\"+(a+1)+\"]\";r.push({name:o,type:2,value:p(e,a),valueKind:n});}else if(2===t.rank){i=t.dimensions[0];var s=t.dimensions[1];for(a=0;a<i;a++)for(var u=0;u<s;u++){var c=e+\"[\"+(a+1)+\"][\"+(u+1)+\"]\";r.push({name:c,type:2,value:p(e,a,u),valueKind:n});}}else{if(3!==t.rank)throw new Error(\"Tensors with rank > 3 or rank 0 are currently not supported.\");var l=t.dimensions[0],d=t.dimensions[1],f=t.dimensions[2];for(a=0;a<l;a++)for(u=0;u<d;u++)for(var h=0;h<f;h++){var g=e+\"[\"+(a+1)+\"][\"+(u+1)+\"][\"+(h+1)+\"]\";r.push({name:g,type:2,value:p(e,a,u,h),valueKind:n});}}return r;}function g(e){for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r],a=e[i];if(\"int\"===a.valueType)t.push({name:i,type:1,value:d(i),valueKind:m(i)});else if(\"float\"===a.valueType)t.push({name:i,type:2,value:d(i),valueKind:m(i)});else if(\"str\"===a.valueType)t.push({name:i,type:0,value:d(i),valueKind:m(i)});else if(\"list\"===a.valueType)t.push({name:i,type:0,value:f(i),valueKind:m(i)});else{if(\"tensor\"!==a.valueType)throw new Error(\"Unknown valueType \"+a.valueType);t.push.apply(t,h(i,a.space));}}return t;}!function(e){function t(e,t,r){return{name:e,type:1,value:t,valueKind:r&&r.valueKind,defaultFormat:r?{encoder:r.encoder,typedArray:r.typedArray}:void 0,shouldInclude:r&&r.shouldInclude};}e.str=function(e,t,r){return{name:e,type:0,value:t,valueKind:r&&r.valueKind,defaultFormat:r&&r.encoder?{encoder:r.encoder}:void 0,shouldInclude:r&&r.shouldInclude};},e.int=t,e.float=function(e,t,r){return{name:e,type:2,value:t,valueKind:r&&r.valueKind,defaultFormat:r?{encoder:r.encoder,typedArray:r.typedArray,digitCount:void 0!==r.digitCount?r.digitCount:void 0}:void 0,shouldInclude:r&&r.shouldInclude};},e.index=function(e){return t(e,function(e,t,r){return r+1;},{typedArray:Int32Array,encoder:l.b.by(l.b.delta).and(l.b.runLength).and(l.b.integerPacking)});};var r=function(){function t(){this.fields=[];}return t.prototype.index=function(t){return this.fields.push(e.index(t)),this;},t.prototype.str=function(t,r,n){return this.fields.push(e.str(t,r,n)),this;},t.prototype.int=function(t,r,n){return this.fields.push(e.int(t,r,n)),this;},t.prototype.vec=function(t,r,n){for(var i=0;i<r.length;i++)this.fields.push(e.int(t+\"[\"+(i+1)+\"]\",r[i],n));return this;},t.prototype.float=function(t,r,n){return this.fields.push(e.float(t,r,n)),this;},t.prototype.many=function(e){for(var t=0;t<e.length;t++)this.fields.push(e[t]);return this;},t.prototype.add=function(e){return this.fields.push(e),this;},t.prototype.getFields=function(){return this.fields;},t;}();e.Builder=r,e.build=function(){return new r();};}(n||(n={})),(a=i||(i={})).Empty={fields:[],source:[]},a.filterOf=function(e){for(var t=[],r=[],n=[],i=[],a=0,o=e.split(/[\\r\\n]+/);a<o.length;a++){var s=o[a];if(0!==(s=s.trim()).length){var u=/^!/.test(s);u&&(s=s.substr(1));var c=s.split(/\\./),l=c[1],d=u?l?i:r:l?n:t;d[d.length]=s,l&&!t.includes(c[0])&&(t[t.length]=c[0]);}}var f=n.map(function(e){return e.split(\".\")[0];});return{includeCategory:function includeCategory(e){return!r.includes(e)&&(t.length<=0||-1!==t.indexOf(e));},includeField:function includeField(e,t){var r=e+\".\"+t;return!i.includes(r)&&(!f.includes(e)||n.includes(r));}};},a.DefaultFilter={includeCategory:function includeCategory(e){return!0;},includeField:function includeField(e,t){return!0;}},a.DefaultFormatter={getFormat:function getFormat(e,t){}},a.ofTable=function(e,t){return t?{fields:g(e._schema),source:[{data:e,rowCount:t.length,keys:function keys(){return c.a.Array(t);}}]}:{fields:g(e._schema),source:[{data:e,rowCount:e._rowCount}]};},function(e){function t(e,t,r){e.startDataBlock(t);for(var n=function n(t){e.writeCategory({name:t,instance:function instance(){return i.ofTable(r[t]);}});},a=0,o=r._tableNames;a<o.length;a++){n(o[a]);}}e.writeDatabase=t,e.writeDatabaseCollection=function(e,r){for(var n=0,i=Object.keys(r);n<i.length;n++){var a=i[n];t(e,a,r[a]);}};}(o||(o={}));r(7),r(6),r(9),r(55);function v(e){return e.fields.some(function(e){return!!e.shouldInclude;})?e.fields.filter(function(t){return!t.shouldInclude||e.source.some(function(e){return t.shouldInclude(e.data);});}):e.fields;}function b(e,t){var r=e.instance(t),n=r.source.filter(function(e){return e.rowCount>0;});return n.length?{instance:r,rowCount:n.reduce(function(e,t){return e+t.rowCount;},0),source:n.map(function(e){return{data:e.data,keys:function keys(){return e.keys?e.keys():c.a.Range(0,e.rowCount-1);},rowCount:e.rowCount};})}:{instance:r,rowCount:0,source:[]};}var y=function(){function e(){this.builder=s.a.create(),this.encoded=!1,this.dataBlockCreated=!1,this.filter=i.DefaultFilter,this.formatter=i.DefaultFormatter,this.isBinary=!1,this.binaryEncodingProvider=void 0;}return e.prototype.setFilter=function(e){this.filter=e||i.DefaultFilter;},e.prototype.isCategoryIncluded=function(e){return this.filter.includeCategory(e);},e.prototype.setFormatter=function(e){this.formatter=e||i.DefaultFormatter;},e.prototype.startDataBlock=function(e){this.dataBlockCreated=!0,s.a.write(this.builder,\"data_\"+(e||\"\").replace(/[ \\n\\t]/g,\"\").toUpperCase()+\"\\n#\\n\");},e.prototype.writeCategory=function(e,t,r){if(this.encoded)throw new Error(\"The writer contents have already been encoded, no more writing.\");if(!this.dataBlockCreated)throw new Error(\"No data block created.\");if((null==r?void 0:r.ignoreFilter)||this.filter.includeCategory(e.name)){var n=b(e,t),a=n.instance,o=n.rowCount,u=n.source;o&&(1===o?function(e,t,r,n,i,a){var o=v(t),u=r[0],c=u.data,l=o.reduce(function(t,r){return i.includeField(e.name,r.name)?Math.max(t,r.name.length):0;},0);if(0===l)return;l+=e.name.length+6;for(var d=u.keys().move(),f=S(e.name,t.fields,a),p=0;p<o.length;p++){var m=o[p];if(i.includeField(e.name,m.name))s.a.writePadRight(n,\"_\"+e.name+\".\"+m.name,l),_(n,c,d,m,f[p],0)||s.a.newline(n);}s.a.write(n,\"#\\n\");}(e,a,u,this.builder,this.filter,this.formatter):function(e,t,r,n,a,o){var u=v(t),c=a===i.DefaultFilter?u:u.filter(function(t){return a.includeField(e.name,t.name);}),l=c.length;if(0===l)return;var d=S(e.name,c,o);O(n,\"loop_\");for(var f=0;f<l;f++)O(n,\"_\"+e.name+\".\"+c[f].name);for(var p=0,m=0;m<r.length;m++){var h=r[m],g=h.data;if(0!==h.rowCount)for(var b=h.keys();b.hasNext;){for(var y=b.move(),x=!1,C=0;C<l;C++)x=_(n,g,y,c[C],d[C],p);x||s.a.newline(n),p++;}}s.a.write(n,\"#\\n\");}(e,a,u,this.builder,this.filter,this.formatter));}},e.prototype.encode=function(){this.encoded=!0;},e.prototype.writeTo=function(e){for(var t=s.a.getChunks(this.builder),r=0,n=t.length;r<n;r++)e.writeString(t[r]);},e.prototype.getSize=function(){return s.a.getSize(this.builder);},e.prototype.getData=function(){return s.a.getString(this.builder);},e;}();function _(e,t,r,n,i,a){var o,u=n.valueKind,c=u?u(r,t):0;if(0!==c)1===c?function(e){s.a.writeSafe(e,\". \");}(e):function(e){s.a.writeSafe(e,\"? \");}(e);else{var l=n.value(r,t,a),d=n.type;if(0===d)return\"string\"==typeof(o=l)&&o.indexOf(\"\\n\")>=0?(x(e,l),!0):function(e,t){if(!t)return s.a.writeSafe(e,\". \"),!1;for(var r=95===t.charCodeAt(0),n=\"'\",i=\"' \",a=!1,o=!1,u=!1,c=0,l=t.length-1;c<l;c++){switch(t.charCodeAt(c)){case 9:a=!0;break;case 10:return x(e,t),!0;case 32:a=!0;break;case 34:if(o)return x(e,t),!0;u=!0,r=!0,n=\"'\",i=\"' \";break;case 39:if(u)return x(e,t),!0;r=!0,o=!0,n='\"',i='\" ';}}var d=t.charCodeAt(0);r||35!==d&&36!==d&&59!==d&&91!==d&&93!==d&&!a||(n=\"'\",i=\"' \",r=!0);r?(s.a.writeSafe(e,n),s.a.writeSafe(e,t),s.a.writeSafe(e,i)):(s.a.writeSafe(e,t),s.a.writeSafe(e,\" \"));return!1;}(e,l);1===d?function(e,t){s.a.writeInteger(e,t),s.a.whitespace1(e);}(e,l):function(e,t,r){s.a.writeFloat(e,t,r),s.a.whitespace1(e);}(e,l,i);}return!1;}function S(e,t,r){for(var n,i=[],a=0,o=t;a<o.length;a++){var s=o[a],u=r.getFormat(e,s.name);u&&void 0!==u.digitCount?i[i.length]=2===s.type?Math.pow(10,Math.max(0,Math.min(u.digitCount,15))):0:i[i.length]=2===s.type?Math.pow(10,(n=s).defaultFormat&&void 0!==n.defaultFormat.digitCount?Math.max(0,Math.min(n.defaultFormat.digitCount,16)):6):0;}return i;}function O(e,t){s.a.write(e,t),s.a.newline(e);}function x(e,t){s.a.writeSafe(e,\"\\n;\"+t),s.a.writeSafe(e,\"\\n;\\n\");}var C=r(157);function w(e){var t=new ArrayBuffer(function e(t){var r=typeof_default()(t);if(\"string\"===r){var n=Object(C.a)(t);if(n<32)return 1+n;if(n<256)return 2+n;if(n<65536)return 3+n;if(n<4294967296)return 5+n;}if(t instanceof Uint8Array){var i=t.byteLength;if(i<256)return 2+i;if(i<65536)return 3+i;if(i<4294967296)return 5+i;}if(\"number\"===r){if(Math.floor(t)!==t)return 9;if(t>=0){if(t<128)return 1;if(t<256)return 2;if(t<65536)return 3;if(t<4294967296)return 5;throw new Error(\"Number too big 0x\"+t.toString(16));}if(t>=-32)return 1;if(t>=-128)return 2;if(t>=-32768)return 3;if(t>=-2147483648)return 5;throw new Error(\"Number too small -0x\"+t.toString(16).substr(1));}if(\"boolean\"===r||null==t)return 1;if(\"object\"===r){var a,o=0;if(Array.isArray(t)){a=t.length;for(var s=0;s<a;s++)o+=e(t[s]);}else{var u=Object.keys(t);a=u.length;for(s=0;s<a;s++){var c=u[s];o+=e(c)+e(t[c]);}}if(a<16)return 1+o;if(a<65536)return 3+o;if(a<4294967296)return 5+o;throw new Error(\"Array or object too long 0x\"+a.toString(16));}throw new Error(\"Unknown type \"+r);}(e)),r=new DataView(t),n=new Uint8Array(t);return function e(t,r,n,i){var a=typeof_default()(t);if(\"string\"===a){var o=Object(C.a)(t);if(o<32)return r.setUint8(i,160|o),Object(C.c)(n,i+1,t),1+o;if(o<256)return r.setUint8(i,217),r.setUint8(i+1,o),Object(C.c)(n,i+2,t),2+o;if(o<65536)return r.setUint8(i,218),r.setUint16(i+1,o),Object(C.c)(n,i+3,t),3+o;if(o<4294967296)return r.setUint8(i,219),r.setUint32(i+1,o),Object(C.c)(n,i+5,t),5+o;}if(t instanceof Uint8Array){var s=t.byteLength,u=new Uint8Array(r.buffer);if(s<256)return r.setUint8(i,196),r.setUint8(i+1,s),u.set(t,i+2),2+s;if(s<65536)return r.setUint8(i,197),r.setUint16(i+1,s),u.set(t,i+3),3+s;if(s<4294967296)return r.setUint8(i,198),r.setUint32(i+1,s),u.set(t,i+5),5+s;}if(\"number\"===a){if(!isFinite(t))throw new Error(\"Number not finite: \"+t);if(Math.floor(t)!==t)return r.setUint8(i,203),r.setFloat64(i+1,t),9;if(t>=0){if(t<128)return r.setUint8(i,t),1;if(t<256)return r.setUint8(i,204),r.setUint8(i+1,t),2;if(t<65536)return r.setUint8(i,205),r.setUint16(i+1,t),3;if(t<4294967296)return r.setUint8(i,206),r.setUint32(i+1,t),5;throw new Error(\"Number too big 0x\"+t.toString(16));}if(t>=-32)return r.setInt8(i,t),1;if(t>=-128)return r.setUint8(i,208),r.setInt8(i+1,t),2;if(t>=-32768)return r.setUint8(i,209),r.setInt16(i+1,t),3;if(t>=-2147483648)return r.setUint8(i,210),r.setInt32(i+1,t),5;throw new Error(\"Number too small -0x\"+(-t).toString(16).substr(1));}if(null==t)return r.setUint8(i,192),1;if(\"boolean\"===a)return r.setUint8(i,t?195:194),1;if(\"object\"===a){var c,l=0,d=Array.isArray(t),f=void 0;if(d?c=t.length:(f=Object.keys(t),c=f.length),c<16?(r.setUint8(i,c|(d?144:128)),l=1):c<65536?(r.setUint8(i,d?220:222),r.setUint16(i+1,c),l=3):c<4294967296&&(r.setUint8(i,d?221:223),r.setUint32(i+1,c),l=5),d)for(var p=0;p<c;p++)l+=e(t[p],r,n,i+l);else{p=0;for(var m=f.length;p<m;p++){var h=f[p];l+=e(h,r,n,i+l),l+=e(t[h],r,n,i+l);}}return l;}throw new Error(\"Unknown type \"+a);}(e,r,n,0),n;}var P,j=r(259),E=function(){function e(e,t,r){this.autoClassify=r,this.dataBlocks=[],this.filter=i.DefaultFilter,this.formatter=i.DefaultFormatter,this.isBinary=!0,this.binaryEncodingProvider=void 0,this.binaryEncodingProvider=t,this.data={encoder:e,version:l.c,dataBlocks:this.dataBlocks};}return e.prototype.setFilter=function(e){this.filter=e||i.DefaultFilter;},e.prototype.isCategoryIncluded=function(e){return this.filter.includeCategory(e);},e.prototype.setFormatter=function(e){this.formatter=e||i.DefaultFormatter;},e.prototype.startDataBlock=function(e){this.dataBlocks.push({header:(e||\"\").replace(/[ \\n\\t]/g,\"\").toUpperCase(),categories:[]});},e.prototype.writeCategory=function(e,t,r){if(!this.data)throw new Error(\"The writer contents have already been encoded, no more writing.\");if(!this.dataBlocks.length)throw new Error(\"No data block created.\");if((null==r?void 0:r.ignoreFilter)||this.filter.includeCategory(e.name)){var n=b(e,t),i=n.instance,a=n.rowCount,o=n.source;if(a){for(var s={name:\"_\"+e.name,columns:[],rowCount:a},u=0,c=v(i);u<c.length;u++){var l=c[u];if(this.filter.includeField(e.name,l.name)){var d=this.formatter.getFormat(e.name,l.name);s.columns.push(A(e.name,l,o,a,d,this.binaryEncodingProvider,this.autoClassify));}}s.columns.length&&this.dataBlocks[this.dataBlocks.length-1].categories.push(s);}}},e.prototype.encode=function(){this.encodedData||(this.encodedData=w(this.data),this.data=null,this.dataBlocks=null);},e.prototype.writeTo=function(e){e.writeBinary(this.encodedData);},e.prototype.getData=function(){return this.encode(),this.encodedData;},e.prototype.getSize=function(){return this.encodedData.length;},e;}();function A(e,t,r,n,i,a,o){var s=function(e,t,r,n){for(var i=0===e.type,a=new t(r),o=new Uint8Array(r),s=e.valueKind,u=e.value,c=!0,l=0,d=0;d<n.length;d++)for(var f=n[d].data,p=n[d].keys();p.hasNext;){var m=p.move(),h=s?s(m,f):0;0!==h?(o[l]=h,i&&(a[l]=\"\"),c=!1):(o[l]=0,a[l]=u(m,f,l)),l++;}return{array:a,allPresent:c,mask:o};}(t,function(e,t){return t&&t.typedArray?t.typedArray:e.defaultFormat&&e.defaultFormat.typedArray?e.defaultFormat.typedArray:0===e.type?Array:1===e.type?Int32Array:Float64Array;}(t,i),n,r),u=s.array,c=s.allPresent,d=s.mask,f=function(e,t,r,n){return r&&r.encoder?r.encoder:t.defaultFormat&&t.defaultFormat.encoder?t.defaultFormat.encoder:n?n.get(e,t.name):void 0;}(e,t,i,a);f||(o?f=function(e,t){return 0===e?l.a.by(l.b.stringArray):1===e?Object(j.b)(t):Object(j.a)(t);}(t.type,u):f=0===t.type?l.a.by(l.b.stringArray):l.a.by(l.b.byteArray));var p=f.encode(u),m=void 0;if(!c){var h=l.a.by(l.b.runLength).and(l.b.byteArray).encode(d);m=h.data.length<d.length?h:l.a.by(l.b.byteArray).encode(d);}return{name:t.name,data:p,mask:m};}!function(e){e.Encoder=o,e.Category=i,e.Field=n,e.Encoding=l.b,e.createEncoder=function(e){var t=e||{},r=t.binary,n=void 0!==r&&r,i=t.encoderName;return n?new E(void 0===i?\"mol*\":i,e?e.binaryEncodingPovider:void 0,!!e&&!!e.binaryAutoClassifyEncoding):new y();},e.fields=function(){return e.Field.build();};var t=e.Encoding;function r(e){var r=e.precision;if(void 0!==r){var n=Math.pow(10,r),i=t.by(t.fixedPoint(n));switch(e.encoding){case\"pack\":return i.and(t.integerPacking);case\"rle\":return i.and(t.runLength).and(t.integerPacking);case\"delta\":return i.and(t.delta).and(t.integerPacking);case\"delta-rle\":return i.and(t.delta).and(t.runLength).and(t.integerPacking);}}else switch(e.encoding){case\"pack\":return t.by(t.integerPacking);case\"rle\":return t.by(t.runLength).and(t.integerPacking);case\"delta\":return t.by(t.delta).and(t.integerPacking);case\"delta-rle\":return t.by(t.delta).and(t.runLength).and(t.integerPacking);}throw new Error(\"cannot be reached\");}e.Encodings={deltaRLE:t.by(t.delta).and(t.runLength).and(t.integerPacking),fixedPoint2:t.by(t.fixedPoint(100)).and(t.delta).and(t.integerPacking),fixedPoint3:t.by(t.fixedPoint(1e3)).and(t.delta).and(t.integerPacking)},e.categoryInstance=function(e,t){return{fields:e,source:[t]};},e.createEncodingProviderFromCifFrame=function(e){return{get:function get(t,r){var n=e.categories[t];if(n){var i=n.getField(r);return i&&i.binaryEncoding?l.a.fromEncoding(i.binaryEncoding):void 0;}}};},e.createEncodingProviderFromJsonConfig=function(e){return{get:function get(t,n){for(var i=0;i<e.length;i++){var a=e[i];if(a.categoryName===t&&a.columnName===n)return r(a);}}};};}(P||(P={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return f;}),r.d(t,\"b\",function(){return p;}),r.d(t,\"c\",function(){return n;}),r.d(t,\"d\",function(){return y;}),r.d(t,\"e\",function(){return _;});var n,i=r(1),a=r(2),o=r(39),s=r(34),u=r(81),c=r(33),l=r(74),d=r(172),f={linkScale:a.ParamDefinition.Numeric(.4,{min:0,max:1,step:.1}),linkSpacing:a.ParamDefinition.Numeric(1,{min:0,max:2,step:.01}),linkCap:a.ParamDefinition.Boolean(!1),radialSegments:a.ParamDefinition.Numeric(16,{min:2,max:56,step:2},c.a.CustomQualityParamInfo)},p=(a.ParamDefinition.getDefaultValues(f),{linkScale:a.ParamDefinition.Numeric(.5,{min:0,max:1,step:.1}),linkSpacing:a.ParamDefinition.Numeric(.1,{min:0,max:2,step:.01})}),m=(a.ParamDefinition.getDefaultValues(p),Object(i.Vec3)()),h=Object(i.Vec3)(),g=Object(i.Vec3)(),v=i.Vec3.create(0,1,0);function b(e,t,r,n){i.Vec3.normalize(h,i.Vec3.sub(h,t,r)),null!==n?i.Vec3.sub(g,t,n):i.Vec3.copy(g,t),i.Vec3.normalize(g,g);var a=i.Vec3.dot(h,g);return 1-Math.abs(a)<1e-5&&(i.Vec3.set(g,1,0,0),a=i.Vec3.dot(h,g),1-Math.abs(a)<1e-5&&(i.Vec3.set(g,0,1,0),a=i.Vec3.dot(h,g))),i.Vec3.setMagnitude(h,h,a),i.Vec3.sub(g,g,h),i.Vec3.normalize(e,g);}function y(e,t,r,a){var c=t.linkCount,l=t.referencePosition,d=t.position,f=t.style,p=t.radius,h=t.ignore;if(!c)return o.a.createEmpty(a);for(var g=r.linkScale,y=r.linkSpacing,_=r.radialSegments,S=r.linkCap,O=2*_*c*2,x=s.a.createState(O,O/4,a),C=Object(i.Vec3)(),w=Object(i.Vec3)(),P=Object(i.Vec3)(),j={radiusTop:1,radiusBottom:1,radialSegments:_,topCap:S,bottomCap:S},E=0,A=c;E<A;++E)if(!h||!h(E)){d(C,w,E);var T=p(E),D=f?f(E):n.Solid;if(x.currentGroup=E,D===n.Dashed)j.radiusTop=j.radiusBottom=T/3,j.topCap=j.bottomCap=!0,Object(u.c)(x,C,w,.5,7,j);else if(D===n.Double||D===n.Triple){var I=n.Double?2:3,M=T*(g/(.5*I)),k=(T-M)*y;b(P,C,w,l?l(E):null),i.Vec3.setMagnitude(P,P,k),j.radiusTop=j.radiusBottom=M,j.topCap=j.bottomCap=S,3===I&&Object(u.a)(x,C,w,.5,j),Object(u.b)(x,C,w,.5,P,j);}else D===n.Disk?(i.Vec3.scale(m,i.Vec3.sub(m,w,C),.475),i.Vec3.add(C,C,m),i.Vec3.sub(w,w,m),j.radiusTop=j.radiusBottom=T,i.Vec3.dot(m,v)>0?(j.topCap=!1,j.bottomCap=S):(j.topCap=S,j.bottomCap=!1),Object(u.a)(x,C,w,.5,j)):(j.radiusTop=j.radiusBottom=T,j.topCap=j.bottomCap=S,Object(u.a)(x,C,w,.5,j));}return s.a.getMesh(x);}function _(e,t,r,a){var o=t.linkCount,s=t.referencePosition,u=t.position,c=t.style,f=t.ignore;if(!o)return l.a.createEmpty(a);for(var p=r.linkScale,h=r.linkSpacing,g=2*o,v=d.a.create(g,g/4,a),y=Object(i.Vec3)(),_=Object(i.Vec3)(),S=Object(i.Vec3)(),O=0,x=o;O<x;++O)if(!f||!f(O)){u(y,_,O),i.Vec3.scale(_,i.Vec3.add(_,y,_),.5);var C=c?c(O):n.Solid;if(C===n.Dashed)v.addFixedCountDashes(y,_,7,O);else if(C===n.Double||C===n.Triple){var w=n.Double?2:3,P=(1-p/(.5*w)*1)*h;b(S,y,_,s?s(O):null),i.Vec3.setMagnitude(S,S,P),3===w&&v.add(y[0],y[1],y[2],_[0],_[1],_[2],O),v.add(y[0]+S[0],y[1]+S[1],y[2]+S[2],_[0]+S[0],_[1]+S[1],_[2]+S[2],O),v.add(y[0]-S[0],y[1]-S[1],y[2]-S[2],_[0]-S[0],_[1]-S[1],_[2]-S[2],O);}else C===n.Disk?(i.Vec3.scale(m,i.Vec3.sub(m,_,y),.475),i.Vec3.add(y,y,m),i.Vec3.sub(_,_,m),v.add(y[0],y[1],y[2],_[0],_[1],_[2],O)):v.add(y[0],y[1],y[2],_[0],_[1],_[2],O);}return v.getLines();}!function(e){e[e.Solid=0]=\"Solid\",e[e.Dashed=1]=\"Dashed\",e[e.Double=2]=\"Double\",e[e.Triple=3]=\"Triple\",e[e.Disk=4]=\"Disk\";}(n||(n={}));},function(e,t,r){\"use strict\";var n;!function(e){e.create=function(e,t,r){void 0===r&&(r=Float32Array);var n=e*t;return{data:new r(n),size:n,cols:e,rows:t};},e.get=function(e,t,r){return e.data[e.rows*r+t];},e.set=function(e,t,r,n){return e.data[e.rows*r+t]=n,e;},e.add=function(e,t,r,n){return e.data[e.rows*r+t]+=n,e;},e.makeZero=function(e){return e.data.fill(0),e;},e.clone=function(e){return{data:e.data.slice(),size:e.size,cols:e.cols,rows:e.rows};},e.fromArray=function(e,t,r){return{data:e,size:t*r,cols:t,rows:r};},e.transpose=function(e,t){if(e.cols!==t.rows||e.rows!==t.cols)throw new Error(\"transpose: matrix dimensions incompatible\");if(e.data===t.data)throw new Error(\"transpose: matrices share memory\");for(var r=t.rows,n=t.cols,i=t.data,a=e.data,o=0,s=0,u=0;o<r;u+=1,s+=n,++o)for(var c=u,l=0;l<n;c+=r,l++)a[c]=i[s+l];return e;},e.multiplyABt=function(e,t,r){for(var n=t.cols,i=t.rows,a=r.rows,o=t.data,s=r.data,u=e.data,c=0,l=0,d=0;c<i;l+=n,c++)for(var f=0,p=0;p<a;d++,p++){for(var m=0,h=l,g=0;g<n;h++,f++,g++)m+=o[h]*s[f];u[d]=m;}return e;},e.meanRows=function(e){for(var t=e.rows,r=e.cols,n=e.data,i=new Array(r),a=0;a<r;++a)i[a]=0;for(var o=0,s=0;o<t;++o)for(a=0;a<r;++a,++s)i[a]+=n[s];for(a=0;a<r;++a)i[a]/=t;return i;},e.subRows=function(e,t){for(var r=e.rows,n=e.cols,i=e.data,a=0,o=0;a<r;++a)for(var s=0;s<n;++s,++o)i[o]-=t[s];return e;};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";var n;r.d(t,\"a\",function(){return n;}),function(e){e.error=function(e,r){return void 0===r&&(r=-1),new t(e,r);},e.success=function(e,t){return void 0===t&&(t=[]),new r(e,t);};var t=function(){function e(e,t){this.message=e,this.line=t,this.isError=!0;}return e.prototype.toString=function(){return this.line>=0?\"[Line \"+this.line+\"] \"+this.message:this.message;},e;}();e.Error=t;var r=function r(e,t){this.result=e,this.warnings=t,this.isError=!1;};e.Success=r;}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"CustomPropertyDescriptor\",function(){return i;}),r.d(t,\"CustomProperties\",function(){return a;});var n=r(5);function i(e){return e;}!function(e){e.getUUID=function(e){return e.__key||(e.__key=n.c.create22()),e.__key;};}(i||(i={}));var a=function(){function e(){this._list=[],this._set=new Set(),this._refs=new Map(),this._assets=new Map();}return Object.defineProperty(e.prototype,\"all\",{get:function get(){return this._list;},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._set.has(e)||(this._list.push(e),this._set.add(e));},e.prototype.reference=function(e,t){var r=this._refs.get(e)||0;r+=t?1:-1,this._refs.set(e,Math.max(r,0));},e.prototype.hasReference=function(e){return(this._refs.get(e)||0)>0;},e.prototype.has=function(e){return this._set.has(e);},e.prototype.assets=function(e,t){var r=this._assets.get(e);if(r)for(var n=0,i=r;n<i.length;n++){i[n].dispose();}t?this._assets.set(e,t):this._assets.delete(e);},e.prototype.dispose=function(){this._assets.forEach(function(e){for(var t=0,r=e;t<r.length;t++){r[t].dispose();}});},e;}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ParameterControls\",function(){return j;}),r.d(t,\"ParameterMappingControl\",function(){return E;}),r.d(t,\"ParamHelp\",function(){return D;}),r.d(t,\"SimpleParam\",function(){return k;}),r.d(t,\"BoolControl\",function(){return B;}),r.d(t,\"LineGraphControl\",function(){return V;}),r.d(t,\"NumberInputControl\",function(){return R;}),r.d(t,\"NumberRangeControl\",function(){return L;}),r.d(t,\"TextControl\",function(){return N;}),r.d(t,\"PureSelectControl\",function(){return F;}),r.d(t,\"SelectControl\",function(){return U;}),r.d(t,\"IntervalControl\",function(){return z;}),r.d(t,\"BoundedIntervalControl\",function(){return H;}),r.d(t,\"ColorControl\",function(){return G;}),r.d(t,\"ColorListControl\",function(){return X;}),r.d(t,\"Vec3Control\",function(){return K;}),r.d(t,\"Mat4Control\",function(){return Z;}),r.d(t,\"UrlControl\",function(){return J;}),r.d(t,\"FileControl\",function(){return $;}),r.d(t,\"FileListControl\",function(){return ee;}),r.d(t,\"MultiSelectControl\",function(){return te;}),r.d(t,\"GroupControl\",function(){return re;}),r.d(t,\"MappedControl\",function(){return ne;}),r.d(t,\"ObjectListControl\",function(){return oe;}),r.d(t,\"ConditionedControl\",function(){return se;}),r.d(t,\"ConvertedControl\",function(){return ue;}),r.d(t,\"ScriptControl\",function(){return ce;});var n=r(0),i=r(3),a=r(1),o=r(24),s=r(88),u=r(155),c=r(174),l=r(2),d=r(41),f=r(32),p=r(56),m=r(19),h=r(43),g=Object(h.ColorSwatch)([[\"black\",0],[\"gray\",8421504],[\"white\",16777215],[\"red\",13840661],[\"orange\",14840576],[\"yellow\",16565248],[\"green\",6863872],[\"cyan\",1484197],[\"blue\",40160],[\"purple\",8086783],[\"magenta\",16394495],[\"violet\",8200583]]),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!!t.props.param.isExpanded,lightness:0},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t.onClickSwatch=function(e){var r=Object(o.Color)(+(e.currentTarget.getAttribute(\"data-color\")||\"0\"));r!==t.props.value&&(t.props.param.isExpanded||t.setState({isExpanded:!1}),t.update(r));},t.onR=function(e){var r=o.Color.toRgb(t.props.value),n=r[1],i=r[2],a=o.Color.fromRgb(e,n,i);a!==t.props.value&&t.update(a);},t.onG=function(e){var r=o.Color.toRgb(t.props.value),n=r[0],i=r[2],a=o.Color.fromRgb(n,e,i);a!==t.props.value&&t.update(a);},t.onB=function(e){var r=o.Color.toRgb(t.props.value),n=r[0],i=r[1],a=o.Color.fromRgb(n,i,e);a!==t.props.value&&t.update(a);},t.onLighten=function(){t.update(o.Color.lighten(t.props.value,.1));},t.onDarken=function(){t.update(o.Color.darken(t.props.value,.1));},t;}return Object(n.__extends)(t,e),t.prototype.update=function(e){this.props.onChange({param:this.props.param,name:this.props.name,value:e});},t.prototype.swatch=function(){var e=this;return i.createElement(\"div\",{className:\"msp-combined-color-swatch\"},g.map(function(t){return i.createElement(m.Button,{key:t[1],inline:!0,\"data-color\":t[1],onClick:e.onClickSwatch,style:{background:o.Color.toStyle(t[1])}});}));},t.prototype.render=function(){var e=this.props.param.label||Object(d.a)(this.props.name),t=o.Color.toRgb(this.props.value),r=t[0],n=t[1],a=t[2];return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{title:this.props.param.description,label:e,control:i.createElement(m.Button,{onClick:this.toggleExpanded,inline:!0,className:\"msp-combined-color-button\",style:{background:o.Color.toStyle(this.props.value)}})}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},this.swatch(),i.createElement(m.ControlRow,{label:\"RGB\",className:\"msp-control-label-short\",control:i.createElement(\"div\",{style:{display:\"flex\",textAlignLast:\"center\",left:\"80px\"}},i.createElement(m.TextInput,{onChange:this.onR,numeric:!0,value:r,delayMs:250,style:{order:1,flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\",onEnter:this.props.onEnter,blurOnEnter:!0,blurOnEscape:!0}),i.createElement(m.TextInput,{onChange:this.onG,numeric:!0,value:n,delayMs:250,style:{order:2,flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\",onEnter:this.props.onEnter,blurOnEnter:!0,blurOnEscape:!0}),i.createElement(m.TextInput,{onChange:this.onB,numeric:!0,value:a,delayMs:250,style:{order:3,flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\",onEnter:this.props.onEnter,blurOnEnter:!0,blurOnEscape:!0}))}),i.createElement(\"div\",{style:{display:\"flex\",textAlignLast:\"center\"}},i.createElement(m.Button,{onClick:this.onLighten,style:{order:1,flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\"},\"Lighten\"),i.createElement(m.Button,{onClick:this.onDarken,style:{order:1,flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\"},\"Darken\"))));},t;}(i.PureComponent),b=void 0;var y=function(){for(var e=new Map(),t=0,r=g;t<r.length;t++){var n=r[t];e.set(n[1],n[0]);}return e;}();var _=r(14);var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.legend,t=e.colors.map(function(e){return o.Color.toStyle(e);}).join(\", \");return i.createElement(\"div\",{className:\"msp-scale-legend\"},i.createElement(\"div\",{style:{background:\"linear-gradient(to right, \"+t+\")\"}},i.createElement(\"span\",{style:{float:\"left\"}},e.minLabel),i.createElement(\"span\",{style:{float:\"right\"}},e.maxLabel)));},t;}(i.PureComponent),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.legend;return i.createElement(\"div\",{className:\"msp-table-legend\"},e.table.map(function(e,t){var r=e[0],n=e[1];return i.createElement(\"div\",{key:t},i.createElement(\"div\",{className:\"msp-table-legend-color\",style:{backgroundColor:o.Color.toStyle(n)}}),i.createElement(\"div\",{className:\"msp-table-legend-text\"},r));}));},t;}(i.PureComponent),x=function(e){function t(t){var r=e.call(this,t)||this;return r.state={show:!1},r.handleHover=r.handleHover.bind(r),r.handleHoverOff=r.handleHoverOff.bind(r),r.deletePoint=r.deletePoint.bind(r),r;}return Object(n.__extends)(t,e),t.prototype.handleHover=function(){this.setState({show:!0});var e=a.Vec2.create(this.props.nX,this.props.nY);this.props.onmouseover(e);},t.prototype.handleHoverOff=function(){this.setState({show:!1}),this.props.onmouseover(void 0);},t.prototype.deletePoint=function(){this.props.delete(this.props.id);},t.prototype.render=function(){return[i.createElement(\"circle\",{r:\"10\",key:this.props.id+\"circle\",id:\"\"+this.props.id,cx:this.props.x,cy:this.props.y,onClick:this.props.onclick,onDoubleClick:this.props.delete(this.props.id),onMouseEnter:this.handleHover,onMouseLeave:this.handleHoverOff,onMouseDown:this.props.onmousedown,fill:\"black\"})];},t;}(i.Component),C=function(e){function t(t){var r=e.call(this,t)||this;r.handleKeyDown=function(e){},r.handleKeyUp=function(e){},r.handleClick=function(e){return function(e){};},r.handleMouseDown=function(e){return function(t){if(0!==e&&e!==r.state.points.length-1&&!r.state.canSelectMultiple){var n=r.normalizePoint(a.Vec2.create(r.state.points[e][0],r.state.points[e][1]));r.ghostPoints.push(document.createElementNS(r.namespace,\"circle\")),r.ghostPoints[0].setAttribute(\"r\",\"10\"),r.ghostPoints[0].setAttribute(\"fill\",\"orange\"),r.ghostPoints[0].setAttribute(\"cx\",\"\"+n[0]),r.ghostPoints[0].setAttribute(\"cy\",\"\"+n[1]),r.ghostPoints[0].setAttribute(\"style\",\"display: none\"),r.gElement.appendChild(r.ghostPoints[0]),r.updatedX=n[0],r.updatedY=n[1],r.selected=[e];}};},r.deletePoint=function(e){return function(t){if(0!==e&&e!==r.state.points.length-1){var n=r.state.points.filter(function(t,r){return r!==e;});n.sort(function(e,t){return e[0]===t[0]?0===e[0]?e[1]-t[1]:1===e[1]?t[1]-e[1]:e[1]-t[1]:e[0]-t[0];}),r.setState({points:n}),r.change(n),t.stopPropagation();}};},r.myRef=i.createRef(),r.state={points:[a.Vec2.create(0,0),a.Vec2.create(1,0)],copyPoint:void 0,canSelectMultiple:!1},r.height=400,r.width=600,r.padding=70,r.selected=void 0,r.ghostPoints=[],r.namespace=\"http://www.w3.org/2000/svg\";for(var n=0,o=r.props.data;n<o.length;n++){var s=o[n];r.state.points.push(s);}return r.state.points.sort(function(e,t){return e[0]===t[0]?0===e[0]?e[1]-t[1]:1===e[1]?t[1]-e[1]:e[1]-t[1]:e[0]-t[0];}),r.handleDrag=r.handleDrag.bind(r),r.handleMultipleDrag=r.handleMultipleDrag.bind(r),r.handleDoubleClick=r.handleDoubleClick.bind(r),r.refCallBack=r.refCallBack.bind(r),r.handlePointUpdate=r.handlePointUpdate.bind(r),r.change=r.change.bind(r),r.handleKeyUp=r.handleKeyUp.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleEnter=r.handleEnter.bind(r),r;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.renderPoints(),t=this.renderLines();return[i.createElement(\"div\",{key:\"LineGraph\"},i.createElement(\"svg\",{className:\"msp-canvas\",ref:this.refCallBack,viewBox:\"0 0 \"+(this.width+this.padding)+\" \"+(this.height+this.padding),onMouseMove:this.handleDrag,onMouseUp:this.handlePointUpdate,onMouseLeave:this.handleLeave,onMouseEnter:this.handleEnter,tabIndex:0,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onDoubleClick:this.handleDoubleClick},i.createElement(\"g\",{stroke:\"black\",fill:\"black\"},t,e),i.createElement(\"g\",{className:\"ghost-points\",stroke:\"black\",fill:\"black\"}))),i.createElement(\"div\",{key:\"modal\",id:\"modal-root\"})];},t.prototype.componentDidMount=function(){this.gElement=document.getElementsByClassName(\"ghost-points\")[0];},t.prototype.change=function(e){var t=e.slice();t.shift(),t.pop(),this.props.onChange(t);},t.prototype.handleDrag=function(e){if(void 0!==this.selected){var t,r=this.myRef.createSVGPoint(),n=this.padding/2;r.x=e.clientX,r.y=e.clientY;var i=r.matrixTransform(this.myRef.getScreenCTM().inverse());t=a.Vec2.create(i.x,i.y),t=(i.x<n||i.x>this.width+n)&&(i.y>this.height+n||i.y<n)?a.Vec2.create(this.updatedX,this.updatedY):i.x<n?a.Vec2.create(n,i.y):i.x>this.width+n?a.Vec2.create(this.width+n,i.y):i.y>this.height+n?a.Vec2.create(i.x,this.height+n):i.y<n?a.Vec2.create(i.x,n):a.Vec2.create(i.x,i.y),this.updatedX=t[0],this.updatedY=t[1];var o=this.unNormalizePoint(t);this.ghostPoints[0].setAttribute(\"style\",\"display: visible\"),this.ghostPoints[0].setAttribute(\"cx\",\"\"+t[0]),this.ghostPoints[0].setAttribute(\"cy\",\"\"+t[1]),this.props.onDrag(o);}},t.prototype.handleMultipleDrag=function(){},t.prototype.handlePointUpdate=function(e){var t=this.selected;if(!this.state.canSelectMultiple)if(void 0!==t&&0!==t[0]&&t[0]!==this.state.points.length-1){this.selected=void 0;var r=this.unNormalizePoint(a.Vec2.create(this.updatedX,this.updatedY)),n=this.state.points.filter(function(e,r){return r!==t[0];});n.push(r),n.sort(function(e,t){return e[0]===t[0]?0===e[0]?e[1]-t[1]:1===e[1]?t[1]-e[1]:e[1]-t[1]:e[0]-t[0];}),this.setState({points:n}),this.change(n),this.gElement.innerHTML=\"\",this.ghostPoints=[],document.removeEventListener(\"mousemove\",this.handleDrag,!0),document.removeEventListener(\"mouseup\",this.handlePointUpdate,!0);}else this.setState({copyPoint:void 0});},t.prototype.handleDoubleClick=function(e){var t,r=this.myRef.createSVGPoint();r.x=e.clientX,r.y=e.clientY;var n=r.matrixTransform(this.myRef.getScreenCTM().inverse()),i=this.state.points,o=this.padding/2;n.x<o||n.x>this.width+o||n.y>this.height+o||n.y<this.padding/2||(t=this.unNormalizePoint(a.Vec2.create(n.x,n.y)),i.push(t),i.sort(function(e,t){return e[0]===t[0]?0===e[0]?e[1]-t[1]:1===e[1]?t[1]-e[1]:e[1]-t[1]:e[0]-t[0];}),this.setState({points:i}),this.change(i));},t.prototype.handleLeave=function(){void 0!==this.selected&&(document.addEventListener(\"mousemove\",this.handleDrag,!0),document.addEventListener(\"mouseup\",this.handlePointUpdate,!0));},t.prototype.handleEnter=function(){document.removeEventListener(\"mousemove\",this.handleDrag,!0),document.removeEventListener(\"mouseup\",this.handlePointUpdate,!0);},t.prototype.normalizePoint=function(e){var t=this.padding/2,r=this.width+t,n=this.height+t,i=e[0]*(r-t)+t,o=e[1]*(n-t)+t,s=this.height+this.padding-o;return a.Vec2.create(i,s);},t.prototype.unNormalizePoint=function(e){var t=this.padding/2,r=this.width+t,n=this.height+t,i=(e[0]-t)/(r-t),o=(this.height+this.padding-e[1]-t)/(n-t);return a.Vec2.create(i,o);},t.prototype.refCallBack=function(e){e&&(this.myRef=e);},t.prototype.renderPoints=function(){for(var e,t=[],r=0;r<this.state.points.length;r++)0!==r&&r!==this.state.points.length-1&&(e=this.normalizePoint(this.state.points[r]),t.push(i.createElement(x,{key:r,id:r,x:e[0],y:e[1],nX:this.state.points[r][0],nY:this.state.points[r][1],selected:!1,delete:this.deletePoint,onmouseover:this.props.onHover,onmousedown:this.handleMouseDown(r),onclick:this.handleClick(r)})));return t;},t.prototype.renderLines=function(){for(var e,t,r,n,o,s,u=[],c=[],l=0,d=this.state.points;l<d.length;l++){var f=d[l];e=this.padding/2,t=this.width+e,r=this.height+e,n=f[0]*(t-e)+e,o=f[1]*(r-e)+e,s=this.height+this.padding-o,u.push(a.Vec2.create(n,s));}for(var p=u,m=p.length,h=0;h<m-1;h++){var g=p[h][0],v=p[h][1],b=p[h+1][0],y=p[h+1][1];c.push(i.createElement(\"line\",{key:\"lineOf\"+h,x1:g,x2:b,y1:v,y2:y,stroke:\"#cec9ba\",strokeWidth:\"5\"}));}return c;},t;}(i.Component),w=r(327),P=r(114),j=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){var r,i,a;if(null===(a=(i=t.props).onChange)||void 0===a||a.call(i,e,t.props.values),t.props.onChangeValues){var o=Object(n.__assign)(Object(n.__assign)({},t.props.values),((r={})[e.name]=e.value,r));t.props.onChangeValues(o,t.props.values);}},t.paramGroups=Object(u.b)(function(e){return A(e);}),t;}return Object(n.__extends)(t,e),t.prototype.renderGroup=function(e){var t;if(0===e.length)return null;for(var r=this.props.values,n=null,a=void 0,o=0,s=e;o<s.length;o++){var u=s[o],c=u[0],l=u[1],d=u[2];(null===(t=l.hideIf)||void 0===t?void 0:t.call(l,r))||(n||(n=[]),a=l.category,n.push(i.createElement(d,{param:l,key:c,onChange:this.onChange,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled,name:c,value:r[c]})));}return n?a?[i.createElement(m.ExpandGroup,{key:a,header:a},n)]:n:null;},t.prototype.renderPart=function(e){for(var t=null,r=0,n=e;r<n.length;r++){var i=n[r],a=this.renderGroup(i);if(a){t||(t=[]);for(var o=0,s=a;o<s.length;o++){var u=s[o];t.push(u);}}}return t;},t.prototype.render=function(){var e=this.paramGroups(this.props.params),t=this.renderPart(e.essentials),r=this.renderPart(e.advanced);return t&&r?i.createElement(i.Fragment,null,t,i.createElement(m.ExpandGroup,{header:\"Advanced Options\"},r)):t||r;},t;}(i.PureComponent),E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setSettings=function(e,r){var i,a=Object(n.__assign)(Object(n.__assign)({},r),((i={})[e.name]=e.value,i)),o=t.props.mapping.update(a,t.plugin);t.props.mapping.apply(o,t.plugin);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this.props.mapping.getTarget(this.plugin),t=this.props.mapping.getValues(e,this.plugin),r=this.props.mapping.params(this.plugin);return i.createElement(j,{params:r,values:t,onChange:this.setSettings});},t;}(f.PluginUIComponent);function A(e){function t(e,t,r){var n=T(t);if(n)if(t.category){r.map||(r.map=new Map());var i=r.map.get(t.category);i||(i=[],r.map.set(t.category,i),r.params.push(i)),i.push([e,t,n]);}else r.params[0].push([e,t,n]);}function r(e,t){var r=e[0],n=t[0];return r&&r[1].category?n&&n[1].category&&r[1].category<n[1].category?-1:1:-1;}for(var n={params:[[]],map:void 0},i={params:[[]],map:void 0},a=0,o=Object.keys(e);a<o.length;a++){var s=o[a],u=e[s];u.isHidden||(u.isEssential?t(s,u,n):t(s,u,i));}return n.params.sort(r),i.params.sort(r),{essentials:n.params,advanced:i.params};}function T(e){switch(e.type){case\"value\":return;case\"boolean\":return B;case\"number\":return void 0!==e.min&&void 0!==e.max?L:R;case\"converted\":return ue;case\"conditioned\":return se;case\"multi-select\":return te;case\"color\":return v;case\"color-list\":return X;case\"vec3\":return K;case\"mat4\":return Z;case\"url\":return J;case\"file\":return $;case\"file-list\":return ee;case\"select\":return U;case\"text\":return N;case\"interval\":return void 0!==e.min&&void 0!==e.max?H:z;case\"group\":return re;case\"mapped\":return ne;case\"line-graph\":return V;case\"script\":return ce;case\"object-list\":return oe;default:var t=e;return void console.warn(t+\" has no associated UI component\");}}var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.legend,r=e.description,n=t&&function(e){switch(e.kind){case\"scale-legend\":return S;case\"table-legend\":return O;default:var t=e;return void console.warn(t+\" has no associated UI component\");}}(t);return i.createElement(\"div\",{className:\"msp-help-text\"},i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-help-description\"},i.createElement(_.Icon,{svg:_.HelpOutlineSvg,inline:!0}),r),n&&i.createElement(\"div\",{className:\"msp-help-legend\"},i.createElement(n,{legend:t}))));},t;}(i.PureComponent);function I(e){var t=e.props,r=e.state,n=e.control,a=e.toggleHelp,o=e.addOn,s=[];t.param.shortLabel&&s.push(\"msp-control-label-short\"),t.param.twoColumns&&s.push(\"msp-control-col-2\");var u=s.join(\" \"),c=t.param.label||Object(d.a)(t.name),l=t.param.help?t.param.help(t.value):{description:t.param.description,legend:t.param.legend},f=t.param.description,p=l.description||l.legend;return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{className:u,title:f,label:i.createElement(i.Fragment,null,c,p&&i.createElement(\"button\",{className:\"msp-help msp-btn-link msp-btn-icon msp-control-group-expander\",onClick:a,title:f||(r.showHelp?\"Hide\":\"Show\")+\" help\",style:{background:\"transparent\",textAlign:\"left\",padding:\"0\"}},i.createElement(_.Icon,{svg:_.HelpOutlineSvg}))),control:n}),p&&r.showHelp&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(D,{legend:l.legend,description:l.description})),o);}var M,k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showHelp:!1},t.toggleHelp=function(){return t.setState({showHelp:!t.state.showHelp});},t;}return Object(n.__extends)(t,e),t.prototype.update=function(e){this.props.onChange({param:this.props.param,name:this.props.name,value:e});},t.prototype.renderAddOn=function(){return null;},t.prototype.render=function(){return I({props:this.props,state:this.state,control:this.renderControl(),toggleHelp:this.toggleHelp,addOn:this.renderAddOn()});},t;}(i.PureComponent),B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){t.update(!t.props.value),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){return i.createElement(\"button\",{onClick:this.onClick,disabled:this.props.isDisabled},i.createElement(_.Icon,{svg:this.props.value?_.CheckSvg:_.ClearSvg}),this.props.value?\"On\":\"Off\");},t;}(k),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1,isOverPoint:!1,message:t.props.param.defaultValue.length+\" points\"},t.onHover=function(e){t.setState({isOverPoint:!t.state.isOverPoint}),e?t.setState({message:\"(\"+e[0].toFixed(2)+\", \"+e[1].toFixed(2)+\")\"}):t.setState({message:t.props.value.length+\" points\"});},t.onDrag=function(e){t.setState({message:\"(\"+e[0].toFixed(2)+\", \"+e[1].toFixed(2)+\")\"});},t.onChange=function(e){t.props.onChange({name:t.props.name,param:t.props.param,value:e});},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:e,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},\"\"+this.state.message)}),i.createElement(\"div\",{className:\"msp-control-offset\",style:{display:this.state.isExpanded?\"block\":\"none\"}},i.createElement(C,{data:this.props.param.defaultValue,onChange:this.onChange,onHover:this.onHover,onDrag:this.onDrag})));},t;}(i.PureComponent),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={value:\"0\"},t.update=function(e){var r=Object(c.b)(t.props.param.step||.01);e=parseFloat(e.toFixed(r)),t.props.onChange({param:t.props.param,name:t.props.name,value:e});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.param.label||Object(d.a)(this.props.name),t=this.props.param.label||Object(d.a)(this.props.name),r=Object(c.b)(this.props.param.step||.01);return i.createElement(m.ControlRow,{title:this.props.param.description,label:t,control:i.createElement(m.TextInput,{numeric:!0,value:parseFloat(this.props.value.toFixed(r)),onEnter:this.props.onEnter,placeholder:e,isDisabled:this.props.isDisabled,onChange:this.update})});},t;}(i.PureComponent),L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){t.update(e);},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){var e=void 0===this.props.value?this.props.param.defaultValue:this.props.value;return i.createElement(w.a,{value:e,min:this.props.param.min,max:this.props.param.max,step:this.props.param.step,onChange:this.onChange,disabled:this.props.isDisabled,onEnter:this.props.onEnter});},t;}(k),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){var r=e.target.value;r!==t.props.value&&t.update(r);},t.onKeyPress=function(e){13!==e.keyCode&&13!==e.charCode||t.props.onEnter&&t.props.onEnter(),e.stopPropagation();},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){var e=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(\"input\",{type:\"text\",value:this.props.value||\"\",placeholder:e,onChange:this.onChange,onKeyPress:this.props.onEnter?this.onKeyPress:void 0,disabled:this.props.isDisabled});},t;}(k),F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){\"number\"==typeof t.props.param.defaultValue?t.update(parseInt(e.target.value,10)):t.update(e.target.value);},t;}return Object(n.__extends)(t,e),t.prototype.update=function(e){this.props.onChange({param:this.props.param,name:this.props.name,value:e});},t.prototype.render=function(){var e=this,t=void 0!==this.props.value&&!this.props.param.options.some(function(t){return t[0]===e.props.value;});return i.createElement(\"select\",{className:\"msp-form-control\",title:this.props.title,value:void 0!==this.props.value?this.props.value:this.props.param.defaultValue,onChange:this.onChange,disabled:this.props.isDisabled},t&&i.createElement(\"option\",{key:this.props.value,value:this.props.value},\"[Invalid] \"+this.props.value),this.props.param.options.map(function(e){var t=e[0],r=e[1];return i.createElement(\"option\",{key:t,value:t},r);}));},t;}(i.PureComponent),U=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showHelp:!1,showOptions:!1},t.onSelect=function(e){e&&e.value!==t.props.value?t.setState({showOptions:!1},function(){t.props.onChange({param:t.props.param,name:t.props.name,value:e.value});}):t.setState({showOptions:!1});},t.toggle=function(){return t.setState({showOptions:!t.state.showOptions});},t.cycle=function(){var e=t.props.param.options,r=e.findIndex(function(e){return e[0]===t.props.value;}),n=r===e.length-1?0:r+1;t.props.onChange({param:t.props.param,name:t.props.name,value:e[n][0]});},t.items=Object(u.b)(function(e){return p.a.createItemsFromSelectOptions(e.options);}),t.toggleHelp=function(){return t.setState({showHelp:!t.state.showHelp});},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){var e,t=this.items(this.props.param),r=void 0!==this.props.value?p.a.findItem(t,this.props.value):void 0,n=r?r.label:void 0===this.props.value?((null===(e=p.a.getFirstItem(t))||void 0===e?void 0:e.label)||\"\")+\" [Default]\":\"[Invalid] \"+this.props.value,a=this.props.param.cycle?this.cycle:this.toggle,o=this.props.param.cycle?\"center\":\"left\",s=this.props.param.cycle?\"on\"===this.props.value?_.CheckSvg:\"off\"===this.props.value?_.ClearSvg:void 0:void 0;return i.createElement(m.ToggleButton,{disabled:this.props.isDisabled,style:{textAlign:o,overflow:\"hidden\",textOverflow:\"ellipsis\"},label:n,title:n,icon:s,toggle:a,isSelected:this.state.showOptions});},t.prototype.renderAddOn=function(){if(!this.state.showOptions)return null;var e=this.items(this.props.param),t=p.a.findItem(e,this.props.value);return i.createElement(p.a,{items:e,current:t,onSelect:this.onSelect});},t.prototype.render=function(){return I({props:this.props,state:this.state,control:this.renderControl(),toggleHelp:this.toggleHelp,addOn:this.renderAddOn()});},t;}(i.PureComponent),z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.components={0:l.ParamDefinition.Numeric(0,{step:t.props.param.step},{label:\"Min\"}),1:l.ParamDefinition.Numeric(0,{step:t.props.param.step},{label:\"Max\"})},t.componentChange=function(e){var r=e.name,i=e.value,a=Object(n.__spreadArrays)(t.props.value);a[+r]=i,t.change(a);},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.render=function(){var e=this.props.value,t=this.props.param.label||Object(d.a)(this.props.name),r=Object(c.b)(this.props.param.step||.01),n=\"[\"+e[0].toFixed(r)+\", \"+e[1].toFixed(r)+\"]\";return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:t,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},n)}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(j,{params:this.components,values:e,onChange:this.componentChange,onEnter:this.props.onEnter})));},t;}(i.PureComponent),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){t.update(e);},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){return i.createElement(w.b,{value:this.props.value,min:this.props.param.min,max:this.props.param.max,step:this.props.param.step,onChange:this.onChange,disabled:this.props.isDisabled,onEnter:this.props.onEnter});},t;}(k),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){t.update(Object(o.Color)(parseInt(e.target.value)));},t;}return Object(n.__extends)(t,e),t.prototype.stripStyle=function(){return{background:o.Color.toStyle(this.props.value),position:\"absolute\",bottom:\"0\",height:\"4px\",right:\"0\",left:\"0\"};},t.prototype.renderControl=function(){return i.createElement(\"div\",{style:{position:\"relative\"}},i.createElement(\"select\",{value:this.props.value,onChange:this.onChange},(e=this.props.value,y.has(e)?null:i.createElement(\"option\",{key:o.Color.toHexString(e),value:e,style:{background:\"\"+o.Color.toStyle(e)}},o.Color.toRgbString(e))),b||(b=i.createElement(i.Fragment,null,g.map(function(e){return i.createElement(\"option\",{key:e[1],value:e[1],style:{background:\"\"+o.Color.toStyle(e[1])}},Object(d.d)(e[0]));})))),i.createElement(\"div\",{style:this.stripStyle()}));var e;},t;}(k),q=Object(u.a)(function(e){return\"linear-gradient(to right, \"+e.map(function(e){return o.Color.toStyle(e);}).join(\", \")+\")\";}),W=Object(u.a)(function(e){for(var t=e.length,r=[o.Color.toStyle(e[0])+\" \"+1/t*100+\"%\"],n=1,i=t-1;n<i;++n)r.push(o.Color.toStyle(e[n])+\" \"+n/t*100+\"%\",o.Color.toStyle(e[n])+\" \"+(n+1)/t*100+\"%\");return r.push(o.Color.toStyle(e[t-1])+\" \"+(t-1)/t*100+\"%\"),\"linear-gradient(to right, \"+r.join(\", \")+\")\";});function Q(e,t){return void 0===t&&(t=\"0\"),{background:(r=e.colors,n=\"set\"===e.kind,n?W(r):q(r)),position:\"absolute\",bottom:\"0\",height:\"4px\",right:t,left:\"0\"};var r,n;}function Y(){return M||(e=function e(_e2){var t=Object(s.getColorListFromName)(_e2[0]);return i.createElement(\"div\",{style:Q({kind:\"qualitative\"!==t.type?\"interpolate\":\"set\",colors:t.list})});},M={ColorPresets:{all:p.a.createItemsFromSelectOptions(s.ColorListOptions,{addOn:e}),scale:p.a.createItemsFromSelectOptions(s.ColorListOptionsScale,{addOn:e}),set:p.a.createItemsFromSelectOptions(s.ColorListOptionsSet,{addOn:e})},ColorsParam:l.ParamDefinition.ObjectList({color:l.ParamDefinition.Color(0)},function(e){var t=e.color;return o.Color.toHexString(t).toUpperCase();}),IsInterpolatedParam:l.ParamDefinition.Boolean(!1,{label:\"Interpolated\"})});var e;}var X=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showHelp:!1,show:void 0},t.toggleEdit=function(){return t.setState({show:\"edit\"===t.state.show?void 0:\"edit\"});},t.togglePresets=function(){return t.setState({show:\"presets\"===t.state.show?void 0:\"presets\"});},t.selectPreset=function(e){if(e){t.setState({show:void 0});var r=Object(s.getColorListFromName)(e.value);t.update({kind:\"qualitative\"!==r.type?\"interpolate\":\"set\",colors:r.list});}},t.colorsChanged=function(e){var r=e.value;t.update({kind:t.props.value.kind,colors:r.map(function(e){return e.color;})});},t.isInterpolatedChanged=function(e){var r=e.value;t.update({kind:r?\"interpolate\":\"set\",colors:t.props.value.colors});},t.toggleHelp=function(){return t.setState({showHelp:!t.state.showHelp});},t;}return Object(n.__extends)(t,e),t.prototype.update=function(e){this.props.onChange({param:this.props.param,name:this.props.name,value:e});},t.prototype.renderControl=function(){var e=this.props.value;return i.createElement(i.Fragment,null,i.createElement(\"button\",{onClick:this.toggleEdit,style:{position:\"relative\",paddingRight:\"33px\"}},1===e.colors.length?\"1 color\":e.colors.length+\" colors\",i.createElement(\"div\",{style:Q(e,\"33px\")})),i.createElement(m.IconButton,{svg:_.BookmarksOutlinedSvg,onClick:this.togglePresets,toggleState:\"presets\"===this.state.show,title:\"Color Presets\",style:{padding:0,position:\"absolute\",right:0,top:0,width:\"32px\"}}));},t.prototype.renderColors=function(){if(!this.state.show)return null;var e=Y(),t=e.ColorPresets,r=e.ColorsParam,n=e.IsInterpolatedParam,a=t[this.props.param.presetKind];if(\"presets\"===this.state.show)return i.createElement(p.a,{items:a,onSelect:this.selectPreset});var o=this.props.value.colors.map(function(e){return{color:e};});return i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(oe,{name:\"colors\",param:r,value:o,onChange:this.colorsChanged,isDisabled:this.props.isDisabled,onEnter:this.props.onEnter}),i.createElement(B,{name:\"isInterpolated\",param:n,value:\"interpolate\"===this.props.value.kind,onChange:this.isInterpolatedChanged,isDisabled:this.props.isDisabled,onEnter:this.props.onEnter}));},t.prototype.render=function(){return I({props:this.props,state:this.state,control:this.renderControl(),toggleHelp:this.toggleHelp,addOn:this.renderColors()});},t;}(i.PureComponent),K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.components={0:l.ParamDefinition.Numeric(0,{step:t.props.param.step},{label:t.props.param.fieldLabels&&t.props.param.fieldLabels.x||\"X\"}),1:l.ParamDefinition.Numeric(0,{step:t.props.param.step},{label:t.props.param.fieldLabels&&t.props.param.fieldLabels.y||\"Y\"}),2:l.ParamDefinition.Numeric(0,{step:t.props.param.step},{label:t.props.param.fieldLabels&&t.props.param.fieldLabels.z||\"Z\"})},t.componentChange=function(e){var r=e.name,n=e.value,i=a.Vec3.copy(a.Vec3.zero(),t.props.value);i[+r]=n,t.change(i);},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.render=function(){var e=this.props.value,t=this.props.param.label||Object(d.a)(this.props.name),r=Object(c.b)(this.props.param.step||.01),n=\"[\"+e[0].toFixed(r)+\", \"+e[1].toFixed(r)+\", \"+e[2].toFixed(r)+\"]\";return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:t,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},n)}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(j,{params:this.components,values:e,onChange:this.componentChange,onEnter:this.props.onEnter})));},t;}(i.PureComponent),Z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.components={json:l.ParamDefinition.Text(JSON.stringify(Object(a.Mat4)()),{description:\"JSON array with 4x4 matrix in a column major (j * 4 + i indexing) format\"})},t.componentChange=function(e){var r=e.name,n=e.value,i=a.Mat4.copy(Object(a.Mat4)(),t.props.value);\"json\"===r?a.Mat4.copy(i,JSON.parse(n)):i[+r]=n,t.change(i);},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.changeValue=function(e){var t=this;return function(r){var n=a.Mat4.copy(Object(a.Mat4)(),t.props.value);n[e]=r,t.change(n);};},Object.defineProperty(t.prototype,\"grid\",{get:function get(){for(var e=this.props.value,t=[],r=0;r<4;r++){for(var n=[],o=0;o<4;o++)n.push(i.createElement(m.TextInput,{key:o,numeric:!0,delayMs:50,value:a.Mat4.getValue(e,r,o),onChange:this.changeValue(4*o+r),className:\"msp-form-control\",blurOnEnter:!0,isDisabled:this.props.isDisabled}));t.push(i.createElement(\"div\",{className:\"msp-flex-row\",key:r},n));}return i.createElement(\"div\",{className:\"msp-parameter-matrix\"},t);},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e={json:JSON.stringify(this.props.value)},t=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:t,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},\"4×4 Matrix\")}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},this.grid,i.createElement(j,{params:this.components,values:e,onChange:this.componentChange,onEnter:this.props.onEnter})));},t;}(i.PureComponent),J=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){var r=e.target.value;r!==P.Asset.getUrl(t.props.value||\"\")&&t.update(P.Asset.Url(r));},t.onKeyPress=function(e){13!==e.keyCode&&13!==e.charCode||t.props.onEnter&&t.props.onEnter(),e.stopPropagation();},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){var e=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(\"input\",{type:\"text\",value:P.Asset.getUrl(this.props.value||\"\"),placeholder:e,onChange:this.onChange,onKeyPress:this.props.onEnter?this.onKeyPress:void 0,disabled:this.props.isDisabled});},t;}(k),$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChangeFile=function(e){t.change(e.target.files[0]);},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:P.Asset.File(e)});},t.prototype.render=function(){var e=this.props.value;return i.createElement(\"div\",{className:\"msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file\",style:{marginTop:\"1px\"}},e?e.name:\"Select a file...\",\" \",i.createElement(\"input\",{disabled:this.props.isDisabled,onChange:this.onChangeFile,type:\"file\",multiple:!1,accept:this.props.param.accept}));},t;}(i.PureComponent),ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChangeFileList=function(e){t.change(e.target.files);},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){var t=[];if(e)for(var r=0,n=e.length;r<n;++r)t.push(P.Asset.File(e[r]));this.props.onChange({name:this.props.name,param:this.props.param,value:t});},t.prototype.render=function(){var e=this.props.value,t=[];if(e)for(var r=0,n=e;r<n.length;r++){var a=n[r];t.push(a.name);}var o=0===t.length?\"Select files...\":1===t.length?t[0]:t.length+\" files selected\";return i.createElement(\"div\",{className:\"msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file\",style:{marginTop:\"1px\"}},o,\" \",i.createElement(\"input\",{disabled:this.props.isDisabled,onChange:this.onChangeFileList,type:\"file\",multiple:!0,accept:this.props.param.accept}));},t;}(i.PureComponent),te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.toggle=function(e){var t=this;return function(r){t.props.value.indexOf(e)<0?t.change(t.props.value.concat(e)):t.change(t.props.value.filter(function(t){return t!==e;})),r.currentTarget.blur();};},t.prototype.render=function(){var e=this,t=this.props.value,r=this.props.param.emptyValue,n=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:n,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},0===t.length&&r?r:t.length+\" of \"+this.props.param.options.length)}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},this.props.param.options.map(function(r){var n=r[0],a=r[1],o=t.indexOf(n)>=0;return i.createElement(m.Button,{key:n,onClick:e.toggle(n),disabled:e.props.isDisabled,style:{marginTop:\"1px\"}},i.createElement(\"span\",{style:{float:o?\"left\":\"right\"}},o?\"✓ \"+a:a+\" ✗\"));})));},t;}(i.PureComponent),re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!!t.props.param.isExpanded,showHelp:!1},t.onChangeParam=function(e){var r;t.change(Object(n.__assign)(Object(n.__assign)({},t.props.value),((r={})[e.name]=e.value,r)));},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.pivoted=function(){var e=this.props.param.pivot,t=this.props.param.params,r=t[e],n=T(r),a=i.createElement(n,{name:e,param:r,value:this.props.value[e],onChange:this.onChangeParam,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled});if(!this.state.isExpanded)return i.createElement(\"div\",{className:\"msp-mapped-parameter-group\"},a,i.createElement(m.IconButton,{svg:_.MoreHorizSvg,onClick:this.toggleExpanded,toggleState:this.state.isExpanded,title:\"More Options\"}));for(var o=Object.create(null),s=0,u=Object.keys(t);s<u.length;s++){var c=u[s];c!==e&&(o[c]=t[c]);}return i.createElement(\"div\",{className:\"msp-mapped-parameter-group\"},a,i.createElement(m.IconButton,{svg:_.MoreHorizSvg,onClick:this.toggleExpanded,toggleState:this.state.isExpanded,title:\"More Options\"}),i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(j,{params:o,onEnter:this.props.onEnter,values:this.props.value,onChange:this.onChangeParam,isDisabled:this.props.isDisabled})));},t.prototype.render=function(){var e=this.props.param.params;if(0===Object.keys(e).length)return null;if(this.props.param.pivot)return this.pivoted();var t=this.props.param.label||Object(d.a)(this.props.name),r=i.createElement(j,{params:e,onChange:this.onChangeParam,values:this.props.value,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled});return this.props.inMapped?i.createElement(\"div\",{className:\"msp-control-offset\"},r):this.props.param.isFlat?r:i.createElement(\"div\",{className:\"msp-control-group-wrapper\"},i.createElement(\"div\",{className:\"msp-control-group-header\"},i.createElement(\"button\",{className:\"msp-btn msp-form-control msp-btn-block\",onClick:this.toggleExpanded},i.createElement(_.Icon,{svg:this.state.isExpanded?_.ArrowDropDownSvg:_.ArrowRightSvg}),t)),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},r));},t;}(i.PureComponent),ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.valuesCache={},t.onChangeName=function(e){t.change({name:e.value,params:t.getValues(e.value)});},t.onChangeParam=function(e){t.setValues(t.props.value.name,e.value),t.change({name:t.props.value.name,params:e.value});},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.setValues=function(e,t){this.valuesCache[e]=t;},t.prototype.getValues=function(e){return e in this.valuesCache?this.valuesCache[e]:this.props.param.map(e).defaultValue;},t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.areParamsEmpty=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){if(!e[r[t]].isHidden)return!1;}return!0;},t.prototype.render=function(){var e=this,t=this.props.value,r=this.props.param.map(t.name),a=this.props.param.label||Object(d.a)(this.props.name),o=T(r),s=this.props.param.help,u=s?Object(n.__assign)(Object(n.__assign)({},this.props.param.select),{help:function help(t){return s({name:t,params:e.getValues(t)});}}):this.props.param.select,c=i.createElement(U,{param:u,isDisabled:this.props.isDisabled,onChange:this.onChangeName,onEnter:this.props.onEnter,name:a,value:t.name});return o?\"group\"!==r.type||r.isFlat?i.createElement(i.Fragment,null,c,i.createElement(o,{param:r,value:t.params,name:t.name,onChange:this.onChangeParam,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled})):this.areParamsEmpty(r.params)?c:i.createElement(\"div\",{className:\"msp-mapped-parameter-group\"},c,i.createElement(m.IconButton,{svg:_.MoreHorizSvg,onClick:this.toggleExpanded,toggleState:this.state.isExpanded,title:a+\" Properties\"}),this.state.isExpanded&&i.createElement(re,{inMapped:!0,param:r,value:t.params,name:t.name,onChange:this.onChangeParam,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled})):c;},t;}(i.PureComponent),ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={current:t.props.value},t.onChangeParam=function(e){var r;t.setState({current:Object(n.__assign)(Object(n.__assign)({},t.state.current),(r={},r[e.name]=e.value,r))});},t.apply=function(){t.props.apply(t.state.current);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidUpdate=function(e){this.props.params===e.params&&this.props.value===e.value||this.setState({current:this.props.value});},t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(j,{params:this.props.params,onChange:this.onChangeParam,values:this.state.current,onEnter:this.apply,isDisabled:this.props.isDisabled}),i.createElement(\"button\",{className:\"msp-btn msp-btn-block msp-form-control msp-control-top-offset\",onClick:this.apply,disabled:this.props.isDisabled},this.props.isUpdate?\"Update\":\"Add\"));},t;}(i.PureComponent),ae=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.update=function(e){t.props.actions.update(e,t.props.index);},t.moveUp=function(){t.props.actions.move(t.props.index,-1);},t.moveDown=function(){t.props.actions.move(t.props.index,1);},t.remove=function(){t.setState({isExpanded:!1}),t.props.actions.remove(t.props.index);},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-param-object-list-item\"},i.createElement(\"button\",{className:\"msp-btn msp-btn-block msp-form-control\",onClick:this.toggleExpanded},i.createElement(\"span\",null,this.props.index+1+\": \"),this.props.param.getLabel(this.props.value)),i.createElement(\"div\",null,i.createElement(m.IconButton,{svg:_.ArrowDownwardSvg,title:\"Move Up\",onClick:this.moveUp,small:!0}),i.createElement(m.IconButton,{svg:_.ArrowUpwardSvg,title:\"Move Down\",onClick:this.moveDown,small:!0}),i.createElement(m.IconButton,{svg:_.DeleteOutlinedSvg,title:\"Remove\",onClick:this.remove,small:!0}))),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(ie,{params:this.props.param.element,apply:this.update,value:this.props.value,isUpdate:!0,isDisabled:this.props.isDisabled})));},t;}(i.PureComponent),oe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isExpanded:!1},t.add=function(e){t.change(Object(n.__spreadArrays)(t.props.value,[e]));},t.actions={update:function update(e,r){var n=t.props.value.slice(0);n[r]=e,t.change(n);},move:function move(e,r){var n=t.props.value;if(1!==n.length){var i=(e+r)%n.length;i<0&&(i+=n.length);var a=(n=n.slice(0))[e];n[e]=n[i],n[i]=a,t.change(n);}},remove:function remove(e){for(var r=t.props.value,n=[],i=0;i<r.length;i++)e!==i&&n.push(r[i]);t.change(n);}},t.toggleExpanded=function(e){t.setState({isExpanded:!t.state.isExpanded}),e.currentTarget.blur();},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.render=function(){var e=this,t=this.props.value,r=this.props.param.label||Object(d.a)(this.props.name),n=t.length+\" item\"+(1!==t.length?\"s\":\"\");return i.createElement(i.Fragment,null,i.createElement(m.ControlRow,{label:r,control:i.createElement(\"button\",{onClick:this.toggleExpanded,disabled:this.props.isDisabled},n)}),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\"},this.props.value.map(function(t,r){return i.createElement(ae,{key:r,param:e.props.param,value:t,index:r,actions:e.actions,isDisabled:e.props.isDisabled});}),i.createElement(m.ControlGroup,{header:\"New Item\"},i.createElement(ie,{params:this.props.param.element,apply:this.add,value:this.props.param.ctor(),isDisabled:this.props.isDisabled}))));},t;}(i.PureComponent),se=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChangeCondition=function(e){t.change(t.props.param.conditionedValue(t.props.value,e.value));},t.onChangeParam=function(e){t.change(e.value);},t;}return Object(n.__extends)(t,e),t.prototype.change=function(e){this.props.onChange({name:this.props.name,param:this.props.param,value:e});},t.prototype.render=function(){var e=this.props.value,t=this.props.param.conditionForValue(e),r=this.props.param.conditionParams[t],n=this.props.param.label||Object(d.a)(this.props.name),a=T(r),o=i.createElement(U,{param:this.props.param.select,isDisabled:this.props.isDisabled,onChange:this.onChangeCondition,onEnter:this.props.onEnter,name:n+\" Kind\",value:t});return a?i.createElement(i.Fragment,null,o,i.createElement(a,{param:r,value:e,name:n,onChange:this.onChangeParam,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled})):o;},t;}(i.PureComponent),ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){t.props.onChange({name:t.props.name,param:t.props.param,value:t.props.param.toValue(e.value)});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.param.fromValue(this.props.value),t=T(this.props.param.converted);return t?i.createElement(t,{param:this.props.param.converted,value:e,name:this.props.name,onChange:this.onChange,onEnter:this.props.onEnter,isDisabled:this.props.isDisabled}):null;},t;}(i.PureComponent),ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){var r=e.target.value;r!==t.props.value.expression&&t.update({language:t.props.value.language,expression:r});},t.onKeyPress=function(e){13!==e.keyCode&&13!==e.charCode||t.props.onEnter&&t.props.onEnter(),e.stopPropagation();},t;}return Object(n.__extends)(t,e),t.prototype.renderControl=function(){var e=this.props.param.label||Object(d.a)(this.props.name);return i.createElement(\"input\",{type:\"text\",value:this.props.value.expression||\"\",placeholder:e,onChange:this.onChange,onKeyPress:this.props.onEnter?this.onKeyPress:void 0,disabled:this.props.isDisabled});},t;}(k);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(23),a=r(45),o=r(1),s=r(182),u=r(53),c=r(5),l=r(134),d=r(6),f=r(141),p=r(142);!function(e){e.setVisibility=function(e,t){e&&(e.state.visible=t);},e.setAlphaFactor=function(e,t){e&&(e.state.alphaFactor=t);},e.setPickable=function(e,t){e&&(e.state.pickable=t);},e.mark=function(e,t,r,n){if(!e)return!1;var o=e.values,s=o.tMarker,u=o.uGroupCount,l=o.instanceCount,f=u.ref.value*l.ref.value,p=s.ref.value.array,m=!1;return Object(i.isEveryLoci)(t)?m=Object(a.c)(p,d.Interval.ofLength(f),r):Object(i.isEmptyLoci)(t)||(m=n(t,function(e){return Object(a.c)(p,e,r);},!0)),m&&c.e.update(s,s.ref.value),m;},e.setOverpaint=function(e,t,r,n){if(e){var i=e.values,a=i.tOverpaint,o=i.uGroupCount,s=i.instanceCount,u=o.ref.value*s.ref.value;Object(l.d)(t.layers.length?u:0,e.values);var f=a.ref.value.array;n&&Object(l.b)(f,0,u);for(var p=function p(e,n){var i=t.layers[e],a=i.loci,o=i.color,s=i.clear;r(a,function(e){var t=d.Interval.start(e),r=d.Interval.end(e);return s?Object(l.b)(f,t,r):Object(l.a)(f,t,r,o);},!1);},m=0,h=t.layers.length;m<h;++m)p(m);c.e.update(a,a.ref.value);}},e.setTransparency=function(e,t,r,n){if(e){var i=e.values,a=i.tTransparency,o=i.uGroupCount,s=i.instanceCount,u=o.ref.value*s.ref.value;Object(f.d)(t.layers.length?u:0,e.values);var l=a.ref.value.array;n&&Object(f.b)(l,0,u);for(var p=function p(e,n){var i=t.layers[e],a=i.loci,o=i.value;r(a,function(e){var t=d.Interval.start(e),r=d.Interval.end(e);return Object(f.a)(l,t,r,o);},!1);},m=0,h=t.layers.length;m<h;++m)p(m);c.e.update(a,a.ref.value);}},e.setClipping=function(e,t,r,n){if(e){var i=e.values,a=i.tClipping,o=i.uGroupCount,s=i.instanceCount,u=o.ref.value*s.ref.value;Object(p.c)(t.layers.length?u:0,e.values);var l=a.ref.value.array;n&&Object(p.b)(l,0,u);for(var f=function f(e,n){var i=t.layers[e],a=i.loci,o=i.groups;r(a,function(e){var t=d.Interval.start(e),r=d.Interval.end(e);return Object(p.a)(l,t,r,o);},!1);},m=0,h=t.layers.length;m<h;++m)f(m);c.e.update(a,a.ref.value);}},e.setTransform=function(e,t,r){if(e&&(t||r)){var n=e.values;t&&(o.Mat4.copy(n.matrix.ref.value,t),c.e.update(n.matrix,n.matrix.ref.value)),r?(n.extraTransform.ref.value.set(r),c.e.update(n.extraTransform,n.extraTransform.ref.value)):null===r&&(Object(s.c)(n.extraTransform.ref.value,n.instanceCount.ref.value),c.e.update(n.extraTransform,n.extraTransform.ref.value)),Object(s.d)(n);var i=Object(u.b)(n.invariantBoundingSphere.ref.value,n.aTransform.ref.value,n.instanceCount.ref.value);c.e.update(n.boundingSphere,i);}};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(100),i=r(300),a=r(215),o=r(277),s=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e);}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this._parentOrParents,s=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var l=0;l<r.length;++l){r[l].remove(this);}if(Object(a.a)(s))try{s.call(this);}catch(e){t=e instanceof o.a?u(e.errors):[e];}if(Object(n.a)(c)){l=-1;for(var d=c.length;++l<d;){var f=c[l];if(Object(i.a)(f))try{f.unsubscribe();}catch(e){t=t||[],e instanceof o.a?t=t.concat(u(e.errors)):t.push(e);}}}if(t)throw new o.a(t);}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof_default()(t)){case\"function\":r=new e(t);case\"object\":if(r===this||r.closed||\"function\"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e())._subscriptions=[n];}break;default:throw new Error(\"unrecognized teardown \"+t+\" added to Subscription.\");}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof e){if(i===this)return r;r._parentOrParents=[i,this];}else{if(-1!==i.indexOf(this))return r;i.push(this);}var a=this._subscriptions;return null===a?this._subscriptions=[r]:a.push(r),r;},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1);}},e.EMPTY=((t=new e()).closed=!0,t),e;}();function u(e){return e.reduce(function(e,t){return e.concat(t instanceof o.a?t.errors:t);},[]);}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"DefaultLabelOptions\",function(){return d;}),r.d(t,\"lociLabel\",function(){return f;}),r.d(t,\"structureElementStatsLabel\",function(){return h;}),r.d(t,\"bondLabel\",function(){return g;}),r.d(t,\"bundleLabel\",function(){return v;}),r.d(t,\"_bundleLabel\",function(){return b;}),r.d(t,\"elementLabel\",function(){return y;}),r.d(t,\"distanceLabel\",function(){return S;}),r.d(t,\"angleLabel\",function(){return O;}),r.d(t,\"dihedralLabel\",function(){return x;});var n=r(0),i=r(4),a=r(23),o=r(6),s=r(41),u=r(1),c=r(46),l=r(36),d={granularity:\"element\",condensed:!1,reverse:!1,countsOnly:!1,hidePrefix:!1,htmlStyling:!0};function f(e,t){switch(void 0===t&&(t={}),e.kind){case\"structure-loci\":return e.structure.models.map(function(e){return e.entry;}).filter(function(e){return!!e;}).join(\", \");case\"element-loci\":return h(i.StructureElement.Stats.ofLoci(e),t);case\"bond-loci\":var r=e.bonds[0];return r?g(r):\"\";case\"shape-loci\":return e.shape.name;case\"group-loci\":var n=e.groups[0];return n?e.shape.getLabel(o.OrderedSet.start(n.ids),n.instance):\"\";case\"every-loci\":return\"Everything\";case\"empty-loci\":return\"Nothing\";case\"data-loci\":return e.getLabel();case\"volume-loci\":return e.volume.label||\"Volume\";case\"isosurface-loci\":return[\"\"+(e.volume.label||\"Volume\"),\"Isosurface at \"+l.b.IsoValue.toString(e.isoValue)].join(\" | \");case\"cell-loci\":var a=o.OrderedSet.size(e.indices),s=o.OrderedSet.start(e.indices),u=l.b.IsoValue.absolute(e.volume.grid.cells.data[s]),c=l.b.IsoValue.toRelative(u,e.volume.grid.stats),d=[\"\"+(e.volume.label||\"Volume\"),1===a?\"Cell #\"+s:a+\" Cells\"];return 1===a&&d.push(l.b.IsoValue.toString(u)+\" (\"+l.b.IsoValue.toString(c)+\")\"),d.join(\" | \");}}function p(e,t){return 1===e?\"1 \"+t:e+\" \"+t+\"s\";}function m(e,t,r,n,i,a){return y(t,{granularity:r,hidePrefix:n,reverse:i,condensed:a})+\" <small>[+ \"+p(e-1,\"other \"+Object(s.b)(r))+\"]</small>\";}function h(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)({},d),t),a=function(e,t,r,n,a){void 0===t&&(t=!1);void 0===r&&(r=!1);void 0===n&&(n=!1);void 0===a&&(a=!1);var o=e.structureCount,s=e.chainCount,u=e.residueCount,c=e.conformationCount,l=e.elementCount;if(t||1!==l||0!==u||0!==s){if(t||0!==l||1!==u||0!==s){if(t||0!==l||0!==u||1!==s){if(t){d=[];return o>0&&d.push(p(o,\"Structure\")),s>0&&d.push(p(s,\"Chain\")),u>0&&d.push(p(u,\"Residue\")),c>0&&d.push(p(c,\"Conformation\")),l>0&&d.push(p(l,\"Element\")),d.join(\"<small> + </small>\");}var d=[];return o>0&&d.push(1===o?y(e.firstStructureLoc,{hidePrefix:r,condensed:n,granularity:\"structure\",reverse:a}):m(o,e.firstStructureLoc,\"structure\",r,a,n)),s>0&&(d.push(1===s?y(e.firstChainLoc,{condensed:n,granularity:\"chain\",hidePrefix:r,reverse:a}):m(s,e.firstChainLoc,\"chain\",r,a,n)),r=!0),u>0&&(d.push(1===u?y(e.firstResidueLoc,{condensed:n,granularity:\"residue\",hidePrefix:r,reverse:a}):m(u,e.firstResidueLoc,\"residue\",r,a,n)),r=!0),c>0&&(d.push(1===c?y(e.firstConformationLoc,{condensed:n,granularity:\"conformation\",hidePrefix:r,reverse:a}):m(c,e.firstConformationLoc,\"conformation\",r,a,n)),r=!0),l>0&&d.push(1===l?y(e.firstElementLoc,{condensed:n,granularity:\"element\",hidePrefix:r,reverse:a}):m(l,e.firstElementLoc,\"element\",r,a,n)),d.join(\"<small> + </small>\");}var f=e.firstChainLoc.unit,h=i.Unit.isAtomic(f)&&1===function(e){var t=e.elements,r=e.model.atomicHierarchy,n=r.chainAtomSegments,i=r.residueAtomSegments,a=n.offsets[n.index[t[0]]],o=n.offsets[n.index[t[t.length-1]]+1]-1;return i.index[o]-i.index[a]+1;}(f)||i.Unit.Traits.is(f.traits,1)?\"residue\":\"chain\";return y(e.firstChainLoc,{hidePrefix:r,condensed:n,granularity:h,reverse:a});}return y(e.firstResidueLoc,{hidePrefix:r,condensed:n,granularity:\"residue\",reverse:a});}return y(e.firstElementLoc,{hidePrefix:r,condensed:n,granularity:\"element\",reverse:a});}(e,r.countsOnly,r.hidePrefix,r.condensed,r.reverse);return r.htmlStyling?a:Object(s.e)(a);}function g(e,t){return void 0===t&&(t={}),v({loci:[i.StructureElement.Loci(e.aStructure,[{unit:e.aUnit,indices:o.OrderedSet.ofSingleton(e.aIndex)}]),i.StructureElement.Loci(e.bStructure,[{unit:e.bUnit,indices:o.OrderedSet.ofSingleton(e.bIndex)}])]},t);}function v(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)({},d),t),i=b(e,r);return r.htmlStyling?i:Object(s.e)(i);}function b(e,t){for(var r=t.granularity,n=t.hidePrefix,a=t.reverse,s=t.condensed,u=!0,c=0,l=e.loci;c<l.length;c++){var d=l[c];if(!i.StructureElement.Loci.is(d)||1!==i.StructureElement.Loci.size(d)){u=!1;break;}}if(u){var p=e.loci.map(function(e){var t=e.elements[0],r=t.unit,n=t.indices;return i.StructureElement.Location.create(e.structure,r,r.elements[o.OrderedSet.start(n)]);}).map(function(e){return _(e,r,n,a||s);});if(s)return p.map(function(e){return e[0].replace(/\\[.*\\]/g,\"\").trim();}).filter(function(e){return!!e;}).join(\" — \");for(var m=0,h=0,g=Math.min.apply(Math,p.map(function(e){return e.length;}))-1;h<g;++h){for(var v=!0,b=1,y=p.length;b<y;++b)if(p[0][h]!==p[b][h]){v=!1;break;}if(!v)break;m+=1;}if(m>0){var S=[p[0].join(\" | \")];for(b=1,y=p.length;b<y;++b)S.push(p[b].slice(m).filter(function(e){return!!e;}).join(\" | \"));return S.join(\" — \");}return p.map(function(e){return e.filter(function(e){return!!e;}).join(\" | \");}).filter(function(e){return!!e;}).join(\"</br>\");}return(p=e.loci.map(function(e){return f(e,t);})).filter(function(e){return!!e;}).join(s?\" — \":\"</br>\");}function y(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)({},d),t),i=_(e,r.granularity,r.hidePrefix,r.reverse||r.condensed),a=r.condensed?i[0].replace(/\\[.*\\]/g,\"\").trim():i.filter(function(e){return!!e;}).join(\" | \");return r.htmlStyling?a:Object(s.e)(a);}function _(e,t,r,n){void 0===t&&(t=\"element\"),void 0===r&&(r=!1),void 0===n&&(n=!1);var a=[];if(!r){var o=e.unit.model.entry;o.length>30&&(o=o.substr(0,27)+\"…\"),a.push(\"<small>\"+o+\"</small>\"),\"structure\"!==t&&(a.push(\"<small>Model \"+e.unit.model.modelNum+\"</small>\"),a.push(\"<small>Instance \"+e.unit.conformation.operator.name+\"</small>\"));}return i.Unit.isAtomic(e.unit)?a.push.apply(a,function(e,t,r){void 0===r&&(r=!1);var n=i.StructureElement.Location.residueIndex(e),a=i.StructureProperties.chain.label_asym_id(e),o=i.StructureProperties.chain.auth_asym_id(e),s=0===e.unit.model.atomicHierarchy.residues.label_seq_id.valueKind(n),u=i.StructureProperties.residue.label_seq_id(e),c=i.StructureProperties.residue.auth_seq_id(e),l=i.StructureProperties.residue.pdbx_PDB_ins_code(e),d=i.StructureProperties.atom.label_comp_id(e),f=i.StructureProperties.atom.label_atom_id(e),p=i.StructureProperties.atom.label_alt_id(e),m=i.StructureProperties.atom.occupancy(e),h=i.StructureProperties.residue.microheterogeneityCompIds(e),g=\"residue\"===t&&h.length>1?\"(\"+h.join(\"|\")+\")\":d,v=[];switch(t){case\"element\":v.push(\"<b>\"+f+\"</b>\"+(p?\"%\"+p:\"\"));case\"conformation\":\"conformation\"===t&&p&&v.push(\"<small>Conformation</small> <b>\"+p+\"</b>\");case\"residue\":var b=u!==c&&s?u:c;v.push(\"<b>\"+g+\" \"+b+\"</b>\"+(b!==c?\" <small>[auth</small> <b>\"+c+\"</b><small>]</small>\":\"\")+\"<b>\"+(l||\"\")+\"</b>\");case\"chain\":a===o?v.push(\"<b>\"+a+\"</b>\"):\"chain\"===t&&i.Unit.Traits.is(e.unit.traits,1)?v.push(\"<small>[auth</small> <b>\"+o+\"</b><small>]</small>\"):v.push(\"<b>\"+a+\"</b> <small>[auth</small> <b>\"+o+\"</b><small>]</small>\");}v.length>0&&1!==m&&!r&&(v[0]=v[0]+\" <small>[occupancy</small> <b>\"+Math.round(100*m)/100+\"</b><small>]</small>\");return v.reverse();}(e,t,n)):i.Unit.isCoarse(e.unit)?a.push.apply(a,function(e,t){var r=i.StructureProperties.coarse.asym_id(e),n=i.StructureProperties.coarse.seq_id_begin(e),a=i.StructureProperties.coarse.seq_id_end(e),o=[];switch(t){case\"element\":case\"conformation\":case\"residue\":if(n===a){var s=i.StructureProperties.coarse.entityKey(e),u=e.unit.model.sequence.byEntityKey[s].sequence.compId.value(n-1);o.push(\"<b>\"+u+\" \"+n+\"-\"+a+\"</b>\");}else o.push(\"<b>\"+n+\"-\"+a+\"</b>\");case\"chain\":o.push(\"<b>\"+r+\"</b>\");}return o.reverse();}(e,t)):a.push(\"Unknown\"),n?a.reverse():a;}function S(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},d),{measureOnly:!1,unitLabel:\"Å\"}),t),i=e.loci.map(function(e){return a.Loci.getCenter(e);}),o=i[0],s=i[1],c=u.Vec3.distance(o,s).toFixed(2)+\" \"+r.unitLabel;if(r.measureOnly)return c;var l=v(e,r);return r.condensed?c+\" | \"+l:\"Distance \"+c+\"</br>\"+l;}function O(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},d),{measureOnly:!1}),t),i=e.loci.map(function(e){return a.Loci.getCenter(e);}),o=i[0],s=i[1],l=i[2],f=u.Vec3.sub(Object(u.Vec3)(),o,s),p=u.Vec3.sub(Object(u.Vec3)(),l,s),m=Object(c.f)(u.Vec3.angle(f,p)).toFixed(2)+\"°\";if(r.measureOnly)return m;var h=v(e,r);return r.condensed?m+\" | \"+h:\"Angle \"+m+\"</br>\"+h;}function x(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},d),{measureOnly:!1}),t),i=e.loci.map(function(e){return a.Loci.getCenter(e);}),o=i[0],s=i[1],l=i[2],f=i[3],p=Math.abs(Object(c.f)(u.Vec3.dihedralAngle(o,s,l,f))).toFixed(2)+\"°\";if(r.measureOnly)return p;var m=v(e,r);return r.condensed?p+\" | \"+m:\"Dihedral \"+p+\"</br>\"+m;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(8),o=r(13),s=r(16),u=r(2),c=r(5);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(i.__extends)(t,e),t;}(a.a.Create({name:\"Root\",typeClass:\"Root\"}));e.Root=t;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(i.__extends)(t,e),t;}(a.a.Create({name:\"Category\",typeClass:\"Object\"}));e.Category=r;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(i.__extends)(t,e),t;}(a.a.CreateBehavior({name:\"Behavior\"}));e.Behavior=n,e.Categories={common:\"Common\",representation:\"Representation\",interaction:\"Interaction\",\"custom-props\":\"Custom Properties\",misc:\"Miscellaneous\"},e.CreateCategory=a.b.BuiltIn({name:\"create-behavior-category\",display:{name:\"Behavior Category\"},from:t,to:r,params:{label:u.ParamDefinition.Text(\"\",{isHidden:!0})}})({apply:function apply(e){var t=e.params;return new r({},{label:t.label});}});var l=new Map();e.getCategoryId=function(e){return l.get(e.id);},e.create=function(e){var r=a.b.CreateBuiltIn({name:e.name,display:e.display,from:[t],to:[n],params:e.params,apply:function apply(t,r){var i=t.params,a=e.label?e.label(i):{label:e.display.name,description:e.display.description};return new n(new e.ctor(r,i),a);},update:function update(e){var t=this,r=e.b,n=e.newParams;return s.b.create(\"Update Behavior\",function(){return Object(i.__awaiter)(t,void 0,void 0,function(){return Object(i.__generator)(this,function(e){switch(e.label){case 0:return r.data.update?[4,r.data.update(n)]:[2,o.StateTransformer.UpdateResult.Unchanged];case 1:return[2,e.sent()?o.StateTransformer.UpdateResult.Updated:o.StateTransformer.UpdateResult.Unchanged];}});});});},canAutoUpdate:e.canAutoUpdate});return l.set(r.id,e.category),r;},e.simpleCommandHandler=function(e,t){return function(){function r(e){this.ctx=e,this.sub=void 0;}return r.prototype.register=function(){var r=this;this.sub=e.subscribe(this.ctx,function(e){return t(e,r.ctx);});},r.prototype.unregister=function(){this.sub&&this.sub.unsubscribe(),this.sub=void 0;},r;}();};var d=function(){function e(e,t){this.ctx=e,this.params=t,this.subs=[];}return e.prototype.subscribeCommand=function(e,t){this.subs.push(e.subscribe(this.ctx,t));},e.prototype.subscribeObservable=function(e,t){this.subs.push(e.subscribe(t));},e.prototype.track=function(e){this.subs.push(e);},e.prototype.unregister=function(){for(var e=0,t=this.subs;e<t.length;e++){t[e].unsubscribe();}this.subs=[];},e.prototype.update=function(e){return!Object(c.m)(e,this.params)&&(this.params=e,!0);},e;}();e.Handler=d;var f=function(){function e(e,t){this.plugin=e,this.params=t,this.subs=[];}return e.prototype.subscribeCommand=function(e,t){this.subs.push(e.subscribe(this.plugin,t));},e.prototype.subscribeObservable=function(e,t){this.subs.push(e.subscribe(t));},e.prototype.unregister=function(){for(var e=0,t=this.subs;e<t.length;e++){t[e].unsubscribe();}this.subs=[];},e;}();e.WithSubscribers=f;}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return p;});var n,i=r(16),a=r(31),o=r(154),s=r(113),u=r(279),c=r(7),l=r(211),d=r(324),f=r(266);function p(e){var t=n.fromFrame(e);return i.b.create(\"Create mmCIF Model\",function(e){return Object(o.a)(t.data.db,t,e);});}s.a.Provider.formatRegistry.add(\"mmCIF\",function(e){if(n.is(e.sourceData))return s.a.fromData(e.sourceData.data.db);}),u.a.Provider.formatRegistry.add(\"mmCIF\",function(e){if(n.is(e.sourceData)){var t=e.sourceData.data.db,r=t.struct_conf,i=t.struct_sheet_range;return u.a.fromStruct(r,i,e.atomicHierarchy);}}),l.a.Provider.formatRegistry.add(\"mmCIF\",function(e){if(n.is(e.sourceData)){var t=e.sourceData.data.db.atom_site_anisotrop;return{data:c.d.ofColumns(l.a.Schema,t),elementToAnsiotrop:l.a.getElementToAnsiotrop(e.atomicConformation.atomId,t.id)};}},function(e){return!!n.is(e.sourceData)&&e.sourceData.data.db.atom_site_anisotrop.U.isDefined;}),d.a.Provider.formatRegistry.add(\"mmCIF\",function(e){if(n.is(e.sourceData)){var t=e.sourceData.data.db.chem_comp_bond;if(0!==t._rowCount)return{data:t,entries:d.a.getEntriesFromChemCompBond(t)};}}),f.a.Provider.formatRegistry.add(\"mmCIF\",function(e){if(n.is(e.sourceData)){var t=e.sourceData.data.db.struct_conn;if(0!==t._rowCount){var r=f.a.getEntriesFromStructConn(t,e);return{data:t,byAtomIndex:f.a.getAtomIndexFromEntries(r),entries:r};}}}),function(e){e.is=function(e){return\"mmCIF\"===e.kind;},e.fromFrame=function(e,t){return t||(t=a.a.schema.mmCIF(e)),{kind:\"mmCIF\",name:t._name,data:{db:t,frame:e}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return a;}),r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return s;});var n=r(7),i=r(97);function a(e){return function(t){return o(e,t);};}function o(e,t){var r=e.data,a=e.indices,o=e.count,u=t.valueType,c=\"str\"===u?function(e){return r.substring(a[2*e],a[2*e+1]);}:\"int\"===u?function(e){return Object(i.d)(r,a[2*e],a[2*e+1])||0;}:function(e){return Object(i.b)(r,a[2*e],a[2*e+1])||0;};return{schema:t,__array:void 0,isDefined:!0,rowCount:o,value:c,valueKind:function valueKind(e){return 0;},toArray:function toArray(e){return n.b.createAndFillArray(o,c,e);},areValuesEqual:s(e)};}function s(e){var t=e.data,r=e.indices;return function(e,n){var i=r[2*e],a=r[2*n],o=r[2*e+1]-i;if(o!==r[2*n+1]-a)return!1;for(var s=0;s<o;s++)if(t.charCodeAt(s+i)!==t.charCodeAt(s+a))return!1;return!0;};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(1),s=r(124),u=r(117),c=r(125),l=r(145),d=r(172),f=r(2),p=r(53),m=r(11),h=r(33),g=r(134),v=r(141),b=r(9),y=r(142);!function(e){function t(e,t,r,i,o,u,c){return c?function(e,t,r,n,i,o,s){return s.lineCount=o,a.e.update(s.mappingBuffer,e),a.e.update(s.indexBuffer,t),a.e.update(s.groupBuffer,r),a.e.update(s.startBuffer,n),a.e.update(s.endBuffer,i),s;}(e,t,r,i,o,u,c):function(e,t,r,i,o,u){var c,l=Object(m.g)(),d=-1,f=-1,h={kind:\"lines\",lineCount:u,mappingBuffer:a.e.create(e),indexBuffer:a.e.create(t),groupBuffer:a.e.create(r),startBuffer:a.e.create(i),endBuffer:a.e.create(o),get boundingSphere(){var e=n(h);if(e!==d){var t=Object(p.a)(h.startBuffer.ref.value,4*h.lineCount,4),r=Object(p.a)(h.endBuffer.ref.value,4*h.lineCount,4);m.g.expandBySphere(l,t,r),d=e;}return l;},get groupMapping(){return h.groupBuffer.ref.version!==f&&(c=Object(s.c)(h.groupBuffer.ref.value,h.lineCount,4),f=h.groupBuffer.ref.version),c;},setBoundingSphere:function setBoundingSphere(e){m.g.copy(l,e),d=n(h);}};return h;}(e,t,r,i,o,u);}function r(e){return t(e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),e?e.startBuffer.ref.value:new Float32Array(0),e?e.endBuffer.ref.value:new Float32Array(0),0,e);}function n(e){return Object(b.l)([e.lineCount,e.mappingBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version,e.startBuffer.ref.version,e.startBuffer.ref.version]);}function _(e,t,r,n,s){var d=r.instanceCount,f=r.groupCount,b=Object(u.a)(r,n.color),_=Object(l.a)(r,n.size),S=Object(c.a)(d*f),O=Object(g.c)(),x=Object(v.c)(),C=Object(y.d)(),w={drawCount:2*e.lineCount*3,groupCount:f,instanceCount:d},P=m.g.clone(e.boundingSphere),j=Object(p.b)(P,t.aTransform.ref.value,d);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({aMapping:e.mappingBuffer,aGroup:e.groupBuffer,aStart:e.startBuffer,aEnd:e.endBuffer,elements:e.indexBuffer,boundingSphere:a.e.create(j),invariantBoundingSphere:a.e.create(P),uInvariantBoundingSphere:a.e.create(o.Vec4.ofSphere(P))},b),_),S),O),x),C),t),h.a.createValues(s,w)),{uSizeFactor:a.e.create(s.sizeFactor),dLineSizeAttenuation:a.e.create(s.lineSizeAttenuation),dDoubleSided:a.e.create(!0),dFlipSided:a.e.create(!1)});}e.create=t,e.createEmpty=r,e.fromMesh=function(e,t){for(var r=e.vertexBuffer.ref.value,n=e.indexBuffer.ref.value,i=e.groupBuffer.ref.value,a=d.a.create(3*e.triangleCount,e.triangleCount/10,t),o=0,s=3*e.triangleCount;o<s;o+=3){var u=n[o],c=n[o+1],l=n[o+2],f=r[3*u],p=r[3*u+1],m=r[3*u+2],h=r[3*c],g=r[3*c+1],v=r[3*c+2],b=r[3*l],y=r[3*l+1],_=r[3*l+2];a.add(f,p,m,h,g,v,i[u]),a.add(f,p,m,b,y,_,i[u]),a.add(h,g,v,b,y,_,i[c]);}return a.getLines();},e.transform=function(e,t){var r=e.startBuffer.ref.value;Object(s.e)(t,r,0,4*e.lineCount),a.e.update(e.startBuffer,r);var n=e.endBuffer.ref.value;Object(s.e)(t,n,0,4*e.lineCount),a.e.update(e.endBuffer,n);},e.Params=Object(i.__assign)(Object(i.__assign)({},h.a.Params),{sizeFactor:f.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),lineSizeAttenuation:f.ParamDefinition.Boolean(!1)}),e.Utils={Params:e.Params,createEmpty:r,createValues:_,createValuesSimple:function createValuesSimple(t,r,n,a,o){var s=h.a.createSimple(n,a,o),u=Object(i.__assign)(Object(i.__assign)({},f.ParamDefinition.getDefaultValues(e.Params)),r);return _(t,s.transform,s.locationIterator,s.theme,u);},updateValues:function updateValues(e,t){h.a.updateValues(e,t),a.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),a.e.updateIfChanged(e.dLineSizeAttenuation,t.lineSizeAttenuation);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=m.g.clone(t.boundingSphere),n=Object(p.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);m.g.equals(n,e.boundingSphere.ref.value)||a.e.update(e.boundingSphere,n);m.g.equals(r,e.invariantBoundingSphere.ref.value)||(a.e.update(e.invariantBoundingSphere,r),a.e.update(e.uInvariantBoundingSphere,o.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:h.a.createRenderableState,updateRenderableState:h.a.updateRenderableState};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return u;}),r.d(t,\"a\",function(){return c;});var n=r(1),i=r(34),a=r(263),o=new Map(),s=n.Mat4.identity();function u(e){var t=o.get(e);return void 0===t&&(t=Object(a.a)(e),o.set(e,t)),t;}function c(e,t,r,a){i.a.addPrimitive(e,function(e,t,r){return n.Mat4.scaleUniformly(e,n.Mat4.fromTranslation(e,t),r);}(s,t,r),u(a));}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(191),o=r(5);!function(e){function t(e,t,r,n){var i=n&&n.ref?n.ref:o.c.create22(),a=void 0;return n&&n.tags&&(0===(a=\"string\"==typeof n.tags?[n.tags]:n.tags).length?a=void 0:a.sort()),{parent:e,transformer:t,state:(null==n?void 0:n.state)||{},tags:a,ref:i,dependsOn:n&&n.dependsOn,params:r,version:o.c.create22()};}function r(e,t){return!!e.tags&&e.tags.indexOf(t)>=0;}function n(e){return e;}e.RootRef=\"-=root=-\",e.areStatesEqual=function(e,t){return!!e.isHidden!=!!t.isHidden||!!e.isCollapsed!=!!t.isCollapsed||!!e.isGhost!=!!t.isGhost||!!e.isLocked!=!!t.isLocked;},e.isStateChange=function(e,t){return!!t&&(void 0!==t.isCollapsed&&e.isCollapsed!==t.isCollapsed||void 0!==t.isHidden&&e.isHidden!==t.isHidden||void 0!==t.isGhost&&e.isGhost!==t.isGhost||void 0!==t.isLocked&&e.isLocked!==t.isLocked);},e.assignState=function(e,t){if(!t)return!1;for(var r=!1,n=0,i=Object.keys(t);n<i.length;n++){var a=i[n],o=t[a];!!o!=!!e[a]&&(r=!0,e[a]=o);}return r;},e.syncState=function(e,t){if(!t)return!1;for(var r=!1,n=0,i=Object.keys(t);n<i.length;n++){!!(u=t[s=i[n]])!=!!e[s]&&(r=!0,e[s]=u);}for(var a=0,o=Object.keys(e);a<o.length;a++){var s,u;!!(u=t[s=o[a]])!=!!e[s]&&(r=!0,e[s]=u);}return r;},e.create=t,e.withParams=function(e,t){return Object(i.__assign)(Object(i.__assign)({},e),{params:t,version:o.c.create22()});},e.withState=function(e,t){return t?Object(i.__assign)(Object(i.__assign)({},e),{state:Object(i.__assign)(Object(i.__assign)({},e.state),t)}):e;},e.withTags=function(e,t){var r=void 0;return t&&(0===(r=\"string\"==typeof t?[t]:t).length?r=void 0:r.sort()),Object(i.__assign)(Object(i.__assign)({},e),{tags:r,version:o.c.create22()});},e.withParent=function(e,t){return Object(i.__assign)(Object(i.__assign)({},e),{parent:t,version:o.c.create22()});},e.createRoot=function(r){return t(e.RootRef,a.a.ROOT,{},{ref:e.RootRef,state:r});},e.hasTag=r,e.hasTags=function(e,t){if(!e.tags)return\"string\"!=typeof t&&0===t.length;if(\"string\"==typeof t)return r(e,t);for(var n=0,i=t;n<i.length;n++){var a=i[n];if(e.tags.indexOf(a)<0)return!1;}return!0;},e.toJSON=function(e){for(var t=e.transformer.definition.customSerialization?e.transformer.definition.customSerialization.toJSON:n,r=void 0,i=0,a=Object.keys(e.state);i<a.length;i++){var o=a[i];e.state[o]&&(r||(r={}),r[o]=!0);}return{parent:e.parent,transformer:e.transformer.id,params:e.params?t(e.params):void 0,state:r,tags:e.tags,ref:e.ref,dependsOn:e.dependsOn,version:e.version};},e.fromJSON=function(e){var t=a.a.get(e.transformer),r=t.definition.customSerialization?t.definition.customSerialization.toJSON:n;return{parent:e.parent,transformer:t,params:e.params?r(e.params):void 0,state:e.state||{},tags:e.tags,ref:e.ref,dependsOn:e.dependsOn,version:e.version};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(23),i=r(4),a=r(120),o=r(207);function s(e){return{layers:e};}!function(e){function t(e){return 0===e.layers.length;}e.Empty={layers:[]},function(e){function t(e){switch(e){case\"one\":return 1;case\"two\":return 2;case\"three\":return 4;case\"four\":return 8;case\"five\":return 16;case\"six\":return 32;}}e.is=o.a.has,e.create=function(e){return o.a.create(e);},e.Names={one:1,two:2,three:4,four:8,five:16,six:32},e.isName=function(t){return t in e.Names;},e.fromName=t,e.fromNames=function(e){for(var r=0,n=0,i=e.length;n<i;++n)r|=t(e[n]);return r;},e.toNames=function(t){var r=[];return e.is(t,1)&&r.push(\"one\"),e.is(t,2)&&r.push(\"two\"),e.is(t,4)&&r.push(\"three\"),e.is(t,8)&&r.push(\"four\"),e.is(t,16)&&r.push(\"five\"),e.is(t,32)&&r.push(\"six\"),r;};}(e.Groups||(e.Groups={})),e.Type={none:0,plane:1,sphere:2,cube:3,cylinder:4,infiniteCone:5},e.areEqual=function(e,t){if(0===e.layers.length&&0===t.layers.length)return!0;if(e.layers.length!==t.layers.length)return!1;for(var r=0,i=e.layers.length;r<i;++r){if(e.layers[r].groups!==t.layers[r].groups)return!1;if(!n.Loci.areEqual(e.layers[r].loci,t.layers[r].loci))return!1;}return!0;},e.isEmpty=t,e.remap=function(e,t){for(var r=[],n=0,a=e.layers;n<a.length;n++){var o=a[n],s=o.loci,u=o.groups;s=i.StructureElement.Loci.remap(s,t),i.StructureElement.Loci.isEmpty(s)||r.push({loci:s,groups:u});}return{layers:r};},e.merge=function(e){if(t(e))return e;for(var r=e.layers[0].loci.structure,n=new Map(),a=i.StructureElement.Loci.none(r),o=0,s=e.layers.length;o<s;++o){var u=e.layers[s-o-1],c=u.loci,l=u.groups;c=i.StructureElement.Loci.subtract(c,a),a=i.StructureElement.Loci.union(c,a),i.StructureElement.Loci.isEmpty(c)||(n.has(l)&&(c=i.StructureElement.Loci.union(c,n.get(l))),n.set(l,c));}var d=[];return n.forEach(function(e,t){d.push({loci:e,groups:t});}),{layers:d};},e.filter=function(e,r){if(t(e))return e;for(var n=e.layers[0].loci.structure,a=[],o=0,s=e.layers;o<s.length;o++){var u=s[o],c=u.loci,l=u.groups,d=i.StructureElement.Loci.remap(c,r);c=i.StructureElement.Loci.remap(d,n),i.StructureElement.Loci.isEmpty(c)||a.push({loci:c,groups:l});}return{layers:a};},e.ofScript=function(e,t){for(var r=[],n=0,o=e.length;n<o;++n){var s=e[n],u=s.script,c=s.groups,l=a.Script.toLoci(u,t);i.StructureElement.Loci.isEmpty(l)||r.push({loci:l,groups:c});}return{layers:r};},e.ofBundle=function(e,t){for(var r=[],n=0,a=e.length;n<a;++n){var o=e[n],s=o.bundle,u=o.groups,c=i.StructureElement.Bundle.toLoci(s,t.root);r.push({loci:c,groups:u});}return{layers:r};},e.toBundle=function(e){for(var t=[],r=0,n=e.layers.length;r<n;++r){var a=e.layers[r],o=a.loci,s=a.groups,u=i.StructureElement.Bundle.fromLoci(o);t.push({bundle:u,groups:s});}return{layers:t};};}(s||(s={}));},function(e,t,r){\"use strict\";function n(e,t,r){return Math.max(t,Math.min(r,e));}function i(e,t,r){return e+(t-e)*r;}function a(e,t,r,n,i,a){var o=(r-e)*a,s=(n-t)*a,u=i*i;return(2*t-2*r+o+s)*(i*u)+(-3*t+3*r-2*o-s)*u+o*i+t;}function o(e,t,r,n){var i=1-n;return i*i*e+2*i*n*t+n*n*r;}r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;}),r.d(t,\"d\",function(){return a;}),r.d(t,\"c\",function(){return o;});},function(e,t,r){\"use strict\";var n,i=r(6);!function(e){function t(e){return e[e.length-1];}function r(e){return e.length/2;}function n(e,t){return e[2*t];}function a(e,t){return e[2*t+1]+1;}function o(e,t){return e[2*t];}function s(e,t){return e[2*t+1];}function u(e,t){return c(e,t,0);}function c(e,n,a){if(o(e,a)>i.OrderedSet.max(n)||t(e)<i.OrderedSet.min(n))return-1;for(var u=a,c=r(e);u<c;++u){var l=i.Interval.ofRange(o(e,u),s(e,u));if(i.OrderedSet.areIntersecting(l,n))return u;}return-1;}e.ofSortedRanges=function(e){return i.SortedArray.ofSortedArray(e);},e.start=function(e){return e[0];},e.end=function(e){return e[e.length-1]+1;},e.min=function(e){return e[0];},e.max=t,e.size=function(e){for(var t=0,r=0,n=e.length;r<n;r+=2)t+=e[r+1]-e[r]+1;return t;},e.count=r,e.startAt=n,e.endAt=a,e.minAt=o,e.maxAt=s,e.areEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;++r)if(e[r]!==t[r])return!1;return!0;},e.forEach=function(e,t){for(var r=0,n=0,i=e.length;n<i;n+=2)for(var a=e[n],o=e[n+1];a<=o;++a)t(a,r),++r;},e.has=function(e,t){return-1!==u(e,t);},e.hasFrom=function(e,t,r){return-1!==c(e,t,r);},e.firstIntersectionIndex=u,e.firstIntersectionIndexFrom=c,e.transientSegments=function(e,t){return new l(e,t);};var l=function(){function e(e,t){this.ranges=e,this.set=t,this.value={index:0,start:0,end:0},this.curIndex=0,this.hasNext=!1,this.curIndex=u(e,t),this.hasNext=-1!==this.curIndex;}return e.prototype.updateValue=function(){this.value.index=this.curIndex,this.value.start=i.OrderedSet.findPredecessorIndex(this.set,n(this.ranges,this.curIndex)),this.value.end=i.OrderedSet.findPredecessorIndex(this.set,a(this.ranges,this.curIndex));},e.prototype.move=function(){return this.hasNext&&(this.updateValue(),this.curIndex=c(this.ranges,this.set,this.curIndex+1),this.hasNext=-1!==this.curIndex),this.value;},e;}();e.Iterator=l;}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"c\",function(){return d;}),r.d(t,\"e\",function(){return K;}),r.d(t,\"f\",function(){return Z;}),r.d(t,\"g\",function(){return J;}),r.d(t,\"b\",function(){return $;}),r.d(t,\"d\",function(){return ee;});var n,i=r(0),a=r(4),o=r(22),s=r(10),u=r(163),c=r(90),l=(r(28),r(245));function d(e,t,r){var o,s;return void 0===r&&(r={}),{label:e,expression:t,description:r.description||\"\",category:null!==(o=r.category)&&void 0!==o?o:n.Misc,isHidden:!!r.isHidden,priority:r.priority||0,referencesCurrent:!!r.referencesCurrent,get query(){return s||(s=Object(u.compile)(t)),s;},ensureCustomProperties:r.ensureCustomProperties,getSelection:function getSelection(e,n,o){return Object(i.__awaiter)(this,void 0,void 0,function(){var c,l;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return c=e.managers.structure.selection.getStructure(o),l=c?a.StructureSelection.Sequence(o,[c]):a.StructureSelection.Empty(o),r.ensureCustomProperties?[4,r.ensureCustomProperties({runtime:n,assetManager:e.managers.asset},o)]:[3,2];case 1:i.sent(),i.label=2;case 2:return s||(s=Object(u.compile)(t)),[2,s(new a.QueryContext(o,{currentSelection:l}))];}});});}};}!function(e){e.Type=\"Type\",e.Structure=\"Structure Property\",e.Atom=\"Atom Property\",e.Bond=\"Bond Property\",e.Residue=\"Residue Property\",e.AminoAcid=\"Amino Acid\",e.NucleicBase=\"Nucleic Base\",e.Manipulate=\"Manipulate Selection\",e.Validation=\"Validation\",e.Misc=\"Miscellaneous\",e.Internal=\"Internal\";}(n||(n={}));var f=d(\"All\",s.MolScriptBuilder.struct.generator.all(),{category:\"\",priority:1e3}),p=d(\"Current Selection\",s.MolScriptBuilder.internal.generator.current(),{category:\"\",referencesCurrent:!0}),m=d(\"Polymer\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"(polypeptide|cyclic-pseudo-peptide|nucleotide|peptide nucleic acid)\",\"i\"),s.MolScriptBuilder.ammp(\"entitySubtype\")])])})]),{category:n.Type}),h=d(\"Trace\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),\"chain-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set(\"sphere\",\"gaussian\"),s.MolScriptBuilder.ammp(\"objectPrimitive\")])})]),s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"atom-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set(\"CA\",\"P\"),s.MolScriptBuilder.ammp(\"label_atom_id\")])})])])]),{category:n.Structure}),g=s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"(polypeptide|cyclic-pseudo-peptide)\",\"i\"),s.MolScriptBuilder.ammp(\"entitySubtype\")])]),v=s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"(nucleotide|peptide nucleic acid)\",\"i\"),s.MolScriptBuilder.ammp(\"entitySubtype\")])]),b=s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"non-polymer|(amino|carboxy) terminus|peptide-like\",\"i\"),s.MolScriptBuilder.ammp(\"chemCompType\")]),y=d(\"Backbone\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.ProteinBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])})]),s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":v,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.NucleicBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])})])])]),{category:n.Structure}),_=d(\"Sidechain\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.ProteinBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])])])})]),s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":v,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.NucleicBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])])])})])])]),{category:n.Structure}),S=d(\"Sidechain with Trace\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.ProteinBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])]),s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"label_atom_id\"),\"CA\"]),s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"auth_comp_id\"),\"PRO\"]),s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"label_atom_id\"),\"N\"])])])})]),s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":v,\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([b]),\"atom-test\":s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,c.a.toArray(o.NucleicBackboneAtoms)),s.MolScriptBuilder.ammp(\"label_atom_id\")])]),s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"label_atom_id\"),\"P\"])])})])])]),{category:n.Structure}),O=d(\"Protein\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g})]),{category:n.Type}),x=d(\"Nucleic\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":v})]),{category:n.Type}),C=d(\"Helix\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g,\"residue-test\":s.MolScriptBuilder.core.flags.hasAny([s.MolScriptBuilder.ammp(\"secondaryStructureFlags\"),s.MolScriptBuilder.core.type.bitflags([2])])})]),{category:n.Structure}),w=d(\"Beta Strand/Sheet\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":g,\"residue-test\":s.MolScriptBuilder.core.flags.hasAny([s.MolScriptBuilder.ammp(\"secondaryStructureFlags\"),s.MolScriptBuilder.core.type.bitflags([4])])})]),{category:n.Structure}),P=d(\"Water\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"water\"])})]),{category:n.Type}),j=d(\"Ion\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entitySubtype\"),\"ion\"])})]),{category:n.Type}),E=d(\"Lipid\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entitySubtype\"),\"lipid\"])})]),{category:n.Type}),A=d(\"Carbohydrate\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"branched\"]),s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"non-polymer\"]),s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"oligosaccharide\",\"i\"),s.MolScriptBuilder.ammp(\"entitySubtype\")])])])})]),{category:n.Type}),T=d(\"Carbohydrate with Connected\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.includeConnected({0:A.expression,\"layer-count\":1,\"as-whole-residues\":!0})]),{category:n.Internal,isHidden:!0}),D=d(\"Connected to Carbohydrate\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.exceptBy({0:T.expression,by:A.expression})]),{category:n.Internal,isHidden:!0}),I=d(\"Ligand\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.logic.and([s.MolScriptBuilder.core.logic.or([s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"non-polymer\"]),s.MolScriptBuilder.core.rel.neq([s.MolScriptBuilder.ammp(\"entityPrdId\"),\"\"])]),s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"(oligosaccharide|lipid|ion)\",\"i\"),s.MolScriptBuilder.ammp(\"entitySubtype\")])])]),\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.core.logic.not([s.MolScriptBuilder.core.str.match([s.MolScriptBuilder.re(\"saccharide\",\"i\"),s.MolScriptBuilder.ammp(\"chemCompType\")])])})]),s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":b})])])]),{category:n.Type}),M=d(\"Ligand with Connected\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.exceptBy({0:s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.includeConnected({0:I.expression,\"layer-count\":1,\"as-whole-residues\":!0,\"bond-test\":s.MolScriptBuilder.core.flags.hasAny([s.MolScriptBuilder.struct.bondProperty.flags(),s.MolScriptBuilder.core.type.bitflags([3])])})]),by:A.expression})]),{category:n.Internal,isHidden:!0}),k=d(\"Connected to Ligand\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.exceptBy({0:M.expression,by:I.expression})]),{category:n.Internal,isHidden:!0}),B=d(\"Connected to Ligand or Carbohydrate\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.combinator.merge([D.expression,k.expression])]),{category:n.Internal,isHidden:!0}),V=d(\"Disulfide Bridges\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.wholeResidues([s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.bondedAtomicPairs({0:s.MolScriptBuilder.core.flags.hasAny([s.MolScriptBuilder.struct.bondProperty.flags(),s.MolScriptBuilder.core.type.bitflags([8])])})])])]),{category:n.Bond}),R=d(\"Non-standard Residues in Polymers\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),\"chain-test\":s.MolScriptBuilder.core.rel.eq([s.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":s.MolScriptBuilder.ammp(\"isNonStandard\")})]),{category:n.Residue}),L=d(\"Coarse Elements\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set(\"sphere\",\"gaussian\"),s.MolScriptBuilder.ammp(\"objectPrimitive\")])})]),{category:n.Type}),N=d(\"Rings in Residues\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.rings()]),{category:n.Residue}),F=d(\"Aromatic Rings in Residues\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.rings({\"only-aromatic\":!0})]),{category:n.Residue}),U=d(\"Surrounding Residues (5 Å) of Selection\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.exceptBy({0:s.MolScriptBuilder.struct.modifier.includeSurroundings({0:s.MolScriptBuilder.internal.generator.current(),radius:5,\"as-whole-residues\":!0}),by:s.MolScriptBuilder.internal.generator.current()})]),{description:\"Select residues within 5 Å of the current selection.\",category:n.Manipulate,referencesCurrent:!0}),z=d(\"Inverse / Complement of Selection\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.exceptBy({0:s.MolScriptBuilder.struct.generator.all(),by:s.MolScriptBuilder.internal.generator.current()})]),{description:\"Select everything not in the current selection.\",category:n.Manipulate,referencesCurrent:!0}),H=d(\"Residues Covalently Bonded to Selection\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.includeConnected({0:s.MolScriptBuilder.internal.generator.current(),\"layer-count\":1,\"as-whole-residues\":!0})]),{description:\"Select residues covalently bonded to current selection.\",category:n.Manipulate,referencesCurrent:!0}),G=d(\"Residues with Cov. or Metallic Bond to Selection\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.includeConnected({0:s.MolScriptBuilder.internal.generator.current(),\"layer-count\":1,\"as-whole-residues\":!0,\"bond-test\":s.MolScriptBuilder.core.flags.hasAny([s.MolScriptBuilder.struct.bondProperty.flags(),s.MolScriptBuilder.core.type.bitflags([3])])})]),{description:\"Select residues with covalent or metallic bond to current selection.\",category:n.Manipulate,referencesCurrent:!0}),q=d(\"Whole Residues of Selection\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.modifier.wholeResidues({0:s.MolScriptBuilder.internal.generator.current()})]),{description:\"Expand current selection to whole residues.\",category:n.Manipulate,referencesCurrent:!0}),W=[[[\"HIS\"],\"Histidine\"],[[\"ARG\"],\"Arginine\"],[[\"LYS\"],\"Lysine\"],[[\"ILE\"],\"Isoleucine\"],[[\"PHE\"],\"Phenylalanine\"],[[\"LEU\"],\"Leucine\"],[[\"TRP\"],\"Tryptophan\"],[[\"ALA\"],\"Alanine\"],[[\"MET\"],\"Methionine\"],[[\"PRO\"],\"Proline\"],[[\"CYS\"],\"Cysteine\"],[[\"ASN\"],\"Asparagine\"],[[\"VAL\"],\"Valine\"],[[\"GLY\"],\"Glycine\"],[[\"SER\"],\"Serine\"],[[\"GLN\"],\"Glutamine\"],[[\"TYR\"],\"Tyrosine\"],[[\"ASP\"],\"Aspartic Acid\"],[[\"GLU\"],\"Glutamic Acid\"],[[\"THR\"],\"Threonine\"],[[\"SEC\"],\"Selenocysteine\"],[[\"PYL\"],\"Pyrrolysine\"],[[\"UNK\"],\"Unknown\"]].sort(function(e,t){return e[1]<t[1]?-1:e[1]>t[1]?1:0;}),Q=[[[\"A\",\"DA\"],\"Adenosine\"],[[\"C\",\"DC\"],\"Cytidine\"],[[\"T\",\"DT\"],\"Thymidine\"],[[\"G\",\"DG\"],\"Guanosine\"],[[\"I\",\"DI\"],\"Inosine\"],[[\"U\",\"DU\"],\"Uridine\"],[[\"N\",\"DN\"],\"Unknown\"]].sort(function(e,t){return e[1]<t[1]?-1:e[1]>t[1]?1:0;});function Y(e,t,r){var n=e[0],i=e[1];void 0===r&&(r=0);var a=1!==n.length||X.has(n[0])?i+\" (\"+n.join(\", \")+\")\":\"[\"+n[0]+\"] \"+i;return d(a,s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"residue-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,n),s.MolScriptBuilder.ammp(\"auth_comp_id\")])})]),{category:t,priority:r,description:a});}var X=c.a.unionMany(o.AminoAcidNamesL,o.RnaBaseNames,o.DnaBaseNames,o.WaterNames);function K(e){for(var t=new Set(),r=0,n=e;r<n.length;r++){n[r].uniqueElementSymbols.forEach(function(e){return t.add(e);});}var i=[];return t.forEach(function(e){var t,r,n,a,o,u=l.a[e]||e;i.push((r=\"Element Symbol\",n=0,a=(t=[[e],u])[0],d(o=t[1]+\" (\"+a.join(\", \")+\")\",s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"atom-test\":s.MolScriptBuilder.core.set.has([s.MolScriptBuilder.set.apply(s.MolScriptBuilder,a),s.MolScriptBuilder.acp(\"elementSymbol\")])})]),{category:r,priority:n,description:o})));}),i;}function Z(e){for(var t=new Map(),r=new Set(),n=0,i=e;n<i.length;n++){var a=i[n];a.uniqueResidueNames.forEach(function(e){return r.add(e);});for(var o=function o(e){a.uniqueResidueNames.forEach(function(r){var n=e.properties.chemicalComponentMap.get(r);n&&t.set(r,n.name);});},s=0,u=a.models;s<u.length;s++){o(u[s]);}}var l=[];return c.a.difference(r,X).forEach(function(e){var r=t.get(e)||e;l.push(Y([[e],r],\"Ligand/Non-standard Residue\",200));}),l;}function J(e){for(var t=new Map(),r=a.StructureElement.Location.create(),n=0,i=e;n<i.length;n++){var o=i[n];r.structure=o;for(var u=0,c=o.unitSymmetryGroups;u<c.length;u++){var l=c[u];r.unit=l.units[0],r.element=l.elements[0];var f=a.StructureProperties.entity.type(r);if(\"polymer\"===f||\"branched\"===f){var p=a.StructureProperties.entity.pdbx_description(r);t.set(p.join(\", \"),p);}}}var m=[];return t.forEach(function(e,t){m.push(function(e,t,r){var n=e[0],i=e[1],a=\"\"+i;return d(\"\"+i,s.MolScriptBuilder.struct.modifier.union([s.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":s.MolScriptBuilder.core.list.equal([s.MolScriptBuilder.list.apply(s.MolScriptBuilder,n),s.MolScriptBuilder.ammp(\"entityDescription\")])})]),{category:t,priority:r,description:a});}([e,t],\"Polymer/Carbohydrate Entities\",300));}),m;}var $={all:f,current:p,polymer:m,trace:h,backbone:y,sidechain:_,sidechainWithTrace:S,protein:O,nucleic:x,helix:C,beta:w,water:P,ion:j,lipid:E,branched:A,branchedPlusConnected:T,branchedConnectedOnly:D,ligand:I,ligandPlusConnected:M,ligandConnectedOnly:k,connectedOnly:B,disulfideBridges:V,nonStandardPolymer:R,coarse:L,ring:N,aromaticRing:F,surroundings:U,complement:z,covalentlyBonded:H,covalentlyOrMetallicBonded:G,wholeResidues:q},ee=function(){function e(){var e,t;this.list=[],this.options=[],this.version=1,(e=this.list).push.apply(e,Object(i.__spreadArrays)(Object.values($),W.map(function(e){return Y(e,n.AminoAcid);}),Q.map(function(e){return Y(e,n.NucleicBase);}))),(t=this.options).push.apply(t,this.list.map(function(e){return[e,e.label,e.category];}));}return e.prototype.add=function(e){this.list.push(e),this.options.push([e,e.label,e.category]),this.version+=1;},e.prototype.remove=function(e){var t=this.list.indexOf(e);-1!==t&&(this.list.splice(t,1),this.options.splice(t,1),this.version+=1);},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return _;}),r.d(t,\"b\",function(){return S;}),r.d(t,\"c\",function(){return O;});var n=r(1),i=r(34),a=r(127),o=r(0),s={radiusTop:1,radiusBottom:1,height:1,radialSegments:8,heightSegments:1,topCap:!1,bottomCap:!1,thetaStart:0,thetaLength:2*Math.PI};var u=r(234),c=r(149),l=new Map(),d=n.Vec3.create(0,1,0),f=n.Vec3.zero(),p=n.Vec3.zero(),m=n.Vec3.zero(),h=n.Mat4.zero(),g=n.Vec3.zero(),v=n.Vec3.zero();function b(e,t,r,i){return n.Vec3.setMagnitude(p,r,i/2),n.Vec3.add(m,t,p),n.Vec3.matchDirection(v,d,p),n.Vec3.makeRotation(e,v,p),n.Mat4.setTranslation(e,m);}function y(e){var t=JSON.stringify(e),r=l.get(t);if(void 0===r){if(e.radialSegments&&e.radialSegments<=4){var i=Object(u.e)(Object(c.a)(4,!0,e.radiusTop),e);r=Object(a.c)(i,n.Mat4.rotX90);}else r=function(e){var t=Object(o.__assign)(Object(o.__assign)({},s),e),r=t.radiusTop,i=t.radiusBottom,a=t.height,u=t.radialSegments,c=t.heightSegments,l=t.topCap,d=t.bottomCap,f=t.thetaStart,p=t.thetaLength,m=[],h=[],g=[],v=0,b=[],y=a/2;return function(){for(var e=n.Vec3.zero(),t=(i-r)/a,o=0;o<=c;++o){for(var s=[],l=o/c,d=l*(i-r)+r,_=0;_<=u;++_){var S=_/u*p+f,O=Math.sin(S),x=Math.cos(S);h.push(d*O,-l*a+y,d*x),n.Vec3.normalize(e,n.Vec3.set(e,O,t,x)),g.push.apply(g,e),s.push(v++);}b.push(s);}for(_=0;_<u;++_)for(o=0;o<c;++o){var C=b[o][_],w=b[o+1][_],P=b[o+1][_+1],j=b[o][_+1];m.push(C,w,j),m.push(w,P,j);}}(),l&&r>0&&_(!0),d&&i>0&&_(!1),{vertices:new Float32Array(h),normals:new Float32Array(g),indices:new Uint32Array(m)};function _(e){for(var t=!0===e?r:i,n=!0===e?1:-1,a=v,o=1;o<=u;++o)h.push(0,y*n,0),g.push(0,n,0),++v;var s=v;for(o=0;o<=u;++o){var c=o/u*p+f,l=Math.cos(c),d=Math.sin(c);h.push(t*d,y*n,t*l),g.push(0,n,0),++v;}for(o=0;o<u;++o){var b=a+o,_=s+o;!0===e?m.push(_,_+1,b):m.push(_+1,_,b);}}}(e);l.set(t,r);}return r;}function _(e,t,r,a,o){var s=n.Vec3.distance(t,r)*a;o.height=s,n.Vec3.sub(f,r,t),b(h,t,f,s),i.a.addPrimitive(e,h,y(o));}function S(e,t,r,a,o,s){var u=n.Vec3.distance(t,r)*a;s.height=u;var c=y(s);n.Vec3.sub(f,r,t),n.Vec3.add(g,t,o),b(h,g,f,u),i.a.addPrimitive(e,h,c),n.Vec3.sub(g,t,o),b(h,g,f,u),i.a.addPrimitive(e,h,c);}function O(e,t,r,a,o,s){var u=Math.floor(o/2),c=1/o;if(a<1){var l=a/2/o;a+=o%2==1?l:-l;}var d=n.Vec3.distance(t,r)*a;s.height=d*c;var p=y(s);n.Vec3.sub(f,r,t);for(var m=0;m<u;++m){var v=c*(2*m+1);n.Vec3.setMagnitude(f,f,d*v),n.Vec3.add(g,t,f),b(h,g,f,d*c),i.a.addPrimitive(e,h,p);}}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});var n=1e-6;function i(e,t,r){return Math.abs(e-t)<=r;}},function(e,t,r){\"use strict\";(function(e){r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});var n=function(){if(\"undefined\"!=typeof window&&window.performance){var t=window.performance;return function(){return t.now();};}return void 0!==e&&\"undefined\"!==e.hrtime&&\"function\"==typeof e.hrtime?function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6;}:Date.now?function(){return Date.now();}:function(){return+new Date();};}();function i(e,t){if(void 0===t&&(t=!0),isNaN(e))return\"n/a\";for(var r=Math.floor(e/36e5),n=Math.floor(e/6e4%60),i=Math.floor(e/1e3%60),a=Math.floor(e%1e3).toString();a.length<3;)a=\"0\"+a;for(;!t&&a.length>1&&\"0\"===a[a.length-1];)a=a.substr(0,a.length-1);return r>0?r+\"h\"+n+\"m\"+i+\".\"+a+\"s\":n>0?n+\"m\"+i+\".\"+a+\"s\":i>0?i+\".\"+a+\"s\":e.toFixed(0)+\"ms\";}}).call(this,r(383));},function(e,t,r){\"use strict\";r.d(t,\"e\",function(){return s;}),r.d(t,\"d\",function(){return u;}),r.d(t,\"f\",function(){return c;}),r.d(t,\"b\",function(){return l;}),r.d(t,\"a\",function(){return d;});var n=r(0),i=r(60),a=r(1),o=r(5);function s(e){if(\"object\"==typeof_default()(e)){if(\"buttons\"in e)return e.buttons;if(\"which\"in e){var t=e.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<<t-1;}}return 0;}function u(e){if(\"object\"==typeof_default()(e)&&\"button\"in e){var t=e.button;if(1===t)return 4;if(2===t)return 2;if(t>=0)return 1<<t;}return 0;}function c(e){return{alt:\"altKey\"in e&&e.altKey,shift:\"shiftKey\"in e&&e.shiftKey,control:\"ctrlKey\"in e&&e.ctrlKey,meta:\"metaKey\"in e&&e.metaKey};}var l,d,f,p={noScroll:!0,noMiddleClickScroll:!0,noContextMenu:!0,noPinchZoom:!0};function m(){return{drag:new i.a(),interactionEnd:new i.a(),click:new i.a(),move:new i.a(),wheel:new i.a(),pinch:new i.a(),resize:new i.a(),leave:new i.a(),enter:new i.a(),modifiers:new i.a()};}!function(e){function t(e){return void 0===e&&(e={}),{shift:!!e.shift,alt:!!e.alt,control:!!e.control,meta:!!e.meta};}e.None=t(),e.areEqual=function(e,t){return e.shift===t.shift&&e.alt===t.alt&&e.control===t.control&&e.meta===t.meta;},e.size=function(e){if(!e)return 0;var t=0;return e.shift&&t++,e.alt&&t++,e.control&&t++,e.meta&&t++,t;},e.create=t;}(l||(l={})),function(e){e.has=o.a.has,e.create=o.a.create;}(d||(d={})),function(e){e.create=function(e){void 0===e&&(e={});var t=Object(n.__assign)(Object(n.__assign)({},p),e),r=t.noScroll,i=t.noContextMenu;return Object(n.__assign)(Object(n.__assign)({noScroll:r,noContextMenu:i},m()),{dispose:o.k});},e.fromElement=function(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)({},p),t),i=r.noScroll,o=r.noMiddleClickScroll,c=r.noContextMenu,l=r.noPinchZoom,f=0,h=a.Vec2.zero(),g=a.Vec2.zero(),v=a.Vec2.zero(),b=a.Vec2.zero(),y=a.Vec2.zero(),_={shift:!1,alt:!1,control:!1,meta:!1};function S(){return Object(n.__assign)({},_);}var O=0,x=!1,C=d.create(0),w=0,P=!1,j=m(),E=j.drag,A=j.interactionEnd,T=j.wheel,D=j.pinch,I=j.click,M=j.move,k=j.leave,B=j.enter,V=j.resize,R=j.modifiers;return e.addEventListener(\"contextmenu\",L,!1),e.addEventListener(\"wheel\",ee,!1),e.addEventListener(\"mousedown\",Y,!1),window.addEventListener(\"mousemove\",X,!1),window.addEventListener(\"mouseup\",K,!1),e.addEventListener(\"mouseenter\",te,!1),e.addEventListener(\"mouseleave\",re,!1),e.addEventListener(\"touchstart\",q,!1),e.addEventListener(\"touchmove\",Q,!1),e.addEventListener(\"touchend\",W,!1),window.addEventListener(\"blur\",F),window.addEventListener(\"keyup\",z,!1),window.addEventListener(\"keydown\",U,!1),window.addEventListener(\"resize\",ne,!1),Object(n.__assign)(Object(n.__assign)({get noScroll(){return i;},set noScroll(e){i=e;},get noContextMenu(){return c;},set noContextMenu(e){c=e;}},j),{dispose:function dispose(){if(x)return;x=!0,e.removeEventListener(\"contextmenu\",L,!1),e.removeEventListener(\"wheel\",ee,!1),e.removeEventListener(\"mousedown\",Y,!1),window.removeEventListener(\"mousemove\",X,!1),window.removeEventListener(\"mouseup\",K,!1),e.removeEventListener(\"mouseenter\",te,!1),e.removeEventListener(\"mouseleave\",re,!1),e.removeEventListener(\"touchstart\",q,!1),e.removeEventListener(\"touchmove\",Q,!1),e.removeEventListener(\"touchend\",W,!1),window.removeEventListener(\"blur\",F),window.removeEventListener(\"keyup\",z,!1),window.removeEventListener(\"keydown\",U,!1),window.removeEventListener(\"resize\",ne,!1);}});function L(e){c&&e.preventDefault();}function N(e){_.alt=e.altKey,_.shift=e.shiftKey,_.control=e.ctrlKey,_.meta=e.metaKey;}function F(){(C||_.shift||_.alt||_.meta||_.control)&&(C=0,_.shift=_.alt=_.control=_.meta=!1);}function U(e){var t=!1;!_.alt&&e.altKey&&(t=!0,_.alt=!0),!_.shift&&e.shiftKey&&(t=!0,_.shift=!0),!_.control&&e.ctrlKey&&(t=!0,_.control=!0),!_.meta&&e.metaKey&&(t=!0,_.meta=!0),t&&P&&R.next(S());}function z(e){var t=!1;_.alt&&!e.altKey&&(t=!0,_.alt=!1),_.shift&&!e.shiftKey&&(t=!0,_.shift=!1),_.control&&!e.ctrlKey&&(t=!0,_.control=!1),_.meta&&!e.metaKey&&(t=!0,_.meta=!1),t&&P&&R.next(S());}function H(e){var t=e.touches[0],r=e.touches[1];return{clientX:(t.clientX+r.clientX)/2,clientY:(t.clientY+r.clientY)/2,pageX:(t.pageX+r.pageX)/2,pageY:(t.pageY+r.pageY)/2};}function G(e){var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY;return Math.sqrt(t*t+r*r);}function q(e){if(1===e.touches.length)C=w=1,J(e.touches[0]);else if(2===e.touches.length){C=0,w=2,J(H(e));var t=G(e);f=t,D.next({distance:t,fraction:1,delta:0,isStart:!0,buttons:C,button:w,modifiers:S()});}else 3===e.touches.length&&(C=w=8,J(H(e)));}function W(e){Z();}function Q(e){if(w=0,l&&(e.preventDefault(),e.stopPropagation(),e.originalEvent&&(e.originalEvent.preventDefault(),e.originalEvent.stopPropagation())),1===e.touches.length)C=1,$(e.touches[0]);else if(2===e.touches.length){var t=G(e),r=f-t;Math.abs(r)<4?(C=2,$(H(e))):(C=4,N(e),D.next({delta:r,fraction:f/t,distance:t,isStart:!1,buttons:C,button:w,modifiers:S()})),f=t;}else 3===e.touches.length&&(C=8,$(H(e)));}function Y(e){N(e),C=s(e),w=u(e),o&&4===C&&e.preventDefault,J(e);}function X(e){N(e),C=s(e),w=0,$(e);}function K(e){N(e),C=s(e),w=u(e),function(e){if(O=0,ae(v,e),a.Vec2.distance(v,h)<4){var t=e.pageX,r=e.pageY,n=v[0],i=v[1];I.next({x:n,y:i,pageX:t,pageY:r,buttons:C,button:w,modifiers:S()});}}(e),Z();}function Z(){A.next();}function J(e){ae(g,e),a.Vec2.copy(h,g),ie(g)&&(O=1);}function $(t){ae(v,t);var r,n=t.pageX,i=t.pageY,o=v[0],s=v[1],u=ie(v);if((M.next({x:o,y:s,pageX:n,pageY:i,buttons:C,button:w,modifiers:S(),inside:u}),0!==O)&&(a.Vec2.div(b,a.Vec2.sub(b,v,g),((r=y)[0]=e.clientWidth,r[1]=e.clientHeight,r)),!(a.Vec2.magnitude(b)<a.EPSILON))){var c=1===O,l=b[0],d=b[1];E.next({x:o,y:s,dx:l,dy:d,pageX:n,pageY:i,buttons:C,button:w,modifiers:S(),isStart:c}),a.Vec2.copy(g,v),O=2;}}function ee(e){i&&e.preventDefault();var t=1;switch(e.deltaMode){case 0:t=1;break;case 1:t=40;break;case 2:t=800;}var r=(e.deltaX||0)*t,n=(e.deltaY||0)*t,a=(e.deltaZ||0)*t;C=w=4,(r||n||a)&&T.next({dx:r,dy:n,dz:a,buttons:C,button:w,modifiers:S()});}function te(e){P=!0,B.next();}function re(e){P=!1,k.next();}function ne(e){V.next();}function ie(t){if(e instanceof Window||e instanceof Document||e===document.body)return!0;var r=e.getBoundingClientRect();return t[0]>=0&&t[1]>=0&&t[0]<r.width&&t[1]<r.height;}function ae(t,r){var n=r.clientX||0,i=r.clientY||0,a=e.getBoundingClientRect();return t[0]=n-a.left,t[1]=i-a.top,t;}};}(f||(f={})),t.c=f;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"d\",function(){return o;}),r.d(t,\"e\",function(){return s;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"c\",function(){return c;});var n=Object.prototype.hasOwnProperty;function i(e,t){for(var r=0,i=Object.keys(t);r<i.length;r++){var a=i[r];n.call(t,a)&&void 0===e[a]&&(e[a]=t[a]);}return e;}function a(e,t){for(var r=!1,i=0,a=Object.keys(t);i<a.length;i++){var o=a[i];if(n.call(t,o)&&t[o]!==e[o]){r=!0;break;}}return r?Object.assign({},e,t):e;}function o(e,t){if(!e)return!t;if(!t)return!1;var r=Object.keys(e);if(Object.keys(t).length!==r.length)return!1;for(var i=0,a=r;i<a.length;i++){var o=a[i];if(!n.call(e,o)||e[o]!==t[o])return!1;}return!0;}function s(e,t){for(var r=e,n=0;n<t.length;n++)if(t[n]&&(r=a(e,t[n]))!==e){for(var i=n+1;i<t.length;i++)r=Object.assign(r,t[i]);break;}return r;}function u(e){if(null===e||\"object\"!=typeof_default()(e))return e;if(e instanceof Array){for(var t=[],r=0,i=e.length;r<i;r++)t[r]=u(e[r]);return t;}if(\"object\"==typeof_default()(e)&&!(\"prototype\"in e)){t={};for(var a in e)n.call(e,a)&&(t[a]=u(e[a]));return t;}throw new Error(\"Can't clone, type \\\"\"+typeof_default()(e)+'\" unsupported');}function c(e,t){if(e)for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];t(e[i],i);}}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(143);n.b;function i(e,t,r,i,a){void 0===i&&(i=!1),void 0===a&&(a=function a(){return!1;});var o={location:n.b,index:0,groupIndex:0,instanceIndex:0,isSecondary:!1},s=o.groupIndex<e,u=!1,c=0,l=0;return{get hasNext(){return s;},get isNextNewInstance(){return u;},groupCount:e,instanceCount:t,count:e*t,isComplex:i,move:function move(){return s&&(o.groupIndex=c,o.instanceIndex=l,o.index=l*e+c,o.location=r(c,l),o.isSecondary=a(c,l),++c===e?(++l,u=!0,l<t&&(c=0)):u=!1,s=c<e),o;},reset:function reset(){o.location=n.b,o.index=0,o.groupIndex=0,o.instanceIndex=0,o.isSecondary=!1,s=o.groupIndex<e,u=!1,c=0,l=0;},skipInstance:function skipInstance(){s&&o.instanceIndex===l&&(++l,c=0,s=l<t);}};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(1);!function(e){function t(e,t,r){return{kind:\"element-location\",structure:e,unit:t,element:r||0};}e.create=t,e.clone=function(e){return t(e.structure,e.unit,e.element);},e.set=function(e,t,r,n){return t&&(e.structure=t),r&&(e.unit=r),void 0!==n&&(e.element=n),e;},e.copy=function(e,t){return e.unit=t.unit,e.element=t.element,e;},e.is=function(e){return!!e&&\"element-location\"===e.kind;},e.areEqual=function(e,t){return e.unit===t.unit&&e.element===t.element;};var r=i.Vec3.zero(),n=i.Vec3.zero();e.distance=function(e,t){return e.unit.conformation.position(e.element,r),t.unit.conformation.position(t.element,n),i.Vec3.distance(r,n);},e.residueIndex=function(e){return e.unit.model.atomicHierarchy.residueAtomSegments.index[e.element];},e.chainIndex=function(e){return e.unit.model.atomicHierarchy.chainAtomSegments.index[e.element];};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ColorLists\",function(){return a;}),r.d(t,\"ColorListNames\",function(){return o;}),r.d(t,\"ColorListOptions\",function(){return s;}),r.d(t,\"ColorListOptionsScale\",function(){return u;}),r.d(t,\"ColorListOptionsSet\",function(){return c;}),r.d(t,\"getColorListFromName\",function(){return l;});var n=r(43),i=r(41),a={\"orange-red\":Object(n.ColorList)(\"Orange-Red\",\"sequential\",\"Orange-Red, sequential color scheme from ColorBrewer 2.0\",[16775148,16705736,16635038,16628612,16551257,15689032,14102559,11730944,8323072]),\"purple-blue\":Object(n.ColorList)(\"Purple-Blue\",\"sequential\",\"Purple-Blue, sequential color scheme from ColorBrewer 2.0\",[16775163,15525874,13685222,10927579,7645647,3576e3,356528,285325,145496]),\"blue-purple\":Object(n.ColorList)(\"Blue-Purple\",\"sequential\",\"Blue-Purple, sequential color scheme from ColorBrewer 2.0\",[16252157,14740724,12571622,10403034,9213638,9202609,8929693,8458108,5046347]),oranges:Object(n.ColorList)(\"Oranges\",\"sequential\",\"\",[16774635,16705230,16634018,16625259,16616764,15821075,14239745,10892803,8333060]),\"blue-green\":Object(n.ColorList)(\"Blue-Green\",\"sequential\",\"\",[16252157,15070713,13429990,10082505,6734500,4304502,2329413,27948,17435]),\"yellow-orange-brown\":Object(n.ColorList)(\"Yellow-Orange-Brown\",\"sequential\",\"\",[16777189,16775100,16704401,16696399,16685353,15495188,13388802,10040324,6694150]),\"yellow-green\":Object(n.ColorList)(\"Yellow-Green\",\"sequential\",\"\",[16777189,16252089,14282915,11394446,7915129,4303709,2327619,26679,17705]),reds:Object(n.ColorList)(\"Reds\",\"sequential\",\"\",[16774640,16703698,16563105,16552562,16476746,15678252,13309981,10817301,6750221]),\"red-purple\":Object(n.ColorList)(\"Red-Purple\",\"sequential\",\"\",[16775155,16638173,16565696,16424885,16214177,14496919,11403646,7995767,4784234]),greens:Object(n.ColorList)(\"Greens\",\"sequential\",\"\",[16252149,15070688,13101504,10607003,7652470,4303709,2329413,27948,17435]),\"yellow-green-blue\":Object(n.ColorList)(\"Yellow-Green-Blue\",\"sequential\",\"\",[16777177,15595697,13101492,8375739,4306628,1937856,2252456,2438292,531800]),purples:Object(n.ColorList)(\"Purples\",\"sequential\",\"\",[16579581,15724021,14342891,12369372,10394312,8420794,6967715,5515151,4128893]),\"green-blue\":Object(n.ColorList)(\"Green-Blue\",\"sequential\",\"\",[16252144,14742491,13429701,11066805,8113348,5157843,2854078,551084,540801]),greys:Object(n.ColorList)(\"Greys\",\"sequential\",\"\",[16777215,15790320,14277081,12434877,9868950,7566195,5395026,2434341,0]),\"yellow-orange-red\":Object(n.ColorList)(\"Yellow-Orange-Red\",\"sequential\",\"\",[16777164,16772512,16701814,16691788,16616764,16535082,14883356,12386342,8388646]),\"purple-red\":Object(n.ColorList)(\"Purple-Red\",\"sequential\",\"\",[16250105,15196655,13941210,13210823,14640560,15149450,13505110,9961539,6750239]),blues:Object(n.ColorList)(\"Blues\",\"sequential\",\"\",[16251903,14609399,13032431,10406625,7057110,4362950,2191797,545180,536683]),\"purple-blue-green\":Object(n.ColorList)(\"Purple-Blue-Green\",\"sequential\",\"\",[16775163,15524592,13685222,10927579,6793679,3576e3,164234,93273,83510]),spectral:Object(n.ColorList)(\"Spectral\",\"diverging\",\"\",[10355010,13975119,16018755,16625249,16703627,16777151,15136152,11263396,6734501,3311805,6180770]),\"red-yellow-green\":Object(n.ColorList)(\"Red-Yellow-Green\",\"diverging\",\"\",[10813478,14102567,16018755,16625249,16703627,16777151,14282635,10934634,6733155,1742928,26679]),\"red-blue\":Object(n.ColorList)(\"Red-Blue\",\"diverging\",\"\",[6750239,11671595,14049357,16033154,16636871,16250871,13755888,9618910,4428739,2188972,340065]),\"pink-yellow-green\":Object(n.ColorList)(\"Pink-Yellow-Green\",\"diverging\",\"\",[9306450,12917629,14579630,15840986,16638191,16250871,15136208,12116358,8371265,5083681,2581529]),\"purple-green\":Object(n.ColorList)(\"Purple-Green\",\"diverging\",\"\",[4194379,7744131,10055851,12756431,15193320,16250871,14282963,10935200,5942881,1800247,17435]),\"red-yellow-blue\":Object(n.ColorList)(\"Red-Yellow-Blue\",\"diverging\",\"Red-Yellow-Blue, diverging color scheme from ColorBrewer 2.0\",[10813478,14102567,16018755,16625249,16703632,16777151,14742520,11262441,7646673,4552116,3225237]),\"brown-white-green\":Object(n.ColorList)(\"Brown-White-Green\",\"diverging\",\"\",[5517317,9195786,12550445,14664317,16181443,16119285,13101797,8441281,3512207,91742,15408]),\"red-grey\":Object(n.ColorList)(\"Red-Grey\",\"diverging\",\"\",[6750239,11671595,14049357,16033154,16636871,16777215,14737632,12237498,8882055,5066061,1710618]),\"orange-purple\":Object(n.ColorList)(\"Orange-Purple\",\"diverging\",\"\",[8338184,11753478,14713364,16627811,16703670,16250871,14211819,11709394,8418220,5515144,2949195]),\"set-2\":Object(n.ColorList)(\"Set-2\",\"qualitative\",\"\",[6734501,16551266,9281739,15174339,10934356,16767279,15058068,11776947]),accent:Object(n.ColorList)(\"Accent\",\"qualitative\",\"\",[8374655,12496596,16629894,16777113,3697840,15729279,12540695,6710886]),\"set-1\":Object(n.ColorList)(\"Set-1\",\"qualitative\",\"\",[14948892,3636920,5091146,9981603,16744192,16777011,10901032,16220607,10066329]),\"set-3\":Object(n.ColorList)(\"Set-3\",\"qualitative\",\"\",[9294791,16777139,12499674,16482418,8434131,16626786,11787881,16567781,14277081,12353725,13429701,16772463]),\"dark-2\":Object(n.ColorList)(\"Dark-2\",\"qualitative\",\"\",[1810039,14245634,7696563,15149450,6727198,15117058,10909213,6710886]),paired:Object(n.ColorList)(\"Paired\",\"qualitative\",\"\",[10931939,2062516,11722634,3383340,16489113,14883356,16629615,16744192,13284054,6962586,16777113,11622696]),\"pastel-2\":Object(n.ColorList)(\"Pastel-2\",\"qualitative\",\"\",[11789005,16633260,13358568,16042724,15136201,16773806,15852236,13421772]),\"pastel-1\":Object(n.ColorList)(\"Pastel-1\",\"qualitative\",\"\",[16495790,11783651,13429701,14601188,16701862,16777164,15063229,16636652,15921906]),\"many-distinct\":Object(n.ColorList)(\"Many-Distinct\",\"qualitative\",\"\",[1810039,14245634,7696563,15149450,6727198,15117058,10909213,6710886,14948892,3636920,5091146,9981603,16744192,16777011,10901032,16220607,10066329,6734501,16551266,9281739,15174339,10934356,16767279,15058068,11776947]),magma:Object(n.ColorList)(\"Magma\",\"sequential\",\"Perceptually uniform shades of black-red-white\",[4329332,4853881,5378684,5903742,6363263,6888576,7413633,7938689,8463745,8988801,9513600,10038655,10563454,11088508,11613562,12138360,12728949,13254258,13714030,14239338,14699366,15094114,15489119,15753309,16017499,16216411,16350045,16483424,16551523,16619368,16621934,16689780,16692091,16694402,16696969,16633746,16636058,16638371,16575148,16577461,16514239]),inferno:Object(n.ColorList)(\"Inferno\",\"sequential\",\"Perceptually uniform shades of black-red-yellow\",[4721514,5246316,5771373,6296430,6821486,7346542,7871597,8396651,8921450,9446504,9971557,10496610,10956127,11481435,12006486,12466258,12926285,13386056,13780802,14241085,14570295,14965297,15229227,15558693,15757342,15956248,16154897,16288267,16421638,16489734,16492043,16494612,16496926,16368426,16305463,16111429,15982678,15853928,15856253,16119953,16580260]),plasma:Object(n.ColorList)(\"Plasma\",\"sequential\",\"Perceptually uniform shades of blue-red-yellow\",[1771148,2426257,3081365,3671193,4195228,4784799,5308834,5833124,6357158,6815911,7340200,7864744,8324007,8783782,9309348,9769377,10164126,10624154,11018902,11413393,11808141,12137352,12466307,12795519,13124730,13453685,13717361,14046573,14309992,14573668,14837344,15035483,15299159,15497299,15695438,15893834,16091974,16224833,16357693,16425017,16557877,16625457,16627245,16629289,16631334,16567845,16438820,16310052,16115494,15921190,15726625]),viridis:Object(n.ColorList)(\"Viridis\",\"sequential\",\"Perceptually uniform shades of blue-green-yellow\",[4524123,4656994,4658793,4726127,4727668,4663929,4599933,4535937,4406404,4276870,4081800,3952010,3822475,3627148,3497356,3302029,3172237,3042446,2912654,2782862,2652814,2523022,2393229,2328973,2198924,2069132,2004874,2005897,2007175,2139525,2337154,2666111,3060348,3520376,4045684,4570991,5227369,5883748,6605661,7392854,8180303,8967495,9819967,10672695,11525166,12443174,13295646,14148121,15000344,15852828,16639780]),cividis:Object(n.ColorList)(\"Cividis\",\"sequential\",\"Perceptually uniform shades of blue-green-yellow, should look effectively identical to colorblind and non-colorblind users\",[11367,12400,537456,1455727,2046574,2571629,3031404,3425388,3754092,4148075,4476779,4805227,5133932,5396844,5725549,5988462,6317166,6580079,6843249,7171698,7434867,7697781,7960951,8289656,8618104,8881272,9209976,9538679,9867127,10195830,10524533,10853235,11181938,11510640,11839343,12168045,12497002,12891240,13219941,13548642,13943134,14271834,14666326,14995025,15389516,15718470,16112703,16507190,16639799]),twilight:Object(n.ColorList)(\"Twilight\",\"sequential\",\"Perceptually uniform shades of white-blue-black-red-white, cyclic\",[14670305,14211037,13554648,12766675,11847630,10993866,10139847,9351365,8628419,8036290,7509952,7048895,6718653,6519739,6386105,6252470,6184114,6181293,6112935,6044831,5976470,5777291,5447293,5052270,4592479,4067665,3674181,3281211,3150646,3543352,4067644,4657728,5379141,6166345,6953549,7741007,8463184,9120336,9777743,10304079,10830671,11291984,11687762,12083541,12348505,12613471,12878439,13077872,13211771,13411209,13545111,13809830,14074293,14338756,14537169,14735067,14801121]),turbo:Object(n.ColorList)(\"Turbo\",\"sequential\",\"Improved (smooth) rainbow colormap for visualization\",[4866485,4872413,4354034,3770361,3120629,2667241,2475736,2611140,3073454,3928216,5109892,6487408,8126047,9829201,11531332,13167162,14605618,15780908,16693543,16753699,16748063,16741916,16146200,15026195,13644558,12198408,10818563,9833728]),rainbow:Object(n.ColorList)(\"Rainbow\",\"sequential\",\"\",[3367393,3516485,16383744,15501073,12526114]),\"red-white-blue\":Object(n.ColorList)(\"Red-White-Blue\",\"diverging\",\"\",[12526114,16777215,3367393])},o=Object.keys(a),s=o.map(function(e){return[e,a[e].label,Object(i.b)(a[e].type)];}),u=s.filter(function(e){return\"diverging\"===a[e[0]].type||\"sequential\"===a[e[0]].type;}),c=s.filter(function(e){return\"qualitative\"===a[e[0]].type;});function l(e){return e in a?a[e]:(console.warn(\"unknown color list named '\"+e+\"'\"),a[\"red-yellow-blue\"]);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return l;});var n,i=r(0),a=r(196),o=r(150),s=r(2),u=r(85);function c(e){return e.map(function(e){return[e.name,e.provider.label,e.provider.category];});}!function(e){function t(){return{color:a.a.Empty,size:o.a.Empty};}e.create=function(e,r,n,i){i=i||t();var a=n.colorTheme,o=n.sizeTheme;return i.color=e.colorThemeRegistry.create(a.name,r,a.params),i.size=e.sizeThemeRegistry.create(o.name,r,o.params),i;},e.createEmpty=t,e.ensureDependencies=function(e,t,r,n){var a,o;return Object(i.__awaiter)(this,void 0,void 0,function(){return Object(i.__generator)(this,function(i){switch(i.label){case 0:return[4,null===(a=t.colorThemeRegistry.get(n.colorTheme.name).ensureCustomProperties)||void 0===a?void 0:a.attach(e,r)];case 1:return i.sent(),[4,null===(o=t.sizeThemeRegistry.get(n.sizeTheme.name).ensureCustomProperties)||void 0===o?void 0:o.attach(e,r)];case 2:return i.sent(),[2];}});});},e.releaseDependencies=function(e,t,r){var n,i;null===(n=e.colorThemeRegistry.get(r.colorTheme.name).ensureCustomProperties)||void 0===n||n.detach(t),null===(i=e.sizeThemeRegistry.get(r.sizeTheme.name).ensureCustomProperties)||void 0===i||i.detach(t);};}(n||(n={}));var l=function(){function e(e,t){var r=this;this.emptyProvider=t,this._list=[],this._map=new Map(),this._name=new Map(),Object(u.c)(e,function(e,t){if(e.name!==t)throw new Error(\"Fix build in themes to have matching names. \"+e.name+\" \"+t);r.add(e);});}return Object.defineProperty(e.prototype,\"default\",{get:function get(){return this._list[0];},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"list\",{get:function get(){return this._list;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"types\",{get:function get(){return c(this._list);},enumerable:!1,configurable:!0}),e.prototype.sort=function(){this._list.sort(function(e,t){return e.provider.category===t.provider.category?e.provider.label<t.provider.label?-1:e.provider.label>t.provider.label?1:0:e.provider.category<t.provider.category?-1:1;});},e.prototype.add=function(e){if(this._map.has(e.name))throw new Error(e.name+\" already registered.\");var t=e.name;this._list.push({name:t,provider:e}),this._map.set(t,e),this._name.set(e,t),this.sort();},e.prototype.remove=function(e){this._list.splice(this._list.findIndex(function(t){return t.name===e.name;}),1);var t=this._map.get(e.name);t&&(this._map.delete(e.name),this._name.delete(t));},e.prototype.has=function(e){return this._map.has(e.name);},e.prototype.get=function(e){return this._map.get(e)||this.emptyProvider;},e.prototype.getName=function(e){if(!this._name.has(e))throw new Error(\"'\"+e.label+\"' is not a registered theme provider.\");return this._name.get(e);},e.prototype.create=function(e,t,r){void 0===r&&(r={});var n=this.get(e);return n.factory(t,Object(i.__assign)(Object(i.__assign)({},s.ParamDefinition.getDefaultValues(n.getParams(t))),r));},e.prototype.getApplicableList=function(e){return this._list.filter(function(t){return t.provider.isApplicable(e);});},e.prototype.getApplicableTypes=function(e){return c(this.getApplicableList(e));},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(338);!function(e){e.toArray=function(e){return Object(i.d)(e.values());},e.isSuperset=function(e,t){var r=!0;return t.forEach(function(t){e.has(t)||(r=!1);}),r;},e.add=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)t[n].forEach(function(t){return e.add(t);});return e;},e.union=function(e,t){var r=new Set(e);return t.forEach(function(e){return r.add(e);}),r;},e.unionMany=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return new Set();1===e.length&&new Set(e[0]);for(var r=new Set(e[0]),n=1,i=e.length;n<i;n++)e[n].forEach(function(e){return r.add(e);});return r;},e.unionManyArrays=function(e){if(0===e.length)return new Set();for(var t=new Set(e[0]),r=1;r<e.length;r++)for(var n=0,i=e[r];n<i.length;n++){var a=i[n];t.add(a);}return t;},e.intersection=function(e,t){var r=new Set();return t.forEach(function(t){e.has(t)&&r.add(t);}),r;},e.areIntersecting=function(e,t){var r=!1;return t.forEach(function(t){e.has(t)&&(r=!0);}),r;},e.intersectionSize=function(e,t){var r=0;return t.forEach(function(t){e.has(t)&&(r+=1);}),r;},e.difference=function(e,t){var r=new Set(e);return t.forEach(function(e){return r.delete(e);}),r;},e.differenceSize=function(e,t){var r=e.size;return e.forEach(function(e){t.has(e)&&(r-=1);}),r;},e.areEqual=function(e,t){if(e.size!==t.size)return!1;var r=!0;return t.forEach(function(t){e.has(t)||(r=!1);}),r;};}(n||(n={}));},function(e,t,r){\"use strict\";function n(e){return\"undefined\"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext;}function i(e){if(n(e))return{drawArraysInstanced:e.drawArraysInstanced.bind(e),drawElementsInstanced:e.drawElementsInstanced.bind(e),vertexAttribDivisor:e.vertexAttribDivisor.bind(e),VERTEX_ATTRIB_ARRAY_DIVISOR:e.VERTEX_ATTRIB_ARRAY_DIVISOR};var t=e.getExtension(\"ANGLE_instanced_arrays\");return null===t?null:{drawArraysInstanced:t.drawArraysInstancedANGLE.bind(t),drawElementsInstanced:t.drawElementsInstancedANGLE.bind(t),vertexAttribDivisor:t.vertexAttribDivisorANGLE.bind(t),VERTEX_ATTRIB_ARRAY_DIVISOR:t.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE};}function a(e){if(n(e))return{FRAGMENT_SHADER_DERIVATIVE_HINT:e.FRAGMENT_SHADER_DERIVATIVE_HINT};var t=e.getExtension(\"OES_standard_derivatives\");return null===t?null:{FRAGMENT_SHADER_DERIVATIVE_HINT:t.FRAGMENT_SHADER_DERIVATIVE_HINT_OES};}function o(e){return n(e)?{}:e.getExtension(\"OES_element_index_uint\");}function s(e){if(n(e))return{VERTEX_ARRAY_BINDING:e.VERTEX_ARRAY_BINDING,bindVertexArray:e.bindVertexArray.bind(e),createVertexArray:e.createVertexArray.bind(e),deleteVertexArray:e.deleteVertexArray.bind(e),isVertexArray:e.isVertexArray.bind(e)};var t=e.getExtension(\"OES_vertex_array_object\");return null===t?null:{VERTEX_ARRAY_BINDING:t.VERTEX_ARRAY_BINDING_OES,bindVertexArray:t.bindVertexArrayOES.bind(t),createVertexArray:t.createVertexArrayOES.bind(t),deleteVertexArray:t.deleteVertexArrayOES.bind(t),isVertexArray:t.isVertexArrayOES.bind(t)};}function u(e){return n(e)?{}:e.getExtension(\"OES_texture_float\");}function c(e){return e.getExtension(\"OES_texture_float_linear\");}function l(e){if(n(e))return{MIN:e.MIN,MAX:e.MAX};var t=e.getExtension(\"EXT_blend_minmax\");return null===t?null:{MIN:t.MIN_EXT,MAX:t.MAX_EXT};}function d(e){return n(e)?{}:e.getExtension(\"EXT_frag_depth\");}function f(e){if(n(e))return null===e.getExtension(\"EXT_color_buffer_float\")?null:{RGBA32F:e.RGBA32F};var t=e.getExtension(\"WEBGL_color_buffer_float\");return null===t?null:{RGBA32F:t.RGBA32F_EXT};}function p(e){if(n(e))return{drawBuffers:e.drawBuffers.bind(e),COLOR_ATTACHMENT0:e.COLOR_ATTACHMENT0,COLOR_ATTACHMENT1:e.COLOR_ATTACHMENT1,COLOR_ATTACHMENT2:e.COLOR_ATTACHMENT2,COLOR_ATTACHMENT3:e.COLOR_ATTACHMENT3,COLOR_ATTACHMENT4:e.COLOR_ATTACHMENT4,COLOR_ATTACHMENT5:e.COLOR_ATTACHMENT5,COLOR_ATTACHMENT6:e.COLOR_ATTACHMENT6,COLOR_ATTACHMENT7:e.COLOR_ATTACHMENT7,DRAW_BUFFER0:e.DRAW_BUFFER0,DRAW_BUFFER1:e.DRAW_BUFFER1,DRAW_BUFFER2:e.DRAW_BUFFER2,DRAW_BUFFER3:e.DRAW_BUFFER3,DRAW_BUFFER4:e.DRAW_BUFFER4,DRAW_BUFFER5:e.DRAW_BUFFER5,DRAW_BUFFER6:e.DRAW_BUFFER6,DRAW_BUFFER7:e.DRAW_BUFFER7,MAX_COLOR_ATTACHMENTS:e.MAX_COLOR_ATTACHMENTS,MAX_DRAW_BUFFERS:e.MAX_DRAW_BUFFERS};var t=e.getExtension(\"WEBGL_draw_buffers\");return null===t?null:{drawBuffers:t.drawBuffersWEBGL.bind(t),COLOR_ATTACHMENT0:t.COLOR_ATTACHMENT0_WEBGL,COLOR_ATTACHMENT1:t.COLOR_ATTACHMENT1_WEBGL,COLOR_ATTACHMENT2:t.COLOR_ATTACHMENT2_WEBGL,COLOR_ATTACHMENT3:t.COLOR_ATTACHMENT3_WEBGL,COLOR_ATTACHMENT4:t.COLOR_ATTACHMENT4_WEBGL,COLOR_ATTACHMENT5:t.COLOR_ATTACHMENT5_WEBGL,COLOR_ATTACHMENT6:t.COLOR_ATTACHMENT6_WEBGL,COLOR_ATTACHMENT7:t.COLOR_ATTACHMENT7_WEBGL,DRAW_BUFFER0:t.DRAW_BUFFER0_WEBGL,DRAW_BUFFER1:t.DRAW_BUFFER1_WEBGL,DRAW_BUFFER2:t.DRAW_BUFFER2_WEBGL,DRAW_BUFFER3:t.DRAW_BUFFER3_WEBGL,DRAW_BUFFER4:t.DRAW_BUFFER4_WEBGL,DRAW_BUFFER5:t.DRAW_BUFFER5_WEBGL,DRAW_BUFFER6:t.DRAW_BUFFER6_WEBGL,DRAW_BUFFER7:t.DRAW_BUFFER7_WEBGL,MAX_COLOR_ATTACHMENTS:t.MAX_COLOR_ATTACHMENTS_WEBGL,MAX_DRAW_BUFFERS:t.MAX_DRAW_BUFFERS_WEBGL};}function m(e){return n(e)?{}:e.getExtension(\"EXT_shader_texture_lod\");}function h(e){if(n(e))return{UNSIGNED_INT_24_8:e.UNSIGNED_INT_24_8};var t=e.getExtension(\"WEBGL_depth_texture\");return null===t?null:{UNSIGNED_INT_24_8:t.UNSIGNED_INT_24_8_WEBGL};}r.d(t,\"m\",function(){return n;}),r.d(t,\"g\",function(){return i;}),r.d(t,\"i\",function(){return a;}),r.d(t,\"e\",function(){return o;}),r.d(t,\"l\",function(){return s;}),r.d(t,\"j\",function(){return u;}),r.d(t,\"k\",function(){return c;}),r.d(t,\"a\",function(){return l;}),r.d(t,\"f\",function(){return d;}),r.d(t,\"b\",function(){return f;}),r.d(t,\"d\",function(){return p;}),r.d(t,\"h\",function(){return m;}),r.d(t,\"c\",function(){return h;});},function(e,t,r){\"use strict\";r.d(t,\"f\",function(){return p;}),r.d(t,\"e\",function(){return m;}),r.d(t,\"g\",function(){return h;}),r.d(t,\"h\",function(){return g;}),r.d(t,\"c\",function(){return v;}),r.d(t,\"d\",function(){return b;}),r.d(t,\"a\",function(){return y;}),r.d(t,\"b\",function(){return _;}),r.d(t,\"i\",function(){return S;});var n=r(96),i=r(91),a=\"\\nvec4 texture3dFrom2dNearest(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\\n    float zSlice = floor(pos.z * gridDim.z + 0.5); // round to nearest z-slice\\n    float column = intMod(zSlice * gridDim.x, texDim.x) / gridDim.x;\\n    float row = floor(intDiv(zSlice * gridDim.x, texDim.x));\\n    vec2 coord = (vec2(column * gridDim.x, row * gridDim.y) + (pos.xy * gridDim.xy)) / texDim;\\n    return texture2D(tex, coord);\\n}\\n\",o=Object(n.a)(),s={apply_fog:\"\\nfloat depth = length(vViewPosition);\\nfloat fogFactor = smoothstep(uFogNear, uFogFar, depth);\\nfloat fogAlpha = (1.0 - fogFactor) * gl_FragColor.a;\\nif (uTransparentBackground == 0) {\\n    gl_FragColor.rgb = mix(gl_FragColor.rgb, uFogColor, fogFactor);\\n    if (gl_FragColor.a < 1.0)\\n        gl_FragColor.a = fogAlpha;\\n} else {\\n    float fogAlpha = (1.0 - fogFactor) * gl_FragColor.a;\\n    gl_FragColor.a = fogAlpha;\\n}\\n\",apply_interior_color:\"\\nif (interior) {\\n    if (uInteriorColorFlag == 1) {\\n        gl_FragColor.rgb = uInteriorColor;\\n    } else {\\n        gl_FragColor.rgb *= 1.0 - uInteriorDarkening;\\n    }\\n}\\n\",apply_light_color:\"\\n// inputs\\n// - vec4 material\\n// - vec3 vViewPosition\\n// - vec3 normal\\n// - float uMetalness\\n// - float uRoughness\\n// - float uReflectivity\\n// - float uLightIntensity\\n// - float uAmbientIntensity\\n\\n// outputs\\n// - sets gl_FragColor\\n\\nvec4 color = material;\\n\\nReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0));\\n\\nPhysicalMaterial physicalMaterial;\\nphysicalMaterial.diffuseColor = color.rgb * (1.0 - uMetalness);\\nphysicalMaterial.specularRoughness = clamp(uRoughness, 0.04, 1.0);\\nphysicalMaterial.specularColor = mix(vec3(0.16 * pow2(uReflectivity)), color.rgb, uMetalness);\\n\\nGeometricContext geometry;\\ngeometry.position = -vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize(vViewPosition);\\n\\nIncidentLight directLight;\\ndirectLight.direction = vec3(0.0, 0.0, -1.0);\\ndirectLight.color = vec3(uLightIntensity);\\n\\nRE_Direct_Physical(directLight, geometry, physicalMaterial, reflectedLight);\\n\\nvec3 irradiance = vec3(uAmbientIntensity) * PI;\\nRE_IndirectDiffuse_Physical(irradiance, geometry, physicalMaterial, reflectedLight);\\n\\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular;\\n\\ngl_FragColor = vec4(outgoingLight, color.a);\\n\",apply_marker_color:\"\\nfloat marker = floor(vMarker * 255.0 + 0.5); // rounding required to work on some cards on win\\nif (marker > 0.1) {\\n    if (intMod(marker, 2.0) > 0.1) {\\n        gl_FragColor.rgb = mix(uHighlightColor, gl_FragColor.rgb, 0.3);\\n    } else {\\n        gl_FragColor.rgb = mix(uSelectColor, gl_FragColor.rgb, 0.3);\\n    }\\n}\\n\",assign_clipping_varying:\"\\n#if dClipObjectCount != 0 && defined(dClipping)\\n    vClipping = readFromTexture(tClipping, aInstance * float(uGroupCount) + group, uClippingTexDim).a;\\n#endif\\n\",assign_color_varying:\"\\n#if defined(dRenderVariant_color)\\n    #if defined(dColorType_attribute)\\n        vColor.rgb = aColor;\\n    #elif defined(dColorType_instance)\\n        vColor.rgb = readFromTexture(tColor, aInstance, uColorTexDim).rgb;\\n    #elif defined(dColorType_group)\\n        vColor.rgb = readFromTexture(tColor, group, uColorTexDim).rgb;\\n    #elif defined(dColorType_groupInstance)\\n        vColor.rgb = readFromTexture(tColor, aInstance * float(uGroupCount) + group, uColorTexDim).rgb;\\n    #endif\\n\\n    #ifdef dOverpaint\\n        vOverpaint = readFromTexture(tOverpaint, aInstance * float(uGroupCount) + group, uOverpaintTexDim);\\n    #endif\\n\\n    #ifdef dTransparency\\n        vGroup = group;\\n        vTransparency = readFromTexture(tTransparency, aInstance * float(uGroupCount) + group, uTransparencyTexDim).a;\\n    #endif\\n#elif defined(dRenderVariant_pick)\\n    #if defined(dRenderVariant_pickObject)\\n        vColor = vec4(encodeFloatRGB(float(uObjectId)), 1.0);\\n    #elif defined(dRenderVariant_pickInstance)\\n        vColor = vec4(encodeFloatRGB(aInstance), 1.0);\\n    #elif defined(dRenderVariant_pickGroup)\\n        vColor = vec4(encodeFloatRGB(group), 1.0);\\n    #endif\\n#endif\\n\",assign_group:\"\\n#ifdef dGeoTexture\\n    // aGroup is used as a vertex index here and the group id is retirieved from tPositionGroup\\n    float group = readFromTexture(tPositionGroup, aGroup, uGeoTexDim).w;\\n#else\\n    float group = aGroup;\\n#endif\\n\",assign_marker_varying:\"\\nvMarker = readFromTexture(tMarker, aInstance * float(uGroupCount) + group, uMarkerTexDim).a;\\n\",assign_material_color:\"\\n#if defined(dRenderVariant_color)\\n    #if defined(dColorType_uniform)\\n        vec4 material = vec4(uColor, uAlpha);\\n    #elif defined(dColorType_varying)\\n        vec4 material = vec4(vColor.rgb, uAlpha);\\n    #endif\\n\\n    // mix material with overpaint\\n    #if defined(dOverpaint)\\n        material.rgb = mix(material.rgb, vOverpaint.rgb, vOverpaint.a);\\n    #endif\\n\\n    // apply screendoor transparency\\n    #if defined(dTransparency)\\n        float ta = 1.0 - vTransparency;\\n        float at = 0.0;\\n\\n        // shift by view-offset during multi-sample rendering to allow for blending\\n        vec2 coord = gl_FragCoord.xy + uViewOffset * 0.25;\\n\\n        #if defined(dTransparencyVariant_single)\\n            const mat4 thresholdMatrix = mat4(\\n                1.0 / 17.0,  9.0 / 17.0,  3.0 / 17.0, 11.0 / 17.0,\\n                13.0 / 17.0,  5.0 / 17.0, 15.0 / 17.0,  7.0 / 17.0,\\n                4.0 / 17.0, 12.0 / 17.0,  2.0 / 17.0, 10.0 / 17.0,\\n                16.0 / 17.0,  8.0 / 17.0, 14.0 / 17.0,  6.0 / 17.0\\n            );\\n            at = thresholdMatrix[int(intMod(coord.x, 4.0))][int(intMod(coord.y, 4.0))];\\n        #elif defined(dTransparencyVariant_multi)\\n            at = fract(dot(vec3(coord, vGroup + 0.5), vec3(2.0, 7.0, 23.0) / 17.0f));\\n        #endif\\n\\n        if (ta < 0.99 && (ta < 0.01 || ta < at)) discard;\\n    #endif\\n#elif defined(dRenderVariant_pick)\\n    vec4 material = vColor;\\n#elif defined(dRenderVariant_depth)\\n    #ifdef enabledFragDepth\\n        vec4 material = packDepthToRGBA(gl_FragDepthEXT);\\n    #else\\n        vec4 material = packDepthToRGBA(gl_FragCoord.z);\\n    #endif\\n#endif\\n\",assign_position:\"\\nmat4 model = uModel * aTransform;\\nmat4 modelView = uView * model;\\n#ifdef dGeoTexture\\n    vec3 position = readFromTexture(tPositionGroup, aGroup, uGeoTexDim).xyz;\\n#else\\n    vec3 position = aPosition;\\n#endif\\nvec4 position4 = vec4(position, 1.0);\\nvModelPosition = (model * position4).xyz; // for clipping in frag shader\\nvec4 mvPosition = modelView * position4;\\nvViewPosition = mvPosition.xyz;\\ngl_Position = uProjection * mvPosition;\\n\",assign_size:\"\\n#if defined(dSizeType_uniform)\\n    float size = uSize;\\n#elif defined(dSizeType_attribute)\\n    float size = aSize;\\n#elif defined(dSizeType_instance)\\n    float size = readFromTexture(tSize, aInstance, uSizeTexDim).a;\\n#elif defined(dSizeType_group)\\n    float size = readFromTexture(tSize, group, uSizeTexDim).a;\\n#elif defined(dSizeType_groupInstance)\\n    float size = readFromTexture(tSize, aInstance * float(uGroupCount) + group, uSizeTexDim).a;\\n#endif\\n\\n#if defined(dSizeType_instance) || defined(dSizeType_group) || defined(dSizeType_groupInstance)\\n    size = decodeFloatLog(size);\\n#endif\\n\\nsize *= uSizeFactor;\\n\",check_picking_alpha:\"\\nfloat depth = length(vViewPosition);\\nfloat fogFactor = smoothstep(uFogNear, uFogFar, depth);\\nfloat alpha = (1.0 - fogFactor) * uAlpha;\\nif (uAlpha < uPickingAlphaThreshold || alpha < 0.1)\\n    discard; // ignore so the element below can be picked\\n\",clip_instance:\"\\n#if defined(dClipVariant_instance) && dClipObjectCount != 0\\n    int flag = 0;\\n    #if defined(dClipping)\\n        flag = int(floor(vClipping * 255.0 + 0.5));\\n    #endif\\n\\n    vec4 mCenter = uModel * aTransform * vec4(uInvariantBoundingSphere.xyz, 1.0);\\n    if (clipTest(vec4(mCenter.xyz, uInvariantBoundingSphere.w), flag))\\n        // move out of [ -w, +w ] to 'discard' in vert shader\\n        gl_Position.z = 2.0 * gl_Position.w;\\n#endif\\n\",clip_pixel:\"\\n#if defined(dClipVariant_pixel) && dClipObjectCount != 0\\n    #if defined(dClipping)\\n        int clippingFlag = int(floor(vClipping * 255.0 + 0.5));\\n    #else\\n        int clippingFlag = 0;\\n    #endif\\n\\n    if (clipTest(vec4(vModelPosition, 0.0), clippingFlag))\\n        discard;\\n#endif\\n\",color_frag_params:\"\\n#if defined(dRenderVariant_color)\\n    #if defined(dColorType_uniform)\\n        uniform vec3 uColor;\\n    #elif defined(dColorType_varying)\\n        varying vec4 vColor;\\n    #endif\\n\\n    #ifdef dOverpaint\\n        varying vec4 vOverpaint;\\n    #endif\\n\\n    #ifdef dTransparency\\n        varying float vGroup;\\n        varying float vTransparency;\\n    #endif\\n#elif defined(dRenderVariant_pick)\\n    #if __VERSION__ != 300\\n        varying vec4 vColor;\\n    #else\\n        flat in vec4 vColor;\\n    #endif\\n#endif\\n\",color_vert_params:\"\\n#if defined(dRenderVariant_color)\\n    #if defined(dColorType_uniform)\\n        uniform vec3 uColor;\\n    #elif defined(dColorType_attribute)\\n        varying vec4 vColor;\\n        attribute vec3 aColor;\\n    #elif defined(dColorType_texture)\\n        varying vec4 vColor;\\n        uniform vec2 uColorTexDim;\\n        uniform sampler2D tColor;\\n    #endif\\n\\n    #ifdef dOverpaint\\n        varying vec4 vOverpaint;\\n        uniform vec2 uOverpaintTexDim;\\n        uniform sampler2D tOverpaint;\\n    #endif\\n\\n    #ifdef dTransparency\\n        varying float vGroup;\\n        varying float vTransparency;\\n        uniform vec2 uTransparencyTexDim;\\n        uniform sampler2D tTransparency;\\n    #endif\\n#elif defined(dRenderVariant_pick)\\n    #if __VERSION__ != 300\\n        varying vec4 vColor;\\n    #else\\n        flat out vec4 vColor;\\n    #endif\\n#endif\\n\",common_clip:\"\\n#if dClipObjectCount != 0\\n    vec3 quaternionTransform(vec4 q, vec3 v) {\\n        vec3 t = 2.0 * cross(q.xyz, v);\\n        return v + q.w * t + cross(q.xyz, t);\\n    }\\n\\n    vec4 computePlane(vec3 normal, vec3 inPoint) {\\n        return vec4(normalize(normal), -dot(normal, inPoint));\\n    }\\n\\n    float planeSD(vec4 plane, vec3 center) {\\n        return -dot(plane.xyz, center - plane.xyz * -plane.w);\\n    }\\n\\n    float sphereSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\\n        return (\\n            length(quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position) / size) - 1.0\\n        ) * min(min(size.x, size.y), size.z);\\n    }\\n\\n    float cubeSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\\n        vec3 d = abs(quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position)) - size;\\n        return min(max(d.x, max(d.y, d.z)), 0.0) + length(max(d, 0.0));\\n    }\\n\\n    float cylinderSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\\n        vec3 t = quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position);\\n\\n        vec2 d = abs(vec2(length(t.xz), t.y)) - size.xy;\\n        return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));\\n    }\\n\\n    float infiniteConeSD(vec3 position, vec4 rotation, vec3 size, vec3 center) {\\n        vec3 t = quaternionTransform(vec4(-rotation.x, -rotation.y, -rotation.z, rotation.w), center - position);\\n\\n        float q = length(t.xy);\\n        return dot(size.xy, vec2(q, t.z));\\n    }\\n\\n    float getSignedDistance(vec3 center, int type, vec3 position, vec4 rotation, vec3 scale) {\\n        if (type == 1) {\\n            vec3 normal = quaternionTransform(rotation, vec3(0.0, 1.0, 0.0));\\n            vec4 plane = computePlane(normal, position);\\n            return planeSD(plane, center);\\n        } else if (type == 2) {\\n            return sphereSD(position, rotation, scale * 0.5, center);\\n        } else if (type == 3) {\\n            return cubeSD(position, rotation, scale * 0.5, center);\\n        } else if (type == 4) {\\n            return cylinderSD(position, rotation, scale * 0.5, center);\\n        } else if (type == 5) {\\n            return infiniteConeSD(position, rotation, scale * 0.5, center);\\n        } else {\\n            return 0.1;\\n        }\\n    }\\n\\n    #if __VERSION__ != 300\\n        // 8-bit\\n        int bitwiseAnd(int a, int b) {\\n            int d = 128;\\n            int result = 0;\\n            for (int i = 0; i < 8; ++i) {\\n                if (d <= 0) break;\\n                if (a >= d && b >= d) result += d;\\n                if (a >= d) a -= d;\\n                if (b >= d) b -= d;\\n                d /= 2;\\n            }\\n            return result;\\n        }\\n\\n        bool hasBit(int mask, int bit) {\\n            return bitwiseAnd(mask, bit) == 0;\\n        }\\n    #else\\n        bool hasBit(int mask, int bit) {\\n            return (mask & bit) == 0;\\n        }\\n    #endif\\n\\n    // flag is a bit-flag for clip-objects to ignore (note, object ids start at 1 not 0)\\n    bool clipTest(vec4 sphere, int flag) {\\n        for (int i = 0; i < dClipObjectCount; ++i) {\\n            if (flag == 0 || hasBit(flag, i + 1)) {\\n                // TODO take sphere radius into account?\\n                if (getSignedDistance(sphere.xyz, uClipObjectType[i], uClipObjectPosition[i], uClipObjectRotation[i], uClipObjectScale[i]) <= 0.0)\\n                    return true;\\n            }\\n        }\\n        return false;\\n    }\\n#endif\\n\",common_frag_params:\"\\nuniform int uObjectId;\\nuniform int uInstanceCount;\\nuniform int uGroupCount;\\n\\n#if dClipObjectCount != 0\\n    uniform int uClipObjectType[dClipObjectCount];\\n    uniform vec3 uClipObjectPosition[dClipObjectCount];\\n    uniform vec4 uClipObjectRotation[dClipObjectCount];\\n    uniform vec3 uClipObjectScale[dClipObjectCount];\\n\\n    #if defined(dClipping)\\n        #if __VERSION__ != 300\\n            varying float vClipping;\\n        #else\\n            flat in float vClipping;\\n        #endif\\n    #endif\\n#endif\\n\\nuniform vec3 uHighlightColor;\\nuniform vec3 uSelectColor;\\n#if __VERSION__ != 300\\n    varying float vMarker;\\n#else\\n    flat in float vMarker;\\n#endif\\n\\nvarying vec3 vModelPosition;\\nvarying vec3 vViewPosition;\\n\\nuniform vec2 uViewOffset;\\n\\nuniform float uFogNear;\\nuniform float uFogFar;\\nuniform vec3 uFogColor;\\n\\nuniform float uAlpha;\\nuniform float uPickingAlphaThreshold;\\nuniform int uTransparentBackground;\\n\\nuniform float uInteriorDarkening;\\nuniform int uInteriorColorFlag;\\nuniform vec3 uInteriorColor;\\nbool interior;\\n\",common_vert_params:\"\\nuniform mat4 uProjection, uModel, uView;\\nuniform vec3 uCameraPosition;\\n\\nuniform int uObjectId;\\nuniform int uInstanceCount;\\nuniform int uGroupCount;\\nuniform vec4 uInvariantBoundingSphere;\\n\\n#if dClipObjectCount != 0\\n    uniform int uClipObjectType[dClipObjectCount];\\n    uniform vec3 uClipObjectPosition[dClipObjectCount];\\n    uniform vec4 uClipObjectRotation[dClipObjectCount];\\n    uniform vec3 uClipObjectScale[dClipObjectCount];\\n\\n    #if defined(dClipping)\\n        uniform vec2 uClippingTexDim;\\n        uniform sampler2D tClipping;\\n        #if __VERSION__ != 300\\n            varying float vClipping;\\n        #else\\n            flat out float vClipping;\\n        #endif\\n    #endif\\n#endif\\n\\nuniform vec2 uMarkerTexDim;\\nuniform sampler2D tMarker;\\n#if __VERSION__ != 300\\n    varying float vMarker;\\n#else\\n    flat out float vMarker;\\n#endif\\n\\nvarying vec3 vModelPosition;\\nvarying vec3 vViewPosition;\\n\",common:\"\\n// TODO find a better place for these convenience defines\\n\\n#if defined(dRenderVariant_pickObject) || defined(dRenderVariant_pickInstance) || defined(dRenderVariant_pickGroup)\\n    #define dRenderVariant_pick\\n#endif\\n\\n#if defined(dColorType_instance) || defined(dColorType_group) || defined(dColorType_groupInstance)\\n    #define dColorType_texture\\n#endif\\n\\n#if defined(dColorType_attribute) || defined(dColorType_texture)\\n    #define dColorType_varying\\n#endif\\n\\n//\\n\\n#define PI 3.14159265\\n#define RECIPROCAL_PI 0.31830988618\\n#define EPSILON 1e-6\\n\\n#define saturate(a) clamp(a, 0.0, 1.0)\\n\\nfloat intDiv(const in float a, const in float b) { return float(int(a) / int(b)); }\\nfloat intMod(const in float a, const in float b) { return a - b * float(int(a) / int(b)); }\\n\\nfloat pow2(const in float x) { return x*x; }\\n\\nconst float maxFloat = 10000.0; // NOTE constant also set in TypeScript\\nconst float floatLogFactor = 9.210440366976517; // log(maxFloat + 1.0);\\nfloat encodeFloatLog(const in float value) { return log(value + 1.0) / floatLogFactor; }\\nfloat decodeFloatLog(const in float value) { return exp(value * floatLogFactor) - 1.0; }\\n\\nvec3 encodeFloatRGB(in float value) {\\n    value = clamp(value, 0.0, 16777216.0 - 1.0) + 1.0;\\n    vec3 c = vec3(0.0);\\n    c.b = mod(value, 256.0);\\n    value = floor(value / 256.0);\\n    c.g = mod(value, 256.0);\\n    value = floor(value / 256.0);\\n    c.r = mod(value, 256.0);\\n    return c / 255.0;\\n}\\nfloat decodeFloatRGB(const in vec3 rgb) {\\n    return (rgb.r * 256.0 * 256.0 * 255.0 + rgb.g * 256.0 * 255.0 + rgb.b * 255.0) - 1.0;\\n}\\n\\nconst float PackUpscale = 256.0 / 255.0; // fraction -> 0..1 (including 1)\\nconst float UnpackDownscale = 255.0 / 256.0; // 0..1 -> fraction (excluding 1)\\nconst vec3 PackFactors = vec3(256.0 * 256.0 * 256.0, 256.0 * 256.0,  256.0);\\nconst vec4 UnpackFactors = UnpackDownscale / vec4(PackFactors, 1.0);\\nconst float ShiftRight8 = 1.0 / 256.0;\\n\\nvec4 packDepthToRGBA(const in float v) {\\n\\tvec4 r = vec4(fract(v * PackFactors), v);\\n\\tr.yzw -= r.xyz * ShiftRight8; // tidy overflow\\n\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth(const in vec4 v) {\\n\\treturn dot(v, UnpackFactors);\\n}\\n\\n#if __VERSION__ != 300\\n    // transpose\\n\\n    float transpose(const in float m) {\\n        return m;\\n    }\\n\\n    mat2 transpose2(const in mat2 m) {\\n        return mat2(\\n            m[0][0], m[1][0],\\n            m[0][1], m[1][1]\\n        );\\n    }\\n\\n    mat3 transpose3(const in mat3 m) {\\n        return mat3(\\n            m[0][0], m[1][0], m[2][0],\\n            m[0][1], m[1][1], m[2][1],\\n            m[0][2], m[1][2], m[2][2]\\n        );\\n    }\\n\\n    mat4 transpose4(const in mat4 m) {\\n        return mat4(\\n            m[0][0], m[1][0], m[2][0], m[3][0],\\n            m[0][1], m[1][1], m[2][1], m[3][1],\\n            m[0][2], m[1][2], m[2][2], m[3][2],\\n            m[0][3], m[1][3], m[2][3], m[3][3]\\n        );\\n    }\\n\\n    // inverse\\n\\n    float inverse(const in float m) {\\n        return 1.0 / m;\\n    }\\n\\n    mat2 inverse2(const in mat2 m) {\\n        return mat2(m[1][1],-m[0][1],\\n                -m[1][0], m[0][0]) / (m[0][0]*m[1][1] - m[0][1]*m[1][0]);\\n    }\\n\\n    mat3 inverse3(const in mat3 m) {\\n        float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];\\n        float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];\\n        float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];\\n\\n        float b01 = a22 * a11 - a12 * a21;\\n        float b11 = -a22 * a10 + a12 * a20;\\n        float b21 = a21 * a10 - a11 * a20;\\n\\n        float det = a00 * b01 + a01 * b11 + a02 * b21;\\n\\n        return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),\\n                    b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),\\n                    b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;\\n    }\\n\\n    mat4 inverse4(const in mat4 m) {\\n        float\\n            a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3],\\n            a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3],\\n            a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3],\\n            a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3],\\n\\n            b00 = a00 * a11 - a01 * a10,\\n            b01 = a00 * a12 - a02 * a10,\\n            b02 = a00 * a13 - a03 * a10,\\n            b03 = a01 * a12 - a02 * a11,\\n            b04 = a01 * a13 - a03 * a11,\\n            b05 = a02 * a13 - a03 * a12,\\n            b06 = a20 * a31 - a21 * a30,\\n            b07 = a20 * a32 - a22 * a30,\\n            b08 = a20 * a33 - a23 * a30,\\n            b09 = a21 * a32 - a22 * a31,\\n            b10 = a21 * a33 - a23 * a31,\\n            b11 = a22 * a33 - a23 * a32,\\n\\n            det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\\n\\n        return mat4(\\n            a11 * b11 - a12 * b10 + a13 * b09,\\n            a02 * b10 - a01 * b11 - a03 * b09,\\n            a31 * b05 - a32 * b04 + a33 * b03,\\n            a22 * b04 - a21 * b05 - a23 * b03,\\n            a12 * b08 - a10 * b11 - a13 * b07,\\n            a00 * b11 - a02 * b08 + a03 * b07,\\n            a32 * b02 - a30 * b05 - a33 * b01,\\n            a20 * b05 - a22 * b02 + a23 * b01,\\n            a10 * b10 - a11 * b08 + a13 * b06,\\n            a01 * b08 - a00 * b10 - a03 * b06,\\n            a30 * b04 - a31 * b02 + a33 * b00,\\n            a21 * b02 - a20 * b04 - a23 * b00,\\n            a11 * b07 - a10 * b09 - a12 * b06,\\n            a00 * b09 - a01 * b07 + a02 * b06,\\n            a31 * b01 - a30 * b03 - a32 * b00,\\n            a20 * b03 - a21 * b01 + a22 * b00) / det;\\n    }\\n#else\\n    #define transpose2(m) transpose(m)\\n    #define transpose3(m) transpose(m)\\n    #define transpose4(m) transpose(m)\\n\\n    #define inverse2(m) inverse(m)\\n    #define inverse3(m) inverse(m)\\n    #define inverse4(m) inverse(m)\\n#endif\\n\",light_frag_params:\"\\nuniform float uLightIntensity;\\nuniform float uAmbientIntensity;\\nuniform float uReflectivity;\\nuniform float uMetalness;\\nuniform float uRoughness;\\n\\nstruct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularRoughness;\\n\\tvec3 specularColor;\\n};\\n\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n};\\n\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n};\\n\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\n\\nvec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {\\n\\t// Original approximation by Christophe Schlick '94\\n\\t// float fresnel = pow( 1.0 - dotLH, 5.0 );\\n\\t// Optimized variant (presented by Epic at SIGGRAPH '13)\\n\\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\\n\\tfloat fresnel = exp2((-5.55473 * dotLH - 6.98316) * dotLH);\\n\\treturn (1.0 - specularColor) * fresnel + specularColor;\\n}\\n\\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\\nfloat G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {\\n\\tfloat a2 = pow2(alpha);\\n\\t// dotNL and dotNV are explicitly swapped. This is not a mistake.\\n\\tfloat gv = dotNL * sqrt(a2 + (1.0 - a2) * pow2(dotNV));\\n\\tfloat gl = dotNV * sqrt(a2 + (1.0 - a2) * pow2(dotNL));\\n\\treturn 0.5 / max(gv + gl, EPSILON);\\n}\\n\\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\\n// alpha is \\\"roughness squared\\\" in Disney’s reparameterization\\nfloat D_GGX(const in float alpha, const in float dotNH) {\\n\\tfloat a2 = pow2(alpha);\\n\\tfloat denom = pow2(dotNH) * (a2 - 1.0) + 1.0; // avoid alpha = 0 with dotNH = 1\\n\\treturn RECIPROCAL_PI * a2 / pow2(denom);\\n}\\n\\nvec3 BRDF_Diffuse_Lambert(const in vec3 diffuseColor) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\n\\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\\nvec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness) {\\n\\tfloat alpha = pow2(roughness); // UE4's roughness\\n\\tvec3 halfDir = normalize(incidentLight.direction + geometry.viewDir);\\n\\n\\tfloat dotNL = saturate(dot(geometry.normal, incidentLight.direction));\\n\\tfloat dotNV = saturate(dot(geometry.normal, geometry.viewDir));\\n\\tfloat dotNH = saturate(dot(geometry.normal, halfDir));\\n\\tfloat dotLH = saturate(dot(incidentLight.direction, halfDir));\\n\\n\\tvec3 F = F_Schlick(specularColor, dotLH);\\n\\tfloat G = G_GGX_SmithCorrelated(alpha, dotNL, dotNV);\\n\\tfloat D = D_GGX(alpha, dotNH);\\n\\treturn F * (G * D);\\n}\\n\\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\\nvec3 BRDF_Specular_GGX_Environment(const in GeometricContext geometry, const in vec3 specularColor, const in float roughness) {\\n\\tfloat dotNV = saturate(dot(geometry.normal, geometry.viewDir));\\n\\tconst vec4 c0 = vec4(-1, -0.0275, -0.572, 0.022);\\n\\tconst vec4 c1 = vec4(1, 0.0425, 1.04, -0.04);\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;\\n\\tvec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\n\\nvoid RE_Direct_Physical(const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\tfloat dotNL = saturate(dot(geometry.normal, directLight.direction));\\n    vec3 irradiance = dotNL * directLight.color;\\n\\tirradiance *= PI; // punctual light\\n\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_GGX(directLight, geometry, material.specularColor, material.specularRoughness);\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert(material.diffuseColor);\\n}\\n\\nvoid RE_IndirectDiffuse_Physical(const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert(material.diffuseColor);\\n}\\n\",matrix_scale:\"\\nfloat matrixScale(in mat4 m){\\n    vec4 r = m[0];\\n    return sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]);\\n}\\n\",normal_frag_params:\"\\nvarying vec3 vNormal;\\n\",read_from_texture:\"\\nvec4 readFromTexture (const in sampler2D tex, const in float i, const in vec2 dim) {\\n    float x = intMod(i, dim.x);\\n    float y = floor(intDiv(i, dim.x));\\n    vec2 uv = (vec2(x, y) + 0.5) / dim;\\n    return texture2D(tex, uv);\\n}\\n\",size_vert_params:\"\\n#if defined(dSizeType_uniform)\\n    uniform float uSize;\\n#elif defined(dSizeType_attribute)\\n    attribute float aSize;\\n#elif defined(dSizeType_instance) || defined(dSizeType_group) || defined(dSizeType_groupInstance)\\n    uniform vec2 uSizeTexDim;\\n    uniform sampler2D tSize;\\n#endif\\n\\nuniform float uSizeFactor;\\n\",texture3d_from_2d_linear:a,texture3d_from_2d_nearest:a},u=/^(?!\\/\\/)\\s*#include\\s+(\\S+)/gim,c=/[ \\t]*\\/\\/.*\\n/g,l=/[ \\t]*\\/\\*[\\s\\S]*?\\*\\//g,d=/\\n{2,}/g;function f(e){return e.replace(u,function(e,t){var r=s[t];if(!r)throw new Error(\"empty chunk, '\"+t+\"'\");return r;}).trim().replace(c,\"\\n\").replace(l,\"\\n\").replace(d,\"\\n\");}function p(e,t,r,n){return void 0===n&&(n={}),{id:o(),name:e,vert:f(t),frag:f(r),extensions:n};}var m=p(\"points\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_vert_params\\n#include color_vert_params\\n#include size_vert_params\\n#include common_clip\\n\\nuniform float uPixelRatio;\\nuniform float uViewportHeight;\\n\\nattribute vec3 aPosition;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\nattribute float aGroup;\\n\\nvoid main(){\\n    #include assign_group\\n    #include assign_color_varying\\n    #include assign_marker_varying\\n    #include assign_clipping_varying\\n    #include assign_position\\n    #include assign_size\\n\\n    #ifdef dPointSizeAttenuation\\n        gl_PointSize = size * uPixelRatio * ((uViewportHeight / 2.0) / -mvPosition.z) * 5.0;\\n    #else\\n        gl_PointSize = size * uPixelRatio;\\n    #endif\\n\\n    gl_Position = uProjection * mvPosition;\\n\\n    #include clip_instance\\n}\\n\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_frag_params\\n#include color_frag_params\\n#include common_clip\\n\\n#ifdef dPointFilledCircle\\n    uniform float uPointEdgeBleach;\\n#endif\\n\\nconst vec2 center = vec2(0.5);\\nconst float radius = 0.5;\\n\\nvoid main(){\\n    #include clip_pixel\\n    #include assign_material_color\\n\\n    #if defined(dRenderVariant_pick)\\n        #include check_picking_alpha\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_depth)\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_color)\\n        gl_FragColor = material;\\n\\n        #ifdef dPointFilledCircle\\n            float dist = distance(gl_PointCoord, center);\\n            float alpha = 1.0 - smoothstep(radius - uPointEdgeBleach, radius, dist);\\n            if (alpha < 0.0001) discard;\\n            gl_FragColor.a *= alpha;\\n        #endif\\n\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\"),h=p(\"spheres\",'\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_vert_params\\n#include color_vert_params\\n#include size_vert_params\\n#include common_clip\\n\\nuniform mat4 uModelView;\\nuniform mat4 uInvProjection;\\n\\nattribute vec3 aPosition;\\nattribute vec2 aMapping;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\nattribute float aGroup;\\n\\nvarying float vRadius;\\nvarying float vRadiusSq;\\nvarying vec3 vPoint;\\nvarying vec3 vPointViewPosition;\\n\\n#include matrix_scale\\n\\nconst mat4 D = mat4(\\n    1.0, 0.0, 0.0, 0.0,\\n    0.0, 1.0, 0.0, 0.0,\\n    0.0, 0.0, 1.0, 0.0,\\n    0.0, 0.0, 0.0, -1.0\\n);\\n\\n/**\\n * Compute point size and center using the technique described in:\\n * \"GPU-Based Ray-Casting of Quadratic Surfaces\" http://dl.acm.org/citation.cfm?id=2386396\\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\\n */\\nvoid quadraticProjection(const in float radius, const in vec3 position){\\n    vec2 xbc, ybc;\\n\\n    mat4 T = mat4(\\n        radius, 0.0, 0.0, 0.0,\\n        0.0, radius, 0.0, 0.0,\\n        0.0, 0.0, radius, 0.0,\\n        position.x, position.y, position.z, 1.0\\n    );\\n\\n    mat4 R = transpose4(uProjection * uModelView * aTransform * T);\\n    float A = dot(R[3], D * R[3]);\\n    float B = -2.0 * dot(R[0], D * R[3]);\\n    float C = dot(R[0], D * R[0]);\\n    xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\\n    xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\\n    float sx = abs(xbc[0] - xbc[1]) * 0.5;\\n\\n    A = dot(R[3], D * R[3]);\\n    B = -2.0 * dot(R[1], D * R[3]);\\n    C = dot(R[1], D * R[1]);\\n    ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\\n    ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\\n    float sy = abs(ybc[0] - ybc[1]) * 0.5;\\n\\n    gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\\n    gl_Position.xy -= aMapping * vec2(sx, sy);\\n    gl_Position.xy *= gl_Position.w;\\n}\\n\\n\\nvoid main(void){\\n    #include assign_group\\n    #include assign_color_varying\\n    #include assign_marker_varying\\n    #include assign_clipping_varying\\n    #include assign_size\\n\\n    vRadius = size * matrixScale(uModelView);\\n\\n    vec4 position4 = vec4(aPosition, 1.0);\\n    vec4 mvPosition = uModelView * aTransform * position4;\\n    mvPosition.z -= vRadius; // avoid clipping, added again in fragment shader\\n\\n    gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\\n    quadraticProjection(size, aPosition);\\n\\n    vRadiusSq = vRadius * vRadius;\\n    vec4 vPoint4 = uInvProjection * gl_Position;\\n    vPoint = vPoint4.xyz / vPoint4.w;\\n    vPointViewPosition = -mvPosition.xyz / mvPosition.w;\\n\\n    vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\\n\\n    #include clip_instance\\n}\\n',\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_frag_params\\n#include color_frag_params\\n#include light_frag_params\\n#include common_clip\\n\\nuniform mat4 uProjection;\\n\\nuniform float uClipNear;\\nuniform float uIsOrtho;\\n\\nvarying float vRadius;\\nvarying float vRadiusSq;\\nvarying vec3 vPoint;\\nvarying vec3 vPointViewPosition;\\n\\nvec3 cameraPos;\\nvec3 cameraNormal;\\n\\n// Calculate depth based on the given camera position.\\nfloat calcDepth(const in vec3 cameraPos){\\n    vec2 clipZW = cameraPos.z * uProjection[2].zw + uProjection[3].zw;\\n    return 0.5 + 0.5 * clipZW.x / clipZW.y;\\n}\\n\\nfloat calcClip(const in vec3 cameraPos) {\\n    return dot(vec4(cameraPos, 1.0), vec4(0.0, 0.0, 1.0, uClipNear - 0.5));\\n}\\n\\nbool Impostor(out vec3 cameraPos, out vec3 cameraNormal){\\n    vec3 cameraSpherePos = -vPointViewPosition;\\n    cameraSpherePos.z += vRadius;\\n\\n    vec3 rayOrigin = mix(vec3(0.0, 0.0, 0.0), vPoint, uIsOrtho);\\n    vec3 rayDirection = mix(normalize(vPoint), vec3(0.0, 0.0, 1.0), uIsOrtho);\\n    vec3 cameraSphereDir = mix(cameraSpherePos, rayOrigin - cameraSpherePos, uIsOrtho);\\n\\n    float B = dot(rayDirection, cameraSphereDir);\\n    float det = B * B + vRadiusSq - dot(cameraSphereDir, cameraSphereDir);\\n\\n    if (det < 0.0){\\n        discard;\\n        return false;\\n    }\\n\\n    float sqrtDet = sqrt(det);\\n    float posT = mix(B + sqrtDet, B + sqrtDet, uIsOrtho);\\n    float negT = mix(B - sqrtDet, sqrtDet - B, uIsOrtho);\\n\\n    cameraPos = rayDirection * negT + rayOrigin;\\n\\n\\n    if (calcDepth(cameraPos) <= 0.0) {\\n        cameraPos = rayDirection * posT + rayOrigin;\\n        interior = true;\\n    } else {\\n        interior = false;\\n    }\\n\\n    cameraNormal = normalize(cameraPos - cameraSpherePos);\\n    cameraNormal *= float(!interior) * 2.0 - 1.0;\\n\\n    return !interior;\\n}\\n\\nvoid main(void){\\n    #include clip_pixel\\n\\n    bool flag = Impostor(cameraPos, cameraNormal);\\n    #ifndef dDoubleSided\\n        if (interior)\\n            discard;\\n    #endif\\n\\n    // FIXME not compatible with custom clipping plane\\n    // Set the depth based on the new cameraPos.\\n    gl_FragDepthEXT = calcDepth(cameraPos);\\n    if (!flag && gl_FragDepthEXT >= 0.0) {\\n        gl_FragDepthEXT = 0.0 + (0.0000001 / vRadius);\\n    }\\n\\n    // bugfix (mac only?)\\n    if (gl_FragDepthEXT < 0.0)\\n        discard;\\n    if (gl_FragDepthEXT > 1.0)\\n        discard;\\n\\n    #include assign_material_color\\n\\n    #if defined(dRenderVariant_pick)\\n        #include check_picking_alpha\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_depth)\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_color)\\n        #ifdef dIgnoreLight\\n            gl_FragColor = material;\\n        #else\\n            vec3 normal = -cameraNormal;\\n            vec3 vViewPosition = cameraPos;\\n            #include apply_light_color\\n        #endif\\n\\n        #include apply_interior_color\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\",{fragDepth:!0}),g=p(\"text\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_vert_params\\n#include color_vert_params\\n#include size_vert_params\\n#include common_clip\\n\\nuniform mat4 uModelView;\\n\\nattribute vec3 aPosition;\\nattribute vec2 aMapping;\\nattribute float aDepth;\\nattribute vec2 aTexCoord;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\nattribute float aGroup;\\n\\nuniform float uOffsetX;\\nuniform float uOffsetY;\\nuniform float uOffsetZ;\\n\\n// uniform bool ortho;\\nuniform float uPixelRatio;\\nuniform float uViewportHeight;\\n\\nvarying vec2 vTexCoord;\\n\\n#include matrix_scale\\n\\nvoid main(void){\\n    #include assign_group\\n    #include assign_color_varying\\n    #include assign_marker_varying\\n    #include assign_clipping_varying\\n    #include assign_size\\n\\n    vTexCoord = aTexCoord;\\n\\n    float scale = matrixScale(uModelView);\\n\\n    float offsetX = uOffsetX * scale;\\n    float offsetY = uOffsetY * scale;\\n    float offsetZ = (uOffsetZ + aDepth * 0.95) * scale;\\n\\n    vec4 position4 = vec4(aPosition, 1.0);\\n    vec4 mvPosition = uModelView * aTransform * position4;\\n\\n    vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\\n\\n    // TODO\\n    // #ifdef FIXED_SIZE\\n    //     if (ortho) {\\n    //         scale /= pixelRatio * ((uViewportHeight / 2.0) / -uCameraPosition.z) * 0.1;\\n    //     } else {\\n    //         scale /= pixelRatio * ((uViewportHeight / 2.0) / -mvPosition.z) * 0.1;\\n    //     }\\n    // #endif\\n\\n    vec4 mvCorner = vec4(mvPosition.xyz, 1.0);\\n\\n    if (vTexCoord.x == 10.0) { // indicates background plane\\n        // move a bit to the back, taking distance to camera into account to avoid z-fighting\\n        offsetZ -= 0.001 * distance(uCameraPosition, (uProjection * mvCorner).xyz);\\n    }\\n\\n    mvCorner.xy += aMapping * size * scale;\\n    mvCorner.x += offsetX;\\n    mvCorner.y += offsetY;\\n\\n    // TODO\\n    // if(ortho){\\n    //     mvCorner.xyz += normalize(-uCameraPosition) * offsetZ;\\n    // } else {\\n    //     mvCorner.xyz += normalize(-mvCorner.xyz) * offsetZ;\\n    // }\\n    mvCorner.xyz += normalize(-mvCorner.xyz) * offsetZ;\\n\\n    gl_Position = uProjection * mvCorner;\\n\\n    vViewPosition = -mvCorner.xyz;\\n\\n    #include clip_instance\\n}\\n\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_frag_params\\n#include color_frag_params\\n#include common_clip\\n\\nuniform sampler2D tFont;\\n\\nuniform vec3 uBorderColor;\\nuniform float uBorderWidth;\\nuniform vec3 uBackgroundColor;\\nuniform float uBackgroundOpacity;\\n\\nvarying vec2 vTexCoord;\\n\\nconst float smoothness = 32.0;\\nconst float gamma = 2.2;\\n\\nvoid main2(){\\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\\n}\\n\\nvoid main(){\\n    #include clip_pixel\\n    #include assign_material_color\\n\\n    if (vTexCoord.x > 1.0) {\\n        gl_FragColor = vec4(uBackgroundColor, uBackgroundOpacity);\\n    } else {\\n        // retrieve signed distance\\n        float sdf = texture2D(tFont, vTexCoord).a + uBorderWidth;\\n\\n        // perform adaptive anti-aliasing of the edges\\n        float w = clamp(smoothness * (abs(dFdx(vTexCoord.x)) + abs(dFdy(vTexCoord.y))), 0.0, 0.5);\\n        float a = smoothstep(0.5 - w, 0.5 + w, sdf);\\n\\n        // gamma correction for linear attenuation\\n        a = pow(a, 1.0 / gamma);\\n\\n        if (a < 0.5) discard;\\n        material.a *= a;\\n\\n        // add border\\n        float t = 0.5 + uBorderWidth;\\n        if (uBorderWidth > 0.0 && sdf < t) {\\n            material.xyz = mix(uBorderColor, material.xyz, smoothstep(t - w, t, sdf));\\n        }\\n\\n        gl_FragColor = material;\\n    }\\n\\n    #if defined(dRenderVariant_pick)\\n        #include check_picking_alpha\\n    #elif defined(dRenderVariant_depth)\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_color)\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\",{standardDerivatives:!0}),v=p(\"lines\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_vert_params\\n#include color_vert_params\\n#include size_vert_params\\n#include common_clip\\n\\nuniform float uPixelRatio;\\nuniform float uViewportHeight;\\n\\nattribute vec3 aPosition;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\nattribute float aGroup;\\n\\nattribute vec2 aMapping;\\nattribute vec3 aStart;\\nattribute vec3 aEnd;\\n\\nvoid trimSegment(const in vec4 start, inout vec4 end) {\\n    // trim end segment so it terminates between the camera plane and the near plane\\n    // conservative estimate of the near plane\\n    float a = uProjection[2][2];  // 3nd entry in 3th column\\n    float b = uProjection[3][2];  // 3nd entry in 4th column\\n    float nearEstimate = -0.5 * b / a;\\n    float alpha = (nearEstimate - start.z) / (end.z - start.z);\\n    end.xyz = mix(start.xyz, end.xyz, alpha);\\n}\\n\\nvoid main(){\\n    #include assign_group\\n    #include assign_color_varying\\n    #include assign_marker_varying\\n    #include assign_clipping_varying\\n    #include assign_size\\n\\n    mat4 modelView = uView * uModel * aTransform;\\n\\n    // camera space\\n    vec4 start = modelView * vec4(aStart, 1.0);\\n    vec4 end = modelView * vec4(aEnd, 1.0);\\n\\n    // assign position\\n    vec4 position4 = vec4((aMapping.y < 0.5) ? aStart : aEnd, 1.0);\\n    vec4 mvPosition = modelView * position4;\\n    vViewPosition = mvPosition.xyz;\\n\\n    vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\\n\\n    // special case for perspective projection, and segments that terminate either in, or behind, the camera plane\\n    // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\\n    // but we need to perform ndc-space calculations in the shader, so we must address this issue directly\\n    // perhaps there is a more elegant solution -- WestLangley\\n    bool perspective = (uProjection[2][3] == -1.0); // 4th entry in the 3rd column\\n    if (perspective) {\\n        if (start.z < 0.0 && end.z >= 0.0) {\\n            trimSegment(start, end);\\n        } else if (end.z < 0.0 && start.z >= 0.0) {\\n            trimSegment(end, start);\\n        }\\n    }\\n\\n    // clip space\\n    vec4 clipStart = uProjection * start;\\n    vec4 clipEnd = uProjection * end;\\n\\n    // ndc space\\n    vec2 ndcStart = clipStart.xy / clipStart.w;\\n    vec2 ndcEnd = clipEnd.xy / clipEnd.w;\\n\\n    // direction\\n    vec2 dir = ndcEnd - ndcStart;\\n\\n    // account for clip-space aspect ratio\\n    dir.x *= uPixelRatio;\\n    dir = normalize(dir);\\n\\n    // perpendicular to dir\\n    vec2 offset = vec2(dir.y, - dir.x);\\n\\n    // undo aspect ratio adjustment\\n    dir.x /= uPixelRatio;\\n    offset.x /= uPixelRatio;\\n\\n    // sign flip\\n    if (aMapping.x < 0.0) offset *= -1.0;\\n\\n    // calculate linewidth\\n    float linewidth;\\n    #ifdef dLineSizeAttenuation\\n        linewidth = size * uPixelRatio * ((uViewportHeight / 2.0) / -start.z) * 5.0;\\n    #else\\n        linewidth = size * uPixelRatio;\\n    #endif\\n\\n    // adjust for linewidth\\n    offset *= linewidth;\\n\\n    // adjust for clip-space to screen-space conversion\\n    offset /= uViewportHeight;\\n\\n    // select end\\n    vec4 clip = (aMapping.y < 0.5) ? clipStart : clipEnd;\\n\\n    // back to clip space\\n    offset *= clip.w;\\n    clip.xy += offset;\\n    gl_Position = clip;\\n\\n    #include clip_instance\\n}\\n\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_frag_params\\n#include color_frag_params\\n#include common_clip\\n\\nvoid main(){\\n    #include clip_pixel\\n    #include assign_material_color\\n\\n    #if defined(dRenderVariant_pick)\\n        #include check_picking_alpha\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_depth)\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_color)\\n        gl_FragColor = material;\\n\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\"),b=p(\"mesh\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_vert_params\\n#include color_vert_params\\n#include common_clip\\n\\n#ifdef dGeoTexture\\n    uniform vec2 uGeoTexDim;\\n    uniform sampler2D tPositionGroup;\\n#else\\n    attribute vec3 aPosition;\\n#endif\\nattribute mat4 aTransform;\\nattribute float aInstance;\\nattribute float aGroup;\\n\\n#ifdef dGeoTexture\\n    uniform sampler2D tNormal;\\n#else\\n    attribute vec3 aNormal;\\n#endif\\nvarying vec3 vNormal;\\n\\nvoid main(){\\n    #include assign_group\\n    #include assign_color_varying\\n    #include assign_marker_varying\\n    #include assign_clipping_varying\\n    #include assign_position\\n    #include clip_instance\\n\\n    #ifdef dGeoTexture\\n        vec3 normal = readFromTexture(tNormal, aGroup, uGeoTexDim).xyz;\\n    #else\\n        vec3 normal = aNormal;\\n    #endif\\n    mat3 normalMatrix = transpose3(inverse3(mat3(modelView)));\\n    vec3 transformedNormal = normalize(normalMatrix * normalize(normal));\\n    #if defined(dFlipSided) && !defined(dDoubleSided) // TODO checking dDoubleSided should not be required, ASR\\n        transformedNormal = -transformedNormal;\\n    #endif\\n    vNormal = transformedNormal;\\n}\\n\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_frag_params\\n#include color_frag_params\\n#include light_frag_params\\n#include normal_frag_params\\n#include common_clip\\n\\nvoid main() {\\n    #include clip_pixel\\n\\n    // Workaround for buggy gl_FrontFacing (e.g. on some integrated Intel GPUs)\\n    #if defined(enabledStandardDerivatives)\\n        vec3 fdx = dFdx(vViewPosition);\\n        vec3 fdy = dFdy(vViewPosition);\\n        vec3 faceNormal = normalize(cross(fdx,fdy));\\n        bool frontFacing = dot(vNormal, faceNormal) > 0.0;\\n    #else\\n        bool frontFacing = dot(vNormal, vViewPosition) < 0.0;\\n    #endif\\n\\n    #if defined(dFlipSided)\\n        interior = frontFacing;\\n    #else\\n        interior = !frontFacing;\\n    #endif\\n\\n    #include assign_material_color\\n\\n    #if defined(dRenderVariant_pick)\\n        #include check_picking_alpha\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_depth)\\n        gl_FragColor = material;\\n    #elif defined(dRenderVariant_color)\\n        #ifdef dIgnoreLight\\n            gl_FragColor = material;\\n        #else\\n            #if defined(dFlatShaded) && defined(enabledStandardDerivatives)\\n                vec3 normal = -faceNormal;\\n            #else\\n                vec3 normal = -normalize(vNormal);\\n                #ifdef dDoubleSided\\n                    normal = normal * (float(frontFacing) * 2.0 - 1.0);\\n                #endif\\n            #endif\\n            #include apply_light_color\\n        #endif\\n\\n        #include apply_interior_color\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\",{standardDerivatives:!0}),y=p(\"direct-volume\",\"\\nprecision highp float;\\n\\nattribute vec3 aPosition;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\n\\nvarying vec3 unitCoord;\\nvarying vec3 origPos;\\nvarying float instance;\\n\\nuniform vec3 uBboxSize;\\nuniform vec3 uBboxMin;\\nuniform vec3 uBboxMax;\\nuniform vec3 uGridDim;\\nuniform mat4 uTransform;\\n\\nuniform mat4 uModelView;\\nuniform mat4 uProjection;\\n\\nvoid main() {\\n    unitCoord = aPosition + vec3(0.5);\\n    vec4 mvPosition = uModelView * uTransform * vec4(unitCoord * uGridDim, 1.0);\\n    origPos = unitCoord * uBboxSize + uBboxMin;\\n    instance = aInstance;\\n    gl_Position = uProjection * mvPosition;\\n\\n    // clamp z position to clip space\\n    if(gl_Position.z > gl_Position.w) {\\n        gl_Position.z = gl_Position.w - 0.0001;\\n    } else if(gl_Position.z < -gl_Position.w) {\\n        gl_Position.z = -gl_Position.w + 0.0001;\\n    }\\n}\\n\",\"\\nprecision highp float;\\n\\nvarying vec3 unitCoord;\\nvarying vec3 origPos;\\nvarying float instance;\\n\\nuniform mat4 uInvView;\\nuniform float uIsoValue;\\nuniform vec3 uGridDim;\\nuniform sampler2D tTransferTex;\\n\\nuniform int uObjectId;\\nuniform int uInstanceCount;\\nuniform int uGroupCount;\\n\\nuniform vec3 uHighlightColor;\\nuniform vec3 uSelectColor;\\nuniform vec2 uMarkerTexDim;\\nuniform sampler2D tMarker;\\n\\nuniform float uAlpha;\\nuniform float uPickingAlphaThreshold;\\n\\n#if defined(dGridTexType_2d)\\n    precision highp sampler2D;\\n    uniform sampler2D tGridTex;\\n    uniform vec3 uGridTexDim;\\n#elif defined(dGridTexType_3d)\\n    precision highp sampler3D;\\n    uniform sampler3D tGridTex;\\n#endif\\n\\n#if defined(dColorType_uniform)\\n    uniform vec3 uColor;\\n#elif defined(dColorType_varying)\\n    uniform vec2 uColorTexDim;\\n    uniform sampler2D tColor;\\n#endif\\n\\n#include common\\n#include light_frag_params\\n\\n#include read_from_texture\\n#include texture3d_from_2d_nearest\\n#include texture3d_from_2d_linear\\n\\n#if defined(dGridTexType_2d)\\n    vec4 textureVal(vec3 pos) {\\n        return texture3dFrom2dLinear(tGridTex, pos, uGridDim, uGridTexDim.xy);\\n    }\\n    vec4 textureGroup(vec3 pos) {\\n        vec3 nearestPos = floor(pos * uGridDim + 0.5) / uGridDim + 0.5 / uGridDim;\\n        return texture3dFrom2dNearest(tGridTex, nearestPos, uGridDim, uGridTexDim.xy);\\n    }\\n#elif defined(dGridTexType_3d)\\n    vec4 textureVal(vec3 pos) {\\n        return texture(tGridTex, pos);\\n    }\\n    vec4 textureGroup(vec3 pos) {\\n        return texelFetch(tGridTex, ivec3(pos * uGridDim), 0);\\n    }\\n#endif\\n\\nvec4 transferFunction(float value) {\\n    return texture2D(tTransferTex, vec2(value, 0.0));\\n}\\n\\nconst float gradOffset = 0.5;\\n\\nvec4 raymarch(vec3 startLoc, vec3 step, vec3 viewDir) {\\n    vec3 scaleVol = vec3(1.0) / uGridDim;\\n    vec3 pos = startLoc;\\n    float prevValue = -1.0;\\n    float value = 0.0;\\n    vec4 src = vec4(0.0);\\n    vec4 dst = vec4(0.0);\\n\\n    #if defined(dRenderMode_isosurface)\\n        vec3 isoPos;\\n        float tmp;\\n\\n        vec3 color = vec3(0.45, 0.55, 0.8);\\n        vec3 gradient = vec3(1.0);\\n        vec3 dx = vec3(gradOffset * scaleVol.x, 0.0, 0.0);\\n        vec3 dy = vec3(0.0, gradOffset * scaleVol.y, 0.0);\\n        vec3 dz = vec3(0.0, 0.0, gradOffset * scaleVol.z);\\n    #endif\\n\\n    for(int i = 0; i < dMaxSteps; ++i){\\n        value = textureVal(pos).a; // current voxel value\\n        if(pos.x > 1.01 || pos.y > 1.01 || pos.z > 1.01 || pos.x < -0.01 || pos.y < -0.01 || pos.z < -0.01)\\n            break;\\n\\n        #if defined(dRenderMode_volume)\\n            src = transferFunction(value);\\n            src.rgb *= src.a;\\n            dst = (1.0 - dst.a) * src + dst; // standard blending\\n        #endif\\n\\n        #if defined(dRenderMode_isosurface)\\n            if(prevValue > 0.0 && ( // there was a prev Value\\n                (prevValue < uIsoValue && value > uIsoValue) || // entering isosurface\\n                (prevValue > uIsoValue && value < uIsoValue) // leaving isosurface\\n            )) {\\n                tmp = ((prevValue - uIsoValue) / ((prevValue - uIsoValue) - (value - uIsoValue)));\\n                isoPos = mix(pos - step, pos, tmp);\\n\\n                #if defined(dRenderVariant_pick)\\n                    if (uAlpha < uPickingAlphaThreshold)\\n                        discard; // ignore so the element below can be picked\\n                #endif\\n\\n                #if defined(dRenderVariant_pickObject)\\n                    return vec4(encodeFloatRGB(float(uObjectId)), 1.0);\\n                #elif defined(dRenderVariant_pickInstance)\\n                    return vec4(encodeFloatRGB(instance), 1.0);\\n                #elif defined(dRenderVariant_pickGroup)\\n                    float group = floor(decodeFloatRGB(textureGroup(isoPos).rgb) + 0.5);\\n                    return vec4(encodeFloatRGB(group), 1.0);\\n                #elif defined(dRenderVariant_depth)\\n                    return packDepthToRGBA(gl_FragCoord.z); // TODO calculate isosurface depth\\n                #elif defined(dRenderVariant_color)\\n                    // compute gradient by central differences\\n                    gradient.x = textureVal(isoPos - dx).a - textureVal(isoPos + dx).a;\\n                    gradient.y = textureVal(isoPos - dy).a - textureVal(isoPos + dy).a;\\n                    gradient.z = textureVal(isoPos - dz).a - textureVal(isoPos + dz).a;\\n                    gradient = normalize(gradient);\\n                    float d = float(dot(gradient, viewDir) > 0.0);\\n                    gradient = (2.0 * d - 1.0) * gradient;\\n\\n                    float group = floor(decodeFloatRGB(textureGroup(isoPos).rgb) + 0.5);\\n\\n                    #if defined(dColorType_instance)\\n                        color = readFromTexture(tColor, instance, uColorTexDim).rgb;\\n                    #elif defined(dColorType_group)\\n                        color = readFromTexture(tColor, group, uColorTexDim).rgb;\\n                    #elif defined(dColorType_groupInstance)\\n                        color = readFromTexture(tColor, instance * float(uGroupCount) + group, uColorTexDim).rgb;\\n                    #endif\\n\\n                    vec3 normal = normalize(gradient);\\n                    vec3 vViewPosition = normalize(viewDir);\\n                    vec4 material = vec4(color, uAlpha);\\n                    #include apply_light_color\\n\\n                    float vMarker = readFromTexture(tMarker, instance * float(uGroupCount) + group, uMarkerTexDim).a;\\n                    #include apply_marker_color\\n\\n                    src.rgb = gl_FragColor.rgb;\\n                    src.a = gl_FragColor.a;\\n\\n                    // draw interior darker\\n                    if( (prevValue - uIsoValue) > 0.0 ) {\\n                        src.rgb *= 0.5;\\n                    }\\n\\n                    src.rgb *= src.a;\\n                    dst = (1.0 - dst.a) * src + dst; // standard blending\\n                    if(dst.a >= 1.0) {\\n                        break;\\n                    }\\n                #endif\\n            }\\n            prevValue = value;\\n        #endif\\n\\n        pos += step;\\n    }\\n    return dst;\\n}\\n\\nvoid main () {\\n    vec3 cameraPos = uInvView[3].xyz / uInvView[3].w;\\n\\n    vec3 rayDir = normalize(origPos - cameraPos);\\n    vec3 startLoc = unitCoord;\\n    vec3 step = rayDir * (1.0 / uGridDim) * 0.1;\\n\\n    gl_FragColor = raymarch(startLoc, step, normalize(cameraPos));\\n    if (length(gl_FragColor.rgb) < 0.00001) discard;\\n    #if defined(dRenderMode_volume)\\n        gl_FragColor.a *= uAlpha;\\n    #endif\\n}\\n\",{fragDepth:!0}),_=p(\"image\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include common_vert_params\\n\\nattribute vec3 aPosition;\\nattribute vec2 aUv;\\nattribute mat4 aTransform;\\nattribute float aInstance;\\n\\nvarying vec2 vUv;\\nvarying float vInstance;\\n\\nvoid main() {\\n    #include assign_position\\n\\n    vUv = aUv;\\n    vInstance = aInstance;\\n}\\n\",\"\\nprecision highp float;\\nprecision highp int;\\n\\n#include common\\n#include read_from_texture\\n#include common_frag_params\\n\\nuniform vec2 uImageTexDim;\\nuniform sampler2D tImageTex;\\nuniform sampler2D tGroupTex;\\n\\nuniform vec2 uMarkerTexDim;\\nuniform sampler2D tMarker;\\n\\nvarying vec2 vUv;\\nvarying float vInstance;\\n\\n#if defined(dInterpolation_catmulrom) || defined(dInterpolation_mitchell) || defined(dInterpolation_bspline)\\n    #define dInterpolation_cubic\\n#endif\\n\\n#if defined(dInterpolation_cubic)\\n    #if defined(dInterpolation_catmulrom) || defined(dInterpolation_mitchell)\\n        #if defined(dInterpolation_catmulrom)\\n            const float B = 0.0;\\n            const float C = 0.5;\\n        #elif defined(dInterpolation_mitchell)\\n            const float B = 0.333;\\n            const float C = 0.333;\\n        #endif\\n\\n        float cubicFilter(float x){\\n            float f = x;\\n            if (f < 0.0) {\\n                f = -f;\\n            }\\n            if (f < 1.0) {\\n                return ((12.0 - 9.0 * B - 6.0 * C) * (f * f * f) +\\n                    (-18.0 + 12.0 * B + 6.0 * C) * (f * f) +\\n                    (6.0 - 2.0 * B)) / 6.0;\\n            }else if (f >= 1.0 && f < 2.0){\\n                return ((-B - 6.0 * C) * ( f * f * f)\\n                    + (6.0 * B + 30.0 * C) * (f * f) +\\n                    (-(12.0 * B) - 48.0 * C) * f +\\n                    8.0 * B + 24.0 * C) / 6.0;\\n            }else{\\n                return 0.0;\\n            }\\n        }\\n    #elif defined(dInterpolation_bspline)\\n        float cubicFilter(float x) {\\n            float f = x;\\n            if (f < 0.0) {\\n                f = -f;\\n            }\\n            if (f >= 0.0 && f <= 1.0){\\n                return (2.0 / 3.0) + (0.5) * (f * f * f) - (f * f);\\n            } else if (f > 1.0 && f <= 2.0) {\\n                return 1.0 / 6.0 * pow((2.0 - f), 3.0);\\n            }\\n            return 1.0;\\n        }\\n    #endif\\n\\n    vec4 biCubic(sampler2D tex, vec2 texCoord) {\\n        vec2 texelSize = 1.0 / uImageTexDim;\\n        texCoord -= texelSize / 2.0;\\n        vec4 nSum = vec4(0.0);\\n        float nDenom = 0.0;\\n        vec2 cell = fract(texCoord * uImageTexDim);\\n        for (float m = -1.0; m <= 2.0; ++m) {\\n            for (float n = -1.0; n <= 2.0; ++n) {\\n                vec4 vecData = texture2D(tex, texCoord + texelSize * vec2(m, n));\\n                float c = cubicFilter(m - cell.x) * cubicFilter(-n + cell.y);\\n                nSum += vecData * c;\\n                nDenom += c;\\n            }\\n        }\\n        return nSum / nDenom;\\n    }\\n#endif\\n\\nvoid main() {\\n    #if defined(dInterpolation_cubic)\\n        vec4 imageData = biCubic(tImageTex, vUv);\\n    #else\\n        vec4 imageData = texture2D(tImageTex, vUv);\\n    #endif\\n    imageData.a = clamp(imageData.a, 0.0, 1.0);\\n    if (imageData.a > 0.9) imageData.a = 1.0;\\n\\n    #if defined(dRenderVariant_pick)\\n        if (imageData.a < 0.3)\\n            discard;\\n\\n        #if defined(dRenderVariant_pickObject)\\n            gl_FragColor = vec4(encodeFloatRGB(float(uObjectId)), 1.0);\\n        #elif defined(dRenderVariant_pickInstance)\\n            gl_FragColor = vec4(encodeFloatRGB(vInstance), 1.0);\\n        #elif defined(dRenderVariant_pickGroup)\\n            float group = texture2D(tGroupTex, vUv).r;\\n            gl_FragColor = vec4(encodeFloatRGB(group), 1.0);\\n        #endif\\n    #elif defined(dRenderVariant_depth)\\n        if (imageData.a < 0.05)\\n            discard;\\n\\n        #ifdef enabledFragDepth\\n            gl_FragColor = packDepthToRGBA(gl_FragDepthEXT);\\n        #else\\n            gl_FragColor = packDepthToRGBA(gl_FragCoord.z);\\n        #endif\\n    #elif defined(dRenderVariant_color)\\n        if (imageData.a < 0.05)\\n            discard;\\n\\n        gl_FragColor = imageData;\\n        gl_FragColor.a *= uAlpha;\\n\\n        float group = texture2D(tGroupTex, vUv).r;\\n        float vMarker = readFromTexture(tMarker, vInstance * float(uGroupCount) + group, uMarkerTexDim).a;\\n        #include apply_marker_color\\n        #include apply_fog\\n    #endif\\n}\\n\",{fragDepth:!0});function S(e,t,r,n){var a=function(e){if(void 0===e)return\"\";var t=[];for(var r in e){var n=e[r].ref.value;if(void 0!==n)if(\"string\"==typeof n)t.push(\"#define \"+r+\"_\"+n);else if(\"number\"==typeof n)t.push(\"#define \"+r+\" \"+n);else{if(\"boolean\"!=typeof n)throw new Error(\"unknown define type\");n&&t.push(\"#define \"+r);}}return t.join(\"\\n\")+\"\\n\";}(r),s=Object(i.m)(e)?\"#version 300 es\\n#define attribute in\\n#define varying out\\n#define texture2D texture\\n\":\"\",u=Object(i.m)(e)?function(e,t,r){var n=[\"#version 300 es\"];if(r.standardDerivatives&&n.push(\"#define enabledStandardDerivatives\"),r.fragDepth&&n.push(\"#define enabledFragDepth\"),t.drawBuffers)for(var i=0,a=e.getParameter(e.MAX_DRAW_BUFFERS);i<a;++i)n.push(\"layout(location = \"+i+\") out highp vec4 out_FragData\"+i+\";\");return n.push(\"\\n#define varying in\\n#define texture2D texture\\n#define texture2DLodEXT textureLod\\n\\n#define gl_FragColor out_FragData0\\n#define gl_FragDepthEXT gl_FragDepth\\n\\n#define requiredDrawBuffers\\n\"),n.join(\"\\n\")+\"\\n\";}(e,t,n.extensions):function(e,t){var r=[];if(t.standardDerivatives&&(r.push(\"#extension GL_OES_standard_derivatives : enable\"),r.push(\"#define enabledStandardDerivatives\")),t.fragDepth){if(!e.fragDepth)throw new Error(\"requested 'GL_EXT_frag_depth' extension is unavailable\");r.push(\"#extension GL_EXT_frag_depth : enable\"),r.push(\"#define enabledFragDepth\");}if(t.drawBuffers){if(!e.drawBuffers)throw new Error(\"requested 'GL_EXT_draw_buffers' extension is unavailable\");r.push(\"#extension GL_EXT_draw_buffers : require\"),r.push(\"#define requiredDrawBuffers\");}if(t.shaderTextureLod){if(!e.shaderTextureLod)throw new Error(\"requested 'GL_EXT_shader_texture_lod' extension is unavailable\");r.push(\"#extension GL_EXT_shader_texture_lod : enable\"),r.push(\"#define enabledShaderTextureLod\");}return r.join(\"\\n\")+\"\\n\";}(t,n.extensions),c=Object(i.m)(e)?function(e){return e.replace(/gl_FragData\\[([0-9]+)\\]/g,\"out_FragData$1\");}(n.frag):n.frag;return{id:o(),name:n.name,vert:\"\"+s+a+n.vert,frag:\"\"+u+a+c,extensions:n.extensions};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return s;});var n=r(57),i=r(7),a=r(359),o={entry:n.a.entry,struct:n.a.struct,struct_asym:n.a.struct_asym,ihm_model_list:n.a.ihm_model_list,ihm_model_group:n.a.ihm_model_group,ihm_model_group_link:n.a.ihm_model_group_link,entity:n.a.entity,entity_poly:n.a.entity_poly,entity_poly_seq:n.a.entity_poly_seq,pdbx_entity_branch:n.a.pdbx_entity_branch,chem_comp:a.a,pdbx_chem_comp_identifier:n.a.pdbx_chem_comp_identifier,atom_site:n.a.atom_site,ihm_sphere_obj_site:n.a.ihm_sphere_obj_site,ihm_gaussian_obj_site:n.a.ihm_gaussian_obj_site,pdbx_unobs_or_zero_occ_residues:n.a.pdbx_unobs_or_zero_occ_residues,pdbx_molecule:n.a.pdbx_molecule};function s(e){for(var t=Object.create(null),r=0,n=Object.keys(o);r<n.length;r++){var a=n[r];t[a]=a in e?e[a]:i.d.ofUndefinedColumns(o[a],0);}return t;}},function(e,t,r){\"use strict\";r.d(t,\"i\",function(){return p;}),r.d(t,\"d\",function(){return m;}),r.d(t,\"c\",function(){return h;}),r.d(t,\"f\",function(){return g;}),r.d(t,\"e\",function(){return v;}),r.d(t,\"b\",function(){return b;}),r.d(t,\"g\",function(){return y;}),r.d(t,\"a\",function(){return _;}),r.d(t,\"h\",function(){return S;});var n=r(0),i=r(264),a=r(74),o=r(39),s=r(256),u=r(257),c=r(123),l=r(258),d=r(2),f=r(51);function p(e){return d.ParamDefinition.MultiSelect(e,f.b,{description:\"For which kinds of units/chains to show the representation visuals.\"});}var m={unitKinds:p([\"atomic\",\"spheres\"])},h=Object(n.__assign)({},o.a.Params),g=Object(n.__assign)({},u.a.Params),v=Object(n.__assign)({},s.a.Params),b=Object(n.__assign)({},a.a.Params),y=Object(n.__assign)({},c.a.Params),_=Object(n.__assign)({},i.a.Params),S=Object(n.__assign)({},l.a.Params);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return o;});var n=r(0),i=r(5);function a(){var _e3=function e(t,r){return t.commands.dispatch(_e3,r||{});};return _e3.subscribe=function(t,r){return t.commands.subscribe(_e3,r);},_e3.id=i.c.create22(),_e3;}var o=function(){function e(){this.subs=new Map(),this.disposing=!1;}return e.prototype.subscribe=function(e,t){var r=this,n=this.subs.get(e.id);return n||(n=[],this.subs.set(e.id,n)),n.push(t),{unsubscribe:function unsubscribe(){var n=r.subs.get(e.id);if(n){var i=n.indexOf(t);if(!(i<0)){for(var a=i+1;a<n.length;a++)n[a-1]=n[a];n.pop();}}}};},e.prototype.dispatch=function(e,t){var r=this;return new Promise(function(n,i){r.disposing?i(\"disposed\"):r.subs.get(e.id)?r.resolve({cmd:e,params:t,resolve:n,reject:i}):n();});},e.prototype.dispose=function(){this.subs.clear();},e.prototype.resolve=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(!(t=this.subs.get(e.cmd.id)))return e.resolve(),[2];n.label=1;case 1:n.trys.push([1,6,,7]),r=0,i=t,n.label=2;case 2:return r<i.length?[4,(0,i[r])(e.params)]:[3,5];case 3:n.sent(),n.label=4;case 4:return r++,[3,2];case 5:return e.resolve(),[3,7];case 6:return a=n.sent(),e.reject(a),[3,7];case 7:return[2];}});});},e;}();},function(e,t,r){\"use strict\";function n(e,t){void 0===e&&(e=0),void 0===t&&(t=Number.MAX_SAFE_INTEGER);var r=e;return function(){var e=r;return r=(r+1)%t,e;};}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";function n(e,t,r){for(;t<r&&32===e.charCodeAt(t);)t++;return i(e,t,r);}function i(e,t,r){var n=t,i=0,a=1;for(45===e.charCodeAt(n)&&(a=-1,n++);n<r;n++){var o=e.charCodeAt(n)-48;if(o>9||o<0)return a*i|0;i=10*i+o|0;}return a*i;}function a(e,t,r,n){return 43===t.charCodeAt(r)&&r++,e*Math.pow(10,i(t,r,n));}function o(e,t,r){for(;t<r&&32===e.charCodeAt(t);)t++;return s(e,t,r);}function s(e,t,r){var n=t,i=1,o=0,s=0,u=1;for(45===e.charCodeAt(n)&&(i=-1,++n);n<r;){var c=e.charCodeAt(n)-48;if(!(c>=0&&c<10)){if(-2===c){for(++n;n<r;){if(!((c=e.charCodeAt(n)-48)>=0&&c<10))return 53===c||21===c?a(i*(o+s/u),e,n+1,r):i*(o+s/u);s=10*s+c,u*=10,++n;}return i*(o+s/u);}if(53===c||21===c)return a(i*o,e,n+1,r);break;}o=10*o+c,++n;}return i*o;}function u(e,t,r){return 43===e.charCodeAt(t)&&t++,function(e,t,r){for(45===e.charCodeAt(t)&&t++;t<r;t++){var n=e.charCodeAt(t)-48;if(n>9||n<0)return!1;}return!0;}(e,t,r)?2:3;}function c(e){var t=0,r=e.length;if(45===e.charCodeAt(t)&&++t,46===e.charCodeAt(t)&&r-t==1)return 3;for(;t<r;){var n=e.charCodeAt(t)-48;if(!(n>=0&&n<10)){if(-2===n){++t;for(var i=!1;t<r;){if(!((n=e.charCodeAt(t)-48)>=0&&n<10))return 53===n||21===n?u(e,t+1,r):3;i=!0,++t;}return i?1:0;}if(53===n||21===n)return 0===t||1===t&&45===e.charCodeAt(0)?3:u(e,t+1,r);break;}++t;}return t===r?0:3;}r.d(t,\"e\",function(){return n;}),r.d(t,\"d\",function(){return i;}),r.d(t,\"c\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return c;});},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return u;});var n=r(5),i=r(96),a=r(78),o=Object(i.a)();function s(e,t,r){return{id:o(),materialId:e.materialId,values:t,state:r,render:function render(i){t.uAlpha&&t.alpha&&n.e.updateIfChanged(t.uAlpha,Object(a.a)(t.alpha.ref.value*r.alphaFactor,0,1)),e.render(i);},getProgram:function getProgram(t){return e.getProgram(t);},update:function update(){return e.update();},dispose:function dispose(){return e.destroy();}};}function u(e,t){return{id:o(),values:t,render:function render(){return e.render(\"compute\");},update:function update(){return e.update();},dispose:function dispose(){return e.destroy();}};}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return g;}),r.d(t,\"a\",function(){return v;});var n=r(0),i=r(280),a=r(362),o=r(333),s=r(17),u=r(96),c=r(5),l=r(260),d=r(61),f=Object(u.a)();var p=Object.keys({color:\"\",pickObject:\"\",pickInstance:\"\",pickGroup:\"\",depth:\"\"}),m=Object.keys({compute:\"\"});function h(e,t,r,i,a){return r=Object(n.__assign)(Object(n.__assign)({},r),{dRenderVariant:c.e.create(t)}),a=Object(n.__assign)(Object(n.__assign)({},a),{dRenderVariant:Object(s.c)(\"string\")}),e.resources.program(r,i,a);}function g(e,t,r,n,i,a){return b(e,t,r,n,i,a,p);}function v(e,t,r,n,i,a){return void 0===a&&(a=-1),b(e,t,r,n,i,a,m);}function b(e,t,r,n,u,c,p){for(var m=f(),g=e.stats,v=e.state,b=e.resources,y=e.extensions,_=y.instancedArrays,S=y.vertexArrayObject,O=Object(s.l)(n,u),x=O.attributeValues,C=O.defineValues,w=O.textureValues,P=O.uniformValues,j=O.materialUniformValues,E=Object.entries(P),A=Object.entries(j),T=Object.entries(C),D=Object(s.k)(u),I=function(e,t){var r=e.gl;switch(t){case\"points\":return r.POINTS;case\"lines\":return r.LINES;case\"line-strip\":return r.LINE_STRIP;case\"line-loop\":return r.LINE_LOOP;case\"triangles\":return r.TRIANGLES;case\"triangle-strip\":return r.TRIANGLE_STRIP;case\"triangle-fan\":return r.TRIANGLE_FAN;}}(e,t),M={},k=0,B=p;k<B.length;k++){var V=B[k];M[V]=h(e,V,C,r,n);}var R,L=Object(a.b)(e,n,w),N=Object(i.b)(e,n,x),F=u.elements;F&&F.ref.value&&(R=b.elements(F.ref.value));for(var U={},z=0,H=p;z<H.length;z++){V=H[z];U[V]=S?b.vertexArray(M[V],N,R):null;}var G=u.drawCount.ref.value,q=u.instanceCount.ref.value;g.drawCount+=G,g.instanceCount+=q,g.instancedDrawCount+=q*G;var W={attributes:!1,defines:!1,elements:!1,textures:!1},Q=!1,Y=-1;return{id:m,materialId:c,getProgram:function getProgram(e){return M[e];},render:function render(t){if(0!==G&&0!==q&&!e.isContextLost){var r=M[t];if(r.id===Y&&v.currentRenderItemId===m)r.setUniforms(E),r.bindTextures(L);else{var n=U[t];r.id===v.currentProgramId&&r.id===Y&&-1!==c&&c===v.currentMaterialId||(r.id!==v.currentProgramId&&r.use(),r.setUniforms(A),v.currentMaterialId=c,Y=r.id),r.setUniforms(E),r.bindTextures(L),n?(n.bind(),R&&R.bind()):(R&&R.bind(),r.bindAttributes(N)),v.currentRenderItemId=m;}if(d.a&&Object(l.a)(e.gl),R?_.drawElementsInstanced(I,G,R._dataType,0,q):_.drawArraysInstanced(I,0,G,q),d.a)try{Object(o.a)(e.gl);}catch(e){throw new Error(\"Error rendering item id \"+m+\": '\"+e+\"'\");}}},update:function update(){!function(e){e.attributes=!1,e.defines=!1,e.elements=!1,e.textures=!1;}(W);for(var t=0,i=T.length;t<i;++t){var a=T[t],o=a[0];(P=a[1]).ref.version!==D[o]&&(W.defines=!0,D[o]=P.ref.version);}if(W.defines)for(var s=0,c=p;s<c.length;s++){o=c[s];M[o].destroy(),M[o]=h(e,o,C,r,n);}u.drawCount.ref.version!==D.drawCount&&(g.drawCount+=u.drawCount.ref.value-G,g.instancedDrawCount+=q*u.drawCount.ref.value-q*G,G=u.drawCount.ref.value,D.drawCount=u.drawCount.ref.version),u.instanceCount.ref.version!==D.instanceCount&&(g.instanceCount+=u.instanceCount.ref.value-q,g.instancedDrawCount+=u.instanceCount.ref.value*G-q*G,q=u.instanceCount.ref.value,D.instanceCount=u.instanceCount.ref.version);for(t=0,i=N.length;t<i;++t){var l=N[t],d=(o=l[0],l[1]);if((P=x[o]).ref.version!==D[o]){if(d.length>=P.ref.value.length)d.updateData(P.ref.value);else{d.destroy();var f=n[o],m=f.itemSize,v=f.divisor;N[t][1]=b.attribute(P.ref.value,m,v),W.attributes=!0;}D[o]=P.ref.version;}}if(R&&u.elements.ref.version!==D.elements&&(R.length>=u.elements.ref.value.length?R.updateData(u.elements.ref.value):(R.destroy(),R=b.elements(u.elements.ref.value),W.elements=!0),D.elements=u.elements.ref.version),W.attributes||W.defines||W.elements)for(var y=0,_=p;y<_.length;y++){o=_[y];var O=U[o];O&&O.destroy(),U[o]=S?b.vertexArray(M[o],N,R):null;}for(t=0,i=L.length;t<i;++t){var P,j=L[t],E=(o=j[0],j[1]);(P=w[o]).ref.version!==D[o]&&(\"texture\"!==n[o].kind?(E.load(P.ref.value),D[o]=P.ref.version,W.textures=!0):L[t][1]=P.ref.value);}return W;},destroy:function destroy(){if(!Q){for(var e=0,t=p;e<t.length;e++){var r=t[e];M[r].destroy();var i=U[r];i&&i.destroy();}L.forEach(function(e){var t=e[0],r=e[1];\"texture\"!==n[t].kind&&r.destroy();}),N.forEach(function(e){e[0];return e[1].destroy();}),R&&R.destroy(),Q=!0;}}};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){return Array.isArray||function(e){return e&&\"number\"==typeof e.length;};}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PluginConfigItem\",function(){return i;}),r.d(t,\"PluginConfig\",function(){return o;}),r.d(t,\"PluginConfigManager\",function(){return s;});var n=r(4),i=function(){function e(e,t){this.key=e,this.defaultValue=t;}return e.prototype.toString=function(){return this.key;},e.prototype.valueOf=function(){return this.key;},e;}();function a(e,t){return new i(e,t);}var o={item:a,General:{IsBusyTimeoutMs:a(\"plugin-config.is-busy-timeout\",750)},State:{DefaultServer:a(\"plugin-state.server\",\"https://webchem.ncbr.muni.cz/molstar-state\"),CurrentServer:a(\"plugin-state.server\",\"https://webchem.ncbr.muni.cz/molstar-state\")},VolumeStreaming:{DefaultServer:a(\"volume-streaming.server\",\"https://ds.litemol.org\"),CanStream:a(\"volume-streaming.can-stream\",function(e,t){return 1===e.models.length&&n.Model.probablyHasDensityMap(e.models[0]);}),EmdbHeaderServer:a(\"volume-streaming.emdb-header-server\",\"https://ftp.wwpdb.org/pub/emdb/structures\")},Viewport:{ShowExpand:a(\"viewer.show-expand-button\",!0),ShowSelectionMode:a(\"viewer.show-selection-model-button\",!0),ShowAnimation:a(\"viewer.show-animation-button\",!0)},Download:{DefaultPdbProvider:a(\"download.default-pdb-provider\",\"pdbe\"),DefaultEmdbProvider:a(\"download.default-emdb-provider\",\"pdbe\")},Structure:{SizeThresholds:a(\"structure.size-thresholds\",n.Structure.DefaultSizeThresholds),DefaultRepresentationPresetParams:a(\"structure.default-representation-preset-params\",{})}},s=function(){function e(e){var t=this;this._config=new Map(),e&&e.forEach(function(e){var r=e[0],n=e[1];return t._config.set(r,n);});}return e.prototype.get=function(e){return this._config.has(e)?this._config.get(e):e.defaultValue;},e.prototype.set=function(e,t){this._config.set(e,t);},e.prototype.delete=function(e){this._config.delete(e);},e;}();},function(e,t,r){e.exports=function(){\"use strict\";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e;}function r(e){return o(e)?e:z(e);}function n(e){return s(e)?e:H(e);}function i(e){return u(e)?e:G(e);}function a(e){return o(e)&&!c(e)?e:q(e);}function o(e){return!(!e||!e[d]);}function s(e){return!(!e||!e[f]);}function u(e){return!(!e||!e[p]);}function c(e){return s(e)||u(e);}function l(e){return!(!e||!e[m]);}t(n,r),t(i,r),t(a,r),r.isIterable=o,r.isKeyed=s,r.isIndexed=u,r.isAssociative=c,r.isOrdered=l,r.Keyed=n,r.Indexed=i,r.Set=a;var d=\"@@__IMMUTABLE_ITERABLE__@@\",f=\"@@__IMMUTABLE_KEYED__@@\",p=\"@@__IMMUTABLE_INDEXED__@@\",m=\"@@__IMMUTABLE_ORDERED__@@\",h={},g={value:!1},v={value:!1};function b(e){return e.value=!1,e;}function y(e){e&&(e.value=!0);}function _(){}function S(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n;}function O(e){return void 0===e.size&&(e.size=e.__iterate(C)),e.size;}function x(e,t){if(\"number\"!=typeof t){var r=t>>>0;if(\"\"+r!==t||4294967295===r)return NaN;t=r;}return t<0?O(e)+t:t;}function C(){return!0;}function w(e,t,r){return(0===e||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r);}function P(e,t){return E(e,t,0);}function j(e,t){return E(e,t,t);}function E(e,t,r){return void 0===e?r:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e);}var A,T,D,I=\"function\"==typeof Symbol&&Symbol.iterator,M=I||\"@@iterator\";function k(e){this.next=e;}function B(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n;}function V(){return{value:void 0,done:!0};}function R(e){return!!F(e);}function L(e){return e&&\"function\"==typeof e.next;}function N(e){var t=F(e);return t&&t.call(e);}function F(e){var t=e&&(I&&e[I]||e[\"@@iterator\"]);if(\"function\"==typeof t)return t;}function U(e){return e&&\"number\"==typeof e.length;}function z(e){return null==e?Z():o(e)?e.toSeq():function(e){var t=ee(e)||\"object\"==typeof_default()(e)&&new Q(e);if(!t)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+e);return t;}(e);}function H(e){return null==e?Z().toKeyedSeq():o(e)?s(e)?e.toSeq():e.fromEntrySeq():J(e);}function G(e){return null==e?Z():o(e)?s(e)?e.entrySeq():e.toIndexedSeq():$(e);}function q(e){return(null==e?Z():o(e)?s(e)?e.entrySeq():e:$(e)).toSetSeq();}function W(e){this._array=e,this.size=e.length;}function Q(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length;}function Y(e){this._iterable=e,this.size=e.length||e.size;}function X(e){this._iterator=e,this._iteratorCache=[];}function K(e){return!(!e||!e[\"@@__IMMUTABLE_SEQ__@@\"]);}function Z(){return A||(A=new W([]));}function J(e){var t=Array.isArray(e)?new W(e).fromEntrySeq():L(e)?new X(e).fromEntrySeq():R(e)?new Y(e).fromEntrySeq():\"object\"==typeof_default()(e)?new Q(e):void 0;if(!t)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+e);return t;}function $(e){var t=ee(e);if(!t)throw new TypeError(\"Expected Array or iterable object of values: \"+e);return t;}function ee(e){return U(e)?new W(e):L(e)?new X(e):R(e)?new Y(e):void 0;}function te(e,t,r,n){var i=e._cache;if(i){for(var a=i.length-1,o=0;o<=a;o++){var s=i[r?a-o:o];if(!1===t(s[1],n?s[0]:o,e))return o+1;}return o;}return e.__iterateUncached(t,r);}function re(e,t,r,n){var i=e._cache;if(i){var a=i.length-1,o=0;return new k(function(){var e=i[r?a-o:o];return o++>a?{value:void 0,done:!0}:B(t,n?e[0]:o-1,e[1]);});}return e.__iteratorUncached(t,r);}function ne(e,t){return t?function e(t,r,n,i){return Array.isArray(r)?t.call(i,n,G(r).map(function(n,i){return e(t,n,i,r);})):ae(r)?t.call(i,n,H(r).map(function(n,i){return e(t,n,i,r);})):r;}(t,e,\"\",{\"\":e}):ie(e);}function ie(e){return Array.isArray(e)?G(e).map(ie).toList():ae(e)?H(e).map(ie).toMap():e;}function ae(e){return e&&(e.constructor===Object||void 0===e.constructor);}function oe(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if(\"function\"==typeof e.valueOf&&\"function\"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1;}return!(\"function\"!=typeof e.equals||\"function\"!=typeof t.equals||!e.equals(t));}function se(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!c(e);if(l(e)){var n=e.entries();return t.every(function(e,t){var i=n.next().value;return i&&oe(i[1],e)&&(r||oe(i[0],t));})&&n.next().done;}var i=!1;if(void 0===e.size)if(void 0===t.size)\"function\"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var a=e;e=t,t=a;}var d=!0,f=t.__iterate(function(t,n){if(r?!e.has(t):i?!oe(t,e.get(n,h)):!oe(e.get(n,h),t))return d=!1,!1;});return d&&e.size===f;}function ue(e,t){if(!(this instanceof ue))return new ue(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(T)return T;T=this;}}function ce(e,t){if(!e)throw new Error(t);}function le(e,t,r){if(!(this instanceof le))return new le(e,t,r);if(ce(0!==r,\"Cannot step a Range by 0\"),e=e||0,void 0===t&&(t=1/0),r=void 0===r?1:Math.abs(r),t<e&&(r=-r),this._start=e,this._end=t,this._step=r,this.size=Math.max(0,Math.ceil((t-e)/r-1)+1),0===this.size){if(D)return D;D=this;}}function de(){throw TypeError(\"Abstract\");}function fe(){}function pe(){}function me(){}k.prototype.toString=function(){return\"[Iterator]\";},k.KEYS=0,k.VALUES=1,k.ENTRIES=2,k.prototype.inspect=k.prototype.toSource=function(){return this.toString();},k.prototype[M]=function(){return this;},t(z,r),z.of=function(){return z(arguments);},z.prototype.toSeq=function(){return this;},z.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\");},z.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this;},z.prototype.__iterate=function(e,t){return te(this,e,t,!0);},z.prototype.__iterator=function(e,t){return re(this,e,t,!0);},t(H,z),H.prototype.toKeyedSeq=function(){return this;},t(G,z),G.of=function(){return G(arguments);},G.prototype.toIndexedSeq=function(){return this;},G.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\");},G.prototype.__iterate=function(e,t){return te(this,e,t,!1);},G.prototype.__iterator=function(e,t){return re(this,e,t,!1);},t(q,z),q.of=function(){return q(arguments);},q.prototype.toSetSeq=function(){return this;},z.isSeq=K,z.Keyed=H,z.Set=q,z.Indexed=G,z.prototype[\"@@__IMMUTABLE_SEQ__@@\"]=!0,t(W,G),W.prototype.get=function(e,t){return this.has(e)?this._array[x(this,e)]:t;},W.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===e(r[t?n-i:i],i,this))return i+1;return i;},W.prototype.__iterator=function(e,t){var r=this._array,n=r.length-1,i=0;return new k(function(){return i>n?{value:void 0,done:!0}:B(e,i,r[t?n-i++:i++]);});},t(Q,H),Q.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t;},Q.prototype.has=function(e){return this._object.hasOwnProperty(e);},Q.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length-1,a=0;a<=i;a++){var o=n[t?i-a:a];if(!1===e(r[o],o,this))return a+1;}return a;},Q.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length-1,a=0;return new k(function(){var o=n[t?i-a:a];return a++>i?{value:void 0,done:!0}:B(e,o,r[o]);});},Q.prototype[m]=!0,t(Y,G),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=N(this._iterable),n=0;if(L(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n;},Y.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=N(this._iterable);if(!L(r))return new k(V);var n=0;return new k(function(){var t=r.next();return t.done?t:B(e,n++,t.value);});},t(X,G),X.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var r,n=this._iterator,i=this._iteratorCache,a=0;a<i.length;)if(!1===e(i[a],a++,this))return a;for(;!(r=n.next()).done;){var o=r.value;if(i[a]=o,!1===e(o,a++,this))break;}return a;},X.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=this._iterator,n=this._iteratorCache,i=0;return new k(function(){if(i>=n.length){var t=r.next();if(t.done)return t;n[i]=t.value;}return B(e,i,n[i++]);});},t(ue,G),ue.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\";},ue.prototype.get=function(e,t){return this.has(e)?this._value:t;},ue.prototype.includes=function(e){return oe(this._value,e);},ue.prototype.slice=function(e,t){var r=this.size;return w(e,t,r)?this:new ue(this._value,j(t,r)-P(e,r));},ue.prototype.reverse=function(){return this;},ue.prototype.indexOf=function(e){return oe(this._value,e)?0:-1;},ue.prototype.lastIndexOf=function(e){return oe(this._value,e)?this.size:-1;},ue.prototype.__iterate=function(e,t){for(var r=0;r<this.size;r++)if(!1===e(this._value,r,this))return r+1;return r;},ue.prototype.__iterator=function(e,t){var r=this,n=0;return new k(function(){return n<r.size?B(e,n++,r._value):{value:void 0,done:!0};});},ue.prototype.equals=function(e){return e instanceof ue?oe(this._value,e._value):se(e);},t(le,G),le.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\";},le.prototype.get=function(e,t){return this.has(e)?this._start+x(this,e)*this._step:t;},le.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t);},le.prototype.slice=function(e,t){return w(e,t,this.size)?this:(e=P(e,this.size),(t=j(t,this.size))<=e?new le(0,0):new le(this.get(e,this._end),this.get(t,this._end),this._step));},le.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var r=t/this._step;if(r>=0&&r<this.size)return r;}return-1;},le.prototype.lastIndexOf=function(e){return this.indexOf(e);},le.prototype.__iterate=function(e,t){for(var r=this.size-1,n=this._step,i=t?this._start+r*n:this._start,a=0;a<=r;a++){if(!1===e(i,a,this))return a+1;i+=t?-n:n;}return a;},le.prototype.__iterator=function(e,t){var r=this.size-1,n=this._step,i=t?this._start+r*n:this._start,a=0;return new k(function(){var o=i;return i+=t?-n:n,a>r?{value:void 0,done:!0}:B(e,a++,o);});},le.prototype.equals=function(e){return e instanceof le?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e);},t(de,r),t(fe,de),t(pe,de),t(me,de),de.Keyed=fe,de.Indexed=pe,de.Set=me;var he=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0;};function ge(e){return e>>>1&1073741824|3221225471&e;}function ve(e){if(!1===e||null==e)return 0;if(\"function\"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof_default()(e);if(\"number\"===t){if(e!=e||e===1/0)return 0;var r=0|e;for(r!==e&&(r^=4294967295*e);e>4294967295;)r^=e/=4294967295;return ge(r);}if(\"string\"===t)return e.length>we?function(e){var t=Ee[e];return void 0===t&&(t=be(e),je===Pe&&(je=0,Ee={}),je++,Ee[e]=t),t;}(e):be(e);if(\"function\"==typeof e.hashCode)return e.hashCode();if(\"object\"===t)return function(e){var t;if(Oe&&void 0!==(t=ye.get(e)))return t;if(void 0!==(t=e[Ce]))return t;if(!Se){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ce]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID;}}(e)))return t;}if(t=++xe,1073741824&xe&&(xe=0),Oe)ye.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(Se)Object.defineProperty(e,Ce,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments);},e.propertyIsEnumerable[Ce]=t;else{if(void 0===e.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");e[Ce]=t;}}return t;}(e);if(\"function\"==typeof e.toString)return be(e.toString());throw new Error(\"Value type \"+t+\" cannot be hashed.\");}function be(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return ge(t);}var ye,_e=Object.isExtensible,Se=function(){try{return Object.defineProperty({},\"@\",{}),!0;}catch(e){return!1;}}(),Oe=\"function\"==typeof WeakMap;Oe&&(ye=new WeakMap());var xe=0,Ce=\"__immutablehash__\";\"function\"==typeof Symbol&&(Ce=Symbol(Ce));var we=16,Pe=255,je=0,Ee={};function Ae(e){ce(e!==1/0,\"Cannot perform this action with an infinite size.\");}function Te(e){return null==e?Ge():De(e)&&!l(e)?e:Ge().withMutations(function(t){var r=n(e);Ae(r.size),r.forEach(function(e,r){return t.set(r,e);});});}function De(e){return!(!e||!e[Me]);}t(Te,fe),Te.of=function(){var t=e.call(arguments,0);return Ge().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error(\"Missing value for key: \"+t[r]);e.set(t[r],t[r+1]);}});},Te.prototype.toString=function(){return this.__toString(\"Map {\",\"}\");},Te.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t;},Te.prototype.set=function(e,t){return qe(this,e,t);},Te.prototype.setIn=function(e,t){return this.updateIn(e,h,function(){return t;});},Te.prototype.remove=function(e){return qe(this,e,h);},Te.prototype.deleteIn=function(e){return this.updateIn(e,function(){return h;});},Te.prototype.update=function(e,t,r){return 1===arguments.length?e(this):this.updateIn([e],t,r);},Te.prototype.updateIn=function(e,t,r){r||(r=t,t=void 0);var n=function e(t,r,n,i){var a=t===h,o=r.next();if(o.done){var s=a?n:t,u=i(s);return u===s?t:u;}ce(a||t&&t.set,\"invalid keyPath\");var c=o.value,l=a?h:t.get(c,h),d=e(l,r,n,i);return d===l?t:d===h?t.remove(c):(a?Ge():t).set(c,d);}(this,Xt(e),t,r);return n===h?void 0:n;},Te.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ge();},Te.prototype.merge=function(){return Xe(this,void 0,arguments);},Te.prototype.mergeWith=function(t){var r=e.call(arguments,1);return Xe(this,t,r);},Te.prototype.mergeIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,Ge(),function(e){return\"function\"==typeof e.merge?e.merge.apply(e,r):r[r.length-1];});},Te.prototype.mergeDeep=function(){return Xe(this,Ke,arguments);},Te.prototype.mergeDeepWith=function(t){var r=e.call(arguments,1);return Xe(this,Ze(t),r);},Te.prototype.mergeDeepIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,Ge(),function(e){return\"function\"==typeof e.mergeDeep?e.mergeDeep.apply(e,r):r[r.length-1];});},Te.prototype.sort=function(e){return St(Lt(this,e));},Te.prototype.sortBy=function(e,t){return St(Lt(this,t,e));},Te.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this;},Te.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _());},Te.prototype.asImmutable=function(){return this.__ensureOwner();},Te.prototype.wasAltered=function(){return this.__altered;},Te.prototype.__iterator=function(e,t){return new Fe(this,e,t);},Te.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate(function(t){return n++,e(t[1],t[0],r);},t),n;},Te.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?He(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this);},Te.isMap=De;var Ie,Me=\"@@__IMMUTABLE_MAP__@@\",ke=Te.prototype;function Be(e,t){this.ownerID=e,this.entries=t;}function Ve(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r;}function Re(e,t,r){this.ownerID=e,this.count=t,this.nodes=r;}function Le(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r;}function Ne(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r;}function Fe(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&ze(e._root);}function Ue(e,t){return B(e,t[0],t[1]);}function ze(e,t){return{node:e,index:0,__prev:t};}function He(e,t,r,n){var i=Object.create(ke);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i;}function Ge(){return Ie||(Ie=He(0));}function qe(e,t,r){var n,i;if(e._root){var a=b(g),o=b(v);if(n=We(e._root,e.__ownerID,0,void 0,t,r,a,o),!o.value)return e;i=e.size+(a.value?r===h?-1:1:0);}else{if(r===h)return e;i=1,n=new Be(e.__ownerID,[[t,r]]);}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?He(i,n):Ge();}function We(e,t,r,n,i,a,o,s){return e?e.update(t,r,n,i,a,o,s):a===h?e:(y(s),y(o),new Ne(t,n,[i,a]));}function Qe(e){return e.constructor===Ne||e.constructor===Le;}function Ye(e,t,r,n,i){if(e.keyHash===n)return new Le(t,n,[e.entry,i]);var a,o=31&(0===r?e.keyHash:e.keyHash>>>r),s=31&(0===r?n:n>>>r);return new Ve(t,1<<o|1<<s,o===s?[Ye(e,t,r+5,n,i)]:(a=new Ne(t,n,i),o<s?[e,a]:[a,e]));}function Xe(e,t,r){for(var i=[],a=0;a<r.length;a++){var s=r[a],u=n(s);o(s)||(u=u.map(function(e){return ne(e);})),i.push(u);}return Je(e,t,i);}function Ke(e,t,r){return e&&e.mergeDeep&&o(t)?e.mergeDeep(t):oe(e,t)?e:t;}function Ze(e){return function(t,r,n){if(t&&t.mergeDeepWith&&o(r))return t.mergeDeepWith(e,r);var i=e(t,r,n);return oe(t,i)?t:i;};}function Je(e,t,r){return 0===(r=r.filter(function(e){return 0!==e.size;})).length?e:0!==e.size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var n=t?function(r,n){e.update(n,h,function(e){return e===h?r:t(e,r,n);});}:function(t,r){e.set(r,t);},i=0;i<r.length;i++)r[i].forEach(n);}):e.constructor(r[0]);}function $e(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16);}function et(e,t,r,n){var i=n?e:S(e);return i[t]=r,i;}ke[Me]=!0,ke.delete=ke.remove,ke.removeIn=ke.deleteIn,Be.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a<o;a++)if(oe(r,i[a][0]))return i[a][1];return n;},Be.prototype.update=function(e,t,r,n,i,a,o){for(var s=i===h,u=this.entries,c=0,l=u.length;c<l&&!oe(n,u[c][0]);c++);var d=c<l;if(d?u[c][1]===i:s)return this;if(y(o),(s||!d)&&y(a),!s||1!==u.length){if(!d&&!s&&u.length>=tt)return function(e,t,r,n){e||(e=new _());for(var i=new Ne(e,ve(r),[r,n]),a=0;a<t.length;a++){var o=t[a];i=i.update(e,0,void 0,o[0],o[1]);}return i;}(e,u,n,i);var f=e&&e===this.ownerID,p=f?u:S(u);return d?s?c===l-1?p.pop():p[c]=p.pop():p[c]=[n,i]:p.push([n,i]),f?(this.entries=p,this):new Be(e,p);}},Ve.prototype.get=function(e,t,r,n){void 0===t&&(t=ve(r));var i=1<<(31&(0===e?t:t>>>e)),a=this.bitmap;return 0==(a&i)?n:this.nodes[$e(a&i-1)].get(e+5,t,r,n);},Ve.prototype.update=function(e,t,r,n,i,a,o){void 0===r&&(r=ve(n));var s=31&(0===t?r:r>>>t),u=1<<s,c=this.bitmap,l=0!=(c&u);if(!l&&i===h)return this;var d=$e(c&u-1),f=this.nodes,p=l?f[d]:void 0,m=We(p,e,t+5,r,n,i,a,o);if(m===p)return this;if(!l&&m&&f.length>=rt)return function(e,t,r,n,i){for(var a=0,o=new Array(32),s=0;0!==r;s++,r>>>=1)o[s]=1&r?t[a++]:void 0;return o[n]=i,new Re(e,a+1,o);}(e,f,c,s,m);if(l&&!m&&2===f.length&&Qe(f[1^d]))return f[1^d];if(l&&m&&1===f.length&&Qe(m))return m;var g=e&&e===this.ownerID,v=l?m?c:c^u:c|u,b=l?m?et(f,d,m,g):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,o=0;o<n;o++)o===t&&(a=1),i[o]=e[o+a];return i;}(f,d,g):function(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var a=new Array(i),o=0,s=0;s<i;s++)s===t?(a[s]=r,o=-1):a[s]=e[s+o];return a;}(f,d,m,g);return g?(this.bitmap=v,this.nodes=b,this):new Ve(e,v,b);},Re.prototype.get=function(e,t,r,n){void 0===t&&(t=ve(r));var i=31&(0===e?t:t>>>e),a=this.nodes[i];return a?a.get(e+5,t,r,n):n;},Re.prototype.update=function(e,t,r,n,i,a,o){void 0===r&&(r=ve(n));var s=31&(0===t?r:r>>>t),u=i===h,c=this.nodes,l=c[s];if(u&&!l)return this;var d=We(l,e,t+5,r,n,i,a,o);if(d===l)return this;var f=this.count;if(l){if(!d&&--f<nt)return function(e,t,r,n){for(var i=0,a=0,o=new Array(r),s=0,u=1,c=t.length;s<c;s++,u<<=1){var l=t[s];void 0!==l&&s!==n&&(i|=u,o[a++]=l);}return new Ve(e,i,o);}(e,c,f,s);}else f++;var p=e&&e===this.ownerID,m=et(c,s,d,p);return p?(this.count=f,this.nodes=m,this):new Re(e,f,m);},Le.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a<o;a++)if(oe(r,i[a][0]))return i[a][1];return n;},Le.prototype.update=function(e,t,r,n,i,a,o){void 0===r&&(r=ve(n));var s=i===h;if(r!==this.keyHash)return s?this:(y(o),y(a),Ye(this,e,t,r,[n,i]));for(var u=this.entries,c=0,l=u.length;c<l&&!oe(n,u[c][0]);c++);var d=c<l;if(d?u[c][1]===i:s)return this;if(y(o),(s||!d)&&y(a),s&&2===l)return new Ne(e,this.keyHash,u[1^c]);var f=e&&e===this.ownerID,p=f?u:S(u);return d?s?c===l-1?p.pop():p[c]=p.pop():p[c]=[n,i]:p.push([n,i]),f?(this.entries=p,this):new Le(e,this.keyHash,p);},Ne.prototype.get=function(e,t,r,n){return oe(r,this.entry[0])?this.entry[1]:n;},Ne.prototype.update=function(e,t,r,n,i,a,o){var s=i===h,u=oe(n,this.entry[0]);return(u?i===this.entry[1]:s)?this:(y(o),s?void y(a):u?e&&e===this.ownerID?(this.entry[1]=i,this):new Ne(e,this.keyHash,[n,i]):(y(a),Ye(this,e,t,ve(n),[n,i])));},Be.prototype.iterate=Le.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===e(r[t?i-n:n]))return!1;},Ve.prototype.iterate=Re.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var a=r[t?i-n:n];if(a&&!1===a.iterate(e,t))return!1;}},Ne.prototype.iterate=function(e,t){return e(this.entry);},t(Fe,k),Fe.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r,n=t.node,i=t.index++;if(n.entry){if(0===i)return Ue(e,n.entry);}else if(n.entries){if(i<=(r=n.entries.length-1))return Ue(e,n.entries[this._reverse?r-i:i]);}else if(i<=(r=n.nodes.length-1)){var a=n.nodes[this._reverse?r-i:i];if(a){if(a.entry)return Ue(e,a.entry);t=this._stack=ze(a,t);}continue;}t=this._stack=this._stack.__prev;}return{value:void 0,done:!0};};var tt=8,rt=16,nt=8;function it(e){var t=mt();if(null==e)return t;if(at(e))return e;var r=i(e),n=r.size;return 0===n?t:(Ae(n),n>0&&n<32?pt(0,n,5,null,new ut(r.toArray())):t.withMutations(function(e){e.setSize(n),r.forEach(function(t,r){return e.set(r,t);});}));}function at(e){return!(!e||!e[ot]);}t(it,pe),it.of=function(){return this(arguments);},it.prototype.toString=function(){return this.__toString(\"List [\",\"]\");},it.prototype.get=function(e,t){if((e=x(this,e))>=0&&e<this.size){var r=vt(this,e+=this._origin);return r&&r.array[31&e];}return t;},it.prototype.set=function(e,t){return function(e,t,r){if((t=x(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?bt(e,t).set(0,r):bt(e,0,t+1).set(t,r);});t+=e._origin;var n=e._tail,i=e._root,a=b(v);return t>=_t(e._capacity)?n=ht(n,e.__ownerID,0,t,r,a):i=ht(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,i,n):e;}(this,e,t);},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this;},it.prototype.insert=function(e,t){return this.splice(e,0,t);},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):mt();},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(r){bt(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n]);});},it.prototype.pop=function(){return bt(this,0,-1);},it.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){bt(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r]);});},it.prototype.shift=function(){return bt(this,1);},it.prototype.merge=function(){return yt(this,void 0,arguments);},it.prototype.mergeWith=function(t){var r=e.call(arguments,1);return yt(this,t,r);},it.prototype.mergeDeep=function(){return yt(this,Ke,arguments);},it.prototype.mergeDeepWith=function(t){var r=e.call(arguments,1);return yt(this,Ze(t),r);},it.prototype.setSize=function(e){return bt(this,0,e);},it.prototype.slice=function(e,t){var r=this.size;return w(e,t,r)?this:bt(this,P(e,r),j(t,r));},it.prototype.__iterator=function(e,t){var r=0,n=ft(this,t);return new k(function(){var t=n();return t===dt?{value:void 0,done:!0}:B(e,r++,t);});},it.prototype.__iterate=function(e,t){for(var r,n=0,i=ft(this,t);(r=i())!==dt&&!1!==e(r,n++,this););return n;},it.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this);},it.isList=at;var ot=\"@@__IMMUTABLE_LIST__@@\",st=it.prototype;function ut(e,t){this.array=e,this.ownerID=t;}st[ot]=!0,st.delete=st.remove,st.setIn=ke.setIn,st.deleteIn=st.removeIn=ke.removeIn,st.update=ke.update,st.updateIn=ke.updateIn,st.mergeIn=ke.mergeIn,st.mergeDeepIn=ke.mergeDeepIn,st.withMutations=ke.withMutations,st.asMutable=ke.asMutable,st.asImmutable=ke.asImmutable,st.wasAltered=ke.wasAltered,ut.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&31;if(n>=this.array.length)return new ut([],e);var i,a=0===n;if(t>0){var o=this.array[n];if((i=o&&o.removeBefore(e,t-5,r))===o&&a)return this;}if(a&&!i)return this;var s=gt(this,e);if(!a)for(var u=0;u<n;u++)s.array[u]=void 0;return i&&(s.array[n]=i),s;},ut.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,i=r-1>>>t&31;if(i>=this.array.length)return this;if(t>0){var a=this.array[i];if((n=a&&a.removeAfter(e,t-5,r))===a&&i===this.array.length-1)return this;}var o=gt(this,e);return o.array.splice(i+1),n&&(o.array[i]=n),o;};var ct,lt,dt={};function ft(e,t){var r=e._origin,n=e._capacity,i=_t(n),a=e._tail;return o(e._root,e._level,0);function o(e,s,u){return 0===s?function(e,o){var s=o===i?a&&a.array:e&&e.array,u=o>r?0:r-o,c=n-o;return c>32&&(c=32),function(){if(u===c)return dt;var e=t?--c:u++;return s&&s[e];};}(e,u):function(e,i,a){var s,u=e&&e.array,c=a>r?0:r-a>>i,l=1+(n-a>>i);return l>32&&(l=32),function(){for(;;){if(s){var e=s();if(e!==dt)return e;s=null;}if(c===l)return dt;var r=t?--l:c++;s=o(u&&u[r],i-5,a+(r<<i));}};}(e,s,u);}}function pt(e,t,r,n,i,a,o){var s=Object.create(st);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=a,s.__hash=o,s.__altered=!1,s;}function mt(){return ct||(ct=pt(0,0,5));}function ht(e,t,r,n,i,a){var o,s=n>>>r&31,u=e&&s<e.array.length;if(!u&&void 0===i)return e;if(r>0){var c=e&&e.array[s],l=ht(c,t,r-5,n,i,a);return l===c?e:((o=gt(e,t)).array[s]=l,o);}return u&&e.array[s]===i?e:(y(a),o=gt(e,t),void 0===i&&s===o.array.length-1?o.array.pop():o.array[s]=i,o);}function gt(e,t){return t&&e&&t===e.ownerID?e:new ut(e?e.array.slice():[],t);}function vt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<<e._level+5){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&31],n-=5;return r;}}function bt(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new _(),i=e._origin,a=e._capacity,o=i+t,s=void 0===r?a:r<0?a+r:i+r;if(o===i&&s===a)return e;if(o>=s)return e.clear();for(var u=e._level,c=e._root,l=0;o+l<0;)c=new ut(c&&c.array.length?[void 0,c]:[],n),l+=1<<(u+=5);l&&(o+=l,i+=l,s+=l,a+=l);for(var d=_t(a),f=_t(s);f>=1<<u+5;)c=new ut(c&&c.array.length?[c]:[],n),u+=5;var p=e._tail,m=f<d?vt(e,s-1):f>d?new ut([],n):p;if(p&&f>d&&o<a&&p.array.length){for(var h=c=gt(c,n),g=u;g>5;g-=5){var v=d>>>g&31;h=h.array[v]=gt(h.array[v],n);}h.array[d>>>5&31]=p;}if(s<a&&(m=m&&m.removeAfter(n,0,s)),o>=f)o-=f,s-=f,u=5,c=null,m=m&&m.removeBefore(n,0,o);else if(o>i||f<d){for(l=0;c;){var b=o>>>u&31;if(b!==f>>>u&31)break;b&&(l+=(1<<u)*b),u-=5,c=c.array[b];}c&&o>i&&(c=c.removeBefore(n,u,o-l)),c&&f<d&&(c=c.removeAfter(n,u,f-l)),l&&(o-=l,s-=l);}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=u,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):pt(o,s,u,c,m);}function yt(e,t,r){for(var n=[],a=0,s=0;s<r.length;s++){var u=r[s],c=i(u);c.size>a&&(a=c.size),o(u)||(c=c.map(function(e){return ne(e);})),n.push(c);}return a>e.size&&(e=e.setSize(a)),Je(e,t,n);}function _t(e){return e<32?0:e-1>>>5<<5;}function St(e){return null==e?Ct():Ot(e)?e:Ct().withMutations(function(t){var r=n(e);Ae(r.size),r.forEach(function(e,r){return t.set(r,e);});});}function Ot(e){return De(e)&&l(e);}function xt(e,t,r,n){var i=Object.create(St.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i;}function Ct(){return lt||(lt=xt(Ge(),mt()));}function wt(e,t,r){var n,i,a=e._map,o=e._list,s=a.get(t),u=void 0!==s;if(r===h){if(!u)return e;o.size>=32&&o.size>=2*a.size?(n=(i=o.filter(function(e,t){return void 0!==e&&s!==t;})).toKeyedSeq().map(function(e){return e[0];}).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=a.remove(t),i=s===o.size-1?o.pop():o.set(s,void 0));}else if(u){if(r===o.get(s)[1])return e;n=a,i=o.set(s,[t,r]);}else n=a.set(t,o.size),i=o.set(o.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e):xt(n,i);}function Pt(e,t){this._iter=e,this._useKeys=t,this.size=e.size;}function jt(e){this._iter=e,this.size=e.size;}function Et(e){this._iter=e,this.size=e.size;}function At(e){this._iter=e,this.size=e.size;}function Tt(e){var t=Wt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e;},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse();},t;},t.has=function(t){return e.includes(t);},t.includes=function(t){return e.has(t);},t.cacheResult=Qt,t.__iterateUncached=function(t,r){var n=this;return e.__iterate(function(e,r){return!1!==t(r,e,n);},r);},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new k(function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t;}return e;});}return e.__iterator(1===t?0:1,r);},t;}function Dt(e,t,r){var n=Wt(e);return n.size=e.size,n.has=function(t){return e.has(t);},n.get=function(n,i){var a=e.get(n,h);return a===h?i:t.call(r,a,n,e);},n.__iterateUncached=function(n,i){var a=this;return e.__iterate(function(e,i,o){return!1!==n(t.call(r,e,i,o),i,a);},i);},n.__iteratorUncached=function(n,i){var a=e.__iterator(2,i);return new k(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return B(n,s,t.call(r,o[1],s,e),i);});},n;}function It(e,t){var r=Wt(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e;},e.flip&&(r.flip=function(){var t=Tt(e);return t.reverse=function(){return e.flip();},t;}),r.get=function(r,n){return e.get(t?r:-1-r,n);},r.has=function(r){return e.has(t?r:-1-r);},r.includes=function(t){return e.includes(t);},r.cacheResult=Qt,r.__iterate=function(t,r){var n=this;return e.__iterate(function(e,r){return t(e,r,n);},!r);},r.__iterator=function(t,r){return e.__iterator(t,!r);},r;}function Mt(e,t,r,n){var i=Wt(e);return n&&(i.has=function(n){var i=e.get(n,h);return i!==h&&!!t.call(r,i,n,e);},i.get=function(n,i){var a=e.get(n,h);return a!==h&&t.call(r,a,n,e)?a:i;}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,u){if(t.call(r,e,a,u))return s++,i(e,n?a:s-1,o);},a),s;},i.__iteratorUncached=function(i,a){var o=e.__iterator(2,a),s=0;return new k(function(){for(;;){var a=o.next();if(a.done)return a;var u=a.value,c=u[0],l=u[1];if(t.call(r,l,c,e))return B(i,n?c:s++,l,a);}});},i;}function kt(e,t,r,n){var i=e.size;if(void 0!==t&&(t|=0),void 0!==r&&(r===1/0?r=i:r|=0),w(t,r,i))return e;var a=P(t,i),o=j(r,i);if(a!=a||o!=o)return kt(e.toSeq().cacheResult(),t,r,n);var s,u=o-a;u==u&&(s=u<0?0:u);var c=Wt(e);return c.size=0===s?s:e.size&&s||void 0,!n&&K(e)&&s>=0&&(c.get=function(t,r){return(t=x(this,t))>=0&&t<s?e.get(t+a,r):r;}),c.__iterateUncached=function(t,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(t,r);var o=0,u=!0,c=0;return e.__iterate(function(e,r){if(!u||!(u=o++<a))return c++,!1!==t(e,n?r:c-1,i)&&c!==s;}),c;},c.__iteratorUncached=function(t,r){if(0!==s&&r)return this.cacheResult().__iterator(t,r);var i=0!==s&&e.__iterator(t,r),o=0,u=0;return new k(function(){for(;o++<a;)i.next();if(++u>s)return{value:void 0,done:!0};var e=i.next();return n||1===t?e:B(t,u-1,0===t?void 0:e.value[1],e);});},c;}function Bt(e,t,r,n){var i=Wt(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,u=0;return e.__iterate(function(e,a,c){if(!s||!(s=t.call(r,e,a,c)))return u++,i(e,n?a:u-1,o);}),u;},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(2,a),u=!0,c=0;return new k(function(){var e,a,l;do{if((e=s.next()).done)return n||1===i?e:B(i,c++,0===i?void 0:e.value[1],e);var d=e.value;a=d[0],l=d[1],u&&(u=t.call(r,l,a,o));}while(u);return 2===i?e:B(i,a,l,e);});},i;}function Vt(e,t){var r=s(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?J(e):$(Array.isArray(e)?e:[e]),e;}).filter(function(e){return 0!==e.size;});if(0===i.length)return e;if(1===i.length){var a=i[0];if(a===e||r&&s(a)||u(e)&&u(a))return a;}var c=new W(i);return r?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r;}},0),c;}function Rt(e,t,r){var n=Wt(e);return n.__iterateUncached=function(n,i){var a=0,s=!1;return function e(u,c){var l=this;u.__iterate(function(i,u){return(!t||c<t)&&o(i)?e(i,c+1):!1===n(i,r?u:a++,l)&&(s=!0),!s;},i);}(e,0),a;},n.__iteratorUncached=function(n,i){var a=e.__iterator(n,i),s=[],u=0;return new k(function(){for(;a;){var e=a.next();if(!1===e.done){var c=e.value;if(2===n&&(c=c[1]),t&&!(s.length<t)||!o(c))return r?e:B(n,u++,c,e);s.push(a),a=c.__iterator(n,i);}else a=s.pop();}return{value:void 0,done:!0};});},n;}function Lt(e,t,r){t||(t=Yt);var n=s(e),i=0,a=e.toSeq().map(function(t,n){return[n,t,i++,r?r(t,n,e):t];}).toArray();return a.sort(function(e,r){return t(e[3],r[3])||e[2]-r[2];}).forEach(n?function(e,t){a[t].length=2;}:function(e,t){a[t]=e[1];}),n?H(a):u(e)?G(a):q(a);}function Nt(e,t,r){if(t||(t=Yt),r){var n=e.toSeq().map(function(t,n){return[t,r(t,n,e)];}).reduce(function(e,r){return Ft(t,e[1],r[1])?r:e;});return n&&n[0];}return e.reduce(function(e,r){return Ft(t,e,r)?r:e;});}function Ft(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0;}function Ut(e,t,n){var i=Wt(e);return i.size=new W(n).map(function(e){return e.size;}).min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i;},i.__iteratorUncached=function(e,i){var a=n.map(function(e){return e=r(e),N(i?e.reverse():e);}),o=0,s=!1;return new k(function(){var r;return s||(r=a.map(function(e){return e.next();}),s=r.some(function(e){return e.done;})),s?{value:void 0,done:!0}:B(e,o++,t.apply(null,r.map(function(e){return e.value;})));});},i;}function zt(e,t){return K(e)?t:e.constructor(t);}function Ht(e){if(e!==Object(e))throw new TypeError(\"Expected [K, V] tuple: \"+e);}function Gt(e){return Ae(e.size),O(e);}function qt(e){return s(e)?n:u(e)?i:a;}function Wt(e){return Object.create((s(e)?H:u(e)?G:q).prototype);}function Qt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):z.prototype.cacheResult.call(this);}function Yt(e,t){return e>t?1:e<t?-1:0;}function Xt(e){var t=N(e);if(!t){if(!U(e))throw new TypeError(\"Expected iterable or array-like: \"+e);t=N(r(e));}return t;}function Kt(e,t){var r,_n4=function n(a){if(a instanceof _n4)return a;if(!(this instanceof _n4))return new _n4(a);if(!r){r=!0;var o=Object.keys(e);!function(e,t){try{t.forEach(er.bind(void 0,e));}catch(e){}}(i,o),i.size=o.length,i._name=t,i._keys=o,i._defaultValues=e;}this._map=Te(a);},i=_n4.prototype=Object.create(Zt);return i.constructor=_n4,_n4;}t(St,Te),St.of=function(){return this(arguments);},St.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\");},St.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t;},St.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ct();},St.prototype.set=function(e,t){return wt(this,e,t);},St.prototype.remove=function(e){return wt(this,e,h);},St.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered();},St.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],r);},t);},St.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t);},St.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?xt(t,r,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=r,this);},St.isOrderedMap=Ot,St.prototype[m]=!0,St.prototype.delete=St.prototype.remove,t(Pt,H),Pt.prototype.get=function(e,t){return this._iter.get(e,t);},Pt.prototype.has=function(e){return this._iter.has(e);},Pt.prototype.valueSeq=function(){return this._iter.valueSeq();},Pt.prototype.reverse=function(){var e=this,t=It(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse();}),t;},Pt.prototype.map=function(e,t){var r=this,n=Dt(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t);}),n;},Pt.prototype.__iterate=function(e,t){var r,n=this;return this._iter.__iterate(this._useKeys?function(t,r){return e(t,r,n);}:(r=t?Gt(this):0,function(i){return e(i,t?--r:r++,n);}),t);},Pt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var r=this._iter.__iterator(1,t),n=t?Gt(this):0;return new k(function(){var i=r.next();return i.done?i:B(e,t?--n:n++,i.value,i);});},Pt.prototype[m]=!0,t(jt,G),jt.prototype.includes=function(e){return this._iter.includes(e);},jt.prototype.__iterate=function(e,t){var r=this,n=0;return this._iter.__iterate(function(t){return e(t,n++,r);},t);},jt.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t),n=0;return new k(function(){var t=r.next();return t.done?t:B(e,n++,t.value,t);});},t(Et,q),Et.prototype.has=function(e){return this._iter.includes(e);},Et.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){return e(t,t,r);},t);},Et.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new k(function(){var t=r.next();return t.done?t:B(e,t.value,t.value,t);});},t(At,H),At.prototype.entrySeq=function(){return this._iter.toSeq();},At.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){if(t){Ht(t);var n=o(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r);}},t);},At.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new k(function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){Ht(n);var i=o(n);return B(e,i?n.get(0):n[0],i?n.get(1):n[1],t);}}});},jt.prototype.cacheResult=Pt.prototype.cacheResult=Et.prototype.cacheResult=At.prototype.cacheResult=Qt,t(Kt,fe),Kt.prototype.toString=function(){return this.__toString($t(this)+\" {\",\"}\");},Kt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e);},Kt.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._defaultValues[e];return this._map?this._map.get(e,r):r;},Kt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Jt(this,Ge()));},Kt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key \"'+e+'\" on '+$t(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:Jt(this,r);},Kt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Jt(this,t);},Kt.prototype.wasAltered=function(){return this._map.wasAltered();},Kt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t);}).__iterator(e,t);},Kt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t);}).__iterate(e,t);},Kt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Jt(this,t,e):(this.__ownerID=e,this._map=t,this);};var Zt=Kt.prototype;function Jt(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._map=t,n.__ownerID=r,n;}function $t(e){return e._name||e.constructor.name||\"Record\";}function er(e,t){Object.defineProperty(e,t,{get:function get(){return this.get(t);},set:function set(e){ce(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(t,e);}});}function tr(e){return null==e?ur():rr(e)&&!l(e)?e:ur().withMutations(function(t){var r=a(e);Ae(r.size),r.forEach(function(e){return t.add(e);});});}function rr(e){return!(!e||!e[ir]);}Zt.delete=Zt.remove,Zt.deleteIn=Zt.removeIn=ke.removeIn,Zt.merge=ke.merge,Zt.mergeWith=ke.mergeWith,Zt.mergeIn=ke.mergeIn,Zt.mergeDeep=ke.mergeDeep,Zt.mergeDeepWith=ke.mergeDeepWith,Zt.mergeDeepIn=ke.mergeDeepIn,Zt.setIn=ke.setIn,Zt.update=ke.update,Zt.updateIn=ke.updateIn,Zt.withMutations=ke.withMutations,Zt.asMutable=ke.asMutable,Zt.asImmutable=ke.asImmutable,t(tr,me),tr.of=function(){return this(arguments);},tr.fromKeys=function(e){return this(n(e).keySeq());},tr.prototype.toString=function(){return this.__toString(\"Set {\",\"}\");},tr.prototype.has=function(e){return this._map.has(e);},tr.prototype.add=function(e){return or(this,this._map.set(e,!0));},tr.prototype.remove=function(e){return or(this,this._map.remove(e));},tr.prototype.clear=function(){return or(this,this._map.clear());},tr.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size;})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r<t.length;r++)a(t[r]).forEach(function(t){return e.add(t);});}):this.constructor(t[0]);},tr.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e);});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(e){return e.includes(r);})||e.remove(r);});});},tr.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e);});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(e){return e.includes(r);})&&e.remove(r);});});},tr.prototype.merge=function(){return this.union.apply(this,arguments);},tr.prototype.mergeWith=function(t){var r=e.call(arguments,1);return this.union.apply(this,r);},tr.prototype.sort=function(e){return cr(Lt(this,e));},tr.prototype.sortBy=function(e,t){return cr(Lt(this,t,e));},tr.prototype.wasAltered=function(){return this._map.wasAltered();},tr.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate(function(t,n){return e(n,n,r);},t);},tr.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t;}).__iterator(e,t);},tr.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this);},tr.isSet=rr;var nr,ir=\"@@__IMMUTABLE_SET__@@\",ar=tr.prototype;function or(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t);}function sr(e,t){var r=Object.create(ar);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r;}function ur(){return nr||(nr=sr(Ge()));}function cr(e){return null==e?mr():lr(e)?e:mr().withMutations(function(t){var r=a(e);Ae(r.size),r.forEach(function(e){return t.add(e);});});}function lr(e){return rr(e)&&l(e);}ar[ir]=!0,ar.delete=ar.remove,ar.mergeDeep=ar.merge,ar.mergeDeepWith=ar.mergeWith,ar.withMutations=ke.withMutations,ar.asMutable=ke.asMutable,ar.asImmutable=ke.asImmutable,ar.__empty=ur,ar.__make=sr,t(cr,tr),cr.of=function(){return this(arguments);},cr.fromKeys=function(e){return this(n(e).keySeq());},cr.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\");},cr.isOrderedSet=lr;var dr,fr=cr.prototype;function pr(e,t){var r=Object.create(fr);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r;}function mr(){return dr||(dr=pr(Ct()));}function hr(e){return null==e?Sr():gr(e)?e:Sr().unshiftAll(e);}function gr(e){return!(!e||!e[br]);}fr[m]=!0,fr.__empty=mr,fr.__make=pr,t(hr,pe),hr.of=function(){return this(arguments);},hr.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\");},hr.prototype.get=function(e,t){var r=this._head;for(e=x(this,e);r&&e--;)r=r.next;return r?r.value:t;},hr.prototype.peek=function(){return this._head&&this._head.value;},hr.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,r=arguments.length-1;r>=0;r--)t={value:arguments[r],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):_r(e,t);},hr.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ae(e.size);var t=this.size,r=this._head;return e.reverse().forEach(function(e){t++,r={value:e,next:r};}),this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):_r(t,r);},hr.prototype.pop=function(){return this.slice(1);},hr.prototype.unshift=function(){return this.push.apply(this,arguments);},hr.prototype.unshiftAll=function(e){return this.pushAll(e);},hr.prototype.shift=function(){return this.pop.apply(this,arguments);},hr.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sr();},hr.prototype.slice=function(e,t){if(w(e,t,this.size))return this;var r=P(e,this.size);if(j(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):_r(n,i);},hr.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_r(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this);},hr.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var r=0,n=this._head;n&&!1!==e(n.value,r++,this);)n=n.next;return r;},hr.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var r=0,n=this._head;return new k(function(){if(n){var t=n.value;return n=n.next,B(e,r++,t);}return{value:void 0,done:!0};});},hr.isStack=gr;var vr,br=\"@@__IMMUTABLE_STACK__@@\",yr=hr.prototype;function _r(e,t,r,n){var i=Object.create(yr);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i;}function Sr(){return vr||(vr=_r(0));}function Or(e,t){var r=function r(_r2){e.prototype[_r2]=t[_r2];};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e;}yr[br]=!0,yr.withMutations=ke.withMutations,yr.asMutable=ke.asMutable,yr.asImmutable=ke.asImmutable,yr.wasAltered=ke.wasAltered,r.Iterator=k,Or(r,{toArray:function toArray(){Ae(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,r){e[r]=t;}),e;},toIndexedSeq:function toIndexedSeq(){return new jt(this);},toJS:function toJS(){return this.toSeq().map(function(e){return e&&\"function\"==typeof e.toJS?e.toJS():e;}).__toJS();},toJSON:function toJSON(){return this.toSeq().map(function(e){return e&&\"function\"==typeof e.toJSON?e.toJSON():e;}).__toJS();},toKeyedSeq:function toKeyedSeq(){return new Pt(this,!0);},toMap:function toMap(){return Te(this.toKeyedSeq());},toObject:function toObject(){Ae(this.size);var e={};return this.__iterate(function(t,r){e[r]=t;}),e;},toOrderedMap:function toOrderedMap(){return St(this.toKeyedSeq());},toOrderedSet:function toOrderedSet(){return cr(s(this)?this.valueSeq():this);},toSet:function toSet(){return tr(s(this)?this.valueSeq():this);},toSetSeq:function toSetSeq(){return new Et(this);},toSeq:function toSeq(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq();},toStack:function toStack(){return hr(s(this)?this.valueSeq():this);},toList:function toList(){return it(s(this)?this.valueSeq():this);},toString:function toString(){return\"[Iterable]\";},__toString:function __toString(e,t){return 0===this.size?e+t:e+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+t;},concat:function concat(){var t=e.call(arguments,0);return zt(this,Vt(this,t));},includes:function includes(e){return this.some(function(t){return oe(t,e);});},entries:function entries(){return this.__iterator(2);},every:function every(e,t){Ae(this.size);var r=!0;return this.__iterate(function(n,i,a){if(!e.call(t,n,i,a))return r=!1,!1;}),r;},filter:function filter(e,t){return zt(this,Mt(this,e,t,!0));},find:function find(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r;},forEach:function forEach(e,t){return Ae(this.size),this.__iterate(t?e.bind(t):e);},join:function join(e){Ae(this.size),e=void 0!==e?\"\"+e:\",\";var t=\"\",r=!0;return this.__iterate(function(n){r?r=!1:t+=e,t+=null!=n?n.toString():\"\";}),t;},keys:function keys(){return this.__iterator(0);},map:function map(e,t){return zt(this,Dt(this,e,t));},reduce:function reduce(e,t,r){var n,i;return Ae(this.size),arguments.length<2?i=!0:n=t,this.__iterate(function(t,a,o){i?(i=!1,n=t):n=e.call(r,n,t,a,o);}),n;},reduceRight:function reduceRight(e,t,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments);},reverse:function reverse(){return zt(this,It(this,!0));},slice:function slice(e,t){return zt(this,kt(this,e,t,!0));},some:function some(e,t){return!this.every(jr(e),t);},sort:function sort(e){return zt(this,Lt(this,e));},values:function values(){return this.__iterator(1);},butLast:function butLast(){return this.slice(0,-1);},isEmpty:function isEmpty(){return void 0!==this.size?0===this.size:!this.some(function(){return!0;});},count:function count(e,t){return O(e?this.toSeq().filter(e,t):this);},countBy:function countBy(e,t){return function(e,t,r){var n=Te().asMutable();return e.__iterate(function(i,a){n.update(t.call(r,i,a,e),0,function(e){return e+1;});}),n.asImmutable();}(this,e,t);},equals:function equals(e){return se(this,e);},entrySeq:function entrySeq(){var e=this;if(e._cache)return new W(e._cache);var t=e.toSeq().map(Pr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq();},t;},filterNot:function filterNot(e,t){return this.filter(jr(e),t);},findEntry:function findEntry(e,t,r){var n=r;return this.__iterate(function(r,i,a){if(e.call(t,r,i,a))return n=[i,r],!1;}),n;},findKey:function findKey(e,t){var r=this.findEntry(e,t);return r&&r[0];},findLast:function findLast(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r);},findLastEntry:function findLastEntry(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r);},findLastKey:function findLastKey(e,t){return this.toKeyedSeq().reverse().findKey(e,t);},first:function first(){return this.find(C);},flatMap:function flatMap(e,t){return zt(this,function(e,t,r){var n=qt(e);return e.toSeq().map(function(i,a){return n(t.call(r,i,a,e));}).flatten(!0);}(this,e,t));},flatten:function flatten(e){return zt(this,Rt(this,e,!0));},fromEntrySeq:function fromEntrySeq(){return new At(this);},get:function get(e,t){return this.find(function(t,r){return oe(r,e);},void 0,t);},getIn:function getIn(e,t){for(var r,n=this,i=Xt(e);!(r=i.next()).done;){var a=r.value;if((n=n&&n.get?n.get(a,h):h)===h)return t;}return n;},groupBy:function groupBy(e,t){return function(e,t,r){var n=s(e),i=(l(e)?St():Te()).asMutable();e.__iterate(function(a,o){i.update(t.call(r,a,o,e),function(e){return(e=e||[]).push(n?[o,a]:a),e;});});var a=qt(e);return i.map(function(t){return zt(e,a(t));});}(this,e,t);},has:function has(e){return this.get(e,h)!==h;},hasIn:function hasIn(e){return this.getIn(e,h)!==h;},isSubset:function isSubset(e){return e=\"function\"==typeof e.includes?e:r(e),this.every(function(t){return e.includes(t);});},isSuperset:function isSuperset(e){return(e=\"function\"==typeof e.isSubset?e:r(e)).isSubset(this);},keyOf:function keyOf(e){return this.findKey(function(t){return oe(t,e);});},keySeq:function keySeq(){return this.toSeq().map(wr).toIndexedSeq();},last:function last(){return this.toSeq().reverse().first();},lastKeyOf:function lastKeyOf(e){return this.toKeyedSeq().reverse().keyOf(e);},max:function max(e){return Nt(this,e);},maxBy:function maxBy(e,t){return Nt(this,t,e);},min:function min(e){return Nt(this,e?Er(e):Dr);},minBy:function minBy(e,t){return Nt(this,t?Er(t):Dr,e);},rest:function rest(){return this.slice(1);},skip:function skip(e){return this.slice(Math.max(0,e));},skipLast:function skipLast(e){return zt(this,this.toSeq().reverse().skip(e).reverse());},skipWhile:function skipWhile(e,t){return zt(this,Bt(this,e,t,!0));},skipUntil:function skipUntil(e,t){return this.skipWhile(jr(e),t);},sortBy:function sortBy(e,t){return zt(this,Lt(this,t,e));},take:function take(e){return this.slice(0,Math.max(0,e));},takeLast:function takeLast(e){return zt(this,this.toSeq().reverse().take(e).reverse());},takeWhile:function takeWhile(e,t){return zt(this,function(e,t,r){var n=Wt(e);return n.__iterateUncached=function(n,i){var a=this;if(i)return this.cacheResult().__iterate(n,i);var o=0;return e.__iterate(function(e,i,s){return t.call(r,e,i,s)&&++o&&n(e,i,a);}),o;},n.__iteratorUncached=function(n,i){var a=this;if(i)return this.cacheResult().__iterator(n,i);var o=e.__iterator(2,i),s=!0;return new k(function(){if(!s)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(r,c,u,a)?2===n?e:B(n,u,c,e):(s=!1,{value:void 0,done:!0});});},n;}(this,e,t));},takeUntil:function takeUntil(e,t){return this.takeWhile(jr(e),t);},valueSeq:function valueSeq(){return this.toIndexedSeq();},hashCode:function hashCode(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),r=s(e),n=t?1:0;return function(e,t){return t=he(t,3432918353),t=he(t<<15|t>>>-15,461845907),t=he(t<<13|t>>>-13,5),t=he((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ge((t=he(t^t>>>13,3266489909))^t>>>16);}(e.__iterate(r?t?function(e,t){n=31*n+Ir(ve(e),ve(t))|0;}:function(e,t){n=n+Ir(ve(e),ve(t))|0;}:t?function(e){n=31*n+ve(e)|0;}:function(e){n=n+ve(e)|0;}),n);}(this));}});var xr=r.prototype;xr[d]=!0,xr[M]=xr.values,xr.__toJS=xr.toArray,xr.__toStringMapper=Ar,xr.inspect=xr.toSource=function(){return this.toString();},xr.chain=xr.flatMap,xr.contains=xr.includes,Or(n,{flip:function flip(){return zt(this,Tt(this));},mapEntries:function mapEntries(e,t){var r=this,n=0;return zt(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],n++,r);}).fromEntrySeq());},mapKeys:function mapKeys(e,t){var r=this;return zt(this,this.toSeq().flip().map(function(n,i){return e.call(t,n,i,r);}).flip());}});var Cr=n.prototype;function wr(e,t){return t;}function Pr(e,t){return[t,e];}function jr(e){return function(){return!e.apply(this,arguments);};}function Er(e){return function(){return-e.apply(this,arguments);};}function Ar(e){return\"string\"==typeof e?JSON.stringify(e):String(e);}function Tr(){return S(arguments);}function Dr(e,t){return e<t?1:e>t?-1:0;}function Ir(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0;}return Cr[f]=!0,Cr[M]=xr.entries,Cr.__toJS=xr.toObject,Cr.__toStringMapper=function(e,t){return JSON.stringify(t)+\": \"+Ar(e);},Or(i,{toKeyedSeq:function toKeyedSeq(){return new Pt(this,!1);},filter:function filter(e,t){return zt(this,Mt(this,e,t,!1));},findIndex:function findIndex(e,t){var r=this.findEntry(e,t);return r?r[0]:-1;},indexOf:function indexOf(e){var t=this.keyOf(e);return void 0===t?-1:t;},lastIndexOf:function lastIndexOf(e){var t=this.lastKeyOf(e);return void 0===t?-1:t;},reverse:function reverse(){return zt(this,It(this,!1));},slice:function slice(e,t){return zt(this,kt(this,e,t,!1));},splice:function splice(e,t){var r=arguments.length;if(t=Math.max(0|t,0),0===r||2===r&&!t)return this;e=P(e,e<0?this.count():this.size);var n=this.slice(0,e);return zt(this,1===r?n:n.concat(S(arguments,2),this.slice(e+t)));},findLastIndex:function findLastIndex(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1;},first:function first(){return this.get(0);},flatten:function flatten(e){return zt(this,Rt(this,e,!1));},get:function get(e,t){return(e=x(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,r){return r===e;},void 0,t);},has:function has(e){return(e=x(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e));},interpose:function interpose(e){return zt(this,function(e,t){var r=Wt(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var i=this,a=0;return e.__iterate(function(e,n){return(!a||!1!==r(t,a++,i))&&!1!==r(e,a++,i);},n),a;},r.__iteratorUncached=function(r,n){var i,a=e.__iterator(1,n),o=0;return new k(function(){return(!i||o%2)&&(i=a.next()).done?i:o%2?B(r,o++,t):B(r,o++,i.value,i);});},r;}(this,e));},interleave:function interleave(){var e=[this].concat(S(arguments)),t=Ut(this.toSeq(),G.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),zt(this,r);},keySeq:function keySeq(){return le(0,this.size);},last:function last(){return this.get(-1);},skipWhile:function skipWhile(e,t){return zt(this,Bt(this,e,t,!1));},zip:function zip(){var e=[this].concat(S(arguments));return zt(this,Ut(this,Tr,e));},zipWith:function zipWith(e){var t=S(arguments);return t[0]=this,zt(this,Ut(this,e,t));}}),i.prototype[p]=!0,i.prototype[m]=!0,Or(a,{get:function get(e,t){return this.has(e)?e:t;},includes:function includes(e){return this.has(e);},keySeq:function keySeq(){return this.valueSeq();}}),a.prototype.has=xr.includes,a.prototype.contains=a.prototype.includes,Or(H,n.prototype),Or(G,i.prototype),Or(q,a.prototype),Or(fe,n.prototype),Or(pe,i.prototype),Or(me,a.prototype),{Iterable:r,Seq:z,Collection:de,Map:Te,OrderedMap:St,List:it,Stack:hr,Set:tr,OrderedSet:cr,Record:Kt,Range:le,Repeat:ue,is:oe,fromJS:ne};}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(229),i=new(r(225).a)(n.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return b;});var n=r(0),i=r(2),a=r(54),o=r(4),s=r(60),u=r(115),c=r(89),l=r(16),d=r(23),f=r(45),p=r(130),m=r(131),h=r(1),g=r(6),v=r(77);function b(e,t,r,b){var y,_,S,O,x=0,C=new s.a(),w=Object(u.c)(),P=[],j=a.c.create(),E=new Map(),A=c.a.createEmpty();function T(e,t,r){var n=r.visible,i=r.alphaFactor,a=r.pickable,o=r.overpaint,s=r.transparency,u=r.clipping,c=r.transform,l=r.unitTransforms;void 0!==n&&e.setVisibility(n),void 0!==i&&e.setAlphaFactor(i),void 0!==a&&e.setPickable(a),void 0!==o&&e.setOverpaint(o),void 0!==s&&e.setTransparency(s),void 0!==u&&e.setClipping(u),void 0!==c&&e.setTransform(c),void 0!==l&&(l?e.setTransform(void 0,l.getSymmetryGroupTransforms(t)):e.setTransform(void 0,null));}return{label:e,get groupCount(){var e=0;return E.forEach(function(t){var r=t.visual;r.renderObject&&(e+=r.groupCount);}),e;},get props(){return O;},get params(){return S;},get state(){return j;},get theme(){return A;},renderObjects:P,updated:C,createOrUpdate:function createOrUpdate(e,a){var s=this;return void 0===e&&(e={}),a&&a!==y&&(S=r(t,a),O||(O=i.ParamDefinition.getDefaultValues(S))),O=Object.assign({},O,e),l.b.create(\"Creating or updating UnitsRepresentation\",function(e){return Object(n.__awaiter)(s,void 0,void 0,function(){var r,i,s,u,c,l,d,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(y||a)return[3,1];throw new Error(\"missing structure\");case 1:if(!a||y)return[3,8];_=a.unitSymmetryGroups,l=0,n.label=2;case 2:return l<_.length?(s=_[l],p=b(w),(m=p.createOrUpdate({webgl:t.webgl,runtime:e},A,O,{group:s,structure:a}))?[4,m]:[3,4]):[3,7];case 3:n.sent(),n.label=4;case 4:return T(p,s,j),E.set(s.hashCode,{visual:p,group:s}),e.shouldUpdate?[4,e.update({message:\"Creating or updating UnitsVisual\",current:l,max:_.length})]:[3,6];case 5:n.sent(),n.label=6;case 6:return l++,[3,2];case 7:return[3,34];case 8:if(!a||o.Structure.areEquivalent(a,y))return[3,19];_=a.unitSymmetryGroups,r=E,E=new Map(),l=0,n.label=9;case 9:return l<_.length?(s=_[l],(u=r.get(s.hashCode))?(p=u.visual,(m=p.createOrUpdate({webgl:t.webgl,runtime:e},A,O,{group:s,structure:a}))?[4,m]:[3,11]):[3,12]):[3,18];case 10:n.sent(),n.label=11;case 11:return E.set(s.hashCode,{visual:p,group:s}),r.delete(s.hashCode),p.renderObject&&(i=p.renderObject.values.tMarker.ref.value.array,Object(f.c)(i,g.Interval.ofBounds(0,i.length),f.a.RemoveHighlight)),[3,15];case 12:return p=b(w),(m=p.createOrUpdate({webgl:t.webgl,runtime:e},A,O,{group:s,structure:a}))?[4,m]:[3,14];case 13:n.sent(),n.label=14;case 14:T(p,s,j),E.set(s.hashCode,{visual:p,group:s}),n.label=15;case 15:return e.shouldUpdate?[4,e.update({message:\"Creating or updating UnitsVisual\",current:l,max:_.length})]:[3,17];case 16:n.sent(),n.label=17;case 17:return l++,[3,9];case 18:return r.forEach(function(e){e.visual.destroy();}),[3,34];case 19:if(!a||a===y||!o.Structure.areEquivalent(a,y))return[3,28];_=a.unitSymmetryGroups,l=0,n.label=20;case 20:return l<_.length?(s=_[l],(u=E.get(s.hashCode))?(m=u.visual.createOrUpdate({webgl:t.webgl,runtime:e},A,O,{group:s,structure:a}))?[4,m]:[3,22]:[3,23]):[3,27];case 21:n.sent(),n.label=22;case 22:return u.group=s,[3,24];case 23:throw new Error(\"expected to find visual for hashCode \"+s.hashCode);case 24:return e.shouldUpdate?[4,e.update({message:\"Creating or updating UnitsVisual\",current:l,max:_.length})]:[3,26];case 25:n.sent(),n.label=26;case 26:return l++,[3,20];case 27:return[3,34];case 28:c=[],E.forEach(function(e){var t=e.visual,r=e.group;return c.push([t,r]);}),l=0,d=c.length,n.label=29;case 29:return l<d?(p=c[l][0],(m=p.createOrUpdate({webgl:t.webgl,runtime:e},A,O))?[4,m]:[3,31]):[3,34];case 30:n.sent(),n.label=31;case 31:return e.shouldUpdate?[4,e.update({message:\"Creating or updating UnitsVisual\",current:l,max:d})]:[3,33];case 32:n.sent(),n.label=33;case 33:return++l,[3,29];case 34:return P.length=0,E.forEach(function(e){var t=e.visual;t.renderObject&&P.push(t.renderObject);}),a&&(y=a),C.next(x++),[2];}});});});},setState:function setState(e){var t=e.visible,r=e.alphaFactor,n=e.pickable,i=e.overpaint,o=e.transparency,s=e.clipping,u=e.transform,c=e.unitTransforms,l=e.syncManually,d=e.markerActions,f={};t!==j.visible&&(f.visible=t),r!==j.alphaFactor&&(f.alphaFactor=r),n!==j.pickable&&(f.pickable=n),void 0===i||p.a.areEqual(i,j.overpaint)||y&&(f.overpaint=p.a.remap(i,y)),void 0===o||m.a.areEqual(o,j.transparency)||y&&(f.transparency=m.a.remap(o,y)),void 0===s||v.a.areEqual(s,j.clipping)||y&&(f.clipping=v.a.remap(s,y)),void 0===u||h.Mat4.areEqual(u,j.transform,h.EPSILON)||(f.transform=u),c===j.unitTransforms&&(null==c?void 0:c.version)===e.unitTransformsVersion||(f.unitTransforms=c,j.unitTransformsVersion=c?null==c?void 0:c.version:-1),l!==j.syncManually&&(f.syncManually=l),d!==j.markerActions&&(f.markerActions=d),E.forEach(function(e){return T(e.visual,e.group,f);}),a.c.update(j,f);},setTheme:function setTheme(e){A=e;},getLoci:function getLoci(e){if(void 0===e)return o.Structure.Loci(y);var t=d.EmptyLoci;return E.forEach(function(r){var n=r.visual.getLoci(e);Object(d.isEmptyLoci)(n)||(t=n);}),t;},mark:function mark(e,t){if(!y)return!1;if(!f.b.is(j.markerActions,t))return!1;if(o.Structure.isLoci(e)||o.StructureElement.Loci.is(e)||o.Bond.isLoci(e)){if(!o.Structure.areRootsEquivalent(e.structure,y))return!1;e=d.Loci.remap(e,y);}else if(!Object(d.isEveryLoci)(e)&&!Object(d.isDataLoci)(e))return!1;if(d.Loci.isEmpty(e))return!1;var r=!1;return E.forEach(function(n){var i=n.visual;r=i.mark(e,t)||r;}),r;},destroy:function destroy(){E.forEach(function(e){return e.visual.destroy();}),E.clear();}};}},function(e,t,r){\"use strict\";var n=r(82),i=r(136),a=r(46);function o(){return o.zero();}!function(e){function t(){var e=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return e[0]=0,e;}function r(){var e=t();return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;}function s(e){for(var t=0;t<16;t++)e[t]=0;return e;}e.zero=t,e.identity=r,e.setIdentity=o,e.setZero=s,e.ofRows=function(e){for(var r=t(),n=0;n<4;n++)for(var i=e[n],a=0;a<4;a++)r[4*a+n]=i[a];return r;};var u=r();function c(e,t,r){for(var n=0;n<16;n++)if(Math.abs(e[n]-t[n])>r)return!1;return!0;}function l(e,t,r,n){e[4*r+t]=n;}function d(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],v=t[14],b=t[15],y=r[0],_=r[1],S=r[2],O=r[3];return e[0]=y*n+_*s+S*d+O*h,e[1]=y*i+_*u+S*f+O*g,e[2]=y*a+_*c+S*p+O*v,e[3]=y*o+_*l+S*m+O*b,y=r[4],_=r[5],S=r[6],O=r[7],e[4]=y*n+_*s+S*d+O*h,e[5]=y*i+_*u+S*f+O*g,e[6]=y*a+_*c+S*p+O*v,e[7]=y*o+_*l+S*m+O*b,y=r[8],_=r[9],S=r[10],O=r[11],e[8]=y*n+_*s+S*d+O*h,e[9]=y*i+_*u+S*f+O*g,e[10]=y*a+_*c+S*p+O*v,e[11]=y*o+_*l+S*m+O*b,y=r[12],_=r[13],S=r[14],O=r[15],e[12]=y*n+_*s+S*d+O*h,e[13]=y*i+_*u+S*f+O*g,e[14]=y*a+_*c+S*p+O*v,e[15]=y*o+_*l+S*m+O*b,e;}e.isIdentity=function(e,t){return c(e,u,void 0===t?n.a:t);},e.hasNaN=function(e){for(var t=0;t<16;t++)if(isNaN(e[t]))return!0;return!1;},e.areEqual=c,e.setValue=l,e.getValue=function(e,t,r){return e[4*r+t];},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3],t[r+4]=e[4],t[r+5]=e[5],t[r+6]=e[6],t[r+7]=e[7],t[r+8]=e[8],t[r+9]=e[9],t[r+10]=e[10],t[r+11]=e[11],t[r+12]=e[12],t[r+13]=e[13],t[r+14]=e[14],t[r+15]=e[15],t;},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],e[4]=t[r+4],e[5]=t[r+5],e[6]=t[r+6],e[7]=t[r+7],e[8]=t[r+8],e[9]=t[r+9],e[10]=t[r+10],e[11]=t[r+11],e[12]=t[r+12],e[13]=t[r+13],e[14]=t[r+14],e[15]=t[r+15],e;},e.fromBasis=function(t,r,n,i){return e.setZero(t),e.setValue(t,0,0,r[0]),e.setValue(t,1,0,r[1]),e.setValue(t,2,0,r[2]),e.setValue(t,0,1,n[0]),e.setValue(t,1,1,n[1]),e.setValue(t,2,1,n[2]),e.setValue(t,0,2,i[0]),e.setValue(t,1,2,i[1]),e.setValue(t,2,2,i[2]),e.setValue(t,3,3,1),t;},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e;},e.clone=function(t){return e.copy(e.zero(),t);},e.getTranslation=function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e;},e.getScaling=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[4],o=t[5],s=t[6],u=t[8],c=t[9],l=t[10];return e[0]=Math.sqrt(r*r+n*n+i*i),e[1]=Math.sqrt(a*a+o*o+s*s),e[2]=Math.sqrt(u*u+c*c+l*l),e;},e.getRotation=function(e,t){var r=t[0]+t[5]+t[10],n=0;return r>0?(n=2*Math.sqrt(r+1),e[3]=.25*n,e[0]=(t[6]-t[9])/n,e[1]=(t[8]-t[2])/n,e[2]=(t[1]-t[4])/n):t[0]>t[5]&&t[0]>t[10]?(n=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/n,e[0]=.25*n,e[1]=(t[1]+t[4])/n,e[2]=(t[8]+t[2])/n):t[5]>t[10]?(n=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/n,e[0]=(t[1]+t[4])/n,e[1]=.25*n,e[2]=(t[6]+t[9])/n):(n=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/n,e[0]=(t[8]+t[2])/n,e[1]=(t[6]+t[9])/n,e[2]=.25*n),e;},e.extractRotation=function(e,t){var r=1/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),n=1/Math.sqrt(t[4]*t[4]+t[5]*t[5]+t[6]*t[6]),i=1/Math.sqrt(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]);return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=0,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=0,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;},e.transpose=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s;}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e;},e.invert=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14],v=t[15],b=r*s-n*o,y=r*u-i*o,_=r*c-a*o,S=n*u-i*s,O=n*c-a*s,x=i*c-a*u,C=l*h-d*m,w=l*g-f*m,P=l*v-p*m,j=d*g-f*h,E=d*v-p*h,A=f*v-p*g,T=b*A-y*E+_*j+S*P-O*w+x*C;return T?(T=1/T,e[0]=(s*A-u*E+c*j)*T,e[1]=(i*E-n*A-a*j)*T,e[2]=(h*x-g*O+v*S)*T,e[3]=(f*O-d*x-p*S)*T,e[4]=(u*P-o*A-c*w)*T,e[5]=(r*A-i*P+a*w)*T,e[6]=(g*_-m*x-v*y)*T,e[7]=(l*x-f*_+p*y)*T,e[8]=(o*E-s*P+c*C)*T,e[9]=(n*P-r*E-a*C)*T,e[10]=(m*O-h*_+v*b)*T,e[11]=(d*_-l*O-p*b)*T,e[12]=(s*w-o*j-u*C)*T,e[13]=(r*j-n*w+i*C)*T,e[14]=(h*y-m*S-g*b)*T,e[15]=(l*S-d*y+f*b)*T,e):(console.warn(\"non-invertible matrix.\",t),e);},e.mul=d,e.mulOffset=function(e,t,r,n,i,a){var o=t[0+i],s=t[1+i],u=t[2+i],c=t[3+i],l=t[4+i],d=t[5+i],f=t[6+i],p=t[7+i],m=t[8+i],h=t[9+i],g=t[10+i],v=t[11+i],b=t[12+i],y=t[13+i],_=t[14+i],S=t[15+i],O=r[0+a],x=r[1+a],C=r[2+a],w=r[3+a];return e[0+n]=O*o+x*l+C*m+w*b,e[1+n]=O*s+x*d+C*h+w*y,e[2+n]=O*u+x*f+C*g+w*_,e[3+n]=O*c+x*p+C*v+w*S,O=r[4+a],x=r[5+a],C=r[6+a],w=r[7+a],e[4+n]=O*o+x*l+C*m+w*b,e[5+n]=O*s+x*d+C*h+w*y,e[6+n]=O*u+x*f+C*g+w*_,e[7+n]=O*c+x*p+C*v+w*S,O=r[8+a],x=r[9+a],C=r[10+a],w=r[11+a],e[8+n]=O*o+x*l+C*m+w*b,e[9+n]=O*s+x*d+C*h+w*y,e[10+n]=O*u+x*f+C*g+w*_,e[11+n]=O*c+x*p+C*v+w*S,O=r[12+a],x=r[13+a],C=r[14+a],w=r[15+a],e[12+n]=O*o+x*l+C*m+w*b,e[13+n]=O*s+x*d+C*h+w*y,e[14+n]=O*u+x*f+C*g+w*_,e[15+n]=O*c+x*p+C*v+w*S,e;},e.mul3=function(e,t,r,n){return d(e,d(e,t,r),n);},e.translate=function(e,t,r){var n,i,a,o,s,u,c,l,d,f,p,m,h=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*h+t[4]*g+t[8]*v+t[12],e[13]=t[1]*h+t[5]*g+t[9]*v+t[13],e[14]=t[2]*h+t[6]*g+t[10]*v+t[14],e[15]=t[3]*h+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=t[9],p=t[10],m=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=c,e[7]=l,e[8]=d,e[9]=f,e[10]=p,e[11]=m,e[12]=n*h+s*g+d*v+t[12],e[13]=i*h+u*g+f*v+t[13],e[14]=a*h+c*g+p*v+t[14],e[15]=o*h+l*g+m*v+t[15]),e;},e.fromTranslation=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e;},e.setTranslation=function(e,t){return e[12]=t[0],e[13]=t[1],e[14]=t[2],e;},e.setAxes=function(e,t,r,n){return e[0]=r[0],e[4]=r[1],e[8]=r[2],e[1]=n[0],e[5]=n[1],e[9]=n[2],e[2]=t[0],e[6]=t[1],e[10]=t[2],e;},e.rotate=function(t,r,i,a){var o,s,u,c,l,d,f,p,m,h,g,v,b,y,_,S,O,x,C,w,P,j,E,A,T=a[0],D=a[1],I=a[2],M=Math.sqrt(T*T+D*D+I*I);return Math.abs(M)<n.a?e.identity():(T*=M=1/M,D*=M,I*=M,o=Math.sin(i),u=1-(s=Math.cos(i)),c=r[0],l=r[1],d=r[2],f=r[3],p=r[4],m=r[5],h=r[6],g=r[7],v=r[8],b=r[9],y=r[10],_=r[11],S=T*T*u+s,O=D*T*u+I*o,x=I*T*u-D*o,C=T*D*u-I*o,w=D*D*u+s,P=I*D*u+T*o,j=T*I*u+D*o,E=D*I*u-T*o,A=I*I*u+s,t[0]=c*S+p*O+v*x,t[1]=l*S+m*O+b*x,t[2]=d*S+h*O+y*x,t[3]=f*S+g*O+_*x,t[4]=c*C+p*w+v*P,t[5]=l*C+m*w+b*P,t[6]=d*C+h*w+y*P,t[7]=f*C+g*w+_*P,t[8]=c*j+p*E+v*A,t[9]=l*j+m*E+b*A,t[10]=d*j+h*E+y*A,t[11]=f*j+g*E+_*A,r!==t&&(t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15]),t);},e.fromRotation=function(e,t,r){var i,a,s,u=r[0],c=r[1],l=r[2],d=Math.sqrt(u*u+c*c+l*l);return Math.abs(d)<n.a?o(e):(u*=d=1/d,c*=d,l*=d,i=Math.sin(t),s=1-(a=Math.cos(t)),e[0]=u*u*s+a,e[1]=c*u*s+l*i,e[2]=l*u*s-c*i,e[3]=0,e[4]=u*c*s-l*i,e[5]=c*c*s+a,e[6]=l*c*s+u*i,e[7]=0,e[8]=u*l*s+c*i,e[9]=c*l*s-u*i,e[10]=l*l*s+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e);},e.scale=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e;},e.scaleUniformly=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e;},e.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;},e.fromUniformScaling=function(e,t){return e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;},e.fromMat3=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[4]=t[3],e[5]=t[4],e[6]=t[5],e[8]=t[6],e[9]=t[7],e[10]=t[8],e;},e.makeTable=function(e){for(var t=\"\",r=0;r<4;r++){for(var n=0;n<4;n++)t+=e[4*n+r].toString(),n<3&&(t+=\" \");r<3&&(t+=\"\\n\");}return t;},e.determinant=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8],l=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15];return(t*o-r*a)*(d*g-f*h)-(t*s-n*a)*(l*g-f*m)+(t*u-i*a)*(l*h-d*m)+(r*s-n*o)*(c*g-f*p)-(r*u-i*o)*(c*h-d*p)+(n*u-i*s)*(c*m-l*p);},e.isRotationAndTranslation=function(e,t){return function(e,t){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],d=e[8],f=e[9],p=e[10],m=e[11],h=e[15];if(!(Object(n.b)(h,1,t)&&Object(n.b)(o,0,t)&&Object(n.b)(l,0,t)&&Object(n.b)(m,0,t)))return!1;var g=Math.abs(r*(u*p-c*f)-i*(s*p-c*d)+a*(s*f-u*d));if(!Object(n.b)(g,1,t))return!1;return!0;}(e,void 0!==t?t:n.a);},e.isTranslationAndUniformScaling=function(e,t){return function(e,t){var r=e[0];return Object(n.b)(e[1],0,t)&&Object(n.b)(e[2],0,t)&&Object(n.b)(e[3],0,t)&&Object(n.b)(e[4],0,t)&&Object(n.b)(e[5],r,t)&&Object(n.b)(e[6],0,t)&&Object(n.b)(e[7],0,t)&&Object(n.b)(e[8],0,t)&&Object(n.b)(e[9],0,t)&&Object(n.b)(e[10],r,t)&&Object(n.b)(e[11],0,t)&&Object(n.b)(e[15],1,t);}(e,void 0!==t?t:n.a);},e.fromQuat=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,l=n*o,d=n*s,f=i*o,p=i*s,m=i*u,h=a*o,g=a*s,v=a*u;return e[0]=1-d-m,e[1]=l+v,e[2]=f-g,e[3]=0,e[4]=l-v,e[5]=1-c-m,e[6]=p+h,e[7]=0,e[8]=f+g,e[9]=p-h,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e;},e.perspective=function(e,t,r,n,i,a,o){var s=2*a/(r-t),u=2*a/(n-i),c=(r+t)/(r-t),l=(n+i)/(n-i),d=-(o+a)/(o-a),f=-2*o*a/(o-a);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=c,e[9]=l,e[10]=d,e[11]=-1,e[12]=0,e[13]=0,e[14]=f,e[15]=0,e;},e.ortho=function(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(n-i),c=1/(o-a),l=(r+t)*s,d=(n+i)*u,f=(o+a)*c;return e[0]=2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=-2*c,e[11]=0,e[12]=-l,e[13]=-d,e[14]=-f,e[15]=1,e;},e.lookAt=function(e,t,r,i){var a,s,u,c,l,d,f,p,m,h,g=t[0],v=t[1],b=t[2],y=i[0],_=i[1],S=i[2],O=r[0],x=r[1],C=r[2];return Math.abs(g-O)<n.a&&Math.abs(v-x)<n.a&&Math.abs(b-C)<n.a?o(e):(f=g-O,p=v-x,m=b-C,a=_*(m*=h=1/Math.sqrt(f*f+p*p+m*m))-S*(p*=h),s=S*(f*=h)-y*m,u=y*p-_*f,(h=Math.sqrt(a*a+s*s+u*u))?(a*=h=1/h,s*=h,u*=h):(a=0,s=0,u=0),c=p*u-m*s,l=m*a-f*u,d=f*s-p*a,(h=Math.sqrt(c*c+l*l+d*d))?(c*=h=1/h,l*=h,d*=h):(c=0,l=0,d=0),e[0]=a,e[1]=c,e[2]=f,e[3]=0,e[4]=s,e[5]=l,e[6]=p,e[7]=0,e[8]=u,e[9]=d,e[10]=m,e[11]=0,e[12]=-(a*g+s*v+u*b),e[13]=-(c*g+l*v+d*b),e[14]=-(f*g+p*v+m*b),e[15]=1,e);},e.targetTo=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],c=n[2],l=i-r[0],d=a-r[1],f=o-r[2],p=l*l+d*d+f*f;p>0&&(l*=p=1/Math.sqrt(p),d*=p,f*=p);var m=u*f-c*d,h=c*l-s*f,g=s*d-u*l;return(p=m*m+h*h+g*g)>0&&(m*=p=1/Math.sqrt(p),h*=p,g*=p),e[0]=m,e[1]=h,e[2]=g,e[3]=0,e[4]=d*g-f*h,e[5]=f*m-l*g,e[6]=l*h-d*m,e[7]=0,e[8]=l,e[9]=d,e[10]=f,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e;},e.fromPermutation=function(e,t){s(e);for(var r=0;r<4;r++){l(e,r,t[r],1);}return e;},e.getMaxScaleOnAxis=function(e){var t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n));};var f=i.a.create(1,0,0),p=i.a.create(0,1,0),m=i.a.create(0,0,1);e.rotX90=e.fromRotation(e(),Object(a.c)(90),f),e.rotX180=e.fromRotation(e(),Object(a.c)(180),f),e.rotY90=e.fromRotation(e(),Object(a.c)(90),p),e.rotY180=e.fromRotation(e(),Object(a.c)(180),p),e.rotY270=e.fromRotation(e(),Object(a.c)(270),p),e.rotZ90=e.fromRotation(e(),Object(a.c)(90),m),e.rotZ180=e.fromRotation(e(),Object(a.c)(180),m),e.rotXY90=e.mul(e(),e.rotX90,e.rotY90),e.rotZY90=e.mul(e(),e.rotZ90,e.rotY90),e.rotZYZ90=e.mul(e(),e.rotZY90,e.rotZ90),e.rotZ90X180=e.mul(e(),e.rotZ90,e.rotX180),e.rotY90Z180=e.mul(e(),e.rotY90,e.rotZ180),e.id=e.identity();}(o||(o={})),t.a=o;},function(e,t,r){\"use strict\";var n;!function(e){e.create=function(e){return void 0===e&&(e=512),{current:[],offset:0,capacity:e,chunks:[]};},e.getString=function(e){return e.chunks.length?(e.offset>0&&(e.chunks[e.chunks.length]=e.current.length===e.offset?e.current.join(\"\"):e.current.slice(0,e.offset).join(\"\")),e.chunks.join(\"\")):e.current.length===e.offset?e.current.join(\"\"):e.current.splice(0,e.offset).join(\"\");},e.getSize=function(e){for(var t=0,r=0,n=e.chunks;r<n.length;r++){t+=n[r].length;}for(var i=0;i<e.offset;i++)t+=e.current[i].length;return t;},e.getChunks=function(e){return e.offset>0&&(e.current.length===e.offset?e.chunks[e.chunks.length]=e.current.join(\"\"):e.chunks[e.chunks.length]=e.current.slice(0,e.offset).join(\"\"),e.offset=0),e.chunks;};var t=[];function r(e,r){r>0&&n(e,t[r]);}function n(e,t){e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(\"\"),e.offset=0),e.current[e.offset++]=t;}!function(){for(var e=\"\",r=0;r<512;r++)t[r]=e,e+=\" \";}(),e.newline=function(e){n(e,\"\\n\");},e.whitespace=r,e.whitespace1=function(e){n(e,\" \");},e.write=function(e,t){t&&(e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(\"\"),e.offset=0),e.current[e.offset++]=t);},e.writeSafe=n,e.writePadLeft=function(e,t,i){t?(r(e,i-t.length),n(e,t)):r(e,i);},e.writePadRight=function(e,t,i){if(t){var a=i-t.length;n(e,t),r(e,a);}else r(e,i);},e.writeInteger=function(e,t){n(e,\"\"+t);},e.writeIntegerAndSpace=function(e,t){n(e,t+\" \");},e.writeIntegerPadLeft=function(e,t,i){var a=\"\"+t;r(e,i-a.length),n(e,a);},e.writeIntegerPadRight=function(e,t,i){var a=\"\"+t,o=i-a.length;n(e,a),r(e,o);},e.writeFloat=function(e,t,r){n(e,\"\"+Math.round(r*t)/r);},e.writeFloatPadLeft=function(e,t,i,a){var o=\"\"+Math.round(i*t)/i;r(e,a-o.length),n(e,o);},e.writeFloatPadRight=function(e,t,i,a){var o=\"\"+Math.round(i*t)/i,s=a-o.length;n(e,o),r(e,s);};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});var n,i,a=r(9),o=r(250),s=r(259),u=function(){function e(e){this.providers=e;}return e.prototype.and=function(t){return new e(this.providers.concat([t]));},e.prototype.encode=function(e){for(var t=[],r=0,n=this.providers;r<n.length;r++){var i=(0,n[r])(e);if(!i.encodings.length)throw new Error(\"Encodings must be non-empty.\");e=i.data;for(var a=0,o=i.encodings;a<o.length;a++){var s=o[a];t.push(s);}}if(!(e instanceof Uint8Array))throw new Error(\"The encoding must result in a Uint8Array. Fix your encoding chain.\");return{encoding:t,data:e};},e;}();!function(e){function t(e){return new u([e]);}function r(e){switch(e.kind){case\"ByteArray\":return i.byteArray;case\"FixedPoint\":return i.fixedPoint(e.factor);case\"IntervalQuantization\":return i.intervalQuantizaiton(e.min,e.max,e.numSteps);case\"RunLength\":return i.runLength;case\"Delta\":return i.delta;case\"IntegerPacking\":return i.integerPacking;case\"StringArray\":return i.stringArray;}}e.by=t,e.fromEncoding=function(e){for(var n=t(r(e[0])),i=1;i<e.length;i++)n=n.and(r(e[i]));return n;};}(n||(n={})),function(e){var t,r;e.by=function(e){return new u([e]);};var n=((t={})[2]=function(e,t,r){e.setInt16(2*t,r,!0);},t[5]=function(e,t,r){e.setUint16(2*t,r,!0);},t[3]=function(e,t,r){e.setInt32(4*t,r,!0);},t[6]=function(e,t,r){e.setUint32(4*t,r,!0);},t[32]=function(e,t,r){e.setFloat32(4*t,r,!0);},t[33]=function(e,t,r){e.setFloat64(8*t,r,!0);},t),i=((r={})[2]=2,r[5]=2,r[3]=4,r[6]=4,r[32]=4,r[33]=8,r);function c(e){var t=o.a.getDataType(e);if(1===t)return function(e){return{encodings:[{kind:\"ByteArray\",type:1}],data:new Uint8Array(e.buffer,e.byteOffset)};}(e);if(4===t)return function(e){return{encodings:[{kind:\"ByteArray\",type:4}],data:e};}(e);for(var r=new Uint8Array(e.length*i[t]),a=n[t],s=new DataView(r.buffer),u=0,c=e.length;u<c;u++)a(s,u,e[u]);return{encodings:[{kind:\"ByteArray\",type:t}],data:r};}function l(e,t){for(var r=-t-1,n=0,i=0,a=e.length;i<a;i++){var o=e[i];0===o?n+=1:o>0?(n+=Math.ceil(o/t),o%t==0&&(n+=1)):(n+=Math.ceil(o/r),o%r==0&&(n+=1));}return n;}e.byteArray=c,e.fixedPoint=function(e){return function(t){return function(e,t){for(var r=o.a.getDataType(e),n=new Int32Array(e.length),i=0,a=e.length;i<a;i++)n[i]=Math.round(e[i]*t);return{encodings:[{kind:\"FixedPoint\",factor:t,srcType:r}],data:n};}(t,e);};},e.intervalQuantizaiton=function(e,t,r,n){return void 0===n&&(n=Int32Array),function(i){return function(e,t,r,n,i){var a=o.a.getDataType(e);if(!e.length)return{encodings:[{kind:\"IntervalQuantization\",min:t,max:r,numSteps:n,srcType:a}],data:new Int32Array(0)};if(r<t){var s=t;t=r,r=s;}for(var u=(r-t)/(n-1),c=new i(e.length),l=0,d=e.length;l<d;l++){var f=e[l];c[l]=f<=t?0:f>=r?n-1:0|Math.round((f-t)/u);}return{encodings:[{kind:\"IntervalQuantization\",min:t,max:r,numSteps:n,srcType:a}],data:c};}(i,e,t,r,n);};},e.runLength=function(e){var t=o.a.getDataType(e);if(void 0===t&&(e=new Int32Array(e),t=3),!e.length)return{encodings:[{kind:\"RunLength\",srcType:t,srcSize:0}],data:new Int32Array(0)};for(var r=2,n=1,i=e.length;n<i;n++)e[n-1]!==e[n]&&(r+=2);var a=new Int32Array(r),s=0,u=1;for(n=1,i=e.length;n<i;n++)e[n-1]!==e[n]?(a[s]=e[n-1],a[s+1]=u,u=1,s+=2):++u;return a[s]=e[e.length-1],a[s+1]=u,{encodings:[{kind:\"RunLength\",srcType:t,srcSize:e.length}],data:a};},e.delta=function(e){if(!o.a.isSignedIntegerDataType(e))throw new Error(\"Only signed integer types can be encoded using delta encoding.\");var t=o.a.getDataType(e);if(void 0===t&&(e=new Int32Array(e),t=3),!e.length)return{encodings:[{kind:\"Delta\",origin:0,srcType:t}],data:new e.constructor(0)};var r=new e.constructor(e.length),n=e[0];r[0]=e[0];for(var i=1,a=e.length;i<a;i++)r[i]=e[i]-e[i-1];return r[0]=0,{encodings:[{kind:\"Delta\",origin:n,srcType:t}],data:r};},e.integerPacking=function(e){var t=function(e){var t=function(e){for(var t=0,r=e.length;t<r;t++)if(e[t]<0)return!0;return!1;}(e),r=l(e,t?127:255),n=l(e,t?32767:65535);return 4*e.length<2*n?{isSigned:t,size:e.length,bytesPerElement:4}:2*n<r?{isSigned:t,size:n,bytesPerElement:2}:{isSigned:t,size:r,bytesPerElement:1};}(e);return 4===t.bytesPerElement?c(e):function(e,t){for(var r=t.isSigned?1===t.bytesPerElement?127:32767:1===t.bytesPerElement?255:65535,n=-r-1,i=e.length,a=t.isSigned?1===t.bytesPerElement?new Int8Array(t.size):new Int16Array(t.size):1===t.bytesPerElement?new Uint8Array(t.size):new Uint16Array(t.size),o=0,s=0;s<i;s++){var u=e[s];if(u>=0)for(;u>=r;)a[o]=r,++o,u-=r;else for(;u<=n;)a[o]=n,++o,u-=n;a[o]=u,++o;}var l=c(a);return{encodings:[{kind:\"IntegerPacking\",byteCount:t.bytesPerElement,isUnsigned:!t.isSigned,srcSize:i},l.encodings[0]],data:l.data};}(e,t);},e.stringArray=function(e){var t=Object.create(null),r=[],n=new Int32Array(e.length),i=a.a.create(Int32Array,1,Math.min(1024,e.length<32?e.length+1:Math.round(e.length/8)+1));a.a.add(i,0);for(var o=0,u=0,c=0,l=e;c<l.length;c++){var d=l[c];if(null!=d){var f=t[d];void 0===f&&(o+=d.length,r[f=r.length]=d,t[d]=f,a.a.add(i,o)),n[u++]=f;}else n[u++]=-1;}var p=a.a.compact(i),m=Object(s.b)(p).encode(p),h=Object(s.b)(n).encode(n);return{encodings:[{kind:\"StringArray\",dataEncoding:h.encoding,stringData:r.join(\"\"),offsetEncoding:m.encoding,offsets:m.data}],data:h.data};};}(i||(i={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(0),i=r(2),a=r(200),o=r(204),s=r(66),u=Object(n.__assign)({},a.b),c=o.a.createProvider({label:\"Interactions\",descriptor:Object(s.CustomPropertyDescriptor)({name:\"molstar_computed_interactions\"}),type:\"local\",defaultParams:u,getParams:function getParams(e){return u;},isApplicable:function isApplicable(e){return!0;},obtain:function obtain(e,t,r){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var o,s;return Object(n.__generator)(this,function(c){switch(c.label){case 0:return o=Object(n.__assign)(Object(n.__assign)({},i.ParamDefinition.getDefaultValues(u)),r),s={},[4,Object(a.c)(e,t,o)];case 1:return[2,(s.value=c.sent(),s)];}});});}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"c\",function(){return u;}),r.d(t,\"d\",function(){return c;}),r.d(t,\"e\",function(){return l;}),r.d(t,\"f\",function(){return f;});var n={forceCompute:!1,noCompute:!1},i={H:0,h:0,D:0,d:0,T:0,t:0,He:2,HE:2,he:2,Li:3,LI:3,li:3,Be:4,BE:4,be:4,B:5,b:5,C:6,c:6,N:7,n:7,O:8,o:8,F:9,f:9,Ne:10,NE:10,ne:10,Na:11,NA:11,na:11,Mg:12,MG:12,mg:12,Al:13,AL:13,al:13,Si:14,SI:14,si:14,P:15,p:15,S:16,s:16,Cl:17,CL:17,cl:17,Ar:18,AR:18,ar:18,K:19,k:19,Ca:20,CA:20,ca:20,Sc:21,SC:21,sc:21,Ti:22,TI:22,ti:22,V:23,v:23,Cr:24,CR:24,cr:24,Mn:25,MN:25,mn:25,Fe:26,FE:26,fe:26,Co:27,CO:27,co:27,Ni:28,NI:28,ni:28,Cu:29,CU:29,cu:29,Zn:30,ZN:30,zn:30,Ga:31,GA:31,ga:31,Ge:32,GE:32,ge:32,As:33,AS:33,as:33,Se:34,SE:34,se:34,Br:35,BR:35,br:35,Kr:36,KR:36,kr:36,Rb:37,RB:37,rb:37,Sr:38,SR:38,sr:38,Y:39,y:39,Zr:40,ZR:40,zr:40,Nb:41,NB:41,nb:41,Mo:42,MO:42,mo:42,Tc:43,TC:43,tc:43,Ru:44,RU:44,ru:44,Rh:45,RH:45,rh:45,Pd:46,PD:46,pd:46,Ag:47,AG:47,ag:47,Cd:48,CD:48,cd:48,In:49,IN:49,in:49,Sn:50,SN:50,sn:50,Sb:51,SB:51,sb:51,Te:52,TE:52,te:52,I:53,i:53,Xe:54,XE:54,xe:54,Cs:55,CS:55,cs:55,Ba:56,BA:56,ba:56,La:57,LA:57,la:57,Ce:58,CE:58,ce:58,Pr:59,PR:59,pr:59,Nd:60,ND:60,nd:60,Pm:61,PM:61,pm:61,Sm:62,SM:62,sm:62,Eu:63,EU:63,eu:63,Gd:64,GD:64,gd:64,Tb:65,TB:65,tb:65,Dy:66,DY:66,dy:66,Ho:67,HO:67,ho:67,Er:68,ER:68,er:68,Tm:69,TM:69,tm:69,Yb:70,YB:70,yb:70,Lu:71,LU:71,lu:71,Hf:72,HF:72,hf:72,Ta:73,TA:73,ta:73,W:74,w:74,Re:75,RE:75,re:75,Os:76,OS:76,os:76,Ir:77,IR:77,ir:77,Pt:78,PT:78,pt:78,Au:79,AU:79,au:79,Hg:80,HG:80,hg:80,Tl:81,TL:81,tl:81,Pb:82,PB:82,pb:82,Bi:83,BI:83,bi:83,Po:84,PO:84,po:84,At:85,AT:85,at:85,Rn:86,RN:86,rn:86,Fr:87,FR:87,fr:87,Ra:88,RA:88,ra:88,Ac:89,AC:89,ac:89,Th:90,TH:90,th:90,Pa:91,PA:91,pa:91,U:92,u:92,Np:93,NP:93,np:93,Pu:94,PU:94,pu:94,Am:95,AM:95,am:95,Cm:96,CM:96,cm:96,Bk:97,BK:97,bk:97,Cf:98,CF:98,cf:98,Es:99,ES:99,es:99,Fm:100,FM:100,fm:100,Md:101,MD:101,md:101,No:102,NO:102,no:102,Lr:103,LR:103,lr:103,Rf:104,RF:104,rf:104,Db:105,DB:105,db:105,Sg:106,SG:106,sg:106,Bh:107,BH:107,bh:107,Hs:108,HS:108,hs:108,Mt:109,MT:109,mt:109},a={0:1.42,1:1.42,3:2.7,4:2.7,6:1.75,7:1.6,8:1.52,11:2.7,12:2.7,13:2.7,14:1.9,15:2,16:1.9,17:1.8,19:2.7,20:2.7,21:2.7,22:2.7,23:2.7,24:2.7,25:2.7,26:2.7,27:2.7,28:2.7,29:2.7,30:2.7,31:2.7,33:2.68,37:2.7,38:2.7,39:2.7,40:2.7,41:2.7,42:2.7,43:2.7,44:2.7,45:2.7,46:2.7,47:2.7,48:2.7,49:2.7,50:2.7,55:2.7,56:2.7,57:2.7,58:2.7,59:2.7,60:2.7,61:2.7,62:2.7,63:2.7,64:2.7,65:2.7,66:2.7,67:2.7,68:2.7,69:2.7,70:2.7,71:2.7,72:2.7,73:2.7,74:2.7,75:2.7,76:2.7,77:2.7,78:2.7,79:2.7,80:2.7,81:2.7,82:2.7,83:2.7,87:2.7,88:2.7,89:2.7,90:2.7,91:2.7,92:2.7,93:2.7,94:2.7,95:2.7,96:2.7,97:2.7,98:2.7,99:2.7,100:2.7,101:2.7,102:2.7,103:2.7,104:2.7,105:2.7,106:2.7,107:2.7,108:2.7,109:2.88},o={0:.8,20:1.31,27:1.2,35:1.15,44:1.1,54:1,60:1.84,72:1.88,84:1.75,85:1.56,86:1.76,98:1.6,99:1.68,100:1.63,112:1.6,113:1.59,114:1.36,129:1.45,135:1.47,144:1.6,152:1.45,170:1.4,180:1.55,202:2.4,222:2.24,224:1.91,225:1.98,243:2.02,269:2,293:1.9,420:2.37,480:2.3,512:2.3,544:2.3,612:2.1,629:1.54,665:1,813:2.6,854:2.27,894:1.93,896:2.1,937:2.05,938:2.06,981:1.62,1258:2.68,1309:2.33,1484:1,1763:2.14,1823:2.48,1882:2.1,1944:1.72,2380:2.34,3367:2.44,3733:2.11,3819:2.6,3821:2.36,4736:2.75,5724:2.73,5959:2.63,6519:2.84,6750:2.87,8991:2.81},s=function(){for(var e=new Set(),t=0,r=[\"LI\",\"NA\",\"K\",\"RB\",\"CS\",\"FR\",\"BE\",\"MG\",\"CA\",\"SR\",\"BA\",\"RA\",\"AL\",\"GA\",\"IN\",\"SN\",\"TL\",\"PB\",\"BI\",\"SC\",\"TI\",\"V\",\"CR\",\"MN\",\"FE\",\"CO\",\"NI\",\"CU\",\"ZN\",\"Y\",\"ZR\",\"NB\",\"MO\",\"TC\",\"RU\",\"RH\",\"PD\",\"AG\",\"CD\",\"LA\",\"HF\",\"TA\",\"W\",\"RE\",\"OS\",\"IR\",\"PT\",\"AU\",\"HG\",\"AC\",\"RF\",\"DB\",\"SG\",\"BH\",\"HS\",\"MT\",\"CE\",\"PR\",\"ND\",\"PM\",\"SM\",\"EU\",\"GD\",\"TB\",\"DY\",\"HO\",\"ER\",\"TM\",\"YB\",\"LU\",\"TH\",\"PA\",\"U\",\"NP\",\"PU\",\"AM\",\"CM\",\"BK\",\"CF\",\"ES\",\"FM\",\"MD\",\"NO\",\"LR\"];t<r.length;t++){var n=r[t];e.add(i[n]);}return e;}();function u(e){var t=i[e];return void 0===t?-1:t;}function c(e,t){if(e<0||t<0)return-1;var r,n,i=o[r=e,n=t,r<n?(r+n)*(r+n+1)/2+n:(r+n)*(r+n+1)/2+r];return void 0===i?-1:i;}function l(e){if(e<0)return 2.001;var t=a[e];return void 0===t?2.001:t;}var d=i.H;function f(e){return e===d;}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return C;}),r.d(t,\"d\",function(){return w;}),r.d(t,\"a\",function(){return P;}),r.d(t,\"b\",function(){return j;}),r.d(t,\"e\",function(){return E;}),r.d(t,\"f\",function(){return A;});var n=r(0),i=r(68),a=r(4),o=r(144),s=r(89),u=r(182),c=r(115),l=r(23),d=r(6),f=r(164),p=r(196),m=r(5),h=r(145),g=r(117),v=r(39),b=r(123),y=r(150),_=(r(264),r(125)),S=r(94),O=r(74);function x(e,t){var r,n,v,b,y,S,O,x=e.defaultProps,C=e.createGeometry,w=e.createLocationIterator,P=e.getLoci,j=e.eachLocation,E=e.setUpdateState,A=e.geometryUtils,T=A.updateValues,D=A.updateBoundingSphere,I=A.updateRenderableState,M=f.a.create(),k=Object.assign({},x),B=s.a.createEmpty();function V(e){if(M.createNew){if(O=w(b),!e)throw new Error(\"expected geometry to be given\");r=function(e,t,r,n,i,a){var s=o.a.getUtils(t),l=s.createValues,d=s.createRenderableState,f=l(t,Object(u.a)(),r,n,i),p=d(i);return Object(c.a)(t.kind,f,p,a);}(0,e,O,v,n,t);}else{if(!r)throw new Error(\"expected renderObject to be available\");if(M.updateTransform){var i=(O=w(b)).instanceCount,a=O.groupCount;Object(_.a)(i*a,r.values);}if(M.createGeometry){if(!e)throw new Error(\"expected geometry to be given\");m.e.update(r.values.drawCount,o.a.getDrawCount(e)),D(r.values,e);}M.updateSize&&\"uSize\"in r.values&&Object(h.a)(O,v.size,r.values),M.updateColor&&Object(g.a)(O,v.color,r.values),T(r.values,n),I(r.state,n);}k=n,B=v,y=b,e&&(S=e);}function R(e,t,r){return function(e){return!!Object(l.isEveryLoci)(e)||!(!a.Structure.isLoci(e)||!a.Structure.areRootsEquivalent(e.structure,y))||!!(a.StructureElement.Loci.is(e)&&a.Structure.areRootsEquivalent(e.structure,y)&&a.StructureElement.Loci.isWholeStructure(e));}(e)?t(d.Interval.ofBounds(0,O.groupCount*O.instanceCount)):j(e,y,t,r);}return{get groupCount(){return O?O.count:0;},get renderObject(){return O&&O.count?r:void 0;},createOrUpdate:function createOrUpdate(e,t,i,o){if(void 0===i&&(i={}),function(e,t,i){if(!i&&!y)throw new Error(\"missing structure\");n=Object.assign({},k,t),v=e,b=i,f.a.reset(M),r&&y&&a.Structure.areEquivalent(b,y)||(M.createNew=!0),M.createNew?M.createGeometry=!0:(E(M,n,k,v,B,b,y),a.Structure.conformationHash(b)!==a.Structure.conformationHash(y)&&(M.updateTransform=!0,M.createGeometry=!0),p.a.areEqual(e.color,B.color)||(M.updateColor=!0),Object(m.h)(n.unitKinds,k.unitKinds)||(M.createGeometry=!0),M.createGeometry&&(M.updateColor=!0));}(t,i,o||y),M.createGeometry){var s=C(e,b,v,n,S);return s instanceof Promise?s.then(V):V(s);}V();},getLoci:function getLoci(e){return r?P(e,y,r.id):l.EmptyLoci;},mark:function mark(e,t){return i.a.mark(r,e,t,R);},setVisibility:function setVisibility(e){i.a.setVisibility(r,e);},setAlphaFactor:function setAlphaFactor(e){i.a.setAlphaFactor(r,e);},setPickable:function setPickable(e){i.a.setPickable(r,e);},setTransform:function setTransform(e,t){i.a.setTransform(r,e,t);},setOverpaint:function setOverpaint(e){i.a.setOverpaint(r,e,R,!0);},setTransparency:function setTransparency(e){i.a.setTransparency(r,e,R,!0);},setClipping:function setClipping(e){i.a.setClipping(r,e,R,!0);},destroy:function destroy(){r=void 0;}};}var C=Object(n.__assign)(Object(n.__assign)({},S.c),S.d);function w(e,t){return x(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0);},geometryUtils:v.a.Utils}),t);}var P=Object(n.__assign)(Object(n.__assign)({},S.b),S.d);function j(e,t){return x(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0);},geometryUtils:O.a.Utils}),t);}var E=Object(n.__assign)(Object(n.__assign)({},S.g),S.d);function A(e,t){return x(Object(n.__assign)(Object(n.__assign)({},e),{setUpdateState:function setUpdateState(t,r,n,i,a,o,s){e.setUpdateState(t,r,n,i,a,o,s),y.a.areEqual(i.size,a.size)||(t.updateSize=!0),r.background!==n.background&&(t.createGeometry=!0),r.backgroundMargin!==n.backgroundMargin&&(t.createGeometry=!0),r.tether!==n.tether&&(t.createGeometry=!0),r.tetherLength!==n.tetherLength&&(t.createGeometry=!0),r.tetherBaseWidth!==n.tetherBaseWidth&&(t.createGeometry=!0),r.attachment!==n.attachment&&(t.createGeometry=!0);},geometryUtils:b.a.Utils}),t);}Object(n.__assign)(Object(n.__assign)({},S.a),S.d);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return S;}),r.d(t,\"a\",function(){return O;});var n=r(0),i=r(140),a=r(2),o=r(161),s=r(233),u=r(85),c=r(5),l=r(30),d={hue:a.ParamDefinition.Interval([1,360],{min:0,max:360,step:1}),chroma:a.ParamDefinition.Interval([40,70],{min:0,max:100,step:1}),luminance:a.ParamDefinition.Interval([15,85],{min:0,max:100,step:1}),clusteringStepCount:a.ParamDefinition.Numeric(50,{min:10,max:200,step:1},{isHidden:!0}),minSampleCount:a.ParamDefinition.Numeric(800,{min:100,max:5e3,step:100},{isHidden:!0})};function f(e,t){return Math.sqrt(Math.pow(Math.abs(e[0]-t[0]),2)+Math.pow(Math.abs(e[1]-t[1]),2)+Math.pow(Math.abs(e[2]-t[2]),2));}var p=[0,0,0],m=[0,0,0];function h(e,t){return o.a.toHcl(p,e),o.a.fromColor(m,o.a.toColor(e)),p[0]>=t.hue[0]&&p[0]<=t.hue[1]&&p[1]>=t.chroma[0]&&p[1]<=t.chroma[1]&&p[2]>=t.luminance[0]&&p[2]<=t.luminance[1]&&m[0]>=e[0]-2&&m[0]<=e[0]+2&&m[1]>=e[1]-2&&m[1]<=e[1]+2&&m[2]>=e[2]-2&&m[2]<=e[2]+2;}function g(e,t){void 0===t&&(t={});var r=Object(n.__assign)(Object(n.__assign)({},a.ParamDefinition.getDefaultValues(d)),t);if(e<=0)return[];var i=function(e,t){for(var r=new Map(),n=1.001*Math.cbrt(e),i=(t.hue[1]-t.hue[0])/n,a=(t.chroma[1]-t.chroma[0])/n,u=(t.luminance[1]-t.luminance[0])/n,c=t.hue[0];c<=t.hue[1];c+=i)for(var l=t.chroma[0];l<=t.chroma[1];l+=a)for(var d=t.luminance[0];d<=t.luminance[1];d+=u){var f=o.a.fromHcl(Object(o.a)(),s.a.create(c,l,d));h(f,t)&&r.set(f.toString(),f);}return Array.from(r.values());}(Math.max(r.minSampleCount,5*e),r);if(i.length<e)throw new Error(\"Not enough samples to generate distinct colors, increase sample count.\");for(var p=[],m=[],g=Math.floor(i.length/e),v=0;v<i.length&&(p.push(i[v]),m.push([]),!(p.length>=e));v+=g);for(var b=1;b<=r.clusteringStepCount;++b){var y=Object(u.b)(m);for(v=0;v<i.length;++v){for(var _=Number.MAX_SAFE_INTEGER,S=0,O=0;O<p.length;O++){var x=f(i[v],p[O]);x<_&&(_=x,S=O);}y[S].push(i[v]);}var C=Object(u.b)(p);for(v=0;v<y.length;++v){for(var w=y[v],P=w.length,j=[],E=[],A=[],T=0,D=w;T<D.length;T++){var I=D[T];j.push(I[0]),E.push(I[1]),A.push(I[2]);}var M=Object(l.arraySum)(j)/P,k=Object(l.arraySum)(E)/P,B=Object(l.arraySum)(A)/P;p[v]=[M,k,B];}if(Object(c.h)(C,p))break;}return function(e){for(var t=e.slice(0),r=[t.shift()];t.length>0;){for(var n=r[r.length-1],i=0,a=Number.MIN_SAFE_INTEGER,o=0;o<t.length;++o){var s=f(n,t[o]);s>a&&(a=s,i=o);}r.push(t.splice(i,1)[0]);}return r;}(p).map(function(e){return o.a.toColor(e);});}var v=r(88),b=r(337),y={type:\"generate\",colorList:\"red-yellow-blue\"},_={valueLabel:a.ParamDefinition.Value(function(e){return\"\"+(e+1);},{isHidden:!0}),minLabel:a.ParamDefinition.Value(\"Start\",{isHidden:!0}),maxLabel:a.ParamDefinition.Value(\"End\",{isHidden:!0})};function S(e){void 0===e&&(e={});var t=Object(n.__assign)(Object(n.__assign)({},y),e);return{palette:a.ParamDefinition.MappedStatic(t.type,{colors:a.ParamDefinition.Group(Object(n.__assign)(Object(n.__assign)({},_),{list:a.ParamDefinition.ColorList(t.colorList)}),{isFlat:!0}),generate:a.ParamDefinition.Group(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},_),d),{maxCount:a.ParamDefinition.Numeric(75,{min:1,max:250,step:1})}),{isFlat:!0})},{options:[[\"colors\",\"Color List\"],[\"generate\",\"Generate Distinct\"]]})};}a.ParamDefinition.getDefaultValues(S());function O(e,t){var r,n;if(\"colors\"===t.palette.name&&\"interpolate\"===t.palette.params.list.kind){var a=t.palette.params,o=a.list,s=a.minLabel,u=a.maxLabel,c=[0,e-1],l=o.colors;0===l.length&&(l=Object(v.getColorListFromName)(y.colorList).list);var d=b.a.create({listOrName:l,domain:c,minLabel:s,maxLabel:u});n=d.legend,r=d.color;}else{var f;\"colors\"===t.palette.name?0===(f=t.palette.params.list.colors).length&&(f=Object(v.getColorListFromName)(\"dark-2\").list):(e=Math.min(e,t.palette.params.maxCount),f=g(e,t.palette.params));for(var p=t.palette.params.valueLabel||function(e){return\"\"+e;},m=f.length,h=[],_=0;_<e;++_){var S=_%m;void 0===h[S]?h[S]=[p(_),f[S]]:h[S][0]+=\", \"+p(_);}n=Object(i.b)(h),r=function r(e){return f[e%m];};}return{color:r,legend:n};}},function(e,t,r){\"use strict\";var n=r(0),i=r(6),a=r(55),o=r(135),s=r(9),u=r(129),c=r(37),l=r(11),d=r(1),f=r(126),p=Object(l.b)(),m=Object(l.g)(),h=new f.a(\"98\");var g,v=r(185);!function(e){e.add=function(e,t,r,n){e.indices[e.count]=r,e.units[e.count]=t,e.squaredDistances[e.count]=n,e.count++;},e.create=function(){return{count:0,indices:[],units:[],squaredDistances:[]};},e.copy=function(e,t){for(var r=0;r<t.count;++r)e.indices[r]=t.indices[r],e.units[r]=t.units[r],e.squaredDistances[r]=t.squaredDistances[r];return e.count=t.count,e;};}(g||(g={}));var b=function(){function e(e){this.structure=e,this.pivot=d.Vec3.zero(),this.result=g.create(),this._boundary=void 0;for(var t=e.units,r=t.length,n=new Float32Array(r),a=new Float32Array(r),o=new Float32Array(r),s=new Float32Array(r),u=d.Vec3.zero(),c=0;c<r;c++){var f=t[c],p=f.lookup3d.boundary.sphere;d.Vec3.transformMat4(u,p.center,f.conformation.operator.matrix),n[c]=u[0],a[c]=u[1],o[c]=u[2],s[c]=p.radius;}var m={x:n,y:a,z:o,radius:s,indices:i.OrderedSet.ofBounds(0,r)};this.unitLookup=Object(l.c)(m,Object(v.a)(m));}return e.prototype.findUnitIndices=function(e,t,r,n){return this.unitLookup.find(e,t,r,n);},e.prototype.find=function(e,t,r,n){l.d.reset(this.result);var i=this.structure.units,a=this.unitLookup.find(e,t,r,n);if(0===a.count)return this.result;for(var o=0,s=a.count;o<s;o++){var u=i[a.indices[o]];d.Vec3.set(this.pivot,e,t,r),u.conformation.operator.isIdentity||d.Vec3.transformMat4(this.pivot,this.pivot,u.conformation.operator.inverse);for(var c=u.lookup3d.find(this.pivot[0],this.pivot[1],this.pivot[2],n),f=0,p=c.count;f<p;f++)g.add(this.result,u,c.indices[f],c.squaredDistances[f]);}return this.result;},e.prototype.findIntoBuilder=function(e,t,r,n,i){var a=this.structure.units,o=this.unitLookup.find(e,t,r,n);if(0!==o.count)for(var s=0,u=o.count;s<u;s++){var c=a[o.indices[s]];d.Vec3.set(this.pivot,e,t,r),c.conformation.operator.isIdentity||d.Vec3.transformMat4(this.pivot,this.pivot,c.conformation.operator.inverse);var l=c.lookup3d.find(this.pivot[0],this.pivot[1],this.pivot[2],n);if(0!==l.count){var f=c.elements;i.beginUnit(c.id);for(var p=0,m=l.count;p<m;p++)i.addElement(f[l.indices[p]]);i.commitUnit();}}},e.prototype.findIntoBuilderWithRadius=function(e,t,r,n,i,a,o,s){var c=this.structure.units,l=this.unitLookup.find(e,t,r,a);if(0!==l.count)for(var f=u.a.Location.create(this.structure),p=n+i+a,m=0,h=l.count;m<h;m++){var g=c[l.indices[m]];d.Vec3.set(this.pivot,e,t,r),g.conformation.operator.isIdentity||d.Vec3.transformMat4(this.pivot,this.pivot,g.conformation.operator.inverse);var v=g.lookup3d.find(this.pivot[0],this.pivot[1],this.pivot[2],p);if(0!==v.count){var b=g.elements;f.unit=g,s.beginUnit(g.id);for(var y=0,_=v.count;y<_;y++){f.element=b[v.indices[y]];var S=o(f);Math.sqrt(v.squaredDistances[y])-n-S>a||s.addElement(b[v.indices[y]]);}s.commitUnit();}}},e.prototype.check=function(e,t,r,n){var i=this.structure.units,a=this.unitLookup.find(e,t,r,n);if(0===a.count)return!1;for(var o=0,s=a.count;o<s;o++){var u=i[a.indices[o]];if(d.Vec3.set(this.pivot,e,t,r),u.conformation.operator.isIdentity||d.Vec3.transformMat4(this.pivot,this.pivot,u.conformation.operator.inverse),u.lookup3d.check(this.pivot[0],this.pivot[1],this.pivot[2],n))return!0;}return!1;},Object.defineProperty(e.prototype,\"boundary\",{get:function get(){return this._boundary||(this._boundary=function(e){var t=d.Vec3.create(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=d.Vec3.create(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),n=e.units;h.reset();for(var i=0,a=n.length;i<a;i++){var o=(s=n[i]).lookup3d.boundary;(u=s.conformation.operator).isIdentity?(d.Vec3.min(t,t,o.box.min),d.Vec3.max(r,r,o.box.max),h.includePositionRadius(o.sphere.center,o.sphere.radius)):(l.b.transform(p,o.box,u.matrix),d.Vec3.min(t,t,p.min),d.Vec3.max(r,r,p.max),l.g.transform(m,o.sphere,u.matrix),h.includePositionRadius(m.center,m.radius));}for(h.finishedIncludeStep(),i=0,a=n.length;i<a;i++){var s,u;o=(s=n[i]).lookup3d.boundary;(u=s.conformation.operator).isIdentity?h.radiusPositionRadius(o.sphere.center,o.sphere.radius):(l.g.transform(m,o.sphere,u.matrix),h.radiusPositionRadius(m.center,m.radius));}return{box:{min:t,max:r},sphere:h.getSphere()};}(this.structure)),this._boundary;},enumerable:!1,configurable:!0}),e;}(),y=r(239),_=function(){function e(e,t){this.parent=e,this.isSorted=t,this.ids=[],this.unitMap=i.IntMap.Mutable(),this.parentId=-1,this.currentUnit=[],this.elementCount=0;}return e.prototype.addToUnit=function(e,t){var r=this.unitMap.get(e);r?r[r.length]=t:(this.unitMap.set(e,[t]),this.ids[this.ids.length]=e),this.elementCount++;},e.prototype.beginUnit=function(e){this.parentId=e,this.currentUnit=this.currentUnit.length>0?[]:this.currentUnit;},e.prototype.addElement=function(e){this.currentUnit[this.currentUnit.length]=e,this.elementCount++;},e.prototype.commitUnit=function(){0!==this.currentUnit.length&&(this.ids[this.ids.length]=this.parentId,this.unitMap.set(this.parentId,this.currentUnit),this.parentId=-1);},e.prototype.setUnit=function(e,t){this.ids[this.ids.length]=e,this.unitMap.set(e,t),this.elementCount+=t.length;},e.prototype._getStructure=function(e){if(this.isEmpty)return K.Empty;var t=[];Object(s.q)(this.ids);for(var r=y.a.UnitEquivalenceBuilder(),n=0,a=this.ids.length;n<a;n++){var o=this.ids[n],u=this.parent.unitMap.get(o),c=this.unitMap.get(o),l=!1;e&&(this.isSorted||Object(s.q)(c),c=i.SortedArray.deduplicate(i.SortedArray.ofSortedArray(this.currentUnit)),l=!0);var d=c.length;if(c.length!==u.elements.length){!this.isSorted&&!l&&d>1&&Object(s.q)(c);var f=u.getChild(i.SortedArray.ofSortedArray(c)),p=r.add(f.id,f);f!==p&&(f=p.applyOperator(f.id,f.conformation.operator,!0)),t[t.length]=f;}else t[t.length]=u,r.add(u.id,u);}return K.create(t,{parent:this.parent});},e.prototype.getStructure=function(){return this._getStructure(!1);},e.prototype.getStructureDeduplicate=function(){return this._getStructure(!0);},e.prototype.setSingletonLocation=function(e){var t=this.ids[0];e.unit=this.parent.unitMap.get(t),e.element=this.unitMap.get(t)[0];},Object.defineProperty(e.prototype,\"isEmpty\",{get:function get(){return 0===this.elementCount;},enumerable:!1,configurable:!0}),e;}(),S=r(159),O=r(168);function x(e,t){for(var r=1;t--;)r*=e--;return r;}var C=function(){function e(e,t){var r,n;this.array=e,this.hasNext=!1,this.index=(1<<t)-1,this.size=(r=e.length,(n=t)>r?0:x(r,n)/x(n,n)),this.maxIndex=1<<e.length,this.value=new Array(t),this.hasNext=t>0&&t<=e.length;}return e.prototype.move=function(){if(this.hasNext){for(var e=0,t=0,r=this.index;r;r>>>=1,e++)1&r&&(this.value[t++]=this.array[e]);this.index=function(e){var t=e&-e,r=e+t;return r|((r&-r)/t>>1)-1;}(this.index),this.hasNext=this.index<this.maxIndex;}return this.value;},e;}();function w(e,t){for(var r=[],n=new C(e,t);n.hasNext;)r.push(n.move().slice());return r;}var P=r(171),j=r(227),E=r(30),A=r(22),T=r(146),D=[],I={links:D,terminalLinks:D,elements:D,partialElements:D,getElementIndices:function getElementIndices(){return D;},getLinkIndices:function getLinkIndices(){return D;},getTerminalLinkIndices:function getTerminalLinkIndices(){return D;}},M=r(201),k=Object(A.ElementSymbol)(\"C\"),B=Object(A.ElementSymbol)(\"O\"),V=[M.a.elementFingerprint([k,k,k,B]),M.a.elementFingerprint([k,k,k,k,B]),M.a.elementFingerprint([k,k,k,k,k,B]),M.a.elementFingerprint([k,k,k,k,k,k,B])];function R(e,t){for(var r=-1,n=-1,i=-1,a=-1,o=e.elements,s=e.model.atomicHierarchy.atoms,u=s.type_symbol,c=s.label_atom_id,l=e.bonds,d=l.b,f=l.offset,p=0,m=t.length;p<m;++p){var h=o[t[p]];if(u.value(h)===k){for(var g=0,v=0,b=f[t[p]],y=f[t[p]+1];b<y;++b){var _=o[d[b]],S=u.value(_);S===B?++g:S===k&&++v;}if(2===g){r=h;break;}1===g&&1===v?n=h:c.value(h).startsWith(\"C1\")?i=h:a=h;}}return-1!==r?r:-1!==n?n:-1!==i?i:-1!==a?a:o[t[0]];}function L(e,t,r,n){var i=t.conformation.position;return d.Vec3.normalize(e,d.Vec3.sub(e,n,i(r,e))),e;}function N(e,t){var r=e.elements;return e.model.atomicHierarchy.atoms.label_atom_id.value(r[t]);}function F(e,t){if(t&&t.length){for(var r=e.unit,n=e.all,a=new Set(),o=w(Object(E.fillSerial)(new Array(t.length)),2),s=0,u=o.length;s<u;++s){var c=o[s],l=n[t[c[0]]],d=n[t[c[1]]];i.SortedArray.areIntersecting(l,d)&&M.a.getAltId(r,l)===M.a.getAltId(r,d)&&(a.add(t[c[0]]),a.add(t[c[1]]));}if(a.size){var f=[];for(s=0,u=t.length;s<u;++s)a.has(t[s])||f.push(t[s]);return f;}return t;}}function U(e,t){return t.properties.saccharideComponentMap.get(e);}function z(e){if(0===e.models.reduce(function(e,t){return e+t.properties.saccharideComponentMap.size;},0))return I;var t=[],r=[],a=[],o=[],u=new Map();function l(e,t,r){return e+\"|\"+t+\"|\"+r;}function f(e,t){u.has(e)?u.get(e).push(t):u.set(e,[t]);}function p(e,t){d.Vec3.sub(a[e].geometry.direction,a[t].geometry.center,a[e].geometry.center),d.Vec3.normalize(a[e].geometry.direction,a[e].geometry.direction);}var m=d.Vec3.zero();function h(e,t,r){var n=r.conformation.position,i=a[e].geometry;d.Vec3.sub(i.direction,n(r.elements[t],m),i.center),d.Vec3.normalize(i.direction,i.direction);}for(var g=0,v=e.units.length;g<v;++g){var b=e.units[g];if(c.a.isAtomic(b))for(var y=b.model,_=b.rings,S=y.atomicHierarchy,O=S.chainAtomSegments,x=S.residueAtomSegments,C=S.atoms.label_comp_id,D=i.Segmentation.transientSegments(O,b.elements),k=i.Segmentation.transientSegments(x,b.elements),B=void 0;D.hasNext;)for(k.setSegment(D.move());k.hasNext;){var z=k.move().index,H=U(C.value(x.offsets[z]),y);if(H){B||(B=M.b.byFingerprintAndResidue(_,V));var G=F(_,B.get(z));if(G&&G.length){for(var q=[],W=0,Q=G.length;W<Q;++W){var Y=_.all[G[W]],X=R(b,Y),K=j.a.calculateMomentsAxes(Object(T.c)(b,Y)),Z=d.Vec3.copy(d.Vec3.zero(),K.origin),J=d.Vec3.copy(d.Vec3.zero(),K.dirC),$=L(d.Vec3.zero(),b,X,Z);d.Vec3.orthogonalize($,J,$);var ee=M.a.getAltId(b,Y),te=a.length;q.push(te),f(l(z,b.id,ee),te),ee&&f(l(z,b.id,\"\"),te),a.push({geometry:{center:Z,normal:J,direction:$},component:H,ringIndex:G[W],altId:ee,unit:b,residueIndex:z});}var re=w(Object(E.fillSerial)(new Array(G.length)),2);for(W=0,Q=re.length;W<Q;++W){var ne=re[W],ie=_.all[G[ne[0]]],ae=_.all[G[ne[1]]];if(P.a.areVertexSetsConnected(b.bonds,ie,ae,3)){var oe=q[ne[0]],se=q[ne[1]];a[oe].altId===a[se].altId&&(p(oe,se),p(se,oe),t.push({carbohydrateIndexA:oe,carbohydrateIndexB:se}),t.push({carbohydrateIndexA:se,carbohydrateIndexB:oe}));}}}else o.push({unit:b,residueIndex:z,component:H});}}}function ue(e,t){return u.get(l(e.getResidueIndex(t),e.id,function(e,t){var r=e.elements;return e.model.atomicHierarchy.atoms.label_alt_id.value(r[t]);}(e,t)))||[];}for(g=0,v=a.length;g<v;++g){var ce=a[g];for(b=ce.unit,W=g+1;W<v;++W){var le=a[W];if(b===le.unit&&ce.residueIndex!==le.residueIndex){var de=b.rings.all[ce.ringIndex],fe=b.rings.all[le.ringIndex];P.a.areVertexSetsConnected(b.bonds,de,fe,3)&&(p(g,W),p(W,g),t.push({carbohydrateIndexA:g,carbohydrateIndexB:W}),t.push({carbohydrateIndexA:W,carbohydrateIndexB:g}));}}}for(g=0,v=e.units.length;g<v;++g){b=e.units[g];c.a.isAtomic(b)&&e.interUnitBonds.getConnectedUnits(b).forEach(function(e){e.connectedIndices.forEach(function(n){e.getEdges(n).forEach(function(i){var a=i.props,o=i.indexB;if(A.BondType.isCovalent(a.flag)){var s=e.unitA,u=e.unitB,c=ue(s,n),l=ue(u,o);if(c.length>0&&l.length>0)for(var d=c.length,f=l.length,m=0,g=Math.max(d,f);m<g;++m){var v=c[Math.min(m,d-1)],b=l[Math.min(m,f-1)];((S=N(s,n)).startsWith(\"O1\")||S.startsWith(\"C1\"))&&p(v,b),t.push({carbohydrateIndexA:v,carbohydrateIndexB:b});}else if(0===l.length)for(var y=0,_=c;y<_.length;y++){var S;v=_[y];((S=N(s,n)).startsWith(\"O1\")||S.startsWith(\"C1\"))&&h(v,o,u),r.push({carbohydrateIndex:v,elementIndex:o,elementUnit:u,fromCarbohydrate:!0});}else if(0===c.length)for(var O=0,x=l;O<x.length;O++){b=x[O];r.push({carbohydrateIndex:b,elementIndex:n,elementUnit:s,fromCarbohydrate:!1});}}});});});}return Object(n.__assign)({links:t,terminalLinks:r,elements:a,partialElements:o},function(e,t,r){function n(e,t){return Object(s.f)(e.id,t);}function i(e,t,r){var i=[],a=e.get(n(t,r));if(void 0!==a)for(var o=0,s=a;o<s.length;o++){var u=s[o];Object(E.arraySetAdd)(i,u);}return i;}for(var a=new Map(),o=0,u=e.length;o<u;++o)for(var c=e[o],l=c.unit,d=c.ringIndex,f=l.rings.all[d],p=0,m=f.length;p<m;++p){var h=n(l,l.elements[f[p]]);void 0===(P=a.get(h))?a.set(h,[o]):P.push(o);}var g=new Map();for(o=0,u=t.length;o<u;++o){var v=t[o],b=e[v.carbohydrateIndexA];for(l=b.unit,d=b.ringIndex,f=l.rings.all[d],p=0,m=f.length;p<m;++p){h=n(l,l.elements[f[p]]);void 0===(P=g.get(h))?g.set(h,[o]):P.push(o);}}var y=new Map();for(o=0,u=r.length;o<u;++o){var _=r[o],S=_.fromCarbohydrate,O=_.carbohydrateIndex,x=_.elementUnit,C=_.elementIndex;if(S){var w=e[O];for(l=w.unit,d=w.ringIndex,f=l.rings.all[d],p=0,m=f.length;p<m;++p){h=n(l,l.elements[f[p]]);void 0===(P=y.get(h))?y.set(h,[o]):P.push(o);}}else{var P;h=n(x,x.elements[C]);void 0===(P=y.get(h))?y.set(h,[o]):P.push(o);}}return{getElementIndices:function getElementIndices(e,t){return i(a,e,t);},getLinkIndices:function getLinkIndices(e,t){return i(g,e,t);},getTerminalLinkIndices:function getTerminalLinkIndices(e,t){return i(y,e,t);}};}(a,t,r));}var H=r(96),G=r(66),q=r(119),W=r(38),Q=r(204),Y=function(){function e(e,t){void 0===t&&(t={}),this._props={hashCode:-1,transformHash:-1,elementCount:-1,bondCount:-1,uniqueElementCount:-1,atomicResidueCount:-1,polymerResidueCount:-1,polymerUnitCount:-1,coordinateSystem:o.a.Default,label:\"\"};var r=this.initUnits(e),n=r.unitMap,i=r.unitIndexMap;this.unitMap=n,this.unitIndexMap=i,this.units=e,t.parent&&(this._props.parent=t.parent.parent||t.parent),t.coordinateSystem?this._props.coordinateSystem=t.coordinateSystem:t.parent&&(this._props.coordinateSystem=t.parent.coordinateSystem),t.label?this._props.label=t.label:t.parent&&(this._props.label=t.parent.label),t.masterModel?this._props.masterModel=t.masterModel:t.parent&&(this._props.masterModel=t.parent.masterModel),t.representativeModel?this._props.representativeModel=t.representativeModel:t.parent&&(this._props.representativeModel=t.parent.representativeModel);}return e.prototype.subsetBuilder=function(e){return new _(this,e);},Object.defineProperty(e.prototype,\"elementCount\",{get:function get(){return this._props.elementCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"bondCount\",{get:function get(){return this._props.bondCount||(this._props.bondCount=this.interUnitBonds.edgeCount+S.a.getIntraUnitBondCount(this)),this._props.bondCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"hasCustomProperties\",{get:function get(){return!!this._props.customProps&&this._props.customProps.all.length>0;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"customPropertyDescriptors\",{get:function get(){return this._props.customProps||(this._props.customProps=new G.CustomProperties()),this._props.customProps;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"currentPropertyData\",{get:function get(){return this._props.propertyData||(this._props.propertyData=Object.create(null)),this._props.propertyData;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"inheritedPropertyData\",{get:function get(){return this.parent?this.parent.currentPropertyData:this.currentPropertyData;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"polymerResidueCount\",{get:function get(){return-1===this._props.polymerResidueCount&&(this._props.polymerResidueCount=function(e){for(var t=e.units,r=0,n=0,i=t.length;n<i;n++)r+=t[n].polymerElements.length;return r;}(this)),this._props.polymerResidueCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"polymerUnitCount\",{get:function get(){return-1===this._props.polymerUnitCount&&(this._props.polymerUnitCount=function(e){for(var t=e.units,r=0,n=0,i=t.length;n<i;n++)t[n].polymerElements.length>0&&(r+=1);return r;}(this)),this._props.polymerUnitCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"uniqueElementCount\",{get:function get(){return-1===this._props.uniqueElementCount&&(this._props.uniqueElementCount=function(e){for(var t=e.unitSymmetryGroups,r=0,n=0,i=t.length;n<i;n++)r+=t[n].elements.length;return r;}(this)),this._props.uniqueElementCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"atomicResidueCount\",{get:function get(){return-1===this._props.atomicResidueCount&&(this._props.atomicResidueCount=function(e){for(var t=e.units,r=0,n=0,i=t.length;n<i;n++){var a=t[n];if(c.a.isAtomic(a))for(var o=a.elements,s=a.residueIndex,u=-1,l=-1,d=0,f=o.length;d<f;++d)(u=s[o[d]])!==l&&(r+=1,l=u);}return r;}(this)),this._props.atomicResidueCount;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"isCoarseGrained\",{get:function get(){var e=this.elementCount,t=this.polymerResidueCount;return!(!t||!e)&&e/t<2;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"isEmpty\",{get:function get(){return 0===this.units.length;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"hashCode\",{get:function get(){return-1!==this._props.hashCode?this._props.hashCode:this.computeHash();},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"transformHash\",{get:function get(){return-1!==this._props.transformHash||(this._props.transformHash=Object(s.l)(this.units.map(function(e){return e.id;}))),this._props.transformHash;},enumerable:!1,configurable:!0}),e.prototype.computeHash=function(){for(var e=23,t=0,r=this.units.length;t<r;t++){var n=this.units[t];e=31*(e=31*e+n.id|0)+i.SortedArray.hashCode(n.elements)|0;}return e=31*e+this.elementCount|0,-1===(e=Object(s.h)(e))&&(e=0),this._props.hashCode=e,e;},e.prototype.elementLocations=function(){return new e.ElementLocationIterator(this);},Object.defineProperty(e.prototype,\"root\",{get:function get(){return this._props.parent||this;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"parent\",{get:function get(){return this._props.parent;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"coordinateSystem\",{get:function get(){return this._props.coordinateSystem;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"label\",{get:function get(){return this._props.label;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"boundary\",{get:function get(){return this.lookup3d.boundary;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"lookup3d\",{get:function get(){return this._props.lookup3d||(this._props.lookup3d=new b(this)),this._props.lookup3d;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"interUnitBonds\",{get:function get(){return this._props.interUnitBonds||(this._props.interUnitBonds=Object(S.b)(this)),this._props.interUnitBonds;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"unitSymmetryGroups\",{get:function get(){return this._props.unitSymmetryGroups||(this._props.unitSymmetryGroups=y.a.computeTransformGroups(this)),this._props.unitSymmetryGroups;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"unitSymmetryGroupsIndexMap\",{get:function get(){return this._props.unitSymmetryGroupsIndexMap||(this._props.unitSymmetryGroupsIndexMap=c.a.SymmetryGroup.getUnitSymmetryGroupsIndexMap(this.unitSymmetryGroups)),this._props.unitSymmetryGroupsIndexMap;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"carbohydrates\",{get:function get(){return this._props.carbohydrates||(this._props.carbohydrates=z(this)),this._props.carbohydrates;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"models\",{get:function get(){return this._props.models||(this._props.models=function(e){for(var t=e.units,r=a.c.create(),n=0,i=t;n<i.length;n++){var o=i[n];a.c.add(r,o.model.id,o.model);}return r.array;}(this)),this._props.models;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"uniqueResidueNames\",{get:function get(){return this._props.uniqueResidueNames||(this._props.uniqueResidueNames=function(e){for(var t=O.a.residue.microheterogeneityCompIds,r=new Set(),n=u.a.Location.create(e),a=0,o=e.unitSymmetryGroups;a<o.length;a++){var s=o[a].units[0];if(c.a.isAtomic(s)){var l=i.Segmentation.transientSegments(s.model.atomicHierarchy.residueAtomSegments,s.elements);for(n.unit=s;l.hasNext;){var d=l.move();n.element=s.elements[d.start];for(var f=t(n),p=0,m=f;p<m.length;p++){var h=m[p];r.add(h);}}}}return r;}(this));},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"uniqueElementSymbols\",{get:function get(){return this._props.uniqueElementSymbols||(this._props.uniqueElementSymbols=function(e){for(var t=O.a.atom.type_symbol,r=new Set(),n=u.a.Location.create(e),i=0,a=e.unitSymmetryGroups;i<a.length;i++){var o=a[i].units[0];if(c.a.isAtomic(o)){n.unit=o;for(var s=0,l=o.elements.length;s<l;++s)n.element=o.elements[s],r.add(t(n));}}return r;}(this));},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"entityIndices\",{get:function get(){return this._props.entityIndices||(this._props.entityIndices=function(e){for(var t=e.units,r=u.a.Location.create(e),n=a.c.create(),o=0,c=t;o<c.length;o++){var l=c[o],d=0===l.kind?O.a.entity.key:O.a.coarse.entityKey;r.unit=l;for(var f=l.elements,p=i.Segmentation.transientSegments(l.model.atomicHierarchy.chainAtomSegments,f);p.hasNext;){var m=p.move();r.element=f[m.start];var h=d(r);a.c.add(n,h,h);}}return Object(s.q)(n.array),n.array;}(this));},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"uniqueAtomicResidueIndices\",{get:function get(){return this._props.uniqueAtomicResidueIndices||(this._props.uniqueAtomicResidueIndices=function(e){for(var t=new Map(),r=[],n=e.unitSymmetryGroups,o=0,u=n;o<u.length;o++){var l=u[o].units[0];if(c.a.isAtomic(l)){var d=void 0;t.has(l.model.id)?d=t.get(l.model.id):(d=a.c.create(),r.push(l.model.id),t.set(l.model.id,d));for(var f=i.Segmentation.transientSegments(l.model.atomicHierarchy.residueAtomSegments,l.elements);f.hasNext;){var p=f.move();a.c.add(d,p.index,p.index);}}}for(var m=new Map(),h=0,g=r;h<g.length;h++){var v=g[h],b=t.get(v).array;Object(s.q)(b),m.set(v,b);}return m;}(this));},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"isAtomic\",{get:function get(){for(var e=0,t=this.units;e<t.length;e++){var r=t[e];if(c.a.isAtomic(r))return!1;}return!0;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"hasAtomic\",{get:function get(){for(var e=0,t=this.units;e<t.length;e++){var r=t[e];if(c.a.isAtomic(r))return!0;}return!1;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"isCoarse\",{get:function get(){for(var e=0,t=this.units;e<t.length;e++){var r=t[e];if(c.a.isCoarse(r))return!1;}return!0;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"hasCoarse\",{get:function get(){for(var e=0,t=this.units;e<t.length;e++){var r=t[e];if(c.a.isCoarse(r))return!0;}return!1;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"serialMapping\",{get:function get(){return this._props.serialMapping||(this._props.serialMapping=function(e){for(var t=e.units,r=e.elementCount,n=e.unitIndexMap,a=new Uint32Array(t.length),o=new Uint32Array(r),s=new Uint32Array(r),u=0,c=0,l=t.length;u<l;++u){a[u]=c;for(var d=t[u].elements,f=0,p=d.length;f<p;++f){var m=c+f;o[m]=u,s[m]=d[f];}c+=d.length;}return{cumulativeUnitElementCount:a,unitIndices:o,elementIndices:s,getSerialIndex:function getSerialIndex(e,t){return a[n.get(e.id)]+i.OrderedSet.indexOf(e.elements,t);}};}(this));},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"model\",{get:function get(){if(this._props.model)return this._props.model;if(this._props.representativeModel)return this._props.representativeModel;if(this._props.masterModel)return this._props.masterModel;var e=this.models;if(e.length>1)throw new Error(\"The structure is based on multiple models and has neither a master- nor a representative-model.\");return this._props.model=e[0],this._props.model;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"masterModel\",{get:function get(){return this._props.masterModel;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"representativeModel\",{get:function get(){return this._props.representativeModel;},enumerable:!1,configurable:!0}),e.prototype.hasElement=function(e){return!!this.unitMap.has(e.unit.id)&&i.SortedArray.has(this.unitMap.get(e.unit.id).elements,e.element);},e.prototype.getModelIndex=function(e){return this.models.indexOf(e);},e.prototype.initUnits=function(e){for(var t=i.IntMap.Mutable(),r=i.IntMap.Mutable(),n=0,a=!0,o=e.length>0?e[0].id:0,u=0,c=e.length;u<c;u++){var l=e[u];t.set(l.id,l),n+=l.elements.length,l.id<o&&(a=!1),o=l.id;}a||Object(s.p)(e,0,e.length,X,s.e);for(u=0,c=e.length;u<c;u++)r.set(e[u].id,u);return this._props.elementCount=n,{unitMap:t,unitIndexMap:r};},e;}();function X(e,t,r){return e[t].id-e[r].id;}!function(e){function t(e){return{kind:\"structure-loci\",structure:e};}function r(t,r){return new e(t,r);}e.Empty=new e([]),e.Loci=t,e.toStructureElementLoci=function(e){for(var t=[],r=0,n=e.units;r<n.length;r++){var a=n[r];t.push({unit:a,indices:i.Interval.ofBounds(0,a.elements.length)});}return u.a.Loci(e,t);},e.toSubStructureElementLoci=function(e,t){return W.a.toLociWithSourceUnits(W.a.Singletons(e,t));},e.isLoci=function(e){return!!e&&\"structure-loci\"===e.kind;},e.areLociEqual=function(e,t){return e.structure===t.structure;},e.isLociEmpty=function(e){return e.structure.isEmpty;},e.remapLoci=function(e,r){return r===e.structure?e:t(r);},e.create=r,e.ofTrajectory=function(t){if(0===t.length)return e.Empty;for(var n=[],i=0,o=0,s=t.length;o<s;++o){for(var u=a(t[o]),l=0,d=u.units.length;l<d;++l){var f=u.units[l],p=f.invariantId+i,m=f.chainGroupId+i,h=c.a.create(n.length,p,m,f.traits,f.kind,f.model,f.conformation.operator,f.elements);n.push(h);}i=n.length;}return r(n,{representativeModel:t[0],label:t[0].label});};function a(e){for(var t=e.atomicHierarchy.chainAtomSegments,r=e.atomicHierarchy.index,n=e.atomicHierarchy.chains.auth_asym_id,a=e.atomicChainOperatorMappinng,s=new f({label:e.label}),u=0;u<t.count;u++){for(var c=a.get(u)||o.a.Default,d=t.offsets[u],p=(q.AtomicHierarchy.chainResidueCount(e.atomicHierarchy,u),t.offsets[u+1],t.offsets[u],!1);u+1<t.count&&t.offsets[u+1]-t.offsets[u]==1&&t.offsets[u+2]-t.offsets[u+1]==1;){if(!0,r.getEntityFromChain(u)!==r.getEntityFromChain(u+1))break;if(n.value(u)!==n.value(u+1))break;if(a.get(u)!==a.get(u+1))break;p=!0,u++;}var m=i.SortedArray.ofBounds(d,t.offsets[u+1]);s.addUnit(0,e,c,m,p?1:0);}var h=e.coarseHierarchy;return h.isDefined&&(h.spheres.count>0&&l(s,e,e.coarseHierarchy.spheres,1),h.gaussians.count>0&&l(s,e,e.coarseHierarchy.gaussians,2)),s.getStructure();}function l(e,t,r,n){for(var a=r.chainElementSegments,s=0;s<a.count;s++){var u=i.SortedArray.ofBounds(a.offsets[s],a.offsets[s+1]);e.addUnit(n,t,o.a.Default,u,0);}}e.ofModel=a,e.transform=function(t,r){if(d.Mat4.isIdentity(r))return t;if(!d.Mat4.isRotationAndTranslation(r,o.a.RotationTranslationEpsilon))throw new Error(\"Only rotation/translation combination can be applied.\");for(var n=[],i=0,a=t.units;i<a.length;i++){var s=a[i],u=s.conformation.operator,c=o.a.create(u.name,r,u);n.push(s.applyOperator(s.id,c));}var l=t.coordinateSystem,f=o.a.compose(o.a.create(l.name,r,l),l);return new e(n,{parent:t,coordinateSystem:f});};var f=function(){function e(e){void 0===e&&(e={}),this.props=e,this.units=[],this.invariantId=Object(H.a)(),this.chainGroupId=-1,this.inChainGroup=!1,this.p=Object(d.Vec3)(),this.singleElementUnits=new Map();}return e.prototype.beginChainGroup=function(){this.chainGroupId++,this.inChainGroup=!0;},e.prototype.endChainGroup=function(){this.inChainGroup=!1;},e.prototype.addUnit=function(e,t,r,n,i,a){void 0===a&&(a=this.invariantId());var o=this.inChainGroup?this.chainGroupId:++this.chainGroupId,s=c.a.create(this.units.length,a,o,i,e,t,r,n);return this.add(s);},e.prototype.add=function(e){if(1===e.elements.length){e.conformation.position(e.elements[0],this.p);var t=[e.invariantId,this.p[0],this.p[1],this.p[2]].join(\"|\");if(this.singleElementUnits.has(t))return this.singleElementUnits.get(t);this.singleElementUnits.set(t,e);}return this.units.push(e),e;},e.prototype.addWithOperator=function(e,t){return this.add(e.applyOperator(this.units.length,t));},e.prototype.getStructure=function(){return r(this.units,this.props);},Object.defineProperty(e.prototype,\"isEmpty\",{get:function get(){return 0===this.units.length;},enumerable:!1,configurable:!0}),e;}();function p(e,t){return e===t||e.hashCode===t.hashCode&&y.a.areTransformGroupsEquivalent(e.unitSymmetryGroups,t.unitSymmetryGroups);}e.StructureBuilder=f,e.Builder=function(e){return void 0===e&&(e={}),new f(e);},e.hashCode=function(e){return e.hashCode;},e.conformationHash=function(e){return Object(s.m)(e.units.map(function(e){return c.a.conformationId(e);}).join(\"|\"));},e.areUnitAndIndicesEqual=function(e,t){if(e===t)return!0;if(e.elementCount!==t.elementCount)return!1;var r=e.units.length;if(r!==t.units.length)return!1;for(var n=0;n<r;n++)if(e.units[n].id!==t.units[n].id)return!1;for(n=0;n<r;n++)if(!i.SortedArray.areEqual(e.units[n].elements,t.units[n].elements))return!1;return!0;},e.areEquivalent=p,e.areRootsEquivalent=function(e,t){return p(e.root,t.root);},e.areRootsEqual=function(e,t){return e.root===t.root;};var m=function(){function e(e){this.structure=e,this.unitIndex=0,this.maxIdx=0,this.idx=-1,this.current=u.a.Location.create(e),this.hasNext=e.elementCount>0,this.hasNext&&(this.elements=e.units[0].elements,this.maxIdx=this.elements.length-1,this.current.unit=e.units[0]);}return e.prototype.move=function(){return this.advance(),this.current.element=this.elements[this.idx],this.current;},e.prototype.advance=function(){if(this.idx<this.maxIdx)return this.idx++,void(this.idx===this.maxIdx&&(this.hasNext=this.unitIndex+1<this.structure.units.length));this.idx=0,this.unitIndex++,this.unitIndex>=this.structure.units.length?this.hasNext=!1:(this.current.unit=this.structure.units[this.unitIndex],this.elements=this.current.unit.elements,this.maxIdx=this.elements.length-1,0===this.maxIdx&&(this.hasNext=this.unitIndex+1<this.structure.units.length));},e;}();e.ElementLocationIterator=m;var h=d.Vec3.zero();function g(e,t,r){for(var n=e.elements,i=e.conformation,a=i.position,o=i.r,s=h,u=Number.MAX_VALUE,c=0,l=n.length;c<l;c++){var f=n[c],p=d.Vec3.distance(t,a(f,s))-r-o(f);p<u&&(u=p);}return u;}function v(e,t,r){for(var n=e.units,i=Number.MAX_VALUE,a=0,o=n.length;a<o;a++){var s=g(n[a],t,r);s<i&&(i=s);}return i;}e.minDistanceToPoint=v;var b,_=d.Vec3.zero();function S(e){return e.unitSymmetryGroups.filter(function(e){return e.units[0].polymerElements.length>0;});}e.distance=function(e,t){if(0===e.elementCount||0===t.elementCount)return 0;for(var r=e.units,n=Number.MAX_VALUE,i=0,a=r.length;i<a;i++)for(var o=r[i],s=o.elements,u=o.conformation,c=u.position,l=u.r,d=0,f=s.length;d<f;d++){var p=s[d],m=v(t,c(p,_),l(p));m<n&&(n=m);}return n;},e.elementDescription=function(e){return 1===e.elementCount?\"1 element\":e.elementCount+\" elements\";},e.validUnitPair=function(e,t,r){return e.masterModel?t.model===r.model||t.model===e.masterModel||r.model===e.masterModel:t.model===r.model;},e.eachUnitPair=function(e,t,r){var n=r.maxRadius,i=r.validUnit,a=r.validUnitPair;if(e.units.some(function(e){return i(e);}))for(var o=e.lookup3d,s=d.Vec3.zero(),u=0,c=e.units;u<c.length;u++){var l=c[u];if(i(l)){var f=l.lookup3d.boundary.sphere;d.Vec3.transformMat4(s,f.center,l.conformation.operator.matrix);for(var p=o.findUnitIndices(s[0],s[1],s[2],f.radius+n),m=0;m<p.count;m++){var h=e.units[p.indices[m]];!i(h)||l.id>=h.id||!a(l,h)||(h.elements.length>=l.elements.length?t(l,h):t(h,l));}}}},e.DefaultSizeThresholds={smallResidueCount:10,mediumResidueCount:3e3,largeResidueCount:2e4,highSymmetryUnitCount:10,fiberResidueCount:15},function(e){e[e.Small=0]=\"Small\",e[e.Medium=1]=\"Medium\",e[e.Large=2]=\"Large\",e[e.Huge=3]=\"Huge\",e[e.Gigantic=4]=\"Gigantic\";}(b=e.Size||(e.Size={})),e.getSize=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=1);var a=Object(n.__assign)(Object(n.__assign)({},e.DefaultSizeThresholds),r);return t.polymerResidueCount>=a.largeResidueCount*i?function(e,t){var r=S(e);return r.length>=1&&r[0].units.length>t.highSymmetryUnitCount;}(t,a)?b.Huge:b.Gigantic:function(e,t){var r=S(e);return 1===r.length&&r[0].units.length>2&&r[0].units[0].polymerElements.length<t.fiberResidueCount;}(t,a)||t.polymerResidueCount<a.smallResidueCount*i?b.Small:t.polymerResidueCount<a.mediumResidueCount*i?b.Medium:b.Large;},e.Index=Q.a.createSimple(\"index\",\"root\");}(Y||(Y={}));var K=t.a=Y;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return m;});var n=r(57),i=r(11),a=r(1),o=r(135),s=r(290),u=r(4);function c(e,t,r){if(!e._rowCount)return[];for(var n=function(e){for(var t=e.id,r=e.matrix,n=e.vector,i=e._schema,o=new Map(),s=0,u=e._rowCount;s<u;s++){var c=a.Tensor.toMat4(Object(a.Mat4)(),i.matrix.space,r.value(s)),l=a.Tensor.toVec3(Object(a.Vec3)(),i.vector.space,n.value(s));a.Mat4.setTranslation(c,l),a.Mat4.setValue(c,3,3,1),o.set(t.value(s),c);}return o;}(r),i=[],o=0;o<e._rowCount;o++)i[i.length]=l(e,t,o,n);return i;}function l(e,t,r,n){for(var i=e.id.value(r),a=e.details.value(r),c=[],l=t.assembly_id,m=t.oper_expression,h=t.asym_id_list,g=0,v=t._rowCount;g<v;g++)l.value(g)===i&&(c[c.length]={assemblyId:i,expression:m.value(g),asymIds:h.value(g)});return s.a.create(i,a,function(e,t){return function(){for(var r=[],n=0,i=0;i<e.length;i++){var a=e[i],s=d(p(a.expression)),c=f(t,s,n,a.assemblyId),l=u.Queries.generators.atoms({chainTest:u.Queries.pred.and(u.Queries.pred.eq(function(e){return u.StructureProperties.unit.operator_name(e.element);},o.a.DefaultName),u.Queries.pred.inSet(function(e){return u.StructureProperties.chain.label_asym_id(e.element);},a.asymIds))});r[r.length]={selector:l,operators:c},n+=c.length;}return r;};}(c,n));}function d(e){for(var t=[],r=[],n=0;n<e.length;n++)r[n]=\"\";return function e(t,r,n,i){if(n<0)return void(r[r.length]=i.slice(0));for(var a=t[n],o=a.length,s=0;s<o;s++)i[n]=a[s],e(t,r,n-1,i);}(e,t,e.length-1,r),t;}function f(e,t,r,n){for(var i=[],s=r,u=0,c=t;u<c.length;u++){for(var l=c[u],d=a.Mat4.identity(),f=0;f<l.length;f++)a.Mat4.mul(d,d,e.get(l[f]));s++,i[i.length]=o.a.create(\"ASM_\"+s,d,{assembly:{id:n,operId:s,operList:l}});}return i;}function p(e){for(var t,r=/\\(?([^\\(\\)]+)\\)?]*/g,n=[],i=[];t=r.exec(e);)n[n.length]=t[1];return n.forEach(function(e){var t=[];e.split(\",\").forEach(function(e){var r=e.indexOf(\"-\");if(r>0)for(var n=parseInt(e.substring(0,r)),i=parseInt(e.substr(r+1)),a=n;a<=i;a++)t[t.length]=a.toString();else t[t.length]=e.trim();}),i[i.length]=t;}),i;}var m,h,g=r(188);function v(e){if(0!==e._rowCount){for(var t=e.id,r=e.matrix,o=e.vector,s=n.a.struct_ncs_oper.matrix.space,u=n.a.struct_ncs_oper.vector.space,c=[],l=0;l<e._rowCount;l++){var d=a.Tensor.toMat3(Object(a.Mat3)(),s,r.value(l)),f=a.Tensor.toVec3(Object(a.Vec3)(),u,o.value(l));if(i.h.checkIfRotationAndTranslation(d,f)&&(\"given\"!==e.code.value(l)||a.Mat3.isIdentity(d)||a.Vec3.isZero(f))){var p=t.value(l);c[c.length]=i.h.ofRotationAndOffset(\"ncs_\"+p,d,f,p);}}return c;}}(h=m||(m={})).Descriptor={name:\"model_symmetry\"},h.Provider=g.a.create(h.Descriptor),h.fromData=function(e){var t=c(e.pdbx_struct_assembly,e.pdbx_struct_assembly_gen,e.pdbx_struct_oper_list),r=function(e,t){if(0===e._rowCount||0===t._rowCount)return i.e.ZeroP1;var r=function(e){var t=e.Int_Tables_number.value(0),r=e[\"space_group_name_H-M\"].value(0);return e.Int_Tables_number.isDefined?e[\"space_group_name_H-M\"].isDefined?r:t:r;}(e),n=i.f.create(r,a.Vec3.create(t.length_a.value(0),t.length_b.value(0),t.length_c.value(0)),a.Vec3.scale(a.Vec3.zero(),a.Vec3.create(t.angle_alpha.value(0),t.angle_beta.value(0),t.angle_gamma.value(0)),Math.PI/180));return i.e.create(n);}(e.symmetry,e.cell);return{assemblies:t,spacegroup:r,isNonStandardCrystalFrame:(e.atom_sites._rowCount,!1),ncsOperators:v(e.struct_ncs_oper)};};},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"AssetManager\",function(){return c;}),r.d(t,\"Asset\",function(){return n;});var n,i=r(0),a=r(194),o=r(9),s=r(177),u=r(16);!function(e){function t(e,t){return Object(i.__assign)({kind:\"url\",id:a.a.create22(),url:e},t);}e.Url=t,e.File=function(e){return{kind:\"file\",id:a.a.create22(),name:e.name,file:e};},e.isUrl=function(e){return\"url\"===(null==e?void 0:e.kind);},e.isFile=function(e){return\"file\"===(null==e?void 0:e.kind);},e.Wrapper=function(e,t,r){return{data:e,dispose:function dispose(){r.release(t);}};},e.getUrl=function(e){return\"string\"==typeof e?e:e.url;},e.getUrlAsset=function(e,r,n){return\"string\"==typeof r?e.tryFindUrl(r,n)||t(r,{body:n}):r;};}(n||(n={}));var c=function(){function e(){this._assets=new Map();}return Object.defineProperty(e.prototype,\"assets\",{get:function get(){return Object(o.n)(this._assets.values());},enumerable:!1,configurable:!0}),e.prototype.tryFindUrl=function(e,t){for(var r=this.assets.values();;){var i=r.next();if(i.done)return;var a=i.value.asset;if(n.isUrl(a)&&a.url===e&&(a.body||\"\")===(t||\"\"))return a;}},e.prototype.set=function(e,t){this._assets.set(e.id,{asset:e,file:t,refCount:0});},e.prototype.resolve=function(e,t,r){var a=this;return void 0===r&&(r=!0),n.isUrl(e)?u.b.create(\"Download \"+(e.title||e.url),function(o){return Object(i.__awaiter)(a,void 0,void 0,function(){var a,u,c,l,d,f,p,m,h;return Object(i.__generator)(this,function(g){switch(g.label){case 0:return this._assets.has(e.id)?((a=this._assets.get(e.id)).refCount++,c=(u=n).Wrapper,[4,Object(s.c)(a.file,t).runInContext(o)]):[3,2];case 1:return[2,c.apply(u,[g.sent(),e,this])];case 2:return r?[3,4]:(d=(l=n).Wrapper,[4,Object(s.a)(Object(i.__assign)(Object(i.__assign)({},e),{type:t})).runInContext(o)]);case 3:return[2,d.apply(l,[g.sent(),e,this])];case 4:return[4,Object(s.a)(Object(i.__assign)(Object(i.__assign)({},e),{type:\"binary\"})).runInContext(o)];case 5:return f=g.sent(),p=new File([f],\"raw-data\"),this._assets.set(e.id,{asset:e,file:p,refCount:1}),h=(m=n).Wrapper,[4,Object(s.c)(p,t).runInContext(o)];case 6:return[2,h.apply(m,[g.sent(),e,this])];}});});}):u.b.create(\"Read \"+e.name,function(o){return Object(i.__awaiter)(a,void 0,void 0,function(){var a,u,c,l,d;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return this._assets.has(e.id)?((a=this._assets.get(e.id)).refCount++,c=(u=n).Wrapper,[4,Object(s.c)(a.file,t).runInContext(o)]):[3,2];case 1:return[2,c.apply(u,[i.sent(),e,this])];case 2:if(!(e.file instanceof File))throw new Error(\"Cannot resolve file asset '\"+e.name+\"' (\"+e.id+\")\");return r&&this._assets.set(e.id,{asset:e,file:e.file,refCount:1}),d=(l=n).Wrapper,[4,Object(s.c)(e.file,t).runInContext(o)];case 3:return[2,d.apply(l,[i.sent(),e,this])];}});});});},e.prototype.release=function(e){var t=this._assets.get(e.id);t&&(t.refCount--,t.refCount<=0&&this._assets.delete(e.id));},e;}();},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return _;}),r.d(t,\"a\",function(){return S;}),r.d(t,\"b\",function(){return O;});var n=r(96),i=r(0),a=r(98),o=r(99),s=r(17),u=r(92),c=r(5),l={uColor:Object(s.i)(\"v3\"),uColorTexDim:Object(s.i)(\"v2\"),tColor:Object(s.h)(\"image-uint8\",\"rgb\",\"ubyte\",\"nearest\"),dColorType:Object(s.c)(\"string\",[\"uniform\",\"instance\",\"group\",\"group_instance\"]),uMarkerTexDim:Object(s.i)(\"v2\"),tMarker:Object(s.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),uOverpaintTexDim:Object(s.i)(\"v2\"),tOverpaint:Object(s.h)(\"image-uint8\",\"rgba\",\"ubyte\",\"nearest\"),dOverpaint:Object(s.c)(\"boolean\"),uTransparencyTexDim:Object(s.i)(\"v2\"),tTransparency:Object(s.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),dTransparency:Object(s.c)(\"boolean\"),dTransparencyVariant:Object(s.c)(\"string\",[\"single\",\"multi\"]),dClipObjectCount:Object(s.c)(\"number\"),dClipVariant:Object(s.c)(\"string\",[\"instance\",\"pixel\"]),uClippingTexDim:Object(s.i)(\"v2\"),tClipping:Object(s.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),dClipping:Object(s.c)(\"boolean\"),uInstanceCount:Object(s.i)(\"i\"),uGroupCount:Object(s.i)(\"i\"),uInvariantBoundingSphere:Object(s.i)(\"v4\"),aInstance:Object(s.a)(\"float32\",1,1),aTransform:Object(s.a)(\"float32\",16,1),drawCount:Object(s.j)(\"number\"),instanceCount:Object(s.j)(\"number\"),alpha:Object(s.j)(\"number\"),matrix:Object(s.j)(\"m4\"),transform:Object(s.j)(\"float32\"),extraTransform:Object(s.j)(\"float32\"),boundingSphere:Object(s.j)(\"sphere\"),invariantBoundingSphere:Object(s.j)(\"sphere\"),aPosition:Object(s.a)(\"float32\",3,0),elements:Object(s.d)(\"uint32\"),uAlpha:Object(s.i)(\"f\"),uIsoValue:Object(s.i)(\"f\"),uBboxMin:Object(s.i)(\"v3\"),uBboxMax:Object(s.i)(\"v3\"),uBboxSize:Object(s.i)(\"v3\"),dMaxSteps:Object(s.c)(\"number\"),uTransform:Object(s.i)(\"m4\"),uGridDim:Object(s.i)(\"v3\"),dRenderMode:Object(s.c)(\"string\",[\"isosurface\",\"volume\"]),tTransferTex:Object(s.h)(\"image-uint8\",\"rgba\",\"ubyte\",\"linear\"),dGridTexType:Object(s.c)(\"string\",[\"2d\",\"3d\"]),uGridTexDim:Object(s.i)(\"v3\"),tGridTex:Object(s.h)(\"texture\",\"rgba\",\"float\",\"nearest\")};var d=Object(i.__assign)(Object(i.__assign)({},s.b),{aPosition:Object(s.a)(\"float32\",3,0),aNormal:Object(s.a)(\"float32\",3,0),elements:Object(s.d)(\"uint32\"),dFlatShaded:Object(s.c)(\"boolean\"),dDoubleSided:Object(s.c)(\"boolean\"),dFlipSided:Object(s.c)(\"boolean\"),dIgnoreLight:Object(s.c)(\"boolean\")});var f=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.b),s.g),{aPosition:Object(s.a)(\"float32\",3,0),dPointSizeAttenuation:Object(s.c)(\"boolean\"),dPointFilledCircle:Object(s.c)(\"boolean\"),uPointEdgeBleach:Object(s.i)(\"f\")});var p=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.b),s.g),{aMapping:Object(s.a)(\"float32\",2,0),aStart:Object(s.a)(\"float32\",3,0),aEnd:Object(s.a)(\"float32\",3,0),elements:Object(s.d)(\"uint32\"),dLineSizeAttenuation:Object(s.c)(\"boolean\"),dDoubleSided:Object(s.c)(\"boolean\"),dFlipSided:Object(s.c)(\"boolean\")});var m=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.b),s.g),{aPosition:Object(s.a)(\"float32\",3,0),aMapping:Object(s.a)(\"float32\",2,0),elements:Object(s.d)(\"uint32\"),padding:Object(s.j)(\"number\"),dDoubleSided:Object(s.c)(\"boolean\"),dIgnoreLight:Object(s.c)(\"boolean\")});var h=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.b),s.g),{aPosition:Object(s.a)(\"float32\",3,0),aMapping:Object(s.a)(\"float32\",2,0),aDepth:Object(s.a)(\"float32\",1,0),elements:Object(s.d)(\"uint32\"),aTexCoord:Object(s.a)(\"float32\",2,0),tFont:Object(s.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"linear\"),padding:Object(s.j)(\"number\"),uBorderWidth:Object(s.i)(\"f\"),uBorderColor:Object(s.i)(\"v3\"),uOffsetX:Object(s.i)(\"f\"),uOffsetY:Object(s.i)(\"f\"),uOffsetZ:Object(s.i)(\"f\"),uBackgroundColor:Object(s.i)(\"v3\"),uBackgroundOpacity:Object(s.i)(\"f\")});var g=Object(i.__assign)(Object(i.__assign)({},s.b),{uGeoTexDim:Object(s.i)(\"v2\"),tPositionGroup:Object(s.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),tNormal:Object(s.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),dFlatShaded:Object(s.c)(\"boolean\"),dDoubleSided:Object(s.c)(\"boolean\"),dFlipSided:Object(s.c)(\"boolean\"),dGeoTexture:Object(s.c)(\"boolean\")});var v=r(218),b=Object(i.__assign)(Object(i.__assign)({},s.b),{aPosition:Object(s.a)(\"float32\",3,0),aUv:Object(s.a)(\"float32\",2,0),elements:Object(s.d)(\"uint32\"),uImageTexDim:Object(s.i)(\"v2\"),tImageTex:Object(s.h)(\"image-float32\",\"rgba\",\"float\",\"nearest\"),tGroupTex:Object(s.h)(\"image-float32\",\"alpha\",\"float\",\"nearest\"),dInterpolation:Object(s.c)(\"string\",v.b)});var y=Object(n.a)(0,2147483647),_=Object(n.a)(0,2147483647);function S(e,t,r,n){return{id:y(),type:e,values:t,state:r,materialId:n};}function O(e,t){switch(t.type){case\"mesh\":return function(e,t,r,n,l){var f=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),d),p={uObjectId:c.e.create(t)},m=u.d,h=Object(o.b)(e,\"triangles\",m,f,Object(i.__assign)(Object(i.__assign)({},r),p),l);return Object(a.b)(h,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"points\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),f),p={uObjectId:c.e.create(t)},m=u.e,h=Object(o.b)(e,\"points\",m,d,Object(i.__assign)(Object(i.__assign)({},r),p),l);return Object(a.b)(h,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"spheres\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),m),f={uObjectId:c.e.create(t)},p=u.g,h=Object(o.b)(e,\"triangles\",p,d,Object(i.__assign)(Object(i.__assign)({},r),f),l);return Object(a.b)(h,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"text\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),h),f={uObjectId:c.e.create(t)},p=u.h,m=Object(o.b)(e,\"triangles\",p,d,Object(i.__assign)(Object(i.__assign)({},r),f),l);return Object(a.b)(m,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"lines\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),p),f={uObjectId:c.e.create(t)},m=u.c,h=Object(o.b)(e,\"triangles\",m,d,Object(i.__assign)(Object(i.__assign)({},r),f),l);return Object(a.b)(h,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"direct-volume\":return function(e,t,r,n,d){var f=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),l),p={uObjectId:c.e.create(t)},m=u.a,h=Object(o.b)(e,\"triangles\",m,f,Object(i.__assign)(Object(i.__assign)({},r),p),d);return Object(a.b)(h,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"image\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),b),f={uObjectId:c.e.create(t)},p=u.b,m=Object(o.b)(e,\"triangles\",p,d,Object(i.__assign)(Object(i.__assign)({},r),f),l);return Object(a.b)(m,r,n);}(e,t.id,t.values,t.state,t.materialId);case\"texture-mesh\":return function(e,t,r,n,l){var d=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},s.e),s.f),g),f={uObjectId:c.e.create(t)},p=u.d,m=Object(o.b)(e,\"triangles\",p,d,Object(i.__assign)(Object(i.__assign)({},r),f),l);return Object(a.b)(m,r,n);}(e,t.id,t.values,t.state,t.materialId);}throw new Error(\"unsupported type\");}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(21),i=r(35);function a(e,t){return function(r){if(\"function\"!=typeof e)throw new TypeError(\"argument is not a function. Are you looking for `mapTo()`?\");return r.lift(new o(e,t));};}var o=function(){function e(e,t){this.project=e,this.thisArg=t;}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg));},e;}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.project=r,i.count=0,i.thisArg=n||i,i;}return n.a(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++);}catch(e){return void this.destination.error(e);}this.destination.next(t);},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(5),i=r(53),a=r(24),o=r(1),s=r(143),u=r(144);function c(e,t,r){switch(u.a.getGranularity(e,t.granularity)){case\"uniform\":return function(e,t,r){return function(e,t){return t?(n.e.update(t.uColor,a.Color.toVec3Normalized(t.uColor.ref.value,e)),\"uniform\"!==t.dColorType.ref.value&&n.e.update(t.dColorType,\"uniform\"),t):{uColor:n.e.create(a.Color.toVec3Normalized(Object(o.Vec3)(),e)),tColor:n.e.create({array:new Uint8Array(3),width:1,height:1}),uColorTexDim:n.e.create(o.Vec2.create(1,1)),dColorType:n.e.create(\"uniform\")};}(t(s.b,!1),r);}(0,t.color,r);case\"group\":return function(e,t,r){var n=e.groupCount,o=Object(i.c)(Math.max(1,n),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext&&!e.isNextNewInstance;){var s=e.move(),u=s.location,c=s.isSecondary,d=s.groupIndex;a.Color.toArray(t(u,c),o.array,3*d);}return l(o,\"group\",r);}(e,t.color,r);case\"groupInstance\":return function(e,t,r){var n=e.groupCount,o=e.instanceCount*n,s=Object(i.c)(Math.max(1,o),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext;){var u=e.move(),c=u.location,d=u.isSecondary,f=u.index;a.Color.toArray(t(c,d),s.array,3*f);}return l(s,\"groupInstance\",r);}(e,t.color,r);case\"instance\":return function(e,t,r){var n=e.instanceCount,o=Object(i.c)(Math.max(1,n),3,Uint8Array,r&&r.tColor.ref.value.array);e.reset();for(;e.hasNext;){var s=e.move(),u=s.location,c=s.isSecondary,d=s.instanceIndex;a.Color.toArray(t(u,c),o.array,3*d),e.skipInstance();}return l(o,\"instance\",r);}(e,t.color,r);}}function l(e,t,r){return r?(n.e.update(r.tColor,e),n.e.update(r.uColorTexDim,o.Vec2.create(e.width,e.height)),r.dColorType.ref.value!==t&&n.e.update(r.dColorType,t),r):{uColor:n.e.create(o.Vec3.zero()),tColor:n.e.create(e),uColorTexDim:n.e.create(o.Vec2.create(e.width,e.height)),dColorType:n.e.create(t)};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;});var n=r(0),i=r(85),a=r(180),o=r(30),s=function(){function e(){this.subs=void 0;}return e.prototype.subscribe=function(e,t){var r=this;void 0===this.subs&&(this.subs=[]);var n=e.subscribe(t);return this.subs.push(n),{unsubscribe:function unsubscribe(){n&&r.subs&&Object(o.arraySetRemove)(r.subs,n)&&(n.unsubscribe(),n=void 0);}};},Object.defineProperty(e.prototype,\"ev\",{get:function get(){return this._ev||(this._ev=a.RxEventHelper.create());},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){if(this._ev&&this._ev.dispose(),this.subs){for(var e=0,t=this.subs;e<t.length;e++){t[e].unsubscribe();}this.subs=void 0;}},e;}(),u=function(e){function t(t){var r=e.call(this)||this;return r._state=t,r;}return Object(n.__extends)(t,e),t.prototype.updateState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.state,n=Object(i.e)(r,e);return n!==r&&(this._state=n,!0);},Object.defineProperty(t.prototype,\"state\",{get:function get(){return this._state;},enumerable:!1,configurable:!0}),t;}(s);},function(e,t,r){\"use strict\";var n=r(399);r.o(n,\"AtomNumber\")&&r.d(t,\"AtomNumber\",function(){return n.AtomNumber;}),r.o(n,\"AtomWeight\")&&r.d(t,\"AtomWeight\",function(){return n.AtomWeight;}),r.o(n,\"AtomicHierarchy\")&&r.d(t,\"AtomicHierarchy\",function(){return n.AtomicHierarchy;}),r.o(n,\"AtomicNumbers\")&&r.d(t,\"AtomicNumbers\",function(){return n.AtomicNumbers;}),r.o(n,\"AtomsSchema\")&&r.d(t,\"AtomsSchema\",function(){return n.AtomsSchema;}),r.o(n,\"ChainsSchema\")&&r.d(t,\"ChainsSchema\",function(){return n.ChainsSchema;}),r.o(n,\"ResiduesSchema\")&&r.d(t,\"ResiduesSchema\",function(){return n.ResiduesSchema;}),r.o(n,\"VdwRadius\")&&r.d(t,\"VdwRadius\",function(){return n.VdwRadius;});var i=r(303);r.d(t,\"AtomicHierarchy\",function(){return i.a;}),r.d(t,\"AtomsSchema\",function(){return i.c;}),r.d(t,\"ChainsSchema\",function(){return i.d;}),r.d(t,\"ResiduesSchema\",function(){return i.e;});var a=r(304);r.d(t,\"AtomNumber\",function(){return a.a;}),r.d(t,\"AtomWeight\",function(){return a.b;}),r.d(t,\"AtomicNumbers\",function(){return a.c;}),r.d(t,\"VdwRadius\",function(){return a.d;});},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Script\",function(){return T;});var n=r(0),i=r(55),a=r(132),o=r(18),s=r(12),u=r(15),c=r(219),l=r(10);function d(e){return Object.keys(e).filter(function(e){return!isNaN(e);}).map(function(e){return+e;}).sort(function(e,t){return e-t;}).map(function(t){return e[t];});}function f(e,t,r){return e&&void 0!==e[t]?e[t]:r;}function p(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return{kind:\"alias\",aliases:t,symbol:e};}function m(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return e.info.namespace=\"molscript-macro\",e.id=\"molscript-macro.\"+e.info.name,{kind:\"macro\",symbol:e,translate:t,aliases:Object(n.__spreadArrays)([e.info.name],r)};}function h(e){return\"alias\"===e.kind||\"macro\"===e.kind;}var g=[[\"Core symbols\",p(s.a.core.type.bool,\"bool\"),p(s.a.core.type.num,\"num\"),p(s.a.core.type.str,\"str\"),p(s.a.core.type.regex,\"regex\"),p(s.a.core.type.list,\"list\"),p(s.a.core.type.set,\"set\"),p(s.a.core.type.compositeKey,\"composite-key\"),p(s.a.core.logic.not,\"not\"),p(s.a.core.logic.and,\"and\"),p(s.a.core.logic.or,\"or\"),p(s.a.core.ctrl.if,\"if\"),p(s.a.core.ctrl.fn,\"fn\"),p(s.a.core.ctrl.eval,\"eval\"),p(s.a.core.math.add,\"add\",\"+\"),p(s.a.core.math.sub,\"sub\",\"-\"),p(s.a.core.math.mult,\"mult\",\"*\"),p(s.a.core.math.div,\"div\",\"/\"),p(s.a.core.math.pow,\"pow\",\"**\"),p(s.a.core.math.mod,\"mod\"),p(s.a.core.math.min,\"min\"),p(s.a.core.math.max,\"max\"),p(s.a.core.math.floor,\"floor\"),p(s.a.core.math.ceil,\"ceil\"),p(s.a.core.math.roundInt,\"round\"),p(s.a.core.math.abs,\"abs\"),p(s.a.core.math.sqrt,\"sqrt\"),p(s.a.core.math.cbrt,\"cbrt\"),p(s.a.core.math.sin,\"sin\"),p(s.a.core.math.cos,\"cos\"),p(s.a.core.math.tan,\"tan\"),p(s.a.core.math.asin,\"asin\"),p(s.a.core.math.acos,\"acos\"),p(s.a.core.math.atan,\"atan\"),p(s.a.core.math.sinh,\"sinh\"),p(s.a.core.math.cosh,\"cosh\"),p(s.a.core.math.tanh,\"tanh\"),p(s.a.core.math.exp,\"exp\"),p(s.a.core.math.log,\"log\"),p(s.a.core.math.log10,\"log10\"),p(s.a.core.math.atan2,\"atan2\"),p(s.a.core.rel.eq,\"eq\",\"=\"),p(s.a.core.rel.neq,\"neq\",\"!=\"),p(s.a.core.rel.lt,\"lt\",\"<\"),p(s.a.core.rel.lte,\"lte\",\"<=\"),p(s.a.core.rel.gr,\"gr\",\">\"),p(s.a.core.rel.gre,\"gre\",\">=\"),p(s.a.core.rel.inRange,\"in-range\"),p(s.a.core.str.concat,\"concat\"),p(s.a.core.str.match,\"regex.match\"),p(s.a.core.list.getAt,\"list.get\"),p(s.a.core.set.has,\"set.has\"),p(s.a.core.set.isSubset,\"set.subset\")],[\"Structure\",[\"Types\",p(s.a.structureQuery.type.entityType,\"ent-type\"),p(s.a.structureQuery.type.authResidueId,\"auth-resid\"),p(s.a.structureQuery.type.labelResidueId,\"label-resid\"),p(s.a.structureQuery.type.ringFingerprint,\"ringfp\"),p(s.a.structureQuery.type.bondFlags,\"bond-flags\")],[\"Slots\",p(s.a.structureQuery.slot.elementSetReduce,\"atom.set.reduce.value\")],[\"Generators\",p(s.a.structureQuery.generator.atomGroups,\"sel.atom.atom-groups\"),p(s.a.structureQuery.generator.queryInSelection,\"sel.atom.query-in-selection\"),p(s.a.structureQuery.generator.rings,\"sel.atom.rings\"),p(s.a.structureQuery.generator.empty,\"sel.atom.empty\"),p(s.a.structureQuery.generator.all,\"sel.atom.all\"),p(s.a.structureQuery.generator.bondedAtomicPairs,\"sel.atom.bonded-pairs\"),m(Object(o.d)(\"sel.atom.atoms\",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test applied to each atom.\"})}),c.a.ElementSelection,\"A selection of singleton atom sets.\"),function(e){return l.MolScriptBuilder.struct.generator.atomGroups({\"atom-test\":f(e,0,!0)});}),m(Object(o.d)(\"sel.atom.res\",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test applied to the 1st atom of each residue.\"})}),c.a.ElementSelection,\"A selection of atom sets grouped by residue.\"),function(e){return l.MolScriptBuilder.struct.generator.atomGroups({\"residue-test\":f(e,0,!0),\"group-by\":l.MolScriptBuilder.ammp(\"residueKey\")});}),m(Object(o.d)(\"sel.atom.chains\",o.b.Dictionary({0:Object(o.a)(u.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test applied to the 1st atom of each chain.\"})}),c.a.ElementSelection,\"A selection of atom sets grouped by chain.\"),function(e){return l.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":f(e,0,!0),\"group-by\":l.MolScriptBuilder.ammp(\"chainKey\")});})],[\"Modifiers\",p(s.a.structureQuery.modifier.queryEach,\"sel.atom.query-each\"),p(s.a.structureQuery.modifier.intersectBy,\"sel.atom.intersect-by\"),p(s.a.structureQuery.modifier.exceptBy,\"sel.atom.except-by\"),p(s.a.structureQuery.modifier.unionBy,\"sel.atom.union-by\"),p(s.a.structureQuery.modifier.union,\"sel.atom.union\"),p(s.a.structureQuery.modifier.cluster,\"sel.atom.cluster\"),p(s.a.structureQuery.modifier.includeSurroundings,\"sel.atom.include-surroundings\"),p(s.a.structureQuery.modifier.includeConnected,\"sel.atom.include-connected\"),p(s.a.structureQuery.modifier.expandProperty,\"sel.atom.expand-property\")],[\"Filters\",p(s.a.structureQuery.filter.pick,\"sel.atom.pick\"),p(s.a.structureQuery.filter.first,\"sel.atom.first\"),p(s.a.structureQuery.filter.withSameAtomProperties,\"sel.atom.with-same-atom-properties\"),p(s.a.structureQuery.filter.intersectedBy,\"sel.atom.intersected-by\"),p(s.a.structureQuery.filter.within,\"sel.atom.within\"),p(s.a.structureQuery.filter.isConnectedTo,\"sel.atom.is-connected-to\")],[\"Combinators\",p(s.a.structureQuery.combinator.intersect,\"sel.atom.intersect\"),p(s.a.structureQuery.combinator.merge,\"sel.atom.merge\"),p(s.a.structureQuery.combinator.distanceCluster,\"sel.atom.dist-cluster\")],[\"Atom Set Properties\",p(s.a.structureQuery.atomSet.atomCount,\"atom.set.atom-count\"),p(s.a.structureQuery.atomSet.countQuery,\"atom.set.count-query\"),p(s.a.structureQuery.atomSet.reduce,\"atom.set.reduce\"),p(s.a.structureQuery.atomSet.propertySet,\"atom.set.property\")],[\"Atom Properties\",p(s.a.structureQuery.atomProperty.core.elementSymbol,\"atom.el\"),p(s.a.structureQuery.atomProperty.core.vdw,\"atom.vdw\"),p(s.a.structureQuery.atomProperty.core.mass,\"atom.mass\"),p(s.a.structureQuery.atomProperty.core.atomicNumber,\"atom.atomic-number\"),p(s.a.structureQuery.atomProperty.core.x,\"atom.x\"),p(s.a.structureQuery.atomProperty.core.y,\"atom.y\"),p(s.a.structureQuery.atomProperty.core.z,\"atom.z\"),p(s.a.structureQuery.atomProperty.core.sourceIndex,\"atom.src-index\"),p(s.a.structureQuery.atomProperty.core.operatorName,\"atom.op-name\"),p(s.a.structureQuery.atomProperty.core.modelIndex,\"atom.model-index\"),p(s.a.structureQuery.atomProperty.core.modelLabel,\"atom.model-label\"),p(s.a.structureQuery.atomProperty.core.atomKey,\"atom.key\"),p(s.a.structureQuery.atomProperty.core.bondCount,\"atom.bond-count\"),p(s.a.structureQuery.atomProperty.topology.connectedComponentKey,\"atom.key.molecule\"),p(s.a.structureQuery.atomProperty.macromolecular.authResidueId,\"atom.auth-resid\"),p(s.a.structureQuery.atomProperty.macromolecular.labelResidueId,\"atom.label-resid\"),p(s.a.structureQuery.atomProperty.macromolecular.residueKey,\"atom.key.res\"),p(s.a.structureQuery.atomProperty.macromolecular.chainKey,\"atom.key.chain\"),p(s.a.structureQuery.atomProperty.macromolecular.entityKey,\"atom.key.entity\"),p(s.a.structureQuery.atomProperty.macromolecular.isHet,\"atom.is-het\"),p(s.a.structureQuery.atomProperty.macromolecular.id,\"atom.id\"),p(s.a.structureQuery.atomProperty.macromolecular.label_atom_id,\"atom.label_atom_id\"),p(s.a.structureQuery.atomProperty.macromolecular.label_alt_id,\"atom.label_alt_id\",\"atom.altloc\"),p(s.a.structureQuery.atomProperty.macromolecular.label_comp_id,\"atom.label_comp_id\"),p(s.a.structureQuery.atomProperty.macromolecular.label_asym_id,\"atom.label_asym_id\"),p(s.a.structureQuery.atomProperty.macromolecular.label_entity_id,\"atom.label_entity_id\"),p(s.a.structureQuery.atomProperty.macromolecular.label_seq_id,\"atom.label_seq_id\"),p(s.a.structureQuery.atomProperty.macromolecular.auth_atom_id,\"atom.auth_atom_id\",\"atom.name\"),p(s.a.structureQuery.atomProperty.macromolecular.auth_comp_id,\"atom.auth_comp_id\",\"atom.resname\"),p(s.a.structureQuery.atomProperty.macromolecular.auth_asym_id,\"atom.auth_asym_id\",\"atom.chain\"),p(s.a.structureQuery.atomProperty.macromolecular.auth_seq_id,\"atom.auth_seq_id\",\"atom.resno\"),p(s.a.structureQuery.atomProperty.macromolecular.pdbx_PDB_ins_code,\"atom.pdbx_PDB_ins_code\",\"atom.inscode\"),p(s.a.structureQuery.atomProperty.macromolecular.pdbx_formal_charge,\"atom.pdbx_formal_charge\"),p(s.a.structureQuery.atomProperty.macromolecular.occupancy,\"atom.occupancy\"),p(s.a.structureQuery.atomProperty.macromolecular.B_iso_or_equiv,\"atom.B_iso_or_equiv\",\"atom.bfactor\"),p(s.a.structureQuery.atomProperty.macromolecular.entityType,\"atom.entity-type\"),p(s.a.structureQuery.atomProperty.macromolecular.entitySubtype,\"atom.entity-subtype\"),p(s.a.structureQuery.atomProperty.macromolecular.entityPrdId,\"atom.entity-prd-id\"),p(s.a.structureQuery.atomProperty.macromolecular.entityDescription,\"atom.entity-description\"),p(s.a.structureQuery.atomProperty.macromolecular.objectPrimitive,\"atom.object-primitive\"),p(s.a.structureQuery.atomProperty.macromolecular.chemCompType,\"atom.chem-comp-type\"),p(s.a.structureQuery.atomProperty.macromolecular.secondaryStructureKey,\"atom.key.sec-struct\"),p(s.a.structureQuery.atomProperty.macromolecular.isModified,\"atom.is-modified\"),p(s.a.structureQuery.atomProperty.macromolecular.modifiedParentName,\"atom.modified-parent\")],[\"Bond Properties\",p(s.a.structureQuery.bondProperty.order,\"bond.order\"),p(s.a.structureQuery.bondProperty.length,\"bond.length\"),p(s.a.structureQuery.bondProperty.atomA,\"bond.atom-a\"),p(s.a.structureQuery.bondProperty.atomB,\"bond.atom-b\"),m(Object(o.d)(\"bond.is\",o.b.List(c.a.BondFlag),u.a.Bool,\"Test if the current bond has at least one (or all if partial = false) of the specified flags: \"+u.a.oneOfValues(c.a.BondFlag).join(\", \")),function(e){return l.MolScriptBuilder.core.flags.hasAny([l.MolScriptBuilder.struct.bondProperty.flags(),l.MolScriptBuilder.struct.type.bondFlags(d(e))]);})]]],v=[];!function e(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];h(i)?v.push(i):i instanceof Array&&e(i);}}(g);var b=function(){for(var e=[],t=Object.create(null),r=i.c.create(),n=i.c.create(),a=0,o=v;a<o.length;a++){for(var s=o[a],c=0,l=s.aliases;c<l.length;c++){var d=l[c];if(e.push([d,s]),t[d])throw new Error(\"Alias '\"+d+\"' already in use.\");t[d]=s;}var f=s.symbol.args;if(\"dictionary\"===f.kind)for(var p=0,m=Object.keys(f.map);p<m.length;p++){d=m[p];isNaN(d)&&i.c.add(r,d,d);var h=f.map[d];\"oneof\"===h.type.kind&&u.a.oneOfValues(h.type).forEach(function(e){return i.c.add(n,e,e);});}else\"oneof\"===f.type.kind&&u.a.oneOfValues(f.type).forEach(function(e){return i.c.add(n,e,e);});}return{symbolList:e,symbolMap:t,namedArgs:r.array,constants:n.array};}(),y=(b.constants,b.namedArgs,b.symbolMap);b.symbolList;function _(e){return function e(t){if(a.a.isLiteral(t))return t;if(a.a.isSymbol(t)){if(!y[t.name])return t;var r=y[t.name];if(\"alias\"===r.kind)return a.a.Symbol(y[t.name].symbol.id);throw r.translate([]);}var n=a.a.isSymbol(t.head)&&!!y[t.head.name]&&\"macro\"===y[t.head.name].kind,i=n?t.head:e(t.head),o=i!==t.head;if(!t.args)return n?e(t.head):o?a.a.Apply(i):t;var s,u=!1;if(a.a.isArgumentsArray(t.args)){s=[];for(var c=0,l=t.args.length;c<l;c++){(p=t.args[c])!==(m=e(p))&&(u=!0),s[s.length]=m;}if(u||(s=t.args),!n&&!o&&!u)return t;}else{s={};for(var d=0,f=Object.keys(t.args);d<f.length;d++){var p,m,h=f[d];(p=t.args[h])!==(m=e(p))&&(u=!0),s[h]=m;}if(!n&&!o&&!u)return t;u||(s=t.args);}if(n){var g=y[t.head.name];return\"macro\"!==g.kind?a.a.Apply(i,s):g.translate(s);}return a.a.Apply(i,s);}(e);}var S,O=function(){function e(e){this._=e;}return e.prototype.parse=function(t){var r=this.skip(e.eof)._(t,0);return r.status?{success:!0,value:r.value}:{success:!1,index:j(t,r.furthest),expected:r.expected};},e.prototype.tryParse=function(e){var t=this.parse(e);if(t.success)return t.value;var r,n,i,a=(n=e,\"expected \"+(1===(r=(i=t).expected).length?r[0]:\"one of \"+r.join(\", \"))+function(e,t){var r=t.index,n=r.offset;if(n===e.length)return\", got the end of the input\";var i=n>0?\"'...\":\"'\",a=e.length-n>12?\"...'\":\"'\";return\" at line \"+r.line+\" column \"+r.column+\", got \"+i+e.slice(n,n+12)+a;}(n,i));throw new Error(a);},e.prototype.or=function(t){return e.alt(this,t);},e.prototype.trim=function(e){return this.wrap(e,e);},e.prototype.wrap=function(t,r){return x(1,\"string\"==typeof t?e.string(t):t,this,\"string\"==typeof r?e.string(r):r);},e.prototype.thru=function(e){return e(this);},e.prototype.then=function(e){return x(1,this,e);},e.prototype.many=function(){var t=this;return new e(function(e,r){for(var n=[],i=void 0;;){if(!(i=P(t._(e,r),i)).status)return P(C(r,n),i);if(r===i.index)throw new Error(\"infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause\");r=i.index,n.push(i.value);}});},e.prototype.times=function(t,r){var n=this,i=void 0===r?t:r;return new e(function(e,r){var a,o=[],s=void 0,u=void 0;for(a=0;a<t;a++){if(u=P(s=n._(e,r),u),!s.status)return u;r=s.index,o.push(s.value);}for(;a<i&&(u=P(s=n._(e,r),u),s.status);a+=1)r=s.index,o.push(s.value);return P(C(r,o),u);});},e.prototype.result=function(e){return this.map(function(){return e;});},e.prototype.atMost=function(e){return this.times(0,e);},e.prototype.atLeast=function(t){return e.seq(this.times(t),this.many()).map(function(e){return Object(n.__spreadArrays)(e[0],e[1]);});},e.prototype.map=function(t){var r=this;return new e(function(e,n){var i=r._(e,n);return i.status?P(C(i.index,t(i.value)),i):i;});},e.prototype.skip=function(e){return x(0,this,e);},e.prototype.mark=function(){return e.seq(e.index,this,e.index).map(function(e){return{start:e[0],value:e[1],end:e[2]};});},e.prototype.node=function(t){return e.seq(e.index,this,e.index).map(function(e){return{name:t,start:e[0],value:e[1],end:e[2]};});},e.prototype.sepBy=function(t){return e.sepBy(this,t);},e.prototype.sepBy1=function(t){return e.sepBy1(this,t);},e.prototype.lookahead=function(t){return this.skip(e.lookahead(t));},e.prototype.notFollowedBy=function(t){return this.skip(e.notFollowedBy(t));},e.prototype.desc=function(t){var r=this;return new e(function(e,n){var i=r._(e,n);return i.status||(i.expected=[t]),i;});},e.prototype.fallback=function(t){return this.or(e.succeed(t));},e.prototype.ap=function(t){return e.seq(t,this).map(function(e){return(0,e[0])(e[1]);});},e.prototype.chain=function(t){var r=this;return new e(function(e,n){var i=r._(e,n);return i.status?P(t(i.value)._(e,i.index),i):i;});},e;}();function x(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=t.length;return new O(function(r,i){for(var a,o,s=i,u=0;u<n;u++){if(!(a=P(t[u]._(r,s),a)).status)return a;e===u&&(o=a.value),s=a.index;}return P(C(s,o),a);});}function C(e,t){return{status:!0,index:e,value:t};}function w(e,t){return{status:!1,furthest:e,expected:[t]};}function P(e,t){if(!t||e.status||t.status||e.furthest>t.furthest)return e;var r=e.furthest===t.furthest?function(e,t){var r=e.length,n=t.length;if(0===r)return t;if(0===n)return e;for(var i=new Set(),a=[],o=0;o<r;o++)i.has(e[o])||(a[a.length]=e[o],i.add(e[o]));for(o=0;o<n;o++)i.has(t[o])||(a[a.length]=t[o],i.add(t[o]));return a.sort(),a;}(e.expected,t.expected):t.expected;return{status:e.status,furthest:t.furthest,expected:r};}function j(e,t){var r=e.slice(0,t).split(\"\\n\");return{offset:t,line:r.length,column:r[r.length-1].length+1};}!function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length;return new e(function(e,r){for(var i,a=new Array(n),o=r,s=0;s<n;s++){if(!(i=P(t[s]._(e,o),i)).status)return i;a[s]=i.value,o=i.index;}return P(C(o,a),i);});}function r(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length;return 0===n?u(\"zero alternates\"):new e(function(e,r){for(var n,i=0;i<t.length;i++)if((n=P(t[i]._(e,r),n)).status)return n;return n;});}function i(e,r){return t(e,r.then(e).many()).map(function(e){return Object(n.__spreadArrays)([e[0]],e[1]);});}function a(t){var r=\"'\"+t+\"'\";if(1===t.length){var n=t.charCodeAt(0);return new e(function(e,i){return e.charCodeAt(i)===n?C(i+1,t):w(i,r);});}return new e(function(e,n){var i=n+t.length;return e.slice(n,i)===t?C(i,t):w(n,r);});}function o(t,r){void 0===r&&(r=0);var n=function(e){return RegExp(\"^(?:\"+e.source+\")\",function(e){var t=\"\"+e;return t.slice(t.lastIndexOf(\"/\")+1);}(e));}(t),i=\"\"+t;return new e(function(e,t){var a=n.exec(e.slice(t));if(a){if(0<=r&&r<=a.length){var o=a[0],s=a[r];return C(t+o.length,s);}return w(t,\"invalid match group (0 to \"+a.length+\") in \"+i);}return w(t,i);});}function s(t){return new e(function(e,r){return C(r,t);});}function u(t){return new e(function(e,r){return w(r,t);});}function c(t){return new e(function(e,r){var n=e.charAt(r);return r<e.length&&t(n)?C(r+1,n):w(r,\"a character \"+t);});}e.seq=t,e.alt=r,e.sepBy=function(e,t){return i(e,t).or(s([]));},e.sepBy1=i,e.string=a,e.regexp=o,e.succeed=s,e.fail=u,e.lookahead=function t(r){if(r instanceof O)return new e(function(e,t){var n=r._(e,t);return n.status&&(n.index=t,n.value=null),n;});if(\"string\"==typeof r)return t(a(r));if(r instanceof RegExp)return t(o(r));throw new Error(\"not a string, regexp, or parser: \"+r);},e.notFollowedBy=function(t){return new e(function(e,r){var n=t._(e,r);return n.status?w(r,'not \"'+e.slice(r,n.index)+'\"'):C(r,null);});},e.test=c,e.oneOf=function(e){return c(function(t){return e.indexOf(t)>=0;});},e.noneOf=function(e){return c(function(t){return e.indexOf(t)<0;});},e.range=function(e,t){return c(function(r){return e<=r&&r<=t;}).desc(e+\"-\"+t);},e.takeWhile=function(t){return new e(function(e,r){for(var n=r;n<e.length&&t(e.charAt(n));)n++;return C(n,e.slice(r,n));});},e.lazy=function(t){var r=new e(function(e,n){var i=t()._;return r._=i,i(e,n);});return r;},e.empty=function(){return u(\"empty\");},e.index=new e(function(e,t){return C(t,j(e,t));}),e.anyChar=new e(function(e,t){return t>=e.length?w(t,\"any character\"):C(t+1,e.charAt(t));}),e.all=new e(function(e,t){return C(e.length,e.slice(t));}),e.eof=new e(function(e,t){return t<e.length?w(t,\"EOF\"):C(t,null);}),e.digit=o(/[0-9]/).desc(\"a digit\"),e.digits=o(/[0-9]*/).desc(\"optional digits\"),e.letter=o(/[a-z]/i).desc(\"a letter\"),e.letters=o(/[a-z]*/i).desc(\"optional letters\"),e.optWhitespace=o(/\\s*/).desc(\"optional whitespace\"),e.whitespace=o(/\\s+/).desc(\"whitespace\"),e.cr=a(\"\\r\"),e.lf=a(\"\\n\"),e.crlf=a(\"\\r\\n\"),e.newline=r(e.crlf,e.lf,e.cr).desc(\"newline\"),e.end=r(e.newline,e.eof);}(O||(O={})),function(e){var t;!function(e){e.str=function(e){return{kind:\"string\",value:e};},e.symb=function(e){return{kind:\"symbol\",value:e};},e.list=function(e,t){return{kind:\"list\",bracket:e,nodes:t};},e.comment=function(e){return{kind:\"comment\",value:e};};}(t||(t={}));var r=O.regexp(/[\\n\\r\\s]*/),n=O.lazy(function(){return O.alt(i,p,o,s).trim(r);}),i=O.takeWhile(function(e){return\"`\"!==e;}).trim(\"`\").map(t.str),o=O.regexp(/[^()\\[\\]{};`,\\n\\r\\s]+/).map(t.symb),s=O.regexp(/\\s*;+([^\\n\\r]*)\\n/,1).map(t.comment),u=n.many(),c=u.wrap(\"(\",\")\").map(function(e){return t.list(\"(\",e);}),d=u.wrap(\"[\",\"]\").map(function(e){return t.list(\"[\",e);}),f=u.wrap(\"{\",\"}\").map(function(e){return t.list(\"{\",e);}),p=O.alt(c,d,f),m=n.many();function h(e){switch(e.kind){case\"string\":return e.value;case\"symbol\":var t=e.value;if(t.length>1)switch(t.charAt(0)){case\".\":return l.MolScriptBuilder.atomName(t.substr(1));case\"_\":return l.MolScriptBuilder.struct.type.elementSymbol([t.substr(1)]);}return\"true\"===t||\"false\"!==t&&(function(e){return /-?(0|[1-9][0-9]*)([.][0-9]+)?([eE][+-]?[0-9]+)?/.test(e)&&!isNaN(+e);}(t)?+t:a.a.Symbol(t));case\"list\":switch(e.bracket){case\"[\":return l.MolScriptBuilder.core.type.list(g(e.nodes).map(h));case\"{\":return l.MolScriptBuilder.core.type.set(g(e.nodes).map(h));case\"(\":var r=h(e.nodes[0]);return a.a.Apply(r,function(e){if(e.length<=1)return;if(!function(e){for(var t=1,r=e.length;t<r;t++){var n=e[t];if(\"symbol\"===n.kind&&n.value.length>1&&\":\"===n.value.charAt(0))return!0;}return!1;}(e)){for(var t=[],r=1,n=e.length;r<n;r++){\"comment\"!==(s=e[r]).kind&&(t[t.length]=h(s));}return t;}var i={},a=!0,o=0;for(r=1,n=e.length;r<n;r++){var s;if(\"comment\"!==(s=e[r]).kind)if(\"symbol\"===s.kind&&s.value.length>1&&\":\"===s.value.charAt(0)){var u=s.value.substr(1);for(++r;r<n&&\"comment\"===e[r].kind;)r++;if(r>=n)throw new Error(\"There must be a value foolowed a named arg ':\"+u+\"'.\");i[u]=h(e[r]),isNaN(+u)&&(a=!1);}else i[o++]=h(s);}if(a){var c=Object.keys(i).map(function(e){return+e;}).sort(function(e,t){return e-t;}),l=!0;for(r=0,n=c.length;r<n;r++)if(c[r]!==r){l=!1;break;}if(l){var d=[];for(r=0,n=c.length;r<n;r++)d[r]=i[r];return d;}}return i;}(e.nodes));}return 0;default:throw new Error(\"should not happen\");}}function g(e){for(var t=!1,r=0,n=e.length;r<n;r++)if(\"comment\"===e[r].kind){t=!0;break;}return t?e.filter(function(e){return\"comment\"!==e.kind;}):e;}e.parse=function(e){for(var t=[],r=0,n=function(e){return m.tryParse(e);}(e);r<n.length;r++){var i=n[r];\"comment\"!==i.kind&&(t[t.length]=h(i));}return t;};}(S||(S={}));var E=r(4),A=r(163);function T(e,t){return{expression:e,language:t};}!function(e){function t(e){switch(e.language){case\"mol-script\":var t=(r=e.expression,S.parse(r));if(0===t.length)throw new Error(\"No query\");return _(t[0]);}var r;throw new Error(\"unsupported script language\");}function r(e){var r=t(e);return Object(A.compile)(r);}e.is=function(e){return!!e&&\"string\"==typeof e.expression&&!!e.language;},e.areEqual=function(e,t){return e.language===t.language&&e.expression===t.expression;},e.toExpression=t,e.toQuery=r,e.toLoci=function(e,t){var n=r(e)(new E.QueryContext(t));return E.StructureSelection.toLociWithSourceUnits(n);},e.getStructureSelection=function(e,t,r){var n=\"function\"==typeof e?e(l.MolScriptBuilder):e;return Object(A.compile)(n)(new E.QueryContext(t,r));};}(T||(T={}));},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return c.b;}),r.d(t,\"a\",function(){return l.a;}),r.d(t,\"b\",function(){return l.b;}),r.d(t,\"d\",function(){return i;});var n=r(323);function i(e){for(var t=e.data,r=e.encoding.length-1;r>=0;r--)t=a(t,e.encoding[r]);return t;}function a(e,t){switch(t.kind){case\"ByteArray\":switch(t.type){case 4:return e;case 1:return function(e){return new Int8Array(e.buffer,e.byteOffset);}(e);case 2:return function(e){return u(e,2,Int16Array);}(e);case 5:return function(e){return u(e,2,Uint16Array);}(e);case 3:return function(e){return u(e,4,Int32Array);}(e);case 6:return function(e){return u(e,4,Uint32Array);}(e);case 32:return function(e){return u(e,4,Float32Array);}(e);case 33:return function(e){return u(e,8,Float64Array);}(e);default:throw new Error(\"Unsupported ByteArray type.\");}case\"FixedPoint\":return function(e,t){for(var r=e.length,n=s(t.srcType,r),i=1/t.factor,a=0;a<r;a++)n[a]=i*e[a];return n;}(e,t);case\"IntervalQuantization\":return function(e,t){for(var r=e.length,n=s(t.srcType,r),i=(t.max-t.min)/(t.numSteps-1),a=t.min,o=0;o<r;o++)n[o]=a+i*e[o];return n;}(e,t);case\"RunLength\":return function(e,t){for(var r=o(t.srcType,t.srcSize),n=0,i=0,a=e.length;i<a;i+=2)for(var s=e[i],u=e[i+1],c=0;c<u;++c)r[n++]=s;return r;}(e,t);case\"Delta\":return function(e,t){var r=e.length,n=o(t.srcType,r);if(!r)return e;n[0]=e[0]+(0|t.origin);for(var i=1;i<r;++i)n[i]=e[i]+n[i-1];return n;}(e,t);case\"IntegerPacking\":return function(e,t){return e.length===t.srcSize?e:t.isUnsigned?function(e,t){var r=1===t.byteCount?255:65535,n=e.length,i=new Int32Array(t.srcSize),a=0,o=0;for(;a<n;){for(var s=0,u=e[a];u===r;)s+=u,a++,u=e[a];s+=u,i[o]=s,a++,o++;}return i;}(e,t):function(e,t){var r=1===t.byteCount?127:32767,n=-r-1,i=e.length,a=new Int32Array(t.srcSize),o=0,s=0;for(;o<i;){for(var u=0,c=e[o];c===r||c===n;)u+=c,o++,c=e[o];u+=c,a[s]=u,o++,s++;}return a;}(e,t);}(e,t);case\"StringArray\":return function(e,t){var r=i({encoding:t.offsetEncoding,data:t.offsets}),n=i({encoding:t.dataEncoding,data:e}),a=t.stringData,o=new Array(r.length);o[0]=\"\";for(var s=1,u=r.length;s<u;s++)o[s]=a.substring(r[s-1],r[s]);var c=0,l=new Array(n.length);for(s=0,u=n.length;s<u;s++)l[c++]=o[n[s]+1];return l;}(e,t);}}function o(e,t){switch(e){case 1:return new Int8Array(t);case 2:return new Int16Array(t);case 3:return new Int32Array(t);case 4:return new Uint8Array(t);case 5:return new Uint16Array(t);case 6:return new Uint32Array(t);default:throw new Error(\"Unsupported integer data type.\");}}function s(e,t){switch(e){case 32:return new Float32Array(t);case 33:return new Float64Array(t);default:throw new Error(\"Unsupported floating data type.\");}}function u(e,t,r){return n.a?new r(e.buffer):new r(Object(n.b)(e,t));}var c=r(250),l=r(107);r(259);},function(e,t,r){\"use strict\";function n(e){return e&&\"function\"==typeof e.schedule;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(2),o=r(5),s=r(117),u=r(145),c=r(125),l=r(47),d=r(11),f=r(53),p=r(24),m=r(1),h=r(381),g=r(78),v=r(33),b=r(134),y=r(141),_=r(9),S=r(124),O=r(142);function x(e,t,r,n){for(var i=0,a=0,o=0,s=4*r;o<s;++o){var u=2*o,c=Math.abs(e[u]);c>i&&(i=c);var l=Math.abs(e[u+1]);l>i&&(i=l);var d=Math.abs(t[o]);d>a&&(a=d);}return Math.max(a,n+n*i);}!function(e){function t(e,t,r,i,a,s,u,c,l){return l?function(e,t,r,n,i,a,s,u,c){return c.charCount=u,o.e.update(c.fontTexture,e),o.e.update(c.centerBuffer,t),o.e.update(c.mappingBuffer,r),o.e.update(c.depthBuffer,n),o.e.update(c.indexBuffer,i),o.e.update(c.groupBuffer,a),o.e.update(c.tcoordBuffer,s),c;}(e,t,r,i,a,s,u,c,l):function(e,t,r,i,a,s,u,c){var l,p=Object(d.g)(),m=-1,h=-1,g={kind:\"text\",charCount:c,fontTexture:o.e.create(e),centerBuffer:o.e.create(t),mappingBuffer:o.e.create(r),depthBuffer:o.e.create(i),indexBuffer:o.e.create(a),groupBuffer:o.e.create(s),tcoordBuffer:o.e.create(u),get boundingSphere(){var e=n(g);if(e!==m){var t=Object(f.a)(g.centerBuffer.ref.value,4*g.charCount,4);d.g.copy(p,t),m=e;}return p;},get groupMapping(){return g.groupBuffer.ref.version!==h&&(l=Object(S.c)(g.groupBuffer.ref.value,g.charCount,4),h=g.groupBuffer.ref.version),l;},setBoundingSphere:function setBoundingSphere(e){d.g.copy(p,e),m=n(g);}};return g;}(e,t,r,i,a,s,u,c);}function r(e){return t(e?e.fontTexture.ref.value:Object(f.c)(0,1,Uint8Array),e?e.centerBuffer.ref.value:new Float32Array(0),e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.depthBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),e?e.tcoordBuffer.ref.value:new Float32Array(0),0,e);}function n(e){return Object(_.l)([e.charCount,e.fontTexture.ref.version,e.centerBuffer.ref.version,e.mappingBuffer.ref.version,e.depthBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version,e.tcoordBuffer.ref.version]);}function C(e,t,r,n,a){var l=r.instanceCount,h=r.groupCount;if(l!==t.instanceCount.ref.value)throw new Error(\"instanceCount values in TransformData and LocationIterator differ\");var _=Object(s.a)(r,n.color),S=Object(u.a)(r,n.size),C=Object(c.a)(l*h),w=Object(b.c)(),P=Object(y.c)(),j=Object(O.d)(),E={drawCount:2*e.charCount*3,groupCount:h,instanceCount:l},A=x(e.mappingBuffer.ref.value,e.depthBuffer.ref.value,e.charCount,Object(u.b)(S)),T=d.g.expand(Object(d.g)(),e.boundingSphere,A),D=Object(f.b)(T,t.aTransform.ref.value,l);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({aPosition:e.centerBuffer,aMapping:e.mappingBuffer,aDepth:e.depthBuffer,aGroup:e.groupBuffer,elements:e.indexBuffer,boundingSphere:o.e.create(D),invariantBoundingSphere:o.e.create(T),uInvariantBoundingSphere:o.e.create(m.Vec4.ofSphere(T))},_),S),C),w),P),j),t),{aTexCoord:e.tcoordBuffer,tFont:e.fontTexture,padding:o.e.create(A)}),v.a.createValues(a,E)),{uSizeFactor:o.e.create(a.sizeFactor),uBorderWidth:o.e.create(Object(g.a)(a.borderWidth/2,0,.5)),uBorderColor:o.e.create(p.Color.toArrayNormalized(a.borderColor,m.Vec3.zero(),0)),uOffsetX:o.e.create(a.offsetX),uOffsetY:o.e.create(a.offsetY),uOffsetZ:o.e.create(a.offsetZ),uBackgroundColor:o.e.create(p.Color.toArrayNormalized(a.backgroundColor,m.Vec3.zero(),0)),uBackgroundOpacity:o.e.create(a.backgroundOpacity)});}function w(e,t){v.a.updateRenderableState(e,t),e.pickable=!1,e.opaque=!1,e.writeDepth=!0;}e.create=t,e.createEmpty=r,e.Params=Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},v.a.Params),h.a),{sizeFactor:a.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),borderWidth:a.ParamDefinition.Numeric(0,{min:0,max:.5,step:.01}),borderColor:a.ParamDefinition.Color(l.a.grey),offsetX:a.ParamDefinition.Numeric(0,{min:0,max:10,step:.1}),offsetY:a.ParamDefinition.Numeric(0,{min:0,max:10,step:.1}),offsetZ:a.ParamDefinition.Numeric(0,{min:0,max:10,step:.1}),background:a.ParamDefinition.Boolean(!1),backgroundMargin:a.ParamDefinition.Numeric(.2,{min:0,max:1,step:.01}),backgroundColor:a.ParamDefinition.Color(l.a.grey),backgroundOpacity:a.ParamDefinition.Numeric(1,{min:0,max:1,step:.01}),tether:a.ParamDefinition.Boolean(!1),tetherLength:a.ParamDefinition.Numeric(1,{min:0,max:5,step:.1}),tetherBaseWidth:a.ParamDefinition.Numeric(.3,{min:0,max:1,step:.01}),attachment:a.ParamDefinition.Select(\"middle-center\",[[\"bottom-left\",\"bottom-left\"],[\"bottom-center\",\"bottom-center\"],[\"bottom-right\",\"bottom-right\"],[\"middle-left\",\"middle-left\"],[\"middle-center\",\"middle-center\"],[\"middle-right\",\"middle-right\"],[\"top-left\",\"top-left\"],[\"top-center\",\"top-center\"],[\"top-right\",\"top-right\"]])}),e.Utils={Params:e.Params,createEmpty:r,createValues:C,createValuesSimple:function createValuesSimple(t,r,n,o,s){var u=v.a.createSimple(n,o,s),c=Object(i.__assign)(Object(i.__assign)({},a.ParamDefinition.getDefaultValues(e.Params)),r);return C(t,u.transform,u.locationIterator,u.theme,c);},updateValues:function updateValues(e,t){v.a.updateValues(e,t),o.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),o.e.updateIfChanged(e.uBorderWidth,t.borderWidth),p.Color.fromNormalizedArray(e.uBorderColor.ref.value,0)!==t.borderColor&&(p.Color.toArrayNormalized(t.borderColor,e.uBorderColor.ref.value,0),o.e.update(e.uBorderColor,e.uBorderColor.ref.value));o.e.updateIfChanged(e.uOffsetX,t.offsetX),o.e.updateIfChanged(e.uOffsetY,t.offsetY),o.e.updateIfChanged(e.uOffsetZ,t.offsetZ),p.Color.fromNormalizedArray(e.uBackgroundColor.ref.value,0)!==t.backgroundColor&&(p.Color.toArrayNormalized(t.backgroundColor,e.uBackgroundColor.ref.value,0),o.e.update(e.uBackgroundColor,e.uBackgroundColor.ref.value));o.e.updateIfChanged(e.uBackgroundOpacity,t.backgroundOpacity);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=x(e.aMapping.ref.value,e.aDepth.ref.value,t.charCount,Object(u.b)(e)),n=d.g.expand(Object(d.g)(),t.boundingSphere,r),i=Object(f.b)(n,e.aTransform.ref.value,e.instanceCount.ref.value);d.g.equals(i,e.boundingSphere.ref.value)||o.e.update(e.boundingSphere,i);d.g.equals(n,e.invariantBoundingSphere.ref.value)||(o.e.update(e.invariantBoundingSphere,n),o.e.update(e.uInvariantBoundingSphere,m.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,n)));o.e.update(e.padding,r);},createRenderableState:function createRenderableState(e){var t=v.a.createRenderableState(e);return w(t,e),t;},updateRenderableState:w};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"e\",function(){return s;}),r.d(t,\"d\",function(){return u;}),r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return h;}),r.d(t,\"c\",function(){return g;});var n=r(1),i=r(30);function a(e,t){for(var r=0,n=3*t;r<n;r+=3){var i=e[r],a=e[r+1],o=e[r+2],s=1/Math.sqrt(i*i+a*a+o*o);e[r]=i*s,e[r+1]=a*s,e[r+2]=o*s;}return e;}var o=n.Vec3.zero();function s(e,t,r,i){for(var a=0,s=3*i;a<s;a+=3)n.Vec3.fromArray(o,t,r+a),n.Vec3.transformMat4(o,o,e),n.Vec3.toArray(o,t,r+a);}function u(e,t,r,i){for(var a=0,s=3*i;a<s;a+=3)n.Vec3.fromArray(o,t,r+a),n.Vec3.transformMat3(o,o,e),n.Vec3.toArray(o,t,r+a);}function c(e,t){for(var r=0,i=e.length;r<i;r+=3)n.Vec3.fromArray(o,e,r),n.Vec3.normalize(o,o),n.Vec3.scale(o,o,t),n.Vec3.toArray(o,e,r);}var l=Object(n.Vec3)(),d=Object(n.Vec3)(),f=Object(n.Vec3)(),p=Object(n.Vec3)(),m=Object(n.Vec3)();function h(e,t,r,i,o){for(var s=0,u=3*o;s<u;s+=3){var c=3*t[s],h=3*t[s+1],g=3*t[s+2];n.Vec3.fromArray(l,e,c),n.Vec3.fromArray(d,e,h),n.Vec3.fromArray(f,e,g),n.Vec3.sub(p,f,d),n.Vec3.sub(m,l,d),n.Vec3.cross(p,p,m),r[c]+=p[0],r[c+1]+=p[1],r[c+2]+=p[2],r[h]+=p[0],r[h+1]+=p[1],r[h+2]+=p[2],r[g]+=p[0],r[g+1]+=p[1],r[g+2]+=p[2];}return a(r,i);}function g(e,t,r){void 0===r&&(r=1);for(var n=Object(i.arrayMax)(e),a=new Int32Array(n+2),o=new Int32Array(t),s=new Int32Array(t),u=0,c=t*r;u<c;u+=r)++s[e[u]];var l=0;for(u=0;u<t;u++)a[u]=l,l+=s[u];a[t]=l;var d=new Int32Array(l);for(u=0,c=t*r;u<c;u+=r){var f=e[u];d[a[f]+o[f]]=u,++o[f];}return{indices:d,offsets:a};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(58),i=r(1),a=r(53);function o(e,t){var r=Object(a.c)(Math.max(1,e),1,Uint8Array,t&&t.tMarker.ref.value.array);return t?(n.b.update(t.tMarker,r),n.b.update(t.uMarkerTexDim,i.Vec2.create(r.width,r.height)),t):{tMarker:n.b.create(r),uMarkerTexDim:n.b.create(i.Vec2.create(r.width,r.height))};}new Uint8Array(1);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(0),i=r(25),a=r(195),o=r(11),s=r(230),u=function(){function e(e){this.minDist=[],this.maxDist=[],this.extrema=[],this.centroidHelper=new a.a(),this.dir=function(e){var t;switch(e){case\"6\":t=Object(n.__spreadArrays)(c);break;case\"14\":t=Object(n.__spreadArrays)(c,l);break;case\"26\":t=Object(n.__spreadArrays)(c,l,d);break;case\"98\":t=Object(n.__spreadArrays)(c,l,d,f,p,m);}return t.map(function(e){var t=i.f.create(e[0],e[1],e[2]);return i.f.normalize(t,t);});}(e),this.reset();}return e.prototype.computeExtrema=function(e,t){var r=i.f.dot(this.dir[e],t);r<this.minDist[e]&&(this.minDist[e]=r,i.f.copy(this.extrema[2*e],t)),r>this.maxDist[e]&&(this.maxDist[e]=r,i.f.copy(this.extrema[2*e+1],t));},e.prototype.computeSphereExtrema=function(e,t,r){var n=i.f.dot(this.dir[e],t);n-r<this.minDist[e]&&(this.minDist[e]=n-r,i.f.scaleAndSub(this.extrema[2*e],t,this.dir[e],r)),n+r>this.maxDist[e]&&(this.maxDist[e]=n+r,i.f.scaleAndAdd(this.extrema[2*e+1],t,this.dir[e],r));},e.prototype.includeSphere=function(e){if(o.g.hasExtrema(e))for(var t=0,r=e.extrema;t<r.length;t++){var n=r[t];this.includePosition(n);}else this.includePositionRadius(e.center,e.radius);},e.prototype.includePosition=function(e){for(var t=0,r=this.dir.length;t<r;++t)this.computeExtrema(t,e);},e.prototype.includePositionRadius=function(e,t){for(var r=0,n=this.dir.length;r<n;++r)this.computeSphereExtrema(r,e,t);},e.prototype.finishedIncludeStep=function(){for(var e=0;e<this.extrema.length;e++)this.centroidHelper.includeStep(this.extrema[e]);this.centroidHelper.finishedIncludeStep();},e.prototype.radiusSphere=function(e){if(o.g.hasExtrema(e))for(var t=0,r=e.extrema;t<r.length;t++){var n=r[t];this.radiusPosition(n);}else this.radiusPositionRadius(e.center,e.radius);},e.prototype.radiusPosition=function(e){this.centroidHelper.radiusStep(e);},e.prototype.radiusPositionRadius=function(e,t){this.centroidHelper.radiusSphereStep(e,t);},e.prototype.getSphere=function(e){return o.g.setExtrema(this.centroidHelper.getSphere(e),this.extrema);},e.prototype.getBox=function(e){e||(e=Object(s.a)()),s.a.setEmpty(e);for(var t=0;t<this.extrema.length;t++)s.a.add(e,this.extrema[t]);return e;},e.prototype.reset=function(){for(var e=0,t=this.dir.length;e<t;++e)this.minDist[e]=1/0,this.maxDist[e]=-1/0,this.extrema[2*e]=Object(i.f)(),this.extrema[2*e+1]=Object(i.f)();this.centroidHelper.reset();},e;}();var c=[[1,0,0],[0,1,0],[0,0,1]],l=[[1,1,1],[-1,1,1],[-1,-1,1],[1,-1,1]],d=[[1,1,0],[1,-1,0],[1,0,1],[1,0,-1],[0,1,1],[0,1,-1]],f=[[0,1,2],[0,2,1],[1,0,2],[2,0,1],[1,2,0],[2,1,0],[0,1,-2],[0,2,-1],[1,0,-2],[2,0,-1],[1,-2,0],[2,-1,0]],p=[[1,1,2],[2,1,1],[1,2,1],[1,-1,2],[1,1,-2],[1,-1,-2],[2,-1,1],[2,1,-1],[2,-1,-1],[1,-2,1],[1,2,-1],[1,-2,-1]],m=[[2,2,1],[1,2,2],[2,1,2],[2,-2,1],[2,2,-1],[2,-2,-1],[1,-2,2],[1,2,-2],[1,-2,-2],[2,-1,2],[2,1,-2],[2,-1,-2]];},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return c;}),r.d(t,\"c\",function(){return f;});var n=r(1),i=n.Vec3.zero(),a=n.Vec3.zero(),o=n.Vec3.zero();function s(e,t){for(var r=t.length,s=c(r/3),u=0;u<r;u+=3)n.Vec3.fromArray(i,e,3*t[u]),n.Vec3.fromArray(a,e,3*t[u+1]),n.Vec3.fromArray(o,e,3*t[u+2]),s.add(i,a,o);return s.getPrimitive();}var u=n.Vec3.zero();function c(e){var t=new Float32Array(3*e*3),r=new Float32Array(3*e*3),i=new Uint32Array(3*e),a=0;return{add:function add(e,o,s){n.Vec3.toArray(e,t,a),n.Vec3.toArray(o,t,a+3),n.Vec3.toArray(s,t,a+6),n.Vec3.triangleNormal(u,e,o,s);for(var c=0;c<3;++c)n.Vec3.toArray(u,r,a+3*c),i[a/3+c]=a/3+c;a+=9;},getPrimitive:function getPrimitive(){return{vertices:t,normals:r,indices:i};}};}var l=n.Vec3.zero(),d=n.Mat3.zero();function f(e,t){for(var r=e.vertices,i=e.normals,a=n.Mat3.directionTransform(d,t),o=0,s=r.length;o<s;o+=3)n.Vec3.transformMat4(l,n.Vec3.fromArray(l,r,o),t),n.Vec3.toArray(l,r,o),n.Vec3.transformMat3(l,n.Vec3.fromArray(l,i,o),a),n.Vec3.toArray(l,i,o);return e;}},function(e,t,r){\"use strict\";r.d(t,\"d\",function(){return u;}),r.d(t,\"a\",function(){return c;}),r.d(t,\"e\",function(){return l;}),r.d(t,\"b\",function(){return d;}),r.d(t,\"c\",function(){return n;}),r.d(t,\"h\",function(){return f;}),r.d(t,\"g\",function(){return p;}),r.d(t,\"f\",function(){return m;});var n,i=r(0),a=r(7),o=r(97),s=r(73);function u(e,t){return{name:t,blocks:e};}function c(e,t,r,n){return void 0===n&&(n=[]),{categoryNames:e,header:r,categories:t,saveFrames:n,getField:function getField(e){var r=e.split(\".\"),n=r[0],i=r[1];return t[n].getField(i||\"\");}};}function l(e,t,r){return{categoryNames:e,header:r,categories:t};}function d(e,t,r,n){return{rowCount:t,name:e,fieldNames:Object(i.__spreadArrays)(r),getField:function getField(e){return n[e];}};}function f(e,t,r,n){var i=r?0:1;switch(t){case 1:return\"brackets\"===n?function(t){return e+\"[\"+(t+i)+\"]\";}:function(t){return e+\"_\"+(t+i);};case 2:return\"brackets\"===n?function(t,r){return e+\"[\"+(t+i)+\"][\"+(r+i)+\"]\";}:function(t,r){return e+\"_\"+(t+i)+(r+i);};case 3:return\"brackets\"===n?function(t,r,n){return e+\"[\"+(t+i)+\"][\"+(r+i)+\"][\"+(n+i)+\"]\";}:function(t,r,n){return e+\"_\"+(t+i)+(r+i)+(n+i);};default:throw new Error(\"Tensors with rank > 3 or rank 0 are currently not supported.\");}}function p(e,t,r,n){var i=t.create();if(1===t.rank)for(var a=t.dimensions[0],o=0;o<a;o++){var s=e.getField(n(o));t.set(i,o,s?s.float(r):0);}else if(2===t.rank){a=t.dimensions[0];var u=t.dimensions[1];for(o=0;o<a;o++)for(var c=0;c<u;c++){s=e.getField(n(o,c));t.set(i,o,c,s?s.float(r):0);}}else{if(3!==t.rank)throw new Error(\"Tensors with rank > 3 or rank 0 are currently not supported.\");var l=t.dimensions[0],d=t.dimensions[1],f=t.dimensions[2];for(o=0;o<l;o++)for(c=0;c<d;c++)for(var p=0;p<f;p++){s=e.getField(n(o,c,p));t.set(i,o,c,p,s?s.float(r):0);}}return i;}function m(e){for(var t=0,r=!1,n=0,i=0,s=e.rowCount;i<s;i++){if(0===e.valueKind(i)){var u=Object(o.a)(e.str(i));if(0!==u){if(1!==u){r=!0;break;}t++;}}else n++;}return r||n===e.rowCount?a.a.Schema.str:t>0?a.a.Schema.float:a.a.Schema.int;}!function(e){function t(e,t){var r=Object.keys(t);return{rowCount:r.length>0?t[r[0]].rowCount:0,name:e,fieldNames:r,getField:function getField(e){return t[e];}};}e.empty=function(e){return{rowCount:0,name:e,fieldNames:[],getField:function getField(e){}};},e.ofFields=t,e.ofTable=function(e,r){for(var i={},a=0,o=r._columns;a<o.length;a++){var s=o[a];i[s]=n.ofColumn(r[s]);}return t(e,i);};}(d||(d={})),function(e){function t(e){var t=e.length,r=function r(t){var r=e[t];return r&&\".\"!==r&&\"?\"!==r?r:\"\";},n=function n(t){var r=e[t];return Object(o.d)(r,0,r.length)||0;},i=function i(t){var r=e[t];return Object(o.b)(r,0,r.length)||0;};return{__array:void 0,binaryEncoding:void 0,isDefined:!0,rowCount:t,str:r,int:n,float:i,valueKind:function valueKind(t){var r=e[t],n=r.length;if(n>1)return 0;if(0===n)return 1;var i=r.charCodeAt(0);return 46===i?1:63===i?2:0;},areValuesEqual:function areValuesEqual(t,r){return e[t]===e[r];},toStringArray:function toStringArray(n){return n?a.b.createAndFillArray(t,r,n):e;},toIntArray:function toIntArray(e){return a.b.createAndFillArray(t,n,e);},toFloatArray:function toFloatArray(e){return a.b.createAndFillArray(t,i,e);}};}e.ofString=function(e){return t([e]);},e.ofStrings=t,e.ofNumbers=function(e){var t=e.length,r=function r(t){return\"\"+e[t];},n=function n(t){return e[t];},i=function i(r){return!r||r.array&&e instanceof r.array?e:a.b.createAndFillArray(t,n,r);};return{__array:void 0,binaryEncoding:void 0,isDefined:!0,rowCount:t,str:r,int:n,float:n,valueKind:function valueKind(e){return 0;},areValuesEqual:function areValuesEqual(t,r){return e[t]===e[r];},toStringArray:function toStringArray(e){return a.b.createAndFillArray(t,r,e);},toIntArray:i,toFloatArray:i};},e.ofTokens=function(e){var t=e.data,r=e.indices,n=e.count,i=function i(e){var n=t.substring(r[2*e],r[2*e+1]);return\".\"===n||\"?\"===n?\"\":n;},u=function u(e){return Object(o.d)(t,r[2*e],r[2*e+1])||0;},c=function c(e){return Object(o.b)(t,r[2*e],r[2*e+1])||0;};return{__array:void 0,binaryEncoding:void 0,isDefined:!0,rowCount:n,str:i,int:u,float:c,valueKind:function valueKind(e){var n=r[2*e],i=r[2*e+1]-n;if(i>1)return 0;if(0===i)return 1;var a=t.charCodeAt(n);return 46===a?1:63===a?2:0;},areValuesEqual:Object(s.b)(e),toStringArray:function toStringArray(e){return a.b.createAndFillArray(n,i,e);},toIntArray:function toIntArray(e){return a.b.createAndFillArray(n,u,e);},toFloatArray:function toFloatArray(e){return a.b.createAndFillArray(n,c,e);}};},e.ofColumn=function(e){var t,r,n,i=e.rowCount,s=e.valueKind,u=e.areValuesEqual,c=e.isDefined;switch(e.schema.valueType){case\"float\":case\"int\":t=function t(_t2){return\"\"+e.value(_t2);},r=e.value,n=e.value;break;case\"str\":t=e.value,r=function r(t){var r=e.value(t);return Object(o.d)(r,0,r.length)||0;},n=function n(t){var r=e.value(t);return Object(o.b)(r,0,r.length)||0;};break;case\"list\":var l=e.schema.separator;t=function t(_t3){return e.value(_t3).join(l);},r=function r(e){return NaN;},n=function n(e){return NaN;};break;default:throw new Error(\"unsupported valueType '\"+e.schema.valueType+\"'\");}return{__array:void 0,binaryEncoding:void 0,isDefined:c,rowCount:i,str:t,int:r,float:n,valueKind:s,areValuesEqual:u,toStringArray:function toStringArray(e){return a.b.createAndFillArray(i,t,e);},toIntArray:function toIntArray(e){return a.b.createAndFillArray(i,r,e);},toFloatArray:function toFloatArray(e){return a.b.createAndFillArray(i,n,e);}};};}(n||(n={}));},function(e,t,r){\"use strict\";var n={};r.r(n),r.d(n,\"Location\",function(){return a.a;}),r.d(n,\"Loci\",function(){return o.a;}),r.d(n,\"Bundle\",function(){return s.a;}),r.d(n,\"Stats\",function(){return i;}),r.d(n,\"property\",function(){return d;}),r.d(n,\"atomicProperty\",function(){return p;}),r.d(n,\"coarseProperty\",function(){return m;}),r.d(n,\"residueIndex\",function(){return h;}),r.d(n,\"chainIndex\",function(){return g;}),r.d(n,\"entityIndex\",function(){return v;});var i,a=r(87),o=r(274),s=r(342),u=r(6),c=r(37);!function(e){function t(){return{elementCount:0,conformationCount:0,residueCount:0,chainCount:0,unitCount:0,structureCount:0,firstElementLoc:a.a.create(void 0),firstConformationLoc:a.a.create(void 0),firstResidueLoc:a.a.create(void 0),firstChainLoc:a.a.create(void 0),firstUnitLoc:a.a.create(void 0),firstStructureLoc:a.a.create(void 0)};}function r(e,t,r){var n=e.get(t)||0;e.set(t,n+r);}function n(e,t,n){var i=n.indices,o=n.unit,s=o.elements,l=u.OrderedSet.size(i),d=new Map(),f=new Map();if(l>0&&a.a.set(e.firstElementLoc,t,o,s[u.OrderedSet.start(i)]),l===s.length)e.unitCount+=1,1===e.unitCount&&a.a.set(e.firstUnitLoc,t,o,s[u.OrderedSet.start(i)]);else if(1===l){if(c.a.Traits.is(o.traits,1))return;e.elementCount+=1,1===e.elementCount&&a.a.set(e.firstElementLoc,t,o,s[u.OrderedSet.start(i)]);}else if(c.a.isAtomic(o))for(var p=o.model.atomicHierarchy.residueAtomSegments,m=p.index,h=p.offsets,g=o.model.atomicHierarchy.atoms.label_alt_id,v=0,b=function b(){d.clear();var n=0,c=s[u.OrderedSet.getAt(i,v)],p=m[c];for(r(d,g.value(c),1),++v,++n;v<l;){var b=s[u.OrderedSet.getAt(i,v)];if(m[b]!==p)break;r(d,g.value(b),1),++v,++n;}if(h[p+1]-h[p]===n)e.residueCount+=1,1===e.residueCount&&a.a.set(e.firstResidueLoc,t,o,h[p]);else{f.clear();for(var y=h[p],_=h[p+1];y<_;++y)r(f,g.value(y),1);f.get(\"\")===d.get(\"\")&&d.forEach(function(r,i){if(f.get(i)===r){if(\"\"!==i&&(e.conformationCount+=1,1===e.conformationCount))for(var s=h[p],u=h[p+1];s<u;++s)if(i===g.value(s)){a.a.set(e.firstConformationLoc,t,o,s);break;}n-=r;}}),e.elementCount+=n;}};v<l;)b();else e.elementCount+=l,1===e.elementCount&&a.a.set(e.firstElementLoc,t,o,s[u.OrderedSet.start(i)]);}function i(e,t,r){var n=r.indices,i=r.unit,o=u.OrderedSet.size(n);if(0!==o){var s=i.elements;if(c.a.Traits.is(i.traits,1)){var l=c.a.isAtomic(i)?i.model.atomicHierarchy.chainAtomSegments:c.a.isSpheres(i)?i.model.coarseHierarchy.spheres.chainElementSegments:c.a.isGaussians(i)?i.model.coarseHierarchy.gaussians.chainElementSegments:void 0;if(l)for(var d=l.index,f=l.offsets,p=0;p<o;){var m=0,h=d[s[u.OrderedSet.getAt(n,p)]];for(++p,++m;p<o;){if(d[s[u.OrderedSet.getAt(n,p)]]!==h)break;++p,++m;}f[h+1]-f[h]===m&&(e.chainCount+=1,1===e.chainCount&&a.a.set(e.firstChainLoc,t,i,f[h]));}else console.warn(\"StructureElement loci stats: unknown unit type\");}else o===s.length&&(e.chainCount+=1,1===e.chainCount&&a.a.set(e.firstChainLoc,t,i,s[u.OrderedSet.start(n)]));}}function s(e,t,n,i,o){var s=n[i],l=c.a.isAtomic(s.unit)?s.unit.model.atomicHierarchy.chainAtomSegments:c.a.isSpheres(s.unit)?s.unit.model.coarseHierarchy.spheres.chainElementSegments:c.a.isGaussians(s.unit)?s.unit.model.coarseHierarchy.gaussians.chainElementSegments:void 0;if(l){for(var d=l.index,f=l.offsets,p=new Map(),m=i;m<o;m++){var h=(s=n[m]).indices,g=s.unit;if(0!==(O=u.OrderedSet.size(h))){var v=g.elements;if(c.a.Traits.is(g.traits,1))for(var b=0;b<O;){var y=0,_=d[x=v[u.OrderedSet.getAt(h,b)]];for(++b,++y;b<O;){if(d[v[u.OrderedSet.getAt(h,b)]]!==_)break;++b,++y;}r(p,_,y);}else r(p,d[x=v[u.OrderedSet.start(h)]],v.length);}}var S=-1;if(p.forEach(function(t,r){f[r+1]-f[r]===t&&(e.chainCount+=1,1===e.chainCount&&(S=r));}),!(S<0))for(m=i;m<o;m++){var O;h=(s=n[m]).indices,g=s.unit;if(0!==(O=u.OrderedSet.size(h)))for(v=g.elements,b=0;b<O;){var x;if((_=d[x=v[u.OrderedSet.getAt(h,b)]])===S)return void a.a.set(e.firstChainLoc,t,g,x);}}}else console.warn(\"StructureElement loci stats: unknown unit type\");}e.create=t,e.ofLoci=function(e){var r=t();if(o.a.isEmpty(e))return r;var l=!1;if(o.a.isWholeStructure(e)){if(r.structureCount+=1,1===r.structureCount){var d=e.elements[0],f=d.unit,p=d.indices;a.a.set(r.firstStructureLoc,e.structure,f,f.elements[u.OrderedSet.min(p)]);}}else for(var m=0,h=e.elements;m<h.length;m++){var g=h[m];n(r,e.structure,g),c.a.Traits.is(g.unit.traits,2)?l=!0:i(r,e.structure,g);}if(l)for(var v=0,b=e.elements.length;v<b;v++){g=e.elements[v];if(c.a.Traits.is(g.unit.traits,2)){for(var y=v;v<b&&c.a.areSameChainOperatorGroup(e.elements[v].unit,g.unit);)v++;var _=v;v--,_-y==1?i(r,e.structure,g):s(r,e.structure,e.elements,y,_);}}return r;},e.add=function(e,t,r){return 1===t.elementCount&&0===r.elementCount?a.a.copy(e.firstElementLoc,t.firstElementLoc):0===t.elementCount&&1===r.elementCount&&a.a.copy(e.firstElementLoc,r.firstElementLoc),1===t.conformationCount&&0===r.conformationCount?a.a.copy(e.firstConformationLoc,t.firstConformationLoc):0===t.conformationCount&&1===r.conformationCount&&a.a.copy(e.firstConformationLoc,r.firstConformationLoc),1===t.residueCount&&0===r.residueCount?a.a.copy(e.firstResidueLoc,t.firstResidueLoc):0===t.residueCount&&1===r.residueCount&&a.a.copy(e.firstResidueLoc,r.firstResidueLoc),1===t.chainCount&&0===r.chainCount?a.a.copy(e.firstChainLoc,t.firstChainLoc):0===t.chainCount&&1===r.chainCount&&a.a.copy(e.firstChainLoc,r.firstChainLoc),1===t.unitCount&&0===r.unitCount?a.a.copy(e.firstUnitLoc,t.firstUnitLoc):0===t.unitCount&&1===r.unitCount&&a.a.copy(e.firstUnitLoc,r.firstUnitLoc),1===t.structureCount&&0===r.structureCount?a.a.copy(e.firstStructureLoc,t.firstStructureLoc):0===t.structureCount&&1===r.structureCount&&a.a.copy(e.firstStructureLoc,r.firstStructureLoc),e.elementCount=t.elementCount+r.elementCount,e.conformationCount=t.conformationCount+r.conformationCount,e.residueCount=t.residueCount+r.residueCount,e.chainCount=t.chainCount+r.chainCount,e.unitCount=t.unitCount+r.unitCount,e.structureCount=t.structureCount+r.structureCount,e;};}(i||(i={}));var l=r(168);function d(e){return e;}function f(e){throw new Error(\"Property only available for \"+e+\" models.\");}function p(e){return function(t){return c.a.isAtomic(t.unit)?e(t):f(\"atomic\");};}function m(e){return function(t){return c.a.isCoarse(t.unit)?e(t):f(\"coarse\");};}function h(e){return c.a.isAtomic(e.unit)?e.unit.residueIndex[e.element]:-1;}function g(e){return c.a.isAtomic(e.unit)?e.unit.chainIndex[e.element]:-1;}function v(e){return l.a.entity.key(e);}t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(23),i=r(24),a=r(4),o=r(120);function s(e){return{layers:e};}!function(e){function t(e){return 0===e.layers.length;}e.Empty={layers:[]},e.areEqual=function(e,t){if(0===e.layers.length&&0===t.layers.length)return!0;if(e.layers.length!==t.layers.length)return!1;for(var r=0,i=e.layers.length;r<i;++r){if(e.layers[r].clear!==t.layers[r].clear)return!1;if(e.layers[r].color!==t.layers[r].color)return!1;if(!n.Loci.areEqual(e.layers[r].loci,t.layers[r].loci))return!1;}return!0;},e.isEmpty=t,e.remap=function(e,t){for(var r=[],n=0,i=e.layers;n<i.length;n++){var o=i[n],s=o.loci,u=o.color,c=o.clear;s=a.StructureElement.Loci.remap(s,t),a.StructureElement.Loci.isEmpty(s)||r.push({loci:s,color:u,clear:c});}return{layers:r};},e.merge=function(e){if(t(e))return e;for(var r=e.layers[0].loci.structure,n=new Map(),o=a.StructureElement.Loci.none(r),s=0,u=e.layers.length;s<u;++s){var c=e.layers[u-s-1],l=c.loci,d=c.color,f=c.clear;if(l=a.StructureElement.Loci.subtract(l,o),o=a.StructureElement.Loci.union(l,o),!a.StructureElement.Loci.isEmpty(l)){var p=f?-1:d;n.has(p)&&(l=a.StructureElement.Loci.union(l,n.get(p))),n.set(p,l);}}var m=[];return n.forEach(function(e,t){var r=-1===t,n=-1===t?Object(i.Color)(0):t;m.push({loci:e,color:n,clear:r});}),{layers:m};},e.filter=function(e,r){if(t(e))return e;for(var n=e.layers[0].loci.structure,i=[],o=0,s=e.layers;o<s.length;o++){var u=s[o],c=u.loci,l=u.color,d=u.clear,f=a.StructureElement.Loci.remap(c,r);c=a.StructureElement.Loci.remap(f,n),a.StructureElement.Loci.isEmpty(c)||i.push({loci:c,color:l,clear:d});}return{layers:i};},e.ofScript=function(e,t){for(var r=[],n=0,i=e.length;n<i;++n){var s=e[n],u=s.script,c=s.color,l=s.clear,d=o.Script.toLoci(u,t);a.StructureElement.Loci.isEmpty(d)||r.push({loci:d,color:c,clear:l});}return{layers:r};},e.ofBundle=function(e,t){for(var r=[],n=0,i=e.length;n<i;++n){var o=e[n],s=o.bundle,u=o.color,c=o.clear,l=a.StructureElement.Bundle.toLoci(s,t.root);r.push({loci:l,color:u,clear:c});}return{layers:r};},e.toBundle=function(e){for(var t=[],r=0,n=e.layers.length;r<n;++r){var i=e.layers[r],o=i.loci,s=i.color,u=i.clear,c=a.StructureElement.Bundle.fromLoci(o);t.push({bundle:c,color:s,clear:u});}return{layers:t};};}(s||(s={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(23),i=r(4),a=r(120);function o(e){return{layers:e};}!function(e){function t(e){return 0===e.layers.length;}e.Empty={layers:[]},e.areEqual=function(e,t){if(0===e.layers.length&&0===t.layers.length)return!0;if(e.layers.length!==t.layers.length)return!1;for(var r=0,i=e.layers.length;r<i;++r){if(e.layers[r].value!==t.layers[r].value)return!1;if(!n.Loci.areEqual(e.layers[r].loci,t.layers[r].loci))return!1;}return!0;},e.isEmpty=t,e.remap=function(e,t){for(var r=[],n=0,a=e.layers;n<a.length;n++){var o=a[n],s=o.loci,u=o.value;s=i.StructureElement.Loci.remap(s,t),i.StructureElement.Loci.isEmpty(s)||r.push({loci:s,value:u});}return{layers:r};},e.merge=function(e){if(t(e))return e;for(var r=e.layers[0].loci.structure,n=new Map(),a=i.StructureElement.Loci.none(r),o=0,s=e.layers.length;o<s;++o){var u=e.layers[s-o-1],c=u.loci,l=u.value;c=i.StructureElement.Loci.subtract(c,a),a=i.StructureElement.Loci.union(c,a),i.StructureElement.Loci.isEmpty(c)||(n.has(l)&&(c=i.StructureElement.Loci.union(c,n.get(l))),n.set(l,c));}var d=[];return n.forEach(function(e,t){d.push({loci:e,value:t});}),{layers:d};},e.filter=function(e,r){if(t(e))return e;for(var n=e.layers[0].loci.structure,a=[],o=0,s=e.layers;o<s.length;o++){var u=s[o],c=u.loci,l=u.value,d=i.StructureElement.Loci.remap(c,r);c=i.StructureElement.Loci.remap(d,n),i.StructureElement.Loci.isEmpty(c)||a.push({loci:c,value:l});}return{layers:a};},e.ofScript=function(e,t){for(var r=[],n=0,o=e.length;n<o;++n){var s=e[n],u=s.script,c=s.value,l=a.Script.toLoci(u,t);i.StructureElement.Loci.isEmpty(l)||r.push({loci:l,value:c});}return{layers:r};},e.ofBundle=function(e,t){for(var r=[],n=0,a=e.length;n<a;++n){var o=e[n],s=o.bundle,u=o.value,c=i.StructureElement.Bundle.toLoci(s,t.root);r.push({loci:c,value:u});}return{layers:r};},e.toBundle=function(e){for(var t=[],r=0,n=e.layers.length;r<n;++r){var a=e.layers[r],o=a.loci,s=a.value,u=i.StructureElement.Bundle.fromLoci(o);t.push({bundle:u,value:s});}return{layers:t};};}(o||(o={}));},function(e,t,r){\"use strict\";var n;!function(e){function t(e){return!!e&&!!e.head&&\"object\"==typeof_default()(e);}function r(e){return!!e&&\"string\"==typeof e.name;}e.Symbol=function(e){return{name:e};},e.Apply=function(e,t){return t?{head:e,args:t}:{head:e};},e.isArgumentsArray=function(e){return!!e&&Array.isArray(e);},e.isArgumentsMap=function(e){return!!e&&!Array.isArray(e);},e.isLiteral=function(e){return!t(e)&&!r(e);},e.isApply=t,e.isSymbol=r;}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"b\",function(){return a;});var n=r(44),i=new n.a(function(e){return e.complete();});function a(e){return e?function(e){return new n.a(function(t){return e.schedule(function(){return t.complete();});});}(e):i;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"d\",function(){return c;}),r.d(t,\"c\",function(){return d;});var n=r(58),i=r(1),a=r(53),o=r(24);function s(e,t,r,n){for(var i=t;i<r;++i)o.Color.toArray(n,e,4*i),e[4*i+3]=255;return!0;}function u(e,t,r){return e.fill(0,4*t,4*r),!0;}function c(e,t){var r=Object(a.c)(Math.max(1,e),4,Uint8Array,t&&t.tOverpaint.ref.value.array);return t?(n.b.update(t.tOverpaint,r),n.b.update(t.uOverpaintTexDim,i.Vec2.create(r.width,r.height)),n.b.update(t.dOverpaint,e>0),t):{tOverpaint:n.b.create(r),uOverpaintTexDim:n.b.create(i.Vec2.create(r.width,r.height)),dOverpaint:n.b.create(e>0)};}var l={array:new Uint8Array(4),width:1,height:1};function d(e){return e?(n.b.update(e.tOverpaint,l),n.b.update(e.uOverpaintTexDim,i.Vec2.create(1,1)),e):{tOverpaint:n.b.create(l),uOverpaintTexDim:n.b.create(i.Vec2.create(1,1)),dOverpaint:n.b.create(!1)};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(25),a=r(78),o=r(5);function s(e){return 0;}function u(e){return function(t){return e[t];};}function c(e){return 0===e[3]&&0===e[7]&&0===e[11]&&1===e[15];}function l(e,t){var r=e.matrix,n=t.x,i=t.y,a=t.z,o=r[0],s=r[4],u=r[8],l=r[12];return c(r)?function(e){return o*n[e]+s*i[e]+u*a[e]+l;}:function(e){var t=n[e],c=i[e],d=a[e],f=r[3]*t+r[7]*c+r[11]*d+r[15]||1;return(o*t+s*c+u*d+l)/f;};}function d(e,t){var r=e.matrix,n=t.x,i=t.y,a=t.z,o=r[1],s=r[5],u=r[9],l=r[13];return c(r)?function(e){return o*n[e]+s*i[e]+u*a[e]+l;}:function(e){var t=n[e],c=i[e],d=a[e],f=r[3]*t+r[7]*c+r[11]*d+r[15]||1;return(o*t+s*c+u*d+l)/f;};}function f(e,t){var r=e.matrix,n=t.x,i=t.y,a=t.z,o=r[2],s=r[6],u=r[10],l=r[14];return c(r)?function(e){return o*n[e]+s*i[e]+u*a[e]+l;}:function(e){var t=n[e],c=i[e],d=a[e],f=r[3]*t+r[7]*c+r[11]*d+r[15]||1;return(o*t+s*c+u*d+l)/f;};}!function(e){function t(t,r,n){var a=n||{},s=a.assembly,u=a.ncsId,c=a.hkl,l=a.spgrOp,d=c?i.f.clone(c):i.f.zero();l=Object(o.i)(l,-1),u=u||\"\";var f=function(e){if(!e)return\"\";if(e.assembly)return\"_\"+e.assembly.operId;if(void 0!==e.spgrOp&&void 0!==e.hkl&&-1!==e.spgrOp){var t=e.hkl,r=t[0],n=t[1],i=t[2];return\"-\"+(e.spgrOp+1)+\"_\"+(5+r)+(5+n)+(5+i);}if(e.ncsId)return\"_\"+e.ncsId;return\"\";}(n);if(i.c.isIdentity(r))return{name:t,assembly:s,matrix:r,inverse:i.c.identity(),isIdentity:!0,hkl:d,spgrOp:l,ncsId:u,suffix:f};if(!i.c.isRotationAndTranslation(r,e.RotationTranslationEpsilon))throw new Error(\"Symmetry operator (\"+t+\") must be a composition of rotation and translation.\");return{name:t,assembly:s,matrix:r,inverse:i.c.invert(i.c.zero(),r),isIdentity:!1,hkl:d,spgrOp:l,ncsId:u,suffix:f};}e.DefaultName=\"1_555\",e.Default=t(e.DefaultName,i.c.identity()),e.RotationTranslationEpsilon=.005,e.create=t,e.checkIfRotationAndTranslation=function(t,r){for(var n=i.c.identity(),a=0;a<3;a++)for(var o=0;o<3;o++)i.c.setValue(n,a,o,i.b.getValue(t,a,o));return i.c.setTranslation(n,r),i.c.isRotationAndTranslation(n,e.RotationTranslationEpsilon);},e.ofRotationAndOffset=function(e,r,n,a){for(var o=i.c.identity(),s=0;s<3;s++)for(var u=0;u<3;u++)i.c.setValue(o,s,u,i.b.getValue(r,s,u));return i.c.setTranslation(o,n),t(e,o,{ncsId:a});};var r=i.d.identity(),n=i.d.zero(),p=i.d.zero(),m=i.f.zero();e.lerpFromIdentity=function(e,t,a){var o=t.inverse;if(t.isIdentity)return i.c.copy(e,o);var s=1-a;i.c.getRotation(n,o),i.d.slerp(n,r,n,s);var u=i.d.getAxisAngle(m,n);return i.c.fromRotation(e,u,m),i.c.setValue(e,0,3,s*i.c.getValue(o,0,3)),i.c.setValue(e,1,3,s*i.c.getValue(o,1,3)),i.c.setValue(e,2,3,s*i.c.getValue(o,2,3)),e;},e.slerp=function(e,t,r,o){if(Math.abs(o)<=1e-5)return i.c.copy(e,t);if(Math.abs(o-1)<=1e-5)return i.c.copy(e,r);i.c.getRotation(n,t),i.c.getRotation(p,r),i.d.slerp(p,n,p,o);var s=i.d.getAxisAngle(m,p);return i.c.fromRotation(e,s,m),i.c.setValue(e,0,3,Object(a.b)(i.c.getValue(t,0,3),i.c.getValue(r,0,3),o)),i.c.setValue(e,1,3,Object(a.b)(i.c.getValue(t,1,3),i.c.getValue(r,1,3),o)),i.c.setValue(e,2,3,Object(a.b)(i.c.getValue(t,2,3),i.c.getValue(r,2,3),o)),e;},e.compose=function(e,r){var n=i.c.mul(i.c.zero(),r.matrix,e.matrix);return t(r.name,n,r);},e.createMapping=function(t,r,n){var i=e.createCoordinateMapper(e.Default,r),a=t.isIdentity?i:e.createCoordinateMapper(t,r),o=function(e,t){return e.isIdentity?{x:u(t.x),y:u(t.y),z:u(t.z)}:{x:l(e,t),y:d(e,t),z:f(e,t)};}(t,r);return{operator:t,invariantPosition:i,position:a,x:o.x,y:o.y,z:o.z,r:n||s};},e.createCoordinateMapper=function(e,t){return e.isIdentity?(n=(r=t).x,a=r.y,o=r.z,function(e,t){return t[0]=n[e],t[1]=a[e],t[2]=o[e],t;}):function(e,t){var r=e.matrix,n=t.x,a=t.y,o=t.z;if(c(r))return function(e,t){var i=n[e],s=a[e],u=o[e];return t[0]=r[0]*i+r[4]*s+r[8]*u+r[12],t[1]=r[1]*i+r[5]*s+r[9]*u+r[13],t[2]=r[2]*i+r[6]*s+r[10]*u+r[14],t;};return function(e,t){return t[0]=n[e],t[1]=a[e],t[2]=o[e],i.f.transformMat4(t,t,r),t;};}(e,t);var r,n,a,o;};}(n||(n={}));},function(e,t,r){\"use strict\";var n=r(105),i=r(25),a=r(78);function o(){return o.zero();}!function(e){function t(){var e=[.1,0,0];return e[0]=0,e;}function r(e,r,n){var i=t();return i[0]=e,i[1]=r,i[2]=n,i;}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e;}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e;}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e;}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e;}function l(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n;}function d(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e;}function f(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2];}function p(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e;}e.zero=t,e.clone=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r;},e.hasNaN=function(e){return isNaN(e[0])||isNaN(e[1])||isNaN(e[2]);},e.setNaN=function(e){return e[0]=NaN,e[1]=NaN,e[2]=NaN,e;},e.fromObj=function(e){return r(e.x,e.y,e.z);},e.toObj=function(e){return{x:e[0],y:e[1],z:e[2]};},e.fromArray=function(e,t,r){return e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2],e;},e.toArray=function(e,t,r){return t[r+0]=e[0],t[r+1]=e[1],t[r+2]=e[2],t;},e.create=r,e.ofArray=function(e){var r=t();return r[0]=e[0],r[1]=e[1],r[2]=e[2],r;},e.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e;},e.copy=o,e.add=s,e.sub=u,e.mul=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e;},e.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e;},e.scale=c,e.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e;},e.scaleAndSub=function(e,t,r,n){return e[0]=t[0]-r[0]*n,e[1]=t[1]-r[1]*n,e[2]=t[2]-r[2]*n,e;},e.round=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e;},e.ceil=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e;},e.floor=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e;},e.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e;},e.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e;},e.distance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i);},e.squaredDistance=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i;},e.magnitude=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n);},e.squaredMagnitude=l,e.setMagnitude=function(t,r,n){return e.scale(t,e.normalize(t,r),n);},e.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e;},e.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e;},e.normalize=d,e.dot=f,e.cross=p,e.lerp=function(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e;};var m=e.zero();function h(e,t){var r=f(e,t)/Math.sqrt(l(e)*l(t));return Math.acos(Object(a.a)(r,-1,1));}e.slerp=function(t,r,n,i){var o=Object(a.a)(e.dot(r,n),-1,1),s=Math.acos(o)*i;return e.scaleAndAdd(m,n,r,-o),e.normalize(m,m),e.add(t,e.scale(t,r,Math.cos(s)),e.scale(m,m,Math.sin(s)));},e.hermite=function(e,t,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);return e[0]=t[0]*s+r[0]*u+n[0]*c+i[0]*l,e[1]=t[1]*s+r[1]*u+n[1]*c+i[1]*l,e[2]=t[2]*s+r[2]*u+n[2]*c+i[2]*l,e;},e.bezier=function(e,t,r,n,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,d=3*u*o,f=u*a;return e[0]=t[0]*c+r[0]*l+n[0]*d+i[0]*f,e[1]=t[1]*c+r[1]*l+n[1]*d+i[1]*f,e[2]=t[2]*c+r[2]*l+n[2]*d+i[2]*f,e;},e.quadraticBezier=function(e,t,r,n,i){return e[0]=Object(a.c)(t[0],r[0],n[0],i),e[1]=Object(a.c)(t[1],r[1],n[1],i),e[2]=Object(a.c)(t[2],r[2],n[2],i),e;},e.spline=function(e,t,r,n,i,o,s){return e[0]=Object(a.d)(t[0],r[0],n[0],i[0],o,s),e[1]=Object(a.d)(t[1],r[1],n[1],i[1],o,s),e[2]=Object(a.d)(t[2],r[2],n[2],i[2],o,s),e;},e.random=function(e,t){var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e;},e.transformMat4=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=1/(r[3]*n+r[7]*i+r[11]*a+r[15]||1);return e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])*o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])*o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])*o,e;},e.transformMat4Offset=function(e,t,r,n,i,a){var o=t[0+i],s=t[1+i],u=t[2+i],c=1/(r[3+a]*o+r[7+a]*s+r[11+a]*u+r[15+a]||1);return e[0+n]=(r[0+a]*o+r[4+a]*s+r[8+a]*u+r[12+a])*c,e[1+n]=(r[1+a]*o+r[5+a]*s+r[9+a]*u+r[13+a])*c,e[2+n]=(r[2+a]*o+r[6+a]*s+r[10+a]*u+r[14+a])*c,e;},e.transformMat3=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e;},e.transformQuat=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],c=r[3],l=c*n+s*a-u*i,d=c*i+u*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-u*a;return e[0]=l*c+p*-o+d*-u-f*-s,e[1]=d*c+p*-s+f*-o-l*-u,e[2]=f*c+p*-u+l*-s-d*-o,e;},e.angle=h;var g=t(),v=t(),b=t(),y=t(),_=t(),S=t(),O=t();e.dihedralAngle=function(e,t,r,n){u(g,e,t),u(v,r,t),u(b,t,r),u(y,n,r),p(_,g,v),p(S,b,y);var i=h(_,S);return p(O,_,S),f(v,O)>0?i:-i;},e.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2];},e.equals=function(e,t){var r=e[0],n=e[1],a=e[2],o=t[0],s=t[1],u=t[2];return Math.abs(r-o)<=i.a*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=i.a*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-u)<=i.a*Math.max(1,Math.abs(a),Math.abs(u));};var x=t();function C(e,t,r){return c(e,r,f(r,t)/l(r));}e.makeRotation=function(t,r,a){var o=h(r,a);if(Math.abs(o)<1e-4)return n.a.setIdentity(t);if(Math.abs(o-Math.PI)<i.a)return n.a.fromScaling(t,e.negUnit);var s=p(x,r,a);return n.a.fromRotation(t,o,s);},e.isZero=function(e){return 0===e[0]&&0===e[1]&&0===e[2];},e.projectPointOnVector=function(e,t,r,n){u(e,o(e,t),n);var i=f(r,e)/l(r);return s(e,c(e,o(e,r),i),n);},e.projectOnVector=C;var w=e();e.projectOnPlane=function(e,t,r){return C(w,t,r),u(e,t,w);},e.orthogonalize=function(e,t,r){return d(e,p(e,p(e,t,r),t));},e.matchDirection=function(t,r,n){return e.dot(r,n)>0?e.copy(t,r):e.negate(t,e.copy(t,r)),t;};var P=t(),j=t();e.triangleNormal=function(e,t,r,n){return u(P,r,t),u(j,n,t),d(e,p(e,P,j));},e.toString=function(e,t){return\"[\"+e[0].toPrecision(t)+\" \"+e[1].toPrecision(t)+\" \"+e[2].toPrecision(t)+\"]\";},e.origin=e.create(0,0,0),e.unit=e.create(1,1,1),e.negUnit=e.create(-1,-1,-1),e.unitX=e.create(1,0,0),e.unitY=e.create(0,1,0),e.unitZ=e.create(0,0,1);}(o||(o={})),t.a=o;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(249),a=r(6),o=r(11),s=r(1),u=r(126),c=r(354),l=r(82),d=r(66);!function(e){!function(e){function t(t,r){return\"absolute\"===t.kind?t:{kind:\"absolute\",absoluteValue:e.calcAbsolute(r,t.relativeValue)};}e.areSame=function(e,r,n){return Object(l.b)(t(e,n).absoluteValue,t(r,n).absoluteValue,n.sigma/100);},e.absolute=function(e){return{kind:\"absolute\",absoluteValue:e};},e.relative=function(e){return{kind:\"relative\",relativeValue:e};},e.calcAbsolute=function(e,t){return t*e.sigma+e.mean;},e.calcRelative=function(e,t){return 0===e.sigma?0:(t-e.mean)/e.sigma;},e.toAbsolute=t,e.toRelative=function(t,r){return\"relative\"===t.kind?t:{kind:\"relative\",relativeValue:e.calcRelative(r,t.absoluteValue)};},e.toString=function(e){return\"relative\"===e.kind?e.relativeValue.toFixed(2)+\" σ\":\"\"+e.absoluteValue.toPrecision(4);};}(e.IsoValue||(e.IsoValue={})),e.One={label:\"\",grid:i.a.One,sourceData:{kind:\"\",name:\"\",data:{}},customProperties:new d.CustomProperties(),_propertyData:Object.create(null)},e.areEquivalent=function(e,t){return i.a.areEquivalent(e.grid,t.grid);},e.isEmpty=function(e){return i.a.isEmpty(e.grid);},e.isOrbitals=function(e){return!!c.a.is(e.sourceData)&&e.sourceData.data.header.orbitals;},e.Loci=function(e){return{kind:\"volume-loci\",volume:e};},e.isLoci=function(e){return!!e&&\"volume-loci\"===e.kind;},e.areLociEqual=function(e,t){return e.volume===t.volume;},e.isLociEmpty=function(e){return i.a.isEmpty(e.volume.grid);},e.getBoundingSphere=function(e,t){t||(t=Object(o.g)());var r=i.a.getGridToCartesianTransform(e.grid),n=e.grid.cells.space.dimensions,a=n[0],u=n[1],c=n[2],l=s.Vec3.create(0,0,0);s.Vec3.transformMat4(l,l,r);var d=s.Vec3.create(a,u,c);s.Vec3.transformMat4(d,d,r);var f=s.Vec3.create(a,0,0);s.Vec3.transformMat4(f,f,r);var p=s.Vec3.create(0,u,c);s.Vec3.transformMat4(p,f,r);var m=s.Vec3.create(0,0,c);s.Vec3.transformMat4(m,m,r);var h=s.Vec3.create(a,0,c);s.Vec3.transformMat4(h,h,r);var g=s.Vec3.create(a,u,0);s.Vec3.transformMat4(g,g,r);var v=s.Vec3.create(0,u,0);s.Vec3.transformMat4(v,v,r);var b=Object(s.Vec3)();s.Vec3.add(b,l,d),s.Vec3.scale(b,b,.5);var y=Math.max(s.Vec3.distance(l,d),s.Vec3.distance(f,p));return o.g.set(t,b,y/2),o.g.setExtrema(t,[l,d,f,p,m,h,g,v]),t;},function(t){t.Loci=function(e,t){return{kind:\"isosurface-loci\",volume:e,isoValue:t};},t.isLoci=function(e){return!!e&&\"isosurface-loci\"===e.kind;},t.areLociEqual=function(t,r){return t.volume===r.volume&&e.IsoValue.areSame(t.isoValue,r.isoValue,t.volume.grid.stats);},t.isLociEmpty=function(e){return 0===e.volume.grid.cells.data.length;},t.getBoundingSphere=function(t,r,n){return e.getBoundingSphere(t,n);};}(e.Isosurface||(e.Isosurface={})),function(e){e.Loci=function(e,t){return{kind:\"cell-loci\",volume:e,indices:t};},e.isLoci=function(e){return!!e&&\"cell-loci\"===e.kind;},e.areLociEqual=function(e,t){return e.volume===t.volume&&a.OrderedSet.areEqual(e.indices,t.indices);},e.isLociEmpty=function(e){return 0===a.OrderedSet.size(e.indices);};var t=new u.a(\"98\"),r=Object(s.Vec3)();e.getBoundingSphere=function(e,n,u){t.reset();for(var c=i.a.getGridToCartesianTransform(e.grid),l=e.grid.cells.space.getCoords,d=0,f=a.OrderedSet.size(n);d<f;d++){l(a.OrderedSet.getAt(n,d),r),s.Vec3.transformMat4(r,r,c),t.includePosition(r);}for(t.finishedIncludeStep(),d=0,f=a.OrderedSet.size(n);d<f;d++){l(a.OrderedSet.getAt(n,d),r),s.Vec3.transformMat4(r,r,c),t.radiusPosition(r);}var p=t.getSphere(u);return o.g.expand(p,p,10*s.Mat4.getMaxScaleOnAxis(c));};}(e.Cell||(e.Cell={}));}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Observable\",function(){return n.a;}),r.d(t,\"ConnectableObservable\",function(){return i.a;}),r.d(t,\"GroupedObservable\",function(){return a.a;}),r.d(t,\"observable\",function(){return o.a;}),r.d(t,\"Subject\",function(){return s.a;}),r.d(t,\"BehaviorSubject\",function(){return u.a;}),r.d(t,\"ReplaySubject\",function(){return c.a;}),r.d(t,\"AsyncSubject\",function(){return l.a;}),r.d(t,\"asapScheduler\",function(){return d.a;}),r.d(t,\"asyncScheduler\",function(){return f.a;}),r.d(t,\"queueScheduler\",function(){return p.a;}),r.d(t,\"animationFrameScheduler\",function(){return b;}),r.d(t,\"VirtualTimeScheduler\",function(){return y;}),r.d(t,\"VirtualAction\",function(){return _;}),r.d(t,\"Scheduler\",function(){return S.a;}),r.d(t,\"Subscription\",function(){return O.a;}),r.d(t,\"Subscriber\",function(){return x.a;}),r.d(t,\"Notification\",function(){return C.a;}),r.d(t,\"NotificationKind\",function(){return C.b;}),r.d(t,\"pipe\",function(){return w.a;}),r.d(t,\"noop\",function(){return P.a;}),r.d(t,\"identity\",function(){return j.a;}),r.d(t,\"isObservable\",function(){return E;}),r.d(t,\"ArgumentOutOfRangeError\",function(){return A.a;}),r.d(t,\"EmptyError\",function(){return T.a;}),r.d(t,\"ObjectUnsubscribedError\",function(){return D.a;}),r.d(t,\"UnsubscriptionError\",function(){return I.a;}),r.d(t,\"TimeoutError\",function(){return M.a;}),r.d(t,\"bindCallback\",function(){return L;}),r.d(t,\"bindNodeCallback\",function(){return U;}),r.d(t,\"combineLatest\",function(){return q.b;}),r.d(t,\"concat\",function(){return W.a;}),r.d(t,\"defer\",function(){return Q.a;}),r.d(t,\"empty\",function(){return Y.b;}),r.d(t,\"forkJoin\",function(){return Z;}),r.d(t,\"from\",function(){return K.a;}),r.d(t,\"fromEvent\",function(){return ee;}),r.d(t,\"fromEventPattern\",function(){return te;}),r.d(t,\"generate\",function(){return re;}),r.d(t,\"iif\",function(){return ie;}),r.d(t,\"interval\",function(){return oe;}),r.d(t,\"merge\",function(){return ue.a;}),r.d(t,\"never\",function(){return le;}),r.d(t,\"of\",function(){return de.a;}),r.d(t,\"onErrorResumeNext\",function(){return fe;}),r.d(t,\"pairs\",function(){return pe;}),r.d(t,\"partition\",function(){return be;}),r.d(t,\"race\",function(){return ye.a;}),r.d(t,\"range\",function(){return _e;}),r.d(t,\"throwError\",function(){return Oe.a;}),r.d(t,\"timer\",function(){return xe.a;}),r.d(t,\"using\",function(){return Ce;}),r.d(t,\"zip\",function(){return we.b;}),r.d(t,\"scheduled\",function(){return Pe.a;}),r.d(t,\"EMPTY\",function(){return Y.a;}),r.d(t,\"NEVER\",function(){return ce;}),r.d(t,\"config\",function(){return je.a;});var n=r(44),i=r(346),a=r(336),o=r(203),s=r(60),u=r(278),c=r(296),l=r(226),d=r(311),f=r(103),p=r(351),m=r(21),h=r(229),g=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n;}return m.a(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null);})));},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(cancelAnimationFrame(r),t.scheduled=void 0);},t;}(h.a),v=r(225),b=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return m.a(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,i=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break;}while(++n<i&&(e=r.shift()));if(this.active=!1,t){for(;++n<i&&(e=r.shift());)e.unsubscribe();throw t;}},t;}(v.a))(g),y=function(e){function t(t,r){void 0===t&&(t=_),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=e.call(this,t,function(){return n.frame;})||this;return n.maxFrames=r,n.frame=0,n.index=-1,n;}return m.a(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e;}},t.frameTimeFactor=10,t;}(v.a),_=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i;}return m.a(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n);},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0;},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0);},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r);},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1;},t;}(h.a),S=r(320),O=r(69),x=r(35),C=r(190),w=r(272),P=r(199),j=r(181);function E(e){return!!e&&(e instanceof n.a||\"function\"==typeof e.lift&&\"function\"==typeof e.subscribe);}var A=r(214),T=r(220),D=r(208),I=r(277),M=r(349),k=r(116),B=r(301),V=r(100),R=r(122);function L(e,t,r){if(t){if(!Object(R.a)(t))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return L(e,r).apply(void 0,n).pipe(Object(k.a)(function(e){return Object(V.a)(e)?t.apply(void 0,e):t(e);}));};r=t;}return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var a,o=this,s={context:o,subject:a,callbackFunc:e,scheduler:r};return new n.a(function(n){if(r){var i={args:t,subscriber:n,params:s};return r.schedule(N,0,i);}if(!a){a=new l.a();try{e.apply(o,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a.next(e.length<=1?e[0]:e),a.complete();}]));}catch(e){Object(B.a)(a)?a.error(e):console.warn(e);}}return a.subscribe(n);});};}function N(e){var t=this,r=e.args,n=e.subscriber,i=e.params,a=i.callbackFunc,o=i.context,s=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a();try{a.apply(o,r.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.length<=1?e[0]:e;t.add(s.schedule(F,0,{value:n,subject:u}));}]));}catch(e){u.error(e);}}this.add(u.subscribe(n));}function F(e){var t=e.value,r=e.subject;r.next(t),r.complete();}function U(e,t,r){if(t){if(!Object(R.a)(t))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return U(e,r).apply(void 0,n).pipe(Object(k.a)(function(e){return Object(V.a)(e)?t.apply(void 0,e):t(e);}));};r=t;}return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var a={subject:void 0,args:t,callbackFunc:e,scheduler:r,context:this};return new n.a(function(n){var i=a.context,o=a.subject;if(r)return r.schedule(z,0,{params:a,subscriber:n,context:i});if(!o){o=a.subject=new l.a();try{e.apply(i,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.shift();r?o.error(r):(o.next(e.length<=1?e[0]:e),o.complete());}]));}catch(e){Object(B.a)(o)?o.error(e):console.warn(e);}}return o.subscribe(n);});};}function z(e){var t=this,r=e.params,n=e.subscriber,i=e.context,a=r.callbackFunc,o=r.args,s=r.scheduler,u=r.subject;if(!u){u=r.subject=new l.a();try{a.apply(i,o.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.shift();if(n)t.add(s.schedule(G,0,{err:n,subject:u}));else{var i=e.length<=1?e[0]:e;t.add(s.schedule(H,0,{value:i,subject:u}));}}]));}catch(e){this.add(s.schedule(G,0,{err:e,subject:u}));}}this.add(u.subscribe(n));}function H(e){var t=e.value,r=e.subject;r.next(t),r.complete();}function G(e){var t=e.err;e.subject.error(t);}var q=r(293),W=r(240),Q=r(297),Y=r(133),X=r(300),K=r(139);function Z(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var r=e[0];if(Object(V.a)(r))return J(r,null);if(Object(X.a)(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return J(n.map(function(e){return r[e];}),n);}}if(\"function\"==typeof e[e.length-1]){var i=e.pop();return J(e=1===e.length&&Object(V.a)(e[0])?e[0]:e,null).pipe(Object(k.a)(function(e){return i.apply(void 0,e);}));}return J(e,null);}function J(e,t){return new n.a(function(r){var n=e.length;if(0!==n)for(var i=new Array(n),a=0,o=0,s=function s(_s2){var u=Object(K.a)(e[_s2]),c=!1;r.add(u.subscribe({next:function next(e){c||(c=!0,o++),i[_s2]=e;},error:function error(e){return r.error(e);},complete:function complete(){++a!==n&&c||(o===n&&r.next(t?t.reduce(function(e,t,r){return e[t]=i[r],e;},{}):i),r.complete());}}));},u=0;u<n;u++)s(u);else r.complete();});}var $=r(215);function ee(e,t,r,i){return Object($.a)(r)&&(i=r,r=void 0),i?ee(e,t,r).pipe(Object(k.a)(function(e){return Object(V.a)(e)?i.apply(void 0,e):i(e);})):new n.a(function(n){!function e(t,r,n,i,a){var o;if(function(e){return e&&\"function\"==typeof e.addEventListener&&\"function\"==typeof e.removeEventListener;}(t)){var s=t;t.addEventListener(r,n,a),o=function o(){return s.removeEventListener(r,n,a);};}else if(function(e){return e&&\"function\"==typeof e.on&&\"function\"==typeof e.off;}(t)){var u=t;t.on(r,n),o=function o(){return u.off(r,n);};}else if(function(e){return e&&\"function\"==typeof e.addListener&&\"function\"==typeof e.removeListener;}(t)){var c=t;t.addListener(r,n),o=function o(){return c.removeListener(r,n);};}else{if(!t||!t.length)throw new TypeError(\"Invalid event target\");for(var l=0,d=t.length;l<d;l++)e(t[l],r,n,i,a);}i.add(o);}(e,t,function(e){arguments.length>1?n.next(Array.prototype.slice.call(arguments)):n.next(e);},n,r);});}function te(e,t,r){return r?te(e,t).pipe(Object(k.a)(function(e){return Object(V.a)(e)?r.apply(void 0,e):r(e);})):new n.a(function(r){var n,i=function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e);};try{n=e(i);}catch(e){return void r.error(e);}if(Object($.a)(t))return function(){return t(i,n);};});}function re(e,t,r,i,a){var o,s;if(1==arguments.length){var u=e;s=u.initialState,t=u.condition,r=u.iterate,o=u.resultSelector||j.a,a=u.scheduler;}else void 0===i||Object(R.a)(i)?(s=e,o=j.a,a=i):(s=e,o=i);return new n.a(function(e){var n=s;if(a)return a.schedule(ne,0,{subscriber:e,iterate:r,condition:t,resultSelector:o,state:n});for(;;){if(t){var i=void 0;try{i=t(n);}catch(t){return void e.error(t);}if(!i){e.complete();break;}}var u=void 0;try{u=o(n);}catch(t){return void e.error(t);}if(e.next(u),e.closed)break;try{n=r(n);}catch(t){return void e.error(t);}}});}function ne(e){var t=e.subscriber,r=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state);}catch(e){return void t.error(e);}else e.needIterate=!0;if(r){var n=void 0;try{n=r(e.state);}catch(e){return void t.error(e);}if(!n)return void t.complete();if(t.closed)return;}var i;try{i=e.resultSelector(e.state);}catch(e){return void t.error(e);}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e);}}function ie(e,t,r){return void 0===t&&(t=Y.a),void 0===r&&(r=Y.a),Object(Q.a)(function(){return e()?t:r;});}var ae=r(231);function oe(e,t){return void 0===e&&(e=0),void 0===t&&(t=f.a),(!Object(ae.a)(e)||e<0)&&(e=0),t&&\"function\"==typeof t.schedule||(t=f.a),new n.a(function(r){return r.add(t.schedule(se,e,{subscriber:r,counter:0,period:e})),r;});}function se(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n);}var ue=r(235),ce=new n.a(P.a);function le(){return ce;}var de=r(254);function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return Y.a;var r=e[0],i=e.slice(1);return 1===e.length&&Object(V.a)(r)?fe.apply(void 0,r):new n.a(function(e){var t=function t(){return e.add(fe.apply(void 0,i).subscribe(e));};return Object(K.a)(r).subscribe({next:function next(t){e.next(t);},error:t,complete:t});});}function pe(e,t){return t?new n.a(function(r){var n=Object.keys(e),i=new O.a();return i.add(t.schedule(me,0,{keys:n,index:0,subscriber:r,subscription:i,obj:e})),i;}):new n.a(function(t){for(var r=Object.keys(e),n=0;n<r.length&&!t.closed;n++){var i=r[n];e.hasOwnProperty(i)&&t.next([i,e[i]]);}t.complete();});}function me(e){var t=e.keys,r=e.index,n=e.subscriber,i=e.subscription,a=e.obj;if(!n.closed)if(r<t.length){var o=t[r];n.next([o,a[o]]),i.add(this.schedule({keys:t,index:r+1,subscriber:n,subscription:i,obj:a}));}else n.complete();}var he=r(378),ge=r(285),ve=r(169);function be(e,t,r){return[Object(ve.a)(t,r)(new n.a(Object(ge.a)(e))),Object(ve.a)(Object(he.a)(t,r))(new n.a(Object(ge.a)(e)))];}var ye=r(348);function _e(e,t,r){return void 0===e&&(e=0),new n.a(function(n){void 0===t&&(t=e,e=0);var i=0,a=e;if(r)return r.schedule(Se,0,{index:i,count:t,start:e,subscriber:n});for(;;){if(i++>=t){n.complete();break;}if(n.next(a++),n.closed)break;}});}function Se(e){var t=e.start,r=e.index,n=e.count,i=e.subscriber;r>=n?i.complete():(i.next(t),i.closed||(e.index=r+1,e.start=t+1,this.schedule(e)));}var Oe=r(294),xe=r(344);function Ce(e,t){return new n.a(function(r){var n,i;try{n=e();}catch(e){return void r.error(e);}try{i=t(n);}catch(e){return void r.error(e);}var a=(i?Object(K.a)(i):Y.a).subscribe(r);return function(){a.unsubscribe(),n&&n.unsubscribe();};});}var we=r(298),Pe=r(350),je=r(175);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(44),i=r(285),a=r(350);function o(e,t){return t?Object(a.a)(e,t):e instanceof n.a?e:new n.a(Object(i.a)(e));}},function(e,t,r){\"use strict\";function n(e){return{kind:\"table-legend\",table:e};}function i(e,t,r){return{kind:\"scale-legend\",minLabel:e,maxLabel:t,colors:r};}r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"d\",function(){return u;}),r.d(t,\"c\",function(){return l;});var n=r(58),i=r(1),a=r(53);function o(e,t,r,n){for(var i=t;i<r;++i)e[i]=255*n;return!0;}function s(e,t,r){e.fill(0,t,r);}function u(e,t){var r=Object(a.c)(Math.max(1,e),1,Uint8Array,t&&t.tTransparency.ref.value.array);return t?(n.b.update(t.tTransparency,r),n.b.update(t.uTransparencyTexDim,i.Vec2.create(r.width,r.height)),n.b.update(t.dTransparency,e>0),t):{tTransparency:n.b.create(r),uTransparencyTexDim:n.b.create(i.Vec2.create(r.width,r.height)),dTransparency:n.b.create(e>0),dTransparencyVariant:n.b.create(\"single\")};}var c={array:new Uint8Array(1),width:1,height:1};function l(e){return e?(n.b.update(e.tTransparency,c),n.b.update(e.uTransparencyTexDim,i.Vec2.create(1,1)),e):{tTransparency:n.b.create(c),uTransparencyTexDim:n.b.create(i.Vec2.create(1,1)),dTransparency:n.b.create(!1),dTransparencyVariant:n.b.create(\"single\")};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"c\",function(){return u;}),r.d(t,\"d\",function(){return l;});var n=r(58),i=r(1),a=r(53);function o(e,t,r,n){for(var i=t;i<r;++i)e[i]=n;return!0;}function s(e,t,r){e.fill(0,t,r);}function u(e,t){var r=Object(a.c)(Math.max(1,e),1,Uint8Array,t&&t.tClipping.ref.value.array);return t?(n.b.update(t.tClipping,r),n.b.update(t.uClippingTexDim,i.Vec2.create(r.width,r.height)),n.b.update(t.dClipping,e>0),t):{dClipObjectCount:n.b.create(0),dClipVariant:n.b.create(\"instance\"),tClipping:n.b.create(r),uClippingTexDim:n.b.create(i.Vec2.create(r.width,r.height)),dClipping:n.b.create(e>0)};}var c={array:new Uint8Array(1),width:1,height:1};function l(e){return e?(n.b.update(e.tClipping,c),n.b.update(e.uClippingTexDim,i.Vec2.create(1,1)),e):{dClipObjectCount:n.b.create(0),dClipVariant:n.b.create(\"instance\"),tClipping:n.b.create(c),uClippingTexDim:n.b.create(i.Vec2.create(1,1)),dClipping:n.b.create(!1)};}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});var n={kind:\"null-location\"};function i(e,t,r){return{kind:\"data-location\",tag:e,data:t,element:r};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(39),a=r(256),o=r(123),s=r(74),u=r(264),c=r(257),l=r(30),d=r(258),f=r(218);!function(e){function t(e){switch(e.kind){case\"mesh\":return 3*e.triangleCount;case\"points\":return e.pointCount;case\"spheres\":return 2*e.sphereCount*3;case\"text\":return 2*e.charCount*3;case\"lines\":return 2*e.lineCount*3;case\"direct-volume\":return 36;case\"image\":return 6;case\"texture-mesh\":return e.vertexCount;}}e.getDrawCount=t,e.getGroupCount=function(e){switch(e.kind){case\"mesh\":case\"points\":case\"spheres\":case\"text\":case\"lines\":return 0===t(e)?0:Object(l.arrayMax)(e.groupBuffer.ref.value)+1;case\"direct-volume\":return 1;case\"image\":return Object(l.arrayMax)(e.groupTexture.ref.value.array)+1;case\"texture-mesh\":return e.groupCount;}},e.getUtils=function(e){switch(e.kind){case\"mesh\":return i.a.Utils;case\"points\":return a.a.Utils;case\"spheres\":return c.a.Utils;case\"text\":return o.a.Utils;case\"lines\":return s.a.Utils;case\"direct-volume\":return u.a.Utils;case\"image\":return f.a.Utils;case\"texture-mesh\":return d.a.Utils;}},e.getGranularity=function(e,t){return\"instance\"===t&&e.isComplex?\"group\":t;};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;}),r.d(t,\"b\",function(){return d;});var n=r(0),i=r(5),a=r(1),o=r(53),s=r(143),u=r(144),c=r(217);function l(e,t,r){switch(u.a.getGranularity(e,t.granularity)){case\"uniform\":return function(e,t,r){return function(e,t){return t?(i.e.update(t.uSize,e),\"uniform\"!==t.dSizeType.ref.value&&i.e.update(t.dSizeType,\"uniform\"),t):Object(n.__assign)(Object(n.__assign)({uSize:i.e.create(e)},{tSize:i.e.create(f),uSizeTexDim:i.e.create(a.Vec2.create(1,1))}),{dSizeType:i.e.create(\"uniform\")});}(t(s.b),r);}(0,t.size,r);case\"group\":return function(e,t,r){var n=e.groupCount,i=Object(o.c)(Math.max(1,n),1,Uint8Array,r&&r.tSize.ref.value.array);e.reset();for(;e.hasNext&&!e.isNextNewInstance;){var a=e.move();i.array[a.groupIndex]=255*Object(c.c)(t(a.location));}return p(i,\"group\",r);}(e,t.size,r);case\"groupInstance\":return function(e,t,r){var n=e.groupCount,i=e.instanceCount*n,a=Object(o.c)(Math.max(1,i),1,Uint8Array,r&&r.tSize.ref.value.array);e.reset();for(;e.hasNext&&!e.isNextNewInstance;){var s=e.move();a.array[s.index]=255*Object(c.c)(t(s.location));}return p(a,\"groupInstance\",r);}(e,t.size,r);case\"instance\":return function(e,t,r){var n=e.instanceCount,i=Object(o.c)(Math.max(1,n),1,Uint8Array,r&&r.tSize.ref.value.array);e.reset();for(;e.hasNext&&!e.isNextNewInstance;){var a=e.move();i.array[a.instanceIndex]=255*Object(c.c)(t(a.location)),e.skipInstance();}return p(i,\"instance\",r);}(e,t.size,r);}}function d(e){switch(e.dSizeType.ref.value){case\"uniform\":return e.uSize.ref.value;case\"instance\":case\"group\":case\"groupInstance\":for(var t=0,r=e.tSize.ref.value.array,n=0,i=r.length;n<i;++n){var a=Object(c.a)(r[n]/255);t<a&&(t=a);}return t;}}var f={array:new Uint8Array(1),width:1,height:1};function p(e,t,r){return r?(i.e.update(r.tSize,e),i.e.update(r.uSizeTexDim,a.Vec2.create(e.width,e.height)),r.dSizeType.ref.value!==t&&i.e.update(r.dSizeType,t),r):{uSize:i.e.create(0),tSize:i.e.create(e),uSizeTexDim:i.e.create(a.Vec2.create(e.width,e.height)),dSizeType:i.e.create(t)};}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return a;}),r.d(t,\"a\",function(){return s;}),r.d(t,\"c\",function(){return c;});var n=r(22),i=r(1);function a(e,t){switch(e.kind){case 0:return e.model.atomicHierarchy.derived.residue.moleculeType[e.residueIndex[t]];case 1:case 2:var r=function(e,t){var r=e.coarseElements.entityKey[t],n=e.model.sequence.byEntityKey[r].sequence,i=e.coarseElements.seq_id_begin.value(t);return n.compId.value(i-1);}(e,t),i=e.model.properties.chemicalComponentMap.get(r);if(i)return Object(n.getMoleculeType)(i.type,r);}return 0;}var o=new Set();function s(e,t){var r=n.PolymerTypeAtomRoleId[e];if(void 0!==r){var i=r[t];if(void 0!==i)return i;}return o;}var u=i.Vec3.zero();function c(e,t){for(var r=e.conformation.position,n=new Float32Array(3*t.length),a=e.elements,o=0,s=t.length;o<s;++o)r(a[t[o]],u),i.Vec3.toArray(u,n,3*o);return n;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"c\",function(){return c;});r(53);var n=r(5),i=r(17),a=r(1),o=new Float32Array([1,1,-1,1,-1,-1,-1,-1,1,-1,1,1]),s={drawCount:Object(i.j)(\"number\"),instanceCount:Object(i.j)(\"number\"),aPosition:Object(i.a)(\"float32\",2,0),uQuadScale:Object(i.i)(\"v2\")},u={drawCount:n.e.create(6),instanceCount:n.e.create(1),aPosition:n.e.create(o),uQuadScale:n.e.create(a.Vec2.create(1,1))};function c(e,t,r,i){var a=e.gl,o=e.resources,s=(r=Object(n.i)(r,t.getWidth()))*(i=Object(n.i)(i,t.getHeight()))*4,u=o.framebuffer(),c=function(e,t,r){switch(t.type){case e.UNSIGNED_BYTE:return new Uint8Array(r);case e.FLOAT:return new Float32Array(r);}throw new Error(\"unknown/unsupported texture type\");}(a,t,s);return u.bind(),t.attachFramebuffer(u,0),e.readPixels(0,0,r,i,c),{array:c,width:r,height:i};}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return c;}),r.d(t,\"a\",function(){return l;}),r.d(t,\"c\",function(){return d;});var n,i=r(0),a=r(7),o=r(1),s=r(5),u=r(128);function c(e,t,r){for(var n={},i=0,a=t.blocks;i<a.length;i++){var o=a[i];n[o.header]=l(e,o,r);}return n;}function l(e,t,r){return function(e,t,r){for(var n=Object.create(null),i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];n[s]=h(s,e[s],t,r);}return a.c.ofTables(t.header,e,n);}(e,t,r);}function d(e,t){return new p(t,e,!0);}function f(e,t,r,n){return{schema:e,__array:t.__array,isDefined:t.isDefined,rowCount:t.rowCount,value:r,valueKind:t.valueKind,areValuesEqual:t.areValuesEqual,toArray:n};}!function(e){function t(e){return e.replace(\".\",\"_\").replace(/\\[/,\"_\").replace(/(\\[|\\])/g,\"\");}e.canonical=t,e.equal=function(e,r){return t(e)===t(r);},e.create=function(e,r,n){void 0===n&&(n=!1);var i=e+(r?\".\"+r:\"\");return n?t(i):i;};}(n||(n={}));var p=function p(e,t,r){this._isDefined=r;var n=Object.keys(t);this._rowCount=e.rowCount,this._columns=n,this._schema=t;for(var i=Object.create(null),c=function c(r){Object.defineProperty(l,r,{get:function get(){if(i[r])return i[r];var n=t[r];if(\"list\"===n.valueType)i[r]=function(e,t,r){var n=e.separator,i=e.itemParse,o=t.getField(r),u=o?function(e){return o.str(e).split(n).map(function(e){return i(e.trim());}).filter(function(e){return!!e;});}:function(e){return[];};return{schema:e,__array:void 0,isDefined:!!o,rowCount:t.rowCount,value:u,valueKind:o?o.valueKind:function(){return 1;},areValuesEqual:function areValuesEqual(e,t){return Object(s.g)(u(e),u(t));},toArray:function toArray(e){return a.b.createAndFillArray(t.rowCount,u,e);}};}(n,e,r);else if(\"tensor\"===n.valueType)i[r]=function(e,t,r){var n=e.space,i=t.fieldNames.includes(r+\"[0]\")||t.fieldNames.includes(r+\"[0][0]\")||t.fieldNames.includes(r+\"[0][0][0]\"),s=i?0:1,c=t.fieldNames.includes(r+\"_1\")||t.fieldNames.includes(r+\"_11\")||t.fieldNames.includes(r+\"_111\")?\"underscore\":\"brackets\",l=u.h(r,n.rank,i,c),d=t.getField(l(s,s,s))||a.a.Undefined(t.rowCount,e),f=function f(e){return u.g(t,n,e,l);};return{schema:e,__array:void 0,isDefined:d.isDefined,rowCount:t.rowCount,value:f,valueKind:d.valueKind,areValuesEqual:function areValuesEqual(e,t){return o.Tensor.areEqualExact(f(e),f(t));},toArray:function toArray(e){return a.b.createAndFillArray(t.rowCount,f,e);}};}(n,e,r);else{var c=function(e){switch(e.valueType){case\"str\":return function(t,r,n){return f(e,t,t.str,t.toStringArray);};case\"int\":return function(t,r,n){return f(e,t,t.int,t.toIntArray);};case\"float\":return function(t,r,n){return f(e,t,t.float,t.toFloatArray);};case\"list\":throw new Error(\"Use createListColumn instead.\");case\"tensor\":throw new Error(\"Use createTensorColumn instead.\");}}(n),l=e.getField(r);i[r]=l?c(l,e,r):a.a.Undefined(e.rowCount,n);}return i[r];},enumerable:!0,configurable:!1});},l=this,d=0,p=n;d<p.length;d++)c(p[d]);};function m(e,t,r,i){var a=n.create(t,e),o=n.canonical(a);if(o in r)return r[o];if(i&&a in i)for(var s=0,u=i[a];s<u.length;s++){var c=u[s],l=n.canonical(c);if(l in r)return r[l];}}function h(e,t,r,a){var o=r.categories[e];if(a){for(var s=function(e){for(var t=Object.create(null),r=0,i=Object.keys(e.categories);r<i.length;r++)for(var a=i[r],o=0,s=e.categories[a].fieldNames;o<s.length;o++){var u=s[o];t[n.create(a,u,!0)]=e.categories[a].getField(u);}return t;}(r),c=Object.create(null),l=[],d=0,f=0,h=Object.keys(t);f<h.length;f++){var g=h[f],v=m(g,e,s,a);v&&(c[g]=v,l.push(g),d=v.rowCount);}o={rowCount:d,name:e,fieldNames:Object(i.__spreadArrays)(l),getField:function getField(e){return c[e];}};}return new p(o||u.b.empty(e),t,!!o);}},function(e,t,r){\"use strict\";function n(e,t,r){void 0===r&&(r=-1);for(var n=new Float32Array(3*e),i=-1===r?e<=4?Math.sqrt(2)/2:.6:r,a=t?1:0,o=0,s=e;o<s;++o){var u=(2*o+a)/e*Math.PI;n[3*o]=Math.cos(u)*i,n[3*o+1]=Math.sin(u)*i,n[3*o+2]=0;}return n;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return f;});var n=r(356),i=r(89),a=r(281),o=r(5),s=r(360),u=r(4),c=r(2),l={bfactorFactor:c.ParamDefinition.Numeric(.1,{min:0,max:1,step:.01}),rmsfFactor:c.ParamDefinition.Numeric(.05,{min:0,max:1,step:.01}),baseSize:c.ParamDefinition.Numeric(.2,{min:0,max:2,step:.1})};function d(e,t,r){return u.Unit.isAtomic(e)?e.model.atomicConformation.B_iso_or_equiv.value(t)*r.bfactorFactor:u.Unit.isSpheres(e)?e.model.coarseConformation.spheres.rmsf[t]*r.rmsfFactor:0;}var f,p,m={name:\"uncertainty\",label:\"Uncertainty/Disorder\",category:\"\",factory:function e(t,r){return{factory:e,granularity:\"group\",size:function size(e){var t=r.baseSize;return u.StructureElement.Location.is(e)?t+=d(e.unit,e.element,r):u.Bond.isLocation(e)&&(t+=d(e.aUnit,e.aUnit.elements[e.aIndex],r)),t;},props:r,description:\"Assigns a size reflecting the uncertainty or disorder of an element's position, e.g. B-factor or RMSF, depending on the data availability and experimental technique.\"};},getParams:function getParams(e){return l;},defaultValues:c.ParamDefinition.getDefaultValues(l),isApplicable:function isApplicable(e){return!!e.structure&&e.structure.models.some(function(e){return e.atomicConformation.B_iso_or_equiv.isDefined||e.coarseHierarchy.isDefined;});}};(p=f||(f={})).EmptyFactory=function(){return p.Empty;},p.Empty={factory:p.EmptyFactory,granularity:\"uniform\",size:function size(){return 1;},props:{}},p.areEqual=function(e,t){return e.factory===t.factory&&Object(o.h)(e.props,t.props);},p.EmptyProvider={name:\"\",label:\"\",category:\"\",factory:p.EmptyFactory,getParams:function getParams(){return{};},defaultValues:{},isApplicable:function isApplicable(){return!0;}},p.createRegistry=function(){return new i.b(p.BuiltIn,p.EmptyProvider);},p.BuiltIn={physical:a.b,\"shape-group\":s.b,uncertainty:m,uniform:n.b};},function(e,t,r){\"use strict\";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error(\"[Immer] minified error nr: \"+e+(r.length?\" \"+r.join(\",\"):\"\")+\". Find the full error at: https://bit.ly/3cXEKWf\");}function i(e){return!!e&&!!e[U];}function a(e){return!!e&&(function(e){if(!e||\"object\"!=typeof_default()(e))return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype;}(e)||Array.isArray(e)||!!e[F]||!!e.constructor[F]||d(e)||f(e));}function o(e,t,r){void 0===r&&(r=!1),0===s(e)?(r?Object.keys:z)(e).forEach(function(r){return t(r,e[r],e);}):e.forEach(function(r,n){return t(n,r,e);});}function s(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:f(e)?3:0;}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t);}function c(e,t){return 2===s(e)?e.get(t):e[t];}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t;}function d(e){return V&&e instanceof Map;}function f(e){return R&&e instanceof Set;}function p(e){return e.o||e.t;}function m(e,t){if(void 0===t&&(t=!1),Array.isArray(e))return e.slice();var r=Object.create(Object.getPrototypeOf(e));return o(e,function(i){if(i!==U){var a=Object.getOwnPropertyDescriptor(e,i),o=a.value;a.get&&(t||n(1),o=a.get.call(e)),a.enumerable?r[i]=o:Object.defineProperty(r,i,{value:o,writable:!0,configurable:!0});}}),r;}function h(e,t){i(e)||v(e)||!a(e)||(s(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&o(e,function(e,t){return h(t,!0);},!0));}function g(){n(2);}function v(e){return null==e||\"object\"!=typeof_default()(e)||Object.isFrozen(e);}function b(e){var t=H[e];return t||n(19,e),t;}function y(){return k;}function _(e,t){t&&(b(\"Patches\"),e.u=[],e.s=[],e.v=t);}function S(e){O(e),e.p.forEach(C),e.p=null;}function O(e){e===k&&(k=e.l);}function x(e){return k={p:[],l:k,h:e,m:!0,_:0};}function C(e){var t=e[U];0===t.i||1===t.i?t.j():t.O=!0;}function w(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.g||b(\"ES5\").S(t,e,i),i?(r[U].P&&(S(t),n(4)),a(e)&&(e=P(t,e),t.l||E(t,e)),t.u&&b(\"Patches\").M(r[U],e,t.u,t.s)):e=P(t,r,[]),S(t),t.u&&t.v(t.u,t.s),e!==N?e:void 0;}function P(e,t,r){if(v(t))return t;var n=t[U];if(!n)return o(t,function(i,a){return j(e,n,t,i,a,r);},!0),t;if(n.A!==e)return t;if(!n.P)return E(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=m(n.k,!0):n.o;o(i,function(t,a){return j(e,n,i,t,a,r);}),E(e,i,!1),r&&e.u&&b(\"Patches\").R(n,r,e.u,e.s);}return n.o;}function j(e,t,r,n,o,d){if(i(o)){var f=P(e,o,d&&t&&3!==t.i&&!u(t.D,n)?d.concat(n):void 0);if(m=n,h=f,2===(g=s(p=r))?p.set(m,h):3===g?(p.delete(m),p.add(h)):p[m]=h,!i(f))return;e.m=!1;}var p,m,h,g;if((!t||!l(o,c(t.t,n)))&&a(o)){if(!e.h.N&&e._<1)return;P(e,o),t&&t.A.l||E(e,o);}}function E(e,t,r){void 0===r&&(r=!1),e.h.N&&e.m&&h(t,r);}function A(e,t){var r=e[U],n=Reflect.getOwnPropertyDescriptor(r?p(r):e,t);return n&&n.value;}function T(e){if(!e.P){if(e.P=!0,0===e.i||1===e.i){var t=e.o=m(e.t);o(e.p,function(e,r){t[e]=r;}),e.p=void 0;}e.l&&T(e.l);}}function D(e){e.o||(e.o=m(e.t));}function I(e,t,r){var n=d(t)?b(\"MapSet\").T(t,r):f(t)?b(\"MapSet\").F(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:y(),P:!1,I:!1,D:{},l:t,t:e,k:null,p:{},o:null,j:null,C:!1},i=n,a=G;r&&(i=[n],a=q);var o=Proxy.revocable(i,a),s=o.revoke,u=o.proxy;return n.k=u,n.j=s,u;}(t,r):b(\"ES5\").J(t,r);return(r?r.A:y()).p.push(n),n;}r.d(t,\"b\",function(){return Q;}),r.d(t,\"c\",function(){return Y;});var M,k,B=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof_default()(Symbol(\"x\")),V=\"undefined\"!=typeof Map,R=\"undefined\"!=typeof Set,L=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,N=B?Symbol(\"immer-nothing\"):((M={})[\"immer-nothing\"]=!0,M),F=B?Symbol(\"immer-draftable\"):\"__$immer_draftable\",U=B?Symbol(\"immer-state\"):\"__$immer_state\",z=(\"undefined\"!=typeof Symbol&&Symbol.iterator,\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));}:Object.getOwnPropertyNames),H={},G={get:function get(e,t){if(t===U)return e;var r=e.p;if(!e.P&&u(r,t))return r[t];var n=p(e)[t];if(e.I||!a(n))return n;if(e.P){if(n!==A(e.t,t))return n;r=e.o;}return r[t]=I(e.A.h,n,e);},has:function has(e,t){return t in p(e);},ownKeys:function ownKeys(e){return Reflect.ownKeys(p(e));},set:function set(e,t,r){if(!e.P){var n=A(e.t,t);if(r?l(n,r)||r===e.p[t]:l(n,r)&&t in e.t)return!0;D(e),T(e);}return e.D[t]=!0,e.o[t]=r,!0;},deleteProperty:function deleteProperty(e,t){return void 0!==A(e.t,t)||t in e.t?(e.D[t]=!1,D(e),T(e)):e.D[t]&&delete e.D[t],e.o&&delete e.o[t],!0;},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){var r=p(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&(n.writable=!0,n.configurable=1!==e.i||\"length\"!==t),n;},defineProperty:function defineProperty(){n(11);},getPrototypeOf:function getPrototypeOf(e){return Object.getPrototypeOf(e.t);},setPrototypeOf:function setPrototypeOf(){n(12);}},q={};o(G,function(e,t){q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments);};}),q.deleteProperty=function(e,t){return G.deleteProperty.call(this,e[0],t);},q.set=function(e,t,r){return G.set.call(this,e[0],t,r,e[0]);};var W=new(function(){function e(e){this.g=L,this.N=!1,\"boolean\"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),\"boolean\"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this);}var t=e.prototype;return t.produce=function(e,t,r){if(\"function\"==typeof e&&\"function\"!=typeof t){var i=t;t=e;var o=this;return function(e){var r=this;void 0===e&&(e=i);for(var n=arguments.length,a=Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];return o.produce(e,function(e){var n;return(n=t).call.apply(n,[r,e].concat(a));});};}var s;if(\"function\"!=typeof t&&n(6),void 0!==r&&\"function\"!=typeof r&&n(7),a(e)){var u=x(this),c=I(this,e,void 0),l=!0;try{s=t(c),l=!1;}finally{l?S(u):O(u);}return\"undefined\"!=typeof Promise&&s instanceof Promise?s.then(function(e){return _(u,r),w(e,u);},function(e){throw S(u),e;}):(_(u,r),w(s,u));}if((s=t(e))!==N)return void 0===s&&(s=e),this.N&&h(s,!0),s;},t.produceWithPatches=function(e,t){var r,n,i=this;return\"function\"==typeof e?function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return i.produceWithPatches(t,function(t){return e.apply(void 0,[t].concat(n));});}:[this.produce(e,t,function(e,t){r=e,n=t;}),r,n];},t.createDraft=function(e){a(e)||n(8);var t=x(this),r=I(this,e,void 0);return r[U].C=!0,O(t),r;},t.finishDraft=function(e,t){var r=(e&&e[U]).A;return _(r,t),w(void 0,r);},t.setAutoFreeze=function(e){this.N=e;},t.setUseProxies=function(e){L||n(20),this.g=e;},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&\"replace\"===n.op){e=n.value;break;}}var a=b(\"Patches\").U;return i(e)?a(e,t):this.produce(e,function(e){return a(e,t.slice(r+1));});},e;}())(),Q=W.produce,Y=(W.produceWithPatches.bind(W),W.setAutoFreeze.bind(W));W.setUseProxies.bind(W),W.applyPatches.bind(W),W.createDraft.bind(W),W.finishDraft.bind(W);t.a=Q;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return N;});var n=r(0),i=r(358),a=r(22),o=r(2),s=r(1),u=r(46);var c=r(171),l=-27.888;function d(e,t,r,n){var i=s.Vec3.distance(e,n),a=s.Vec3.distance(t,n),o=s.Vec3.distance(t,r),u=s.Vec3.distance(e,r),c=l/i-l/a+(l/o-l/u);return c<-9.9?-9.9:c;}function f(e,t,r){for(var n=t.residueIndices,i=t.cIndices,a=t.hIndices,o=t.nIndices,u=t.oIndices,l=e.model.atomicHierarchy.index,f=e.conformation.invariantPosition,p=e.model.atomicHierarchy.derived.residue.traceElementIndex,m=n.length,h=[],g=[],v=[],b=Object(s.Vec3)(),y=Object(s.Vec3)(),_=Object(s.Vec3)(),S=Object(s.Vec3)(),O=Object(s.Vec3)(),x=Object(s.Vec3)(),C=Object(s.Vec3)(),w=0,P=n.length;w<P;++w){var j=w,E=n[w],A=u[j],T=i[j],D=p[E];if(-1!==A&&-1!==T&&-1===l.findAtomOnResidue(E,\"OXT\")){f(A,b),f(T,y),f(D,_);for(var I=r.find(_[0],_[1],_[2],9),M=I.indices,k=I.count,B=0;B<k;++B){var V=M[B];if(V!==j&&V-1!==j&&V+1!==j){var R=o[V];if(-1!==R){f(R,S);var L=a[V];if(-1===L){if(0===V)continue;var N=V-1,F=u[N],U=i[N];if(-1===F||-1===U)continue;f(F,C),f(U,x),s.Vec3.sub(O,x,C);var z=s.Vec3.distance(C,x);s.Vec3.scaleAndAdd(O,S,O,1/z);}else f(L,O);var H=d(b,y,S,O);H>-.5||(h[h.length]=j,g[g.length]=V,v[v.length]=H);}}}}}return function(e,t,r,n){for(var i=new c.a.DirectedEdgeBuilder(e,t,r),a=new Float32Array(i.slotCount),o=0,s=i.edgeCount;o<s;o++)i.addNextEdge(),i.assignProperty(a,n[o]);return i.createGraph({energies:n});}(m,h,g,v);}var p,m,h=r(5);(m=p||(p={})).is=h.a.has,m.create=h.a.create;var g=function g(e,t,r){this.partner1=Math.min(e,t),this.partner2=Math.max(e,t),this.type=r;};function v(e,t){if(t.type!==e.type)return!1;if(t.partner1!==e.firstEnd+1)return!1;if(0===t.type){if(t.partner2===e.secondEnd+1)return!0;}else if(t.partner2===e.secondStart-1)return!0;return!1;}function b(e,t){return e.type===t.type&&t.firstStart-e.firstEnd<6&&e.firstStart<t.firstStart&&0===t.nextLadder&&(0===e.type?y(e,t):y(t,e));}function y(e,t){return t.secondStart-e.secondEnd>0&&(t.secondStart-e.secondEnd<6&&t.firstStart-e.firstEnd<3||t.secondStart-e.secondEnd<3);}function _(e){return p.is(e,8)||p.is(e,1)||p.is(e,16);}var S=r(11),O=r(6),x=r(185);var C={oldDefinition:o.ParamDefinition.Boolean(!0,{description:\"Whether to use the old DSSP convention for the annotation of turns and helices, causes them to be two residues shorter\"}),oldOrdering:o.ParamDefinition.Boolean(!0,{description:\"Alpha-helices are preferred over 3-10 helices\"})};function w(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,a,o,c,l,d,m,h,y,C,w,I,M,k,B,V,R,L,N,F,U;return Object(n.__generator)(this,function(n){for(r=function(e){for(var t=e.model.atomicHierarchy.index,r=e.proteinElements,n=e.residueIndex,i=r.length,a=new Uint32Array(i),o=new Int32Array(i),s=new Int32Array(i),u=new Int32Array(i),c=new Int32Array(i),l=0;l<i;++l){var d=n[r[l]];a[l]=d,o[l]=t.findAtomOnResidue(d,\"C\"),s[l]=t.findAtomOnResidue(d,\"H\"),u[l]=t.findAtomOnResidue(d,\"O\"),c[l]=t.findAtomOnResidue(d,\"N\");}return{residueIndices:O.SortedArray.ofSortedArray(a),cIndices:o,hIndices:s,oIndices:u,nIndices:c};}(e),a=r.residueIndices,o=function(e,t){for(var r=e.model.atomicConformation,n=r.x,i=r.y,a=r.z,o=e.model.atomicHierarchy.derived.residue.traceElementIndex,s=new Uint32Array(t.length),u=0,c=t.length;u<c;++u)s[u]=o[t[u]];var l={x:n,y:i,z:a,indices:O.SortedArray.ofSortedArray(s)};return Object(S.c)(l,Object(x.a)(l));}(e,a),c=f(e,r,o),l=a.length,d=new Uint32Array(l),m=function(e,t){var r=t.cIndices,n=t.nIndices,i=t.residueIndices,a=e.conformation.position,o=e.model.atomicHierarchy.index,c=e.model.atomicHierarchy.derived.residue.traceElementIndex,l=i.length,d=function d(e,t){return-1===e?s.Vec3.setNaN(t):a(e,t);},f=Object(s.Vec3)(),p=Object(s.Vec3)(),m=Object(s.Vec3)(),h=Object(s.Vec3)(),g=Object(s.Vec3)(),v=Object(s.Vec3)(),b=Object(s.Vec3)(),y=Object(s.Vec3)(),_=Object(s.Vec3)();if(0===l)return{phi:new Float32Array(0),psi:new Float32Array(0)};var S=new Float32Array(l-1),O=new Float32Array(l-1);d(-1,f),d(-1,p),d(-1,m),d(r[0],h),d(c[i[0]],g),d(n[0],v),d(r[1],b),d(c[i[1]],y),d(n[1],_);for(var x=0;x<l-1;++x)-1===o.findAtomOnResidue(i[x],\"OXT\")&&(S[x]=Object(u.f)(s.Vec3.dihedralAngle(f,v,g,h)),O[x]=Object(u.f)(s.Vec3.dihedralAngle(v,g,h,_)),f=h,p=g,m=v,h=b,g=y,v=_,d(r[x+1],b),d(c[i[x+1]],y),d(n[x+1],_));return{phi:S,psi:O};}(e,r),h=[],y=[],C=t.oldDefinition?E:T,w=t.oldOrdering?A:D,function(e){for(var t=e.proteinInfo,r=e.hbonds,n=e.flags,i=[1024,2048,4096,128,256,512],a=0;a<3;a++)for(var o=0,s=t.residueIndices.length-1;o<s;++o)if(-1!==r.getDirectedEdgeIndex(o,o+a+3))if(n[o]|=i[a+3]|i[a],e.params.oldDefinition)for(var u=1;u<a+3;++u)n[o+u]|=64|i[a+3];else for(u=0;u<=a+3;++u)n[o+u]|=64|i[a+3];}(I={params:t,getResidueFlag:C,getFlagName:w,unit:e,proteinInfo:r,flags:d,hbonds:c,torsionAngles:m,ladders:h,bridges:y}),function(e){for(var t=e.proteinInfo,r=e.flags,n=t.residueIndices.length,i=[1024,2048,4096,128,256,512],a=[0,0,0,8,1,16],o=e.params.oldOrdering?[4,3,5]:[3,4,5],s=0;s<o.length;s++)for(var u=o[s],c=1,l=n-u;c<l;c++){var d=p.create(r[c]),f=p.create(r[c-1]),m=p.create(r[c+1]);if(e.params.oldOrdering){if(3===u&&(p.is(d,1)||p.is(m,1))||5===u&&(p.is(d,1)||p.is(d,8)||p.is(m,1)||p.is(m,8)))continue;}else if(4===u&&(p.is(d,8)||p.is(m,8))||5===u&&(p.is(d,1)||p.is(d,8)||p.is(m,1)||p.is(m,8)))continue;if(p.is(d,i[u])&&p.is(d,i[u-3])&&p.is(f,i[u])&&p.is(f,i[u-3]))if(e.params.oldDefinition)for(var h=0;h<u;h++)r[c+h]|=a[u];else for(h=-1;h<=u;h++)r[c+h]|=a[u];}}(I),function(e){var t=e.unit,r=e.flags,n=e.proteinInfo,i=t.conformation.position,a=t.model.atomicHierarchy.derived.residue.traceElementIndex,o=n.residueIndices,c=n.nIndices,l=o.length,d=function d(e,t){return-1===e?s.Vec3.setNaN(t):i(e,t);},f=Object(s.Vec3)(),p=Object(s.Vec3)(),m=Object(s.Vec3)(),h=Object(s.Vec3)(),g=Object(s.Vec3)(),v=Object(s.Vec3)(),b=Object(s.Vec3)();e:for(var y=2;y<l-2;y++){for(var _=0;_<4;_++){var S=y+_-2;if(d(a[S],h),d(c[S+1],g),s.Vec3.squaredDistance(h,g)>6.25)continue e;}var O=o[y-2],x=o[y],C=o[y+2],w=a[O],P=a[x],j=a[C];d(w,f),d(P,p),d(j,m),s.Vec3.sub(v,f,p),s.Vec3.sub(b,p,m);var E=Object(u.f)(s.Vec3.angle(v,b));E&&E>70&&(r[y]|=32);}}(I),function(e){for(var t,r,n=e.proteinInfo,i=e.hbonds,a=e.flags,o=e.bridges,s=i.offset,u=i.b,c=0,l=n.residueIndices.length;c<l;++c)for(var d=s[c],f=s[c+1];d<f;d++){var p=u[d];c>p||((t=c+1)!==(r=p)&&-1!==i.getDirectedEdgeIndex(r,t+1)&&(a[t]|=2,a[r]|=2,o[o.length]=new g(t,r,0)),(t=c)!==(r=p-1)&&-1!==i.getDirectedEdgeIndex(r-1,t)&&(a[t]|=2,a[r]|=2,o[o.length]=new g(r,t,0)),(t=c)!==(r=p)&&-1!==i.getDirectedEdgeIndex(r,t)&&(a[t]|=2,a[r]|=2,o[o.length]=new g(r,t,1)),(t=c+1)!==(r=p-1)&&-1!==i.getDirectedEdgeIndex(r-1,t+1)&&(a[t]|=2,a[r]|=2,o[o.length]=new g(r,t,1)));}o.sort(function(e,t){return e.partner1>t.partner1?1:e.partner1<t.partner1?-1:0;});}(I),function(e){for(var t=e.bridges,r=e.ladders,n=0;n<t.length;n++){for(var i=t[n],a=!1,o=0;o<r.length;o++){var s=r[o];v(s,i)&&(a=!0,s.firstEnd++,0===i.type?s.secondEnd++:s.secondStart--);}a||(r[r.length]={previousLadder:0,nextLadder:0,firstStart:i.partner1,firstEnd:i.partner1,secondStart:i.partner2,secondEnd:i.partner2,type:i.type});}for(var u=0;u<r.length;u++)for(var c=r[u],l=u;l<r.length;l++){var d=r[l];b(c,d)&&(c.nextLadder=l,d.previousLadder=u);}}(I),function(e){for(var t=e.ladders,r=e.flags,n=0;n<t.length;n++){for(var i=t[n],a=i.firstStart;a<=i.firstEnd;a++){var o=i.firstStart-a,s=i.secondStart-o;i.firstStart!==i.firstEnd?(r[a]|=4,r[s]|=4):(!_(r[a])&&p.is(r[a],4)&&(r[a]|=2),!_(r[s])&&p.is(r[s],4)&&(r[s]|=2));}if(0!==i.nextLadder){var u=t[i.nextLadder];for(a=i.firstStart;a<=u.firstEnd;a++)r[a]|=4;if(0===i.type)for(a=i.secondStart;a<=u.secondEnd;a++)r[a]|=4;else for(a=u.secondEnd;a<=i.secondStart;a++)r[a]|=4;}}}(I),M=function(e,t){for(var r=new Uint32Array(e.length),n=0,i=e.length;n<i;++n){var a=p.create(e[n]);r[n]=t(a);}return r;}(d,C),k=new Uint32Array(l),B=[],V=[],R=function R(e){return O.SortedArray.indexOf(a,e);},L=0,N=a.length;L<N;++L)F=M[L],k[L]=F,U=C(d[L]),0!==V.length&&U===V[V.length-1].flags||(V[V.length]=P(j(F),d[L],C)),B[L]=V.length-1;return[2,Object(i.a)(k,B,V,R)];});});}function P(e,t,r){return\"helix\"===e?{kind:\"helix\",flags:r(t)}:\"sheet\"===e?{kind:\"sheet\",flags:r(t)}:\"turn\"===e||\"bend\"===e?{kind:\"turn\",flags:r(t)}:{kind:\"none\"};}function j(e){return e===a.SecondaryStructureType.SecondaryStructureDssp.H||e===a.SecondaryStructureType.SecondaryStructureDssp.G||e===a.SecondaryStructureType.SecondaryStructureDssp.I?\"helix\":e===a.SecondaryStructureType.SecondaryStructureDssp.B||e===a.SecondaryStructureType.SecondaryStructureDssp.E?\"sheet\":e===a.SecondaryStructureType.SecondaryStructureDssp.T?\"turn\":e===a.SecondaryStructureType.SecondaryStructureDssp.S?\"bend\":\"none\";}function E(e){return p.is(e,1)?a.SecondaryStructureType.SecondaryStructureDssp.H:p.is(e,4)?a.SecondaryStructureType.SecondaryStructureDssp.E:p.is(e,2)?a.SecondaryStructureType.SecondaryStructureDssp.B:p.is(e,8)?a.SecondaryStructureType.SecondaryStructureDssp.G:p.is(e,16)?a.SecondaryStructureType.SecondaryStructureDssp.I:p.is(e,64)?a.SecondaryStructureType.SecondaryStructureDssp.T:p.is(e,32)?a.SecondaryStructureType.SecondaryStructureDssp.S:0;}function A(e){return p.is(e,1)?\"H\":p.is(e,4)?\"E\":p.is(e,2)?\"B\":p.is(e,8)?\"G\":p.is(e,16)?\"I\":p.is(e,64)?\"T\":p.is(e,32)?\"S\":\"-\";}function T(e){return p.is(e,16)?a.SecondaryStructureType.SecondaryStructureDssp.I:p.is(e,1)?a.SecondaryStructureType.SecondaryStructureDssp.H:p.is(e,4)?a.SecondaryStructureType.SecondaryStructureDssp.E:p.is(e,2)?a.SecondaryStructureType.SecondaryStructureDssp.B:p.is(e,8)?a.SecondaryStructureType.SecondaryStructureDssp.G:p.is(e,64)?a.SecondaryStructureType.SecondaryStructureDssp.T:p.is(e,32)?a.SecondaryStructureType.SecondaryStructureDssp.S:0;}function D(e){return p.is(e,16)?\"I\":p.is(e,1)?\"H\":p.is(e,4)?\"E\":p.is(e,2)?\"B\":p.is(e,8)?\"G\":p.is(e,64)?\"T\":p.is(e,32)?\"S\":\"-\";}var I=r(27),M=r(204),k=r(279),B=r(66),V=r(243);function R(e){var t=\"model\";if(e){t=\"dssp\";for(var r=0,n=e.models.length;r<n;++r){var i=e.models[r];if(V.Model.isFromPdbArchive(i)||V.Model.hasSecondaryStructure(i)){t=\"model\";break;}}}return{type:o.ParamDefinition.MappedStatic(t,{model:o.ParamDefinition.EmptyGroup({label:\"Model\"}),dssp:o.ParamDefinition.Group(C,{label:\"DSSP\",isFlat:!0})},{options:[[\"model\",\"Model\"],[\"dssp\",\"DSSP\"]]})};}var L=R(),N=M.a.createProvider({label:\"Secondary Structure\",descriptor:Object(B.CustomPropertyDescriptor)({name:\"molstar_computed_secondary_structure\"}),type:\"root\",defaultParams:L,getParams:R,isApplicable:function isApplicable(e){return!0;},obtain:function obtain(e,t,r){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var e,i,a;return Object(n.__generator)(this,function(s){switch(s.label){case 0:switch(e=Object(n.__assign)(Object(n.__assign)({},o.ParamDefinition.getDefaultValues(L)),r),e.type.name){case\"dssp\":return[3,1];case\"model\":return[3,3];}return[3,5];case 1:return i={},[4,F(t,e.type.params)];case 2:return[2,(i.value=s.sent(),i)];case 3:return a={},[4,U(t)];case 4:return[2,(a.value=s.sent(),a)];case 5:return[2];}});});}});function F(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=new Map(),i=0,a=e.unitSymmetryGroups.length,n.label=1;case 1:return i<a?(o=e.unitSymmetryGroups[i].units[0],I.g.isAtomic(o)?[4,w(o,t)]:[3,3]):[3,4];case 2:s=n.sent(),r.set(o.invariantId,s),n.label=3;case 3:return++i,[3,1];case 4:return[2,r];}});});}function U(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,o;return Object(n.__generator)(this,function(n){for(t=new Map(),r=0,i=e.unitSymmetryGroups.length;r<i;++r)a=e.unitSymmetryGroups[r].units[0],I.g.isAtomic(a)&&(o=k.a.Provider.get(a.model))&&t.set(a.invariantId,o);return[2,t];});});}},function(e,t,r){\"use strict\";r.d(t,\"e\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return u;}),r.d(t,\"c\",function(){return m;}),r.d(t,\"d\",function(){return h;});var n=r(46),i=r(1),a=r(29);function o(e){switch(e){case 0:return\"Spherical\";case 1:return\"Terminal\";case 2:return\"Linear\";case 3:return\"Trigonal\";case 4:return\"Tetrahedral\";case 5:return\"Trigonal Bi-Pyramidal\";case 6:return\"Octahedral\";case 7:return\"Square Planar\";case 8:return\"Unknown\";}}function s(e){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 8;}}var u=new Map([[2,Object(n.c)(180)],[3,Object(n.c)(120)],[4,Object(n.c)(109.4721)],[6,Object(n.c)(90)]]),c=Object(i.Vec3)(),l=Object(i.Vec3)(),d=Object(i.Vec3)(),f=Object(i.Vec3)(),p=Object(i.Vec3)();function m(e,t,r,n,o){var s=[];return t.conformation.position(t.elements[r],d),n.conformation.position(n.elements[o],f),i.Vec3.sub(c,f,d),Object(a.g)(e,t,r,function(e,t){\"H\"!==Object(a.i)(e,t)&&(e.conformation.position(e.elements[t],p),i.Vec3.sub(l,p,d),s.push(i.Vec3.angle(c,l)));}),s;}function h(e,t,r,n,o){t.conformation.position(t.elements[r],d),n.conformation.position(n.elements[o],f),i.Vec3.sub(c,f,d);var s,u,m=[Object(i.Vec3)(),Object(i.Vec3)()],h=0;if(Object(a.g)(e,t,r,function(e,t){h>1||\"H\"!==Object(a.i)(e,t)&&(s=e,u=t,e.conformation.position(e.elements[t],p),i.Vec3.sub(m[h++],p,d));}),1===h&&s&&u&&Object(a.g)(e,s,u,function(e,n){h>1||e===t&&n===r||\"H\"!==Object(a.i)(e,n)&&(e.conformation.position(e.elements[n],p),i.Vec3.sub(m[h++],p,d));}),2===h)return i.Vec3.cross(l,m[0],m[1]),Math.abs(Math.PI/2-i.Vec3.angle(l,c));}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return oe;});var n=r(0),i=r(7),a=r(194),o=r(352),s=r(66),u=r(6),c=r(119),l=r(303),d=r(9);function f(e,t){return t?1===t.length?Object(d.f)(t.charCodeAt(0),e):2===t.length?Object(d.f)(t.charCodeAt(0),Object(d.f)(t.charCodeAt(1),e)):e+\" \"+t:e;}function p(e,t,r,n){if(e.has(t)){(i=e.get(t)).has(r)||i.set(r,n);}else{var i=new Map();e.set(t,i),i.set(r,n);}}function m(e){throw new Error(\"Missing entity entry for entity id '\"+e+\"'.\");}var h=l.b.EmptyResidueKey(),g=function(){function e(e){this.map=e,this.entityIndex=e.entities.getEntityIndex,this.residueOffsets=this.map.segments.residueAtomSegments.offsets;}return e.prototype.getEntityFromChain=function(e){return this.map.chain_index_entity_index[e];},e.prototype.findEntity=function(e){var t=this.map.label_asym_id.get(e);return void 0!==t?t:-1;},e.prototype.findChainLabel=function(e){var t=this.entityIndex(e.label_entity_id);if(t<0||!this.map.entity_index_label_asym_id.has(t))return-1;var r=this.map.entity_index_label_asym_id.get(t);return r&&r.has(e.label_asym_id)?r.get(e.label_asym_id):-1;},e.prototype.findChainAuth=function(e){if(!this.map.auth_asym_id_auth_seq_id.has(e.auth_asym_id))return-1;var t=this.map.auth_asym_id_auth_seq_id.get(e.auth_asym_id);return t.has(e.auth_seq_id)?t.get(e.auth_seq_id):-1;},e.prototype.findResidue=function(e,t,r,n){var i;1===arguments.length?i=e:(h.label_entity_id=e,h.label_asym_id=t,h.auth_seq_id=r,h.pdbx_PDB_ins_code=n,i=h);var a=this.findChainLabel(i);if(a<0)return-1;var o=this.map.chain_index_auth_seq_id.get(a),s=f(i.auth_seq_id,i.pdbx_PDB_ins_code||\"\");return o.has(s)?o.get(s):-1;},e.prototype.findResidueAuth=function(e){var t=this.findChainAuth(e);if(t<0)return-1;var r=this.map.chain_index_auth_seq_id.get(t),n=f(e.auth_seq_id,e.pdbx_PDB_ins_code||\"\");return r.has(n)?r.get(n):-1;},e.prototype.findResidueInsertion=function(e){var t=this.findChainLabel(e);if(t<0)return-1;var r=this.map.chain_index_label_seq_id.get(t),n=f(e.label_seq_id,e.pdbx_PDB_ins_code||\"\");if(r.has(n))return r.get(n);var i=u.SortedArray.findPredecessorIndex(this.map.label_seq_id,e.label_seq_id),a=l.a.chainStartResidueIndex(this.map.segments,t);if(i<a)return a;var o=l.a.chainEndResidueIndexExcl(this.map.segments,t)-1;return i>=o?o:i;},e.prototype.findAtom=function(e){var t=this.findResidue(e);return t<0?-1:void 0===e.label_alt_id?v(this.residueOffsets[t],this.residueOffsets[t+1],this.map.label_atom_id,e.label_atom_id):b(this.residueOffsets[t],this.residueOffsets[t+1],this.map.label_atom_id,this.map.label_alt_id,e.label_atom_id,e.label_alt_id);},e.prototype.findAtomAuth=function(e){var t=this.findResidueAuth(e);return t<0?-1:void 0===e.label_alt_id?v(this.residueOffsets[t],this.residueOffsets[t+1],this.map.auth_atom_id,e.auth_atom_id):b(this.residueOffsets[t],this.residueOffsets[t+1],this.map.auth_atom_id,this.map.label_alt_id,e.auth_atom_id,e.label_alt_id);},e.prototype.findAtomOnResidue=function(e,t,r){return void 0===r?v(this.residueOffsets[e],this.residueOffsets[e+1],this.map.label_atom_id,t):b(this.residueOffsets[e],this.residueOffsets[e+1],this.map.label_atom_id,this.map.label_alt_id,t,r);},e.prototype.findAtomsOnResidue=function(e,t){return function(e,t,r,n){for(var i=e;i<t;i++)if(n.has(r.value(i)))return i;return-1;}(this.residueOffsets[e],this.residueOffsets[e+1],this.map.label_atom_id,t);},e;}();function v(e,t,r,n){for(var i=e;i<t;i++)if(r.value(i)===n)return i;return-1;}function b(e,t,r,n,i,a){for(var o=e;o<t;o++)if(r.value(o)===i&&n.value(o)===a)return o;return-1;}function y(e,t,r){for(var n=function(e,t,r){return{entities:e,segments:r,label_seq_id:u.SortedArray.ofSortedArray(t.residues.label_seq_id.toArray({array:Int32Array})),label_atom_id:t.atoms.label_atom_id,auth_atom_id:t.atoms.auth_atom_id,label_alt_id:t.atoms.label_alt_id,chain_index_entity_index:new Int32Array(t.chains._rowCount),entity_index_label_asym_id:new Map(),chain_index_label_seq_id:new Map(),auth_asym_id_auth_seq_id:new Map(),chain_index_auth_seq_id:new Map(),label_asym_id:new Map()};}(t,e,r),i=e.residues,a=i.label_seq_id,o=i.auth_seq_id,s=i.pdbx_PDB_ins_code,c=e.chains,l=c.label_entity_id,d=c.label_asym_id,h=c.auth_asym_id,v=u.Interval.ofBounds(0,e.atoms._rowCount),b=u.Segmentation.transientSegments(r.chainAtomSegments,v);b.hasNext;){var y=b.move(),_=y.index,S=t.getEntityIndex(l.value(_));S<0&&m(l.value(_)),n.chain_index_entity_index[_]=S;var O=h.value(_),x=n.auth_asym_id_auth_seq_id.get(O);x||(x=new Map(),n.auth_asym_id_auth_seq_id.set(O,x));var C=d.value(_);n.label_asym_id.has(C)||n.label_asym_id.set(C,S),p(n.entity_index_label_asym_id,S,C,_);var w=new Map(),P=new Map();n.chain_index_label_seq_id.set(_,w),n.chain_index_auth_seq_id.set(_,P);for(var j=u.Segmentation.transientSegments(r.residueAtomSegments,v,y);j.hasNext;){var E=j.move().index,A=o.value(E),T=s.value(E);w.set(f(a.value(E),T),E),P.set(f(A,T),E),x.set(A,_);}}return new g(n);}var _=r(22),S=r(146),O=r(61);var x=r(11),C=r(72),w=r(325),P=r(148),j=r(1);function E(e,t,r){e[t].isDefined||(e[t]=e[r]),e[r].isDefined||(e[r]=e[t]);}function A(e,t,r,a,o,s){var l,d,f=function(e){if(0===e._rowCount)return{residues:[],chains:[]};for(var t=e._rowCount,r=[0],n=[0],i=e.label_entity_id,a=e.label_asym_id,o=e.label_seq_id,s=e.auth_seq_id,u=e.pdbx_PDB_ins_code,c=1;c<t;c++){var l=!i.areValuesEqual(c-1,c)||!a.areValuesEqual(c-1,c);(l||!o.areValuesEqual(c-1,c)||!s.areValuesEqual(c-1,c)||!u.areValuesEqual(c-1,c))&&(r[r.length]=c),l&&(n[n.length]=c);}return{residues:r,chains:n};}(e),p=function(e,t,r){var n=i.d.ofColumns(c.AtomsSchema,{type_symbol:i.a.ofArray({array:i.a.mapToArray(e.type_symbol,_.ElementSymbol),schema:i.a.Schema.Aliased(i.a.Schema.str)}),label_atom_id:e.label_atom_id,auth_atom_id:e.auth_atom_id,label_alt_id:e.label_alt_id,label_comp_id:e.label_comp_id,auth_comp_id:e.auth_comp_id,pdbx_formal_charge:e.pdbx_formal_charge,sourceIndex:t}),a=i.d.view(e,c.ResiduesSchema,r.residues);i.d.columnToArray(a,\"label_seq_id\",Int32Array),i.d.columnToArray(a,\"auth_seq_id\",Int32Array);var o=i.d.view(e,c.ChainsSchema,r.chains);return E(n,\"label_atom_id\",\"auth_atom_id\"),E(n,\"label_comp_id\",\"auth_comp_id\"),E(a,\"label_seq_id\",\"auth_seq_id\"),E(o,\"label_asym_id\",\"auth_asym_id\"),{atoms:n,residues:a,chains:o};}(e,t,f),m=function(e,t){var r=new Map();if(!C.a.is(t))return r;var n=Object(P.a)(w.a,t.data.frame).molstar_atom_site_operator_mapping;if(0===n._rowCount)return r;for(var a=new Map(),o=new Map(),s=0;s<n._rowCount;s++){var u=0===n.assembly_operator_id.valueKind(s)?{id:n.assembly_id.value(s),operList:[],operId:n.assembly_operator_id.value(s)}:void 0,c=x.h.create(n.operator_name.value(s),j.Mat4.identity(),{assembly:u,spgrOp:0===n.symmetry_operator_index.valueKind(s)?n.symmetry_operator_index.value(s):void 0,hkl:j.Vec3.ofArray(n.symmetry_hkl.value(s)),ncsId:n.ncs_id.value(s)}),l=n.suffix.value(s),d=n.label_asym_id.value(s);a.set(\"\"+d+l,{name:d,operator:c});var f=n.auth_asym_id.value(s);o.set(\"\"+f+l,f);}var p=e.chains,m=p.label_asym_id,h=p.auth_asym_id,g=new Array(m.rowCount),v=new Array(m.rowCount);for(s=0;s<m.rowCount;s++){d=m.value(s),f=h.value(s);if(a.has(d)){var b=a.get(d),y=b.name;c=b.operator;r.set(s,c),g[s]=y,v[s]=o.get(f)||f;}else g[s]=d,v[s]=f;}return e.chains.label_asym_id=i.a.ofArray({array:g,valueKind:e.chains.label_asym_id.valueKind,schema:e.chains.label_asym_id.schema}),e.chains.auth_asym_id=i.a.ofArray({array:v,valueKind:e.chains.auth_asym_id.valueKind,schema:e.chains.auth_asym_id.schema}),r;}(p,o);if(s&&(l=s.atomicHierarchy,d=p,i.d.areEqual(l.chains,d.chains)&&i.d.areEqual(l.residues,d.residues)&&i.d.areEqual(l.atoms,d.atoms)))return{sameAsPrevious:!0,hierarchy:s.atomicHierarchy,chainOperatorMapping:m};var h={residueAtomSegments:u.Segmentation.ofOffsets(f.residues,u.Interval.ofBounds(0,e._rowCount)),chainAtomSegments:u.Segmentation.ofOffsets(f.chains,u.Interval.ofBounds(0,e._rowCount))},g=y(p,r,h),v=function(e,t,r,n){for(var i=e.atoms.label_comp_id,a=e.residues._rowCount,o=t.residueAtomSegments.offsets,s=new Int32Array(a),u=new Int32Array(a),c=new Int32Array(a),l=new Uint8Array(a),d=new Uint8Array(a),f=new Map(),p=new Map(),m=0;m<a;++m){var h=i.value(o[m]),g=n,v=void 0,b=void 0;if(f.has(h))v=f.get(h),b=p.get(h);else{var y=void 0;g.has(h)?y=g.get(h).type:(O.b||console.info(\"chemComp not found\",h),y=Object(_.getComponentType)(h)),v=Object(_.getMoleculeType)(y,h),b=Object(_.getPolymerType)(y,v),f.set(h,v),p.set(h,b);}l[m]=v,d[m]=b;var x=Object(S.a)(b,\"trace\"),C=r.findAtomsOnResidue(m,x);if(-1===C){var w=Object(S.a)(b,\"coarseBackbone\");C=r.findAtomsOnResidue(m,w);}s[m]=C;var P=Object(S.a)(b,\"directionFrom\");u[m]=r.findAtomsOnResidue(m,P);var j=Object(S.a)(b,\"directionTo\");c[m]=r.findAtomsOnResidue(m,j);}return{residue:{traceElementIndex:s,directionFromElementIndex:u,directionToElementIndex:c,moleculeType:l,polymerType:d}};}(p,h,g,a);return{sameAsPrevious:!1,hierarchy:Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},p),h),{index:g,derived:v}),chainOperatorMapping:m};}function T(e,t,r,n,i,o){var s=A(e,t,r,n,i,o),u=s.sameAsPrevious,c=s.hierarchy,l=s.chainOperatorMapping;return{sameAsPrevious:u,hierarchy:c,conformation:function(e){return{id:a.a.create22(),atomId:e.id,occupancy:e.occupancy,B_iso_or_equiv:e.B_iso_or_equiv,xyzDefined:e.Cartn_x.isDefined&&e.Cartn_y.isDefined&&e.Cartn_z.isDefined,x:e.Cartn_x.toArray({array:Float32Array}),y:e.Cartn_y.toArray({array:Float32Array}),z:e.Cartn_z.toArray({array:Float32Array})};}(e),chainOperatorMapping:l};}var D=r(411),I=r(79);function M(e,t,r){if(e.has(t))return e.get(t);var n=r.index++;return e.set(t,n),n;}function k(e,t){if(e.has(t))return e.get(t);var r=new Map();return e.set(t,r),r;}function B(e){throw new Error(\"Missing entity entry for entity id '\"+e+\"'.\");}function V(e,t){for(var r=e.entity_id,n=e.asym_id,i=e.seq_id_begin,a=e.seq_id_end,o=e.count,s=e.chainElementSegments,c=new Map(),l=new Map(),d={index:0},f=new Int32Array(o),p=new Int32Array(o),m=new Int32Array(s.count),h=0;h<o;h++)p[h]=t.getEntityIndex(r.value(h)),p[h]<0&&B(r.value(h));for(var g=0;g<s.count;g++){var v=s.offsets[g],b=s.offsets[g+1],y=p[v];m[g]=y;var _=M(k(l,y),n.value(v),d);for(h=v;h<b;h++)f[h]=_;var S=[],O=[];for(h=v;h<b;h++){var x=i.value(h),C=a.value(h);S.push(h),O.push(x,C);}var w={elementIndices:S,seqRanges:I.a.ofSortedRanges(O)};c.set(_,w);}var P=function(e,t,r){var n=e.getEntityIndex;return{findChainKey:function findChainKey(e,r){var i=n(e);if(i<0)return-1;var a=t.get(i);return a.has(r)?a.get(r):-1;},findSequenceKey:function findSequenceKey(e,i,a){var o=n(e);if(o<0)return-1;var s=t.get(o);if(void 0===s)return-1;var c=s.get(i);if(void 0===c)return-1;var l=r.get(c),d=l.elementIndices,f=l.seqRanges,p=I.a.firstIntersectionIndex(f,u.OrderedSet.ofSingleton(a));return-1!==p?d[p]:-1;}};}(t,l,c),j=P.findChainKey;return{chainKey:f,entityKey:p,findSequenceKey:P.findSequenceKey,findChainKey:j,getEntityFromChain:function getEntityFromChain(e){return m[e];}};}var R=r(5);function L(e,t){for(var r=[],n=[],i=u.Segmentation.transientSegments(e.chainElementSegments,u.Interval.ofBounds(0,e.count)),a=e.seq_id_begin,o=e.seq_id_end;i.hasNext;)for(var s=i.move(),c=s.start,l=s.end,d=-1,f=-1,p=c;p<l;++p){var m=o.value(p);p===c?(d=p,f=o.value(p)):f!==a.value(p)-1&&(r.push(d,p-1),n.push(p-1,p),d=p),p===l-1&&r.push(d,p),f=m;}return{polymerRanges:I.a.ofSortedRanges(r),gapRanges:I.a.ofSortedRanges(n)};}var N=r(93),F={hierarchy:D.CoarseHierarchy.Empty,conformation:void 0};function U(e,t){var r=e.ihm_sphere_obj_site,i=e.ihm_gaussian_obj_site;if(0===r._rowCount&&0===i._rowCount)return F;var a=z(r),o=function(e){return{x:e.Cartn_x.toArray({array:Float32Array}),y:e.Cartn_y.toArray({array:Float32Array}),z:e.Cartn_z.toArray({array:Float32Array}),radius:e.object_radius.toArray({array:Float32Array}),rmsf:e.rmsf.toArray({array:Float32Array})};}(r),s=V(a,e.entities),u=L(a,t.chemicalComponentMap),c=z(i),l=function(e){for(var t=N.a.ihm_gaussian_obj_site.covariance_matrix.space,r=[],n=e.covariance_matrix,i=0,a=n.rowCount;i<a;i++)r[i]=j.Tensor.toMat3(Object(j.Mat3)(),t,n.value(i));return{x:e.mean_Cartn_x.toArray({array:Float32Array}),y:e.mean_Cartn_y.toArray({array:Float32Array}),z:e.mean_Cartn_z.toArray({array:Float32Array}),weight:e.weight.toArray({array:Float32Array}),covariance_matrix:r};}(i),d=V(c,e.entities),f=L(c,t.chemicalComponentMap);return{hierarchy:{isDefined:!0,spheres:Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},a),s),u),gaussians:Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},c),d),f)},conformation:{id:R.c.create22(),spheres:o,gaussians:l}};}function z(e){var t=e.entity_id,r=e.seq_id_begin,i=e.seq_id_end,a=e.asym_id;return Object(n.__assign)({count:t.rowCount,entity_id:t,asym_id:a,seq_id_begin:r,seq_id_end:i},function(e,t,r){for(var n=[0],i=1,a=e.rowCount;i<a;i++){!e.areValuesEqual(i-1,i)&&(n[n.length]=i);}return{chainElementSegments:u.Segmentation.ofOffsets(n,u.Interval.ofBounds(0,e.rowCount))};}(a));}var H=r(343),G=r(335);function q(e,t,r,n){if(!e.entity_poly_seq||!e.entity_poly_seq._rowCount)return H.a.fromHierarchy(t,r,n);for(var a=e.entity_poly_seq,o=a.entity_id,s=a.num,u=a.mon_id,c={},l=[],d=o.rowCount,f=0;f<d;){for(var p=f;f<d-1&&o.areValuesEqual(f,f+1);)f++;f++;var m=o.value(p),h=i.a.window(u,p,f),g=i.a.window(s,p,f),v=t.getEntityIndex(m);c[v]={entityId:m,sequence:G.a.ofResidueNames(h,g)},l.push(c[v]);}return{byEntityKey:c,sequences:l};}var W=r(30);function Q(e,t,r,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var o,s,u,c,l,f,p,m,h,g,v;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return o=Object(d.g)(r,a-1),s=t.label_entity_id,u=t.label_asym_id,c=t.label_seq_id,l=Object(d.o)(o,s.value),e.shouldUpdate?[4,e.update()]:[3,2];case 1:n.sent(),n.label=2;case 2:f=0,p=l.length-1,n.label=3;case 3:if(!(f<p))return[3,10];m=Object(d.o)(o,u.value,{start:l[f],end:l[f+1]}),h=0,g=m.length-1,n.label=4;case 4:return h<g?(v=m[h],0!==c.valueKind(v)?[3,6]:(Object(d.o)(o,c.value,{sort:!0,start:v,end:m[h+1]}),e.shouldUpdate?[4,e.update()]:[3,6])):[3,7];case 5:n.sent(),n.label=6;case 6:return h++,[3,4];case 7:return e.shouldUpdate?[4,e.update()]:[3,9];case 8:n.sent(),n.label=9;case 9:return f++,[3,3];case 10:return Object(W.arrayIsIdentity)(o)&&o.length===t._rowCount?[2,{atom_site:t,sourceIndex:i.a.ofIntArray(o)}]:[2,{atom_site:i.d.view(t,t._schema,o),sourceIndex:i.a.ofIntArray(o)}];}});});}function Y(e,t,r,n,i){var a=i.residue,o=a.polymerType,s=a.traceElementIndex,u=a.directionFromElementIndex,c=a.directionToElementIndex,l=o[e],d=o[t];if(0===l||0===d)return!1;if(-1===s[e]||-1===s[t])return!1;var f=n.findAtomsOnResidue(e,Object(S.a)(l,\"backboneStart\")),p=n.findAtomsOnResidue(t,Object(S.a)(d,\"backboneEnd\"));-1!==f&&-1!==p||(f=n.findAtomsOnResidue(e,Object(S.a)(l,\"coarseBackbone\")),p=n.findAtomsOnResidue(t,Object(S.a)(d,\"coarseBackbone\")));var m=r.x,h=r.y,g=r.z,v=j.Vec3.create(m[f],h[f],g[f]),b=j.Vec3.create(m[p],h[p],g[p]),y=-1===u[e]||-1===c[e]||-1===u[t]||-1===c[t];return j.Vec3.distance(v,b)<(y?10:3);}function X(e,t,r,n){for(var i,a,o,s,c=[],l=[],d=new Map(),f=u.Segmentation.transientSegments(e.chainAtomSegments,u.Interval.ofBounds(0,e.atoms._rowCount)),p=u.Segmentation.transientSegments(e.residueAtomSegments,u.Interval.ofBounds(0,e.atoms._rowCount)),m=e.index,h=e.derived,g=e.residues.label_seq_id,v=e.chains.label_entity_id,b=h.residue,y=b.moleculeType,S=b.traceElementIndex;f.hasNext;){var O=f.move();p.setSegment(O),i=-1,a=-1,o=-1,s=-1;var x=t.getEntityIndex(v.value(O.index)),C=n.byEntityKey[x],w=C?C.sequence.seqId.value(C.sequence.seqId.rowCount-1):-1,P=e.residueAtomSegments.index[O.start],j=e.residueAtomSegments.index[O.end-1],E=g.value(P),A=g.value(j);for(1===E&&A===w&&r.xyzDefined&&Y(P,j,r,m,h)&&(d.set(P,j),d.set(j,P));p.hasNext;){var T=p.move(),D=T.index,M=g.value(D);if(Object(_.isPolymer)(y[D])&&-1!==S[D]){if(-1!==s){if(M!==i+1)c.push(s,o-1),l.push(a,T.end-1),s=T.start;else if(p.hasNext){var k=e.residueAtomSegments.index[T.start],B=e.residueAtomSegments.index[o-1];r.xyzDefined&&!Y(k,B,r,e.index,h)&&(c.push(s,o-1),l.push(a,T.end-1),s=T.start);}else c.push(s,T.end-1);}else s=T.start;}else-1!==s&&(c.push(s,o-1),s=-1);a=T.start,o=T.end,i=M;}}return{polymerRanges:I.a.ofSortedRanges(c),gapRanges:I.a.ofSortedRanges(l),cyclicPolymerMap:d};}var K=r(178),Z=r(155);function J(e){for(var t=new Map(),r=function r(e,t,_r3){return e+\"|\"+t+\"|\"+_r3;},n=e.pdbx_unobs_or_zero_occ_residues,i=0,a=n._rowCount;i<a;++i){var o=r(n.PDB_model_num.value(i),n.label_asym_id.value(i),n.label_seq_id.value(i));t.set(o,{polymer_flag:n.polymer_flag.value(i),occupancy_flag:n.occupancy_flag.value(i)});}return{has:function has(e,n,i){return t.has(r(e,n,i));},get:function get(e,n,i){return t.get(r(e,n,i));},size:t.size};}function $(e){var t=new Map();if(e.chem_comp._rowCount>0)for(var r=e.chem_comp.id,n=0,a=r.rowCount;n<a;++n)t.set(r.value(n),i.d.getRow(e.chem_comp,n));else te(e).forEach(function(e){t.set(e,Object(_.getDefaultChemicalComponent)(e));});return t;}function ee(e){var t=new Map();if(e.pdbx_chem_comp_identifier._rowCount>0)for(var r=e.pdbx_chem_comp_identifier,n=r.comp_id,i=r.type,a=r.identifier,o=0,s=n.rowCount;o<s;++o)if(\"SNFG CARBOHYDRATE SYMBOL\"===i.value(o)||\"SNFG CARB SYMBOL\"===i.value(o)){var u=a.value(o),c=K.d.get(u);c?t.set(n.value(o),c):console.warn(\"Unknown SNFG name '\"+u+\"'\");}if(e.chem_comp._rowCount>0){var l=e.chem_comp,d=l.id;for(i=l.type,o=0,s=d.rowCount;o<s;++o){var f=d.value(o);if(!t.has(f)){var p=i.value(o);K.c.has(f)?t.set(f,K.c.get(f)):9===Object(_.getMoleculeType)(p,f)&&t.set(f,K.e);}}}else{var m=te(e);K.c.forEach(function(e,r){!t.has(r)&&m.has(r)&&t.set(r,e);});}return t;}var te=Object(Z.a)(function(e){for(var t=new Set(),r=e.atom_site,n=r.label_comp_id,i=r.auth_comp_id,a=n.isDefined?n:i,o=0,s=a.rowCount;o<s;++o)t.add(a.value(o));return t;});function re(e){for(var t=new Map(),r=e.atom_site,n=r.label_asym_id,i=r.auth_asym_id,a=r.label_entity_id,o=0,s=n.rowCount;o<s;++o){var u=n.value(o);t.has(u)||t.set(u,{id:u,auth_id:i.value(o),entity_id:a.value(o)});}if(e.struct_asym._rowCount>0){var c=e.struct_asym,l=(u=c.id,c.entity_id);for(o=0,s=u.rowCount;o<s;++o){var d=u.value(o);t.has(d)||t.set(d,{id:d,auth_id:\"\",entity_id:l.value(o)});}}return t;}var ne=i.a.Schema.Aliased(i.a.Schema.Str(\"\"));function ie(e,t){var r,n;if(e.entity.id.isDefined)n=e.entity;else{for(var a=new Set(),o=[],s=[],u=e.atom_site,c=u.label_entity_id,l=u.label_comp_id,d=0,f=e.atom_site._rowCount;d<f;d++){var p=c.value(d);a.has(p)||(o.push(p),s.push(Object(_.getEntityType)(l.value(d))),a.add(p));}var m=e.ihm_sphere_obj_site.entity_id;for(d=0,f=e.ihm_sphere_obj_site._rowCount;d<f;d++){p=m.value(d);a.has(p)||(o.push(p),s.push(\"polymer\"),a.add(p));}var h=e.ihm_gaussian_obj_site.entity_id;for(d=0,f=e.ihm_gaussian_obj_site._rowCount;d<f;d++){p=h.value(d);a.has(p)||(o.push(p),s.push(\"polymer\"),a.add(p));}n=i.d.ofPartialColumns(N.a.entity,{id:i.a.ofArray({array:o,schema:N.a.entity.id}),type:i.a.ofArray({array:s,schema:N.a.entity.type})},o.length);}var g=i.a.createIndexer(n.id),v=new Array(n._rowCount);v.fill(\"other\");var b=new Set(),y=!1;if(e.entity_poly&&e.entity_poly.type.isDefined){var S=e.entity_poly,O=S.entity_id,x=S.type,C=S._rowCount;for(d=0;d<C;++d){v[g(p=O.value(d))]=x.value(d),b.add(p);}}else y=!0;if(e.pdbx_entity_branch&&e.pdbx_entity_branch.entity_id.isDefined){var w=e.pdbx_entity_branch;for(O=w.entity_id,x=w.type,C=w._rowCount,d=0;d<C;++d){v[g(p=O.value(d))]=x.value(d),b.add(p);}}else y=!0;if(y){var P=new Map();if(e.chem_comp){var j=e.chem_comp,E=j.id;for(x=j.type,d=0,f=e.chem_comp._rowCount;d<f;d++)P.set(E.value(d),x.value(d));}if(e.atom_site){var A=e.atom_site;for(c=A.label_entity_id,l=A.label_comp_id,d=0,f=e.atom_site._rowCount;d<f;d++){p=c.value(d);if(!b.has(p)){var T=l.value(d),D=P.get(T)||\"\";v[g(p)]=Object(_.getEntitySubtype)(T,D),b.add(p);}}}}var I=i.a.ofArray({array:v,schema:ne}),M=new Array(n._rowCount);if(M.fill(\"\"),e.pdbx_molecule&&e.pdbx_molecule.prd_id.isDefined){var k=e.pdbx_molecule,B=k.asym_id,V=k.prd_id;for(C=k._rowCount,d=0;d<C;++d){var R=B.value(d);void 0!==(p=null===(r=t.structAsymMap.get(R))||void 0===r?void 0:r.entity_id)&&(M[g(p)]=V.value(d));}}return{data:n,subtype:I,prd_id:i.a.ofArray({array:M,schema:i.a.Schema.str}),getEntityIndex:g};}function ae(e,t){var r=t.ihm_model_group,n=t.ihm_model_group_link,a=i.d.pickRow(n,function(t){return n.model_id.value(t)===e;});if(a){var o=i.d.pickRow(r,function(e){return r.id.value(e)===a.group_id;});if(o)return o.name;}return\"\";}function oe(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return i=function(e){return{missingResidues:J(e),chemicalComponentMap:$(e),saccharideComponentMap:ee(e),structAsymMap:re(e)};}(e),e.ihm_model_list._rowCount>0?[4,le(r,e,i,t)]:[3,2];case 1:return s=n.sent(),[3,4];case 2:return[4,ue(r,e,i,t)];case 3:s=n.sent(),n.label=4;case 4:for(a=s,u=0;u<a.length;u++)o.a.TrajectoryInfo.set(a[u],{index:u,size:a.length});return[2,a];}});});}function se(e,t){var r=e.rowCount;if(!e.isDefined)return r;for(var n=t+1;n<r&&e.areValuesEqual(t,n);)n++;return n;}function ue(e,t,r,i){return Object(n.__awaiter)(this,void 0,void 0,function(){var o,u,c,l,d,f,p,m,h;return Object(n.__generator)(this,function(g){switch(g.label){case 0:if(o=[],!t.atom_site)return[3,3];u=t.atom_site.id.rowCount,c=ie(t,r),l=0,g.label=1;case 1:return l<u?(d=se(t.atom_site.pdbx_PDB_model_num,l),[4,Q(e,t.atom_site,l,d)]):[3,3];case 2:return f=g.sent(),p=f.atom_site,m=f.sourceIndex,h=function(e,t,r,i,o,u,c){var l=T(t,r,i,o.chemicalComponentMap,u,c),d=t.pdbx_PDB_model_num.value(0);if(c&&l.sameAsPrevious)return Object(n.__assign)(Object(n.__assign)({},c),{id:a.a.create22(),modelNum:d,atomicConformation:l.conformation,_dynamicPropertyData:Object.create(null)});var f=F,p=q(e,i,l.hierarchy,f.hierarchy),m=X(l.hierarchy,i,l.conformation,p),h=0===e.entry.id.valueKind(0)?e.entry.id.value(0):u.name,g=[];return h&&g.push(h),0===e.struct.title.valueKind(0)&&g.push(e.struct.title.value(0)),{id:a.a.create22(),entryId:h,label:g.join(\" | \"),entry:h,sourceData:u,modelNum:d,entities:i,sequence:p,atomicHierarchy:l.hierarchy,atomicConformation:l.conformation,atomicRanges:m,atomicChainOperatorMappinng:l.chainOperatorMapping,coarseHierarchy:f.hierarchy,coarseConformation:f.conformation,properties:o,customProperties:new s.CustomProperties(),_staticPropertyData:Object.create(null),_dynamicPropertyData:Object.create(null)};}(t,p,m,c,r,i,o.length>0?o[o.length-1]:void 0),o.push(h),l=d,[3,1];case 3:return[2,o];}});});}function ce(e,t){for(var r=new Map(),n=e._rowCount,a=0;a<n;){var o=se(t,a),s=t.value(a);r.set(s,{table:i.d.window(e,e._schema,a,o),start:a,end:o}),a=o;}return r;}function le(e,t,r,o){return Object(n.__awaiter)(this,void 0,void 0,function(){var u,c,l,d,f,p,m,h,g,v,b,y,_,S,O,x,C,w,P;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(u=ie(t,r),c=t.atom_site.ihm_model_id.isDefined?t.atom_site.ihm_model_id:t.atom_site.pdbx_PDB_model_num,l=ce(t.atom_site,c),d=ce(t.ihm_sphere_obj_site,t.ihm_sphere_obj_site.model_id),f=ce(t.ihm_gaussian_obj_site,t.ihm_gaussian_obj_site.model_id),p=[],!t.ihm_model_list)return[3,6];m=t.ihm_model_list,h=m.model_id,g=m.model_name,v=0,n.label=1;case 1:return v<t.ihm_model_list._rowCount?(b=h.value(v),y=void 0,_=void 0,l.has(b)?(S=l.get(b),[4,Q(e,t.atom_site,S.start,S.end)]):[3,3]):[3,6];case 2:return O=n.sent(),x=O.atom_site,C=O.sourceIndex,y=x,_=C,[3,4];case 3:y=i.d.window(t.atom_site,t.atom_site._schema,0,0),_=i.a.ofIntArray([]),n.label=4;case 4:w={model_id:b,model_name:g.value(v),model_group_name:ae(b,t),entities:u,atom_site:y,atom_site_sourceIndex:_,ihm_sphere_obj_site:d.has(b)?d.get(b).table:i.d.window(t.ihm_sphere_obj_site,t.ihm_sphere_obj_site._schema,0,0),ihm_gaussian_obj_site:f.has(b)?f.get(b).table:i.d.window(t.ihm_gaussian_obj_site,t.ihm_gaussian_obj_site._schema,0,0)},P=function(e,t,r,n){var i=T(t.atom_site,t.atom_site_sourceIndex,t.entities,r.chemicalComponentMap,n),o=U(t,r),u=q(e,t.entities,i.hierarchy,o.hierarchy),c=X(i.hierarchy,t.entities,i.conformation,u),l=0===e.entry.id.valueKind(0)?e.entry.id.value(0):n.name,d=[];return l&&d.push(l),0===e.struct.title.valueKind(0)&&d.push(e.struct.title.value(0)),t.model_name&&d.push(t.model_name),t.model_group_name&&d.push(t.model_group_name),{id:a.a.create22(),entryId:l,label:d.join(\" | \"),entry:l,sourceData:n,modelNum:t.model_id,entities:t.entities,sequence:u,atomicHierarchy:i.hierarchy,atomicConformation:i.conformation,atomicRanges:c,atomicChainOperatorMappinng:i.chainOperatorMapping,coarseHierarchy:o.hierarchy,coarseConformation:o.conformation,properties:r,customProperties:new s.CustomProperties(),_staticPropertyData:Object.create(null),_dynamicPropertyData:Object.create(null)};}(t,w,r,o),p.push(P),n.label=5;case 5:return v++,[3,1];case 6:return[2,p];}});});}},function(e,t,r){\"use strict\";function n(e){var t=void 0,r=void 0;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!t||t.length!==n.length)return t=n,r=e.apply(void 0,n);for(var a=0,o=n.length;a<o;a++)if(n[a]!==t[a])return t=n,r=e.apply(void 0,n);return r;};}function i(e){var t=new Map();return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n;};}r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});},function(e,t,r){\"use strict\";r.d(t,\"e\",function(){return a;}),r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"c\",function(){return c;}),r.d(t,\"d\",function(){return l;});var n=r(27),i=r(6);function a(e,t){if(0===t.length)return n.c.Empty;if(1===t.length)return t[0];for(var r=new Map(),a=new Set(),s=0,u=t;s<u.length;s++)for(var c=u[s].units,l=0,d=c.length;l<d;l++){var f=c[l];if(r.has(f.id)){if(a.has(f.id))continue;var p=i.SortedArray.union(r.get(f.id),f.elements);r.set(f.id,p),p.length===e.unitMap.get(f.id).elements.length&&a.add(f.id);}else r.set(f.id,f.elements),f.elements.length===e.unitMap.get(f.id).elements.length&&a.add(f.id);}var m=e.subsetBuilder(!0);return r.forEach(o,m),m.getStructure();}function o(e,t){this.setUnit(t,e);}function s(e,t){if(e===t)return!0;if(e.units.length!==t.units.length)return!1;for(var r=e.units,n=t.unitMap,a=0,o=r.length;a<o;a++){var s=r[a];if(!n.has(s.id))return!1;var u=n.get(s.id);if(!i.SortedArray.areEqual(s.elements,u.elements))return!1;}return!0;}function u(e,t){if(e===t)return!0;var r,n;e.units.length<t.units.length?(r=e,n=t):(r=t,n=e);for(var a=r.units,o=n.unitMap,s=0,u=a.length;s<u;s++){var c=a[s];if(o.has(c.id)){var l=o.get(c.id);if(i.SortedArray.areIntersecting(c.elements,l.elements))return!0;}}return!1;}function c(e,t){if(e===t)return e;if(!u(e,t))return n.c.Empty;var r,a;e.units.length<t.units.length?(r=e,a=t):(r=t,a=e);for(var o=r.units,s=a.unitMap,c=[],l=0,d=o.length;l<d;l++){var f=o[l];if(s.has(f.id)){var p=s.get(f.id);if(i.SortedArray.areIntersecting(f.elements,p.elements)){var m=i.SortedArray.intersect(f.elements,p.elements);c[c.length]=f.getChild(m);}}}return n.c.create(c,{parent:e.parent||t.parent});}function l(e,t){if(e===t)return n.c.Empty;if(!u(e,t))return e;for(var r=e.units,a=t.unitMap,o=[],s=0,c=r.length;s<c;s++){var l=r[s];if(a.has(l.id)){var d=a.get(l.id),f=i.SortedArray.subtract(l.elements,d.elements);f.length>0&&(o[o.length]=l.getChild(f));}else o[o.length]=l;}return n.c.create(o,{parent:e.parent||t.parent});}},function(e,t,r){\"use strict\";function n(e,t,r){for(var n=0,i=r.length;n<i;n++){var a=r.charCodeAt(n);if(a<128)e[t++]=a>>>0&127|0;else if(a<2048)e[t++]=a>>>6&31|192,e[t++]=a>>>0&63|128;else if(a<65536)e[t++]=a>>>12&15|224,e[t++]=a>>>6&63|128,e[t++]=a>>>0&63|128;else{if(!(a<1114112))throw new Error(\"bad codepoint \"+a);e[t++]=a>>>18&7|240,e[t++]=a>>>12&63|128,e[t++]=a>>>6&63|128,e[t++]=a>>>0&63|128;}}}r.d(t,\"c\",function(){return n;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return u;});var i=function(){for(var e=[],t=0;t<1024;t++)e[t]=String.fromCharCode(t);return e;}();function a(e){throw new Error(e);}var o=\"undefined\"!=typeof TextDecoder?new TextDecoder():void 0;function s(e,t,r){if(o){var n=t||r!==e.length?e.subarray(t,t+r):e;return o.decode(n);}return function(e,t,r){for(var n=i,o=void 0,s=[],u=0,c=t,l=t+r;c<l;c++){var d=e[c];0==(128&d)?s[u++]=n[d]:192==(224&d)?s[u++]=n[(15&d)<<6|63&e[++c]]:224==(240&d)?s[u++]=String.fromCharCode((15&d)<<12|(63&e[++c])<<6|(63&e[++c])<<0):240==(248&d)?s[u++]=String.fromCharCode((7&d)<<18|(63&e[++c])<<12|(63&e[++c])<<6|(63&e[++c])<<0):a(\"Invalid byte \"+d.toString(16)),512===u&&((o=o||[])[o.length]=s.join(\"\"),u=0);}return o?(u>0&&(o[o.length]=s.slice(0,u).join(\"\")),o.join(\"\")):s.slice(0,u).join(\"\");}(e,t,r);}function u(e){for(var t=0,r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);i<128?t+=1:i<2048?t+=2:i<65536?t+=3:i<1114112?t+=4:a(\"bad codepoint \"+i);}return t;}},function(e,t,r){\"use strict\";r.r(t),function(e){r.d(t,\"Canvas3DParams\",function(){return I;}),r.d(t,\"DefaultCanvas3DParams\",function(){return M;}),r.d(t,\"Canvas3D\",function(){return n;});var n,i=r(0),a=r(278),o=r(83),s=r(1),u=r(84),c=r(393),l=r(394),d=r(176),f=r(333),p=r(40),m=r(262),h=r(23),g=r(232),v=r(2),b=r(395),y=r(90),_=r(412),S=r(317),O=r(318),x=r(147),C=r(331),w=r(413),P=r(414),j=r(11),E=r(61),A=r(283),T=r(151),D=r(396),I={camera:v.ParamDefinition.Group({mode:v.ParamDefinition.Select(\"perspective\",[[\"perspective\",\"Perspective\"],[\"orthographic\",\"Orthographic\"]],{label:\"Camera\"}),helper:v.ParamDefinition.Group(A.b,{isFlat:!0})},{pivot:\"mode\"}),cameraFog:v.ParamDefinition.MappedStatic(\"on\",{on:v.ParamDefinition.Group({intensity:v.ParamDefinition.Numeric(50,{min:1,max:100,step:1})}),off:v.ParamDefinition.Group({})},{cycle:!0,description:\"Show fog in the distance\"}),cameraClipping:v.ParamDefinition.Group({radius:v.ParamDefinition.Numeric(100,{min:0,max:99,step:1},{label:\"Clipping\",description:\"How much of the scene to show.\"}),far:v.ParamDefinition.Boolean(!0,{description:\"Hide scene in the distance\"})},{pivot:\"radius\"}),cameraResetDurationMs:v.ParamDefinition.Numeric(250,{min:0,max:1e3,step:1},{description:\"The time it takes to reset the camera.\"}),transparentBackground:v.ParamDefinition.Boolean(!1),multiSample:v.ParamDefinition.Group(O.a),postprocessing:v.ParamDefinition.Group(S.a),renderer:v.ParamDefinition.Group(c.a),trackball:v.ParamDefinition.Group(l.b),debug:v.ParamDefinition.Group(b.b),handle:v.ParamDefinition.Group(D.b)},M=v.ParamDefinition.getDefaultValues(I),k=\"undefined\"!=typeof window?window.requestAnimationFrame:function(t){return e(function(){return t(Date.now());});};!function(e){e.fromCanvas=function(t,r){void 0===r&&(r={});var n=Object(f.c)(t,{alpha:!0,antialias:!0,depth:!0,preserveDrawingBuffer:!0,premultipliedAlpha:!1});if(null===n)throw new Error(\"Could not create a WebGL rendering context\");var i=u.c.fromElement(t),a=Object(f.b)(n);if(E.a){var o=n.getExtension(\"WEBGL_lose_context\");o&&t.addEventListener(\"mousedown\",function(e){a.isContextLost||e.shiftKey&&e.ctrlKey&&e.altKey&&(E.a&&console.log(\"lose context\"),o.loseContext(),setTimeout(function(){a.isContextLost&&(E.a&&console.log(\"restore context\"),o.restoreContext());},1e3));},!1);}return t.addEventListener(\"webglcontextlost\",function(e){a.setContextLost(),e.preventDefault(),E.a&&console.log(\"context lost\");},!1),t.addEventListener(\"webglcontextrestored\",function(){a.isContextLost&&(a.handleContextRestored(),E.a&&console.log(\"context restored\"));},!1),e.create(a,i,r);},e.create=function(e,t,r){void 0===r&&(r={});var n=Object(i.__assign)(Object(i.__assign)({},M),r),u=new Map(),f=new Map(),v=new a.a(0),A=Object(o.b)(),I=new a.a(0),B=e.gl,V=e.contextRestored,R=B.drawingBufferWidth,L=B.drawingBufferHeight,N=m.a.create(e),F=new g.a({position:s.Vec3.create(0,0,100),mode:n.camera.mode,fog:\"on\"===n.cameraFog.name?n.cameraFog.params.intensity:0,clipFar:n.cameraClipping.far}),U=l.a.create(t,F,n.trackball),z=c.b.create(e,n.renderer),H=new b.a(e,N,n.debug),G=new D.a(e,n.handle),q=new _.a(oe,ee,t),W=new C.a(e,z,N,F,H,G,{cameraHelper:n.camera.helper}),Q=new w.a(e,z,N,F,G,.5),Y=new S.b(e,F,W,n.postprocessing),X=new O.b(e,F,W,Y,n.multiSample),K=!1,Z=!1,J=void 0,$=void 0;function ee(e){var t=h.EmptyLoci,r=p.a.Empty;return t=G.getLoci(e),u.forEach(function(n,i){var a=i.getLoci(e);Object(h.isEmptyLoci)(a)||(Object(h.isEmptyLoci)(t)||console.warn(\"found another loci, this should not happen\"),t=a,r=i);}),{loci:t,repr:r};}var te=!1,re=!1,ne=0;function ie(t){(function(t){if(e.isContextLost)return!1;var r=!1;U.update(ne),d.a.set(F.viewport,0,0,R,L);var i=F.update();return X.update(t||i,ne),(t||i||X.enabled)&&(z.setViewport(0,0,R,L),X.enabled?X.render(!0,n.transparentBackground):(W.render(!Y.enabled,n.transparentBackground),Y.enabled&&Y.render(!0)),Q.pickDirty=!0,r=!0),r;})(!!t||te)&&I.next(Object(o.b)()-A),te=!1,K=!1;}function ae(e){K||(K=!0,te=!!e);}function oe(t,r){return e.isContextLost?void 0:Q.identify(t,r);}function se(e){void 0===e&&(e=!1),function(e){if(!N.needsCommit)return!0;if(j.g.copy(ue,N.boundingSphereVisible),!N.commit(e?void 0:250))return!1;H.isEnabled&&H.update();(0===v.value||function(){if(0===F.state.radiusMax)return!0;if(F.transition.inTransition||$)return!1;var e=!0;j.g.set(ce,F.state.target,F.state.radius);for(var t=0,r=N.renderables;t<r.length;t++){var n=r[t];if(n.state.visible){var i=n.values.boundingSphere.ref.value;if(i.radius){if(!j.g.includes(ue,i))return!0;j.g.overlaps(ce,i)&&(e=!1);}}}return e;}())&&(Z=!0);0===ue.radius&&(J=0);F.setState({radiusMax:N.boundingSphere.radius},0),v.next(u.size),E.a&&le();return!0;}(e)&&(!function(){if(!Z)return;var e=N.boundingSphereVisible,t=e.center,r=e.radius;if(r>0){var a=void 0===J?n.cameraResetDurationMs:J,o=F.getFocus(t,r),s=$?Object(i.__assign)(Object(i.__assign)({},o),$):o;F.setState(s,a);}J=void 0,$=void 0,Z=!1;}(),re&&(H.isEnabled&&H.update(),ie(!0),re=!1));}var ue=Object(j.g)(),ce=Object(j.g)();function le(){console.table(N.renderables.map(function(e){return{drawCount:e.values.drawCount.ref.value,instanceCount:e.values.instanceCount.ref.value,materialId:e.materialId};}));}function de(e){!function(e){if(f.has(e))return;f.set(e,e.updated.subscribe(function(t){e.state.syncManually||de(e);}));}(e);var t=u.get(e),r=new Set();e.renderObjects.forEach(function(e){return r.add(e);}),t?y.a.areEqual(r,t)||(r.forEach(function(e){t.has(e)||N.add(e);}),t.forEach(function(e){r.has(e)||N.remove(e);})):e.renderObjects.forEach(function(e){return N.add(e);}),u.set(e,r),N.update(e.renderObjects,!1),re=!0,E.a&&le();}pe();var fe=V.subscribe(function(){Q.pickDirty=!0,ie(!0);});return{webgl:e,add:de,remove:function remove(e){!function(e){var t=f.get(e);t&&(t.unsubscribe(),f.delete(e));}(e);var t=u.get(e);t&&(t.forEach(function(e){return N.remove(e);}),u.delete(e),N.update(e.renderObjects,!1,!0),re=!0,E.a&&le());},commit:se,update:function update(e,t){if(e){if(!u.has(e))return;N.update(e.renderObjects,!!t);}else N.update(void 0,!!t);re=!0;},clear:function clear(){f.forEach(function(e){return e.unsubscribe();}),f.clear(),u.clear(),N.clear(),H.clear(),ae(!0),v.next(u.size);},syncVisibility:function syncVisibility(){0===F.state.radiusMax&&(Z=!0,J=0),N.syncVisibility()&&H.isEnabled&&H.update(),ae(!0);},requestDraw:ae,animate:function t(){ne=Object(o.b)(),se(),F.transition.tick(ne),ie(!1),F.transition.inTransition||e.isContextLost||q.tick(ne),k(t);},identify:oe,mark:function mark(e,t){var r=e.repr,n=e.loci,i=!1;if(r?i=r.mark(n,t):(i=G.mark(n,t),u.forEach(function(e,r){i=r.mark(n,t)||i;})),i){N.update(void 0,!0),G.scene.update(void 0,!0);var a=Q.pickDirty;ie(!0),Q.pickDirty=a;}},getLoci:ee,handleResize:pe,requestCameraReset:function requestCameraReset(e){J=null==e?void 0:e.durationMs,$=null==e?void 0:e.snapshot,Z=!0;},camera:F,boundingSphere:N.boundingSphere,getPixelData:function getPixelData(t){switch(t){case\"color\":return e.getDrawingBufferPixelData();case\"pickObject\":return Q.objectPickTarget.getPixelData();case\"pickInstance\":return Q.instancePickTarget.getPixelData();case\"pickGroup\":return Q.groupPickTarget.getPixelData();case\"depth\":return Object(x.c)(e,W.depthTexture);}},didDraw:I,reprCount:v,setProps:function setProps(e){var t,r=\"function\"==typeof e?Object(T.b)(function(){var e=N.boundingSphere.radius>0?100-Math.round(F.transition.target.radius/N.boundingSphere.radius*100):0;return{camera:{mode:F.state.mode,helper:Object(i.__assign)({},W.props.cameraHelper)},cameraFog:F.state.fog>0?{name:\"on\",params:{intensity:F.state.fog}}:{name:\"off\",params:{}},cameraClipping:{far:F.state.clipFar,radius:e},cameraResetDurationMs:n.cameraResetDurationMs,transparentBackground:n.transparentBackground,postprocessing:Object(i.__assign)({},Y.props),multiSample:Object(i.__assign)({},X.props),renderer:Object(i.__assign)({},z.props),trackball:Object(i.__assign)({},U.props),debug:Object(i.__assign)({},H.props),handle:Object(i.__assign)({},G.props)};}(),e):e,a=Object.create(null);if(r.camera&&void 0!==r.camera.mode&&r.camera.mode!==F.state.mode&&(a.mode=r.camera.mode),void 0!==r.cameraFog){var o=\"on\"===r.cameraFog.name?r.cameraFog.params.intensity:0;o!==F.state.fog&&(a.fog=o);}if(void 0!==r.cameraClipping&&(void 0!==r.cameraClipping.far&&r.cameraClipping.far!==F.state.clipFar&&(a.clipFar=r.cameraClipping.far),void 0!==r.cameraClipping.radius)){var s=N.boundingSphere.radius/100*(100-r.cameraClipping.radius);s>0&&s!==a.radius&&(a.radius=Math.max(s,.01));}Object.keys(a).length>0&&F.setState(a),(null===(t=r.camera)||void 0===t?void 0:t.helper)&&W.setProps({cameraHelper:r.camera.helper}),void 0!==r.cameraResetDurationMs&&(n.cameraResetDurationMs=r.cameraResetDurationMs),void 0!==r.transparentBackground&&(n.transparentBackground=r.transparentBackground),r.postprocessing&&Y.setProps(r.postprocessing),r.multiSample&&X.setProps(r.multiSample),r.renderer&&z.setProps(r.renderer),r.trackball&&U.setProps(r.trackball),r.debug&&H.setProps(r.debug),r.handle&&G.setProps(r.handle),ae(!0);},getImagePass:function getImagePass(t){return void 0===t&&(t={}),new P.a(e,z,N,F,H,G,t);},get props(){var e=N.boundingSphere.radius>0?100-Math.round(F.transition.target.radius/N.boundingSphere.radius*100):0;return{camera:{mode:F.state.mode,helper:Object(i.__assign)({},W.props.cameraHelper)},cameraFog:F.state.fog>0?{name:\"on\",params:{intensity:F.state.fog}}:{name:\"off\",params:{}},cameraClipping:{far:F.state.clipFar,radius:e},cameraResetDurationMs:n.cameraResetDurationMs,transparentBackground:n.transparentBackground,postprocessing:Object(i.__assign)({},Y.props),multiSample:Object(i.__assign)({},X.props),renderer:Object(i.__assign)({},z.props),trackball:Object(i.__assign)({},U.props),debug:Object(i.__assign)({},H.props),handle:Object(i.__assign)({},G.props)};},get input(){return t;},get stats(){return z.stats;},get interaction(){return q.events;},dispose:function dispose(){fe.unsubscribe(),N.clear(),H.clear(),t.dispose(),U.dispose(),z.dispose(),q.dispose();}};function pe(){R=B.drawingBufferWidth,L=B.drawingBufferHeight,z.setViewport(0,0,R,L),d.a.set(F.viewport,0,0,R,L),d.a.set(U.viewport,0,0,R,L),W.setSize(R,L),Q.setSize(R,L),Y.setSize(R,L),X.setSize(R,L),ae(!0);}};}(n||(n={}));}.call(this,r(384).setImmediate);},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return O;}),r.d(t,\"b\",function(){return D;}),r.d(t,\"a\",function(){return E;});var n,i=r(27),a=r(22),o=r(6),s=r(195),u=r(0),c=r(171),l=r(37),d=r(244);(n||(n={})).Empty=c.a.create([],[],[],0,{flags:[],order:[]});var f,p,m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(u.__extends)(t,e),t.prototype.getBondFromLocation=function(e){return l.a.isAtomic(e.aUnit)&&l.a.isAtomic(e.bUnit)?this.getEdge(e.aIndex,e.aUnit,e.bIndex,e.bUnit):void 0;},t.prototype.getBondIndexFromLocation=function(e){return l.a.isAtomic(e.aUnit)&&l.a.isAtomic(e.bUnit)?this.getEdgeIndex(e.aIndex,e.aUnit,e.bIndex,e.bUnit):-1;},t;}(d.a);f=m||(m={}),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(u.__extends)(t,e),t;}(d.a.UnitPairEdges),f.UnitPairBonds=p;var h=r(109),g=r(305),v=r(173),b=r(324),y=r(266);var _=new Set();function S(e,t){for(var r=e.model.atomicConformation,n=r.x,i=r.y,a=r.z,s=e.elements.length,u=e.elements,l=e.residueIndex,d=e.chainIndex,f=e.model.atomicHierarchy.atoms,p=f.type_symbol,m=f.label_atom_id,S=f.label_alt_id,O=f.label_comp_id,x=e.model.atomicHierarchy.residues.label_seq_id,C=e.model.atomicHierarchy.index,w=e.model.sequence.byEntityKey,P=e.lookup3d,j=y.a.Provider.get(e.model),E=b.a.Provider.get(e.model),A=v.a.Provider.get(e.model),T=[],D=[],I=[],M=[],k=-1,B=void 0,V=_,R=0;R<s;R++){var L=u[R];if(t.forceCompute||!A){var N=t.forceCompute?void 0:j&&j.byAtomIndex.get(L),F=!1;if(N)for(var U=0,z=N;U<z.length;U++){var H=z[U],G=H.partnerA,q=H.partnerB;if(G.symmetry===q.symmetry){var W=G.atomIndex===L?q:G;(_e=o.SortedArray.indexOf(e.elements,W.atomIndex))<0||(T[T.length]=R,D[D.length]=_e,I[I.length]=H.flags,M[M.length]=H.order,F||V.clear(),F=!0,V.add(_e));}}var Q=l[L],Y=O.value(L);if(!t.forceCompute&&Q!==k)if(E&&E.entries.has(Y)){var X=w[C.getEntityFromChain(d[L])];B=X&&X.sequence.microHet.has(x.value(Q))?void 0:E.entries.get(Y).map;}else B=void 0;k=Q;for(var K=Object(h.c)(p.value(L)),Z=m.value(L),J=B?B.get(Z):void 0,$=P.find(n[L],i[L],a[L],4),ee=$.indices,te=$.count,re=$.squaredDistances,ne=Object(h.f)(K),ie=Object(h.e)(K),ae=S.value(L),oe=h.b.has(K),se=0;se<te;se++){_e=ee[se];if(!F||!V.has(_e)){var ue=u[_e];if(!(ue<=L)){var ce=S.value(ue);if(!ae||!ce||ae===ce){var le=Object(h.c)(p.value(ue)),de=Object(h.f)(le);if(!ne||!de){var fe=(oe||h.b.has(le))&&!(ne||de);if(Q===l[ue]&&J){var pe=J.get(m.value(ue));if(pe){T[T.length]=R,D[D.length]=_e,M[M.length]=pe.order;var me=pe.flags;fe&&(1|me&&(me^=1),me|=2),I[I.length]=me;}}else{var he=Math.sqrt(re[se]);if(0!==he){var ge=Object(h.d)(K,le);he<=(ge>0?ge:le<0?ie:(ie+Object(h.e)(le))/2)&&(T[T.length]=R,D[D.length]=_e,M[M.length]=Object(g.b)(Y,Z,m.value(ue)),I[I.length]=32|(fe?2:1));}}}}}}}}else for(var ve=A.edgeProps,be=A.offset[L],ye=A.offset[L+1];be<ye;++be){var _e;(_e=o.SortedArray.indexOf(e.elements,A.b[be]))<0||ve.symmetryA[be]===ve.symmetryB[be]&&(\"H\"===p.value(L)&&\"H\"===p.value(A.b[be])||(T[T.length]=R,D[D.length]=_e,M[M.length]=ve.order[be],I[I.length]=1));}}return function(e,t,r,n,i){for(var a=new c.a.EdgeBuilder(i,e,t),o=new Uint16Array(a.slotCount),s=new Int8Array(a.slotCount),u=0,l=a.edgeCount;u<l;u++)a.addNextEdge(),a.assignProperty(o,n[u]),a.assignProperty(s,r[u]);return a.createGraph({flags:o,order:s});}(T,D,M,I,s);}function O(e,t){var r=Object(u.__assign)(Object(u.__assign)({},h.a),t);return r.noCompute?n.Empty:S(e,r);}var x=r(112),C=r(1),w=Object(C.Vec3)(),P=Object(C.Vec3)();function j(e,t,r,n){return e.conformation.position(t,w),r.conformation.position(n,P),C.Vec3.distance(w,P);}var E,A=C.Mat4.zero();function T(e,t){var r=new d.a.Builder();return t.noCompute||x.a.eachUnitPair(e,function(e,n){!function(e,t,r,n){var i=e.elements,a=e.residueIndex,s=e.model.atomicConformation,u=s.x,c=s.y,l=s.z,d=t.elements,f=t.residueIndex,p=e.elements.length,m=e.model.atomicHierarchy.atoms,b=m.type_symbol,_=m.label_alt_id,S=m.label_atom_id,O=m.label_comp_id,x=t.model.atomicHierarchy.atoms,w=x.type_symbol,P=x.label_alt_id,E=x.label_atom_id,T=x.label_comp_id,D=e.model.atomicHierarchy.residues.auth_seq_id,I=t.model.atomicHierarchy.residues.auth_seq_id,M=e.model.atomicConformation.occupancy,k=t.model.atomicConformation.occupancy,B=M.isDefined&&k.isDefined,V=t.lookup3d,R=e.model===t.model&&y.a.Provider.get(e.model),L=e.model===t.model&&v.a.Provider.get(e.model),N=C.Mat4.mul(A,t.conformation.operator.inverse,e.conformation.operator.matrix),F=!C.Mat4.isIdentity(N),U=C.Vec3.zero(),z=V.boundary.sphere,H=z.center,G=z.radius,q=(G+4)*(G+4);n.startUnitPair(e,t);for(var W=e.conformation.operator.name,Q=t.conformation.operator.name,Y=0;Y<p;Y++){var X=i[Y];if(C.Vec3.set(U,u[X],c[X],l[X]),F&&C.Vec3.transformMat4(U,U,N),!(C.Vec3.squaredDistance(U,H)>q))if(r.forceCompute||!L){var K=r.forceCompute?void 0:R&&R.byAtomIndex.get(X);if(K&&K.length){for(var Z=!1,J=0,$=K;J<$.length;J++){var ee=$[J],te=ee.partnerA,re=ee.partnerB,ne=te.atomIndex===X?re:te;(Ie=o.SortedArray.indexOf(t.elements,ne.atomIndex))<0||j(e,X,t,ne.atomIndex)>4||(n.add(Y,Ie,{order:ee.order,flag:ee.flags}),Z=!0);}if(Z)continue;}var ie=M.value(X),ae=V.find(U[0],U[1],U[2],4),oe=ae.indices,se=ae.count,ue=ae.squaredDistances;if(0!==se)for(var ce=Object(h.c)(b.value(X)),le=Object(h.f)(ce),de=Object(h.e)(ce),fe=_.value(X),pe=h.b.has(ce),me=S.value(X),he=O.value(a[X]),ge=0;ge<se;ge++){var ve=d[Ie=oe[ge]],be=P.value(ve);if((!fe||!be||fe===be)&&!(B&&k.value(ve)<1&&ie<1&&D.value(X)===I.value(ve))){var ye=Object(h.c)(w.value(ve)),_e=Object(h.f)(ye);if(!le||!_e){var Se=(pe||h.b.has(ye))&&!(le||_e),Oe=Math.sqrt(ue[ge]);if(0!==Oe){var xe=Object(h.d)(ce,ye);if(Oe<=(xe>0?xe:ye<0?de:(de+Object(h.e)(ye))/2)){var Ce=E.value(ve),we=T.value(f[ve]);n.add(Y,Ie,{order:Object(g.a)(he,we,me,Ce),flag:32|(Se?2:1)});}}}}}}else for(var Pe=L.edgeProps,je=Pe.order,Ee=Pe.symmetryA,Ae=Pe.symmetryB,Te=L.offset[X],De=L.offset[X+1];Te<De;++Te){var Ie;(Ie=o.SortedArray.indexOf(e.elements,L.b[Te]))<0||Ee[Te]!==Ae[Te]&&(\"H\"===b.value(X)&&\"H\"===w.value(L.b[Te])||W===Ee[Te]&&Q===Ae[Te]&&n.add(Y,Ie,{order:je[Te],flag:1}));}}n.finishUnitPair();}(e,n,t,r);},{maxRadius:4,validUnit:function validUnit(e){return l.a.isAtomic(e);},validUnitPair:function validUnitPair(r,n){return t.validUnitPair(e,r,n);}}),new m(r.getMap());}function D(e,t){return T(e,Object(u.__assign)(Object(u.__assign)({},h.a),{validUnitPair:t&&t.validUnitPair||function(e,t,r){var n=t.model.atomicHierarchy.derived.residue.moleculeType,i=r.model.atomicHierarchy.derived.residue.moleculeType,a=!(l.a.isAtomic(t)&&2===n[t.residueIndex[t.elements[0]]]||l.a.isAtomic(r)&&2===i[r.residueIndex[r.elements[0]]]);return x.a.validUnitPair(e,t,r)&&a;}}));}!function(e){function t(e,t,r,n,i,a){return{kind:\"bond-location\",aStructure:e,aUnit:t,aIndex:r,bStructure:n,bUnit:i,bIndex:a};}function r(e,t){return e.aStructure.label===t.aStructure.label&&e.bStructure.label===t.bStructure.label&&e.aIndex===t.aIndex&&e.bIndex===t.bIndex&&e.aUnit.id===t.aUnit.id&&e.bUnit.id===t.bUnit.id;}function n(e,t){return{kind:\"bond-loci\",structure:e,bonds:t};}e.Location=t,e.isLocation=function(e){return!!e&&\"bond-location\"===e.kind;},e.areLocationsEqual=r,e.Loci=n,e.isLoci=function(e){return!!e&&\"bond-loci\"===e.kind;},e.areLociEqual=function(e,t){if(e.structure!==t.structure)return!1;if(e.bonds.length!==t.bonds.length)return!1;for(var n=0,i=e.bonds.length;n<i;++n)if(!r(e.bonds[n],t.bonds[n]))return!1;return!0;},e.isLociEmpty=function(e){return 0===e.bonds.length;},e.remapLoci=function(e,r){if(r===e.structure)return e;var i=[];return e.bonds.forEach(function(n){var a=r.unitMap.get(n.aUnit.id);if(a){var s=r.unitMap.get(n.bUnit.id);if(s){var u=n.aUnit.elements[n.aIndex],c=o.SortedArray.indexOf(a.elements,u);if(-1!==c){var l=n.bUnit.elements[n.bIndex],d=o.SortedArray.indexOf(s.elements,l);-1!==d&&i.push(t(e.structure,a,c,e.structure,s,d));}}}}),n(r,i);},e.toStructureElementLoci=function(e){for(var t=[],r=new Map(),n=0,a=e.bonds;n<a.length;n++){var s=a[n],u=s.aIndex,c=s.aUnit,l=s.bIndex,d=s.bUnit;c===d?r.has(c.id)?r.get(c.id).push(u,l):r.set(c.id,[u,l]):(r.has(c.id)?r.get(c.id).push(u):r.set(c.id,[u]),r.has(d.id)?r.get(d.id).push(l):r.set(d.id,[l]));}return r.forEach(function(r,n){t.push({unit:e.structure.unitMap.get(n),indices:o.SortedArray.deduplicate(o.SortedArray.ofUnsortedArray(r))});}),i.d.Loci(e.structure,t);},e.getType=function(e,t){if(t.aUnit===t.bUnit){var r=t.aUnit.bonds,n=r.getEdgeIndex(t.aIndex,t.bIndex);return n<0?a.BondType.create(0):a.BondType.create(r.edgeProps.flags[n]);}var i=e.interUnitBonds.getBondFromLocation(t);return i?a.BondType.create(i.props.flag):a.BondType.create(0);},e.getOrder=function(e,t){if(t.aUnit===t.bUnit){var r=t.aUnit.bonds,n=r.getEdgeIndex(t.aIndex,t.bIndex);return n<0?0:r.edgeProps.order[n];}var i=e.interUnitBonds.getBondFromLocation(t);return i?i.props.order:0;},e.getIntraUnitBondCount=function(e){for(var t=0,r=0,n=e.units.length;r<n;++r){var a=e.units[r];i.g.isAtomic(a)&&(t+=a.bonds.edgeCount/2);}return t;};var u=function(){function e(){this.current={},this.hasNext=!1;}return e.prototype.move=function(){return this.advance(),this.current;},e.prototype.setElement=function(e,t,r){this.structure=e,this.unit=t,this.index=r,this.interBondIndices=e.interUnitBonds.getEdgeIndices(r,t),this.interBondCount=this.interBondIndices.length,this.interBondIndex=0,this.intraBondEnd=t.bonds.offset[r+1],this.intraBondIndex=t.bonds.offset[r],this.hasNext=this.interBondIndex<this.interBondCount||this.intraBondIndex<this.intraBondEnd;},e.prototype.advance=function(){if(this.intraBondIndex<this.intraBondEnd)this.current.otherUnit=this.unit,this.current.otherIndex=this.unit.bonds.b[this.intraBondIndex],this.current.type=this.unit.bonds.edgeProps.flags[this.intraBondIndex],this.current.order=this.unit.bonds.edgeProps.order[this.intraBondIndex],this.intraBondIndex+=1;else{if(!(this.interBondIndex<this.interBondCount))return void(this.hasNext=!1);var e=this.structure.interUnitBonds.edges[this.interBondIndex];this.current.otherUnit=e.unitA!==this.unit?e.unitA:e.unitB,this.current.otherIndex=e.indexA!==this.index?e.indexA:e.indexB,this.current.type=e.props.flag,this.current.order=e.props.order,this.interBondIndex+=1;}this.hasNext=this.interBondIndex<this.interBondCount||this.intraBondIndex<this.intraBondEnd;},e;}();e.ElementBondIterator=u,e.getBoundingSphere=function(e,t){return s.a.fromPairProvider(e.bonds.length,function(t,r,n){var i=e.bonds[t],a=i.aUnit,o=i.aIndex,s=i.bUnit,u=i.bIndex;a.conformation.position(a.elements[o],r),s.conformation.position(s.elements[u],n);},t);};}(E||(E={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return x;});var n,i,a=r(0),o=r(2),s=r(8),u=r(36),c=r(241),l=r(11),d=r(1),f=r(24),p=r(71),m=r(55);(i=n||(n={})).create=function(e){return{entries:Object(m.b)(),capacity:Math.max(1,e)};},i.get=function(e,t){for(var r=e.entries.first;r;r=r.next)if(r.value.key===t)return e.entries.remove(r),e.entries.addLast(r.value),r.value.data;},i.set=function(e,t,r){var n=void 0;if(e.entries.count>=e.capacity){var i=e.entries.first;n=i.value.data,e.entries.remove(i);}return e.entries.addLast(function(e,t){return{key:e,data:t};}(t,r)),n;};var h=r(261),g=r(31),v=r(363),b=r(26),y=r(13),_=r(4),S=r(23),O=r(114),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(a.__extends)(t,e),t;}(s.a.CreateBehavior({name:\"Volume Streaming\"}));!function(e){function t(e,t,r,n,i){return void 0===i&&(i={}),o.ParamDefinition.Group({isoValue:Object(c.c)(void 0!==i.isoValue?i.isoValue:r,n),color:o.ParamDefinition.Color(void 0!==i.color?i.color:t),wireframe:o.ParamDefinition.Boolean(void 0!==i.wireframe&&i.wireframe),opacity:o.ParamDefinition.Numeric(void 0!==i.opacity?i.opacity:.3,{min:0,max:1,step:.01})},{label:e,isExpanded:!0});}e.RootTag=\"volume-streaming-info\";var r={byteOffset:0,rate:1,sampleCount:[1,1,1],valuesInfo:[{mean:0,min:-1,max:1,sigma:.1},{mean:0,min:-1,max:1,sigma:.1}]};function i(n){var i=n.entryData,a=n.defaultView,s=n.structure,c=n.channelParams,p=void 0===c?{}:c,m=i||{kind:\"em\",header:{sampling:[r],availablePrecisions:[{precision:0,maxVoxels:0}]},emDefaultContourLevel:u.b.IsoValue.relative(0)},h=s&&s.boundary.box||l.b.empty();return{view:o.ParamDefinition.MappedStatic(a||(\"em\"===m.kind?\"cell\":\"selection-box\"),{off:o.ParamDefinition.Group({}),box:o.ParamDefinition.Group({bottomLeft:o.ParamDefinition.Vec3(h.min),topRight:o.ParamDefinition.Vec3(h.max)},{description:\"Static box defined by cartesian coords.\",isFlat:!0}),\"selection-box\":o.ParamDefinition.Group({radius:o.ParamDefinition.Numeric(5,{min:0,max:50,step:.5},{description:\"Radius in Å within which the volume is shown.\"}),bottomLeft:o.ParamDefinition.Vec3(d.Vec3.create(0,0,0),{},{isHidden:!0}),topRight:o.ParamDefinition.Vec3(d.Vec3.create(0,0,0),{},{isHidden:!0})},{description:\"Box around focused element.\",isFlat:!0}),cell:o.ParamDefinition.Group({})},{options:e.ViewTypeOptions,description:'Controls what of the volume is displayed. \"Off\" hides the volume alltogether. \"Bounded box\" shows the volume inside the given box. \"Around Interaction\" shows the volume around the focused element/atom. \"Whole Structure\" shows the volume for the whole structure.'}),detailLevel:o.ParamDefinition.Select(Math.min(3,m.header.availablePrecisions.length-1),m.header.availablePrecisions.map(function(e,t){return[t,t+1+\" [ \"+(0|Math.pow(e.maxVoxels,1/3))+\"^3 cells ]\"];}),{description:\"Determines the maximum number of voxels. Depending on the size of the volume options are in the range from 0 (0.52M voxels) to 6 (25.17M voxels).\"}),channels:\"em\"===m.kind?o.ParamDefinition.Group({em:t(\"EM\",Object(f.Color)(6524815),m.emDefaultContourLevel||u.b.IsoValue.relative(1),m.header.sampling[0].valuesInfo[0],p.em)},{isFlat:!0}):o.ParamDefinition.Group({\"2fo-fc\":t(\"2Fo-Fc\",Object(f.Color)(3367602),u.b.IsoValue.relative(1.5),m.header.sampling[0].valuesInfo[0],p[\"2fo-fc\"]),\"fo-fc(+ve)\":t(\"Fo-Fc(+ve)\",Object(f.Color)(3390259),u.b.IsoValue.relative(3),m.header.sampling[0].valuesInfo[1],p[\"fo-fc(+ve)\"]),\"fo-fc(-ve)\":t(\"Fo-Fc(-ve)\",Object(f.Color)(12268339),u.b.IsoValue.relative(-3),m.header.sampling[0].valuesInfo[1],p[\"fo-fc(-ve)\"])},{isFlat:!0})};}e.createParams=function(e){void 0===e&&(e={});var t=e.data,r=e.defaultView,n=e.channelParams,a=new Map();t&&t.entries.forEach(function(e){return a.set(e.dataId,e);});var s=t?t.entries.map(function(e){return[e.dataId,e.dataId];}):[],u=t?t.entries[0].dataId:\"\";return{entry:o.ParamDefinition.Mapped(u,s,function(e){return o.ParamDefinition.Group(i({entryData:a.get(e),defaultView:r,structure:t&&t.structure,channelParams:n}));})};},e.createEntryParams=i,e.ViewTypeOptions=[[\"off\",\"Off\"],[\"box\",\"Bounded Box\"],[\"selection-box\",\"Around Focus\"],[\"cell\",\"Whole Structure\"]],e.ChannelTypeOptions=[[\"em\",\"em\"],[\"2fo-fc\",\"2fo-fc\"],[\"fo-fc(+ve)\",\"fo-fc(+ve)\"],[\"fo-fc(-ve)\",\"fo-fc(-ve)\"]];var m=function(e){function t(t,r){var i=e.call(this,t,{})||this;return i.plugin=t,i.data=r,i.cache=n.create(25),i.params={},i.lastLoci=S.EmptyLoci,i.ref=\"\",i.channels={},i.infoMap=new Map(),i.data.entries.forEach(function(e){return i.infoMap.set(e.dataId,e);}),i;}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,\"info\",{get:function get(){return this.infoMap.get(this.params.entry.name);},enumerable:!1,configurable:!0}),t.prototype.queryData=function(e){return Object(a.__awaiter)(this,void 0,void 0,function(){var t,r,i,o,s,u,c,l;return Object(a.__generator)(this,function(a){switch(a.label){case 0:return t=Object(h.a)(this.data.serverUrl,this.info.kind+\"/\"+this.info.dataId.toLowerCase()),e?(r=e.min,i=e.max,t+=\"/box/\"+r.map(function(e){return Math.round(1e3*e)/1e3;}).join(\",\")+\"/\"+i.map(function(e){return Math.round(1e3*e)/1e3;}).join(\",\")):t+=\"/cell\",t+=\"?detail=\"+this.params.entry.params.detailLevel,(o=n.get(this.cache,t))?[2,o.data]:(s=O.Asset.getUrlAsset(this.plugin.managers.asset,t),[4,this.plugin.runTask(this.plugin.managers.asset.resolve(s,\"binary\"))]);case 1:return u=a.sent(),[4,this.parseCif(u.data)];case 2:return(c=a.sent())?((l=n.set(this.cache,t,{data:c,asset:u}))&&l.asset.dispose(),[2,c]):[2];}});});},t.prototype.parseCif=function(e){return Object(a.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s;return Object(a.__generator)(this,function(a){switch(a.label){case 0:return[4,this.plugin.runTask(g.a.parseBinary(e))];case 1:if((t=a.sent()).isError)return this.plugin.log.error(\"VolumeStreaming, parsing CIF: \"+t.toString()),[2];if(t.result.blocks.length<2)return this.plugin.log.error(\"VolumeStreaming: Invalid data.\"),[2];r={},n=1,a.label=2;case 2:return n<t.result.blocks.length?(i=t.result.blocks[n],o=g.a.schema.densityServer(i),[4,this.plugin.runTask(Object(v.a)(o))]):[3,5];case 3:s=a.sent(),r[i.header]=s,a.label=4;case 4:return n++,[3,2];case 5:return[2,r];}});});},t.prototype.updateDynamicBox=function(e){if(\"selection-box\"===this.params.entry.params.view.name){var t=this.plugin.state.data,r=Object(a.__assign)(Object(a.__assign)({},this.params),{entry:{name:this.params.entry.name,params:Object(a.__assign)(Object(a.__assign)({},this.params.entry.params),{view:{name:\"selection-box\",params:{radius:this.params.entry.params.view.params.radius,bottomLeft:e.min,topRight:e.max}}})}}),n=t.build().to(this.ref).update(r);b.PluginCommands.State.Update(this.plugin,{state:t,tree:n,options:{doNotUpdateCurrent:!0}});}},t.prototype.getStructureRoot=function(){return this.plugin.state.data.select(y.StateSelection.Generators.byRef(this.ref).rootOfType([s.a.Molecule.Structure]))[0];},t.prototype.register=function(e){var t=this;this.ref=e,this.subscribeObservable(this.plugin.state.events.object.removed,function(e){s.a.Molecule.Structure.is(e.obj)&&_.StructureElement.Loci.is(t.lastLoci)&&t.lastLoci.structure===e.obj.data&&(t.lastLoci=S.EmptyLoci);}),this.subscribeObservable(this.plugin.state.events.object.updated,function(e){s.a.Molecule.Structure.is(e.oldObj)&&_.StructureElement.Loci.is(t.lastLoci)&&t.lastLoci.structure===e.oldObj.data&&(t.lastLoci=S.EmptyLoci);}),this.subscribeObservable(this.plugin.managers.structure.focus.behaviors.current,function(e){if(t.plugin.state.data.tree.children.has(t.ref)){var r=e?e.loci:S.EmptyLoci;\"selection-box\"!==t.params.entry.params.view.name?t.lastLoci=r:t.updateInteraction(r);}});},t.prototype.unregister=function(){for(var e=this.cache.entries.first;e;)e.value.data.asset.dispose(),e=e.next;},t.prototype.getBoxFromLoci=function(e){var t,r;if(S.Loci.isEmpty(e))return l.b.empty();var n=this.plugin.helpers.substructureParent.get(e.structure,!0);if(!n)return l.b.empty();var i=this.getStructureRoot();if(!i||(null===(t=i.obj)||void 0===t?void 0:t.data)!==(null===(r=n.obj)||void 0===r?void 0:r.data))return l.b.empty();var a=_.StructureElement.Loci.extendToWholeResidues(e),o=_.StructureElement.Loci.getBoundary(a).box;return 1===_.StructureElement.Loci.size(a)&&l.b.expand(o,o,d.Vec3.create(1,1,1)),o;},t.prototype.updateInteraction=function(e){if(S.Loci.areEqual(this.lastLoci,e))return this.lastLoci=S.EmptyLoci,void this.updateDynamicBox(l.b.empty());if(this.lastLoci=e,Object(S.isEmptyLoci)(e))this.updateDynamicBox(l.b.empty());else{var t=this.getBoxFromLoci(e);this.updateDynamicBox(t);}},t.prototype.update=function(e){return Object(a.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s,c;return Object(a.__generator)(this,function(a){switch(a.label){case 0:switch(t=\"selection-box\"===e.entry.params.view.name&&this.params&&this.params.entry&&this.params.entry.params&&this.params.entry.params.view&&\"selection-box\"!==this.params.entry.params.view.name,this.params=e,r=void 0,n=!1,e.entry.params.view.name){case\"off\":n=!0;break;case\"box\":r=l.b.create(e.entry.params.view.params.bottomLeft,e.entry.params.view.params.topRight),n=l.b.volume(r)<1e-4;break;case\"selection-box\":r=t?this.getBoxFromLoci(this.lastLoci)||l.b.empty():l.b.create(d.Vec3.clone(e.entry.params.view.params.bottomLeft),d.Vec3.clone(e.entry.params.view.params.topRight)),i=e.entry.params.view.params.radius,n=l.b.volume(r)<1e-4,l.b.expand(r,r,d.Vec3.create(i,i,i));break;case\"cell\":r=\"x-ray\"===this.info.kind?this.data.structure.boundary.box:void 0;}return n?(s={},[3,3]):[3,1];case 1:return[4,this.queryData(r)];case 2:s=a.sent(),a.label=3;case 3:return(o=s)?(c=e.entry.params.channels,\"x-ray\"===this.info.kind?(this.channels[\"2fo-fc\"]=this.createChannel(o[\"2FO-FC\"]||u.b.One,c[\"2fo-fc\"],this.info.header.sampling[0].valuesInfo[0]),this.channels[\"fo-fc(+ve)\"]=this.createChannel(o[\"FO-FC\"]||u.b.One,c[\"fo-fc(+ve)\"],this.info.header.sampling[0].valuesInfo[1]),this.channels[\"fo-fc(-ve)\"]=this.createChannel(o[\"FO-FC\"]||u.b.One,c[\"fo-fc(-ve)\"],this.info.header.sampling[0].valuesInfo[1])):this.channels.em=this.createChannel(o.EM||u.b.One,c.em,this.info.header.sampling[0].valuesInfo[0]),[2,!0]):[2,!1];}});});},t.prototype.createChannel=function(e,t,r){var n=t;return{data:e,color:n.color,wireframe:n.wireframe,opacity:n.opacity,isoValue:\"relative\"===n.isoValue.kind?n.isoValue:u.b.IsoValue.toRelative(n.isoValue,r)};},t.prototype.getDescription=function(){return\"selection-box\"===this.params.entry.params.view.name?\"Selection\":\"box\"===this.params.entry.params.view.name?\"Static Box\":\"cell\"===this.params.entry.params.view.name?\"Cell\":\"\";},t;}(p.a.WithSubscribers);e.Behavior=m;}(x||(x={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(43),i=r(233),a=r(46),o=r(78);function s(){return s.zero();}!function(e){function t(){var e=[.1,0,0];return e[0]=0,e;}function r(e,t){var r=t[0],n=t[1],i=t[2],o=Math.sqrt(n*n+i*i),s=(Object(a.f)(Math.atan2(i,n))+360)%360;return 0===Math.round(1e4*o)&&(s=Number.NaN),e[0]=s,e[1]=o,e[2]=r,e;}function s(e,t,r){return e[0]=t[0]-l*r,e[1]=t[1],e[2]=t[2],e;}e.zero=t,e.create=function(e,r,n){var i=t();return i[0]=e,i[1]=r,i[2]=n,i;},e.fromColor=function(e,t){var r=n.Color.toRgb(t),i=function(e,t,r){e=b(e),t=b(t),r=b(r);var n=y((.4124564*e+.3575761*t+.1804375*r)/d),i=y((.2126729*e+.7151522*t+.072175*r)/f),a=y((.0193339*e+.119192*t+.9503041*r)/p);return[n,i,a];}(r[0],r[1],r[2]),a=i[0],o=i[1],s=i[2],u=116*o-16;return e[0]=u<0?0:u,e[1]=500*(a-o),e[2]=200*(o-s),e;},e.fromHcl=function(e,t){return i.a.toLab(e,t);},e.toColor=function(e){var t=(e[0]+16)/116,r=isNaN(e[1])?t:t+e[1]/500,i=isNaN(e[2])?t:t-e[2]/200;t=f*v(t);var a=g(3.2404542*(r=d*v(r))-1.5371385*t-.4985314*(i=p*v(i))),s=g(-.969266*r+1.8760108*t+.041556*i),u=g(.0556434*r-.2040259*t+1.0572252*i);return n.Color.fromRgb(Math.round(Object(o.a)(a,0,255)),Math.round(Object(o.a)(s,0,255)),Math.round(Object(o.a)(u,0,255)));},e.toHcl=r,e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e;},e.darken=s,e.lighten=function(e,t,r){return s(e,t,-r);};var u=[0,0,0];function c(e,t,n){return r(u,t),i.a.toLab(e,i.a.saturate(u,u,n));}e.saturate=c,e.desaturate=function(e,t,r){return c(e,t,-r);};var l=18,d=.95047,f=1,p=1.08883,m=.137931034,h=.12841855;function g(e){return 255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055);}function v(e){return e>.206896552?e*e*e:h*(e-m);}function b(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);}function y(e){return e>.008856452?Math.pow(e,1/3):e/h+m;}}(s||(s={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"createStructureRepresentationParams\",function(){return a;}),r.d(t,\"getStructureThemeTypes\",function(){return o;}),r.d(t,\"createStructureColorThemeParams\",function(){return s;}),r.d(t,\"createStructureSizeThemeParams\",function(){return u;});var n=r(4),i=r(2);function a(e,t,r){void 0===r&&(r={});var i=r;return\"string\"==typeof i.type||\"string\"==typeof i.color||\"string\"==typeof i.size?function(e,t,r){var n=r.type&&e.representation.structure.registry.get(r.type)||e.representation.structure.registry.default.provider,i=r.color&&e.representation.structure.themes.colorThemeRegistry.get(r.color)||e.representation.structure.themes.colorThemeRegistry.get(n.defaultColorTheme.name),a=r.size&&e.representation.structure.themes.sizeThemeRegistry.get(r.size)||e.representation.structure.themes.sizeThemeRegistry.get(n.defaultSizeTheme.name);return c(e,t,{type:n,typeParams:r.typeParams,color:i,colorParams:r.colorParams,size:a,sizeParams:r.sizeParams});}(e,t||n.Structure.Empty,r):c(e,t||n.Structure.Empty,r);}function o(e,t){var r=e.representation.structure.themes;return t?r.colorThemeRegistry.getApplicableTypes({structure:t}):r.colorThemeRegistry.types;}function s(e,t,r,a,o){var s=e.representation.structure,u=s.registry,c=s.themes,l=u.get(r||u.default.name),d=c.colorThemeRegistry.get(a||l.defaultColorTheme.name),f=i.ParamDefinition.getDefaultValues(d.getParams({structure:t||n.Structure.Empty}));return d.name===l.defaultColorTheme.name&&Object.assign(f,l.defaultColorTheme.props),{name:d.name,params:Object.assign(f,o)};}function u(e,t,r,a,o){var s=e.representation.structure,u=s.registry,c=s.themes,l=u.get(r||u.default.name),d=c.sizeThemeRegistry.get(a||l.defaultSizeTheme.name),f=i.ParamDefinition.getDefaultValues(d.getParams({structure:t||n.Structure.Empty}));return d.name===l.defaultSizeTheme.name&&Object.assign(f,l.defaultSizeTheme.props),{name:d.name,params:Object.assign(f,o)};}function c(e,t,r){void 0===r&&(r={});var n=e.representation.structure.themes,a={structure:t},o=r.type||e.representation.structure.registry.default.provider,s=i.ParamDefinition.getDefaultValues(o.getParams(n,t)),u=Object.assign(s,r.typeParams),c=r.color||n.colorThemeRegistry.get(o.defaultColorTheme.name),l=i.ParamDefinition.getDefaultValues(c.getParams(a));c.name===o.defaultColorTheme.name&&Object.assign(l,o.defaultColorTheme.props);var d=Object.assign(l,r.colorParams),f=r.size||n.sizeThemeRegistry.get(o.defaultSizeTheme.name),p=i.ParamDefinition.getDefaultValues(f.getParams(a));f.name===o.defaultSizeTheme.name&&Object.assign(p,o.defaultSizeTheme.props);var m=Object.assign(p,r.sizeParams);return{type:{name:o.name,params:u},colorTheme:{name:c.name,params:d},sizeTheme:{name:f.name,params:m}};}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"QueryRuntimeTable\",function(){return c;}),r.d(t,\"DefaultQueryRuntimeTable\",function(){return l;}),r.d(t,\"QueryCompilerCtx\",function(){return d;}),r.d(t,\"QueryCompiledSymbol\",function(){return n;}),r.d(t,\"CompiledQueryFn\",function(){return i;}),r.d(t,\"QueryRuntimeArguments\",function(){return a;}),r.d(t,\"QuerySymbolRuntime\",function(){return o;}),r.d(t,\"compile\",function(){return h;});var n,i,a,o,s=r(132),u=r(4),c=function(){function e(){this.map=new Map();}return e.prototype.removeSymbol=function(e){this.map.delete(e.symbol.id);},e.prototype.addSymbol=function(e){this.map.has(e.symbol.id)&&console.warn(\"Symbol '\"+e.symbol.id+\"' already added. Call removeSymbol/removeCustomProps re-adding the symbol.\"),this.map.set(e.symbol.id,e);},e.prototype.addCustomProp=function(e){if(e.symbols)for(var t=0,r=Object.keys(e.symbols);t<r.length;t++){var n=r[t];this.addSymbol(e.symbols[n]);}},e.prototype.removeCustomProp=function(e){if(e.symbols)for(var t=0,r=Object.keys(e.symbols);t<r.length;t++){var n=r[t];this.removeSymbol(e.symbols[n]);}},e.prototype.getRuntime=function(e){return this.map.get(e);},e;}(),l=new c(),d=function d(e){this.table=e,this.constQueryContext=new u.QueryContext(u.Structure.Empty);};!function(e){e.Const=function(e){return{kind:\"const\",value:e};},e.Dynamic=function(e){return{kind:\"dynamic\",runtime:e};};}(n||(n={})),function(e){e.Const=function(e){return{isConst:!0,fn:function fn(t){return e;}};},e.Dynamic=function(e){return{isConst:!1,fn:e};};}(i||(i={})),function(e){e.forEachEval=function(e,t,r,n){if(\"number\"==typeof e.length)for(var i=0,a=e.length;i<a;i++)r(e[i](t),i,n);else{i=0;for(var o=0,s=Object.keys(e);o<s.length;o++){r(e[s[o]](t),i++,n);}}return n;};}(a||(a={})),function(e){e.Const=function(e,t){return new f(e,t,!0);},e.Dynamic=function(e,t){return new f(e,t,!1);};}(o||(o={}));var f=function(){function e(e,t,r){this.symbol=e,this.fn=t,this.isConst=r;}return e.prototype.compile=function(e,t){var r,n=!1;if(t){if(s.a.isArgumentsArray(t)){r=[],n=!1;for(var a=0,o=t;a<o.length;a++){var u=m(e,o[a]);n=n&&u.isConst,r.push(u.fn);}}else{r=Object.create(null),n=!1;for(var c=0,l=Object.keys(t);c<l.length;c++){var d=l[c];u=m(e,t[d]);n=n&&u.isConst,r[d]=u.fn;}}}else r=void 0,n=!0;return this.isConst&&this.isConst&&n?i.Const(this.fn(e.constQueryContext,r)):i.Dynamic(p(this.fn,r));},e;}();function p(e,t){return function(r){return e(r,t);};}function m(e,t){if(s.a.isLiteral(t))return i.Const(t);if(s.a.isSymbol(t)){var r=e.table.getRuntime(t.name);return r?r.compile(e):i.Const(t.name);}if(!s.a.isSymbol(t.head))throw new Error(\"Can only apply symbols.\");var n=e.table.getRuntime(t.head.name);if(!n)throw new Error(\"Symbol '\"+t.head.name+\"' is not implemented.\");return n.compile(e,t.args);}function h(e){return m(new d(l),e).fn;}var g=r(12),v=r(22),b=r(90),y=r(41),_=r(119),S=r(9),O=r(267),x=r(30),C=o.Const,w=o.Dynamic,P=[C(g.a.core.type.bool,function(e,t){return!!t[0](e);}),C(g.a.core.type.num,function(e,t){return+t[0](e);}),C(g.a.core.type.str,function(e,t){return\"\"+t[0](e);}),C(g.a.core.type.list,function(e,t){return a.forEachEval(t,e,function(e,t,r){return r[t]=e;},[]);}),C(g.a.core.type.set,function(e,t){return a.forEachEval(t,e,function(e,t,r){return r.add(e);},new Set());}),C(g.a.core.type.regex,function(e,t){return new RegExp(t[0](e),t[1]&&t[1](e)||\"\");}),C(g.a.core.type.bitflags,function(e,t){return+t[0](e);}),C(g.a.core.type.compositeKey,function(e,t){return a.forEachEval(t,e,function(e,t,r){return r[t]=\"\"+e;},[]).join(\"-\");}),C(g.a.core.logic.not,function(e,t){return!t[0](e);}),C(g.a.core.logic.and,function(e,t){if(\"number\"==typeof t.length){for(var r=0,n=t.length;r<n;r++)if(!t[r](e))return!1;}else for(var i=0,a=Object.keys(t);i<a.length;i++){if(!t[a[i]](e))return!1;}return!0;}),C(g.a.core.logic.or,function(e,t){if(\"number\"==typeof t.length){for(var r=0,n=t.length;r<n;r++)if(t[r](e))return!0;}else for(var i=0,a=Object.keys(t);i<a.length;i++){if(t[a[i]](e))return!0;}return!1;}),C(g.a.core.rel.eq,function(e,t){return t[0](e)===t[1](e);}),C(g.a.core.rel.neq,function(e,t){return t[0](e)!==t[1](e);}),C(g.a.core.rel.lt,function(e,t){return t[0](e)<t[1](e);}),C(g.a.core.rel.lte,function(e,t){return t[0](e)<=t[1](e);}),C(g.a.core.rel.gr,function(e,t){return t[0](e)>t[1](e);}),C(g.a.core.rel.gre,function(e,t){return t[0](e)>=t[1](e);}),C(g.a.core.rel.inRange,function(e,t){var r=t[0](e);return r>=t[1](e)&&r<=t[2](e);}),C(g.a.core.math.add,function(e,t){var r=0;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r+=t[n](e);else for(var a=0,o=Object.keys(t);a<o.length;a++){r+=t[o[a]](e);}return r;}),C(g.a.core.math.sub,function(e,t){var r=0;if(\"number\"==typeof t.length){if(1===t.length)return-t[0](e);r=t[0](e)||0;for(var n=1,i=t.length;n<i;n++)r-=t[n](e);}else{var a=Object.keys(t);if(1===a.length)return-t[a[0]](e);r=t[a[0]](e)||0;for(n=1,i=a.length;n<i;n++)r-=t[a[n]](e);}return r;}),C(g.a.core.math.mult,function(e,t){var r=1;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r*=t[n](e);else for(var a=0,o=Object.keys(t);a<o.length;a++){r*=t[o[a]](e);}return r;}),C(g.a.core.math.div,function(e,t){return t[0](e)/t[1](e);}),C(g.a.core.math.pow,function(e,t){return Math.pow(t[0](e),t[1](e));}),C(g.a.core.math.mod,function(e,t){return t[0](e)%t[1](e);}),C(g.a.core.math.min,function(e,t){var r=Number.POSITIVE_INFINITY;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r=Math.min(t[n](e),r);else for(var a=0,o=Object.keys(t);a<o.length;a++){var s=o[a];r=Math.min(t[s](e),r);}return r;}),C(g.a.core.math.max,function(e,t){var r=Number.NEGATIVE_INFINITY;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r=Math.max(t[n](e),r);else for(var a=0,o=Object.keys(t);a<o.length;a++){var s=o[a];r=Math.max(t[s](e),r);}return r;}),C(g.a.core.math.floor,function(e,t){return Math.floor(t[0](e));}),C(g.a.core.math.ceil,function(e,t){return Math.ceil(t[0](e));}),C(g.a.core.math.roundInt,function(e,t){return Math.round(t[0](e));}),C(g.a.core.math.abs,function(e,t){return Math.abs(t[0](e));}),C(g.a.core.math.sqrt,function(e,t){return Math.sqrt(t[0](e));}),C(g.a.core.math.cbrt,function(e,t){return Math.cbrt(t[0](e));}),C(g.a.core.math.sin,function(e,t){return Math.sin(t[0](e));}),C(g.a.core.math.cos,function(e,t){return Math.cos(t[0](e));}),C(g.a.core.math.tan,function(e,t){return Math.tan(t[0](e));}),C(g.a.core.math.asin,function(e,t){return Math.asin(t[0](e));}),C(g.a.core.math.acos,function(e,t){return Math.acos(t[0](e));}),C(g.a.core.math.atan,function(e,t){return Math.atan(t[0](e));}),C(g.a.core.math.sinh,function(e,t){return Math.sinh(t[0](e));}),C(g.a.core.math.cosh,function(e,t){return Math.cosh(t[0](e));}),C(g.a.core.math.tanh,function(e,t){return Math.tanh(t[0](e));}),C(g.a.core.math.exp,function(e,t){return Math.exp(t[0](e));}),C(g.a.core.math.log,function(e,t){return Math.log(t[0](e));}),C(g.a.core.math.log10,function(e,t){return Math.log10(t[0](e));}),C(g.a.core.math.atan2,function(e,t){return Math.atan2(t[0](e),t[1](e));}),C(g.a.core.str.match,function(e,t){return t[0](e).test(t[1](e));}),C(g.a.core.str.concat,function(e,t){var r=[];if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r.push(t[n](e).toString());else for(var a=0,o=Object.keys(t);a<o.length;a++){var s=o[a];r.push(t[s](e).toString());}return r.join(\"\");}),C(g.a.core.list.getAt,function(e,t){return t[0](e)[t[1](e)];}),C(g.a.core.list.equal,function(e,t){return Object(x.arrayEqual)(t[0](e),t[1](e));}),C(g.a.core.set.has,function(e,t){return t[0](e).has(t[1](e));}),C(g.a.core.set.isSubset,function(e,t){return b.a.isSuperset(t[1](e),t[0](e));}),C(g.a.core.flags.hasAny,function(e,t){var r=t[1](e),n=t[0](e);return r?0!=(n&r):!!n;}),C(g.a.core.flags.hasAll,function(e,t){var r=t[1](e),n=t[0](e);return r?(n&r)===r:!n;}),C(g.a.structureQuery.type.elementSymbol,function(e,t){return Object(v.ElementSymbol)(t[0](e));}),C(g.a.structureQuery.type.atomName,function(e,t){return Object(y.g)(t[0](e));}),C(g.a.structureQuery.type.bondFlags,function(e,t){var r=0;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r=E(r,t[n](e));else for(var a=0,o=Object.keys(t);a<o.length;a++){r=E(r,t[o[a]](e));}return r;}),C(g.a.structureQuery.type.ringFingerprint,function(e,t){return u.UnitRing.elementFingerprint(function(e,t){var r=[];if(!t)return r;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r.push(t[n](e));else{var a=Object.keys(t);for(n=1,i=a.length;n<i;n++)r.push(t[a[n]](e));}return r;}(e,t));}),C(g.a.structureQuery.type.secondaryStructureFlags,function(e,t){var r=0;if(\"number\"==typeof t.length)for(var n=0,i=t.length;n<i;n++)r=A(r,t[n](e));else for(var a=0,o=Object.keys(t);a<o.length;a++){r=A(r,t[o[a]](e));}return r;}),w(g.a.structureQuery.filter.pick,function(e,t){return u.Queries.filters.pick(t[0],t.test)(e);}),w(g.a.structureQuery.filter.first,function(e,t){return u.Queries.filters.first(t[0])(e);}),w(g.a.structureQuery.filter.withSameAtomProperties,function(e,t){return u.Queries.filters.withSameAtomProperties(t[0],t.source,t.property)(e);}),w(g.a.structureQuery.filter.intersectedBy,function(e,t){return u.Queries.filters.areIntersectedBy(t[0],t.by)(e);}),w(g.a.structureQuery.filter.within,function(e,t){return u.Queries.filters.within({query:t[0],target:t.target,minRadius:t[\"min-radius\"],maxRadius:t[\"max-radius\"],elementRadius:t[\"atom-radius\"],invert:t.invert})(e);}),w(g.a.structureQuery.filter.isConnectedTo,function(e,t){return u.Queries.filters.isConnectedTo({query:t[0],target:t.target,disjunct:t.disjunct,invert:t.invert,bondTest:t[\"bond-test\"]})(e);}),w(g.a.structureQuery.generator.atomGroups,function(e,t){return u.Queries.generators.atoms({entityTest:t[\"entity-test\"],chainTest:t[\"chain-test\"],residueTest:t[\"residue-test\"],atomTest:t[\"atom-test\"],groupBy:t[\"group-by\"]})(e);}),w(g.a.structureQuery.generator.all,function(e){return u.Queries.generators.all(e);}),w(g.a.structureQuery.generator.empty,function(e){return u.Queries.generators.none(e);}),w(g.a.structureQuery.generator.bondedAtomicPairs,function(e,t){return u.Queries.generators.bondedAtomicPairs(t&&t[0])(e);}),w(g.a.structureQuery.generator.rings,function(e,t){var r,n;return u.Queries.generators.rings(null===(r=null==t?void 0:t.fingerprint)||void 0===r?void 0:r.call(t,e),null===(n=null==t?void 0:t[\"only-aromatic\"])||void 0===n?void 0:n.call(t,e))(e);}),w(g.a.structureQuery.modifier.includeSurroundings,function(e,t){return u.Queries.modifiers.includeSurroundings(t[0],{radius:t.radius(e),wholeResidues:!(!t[\"as-whole-residues\"]||!t[\"as-whole-residues\"](e)),elementRadius:t[\"atom-radius\"]})(e);}),w(g.a.structureQuery.modifier.wholeResidues,function(e,t){return u.Queries.modifiers.wholeResidues(t[0])(e);}),w(g.a.structureQuery.modifier.union,function(e,t){return u.Queries.modifiers.union(t[0])(e);}),w(g.a.structureQuery.modifier.expandProperty,function(e,t){return u.Queries.modifiers.expandProperty(t[0],t.property)(e);}),w(g.a.structureQuery.modifier.exceptBy,function(e,t){return u.Queries.modifiers.exceptBy(t[0],t.by)(e);}),w(g.a.structureQuery.modifier.includeConnected,function(e,t){return u.Queries.modifiers.includeConnected({query:t[0],bondTest:t[\"bond-test\"],wholeResidues:!(!t[\"as-whole-residues\"]||!t[\"as-whole-residues\"](e)),layerCount:t[\"layer-count\"]&&t[\"layer-count\"](e)||1})(e);}),w(g.a.structureQuery.combinator.merge,function(e,t){return u.Queries.combinators.merge(t)(e);}),w(g.a.structureQuery.atomProperty.core.elementSymbol,j(u.StructureProperties.atom.type_symbol)),w(g.a.structureQuery.atomProperty.core.vdw,function(e,t){return Object(_.VdwRadius)(u.StructureProperties.atom.type_symbol(t&&t[0]&&t[0](e)||e.element));}),w(g.a.structureQuery.atomProperty.core.mass,function(e,t){return Object(_.AtomWeight)(u.StructureProperties.atom.type_symbol(t&&t[0]&&t[0](e)||e.element));}),w(g.a.structureQuery.atomProperty.core.atomicNumber,function(e,t){return Object(_.AtomNumber)(u.StructureProperties.atom.type_symbol(t&&t[0]&&t[0](e)||e.element));}),w(g.a.structureQuery.atomProperty.core.x,j(u.StructureProperties.atom.x)),w(g.a.structureQuery.atomProperty.core.y,j(u.StructureProperties.atom.y)),w(g.a.structureQuery.atomProperty.core.z,j(u.StructureProperties.atom.z)),w(g.a.structureQuery.atomProperty.core.sourceIndex,j(u.StructureProperties.atom.sourceIndex)),w(g.a.structureQuery.atomProperty.core.operatorName,j(u.StructureProperties.unit.operator_name)),w(g.a.structureQuery.atomProperty.core.modelIndex,j(u.StructureProperties.unit.model_index)),w(g.a.structureQuery.atomProperty.core.modelLabel,j(u.StructureProperties.unit.model_label)),w(g.a.structureQuery.atomProperty.core.atomKey,function(e,t){var r=t&&t[0]&&t[0](e)||e.element;return Object(S.f)(r.unit.id,r.element);}),w(g.a.structureQuery.atomProperty.macromolecular.residueKey,function(e,t){return u.StructureElement.residueIndex(t&&t[0]&&t[0](e)||e.element);}),w(g.a.structureQuery.atomProperty.macromolecular.chainKey,function(e,t){return u.StructureElement.chainIndex(t&&t[0]&&t[0](e)||e.element);}),w(g.a.structureQuery.atomProperty.macromolecular.entityKey,function(e,t){return u.StructureElement.entityIndex(t&&t[0]&&t[0](e)||e.element);}),w(g.a.structureQuery.atomProperty.macromolecular.id,j(u.StructureProperties.atom.id)),w(g.a.structureQuery.atomProperty.macromolecular.isHet,function(e,t){return\"ATOM\"!==u.StructureProperties.residue.group_PDB(t&&t[0]&&t[0](e)||e.element);}),w(g.a.structureQuery.atomProperty.macromolecular.label_atom_id,j(u.StructureProperties.atom.label_atom_id)),w(g.a.structureQuery.atomProperty.macromolecular.label_alt_id,j(u.StructureProperties.atom.label_alt_id)),w(g.a.structureQuery.atomProperty.macromolecular.label_comp_id,j(u.StructureProperties.atom.label_comp_id)),w(g.a.structureQuery.atomProperty.macromolecular.label_seq_id,j(u.StructureProperties.residue.label_seq_id)),w(g.a.structureQuery.atomProperty.macromolecular.label_asym_id,j(u.StructureProperties.chain.label_asym_id)),w(g.a.structureQuery.atomProperty.macromolecular.label_entity_id,j(u.StructureProperties.entity.id)),w(g.a.structureQuery.atomProperty.macromolecular.auth_atom_id,j(u.StructureProperties.atom.auth_atom_id)),w(g.a.structureQuery.atomProperty.macromolecular.auth_comp_id,j(u.StructureProperties.atom.auth_comp_id)),w(g.a.structureQuery.atomProperty.macromolecular.auth_seq_id,j(u.StructureProperties.residue.auth_seq_id)),w(g.a.structureQuery.atomProperty.macromolecular.auth_asym_id,j(u.StructureProperties.chain.auth_asym_id)),w(g.a.structureQuery.atomProperty.macromolecular.pdbx_PDB_ins_code,j(u.StructureProperties.residue.pdbx_PDB_ins_code)),w(g.a.structureQuery.atomProperty.macromolecular.pdbx_formal_charge,j(u.StructureProperties.atom.pdbx_formal_charge)),w(g.a.structureQuery.atomProperty.macromolecular.occupancy,j(u.StructureProperties.atom.occupancy)),w(g.a.structureQuery.atomProperty.macromolecular.B_iso_or_equiv,j(u.StructureProperties.atom.B_iso_or_equiv)),w(g.a.structureQuery.atomProperty.macromolecular.entityType,j(u.StructureProperties.entity.type)),w(g.a.structureQuery.atomProperty.macromolecular.entitySubtype,j(u.StructureProperties.entity.subtype)),w(g.a.structureQuery.atomProperty.macromolecular.entityPrdId,j(u.StructureProperties.entity.prd_id)),w(g.a.structureQuery.atomProperty.macromolecular.entityDescription,j(u.StructureProperties.entity.pdbx_description)),w(g.a.structureQuery.atomProperty.macromolecular.objectPrimitive,j(u.StructureProperties.unit.object_primitive)),w(g.a.structureQuery.atomProperty.macromolecular.isNonStandard,j(u.StructureProperties.residue.isNonStandard)),w(g.a.structureQuery.atomProperty.macromolecular.secondaryStructureKey,j(u.StructureProperties.residue.secondary_structure_key)),w(g.a.structureQuery.atomProperty.macromolecular.secondaryStructureFlags,j(u.StructureProperties.residue.secondary_structure_type)),w(g.a.structureQuery.atomProperty.macromolecular.chemCompType,j(u.StructureProperties.residue.chem_comp_type)),w(g.a.structureQuery.bondProperty.order,function(e,t){return e.atomicBond.order;}),w(g.a.structureQuery.bondProperty.flags,function(e,t){return e.atomicBond.type;}),w(g.a.structureQuery.bondProperty.atomA,function(e,t){return e.atomicBond.a;}),w(g.a.structureQuery.bondProperty.atomB,function(e,t){return e.atomicBond.b;}),w(g.a.structureQuery.bondProperty.length,function(e,t){return e.atomicBond.length;}),w(g.a.internal.generator.bundleElement,function(e,t){return Object(O.bundleElementImpl)(t.groupedUnits(e),t.ranges(e),t.set(e));}),w(g.a.internal.generator.bundle,function(e,t){return Object(O.bundleGenerator)(t.elements(e))(e);}),w(g.a.internal.generator.current,function(e,t){return e.tryGetCurrentSelection();})];function j(e){return function(t,r){return e(r&&r[0]&&r[0](t)||t.element);};}function E(e,t){return e|(v.BondType.isName(t)?v.BondType.fromName(t):0);}function A(e,t){switch(t.toLowerCase()){case\"helix\":return 2|e;case\"alpha\":return 4098|e;case\"pi\":return 32770|e;case\"310\":return 2050|e;case\"beta\":return 4|e;case\"strand\":return 4194308|e;case\"sheet\":return 8388612|e;case\"turn\":return 16|e;case\"bend\":return 8|e;case\"coil\":return 536870912|e;default:return e;}}!function(){for(var e=0,t=P;e<t.length;e++){var r=t[e];l.addSymbol(r);}}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"c\",function(){return c;}),r.d(t,\"b\",function(){return l;});var n,i=r(0),a=r(5),o=r(4),s=r(11);!function(e){e.create=function(){return{updateTransform:!1,updateMatrix:!1,updateColor:!1,updateSize:!1,createGeometry:!1,createNew:!1,info:{}};},e.reset=function(e){e.updateTransform=!1,e.updateMatrix=!1,e.updateColor=!1,e.updateSize=!1,e.createGeometry=!1,e.createNew=!1;};}(n||(n={}));var u={lowestElementCount:5e5,lowerElementCount:2e5,lowElementCount:6e4,mediumElementCount:2e4,highElementCount:2e3,coarseGrainedFactor:10,elementCountFactor:1};function c(e,t){void 0===t&&(t={});var r=Object(i.__assign)(Object(i.__assign)({},u),t),n=e.elementCount*r.elementCountFactor;return e.isCoarseGrained&&(n*=r.coarseGrainedFactor),n>r.lowestElementCount?\"lowest\":n>r.lowerElementCount?\"lower\":n>r.lowElementCount?\"low\":n>r.mediumElementCount?\"medium\":n>r.highElementCount?\"high\":\"higher\";}function l(e,t){var r=Object(a.i)(e.quality,\"auto\"),n=Object(a.i)(e.detail,1),i=Object(a.i)(e.radialSegments,12),u=Object(a.i)(e.linearSegments,8),l=Object(a.i)(e.resolution,2),d=Object(a.i)(e.doubleSided,!0),f=0;switch(\"auto\"===r&&t instanceof o.Structure&&(r=c(t.root),f=s.b.volume(t.boundary.box)),r){case\"highest\":n=3,i=36,u=18,l=Math.max(f/5e8,.1),d=!0;break;case\"higher\":n=3,i=28,u=14,l=Math.max(f/4e8,.3),d=!0;break;case\"high\":n=2,i=20,u=10,l=Math.max(f/3e8,.5),d=!0;break;case\"medium\":n=1,i=12,u=8,l=Math.max(f/2e8,1),d=!0;break;case\"low\":n=0,i=8,u=3,l=Math.max(f/15e7,2),d=!1;break;case\"lower\":n=0,i=4,u=2,l=Math.max(f/1e8,4),d=!1;break;case\"lowest\":n=0,i=2,u=1,l=Math.max(f/75e6,8),d=!1;}return l=Math.min(l,20),void 0!==e.alpha&&e.alpha<1&&(d=!1),{detail:n,radialSegments:i,linearSegments:u,resolution:l,doubleSided:d};}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return n;});var n,i=r(5),a=r(7);function o(e,t){return{value:e,unit:t};}!function(e){function t(e,t){for(var r=new Float32Array(e.length),n=0,i=e.length;n<i;n++)r[n]=e[t[n]];return r;}e.create=function(e,t,r){var n=!!e[0].cell,a=!!e[0].velocities,o=!!e[0].forces;return{id:i.c.create22(),frames:e,hasCell:n,hasVelocities:a,hasForces:o,deltaTime:t,timeOffset:r};},e.getAtomicConformation=function(e,t){return{id:i.c.create22(),atomId:t,occupancy:a.a.ofConst(1,e.elementCount,a.a.Schema.int),B_iso_or_equiv:a.a.ofConst(0,e.elementCount,a.a.Schema.float),xyzDefined:!0,x:e.x,y:e.y,z:e.z};},e.getAtomicConformationReordered=function(e,r,n){return{id:i.c.create22(),atomId:r,occupancy:a.a.ofConst(1,e.elementCount,a.a.Schema.int),B_iso_or_equiv:a.a.ofConst(0,e.elementCount,a.a.Schema.float),xyzDefined:!0,x:t(e.x,n),y:t(e.y,n),z:t(e.z,n)};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return f;}),r.d(t,\"a\",function(){return ce;}),r.d(t,\"d\",function(){return u.a;}),r.d(t,\"c\",function(){return s;});var n={};r.r(n),r.d(n,\"none\",function(){return S;}),r.d(n,\"all\",function(){return O;}),r.d(n,\"residues\",function(){return x;}),r.d(n,\"chains\",function(){return C;}),r.d(n,\"atoms\",function(){return j;}),r.d(n,\"rings\",function(){return A;}),r.d(n,\"querySelection\",function(){return T;}),r.d(n,\"bondedAtomicPairs\",function(){return D;});var i={};r.r(i),r.d(i,\"wholeResidues\",function(){return V;}),r.d(i,\"includeSurroundings\",function(){return U;}),r.d(i,\"querySelection\",function(){return z;}),r.d(i,\"intersectBy\",function(){return H;}),r.d(i,\"exceptBy\",function(){return G;}),r.d(i,\"union\",function(){return q;}),r.d(i,\"expandProperty\",function(){return W;}),r.d(i,\"includeConnected\",function(){return Q;});var a={};r.r(a),r.d(a,\"pick\",function(){return ee;}),r.d(a,\"first\",function(){return te;}),r.d(a,\"getCurrentStructureProperties\",function(){return re;}),r.d(a,\"withSameAtomProperties\",function(){return ne;}),r.d(a,\"areIntersectedBy\",function(){return ie;}),r.d(a,\"within\",function(){return ae;}),r.d(a,\"isConnectedTo\",function(){return oe;});var o={};r.r(o),r.d(o,\"merge\",function(){return se;}),r.d(o,\"intersect\",function(){return ue;});var s,u=r(38),c=r(27),l=r(83),d=r(267),f=function(){function e(e,t){this.currentElementStack=[],this.currentAtomicBondStack=[],this.currentStructureStack=[],this.inputStructureStack=[],this.timeCreated=Object(l.b)(),this.element=c.d.Location.create(void 0),this.currentStructure=void 0,this.atomicBond=new p(),this.currentSelection=void 0,this.inputStructure=e,this.timeoutMs=t&&t.timeoutMs||0,this.currentSelection=t&&t.currentSelection;}return e.prototype.pushCurrentElement=function(){return this.currentElementStack[this.currentElementStack.length]=this.element,this.element=c.d.Location.create(void 0),this.element;},e.prototype.popCurrentElement=function(){this.element=this.currentElementStack.pop();},e.prototype.pushCurrentBond=function(){return this.atomicBond&&this.currentAtomicBondStack.push(this.atomicBond),this.atomicBond=new p(),this.atomicBond;},e.prototype.popCurrentBond=function(){this.currentAtomicBondStack.length>0?this.atomicBond=this.currentAtomicBondStack.pop():this.atomicBond=void 0;},e.prototype.pushCurrentStructure=function(){this.currentStructure&&this.currentStructureStack.push(this.currentStructure);},e.prototype.popCurrentStructure=function(){this.currentStructureStack.length?this.currentStructure=this.currentStructureStack.pop():this.currentStructure=void 0;},e.prototype.pushInputStructure=function(e){this.inputStructureStack.push(this.inputStructure),this.inputStructure=e;},e.prototype.popInputStructure=function(){if(0===this.inputStructureStack.length)throw new Error(\"Must push before pop.\");this.inputStructure=this.inputStructureStack.pop();},e.prototype.throwIfTimedOut=function(){if(0!==this.timeoutMs&&Object(l.b)()-this.timeCreated>this.timeoutMs)throw new Error(\"The query took too long to execute (> \"+this.timeoutMs/1e3+\"s).\");},e.prototype.tryGetCurrentSelection=function(){if(!this.currentSelection)throw new Error(\"The current selection is not assigned.\");return this.currentSelection;},e;}(),p=function(){function e(){this.a=c.d.Location.create(void 0),this.aIndex=0,this.b=c.d.Location.create(void 0),this.bIndex=0,this.type=0,this.order=0,this.testFn=d.defaultBondTest;}return e.prototype.setStructure=function(e){this.a.structure=e,this.b.structure=e;},e.prototype.setTestFn=function(e){this.testFn=e||d.defaultBondTest;},e.prototype.test=function(e,t){return!!this.testFn(e)||!!t&&(this.swap(),this.testFn(e));},e.prototype.swap=function(){var e=this.aIndex;this.aIndex=this.bIndex,this.bIndex=e;var t=this.a.unit;this.a.unit=this.b.unit,this.b.unit=t;var r=this.a.element;this.a.element=this.b.element,this.b.element=r;},Object.defineProperty(e.prototype,\"length\",{get:function get(){return c.d.Location.distance(this.a,this.b);},enumerable:!1,configurable:!0}),e;}();(s||(s={})).run=function(e,t,r){return e(new f(t,r));};var m=r(0),h=r(6),g=r(55),v=r(156),b=function(){function e(e){this.source=e,this.set=Object(g.a)(c.c.hashCode,c.c.areUnitAndIndicesEqual),this.structures=[],this.allSingletons=!0;}return e.prototype.add=function(e){e.elementCount&&(1!==e.elementCount&&(this.allSingletons=!1),this.set.add(e)&&(this.structures[this.structures.length]=e));},e.prototype.getSelection=function(){return this.allSingletons?u.a.Singletons(this.source,Object(v.e)(this.source,this.structures)):u.a.Sequence(this.source,this.structures);},e;}(),y=function(){function e(e){this.source=e,this.builders=[],this.builderMap=new Map();}return e.prototype.add=function(e,t,r){var n=this.builderMap.get(e);n||(n=this.source.subsetBuilder(!0),this.builders[this.builders.length]=n,this.builderMap.set(e,n)),n.addToUnit(t,r);},e.prototype.allSingletons=function(){for(var e=0,t=this.builders.length;e<t;e++)if(this.builders[e].elementCount>1)return!1;return!0;},e.prototype.singletonSelection=function(){for(var e=this.source.subsetBuilder(!0),t=c.d.Location.create(this.source),r=0,n=this.builders.length;r<n;r++)this.builders[r].setSingletonLocation(t),e.addToUnit(t.unit.id,t.element);return u.a.Singletons(this.source,e.getStructure());},e.prototype.fullSelection=function(){for(var e=new Array(this.builders.length),t=0,r=this.builders.length;t<r;t++)e[t]=this.builders[t].getStructure();return u.a.Sequence(this.source,e);},e.prototype.getSelection=function(){return 0===this.builders.length?u.a.Empty(this.source):this.allSingletons()?this.singletonSelection():this.fullSelection();},e;}(),_=r(112),S=function S(e){return u.a.Sequence(e.inputStructure,[]);},O=function O(e){return u.a.Singletons(e.inputStructure,e.inputStructure);};function x(e){return j(Object(m.__assign)(Object(m.__assign)({},e),{groupBy:function groupBy(e){return c.e.residue.key(e.element);}}));}function C(e){return j(Object(m.__assign)(Object(m.__assign)({},e),{groupBy:function groupBy(e){return c.e.chain.key(e.element);}}));}function w(e){return!0;}function P(e){return 0;}function j(e){if(!(e&&(e.atomTest||e.residueTest||e.chainTest||e.entityTest||e.unitTest||e.groupBy)))return O;if(e.atomTest&&!e.residueTest&&!e.chainTest&&!e.entityTest&&!e.unitTest&&!e.groupBy)return t=e.atomTest,function(e){var r=e.inputStructure,n=r.units,i=e.pushCurrentElement(),a=r.subsetBuilder(!0);i.structure=r;for(var o=0,s=n;o<s.length;o++){var c=s[o];i.unit=c;var l=c.elements;a.beginUnit(c.id);for(var d=0,f=l.length;d<f;d++)i.element=l[d],t(e)&&a.addElement(i.element);a.commitUnit(),e.throwIfTimedOut();}return e.popCurrentElement(),u.a.Singletons(r,a.getStructure());};var t,r={unitTest:e.unitTest||w,entityTest:e.entityTest||w,chainTest:e.chainTest||w,residueTest:e.residueTest||w,atomTest:e.atomTest||w,groupBy:e.groupBy||P};return e.groupBy?function(e){var t=e.unitTest,r=e.entityTest,n=e.chainTest,i=e.residueTest,a=e.atomTest,o=e.groupBy;return function(e){var s=e.inputStructure,u=s.units,c=e.pushCurrentElement(),l=new y(s);c.structure=s;for(var d=0,f=u;d<f.length;d++){var p=f[d];if(c.unit=p,t(e)){var m=p.elements,g=p.model;if(0===p.kind)for(var v=h.Segmentation.transientSegments(g.atomicHierarchy.chainAtomSegments,m),b=h.Segmentation.transientSegments(g.atomicHierarchy.residueAtomSegments,m);v.hasNext;){var _=v.move();if(c.element=m[_.start],r(e)&&n(e))for(b.setSegment(_);b.hasNext;){var S=b.move();if(c.element=m[S.start],i(e))for(var O=S.start,x=S.end;O<x;O++)c.element=m[O],a(e)&&l.add(o(e),p.id,c.element);}}else{var C=g.coarseHierarchy.spheres.chainElementSegments;for(v=h.Segmentation.transientSegments(C,m);v.hasNext;){_=v.move();if(c.element=m[_.start],r(e)&&n(e))for(O=_.start,x=_.end;O<x;O++)c.element=m[O],i(e)&&l.add(o(e),p.id,c.element);}}e.throwIfTimedOut();}}return e.popCurrentElement(),l.getSelection();};}(r):function(e){var t=e.unitTest,r=e.entityTest,n=e.chainTest,i=e.residueTest,a=e.atomTest;return function(e){var o=e.inputStructure,s=o.units,c=e.pushCurrentElement(),l=o.subsetBuilder(!0);c.structure=o;for(var d=0,f=s;d<f.length;d++){var p=f[d];if(c.unit=p,t(e)){var m=p.elements,g=p.model;if(l.beginUnit(p.id),0===p.kind)for(var v=h.Segmentation.transientSegments(p.model.atomicHierarchy.chainAtomSegments,m),b=h.Segmentation.transientSegments(p.model.atomicHierarchy.residueAtomSegments,m);v.hasNext;){var y=v.move();if(c.element=m[y.start],r(e)&&n(e))for(b.setSegment(y);b.hasNext;){var _=b.move();if(c.element=m[_.start],i(e))for(var S=_.start,O=_.end;S<O;S++)c.element=m[S],a(e)&&l.addElement(c.element);}}else{var x=g.coarseHierarchy.spheres.chainElementSegments;for(v=h.Segmentation.transientSegments(x,m);v.hasNext;){y=v.move();if(c.element=m[y.start],r(e)&&n(e))for(S=y.start,O=y.end;S<O;S++)c.element=m[S],i(e)&&l.addElement(c.element);}}l.commitUnit(),e.throwIfTimedOut();}}return e.popCurrentElement(),u.a.Singletons(o,l.getStructure());};}(r);}function E(e,t,r){for(var n=new Int32Array(t.length),i=0,a=t.length;i<a;i++)n[i]=e.elements[t[i]];return _.a.create([e.getChild(h.SortedArray.ofSortedArray(n))],{parent:r});}function A(e,t){return function(r){var n=r.inputStructure.units,i=u.a.LinearBuilder(r.inputStructure);if(e&&0!==e.length){for(var a=g.c.create(),o=0;o<e.length;o++)g.c.add(a,e[o],e[o]);for(var s=0,l=n;s<l.length;s++){_=l[s];if(c.g.isAtomic(_))for(var d=_.rings,f=0,p=a.array;f<p.length;f++){var m=p[f];if(d.byFingerprint.has(m))for(var h=0,v=d.byFingerprint.get(m);h<v.length;h++){x=v[h];t&&!d.aromaticRings.includes(x)||i.add(E(_,d.all[x],r.inputStructure));}}}}else for(var b=0,y=n;b<y.length;b++){var _=y[b];if(c.g.isAtomic(_))if(t)for(var S=0,O=_.rings.aromaticRings;S<O.length;S++){var x=O[S];i.add(E(_,_.rings.all[x],r.inputStructure));}else for(var C=0,w=_.rings.all;C<w.length;C++){var x=w[C];i.add(E(_,x,r.inputStructure));}}return i.getSelection();};}function T(e,t,r){return void 0===r&&(r=!1),function(n){var i=e(n);if(0===u.a.structureCount(i))return i;var a=r?Object(v.d)(n.inputStructure,u.a.unionStructure(i)):u.a.unionStructure(i);if(0===a.elementCount)return u.a.Empty(n.inputStructure);n.throwIfTimedOut(),n.pushInputStructure(a);var o=t(n);return n.popInputStructure(),u.a.withInputStructure(o,n.inputStructure);};}function D(e){return function(t){var r=t.inputStructure,n=r.interUnitBonds,i=u.a.UniqueBuilder(t.inputStructure);t.pushCurrentBond();var a=t.atomicBond;a.setTestFn(e),a.setStructure(r);for(var o=0,s=r.units;o<s.length;o++){var c=s[o];if(0===c.kind){var l=c.bonds,d=l.offset,f=l.b,p=l.edgeProps,m=p.flags,h=p.order;a.a.unit=c,a.b.unit=c;for(var g=0,v=c.elements.length;g<v;g++){a.aIndex=g,a.a.element=c.elements[g];for(var b=d[g],y=d[g+1];b<y;b++){if(a.bIndex=f[b],a.b.element=c.elements[f[b]],a.type=m[b],a.order=h[b],a.test(t,!1))(O=r.subsetBuilder(!1)).beginUnit(c.id),O.addElement(a.a.element),O.addElement(a.b.element),O.commitUnit(),i.add(O.getStructure());}}}}for(var _=0,S=n.edges;_<S.length;_++){var O,x=S[_];if(a.a.unit=x.unitA,a.a.element=x.unitA.elements[x.indexA],a.aIndex=x.indexA,a.b.unit=x.unitB,a.b.element=x.unitB.elements[x.indexB],a.bIndex=x.indexB,a.order=x.props.order,a.type=x.props.flag,a.test(t,!1))(O=r.subsetBuilder(!1)).addToUnit(a.a.unit.id,a.a.element),O.addToUnit(a.b.unit.id,a.b.element),i.add(O.getStructure());}return t.popCurrentBond(),i.getSelection();};}var I=r(9),M=r(239),k=function(){function e(e){this.parent=e,this.ids=[],this.unitMap=h.IntMap.Mutable(),this.parentId=-1,this.currentUnit=g.c.create(),this.elementCount=0;}return e.prototype.addToUnit=function(e,t){var r=this.unitMap.get(e);if(r)g.c.add(r,t,t)&&this.elementCount++;else{var n=g.c.create();g.c.add(n,t,t),this.unitMap.set(e,n),this.ids[this.ids.length]=e,this.elementCount++;}},e.prototype.has=function(e,t){var r=this.unitMap.get(e);return!!r&&g.c.has(r,t);},e.prototype.beginUnit=function(e){this.parentId=e,this.unitMap.has(e)?this.currentUnit=this.unitMap.get(e):this.currentUnit=this.currentUnit.array.length>0?g.c.create():this.currentUnit;},e.prototype.addElement=function(e){g.c.add(this.currentUnit,e,e)&&this.elementCount++;},e.prototype.commitUnit=function(){0===this.currentUnit.array.length||this.unitMap.has(this.parentId)||(this.ids[this.ids.length]=this.parentId,this.unitMap.set(this.parentId,this.currentUnit),this.parentId=-1);},e.prototype.getStructure=function(){if(this.isEmpty)return _.a.Empty;var e=[];Object(I.q)(this.ids);for(var t=M.a.UnitEquivalenceBuilder(),r=0,n=this.ids.length;r<n;r++){var i=this.ids[r],a=this.parent.unitMap.get(i),o=this.unitMap.get(i).array,s=o.length;if(o.length!==a.elements.length){s>1&&Object(I.q)(o);var u=a.getChild(h.SortedArray.ofSortedArray(o)),c=t.add(u.id,u);u!==c&&(u=c.applyOperator(u.id,u.conformation.operator,!0)),e[e.length]=u;}else e[e.length]=a,t.add(a.id,a);}return _.a.create(e,{parent:this.parent});},Object.defineProperty(e.prototype,\"isEmpty\",{get:function get(){return 0===this.elementCount;},enumerable:!1,configurable:!0}),e;}();function B(e,t,r){for(var n=t.subsetBuilder(!0),i=0,a=r.units;i<a.length;i++){var o=a[i];if(0===o.kind){var s=o.model.atomicHierarchy.residueAtomSegments,u=o.elements;n.beginUnit(o.id);for(var c=h.Segmentation.transientSegments(s,u);c.hasNext;)for(var l=c.move().index,d=s.offsets[l],f=s.offsets[l+1];d<f;d++)n.addElement(d);n.commitUnit(),e.throwIfTimedOut();}else n.setUnit(o.id,o.elements);}return n.getStructure();}function V(e){return function(t){var r=e(t);if(u.a.isSingleton(r))return u.a.Singletons(t.inputStructure,B(t,t.inputStructure,r.structure));for(var n=new b(t.inputStructure),i=0,a=r.structures;i<a.length;i++){var o=a[i];n.add(B(t,t.inputStructure,o));}return n.getSelection();};}function R(e,t,r,n){for(var i=new k(t),a=t.lookup3d,o=n.radius,s=0,u=r.units;s<u.length;s++){for(var c=u[s],l=c.conformation,d=l.x,f=l.y,p=l.z,m=c.elements,h=0,g=m.length;h<g;h++){var v=m[h];a.findIntoBuilder(d(v),f(v),p(v),o,i);}e.throwIfTimedOut();}return n.wholeResidues?B(e,t,i.getStructure()):i.getStructure();}function L(e,t,r,n){var i=new k(t),a=t.lookup3d,o=n.elementRadius,s=n.elementRadiusClosure,u=n.sourceMaxRadius,c=n.radius;e.pushCurrentElement(),e.element.structure=r;for(var l=0,d=r.units;l<d.length;l++){var f=d[l];e.element.unit=f;for(var p=f.conformation,m=p.x,h=p.y,g=p.z,v=f.elements,b=0,y=v.length;b<y;b++){var _=v[b];e.element.element=_;var S=o(e);a.findIntoBuilderWithRadius(m(_),h(_),g(_),S,u,c,s,i);}e.throwIfTimedOut();}return e.popCurrentElement(),n.wholeResidues?B(e,t,i.getStructure()):i.getStructure();}function N(e,t){return function(r){return e.element.structure=r.structure,e.element.unit=r.unit,e.element.element=r.element,t(e);};}function F(e,t){var r=0;e.element.structure=e.inputStructure;for(var n=0,i=e.inputStructure.units;n<i.length;n++){var a=i[n];e.element.unit=a;for(var o=a.elements,s=0,u=o.length;s<u;s++){var c=o[s];e.element.element=c;var l=t(e);l>r&&(r=l);}}return e.throwIfTimedOut(),r;}function U(e,t){return function(r){var n=e(r);if(t.elementRadius){var i=Object(m.__assign)(Object(m.__assign)({},t),{elementRadius:t.elementRadius,elementRadiusClosure:N(r,t.elementRadius),sourceMaxRadius:F(r,t.elementRadius)});if(u.a.isSingleton(n)){var a=L(r,r.inputStructure,n.structure,i);return u.a.Singletons(r.inputStructure,a);}for(var o=new b(r.inputStructure),s=0,c=n.structures;s<c.length;s++){var l=c[s];o.add(L(r,r.inputStructure,l,i));}return o.getSelection();}if(u.a.isSingleton(n)){a=R(r,r.inputStructure,n.structure,t);return u.a.Singletons(r.inputStructure,a);}o=new b(r.inputStructure);for(var d=0,f=n.structures;d<f.length;d++){l=f[d];o.add(R(r,r.inputStructure,l,t));}return o.getSelection();};}function z(e,t){return function(r){var n=e(r);if(0===u.a.structureCount(n))return n;var i=u.a.UniqueBuilder(r.inputStructure),a=function a(e){return i.add(e);};return u.a.forEach(n,function(e,n){r.pushInputStructure(e),u.a.forEach(t(r),a),r.popInputStructure(),n%10==0&&r.throwIfTimedOut();}),i.getSelection();};}function H(e,t){return function(r){var n=e(r);if(0===u.a.structureCount(n))return n;var i=t(r);if(0===u.a.structureCount(i))return u.a.Empty(r.inputStructure);var a=u.a.unionStructure(i),o=u.a.UniqueBuilder(r.inputStructure);return u.a.forEach(n,function(e,t){var n=Object(v.c)(a,e);0!==n.elementCount&&o.add(n),t%50==0&&r.throwIfTimedOut();}),o.getSelection();};}function G(e,t){return function(r){var n=e(r);if(0===u.a.structureCount(n))return n;var i=t(r);if(0===u.a.structureCount(i))return n;var a=u.a.unionStructure(i),o=u.a.UniqueBuilder(r.inputStructure);return u.a.forEach(n,function(e,t){var n=Object(v.d)(e,a);0!==n.elementCount&&o.add(n),t%50==0&&r.throwIfTimedOut();}),o.getSelection();};}function q(e){return function(t){var r=u.a.LinearBuilder(t.inputStructure);return r.add(u.a.unionStructure(e(t))),r.getSelection();};}function W(e,t){return function(r){var n=e(r),i=new Map(),a=[];r.pushCurrentElement(),u.a.forEach(n,function(e,n){r.element.structure=e;for(var o=0,s=e.units;o<s.length;o++){var u=s[o];r.element.unit=u;for(var c=u.elements,l=0,d=c.length;l<d;l++){r.element.element=c[l];var f=t(r),p=void 0;i.has(f)?p=i.get(f):(p=g.c.create(),i.set(f,p)),g.c.add(p,n,n);}}a[n]=r.inputStructure.subsetBuilder(!0),n%10==0&&r.throwIfTimedOut();}),r.element.structure=r.inputStructure;for(var o=0,s=r.inputStructure.units;o<s.length;o++){var c=s[o];r.element.unit=c;for(var l=c.elements,d=0,f=l.length;d<f;d++){r.element.element=l[d];var p=t(r);if(i.has(p))for(var m=i.get(p).array,h=0,v=m.length;h<v;h++)a[m[h]].addToUnit(c.id,l[d]);}}r.popCurrentElement();for(var b=u.a.UniqueBuilder(r.inputStructure),y=0,_=a;y<_.length;y++){var S=_[y];b.add(S.getStructure());}return b.getSelection();};}function Q(e){var t=e.query,r=e.layerCount,n=e.wholeResidues,i=e.bondTest,a=Math.max(r,0);return function(e){var r=u.a.UniqueBuilder(e.inputStructure),o=t(e);return e.pushCurrentBond(),e.atomicBond.setTestFn(i),u.a.forEach(o,function(t,i){for(var o=t,s=0;s<a;s++)o=Y(e,n,o);r.add(o),i%10==0&&e.throwIfTimedOut();}),e.popCurrentBond(),r.getSelection();};}function Y(e,t,r){var n=function(e,t){for(var r=e.inputStructure,n=r.interUnitBonds,i=new k(r),a=e.atomicBond,o=0,s=t.units;o<s.length;o++){var u=s[o];if(0===u.kind){var c=r.unitMap.get(u.id),l=c.bonds,d=l.offset,f=l.b,p=l.edgeProps,m=p.flags,g=p.order;a.setStructure(r),a.a.unit=c,a.b.unit=c;for(I=0,M=u.elements.length;I<M;I++){i.addToUnit(u.id,u.elements[I]);for(var v=h.SortedArray.indexOf(c.elements,u.elements[I]),b=d[v],y=d[v+1];b<y;b++){var _=f[b],S=c.elements[_];h.SortedArray.has(u.elements,S)||i.has(u.id,S)||(a.aIndex=v,a.a.element=u.elements[I],a.bIndex=_,a.b.element=S,a.type=m[b],a.order=g[b],a.test(e,!0)&&i.addToUnit(u.id,S));}}for(var O=0,x=n.getConnectedUnits(c);O<x.length;O++)for(var C=x[O],w=t.unitMap.get(C.unitB.id),P=0,j=C.connectedIndices;P<j.length;P++){var E=j[P];if(h.SortedArray.has(u.elements,c.elements[E]))for(var A=0,T=C.getEdges(E);A<T.length;A++){var D=T[A];S=C.unitB.elements[D.indexB];w&&h.SortedArray.has(w.elements,S)||i.has(C.unitB.id,S)||(a.a.unit=c,a.aIndex=E,a.a.element=c.elements[E],a.b.unit=C.unitB,a.bIndex=D.indexB,a.b.element=S,a.type=D.props.flag,a.order=D.props.order,a.test(e,!0)&&i.addToUnit(C.unitB.id,S));}}}else{i.beginUnit(u.id);for(var I=0,M=u.elements.length;I<M;I++)i.addElement(u.elements[I]);i.commitUnit();}}return i.getStructure();}(e,r);return t?B(e,e.inputStructure,n):n;}var X,K,Z,J=r(90),$=r(1);function ee(e,t){return function(r){var n=e(r),i=u.a.LinearBuilder(r.inputStructure);return r.pushCurrentElement(),u.a.forEach(n,function(e,n){r.currentStructure=e,t(r)&&i.add(e),n%100&&r.throwIfTimedOut();}),r.popCurrentStructure(),i.getSelection();};}function te(e){return function(t){var r=e(t),n=u.a.LinearBuilder(t.inputStructure);if(\"singletons\"===r.kind){if(r.structure.elementCount>0){var i=r.structure.units[0],a=_.a.create([i.getChild(h.SortedArray.ofSingleton(i.elements[0]))],{parent:t.inputStructure});n.add(a);}}else r.structures.length>0&&n.add(r.structures[0]);return n.getSelection();};}function re(e,t,r){var n=e.currentStructure.units,i=e.pushCurrentElement();i.structure=e.currentStructure;for(var a=0,o=n;a<o.length;a++){var s=o[a];i.unit=s;var u=s.elements,l=void 0;if(l=c.g.isAtomic(s)?t.atomic:t.coarse){for(var d=0,f=u.length;d<f;d++)i.element=u[d],r.add(l(e));e.throwIfTimedOut();}}return e.popCurrentElement(),r;}function ne(e,t,r){return function(n){var i=e(n),a=function(e,t,r){var n=new Set(),i=t(e);return e.pushCurrentElement(),u.a.forEach(i,function(t,i){e.currentStructure=t,re(e,r,n),i%10&&e.throwIfTimedOut();}),e.popCurrentElement(),n;}(n,t,r),o=u.a.LinearBuilder(n.inputStructure);return n.pushCurrentStructure(),u.a.forEach(i,function(e,t){n.currentStructure=e;var i=re(n,r,new Set());J.a.isSuperset(i,a)&&o.add(e),t%10&&n.throwIfTimedOut();}),n.popCurrentStructure(),o.getSelection();};}function ie(e,t){return function(r){var n=u.a.unionStructure(t(r)),i=u.a.LinearBuilder(r.inputStructure);return u.a.forEach(e(r),function(e,t){Object(v.b)(n,e)&&i.add(e),t%10&&r.throwIfTimedOut();}),i.getSelection();};}function ae(e){return function(t){var r={queryCtx:t,selection:e.query(t),target:e.target(t),maxRadius:e.maxRadius,minRadius:e.minRadius?Math.max(0,e.minRadius):0,elementRadius:e.elementRadius,invert:!!e.invert};return 0===r.minRadius&&void 0===e.minRadius?function(e){var t=e.queryCtx,r=e.selection,n=e.target,i=e.maxRadius,a=e.invert,o=u.a.unionStructure(n).lookup3d,s=u.a.LinearBuilder(t.inputStructure),c=$.Vec3.zero();return u.a.forEach(r,function(e,r){for(var n=e.units,u=!1,l=0,d=n.length;l<d;l++){for(var f=n[l],p=f.elements,m=f.conformation,h=m.position,g=m.r,v=0,b=p.length;v<b;v++){var y=p[v];if(h(y,c),o.check(c[0],c[1],c[2],i+g(y))){u=!0;break;}}if(u)break;}a&&(u=!u),u&&s.add(e),r%10==0&&t.throwIfTimedOut();}),s.getSelection();}(r):0===r.minRadius?function(e){var t=e.queryCtx,r=e.selection,n=e.target,i=e.maxRadius,a=e.invert,o=e.elementRadius,s=u.a.unionStructure(n),c=u.a.LinearBuilder(t.inputStructure);return t.pushCurrentElement(),u.a.forEach(r,function(e,r){var n=function(e,t,r,n,i){return 0===t.elementCount||0===r.elementCount||(t.elementCount<=r.elementCount?K.check(e,t,r,n,i):K.check(e,r,t,n,i));}(t,s,e,i,o);a&&(n=!n),n&&c.add(e),r%10==0&&t.throwIfTimedOut();}),t.popCurrentElement(),c.getSelection();}(r):function(e){var t=e.queryCtx,r=e.selection,n=e.target,i=e.minRadius,a=e.maxRadius,o=e.invert,s=e.elementRadius,c=u.a.unionStructure(n),l=u.a.LinearBuilder(t.inputStructure);return t.pushCurrentElement(),u.a.forEach(r,function(e,r){var n=function(e,t,r,n,i,a){return 0===t.elementCount||0===r.elementCount||(t.elementCount<=r.elementCount?X.check(e,t,r,n,i,a):X.check(e,r,t,n,i,a));}(t,c,e,i,a,s);o&&(n=!n),n&&l.add(e),r%10==0&&t.throwIfTimedOut();}),t.popCurrentElement(),l.getSelection();}(r);};}function oe(e){var t=e.query,r=e.target,n=e.disjunct,i=e.invert,a=e.bondTest;return function(e){var o=r(e);if(u.a.isEmpty(o))return o;var s=t(e);if(u.a.isEmpty(s))return s;var l={queryCtx:e,input:e.inputStructure,disjunct:n,target:u.a.unionStructure(o)},d=u.a.LinearBuilder(e.inputStructure);return e.pushCurrentBond(),e.atomicBond.setTestFn(a),u.a.forEach(s,function(t,r){!function(e,t){var r=e.queryCtx,n=e.input,i=e.target,a=e.disjunct,o=r.atomicBond,s=n.interUnitBonds;o.setStructure(n);for(var u=0,l=t.units;u<l.length;u++){var d=l[u];if(c.g.isAtomic(d))for(var f=n.unitMap.get(d.id),p=f.bonds,m=p.offset,g=p.b,v=p.edgeProps,b=v.flags,y=v.order,_=s.getConnectedUnits(d),S=_.length,O=d.elements,x=f.elements,C=0,w=O.length;C<w;C++){var P=h.SortedArray.indexOf(x,O[C]);o.a.unit=f,o.b.unit=f;for(var j=m[P],E=m[P+1];j<E;j++)if(o.b.element=f.elements[g[j]],(!a||!h.SortedArray.has(d.elements,o.b.element))&&i.hasElement(o.b)&&(o.aIndex=P,o.a.element=O[C],o.bIndex=g[j],o.type=b[j],o.order=y[j],o.test(r,!0)))return!0;for(var A=0;A<S;A++)for(var T=_[A],D=T.unitB.elements,I=T.getEdges(P),M=0,k=I.length;M<k;M++){var B=I[M];if(o.b.unit=T.unitB,o.b.element=D[B.indexB],i.hasElement(o.b)&&(!a||!t.hasElement(o.b))&&(o.a.unit=f,o.aIndex=P,o.a.element=O[C],o.bIndex=B.indexB,o.type=B.props.flag,o.order=B.props.order,o.test(r,!0)))return!0;}}}return!1;}(l,t)?i&&d.add(t):d.add(t),r%5==0&&e.throwIfTimedOut();}),e.popCurrentBond(),d.getSelection();};}function se(e){return 0===e.length?S:1===e.length?e[0]:function(t){for(var r=u.a.UniqueBuilder(t.inputStructure),n=function n(_n5){u.a.forEach(e[_n5](t),function(e,i){r.add(e),_n5%100&&t.throwIfTimedOut();});},i=0;i<e.length;i++)n(i);return r.getSelection();};}function ue(e){return 0===e.length?S:1===e.length?e[0]:function(t){for(var r=[],n=0;n<e.length;n++)r.push(e[n](t));var i=0,a=u.a.structureCount(r[0]);for(n=1;n<r.length;n++){var o=u.a.structureCount(r[n]);o<a&&(i=n,a=o);}t.throwIfTimedOut();var s=Object(g.a)(function(e){return e.hashCode;},c.c.areUnitAndIndicesEqual);u.a.forEach(r[i],function(e){return s.add(e);});for(var l=u.a.UniqueBuilder(t.inputStructure),d=0;d<r.length;d++)d!==i&&(u.a.forEach(r[d],function(e){s.has(e)&&l.add(e);}),t.throwIfTimedOut());return l.getSelection();};}!function(e){var t=$.Vec3.zero();function r(e,r,n,i,a,o,s){var u=r.elements,c=r.conformation.position,l=t;e.element.unit=r;for(var d=!1,f=0,p=u.length;f<p;f++){var m=u[f];e.element.element=m;var h=Math.max(0,$.Vec3.distance(n,c(m,l))-i-s(e));if(h<a)return 0;h<o&&(d=!0);}return d?1:2;}function n(e,t,n,i,a,o,s){for(var u=t.units,c=!1,l=0,d=u.length;l<d;l++){var f=r(e,u[l],n,i,a,o,s);if(0===f)return 0;1===f&&(c=!0);}return c?1:2;}e.toPoint=n;var i=$.Vec3.zero();e.check=function(e,t,r,a,o,s){if(0===t.elementCount||0===r.elementCount)return 0;var u=t.units,c=!1;e.element.structure=t;for(var l=0,d=u.length;l<d;l++){var f=u[l],p=f.elements,m=f.conformation.position;e.element.unit=f;for(var h=0,g=p.length;h<g;h++){var v=p[h];e.element.element=v;var b=n(e,r,m(v,i),s(e),a,o,s);if(0===b)return 0;1===b&&(c=!0);}}return c;};}(X||(X={})),function(e){var t=$.Vec3.zero();function r(e,r,n,i,a,o){var s=r.elements,u=r.conformation.position,c=t;e.element.unit=r;for(var l=0,d=s.length;l<d;l++){var f=s[l];if(e.element.element=f,Math.max(0,$.Vec3.distance(n,u(f,c))-i-o(e))<=a)return!0;}return!1;}function n(e,t,n,i,a,o){for(var s=t.units,u=0,c=s.length;u<c;u++)if(r(e,s[u],n,i,a,o))return!0;return!1;}e.toPoint=n;var i=$.Vec3.zero();e.check=function(e,t,r,a,o){if(0===t.elementCount||0===r.elementCount)return 0;var s=t.units;e.element.structure=t;for(var u=0,c=s.length;u<c;u++){var l=s[u];e.element.unit=l;for(var d=l.elements,f=l.conformation.position,p=0,m=d.length;p<m;p++){var h=d[p];if(e.element.element=h,n(e,r,f(h,i),o(e),a,o))return!0;}}return!1;};}(K||(K={})),function(e){function t(e){return!0;}function r(e){return!1;}e.eq=function(e,t){return function(r){return e(r)===t;};},e.lt=function(e,t){return function(r){return e(r)<t;};},e.lte=function(e,t){return function(r){return e(r)<=t;};},e.gt=function(e,t){return function(r){return e(r)>t;};},e.gte=function(e,t){return function(r){return e(r)>=t;};},e.inSet=function(e,t){if((a=t)&&a.has)return function(r){return t.has(e(r));};if(0===t.length)return r;for(var n=new Set(),i=0;i<t.length;i++)n.add(t[i]);return function(t){return n.has(e(t));};var a;},e.and=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];switch(e.length){case 0:return t;case 1:return e[0];case 2:var n=e[0],i=e[1];return function(e){return n(e)&&i(e);};case 3:var a=e[0],o=e[1],s=e[2];return function(e){return a(e)&&o(e)&&s(e);};case 4:var u=e[0],c=e[1],l=e[2],d=e[3];return function(e){return u(e)&&c(e)&&l(e)&&d(e);};case 5:var f=e[0],p=e[1],m=e[2],h=e[3],g=e[4];return function(e){return f(e)&&p(e)&&m(e)&&h(e)&&g(e);};case 6:var v=e[0],b=e[1],y=e[2],_=e[3],S=e[4],O=e[5];return function(e){return v(e)&&b(e)&&y(e)&&_(e)&&S(e)&&O(e);};default:var x=e.length;return function(t){for(var r=0;r<x;r++)if(!e[r])return!1;return!0;};}},e.or=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];switch(e.length){case 0:return r;case 1:return e[0];case 2:var n=e[0],i=e[1];return function(e){return n(e)||i(e);};case 3:var a=e[0],o=e[1],s=e[2];return function(e){return a(e)||o(e)||s(e);};case 4:var u=e[0],c=e[1],l=e[2],d=e[3];return function(e){return u(e)||c(e)||l(e)||d(e);};case 5:var f=e[0],p=e[1],m=e[2],h=e[3],g=e[4];return function(e){return f(e)||p(e)||m(e)||h(e)||g(e);};case 6:var v=e[0],b=e[1],y=e[2],_=e[3],S=e[4],O=e[5];return function(e){return v(e)||b(e)||y(e)||_(e)||S(e)||O(e);};default:var x=e.length;return function(t){for(var r=0;r<x;r++)if(e[r])return!0;return!1;};}};}(Z||(Z={}));var ce={generators:n,filters:a,modifiers:i,combinators:o,pred:Z,internal:d};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(21),i=function(e){function t(t,r,n){var i=e.call(this)||this;return i.parent=t,i.outerValue=r,i.outerIndex=n,i.index=0,i;}return n.a(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this);},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe();},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe();},t;}(r(35).a);},function(e,t,r){\"use strict\";var n=r(37),i=r(119),a=r(152),o=r(11);function s(){throw\"Property only available for atomic models.\";}function u(e){if(e)throw\"Property only available for coarse models (\"+e+\").\";throw\"Property only available for coarse models.\";}var c={key:function key(e){return e.element;},x:function x(e){return e.unit.conformation.x(e.element);},y:function y(e){return e.unit.conformation.y(e.element);},z:function z(e){return e.unit.conformation.z(e.element);},id:function id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicConformation.atomId.value(e.element):s();},occupancy:function occupancy(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicConformation.occupancy.value(e.element):s();},B_iso_or_equiv:function B_iso_or_equiv(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicConformation.B_iso_or_equiv.value(e.element):s();},sourceIndex:function sourceIndex(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.sourceIndex.value(e.element):e.element;},type_symbol:function type_symbol(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.type_symbol.value(e.element):s();},label_atom_id:function label_atom_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.label_atom_id.value(e.element):s();},auth_atom_id:function auth_atom_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.auth_atom_id.value(e.element):s();},label_alt_id:function label_alt_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.label_alt_id.value(e.element):s();},label_comp_id:l,auth_comp_id:function auth_comp_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.auth_comp_id.value(e.unit.residueIndex[e.element]):s();},pdbx_formal_charge:function pdbx_formal_charge(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.atoms.pdbx_formal_charge.value(e.element):s();},vdw_radius:function vdw_radius(e){return n.a.isAtomic(e.unit)?Object(i.VdwRadius)(e.unit.model.atomicHierarchy.atoms.type_symbol.value(e.element)):s();}};function l(e){return n.a.isAtomic(e.unit)||s(),e.unit.model.atomicHierarchy.atoms.label_comp_id.value(e.element);}function d(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.residues.label_seq_id.value(e.unit.residueIndex[e.element]):s();}function f(e){n.a.isAtomic(e.unit)||s();var t=e.unit.model.sequence.byEntityKey[p(e)];return t&&t.sequence.microHet.get(d(e))||[l(e)];}function p(e){switch(e.unit.kind){case 0:return e.unit.model.atomicHierarchy.index.getEntityFromChain(e.unit.chainIndex[e.element]);case 1:return e.unit.model.coarseHierarchy.spheres.entityKey[e.element];case 2:return e.unit.model.coarseHierarchy.gaussians.entityKey[e.element];}}var m=[],h={constant:{true:function _true(e){return!0;},false:function _false(e){return!1;},zero:function zero(e){return 0;}},atom:c,residue:{key:function key(e){return n.a.isAtomic(e.unit)?e.unit.residueIndex[e.element]:s();},group_PDB:function group_PDB(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.residues.group_PDB.value(e.unit.residueIndex[e.element]):s();},label_seq_id:d,auth_seq_id:function auth_seq_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.residues.auth_seq_id.value(e.unit.residueIndex[e.element]):s();},pdbx_PDB_ins_code:function pdbx_PDB_ins_code(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.residues.pdbx_PDB_ins_code.value(e.unit.residueIndex[e.element]):s();},isNonStandard:function isNonStandard(e){return n.a.isAtomic(e.unit)?f(e).some(function(t){return\"y\"!==e.unit.model.properties.chemicalComponentMap.get(t).mon_nstd_flag[0];}):s();},hasMicroheterogeneity:function hasMicroheterogeneity(e){n.a.isAtomic(e.unit)||s();var t=e.unit.model.sequence.byEntityKey[p(e)];return t&&t.sequence.microHet.has(d(e));},microheterogeneityCompIds:f,secondary_structure_type:function secondary_structure_type(e){var t,r;n.a.isAtomic(e.unit)||s();var i=null===(t=a.a.get(e.structure).value)||void 0===t?void 0:t.get(e.unit.id);return null!==(r=null==i?void 0:i.type[e.unit.residueIndex[e.element]])&&void 0!==r?r:536870912;},secondary_structure_key:function secondary_structure_key(e){var t,r;n.a.isAtomic(e.unit)||s();var i=null===(t=a.a.get(e.structure).value)||void 0===t?void 0:t.get(e.unit.id);return null!==(r=null==i?void 0:i.key[e.unit.residueIndex[e.element]])&&void 0!==r?r:-1;},chem_comp_type:function chem_comp_type(e){return n.a.isAtomic(e.unit)?e.unit.model.properties.chemicalComponentMap.get(l(e)).type:s();}},chain:{key:function key(e){return n.a.isAtomic(e.unit)?e.unit.chainIndex[e.element]:s();},label_asym_id:function label_asym_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.chains.label_asym_id.value(e.unit.chainIndex[e.element]):s();},auth_asym_id:function auth_asym_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.chains.auth_asym_id.value(e.unit.chainIndex[e.element]):s();},label_entity_id:function label_entity_id(e){return n.a.isAtomic(e.unit)?e.unit.model.atomicHierarchy.chains.label_entity_id.value(e.unit.chainIndex[e.element]):s();}},entity:{key:p,id:function id(e){return e.unit.model.entities.data.id.value(p(e));},type:function type(e){return e.unit.model.entities.data.type.value(p(e));},src_method:function src_method(e){return e.unit.model.entities.data.src_method.value(p(e));},pdbx_description:function pdbx_description(e){return e.unit.model.entities.data.pdbx_description.value(p(e));},formula_weight:function formula_weight(e){return e.unit.model.entities.data.formula_weight.value(p(e));},pdbx_number_of_molecules:function pdbx_number_of_molecules(e){return e.unit.model.entities.data.pdbx_number_of_molecules.value(p(e));},details:function details(e){return e.unit.model.entities.data.details.value(p(e));},pdbx_mutation:function pdbx_mutation(e){return e.unit.model.entities.data.pdbx_mutation.value(p(e));},pdbx_fragment:function pdbx_fragment(e){return e.unit.model.entities.data.pdbx_fragment.value(p(e));},pdbx_ec:function pdbx_ec(e){return e.unit.model.entities.data.pdbx_ec.value(p(e));},subtype:function subtype(e){return e.unit.model.entities.subtype.value(p(e));},prd_id:function prd_id(e){return e.unit.model.entities.prd_id.value(p(e));}},unit:{id:function id(e){return e.unit.id;},chainGroupId:function chainGroupId(e){return e.unit.chainGroupId;},multiChain:function multiChain(e){return n.a.Traits.is(e.unit.traits,1);},object_primitive:function object_primitive(e){return e.unit.objectPrimitive;},operator_name:function operator_name(e){return e.unit.conformation.operator.name;},model_index:function model_index(e){return e.unit.model.modelNum;},model_label:function model_label(e){return e.unit.model.label;},model_entry_id:function model_entry_id(e){return e.unit.model.entryId;},hkl:function hkl(e){return e.unit.conformation.operator.hkl;},spgrOp:function spgrOp(e){return e.unit.conformation.operator.spgrOp;},model_num:function model_num(e){return e.unit.model.modelNum;},pdbx_struct_assembly_id:function pdbx_struct_assembly_id(e){var t;return(null===(t=e.unit.conformation.operator.assembly)||void 0===t?void 0:t.id)||o.h.DefaultName;},pdbx_struct_oper_list_ids:function pdbx_struct_oper_list_ids(e){var t;return(null===(t=e.unit.conformation.operator.assembly)||void 0===t?void 0:t.operList)||m;},struct_ncs_oper_id:function struct_ncs_oper_id(e){return e.unit.conformation.operator.ncsId;}},coarse:{key:c.key,entityKey:function entityKey(e){return n.a.isCoarse(e.unit)?e.unit.coarseElements.entityKey[e.element]:u();},x:c.x,y:c.y,z:c.z,asym_id:function asym_id(e){return n.a.isCoarse(e.unit)?e.unit.coarseElements.asym_id.value(e.element):u();},seq_id_begin:function seq_id_begin(e){return n.a.isCoarse(e.unit)?e.unit.coarseElements.seq_id_begin.value(e.element):u();},seq_id_end:function seq_id_end(e){return n.a.isCoarse(e.unit)?e.unit.coarseElements.seq_id_end.value(e.element):u();},sphere_radius:function sphere_radius(e){return n.a.isSpheres(e.unit)?e.unit.coarseConformation.radius[e.element]:u(\"spheres\");},sphere_rmsf:function sphere_rmsf(e){return n.a.isSpheres(e.unit)?e.unit.coarseConformation.rmsf[e.element]:u(\"spheres\");},gaussian_weight:function gaussian_weight(e){return n.a.isGaussians(e.unit)?e.unit.coarseConformation.weight[e.element]:u(\"gaussians\");},gaussian_covariance_matrix:function gaussian_covariance_matrix(e){return n.a.isGaussians(e.unit)?e.unit.coarseConformation.covariance_matrix[e.element]:u(\"gaussians\");}}};t.a=h;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(21),i=r(35);function a(e,t){return function(r){return r.lift(new o(e,t));};}var o=function(){function e(e,t){this.predicate=e,this.thisArg=t;}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg));},e;}(),s=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.count=0,i;}return n.a(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++);}catch(e){return void this.destination.error(e);}t&&this.destination.next(e);},t;}(i.a);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PluginBehavior\",function(){return u.a;}),r.d(t,\"BuiltInPluginBehaviors\",function(){return _t;}),r.d(t,\"PluginBehaviors\",function(){return St;});var n={};r.r(n),r.d(n,\"registerDefault\",function(){return d;}),r.d(n,\"SyncRepresentationToCanvas\",function(){return f;}),r.d(n,\"SyncStructureRepresentation3DState\",function(){return p;}),r.d(n,\"UpdateRepresentationVisibility\",function(){return m;});var i={};r.r(i),r.d(i,\"registerDefault\",function(){return v;}),r.d(i,\"Reset\",function(){return b;}),r.d(i,\"SetSnapshot\",function(){return y;}),r.d(i,\"Focus\",function(){return _;});var a={};r.r(a),r.d(a,\"registerDefault\",function(){return O;}),r.d(a,\"Canvas3DSetSettings\",function(){return x;});var o={};r.r(o),r.d(o,\"FocusLoci\",function(){return k;});var s={};r.r(s),r.d(s,\"StructureInfo\",function(){return R;}),r.d(s,\"AccessibleSurfaceArea\",function(){return Oe;}),r.d(s,\"Interactions\",function(){return Me;}),r.d(s,\"SecondaryStructure\",function(){return Be;}),r.d(s,\"ValenceModel\",function(){return Le;}),r.d(s,\"CrossLinkRestraint\",function(){return bt;});var u=r(71),c=r(216),l=r(8);function d(e){f(e),p(e),m(e);}function f(e){var t=e.state.data.events;t.object.created.subscribe(function(t){var r;l.a.isRepresentation3D(t.obj)&&(h(t.state.cells.get(t.ref),t.obj.data.repr),t.obj.data.repr.setState({syncManually:!0}),null===(r=e.canvas3d)||void 0===r||r.add(t.obj.data.repr));}),t.object.updated.subscribe(function(t){var r,n;t.oldObj&&l.a.isRepresentation3D(t.oldObj)&&(null===(r=e.canvas3d)||void 0===r||r.remove(t.oldObj.data.repr),t.oldObj.data.repr.destroy()),l.a.isRepresentation3D(t.obj)&&(h(t.state.cells.get(t.ref),t.obj.data.repr),\"recreate\"===t.action&&t.obj.data.repr.setState({syncManually:!0}),null===(n=e.canvas3d)||void 0===n||n.add(t.obj.data.repr));}),t.object.removed.subscribe(function(t){var r;l.a.isRepresentation3D(t.obj)&&(null===(r=e.canvas3d)||void 0===r||r.remove(t.obj.data.repr),t.obj.data.repr.destroy());});}function p(e){var t=e.state.data.events;t.object.created.subscribe(function(t){var r;if(l.a.Molecule.Structure.Representation3DState.is(t.obj)){var n=t.obj.data;n.source.data.repr.setState(n.state),null===(r=e.canvas3d)||void 0===r||r.update(n.source.data.repr);}}),t.object.updated.subscribe(function(t){var r;if(l.a.Molecule.Structure.Representation3DState.is(t.obj)){var n=t.obj.data;n.source.data.repr.setState(n.state),null===(r=e.canvas3d)||void 0===r||r.update(n.source.data.repr);}}),t.object.removed.subscribe(function(t){var r;if(l.a.Molecule.Structure.Representation3DState.is(t.obj)){var n=t.obj.data;n.source.data.repr.setState(n.initialState),null===(r=e.canvas3d)||void 0===r||r.update(n.source.data.repr);}});}function m(e){e.state.data.events.cell.stateUpdated.subscribe(function(t){var r,n=t.state.cells.get(t.ref);l.a.isRepresentation3D(n.obj)&&(h(n,n.obj.data.repr),null===(r=e.canvas3d)||void 0===r||r.syncVisibility());});}function h(e,t){t.setState({visible:!e.state.isHidden});}var g=r(26);function v(e){b(e),_(e),y(e);}function b(e){g.PluginCommands.Camera.Reset.subscribe(e,function(t){e.managers.camera.reset(null==t?void 0:t.snapshot,null==t?void 0:t.durationMs);});}function y(e){g.PluginCommands.Camera.SetSnapshot.subscribe(e,function(t){var r=t.snapshot,n=t.durationMs;e.managers.camera.setSnapshot(r,n);});}function _(e){g.PluginCommands.Camera.Focus.subscribe(e,function(t){var r=t.center,n=t.radius,i=t.durationMs;e.managers.camera.focusSphere({center:r,radius:n},{durationMs:i}),e.events.canvas3d.settingsUpdated.next();});}var S=r(158);function O(e){x(e);}function x(e){g.PluginCommands.Canvas3D.ResetSettings.subscribe(e,function(){var t;null===(t=e.canvas3d)||void 0===t||t.setProps(S.DefaultCanvas3DParams);}),g.PluginCommands.Canvas3D.SetSettings.subscribe(e,function(t){var r;e.canvas3d&&(null===(r=e.canvas3d)||void 0===r||r.setProps(t.settings),e.events.canvas3d.settingsUpdated.next());});}var C=r(223),w=r(0),P=r(23),j=r(2),E=r(84),A=r(59),T=(E.a,E.b),D=A.a.Trigger,I={clickCenterFocus:Object(A.a)([D(1,T.create()),D(2,T.create()),D(1,T.create({control:!0}))],\"Camera center and focus\",\"Click element using ${triggers}\"),clickCenterFocusSelectMode:Object(A.a)([D(2,T.create()),D(1,T.create({control:!0}))],\"Camera center and focus\",\"Click element using ${triggers}\")},M={minRadius:j.ParamDefinition.Numeric(8,{min:1,max:50,step:1}),extraRadius:j.ParamDefinition.Numeric(4,{min:1,max:50,step:1},{description:\"Value added to the bounding-sphere radius of the Loci\"}),durationMs:j.ParamDefinition.Numeric(250,{min:0,max:1e3,step:1},{description:\"Camera transition duration\"}),bindings:j.ParamDefinition.Value(I,{isHidden:!0})},k=u.a.create({name:\"camera-focus-loci\",category:\"interaction\",ctor:function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(w.__extends)(t,e),t.prototype.register=function(){var e=this;this.subscribeObservable(this.ctx.behaviors.interaction.click,function(t){var r=t.current,n=t.button,i=t.modifiers;if(e.ctx.canvas3d){var a=e.ctx.selectionMode?e.params.bindings.clickCenterFocusSelectMode:e.params.bindings.clickCenterFocus;if(A.a.match(a,n,i)){if(P.Loci.isEmpty(r.loci))return void g.PluginCommands.Camera.Reset(e.ctx,{});var o=P.Loci.normalize(r.loci,e.ctx.managers.interactivity.props.granularity);e.ctx.managers.camera.focusLoci(o,e.params);}}});},t;}(u.a.Handler),params:function params(){return M;},display:{name:\"Camera Focus Loci on Canvas\"}}),B=r(4),V=r(13),R=u.a.create({name:\"structure-info-prop\",category:\"custom-props\",display:{name:\"Structure Info\"},ctor:function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(w.__extends)(t,e),Object.defineProperty(t.prototype,\"maxModelIndex\",{get:function get(){for(var e,t,r=-1,n=0,i=this.ctx.state.data.select(V.StateSelection.Generators.rootsOfType(l.a.Molecule.Model));n<i.length;n++){var a=i[n],o=(null===(e=a.obj)||void 0===e?void 0:e.data)&&B.Model.Index.get(null===(t=a.obj)||void 0===t?void 0:t.data).value;void 0!==o&&o>r&&(r=o);}return r;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"maxStructureIndex\",{get:function get(){for(var e,t,r=-1,n=0,i=this.ctx.state.data.select(V.StateSelection.Generators.rootsOfType(l.a.Molecule.Structure));n<i.length;n++){var a=i[n],o=(null===(e=a.obj)||void 0===e?void 0:e.data)&&B.Structure.Index.get(null===(t=a.obj)||void 0===t?void 0:t.data).value;void 0!==o&&o>r&&(r=o);}return r;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"asymIdOffset\",{get:function get(){for(var e,t=0,r=0,n=0,i=this.ctx.state.data.select(V.StateSelection.Generators.rootsOfType(l.a.Molecule.Model));n<i.length;n++){var a=null===(e=i[n].obj)||void 0===e?void 0:e.data;if(a){var o=B.Model.AsymIdCount.get(a),s=B.Model.AsymIdOffset.get(a).value;void 0!==o&&void 0!==s&&(t=Math.max(t,s.auth+o.auth),r=Math.max(r,s.label+o.label));}}return{auth:t,label:r};},enumerable:!1,configurable:!0}),t.prototype.handleModel=function(e,t){if(void 0===B.Model.Index.get(e).value){var r=t&&B.Model.Index.get(t).value,n=null!=r?r:this.maxModelIndex+1;B.Model.Index.set(e,{value:n});}if(void 0===B.Model.AsymIdOffset.get(e).value){var i=t&&B.Model.AsymIdOffset.get(t).value;n=null!=i?i:Object(w.__assign)({},this.asymIdOffset);B.Model.AsymIdOffset.set(e,{value:n});}},t.prototype.handleStructure=function(e,t){if(void 0===e.parent&&void 0===B.Structure.Index.get(e).value){var r=t&&B.Structure.Index.get(t).value,n=null!=r?r:this.maxStructureIndex+1;B.Structure.Index.set(e,{value:n});}},t.prototype.handle=function(e,t,r){if(l.a.Molecule.Structure.is(t))this.ctx.state.data.tree.transforms.get(e).transformer.definition.isDecorator||void 0!==t.data.parent||this.handleStructure(t.data,null==r?void 0:r.data);else if(l.a.Molecule.Model.is(t)){this.ctx.state.data.tree.transforms.get(e).transformer.definition.isDecorator||this.handleModel(t.data,null==r?void 0:r.data);}},t.prototype.register=function(){var e=this;this.ctx.customModelProperties.register(B.Model.AsymIdOffset,!0),this.ctx.customModelProperties.register(B.Model.Index,!0),this.ctx.customStructureProperties.register(B.Structure.Index,!0),this.subscribeObservable(this.ctx.state.data.events.object.created,function(t){e.handle(t.ref,t.obj);}),this.subscribeObservable(this.ctx.state.data.events.object.updated,function(t){e.handle(t.ref,t.obj,t.oldObj);});},t.prototype.unregister=function(){this.ctx.customModelProperties.unregister(B.Model.AsymIdOffset.descriptor.name),this.ctx.customModelProperties.unregister(B.Model.Index.descriptor.name),this.ctx.customStructureProperties.unregister(B.Structure.Index.descriptor.name);},t;}(u.a.Handler)}),L=r(16),N=r(1),F=[-1,1.76,1.87,1.65,1.5,1.4,1.85,1.8,1.6,1.4],U={ALA:121,ARG:265,ASN:187,ASP:187,CYS:148,GLU:214,GLN:214,GLY:97,HIS:216,ILE:195,LEU:191,LYS:230,MET:203,PHE:228,PRO:154,SER:143,THR:163,TRP:264,TYR:255,VAL:165},z=r(109),H=r(22),G=r(119),q=r(27),W=r(146),Q=q.d.Location.create(void 0);function Y(e,t,r){switch(t){case\"O\":return 5;case\"S\":return 6;case\"N\":return\"NZ\"===e?4:3;case\"C\":switch(e){case\"C\":case\"CE1\":case\"CE2\":case\"CE3\":case\"CH2\":case\"CZ\":case\"CZ2\":case\"CZ3\":return 1;case\"CA\":case\"CB\":case\"CE\":case\"CG1\":case\"CG2\":return 2;default:switch(r){case\"PHE\":case\"TRP\":case\"TYR\":case\"HIS\":case\"ASP\":case\"ASN\":return 1;case\"PRO\":case\"LYS\":case\"ARG\":case\"MET\":case\"ILE\":case\"LEU\":return 2;case\"GLU\":case\"GLN\":return\"CD\"===e?1:2;}}}return K(t);}function X(e,t,r){switch(t){case\"C\":return 7;case\"N\":return 8;case\"P\":return 9;case\"O\":return 5;}return K(t);}function K(e){var t=Object(G.VdwRadius)(e),r=F.indexOf(t);return-1===r&&(r=F.length,F[r]=t),r;}function Z(e,t){return Object(w.__awaiter)(this,void 0,void 0,function(){var r,n;return Object(w.__generator)(this,function(i){switch(i.label){case 0:r=t.atomRadiusType,n=0,i.label=1;case 1:return n<r.length?e.shouldUpdate?[4,e.update({message:\"Computing per residue surface accessibility...\",current:n,max:r.length})]:[3,3]:[3,5];case 2:i.sent(),i.label=3;case 3:!function(e,t,r){for(var n=e.structure,i=e.atomRadiusType,a=e.serialResidueIndex,o=e.area,s=e.spherePoints,u=e.scalingConstant,c=e.maxLookupRadius,l=e.probeSize,d=q.e.atom,f=d.x,p=d.y,m=d.z,h=n.lookup3d,g=n.serialMapping,v=n.unitIndexMap,b=g.cumulativeUnitElementCount,y=t;y<r;++y){var _=F[i[y]];if(_!==F[0]){ne(te,n,y);for(var S=f(te),O=p(te),x=m(te),C=h.find(S,O,x,c),w=C.count,P=C.units,j=C.indices,E=C.squaredDistances,A=l+l+_,T=[],D=0;D<w;++D){var I=P[D];q.d.Location.set(re,e.structure,I,I.elements[j[D]]);var M=b[v.get(I.id)]+j[D],k=F[i[M]];if(!q.d.Location.areEqual(te,re)&&k!==F[0]){var B=(A+k)*(A+k);E[D]<B&&(T[T.length]=M);}}N.Vec3.set(J,S,O,x);for(var V=l+_,R=0,L=0;L<s.length;++L){N.Vec3.scaleAndAdd(ee,J,s[L],V);for(var U=!0,z=0;z<T.length;++z){var H=T[z];ne(re,n,H),N.Vec3.set($,f(re),p(re),m(re));var G=F[i[H]],W=(G+l)*(G+l);if(N.Vec3.squaredDistance(ee,$)<W){U=!1;break;}}U&&++R;}o[a[y]]+=u*R*V*V;}}}(t,n,Math.min(n+5e3,r.length)),i.label=4;case 4:return n+=5e3,[3,1];case 5:return[2];}});});}var J=Object(N.Vec3)(),$=Object(N.Vec3)(),ee=Object(N.Vec3)(),te=q.d.Location.create(void 0),re=q.d.Location.create(void 0);function ne(e,t,r){return e.structure=t,e.unit=t.units[t.serialMapping.unitIndices[r]],e.element=t.serialMapping.elementIndices[r],e;}var ie,ae={numberOfSpherePoints:j.ParamDefinition.Numeric(92,{min:12,max:360,step:1},{description:\"Number of sphere points to sample per atom: 92 (original paper), 960 (BioJava), 3000 (EPPIC) - see Shrake A, Rupley JA: Environment and exposure to solvent of protein atoms. Lysozyme and insulin. J Mol Biol 1973.\"}),probeSize:j.ParamDefinition.Numeric(1.4,{min:.1,max:4,step:.01},{description:\"Corresponds to the size of a water molecule: 1.4 (original paper), 1.5 (occassionally used)\"}),nonPolymer:j.ParamDefinition.Boolean(!1,{description:\"Include non-polymer atoms as occluders.\"})};!function(e){function t(e,t,n){return Object(w.__awaiter)(this,void 0,void 0,function(){var i,a,o;return Object(w.__generator)(this,function(s){switch(s.label){case 0:return function(e){var t=q.e.residue.key,r=q.e.atom,n=r.type_symbol,i=r.label_atom_id,a=r.label_comp_id,o=e.structure,s=e.atomRadiusType,u=e.serialResidueIndex,c=0,l=0,d=-1;Q.structure=o;for(var f=0,p=0,m=o.units.length;f<m;++f){var h=o.units[f],g=h.elements;Q.unit=h,c=-1;for(var v=0,b=g.length;v<b;++v){var y=g[v],_=p+v;Q.element=y,c!==(l=t(Q))&&++d,c=l;var S=n(Q),O=Object(z.c)(S);if(Object(z.f)(O))s[_]=F[0],u[_]=-1;else{var x=Object(W.b)(h,y);if(2!==x&&(e.nonPolymer||Object(H.isPolymer)(x))){var C=i(Q),w=a(Q);Object(H.isNucleic)(x)?s[_]=X(C,S,w):s[_]=5===x?Y(C,S,w):K(S),u[_]=d;}else s[_]=F[0],u[_]=-1;}}p+=g.length;}}(i=function(e,t){var n=e.elementCount,i=e.atomicResidueCount,a=t.probeSize,o=t.nonPolymer,s=t.numberOfSpherePoints;return{structure:e,probeSize:a,nonPolymer:o,spherePoints:r(s),scalingConstant:4*Math.PI/s,maxLookupRadius:2*t.probeSize+2*F[2],atomRadiusType:new Int8Array(n),serialResidueIndex:new Int32Array(n),area:new Float32Array(i)};}(t,n)),[4,Z(e,i)];case 1:return s.sent(),a=i.area,o=i.serialResidueIndex,[2,{area:a,serialResidueIndex:o}];}});});}function r(e){for(var t=[],r=Math.PI*(3-Math.sqrt(5)),n=2/e,i=0;i<e;++i){var a=i*n-1+n/2,o=Math.sqrt(1-a*a),s=i*r;t[t.length]=N.Vec3.create(Math.cos(s)*o,a,Math.sin(s)*o);}return t;}function n(e,t){return t/(U[e]||121);}function i(e,t){var r=e.structure.root.serialMapping.getSerialIndex,n=t.area,i=t.serialResidueIndex[r(e.unit,e.element)];return-1===i?-1:n[i];}function a(e,t){var r=i(e,t);return-1===r?-1:n(B.StructureProperties.atom.label_comp_id(e),r);}e.compute=function(e,r){var n=this;void 0===r&&(r={});var i=Object(w.__assign)(Object(w.__assign)({},j.ParamDefinition.getDefaultValues(ae)),r);return L.b.create(\"Compute Accessible Surface Area\",function(r){return Object(w.__awaiter)(n,void 0,void 0,function(){return Object(w.__generator)(this,function(n){switch(n.label){case 0:return[4,t(r,e,i)];case 1:return[2,n.sent()];}});});});},e.normalize=n,e.getValue=i,e.getNormalizedValue=a,e.getFlag=function(e,t){var r=a(e,t);return-1===r?0:r<.16?1:2;};}(ie||(ie={}));var oe=r(204),se=r(163),ue=r(18),ce=r(15),le=r(66),de=Object(w.__assign)({},ae),fe={isBuried:se.QuerySymbolRuntime.Dynamic(Object(ue.c)(\"computed\",\"accessible-surface-area.is-buried\",ce.a.Bool),function(e){if(!B.Unit.isAtomic(e.element.unit))return!1;var t=pe.get(e.element.structure).value;return!!t&&1===ie.getFlag(e.element,t);}),isAccessible:se.QuerySymbolRuntime.Dynamic(Object(ue.c)(\"computed\",\"accessible-surface-area.is-accessible\",ce.a.Bool),function(e){if(!B.Unit.isAtomic(e.element.unit))return!1;var t=pe.get(e.element.structure).value;return!!t&&2===ie.getFlag(e.element,t);})},pe=oe.a.createProvider({label:\"Accessible Surface Area\",descriptor:Object(le.CustomPropertyDescriptor)({name:\"molstar_accessible_surface_area\",symbols:fe}),type:\"root\",defaultParams:de,getParams:function getParams(e){return de;},isApplicable:function isApplicable(e){return!0;},obtain:function obtain(e,t,r){return Object(w.__awaiter)(void 0,void 0,void 0,function(){var n,i;return Object(w.__generator)(this,function(a){switch(a.label){case 0:return n=Object(w.__assign)(Object(w.__assign)({},j.ParamDefinition.getDefaultValues(de)),r),i={},[4,ie.compute(t,n).runInContext(e.runtime)];case 1:return[2,(i.value=a.sent(),i)];}});});}}),me=r(24),he=Object(me.Color)(16448250),ge={list:j.ParamDefinition.ColorList(\"rainbow\",{presetKind:\"scale\"})};var ve={name:\"accessible-surface-area\",label:\"Accessible Surface Area\",category:\"Residue Property\",factory:function e(t,r){var n,i=me.ColorScale.create({listOrName:r.list.colors,minLabel:\"buried\",maxLabel:\"exposed\",domain:[0,1]}),a=t.structure&&pe.get(t.structure),o=null==a?void 0:a.version;if((null==a?void 0:a.value)&&t.structure){var s=a.value;n=function n(e){if(B.StructureElement.Location.is(e)&&B.Unit.isAtomic(e.unit)){var t=ie.getNormalizedValue(e,s);return-1===t?he:i.color(t);}return he;};}else n=function n(){return he;};return{factory:e,granularity:\"group\",color:n,props:r,contextHash:o,description:\"Assigns a color based on the relative accessible surface area of a residue.\",legend:i?i.legend:void 0};},getParams:function getParams(e){return ge;},defaultValues:j.ParamDefinition.getDefaultValues(ge),isApplicable:function isApplicable(e){return!!e.structure;},ensureCustomProperties:{attach:function attach(e,t){return t.structure?pe.attach(e,t.structure,void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.customPropertyDescriptors.reference(pe.descriptor,!1);}}},be=r(6),ye=r(30),_e=r(80),Se=r(10),Oe=u.a.create({name:\"computed-accessible-surface-area-prop\",category:\"custom-props\",display:{name:\"Accessible Surface Area\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=pe,t.labelProvider={label:function label(e){if(t.params.showTooltip)return xe(e);}},t;}return Object(w.__extends)(t,e),t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach||this.params.showTooltip!==e.showTooltip;return this.params.autoAttach=e.autoAttach,this.params.showTooltip=e.showTooltip,this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.register=function(){se.DefaultQueryRuntimeTable.addCustomProp(this.provider.descriptor),this.ctx.customStructureProperties.register(this.provider,this.params.autoAttach),this.ctx.representation.structure.themes.colorThemeRegistry.add(ve),this.ctx.managers.lociLabels.addProvider(this.labelProvider),this.ctx.query.structure.registry.add(Pe),this.ctx.query.structure.registry.add(je);},t.prototype.unregister=function(){se.DefaultQueryRuntimeTable.removeCustomProp(this.provider.descriptor),this.ctx.customStructureProperties.unregister(this.provider.descriptor.name),this.ctx.representation.structure.themes.colorThemeRegistry.remove(ve),this.ctx.managers.lociLabels.removeProvider(this.labelProvider),this.ctx.query.structure.registry.remove(Pe),this.ctx.query.structure.registry.remove(je);},t;}(u.a.Handler),params:function params(){return{autoAttach:j.ParamDefinition.Boolean(!1),showTooltip:j.ParamDefinition.Boolean(!0)};}});function xe(e){if(\"element-loci\"===e.kind){if(0===e.elements.length)return;if(!(l=pe.get(e.structure).value)||e.structure.customPropertyDescriptors.hasReference(pe.descriptor))return;for(var t=e.structure.root.serialMapping.getSerialIndex,r=l.area,n=l.serialResidueIndex,i=new Set(),a=0,o=function o(e,_o3){var s=_o3.elements;be.OrderedSet.forEach(e,function(e){var u=n[t(_o3,s[e])];-1===u||i.has(u)||(a+=r[u],i.add(u));});},s=0,u=e.elements;s<u.length;s++){var c=u[s];o(c.indices,c.unit);}if(0===i.size)return;return\"Accessible Surface Area \"+(\"<small>(\"+i.size+\" \"+(i.size>1?\"Residues sum\":\"Residue\")+\")</small>\")+\": \"+a.toFixed(2)+\" Å<sup>2</sup>\";}if(\"structure-loci\"===e.kind){var l;if(!(l=pe.get(e.structure).value)||e.structure.customPropertyDescriptors.hasReference(pe.descriptor))return;return\"Accessible Surface Area <small>(Whole Structure)</small>: \"+Object(ye.arraySum)(l.area).toFixed(2)+\" Å<sup>2</sup>\";}}var Ce,we,Pe=Object(_e.c)(\"Buried Protein Residues\",Se.MolScriptBuilder.struct.modifier.union([Se.MolScriptBuilder.struct.modifier.wholeResidues([Se.MolScriptBuilder.struct.modifier.union([Se.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":Se.MolScriptBuilder.core.rel.eq([Se.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":fe.isBuried.symbol()})])])]),{description:\"Select buried protein residues.\",category:_e.a.Residue,ensureCustomProperties:function ensureCustomProperties(e,t){return pe.attach(e,t);}}),je=Object(_e.c)(\"Accessible Protein Residues\",Se.MolScriptBuilder.struct.modifier.union([Se.MolScriptBuilder.struct.modifier.wholeResidues([Se.MolScriptBuilder.struct.modifier.union([Se.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":Se.MolScriptBuilder.core.rel.eq([Se.MolScriptBuilder.ammp(\"objectPrimitive\"),\"atomistic\"]),\"residue-test\":fe.isAccessible.symbol()})])])]),{description:\"Select accessible protein residues.\",category:_e.a.Residue,ensureCustomProperties:function ensureCustomProperties(e,t){return pe.attach(e,t);}}),Ee=r(108),Ae=r(129),Te=r(252),De=r(330),Ie=r(334),Me=u.a.create({name:\"computed-interactions-prop\",category:\"custom-props\",display:{name:\"Interactions\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=Ee.a,t.labelProvider={label:function label(e){if(t.params.showTooltip)switch(e.kind){case\"element-loci\":if(0===e.elements.length)return;for(var r=[],n=0,i=t.getStructures(e.structure);n<i.length;n++){var a=i[n],o=t.provider.get(a).value;if(o){var s=Ae.a.Loci.remap(e,a);if(1===s.elements.length){var u=s.elements[0];if(1===be.OrderedSet.size(u.indices)){var c=o.unitsFeatures.get(u.unit.id);if(c){for(var l=[],d=[],f=[],p=be.OrderedSet.start(u.indices),m=c.types,h=c.groups,g=c.elementsIndex,v=g.indices,b=g.offsets,y=b[p],_=b[p+1];y<_;++y){var S=v[y],O=m[S],x=h[S];O&&l.push(Object(Te.d)(O)),x&&d.push(Object(Te.c)(x));}l.length&&f.push(\"<small>Types</small> \"+l.join(\", \")),d.length&&f.push(\"<small>Groups</small> \"+d.join(\", \")),f.length&&r.push(\"Interaction Feature: \"+f.join(\" | \"));}}}}}return r.length?r.join(\"<br/>\"):void 0;default:return;}}},t;}return Object(w.__extends)(t,e),t.prototype.getStructures=function(e){var t=[],r=this.ctx.helpers.substructureParent.get(e);if(r)for(var n=0,i=this.ctx.state.data.select(V.StateSelection.Generators.ofType(l.a.Molecule.Structure,r.transform.ref));n<i.length;n++){var a=i[n];a.obj&&Object(ye.arraySetAdd)(t,a.obj.data);}return t;},t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach||this.params.showTooltip!==e.showTooltip;return this.params.autoAttach=e.autoAttach,this.params.showTooltip=e.showTooltip,this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.register=function(){this.ctx.customStructureProperties.register(this.provider,this.params.autoAttach),this.ctx.representation.structure.themes.colorThemeRegistry.add(De.a),this.ctx.managers.lociLabels.addProvider(this.labelProvider),this.ctx.representation.structure.registry.add(Ie.a);},t.prototype.unregister=function(){this.ctx.customStructureProperties.unregister(this.provider.descriptor.name),this.ctx.representation.structure.themes.colorThemeRegistry.remove(De.a),this.ctx.managers.lociLabels.removeProvider(this.labelProvider),this.ctx.representation.structure.registry.remove(Ie.a);},t;}(u.a.Handler),params:function params(){return{autoAttach:j.ParamDefinition.Boolean(!1),showTooltip:j.ParamDefinition.Boolean(!0)};}}),ke=r(152),Be=u.a.create({name:\"computed-secondary-structure-prop\",category:\"custom-props\",display:{name:\"Secondary Structure\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=ke.a,t;}return Object(w.__extends)(t,e),t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach;return this.params.autoAttach=e.autoAttach,this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.register=function(){this.ctx.customStructureProperties.register(this.provider,this.params.autoAttach);},t.prototype.unregister=function(){this.ctx.customStructureProperties.unregister(this.provider.descriptor.name);},t;}(u.a.Handler),params:function params(){return{autoAttach:j.ParamDefinition.Boolean(!1)};}}),Ve=r(228),Re=r(153),Le=u.a.create({name:\"computed-valence-model-prop\",category:\"custom-props\",display:{name:\"Valence Model\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=Ve.a,t.labelProvider={label:function label(e){if(t.params.showTooltip)switch(e.kind){case\"element-loci\":if(0===e.elements.length)return;for(var r=[],n=0,i=t.getStructures(e.structure);n<i.length;n++){var a=i[n],o=t.provider.get(a).value;if(o){var s=B.StructureElement.Loci.remap(e,a);if(1===s.elements.length){var u=s.elements[0];if(1===be.OrderedSet.size(u.indices)){var c=o.get(u.unit.id);if(c){var l=be.OrderedSet.start(u.indices),d=c.charge[l],f=c.idealGeometry[l],p=c.implicitH[l],m=c.totalH[l];r.push(\"Valence Model: <small>Charge</small> \"+d+\" | <small>Ideal Geometry</small> \"+Object(Re.e)(f)+\" | <small>Implicit H</small> \"+p+\" | <small>Total H</small> \"+m);}}}}}return r.length?r.join(\"<br/>\"):void 0;default:return;}}},t;}return Object(w.__extends)(t,e),t.prototype.getStructures=function(e){var t=[],r=this.ctx.helpers.substructureParent.get(e);if(r)for(var n=0,i=this.ctx.state.data.select(V.StateSelection.Generators.ofType(l.a.Molecule.Structure,r.transform.ref));n<i.length;n++){var a=i[n];a.obj&&Object(ye.arraySetAdd)(t,a.obj.data);}return t;},t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach||this.params.showTooltip!==e.showTooltip;return this.params.autoAttach=e.autoAttach,this.params.showTooltip=e.showTooltip,this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.register=function(){this.ctx.customStructureProperties.register(this.provider,this.params.autoAttach),this.ctx.managers.lociLabels.addProvider(this.labelProvider);},t.prototype.unregister=function(){this.ctx.customStructureProperties.unregister(this.provider.descriptor.name),this.ctx.managers.lociLabels.removeProvider(this.labelProvider);},t;}(u.a.Handler),params:function params(){return{autoAttach:j.ParamDefinition.Boolean(!1),showTooltip:j.ParamDefinition.Boolean(!0)};}}),Ne=r(188);(we=Ce||(Ce={})).Descriptor={name:\"ihm_cross_link_restraint\"},we.Provider=Ne.a.create(we.Descriptor),we.fromTable=function(e,t){var r={entity_id:e.entity_id_1,asym_id:e.asym_id_1,seq_id:e.seq_id_1,atom_id:e.atom_id_1},n={entity_id:e.entity_id_2,asym_id:e.asym_id_2,seq_id:e.seq_id_2,atom_id:e.atom_id_2};function i(e,t,r){var n=e.get(t);n?n.push(r):e.set(t,[r]);}function a(r,n){var a=n.entity_id.value(r),c=n.asym_id.value(r),l=n.seq_id.value(r);if(\"by-atom\"===e.model_granularity.value(r)){var d=t.atomicHierarchy.index.findAtom({auth_seq_id:l,label_asym_id:c,label_atom_id:n.atom_id.value(r),label_entity_id:a});d>=0&&i(o,d,r);}else if(t.coarseHierarchy.isDefined){var f=t.coarseHierarchy.spheres.findSequenceKey(a,c,l);if(f>=0)i(s,f,r);else{var p=t.coarseHierarchy.gaussians.findSequenceKey(a,c,l);p>=0&&i(u,p,r);}}}for(var o=new Map(),s=new Map(),u=new Map(),c=[],l=0;l<e._rowCount;++l)a(l,r),a(l,n);return{getIndicesByElement:function getIndicesByElement(e,t){var r=function(e){switch(e){case 0:return o;case 1:return s;case 2:return u;}}(t).get(e);return void 0!==r?r:c;},data:e};};var Fe=r(72),Ue=r(40),ze=r(39),He=r(86),Ge=r(63),qe=r(110),We=r(54),Qe=[];function Ye(e,t,r,n){return e+\"|\"+t.id+\"|\"+r+\"|\"+n.id;}var Xe,Ke=function(){function e(e){this.pairs=e;var t=new Map();this.pairs.forEach(function(e,r){var n=Ye(e.indexA,e.unitA,e.indexB,e.unitB),i=t.get(n);i?i.push(r):t.set(n,[r]);}),this.count=e.length,this.pairKeyIndices=t;}return e.prototype.getPairIndices=function(e,t,r,n){var i=Ye(e,t,r,n);return this.pairKeyIndices.get(i)||Qe;},e.prototype.getPairs=function(e,t,r,n){var i=this;return this.getPairIndices(e,t,r,n).map(function(e){return i.pairs[e];});},e;}(),Ze=r(143),Je=r(195),$e=r(70),et=oe.a.createProvider({label:\"Cross Link Restraint\",descriptor:Object(le.CustomPropertyDescriptor)({name:\"integrative-cross-link-restraint\"}),type:\"local\",defaultParams:{},getParams:function getParams(e){return{};},isApplicable:function isApplicable(e){return e.models.some(function(e){return!!Ce.Provider.get(e);});},obtain:function obtain(e,t,r){return Object(w.__awaiter)(void 0,void 0,void 0,function(){return Object(w.__generator)(this,function(e){return[2,{value:at(t)}];});});}});function tt(e,t,r){for(var n=t.elements,i=n.length,a=t.kind,o=function o(t){var i=n[t];r.getIndicesByElement(i,a).forEach(function(r){return e.set(r,t);});},s=0;s<i;s++)o(s);}function rt(e,t,r){if(t.model===r.model&&\"mmCIF\"===t.model.sourceData.kind){var n=Ce.Provider.get(t.model);if(n){var i=new Map(),a=new Map();tt(i,t,n),tt(a,r,n),i.forEach(function(i,o){var s=a.get(o);void 0!==s&&e.push(it(t,i,r,s,n,o),it(r,s,t,i,n,o));});}}}function nt(e,t){if(\"mmCIF\"===t.model.sourceData.kind){var r=Ce.Provider.get(t.model);if(r){for(var n=t.elements,i=n.length,a=t.kind,o=new Map(),s=function s(e){var t=n[e];r.getIndicesByElement(t,a).forEach(function(t){var r=o.get(t);r?r.push(e):o.set(t,[e]);});},u=0;u<i;u++)s(u);o.forEach(function(n,i){if(!(n.length<2)){var a=n[0],o=n[1];e.push(it(t,a,t,o,r,i),it(t,o,t,a,r,i));}});}}}function it(e,t,r,n,i,a){return{unitA:e,indexA:t,unitB:r,indexB:n,restraintType:i.data.restraint_type.value(a),distanceThreshold:i.data.distance_threshold.value(a),psi:i.data.psi.value(a),sigma1:i.data.sigma_1.value(a),sigma2:i.data.sigma_2.value(a)};}function at(e){var t=[];if(!e.models.some(function(e){return Ce.Provider.get(e);}))return new Ke(t);for(var r=e.units.length,n=0;n<r;++n){var i=e.units[n];nt(t,i);for(var a=n+1;a<r;++a){var o=e.units[a];i.model===o.model&&rt(t,i,o);}}return new Ke(t);}function ot(e,t,r,n,i){var a=et.get(t).value;if(!a.count)return ze.a.createEmpty(i);var o=n.sizeFactor,s=B.StructureElement.Location.create(t),u={linkCount:a.count,position:function position(e,t,r){var n=a.pairs[r],i=n.unitA,o=n.unitB;i.conformation.position(i.elements[n.indexA],e),o.conformation.position(o.elements[n.indexB],t);},radius:function radius(e){var t=a.pairs[e];return s.unit=t.unitA,s.element=t.unitA.elements[t.indexA],r.size.size(s)*o;}};return Object(Ge.d)(e,u,n,i);}!function(e){!function(e){e.CrossLinkRestraint=\"cross-link-restraint\";}(e.Tag||(e.Tag={})),e.isApplicable=function(e){return e.models.some(function(e){return!!Ce.Provider.get(e);});};var t=Object(N.Vec3)(),r=Object(N.Vec3)();function n(e){return e.unitA.conformation.position(e.unitA.elements[e.indexA],t),e.unitB.conformation.position(e.unitB.elements[e.indexB],r),N.Vec3.distance(t,r);}function i(e,t){var r=e.pairs[t];return\"Cross Link Restraint | Type: \"+r.restraintType+\" | Threshold: \"+r.distanceThreshold+\" Å | Psi: \"+r.psi+\" | Sigma 1: \"+r.sigma1+\" | Sigma 2: \"+r.sigma2+\" | Distance: \"+n(r).toFixed(2)+\" Å\";}function a(e,t,r){return Je.a.fromPairProvider(t.length,function(r,n,i){var a=e.pairs[t[r]];a.unitA.conformation.position(a.unitA.elements[a.indexA],n),a.unitB.conformation.position(a.unitB.elements[a.indexB],i);},r);}function o(e,t,r){var n=r[0];if(void 0===n)return\"\";var a=t.pairs[n];return[i(t,n),Object($e.bondLabel)(B.Bond.Location(e,a.unitA,a.indexA,e,a.unitB,a.indexB))].join(\"</br>\");}e.distance=n,e.Location=function(e,t,r){return Object(Ze.a)(\"cross-link-restraints\",{structure:t,crossLinkRestraints:e},r);},e.isLocation=function(e){return!!e&&\"data-location\"===e.kind&&\"cross-link-restraints\"===e.tag;},e.areLocationsEqual=function(e,t){return e.data.structure===t.data.structure&&e.data.crossLinkRestraints===t.data.crossLinkRestraints&&e.element===t.element;},e.locationLabel=function(e){return i(e.data.crossLinkRestraints,e.element);},e.Loci=function(e,t,r){return Object(P.DataLoci)(\"cross-link-restraints\",{structure:e,crossLinkRestraints:t},r,function(e){return a(t,r,e);},function(){return o(e,t,r);});},e.isLoci=function(e){return!!e&&\"data-loci\"===e.kind&&\"interactions\"===e.tag;},e.getBoundingSphere=a,e.getLabel=o;}(Xe||(Xe={}));var st=Object(w.__assign)(Object(w.__assign)(Object(w.__assign)({},qe.c),Ge.a),{sizeFactor:j.ParamDefinition.Numeric(.5,{min:0,max:10,step:.1})});function ut(e){return Object(qe.d)({defaultProps:j.ParamDefinition.getDefaultValues(st),createGeometry:ot,createLocationIterator:ct,getLoci:lt,eachLocation:dt,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments||t.linkCap!==r.linkCap;}},e);}function ct(e){var t=et.get(e).value,r=t.pairs.length,n=Xe.Location(t,e);return Object(He.a)(r,1,function(e){return n.element=e,n;},!0);}function lt(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=et.get(t).value;if(a.pairs[i])return Xe.Loci(t,a,[i]);}return P.EmptyLoci;}function dt(e,t,r){var n=!1;if(Xe.isLoci(e)){if(!B.Structure.areEquivalent(e.data.structure,t))return!1;var i=et.get(t).value;if(e.data.crossLinkRestraints!==i)return!1;for(var a=0,o=e.elements;a<o.length;a++){var s=o[a];r(be.Interval.ofSingleton(s))&&(n=!0);}}return n;}var ft={\"cross-link-restraint\":function crossLinkRestraint(e,t){return Object(We.a)(\"Cross-link restraint\",e,t,ut);}},pt=Object(w.__assign)({},st);var mt=Object(We.b)({name:Xe.Tag.CrossLinkRestraint,label:\"Cross Link Restraint\",description:\"Displays cross-link restraints.\",factory:function factory(e,t){return Ue.a.createMulti(\"CrossLinkRestraint\",e,t,We.c,ft);},getParams:function getParams(e,t){return j.ParamDefinition.clone(pt);},defaultValues:j.ParamDefinition.getDefaultValues(pt),defaultColorTheme:{name:Xe.Tag.CrossLinkRestraint},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return Xe.isApplicable(e);},ensureCustomProperties:{attach:function attach(e,t){return et.attach(e,t,void 0,!0);},detach:function detach(e){return et.ref(e,!1);}}}),ht=Object(me.Color)(13421772),gt={domain:j.ParamDefinition.Interval([.5,1.5],{step:.01}),list:j.ParamDefinition.ColorList(\"red-grey\",{presetKind:\"scale\"})};var vt={name:\"cross-link\",label:\"Cross Link\",category:\"Miscellaneous\",factory:function e(t,r){var n,i=void 0,a=t.structure&&et.get(t.structure).value;if(a){var o=(i=me.ColorScale.create({domain:r.domain,listOrName:r.list.colors})).color;n=function n(e){if(Xe.isLocation(e)){var t=a.pairs[e.element];if(t)return o(Xe.distance(t)/t.distanceThreshold);}return ht;};}else n=function n(){return ht;};return{factory:e,granularity:\"group\",color:n,props:r,description:\"Colors cross-links by the deviation of the observed distance versus the modeled distance (e.g. modeled / `ihm_cross_link_restraint.distance_threshold`).\",legend:i?i.legend:void 0};},getParams:function getParams(e){return gt;},defaultValues:j.ParamDefinition.getDefaultValues(gt),isApplicable:function isApplicable(e){return!!e.structure&&Xe.isApplicable(e.structure);},ensureCustomProperties:{attach:function attach(e,t){return t.structure?et.attach(e,t.structure,void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.customPropertyDescriptors.reference(et.descriptor,!1);}}},bt=u.a.create({name:\"integrative-cross-link-restraint\",category:\"custom-props\",display:{name:\"Cross Link Restraint\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=Ce.Provider,t;}return Object(w.__extends)(t,e),t.prototype.register=function(){this.provider.formatRegistry.add(\"mmCIF\",yt),this.ctx.representation.structure.themes.colorThemeRegistry.add(vt),this.ctx.representation.structure.registry.add(mt);},t.prototype.unregister=function(){this.provider.formatRegistry.remove(\"mmCIF\"),this.ctx.representation.structure.themes.colorThemeRegistry.remove(vt),this.ctx.representation.structure.registry.remove(mt);},t;}(u.a.Handler)});function yt(e){if(Fe.a.is(e.sourceData)){var t=e.sourceData.data.db.ihm_cross_link_restraint;if(0!==t._rowCount)return Ce.fromTable(t,e);}}var _t={State:c,Representation:n,Camera:i,Misc:a},St={Representation:C,Camera:o,CustomProps:s};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(9),a=r(6);!function(e){var t=function(){function e(e,t,r,n,i){this.offset=e,this.a=t,this.b=r,this.edgeCount=n,this.vertexCount=e.length-1,this.edgeProps=i||{};}return e.prototype.getEdgeIndex=function(e,t){var r,n;e<t?(r=e,n=t):(r=t,n=e);for(var i=this.offset[r],a=this.offset[r+1];i<a;i++)if(this.b[i]===n)return i;return-1;},e.prototype.getDirectedEdgeIndex=function(e,t){for(var r=this.offset[e],n=this.offset[e+1];r<n;r++)if(this.b[r]===t)return r;return-1;},e.prototype.getVertexEdgeCount=function(e){return this.offset[e+1]-this.offset[e];},e;}();function r(e,r,n,i,a){return new t(e,r,n,i,a);}e.create=r;var n=function(){function e(e,t,r){this.vertexCount=e,this.xs=t,this.ys=r,this.current=0,this.curA=0,this.curB=0,this.edgeCount=t.length,this.offsets=new Int32Array(this.vertexCount+1),this.bucketFill=new Int32Array(this.vertexCount);for(var n=new Int32Array(this.vertexCount),i=0,a=this.xs.length;i<a;i++)n[this.xs[i]]++;for(i=0,a=this.ys.length;i<a;i++)n[this.ys[i]]++;var o=0;for(i=0;i<this.vertexCount;i++)this.offsets[i]=o,o+=n[i];this.offsets[this.vertexCount]=o,this.slotCount=o,this.a=new Int32Array(o),this.b=new Int32Array(o);}return e.prototype.createGraph=function(e){return r(this.offsets,this.a,this.b,this.edgeCount,e);},e.prototype.addNextEdge=function(){var e=this.xs[this.current],t=this.ys[this.current],r=this.offsets[e]+this.bucketFill[e],n=this.offsets[t]+this.bucketFill[t];this.a[r]=e,this.b[r]=t,this.bucketFill[e]++,this.a[n]=t,this.b[n]=e,this.bucketFill[t]++,this.current++,this.curA=r,this.curB=n;},e.prototype.addAllEdges=function(){for(var e=0;e<this.edgeCount;e++)this.addNextEdge();},e.prototype.assignProperty=function(e,t){e[this.curA]=t,e[this.curB]=t;},e;}();e.EdgeBuilder=n;var o=function(){function e(e,t,r){this.vertexCount=e,this.xs=t,this.ys=r,this.current=0,this.curA=0,this.edgeCount=t.length,this.offsets=new Int32Array(this.vertexCount+1),this.bucketFill=new Int32Array(this.vertexCount);for(var n=new Int32Array(this.vertexCount),i=0,a=this.xs.length;i<a;i++)n[this.xs[i]]++;var o=0;for(i=0;i<this.vertexCount;i++)this.offsets[i]=o,o+=n[i];this.offsets[this.vertexCount]=o,this.slotCount=o,this.a=new Int32Array(o),this.b=new Int32Array(o);}return e.prototype.createGraph=function(e){return r(this.offsets,this.a,this.b,this.edgeCount,e);},e.prototype.addNextEdge=function(){var e=this.xs[this.current],t=this.ys[this.current],r=this.offsets[e]+this.bucketFill[e];this.a[r]=e,this.b[r]=t,this.bucketFill[e]++,this.current++,this.curA=r;},e.prototype.addAllEdges=function(){for(var e=0;e<this.edgeCount;e++)this.addNextEdge();},e.prototype.assignProperty=function(e,t){e[this.curA]=t;},e;}();e.DirectedEdgeBuilder=o;var s=function(){function e(e){this.vertexCount=e,this.xs=[],this.ys=[],this.included=new Set();}return e.prototype.addEdge=function(e,t){var r=e,n=t;e>t&&(r=t,n=e);var a=Object(i.f)(r,n);return!this.included.has(a)&&(this.included.add(a),this.xs[this.xs.length]=r,this.ys[this.ys.length]=n,!0);},e.prototype.getGraph=function(){return u(this.vertexCount,this.xs,this.ys);},e.prototype.getEdgeBuiler=function(){return new n(this.vertexCount,this.xs,this.ys);},e;}();function u(t,r,n){var i=new e.EdgeBuilder(t,r,n);return i.addAllEdges(),i.createGraph({});}e.UniqueEdgeBuilder=s,e.fromVertexPairs=u,e.induceByVertices=function(e,t){for(var n=e.b,a=e.offset,o=e.vertexCount,s=e.edgeProps,u=new Int32Array(o),c=0,l=t.length;c<l;c++)u[t[c]]=c+1;var d=0;for(c=0;c<o;c++)if(0!==u[c])for(var f=a[c],p=a[c+1];f<p;f++)n[f]>c&&0!==u[n[f]]&&d++;var m=new Int32Array(t.length+1),h=new Int32Array(2*d),g=new Int32Array(2*d),v=new Int32Array(2*d),b=0,y=0;for(c=0;c<o;c++)if(0!==u[c]){var _=u[c]-1;for(f=a[c],p=a[c+1];f<p;f++){var S=u[n[f]];0!==S&&(g[b]=_,v[b]=S-1,h[b]=f,b++);}m[++y]=b;}for(var O={},x=0,C=Object.keys(s);x<C.length;x++){var w=C[x];O[w]=Object(i.d)(s[w],h);}return r(m,g,v,d,O);},e.connectedComponents=function(e){var t=e.vertexCount;if(0===t)return{componentCount:0,componentIndex:new Int32Array(0)};if(0===e.edgeCount){for(var r=new Int32Array(t),n=0,i=t;n<i;n++)r[n]=n;return{componentCount:t,componentIndex:r};}var o=new Int32Array(t);for(n=0,i=t;n<i;n++)o[n]=-1;var s=0;o[0]=s;var u=e.offset,c=e.b,l=[0],d=Object(a.LinkedIndex)(t);for(d.remove(0);l.length>0;){for(var f=l.pop(),p=o[f],m=u[f],h=u[f+1];m<h;m++){var g=c[m];d.has(g)&&(d.remove(g),l.push(g),o[g]=p);}0===l.length&&d.head>=0&&(l.push(d.head),o[d.head]=++s,d.remove(d.head));}return{componentCount:t,componentIndex:o};},e.areVertexSetsConnected=function(e,t,r,n){if(a.SortedArray.areIntersecting(t,r))return!0;if(n<1)return!1;for(var i=new Set(),o=0,s=t.length;o<s;++o)i.add(t[o]);return function e(t,r,n,i,o){for(var s=t.b,u=t.offset,c=[],l=0,d=r.length;l<d;++l)for(var f=r[l],p=u[f],m=u[f+1];p<m;++p){var h=s[p];if(!o.has(h)){if(a.SortedArray.has(n,h))return!0;o.add(h),c[c.length]=h;}}return i>1&&e(t,c,n,i-1,o);}(e,t,r,n,i);};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(9),a=r(74),o=r(1),s=Object(o.Vec3)(),u=Object(o.Vec3)(),c=Object(o.Vec3)();!function(e){e.create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024);var n=i.a.create(Float32Array,2,t,r?r.mappingBuffer.ref.value:e),l=i.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e),d=i.a.create(Uint32Array,3,3*t,r?r.indexBuffer.ref.value:3*e),f=i.a.create(Float32Array,3,t,r?r.startBuffer.ref.value:e),p=i.a.create(Float32Array,3,t,r?r.endBuffer.ref.value:e),m=function m(e,t,r,a,o,s,u){for(var c=n.elementCount,m=0;m<4;++m)i.a.add3(f,e,t,r),i.a.add3(p,a,o,s),i.a.add(l,u);i.a.add2(n,-1,1),i.a.add2(n,-1,-1),i.a.add2(n,1,1),i.a.add2(n,1,-1),i.a.add3(d,c,c+1,c+2),i.a.add3(d,c+1,c+3,c+2);},h=function h(e,t,r,n){var i=o.Vec3.distance(e,t),a=Math.floor(r/2),l=1/r;o.Vec3.sub(c,t,e);for(var d=0;d<a;++d){var f=l*(2*d+1);o.Vec3.setMagnitude(c,c,i*f),o.Vec3.add(s,e,c),o.Vec3.setMagnitude(c,c,i*l*(2*(d+1))),o.Vec3.add(u,e,c),m(s[0],s[1],s[2],u[0],u[1],u[2],n);}};return{add:m,addFixedCountDashes:h,addFixedLengthDashes:function addFixedLengthDashes(e,t,r,n){var i=o.Vec3.distance(e,t);h(e,t,i/r,n);},addCage:function addCage(e,t,r){for(var n=t.vertices,i=t.edges,a=0,c=i.length;a<c;a+=2)o.Vec3.fromArray(s,n,3*i[a]),o.Vec3.fromArray(u,n,3*i[a+1]),o.Vec3.transformMat4(s,s,e),o.Vec3.transformMat4(u,u,e),m(s[0],s[1],s[2],u[0],u[1],u[2],r);},getLines:function getLines(){var e=i.a.compact(n,!0),t=i.a.compact(d,!0),o=i.a.compact(l,!0),s=i.a.compact(f,!0),u=i.a.compact(p,!0);return a.a.create(e,t,o,s,u,d.elementCount/2,r);}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(171),a=r(188);!function(e){e.Descriptor={name:\"index_pair_bonds\"},e.Provider=a.a.create(e.Descriptor),e.fromData=function(e){var t=e.pairs,r=e.count;return function(e,t,r,n){for(var a=new i.a.EdgeBuilder(n,e,t),o=new Int8Array(a.slotCount),s=new Array(a.slotCount),u=new Array(a.slotCount),c=0,l=a.edgeCount;c<l;c++)a.addNextEdge(),a.assignProperty(o,r.order?r.order[c]:1),a.assignProperty(s,r.symmetryA?r.symmetryA[c]:\"\"),a.assignProperty(u,r.symmetryB?r.symmetryB[c]:\"\");return a.createGraph({order:o,symmetryA:s,symmetryB:u});}(t.indexA.toArray(),t.indexB.toArray(),{order:t.order&&t.order.toArray(),symmetryA:t.symmetryA&&t.symmetryA.toArray(),symmetryB:t.symmetryB&&t.symmetryB.toArray()},r);};}(n||(n={}));},function(e,t,r){\"use strict\";function n(e,t,r){var n,i=1;for(n=0;n<t;n++){var a=i*e;if(Math.abs(Math.round(a)-a)<=r)return n;i*=10;}return-1;}function i(e,t){return Math.abs(e)<t?0:Math.floor(Math.log10(Math.abs(e)))+1;}function a(e,t,r){for(var i=1,a=0,o=0,s=e.length;o<s;o++){if(i>=0){var u=n(e[o],t,r);u<0?i=-1:u>i&&(i=u);}var c=Math.abs(e[o]);if(c>r){var l=Math.floor(Math.log10(Math.abs(c)))+1;l>a&&(a=l);}}return{mantissaDigits:i,integerDigits:a};}function o(e){e=e.trim();var t=parseInt(e,10);return!isNaN(t)&&t.toString()===e;}function s(e){if(!isFinite(e))return 0;for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,++r;return r;}function u(e,t){return parseFloat(e.toPrecision(t));}r.d(t,\"c\",function(){return i;}),r.d(t,\"a\",function(){return a;}),r.d(t,\"d\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"e\",function(){return u;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&new Error().stack;n=e;},get useDeprecatedSynchronousErrorHandling(){return n;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"c\",function(){return u;});var n=r(0),i=r(1);function a(){return a.zero();}!function(e){e.zero=function(){return{x:0,y:0,width:0,height:0};},e.create=function(e,t,r,n){return{x:e,y:t,width:r,height:n};},e.clone=function(e){return Object(n.__assign)({},e);},e.copy=function(e,t){return Object.assign(e,t);},e.set=function(e,t,r,n,i){return e.x=t,e.y=r,e.width=n,e.height=i,e;},e.toVec4=function(e,t){return e[0]=t.x,e[1]=t.y,e[2]=t.width,e[3]=t.height,e;},e.equals=function(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height;};}(a||(a={}));var o=Object(i.Vec4)();function s(e,t,r,n){var a=r.x,s=r.y,u=r.width,c=r.height;i.Vec4.set(o,t[0],t[1],t[2],1),i.Vec4.transformMat4(o,o,n);var l=o[3];return 0!==l&&(o[0]/=l,o[1]/=l,o[2]/=l),e[0]=a+u/2*o[0]+(0+u/2),e[1]=s+c/2*o[1]+(0+c/2),e[2]=.5*o[2]+.5,e[3]=0===l?0:1/l,e;}function u(e,t,r,n){var a=r.x,o=r.y,s=r.width,u=r.height,c=t[0]-a,l=u-t[1]-1-o,d=t[2];return e[0]=2*c/s-1,e[1]=2*l/u-1,e[2]=2*d-1,i.Vec3.transformMat4(e,e,n);}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return l;}),r.d(t,\"a\",function(){return d;}),r.d(t,\"b\",function(){return y;});var n,i=r(0),a=r(16),o=r(316),s=r(157),u=r(114),c=\"undefined\"==typeof document?r(428):XMLHttpRequest;function l(e,t){return g(e,t);}function d(e){return\"string\"==typeof e?b(e,e,\"string\"):b(e.title,e.url,e.type||\"string\",e.body,e.headers);}function f(e){return e?\"Failed to download data. Possible reasons: Resource is not available, or CORS is not allowed on the server.\":\"Failed to open file.\";}function p(e,t,r){return new Promise(function(n,i){if(function(e){if(e instanceof FileReader)return e.readyState===FileReader.DONE;if(e instanceof XMLHttpRequest)return e.readyState===XMLHttpRequest.DONE;throw new Error(\"unknown data type\");}(r)){var a=r.error;null!=a?i(null!=a?a:f(r instanceof XMLHttpRequest)):n(r);}else{var o=!1;r.onerror=function(e){if(!o){var t=e.target.error;i(null!=t?t:f(r instanceof XMLHttpRequest));}},r.onprogress=function(r){if(e.shouldUpdate&&!o)try{r.lengthComputable?e.update({message:t,isIndeterminate:!1,current:r.loaded,max:r.total}):e.update({message:t+\" \"+(r.loaded/1024/1024).toFixed(2)+\" MB\",isIndeterminate:!0});}catch(r){o=!0,i(r);}},r.onload=function(e){n(r);};}});}function m(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var a,s;return Object(i.__generator)(this,function(i){switch(i.label){case 0:switch(r){case n.None:return[3,1];case n.Gzip:return[3,2];case n.Zip:return[3,3];}return[3,5];case 1:return[2,t];case 2:return[2,Object(o.a)(e,t)];case 3:return[4,Object(o.b)(e,t.buffer)];case 4:if(a=i.sent(),1!==(s=Object.keys(a)).length)throw new Error(\"can only decompress zip files with a single entry\");return[2,a[s[0]]];case 5:return[2];}});});}function h(e,t,r,a){return Object(i.__awaiter)(this,void 0,void 0,function(){var u,c,l;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(u=t.result,null===(c=u instanceof ArrayBuffer?new Uint8Array(u):u))throw new Error(\"no data given\");if(a===n.None)return[3,4];if(!(c instanceof Uint8Array))throw new Error(\"need Uint8Array for decompression\");return[4,m(e,c,a)];case 1:return l=i.sent(),\"string\"!==r?[3,3]:[4,e.update({message:\"Decoding text...\"})];case 2:return i.sent(),c=Object(s.b)(l,0,l.length),[3,4];case 3:c=l,i.label=4;case 4:return\"binary\"===r&&c instanceof Uint8Array?[2,c]:[3,5];case 5:return\"zip\"===r&&c instanceof Uint8Array?[4,Object(o.b)(e,c.buffer)]:[3,7];case 6:return[2,i.sent()];case 7:if(\"string\"===r&&\"string\"==typeof c)return[2,c];if(\"xml\"===r&&\"string\"==typeof c)return[2,new DOMParser().parseFromString(c,\"application/xml\")];if(\"json\"===r&&\"string\"==typeof c)return[2,JSON.parse(c)];i.label=8;case 8:throw new Error(\"could not get requested response data '\"+r+\"'\");}});});}function g(e,t){var r=this,o=void 0;return a.b.create(\"Read File\",function(a){return Object(i.__awaiter)(r,void 0,void 0,function(){var r,s;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,,5,6]),o=new FileReader(),r=\"zip\"===t?n.None:(u=e.name,/\\.gz$/i.test(u)?n.Gzip:/\\.zip$/i.test(u)?n.Zip:n.None),\"binary\"===t||\"zip\"===t||r!==n.None?o.readAsArrayBuffer(e):o.readAsText(e),[4,a.update({message:\"Opening file...\",canAbort:!0})];case 1:return i.sent(),[4,p(a,\"Reading...\",o)];case 2:return s=i.sent(),[4,a.update({message:\"Processing file...\",canAbort:!1})];case 3:return i.sent(),[4,h(a,s,t,r)];case 4:return[2,i.sent()];case 5:return o=void 0,[7];case 6:return[2];}var u;});});},function(){o&&o.abort();});}!function(e){e[e.None=0]=\"None\",e[e.Gzip=1]=\"Gzip\",e[e.Zip=2]=\"Zip\";}(n||(n={}));var v=function(){function e(){}return e.get=function(){return this.pool.length?this.pool.pop():new c();},e.emptyFunc=function(){},e.deposit=function(t){this.pool.length<this.poolSize&&(t.onabort=e.emptyFunc,t.onerror=e.emptyFunc,t.onload=e.emptyFunc,t.onprogress=e.emptyFunc,this.pool.push(t));},e.pool=[],e.poolSize=15,e;}();function b(e,t,r,n,o){var s=this,u=void 0;return a.b.create(e||\"Download\",function(e){return Object(i.__awaiter)(s,void 0,void 0,function(){var a,s,c,l,d,f;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if((u=v.get()).open(n?\"post\":\"get\",t,!0),o)for(a=0,s=o;a<s.length;a++)c=s[a],l=c[0],d=c[1],u.setRequestHeader(l,d);return u.responseType=function(e){switch(e){case\"json\":return\"json\";case\"xml\":return\"document\";case\"string\":return\"text\";case\"binary\":case\"zip\":return\"arraybuffer\";}}(r),u.send(n),[4,e.update({message:\"Waiting for server...\",canAbort:!0})];case 1:return i.sent(),[4,p(e,\"Downloading...\",u)];case 2:return f=i.sent(),u=void 0,[4,e.update({message:\"Parsing response...\",canAbort:!1})];case 3:return i.sent(),[2,function(e,t){if(e.status>=200&&e.status<400){var r=e.response;if(v.deposit(e),(\"binary\"===t||\"zip\"===t)&&r instanceof ArrayBuffer)return new Uint8Array(r);if(\"string\"===t&&\"string\"==typeof r)return r;if(\"xml\"===t&&r instanceof XMLDocument)return r;if(\"json\"===t&&\"object\"==typeof_default()(r))return r;throw new Error(\"could not get requested response data '\"+t+\"'\");}throw v.deposit(e),new Error(\"Download failed with status code \"+e.status);}(f,r)];}});});},function(){u&&(u.abort(),u=void 0);});}function y(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){var a,o,s,c,l,d,f,p,m,h,g,v;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return a=r.length,o=new Array(r.length),[4,e.update({message:\"Downloading...\",current:0,max:a})];case 1:for(i.sent(),s=[],c=[],l=0,d=Math.min(a,n);l<d;l++)g=r[l],s.push(S(l,g.id,t.resolve(u.Asset.getUrlAsset(t,g.url),g.isBinary?\"binary\":\"string\").runAsChild(e))),c.push(l);f=0,i.label=2;case 2:return s.length>0?[4,Promise.race(s)]:[3,6];case 3:if(p=i.sent(),m=r[p.index],h=c.indexOf(p.index),f++,\"error\"===p.kind&&!m.canFail)throw new Error(m.url+\": \"+p.error);return e.shouldUpdate?[4,e.update({message:\"Downloading...\",current:f,max:a})]:[3,5];case 4:i.sent(),i.label=5;case 5:return o[p.index]=p,s=s.filter(_,h),c=c.filter(_,h),l<a&&(g=r[l],v=t.resolve(u.Asset.getUrlAsset(t,g.url),g.isBinary?\"binary\":\"string\").runAsChild(e),s.push(S(l,g.id,v)),c.push(l),l++),[3,2];case 6:return[2,o];}});});}function _(e,t){return this!==t;}function S(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){return Object(i.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r];case 1:return[2,{kind:\"ok\",result:n.sent(),index:e,id:t}];case 2:return[2,{kind:\"error\",error:n.sent(),index:e,id:t}];case 3:return[2];}});});}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"f\",function(){return u;}),r.d(t,\"e\",function(){return c;}),r.d(t,\"d\",function(){return d;}),r.d(t,\"a\",function(){return f;}),r.d(t,\"c\",function(){return h;});var n,i,a=r(24),o=Object(a.ColorMap)({Blue:37052,Green:42577,Yellow:16765952,Orange:16021792,Pink:16162465,Purple:10830745,LightBlue:9424105,Brown:10582605,Red:15539236,Secondary:15854817});(n={})[0]=\"Hexose\",n[1]=\"HexNAc\",n[2]=\"Hexosamine\",n[3]=\"Hexuronate\",n[4]=\"Deoxyhexose\",n[5]=\"DeoxyhexNAc\",n[6]=\"Di-deoxyhexose\",n[7]=\"Pentose\",n[8]=\"Deoxynonulosonate\",n[9]=\"Di-deoxynonulosonate\",n[10]=\"Unknown\",n[11]=\"Assigned\";var s=((i={})[0]=0,i[1]=1,i[2]=2,i[3]=3,i[4]=4,i[5]=5,i[6]=6,i[7]=7,i[8]=8,i[9]=9,i[10]=10,i[11]=11,i);function u(e,t){return 10===e?4===t?12:5===t?13:6===t?14:7===t?15:10:s[e];}var c={abbr:\"Unk\",name:\"Unknown\",color:o.Secondary,type:10},l=[{abbr:\"Glc\",name:\"Glucose\",color:o.Blue,type:0},{abbr:\"Man\",name:\"Mannose\",color:o.Green,type:0},{abbr:\"Gal\",name:\"Galactose\",color:o.Yellow,type:0},{abbr:\"Gul\",name:\"Gulose\",color:o.Orange,type:0},{abbr:\"Alt\",name:\"Altrose\",color:o.Pink,type:0},{abbr:\"All\",name:\"Allose\",color:o.Purple,type:0},{abbr:\"Tal\",name:\"Talose\",color:o.LightBlue,type:0},{abbr:\"Ido\",name:\"Idose\",color:o.Brown,type:0},{abbr:\"GlcNAc\",name:\"N-Acetyl Glucosamine\",color:o.Blue,type:1},{abbr:\"ManNAc\",name:\"N-Acetyl Mannosamine\",color:o.Green,type:1},{abbr:\"GalNAc\",name:\"N-Acetyl Galactosamine\",color:o.Yellow,type:1},{abbr:\"GulNAc\",name:\"N-Acetyl Gulosamine\",color:o.Orange,type:1},{abbr:\"AltNAc\",name:\"N-Acetyl Altrosamine\",color:o.Pink,type:1},{abbr:\"AllNAc\",name:\"N-Acetyl Allosamine\",color:o.Purple,type:1},{abbr:\"TalNAc\",name:\"N-Acetyl Talosamine\",color:o.LightBlue,type:1},{abbr:\"IdoNAc\",name:\"N-Acetyl Idosamine\",color:o.Brown,type:1},{abbr:\"GlcN\",name:\"Glucosamine\",color:o.Blue,type:2},{abbr:\"ManN\",name:\"Mannosamine\",color:o.Green,type:2},{abbr:\"GalN\",name:\"Galactosamine\",color:o.Yellow,type:2},{abbr:\"GulN\",name:\"Gulosamine\",color:o.Orange,type:2},{abbr:\"AltN\",name:\"Altrosamine\",color:o.Pink,type:2},{abbr:\"AllN\",name:\"Allosamine\",color:o.Purple,type:2},{abbr:\"TalN\",name:\"Talosamine\",color:o.LightBlue,type:2},{abbr:\"IdoN\",name:\"Idosamine\",color:o.Brown,type:2},{abbr:\"GlcA\",name:\"Glucuronic Acid\",color:o.Blue,type:3},{abbr:\"ManA\",name:\"Mannuronic Acid\",color:o.Green,type:3},{abbr:\"GalA\",name:\"Galacturonic Acid\",color:o.Yellow,type:3},{abbr:\"GulA\",name:\"Guluronic Acid\",color:o.Orange,type:3},{abbr:\"AltA\",name:\"Altruronic Acid\",color:o.Pink,type:3},{abbr:\"AllA\",name:\"Alluronic Acid\",color:o.Purple,type:3},{abbr:\"TalA\",name:\"Taluronic Acid\",color:o.LightBlue,type:3},{abbr:\"IdoA\",name:\"Iduronic Acid\",color:o.Brown,type:3},{abbr:\"Qui\",name:\"Quinovose\",color:o.Blue,type:4},{abbr:\"Rha\",name:\"Rhamnose\",color:o.Green,type:4},{abbr:\"6dGul\",name:\"6-Deoxy Gulose\",color:o.Orange,type:4},{abbr:\"6dAlt\",name:\"6-Deoxy Altrose\",color:o.Pink,type:4},{abbr:\"6dTal\",name:\"6-Deoxy Talose\",color:o.LightBlue,type:4},{abbr:\"Fuc\",name:\"Fucose\",color:o.Red,type:4},{abbr:\"QuiNAc\",name:\"N-Acetyl Quinovosamine\",color:o.Blue,type:5},{abbr:\"RhaNAc\",name:\"N-Acetyl Rhamnosamine\",color:o.Green,type:5},{abbr:\"6dAltNAc\",name:\"N-Acetyl 6-Deoxy Altrosamine\",color:o.Pink,type:5},{abbr:\"6dTalNAc\",name:\"N-Acetyl 6-Deoxy Talosamine\",color:o.LightBlue,type:5},{abbr:\"FucNAc\",name:\"N-Acetyl Fucosamine\",color:o.Red,type:5},{abbr:\"Oli\",name:\"Olivose\",color:o.Blue,type:6},{abbr:\"Tyv\",name:\"Tyvelose\",color:o.Green,type:6},{abbr:\"Abe\",name:\"Abequose\",color:o.Orange,type:6},{abbr:\"Par\",name:\"Paratose\",color:o.Pink,type:6},{abbr:\"Dig\",name:\"Digitoxose\",color:o.Purple,type:6},{abbr:\"Col\",name:\"Colitose\",color:o.LightBlue,type:6},{abbr:\"Ara\",name:\"Arabinose\",color:o.Green,type:7},{abbr:\"Lyx\",name:\"Lyxose\",color:o.Yellow,type:7},{abbr:\"Xyl\",name:\"Xylose\",color:o.Orange,type:7},{abbr:\"Rib\",name:\"Ribose\",color:o.Pink,type:7},{abbr:\"Kdn\",name:\"Keto-Deoxy Nonulonic Acid\",color:o.Green,type:8},{abbr:\"Neu5Ac\",name:\"N-Acetyl Neuraminic Acid\",color:o.Purple,type:8},{abbr:\"Neu5Gc\",name:\"N-Glycolyl Neuraminic Acid\",color:o.LightBlue,type:8},{abbr:\"Neu\",name:\"Neuraminic Acid\",color:o.Brown,type:8},{abbr:\"Sia\",name:\"Sialic acid\",color:o.Red,type:8},{abbr:\"Pse\",name:\"Pseudaminic Acid\",color:o.Green,type:9},{abbr:\"Leg\",name:\"Legionaminic Acid\",color:o.Yellow,type:9},{abbr:\"Aci\",name:\"Acinetaminic Acid\",color:o.Pink,type:9},{abbr:\"4eLeg\",name:\"4-Epilegionaminic Acid\",color:o.LightBlue,type:9},{abbr:\"Bac\",name:\"Bacillosamine\",color:o.Blue,type:10},{abbr:\"LDmanHep\",name:\"L-Glycero-D-Manno Heptose\",color:o.Green,type:10},{abbr:\"Kdo\",name:\"Keto-Deoxy Octulonic Acid\",color:o.Yellow,type:10},{abbr:\"Dha\",name:\"3-Deoxy Lyxo-Heptulosaric Acid\",color:o.Orange,type:10},{abbr:\"DDmanHep\",name:\"D-Glycero-D-Manno-Heptose\",color:o.Pink,type:10},{abbr:\"MurNAc\",name:\"N-Acetyl Muramic Acid\",color:o.Purple,type:10},{abbr:\"MurNGc\",name:\"N-Glycolyl Muramic Acid\",color:o.LightBlue,type:10},{abbr:\"Mur\",name:\"Muramic Acid\",color:o.Brown,type:10},{abbr:\"Api\",name:\"Apicose\",color:o.Green,type:11},{abbr:\"Fru\",name:\"Fructose\",color:o.Green,type:11},{abbr:\"Tag\",name:\"Tagatose\",color:o.Yellow,type:11},{abbr:\"Sor\",name:\"Sorbose\",color:o.Orange,type:11},{abbr:\"Psi\",name:\"Psicose\",color:o.Pink,type:11}],d=function(){for(var e=new Map(),t=0,r=l.length;t<r;++t){var n=l[t];e.set(n.abbr,n);}return e;}(),f=[[\"Glc-family\",o.Blue],[\"Man-family\",o.Green],[\"Gal-family\",o.Yellow],[\"Gul-family\",o.Orange],[\"Alt-family\",o.Pink],[\"All-family\",o.Purple],[\"Tal-family\",o.LightBlue],[\"Ido-family\",o.Brown],[\"Fuc-family\",o.Red],[\"Generic/Unknown/Secondary\",o.Secondary]],p={Glc:[\"GLC\",\"BGC\",\"Z8T\",\"TRE\",\"MLR\"],Man:[\"MAN\",\"BMA\"],Gal:[\"GLA\",\"GAL\",\"GZL\",\"GXL\",\"GIV\"],Gul:[\"4GL\",\"GL0\",\"GUP\",\"Z8H\"],Alt:[\"Z6H\",\"3MK\",\"SHD\"],All:[\"AFD\",\"ALL\",\"WOO\",\"Z2D\"],Tal:[\"ZEE\",\"A5C\",\"SDY\"],Ido:[\"ZCD\",\"Z0F\",\"4N2\"],GlcNAc:[\"NDG\",\"NAG\",\"NGZ\"],ManNAc:[\"BM3\",\"BM7\"],GalNAc:[\"A2G\",\"NGA\",\"YYQ\"],GulNAc:[\"LXB\"],AltNAc:[],AllNAc:[\"NAA\"],TalNAc:[],IdoNAc:[\"LXZ\",\"HSQ\"],GlcN:[\"PA1\",\"GCS\"],ManN:[\"95Z\"],GalN:[\"X6X\",\"1GN\"],GulN:[],AltN:[],AllN:[],TalN:[],IdoN:[],GlcA:[\"GCU\",\"BDP\"],ManA:[\"MAV\",\"BEM\"],GalA:[\"ADA\",\"GTR\",\"GTK\"],GulA:[\"LGU\"],AltA:[],AllA:[],TalA:[\"X1X\",\"X0X\"],IdoA:[\"IDR\"],Qui:[\"G6D\",\"YYK\"],Rha:[\"RAM\",\"RM4\",\"XXR\"],\"6dGul\":[\"66O\"],\"6dAlt\":[],\"6dTal\":[],Fuc:[\"FUC\",\"FUL\",\"FCA\",\"FCB\",\"GYE\"],QuiNAc:[\"Z9W\"],RhaNAc:[],\"6dAltNAc\":[],\"6dTalNAc\":[],FucNAc:[\"49T\"],Oli:[\"DDA\",\"RAE\",\"Z5J\"],Tyv:[\"TYV\"],Abe:[\"ABE\"],Par:[\"PZU\"],Dig:[\"Z3U\"],Col:[],Ara:[\"64K\",\"ARA\",\"ARB\",\"AHR\",\"FUB\",\"BXY\",\"BXX\",\"SEJ\"],Lyx:[\"LDY\",\"Z4W\"],Xyl:[\"XYS\",\"XYP\",\"XYZ\",\"HSY\",\"LXC\"],Rib:[\"YYM\",\"RIP\",\"RIB\",\"BDR\",\"0MK\",\"Z6J\",\"32O\"],Kdn:[\"KDM\",\"KDN\"],Neu5Ac:[\"SIA\",\"SLB\"],Neu5Gc:[\"NGC\",\"NGE\"],Neu:[],Sia:[],Pse:[],Leg:[],Aci:[],\"4eLeg\":[],Bac:[],LDmanHep:[\"GMH\"],Kdo:[\"KDO\"],Dha:[],DDmanHep:[\"289\"],MurNAc:[\"MUB\",\"AMU\"],MurNGc:[],Mur:[\"1S4\",\"MUR\"],Api:[\"XXM\"],Fru:[\"BDF\",\"Z9N\",\"FRU\",\"LFR\"],Tag:[\"T6T\"],Sor:[\"SOE\",\"UEA\"],Psi:[\"PSV\",\"SF6\",\"SF9\",\"TTV\"]},m=[\"NGZ\",\"LAT\",\"PUF\",\"GDA\",\"9WJ\"],h=function(){for(var e=new Map(),t=0,r=l.length;t<r;++t){var n=l[t],i=p[n.abbr];if(i)for(var a=0,o=i.length;a<o;++a)e.set(i[a],n);}for(t=0,r=m.length;t<r;++t)e.set(m[t],c);return e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"b\",function(){return a;});var n=r(357);function i(e){return e;}function a(e,t){if(\"bcif\"===e.ext)try{if(Object(n.a)(t).encoder.startsWith(\"VolumeServer\"))return\"dscif\";}catch(e){}else if(\"cif\"===e.ext){var r=t;if(r.startsWith(\"data_SERVER\\n#\\n_density_server_result\"))return\"dscif\";if(r.includes(\"atom_site_fract_x\")||r.includes(\"atom_site.fract_x\"))return\"coreCif\";}return-1;}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"RxEventHelper\",function(){return n;});var n,i=r(60),a=r(278);!function(e){e.create=function(){var e=new o(),t=function t(){return e.create();};return t.dispose=function(){return e.dispose();},t.behavior=function(t){return e.behavior(t);},t;};}(n||(n={}));var o=function(){function e(){this._eventList=[],this._disposed=!1;}return e.prototype.create=function(){var e=new i.a();return this._eventList.push(e),e;},e.prototype.behavior=function(e){var t=new a.a(e);return this._eventList.push(t),t;},e.prototype.dispose=function(){if(!this._disposed){for(var e=0,t=this._eventList;e<t.length;e++){t[e].complete();}this._disposed=!0;}},e;}();},function(e,t,r){\"use strict\";function n(e){return e;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return u;}),r.d(t,\"c\",function(){return c;}),r.d(t,\"d\",function(){return l;});var n=r(5),i=r(1),a=r(30);function o(e,t,r){if(r){n.e.update(r.matrix,r.matrix.ref.value),n.e.update(r.transform,e),n.e.update(r.uInstanceCount,t),n.e.update(r.instanceCount,t);var o=r.aTransform.ref.value.length>=16*t?r.aTransform.ref.value:new Float32Array(16*t);o.set(e),n.e.update(r.aTransform,o);var s=r.extraTransform.ref.value.length>=16*t?r.extraTransform.ref.value:new Float32Array(16*t);n.e.update(r.extraTransform,c(s,t));var u=r.aInstance.ref.value.length>=t?r.aInstance.ref.value:new Float32Array(t);return n.e.update(r.aInstance,Object(a.fillSerial)(u,t)),l(r),r;}return{aTransform:n.e.create(new Float32Array(e)),matrix:n.e.create(i.Mat4.identity()),transform:n.e.create(e),extraTransform:n.e.create(c(new Float32Array(16*t),t)),uInstanceCount:n.e.create(t),instanceCount:n.e.create(t),aInstance:n.e.create(Object(a.fillSerial)(new Float32Array(t)))};}var s=new Float32Array(16);function u(e){return o(new Float32Array(s),1,e);}function c(e,t){for(var r=0;r<t;r++)e.set(s,16*r);return e;}function l(e){for(var t=e.aTransform.ref.value,r=e.instanceCount.ref.value,a=e.matrix.ref.value,o=e.transform.ref.value,s=e.extraTransform.ref.value,u=0;u<r;u++){var c=16*u;i.Mat4.mulOffset(t,s,o,c,c,c),i.Mat4.mulOffset(t,a,t,c,0,c);}n.e.update(e.aTransform,t);}i.Mat4.toArray(i.Mat4.identity(),s,0);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"UpdateTransformControl\",function(){return u;}),r.d(t,\"TransformUpdaterControl\",function(){return c;});var n=r(0),i=r(155),a=r(286),o=r(3),s=r(32),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._getInfo=Object(i.b)(function(e){return a.a.infoFromTransform(t.plugin,t.props.state,e);}),t.state={error:void 0,isInitial:!0,params:t.getInfo().initialValues,busy:!1,isCollapsed:t.props.initiallyCollapsed},t;}return Object(n.__extends)(t,e),t.prototype.applyAction=function(){return this.props.customUpdate?this.props.customUpdate(this.state.params):this.plugin.state.updateTransform(this.props.state,this.props.transform.ref,this.state.params);},t.prototype.getInfo=function(){return this._getInfo(this.props.transform);},t.prototype.getTransformerId=function(){return this.props.transform.transformer.id;},t.prototype.getHeader=function(){return this.props.customHeader||this.props.transform.transformer.definition.display;},t.prototype.canApply=function(){var e=this.props.state,t=e.cells.get(this.props.transform.ref);if(!t)return!1;if(\"error\"===t.status){var r=e.cells.get(this.props.transform.parent);return!!r&&\"ok\"===r.status;}return!this.state.error&&!this.state.busy&&!this.state.isInitial;},t.prototype.applyText=function(){return this.canApply()?\"Update\":\"Nothing to Update\";},t.prototype.isUpdate=function(){return!0;},t.prototype.getSourceAndTarget=function(){var e=this.props.state.cells.get(this.props.transform.ref);return{a:this.props.state.cells.get(this.props.transform.parent).obj,b:null==e?void 0:e.obj,bCell:e};},t.prototype.canAutoApply=function(e){var t=this.props.transform.transformer.definition.canAutoUpdate;if(!t)return!1;var r=this.props.state,n=r.cells.get(this.props.transform.ref);return!(!n||!n.sourceRef||\"ok\"!==n.status)&&t({a:r.cells.get(n.sourceRef).obj,b:n.obj,oldParams:this.getInfo().initialValues,newParams:e},this.plugin);},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.props.toggleCollapsed&&this.subscribe(this.props.toggleCollapsed,function(){return t.setState({isCollapsed:!t.state.isCollapsed});}),this.subscribe(this.plugin.state.events.object.updated,function(e){var r=e.ref,n=e.state;t.props.transform.ref===r&&t.props.state===n&&t.state.params!==t.props.transform.params&&(t._getInfo=Object(i.b)(function(e){return a.a.infoFromTransform(t.plugin,t.props.state,e);}),t.setState({params:t.props.transform.params,isInitial:!0}));});},t.prototype.componentDidUpdate=function(e){var t;if(this.props.transform!==e.transform){var r=this.props.state.cells.get(this.props.transform.ref);this.setState({params:(null===(t=r.params)||void 0===t?void 0:t.values)||{},isInitial:!0,error:void 0,simpleOnly:this.state.simpleOnly});}},t;}(a.b),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.object.updated,function(t){var r=t.ref,n=t.state;e.props.nodeRef===r&&e.plugin.state.data===n&&e.forceUpdate();});},t.prototype.render=function(){var e=this.plugin.state.data,t=this.props.nodeRef,r=e.cells.get(t);if(!r||\"ok\"!==r.status&&\"error\"!==r.status)return null;var n=r.transform;return o.createElement(u,{state:e,transform:n,initiallyCollapsed:this.props.initiallyCollapsed,customHeader:this.props.header});},t;}(s.PluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return i;}),r.d(t,\"a\",function(){return a;}),r.d(t,\"c\",function(){return s;});var n=r(1);function i(e,t){return{vertices:e,edges:t};}function a(e){return{vertices:new Float32Array(e.vertices),edges:new Uint32Array(e.edges)};}var o=n.Vec3.zero();function s(e,t){for(var r=e.vertices,i=0,a=r.length;i<a;i+=3)n.Vec3.transformMat4(o,n.Vec3.fromArray(o,r,i),t),n.Vec3.toArray(o,r,i);return e;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(1),i=r(6),a=r(126),o=r(11),s=new a.a(\"14\"),u=new a.a(\"98\");function c(e){var t=e.x,r=e.y,a=e.z,c=e.radius,l=e.indices,d=Object(n.Vec3)(),f=i.OrderedSet.size(l),p=f>1e4?s:u;p.reset();for(var m=0;m<f;m++){var h=i.OrderedSet.getAt(l,m);n.Vec3.set(d,t[h],r[h],a[h]),p.includePositionRadius(d,c&&c[h]||0);}p.finishedIncludeStep();for(m=0;m<f;m++){h=i.OrderedSet.getAt(l,m);n.Vec3.set(d,t[h],r[h],a[h]),p.radiusPositionRadius(d,c&&c[h]||0);}var g=p.getSphere();if(!c&&o.g.hasExtrema(g)&&f<=g.extrema.length){var v=[];for(m=0;m<f;m++){h=i.OrderedSet.getAt(l,m);v.push(n.Vec3.create(t[h],r[h],a[h]));}o.g.setExtrema(g,v);}return{box:p.getBox(),sphere:g};}},function(e,t,r){\"use strict\";function n(e,t){return{start:t&&void 0!==t.start?Math.max(Math.min(t.start,e-1),0):0,end:t&&void 0!==t.end?Math.min(t.end,e):e};}function i(e,t){var r=t&&void 0!==t.array?t.array:Array,i=n(e,t),a=i.start,o=i.end;return{array:new r(o-a),start:a,end:o};}function a(e,t,r){for(var n=0,i=t.length;n<i;n++)t[n]=e(r+n);return t;}function o(e,t,r){var n=i(e,r);return a(t,n.array,n.start);}function s(e){return!!e.buffer&&\"number\"==typeof e.byteLength&&\"number\"==typeof e.BYTES_PER_ELEMENT;}function u(e,t){var r=e.constructor,i=e.buffer,a=e.length,o=e.byteOffset,s=e.BYTES_PER_ELEMENT,u=n(a,t),c=u.start,l=u.end;return 0===c&&l===a?e:new r(i,o+s*c,Math.min(a,l-c));}r.r(t),r.d(t,\"getArrayBounds\",function(){return n;}),r.d(t,\"createArray\",function(){return i;}),r.d(t,\"fillArrayValues\",function(){return a;}),r.d(t,\"createAndFillArray\",function(){return o;}),r.d(t,\"isTypedArray\",function(){return s;}),r.d(t,\"typedArrayWindow\",function(){return u;});},function(e,t,r){\"use strict\";function n(e,t,r){return{i:e,j:t,k:r};}function i(e,t){return{a:e,b:t};}r.d(t,\"b\",function(){return o;}),r.d(t,\"c\",function(){return s;}),r.d(t,\"d\",function(){return u;}),r.d(t,\"e\",function(){return c;}),r.d(t,\"a\",function(){return l;});var a=[n(0,0,0),n(1,0,0),n(1,1,0),n(0,1,0),n(0,0,1),n(1,0,1),n(1,1,1),n(0,1,1)],o=[i(a[0],a[1]),i(a[1],a[2]),i(a[2],a[3]),i(a[3],a[0]),i(a[4],a[5]),i(a[5],a[6]),i(a[6],a[7]),i(a[7],a[4]),i(a[0],a[4]),i(a[1],a[5]),i(a[2],a[6]),i(a[3],a[7])],s=[{i:0,j:0,k:0,e:0},{i:1,j:0,k:0,e:1},{i:0,j:1,k:0,e:0},{i:0,j:0,k:0,e:1},{i:0,j:0,k:1,e:0},{i:1,j:0,k:1,e:1},{i:0,j:1,k:1,e:0},{i:0,j:0,k:1,e:1},{i:0,j:0,k:0,e:2},{i:1,j:0,k:0,e:2},{i:1,j:1,k:0,e:2},{i:0,j:1,k:0,e:2}],u=[0,265,515,778,1030,1295,1541,1804,2060,2309,2575,2822,3082,3331,3593,3840,400,153,915,666,1430,1183,1941,1692,2460,2197,2975,2710,3482,3219,3993,3728,560,825,51,314,1590,1855,1077,1340,2620,2869,2111,2358,3642,3891,3129,3376,928,681,419,170,1958,1711,1445,1196,2988,2725,2479,2214,4010,3747,3497,3232,1120,1385,1635,1898,102,367,613,876,3180,3429,3695,3942,2154,2403,2665,2912,1520,1273,2035,1786,502,255,1013,764,3580,3317,4095,3830,2554,2291,3065,2800,1616,1881,1107,1370,598,863,85,348,3676,3925,3167,3414,2650,2899,2137,2384,1984,1737,1475,1226,966,719,453,204,4044,3781,3535,3270,3018,2755,2505,2240,2240,2505,2755,3018,3270,3535,3781,4044,204,453,719,966,1226,1475,1737,1984,2384,2137,2899,2650,3414,3167,3925,3676,348,85,863,598,1370,1107,1881,1616,2800,3065,2291,2554,3830,4095,3317,3580,764,1013,255,502,1786,2035,1273,1520,2912,2665,2403,2154,3942,3695,3429,3180,876,613,367,102,1898,1635,1385,1120,3232,3497,3747,4010,2214,2479,2725,2988,1196,1445,1711,1958,170,419,681,928,3376,3129,3891,3642,2358,2111,2869,2620,1340,1077,1855,1590,314,51,825,560,3728,3993,3219,3482,2710,2975,2197,2460,1692,1941,1183,1430,666,915,153,400,3840,3593,3331,3082,2822,2575,2309,2060,1804,1541,1295,1030,778,515,265,0],c=[[],[0,8,3],[0,1,9],[1,8,3,9,8,1],[1,2,10],[0,8,3,1,2,10],[9,2,10,0,2,9],[2,8,3,2,10,8,10,9,8],[3,11,2],[0,11,2,8,11,0],[1,9,0,2,3,11],[1,11,2,1,9,11,9,8,11],[3,10,1,11,10,3],[0,10,1,0,8,10,8,11,10],[3,9,0,3,11,9,11,10,9],[9,8,10,10,8,11],[4,7,8],[4,3,0,7,3,4],[0,1,9,8,4,7],[4,1,9,4,7,1,7,3,1],[1,2,10,8,4,7],[3,4,7,3,0,4,1,2,10],[9,2,10,9,0,2,8,4,7],[2,10,9,2,9,7,2,7,3,7,9,4],[8,4,7,3,11,2],[11,4,7,11,2,4,2,0,4],[9,0,1,8,4,7,2,3,11],[4,7,11,9,4,11,9,11,2,9,2,1],[3,10,1,3,11,10,7,8,4],[1,11,10,1,4,11,1,0,4,7,11,4],[4,7,8,9,0,11,9,11,10,11,0,3],[4,7,11,4,11,9,9,11,10],[9,5,4],[9,5,4,0,8,3],[0,5,4,1,5,0],[8,5,4,8,3,5,3,1,5],[1,2,10,9,5,4],[3,0,8,1,2,10,4,9,5],[5,2,10,5,4,2,4,0,2],[2,10,5,3,2,5,3,5,4,3,4,8],[9,5,4,2,3,11],[0,11,2,0,8,11,4,9,5],[0,5,4,0,1,5,2,3,11],[2,1,5,2,5,8,2,8,11,4,8,5],[10,3,11,10,1,3,9,5,4],[4,9,5,0,8,1,8,10,1,8,11,10],[5,4,0,5,0,11,5,11,10,11,0,3],[5,4,8,5,8,10,10,8,11],[9,7,8,5,7,9],[9,3,0,9,5,3,5,7,3],[0,7,8,0,1,7,1,5,7],[1,5,3,3,5,7],[9,7,8,9,5,7,10,1,2],[10,1,2,9,5,0,5,3,0,5,7,3],[8,0,2,8,2,5,8,5,7,10,5,2],[2,10,5,2,5,3,3,5,7],[7,9,5,7,8,9,3,11,2],[9,5,7,9,7,2,9,2,0,2,7,11],[2,3,11,0,1,8,1,7,8,1,5,7],[11,2,1,11,1,7,7,1,5],[9,5,8,8,5,7,10,1,3,10,3,11],[5,7,0,5,0,9,7,11,0,1,0,10,11,10,0],[11,10,0,11,0,3,10,5,0,8,0,7,5,7,0],[11,10,5,7,11,5],[10,6,5],[0,8,3,5,10,6],[9,0,1,5,10,6],[1,8,3,1,9,8,5,10,6],[1,6,5,2,6,1],[1,6,5,1,2,6,3,0,8],[9,6,5,9,0,6,0,2,6],[5,9,8,5,8,2,5,2,6,3,2,8],[2,3,11,10,6,5],[11,0,8,11,2,0,10,6,5],[0,1,9,2,3,11,5,10,6],[5,10,6,1,9,2,9,11,2,9,8,11],[6,3,11,6,5,3,5,1,3],[0,8,11,0,11,5,0,5,1,5,11,6],[3,11,6,0,3,6,0,6,5,0,5,9],[6,5,9,6,9,11,11,9,8],[5,10,6,4,7,8],[4,3,0,4,7,3,6,5,10],[1,9,0,5,10,6,8,4,7],[10,6,5,1,9,7,1,7,3,7,9,4],[6,1,2,6,5,1,4,7,8],[1,2,5,5,2,6,3,0,4,3,4,7],[8,4,7,9,0,5,0,6,5,0,2,6],[7,3,9,7,9,4,3,2,9,5,9,6,2,6,9],[3,11,2,7,8,4,10,6,5],[5,10,6,4,7,2,4,2,0,2,7,11],[0,1,9,4,7,8,2,3,11,5,10,6],[9,2,1,9,11,2,9,4,11,7,11,4,5,10,6],[8,4,7,3,11,5,3,5,1,5,11,6],[5,1,11,5,11,6,1,0,11,7,11,4,0,4,11],[0,5,9,0,6,5,0,3,6,11,6,3,8,4,7],[6,5,9,6,9,11,4,7,9,7,11,9],[10,4,9,6,4,10],[4,10,6,4,9,10,0,8,3],[10,0,1,10,6,0,6,4,0],[8,3,1,8,1,6,8,6,4,6,1,10],[1,4,9,1,2,4,2,6,4],[3,0,8,1,2,9,2,4,9,2,6,4],[0,2,4,4,2,6],[8,3,2,8,2,4,4,2,6],[10,4,9,10,6,4,11,2,3],[0,8,2,2,8,11,4,9,10,4,10,6],[3,11,2,0,1,6,0,6,4,6,1,10],[6,4,1,6,1,10,4,8,1,2,1,11,8,11,1],[9,6,4,9,3,6,9,1,3,11,6,3],[8,11,1,8,1,0,11,6,1,9,1,4,6,4,1],[3,11,6,3,6,0,0,6,4],[6,4,8,11,6,8],[7,10,6,7,8,10,8,9,10],[0,7,3,0,10,7,0,9,10,6,7,10],[10,6,7,1,10,7,1,7,8,1,8,0],[10,6,7,10,7,1,1,7,3],[1,2,6,1,6,8,1,8,9,8,6,7],[2,6,9,2,9,1,6,7,9,0,9,3,7,3,9],[7,8,0,7,0,6,6,0,2],[7,3,2,6,7,2],[2,3,11,10,6,8,10,8,9,8,6,7],[2,0,7,2,7,11,0,9,7,6,7,10,9,10,7],[1,8,0,1,7,8,1,10,7,6,7,10,2,3,11],[11,2,1,11,1,7,10,6,1,6,7,1],[8,9,6,8,6,7,9,1,6,11,6,3,1,3,6],[0,9,1,11,6,7],[7,8,0,7,0,6,3,11,0,11,6,0],[7,11,6],[7,6,11],[3,0,8,11,7,6],[0,1,9,11,7,6],[8,1,9,8,3,1,11,7,6],[10,1,2,6,11,7],[1,2,10,3,0,8,6,11,7],[2,9,0,2,10,9,6,11,7],[6,11,7,2,10,3,10,8,3,10,9,8],[7,2,3,6,2,7],[7,0,8,7,6,0,6,2,0],[2,7,6,2,3,7,0,1,9],[1,6,2,1,8,6,1,9,8,8,7,6],[10,7,6,10,1,7,1,3,7],[10,7,6,1,7,10,1,8,7,1,0,8],[0,3,7,0,7,10,0,10,9,6,10,7],[7,6,10,7,10,8,8,10,9],[6,8,4,11,8,6],[3,6,11,3,0,6,0,4,6],[8,6,11,8,4,6,9,0,1],[9,4,6,9,6,3,9,3,1,11,3,6],[6,8,4,6,11,8,2,10,1],[1,2,10,3,0,11,0,6,11,0,4,6],[4,11,8,4,6,11,0,2,9,2,10,9],[10,9,3,10,3,2,9,4,3,11,3,6,4,6,3],[8,2,3,8,4,2,4,6,2],[0,4,2,4,6,2],[1,9,0,2,3,4,2,4,6,4,3,8],[1,9,4,1,4,2,2,4,6],[8,1,3,8,6,1,8,4,6,6,10,1],[10,1,0,10,0,6,6,0,4],[4,6,3,4,3,8,6,10,3,0,3,9,10,9,3],[10,9,4,6,10,4],[4,9,5,7,6,11],[0,8,3,4,9,5,11,7,6],[5,0,1,5,4,0,7,6,11],[11,7,6,8,3,4,3,5,4,3,1,5],[9,5,4,10,1,2,7,6,11],[6,11,7,1,2,10,0,8,3,4,9,5],[7,6,11,5,4,10,4,2,10,4,0,2],[3,4,8,3,5,4,3,2,5,10,5,2,11,7,6],[7,2,3,7,6,2,5,4,9],[9,5,4,0,8,6,0,6,2,6,8,7],[3,6,2,3,7,6,1,5,0,5,4,0],[6,2,8,6,8,7,2,1,8,4,8,5,1,5,8],[9,5,4,10,1,6,1,7,6,1,3,7],[1,6,10,1,7,6,1,0,7,8,7,0,9,5,4],[4,0,10,4,10,5,0,3,10,6,10,7,3,7,10],[7,6,10,7,10,8,5,4,10,4,8,10],[6,9,5,6,11,9,11,8,9],[3,6,11,0,6,3,0,5,6,0,9,5],[0,11,8,0,5,11,0,1,5,5,6,11],[6,11,3,6,3,5,5,3,1],[1,2,10,9,5,11,9,11,8,11,5,6],[0,11,3,0,6,11,0,9,6,5,6,9,1,2,10],[11,8,5,11,5,6,8,0,5,10,5,2,0,2,5],[6,11,3,6,3,5,2,10,3,10,5,3],[5,8,9,5,2,8,5,6,2,3,8,2],[9,5,6,9,6,0,0,6,2],[1,5,8,1,8,0,5,6,8,3,8,2,6,2,8],[1,5,6,2,1,6],[1,3,6,1,6,10,3,8,6,5,6,9,8,9,6],[10,1,0,10,0,6,9,5,0,5,6,0],[0,3,8,5,6,10],[10,5,6],[11,5,10,7,5,11],[11,5,10,11,7,5,8,3,0],[5,11,7,5,10,11,1,9,0],[10,7,5,10,11,7,9,8,1,8,3,1],[11,1,2,11,7,1,7,5,1],[0,8,3,1,2,7,1,7,5,7,2,11],[9,7,5,9,2,7,9,0,2,2,11,7],[7,5,2,7,2,11,5,9,2,3,2,8,9,8,2],[2,5,10,2,3,5,3,7,5],[8,2,0,8,5,2,8,7,5,10,2,5],[9,0,1,5,10,3,5,3,7,3,10,2],[9,8,2,9,2,1,8,7,2,10,2,5,7,5,2],[1,3,5,3,7,5],[0,8,7,0,7,1,1,7,5],[9,0,3,9,3,5,5,3,7],[9,8,7,5,9,7],[5,8,4,5,10,8,10,11,8],[5,0,4,5,11,0,5,10,11,11,3,0],[0,1,9,8,4,10,8,10,11,10,4,5],[10,11,4,10,4,5,11,3,4,9,4,1,3,1,4],[2,5,1,2,8,5,2,11,8,4,5,8],[0,4,11,0,11,3,4,5,11,2,11,1,5,1,11],[0,2,5,0,5,9,2,11,5,4,5,8,11,8,5],[9,4,5,2,11,3],[2,5,10,3,5,2,3,4,5,3,8,4],[5,10,2,5,2,4,4,2,0],[3,10,2,3,5,10,3,8,5,4,5,8,0,1,9],[5,10,2,5,2,4,1,9,2,9,4,2],[8,4,5,8,5,3,3,5,1],[0,4,5,1,0,5],[8,4,5,8,5,3,9,0,5,0,3,5],[9,4,5],[4,11,7,4,9,11,9,10,11],[0,8,3,4,9,7,9,11,7,9,10,11],[1,10,11,1,11,4,1,4,0,7,4,11],[3,1,4,3,4,8,1,10,4,7,4,11,10,11,4],[4,11,7,9,11,4,9,2,11,9,1,2],[9,7,4,9,11,7,9,1,11,2,11,1,0,8,3],[11,7,4,11,4,2,2,4,0],[11,7,4,11,4,2,8,3,4,3,2,4],[2,9,10,2,7,9,2,3,7,7,4,9],[9,10,7,9,7,4,10,2,7,8,7,0,2,0,7],[3,7,10,3,10,2,7,4,10,1,10,0,4,0,10],[1,10,2,8,7,4],[4,9,1,4,1,7,7,1,3],[4,9,1,4,1,7,0,8,1,8,7,1],[4,0,3,7,4,3],[4,8,7],[9,10,8,10,11,8],[3,0,9,3,9,11,11,9,10],[0,1,10,0,10,8,8,10,11],[3,1,10,11,3,10],[1,2,11,1,11,9,9,11,8],[3,0,9,3,9,11,1,2,9,2,11,9],[0,2,11,8,0,11],[3,2,11],[2,3,8,2,8,10,10,8,9],[9,10,2,0,9,2],[2,3,8,2,8,10,0,1,8,1,10,8],[1,10,2],[1,3,8,9,1,8],[0,9,1],[0,3,8],[]],l=[[0,4,4,4,2,0,0,0,2,2,0,0],[4,0,4,4,0,8,0,0,0,8,8,0],[4,4,0,4,0,0,8,0,0,0,8,8],[4,4,4,0,0,0,0,1,1,0,0,1],[2,0,0,0,0,8,8,8,2,2,0,0],[0,8,0,0,8,0,8,8,0,8,8,0],[0,0,8,0,8,8,0,8,0,0,8,8],[0,0,0,1,8,8,8,0,1,0,0,1],[2,0,0,1,2,0,0,1,0,2,0,1],[2,8,0,0,2,8,0,0,2,0,8,0],[0,8,8,0,0,8,8,0,0,8,0,8],[0,0,8,1,0,0,8,1,1,0,8,0]];},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=function(){function e(){this.map=new Map(),this.applicable=new Map();}return e.prototype.add=function(e,t,r){this.map.set(e,t),r&&this.applicable.set(e,r);},e.prototype.remove=function(e){this.map.delete(e),this.applicable.delete(e);},e.prototype.get=function(e){return this.map.get(e);},e.prototype.isApplicable=function(e){var t=this.applicable.get(e.sourceData.kind);return!t||t(e);},e;}();!function(e){e.create=function(e){var t=e.name,r=new i();return{descriptor:e,formatRegistry:r,isApplicable:function isApplicable(e){return r.isApplicable(e);},get:function get(n){if(n._staticPropertyData[t])return n._staticPropertyData[t];if(!n.customProperties.has(e)){var i=r.get(n.sourceData.kind);if(i)return n._staticPropertyData[t]=i(n),n.customProperties.add(e),n._staticPropertyData[t];}},set:function set(e,r){e._staticPropertyData[t]=r;}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"BindingsHelp\",function(){return d;}),r.d(t,\"HelpText\",function(){return f;}),r.d(t,\"HelpGroup\",function(){return p;}),r.d(t,\"ViewportHelpContent\",function(){return h;}),r.d(t,\"HelpContent\",function(){return g;});var n=r(0),i=r(3),a=r(59),o=r(32),s=r(13),u=r(223),c=r(14),l=r(19);var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.getBindingComponents=function(){var e,t=(e=this.props.bindings,Object.keys(e).map(function(t){return[t,e[t]];}));return i.createElement(i.Fragment,null,t.map(function(e){var t=e[0],r=e[1];return a.a.isEmpty(r)?null:i.createElement(\"div\",{key:t,style:{marginBottom:\"6px\"}},i.createElement(\"b\",null,r.action),i.createElement(\"br\",null),i.createElement(\"span\",{dangerouslySetInnerHTML:{__html:a.a.format(r,t)}}));}));},t.prototype.render=function(){return i.createElement(f,null,this.getBindingComponents());},t;}(i.PureComponent),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(\"div\",{className:\"msp-help-text\"},i.createElement(\"div\",null,this.props.children));},t;}(i.PureComponent),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={header:t.props.header,isExpanded:!!t.props.initiallyExpanded},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(\"div\",{className:\"msp-control-group-wrapper\"},i.createElement(\"div\",{className:\"msp-control-group-header\"},i.createElement(l.Button,{onClick:this.toggleExpanded},i.createElement(c.Icon,{svg:this.state.isExpanded?c.ArrowDropDownSvg:c.ArrowRightSvg}),this.props.header)),this.state.isExpanded&&i.createElement(\"div\",{className:\"msp-control-offset\",style:{display:this.state.isExpanded?\"block\":\"none\"}},this.props.children));},t;}(i.PureComponent);function m(e){return i.createElement(\"div\",{className:\"msp-simple-help-section\"},e.header);}var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();});},t.prototype.render=function(){var e={};return this.plugin.spec.behaviors.forEach(function(t){var r=t.defaultParams.bindings;r&&Object.assign(e,r);}),i.createElement(i.Fragment,null,!this.props.selectOnly&&this.plugin.canvas3d&&i.createElement(p,{key:\"trackball\",header:\"Moving in 3D\"},i.createElement(d,{bindings:this.plugin.canvas3d.props.trackball.bindings})),i.createElement(p,{key:\"interactions\",header:\"Mouse Controls\"},i.createElement(d,{bindings:e})));},t;}(o.PluginUIComponent),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();});},t.prototype.formatTriggers=function(e){return e.triggers.map(function(e){return a.a.Trigger.format(e);}).join(\" or \");},t.prototype.getTriggerFor=function(e,t){var r=this.plugin.state.behaviors.select(s.StateSelection.Generators.ofTransformer(e)),n=1===r.length?r[0].params:void 0,i=n?n.values.bindings:{},o=t in i?i[t]:a.a.Empty;return this.formatTriggers(o);},t.prototype.render=function(){var e=this.getTriggerFor(u.SelectLoci,\"clickSelectToggle\"),t=this.getTriggerFor(u.FocusLoci,\"clickFocus\");return i.createElement(\"div\",null,i.createElement(m,{header:\"Interface Controls\"}),i.createElement(p,{header:\"Inline Help\"},i.createElement(f,null,\"Many user interface elements show a little questionmark icon when hovered over. Clicking the icon toggles the display of an inline help text.\"),i.createElement(f,null,\"Tooltips may provide additional information on a user interface element and are shown when hovering over it with the mouse.\")),i.createElement(p,{header:\"Selections\"},i.createElement(f,null,\"The viewer allows changing colors and representations for selections of atoms, residues or chains. Selections can be created by\",i.createElement(\"ul\",{style:{paddingLeft:\"20px\"}},i.createElement(\"li\",null,\"picking elements on the 3D canvas or the sequence view using the mouse, e.g. toggle selection using \",e,\" (for more see help section on \",i.createElement(\"i\",null,\"Mouse Controls\"),\")\"),i.createElement(\"li\",null,\"using the \",i.createElement(\"i\",null,\"Add\"),\", \",i.createElement(\"i\",null,\"Remove\"),\" and \",i.createElement(\"i\",null,\"Only\"),\" dropdown buttons in the \",i.createElement(\"i\",null,\"Manage Selection\"),\" panel which allow modifing the current selection by predefined sets\")))),i.createElement(p,{header:\"Coloring\"},i.createElement(f,null,\"There are two ways to color structures. Every representation (e.g. cartoon or spacefill) has a color theme which can be changed using the dropdown for each representation in the \",i.createElement(\"i\",null,\"Structure Settings\"),\" panel. Additionally any selection atoms, residues or chains can by given a custom color. For that, first select the parts of the structure to be colored (see help section on \",i.createElement(\"i\",null,\"Selections\"),\") and, second, choose a color from the color dropdown botton in the \",i.createElement(\"i\",null,\"Selection\"),\" row of the \",i.createElement(\"i\",null,\"Change Representation\"),\" panel. The theme color can be seen as a base color that is overpainted by the custom color. Custom colors can be removed for a selection with the 'Clear' option in the color dropdown.\")),i.createElement(p,{header:\"Representations\"},i.createElement(f,null,\"Structures can be shown with many different representations (e.g. cartoon or spacefill). The \",i.createElement(\"i\",null,\"Change Representation\"),\" panel offers a collection of predefined styles which can be applied using the \",i.createElement(\"i\",null,\"Preset\"),\" dropdown button. Additionally any selection atoms, residues or chains can by shown with a custom representation. For that, first select the parts of the structure to be mofified (see help section on \",i.createElement(\"i\",null,\"Selections\"),\") and, second, choose a representation to hide or show from the \",i.createElement(\"i\",null,\"Show\"),\" and \",i.createElement(\"i\",null,\"Hide\"),\" dropdown bottons in the \",i.createElement(\"i\",null,\"Selection\"),\" row of the \",i.createElement(\"i\",null,\"Change Representation\"),\" panel. The \",i.createElement(\"i\",null,\"Everything\"),\" row applies the action to the whole structure instead of the current selection.\")),i.createElement(p,{header:\"Surroundings\"},i.createElement(f,null,\"To show the surroundings of a residue or ligand, click it in the 3D scene or in the sequence widget using \",t,\".\")),i.createElement(m,{header:\"How-to Guides\"}),i.createElement(p,{header:\"Create an Image\"},i.createElement(f,null,i.createElement(\"p\",null,\"Use the \",i.createElement(c.Icon,{svg:c.CameraSvg}),\" icon in the viewport to bring up the screenshot controls.\"),i.createElement(\"p\",null,\"To adjust the size of the image, use the \",i.createElement(\"i\",null,\"Resolution\"),\" dropdown.\"))),i.createElement(m,{header:\"Mouse Controls\"}),i.createElement(h,null));},t;}(o.PluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return s;});var n,i=r(133),a=r(254),o=r(294);n||(n={});var s=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue=\"N\"===e;}return e.prototype.observe=function(e){switch(this.kind){case\"N\":return e.next&&e.next(this.value);case\"E\":return e.error&&e.error(this.error);case\"C\":return e.complete&&e.complete();}},e.prototype.do=function(e,t,r){switch(this.kind){case\"N\":return e&&e(this.value);case\"E\":return t&&t(this.error);case\"C\":return r&&r();}},e.prototype.accept=function(e,t,r){return e&&\"function\"==typeof e.next?this.observe(e):this.do(e,t,r);},e.prototype.toObservable=function(){switch(this.kind){case\"N\":return Object(a.a)(this.value);case\"E\":return Object(o.a)(this.error);case\"C\":return Object(i.b)();}throw new Error(\"unexpected notification kind value\");},e.createNext=function(t){return void 0!==t?new e(\"N\",t):e.undefinedValueNotification;},e.createError=function(t){return new e(\"E\",void 0,t);},e.createComplete=function(){return e.completeNotification;},e.completeNotification=new e(\"C\"),e.undefinedValueNotification=new e(\"N\",void 0),e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(76),o=r(2),s=r(340),u=r(41);!function(e){var t;e.getParamDefinition=function(e,t,r){return e.definition.params?e.definition.params(t,r):{};},e.is=function(e){return!!e&&\"function\"==typeof e.toAction&&\"function\"==typeof e.apply;},function(e){e[e.Unchanged=0]=\"Unchanged\",e[e.Updated=1]=\"Updated\",e[e.Recreate=2]=\"Recreate\",e[e.Null=3]=\"Null\";}(t=e.UpdateResult||(e.UpdateResult={}));var r,n=new Map(),c=new Map();function l(e,t){var r=t.name,i=e+\".\"+r;if(n.has(i))throw new Error(\"A transform with id '\"+r+\"' is already registered. Please pick a unique identifier for your transforms and/or register them only once. This is to ensure that transforms can be serialized and replayed.\");var u={apply:function apply(e,t,r){return a.a.create(e,u,t,r);},toAction:function toAction(){return s.a.fromTransformer(u);},namespace:e,id:i,definition:t,createDefaultParams:function createDefaultParams(e,r){return t.params?o.ParamDefinition.getDefaultValues(t.params(e,r)):{};}};return n.set(i,u),function(e){for(var t=0,r=e.definition.from;t<r.length;t++){var n=r[t];c.has(n.type)?c.get(n.type).push(e):c.set(n.type,[e]);}}(u),u;}e.getAll=function(){return Array.from(n.values());},e.get=function(e){var t=n.get(e);if(!t)throw new Error(\"A transformer with signature '\"+e+\"' is not registered.\");return t;},e.fromType=function(e){return c.get(e)||[];},e.create=l,e.factory=function(e){return function(t){return l(e,t);};},e.builderFactory=function(e){return r.build(e);},function(e){e.build=function(e){return function(t){return function(e,t){return function(r){return l(e,Object(i.__assign)({name:t.name,from:t.from instanceof Array?t.from:[t.from],to:t.to instanceof Array?t.to:[t.to],display:\"string\"==typeof t.display?{name:t.display}:t.display?t.display:{name:Object(u.b)(t.name.replace(/[-]/g,\" \"))},params:\"object\"==typeof_default()(t.params)?function(){return t.params;}:t.params?t.params:void 0,isDecorator:t.isDecorator},r));};}(e,t);};};}(r=e.Builder||(e.Builder={})),e.build=function(e){return r.build(e);},e.ROOT=l(\"build-in\",{name:\"root\",from:[],to:[],display:{name:\"Root\",description:\"For internal use.\"},apply:function apply(){throw new Error(\"should never be applied\");},update:function update(){return t.Unchanged;}});}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(5);!function(e){function t(e){var t=new DataView(e.buffer);return Object.assign(e.subarray(0),{readInt8:function readInt8(e){return t.getInt8(e);},readUInt8:function readUInt8(e){return t.getUint8(e);},writeInt8:function writeInt8(e,r){return t.setInt8(r,e);},writeUInt8:function writeUInt8(e,r){return t.setUint8(r,e);},readInt16LE:function readInt16LE(e){return t.getInt16(e,!0);},readInt32LE:function readInt32LE(e){return t.getInt32(e,!0);},readUInt16LE:function readUInt16LE(e){return t.getUint16(e,!0);},readUInt32LE:function readUInt32LE(e){return t.getUint32(e,!0);},readFloatLE:function readFloatLE(e){return t.getFloat32(e,!0);},readDoubleLE:function readDoubleLE(e){return t.getFloat64(e,!0);},writeInt16LE:function writeInt16LE(e,r){return t.setInt16(r,e,!0);},writeInt32LE:function writeInt32LE(e,r){return t.setInt32(r,e,!0);},writeUInt16LE:function writeUInt16LE(e,r){return t.setUint16(r,e,!0);},writeUInt32LE:function writeUInt32LE(e,r){return t.setUint32(r,e,!0);},writeFloatLE:function writeFloatLE(e,r){return t.setFloat32(r,e,!0);},writeDoubleLE:function writeDoubleLE(e,r){return t.setFloat64(r,e,!0);},readInt16BE:function readInt16BE(e){return t.getInt16(e,!1);},readInt32BE:function readInt32BE(e){return t.getInt32(e,!1);},readUInt16BE:function readUInt16BE(e){return t.getUint16(e,!1);},readUInt32BE:function readUInt32BE(e){return t.getUint32(e,!1);},readFloatBE:function readFloatBE(e){return t.getFloat32(e,!1);},readDoubleBE:function readDoubleBE(e){return t.getFloat64(e,!1);},writeInt16BE:function writeInt16BE(e,r){return t.setInt16(r,e,!1);},writeInt32BE:function writeInt32BE(e,r){return t.setInt32(r,e,!1);},writeUInt16BE:function writeUInt16BE(e,r){return t.setUint16(r,e,!1);},writeUInt32BE:function writeUInt32BE(e,r){return t.setUint32(r,e,!1);},writeFloatBE:function writeFloatBE(e,r){return t.setFloat32(r,e,!1);},writeDoubleBE:function writeDoubleBE(e,r){return t.setFloat64(r,e,!1);},copy:function copy(t,r,n,a){return r=Object(i.i)(r,0),n=Object(i.i)(n,0),a=Object(i.i)(a,e.length),t.set(e.subarray(n,a),r),a-n;}});}function r(e,t,r,n,i){for(var a=0,o=r;a<o;a+=n)for(var s=0;s<n;s++)t[i+a+n-s-1]=e[i+a+s];}e.fromUint8Array=t,e.fromArrayBuffer=function(e){return t(new Uint8Array(e));},e.fromBuffer=function(e){return e;},e.IsNativeEndianLittle=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0],e.flipByteOrder=r,e.flipByteOrderInPlace2=function(e,t,r){void 0===t&&(t=0);for(var n=new Int16Array(e,t,r),i=0,a=n.length;i<a;++i){var o=n[i];n[i]=(255&o)<<8|o>>8&255;}},e.ensureLittleEndian=function(t,n,i,a,o){e.IsNativeEndianLittle||!i||a<=1||r(t,n,i,a,o);};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"c\",function(){return o;}),r.d(t,\"b\",function(){return u;}),r.d(t,\"d\",function(){return c;});var n,i=r(0),a=r(192);function o(e){return e===n.Float32?4:e===n.Int16||e===n.Uint16?2:1;}function s(e,t,r,i){return void 0===r&&(r=0),e===n.Float32?new Float32Array(t,r,i):e===n.Int16?new Int16Array(t,r,i):e===n.Uint16?new Uint16Array(t,r,i):new Int8Array(t,r,i);}function u(e,t){var r=o(t),n=new ArrayBuffer(r*e),i=a.a.fromArrayBuffer(n),u=a.a.IsNativeEndianLittle?n:new ArrayBuffer(r*e);return{type:t,elementByteSize:r,readBuffer:i,valuesBuffer:new Uint8Array(u),values:s(t,u)};}function c(e,t,r,n,o,s){return Object(i.__awaiter)(this,void 0,void 0,function(){return Object(i.__generator)(this,function(i){switch(i.label){case 0:return[4,t.readBuffer(r,e.readBuffer,n,o)];case 1:return i.sent(),e.elementByteSize>1&&(void 0!==s&&s!==a.a.IsNativeEndianLittle||!a.a.IsNativeEndianLittle)&&a.a.flipByteOrder(e.readBuffer,e.valuesBuffer,n,e.elementByteSize,o),[2,e.values];}});});}!function(e){e.Float32=\"float32\",e.Int8=\"int8\",e.Int16=\"int16\",e.Uint16=\"uint16\";}(n||(n={}));},function(e,t,r){\"use strict\";(function(e){var n,i=r(83);!function(t){var r=\"undefined\"!=typeof btoa?btoa:function(t){return e.from(t).toString(\"base64\");},n=[];t.create22=function(){for(var e=+new Date()+Object(i.b)(),t=0;t<16;t++)n[t]=String.fromCharCode((e+255*Math.random())%255|0),e=Math.floor(e/255);return r(n.join(\"\")).replace(/\\+/g,\"-\").replace(/\\//g,\"_\").substr(0,22);},t.createv4=function(){var e=+new Date()+Object(i.b)();return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(\"x\"===t?r:3&r|8).toString(16);});},t.is=function(e){return\"string\"==typeof e;};}(n||(n={})),t.a=n;}).call(this,r(423).Buffer);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(25),i=r(273),a=function(){function e(){this.count=0,this.center=Object(n.f)(),this.radiusSq=0;}return e.prototype.reset=function(){n.f.set(this.center,0,0,0),this.radiusSq=0,this.count=0;},e.prototype.includeStep=function(e){n.f.add(this.center,this.center,e),this.count++;},e.prototype.finishedIncludeStep=function(){0!==this.count&&n.f.scale(this.center,this.center,1/this.count);},e.prototype.radiusStep=function(e){var t=n.f.squaredDistance(e,this.center);t>this.radiusSq&&(this.radiusSq=t);},e.prototype.radiusSphereStep=function(e,t){var r=n.f.distance(e,this.center)+t,i=r*r;i>this.radiusSq&&(this.radiusSq=i);},e.prototype.getSphere=function(e){return e||(e=Object(i.a)()),n.f.copy(e.center,this.center),e.radius=Math.sqrt(this.radiusSq),e;},e.prototype.getCount=function(){return this.count;},e;}();!function(e){var t=new e(),r=Object(n.f)(),i=Object(n.f)();e.fromArrays=function(e,i){var a=e.x,o=e.y,s=e.z;t.reset();for(var u=a.length,c=0;c<u;c++)n.f.set(r,a[c],o[c],s[c]),t.includeStep(r);for(t.finishedIncludeStep(),c=0;c<u;c++)n.f.set(r,a[c],o[c],s[c]),t.radiusStep(r);return n.f.copy(i.center,t.center),i.radius=Math.sqrt(t.radiusSq),i;},e.fromProvider=function(e,i,a){t.reset();for(var o=0;o<e;o++)i(o,r),t.includeStep(r);for(t.finishedIncludeStep(),o=0;o<e;o++)i(o,r),t.radiusStep(r);return n.f.copy(a.center,t.center),a.radius=Math.sqrt(t.radiusSq),a;},e.fromPairProvider=function(e,a,o){t.reset();for(var s=0;s<e;s++)a(s,r,i),t.includeStep(r),t.includeStep(i);for(t.finishedIncludeStep(),s=0;s<e;s++)a(s,r,i),t.radiusStep(r),t.radiusStep(i);return n.f.copy(o.center,t.center),o.radius=Math.sqrt(t.radiusSq),o;};}(a||(a={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return Qe;});var n=r(24),i=r(4),a=r(178),o=r(2),s=r(140),u=Object(n.Color)(13421772),c={};var l={name:\"carbohydrate-symbol\",label:\"Carbohydrate Symbol\",category:\"Residue Property\",factory:function e(t,r){var n;if(t.structure){var o=t.structure.carbohydrates,c=o.elements,l=o.getElementIndices,d=function d(e,t){if(!i.Unit.isAtomic(e))return u;var r=l(e,t);return r.length>0?c[r[0]].component.color:u;};n=function n(e,t){return t?a.b.Secondary:i.StructureElement.Location.is(e)?d(e.unit,e.element):i.Bond.isLocation(e)?d(e.aUnit,e.aUnit.elements[e.aIndex]):u;};}else n=function n(){return u;};return{factory:e,granularity:\"group\",color:n,props:r,description:\"Assigns colors according to the Symbol Nomenclature for Glycans (SNFG).\",legend:Object(s.b)(a.a)};},getParams:function getParams(e){return c;},defaultValues:o.ParamDefinition.getDefaultValues(c),isApplicable:function isApplicable(e){return!!e.structure&&e.structure.models.some(function(e){return i.Model.hasCarbohydrate(e);});}},d=r(355),f=r(5),p=r(89),m=r(326),h=r(0),g=r(6),v=r(111),b=Object(n.Color)(13421772),y=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"red-yellow-blue\"}));var _={name:\"element-index\",label:\"Element Index\",category:\"Atom Property\",factory:function e(t,r){var n,a;if(t.structure){for(var o=t.structure.root.units,s=o.length,u=new Map(),c=new Map(),l=0,d=0;d<s;++d)u.set(d,l),l+=o[d].elements.length,c.set(o[d].id,d);var f=Object(v.a)(l,r);a=f.legend,n=function n(e){if(i.StructureElement.Location.is(e)){var t=c.get(e.unit.id),r=g.OrderedSet.findPredecessorIndex(o[t].elements,e.element);return f.color(u.get(t)+r);}if(i.Bond.isLocation(e)){t=c.get(e.aUnit.id),r=g.OrderedSet.findPredecessorIndex(o[t].elements,e.aUnit.elements[e.aIndex]);return f.color(u.get(t)+r);}return b;};}else n=function n(){return b;};return{factory:e,granularity:\"groupInstance\",color:n,props:r,description:\"Gives every element (atom or coarse sphere/gaussian) a unique color based on the position (index) of the element in the list of elements in the structure.\",legend:a};},getParams:function getParams(e){return y;},defaultValues:o.ParamDefinition.getDefaultValues(y),isApplicable:function isApplicable(e){return!!e.structure;}},S=r(307),O=r(146),x=r(43),C=Object(n.ColorMap)({water:3697840,ion:15729279,protein:12496596,RNA:16629894,DNA:12540695,PNA:4367514,saccharide:8374655}),w=Object(n.Color)(16777113),P={saturation:o.ParamDefinition.Numeric(0,{min:-6,max:6,step:.1}),lightness:o.ParamDefinition.Numeric(0,{min:-6,max:6,step:.1})};function j(e,t,r){switch(Object(O.b)(t,r)){case 2:return e.water;case 3:return e.ion;case 5:return e.protein;case 6:return e.RNA;case 7:return e.DNA;case 8:return e.PNA;case 9:return e.saccharide;}return w;}var E={name:\"molecule-type\",label:\"Molecule Type\",category:\"Residue Property\",factory:function e(t,r){var n=Object(x.getAdjustedColorMap)(C,r.saturation,r.lightness);return{factory:e,granularity:\"group\",color:function color(e){return i.StructureElement.Location.is(e)?j(n,e.unit,e.element):i.Bond.isLocation(e)?j(n,e.aUnit,e.aUnit.elements[e.aIndex]):w;},props:r,description:\"Assigns a color based on the molecule type of a residue.\",legend:Object(s.b)(Object.keys(C).map(function(e){return[e,C[e]];}).concat([[\"Other/unknown\",w]]))};},getParams:function getParams(e){return P;},defaultValues:o.ParamDefinition.getDefaultValues(P),isApplicable:function isApplicable(e){return!!e.structure;}},A=r(88),T=Object(n.Color)(16448250),D=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));function I(e){switch(e.kind){case 0:return i.StructureProperties.chain.label_asym_id;case 1:case 2:return i.StructureProperties.coarse.asym_id;}}function M(e){for(var t=new Map(),r=0,n=e.unitSymmetryGroups.length;r<n;++r){var a=e.unitSymmetryGroups[r].units[0],o=a.model;if(i.Unit.isAtomic(a))for(var s=o.atomicHierarchy,u=s.chainAtomSegments,c=s.chains,l=g.Segmentation.transientSegments(u,a.elements);l.hasNext;){var d=l.move().index,f=c.label_entity_id.value(d),p=o.entities.getEntityIndex(f);if(\"polymer\"===o.entities.data.type.value(p)){var m=c.label_asym_id.value(d);t.has(m)||t.set(m,t.size);}}else if(i.Unit.isCoarse(a)){var h=i.Unit.isSpheres(a)?o.coarseHierarchy.spheres:o.coarseHierarchy.gaussians,v=h.chainElementSegments,b=h.asym_id,y=h.entity_id;for(l=g.Segmentation.transientSegments(v,a.elements);l.hasNext;){d=l.move().index;var _=v.offsets[d];f=y.value(_),p=o.entities.getEntityIndex(f);if(\"polymer\"===o.entities.data.type.value(p)){m=b.value(_);t.has(m)||t.set(m,t.size);}}}}return t;}var k={name:\"polymer-id\",label:\"Polymer Chain Id\",category:\"Chain Property\",factory:function e(t,r){var n,a;if(t.structure){var o=i.StructureElement.Location.create(t.structure),s=M(t.structure.root),u=Array.from(s.keys());r.palette.params.valueLabel=function(e){return u[e];};var c=Object(v.a)(s.size,r);a=c.legend,n=function n(e){var t=void 0;if(i.StructureElement.Location.is(e)){var r=I(e.unit);t=s.get(r(e));}else if(i.Bond.isLocation(e)){r=I(e.aUnit);o.unit=e.aUnit,o.element=e.aUnit.elements[e.aIndex],t=s.get(r(o));}return void 0===t?T:c.color(t);};}else n=function n(){return T;};return{factory:e,granularity:\"group\",color:n,props:r,description:\"Gives every polymer chain a color based on its `asym_id` value.\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(D);return e.structure&&M(e.structure.root).size>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(D),isApplicable:function isApplicable(e){return!!e.structure;}},B=Object(n.Color)(13421772),V=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));function R(e){for(var t=0,r=e.units,n=0,i=r.length;n<i;++n)r[n].polymerElements.length>0&&++t;return t;}var L={name:\"polymer-index\",label:\"Polymer Chain Instance\",category:\"Chain Property\",factory:function e(t,r){var n,a;if(t.structure){var o=Object(v.a)(R(t.structure.root),r);a=o.legend;for(var s=t.structure.root.units,u=new Map(),c=0,l=0,d=s.length;c<d;++c)s[c].polymerElements.length>0&&(u.set(s[c].id,o.color(l)),++l);n=function n(e){var t;return i.StructureElement.Location.is(e)?t=u.get(e.unit.id):i.Bond.isLocation(e)&&(t=u.get(e.aUnit.id)),void 0!==t?t:B;};}else n=function n(){return B;};return{factory:e,granularity:\"instance\",color:n,props:r,description:\"Gives every polymer chain instance a unique color based on the position (index) of the polymer in the list of polymers in the structure.\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(V);return e.structure&&R(e.structure.root)>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(V),isApplicable:function isApplicable(e){return!!e.structure;}},N=Object(n.ColorMap)({ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:15658734,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,A:14423100,G:3329330,I:10145074,C:16766720,T:4286945,U:4251856,DA:14423100,DG:3329330,DI:10145074,DC:16766720,DT:4286945,DU:4251856,APN:14423100,GPN:3329330,CPN:16766720,TPN:4286945}),F=Object(n.Color)(16711935),U={saturation:o.ParamDefinition.Numeric(0,{min:-6,max:6,step:.1}),lightness:o.ParamDefinition.Numeric(1,{min:-6,max:6,step:.1})};function z(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(e.residueIndex[t]);}function H(e,t){var r=e.coarseElements.seq_id_begin.value(t);if(r===e.coarseElements.seq_id_end.value(t)){var n=e.coarseElements.entityKey[t];return e.model.sequence.byEntityKey[n].sequence.compId.value(r-1);}}function G(e,t){var r=e[t];return void 0===r?F:r;}var q={name:\"residue-name\",label:\"Residue Name\",category:\"Residue Property\",factory:function e(t,r){var n=Object(x.getAdjustedColorMap)(N,r.saturation,r.lightness);return{factory:e,granularity:\"group\",color:function color(e){if(i.StructureElement.Location.is(e)){if(i.Unit.isAtomic(e.unit)){var t=z(e.unit,e.element);return G(n,t);}if(t=H(e.unit,e.element))return G(n,t);}else if(i.Bond.isLocation(e)){if(i.Unit.isAtomic(e.aUnit)){t=z(e.aUnit,e.aUnit.elements[e.aIndex]);return G(n,t);}if(t=H(e.aUnit,e.aUnit.elements[e.aIndex]))return G(n,t);}return F;},props:r,description:\"Assigns a color to every residue according to its name.\",legend:Object(s.b)(Object.keys(N).map(function(e){return[e,N[e]];}).concat([[\"Unknown\",F]]))};},getParams:function getParams(e){return U;},defaultValues:o.ParamDefinition.getDefaultValues(U),isApplicable:function isApplicable(e){return!!e.structure;}},W=r(22),Q=r(152),Y=Object(n.ColorMap)({alphaHelix:16711808,threeTenHelix:10485888,piHelix:6291584,betaTurn:6324479,betaStrand:16762880,coil:16777215,bend:6740169,turn:45670,dna:11403518,rna:16580962,carbohydrate:10921722}),X=Object(n.Color)(8421504),K={saturation:o.ParamDefinition.Numeric(-1,{min:-6,max:6,step:.1}),lightness:o.ParamDefinition.Numeric(0,{min:-6,max:6,step:.1})};function Z(e,t,r,n){var a=W.SecondaryStructureType.create(0);if(n&&i.Unit.isAtomic(t)){var o=n.get(t.invariantId);o&&(a=o.type[o.getIndex(t.residueIndex[r])]);}if(W.SecondaryStructureType.is(a,2))return W.SecondaryStructureType.is(a,2048)?e.threeTenHelix:W.SecondaryStructureType.is(a,32768)?e.piHelix:e.alphaHelix;if(W.SecondaryStructureType.is(a,4))return e.betaStrand;if(W.SecondaryStructureType.is(a,8))return e.bend;if(W.SecondaryStructureType.is(a,16))return e.turn;var s=Object(O.b)(t,r);return 7===s?e.dna:6===s?e.rna:9===s?e.carbohydrate:5===s?e.coil:X;}var J={name:\"secondary-structure\",label:\"Secondary Structure\",category:\"Residue Property\",factory:function e(t,r){var n=t.structure&&Q.a.get(t.structure),a=n&&n.version,o=Object(x.getAdjustedColorMap)(Y,r.saturation,r.lightness);return{factory:e,granularity:\"group\",color:function color(e){return i.StructureElement.Location.is(e)?Z(o,e.unit,e.element,null==n?void 0:n.value):i.Bond.isLocation(e)?Z(o,e.aUnit,e.aUnit.elements[e.aIndex],null==n?void 0:n.value):X;},props:r,contextHash:a,description:\"Assigns a color based on the type of secondary structure and basic molecule type.\",legend:Object(s.b)(Object.keys(Y).map(function(e){return[e,Y[e]];}).concat([[\"Other\",X]]))};},getParams:function getParams(e){return K;},defaultValues:o.ParamDefinition.getDefaultValues(K),isApplicable:function isApplicable(e){return!!e.structure;},ensureCustomProperties:{attach:function attach(e,t){return t.structure?Q.a.attach(e,t.structure,void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.customPropertyDescriptors.reference(Q.a.descriptor,!1);}}},$=Object(n.Color)(13421772),ee={list:o.ParamDefinition.ColorList(\"turbo\",{presetKind:\"scale\"})};function te(e,t){var r=e.model;switch(e.kind){case 0:var n=r.atomicHierarchy.residueAtomSegments.index[t];return r.atomicHierarchy.residues.label_seq_id.value(n);case 1:return Math.round((r.coarseHierarchy.spheres.seq_id_begin.value(t)+r.coarseHierarchy.spheres.seq_id_end.value(t))/2);case 2:return Math.round((r.coarseHierarchy.gaussians.seq_id_begin.value(t)+r.coarseHierarchy.gaussians.seq_id_end.value(t))/2);}}function re(e,t){var r=e.model,n=\"\";switch(e.kind){case 0:var i=r.atomicHierarchy.chainAtomSegments.index[t];n=r.atomicHierarchy.chains.label_entity_id.value(i);break;case 1:n=r.coarseHierarchy.spheres.entity_id.value(t);break;case 2:n=r.coarseHierarchy.gaussians.entity_id.value(t);}if(\"\"===n)return 0;var a=r.entities.getEntityIndex(n);return-1===a?0:r.sequence.byEntityKey[a].sequence.length;}var ne={name:\"sequence-id\",label:\"Sequence Id\",category:\"Residue Property\",factory:function e(t,r){var a=n.ColorScale.create({listOrName:r.list.colors,minLabel:\"Start\",maxLabel:\"End\"});return{factory:e,granularity:\"group\",color:function color(e){if(i.StructureElement.Location.is(e)){var t=e.unit,r=e.element;if((n=te(t,r))>0)return a.setDomain(0,re(t,r)-1),a.color(n);}else if(i.Bond.isLocation(e)){var n,o=e.aUnit,s=e.aIndex;if((n=te(o,o.elements[s]))>0)return a.setDomain(0,re(o,o.elements[s])-1),a.color(n);}return $;},props:r,description:\"Gives every polymer residue a color based on its `seq_id` value.\",legend:a?a.legend:void 0};},getParams:function getParams(e){return ee;},defaultValues:o.ParamDefinition.getDefaultValues(ee),isApplicable:function isApplicable(e){return!!e.structure;}},ie=r(361),ae=Object(n.Color)(13421772),oe=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));var se={name:\"unit-index\",label:\"Chain Instance\",category:\"Chain Property\",factory:function e(t,r){var n,a;if(t.structure){var o=t.structure.root.units,s=Object(v.a)(o.length,r);a=s.legend;for(var u=new Map(),c=0,l=o.length;c<l;++c)u.set(o[c].id,s.color(c));n=function n(e){return i.StructureElement.Location.is(e)?u.get(e.unit.id):i.Bond.isLocation(e)?u.get(e.aUnit.id):ae;};}else n=function n(){return ae;};return{factory:e,granularity:\"instance\",color:n,props:r,description:\"Gives every chain instance (single chain or collection of single elements) a unique color based on the position (index) of the chain in the list of chains in the structure.\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(oe);return e.structure&&e.structure.root.units.length>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(oe),isApplicable:function isApplicable(e){return!!e.structure;}},ue=Object(n.Color)(16777113),ce={domain:o.ParamDefinition.Interval([0,100]),list:o.ParamDefinition.ColorList(\"red-white-blue\",{presetKind:\"scale\"})};function le(e,t){return i.Unit.isAtomic(e)?e.model.atomicConformation.B_iso_or_equiv.value(t):i.Unit.isSpheres(e)?e.model.coarseConformation.spheres.rmsf[t]:0;}var de={name:\"uncertainty\",label:\"Uncertainty/Disorder\",category:\"Atom Property\",factory:function e(t,r){var a=n.ColorScale.create({reverse:!0,domain:r.domain,listOrName:r.list.colors});return{factory:e,granularity:\"group\",color:function color(e){return i.StructureElement.Location.is(e)?a.color(le(e.unit,e.element)):i.Bond.isLocation(e)?a.color(le(e.aUnit,e.aUnit.elements[e.aIndex])):ue;},props:r,description:\"Assigns a color based on the uncertainty or disorder of an element's position, e.g. B-factor or RMSF, depending on the data availability and experimental technique.\",legend:a?a.legend:void 0};},getParams:function getParams(e){return ce;},defaultValues:o.ParamDefinition.getDefaultValues(ce),isApplicable:function isApplicable(e){return!!e.structure&&e.structure.models.some(function(e){return e.atomicConformation.B_iso_or_equiv.isDefined||e.coarseHierarchy.isDefined;});}},fe=r(174),pe=r(72),me=Object(n.Color)(16448250),he=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));function ge(e,t){return e+\"|\"+t;}function ve(e,t,r,n,i,a){return e+\"|\"+t+\"|\"+r+\"|\"+(a||i||n);}function be(e,t,r,n,i,a,o,s){for(var u=i.entity_id,c=i.pdbx_src_id,l=i.pdbx_beg_seq_num,d=i.pdbx_end_seq_num,f=0,p=i._rowCount;f<p;++f){var m=u.value(f),h=ge(r,m),g=void 0;if(e.has(h))g=e.get(h);else{var v=n.entities.getEntityIndex(m),b=n.sequence.sequences[v].sequence;g=new Int16Array(b.length),e.set(h,g);}var y=o?o.value(f):\"\",_=s?s.value(f)[0]:\"\",S=ve(r,m,a.value(f),c.value(f),y,_),O=0===l.valueKind(f)?l.value(f):1,x=0===d.valueKind(f)?d.value(f):g.length,C=void 0;t.has(S)?C=t.get(S):(C=t.size+1,t.set(S,C));for(var w=O,P=x;w<=P;++w)g[w-1]=C;}}function ye(e){for(var t=new Map(),r=new Map(),n=0,i=e.length;n<i;++n){var a=e[n];if(pe.a.is(a.sourceData)){var o=a.sourceData.data.db,s=o.entity_src_gen,u=o.entity_src_nat,c=o.pdbx_entity_src_syn;be(t,r,n,a,s,s.pdbx_gene_src_scientific_name,s.plasmid_name,s.pdbx_gene_src_gene),be(t,r,n,a,u,u.pdbx_organism_scientific,u.pdbx_plasmid_name),be(t,r,n,a,c,c.organism_scientific);}}return{seqToSrcByModelEntity:t,srcKeySerialMap:r};}var _e={name:\"entity-source\",label:\"Entity Source\",category:\"Chain Property\",factory:function e(t,r){var n,a;if(t.structure){var o=i.StructureElement.Location.create(t.structure),s=t.structure.root.models,u=ye(s),c=u.seqToSrcByModelEntity,l=u.srcKeySerialMap,d=function(e){var t=0;return Array.from(e.keys()).map(function(e){var r=e.split(\"|\"),n=r[2];return(Object(fe.d)(r[3])?\"Unnamed \"+ ++t:r[3])+(n?\" (\"+n+\")\":\"\");});}(l);r.palette.params.valueLabel=function(e){return d[e];};var f=Object(v.a)(l.size,r);a=f.legend;var p=function p(e){var t=ge(s.indexOf(e.unit.model),i.StructureProperties.entity.id(e)),r=c.get(t);return r?f.color(r[i.StructureProperties.residue.label_seq_id(e)-1]-1):me;};n=function n(e){return i.StructureElement.Location.is(e)?p(e):i.Bond.isLocation(e)?(o.unit=e.aUnit,o.element=e.aUnit.elements[e.aIndex],p(o)):me;};}else n=function n(){return me;};return{factory:e,granularity:\"group\",color:n,props:r,description:\"Gives ranges of a polymer chain a color based on the entity source it originates from (e.g. gene, plasmid, organism).\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(he);return e.structure&&ye(e.structure.root.models).srcKeySerialMap.size>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(he),isApplicable:function isApplicable(e){return!!e.structure;}},Se=Object(n.Color)(16777215),Oe={};function xe(e,t,r){return Object(W.isNucleic)(r)?\"O\"===t?Object(n.Color)(16747660):\"P\"===t?Object(n.Color)(16743805):Object(n.Color)(16754342):Object(W.isProtein)(r)?\"C\"===t?Object(n.Color)(8368895):Object(n.Color)(6724095):Object(S.elementSymbolColor)(e,t);}var Ce={name:\"illustrative\",label:\"Illustrative\",category:\"Miscellaneous\",factory:function e(t,r){var n=Object(x.getAdjustedColorMap)(S.ElementSymbolColors,0,.7);return{factory:e,granularity:\"group\",color:function color(e){if(i.StructureElement.Location.is(e)){if(i.Unit.isAtomic(e.unit)){var t=e.unit.model.atomicHierarchy.derived.residue.moleculeType[e.unit.residueIndex[e.element]],r=e.unit.model.atomicHierarchy.atoms.type_symbol.value(e.element);return xe(n,r,t);}}else if(i.Bond.isLocation(e)&&i.Unit.isAtomic(e.aUnit)){var a=e.aUnit.elements[e.aIndex];t=e.aUnit.model.atomicHierarchy.derived.residue.moleculeType[e.aUnit.residueIndex[a]],r=e.aUnit.model.atomicHierarchy.atoms.type_symbol.value(a);return xe(n,r,t);}return Se;},props:r,description:\"Assigns an illustrative color similar to David Goodsell's Molecule of the Month style.\"};},getParams:function getParams(e){return Oe;},defaultValues:o.ParamDefinition.getDefaultValues(Oe),isApplicable:function isApplicable(e){return!!e.structure;}},we={list:o.ParamDefinition.ColorList(\"red-yellow-green\",{presetKind:\"scale\"}),scale:o.ParamDefinition.Select(\"DGwif\",[[\"DGwif\",\"DG water-membrane\"],[\"DGwoct\",\"DG water-octanol\"],[\"Oct-IF\",\"DG difference\"]])};var Pe={DGwif:0,DGwoct:1,\"Oct-IF\":2};function je(e,t){return e.model.atomicHierarchy.atoms.label_comp_id.value(e.residueIndex[t]);}function Ee(e,t){var r=e.coarseElements.seq_id_begin.value(t);if(r===e.coarseElements.seq_id_end.value(t)){var n=e.coarseElements.entityKey[t];return e.model.sequence.byEntityKey[n].sequence.compId.value(r-1);}}var Ae={name:\"hydrophobicity\",label:\"Hydrophobicity\",category:\"Residue Property\",factory:function e(t,r){var a=Pe[r.scale],o=1/0,s=-1/0;for(var u in W.ResidueHydrophobicity){var c=W.ResidueHydrophobicity[u][a];o=Math.min(o,c),s=Math.max(s,c);}var l=n.ColorScale.create({listOrName:r.list.colors,domain:[s,o],minLabel:\"Hydrophobic\",maxLabel:\"Hydrophilic\"});return{factory:e,granularity:\"group\",color:function color(e){var t;return i.StructureElement.Location.is(e)?t=i.Unit.isAtomic(e.unit)?je(e.unit,e.element):Ee(e.unit,e.element):i.Bond.isLocation(e)&&(t=i.Unit.isAtomic(e.aUnit)?je(e.aUnit,e.aUnit.elements[e.aIndex]):Ee(e.aUnit,e.aUnit.elements[e.aIndex])),l.color(t?function(e,t){var r=W.ResidueHydrophobicity[e];return void 0===r?0:r[t];}(t,a):0);},props:r,description:'Assigns a color to every amino acid according to the \"Experimentally determined hydrophobicity scale for proteins at membrane interfaces\" by Wimely and White (doi:10.1038/nsb1096-842).',legend:l?l.legend:void 0};},getParams:function getParams(e){return we;},defaultValues:o.ParamDefinition.getDefaultValues(we),isApplicable:function isApplicable(e){return!!e.structure;}},Te=Object(n.Color)(13421772),De=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"purples\"}));var Ie={name:\"model-index\",label:\"Model Index\",category:\"Chain Property\",factory:function e(t,r){var n,a,o,s;if(t.structure){for(var u=t.structure.root.models,c=0,l=0,d=u;l<d.length;l++){var f=d[l];c=Math.max(c,(null===(n=i.Model.TrajectoryInfo.get(f))||void 0===n?void 0:n.size)||0);}var p=Object(v.a)(c,r);s=p.legend;for(var m=new Map(),h=0,g=u.length;h<g;++h){var b=(null===(a=i.Model.TrajectoryInfo.get(u[h]))||void 0===a?void 0:a.index)||0;m.set(b,p.color(b));}o=function o(e){return i.StructureElement.Location.is(e)?m.get(i.Model.TrajectoryInfo.get(e.unit.model).index):i.Bond.isLocation(e)?m.get(i.Model.TrajectoryInfo.get(e.aUnit.model).index):Te;};}else o=function o(){return Te;};return{factory:e,granularity:\"instance\",color:o,props:r,description:\"Gives every model a unique color based on the position (index) of the model in the list of models in the structure.\",legend:s};},getParams:function getParams(e){return De;},defaultValues:o.ParamDefinition.getDefaultValues(De),isApplicable:function isApplicable(e){return!!e.structure&&e.structure.elementCount>0&&i.Model.TrajectoryInfo.get(e.structure.models[0]).size>1;}},Me=Object(n.Color)(13421772),ke={domain:o.ParamDefinition.Interval([0,1]),list:o.ParamDefinition.ColorList(\"purples\",{presetKind:\"scale\"})};function Be(e,t){return i.Unit.isAtomic(e)?e.model.atomicConformation.occupancy.value(t):0;}var Ve={name:\"occupancy\",label:\"Occupancy\",category:\"Atom Property\",factory:function e(t,r){var a=n.ColorScale.create({reverse:!1,domain:r.domain,listOrName:r.list.colors});return{factory:e,granularity:\"group\",color:function color(e){return i.StructureElement.Location.is(e)?a.color(Be(e.unit,e.element)):i.Bond.isLocation(e)?a.color(Be(e.aUnit,e.aUnit.elements[e.aIndex])):Me;},props:r,description:\"Assigns a color based on the occupancy of an atom.\",legend:a?a.legend:void 0};},getParams:function getParams(e){return ke;},defaultValues:o.ParamDefinition.getDefaultValues(ke),isApplicable:function isApplicable(e){return!!e.structure&&e.structure.models.some(function(e){return e.atomicConformation.occupancy.isDefined;});}},Re=Object(n.Color)(13421772),Le=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));function Ne(e){for(var t=new Map(),r=0,n=e.units.length;r<n;++r){var i=e.units[r].conformation.operator.name;t.has(i)||t.set(i,t.size);}return t;}var Fe={name:\"operator-name\",label:\"Operator Name\",category:\"Symmetry\",factory:function e(t,r){var n,a;if(t.structure){var o=Ne(t.structure.root),s=Array.from(o.keys());r.palette.params.valueLabel=function(e){return s[e];};var u=Object(v.a)(o.size,r);a=u.legend,n=function n(e){var t=void 0;if(i.StructureElement.Location.is(e)){var r=e.unit.conformation.operator.name;t=o.get(r);}else if(i.Bond.isLocation(e)){var n=e.aUnit.conformation.operator.name;t=o.get(n);}return void 0===t?Re:u.color(t);};}else n=function n(){return Re;};return{factory:e,granularity:\"instance\",color:n,props:r,description:\"Assigns a color based on the operator name of a transformed chain.\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(Le);return e.structure&&Ne(e.structure.root).size>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(Le),isApplicable:function isApplicable(e){return!!e.structure;}},Ue=Object(n.Color)(13421772),ze=Object(h.__assign)({},Object(v.b)({type:\"colors\",colorList:\"dark-2\"}));function He(e){return e.map(function(e){return(\"\"+(e+1e4)).padStart(5,\"0\");}).join(\"\");}function Ge(e){var t=Object(fe.c)(1e4,0);return[parseInt(e.substr(0,t))-1e4,parseInt(e.substr(t,t))-1e4,parseInt(e.substr(t+t,t))-1e4];}function qe(e){return e.map(function(e){return e+5;}).join(\"\");}function We(e){for(var t=new Map(),r=new Set(),n=0,i=e.units.length;n<i;++n){var a=He(e.units[n].conformation.operator.hkl);r.add(a);}var o=Array.from(r.values()).sort();return o.forEach(function(e){return t.set(e,t.size);}),{min:Ge(o[0]),max:Ge(o[o.length-1]),map:t};}var Qe,Ye={name:\"operator-hkl\",label:\"Operator HKL\",category:\"Symmetry\",factory:function e(t,r){var n,a;if(t.structure){var o=We(t.structure.root),s=o.min,u=o.max,c=o.map,l=[];c.forEach(function(e,t){var r=e%c.size,n=qe(Ge(t));void 0===l[r]?l[r]=n:l[r]+=\", \"+n;}),r.palette.params.minLabel=qe(s),r.palette.params.maxLabel=qe(u),r.palette.params.valueLabel=function(e){return l[e];};var d=Object(v.a)(c.size,r);a=d.legend,n=function n(e){var t=void 0;if(i.StructureElement.Location.is(e)){var r=He(e.unit.conformation.operator.hkl);t=c.get(r);}else if(i.Bond.isLocation(e)){r=He(e.aUnit.conformation.operator.hkl);t=c.get(r);}return void 0===t?Ue:d.color(t);};}else n=function n(){return Ue;};return{factory:e,granularity:\"instance\",color:n,props:r,description:\"Assigns a color based on the operator HKL value of a transformed chain.\",legend:a};},getParams:function getParams(e){var t=o.ParamDefinition.clone(ze);return e.structure&&We(e.structure.root).map.size>A.ColorLists[\"dark-2\"].list.length&&(t.palette.defaultValue.name=\"colors\",t.palette.defaultValue.params=Object(h.__assign)(Object(h.__assign)({},t.palette.defaultValue.params),{list:{kind:\"interpolate\",colors:Object(A.getColorListFromName)(\"dark-2\").list}})),t;},defaultValues:o.ParamDefinition.getDefaultValues(ze),isApplicable:function isApplicable(e){return!!e.structure;}};!function(e){e.EmptyFactory=function(){return e.Empty;};var t=Object(n.Color)(13421772);e.Empty={factory:e.EmptyFactory,granularity:\"uniform\",color:function color(){return t;},props:{}},e.areEqual=function(e,t){return e.contextHash===t.contextHash&&e.factory===t.factory&&Object(f.h)(e.props,t.props);},e.EmptyProvider={name:\"\",label:\"\",category:\"\",factory:e.EmptyFactory,getParams:function getParams(){return{};},defaultValues:{},isApplicable:function isApplicable(){return!0;}},e.createRegistry=function(){return new p.b(e.BuiltIn,e.EmptyProvider);},e.BuiltIn={\"carbohydrate-symbol\":l,\"chain-id\":m.b,\"element-index\":_,\"element-symbol\":S.ElementSymbolColorThemeProvider,\"entity-source\":_e,hydrophobicity:Ae,illustrative:Ce,\"model-index\":Ie,\"molecule-type\":E,occupancy:Ve,\"operator-hkl\":Ye,\"operator-name\":Fe,\"polymer-id\":k,\"polymer-index\":L,\"residue-name\":q,\"secondary-structure\":J,\"sequence-id\":ne,\"shape-group\":ie.b,uncertainty:de,\"unit-index\":se,uniform:d.b};}(Qe||(Qe={}));},function(e,t,r){\"use strict\";function n(){return\"function\"==typeof Symbol&&Symbol.iterator?Symbol.iterator:\"@@iterator\";}r.d(t,\"a\",function(){return i;});var i=n();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureRepresentation3D\",function(){return Qt;}),r.d(t,\"ExplodeStructureRepresentation3D\",function(){return Xt;}),r.d(t,\"UnwindStructureAssemblyRepresentation3D\",function(){return Yt;}),r.d(t,\"OverpaintStructureRepresentation3DFromScript\",function(){return Kt;}),r.d(t,\"OverpaintStructureRepresentation3DFromBundle\",function(){return Zt;}),r.d(t,\"TransparencyStructureRepresentation3DFromScript\",function(){return Jt;}),r.d(t,\"TransparencyStructureRepresentation3DFromBundle\",function(){return $t;}),r.d(t,\"ClippingStructureRepresentation3DFromScript\",function(){return er;}),r.d(t,\"ClippingStructureRepresentation3DFromBundle\",function(){return tr;}),r.d(t,\"VolumeRepresentation3D\",function(){return rr;}),r.d(t,\"VolumeRepresentation3DHelpers\",function(){return zt;}),r.d(t,\"ShapeRepresentation3D\",function(){return nr;}),r.d(t,\"ModelUnitcell3D\",function(){return ir;}),r.d(t,\"StructureSelectionsDistance3D\",function(){return ar;}),r.d(t,\"StructureSelectionsAngle3D\",function(){return or;}),r.d(t,\"StructureSelectionsDihedral3D\",function(){return sr;}),r.d(t,\"StructureSelectionsLabel3D\",function(){return ur;}),r.d(t,\"StructureSelectionsOrientation3D\",function(){return cr;});var n=r(0),i=r(4),a=r(36),o=r(13),s=r(16),u=r(89),c=r(2),l=r(8),d=r(47),f=r(144),p=r(40),m=r(49),h=r(60),g=r(115),v=r(164),b=r(125),y=r(45),_=r(5),S=r(117),O=r(145),x=r(23),C=r(6),w=r(68);function P(e,t,r){void 0===r&&(r={});var i,a,o,l=0,d=new h.a(),P=p.a.createState(),j=Object(g.c)(),E=[],A=u.a.createEmpty(),T=c.ParamDefinition.getDefaultValues(t.Params);r.modifyState&&p.a.updateState(P,r.modifyState(P));var D=v.a.create();function I(e,t){return Object(x.isEveryLoci)(e)||m.a.isLoci(e)&&e.shape===a?t(C.Interval.ofBounds(0,a.groupCount*a.transforms.length)):function(e,t,r){if(!m.b.isLoci(e))return!1;if(e.shape!==t)return!1;for(var n=!1,i=t.groupCount,a=e.groups,o=0,s=a;o<s.length;o++){var u=s[o],c=u.ids,l=u.instance;if(C.Interval.is(c)){var d=l*i+C.Interval.start(c),f=l*i+C.Interval.end(c);r(C.Interval.ofBounds(d,f))&&(n=!0);}else for(var p=0,h=c.length;p<h;p++){var g=l*i+c[p];r(C.Interval.ofSingleton(g))&&(n=!0);}}return n;}(e,a,t);}return{label:\"Shape geometry\",get groupCount(){return o?o.count:0;},get props(){return T;},get params(){},get state(){return P;},get theme(){return A;},renderObjects:E,updated:d,createOrUpdate:function createOrUpdate(u,c){var h=this;return void 0===u&&(u={}),r.modifyProps&&(u=r.modifyProps(u)),s.b.create(\"ShapeRepresentation.create\",function(s){return Object(n.__awaiter)(h,void 0,void 0,function(){var h,y,x,C,w,I,M,k;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return h=Object.assign(T,u),c?[4,e(s,c,h,a)]:[3,2];case 1:return x=n.sent(),[3,3];case 2:x=void 0,n.label=3;case 3:if(function(e,t){void 0===e&&(e={}),v.a.reset(D),(t||a)&&(t&&!a?D.createNew=!0:t&&a&&t.id===a.id||(t&&a&&t.id!==a.id?(D.updateTransform=!0,D.createGeometry=!0):t&&console.warn(\"unexpected state\")),D.updateTransform&&(D.updateColor=!0,D.updateSize=!0),D.createGeometry&&(D.updateColor=!0,D.updateSize=!0));}(u,y=x),y&&(a=y,Object.assign(A,m.a.getTheme(a))),D.createNew)E.length=0,o=m.a.groupIterator(a),C=m.a.createTransform(a.transforms),w=t.createValues(a.geometry,C,o,A,h),I=t.createRenderableState(h),r.modifyState&&Object.assign(I,r.modifyState(I)),p.a.updateState(P,I),(i=Object(g.a)(a.geometry.kind,w,I,j))&&E.push(i);else{if(!i)throw new Error(\"expected renderObject to be available\");D.updateTransform&&(m.a.createTransform(a.transforms,i.values),o=m.a.groupIterator(a),M=o.instanceCount,k=o.groupCount,Object(b.a)(M*k,i.values)),D.createGeometry&&_.e.update(i.values.drawCount,f.a.getDrawCount(a.geometry)),(D.updateTransform||D.createGeometry)&&t.updateBoundingSphere(i.values,a.geometry),D.updateColor&&Object(S.a)(o,A.color,i.values),D.updateSize&&\"uSize\"in i.values&&Object(O.a)(o,A.size,i.values),t.updateValues(i.values,h),t.updateRenderableState(i.state,h);}return T=h,d.next(l++),[2];}});});});},getLoci:function getLoci(e){if(void 0===e)return m.a.Loci(a);var t=e.objectId,r=e.groupId,n=e.instanceId;return i&&i.id===t?m.b.Loci(a,[{ids:C.OrderedSet.ofSingleton(r),instance:n}]):x.EmptyLoci;},mark:function mark(e,t){if(!y.b.is(P.markerActions,t))return!1;if(m.b.isLoci(e)||m.a.isLoci(e)){if(e.shape!==a)return!1;}else if(!Object(x.isEveryLoci)(e))return!1;return w.a.mark(i,e,t,I);},setState:function setState(e){r.modifyState&&(e=r.modifyState(e)),i&&(void 0!==e.visible&&w.a.setVisibility(i,e.visible),void 0!==e.alphaFactor&&w.a.setAlphaFactor(i,e.alphaFactor),void 0!==e.pickable&&w.a.setPickable(i,e.pickable),void 0!==e.overpaint&&w.a.setOverpaint(i,e.overpaint,I,!0),void 0!==e.transparency&&w.a.setTransparency(i,e.transparency,I,!0),void 0!==e.transform&&w.a.setTransform(i,e.transform)),p.a.updateState(P,e);},setTheme:function setTheme(e){console.warn(\"The `ShapeRepresentation` theme is fixed to `ShapeGroupColorTheme` and `ShapeGroupSizeTheme`. Colors are taken from `Shape.getColor` and sizes from `Shape.getSize`\");},destroy:function destroy(){E.length=0,i=void 0;}};}var j=r(1),E=r(182),A=Object(j.Mat4)(),T=function(){function e(e){this.structure=e,this.groupUnitTransforms=[],this.unitOffsetMap=C.IntMap.Mutable(),this.groupIndexMap=C.IntMap.Mutable(),this._isIdentity=void 0,this.version=0,this.unitTransforms=new Float32Array(16*e.units.length),this.size=e.units.length,this.reset();for(var t=0,r=0,n=e.unitSymmetryGroups.length;r<n;++r){var i=e.unitSymmetryGroups[r];this.groupIndexMap.set(i.hashCode,r);var a=this.unitTransforms.subarray(t,t+16*i.units.length);this.groupUnitTransforms.push(a);for(var o=0,s=i.units.length;o<s;++o)this.unitOffsetMap.set(i.units[o].id,t+16*o);t+=16*i.units.length;}}return e.prototype.reset=function(){this.version=0,Object(E.c)(this.unitTransforms,this.size),this._isIdentity=!0;},Object.defineProperty(e.prototype,\"isIdentity\",{get:function get(){if(void 0===this._isIdentity){this._isIdentity=!0;for(var e=0,t=16*this.size;e<t;e+=16)if(j.Mat4.fromArray(A,this.unitTransforms,e),!j.Mat4.isIdentity(A)){this._isIdentity=!1;break;}}return this._isIdentity;},enumerable:!1,configurable:!0}),e.prototype.setTransform=function(e,t){this.version=(this.version+1)%2147483647,j.Mat4.toArray(e,this.unitTransforms,this.unitOffsetMap.get(t.id)),this._isIdentity=void 0;},e.prototype.getTransform=function(e,t){return j.Mat4.fromArray(e,this.unitTransforms,this.unitOffsetMap.get(t.id));},e.prototype.getSymmetryGroupTransforms=function(e){return this.groupUnitTransforms[this.groupIndexMap.get(e.hashCode)];},e;}(),D=r(11),I=j.Mat4.zero();function M(e,t,r){for(var n=0,i=e.units.length;n<i;n++){var a=e.units[n];D.h.lerpFromIdentity(I,a.conformation.operator,r),t.setTransform(I,a);}}var k=j.Vec3.zero(),B=j.Vec3.zero(),V=j.Mat4.zero();function R(e,t,r){for(var n=e.boundary.sphere,i=n.radius*r,a=0,o=e.units.length;a<o;a++){var s=e.units[a];j.Vec3.transformMat4(k,s.lookup3d.boundary.sphere.center,s.conformation.operator.matrix),j.Vec3.sub(B,k,n.center),j.Vec3.setMagnitude(B,B,i),j.Mat4.fromTranslation(V,B),t.setTransform(V,s);}}var L=r(24),N=r(130),F=r(131),U=r(33),z=r(120),H=r(39),G=r(34),q=r(242),W=r(184),Q=j.Mat4.fromTranslation(Object(j.Mat4)(),j.Vec3.create(.5,.5,.5)),Y=Object(W.c)(Object(W.a)(Object(q.b)()),Q),X=Object(j.Vec3)(),K=Object(j.Mat4)(),Z=Object(n.__assign)(Object(n.__assign)({},H.a.Params),{cellColor:c.ParamDefinition.Color(d.a.orange),cellScale:c.ParamDefinition.Numeric(2,{min:.1,max:5,step:.1})}),J={mesh:function mesh(e,t){return P(ee,H.a.Utils);}},$=Object(n.__assign)({},Z);function ee(e,t,r,n){var a=function(e,t,r){var n=G.a.createState(256,128,r),i=e.symmetry.spacegroup.cell.fromFractional;j.Vec3.floor(X,e.ref),j.Mat4.fromTranslation(K,X);var a=Object(W.c)(Object(W.a)(Y),K),o=Math.cbrt(e.symmetry.spacegroup.cell.volume)/300*t.cellScale;n.currentGroup=1,G.a.addCage(n,i,a,o,2,20);var s=j.Vec3.create(0,0,0);j.Vec3.transformMat4(s,j.Vec3.add(s,s,X),i);var u=j.Vec3.create(1,1,1);j.Vec3.transformMat4(u,j.Vec3.add(u,u,X),i);var c=j.Vec3.create(1,0,0);j.Vec3.transformMat4(c,j.Vec3.add(c,c,X),i);var l=j.Vec3.create(0,1,1);j.Vec3.transformMat4(l,j.Vec3.add(l,l,X),i);var d=j.Vec3.create(0,0,1);j.Vec3.transformMat4(d,j.Vec3.add(d,d,X),i);var f=j.Vec3.create(1,0,1);j.Vec3.transformMat4(f,j.Vec3.add(f,f,X),i);var p=j.Vec3.create(1,1,0);j.Vec3.transformMat4(p,j.Vec3.add(p,p,X),i);var m=j.Vec3.create(0,1,0);j.Vec3.transformMat4(m,j.Vec3.add(m,m,X),i);var h=Object(j.Vec3)();j.Vec3.add(h,s,u),j.Vec3.scale(h,h,.5);var g=Math.max(j.Vec3.distance(s,u),j.Vec3.distance(c,l)),v=D.g.create(h,g/2);D.g.setExtrema(v,[s,u,c,l,d,f,p,m]),D.g.expand(v,v,o);var b=G.a.getMesh(n);return b.setBoundingSphere(v),b;}(t,r,n&&n.geometry),o=i.Symmetry.getUnitcellLabel(t.symmetry);return m.a.create(o,t,a,function(){return r.cellColor;},function(){return 1;},function(){return o;});}function te(e,t){return{symmetry:t,ref:j.Vec3.transformMat4(Object(j.Vec3)(),i.Model.getCenter(e),t.spacegroup.cell.toFractional)};}var re=r(74),ne=r(123),ie=r(172),ae=r(209),oe=r(70),se=r(221),ue={unitLabel:c.ParamDefinition.Text(\"Å\",{isEssential:!0})},ce=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},re.a.Params),ue),{lineSizeAttenuation:c.ParamDefinition.Boolean(!0),linesColor:c.ParamDefinition.Color(d.a.lightgreen,{isEssential:!0}),linesSize:c.ParamDefinition.Numeric(.075,{min:.01,max:5,step:.01}),dashLength:c.ParamDefinition.Numeric(.2,{min:.01,max:.2,step:.01})}),le=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},ne.a.Params),ue),{borderWidth:c.ParamDefinition.Numeric(.2,{min:0,max:.5,step:.01})}),se.a),de={lines:function lines(e,t){return P(ge,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.b.Highlighting});}});},text:function text(e,t){return P(ve,ne.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.a.None});}});}},fe=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},ce),le),{visuals:c.ParamDefinition.MultiSelect([\"lines\",\"text\"],c.ParamDefinition.objectToOptions(de))});function pe(e,t){var r=t.sphereA,n=t.sphereB,i=t.center,a=e.loci,o=a[0],s=a[1];return x.Loci.getBoundingSphere(o,r),x.Loci.getBoundingSphere(s,n),j.Vec3.add(i,r.center,n.center),j.Vec3.scale(i,i,.5),t.distance=j.Vec3.distance(r.center,n.center),t;}var me={sphereA:Object(D.g)(),sphereB:Object(D.g)(),center:Object(j.Vec3)(),distance:0};function he(e,t){return 1===e.pairs.length?\"Distance \"+Object(oe.distanceLabel)(e.pairs[0],{unitLabel:t,measureOnly:!0}):e.pairs.length+\" Distances\";}function ge(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.pairs.length;i<a;++i)pe(e.pairs[i],me),n.addFixedLengthDashes(me.sphereA.center,me.sphereB.center,t.dashLength,i);return n.getLines();}(t,r,n&&n.geometry),a=he(t,r.unitLabel);return m.a.create(a,t,i,function(){return r.linesColor;},function(){return r.linesSize;},function(e){return Object(oe.distanceLabel)(t.pairs[e],r);});}function ve(e,t,r,n){var i=function(e,t,r){for(var n=ae.a.create(t,128,64,r),i=0,a=e.pairs.length;i<a;++i){pe(e.pairs[i],me);var o=me.center,s=me.distance,u=me.sphereA,c=me.sphereB,l=t.customText||s.toFixed(2)+\" \"+t.unitLabel,d=Math.max(2,u.radius,c.radius)/2;n.add(l,o[0],o[1],o[2],1,d,i);}return n.getText();}(t,r,n&&n.geometry),a=he(t,r.unitLabel);return m.a.create(a,t,i,function(){return r.textColor;},function(){return r.textSize;},function(e){return Object(oe.distanceLabel)(t.pairs[e],r);});}function be(e){return{pairs:[{loci:[e[0].loci,e[1].loci]}]};}function ye(e){return{triples:[{loci:[e[0].loci,e[1].loci,e[2].loci]}]};}function _e(e){return{quads:[{loci:[e[0].loci,e[1].loci,e[2].loci,e[3].loci]}]};}function Se(e){return{infos:[{loci:e[0].loci}]};}function Oe(e){return{locis:[e[0].loci]};}var xe=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},ne.a.Params),{borderWidth:c.ParamDefinition.Numeric(.2,{min:0,max:.5,step:.01})}),se.a),{offsetZ:c.ParamDefinition.Numeric(2,{min:0,max:10,step:.1})}),Ce={text:function text(e,t){return P(Ee,ne.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});}},we=Object(n.__assign)(Object(n.__assign)({},xe),{visuals:c.ParamDefinition.MultiSelect([\"text\"],c.ParamDefinition.objectToOptions(Ce))}),Pe=Object(D.g)();function je(e,t){return void 0===t&&(t=!1),e.label||Object(oe.lociLabel)(e.loci,{hidePrefix:!0,htmlStyling:!1,condensed:t});}function Ee(e,t,r,n){var i=function(e,t,r){for(var n=ae.a.create(t,128,64,r),i=0,a=e.infos.length;i<a;++i){var o=e.infos[i],s=x.Loci.getBoundingSphere(o.loci,Pe);if(s){var u=s.center,c=s.radius,l=je(o,!0);n.add(l,u[0],u[1],u[2],c/.9,Math.max(1,c),i);}}return n.getText();}(t,r,n&&n.geometry),a=function(e){return 1===e.infos.length?je(e.infos[0]):e.infos.length+\" Labels\";}(t);return m.a.create(a,t,i,function(){return r.textColor;},function(){return r.textSize;},function(e){return je(t.infos[e]);});}var Ae=Object(j.Vec3)(),Te=j.Mat4.identity(),De=new Float32Array(18),Ie=new Uint8Array([0,1,2,3,4,5]);function Me(e,t,r,n,i){var a=t.origin,o=t.dirA,s=t.dirB,u=t.dirC;j.Vec3.add(Ae,a,o),j.Vec3.toArray(j.Vec3.add(Ae,a,o),De,0),j.Vec3.toArray(j.Vec3.sub(Ae,a,o),De,3),j.Vec3.toArray(j.Vec3.add(Ae,a,s),De,6),j.Vec3.toArray(j.Vec3.sub(Ae,a,s),De,9),j.Vec3.toArray(j.Vec3.add(Ae,a,u),De,12),j.Vec3.toArray(j.Vec3.sub(Ae,a,u),De,15);var c=Object(W.b)(De,Ie),l=D.a.volume(t),d=Math.cbrt(l)/300*r;G.a.addCage(e,Te,c,d,n,i);}r(81),r(75),j.Vec3.zero(),j.Vec3.zero();var ke=Object(j.Vec3)(),Be=Object(j.Vec3)(),Ve=Object(j.Vec3)(),Re=Object(j.Vec3)(),Le=j.Mat4.identity(),Ne=new Float32Array(24),Fe=new Uint8Array([0,1,0,3,0,6,1,2,1,7,2,3,2,4,3,5,4,5,4,7,5,6,6,7]);function Ue(e,t,r,n,i){var a=t.origin,o=t.dirA,s=t.dirB,u=t.dirC,c=j.Vec3.negate(Be,o),l=j.Vec3.negate(Ve,s),d=j.Vec3.negate(Re,u),f=0,p=function p(e,t,r){j.Vec3.copy(ke,a),j.Vec3.add(ke,ke,e),j.Vec3.add(ke,ke,t),j.Vec3.add(ke,ke,r),j.Vec3.toArray(ke,Ne,f),f+=3;};p(o,s,u),p(o,s,d),p(o,l,d),p(o,l,u),p(c,l,d),p(c,l,u),p(c,s,u),p(c,s,d);var m=Object(W.b)(Ne,Fe),h=D.a.volume(t),g=Math.cbrt(h)/300*r;G.a.addCage(e,Le,m,g,n,i);}var ze=r(308),He={color:c.ParamDefinition.Color(d.a.orange),scale:c.ParamDefinition.Numeric(2,{min:.1,max:10,step:.1})},Ge=Object(n.__assign)(Object(n.__assign)({},H.a.Params),He),qe=Object(n.__assign)(Object(n.__assign)({},H.a.Params),He),We=(Object(n.__assign)(Object(n.__assign)({},H.a.Params),He),{axes:function axes(e,t){return P(Ke,H.a.Utils);},box:function box(e,t){return P(Ze,H.a.Utils);},ellipsoid:function ellipsoid(e,t){return P(Je,H.a.Utils);}}),Qe=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},Ge),qe),{visuals:c.ParamDefinition.MultiSelect([\"box\"],c.ParamDefinition.objectToOptions(We)),color:c.ParamDefinition.Color(d.a.orange),scale:c.ParamDefinition.Numeric(2,{min:.1,max:5,step:.1})});function Ye(e){return\"Principal Axes of \"+Object(oe.lociLabel)(e,{countsOnly:!0});}function Xe(e){return 1===e.locis.length?Ye(e.locis[0]):e.locis.length+\" Orientations\";}function Ke(e,t,r,n){var i=function(e,t,r){for(var n=G.a.createState(256,128,r),i=0,a=e.locis.length;i<a;++i){var o=x.Loci.getPrincipalAxes(e.locis[i]);o&&(n.currentGroup=i,Me(n,o.momentsAxes,t.scale,2,20));}return G.a.getMesh(n);}(t,r,n&&n.geometry),a=Xe(t);return m.a.create(a,t,i,function(){return r.color;},function(){return 1;},function(e){return Ye(t.locis[e]);});}function Ze(e,t,r,n){var i=function(e,t,r){for(var n=G.a.createState(256,128,r),i=0,a=e.locis.length;i<a;++i){var o=x.Loci.getPrincipalAxes(e.locis[i]);o&&(n.currentGroup=i,Ue(n,o.boxAxes,t.scale,2,20));}return G.a.getMesh(n);}(t,r,n&&n.geometry),a=Xe(t);return m.a.create(a,t,i,function(){return r.color;},function(){return 1;},function(e){return Ye(t.locis[e]);});}function Je(e,t,r,n){var i=function(e,t,r){for(var n=G.a.createState(256,128,r),i=0,a=e.locis.length;i<a;++i){var o=x.Loci.getPrincipalAxes(e.locis[i]);if(o){var s=o.boxAxes,u=s.origin,c=s.dirA,l=s.dirB,d=D.a.size(Object(j.Vec3)(),s);j.Vec3.scale(d,d,.5);var f=j.Vec3.create(d[2],d[1],d[0]);n.currentGroup=i,Object(ze.a)(n,u,c,l,f,2);}}return G.a.getMesh(n);}(t,0,n&&n.geometry),a=Xe(t);return m.a.create(a,t,i,function(){return r.color;},function(){return 1;},function(e){return Ye(t.locis[e]);});}var $e=r(46),et={radius:1,segments:36,thetaStart:0,thetaLength:2*Math.PI};function tt(e){var t=Object(n.__assign)(Object(n.__assign)({},et),e),r=t.radius,i=t.segments,a=t.thetaStart,o=t.thetaLength,s=o===2*Math.PI,u=s?i+1:i+2,c=new Float32Array(3*u),l=new Float32Array(3*u),d=new Uint32Array(3*i);c[0]=0,c[1]=0,c[2]=0,l[0]=0,l[1]=1,l[2]=0;for(var f=0,p=3;f<i;++f,p+=3){var m=a+f/i*o;c[p]=r*Math.sin(m),c[p+1]=0,c[p+2]=r*Math.cos(m),l[p]=0,l[p+1]=1,l[p+2]=0;}for(f=1,p=0;f<i;++f,p+=3)d[p]=f,d[p+1]=f+1,d[p+2]=0;if(s){d[h=3*(i-1)]=i,d[h+1]=1,d[h+2]=0;}else{var h;m=a+o;c[p=3*(i+1)]=r*Math.sin(m),c[p+1]=0,c[p+2]=r*Math.cos(m),l[p]=0,l[p+1]=1,l[p+2]=0,d[h=3*(i-1)]=i,d[h+1]=i+1,d[h+2]=0;}return{vertices:c,normals:l,indices:d};}var rt=r(127),nt={color:c.ParamDefinition.Color(d.a.lightgreen),arcScale:c.ParamDefinition.Numeric(.7,{min:.01,max:1,step:.01})},it=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},re.a.Params),nt),{lineSizeAttenuation:c.ParamDefinition.Boolean(!0),linesSize:c.ParamDefinition.Numeric(.04,{min:.01,max:5,step:.01}),dashLength:c.ParamDefinition.Numeric(.04,{min:.01,max:.2,step:.01})}),at=Object(n.__assign)({},it),ot=Object(n.__assign)({},it),st=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},H.a.Params),nt),{ignoreLight:c.ParamDefinition.Boolean(!0),sectorOpacity:c.ParamDefinition.Numeric(.75,{min:0,max:1,step:.01})}),ut=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},ne.a.Params),se.a),{borderWidth:c.ParamDefinition.Numeric(.2,{min:0,max:.5,step:.01})}),ct={vectors:function vectors(e,t){return P(vt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},arc:function arc(e,t){return P(bt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},sector:function sector(e,t){return P(yt,H.a.Utils,{modifyProps:function modifyProps(e){return Object(n.__assign)(Object(n.__assign)({},e),{alpha:e.sectorOpacity});},modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.b.Highlighting});}});},text:function text(e,t){return P(_t,ne.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.a.None});}});}},lt=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},at),ot),st),ut),{visuals:c.ParamDefinition.MultiSelect([\"vectors\",\"sector\",\"text\"],c.ParamDefinition.objectToOptions(ct))});var dt=Object(j.Vec3)(),ft=Object(j.Mat4)();function pt(e,t,r){var n=t.sphereA,i=t.sphereB,a=t.sphereC,o=t.arcDirA,s=t.arcDirC,u=t.arcNormal,c=e.loci,l=c[0],d=c[1],f=c[2];x.Loci.getBoundingSphere(l,n),x.Loci.getBoundingSphere(d,i),x.Loci.getBoundingSphere(f,a),j.Vec3.sub(o,n.center,i.center),j.Vec3.sub(s,a.center,i.center),j.Vec3.cross(u,o,s);var p=Math.min(j.Vec3.magnitude(o),j.Vec3.magnitude(s))*r;return t.radius=p,t.angle=j.Vec3.angle(o,s),t;}function mt(e,t){var r=e.radius,n=e.angle,i=t?Object($e.b)(n,r)/t:32;j.Mat4.targetTo(ft,e.sphereB.center,e.sphereA.center,e.arcNormal),j.Mat4.setTranslation(ft,e.sphereB.center),j.Mat4.mul(ft,ft,j.Mat4.rotY180);var a=tt({radius:r,thetaLength:n,segments:i});return Object(rt.c)(a,ft);}var ht={sphereA:Object(D.g)(),sphereB:Object(D.g)(),sphereC:Object(D.g)(),arcDirA:Object(j.Vec3)(),arcDirC:Object(j.Vec3)(),arcNormal:Object(j.Vec3)(),radius:0,angle:0};function gt(e){return 1===e.triples.length?\"Angle \"+Object(oe.angleLabel)(e.triples[0],{measureOnly:!0}):e.triples.length+\" Angles\";}function vt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.triples.length;i<a;++i)pt(e.triples[i],ht,t.arcScale),n.addFixedLengthDashes(ht.sphereB.center,ht.sphereA.center,t.dashLength,i),n.addFixedLengthDashes(ht.sphereB.center,ht.sphereC.center,t.dashLength,i);return n.getLines();}(t,r,n&&n.geometry),a=gt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function bt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.triples.length;i<a;++i){pt(e.triples[i],ht,t.arcScale);for(var o=mt(ht,t.dashLength),s=o.indices,u=o.vertices,c=0,l=s.length;c<l;c+=3)if(c%2!=1){var d=3*s[c],f=3*s[c+1],p=u[d],m=u[d+1],h=u[d+2],g=u[f],v=u[f+1],b=u[f+2];n.add(p,m,h,g,v,b,i);}}return n.getLines();}(t,r,n&&n.geometry),a=gt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function yt(e,t,r,n){var i=function(e,t,r){for(var n=G.a.createState(128,64,r),i=0,a=e.triples.length;i<a;++i){pt(e.triples[i],ht,t.arcScale);var o=mt(ht);n.currentGroup=i,G.a.addPrimitive(n,j.Mat4.id,o),G.a.addPrimitiveFlipped(n,j.Mat4.id,o);}return G.a.getMesh(n);}(t,r,n&&n.geometry),a=gt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return 1;},function(e){return Object(oe.angleLabel)(t.triples[e]);});}function _t(e,t,r,n){var i=function(e,t,r){for(var n=ae.a.create(t,128,64,r),i=0,a=e.triples.length;i<a;++i){pt(e.triples[i],ht,t.arcScale),j.Vec3.add(dt,ht.arcDirA,ht.arcDirC),j.Vec3.setMagnitude(dt,dt,ht.radius),j.Vec3.add(dt,ht.sphereB.center,dt);var o=Object($e.f)(ht.angle).toFixed(2),s=t.customText||o+\"°\",u=Math.max(2,ht.sphereA.radius,ht.sphereB.radius,ht.sphereC.radius)/2;n.add(s,dt[0],dt[1],dt[2],.1,u,i);}return n.getText();}(t,r,n&&n.geometry),a=gt(t);return m.a.create(a,t,i,function(){return r.textColor;},function(){return r.textSize;},function(e){return Object(oe.angleLabel)(t.triples[e]);});}var St={color:c.ParamDefinition.Color(d.a.lightgreen),arcScale:c.ParamDefinition.Numeric(.7,{min:.01,max:1,step:.01})},Ot=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},re.a.Params),St),{lineSizeAttenuation:c.ParamDefinition.Boolean(!0),linesSize:c.ParamDefinition.Numeric(.04,{min:.01,max:5,step:.01}),dashLength:c.ParamDefinition.Numeric(.04,{min:.01,max:.2,step:.01})}),xt=Object(n.__assign)({},Ot),Ct=Object(n.__assign)({},Ot),wt=Object(n.__assign)({},Ot),Pt=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},H.a.Params),St),{ignoreLight:c.ParamDefinition.Boolean(!0),sectorOpacity:c.ParamDefinition.Numeric(.75,{min:0,max:1,step:.01})}),jt=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},ne.a.Params),{borderWidth:c.ParamDefinition.Numeric(.2,{min:0,max:.5,step:.01})}),se.a),Et={vectors:function vectors(e,t){return P(Vt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},extenders:function extenders(e,t){return P(Lt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},connector:function connector(e,t){return P(Rt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},arc:function arc(e,t){return P(Nt,re.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{pickable:!1});}});},sector:function sector(e,t){return P(Ft,H.a.Utils,{modifyProps:function modifyProps(e){return Object(n.__assign)(Object(n.__assign)({},e),{alpha:e.sectorOpacity});},modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.b.Highlighting});}});},text:function text(e,t){return P(Ut,ne.a.Utils,{modifyState:function modifyState(e){return Object(n.__assign)(Object(n.__assign)({},e),{markerActions:y.a.None});}});}},At=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},xt),Ct),wt),Pt),jt),{visuals:c.ParamDefinition.MultiSelect([\"extenders\",\"sector\",\"text\"],c.ParamDefinition.objectToOptions(Et))});var Tt=Object(j.Vec3)(),Dt=Object(j.Mat4)();function It(e,t,r){var n=t.sphereA,i=t.sphereB,a=t.sphereC,o=t.sphereD,s=t.dirBA,u=t.dirCD,c=t.projA,l=t.projD,d=t.arcPointA,f=t.arcPointD,p=t.arcDirA,m=t.arcDirD,h=t.arcCenter,g=t.arcNormal,v=e.loci,b=v[0],y=v[1],_=v[2],S=v[3];x.Loci.getBoundingSphere(b,n),x.Loci.getBoundingSphere(y,i),x.Loci.getBoundingSphere(_,a),x.Loci.getBoundingSphere(S,o),j.Vec3.add(h,i.center,a.center),j.Vec3.scale(h,h,.5),j.Vec3.sub(s,n.center,i.center),j.Vec3.sub(u,o.center,a.center),j.Vec3.add(d,h,s),j.Vec3.add(f,h,u),j.Vec3.sub(g,a.center,i.center),j.Vec3.orthogonalize(p,g,s),j.Vec3.orthogonalize(m,g,u),j.Vec3.projectPointOnVector(c,d,p,h),j.Vec3.projectPointOnVector(l,f,m,h);var O=Math.min(j.Vec3.distance(c,h),j.Vec3.distance(l,h))*r;j.Vec3.setMagnitude(p,p,O),j.Vec3.setMagnitude(m,m,O),j.Vec3.add(d,h,p),j.Vec3.add(f,h,m),t.radius=O,t.angle=j.Vec3.dihedralAngle(n.center,i.center,a.center,o.center),j.Vec3.matchDirection(Tt,g,j.Vec3.sub(Tt,d,n.center));var C=j.Vec3.angle(s,Tt),w=O/Math.cos(C>$e.d?C-$e.d:C);j.Vec3.add(c,i.center,j.Vec3.setMagnitude(Tt,s,w)),j.Vec3.matchDirection(Tt,g,j.Vec3.sub(Tt,f,o.center));var P=j.Vec3.angle(u,Tt),E=O/Math.cos(P>$e.d?P-$e.d:P);return j.Vec3.add(l,a.center,j.Vec3.setMagnitude(Tt,u,E)),t;}function Mt(e,t){var r=e.radius,n=e.angle,i=t?Object($e.b)(n,r)/t:32;j.Mat4.targetTo(Dt,e.arcCenter,n<0?e.arcPointD:e.arcPointA,e.arcNormal),j.Mat4.setTranslation(Dt,e.arcCenter),j.Mat4.mul(Dt,Dt,j.Mat4.rotY180);var a=tt({radius:r,thetaLength:Math.abs(n),segments:i});return Object(rt.c)(a,Dt);}var kt={sphereA:Object(D.g)(),sphereB:Object(D.g)(),sphereC:Object(D.g)(),sphereD:Object(D.g)(),dirBA:Object(j.Vec3)(),dirCD:Object(j.Vec3)(),projA:Object(j.Vec3)(),projD:Object(j.Vec3)(),arcPointA:Object(j.Vec3)(),arcPointD:Object(j.Vec3)(),arcDirA:Object(j.Vec3)(),arcDirD:Object(j.Vec3)(),arcCenter:Object(j.Vec3)(),arcNormal:Object(j.Vec3)(),radius:0,angle:0};function Bt(e){return 1===e.quads.length?\"Dihedral \"+Object(oe.dihedralLabel)(e.quads[0],{measureOnly:!0}):e.quads.length+\" Dihedrals\";}function Vt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.quads.length;i<a;++i)It(e.quads[i],kt,t.arcScale),n.addFixedLengthDashes(kt.arcCenter,kt.arcPointA,t.dashLength,i),n.addFixedLengthDashes(kt.arcCenter,kt.arcPointD,t.dashLength,i);return n.getLines();}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function Rt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.quads.length;i<a;++i)It(e.quads[i],kt,t.arcScale),n.addFixedLengthDashes(kt.sphereB.center,kt.sphereC.center,t.dashLength,i);return n.getLines();}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function Lt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.quads.length;i<a;++i)It(e.quads[i],kt,t.arcScale),n.addFixedLengthDashes(kt.arcPointA,kt.projA,t.dashLength,i),n.addFixedLengthDashes(kt.arcPointD,kt.projD,t.dashLength,i);return n.getLines();}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function Nt(e,t,r,n){var i=function(e,t,r){for(var n=ie.a.create(128,64,r),i=0,a=e.quads.length;i<a;++i){It(e.quads[i],kt,t.arcScale);for(var o=Mt(kt,t.dashLength),s=o.indices,u=o.vertices,c=0,l=s.length;c<l;c+=3)if(c%2!=1){var d=3*s[c],f=3*s[c+1],p=u[d],m=u[d+1],h=u[d+2],g=u[f],v=u[f+1],b=u[f+2];n.add(p,m,h,g,v,b,i);}}return n.getLines();}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return r.linesSize;},function(){return\"\";});}function Ft(e,t,r,n){var i=function(e,t,r){for(var n=G.a.createState(128,64,r),i=0,a=e.quads.length;i<a;++i){It(e.quads[i],kt,t.arcScale);var o=Mt(kt);n.currentGroup=i,G.a.addPrimitive(n,j.Mat4.id,o),G.a.addPrimitiveFlipped(n,j.Mat4.id,o);}return G.a.getMesh(n);}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.color;},function(){return 1;},function(e){return Object(oe.dihedralLabel)(t.quads[e]);});}function Ut(e,t,r,n){var i=function(e,t,r){for(var n=ae.a.create(t,128,64,r),i=0,a=e.quads.length;i<a;++i){It(e.quads[i],kt,t.arcScale),j.Vec3.add(Tt,kt.arcDirA,kt.arcDirD),j.Vec3.setMagnitude(Tt,Tt,kt.radius),j.Vec3.add(Tt,kt.arcCenter,Tt);var o=Math.abs(Object($e.f)(kt.angle)).toFixed(2),s=t.customText||o+\"°\",u=Math.max(2,kt.sphereA.radius,kt.sphereB.radius,kt.sphereC.radius,kt.sphereD.radius)/2;n.add(s,Tt[0],Tt[1],Tt[2],.1,u,i);}return n.getText();}(t,r,n&&n.geometry),a=Bt(t);return m.a.create(a,t,i,function(){return r.textColor;},function(){return r.textSize;},function(e){return Object(oe.dihedralLabel)(t.quads[e]);});}var zt,Ht,Gt=r(113),qt=r(77),Wt=r(282),Qt=l.b.BuiltIn({name:\"structure-representation-3d\",display:\"3D Representation\",from:l.a.Molecule.Structure,to:l.a.Molecule.Structure.Representation3D,params:function params(e,t){var r=t.representation.structure,n=r.registry,a=r.themes,o=n.get(n.default.name);if(!e){var s={help:function help(e){var t=e.name,r=e.params,n=a.colorThemeRegistry.get(t).factory({},r);return{description:n.description,legend:n.legend};}};return{type:c.ParamDefinition.Mapped(n.default.name,n.types,function(e){return c.ParamDefinition.Group(n.get(e).getParams(a,i.Structure.Empty));}),colorTheme:c.ParamDefinition.Mapped(o.defaultColorTheme.name,a.colorThemeRegistry.types,function(e){return c.ParamDefinition.Group(a.colorThemeRegistry.get(e).getParams({structure:i.Structure.Empty}));},s),sizeTheme:c.ParamDefinition.Mapped(o.defaultSizeTheme.name,a.sizeThemeRegistry.types,function(e){return c.ParamDefinition.Group(a.sizeThemeRegistry.get(e).getParams({structure:i.Structure.Empty}));})};}var u={structure:e.data},l={help:function help(e){var t=e.name,r=e.params,n=a.colorThemeRegistry.get(t).factory(u,r);return{description:n.description,legend:n.legend};}};return{type:c.ParamDefinition.Mapped(n.default.name,n.getApplicableTypes(e.data),function(t){return c.ParamDefinition.Group(n.get(t).getParams(a,e.data));}),colorTheme:c.ParamDefinition.Mapped(o.defaultColorTheme.name,a.colorThemeRegistry.getApplicableTypes(u),function(e){return c.ParamDefinition.Group(a.colorThemeRegistry.get(e).getParams(u));},l),sizeTheme:c.ParamDefinition.Mapped(o.defaultSizeTheme.name,a.sizeThemeRegistry.types,function(e){return c.ParamDefinition.Group(a.sizeThemeRegistry.get(e).getParams(u));})};}})({canAutoUpdate:function canAutoUpdate(e){var t=e.a,r=e.oldParams,n=e.newParams;return t.data.elementCount<1e4||r.type.name===n.type.name&&\"custom\"!==n.type.params.quality;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;e.cache;return s.b.create(\"Structure Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s,c,d;return Object(n.__generator)(this,function(f){switch(f.label){case 0:return r={runtime:e,assetManager:t.managers.asset},(o=t.representation.structure.registry.get(a.type.name)).ensureCustomProperties?[4,o.ensureCustomProperties.attach(r,i.data)]:[3,2];case 1:f.sent(),f.label=2;case 2:return s=a.type.params||{},c=o.factory(Object(n.__assign)({webgl:null===(d=t.canvas3d)||void 0===d?void 0:d.webgl},t.representation.structure.themes),o.getParams),[4,u.a.ensureDependencies(r,t.representation.structure.themes,{structure:i.data},a)];case 3:return f.sent(),c.setTheme(u.a.create(t.representation.structure.themes,{structure:i.data},a)),[4,c.createOrUpdate(s,i.data).runInContext(e)];case 4:return f.sent(),[2,new l.a.Molecule.Structure.Representation3D({repr:c,source:i},{label:o.label})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,c=e.oldParams,l=e.newParams;e.cache;return s.b.create(\"Structure Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,s,d,f;return Object(n.__generator)(this,function(p){switch(p.label){case 0:return l.type.name!==c.type.name?[2,o.StateTransformer.UpdateResult.Recreate]:((r=t.representation.structure.registry.get(c.type.name)).ensureCustomProperties&&r.ensureCustomProperties.detach(i.data),u.a.releaseDependencies(t.representation.structure.themes,{structure:i.data},c),s=t.representation.structure.registry.get(l.type.name),d={runtime:e,assetManager:t.managers.asset},s.ensureCustomProperties?[4,s.ensureCustomProperties.attach(d,i.data)]:[3,2]);case 1:p.sent(),p.label=2;case 2:return f=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),l.type.params),[4,u.a.ensureDependencies(d,t.representation.structure.themes,{structure:i.data},l)];case 3:return p.sent(),a.data.repr.setTheme(u.a.create(t.representation.structure.themes,{structure:i.data},l)),[4,a.data.repr.createOrUpdate(f,i.data).runInContext(e)];case 4:return p.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});},dispose:function dispose(e,t){var r=e.b,n=e.params;if(r&&n){var i=r.data.source.data,a=t.representation.structure.registry.get(n.type.name);a.ensureCustomProperties&&a.ensureCustomProperties.detach(i),u.a.releaseDependencies(t.representation.structure.themes,{structure:i},n);}},interpolate:function interpolate(e,t,r){if(\"uniform\"!==e.colorTheme.name||\"uniform\"!==t.colorTheme.name)return r<=.5?e:t;var n=e.colorTheme.params.value,i=t.colorTheme.params.value,a=L.Color.interpolate(n,i,r);return{type:r<=.5?e.type:t.type,colorTheme:{name:\"uniform\",params:{value:a}},sizeTheme:r<=.5?e.sizeTheme:t.sizeTheme};}}),Yt=l.b.BuiltIn({name:\"unwind-structure-assembly-representation-3d\",display:\"Unwind Assembly 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{t:c.ParamDefinition.Numeric(0,{min:0,max:1,step:.01})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=new T(n);return M(n,i,r.t),new l.a.Molecule.Structure.Representation3DState({state:{unitTransforms:i},initialState:{unitTransforms:new T(n)},info:n,source:t},{label:\"Unwind T = \"+r.t.toFixed(2)});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=e.oldParams,a=r.data.info;return t.data.source.data!==a?o.StateTransformer.UpdateResult.Recreate:i.t===n.t?o.StateTransformer.UpdateResult.Unchanged:(M(a,r.data.state.unitTransforms,n.t),r.label=\"Unwind T = \"+n.t.toFixed(2),r.data.source=t,o.StateTransformer.UpdateResult.Updated);}}),Xt=l.b.BuiltIn({name:\"explode-structure-representation-3d\",display:\"Explode 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{t:c.ParamDefinition.Numeric(0,{min:0,max:1,step:.01})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=new T(n.root);return R(n,i,r.t),new l.a.Molecule.Structure.Representation3DState({state:{unitTransforms:i},initialState:{unitTransforms:new T(n.root)},info:n.root,source:t},{label:\"Explode T = \"+r.t.toFixed(2)});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=e.oldParams,a=t.data.source.data;if(r.data.info!==a.root)return o.StateTransformer.UpdateResult.Recreate;if(i.t===n.t)return o.StateTransformer.UpdateResult.Unchanged;var s=r.data.state.unitTransforms;return R(a.root,s,n.t),r.label=\"Explode T = \"+n.t.toFixed(2),r.data.source=t,o.StateTransformer.UpdateResult.Updated;}}),Kt=l.b.BuiltIn({name:\"overpaint-structure-representation-3d-from-script\",display:\"Overpaint 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({script:c.ParamDefinition.Script(Object(z.Script)(\"(sel.atom.all)\",\"mol-script\")),color:c.ParamDefinition.Color(d.a.blueviolet),clear:c.ParamDefinition.Boolean(!1)},function(e){return\"\"+(e.clear?\"Clear\":L.Color.toRgbString(e.color));},{defaultValue:[{script:Object(z.Script)(\"(sel.atom.all)\",\"mol-script\"),color:d.a.blueviolet,clear:!1}]})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=N.a.ofScript(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{overpaint:i},initialState:{overpaint:N.a.Empty},info:n,source:t},{label:\"Overpaint (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info),a=t.data.source.data;if(a!==i)return o.StateTransformer.UpdateResult.Recreate;var s=r.data.state.overpaint,u=N.a.ofScript(n.layers,a);return N.a.areEqual(s,u)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.overpaint=u,r.data.source=t,r.label=\"Overpaint (\"+u.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}}),Zt=l.b.BuiltIn({name:\"overpaint-structure-representation-3d-from-bundle\",display:\"Overpaint 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({bundle:c.ParamDefinition.Value(i.StructureElement.Bundle.Empty),color:c.ParamDefinition.Color(d.a.blueviolet),clear:c.ParamDefinition.Boolean(!1)},function(e){return\"\"+(e.clear?\"Clear\":L.Color.toRgbString(e.color));},{defaultValue:[{bundle:i.StructureElement.Bundle.Empty,color:d.a.blueviolet,clear:!1}],isHidden:!0})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=N.a.ofBundle(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{overpaint:i},initialState:{overpaint:N.a.Empty},info:n,source:t},{label:\"Overpaint (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info),a=t.data.source.data;if(a!==i)return o.StateTransformer.UpdateResult.Recreate;var s=r.data.state.overpaint,u=N.a.ofBundle(n.layers,a);return N.a.areEqual(s,u)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.overpaint=u,r.data.source=t,r.label=\"Overpaint (\"+u.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}}),Jt=l.b.BuiltIn({name:\"transparency-structure-representation-3d-from-script\",display:\"Transparency 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({script:c.ParamDefinition.Script(Object(z.Script)(\"(sel.atom.all)\",\"mol-script\")),value:c.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01},{label:\"Transparency\"})},function(e){return\"Transparency (\"+e.value+\")\";},{defaultValue:[{script:Object(z.Script)(\"(sel.atom.all)\",\"mol-script\"),value:.5}]})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=F.a.ofScript(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{transparency:i},initialState:{transparency:F.a.Empty},info:n,source:t},{label:\"Transparency (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info);if(t.data.source.data!==i)return o.StateTransformer.UpdateResult.Recreate;var a=r.data.state.transparency,s=F.a.ofScript(n.layers,i);return F.a.areEqual(a,s)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.transparency=s,r.data.source=t,r.label=\"Transparency (\"+s.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}}),$t=l.b.BuiltIn({name:\"transparency-structure-representation-3d-from-bundle\",display:\"Transparency 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({bundle:c.ParamDefinition.Value(i.StructureElement.Bundle.Empty),value:c.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01},{label:\"Transparency\"})},function(e){return\"Transparency (\"+e.value+\")\";},{defaultValue:[{bundle:i.StructureElement.Bundle.Empty,value:.5}],isHidden:!0})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=F.a.ofBundle(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{transparency:i},initialState:{transparency:F.a.Empty},info:n,source:t},{label:\"Transparency (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info);if(t.data.source.data!==i)return o.StateTransformer.UpdateResult.Recreate;var a=r.data.state.transparency,s=F.a.ofBundle(n.layers,i);return F.a.areEqual(a,s)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.transparency=s,r.data.source=t,r.label=\"Transparency (\"+s.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}}),er=l.b.BuiltIn({name:\"clipping-structure-representation-3d-from-script\",display:\"Clipping 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({script:c.ParamDefinition.Script(Object(z.Script)(\"(sel.atom.all)\",\"mol-script\")),groups:c.ParamDefinition.Converted(function(e){return qt.a.Groups.toNames(e);},function(e){return qt.a.Groups.fromNames(e);},c.ParamDefinition.MultiSelect(Object(Wt.a)(qt.a.Groups.Names),c.ParamDefinition.objectToOptions(qt.a.Groups.Names)))},function(e){return qt.a.Groups.toNames(e.groups).length+\" group(s)\";},{defaultValue:[{script:Object(z.Script)(\"(sel.atom.all)\",\"mol-script\"),groups:0}]})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=qt.a.ofScript(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{clipping:i},initialState:{clipping:qt.a.Empty},info:n,source:t},{label:\"Clipping (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info);if(t.data.source.data!==i)return o.StateTransformer.UpdateResult.Recreate;var a=r.data.state.clipping,s=qt.a.ofScript(n.layers,i);return qt.a.areEqual(a,s)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.clipping=s,r.data.source=t,r.label=\"Clipping (\"+s.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}}),tr=l.b.BuiltIn({name:\"clipping-structure-representation-3d-from-bundle\",display:\"Clipping 3D Representation\",from:l.a.Molecule.Structure.Representation3D,to:l.a.Molecule.Structure.Representation3DState,params:{layers:c.ParamDefinition.ObjectList({bundle:c.ParamDefinition.Value(i.StructureElement.Bundle.Empty),groups:c.ParamDefinition.Converted(function(e){return qt.a.Groups.toNames(e);},function(e){return qt.a.Groups.fromNames(e);},c.ParamDefinition.MultiSelect(Object(Wt.a)(qt.a.Groups.Names),c.ParamDefinition.objectToOptions(qt.a.Groups.Names)))},function(e){return qt.a.Groups.toNames(e.groups).length+\" group(s)\";},{defaultValue:[{bundle:i.StructureElement.Bundle.Empty,groups:0}],isHidden:!0})}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e){var t=e.a,r=e.params,n=t.data.source.data,i=qt.a.ofBundle(r.layers,n);return new l.a.Molecule.Structure.Representation3DState({state:{clipping:i},initialState:{clipping:qt.a.Empty},info:n,source:t},{label:\"Clipping (\"+i.layers.length+\" Layers)\"});},update:function update(e){var t=e.a,r=e.b,n=e.newParams,i=(e.oldParams,r.data.info);if(t.data.source.data!==i)return o.StateTransformer.UpdateResult.Recreate;var a=r.data.state.clipping,s=qt.a.ofBundle(n.layers,i);return qt.a.areEqual(a,s)?o.StateTransformer.UpdateResult.Unchanged:(r.data.state.clipping=s,r.data.source=t,r.label=\"Clipping (\"+s.layers.length+\" Layers)\",o.StateTransformer.UpdateResult.Updated);}});(Ht=zt||(zt={})).getDefaultParams=function(e,t,r,i){var a=e.representation.volume.registry.get(t),o={volume:r},s=e.representation.volume.themes.colorThemeRegistry.get(a.defaultColorTheme.name).getParams(o),u=e.representation.volume.themes.sizeThemeRegistry.get(a.defaultSizeTheme.name).getParams(o),l=c.ParamDefinition.getDefaultValues(a.getParams(e.representation.volume.themes,r));return{type:{name:t,params:i?Object(n.__assign)(Object(n.__assign)({},l),i):l},colorTheme:{name:a.defaultColorTheme.name,params:c.ParamDefinition.getDefaultValues(s)},sizeTheme:{name:a.defaultSizeTheme.name,params:c.ParamDefinition.getDefaultValues(u)}};},Ht.getDefaultParamsStatic=function(e,t,r,i,a,o,s){var u=e.representation.volume.registry.get(t),c=e.representation.volume.themes.colorThemeRegistry.get(i||u.defaultColorTheme.name),l=e.representation.volume.themes.sizeThemeRegistry.get(o||u.defaultSizeTheme.name);return{type:{name:t,params:r?Object(n.__assign)(Object(n.__assign)({},u.defaultValues),r):u.defaultValues},colorTheme:{name:u.defaultColorTheme.name,params:a?Object(n.__assign)(Object(n.__assign)({},c.defaultValues),a):c.defaultValues},sizeTheme:{name:u.defaultSizeTheme.name,params:s?Object(n.__assign)(Object(n.__assign)({},l.defaultValues),s):l.defaultValues}};},Ht.getDescription=function(e){return e.isoValue&&a.b.IsoValue.toString(e.isoValue);};var rr=l.b.BuiltIn({name:\"volume-representation-3d\",display:\"3D Representation\",from:l.a.Volume.Data,to:l.a.Volume.Representation3D,params:function params(e,t){var r=t.representation.volume,n=r.registry,i=r.themes,o=n.get(n.default.name);if(!e)return{type:c.ParamDefinition.Mapped(n.default.name,n.types,function(e){return c.ParamDefinition.Group(n.get(e).getParams(i,a.b.One));}),colorTheme:c.ParamDefinition.Mapped(o.defaultColorTheme.name,i.colorThemeRegistry.types,function(e){return c.ParamDefinition.Group(i.colorThemeRegistry.get(e).getParams({volume:a.b.One}));}),sizeTheme:c.ParamDefinition.Mapped(o.defaultSizeTheme.name,i.sizeThemeRegistry.types,function(e){return c.ParamDefinition.Group(i.sizeThemeRegistry.get(e).getParams({volume:a.b.One}));})};var s={volume:e.data};return{type:c.ParamDefinition.Mapped(n.default.name,n.types,function(t){return c.ParamDefinition.Group(n.get(t).getParams(i,e.data));}),colorTheme:c.ParamDefinition.Mapped(o.defaultColorTheme.name,i.colorThemeRegistry.getApplicableTypes(s),function(e){return c.ParamDefinition.Group(i.colorThemeRegistry.get(e).getParams(s));}),sizeTheme:c.ParamDefinition.Mapped(o.defaultSizeTheme.name,i.sizeThemeRegistry.types,function(e){return c.ParamDefinition.Group(i.sizeThemeRegistry.get(e).getParams(s));})};}})({canAutoUpdate:function canAutoUpdate(e){var t=e.oldParams,r=e.newParams;return t.type.name===r.type.name;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Volume Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s,c,d;return Object(n.__generator)(this,function(f){switch(f.label){case 0:return r={runtime:e,assetManager:t.managers.asset},(o=t.representation.volume.registry.get(a.type.name)).ensureCustomProperties?[4,o.ensureCustomProperties.attach(r,i.data)]:[3,2];case 1:f.sent(),f.label=2;case 2:return s=a.type.params||{},(c=o.factory(Object(n.__assign)({webgl:null===(d=t.canvas3d)||void 0===d?void 0:d.webgl},t.representation.volume.themes),o.getParams)).setTheme(u.a.create(t.representation.volume.themes,{volume:i.data},a)),[4,c.createOrUpdate(s,i.data).runInContext(e)];case 3:return f.sent(),[2,new l.a.Volume.Representation3D({repr:c,source:i},{label:o.label,description:zt.getDescription(s)})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,c=e.oldParams,l=e.newParams;return s.b.create(\"Volume Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,s;return Object(n.__generator)(this,function(d){switch(d.label){case 0:return l.type.name!==c.type.name?((r=t.representation.volume.registry.get(c.type.name)).ensureCustomProperties&&r.ensureCustomProperties.detach(i.data),[2,o.StateTransformer.UpdateResult.Recreate]):(s=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),l.type.params),a.data.repr.setTheme(u.a.create(t.representation.volume.themes,{volume:i.data},l)),[4,a.data.repr.createOrUpdate(s,i.data).runInContext(e)]);case 1:return d.sent(),a.description=zt.getDescription(s),[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),nr=l.b.BuiltIn({name:\"shape-representation-3d\",display:\"3D Representation\",from:l.a.Shape.Provider,to:l.a.Shape.Representation3D,params:function params(e,t){return e?e.data.params:U.a.Params;}})({canAutoUpdate:function canAutoUpdate(){return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Shape Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(o){switch(o.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},c.ParamDefinition.getDefaultValues(i.data.params)),a),[4,(r=P(i.data.getShape,i.data.geometryUtils)).createOrUpdate(t,i.data.data).runInContext(e)];case 1:return o.sent(),[2,new l.a.Shape.Representation3D({repr:r,source:i},{label:i.data.label})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Shape Representation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(r){switch(r.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),[4,a.data.repr.createOrUpdate(t,i.data.data).runInContext(e)];case 1:return r.sent(),[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),ir=l.b.BuiltIn({name:\"model-unitcell-3d\",display:\"Model Unit Cell\",from:l.a.Molecule.Model,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},$)})({isApplicable:function isApplicable(e){return!!Gt.a.Provider.get(e.data);},canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Model Unit Cell\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,s,u,c;return Object(n.__generator)(this,function(d){switch(d.label){case 0:return(r=Gt.a.Provider.get(i.data))?(s=te(i.data,r),[4,(u=function(e,t){return p.a.createMulti(\"Unit Cell\",e,t,p.a.StateBuilder,J);}(Object(n.__assign)({webgl:null===(c=t.canvas3d)||void 0===c?void 0:c.webgl},t.representation.structure.themes),function(){return $;})).createOrUpdate(a,s).runInContext(e)]):[2,o.StateObject.Null];case 1:return d.sent(),[2,new l.a.Shape.Representation3D({repr:u,source:i},{label:\"Unit Cell\",description:r.spacegroup.name})];}});});});},update:function update(e){var t=this,r=e.a,i=e.b,a=e.newParams;return s.b.create(\"Model Unit Cell\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,s,u;return Object(n.__generator)(this,function(c){switch(c.label){case 0:return(t=Gt.a.Provider.get(r.data))?(s=Object(n.__assign)(Object(n.__assign)({},i.data.repr.props),a),u=te(r.data,t),[4,i.data.repr.createOrUpdate(s,u).runInContext(e)]):[2,o.StateTransformer.UpdateResult.Null];case 1:return c.sent(),i.data.source=r,[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),ar=l.b.BuiltIn({name:\"structure-selections-distance-3d\",display:\"3D Distance\",from:l.a.Molecule.Structure.Selections,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},fe)})({canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Structure Distance\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return r=be(i.data),[4,(o=function(e,t){return p.a.createMulti(\"Distance\",e,t,p.a.StateBuilder,de);}(Object(n.__assign)({webgl:null===(s=t.canvas3d)||void 0===s?void 0:s.webgl},t.representation.structure.themes),function(){return fe;})).createOrUpdate(a,r).runInContext(e)];case 1:return u.sent(),[2,new l.a.Shape.Representation3D({repr:o,source:i},{label:\"Distance\"})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Structure Distance\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),r=be(i.data),[4,a.data.repr.createOrUpdate(t,r).runInContext(e)];case 1:return s.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),or=l.b.BuiltIn({name:\"structure-selections-angle-3d\",display:\"3D Angle\",from:l.a.Molecule.Structure.Selections,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},lt)})({canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Structure Angle\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return r=ye(i.data),[4,(o=function(e,t){return p.a.createMulti(\"Angle\",e,t,p.a.StateBuilder,ct);}(Object(n.__assign)({webgl:null===(s=t.canvas3d)||void 0===s?void 0:s.webgl},t.representation.structure.themes),function(){return lt;})).createOrUpdate(a,r).runInContext(e)];case 1:return u.sent(),[2,new l.a.Shape.Representation3D({repr:o,source:i},{label:\"Angle\"})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Structure Angle\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),r=ye(i.data),[4,a.data.repr.createOrUpdate(t,r).runInContext(e)];case 1:return s.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),sr=l.b.BuiltIn({name:\"structure-selections-dihedral-3d\",display:\"3D Dihedral\",from:l.a.Molecule.Structure.Selections,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},At)})({canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Structure Dihedral\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return r=_e(i.data),[4,(o=function(e,t){return p.a.createMulti(\"Dihedral\",e,t,p.a.StateBuilder,Et);}(Object(n.__assign)({webgl:null===(s=t.canvas3d)||void 0===s?void 0:s.webgl},t.representation.structure.themes),function(){return At;})).createOrUpdate(a,r).runInContext(e)];case 1:return u.sent(),[2,new l.a.Shape.Representation3D({repr:o,source:i},{label:\"Dihedral\"})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Structure Dihedral\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),r=_e(i.data),[4,a.data.repr.createOrUpdate(t,r).runInContext(e)];case 1:return s.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),ur=l.b.BuiltIn({name:\"structure-selections-label-3d\",display:\"3D Label\",from:l.a.Molecule.Structure.Selections,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},we)})({canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Structure Label\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return r=Se(i.data),[4,(o=function(e,t){return p.a.createMulti(\"Label\",e,t,p.a.StateBuilder,Ce);}(Object(n.__assign)({webgl:null===(s=t.canvas3d)||void 0===s?void 0:s.webgl},t.representation.structure.themes),function(){return we;})).createOrUpdate(a,r).runInContext(e)];case 1:return u.sent(),[2,new l.a.Shape.Representation3D({repr:o,source:i},{label:\"Label\"})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Structure Label\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),r=Se(i.data),[4,a.data.repr.createOrUpdate(t,r).runInContext(e)];case 1:return s.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});}}),cr=l.b.BuiltIn({name:\"structure-selections-orientation-3d\",display:\"3D Orientation\",from:l.a.Molecule.Structure.Selections,to:l.a.Shape.Representation3D,params:Object(n.__assign)({},Qe)})({canAutoUpdate:function canAutoUpdate(e){e.oldParams,e.newParams;return!0;},apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Structure Orientation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return r=Oe(i.data),[4,(o=function(e,t){var r=p.a.createMulti(\"Orientation\",e,t,p.a.StateBuilder,We);return r.setState({markerActions:y.b.Highlighting}),r;}(Object(n.__assign)({webgl:null===(s=t.canvas3d)||void 0===s?void 0:s.webgl},t.representation.structure.themes),function(){return Qe;})).createOrUpdate(a,r).runInContext(e)];case 1:return u.sent(),[2,new l.a.Shape.Representation3D({repr:o,source:i},{label:\"Orientation\"})];}});});});},update:function update(e,t){var r=this,i=e.a,a=e.b,u=(e.oldParams,e.newParams);return s.b.create(\"Structure Orientation\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return t=Object(n.__assign)(Object(n.__assign)({},a.data.repr.props),u),r=Oe(i.data),[4,a.data.repr.createOrUpdate(t,r).runInContext(e)];case 1:return s.sent(),a.data.source=i,[2,o.StateTransformer.UpdateResult.Updated];}});});});}});},function(e,t,r){\"use strict\";function n(){}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return it;}),r.d(t,\"b\",function(){return pt;}),r.d(t,\"c\",function(){return mt;});var n,i,a=r(0),o=r(2),s=r(4),u=r(9),c=r(11),l=r(6),d=r(228),f=r(1),p=r(185);!function(e){function t(e,t){for(var r=new Int32Array(t+1),n=new Int32Array(t),i=new Int32Array(t),a=e.members,o=e.count,s=e.offsets,u=0,c=s[o];u<c;++u)++i[a[u]];var l=0;for(u=0;u<t;u++)r[u]=l,l+=i[u];r[t]=l;var d=new Int32Array(l);for(u=0;u<o;++u)for(var f=s[u],p=s[u+1];f<p;++f){var m=a[f];d[r[m]+n[m]]=u,++n[m];}return{indices:d,offsets:r};}function r(e,t){for(var r,n=e.count,i=e.types,a=[],o=0;o<n;++o)t.has(i[o])&&a.push(o);var s=l.SortedArray.ofSortedArray(a);return{indices:s,get lookup3d(){if(!r){var t={x:e.x,y:e.y,z:e.z,indices:s};r=Object(c.c)(t,Object(p.a)(t));}return r;}};}e.setPosition=function(e,t,r,n){return f.Vec3.set(e,n.x[r],n.y[r],n.z[r]),f.Vec3.transformMat4(e,e,t.conformation.operator.matrix),e;},e.createElementsIndex=t,e.create=function(e,n){var i,o;return Object(a.__assign)(Object(a.__assign)({},n),{get lookup3d(){if(!i){var e={x:n.x,y:n.y,z:n.z,indices:l.OrderedSet.ofBounds(0,n.count)};i=Object(c.c)(e,Object(p.a)(e));}return i;},get elementsIndex(){return o||(o=t(n,e));},subset:function subset(e){return r(n,e);}});},e.createSubset=r,e.Info=function(e,t,r){var n=d.a.get(e).value;if(!n||!n.has(t.id))throw new Error(\"valence model required\");return{unit:t,types:r.types,feature:-1,x:r.x,y:r.y,z:r.z,members:r.members,offsets:r.offsets,idealGeometry:n.get(t.id).idealGeometry};},e.position=function(e,t){return f.Vec3.set(e,t.x[t.feature],t.y[t.feature],t.z[t.feature]),f.Vec3.transformMat4(e,e,t.unit.conformation.operator.matrix),e;};var n=Object(f.Vec3)(),i=Object(f.Vec3)();e.distance=function(e,t){var r=e.members[e.offsets[e.feature]],a=t.members[t.offsets[t.feature]];return e.unit.conformation.position(e.unit.elements[r],n),t.unit.conformation.position(t.unit.elements[a],i),f.Vec3.distance(n,i);},e.Provider=function(e,t){return{types:new Set(e),add:t};};}(n||(n={})),(i||(i={})).create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024);var i=u.a.create(Float32Array,1,t,r?r.x:e),a=u.a.create(Float32Array,1,t,r?r.y:e),o=u.a.create(Float32Array,1,t,r?r.z:e),s=u.a.create(Uint8Array,1,t,r?r.types:e),c=u.a.create(Uint8Array,1,t,r?r.groups:e),l=u.a.create(Uint32Array,1,t,r?r.offsets:e),d=u.a.create(Uint32Array,1,t,r?r.members:e),f={x:0,y:0,z:0,offset:0,count:0};return{startState:function startState(){f.x=0,f.y=0,f.z=0,f.offset=d.elementCount,f.count=0;},pushMember:function pushMember(e,t,r,n){u.a.add(d,n),f.x+=e,f.y+=t,f.z+=r,f.count+=1;},finishState:function finishState(e,t){var r=f.count;0!==r&&(u.a.add(s,e),u.a.add(c,t),u.a.add(i,f.x/r),u.a.add(a,f.y/r),u.a.add(o,f.z/r),u.a.add(l,f.offset));},add:function add(e,t,r,n,f,p){u.a.add(s,e),u.a.add(c,t),u.a.add(i,r),u.a.add(a,n),u.a.add(o,f),u.a.add(l,d.elementCount),u.a.add(d,p);},getFeatures:function getFeatures(e){u.a.add(l,d.elementCount);var t=u.a.compact(i,!0),r=u.a.compact(a,!0),f=u.a.compact(o,!0),p=i.elementCount;return n.create(e,{x:t,y:r,z:f,count:p,types:u.a.compact(s,!0),groups:u.a.compact(c,!0),offsets:u.a.compact(l,!0),members:u.a.compact(d,!0)});}};};var m,h,g=r(252),v=r(171),b=r(244);(m||(m={})).create=function(e,t){var r=[],n=[],i=[];return{add:function add(e,t,a){r[r.length]=e,n[n.length]=t,i[i.length]=a;},getContacts:function getContacts(){for(var a=new v.a.EdgeBuilder(e.count,r,n),o=new Int8Array(a.slotCount),s=new Int8Array(a.slotCount),u=0,c=a.edgeCount;u<c;u++)a.addNextEdge(),a.assignProperty(o,i[u]);var l,d=a.createGraph({type:o,flag:s});return Object.defineProperty(d,\"elementsIndex\",{get:function get(){return l||(l=g.b.createElementsIndex(d,e,t));}});}};},(h||(h={})).create=function(){var e=new b.a.Builder();return{startUnitPair:function startUnitPair(t,r){e.startUnitPair(t,r);},finishUnitPair:function finishUnitPair(){e.finishUnitPair();},add:function add(t,r,n){e.add(t,r,{type:n,flag:0});},getContacts:function getContacts(t){return new g.a(e.getMap(),t);}};};var y=r(29),_=r(119),S={lineOfSightDistFactor:o.ParamDefinition.Numeric(1,{min:0,max:3,step:.1})};function O(e,t,r){var n=t.members[t.offsets[t.feature]],i=r.members[r.offsets[r.feature]];if(n===i)return!1;var a=Object(y.a)(t.unit,n),o=Object(y.a)(r.unit,i);return(!a||!o||a===o)&&t.unit.residueIndex[t.unit.elements[n]]!==r.unit.residueIndex[r.unit.elements[i]]&&!Object(y.f)(e,t.unit,n,r.unit,i);}function x(e,t,r,n){var i=Object(y.a)(e,t),a=Object(y.a)(r,n);return i&&a&&i!==a;}function C(e,t){for(var r=t.feature,n=t.offsets,i=t.members,a=n[r],o=n[r+1];a<o;++a)if(i[a]===e)return!0;return!1;}var w=Object(f.Vec3)(),P=Object(f.Vec3)(),j=Object(f.Vec3)();function E(e,t,r,i){var a=t.feature,o=r.feature,u=t.members[t.offsets[a]],c=r.members[r.offsets[o]];n.position(P,t),n.position(j,r),f.Vec3.scale(w,f.Vec3.add(w,P,j),.5);var l=3*i,d=e.lookup3d.find(w[0],w[1],w[2],l),p=d.count,m=d.indices,h=d.units,g=d.squaredDistances;if(0===p)return!0;for(var v=0;v<p;++v){var b=m[v],S=h[v];if(s.Unit.isAtomic(S)){var O=Object(y.i)(S,b);if(\"H\"!==O){var E=Object(_.VdwRadius)(O);if(!(E*E*i*i<=g[v]||x(S,b,t.unit,u)||x(S,b,r.unit,c)||t.unit===S&&C(b,t)||r.unit===S&&C(b,r)||(S.conformation.position(S.elements[b],w),f.Vec3.squaredDistance(w,P)<1||f.Vec3.squaredDistance(w,j)<1)))return!1;}}}return!0;}function A(e,t,r,i,o,s){for(var u=r.x,c=r.y,d=r.z,f=r.subset(o.requiredFeatures),p=f.lookup3d,m=f.indices,h=n.Info(e,t,r),g=Object(a.__assign)({},h),v=s.lineOfSightDistFactor,b=0,y=l.OrderedSet.size(m);b<y;++b){var _=l.OrderedSet.getAt(m,b),S=p.find(u[_],c[_],d[_],o.maxDistance),x=S.count,C=S.indices,w=S.squaredDistances;if(0!==x){h.feature=_;for(var P=0;P<x;++P){var j=l.OrderedSet.getAt(m,C[P]);if(!(j<=_)&&(g.feature=j,O(e,h,g))){var A=o.getType(e,h,g,w[P]);A&&E(e,h,g,v)&&i.add(_,j,A);}}}}}var T=Object(f.Mat4)();var D=r(153),I=r(46),M={distanceMax:o.ParamDefinition.Numeric(4,{min:1,max:5,step:.1}),angleMax:o.ParamDefinition.Numeric(30,{min:0,max:60,step:1})},k=[\"CL\",\"BR\",\"I\",\"AT\"];var B=[\"N\",\"O\",\"S\"],V=[\"C\",\"N\",\"P\",\"S\"];var R=Object(I.c)(180),L=Object(I.c)(120);var N=n.Provider([6],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=0,c=n.length;u<c;++u){var l=Object(y.i)(t,u);k.includes(l)&&r.add(6,0,a[n[u]],o[n[u]],s[n[u]],u);}}),F=n.Provider([7],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=function u(i,_u2){var c=Object(y.i)(t,i);if(B.includes(c)){var l=!1;Object(y.g)(e,t,i,function(e,t){V.includes(Object(y.i)(e,t))&&(l=!0);}),l&&r.add(7,0,a[n[i]],o[n[i]],s[n[i]],i);}},c=0,l=n.length;c<l;++c)u(c);}),U={name:\"halogen-bonds\",params:M,createTester:function createTester(e){var t=function(e){return{angleMax:Object(I.c)(e.angleMax)};}(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([6,7]),getType:function getType(e,r,n){return function(e,t,r,n){var i=t.types[t.feature],a=r.types[r.feature];if(s=a,7===(o=i)&&6===s||6===o&&7===s){var o,s,u=6===i?[t,r]:[r,t],c=u[0],l=u[1],d=c.members[c.offsets[c.feature]],f=l.members[l.offsets[l.feature]],p=Object(D.c)(e,c.unit,d,l.unit,f);if(1===p.length&&!(R-p[0]>n.angleMax)){var m=Object(D.c)(e,l.unit,f,c.unit,d);if(0!==m.length&&!m.some(function(e){return L-e>n.angleMax;}))return 5;}}}(e,r,n,t);}};}},z=r(22),H={distanceMax:o.ParamDefinition.Numeric(3.5,{min:1,max:5,step:.1}),backbone:o.ParamDefinition.Boolean(!0,{description:\"Include backbone-to-backbone hydrogen bonds\"}),accAngleDevMax:o.ParamDefinition.Numeric(45,{min:0,max:180,step:1},{description:\"Max deviation from ideal acceptor angle\"}),donAngleDevMax:o.ParamDefinition.Numeric(45,{min:0,max:180,step:1},{description:\"Max deviation from ideal donor angle\"}),accOutOfPlaneAngleMax:o.ParamDefinition.Numeric(90,{min:0,max:180,step:1}),donOutOfPlaneAngleMax:o.ParamDefinition.Numeric(45,{min:0,max:180,step:1})},G=Object(a.__assign)(Object(a.__assign)({},H),{water:o.ParamDefinition.Boolean(!1,{description:\"Include water-to-water hydrogen bonds\"}),sulfurDistanceMax:o.ParamDefinition.Numeric(4.1,{min:1,max:5,step:.1})}),q=Object(a.__assign)({},H);function W(e,t){var r=d.a.get(e).value;if(!r)throw Error(\"expected valence model to be available\");var n=r.get(t.id);if(!n)throw Error(\"expected valence model for unit to be available\");return n;}function Q(e,t){var r=e.rings,n=r.elementAromaticRingIndices,i=r.all,a=n.get(t);if(void 0===a)return!1;for(var o=0,s=a.length;o<s;++o)for(var u=i[a[o]],c=0,l=u.length;c<l;++c){var d=Object(y.i)(e,u[c]);if(\"N\"===d||\"O\"===d)return!0;}return!1;}function Y(e,t){return 2===e.model.atomicHierarchy.derived.residue.moleculeType[e.residueIndex[e.elements[t]]];}function X(e,t){return z.ProteinBackboneAtoms.has(Object(y.b)(e,t));}function K(e,t){return\"HIS\"===Object(y.e)(e,t)&&\"N\"===Object(y.i)(e,t)&&function(e,t){return e.rings.elementRingIndices.has(t);}(e,t);}function Z(e){return{includeBackbone:e.backbone,maxAccAngleDev:Object(I.c)(e.accAngleDevMax),maxDonAngleDev:Object(I.c)(e.donAngleDevMax),maxAccOutOfPlaneAngle:Object(I.c)(e.accOutOfPlaneAngleMax),maxDonOutOfPlaneAngle:Object(I.c)(e.donOutOfPlaneAngleMax)};}var J=Object(I.c)(120);function $(e,t,r,n){var i=t.members[t.offsets[t.feature]],a=r.members[r.offsets[r.feature]];if(n.includeBackbone||(o=t.unit,s=i,u=r.unit,c=a,!X(o,s)||!X(u,c))){var o,s,u,c,l=Object(D.c)(e,t.unit,i,r.unit,a),d=D.a.get(t.idealGeometry[i])||J;if(!l.some(function(e){return Math.abs(d-e)>n.maxDonAngleDev;})){if(3===t.idealGeometry[i])if(void 0!==(m=Object(D.d)(e,t.unit,i,r.unit,a))&&m>n.maxDonOutOfPlaneAngle)return;var f=Object(D.c)(e,r.unit,a,t.unit,i),p=D.a.get(r.idealGeometry[a])||J;if(!f.some(function(e){return p-e>n.maxAccAngleDev;})){var m;if(3===r.idealGeometry[a])if(void 0!==(m=Object(D.d)(e,r.unit,a,t.unit,i))&&m>n.maxAccOutOfPlaneAngle)return;return!0;}}}}function ee(e,t,r,n,i){var a=t.types[t.feature],o=r.types[r.feature];if(u=o,5===(s=a)&&4===u||4===s&&5===u){var s,u,c,l,d,f,p=5===o?[t,r]:[r,t],m=p[0],h=p[1],g=m.members[m.offsets[m.feature]],v=h.members[h.offsets[h.feature]];if(!(n>(\"S\"===Object(y.i)(m.unit,g)||\"S\"===Object(y.i)(h.unit,v)?i.maxSulfurDistSq:i.maxDistSq)))if(i.includeWater||(c=m.unit,l=g,d=h.unit,f=v,!Y(c,l)||!Y(d,f)))if($(e,m,h,i))return 4;}}var te=n.Provider([4],function(e,t,r){for(var n=W(e,t).totalH,i=t.elements,a=t.model.atomicConformation,o=a.x,s=a.y,u=a.z,c=t.rings.elementAromaticRingIndices,l=0,d=i.length;l<d;++l)if(!c.has(l)){var f=Object(y.i)(t,l);(K(t,l)||n[l]>0&&(\"N\"===f||\"O\"===f||\"S\"===f))&&r.add(4,0,o[i[l]],s[i[l]],u[i[l]],l);}}),re=n.Provider([9],function(e,t,r){for(var n=W(e,t).totalH,i=t.elements,a=t.model.atomicConformation,o=a.x,s=a.y,u=a.z,c=0,l=i.length;c<l;++c)\"C\"===Object(y.i)(t,c)&&n[c]>0&&(Object(y.d)(e,t,c,\"N\")>0||Object(y.d)(e,t,c,\"O\")>0||Q(t,c))&&r.add(9,0,o[i[c]],s[i[c]],u[i[c]],c);}),ne=n.Provider([5],function(e,t,r){for(var n=W(e,t),i=n.charge,a=n.implicitH,o=n.idealGeometry,s=t.elements,u=t.model.atomicConformation,c=u.x,l=u.y,d=u.z,f=t.rings.elementAromaticRingIndices,p=function p(e){r.add(5,0,c[s[e]],l[s[e]],d[s[e]],e);},m=0,h=s.length;m<h;++m)if(!f.has(m)){var g=Object(y.i)(t,m);if(\"O\"===g)p(m);else if(\"N\"===g){if(K(t,m))p(m);else if(i[m]<1){var v=Object(y.c)(e,t,m)+a[m],b=o[m];(4===b&&v<4||3===b&&v<3||2===b&&v<2)&&p(m);}}else if(\"S\"===g){var _=Object(y.e)(t,m);\"CYS\"!==_&&\"MET\"!==_&&-1!==Object(y.h)(t,m)||p(m);}}}),ie={name:\"hydrogen-bonds\",params:G,createTester:function createTester(e){var t=Math.max(e.distanceMax,e.sulfurDistanceMax),r=function(e){return Object(a.__assign)(Object(a.__assign)({},Z(e)),{includeWater:e.water,maxSulfurDistSq:e.sulfurDistanceMax*e.sulfurDistanceMax,maxDistSq:e.distanceMax*e.distanceMax});}(e);return{maxDistance:t,requiredFeatures:new Set([4,5]),getType:function getType(e,t,n,i){return ee(e,t,n,i,r);}};}},ae={name:\"weak-hydrogen-bonds\",params:q,createTester:function createTester(e){var t=Z(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([9,5]),getType:function getType(e,r,n,i){return function(e,t,r,n,i){var a=t.types[t.feature],o=r.types[r.feature];if(u=o,9===(s=a)&&5===u||5===s&&9===u){var s,u,c=5===o?[t,r]:[r,t];if($(e,c[0],c[1],i))return 8;}}(e,r,n,0,t);}};}},oe=r(245);function se(e,t,r){return\"S\"===Object(y.i)(t,r)&&3===Object(y.d)(e,t,r,\"O\");}function ue(e,t,r){return\"S\"===Object(y.i)(t,r)&&4===Object(y.d)(e,t,r,\"O\");}function ce(e,t,r){return\"P\"===Object(y.i)(t,r)&&Object(y.d)(e,t,r,\"O\")===Object(y.c)(e,t,r);}function le(e,t,r){var n=0;return\"C\"===Object(y.i)(t,r)&&2===Object(y.d)(e,t,r,\"O\")&&1===Object(y.d)(e,t,r,\"C\")&&Object(y.g)(e,t,r,function(t,r){\"O\"===Object(y.i)(t,r)&&Object(y.c)(e,t,r)-Object(y.d)(e,t,r,\"H\")==1&&(n+=1);}),2===n;}function de(e,t,r){var n=0;return\"C\"===Object(y.i)(t,r)&&3===Object(y.c)(e,t,r)&&3===Object(y.d)(e,t,r,\"N\")&&Object(y.g)(e,t,r,function(t,r){Object(y.c)(e,t,r)-Object(y.d)(e,t,r,\"H\")==1&&(n+=1);}),2===n;}function fe(e,t,r){var n=0;return\"C\"===Object(y.i)(t,r)&&3===Object(y.c)(e,t,r)&&2===Object(y.d)(e,t,r,\"N\")&&1===Object(y.d)(e,t,r,\"C\")&&Object(y.g)(e,t,r,function(t,r){Object(y.c)(e,t,r)-Object(y.d)(e,t,r,\"H\")==1&&(n+=1);}),2===n;}new Set([\"N\",\"O\",\"S\",\"F\",\"CL\",\"BR\",\"I\"]);var pe={distanceMax:o.ParamDefinition.Numeric(5,{min:0,max:8,step:.1})},me={distanceMax:o.ParamDefinition.Numeric(5.5,{min:1,max:8,step:.1}),offsetMax:o.ParamDefinition.Numeric(2,{min:0,max:4,step:.1}),angleDevMax:o.ParamDefinition.Numeric(30,{min:0,max:180,step:1})},he={distanceMax:o.ParamDefinition.Numeric(6,{min:1,max:8,step:.1}),offsetMax:o.ParamDefinition.Numeric(2,{min:0,max:4,step:.1})},ge=[\"ARG\",\"HIS\",\"LYS\"],ve=[\"GLU\",\"ASP\"];function be(e,t){var r=d.a.get(e).value;if(!r)throw Error(\"expected valence model to be available\");var n=r.get(t.id);if(!n)throw Error(\"expected valence model for unit to be available\");return n;}var ye=Object(f.Vec3)(),_e=Object(f.Vec3)();var Se=Object(f.Vec3)(),Oe=Object(f.Vec3)(),xe=Object(f.Vec3)(),Ce=Object(f.Vec3)();function we(e,t){var r=t.unit,n=t.feature,i=t.offsets,a=t.members,o=r.elements,s=i[n];return t.unit.conformation.position(o[a[s]],Se),t.unit.conformation.position(o[a[s+1]],Oe),t.unit.conformation.position(o[a[s+2]],xe),f.Vec3.triangleNormal(e,Se,Oe,xe);}var Pe=function Pe(e,t,r){return n.position(Se,e),n.position(Oe,t),f.Vec3.sub(xe,Se,Oe),f.Vec3.projectOnPlane(Ce,xe,r),f.Vec3.add(Ce,Ce,Oe),f.Vec3.distance(Ce,Oe);};var je=Object(I.c)(180),Ee=Object(I.c)(90),Ae=Object(f.Vec3)(),Te=Object(f.Vec3)();function De(e,t,r,n,i){var a,o,s=t.types[t.feature],u=r.types[r.feature];if(o=u,(2===(a=s)&&1===o||1===a&&2===o)&&function(e,t,r){for(var n=e.feature,i=e.offsets,a=e.members,o=t.feature,s=t.offsets,u=t.members,c=i[n],l=i[n+1];c<l;++c){var d=a[c];e.unit.conformation.position(e.unit.elements[d],ye);for(var p=s[o],m=s[o+1];p<m;++p){var h=u[p];if(t.unit.conformation.position(t.unit.elements[h],_e),f.Vec3.squaredDistance(ye,_e)<r)return!0;}}return!1;}(t,r,i.distanceMaxSq))return 1;}var Ie=n.Provider([2],function(e,t,r){for(var n=be(e,t).charge,i=t.elements,a=t.model.atomicConformation,o=a.x,s=a.y,u=a.z,c=new Set(),d=t.model.atomicHierarchy.atoms.label_comp_id,f=l.Segmentation.transientSegments(t.model.atomicHierarchy.residueAtomSegments,i);f.hasNext;){var p=f.move(),m=p.index,h=p.start,g=p.end,v=d.value(t.model.atomicHierarchy.residueAtomSegments.offsets[m]);if(ve.includes(v)){r.startState();for(var b=h;b<g;++b)\"O\"!==Object(y.i)(t,b)||z.ProteinBackboneAtoms.has(Object(y.b)(t,b))||r.pushMember(o[i[b]],s[i[b]],u[i[b]],b);r.finishState(2,0);}else if(z.BaseNames.has(v))for(b=h;b<g;++b)ce(e,t,b)&&(r.startState(),Object(y.g)(e,t,b,function(e,n){\"O\"===Object(y.i)(t,n)&&r.pushMember(o[i[n]],s[i[n]],u[i[n]],n);}),r.finishState(2,6));else if(!z.PolymerNames.has(v)){for(b=h;b<g;++b){r.startState(),\"N\"!==Object(y.i)(t,b)||z.ProteinBackboneAtoms.has(Object(y.b)(t,b))||r.pushMember(o[i[b]],s[i[b]],u[i[b]],b),r.finishState(2,0);var _=0;se(e,t,b)?_=4:ce(e,t,b)?_=6:ue(e,t,b)?_=5:le(e,t,b)&&(_=10),_&&(r.startState(),Object(y.g)(e,t,b,function(e,n){\"O\"===Object(y.i)(t,n)&&(c.add(n),r.pushMember(o[i[n]],s[i[n]],u[i[n]],n));}),r.finishState(2,_));}for(b=h;b<g;++b)n[b]<0&&!c.has(b)&&r.add(2,0,o[i[b]],s[i[b]],u[i[b]],b);}}}),Me=n.Provider([1],function(e,t,r){for(var n=be(e,t).charge,i=t.elements,a=t.model.atomicConformation,o=a.x,s=a.y,u=a.z,c=new Set(),d=t.model.atomicHierarchy.atoms.label_comp_id,f=l.Segmentation.transientSegments(t.model.atomicHierarchy.residueAtomSegments,i);f.hasNext;){var p=f.move(),m=p.index,h=p.start,g=p.end,v=d.value(t.model.atomicHierarchy.residueAtomSegments.offsets[m]);if(ge.includes(v)){r.startState();for(var b=h;b<g;++b)\"N\"!==Object(y.i)(t,b)||z.ProteinBackboneAtoms.has(Object(y.b)(t,b))||r.pushMember(o[i[b]],s[i[b]],u[i[b]],b);r.finishState(1,0);}else if(!z.PolymerNames.has(v)){c.clear();for(b=h;b<g;++b){var _=0;de(e,t,b)?_=8:fe(e,t,b)&&(_=9),_&&(r.startState(),Object(y.g)(e,t,b,function(e,n){\"N\"===Object(y.i)(t,n)&&(c.add(n),r.pushMember(o[i[n]],s[i[n]],u[i[n]],n));}),r.finishState(1,_));}for(b=h;b<g;++b)n[b]>0&&!c.has(b)&&r.add(1,0,o[i[b]],s[i[b]],u[i[b]],b);}}}),ke=n.Provider([3],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=0,c=t.rings.aromaticRings;u<c.length;u++){var l=c[u],d=t.rings.all[l];r.startState();for(var f=0,p=d.length;f<p;++f){var m=d[f];r.pushMember(a[n[m]],o[n[m]],s[n[m]],m);}r.finishState(3,0);}}),Be={name:\"ionic\",params:pe,createTester:function createTester(e){var t=function(e){return{distanceMaxSq:e.distanceMax*e.distanceMax};}(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([2,1]),getType:function getType(e,r,n,i){return De(0,r,n,0,t);}};}},Ve={name:\"pi-stacking\",params:me,createTester:function createTester(e){var t=function(e){return{offsetMax:e.offsetMax,angleDevMax:Object(I.c)(e.angleDevMax)};}(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([3]),getType:function getType(e,r,n,i){return function(e,t,r,n,i){var a,o=t.types[t.feature],s=r.types[r.feature];if(a=s,3===o&&3===a){we(Ae,t),we(Te,r);var u=f.Vec3.angle(Ae,Te);if(Math.min(Pe(t,r,Te),Pe(r,t,Ae))<=i.offsetMax){if(u<=i.angleDevMax||u>=je-i.angleDevMax)return 3;if(u<=i.angleDevMax+Ee&&u>=Ee-i.angleDevMax)return 3;}}}(0,r,n,0,t);}};}},Re={name:\"cation-pi\",params:he,createTester:function createTester(e){var t=function(e){return{offsetMax:e.offsetMax};}(e);return{maxDistance:e.distanceMax,requiredFeatures:new Set([3,1]),getType:function getType(e,r,n,i){return function(e,t,r,n,i){var a,o,s=t.types[t.feature],u=r.types[r.feature];if(o=u,3===(a=s)&&1===o||1===a&&3===o){var c=3===s?[t,r]:[r,t],l=c[0],d=c[1];if(we(Ae,l),Pe(d,l,Ae)<=i.offsetMax)return 2;}}(0,r,n,0,t);}};}},Le={distanceMax:o.ParamDefinition.Numeric(4,{min:1,max:5,step:.1})};var Ne=n.Provider([8],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=function u(i,_u3){var c=Object(y.i)(t,i),l=!1;\"C\"===c?(l=!0,Object(y.g)(e,t,i,function(e,t){var r=Object(y.i)(e,t);\"C\"!==r&&\"H\"!==r&&(l=!1);})):\"F\"===c&&(l=!0),l&&r.add(8,0,a[n[i]],o[n[i]],s[n[i]],i);},c=0,l=n.length;c<l;++c)u(c);}),Fe={name:\"hydrophobic\",params:Le,createTester:function createTester(e){return{maxDistance:e.distanceMax,requiredFeatures:new Set([8]),getType:function getType(e,t,r,n){return function(e,t,r,n){var i=t.types[t.feature],a=r.types[r.feature];if(o=a,8===i&&8===o){var o,s=t.members[t.offsets[t.feature]],u=r.members[r.offsets[r.feature]];if(\"F\"!==Object(y.i)(t.unit,s)||\"F\"!==Object(y.i)(r.unit,u))return 6;}}(0,t,r);}};}},Ue=r(90),ze={distanceMax:o.ParamDefinition.Numeric(3,{min:1,max:5,step:.1})},He=[\"LI\",\"NA\",\"K\",\"RB\",\"CS\",\"MG\",\"CA\",\"SR\",\"BA\",\"AL\",\"GA\",\"IN\",\"TL\",\"SC\",\"SN\",\"PB\",\"BI\",\"SB\",\"HG\"];function Ge(e){return!z.ProteinBackboneAtoms.has(e);}function qe(e){return z.ProteinBackboneAtoms.has(e);}function We(e){return z.NucleicBackboneAtoms.has(e);}function Qe(e,t){return 12===e?11===t||12===t:13===e?10===t:void 0;}var Ye=n.Provider([13,12],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=0,c=n.length;u<c;++u){var l=Object(y.i)(t,u),d=0;He.includes(l)?d=13:(Object(oe.d)(l)||\"ZN\"===l||\"CD\"===l)&&(d=12),d&&r.add(d,0,a[n[u]],o[n[u]],s[n[u]],u);}}),Xe=n.Provider([10,11],function(e,t,r){for(var n=t.elements,i=t.model.atomicConformation,a=i.x,o=i.y,s=i.z,u=0,c=n.length;u<c;++u){var l=Object(y.i)(t,u),d=Object(y.e)(t,u),f=Object(y.b)(t,u),p=!1,m=!1,h=z.AminoAcidNames.has(d),g=z.BaseNames.has(d);h||g?h?\"O\"===l?([\"ASP\",\"GLU\",\"SER\",\"THR\",\"TYR\",\"ASN\",\"GLN\"].includes(d)&&Ge(f)||qe(f))&&(p=!0,m=!0):\"S\"!==l||\"CYS\"!==d&&\"MET\"!==d?\"N\"===l&&\"HIS\"===d&&Ge(f)&&(p=!0):(p=!0,m=!0):g&&(\"O\"===l&&We(f)?(p=!0,m=!0):[\"N3\",\"N4\",\"N7\"].includes(f)?p=!0:[\"O2\",\"O4\",\"O6\"].includes(f)&&(p=!0,m=!0)):Object(oe.b)(l)||\"O\"===l||\"S\"===l?(p=!0,m=!0):\"N\"===l&&(p=!0),p&&r.add(11,0,a[n[u]],o[n[u]],s[n[u]],u),m&&r.add(10,0,a[n[u]],o[n[u]],s[n[u]],u);}}),Ke={name:\"metal-coordination\",params:ze,createTester:function createTester(e){return{maxDistance:e.distanceMax,requiredFeatures:new Set([13,12,10,11]),getType:function getType(e,t,r,n){return function(e,t,r,n){var i=t.types[t.feature],a=r.types[r.feature];if(Qe(i,a)||Qe(a,i))return 7;}(0,t,r);}};}};function Ze(e,t){var r=t.contacts,i=function i(e,t,r,n,_i2){var a=n.get(r)||[1/0,-1],o=a[0],s=a[1];e<o?(-1!==s&&_i2(s),n.set(r,[e,t])):_i2(t);};function a(e,t,r,a,o){var s=t.members[t.offsets[t.feature]],u=r.members[r.offsets[r.feature]],c=t.unit.getResidueIndex(s),l=r.unit.getResidueIndex(u),d=s+\"|\"+t.unit.id+\"|\"+l+\"|\"+r.unit.id+\"|A\",f=u+\"|\"+r.unit.id+\"|\"+c+\"|\"+t.unit.id+\"|B\",p=n.distance(t,r);i(p,e,d,a,o),i(p,e,f,a,o);}var o,s,u=new Map(),c=function c(e){return r.edges[e].props.flag=1;};return{isApplicable:function isApplicable(e){return 6===e;},handleInterContact:function handleInterContact(e,t,r){a(e,t,r,u,c);},startUnit:function startUnit(e,t,r){o=new Map(),s=function s(e){return t.edgeProps.flag[e]=1;};},handleIntraContact:function handleIntraContact(e,t,r){a(e,t,r,o,s);}};}function Je(e,t){var r=t.contacts,n=function n(e,_n6){for(var i=9===e.types[e.feature]?_n6:e,a=i.members[i.offsets[i.feature]],o=t.unitsContacts.get(i.unit.id),s=o.edgeProps.type,u=o.elementsIndex,c=u.offsets,l=u.indices,d=c[a],f=c[a+1];d<f;++d)if(4===s[l[d]])return!0;var p=r.getEdgeIndices(i.feature,i.unit);for(d=0,f=p.length;d<f;++d)if(4===r.edges[p[d]].props.type)return!0;return!1;};return{isApplicable:function isApplicable(e){return 8===e;},handleInterContact:function handleInterContact(e,t,i){n(t,i)&&(r.edges[e].props.flag=1);},startUnit:function startUnit(){},handleIntraContact:function handleIntraContact(e,r,i){n(r,i)&&(t.unitsContacts.get(r.unit.id).edgeProps.flag[e]=1);}};}function $e(e,t,r,n,i){for(var a=r.offsets,o=r.feature,s=n.offsets,u=n.feature,c=a[o],l=a[o+1];c<l;++c)for(var d=r.members[c],f=i.getContactIndicesForElement(d,r.unit),p=0,m=f.length;p<m;++p){var h=f[p];if(e.includes(i.edges[h].props.type))for(var g=s[u],v=s[u+1];g<v;++g){var b=n.members[g];if(i.getContactIndicesForElement(b,n.unit).includes(h))return void(i.edges[t].props.flag=1);}}}function et(e,t,r,n,i){for(var a=i.edgeProps,o=a.type,s=a.flag,u=i.elementsIndex,c=u.offsets,l=u.indices,d=r.offsets,f=r.feature,p=n.offsets,m=n.feature,h=d[f],g=d[f+1];h<g;++h)for(var v=r.members[h],b=c[v],y=c[v+1];b<y;++b){var _=l[b];if(e.includes(o[_]))for(var S=p[m],O=p[m+1];S<O;++S)for(var x=n.members[S],C=c[x],w=c[x+1];C<w;++C)if(_===l[C])return void(s[t]=1);}}function tt(e,t){var r=t.contacts;return{isApplicable:function isApplicable(e){return 1===e;},handleInterContact:function handleInterContact(e,t,n){$e([4,8],e,t,n,r);},startUnit:function startUnit(){},handleIntraContact:function handleIntraContact(e,r,n){et([4,8],e,r,n,t.unitsContacts.get(r.unit.id));}};}function rt(e,t){var r=t.contacts;return{isApplicable:function isApplicable(e){return 6===e||2===e;},handleInterContact:function handleInterContact(e,t,n){$e([3],e,t,n,r);},startUnit:function startUnit(){},handleIntraContact:function handleIntraContact(e,r,n){et([3],e,r,n,t.unitsContacts.get(r.unit.id));}};}function nt(e,t){var r=t.contacts;return{isApplicable:function isApplicable(e){return 1===e;},handleInterContact:function handleInterContact(e,t,n){$e([7],e,t,n,r);},startUnit:function startUnit(){},handleIntraContact:function handleIntraContact(e,r,n){et([7],e,r,n,t.unitsContacts.get(r.unit.id));}};}var it,at=r(143),ot=r(195),st=r(23),ut=r(70),ct=r(282);!function(e){function t(e,t){var r=t.unitA,n=t.indexA,i=t.unitB,a=t.indexB,o=e.contacts,s=e.unitsContacts;if(r===i){var u=s.get(r.id),c=u.getDirectedEdgeIndex(n,a);return Object(g.e)(u.edgeProps.type[c]);}c=o.getEdgeIndex(n,r,a,i);return Object(g.e)(o.edges[c].props.type);}function r(e,t,r){var i=e.unitsFeatures;return ot.a.fromPairProvider(t.length,function(e,r,a){var o=t[e];n.setPosition(r,o.unitA,o.indexA,i.get(o.unitA.id)),n.setPosition(a,o.unitB,o.indexB,i.get(o.unitB.id));},r);}function i(e,r,n){var i=n[0];if(void 0===i)return\"\";var a=i.unitA,o=i.indexA,u=i.unitB,c=i.indexB,l=r.unitsFeatures,d=l.get(a.id),f=d.members,p=d.offsets,m=l.get(u.id),h=m.members,g=m.offsets,v={granularity:\"element\"};return(p[o+1]-p[o]>1||g[c+1]-g[c]>1)&&(v.granularity=\"residue\"),[t(r,i),Object(ut.bondLabel)(s.Bond.Location(e,a,f[p[o]],e,u,h[g[c]]),v)].join(\"</br>\");}e.Location=function(e,t,r,n,i,a){return Object(at.a)(\"interactions\",{structure:t,interactions:e},{unitA:r,indexA:n,unitB:i,indexB:a});},e.isLocation=function(e){return!!e&&\"data-location\"===e.kind&&\"interactions\"===e.tag;},e.areLocationsEqual=function(e,t){return e.data.structure===t.data.structure&&e.data.interactions===t.data.interactions&&e.element.indexA===t.element.indexA&&e.element.indexB===t.element.indexB&&e.element.unitA===t.element.unitA&&e.element.unitB===t.element.unitB;},e.locationLabel=function(e){return t(e.data.interactions,e.element);},e.Loci=function(e,t,n){return Object(st.DataLoci)(\"interactions\",{structure:e,interactions:t},n,function(e){return r(t,n,e);},function(){return i(e,t,n);});},e.isLoci=function(e){return!!e&&\"data-loci\"===e.kind&&\"interactions\"===e.tag;},e.getBoundingSphere=r,e.getLabel=i;}(it||(it={}));var lt=[te,re,ne,Ie,Me,ke,N,F,Ne,Ye,Xe],dt={ionic:Be,\"pi-stacking\":Ve,\"cation-pi\":Re,\"halogen-bonds\":U,\"hydrogen-bonds\":ie,\"weak-hydrogen-bonds\":ae,hydrophobic:Fe,\"metal-coordination\":Ke};var ft=function(e){void 0===e&&(e=[]);var t=Object.create(null);return Object.keys(dt).forEach(function(r){t[r]=o.ParamDefinition.MappedStatic(e.includes(r)?\"on\":\"off\",{on:o.ParamDefinition.Group(dt[r].params),off:o.ParamDefinition.Group({})},{cycle:!0});}),t;}([\"cation-pi\",\"pi-stacking\",\"hydrogen-bonds\",\"halogen-bonds\",\"metal-coordination\"]),pt={providers:o.ParamDefinition.Group(ft,{isFlat:!0}),contacts:o.ParamDefinition.Group(S,{label:\"Advanced Options\"})};function mt(e,t,r){return Object(a.__awaiter)(this,void 0,void 0,function(){var u,c,p,g,v,b,y,_,S,x,C,w,P,j,D,I;return Object(a.__generator)(this,function(M){switch(M.label){case 0:return u=Object(a.__assign)(Object(a.__assign)({},o.ParamDefinition.getDefaultValues(pt)),r),[4,d.a.attach(e,t)];case 1:M.sent(),c=[],Object(ct.a)(dt).forEach(function(e){var t=u.providers[e],r=t.name,n=t.params;\"on\"===r&&c.push(dt[e].createTester(n));}),p=new Set(),c.forEach(function(e){return Ue.a.add(p,e.requiredFeatures);}),g=lt.filter(function(e){return Ue.a.areIntersecting(p,e.types);}),v=l.IntMap.Mutable(),b=l.IntMap.Mutable(),y=0,_=t.unitSymmetryGroups.length,M.label=2;case 2:return y<_?(S=t.unitSymmetryGroups[y],e.runtime.shouldUpdate?[4,e.runtime.update({message:\"computing interactions\",current:y,max:_})]:[3,4]):[3,6];case 3:M.sent(),M.label=4;case 4:for(x=function(e,t,r){var n=t.elements.length,a=i.create(n,n/2);if(s.Unit.isAtomic(t))for(var o=0,u=r;o<u.length;o++){u[o].add(e,t,a);}return a.getFeatures(n);}(t,S.units[0],g),C=function(e,t,r,n,i){var a=m.create(r,t.elements.length);s.Unit.isAtomic(t)&&function(e,t,r,n,i,a){for(var o=0,s=i;o<s.length;o++){A(e,t,r,n,s[o],a);}}(e,t,r,a,n,i);return a.getContacts();}(t,S.units[0],x,c,u.contacts),w=0,P=S.units.length;w<P;++w)j=S.units[w],v.set(j.id,x),b.set(j.id,C);M.label=5;case 5:return++y,[3,2];case 6:return D=function(e,t,r,i){var a=h.create();return s.Structure.eachUnitPair(e,function(o,s){var u=t.get(o.id),c=t.get(s.id);!function(e,t,r,i,a,o,s,u){var c=r.count,l=r.x,d=r.y,p=r.z,m=a.lookup3d,h=f.Mat4.mul(T,i.conformation.operator.inverse,t.conformation.operator.matrix),g=!f.Mat4.isIdentity(h),v=Object(f.Vec3)(),b=Math.max.apply(Math,s.map(function(e){return e.maxDistance;})),y=m.boundary.sphere,_=y.center,S=y.radius,x=(S+b)*(S+b),C=u.lineOfSightDistFactor,w=n.Info(e,t,r),P=n.Info(e,i,a);o.startUnitPair(t,i);for(var j=0;j<c;++j)if(f.Vec3.set(v,l[j],d[j],p[j]),g&&f.Vec3.transformMat4(v,v,h),!(f.Vec3.squaredDistance(v,_)>x)){var A=m.find(v[0],v[1],v[2],b),D=A.indices,I=A.count,M=A.squaredDistances;if(0!==I){w.feature=j;for(var k=0;k<I;++k){var B=D[k];if(P.feature=B,O(e,w,P))for(var V=M[k],R=0,L=s;R<L.length;R++){var N=L[R];if(V<N.maxDistance*N.maxDistance){var F=N.getType(e,w,P,V);if(F&&E(e,w,P,C)){o.add(j,B,F);break;}}}}}}o.finishUnitPair();}(e,o,u,s,c,a,r,i);},{maxRadius:Math.max.apply(Math,r.map(function(e){return e.maxDistance;})),validUnit:function validUnit(e){return s.Unit.isAtomic(e);},validUnitPair:function validUnitPair(t,r){return s.Structure.validUnitPair(e,t,r);}}),a.getContacts(t);}(t,v,c,u.contacts),function(e,t){for(var r=t.contacts,i=t.unitsContacts,a=t.unitsFeatures,o=[Ze(e,t),Je(e,t),tt(e,t),rt(e,t),nt(e,t)],u=0,c=r.edgeCount;u<c;++u){var l=r.edges[u];(_=n.Info(e,l.unitA,a.get(l.unitA.id))).feature=l.indexA,(S=n.Info(e,l.unitB,a.get(l.unitB.id))).feature=l.indexB;for(var d=0,f=o;d<f.length;d++){(P=f[d]).isApplicable(l.props.type)&&P.handleInterContact(u,_,S);}}for(var p=i.keys();;){var m=p.next(),h=m.done,g=m.value;if(h)break;var v=i.get(g),b=a.get(g),y=e.unitMap.get(g);if(s.Unit.isAtomic(y)){for(var _=n.Info(e,y,b),S=n.Info(e,y,b),O=0,x=o;O<x.length;O++){(P=x[O]).startUnit(y,v,b);}for(u=0,c=2*v.edgeCount;u<c;++u){_.feature=v.a[u],S.feature=v.b[u];for(var C=0,w=o;C<w.length;C++){var P;(P=w[C]).isApplicable(v.edgeProps.type[u])&&P.handleIntraContact(u,_,S);}}}}}(t,I={unitsFeatures:v,unitsContacts:b,contacts:D}),[2,I];}});});}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return h;}),r.d(t,\"b\",function(){return _;});var n=r(6),i=r(171),a=r(22),o=r(9),s=r(30);function u(e){for(var t=function(e,t){return{startVertex:0,endVertex:0,count:0,visited:new Int32Array(t),queue:new Int32Array(t),pred:new Int32Array(t),left:new Int32Array(4),right:new Int32Array(4),color:new Int32Array(t),currentColor:0,currentAltLoc:\"\",hasAltLoc:!1,rings:[],currentRings:[],unit:e,bonds:e.bonds,altLoc:e.model.atomicHierarchy.atoms.label_alt_id};}(e,function(e){var t=n.Segmentation.transientSegments(e.model.atomicHierarchy.residueAtomSegments,e.elements),r=0;for(;t.hasNext;){var i=t.move();r=Math.max(r,i.end-i.start);}return r;}(e)),r=n.Segmentation.transientSegments(e.model.atomicHierarchy.residueAtomSegments,e.elements);r.hasNext;){var i=r.move();l(t,i.start,i.end);}return t.rings;}function c(e){e.count=e.endVertex-e.startVertex;for(var t=e.visited,r=e.pred,n=e.color,i=0;i<e.count;i++)t[i]=-1,r[i]=-1,n[i]=0;e.currentColor=0,e.currentAltLoc=\"\",e.hasAltLoc=!1;}function l(e,t,r){var n=e.visited;if(e.startVertex=t,e.endVertex=r,!(e.endVertex-e.startVertex<3)){e.currentRings=[];for(var i=e.unit.elements,a=[],o=e.startVertex;o<e.endVertex;o++){var u=e.altLoc.value(i[o]);Object(s.arraySetAdd)(a,u);}if(Object(s.arraySetRemove)(a,\"\"),0===a.length){c(e);for(o=0;o<e.count;o++)n[o]>=0||f(e,o);}else for(var l=0;l<a.length;l++){c(e),e.hasAltLoc=!0,e.currentAltLoc=a[l];for(o=0;o<e.count;o++){if(!(n[o]>=0))(u=e.altLoc.value(i[e.startVertex+o]))&&u!==e.currentAltLoc||f(e,o);}}o=0;for(var d=e.currentRings.length;o<d;o++)e.rings.push(e.currentRings[o]);}}function d(e,t,r){if(!(r<t)){for(var i=e.pred,a=e.color,s=e.left,u=e.right,c=++e.currentColor,l=t,d=0;d<4&&(a[l]=c,!((l=i[l])<0));d++);var f=0,p=0,m=!1,h=0;l=r;for(d=0;d<4;d++){if(a[l]===c){h=l,m=!0;break;}if(u[p++]=l,(l=i[l])<0)break;}if(m){l=t;for(d=0;d<4&&(s[f++]=l,h!==l)&&!((l=i[l])<0);d++);var g=f+p;if(!(g<3)){var v=new Int32Array(g),b=0;for(d=0;d<f;d++)v[b++]=e.startVertex+s[d];for(d=p-1;d>=0;d--)v[b++]=e.startVertex+u[d];if(Object(o.q)(v),e.hasAltLoc)for(var y=0,_=e.currentRings.length;y<_;y++){var S=e.currentRings[y];if(v[0]===S[0]&&v.length===S.length){for(var O=!0,x=0,C=v.length;x<C;x++)if(v[x]!==S[x]){O=!1;break;}if(O)return;}}e.currentRings.push(n.SortedArray.ofSortedArray(v));}}}}function f(e,t){var r=e.bonds,n=e.startVertex,i=e.endVertex,o=e.visited,s=e.queue,u=e.pred,c=e.unit.elements,l=r.b,f=r.edgeProps.flags,p=r.offset;o[t]=1,s[0]=t;for(var m=0,h=1;m<h;)for(var g=s[m++],v=n+g,b=p[v],y=p[v+1],_=b;_<y;_++){var S=l[_];if(!(S<n||S>=i)&&a.BondType.isCovalent(f[_])){if(e.hasAltLoc){var O=e.altLoc.value(c[S]);if(O&&e.currentAltLoc!==O)continue;}var x=S-n;o[x]>0?u[x]!==g&&u[g]!==x&&d(e,g,x):(o[x]=1,s[h++]=x,u[x]=g);}}}function p(e){for(var t=e.length,r=new Int32Array(2*t),n=0;n<r.length;n++)r[n]=-1;for(var i=\"\",a=\"\",o=0,s=1;s<r.length;s++){for(n=r[s-o-1];-1!==n&&(i=e[s%t])!==(a=e[(o+n+1)%t]);)i<a&&(o=s-n-1),n=r[n];-1===n&&(i=e[s%t])!==(a=e[(o+n+1)%t])?(i<a&&(o=s),r[s-o]=-1):r[s-o]=n+1;}return o;}function m(e,t){var r,n=e.length,i=[];for(r=0;r<n-1;r++)i.push(e[(r+t)%n]),i.push(\"-\");return i.push(e[(r+t)%n]),i.join(\"\");}var h,g,v=r(146),b=r(227),y=r(1),_=function(){function e(e,t){this.unit=t,this.all=e;}return Object.defineProperty(e.prototype,\"index\",{get:function get(){return this._index||(this._index=function(e,t){for(var r=new Map(),n=new Map(),a=0,o=e.length;a<o;a++)for(var s=0,u=(p=e[a]).length;s<u;s++){var c=p[s];r.has(c)?r.get(c).push(a):r.set(c,[a]);}for(var l=0,d=t.length;l<d;l++)for(s=0,u=(p=e[a=t[l]]).length;s<u;s++){c=p[s];n.has(c)?n.get(c).push(a):n.set(c,[a]);}var f=new i.a.UniqueEdgeBuilder(e.length);for(a=0,o=e.length;a<o;a++){var p;for(s=0,u=(p=e[a]).length;s<u;s++){c=p[s];var m=r.get(c);if(1!==m.length)for(var h=0,g=m.length;h<g;h++){var v=m[h];a>=v||f.addEdge(a,v);}}}var b=i.a.connectedComponents(f.getGraph()),y=b.componentIndex,_=[];for(s=0;s<b.componentCount;s++)_[s]=[];for(a=0,o=e.length;a<o;a++)_[y[a]].push(a);return{elementRingIndices:r,elementAromaticRingIndices:n,ringComponentIndex:y,ringComponents:_};}(this.all,this.aromaticRings)),this._index;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"byFingerprint\",{get:function get(){return this._byFingerprint||(this._byFingerprint=function(e,t){for(var r=new Map(),n=0,i=0,a=t.length;i<a;i++){var o=t[i],s=h.fingerprint(e,o);r.has(s)?r.get(s).push(n):r.set(s,[n]),n++;}return r;}(this.unit,this.all)),this._byFingerprint;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"elementRingIndices\",{get:function get(){return this.index.elementRingIndices;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"elementAromaticRingIndices\",{get:function get(){return this.index.elementAromaticRingIndices;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"ringComponentIndex\",{get:function get(){return this.index.ringComponentIndex;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"ringComponents\",{get:function get(){return this.index.ringComponents;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"aromaticRings\",{get:function get(){return this._aromaticRings||(this._aromaticRings=function(e,t){for(var r=[],n=0,i=t.length;n<i;++n)h.isAromatic(e,t[n])&&r.push(n);return r;}(this.unit,this.all)),this._aromaticRings;},enumerable:!1,configurable:!0}),e;}();function S(e,t){for(var r=e.elements,n=e.model.atomicHierarchy.residueAtomSegments.index,i=n[r[t[0]]],a=1,o=t.length;a<o;a++)if(i!==n[r[t[a]]])return-1;return i;}function O(e,t,r){var n=e.byFingerprint.get(t);if(n)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=S(e.unit,e.all[o]);s>=0&&(r.has(s)?r.get(s).push(o):r.set(s,[o]));}}!function(e){function t(e){return function(e){for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[n]=e[t-n-1];var i=p(e),a=p(r),o=!1;for(n=0;n<t;n++){var s=e[(n+i)%t],u=r[(n+a)%t];if(s!==u){o=s<u;break;}}return o?m(e,i):m(r,a);}(e);}e.fingerprint=function(e,r){for(var n=e.elements,i=e.model.atomicHierarchy.atoms.type_symbol,a=[],o=0,s=r.length;o<s;o++)a[a.length]=i.value(n[r[o]]);return t(a);},e.elementFingerprint=t;var r=new Set([\"B\",\"C\",\"N\",\"O\",\"SI\",\"P\",\"S\",\"GE\",\"AS\",\"SN\",\"SB\",\"BI\"]);e.isAromatic=function(e,t){var i=e.elements,o=e.bonds,s=o.b,u=o.offset,c=o.edgeProps.flags,l=e.model.atomicHierarchy.atoms,d=l.type_symbol;if(\"PRO\"===l.label_comp_id.value(e.elements[t[0]]))return!1;for(var f=0,p=!1,m=0,h=t.length;m<h;++m){var g=t[m];!p&&r.has(d.value(i[g]))&&(p=!0);for(var _=u[g],S=u[g+1];_<S;++_)a.BondType.is(16,c[_])&&n.SortedArray.has(t,s[_])&&(f+=1);}if(f===2*t.length)return!0;if(!p)return!1;var O=b.a.calculateMomentsAxes(Object(v.c)(e,t));return y.Vec3.magnitude(O.dirC)<.05;},e.getAltId=function(e,t){for(var r=e.model.atomicHierarchy.atoms.label_alt_id,n=e.elements,i=0,a=t.length;i<a;++i){var o=n[t[i]],s=r.value(o);if(s)return s;}return\"\";};}(h||(h={})),(g=_||(_={})).create=function(e){var t=u(e);return new g(t,e);},g.byFingerprintAndResidue=function(e,t){for(var r=new Map(),n=0,i=t.length;n<i;n++)O(e,t[n],r);return r;};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(15),a=r(18),o=r(42);function s(e,t){return Object(o.b)(a.b.Dictionary({0:Object(a.a)(e)}),e,t);}function u(e,t){return Object(o.b)(a.b.List(e,{nonEmpty:!0}),e,t);}function c(e,t,r){return Object(o.b)(a.b.Dictionary({0:Object(a.a)(e),1:Object(a.a)(e)}),t,r);}!function(e){e.AnyVar=i.a.Variable(\"a\",i.a.Any),e.AnyValueVar=i.a.Variable(\"a\",i.a.Any),e.ConstrainedVar=i.a.Variable(\"a\",i.a.Any,!0),e.Regex=i.a.Value(\"Core\",\"Regex\"),e.Set=function(t){return i.a.Container(\"Core\",\"Set\",t||e.AnyValueVar);},e.List=function(t){return i.a.Container(\"Core\",\"List\",t||e.AnyVar);},e.Fn=function(t,r){return i.a.Container(\"Core\",\"Fn\",t||e.AnyVar,r);},e.Flags=function(e,t){return i.a.Container(\"Core\",\"Flags\",e,t);},e.BitFlags=e.Flags(i.a.Num,\"BitFlags\");}(n||(n={}));a.b.Dictionary({0:Object(a.a)(i.a.Num),1:Object(a.a)(i.a.Num)}),Object(a.a)(i.a.Str);var l={\"@header\":\"Language Primitives\",type:{\"@header\":\"Types\",bool:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.AnyValue)}),i.a.Bool,\"Convert a value to boolean.\"),num:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.AnyValue)}),i.a.Num,\"Convert a value to number.\"),str:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.AnyValue)}),i.a.Str,\"Convert a value to string.\"),regex:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.Str,{description:\"Expression\"}),1:Object(a.a)(i.a.Str,{isOptional:!0,description:\"Flags, e.g. 'i' for ignore case\"})}),n.Regex,\"Creates a regular expression from a string using the ECMAscript syntax.\"),list:Object(o.b)(a.b.List(n.AnyVar),n.List()),set:Object(o.b)(a.b.List(n.AnyValueVar),n.Set()),bitflags:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.Num)}),n.BitFlags,\"Interpret a number as bitflags.\"),compositeKey:Object(o.b)(a.b.List(i.a.AnyValue),i.a.AnyValue)},logic:{\"@header\":\"Logic\",not:s(i.a.Bool),and:u(i.a.Bool),or:u(i.a.Bool)},ctrl:{\"@header\":\"Control\",eval:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Fn(n.AnyVar))}),n.AnyVar,\"Evaluate a function.\"),fn:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.AnyVar)}),n.Fn(n.AnyVar),'Wrap an expression to a \"lazy\" function.'),if:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.Bool,{description:\"Condition\"}),1:Object(a.a)(i.a.Variable(\"a\",i.a.Any),{description:\"If true\"}),2:Object(a.a)(i.a.Variable(\"b\",i.a.Any),{description:\"If false\"})}),i.a.Union([i.a.Variable(\"a\",i.a.Any),i.a.Variable(\"b\",i.a.Any)])),assoc:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.Str,{description:\"Name\"}),1:Object(a.a)(i.a.Variable(\"a\",i.a.Any),{description:\"Value to assign\"})}),i.a.Variable(\"a\",i.a.Any))},rel:{\"@header\":\"Relational\",eq:c(i.a.Variable(\"a\",i.a.AnyValue,!0),i.a.Bool),neq:c(i.a.Variable(\"a\",i.a.AnyValue,!0),i.a.Bool),lt:c(i.a.Num,i.a.Bool),lte:c(i.a.Num,i.a.Bool),gr:c(i.a.Num,i.a.Bool),gre:c(i.a.Num,i.a.Bool),inRange:Object(o.b)(a.b.Dictionary({0:Object(a.a)(i.a.Num,{description:\"Value to test\"}),1:Object(a.a)(i.a.Num,{description:\"Minimum value\"}),2:Object(a.a)(i.a.Num,{description:\"Maximum value\"})}),i.a.Bool,\"Check if the value of the 1st argument is >= 2nd and <= 3rd.\")},math:{\"@header\":\"Math\",add:u(i.a.Num),sub:u(i.a.Num),mult:u(i.a.Num),div:c(i.a.Num,i.a.Num),pow:c(i.a.Num,i.a.Num),mod:c(i.a.Num,i.a.Num),min:u(i.a.Num),max:u(i.a.Num),floor:s(i.a.Num),ceil:s(i.a.Num),roundInt:s(i.a.Num),abs:s(i.a.Num),sqrt:s(i.a.Num),cbrt:s(i.a.Num),sin:s(i.a.Num),cos:s(i.a.Num),tan:s(i.a.Num),asin:s(i.a.Num),acos:s(i.a.Num),atan:s(i.a.Num),sinh:s(i.a.Num),cosh:s(i.a.Num),tanh:s(i.a.Num),exp:s(i.a.Num),log:s(i.a.Num),log10:s(i.a.Num),atan2:c(i.a.Num,i.a.Num)},str:{\"@header\":\"Strings\",concat:u(i.a.Str),match:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Regex),1:Object(a.a)(i.a.Str)}),i.a.Bool)},list:{\"@header\":\"Lists\",getAt:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.List()),1:Object(a.a)(i.a.Num)}),n.AnyVar),equal:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.List()),1:Object(a.a)(n.List())}),i.a.Bool)},set:{\"@header\":\"Sets\",has:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Set(n.ConstrainedVar)),1:Object(a.a)(n.ConstrainedVar)}),i.a.Bool,\"Check if the the 1st argument includes the value of the 2nd.\"),isSubset:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Set(n.ConstrainedVar)),1:Object(a.a)(n.Set(n.ConstrainedVar))}),i.a.Bool,\"Check if the the 1st argument is a subset of the 2nd.\")},flags:{\"@header\":\"Flags\",hasAny:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Flags(n.ConstrainedVar)),1:Object(a.a)(n.Flags(n.ConstrainedVar))}),i.a.Bool,\"Check if the the 1st argument has at least one of the 2nd one's flags.\"),hasAll:Object(o.b)(a.b.Dictionary({0:Object(a.a)(n.Flags(n.ConstrainedVar)),1:Object(a.a)(n.Flags(n.ConstrainedVar))}),i.a.Bool,\"Check if the the 1st argument has all 2nd one's flags.\")}};Object(o.a)(l);var d=Object(o.c)(l);!function(){for(var e=Object.create(null),t=0,r=d;t<r.length;t++){var n=r[t];e[n.id]=n;}}();t.b=l;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){return\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\";}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(2),o=r(5),s=r(66),u=r(41);!function(e){function t(e){var t=this,r=e.descriptor.name,n=\"root\"===e.type?\"inheritedPropertyData\":\"currentPropertyData\",s=function s(t){return r in t[n]||(t[n][r]={props:Object(i.__assign)({},a.ParamDefinition.getDefaultValues(e.getParams(t))),data:o.d.create(void 0)}),t[n][r];},u=function u(e,t,i){var a=s(e);e[n][r]={props:t,data:o.d.withValue(a.data,i)};};return{label:e.label,descriptor:e.descriptor,isHidden:e.isHidden,getParams:function getParams(t){var r=a.ParamDefinition.clone(e.getParams(t));return a.ParamDefinition.setDefaultValues(r,s(t).props),r;},defaultParams:e.defaultParams,isApplicable:e.isApplicable,attach:function attach(r,n,o,c){return void 0===o&&(o={}),Object(i.__awaiter)(t,void 0,void 0,function(){var t,l,d,f,p,m;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return c&&n.customPropertyDescriptors.reference(e.descriptor,!0),\"root\"===e.type&&(n=n.root),t=s(n.root).props,l=s(n),d=a.ParamDefinition.merge(e.defaultParams,t,o),l.data.value&&a.ParamDefinition.areEqual(e.defaultParams,l.props,d)?[2]:[4,e.obtain(r,n,d)];case 1:return f=i.sent(),p=f.value,m=f.assets,n.customPropertyDescriptors.add(e.descriptor),n.customPropertyDescriptors.assets(e.descriptor,m),u(n,d,p),[2];}});});},ref:function ref(t,r){return t.customPropertyDescriptors.reference(e.descriptor,r);},get:function get(e){return s(e).data;},set:function set(t,r,n){void 0===r&&(r={}),\"root\"===e.type&&(t=t.root);var i=s(t),o=a.ParamDefinition.merge(e.defaultParams,i.props,r);a.ParamDefinition.areEqual(e.defaultParams,i.props,o)||(u(t,o,n),t.customPropertyDescriptors.assets(e.descriptor));},props:function props(e){return s(e).props;}};}e.createProvider=t,e.createSimple=function(e,r,n){var o=this,c={value:a.ParamDefinition.Value(n,{isHidden:!0})};return t({label:Object(u.d)(e),descriptor:Object(s.CustomPropertyDescriptor)({name:e}),isHidden:!0,type:r,defaultParams:c,getParams:function getParams(){return{value:a.ParamDefinition.Value(n,{isHidden:!0})};},isApplicable:function isApplicable(){return!0;},obtain:function obtain(e,t,r){return Object(i.__awaiter)(o,void 0,void 0,function(){return Object(i.__generator)(this,function(e){return[2,Object(i.__assign)(Object(i.__assign)({},a.ParamDefinition.getDefaultValues(c)),r)];});});}});};}(n||(n={}));},function(e,t,r){\"use strict\";t.a=\"\\nprecision highp float;\\n\\nattribute vec2 aPosition;\\nuniform vec2 uQuadScale;\\n\\nvoid main(void) {\\n    vec2 position = aPosition * uQuadScale - vec2(1.0, 1.0) + uQuadScale;\\n    gl_Position = vec4(position, 0.0, 1.0);\\n}\\n\";},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ToggleSelectionModeButton\",function(){return b;}),r.d(t,\"StructureSelectionActionsControls\",function(){return S;}),r.d(t,\"StructureSelectionStatsControls\",function(){return O;});var n=r(0),i=r(3),a=r(80),o=r(370),s=r(246),u=r(155),c=r(2),l=r(41),d=r(32),f=r(56),p=r(19),m=r(67),h=r(14),g=r(321),v=r(189),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._toggleSelMode=function(){t.plugin.selectionMode=!t.plugin.selectionMode;},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.layout.events.updated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.behaviors.interaction.selectionMode,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this.props.inline?{background:\"transparent\",width:\"auto\",height:\"auto\",lineHeight:\"unset\"}:{background:\"transparent\"};return i.createElement(p.IconButton,{svg:h.SelectionModeSvg,onClick:this._toggleSelMode,title:\"Toggle Selection Mode\",style:e,toggleState:this.plugin.selectionMode});},t;}(d.PurePluginUIComponent),y={granularity:o.a.Params.granularity},_=new Map([[\"add\",\"Add/Union Selection\"],[\"remove\",\"Remove/Subtract Selection\"],[\"intersect\",\"Intersect Selection\"],[\"set\",\"Set Selection\"]]),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={action:void 0,isEmpty:!0,isBusy:!1,canUndo:!1},t.set=function(e,r){t.plugin.managers.structure.selection.fromSelectionQuery(e,r,!1);},t.selectQuery=function(e,r){if(e&&t.state.action){var n=t.state.action;(null==r?void 0:r.shiftKey)?t.set(n,e.value):t.setState({action:void 0},function(){t.set(n,e.value);});}else t.setState({action:void 0});},t.queriesItems=[],t.queriesVersion=-1,t.toggleAdd=t.showAction(\"add\"),t.toggleRemove=t.showAction(\"remove\"),t.toggleIntersect=t.showAction(\"intersect\"),t.toggleSet=t.showAction(\"set\"),t.toggleTheme=t.showAction(\"theme\"),t.toggleAddComponent=t.showAction(\"add-component\"),t.toggleHelp=t.showAction(\"help\"),t.setGranuality=function(e){var r=e.value;t.plugin.managers.interactivity.setProps({granularity:r});},t.turnOff=function(){return t.plugin.selectionMode=!1;},t.undo=function(){var e=t.plugin.state.data.undo();e&&t.plugin.runTask(e);},t.subtract=function(){for(var e=[],r=0,n=t.plugin.managers.structure.hierarchy.getStructuresWithSelection();r<n.length;r++){var i=n[r];e.push.apply(e,i.components);}0!==e.length&&t.plugin.managers.structure.component.modifyByCurrentSelection(e,\"subtract\");},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){var r=0===t.hierarchy.structures.length;e.state.isEmpty!==r&&e.setState({isEmpty:r}),e.queriesVersion=-1,e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t,action:void 0});}),this.subscribe(this.plugin.managers.interactivity.events.propsUpdated,function(){e.forceUpdate();}),this.subscribe(this.plugin.state.data.events.historyUpdated,function(t){var r=t.state;e.setState({canUndo:r.canUndo});});},Object.defineProperty(t.prototype,\"isDisabled\",{get:function get(){return this.state.isBusy||this.state.isEmpty;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"structures\",{get:function get(){for(var e,t=[],r=0,n=this.plugin.managers.structure.hierarchy.selection.structures;r<n.length;r++){var i=null===(e=n[r].cell.obj)||void 0===e?void 0:e.data;i&&t.push(i);}return t;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"queries\",{get:function get(){var e=this.plugin.query.structure.registry;if(e.version!==this.queriesVersion){var t=this.structures,r=Object(n.__spreadArrays)(e.list,Object(a.g)(t),Object(a.f)(t),Object(a.e)(t)).sort(function(e,t){return t.priority-e.priority;});this.queriesItems=f.a.createItems(r,{filter:function filter(e){return e!==a.b.current&&!e.isHidden;},label:function label(e){return e.label;},category:function category(e){return e.category;},description:function description(e){return e.description;}}),this.queriesVersion=e.version;}return this.queriesItems;},enumerable:!1,configurable:!0}),t.prototype.showAction=function(e){var t=this;return function(){return t.setState({action:t.state.action===e?void 0:e});};},t.prototype.render=function(){var e=this.plugin.managers.interactivity.props.granularity,t=this.state.canUndo?\"Undo \"+this.plugin.state.data.latestUndoLabel:\"Some mistakes of the past can be undone.\";return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\",style:{background:\"none\"}},i.createElement(m.PureSelectControl,{title:\"Picking Level for selecting and highlighting\",param:y.granularity,name:\"granularity\",value:e,onChange:this.setGranuality,isDisabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:h.UnionSvg,title:_.get(\"add\")+\". Hold shift key to keep menu open.\",toggle:this.toggleAdd,isSelected:\"add\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:h.SubtractSvg,title:_.get(\"remove\")+\". Hold shift key to keep menu open.\",toggle:this.toggleRemove,isSelected:\"remove\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:h.IntersectSvg,title:_.get(\"intersect\")+\". Hold shift key to keep menu open.\",toggle:this.toggleIntersect,isSelected:\"intersect\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:h.SetSvg,title:_.get(\"set\")+\". Hold shift key to keep menu open.\",toggle:this.toggleSet,isSelected:\"set\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:h.BrushSvg,title:\"Apply Theme to Selection\",toggle:this.toggleTheme,isSelected:\"theme\"===this.state.action,disabled:this.isDisabled,style:{marginLeft:\"10px\"}}),i.createElement(p.ToggleButton,{icon:h.CubeOutlineSvg,title:\"Create Component of Selection with Representation\",toggle:this.toggleAddComponent,isSelected:\"add-component\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.IconButton,{svg:h.RemoveSvg,title:\"Remove/subtract Selection from all Components\",onClick:this.subtract,disabled:this.isDisabled}),i.createElement(p.IconButton,{svg:h.RestoreSvg,onClick:this.undo,disabled:!this.state.canUndo||this.isDisabled,title:t}),i.createElement(p.ToggleButton,{icon:h.HelpOutlineSvg,title:\"Show/hide help\",toggle:this.toggleHelp,style:{marginLeft:\"10px\"},isSelected:\"help\"===this.state.action}),i.createElement(p.IconButton,{svg:h.CancelOutlinedSvg,title:\"Turn selection mode off\",onClick:this.turnOff})),this.state.action&&\"theme\"!==this.state.action&&\"add-component\"!==this.state.action&&\"help\"!==this.state.action&&i.createElement(\"div\",{className:\"msp-selection-viewport-controls-actions\"},i.createElement(f.a,{header:_.get(this.state.action),title:\"Click to close.\",items:this.queries,onSelect:this.selectQuery,noOffset:!0})),\"theme\"===this.state.action&&i.createElement(\"div\",{className:\"msp-selection-viewport-controls-actions\"},i.createElement(p.ControlGroup,{header:\"Theme\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleTheme,topRightIcon:h.CloseSvg},i.createElement(x,{onApply:this.toggleTheme}))),\"add-component\"===this.state.action&&i.createElement(\"div\",{className:\"msp-selection-viewport-controls-actions\"},i.createElement(p.ControlGroup,{header:\"Add Component\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleAddComponent,topRightIcon:h.CloseSvg},i.createElement(g.AddComponentControls,{onApply:this.toggleAddComponent,forSelection:!0}))),\"help\"===this.state.action&&i.createElement(\"div\",{className:\"msp-selection-viewport-controls-actions\"},i.createElement(p.ControlGroup,{header:\"Help\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleHelp,topRightIcon:h.CloseSvg,maxHeight:\"300px\"},i.createElement(v.HelpGroup,{header:\"Selection Operations\"},i.createElement(v.HelpText,null,\"Use \",i.createElement(h.Icon,{svg:h.UnionSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.SubtractSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.IntersectSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.SetSvg,inline:!0}),\" to modify the selection.\")),i.createElement(v.HelpGroup,{header:\"Representation Operations\"},i.createElement(v.HelpText,null,\"Use \",i.createElement(h.Icon,{svg:h.BrushSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.CubeOutlineSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.RemoveSvg,inline:!0}),\" \",i.createElement(h.Icon,{svg:h.RestoreSvg,inline:!0}),\" to color, create components, remove from components, or undo actions.\")),i.createElement(v.ViewportHelpContent,{selectOnly:!0}))));},t;}(d.PluginUIComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isEmpty:!0,isBusy:!1},t.clear=function(){return t.plugin.managers.interactivity.lociSelects.deselectAll();},t.focus=function(){if(0!==t.plugin.managers.structure.selection.stats.elementCount){var e=t.plugin.managers.structure.selection.getBoundary().sphere;t.plugin.managers.camera.focusSphere(e);}},t.highlight=function(e){t.plugin.managers.interactivity.lociHighlights.clearHighlights(),t.plugin.managers.structure.selection.entries.forEach(function(e){t.plugin.managers.interactivity.lociHighlights.highlight({loci:e.selection},!1);});},t.clearHighlight=function(){t.plugin.managers.interactivity.lociHighlights.clearHighlights();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.selection.events.changed,function(){e.forceUpdate();}),this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){var r=0===t.structures.length;e.state.isEmpty!==r&&e.setState({isEmpty:r});}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"isDisabled\",{get:function get(){return this.state.isBusy||this.state.isEmpty;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"stats\",{get:function get(){var e=this.plugin.managers.structure.selection.stats;return 0===e.structureCount||0===e.elementCount?\"Nothing Selected\":Object(l.e)(e.label)+\" Selected\";},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.plugin.managers.structure.selection.stats,t=0===e.structureCount||0===e.elementCount;return t&&this.props.hideOnEmpty?null:i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(p.Button,{noOverflow:!0,onClick:this.focus,title:\"Click to Focus Selection\",disabled:t,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlignLast:t?void 0:\"left\"}},this.stats),!t&&i.createElement(p.IconButton,{svg:h.CancelOutlinedSvg,onClick:this.clear,title:\"Clear\",className:\"msp-form-control\",flex:!0})));},t;}(d.PluginUIComponent),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._params=Object(u.b)(function(e){return s.StructureComponentManager.getThemeParams(t.plugin,e);}),t.state={values:c.ParamDefinition.getDefaultValues(t.params)},t.apply=function(){var e,r;t.plugin.managers.structure.component.applyTheme(t.state.values,t.plugin.managers.structure.hierarchy.current.structures),null===(r=(e=t.props).onApply)||void 0===r||r.call(e);},t.paramsChanged=function(e){return t.setState({values:e});},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"params\",{get:function get(){return this._params(this.plugin.managers.structure.component.pivotStructure);},enumerable:!1,configurable:!0}),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(m.ParameterControls,{params:this.params,values:this.state.values,onChangeValues:this.paramsChanged}),i.createElement(p.Button,{icon:h.BrushSvg,className:\"msp-btn-commit msp-btn-commit-on\",onClick:this.apply,style:{marginTop:\"1px\"}},\"Apply Theme\"));},t;}(d.PurePluginUIComponent);},function(e,t,r){\"use strict\";var n;!function(e){e.create=function(e){return e;},e.has=function(e,t){return 0!=(e&t);},e.hasAll=function(e,t){return!!t&&(e&t)===t;};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(){return Error.call(this),this.message=\"object unsubscribed\",this.name=\"ObjectUnsubscribedError\",this;}return e.prototype=Object.create(Error.prototype),e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(2),o=r(9),s=r(123),u=r(381),c=new Uint16Array([0,1,2,1,3,2]);!function(e){e.create=function(e,t,r,n){void 0===e&&(e={}),void 0===t&&(t=2048),void 0===r&&(r=1024),t*=2,r*=2;var l=o.a.create(Float32Array,3,r,n?n.centerBuffer.ref.value:t),d=o.a.create(Float32Array,2,r,n?n.mappingBuffer.ref.value:t),f=o.a.create(Float32Array,1,r,n?n.depthBuffer.ref.value:t),p=o.a.create(Uint32Array,3,r,n?n.indexBuffer.ref.value:t),m=o.a.create(Float32Array,1,r,n?n.groupBuffer.ref.value:t),h=o.a.create(Float32Array,2,r,n?n.tcoordBuffer.ref.value:t),g=Object(i.__assign)(Object(i.__assign)({},a.ParamDefinition.getDefaultValues(s.a.Params)),e),v=g.attachment,b=g.background,y=g.backgroundMargin,_=g.tether,S=g.tetherLength,O=g.tetherBaseWidth,x=Object(u.b)(g),C=.4*y,w=x.buffer/x.lineHeight,P=function P(e,t,r,n,i){o.a.add3(l,e,t,r),o.a.add(f,n),o.a.add(m,i);};return{add:function add(e,t,r,n,i,a,s){for(var u=0,f=e.length,m=0;m<f;++m){u+=(G=x.get(e[m])).nw-2*w;}var g,y;if(g=v.startsWith(\"top\")?.8:v.startsWith(\"middle\")?.4:0,y=v.endsWith(\"right\")?u:v.endsWith(\"center\")?u/2:0,_)switch(v){case\"bottom-left\":y-=S/2+C+.1,g-=S/2+C;break;case\"bottom-center\":g-=S+C;break;case\"bottom-right\":y+=S/2+C+.1,g-=S/2+C;break;case\"middle-left\":y-=S+C+.1;break;case\"middle-center\":break;case\"middle-right\":y+=S+C+.1;break;case\"top-left\":y-=S/2+C+.1,g+=S/2+C;break;case\"top-center\":g+=S+C;break;case\"top-right\":y+=S/2+C+.1,g+=S/2+C;}var j=(-y-C-.1)*a,E=(u-y+C+.1)*a,A=(.8-g+C)*a,T=(-g-C)*a;if(b){o.a.add2(d,j,A),o.a.add2(d,j,T),o.a.add2(d,E,A),o.a.add2(d,E,T);for(var D=l.elementCount,I=0;I<4;++I)o.a.add2(h,10,10),P(t,r,n,i,s);o.a.add3(p,D+c[0],D+c[1],D+c[2]),o.a.add3(p,D+c[3],D+c[4],D+c[5]);}if(_){var M=void 0,k=void 0,B=void 0,V=void 0,R=void 0,L=void 0,N=void 0,F=void 0,U=S*a,z=O*a;switch(v){case\"bottom-left\":M=j-U/2,B=j+z/2,R=j,N=j,k=T-U/2,V=T,L=T+z/2,F=T;break;case\"bottom-center\":M=0,B=z/2,R=-z/2,N=0,k=T-U,V=T,L=T,F=T;break;case\"bottom-right\":M=E+U/2,B=E,R=E-z/2,N=E,k=T-U/2,V=T+z/2,L=T,F=T;break;case\"middle-left\":M=j-U,B=j,R=j,N=j,k=0,V=-z/2,L=z/2,F=0;break;case\"middle-center\":M=0,B=0,R=0,N=0,k=0,V=0,L=0,F=0;break;case\"middle-right\":M=E+U,B=E,R=E,N=E,k=0,V=z/2,L=-z/2,F=0;break;case\"top-left\":M=j-U/2,B=j+z/2,R=j,N=j,k=A+U/2,V=A,L=A-z/2,F=A;break;case\"top-center\":M=0,B=z/2,R=-z/2,N=0,k=A+U,V=A,L=A,F=A;break;case\"top-right\":M=E+U/2,B=E,R=E-z/2,N=E,k=A+U/2,V=A-z/2,L=A,F=A;break;default:throw new Error(\"unsupported attachment\");}o.a.add2(d,M,k),o.a.add2(d,B,V),o.a.add2(d,R,L),o.a.add2(d,N,F);for(D=l.elementCount,I=0;I<4;++I)o.a.add2(h,10,10),P(t,r,n,i,s);o.a.add3(p,D,D+1,D+3),o.a.add3(p,D,D+3,D+2);}y+=w,g+=w;var H=0;for(m=0;m<f;++m){var G,q=(H-y)*a,W=(H+(G=x.get(e[m])).nw-y)*a,Q=(G.nh-g)*a,Y=-g*a;o.a.add2(d,q,Q),o.a.add2(d,q,Y),o.a.add2(d,W,Q),o.a.add2(d,W,Y);var X=x.texture.width,K=x.texture.height;o.a.add2(h,G.x/X,G.y/K),o.a.add2(h,G.x/X,(G.y+G.h)/K),o.a.add2(h,(G.x+G.w)/X,G.y/K),o.a.add2(h,(G.x+G.w)/X,(G.y+G.h)/K),H+=G.nw-2*w;for(D=l.elementCount,I=0;I<4;++I)P(t,r,n,i,s);o.a.add3(p,D+c[0],D+c[1],D+c[2]),o.a.add3(p,D+c[3],D+c[4],D+c[5]);}},getText:function getText(){var e=x.texture,t=o.a.compact(l,!0),r=o.a.compact(d,!0),i=o.a.compact(f,!0),a=o.a.compact(p,!0),u=o.a.compact(m,!0),c=o.a.compact(h,!0);return s.a.create(e,t,r,i,a,u,c,p.elementCount/2,n);}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return f;}),r.d(t,\"a\",function(){return p;});var n=r(0),i=r(16),a=r(187),o=r(5),s=r(9),u=r(39),c=r(172);function l(e){return Object(n.__assign)(Object(n.__assign)({},e),{bottomLeft:Object(o.i)(e.bottomLeft,[0,0,0]),topRight:Object(o.i)(e.topRight,e.scalarField.space.dimensions)});}function d(e){return{dX:e.topRight[0]-e.bottomLeft[0],dY:e.topRight[1]-e.bottomLeft[1],dZ:e.topRight[2]-e.bottomLeft[2]};}function f(e,t){var r=this;return i.b.create(\"Marching Cubes Mesh\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,o,c,f,p,h;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=l(e),a=d(r),o=a.dX,c=a.dY,f=a.dZ,p=Math.min(262144,Math.max(o*c*f/32,1024)),h=function(e,t){var r=Math.min(65536,4*e),n=s.a.create(Float32Array,3,e,t&&t.vertexBuffer.ref.value),i=s.a.create(Float32Array,3,e,t&&t.normalBuffer.ref.value),a=s.a.create(Float32Array,1,e,t&&t.groupBuffer.ref.value),o=s.a.create(Uint32Array,3,r,t&&t.indexBuffer.ref.value),c=0,l=0;return{addVertex:function addVertex(e,t,r){return++c,s.a.add3(n,e,t,r);},addNormal:function addNormal(e,t,r){s.a.add3(i,e,t,r);},addGroup:function addGroup(e){s.a.add(a,e);},addTriangle:function addTriangle(e,t,r,n){var i=e[t],a=e[r],u=e[n];i>=0&&a>=0&&u>=0&&(++l,s.a.add3(o,i,a,u));},get:function get(){var e=s.a.compact(n,!0),r=s.a.compact(i,!0),d=s.a.compact(o,!0),f=s.a.compact(a,!0);return u.a.create(e,d,r,f,c,l,t);}};}(p,t),[4,new m(i,h,r).run()];case 1:return n.sent(),[2,h.get()];}});});});}function p(e,t){var r=this;return i.b.create(\"Marching Cubes Lines\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,u,f,p,h,g,v;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=l(e),u=d(r),f=u.dX,p=u.dY,h=u.dZ,g=Math.min(262144,Math.max(f*p*h/32,1024)),v=function(e,t){var r=s.a.create(Float32Array,3,e),n=s.a.create(Float32Array,1,e),i=s.a.create(Float32Array,2,e),u=0;return{addVertex:function addVertex(e,t,n){return s.a.add3(r,e,t,n);},addNormal:function addNormal(){return o.k;},addGroup:function addGroup(e){s.a.add(n,e);},addTriangle:function addTriangle(e,t,r,n,o){var c=e[t],l=e[r],d=e[n];c>=0&&l>=0&&d>=0&&(a.a[t][r]&o&&(++u,s.a.add2(i,e[t],e[r])),a.a[r][n]&o&&(++u,s.a.add2(i,e[r],e[n])),a.a[t][n]&o&&(++u,s.a.add2(i,e[t],e[n])));},get:function get(){for(var e=s.a.compact(r,!0),a=s.a.compact(i,!0),o=s.a.compact(n,!0),l=c.a.create(u,u/10,t),d=0;d<u;++d){var f=a[2*d],p=a[2*d+1];l.add(e[3*f],e[3*f+1],e[3*f+2],e[3*p],e[3*p+1],e[3*p+2],o[f]);}return l.getLines();}};}(g,t),[4,new m(i,v,r).run()];case 1:return n.sent(),[2,v.get()];}});});});}var m=function(){function e(e,t,r){this.ctx=e,this.minX=0,this.minY=0,this.minZ=0,this.maxX=0,this.maxY=0,this.maxZ=0,this.state=new h(t,r),this.minX=r.bottomLeft[0],this.minY=r.bottomLeft[1],this.minZ=r.bottomLeft[2],this.maxX=r.topRight[0]-1,this.maxY=r.topRight[1]-1,this.maxZ=r.topRight[2]-1,this.size=(this.maxX-this.minX)*(this.maxY-this.minY)*(this.maxZ-this.minZ),this.sliceSize=(this.maxX-this.minX)*(this.maxY-this.minY);}return e.prototype.doSlices=function(){return Object(n.__awaiter)(this,void 0,void 0,function(){var e,t;return Object(n.__generator)(this,function(r){switch(r.label){case 0:e=0,this.edgeFilter=15,t=this.minZ,r.label=1;case 1:return t<this.maxZ?(this.slice(t),e+=this.sliceSize,this.ctx.shouldUpdate?[4,this.ctx.update({message:\"Computing surface...\",current:e,max:this.size})]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t++,this.edgeFilter&=-5,[3,1];case 4:return[2];}});});},e.prototype.slice=function(e){this.edgeFilter|=2;for(var t=this.minY;t<this.maxY;t++,this.edgeFilter&=-3){this.edgeFilter|=1;for(var r=this.minX;r<this.maxX;r++,this.edgeFilter&=-2)this.state.processCell(r,t,e,this.edgeFilter);}this.state.clearEdgeVertexIndexSlice(e);},e.prototype.run=function(){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(e){switch(e.label){case 0:return[4,this.doSlices()];case 1:return e.sent(),[2];}});});},e;}(),h=function(){function e(e,t){this.builder=e,this.vertList=[0,0,0,0,0,0,0,0,0,0,0,0],this.i=0,this.j=0,this.k=0;var r=t.scalarField.space.dimensions;this.nX=r[0],this.nY=r[1],this.nZ=r[2],this.isoLevel=t.isoLevel,this.scalarFieldGet=t.scalarField.space.get,this.scalarField=t.scalarField.data,t.idField&&(this.idField=t.idField.data,this.idFieldGet=t.idField.space.get),this.verticesOnEdges=new Int32Array(3*this.nX*this.nY*2);}return e.prototype.get3dOffsetFromEdgeInfo=function(e){return this.nX*((this.k+e.k)%2*this.nY+this.j+e.j)+this.i+e.i;},e.prototype.clearEdgeVertexIndexSlice=function(e){for(var t=e%2==0?0:3*this.nX*this.nY,r=e%2==0?3*this.nX*this.nY:this.verticesOnEdges.length,n=t;n<r;n++)this.verticesOnEdges[n]=0;},e.prototype.interpolate=function(e){var t=a.c[e],r=3*this.get3dOffsetFromEdgeInfo(t)+t.e,n=this.verticesOnEdges[r];if(n>0)return n-1;var i=this.scalarField,o=this.scalarFieldGet,s=a.b[e],u=s.a,c=s.b,l=u.i+this.i,d=u.j+this.j,f=u.k+this.k,p=c.i+this.i,m=c.j+this.j,h=c.k+this.k,g=o(i,l,d,f),v=o(i,p,m,h),b=(this.isoLevel-g)/(g-v);if(this.idField){var y=this.idFieldGet(this.idField,l,d,f),_=this.idFieldGet(this.idField,p,m,h),S=b<.5?y:_;if(-1===S&&(S=b<.5?_:y),-2===S)return-1;this.builder.addGroup(S);}else this.builder.addGroup(0);var O=this.builder.addVertex(l+b*(l-p),d+b*(d-m),f+b*(f-h));this.verticesOnEdges[r]=O+1;var x=o(i,Math.max(0,l-1),d,f)-o(i,Math.min(this.nX-1,l+1),d,f),C=o(i,l,Math.max(0,d-1),f)-o(i,l,Math.min(this.nY-1,d+1),f),w=o(i,l,d,Math.max(0,f-1))-o(i,l,d,Math.min(this.nZ,f+1)),P=x+b*(x-(o(i,Math.max(0,p-1),m,h)-o(i,Math.min(this.nX-1,p+1),m,h))),j=C+b*(C-(o(i,p,Math.max(0,m-1),h)-o(i,p,Math.min(this.nY-1,m+1),h))),E=w+b*(w-(o(i,p,m,Math.max(0,h-1))-o(i,p,m,Math.min(this.nZ-1,h+1))));return this.isoLevel>=0?this.builder.addNormal(P,j,E):this.builder.addNormal(-P,-j,-E),O;},e.prototype.get=function(e,t,r){return this.scalarFieldGet(this.scalarField,e,t,r);},e.prototype.processCell=function(e,t,r,n){var i=0;if(this.get(e,t,r)<this.isoLevel&&(i|=1),this.get(e+1,t,r)<this.isoLevel&&(i|=2),this.get(e+1,t+1,r)<this.isoLevel&&(i|=4),this.get(e,t+1,r)<this.isoLevel&&(i|=8),this.get(e,t,r+1)<this.isoLevel&&(i|=16),this.get(e+1,t,r+1)<this.isoLevel&&(i|=32),this.get(e+1,t+1,r+1)<this.isoLevel&&(i|=64),this.get(e,t+1,r+1)<this.isoLevel&&(i|=128),0!==i&&255!==i){this.i=e,this.j=t,this.k=r;var o=a.d[i];(1&o)>0&&(this.vertList[0]=this.interpolate(0)),(2&o)>0&&(this.vertList[1]=this.interpolate(1)),(4&o)>0&&(this.vertList[2]=this.interpolate(2)),(8&o)>0&&(this.vertList[3]=this.interpolate(3)),(16&o)>0&&(this.vertList[4]=this.interpolate(4)),(32&o)>0&&(this.vertList[5]=this.interpolate(5)),(64&o)>0&&(this.vertList[6]=this.interpolate(6)),(128&o)>0&&(this.vertList[7]=this.interpolate(7)),(256&o)>0&&(this.vertList[8]=this.interpolate(8)),(512&o)>0&&(this.vertList[9]=this.interpolate(9)),(1024&o)>0&&(this.vertList[10]=this.interpolate(10)),(2048&o)>0&&(this.vertList[11]=this.interpolate(11));for(var s=a.e[i],u=0;u<s.length;u+=3){var c=s[u],l=s[u+1],d=s[u+2];this.isoLevel>=0?this.builder.addTriangle(this.vertList,c,l,d,n):this.builder.addTriangle(this.vertList,d,l,c,n);}}},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(57),a=r(62),o=r(188),s=r(72),u={U:i.a.atom_site_anisotrop.U,U_esd:i.a.atom_site_anisotrop.U_esd};!function(e){e.Schema=u,e.Descriptor={name:\"atom_site_anisotrop\",cifExport:{prefix:\"\",categories:[{name:\"atom_site_anisotrop\",instance:function instance(t){return e.Provider.get(t.firstModel)&&s.a.is(t.firstModel.sourceData)?a.a.Category.ofTable(t.firstModel.sourceData.data.db.atom_site_anisotrop):a.a.Category.Empty;}}]}},e.Provider=o.a.create(e.Descriptor),e.getElementToAnsiotrop=function(e,t){var r=new Int32Array(e.rowCount);r.fill(-1);for(var n=0,i=e.rowCount;n<i;n++)r[e.value(n)]=n;var a=new Int32Array(e.rowCount);for(a.fill(-1),n=0,i=t.rowCount;n<i;++n){var o=r[t.value(n)];-1!==o&&(a[o]=n);}return a;},e.getElementToAnsiotropFromLabel=function(e,t){for(var r={},n=0,i=e.rowCount;n<i;n++)r[e.value(n)]=n;var a=new Int32Array(e.rowCount);for(a.fill(-1),n=0,i=t.rowCount;n<i;++n){var o=r[t.value(n)];void 0!==o&&(a[o]=n);}return a;};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return O;});var n,i=r(0),a=r(7),o=r(148),s=r(359),u=r(62),c=r(4),l=r(251),d=r(18),f=r(15),p=r(163),m=r(2),h=r(30),g=r(72),v=r(236),b=r(306),y=r(114),_=r(66);!function(e){function t(e,t){return t+\"/\"+e.toLowerCase();}function r(e,t){return{info:v.PropertyWrapper.createInfo(),data:function(e,t){var r=new Map();if(!t.molecules)return;for(var n=[],i=0,a=t.molecules;i<a.length;i++)for(var o=a[i],s=o.entity_id.toString(),u=0,l=o.chains;u<l.length;u++)for(var d=l[u],f=d.struct_asym_id.toString(),p=0,m=d.models;p<m.length;p++){var g=m[p];if(+g.model_id.toString()===e.modelNum)for(var v=0,b=g.residues;v<b.length;v++){var y=b[v],_=y.author_residue_number,S=y.author_insertion_code||\"\",O=e.atomicHierarchy.index.findResidue(s,f,_,S);r.set(O,y.outlier_types);for(var x=0,C=y.outlier_types;x<C.length;x++){var w=C[x];Object(h.arraySetAdd)(n,w);}}}return{issues:c.IndexedCustomProperty.fromResidueMap(r),issueTypes:n};}(e,t)};}function n(e,n,a){return Object(i.__awaiter)(this,void 0,void 0,function(){var o,s,u;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return o=y.Asset.getUrlAsset(e.assetManager,t(n.entryId,a.serverUrl)),[4,e.assetManager.resolve(o,\"json\").runInContext(e.runtime)];case 1:if(s=i.sent(),!(u=s.data[n.entryId.toLowerCase()]))throw new Error(\"missing data\");return[2,{value:r(n,u),assets:[s]}];}});});}function u(t,r,n){var i=v.PropertyWrapper.tryGetInfoFromCif(\"pdbe_structure_quality_report\",r);if(i){var a=function(t){if(!g.a.is(t.sourceData))throw new Error(\"Data format must be mmCIF.\");return{residues:Object(o.c)(e.Schema.pdbe_structure_quality_report_issues,t.sourceData.data.frame.categories.pdbe_structure_quality_report_issues),groups:Object(o.c)(e.Schema.pdbe_structure_quality_report_issue_types,t.sourceData.data.frame.categories.pdbe_structure_quality_report_issue_types)};}(r);return{info:i,data:function(e,t,r){for(var n=new Map(),i=t.label_entity_id,a=t.label_asym_id,o=t.auth_seq_id,s=t.pdbx_PDB_ins_code,u=t.issue_type_group_id,l=t.pdbx_PDB_model_num,d=t._rowCount,f=function(e){for(var t=new Map(),r=e.group_id,n=e.issue_type,i=0;i<e._rowCount;i++){var a=void 0,o=r.value(i);t.has(o)?a=t.get(o):(a=[],t.set(o,a)),a.push(n.value(i));}return t;}(r),p=0;p<d;p++)if(l.value(p)===e.modelNum){var m=e.atomicHierarchy.index.findResidue(i.value(p),a.value(p),o.value(p),s.value(p));n.set(m,f.get(u.value(p)));}var g=[];return f.forEach(function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];Object(h.arraySetAdd)(g,n);}}),{issues:c.IndexedCustomProperty.fromResidueMap(n),issueTypes:g};}(r,a.residues,a.groups)};}}e.DefaultServerUrl=\"https://www.ebi.ac.uk/pdbe/api/validation/residuewise_outlier_summary/entry/\",e.getEntryUrl=t,e.isApplicable=function(e){return!!e&&c.Model.isFromPdbArchive(e);},e.Schema={pdbe_structure_quality_report:{updated_datetime_utc:a.a.Schema.str},pdbe_structure_quality_report_issues:Object(i.__assign)(Object(i.__assign)({id:a.a.Schema.int},s.b),{pdbx_PDB_model_num:a.a.Schema.int,issue_type_group_id:a.a.Schema.int}),pdbe_structure_quality_report_issue_types:{group_id:a.a.Schema.int,issue_type:a.a.Schema.str}},e.fromJson=r,e.fromServer=n,e.fromCif=u,e.fromCifOrServer=function(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var a;return Object(i.__generator)(this,function(i){return[2,(a=u(0,t))?{value:a}:n(e,t,r)];});});};var l=[];e.getIssues=function(e){if(!c.Unit.isAtomic(e.unit))return l;var t=O.get(e.unit.model).value;if(!t||!t.data)return l;var r=e.unit.residueIndex[e.element];return t.data.issues.has(r)?t.data.issues.get(r):l;},e.getIssueTypes=function(e){if(!e)return l;var t=O.get(e.models[0]).value;return t&&t.data?t.data.issueTypes:l;};}(n||(n={}));var S={serverUrl:m.ParamDefinition.Text(n.DefaultServerUrl,{description:\"JSON API Server URL\"})},O=b.CustomModelProperty.createProvider({label:\"Structure Quality Report\",descriptor:Object(_.CustomPropertyDescriptor)({name:\"pdbe_structure_quality_report\",cifExport:{prefix:\"pdbe\",context:function context(e){return function(e){for(var t=new Map(),r=[],i=[],o=[],s=v.PropertyWrapper.createInfo(),u=0,c=e.structures;u<c.length;u++){var l=c[u],d=O.get(l.model).value;if(d&&(s=d.info),d&&d.data){var f=d.data.issues.getElements(l),p=f.elements,m=f.property;if(0!==p.length){for(var h=[],g=0;g<p.length;g++){var b=m(g),y=b.join(\",\");if(!t.has(y)){var _=t.size+1;t.set(y,_);for(var S=0,x=b;S<x.length;S++){var C=x[S];i.push(_),o.push(C);}}h[g]=t.get(y);}r.push({elements:p,groupId:h});}}}return{info:s,models:r,issueTypes:a.d.ofArrays(n.Schema.pdbe_structure_quality_report_issue_types,{group_id:i,issue_type:o})};}(e);},categories:[v.PropertyWrapper.defaultInfoCategory(\"pdbe_structure_quality_report\",function(e){return e.info;}),{name:\"pdbe_structure_quality_report_issues\",instance:function instance(e){return{fields:x,source:e.models.map(function(e){return{data:e,rowCount:e.elements.length};})};}},{name:\"pdbe_structure_quality_report_issue_types\",instance:function instance(e){return u.a.Category.ofTable(e.issueTypes);}}]},symbols:{issueCount:p.QuerySymbolRuntime.Dynamic(Object(d.c)(\"pdbe\",\"structure-quality.issue-count\",f.a.Num),function(e){return n.getIssues(e.element).length;})}}),type:\"static\",defaultParams:S,getParams:function getParams(e){return S;},isApplicable:function isApplicable(e){return n.isApplicable(e);},obtain:function obtain(e,t,r){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var a;return Object(i.__generator)(this,function(o){switch(o.label){case 0:return a=Object(i.__assign)(Object(i.__assign)({},m.ParamDefinition.getDefaultValues(S)),r),[4,n.fromCifOrServer(e,t,a)];case 1:return[2,o.sent()];}});});}}),x=u.a.fields().index(\"id\").many(Object(l.b)(function(e,t){return t.elements[e];},{includeModelNum:!0})).int(\"issue_type_group_id\",function(e,t){return t.groupId[e];}).getFields();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(21),i=r(50),a=r(52),o=r(167),s=r(116),u=r(139);function c(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),\"function\"==typeof t?function(n){return n.pipe(c(function(r,n){return Object(u.a)(e(r,n)).pipe(Object(s.a)(function(e,i){return t(r,e,n,i);}));},r));}:(\"number\"==typeof t&&(r=t),function(t){return t.lift(new l(e,r));});}var l=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t;}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.project,this.concurrent));},e;}(),d=function(e){function t(t,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i;}return n.a(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e);},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r);}catch(e){return void this.destination.error(e);}this.active++,this._innerSub(t,e,r);},t.prototype._innerSub=function(e,t,r){var n=new o.a(this,t,r),a=this.destination;a.add(n);var s=Object(i.a)(this,e,void 0,void 0,n);s!==n&&a.add(s);},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe();},t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t);},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete();},t;}(a.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(){return Error.call(this),this.message=\"argument out of range\",this.name=\"ArgumentOutOfRangeError\",this;}return e.prototype=Object.create(Error.prototype),e;}();},function(e,t,r){\"use strict\";function n(e){return\"function\"==typeof e;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"registerDefault\",function(){return p;}),r.d(t,\"SyncBehaviors\",function(){return m;}),r.d(t,\"SetCurrentObject\",function(){return h;}),r.d(t,\"Update\",function(){return g;}),r.d(t,\"ApplyAction\",function(){return v;}),r.d(t,\"RemoveObject\",function(){return b;}),r.d(t,\"ToggleExpanded\",function(){return y;}),r.d(t,\"ToggleVisibility\",function(){return _;}),r.d(t,\"setSubtreeVisibility\",function(){return S;}),r.d(t,\"Highlight\",function(){return x;}),r.d(t,\"ClearHighlights\",function(){return C;}),r.d(t,\"Snapshots\",function(){return w;});var n=r(0),i=r(4),a=r(364),o=r(8),s=r(13),u=r(328),c=r(329),l=r(261),d=r(26),f=r(101);function p(e){m(e),h(e),g(e),v(e),b(e),y(e),_(e),x(e),C(e),w(e);}function m(e){e.state.events.object.created.subscribe(function(e){o.a.isBehavior(e.obj)&&e.obj.data.register(e.ref);}),e.state.events.object.removed.subscribe(function(e){o.a.isBehavior(e.obj)&&e.obj.data.unregister();}),e.state.events.object.updated.subscribe(function(e){\"recreate\"===e.action&&(e.oldObj&&o.a.isBehavior(e.oldObj)&&e.oldObj.data.unregister(),e.obj&&o.a.isBehavior(e.obj)&&e.obj.data.register(e.ref));});}function h(e){d.PluginCommands.State.SetCurrentObject.subscribe(e,function(e){var t=e.state,r=e.ref;return t.setCurrent(r);});}function g(e){d.PluginCommands.State.Update.subscribe(e,function(t){var r=t.state,n=t.tree,i=t.options;return e.runTask(r.updateTree(n,i));});}function v(e){d.PluginCommands.State.ApplyAction.subscribe(e,function(t){var r=t.state,n=t.action,i=t.ref;return e.runTask(r.applyAction(n.action,n.params,i));});}function b(e){function t(t,r){var n=t.build().delete(r);return e.runTask(t.updateTree(n));}d.PluginCommands.State.RemoveObject.subscribe(e,function(e){var r=e.state,n=e.ref;if(!e.removeParentGhosts)return t(r,n);var i=r.tree,a=i.transforms.get(n);if(a.parent===n)return t(r,n);for(;;){var o=i.children.get(a.parent);if(a.parent===a.ref||o.size>1)return t(r,a.ref);var s=i.transforms.get(a.parent);if(!s.state.isGhost)return t(r,a.ref);a=s;}});}function y(e){d.PluginCommands.State.ToggleExpanded.subscribe(e,function(e){var t=e.state,r=e.ref;return t.updateCellState(r,function(e){return{isCollapsed:!e.isCollapsed};});});}function _(e){d.PluginCommands.State.ToggleVisibility.subscribe(e,function(e){var t=e.state,r=e.ref;return S(t,r,!t.cells.get(r).state.isHidden);});}function S(e,t,r){s.StateTree.doPreOrder(e.tree,e.transforms.get(t),{state:e,value:r},O);}function O(e,t,r){r.state.updateCellState(e.ref,{isHidden:r.value});}function x(e){d.PluginCommands.Interactivity.Object.Highlight.subscribe(e,function(t){var r=t.state,n=t.ref;e.managers.interactivity.lociHighlights.clearHighlights();for(var a=0,s=\"string\"==typeof n?[n]:n;a<s.length;a++){var u=s[a],c=r.cells.get(u);if(c)if(o.a.Molecule.Structure.is(c.obj))e.managers.interactivity.lociHighlights.highlight({loci:i.Structure.Loci(c.obj.data)},!1);else if(c&&o.a.isRepresentation3D(c.obj)){var l=c.obj.data.repr;e.managers.interactivity.lociHighlights.highlight({loci:l.getLoci(),repr:l},!1);}else if(o.a.Molecule.Structure.Selections.is(c.obj))for(var d=0,f=c.obj.data;d<f.length;d++){var p=f[d];e.managers.interactivity.lociHighlights.highlight({loci:p.loci},!1);}}});}function C(e){d.PluginCommands.Interactivity.ClearHighlights.subscribe(e,function(){e.managers.interactivity.lociHighlights.clearHighlights();});}function w(e){var t=this;e.config.set(f.PluginConfig.State.CurrentServer,e.config.get(f.PluginConfig.State.DefaultServer)),d.PluginCommands.State.Snapshots.Clear.subscribe(e,function(){e.managers.snapshot.clear();}),d.PluginCommands.State.Snapshots.Remove.subscribe(e,function(t){var r=t.id;e.managers.snapshot.remove(r);}),d.PluginCommands.State.Snapshots.Add.subscribe(e,function(t){var r=t.name,n=t.description,i=t.params,o=a.a.Entry(e.state.getSnapshot(i),{name:r,description:n});e.managers.snapshot.add(o);}),d.PluginCommands.State.Snapshots.Replace.subscribe(e,function(t){var r=t.id,n=t.params;e.managers.snapshot.replace(r,e.state.getSnapshot(n));}),d.PluginCommands.State.Snapshots.Move.subscribe(e,function(t){var r=t.id,n=t.dir;e.managers.snapshot.move(r,n);}),d.PluginCommands.State.Snapshots.Apply.subscribe(e,function(t){var r=t.id,n=e.managers.snapshot.setCurrent(r);if(n)return e.state.setSnapshot(n);}),d.PluginCommands.State.Snapshots.Upload.subscribe(e,function(t){var r=t.name,n=t.description,i=t.playOnLoad,a=t.serverUrl;t.params;return fetch(Object(l.a)(a,\"set?name=\"+encodeURIComponent(r||\"\")+\"&description=\"+encodeURIComponent(n||\"\")),{method:\"POST\",mode:\"cors\",referrer:\"no-referrer\",headers:{\"Content-Type\":\"application/json; charset=utf-8\"},body:JSON.stringify(e.managers.snapshot.getStateSnapshot({name:r,description:n,playOnLoad:i}))});}),d.PluginCommands.State.Snapshots.Fetch.subscribe(e,function(r){var i=r.url;return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,e.runTask(e.fetch({url:i,type:\"json\"}))];case 1:return t=r.sent(),[4,e.managers.snapshot.setStateSnapshot(t.data)];case 2:return r.sent(),[2];}});});}),d.PluginCommands.State.Snapshots.DownloadToFile.subscribe(e,function(r){var i=r.name,a=r.type,o=r.params;return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return t=\"mol-star_state_\"+(i||Object(u.b)())+\".\"+(\"json\"===a?\"molj\":\"molx\"),[4,e.managers.snapshot.serialize({type:a,params:o})];case 1:return r=n.sent(),Object(c.a)(r,\"\"+t),[2];}});});}),d.PluginCommands.State.Snapshots.OpenFile.subscribe(e,function(t){var r=t.file;return e.managers.snapshot.open(r);}),d.PluginCommands.State.Snapshots.OpenUrl.subscribe(e,function(r){var i=r.url,a=r.type;return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,e.runTask(e.fetch({url:i,type:\"binary\"}))];case 1:return t=r.sent(),[2,e.managers.snapshot.open(new File([t],\"state.\"+a))];}});});});}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return i;}),r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return o;});r(78);var n=Math.log(10001);function i(e){return Math.log(e+1)/n;}function a(e){return Math.exp(e*n)-1;}function o(e,t,r){return 256*Math.floor(e)*256+256*Math.floor(t)+Math.floor(r)-1;}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return S;}),r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(9),o=r(53),s=r(11),u=r(1),c=r(5),l=r(2),d=r(33),f=r(117),p=r(125),m=r(134),h=r(141),g=r(30),v=r(142),b=new Uint32Array([0,1,2,1,3,2]),y=new Float32Array([0,1,0,0,1,1,1,0]),_={nearest:\"Nearest\",catmulrom:\"Catmulrom (Cubic)\",mitchell:\"Mitchell (Cubic)\",bspline:\"B-Spline (Cubic)\"},S=Object.keys(_);!function(e){function t(e){return{};}function r(e,t,r,n,a){var l=r.instanceCount,_=r.groupCount,S=Object(f.a)(r,n.color),O=Object(p.a)(l*_),x=Object(m.c)(),C=Object(h.c)(),w=Object(v.d)(),P={drawCount:b.length,groupCount:_,instanceCount:l},j=s.g.clone(e.boundingSphere),E=Object(o.b)(j,t.aTransform.ref.value,l);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({},S),O),x),C),w),t),d.a.createValues(a,P)),{aPosition:e.cornerBuffer,aUv:c.e.create(y),elements:c.e.create(b),aGroup:c.e.create(Object(g.fillSerial)(new Float32Array(4))),boundingSphere:c.e.create(E),invariantBoundingSphere:c.e.create(j),uInvariantBoundingSphere:c.e.create(u.Vec4.ofSphere(j)),dInterpolation:c.e.create(a.interpolation),uImageTexDim:e.imageTextureDim,tImageTex:e.imageTexture,tGroupTex:e.groupTexture});}e.create=function(e,t,r,n){return n?function(e,t,r,n){var i=e.width,a=e.height;return c.e.update(n.imageTexture,e),c.e.update(n.imageTextureDim,u.Vec2.set(n.imageTextureDim.ref.value,i,a)),c.e.update(n.cornerBuffer,t),c.e.update(n.groupTexture,r),n;}(e,t,r,n):function(e,t,r){var n=Object(s.g)(),i=-1,l=e.width,d=e.height,f={kind:\"image\",imageTexture:c.e.create(e),imageTextureDim:c.e.create(u.Vec2.create(l,d)),cornerBuffer:c.e.create(t),groupTexture:c.e.create(r),get boundingSphere(){var e=function(e){return Object(a.l)([e.cornerBuffer.ref.version]);}(f);if(e!==i){var t=function(e){return Object(o.a)(e,e.length/3,1);}(f.cornerBuffer.ref.value);s.g.copy(n,t),i=e;}return n;}};return f;}(e,t,r);},e.createEmpty=t,e.Params=Object(i.__assign)(Object(i.__assign)({},d.a.Params),{interpolation:l.ParamDefinition.Select(\"bspline\",l.ParamDefinition.objectToOptions(_))}),e.Utils={Params:e.Params,createEmpty:t,createValues:r,createValuesSimple:function createValuesSimple(t,n,a,o,s){var u=d.a.createSimple(a,o,s),c=Object(i.__assign)(Object(i.__assign)({},l.ParamDefinition.getDefaultValues(e.Params)),n);return r(t,u.transform,u.locationIterator,u.theme,c);},updateValues:function updateValues(e,t){d.a.updateValues(e,t),c.e.updateIfChanged(e.dInterpolation,t.interpolation);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=s.g.clone(t.boundingSphere),n=Object(o.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);s.g.equals(n,e.boundingSphere.ref.value)||c.e.update(e.boundingSphere,n);s.g.equals(r,e.invariantBoundingSphere.ref.value)||(c.e.update(e.invariantBoundingSphere,r),c.e.update(e.uInvariantBoundingSphere,u.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:function createRenderableState(e){var t=d.a.createRenderableState(e);return t.opaque=!1,t;},updateRenderableState:function updateRenderableState(e,t){d.a.updateRenderableState(e,t),e.opaque=!1;}};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(15),a=r(202),o=r(18),s=r(42);!function(e){e.ElementSymbol=i.a.Value(\"Structure\",\"ElementSymbol\"),e.AtomName=i.a.Value(\"Structure\",\"AtomName\"),e.BondFlag=i.a.OneOf(\"Structure\",\"BondFlag\",i.a.Str,[\"covalent\",\"metallic\",\"ion\",\"hydrogen\",\"sulfide\",\"computed\",\"aromatic\"]),e.BondFlags=a.a.Flags(e.BondFlag,\"BondFlags\"),e.SecondaryStructureFlag=i.a.OneOf(\"Structure\",\"SecondaryStructureFlag\",i.a.Str,[\"alpha\",\"beta\",\"3-10\",\"pi\",\"sheet\",\"strand\",\"helix\",\"turn\",\"none\"]),e.SecondaryStructureFlags=a.a.Flags(e.SecondaryStructureFlag,\"SecondaryStructureFlag\"),e.RingFingerprint=i.a.Value(\"Structure\",\"RingFingerprint\"),e.EntityType=i.a.OneOf(\"Structure\",\"EntityType\",i.a.Str,[\"polymer\",\"non-polymer\",\"water\",\"branched\"]),e.EntitySubtype=i.a.OneOf(\"Structure\",\"EntitySubtype\",i.a.Str,[\"other\",\"polypeptide(D)\",\"polypeptide(L)\",\"polydeoxyribonucleotide\",\"polyribonucleotide\",\"polydeoxyribonucleotide/polyribonucleotide hybrid\",\"cyclic-pseudo-peptide\",\"peptide nucleic acid\",\"oligosaccharide\"]),e.ObjectPrimitive=i.a.OneOf(\"Structure\",\"ObjectPrimitive\",i.a.Str,[\"atomistic\",\"sphere\",\"gaussian\",\"other\"]),e.ResidueId=i.a.Value(\"Structure\",\"ResidueId\"),e.ElementSet=i.a.Value(\"Structure\",\"ElementSet\"),e.ElementSelection=i.a.Value(\"Structure\",\"ElementSelection\"),e.ElementReference=i.a.Value(\"Structure\",\"ElementReference\"),e.ElementSelectionQuery=a.a.Fn(e.ElementSelection,\"ElementSelectionQuery\");}(n||(n={}));var u={\"@header\":\"Types\",elementSymbol:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.Str)}),n.ElementSymbol,\"Create element symbol representation from a string value.\"),atomName:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.AnyValue)}),n.AtomName,\"Convert a value to an atom name.\"),entityType:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.EntityType)}),n.EntityType,\"Create normalized representation of entity type: \"+i.a.oneOfValues(n.EntityType).join(\", \")+\".\"),bondFlags:Object(s.b)(o.b.List(n.BondFlag),n.BondFlags,\"Create bond flags representation from a list of strings. Allowed flags: \"+i.a.oneOfValues(n.BondFlag).join(\", \")+\".\"),ringFingerprint:Object(s.b)(o.b.List(n.ElementSymbol,{nonEmpty:!0}),n.RingFingerprint,\"Create ring fingerprint from the supplied atom element list.\"),secondaryStructureFlags:Object(s.b)(o.b.List(n.SecondaryStructureFlag),n.SecondaryStructureFlags,\"Create secondary structure flags representation from a list of strings. Allowed flags: \"+i.a.oneOfValues(n.SecondaryStructureFlag).join(\", \")+\".\"),authResidueId:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.Str,{description:\"auth_asym_id\"}),1:Object(o.a)(i.a.Num,{description:\"auth_seq_id\"}),2:Object(o.a)(i.a.Str,{description:\"pdbx_PDB_ins_code\",isOptional:!0})}),n.ResidueId,'Residue identifier based on \"auth_\" annotation.'),labelResidueId:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.Str,{description:\"label_entity_id\"}),1:Object(o.a)(i.a.Str,{description:\"label_asym_id\"}),2:Object(o.a)(i.a.Num,{description:\"label_seq_id\"}),3:Object(o.a)(i.a.Str,{description:\"pdbx_PDB_ins_code\",isOptional:!0})}),n.ResidueId,'Residue identifier based on mmCIF\\'s \"label_\" annotation.')},c={\"@header\":\"Iteration Slots\",element:Object(s.b)(o.b.None,n.ElementReference,\"A reference to the current element.\"),elementSetReduce:Object(s.b)(o.b.None,i.a.Variable(\"a\",i.a.AnyValue,!0),\"Current value of the element set reducer.\")},l={\"@header\":\"Generators\",all:Object(s.b)(o.b.None,n.ElementSelectionQuery,\"The entire structure.\"),atomGroups:Object(s.b)(o.b.Dictionary({\"entity-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test for the 1st atom of every entity\"}),\"chain-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test for the 1st atom of every chain\"}),\"residue-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!0,description:\"Test for the 1st atom every residue\"}),\"atom-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!0}),\"group-by\":Object(o.a)(i.a.Any,{isOptional:!0,defaultValue:\"atom-key\",description:\"Group atoms to sets based on this property. Default: each atom has its own set\"})}),n.ElementSelectionQuery,\"Return all atoms for which the tests are satisfied, grouped into sets.\"),bondedAtomicPairs:Object(s.b)(o.b.Dictionary({0:Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:\"true for covalent bonds\",description:\"Test each bond with this predicate. Each bond is visited twice with swapped atom order.\"})}),n.ElementSelectionQuery,\"Return all pairs of atoms for which the test is satisfied.\"),rings:Object(s.b)(o.b.Dictionary({fingerprint:Object(o.a)(n.RingFingerprint,{isOptional:!0}),\"only-aromatic\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!1})}),n.ElementSelectionQuery,\"Return all rings or those with the specified fingerprint and/or only aromatic rings.\"),queryInSelection:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),query:Object(o.a)(n.ElementSelectionQuery),\"in-complement\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!1})}),n.ElementSelectionQuery,\"Executes query only on atoms that are in the source selection.\"),empty:Object(s.b)(o.b.None,n.ElementSelectionQuery,\"Nada.\")},d={\"@header\":\"Selection Modifications\",queryEach:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),query:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Query every atom set in the input selection separately.\"),intersectBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Intersect each atom set from the first sequence from atoms in the second one.\"),exceptBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Remove all atoms from 'selection' that occur in 'by'.\"),unionBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"For each atom set A in the orginal sequence, combine all atoms sets in the target selection that intersect with A.\"),union:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Collects all atom sets in the sequence into a single atom set.\"),cluster:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),\"min-distance\":Object(o.a)(i.a.Num,{isOptional:!0,defaultValue:0}),\"max-distance\":Object(o.a)(i.a.Num),\"min-size\":Object(o.a)(i.a.Num,{description:\"Minimal number of sets to merge, must be at least 2\",isOptional:!0,defaultValue:2}),\"max-size\":Object(o.a)(i.a.Num,{description:\"Maximal number of sets to merge, if not set, no limit\",isOptional:!0})}),n.ElementSelectionQuery,\"Combines atom sets that have mutual distance in the interval [min-radius, max-radius]. Minimum/maximum size determines how many atom sets can be combined.\"),includeSurroundings:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),radius:Object(o.a)(i.a.Num),\"atom-radius\":Object(o.a)(i.a.Num,{isOptional:!0,defaultValue:0,description:\"Value added to each atom before the distance check, for example VDW radius. Using this argument is computationally demanding.\"}),\"as-whole-residues\":Object(o.a)(i.a.Bool,{isOptional:!0})}),n.ElementSelectionQuery,\"For each atom set in the selection, include all surrouding atoms/residues that are within the specified radius.\"),includeConnected:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),\"bond-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:\"true for covalent bonds\"}),\"layer-count\":Object(o.a)(i.a.Num,{isOptional:!0,defaultValue:1,description:\"Number of bonded layers to include.\"}),\"as-whole-residues\":Object(o.a)(i.a.Bool,{isOptional:!0})}),n.ElementSelectionQuery,\"Pick all atom sets that are connected to the target.\"),wholeResidues:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Expand the selection to whole residues.\"),expandProperty:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),property:Object(o.a)(i.a.AnyValue)}),n.ElementSelectionQuery,\"To each atom set in the selection, add all atoms that have the same property value that was already present in the set.\")},f={\"@header\":\"Selection Filters\",pick:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),test:Object(o.a)(i.a.Bool)}),n.ElementSelectionQuery,\"Pick all atom sets that satisfy the test.\"),first:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Take the 1st atom set in the sequence.\"),withSameAtomProperties:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),source:Object(o.a)(n.ElementSelectionQuery),property:Object(o.a)(i.a.Any)}),n.ElementSelectionQuery,\"Pick all atom sets for which the set of given atom properties is a subset of the source properties.\"),intersectedBy:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),by:Object(o.a)(n.ElementSelectionQuery)}),n.ElementSelectionQuery,\"Pick all atom sets that have non-zero intersection with the target.\"),within:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),target:Object(o.a)(n.ElementSelectionQuery),\"min-radius\":Object(o.a)(i.a.Num,{isOptional:!0,defaultValue:0}),\"max-radius\":Object(o.a)(i.a.Num),\"atom-radius\":Object(o.a)(i.a.Num,{isOptional:!0,defaultValue:0,description:\"Value added to each atom before the distance check, for example VDW radius. Using this argument is computationally demanding.\"}),invert:Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!1,description:\"If true, pick only atom sets that are further than the specified radius.\"})}),n.ElementSelectionQuery,\"Pick all atom sets from selection that have any atom within the radius of any atom from target.\"),isConnectedTo:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery),target:Object(o.a)(n.ElementSelectionQuery),\"bond-test\":Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:\"true for covalent bonds\"}),disjunct:Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!0,description:\"If true, there must exist a bond to an atom that lies outside the given atom set to pass test.\"}),invert:Object(o.a)(i.a.Bool,{isOptional:!0,defaultValue:!1,description:\"If true, return atom sets that are not connected.\"})}),n.ElementSelectionQuery,\"Pick all atom sets that are connected to the target.\")},p={\"@header\":\"Selection Combinators\",intersect:Object(s.b)(o.b.List(n.ElementSelectionQuery),n.ElementSelectionQuery,\"Return all unique atom sets that appear in all of the source selections.\"),merge:Object(s.b)(o.b.List(n.ElementSelectionQuery),n.ElementSelectionQuery,\"Merges multiple selections into a single one. Only unique atom sets are kept.\"),distanceCluster:Object(s.b)(o.b.Dictionary({matrix:Object(o.a)(a.a.List(a.a.List(i.a.Num)),{description:\"Distance matrix, represented as list of rows (num[][])). Lower triangle is min distance, upper triangle is max distance.\"}),selections:Object(o.a)(a.a.List(n.ElementSelectionQuery),{description:\"A list of held selections.\"})}),n.ElementSelectionQuery,\"Pick combinations of atom sets from the source sequences that are mutually within distances specified by a matrix.\")},m={\"@header\":\"Atom Sets\",atomCount:Object(s.b)(o.b.None,i.a.Num),countQuery:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementSelectionQuery)}),i.a.Num,\"Counts the number of occurences of a specific query inside the current atom set.\"),reduce:Object(s.b)(o.b.Dictionary({initial:Object(o.a)(i.a.Variable(\"a\",i.a.AnyValue,!0),{description:\"Initial value assigned to slot.atom-set-reduce. Current atom is set to the 1st atom of the current set for this.\"}),value:Object(o.a)(i.a.Variable(\"a\",i.a.AnyValue,!0),{description:\"Expression executed for each atom in the set\"})}),i.a.Variable(\"a\",i.a.AnyValue,!0),\"Execute the value expression for each atom in the current atom set and return the result. Works the same way as Array.reduce in JavaScript (``result = value(value(...value(initial)))``)\"),propertySet:Object(s.b)(o.b.Dictionary({0:Object(o.a)(a.a.ConstrainedVar)}),a.a.Set(a.a.ConstrainedVar),\"Returns a set with all values of the given property in the current atom set.\")},h={\"@header\":\"Atom Properties\",core:{\"@header\":\"Core Properties\",elementSymbol:v(n.ElementSymbol),vdw:v(i.a.Num,\"Van der Waals radius\"),mass:v(i.a.Num,\"Atomic weight\"),atomicNumber:v(i.a.Num,\"Atomic number\"),x:v(i.a.Num,\"Cartesian X coordinate\"),y:v(i.a.Num,\"Cartesian Y coordinate\"),z:v(i.a.Num,\"Cartesian Z coordinate\"),atomKey:v(i.a.AnyValue,\"Unique value for each atom. Main use case is grouping of atoms.\"),bondCount:Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementReference,{isOptional:!0,defaultValue:\"slot.current-atom\"}),flags:Object(o.a)(n.BondFlags,{isOptional:!0,defaultValue:\"covalent\"})}),i.a.Num,\"Number of bonds (by default only covalent bonds are counted).\"),sourceIndex:v(i.a.Num,\"Index of the atom/element in the input file.\"),operatorName:v(i.a.Str,\"Name of the symmetry operator applied to this element.\"),modelIndex:v(i.a.Num,\"Index of the model in the input file.\"),modelLabel:v(i.a.Str,\"Label/header of the model in the input file.\")},topology:{connectedComponentKey:v(i.a.AnyValue,\"Unique value for each connected component.\")},macromolecular:{\"@header\":\"Macromolecular Properties (derived from the mmCIF format)\",authResidueId:v(n.ResidueId,\"type.auth-residue-id symbol executed on current atom's residue\"),labelResidueId:v(n.ResidueId,\"type.label-residue-id symbol executed on current atom's residue\"),residueKey:v(i.a.AnyValue,\"Unique value for each tuple ``(label_entity_id,auth_asym_id, auth_seq_id, pdbx_PDB_ins_code)``, main use case is grouping of atoms\"),chainKey:v(i.a.AnyValue,\"Unique value for each tuple ``(label_entity_id, auth_asym_id)``, main use case is grouping of atoms\"),entityKey:v(i.a.AnyValue,\"Unique value for each tuple ``label_entity_id``, main use case is grouping of atoms\"),isHet:v(i.a.Bool,\"Equivalent to atom_site.group_PDB !== ATOM\"),id:v(i.a.Num,\"_atom_site.id\"),label_atom_id:v(n.AtomName),label_alt_id:v(i.a.Str),label_comp_id:v(i.a.Str),label_asym_id:v(i.a.Str),label_entity_id:v(i.a.Str),label_seq_id:v(i.a.Num),auth_atom_id:v(n.AtomName),auth_comp_id:v(i.a.Str),auth_asym_id:v(i.a.Str),auth_seq_id:v(i.a.Num),pdbx_PDB_ins_code:v(i.a.Str),pdbx_formal_charge:v(i.a.Num),occupancy:v(i.a.Num),B_iso_or_equiv:v(i.a.Num),entityType:v(n.EntityType,\"Type of the entity as defined in mmCIF (polymer, non-polymer, branched, water)\"),entitySubtype:v(n.EntitySubtype,\"Subtype of the entity as defined in mmCIF _entity_poly.type and _pdbx_entity_branch.type (other, polypeptide(D), polypeptide(L), polydeoxyribonucleotide, polyribonucleotide, polydeoxyribonucleotide/polyribonucleotide hybrid, cyclic-pseudo-peptide, peptide nucleic acid, oligosaccharide)\"),entityPrdId:v(i.a.Str,\"The PRD ID of the entity.\"),entityDescription:v(a.a.List(i.a.Str)),objectPrimitive:v(n.ObjectPrimitive,\"Type of the primitive object used to model this segment as defined in mmCIF/IHM (atomistic, sphere, gaussian, other)\"),secondaryStructureKey:v(i.a.AnyValue,\"Unique value for each secondary structure element.\"),secondaryStructureFlags:v(n.SecondaryStructureFlags),isModified:v(i.a.Bool,\"True if the atom belongs to modification of a standard residue.\"),modifiedParentName:v(i.a.Str,\"'3-letter' code of the modifed parent residue.\"),isNonStandard:v(i.a.Bool,\"True if this is a non-standard residue.\"),chemCompType:v(i.a.Str,\"Type of the chemical component as defined in mmCIF.\")}},g={\"@header\":\"Bond Properties\",flags:b(n.BondFlags),order:b(i.a.Num),length:b(i.a.Num),atomA:b(n.ElementReference),atomB:b(n.ElementReference)};function v(e,t){return Object(s.b)(o.b.Dictionary({0:Object(o.a)(n.ElementReference,{isOptional:!0,defaultValue:\"slot.current-atom\"})}),e,t);}function b(e,t){return Object(s.b)(o.b.None,e,t);}t.b={\"@header\":\"Structure Queries\",type:u,slot:c,generator:l,modifier:d,filter:f,combinator:p,atomSet:m,atomProperty:h,bondProperty:g};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(){return Error.call(this),this.message=\"no elements in sequence\",this.name=\"EmptyError\",this;}return e.prototype=Object.create(Error.prototype),e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(2),i=r(47),a={customText:n.ParamDefinition.Text(\"\",{label:\"Text\",description:\"Override the label with custom value.\"}),textColor:n.ParamDefinition.Color(i.a.black,{isEssential:!0}),textSize:n.ParamDefinition.Numeric(.5,{min:.1,max:5,step:.1},{isEssential:!0})};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return g;});var n=r(0),i=r(2),a=r(54),o=r(4),s=r(60),u=r(115),c=r(89),l=r(16),d=r(23),f=r(45),p=r(130),m=r(77),h=r(131);function g(e,t,r,g){var v,b,y,_,S=0,O=new s.a(),x=Object(u.c)(),C=[],w=a.c.create(),P=c.a.createEmpty();function j(e){if(a.c.update(w,e),void 0!==e.visible&&v&&v.setVisibility(e.visible&&(null===w.unitTransforms||w.unitTransforms.isIdentity)),void 0!==e.alphaFactor&&v&&v.setAlphaFactor(e.alphaFactor),void 0!==e.pickable&&v&&v.setPickable(e.pickable),void 0!==e.overpaint&&v){var t=p.a.remap(e.overpaint,b);v.setOverpaint(t);}if(void 0!==e.transparency&&v){var r=h.a.remap(e.transparency,b);v.setTransparency(r);}if(void 0!==e.clipping&&v){var n=m.a.remap(e.clipping,b);v.setClipping(n);}void 0!==e.transform&&v&&v.setTransform(e.transform),void 0!==e.unitTransforms&&v&&v.setVisibility(w.visible&&(null===e.unitTransforms||e.unitTransforms.isIdentity));}return{label:e,get groupCount(){return v?v.groupCount:0;},get props(){return _;},get params(){return y;},get state(){return w;},get theme(){return P;},renderObjects:C,updated:O,createOrUpdate:function createOrUpdate(e,a){var o=this;return void 0===e&&(e={}),a&&a!==b&&(y=r(t,a),b=a,_||(_=i.ParamDefinition.getDefaultValues(y))),_=Object.assign({},_,e),l.b.create(\"Creating or updating ComplexRepresentation\",function(e){return Object(n.__awaiter)(o,void 0,void 0,function(){var r,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=!1,v||(v=g(x),r=!0),(i=v.createOrUpdate({webgl:t.webgl,runtime:e},P,_,a))?[4,i]:[3,2];case 1:n.sent(),n.label=2;case 2:return r&&j(w),C.length=0,v&&v.renderObject&&C.push(v.renderObject),O.next(S++),[2];}});});});},setState:j,setTheme:function setTheme(e){P=e;},getLoci:function getLoci(e){return void 0===e?o.Structure.Loci(b):v?v.getLoci(e):d.EmptyLoci;},mark:function mark(e,t){if(!b)return!1;if(!f.b.is(w.markerActions,t))return!1;if(o.Structure.isLoci(e)||o.StructureElement.Loci.is(e)||o.Bond.isLoci(e)){if(!o.Structure.areRootsEquivalent(e.structure,b))return!1;e=d.Loci.remap(e,b);}else if(!Object(d.isEveryLoci)(e)&&!Object(d.isDataLoci)(e))return!1;return!d.Loci.isEmpty(e)&&!!v&&v.mark(e,t);},destroy:function destroy(){v&&v.destroy();}};}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"HighlightLoci\",function(){return _;}),r.d(t,\"SelectLoci\",function(){return x;}),r.d(t,\"DefaultLociLabelProvider\",function(){return C;}),r.d(t,\"FocusLoci\",function(){return j;});var n=r(0),i=r(45),a=r(8),o=r(70),s=r(71),u=r(302),c=r(13),l=r(84),d=r(59),f=r(2),p=r(23),m=r(4),h=r(30),g=(l.a,l.b),v=d.a.Trigger,b={hoverHighlightOnly:Object(d.a)([v(0)],\"Highlight\",\"Hover element using ${triggers}\"),hoverHighlightOnlyExtend:Object(d.a)([v(0,g.create({shift:!0}))],\"Extend highlight\",\"From selected to hovered element along polymer using ${triggers}\")},y={bindings:f.ParamDefinition.Value(b,{isHidden:!0})},_=s.a.create({name:\"representation-highlight-loci\",category:\"interaction\",ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lociMarkProvider=function(e,r){t.ctx.canvas3d&&t.ctx.canvas3d.mark({loci:e.loci},r);},t;}return Object(n.__extends)(t,e),t.prototype.register=function(){var e=this;this.subscribeObservable(this.ctx.behaviors.interaction.hover,function(t){var r=t.current,n=t.buttons,i=t.modifiers;if(e.ctx.canvas3d&&!e.ctx.isBusy){var a=!1;d.a.match(e.params.bindings.hoverHighlightOnly,n,i)&&(e.ctx.managers.interactivity.lociHighlights.highlightOnly(r),a=!0),d.a.match(e.params.bindings.hoverHighlightOnlyExtend,n,i)&&(e.ctx.managers.interactivity.lociHighlights.highlightOnlyExtend(r),a=!0),a||e.ctx.managers.interactivity.lociHighlights.highlightOnly({repr:r.repr,loci:p.EmptyLoci});}}),this.ctx.managers.interactivity.lociHighlights.addProvider(this.lociMarkProvider);},t.prototype.unregister=function(){this.ctx.managers.interactivity.lociHighlights.removeProvider(this.lociMarkProvider);},t;}(s.a.Handler),params:function params(){return y;},display:{name:\"Highlight Loci on Canvas\"}}),S={clickSelect:d.a.Empty,clickToggleExtend:Object(d.a)([v(1,g.create({shift:!0}))],\"Toggle extended selection\",\"${triggers} to extend selection along polymer\"),clickSelectOnly:d.a.Empty,clickToggle:Object(d.a)([v(1,g.create())],\"Toggle selection\",\"${triggers} on element\"),clickDeselect:d.a.Empty,clickDeselectAllOnEmpty:Object(d.a)([v(1,g.create())],\"Deselect all\",\"Click on nothing using ${triggers}\")},O={bindings:f.ParamDefinition.Value(S,{isHidden:!0})},x=s.a.create({name:\"representation-select-loci\",category:\"interaction\",ctor:function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.lociMarkProvider=function(e,t){n.ctx.canvas3d&&n.ctx.canvas3d.mark({loci:e.loci},t);},n.spine=new u.a.Impl(t.state.data.cells),n;}return Object(n.__extends)(t,e),t.prototype.applySelectMark=function(e,t){var r=this.ctx.state.data.cells.get(e);if(r&&a.a.isRepresentation3D(r.obj)){this.spine.current=r;var n=this.spine.getRootOfType(a.a.Molecule.Structure);if(n){t&&this.lociMarkProvider({loci:m.Structure.Loci(n.data)},i.a.Deselect);var o=this.ctx.managers.structure.selection.getLoci(n.data);this.lociMarkProvider({loci:o},i.a.Select);}}},t.prototype.register=function(){var e=this,t=function t(e){return!p.Loci.isEmpty(e.loci);},r=[[\"clickSelect\",function(t){return e.ctx.managers.interactivity.lociSelects.select(t);},t],[\"clickToggle\",function(t){return e.ctx.managers.interactivity.lociSelects.toggle(t);},t],[\"clickToggleExtend\",function(t){return e.ctx.managers.interactivity.lociSelects.toggleExtend(t);},t],[\"clickSelectOnly\",function(t){return e.ctx.managers.interactivity.lociSelects.selectOnly(t);},t],[\"clickDeselect\",function(t){return e.ctx.managers.interactivity.lociSelects.deselect(t);},t],[\"clickDeselectAllOnEmpty\",function(){return e.ctx.managers.interactivity.lociSelects.deselectAll();},function(e){return p.Loci.isEmpty(e.loci);}]];r.sort(function(t,r){var n=e.params.bindings[t[0]],i=e.params.bindings[r[0]],a=0===n.triggers.length?0:Object(h.arrayMax)(n.triggers.map(function(e){return g.size(e.modifiers);}));return(0===i.triggers.length?0:Object(h.arrayMax)(i.triggers.map(function(e){return g.size(e.modifiers);})))-a;}),this.subscribeObservable(this.ctx.behaviors.interaction.click,function(t){var n=t.current,i=t.button,a=t.modifiers;if(e.ctx.canvas3d&&!e.ctx.isBusy&&e.ctx.selectionMode)for(var o=0,s=r;o<s.length;o++){var u=s[o],c=u[0],l=u[1],f=u[2];if(d.a.match(e.params.bindings[c],i,a)&&(!f||f(n))){l(n);break;}}}),this.ctx.managers.interactivity.lociSelects.addProvider(this.lociMarkProvider),this.subscribeObservable(this.ctx.state.events.object.created,function(t){var r=t.ref;return e.applySelectMark(r);}),this.subscribeObservable(this.ctx.state.events.object.updated,function(t){var r=t.ref,n=e.ctx.state.data.cells.get(r);if(n&&a.a.Molecule.Structure.is(n.obj))for(var i=0,o=e.ctx.state.data.select(c.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3D,r));i<o.length;i++){var s=o[i];e.applySelectMark(s.transform.ref,!0);}});},t.prototype.unregister=function(){this.ctx.managers.interactivity.lociSelects.removeProvider(this.lociMarkProvider);},t;}(s.a.Handler),params:function params(){return O;},display:{name:\"Select Loci on Canvas\"}}),C=s.a.create({name:\"default-loci-label-provider\",category:\"interaction\",ctor:function(){function e(e){this.ctx=e,this.f={label:function label(e){var t=[];if(m.StructureElement.Loci.is(e)&&1===e.elements.length){var r=e.elements[0].unit,n=m.StructureElement.Location.create(e.structure,r,r.elements[0]),i=m.StructureProperties.entity.pdbx_description(n).join(\", \");t.push(i);}return t.push(Object(o.lociLabel)(e)),t.filter(function(e){return!!e;}).join(\"</br>\");},group:function group(e){return e.toString().replace(/Model [0-9]+/g,\"Models\");},priority:100};}return e.prototype.register=function(){this.ctx.managers.lociLabels.addProvider(this.f);},e.prototype.unregister=function(){this.ctx.managers.lociLabels.removeProvider(this.f);},e;}(),display:{name:\"Provide Default Loci Label\"}}),w={clickFocus:Object(d.a)([v(1,g.create())],\"Representation Focus\",\"Click element using ${triggers}\"),clickFocusAdd:Object(d.a)([v(1,g.create({shift:!0}))],\"Representation Focus Add\",\"Click element using ${triggers}\"),clickFocusSelectMode:Object(d.a)([],\"Representation Focus\",\"Click element using ${triggers}\"),clickFocusAddSelectMode:Object(d.a)([],\"Representation Focus Add\",\"Click element using ${triggers}\")},P={bindings:f.ParamDefinition.Value(w,{isHidden:!0})},j=s.a.create({name:\"representation-focus-loci\",category:\"interaction\",ctor:function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.register=function(){var e=this;this.subscribeObservable(this.ctx.behaviors.interaction.click,function(t){var r,n=t.current,i=t.button,a=t.modifiers,o=e.params.bindings,s=o.clickFocus,u=o.clickFocusAdd,c=o.clickFocusSelectMode,l=o.clickFocusAddSelectMode,f=e.ctx.managers.interactivity.props.granularity;if(\"residue\"===f||\"element\"===f){var m=e.ctx.selectionMode?c:s,h=d.a.match(m,i,a),g=e.ctx.selectionMode?l:u,v=d.a.match(g,i,a);if(h||v){var b=p.Loci.normalize(n.loci,\"residue\"),y=e.ctx.managers.structure.focus.current;if(y&&p.Loci.areEqual(y.loci,b))e.ctx.managers.structure.focus.clear();else if(h)e.ctx.managers.structure.focus.setFromLoci(b);else{e.ctx.managers.structure.focus.addFromLoci(b);var _=null===(r=e.ctx.managers.structure.focus.current)||void 0===r?void 0:r.loci;_&&e.ctx.managers.camera.focusLoci(_);}}}});},t;}(s.a.Handler),params:function params(){return P;},display:{name:\"Representation Focus Loci on Canvas\"}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(44),i=r(374),a=r(310);function o(e,t){return t?Object(a.a)(e,t):new n.a(Object(i.a)(e));}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(21),i=r(320),a=function(e){function t(r,n){void 0===n&&(n=i.a.now);var a=e.call(this,r,function(){return t.delegate&&t.delegate!==a?t.delegate.now():n();})||this;return a.actions=[],a.active=!1,a.scheduled=void 0,a;}return n.a(t,e),t.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,i):e.prototype.schedule.call(this,r,n,i);},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break;}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r;}}},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(21),i=r(60),a=r(69),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t;}return n.a(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.a.EMPTY):e.prototype._subscribe.call(this,t);},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0);},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t);},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this);},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(64),i=r(25);function a(e,t,r,n){n=e[t],e[t]=e[r],e[r]=n;}function o(e,t){return(e=Math.abs(e))>(t=Math.abs(t))?(t/=e,e*Math.sqrt(1+t*t)):t>0?(e/=t,t*Math.sqrt(1+e*e)):0;}function s(e,t,r,i){var s=0,u=0,c=e.rows,l=e.cols,d=c,f=l;d<f&&(s=1,u=d,d=f,f=u);var p=n.a.create(d,d),m=n.a.create(1,f),h=n.a.create(f,f);if(0===s)n.a.transpose(p,e);else{for(u=0;u<l*c;u++)p.data[u]=e.data[u];for(;u<f*d;u++)p.data[u]=0;}if(function(e,t,r,n,i,s,u,c){for(var l=0,d=0,f=0,p=0,m=Math.max(s,30),h=0,g=0,v=0,b=0,y=0,_=0,S=0,O=0,x=0,C=0,w=0,P=0,j=0,E=0,A=0,T=0,D=0,I=4660,M=0,k=0,B=0,V=new Float64Array(u<<3);l<u;l++){for(f=0,w=0;f<s;f++)w+=(O=e[l*t+f])*O;if(V[l]=w,n){for(f=0;f<u;f++)n[l*i+f]=0;n[l*i+l]=1;}}for(;p<m;p++){for(y=0,l=0;l<u-1;l++)for(d=l+1;d<u;d++){for(h=l*t|0,g=d*t|0,A=V[l],T=0,D=V[d],f=2,T+=e[h]*e[g],T+=e[h+1]*e[g+1];f<s;f++)T+=e[h+f]*e[g+f];if(!(Math.abs(T)<=2.384185792e-7*Math.sqrt(A*D))){for(j=o(T*=2,P=A-D),P<0?(E=.5*(j-P),_=T/(j*(S=Math.sqrt(E/j))*2)):S=T/(j*(_=Math.sqrt((j+P)/(2*j)))*2),A=0,D=0,f=2,x=_*e[h]+S*e[g],C=-S*e[h]+_*e[g],e[h]=x,e[g]=C,A+=x*x,D+=C*C,x=_*e[h+1]+S*e[g+1],C=-S*e[h+1]+_*e[g+1],e[h+1]=x,e[g+1]=C,A+=x*x,D+=C*C;f<s;f++)x=_*e[h+f]+S*e[g+f],C=-S*e[h+f]+_*e[g+f],e[h+f]=x,e[g+f]=C,A+=x*x,D+=C*C;if(V[l]=A,V[d]=D,y=1,n)for(b=d*i|0,f=2,x=_*n[v=l*i|0]+S*n[b],C=-S*n[v]+_*n[b],n[v]=x,n[b]=C,x=_*n[v+1]+S*n[b+1],C=-S*n[v+1]+_*n[b+1],n[v+1]=x,n[b+1]=C;f<u;f++)x=_*n[v+f]+S*n[b+f],C=-S*n[v+f]+_*n[b+f],n[v+f]=x,n[b+f]=C;}}if(0===y)break;}for(l=0;l<u;l++){for(f=0,w=0;f<s;f++)w+=(O=e[l*t+f])*O;V[l]=Math.sqrt(w);}for(l=0;l<u-1;l++){for(d=l,f=l+1;f<u;f++)V[d]<V[f]&&(d=f);if(l!==d&&(a(V,l,d,w),n)){for(f=0;f<s;f++)a(e,l*t+f,d*t+f,O);for(f=0;f<u;f++)a(n,l*i+f,d*i+f,O);}}for(l=0;l<u;l++)r[l]=V[l];if(n)for(l=0;l<c;l++){for(w=l<u?V[l]:0;w<=1e-37;){for(k=1/s,f=0;f<s;f++)M=0!=(256&(I=214013*I+2531011)>>16)?k:-k,e[l*t+f]=M;for(p=0;p<2;p++)for(d=0;d<l;d++){for(w=0,f=0;f<s;f++)w+=e[l*t+f]*e[d*t+f];for(B=0,f=0;f<s;f++)O=e[l*t+f]-w*e[d*t+f],e[l*t+f]=O,B+=Math.abs(O);for(B=B?1/B:0,f=0;f<s;f++)e[l*t+f]*=B;}for(w=0,f=0;f<s;f++)w+=(O=e[l*t+f])*O;w=Math.sqrt(w);}for(S=1/w,f=0;f<s;f++)e[l*t+f]*=S;}}(p.data,d,m.data,h.data,f,d,f,d),t){for(u=0;u<f;u++)t.data[u]=m.data[u];for(;u<l;u++)t.data[u]=0;}0===s?(r&&n.a.transpose(r,p),i&&n.a.transpose(i,h)):(r&&n.a.transpose(r,h),i&&n.a.transpose(i,p));}var u,c=r(11);!function(e){function t(e){if(3===e.length)return c.a.create(i.f.fromArray(Object(i.f)(),e,0),i.f.create(1,0,0),i.f.create(0,1,0),i.f.create(0,1,0));var t=n.a.fromArray(e,3,e.length/3),r=t.rows,a=r/3,o=n.a.create(3,3),u=n.a.create(1,3),l=n.a.create(3,3),d=n.a.create(3,3),f=n.a.meanRows(t),p=n.a.subRows(n.a.clone(t),f),m=n.a.transpose(n.a.create(r,3),p);n.a.multiplyABt(o,m,m),s(o,u,l,d);var h=i.f.create(f[0],f[1],f[2]),g=i.f.create(l.data[0],l.data[3],l.data[6]),v=i.f.create(l.data[1],l.data[4],l.data[7]),b=i.f.create(l.data[2],l.data[5],l.data[8]);return i.f.scale(g,g,Math.sqrt(u.data[0]/a)),i.f.scale(v,v,Math.sqrt(u.data[1]/a)),i.f.scale(b,b,Math.sqrt(u.data[2]/a)),c.a.create(h,g,v,b);}e.ofPositions=function(e){var r=t(e);return{momentsAxes:r,boxAxes:l(e,r)};},e.calculateMomentsAxes=t;var r=Object(i.f)(),a=Object(i.f)(),o=Object(i.f)(),u=Object(i.f)();function l(e,t){if(3===e.length)return c.a.clone(t);for(var n=-1/0,s=-1/0,l=-1/0,d=-1/0,f=-1/0,p=-1/0,m=Object(i.f)(),h=Object(i.f)(),g=t.origin,v=i.f.normalize(a,t.dirA),b=i.f.normalize(o,t.dirB),y=i.f.normalize(u,t.dirC),_=0,S=e.length;_<S;_+=3){i.f.projectPointOnVector(m,i.f.fromArray(m,e,_),v,g);var O=i.f.dot(v,i.f.normalize(h,i.f.sub(h,m,g))),x=i.f.distance(m,g);O>0?x>n&&(n=x):x>s&&(s=x),i.f.projectPointOnVector(m,i.f.fromArray(m,e,_),b,g);var C=i.f.dot(b,i.f.normalize(h,i.f.sub(h,m,g))),w=i.f.distance(m,g);C>0?w>l&&(l=w):w>d&&(d=w),i.f.projectPointOnVector(m,i.f.fromArray(m,e,_),y,g);var P=i.f.dot(y,i.f.normalize(h,i.f.sub(h,m,g))),j=i.f.distance(m,g);P>0?j>f&&(f=j):j>p&&(p=j);}var E=i.f.setMagnitude(Object(i.f)(),v,(n+s)/2),A=i.f.setMagnitude(Object(i.f)(),b,(l+d)/2),T=i.f.setMagnitude(Object(i.f)(),y,(f+p)/2),D=Object(i.f)(),I=function I(e,t,n){i.f.copy(r,g),i.f.scaleAndAdd(r,r,v,e),i.f.scaleAndAdd(r,r,b,t),i.f.scaleAndAdd(r,r,y,n),i.f.add(D,D,r);};return I(n,l,f),I(n,l,-p),I(n,-d,-p),I(n,-d,f),I(-s,-d,-p),I(-s,-d,f),I(-s,l,f),I(-s,l,-p),i.f.scale(D,D,1/8),c.a.create(D,E,A,T);}e.calculateBoxAxes=l;}(u||(u={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return x;});var n=r(0),i=r(2),a=r(4),o=r(245),s=r(153),u=r(29),c=r(61),l=r(6),d=r(22),f=new a.Bond.ElementBondIterator(),p=new a.Bond.ElementBondIterator();var m=new a.Bond.ElementBondIterator(),h=new a.Bond.ElementBondIterator();function g(e,t,r,n){var i=Object(u.d)(e,t,r,\"H\"),a=Object(u.i)(t,r),l=Object(u.h)(t,r),g=\"always\"===n.assignCharge||\"auto\"===n.assignCharge&&0===l,v=\"always\"===n.assignH||\"auto\"===n.assignH&&0===i,b=Object(u.c)(e,t,r),y=function(e,t,r){for(var n=0,i=t.bonds,a=i.offset,o=i.edgeProps,s=o.flags,u=o.order,c=a[r],l=a[r+1];c<l;++c)d.BondType.isCovalent(s[c])&&(n+=u[c]);return e.interUnitBonds.getEdgeIndices(r,t).forEach(function(t){var r=e.interUnitBonds.edges[t];d.BondType.isCovalent(r.props.flag)&&(n+=r.props.order);}),n;}(e,t,r),_=function(e,t,r){var n=Object(u.i)(t,r),i=\"O\"===n||\"N\"===n;if(i&&4===Object(u.c)(e,t,r))return!1;for(f.setElement(e,t,r);f.hasNext;){var a=f.move();if(a.order>1)return!0;if(i){var o=Object(u.i)(a.otherUnit,a.otherIndex);for(p.setElement(e,a.otherUnit,a.otherIndex);p.hasNext;){var s=p.move();if(s.order>1){if((\"P\"===o||\"S\"===o)&&\"O\"===Object(u.i)(s.otherUnit,s.otherIndex))continue;return!0;}}}}return!1;}(e,t,r),S=y-b>0,O=0,x=8;switch(a){case\"H\":g&&(0===b?(l=1,x=0):1===b&&(l=0,x=1));break;case\"C\":g&&(l=0),v&&(O=Math.max(0,4-y-Math.abs(l))),x=Object(s.b)(b+O+Math.max(0,-l));break;case\"N\":if(g)if(v){if(_&&y<4)l=b-i==1&&y-i==2?1:0;else for(m.setElement(e,t,r);m.hasNext;){var C=m.move(),w=Object(u.i)(C.otherUnit,C.otherIndex);if(\"S\"===w||Object(o.c)(w)){l=0;break;}l=1;}}else l=y-3;v&&(O=Math.max(0,3-y+l)),x=_&&!S?Object(s.b)(b+O-l):Object(s.b)(b+O+1-l);break;case\"O\":if(g&&(v||(l=y-2),1===y)){m.setElement(e,t,r);e:for(;m.hasNext;){var P=m.move();for(h.setElement(e,P.otherUnit,P.otherIndex);h.hasNext;){var j=h.move();if((j.otherUnit!==t||j.otherIndex!==r)&&\"O\"===Object(u.i)(j.otherUnit,j.otherIndex)&&2===j.order){l=-1;break e;}}}}v&&(O=Math.max(0,2-y+l)),x=_&&!S?Object(s.b)(b+O-l+1):Object(s.b)(b+O-l+2);break;case\"S\":g&&(v||(l=y<=3&&0===Object(u.d)(e,t,r,\"O\")?y-2:0)),v&&y<2&&(O=Math.max(0,2-y+l)),y<=3&&(x=Object(s.b)(b+O-l+2));break;case\"F\":case\"CL\":case\"BR\":case\"I\":case\"AT\":g&&(l=y-1);break;case\"LI\":case\"NA\":case\"K\":case\"RB\":case\"CS\":case\"FR\":g&&(l=1-y);break;case\"BE\":case\"MG\":case\"CA\":case\"SR\":case\"BA\":case\"RA\":g&&(l=2-y);break;default:c.a&&console.warn(\"Requested charge, protonation for an unhandled element\",a);}return[l,O,O+i,x];}function v(e,t,r){var n,i=t.elements.length,a=new Int8Array(i),o=new Int8Array(i),s=new Int8Array(i),u=new Int8Array(i),c=!!e.parent;if(c){var d=e.root.unitMap.get(t.id);if((n=l.SortedArray.indicesOf(d.elements,t.elements)).length!==t.elements.length)throw new Error(\"expected to find an index for every element\");t=d,e=e.root;}for(var f=0;f<i;++f){var p=g(e,t,c?n[f]:f,r),m=p[0],h=p[1],v=p[2],b=p[3];a[f]=m,o[f]=h,s[f]=v,u[f]=b;}return{charge:a,implicitH:o,totalH:s,idealGeometry:u};}var b={assignCharge:i.ParamDefinition.Select(\"auto\",[[\"always\",\"always\"],[\"auto\",\"auto\"],[\"never\",\"never\"]]),assignH:i.ParamDefinition.Select(\"auto\",[[\"always\",\"always\"],[\"auto\",\"auto\"],[\"never\",\"never\"]])};function y(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var e,o,s,u,c,l;return Object(n.__generator)(this,function(d){for(e=Object(n.__assign)(Object(n.__assign)({},i.ParamDefinition.getDefaultValues(b)),r),o=new Map(),s=0,u=t.units.length;s<u;++s)c=t.units[s],a.Unit.isAtomic(c)&&(l=v(t,c,e),o.set(c.id,l));return[2,o];});});}var _=r(204),S=r(66),O=Object(n.__assign)({},b),x=_.a.createProvider({label:\"Valence Model\",descriptor:Object(S.CustomPropertyDescriptor)({name:\"molstar_computed_valence_model\"}),type:\"local\",defaultParams:O,getParams:function getParams(e){return O;},isApplicable:function isApplicable(e){return!0;},obtain:function obtain(e,t,r){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var a,o;return Object(n.__generator)(this,function(s){switch(s.label){case 0:return a=Object(n.__assign)(Object(n.__assign)({},i.ParamDefinition.getDefaultValues(O)),r),o={},[4,y(e.runtime,t,a)];case 1:return[2,(o.value=s.sent(),o)];}});});}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(21),i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n;}return n.a(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this;},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r);},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t);},t.prototype.execute=function(e,t){if(this.closed)return new Error(\"executing a cancelled action\");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null));},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e);}catch(e){r=!0,n=!!e&&e||new Error(e);}if(r)return this.unsubscribe(),n;},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null;},t;}(function(e){function t(t,r){return e.call(this)||this;}return n.a(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this;},t;}(r(69).a));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(1),i=r(6);function a(){return a.empty();}!function(e){function t(){return{min:Object(n.Vec3)(),max:Object(n.Vec3)()};}function r(e,t){return n.Vec3.copy(e.min,t.min),n.Vec3.copy(e.max,t.max),e;}function a(e,t){return n.Vec3.sub(e,t.max,t.min);}e.create=function(e,t){return{min:e,max:t};},e.empty=t,e.copy=r,e.clone=function(e){return r(t(),e);},e.fromSphere3D=function(e,t){var r=n.Vec3.create(t.radius,t.radius,t.radius);return n.Vec3.sub(e.min,t.center,r),n.Vec3.add(e.max,t.center,r),e;},e.computeBounding=function(e){for(var t=n.Vec3.create(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=n.Vec3.create(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=e.x,o=e.y,s=e.z,u=e.indices,c=0,l=i.OrderedSet.size(u);c<l;c++){var d=i.OrderedSet.getAt(u,c);t[0]=Math.min(a[d],t[0]),t[1]=Math.min(o[d],t[1]),t[2]=Math.min(s[d],t[2]),r[0]=Math.max(a[d],r[0]),r[1]=Math.max(o[d],r[1]),r[2]=Math.max(s[d],r[2]);}return{min:t,max:r};},e.size=a;var o=Object(n.Vec3)();function s(e){return n.Vec3.set(e.min,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),n.Vec3.set(e.max,-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),e;}function u(e,t){return n.Vec3.min(e.min,e.min,t),n.Vec3.max(e.max,e.max,t),e;}e.volume=function(e){return a(o,e),o[0]*o[1]*o[2];},e.setEmpty=s,e.add=u,e.expand=function(e,t,r){return n.Vec3.sub(e.min,t.min,r),n.Vec3.add(e.max,t.max,r),e;},e.scale=function(e,t,r){return n.Vec3.scale(e.min,t.min,r),n.Vec3.scale(e.max,t.max,r),e;};var c=Object(n.Vec3)();e.transform=function(e,t,r){var i=t.min,a=i[0],o=i[1],l=i[2],d=t.max,f=d[0],p=d[1],m=d[2];return s(e),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,a,o,l),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,a,o,m),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,a,p,l),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,a,p,m),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,f,o,l),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,f,o,m),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,f,p,l),r)),u(e,n.Vec3.transformMat4(c,n.Vec3.set(c,f,p,m),r)),e;};}(a||(a={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(100);function i(e){return!Object(n.a)(e)&&e-parseFloat(e)+1>=0;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return d;});var n,i,a=r(1),o=r(176),s=r(78),u=function(){function e(t){this.camera=t,this.t=0,this.func=e.defaultTransition,this.start=0,this.inTransition=!1,this.durationMs=0,this._source=d.createDefaultSnapshot(),this._target=d.createDefaultSnapshot(),this._current=d.createDefaultSnapshot();}return Object.defineProperty(e.prototype,\"source\",{get:function get(){return this._source;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"target\",{get:function get(){return this._target;},enumerable:!1,configurable:!0}),e.prototype.apply=function(t,r,n){void 0===r&&(r=0),(!this.inTransition||r>0)&&d.copySnapshot(this._source,this.camera.state),this.inTransition||d.copySnapshot(this._target,this.camera.state),d.copySnapshot(this._target,t),this._target.radius>this._target.radiusMax&&(this._target.radius=this._target.radiusMax),!this.inTransition&&r<=0||void 0!==t.mode&&t.mode!==this.camera.state.mode?this.finish(this._target):(this.inTransition=!0,this.func=n||e.defaultTransition,(!this.inTransition||r>0)&&(this.start=this.t,this.durationMs=r));},e.prototype.tick=function(e){this.t=e,this.update();},e.prototype.finish=function(e){d.copySnapshot(this.camera.state,e),this.inTransition=!1;},e.prototype.update=function(){if(this.inTransition){var e=Math.min((this.t-this.start)/this.durationMs,1);1!==e?(this.func(this._current,e,this._source,this._target),d.copySnapshot(this.camera.state,this._current)):this.finish(this._target);}},e;}();n=u||(u={}),i=a.Quat.identity(),n.defaultTransition=function(e,t,r,n){d.copySnapshot(e,n),a.Quat.slerp(i,a.Quat.Identity,a.Quat.rotationTo(i,r.up,n.up),t),a.Vec3.transformQuat(e.up,r.up,i),a.Vec3.lerp(e.target,r.target,n.target,t),a.Vec3.lerp(e.position,r.position,n.position,t),e.radius=Object(s.b)(r.radius,n.radius,t),e.radiusMax=Object(s.b)(r.radiusMax,n.radiusMax,t),e.fov=Object(s.b)(r.fov,n.fov,t),e.fog=Object(s.b)(r.fog,n.fog,t);};var c,l=r(278),d=function(){function e(t,r){void 0===r&&(r=o.a.create(-1,-1,1,1)),this.view=a.Mat4.identity(),this.projection=a.Mat4.identity(),this.projectionView=a.Mat4.identity(),this.inverseProjectionView=a.Mat4.identity(),this.state=e.createDefaultSnapshot(),this.viewOffset={enabled:!1,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1},this.near=1,this.far=1e4,this.fogNear=5e3,this.fogFar=1e4,this.zoom=1,this.transition=new u(this),this.stateChanged=new l.a(this.state),this.prevProjection=a.Mat4.identity(),this.prevView=a.Mat4.identity(),this.deltaDirection=Object(a.Vec3)(),this.newPosition=Object(a.Vec3)(),this.viewport=r,e.copySnapshot(this.state,t);}return Object.defineProperty(e.prototype,\"position\",{get:function get(){return this.state.position;},set:function set(e){a.Vec3.copy(this.state.position,e);},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"up\",{get:function get(){return this.state.up;},set:function set(e){a.Vec3.copy(this.state.up,e);},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"target\",{get:function get(){return this.state.target;},set:function set(e){a.Vec3.copy(this.state.target,e);},enumerable:!1,configurable:!0}),e.prototype.update=function(){var e=this.state,t=2*Math.tan(e.fov/2)*a.Vec3.distance(e.position,e.target);switch(this.zoom=this.viewport.height/t,function(e){var t=e.state,r=t.radius,n=t.radiusMax,i=t.mode,o=t.fog,s=t.clipFar;r<.01&&(r=.01);var u=s?r:n,c=a.Vec3.distance(e.position,e.target),l=c-r,d=c+u,f=c-u*(-(50-o)/50),p=d;\"perspective\"===i?(l=Math.max(5,l),d=Math.max(5,d)):(l=Math.max(0,l),d=Math.max(0,d));l===d&&(d=l+.01);e.near=l,e.far=d,e.fogNear=f,e.fogFar=p;}(this),this.state.mode){case\"orthographic\":!function(e){var t=e.viewport,r=e.zoom,n=e.near,i=e.far,o=e.viewOffset,s=-(t.width-t.x)/2,u=(t.width-t.x)/2,c=(t.height-t.y)/2,l=-(t.height-t.y)/2,d=(u-s)/(2*r),f=(c-l)/(2*r),p=(u+s)/2,m=(c+l)/2,h=p-d,g=p+d,v=m+f,b=m-f;if(o.enabled){var y=r/(o.width/o.fullWidth),_=r/(o.height/o.fullHeight),S=(u-s)/o.width,O=(c-l)/o.height;h+=S*(o.offsetX/y),g=h+S*(o.width/y),v-=O*(o.offsetY/_),b=v-O*(o.height/_);}a.Mat4.ortho(e.projection,h,g,v,b,n,i),a.Mat4.lookAt(e.view,e.position,e.target,e.up);}(this);break;case\"perspective\":!function(e){var t=e.viewport.width/e.viewport.height,r=e.near,n=e.far,i=e.viewOffset,o=r*Math.tan(.5*e.state.fov),s=2*o,u=t*s,c=-.5*u;i.enabled&&(c+=i.offsetX*u/i.fullWidth,o-=i.offsetY*s/i.fullHeight,u*=i.width/i.fullWidth,s*=i.height/i.fullHeight);a.Mat4.perspective(e.projection,c,c+u,o,o-s,r,n),a.Mat4.lookAt(e.view,e.position,e.target,e.up);}(this);break;default:throw new Error(\"unknown camera mode\");}var r=!a.Mat4.areEqual(this.projection,this.prevProjection,a.EPSILON)||!a.Mat4.areEqual(this.view,this.prevView,a.EPSILON);return r&&(a.Mat4.mul(this.projectionView,this.projection,this.view),a.Mat4.invert(this.inverseProjectionView,this.projectionView),a.Mat4.copy(this.prevView,this.view),a.Mat4.copy(this.prevProjection,this.projection)),r;},e.prototype.setState=function(e,t){this.transition.apply(e,t),this.stateChanged.next(e);},e.prototype.getSnapshot=function(){return e.copySnapshot(e.createDefaultSnapshot(),this.state);},e.prototype.getTargetDistance=function(e){var t=Math.max(e,.01),r=this.state.fov,n=this.viewport,i=n.width,a=n.height,o=a<i?1:i/a;return Math.abs(t/o/Math.sin(r/2));},e.prototype.getFocus=function(t,r,n,i){var o=Math.max(r,.01),s=this.getTargetDistance(o);a.Vec3.sub(this.deltaDirection,this.target,this.position),i&&a.Vec3.matchDirection(this.deltaDirection,i,this.deltaDirection),a.Vec3.setMagnitude(this.deltaDirection,this.deltaDirection,s),a.Vec3.sub(this.newPosition,t,this.deltaDirection);var u=e.copySnapshot(e.createDefaultSnapshot(),this.state);return u.target=a.Vec3.clone(t),u.radius=o,u.position=a.Vec3.clone(this.newPosition),n&&a.Vec3.matchDirection(u.up,n,u.up),u;},e.prototype.focus=function(e,t,r,n,i){t>0&&this.setState(this.getFocus(e,t,n,i),r);},e.prototype.project=function(e,t){return Object(o.b)(e,t,this.viewport,this.projectionView);},e.prototype.unproject=function(e,t){return Object(o.c)(e,t,this.viewport,this.inverseProjectionView);},e;}();(c=d||(d={})).setViewOffset=function(e,t,r,n,i,a,o){e.fullWidth=t,e.fullHeight=r,e.offsetX=n,e.offsetY=i,e.width=a,e.height=o;},c.createDefaultSnapshot=function(){return{mode:\"perspective\",fov:Math.PI/4,position:a.Vec3.create(0,0,100),up:a.Vec3.create(0,1,0),target:a.Vec3.create(0,0,0),radius:10,radiusMax:10,fog:50,clipFar:!0};},c.copySnapshot=function(e,t){return t?(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.fov&&(e.fov=t.fov),void 0!==t.position&&a.Vec3.copy(e.position,t.position),void 0!==t.up&&a.Vec3.copy(e.up,t.up),void 0!==t.target&&a.Vec3.copy(e.target,t.target),void 0!==t.radius&&(e.radius=t.radius),void 0!==t.radiusMax&&(e.radiusMax=t.radiusMax),void 0!==t.fog&&(e.fog=t.fog),void 0!==t.clipFar&&(e.clipFar=t.clipFar),e):e;};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(46),i=r(161);function a(){return a.zero();}!function(e){function t(){var e=[.1,0,0];return e[0]=0,e;}e.zero=t,e.create=function(e,r,n){var i=t();return i[0]=e,i[1]=r,i[2]=n,i;};var r=[0,0,0];e.fromColor=function(e,t){return i.a.toHcl(e,i.a.fromColor(r,t));},e.fromLab=function(e,t){return i.a.toHcl(e,t);};var a=[0,0,0];function o(e,t){var r=t[0],i=t[1],a=t[2];return isNaN(r)&&(r=0),r=Object(n.c)(r),e[0]=a,e[1]=Math.cos(r)*i,e[2]=Math.sin(r)*i,e;}function s(e,t,r){return e[0]=t[0],e[1]=Math.max(0,t[1]+l*r),e[2]=t[2],e;}e.toColor=function(e){return i.a.toColor(o(a,e));},e.toLab=o,e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e;},e.saturate=s,e.desaturate=function(e,t,r){return s(e,t,-r);};var u=[0,0,0];function c(e,t,r){return o(u,t),i.a.toHcl(e,i.a.darken(u,u,r));}e.darken=c,e.lighten=function(e,t,r){return c(e,t,-r);};var l=18;}(a||(a={}));},function(e,t,r){\"use strict\";r.d(t,\"e\",function(){return y;}),r.d(t,\"a\",function(){return _;}),r.d(t,\"d\",function(){return S;}),r.d(t,\"c\",function(){return O;}),r.d(t,\"g\",function(){return x;}),r.d(t,\"b\",function(){return C;}),r.d(t,\"f\",function(){return w;});var n,i,a,o,s,u=r(0),c=r(1),l=r(127),d=r(149),f=Object(c.Vec3)(),p=Object(c.Vec3)(),m=Object(c.Vec3)(),h=Object(c.Vec3)(),g=Object(c.Vec3)(),v=Object(c.Vec3)(),b={height:1,topCap:!0,bottomCap:!0};function y(e,t){var r=e.length/3;if(r<4)throw new Error(\"need at least 4 points to build a prism\");var n=Object(u.__assign)(Object(u.__assign)({},b),t),i=n.height,a=n.topCap,o=n.bottomCap,s=4*r,d=Object(l.a)(s),y=.5*i;c.Vec3.set(f,0,0,-y),c.Vec3.set(p,0,0,y);for(var _=0;_<r;++_){var S=(_+1)%r;c.Vec3.set(m,e[3*_],e[3*_+1],-y),c.Vec3.set(h,e[3*S],e[3*S+1],-y),c.Vec3.set(g,e[3*S],e[3*S+1],y),c.Vec3.set(v,e[3*_],e[3*_+1],y),d.add(m,h,g),d.add(g,v,m);}for(_=0;_<r;++_){S=(_+1)%r;a&&(c.Vec3.set(m,e[3*_],e[3*_+1],-y),c.Vec3.set(h,e[3*S],e[3*S+1],-y),d.add(f,h,m)),o&&(c.Vec3.set(m,e[3*_],e[3*_+1],y),c.Vec3.set(h,e[3*S],e[3*S+1],y),d.add(m,h,p));}return d.getPrimitive();}function _(){return n||(n=y(Object(d.a)(4,!1))),n;}function S(){return i||(i=y(Object(d.a)(5,!1))),i;}function O(){return a||(a=y(Object(d.a)(6,!1))),a;}function x(){return o||(o=y(Object(d.a)(6,!0))),o;}function C(){return s||(s=y(Object(d.a)(7,!1))),s;}function w(e,t){void 0===t&&(t=1);for(var r=e.length/3,n=[],i=[],a=.5*t,o=0,s=0;s<r;++s)n.push(e[3*s],e[3*s+1],-a,e[3*s],e[3*s+1],a),i.push(o,o+1),o+=2;for(s=0;s<r;++s){var u=(s+1)%r;i.push(2*s,2*u,2*s+1,2*u+1);}return{vertices:n,edges:i};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(44),i=r(122),a=r(291),o=r(224);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Number.POSITIVE_INFINITY,s=null,u=e[e.length-1];return Object(i.a)(u)?(s=e.pop(),e.length>1&&\"number\"==typeof e[e.length-1]&&(r=e.pop())):\"number\"==typeof u&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.a?e[0]:Object(a.a)(r)(Object(o.a)(e,s));}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PropertyWrapper\",function(){return n;});var n,i=r(62),a=r(328),o=r(72);!function(e){e.createInfo=function(){return{timestamp_utc:Object(a.a)(new Date())};},e.defaultInfoCategory=function(e,r){return{name:e,instance:function instance(e){var n=r(e);return{fields:t,source:[{data:n,rowCount:1}]};}};};var t=[i.a.Field.str(\"updated_datetime_utc\",function(e,t){return t.timestamp_utc;})];e.tryGetInfoFromCif=function(e,t){if(o.a.is(t.sourceData)&&t.sourceData.data.frame.categoryNames.includes(e)){var r=t.sourceData.data.frame.categories[e].getField(\"updated_datetime_utc\");if(r&&0!==r.rowCount)return{timestamp_utc:r.str(0)||Object(a.a)(new Date())};}};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return O;}),r.d(t,\"b\",function(){return x;}),r.d(t,\"a\",function(){return C;});var n=r(0),i=r(2),a=r(68),o=r(36),s=r(144),u=r(89),c=r(182),l=r(115),d=r(23),f=r(6),p=r(164),m=r(196),h=r(5),g=r(145),v=r(117),b=r(40),y=r(33),_=r(60),S=r(16);function O(e,t){var r,i,b,y,_,S,O,x=e.defaultProps,C=e.createGeometry,w=e.createLocationIterator,P=e.getLoci,j=e.eachLocation,E=e.setUpdateState,A=e.geometryUtils,T=A.updateValues,D=A.updateBoundingSphere,I=A.updateRenderableState,M=p.a.create(),k=Object.assign({},x),B=u.a.createEmpty();function V(e){if(M.createNew){if(O=w(y),!e)throw new Error(\"expected geometry to be given\");r=function(e,t,r,n,i,a){var o=s.a.getUtils(t),u=o.createValues,d=o.createRenderableState,f=u(t,Object(c.a)(),r,n,i),p=d(i);return Object(l.a)(t.kind,f,p,a);}(0,e,O,b,i,t);}else{if(!r)throw new Error(\"expected renderObject to be available\");if(O.reset(),M.createGeometry){if(!e)throw new Error(\"expected geometry to be given\");h.e.update(r.values.drawCount,s.a.getDrawCount(e)),D(r.values,e);}M.updateSize&&\"uSize\"in r.values&&Object(g.a)(O,b.size,r.values),M.updateColor&&Object(v.a)(O,b.color,r.values),T(r.values,i),I(r.state,i);}k=i,B=b,_=y,e&&(S=e);}function R(e,t){return Object(d.isEveryLoci)(e)?t(f.Interval.ofBounds(0,O.groupCount*O.instanceCount)):j(e,_,k,t);}return{get groupCount(){return O?O.count:0;},get renderObject(){return r;},createOrUpdate:function createOrUpdate(e,t,a,s){return void 0===a&&(a={}),Object(n.__awaiter)(this,void 0,void 0,function(){var u;return Object(n.__generator)(this,function(n){return function(e,t,n){if(!n&&!_)throw new Error(\"missing volume\");i=Object.assign({},k,t),b=e,y=n,p.a.reset(M),r&&_&&o.b.areEquivalent(y,_)||(M.createNew=!0),M.createNew?M.createGeometry=!0:(E(M,n,i,k,b,B),m.a.areEqual(e.color,B.color)||(M.updateColor=!0),M.createGeometry&&(M.updateColor=!0));}(t,a,s||_),M.createGeometry?[2,(u=C(e,y,b,i,S))instanceof Promise?u.then(V):V(u)]:(V(),[2]);});});},getLoci:function getLoci(e){return r?P(e,_,k,r.id):d.EmptyLoci;},mark:function mark(e,t){return a.a.mark(r,e,t,R);},setVisibility:function setVisibility(e){a.a.setVisibility(r,e);},setAlphaFactor:function setAlphaFactor(e){a.a.setAlphaFactor(r,e);},setPickable:function setPickable(e){a.a.setPickable(r,e);},setTransform:function setTransform(e,t){a.a.setTransform(r,e,t);},setOverpaint:function setOverpaint(e){return a.a.setOverpaint(r,e,R,!0);},setTransparency:function setTransparency(e){return a.a.setTransparency(r,e,R,!0);},setClipping:function setClipping(e){return a.a.setClipping(r,e,R,!0);},destroy:function destroy(){r=void 0;}};}function x(e){return e;}Object(n.__assign)({},y.a.Params);function C(e,t,r,a,o){var s,c,f,p,m=0,h=new _.a(),g=Object(l.c)(),v=[],y=b.a.createState(),O=u.a.createEmpty();return{label:e,get groupCount(){return s?s.groupCount:0;},get props(){return p;},get params(){return f;},get state(){return y;},get theme(){return O;},renderObjects:v,updated:h,createOrUpdate:function createOrUpdate(e,o){var u=this;return void 0===e&&(e={}),o&&o!==c&&(f=r(t,o),c=o,p||(p=i.ParamDefinition.getDefaultValues(f))),p=Object.assign({},p,e),S.b.create(\"Creating or updating VolumeRepresentation\",function(e){return Object(n.__awaiter)(u,void 0,void 0,function(){var r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return s||(s=a(g)),(r=s.createOrUpdate({webgl:t.webgl,runtime:e},O,p,o))?[4,r]:[3,2];case 1:n.sent(),n.label=2;case 2:return v.length=0,s&&s.renderObject&&v.push(s.renderObject),h.next(m++),[2];}});});});},setState:function setState(e){void 0!==e.visible&&s&&s.setVisibility(e.visible),void 0!==e.alphaFactor&&s&&s.setAlphaFactor(e.alphaFactor),void 0!==e.pickable&&s&&s.setPickable(e.pickable),void 0!==e.overpaint&&s&&s.setOverpaint(e.overpaint),void 0!==e.transparency&&s&&s.setTransparency(e.transparency),void 0!==e.transform&&s&&s.setTransform(e.transform),b.a.updateState(y,e);},setTheme:function setTheme(e){O=e;},getLoci:function getLoci(e){return void 0===e?o(c,p):s?s.getLoci(e):d.EmptyLoci;},mark:function mark(e,t){return!!s&&s.mark(e,t);},destroy:function destroy(){s&&s.destroy();}};}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"audit\",function(){return o;}),r.d(t,\"auditTime\",function(){return d;}),r.d(t,\"buffer\",function(){return f;}),r.d(t,\"bufferCount\",function(){return g;}),r.d(t,\"bufferTime\",function(){return S;}),r.d(t,\"bufferToggle\",function(){return A;}),r.d(t,\"bufferWhen\",function(){return I;}),r.d(t,\"catchError\",function(){return V;}),r.d(t,\"combineAll\",function(){return F;}),r.d(t,\"combineLatest\",function(){return H;}),r.d(t,\"concat\",function(){return q;}),r.d(t,\"concatAll\",function(){return W.a;}),r.d(t,\"concatMap\",function(){return Y;}),r.d(t,\"concatMapTo\",function(){return X;}),r.d(t,\"count\",function(){return K;}),r.d(t,\"debounce\",function(){return $;}),r.d(t,\"debounceTime\",function(){return re.a;}),r.d(t,\"defaultIfEmpty\",function(){return ne;}),r.d(t,\"delay\",function(){return ue;}),r.d(t,\"delayWhen\",function(){return pe;}),r.d(t,\"dematerialize\",function(){return be;}),r.d(t,\"distinct\",function(){return Se;}),r.d(t,\"distinctUntilChanged\",function(){return Ce;}),r.d(t,\"distinctUntilKeyChanged\",function(){return je;}),r.d(t,\"elementAt\",function(){return Ve;}),r.d(t,\"endWith\",function(){return Le;}),r.d(t,\"every\",function(){return Ne;}),r.d(t,\"exhaust\",function(){return ze;}),r.d(t,\"exhaustMap\",function(){return We;}),r.d(t,\"expand\",function(){return Xe;}),r.d(t,\"filter\",function(){return Ae.a;}),r.d(t,\"finalize\",function(){return Je;}),r.d(t,\"find\",function(){return tt;}),r.d(t,\"findIndex\",function(){return it;}),r.d(t,\"first\",function(){return ot;}),r.d(t,\"groupBy\",function(){return st.b;}),r.d(t,\"ignoreElements\",function(){return ut;}),r.d(t,\"isEmpty\",function(){return dt;}),r.d(t,\"last\",function(){return bt;}),r.d(t,\"map\",function(){return qe.a;}),r.d(t,\"mapTo\",function(){return yt;}),r.d(t,\"materialize\",function(){return Ot;}),r.d(t,\"max\",function(){return Tt;}),r.d(t,\"merge\",function(){return It;}),r.d(t,\"mergeAll\",function(){return Mt.a;}),r.d(t,\"mergeMap\",function(){return Q.a;}),r.d(t,\"flatMap\",function(){return Q.a;}),r.d(t,\"mergeMapTo\",function(){return kt;}),r.d(t,\"mergeScan\",function(){return Bt;}),r.d(t,\"min\",function(){return Lt;}),r.d(t,\"multicast\",function(){return Ft;}),r.d(t,\"observeOn\",function(){return zt.b;}),r.d(t,\"onErrorResumeNext\",function(){return Ht;}),r.d(t,\"pairwise\",function(){return Wt;}),r.d(t,\"partition\",function(){return Kt;}),r.d(t,\"pluck\",function(){return Zt;}),r.d(t,\"publish\",function(){return er;}),r.d(t,\"publishBehavior\",function(){return rr;}),r.d(t,\"publishLast\",function(){return ir;}),r.d(t,\"publishReplay\",function(){return or;}),r.d(t,\"race\",function(){return ur;}),r.d(t,\"reduce\",function(){return At;}),r.d(t,\"repeat\",function(){return cr;}),r.d(t,\"repeatWhen\",function(){return fr;}),r.d(t,\"retry\",function(){return hr;}),r.d(t,\"retryWhen\",function(){return br;}),r.d(t,\"refCount\",function(){return Sr.a;}),r.d(t,\"sample\",function(){return Or;}),r.d(t,\"sampleTime\",function(){return wr;}),r.d(t,\"scan\",function(){return wt;}),r.d(t,\"sequenceEqual\",function(){return Ar;}),r.d(t,\"share\",function(){return kr;}),r.d(t,\"shareReplay\",function(){return Br;}),r.d(t,\"single\",function(){return Vr;}),r.d(t,\"skip\",function(){return Nr;}),r.d(t,\"skipLast\",function(){return zr;}),r.d(t,\"skipUntil\",function(){return qr;}),r.d(t,\"skipWhile\",function(){return Yr;}),r.d(t,\"startWith\",function(){return Zr;}),r.d(t,\"subscribeOn\",function(){return tn;}),r.d(t,\"switchAll\",function(){return sn;}),r.d(t,\"switchMap\",function(){return nn;}),r.d(t,\"switchMapTo\",function(){return un;}),r.d(t,\"take\",function(){return Be.a;}),r.d(t,\"takeLast\",function(){return ht;}),r.d(t,\"takeUntil\",function(){return cn;}),r.d(t,\"takeWhile\",function(){return fn;}),r.d(t,\"tap\",function(){return vn;}),r.d(t,\"throttle\",function(){return Sn;}),r.d(t,\"throttleTime\",function(){return Cn;}),r.d(t,\"throwIfEmpty\",function(){return De;}),r.d(t,\"timeInterval\",function(){return An;}),r.d(t,\"timeout\",function(){return Vn;}),r.d(t,\"timeoutWith\",function(){return In;}),r.d(t,\"timestamp\",function(){return Rn;}),r.d(t,\"toArray\",function(){return Fn;}),r.d(t,\"window\",function(){return Un;}),r.d(t,\"windowCount\",function(){return Gn;}),r.d(t,\"windowTime\",function(){return Qn;}),r.d(t,\"windowToggle\",function(){return ei;}),r.d(t,\"windowWhen\",function(){return ni;}),r.d(t,\"withLatestFrom\",function(){return oi;}),r.d(t,\"zip\",function(){return li;}),r.d(t,\"zipAll\",function(){return di;});var n=r(21),i=r(52),a=r(50);function o(e){return function(t){return t.lift(new s(e));};}var s=function(){function e(e){this.durationSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.durationSelector));},e;}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n;}return n.a(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e);}catch(e){return this.destination.error(e);}var r=Object(a.a)(this,t);!r||r.closed?this.clearThrottle():this.add(this.throttled=r);}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=null,r.unsubscribe()),t&&(this.value=null,this.hasValue=!1,this.destination.next(e));},t.prototype.notifyNext=function(e,t,r,n){this.clearThrottle();},t.prototype.notifyComplete=function(){this.clearThrottle();},t;}(i.a),c=r(103),l=r(344);function d(e,t){return void 0===t&&(t=c.a),o(function(){return Object(l.a)(e,t);});}function f(e){return function(t){return t.lift(new p(e));};}var p=function(){function e(e){this.closingNotifier=e;}return e.prototype.call=function(e,t){return t.subscribe(new m(e,this.closingNotifier));},e;}(),m=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(Object(a.a)(n,r)),n;}return n.a(t,e),t.prototype._next=function(e){this.buffer.push(e);},t.prototype.notifyNext=function(e,t,r,n,i){var a=this.buffer;this.buffer=[],this.destination.next(a);},t;}(i.a),h=r(35);function g(e,t){return void 0===t&&(t=null),function(r){return r.lift(new v(e,t));};}var v=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?y:b;}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery));},e;}(),b=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n;}return n.a(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[]);},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this);},t;}(h.a),y=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i;}return n.a(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,i=this.count;this.count++,i%r==0&&n.push([]);for(var a=n.length;a--;){var o=n[a];o.push(e),o.length===t&&(n.splice(a,1),this.destination.next(o));}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n);}e.prototype._complete.call(this);},t;}(h.a),_=r(122);function S(e){var t=arguments.length,r=c.a;Object(_.a)(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return t>=3&&(i=arguments[2]),function(t){return t.lift(new O(e,n,i,r));};}var O=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n;}return e.prototype.call=function(e,t){return t.subscribe(new C(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler));},e;}(),x=function(){return function(){this.buffer=[];};}(),C=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;o.bufferTimeSpan=r,o.bufferCreationInterval=n,o.maxBufferSize=i,o.scheduler=a,o.contexts=[];var s=o.openContext();if(o.timespanOnly=null==n||n<0,o.timespanOnly){var u={subscriber:o,context:s,bufferTimeSpan:r};o.add(s.closeAction=a.schedule(w,r,u));}else{var c={subscriber:o,context:s},l={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:o,scheduler:a};o.add(s.closeAction=a.schedule(j,r,c)),o.add(a.schedule(P,n,l));}return o;}return n.a(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,i=0;i<n;i++){var a=r[i],o=a.buffer;o.push(e),o.length==this.maxBufferSize&&(t=a);}t&&this.onBufferFull(t);},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t);},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer);}e.prototype._complete.call(this);},t.prototype._unsubscribe=function(){this.contexts=null;},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(w,r,n));}},t.prototype.openContext=function(){var e=new x();return this.contexts.push(e),e;},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1);},t;}(h.a);function w(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan));}function P(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,i=e.scheduler,a=n.openContext();n.closed||(n.add(a.closeAction=i.schedule(j,r,{subscriber:n,context:a})),this.schedule(e,t));}function j(e){var t=e.subscriber,r=e.context;t.closeContext(r);}var E=r(69);function A(e,t){return function(r){return r.lift(new T(e,t));};}var T=function(){function e(e,t){this.openings=e,this.closingSelector=t;}return e.prototype.call=function(e,t){return t.subscribe(new D(e,this.openings,this.closingSelector));},e;}(),D=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(Object(a.a)(i,r)),i;}return n.a(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e);},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null;}this.contexts=null,e.prototype._error.call(this,t);},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null;}this.contexts=null,e.prototype._complete.call(this);},t.prototype.notifyNext=function(e,t,r,n,i){e?this.closeBuffer(e):this.openBuffer(t);},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context);},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t);}catch(e){this._error(e);}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe();}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new E.a(),n={buffer:[],subscription:r};t.push(n);var i=Object(a.a)(this,e,n);!i||i.closed?this.closeBuffer(n):(i.context=n,this.add(i),r.add(i));},t;}(i.a);function I(e){return function(t){return t.lift(new M(e));};}var M=function(){function e(e){this.closingSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new k(e,this.closingSelector));},e;}(),k=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n;}return n.a(t,e),t.prototype._next=function(e){this.buffer.push(e);},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this);},t.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1;},t.prototype.notifyNext=function(e,t,r,n,i){this.openBuffer();},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer();},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{t=(0,this.closingSelector)();}catch(e){return this.error(e);}e=new E.a(),this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(Object(a.a)(this,t)),this.subscribing=!1;},t;}(i.a),B=r(167);function V(e){return function(t){var r=new R(e),n=t.lift(r);return r.caught=n;};}var R=function(){function e(e){this.selector=e;}return e.prototype.call=function(e,t){return t.subscribe(new L(e,this.selector,this.caught));},e;}(),L=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.selector=r,i.caught=n,i;}return n.a(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught);}catch(t){return void e.prototype.error.call(this,t);}this._unsubscribeAndRecycle();var n=new B.a(this,void 0,void 0);this.add(n);var i=Object(a.a)(this,r,void 0,void 0,n);i!==n&&this.add(i);}},t;}(i.a),N=r(293);function F(e){return function(t){return t.lift(new N.a(e));};}var U=r(100),z=r(139);function H(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return\"function\"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&Object(U.a)(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(Object(z.a)([t].concat(e)),new N.a(r));};}var G=r(240);function q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(G.a.apply(void 0,[t].concat(e)));};}var W=r(345),Q=r(213);function Y(e,t){return Object(Q.a)(e,t,1);}function X(e,t){return Y(function(){return e;},t);}function K(e){return function(t){return t.lift(new Z(e,t));};}var Z=function(){function e(e,t){this.predicate=e,this.source=t;}return e.prototype.call=function(e,t){return t.subscribe(new J(e,this.predicate,this.source));},e;}(),J=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.count=0,i.index=0,i;}return n.a(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++;},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source);}catch(e){return void this.destination.error(e);}t&&this.count++;},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete();},t;}(h.a);function $(e){return function(t){return t.lift(new ee(e));};}var ee=function(){function e(e){this.durationSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new te(e,this.durationSelector));},e;}(),te=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n.durationSubscription=null,n;}return n.a(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t);}catch(e){this.destination.error(e);}},t.prototype._complete=function(){this.emitValue(),this.destination.complete();},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=Object(a.a)(this,t))&&!r.closed&&this.add(this.durationSubscription=r);},t.prototype.notifyNext=function(e,t,r,n,i){this.emitValue();},t.prototype.notifyComplete=function(){this.emitValue();},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=null,r.unsubscribe(),this.remove(r)),this.value=null,this.hasValue=!1,e.prototype._next.call(this,t);}},t;}(i.a),re=r(388);function ne(e){return void 0===e&&(e=null),function(t){return t.lift(new ie(e));};}var ie=function(){function e(e){this.defaultValue=e;}return e.prototype.call=function(e,t){return t.subscribe(new ae(e,this.defaultValue));},e;}(),ae=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n;}return n.a(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e);},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete();},t;}(h.a);function oe(e){return e instanceof Date&&!isNaN(+e);}var se=r(190);function ue(e,t){void 0===t&&(t=c.a);var r=oe(e)?+e-t.now():Math.abs(e);return function(e){return e.lift(new ce(r,t));};}var ce=function(){function e(e,t){this.delay=e,this.scheduler=t;}return e.prototype.call=function(e,t){return t.subscribe(new le(e,this.delay,this.scheduler));},e;}(),le=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.delay=r,i.scheduler=n,i.queue=[],i.active=!1,i.errored=!1,i;}return n.a(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,i=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var a=Math.max(0,r[0].time-n.now());this.schedule(e,a);}else this.unsubscribe(),t.active=!1;},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}));},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new de(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t);}},t.prototype._next=function(e){this.scheduleNotification(se.a.createNext(e));},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe();},t.prototype._complete=function(){this.scheduleNotification(se.a.createComplete()),this.unsubscribe();},t;}(h.a),de=function(){return function(e,t){this.time=e,this.notification=t;};}(),fe=r(44);function pe(e,t){return t?function(r){return new ge(r,t).lift(new me(e));}:function(t){return t.lift(new me(e));};}var me=function(){function e(e){this.delayDurationSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new he(e,this.delayDurationSelector));},e;}(),he=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(e),this.removeSubscription(i),this.tryComplete();},t.prototype.notifyError=function(e,t){this._error(e);},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete();},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e);}catch(e){this.destination.error(e);}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe();},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue;},t.prototype.tryDelay=function(e,t){var r=Object(a.a)(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r));},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete();},t;}(i.a),ge=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n;}return n.a(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new ve(e,this.source));},t;}(fe.a),ve=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n;}return n.a(t,e),t.prototype._next=function(e){this.subscribeToSource();},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e);},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource();},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent));},t;}(h.a);function be(){return function(e){return e.lift(new ye());};}var ye=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new _e(e));},e;}(),_e=function(e){function t(t){return e.call(this,t)||this;}return n.a(t,e),t.prototype._next=function(e){e.observe(this.destination);},t;}(h.a);function Se(e,t){return function(r){return r.lift(new Oe(e,t));};}var Oe=function(){function e(e,t){this.keySelector=e,this.flushes=t;}return e.prototype.call=function(e,t){return t.subscribe(new xe(e,this.keySelector,this.flushes));},e;}(),xe=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=r,i.values=new Set(),n&&i.add(Object(a.a)(i,n)),i;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.values.clear();},t.prototype.notifyError=function(e,t){this._error(e);},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e);},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e);}catch(e){return void r.error(e);}this._finalizeNext(t,e);},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t));},t;}(i.a);function Ce(e,t){return function(r){return r.lift(new we(e,t));};}var we=function(){function e(e,t){this.compare=e,this.keySelector=t;}return e.prototype.call=function(e,t){return t.subscribe(new Pe(e,this.compare,this.keySelector));},e;}(),Pe=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=n,i.hasKey=!1,\"function\"==typeof r&&(i.compare=r),i;}return n.a(t,e),t.prototype.compare=function(e,t){return e===t;},t.prototype._next=function(e){var t;try{var r=this.keySelector;t=r?r(e):e;}catch(e){return this.destination.error(e);}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t);}catch(e){return this.destination.error(e);}else this.hasKey=!0;n||(this.key=t,this.destination.next(e));},t;}(h.a);function je(e,t){return Ce(function(r,n){return t?t(r[e],n[e]):r[e]===n[e];});}var Ee=r(214),Ae=r(169),Te=r(220);function De(e){return void 0===e&&(e=ke),function(t){return t.lift(new Ie(e));};}var Ie=function(){function e(e){this.errorFactory=e;}return e.prototype.call=function(e,t){return t.subscribe(new Me(e,this.errorFactory));},e;}(),Me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n;}return n.a(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e);},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory();}catch(t){e=t;}this.destination.error(e);},t;}(h.a);function ke(){return new Te.a();}var Be=r(292);function Ve(e,t){if(e<0)throw new Ee.a();var r=arguments.length>=2;return function(n){return n.pipe(Object(Ae.a)(function(t,r){return r===e;}),Object(Be.a)(1),r?ne(t):De(function(){return new Ee.a();}));};}var Re=r(254);function Le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object(G.a)(t,Re.a.apply(void 0,e));};}function Ne(e,t){return function(r){return r.lift(new Fe(e,t,r));};}var Fe=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r;}return e.prototype.call=function(e,t){return t.subscribe(new Ue(e,this.predicate,this.thisArg,this.source));},e;}(),Ue=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a.predicate=r,a.thisArg=n,a.source=i,a.index=0,a.thisArg=n||a,a;}return n.a(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete();},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source);}catch(e){return void this.destination.error(e);}t||this.notifyComplete(!1);},t.prototype._complete=function(){this.notifyComplete(!0);},t;}(h.a);function ze(){return function(e){return e.lift(new He());};}var He=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Ge(e));},e;}(),Ge=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r;}return n.a(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(a.a)(this,e)));},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete();},t.prototype.notifyComplete=function(e){this.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},t;}(i.a),qe=r(116);function We(e,t){return t?function(r){return r.pipe(We(function(r,n){return Object(z.a)(e(r,n)).pipe(Object(qe.a)(function(e,i){return t(r,e,n,i);}));}));}:function(t){return t.lift(new Qe(e));};}var Qe=function(){function e(e){this.project=e;}return e.prototype.call=function(e,t){return t.subscribe(new Ye(e,this.project));},e;}(),Ye=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n;}return n.a(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e);},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r);}catch(e){return void this.destination.error(e);}this.hasSubscription=!0,this._innerSub(t,e,r);},t.prototype._innerSub=function(e,t,r){var n=new B.a(this,t,r),i=this.destination;i.add(n);var o=Object(a.a)(this,e,void 0,void 0,n);o!==n&&i.add(o);},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe();},t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t);},t.prototype.notifyError=function(e){this.destination.error(e);},t.prototype.notifyComplete=function(e){this.destination.remove(e),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},t;}(i.a);function Xe(e,t,r){return void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=void 0),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(n){return n.lift(new Ke(e,t,r));};}var Ke=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r;}return e.prototype.call=function(e,t){return t.subscribe(new Ze(e,this.project,this.concurrent,this.scheduler));},e;}(),Ze=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a.project=r,a.concurrent=n,a.scheduler=i,a.index=0,a.active=0,a.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(a.buffer=[]),a;}return n.a(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,i=e.index;t.subscribeToProjection(r,n,i);},t.prototype._next=function(e){var r=this.destination;if(r.closed)this._complete();else{var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var i=(0,this.project)(e,n);if(this.scheduler){var a={subscriber:this,result:i,value:e,index:n};this.destination.add(this.scheduler.schedule(t.dispatch,0,a));}else this.subscribeToProjection(i,e,n);}catch(e){r.error(e);}}else this.buffer.push(e);}},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(Object(a.a)(this,e,t,r));},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe();},t.prototype.notifyNext=function(e,t,r,n,i){this._next(t);},t.prototype.notifyComplete=function(e){var t=this.buffer;this.destination.remove(e),this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete();},t;}(i.a);function Je(e){return function(t){return t.lift(new $e(e));};}var $e=function(){function e(e){this.callback=e;}return e.prototype.call=function(e,t){return t.subscribe(new et(e,this.callback));},e;}(),et=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new E.a(r)),n;}return n.a(t,e),t;}(h.a);function tt(e,t){if(\"function\"!=typeof e)throw new TypeError(\"predicate is not a function\");return function(r){return r.lift(new rt(e,r,!1,t));};}var rt=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n;}return e.prototype.call=function(e,t){return t.subscribe(new nt(e,this.predicate,this.source,this.yieldIndex,this.thisArg));},e;}(),nt=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.yieldIndex=i,o.thisArg=a,o.index=0,o;}return n.a(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe();},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e);}catch(e){this.destination.error(e);}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0);},t;}(h.a);function it(e,t){return function(r){return r.lift(new rt(e,r,!0,t));};}var at=r(181);function ot(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Object(Ae.a)(function(t,r){return e(t,r,n);}):at.a,Object(Be.a)(1),r?ne(t):De(function(){return new Te.a();}));};}var st=r(336);function ut(){return function(e){return e.lift(new ct());};}var ct=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new lt(e));},e;}(),lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.a(t,e),t.prototype._next=function(e){},t;}(h.a);function dt(){return function(e){return e.lift(new ft());};}var ft=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new pt(e));},e;}(),pt=function(e){function t(t){return e.call(this,t)||this;}return n.a(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete();},t.prototype._next=function(e){this.notifyComplete(!1);},t.prototype._complete=function(){this.notifyComplete(!0);},t;}(h.a),mt=r(133);function ht(e){return function(t){return 0===e?Object(mt.b)():t.lift(new gt(e));};}var gt=function(){function e(e){if(this.total=e,this.total<0)throw new Ee.a();}return e.prototype.call=function(e,t){return t.subscribe(new vt(e,this.total));},e;}(),vt=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=new Array(),n.count=0,n;}return n.a(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e;},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i<r;i++){var a=t++%r;e.next(n[a]);}e.complete();},t;}(h.a);function bt(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Object(Ae.a)(function(t,r){return e(t,r,n);}):at.a,ht(1),r?ne(t):De(function(){return new Te.a();}));};}function yt(e){return function(t){return t.lift(new _t(e));};}var _t=function(){function e(e){this.value=e;}return e.prototype.call=function(e,t){return t.subscribe(new St(e,this.value));},e;}(),St=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n;}return n.a(t,e),t.prototype._next=function(e){this.destination.next(this.value);},t;}(h.a);function Ot(){return function(e){return e.lift(new xt());};}var xt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Ct(e));},e;}(),Ct=function(e){function t(t){return e.call(this,t)||this;}return n.a(t,e),t.prototype._next=function(e){this.destination.next(se.a.createNext(e));},t.prototype._error=function(e){var t=this.destination;t.next(se.a.createError(e)),t.complete();},t.prototype._complete=function(){var e=this.destination;e.next(se.a.createComplete()),e.complete();},t;}(h.a);function wt(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new Pt(e,t,r));};}var Pt=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r;}return e.prototype.call=function(e,t){return t.subscribe(new jt(e,this.accumulator,this.seed,this.hasSeed));},e;}(),jt=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a.accumulator=r,a._seed=n,a.hasSeed=i,a.index=0,a;}return n.a(t,e),Object.defineProperty(t.prototype,\"seed\",{get:function get(){return this._seed;},set:function set(e){this.hasSeed=!0,this._seed=e;},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e);},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r);}catch(e){this.destination.error(e);}this.seed=t,this.destination.next(t);},t;}(h.a),Et=r(272);function At(e,t){return arguments.length>=2?function(r){return Object(Et.a)(wt(e,t),ht(1),ne(t))(r);}:function(t){return Object(Et.a)(wt(function(t,r,n){return e(t,r,n+1);}),ht(1))(t);};}function Tt(e){return At(\"function\"==typeof e?function(t,r){return e(t,r)>0?t:r;}:function(e,t){return e>t?e:t;});}var Dt=r(235);function It(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(Dt.a.apply(void 0,[t].concat(e)));};}var Mt=r(291);function kt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),\"function\"==typeof t?Object(Q.a)(function(){return e;},t,r):(\"number\"==typeof t&&(r=t),Object(Q.a)(function(){return e;},r));}function Bt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(n){return n.lift(new Vt(e,t,r));};}var Vt=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r;}return e.prototype.call=function(e,t){return t.subscribe(new Rt(e,this.accumulator,this.seed,this.concurrent));},e;}(),Rt=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a.accumulator=r,a.acc=n,a.concurrent=i,a.hasValue=!1,a.hasCompleted=!1,a.buffer=[],a.active=0,a.index=0,a;}return n.a(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t);}catch(e){return r.error(e);}this.active++,this._innerSub(n,e,t);}else this.buffer.push(e);},t.prototype._innerSub=function(e,t,r){var n=new B.a(this,t,r),i=this.destination;i.add(n);var o=Object(a.a)(this,e,void 0,void 0,n);o!==n&&i.add(o);},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe();},t.prototype.notifyNext=function(e,t,r,n,i){var a=this.destination;this.acc=t,this.hasValue=!0,a.next(t);},t.prototype.notifyComplete=function(e){var t=this.buffer;this.destination.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete());},t;}(i.a);function Lt(e){return At(\"function\"==typeof e?function(t,r){return e(t,r)<0?t:r;}:function(e,t){return e<t?e:t;});}var Nt=r(346);function Ft(e,t){return function(r){var n;if(n=\"function\"==typeof e?e:function(){return e;},\"function\"==typeof t)return r.lift(new Ut(n,t));var i=Object.create(r,Nt.b);return i.source=r,i.subjectFactory=n,i;};}var Ut=function(){function e(e,t){this.subjectFactory=e,this.selector=t;}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(e);return i.add(t.subscribe(n)),i;},e;}(),zt=r(347);function Ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&Object(U.a)(e[0])&&(e=e[0]),function(t){return t.lift(new Gt(e));};}var Gt=function(){function e(e){this.nextSources=e;}return e.prototype.call=function(e,t){return t.subscribe(new qt(e,this.nextSources));},e;}(),qt=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n;}return n.a(t,e),t.prototype.notifyError=function(e,t){this.subscribeToNextSource();},t.prototype.notifyComplete=function(e){this.subscribeToNextSource();},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe();},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe();},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new B.a(this,void 0,void 0),r=this.destination;r.add(t);var n=Object(a.a)(this,e,void 0,void 0,t);n!==t&&r.add(n);}else this.destination.complete();},t;}(i.a);function Wt(){return function(e){return e.lift(new Qt());};}var Qt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Yt(e));},e;}(),Yt=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r;}return n.a(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t);},t;}(h.a),Xt=r(378);function Kt(e,t){return function(r){return[Object(Ae.a)(e,t)(r),Object(Ae.a)(Object(Xt.a)(e,t))(r)];};}function Zt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error(\"list of properties cannot be empty.\");return function(t){return Object(qe.a)(Jt(e,r))(t);};}function Jt(e,t){return function(r){for(var n=r,i=0;i<t;i++){var a=n[e[i]];if(void 0===a)return;n=a;}return n;};}var $t=r(60);function er(e){return e?Ft(function(){return new $t.a();},e):Ft(new $t.a());}var tr=r(278);function rr(e){return function(t){return Ft(new tr.a(e))(t);};}var nr=r(226);function ir(){return function(e){return Ft(new nr.a())(e);};}var ar=r(296);function or(e,t,r,n){r&&\"function\"!=typeof r&&(n=r);var i=\"function\"==typeof r?r:void 0,a=new ar.a(e,t,n);return function(e){return Ft(function(){return a;},i)(e);};}var sr=r(348);function ur(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&Object(U.a)(e[0])&&(e=e[0]),t.lift.call(sr.a.apply(void 0,[t].concat(e)));};}function cr(e){return void 0===e&&(e=-1),function(t){return 0===e?Object(mt.b)():e<0?t.lift(new lr(-1,t)):t.lift(new lr(e-1,t));};}var lr=function(){function e(e,t){this.count=e,this.source=t;}return e.prototype.call=function(e,t){return t.subscribe(new dr(e,this.count,this.source));},e;}(),dr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.count=r,i.source=n,i;}return n.a(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle());}},t;}(h.a);function fr(e){return function(t){return t.lift(new pr(e));};}var pr=function(){function e(e){this.notifier=e;}return e.prototype.call=function(e,t){return t.subscribe(new mr(e,this.notifier,t));},e;}(),mr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i.sourceIsBeingSubscribedTo=!0,i;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this);},t.prototype.notifyComplete=function(t){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this);},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next();}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=null),t&&(t.unsubscribe(),this.retriesSubscription=null),this.retries=null;},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this;},t.prototype.subscribeToRetries=function(){var t;this.notifications=new $t.a();try{t=(0,this.notifier)(this.notifications);}catch(t){return e.prototype.complete.call(this);}this.retries=t,this.retriesSubscription=Object(a.a)(this,t);},t;}(i.a);function hr(e){return void 0===e&&(e=-1),function(t){return t.lift(new gr(e,t));};}var gr=function(){function e(e,t){this.count=e,this.source=t;}return e.prototype.call=function(e,t){return t.subscribe(new vr(e,this.count,this.source));},e;}(),vr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.count=r,i.source=n,i;}return n.a(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle());}},t;}(h.a);function br(e){return function(t){return t.lift(new yr(e,t));};}var yr=function(){function e(e,t){this.notifier=e,this.source=t;}return e.prototype.call=function(e,t){return t.subscribe(new _r(e,this.notifier,this.source));},e;}(),_r=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i;}return n.a(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,i=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{r=new $t.a();try{n=(0,this.notifier)(r);}catch(t){return e.prototype.error.call(this,t);}i=Object(a.a)(this,n);}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=i,r.next(t);}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=null),t&&(t.unsubscribe(),this.retriesSubscription=null),this.retries=null;},t.prototype.notifyNext=function(e,t,r,n,i){var a=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=a,this.source.subscribe(this);},t;}(i.a),Sr=r(295);function Or(e){return function(t){return t.lift(new xr(e));};}var xr=function(){function e(e){this.notifier=e;}return e.prototype.call=function(e,t){var r=new Cr(e),n=t.subscribe(r);return n.add(Object(a.a)(r,this.notifier)),n;},e;}(),Cr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t;}return n.a(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0;},t.prototype.notifyNext=function(e,t,r,n,i){this.emitValue();},t.prototype.notifyComplete=function(){this.emitValue();},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value));},t;}(i.a);function wr(e,t){return void 0===t&&(t=c.a),function(r){return r.lift(new Pr(e,t));};}var Pr=function(){function e(e,t){this.period=e,this.scheduler=t;}return e.prototype.call=function(e,t){return t.subscribe(new jr(e,this.period,this.scheduler));},e;}(),jr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(Er,r,{subscriber:i,period:r})),i;}return n.a(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0;},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue));},t;}(h.a);function Er(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r);}function Ar(e,t){return function(r){return r.lift(new Tr(e,t));};}var Tr=function(){function e(e,t){this.compareTo=e,this.comparator=t;}return e.prototype.call=function(e,t){return t.subscribe(new Dr(e,this.compareTo,this.comparator));},e;}(),Dr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.compareTo=r,i.comparator=n,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(r.subscribe(new Ir(t,i))),i;}return n.a(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues());},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe();},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),i=t.shift(),a=!1;try{a=r?r(n,i):n===i;}catch(e){this.destination.error(e);}a||this.emit(!1);}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete();},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues());},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0;},t;}(h.a),Ir=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n;}return n.a(t,e),t.prototype._next=function(e){this.parent.nextB(e);},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe();},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe();},t;}(h.a);function Mr(){return new $t.a();}function kr(){return function(e){return Object(Sr.a)()(Ft(Mr)(e));};}function Br(e,t,r){var n;return n=e&&\"object\"==typeof_default()(e)?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){return e.lift(function(e){var t,r,n=e.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,a=e.windowTime,o=void 0===a?Number.POSITIVE_INFINITY:a,s=e.refCount,u=e.scheduler,c=0,l=!1,d=!1;return function(e){c++,t&&!l||(l=!1,t=new ar.a(i,o,u),r=e.subscribe({next:function next(e){t.next(e);},error:function error(e){l=!0,t.error(e);},complete:function complete(){d=!0,r=void 0,t.complete();}}));var n=t.subscribe(this);this.add(function(){c--,n.unsubscribe(),r&&!d&&s&&0===c&&(r.unsubscribe(),r=void 0,t=void 0);});};}(n));};}function Vr(e){return function(t){return t.lift(new Rr(e,t));};}var Rr=function(){function e(e,t){this.predicate=e,this.source=t;}return e.prototype.call=function(e,t){return t.subscribe(new Lr(e,this.predicate,this.source));},e;}(),Lr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i;}return n.a(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error(\"Sequence contains more than one element\"):(this.seenValue=!0,this.singleValue=e);},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e);},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e);}catch(e){this.destination.error(e);}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new Te.a());},t;}(h.a);function Nr(e){return function(t){return t.lift(new Fr(e));};}var Fr=function(){function e(e){this.total=e;}return e.prototype.call=function(e,t){return t.subscribe(new Ur(e,this.total));},e;}(),Ur=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n;}return n.a(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e);},t;}(h.a);function zr(e){return function(t){return t.lift(new Hr(e));};}var Hr=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new Ee.a();}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new h.a(e)):t.subscribe(new Gr(e,this._skipCount));},e;}(),Gr=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=new Array(r),n;}return n.a(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,i=this._ring,a=i[n];i[n]=e,this.destination.next(a);}},t;}(h.a);function qr(e){return function(t){return t.lift(new Wr(e));};}var Wr=function(){function e(e){this.notifier=e;}return e.prototype.call=function(e,t){return t.subscribe(new Qr(e,this.notifier));},e;}(),Qr=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var i=new B.a(n,void 0,void 0);n.add(i),n.innerSubscription=i;var o=Object(a.a)(n,r,void 0,void 0,i);return o!==i&&(n.add(o),n.innerSubscription=o),n;}return n.a(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t);},t.prototype.notifyNext=function(e,t,r,n,i){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe();},t.prototype.notifyComplete=function(){},t;}(i.a);function Yr(e){return function(t){return t.lift(new Xr(e));};}var Xr=function(){function e(e){this.predicate=e;}return e.prototype.call=function(e,t){return t.subscribe(new Kr(e,this.predicate));},e;}(),Kr=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n;}return n.a(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e);},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t);}catch(e){this.destination.error(e);}},t;}(h.a);function Zr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return Object(_.a)(r)?(e.pop(),function(t){return Object(G.a)(e,t,r);}):function(t){return Object(G.a)(e,t);};}var Jr=r(311),$r=r(231),en=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=Jr.a);var i=e.call(this)||this;return i.source=t,i.delayTime=r,i.scheduler=n,(!Object($r.a)(r)||r<0)&&(i.delayTime=0),n&&\"function\"==typeof n.schedule||(i.scheduler=Jr.a),i;}return n.a(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=Jr.a),new t(e,r,n);},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r));},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e});},t;}(fe.a);function tn(e,t){return void 0===t&&(t=0),function(r){return r.lift(new rn(e,t));};}var rn=function(){function e(e,t){this.scheduler=e,this.delay=t;}return e.prototype.call=function(e,t){return new en(t,this.delay,this.scheduler).subscribe(e);},e;}();function nn(e,t){return\"function\"==typeof t?function(r){return r.pipe(nn(function(r,n){return Object(z.a)(e(r,n)).pipe(Object(qe.a)(function(e,i){return t(r,e,n,i);}));}));}:function(t){return t.lift(new an(e));};}var an=function(){function e(e){this.project=e;}return e.prototype.call=function(e,t){return t.subscribe(new on(e,this.project));},e;}(),on=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n;}return n.a(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r);}catch(e){return void this.destination.error(e);}this._innerSub(t,e,r);},t.prototype._innerSub=function(e,t,r){var n=this.innerSubscription;n&&n.unsubscribe();var i=new B.a(this,t,r),o=this.destination;o.add(i),this.innerSubscription=Object(a.a)(this,e,void 0,void 0,i),this.innerSubscription!==i&&o.add(this.innerSubscription);},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe();},t.prototype._unsubscribe=function(){this.innerSubscription=null;},t.prototype.notifyComplete=function(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this);},t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t);},t;}(i.a);function sn(){return nn(at.a);}function un(e,t){return t?nn(function(){return e;},t):nn(function(){return e;});}function cn(e){return function(t){return t.lift(new ln(e));};}var ln=function(){function e(e){this.notifier=e;}return e.prototype.call=function(e,t){var r=new dn(e),n=Object(a.a)(r,this.notifier);return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r;},e;}(),dn=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.seenValue=!0,this.complete();},t.prototype.notifyComplete=function(){},t;}(i.a);function fn(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new pn(e,t));};}var pn=function(){function e(e,t){this.predicate=e,this.inclusive=t;}return e.prototype.call=function(e,t){return t.subscribe(new mn(e,this.predicate,this.inclusive));},e;}(),mn=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.inclusive=n,i.index=0,i;}return n.a(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++);}catch(e){return void r.error(e);}this.nextOrComplete(e,t);},t.prototype.nextOrComplete=function(e,t){var r=this.destination;Boolean(t)?r.next(e):(this.inclusive&&r.next(e),r.complete());},t;}(h.a),hn=r(199),gn=r(215);function vn(e,t,r){return function(n){return n.lift(new bn(e,t,r));};}var bn=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r;}return e.prototype.call=function(e,t){return t.subscribe(new yn(e,this.nextOrObserver,this.error,this.complete));},e;}(),yn=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a._tapNext=hn.a,a._tapError=hn.a,a._tapComplete=hn.a,a._tapError=n||hn.a,a._tapComplete=i||hn.a,Object(gn.a)(r)?(a._context=a,a._tapNext=r):r&&(a._context=r,a._tapNext=r.next||hn.a,a._tapError=r.error||hn.a,a._tapComplete=r.complete||hn.a),a;}return n.a(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e);}catch(e){return void this.destination.error(e);}this.destination.next(e);},t.prototype._error=function(e){try{this._tapError.call(this._context,e);}catch(e){return void this.destination.error(e);}this.destination.error(e);},t.prototype._complete=function(){try{this._tapComplete.call(this._context);}catch(e){return void this.destination.error(e);}return this.destination.complete();},t;}(h.a),_n={leading:!0,trailing:!1};function Sn(e,t){return void 0===t&&(t=_n),function(r){return r.lift(new On(e,t.leading,t.trailing));};}var On=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r;}return e.prototype.call=function(e,t){return t.subscribe(new xn(e,this.durationSelector,this.leading,this.trailing));},e;}(),xn=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a.destination=t,a.durationSelector=r,a._leading=n,a._trailing=i,a._hasValue=!1,a;}return n.a(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e));},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=null;},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=Object(a.a)(this,t));},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e);}catch(e){return this.destination.error(e),null;}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=null,t&&this.send();},t.prototype.notifyNext=function(e,t,r,n,i){this.throttlingDone();},t.prototype.notifyComplete=function(){this.throttlingDone();},t;}(i.a);function Cn(e,t,r){return void 0===t&&(t=c.a),void 0===r&&(r=_n),function(n){return n.lift(new wn(e,t,r.leading,r.trailing));};}var wn=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n;}return e.prototype.call=function(e,t){return t.subscribe(new Pn(e,this.duration,this.scheduler,this.leading,this.trailing));},e;}(),Pn=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;return o.duration=r,o.scheduler=n,o.leading=i,o.trailing=a,o._hasTrailingValue=!1,o._trailingValue=null,o;}return n.a(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jn,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0));},t.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete();},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null);},t;}(h.a);function jn(e){e.subscriber.clearThrottle();}var En=r(297);function An(e){return void 0===e&&(e=c.a),function(t){return Object(En.a)(function(){return t.pipe(wt(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n};},{current:e.now(),value:void 0,last:void 0}),Object(qe.a)(function(e){var t=e.current,r=e.last,n=e.value;return new Tn(n,t-r);}));});};}var Tn=function(){return function(e,t){this.value=e,this.interval=t;};}(),Dn=r(349);function In(e,t,r){return void 0===r&&(r=c.a),function(n){var i=oe(e),a=i?+e-r.now():Math.abs(e);return n.lift(new Mn(a,i,t,r));};}var Mn=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n;}return e.prototype.call=function(e,t){return t.subscribe(new kn(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler));},e;}(),kn=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;return o.absoluteTimeout=r,o.waitFor=n,o.withObservable=i,o.scheduler=a,o.action=null,o.scheduleTimeout(),o;}return n.a(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(Object(a.a)(e,t));},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this));},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t);},t.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null;},t;}(i.a),Bn=r(294);function Vn(e,t){return void 0===t&&(t=c.a),In(e,Object(Bn.a)(new Dn.a()),t);}function Rn(e){return void 0===e&&(e=c.a),Object(qe.a)(function(t){return new Ln(t,e.now());});}var Ln=function(){return function(e,t){this.value=e,this.timestamp=t;};}();function Nn(e,t,r){return 0===r?[t]:(e.push(t),e);}function Fn(){return At(Nn,[]);}function Un(e){return function(t){return t.lift(new zn(e));};}var zn=function(){function e(e){this.windowBoundaries=e;}return e.prototype.call=function(e,t){var r=new Hn(e),n=t.subscribe(r);return n.closed||r.add(Object(a.a)(r,this.windowBoundaries)),n;},e;}(),Hn=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new $t.a(),t.next(r.window),r;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.openWindow();},t.prototype.notifyError=function(e,t){this._error(e);},t.prototype.notifyComplete=function(e){this._complete();},t.prototype._next=function(e){this.window.next(e);},t.prototype._error=function(e){this.window.error(e),this.destination.error(e);},t.prototype._complete=function(){this.window.complete(),this.destination.complete();},t.prototype._unsubscribe=function(){this.window=null;},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new $t.a();t.next(r);},t;}(i.a);function Gn(e,t){return void 0===t&&(t=0),function(r){return r.lift(new qn(e,t));};}var qn=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t;}return e.prototype.call=function(e,t){return t.subscribe(new Wn(e,this.windowSize,this.startWindowEvery));},e;}(),Wn=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.destination=t,i.windowSize=r,i.startWindowEvery=n,i.windows=[new $t.a()],i.count=0,t.next(i.windows[0]),i;}return n.a(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,i=this.windows,a=i.length,o=0;o<a&&!this.closed;o++)i[o].next(e);var s=this.count-n+1;if(s>=0&&s%t==0&&!this.closed&&i.shift().complete(),++this.count%t==0&&!this.closed){var u=new $t.a();i.push(u),r.next(u);}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e);},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete();},t.prototype._unsubscribe=function(){this.count=0,this.windows=null;},t;}(h.a);function Qn(e){var t=c.a,r=null,n=Number.POSITIVE_INFINITY;return Object(_.a)(arguments[3])&&(t=arguments[3]),Object(_.a)(arguments[2])?t=arguments[2]:Object($r.a)(arguments[2])&&(n=arguments[2]),Object(_.a)(arguments[1])?t=arguments[1]:Object($r.a)(arguments[1])&&(r=arguments[1]),function(i){return i.lift(new Yn(e,r,n,t));};}var Yn=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n;}return e.prototype.call=function(e,t){return t.subscribe(new Kn(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler));},e;}(),Xn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t;}return n.a(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t);},Object.defineProperty(t.prototype,\"numberOfNextedValues\",{get:function get(){return this._numberOfNextedValues;},enumerable:!0,configurable:!0}),t;}($t.a),Kn=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;o.destination=t,o.windowTimeSpan=r,o.windowCreationInterval=n,o.maxWindowSize=i,o.scheduler=a,o.windows=[];var s=o.openWindow();if(null!==n&&n>=0){var u={subscriber:o,window:s,context:null},c={windowTimeSpan:r,windowCreationInterval:n,subscriber:o,scheduler:a};o.add(a.schedule($n,r,u)),o.add(a.schedule(Jn,n,c));}else{var l={subscriber:o,window:s,windowTimeSpan:r};o.add(a.schedule(Zn,r,l));}return o;}return n.a(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var i=t[n];i.closed||(i.next(e),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i));}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e);},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete();}this.destination.complete();},t.prototype.openWindow=function(){var e=new Xn();return this.windows.push(e),this.destination.next(e),e;},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1);},t;}(h.a);function Zn(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r);}function Jn(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,i=e.windowCreationInterval,a=r.openWindow(),o={action:this,subscription:null},s={subscriber:r,window:a,context:o};o.subscription=n.schedule($n,t,s),this.add(o.subscription),this.schedule(e,i);}function $n(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r);}function ei(e,t){return function(r){return r.lift(new ti(e,t));};}var ti=function(){function e(e,t){this.openings=e,this.closingSelector=t;}return e.prototype.call=function(e,t){return t.subscribe(new ri(e,this.openings,this.closingSelector));},e;}(),ri=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(i.openSubscription=Object(a.a)(i,r,r)),i;}return n.a(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e);},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var a=r[i];a.window.error(t),a.subscription.unsubscribe();}e.prototype._error.call(this,t);},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var i=t[n];i.window.complete(),i.subscription.unsubscribe();}e.prototype._complete.call(this);},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe();}},t.prototype.notifyNext=function(e,t,r,n,i){if(e===this.openings){var o=void 0;try{o=(0,this.closingSelector)(t);}catch(e){return this.error(e);}var s=new $t.a(),u=new E.a(),c={window:s,subscription:u};this.contexts.push(c);var l=Object(a.a)(this,o,c);l.closed?this.closeWindow(this.contexts.length-1):(l.context=c,u.add(l)),this.destination.next(s);}else this.closeWindow(this.contexts.indexOf(e));},t.prototype.notifyError=function(e){this.error(e);},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context));},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,i=r.subscription;t.splice(e,1),n.complete(),i.unsubscribe();}},t;}(i.a);function ni(e){return function(t){return t.lift(new ii(e));};}var ii=function(){function e(e){this.closingSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new ai(e,this.closingSelector));},e;}(),ai=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.openWindow(i);},t.prototype.notifyError=function(e,t){this._error(e);},t.prototype.notifyComplete=function(e){this.openWindow(e);},t.prototype._next=function(e){this.window.next(e);},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification();},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification();},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe();},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var r,n=this.window=new $t.a();this.destination.next(n);try{r=(0,this.closingSelector)();}catch(e){return this.destination.error(e),void this.window.error(e);}this.add(this.closingNotification=Object(a.a)(this,r));},t;}(i.a);function oi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;\"function\"==typeof e[e.length-1]&&(r=e.pop());var n=e;return t.lift(new si(n,r));};}var si=function(){function e(e,t){this.observables=e,this.project=t;}return e.prototype.call=function(e,t){return t.subscribe(new ui(e,this.observables,this.project));},e;}(),ui=function(e){function t(t,r,n){var i=e.call(this,t)||this;i.observables=r,i.project=n,i.toRespond=[];var o=r.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var u=r[s];i.add(Object(a.a)(i,u,u,s));}return i;}return n.a(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.values[r]=t;var a=this.toRespond;if(a.length>0){var o=a.indexOf(r);-1!==o&&a.splice(o,1);}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t);}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e);}catch(e){return void this.destination.error(e);}this.destination.next(t);},t;}(i.a),ci=r(298);function li(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(ci.b.apply(void 0,[t].concat(e)));};}function di(e){return function(t){return t.lift(new ci.a(e));};}},function(e,t,r){\"use strict\";var n,i=r(0),a=r(6),o=r(9),s=r(11),u=r(1),c=r(16),l=r(243),d=r(166),f=r(112),p=r(37),m=r(113),h=r(168);function g(e,t,r,n,i,a){var o=e.spacegroup,c=e.ncsOperators,l=[],d=o.cell.toFractional,f=u.Vec3.transformMat4(Object(u.Vec3)(),a,d),p=s.e.getSymmetryOperatorRef(o,t,r,n,i,f);if(c&&c.length)for(var m=0,h=c.length;m<h;++m){var g=c[m],v=u.Mat4.mul(Object(u.Mat4)(),p.matrix,g.matrix),b=s.h.create(p.name+\" \"+g.name,v,{assembly:p.assembly,ncsId:g.ncsId,hkl:p.hkl,spgrOp:p.spgrOp});l.push(b);}else l.push(p);return l;}function v(e,t,r,n){var i=e.spacegroup,a=e.ncsOperators,o=a&&a.length||0,c=[];!o&&t[0]<=0&&r[0]>=0&&t[1]<=0&&r[1]>=0&&t[2]<=0&&r[2]>=0&&(c[0]=s.e.getSymmetryOperator(i,0,0,0,0));for(var l=i.cell.toFractional,d=u.Vec3.transformMat4(Object(u.Vec3)(),n,l),f=0;f<i.operators.length;f++)for(var p=t[0];p<=r[0];p++)for(var m=t[1];m<=r[1];m++)for(var h=t[2];h<=r[2];h++)(o||0!==f||0!==p||0!==m||0!==h)&&c.push.apply(c,g(e,f,p,m,h,d));return c;}function b(e,t){for(var r=f.a.Builder({label:e.label}),n=e.units,i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,u=n;s<u.length;s++){var c=u[s];r.addWithOperator(c,o);}return r.getStructure();}!function(e){function t(e,t){return e.invariantId===t.invariantId&&e.model.id===t.model.id&&a.SortedArray.areEqual(e.elements,t.elements);}function r(){return Object(o.b)(p.a.hashUnit,t);}e.buildAssembly=function(e,t){var r=this;return c.b.create(\"Build Assembly\",function(n){return Object(i.__awaiter)(r,void 0,void 0,function(){var r,n,a,o,c,p,m,h,g,v,b,y,_,S,O,x;return Object(i.__generator)(this,function(i){if(1!==(r=e.models).length)throw new Error(\"Can only build assemblies from structures based on 1 model.\");if(!(n=l.Symmetry.findAssembly(r[0],t)))throw new Error(\"Assembly '\"+t+\"' is not defined.\");for(a=s.h.create(n.id,u.Mat4.identity(),{assembly:{id:n.id,operId:0,operList:[]}}),o=f.a.Builder({coordinateSystem:a,label:e.label}),c=new d.b(e),p=0,m=n.operatorGroups;p<m.length;p++)if(h=m[p],g=h.selector(c),0!==d.d.structureCount(g))for(v=d.d.unionStructure(g).units,b=0,y=h.operators;b<y.length;b++)for(_=y[b],S=0,O=v;S<O.length;S++)x=O[S],o.addWithOperator(x,_);return[2,o.getStructure()];});});});},e.buildSymmetryAssembly=function(e,t,r){var n=this;return c.b.create(\"Build Symmetry Assembly\",function(a){return Object(i.__awaiter)(n,void 0,void 0,function(){var n,a,o,c,l,p,m,v,b,y,_,S,O,x,C,w,P,j,E,A,T,D,I,M,k;return Object(i.__generator)(this,function(i){if(1!==(n=e.models).length)throw new Error(\"Can only build symmetry assemblies from structures based on 1 model.\");for(a=Object(u.Vec3)(),o=f.a.Builder({label:e.label,representativeModel:n[0]}),c=new d.b(e),l=0,p=t;l<p.length;l++)if(m=p[l],B=m.asymIds,v=d.a.generators.atoms({chainTest:d.a.pred.and(d.a.pred.eq(function(e){return h.a.unit.operator_name(e.element);},s.h.DefaultName),d.a.pred.inSet(function(e){return h.a.chain.label_asym_id(e.element);},B))}),b=v(c),0!==d.d.structureCount(b))for(y=d.d.unionStructure(b).units,_=0,S=m.operators;_<S.length;_++)for(O=S[_],x=O.index,C=O.shift,w=C[0],P=C[1],j=C[2],E=g(r,x,w,P,j,a),A=0,T=y;A<T.length;A++)for(D=T[A],I=0,M=E;I<M.length;I++)k=M[I],o.addWithOperator(D,k);var B;return[2,o.getStructure()];});});});},e.builderSymmetryMates=function(e,t){return c.b.create(\"Find Symmetry Mates\",function(r){return function(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){function n(e,t){return e.invariantId+\"|\"+t.name;}var a,o,c,d,p,h,g,b,y,_,S,O,x,C,w,P,j,E,A,T,D;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(1!==(a=t.models).length)throw new Error(\"Can only build symmetries from structures based on 1 model.\");return(o=m.a.Provider.get(a[0]))?(c=o.spacegroup,s.f.isZero(c.cell)?[2,t]:e.shouldUpdate?[4,e.update(\"Initialing...\")]:[3,2]):[2,t];case 1:i.sent(),i.label=2;case 2:d=l.Model.getCenter(a[0]),p=function(e,t){if(e._operators_333&&u.Vec3.equals(t,e._operators_333.ref))return e._operators_333.operators;return e._operators_333={ref:u.Vec3.clone(t),operators:v(e,u.Vec3.create(-3,-3,-3),u.Vec3.create(3,3,3),t)},e._operators_333.operators;}(o,d),h=t.lookup3d,g=new Set(),b=f.a.Builder({label:t.label}),y=t.units,_=u.Vec3.zero(),S=0,O=p,i.label=3;case 3:if(!(S<O.length))return[3,6];for(x=O[S],C=0,w=y;C<w.length;C++)for(P=w[C],j=P.lookup3d.boundary.sphere,u.Vec3.transformMat4(_,j.center,x.matrix),E=h.findUnitIndices(_[0],_[1],_[2],j.radius+r),A=0,T=E.count;A<T;A++)y[E.indices[A]].lookup3d.check(_[0],_[1],_[2],j.radius+r)&&(D=n(P,x),g.has(D)||(b.addWithOperator(P,x),g.add(D)));return e.shouldUpdate?[4,e.update(\"Building symmetry...\")]:[3,5];case 4:i.sent(),i.label=5;case 5:return S++,[3,3];case 6:return[2,b.getStructure()];}});});}(r,e,t);});},e.buildSymmetryRange=function(e,t,r){return c.b.create(\"Build Symmetry\",function(n){return function(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){var e,a,o,u,c;return Object(i.__generator)(this,function(i){if(1!==(e=t.models).length)throw new Error(\"Can only build symmetries from structures based on 1 model.\");return(a=m.a.Provider.get(e[0]))?(o=a.spacegroup,s.f.isZero(o.cell)?[2,t]:(u=l.Model.getCenter(e[0]),c=v(a,r,n,u),[2,b(t,c)])):[2,t];});});}(0,e,t,r);});},e.buildNcs=function(e){return c.b.create(\"Build NCS\",function(t){return function(e,t){return Object(i.__awaiter)(this,void 0,void 0,function(){var e,r,n;return Object(i.__generator)(this,function(i){if(1!==(e=t.models).length)throw new Error(\"Can only build NCS from structures based on 1 model.\");return(r=m.a.Provider.get(e[0]))&&(n=r.ncsOperators)&&n.length?[2,b(t,n)]:[2,t];});});}(0,e);});},e.areUnitsEquivalent=t,e.UnitEquivalenceBuilder=r,e.computeTransformGroups=function(e){for(var t=r(),n=0,i=e.units;n<i.length;n++){var a=i[n];t.add(a.id,a);}for(var o=[],s=0,u=t.groups;s<u.length;s++){var c=u[s];o.push(p.a.SymmetryGroup(c.map(function(t){return e.unitMap.get(t);})));}return o;},e.areTransformGroupsEquivalent=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;++r){var i=e[r].units,a=t[r].units;if(i.length!==a.length)return!1;if(e[r].hashCode!==t[r].hashCode)return!1;for(var o=0,s=i.length;o<s;o++)if(i[o].conformation!==a[o].conformation)return!1;}return!0;};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(254),i=r(345);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(i.a)()(n.a.apply(void 0,e));}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return y;}),r.d(t,\"a\",function(){return _;}),r.d(t,\"b\",function(){return M;});var n=r(0),i=r(2),a=r(36),o=r(39),s=r(210),u=r(237),c=r(86),l=r(143),d=r(74),f=r(40),p=r(174),m=r(23),h=r(6),g=r(1),v=r(30),b={min:-1,max:1,mean:0,sigma:.1};function y(e,t){var r=t||b,n=r.min,o=r.max,s=r.mean,u=r.sigma,c=(n-s)/u,l=(o-s)/u,d=e;return\"absolute\"===e.kind?e.absoluteValue<n?d=a.b.IsoValue.absolute(n):e.absoluteValue>o&&(d=a.b.IsoValue.absolute(o)):e.relativeValue<c?d=a.b.IsoValue.relative(c):e.relativeValue>l&&(d=a.b.IsoValue.relative(l)),i.ParamDefinition.Conditioned(d,{absolute:i.ParamDefinition.Converted(function(e){return a.b.IsoValue.toAbsolute(e,a.a.One.stats).absoluteValue;},function(e){return a.b.IsoValue.absolute(e);},i.ParamDefinition.Numeric(s,{min:n,max:o,step:Object(p.e)(u/100,2)})),relative:i.ParamDefinition.Converted(function(e){return a.b.IsoValue.toRelative(e,a.a.One.stats).relativeValue;},function(e){return a.b.IsoValue.relative(e);},i.ParamDefinition.Numeric(Math.min(1,l),{min:c,max:l,step:Object(p.e)(Math.round((o-n)/u)/100,2)}))},function(e){return\"absolute\"===e.kind?\"absolute\":\"relative\";},function(e,t){return\"absolute\"===t?a.b.IsoValue.toAbsolute(e,r):a.b.IsoValue.toRelative(e,r);},{isEssential:!0});}var _=y(a.b.IsoValue.relative(2)),S={isoValue:_};function O(e,t){return a.b.Isosurface.Loci(e,t.isoValue);}function x(e,t,r,n){var i=e.objectId,o=e.groupId;return n===i?a.b.Cell.Loci(t,h.Interval.ofSingleton(o)):m.EmptyLoci;}function C(e,t,r,n){var i=!1;if(a.b.isLoci(e)){if(!a.b.areEquivalent(e.volume,t))return!1;n(h.Interval.ofLength(t.grid.cells.data.length))&&(i=!0);}else if(a.b.Isosurface.isLoci(e)){if(!a.b.areEquivalent(e.volume,t))return!1;if(!a.b.IsoValue.areSame(e.isoValue,r.isoValue,t.grid.stats))return!1;n(h.Interval.ofLength(t.grid.cells.data.length))&&(i=!0);}else if(a.b.Cell.isLoci(e)){if(!a.b.areEquivalent(e.volume,t))return!1;h.Interval.is(e.indices)?n(e.indices)&&(i=!0):h.OrderedSet.forEach(e.indices,function(e){n(h.Interval.ofSingleton(e))&&(i=!0);});}return i;}function w(e,t,r,i,u){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,c,l;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return e.runtime.update({message:\"Marching cubes...\"}),r=Object(v.fillSerial)(new Int32Array(t.grid.cells.data.length)),[4,Object(s.b)({isoLevel:a.b.IsoValue.toAbsolute(i.isoValue,t.grid.stats).absoluteValue,scalarField:t.grid.cells,idField:g.Tensor.create(t.grid.cells.space,g.Tensor.Data1(r))},u).runAsChild(e.runtime)];case 1:return c=n.sent(),l=a.a.getGridToCartesianTransform(t.grid),e.runtime.update({message:\"Transforming mesh...\"}),o.a.transform(c,l),[2,c];}});});}var P=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},o.a.Params),{quality:Object(n.__assign)(Object(n.__assign)({},o.a.Params.quality),{isEssential:!1})}),S);function j(e){return Object(u.c)({defaultProps:i.ParamDefinition.getDefaultValues(P),createGeometry:w,createLocationIterator:function createLocationIterator(e){return Object(c.a)(e.grid.cells.data.length,1,function(){return l.b;});},getLoci:x,eachLocation:C,setUpdateState:function setUpdateState(e,t,r,n){a.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||(e.createGeometry=!0);},geometryUtils:o.a.Utils},e);}function E(e,t,r,i,o){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return e.runtime.update({message:\"Marching cubes...\"}),r=Object(v.fillSerial)(new Int32Array(t.grid.cells.data.length)),[4,Object(s.a)({isoLevel:a.b.IsoValue.toAbsolute(i.isoValue,t.grid.stats).absoluteValue,scalarField:t.grid.cells,idField:g.Tensor.create(t.grid.cells.space,g.Tensor.Data1(r))},o).runAsChild(e.runtime)];case 1:return u=n.sent(),c=a.a.getGridToCartesianTransform(t.grid),d.a.transform(u,c),[2,u];}});});}var A=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},d.a.Params),{quality:Object(n.__assign)(Object(n.__assign)({},d.a.Params.quality),{isEssential:!1}),sizeFactor:i.ParamDefinition.Numeric(1.5,{min:0,max:10,step:.1})}),S);function T(e){return Object(u.c)({defaultProps:i.ParamDefinition.getDefaultValues(A),createGeometry:E,createLocationIterator:function createLocationIterator(e){return Object(c.a)(e.grid.cells.data.length,1,function(){return l.b;});},getLoci:x,eachLocation:C,setUpdateState:function setUpdateState(e,t,r,n){a.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||(e.createGeometry=!0);},geometryUtils:d.a.Utils},e);}var D={solid:function solid(e,t){return Object(u.a)(\"Isosurface mesh\",e,t,j,O);},wireframe:function wireframe(e,t){return Object(u.a)(\"Isosurface wireframe\",e,t,T,O);}},I=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},P),A),{visuals:i.ParamDefinition.MultiSelect([\"solid\"],i.ParamDefinition.objectToOptions(D))});var M=Object(u.b)({name:\"isosurface\",label:\"Isosurface\",description:\"Displays an isosurface of volumetric data.\",factory:function factory(e,t){return f.a.createMulti(\"Isosurface\",e,t,f.a.StateBuilder,D);},getParams:function getParams(e,t){var r=i.ParamDefinition.clone(I);return r.isoValue=y(a.b.IsoValue.relative(2),t.grid.stats),r;},defaultValues:i.ParamDefinition.getDefaultValues(I),defaultColorTheme:{name:\"uniform\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return!a.b.isEmpty(e);}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return g;}),r.d(t,\"c\",function(){return v;}),r.d(t,\"b\",function(){return b;});var n,i,a,o=r(1),s=r(127),u=r(149),c=r(184),l=o.Vec3.zero(),d=o.Vec3.zero(),f=o.Vec3.zero(),p=o.Vec3.zero(),m=Object(u.a)(4,!0);function h(e){for(var t=Object(s.a)(12),r=0;r<4;++r){var n=(r+1)%4;o.Vec3.set(l,m[3*r],m[3*r+1],-.5),o.Vec3.set(d,m[3*n],m[3*n+1],-.5),o.Vec3.set(f,m[3*n],m[3*n+1],.5),o.Vec3.set(p,m[3*r],m[3*r+1],.5),t.add(l,d,f),e||t.add(f,p,l);}return o.Vec3.set(l,m[0],m[1],-.5),o.Vec3.set(d,m[3],m[4],-.5),o.Vec3.set(f,m[6],m[7],-.5),o.Vec3.set(p,m[9],m[10],-.5),t.add(f,d,l),e||t.add(l,p,f),o.Vec3.set(l,m[0],m[1],.5),o.Vec3.set(d,m[3],m[4],.5),o.Vec3.set(f,m[6],m[7],.5),o.Vec3.set(p,m[9],m[10],.5),t.add(l,d,f),e||t.add(f,p,l),t.getPrimitive();}function g(){return n||(n=h(!1)),n;}function v(){return i||(i=h(!0)),i;}function b(){return a||(a=Object(c.b)([.5,.5,-.5,-.5,.5,-.5,-.5,-.5,-.5,.5,-.5,-.5,.5,.5,.5,-.5,.5,.5,-.5,-.5,.5,.5,-.5,.5],[0,4,1,5,2,6,3,7,0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4])),a;}},function(e,t,r){\"use strict\";r.r(t);var n=r(352);r.d(t,\"Model\",function(){return n.a;});var i=r(22);r.d(t,\"Types\",function(){return i;});var a=r(290);r.d(t,\"Symmetry\",function(){return a.b;});var o=r(343);r.d(t,\"StructureSequence\",function(){return o.a;});var s=r(402);r.d(t,\"IndexedCustomProperty\",function(){return s.a;});var u=r(403);for(var c in u)[\"Model\",\"Types\",\"Symmetry\",\"StructureSequence\",\"IndexedCustomProperty\",\"default\"].indexOf(c)<0&&function(e){r.d(t,e,function(){return u[e];});}(c);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(0),i=r(55),a=function(){function e(t){this.map=t;var r=0,i=[],a=new Map(),o=new Map();this.map.forEach(function(t){t.forEach(function(t){r+=t.edgeCount,t.connectedIndices.forEach(function(r){t.getEdges(r).forEach(function(s){var u=t.unitA,c=t.unitB,l=e.getEdgeKey(r,u,s.indexB,c);a.set(l,i.length);var d=e.getVertexKey(r,u),f=o.get(d);void 0===f?o.set(d,[i.length]):f.push(i.length),i.push(Object(n.__assign)(Object(n.__assign)({},s),{indexA:r,unitA:u,unitB:c}));});});});}),this.edgeCount=r,this.edges=i,this.edgeKeyIndex=a,this.vertexKeyIndex=o;}return e.prototype.getConnectedUnits=function(e){return this.map.has(e.id)?this.map.get(e.id):o;},e.prototype.getEdgeIndex=function(t,r,n,i){var a=e.getEdgeKey(t,r,n,i),o=this.edgeKeyIndex.get(a);return void 0!==o?o:-1;},e.prototype.hasEdge=function(e,t,r,n){return-1!==this.getEdgeIndex(e,t,r,n);},e.prototype.getEdge=function(e,t,r,n){var i=this.getEdgeIndex(e,t,r,n);return-1!==i?this.edges[i]:void 0;},e.prototype.getEdgeIndices=function(t,r){return this.vertexKeyIndex.get(e.getVertexKey(t,r))||[];},e;}();!function(e){var t=function(){function e(e,t,r,n,i){this.unitA=e,this.unitB=t,this.edgeCount=r,this.connectedIndices=n,this.edgeMap=i;}return e.prototype.hasEdges=function(e){return this.edgeMap.has(e);},e.prototype.getEdges=function(e){return this.edgeMap.has(e)?this.edgeMap.get(e):o;},Object.defineProperty(e.prototype,\"areUnitsOrdered\",{get:function get(){return this.unitA.id<this.unitB.id;},enumerable:!1,configurable:!0}),e;}();function r(e,t,r){e.has(t)?e.get(t).push(r):e.set(t,[r]);}e.UnitPairEdges=t,e.getEdgeKey=function(e,t,r,n){return e+\"|\"+t.id+\"|\"+r+\"|\"+n.id;},e.getVertexKey=function(e,t){return e+\"|\"+t.id;};var n=function(){function e(){this.map=new Map();}return e.prototype.startUnitPair=function(e,t){this.uA=e,this.uB=t,this.mapAB=new Map(),this.mapBA=new Map(),this.linkedA=i.c.create(),this.linkedB=i.c.create(),this.linkCount=0;},e.prototype.finishUnitPair=function(){0!==this.linkCount&&(r(this.map,this.uA.id,new t(this.uA,this.uB,this.linkCount,this.linkedA.array,this.mapAB)),r(this.map,this.uB.id,new t(this.uB,this.uA,this.linkCount,this.linkedB.array,this.mapBA)));},e.prototype.add=function(e,t,n){r(this.mapAB,e,{indexB:t,props:n}),r(this.mapBA,t,{indexB:e,props:n}),i.c.add(this.linkedA,e,e),i.c.add(this.linkedB,t,t),this.linkCount+=1;},e.prototype.getMap=function(){return this.map;},e;}();e.Builder=n;}(a||(a={}));var o=[];},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"b\",function(){return c;}),r.d(t,\"d\",function(){return l;}),r.d(t,\"c\",function(){return d;});var n=r(304),i={H:\"Hydrogen\",HE:\"Helium\",LI:\"Lithium\",BE:\"Beryllium\",B:\"Boron\",C:\"Carbon\",N:\"Nitrogen\",O:\"Oxygen\",F:\"Fluorine\",NE:\"Neon\",NA:\"Sodium\",MG:\"Magnesium\",AL:\"Aluminum\",SI:\"Silicon\",P:\"Phosphorus\",S:\"Sulfur\",CL:\"Chlorine\",AR:\"Argon\",K:\"Potassium\",CA:\"Calcium\",SC:\"Scandium\",TI:\"Titanium\",V:\"Vanadium\",CR:\"Chromium\",MN:\"Manganese\",FE:\"Iron\",CO:\"Cobalt\",NI:\"Nickel\",CU:\"Copper\",ZN:\"Zinc\",GA:\"Gallium\",GE:\"Germanium\",AS:\"Arsenic\",SE:\"Selenium\",BR:\"Bromine\",KR:\"Krypton\",RB:\"Rubidium\",SR:\"Strontium\",Y:\"Yttrium\",ZR:\"Zirconium\",NB:\"Niobium\",MO:\"Molybdenum\",TC:\"Technetium\",RU:\"Ruthenium\",RH:\"Rhodium\",PD:\"Palladium\",AG:\"Silver\",CD:\"Cadmium\",IN:\"Indium\",SN:\"Tin\",SB:\"Antimony\",TE:\"Tellurium\",I:\"Iodine\",XE:\"Xenon\",CS:\"Cesium\",BA:\"Barium\",LA:\"Lanthanum\",CE:\"Cerium\",PR:\"Praseodymium\",ND:\"Neodymium\",PM:\"Promethium\",SM:\"Samarium\",EU:\"Europium\",GD:\"Gadolinium\",TB:\"Terbium\",DY:\"Dysprosium\",HO:\"Holmium\",ER:\"Erbium\",TM:\"Thulium\",YB:\"Ytterbium\",LU:\"Lutetium\",HF:\"Hafnium\",TA:\"Tantalum\",W:\"Wolfram\",RE:\"Rhenium\",OS:\"Osmium\",IR:\"Iridium\",PT:\"Platinum\",AU:\"Gold\",HG:\"Mercury\",TL:\"Thallium\",PB:\"Lead\",BI:\"Bismuth\",PO:\"Polonium\",AT:\"Astatine\",RN:\"Radon\",FR:\"Francium\",RA:\"Radium\",AC:\"Actinium\",TH:\"Thorium\",PA:\"Protactinium\",U:\"Uranium\",NP:\"Neptunium\",PU:\"Plutonium\",AM:\"Americium\",CM:\"Curium\",BK:\"Berkelium\",CF:\"Californium\",ES:\"Einsteinium\",FM:\"Fermium\",MD:\"Mendelevium\",NO:\"Nobelium\",LR:\"Lawrencium\",RF:\"Rutherfordium\",DB:\"Dubnium\",SG:\"Seaborgium\",BH:\"Bohrium\",HS:\"Hassium\",MT:\"Meitnerium\",DS:\"Darmstadtium\",RG:\"Roentgenium\",CN:\"Copernicium\",NH:\"Nihonium\",FL:\"Flerovium\",MC:\"Moscovium\",LV:\"Livermorium\",TS:\"Tennessine\",OG:\"Oganesson\"},a=new Set([\"LI\",\"NA\",\"K\",\"RB\",\"CS\",\"FR\"]);var o=new Set([\"BE\",\"MG\",\"CA\",\"SR\",\"BA\",\"RA\"]);new Set([\"C\",\"P\",\"S\",\"SE\"]);new Set([\"H\",\"N\",\"O\",\"F\",\"CL\",\"BR\",\"I\"]);new Set([\"HE\",\"NE\",\"AR\",\"KR\",\"XE\",\"RN\"]);var s=new Set([\"ZN\",\"GA\",\"CD\",\"IN\",\"SN\",\"HG\",\"TI\",\"PB\",\"BI\",\"PO\",\"CN\"]);new Set([\"B\",\"SI\",\"GE\",\"AS\",\"SB\",\"TE\",\"AT\"]);var u=new Set([\"F\",\"CL\",\"BR\",\"I\",\"AT\"]);function c(e){return u.has(e);}function l(e){var t=Object(n.a)(e);return t>=21&&t<=29||t>=39&&t<=47||t>=72&&t<=79||t>=104&&t<=108;}function d(e){return function(e){return a.has(e);}(e)||function(e){return o.has(e);}(e)||function(e){var t=Object(n.a)(e);return t>=57&&t<=71;}(e)||function(e){var t=Object(n.a)(e);return t>=89&&t<=103;}(e)||l(e)||function(e){return s.has(e);}(e);}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureComponentManager\",function(){return D;});var n=r(0),i=r(33),a=r(108),o=r(4),s=r(156),u=r(216),c=r(16),l=r(5),d=r(47),f=r(85),p=r(2),m=r(118),h=r(368),g=r(162),v=r(80),b=r(198),y=r(77),_=r(28),S=r(13),O=r(23);function x(e,t,r,i,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var s=this;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return[4,C(e,t,function(e,t,u){return Object(n.__awaiter)(s,void 0,void 0,function(){var s,c,l,d,f;return Object(n.__generator)(this,function(p){switch(p.label){case 0:return a&&a.length>0&&!a.includes(t.params.values.type.name)?[2]:(s=t.obj.data.source.data,[4,i(s.root)]);case 1:return c=p.sent(),O.Loci.isEmpty(c)?[2]:(l={bundle:o.StructureElement.Bundle.fromLoci(c),groups:r},u?(d=Object(n.__spreadArrays)(u.params.values.layers,[l]),f=w(d,s),e.to(u).update(y.a.toBundle(f))):(f=w([l],s),e.to(t.transform.ref).apply(_.StateTransforms.Representation.ClippingStructureRepresentation3DFromBundle,y.a.toBundle(f),{tags:\"clipping-controls\"})),[2]);}});});})];case 1:return u.sent(),[2];}});});}function C(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,d,f;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=e.state.data,a=i.build(),o=0,s=t,n.label=1;case 1:if(!(o<s.length))return[3,6];u=s[o],c=0,l=u.representations,n.label=2;case 2:return c<l.length?(d=l[c],f=i.select(S.StateSelection.Generators.ofTransformer(_.StateTransforms.Representation.ClippingStructureRepresentation3DFromBundle,d.cell.transform.ref).withTag(\"clipping-controls\")),[4,r(a,d.cell,f[0])]):[3,5];case 3:n.sent(),n.label=4;case 4:return c++,[3,2];case 5:return o++,[3,1];case 6:return[2,a.commit({doNotUpdateCurrent:!0})];}});});}function w(e,t){var r=y.a.ofBundle(e,t.root),n=y.a.merge(r);return y.a.filter(n,t);}var P=r(131);function j(e,t,r,i,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var s=this;return Object(n.__generator)(this,function(u){switch(u.label){case 0:return[4,E(e,t,function(e,t,u){return Object(n.__awaiter)(s,void 0,void 0,function(){var s,c,l,d,f;return Object(n.__generator)(this,function(p){switch(p.label){case 0:return a&&a.length>0&&!a.includes(t.params.values.type.name)?[2]:(s=t.obj.data.source.data,[4,i(s.root)]);case 1:return c=p.sent(),O.Loci.isEmpty(c)?[2]:(l={bundle:o.StructureElement.Bundle.fromLoci(c),value:r},u?(d=Object(n.__spreadArrays)(u.params.values.layers,[l]),f=A(d,s),e.to(u).update(P.a.toBundle(f))):(f=A([l],s),e.to(t.transform.ref).apply(_.StateTransforms.Representation.TransparencyStructureRepresentation3DFromBundle,P.a.toBundle(f),{tags:\"transparency-controls\"})),[2]);}});});})];case 1:return u.sent(),[2];}});});}function E(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,d,f;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=e.state.data,a=i.build(),o=0,s=t,n.label=1;case 1:if(!(o<s.length))return[3,6];u=s[o],c=0,l=u.representations,n.label=2;case 2:return c<l.length?(d=l[c],f=i.select(S.StateSelection.Generators.ofTransformer(_.StateTransforms.Representation.TransparencyStructureRepresentation3DFromBundle,d.cell.transform.ref).withTag(\"transparency-controls\")),[4,r(a,d.cell,f[0])]):[3,5];case 3:n.sent(),n.label=4;case 4:return c++,[3,2];case 5:return o++,[3,1];case 6:return[2,a.commit({doNotUpdateCurrent:!0})];}});});}function A(e,t){var r=P.a.ofBundle(e,t.root),n=P.a.merge(r);return P.a.filter(n,t);}var T=r(319),D=function(e){function t(r){var n=e.call(this,{options:p.ParamDefinition.getDefaultValues(t.OptionsParams)})||this;return n.plugin=r,n.events={optionsUpdated:n.ev()},n;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"currentStructures\",{get:function get(){return this.plugin.managers.structure.hierarchy.selection.structures;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"pivotStructure\",{get:function get(){return this.currentStructures[0];},enumerable:!1,configurable:!0}),t.prototype.setOptions=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,o,s,u,c,l=this;return Object(n.__generator)(this,function(d){for(t=e.interactions!==this.state.options.interactions,this.updateState({options:e}),this.events.optionsUpdated.next(),r=this.dataState.build(),i=0,a=this.currentStructures;i<a.length;i++)for(o=a[i],s=0,u=o.components;s<u.length;s++)c=u[s],this.updateReprParams(r,c);return[2,this.plugin.dataTransaction(function(){return Object(n.__awaiter)(l,void 0,void 0,function(){return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,r.commit()];case 1:return n.sent(),[4,this.plugin.state.updateBehavior(T.StructureFocusRepresentation,function(t){t.ignoreHydrogens=!e.showHydrogens;})];case 2:return n.sent(),t?[4,this.updateInterationProps()]:[3,4];case 3:n.sent(),n.label=4;case 4:return[2];}});});})];});});},t.prototype.updateReprParams=function(e,t){for(var r=this.state.options,n=r.showHydrogens,i=r.visualQuality,a=!n,o=0,s=t.representations;o<s.length;o++){var u=s[o];if(u.cell.transform.transformer===b.StructureRepresentation3D){var c=u.cell.transform.params;!!c.type.params.ignoreHydrogens===a&&c.type.params.quality===i||e.to(u.cell).update(function(e){e.type.params.ignoreHydrogens=a,e.type.params.quality=i;});}}},t.prototype.updateInterationProps=function(){var e,t,r;return Object(n.__awaiter)(this,void 0,void 0,function(){var i,o,s,u,c,l,d,f=this;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=0,o=this.currentStructures,n.label=1;case 1:return i<o.length?(s=o[i],u=a.a.getParams(null===(e=s.cell.obj)||void 0===e?void 0:e.data),s.properties?(c=null===(t=s.properties.cell.transform.params)||void 0===t?void 0:t.properties[a.a.descriptor.name],p.ParamDefinition.areEqual(u,c,this.state.options.interactions)?[3,5]:[4,this.dataState.build().to(s.properties.cell).update(function(e){e.properties[a.a.descriptor.name]=f.state.options.interactions;}).commit()]):[3,3]):[3,6];case 2:return n.sent(),[3,5];case 3:return l=this.plugin.customStructureProperties.getParams(null===(r=s.cell.obj)||void 0===r?void 0:r.data),d=p.ParamDefinition.getDefaultValues(l),p.ParamDefinition.areEqual(u,d.properties[a.a.descriptor.name],this.state.options.interactions)?[3,5]:(d.properties[a.a.descriptor.name]=this.state.options.interactions,[4,this.plugin.builders.structure.insertStructureProperties(s.cell,d)]);case 4:n.sent(),n.label=5;case 5:return i++,[3,1];case 6:return[2];}});});},t.prototype.applyPreset=function(e,t,r){var i=this;return this.plugin.dataTransaction(function(){return Object(n.__awaiter)(i,void 0,void 0,function(){var i,a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=0,a=e,n.label=1;case 1:return i<a.length?(o=a[i],[4,this.plugin.builders.structure.representation.applyPreset(o.cell,t,r)]):[3,5];case 2:return s=n.sent(),[4,this.syncPreset(o,s)];case 3:n.sent(),n.label=4;case 4:return i++,[3,1];case 5:return[2];}});});},{canUndo:\"Preset\"});},t.prototype.syncPreset=function(e,t){if(!t||!t.components)return this.clearComponents([e]);var r=new Set();if(Object(f.c)(t.components,function(e){e&&r.add(e.ref);}),t.representations&&Object(f.c)(t.representations,function(e){e&&r.add(e.ref);}),0===r.size)return this.clearComponents([e]);for(var n=!1,i=this.dataState.build(),a=function a(e){r.has(e.cell.transform.ref)||(n=!0,i.delete(e.cell));},o=0,s=e.components;o<s.length;o++){var u=s[o];a(u);for(var c=0,l=u.representations;c<l.length;c++){a(l[c]);}if(u.genericRepresentations)for(var d=0,p=u.genericRepresentations;d<p.length;d++){a(p[d]);}}if(e.genericRepresentations)for(var m=0,h=e.genericRepresentations;m<h.length;m++){a(h[m]);}return n?i.commit():void 0;},t.prototype.clear=function(e){return this.clearComponents(e);},t.prototype.selectThis=function(e){var t,r=this.plugin.managers.structure.selection;r.clear();for(var n=0,i=e;n<i.length;n++){var a=i[n],s=o.Structure.toSubStructureElementLoci(a.structure.cell.obj.data,null===(t=a.cell.obj)||void 0===t?void 0:t.data);r.fromLoci(\"set\",s);}},t.prototype.canBeModified=function(e){return this.plugin.builders.structure.isComponentTransform(e.cell);},t.prototype.modifyByCurrentSelection=function(e,t){var r=this;return this.plugin.runTask(c.b.create(\"Modify Component\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,o,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(r=this.dataState.build(),a=0,o=e;a<o.length;a++)s=o[a],this.canBeModified(s)&&(u=this.plugin.managers.structure.selection.getStructure(s.structure.cell.obj.data))&&0!==u.elementCount&&this.modifyComponent(r,s,u,t);return[4,this.dataState.updateTree(r,{canUndo:\"Modify Selection\"}).runInContext(i)];case 1:return n.sent(),[2];}});});}));},t.prototype.toggleVisibility=function(e,t){if(0!==e.length)if(t)for(var r=e[0].representations.indexOf(t),n=(o=!t.cell.state.isHidden,0),i=e;n<i.length;n++){var a=(l=i[n]).representations[r];a&&Object(u.setSubtreeVisibility)(this.dataState,a.cell.transform.ref,o);}else for(var o=!e[0].cell.state.isHidden,s=0,c=e;s<c.length;s++){var l=c[s];Object(u.setSubtreeVisibility)(this.dataState,l.cell.transform.ref,o);}},t.prototype.removeRepresentations=function(e,t){if(0!==e.length){var r=[];if(t){var n=e[0].representations.indexOf(t);if(n<0)return;for(var i=0,a=e;i<a.length;i++){(u=a[i]).representations[n]&&r.push(u.representations[n]);}}else for(var o=0,s=e;o<s.length;o++)for(var u,c=0,l=(u=s[o]).representations;c<l.length;c++){var d=l[c];r.push(d);}return this.plugin.managers.structure.hierarchy.remove(r,!0);}},t.prototype.updateRepresentations=function(e,t,r){if(0===e.length)return Promise.resolve();var n=e[0].representations.indexOf(t);if(n<0)return Promise.resolve();for(var i=this.dataState.build(),a=0,o=e;a<o.length;a++){var s=o[a].representations[n];s&&s.cell.transform.transformer===t.cell.transform.transformer&&i.to(s.cell).update(r);}return i.commit({canUndo:\"Update Representation\"});},t.prototype.updateRepresentationsTheme=function(e,t){var r,n,i,a;if(0!==e.length){for(var o=this.dataState.build(),s=0,u=e;s<u.length;s++)for(var c=u[s],l=function l(e){var s=e.cell.transform.params,u=\"function\"==typeof t?t(c,e):t,l=\"default\"===u.color?Object(g.createStructureColorThemeParams)(d.plugin,null===(r=c.structure.cell.obj)||void 0===r?void 0:r.data,null==s?void 0:s.type.name):u.color?Object(g.createStructureColorThemeParams)(d.plugin,null===(n=c.structure.cell.obj)||void 0===n?void 0:n.data,null==s?void 0:s.type.name,u.color,u.colorParams):void 0,f=\"default\"===u.size?Object(g.createStructureSizeThemeParams)(d.plugin,null===(i=c.structure.cell.obj)||void 0===i?void 0:i.data,null==s?void 0:s.type.name):u.color?Object(g.createStructureSizeThemeParams)(d.plugin,null===(a=c.structure.cell.obj)||void 0===a?void 0:a.data,null==s?void 0:s.type.name,u.size,u.sizeParams):void 0;(l||f)&&o.to(e.cell).update(function(e){l&&(e.colorTheme=l),f&&(e.sizeTheme=f);});},d=this,f=0,p=c.representations;f<p.length;f++){l(p[f]);}return o.commit({canUndo:\"Update Theme\"});}},t.prototype.addRepresentation=function(e,t){var r=this;if(0!==e.length){var i=this.state.options,a={ignoreHydrogens:!i.showHydrogens,quality:i.visualQuality};return this.plugin.dataTransaction(function(){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,i,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=0,i=e,n.label=1;case 1:return r<i.length?(o=i[r],[4,this.plugin.builders.structure.representation.addRepresentation(o.cell,{type:this.plugin.representation.structure.registry.get(t),typeParams:a})]):[3,4];case 2:n.sent(),n.label=3;case 3:return r++,[3,1];case 4:return[2];}});});},{canUndo:\"Add Representation\"});}},t.prototype.tryFindComponent=function(e,t){var r=this;if(0!==e.components.length)return this.plugin.runTask(c.b.create(\"Find Component\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,u,c,l,d,f,p,m,h;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return(r=null===(m=e.cell.obj)||void 0===m?void 0:m.data)?(c=(u=o.StructureSelection).unionStructure,[4,t.getSelection(this.plugin,i,r)]):[2];case 1:for(a=c.apply(u,[n.sent()]),l=0,d=e.components;l<d.length;l++)if(f=d[l],(p=null===(h=f.cell.obj)||void 0===h?void 0:h.data)&&f.cell.parent&&Object(s.a)(a,p))return[2,f.cell];return[2];}});});}));},t.prototype.add=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r=this;return Object(n.__generator)(this,function(i){return[2,this.plugin.dataTransaction(function(){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,i,a,o,s,u,c,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(0===(r=t||this.currentStructures).length)return[2];i=this.state.options,a=i.showHydrogens,o=i.visualQuality,s={ignoreHydrogens:!a,quality:o},u=l.c.create22(),c=0,d=r,n.label=1;case 1:return c<d.length?(f=d[c],p=void 0,e.options.checkExisting?[4,this.tryFindComponent(f,e.selection)]:[3,3]):[3,8];case 2:p=n.sent(),n.label=3;case 3:return p?[3,5]:[4,this.plugin.builders.structure.tryCreateComponentFromSelection(f.cell,e.selection,u,{label:e.options.label||(e.selection===v.b.current?\"Custom Selection\":\"\")})];case 4:p=n.sent(),n.label=5;case 5:return\"none\"!==e.representation&&p?[4,this.plugin.builders.structure.representation.addRepresentation(p,{type:this.plugin.representation.structure.registry.get(e.representation),typeParams:s})]:[3,7];case 6:n.sent(),n.label=7;case 7:return c++,[3,1];case 8:return[2];}});});},{canUndo:\"Add Selection\"})];});});},t.prototype.applyTheme=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r=this;return Object(n.__generator)(this,function(i){return[2,this.plugin.dataTransaction(function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,s,u,c,l,d=this;return Object(n.__generator)(this,function(f){switch(f.label){case 0:if(0===(r=t||this.currentStructures).length)return[2];a=function a(t){return Object(n.__awaiter)(d,void 0,void 0,function(){var r,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=(r=o.StructureSelection).toLociWithSourceUnits,[4,e.selection.getSelection(this.plugin,i,t)];case 1:return[2,a.apply(r,[n.sent()])];}});});},s=0,u=r,f.label=1;case 1:return s<u.length?(c=u[s],\"reset\"!==e.action.name?[3,3]:[4,Object(h.setStructureOverpaint)(this.plugin,c.components,-1,a,e.representations)]):[3,10];case 2:return f.sent(),[3,9];case 3:return\"color\"!==e.action.name?[3,5]:(l=e.action.params,[4,Object(h.setStructureOverpaint)(this.plugin,c.components,l.color,a,e.representations)]);case 4:return f.sent(),[3,9];case 5:return\"transparency\"!==e.action.name?[3,7]:(l=e.action.params,[4,j(this.plugin,c.components,l.value,a,e.representations)]);case 6:return f.sent(),[3,9];case 7:return\"clipping\"!==e.action.name?[3,9]:(l=e.action.params,[4,x(this.plugin,c.components,y.a.Groups.fromNames(l.excludeGroups),a,e.representations)]);case 8:f.sent(),f.label=9;case 9:return s++,[3,1];case 10:return[2];}});});},{canUndo:\"Apply Theme\"})];});});},t.prototype.modifyComponent=function(e,t,r,n){var i,a,u,c=null===(i=t.cell.obj)||void 0===i?void 0:i.data;if(c&&(\"subtract\"!==n&&\"intersect\"!==n||Object(s.b)(c,r))){var l=null===(a=t.structure.cell.obj)||void 0===a?void 0:a.data,d=\"union\"===n?Object(s.e)(l,[c,r]):\"intersect\"===n?Object(s.c)(c,r):Object(s.d)(c,r);if(0===d.elementCount)e.delete(t.cell.transform.ref);else{var f={type:{name:\"bundle\",params:o.StructureElement.Bundle.fromSubStructure(l,d)},nullIfEmpty:!0,label:null===(u=t.cell.obj)||void 0===u?void 0:u.label};e.to(t.cell).update(f);}}},t.prototype.updateLabel=function(e,t){var r,n,i={type:null===(r=e.cell.params)||void 0===r?void 0:r.values.type,nullIfEmpty:null===(n=e.cell.params)||void 0===n?void 0:n.values.nullIfEmpty,label:t};this.dataState.build().to(e.cell).update(i).commit();},Object.defineProperty(t.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),t.prototype.clearComponents=function(e){for(var t=this.dataState.build(),r=0,n=e;r<n.length;r++)for(var i=0,a=n[r].components;i<a.length;i++){var o=a[i];t.delete(o.cell.transform.ref);}return t.commit({canUndo:\"Clear Selections\"});},t;}(m.b);!function(e){function t(e,t){var r,n;return(null===(r=null==t?void 0:t.cell.obj)||void 0===r?void 0:r.data)?e.representation.structure.registry.getApplicableTypes(null===(n=t.cell.obj)||void 0===n?void 0:n.data):e.representation.structure.registry.types;}function r(e,r,i,a){var o=Object(n.__spreadArrays)(i,t(e,r));return p.ParamDefinition.Select(o[0][0],o,{label:a});}e.OptionsParams={showHydrogens:p.ParamDefinition.Boolean(!0,{description:\"Toggle display of hydrogen atoms in representations\"}),visualQuality:p.ParamDefinition.Select(\"auto\",i.b,{description:\"Control the visual/rendering quality of representations\"}),interactions:p.ParamDefinition.Group(a.a.defaultParams,{label:\"Non-covalent Interactions\"})},e.getAddParams=function(e,t){var i=e.query.structure.registry.options;return t=Object(n.__assign)({pivot:e.managers.structure.component.pivotStructure,allowNone:!0,hideSelection:!1,checkExisting:!1},t),{selection:p.ParamDefinition.Select(i[1][0],i,{isHidden:null==t?void 0:t.hideSelection}),representation:r(e,null==t?void 0:t.pivot,(null==t?void 0:t.allowNone)?[[\"none\",\"< Create Later >\"]]:[]),options:p.ParamDefinition.Group({label:p.ParamDefinition.Text(\"\"),checkExisting:p.ParamDefinition.Boolean(!!(null==t?void 0:t.checkExisting),{help:function help(){return{description:\"Checks if a selection with the specifield elements already exists to avoid creating duplicate components.\"};}})})};},e.getThemeParams=function(e,r){var n=e.query.structure.registry.options;return{selection:p.ParamDefinition.Select(n[1][0],n,{isHidden:!1}),action:p.ParamDefinition.MappedStatic(\"color\",{color:p.ParamDefinition.Group({color:p.ParamDefinition.Color(d.a.blue,{isExpanded:!0})},{isFlat:!0}),reset:p.ParamDefinition.EmptyGroup({label:\"Reset Color\"}),transparency:p.ParamDefinition.Group({value:p.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01})},{isFlat:!0}),clipping:p.ParamDefinition.Group({excludeGroups:p.ParamDefinition.MultiSelect([],p.ParamDefinition.objectToOptions(y.a.Groups.Names))},{isFlat:!0})}),representations:p.ParamDefinition.MultiSelect([],t(e,r),{emptyValue:\"All\"})};},e.getRepresentationTypes=t;}(D||(D={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"GaussianDensitySchema\",function(){return p;}),r.d(t,\"GaussianDensityShaderCode\",function(){return m;}),r.d(t,\"GaussianDensityGPU\",function(){return h;}),r.d(t,\"GaussianDensityTexture\",function(){return g;}),r.d(t,\"GaussianDensityTexture2d\",function(){return v;}),r.d(t,\"GaussianDensityTexture3d\",function(){return b;}),r.d(t,\"fieldFromTexture2d\",function(){return E;});var n=r(0),i=r(11),a=r(6),o=r(1),s=r(5),u=r(98),c=r(217),l=r(92),d=r(99),f=r(17),p={drawCount:Object(f.j)(\"number\"),instanceCount:Object(f.j)(\"number\"),aRadius:Object(f.a)(\"float32\",1,0),aPosition:Object(f.a)(\"float32\",3,0),aGroup:Object(f.a)(\"float32\",1,0),uCurrentSlice:Object(f.i)(\"f\"),uCurrentX:Object(f.i)(\"f\"),uCurrentY:Object(f.i)(\"f\"),uBboxMin:Object(f.i)(\"v3\",!0),uBboxSize:Object(f.i)(\"v3\",!0),uGridDim:Object(f.i)(\"v3\",!0),uGridTexDim:Object(f.i)(\"v3\",!0),uGridTexScale:Object(f.i)(\"v2\",!0),uAlpha:Object(f.i)(\"f\",!0),uResolution:Object(f.i)(\"f\",!0),tMinDistanceTex:Object(f.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),dGridTexType:Object(f.c)(\"string\",[\"2d\",\"3d\"]),dCalcType:Object(f.c)(\"string\",[\"density\",\"minDistance\",\"groupId\"])},m=Object(l.f)(\"gaussian-density\",\"\\nprecision highp float;\\n\\nattribute vec3 aPosition;\\nattribute float aRadius;\\n\\nvarying vec3 vPosition;\\nvarying float vRadiusSqInv;\\n\\n#if defined(dCalcType_groupId)\\n    attribute float aGroup;\\n    varying float vGroup;\\n#endif\\n\\nuniform vec3 uBboxSize;\\nuniform vec3 uBboxMin;\\nuniform float uCurrentSlice;\\nuniform float uResolution;\\n\\nvoid main() {\\n    vRadiusSqInv = 1.0 / (aRadius * aRadius);\\n    #if defined(dCalcType_groupId)\\n        vGroup = aGroup;\\n    #endif\\n    gl_PointSize = floor(((aRadius * 4.0) / uResolution) + 0.5);\\n    vPosition = (aPosition - uBboxMin) / uResolution;\\n    gl_Position = vec4(((aPosition - uBboxMin) / uBboxSize) * 2.0 - 1.0, 1.0);\\n}\\n\",\"\\nprecision highp float;\\n\\nvarying vec3 vPosition;\\nvarying float vRadiusSqInv;\\n#if defined(dCalcType_groupId)\\n    precision highp sampler2D;\\n    uniform sampler2D tMinDistanceTex;\\n    uniform vec3 uGridTexDim;\\n    varying float vGroup;\\n#endif\\n\\n#include common\\n\\nuniform vec3 uGridDim;\\nuniform vec2 uGridTexScale;\\nuniform float uCurrentSlice;\\nuniform float uCurrentX;\\nuniform float uCurrentY;\\nuniform float uAlpha;\\nuniform float uResolution;\\n\\nvoid main() {\\n    vec2 v = gl_FragCoord.xy - vec2(uCurrentX, uCurrentY) - 0.5;\\n    vec3 fragPos = vec3(v.x, v.y, uCurrentSlice);\\n    float dist = distance(fragPos, vPosition) * uResolution;\\n\\n    #if defined(dCalcType_density)\\n        float density = exp(-uAlpha * ((dist * dist) * vRadiusSqInv));\\n        gl_FragColor.a = density;\\n    #elif defined(dCalcType_minDistance)\\n        gl_FragColor.a = 10000.0 - dist;\\n    #elif defined(dCalcType_groupId)\\n        float minDistance = 10000.0 - texture2D(tMinDistanceTex, (gl_FragCoord.xy) / (uGridTexDim.xy / uGridTexScale)).a;\\n        if (dist > minDistance + uResolution * 0.05)\\n            discard;\\n        gl_FragColor.rgb = encodeFloatRGB(vGroup);\\n    #endif\\n}\\n\",{standardDerivatives:!1,fragDepth:!1});function h(e,t,r,n,i){var a=S(i,e,t,r,n),o=a.scale,s=a.bbox,u=E(i,a.texture,a.gridDim,a.gridTexDim);return{field:u.field,idField:u.idField,transform:_(o,s)};}function g(e,t,r,n,i,a){return e.isWebGL2?b(e,t,r,n,i,a):v(e,t,r,n,i,a);}function v(e,t,r,n,i,a){return y(S(e,t,r,n,i,a));}function b(e,t,r,n,i,a){return y(function(e,t,r,n,i,a){var u=e.gl,c=e.resources,l=i.smoothness,d=O(t,r,n,i),f=d.drawCount,p=d.positions,m=d.radii,h=d.groups,g=d.scale,v=d.expandedBox,b=d.dim,y=b[0],_=b[1],S=b[2],E=c.texture(\"volume-float32\",\"rgba\",\"float\",\"nearest\");E.define(y,_,S);var A=o.Vec2.create(1,1),T=x(e,f,p,m,h,E,v,b,b,A,l,i.resolution),D=T.values.uCurrentSlice,I=c.framebuffer();I.bind(),C(e),u.viewport(0,0,y,_),a||(a=c.texture(\"volume-float32\",\"rgba\",\"float\",\"nearest\"));function M(e){for(var t=0;t<S;++t)s.e.update(D,t),e.attachFramebuffer(I,0,t),T.render();}return a.define(y,_,S),w(e,T),M(E),P(e,T),M(a),j(e,T),M(a),{texture:a,scale:g,bbox:v,gridDim:b,gridTexDim:b,gridTexScale:A};}(e,t,r,n,i,a));}function y(e){var t=e.texture,r=e.scale,n=e.bbox,i=e.gridDim,a=e.gridTexDim,o=e.gridTexScale;return{transform:_(r,n),texture:t,bbox:n,gridDim:i,gridTexDim:a,gridTexScale:o};}function _(e,t){var r=o.Mat4.identity();return o.Mat4.fromScaling(r,e),o.Mat4.setTranslation(r,t.min),r;}function S(e,t,r,n,i,a){var u=i.smoothness,c=O(t,r,n,i),l=c.drawCount,d=c.positions,f=c.radii,p=c.groups,m=c.scale,h=c.expandedBox,g=c.dim,v=g[0],b=g[1],y=g[2],_=function(e){var t=e[0]*e[1]*e[2],r=Math.sqrt(t),n=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))),i=0,a=e[1],o=1,s=e[2];n<e[0]*e[2]?(s=Math.floor(n/e[0]),o=Math.ceil(e[2]/s),i=s*e[0],a*=o):i=e[0]*e[2];return{texDimX:i,texDimY:a,texRows:o,texCols:s,powerOfTwoSize:a<n?n:2*n};}(g),S=_.texDimX,E=_.texDimY,A=_.texCols,T=_.powerOfTwoSize,D=o.Vec3.create(S,E,0),I=o.Vec2.create(S/T,E/T),M=e.resources.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\");M.define(T,T);var k=x(e,l,d,f,p,M,h,g,D,I,u,i.resolution),B=e.gl,V=e.resources,R=e.state,L=k.values,N=L.uCurrentSlice,F=L.uCurrentX,U=L.uCurrentY,z=V.framebuffer();function H(e,t){R.currentRenderItemId=-1,e.attachFramebuffer(z,0),t&&B.clear(B.COLOR_BUFFER_BIT);for(var r=0,n=0,i=0,a=0;a<y;++a)r>=A&&(r-=A,n+=b,i=0,s.e.update(U,n)),s.e.update(F,i),s.e.update(N,a),B.viewport(i,n,v,b),k.render(),++r,i+=v;B.finish();}return z.bind(),C(e),a?a.getWidth()===T&&a.getHeight()===T||a.define(T,T):(a=V.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\")).define(T,T),P(e,k),H(a,!0),w(e,k),H(M,!0),j(e,k),H(a,!1),{texture:a,scale:m,bbox:h,gridDim:g,gridTexDim:D,gridTexScale:I};}function O(e,t,r,n){for(var s=n.resolution,u=n.radiusOffset,c=1/s,l=e.indices,d=e.x,f=e.y,p=e.z,m=e.id,h=a.OrderedSet.size(l),g=new Float32Array(3*h),v=new Float32Array(h),b=new Float32Array(h),y=0,_=0;_<h;++_){var S=a.OrderedSet.getAt(l,_);g[3*_]=d[S],g[3*_+1]=f[S],g[3*_+2]=p[S];var O=r(S)+u;y<O&&(y=O),v[_]=O,b[_]=m?m[_]:_;}var x=2*y+4*s,C=i.b.expand(Object(i.b)(),t,o.Vec3.create(x,x,x)),w=i.b.scale(Object(i.b)(),C,c),P=i.b.size(Object(o.Vec3)(),w);return o.Vec3.ceil(P,P),{drawCount:h,positions:g,radii:v,groups:b,scale:o.Vec3.create(s,s,s),expandedBox:C,dim:P};}function x(e,t,r,i,a,c,l,f,h,g,v,b){var y=o.Vec3.sub(o.Vec3.zero(),l.max,l.min),_={drawCount:s.e.create(t),instanceCount:s.e.create(1),aRadius:s.e.create(i),aPosition:s.e.create(r),aGroup:s.e.create(a),uCurrentSlice:s.e.create(0),uCurrentX:s.e.create(0),uCurrentY:s.e.create(0),uBboxMin:s.e.create(l.min),uBboxSize:s.e.create(y),uGridDim:s.e.create(f),uGridTexDim:s.e.create(h),uGridTexScale:s.e.create(g),uAlpha:s.e.create(v),uResolution:s.e.create(b),tMinDistanceTex:s.e.create(c),dGridTexType:s.e.create(c.getDepth()>0?\"3d\":\"2d\"),dCalcType:s.e.create(\"minDistance\")},S=Object(n.__assign)({},p),O=m,x=Object(d.a)(e,\"points\",O,S,_);return Object(u.a)(x,_);}function C(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.enable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.clearColor(0,0,0,0);}function w(e,t){var r=e.gl,n=e.state;if(s.e.update(t.values.dCalcType,\"minDistance\"),t.update(),n.colorMask(!1,!1,!1,!0),n.blendFunc(r.ONE,r.ONE),!e.extensions.blendMinMax)throw new Error(\"GPU gaussian surface calculation requires EXT_blend_minmax\");n.blendEquation(e.extensions.blendMinMax.MAX);}function P(e,t){var r=e.gl,n=e.state;s.e.update(t.values.dCalcType,\"density\"),t.update(),n.colorMask(!1,!1,!1,!0),n.blendFunc(r.ONE,r.ONE),n.blendEquation(r.FUNC_ADD);}function j(e,t){var r=e.gl,n=e.state;s.e.update(t.values.dCalcType,\"groupId\"),t.update(),n.colorMask(!0,!0,!0,!1),n.blendFunc(r.ONE,r.ZERO),n.blendEquation(r.FUNC_ADD);}function E(e,t,r,n){var i=e.resources,a=r[0],s=r[1],u=r[2],l=n[0],d=n[1],f=Math.floor(l/a),p=o.Tensor.Space(r,[2,1,0],Float32Array),m=p.create(),h=o.Tensor.create(p,m),g=p.create(),v=o.Tensor.create(p,g),b=new Float32Array(l*d*4),y=i.framebuffer();y.bind(),t.attachFramebuffer(y,0),e.readPixels(0,0,l,d,b);for(var _=0,S=0,O=0,x=0;x<u;++x){S>=f&&(S=0,O+=s);for(var C=0;C<s;++C)for(var w=0;w<a;++w){var P=4*(S*a+(C+O)*l+w);m[_]=b[P+3],g[_]=Object(c.b)(255*b[P],255*b[P+1],255*b[P+2]),_++;}S++;}return{field:h,idField:v};}},function(e,t,r){\"use strict\";function n(e){setTimeout(function(){throw e;},0);}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(11),a=r(1);!function(e){e.One={transform:{kind:\"matrix\",matrix:a.Mat4.identity()},cells:a.Tensor.create(a.Tensor.Space([1,1,1],[0,1,2]),a.Tensor.Data1([0])),stats:{min:0,max:0,mean:0,sigma:0}};var t=a.Mat4.zero(),r=a.Mat4.zero();e.getGridToCartesianTransform=function(e){if(\"matrix\"===e.transform.kind)return a.Mat4.copy(Object(a.Mat4)(),e.transform.matrix);if(\"spacegroup\"===e.transform.kind){var n=e.cells.space,o=a.Mat4.fromScaling(t,a.Vec3.div(a.Vec3.zero(),i.b.size(a.Vec3.zero(),e.transform.fractionalBox),a.Vec3.ofArray(n.dimensions))),s=a.Mat4.fromTranslation(r,e.transform.fractionalBox.min);return a.Mat4.mul3(a.Mat4.zero(),e.transform.cell.fromFractional,s,o);}return a.Mat4.identity();},e.areEquivalent=function(e,t){return e===t;},e.isEmpty=function(e){return 0===e.cells.data.length;};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return i;}),r.d(t,\"a\",function(){return n;});var n,i=\"0.3.0\";!function(e){e.getDataType=function(e){return e instanceof Int8Array?1:e instanceof Int16Array?2:e instanceof Int32Array?3:e instanceof Uint8Array?4:e instanceof Uint16Array?5:e instanceof Uint32Array?6:e instanceof Float32Array?32:e instanceof Float64Array?33:3;},e.isSignedIntegerDataType=function(e){if(e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array)return!0;for(var t=0,r=e.length;t<r;t++)if(t<0)return!1;return!0;};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return p;});var n=r(62),i=r(27),a=(n.a.Field,n.a.Encodings),o=i.e.chain.label_asym_id;var s=i.e.chain.auth_asym_id;var u=n.a.fields().str(\"group_PDB\",i.e.residue.group_PDB).index(\"id\").str(\"type_symbol\",i.e.atom.type_symbol).str(\"label_atom_id\",i.e.atom.label_atom_id).str(\"label_comp_id\",i.e.atom.label_comp_id).int(\"label_seq_id\",i.e.residue.label_seq_id,{encoder:a.deltaRLE,valueKind:function valueKind(e,t){var r=e.unit.model;return r.atomicHierarchy.residues.label_seq_id.valueKind(r.atomicHierarchy.residueAtomSegments.index[e.element]);}}).str(\"label_alt_id\",i.e.atom.label_alt_id).str(\"pdbx_PDB_ins_code\",i.e.residue.pdbx_PDB_ins_code).str(\"label_asym_id\",function(e){var t=o(e),r=e.unit.conformation.operator.suffix;return r?t+r:t;}).str(\"label_entity_id\",i.e.chain.label_entity_id).float(\"Cartn_x\",i.e.atom.x,{digitCount:3,encoder:a.fixedPoint3}).float(\"Cartn_y\",i.e.atom.y,{digitCount:3,encoder:a.fixedPoint3}).float(\"Cartn_z\",i.e.atom.z,{digitCount:3,encoder:a.fixedPoint3}).float(\"occupancy\",i.e.atom.occupancy,{digitCount:2,encoder:a.fixedPoint2}).int(\"pdbx_formal_charge\",i.e.atom.pdbx_formal_charge,{encoder:a.deltaRLE,valueKind:function valueKind(e,t){return e.unit.model.atomicHierarchy.atoms.pdbx_formal_charge.valueKind(e.element);}}).str(\"auth_atom_id\",i.e.atom.auth_atom_id).str(\"auth_comp_id\",i.e.atom.auth_comp_id).int(\"auth_seq_id\",i.e.residue.auth_seq_id,{encoder:a.deltaRLE}).str(\"auth_asym_id\",function(e){var t=s(e),r=e.unit.conformation.operator.suffix;return r?t+r:t;}).int(\"pdbx_PDB_model_num\",i.e.unit.model_num,{encoder:a.deltaRLE}).getFields(),c={name:\"atom_site\",instance:function instance(e){var t=e.structures;return{fields:u,source:t.map(function(e){return{data:e,rowCount:e.elementCount,keys:function keys(){return e.elementLocations();}};})};}};function l(e,t,r){return e&&t?e+\"_\"+r+\"_\"+t:e?e+\"_\"+r:t?r+\"_\"+t:r;}function d(e,t){return function(r,n){return t(e(r,n));};}function f(e,t,r){r&&r.includeModelNum&&e.int(\"pdbx_PDB_model_num\",d(t,i.e.unit.model_num));}function p(e,t){var r=t&&t.prefix,o=t&&t.postfix,s=n.a.fields().str(l(r,o,\"label_comp_id\"),d(e,i.e.atom.label_comp_id)).int(l(r,o,\"label_seq_id\"),d(e,i.e.residue.label_seq_id),{encoder:a.deltaRLE,valueKind:function valueKind(t,r){var n=e(t,r),i=n.unit.model;return i.atomicHierarchy.residues.label_seq_id.valueKind(i.atomicHierarchy.residueAtomSegments.index[n.element]);}}).str(l(r,o,\"pdbx_PDB_ins_code\"),d(e,i.e.residue.pdbx_PDB_ins_code)).str(l(r,o,\"label_asym_id\"),d(e,i.e.chain.label_asym_id)).str(l(r,o,\"label_entity_id\"),d(e,i.e.chain.label_entity_id)).str(l(r,o,\"auth_comp_id\"),d(e,i.e.atom.auth_comp_id)).int(l(r,o,\"auth_seq_id\"),d(e,i.e.residue.auth_seq_id),{encoder:a.deltaRLE}).str(l(r,o,\"auth_asym_id\"),d(e,i.e.chain.auth_asym_id));return f(s,e,t),s.getFields();}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return o;}),r.d(t,\"e\",function(){return s;}),r.d(t,\"d\",function(){return u;}),r.d(t,\"c\",function(){return c;});var n,i=r(0),a=r(244);!function(e){e.createElementsIndex=function(e,t,r){for(var n=new Int32Array(r+1),i=new Int32Array(r),a=new Int32Array(r),o=t.members,s=t.offsets,u=0,c=2*e.edgeCount;u<c;++u){if(!((m=e.a[u])>(h=e.b[u]))){for(var l=s[m],d=s[m+1];l<d;++l)++a[o[l]];for(l=s[h],d=s[h+1];l<d;++l)++a[o[l]];}}var f=0;for(u=0;u<r;u++)n[u]=f,f+=a[u];n[r]=f;var p=new Int32Array(f);for(u=0,c=2*e.edgeCount;u<c;++u){var m,h;if(!((m=e.a[u])>(h=e.b[u]))){for(l=s[m],d=s[m+1];l<d;++l){p[n[g=o[l]]+i[g]]=u,++i[g];}for(l=s[h],d=s[h+1];l<d;++l){var g;p[n[g=o[l]]+i[g]]=u,++i[g];}}}return{indices:p,offsets:n};};}(n||(n={}));var o=function(e){function t(t,r){var n=e.call(this,t)||this,i=0,a=new Map(),o=function o(e,t){var r=n.getElementKey(e,t),o=a.get(r);void 0===o?a.set(r,[i]):o.push(i);};return n.map.forEach(function(e){e.forEach(function(e){e.connectedIndices.forEach(function(t){e.getEdges(t).forEach(function(n){for(var a=e.unitA,s=e.unitB,u=r.get(a.id),c=u.offsets,l=u.members,d=c[t],f=c[t+1];d<f;++d)o(l[d],a);var p=n.indexB,m=r.get(s.id),h=m.offsets,g=m.members;for(d=h[p],f=h[p+1];d<f;++d)o(g[d],s);i+=1;});});});}),n.elementKeyIndex=a,n;}return Object(i.__extends)(t,e),t.prototype.getContactIndicesForElement=function(e,t){return this.elementKeyIndex.get(this.getElementKey(e,t))||[];},t.prototype.getElementKey=function(e,t){return e+\"|\"+t.id;},t;}(a.a);function s(e){switch(e){case 4:return\"Hydrogen Bond\";case 6:return\"Hydrophobic Contact\";case 5:return\"Halogen Bond\";case 1:return\"Ionic Interaction\";case 7:return\"Metal Coordination\";case 2:return\"Cation-Pi Interaction\";case 3:return\"Pi Stacking\";case 8:return\"Weak Hydrogen Bond\";case 0:return\"Unknown Interaction\";}}function u(e){switch(e){case 0:return\"None\";case 1:return\"Positive Charge\";case 2:return\"Negative Charge\";case 3:return\"Aromatic Ring\";case 4:return\"Hydrogen Donor\";case 5:return\"Hydrogen Acceptor\";case 6:return\"Halogen Donor\";case 7:return\"Halogen Acceptor\";case 8:return\"HydrophobicAtom\";case 9:return\"Weak Hydrogen Donor\";case 10:return\"Ionic Type Partner\";case 11:return\"Dative Bond Partner\";case 12:return\"Transition Metal\";case 13:return\"Ionic Type Metal\";}}function c(e){switch(e){case 0:return\"None\";case 1:return\"Quaternary Amine\";case 2:return\"Tertiary Amine\";case 3:return\"Sulfonium\";case 4:return\"Sulfonic Acid\";case 5:return\"Sulfate\";case 6:return\"Phosphate\";case 7:return\"Halocarbon\";case 8:return\"Guanidine\";case 9:return\"Acetamidine\";case 10:return\"Carboxylate\";}}},function(e,t,r){\"use strict\";var n;r.d(t,\"a\",function(){return n;}),function(e){e.message=function(e){return{type:\"message\",timestamp:new Date(),message:e};},e.error=function(e){return{type:\"error\",timestamp:new Date(),message:e};},e.warning=function(e){return{type:\"warning\",timestamp:new Date(),message:e};},e.info=function(e){return{type:\"info\",timestamp:new Date(),message:e};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(122),i=r(224),a=r(310);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return Object(n.a)(r)?(e.pop(),Object(a.a)(e,r)):Object(i.a)(e);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(288),o=r(265),s=r(96);!function(e){var t=function(){function e(e,t,r){this.name=e,this.f=t,this.onAbort=r,this.id=n();}return e.prototype.run=function(e,t){return void 0===t&&(t=250),e?Object(a.c)(this,e,t):this.f(o.a);},e.prototype.runAsChild=function(e,t){return e.isSynchronous?this.f(o.a):Object(a.d)(e,this,t);},e.prototype.runInContext=function(e){return e.isSynchronous?this.f(o.a):Object(a.b)(e,this);},e;}();function r(e,r,n){return new t(e,r,n);}e.is=function(e){var t=e;return!!e&&\"number\"==typeof t.id&&\"string\"==typeof t.name&&!!t.run;},e.isAbort=function(e){return!!e&&!!e.isAborted;},e.Aborted=function(e){return{isAborted:!0,reason:e,toString:function toString(){return\"Aborted\"+(e?\": \"+e:\"\");}};},e.create=r,e.constant=function(e,t){var n=this;return r(e,function(e){return Object(i.__awaiter)(n,void 0,void 0,function(){return Object(i.__generator)(this,function(e){return[2,t];});});});},e.empty=function(){var e=this;return r(\"\",function(t){return Object(i.__awaiter)(e,void 0,void 0,function(){return Object(i.__generator)(this,function(e){return[2];});});});},e.fail=function(e,t){var n=this;return r(e,function(e){return Object(i.__awaiter)(n,void 0,void 0,function(){return Object(i.__generator)(this,function(e){throw new Error(t);});});});};var n=Object(s.a)(0,1073741823);}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(1),s=r(124),u=r(117),c=r(125),l=r(145),d=r(2),f=r(53),p=r(11),m=r(33),h=r(134),g=r(141),v=r(9),b=r(142);!function(e){function t(e,t,r,i){return i?function(e,t,r,n){return n.pointCount=r,a.e.update(n.centerBuffer,e),a.e.update(n.groupBuffer,t),n;}(e,t,r,i):function(e,t,r){var i,o=Object(p.g)(),u=-1,c=-1,l={kind:\"points\",pointCount:r,centerBuffer:a.e.create(e),groupBuffer:a.e.create(t),get boundingSphere(){var e=n(l);if(e!==u){var t=Object(f.a)(l.centerBuffer.ref.value,l.pointCount,1);p.g.copy(o,t),u=e;}return o;},get groupMapping(){return l.groupBuffer.ref.version!==c&&(i=Object(s.c)(l.groupBuffer.ref.value,l.pointCount),c=l.groupBuffer.ref.version),i;},setBoundingSphere:function setBoundingSphere(e){p.g.copy(o,e),u=n(l);}};return l;}(e,t,r);}function r(e){return t(e?e.centerBuffer.ref.value:new Float32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),0,e);}function n(e){return Object(v.l)([e.pointCount,e.centerBuffer.ref.version,e.groupBuffer.ref.version]);}function y(e,t,r,n,s){var d=r.instanceCount,v=r.groupCount,y=Object(u.a)(r,n.color),_=Object(l.a)(r,n.size),S=Object(c.a)(d*v),O=Object(h.c)(),x=Object(g.c)(),C=Object(b.d)(),w={drawCount:e.pointCount,groupCount:v,instanceCount:d},P=p.g.clone(e.boundingSphere),j=Object(f.b)(P,t.aTransform.ref.value,d);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({aPosition:e.centerBuffer,aGroup:e.groupBuffer,boundingSphere:a.e.create(j),invariantBoundingSphere:a.e.create(P),uInvariantBoundingSphere:a.e.create(o.Vec4.ofSphere(P))},y),_),S),O),x),C),t),m.a.createValues(s,w)),{uSizeFactor:a.e.create(s.sizeFactor),dPointSizeAttenuation:a.e.create(s.pointSizeAttenuation),dPointFilledCircle:a.e.create(s.pointFilledCircle),uPointEdgeBleach:a.e.create(s.pointEdgeBleach)});}function _(e,t){m.a.updateRenderableState(e,t),e.opaque=e.opaque&&(!t.pointFilledCircle||t.pointFilledCircle&&0===t.pointEdgeBleach),e.writeDepth=e.opaque;}e.create=t,e.createEmpty=r,e.transform=function(e,t){var r=e.centerBuffer.ref.value;Object(s.e)(t,r,0,e.pointCount),a.e.update(e.centerBuffer,r);},e.Params=Object(i.__assign)(Object(i.__assign)({},m.a.Params),{sizeFactor:d.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),pointSizeAttenuation:d.ParamDefinition.Boolean(!1),pointFilledCircle:d.ParamDefinition.Boolean(!1),pointEdgeBleach:d.ParamDefinition.Numeric(.2,{min:0,max:1,step:.05})}),e.Utils={Params:e.Params,createEmpty:r,createValues:y,createValuesSimple:function createValuesSimple(t,r,n,a,o){var s=m.a.createSimple(n,a,o),u=Object(i.__assign)(Object(i.__assign)({},d.ParamDefinition.getDefaultValues(e.Params)),r);return y(t,s.transform,s.locationIterator,s.theme,u);},updateValues:function updateValues(e,t){m.a.updateValues(e,t),a.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),a.e.updateIfChanged(e.dPointSizeAttenuation,t.pointSizeAttenuation),a.e.updateIfChanged(e.dPointFilledCircle,t.pointFilledCircle),a.e.updateIfChanged(e.uPointEdgeBleach,t.pointEdgeBleach);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=p.g.clone(t.boundingSphere),n=Object(f.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);p.g.equals(n,e.boundingSphere.ref.value)||a.e.update(e.boundingSphere,n);p.g.equals(r,e.invariantBoundingSphere.ref.value)||(a.e.update(e.invariantBoundingSphere,r),a.e.update(e.uInvariantBoundingSphere,o.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:function createRenderableState(e){var t=m.a.createRenderableState(e);return _(t,e),t;},updateRenderableState:_};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(2),s=r(117),u=r(125),c=r(53),l=r(11),d=r(145),f=r(33),p=r(134),m=r(141),h=r(9),g=r(124),v=r(142),b=r(1);!function(e){function t(e,t,r,i,o,s){return s?function(e,t,r,n,i,o){return o.sphereCount=i,a.e.update(o.centerBuffer,e),a.e.update(o.mappingBuffer,t),a.e.update(o.indexBuffer,r),a.e.update(o.groupBuffer,n),o;}(e,t,r,i,o,s):function(e,t,r,i,o){var s,u=Object(l.g)(),d=-1,f=-1,p={kind:\"spheres\",sphereCount:o,centerBuffer:a.e.create(e),mappingBuffer:a.e.create(t),indexBuffer:a.e.create(r),groupBuffer:a.e.create(i),get boundingSphere(){var e=n(p);if(e!==d){var t=Object(c.a)(p.centerBuffer.ref.value,4*p.sphereCount,4);l.g.copy(u,t),d=e;}return u;},get groupMapping(){return p.groupBuffer.ref.version!==f&&(s=Object(g.c)(p.groupBuffer.ref.value,p.sphereCount,4),f=p.groupBuffer.ref.version),s;},setBoundingSphere:function setBoundingSphere(e){l.g.copy(u,e),d=n(p);}};return p;}(e,t,r,i,o);}function r(e){return t(e?e.centerBuffer.ref.value:new Float32Array(0),e?e.mappingBuffer.ref.value:new Float32Array(0),e?e.indexBuffer.ref.value:new Uint32Array(0),e?e.groupBuffer.ref.value:new Float32Array(0),0,e);}function n(e){return Object(h.l)([e.sphereCount,e.centerBuffer.ref.version,e.mappingBuffer.ref.version,e.indexBuffer.ref.version,e.groupBuffer.ref.version]);}function y(e,t,r,n,o){var h=r.instanceCount,g=r.groupCount;if(h!==t.instanceCount.ref.value)throw new Error(\"instanceCount values in TransformData and LocationIterator differ\");var y=Object(s.a)(r,n.color),_=Object(d.a)(r,n.size),S=Object(u.a)(h*g),O=Object(p.c)(),x=Object(m.c)(),C=Object(v.d)(),w={drawCount:2*e.sphereCount*3,groupCount:g,instanceCount:h},P=Object(d.b)(_),j=l.g.expand(Object(l.g)(),e.boundingSphere,P),E=Object(c.b)(j,t.aTransform.ref.value,h);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({aPosition:e.centerBuffer,aMapping:e.mappingBuffer,aGroup:e.groupBuffer,elements:e.indexBuffer,boundingSphere:a.e.create(E),invariantBoundingSphere:a.e.create(j),uInvariantBoundingSphere:a.e.create(b.Vec4.ofSphere(j))},y),_),S),O),x),C),t),{padding:a.e.create(P)}),f.a.createValues(o,w)),{uSizeFactor:a.e.create(o.sizeFactor),dDoubleSided:a.e.create(o.doubleSided),dIgnoreLight:a.e.create(o.ignoreLight)});}e.create=t,e.createEmpty=r,e.Params=Object(i.__assign)(Object(i.__assign)({},f.a.Params),{sizeFactor:o.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),doubleSided:o.ParamDefinition.Boolean(!1,f.a.CustomQualityParamInfo),ignoreLight:o.ParamDefinition.Boolean(!1,f.a.ShadingCategory)}),e.Utils={Params:e.Params,createEmpty:r,createValues:y,createValuesSimple:function createValuesSimple(t,r,n,a,s){var u=f.a.createSimple(n,a,s),c=Object(i.__assign)(Object(i.__assign)({},o.ParamDefinition.getDefaultValues(e.Params)),r);return y(t,u.transform,u.locationIterator,u.theme,c);},updateValues:function updateValues(e,t){f.a.updateValues(e,t),a.e.updateIfChanged(e.uSizeFactor,t.sizeFactor),a.e.updateIfChanged(e.dDoubleSided,t.doubleSided),a.e.updateIfChanged(e.dIgnoreLight,t.ignoreLight);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=Object(d.b)(e),n=l.g.expand(Object(l.g)(),t.boundingSphere,r),i=Object(c.b)(n,e.aTransform.ref.value,e.instanceCount.ref.value);l.g.equals(i,e.boundingSphere.ref.value)||a.e.update(e.boundingSphere,i);l.g.equals(n,e.invariantBoundingSphere.ref.value)||(a.e.update(e.invariantBoundingSphere,n),a.e.update(e.uInvariantBoundingSphere,b.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,n)));a.e.update(e.padding,r);},createRenderableState:f.a.createRenderableState,updateRenderableState:f.a.updateRenderableState};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(11),s=r(2),u=r(117),c=r(125),l=r(33),d=r(134),f=r(141),p=r(53),m=r(1),h=r(30),g=r(142);!function(e){function t(e){return{};}function r(e,t,r,n,s){var v=r.instanceCount,b=r.groupCount,y=Object(u.a)(r,n.color),_=Object(c.a)(v*b),S=Object(d.c)(),O=Object(f.c)(),x=Object(g.d)(),C={drawCount:e.vertexCount,groupCount:b,instanceCount:v},w=Object(p.b)(e.boundingSphere,t.aTransform.ref.value,t.instanceCount.ref.value);return Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)(Object(i.__assign)({uGeoTexDim:e.geoTextureDim,tPositionGroup:e.vertexGroupTexture,tNormal:e.normalTexture,aGroup:a.e.create(Object(h.fillSerial)(new Float32Array(e.vertexCount))),boundingSphere:a.e.create(w),invariantBoundingSphere:a.e.create(o.g.clone(e.boundingSphere)),uInvariantBoundingSphere:a.e.create(m.Vec4.ofSphere(e.boundingSphere))},y),_),S),O),x),t),l.a.createValues(s,C)),{dDoubleSided:a.e.create(s.doubleSided),dFlatShaded:a.e.create(s.flatShaded),dFlipSided:a.e.create(s.flipSided),dGeoTexture:a.e.create(!0)});}e.create=function(e,t,r,n,i,s){var u=r.getWidth(),c=r.getHeight();return s?(s.vertexCount=e,s.groupCount=t,a.e.update(s.geoTextureDim,m.Vec2.set(s.geoTextureDim.ref.value,u,c)),a.e.update(s.vertexGroupTexture,r),a.e.update(s.normalTexture,n),o.g.copy(s.boundingSphere,i),s):{kind:\"texture-mesh\",vertexCount:e,groupCount:t,geoTextureDim:a.e.create(m.Vec2.create(u,c)),vertexGroupTexture:a.e.create(r),normalTexture:a.e.create(n),boundingSphere:o.g.clone(i)};},e.createEmpty=t,e.Params=Object(i.__assign)(Object(i.__assign)({},l.a.Params),{doubleSided:s.ParamDefinition.Boolean(!1,l.a.CustomQualityParamInfo),flipSided:s.ParamDefinition.Boolean(!1,l.a.ShadingCategory),flatShaded:s.ParamDefinition.Boolean(!1,l.a.ShadingCategory)}),e.Utils={Params:e.Params,createEmpty:t,createValues:r,createValuesSimple:function createValuesSimple(t,n,a,o,u){var c=l.a.createSimple(a,o,u),d=Object(i.__assign)(Object(i.__assign)({},s.ParamDefinition.getDefaultValues(e.Params)),n);return r(t,c.transform,c.locationIterator,c.theme,d);},updateValues:function updateValues(e,t){a.e.updateIfChanged(e.alpha,t.alpha),a.e.updateIfChanged(e.dDoubleSided,t.doubleSided),a.e.updateIfChanged(e.dFlatShaded,t.flatShaded),a.e.updateIfChanged(e.dFlipSided,t.flipSided),e.drawCount.ref.value>e.aGroup.ref.value.length&&a.e.update(e.aGroup,Object(h.fillSerial)(new Float32Array(e.drawCount.ref.value)));},updateBoundingSphere:function updateBoundingSphere(e,t){var r=t.boundingSphere,n=Object(p.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);o.g.equals(n,e.boundingSphere.ref.value)||a.e.update(e.boundingSphere,n);o.g.equals(r,e.invariantBoundingSphere.ref.value)||(a.e.update(e.invariantBoundingSphere,r),a.e.update(e.uInvariantBoundingSphere,m.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:l.a.createRenderableState,updateRenderableState:l.a.updateRenderableState};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return u;}),r.d(t,\"a\",function(){return c;});var n,i,a=r(0),o=r(107),s=r(174);function u(e){return n.classify(e);}function c(e){return i.classify(e);}!function(e){function t(e,t){return e>=0?Math.ceil((e+1)/t):Math.ceil((e+1)/(-t-1));}function r(e,r,n){var i=e.limit8,a=e.limit16;r.pack8+=t(n,i),r.pack16+=t(n,a),r.count+=1;}function n(e,r){e.pack8+=t(r,127),e.pack16+=t(r,32767),e.count+=1;}function i(e){return 4*e.count<2*e.pack16?{length:4*e.count,elem:4}:2*e.pack16<e.pack8?{length:2*e.pack16,elem:2}:{length:e.pack8,elem:1};}function s(e,t){for(var n={pack8:0,pack16:0,count:0},o=0,s=e.length;o<s;o++)r(t,n,e[o]);return Object(a.__assign)(Object(a.__assign)({},i(n)),{kind:\"pack\"});}function u(e,t){for(var r={pack8:0,pack16:0,count:0},o=e[0],s=1,u=e.length;s<u;s++)n(r,e[s]-o),o=e[s];return Object(a.__assign)(Object(a.__assign)({},i(r)),{kind:\"delta\"});}function c(e,t){for(var n={pack8:0,pack16:0,count:0},o=1,s=1,u=e.length;s<u;s++)e[s-1]!==e[s]?(r(t,n,e[s-1]),r(t,n,o),o=1):o++;return r(t,n,e[e.length-1]),r(t,n,o),Object(a.__assign)(Object(a.__assign)({},i(n)),{kind:\"rle\"});}function l(e,t){for(var r={pack8:0,pack16:0,count:0},o=1,s=0,u=0,c=1,l=e.length;c<l;c++){var d=e[c]-s;u!==d?(n(r,u),n(r,o),o=1):o++,u=d,s=e[c];}return n(r,u),n(r,o),Object(a.__assign)(Object(a.__assign)({},i(r)),{kind:\"delta-rle\"});}function d(e){var t=function(e){for(var t=!1,r=0,n=e.length;r<n;r++)if(e[r]<0){t=!0;break;}return t?{signed:t,limit8:127,limit16:32767}:{signed:t,limit8:255,limit16:65535};}(e),r=[s(e,t),c(e,t),u(e),l(e)];return r.sort(function(e,t){return e.length-t.length;}),r;}e.getSize=d,e.classify=function(e){if(e.length<2)return o.b.by(o.b.byteArray);switch(d(e)[0].kind){case\"pack\":return o.b.by(o.b.integerPacking);case\"rle\":return o.b.by(o.b.runLength).and(o.b.integerPacking);case\"delta\":return o.b.by(o.b.delta).and(o.b.integerPacking);case\"delta-rle\":return o.b.by(o.b.delta).and(o.b.runLength).and(o.b.integerPacking);}throw new Error(\"should not happen :)\");};}(n||(n={})),function(e){e.classify=function(e){var t=Object(s.a)(e,4,1e-6),r=t.mantissaDigits,i=t.integerDigits;if(r<0||r+i>10)return o.b.by(o.b.byteArray);if(0===r)return n.classify(e);for(var a=function(e){for(var t=1,r=0;r<e;r++)t*=10;return t;}(r),u=new Int32Array(e.length),c=0,l=e.length;c<l;c++)u[c]=Math.round(a*e[c]);var d=n.getSize(u)[0],f=o.b.by(o.b.fixedPoint(a));switch(d.kind){case\"pack\":return f.and(o.b.integerPacking);case\"rle\":return f.and(o.b.runLength).and(o.b.integerPacking);case\"delta\":return f.and(o.b.delta).and(o.b.integerPacking);case\"delta-rle\":return f.and(o.b.delta).and(o.b.runLength).and(o.b.integerPacking);}throw new Error(\"should not happen :)\");};}(i||(i={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return u;});var n=r(96),i=r(91),a=Object(n.a)();function o(e){var t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE){var r=function(e,t){switch(t){case e.FRAMEBUFFER_COMPLETE:return\"complete\";case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return\"incomplete attachment\";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return\"incomplete missing attachment\";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return\"incomplete dimensions\";case e.FRAMEBUFFER_UNSUPPORTED:return\"unsupported\";}if(Object(i.m)(e))switch(t){case e.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:return\"incomplete multisample\";case e.RENDERBUFFER_SAMPLES:return\"renderbuffer samples\";}return\"unknown error\";}(e,t);throw new Error(\"Framebuffer status: \"+r);}}function s(e){var t=e.createFramebuffer();if(null===t)throw new Error(\"Could not create WebGL framebuffer\");return t;}function u(e){var t=s(e),r=!1;return{id:a(),bind:function bind(){return e.bindFramebuffer(e.FRAMEBUFFER,t);},reset:function reset(){t=s(e);},destroy:function destroy(){r||(e.deleteFramebuffer(t),r=!0);}};}},function(e,t,r){\"use strict\";function n(e,t){return e+(\"/\"===e[e.length-1]||\"/\"===t[0]?\"\":\"/\")+t;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";var n,i=r(115),a=r(1);!function(e){e.create=function(){return{view:a.Mat4.identity(),position:a.Vec3.create(0,0,0),direction:a.Vec3.create(0,0,-1),up:a.Vec3.create(0,1,0)};};var t=a.Vec3.zero();e.update=function(e){a.Vec3.add(t,e.position,e.direction),a.Mat4.lookAt(e.view,e.position,t,e.up);};}(n||(n={}));var o,s=r(11),u=r(55),c=function(){function e(){this.removeList=Object(u.b)(),this.removeMap=new Map(),this.addList=Object(u.b)(),this.addMap=new Map();}return Object.defineProperty(e.prototype,\"isEmpty\",{get:function get(){return 0===this.removeList.count&&0===this.addList.count;},enumerable:!1,configurable:!0}),e.prototype.add=function(e){if(this.removeMap.has(e)){var t=this.removeMap.get(e);this.removeMap.delete(e),this.removeList.remove(t);}if(!this.addMap.has(e)){var r=this.addList.addLast(e);this.addMap.set(e,r);}},e.prototype.remove=function(e){if(this.addMap.has(e)){var t=this.addMap.get(e);this.addMap.delete(e),this.addList.remove(t);}if(!this.removeMap.has(e)){var r=this.removeList.addLast(e);this.removeMap.set(e,r);}},e.prototype.tryGetRemove=function(){var e=this.removeList.removeFirst();return e&&this.removeMap.delete(e),e;},e.prototype.tryGetAdd=function(){var e=this.addList.removeFirst();return e&&this.addMap.delete(e),e;},e;}(),l=r(83),d=r(30),f=r(126),p=r(9),m=new f.a(\"98\");function h(e,t,r){m.reset();for(var n=0,i=e.length;n<i;++n)if(!r||e[n].state.visible){var a=e[n].values.boundingSphere.ref.value;a.radius&&m.includeSphere(a);}m.finishedIncludeStep();for(n=0,i=e.length;n<i;++n)if(!r||e[n].state.visible){var o=e[n].values.boundingSphere.ref.value;o.radius&&m.radiusSphere(o);}return m.getSphere(t);}function g(e,t){var r=e.getProgram(\"color\").id,n=t.getProgram(\"color\").id,i=e.materialId,a=t.materialId;return r!==n?r-n:i!==a?i-a:e.id-t.id;}(o||(o={})).create=function(e){var t=new Map(),r=[],a=Object(s.g)(),o=Object(s.g)(),u=!0,f=!0,m=n.create();function v(n){if(t.has(n))return console.warn(\"RenderObject with id '\"+n.id+\"' already present\"),t.get(n);var a=Object(i.b)(e,n);return r.push(a),t.set(n,a),u=!0,f=!0,a;}function b(e){var n=t.get(e);n&&(n.dispose(),Object(d.arraySetRemove)(r,n),t.delete(e),u=!0,f=!0);}var y=new c(),_=-1;function S(){for(var e=23,t=0,n=r.length;t<n;++t)r[t].state.visible&&(e=31*e+r[t].id|0);return-1===(e=Object(p.h)(e))&&(e=0),e;}function O(){return S()!==_&&(f=!0,!0);}return{get view(){return m.view;},get position(){return m.position;},get direction(){return m.direction;},get up(){return m.up;},syncVisibility:O,update:function update(e,i,a){if(n.update(m),e)for(var o=0,s=e.length;o<s;++o){var c=t.get(e[o]);c&&c.update();}else if(!a)for(o=0,s=r.length;o<s;++o)r[o].update();i?O():(u=!0,f=!0);},add:function add(e){return y.add(e);},remove:function remove(e){return y.remove(e);},commit:function commit(e){return void 0===e&&(e=Number.MAX_VALUE),function(e){for(var t=Object(l.b)(),n=0;i=y.tryGetRemove();)if(b(i),++n%100==0&&Object(l.b)()-t>e)return!1;for(;;){var i;if(!(i=y.tryGetAdd()))break;if(v(i),++n%100==0&&Object(l.b)()-t>e)return!1;}return r.sort(g),!0;}(e);},get needsCommit(){return!y.isEmpty;},has:function has(e){return t.has(e);},clear:function clear(){for(var e=0,n=r.length;e<n;++e)r[e].dispose();r.length=0,t.clear(),u=!0,f=!0;},forEach:function forEach(e){t.forEach(e);},get count(){return r.length;},renderables:r,get boundingSphere(){return u&&(h(r,a,!1),u=!1),a;},get boundingSphereVisible(){return f&&(h(r,o,!0),f=!1,_=S()),o;}};};t.a=o;},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return v;}),r.d(t,\"a\",function(){return b;});var n=r(0),i=r(1),a=r(124),o={radius:1,detail:0};function s(e,t,r){var s=Object(n.__assign)(Object(n.__assign)({},o),r),u=s.radius,c=s.detail,l=function(){var e=[],t=[],r=new Map();function n(t){var n=t[0].toFixed(5)+\"|\"+t[1].toFixed(5)+\"|\"+t[2].toFixed(5),i=r.get(n);return void 0===i&&(i=e.length/3,r.set(n,i),e.push.apply(e,t)),i;}return{vertices:e,indices:t,add:function add(e,r,i){t.push(n(e),n(r),n(i));}};}(),d=l.vertices,f=l.indices;!function(r){for(var n=Object(i.Vec3)(),a=Object(i.Vec3)(),o=Object(i.Vec3)(),s=0;s<t.length;s+=3)i.Vec3.fromArray(n,e,3*t[s+0]),i.Vec3.fromArray(a,e,3*t[s+1]),i.Vec3.fromArray(o,e,3*t[s+2]),m(n,a,o,r);}(c),Object(a.a)(d,u);var p=new Float32Array(d.length);return Object(a.b)(d,f,p,d.length/3,f.length/3),{vertices:new Float32Array(d),normals:new Float32Array(p),indices:new Uint32Array(f)};function m(e,t,r,n){for(var a=Math.pow(2,n),o=[],s=0;s<=a;++s){o[s]=[];var u=Object(i.Vec3)();i.Vec3.lerp(u,e,r,s/a);var c=Object(i.Vec3)();i.Vec3.lerp(c,t,r,s/a);for(var d=a-s,f=0;f<=d;++f)if(0===f&&s===a)o[s][f]=u;else{var p=Object(i.Vec3)();i.Vec3.lerp(p,u,c,f/d),o[s][f]=p;}}for(s=0;s<a;++s)for(f=0;f<2*(a-s)-1;++f){var m=Math.floor(f/2);f%2==0?l.add(o[s][m+1],o[s+1][m],o[s][m]):l.add(o[s][m+1],o[s+1][m+1],o[s+1][m]);}}}var u,c=r(127),l=r(184),d=(1+Math.sqrt(5))/2,f=[-1,d,0,1,d,0,-1,-d,0,1,-d,0,0,-1,d,0,1,d,0,-1,-d,0,1,-d,d,0,-1,d,0,1,-d,0,-1,-d,0,1],p=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];Object(l.b)(f,[0,11,5,11,0,5,1,5,0,1,1,7,0,7,7,10,0,10,10,11,5,9,4,11,2,10,6,7,1,8,3,9,4,9,3,4,2,4,2,3,2,6,3,6,6,8,3,8,8,9,4,5,2,11,6,10,7,8,1,9]);var m=(u||(u=Object(c.b)(f,p)),u),h=m.vertices,g=m.indices;function v(e){return 10*Math.pow(Math.pow(2,e),2)+2;}function b(e){return s(h,g,{detail:e,radius:1});}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return S;});var n=r(0),i=r(9),a=r(124),o=r(53),s=r(11),u=r(1),c=r(5),l=r(2),d=r(242),f=r(33),p=r(117),m=r(125),h=r(134),g=r(141),v=r(78),b=r(24);function y(e){return e.map(function(e){return{x:e[0],alpha:e[1]};});}function _(e,t,r){for(var i,a,o,s,u,l,d=Object(n.__spreadArrays)([{x:0,alpha:0},{x:0,alpha:0}],e,[{x:1,alpha:0},{x:1,alpha:0}]),f=b.ColorScale.create({domain:[0,1],listOrName:t}),p=r?r.ref.value.array:new Uint8Array(1024),m=0,h=e.length+1,g=0;g<h;++g){i=d[g+1].x,a=d[g+2].x,o=d[g].alpha,s=d[g+1].alpha,u=d[g+2].alpha,l=d[g+3].alpha;for(var y=Math.round(256*(a-i)),_=0;_<y;++_){var S=_/y;p[4*m+3]=Math.max(0,255*Object(v.d)(o,s,u,l,S,.5)),f.colorToArray(m/255,p,4*m),++m;}}var O={array:p,width:256,height:1};return r?(c.e.update(r,O),r):c.e.create(O);}var S,O=r(142),x=Object(d.a)(),C=[[\"isosurface\",\"Isosurface\"],[\"volume\",\"Volume\"]];!function(e){function t(e){return{};}function r(e,t,r,i,a){var l=e.gridTexture,d=e.gridTextureDim,v=e.bboxSize,b=e.bboxMin,S=e.bboxMax,C=e.gridDimension,w=e.transform,P=r.instanceCount,j=r.groupCount,E=Object(p.a)(r,i.color),A=Object(m.a)(P*j),T=Object(h.c)(),D=Object(g.c)(),I=Object(O.d)(),M={drawCount:x.indices.length,groupCount:j,instanceCount:P},k=s.g.clone(e.boundingSphere),B=Object(o.b)(k,t.aTransform.ref.value,P),V=_(y(a.controlPoints),a.list.colors),R=2*Math.ceil(u.Vec3.magnitude(C.ref.value))*5;return Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},E),A),T),D),I),t),f.a.createValues(a,M)),{aPosition:c.e.create(x.vertices),elements:c.e.create(x.indices),boundingSphere:c.e.create(B),invariantBoundingSphere:c.e.create(k),uInvariantBoundingSphere:c.e.create(u.Vec4.ofSphere(k)),uIsoValue:c.e.create(a.isoValueNorm),uBboxMin:b,uBboxMax:S,uBboxSize:v,dMaxSteps:c.e.create(R),uTransform:w,uGridDim:C,dRenderMode:c.e.create(a.renderMode),tTransferTex:V,dGridTexType:c.e.create(l.ref.value.getDepth()>0?\"3d\":\"2d\"),uGridTexDim:d,tGridTex:l});}e.create=function(e,t,r,n,l){return l?function(e,t,r,n,i){var a=n.getWidth(),o=n.getHeight(),s=n.getDepth();return c.e.update(i.gridDimension,t),c.e.update(i.gridTexture,n),c.e.update(i.gridTextureDim,u.Vec3.set(i.gridTextureDim.ref.value,a,o,s)),c.e.update(i.bboxMin,e.min),c.e.update(i.bboxMax,e.max),c.e.update(i.bboxSize,u.Vec3.sub(i.bboxSize.ref.value,e.max,e.min)),c.e.update(i.transform,r),i;}(e,t,r,n,l):function(e,t,r,n){var l=Object(s.g)(),d=-1,f=n.getWidth(),p=n.getHeight(),m=n.getDepth(),h={kind:\"direct-volume\",gridDimension:c.e.create(t),gridTexture:c.e.create(n),gridTextureDim:c.e.create(u.Vec3.create(f,p,m)),bboxMin:c.e.create(e.min),bboxMax:c.e.create(e.max),bboxSize:c.e.create(u.Vec3.sub(u.Vec3.zero(),e.max,e.min)),transform:c.e.create(r),get boundingSphere(){var e=function(e){return Object(i.l)([e.bboxSize.ref.version,e.gridDimension.ref.version,e.gridTexture.ref.version,e.transform.ref.version]);}(h);if(e!==d){var t=function(e,t){return E.set(x.vertices),u.Mat4.fromTranslation(w,j),u.Mat4.mul(w,u.Mat4.fromScaling(P,e),w),u.Mat4.mul(w,t,w),Object(a.e)(w,E,0,E.length/3),Object(o.a)(E,E.length/3,1);}(h.gridDimension.ref.value,h.transform.ref.value);s.g.copy(l,t),d=e;}return l;}};return h;}(e,t,r,n);},e.createEmpty=t,e.Params=Object(n.__assign)(Object(n.__assign)({},f.a.Params),{isoValueNorm:l.ParamDefinition.Numeric(.22,{min:0,max:1,step:.01},{description:\"Normalized Isolevel Value\"}),renderMode:l.ParamDefinition.Select(\"volume\",C),controlPoints:l.ParamDefinition.LineGraph([u.Vec2.create(.19,0),u.Vec2.create(.2,.05),u.Vec2.create(.25,.05),u.Vec2.create(.26,0),u.Vec2.create(.79,0),u.Vec2.create(.8,.05),u.Vec2.create(.85,.05),u.Vec2.create(.86,0)]),list:l.ParamDefinition.ColorList(\"red-yellow-blue\")}),e.Utils={Params:e.Params,createEmpty:t,createValues:r,createValuesSimple:function createValuesSimple(t,i,a,o,s){var u=f.a.createSimple(a,o,s),c=Object(n.__assign)(Object(n.__assign)({},l.ParamDefinition.getDefaultValues(e.Params)),i);return r(t,u.transform,u.locationIterator,u.theme,c);},updateValues:function updateValues(e,t){c.e.updateIfChanged(e.uIsoValue,t.isoValueNorm),c.e.updateIfChanged(e.uAlpha,t.alpha),c.e.updateIfChanged(e.dRenderMode,t.renderMode),_(y(t.controlPoints),t.list.colors,e.tTransferTex);},updateBoundingSphere:function updateBoundingSphere(e,t){var r=s.g.clone(t.boundingSphere),n=Object(o.b)(r,e.aTransform.ref.value,e.instanceCount.ref.value);s.g.equals(n,e.boundingSphere.ref.value)||c.e.update(e.boundingSphere,n);s.g.equals(r,e.invariantBoundingSphere.ref.value)||(c.e.update(e.invariantBoundingSphere,r),c.e.update(e.uInvariantBoundingSphere,u.Vec4.fromSphere(e.uInvariantBoundingSphere.ref.value,r)));},createRenderableState:function createRenderableState(e){var t=f.a.createRenderableState(e);return t.opaque=!1,t;},updateRenderableState:function updateRenderableState(e,t){f.a.updateRenderableState(e,t),e.opaque=!1;}};}(S||(S={}));var w=u.Mat4.identity(),P=u.Mat4.identity(),j=u.Vec3.create(.5,.5,.5),E=new Float32Array(x.vertices.length);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=new(function(){function e(){this.shouldUpdate=!1,this.isSynchronous=!0;}return e.prototype.update=function(e,t){},e;}())();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(6),a=r(62),o=r(305),s=r(188);!function(e){function t(e,t){for(var r=e.units,n=0,a=r.length;n<a;n++)if(i.SortedArray.indexOf(r[n].elements,t)>=0)return!0;return!1;}e.Descriptor={name:\"struct_conn\",cifExport:{prefix:\"\",categories:[{name:\"struct_conn\",instance:function instance(r){var n=e.Provider.get(r.firstModel);if(!n||0===n.entries.length)return a.a.Category.Empty;for(var i=r.structures[0],o=[],s=0,u=n.entries;s<u.length;s++){var c=u[s];t(i,c.partnerA.atomIndex)&&t(i,c.partnerB.atomIndex)&&(o[o.length]=c.rowIndex);}return a.a.Category.ofTable(n.data,o);}}]}},e.Provider=s.a.create(e.Descriptor),e.getAtomIndexFromEntries=function(e){for(var t=new Map(),r=0,n=e;r<n.length;r++){var i=n[r],a=i.partnerA.atomIndex,o=i.partnerB.atomIndex;t.has(a)?t.get(a).push(i):t.set(a,[i]),t.has(o)?t.get(o).push(i):t.set(o,[i]);}return t;},e.getEntriesFromStructConn=function(e,t){for(var r=e.conn_type_id,n=e.pdbx_dist_value,i=e.pdbx_value_order,a={label_asym_id:e.ptnr1_label_asym_id,label_seq_id:e.ptnr1_label_seq_id,auth_seq_id:e.ptnr1_auth_seq_id,label_atom_id:e.ptnr1_label_atom_id,label_alt_id:e.pdbx_ptnr1_label_alt_id,ins_code:e.pdbx_ptnr1_PDB_ins_code,symmetry:e.ptnr1_symmetry},s={label_asym_id:e.ptnr2_label_asym_id,label_seq_id:e.ptnr2_label_seq_id,auth_seq_id:e.ptnr2_auth_seq_id,label_atom_id:e.ptnr2_label_atom_id,label_alt_id:e.pdbx_ptnr2_label_alt_id,ins_code:e.pdbx_ptnr2_PDB_ins_code,symmetry:e.ptnr2_symmetry},u=function u(e,r){if(0===r.label_asym_id.valueKind(e)){var n=r.label_asym_id.value(e),i=t.atomicHierarchy.index.findEntity(n);if(!(i<0)){var a=t.atomicHierarchy.index.findResidue(t.entities.data.id.value(i),n,r.auth_seq_id.value(e),r.ins_code.value(e));if(!(a<0)){var o=r.label_atom_id.value(e);if(o){var s=t.atomicHierarchy.index.findAtomOnResidue(a,o,r.label_alt_id.value(e));if(!(s<0))return{residueIndex:a,atomIndex:s,symmetry:r.symmetry.value(e)};}}}}},c=[],l=0;l<e._rowCount;l++){var d=u(l,a),f=u(l,s);if(void 0!==d&&void 0!==f){var p=r.value(l),m=0,h=1;switch((i.value(l)||\"\").toLowerCase()){case\"sing\":h=1;break;case\"doub\":h=2;break;case\"trip\":h=3;break;case\"quad\":h=4;break;default:h=Object(o.a)(e.ptnr1_label_comp_id.value(l),e.ptnr1_label_atom_id.value(l),e.ptnr2_label_comp_id.value(l),e.ptnr2_label_atom_id.value(l));}switch(p){case\"covale\":m=1;break;case\"disulf\":m=9;break;case\"hydrog\":m=4;break;case\"metalc\":m=2;}c.push({rowIndex:l,flags:m,order:h,distance:n.value(l),partnerA:d,partnerB:f});}}return c;};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"defaultBondTest\",function(){return l;}),r.d(t,\"atomicSequence\",function(){return d;}),r.d(t,\"water\",function(){return f;}),r.d(t,\"atomicHet\",function(){return p;}),r.d(t,\"spheres\",function(){return m;}),r.d(t,\"bundleElementImpl\",function(){return h;}),r.d(t,\"bundleGenerator\",function(){return g;});var n=r(6),i=r(129),a=r(27),o=r(112),s=r(38),u=r(22),c=r(342);function l(e){return u.BondType.isCovalent(e.atomicBond.type);}function d(){return function(e){for(var t=e.inputStructure,r=i.a.Location.create(t),u=[],c=0,l=t.units;c<l.length;c++){var d=l[c];if(0===d.kind){r.unit=d;var f=d.elements;if(r.element=f[0],\"polymer\"===a.e.entity.type(r)){for(var p=n.Segmentation.transientSegments(d.model.atomicHierarchy.residueAtomSegments,f),m=0;p.hasNext;)m++,p.move();m<8||u.push(d);}}}return s.a.Singletons(t,new o.a(u,{parent:t}));};}function f(){return function(e){for(var t=e.inputStructure,r=i.a.Location.create(t),n=[],u=0,c=t.units;u<c.length;u++){var l=c[u];if(0===l.kind){r.unit=l;var d=l.elements;r.element=d[0],\"water\"===a.e.entity.type(r)&&n.push(l);}}return s.a.Singletons(t,new o.a(n,{parent:t}));};}function p(){return function(e){for(var t=e.inputStructure,r=i.a.Location.create(t),u=[],c=0,l=t.units;c<l.length;c++){var d=l[c];if(0===d.kind){r.unit=d;var f=d.elements;if(r.element=f[0],\"water\"!==a.e.entity.type(r)){if(\"polymer\"===a.e.entity.type(r)){for(var p=n.Segmentation.transientSegments(d.model.atomicHierarchy.residueAtomSegments,f),m=0;p.hasNext;)m++,p.move();if(m>=8)continue;}u.push(d);}}}return s.a.Singletons(t,new o.a(u,{parent:t}));};}function m(){return function(e){for(var t=e.inputStructure,r=[],n=0,i=t.units;n<i.length;n++){var a=i[n];1===a.kind&&r.push(a);}return s.a.Singletons(t,new o.a(r,{parent:t}));};}function h(e,t,r){return{groupedUnits:e,ranges:t,set:r};}function g(e){return function(t){var r={hash:t.inputStructure.hashCode,elements:e};return s.a.Sequence(t.inputStructure,[c.a.toStructure(r,t.inputStructure)]);};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(4),o=r(41),s=r(11),u=r(2),c=r(1),l=r(290),d=r(8),f=r(113);!function(e){function t(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){var o,s,u,c,p,m;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return o=void 0,s=f.a.Provider.get(r),!n&&s&&0!==s.assemblies.length&&(n=s.assemblies[0].id),s&&0!==s.assemblies.length?(o=l.b.findAssembly(r,n||\"\"))||e.log.warn(\"Model '\"+r.entryId+\"' has no assembly called '\"+n+\"', returning model structure.\"):e.log.warn(\"Model '\"+r.entryId+\"' has no assembly, returning model structure.\"),u=a.Structure.ofModel(r),o?(n=o.id,[4,a.StructureSymmetry.buildAssembly(u,n).runInContext(t)]):(c={label:\"Model\",description:a.Structure.elementDescription(u)},[2,new d.a.Molecule.Structure(u,c)]);case 1:return p=i.sent(),m={label:\"Assembly \"+n,description:a.Structure.elementDescription(p)},[2,new d.a.Molecule.Structure(p,m)];}});});}function r(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){var o,s,u;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return o=a.Structure.ofModel(t),[4,a.StructureSymmetry.buildSymmetryRange(o,r,n).runInContext(e)];case 1:return s=i.sent(),u={label:\"Symmetry [\"+r+\"] to [\"+n+\"]\",description:a.Structure.elementDescription(s)},[2,new d.a.Molecule.Structure(s,u)];}});});}function n(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,o,s;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return n=a.Structure.ofModel(t),[4,a.StructureSymmetry.builderSymmetryMates(n,r).runInContext(e)];case 1:return o=i.sent(),s={label:\"Symmetry Mates\",description:a.Structure.elementDescription(o)},[2,new d.a.Molecule.Structure(o,s)];}});});}function p(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){var o,s,u;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return o=a.Structure.ofModel(t),[4,a.StructureSymmetry.buildSymmetryAssembly(o,r,n).runInContext(e)];case 1:return s=i.sent(),u={label:\"Symmetry Assembly\",description:a.Structure.elementDescription(s)},[2,new d.a.Molecule.Structure(s,u)];}});});}e.getParams=function(e,t){var r=e&&f.a.Provider.get(e),n=r?r.assemblies.map(function(e){return[e.id,e.id+\": \"+Object(o.d)(e.details)];}):[],i=!r||!s.f.isZero(r.spacegroup.cell),a=[];if(r)for(var l=r.spacegroup.operators,d=0,p=l.length;d<p;d++)a.push([d,d+1+\": \"+s.e.getOperatorXyz(l[d])]);var m=[];e&&e.properties.structAsymMap.forEach(function(e){var t=e.id===e.auth_id?e.id:e.id+\" [auth \"+e.auth_id+\"]\";m.push([e.id,t]);});var h={auto:u.ParamDefinition.EmptyGroup(),model:u.ParamDefinition.EmptyGroup(),assembly:u.ParamDefinition.Group({id:u.ParamDefinition.Optional(e?u.ParamDefinition.Select(n.length?n[0][0]:\"\",n,{label:\"Asm Id\",description:\"Assembly Id\"}):u.ParamDefinition.Text(\"\",{label:\"Asm Id\",description:\"Assembly Id (use empty for the 1st assembly)\"}))},{isFlat:!0}),\"symmetry-mates\":u.ParamDefinition.Group({radius:u.ParamDefinition.Numeric(5,{min:0,max:50,step:1})},{isFlat:!0}),symmetry:u.ParamDefinition.Group({ijkMin:u.ParamDefinition.Vec3(c.Vec3.create(-1,-1,-1),{step:1},{label:\"Min IJK\",fieldLabels:{x:\"I\",y:\"J\",z:\"K\"}}),ijkMax:u.ParamDefinition.Vec3(c.Vec3.create(1,1,1),{step:1},{label:\"Max IJK\",fieldLabels:{x:\"I\",y:\"J\",z:\"K\"}})},{isFlat:!0}),\"symmetry-assembly\":u.ParamDefinition.Group({generators:u.ParamDefinition.ObjectList({operators:u.ParamDefinition.ObjectList({index:u.ParamDefinition.Select(0,a),shift:u.ParamDefinition.Vec3(Object(c.Vec3)(),{step:1},{label:\"IJK\",fieldLabels:{x:\"I\",y:\"J\",z:\"K\"}})},function(e){return e.index+1+\"_\"+e.shift.map(function(e){return e+5;}).join(\"\");},{defaultValue:[]}),asymIds:u.ParamDefinition.MultiSelect([],m)},function(e){return e.asymIds.length+\" asym ids, \"+e.operators.length+\" operators\";},{defaultValue:[]})},{isFlat:!0})},g=[];return\"auto\"===t&&g.push([\"auto\",\"Auto\"]),g.push([\"model\",\"Model\"]),n.length>0&&g.push([\"assembly\",\"Assembly\"]),i&&(g.push([\"symmetry-mates\",\"Symmetry Mates\"]),g.push([\"symmetry\",\"Symmetry (indices)\"]),g.push([\"symmetry-assembly\",\"Symmetry (assembly)\"])),{type:u.ParamDefinition.MappedStatic(t||\"model\",h,{options:g})};},e.canAutoUpdate=function(e,t){return\"symmetry-assembly\"!==t.name&&(\"symmetry\"!==t.name||\"symmetry\"!==e.name);},e.create=function(e,o,s,u){return Object(i.__awaiter)(this,void 0,void 0,function(){var c,l;return Object(i.__generator)(this,function(i){if(!(c=f.a.Provider.get(s))||!u||\"model\"===u.name)return l=a.Structure.ofModel(s),[2,new d.a.Molecule.Structure(l,{label:\"Model\",description:a.Structure.elementDescription(l)})];if(\"auto\"===u.name)return 0===c.assemblies.length?(l=a.Structure.ofModel(s),[2,new d.a.Molecule.Structure(l,{label:\"Model\",description:a.Structure.elementDescription(l)})]):[2,t(e,o,s)];if(\"assembly\"===u.name)return[2,t(e,o,s,u.params.id)];if(\"symmetry\"===u.name)return[2,r(o,s,u.params.ijkMin,u.params.ijkMax)];if(\"symmetry-mates\"===u.name)return[2,n(o,s,u.params.radius)];if(\"symmetry-assembly\"===u.name)return[2,p(o,s,u.params.generators,c)];throw new Error(\"Unknown represetation type: \"+u.name);});});};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return w;});var n=r(0),i=r(2),a=r(33),o=r(4),s=r(13),u=r(80),c=r(101),l=r(319),d=r(162);function f(e){return e;}!function(e){e.CommonParams={ignoreHydrogens:i.ParamDefinition.Optional(i.ParamDefinition.Boolean(!1)),quality:i.ParamDefinition.Optional(i.ParamDefinition.Select(\"auto\",a.b)),theme:i.ParamDefinition.Optional(i.ParamDefinition.Group({globalName:i.ParamDefinition.Optional(i.ParamDefinition.Text(\"\")),carbonByChainId:i.ParamDefinition.Optional(i.ParamDefinition.Boolean(!0)),focus:i.ParamDefinition.Optional(i.ParamDefinition.Group({name:i.ParamDefinition.Optional(i.ParamDefinition.Text(\"\")),params:i.ParamDefinition.Optional(i.ParamDefinition.Value({}))}))}))},e.reprBuilder=function(e,t){var r,n,i,a,o=e.state.data.build(),s=e.builders.structure.representation,u={quality:e.managers.structure.component.state.options.visualQuality,ignoreHydrogens:!e.managers.structure.component.state.options.showHydrogens};return t.quality&&\"auto\"!==t.quality&&(u.quality=t.quality),void 0!==t.ignoreHydrogens&&(u.ignoreHydrogens=!!t.ignoreHydrogens),{update:o,builder:s,color:(null===(r=t.theme)||void 0===r?void 0:r.globalName)?null===(n=t.theme)||void 0===n?void 0:n.globalName:void 0,typeParams:u,ballAndStickColor:void 0!==(null===(i=t.theme)||void 0===i?void 0:i.carbonByChainId)?{carbonByChainId:!!(null===(a=t.theme)||void 0===a?void 0:a.carbonByChainId)}:{}};},e.updateFocusRepr=function(e,t,r,n){if(r||n)return e.state.updateBehavior(l.StructureFocusRepresentation,function(i){var a=Object(d.createStructureColorThemeParams)(e,t,\"ball-and-stick\",r,n);i.surroundingsParams.colorTheme=a,i.targetParams.colorTheme=a;});};}(f||(f={}));var p=f.CommonParams,m=f.reprBuilder,h=f.updateFocusRepr,g=f({id:\"preset-structure-representation-auto\",display:{name:\"Automatic\",description:\"Show representations based on the size of the structure. Smaller structures are shown with more detail than larger ones, ranging from atomistic display to coarse surfaces.\"},params:function params(){return p;},apply:function apply(e,t,r){var i,a,u=null===(a=null===(i=s.StateObjectRef.resolveAndCheck(r.state.data,e))||void 0===i?void 0:i.obj)||void 0===a?void 0:a.data;if(!u)return{};var l=r.config.get(c.PluginConfig.Structure.SizeThresholds)||o.Structure.DefaultSizeThresholds;switch(o.Structure.getSize(u,l)){case o.Structure.Size.Gigantic:case o.Structure.Size.Huge:return _.apply(e,t,r);case o.Structure.Size.Large:return S.apply(e,t,r);case o.Structure.Size.Medium:return b.apply(e,t,r);case o.Structure.Size.Small:return O.apply(e,Object(n.__assign)(Object(n.__assign)({},t),{showCarbohydrateSymbol:!0}),r);}}}),v=f({id:\"preset-structure-representation-empty\",display:{name:\"Empty\",description:\"Removes all existing representations.\"},apply:function apply(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(e){return[2,{}];});});}}),b=f({id:\"preset-structure-representation-polymer-and-ligand\",display:{name:\"Polymer & Ligand\",group:\"Basic\",description:\"Shows polymers as Cartoon, ligands as Ball & Stick, carbohydrates as 3D-SNFG and water molecules semi-transparent.\"},params:function params(){return p;},apply:function apply(e,t,r){var i,a,o,u,c,l,d,f,p,g;return Object(n.__awaiter)(this,void 0,void 0,function(){var v,b,y,_,S,O,C,w,P,j,E,A,T,D;return Object(n.__generator)(this,function(I){switch(I.label){case 0:return(v=s.StateObjectRef.resolveAndCheck(r.state.data,e))?(y={},[4,x(r,v,\"polymer\")]):[2,{}];case 1:return y.polymer=I.sent(),[4,x(r,v,\"ligand\")];case 2:return y.ligand=I.sent(),[4,x(r,v,\"non-standard\")];case 3:return y.nonStandard=I.sent(),[4,x(r,v,\"branched\",{label:\"Carbohydrate\"})];case 4:return y.branched=I.sent(),[4,x(r,v,\"water\")];case 5:return y.water=I.sent(),[4,x(r,v,\"ion\")];case 6:return y.ion=I.sent(),[4,x(r,v,\"lipid\")];case 7:return y.lipid=I.sent(),[4,x(r,v,\"coarse\")];case 8:return y.coarse=I.sent(),b=y,_=v.obj.data,S={sizeFactor:_.isCoarseGrained?.8:.2},O=((null===(o=null===(a=null===(i=b.water)||void 0===i?void 0:i.obj)||void 0===a?void 0:a.data)||void 0===o?void 0:o.elementCount)||0)>5e4?\"line\":\"ball-and-stick\",C=((null===(l=null===(c=null===(u=b.lipid)||void 0===u?void 0:u.obj)||void 0===c?void 0:c.data)||void 0===l?void 0:l.elementCount)||0)>2e4?\"line\":\"ball-and-stick\",w=m(r,t),P=w.update,j=w.builder,E=w.typeParams,A=w.color,T=w.ballAndStickColor,D={polymer:j.buildRepresentation(P,b.polymer,{type:\"cartoon\",typeParams:Object(n.__assign)(Object(n.__assign)({},E),S),color:A},{tag:\"polymer\"}),ligand:j.buildRepresentation(P,b.ligand,{type:\"ball-and-stick\",typeParams:E,color:A,colorParams:T},{tag:\"ligand\"}),nonStandard:j.buildRepresentation(P,b.nonStandard,{type:\"ball-and-stick\",typeParams:E,color:A,colorParams:T},{tag:\"non-standard\"}),branchedBallAndStick:j.buildRepresentation(P,b.branched,{type:\"ball-and-stick\",typeParams:Object(n.__assign)(Object(n.__assign)({},E),{alpha:.3}),color:A,colorParams:T},{tag:\"branched-ball-and-stick\"}),branchedSnfg3d:j.buildRepresentation(P,b.branched,{type:\"carbohydrate\",typeParams:E,color:A},{tag:\"branched-snfg-3d\"}),water:j.buildRepresentation(P,b.water,{type:O,typeParams:Object(n.__assign)(Object(n.__assign)({},E),{alpha:.6}),color:A},{tag:\"water\"}),ion:j.buildRepresentation(P,b.ion,{type:\"ball-and-stick\",typeParams:E,color:A,colorParams:{carbonByChainId:!1}},{tag:\"ion\"}),lipid:j.buildRepresentation(P,b.lipid,{type:C,typeParams:Object(n.__assign)(Object(n.__assign)({},E),{alpha:.6}),color:A,colorParams:{carbonByChainId:!1}},{tag:\"lipid\"}),coarse:j.buildRepresentation(P,b.coarse,{type:\"spacefill\",typeParams:E,color:A||\"chain-id\"},{tag:\"coarse\"})},[4,P.commit({revertOnError:!1})];case 9:return I.sent(),[4,h(r,_,null===(f=null===(d=t.theme)||void 0===d?void 0:d.focus)||void 0===f?void 0:f.name,null===(g=null===(p=t.theme)||void 0===p?void 0:p.focus)||void 0===g?void 0:g.params)];case 10:return I.sent(),[2,{components:b,representations:D}];}});});}}),y=f({id:\"preset-structure-representation-protein-and-nucleic\",display:{name:\"Protein & Nucleic\",group:\"Basic\",description:\"Shows proteins as Cartoon and RNA/DNA as Gaussian Surface.\"},params:function params(){return p;},apply:function apply(e,t,r){var i,a,o,u;return Object(n.__awaiter)(this,void 0,void 0,function(){var c,l,d,f,p,g,v,b,y,_,S,O;return Object(n.__generator)(this,function(x){switch(x.label){case 0:return(c=s.StateObjectRef.resolveAndCheck(r.state.data,e))?(d={},[4,C(r,c,\"protein\")]):[2,{}];case 1:return d.protein=x.sent(),[4,C(r,c,\"nucleic\")];case 2:return d.nucleic=x.sent(),l=d,f=c.obj.data,p={sizeFactor:f.isCoarseGrained?.8:.2},g={radiusOffset:f.isCoarseGrained?2:0,smoothness:f.isCoarseGrained?.5:1.5},v=m(r,t),b=v.update,y=v.builder,_=v.typeParams,S=v.color,O={protein:y.buildRepresentation(b,l.protein,{type:\"cartoon\",typeParams:Object(n.__assign)(Object(n.__assign)({},_),p),color:S},{tag:\"protein\"}),nucleic:y.buildRepresentation(b,l.nucleic,{type:\"gaussian-surface\",typeParams:Object(n.__assign)(Object(n.__assign)({},_),g),color:S},{tag:\"nucleic\"})},[4,b.commit({revertOnError:!0})];case 3:return x.sent(),[4,h(r,f,null===(a=null===(i=t.theme)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.name,null===(u=null===(o=t.theme)||void 0===o?void 0:o.focus)||void 0===u?void 0:u.params)];case 4:return x.sent(),[2,{components:l,representations:O}];}});});}}),_=f({id:\"preset-structure-representation-coarse-surface\",display:{name:\"Coarse Surface\",group:\"Basic\",description:\"Shows polymers as coarse Gaussian Surface.\"},params:function params(){return p;},apply:function apply(e,t,r){var i,a,u,c;return Object(n.__awaiter)(this,void 0,void 0,function(){var l,d,f,p,g,v,b,y,_,S,O,C;return Object(n.__generator)(this,function(w){switch(w.label){case 0:return(l=s.StateObjectRef.resolveAndCheck(r.state.data,e))?(f={},[4,x(r,l,\"polymer\")]):[2,{}];case 1:return f.polymer=w.sent(),d=f,p=l.obj.data,g=o.Structure.getSize(p),v=Object.create(null),g===o.Structure.Size.Gigantic?Object.assign(v,{traceOnly:!0,radiusOffset:2,smoothness:.5,visuals:[\"structure-gaussian-surface-mesh\"]}):g===o.Structure.Size.Huge?Object.assign(v,{radiusOffset:p.isCoarseGrained?2:0,smoothness:.5}):p.isCoarseGrained&&Object.assign(v,{radiusOffset:2,smoothness:.5}),b=m(r,t),y=b.update,_=b.builder,S=b.typeParams,O=b.color,C={polymer:_.buildRepresentation(y,d.polymer,{type:\"gaussian-surface\",typeParams:Object(n.__assign)(Object(n.__assign)({},S),v),color:O},{tag:\"polymer\"})},[4,y.commit({revertOnError:!0})];case 2:return w.sent(),[4,h(r,p,null===(a=null===(i=t.theme)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.name,null===(c=null===(u=t.theme)||void 0===u?void 0:u.focus)||void 0===c?void 0:c.params)];case 3:return w.sent(),[2,{components:d,representations:C}];}});});}}),S=f({id:\"preset-structure-representation-polymer-cartoon\",display:{name:\"Polymer Cartoon\",group:\"Basic\",description:\"Shows polymers as Cartoon.\"},params:function params(){return p;},apply:function apply(e,t,r){var i,a,o,u;return Object(n.__awaiter)(this,void 0,void 0,function(){var c,l,d,f,p,g,v,b,y,_,S;return Object(n.__generator)(this,function(O){switch(O.label){case 0:return(c=s.StateObjectRef.resolveAndCheck(r.state.data,e))?(d={},[4,x(r,c,\"polymer\")]):[2,{}];case 1:return d.polymer=O.sent(),l=d,f=c.obj.data,p={sizeFactor:f.isCoarseGrained?.8:.2},g=m(r,t),v=g.update,b=g.builder,y=g.typeParams,_=g.color,S={polymer:b.buildRepresentation(v,l.polymer,{type:\"cartoon\",typeParams:Object(n.__assign)(Object(n.__assign)({},y),p),color:_},{tag:\"polymer\"})},[4,v.commit({revertOnError:!0})];case 2:return O.sent(),[4,h(r,f,null===(a=null===(i=t.theme)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.name,null===(u=null===(o=t.theme)||void 0===o?void 0:o.focus)||void 0===u?void 0:u.params)];case 3:return O.sent(),[2,{components:l,representations:S}];}});});}}),O=f({id:\"preset-structure-representation-atomic-detail\",display:{name:\"Atomic Detail\",group:\"Basic\",description:\"Shows everything in atomic detail with Ball & Stick.\"},params:function params(){return Object(n.__assign)(Object(n.__assign)({},p),{showCarbohydrateSymbol:i.ParamDefinition.Boolean(!1)});},apply:function apply(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,u,c,l,d,f,p,h,g,v,b,y,_,S,O,C;return Object(n.__generator)(this,function(w){switch(w.label){case 0:return(i=s.StateObjectRef.resolveAndCheck(r.state.data,e))?(o={},[4,x(r,i,\"all\")]):[2,{}];case 1:return o.all=w.sent(),o.branched=void 0,a=o,u=i.obj.data,c=u.elementCount>2e5,l=c?\"line\":\"ball-and-stick\",(d=t.showCarbohydrateSymbol&&!c)?(p=(f=Object).assign,h=[a],g={},[4,x(r,i,\"branched\",{label:\"Carbohydrate\"})]):[3,3];case 2:p.apply(f,h.concat([(g.branched=w.sent(),g)])),w.label=3;case 3:return v=m(r,t),b=v.update,y=v.builder,_=v.typeParams,S=v.color,O=v.ballAndStickColor,C={all:y.buildRepresentation(b,a.all,{type:l,typeParams:_,color:S,colorParams:O},{tag:\"all\"})},d&&Object.assign(C,{snfg3d:y.buildRepresentation(b,a.branched,{type:\"carbohydrate\",typeParams:Object(n.__assign)(Object(n.__assign)({},_),{alpha:.4,visuals:[\"carbohydrate-symbol\"]}),color:S},{tag:\"snfg-3d\"})}),[4,b.commit({revertOnError:!0})];case 4:return w.sent(),[2,{components:a,representations:C}];}});});}});function x(e,t,r,n){return e.builders.structure.tryCreateComponentStatic(t,r,n);}function C(e,t,r,n){return e.builders.structure.tryCreateComponentFromSelection(t,u.b[r],\"selection-\"+r,n);}var w={empty:v,auto:g,\"atomic-detail\":O,\"polymer-cartoon\":S,\"polymer-and-ligand\":b,\"protein-and-nucleic\":y,\"coarse-surface\":_};},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"TrajectoryViewportControls\",function(){return ce;}),r.d(t,\"StateSnapshotViewportControls\",function(){return le;}),r.d(t,\"AnimationViewportControls\",function(){return de;}),r.d(t,\"SelectionViewportControls\",function(){return fe;}),r.d(t,\"LociLabels\",function(){return pe;}),r.d(t,\"CustomStructureControls\",function(){return me;}),r.d(t,\"DefaultStructureTools\",function(){return he;});var n=r(0),i=r(3),a=r(13),o=r(16),s=r(2),u=r(269),c=r(367),l=r(268),d=r(8),f=r(28),p=r(315),m=r(114),h=r(101),g={rcsb:s.ParamDefinition.Group({encoding:s.ParamDefinition.Select(\"bcif\",[[\"cif\",\"cif\"],[\"bcif\",\"bcif\"]])},{label:\"RCSB PDB\",isFlat:!0}),pdbe:s.ParamDefinition.Group({variant:s.ParamDefinition.Select(\"updated-bcif\",[[\"updated-bcif\",\"Updated (bcif)\"],[\"updated\",\"Updated\"],[\"archival\",\"Archival\"]])},{label:\"PDBe\",isFlat:!0})};a.StateAction.build({from:d.a.Root,display:{name:\"Download Structure\",description:\"Load a structure from the provided source and create its representation.\"},params:function params(e,t){var r=function(e){return s.ParamDefinition.Group({type:l.a.getParams(void 0,\"auto\").type,representation:s.ParamDefinition.Select(u.a.auto.id,e.builders.structure.representation.getPresets().map(function(e){return[e.id,e.display.name,e.display.group];}),{description:\"Which representation preset to use.\"}),asTrajectory:s.ParamDefinition.Optional(s.ParamDefinition.Boolean(!1,{description:\"Load all entries into a single trajectory.\"}))},{isExpanded:!1});}(t),n=t.config.get(h.PluginConfig.Download.DefaultPdbProvider)||\"pdbe\";return{source:s.ParamDefinition.MappedStatic(\"pdb\",{pdb:s.ParamDefinition.Group({provider:s.ParamDefinition.Group({id:s.ParamDefinition.Text(\"1tqn\",{label:\"PDB Id(s)\",description:\"One or more comma/space separated PDB ids.\"}),server:s.ParamDefinition.MappedStatic(n,g)},{pivot:\"id\"}),options:r},{isFlat:!0,label:\"PDB\"}),\"pdb-dev\":s.ParamDefinition.Group({provider:s.ParamDefinition.Group({id:s.ParamDefinition.Text(\"PDBDEV_00000001\",{label:\"PDBDev Id(s)\",description:\"One or more comma/space separated ids.\"}),encoding:s.ParamDefinition.Select(\"bcif\",[[\"cif\",\"cif\"],[\"bcif\",\"bcif\"]])},{pivot:\"id\"}),options:r},{isFlat:!0,label:\"PDBDEV\"}),swissmodel:s.ParamDefinition.Group({id:s.ParamDefinition.Text(\"Q9Y2I8\",{label:\"UniProtKB AC(s)\",description:\"One or more comma/space separated ACs.\"}),options:r},{isFlat:!0,label:\"SWISS-MODEL\",description:\"Loads the best homology model or experimental structure\"}),pubchem:s.ParamDefinition.Group({id:s.ParamDefinition.Text(\"2244,2245\",{label:\"PubChem ID\",description:\"One or more comma/space separated IDs.\"}),options:r},{isFlat:!0,label:\"PubChem\",description:\"Loads 3D conformer from PubChem.\"}),url:s.ParamDefinition.Group({url:s.ParamDefinition.Url(\"\"),format:s.ParamDefinition.Select(\"mmcif\",s.ParamDefinition.arrayToOptions(c.a.map(function(e){return e[0];}),function(e){return e;})),isBinary:s.ParamDefinition.Boolean(!1),options:r},{isFlat:!0,label:\"URL\"})})};}})(function(e,t){var r=e.params,i=e.state;return o.b.create(\"Download Structure\",function(e){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var a,o,s,c,l,d,f;return Object(n.__generator)(this,function(p){switch(p.label){case 0:switch(t.behaviors.layout.leftPanelTabName.next(\"data\"),a=r.source,s=!1,c=\"mmcif\",a.name){case\"url\":o=[{url:a.params.url,isBinary:a.params.isBinary}],c=a.params.format;break;case\"pdb\":o=\"pdbe\"===a.params.provider.server.name?\"updated\"===a.params.provider.server.params.variant?v(a.params.provider.id,function(e){return\"https://www.ebi.ac.uk/pdbe/static/entry/\"+e.toLowerCase()+\"_updated.cif\";},function(e){return\"PDBe: \"+e+\" (updated cif)\";},!1):\"updated-bcif\"===a.params.provider.server.params.variant?v(a.params.provider.id,function(e){return\"https://www.ebi.ac.uk/pdbe/entry-files/download/\"+e.toLowerCase()+\".bcif\";},function(e){return\"PDBe: \"+e+\" (updated cif)\";},!0):v(a.params.provider.id,function(e){return\"https://www.ebi.ac.uk/pdbe/static/entry/\"+e.toLowerCase()+\".cif\";},function(e){return\"PDBe: \"+e+\" (cif)\";},!1):\"cif\"===a.params.provider.server.params.encoding?v(a.params.provider.id,function(e){return\"https://files.rcsb.org/download/\"+e.toUpperCase()+\".cif\";},function(e){return\"RCSB: \"+e+\" (cif)\";},!1):v(a.params.provider.id,function(e){return\"https://models.rcsb.org/\"+e.toUpperCase()+\".bcif\";},function(e){return\"RCSB: \"+e+\" (bcif)\";},!0),s=!!a.params.options.asTrajectory;break;case\"pdb-dev\":o=v(a.params.provider.id,function(e){var t=e.toUpperCase().startsWith(\"PDBDEV_\")?e:\"PDBDEV_\"+e.padStart(8,\"0\");return\"bcif\"===a.params.provider.encoding?\"https://pdb-dev.wwpdb.org/bcif/\"+t.toUpperCase()+\".bcif\":\"https://pdb-dev.wwpdb.org/cif/\"+t.toUpperCase()+\".cif\";},function(e){return e.toUpperCase().startsWith(\"PDBDEV_\")?e:\"PDBDEV_\"+e.padStart(8,\"0\");},\"bcif\"===a.params.provider.encoding),s=!!a.params.options.asTrajectory;break;case\"swissmodel\":o=v(a.params.id,function(e){return\"https://swissmodel.expasy.org/repository/uniprot/\"+e.toUpperCase()+\".pdb\";},function(e){return\"SWISS-MODEL: \"+e;},!1),s=!!a.params.options.asTrajectory,c=\"pdb\";break;case\"pubchem\":o=v(a.params.id,function(e){return\"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/\"+e.trim()+\"/record/SDF/?record_type=3d\";},function(e){return\"PubChem: \"+e;},!1),s=!!a.params.options.asTrajectory,c=\"mol\";break;default:throw new Error(a.name+\" not supported.\");}return l=r.source.params.options.representation||u.a.auto.id,d=l!==u.a.empty.id,f=\"auto\"===a.params.options.type.name?void 0:a.params.options.type,[4,i.transaction(function(){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var e,r,i,a,u,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return o.length>0&&s?[4,t.builders.data.downloadBlob({sources:o.map(function(e,t){return{id:\"\"+t,url:e.url,isBinary:e.isBinary};}),maxConcurrency:6},{state:{isGhost:!0}})]:[3,4];case 1:return e=n.sent(),[4,t.builders.structure.parseTrajectory(e,{formats:o.map(function(e,t){return{id:\"\"+t,format:\"cif\"};})})];case 2:return p=n.sent(),[4,t.builders.structure.hierarchy.applyPreset(p,\"default\",{structure:f,showUnitcell:d,representationPreset:l})];case 3:return n.sent(),[3,10];case 4:r=0,i=o,n.label=5;case 5:return r<i.length?(a=i[r],[4,t.builders.data.download(a,{state:{isGhost:!0}})]):[3,10];case 6:return u=n.sent(),[4,t.builders.structure.parseTrajectory(u,c)];case 7:return p=n.sent(),[4,t.builders.structure.hierarchy.applyPreset(p,\"default\",{structure:f,showUnitcell:d,representationPreset:l})];case 8:n.sent(),n.label=9;case 9:return r++,[3,5];case 10:return[2];}});});}).runInContext(e)];case 1:return p.sent(),[2];}});});});});function v(e,t,r,n){for(var i=[],a=0,o=e.split(/[,\\s]/).map(function(e){return e.trim();}).filter(function(e){return!!e&&(e.length>=4||/^[1-9][0-9]*$/.test(e));});a<o.length;a++){var s=o[a];i.push({url:m.Asset.Url(t(s)),isBinary:n,label:r(s)});}return i;}var b,y,_=a.StateAction.build({display:{name:\"Update Trajectory\"},params:{action:s.ParamDefinition.Select(\"advance\",[[\"advance\",\"Advance\"],[\"reset\",\"Reset\"]]),by:s.ParamDefinition.Optional(s.ParamDefinition.Numeric(1,{min:-1,max:1,step:1}))}})(function(e){var t=e.params,r=e.state,n=r.selectQ(function(e){return e.ofTransformer(f.StateTransforms.Model.ModelFromTrajectory);}),i=r.build();if(\"reset\"===t.action)for(var o=0,s=n;o<s.length;o++){var u=s[o];i.to(u).update({modelIndex:0});}else for(var c=function c(e){var n=a.StateSelection.findAncestorOfType(r.tree,r.cells,e.transform.ref,[d.a.Molecule.Trajectory]);if(!n||!n.obj)return\"continue\";var o=n.obj;i.to(e).update(function(e){var r=(e.modelIndex+t.by)%o.data.length;return r<0&&(r+=o.data.length),{modelIndex:r};});},l=0,p=n;l<p.length;l++){c(u=p[l]);}return r.updateTree(i);}),S=(a.StateAction.build({display:{name:\"Custom Model Properties\",description:\"Enable parameters for custom properties of the model.\"},from:d.a.Molecule.Model,params:function params(e,t){return t.customModelProperties.getParams(null==e?void 0:e.data);},isApplicable:function isApplicable(e,t,r){return t.transformer!==p.CustomModelProperties;}})(function(e,t){var r=e.ref,n=e.params;return t.builders.structure.insertModelProperties(r,n);}),a.StateAction.build({display:{name:\"Custom Structure Properties\",description:\"Enable parameters for custom properties of the structure.\"},from:d.a.Molecule.Structure,params:function params(e,t){return t.customStructureProperties.getParams(null==e?void 0:e.data);},isApplicable:function isApplicable(e,t,r){return t.transformer!==p.CustomStructureProperties;}})(function(e,t){var r=e.ref,n=e.params;return t.builders.structure.insertStructureProperties(r,n);}),a.StateAction.build({display:{name:\"Add Trajectory\",description:\"Add trajectory from existing model/topology and coordinates.\"},from:d.a.Root,params:function params(e,t){var r=t.state.data,i=Object(n.__spreadArrays)(r.selectQ(function(e){return e.rootsOfType(d.a.Molecule.Model);}),r.selectQ(function(e){return e.rootsOfType(d.a.Molecule.Topology);})).map(function(e){return[e.transform.ref,e.obj.label];}),a=r.selectQ(function(e){return e.rootsOfType(d.a.Molecule.Coordinates);}).map(function(e){return[e.transform.ref,e.obj.label];});return{model:s.ParamDefinition.Select(i.length?i[0][0]:\"\",i),coordinates:s.ParamDefinition.Select(a.length?a[0][0]:\"\",a)};}})(function(e,t){var r=e.params,i=e.state;return o.b.create(\"Add Trajectory\",function(e){return i.transaction(function(){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=[r.model,r.coordinates],o=i.build().toRoot().apply(p.TrajectoryFromModelAndCoordinates,{modelRef:r.model,coordinatesRef:r.coordinates},{dependsOn:a}).apply(f.StateTransforms.Model.ModelFromTrajectory,{modelIndex:0}),[4,i.updateTree(o).runInContext(e)];case 1:return n.sent(),[4,t.builders.structure.createStructure(o.selector)];case 2:return s=n.sent(),[4,t.builders.structure.representation.applyPreset(s,\"auto\")];case 3:return n.sent(),[2];}});});}).runInContext(e);});}),r(26)),O=r(32),x=r(19),C=r(14),w=r(67),P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.updateParams=function(e){var r;t.plugin.managers.animation.updateParams(((r={})[e.name]=e.value,r));},t.updateCurrentParams=function(e){var r;t.plugin.managers.animation.updateCurrentParams(((r={})[e.name]=e.value,r));},t.startOrStop=function(){var e=t.plugin.managers.animation;\"playing\"===e.state.animationState?e.stop():(t.props.onStart&&t.props.onStart(),e.start());},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.animation.events.updated,function(){return e.forceUpdate();});},t.prototype.render=function(){var e,t,r=this.plugin.managers.animation;if(r.isEmpty)return null;var n=\"playing\"===r.state.animationState,a=null===(t=(e=r.current.anim).canApply)||void 0===t?void 0:t.call(e,this.plugin);return i.createElement(i.Fragment,null,i.createElement(w.ParameterControls,{params:r.getParams(),values:r.state.params,onChange:this.updateParams,isDisabled:n}),i.createElement(w.ParameterControls,{params:r.current.params,values:r.current.paramValues,onChange:this.updateCurrentParams,isDisabled:n}),i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(x.Button,{icon:\"playing\"!==r.state.animationState?void 0:C.PlayArrowSvg,onClick:this.startOrStop,disabled:void 0!==a&&!1===a.canApply},\"playing\"===r.state.animationState?\"Stop\":void 0===a||a.canApply?\"Start\":a.reason||\"Start\")));},t;}(O.PluginUIComponent),j=r(321),E=r(386),A=r(206),T=r(391),D=r(371),I=r(4),M=r(105),k=r(64);function B(e,t){if(Math.abs(e)>Math.abs(t)){var r=t/e;return Math.abs(e)*Math.sqrt(1+r*r);}if(0!==t){r=e/t;return Math.abs(t)*Math.sqrt(1+r*r);}return 0;}(y=b||(b={})).createCache=function(e){return{size:e,matrix:k.a.create(e,e),eigenValues:new Float64Array(e),D:new Float64Array(e),E:new Float64Array(e)};},y.compute=function(e){!function(e,t,r,n,i){for(var a=0;a<e;a++)i[a]=0;var o=e-1;for(a=0;a<e;a++)n[a]=t[a*e+o];for(function(e,t,r,n){for(var i=n-1;i>0;i--){for(var a=0,o=0,s=0;s<i;s++)a+=Math.abs(t[s]);if(0===a){r[i]=t[i-1];for(var u=0;u<i;u++)t[u]=e[u*n+i-1],e[u*n+i]=0,e[i*n+u]=0;}else{for(s=0;s<i;s++)t[s]/=a,o+=t[s]*t[s];var c=t[i-1],l=Math.sqrt(o);for(c>0&&(l=-l),r[i]=a*l,o-=c*l,t[i-1]=c-l,u=0;u<i;u++)r[u]=0;for(u=0;u<i;u++){for(c=t[u],e[i*n+u]=c,l=r[u]+e[u*n+u]*c,s=u+1;s<=i-1;s++)l+=e[u*n+s]*t[s],r[s]+=e[u*n+s]*c;r[u]=l;}for(c=0,u=0;u<i;u++)r[u]/=o,c+=r[u]*t[u];var d=c/(o+o);for(u=0;u<i;u++)r[u]-=d*t[u];for(u=0;u<i;u++){for(c=t[u],l=r[u],s=u;s<=i-1;s++)e[u*n+s]-=c*r[s]+l*t[s];t[u]=e[u*n+i-1],e[u*n+i]=0;}}t[i]=o;}for(i=0;i<n-1;i++){if(e[i*n+n-1]=e[i*n+i],e[i*n+i]=1,0!==(o=t[i+1])){for(s=0;s<=i;s++)t[s]=e[(i+1)*n+s]/o;for(u=0;u<=i;u++){for(l=0,s=0;s<=i;s++)l+=e[(i+1)*n+s]*e[u*n+s];for(s=0;s<=i;s++)e[u*n+s]-=l*t[s];}}for(s=0;s<=i;s++)e[(i+1)*n+s]=0;}for(u=0;u<n;u++)t[u]=e[u*n+n-1],e[u*n+n-1]=0;e[n*n-1]=1,r[0]=0;}(t,n,i,e),function(e,t,r,n){for(var i=1;i<n;i++)r[i-1]=r[i];r[n-1]=0;for(var a=0,o=0,s=Math.pow(2,-53),u=0;u<n;u++){o=Math.max(o,Math.abs(t[u])+Math.abs(r[u]));for(var c=u;c<n&&!(Math.abs(r[c])<=s*o);)c++;if(c>u){var l=0;do{l+=1;var d=t[u],f=B(O=(t[u+1]-d)/(2*r[u]),1);O<0&&(f=-f),t[u]=r[u]/(O+f),t[u+1]=r[u]*(O+f);var p=t[u+1],m=d-t[u];for(i=u+2;i<n;i++)t[i]-=m;a+=m,O=t[c];var h=1,g=h,v=h,b=r[u+1],y=0,_=0;for(i=c-1;i>=u;i--){v=g,g=h,_=y,d=h*r[i],m=h*O,f=B(O,r[i]),r[i+1]=y*f,y=r[i]/f,O=(h=O/f)*t[i]-y*d,t[i+1]=m+y*(h*d+y*t[i]);for(var S=0;S<n;S++)m=e[(i+1)*n+S],e[(i+1)*n+S]=y*e[i*n+S]+h*m,e[i*n+S]=h*e[i*n+S]-y*m;}if(O=-y*_*v*b*r[u]/p,r[u]=y*O,t[u]=h*O,l>=1e3)throw\"SVD: Not converging.\";}while(Math.abs(r[u])>s*o);}t[u]=t[u]+a,r[u]=0;}for(i=0;i<n-1;i++){S=i;for(var O=t[i],x=i+1;x<n;x++)t[x]<O&&(S=x,O=t[x]);if(S!==i)for(t[S]=t[i],t[i]=O,x=0;x<n;x++)O=e[i*n+x],e[i*n+x]=e[S*n+x],e[S*n+x]=O;}}(t,n,i,e),a=0;a<e;a++)r[a]=n[a];}(e.size,e.matrix.data,e.eigenValues,e.D,e.E);};var V,R,L=r(195),N=r(273);R=V||(V={}),(R.Positions||(R.Positions={})).empty=function(e){return{x:new Float64Array(e),y:new Float64Array(e),z:new Float64Array(e)};},R.compute=function(e,t){return void 0===t&&(t={bTransform:M.a.zero(),rmsd:0}),function(e){var t=function(e){var t=e.evdCache.matrix;k.a.makeZero(t);for(var r=e.a.x,n=e.a.y,i=e.a.z,a=e.b.x,o=e.b.y,s=e.b.z,u=e.centerA,c=e.centerB,l=0,d=0,f=e.a.x.length;d<f;d++){var p=r[d]-u[0],m=n[d]-u[1],h=i[d]-u[2],g=a[d]-c[0],v=o[d]-c[1],b=s[d]-c[2];l+=p*p+m*m+h*h+g*g+v*v+b*b,k.a.add(t,0,0,p*g+m*v+h*b),k.a.add(t,0,1,-h*v+m*b),k.a.add(t,0,2,h*g-p*b),k.a.add(t,0,3,-m*g+p*v),k.a.add(t,1,0,-h*v+m*b),k.a.add(t,1,1,p*g-m*v-h*b),k.a.add(t,1,2,m*g+p*v),k.a.add(t,1,3,h*g+p*b),k.a.add(t,2,0,h*g-p*b),k.a.add(t,2,1,m*g+p*v),k.a.add(t,2,2,-p*g+m*v-h*b),k.a.add(t,2,3,h*v+m*b),k.a.add(t,3,0,-m*g+p*v),k.a.add(t,3,1,h*g+p*b),k.a.add(t,3,2,h*v+m*b),k.a.add(t,3,3,-p*g-m*v+h*b);}return l;}(e);b.compute(e.evdCache);var r=t-2*e.evdCache.eigenValues[3];r=r<0?0:Math.sqrt(r/e.a.x.length),function(e){var t=e.evdCache.matrix,r=k.a.get(t,1,3),n=k.a.get(t,2,3),i=k.a.get(t,3,3),a=k.a.get(t,0,3),o=2*n*n,s=2*i*i,u=2*r*r,c=2*r*n,l=2*a*i,d=2*r*i,f=2*a*n,p=2*n*i,m=2*a*r,h=e.translateB;M.a.setValue(h,0,3,-e.centerB[0]),M.a.setValue(h,1,3,-e.centerB[1]),M.a.setValue(h,2,3,-e.centerB[2]),h=e.rotateB,M.a.setValue(h,0,0,1-o-s),M.a.setValue(h,0,1,c+l),M.a.setValue(h,0,2,d-f),M.a.setValue(h,1,0,c-l),M.a.setValue(h,1,1,1-u-s),M.a.setValue(h,1,2,p+m),M.a.setValue(h,2,0,d+f),M.a.setValue(h,2,1,p-m),M.a.setValue(h,2,2,1-u-o),M.a.setValue(h,3,3,1),M.a.mul(e.tempMatrix,e.rotateB,e.translateB),h=e.translateB,M.a.setValue(h,0,3,e.centerA[0]),M.a.setValue(h,1,3,e.centerA[1]),M.a.setValue(h,2,3,e.centerA[2]),M.a.mul(e.result.bTransform,e.translateB,e.tempMatrix);}(e),e.result.rmsd=r;}(new F(e,t)),t;};var F=function F(e,t){this.evdCache=b.createCache(4),this.translateB=M.a.identity(),this.rotateB=M.a.identity(),this.tempMatrix=M.a.identity(),this.a=e.a,this.b=e.b,e.centerA?this.centerA=e.centerA:this.centerA=e.centerA=L.a.fromArrays(e.a,Object(N.a)()).center,e.centerB?this.centerB=e.centerB:this.centerB=e.centerB=L.a.fromArrays(e.b,Object(N.a)()).center,this.result=t;};var U=r(129),z=r(6),H=r(27),G=[[4,0,-2,-1,-2,0,-2,-1,-1,-1,-1,-2,-1,-1,-1,1,0,0,-3,-2],[0,9,-3,-4,-2,-3,-3,-1,-3,-1,-1,-3,-3,-3,-3,-1,-1,-1,-2,-2],[-2,-3,6,2,-3,-1,-1,-3,-1,-4,-3,1,-1,0,-2,0,-1,-3,-4,-3],[-1,-4,2,5,-3,-2,0,-3,1,-3,-2,0,-1,2,0,0,-1,-2,-3,-2],[-2,-2,-3,-3,6,-3,-1,0,-3,0,0,-3,-4,-3,-3,-2,-2,-1,1,3],[0,-3,-1,-2,-3,6,-2,-4,-2,-4,-3,0,-2,-2,-2,0,-2,-3,-2,-3],[-2,-3,-1,0,-1,-2,8,-3,-1,-3,-2,1,-2,0,0,-1,-2,-3,-2,2],[-1,-1,-3,-3,0,-4,-3,4,-3,2,1,-3,-3,-3,-3,-2,-1,3,-3,-1],[-1,-3,-1,1,-3,-2,-1,-3,5,-2,-1,0,-1,1,2,0,-1,-2,-3,-2],[-1,-1,-4,-3,0,-4,-3,2,-2,4,2,-3,-3,-2,-2,-2,-1,1,-2,-1],[-1,-1,-3,-2,0,-3,-2,1,-1,2,5,-2,-2,0,-1,-1,-1,1,-1,-1],[-2,-3,1,0,-3,0,1,-3,0,-3,-2,6,-2,0,0,1,0,-3,-4,-2],[-1,-3,-1,-1,-4,-2,-2,-3,-1,-3,-2,-2,7,-1,-2,-1,-1,-2,-4,-3],[-1,-3,0,2,-3,-2,0,-3,1,-2,0,0,-1,5,1,0,-1,-2,-2,-1],[-1,-3,-2,0,-3,-2,0,-3,2,-2,-1,0,-2,1,5,-1,-1,-3,-3,-2],[1,-1,0,0,-2,0,-1,-2,0,-2,-1,1,-1,0,-1,4,1,-2,-3,-2],[0,-1,-1,-1,-2,-2,-2,-1,-1,-1,-1,0,-1,-1,-1,1,5,0,-2,-2],[0,-1,-3,-2,-1,-3,-3,3,-2,1,1,-3,-2,-2,-3,-2,0,4,-3,-1],[-3,-2,-4,-3,1,-2,-2,-3,-3,-2,-1,-4,-4,-2,-3,-3,-2,-3,11,2],[-2,-2,-3,-2,3,-3,2,-1,-2,-1,-1,-2,-3,-1,-2,-2,-2,-1,2,7]];function q(e,t){var r,n=0,i={};return t.forEach(function(t){r=0;var a={};t.forEach(function(t){return a[e[r++]]=t;}),i[e[n++]]=a;}),i;}var W={blosum62:q(\"ARNDCQEGHILKMFPSTWYVBZX\",[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1]]),blosum62x:q(\"ACDEFGHIKLMNPQRSTVWY\",G)},Q={gapPenalty:-11,gapExtensionPenalty:-1,substMatrix:\"default\"};var Y,X=function(){function e(e,t,r){this.seqA=e,this.seqB=t,this.S=[],this.V=[],this.H=[],this.gapPenalty=r.gapPenalty,this.gapExtensionPenalty=r.gapExtensionPenalty,this.substMatrix=\"default\"===r.substMatrix?void 0:W[r.substMatrix],this.n=this.seqA.length,this.m=this.seqB.length;}return e.prototype.initMatrices=function(){for(var e=this,t=e.n,r=e.m,n=e.gapPenalty,i=e.S,a=e.V,o=e.H,s=0;s<=t;++s){i[s]=[],a[s]=[],o[s]=[];for(var u=0;u<=r;++u)i[s][u]=0,a[s][u]=0,o[s][u]=0;}for(s=0;s<=t;++s)i[s][0]=n,o[s][0]=-1/0;for(u=0;u<=r;++u)i[0][u]=n,a[0][u]=-1/0;i[0][0]=0;},e.prototype.makeScoreFn=function(){var e=this.seqA,t=this.seqB,r=this.substMatrix;return r?function(n,i){var a,o,s=e[n],u=t[i];return null!==(o=null===(a=r[s])||void 0===a?void 0:a[u])&&void 0!==o?o:-4;}:function(r,n){return e[r]===t[n]?5:-3;};},e.prototype.calculate=function(){this.initMatrices();for(var e,t,r,n,i,a=this.makeScoreFn(),o=this,s=o.V,u=o.H,c=o.S,l=o.n,d=o.m,f=o.gapExtensionPenalty,p=o.gapPenalty,m=1;m<=l;++m){t=c[m-1],e=s[m-1],r=s[m],n=u[m],i=c[m];for(var h=1;h<=d;++h)r[h]=Math.max(t[h]+p,e[h]+f),n[h]=Math.max(i[h-1]+p,n[h-1]+f),i[h]=Math.max(t[h-1]+a(m-1,h-1),r[h],n[h]);}},e.prototype.trace=function(){var e,t,r=this.makeScoreFn(),n=this,i=n.V,a=n.H,o=n.S,s=n.seqA,u=n.seqB,c=n.gapExtensionPenalty,l=n.gapPenalty,d=this.n,f=this.m,p=\"\",m=\"\";for(o[d][f]>=i[d][f]?(e=\"S\",t=o[d][f]):i[d][f]>=a[d][f]?(e=\"V\",t=i[d][f]):(e=\"H\",t=a[d][f]);d>0&&f>0;)\"S\"===e?o[d][f]===o[d-1][f-1]+r(d-1,f-1)?(p=s[d-1]+p,m=u[f-1]+m,--d,--f,e=\"S\"):o[d][f]===i[d][f]?e=\"V\":o[d][f]===a[d][f]?e=\"H\":(--d,--f):\"V\"===e?i[d][f]===i[d-1][f]+c?(p=s[d-1]+p,m=\"-\"+m,--d,e=\"V\"):i[d][f]===o[d-1][f]+l?(p=s[d-1]+p,m=\"-\"+m,--d,e=\"S\"):--d:\"H\"===e&&(a[d][f]===a[d][f-1]+c?(p=\"-\"+p,m=u[f-1]+m,--f,e=\"H\"):a[d][f]===o[d][f-1]+l?(p=\"-\"+p,m=u[f-1]+m,--f,e=\"S\"):--f);for(;d>0;)p=s[d-1]+p,m=\"-\"+m,--d;for(;f>0;)p=\"-\"+p,m=u[f-1]+m,--f;return{aliA:p,aliB:m,score:t};},e;}();function K(e){return e.model.sequence.byEntityKey[function(e){switch(e.kind){case 0:return e.model.atomicHierarchy.index.getEntityFromChain(e.chainIndex[e.elements[0]]);case 1:return e.model.coarseHierarchy.spheres.entityKey[e.elements[0]];case 2:return e.model.coarseHierarchy.gaussians.entityKey[e.elements[0]];}}(e)].sequence;}!function(e){function t(e){var t=new Map();if(H.g.isAtomic(e.unit))for(var r=e.unit.model.atomicHierarchy.residues.label_seq_id,n=e.unit.residueIndex,i=0,a=z.OrderedSet.size(e.indices);i<a;++i){var o=z.OrderedSet.getAt(e.indices,i),s=e.unit.elements[o],u=r.value(n[s]);t.has(u)?t.get(u).push(o):t.set(u,[o]);}else if(H.g.isCoarse(e.unit)){var c=(H.g.isSpheres(e.unit)?e.unit.model.coarseHierarchy.spheres:e.unit.model.coarseHierarchy.gaussians).seq_id_begin;for(i=0,a=z.OrderedSet.size(e.indices);i<a;++i){o=z.OrderedSet.getAt(e.indices,i),s=e.unit.elements[o],u=c.value(s);t.set(u,[o]);}}return t;}e.compute=function(e,r){void 0===r&&(r={});for(var i=K(e.a.unit),a=K(e.b.unit),o=t(e.a),s=t(e.b),u=[],c=[],l=function(e,t,r){void 0===r&&(r={});var i=Object(n.__assign)(Object(n.__assign)({},Q),r),a=new X(e,t,i);return a.calculate(),a.trace();}(i.code.toArray(),a.code.toArray(),r),d=l.aliA,f=l.aliB,p=l.score,m=0,h=0,g=0,v=d.length;g<v;++g)if(\"-\"!==d[g]&&\"-\"!==f[g]){var b=i.seqId.value(m),y=a.seqId.value(h);if(o.has(b)&&s.has(y))for(var _=o.get(b),S=s.get(y),O=0,x=Math.min(_.length,S.length);O<x;++O)u.push(_[O]),c.push(S[O]);m+=1,h+=1;}else\"-\"!==d[g]&&(m+=1),\"-\"!==f[g]&&(h+=1);var C=z.OrderedSet.intersect(z.OrderedSet.ofSortedArray(u),e.a.indices),w=z.OrderedSet.intersect(z.OrderedSet.ofSortedArray(c),e.b.indices);return{a:{unit:e.a.unit,indices:C},b:{unit:e.b.unit,indices:w},score:p};};}(Y||(Y={}));var Z=r(168);function J(e){var t=[];if(e.length<=0)return t;var r=function(e){if(0===e.length)return 0;for(var t=U.a.Loci.size(e[0]),r=1;r<e.length;r++){var n=U.a.Loci.size(e[r]);n<t&&(t=n);}return t;}(e),n={a:te(e[0],r),b:te(e[1],r)};t[0]=V.compute(n);for(var i=2;i<e.length;i++)n.b=te(e[i],r),n.centerB=void 0,t.push(V.compute(n));return t;}var $=/(polypeptide|cyclic-pseudo-peptide)/i;function ee(e){var t=[];if(e.length<=0)return t;for(var r=U.a.Loci.getFirstLocation(e[0]),i=Z.a.entity.subtype(r).match($)?\"blosum62\":\"default\",a=1;a<e.length;a++){var o=Y.compute({a:e[0].elements[0],b:e[a].elements[0]},{substMatrix:i}),s=o.a,u=o.b,c=o.score,l=U.a.Loci(e[0].structure,[s]),d=U.a.Loci(e[a].structure,[u]),f=z.OrderedSet.size(s.indices);t.push(Object(n.__assign)(Object(n.__assign)({},V.compute({a:te(l,f),b:te(d,f)})),{alignmentScore:c}));}return t;}function te(e,t){for(var r=V.Positions.empty(t),n=0,i=0,a=e.elements;i<a.length;i++){for(var o=a[i],s=o.unit,u=o.indices,c=s.elements,l=s.conformation,d=l.x,f=l.y,p=l.z,m=0,h=z.OrderedSet.size(u);m<h;m++){var g=c[z.OrderedSet.getAt(u,m)];if(r.x[n]=d(g),r.y[n]=f(g),r.z[n]=p(g),++n>=t)break;}if(n>=t)break;}return r;}var re=r(80),ne=r(70),ie=r(41),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{isCollapsed:!1,header:\"Superposition\",brand:{accent:\"gray\",svg:C.SuperpositionSvg},isHidden:!0};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){e.setState({isHidden:t.structures.length<2});});},t.prototype.renderControls=function(){return i.createElement(i.Fragment,null,i.createElement(ue,null));},t;}(O.CollapsableControls),oe={alignSequences:s.ParamDefinition.Boolean(!0,{isEssential:!0,description:\"Perform a sequence alignment and use the aligned residue pairs to guide the 3D superposition.\"})},se=s.ParamDefinition.getDefaultValues(oe),ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,action:void 0,options:se},t.superposeChains=function(){return Object(n.__awaiter)(t,void 0,void 0,function(){var e,t,r,i,a,o,s,u,c,l,d,f,p,m=this;return Object(n.__generator)(this,function(n){switch(n.label){case 0:e=re.b.trace.query,t=this.chainEntries,r=t.map(function(t,r){var n=I.StructureElement.Loci.toStructure(t.loci),i=I.StructureSelection.toLociWithSourceUnits(e(new I.QueryContext(n)));return I.StructureElement.Loci.remap(i,0===r?m.plugin.helpers.substructureParent.get(t.loci.structure.root).obj.data:i.structure.root);}),i=this.state.options.alignSequences?ee(r):J(r),a=t[0],o=1,s=r.length,n.label=1;case 1:return o<s?(u=t[o],c=i[o-1],l=c.bTransform,d=c.rmsd,[4,this.transform(u.cell,l)]):[3,4];case 2:n.sent(),f=Object(ie.e)(a.label),p=Object(ie.e)(u.label),this.plugin.log.info(\"Superposed [\"+f+\"] and [\"+p+\"] with RMSD \"+d.toFixed(2)+\".\"),n.label=3;case 3:return++o,[3,1];case 4:return[2];}});});},t.superposeAtoms=function(){return Object(n.__awaiter)(t,void 0,void 0,function(){var e,t,r,i,a,o,s,u,c,l,d,f,p,m=this;return Object(n.__generator)(this,function(n){switch(n.label){case 0:e=this.atomEntries,t=e.map(function(e,t){return I.StructureElement.Loci.remap(e.loci,0===t?m.plugin.helpers.substructureParent.get(e.loci.structure.root).obj.data:e.loci.structure.root);}),r=J(t),i=e[0],a=1,o=t.length,n.label=1;case 1:return a<o?(s=e[a],u=r[a-1],c=u.bTransform,l=u.rmsd,[4,this.transform(s.cell,c)]):[3,4];case 2:n.sent(),d=Object(ie.e)(i.label),f=Object(ie.e)(s.label),p=e[a].atoms.length,this.plugin.log.info(\"Superposed \"+p+\" \"+(1===p?\"atom\":\"atoms\")+\" of [\"+d+\"] and [\"+f+\"] with RMSD \"+l.toFixed(2)+\".\"),n.label=3;case 3:return++a,[3,1];case 4:return[2];}});});},t.toggleByChains=function(){return t.setState({action:\"byChains\"===t.state.action?void 0:\"byChains\"});},t.toggleByAtoms=function(){return t.setState({action:\"byAtoms\"===t.state.action?void 0:\"byAtoms\"});},t.toggleOptions=function(){return t.setState({action:\"options\"===t.state.action?void 0:\"options\"});},t.setOptions=function(e){t.setState({options:e});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.selection.events.changed,function(){e.forceUpdate();}),this.subscribe(this.selection.events.additionsHistoryUpdated,function(){e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"selection\",{get:function get(){return this.plugin.managers.structure.selection;},enumerable:!1,configurable:!0}),t.prototype.transform=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return(r=a.StateObjectRef.resolveAndCheck(this.plugin.state.data,e))?(i=a.StateSelection.findTagInSubtree(this.plugin.state.data.tree,r.transform.ref,\"SuperpositionTransform\"),o={transform:{name:\"matrix\",params:{data:t,transpose:!1}}},s=i?this.plugin.state.data.build().to(i).update(o):this.plugin.state.data.build().to(e).insert(f.StateTransforms.Model.TransformStructureConformation,o,{tags:\"SuperpositionTransform\"}),[4,this.plugin.runTask(this.plugin.state.data.updateTree(s))]):[2];case 1:return n.sent(),[2];}});});},t.prototype.highlight=function(e){this.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:e},!1);},t.prototype.moveHistory=function(e,t){this.plugin.managers.structure.selection.modifyHistory(e,t,void 0,!0);},t.prototype.focusLoci=function(e){this.plugin.managers.camera.focusLoci(e);},t.prototype.lociEntry=function(e,t){var r=this;return i.createElement(\"div\",{className:\"msp-flex-row\",key:t},i.createElement(x.Button,{noOverflow:!0,title:\"Click to focus. Hover to highlight.\",onClick:function onClick(){return r.focusLoci(e.loci);},style:{width:\"auto\",textAlign:\"left\"},onMouseEnter:function onMouseEnter(){return r.highlight(e.loci);},onMouseLeave:this.plugin.managers.interactivity.lociHighlights.clearHighlights},i.createElement(\"span\",{dangerouslySetInnerHTML:{__html:e.label}})));},t.prototype.historyEntry=function(e,t){var r=this,n=this.plugin.managers.structure.selection.additionsHistory;return i.createElement(\"div\",{className:\"msp-flex-row\",key:e.id},i.createElement(x.Button,{noOverflow:!0,title:\"Click to focus. Hover to highlight.\",onClick:function onClick(){return r.focusLoci(e.loci);},style:{width:\"auto\",textAlign:\"left\"},onMouseEnter:function onMouseEnter(){return r.highlight(e.loci);},onMouseLeave:this.plugin.managers.interactivity.lociHighlights.clearHighlights},t,\". \",i.createElement(\"span\",{dangerouslySetInnerHTML:{__html:e.label}})),n.length>1&&i.createElement(x.IconButton,{svg:C.ArrowUpwardSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.moveHistory(e,\"up\");},flex:\"20px\",title:\"Move up\"}),n.length>1&&i.createElement(x.IconButton,{svg:C.ArrowDownwardSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.moveHistory(e,\"down\");},flex:\"20px\",title:\"Move down\"}),i.createElement(x.IconButton,{svg:C.DeleteOutlinedSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.plugin.managers.structure.selection.modifyHistory(e,\"remove\");},flex:!0,title:\"Remove\"}));},t.prototype.atomsLociEntry=function(e,t){var r=this;return i.createElement(\"div\",{key:t},i.createElement(\"div\",{className:\"msp-control-group-header\"},i.createElement(\"div\",{className:\"msp-no-overflow\",title:e.label},e.label)),i.createElement(\"div\",{className:\"msp-control-offset\"},e.atoms.map(function(e,t){return r.historyEntry(e,t);})));},Object.defineProperty(t.prototype,\"chainEntries\",{get:function get(){var e=this,t=I.StructureElement.Location.create(),r=[];return this.plugin.managers.structure.selection.entries.forEach(function(n,i){var o=n.selection,s=a.StateObjectRef.resolveAndCheck(e.plugin.state.data,i);if(s&&!I.StructureElement.Loci.isEmpty(o)){var u=I.StructureElement.Loci.getFirstLocation(o,t);if(!(o.elements.length>1||\"polymer\"!==I.StructureProperties.entity.type(u))){var c=I.StructureElement.Stats.ofLoci(o),l=Object(ne.structureElementStatsLabel)(c,{countsOnly:!0}),d=Object(ne.elementLabel)(u,{reverse:!0,granularity:\"chain\"}).split(\"|\"),f=l+\" | \"+d[0]+\" | \"+d[d.length-1];r.push({loci:o,label:f,cell:s});}}}),r;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"atomEntries\",{get:function get(){for(var e=this,t=new Map(),r=this.plugin.managers.structure.selection.additionsHistory,n=0,i=r.length;n<i;++n){var a=r[n];if(1===I.StructureElement.Loci.size(a.loci)){var o=a.loci.structure;t.has(o)?t.get(o).push(a):t.set(o,[a]);}}var s=[];return t.forEach(function(t,r){for(var n=e.plugin.helpers.substructureParent.get(r),i=[],a=0,o=t.length;a<o;++a)i.push(t[a].loci.elements[0]);var u=I.StructureElement.Loci(t[0].loci.structure,i),c=u.structure.label.split(\" | \")[0];s.push({loci:u,label:c,cell:n,atoms:t});}),s;},enumerable:!1,configurable:!0}),t.prototype.addByChains=function(){var e=this,t=this.chainEntries;return i.createElement(i.Fragment,null,t.length>0&&i.createElement(\"div\",{className:\"msp-control-offset\"},t.map(function(t,r){return e.lociEntry(t,r);})),t.length<2&&i.createElement(\"div\",{className:\"msp-control-offset msp-help-text\"},i.createElement(\"div\",{className:\"msp-help-description\"},i.createElement(C.Icon,{svg:C.HelpOutlineSvg,inline:!0}),\"Add 2 or more selections (toggle \",i.createElement(A.ToggleSelectionModeButton,{inline:!0}),\" mode) from separate structures. Selections must be limited to single polymer chains or residues therein.\")),t.length>1&&i.createElement(x.Button,{title:\"Superpose structures by selected chains.\",className:\"msp-btn-commit msp-btn-commit-on\",onClick:this.superposeChains,style:{marginTop:\"1px\"}},\"Superpose\"));},t.prototype.addByAtoms=function(){var e=this,t=this.atomEntries;return i.createElement(i.Fragment,null,t.length>0&&i.createElement(\"div\",{className:\"msp-control-offset\"},t.map(function(t,r){return e.atomsLociEntry(t,r);})),t.length<2&&i.createElement(\"div\",{className:\"msp-control-offset msp-help-text\"},i.createElement(\"div\",{className:\"msp-help-description\"},i.createElement(C.Icon,{svg:C.HelpOutlineSvg,inline:!0}),\"Add 1 or more selections (toggle \",i.createElement(A.ToggleSelectionModeButton,{inline:!0}),\" mode) from separate structures. Selections must be limited to single atoms.\")),t.length>1&&i.createElement(x.Button,{title:\"Superpose structures by selected atoms.\",className:\"msp-btn-commit msp-btn-commit-on\",onClick:this.superposeAtoms,style:{marginTop:\"1px\"}},\"Superpose\"));},t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(x.ToggleButton,{icon:C.SuperposeChainsSvg,label:\"By Chains\",toggle:this.toggleByChains,isSelected:\"byChains\"===this.state.action,disabled:this.state.isBusy}),i.createElement(x.ToggleButton,{icon:C.SuperposeAtomsSvg,label:\"By Atoms\",toggle:this.toggleByAtoms,isSelected:\"byAtoms\"===this.state.action,disabled:this.state.isBusy}),i.createElement(x.ToggleButton,{icon:C.TuneSvg,label:\"\",title:\"Options\",toggle:this.toggleOptions,isSelected:\"options\"===this.state.action,disabled:this.state.isBusy,style:{flex:\"0 0 40px\",padding:0}})),\"byChains\"===this.state.action&&this.addByChains(),\"byAtoms\"===this.state.action&&this.addByAtoms(),\"options\"===this.state.action&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(w.ParameterControls,{params:oe,values:this.state.options,onChangeValues:this.setOptions,isDisabled:this.state.isBusy})));},t;}(O.PurePluginUIComponent),ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={show:!1,label:\"\"},t.update=function(){var e=t.plugin.state.data,r=e.selectQ(function(e){return e.ofTransformer(f.StateTransforms.Model.ModelFromTrajectory);});if(0!==r.length){for(var n=\"\",i=0,a=new Set(),o=0,s=r;o<s.length;o++){var u=s[o];if(u.sourceRef){var c=e.cells.get(u.sourceRef).obj;if(c&&c.data.length>1){if(a.has(u.sourceRef))return void t.setState({show:!1});if(a.add(u.sourceRef),i++,!n)n=\"Model \"+(u.transform.params.modelIndex+1)+\" / \"+c.data.length;}}}i>1&&(n=\"\"),t.setState({show:i>0,label:n});}else t.setState({show:!1});},t.reset=function(){return S.PluginCommands.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:_.create({action:\"reset\"})});},t.prev=function(){return S.PluginCommands.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:_.create({action:\"advance\",by:-1})});},t.next=function(){return S.PluginCommands.State.ApplyAction(t.plugin,{state:t.plugin.state.data,action:_.create({action:\"advance\",by:1})});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){this.subscribe(this.plugin.state.data.events.changed,this.update),this.subscribe(this.plugin.behaviors.state.isAnimating,this.update);},t.prototype.render=function(){var e=this.plugin.behaviors.state.isAnimating.value;return!this.state.show||e&&!this.state.label?null:i.createElement(\"div\",{className:\"msp-traj-controls\"},!e&&i.createElement(x.IconButton,{svg:C.SkipPreviousSvg,title:\"First Model\",onClick:this.reset,disabled:e}),!e&&i.createElement(x.IconButton,{svg:C.NavigateBeforeSvg,title:\"Previous Model\",onClick:this.prev,disabled:e}),!e&&i.createElement(x.IconButton,{svg:C.NavigateNextSvg,title:\"Next Model\",onClick:this.next,disabled:e}),!!this.state.label&&i.createElement(\"span\",null,this.state.label));},t;}(O.PluginUIComponent),le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,show:!0},t.keyUp=function(e){if(e.ctrlKey&&!t.state.isBusy&&e.target===document.body){var r=t.plugin.managers.snapshot;if(37===e.keyCode)r.state.isPlaying&&r.stop(),t.prev();else if(38===e.keyCode){if(r.state.isPlaying&&r.stop(),0===r.state.entries.size)return;var n=r.state.entries.get(0);t.update(n.snapshot.id);}else if(39===e.keyCode)r.state.isPlaying&&r.stop(),t.next();else if(40===e.keyCode){if(r.state.isPlaying&&r.stop(),0===r.state.entries.size)return;var i=r.state.entries.get(r.state.entries.size-1);t.update(i.snapshot.id);}}},t.change=function(e){\"none\"!==e.target.value&&t.update(e.target.value);},t.prev=function(){var e=t.plugin.managers.snapshot,r=e.getNextId(e.state.current,-1);r&&t.update(r);},t.next=function(){var e=t.plugin.managers.snapshot,r=e.getNextId(e.state.current,1);r&&t.update(r);},t.togglePlay=function(){t.plugin.managers.snapshot.togglePlay();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,function(){return e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){return e.setState({isBusy:t});}),this.subscribe(this.plugin.behaviors.state.isAnimating,function(t){return e.setState({isBusy:t});}),window.addEventListener(\"keyup\",this.keyUp,!1);},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),window.removeEventListener(\"keyup\",this.keyUp,!1);},t.prototype.update=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return this.setState({isBusy:!0}),[4,S.PluginCommands.State.Snapshots.Apply(this.plugin,{id:e})];case 1:return t.sent(),this.setState({isBusy:!1}),[2];}});});},t.prototype.render=function(){var e=this.plugin.managers.snapshot,t=e.state.entries.size;if(t<2||!this.state.show)return null;var r=e.state.current,n=e.state.isPlaying;return i.createElement(\"div\",{className:\"msp-state-snapshot-viewport-controls\"},i.createElement(\"select\",{className:\"msp-form-control\",value:r||\"none\",onChange:this.change,disabled:this.state.isBusy||n},!r&&i.createElement(\"option\",{key:\"none\",value:\"none\"}),e.state.entries.valueSeq().map(function(e,r){return i.createElement(\"option\",{key:e.snapshot.id,value:e.snapshot.id},\"[\"+(r+1)+\"/\"+t+\"]\",\" \",e.name||new Date(e.timestamp).toLocaleString());})),i.createElement(x.IconButton,{svg:n?C.StopSvg:C.PlayArrowSvg,title:n?\"Pause\":\"Cycle States\",onClick:this.togglePlay,disabled:!n&&this.state.isBusy}),!n&&i.createElement(i.Fragment,null,i.createElement(x.IconButton,{svg:C.NavigateBeforeSvg,title:\"Previous State\",onClick:this.prev,disabled:this.state.isBusy||n}),i.createElement(x.IconButton,{svg:C.NavigateNextSvg,title:\"Next State\",onClick:this.next,disabled:this.state.isBusy||n})));},t;}(O.PluginUIComponent),de=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isEmpty:!0,isExpanded:!1,isBusy:!1,isAnimating:!1,isPlaying:!1},t.toggleExpanded=function(){return t.setState({isExpanded:!t.state.isExpanded});},t.stop=function(){t.plugin.managers.animation.stop(),t.plugin.managers.snapshot.stop();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,function(){e.plugin.managers.snapshot.state.isPlaying?e.setState({isPlaying:!0,isExpanded:!1}):e.setState({isPlaying:!1});}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){t?e.setState({isBusy:!0,isExpanded:!1,isEmpty:e.plugin.state.data.tree.transforms.size<2}):e.setState({isBusy:!1,isEmpty:e.plugin.state.data.tree.transforms.size<2});}),this.subscribe(this.plugin.behaviors.state.isAnimating,function(t){t?e.setState({isAnimating:!0,isExpanded:!1}):e.setState({isAnimating:!1});});},t.prototype.render=function(){var e=this.plugin.managers.snapshot.state.isPlaying;if(e||this.state.isEmpty||this.plugin.managers.animation.isEmpty||!this.plugin.config.get(h.PluginConfig.Viewport.ShowAnimation))return null;var t=this.state.isAnimating;return i.createElement(\"div\",{className:\"msp-animation-viewport-controls\"},i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),i.createElement(x.IconButton,{svg:t||e?C.StopSvg:C.SubscriptionsOutlinedSvg,transparent:!0,title:t?\"Stop\":\"Select Animation\",onClick:t||e?this.stop:this.toggleExpanded,toggleState:this.state.isExpanded,disabled:!t&&!e&&(this.state.isBusy||this.state.isPlaying||this.state.isEmpty)})),this.state.isExpanded&&!this.state.isBusy&&i.createElement(\"div\",{className:\"msp-animation-viewport-controls-select\"},i.createElement(P,{onStart:this.toggleExpanded})));},t;}(O.PluginUIComponent),fe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseMove=function(e){0===e.buttons&&e.stopPropagation();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.interaction.selectionMode,function(){return e.forceUpdate();});},t.prototype.render=function(){return this.plugin.selectionMode?i.createElement(\"div\",{className:\"msp-selection-viewport-controls\",onMouseMove:this.onMouseMove},i.createElement(A.StructureSelectionActionsControls,null)):null;},t;}(O.PluginUIComponent),pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={labels:[]},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.labels.highlight,function(t){return e.setState({labels:t.labels});});},t.prototype.render=function(){return 0===this.state.labels.length?null:i.createElement(\"div\",{className:\"msp-highlight-info\"},this.state.labels.map(function(e,t){return i.createElement(\"div\",{key:\"\"+t,dangerouslySetInnerHTML:{__html:e}});}));},t;}(O.PluginUIComponent),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.behaviors.events.changed,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this,t=[];return this.plugin.customStructureControls.forEach(function(r,n){t.push(i.createElement(r,{initiallyCollapsed:e.props.initiallyCollapsed,key:n}));}),t.length>0?i.createElement(i.Fragment,null,t):null;},t;}(O.PluginUIComponent),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-section-header\"},i.createElement(C.Icon,{svg:C.BuildSvg}),\"Structure Tools\"),i.createElement(T.StructureSourceControls,null),i.createElement(E.StructureMeasurementsControls,null),i.createElement(ae,null),i.createElement(j.StructureComponentControls,null),i.createElement(D.VolumeStreamingControls,null),i.createElement(D.VolumeSourceControls,null),i.createElement(me,null));},t;}(O.PluginUIComponent);},function(e,t,r){\"use strict\";function n(e,t,r){return e[t]-e[r];}function i(e,t,r){var n=e[t];e[t]=e[r],e[r]=n;}function a(e,t,r,n){var i=r+n>>1;return t(e,r,n)>0?t(e,r,i)>0?t(e,i,n)>0?i:n:r:t(e,n,i)>0?t(e,i,r)>0?i:r:n;}function o(e,t,r){var n=e.cmp,i=e.swap,o=e.data,s=e.parts,u=t+1,c=r;for(i(o,t,a(o,n,t,r));n(o,c,t)>0;)--c;for(var l=t+1;l<=c;l++){var d=n(o,l,t);if(d>0){for(i(o,l,c),--c;n(o,c,t)>0;)--c;l--;}else 0===d&&(i(o,l,u),u++);}for(l=t;l<u;l++)i(o,l,t+c-l);s[0]=c-u+t+1,s[1]=c;}function s(e,t,r){for(var n=e.data,i=e.cmp,a=e.swap,o=t+1;o<=r;o++)for(var s=o-1;s>=t&&i(n,s,s+1)>0;)a(n,s,s+1),s-=1;}function u(e,t,r){for(var n=e.parts;t<r;){if(r-t<16)return void s(e,t,r);o(e,t,r);var i=n[0],a=n[1];i-t<r-a?(u(e,t,i-1),t=a+1):(u(e,a+1,r),r=i-1);}}function c(e,t,r,o){var s=r+1,u=o;i(e,r,a(e,n,r,o));for(var c=e[r];e[u]>c;)--u;for(var l=r+1;l<=u;l++){var d=e[l];if(d>c){for(i(e,l,u),--u;e[u]>c;)--u;l--;}else d===c&&(i(e,l,s),++s);}for(l=r;l<s;l++)i(e,l,r+u-l);t[0]=u-s+r+1,t[1]=u;}function l(e,t,r){for(var n=t+1;n<=r;n++){for(var i=e[n],a=n-1;a>=t&&e[a]>i;)e[a+1]=e[a],a-=1;e[a+1]=i;}}function d(e,t){return void 0===t&&(t=n),function(e,t,r,a){void 0===a&&(a=n);a===n?function e(t,r,n,i){for(;n<i;){if(i-n<16)return void l(t,n,i);c(t,r,n,i);var a=r[0],o=r[1];a-n<i-o?(e(t,r,n,a-1),n=o+1):(e(t,r,o+1,i),i=a-1);}}(e,[0,0],t,r-1):u({data:e,cmp:a,swap:i,parts:[0,0]},t,r-1);return e;}(e,0,e.length,t);}function f(e,t,r,n,i){return u({data:e,cmp:n,swap:i,parts:[0,0]},t,r-1),e;}r.d(t,\"a\",function(){return i;}),r.d(t,\"c\",function(){return d;}),r.d(t,\"b\",function(){return f;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;}),r.d(t,\"b\",function(){return a;});var n=r(181);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(e);}function a(e){return 0===e.length?n.a:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e);},t);};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(0),i=r(1),a=r(6);function o(){return o.zero();}!function(e){function t(e){return void 0!==e.extrema;}function r(e,t){return{center:e,radius:t};}function o(e,t){var r;return void 0!==e.extrema?(e.extrema.length=0,(r=e.extrema).push.apply(r,t)):e.extrema=Object(n.__spreadArrays)(t),e;}e.hasExtrema=t,e.create=r,e.zero=function(){return{center:Object(i.Vec3)(),radius:0};},e.clone=function(e){var n=r(i.Vec3.clone(e.center),e.radius);return t(e)&&(n.extrema=e.extrema),n;},e.set=function(e,t,r){return i.Vec3.copy(e.center,t),e.radius=r,e;},e.copy=function(e,r){return i.Vec3.copy(e.center,r.center),e.radius=r.radius,t(r)&&o(e,r.extrema),e;},e.setExtrema=o,e.computeBounding=function(e){for(var t=e.x,r=e.y,n=e.z,o=e.indices,s=0,u=0,c=0,l=0,d=a.OrderedSet.size(o),f=0;f<d;f++){s+=t[p=a.OrderedSet.getAt(o,f)],u+=r[p],c+=n[p];}for(d>0&&(s/=d,u/=d,c/=d),f=0;f<d;f++){var p,m=t[p=a.OrderedSet.getAt(o,f)]-s,h=r[p]-u,g=n[p]-c,v=m*m+h*h+g*g;v>l&&(l=v);}return{center:i.Vec3.create(s,u,c),radius:Math.sqrt(l)};},e.transform=function(e,t,r){return i.Vec3.transformMat4(e.center,t.center,r),e.radius=t.radius*i.Mat4.getMaxScaleOnAxis(r),e;},e.toArray=function(e,t,r){i.Vec3.toArray(e.center,t,r),t[r+3]=e.radius;},e.fromArray=function(e,t,r){return i.Vec3.fromArray(e.center,t,r),e.radius=t[r+3],e;},e.fromBox3D=function(e,t){return i.Vec3.scale(e.center,i.Vec3.add(e.center,t.max,t.min),.5),e.radius=i.Vec3.distance(e.center,t.max),e;},e.fromAxes3D=function(e,t){return i.Vec3.copy(e.center,t.origin),e.radius=Math.max(i.Vec3.magnitude(t.dirA),i.Vec3.magnitude(t.dirB),i.Vec3.magnitude(t.dirC)),e;};var s=Object(i.Vec3)();e.addVec3=function(t,r,n){return i.Vec3.distance(r.center,n)<r.radius?e.copy(t,r):(i.Vec3.sub(s,r.center,n),i.Vec3.sub(s,r.center,s),i.Vec3.setMagnitude(s,s,r.radius),i.Vec3.scale(t.center,i.Vec3.add(s,s,n),.5),t.radius=i.Vec3.distance(t.center,n),t);},e.expandBySphere=function(e,r,a){return i.Vec3.copy(e.center,r.center),e.radius=Math.max(r.radius,i.Vec3.distance(r.center,a.center)+a.radius),t(r)&&t(a)&&o(e,Object(n.__spreadArrays)(r.extrema.map(function(e){return i.Vec3.clone(e);}),a.extrema.map(function(e){return i.Vec3.clone(e);}))),e;};var u=Object(i.Vec3)();e.expand=function(e,r,n){return i.Vec3.copy(e.center,r.center),e.radius=r.radius+n,t(r)&&o(e,r.extrema.map(function(e){i.Vec3.sub(u,e,r.center);var t=i.Vec3.distance(r.center,e);return i.Vec3.normalize(u,u),i.Vec3.scaleAndAdd(Object(i.Vec3)(),r.center,u,t+n);})),e;},e.exactEquals=function(e,t){return e.radius===t.radius&&i.Vec3.exactEquals(e.center,t.center);},e.equals=function(e,t){var r=e.radius,n=t.radius;return Math.abs(r-n)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(n))&&i.Vec3.equals(e.center,t.center);},e.includes=function(e,r){if(t(r)){for(var n=0,a=r.extrema;n<a.length;n++){var o=a[n];if(i.Vec3.distance(e.center,o)>e.radius)return!1;}return!0;}return i.Vec3.distance(e.center,r.center)+r.radius<=e.radius;},e.overlaps=function(e,t){return i.Vec3.distance(e.center,t.center)<=e.radius+t.radius;},e.distance=function(e,t){return i.Vec3.distance(e.center,t.center)-e.radius+t.radius;};}(o||(o={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return m;});var n=r(55),i=r(6),a=r(1),o=r(10),s=r(112),u=r(37),c=r(9),l=r(87),d=r(227),f=r(168),p=r(126);function m(e,t){return{kind:\"element-loci\",structure:e,elements:t};}!function(e){function t(e){return 0===r(e);}function r(e){for(var t=0,r=0,n=e.elements;r<n.length;r++){var a=n[r];t+=i.OrderedSet.size(a.indices);}return t;}function m(r){return t(r)?r:e(r.structure,[{unit:r.elements[0].unit,indices:i.OrderedSet.ofSingleton(i.OrderedSet.start(r.elements[0].indices))}]);}function h(t,r){for(var n=[],a=new Set(),o=0,s=t.elements;o<s.length;o++){var u=s[o];if(v(u))n[n.length]=u;else if(0===u.unit.kind){for(var c=u.unit.elements,l=u.unit.model.atomicHierarchy,d=u.unit.model.atomicHierarchy.atoms.label_alt_id,f=l.residueAtomSegments,p=f.index,m=f.offsets,h=[],g=u.indices,b=i.OrderedSet.size(g),y=0;y<b;){a.clear();var _=c[i.OrderedSet.getAt(g,y)],S=p[_];for(a.add(d.value(_)),y++;y<b;){var O=c[i.OrderedSet.getAt(g,y)];if(p[O]!==S)break;a.add(d.value(O)),y++;}for(var x=a.has(\"\"),C=m[S],w=m[S+1];C<w;C++){var P=i.OrderedSet.indexOf(c,C);if(P>=0){var j=d.value(C);r&&!x&&j&&!a.has(j)||(h[h.length]=P);}}}n[n.length]={unit:u.unit,indices:i.SortedArray.ofSortedArray(h)};}else n[n.length]=u;}return e(t.structure,n);}function g(e){switch(e.kind){case 0:return e.model.atomicHierarchy.chainAtomSegments;case 1:return e.model.coarseHierarchy.spheres.chainElementSegments;case 2:return e.model.coarseHierarchy.gaussians.chainElementSegments;}}function v(e){return e.unit.elements.length===i.OrderedSet.size(e.indices);}function b(e){return e.length>12&&e[e.length-1]-e[0]==e.length-1?i.Interval.ofRange(e[0],e[e.length-1]):i.SortedArray.ofSortedArray(e);}function y(e,t,r){for(var n=g(e).index,a=e.elements,o=0,s=0,u=a.length;s<u;s++){var c=n[a[s]];t.has(c)&&o++;}if(o!==e.elements.length){var l=new Int32Array(o);o=0;for(s=0,u=a.length;s<u;s++){c=n[a[s]];t.has(c)&&(l[o++]=s);}l.length>0&&(r[r.length]={unit:e,indices:b(l)});}else r[r.length]={unit:e,indices:i.Interval.ofBounds(0,o)};}function _(e,t,r,n,a){for(var o=g(e.elements[0].unit).index,s=new Set(),c=t;c<r;c++)for(var l=e.elements[c],d=l.indices,f=l.unit.elements,p=0,m=i.OrderedSet.size(d);p<m;p++)s.add(o[f[i.OrderedSet.getAt(d,p)]]);if(n)for(var h=e.elements[0].unit,v=0,b=e.structure.units;v<b.length;v++){var _=b[v];u.a.areSameChainOperatorGroup(_,h)&&y(_,s,a);}else for(c=t;c<r;c++)y(e.elements[c].unit,s,a);}function S(t){for(var r=[],n=0,i=t.elements.length;n<i;n++){var a=t.elements[n];if(u.a.Traits.is(a.unit.traits,2)){for(var o=n;n<i&&u.a.areSameChainOperatorGroup(t.elements[n].unit,a.unit);)n++;var s=n;n--,_(t,o,s,!0,r);}else v(a)?r[r.length]=a:_(t,n,n+1,!1,r);}return e(t.structure,r);}function O(e){return e.unit.model.id+\"|\"+f.a.entity.id(e);}e.is=function(e){return!!e&&\"element-loci\"===e.kind;},e.areEqual=function(e,t){if(e.structure!==t.structure)return!1;if(e.elements.length!==t.elements.length)return!1;for(var r=0,n=e.elements.length;r<n;++r){var a=e.elements[r],o=t.elements[r];if(a.unit.id!==o.unit.id)return!1;if(!i.OrderedSet.areEqual(a.indices,o.indices))return!1;}return!0;},e.isEmpty=t,e.isWholeStructure=function(e){return r(e)===e.structure.elementCount;},e.size=r,e.all=function(t){return e(t,t.units.map(function(e){return{unit:e,indices:i.OrderedSet.ofBounds(0,e.elements.length)};}));},e.none=function(t){return e(t,[]);},e.getFirstLocation=function(e,r){if(!t(e)){var n=e.elements[0].unit,a=n.elements[i.OrderedSet.getAt(e.elements[0].indices,0)];return r?(r.structure=e.structure,r.unit=e.elements[0].unit,r.element=a,r):l.a.create(e.structure,n,a);}},e.firstElement=m,e.firstResidue=function(e){return t(e)?e:h(m(e));},e.firstChain=function(e){return t(e)?e:S(m(e));},e.toStructure=function(e){for(var t=[],r=function r(e){var r=e.unit,n=e.indices,a=new Int32Array(i.OrderedSet.size(n));i.OrderedSet.forEach(n,function(e,t){return a[t]=r.elements[e];}),t.push(r.getChild(i.SortedArray.ofSortedArray(a)));},n=0,a=e.elements;n<a.length;n++){r(a[n]);}return s.a.create(t,{parent:e.structure.parent});},e.remap=function(t,r){if(r===t.structure)return t;var n=[];return t.elements.forEach(function(e){if(r.unitMap.has(e.unit.id)){var t=r.unitMap.get(e.unit.id),a=i.OrderedSet.indexedIntersect(e.indices,e.unit.elements,t.elements);i.OrderedSet.size(a)>0&&n.push({unit:t,indices:a});}}),e(r,n);},e.union=function t(r,n){if(r.elements.length>n.elements.length)return t(n,r);if(e.isEmpty(r))return n;for(var a=new Map(),o=0,s=r.elements;o<s.length;o++){var u=s[o];a.set(u.unit.id,u.indices);}for(var c=[],l=0,d=n.elements;l<d.length;l++){u=d[l];a.has(u.unit.id)?(c[c.length]={unit:u.unit,indices:i.OrderedSet.union(a.get(u.unit.id),u.indices)},a.delete(u.unit.id)):c[c.length]=u;}return a.forEach(function(e,t){c[c.length]={unit:r.structure.unitMap.get(t),indices:e};}),e(r.structure,c);},e.subtract=function(t,r){for(var n=new Map(),a=0,o=r.elements;a<o.length;a++){var s=o[a];n.set(s.unit.id,s.indices);}for(var u=[],c=0,l=t.elements;c<l.length;c++){s=l[c];if(n.has(s.unit.id)){var d=i.OrderedSet.subtract(s.indices,n.get(s.unit.id));if(0===i.OrderedSet.size(d))continue;u[u.length]={unit:s.unit,indices:d};}else u[u.length]=s;}return e(t.structure,u);},e.intersect=function(t,r){for(var n=new Map(),a=0,o=t.elements;a<o.length;a++){var s=o[a];n.set(s.unit.id,s.indices);}for(var u=[],c=0,l=r.elements;c<l.length;c++){s=l[c];if(n.has(s.unit.id)){var d=i.OrderedSet.intersect(n.get(s.unit.id),s.indices);0!==i.OrderedSet.size(d)&&(u[u.length]={unit:s.unit,indices:d});}}return e(t.structure,u);},e.areIntersecting=function t(r,n){if(r.elements.length>n.elements.length)return t(n,r);if(e.isEmpty(r))return e.isEmpty(n);for(var a=new Map(),o=0,s=r.elements;o<s.length;o++){var u=s[o];a.set(u.unit.id,u.indices);}for(var c=0,l=n.elements;c<l.length;c++){u=l[c];if(a.has(u.unit.id)&&i.OrderedSet.areIntersecting(a.get(u.unit.id),u.indices))return!0;}return!1;},e.isSubset=function(t,r){if(e.isEmpty(t))return e.isEmpty(r);for(var n=new Map(),a=0,o=t.elements;a<o.length;a++){var s=o[a];n.set(s.unit.id,s.indices);}for(var u=!1,c=0,l=r.elements;c<l.length;c++){s=l[c];if(n.has(s.unit.id)){if(!i.OrderedSet.isSubset(n.get(s.unit.id),s.indices))return!1;u=!0;}}return u;},e.extendToWholeResidues=h,e.extendToWholeChains=S,e.extendToWholeEntities=function(t){for(var r=[],n=l.a.create(t.structure),a=new Set(),o=t.structure.units,s=0,u=t.elements.length;s<u;s++){var c=t.elements[s];n.unit=c.unit,n.element=c.unit.elements[0],a.add(O(n));}s=0;for(var d=o.length;s<d;++s){var f=o[s];if(n.unit=f,n.element=f.elements[0],a.has(O(n))){var p=i.OrderedSet.ofBounds(0,f.elements.length);r[r.length]={unit:f,indices:p};}}return e(t.structure,r);},e.extendToWholeModels=function(t){for(var r=[],n=new Set(),a=t.structure.units,o=0,s=t.elements.length;o<s;o++){var u=t.elements[o];n.add(u.unit.model.id);}o=0;for(var c=a.length;o<c;++o){var l=a[o];if(n.has(l.model.id)){var d=i.OrderedSet.ofBounds(0,l.elements.length);r[r.length]={unit:l,indices:d};}}return e(t.structure,r);},e.extendToAllInstances=function(t){for(var r=[],n=new Map(),a=t.structure,o=a.unitSymmetryGroups,s=a.unitSymmetryGroupsIndexMap,u=0,c=t.elements.length;u<c;u++){var l=t.elements[u],d=l.unit.invariantId;n.has(d)?n.set(d,i.OrderedSet.union(l.indices,n.get(d))):n.set(d,l.indices);}return n.forEach(function(e,t){for(var n=o[s.get(t)].units,i=0,a=n.length;i<a;++i)r[r.length]={unit:n[i],indices:e};}),e(t.structure,r);};var x=new p.a(\"98\"),C=a.Vec3.zero();e.getBoundary=function(e){x.reset();for(var t=0,r=e.elements;t<r.length;t++)for(var n=(f=r[t]).indices,a=f.unit.conformation.position,o=f.unit.conformation.r,s=f.unit.elements,u=0,c=i.OrderedSet.size(n);u<c;u++){a(p=s[i.OrderedSet.getAt(n,u)],C),x.includePositionRadius(C,o(p));}x.finishedIncludeStep();for(var l=0,d=e.elements;l<d.length;l++){var f;for(n=(f=d[l]).indices,a=f.unit.conformation.position,o=f.unit.conformation.r,s=f.unit.elements,u=0,c=i.OrderedSet.size(n);u<c;u++){var p;a(p=s[i.OrderedSet.getAt(n,u)],C),x.radiusPositionRadius(C,o(p));}}return{box:x.getBox(),sphere:x.getSphere()};};var w=a.Vec3.zero();function P(e,t,r){void 0===r&&(r=0);for(var n=r,o=0,s=e.elements;o<s.length;o++){for(var u=s[o],c=u.indices,l=u.unit.conformation.position,d=u.unit.elements,f=i.OrderedSet.size(c),p=0;p<f;p++){l(d[i.OrderedSet.getAt(c,p)],w),a.Vec3.toArray(w,t,n+3*p);}n+=3*f;}return t;}function j(e,t,r,n,i){Object(c.q)(t);for(var a=[],o=[],s=0,u=t.length;s<u;){var l=s;for(s++;s<u&&t[s-1]+1===t[s];)s++;var d=s;if(d-l>12)a[a.length]=t[l],a[a.length]=t[d-1];else for(var f=l;f<d;f++)o[o.length]=t[f];}return r?{atom:{set:o,ranges:a},chain:{opName:[e]},entity:{modelLabel:n,modelIndex:i}}:{atom:{set:o,ranges:a},chain:{opName:[e]}};}e.toPositionsArray=P,e.getPrincipalAxes=function(e){var t=r(e),n=P(e,new Float32Array(3*t));return d.a.ofPositions(n);},e.toExpression=function(t){var r;if(e.isEmpty(t))return o.MolScriptBuilder.struct.generator.empty();for(var a,s,l=t.structure.models,d=new Map(),f=0,p=t.elements;f<p.length;f++){var m=(C=p[f]).indices,h=C.unit.elements,g=1===l.length?C.unit.conformation.operator.name:C.unit.conformation.operator.name+\" \"+C.unit.model.label+\" \"+C.unit.model.modelNum,v=void 0;d.has(g)?v=d.get(g).xs:(v=n.c.create(),d.set(g,{modelLabel:C.unit.model.label,modelIndex:C.unit.model.modelNum,xs:v}));for(var b=0,y=i.OrderedSet.size(m);b<y;b++){var _=(a=C.unit,s=h[i.OrderedSet.getAt(m,b)],u.a.isAtomic(a)?a.model.atomicHierarchy.atoms.sourceIndex.value(s):s);n.c.add(v,_,_);}}for(var S=[],O=d.keys();;){var x=O.next();if(x.done)break;var C=d.get(x.value);S.push(j(x.value,C.xs.array,l.length>1,C.modelLabel,C.modelIndex));}for(var w=new Map(),P=(b=0,S.length);b<P;++b){var E=S[b];g=Object(c.i)(Object(c.l)(E.atom.ranges),Object(c.l)(E.atom.set))+\"|\"+(E.entity?E.entity.modelLabel+E.entity.modelIndex:\"\");w.has(g)?(r=w.get(g).chain.opName).push.apply(r,E.chain.opName):w.set(g,E);}var A=[];return w.forEach(function(e){var t=e.atom,r=t.ranges,n=t.set,i=e.chain.opName,a=o.MolScriptBuilder.struct.atomProperty.core.operatorName(),s=o.MolScriptBuilder.struct.atomProperty.core.sourceIndex(),u=[];n.length>0&&(u[u.length]=o.MolScriptBuilder.core.set.has([o.MolScriptBuilder.core.type.set(n),s]));for(var c=0,l=r.length/2;c<l;c++)u[u.length]=o.MolScriptBuilder.core.rel.inRange([s,r[2*c],r[2*c+1]]);if(e.entity){var d=e.entity,f=d.modelLabel,p=d.modelIndex;A.push(o.MolScriptBuilder.struct.generator.atomGroups({\"atom-test\":u.length>1?o.MolScriptBuilder.core.logic.or(u):u[0],\"chain-test\":i.length>1?o.MolScriptBuilder.core.set.has([o.MolScriptBuilder.core.type.set(i),a]):o.MolScriptBuilder.core.rel.eq([a,i[0]]),\"entity-test\":o.MolScriptBuilder.core.logic.and([o.MolScriptBuilder.core.rel.eq([o.MolScriptBuilder.struct.atomProperty.core.modelLabel(),f]),o.MolScriptBuilder.core.rel.eq([o.MolScriptBuilder.struct.atomProperty.core.modelIndex(),p])])}));}else A.push(o.MolScriptBuilder.struct.generator.atomGroups({\"atom-test\":u.length>1?o.MolScriptBuilder.core.logic.or(u):u[0],\"chain-test\":i.length>1?o.MolScriptBuilder.core.set.has([o.MolScriptBuilder.core.type.set(i),a]):o.MolScriptBuilder.core.rel.eq([a,i[0]])}));}),o.MolScriptBuilder.struct.modifier.union([1===A.length?A[0]:o.MolScriptBuilder.struct.combinator.merge(A.map(function(e){return o.MolScriptBuilder.struct.modifier.union([e]);}))]);};}(m||(m={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureHierarchyManager\",function(){return L;});var n=r(0),i=r(216),a=r(26),o=r(13),s=r(90),u=r(118),c=r(8),l=r(28),d=r(160);function f(e,t){var r=function(e,t){return{state:e,oldHierarchy:t,hierarchy:p(),changed:!1,added:new Set()};}(e,t||p());return function(e,t){var r={tree:e,state:t};V(r,e.root);}(e.tree,r),t&&t.refs.forEach(k,r),{hierarchy:r.hierarchy,added:r.added,changed:r.changed};}function p(){return{trajectories:[],models:[],structures:[],refs:new Map()};}function m(e){return{kind:\"trajectory\",cell:e,version:e.transform.version,models:[]};}function h(e,t){return{kind:\"model\",cell:e,version:e.transform.version,trajectory:t,structures:[]};}function g(e,t){return{kind:\"model-properties\",cell:e,version:e.transform.version,model:t};}function v(e,t){return{kind:\"model-unitcell\",cell:e,version:e.transform.version,model:t};}function b(e,t){return{kind:\"structure\",cell:e,version:e.transform.version,model:t,components:[]};}function y(e,t){return{kind:\"structure-properties\",cell:e,version:e.transform.version,structure:t};}function _(e,t){return{kind:\"structure-transform\",cell:e,version:e.transform.version,structure:t};}function S(e,t){return{kind:\"structure-volume-streaming\",cell:e,version:e.transform.version,structure:t};}function O(e){return e.transform.tags?Object(n.__spreadArrays)(e.transform.tags).sort().join():e.transform.ref;}function x(e,t){return{kind:\"structure-component\",cell:e,version:e.transform.version,structure:t,key:O(e),representations:[]};}function C(e,t){return{kind:\"structure-representation\",cell:e,version:e.transform.version,component:t};}function w(e,t){return{kind:\"generic-representation\",cell:e,version:e.transform.version,parent:t};}function P(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var o=n.apply(void 0,i);r.push(o),e.hierarchy.refs.set(t.transform.ref,o);var s=e.oldHierarchy.refs.get(t.transform.ref);return s?s.version!==t.transform.version&&(e.changed=!0):(e.added.add(o.cell.transform.ref),e.changed=!0),o;}function j(e,t,r){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];var a=r.apply(void 0,n);e.hierarchy.refs.set(t.transform.ref,a);var o=e.oldHierarchy.refs.get(t.transform.ref);return o?o.version!==t.transform.version&&(e.changed=!0):(e.added.add(a.cell.transform.ref),e.changed=!0),a;}function E(e){return function(t){return e.is(t.obj);};}function A(e,t){return function(r,n){return!t(n)&&e.is(r.obj);};}function T(e){return function(t){return t.transform.transformer===e;};}function D(){}var I=[[E(c.a.Molecule.Trajectory),function(e,t){e.currentTrajectory=P(e,t,e.hierarchy.trajectories,m,t);},function(e){return e.currentTrajectory=void 0;}],[A(c.a.Molecule.Model,function(e){return e.currentModel;}),function(e,t){e.currentTrajectory?e.currentModel=P(e,t,e.currentTrajectory.models,h,t,e.currentTrajectory):e.currentModel=j(e,t,h,t),e.hierarchy.models.push(e.currentModel);},function(e){return e.currentModel=void 0;}],[T(l.StateTransforms.Model.CustomModelProperties),function(e,t){if(!e.currentModel)return!1;e.currentModel.properties=j(e,t,g,t,e.currentModel);},D],[T(l.StateTransforms.Representation.ModelUnitcell3D),function(e,t){if(!e.currentModel)return!1;e.currentModel.unitcell=j(e,t,v,t,e.currentModel);},D],[A(c.a.Molecule.Structure,function(e){return e.currentStructure;}),function(e,t){e.currentModel?e.currentStructure=P(e,t,e.currentModel.structures,b,t,e.currentModel):e.currentStructure=j(e,t,b,t),e.hierarchy.structures.push(e.currentStructure);},function(e){return e.currentStructure=void 0;}],[T(l.StateTransforms.Model.CustomStructureProperties),function(e,t){if(!e.currentStructure)return!1;e.currentStructure.properties=j(e,t,y,t,e.currentStructure);},D],[T(l.StateTransforms.Model.TransformStructureConformation),function(e,t){if(!e.currentStructure)return!1;e.currentStructure.transform=j(e,t,_,t,e.currentStructure);},D],[E(d.a),function(e,t){return!!e.currentStructure&&(e.currentStructure.volumeStreaming=j(e,t,S,t,e.currentStructure),!1);},D],[function(e,t){return!(t.currentComponent||!t.currentStructure||e.transform.transformer.definition.isDecorator)&&c.a.Molecule.Structure.is(e.obj);},function(e,t){e.currentStructure&&(e.currentComponent=P(e,t,e.currentStructure.components,x,t,e.currentStructure));},function(e){return e.currentComponent=void 0;}],[function(e,t){return!e.state.isGhost&&!!t.currentComponent&&c.a.Molecule.Structure.Representation3D.is(e.obj);},function(e,t){return e.currentComponent&&P(e,t,e.currentComponent.representations,C,t,e.currentComponent),!1;},D],[function(e){return!e.state.isGhost&&c.a.isRepresentation3D(e.obj);},function(e,t){var r=e.currentComponent||e.currentStructure||e.currentModel;r&&(r.genericRepresentations||(r.genericRepresentations=[]),P(e,t,r.genericRepresentations,w,t,r));},D]];function M(e){if(!e||!(null==e?void 0:e.parent)||!e.parent.cells.has(e.transform.ref))return!1;var t=e.obj;return!(!t||t===o.StateObject.Null||\"ok\"!==e.status&&\"error\"!==e.status);}function k(e){M(e.cell)||(this.changed=!0);}function B(e){V(this,this.tree.transforms.get(e));}function V(e,t){var r=e.state,n=r.state.cells.get(t.ref);if(M(n)){for(var i=void 0,a=!1,o=0,s=I;o<s.length;o++){var u=s[o],c=u[0],l=u[1],d=u[2];if(c(n,r)){if(!1===l(r,n)){a=!0;break;}i=d;break;}}if(!a){var f=e.tree.children.get(t.ref);f&&f.size&&f.forEach(B,e),i&&i(r);}}}var R,L=function(e){function t(t){var r=e.call(this)||this;return r.plugin=t,r.state={syncedTree:r.dataState.tree,notified:!1,hierarchy:p(),selection:{trajectories:[],models:[],structures:[]}},r.behaviors={selection:r.ev.behavior({hierarchy:r.current,trajectories:r.selection.trajectories,models:r.selection.models,structures:r.selection.structures})},r._currentComponentGroups=void 0,r._currentSelectionSet=void 0,r.subscribe(t.state.data.events.changed,function(e){e.inTransaction||t.behaviors.state.isAnimating.value||r.sync(!0);}),r.subscribe(t.behaviors.state.isAnimating,function(e){e||t.behaviors.state.isUpdating.value||r.sync(!0);}),r;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"currentComponentGroups\",{get:function get(){return this._currentComponentGroups||(this._currentComponentGroups=t.getComponentGroups(this.selection.structures)),this._currentComponentGroups;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"seletionSet\",{get:function get(){if(this._currentSelectionSet)return this._currentSelectionSet;this._currentSelectionSet=new Set();for(var e=0,t=this.selection.trajectories;e<t.length;e++){var r=t[e];this._currentSelectionSet.add(r.cell.transform.ref);}for(var n=0,i=this.selection.models;n<i.length;n++){r=i[n];this._currentSelectionSet.add(r.cell.transform.ref);}for(var a=0,o=this.selection.structures;a<o.length;a++){r=o[a];this._currentSelectionSet.add(r.cell.transform.ref);}return this._currentSelectionSet;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this.sync(!1),this.state.hierarchy;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"selection\",{get:function get(){return this.sync(!1),this.state.selection;},enumerable:!1,configurable:!0}),t.prototype.getStructuresWithSelection=function(){for(var e=[],t=0,r=this.plugin.managers.structure.hierarchy.current.structures;t<r.length;t++){var n=r[t];this.plugin.managers.structure.selection.structureHasSelection(n)&&e.push(n);}return e;},t.prototype.syncCurrent=function(e,t){for(var r=this.seletionSet,n=[],i=0,a=e;i<a.length;i++){var o=a[i],s=o.cell.transform.ref;(r.has(s)||t.has(s))&&n.push(o);}return 0===n.length?e.length>0?[e[0]]:[]:n;},t.prototype.sync=function(e){if(e||!this.dataState.inUpdate)if(this.state.syncedTree!==this.dataState.tree){this.state.syncedTree=this.dataState.tree;var t=f(this.plugin.state.data,this.current);if(t.changed){var r=t.hierarchy,i=this.syncCurrent(r.trajectories,t.added),a=this.syncCurrent(r.models,t.added),o=this.syncCurrent(r.structures,t.added);this._currentComponentGroups=void 0,this._currentSelectionSet=void 0,this.state.hierarchy=r,this.state.selection.trajectories=i,this.state.selection.models=a,this.state.selection.structures=o,e?(this.state.notified=!0,this.behaviors.selection.next({hierarchy:r,trajectories:i,models:a,structures:o})):this.state.notified=!1;}}else e&&!this.state.notified&&(this.state.notified=!0,this.behaviors.selection.next(Object(n.__assign)({hierarchy:this.state.hierarchy},this.state.selection)));},t.prototype.updateCurrent=function(e,t){for(var r=this.current,n=\"add\"===t?s.a.union(this.seletionSet,new Set(e.map(function(e){return e.cell.transform.ref;}))):s.a.difference(this.seletionSet,new Set(e.map(function(e){return e.cell.transform.ref;}))),i=[],a=[],o=[],u=0,c=r.trajectories;u<c.length;u++){var l=c[u];n.has(l.cell.transform.ref)&&i.push(l);}for(var d=0,f=r.models;d<f.length;d++){var p=f[d];n.has(p.cell.transform.ref)&&a.push(p);}for(var m=0,h=r.structures;m<h.length;m++){var g=h[m];n.has(g.cell.transform.ref)&&o.push(g);}this._currentComponentGroups=void 0,this._currentSelectionSet=void 0,this.state.selection.trajectories=i,this.state.selection.models=a,this.state.selection.structures=o,this.behaviors.selection.next({hierarchy:r,trajectories:i,models:a,structures:o});},t.prototype.remove=function(e,t){if(0!==e.length){for(var r=this.plugin.state.data.build(),n=0,i=e;n<i.length;n++){var a=i[n];r.delete(\"string\"==typeof a?a:a.cell.transform.ref);}return r.commit({canUndo:!!t&&\"Remove\"});}},t.prototype.toggleVisibility=function(e,t){if(0!==e.length)for(var r=void 0!==t?\"show\"!==t:!e[0].cell.state.isHidden,n=0,a=e;n<a.length;n++){var o=a[n];Object(i.setSubtreeVisibility)(this.dataState,o.cell.transform.ref,r);}},t.prototype.applyPreset=function(e,t,r){var i=this;return this.plugin.dataTransaction(function(){return Object(n.__awaiter)(i,void 0,void 0,function(){var i,a,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=0,a=e,n.label=1;case 1:return i<a.length?(o=a[i]).models.length>0?[4,this.clearTrajectory(o)]:[3,3]:[3,6];case 2:n.sent(),n.label=3;case 3:return[4,this.plugin.builders.structure.hierarchy.applyPreset(o.cell,t,r)];case 4:n.sent(),n.label=5;case 5:return i++,[3,1];case 6:return[2];}});});});},t.prototype.updateStructure=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r=this;return Object(n.__generator)(this,function(i){switch(i.label){case 0:return[4,this.plugin.dataTransaction(function(){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=o.StateTree.getDecoratorRoot(this.dataState.tree,e.cell.transform.ref),i=this.dataState.tree.children.get(r).toArray(),[4,this.remove(i,!1)];case 1:return n.sent(),[4,this.plugin.state.updateTransform(this.plugin.state.data,e.cell.transform.ref,t,\"Structure Type\")];case 2:return n.sent(),[4,this.plugin.builders.structure.representation.applyPreset(e.cell.transform.ref,\"auto\")];case 3:return n.sent(),[2];}});});},{canUndo:\"Structure Type\"})];case 1:return i.sent(),a.PluginCommands.Camera.Reset(this.plugin),[2];}});});},t.prototype.clearTrajectory=function(e){for(var t=this.dataState.build(),r=0,n=e.models;r<n.length;r++){var i=n[r];t.delete(i.cell);}return t.commit();},t;}(u.a);(R=L||(L={})).getComponentGroups=function(e){if(!e.length)return[];if(1===e.length)return e[0].components.map(function(e){return[e];});for(var t=[],r=new Map(),n=0,i=e;n<i.length;n++)for(var a=0,o=i[n].components;a<o.length;a++){var s=o[a],u=s.key;if(u){var c=r.get(u);c||(c=[],r.set(u,c),t.push(c)),c.push(s);}}return t;},R.getSelectedStructuresDescription=function(e){var t,r,n,i,a,o,s,u,c,l=e.managers.structure.hierarchy.selection.structures;if(0===l.length)return\"\";if(1===l.length){var d=null===(t=(y=l[0]).cell.obj)||void 0===t?void 0:t.data;if(!d)return(null===(r=y.cell.obj)||void 0===r?void 0:r.label)||\"Structure\";var f=d.models[0]||d.representativeModel||d.masterModel;if(!f)return(null===(n=y.cell.obj)||void 0===n?void 0:n.label)||\"Structure\";var p=f.entryId;return(null===(a=null===(i=y.model)||void 0===i?void 0:i.trajectory)||void 0===a?void 0:a.models)&&1===y.model.trajectory.models.length?p:y.model?(null===(o=y.model.cell.obj)||void 0===o?void 0:o.label)+\" | \"+p:p;}for(var m=l[0],h=null===(s=null==m?void 0:m.model)||void 0===s?void 0:s.trajectory,g=!0,v=0,b=l;v<b.length;v++){var y;if((null===(u=null==(y=b[v])?void 0:y.model)||void 0===u?void 0:u.trajectory)!==h){g=!1;break;}}return g&&h?(null===(c=h.cell.obj)||void 0===c?void 0:c.label)+\" | \"+l.length+\" structures\":l.length+\" structures\";};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){return\"function\"==typeof Symbol?Symbol(\"rxSubscriber\"):\"@@rxSubscriber_\"+Math.random();}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(e){return Error.call(this),this.message=e?e.length+\" errors occurred during unsubscription:\\n\"+e.map(function(e,t){return t+1+\") \"+e.toString();}).join(\"\\n  \"):\"\",this.name=\"UnsubscriptionError\",this.errors=e,this;}return e.prototype=Object.create(Error.prototype),e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(21),i=r(60),a=r(208),o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r;}return n.a(t,e),Object.defineProperty(t.prototype,\"value\",{get:function get(){return this.getValue();},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r;},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new a.a();return this._value;},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t);},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(22),a=r(119),o=r(358),s=r(188);function u(e,t,r,n,i){for(var a=e.residues,o=a.label_seq_id,s=a.pdbx_PDB_ins_code,u=t.endSeqNumber,c=t.endInsCode,l=t.key,d=t.type,f=r;f<n;){var p=o.value(f);if(i.type[f]=d,i.key[f]=l,p>u||p===u&&s.value(f)===c)break;f++;}}!function(e){e.Descriptor={name:\"model_secondary_structure\"},e.Provider=s.a.create(e.Descriptor),e.fromStruct=function(e,t,r){var n=new Map(),s=[{kind:\"none\"}];!function(e,t,r){if(!e._rowCount)return;for(var n=e.beg_label_asym_id,a=e.beg_label_seq_id,o=e.pdbx_beg_PDB_ins_code,s=e.end_label_seq_id,u=e.pdbx_end_PDB_ins_code,c=e.pdbx_PDB_helix_class,l=e.conf_type_id,d=e.details,f=0,p=e._rowCount;f<p;f++){var m=i.SecondaryStructureType.create(0===c.valueKind(f)?i.SecondaryStructureType.SecondaryStructurePdb[c.value(f)]:0===l.valueKind(f)?i.SecondaryStructureType.SecondaryStructureMmcif[l.value(f)]:536870912),h={kind:\"helix\",flags:m,type_id:0===l.valueKind(f)?l.value(f):\"HELIX_P\",helix_class:c.value(f),details:0===d.valueKind(f)?d.value(f):void 0},g={startSeqNumber:a.value(f),startInsCode:o.value(f),endSeqNumber:s.value(f),endInsCode:u.value(f),type:m,key:r.length};r[r.length]=h;var v=n.value(f);if(t.has(v)){var b=t.get(v);b.has(g.startSeqNumber)?b.get(g.startSeqNumber).push(g):b.set(g.startSeqNumber,[g]);}else t.set(v,new Map([[g.startSeqNumber,[g]]]));}}(e,n,s),function(e,t,r,n){if(!e._rowCount)return;for(var a=e.beg_label_asym_id,o=e.beg_label_seq_id,s=e.pdbx_beg_PDB_ins_code,u=e.end_label_seq_id,c=e.pdbx_end_PDB_ins_code,l=e.sheet_id,d=new Map(),f=r+1,p=0,m=e._rowCount;p<m;p++){var h=l.value(p),g=void 0;d.has(h)?g=d.get(h):(g=f++,d.set(h,g));var v=i.SecondaryStructureType.create(8388612),b={kind:\"sheet\",flags:v,sheet_id:h,symmetry:void 0},y={startSeqNumber:o.value(p),startInsCode:s.value(p),endSeqNumber:u.value(p),endInsCode:c.value(p),type:v,key:n.length};n[n.length]=b;var _=a.value(p);if(t.has(_)){var S=t.get(_);S.has(y.startSeqNumber)?S.get(y.startSeqNumber).push(y):S.set(y.startSeqNumber,[y]);}else t.set(_,new Map([[y.startSeqNumber,[y]]]));}}(t,n,e._rowCount,s);var c=r.residues._rowCount,l={type:new Int32Array(c),key:new Int32Array(c),elements:s};return n.size>0&&function(e,t,r){for(var n=e.chainAtomSegments.count,i=e.chains.label_asym_id,o=e.residues,s=o.label_seq_id,c=o.pdbx_PDB_ins_code,l=0;l<n;l++){var d=a.AtomicHierarchy.chainStartResidueIndex(e,l),f=a.AtomicHierarchy.chainEndResidueIndexExcl(e,l),p=i.value(l);if(t.has(p))for(var m=t.get(p),h=d;h<f;h++){var g=s.value(h);if(m.has(g))for(var v=m.get(g),b=0,y=v;b<y.length;b++){var _=y[b],S=c.value(h);_.startInsCode===S&&u(e,_,h,f,r);}}}}(r,n,l),Object(o.a)(l.type,l.key,l.elements,function(e){return e;});};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"d\",function(){return u;}),r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return l;}),r.d(t,\"c\",function(){return d;});var n=r(0),i=r(96),a=Object(i.a)();function o(e){var t=e.createBuffer();if(null===t)throw new Error(\"Could not create WebGL buffer\");return t;}function s(e,t,r,n){var i=o(e),s=function(e,t){switch(t){case\"static\":return e.STATIC_DRAW;case\"dynamic\":return e.DYNAMIC_DRAW;case\"stream\":return e.STREAM_DRAW;}}(e,r),u=function(e,t){switch(t){case\"attribute\":return e.ARRAY_BUFFER;case\"elements\":return e.ELEMENT_ARRAY_BUFFER;case\"uniform\":return e.UNIFORM_BUFFER;}}(e,n),c=function(e,t){if(t instanceof Uint8Array)return e.UNSIGNED_BYTE;if(t instanceof Int8Array)return e.BYTE;if(t instanceof Uint16Array)return e.UNSIGNED_SHORT;if(t instanceof Int16Array)return e.SHORT;if(t instanceof Uint32Array)return e.UNSIGNED_INT;if(t instanceof Int32Array)return e.INT;if(t instanceof Float32Array)return e.FLOAT;throw new Error(\"Should nevver happen\");}(e,t),l=t.BYTES_PER_ELEMENT,d=t.length;function f(t){e.bindBuffer(u,i),e.bufferData(u,t,s);}f(t);var p=!1;return{id:a(),_usageHint:s,_bufferType:u,_dataType:c,_bpe:l,length:d,getBuffer:function getBuffer(){return i;},updateData:f,updateSubData:function updateSubData(t,r,n){e.bindBuffer(u,i),e.bufferSubData(u,r*l,t.subarray(r,r+n));},reset:function reset(){i=o(e),f(t);},destroy:function destroy(){p||(e.deleteBuffer(i),p=!0);}};}function u(e,t,r){switch(t){case\"int32\":switch(r){case 1:return e.INT;case 2:return e.INT_VEC2;case 3:return e.INT_VEC3;case 4:return e.INT_VEC4;}break;case\"float32\":switch(r){case 1:return e.FLOAT;case 2:return e.FLOAT_VEC2;case 3:return e.FLOAT_VEC3;case 4:return e.FLOAT_VEC4;case 16:return e.FLOAT_MAT4;}}throw new Error(\"unknown attribute type for kind '\"+t+\"' and itemSize '\"+r+\"'\");}function c(e,t,r,i,a,o){void 0===o&&(o=\"dynamic\");var u=t.instancedArrays,c=s(e,r,o,\"attribute\"),l=c._bufferType,d=c._dataType,f=c._bpe;return Object(n.__assign)(Object(n.__assign)({},c),{bind:function bind(t){if(e.bindBuffer(l,c.getBuffer()),16===i)for(var r=0;r<4;++r)e.enableVertexAttribArray(t+r),e.vertexAttribPointer(t+r,4,d,!1,16*f,4*r*f),u.vertexAttribDivisor(t+r,a);else e.enableVertexAttribArray(t),e.vertexAttribPointer(t,i,d,!1,0,0),u.vertexAttribDivisor(t,a);}});}function l(e,t,r){var n=[];return Object.keys(t).forEach(function(i){var a=t[i];\"attribute\"===a.type&&(n[n.length]=[i,e.resources.attribute(r[i].ref.value,a.itemSize,a.divisor)]);}),n;}function d(e,t,r){void 0===r&&(r=\"static\");var i=s(e,t,r,\"elements\");return Object(n.__assign)(Object(n.__assign)({},i),{bind:function bind(){e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i.getBuffer());}});}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;}),r.d(t,\"b\",function(){return c;});var n=r(4),i=r(119),a=r(2),o={scale:a.ParamDefinition.Numeric(1,{min:.1,max:5,step:.1})};function s(e,t){return n.Unit.isAtomic(e)?Object(i.VdwRadius)(e.model.atomicHierarchy.atoms.type_symbol.value(t)):n.Unit.isSpheres(e)?e.model.coarseConformation.spheres.radius[t]:0;}function u(e,t){var r=void 0===t.scale?1:t.scale;return{factory:u,granularity:\"group\",size:function size(e){return n.StructureElement.Location.is(e)?r*s(e.unit,e.element):n.Bond.isLocation(e)?r*s(e.aUnit,e.aUnit.elements[e.aIndex]):1*r;},props:t,description:\"Assigns a physical size, i.e. vdW radius for atoms or given radius for coarse spheres.\"};}var c={name:\"physical\",label:\"Physical\",category:\"\",factory:u,getParams:function getParams(e){return o;},defaultValues:a.ParamDefinition.getDefaultValues(o),isApplicable:function isApplicable(e){return!!e.structure;}};},function(e,t,r){\"use strict\";function n(e){return Object.keys(e);}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return b;}),r.d(t,\"a\",function(){return y;});var n=r(0),i=r(262),a=r(232),o=r(34),s=r(1),u=r(75),c=r(39),l=r(47),d=r(81),f=r(5),p=r(11),m=r(2),h=r(151),g=r(49),v=Object(n.__assign)(Object(n.__assign)({},c.a.Params),{alpha:Object(n.__assign)(Object(n.__assign)({},c.a.Params.alpha),{defaultValue:.33}),ignoreLight:Object(n.__assign)(Object(n.__assign)({},c.a.Params.ignoreLight),{defaultValue:!0}),colorX:m.ParamDefinition.Color(l.a.red,{isEssential:!0}),colorY:m.ParamDefinition.Color(l.a.green,{isEssential:!0}),colorZ:m.ParamDefinition.Color(l.a.blue,{isEssential:!0}),scale:m.ParamDefinition.Numeric(.33,{min:.1,max:2,step:.1},{isEssential:!0})}),b={axes:m.ParamDefinition.MappedStatic(\"on\",{on:m.ParamDefinition.Group(v),off:m.ParamDefinition.Group({})},{cycle:!0,description:\"Show camera orientation axes\"})},y=function(){function e(e,t){void 0===t&&(t={}),this.webgl=e,this.props={axes:{name:\"off\",params:{}}},this.scene=i.a.create(e),this.camera=new a.a(),s.Vec3.set(this.camera.up,0,1,0),s.Vec3.set(this.camera.target,0,0,0),this.setProps(t);}return e.prototype.setProps=function(e){var t=this;this.props=Object(h.a)(this.props,function(r){if(void 0!==e.axes&&(r.axes.name=e.axes.name,\"on\"===e.axes.name)){t.scene.clear();var i=Object(n.__assign)(Object(n.__assign)({},e.axes.params),{scale:e.axes.params.scale*t.webgl.pixelRatio});t.renderObject=function(e){var t=function(e,t){var r=100*e.scale,n=function(e,t){var r=o.a.createState(512,256,t),n=.05*e,i=s.Vec3.scale(Object(s.Vec3)(),s.Vec3.unitX,e),a=s.Vec3.scale(Object(s.Vec3)(),s.Vec3.unitY,e),c=s.Vec3.scale(Object(s.Vec3)(),s.Vec3.unitZ,e),l={radiusTop:n,radiusBottom:n,radialSegments:32};return r.currentGroup=0,Object(u.a)(r,s.Vec3.origin,n,2),r.currentGroup=1,Object(u.a)(r,i,n,2),Object(d.a)(r,s.Vec3.origin,i,1,l),r.currentGroup=2,Object(u.a)(r,a,n,2),Object(d.a)(r,s.Vec3.origin,a,1,l),r.currentGroup=3,Object(u.a)(r,c,n,2),Object(d.a)(r,s.Vec3.origin,c,1,l),o.a.getMesh(r);}(r,null==t?void 0:t.geometry);n.setBoundingSphere(p.g.create(s.Vec3.create(r/2,r/2,r/2),r+r/4));return g.a.create(\"axes\",{},n,function(t){switch(t){case 1:return e.colorX;case 2:return e.colorY;case 3:return e.colorZ;default:return l.a.grey;}},function(){return 1;},function(){return\"\";});}(e);return g.a.createRenderObject(t,e);}(i),t.scene.add(t.renderObject),t.scene.commit(),s.Vec3.set(t.camera.position,0,0,200*i.scale),s.Mat4.lookAt(t.camera.view,t.camera.position,t.camera.target,t.camera.up),r.axes.params=Object(n.__assign)({},e.axes.params);}});},Object.defineProperty(e.prototype,\"isEnabled\",{get:function get(){return\"on\"===this.props.axes.name;},enumerable:!1,configurable:!0}),e.prototype.update=function(e){if(this.renderObject){!function(e,t){var r=e.near,n=e.far,i=-(t.width-t.x)/2,a=(t.width-t.x)/2,o=(t.height-t.y)/2,u=-(t.height-t.y)/2,c=(a-i)/2,l=(o-u)/2,d=(a+i)/2,f=(o+u)/2,p=d-c,m=d+c,h=f+l,g=f-l;s.Mat4.ortho(e.projection,p,m,h,g,r,n);}(this.camera,e.viewport);var t=this.renderObject.values.aTransform.ref.value;s.Mat4.extractRotation(t,e.view);var r=this.renderObject.values.boundingSphere.ref.value.radius;s.Mat4.setTranslation(t,s.Vec3.create(-e.viewport.width/2+r,-e.viewport.height/2+r,0)),f.e.update(this.renderObject.values.aTransform,this.renderObject.values.aTransform.ref.value),this.scene.update([this.renderObject],!0);}},e;}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StateSnapshots\",function(){return v;}),r.d(t,\"StateExportImportControls\",function(){return b;}),r.d(t,\"LocalStateSnapshotParams\",function(){return y;}),r.d(t,\"LocalStateSnapshots\",function(){return _;}),r.d(t,\"LocalStateSnapshotList\",function(){return S;}),r.d(t,\"RemoteStateSnapshots\",function(){return O;});var n=r(0),i=r(102),a=r(3),o=r(26),s=r(101),u=r(372),c=r(5),l=r(83),d=r(2),f=r(261),p=r(32),m=r(19),h=r(14),g=r(67),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e;return a.createElement(\"div\",null,a.createElement(m.SectionHeader,{icon:h.SaveOutlinedSvg,title:\"Plugin State\"}),a.createElement(\"div\",{style:{marginBottom:\"10px\"}},a.createElement(m.ExpandGroup,{header:\"Save Options\",initiallyExpanded:!1},a.createElement(y,null))),a.createElement(_,null),a.createElement(S,null),a.createElement(m.SectionHeader,{title:\"Save as File\",accent:\"blue\"}),a.createElement(b,null),\"none\"!==(null===(e=this.plugin.spec.components)||void 0===e?void 0:e.remoteState)&&a.createElement(O,null));},t;}(p.PluginUIComponent),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.downloadToFileJson=function(){var e,r;null===(r=(e=t.props).onAction)||void 0===r||r.call(e),o.PluginCommands.State.Snapshots.DownloadToFile(t.plugin,{type:\"json\"});},t.downloadToFileZip=function(){var e,r;null===(r=(e=t.props).onAction)||void 0===r||r.call(e),o.PluginCommands.State.Snapshots.DownloadToFile(t.plugin,{type:\"zip\"});},t.open=function(e){var r,n;e.target.files&&e.target.files[0]?(null===(n=(r=t.props).onAction)||void 0===n||n.call(r),o.PluginCommands.State.Snapshots.OpenFile(t.plugin,{file:e.target.files[0]})):t.plugin.log.error(\"No state file selected\");},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){return a.createElement(a.Fragment,null,a.createElement(\"div\",{className:\"msp-flex-row\"},a.createElement(m.Button,{icon:h.GetAppSvg,onClick:this.downloadToFileJson,title:\"Save the state description. Input data are loaded using the provided sources. Does not work if local files are used as input.\"},\"State\"),a.createElement(m.Button,{icon:h.GetAppSvg,onClick:this.downloadToFileZip,title:\"Save the state including the input data.\"},\"Session\"),a.createElement(\"div\",{className:\"msp-btn msp-btn-block msp-btn-action msp-loader-msp-btn-file\"},a.createElement(h.Icon,{svg:h.OpenInBrowserSvg,inline:!0}),\" Open \",a.createElement(\"input\",{onChange:this.open,type:\"file\",multiple:!1,accept:\".molx,.molj\"}))),a.createElement(\"div\",{className:\"msp-help-text\",style:{padding:\"10px\"}},a.createElement(h.Icon,{svg:h.WarningSvg}),\" This is an experimental feature and stored states/sessions might not be openable in a future version.\"));},t;}(p.PluginUIComponent),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.snapshotParams,function(){return e.forceUpdate();});},t.prototype.render=function(){return a.createElement(g.ParameterControls,{params:u.a.SnapshotParams,values:this.plugin.state.snapshotParams.value,onChangeValues:this.plugin.state.setSnapshotParams});},t;}(p.PluginUIComponent),_=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={params:d.ParamDefinition.getDefaultValues(t.Params)},r.add=function(){o.PluginCommands.State.Snapshots.Add(r.plugin,{name:r.state.params.name,description:r.state.params.description});},r.updateParams=function(e){return r.setState({params:e});},r.clear=function(){o.PluginCommands.State.Snapshots.Clear(r.plugin,{});},r;}return Object(n.__extends)(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!Object(c.m)(this.props,e)||!Object(c.m)(this.state,t);},t.prototype.render=function(){return a.createElement(\"div\",null,a.createElement(g.ParameterControls,{params:t.Params,values:this.state.params,onEnter:this.add,onChangeValues:this.updateParams}),a.createElement(\"div\",{className:\"msp-flex-row\"},a.createElement(m.IconButton,{onClick:this.clear,svg:h.DeleteOutlinedSvg,title:\"Remove All\"}),a.createElement(m.Button,{onClick:this.add,icon:h.AddSvg,style:{textAlign:\"right\"},commit:!0},\"Add\")));},t.Params={name:d.ParamDefinition.Text(),description:d.ParamDefinition.Text()},t;}(p.PluginUIComponent),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.apply=function(e){var r=e.currentTarget.getAttribute(\"data-id\");r&&o.PluginCommands.State.Snapshots.Apply(t.plugin,{id:r});},t.remove=function(e){var r=e.currentTarget.getAttribute(\"data-id\");r&&o.PluginCommands.State.Snapshots.Remove(t.plugin,{id:r});},t.moveUp=function(e){var r=e.currentTarget.getAttribute(\"data-id\");r&&o.PluginCommands.State.Snapshots.Move(t.plugin,{id:r,dir:-1});},t.moveDown=function(e){var r=e.currentTarget.getAttribute(\"data-id\");r&&o.PluginCommands.State.Snapshots.Move(t.plugin,{id:r,dir:1});},t.replace=function(e){var r=e.currentTarget.getAttribute(\"data-id\");r&&o.PluginCommands.State.Snapshots.Replace(t.plugin,{id:r});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.snapshot.events.changed,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this,t=this.plugin.managers.snapshot.state.current;return a.createElement(\"ul\",{style:{listStyle:\"none\",marginTop:\"10px\"},className:\"msp-state-list\"},this.plugin.managers.snapshot.state.entries.map(function(r){return a.createElement(\"li\",{key:r.snapshot.id,className:\"msp-flex-row\"},a.createElement(m.Button,{\"data-id\":r.snapshot.id,onClick:e.apply,className:\"msp-no-overflow\"},a.createElement(\"span\",{style:{fontWeight:r.snapshot.id===t?\"bold\":void 0}},r.name||new Date(r.timestamp).toLocaleString()),\" \",a.createElement(\"small\",null,(r.snapshot.durationInMs?Object(l.a)(r.snapshot.durationInMs,!1)+(r.description?\", \":\"\"):\"\")+(r.description?r.description:\"\"))),a.createElement(m.IconButton,{svg:h.ArrowUpwardSvg,\"data-id\":r.snapshot.id,title:\"Move Up\",onClick:e.moveUp,flex:\"20px\"}),a.createElement(m.IconButton,{svg:h.ArrowDownwardSvg,\"data-id\":r.snapshot.id,title:\"Move Down\",onClick:e.moveDown,flex:\"20px\"}),a.createElement(m.IconButton,{svg:h.SwapHorizSvg,\"data-id\":r.snapshot.id,title:\"Replace\",onClick:e.replace,flex:\"20px\"}),a.createElement(m.IconButton,{svg:h.DeleteOutlinedSvg,\"data-id\":r.snapshot.id,title:\"Remove\",onClick:e.remove,flex:\"20px\"}));}));},t;}(p.PluginUIComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Params={name:d.ParamDefinition.Text(),options:d.ParamDefinition.Group({description:d.ParamDefinition.Text(),playOnLoad:d.ParamDefinition.Boolean(!1),serverUrl:d.ParamDefinition.Text(t.plugin.config.get(s.PluginConfig.State.CurrentServer))})},t.state={params:d.ParamDefinition.getDefaultValues(t.Params),entries:Object(i.OrderedMap)(),isBusy:!1},t.ListOnlyParams={options:d.ParamDefinition.Group({serverUrl:d.ParamDefinition.Text(t.plugin.config.get(s.PluginConfig.State.CurrentServer))},{isFlat:!0})},t._mounted=!1,t.refresh=function(){return Object(n.__awaiter)(t,void 0,void 0,function(){var e,t,r,a,o,u;return Object(n.__generator)(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),this.setState({isBusy:!0}),this.plugin.config.set(s.PluginConfig.State.CurrentServer,this.state.params.options.serverUrl),[4,this.plugin.runTask(this.plugin.fetch({url:this.serverUrl(\"list\"),type:\"json\"}))];case 1:for((e=c.sent()||[]).sort(function(e,t){return e.isSticky===t.isSticky?e.timestamp-t.timestamp:e.isSticky?-1:1;}),t=Object(i.OrderedMap)().asMutable(),r=0,a=e;r<a.length;r++)o=a[r],t.set(o.id,Object(n.__assign)(Object(n.__assign)({},o),{url:this.serverUrl(\"get/\"+o.id),removeUrl:this.serverUrl(\"remove/\"+o.id)}));return this._mounted&&this.setState({entries:t.asImmutable(),isBusy:!1}),[3,3];case 2:return u=c.sent(),this.plugin.log.error(\"Fetching Remote Snapshots: \"+u),this._mounted&&this.setState({entries:Object(i.OrderedMap)(),isBusy:!1}),[3,3];case 3:return[2];}});});},t.upload=function(){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(e){switch(e.label){case 0:return this.setState({isBusy:!0}),this.plugin.config.set(s.PluginConfig.State.CurrentServer,this.state.params.options.serverUrl),[4,o.PluginCommands.State.Snapshots.Upload(this.plugin,{name:this.state.params.name,description:this.state.params.options.description,playOnLoad:this.state.params.options.playOnLoad,serverUrl:this.state.params.options.serverUrl})];case 1:return e.sent(),this.plugin.log.message(\"Snapshot uploaded.\"),this._mounted&&(this.setState({isBusy:!1}),this.refresh()),[2];}});});},t.fetch=function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(!(t=e.currentTarget.getAttribute(\"data-id\")))return[2];if(!(r=this.state.entries.get(t)))return[2];this.setState({isBusy:!0}),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,o.PluginCommands.State.Snapshots.Fetch(this.plugin,{url:r.url})];case 2:return n.sent(),[3,4];case 3:return this._mounted&&this.setState({isBusy:!1}),[7];case 4:return[2];}});});},t.remove=function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(!(t=e.currentTarget.getAttribute(\"data-id\")))return[2];if(!(r=this.state.entries.get(t)))return[2];this.setState({entries:this.state.entries.remove(t)}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch(r.removeUrl)];case 2:return n.sent(),[3,4];case 3:return n.sent(),[3,4];case 4:return[2];}});});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){this.refresh(),this._mounted=!0;},t.prototype.componentWillUnmount=function(){this._mounted=!1;},t.prototype.serverUrl=function(e){return e?Object(f.a)(this.state.params.options.serverUrl,e):this.state.params.options.serverUrl;},t.prototype.render=function(){var e=this;return a.createElement(a.Fragment,null,a.createElement(m.SectionHeader,{title:\"Remote States\",accent:\"blue\"}),!this.props.listOnly&&a.createElement(a.Fragment,null,a.createElement(g.ParameterControls,{params:this.Params,values:this.state.params,onEnter:this.upload,onChange:function onChange(t){var r;e.setState({params:Object(n.__assign)(Object(n.__assign)({},e.state.params),(r={},r[t.name]=t.value,r))});},isDisabled:this.state.isBusy}),a.createElement(\"div\",{className:\"msp-flex-row\"},a.createElement(m.IconButton,{onClick:this.refresh,disabled:this.state.isBusy,svg:h.RefreshSvg}),a.createElement(m.Button,{icon:h.CloudUploadSvg,onClick:this.upload,disabled:this.state.isBusy,commit:!0},\"Upload\"))),a.createElement(x,{entries:this.state.entries,isBusy:this.state.isBusy,serverUrl:this.state.params.options.serverUrl,fetch:this.fetch,remove:this.props.listOnly?void 0:this.remove}),this.props.listOnly&&a.createElement(\"div\",{style:{marginTop:\"10px\"}},a.createElement(g.ParameterControls,{params:this.ListOnlyParams,values:this.state.params,onEnter:this.upload,onChange:function onChange(t){var r;e.setState({params:Object(n.__assign)(Object(n.__assign)({},e.state.params),(r={},r[t.name]=t.value,r))});},isDisabled:this.state.isBusy}),a.createElement(\"div\",{className:\"msp-flex-row\"},a.createElement(m.Button,{onClick:this.refresh,disabled:this.state.isBusy,icon:h.RefreshSvg},\"Refresh\"))));},t;}(p.PluginUIComponent),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.open=function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r,i,a;return Object(n.__generator)(this,function(n){return(t=e.currentTarget.getAttribute(\"data-id\"))&&(r=this.props.entries.get(t))?(e.preventDefault(),i=\"\"+window.location,(a=i.indexOf(\"?\"))>0&&(i=i.substr(0,a)),window.open(i+\"?snapshot-url=\"+encodeURIComponent(r.url),\"_blank\"),[2]):[2];});});},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this;return a.createElement(\"ul\",{style:{listStyle:\"none\",marginTop:\"10px\"},className:\"msp-state-list\"},this.props.entries.valueSeq().map(function(t){return a.createElement(\"li\",{key:t.id,className:\"msp-flex-row\"},a.createElement(m.Button,{\"data-id\":t.id,onClick:e.props.fetch,disabled:e.props.isBusy,onContextMenu:e.open,title:\"Click to download, right-click to open in a new tab.\"},t.name||new Date(t.timestamp).toLocaleString(),\" \",a.createElement(\"small\",null,t.description)),!t.isSticky&&e.props.remove&&a.createElement(m.IconButton,{svg:h.DeleteOutlinedSvg,\"data-id\":t.id,title:\"Remove\",onClick:e.props.remove,disabled:e.props.isBusy,small:!0}));}));},t;}(p.PurePluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(374),i=r(248),a=r(197),o=r(203),s=r(373),u=r(375),c=r(300),l=function l(e){if(e&&\"function\"==typeof e[o.a])return l=e,function(e){var t=l[o.a]();if(\"function\"!=typeof t.subscribe)throw new TypeError(\"Provided object does not correctly implement Symbol.observable\");return t.subscribe(e);};if(Object(s.a)(e))return Object(n.a)(e);if(Object(u.a)(e))return r=e,function(e){return r.then(function(t){e.closed||(e.next(t),e.complete());},function(t){return e.error(t);}).then(null,i.a),e;};if(e&&\"function\"==typeof e[a.a])return t=e,function(e){for(var r=t[a.a]();;){var n=r.next();if(n.done){e.complete();break;}if(e.next(n.value),e.closed)break;}return\"function\"==typeof r.return&&e.add(function(){r.return&&r.return();}),e;};var t,r,l,d=Object(c.a)(e)?\"an invalid object\":\"'\"+e+\"'\";throw new TypeError(\"You provided \"+d+\" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.\");};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return d;}),r.d(t,\"b\",function(){return f;});var n=r(0),i=r(3),a=r(32),o=r(67),s=r(2),u=r(60),c=r(14),l=r(19),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onChange=function(e){var r,i=e.name,a=e.value,o=Object(n.__assign)(Object(n.__assign)({},t.props.params),((r={})[i]=a,r));t.props.events.onChange(o,t.areInitial(o),t.validate(o));},t;}return Object(n.__extends)(t,e),t.prototype.validate=function(e){},t.prototype.areInitial=function(e){return s.ParamDefinition.areEqual(this.props.info.params,e,this.props.info.initialValues);},t.prototype.render=function(){return i.createElement(o.ParameterControls,{params:this.props.info.params,values:this.props.params,onChange:this.onChange,onEnter:this.props.events.onEnter,isDisabled:this.props.isDisabled});},t;}(a.PurePluginUIComponent);!function(e){function t(e){for(var t=0,r=Object.keys(e);t<r.length;t++){if(!e[r[t]].isHidden)return!1;}return!0;}e.infoFromAction=function(e,r,n,i){var a=r.cells.get(i).obj,o=n.definition.params?n.definition.params(a,e):{};return{initialValues:s.ParamDefinition.getDefaultValues(o),params:o,isEmpty:t(o)};},e.infoFromTransform=function(e,r,n){var i=r.cells.get(n.ref),a=i.params&&i.params.definition||{};return{initialValues:i.params&&i.params.values||{},params:a,isEmpty:t(a)};};}(d||(d={}));var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.busy=new u.a(),t.onEnter=function(){t.state.error||t.apply();},t.autoApplyHandle=void 0,t.events={onEnter:t.onEnter,onChange:function onChange(e,r,n){t.clearAutoApply(),t.setState({params:e,isInitial:r,error:n&&n[0]},function(){r||t.state.error||!t.canAutoApply(e)||(t.clearAutoApply(),t.autoApplyHandle=setTimeout(t.apply,50));});}},t.apply=function(){return Object(n.__awaiter)(t,void 0,void 0,function(){var e,t;return Object(n.__generator)(this,function(r){switch(r.label){case 0:this.clearAutoApply(),this.setState({busy:!0}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,this.applyAction()];case 2:return r.sent(),[3,5];case 3:return r.sent(),[3,5];case 4:return null===(t=(e=this.props).onApply)||void 0===t||t.call(e),this.busy.next(!1),[7];case 5:return[2];}});});},t.refresh=function(){t.setState({params:t.getInfo().initialValues,isInitial:!0,error:void 0});},t.setDefault=function(){var e=t.getInfo(),r=s.ParamDefinition.getDefaultValues(e.params);t.setState({params:r,isInitial:s.ParamDefinition.areEqual(e.params,r,e.initialValues),error:void 0});},t.toggleExpanded=function(){t.setState({isCollapsed:!t.state.isCollapsed});},t;}return Object(n.__extends)(t,e),t.prototype.clearAutoApply=function(){void 0!==this.autoApplyHandle&&(clearTimeout(this.autoApplyHandle),this.autoApplyHandle=void 0);},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.state.busy!==t&&e.busy.next(t);}),this.subscribe(this.busy,function(t){e.state.busy!==t&&e.setState({busy:t});});},t.prototype.renderApply=function(){var e=this.canApply();return!this.props.autoHideApply||e&&!this.canAutoApply(this.state.params)?i.createElement(\"div\",{className:\"msp-transform-apply-wrap\"},i.createElement(l.IconButton,{svg:c.RefreshSvg,className:\"msp-transform-default-params\",onClick:this.setDefault,disabled:this.state.busy,title:\"Set default params\"}),i.createElement(\"div\",{className:\"msp-transform-apply-wider\"},i.createElement(l.Button,{icon:e?c.CheckSvg:void 0,className:\"msp-btn-commit msp-btn-commit-\"+(e?\"on\":\"off\"),onClick:this.apply,disabled:!e},this.props.applyLabel||this.applyText()))):null;},t.prototype.renderDefault=function(){var e=this.getInfo(),t=e.isEmpty&&this.isUpdate(),r=this.getHeader(),n=this.getTransformerId(),a=this.plugin.customParamEditors.has(n)?this.plugin.customParamEditors.get(n):d,o=this.state.isCollapsed?\"msp-transform-wrapper msp-transform-wrapper-collapsed\":\"msp-transform-wrapper\",s=null;if(!t&&!this.state.isCollapsed){var u=this.getSourceAndTarget(),f=u.a,p=u.b,m=u.bCell,h=this.renderApply();s=i.createElement(i.Fragment,null,i.createElement(a,{info:e,a:f,b:p,bCell:m,events:this.events,params:this.state.params,isDisabled:this.state.busy}),h);}var g=i.createElement(\"div\",{className:o,style:{marginBottom:this.props.noMargin?0:void 0}},\"none\"!==r&&!this.props.wrapInExpander&&i.createElement(\"div\",{className:\"msp-transform-header\"},i.createElement(l.Button,{onClick:this.toggleExpanded,title:r.description},!t&&i.createElement(c.Icon,{svg:this.state.isCollapsed?c.ArrowRightSvg:c.ArrowDropDownSvg}),r.name)),s);return t||!this.props.wrapInExpander?g:i.createElement(l.ExpandGroup,{header:this.isUpdate()?\"Update \"+(\"none\"===r?\"\":r.name):\"Apply \"+(\"none\"===r?\"\":r.name),headerLeftMargin:this.props.expanderHeaderLeftMargin},g);},t.prototype.renderSimple=function(){var e,t,r,n=this.getInfo(),a=this.canApply(),o=i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(l.Button,{icon:null===(e=this.props.simpleApply)||void 0===e?void 0:e.icon,title:null===(t=this.props.simpleApply)||void 0===t?void 0:t.title,disabled:this.state.busy||!a,onClick:this.apply,className:\"msp-btn-apply-simple\"},null===(r=this.props.simpleApply)||void 0===r?void 0:r.header),!n.isEmpty&&i.createElement(l.ToggleButton,{icon:c.TuneSvg,label:\"\",title:\"Options\",toggle:this.toggleExpanded,isSelected:!this.state.isCollapsed,disabled:this.state.busy,style:{flex:\"0 0 40px\",padding:0}}));if(this.state.isCollapsed)return o;var s=this.getTransformerId(),u=this.plugin.customParamEditors.has(s)?this.plugin.customParamEditors.get(s):d,f=this.getSourceAndTarget(),p=f.a,m=f.b,h=f.bCell;return i.createElement(i.Fragment,null,o,i.createElement(u,{info:n,a:p,b:m,bCell:h,events:this.events,params:this.state.params,isDisabled:this.state.busy}));},t.prototype.render=function(){return this.props.simpleApply?this.renderSimple():this.renderDefault();},t;}(a.PurePluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Download\",function(){return J;}),r.d(t,\"DownloadBlob\",function(){return $;}),r.d(t,\"RawData\",function(){return ee;}),r.d(t,\"ReadFile\",function(){return te;}),r.d(t,\"ParseBlob\",function(){return re;}),r.d(t,\"ParseCif\",function(){return ne;}),r.d(t,\"ParseCube\",function(){return ie;}),r.d(t,\"ParsePsf\",function(){return ae;}),r.d(t,\"ParsePly\",function(){return oe;}),r.d(t,\"ParseCcp4\",function(){return se;}),r.d(t,\"ParseDsn6\",function(){return ue;}),r.d(t,\"ParseDx\",function(){return ce;}),r.d(t,\"ImportString\",function(){return le;}),r.d(t,\"ImportJson\",function(){return de;}),r.d(t,\"ParseJson\",function(){return fe;});var n=r(0),i=r(186),a=r(365),o=r(31),s=r(16),u=r(65),c=r(366),l=r(192);function d(e){var t=e.xExtent,r=e.yExtent,n=e.zExtent;return{xBlocks:Math.ceil(t/8),yBlocks:Math.ceil(r/8),zBlocks:Math.ceil(n/8)};}function f(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,e.readBuffer(0,512)];case 1:return t=n.sent().buffer,r=String.fromCharCode.apply(null,t),i=r.startsWith(\":-)\"),a=i||100===t.readInt16LE(36),[2,{header:i?(o=r,{xStart:parseInt(o.substr(10,5)),yStart:parseInt(o.substr(15,5)),zStart:parseInt(o.substr(20,5)),xExtent:parseInt(o.substr(32,5)),yExtent:parseInt(o.substr(38,5)),zExtent:parseInt(o.substr(42,5)),xRate:parseInt(o.substr(52,5)),yRate:parseInt(o.substr(58,5)),zRate:parseInt(o.substr(62,5)),xlen:parseFloat(o.substr(73,10)),ylen:parseFloat(o.substr(83,10)),zlen:parseFloat(o.substr(93,10)),alpha:parseFloat(o.substr(103,10)),beta:parseFloat(o.substr(113,10)),gamma:parseFloat(o.substr(123,10)),divisor:parseFloat(o.substr(138,12)),summand:parseInt(o.substr(155,8)),sigma:parseFloat(o.substr(170,12))}):function(e,t){var r=t?function(t){return e.readInt16LE(2*t);}:function(t){return e.readInt16BE(2*t);},n=1/r(17);return{xStart:r(0),yStart:r(1),zStart:r(2),xExtent:r(3),yExtent:r(4),zExtent:r(5),xRate:r(6),yRate:r(7),zRate:r(8),xlen:r(9)*n,ylen:r(10)*n,zlen:r(11)*n,alpha:r(12)*n,beta:r(13)*n,gamma:r(14)*n,divisor:r(15)/100,summand:r(16),sigma:void 0};}(t,a),littleEndian:a}];}var o;});});}function p(e,t,r,i){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,o,s,u,c,f,p,m,h,g,v,b,y,_,S,O,x,C,w;return Object(n.__generator)(this,function(n){for(i||l.a.flipByteOrderInPlace2(t.buffer),a=e.divisor,o=e.summand,s=e.xExtent,u=e.yExtent,c=e.zExtent,f=d(e),p=f.xBlocks,m=f.yBlocks,h=f.zBlocks,g=0,v=0;v<h;++v)for(b=0;b<m;++b)for(y=0;y<p;++y)for(_=0;_<8;++_)for(S=8*v+_,O=0;O<8;++O)for(x=8*b+O,C=0;C<8;++C){if(!((w=8*y+C)<s&&x<u&&S<c)){g+=8-C;break;}r[(w*u+x)*c+S]=(t[g]-o)/a,++g;}return[2];});});}function m(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,s,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,r.update({message:\"Parsing DSN6/BRIX file...\"})];case 1:return n.sent(),[4,f(e)];case 2:return i=n.sent(),a=i.header,o=i.littleEndian,[4,e.readBuffer(512,t-512)];case 3:return s=n.sent().buffer,u=function(e){var t=e.xExtent,r=e.yExtent,n=e.zExtent,i=d(e),a=8*i.xBlocks*i.yBlocks*8*i.zBlocks*8;return{count:a,byteCount:1*a,valueCount:t*r*n};}(a).valueCount,c=new Float32Array(u),[4,p(a,s,c,o)];case 4:return n.sent(),[2,{header:a,values:c,name:e.name}];}});});}function h(e,t){return function(e,t){var r=this;return s.b.create(\"Parse DSN6/BRIX\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),a=(r=u.a).success,[4,m(e,t,i)];case 1:return[2,a.apply(r,[n.sent()])];case 2:return o=n.sent(),[2,u.a.error(o)];case 3:return[2];}});});});}(c.a.fromBuffer(l.a.fromUint8Array(e),t),e.length);}var g=new Set(Object.keys({char:1,uchar:1,short:2,ushort:2,int:4,uint:4,float:4,double:8,int8:1,uint8:1,int16:2,uint16:2,int32:4,uint32:4,float32:4,float64:8}));function v(e){if(!g.has(e))throw new Error(\"unknown ply type '\"+e+\"'\");return e;}var b=r(20),y=r(7),_=r(73);function S(e){var t=e.tokenizer,r=e.comments,n=e.elementSpecs;!function(e){var t=e.data.indexOf(\"end_header\",e.position);if(-1===t)throw new Error(\"no 'end_header' record found\");e.tokenStart=e.position,e.tokenEnd=t,e.position=t,b.b.eatLine(e);}(t);var i,a,o,s=b.b.getTokenString(t).split(/\\r?\\n/);if(\"ply\"!==s[0])throw new Error(\"data not starting with 'ply'\");if(\"format ascii 1.0\"!==s[1])throw new Error(\"format not 'ascii 1.0'\");function u(){if(void 0!==i&&void 0!==a&&void 0!==o){for(var e=!1,t=0,r=o.length;t<r;++t){if(\"list\"===o[t].kind){e=!0;break;}}e&&o.length,e?n.push({kind:\"list\",name:i,count:a,property:o[0]}):n.push({kind:\"table\",name:i,count:a,properties:o});}}for(var c=2,l=s.length;c<l;++c){var d=s[c],f=d.split(\" \");if(d.startsWith(\"comment\"))r.push(d.substr(8));else if(d.startsWith(\"element\"))u(),o=[],i=f[1],a=parseInt(f[2]);else if(d.startsWith(\"property\")){if(void 0===o)throw new Error(\"properties outside of element\");\"list\"===f[1]?o.push({kind:\"list\",countType:v(f[2]),dataType:v(f[3]),name:f[4]}):o.push({kind:\"column\",type:v(f[1]),name:f[2]});}else d.startsWith(\"end_header\")?u():console.warn(\"unknown header line\");}}function O(e){switch(e){case\"char\":case\"uchar\":case\"int8\":case\"uint8\":case\"short\":case\"ushort\":case\"int16\":case\"uint16\":case\"int\":case\"uint\":case\"int32\":case\"uint32\":return y.a.Schema.int;case\"float\":case\"double\":case\"float32\":case\"float64\":return y.a.Schema.float;}}function x(e,t){for(var r=e.elements,n=e.tokenizer,i=t.count,a=t.properties,o=a.length,s=[],u=[],c=[],l=new Map(),d=0,f=o;d<f;++d){var p=b.a.create(n.data,2*i);c.push(p);}for(d=0,f=i;d<f;++d)for(var m=0,h=o;m<h;++m)b.b.skipWhitespace(n),b.b.markStart(n),b.b.eatValue(n),b.a.addUnchecked(c[m],n.tokenStart,n.tokenEnd);for(d=0,f=o;d<f;++d){var g=a[d],v=g.type,y=g.name,S=Object(_.a)(c[d],O(v));s.push(y),u.push(v),l.set(y,S);}r.push({kind:\"table\",rowCount:i,propertyNames:s,propertyTypes:u,getProperty:function getProperty(e){return l.get(e);}});}function C(e,t){for(var r=e.elements,n=e.tokenizer,i=t.count,a=t.property,o=b.a.create(n.data,2*i*3),s=new Uint32Array(i+1),u=0,c=0,l=i;c<l;++c){for(b.b.skipWhitespace(n),b.b.markStart(n);10!==b.b.skipWhitespace(n);)++u,b.b.markStart(n),b.b.eatValue(n),b.a.addToken(o,n);s[c+1]=u;}var d={entries:[],count:0},f=Object(_.a)(o,O(a.dataType));r.push({kind:\"list\",rowCount:i,name:a.name,type:a.dataType,value:function value(e){for(var t=s[e]+1,r=f.value(t-1),n=t,i=t+r;n<i;++n)d.entries[n-t]=f.value(n);return d.count=r,d;}});}function w(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,c;return Object(n.__generator)(this,function(n){return r=function(e,t){return{data:e,tokenizer:Object(b.b)(e),runtimeCtx:t,comments:[],elementSpecs:[],elements:[]};}(e,t),t.update({message:\"Parsing...\",current:0,max:e.length}),S(r),function(e){for(var t=e.elementSpecs,r=0,n=t.length;r<n;++r){var i=t[r];\"table\"===i.kind?x(e,i):\"list\"===i.kind&&C(e,i);}}(r),i=r.elements,a=r.elementSpecs,o=r.comments,s=a.map(function(e){return e.name;}),c=function(e,t,r){for(var n=new Map(),i=0,a=t.length;i<a;++i)n.set(t[i],e[i]);return{comments:r,elementNames:t,getElement:function getElement(e){return n.get(e);}};}(i,s,o),[2,u.a.success(c)];});});}function P(e){var t=this;return s.b.create(\"Parse PLY\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,w(e,r)];case 1:return[2,t.sent()];}});});});}var j=b.b.readLine,E=b.b.skipWhitespace,A=b.b.eatValue,T=b.b.eatLine,D=b.b.markStart,I=/\\s+/,M=/(^\\*|REMARK)*/;function k(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,u,c,l,d,f,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=e.tokenizer,i=b.a.create(r.data,2*t),a=b.a.create(r.data,2*t),o=b.a.create(r.data,2*t),u=b.a.create(r.data,2*t),c=b.a.create(r.data,2*t),l=b.a.create(r.data,2*t),d=b.a.create(r.data,2*t),f=b.a.create(r.data,2*t),p=r.length,m=0,[4,Object(s.c)(e.runtimeCtx,10,void 0,function(e){for(var n=Math.min(t-m,e),s=0;s<n;++s){for(var p=0;p<8;++p)switch(E(r),D(r),A(r),p){case 0:b.a.addUnchecked(i,r.tokenStart,r.tokenEnd);break;case 1:b.a.addUnchecked(a,r.tokenStart,r.tokenEnd);break;case 2:b.a.addUnchecked(o,r.tokenStart,r.tokenEnd);break;case 3:b.a.addUnchecked(u,r.tokenStart,r.tokenEnd);break;case 4:b.a.addUnchecked(c,r.tokenStart,r.tokenEnd);break;case 5:b.a.addUnchecked(l,r.tokenStart,r.tokenEnd);break;case 6:b.a.addUnchecked(d,r.tokenStart,r.tokenEnd);break;case 7:b.a.addUnchecked(f,r.tokenStart,r.tokenEnd);}T(r),D(r);}return m+=n,n;},function(e){return e.update({message:\"Parsing...\",current:r.position,max:p});})];case 1:return n.sent(),[2,{count:t,atomId:Object(_.c)(i)(y.a.Schema.int),segmentName:Object(_.c)(a)(y.a.Schema.str),residueId:Object(_.c)(o)(y.a.Schema.int),residueName:Object(_.c)(u)(y.a.Schema.str),atomName:Object(_.c)(c)(y.a.Schema.str),atomType:Object(_.c)(l)(y.a.Schema.str),charge:Object(_.c)(d)(y.a.Schema.float),mass:Object(_.c)(f)(y.a.Schema.float)}];}});});}function B(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=e.tokenizer,i=b.a.create(r.data,2*t),a=b.a.create(r.data,2*t),o=r.length,u=0,[4,Object(s.c)(e.runtimeCtx,10,void 0,function(e){for(var n=Math.min(t-u,e),o=0;o<n;++o)for(var s=0;s<2;++s)switch(E(r),D(r),A(r),s){case 0:b.a.addUnchecked(i,r.tokenStart,r.tokenEnd);break;case 1:b.a.addUnchecked(a,r.tokenStart,r.tokenEnd);}return u+=n,n;},function(e){return e.update({message:\"Parsing...\",current:r.position,max:o});})];case 1:return n.sent(),[2,{count:t,atomIdA:Object(_.c)(i)(y.a.Schema.int),atomIdB:Object(_.c)(a)(y.a.Schema.int)}];}});});}function V(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,c,l,d,f,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=Object(b.b)(e),i=function(e,t){return{tokenizer:e,runtimeCtx:t};}(r,t),a=void 0,o=void 0,s=void 0,c=j(i.tokenizer).trim(),n.label=1;case 1:return r.tokenEnd<r.length?(l=j(i.tokenizer).trim()).includes(\"!NTITLE\")?(d=parseInt(l.split(I)[0]),a=function(e,t){for(var r=[],n=0;n<t;++n){var i=j(e.tokenizer);r.push(i.replace(M,\"\").trim());}return r;}(i,d),[3,7]):[3,2]:[3,8];case 2:return l.includes(\"!NATOM\")?(f=parseInt(l.split(I)[0]),[4,k(i,f)]):[3,4];case 3:return o=n.sent(),[3,7];case 4:return l.includes(\"!NBOND\")?(p=parseInt(l.split(I)[0]),[4,B(i,p)]):[3,6];case 5:return s=n.sent(),[3,8];case 6:l.includes(\"!NTHETA\")||l.includes(\"!NPHI\")||l.includes(\"!NIMPHI\")||l.includes(\"!NDON\")||l.includes(\"!NACC\")||l.includes(\"!NNB\")||l.includes(\"!NGRP NST2\")||l.includes(\"!MOLNT\")||l.includes(\"!NUMLP NUMLPH\")||l.includes(\"!NCRTERM\"),n.label=7;case 7:return[3,1];case 8:return void 0===a&&(a=[]),void 0===o?[2,u.a.error(\"no atoms data\")]:void 0===s?[2,u.a.error(\"no bonds data\")]:(m={id:c,title:a,atoms:o,bonds:s},[2,u.a.success(m)]);}});});}function R(e){var t=this;return s.b.create(\"Parse PSF\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,V(e,r)];case 1:return[2,t.sent()];}});});});}var L=r(13),N=r(177),F=r(2),U=r(8),z=r(114),H=r(1),G=r(97);function q(e){var t=b.b.readLines(e,6),r=function r(e,_r4){var n=+t[e].trim().split(/\\s+/g)[_r4];return Number.isNaN(n)?0:n;},n=function n(e){var t=r(e+2,0),n=.529177210859;return[Math.abs(t),H.Vec3.create(r(e+2,1)*n,r(e+2,2)*n,r(e+2,3)*n),t];},i=t[0].trim(),a=t[1].trim(),o=n(0),s=o[0],u=o[1],c=o[2],l=n(1),d=l[0],f=l[1],p=n(2),m=p[0],h=p[1],g=n(3),v=g[0],_=g[1],S=function(e,t,r){for(var n=new Int32Array(t),i=new Float64Array(t),a=new Float32Array(t),o=new Float32Array(t),s=new Float32Array(t),u=0;u<t;u++){var c=b.b.readLine(e).trim().split(/\\s+/g);n[u]=+c[0],i[u]=+c[1],a[u]=+c[2]*r,o[u]=+c[3]*r,s[u]=+c[4]*r;}return{count:t,number:y.a.ofArray({array:n,schema:y.a.Schema.int}),nuclearCharge:y.a.ofArray({array:i,schema:y.a.Schema.float}),x:y.a.ofArray({array:a,schema:y.a.Schema.float}),y:y.a.ofArray({array:o,schema:y.a.Schema.float}),z:y.a.ofArray({array:s,schema:y.a.Schema.float})};}(e,s,.529177210859),O=[];if(c>=0){var x=r(2,4);0===x&&(x=1);for(var C=0;C<x;C++)O.push(C);}else for(var w=b.b.readLine(e).trim().split(/\\s+/g),P=(C=0,+w[0]);C<P;C++)O.push(+w[C+1]);return{header:{orbitals:c<0,comment1:i,comment2:a,atomCount:s,origin:u,dim:H.Vec3.create(d,m,v),basisX:f,basisY:h,basisZ:_,dataSetIds:O},atoms:S};}function W(e,t,r){var n=r.dim[0]*r.dim[1]*r.dim[2]*r.dataSetIds.length,i=new Float64Array(n),a=0;return Object(s.c)(e,1e6,i,function(e,r){for(var i=Math.min(n,a+e),o=a;o<i;o++)b.b.skipWhitespace(t),t.tokenStart=t.position,b.b.eatValue(t),r[o]=Object(G.b)(t.data,t.tokenStart,t.tokenEnd);return a=i,i===n?0:1e6;},function(e,t,r){return e.update({current:Math.min(r,n),max:n});});}function Q(e,t){var r=this;return s.b.create(\"Parse Cube\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,o,s,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,i.update(\"Reading header...\")];case 1:return n.sent(),r=Object(b.b)(e),a=q(r),o=a.header,s=a.atoms,[4,W(i,r,o)];case 2:return c=n.sent(),[2,u.a.success({header:o,atoms:s,values:c,name:t})];}});});});}var Y=r(157);function X(e){for(var t={h:Object(H.Vec3)()},r=0,n=0,i=/\\s+/g;;){var a=b.b.readLine(e),o=void 0;if(a.startsWith(\"object 1\"))o=a.split(i),t.dim=H.Vec3.create(parseInt(o[5]),parseInt(o[6]),parseInt(o[7]));else if(a.startsWith(\"origin\"))o=a.split(i),t.min=H.Vec3.create(parseFloat(o[1]),parseFloat(o[2]),parseFloat(o[3]));else if(a.startsWith(\"delta\"))o=a.split(i),0===n?t.h[0]=parseFloat(o[1]):1===n?t.h[1]=parseFloat(o[2]):2===n&&(t.h[2]=parseFloat(o[3])),n+=1;else if(a.startsWith(\"object 3\")){r+=a.length+1;break;}r+=a.length+1;}return{header:t,headerByteCount:r};}function K(e,t,r){var n=r.dim[0]*r.dim[1]*r.dim[2],i=new Float64Array(n),a=0;return Object(s.c)(e,1e6,i,function(e,r){for(var i=Math.min(n,a+e),o=a;o<i;o++)b.b.skipWhitespace(t),t.tokenStart=t.position,b.b.eatValue(t),r[o]=Object(G.b)(t.data,t.tokenStart,t.tokenEnd);return a=i,i===n?0:1e6;},function(e,t,r){return e.update({current:Math.min(r,n),max:n});});}function Z(e,t){return s.b.create(\"Parse Cube\",function(r){return\"string\"==typeof e?function(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,e.update(\"Reading header...\")];case 1:return n.sent(),i=Object(b.b)(t),a=X(i).header,[4,e.update(\"Reading values...\")];case 2:return n.sent(),[4,K(e,i,a)];case 3:return o=n.sent(),[2,u.a.success({header:a,values:o,name:r})];}});});}(r,e,t):function(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,s,c,l,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,e.update(\"Reading header...\")];case 1:return n.sent(),i=Object(Y.b)(t,0,1e3),a=Object(b.b)(i),o=X(a),s=o.header,c=o.headerByteCount,[4,e.update(\"Reading values...\")];case 2:for(n.sent(),l=s.dim[0]*s.dim[1]*s.dim[2],d=new DataView(t.buffer,t.byteOffset+c),f=new Float64Array(l),p=0;p<l;p++)f[p]=d.getFloat64(8*p,!0);return[2,u.a.success({header:s,values:f,name:r})];}});});}(r,e,t);});}var J=U.b.BuiltIn({name:\"download\",display:{name:\"Download\",description:\"Download string or binary data from the specified URL\"},from:[U.a.Root],to:[U.a.Data.String,U.a.Data.Binary],params:{url:F.ParamDefinition.Url(\"https://www.ebi.ac.uk/pdbe/static/entry/1cbs_updated.cif\",{description:\"Resource URL. Must be the same domain or support CORS.\"}),label:F.ParamDefinition.Optional(F.ParamDefinition.Text(\"\")),isBinary:F.ParamDefinition.Optional(F.ParamDefinition.Boolean(!1,{description:\"If true, download data as binary (string otherwise)\"}))}})({apply:function apply(e,t){var r=this,i=e.params,a=e.cache;return s.b.create(\"Download\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=z.Asset.getUrlAsset(t.managers.asset,i.url),[4,t.managers.asset.resolve(r,i.isBinary?\"binary\":\"string\").runInContext(e)];case 1:return o=n.sent(),a.asset=o,[2,i.isBinary?new U.a.Data.Binary(o.data,{label:i.label?i.label:r.url}):new U.a.Data.String(o.data,{label:i.label?i.label:r.url})];}});});});},dispose:function dispose(e){var t,r;null===(r=null===(t=e.cache)||void 0===t?void 0:t.asset)||void 0===r||r.dispose();},update:function update(e){var t=e.oldParams,r=e.newParams,n=e.b;return t.url!==r.url||t.isBinary!==r.isBinary?L.StateTransformer.UpdateResult.Recreate:t.label!==r.label?(n.label=r.label||(\"string\"==typeof r.url?r.url:r.url.url),L.StateTransformer.UpdateResult.Updated):L.StateTransformer.UpdateResult.Unchanged;}}),$=U.b.BuiltIn({name:\"download-blob\",display:{name:\"Download Blob\",description:\"Download multiple string or binary data from the specified URLs.\"},from:U.a.Root,to:U.a.Data.Blob,params:{sources:F.ParamDefinition.ObjectList({id:F.ParamDefinition.Text(\"\",{label:\"Unique ID\"}),url:F.ParamDefinition.Url(\"https://www.ebi.ac.uk/pdbe/static/entry/1cbs_updated.cif\",{description:\"Resource URL. Must be the same domain or support CORS.\"}),isBinary:F.ParamDefinition.Optional(F.ParamDefinition.Boolean(!1,{description:\"If true, download data as binary (string otherwise)\"})),canFail:F.ParamDefinition.Optional(F.ParamDefinition.Boolean(!1,{description:\"Indicate whether the download can fail and not be included in the blob as a result.\"}))},function(e){return e.id+\": \"+e.url;}),maxConcurrency:F.ParamDefinition.Optional(F.ParamDefinition.Numeric(4,{min:1,max:12,step:1},{description:\"The maximum number of concurrent downloads.\"}))}})({apply:function apply(e,t){var r=this,i=e.params,a=e.cache;return s.b.create(\"Download Blob\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,o,s,u,c,l;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=[],[4,Object(N.b)(e,t.managers.asset,i.sources,i.maxConcurrency||4)];case 1:for(o=n.sent(),s=[],u=0;u<o.length;u++)c=o[u],l=i.sources[u],\"error\"===c.kind?t.log.warn(\"Download \"+c.id+\" (\"+l.url+\") failed: \"+c.error):(s.push(c.result),r.push(l.isBinary?{id:c.id,kind:\"binary\",data:c.result.data}:{id:c.id,kind:\"string\",data:c.result.data}));return a.assets=s,[2,new U.a.Data.Blob(r,{label:\"Data Blob\",description:r.length+\" \"+(1===r.length?\"entry\":\"entries\")})];}});});});},dispose:function dispose(e,t){var r,n=null===(r=e.cache)||void 0===r?void 0:r.assets;if(n)for(var i=0,a=n;i<a.length;i++){a[i].dispose();}}}),ee=U.b.BuiltIn({name:\"raw-data\",display:{name:\"Raw Data\",description:\"Raw data supplied by value.\"},from:[U.a.Root],to:[U.a.Data.String,U.a.Data.Binary],params:{data:F.ParamDefinition.Value(\"\",{isHidden:!0}),label:F.ParamDefinition.Optional(F.ParamDefinition.Text(\"\"))}})({apply:function apply(e){var t=this,r=e.params;return s.b.create(\"Raw Data\",function(){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(e){if(\"string\"!=typeof r.data&&Object(i.isTypedArray)(r.data))throw new Error(\"Supplied binary data must be a plain array.\");return[2,\"string\"==typeof r.data?new U.a.Data.String(r.data,{label:r.label?r.label:\"String\"}):new U.a.Data.Binary(new Uint8Array(r.data),{label:r.label?r.label:\"Binary\"})];});});});},update:function update(e){var t=e.oldParams,r=e.newParams,n=e.b;return t.data!==r.data?L.StateTransformer.UpdateResult.Recreate:t.label!==r.label?(n.label=r.label||n.label,L.StateTransformer.UpdateResult.Updated):L.StateTransformer.UpdateResult.Unchanged;}}),te=U.b.BuiltIn({name:\"read-file\",display:{name:\"Read File\",description:\"Read string or binary data from the specified file\"},from:U.a.Root,to:[U.a.Data.String,U.a.Data.Binary],params:{file:F.ParamDefinition.File(),label:F.ParamDefinition.Optional(F.ParamDefinition.Text(\"\")),isBinary:F.ParamDefinition.Optional(F.ParamDefinition.Boolean(!1,{description:\"If true, open file as as binary (string otherwise)\"}))}})({apply:function apply(e,t){var r=this,i=e.params,a=e.cache;return s.b.create(\"Open File\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return null===i.file?(t.log.error(\"No file(s) selected\"),[2,L.StateObject.Null]):[4,t.managers.asset.resolve(i.file,i.isBinary?\"binary\":\"string\").runInContext(e)];case 1:return r=n.sent(),a.asset=r,[2,i.isBinary?new U.a.Data.Binary(r.data,{label:i.label?i.label:i.file.name}):new U.a.Data.String(r.data,{label:i.label?i.label:i.file.name})];}});});});},dispose:function dispose(e){var t,r;null===(r=null===(t=e.cache)||void 0===t?void 0:t.asset)||void 0===r||r.dispose();},update:function update(e){var t,r=e.oldParams,n=e.newParams,i=e.b;return r.label!==n.label?(i.label=n.label||(null===(t=r.file)||void 0===t?void 0:t.name)||\"\",L.StateTransformer.UpdateResult.Updated):L.StateTransformer.UpdateResult.Unchanged;},isSerializable:function isSerializable(){return{isSerializable:!1,reason:\"Cannot serialize user loaded files.\"};}}),re=U.b.BuiltIn({name:\"parse-blob\",display:{name:\"Parse Blob\",description:\"Parse multiple data enties\"},from:U.a.Data.Blob,to:U.a.Format.Blob,params:{formats:F.ParamDefinition.ObjectList({id:F.ParamDefinition.Text(\"\",{label:\"Unique ID\"}),format:F.ParamDefinition.Select(\"cif\",[[\"cif\",\"cif\"]])},function(e){return e.id+\": \"+e.format;})}})({apply:function apply(e,t){var r=this,i=e.a,a=e.params;return s.b.create(\"Parse Blob\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var t,r,s,u,c,l,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(t=new Map(),r=0,s=a.formats;r<s.length;r++)u=s[r],t.set(u.id,u.format);c=[],l=0,d=i.data,n.label=1;case 1:return l<d.length?(f=d[l],t.has(f.id)?[4,(\"string\"===f.kind?o.a.parse(f.data):o.a.parseBinary(f.data)).runInContext(e)]:[3,3]):[3,4];case 2:if((p=n.sent()).isError)throw new Error(f.id+\": \"+p.message);c.push({id:f.id,kind:\"cif\",data:p.result}),n.label=3;case 3:return l++,[3,1];case 4:return[2,new U.a.Format.Blob(c,{label:\"Format Blob\",description:c.length+\" \"+(1===c.length?\"entry\":\"entries\")})];}});});});}}),ne=U.b.BuiltIn({name:\"parse-cif\",display:{name:\"Parse CIF\",description:\"Parse CIF from String or Binary data\"},from:[U.a.Data.String,U.a.Data.Binary],to:U.a.Format.Cif})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse CIF\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,(U.a.Data.String.is(r)?o.a.parse(r.data):o.a.parseBinary(r.data)).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Cif(t.result)];}});});});}}),ie=U.b.BuiltIn({name:\"parse-cube\",display:{name:\"Parse Cube\",description:\"Parse Cube from String data\"},from:U.a.Data.String,to:U.a.Format.Cube})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse Cube\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,Q(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Cube(t.result)];}});});});}}),ae=U.b.BuiltIn({name:\"parse-psf\",display:{name:\"Parse PSF\",description:\"Parse PSF from String data\"},from:[U.a.Data.String],to:U.a.Format.Psf})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse PSF\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,R(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Psf(t.result)];}});});});}}),oe=U.b.BuiltIn({name:\"parse-ply\",display:{name:\"Parse PLY\",description:\"Parse PLY from String data\"},from:[U.a.Data.String],to:U.a.Format.Ply})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse PLY\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,P(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Ply(t.result,{label:t.result.comments[0]||\"PLY Data\"})];}});});});}}),se=U.b.BuiltIn({name:\"parse-ccp4\",display:{name:\"Parse CCP4/MRC/MAP\",description:\"Parse CCP4/MRC/MAP from Binary data\"},from:[U.a.Data.Binary],to:U.a.Format.Ccp4})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse CCP4/MRC/MAP\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,a.b(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Ccp4(t.result)];}});});});}}),ue=U.b.BuiltIn({name:\"parse-dsn6\",display:{name:\"Parse DSN6/BRIX\",description:\"Parse CCP4/BRIX from Binary data\"},from:[U.a.Data.Binary],to:U.a.Format.Dsn6})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse DSN6/BRIX\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,h(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Dsn6(t.result)];}});});});}}),ce=U.b.BuiltIn({name:\"parse-dx\",display:{name:\"Parse DX\",description:\"Parse DX from Binary/String data\"},from:[U.a.Data.Binary,U.a.Data.String],to:U.a.Format.Dx})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse DX\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,Z(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[2,new U.a.Format.Dx(t.result)];}});});});}}),le=U.b.BuiltIn({name:\"import-string\",display:{name:\"Import String\",description:\"Import given data as a string\"},from:U.a.Root,to:U.a.Data.String,params:{data:F.ParamDefinition.Value(\"\"),label:F.ParamDefinition.Optional(F.ParamDefinition.Text(\"\"))}})({apply:function apply(e){var t=e.params,r=t.data,n=t.label;return new U.a.Data.String(r,{label:n||\"\"});},update:function update(e){var t=e.oldParams,r=e.newParams,n=e.b;return t.data!==r.data?L.StateTransformer.UpdateResult.Recreate:t.label!==r.label?(n.label=r.label||\"\",L.StateTransformer.UpdateResult.Updated):L.StateTransformer.UpdateResult.Unchanged;},isSerializable:function isSerializable(){return{isSerializable:!1,reason:\"Cannot serialize user imported strings.\"};}}),de=U.b.BuiltIn({name:\"import-json\",display:{name:\"Import JSON\",description:\"Import given data as a JSON\"},from:U.a.Root,to:U.a.Format.Json,params:{data:F.ParamDefinition.Value({}),label:F.ParamDefinition.Optional(F.ParamDefinition.Text(\"\"))}})({apply:function apply(e){var t=e.params,r=t.data,n=t.label;return new U.a.Format.Json(r,{label:n||\"\"});},update:function update(e){var t=e.oldParams,r=e.newParams,n=e.b;return t.data!==r.data?L.StateTransformer.UpdateResult.Recreate:t.label!==r.label?(n.label=r.label||\"\",L.StateTransformer.UpdateResult.Updated):L.StateTransformer.UpdateResult.Unchanged;},isSerializable:function isSerializable(){return{isSerializable:!1,reason:\"Cannot serialize user imported JSON.\"};}}),fe=U.b.BuiltIn({name:\"parse-json\",display:{name:\"Parse JSON\",description:\"Parse JSON from String data\"},from:[U.a.Data.String],to:U.a.Format.Json})({apply:function apply(e){var t=this,r=e.a;return s.b.create(\"Parse JSON\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var e;return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,new Response(r.data).json()];case 1:return e=t.sent(),[2,new U.a.Format.Json(e)];}});});});}});},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return l;}),r.d(t,\"a\",function(){return d;}),r.d(t,\"b\",function(){return f;}),r.d(t,\"d\",function(){return p;});var n,i=r(0),a=r(255),o=r(83),s=r(339),u=r(61),c=\"undefined\"!=typeof performance&&performance.mark&&performance.measure&&!u.b;function l(e,t,r){void 0===r&&(r=250);var n=h(e,t,r);return b(e,new S(n,n.root));}function d(e,t,r){void 0===r&&(r=250);var n=h(e,t,r);return new S(n,n.root);}function f(e,t){return b(t,e);}function p(e,t,r){return e.runChild(t,r);}function m(e){return{taskId:e.id,taskName:e.name,message:\"\",startedTime:0,canAbort:!0,isIndeterminate:!0,current:0,max:0};}function h(e,t,r){var n,i={abortRequested:!1,treeAborted:!1,reason:\"\"};return{updateRateMs:r,lastNotified:Object(o.b)(),observer:t,abortToken:i,taskId:e.id,root:{progress:m(e),children:[]},tryAbort:(n=i,function(e){n.abortRequested=!0,n.reason=e||n.reason;})};}function g(e){return{progress:Object(i.__assign)({},e.progress),children:e.children.map(g)};}function v(e){return e.progress.canAbort&&e.children.every(v);}function b(e,t){return Object(i.__awaiter)(this,void 0,void 0,function(){var r,s;return Object(i.__generator)(this,function(i){switch(i.label){case 0:n.markStart(e),t.node.progress.startedTime=Object(o.b)(),i.label=1;case 1:return i.trys.push([1,3,,7]),[4,e.f(t)];case 2:return r=i.sent(),n.markEnd(e),n.measure(e),t.info.abortToken.abortRequested&&y(t.info),[2,r];case 3:return s=i.sent(),a.a.isAbort(s)?(t.isAborted=!0,t.node.children.length>0?[4,new Promise(function(e){t.onChildrenFinished=e;})]:[3,5]):[3,6];case 4:i.sent(),i.label=5;case 5:e.onAbort&&e.onAbort(),i.label=6;case 6:throw u.a&&console.error(s),s;case 7:return[2];}});});}function y(e){throw e.abortToken.treeAborted||(e.abortToken.treeAborted=!0,function e(t){var r=t.progress;r.isIndeterminate=!0,r.canAbort=!1,r.message=\"Aborting...\";for(var n=0,i=t.children;n<i.length;n++){var a=i[n];e(a);}}(e.root),_(e,Object(o.b)())),a.a.Aborted(e.abortToken.reason);}function _(e,t){e.lastNotified=t;var r=function(e){return{root:g(e.root),canAbort:v(e.root),requestAbort:e.tryAbort};}(e);e.observer(r);}!function(e){function t(e){return\"startTask\"+e.id;}function r(e){return\"endTask\"+e.id;}e.markStart=function(e){c&&performance.mark(t(e));},e.markEnd=function(e){c&&performance.mark(r(e));},e.measure=function(e){c&&performance.measure(\"✳️ \"+e.name,t(e),r(e));};}(n||(n={}));var S=function(){function e(e,t){this.isSynchronous=!1,this.isExecuting=!0,this.lastUpdatedTime=0,this.onChildrenFinished=void 0,this.node=t,this.info=e;}return e.prototype.checkAborted=function(){this.info.abortToken.abortRequested&&(this.isAborted=!0,y(this.info));},Object.defineProperty(e.prototype,\"shouldUpdate\",{get:function get(){return this.checkAborted(),Object(o.b)()-this.lastUpdatedTime>this.info.updateRateMs;},enumerable:!1,configurable:!0}),e.prototype.updateProgress=function(e){if(this.checkAborted(),e){var t=this.node.progress;\"string\"==typeof e?(t.message=e,t.isIndeterminate=!0):(void 0!==e.canAbort&&(t.canAbort=e.canAbort),void 0!==e.message&&(t.message=e.message),void 0!==e.current&&(t.current=e.current),void 0!==e.max&&(t.max=e.max),t.isIndeterminate=void 0===t.current||void 0===t.max,void 0!==e.isIndeterminate&&(t.isIndeterminate=e.isIndeterminate));}},e.prototype.update=function(e,t){if(this.lastUpdatedTime=Object(o.b)(),this.updateProgress(e),!t)return _(this.info,this.lastUpdatedTime),this.checkAborted(),s.a.immediatePromise();},e.prototype.runChild=function(t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,o,s,u,c,l,d;return Object(i.__generator)(this,function(i){switch(i.label){case 0:this.updateProgress(r),n={progress:m(t),children:[]},(o=this.node.children).push(n),s=new e(this.info,n),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,b(t,s)];case 2:return[2,i.sent()];case 3:if(u=i.sent(),a.a.isAbort(u)&&this.isAborted)return[2,void 0];throw u;case 4:if((c=o.indexOf(n))>=0){for(l=c,d=o.length-1;l<d;l++)o[l]=o[l+1];o.pop();}return 0===o.length&&this.onChildrenFinished&&this.onChildrenFinished(),[7];case 5:return[2];}});});},e;}();},function(e,t,r){\"use strict\";var n,i=function(){function e(e){this.xs=[],this.index=-1,this.length=0,this.hasNext=!1,this.length=e.length,this.hasNext=e.length>0,this.xs=e,this.index=-1,this.lastValue=e.length>0?e[0]:void 0;}return e.prototype.move=function(){return++this.index,this.lastValue=this.xs[this.index],this.hasNext=this.index<this.length-1,this.lastValue;},e;}(),a=function(){function e(e,t){this.max=t,this.value=0,this.hasNext=!1,this.value=e-1,this.hasNext=t>=e;}return e.prototype.move=function(){return++this.value,this.hasNext=this.value<this.max,this.value;},e;}(),o=function(){function e(e){this.value=e,this.hasNext=!0;}return e.prototype.move=function(){return this.hasNext=!1,this.value;},e;}(),s=function(){function e(e,t){this.base=e,this.f=t,this.hasNext=!1,this.hasNext=e.hasNext;}return e.prototype.move=function(){var e=this.f(this.base.move());return this.hasNext=this.base.hasNext,e;},e;}(),u=function(){function e(e,t){this.base=e,this.p=t,this.hasNext=this.findNext();}return e.prototype.move=function(){var e=this.next;return this.hasNext=this.findNext(),e;},e.prototype.findNext=function(){for(;this.base.hasNext;)if(this.next=this.base.move(),this.p(this.next))return!0;return!1;},e;}();!function(e){e.Empty=new a(0,-1),e.Array=function(e){return new i(e);},e.Value=function(e){return new o(e);},e.Range=function(e,t){return new a(e,t);},e.map=function(e,t){return new s(e,t);},e.filter=function(e,t){return new u(e,t);},e.forEach=function(e,t,r){for(;e.hasNext;){if(t(e.move(),r))return r;}return r;};}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;}),r.d(t,\"b\",function(){return n;});var n,i=r(9),a=r(11),o=r(113),s=r(46),u=function(){function e(e,t,r){this.operatorsProvider=r,this.id=e,this.details=t;}return Object.defineProperty(e.prototype,\"operatorGroups\",{get:function get(){return this._operators||(this._operators=this.operatorsProvider()),this._operators;},enumerable:!1,configurable:!0}),e;}();!function(e){e.create=function(t,r,n){return new e(t,r,n);};}(u||(u={})),function(e){e.Default={assemblies:[],spacegroup:a.e.ZeroP1,isNonStandardCrystalFrame:!1},e.findAssembly=function(e,t){var r=t.toLocaleLowerCase(),n=o.a.Provider.get(e);return n?Object(i.c)(n.assemblies,function(e){return e.id.toLowerCase()===r;}):void 0;},e.getUnitcellLabel=function(e){var t=e.spacegroup,r=t.cell,n=t.name,i=t.num,a=r.size,o=r.anglesInRadians,u=a[0].toFixed(2),c=a[1].toFixed(2),l=a[2].toFixed(2),d=Object(s.f)(o[0]).toFixed(2),f=Object(s.f)(o[1]).toFixed(2),p=Object(s.f)(o[2]).toFixed(2),m=[];return m.push(\"Unit Cell <b>\"+n+\"</b> #\"+i),m.push(u+\"×\"+c+\"×\"+l+\" Å\"),m.push(\"α=\"+d+\"° β=\"+f+\"° γ=\"+p+\"°\"),m.join(\" | \");};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(213),i=r(181);function a(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Object(n.a)(i.a,e);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(21),i=r(35),a=r(214),o=r(133);function s(e){return function(t){return 0===e?Object(o.b)():t.lift(new u(e));};}var u=function(){function e(e){if(this.total=e,this.total<0)throw new a.a();}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.total));},e;}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n;}return n.a(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()));},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return l;}),r.d(t,\"a\",function(){return d;});var n=r(21),i=r(122),a=r(100),o=r(52),s=r(50),u=r(224),c={};function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null,n=null;return Object(i.a)(e[e.length-1])&&(n=e.pop()),\"function\"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&Object(a.a)(e[0])&&(e=e[0]),Object(u.a)(e,n).lift(new d(r));}var d=function(){function e(e){this.resultSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector));},e;}(),f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n;}return n.a(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e);},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(Object(s.a)(this,n,n,r));}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete();},t.prototype.notifyNext=function(e,t,r,n,i){var a=this.values,o=a[r],s=this.toRespond?o===c?--this.toRespond:this.toRespond:0;a[r]=t,0===s&&(this.resultSelector?this._tryResultSelector(a):this.destination.next(a.slice()));},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e);}catch(e){return void this.destination.error(e);}this.destination.next(t);},t;}(o.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(44);function i(e,t){return t?new n.a(function(r){return t.schedule(a,0,{error:e,subscriber:r});}):new n.a(function(t){return t.error(e);});}function a(e){var t=e.error;e.subscriber.error(t);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(21),i=r(35);function a(){return function(e){return e.lift(new o(e));};}var o=function(){function e(e){this.connectable=e;}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),i=t.subscribe(n);return n.closed||(n.connection=r.connect()),i;},e;}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n;}return n.a(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var r=this.connection,n=e._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe();}}else this.connection=null;},t;}(i.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(21),i=r(60),a=r(351),o=r(69),s=r(347),u=r(208),c=r(353),l=function(e){function t(t,r,n){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i;}return n.a(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift(),e.prototype.next.call(this,t);},t.prototype.nextTimeWindow=function(t){this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t);},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,a=n.length;if(this.closed)throw new u.a();if(this.isStopped||this.hasError?t=o.a.EMPTY:(this.observers.push(e),t=new c.a(this,e)),i&&e.add(e=new s.a(e,i)),r)for(var l=0;l<a&&!e.closed;l++)e.next(n[l]);else for(l=0;l<a&&!e.closed;l++)e.next(n[l].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t;},t.prototype._getNow=function(){return(this.scheduler||a.a).now();},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,a=0;a<i&&!(e-n[a].time<r);)a++;return i>t&&(a=Math.max(a,i-t)),a>0&&n.splice(0,a),n;},t;}(i.a),d=function(){return function(e,t){this.time=e,this.value=t;};}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(44),i=r(139),a=r(133);function o(e){return new n.a(function(t){var r;try{r=e();}catch(e){return void t.error(e);}return(r?Object(i.a)(r):Object(a.b)()).subscribe(t);});}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return l;}),r.d(t,\"a\",function(){return d;});var n=r(21),i=r(224),a=r(100),o=r(35),s=r(52),u=r(50),c=r(197);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return\"function\"==typeof r&&e.pop(),Object(i.a)(e,void 0).lift(new d(r));}var d=function(){function e(e){this.resultSelector=e;}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector));},e;}(),f=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var i=e.call(this,t)||this;return i.iterators=[],i.active=0,i.resultSelector=\"function\"==typeof r?r:null,i.values=n,i;}return n.a(t,e),t.prototype._next=function(e){var t=this.iterators;Object(a.a)(e)?t.push(new m(e)):\"function\"==typeof e[c.a]?t.push(new p(e[c.a]())):t.push(new h(this.destination,this,e));},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var r=0;r<t;r++){var n=e[r];if(n.stillUnsubscribed)this.destination.add(n.subscribe(n,r));else this.active--;}}else this.destination.complete();},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete();},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){if(\"function\"==typeof(o=e[n]).hasValue&&!o.hasValue())return;}var i=!1,a=[];for(n=0;n<t;n++){var o,s=(o=e[n]).next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value);}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete();},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e);}catch(e){return void this.destination.error(e);}this.destination.next(t);},t;}(o.a),p=function(){function e(e){this.iterator=e,this.nextResult=e.next();}return e.prototype.hasValue=function(){return!0;},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e;},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done;},e;}(),m=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length;}return e.prototype[c.a]=function(){return this;},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0};},e.prototype.hasValue=function(){return this.array.length>this.index;},e.prototype.hasCompleted=function(){return this.array.length===this.index;},e;}(),h=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.parent=r,i.observable=n,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i;}return n.a(t,e),t.prototype[c.a]=function(){return this;},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1};},t.prototype.hasValue=function(){return this.buffer.length>0;},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete;},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete();},t.prototype.notifyNext=function(e,t,r,n,i){this.buffer.push(t),this.parent.checkIterators();},t.prototype.subscribe=function(e,t){return Object(u.a)(this,this.observable,this,t);},t;}(s.a);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"InitVolumeStreaming\",function(){return E;}),r.d(t,\"BoxifyVolumeStreaming\",function(){return A;}),r.d(t,\"CreateVolumeStreamingInfo\",function(){return D;}),r.d(t,\"CreateVolumeStreamingBehavior\",function(){return I;}),r.d(t,\"VolumeStreamingVisual\",function(){return M;});var n,i=r(0),a=r(8),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(i.__extends)(t,e),t;}(a.a.Create({name:\"Volume Streaming\",typeClass:\"Object\"}));!function(e){!function(e){e.Float32=\"float32\",e.Int8=\"int8\";}(e.ValueType||(e.ValueType={}));}(n||(n={}));var s=r(2),u=r(16),c=r(261),l=r(241),d=r(36),f=r(13),p=r(4),m=r(72),h=r(101);function g(e,t){if(!t||!t.models.length)return[];var r=t.models[0];switch(e){case\"em\":return function(e){var t=[];if(!m.a.is(e.sourceData))return[e.entryId];var r=e.sourceData.data.db.pdbx_database_related,n=r.db_id,i=r.db_name,a=r.content_type;if(!i.isDefined)return[e.entryId];for(var o=0,s=i.rowCount;o<s;++o)\"EMDB\"===i.value(o).toUpperCase()&&\"associated EM volume\"===a.value(o)&&t.push(n.value(o));return t;}(r);case\"x-ray\":return function(e){return[e.entryId];}(r);}}function v(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,function(){return Object(i.__generator)(this,function(i){switch(e){case\"emdb\":return[2,b(t,r,n)];case\"pdbe\":return[2,y(t,r,n)];}return[2];});});}function b(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,a,o;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return n=e.config.get(h.PluginConfig.VolumeStreaming.EmdbHeaderServer),[4,e.fetch({url:n+\"/\"+r.toUpperCase()+\"/header/\"+r.toLowerCase()+\".xml\",type:\"xml\"}).runInContext(t)];case 1:return a=i.sent(),o=a.getElementsByTagName(\"map\")[0],[2,parseFloat(o.getElementsByTagName(\"contourLevel\")[0].textContent)];}});});}function y(e,t,r){var n,a,o;return Object(i.__awaiter)(this,void 0,void 0,function(){var s,u,c;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return r=r.toUpperCase(),[4,e.fetch({url:\"https://www.ebi.ac.uk/pdbe/api/emdb/entry/map/\"+r,type:\"json\"}).runInContext(t)];case 1:return s=i.sent(),u=null==s?void 0:s[r],c=void 0,void 0!==(null===(o=null===(a=null===(n=null==u?void 0:u[0])||void 0===n?void 0:n.map)||void 0===a?void 0:a.contour_level)||void 0===o?void 0:o.value)&&(c=+u[0].map.contour_level.value),[2,c];}});});}function _(e,t,r){var n;return Object(i.__awaiter)(this,void 0,void 0,function(){var a,o,s,u;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return[4,e.fetch({url:\"https://www.ebi.ac.uk/pdbe/api/pdb/entry/summary/\"+r,type:\"json\"}).runInContext(t)];case 1:if(a=i.sent(),o=null==a?void 0:a[r],s=[],!(null===(n=null==o?void 0:o[0])||void 0===n?void 0:n.related_structures))throw new Error(\"No related EMDB entry found for '\"+r+\"'.\");if(!(u=o[0].related_structures.filter(function(e){return\"EMDB\"===e.resource&&\"associated EM volume\"===e.relationship;})).length)throw new Error(\"No related EMDB entry found for '\"+r+\"'.\");return s.push.apply(s,u.map(function(e){return e.accession;})),[2,s];}});});}var S=r(160),O=r(198),x=r(379),C=r(89),w=r(11),P=r(1);function j(e,t,r,n){e.push({source:\"em\"===t?{name:\"em\",params:{isoValue:d.b.IsoValue.absolute(n||0)}}:{name:\"x-ray\",params:{}},dataId:r});}var E=f.StateAction.build({display:{name:\"Volume Streaming\"},from:a.a.Molecule.Structure,params:function params(e,t){var r=function(e,t){if(void 0===t&&(t=\"x-ray\"),!e)return t;var r=e.models[0];return m.a.is(r.sourceData)?p.Model.hasEmMap(r)?\"em\":p.Model.hasXrayMap(r)?\"x-ray\":p.Model.isFromEm(r)?\"em\":p.Model.isFromXray(r)?\"x-ray\":t:t;}(e&&e.data),n=g(r,e&&e.data);return{method:s.ParamDefinition.Select(r,[[\"em\",\"EM\"],[\"x-ray\",\"X-Ray\"]]),entries:s.ParamDefinition.ObjectList({id:s.ParamDefinition.Text(n[0]||\"\")},function(e){return e.id;},{defaultValue:n.map(function(e){return{id:e};})}),defaultView:s.ParamDefinition.Select(\"em\"===r?\"cell\":\"selection-box\",S.a.ViewTypeOptions),options:s.ParamDefinition.Group({serverUrl:s.ParamDefinition.Text(t.config.get(h.PluginConfig.VolumeStreaming.DefaultServer)||\"https://ds.litemol.org\"),behaviorRef:s.ParamDefinition.Text(\"\",{isHidden:!0}),emContourProvider:s.ParamDefinition.Select(\"emdb\",[[\"emdb\",\"EMDB\"],[\"pdbe\",\"PDBe\"]],{isHidden:!0}),channelParams:s.ParamDefinition.Value({},{isHidden:!0})})};},isApplicable:function isApplicable(e,t,r){var n=r.config.get(h.PluginConfig.VolumeStreaming.CanStream);return n?n(e.data,r):1===e.data.models.length&&p.Model.probablyHasDensityMap(e.data.models[0]);}})(function(e,t){var r=e.ref,n=e.state,a=e.params;return u.b.create(\"Volume Streaming\",function(e){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var o,u,c,l,d,f,p,m,h,g,b,y,O,x,C,w,P;return Object(i.__generator)(this,function(i){switch(i.label){case 0:o=[],u=0,c=a.entries.length,i.label=1;case 1:return u<c?(l=a.entries[u].id.toLowerCase(),d=void 0,\"em\"!==a.method?[3,14]:l.toUpperCase().startsWith(\"EMD\")?[3,11]:[4,e.update(\"Getting EMDB info...\")]):[3,16];case 2:return i.sent(),[4,_(t,e,l)];case 3:f=i.sent(),p=0,m=f.length,i.label=4;case 4:if(!(p<m))return[3,10];h=f[p],g=void 0,i.label=5;case 5:return i.trys.push([5,7,,8]),[4,v(a.options.emContourProvider,t,e,h)];case 6:return g=i.sent(),[3,8];case 7:return b=i.sent(),console.info(\"Could not get map info for \"+h+\": \"+b),[3,9];case 8:j(o,a.method,h,g||0),i.label=9;case 9:return++p,[3,4];case 10:return[3,15];case 11:return i.trys.push([11,13,,14]),[4,v(a.options.emContourProvider,t,e,l)];case 12:return d=i.sent(),[3,14];case 13:return y=i.sent(),console.info(\"Could not get map info for \"+l+\": \"+y),[3,15];case 14:j(o,a.method,l,d||0),i.label=15;case 15:return++u,[3,1];case 16:return[4,(O=n.build().to(r).applyOrUpdateTagged(S.a.RootTag,D,{serverUrl:a.options.serverUrl,entries:o})).commit()];case 17:return i.sent(),(x=O.selector).isOk?(null==(C=n.tree.children.get(x.ref))?void 0:C.size)>0?[4,t.managers.structure.hierarchy.remove(null==C?void 0:C.toArray())]:[3,19]:[2];case 18:i.sent(),i.label=19;case 19:return w=x.cell.obj,P=n.build().to(O.ref).apply(I,s.ParamDefinition.getDefaultValues(S.a.createParams({data:w.data,defaultView:a.defaultView,channelParams:a.options.channelParams})),{ref:a.options.behaviorRef?a.options.behaviorRef:void 0}),\"em\"===a.method?P.apply(M,{channel:\"em\"},{state:{isGhost:!0},tags:\"em\"}):(P.apply(M,{channel:\"2fo-fc\"},{state:{isGhost:!0},tags:\"2fo-fc\"}),P.apply(M,{channel:\"fo-fc(+ve)\"},{state:{isGhost:!0},tags:\"fo-fc(+ve)\"}),P.apply(M,{channel:\"fo-fc(-ve)\"},{state:{isGhost:!0},tags:\"fo-fc(-ve)\"})),[4,n.updateTree(P).runInContext(e)];case 20:return i.sent(),[2];}});});});}),A=f.StateAction.build({display:{name:\"Boxify Volume Streaming\",description:\"Make the current box permanent.\"},from:S.a,isApplicable:function isApplicable(e){return\"selection-box\"===e.data.params.entry.params.view.name;}})(function(e,t){var r=e.a,n=e.ref,a=e.state,o=r.data.params;if(\"selection-box\"===o.entry.params.view.name){var s=w.b.create(P.Vec3.clone(o.entry.params.view.params.bottomLeft),P.Vec3.clone(o.entry.params.view.params.topRight)),u=o.entry.params.view.params.radius;w.b.expand(s,s,P.Vec3.create(u,u,u));var c=Object(i.__assign)(Object(i.__assign)({},o),{entry:{name:o.entry.name,params:Object(i.__assign)(Object(i.__assign)({},o.entry.params),{view:{name:\"box\",params:{bottomLeft:s.min,topRight:s.max}}})}});return a.updateTree(a.build().to(n).update(c));}}),T={dataId:s.ParamDefinition.Text(\"\"),source:s.ParamDefinition.MappedStatic(\"x-ray\",{em:s.ParamDefinition.Group({isoValue:Object(l.c)(d.b.IsoValue.relative(1))}),\"x-ray\":s.ParamDefinition.Group({})})},D=a.b.BuiltIn({name:\"create-volume-streaming-info\",display:{name:\"Volume Streaming Info\"},from:a.a.Molecule.Structure,to:o,params:function params(e){return{serverUrl:s.ParamDefinition.Text(\"https://ds.litemol.org\"),entries:s.ParamDefinition.ObjectList(T,function(e){return e.dataId;},{defaultValue:[{dataId:\"\",source:{name:\"x-ray\",params:{}}}]})};}})({apply:function apply(e,t){var r=e.a,n=e.params;return u.b.create(\"\",function(e){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var a,s,u,l,f,p,m,h;return Object(i.__generator)(this,function(i){switch(i.label){case 0:a=[],s=0,u=n.entries.length,i.label=1;case 1:return s<u?(l=n.entries[s],f=l.dataId,p=\"em\"===l.source.name?l.source.params.isoValue:d.b.IsoValue.relative(1),[4,e.update(\"Getting server header...\")]):[3,5];case 2:return i.sent(),[4,t.fetch({url:Object(c.a)(n.serverUrl,l.source.name+\"/\"+f.toLocaleLowerCase()),type:\"json\"}).runInContext(e)];case 3:m=i.sent(),a.push({dataId:f,kind:l.source.name,header:m,emDefaultContourLevel:p}),i.label=4;case 4:return++s,[3,1];case 5:return h={serverUrl:n.serverUrl,entries:a,structure:r.data},[2,new o(h,{label:\"Volume Server\",description:\"\"+a.map(function(e){return e.dataId;}).join(\", \")})];}});});});}}),I=a.b.BuiltIn({name:\"create-volume-streaming-behavior\",display:{name:\"Volume Streaming Behavior\"},from:o,to:S.a,params:function params(e){return S.a.createParams({data:e&&e.data});}})({canAutoUpdate:function canAutoUpdate(e){var t=e.oldParams,r=e.newParams;return t.entry.params.view===r.entry.params.view||\"selection-box\"===r.entry.params.view.name||\"off\"===r.entry.params.view.name;},apply:function apply(e,t){var r=e.a,n=e.params;return u.b.create(\"Volume streaming\",function(e){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var e;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return[4,(e=new S.a.Behavior(t,r.data)).update(n)];case 1:return i.sent(),[2,new S.a(e,{label:\"Volume Streaming\",description:e.getDescription()})];}});});});},update:function update(e){var t=this,r=(e.a,e.b),n=e.oldParams,a=e.newParams;return u.b.create(\"Update Volume Streaming\",function(e){return Object(i.__awaiter)(t,void 0,void 0,function(){var e,t;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return n.entry.name!==a.entry.name&&\"em\"in a.entry.params.channels&&(e=r.data.infoMap.get(a.entry.name).emDefaultContourLevel)&&(a.entry.params.channels.em.isoValue=e),[4,r.data.update(a)];case 1:return t=i.sent()?f.StateTransformer.UpdateResult.Updated:f.StateTransformer.UpdateResult.Unchanged,r.description=r.data.getDescription(),[2,t];}});});});}}),M=a.b.BuiltIn({name:\"create-volume-streaming-visual\",display:{name:\"Volume Streaming Visual\"},from:S.a,to:a.a.Volume.Representation3D,params:{channel:s.ParamDefinition.Select(\"em\",S.a.ChannelTypeOptions,{isHidden:!0})}})({apply:function apply(e,t){var r=e.a,n=e.params;return u.b.create(\"Volume Representation\",function(e){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var o,s,u,c,l,d;return Object(i.__generator)(this,function(p){switch(p.label){case 0:return(o=r.data.channels[n.channel])?(s=k(r.data,n.channel),u=x.a.BuiltIn.isosurface,c=s.type.params||{},(l=u.factory(Object(i.__assign)({webgl:null===(d=t.canvas3d)||void 0===d?void 0:d.webgl},t.representation.volume.themes),u.getParams)).setTheme(C.a.create(t.representation.volume.themes,{volume:o.data},s)),[4,l.createOrUpdate(c,o.data).runInContext(e)]):[2,f.StateObject.Null];case 1:return p.sent(),[2,new a.a.Volume.Representation3D({repr:l,source:r},{label:Math.round(100*o.isoValue.relativeValue)/100+\" σ [\"+n.channel+\"]\"})];}});});});},update:function update(e,t){var r=e.a,n=e.b,a=(e.oldParams,e.newParams);return u.b.create(\"Volume Representation\",function(e){return Object(i.__awaiter)(void 0,void 0,void 0,function(){var o,s,u;return Object(i.__generator)(this,function(c){switch(c.label){case 0:return(o=r.data.channels[a.channel])?(s=k(r.data,a.channel),u=Object(i.__assign)(Object(i.__assign)({},n.data.repr.props),s.type.params),n.data.repr.setTheme(C.a.create(t.representation.volume.themes,{volume:o.data},s)),[4,n.data.repr.createOrUpdate(u,o.data).runInContext(e)]):[2,f.StateTransformer.UpdateResult.Unchanged];case 1:return c.sent(),[2,f.StateTransformer.UpdateResult.Updated];}});});});}});function k(e,t){var r=e.channels[t];return O.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e.plugin,\"isosurface\",{isoValue:r.isoValue,alpha:r.opacity,visuals:r.wireframe?[\"wireframe\"]:[\"solid\"]},\"uniform\",{value:r.color});}},function(e,t,r){\"use strict\";function n(e){return null!==e&&\"object\"==typeof_default()(e);}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(35);function i(e){for(;e;){var t=e,r=t.closed,i=t.destination,a=t.isStopped;if(r||a)return!1;e=i&&i instanceof n.a?i:null;}return!0;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(76);!function(e){var t=function(){function e(e){this.cells=e,this._current=void 0;}return Object.defineProperty(e.prototype,\"current\",{get:function get(){return this._current;},set:function set(e){this._current=e;},enumerable:!1,configurable:!0}),e.prototype.getAncestorOfType=function(e){if(this._current)for(var t=this._current;;){if(!(t=this.cells.get(t.transform.parent)).obj)return;if(t.obj.type===e.type)return t.obj;if(t.transform.ref===i.a.RootRef)return;}},e.prototype.getRootOfType=function(e){if(this._current)for(var t=this._current,r=void 0;;){if(!t.obj)return;if(t.obj.type===e.type&&(r=t),t.transform.ref===i.a.RootRef)return r?r.obj:void 0;t=this.cells.get(t.transform.parent);}},e;}();e.Impl=t,e.getDecoratorChain=function(e,t){for(var r=e.cells,n=r.get(t),i=[n];null==n?void 0:n.transform.transformer.definition.isDecorator;)n=r.get(n.transform.parent),i.push(n);return i;},e.getRootOfType=function(e,t,r){var n=void 0,a=e.cells.get(r);if(a)for(;;){if(!a.obj)return;if(a.obj.type===t.type&&(n=a),a.transform.ref===i.a.RootRef)return n?n.obj:void 0;a=e.cells.get(a.transform.parent);}};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return s;}),r.d(t,\"e\",function(){return u;}),r.d(t,\"d\",function(){return c;}),r.d(t,\"b\",function(){return n;}),r.d(t,\"a\",function(){return i;});var n,i,a=r(7),o=r(57),s={type_symbol:a.a.Schema.Aliased(o.a.atom_site.type_symbol),label_atom_id:o.a.atom_site.label_atom_id,auth_atom_id:o.a.atom_site.auth_atom_id,label_alt_id:o.a.atom_site.label_alt_id,label_comp_id:o.a.atom_site.label_comp_id,auth_comp_id:o.a.atom_site.auth_comp_id,pdbx_formal_charge:o.a.atom_site.pdbx_formal_charge,sourceIndex:a.a.Schema.int},u={group_PDB:o.a.atom_site.group_PDB,label_seq_id:o.a.atom_site.label_seq_id,auth_seq_id:o.a.atom_site.auth_seq_id,pdbx_PDB_ins_code:o.a.atom_site.pdbx_PDB_ins_code},c={label_asym_id:o.a.atom_site.label_asym_id,auth_asym_id:o.a.atom_site.auth_asym_id,label_entity_id:o.a.atom_site.label_entity_id};!function(e){e.EmptyResidueKey=function(){return{label_entity_id:\"\",label_asym_id:\"\",auth_seq_id:0,pdbx_PDB_ins_code:void 0};};}(n||(n={})),function(e){function t(e,t){return e.residueAtomSegments.index[e.chainAtomSegments.offsets[t]];}function r(e,t){return e.residueAtomSegments.index[e.chainAtomSegments.offsets[t+1]-1]+1;}e.chainStartResidueIndex=t,e.chainEndResidueIndexExcl=r,e.chainResidueCount=function(e,n){return r(e,n)-t(e,n);};}(i||(i={}));},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return n;}),r.d(t,\"d\",function(){return o;}),r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return u;});var n={H:1,D:1,T:1,HE:2,LI:3,BE:4,B:5,C:6,N:7,O:8,F:9,NE:10,NA:11,MG:12,AL:13,SI:14,P:15,S:16,CL:17,AR:18,K:19,CA:20,SC:21,TI:22,V:23,CR:24,MN:25,FE:26,CO:27,NI:28,CU:29,ZN:30,GA:31,GE:32,AS:33,SE:34,BR:35,KR:36,RB:37,SR:38,Y:39,ZR:40,NB:41,MO:42,TC:43,RU:44,RH:45,PD:46,AG:47,CD:48,IN:49,SN:50,SB:51,TE:52,I:53,XE:54,CS:55,BA:56,LA:57,CE:58,PR:59,ND:60,PM:61,SM:62,EU:63,GD:64,TB:65,DY:66,HO:67,ER:68,TM:69,YB:70,LU:71,HF:72,TA:73,W:74,RE:75,OS:76,IR:77,PT:78,AU:79,HG:80,TL:81,PB:82,BI:83,PO:84,AT:85,RN:86,FR:87,RA:88,AC:89,TH:90,PA:91,U:92,NP:93,PU:94,AM:95,CM:96,BK:97,CF:98,ES:99,FM:100,MD:101,NO:102,LR:103,RF:104,DB:105,SG:106,BH:107,HS:108,MT:109},i={1:1.1,2:1.4,3:1.81,4:1.53,5:1.92,6:1.7,7:1.55,8:1.52,9:1.47,10:1.54,11:2.27,12:1.73,13:1.84,14:2.1,15:1.8,16:1.8,17:1.75,18:1.88,19:2.75,20:2.31,21:2.3,22:2.15,23:2.05,24:2.05,25:2.05,26:2.05,27:2,28:2,29:2,30:2.1,31:1.87,32:2.11,33:1.85,34:1.9,35:1.83,36:2.02,37:3.03,38:2.49,39:2.4,40:2.3,41:2.15,42:2.1,43:2.05,44:2.05,45:2,46:2.05,47:2.1,48:2.2,49:2.2,50:1.93,51:2.17,52:2.06,53:1.98,54:2.16,55:3.43,56:2.68,57:2.5,58:2.48,59:2.47,60:2.45,61:2.43,62:2.42,63:2.4,64:2.38,65:2.37,66:2.35,67:2.33,68:2.32,69:2.3,70:2.28,71:2.27,72:2.25,73:2.2,74:2.1,75:2.05,76:2,77:2,78:2.05,79:2.1,80:2.05,81:1.96,82:2.02,83:2.07,84:1.97,85:2.02,86:2.2,87:3.48,88:2.83,89:2,90:2.4,91:2,92:2.3,93:2,94:2,95:2,96:2,97:2,98:2,99:2,100:2,101:2,102:2,103:2,104:2,105:2,106:2,107:2,108:2,109:2},a={1:1.008,2:4.0026,3:6.94,4:9.0122,5:10.81,6:10.81,7:14.007,8:15.999,9:18.998,10:20.18,11:22.99,12:24.305,13:26.982,14:28.085,15:30.974,16:32.06,17:35.45,18:39.948,19:39.098,20:40.078,21:44.956,22:47.867,23:50.942,24:51.996,25:54.938,26:55.845,27:58.933,28:58.693,29:63.546,30:65.38,31:69.723,32:72.63,33:74.922,34:78.971,35:79.904,36:83.798,37:85.468,38:87.62,39:88.906,40:91.224,41:92.906,42:95.95,43:96.906,44:101.07,45:102.91,46:106.42,47:107.87,48:112.41,49:114.82,50:118.71,51:121.76,52:127.6,53:127.6,54:131.29,55:132.91,56:137.33,57:138.91,58:140.12,59:140.91,60:144.24,61:144.912,62:150.36,63:151.96,64:157.25,65:158.93,66:162.5,67:164.93,68:167.26,69:168.93,70:173.05,71:174.97,72:178.49,73:180.95,74:183.84,75:186.21,76:190.23,77:192.22,78:195.08,79:196.97,80:200.59,81:204.38,82:207.2,83:208.98,84:1.97,85:2.02,86:2.2,87:3.48,88:2.83,89:2,90:232.04,91:231.04,92:238.03,93:237.048,94:244.064,95:243.061,96:247.07,97:247.07,98:251.079,99:252.083,100:257.095,101:258.098,102:259.101,103:262.11,104:267.122,105:270.131,106:271.134,107:270.133,108:270.134,109:278.156};function o(e){var t=n[e];return void 0===t?1.7:i[t];}function s(e){var t=n[e];return void 0===t?10.81:a[t];}function u(e){var t=n[e];return void 0===t?0:t;}},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return a;}),r.d(t,\"a\",function(){return s;});var n=r(22),i=new Map([[\"HIS|CD2|CG\",2],[\"HIS|CE1|ND1\",2],[\"ARG|CZ|NH2\",2],[\"PHE|CE1|CZ\",2],[\"PHE|CD2|CE2\",2],[\"PHE|CD1|CG\",2],[\"TRP|CD1|CG\",2],[\"TRP|CD2|CE2\",2],[\"TRP|CE3|CZ3\",2],[\"TRP|CH2|CZ2\",2],[\"ASN|CG|OD1\",2],[\"GLN|CD|OE1\",2],[\"TYR|CD1|CG\",2],[\"TYR|CD2|CE2\",2],[\"TYR|CE1|CZ\",2],[\"ASP|CG|OD1\",2],[\"GLU|CD|OE1\",2],[\"G|C8|N7\",2],[\"G|C4|C5\",2],[\"G|C2|N3\",2],[\"G|C6|O6\",2],[\"C|C4|N3\",2],[\"C|C5|C6\",2],[\"C|C2|O2\",2],[\"A|C2|N3\",2],[\"A|C6|N1\",2],[\"A|C4|C5\",2],[\"A|C8|N7\",2],[\"U|C5|C6\",2],[\"U|C2|O2\",2],[\"U|C4|O4\",2],[\"DG|C8|N7\",2],[\"DG|C4|C5\",2],[\"DG|C2|N3\",2],[\"DG|C6|O6\",2],[\"DC|C4|N3\",2],[\"DC|C5|C6\",2],[\"DC|C2|O2\",2],[\"DA|C2|N3\",2],[\"DA|C6|N1\",2],[\"DA|C4|C5\",2],[\"DA|C8|N7\",2],[\"DT|C5|C6\",2],[\"DT|C2|O2\",2],[\"DT|C4|O4\",2]]);function a(e,t,r){var a;return t=(a=t<r?[t,r]:[r,t])[0],r=a[1],n.AminoAcidNames.has(e)&&\"C\"===t&&\"O\"===r||n.BaseNames.has(e)&&\"OP1\"===t&&\"P\"===r?2:i.get(e+\"|\"+t+\"|\"+r)||1;}var o=new Map([[\"LYS|NZ|RET|C15\",2]]);function s(e,t,r,n){var i,a;return e>r&&(e=(i=[r,e])[0],r=i[1],t=(a=[n,t])[0],n=a[1]),o.get(e+\"|\"+t+\"|\"+r+\"|\"+n)||1;}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"CustomModelProperty\",function(){return n;});var n,i=r(0),a=r(2),o=r(5),s=r(66),u=r(41);!function(e){function t(e){var t=this,r=e.descriptor.name,n=\"static\"===e.type?\"_staticPropertyData\":\"_dynamicPropertyData\",s=function s(t){return r in t[n]||(t[n][r]={props:Object(i.__assign)({},a.ParamDefinition.getDefaultValues(e.getParams(t))),data:o.d.create(void 0)}),t[n][r];},u=function u(e,t,i){var a=s(e);e[n][r]={props:t,data:o.d.withValue(a.data,i)};};return{label:e.label,descriptor:e.descriptor,isHidden:e.isHidden,getParams:function getParams(t){var r=a.ParamDefinition.clone(e.getParams(t));return a.ParamDefinition.setDefaultValues(r,s(t).props),r;},defaultParams:e.defaultParams,isApplicable:e.isApplicable,attach:function attach(r,n,o,c){return void 0===o&&(o={}),Object(i.__awaiter)(t,void 0,void 0,function(){var t,l,d,f,p;return Object(i.__generator)(this,function(i){switch(i.label){case 0:return c&&n.customProperties.reference(e.descriptor,!0),t=s(n),l=a.ParamDefinition.merge(e.defaultParams,t.props,o),t.data.value&&a.ParamDefinition.areEqual(e.defaultParams,t.props,l)?[2]:[4,e.obtain(r,n,l)];case 1:return d=i.sent(),f=d.value,p=d.assets,n.customProperties.add(e.descriptor),n.customProperties.assets(e.descriptor,p),u(n,l,f),[2];}});});},ref:function ref(t,r){return t.customProperties.reference(e.descriptor,r);},get:function get(e){var t;return null===(t=s(e))||void 0===t?void 0:t.data;},set:function set(t,r){void 0===r&&(r={});var n=s(t),i=a.ParamDefinition.merge(e.defaultParams,n.props,r);a.ParamDefinition.areEqual(e.defaultParams,n.props,i)||(u(t,i,void 0),t.customProperties.assets(e.descriptor));},props:function props(e){return s(e).props;}};}e.createProvider=t,e.createSimple=function(e,r,n){var o=this,c={value:a.ParamDefinition.Value(n,{isHidden:!0})};return t({label:Object(u.d)(e),descriptor:Object(s.CustomPropertyDescriptor)({name:e}),isHidden:!0,type:r,defaultParams:c,getParams:function getParams(){return{value:a.ParamDefinition.Value(n,{isHidden:!0})};},isApplicable:function isApplicable(){return!0;},obtain:function obtain(e,t,r){return Object(i.__awaiter)(o,void 0,void 0,function(){var e;return Object(i.__generator)(this,function(t){return[2,{value:null!==(e=r.value)&&void 0!==e?e:n}];});});}});};}(n||(n={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ElementSymbolColors\",function(){return c;}),r.d(t,\"ElementSymbolColorThemeParams\",function(){return d;}),r.d(t,\"getElementSymbolColorThemeParams\",function(){return f;}),r.d(t,\"elementSymbolColor\",function(){return p;}),r.d(t,\"ElementSymbolColorTheme\",function(){return m;}),r.d(t,\"ElementSymbolColorThemeProvider\",function(){return h;});var n=r(24),i=r(4),a=r(2),o=r(140),s=r(43),u=r(326),c=Object(n.ColorMap)({H:16777215,D:16777152,T:16777120,HE:14286847,LI:13402367,BE:12779264,B:16758197,C:9474192,N:3166456,O:16715021,F:9494608,NE:11789301,NA:11230450,MG:9109248,AL:12560038,SI:1578e4,P:16744448,S:16777008,CL:2093087,AR:8442339,K:9388244,CA:4062976,SC:15132390,TI:12567239,V:10921643,CR:9083335,MN:10255047,FE:14706227,CO:15765664,NI:5296208,CU:13140019,ZN:8224944,GA:12750735,GE:6721423,AS:12419299,SE:16752896,BR:10889513,KR:6076625,RB:7351984,SR:65280,Y:9764863,ZR:9756896,NB:7586505,MO:5551541,TC:3907230,RU:2396047,RH:687500,PD:27013,AG:12632256,CD:16767375,IN:10909043,SN:6717568,SB:10380213,TE:13924864,I:9699476,XE:9699476,CS:5707663,BA:51456,LA:7394559,CE:16777159,PR:14286791,ND:13107143,PM:10747847,SM:9437127,EU:6422471,GD:4587463,TB:3211207,DY:2097095,HO:65436,ER:58997,TM:54354,YB:48952,LU:43812,HF:5096191,TA:5089023,W:2200790,RE:2522539,OS:2516630,IR:1528967,PT:13684960,AU:16765219,HG:12105936,TL:10900557,PB:5724513,BI:10375093,PO:11230208,AT:7688005,RN:4358806,FR:4325478,RA:32e3,AC:7384058,TH:47871,PA:41471,U:36863,NP:33023,PU:27647,AM:5528818,CM:7888099,BK:9064419,CF:10565332,ES:11739092,FM:11739066,MD:11734438,NO:12389767,LR:13041766,RF:13369433,DB:13697103,SG:14221381,BH:14680120,HS:15073326,MT:15400998,DS:16777215,RG:16777215,CN:16777215,UUT:16777215,FL:16777215,UUP:16777215,LV:16777215,UUH:16777215}),l=Object(n.Color)(16777215),d={carbonByChainId:a.ParamDefinition.Boolean(!0),saturation:a.ParamDefinition.Numeric(0,{min:-6,max:6,step:.1}),lightness:a.ParamDefinition.Numeric(.2,{min:-6,max:6,step:.1})};function f(e){return d;}function p(e,t){var r=e[t];return void 0===r?l:r;}function m(e,t){var r=Object(s.getAdjustedColorMap)(c,t.saturation,t.lightness),n=Object(u.a)(e,a.ParamDefinition.getDefaultValues(Object(u.c)(e))).color;function d(e,i){return t.carbonByChainId&&\"C\"===e?n(i,!1):p(r,e);}return{factory:m,granularity:\"group\",color:function color(e){if(i.StructureElement.Location.is(e)){if(i.Unit.isAtomic(e.unit))return d(e.unit.model.atomicHierarchy.atoms.type_symbol.value(e.element),e);}else if(i.Bond.isLocation(e)){if(i.Unit.isAtomic(e.aUnit))return d(e.aUnit.model.atomicHierarchy.atoms.type_symbol.value(e.aUnit.elements[e.aIndex]),e);}return l;},props:t,description:\"Assigns a color to every atom according to its chemical element.\",legend:Object(o.b)(Object.keys(c).map(function(e){return[e,c[e]];}))};}var h={name:\"element-symbol\",label:\"Element Symbol\",category:\"Atom Property\",factory:m,getParams:f,defaultValues:a.ParamDefinition.getDefaultValues(d),isApplicable:function isApplicable(e){return!!e.structure;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(1),i=r(34),a=r(75),o=n.Mat4.identity(),s=Object(n.Vec3)();function u(e,t,r,u,c,l){i.a.addPrimitive(e,function(e,t,r,i,a){return n.Vec3.add(s,t,r),n.Mat4.targetTo(e,t,s,i),n.Mat4.setTranslation(e,t),n.Mat4.scale(e,e,a);}(o,t,r,u,c),Object(a.b)(l));}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(0),i=r(26),a=r(155),o=r(286),s=r(2),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._getInfo=Object(a.b)(function(e,r){return o.a.infoFromAction(t.plugin,t.props.state,t.props.action,t.props.nodeRef);}),t.state={plugin:t.plugin,ref:t.props.nodeRef,version:t.props.state.transforms.get(t.props.nodeRef).version,error:void 0,isInitial:!0,params:t.getInfo().initialValues,busy:!1,isCollapsed:t.props.initiallyCollapsed},t;}return Object(n.__extends)(t,e),t.prototype.applyAction=function(){return i.PluginCommands.State.ApplyAction(this.plugin,{state:this.props.state,action:this.props.action.create(this.state.params),ref:this.props.nodeRef});},t.prototype.getInfo=function(){return this._getInfo(this.props.nodeRef,this.props.state.transforms.get(this.props.nodeRef).version);},t.prototype.getTransformerId=function(){return this.props.state.transforms.get(this.props.nodeRef).transformer.id;},t.prototype.getHeader=function(){return this.props.hideHeader?\"none\":this.props.action.definition.display;},t.prototype.canApply=function(){return!this.state.error&&!this.state.busy;},t.prototype.canAutoApply=function(){return!1;},t.prototype.applyText=function(){return\"Apply\";},t.prototype.isUpdate=function(){return!1;},t.prototype.getSourceAndTarget=function(){return{a:this.props.state.cells.get(this.props.nodeRef).obj};},t.getDerivedStateFromProps=function(e,t){var r=e.state.transforms.get(e.nodeRef).version;if(e.nodeRef===t.ref&&r===t.version)return null;var n=e.state.cells.get(e.nodeRef).obj,i=e.action.definition.params?s.ParamDefinition.getDefaultValues(e.action.definition.params(n,t.plugin)):{};return{plugin:t.plugin,ref:e.nodeRef,version:r,params:i,isInitial:!0,error:void 0};},t;}(o.b);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(44),i=r(69);function a(e,t){return new n.a(function(r){var n=new i.a(),a=0;return n.add(t.schedule(function(){a!==e.length?(r.next(e[a++]),r.closed||n.add(this.schedule())):r.complete();})),n;});}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return d;});var n=r(21),i=1,a=function(){return Promise.resolve();}(),o={};function s(e){return e in o&&(delete o[e],!0);}var u=function u(e){var t=i++;return o[t]=!0,a.then(function(){return s(t)&&e();}),t;},c=function c(e){s(e);},l=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n;}return n.a(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=u(t.flush.bind(t,null))));},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(c(r),t.scheduled=void 0);},t;}(r(229).a),d=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.a(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,i=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break;}while(++n<i&&(e=r.shift()));if(this.active=!1,t){for(;++n<i&&(e=r.shift());)e.unsubscribe();throw t;}},t;}(r(225).a))(l);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(175),i=r(248),a={closed:!0,next:function next(e){},error:function error(e){if(n.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e);},complete:function complete(){}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});var n=\"1.1.1\",i=new Date(1615968309540);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(36),i=r(2);function a(e,t,r){void 0===r&&(r={});var i=r;return\"string\"==typeof i.type||\"string\"==typeof i.color||\"string\"==typeof i.size?function(e,t,r){var n=r.type&&e.representation.volume.registry.get(r.type)||e.representation.volume.registry.default.provider,i=r.color&&e.representation.volume.themes.colorThemeRegistry.get(r.color)||e.representation.volume.themes.colorThemeRegistry.get(n.defaultColorTheme.name),a=r.size&&e.representation.volume.themes.sizeThemeRegistry.get(r.size)||e.representation.volume.themes.sizeThemeRegistry.get(n.defaultSizeTheme.name);return o(e,t,{type:n,typeParams:r.typeParams,color:i,colorParams:r.colorParams,size:a,sizeParams:r.sizeParams});}(e,t||n.b.One,r):o(e,t||n.b.One,r);}function o(e,t,r){void 0===r&&(r={});var n=e.representation.volume.themes,a={volume:t},o=r.type||e.representation.volume.registry.default.provider,s=i.ParamDefinition.getDefaultValues(o.getParams(n,t)),u=Object.assign(s,r.typeParams),c=r.color||n.colorThemeRegistry.get(o.defaultColorTheme.name),l=i.ParamDefinition.getDefaultValues(c.getParams(a));c.name===o.defaultColorTheme.name&&Object.assign(l,o.defaultColorTheme.props);var d=Object.assign(l,r.colorParams),f=r.size||n.sizeThemeRegistry.get(o.defaultSizeTheme.name),p=i.ParamDefinition.getDefaultValues(f.getParams(a));f.name===o.defaultSizeTheme.name&&Object.assign(p,o.defaultSizeTheme.props);var m=Object.assign(p,r.sizeParams);return{type:{name:o.name,params:u},colorTheme:{name:c.name,params:d},sizeTheme:{name:f.name,params:m}};}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"CoordinatesFromDcd\",function(){return Dt;}),r.d(t,\"CoordinatesFromXtc\",function(){return It;}),r.d(t,\"TopologyFromPsf\",function(){return Mt;}),r.d(t,\"TrajectoryFromModelAndCoordinates\",function(){return Bt;}),r.d(t,\"TrajectoryFromBlob\",function(){return Vt;}),r.d(t,\"TrajectoryFromMmCif\",function(){return Rt;}),r.d(t,\"TrajectoryFromPDB\",function(){return Lt;}),r.d(t,\"TrajectoryFromGRO\",function(){return Nt;}),r.d(t,\"TrajectoryFromMOL\",function(){return Ft;}),r.d(t,\"TrajectoryFromMOL2\",function(){return Ut;}),r.d(t,\"TrajectoryFromCube\",function(){return zt;}),r.d(t,\"TrajectoryFromCifCore\",function(){return Ht;}),r.d(t,\"TrajectoryFrom3DG\",function(){return Gt;}),r.d(t,\"ModelFromTrajectory\",function(){return Qt;}),r.d(t,\"StructureFromTrajectory\",function(){return Yt;}),r.d(t,\"StructureFromModel\",function(){return Xt;}),r.d(t,\"TransformStructureConformation\",function(){return $t;}),r.d(t,\"StructureSelectionFromExpression\",function(){return er;}),r.d(t,\"MultiStructureSelectionFromExpression\",function(){return tr;}),r.d(t,\"StructureSelectionFromScript\",function(){return rr;}),r.d(t,\"StructureSelectionFromBundle\",function(){return nr;}),r.d(t,\"StructureComplexElement\",function(){return or;}),r.d(t,\"StructureComponent\",function(){return sr;}),r.d(t,\"CustomModelProperties\",function(){return ur;}),r.d(t,\"CustomStructureProperties\",function(){return lr;}),r.d(t,\"ShapeFromPly\",function(){return fr;}),r.d(t,\"StructureComplexElementTypes\",function(){return ir;});var n=r(0),i=r(65),a=r(16),o=r(20);function s(e,t,r){return{rowCount:e,columnNames:Object(n.__spreadArrays)(t),getColumn:function getColumn(e){return r[e];}};}var u=r(128).c.ofTokens;function c(e,t){for(;e.position<e.length;){var r=e.data.charCodeAt(e.position);if(9!==r&&32!==r&&r!==t)return 10===r||13===r;++e.position;}}function l(e){var t=e.tokenizer;if(function(e){for(var t=-1;e.position<e.length;){var r=e.data.charCodeAt(e.position);switch(r){case 9:case 32:t=r,++e.position;break;case 10:13!==t&&++e.lineNumber,t=r,++e.position;break;case 13:t=r,++e.position,++e.lineNumber;break;default:return;}}}(t),t.position>=t.length)return e.tokenType=2,!1;switch(t.tokenStart=t.position,t.tokenEnd=t.position,e.data.charCodeAt(t.position)){case e.commentCharCode:e.tokenType=1,function(e){for(;e.position<e.length;){var t=e.data.charCodeAt(e.position);if(10===t||13===t)return;++e.position;}}(t);break;case e.quoteCharCode:return e.tokenType=0,function(e,t,r){for(++e.position;e.position<e.length;){if(e.data.charCodeAt(e.position)===t)if(e.data.charCodeAt(e.position+1)!==t)return e.tokenStart++,e.tokenEnd=e.position,++e.position,c(e,r);++e.position;}e.tokenEnd=e.position;}(t,e.quoteCharCode,e.delimiterCharCode);default:return e.tokenType=0,function(e,t){for(;e.position<e.length;){var r=e.data.charCodeAt(e.position);switch(++e.position,r){case 10:case 13:return!0;case t:return;case 9:case 32:break;default:++e.tokenEnd;}}}(t,e.delimiterCharCode);}}function d(e){for(var t=l(e);1===e.tokenType;)t=l(e);return t;}function f(e,t){if(2===t.tokenType)return 0;for(var r=0,n=t.tokens,i=t.tokenizer;0===t.tokenType&&r<e;)o.a.add(n[t.fieldCount%t.columnCount],i.tokenStart,i.tokenEnd),++t.fieldCount,d(t)&&(++t.recordCount,++r);return r;}function p(e){return d(e)&&++e.recordCount,Object(a.c)(e.runtimeCtx,1e5,e,f,function(e,t){return e.update({message:\"Parsing...\",current:t.tokenizer.position,max:t.data.length});});}function m(e){e.columnNames.push(o.b.getTokenString(e.tokenizer)),e.tokens.push(o.a.create(e.tokenizer.data,e.data.length/80));}function h(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return function(e){for(var t=d(e);!t;)m(e),t=d(e);m(e),e.columnCount=e.columnNames.length,e.noColumnNamesRecord&&(e.columnNames.forEach(function(e,t,r){return r[t]=t+\"\";}),o.b.reset(e.tokenizer));}(e),[4,p(e)];case 1:for(n.sent(),t=Object.create(null),r=0;r<e.columnCount;++r)t[e.columnNames[r]]=u(e.tokens[r]);return[2,s(e.recordCount,e.columnNames,t)];}});});}function g(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=function(e,t,r){return{data:e,tokenizer:Object(o.b)(e),tokenType:2,runtimeCtx:t,tokens:[],fieldCount:0,recordCount:0,columnCount:0,columnNames:[],quoteCharCode:r.quote.charCodeAt(0),commentCharCode:r.comment.charCodeAt(0),delimiterCharCode:r.delimiter.charCodeAt(0),noColumnNamesRecord:r.noColumnNames};}(e,t,r),t.update({message:\"Parsing...\",current:0,max:e.length}),[4,h(a)];case 1:return s=n.sent(),u=function(e){return{table:e};}(s),[2,i.a.success(u)];}});});}function v(e,t){var r=this,i=Object.assign({},{quote:'\"',comment:\"#\",delimiter:\",\",noColumnNames:!1},t);return a.b.create(\"Parse CSV\",function(t){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,g(e,t,i)];case 1:return[2,r.sent()];}});});});}var b=r(7),y=r(148),_=b.a.Schema,S={chromosome:_.str,position:_.int,x:_.float,y:_.float,z:_.float},O=[\"chromosome\",\"position\",\"x\",\"y\",\"z\"];function x(e){var t=this;return a.b.create(\"Parse 3DG\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,a,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,v(e,{quote:\"\",comment:\"#\",delimiter:\"\\t\",noColumnNames:!0}).runInContext(r)];case 1:return(t=n.sent()).isError?[2,i.a.error(t.message,t.line)]:(a=function(e,t){return{name:e,rowCount:t.rowCount,fieldNames:O,getField:function getField(e){return t.getColumn(O.indexOf(e).toString());}};}(\"3dg\",t.result.table),o=Object(y.c)(S,a),[2,i.a.success({table:o})]);}});});});}var C,w=r(1);function P(){return P.empty();}(C=P||(P={})).create=function(e,t){return{size:e,anglesInRadians:t};},C.empty=function(){return{size:Object(w.Vec3)(),anglesInRadians:Object(w.Vec3)()};};var j=r(323);function E(e){var t=this;return a.b.create(\"Parse DCD\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(r){try{return t=function(e){var t=new DataView(e.buffer),r=Object.create(null),n=[],i=0,a=new Int32Array(e.buffer,0,23),o=a[0]!==t.getInt32(0);if(84!==a[0])for(var s=e.byteLength,u=0;u<s;u+=4)t.setFloat32(u,t.getFloat32(u),!0);if(84!==a[0])throw new Error(\"dcd bad format, header block start\");if(\"CORD\"!==String.fromCharCode(t.getUint8(4),t.getUint8(5),t.getUint8(6),t.getUint8(7)))throw new Error(\"dcd bad format, format string\");var c=!1,l=!1,d=!1;if(0!==a[22]&&(c=!0,0!==a[12]&&(l=!0),1===a[13]&&(d=!0)),r.NSET=a[2],r.ISTART=a[3],r.NSAVC=a[4],r.NAMNF=a[10],r.DELTA=c?t.getFloat32(44,o):t.getFloat64(44,o),84!==a[22])throw new Error(\"dcd bad format, header block end\");i=i+84+8;var f=t.getInt32(i,o),p=i+1;if((f-4)%80!=0)throw new Error(\"dcd bad format, title block start\");if(r.TITLE=Object(j.c)(e.subarray(p,f)),t.getInt32(p+f+4-1,o)!==f)throw new Error(\"dcd bad format, title block end\");if(i=i+f+8,4!==t.getInt32(i,o))throw new Error(\"dcd bad format, natom block start\");if(r.NATOM=t.getInt32(i+4,o),4!==t.getInt32(i+8,o))throw new Error(\"dcd bad format, natom block end\");if(i=i+4+8,r.NAMNF>0)throw new Error(\"dcd format with fixed atoms unsupported, aborting\");var m=r.NATOM,h=4*m;for(u=0,s=r.NSET;u<s;++u){var g=Object.create(null);if(g.elementCount=m,l){i+=4;var v=w.Vec3.create(t.getFloat64(i,o),t.getFloat64(i+16,o),t.getFloat64(i+40,o)),b=w.Vec3.create(t.getFloat64(i+1,o),t.getFloat64(i+24,o),t.getFloat64(i+32,o));g.cell=P.create(v,b),i+=48,i+=4;}for(var y=0;y<3;++y){if(t.getInt32(i,o)!==h)throw new Error(\"dcd bad format, coord block start: \"+u+\", \"+y);i+=4;var _=new Float32Array(e.buffer,i,m);if(0===y?g.x=_:1===y?g.y=_:g.z=_,i+=h,t.getInt32(i,o)!==h)throw new Error(\"dcd bad format, coord block end: \"+u+\", \"+y);i+=4;}if(d)i+=4+t.getInt32(i,o)+4;n.push(g);}return{header:r,frames:n};}(e),[2,i.a.success(t)];}catch(e){return[2,i.a.error(e)];}return[2];});});});}var A=r(97);function T(e){return function(t,r,n){return function(e,t,r,n){var i=e.data,a=e.indices,s=e.count,u=n.valueType,c=\"str\"===u?function(e){var n=a[2*e]+t,s=a[2*e+1];if(n>=s)return\"\";var u=n+r;return u>s&&(u=s),Object(o.c)(i,n,u);}:\"int\"===u?function(e){var n=a[2*e]+t;return n>a[2*e+1]?0:Object(A.e)(i,n,n+r);}:function(e){var n=a[2*e]+t;return n>a[2*e+1]?0:Object(A.c)(i,n,n+r);};return{schema:n,__array:void 0,isDefined:!0,rowCount:s,value:c,valueKind:function valueKind(e){return 0;},toArray:function toArray(e){return b.b.createAndFillArray(s,c,e);},areValuesEqual:function areValuesEqual(e,t){return c(e)===c(t);}};}(e,t,r,n);};}function D(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,s,u,c,l,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return t=e.tokenizer,r=e.numberOfAtoms,[4,o.b.readLinesAsync(t,r,e.runtimeCtx,1e5)];case 1:return i=n.sent(),a=t.data.substring(i.indices[0],i.indices[1]).substring(20),s=a.match(/\\.\\d+/g),u=6===s.length,e.header.hasVelocities=u,e.header.precision.position=s[0].length-1,e.header.precision.velocity=u?s[3].length-1:0,20,c=e.header.precision.position+5,l=20+3*c,d=e.header.precision.velocity+4,f=T(i),p=b.a.Undefined(e.numberOfAtoms,b.a.Schema.float),[2,{count:e.numberOfAtoms,residueNumber:f(0,5,b.a.Schema.int),residueName:f(5,5,b.a.Schema.str),atomName:f(10,5,b.a.Schema.str),atomNumber:f(15,5,b.a.Schema.int),x:f(20,c,b.a.Schema.float),y:f(20+c,c,b.a.Schema.float),z:f(20+2*c,c,b.a.Schema.float),vx:u?f(l,d,b.a.Schema.float):p,vy:u?f(l+d,d,b.a.Schema.float):p,vz:u?f(l+2*d,d,b.a.Schema.float):p}];}});});}function I(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,a,s,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=Object(o.b)(e),[4,t.update({message:\"Parsing...\",current:0,max:e.length})];case 1:n.sent(),a=[],n.label=2;case 2:return r.position<e.length?(function(e){var t=e.tokenizer,r=e.header,n=o.b.readLine(t);0===n.trim().length&&(n=o.b.readLine(t));var i=n.lastIndexOf(\"t=\");i>=0?(r.timeInPs=parseFloat(n.substring(i+2)),r.title=n.substring(0,i).trim(),r.title&&\",\"===r.title[r.title.length-1]&&(r.title=r.title.substring(0,r.title.length-1))):r.title=n;}(s=function(e,t){return{tokenizer:e,header:{title:\"\",timeInPs:0,hasVelocities:!1,precision:{position:0,velocity:0},box:[0,0,0]},numberOfAtoms:0,runtimeCtx:t};}(r,t)),function(e){var t=e.tokenizer;o.b.markLine(t);var r=o.b.getTokenString(t);e.numberOfAtoms=parseInt(r);}(s),[4,D(s)]):[3,4];case 3:return u=n.sent(),function(e){var t=e.tokenizer,r=o.b.readLine(t).trim().split(/\\s+/g);e.header.box=[+r[0],+r[1],+r[2]];}(s),a.push({header:s.header,atoms:u}),[3,2];case 4:return c={structures:a},[2,i.a.success(c)];}});});}function M(e){var t=this;return a.b.create(\"Parse GRO\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,I(e,r)];case 1:return[2,t.sent()];}});});});}function k(e,t){var r=this;return a.b.create(\"Parse PDB\",function(a){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return s=(r=i.a).success,u={id:t},[4,o.b.readAllLinesAsync(e,a)];case 1:return[2,s.apply(r,[(u.lines=n.sent(),u)])];}});});});}var B=r(24),V=r(34),R=r(39),L=r(49),N=r(9),F=r(30),U=r(2),z=r(47),H=r(85),G=r(41);function q(e){var t=e&&e.getElement(\"vertex\"),r=e&&e.getElement(\"material\"),i={group:\"\",vRed:\"\",vGreen:\"\",vBlue:\"\",mRed:\"\",mGreen:\"\",mBlue:\"\"},a=[[\"\",\"\"]],o=[[\"\",\"\"]];if(t){for(var s=0,u=t.propertyNames.length;s<u;++s){var c=t.propertyNames[s];\"uchar\"!==(d=t.propertyTypes[s])&&\"uint8\"!==d&&\"ushort\"!==d&&\"uint16\"!==d&&\"uint\"!==d&&\"uint32\"!==d&&\"int\"!==d||a.push([c,c]),\"uchar\"!==d&&\"uint8\"!==d||o.push([c,c]);}t.propertyNames.includes(\"atomid\")?i.group=\"atomid\":t.propertyNames.includes(\"material_index\")&&(i.group=\"material_index\"),t.propertyNames.includes(\"red\")&&(i.vRed=\"red\"),t.propertyNames.includes(\"green\")&&(i.vGreen=\"green\"),t.propertyNames.includes(\"blue\")&&(i.vBlue=\"blue\");}var l=[[\"\",\"\"]];if(r){for(s=0,u=r.propertyNames.length;s<u;++s){var d,f=r.propertyNames[s];\"uchar\"!==(d=r.propertyTypes[s])&&\"uint8\"!==d||l.push([f,f]);}r.propertyNames.includes(\"red\")&&(i.mRed=\"red\"),r.propertyNames.includes(\"green\")&&(i.mGreen=\"green\"),r.propertyNames.includes(\"blue\")&&(i.mBlue=\"blue\");}var p=i.vRed&&i.vGreen&&i.vBlue?\"vertex\":i.mRed&&i.mGreen&&i.mBlue?\"material\":\"uniform\";return Object(n.__assign)(Object(n.__assign)({},R.a.Params),{coloring:U.ParamDefinition.MappedStatic(p,{vertex:U.ParamDefinition.Group({red:U.ParamDefinition.Select(i.vRed,o,{label:\"Red Property\"}),green:U.ParamDefinition.Select(i.vGreen,o,{label:\"Green Property\"}),blue:U.ParamDefinition.Select(i.vBlue,o,{label:\"Blue Property\"})},{isFlat:!0}),material:U.ParamDefinition.Group({red:U.ParamDefinition.Select(i.mRed,l,{label:\"Red Property\"}),green:U.ParamDefinition.Select(i.mGreen,l,{label:\"Green Property\"}),blue:U.ParamDefinition.Select(i.mBlue,l,{label:\"Blue Property\"})},{isFlat:!0}),uniform:U.ParamDefinition.Group({color:U.ParamDefinition.Color(z.a.grey)},{isFlat:!0})}),grouping:U.ParamDefinition.MappedStatic(i.group?\"vertex\":\"none\",{vertex:U.ParamDefinition.Group({group:U.ParamDefinition.Select(i.group,a,{label:\"Group Property\"})},{isFlat:!0}),none:U.ParamDefinition.Group({})})});}var W=q();function Q(e,t,r,i,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var o,s,u,c,l,d,f,p,m,h,g,v;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(o=V.a.createState(t.rowCount,t.rowCount/4,a),s=t.getProperty(\"x\"),u=t.getProperty(\"y\"),c=t.getProperty(\"z\"),!s||!u||!c)throw new Error(\"missing coordinate properties\");l=t.getProperty(\"nx\"),d=t.getProperty(\"ny\"),f=t.getProperty(\"nz\"),p=!!l&&!!d&&!!f,m=1e5,h=0,g=t.rowCount,n.label=1;case 1:return h<g?(function(e,t,r,n,i){var a=r.vertices,o=r.normals,s=r.groups,u=n.getProperty(\"x\"),c=n.getProperty(\"y\"),l=n.getProperty(\"z\");if(!u||!c||!l)throw new Error(\"missing coordinate properties\");for(var d=n.getProperty(\"nx\"),f=n.getProperty(\"ny\"),p=n.getProperty(\"nz\"),m=!!d&&!!f&&!!p,h=e;h<t;++h)N.a.add3(a,u.value(h),c.value(h),l.value(h)),m&&N.a.add3(o,d.value(h),f.value(h),p.value(h)),N.a.add(s,i[h]);}(h,Math.min(h+m,g),o,t,i),e.shouldUpdate?[4,e.update({message:\"adding ply mesh vertices\",current:h,max:g})]:[3,3]):[3,4];case 2:n.sent(),n.label=3;case 3:return h+=m,[3,1];case 4:h=0,g=r.rowCount,n.label=5;case 5:return h<g?(function(e,t,r,n){for(var i=r.indices,a=e;a<t;++a){var o=n.value(a),s=o.entries,u=o.count;3===u?N.a.add3(i,s[0],s[1],s[2]):4===u&&(N.a.add3(i,s[2],s[1],s[0]),N.a.add3(i,s[2],s[0],s[3]));}}(h,Math.min(h+m,g),o,r),e.shouldUpdate?[4,e.update({message:\"adding ply mesh faces\",current:h,max:g})]:[3,7]):[3,8];case 6:n.sent(),n.label=7;case 7:return h+=m,[3,5];case 8:return v=V.a.getMesh(o),p||R.a.computeNormals(v),[2,v];}});});}var Y=b.a.Schema.int;function X(e,t,r){var n,i,a,o=r.coloring,s=e.rowCount;if(\"vertex\"===o.name)n=e.getProperty(o.params.red)||b.a.ofConst(127,s,Y),i=e.getProperty(o.params.green)||b.a.ofConst(127,s,Y),a=e.getProperty(o.params.blue)||b.a.ofConst(127,s,Y);else if(\"material\"===o.name)n=t&&t.getProperty(o.params.red)||b.a.ofConst(127,s,Y),i=t&&t.getProperty(o.params.green)||b.a.ofConst(127,s,Y),a=t&&t.getProperty(o.params.blue)||b.a.ofConst(127,s,Y);else{var u=B.Color.toRgb(o.params.color),c=u[0],l=u[1],d=u[2];n=b.a.ofConst(c,s,Y),i=b.a.ofConst(l,s,Y),a=b.a.ofConst(d,s,Y);}return{kind:o.name,red:n,green:i,blue:a};}function K(e,t,r,n){var i=r.kind,a=r.red,o=r.green,s=r.blue,u=n.ids,c=n.map,l=n.label;return L.a.create(\"ply-mesh\",e,t,function(e){var t=\"material\"===i?e:c[e];return B.Color.fromRgb(a.value(t),o.value(t),s.value(t));},function(){return 1;},function(e){return l+\" \"+u[e];});}function Z(){var e,t,r,i,a,o,s=this;return function(u,c,l,d){return Object(n.__awaiter)(s,void 0,void 0,function(){var s,f,p,m,h;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(!(s=c.getElement(\"vertex\")))throw new Error(\"missing vertex element\");if(!(f=c.getElement(\"face\")))throw new Error(\"missing face element\");return p=c.getElement(\"material\"),m=!1,h=!1,e&&e===c||(m=!0),t&&U.ParamDefinition.isParamEqual(W.grouping,t.grouping,l.grouping)||(m=!0),t&&U.ParamDefinition.isParamEqual(W.coloring,t.coloring,l.coloring)||(h=!0),m?(a=X(s,p,l),o=function(e,t){for(var r=t.grouping,n=e.rowCount,i=\"vertex\"===r.name?e.getProperty(r.params.group):void 0,a=\"vertex\"===r.name?Object(G.d)(r.params.group):\"Vertex\",o=i?i.toArray({array:Uint32Array}):Object(F.fillSerial)(new Uint32Array(n)),s=i?Object(F.arrayMax)(o):n-1,u=new Uint32Array(s+1),c=0,l=o.length;c<l;++c)u[o[c]]=c;return{ids:o,map:u,label:a};}(s,l),[4,Q(u,s,f,o.ids,d&&d.geometry)]):[3,2];case 1:return i=n.sent(),r=K(c,i,a,o),[3,3];case 2:h&&(a=X(s,p,l),r=K(c,i,a,o)),n.label=3;case 3:return e=c,t=Object(H.b)(l),[2,r];}});});};}function J(e,t){var r=this;return a.b.create(\"Shape Provider\",function(t){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(t){return[2,{label:\"Mesh\",data:e,params:q(e),getShape:Z(),geometryUtils:R.a.Utils}];});});});}var $,ee=r(22),te=r(93),re=function(){function e(){this.count=0,this.ids=[],this.types=[],this.descriptions=[],this.compoundsMap=new Map(),this.namesMap=new Map(),this.heteroMap=new Map(),this.chainMap=new Map();}return e.prototype.set=function(e,t){this.count+=1,this.ids.push(\"\"+this.count),this.types.push(e),this.descriptions.push([t]);},e.prototype.getEntityId=function(e,t,r){return 2===t?(void 0===this.waterId&&(this.set(\"water\",\"Water\"),this.waterId=\"\"+this.count),this.waterId):Object(ee.isPolymer)(t)?this.compoundsMap.has(r)?this.compoundsMap.get(r):(this.chainMap.has(r)||(this.set(\"polymer\",\"Polymer \"+(this.chainMap.size+1)),this.chainMap.set(r,\"\"+this.count)),this.chainMap.get(r)):(this.heteroMap.has(e)||(this.set(\"non-polymer\",this.namesMap.get(e)||e),this.heteroMap.set(e,\"\"+this.count)),this.heteroMap.get(e));},e.prototype.getEntityTable=function(){return b.d.ofPartialColumns(te.a.entity,{id:b.a.ofStringArray(this.ids),type:b.a.ofStringAliasArray(this.types),pdbx_description:b.a.ofStringListArray(this.descriptions)},this.count);},e.prototype.setCompounds=function(e){for(var t=0,r=e.length;t<r;++t){var n=e[t],i=n.chains,a=n.description;this.set(\"polymer\",a);for(var o=0,s=i.length;o<s;++o)this.compoundsMap.set(i[o],\"\"+this.count);}},e.prototype.setNames=function(e){var t=this;e.forEach(function(e){return t.namesMap.set(e[0],e[1]);});},e;}(),ne=r(154);function ie(e){var t=this;return a.b.create(\"Parse 3DG\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){return t=$.from3dg(e),i=function(e){for(var t=new Array(e._rowCount),r=new re(),n=e.position.toArray({array:Uint32Array}),i=new Uint32Array(e._rowCount),a=n[1]-n[0],o=a/3500,s=0,u=e._rowCount;s<u;++s){var c=e.chromosome.value(s),l=r.getEntityId(c,7,c);t[s]=l,i[s]=n[s]+a-1;}var d=b.d.ofPartialColumns(te.a.ihm_sphere_obj_site,{id:b.a.ofIntArray(Object(F.fillSerial)(new Uint32Array(e._rowCount))),entity_id:b.a.ofStringArray(t),seq_id_begin:b.a.ofIntArray(n),seq_id_end:b.a.ofIntArray(i),asym_id:e.chromosome,Cartn_x:b.a.ofFloatArray(b.a.mapToArray(e.x,function(e){return 10*e;},Float32Array)),Cartn_y:b.a.ofFloatArray(b.a.mapToArray(e.y,function(e){return 10*e;},Float32Array)),Cartn_z:b.a.ofFloatArray(b.a.mapToArray(e.z,function(e){return 10*e;},Float32Array)),object_radius:b.a.ofConst(o,e._rowCount,b.a.Schema.float),rmsf:b.a.ofConst(0,e._rowCount,b.a.Schema.float),model_id:b.a.ofConst(1,e._rowCount,b.a.Schema.int)},e._rowCount);return Object(te.b)({entity:r.getEntityTable(),ihm_model_list:b.d.ofPartialColumns(te.a.ihm_model_list,{model_id:b.a.ofIntArray([1]),model_name:b.a.ofStringArray([\"3DG Model\"])},1),ihm_sphere_obj_site:d});}(e.table),[2,Object(ne.a)(i,t,r)];});});});}!function(e){e.is=function(e){return\"3dg\"===e.kind;},e.from3dg=function(e){return{kind:\"3dg\",name:\"3DG\",data:e};};}($||($={}));var ae=r(165);function oe(e){var t=this;return a.b.create(\"Parse DCD\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a,o,s,u;return Object(n.__generator)(this,function(c){switch(c.label){case 0:return[4,r.update(\"Converting to coordinates\")];case 1:for(c.sent(),t=e.header,i=Object(ae.b)(1,\"step\"),t.DELTA&&(i=Object(ae.b)(20.45482949774598*t.DELTA,\"ps\")),a=Object(ae.b)(0,i.unit),t.ISTART>=1&&(a=Object(ae.b)((t.ISTART-1)*i.value,i.unit)),o=[],s=0,u=e.frames.length;s<u;++s)o.push(Object(n.__assign)(Object(n.__assign)({},e.frames[s]),{time:Object(ae.b)(a.value+i.value*s,i.unit)}));return[2,ae.a.create(o,i,a)];}});});});}function se(e,t,r,n){for(var i=r,a=n-1,s=t.charCodeAt(i);(32===s||s>=48&&s<=57)&&i<=a;)s=t.charCodeAt(++i);for(s=t.charCodeAt(a);(32===s||s>=48&&s<=57)&&a>=i;)s=t.charCodeAt(--a);if(i===++a)return o.a.add(e,i,a);if(i+1===a)return o.a.add(e,i,a);if(s=t.charCodeAt(i),i+2===a){var u=t.charCodeAt(i+1);if(!((78!==s&&110!==s||65!==u&&97!==u)&&(67!==s&&99!==s||76!==u&&108!==u)&&(70!==s&&102!==s||69!==u&&101!==u)&&(83!==s&&115!==s||73!==u&&105!==u)))return o.a.add(e,i,i+2);}if(67===s||99===s||72===s||104===s||78===s||110===s||79===s||111===s||80===s||112===s||83===s||115===s)return o.a.add(e,i,i+1);o.a.add(e,i,i);}var ue=/^[\\s\\d]+|[\\s\\d]+$/g;function ce(e){var t=(e=e.replace(ue,\"\").toUpperCase()).length;if(0===t)return e;if(1===t)return e;if(2===t&&(\"NA\"===e||\"CL\"===e||\"FE\"===e||\"SI\"===e))return e;var r=e[0];return\"C\"===r||\"H\"===r||\"N\"===r||\"O\"===r||\"P\"===r||\"S\"===r?r:\"\";}var le,de=r(90),fe=[new Set([\"CA\"]),new Set([\"C\"]),new Set([\"N\"])],pe=[new Set([\"P\",\"O3'\",\"O3*\"]),new Set([\"C4'\",\"C4*\"]),new Set([\"O2'\",\"O2*\",\"F2'\",\"F2*\"])],me=[new Set([\"P\",\"O3'\",\"O3*\"]),new Set([\"C3'\",\"C3*\"]),new Set([\"O2'\",\"O2*\",\"F2'\",\"F2*\"])],he=(le=new Map(),[{id:\"HIS\",name:\"HISTIDINE\",type:\"L-peptide linking\"},{id:\"ARG\",name:\"ARGININE\",type:\"L-peptide linking\"},{id:\"LYS\",name:\"LYSINE\",type:\"L-peptide linking\"},{id:\"ILE\",name:\"ISOLEUCINE\",type:\"L-peptide linking\"},{id:\"PHE\",name:\"PHENYLALANINE\",type:\"L-peptide linking\"},{id:\"LEU\",name:\"LEUCINE\",type:\"L-peptide linking\"},{id:\"TRP\",name:\"TRYPTOPHAN\",type:\"L-peptide linking\"},{id:\"ALA\",name:\"ALANINE\",type:\"L-peptide linking\"},{id:\"MET\",name:\"METHIONINE\",type:\"L-peptide linking\"},{id:\"CYS\",name:\"CYSTEINE\",type:\"L-peptide linking\"},{id:\"ASN\",name:\"ASPARAGINE\",type:\"L-peptide linking\"},{id:\"VAL\",name:\"VALINE\",type:\"L-peptide linking\"},{id:\"GLY\",name:\"GLYCINE\",type:\"peptide linking\"},{id:\"SER\",name:\"SERINE\",type:\"L-peptide linking\"},{id:\"GLN\",name:\"GLUTAMINE\",type:\"L-peptide linking\"},{id:\"TYR\",name:\"TYROSINE\",type:\"L-peptide linking\"},{id:\"ASP\",name:\"ASPARTIC ACID\",type:\"L-peptide linking\"},{id:\"GLU\",name:\"GLUTAMIC ACID\",type:\"L-peptide linking\"},{id:\"THR\",name:\"THREONINE\",type:\"L-peptide linking\"},{id:\"SEC\",name:\"SELENOCYSTEINE\",type:\"L-peptide linking\"},{id:\"PYL\",name:\"PYRROLYSINE\",type:\"L-peptide linking\"},{id:\"A\",name:\"ADENOSINE-5'-MONOPHOSPHATE\",type:\"RNA linking\"},{id:\"C\",name:\"CYTIDINE-5'-MONOPHOSPHATE\",type:\"RNA linking\"},{id:\"T\",name:\"THYMIDINE-5'-MONOPHOSPHATE\",type:\"RNA linking\"},{id:\"G\",name:\"GUANOSINE-5'-MONOPHOSPHATE\",type:\"RNA linking\"},{id:\"I\",name:\"INOSINIC ACID\",type:\"RNA linking\"},{id:\"U\",name:\"URIDINE-5'-MONOPHOSPHATE\",type:\"RNA linking\"},{id:\"DA\",name:\"2'-DEOXYADENOSINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"},{id:\"DC\",name:\"2'-DEOXYCYTIDINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"},{id:\"DT\",name:\"THYMIDINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"},{id:\"DG\",name:\"2'-DEOXYGUANOSINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"},{id:\"DI\",name:\"2'-DEOXYINOSINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"},{id:\"DU\",name:\"2'-DEOXYURIDINE-5'-MONOPHOSPHATE\",type:\"DNA linking\"}].forEach(function(e){return le.set(e.id,e);}),le),ge=function(){var e=new Map();return[{id:\"ZN2\",name:\"ZINC ION\",type:\"Ion\"},{id:\"SOD\",name:\"SODIUM ION\",type:\"Ion\"},{id:\"CES\",name:\"CESIUM ION\",type:\"Ion\"},{id:\"CLA\",name:\"CHLORIDE ION\",type:\"Ion\"},{id:\"CAL\",name:\"CALCIUM ION\",type:\"Ion\"},{id:\"POT\",name:\"POTASSIUM ION\",type:\"Ion\"}].forEach(function(t){return e.set(t.id,t);}),e;}(),ve=function(){function e(e,t){this.seqId=e,this.atomId=t,this.namesMap=new Map(),this.comps=new Map(),this.ids=[],this.names=[],this.types=[],this.mon_nstd_flags=[];}return e.prototype.set=function(e){this.comps.set(e.id,e),this.ids.push(e.id),this.names.push(e.name),this.types.push(e.type),this.mon_nstd_flags.push(ee.PolymerNames.has(e.id)?\"y\":\"n\");},e.prototype.getAtomIds=function(e){for(var t=new Set(),r=this.seqId.value(e);e<this.seqId.rowCount;){var n=this.seqId.value(e);if(n!==r)break;t.add(this.atomId.value(e)),e+=1;}return t;},e.prototype.hasAtomIds=function(e,t){for(var r=0,n=t.length;r<n;++r)if(!de.a.areIntersecting(e,t[r]))return!1;return!0;},e.prototype.getType=function(e){return this.hasAtomIds(e,fe)?\"peptide linking\":this.hasAtomIds(e,pe)?\"RNA linking\":this.hasAtomIds(e,me)?\"DNA linking\":\"other\";},e.prototype.has=function(e){return this.comps.has(e);},e.prototype.get=function(e){return this.comps.get(e);},e.prototype.add=function(e,t){if(!this.has(e))if(he.has(e))this.set(he.get(e));else if(ee.WaterNames.has(e))this.set({id:e,name:\"WATER\",type:\"non-polymer\"});else{var r=this.getAtomIds(t);if(ge.has(e)&&1===r.size)this.set(ge.get(e));else{var n=this.getType(r);this.set({id:e,name:this.namesMap.get(e)||e,type:n});}}return this.get(e);},e.prototype.getChemCompTable=function(){return b.d.ofPartialColumns(te.a.chem_comp,{id:b.a.ofStringArray(this.ids),name:b.a.ofStringArray(this.names),type:b.a.ofStringAliasArray(this.types),mon_nstd_flag:b.a.ofStringAliasArray(this.mon_nstd_flags)},this.ids.length);},e.prototype.setNames=function(e){var t=this;e.forEach(function(e){return t.namesMap.set(e[0],e[1]);});},e;}(),be=r(155);var ye,_e=Object(be.a)(function(e){for(var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".length,r=e,n=0,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[r%t];r>=t;)i+=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[(r=Math.floor(r/t))%t],n+=1;return n>=5&&console.warn(\"getChainId overflow\"),i;});function Se(e){var t=this;return a.b.create(\"Parse GRO\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a,o,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:t=ye.fromGro(e),i=[],a=0,o=e.structures.length,n.label=1;case 1:return a<o?(s=function(e,t){for(var r=e.atomName,n=e.residueName,i=new Array(e.count),a=new Array(e.count),o=new Uint32Array(e.count),s=new Uint32Array(e.count),u=new re(),c=new ve(e.residueNumber,e.atomName),l=\"\",d=0,f=\"\",p=0,m=0,h=-1,g=0,v=e.count;g<v;++g){var y=e.residueNumber.value(g);if(y!==h){var _=e.residueName.value(g),S=Object(ee.getMoleculeType)(c.add(_,g).type,_);S===m&&(y===h+1||99999===h&&0===y)||(f=_e(d),d+=1,p=0),l=u.getEntityId(_,S,f),p+=1,h=y,m=S;}i[g]=l,a[g]=f,o[g]=p,s[g]=g;}var O=b.a.ofStringArray(a),x=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:O,auth_atom_id:r,auth_comp_id:n,auth_seq_id:e.residueNumber,Cartn_x:b.a.ofFloatArray(b.a.mapToArray(e.x,function(e){return 10*e;},Float32Array)),Cartn_y:b.a.ofFloatArray(b.a.mapToArray(e.y,function(e){return 10*e;},Float32Array)),Cartn_z:b.a.ofFloatArray(b.a.mapToArray(e.z,function(e){return 10*e;},Float32Array)),id:b.a.ofIntArray(s),label_asym_id:O,label_atom_id:r,label_comp_id:n,label_seq_id:b.a.ofIntArray(o),label_entity_id:b.a.ofStringArray(i),occupancy:b.a.ofConst(1,e.count,b.a.Schema.float),type_symbol:b.a.ofStringArray(b.a.mapToArray(e.atomName,function(e){return ce(e);})),pdbx_PDB_model_num:b.a.ofConst(t,e.count,b.a.Schema.int)},e.count);return Object(te.b)({entity:u.getEntityTable(),chem_comp:c.getChemCompTable(),atom_site:x});}(e.structures[a].atoms,a+1),[4,Object(ne.a)(s,t,r)]):[3,4];case 2:1===(u=n.sent()).length&&i.push(u[0]),n.label=3;case 3:return++a,[3,1];case 4:return[2,i];}});});});}!function(e){e.is=function(e){return\"gro\"===e.kind;},e.fromGro=function(e){return{kind:\"gro\",name:e.structures[0].header.title,data:e};};}(ye||(ye={}));var Oe=r(72),xe=r(31);function Ce(e,t){var r=function r(e,_r5){return(t.substr(e,_r5)||\"\").trim();},n={entry_id:xe.c.ofString(e),length_a:xe.c.ofString(r(6,9)),length_b:xe.c.ofString(r(15,9)),length_c:xe.c.ofString(r(24,9)),angle_alpha:xe.c.ofString(r(33,7)),angle_beta:xe.c.ofString(r(40,7)),angle_gamma:xe.c.ofString(r(47,7)),Z_PDB:xe.c.ofString(r(66,4)),pdbx_unique_axis:xe.c.ofString(\"?\")},i={entry_id:xe.c.ofString(e),\"space_group_name_H-M\":xe.c.ofString(r(55,11)),Int_Tables_number:xe.c.ofString(\"?\"),cell_setting:xe.c.ofString(\"?\"),space_group_name_Hall:xe.c.ofString(\"?\")};return[xe.b.ofFields(\"cell\",n),xe.b.ofFields(\"symmetry\",i)];}function we(e,t){return{id:e,details:t,groups:[]};}function Pe(e,t,r){for(var n,i,a,o=[],s=1,u=1,c=function c(t){return e.data.substring(e.indices[2*t],e.indices[2*t+1]);},l=t;l<r;l++){var d=c(l);if(\"BIOMOLECULE:\"===d.substr(11,12)){var f=d.substr(23).trim(),p=\"Biomolecule \"+f;\"APPLY THE FOLLOWING TO CHAINS:\"!==(d=c(l+1)).substr(11,30)&&(l++,p=d.substr(11).trim()),n=we(f,p),o.push(n);}else if(\"BIOMT\"===d.substr(13,5)){var m=d.split(/\\s+/);0===(R=parseInt(d[18])-1)&&(a=w.Mat4.identity(),i.operators.push({id:s++,matrix:a})),w.Mat4.setValue(a,R,0,parseFloat(m[4])),w.Mat4.setValue(a,R,1,parseFloat(m[5])),w.Mat4.setValue(a,R,2,parseFloat(m[6])),w.Mat4.setValue(a,R,3,parseFloat(m[7]));}else if(\"APPLY THE FOLLOWING TO CHAINS:\"===d.substr(11,30)||\"                   AND CHAINS:\"===d.substr(11,30)){\"APPLY\"===d.substr(11,5)&&(i={chains:[],operators:[]},n.groups.push(i));for(var h=0,g=(v=d.substr(41,30).split(\",\")).length;h<g;++h){(b=v[h].trim())&&i.chains.push(b);}}else if(\"APPLYING THE FOLLOWING TO CHAINS:\"===d.substr(11,33)){n=we(\"\"+u,\"Biomolecule \"+u),o.push(n),u+=1,i={chains:[],operators:[]},n.groups.push(i);var v;for(h=0,g=(v=(d=c(++l)).substr(11,69).split(\",\")).length;h<g;++h){var b;(b=v[h].trim())&&i.chains.push(b);}}}if(0===o.length)return[];for(var y={id:xe.c.ofStrings(o.map(function(e){return e.id;})),details:xe.c.ofStrings(o.map(function(e){return e.details;}))},_=[],S=0,O=o;S<O.length;S++)for(var x=0,C=(D=O[S]).groups;x<C.length;x++){var P=C[x];_.push({assembly_id:D.id,oper_expression:P.operators.map(function(e){return e.id;}).join(\",\"),asym_id_list:P.chains.join(\",\")});}for(var j={assembly_id:xe.c.ofStrings(_.map(function(e){return e.assembly_id;})),oper_expression:xe.c.ofStrings(_.map(function(e){return e.oper_expression;})),asym_id_list:xe.c.ofStrings(_.map(function(e){return e.asym_id_list;}))},E=[],A=0,T=o;A<T.length;A++)for(var D,I=0,M=(D=T[A]).groups;I<M.length;I++)for(var k=0,B=M[I].operators;k<B.length;k++){var V=B[k],R={id:\"\"+V.id,type:\"?\",name:\"?\",symmetry_operation:\"?\"};for(l=0;l<3;l++){for(h=0;h<3;h++)R[\"matrix[\"+(l+1)+\"][\"+(h+1)+\"]\"]=\"\"+w.Mat4.getValue(V.matrix,l,h);R[\"vector[\"+(l+1)+\"]\"]=\"\"+w.Mat4.getValue(V.matrix,l,3);}E.push(R);}var L={id:xe.c.ofStrings(E.map(function(e){return e.id;})),type:xe.c.ofStrings(E.map(function(e){return e.type;})),name:xe.c.ofStrings(E.map(function(e){return e.name;})),symmetry_operation:xe.c.ofStrings(E.map(function(e){return e.symmetry_operation;}))},N=function N(e){for(var t=function t(_t4){var r=\"matrix[\"+(e+1)+\"][\"+(_t4+1)+\"]\";L[r]=xe.c.ofStrings(E.map(function(e){return e[r];}));},r=0;r<3;r++)t(r);var n=\"vector[\"+(e+1)+\"]\";L[n]=xe.c.ofStrings(E.map(function(e){return e[n];}));};for(l=0;l<3;l++)N(l);return[xe.b.ofFields(\"pdbx_struct_assembly\",y),xe.b.ofFields(\"pdbx_struct_assembly_gen\",j),xe.b.ofFields(\"pdbx_struct_oper_list\",L)];}function je(e,t,r){for(var n,i,a=[],o=t;o<r;o++){var s=(i=o,e.data.substring(e.indices[2*i],e.indices[2*i+1])),u=s.split(/\\s+/);0===(m=parseInt(s[5])-1)&&(n=w.Mat4.identity(),a.push(n)),w.Mat4.setValue(n,m,0,parseFloat(u[2])),w.Mat4.setValue(n,m,1,parseFloat(u[3])),w.Mat4.setValue(n,m,2,parseFloat(u[4])),w.Mat4.setValue(n,m,3,parseFloat(u[5]));}if(0===a.length)return[];for(var c=[],l=1,d=0,f=a;d<f.length;d++){var p=f[d],m={id:\"ncsop\"+l++,code:\".\",details:\".\"};for(o=0;o<3;o++){for(var h=0;h<3;h++)m[\"matrix[\"+(o+1)+\"][\"+(h+1)+\"]\"]=\"\"+w.Mat4.getValue(p,o,h);m[\"vector[\"+(o+1)+\"]\"]=\"\"+w.Mat4.getValue(p,o,3);}c.push(m);}var g={id:xe.c.ofStrings(c.map(function(e){return e.id;})),code:xe.c.ofStrings(c.map(function(e){return e.code;})),details:xe.c.ofStrings(c.map(function(e){return e.details;}))},v=function v(e){for(var t=function t(_t5){var r=\"matrix[\"+(e+1)+\"][\"+(_t5+1)+\"]\";g[r]=xe.c.ofStrings(c.map(function(e){return e[r];}));},r=0;r<3;r++)t(r);var n=\"vector[\"+(e+1)+\"]\";g[n]=xe.c.ofStrings(c.map(function(e){return e[n];}));};for(o=0;o<3;o++)v(o);return[xe.b.ofFields(\"struct_ncs_oper\",g)];}var Ee={1:\"HELX_RH_AL_P\",2:\"HELX_RH_OM_P\",3:\"HELX_RH_PI_P\",4:\"HELX_RH_GA_P\",5:\"HELX_RH_3T_P\",6:\"HELX_LH_AL_P\",7:\"HELX_LH_OM_P\",8:\"HELX_LH_GA_P\",9:\"HELX_RH_27_P\",10:\"HELX_RH_PP_P\"};function Ae(e,t,r){for(var n,i=[],a=t;a<r;a++){var o=(n=a,e.data.substring(e.indices[2*n],e.indices[2*n+1]));i.push({serNum:o.substr(7,3).trim(),helixID:o.substr(11,3).trim(),initResName:o.substr(15,3).trim(),initChainID:o.substr(19,1).trim(),initSeqNum:o.substr(21,4).trim(),initICode:o.substr(25,1).trim(),endResName:o.substr(27,3).trim(),endChainID:o.substr(31,3).trim(),endSeqNum:o.substr(33,4).trim(),endICode:o.substr(37,1).trim(),helixClass:o.substr(38,2).trim(),comment:o.substr(40,30).trim(),length:o.substr(71,5).trim()});}var s=xe.c.ofStrings(i.map(function(e){return e.initChainID;})),u=xe.c.ofStrings(i.map(function(e){return e.initResName;})),c=xe.c.ofStrings(i.map(function(e){return e.initSeqNum;})),l=xe.c.ofStrings(i.map(function(e){return e.endChainID;})),d=xe.c.ofStrings(i.map(function(e){return e.endResName;})),f=xe.c.ofStrings(i.map(function(e){return e.endSeqNum;})),p={beg_label_asym_id:s,beg_label_comp_id:u,beg_label_seq_id:c,beg_auth_asym_id:s,beg_auth_comp_id:u,beg_auth_seq_id:c,conf_type_id:xe.c.ofStrings(i.map(function(e){return t=e.helixClass,Ee[t]||\"HELX_P\";var t;})),details:xe.c.ofStrings(i.map(function(e){return e.comment;})),end_label_asym_id:l,end_label_comp_id:l,end_label_seq_id:f,end_auth_asym_id:l,end_auth_comp_id:d,end_auth_seq_id:f,id:xe.c.ofStrings(i.map(function(e){return e.serNum;})),pdbx_beg_PDB_ins_code:xe.c.ofStrings(i.map(function(e){return e.initICode;})),pdbx_end_PDB_ins_code:xe.c.ofStrings(i.map(function(e){return e.endICode;})),pdbx_PDB_helix_class:xe.c.ofStrings(i.map(function(e){return e.helixClass;})),pdbx_PDB_helix_length:xe.c.ofStrings(i.map(function(e){return e.length;})),pdbx_PDB_helix_id:xe.c.ofStrings(i.map(function(e){return e.helixID;}))};return xe.b.ofFields(\"struct_conf\",p);}function Te(e,t,r){for(var n,i=[],a=t;a<r;a++){var o=(n=a,e.data.substring(e.indices[2*n],e.indices[2*n+1]));i.push({strand:o.substr(7,3).trim(),sheetID:o.substr(11,3).trim(),numStrands:o.substr(14,2).trim(),initResName:o.substr(17,3).trim(),initChainID:o.substr(21,1).trim(),initSeqNum:o.substr(22,4).trim(),initICode:o.substr(26,1).trim(),endResName:o.substr(28,3).trim(),endChainID:o.substr(32,1).trim(),endSeqNum:o.substr(33,4).trim(),endICode:o.substr(37,1).trim(),sense:o.substr(38,2).trim(),curAtom:o.substr(41,4).trim(),curResName:o.substr(45,3).trim(),curChainId:o.substr(49,1).trim(),curResSeq:o.substr(50,4).trim(),curICode:o.substr(54,1).trim(),prevAtom:o.substr(56,4).trim(),prevResName:o.substr(60,3).trim(),prevChainId:o.substr(64,1).trim(),prevResSeq:o.substr(65,4).trim(),prevICode:o.substr(69,1).trim()});}var s=xe.c.ofStrings(i.map(function(e){return e.initChainID;})),u=xe.c.ofStrings(i.map(function(e){return e.initResName;})),c=xe.c.ofStrings(i.map(function(e){return e.initSeqNum;})),l=xe.c.ofStrings(i.map(function(e){return e.endChainID;})),d=xe.c.ofStrings(i.map(function(e){return e.endResName;})),f=xe.c.ofStrings(i.map(function(e){return e.endSeqNum;})),p={beg_label_asym_id:s,beg_label_comp_id:u,beg_label_seq_id:c,beg_auth_asym_id:s,beg_auth_comp_id:u,beg_auth_seq_id:c,end_label_asym_id:l,end_label_comp_id:l,end_label_seq_id:f,end_auth_asym_id:l,end_auth_comp_id:d,end_auth_seq_id:f,id:xe.c.ofStrings(i.map(function(e){return e.strand;})),sheet_id:xe.c.ofStrings(i.map(function(e){return e.sheetID;})),pdbx_beg_PDB_ins_code:xe.c.ofStrings(i.map(function(e){return e.initICode;})),pdbx_end_PDB_ins_code:xe.c.ofStrings(i.map(function(e){return e.endICode;}))};return xe.b.ofFields(\"struct_sheet_range\",p);}var De={MOL_ID:\"\",MOLECULE:\"\",CHAIN:\"\",FRAGMENT:\"\",SYNONYM:\"\",EC:\"\",ENGINEERED:\"\",MUTATION:\"\",OTHER_DETAILS:\"\"};function Ie(e,t,r){for(var n,i,a={chains:[],description:\"\"},o=[],s=t;s<r;s++){var u=(i=s,e.data.substring(e.indices[2*i],e.indices[2*i+1])).substr(10,70).trim(),c=u.indexOf(\":\"),l=u.substring(0,c),d=void 0;l in De?(n=l,d=u.substring(c+2)):d=u,d=d.replace(/;$/,\"\"),\"MOL_ID\"===n?(a={chains:[],description:\"\"},o.push(a)):\"MOLECULE\"===n?(a.description&&(a.description+=\" \"),a.description+=d):\"CHAIN\"===n&&Array.prototype.push.apply(a.chains,d.split(/\\s*,\\s*/));}return o;}function Me(e,t,r){for(var n,i=new Map(),a=t;a<r;a++){var o=(n=a,e.data.substring(e.indices[2*n],e.indices[2*n+1])),s=o.substr(11,3).trim(),u=o.substr(15).trim();i.has(s)?i.set(s,i.get(s)+\" \"+u):i.set(s,u);}return i;}function ke(e,t,r,n,i){var a=r.data,s=i-n;o.a.addToken(e.group_PDB,o.b.trim(r,n,n+6)),o.b.trim(r,n+6,n+11),e.id[e.index]=r.data.substring(r.tokenStart,r.tokenEnd),o.a.addToken(e.auth_atom_id,o.b.trim(r,n+12,n+16)),32===a.charCodeAt(n+16)?o.a.add(e.label_alt_id,0,0):o.a.add(e.label_alt_id,n+16,n+17),o.a.addToken(e.auth_comp_id,o.b.trim(r,n+17,n+20)),o.a.add(e.auth_asym_id,n+21,n+22),o.a.addToken(e.auth_seq_id,o.b.trim(r,n+22,n+26)),32===a.charCodeAt(n+26)?o.a.add(e.pdbx_PDB_ins_code,0,0):o.a.add(e.pdbx_PDB_ins_code,n+26,n+27),o.a.addToken(e.Cartn_x,o.b.trim(r,n+30,n+38)),o.a.addToken(e.Cartn_y,o.b.trim(r,n+38,n+46)),o.a.addToken(e.Cartn_z,o.b.trim(r,n+46,n+54)),o.a.addToken(e.occupancy,o.b.trim(r,n+54,n+60)),s>=66?o.a.addToken(e.B_iso_or_equiv,o.b.trim(r,n+60,n+66)):o.a.add(e.B_iso_or_equiv,0,0),s>=78?(o.b.trim(r,n+76,n+78),r.tokenStart<r.tokenEnd?o.a.addToken(e.type_symbol,r):se(e.type_symbol,a,n+12,n+16)):se(e.type_symbol,a,n+12,n+16),e.pdbx_PDB_model_num[e.index]=t,e.index++;}function Be(e){var t=xe.c.ofTokens(e.pdbx_auth_seq_id),r=xe.c.ofTokens(e.pdbx_auth_comp_id),n=xe.c.ofTokens(e.pdbx_auth_asym_id),i=xe.c.ofTokens(e.pdbx_auth_atom_id),a={id:xe.c.ofStrings(e.id),type_symbol:xe.c.ofTokens(e.type_symbol),pdbx_label_atom_id:i,pdbx_label_alt_id:xe.c.ofTokens(e.pdbx_label_alt_id),pdbx_label_comp_id:r,pdbx_label_asym_id:n,pdbx_label_seq_id:t,pdbx_PDB_ins_code:xe.c.ofTokens(e.pdbx_PDB_ins_code),pdbx_auth_seq_id:t,pdbx_auth_comp_id:r,pdbx_auth_asym_id:n,pdbx_auth_atom_id:i};return a[\"U[1][1]\"]=xe.c.ofNumbers(e[\"U[1][1]\"]),a[\"U[2][2]\"]=xe.c.ofNumbers(e[\"U[2][2]\"]),a[\"U[3][3]\"]=xe.c.ofNumbers(e[\"U[3][3]\"]),a[\"U[1][2]\"]=xe.c.ofNumbers(e[\"U[1][2]\"]),a[\"U[1][3]\"]=xe.c.ofNumbers(e[\"U[1][3]\"]),a[\"U[2][3]\"]=xe.c.ofNumbers(e[\"U[2][3]\"]),a;}function Ve(e,t,r,n,i){var a=r.data,s=i-n;o.b.trim(r,n+6,n+11),e.id[e.index]=a.substring(r.tokenStart,r.tokenEnd),o.a.addToken(e.pdbx_auth_atom_id,o.b.trim(r,n+12,n+16)),32===a.charCodeAt(n+16)?o.a.add(e.pdbx_label_alt_id,0,0):o.a.add(e.pdbx_label_alt_id,n+16,n+17),o.a.addToken(e.pdbx_auth_comp_id,o.b.trim(r,n+17,n+20)),o.a.add(e.pdbx_auth_asym_id,n+21,n+22),o.a.addToken(e.pdbx_auth_seq_id,o.b.trim(r,n+22,n+26)),32===a.charCodeAt(n+26)?o.a.add(e.pdbx_PDB_ins_code,0,0):o.a.add(e.pdbx_PDB_ins_code,n+26,n+27),e[\"U[1][1]\"][e.index]=Object(A.e)(a,n+28,n+35)/1e4,e[\"U[2][2]\"][e.index]=Object(A.e)(a,n+35,n+42)/1e4,e[\"U[3][3]\"][e.index]=Object(A.e)(a,n+42,n+49)/1e4,e[\"U[1][2]\"][e.index]=Object(A.e)(a,n+49,n+56)/1e4,e[\"U[1][3]\"][e.index]=Object(A.e)(a,n+56,n+63)/1e4,e[\"U[2][3]\"][e.index]=Object(A.e)(a,n+63,n+70)/1e4,s>=78?(o.b.trim(r,n+76,n+78),r.tokenStart<r.tokenEnd?o.a.addToken(e.type_symbol,r):se(e.type_symbol,a,n+12,n+16)):se(e.type_symbol,a,n+12,n+16),e.index++;}function Re(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,s,u,c,l,d,f,p,m,h,g,v,y,_,S,O,x,C,w,P,j,E,A,T,D,I,M;return Object(n.__generator)(this,function(n){for(t=e.lines,r=t.data,i=t.indices,a=Object(o.b)(r),s=0,u=0,P=0,g=t.count;P<g;P++)switch(v=i[2*P],y=i[2*P+1],r[v]){case\"A\":Object(G.f)(r,v,y,\"ATOM  \")?s++:Object(G.f)(r,v,y,\"ANISOU\")&&u++;break;case\"H\":Object(G.f)(r,v,y,\"HETATM\")&&s++;}for(c=function(e,t){var r=function r(){return o.a.create(e,2*t);};return{index:0,count:t,group_PDB:r(),id:[],auth_atom_id:r(),label_alt_id:r(),auth_comp_id:r(),auth_asym_id:r(),auth_seq_id:r(),pdbx_PDB_ins_code:r(),Cartn_x:r(),Cartn_y:r(),Cartn_z:r(),occupancy:r(),B_iso_or_equiv:r(),type_symbol:r(),pdbx_PDB_model_num:[],label_entity_id:[]};}(r,s),l=function(e,t){var r=function r(){return new Float32Array(t);},n=function n(){return o.a.create(e,2*t);};return{index:0,count:t,id:[],type_symbol:n(),pdbx_label_atom_id:n(),pdbx_label_alt_id:n(),pdbx_label_comp_id:n(),pdbx_label_asym_id:n(),pdbx_label_seq_id:n(),pdbx_PDB_ins_code:n(),\"U[1][1]\":r(),\"U[2][2]\":r(),\"U[3][3]\":r(),\"U[1][2]\":r(),\"U[1][3]\":r(),\"U[2][3]\":r(),pdbx_auth_seq_id:n(),pdbx_auth_comp_id:n(),pdbx_auth_asym_id:n(),pdbx_auth_atom_id:n()};}(r,u),d=new re(),f=[],p=[],m=0,h=\"\",P=0,g=t.count;P<g;P++)switch(v=i[2*P],y=i[2*P+1],r[v]){case\"A\":Object(G.f)(r,v,y,\"ATOM  \")?(m||(m++,h=\"\"+m),ke(c,h,a,v,y)):Object(G.f)(r,v,y,\"ANISOU\")&&Ve(l,0,a,v,y);break;case\"C\":if(Object(G.f)(r,v,y,\"CRYST1\"))f.push.apply(f,Ce(e.id||\"?\",r.substring(v,y)));else if(Object(G.f)(r,v,y,\"CONNECT\"));else if(Object(G.f)(r,v,y,\"COMPND\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"COMPND\");)_++;d.setCompounds(Ie(t,P,_)),P=_-1;}break;case\"H\":if(Object(G.f)(r,v,y,\"HETATM\"))m||(m++,h=\"\"+m),ke(c,h,a,v,y);else if(Object(G.f)(r,v,y,\"HELIX\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"HELIX\");)_++;f.push(Ae(t,P,_)),P=_-1;}else if(Object(G.f)(r,v,y,\"HETNAM\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"HETNAM\");)_++;p.push.apply(p,Array.from(Me(t,P,_).entries())),P=_-1;}break;case\"M\":if(Object(G.f)(r,v,y,\"MODEL \")&&(m++,h=\"\"+m),Object(G.f)(r,v,y,\"MTRIX\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"MTRIX\");)_++;f.push.apply(f,je(t,P,_)),P=_-1;}break;case\"O\":break;case\"R\":if(Object(G.f)(r,v,y,\"REMARK 350\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"REMARK 350\");)_++;f.push.apply(f,Pe(t,P,_)),P=_-1;}break;case\"S\":if(Object(G.f)(r,v,y,\"SHEET\")){for(_=P+1;v=i[2*_],y=i[2*_+1],Object(G.f)(r,v,y,\"SHEET\");)_++;f.push(Te(t,P,_)),P=_-1;}}for(S=b.a.ofIntTokens(c.auth_seq_id),O=b.a.ofStringTokens(c.auth_atom_id),x=b.a.ofStringTokens(c.auth_comp_id),C=b.a.ofStringTokens(c.auth_asym_id),(w=new ve(S,O)).setNames(p),d.setNames(p),P=0,j=x.rowCount;P<j;++P)E=x.value(P),A=Object(ee.getMoleculeType)(w.add(E,P).type,E),c.label_entity_id[P]=d.getEntityId(E,A,C.value(P));var k,B,V,R,L;for(T={entity:xe.b.ofTable(\"entity\",d.getEntityTable()),chem_comp:xe.b.ofTable(\"chem_comp\",w.getChemCompTable()),atom_site:xe.b.ofFields(\"atom_site\",(k=c,B=xe.c.ofTokens(k.auth_asym_id),V=xe.c.ofTokens(k.auth_atom_id),R=xe.c.ofTokens(k.auth_comp_id),L=xe.c.ofTokens(k.auth_seq_id),{auth_asym_id:B,auth_atom_id:V,auth_comp_id:R,auth_seq_id:L,B_iso_or_equiv:xe.c.ofTokens(k.B_iso_or_equiv),Cartn_x:xe.c.ofTokens(k.Cartn_x),Cartn_y:xe.c.ofTokens(k.Cartn_y),Cartn_z:xe.c.ofTokens(k.Cartn_z),group_PDB:xe.c.ofTokens(k.group_PDB),id:xe.c.ofStrings(k.id),label_alt_id:xe.c.ofTokens(k.label_alt_id),label_asym_id:B,label_atom_id:V,label_comp_id:R,label_seq_id:L,label_entity_id:xe.c.ofStrings(k.label_entity_id),occupancy:xe.c.ofTokens(k.occupancy),type_symbol:xe.c.ofTokens(k.type_symbol),pdbx_PDB_ins_code:xe.c.ofTokens(k.pdbx_PDB_ins_code),pdbx_PDB_model_num:xe.c.ofStrings(k.pdbx_PDB_model_num)})),atom_site_anisotrop:xe.b.ofFields(\"atom_site_anisotrop\",Be(l))},D=0,I=f;D<I.length;D++)M=I[D],T[M.name]=M;return[2,{header:e.id||\"PDB\",categoryNames:Object.keys(T),categories:T}];});});}function Le(e){var t=this;return a.b.create(\"Parse PDB\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,r.update(\"Converting to mmCIF\")];case 1:return n.sent(),[4,Re(e)];case 2:return t=n.sent(),i=Oe.a.fromFrame(t),[2,Object(ne.a)(i.data.db,i,r)];}});});});}var Ne,Fe=r(341);function Ue(e){var t=this;return a.b.create(\"Parse PSF\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r,i,a,o,s;return Object(n.__generator)(this,function(n){return t=Ne.fromPsf(e),r=function(e){for(var t=e.atomName,r=e.residueName,n=new Array(e.count),i=new Array(e.count),a=new Uint32Array(e.count),o=new Uint32Array(e.count),s=new re(),u=new ve(e.residueId,e.atomName),c=\"\",l=0,d=\"\",f=0,p=e.segmentName.value(0),m=!1,h=0,g=-1,v=0,y=e.count;v<y;++v){var _=e.residueId.value(v);if(p!==e.segmentName.value(v)?(d=_e(l),l+=1,f=0,m=!0,p=e.segmentName.value(v)):m=!1,m||_!==g){var S=e.residueName.value(v),O=Object(ee.getMoleculeType)(u.add(S,v).type,S);m||O===h&&_===g+1||(d=_e(l),l+=1,f=0),c=s.getEntityId(S,O,d),f+=1,g=_,h=O;}n[v]=c,i[v]=d,a[v]=f,o[v]=v;}var x=b.a.ofStringArray(i),C=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:x,auth_atom_id:t,auth_comp_id:r,auth_seq_id:e.residueId,id:b.a.ofIntArray(o),label_asym_id:x,label_atom_id:t,label_comp_id:r,label_seq_id:b.a.ofIntArray(a),label_entity_id:b.a.ofStringArray(n),occupancy:b.a.ofConst(1,e.count,b.a.Schema.float),type_symbol:b.a.ofStringArray(b.a.mapToArray(e.atomName,function(e){return ce(e);})),pdbx_PDB_model_num:b.a.ofConst(1,e.count,b.a.Schema.int)},e.count);return Object(te.b)({entity:s.getEntityTable(),chem_comp:u.getChemCompTable(),atom_site:C});}(e.atoms),i=e.bonds,a=i.atomIdA,o=i.atomIdB,s={indexA:b.a.ofLambda({value:function value(e){return a.value(e)-1;},rowCount:a.rowCount,schema:a.schema}),indexB:b.a.ofLambda({value:function value(e){return o.value(e)-1;},rowCount:o.rowCount,schema:o.schema}),order:b.a.ofConst(1,e.bonds.count,b.a.Schema.int)},[2,Fe.a.create(e.id,r,s,t)];});});});}!function(e){e.is=function(e){return\"psf\"===e.kind;},e.fromPsf=function(e){return{kind:\"psf\",name:e.id,data:e};};}(Ne||(Ne={}));var ze,He=r(4),Ge=r(10),qe=r(120),We=r(13),Qe=r(5),Ye=r(268),Xe=r(163);!function(e){function t(e,t){var r=qe.Script.is(t)?t:void 0,n=qe.Script.is(t)?qe.Script.toExpression(t):t;return{script:r,expression:n,compiled:Object(Xe.compile)(n),originalStructure:e,currentStructure:e};}function r(e,t){return e.compiled(new He.QueryContext(t));}e.isUnchanged=function(e,t,r){return e.currentStructure===r&&(qe.Script.is(t)?!!e.script&&qe.Script.areEqual(e.script,t):e.expression===t);},e.create=t,e.run=r,e.createAndRun=function(e,n){var i=t(e,n);return{entry:i,selection:r(i,e)};},e.updateStructure=function(e,t){return e.currentStructure=t,e.compiled(new He.QueryContext(t));},e.updateStructureObject=function(e,t,r){var n=He.StructureSelection.unionStructure(t);e.label=\"\"+(r||\"Selection\"),e.description=He.Structure.elementDescription(n),e.data=n;};}(ze||(ze={}));var Ke=r(8),Ze=r(80),Je={type:U.ParamDefinition.MappedStatic(\"static\",{static:U.ParamDefinition.Text(\"polymer\"),expression:U.ParamDefinition.Value(Ge.MolScriptBuilder.struct.generator.all),bundle:U.ParamDefinition.Value(He.StructureElement.Bundle.Empty),script:U.ParamDefinition.Script({language:\"mol-script\",expression:\"(sel.atom.all)\"})},{isHidden:!0}),nullIfEmpty:U.ParamDefinition.Optional(U.ParamDefinition.Boolean(!0,{isHidden:!0})),label:U.ParamDefinition.Text(\"\",{isHidden:!0})};var $e=r(73);function et(e){var t=Object(o.b)(e),r=o.b.readLine(t).trim(),n=o.b.readLine(t).trim(),a=o.b.readLine(t).trim(),s=o.b.readLine(t),u=+s.substr(0,3),c=+s.substr(3,3),l={title:r,program:n,comment:a,atoms:function(e,t){for(var r=o.a.create(e.data,2*t),n=o.a.create(e.data,2*t),i=o.a.create(e.data,2*t),a=o.a.create(e.data,2*t),s=0;s<t;++s){o.b.markLine(e);var u=e.tokenStart,c=e.position;o.b.trim(e,u,u+10),o.a.addUnchecked(r,e.tokenStart,e.tokenEnd),o.b.trim(e,u+10,u+20),o.a.addUnchecked(n,e.tokenStart,e.tokenEnd),o.b.trim(e,u+20,u+30),o.a.addUnchecked(i,e.tokenStart,e.tokenEnd),o.b.trim(e,u+31,u+34),o.a.addUnchecked(a,e.tokenStart,e.tokenEnd),e.position=c;}return{count:t,x:Object($e.c)(r)(b.a.Schema.float),y:Object($e.c)(n)(b.a.Schema.float),z:Object($e.c)(i)(b.a.Schema.float),type_symbol:Object($e.c)(a)(b.a.Schema.str)};}(t,u),bonds:function(e,t){for(var r=o.a.create(e.data,2*t),n=o.a.create(e.data,2*t),i=o.a.create(e.data,2*t),a=0;a<t;++a){o.b.markLine(e);var s=e.tokenStart,u=e.position;o.b.trim(e,s,s+3),o.a.addUnchecked(r,e.tokenStart,e.tokenEnd),o.b.trim(e,s+3,s+6),o.a.addUnchecked(n,e.tokenStart,e.tokenEnd),o.b.trim(e,s+6,s+9),o.a.addUnchecked(i,e.tokenStart,e.tokenEnd),e.position=u;}return{count:t,atomIdxA:Object($e.c)(r)(b.a.Schema.int),atomIdxB:Object($e.c)(n)(b.a.Schema.int),order:Object($e.c)(i)(b.a.Schema.int)};}(t,c)};return i.a.success(l);}function tt(e){var t=this;return a.b.create(\"Parse Mol\",function(){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){return[2,et(e)];});});});}var rt,nt=r(173);function it(e){return a.b.create(\"Parse MOL\",function(t){return function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c,l,d,f,p,m,h,g,v;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=e.atoms,i=e.bonds,a=b.a.ofConst(\"MOL\",e.atoms.count,b.a.Schema.str),o=b.a.ofConst(\"A\",e.atoms.count,b.a.Schema.str),s=b.a.asArrayColumn(r.type_symbol),u=b.a.ofConst(1,r.count,b.a.Schema.int),c=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:o,auth_atom_id:s,auth_comp_id:a,auth_seq_id:u,Cartn_x:b.a.asArrayColumn(r.x,Float32Array),Cartn_y:b.a.asArrayColumn(r.y,Float32Array),Cartn_z:b.a.asArrayColumn(r.z,Float32Array),id:b.a.range(0,r.count-1),label_asym_id:o,label_atom_id:s,label_comp_id:a,label_seq_id:u,label_entity_id:b.a.ofConst(\"1\",r.count,b.a.Schema.str),occupancy:b.a.ofConst(1,r.count,b.a.Schema.float),type_symbol:s,pdbx_PDB_model_num:b.a.ofConst(1,r.count,b.a.Schema.int)},r.count),(l=new re()).setNames([[\"MOL\",\"Unknown Entity\"]]),l.getEntityId(\"MOL\",0,\"A\"),(d=new ve(u,s)).setNames([[\"MOL\",\"Unknown Molecule\"]]),d.add(\"MOL\",0),f=Object(te.b)({entity:l.getEntityTable(),chem_comp:d.getChemCompTable(),atom_site:c}),[4,Object(ne.a)(f,rt.create(e),t)];case 1:return(p=n.sent()).length>0&&(m=b.a.ofIntArray(b.a.mapToArray(i.atomIdxA,function(e){return e-1;},Int32Array)),h=b.a.ofIntArray(b.a.mapToArray(i.atomIdxB,function(e){return e-1;},Int32Array)),g=b.a.asArrayColumn(i.order,Int32Array),v=nt.a.fromData({pairs:{indexA:m,indexB:h,order:g},count:i.count}),nt.a.Provider.set(p[0],v)),[2,p];}});});}(e,t);});}!function(e){e.is=function(e){return\"mol\"===e.kind;},e.create=function(e){return{kind:\"mol\",name:e.title,data:e};};}(rt||(rt={}));var at,ot,st,ut=r(11),ct=r(113),lt=r(211);function dt(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,d,f,p,m,h,g,v,y,_,S,O,x,C,P,j,E,A,T,D,I,M,k,B,V,R,L,N,F,U,z,H,G,q,W,Q,Y,X,K;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(i=e.atom_site._rowCount,a=b.a.ofConst(\"MOL\",i,b.a.Schema.str),o=b.a.ofConst(\"A\",i,b.a.Schema.str),s=b.a.ofConst(1,i,b.a.Schema.int),u=function(e){var t=e.cell,r=function(e){var t=e.IT_number.value(0),r=e[\"name_H-M_full\"].value(0);return e.IT_number.isDefined?(e[\"name_H-M_full\"].isDefined,t):r;}(e.space_group),n=ut.f.create(r,w.Vec3.create(t.length_a.value(0),t.length_b.value(0),t.length_c.value(0)),w.Vec3.scale(w.Vec3.zero(),w.Vec3.create(t.angle_alpha.value(0),t.angle_beta.value(0),t.angle_gamma.value(0)),Math.PI/180));return{spacegroup:ut.e.create(n),assemblies:[],isNonStandardCrystalFrame:!1,ncsOperators:[]};}(e),c=u.spacegroup.cell.fromFractional,l=e.atom_site,d=l.fract_x,f=l.fract_y,p=l.fract_z,m=new Float32Array(i),h=new Float32Array(i),g=new Float32Array(i),v=Object(w.Vec3)(),K=0;K<i;++K)w.Vec3.set(v,d.value(K),f.value(K),p.value(K)),w.Vec3.transformMat4(v,v,c),m[K]=v[0],h[K]=v[1],g[K]=v[2];if(y=e.atom_site,_=y.type_symbol,S=y.label,_.isDefined){for(E=new Array(i),C=new Int8Array(i),K=0;K<i;++K)P=_.value(K),j=P.length,\"+\"===P[j-1]?(E[K]=P.substring(0,j-2),C[K]=parseInt(P[j-2])):\"+\"===P[j-2]?(E[K]=P.substring(0,j-2),C[K]=parseInt(P[j-1])):\"-\"===P[j-1]?(E[K]=P.substring(0,j-2),C[K]=-parseInt(P[j-2])):\"-\"===P[j-2]?(E[K]=P.substring(0,j-2),C[K]=-parseInt(P[j-1])):(E[K]=P,C[K]=0);O=b.a.ofStringArray(E),x=b.a.ofIntArray(C);}else{for(E=new Array(i),K=0;K<i;++K)E[K]=ce(S.value(K));O=b.a.ofStringArray(E),x=b.a.Undefined(i,b.a.Schema.int);}return A=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:o,auth_atom_id:S,auth_comp_id:a,auth_seq_id:s,Cartn_x:b.a.ofFloatArray(m),Cartn_y:b.a.ofFloatArray(h),Cartn_z:b.a.ofFloatArray(g),id:b.a.range(0,i-1),label_asym_id:o,label_atom_id:S,label_comp_id:a,label_seq_id:s,label_entity_id:b.a.ofConst(\"1\",i,b.a.Schema.str),occupancy:e.atom_site.occupancy.isDefined?e.atom_site.occupancy:b.a.ofConst(1,i,b.a.Schema.float),type_symbol:O,pdbx_formal_charge:x,pdbx_PDB_model_num:b.a.ofConst(1,i,b.a.Schema.int),B_iso_or_equiv:e.atom_site.U_iso_or_equiv},i),T=e.chemical.name_common.value(0)||e.chemical.name_systematic.value(0)||e.chemical_formula.sum.value(0),(D=new re()).setNames([[\"MOL\",T||\"Unknown Entity\"]]),D.getEntityId(\"MOL\",0,\"A\"),(I=new ve(s,e.atom_site.type_symbol)).setNames([[\"MOL\",T||\"Unknown Molecule\"]]),I.add(\"MOL\",0),M=Object(te.b)({entity:D.getEntityTable(),chem_comp:I.getChemCompTable(),atom_site:A}),[4,Object(ne.a)(M,t,r)];case 1:if((k=n.sent()).length>0&&(ct.a.Provider.set(k[0],u),(B=e.geom_bond._rowCount)>0)){for(V={},R=e.atom_site.label,K=0,L=R.rowCount;K<L;++K)V[R.value(K)]=K;for(N=[],F=[],U=[],z=[],H=[],G=e.geom_bond,q=G.atom_site_label_1,W=G.atom_site_label_2,Q=G.valence,Y=G.site_symmetry_1,X=G.site_symmetry_2,K=0;K<B;++K)N[K]=V[q.value(K)],F[K]=V[W.value(K)],U[K]=Q.isDefined?Q.value(K):1,z[K]=Y.value(K)||\"1_555\",H[K]=X.value(K)||\"1_555\";nt.a.Provider.set(k[0],nt.a.fromData({pairs:{indexA:b.a.ofIntArray(N),indexB:b.a.ofIntArray(F),order:b.a.ofIntArray(U),symmetryA:b.a.ofStringArray(z),symmetryB:b.a.ofStringArray(H)},count:N.length}));}return[2,k];}});});}function ft(e){return a.b.create(\"Parse Cube\",function(t){return function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c,l,d;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r=e.atoms,i=b.a.ofConst(\"MOL\",e.atoms.count,b.a.Schema.str),a=b.a.ofConst(\"A\",e.atoms.count,b.a.Schema.str),o=b.a.ofArray({array:b.a.mapToArray(r.number,function(e){return Object(ee.getElementFromAtomicNumber)(e);}),schema:b.a.Schema.Aliased(b.a.Schema.str)}),s=b.a.ofConst(1,r.count,b.a.Schema.int),u=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:a,auth_atom_id:o,auth_comp_id:i,auth_seq_id:s,Cartn_x:b.a.asArrayColumn(r.x,Float32Array),Cartn_y:b.a.asArrayColumn(r.y,Float32Array),Cartn_z:b.a.asArrayColumn(r.z,Float32Array),id:b.a.range(0,r.count-1),label_asym_id:a,label_atom_id:o,label_comp_id:i,label_seq_id:s,label_entity_id:b.a.ofConst(\"1\",r.count,b.a.Schema.str),occupancy:b.a.ofConst(1,r.count,b.a.Schema.float),type_symbol:o,pdbx_PDB_model_num:b.a.ofConst(1,r.count,b.a.Schema.int)},r.count),(c=new re()).setNames([[\"MOL\",\"Unknown Entity\"]]),c.getEntityId(\"MOL\",0,\"A\"),(l=new ve(s,o)).setNames([[\"MOL\",\"Unknown Molecule\"]]),l.add(\"MOL\",0),d=Object(te.b)({entity:c.getEntityTable(),chem_comp:l.getChemCompTable(),atom_site:u}),[4,Object(ne.a)(d,st.create(e),t)];case 1:return[2,n.sent()];}});});}(e,t);});}lt.a.Provider.formatRegistry.add(\"cifCore\",function(e){if(at.is(e.sourceData)){var t=e.sourceData.data.db,r=t.atom_site,n=t.atom_site_aniso;return{data:b.d.ofPartialColumns(lt.a.Schema,{U:n.U,U_esd:n.U_su},n._rowCount),elementToAnsiotrop:lt.a.getElementToAnsiotropFromLabel(r.label,n.label)};}},function(e){return!!at.is(e.sourceData)&&e.sourceData.data.db.atom_site_aniso.U.isDefined;}),(ot=at||(at={})).is=function(e){return\"cifCore\"===e.kind;},ot.fromFrame=function(e,t){return t||(t=xe.a.schema.cifCore(e)),{kind:\"cifCore\",name:t.database_code.depnum_ccdc_archive.value(0)||t.database_code.depnum_ccdc_fiz.value(0)||t.database_code.ICSD.value(0)||t.database_code.MDF.value(0)||t.database_code.NBS.value(0)||t.database_code.CSD.value(0)||t.database_code.COD.value(0)||t._name,data:{db:t,frame:e}};},function(e){e.is=function(e){return\"cube\"===e.kind;},e.create=function(e){return{kind:\"cube\",name:e.header.comment1,data:e};};}(st||(st={}));var pt=o.b.skipWhitespace,mt=o.b.eatValue,ht=o.b.markLine,gt=o.b.getTokenString,vt=o.b.readLine;var bt,yt=/\\s+/g;function _t(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,s,u,c,l,d,f,p,m,h,g,v,y,_,S,O,x,C,w,P,j,E,A,T,D,I,M,k,B,V,R,L,N,F,U,z;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(t=e.tokenizer,r=e.molecule,i=!1,s=!1,u=!1,c=!1;\"@<TRIPOS>ATOM\"!==gt(t)&&t.position<t.data.length;)ht(t);for(l=t.position,d=t.lineNumber,f=vt(t),p=f.trim().split(/\\s+/g),m=p.length,h=6;h<m;h++)isNaN(Number(p[h]))?isNaN(Number(p[h]))&&((H=p[h]).includes(\"DSPMOD\")||H.includes(\"TYPECOL\")||H.includes(\"CAP\")||H.includes(\"BACKBONE\")||H.includes(\"DICT\")||H.includes(\"ESSENTIAL\")||H.includes(\"WATER\")||H.includes(\"DIRECT\")?c=!0:s=!0):-1===p[h].indexOf(\".\")?i=!0:u=!0;return g=o.a.create(t.data,2*r.num_atoms),v=o.a.create(t.data,2*r.num_atoms),y=o.a.create(t.data,2*r.num_atoms),_=o.a.create(t.data,2*r.num_atoms),S=o.a.create(t.data,2*r.num_atoms),O=o.a.create(t.data,2*r.num_atoms),x=Object($e.c)(g),C=Object($e.c)(v),w=Object($e.c)(y),P=Object($e.c)(_),j=Object($e.c)(S),E=Object($e.c)(O),A=o.a.create(t.data,2*r.num_atoms),T=o.a.create(t.data,2*r.num_atoms),D=o.a.create(t.data,2*r.num_atoms),I=o.a.create(t.data,2*r.num_atoms),M=Object($e.c)(A),k=Object($e.c)(T),B=Object($e.c)(D),V=Object($e.c)(I),R=b.a.Undefined(r.num_atoms,b.a.Schema.float),L=b.a.Undefined(r.num_atoms,b.a.Schema.int),N=b.a.Undefined(r.num_atoms,b.a.Schema.str),F=6,i&&F++,s&&F++,u&&F++,c&&F++,t.position=l,t.lineNumber=d,U=t.length,z=0,[4,Object(a.c)(e.runtimeCtx,1e5,void 0,function(e){for(var n=Math.min(r.num_atoms-z,e),a=0;a<n;a++)for(var l=!1,d=!1,f=!1,p=!1,m=0;m<F;m++)switch(pt(t),t.tokenStart=t.position,mt(t),m){case 0:o.a.addUnchecked(g,t.tokenStart,t.tokenEnd);break;case 1:o.a.addUnchecked(v,t.tokenStart,t.tokenEnd);break;case 2:o.a.addUnchecked(y,t.tokenStart,t.tokenEnd);break;case 3:o.a.addUnchecked(_,t.tokenStart,t.tokenEnd);break;case 4:o.a.addUnchecked(S,t.tokenStart,t.tokenEnd);break;case 5:o.a.addUnchecked(O,t.tokenStart,t.tokenEnd);break;default:!0===i&&!1===l?(o.a.addUnchecked(A,t.tokenStart,t.tokenEnd),l=!0):!0===s&&!1===d?(o.a.addUnchecked(T,t.tokenStart,t.tokenEnd),d=!0):!0===u&&!1===f?(o.a.addUnchecked(D,t.tokenStart,t.tokenEnd),f=!0):!0===c&&!1===p&&(o.a.addUnchecked(I,t.tokenStart,t.tokenEnd),p=!0);}return z+=n,n;},function(e){return e.update({message:\"Parsing...\",current:t.position,max:U});})];case 1:return n.sent(),[2,{count:r.num_atoms,atom_id:x(b.a.Schema.int),atom_name:C(b.a.Schema.str),x:w(b.a.Schema.float),y:P(b.a.Schema.float),z:j(b.a.Schema.float),atom_type:E(b.a.Schema.str),subst_id:i?M(b.a.Schema.int):L,subst_name:s?k(b.a.Schema.str):N,charge:u?B(b.a.Schema.float):R,status_bit:c?V(b.a.Schema.str):N}];}var H;});});}function St(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,s,u,c,l,d,f,p,m,h,g,v,y,_,S,O,x,C,w;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(t=e.tokenizer,r=e.molecule,i=!1;\"@<TRIPOS>BOND\"!==gt(t)&&t.position<t.data.length;)ht(t);return s=t.position,u=t.lineNumber,c=vt(t),l=c.trim().split(/\\s+/g),5===l.length&&(i=!0),d=o.a.create(t.data,2*r.num_bonds),f=o.a.create(t.data,2*r.num_bonds),p=o.a.create(t.data,2*r.num_bonds),m=o.a.create(t.data,2*r.num_bonds),h=Object($e.c)(d),g=Object($e.c)(f),v=Object($e.c)(p),y=Object($e.c)(m),_=o.a.create(t.data,2*r.num_bonds),S=Object($e.c)(_),O=b.a.Undefined(r.num_bonds,b.a.Schema.str),x=4,i&&x++,t.position=s,t.lineNumber=u,C=t.length,w=0,[4,Object(a.c)(e.runtimeCtx,1e5,void 0,function(e){for(var n=Math.min(r.num_bonds-w,e),i=0;i<n;i++)for(var a=0;a<x;a++)switch(pt(t),t.tokenStart=t.position,mt(t),a){case 0:o.a.addUnchecked(d,t.tokenStart,t.tokenEnd);break;case 1:o.a.addUnchecked(f,t.tokenStart,t.tokenEnd);break;case 2:o.a.addUnchecked(p,t.tokenStart,t.tokenEnd);break;case 3:o.a.addUnchecked(m,t.tokenStart,t.tokenEnd);break;default:o.a.addUnchecked(_,t.tokenStart,t.tokenEnd);}return w+=n,n;},function(e){return e.update({message:\"Parsing...\",current:t.position,max:C});})];case 1:return n.sent(),[2,{count:r.num_bonds,bond_id:h(b.a.Schema.int),origin_atom_id:g(b.a.Schema.int),target_atom_id:v(b.a.Schema.int),bond_type:y(b.a.Schema.str),status_bits:i?S(b.a.Schema.str):O}];}});});}function Ot(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,s,u,c,l,d;return Object(n.__generator)(this,function(n){switch(n.label){case 0:a=Object(o.b)(t),e.update({message:\"Parsing...\",current:0,max:t.length}),s=[],n.label=1;case 1:return a.position<t.length?(function(e){for(var t=e.tokenizer,r=e.molecule;\"@<TRIPOS>MOLECULE\"!==gt(t)&&t.position<t.data.length;)ht(t);ht(t),r.mol_name=gt(t),ht(t);var n=gt(t).trim().split(yt);r.num_atoms=parseInt(n[0]),r.num_bonds=parseInt(n[1]),r.num_subst=parseInt(n[2]),r.num_feat=parseInt(n[3]),r.num_sets=parseInt(n[4]),ht(t),r.mol_type=gt(t),ht(t),r.charge_type=gt(t),ht(t),\"\"!==gt(t)&&(r.status_bits=gt(t),ht(t),\"\"!==gt(t)&&(r.mol_comment=gt(t)));}(u=function(e,t){return{tokenizer:e,molecule:{mol_name:\"\",num_atoms:0,num_bonds:0,num_subst:0,num_feat:0,num_sets:0,mol_type:\"\",charge_type:\"\",status_bits:\"\",mol_comment:\"\"},runtimeCtx:t};}(a,e)),[4,_t(u)]):[3,4];case 2:return c=n.sent(),[4,St(u)];case 3:return l=n.sent(),s.push({molecule:u.molecule,atoms:c,bonds:l}),pt(a),[3,1];case 4:return d={name:r,structures:s},[2,i.a.success(d)];}});});}function xt(e,t){var r=this;return a.b.create(\"Parse MOL2\",function(i){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,Ot(i,e,t)];case 1:return[2,r.sent()];}});});});}function Ct(e){return a.b.create(\"Parse MOL2\",function(t){return function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c,l,d,f,p,m,h,g,v,y,_,S;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=[],i=0,a=e.structures.length,n.label=1;case 1:if(!(i<a))return[3,4];for(o=e.structures[i],s=o.atoms,u=o.bonds,c=b.a.ofConst(\"A\",s.count,b.a.Schema.str),l=b.d.ofPartialColumns(te.a.atom_site,{auth_asym_id:c,auth_atom_id:b.a.asArrayColumn(s.atom_type),auth_comp_id:s.subst_name,auth_seq_id:s.subst_id,Cartn_x:b.a.asArrayColumn(s.x,Float32Array),Cartn_y:b.a.asArrayColumn(s.y,Float32Array),Cartn_z:b.a.asArrayColumn(s.z,Float32Array),id:b.a.asArrayColumn(s.atom_id),label_asym_id:c,label_atom_id:b.a.asArrayColumn(s.atom_type),label_comp_id:s.subst_name,label_seq_id:s.subst_id,label_entity_id:b.a.ofConst(\"1\",s.count,b.a.Schema.str),occupancy:b.a.ofConst(1,s.count,b.a.Schema.float),type_symbol:b.a.asArrayColumn(s.atom_name),pdbx_PDB_model_num:b.a.ofConst(i,s.count,b.a.Schema.int)},s.count),(d=new re()).setNames([[\"MOL\",\"Unknown Entity\"]]),d.getEntityId(\"MOL\",0,\"A\"),f=new ve(s.subst_id,s.atom_name),p=0,m=s.subst_name.rowCount;p<m;++p)f.add(s.subst_name.value(p),p);return h=Object(te.b)({entity:d.getEntityTable(),chem_comp:f.getChemCompTable(),atom_site:l}),[4,Object(ne.a)(h,bt.create(e),t)];case 2:(g=n.sent()).length>0&&(v=b.a.ofIntArray(b.a.mapToArray(u.origin_atom_id,function(e){return e-1;},Int32Array)),y=b.a.ofIntArray(b.a.mapToArray(u.target_atom_id,function(e){return e-1;},Int32Array)),_=b.a.ofIntArray(b.a.mapToArray(u.bond_type,function(e){return\"ar\"===e?1:parseInt(e);},Int8Array)),S=nt.a.fromData({pairs:{indexA:v,indexB:y,order:_},count:u.count}),nt.a.Provider.set(g[0],S),r.push(g[0])),n.label=3;case 3:return++i,[3,1];case 4:return[2,r];}});});}(e,t);});}!function(e){e.is=function(e){return\"mol2\"===e.kind;},e.create=function(e){return{kind:\"mol2\",name:e.name,data:e};};}(bt||(bt={}));var wt,Pt=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]);function jt(){throw new Error(\"(xdrfile error) Undefined error.\");}function Et(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,u,c,l,d,f,p,m,h,g,v,b,y,_,S,O,x,C,w,P,j,E,A,T,D,I,M,k,B;return Object(n.__generator)(this,function(n){switch(n.label){case 0:r=new DataView(t.buffer,t.byteOffset),a=(i={frames:[],boxes:[],times:[],timeOffset:0,deltaTime:0}).frames,o=i.boxes,s=i.times,u=[0,0,0,0,0,0],c=[0,0,0],l=[0,0,0],d=[0,0,0],f=[.1,.1,.1],p=[.1,.1,.1],m=0,h=wt.buf,n.label=1;case 1:for(g=void 0,v=r.getInt32(m+4),m+=12,s.push(r.getFloat32(m)),m+=4,b=new Float32Array(9),T=0;T<9;++T)b[T]=10*r.getFloat32(m),m+=4;if(o.push(b),v<=9)for(g={count:v/3,x:new Float32Array(v/3),y:new Float32Array(v/3),z:new Float32Array(v/3)},T=0;T<v/3;++T)g.x[T]=r.getFloat32(m),g.y[T]=r.getFloat32(m),g.z[T]=r.getFloat32(m),m+=4;else{for(h[0]=h[1]=h[2]=0,c[0]=c[1]=c[2]=0,d[0]=d[1]=d[2]=0,l[0]=l[1]=l[2]=0,f[0]=f[1]=f[2]=0,p[0]=p[1]=p[2]=0,g={count:v,x:new Float32Array(v),y:new Float32Array(v),z:new Float32Array(v)},y=0,_=r.getInt32(m),m+=4,S=r.getFloat32(m),m+=4,u[0]=r.getInt32(m),u[1]=r.getInt32(m+4),u[2]=r.getInt32(m+8),u[3]=r.getInt32(m+12),u[4]=r.getInt32(m+16),u[5]=r.getInt32(m+20),c[0]=u[3]-u[0]+1,c[1]=u[4]-u[1]+1,c[2]=u[5]-u[2]+1,m+=24,O=void 0,(c[0]|c[1]|c[2])>16777215?(l[0]=wt.sizeOfInt(c[0]),l[1]=wt.sizeOfInt(c[1]),l[2]=wt.sizeOfInt(c[2]),O=0):O=wt.sizeOfInts(3,c),x=r.getInt32(m),m+=4,w=Pt[C=9>(C=x-1)?9:C]/2|0,P=Pt[x]/2|0,d[0]=d[1]=d[2]=Pt[x],j=4*Math.ceil(r.getInt32(m)/4),m+=4,E=1/S,A=0,T=0,f[0]=f[1]=f[2]=0;T<_;){if(0===O?(f[0]=wt.decodeBits(t,m,l[0]),f[1]=wt.decodeBits(t,m,l[1]),f[2]=wt.decodeBits(t,m,l[2])):wt.decodeInts(t,m,O,c,f),T++,f[0]+=u[0],f[1]+=u[1],f[2]+=u[2],p[0]=f[0],p[1]=f[1],p[2]=f[2],D=wt.decodeBits(t,m,1),I=0,1===D&&(A=wt.decodeBits(t,m,5),A-=I=A%3,I--),A>0)for(f[0]=f[1]=f[2]=0,M=0;M<A;M+=3)wt.decodeInts(t,m,x,d,f),T++,f[0]+=p[0]-P,f[1]+=p[1]-P,f[2]+=p[2]-P,0===M?(k=f[0],f[0]=p[0],p[0]=k,k=f[1],f[1]=p[1],p[1]=k,k=f[2],f[2]=p[2],p[2]=k,g.x[y]=p[0]*E,g.y[y]=p[1]*E,g.z[y]=p[2]*E,y++):(p[0]=f[0],p[1]=f[1],p[2]=f[2]),g.x[y]=f[0]*E,g.y[y]=f[1]*E,g.z[y]=f[2]*E,y++;else g.x[y]=f[0]*E,g.y[y]=f[1]*E,g.z[y]=f[2]*E,y++;x+=I,I<0?(P=w,w=x>9?Pt[x-1]/2|0:0):I>0&&(w=P,P=Pt[x]/2|0),d[0]=d[1]=d[2]=Pt[x],0!==d[0]&&0!==d[1]&&0!==d[2]||jt();}m+=j;}for(B=0;B<v;B++)g.x[B]*=10,g.y[B]*=10,g.z[B]*=10;return a.push(g),e.shouldUpdate?[4,e.update({current:m,max:t.length})]:[3,3];case 2:n.sent(),n.label=3;case 3:return m>=t.length?[3,4]:[3,1];case 4:return s.length>=1&&(i.timeOffset=s[0]),s.length>=2&&(i.deltaTime=s[1]-s[0]),[2,i];}});});}function At(e){var t=this;return a.b.create(\"Parse XTC\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),r.update({canAbort:!0,message:\"Parsing trajectory...\"}),[4,Et(r,e)];case 1:return t=n.sent(),[2,i.a.success(t)];case 2:return a=n.sent(),[2,i.a.error(\"\"+a)];case 3:return[2];}});});});}function Tt(e){var t=this;return a.b.create(\"Parse XTC\",function(r){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,r.update(\"Converting to coordinates\")];case 1:for(n.sent(),t=Object(ae.b)(e.deltaTime,\"step\"),i=Object(ae.b)(e.timeOffset,t.unit),a=[],o=0,s=e.frames.length;o<s;++o)a.push({elementCount:e.frames[o].count,cell:P.empty(),x:e.frames[o].x,y:e.frames[o].y,z:e.frames[o].z,time:Object(ae.b)(i.value+t.value*o,t.unit)});return[2,ae.a.create(a,t,i)];}});});});}!function(e){e.sizeOfInt=function(e){for(var t=1,r=0;e>=t&&r<32;)r++,t<<=1;return r;};var t=new Uint8Array(32);e.sizeOfInts=function(e,r){var n=1,i=0;t[0]=1;for(var a=0;a<e;a++){var o=void 0,s=0;for(o=0;o<n;o++)s+=t[o]*r[a],t[o]=255&s,s>>=8;for(;0!==s;)t[o++]=255&s,s>>=8;n=o;}var u=1;for(n--;t[n]>=u;)i++,u*=2;return i+8*n;};var r=new ArrayBuffer(24);e.buf=new Int32Array(r);var n=new Uint32Array(r);function i(t,r,i){for(var a=i,o=(1<<a)-1,s=n[1],u=n[2],c=e.buf[0],l=0;a>=8;)l|=(u=u<<8|t[r+c++])>>s<<a-8,a-=8;return a>0&&(s<a&&(s+=8,u=u<<8|t[r+c++]),l|=u>>(s-=a)&(1<<a)-1),l&=o,e.buf[0]=c,e.buf[1]=s,e.buf[2]=u,l;}function a(t,r){var i=n[2],a=e.buf[0];return i=i<<8|t[r+a],e.buf[0]=a+1,e.buf[2]=i,i>>n[1]&255;}e.decodeBits=i;var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];e.decodeInts=function(e,t,r,n,s){var u=r,c=0;for(o[0]=0,o[1]=0,o[2]=0,o[3]=0;u>8;)o[c++]=a(e,t),u-=8;u>0&&(o[c++]=i(e,t,u));for(var l=2;l>0;l--){for(var d=0,f=n[l],p=c-1;p>=0;p--){var m=(d=d<<8|o[p])/f|0;o[p]=m,d-=m*f;}s[l]=d;}s[0]=o[0]|o[1]<<8|o[2]<<16|o[3]<<24;};}(wt||(wt={}));var Dt=Ke.b.BuiltIn({name:\"coordinates-from-dcd\",display:{name:\"Parse DCD\",description:\"Parse DCD binary data.\"},from:[Ke.a.Data.Binary],to:Ke.a.Molecule.Coordinates})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse DCD\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,E(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,oe(t.result).runInContext(e)];case 2:return i=n.sent(),[2,new Ke.a.Molecule.Coordinates(i,{label:r.label,description:\"Coordinates\"})];}});});});}}),It=Ke.b.BuiltIn({name:\"coordinates-from-xtc\",display:{name:\"Parse XTC\",description:\"Parse XTC binary data.\"},from:[Ke.a.Data.Binary],to:Ke.a.Molecule.Coordinates})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse XTC\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,At(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,Tt(t.result).runInContext(e)];case 2:return i=n.sent(),[2,new Ke.a.Molecule.Coordinates(i,{label:r.label,description:\"Coordinates\"})];}});});});}}),Mt=Ke.b.BuiltIn({name:\"topology-from-psf\",display:{name:\"PSF Topology\",description:\"Parse PSF string data.\"},from:[Ke.a.Format.Psf],to:Ke.a.Molecule.Topology})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Create Topology\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,Ue(r.data).runInContext(e)];case 1:return t=n.sent(),[2,new Ke.a.Molecule.Topology(t,{label:t.label||r.label,description:\"Topology\"})];}});});});}});function kt(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return t.type!==Ke.a.Molecule.Topology.type?[3,2]:(i=t.data,[4,He.Model.trajectoryFromTopologyAndCoordinates(i,r).runInContext(e)]);case 1:return[2,n.sent()];case 2:if(t.type===Ke.a.Molecule.Model.type)return a=t.data,[2,He.Model.trajectoryFromModelAndCoordinates(a,r)];n.label=3;case 3:throw new Error(\"no model/topology found\");}});});}var Bt=Ke.b.BuiltIn({name:\"trajectory-from-model-and-coordinates\",display:{name:\"Trajectory from Topology & Coordinates\",description:\"Create a trajectory from existing model/topology and coordinates.\"},from:Ke.a.Root,to:Ke.a.Molecule.Trajectory,params:{modelRef:U.ParamDefinition.Text(\"\",{isHidden:!0}),coordinatesRef:U.ParamDefinition.Text(\"\",{isHidden:!0})}})({apply:function apply(e){var t=this,r=e.params,i=e.dependencies;return a.b.create(\"Create trajectory from model/topology and coordinates\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,a,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return t=i[r.coordinatesRef].data,[4,kt(e,i[r.modelRef],t)];case 1:return a=n.sent(),o={label:\"Trajectory\",description:a.length+\" model\"+(1===a.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(a,o)];}});});});}}),Vt=Ke.b.BuiltIn({name:\"trajectory-from-blob\",display:{name:\"Parse Blob\",description:\"Parse format blob into a single trajectory.\"},from:Ke.a.Format.Blob,to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse Format Blob\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a,o,s,u,c,l,d,f;return Object(n.__generator)(this,function(n){switch(n.label){case 0:t=[],i=0,a=r.data,n.label=1;case 1:return i<a.length?\"cif\"!==(o=a[i]).kind?[3,3]:(s=o.data.blocks[0],[4,Object(Oe.b)(s).runInContext(e)]):[3,4];case 2:if(0===(u=n.sent()).length)throw new Error(\"No models found.\");for(c=0,l=u;c<l.length;c++)d=l[c],t.push(d);n.label=3;case 3:return i++,[3,1];case 4:return f={label:\"Trajectory\",description:t.length+\" model\"+(1===t.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(t,f)];}});});});}}),Rt=Ke.b.BuiltIn({name:\"trajectory-from-mmcif\",display:{name:\"Trajectory from mmCIF\",description:\"Identify and create all separate models in the specified CIF data block\"},from:Ke.a.Format.Cif,to:Ke.a.Molecule.Trajectory,params:function params(e){if(!e)return{blockHeader:U.ParamDefinition.Optional(U.ParamDefinition.Text(void 0,{description:\"Header of the block to parse. If none is specifed, the 1st data block in the file is used.\"}))};var t=e.data.blocks;return{blockHeader:U.ParamDefinition.Optional(U.ParamDefinition.Select(t[0]&&t[0].header,t.map(function(e){return[e.header,e.header];}),{description:\"Header of the block to parse\"}))};}})({isApplicable:function isApplicable(e){return e.data.blocks.length>0;},apply:function apply(e){var t=this,r=e.a,i=e.params;return a.b.create(\"Parse mmCIF\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(t=i.blockHeader||r.data.blocks[0].header,!(a=r.data.blocks.find(function(e){return e.header===t;})))throw new Error(\"Data block '\"+[t]+\"' not found.\");return[4,Object(Oe.b)(a).runInContext(e)];case 1:if(0===(o=n.sent()).length)throw new Error(\"No models found.\");return s={label:\"\"+o[0].entry,description:o.length+\" model\"+(1===o.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(o,s)];}});});});}}),Lt=Ke.b.BuiltIn({name:\"trajectory-from-pdb\",display:{name:\"Parse PDB\",description:\"Parse PDB string and create trajectory.\"},from:[Ke.a.Data.String],to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse PDB\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,k(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,Le(t.result).runInContext(e)];case 2:return i=n.sent(),a={label:\"\"+i[0].entry,description:i.length+\" model\"+(1===i.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(i,a)];}});});});}}),Nt=Ke.b.BuiltIn({name:\"trajectory-from-gro\",display:{name:\"Parse GRO\",description:\"Parse GRO string and create trajectory.\"},from:[Ke.a.Data.String],to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse GRO\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,M(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,Se(t.result).runInContext(e)];case 2:return i=n.sent(),a={label:\"\"+i[0].entry,description:i.length+\" model\"+(1===i.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(i,a)];}});});});}}),Ft=Ke.b.BuiltIn({name:\"trajectory-from-mol\",display:{name:\"Parse MOL\",description:\"Parse MOL string and create trajectory.\"},from:[Ke.a.Data.String],to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse MOL\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,tt(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,it(t.result).runInContext(e)];case 2:return i=n.sent(),a={label:\"\"+i[0].entry,description:i.length+\" model\"+(1===i.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(i,a)];}});});});}}),Ut=Ke.b.BuiltIn({name:\"trajectory-from-mol2\",display:{name:\"Parse MOL2\",description:\"Parse MOL2 string and create trajectory.\"},from:[Ke.a.Data.String],to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse MOL2\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,xt(r.data,r.label).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,Ct(t.result).runInContext(e)];case 2:return i=n.sent(),a={label:\"\"+i[0].entry,description:i.length+\" model\"+(1===i.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(i,a)];}});});});}}),zt=Ke.b.BuiltIn({name:\"trajectory-from-cube\",display:{name:\"Parse Cube\",description:\"Parse Cube file to create a trajectory.\"},from:Ke.a.Format.Cube,to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse MOL\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,ft(r.data).runInContext(e)];case 1:return t=n.sent(),i={label:\"\"+t[0].entry,description:t.length+\" model\"+(1===t.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(t,i)];}});});});}}),Ht=Ke.b.BuiltIn({name:\"trajectory-from-cif-core\",display:{name:\"Parse CIF Core\",description:\"Identify and create all separate models in the specified CIF data block\"},from:Ke.a.Format.Cif,to:Ke.a.Molecule.Trajectory,params:function params(e){if(!e)return{blockHeader:U.ParamDefinition.Optional(U.ParamDefinition.Text(void 0,{description:\"Header of the block to parse. If none is specifed, the 1st data block in the file is used.\"}))};var t=e.data.blocks;return{blockHeader:U.ParamDefinition.Optional(U.ParamDefinition.Select(t[0]&&t[0].header,t.map(function(e){return[e.header,e.header];}),{description:\"Header of the block to parse\"}))};}})({apply:function apply(e){var t=this,r=e.a,i=e.params;return a.b.create(\"Parse CIF Core\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,o,s,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(t=i.blockHeader||r.data.blocks[0].header,!(o=r.data.blocks.find(function(e){return e.header===t;})))throw new Error(\"Data block '\"+[t]+\"' not found.\");return[4,(c=o,l=at.fromFrame(c),a.b.create(\"Parse CIF Core\",function(e){return dt(l.data.db,l,e);})).runInContext(e)];case 1:if(0===(s=n.sent()).length)throw new Error(\"No models found.\");return u={label:\"\"+s[0].entry,description:s.length+\" model\"+(1===s.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(s,u)];}var c,l;});});});}}),Gt=Ke.b.BuiltIn({name:\"trajectory-from-3dg\",display:{name:\"Parse 3DG\",description:\"Parse 3DG string and create trajectory.\"},from:[Ke.a.Data.String],to:Ke.a.Molecule.Trajectory})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Parse 3DG\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,x(r.data).runInContext(e)];case 1:if((t=n.sent()).isError)throw new Error(t.message);return[4,ie(t.result).runInContext(e)];case 2:return i=n.sent(),a={label:\"\"+i[0].entry,description:i.length+\" model\"+(1===i.length?\"\":\"s\")},[2,new Ke.a.Molecule.Trajectory(i,a)];}});});});}}),qt=function qt(e){return e+1;},Wt=function Wt(e){return e-1;},Qt=Ke.b.BuiltIn({name:\"model-from-trajectory\",display:{name:\"Molecular Model\",description:\"Create a molecular model from specified index in a trajectory.\"},from:Ke.a.Molecule.Trajectory,to:Ke.a.Molecule.Model,params:function params(e){return e?{modelIndex:U.ParamDefinition.Converted(qt,Wt,U.ParamDefinition.Numeric(1,{min:1,max:e.data.length,step:1},{description:\"Model Index\"}))}:{modelIndex:U.ParamDefinition.Numeric(0,{},{description:\"Zero-based index of the model\"})};}})({isApplicable:function isApplicable(e){return e.data.length>0;},apply:function apply(e){var t=e.a,r=e.params,n=r.modelIndex%t.data.length;n<0&&(n+=t.data.length);var i=t.data[r.modelIndex],a=\"Model \"+i.modelNum,o=1===t.data.length?void 0:\"of \"+t.data.length;return new Ke.a.Molecule.Model(i,{label:a,description:o});},dispose:function dispose(e){var t=e.b;null==t||t.data.customProperties.dispose();}}),Yt=Ke.b.BuiltIn({name:\"structure-from-trajectory\",display:{name:\"Structure from Trajectory\",description:\"Create a molecular structure from a trajectory.\"},from:Ke.a.Molecule.Trajectory,to:Ke.a.Molecule.Structure})({apply:function apply(e){var t=this,r=e.a;return a.b.create(\"Build Structure\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var e,t;return Object(n.__generator)(this,function(n){return e=He.Structure.ofTrajectory(r.data),t={label:\"Ensemble\",description:He.Structure.elementDescription(e)},[2,new Ke.a.Molecule.Structure(e,t)];});});});},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),Xt=Ke.b.BuiltIn({name:\"structure-from-model\",display:{name:\"Structure\",description:\"Create a molecular structure (model, assembly, or symmetry) from the specified model.\"},from:Ke.a.Molecule.Model,to:Ke.a.Molecule.Structure,params:function params(e){return Ye.a.getParams(e&&e.data);}})({canAutoUpdate:function canAutoUpdate(e){var t=e.oldParams,r=e.newParams;return Ye.a.canAutoUpdate(t.type,r.type);},apply:function apply(e,t){var r=this,i=e.a,o=e.params;return a.b.create(\"Build Structure\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(r){return[2,Ye.a.create(t,e,i.data,o&&o.type)];});});});},update:function update(e){var t=e.a,r=e.b,n=e.oldParams,i=e.newParams;return r.data.models.includes(t.data)&&Object(Qe.h)(n,i)?We.StateTransformer.UpdateResult.Unchanged:We.StateTransformer.UpdateResult.Recreate;},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),Kt=Object(w.Vec3)(),Zt=Object(w.Mat4)(),Jt=Object(w.Mat4)(),$t=Ke.b.BuiltIn({name:\"transform-structure-conformation\",display:{name:\"Transform Conformation\"},isDecorator:!0,from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:{transform:U.ParamDefinition.MappedStatic(\"components\",{components:U.ParamDefinition.Group({axis:U.ParamDefinition.Vec3(w.Vec3.create(1,0,0)),angle:U.ParamDefinition.Numeric(0,{min:-180,max:180,step:.1}),translation:U.ParamDefinition.Vec3(w.Vec3.create(0,0,0))},{isFlat:!0}),matrix:U.ParamDefinition.Group({data:U.ParamDefinition.Mat4(w.Mat4.identity()),transpose:U.ParamDefinition.Boolean(!1)},{isFlat:!0})},{label:\"Kind\"})}})({canAutoUpdate:function canAutoUpdate(e){return\"matrix\"!==e.newParams.transform.name;},apply:function apply(e){var t=e.a,r=e.params,n=Object(w.Mat4)();if(\"components\"===r.transform.name){var i=r.transform.params,a=i.axis,o=i.angle,s=i.translation,u=t.data.boundary.sphere.center;w.Mat4.fromTranslation(Zt,w.Vec3.negate(Kt,u)),w.Mat4.fromTranslation(Jt,w.Vec3.add(Kt,u,s));var c=w.Mat4.fromRotation(Object(w.Mat4)(),Math.PI/180*o,w.Vec3.normalize(Object(w.Vec3)(),a));w.Mat4.mul3(n,Jt,c,Zt);}else\"matrix\"===r.transform.name&&(w.Mat4.copy(n,r.transform.params.data),r.transform.params.transpose&&w.Mat4.transpose(n,n));var l=He.Structure.transform(t.data,n);return new Ke.a.Molecule.Structure(l,{label:t.label,description:t.description+\" [Transformed]\"});},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),er=Ke.b.BuiltIn({name:\"structure-selection-from-expression\",display:{name:\"Selection\",description:\"Create a molecular structure from the specified expression.\"},from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:{expression:U.ParamDefinition.Value(Ge.MolScriptBuilder.struct.generator.all,{isHidden:!0}),label:U.ParamDefinition.Optional(U.ParamDefinition.Text(\"\",{isHidden:!0}))}})({apply:function apply(e){var t=e.a,r=e.params,n=e.cache,i=ze.createAndRun(t.data,r.expression),a=i.selection,o=i.entry;if(n.entry=o,He.StructureSelection.isEmpty(a))return We.StateObject.Null;var s=He.StructureSelection.unionStructure(a),u={label:\"\"+(r.label||\"Selection\"),description:He.Structure.elementDescription(s)};return new Ke.a.Molecule.Structure(s,u);},update:function update(e){var t=e.a,r=e.b,n=e.oldParams,i=e.newParams,a=e.cache;if(n.expression!==i.expression)return We.StateTransformer.UpdateResult.Recreate;var o=a.entry;if(o.currentStructure===t.data)return We.StateTransformer.UpdateResult.Unchanged;var s=ze.updateStructure(o,t.data);return He.StructureSelection.isEmpty(s)?We.StateTransformer.UpdateResult.Null:(ze.updateStructureObject(r,s,i.label),We.StateTransformer.UpdateResult.Updated);},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),tr=Ke.b.BuiltIn({name:\"structure-multi-selection-from-expression\",display:{name:\"Multi-structure Measurement Selection\",description:\"Create selection object from multiple structures.\"},from:Ke.a.Root,to:Ke.a.Molecule.Structure.Selections,params:{selections:U.ParamDefinition.ObjectList({key:U.ParamDefinition.Text(void 0,{description:\"A unique key.\"}),ref:U.ParamDefinition.Text(),groupId:U.ParamDefinition.Optional(U.ParamDefinition.Text()),expression:U.ParamDefinition.Value(Ge.MolScriptBuilder.struct.generator.empty)},function(e){return e.ref;},{isHidden:!0}),isTransitive:U.ParamDefinition.Optional(U.ParamDefinition.Boolean(!1,{isHidden:!0,description:\"Remap the selections from the original structure if structurally equivalent.\"})),label:U.ParamDefinition.Optional(U.ParamDefinition.Text(\"\",{isHidden:!0}))}})({apply:function apply(e){for(var t=e.params,r=e.cache,n=e.dependencies,i=new Map(),a=[],o=0,s=0,u=t.selections;s<u.length;s++){var c=u[s],l=ze.createAndRun(n[c.ref].data,c.expression),d=l.selection,f=l.entry;i.set(c.key,f);var p=He.StructureSelection.toLociWithSourceUnits(d);a.push({key:c.key,loci:p,groupId:c.groupId}),o+=He.StructureElement.Loci.size(p);}r.entries=i;var m={label:\"\"+(t.label||\"Multi-selection\"),description:t.selections.length+\" source(s), \"+o+\" element(s) total\"};return new Ke.a.Molecule.Structure.Selections(a,m);},update:function update(e){var t=e.b,r=e.oldParams,n=e.newParams,i=e.cache,a=e.dependencies;if(!!r.isTransitive!=!!n.isTransitive)return We.StateTransformer.UpdateResult.Recreate;for(var o=i.entries,s=new Map(),u=new Map(),c=0,l=t.data;c<l.length;c++){var d=l[c];u.set(d.key,d);}for(var f=!1,p=0,m=[],h=0,g=n.selections;h<g.length;h++){var v=g[h],b=a[v.ref].data,y=!1;if(o.has(v.key)){var _=o.get(v.key);if(ze.isUnchanged(_,v.expression,b)&&u.has(v.key)){(x=u.get(v.key)).groupId!==v.groupId&&(x.groupId=v.groupId,f=!0),s.set(v.key,_),m.push(x),p+=He.StructureElement.Loci.size(x.loci);continue;}if(_.expression!==v.expression)y=!0;else{var S=!1;if(n.isTransitive){if(He.Structure.areUnitAndIndicesEqual(_.originalStructure,b)){var O=ze.run(_,_.originalStructure);_.currentStructure=b,s.set(v.key,_);var x=He.StructureElement.Loci.remap(He.StructureSelection.toLociWithSourceUnits(O),b);m.push({key:v.key,loci:x,groupId:v.groupId}),p+=He.StructureElement.Loci.size(x),f=!0;}else S=!0;}else S=!0;if(S){f=!0;O=ze.updateStructure(_,b);s.set(v.key,_);x=He.StructureSelection.toLociWithSourceUnits(O);m.push({key:v.key,loci:x,groupId:v.groupId}),p+=He.StructureElement.Loci.size(x);}}}else y=!0;if(y){f=!0;var C=ze.createAndRun(b,v.expression);O=C.selection,_=C.entry;s.set(v.key,_);x=He.StructureSelection.toLociWithSourceUnits(O);m.push({key:v.key,loci:x}),p+=He.StructureElement.Loci.size(x);}}return f?(i.entries=s,t.data=m,t.label=\"\"+(n.label||\"Multi-selection\"),t.description=m.length+\" source(s), \"+p+\" element(s) total\",We.StateTransformer.UpdateResult.Updated):We.StateTransformer.UpdateResult.Unchanged;}}),rr=Ke.b.BuiltIn({name:\"structure-selection-from-script\",display:{name:\"Selection\",description:\"Create a molecular structure from the specified script.\"},from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:{script:U.ParamDefinition.Script({language:\"mol-script\",expression:\"(sel.atom.atom-groups :residue-test (= atom.resname ALA))\"}),label:U.ParamDefinition.Optional(U.ParamDefinition.Text(\"\"))}})({apply:function apply(e){var t=e.a,r=e.params,n=e.cache,i=ze.createAndRun(t.data,r.script),a=i.selection,o=i.entry;n.entry=o;var s=He.StructureSelection.unionStructure(a),u={label:\"\"+(r.label||\"Selection\"),description:He.Structure.elementDescription(s)};return new Ke.a.Molecule.Structure(s,u);},update:function update(e){var t=e.a,r=e.b,n=e.oldParams,i=e.newParams,a=e.cache;if(!qe.Script.areEqual(n.script,i.script))return We.StateTransformer.UpdateResult.Recreate;var o=a.entry;if(o.currentStructure===t.data)return We.StateTransformer.UpdateResult.Unchanged;var s=ze.updateStructure(o,t.data);return ze.updateStructureObject(r,s,i.label),We.StateTransformer.UpdateResult.Updated;},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),nr=Ke.b.BuiltIn({name:\"structure-selection-from-bundle\",display:{name:\"Selection\",description:\"Create a molecular structure from the specified structure-element bundle.\"},from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:{bundle:U.ParamDefinition.Value(He.StructureElement.Bundle.Empty,{isHidden:!0}),label:U.ParamDefinition.Optional(U.ParamDefinition.Text(\"\",{isHidden:!0}))}})({apply:function apply(e){var t=e.a,r=e.params,n=e.cache;if(r.bundle.hash!==t.data.hashCode)return We.StateObject.Null;n.source=t.data;var i=He.StructureElement.Bundle.toStructure(r.bundle,t.data);if(0===i.elementCount)return We.StateObject.Null;var a={label:\"\"+(r.label||\"Selection\"),description:He.Structure.elementDescription(i)};return new Ke.a.Molecule.Structure(i,a);},update:function update(e){var t=e.a,r=e.b,n=e.oldParams,i=e.newParams,a=e.cache;if(!He.StructureElement.Bundle.areEqual(n.bundle,i.bundle))return We.StateTransformer.UpdateResult.Recreate;if(i.bundle.hash!==t.data.hashCode)return We.StateTransformer.UpdateResult.Null;if(a.source===t.data)return We.StateTransformer.UpdateResult.Unchanged;a.source=t.data;var o=He.StructureElement.Bundle.toStructure(i.bundle,t.data);return 0===o.elementCount?We.StateTransformer.UpdateResult.Null:(r.label=\"\"+(i.label||\"Selection\"),r.description=He.Structure.elementDescription(o),r.data=o,We.StateTransformer.UpdateResult.Updated);},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),ir={polymer:\"polymer\",protein:\"protein\",nucleic:\"nucleic\",water:\"water\",branched:\"branched\",ligand:\"ligand\",\"non-standard\":\"non-standard\",coarse:\"coarse\",\"atomic-sequence\":\"atomic-sequence\",\"atomic-het\":\"atomic-het\",spheres:\"spheres\"},ar=U.ParamDefinition.objectToOptions(ir),or=Ke.b.BuiltIn({name:\"structure-complex-element\",display:{name:\"Complex Element\",description:\"Create a molecular structure from the specified model.\"},from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:{type:U.ParamDefinition.Select(\"atomic-sequence\",ar,{isHidden:!0})}})({apply:function apply(e){var t,r,n=e.a,i=e.params;switch(i.type){case\"polymer\":t=Ze.b.polymer.query,r=\"Polymer\";break;case\"protein\":t=Ze.b.protein.query,r=\"Protein\";break;case\"nucleic\":t=Ze.b.nucleic.query,r=\"Nucleic\";break;case\"water\":t=He.Queries.internal.water(),r=\"Water\";break;case\"branched\":t=Ze.b.branchedPlusConnected.query,r=\"Branched\";break;case\"ligand\":t=Ze.b.ligandPlusConnected.query,r=\"Ligand\";break;case\"non-standard\":t=Ze.b.nonStandardPolymer.query,r=\"Non-standard\";break;case\"coarse\":t=Ze.b.coarse.query,r=\"Coarse\";break;case\"atomic-sequence\":t=He.Queries.internal.atomicSequence(),r=\"Sequence\";break;case\"atomic-het\":t=He.Queries.internal.atomicHet(),r=\"HET Groups/Ligands\";break;case\"spheres\":t=He.Queries.internal.spheres(),r=\"Coarse Spheres\";break;default:throw new Error(i.type+\" is a not valid complex element.\");}var a=t(new He.QueryContext(n.data)),o=He.StructureSelection.unionStructure(a);return 0===o.elementCount?We.StateObject.Null:new Ke.a.Molecule.Structure(o,{label:r,description:He.Structure.elementDescription(o)});},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),sr=Ke.b.BuiltIn({name:\"structure-component\",display:{name:\"Component\",description:\"A molecular structure component.\"},from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:Je})({apply:function apply(e){var t=e.a,r=e.params,n=e.cache;return function(e,t,r){r.source=e;var n=He.Structure.Empty,i=void 0;switch(t.type.name){case\"static\":var a=void 0;switch(t.type.params){case\"all\":a=Ze.b.all.query,i=\"All\";break;case\"polymer\":a=Ze.b.polymer.query,i=\"Polymer\";break;case\"protein\":a=Ze.b.protein.query,i=\"Protein\";break;case\"nucleic\":a=Ze.b.nucleic.query,i=\"Nucleic\";break;case\"water\":a=He.Queries.internal.water(),i=\"Water\";break;case\"ion\":a=Ze.b.ion.query,i=\"Ion\";break;case\"lipid\":a=Ze.b.lipid.query,i=\"Lipid\";break;case\"branched\":a=Ze.b.branchedPlusConnected.query,i=\"Branched\";break;case\"ligand\":a=Ze.b.ligandPlusConnected.query,i=\"Ligand\";break;case\"non-standard\":a=Ze.b.nonStandardPolymer.query,i=\"Non-standard\";break;case\"coarse\":a=Ze.b.coarse.query,i=\"Coarse\";break;default:throw new Error(t.type+\" is a not valid complex element.\");}var o=a(new He.QueryContext(e));n=He.StructureSelection.unionStructure(o);break;case\"script\":case\"expression\":var s=ze.createAndRun(e,t.type.params),u=s.selection,c=s.entry;r.entry=c,n=He.StructureSelection.unionStructure(u);break;case\"bundle\":if(t.type.params.hash!==e.hashCode)break;n=He.StructureElement.Bundle.toStructure(t.type.params,e);}if(t.nullIfEmpty&&0===n.elementCount)return We.StateObject.Null;var l={label:\"\"+(t.label||i||\"Component\"),description:He.Structure.elementDescription(n)};return new Ke.a.Molecule.Structure(n,l);}(t.data,r,n);},update:function update(e){var t=e.a,r=e.b,n=e.oldParams,i=e.newParams,a=e.cache;return function(e,t,r,n,i){if(r.type.name!==n.type.name)return We.StateTransformer.UpdateResult.Recreate;var a=!1;switch(n.type.name){case\"static\":if(e!==i.source||r.type.params!==n.type.params)return We.StateTransformer.UpdateResult.Recreate;break;case\"script\":if(!qe.Script.areEqual(r.type.params,n.type.params))return We.StateTransformer.UpdateResult.Recreate;case\"expression\":if(r.type.params!==n.type.params)return We.StateTransformer.UpdateResult.Recreate;if(e===i.source)break;var o=i.entry,s=ze.updateStructure(o,e);i.source=e,t.data=He.StructureSelection.unionStructure(s),ze.updateStructureObject(t,s,n.label),a=!0;break;case\"bundle\":if(e===i.source&&He.StructureElement.Bundle.areEqual(r.type.params,n.type.params))break;i.source=e,n.type.params.hash!==e.hashCode?(a=0!==t.data.elementCount,t.data=0===t.data.elementCount?t.data:He.Structure.Empty):(a=!0,t.data=He.StructureElement.Bundle.toStructure(n.type.params,e));}if(a){if(n.nullIfEmpty&&0===t.data.elementCount)return We.StateTransformer.UpdateResult.Null;t.description=He.Structure.elementDescription(t.data);}return r.label!==n.label&&(a=!0,t.label=\"\"+(n.label||t.label)),a?We.StateTransformer.UpdateResult.Updated:We.StateTransformer.UpdateResult.Unchanged;}(t.data,r,n,i,a);},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}}),ur=Ke.b.BuiltIn({name:\"custom-model-properties\",display:{name:\"Custom Model Properties\"},isDecorator:!0,from:Ke.a.Molecule.Model,to:Ke.a.Molecule.Model,params:function params(e,t){return t.customModelProperties.getParams(null==e?void 0:e.data);}})({apply:function apply(e,t){var r=this,i=e.a,o=e.params;return a.b.create(\"Custom Props\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,cr(i.data,t,e,o)];case 1:return r.sent(),[2,new Ke.a.Molecule.Model(i.data,{label:i.label,description:i.description})];}});});});},update:function update(e,t){var r=this,i=e.a,o=e.b,s=e.oldParams,u=e.newParams;return a.b.create(\"Custom Props\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,c,l;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(o.data=i.data,o.label=i.label,o.description=i.description,r=0,a=s.autoAttach;r<a.length;r++)c=a[r],(l=t.customModelProperties.get(c))&&i.data.customProperties.reference(l.descriptor,!1);return[4,cr(i.data,t,e,u)];case 1:return n.sent(),[2,We.StateTransformer.UpdateResult.Updated];}});});});},dispose:function dispose(e){var t=e.b;null==t||t.data.customProperties.dispose();}});function cr(e,t,r,i){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,o,s,u,c,l,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:a={runtime:r,assetManager:t.managers.asset},o=i.autoAttach,s=i.properties,u=0,c=Object.keys(s),n.label=1;case 1:if(!(u<c.length))return[3,8];if(l=c[u],d=t.customModelProperties.get(l),f=s[l],!o.includes(l)&&!d.isHidden)return[3,6];n.label=2;case 2:return n.trys.push([2,4,,5]),[4,d.attach(a,e,f,!0)];case 3:return n.sent(),[3,5];case 4:return p=n.sent(),t.log.warn(\"Error attaching model prop '\"+l+\"': \"+p),[3,5];case 5:return[3,7];case 6:d.set(e,f),n.label=7;case 7:return u++,[3,1];case 8:return[2];}});});}var lr=Ke.b.BuiltIn({name:\"custom-structure-properties\",display:{name:\"Custom Structure Properties\"},isDecorator:!0,from:Ke.a.Molecule.Structure,to:Ke.a.Molecule.Structure,params:function params(e,t){return t.customStructureProperties.getParams(null==e?void 0:e.data.root);}})({apply:function apply(e,t){var r=this,i=e.a,o=e.params;return a.b.create(\"Custom Props\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){return Object(n.__generator)(this,function(r){switch(r.label){case 0:return[4,dr(i.data.root,t,e,o)];case 1:return r.sent(),[2,new Ke.a.Molecule.Structure(i.data,{label:i.label,description:i.description})];}});});});},update:function update(e,t){var r=this,i=e.a,o=e.b,s=e.oldParams,u=e.newParams;return a.b.create(\"Custom Props\",function(e){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,a,c,l;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(o.data=i.data,o.label=i.label,o.description=i.description,r=0,a=s.autoAttach;r<a.length;r++)c=a[r],(l=t.customStructureProperties.get(c))&&i.data.customPropertyDescriptors.reference(l.descriptor,!1);return[4,dr(i.data.root,t,e,u)];case 1:return n.sent(),[2,We.StateTransformer.UpdateResult.Updated];}});});});},dispose:function dispose(e){var t=e.b;null==t||t.data.customPropertyDescriptors.dispose();}});function dr(e,t,r,i){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,o,s,u,c,l,d,f,p;return Object(n.__generator)(this,function(n){switch(n.label){case 0:a={runtime:r,assetManager:t.managers.asset},o=i.autoAttach,s=i.properties,u=0,c=Object.keys(s),n.label=1;case 1:if(!(u<c.length))return[3,8];if(l=c[u],d=t.customStructureProperties.get(l),f=s[l],!o.includes(l)&&!d.isHidden)return[3,6];n.label=2;case 2:return n.trys.push([2,4,,5]),[4,d.attach(a,e,f,!0)];case 3:return n.sent(),[3,5];case 4:return p=n.sent(),t.log.warn(\"Error attaching structure prop '\"+l+\"': \"+p),[3,5];case 5:return[3,7];case 6:d.set(e,f),n.label=7;case 7:return u++,[3,1];case 8:return[2];}});});}var fr=Ke.b.BuiltIn({name:\"shape-from-ply\",display:{name:\"Shape from PLY\",description:\"Create Shape from PLY data\"},from:Ke.a.Format.Ply,to:Ke.a.Shape.Provider,params:function params(e){return{};}})({apply:function apply(e){var t=this,r=e.a;e.params;return a.b.create(\"Create shape from PLY\",function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,J(r.data).runInContext(e)];case 1:return t=n.sent(),i={label:\"Shape\"},[2,new Ke.a.Shape.Provider(t,i)];}});});});}});},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return N;}),r.d(t,\"a\",function(){return z;}),r.d(t,\"c\",function(){return G;});var n=r(0);function i(e,t){return e[t]|e[t+1]<<8;}function a(e,t,r){e[t]=255&r,e[t+1]=r>>8&255;}function o(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t]);}function s(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255;}function u(e,t,r){for(var n,i,a=\"\",o=0;o<r;o++)a+=\"%\"+((i=e[t+o].toString(16)).length<2?\"0\"+i:i);try{n=decodeURIComponent(a);}catch(n){return function(e,t,r){for(var n=\"\",i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n;}(e,t,r);}return n;}function c(e){for(var t=e.length,r=0,n=0;n<t;n++){var i=e.charCodeAt(n);if(0==(4294967168&i))r++;else if(0==(4294965248&i))r+=2;else if(0==(4294901760&i))r+=3;else{if(0!=(4292870144&i))throw\"e\";r+=4;}}return r;}var l=function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var r=t,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r;}return e;}();function d(e,t,r){return 4294967295^function(e,t,r,n){for(var i=0;i<n;i++)e=l[255&(e^t[r+i])]^e>>>8;return e;}(4294967295,e,t,r);}var f,p,m=(f=Uint16Array,p=Uint32Array,{next_code:new f(16),bl_count:new f(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new f(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new p(32),flmap:new f(512),fltree:[],fdmap:new f(32),fdtree:[],lmap:new f(32768),ltree:[],ttree:[],dmap:new f(32768),dtree:[],imap:new f(512),itree:[],rev15:new f(32768),lhst:new p(286),dhst:new p(30),ihst:new p(19),lits:new p(15e3),strt:new f(65536),prev:new f(32768)});function h(e,t,r){for(var n=e.length,i=m.rev15,a=0;a<n;a+=2)if(0!==e[a+1])for(var o=a>>1,s=e[a+1],u=o<<4|s,c=t-s,l=e[a]<<c,d=l+(1<<c);l!==d;){r[i[l]>>>15-t]=u,l++;}}function g(e,t){for(var r=e.length,n=m.bl_count,i=0;i<=t;i++)n[i]=0;for(i=1;i<r;i+=2)n[e[i]]++;var a=m.next_code,o=0;n[0]=0;for(var s=1;s<=t;s++)o=o+n[s-1]<<1,a[s]=o;for(var u=0;u<r;u+=2){var c=e[u+1];0!==c&&(e[u]=a[c],a[c]++);}}function v(e,t){for(var r=m.rev15,n=15-t,i=0;i<e.length;i+=2){var a=e[i]<<t-e[i+1];e[i]=r[a]>>>n;}}function b(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(3===t[0]&&0===t[1])return[2,r||new Uint8Array(0)];i=function(e,t){var r=void 0===t;return void 0===t&&(t=new Uint8Array(e.length>>>2<<3)),{data:e,buf:t,noBuf:r,BFINAL:0,off:0,pos:0};}(t,r),n.label=1;case 1:return 0!==i.BFINAL?[3,4]:e.shouldUpdate?[4,e.update({message:\"Inflating blocks...\",current:i.pos,max:t.length})]:[3,3];case 2:n.sent(),n.label=3;case 3:return function(e,t){for(var r=e.data,n=e.noBuf,i=e.buf,a=e.BFINAL,o=e.off,s=e.pos,u=0;0===a&&u<t;){var c=void 0,l=void 0,d=0,f=0;a=x(r,s,1),u+=1;var p=x(r,s+1,2);if(s+=3,0!==p){if(n&&(i=y(i,o+(1<<17))),1===p)c=m.flmap,l=m.fdmap,d=511,f=31;else{if(2!==p)throw new Error(\"unknown BTYPE \"+p);var v=O(r,s,5)+257,b=O(r,s+5,5)+1,w=O(r,s+10,4)+4;s+=14;for(var P=0;P<38;P+=2)m.itree[P]=0,m.itree[P+1]=0;var j=1;for(P=0;P<w;P++){var E=O(r,s+3*P,3);m.itree[1+(m.ordr[P]<<1)]=E,E>j&&(j=E);}s+=3*w,g(m.itree,j),h(m.itree,j,m.imap),c=m.lmap,l=m.dmap,s=_(m.imap,(1<<j)-1,v+b,r,s,m.ttree);var A=S(m.ttree,0,v,m.ltree);d=(1<<A)-1;var T=S(m.ttree,v,b,m.dtree);f=(1<<T)-1,g(m.ltree,A),h(m.ltree,A,c),g(m.dtree,T),h(m.dtree,T,l);}for(;;){var D=c[C(r,s)&d];s+=15&D;var I=D>>>4;if(I>>>8==0)i[o++]=I;else{if(256===I)break;var M=o+I-254;if(I>264){var k=m.ldef[I-257];M=o+(k>>>3)+O(r,s,7&k),s+=7&k;}var B=l[C(r,s)&f];s+=15&B;var V=B>>>4,R=m.ddef[V],L=(R>>>4)+x(r,s,15&R);for(s+=15&R,n&&(i=y(i,o+(1<<17)));o<M;)i[o]=i[o++-L],i[o]=i[o++-L],i[o]=i[o++-L],i[o]=i[o++-L];o=M;}}}else{0!=(7&s)&&(s+=8-(7&s));var N=4+(s>>>3),F=r[N-4]|r[N-3]<<8;n&&(i=y(i,o+F)),i.set(new Uint8Array(r.buffer,r.byteOffset+N,F),o),s=N+F<<3,o+=F;}}e.buf=i,e.BFINAL=a,e.off=o,e.pos=s;}(i,100),[3,1];case 4:return[2,i.buf.length===i.off?i.buf:i.buf.slice(0,i.off)];}});});}function y(e,t){var r=e.length;if(t<=r)return e;var n=new Uint8Array(Math.max(r<<1,t));return n.set(e,0),n;}function _(e,t,r,n,i,a){for(var o=0;o<r;){var s=e[C(n,i)&t];i+=15&s;var u=s>>>4;if(u<=15)a[o]=u,o++;else{var c=0,l=0;16===u?(l=3+O(n,i,2),i+=2,c=a[o-1]):17===u?(l=3+O(n,i,3),i+=3):18===u&&(l=11+O(n,i,7),i+=7);for(var d=o+l;o<d;)a[o]=c,o++;}}return i;}function S(e,t,r,n){for(var i=0,a=0,o=n.length>>>1;a<r;){var s=e[a+t];n[a<<1]=0,n[1+(a<<1)]=s,s>i&&(i=s),a++;}for(;a<o;)n[a<<1]=0,n[1+(a<<1)]=0,a++;return i;}function O(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1;}function x(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1;}function C(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t);}function w(e,t,r){for(var n=[],i=e.length,a=t.length,o=0;o<a;o+=2)t[o]=0,t[o+1]=0;for(o=0;o<i;o++)0!==e[o]&&n.push({lit:o,f:e[o],d:void 0});var s=n.length,u=n.slice(0);if(0===s)return 0;if(1===s){var c=n[0].lit,l=0===c?1:0;return t[1+(c<<1)]=1,t[1+(l<<1)]=1,1;}n.sort(function(e,t){return e.f-t.f;});var d=n[0],f=n[1],p=0,m=1,h=2;for(n[0]={lit:-1,f:d.f+f.f,l:d,r:f,d:0};m!==s-1;)d=p!==m&&(h===s||n[p].f<n[h].f)?n[p++]:n[h++],f=p!==m&&(h===s||n[p].f<n[h].f)?n[p++]:n[h++],n[m++]={lit:-1,f:d.f+f.f,l:d,r:f,d:void 0};var g=function e(t,r){if(-1!==t.lit)return t.d=r,r;return Math.max(e(t.l,r+1),e(t.r,r+1));}(n[m-1],0);g>r&&(!function(e,t,r){var n=0,i=1<<r-t,a=0;for(e.sort(function(e,t){return t.d===e.d?e.f-t.f:t.d-e.d;}),n=0;n<e.length&&e[n].d>t;n++){var o=e[n].d;e[n].d=t,a+=i-(1<<r-o);}a>>>=r-t;for(;a>0;){(o=e[n].d)<t?(e[n].d++,a-=1<<t-o-1):n++;}for(;n>=0;n--)e[n].d===t&&a<0&&(e[n].d--,a++);0!==a&&console.log(\"debt left\");}(u,r,g),g=r);for(o=0;o<s;o++)t[1+(u[o].lit<<1)]=u[o].d;return g;}function P(e,t,r,n){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][n],a=0,o=r<<3,s=0,u=e.length;if(0===n){for(;a<u;){R(t,o,a+(S=Math.min(65535,u-a))===u?1:0),o=D(e,a,S,t,o+8),a+=S;}return o>>>3;}var c=m.lits,l=m.strt,d=m.prev,f=0,p=0,h=0,g=0,v=0,b=0;for(u>2&&(l[b=A(e,0)]=0),a=0;a<u;a++){if(v=b,a+1<u-2){b=A(e,a+1);var y=a+1&32767;d[y]=l[b],l[b]=y;}if(s<=a){(f>14e3||p>26697)&&u-a>100&&(s<a&&(c[f]=a-s,f+=2,s=a),o=T(a===u-1||s===u?1:0,c,f,g,e,h,a-h,t,o),f=p=g=0,h=a);var _=0;if(a<u-2&&(_=j(e,a,d,v,Math.min(i[2],u-a),i[3])),0!==_){var S,O=65535&_,x=B(S=_>>>16,m.of0);m.lhst[257+x]++;var C=B(O,m.df0);m.dhst[C]++,g+=m.exb[x]+m.dxb[C],c[f]=S<<23|a-s,c[f+1]=O<<16|x<<8|C,f+=2,s=a+S;}else m.lhst[e[a]]++;p++;}}for(h===a&&0!==e.length||(s<a&&(c[f]=a-s,f+=2,s=a),o=T(1,c,f,g,e,h,a-h,t,o),f=0,p=0,f=p=g=0,h=a);0!=(7&o);)o++;return o>>>3;}function j(e,t,r,n,i,a){var o=32767&t,s=r[o],u=o-s+32768&32767;if(s===o||n!==A(e,t-u))return 0;for(var c=0,l=0,d=Math.min(32767,t);u<=d&&0!=--a&&s!==o;){if(0===c||e[t+c]===e[t+c-u]){var f=E(e,t,u);if(f>c){if(l=u,(c=f)>=i)break;u+2<f&&(f=u+2);for(var p=0,m=0;m<f-2;m++){var h=t-u+m+32768&32767,g=h-r[h]+32768&32767;g>p&&(p=g,s=h);}}}u+=(o=s)-(s=r[o])+32768&32767;}return c<<16|l;}function E(e,t,r){if(e[t]!==e[t-r]||e[t+1]!==e[t+1-r]||e[t+2]!==e[t+2-r])return 0;var n=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]===e[t-r];)t++;return t-n;}function A(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535;}function T(e,t,r,n,i,a,o,s,u){m.lhst[256]++;var c=function(){for(var e=w(m.lhst,m.ltree,15),t=w(m.dhst,m.dtree,15),r=[],n=k(m.ltree,r),i=[],a=k(m.dtree,i),o=0;o<r.length;o+=2)m.ihst[r[o]]++;for(o=0;o<i.length;o+=2)m.ihst[i[o]]++;var s=w(m.ihst,m.itree,7),u=19;for(;u>4&&0===m.itree[1+(m.ordr[u-1]<<1)];)u--;return[e,t,s,n,a,u,r,i];}(),l=c[0],d=c[1],f=c[2],p=c[3],h=c[4],b=c[5],y=c[6],_=c[7],S=32+(0==(u+3&7)?0:8-(u+3&7))+(o<<3),O=n+I(m.fltree,m.lhst)+I(m.fdtree,m.dhst),x=n+I(m.ltree,m.lhst)+I(m.dtree,m.dhst);x+=14+3*b+I(m.itree,m.ihst)+(2*m.ihst[16]+3*m.ihst[17]+7*m.ihst[18]);for(var C=0;C<286;C++)m.lhst[C]=0;for(C=0;C<30;C++)m.dhst[C]=0;for(C=0;C<19;C++)m.ihst[C]=0;var P=S<O&&S<x?0:O<x?1:2;if(L(s,u,e),L(s,u+1,P),u+=3,0===P){for(;0!=(7&u);)u++;u=D(i,a,o,s,u);}else{var j=void 0,E=void 0;if(1===P)j=m.fltree,E=m.fdtree;else{if(2!==P)throw new Error(\"unknown BTYPE \"+P);g(m.ltree,l),v(m.ltree,l),g(m.dtree,d),v(m.dtree,d),g(m.itree,f),v(m.itree,f),j=m.ltree,E=m.dtree,R(s,u,p-257),R(s,u+=5,h-1),R(s,u+=5,b-4),u+=4;for(var A=0;A<b;A++)R(s,u+3*A,m.itree[1+(m.ordr[A]<<1)]);u+=3*b,u=M(y,m.itree,s,u),u=M(_,m.itree,s,u);}for(var T=a,B=0;B<r;B+=2){for(var N=t[B],F=N>>>23,U=T+(8388607&N);T<U;)u=V(i[T++],j,s,u);if(0!==F){var z=t[B+1],H=z>>16,G=z>>8&255,q=255&z;R(s,u=V(257+G,j,s,u),F-m.of0[G]),L(s,u=V(q,E,s,u+=m.exb[G]),H-m.df0[q]),u+=m.dxb[q],T+=F;}}u=V(256,j,s,u);}return u;}function D(e,t,r,n,i){var a=i>>>3;return n[a]=r,n[a+1]=r>>>8,n[a+2]=255-n[a],n[a+3]=255-n[a+1],a+=4,n.set(new Uint8Array(e.buffer,t,r),a),i+(r+4<<3);}function I(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[1+(n<<1)];return r;}function M(e,t,r,n){for(var i=0;i<e.length;i+=2){var a=e[i],o=e[i+1];n=V(a,t,r,n);var s=16===a?2:17===a?3:7;a>15&&(R(r,n,o),n+=s);}return n;}function k(e,t){for(var r=e.length;2!==r&&0===e[r-1];)r-=2;for(var n=0;n<r;n+=2){var i=e[n+1],a=n+3<r?e[n+3]:-1,o=n+5<r?e[n+5]:-1,s=0===n?-1:e[n-1];if(0===i&&a===i&&o===i){for(var u=n+5;u+2<r&&e[u+2]===i;)u+=2;(c=Math.min(u+1-n>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),n+=2*c-2;}else if(i===s&&a===i&&o===i){for(u=n+5;u+2<r&&e[u+2]===i;)u+=2;var c=Math.min(u+1-n>>>1,6);t.push(16,c-3),n+=2*c-2;}else t.push(i,0);}return r>>>1;}function B(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r;}function V(e,t,r,n){return L(r,n,t[e<<1]),n+t[1+(e<<1)];}function R(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8;}function L(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16;}function N(e,t,r){return void 0===r&&(r=!1),Object(n.__awaiter)(this,void 0,void 0,function(){var a,s,u,c,l,d,f,p,m,h,g,v,b;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(a=Object.create(null),s=new Uint8Array(t),u=s.length-4;101010256!==o(s,u);)u--;c=u,c+=4,l=i(s,c+=4),c+=2,c+=2,d=o(s,c+=4),c+=4,c=d,f=0,n.label=1;case 1:return f<l?(c+=4,c+=4,c+=4,c+=4,p=o(s,c+=4),m=o(s,c+=4),h=i(s,c+=4),g=i(s,c+2),v=i(s,c+4),c+=6,b=o(s,c+=8),c+=4,c+=h+g+v,[4,F(e,s,b,a,p,m,r)]):[3,4];case 2:n.sent(),n.label=3;case 3:return f++,[3,1];case 4:return[2,a];}});});}function F(e,t,r,a,o,s,c){return Object(n.__awaiter)(this,void 0,void 0,function(){var l,d,f,p,m,h;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return r+=4,r+=2,l=i(t,r+=2),r+=2,r+=4,r+=4,d=i(t,r+=8),f=i(t,r+=2),p=u(t,r+=2,d),r+=d,r+=f,c?(a[p]={size:s,csize:o},[2]):(m=new Uint8Array(t.buffer,r),0!==l?[3,1]:(a[p]=new Uint8Array(m.buffer.slice(r,r+o)),[3,4]));case 1:return 8!==l?[3,3]:(h=new Uint8Array(s),[4,U(e,m,h)]);case 2:return n.sent(),a[p]=h,[3,4];case 3:throw\"unknown compression method: \"+l;case 4:return[2];}});});}function U(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(n){return[2,b(e,t,r)];});});}function z(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,s,u,c,l,f,p,m,h;return Object(n.__generator)(this,function(n){switch(n.label){case 0:if(a=t[3],s=10,4&a&&(u=i(t,s),s+=u),8&a){for(c=s;0!==t[c];)++c;s=c+1;}if(16&a){for(c=s;0!==t[c];)++c;s=c+1;}return 1&a&&(s+=2),g=o(t,t.length-8),l=g>>0,f=o(t,t.length-4),void 0===r&&(r=new Uint8Array(f)),p=new Uint8Array(t.buffer,t.byteOffset+s,t.length-s-8),[4,U(e,p,r)];case 1:return m=n.sent(),h=d(m,0,m.length),l!==h&&console.error(\"ungzip: checksums don't match\"),[2,m];}var g;});});}function H(e,t){void 0===t&&(t={level:6});var r=new Uint8Array(50+Math.floor(1.1*e.length)),n=P(e,r,0,t.level);return new Uint8Array(r.buffer,0,n);}function G(e,t){void 0===t&&(t=!1);var r,n,i=0,o={};for(var u in e){var l=!(r=u,n=void 0,n=r.split(\".\").pop().toLowerCase(),-1!==\"png,jpg,jpeg,zip\".indexOf(n)||t),f=e[u],p=d(f,0,f.length);o[u]={cpr:l,usize:f.length,crc:p,file:l?H(f):f};}for(var u in o)i+=o[u].file.length+30+46+2*c(u);i+=22;var m=new Uint8Array(i),h=0,g=[];for(var u in o){var v=o[u];g.push(h),h=q(m,h,u,v,0);}var b=0,y=h;for(var u in o){v=o[u];g.push(h),h=q(m,h,u,v,1,g[b++]);}var _=h-y;return s(m,h,101010256),h+=4,a(m,h+=4,b),a(m,h+=2,b),s(m,h+=2,_),s(m,h+=4,y),h+=4,h+=2,m.buffer;}function q(e,t,r,n,i,o){void 0===o&&(o=0);var u=n.file;return s(e,t,0===i?67324752:33639248),t+=4,1===i&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,n.cpr?8:0),s(e,t+=2,0),s(e,t+=4,n.crc),s(e,t+=4,u.length),s(e,t+=4,n.usize),a(e,t+=4,c(r)),a(e,t+=2,0),t+=2,1===i&&(t+=2,t+=2,s(e,t+=6,o),t+=4),t+=function(e,t,r){for(var n=r.length,i=0,a=0;a<n;a++){var o=r.charCodeAt(a);if(0==(4294967168&o))e[t+i]=o,i++;else if(0==(4294965248&o))e[t+i]=192|o>>6,e[t+i+1]=128|o>>0&63,i+=2;else if(0==(4294901760&o))e[t+i]=224|o>>12,e[t+i+1]=128|o>>6&63,e[t+i+2]=128|o>>0&63,i+=3;else{if(0!=(4292870144&o))throw\"e\";e[t+i]=240|o>>18,e[t+i+1]=128|o>>12&63,e[t+i+2]=128|o>>6&63,e[t+i+3]=128|o>>0&63,i+=4;}}return i;}(e,t,r),0===i&&(e.set(u,t),t+=u.length),t;}!function(){for(var e=0;e<32768;e++){var t=e;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,m.rev15[e]=(t>>>16|t<<16)>>>17;}function r(e,t,r){for(;0!=t--;)e.push(0,r);}for(e=0;e<32;e++)m.ldef[e]=m.of0[e]<<3|m.exb[e],m.ddef[e]=m.df0[e]<<4|m.dxb[e];r(m.fltree,144,8),r(m.fltree,112,9),r(m.fltree,24,7),r(m.fltree,8,8),g(m.fltree,9),h(m.fltree,9,m.flmap),v(m.fltree,9),r(m.fdtree,32,5),g(m.fdtree,5),h(m.fdtree,5,m.fdmap),v(m.fdtree,5),r(m.itree,19,0),r(m.ltree,286,0),r(m.dtree,30,0),r(m.ttree,320,0);}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return h;}),r.d(t,\"b\",function(){return g;});var n=r(0),i=r(147),a=r(17),o=r(92),s=r(5),u=r(99),c=r(98),l=r(1),d=r(2),f=r(151),p=r(205),m=Object(n.__assign)(Object(n.__assign)({},i.a),{tColor:Object(a.h)(\"texture\",\"rgba\",\"ubyte\",\"nearest\"),tDepth:Object(a.h)(\"texture\",\"rgba\",\"ubyte\",\"nearest\"),uTexSize:Object(a.i)(\"v2\"),dOrthographic:Object(a.c)(\"number\"),uNear:Object(a.i)(\"f\"),uFar:Object(a.i)(\"f\"),uFogNear:Object(a.i)(\"f\"),uFogFar:Object(a.i)(\"f\"),uFogColor:Object(a.i)(\"v3\"),dOcclusionEnable:Object(a.c)(\"boolean\"),dOcclusionKernelSize:Object(a.c)(\"number\"),uOcclusionBias:Object(a.i)(\"f\"),uOcclusionRadius:Object(a.i)(\"f\"),dOutlineEnable:Object(a.c)(\"boolean\"),uOutlineScale:Object(a.i)(\"f\"),uOutlineThreshold:Object(a.i)(\"f\"),dPackedDepth:Object(a.c)(\"boolean\")}),h={occlusion:d.ParamDefinition.MappedStatic(\"off\",{on:d.ParamDefinition.Group({kernelSize:d.ParamDefinition.Numeric(4,{min:1,max:32,step:1}),bias:d.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01}),radius:d.ParamDefinition.Numeric(64,{min:0,max:256,step:1})}),off:d.ParamDefinition.Group({})},{cycle:!0,description:\"Darken occluded crevices with the ambient occlusion effect\"}),outline:d.ParamDefinition.MappedStatic(\"off\",{on:d.ParamDefinition.Group({scale:d.ParamDefinition.Numeric(1,{min:0,max:10,step:1}),threshold:d.ParamDefinition.Numeric(.8,{min:0,max:5,step:.01})}),off:d.ParamDefinition.Group({})},{cycle:!0,description:\"Draw outline around 3D objects\"})};var g=function(){function e(e,t,r,a){this.webgl=e,this.camera=t;var f=e.gl;this.target=e.createRenderTarget(f.drawingBufferWidth,f.drawingBufferHeight),this.props=Object(n.__assign)(Object(n.__assign)({},d.ParamDefinition.getDefaultValues(h)),a);var g=r.colorTarget,v=r.depthTexture,b=r.packedDepth;this.renderable=function(e,t,r,a,f){var g=Object(n.__assign)(Object(n.__assign)({},d.ParamDefinition.getDefaultValues(h)),f),v=Object(n.__assign)(Object(n.__assign)({},i.b),{tColor:s.e.create(t),tDepth:s.e.create(r),uTexSize:s.e.create(l.Vec2.create(t.getWidth(),t.getHeight())),dOrthographic:s.e.create(0),uNear:s.e.create(1),uFar:s.e.create(1e4),uFogNear:s.e.create(1e4),uFogFar:s.e.create(1e4),uFogColor:s.e.create(l.Vec3.create(1,1,1)),dOcclusionEnable:s.e.create(\"on\"===g.occlusion.name),dOcclusionKernelSize:s.e.create(\"on\"===g.occlusion.name?g.occlusion.params.kernelSize:4),uOcclusionBias:s.e.create(\"on\"===g.occlusion.name?g.occlusion.params.bias:.5),uOcclusionRadius:s.e.create(\"on\"===g.occlusion.name?g.occlusion.params.radius:64),dOutlineEnable:s.e.create(\"on\"===g.outline.name),uOutlineScale:s.e.create((\"on\"===g.outline.name?g.outline.params.scale:1)*e.pixelRatio),uOutlineThreshold:s.e.create(\"on\"===g.outline.name?g.outline.params.threshold:.8),dPackedDepth:s.e.create(a)}),b=Object(n.__assign)({},m),y=Object(o.f)(\"postprocessing\",p.a,\"\\nprecision highp float;\\nprecision highp int;\\nprecision highp sampler2D;\\n\\nuniform sampler2D tColor;\\nuniform sampler2D tDepth;\\nuniform vec2 uTexSize;\\n\\nuniform float uNear;\\nuniform float uFar;\\nuniform float uFogNear;\\nuniform float uFogFar;\\nuniform vec3 uFogColor;\\n\\nuniform float uOcclusionBias;\\nuniform float uOcclusionRadius;\\n\\nuniform float uOutlineScale;\\nuniform float uOutlineThreshold;\\n\\nconst float noiseAmount = 0.0002;\\nconst vec4 occlusionColor = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n#include common\\n\\nfloat noise(const in vec2 coords) {\\n\\tfloat a = 12.9898;\\n\\tfloat b = 78.233;\\n\\tfloat c = 43758.5453;\\n\\tfloat dt = dot(coords, vec2(a,b));\\n\\tfloat sn = mod(dt, 3.14159);\\n\\n\\treturn fract(sin(sn) * c);\\n}\\n\\nfloat perspectiveDepthToViewZ(const in float invClipZ, const in float near, const in float far) {\\n\\treturn (near * far) / ((far - near) * invClipZ - far);\\n}\\n\\nfloat orthographicDepthToViewZ(const in float linearClipZ, const in float near, const in float far) {\\n\\treturn linearClipZ * (near - far) - near;\\n}\\n\\nfloat getViewZ(const in float depth) {\\n\\t#if dOrthographic == 1\\n\\t\\treturn orthographicDepthToViewZ(depth, uNear, uFar);\\n\\t#else\\n\\t\\treturn perspectiveDepthToViewZ(depth, uNear, uFar);\\n\\t#endif\\n}\\n\\nfloat getDepth(const in vec2 coords) {\\n\\t#ifdef dPackedDepth\\n\\t\\treturn unpackRGBAToDepth(texture2D(tDepth, coords));\\n\\t#else\\n\\t\\treturn texture2D(tDepth, coords).r;\\n\\t#endif\\n}\\n\\nfloat calcSSAO(const in vec2 coords, const in float depth) {\\n\\tfloat occlusionFactor = 0.0;\\n\\n\\tfor (int i = -dOcclusionKernelSize; i <= dOcclusionKernelSize; i++) {\\n\\t\\tfor (int j = -dOcclusionKernelSize; j <= dOcclusionKernelSize; j++) {\\n\\t\\t\\tvec2 coordsDelta = coords + uOcclusionRadius / float(dOcclusionKernelSize) * vec2(float(i) / uTexSize.x, float(j) / uTexSize.y);\\n            coordsDelta += noiseAmount * (noise(coordsDelta) - 0.5) / uTexSize;\\n            coordsDelta = clamp(coordsDelta, 0.5 / uTexSize, 1.0 - 1.0 / uTexSize);\\n\\t\\t\\tif (getDepth(coordsDelta) < depth) occlusionFactor += 1.0;\\n\\t\\t}\\n\\t}\\n\\n\\treturn occlusionFactor / float((2 * dOcclusionKernelSize + 1) * (2 * dOcclusionKernelSize + 1));\\n}\\n\\nvec2 calcEdgeDepth(const in vec2 coords) {\\n    vec2 invTexSize = 1.0 / uTexSize;\\n    float halfScaleFloor = floor(uOutlineScale * 0.5);\\n    float halfScaleCeil = ceil(uOutlineScale * 0.5);\\n\\n    vec2 bottomLeftUV = coords - invTexSize * halfScaleFloor;\\n    vec2 topRightUV = coords + invTexSize * halfScaleCeil;\\n    vec2 bottomRightUV = coords + vec2(invTexSize.x * halfScaleCeil, -invTexSize.y * halfScaleFloor);\\n    vec2 topLeftUV = coords + vec2(-invTexSize.x * halfScaleFloor, invTexSize.y * halfScaleCeil);\\n\\n    float depth0 = getDepth(bottomLeftUV);\\n    float depth1 = getDepth(topRightUV);\\n    float depth2 = getDepth(bottomRightUV);\\n    float depth3 = getDepth(topLeftUV);\\n\\n    float depthFiniteDifference0 = depth1 - depth0;\\n    float depthFiniteDifference1 = depth3 - depth2;\\n\\n    return vec2(\\n\\t\\tsqrt(pow(depthFiniteDifference0, 2.0) + pow(depthFiniteDifference1, 2.0)) * 100.0,\\n\\t\\tmin(depth0, min(depth1, min(depth2, depth3)))\\n\\t);\\n}\\n\\nvoid main(void) {\\n\\tvec2 coords = gl_FragCoord.xy / uTexSize;\\n\\tvec4 color = texture2D(tColor, coords);\\n\\n\\t#ifdef dOutlineEnable\\n\\t\\tvec2 edgeDepth = calcEdgeDepth(coords);\\n\\t\\tfloat edgeFlag = step(edgeDepth.x, uOutlineThreshold);\\n    \\tcolor.rgb *= edgeFlag;\\n\\n\\t\\tfloat viewDist = abs(getViewZ(edgeDepth.y));\\n\\t\\tfloat fogFactor = smoothstep(uFogNear, uFogFar, viewDist) * (1.0 - edgeFlag);\\n\\t\\tcolor.rgb = mix(color.rgb, uFogColor, fogFactor);\\n\\t#endif\\n\\n\\t// occlusion needs to be handled after outline to darken them properly\\n\\t#ifdef dOcclusionEnable\\n\\t\\tfloat depth = getDepth(coords);\\n\\t\\tif (depth != 1.0) {\\n\\t\\t\\tfloat occlusionFactor = calcSSAO(coords, depth);\\n\\t\\t\\tcolor = mix(color, occlusionColor, uOcclusionBias * occlusionFactor);\\n\\t\\t}\\n\\t#endif\\n\\n\\tgl_FragColor = color;\\n}\\n\"),_=Object(u.a)(e,\"triangles\",y,b,v);return Object(c.a)(_,v);}(e,g.texture,v,b,this.props);}return Object.defineProperty(e.prototype,\"enabled\",{get:function get(){return\"on\"===this.props.occlusion.name||\"on\"===this.props.outline.name;},enumerable:!1,configurable:!0}),e.prototype.setSize=function(e,t){this.target.setSize(e,t),s.e.update(this.renderable.values.uTexSize,l.Vec2.set(this.renderable.values.uTexSize.ref.value,e,t));},e.prototype.setProps=function(e){var t=this;this.props=Object(f.b)(this.props,function(r){void 0!==e.occlusion&&(r.occlusion.name=e.occlusion.name,s.e.updateIfChanged(t.renderable.values.dOcclusionEnable,\"on\"===e.occlusion.name),\"on\"===e.occlusion.name&&(r.occlusion.params=Object(n.__assign)({},e.occlusion.params),s.e.updateIfChanged(t.renderable.values.dOcclusionKernelSize,e.occlusion.params.kernelSize),s.e.updateIfChanged(t.renderable.values.uOcclusionBias,e.occlusion.params.bias),s.e.updateIfChanged(t.renderable.values.uOcclusionRadius,e.occlusion.params.radius))),void 0!==e.outline&&(r.outline.name=e.outline.name,s.e.updateIfChanged(t.renderable.values.dOutlineEnable,\"on\"===e.outline.name),\"on\"===e.outline.name&&(r.outline.params=Object(n.__assign)({},e.outline.params),s.e.updateIfChanged(t.renderable.values.uOutlineScale,e.outline.params.scale),s.e.updateIfChanged(t.renderable.values.uOutlineThreshold,e.outline.params.threshold)));}),this.renderable.update();},e.prototype.render=function(e){s.e.update(this.renderable.values.uFar,this.camera.far),s.e.update(this.renderable.values.uNear,this.camera.near),s.e.update(this.renderable.values.uFogFar,this.camera.fogFar),s.e.update(this.renderable.values.uFogNear,this.camera.fogNear),s.e.update(this.renderable.values.dOrthographic,\"orthographic\"===this.camera.state.mode?1:0);var t=this.webgl,r=t.gl,n=t.state;e?(this.webgl.unbindFramebuffer(),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight)):this.target.bind(),n.disable(r.SCISSOR_TEST),n.disable(r.BLEND),n.disable(r.DEPTH_TEST),n.depthMask(!1),this.renderable.render();},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return h;}),r.d(t,\"b\",function(){return g;});var n=r(0),i=r(147),a=r(17),o=r(5),s=r(1),u=r(92),c=r(99),l=r(98),d=r(2),f=r(232),p=r(205),m=Object(n.__assign)(Object(n.__assign)({},i.a),{tColor:Object(a.h)(\"texture\",\"rgba\",\"ubyte\",\"nearest\"),uTexSize:Object(a.i)(\"v2\"),uWeight:Object(a.i)(\"f\")});var h={mode:d.ParamDefinition.Select(\"off\",[[\"off\",\"Off\"],[\"on\",\"On\"],[\"temporal\",\"Temporal\"]]),sampleLevel:d.ParamDefinition.Numeric(2,{min:0,max:5,step:1})},g=function(){function e(e,t,r,a,f){this.webgl=e,this.camera=t,this.drawPass=r,this.postprocessing=a,this.sampleIndex=-1,this.currentTime=0,this.lastRenderTime=0;var g,v,b,y,_,S,O=e.gl;this.colorTarget=e.createRenderTarget(O.drawingBufferWidth,O.drawingBufferHeight),this.composeTarget=e.createRenderTarget(O.drawingBufferWidth,O.drawingBufferHeight),this.holdTarget=e.createRenderTarget(O.drawingBufferWidth,O.drawingBufferHeight),this.compose=(g=e,v=r.colorTarget.texture,b=Object(n.__assign)(Object(n.__assign)({},i.b),{tColor:o.e.create(v),uTexSize:o.e.create(s.Vec2.create(v.getWidth(),v.getHeight())),uWeight:o.e.create(1)}),y=Object(n.__assign)({},m),_=Object(u.f)(\"compose\",p.a,\"\\nprecision highp float;\\nprecision highp sampler2D;\\n\\nuniform sampler2D tColor;\\nuniform vec2 uTexSize;\\nuniform float uWeight;\\n\\nvoid main() {\\n    vec2 coords = gl_FragCoord.xy / uTexSize;\\n    gl_FragColor = texture2D(tColor, coords) * uWeight;\\n}\\n\"),S=Object(c.a)(g,\"triangles\",_,y,b),Object(l.a)(S,b)),this.props=Object(n.__assign)(Object(n.__assign)({},d.ParamDefinition.getDefaultValues(h)),f);}return Object.defineProperty(e.prototype,\"enabled\",{get:function get(){return\"temporal\"===this.props.mode?this.currentTime-this.lastRenderTime>200?-1!==this.sampleIndex:(this.sampleIndex=0,!1):\"on\"===this.props.mode;},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){e&&(this.lastRenderTime=t),this.currentTime=t;},e.prototype.setSize=function(e,t){this.colorTarget.setSize(e,t),this.composeTarget.setSize(e,t),this.holdTarget.setSize(e,t),o.e.update(this.compose.values.uTexSize,s.Vec2.set(this.compose.values.uTexSize.ref.value,e,t));},e.prototype.setProps=function(e){void 0!==e.mode&&(this.props.mode=e.mode),void 0!==e.sampleLevel&&(this.props.sampleLevel=e.sampleLevel);},e.prototype.render=function(e,t){\"temporal\"===this.props.mode?this.renderTemporalMultiSample(e,t):this.renderMultiSample(e,t);},e.prototype.renderMultiSample=function(e,t){var r=this,n=r.camera,i=r.compose,a=r.composeTarget,s=r.drawPass,u=r.postprocessing,c=r.webgl,l=c.gl,d=c.state,p=v[Math.max(0,Math.min(this.props.sampleLevel,5))],m=1/p.length;n.viewOffset.enabled=!0,o.e.update(i.values.tColor,u.enabled?u.target.texture:s.colorTarget.texture),i.update();for(var h=s.colorTarget.getWidth(),g=s.colorTarget.getHeight(),b=0;b<p.length;++b){var y=p[b];f.a.setViewOffset(n.viewOffset,h,g,y[0],y[1],h,g),n.update();var _=m+1/32*((b+.5)/p.length-.5);o.e.update(i.values.uWeight,_),s.render(!1,t),u.enabled&&u.render(!1),a.bind(),l.viewport(0,0,h,g),d.enable(l.BLEND),d.blendEquationSeparate(l.FUNC_ADD,l.FUNC_ADD),d.blendFuncSeparate(l.ONE,l.ONE,l.ONE,l.ONE),d.disable(l.DEPTH_TEST),d.disable(l.SCISSOR_TEST),d.depthMask(!1),0===b&&(d.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT)),i.render();}o.e.update(i.values.uWeight,1),o.e.update(i.values.tColor,a.texture),i.update(),e?c.unbindFramebuffer():this.colorTarget.bind(),l.viewport(0,0,h,g),d.disable(l.BLEND),i.render(),n.viewOffset.enabled=!1,n.update();},e.prototype.renderTemporalMultiSample=function(e,t){var r=this,n=r.camera,i=r.compose,a=r.composeTarget,s=r.holdTarget,u=r.postprocessing,c=r.drawPass,l=r.webgl,d=l.gl,p=l.state,m=v[Math.max(0,Math.min(this.props.sampleLevel,5))];if(-1!==this.sampleIndex)if(this.sampleIndex>=m.length)this.sampleIndex=-1;else{0===this.sampleIndex&&(c.render(!1,t),u.enabled&&u.render(!1),o.e.update(i.values.uWeight,1),o.e.update(i.values.tColor,u.enabled?u.target.texture:c.colorTarget.texture),i.update(),s.bind(),p.disable(d.BLEND),i.render());var h=1/m.length;n.viewOffset.enabled=!0,o.e.update(i.values.tColor,u.enabled?u.target.texture:c.colorTarget.texture),o.e.update(i.values.uWeight,h),i.update();for(var g=c.colorTarget.getWidth(),b=c.colorTarget.getHeight(),y=Math.pow(2,this.props.sampleLevel),_=0;_<y;++_){var S=m[this.sampleIndex];if(f.a.setViewOffset(n.viewOffset,g,b,S[0],S[1],g,b),n.update(),c.render(!1,t),u.enabled&&u.render(!1),a.bind(),p.enable(d.BLEND),p.blendEquationSeparate(d.FUNC_ADD,d.FUNC_ADD),p.blendFuncSeparate(d.ONE,d.ONE,d.ONE,d.ONE),p.disable(d.DEPTH_TEST),p.disable(d.SCISSOR_TEST),p.depthMask(!1),0===this.sampleIndex&&(p.clearColor(0,0,0,0),d.clear(d.COLOR_BUFFER_BIT)),i.render(),this.sampleIndex+=1,this.sampleIndex>=m.length)break;}var O=this.sampleIndex*h;O>0&&(o.e.update(i.values.uWeight,1),o.e.update(i.values.tColor,a.texture),i.update(),e?l.unbindFramebuffer():this.colorTarget.bind(),d.viewport(0,0,g,b),p.disable(d.BLEND),i.render()),O<1&&(o.e.update(i.values.uWeight,1-O),o.e.update(i.values.tColor,s.texture),i.update(),e?l.unbindFramebuffer():this.colorTarget.bind(),d.viewport(0,0,g,b),0===O?p.disable(d.BLEND):p.enable(d.BLEND),i.render()),n.viewOffset.enabled=!1,n.update(),this.sampleIndex>=m.length&&(this.sampleIndex=-1);}},e;}(),v=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];v.forEach(function(e){e.forEach(function(e){e[0]*=.0625,e[1]*=.0625;});});},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureFocusRepresentationTags\",function(){return n;}),r.d(t,\"StructureFocusRepresentation\",function(){return y;});var n,i=r(0),a=r(334),o=r(330),s=r(4),u=r(162),c=r(28),l=r(170),d=r(10),f=r(13),p=r(150),m=r(2),h=r(26),g=[\"target\",\"surroundings\",\"interactions\"];!function(e){e.TargetSel=\"structure-focus-target-sel\",e.TargetRepr=\"structure-focus-target-repr\",e.SurrSel=\"structure-focus-surr-sel\",e.SurrRepr=\"structure-focus-surr-repr\",e.SurrNciRepr=\"structure-focus-surr-nci-repr\";}(n||(n={}));var v=new Set([n.TargetSel,n.TargetRepr,n.SurrSel,n.SurrRepr,n.SurrNciRepr]),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentSource=void 0,t;}return Object(i.__extends)(t,e),Object.defineProperty(t.prototype,\"surrLabel\",{get:function get(){return\"[Focus] Surroundings (\"+this.params.expandRadius+\" Å)\";},enumerable:!1,configurable:!0}),t.prototype.getReprParams=function(e){return Object(i.__assign)(Object(i.__assign)({},this.params.targetParams),{type:{name:e.type.name,params:Object(i.__assign)(Object(i.__assign)({},e.type.params),{ignoreHydrogens:this.params.ignoreHydrogens})}});},t.prototype.ensureShape=function(e){var t=this.plugin.state.data,r=t.tree,i=t.build(),a=f.StateSelection.findUniqueTagsInSubtree(r,e.transform.ref,v);a[n.TargetSel]||(a[n.TargetSel]=i.to(e).apply(c.StateTransforms.Model.StructureSelectionFromBundle,{bundle:s.StructureElement.Bundle.Empty,label:\"[Focus] Target\"},{tags:n.TargetSel}).ref),a[n.SurrSel]||(a[n.SurrSel]=i.to(e).apply(c.StateTransforms.Model.StructureSelectionFromExpression,{expression:d.MolScriptBuilder.struct.generator.empty(),label:this.surrLabel},{tags:n.SurrSel}).ref);var o=this.params.components;return o.indexOf(\"target\")>=0&&!a[n.TargetRepr]&&(a[n.TargetRepr]=i.to(a[n.TargetSel]).apply(c.StateTransforms.Representation.StructureRepresentation3D,this.getReprParams(this.params.targetParams),{tags:n.TargetRepr}).ref),o.indexOf(\"surroundings\")>=0&&!a[n.SurrRepr]&&(a[n.SurrRepr]=i.to(a[n.SurrSel]).apply(c.StateTransforms.Representation.StructureRepresentation3D,this.getReprParams(this.params.surroundingsParams),{tags:n.SurrRepr}).ref),o.indexOf(\"interactions\")>=0&&!a[n.SurrNciRepr]&&(a[n.SurrNciRepr]=i.to(a[n.SurrSel]).apply(c.StateTransforms.Representation.StructureRepresentation3D,this.params.nciParams,{tags:n.SurrNciRepr}).ref),{state:t,builder:i,refs:a};},t.prototype.clear=function(e){var t=this.plugin.state.data;this.currentSource=void 0;var r=t.select(f.StateSelection.Generators.byRef(e).subtree().withTag(n.TargetSel)),a=t.select(f.StateSelection.Generators.byRef(e).subtree().withTag(n.SurrSel));if(0!==r.length||0!==a.length){for(var o=t.build(),u=s.StructureElement.Bundle.Empty,l=0,p=r;l<p.length;l++){var m=p[l];o.to(m).update(c.StateTransforms.Model.StructureSelectionFromBundle,function(e){return Object(i.__assign)(Object(i.__assign)({},e),{bundle:u});});}for(var g=d.MolScriptBuilder.struct.generator.empty(),v=0,b=a;v<b.length;v++){var y=b[v];o.to(y).update(c.StateTransforms.Model.StructureSelectionFromExpression,function(e){return Object(i.__assign)(Object(i.__assign)({},e),{expression:g});});}return h.PluginCommands.State.Update(this.plugin,{state:t,tree:o,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}});}},t.prototype.focus=function(e){return Object(i.__awaiter)(this,void 0,void 0,function(){var t,r,a,o,u,l,f,p,m,g,v=this;return Object(i.__generator)(this,function(b){switch(b.label){case 0:return(t=this.plugin.helpers.substructureParent.get(e.structure))&&t.obj?(this.currentSource=e,r=s.StructureElement.Loci.remap(e,t.obj.data),a=s.StructureElement.Loci.extendToWholeResidues(r),o=s.StructureElement.Bundle.fromLoci(a),u=s.StructureElement.Bundle.toExpression(o),l=d.MolScriptBuilder.struct.modifier.includeSurroundings({0:u,radius:this.params.expandRadius,\"as-whole-residues\":!0}),this.params.excludeTargetFromSurroundings&&(l=d.MolScriptBuilder.struct.modifier.exceptBy({0:l,by:u})),f=this.ensureShape(t),p=f.state,m=f.builder,g=f.refs,m.to(g[n.TargetSel]).update(c.StateTransforms.Model.StructureSelectionFromBundle,function(e){return Object(i.__assign)(Object(i.__assign)({},e),{bundle:o});}),m.to(g[n.SurrSel]).update(c.StateTransforms.Model.StructureSelectionFromExpression,function(e){return Object(i.__assign)(Object(i.__assign)({},e),{expression:l,label:v.surrLabel});}),[4,h.PluginCommands.State.Update(this.plugin,{state:p,tree:m,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}})]):[2];case 1:return b.sent(),[2];}});});},t.prototype.register=function(e){var t=this;this.subscribeObservable(this.plugin.managers.structure.focus.behaviors.current,function(e){e?t.focus(e.loci):t.clear(f.StateTransform.RootRef);});},t.prototype.update=function(e){return Object(i.__awaiter)(this,void 0,void 0,function(){var t,r,a,o,s,u,c,l,d,p,m,g,v;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(t=this.params,this.params=e,t.excludeTargetFromSurroundings!==e.excludeTargetFromSurroundings)return this.currentSource&&this.focus(this.currentSource),[2,!0];for(r=this.plugin.state.data,a=r.build(),o=f.StateSelection.Generators.root.subtree(),s=this.params.components,u=s.indexOf(\"target\")>=0,c=0,l=r.select(o.withTag(n.TargetRepr));c<l.length;c++)v=l[c],u?a.to(v).update(this.getReprParams(this.params.targetParams)):a.delete(v.transform.ref);for(u=s.indexOf(\"surroundings\")>=0,d=0,p=r.select(o.withTag(n.SurrRepr));d<p.length;d++)v=p[d],u?a.to(v).update(this.getReprParams(this.params.surroundingsParams)):a.delete(v.transform.ref);for(u=s.indexOf(\"interactions\")>=0,m=0,g=r.select(o.withTag(n.SurrNciRepr));m<g.length;m++)v=g[m],u?a.to(v).update(this.params.nciParams):a.delete(v.transform.ref);return[4,h.PluginCommands.State.Update(this.plugin,{state:r,tree:a,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}})];case 1:return i.sent(),e.expandRadius!==t.expandRadius?(this.currentSource&&this.focus(this.currentSource),[2,!0]):[2,!0];}});});},t;}(l.PluginBehavior.WithSubscribers),y=l.PluginBehavior.create({name:\"create-structure-focus-representation\",display:{name:\"Structure Focus Representation\"},category:\"interaction\",ctor:b,params:function params(e,t){return function(e){var t=c.StateTransforms.Representation.StructureRepresentation3D.definition.params(void 0,e);return{expandRadius:m.ParamDefinition.Numeric(5,{min:1,max:10,step:1}),targetParams:m.ParamDefinition.Group(t,{label:\"Target\",customDefault:Object(u.createStructureRepresentationParams)(e,void 0,{type:\"ball-and-stick\",size:\"physical\",typeParams:{sizeFactor:.26,alpha:.51}})}),surroundingsParams:m.ParamDefinition.Group(t,{label:\"Surroundings\",customDefault:Object(u.createStructureRepresentationParams)(e,void 0,{type:\"ball-and-stick\",size:\"physical\",typeParams:{sizeFactor:.16}})}),nciParams:m.ParamDefinition.Group(t,{label:\"Non-covalent Int.\",customDefault:Object(u.createStructureRepresentationParams)(e,void 0,{type:a.a,color:o.a,size:p.a.BuiltIn.uniform})}),components:m.ParamDefinition.MultiSelect(g,m.ParamDefinition.arrayToOptions(g)),excludeTargetFromSurroundings:m.ParamDefinition.Boolean(!1,{label:\"Exclude Target\",description:'Exclude the focus \"target\" from the surroudings component.'}),ignoreHydrogens:m.ParamDefinition.Boolean(!1)};}(t);}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r;}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t);},e.now=function(){return Date.now();},e;}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureComponentControls\",function(){return y;}),r.d(t,\"AddComponentControls\",function(){return S;});var n=r(0),i=r(3),a=r(162),o=r(246),s=r(275),u=r(26),c=r(13),l=r(2),d=r(32),f=r(56),p=r(19),m=r(14),h=r(67),g=r(183),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this.plugin.managers.structure.hierarchy.behaviors.selection;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.current,function(){return e.forceUpdate();});},Object.defineProperty(t.prototype,\"unitcell\",{get:function get(){var e,t=this.plugin.managers.structure.hierarchy.selection;if(0===t.structures.length)return null;for(var r=[],n=0,a=t.structures;n<a.length;n++){var o=a[n].model;(null==o?void 0:o.unitcell)&&(null===(e=o.unitcell)||void 0===e?void 0:e.cell.obj)&&r.push(o.unitcell);}return 0===r.length?null:i.createElement(b,{refs:r,labelMultiple:\"Unit Cells\"});},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"customControls\",{get:function get(){var e=this,t=[];return this.plugin.genericRepresentationControls.forEach(function(r,n){var a=r(e.plugin.managers.structure.hierarchy.selection),o=a[0],s=a[1];o.length>0&&t.push(i.createElement(\"div\",{key:n},i.createElement(b,{refs:o,labelMultiple:s})));}),t.length>0?t:null;},enumerable:!1,configurable:!0}),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{style:{marginTop:\"6px\"}},this.unitcell,this.customControls));},t;}(d.PurePluginUIComponent),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showOptions:!1},t.toggleVisibility=function(e){e.preventDefault(),t.plugin.managers.structure.hierarchy.toggleVisibility(t.props.refs),e.currentTarget.blur();},t.highlight=function(e){e.preventDefault(),t.pivot.cell.parent&&u.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:t.pivot.cell.parent,ref:t.props.refs.map(function(e){return e.cell.transform.ref;})});},t.clearHighlight=function(e){e.preventDefault(),u.PluginCommands.Interactivity.ClearHighlights(t.plugin);},t.focus=function(e){var r;e.preventDefault();for(var n=!0,i=0,a=t.props.refs;i<a.length;i++){if(!(c=a[i]).cell.state.isHidden){n=!1;break;}}n&&t.plugin.managers.structure.hierarchy.toggleVisibility(t.props.refs,\"show\");for(var o=[],s=0,u=t.props.refs;s<u.length;s++){var c;if(!(c=u[s]).cell.state.isHidden){var l=null===(r=c.cell.obj)||void 0===r?void 0:r.data.repr.getLoci();l&&o.push(l);}}t.plugin.managers.camera.focusLoci(o);},t.toggleOptions=function(){return t.setState({showOptions:!t.state.showOptions});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){var r;c.State.ObjectEvent.isCell(t,null===(r=e.pivot)||void 0===r?void 0:r.cell)&&e.forceUpdate();});},Object.defineProperty(t.prototype,\"pivot\",{get:function get(){return this.props.refs[0];},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.props,t=e.refs,r=e.labelMultiple;if(0===t.length)return null;var n,a,o=t[0];if(1===t.length){var s=o.cell.obj;if(!s)return null;n=null==s?void 0:s.label,a=null==s?void 0:s.description;}else n=t.length+\" \"+(r||\"Objects\");return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(\"button\",{className:\"msp-form-control msp-control-button-label\",title:n+\". Click to focus.\",onClick:this.focus,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlign:\"left\"}},n,\" \",i.createElement(\"small\",null,a)),i.createElement(p.IconButton,{svg:o.cell.state.isHidden?m.VisibilityOffOutlinedSvg:m.VisibilityOutlinedSvg,toggleState:!1,className:\"msp-form-control\",onClick:this.toggleVisibility,title:o.cell.state.isHidden?\"Show\":\"Hide\",small:!0,flex:!0}),1===t.length&&i.createElement(p.IconButton,{svg:m.MoreHorizSvg,className:\"msp-form-control\",onClick:this.toggleOptions,title:\"Options\",toggleState:this.state.showOptions,flex:!0})),1===t.length&&this.state.showOptions&&o.cell.parent&&i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(g.UpdateTransformControl,{state:o.cell.parent,transform:o.cell.transform,customHeader:\"none\",autoHideApply:!0}))));},t;}(d.PurePluginUIComponent),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{header:\"Components\",isCollapsed:!1,isDisabled:!1,brand:{accent:\"blue\",svg:m.CubeOutlineSvg}};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){return e.setState({description:s.StructureHierarchyManager.getSelectedStructuresDescription(e.plugin)});});},t.prototype.renderControls=function(){return i.createElement(i.Fragment,null,i.createElement(_,null),i.createElement(x,null),i.createElement(v,null));},t;}(d.CollapsableControls),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isEmpty:!0,isBusy:!1,canUndo:!1},t.togglePreset=t.toggleAction(\"preset\"),t.toggleAdd=t.toggleAction(\"add\"),t.toggleOptions=t.toggleAction(\"options\"),t.hideAction=function(){return t.setState({action:void 0});},t.applyPreset=function(e){if(t.hideAction(),e){var r=t.plugin.managers.structure,n=r.hierarchy.selection.structures;null===e.value?r.component.clear(n):r.component.applyPreset(n,e.value);}},t.undo=function(){var e=t.plugin.state.data.undo();e&&t.plugin.runTask(e);},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"isDisabled\",{get:function get(){return this.state.isBusy||this.state.isEmpty;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){return e.setState({action:\"options\"!==e.state.action||0===t.structures.length?void 0:\"options\",isEmpty:0===t.structures.length});}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t,action:\"options\"!==e.state.action?void 0:\"options\"});}),this.subscribe(this.plugin.state.data.events.historyUpdated,function(t){var r=t.state;e.setState({canUndo:r.canUndo});});},t.prototype.toggleAction=function(e){var t=this;return function(){return t.setState({action:t.state.action===e?void 0:e});};},Object.defineProperty(t.prototype,\"presetControls\",{get:function get(){return i.createElement(f.a,{items:this.presetActions,onSelect:this.applyPreset});},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"presetActions\",{get:function get(){var e=this.plugin.managers.structure.component.pivotStructure,t=this.plugin.builders.structure.representation.getPresets(null==e?void 0:e.cell.obj);return f.a.createItems(t,{label:function label(e){return e.display.name;},category:function category(e){return e.display.group;},description:function description(e){return e.display.description;}});},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.state.canUndo?\"Undo \"+this.plugin.state.data.latestUndoLabel:\"Some mistakes of the past can be undone.\";return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(p.ToggleButton,{icon:m.BookmarksOutlinedSvg,label:\"Preset\",title:\"Apply a representation preset for the current structure(s).\",toggle:this.togglePreset,isSelected:\"preset\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:m.AddSvg,label:\"Add\",title:\"Add a new representation component for a selection.\",toggle:this.toggleAdd,isSelected:\"add\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.ToggleButton,{icon:m.TuneSvg,label:\"\",title:\"Options that are applied to all applicable representations.\",style:{flex:\"0 0 40px\",padding:0},toggle:this.toggleOptions,isSelected:\"options\"===this.state.action,disabled:this.isDisabled}),i.createElement(p.IconButton,{svg:m.RestoreSvg,className:\"msp-flex-item\",flex:\"40px\",onClick:this.undo,disabled:!this.state.canUndo||this.isDisabled,title:e})),\"preset\"===this.state.action&&this.presetControls,\"add\"===this.state.action&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(S,{onApply:this.hideAction})),\"options\"===this.state.action&&i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(O,{isDisabled:this.isDisabled})));},t;}(d.PurePluginUIComponent),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state=t.createState(),t.apply=function(){var e=t.props.forSelection?t.currentStructures:t.selectedStructures;t.props.onApply(),t.plugin.managers.structure.component.add(t.state.values,e);},t.paramsChanged=function(e){return t.setState({values:e});},t;}return Object(n.__extends)(t,e),t.prototype.createState=function(){var e=o.StructureComponentManager.getAddParams(this.plugin);return{params:e,values:l.ParamDefinition.getDefaultValues(e)};},Object.defineProperty(t.prototype,\"selectedStructures\",{get:function get(){return this.plugin.managers.structure.component.currentStructures;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"currentStructures\",{get:function get(){return this.plugin.managers.structure.hierarchy.current.structures;},enumerable:!1,configurable:!0}),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(h.ParameterControls,{params:this.state.params,values:this.state.values,onChangeValues:this.paramsChanged}),i.createElement(p.Button,{icon:m.AddSvg,title:\"Use Selection and optional Representation to create a new Component.\",className:\"msp-btn-commit msp-btn-commit-on\",onClick:this.apply,style:{marginTop:\"1px\"}},\"Create Component\"));},t;}(d.PurePluginUIComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=function(e){return t.plugin.managers.structure.component.setOptions(e);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.component.events.optionsUpdated,function(){return e.forceUpdate();});},t.prototype.render=function(){return i.createElement(h.ParameterControls,{params:o.StructureComponentManager.OptionsParams,values:this.plugin.managers.structure.component.state.options,onChangeValues:this.update,isDisabled:this.props.isDisabled});},t;}(d.PurePluginUIComponent),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(){e.forceUpdate();});},t.prototype.render=function(){var e=this.plugin.managers.structure.hierarchy.currentComponentGroups;return 0===e.length?null:i.createElement(\"div\",{style:{marginTop:\"6px\"}},e.map(function(e){return i.createElement(C,{key:e[0].cell.transform.ref,group:e});}));},t;}(d.PurePluginUIComponent),C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={action:void 0},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.structure.component.toggleVisibility(t.props.group);},t.selectAction=function(e){e&&(t.setState({action:void 0}),(null==e?void 0:e.value)());},t.remove=function(){return t.plugin.managers.structure.hierarchy.remove(t.props.group,!0);},t.toggleAction=function(){return t.setState({action:\"action\"===t.state.action?void 0:\"action\"});},t.toggleLabel=function(){return t.setState({action:\"label\"===t.state.action?void 0:\"label\"});},t.highlight=function(e){e.preventDefault(),t.props.group[0].cell.parent&&u.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:t.props.group[0].cell.parent,ref:t.props.group.map(function(e){return e.cell.transform.ref;})});},t.clearHighlight=function(e){e.preventDefault(),u.PluginCommands.Interactivity.ClearHighlights(t.plugin);},t.focus=function(){for(var e=!0,r=0,n=t.props.group;r<n.length;r++){if(!n[r].cell.state.isHidden){e=!1;break;}}e&&t.plugin.managers.structure.hierarchy.toggleVisibility(t.props.group,\"show\"),t.plugin.managers.camera.focusSpheres(t.props.group,function(e){var t;if(!e.cell.state.isHidden)return null===(t=e.cell.obj)||void 0===t?void 0:t.data.boundary.sphere;});},t.updateLabel=function(e){t.plugin.managers.structure.component.updateLabel(t.pivot,e);},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"pivot\",{get:function get(){return this.props.group[0];},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){c.State.ObjectEvent.isCell(t,e.pivot.cell)&&e.forceUpdate();});},Object.defineProperty(t.prototype,\"colorByActions\",{get:function get(){var e,t,r=this,n=this.plugin.managers.structure.component,i=null===(e=this.pivot.representations[0].cell.transform.params)||void 0===e?void 0:e.colorTheme.name,o=Object(a.getStructureThemeTypes)(this.plugin,null===(t=this.pivot.cell.obj)||void 0===t?void 0:t.data);return f.a.createItemsFromSelectOptions(o,{value:function value(e){return function(){return n.updateRepresentationsTheme(r.props.group,{color:e[0]});};},selected:function selected(e){return e[0]===i;}});},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"actions\",{get:function get(){var e=this,t=this.plugin.managers.structure.component,r=[Object(n.__spreadArrays)([f.a.Header(\"Add Representation\")],o.StructureComponentManager.getRepresentationTypes(this.plugin,this.props.group[0]).map(function(r){return f.a.Item(r[1],function(){return t.addRepresentation(e.props.group,r[0]);});}))];return this.pivot.representations.length>0&&r.push(Object(n.__spreadArrays)([f.a.Header(\"Set Coloring\",{isIndependent:!0})],this.colorByActions)),t.canBeModified(this.props.group[0])&&r.push([f.a.Header(\"Modify by Selection\"),f.a.Item(\"Include\",function(){return t.modifyByCurrentSelection(e.props.group,\"union\");},{icon:m.UnionSvg}),f.a.Item(\"Subtract\",function(){return t.modifyByCurrentSelection(e.props.group,\"subtract\");},{icon:m.SubtractSvg}),f.a.Item(\"Intersect\",function(){return t.modifyByCurrentSelection(e.props.group,\"intersect\");},{icon:m.IntersectSvg})]),r.push(f.a.Item(\"Select This\",function(){return t.selectThis(e.props.group);},{icon:m.SetSvg})),t.canBeModified(this.props.group[0])&&r.push(f.a.Item(\"Edit Label\",this.toggleLabel)),r;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"reprLabel\",{get:function get(){var e,t=this.pivot;return 0===t.representations.length?\"No repr.\":1===t.representations.length?null===(e=t.representations[0].cell.obj)||void 0===e?void 0:e.label:t.representations.length+\" reprs\";},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t=this,r=this.pivot,n=r.cell,a=null===(e=n.obj)||void 0===e?void 0:e.label,o=this.reprLabel;return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(p.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:a+\". Click to focus.\",onClick:this.focus,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlign:\"left\"}},a,i.createElement(\"small\",{className:\"msp-25-lower-contrast-text\",style:{float:\"right\"}},o)),i.createElement(p.IconButton,{svg:n.state.isHidden?m.VisibilityOffOutlinedSvg:m.VisibilityOutlinedSvg,toggleState:!1,onClick:this.toggleVisible,title:(n.state.isHidden?\"Show\":\"Hide\")+\" component\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(p.IconButton,{svg:m.DeleteOutlinedSvg,toggleState:!1,onClick:this.remove,title:\"Remove\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(p.IconButton,{svg:m.MoreHorizSvg,onClick:this.toggleAction,title:\"Actions\",toggleState:\"action\"===this.state.action,className:\"msp-form-control\",flex:!0})),\"label\"===this.state.action&&i.createElement(\"div\",{className:\"msp-control-offset\",style:{marginBottom:\"6px\"}},i.createElement(p.ControlRow,{label:\"Label\",control:i.createElement(\"div\",{style:{display:\"flex\",textAlignLast:\"center\"}},i.createElement(p.TextInput,{onChange:this.updateLabel,value:a,style:{flex:\"1 1 auto\",minWidth:0},className:\"msp-form-control\",blurOnEnter:!0,blurOnEscape:!0}),i.createElement(p.IconButton,{svg:m.CheckSvg,onClick:this.toggleLabel,className:\"msp-form-control msp-control-button-label\",flex:!0}))})),\"action\"===this.state.action&&i.createElement(\"div\",{className:\"msp-accent-offset\"},i.createElement(\"div\",{style:{marginBottom:\"6px\"}},i.createElement(f.a,{items:this.actions,onSelect:this.selectAction,noOffset:!0})),i.createElement(\"div\",{style:{marginBottom:\"6px\"}},r.representations.map(function(e){return i.createElement(w,{group:t.props.group,key:e.cell.transform.ref,representation:e});}))));},t;}(d.PurePluginUIComponent),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remove=function(){return t.plugin.managers.structure.component.removeRepresentations(t.props.group,t.props.representation);},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.structure.component.toggleVisibility(t.props.group,t.props.representation);},t.update=function(e){return t.plugin.managers.structure.component.updateRepresentations(t.props.group,t.props.representation,e);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){c.State.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate();});},t.prototype.render=function(){var e,t=this.props.representation.cell;return i.createElement(\"div\",{className:\"msp-representation-entry\"},t.parent&&i.createElement(p.ExpandGroup,{header:((null===(e=t.obj)||void 0===e?void 0:e.label)||\"\")+\" Representation\",noOffset:!0},i.createElement(g.UpdateTransformControl,{state:t.parent,transform:t.transform,customHeader:\"none\",customUpdate:this.update,noMargin:!0})),i.createElement(p.IconButton,{svg:m.DeleteOutlinedSvg,onClick:this.remove,title:\"Remove\",small:!0,className:\"msp-default-bg\",toggleState:!1,style:{position:\"absolute\",top:0,right:\"32px\",lineHeight:\"24px\",height:\"24px\",textAlign:\"right\",width:\"44px\",paddingRight:\"6px\",background:\"none\"}}),i.createElement(p.IconButton,{svg:this.props.representation.cell.state.isHidden?m.VisibilityOffOutlinedSvg:m.VisibilityOutlinedSvg,toggleState:!1,onClick:this.toggleVisible,title:\"Toggle Visibility\",small:!0,className:\"msp-default-bg\",style:{position:\"absolute\",top:0,right:0,lineHeight:\"24px\",height:\"24px\",textAlign:\"right\",width:\"32px\",paddingRight:\"6px\",background:\"none\"}}));},t;}(d.PurePluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"ViewportControls\",function(){return b;}),r.d(t,\"Logo\",function(){return y;}),r.d(t,\"Viewport\",function(){return _;});var n=r(0),i=r(3),a=r(60),o=r(388),s=r(332),u=r(26),c=r(101),l=r(32),d=r(19),f=r(206),p=r(67),m=r(284),h=r(14),g=function(e){function t(){var t,r,o,s=e.apply(this,arguments)||this;return s.state={showPreview:!0,isDisabled:!1,resolution:null===(t=s.plugin.helpers.viewportScreenshot)||void 0===t?void 0:t.currentResolution,transparent:null===(r=s.plugin.helpers.viewportScreenshot)||void 0===r?void 0:r.transparent,axes:null===(o=s.plugin.helpers.viewportScreenshot)||void 0===o?void 0:o.axes},s.imgRef=i.createRef(),s.updateQueue=new a.a(),s.preview=function(){return Object(n.__awaiter)(s,void 0,void 0,function(){var e;return Object(n.__generator)(this,function(t){switch(t.label){case 0:return this.imgRef.current?(e=this.imgRef.current,[4,this.plugin.helpers.viewportScreenshot.imageData()]):[2];case 1:return e.src=t.sent(),[2];}});});},s.download=function(){var e;null===(e=s.plugin.helpers.viewportScreenshot)||void 0===e||e.download(),s.props.close();},s.openTab=function(){for(var e=s.imgRef.current.src,t=atob(e.substr(\"data:image/png;base64,\".length)),r=[],n=Math.min(t.length,1048576),i=0;i<t.length;i+=n){for(var a=new Uint8Array(Math.min(n,t.length-i)),o=0,u=a.length;o<u;o++)a[o]=t.charCodeAt(i+o);r.push(a);}var c=new Blob(r,{type:\"image/png\"}),l=URL.createObjectURL(c);window.open(l,\"_blank\"),s.props.close();},s.setProps=function(e){\"resolution\"===e.name?(s.plugin.helpers.viewportScreenshot.currentResolution=e.value,s.setState({resolution:e.value})):\"transparent\"===e.name?(s.plugin.helpers.viewportScreenshot.transparent=e.value,s.setState({transparent:e.value})):\"axes\"===e.name&&(s.plugin.helpers.viewportScreenshot.axes=e.value,s.setState({axes:e.value}));},s.downloadToFileJson=function(){u.PluginCommands.State.Snapshots.DownloadToFile(s.plugin,{type:\"json\"});},s.downloadToFileZip=function(){u.PluginCommands.State.Snapshots.DownloadToFile(s.plugin,{type:\"zip\"});},s.open=function(e){e.target.files&&e.target.files[0]&&u.PluginCommands.State.Snapshots.OpenFile(s.plugin,{file:e.target.files[0]});},s;}return Object(n.__extends)(t,e),t.prototype.handlePreview=function(){this.state.showPreview&&this.preview();},t.prototype.componentDidUpdate=function(){this.updateQueue.next();},t.prototype.componentDidMount=function(){var e=this;this.plugin.canvas3d&&(this.subscribe(Object(o.a)(250)(this.updateQueue),function(){return e.handlePreview();}),this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){var t;e.plugin.helpers.viewportScreenshot.imagePass.setProps({multiSample:{mode:\"on\",sampleLevel:2},postprocessing:null===(t=e.plugin.canvas3d)||void 0===t?void 0:t.props.postprocessing}),e.updateQueue.next();}),this.subscribe(Object(o.a)(250)(this.plugin.canvas3d.didDraw),function(){e.state.isDisabled||e.updateQueue.next();}),this.subscribe(this.plugin.state.data.behaviors.isUpdating,function(t){e.setState({isDisabled:t}),t||e.updateQueue.next();}),this.handlePreview());},t.prototype.render=function(){return i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-image-preview\"},i.createElement(\"img\",{ref:this.imgRef}),i.createElement(\"br\",null),i.createElement(\"span\",null,\"Right-click the image to Copy.\")),i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(d.Button,{icon:h.GetAppSvg,onClick:this.download,disabled:this.state.isDisabled},\"Download\"),i.createElement(d.Button,{icon:h.LaunchSvg,onClick:this.openTab,disabled:this.state.isDisabled},\"Open in new Tab\")),i.createElement(p.ParameterControls,{params:this.plugin.helpers.viewportScreenshot.params,values:this.plugin.helpers.viewportScreenshot.values,onChange:this.setProps,isDisabled:this.state.isDisabled}),i.createElement(d.ExpandGroup,{header:\"State\"},i.createElement(m.StateExportImportControls,{onAction:this.props.close}),i.createElement(d.ExpandGroup,{header:\"Save Options\",initiallyExpanded:!1,noOffset:!0},i.createElement(m.LocalStateSnapshotParams,null))));},t;}(l.PluginUIComponent),v=r(392),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allCollapsedState={isSettingsExpanded:!1,isScreenshotExpanded:!1},t.state=Object(n.__assign)({},t.allCollapsedState),t.resetCamera=function(){u.PluginCommands.Camera.Reset(t.plugin,{});},t.toggleSettingsExpanded=t.toggle(\"isSettingsExpanded\"),t.toggleScreenshotExpanded=t.toggle(\"isScreenshotExpanded\"),t.toggleControls=function(){u.PluginCommands.Layout.Update(t.plugin,{state:{showControls:!t.plugin.layout.state.showControls}});},t.toggleExpanded=function(){u.PluginCommands.Layout.Update(t.plugin,{state:{isExpanded:!t.plugin.layout.state.isExpanded}});},t.setSettings=function(e){var r;u.PluginCommands.Canvas3D.SetSettings(t.plugin,{settings:(r={},r[e.name]=e.value,r)});},t.setLayout=function(e){var r;u.PluginCommands.Layout.Update(t.plugin,{state:(r={},r[e.name]=e.value,r)});},t.screenshot=function(){var e;null===(e=t.plugin.helpers.viewportScreenshot)||void 0===e||e.download();},t.onMouseMove=function(e){0===e.buttons&&e.stopPropagation();},t;}return Object(n.__extends)(t,e),t.prototype.toggle=function(e){var t=this;return function(r){var i;t.setState(Object(n.__assign)(Object(n.__assign)({},t.allCollapsedState),((i={})[e]=!t.state[e],i))),null==r||r.currentTarget.blur();};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.layout.events.updated,function(){return e.forceUpdate();});},t.prototype.icon=function(e,t,r,n){return void 0===n&&(n=!0),i.createElement(d.IconButton,{svg:e,toggleState:n,onClick:t,title:r,style:{background:\"transparent\"}});},t.prototype.render=function(){return i.createElement(\"div\",{className:\"msp-viewport-controls\",onMouseMove:this.onMouseMove},i.createElement(\"div\",{className:\"msp-viewport-controls-buttons\"},i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(h.AutorenewSvg,this.resetCamera,\"Reset Camera\")),i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(h.CameraOutlinedSvg,this.toggleScreenshotExpanded,\"Screenshot / State Snapshot\",this.state.isScreenshotExpanded)),i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(h.BuildOutlinedSvg,this.toggleControls,\"Toggle Controls Panel\",this.plugin.layout.state.showControls),this.plugin.config.get(c.PluginConfig.Viewport.ShowExpand)&&this.icon(h.FullscreenSvg,this.toggleExpanded,\"Toggle Expanded Viewport\",this.plugin.layout.state.isExpanded),this.icon(h.TuneSvg,this.toggleSettingsExpanded,\"Settings / Controls Info\",this.state.isSettingsExpanded)),this.plugin.config.get(c.PluginConfig.Viewport.ShowSelectionMode)&&i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),i.createElement(f.ToggleSelectionModeButton,null))),this.state.isScreenshotExpanded&&i.createElement(\"div\",{className:\"msp-viewport-controls-panel\"},i.createElement(d.ControlGroup,{header:\"Screenshot / State\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleScreenshotExpanded,topRightIcon:h.CloseSvg,noTopMargin:!0,childrenClassName:\"msp-viewport-controls-panel-controls\"},i.createElement(g,{close:this.toggleScreenshotExpanded}))),this.state.isSettingsExpanded&&i.createElement(\"div\",{className:\"msp-viewport-controls-panel\"},i.createElement(d.ControlGroup,{header:\"Settings / Controls Info\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleSettingsExpanded,topRightIcon:h.CloseSvg,noTopMargin:!0,childrenClassName:\"msp-viewport-controls-panel-controls\"},i.createElement(v.SimpleSettingsControl,null))));},t;}(l.PluginUIComponent),y=function y(){return i.createElement(\"a\",{className:\"msp-logo\",href:\"https://molstar.org\",target:\"_blank\"});},_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.container=i.createRef(),t.canvas=i.createRef(),t.state={noWebGl:!1,showLogo:!0},t.handleLogo=function(){var e;t.setState({showLogo:!(null===(e=t.plugin.canvas3d)||void 0===e?void 0:e.reprCount.value)});},t.handleResize=function(){var e=t.container.current,r=t.canvas.current;e&&r&&(Object(s.b)(r,e),t.plugin.canvas3d.handleResize());},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.canvas.current&&this.container.current&&this.plugin.initViewer(this.canvas.current,this.container.current)){this.handleLogo(),this.handleResize();var t=this.plugin.canvas3d;this.subscribe(t.reprCount,this.handleLogo);var r=new a.a(),n=function n(){return r.next();};this.subscribe(r.pipe(Object(o.a)(1e3/24)),function(){return e.handleResize();}),this.subscribe(t.input.resize,n),this.subscribe(t.interaction.click,function(t){return e.plugin.behaviors.interaction.click.next(t);}),this.subscribe(t.interaction.hover,function(t){return e.plugin.behaviors.interaction.hover.next(t);}),this.subscribe(this.plugin.layout.events.updated,n);}else this.setState({noWebGl:!0});},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);},t.prototype.renderMissing=function(){return i.createElement(\"div\",{className:\"msp-no-webgl\"},i.createElement(\"div\",null,i.createElement(\"p\",null,i.createElement(\"b\",null,\"WebGL does not seem to be available.\")),i.createElement(\"p\",null,\"This can be caused by an outdated browser, graphics card driver issue, or bad weather. Sometimes, just restarting the browser helps.\"),i.createElement(\"p\",null,\"For a list of supported browsers, refer to \",i.createElement(\"a\",{href:\"http://caniuse.com/#feat=webgl\",target:\"_blank\"},\"http://caniuse.com/#feat=webgl\"),\".\")));},t.prototype.render=function(){return this.state.noWebGl?this.renderMissing():i.createElement(\"div\",{className:\"msp-viewport\"},i.createElement(\"div\",{className:\"msp-viewport-host3d\",ref:this.container},i.createElement(\"canvas\",{ref:this.canvas})),this.state.showLogo&&i.createElement(y,null));},t;}(l.PluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;}),r.d(t,\"c\",function(){return a;});var n=13330===new Uint16Array(new Uint8Array([18,52]).buffer)[0];function i(e,t){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),i=0,a=e.length;i<a;i+=t)for(var o=0;o<t;o++)n[i+t-o-1]=e[i+o];return r;}function a(e){if(e.length>28672){for(var t=[],r=0;r<e.length;r+=28672)t.push(String.fromCharCode.apply(null,e.subarray(r,r+28672)));return t.join(\"\");}return String.fromCharCode.apply(null,e);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(57),a=r(62),o=r(7),s=r(188);!function(e){e.Descriptor={name:\"chem_comp_bond\",cifExport:{prefix:\"\",categories:[{name:\"chem_comp_bond\",instance:function instance(t){var r=e.Provider.get(t.firstModel);if(!r)return a.a.Category.Empty;var n=r.data;if(!n)return a.a.Category.Empty;for(var i=t.structures[0].uniqueResidueNames,o=n.comp_id,s=n._rowCount,u=[],c=0;c<s;c++)i.has(o.value(c))&&(u[u.length]=c);return a.a.Category.ofTable(n,u);}}]}},e.Provider=s.a.create(e.Descriptor),e.chemCompBondFromTable=function(e,t){return o.d.pick(t,i.a.chem_comp_bond,function(r){return e.properties.chemicalComponentMap.has(t.comp_id.value(r));});},e.getEntriesFromChemCompBond=function(e){var r=new Map();function n(e){var n=new t(e);return r.set(e,n),n;}for(var i=e.comp_id,a=e.atom_id_1,o=e.atom_id_2,s=e.value_order,u=e.pdbx_aromatic_flag,c=e._rowCount,l=n(i.value(0)),d=0;d<c;d++){var f=i.value(d),p=a.value(d),m=o.value(d),h=s.value(d),g=\"Y\"===u.value(d);l.id!==f&&(l=n(f));var v=1,b=1;switch(g&&(v|=16),h.toLowerCase()){case\"doub\":case\"delo\":b=2;break;case\"trip\":b=3;break;case\"quad\":b=4;}l.add(p,m,b,v);}return r;};var t=function(){function e(e){this.id=e,this.map=new Map();}return e.prototype.add=function(e,t,r,n,i){void 0===i&&(i=!0);var a=this.map.get(e);if(void 0!==a){void 0===a.get(t)&&a.set(t,{order:r,flags:n});}else{var o=new Map();o.set(t,{order:r,flags:n}),this.map.set(e,o);}i&&this.add(t,e,r,n,!1);},e;}();e.Entry=t;}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return s;}),r.d(t,\"a\",function(){return u;});var n=r(27),i=r(6),a=r(62),o=r(7);function s(e){var t=function(e){for(var t=new Set(),r=[],a=0,o=e.structures;a<o.length;a++)for(var s=o[a],u=n.d.Location.create(s),c=0,l=s.units;c<l.length;c++){var d=l[c],f=d.conformation.operator;if(f.suffix&&0===d.kind){u.unit=d;for(var p=d.elements,m=i.Segmentation.transientSegments(d.model.atomicHierarchy.chainAtomSegments,p);m.hasNext;){var h=m.move();u.element=p[h.start];var g=n.e.chain.label_asym_id(u),v=\"\"+g+f.suffix;if(!t.has(v)){t.add(v);var b=n.e.chain.label_asym_id(u);r.push({label_asym_id:g,auth_asym_id:b,operator:f});}}}}return r;}(e);if(0!==t.length)return[f,t,{ignoreFilter:!0}];}var u={molstar_atom_site_operator_mapping:{label_asym_id:o.a.Schema.Str(),auth_asym_id:o.a.Schema.Str(),operator_name:o.a.Schema.Str(),suffix:o.a.Schema.Str(),assembly_id:o.a.Schema.Str(),assembly_operator_id:o.a.Schema.Int(),symmetry_operator_index:o.a.Schema.Int(),symmetry_hkl:o.a.Schema.Vector(3),ncs_id:o.a.Schema.Str()}},c=function c(e,t){return void 0===t[e].operator.assembly?1:0;},l=function l(e,t){return-1===t[e].operator.spgrOp?1:0;},d=a.a.fields().str(\"label_asym_id\",function(e,t){return t[e].label_asym_id;}).str(\"auth_asym_id\",function(e,t){return t[e].auth_asym_id;}).str(\"operator_name\",function(e,t){return t[e].operator.name;}).str(\"suffix\",function(e,t){return t[e].operator.suffix;}).str(\"assembly_id\",function(e,t){var r;return(null===(r=t[e].operator.assembly)||void 0===r?void 0:r.id)||\"\";},{valueKind:c}).int(\"assembly_operator_id\",function(e,t){var r;return(null===(r=t[e].operator.assembly)||void 0===r?void 0:r.operId)||0;},{valueKind:c}).int(\"symmetry_operator_index\",function(e,t){return t[e].operator.spgrOp;},{valueKind:l}).vec(\"symmetry_hkl\",[function(e,t){return t[e].operator.hkl[0];},function(e,t){return t[e].operator.hkl[1];},function(e,t){return t[e].operator.hkl[2];}],{valueKind:l}).str(\"ncs_id\",function(e,t){return t[e].operator.ncsId||\"\";},{valueKind:function valueKind(e,t){return t[e].operator.ncsId?0:1;}}).getFields(),f={name:\"molstar_atom_site_operator_mapping\",instance:function instance(e){return{fields:d,source:[{data:e,rowCount:e.length}]};}};},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return l;}),r.d(t,\"a\",function(){return p;}),r.d(t,\"b\",function(){return m;});var n=r(0),i=r(4),a=r(24),o=r(2),s=r(111),u=Object(a.Color)(16448250),c=Object(n.__assign)({asymId:o.ParamDefinition.Select(\"auth\",o.ParamDefinition.arrayToOptions([\"auth\",\"label\"]))},Object(s.b)({type:\"colors\",colorList:\"many-distinct\"}));function l(e){return o.ParamDefinition.clone(c);}function d(e,t){var r=function(e,t){switch(e.kind){case 0:return\"auth\"===t?i.StructureProperties.chain.auth_asym_id:i.StructureProperties.chain.label_asym_id;case 1:case 2:return i.StructureProperties.coarse.asym_id;}}(e.unit,t)(e);return e.structure.models.length>1?f(e.unit.model,r):r;}function f(e,t){return t+\" | \"+((i.Model.Index.get(e).value||0)+1);}function p(e,t){var r,n;if(e.structure){var a=i.StructureElement.Location.create(e.structure),o=function(e,t){for(var r=new Map(),n=function n(_n7){var a=i.Model.AsymIdOffset.get(_n7).value,o=(\"auth\"===t?null==a?void 0:a.auth:null==a?void 0:a.label)||0;_n7.properties.structAsymMap.forEach(function(i,a){var s=i.auth_id,u=\"auth\"===t?s:a,c=e.models.length>1?f(_n7,u):u;r.has(c)||r.set(c,r.size+o);});},a=0,o=e.models;a<o.length;a++){n(o[a]);}return r;}(e.structure.root,t.asymId),c=Array.from(o.keys());t.palette.params.valueLabel=function(e){return c[e];};var l=Object(s.a)(o.size,t);n=l.legend,r=function r(e){var r=void 0;if(i.StructureElement.Location.is(e)){var n=d(e,t.asymId);r=o.get(n);}else if(i.Bond.isLocation(e)){a.unit=e.aUnit,a.element=e.aUnit.elements[e.aIndex];n=d(a,t.asymId);r=o.get(n);}return void 0===r?u:l.color(r);};}else r=function r(){return u;};return{factory:p,granularity:\"group\",color:r,props:t,description:\"Gives every chain a color based on its `asym_id` value.\",legend:n};}var m={name:\"chain-id\",label:\"Chain Id\",category:\"Chain Property\",factory:p,getParams:l,defaultValues:o.ParamDefinition.getDefaultValues(c),isApplicable:function isApplicable(e){return!!e.structure;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;}),r.d(t,\"b\",function(){return u;});var n=r(0),i=r(3),a=r(19),o=r(5),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isChanging:!1,current:0},t.begin=function(){t.setState({isChanging:!0});},t.end=function(e){t.setState({isChanging:!1}),t.props.onChange(e);},t.updateCurrent=function(e){t.setState({current:e});},t.updateManually=function(e){t.setState({isChanging:!0});var r=e;1===t.props.step&&(r=Math.round(r)),r<t.props.min&&(r=t.props.min),r>t.props.max&&(r=t.props.max),t.setState({current:r,isChanging:!0});},t.onManualBlur=function(){t.setState({isChanging:!1}),t.props.onChange(t.state.current);},t;}return Object(n.__extends)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isChanging||e.value===t.current?null:{current:e.value};},t.prototype.render=function(){var e=this.props.step;return void 0===e&&(e=1),i.createElement(\"div\",{className:\"msp-slider\"},i.createElement(\"div\",null,i.createElement(g,{min:this.props.min,max:this.props.max,step:e,value:this.state.current,disabled:this.props.disabled,onBeforeChange:this.begin,onChange:this.updateCurrent,onAfterChange:this.end})),i.createElement(\"div\",null,i.createElement(a.TextInput,{numeric:!0,delayMs:50,value:this.state.current,blurOnEnter:!0,onBlur:this.onManualBlur,isDisabled:this.props.disabled,onChange:this.updateManually})));},t;}(i.Component),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isChanging:!1,current:[0,1]},t.begin=function(){t.setState({isChanging:!0});},t.end=function(e){t.setState({isChanging:!1}),t.props.onChange(e);},t.updateCurrent=function(e){t.setState({current:e});},t.updateMax=function(e){var r=e;1===t.props.step&&(r=Math.round(r)),r<t.state.current[0]?r=t.state.current[0]:r<t.props.min&&(r=t.props.min),r>t.props.max&&(r=t.props.max),t.props.onChange([t.state.current[0],r]);},t.updateMin=function(e){var r=e;1===t.props.step&&(r=Math.round(r)),r<t.props.min&&(r=t.props.min),r>t.state.current[1]?r=t.state.current[1]:r>t.props.max&&(r=t.props.max),t.props.onChange([r,t.state.current[1]]);},t;}return Object(n.__extends)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isChanging||e.value[0]===t.current[0]&&e.value[1]===t.current[1]?null:{current:e.value};},t.prototype.render=function(){var e=this.props.step;return void 0===e&&(e=1),i.createElement(\"div\",{className:\"msp-slider2\"},i.createElement(\"div\",null,i.createElement(a.TextInput,{numeric:!0,delayMs:50,value:this.state.current[0],onEnter:this.props.onEnter,blurOnEnter:!0,isDisabled:this.props.disabled,onChange:this.updateMin})),i.createElement(\"div\",null,i.createElement(g,{min:this.props.min,max:this.props.max,step:e,value:this.state.current,disabled:this.props.disabled,onBeforeChange:this.begin,onChange:this.updateCurrent,onAfterChange:this.end,range:!0,pushable:!0})),i.createElement(\"div\",null,i.createElement(a.TextInput,{numeric:!0,delayMs:50,value:this.state.current[1],onEnter:this.props.onEnter,blurOnEnter:!0,isDisabled:this.props.disabled,onChange:this.updateMax})));},t;}(i.Component);function c(e){for(var t=[],r={}.hasOwnProperty,n=0;n<arguments.length;n++){var i=arguments[n];if(i){var a=typeof_default()(i);if(\"string\"===a||\"number\"===a)t.push(i);else if(Array.isArray(i))t.push(c.apply(null,i));else if(\"object\"===a)for(var o in i)r.call(i,o)&&i[o]&&t.push(o);}}return t.join(\" \");}function l(e){return e.touches.length>1||\"touchend\"===e.type.toLowerCase()&&e.touches.length>0;}function d(e,t){return e?t.touches[0].clientY:t.touches[0].pageX;}function f(e,t){return e?t.clientY:t.pageX;}function p(e,t){var r=t.getBoundingClientRect();return e?r.top+.5*r.height:r.left+.5*r.width;}function m(e){e.stopPropagation(),e.preventDefault();}var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,r=e.tipFormatter,n=e.vertical,a=e.offset,o=e.value,s=e.index,u=n?{bottom:a+\"%\"}:{left:a+\"%\"};return i.createElement(\"div\",{className:t,style:u,title:r(o,s)});},t;}(i.Component),g=function(e){function t(t){var r=e.call(this,t)||this;r.sliderElement=i.createRef(),r.handleElements=[],r.dragOffset=0,r.startPosition=0,r.startValue=0,r._getPointsCache=void 0,r.onMouseDown=function(e){if(0===e.button){var t=f(r.props.vertical,e);if(r.isEventFromHandle(e)){var n=p(r.props.vertical,e.target);r.dragOffset=t-n,t=n;}else r.dragOffset=0;r.onStart(t),r.addDocumentEvents(\"mouse\"),m(e);}},r.onTouchMove=function(e){if(l(e))r.end(\"touch\");else{var t=d(r.props.vertical,e);r.onMove(e,t-r.dragOffset);}},r.onTouchStart=function(e){if(!l(e)){var t=d(r.props.vertical,e);if(r.isEventFromHandle(e)){var n=p(r.props.vertical,e.target);r.dragOffset=t-n,t=n;}else r.dragOffset=0;r.onStart(t),r.addDocumentEvents(\"touch\"),m(e);}},r.eventHandlers={touchmove:function touchmove(e){return r.onTouchMove(e);},touchend:function touchend(e){return r.end(\"touch\");},mousemove:function mousemove(e){return r.onMouseMove(e);},mouseup:function mouseup(e){return r.end(\"mouse\");}},r.calcOffset=function(e){var t=r.props,n=t.min;return 100*((e-n)/(t.max-n));};var n,a=t.range,o=t.min,s=t.max,u=a?Array.apply(null,Array(+a+1)).map(function(){return o;}):o,c=\"defaultValue\"in t?t.defaultValue:u,h=void 0!==t.value?t.value:c,g=(a?h:[o,h]).map(function(e){return r.trimAlignValue(e);});return n=a&&g[0]===g[g.length-1]&&g[0]===s?0:g.length-1,r.state={handle:null,recent:n,bounds:g},r;}return Object(n.__extends)(t,e),t.prototype.componentDidUpdate=function(e){var t=this;if(\"value\"in this.props||\"min\"in this.props||\"max\"in this.props){var r=this.state.bounds;if(e.range){var n=(i=this.props.value||r).map(function(e){return t.trimAlignValue(e,t.props);});if(n.every(function(e,t){return e===r[t];}))return;this.setState({bounds:n}),r.some(function(e){return t.isValueOutOfBounds(e,t.props);})&&this.props.onChange(n);}else{var i=void 0!==this.props.value?this.props.value:r[1],a=this.trimAlignValue(i,this.props);if(a===r[1]&&r[0]===e.min)return;this.setState({bounds:[e.min,a]}),this.isValueOutOfBounds(r[1],this.props)&&this.props.onChange(a);}}},t.prototype.onChange=function(e){var t=this.props;!(\"value\"in t)?this.setState(e):void 0!==e.handle&&this.setState({handle:e.handle});var r=Object(n.__assign)(Object(n.__assign)({},this.state),e),i=t.range?r.bounds:r.bounds[1];t.onChange(i);},t.prototype.onMouseMove=function(e){var t=f(this.props.vertical,e);this.onMove(e,t-this.dragOffset);},t.prototype.onMove=function(e,t){m(e);var r=this.props,i=this.state,a=t-this.startPosition,o=(a=this.props.vertical?-a:a)/this.getSliderLength()*(r.max-r.min),s=this.trimAlignValue(this.startValue+o);if(s!==i.bounds[i.handle]){var u=Object(n.__spreadArrays)(i.bounds);u[i.handle]=s;var c=i.handle;if(!1!==r.pushable){var l=i.bounds[c];this.pushSurroundingHandles(u,c,l);}else r.allowCross&&(u.sort(function(e,t){return e-t;}),c=u.indexOf(s));this.onChange({handle:c,bounds:u});}},t.prototype.onStart=function(e){this.props.onBeforeChange(this.getValue());var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;var r=this.state,i=r.bounds,a=1;if(this.props.range){for(var o=0,s=1;s<i.length-1;++s)t>i[s]&&(o=s);Math.abs(i[o+1]-t)<Math.abs(i[o]-t)&&(o+=1),a=o;var u=i[o+1]===i[o];u&&(a=r.recent),u&&t!==i[o+1]&&(a=t<i[o+1]?o:o+1);}if(this.setState({handle:a,recent:a}),t!==r.bounds[a]){var c=Object(n.__spreadArrays)(r.bounds);c[a]=t,this.onChange({bounds:c});}},t.prototype.getPoints=function(){var e=this.props,t=e.marks,r=e.step,i=e.min,a=e.max,o=this._getPointsCache;if(!o||o.marks!==t||o.step!==r){var s=Object(n.__assign)({},t);if(null!==r)for(var u=i;u<=a;u+=r)s[u]=u;var c=Object.keys(s).map(parseFloat);c.sort(function(e,t){return e-t;}),this._getPointsCache={marks:t,step:r,points:c};}return this._getPointsCache.points;},t.prototype.getPrecision=function(e){var t=e.toString(),r=0;return t.indexOf(\".\")>=0&&(r=t.length-t.indexOf(\".\")-1),r;},t.prototype.getSliderLength=function(){var e=this.sliderElement.current;return e?this.props.vertical?e.clientHeight:e.clientWidth:0;},t.prototype.getSliderStart=function(){var e=this.sliderElement.current.getBoundingClientRect();return this.props.vertical?e.top:e.left;},t.prototype.getValue=function(){var e=this.state.bounds;return this.props.range?e:e[1];},t.prototype.addDocumentEvents=function(e){\"touch\"===e?(document.addEventListener(\"touchmove\",this.eventHandlers.touchmove),document.addEventListener(\"touchend\",this.eventHandlers.touchend)):\"mouse\"===e&&(document.addEventListener(\"mousemove\",this.eventHandlers.mousemove),document.addEventListener(\"mouseup\",this.eventHandlers.mouseup));},t.prototype.calcValue=function(e){var t=this.props,r=t.vertical,n=t.min,i=t.max,a=Math.abs(e/this.getSliderLength());return r?(1-a)*(i-n)+n:a*(i-n)+n;},t.prototype.calcValueByPos=function(e){var t=e-this.getSliderStart();return this.trimAlignValue(this.calcValue(t));},t.prototype.end=function(e){this.removeEvents(e),this.props.onAfterChange(this.getValue()),this.setState({handle:null});},t.prototype.isEventFromHandle=function(e){for(var t=0,r=this.handleElements;t<r.length;t++){if(r[t].current===e.target)return!0;}return!1;},t.prototype.isValueOutOfBounds=function(e,t){return e<t.min||e>t.max;},t.prototype.pushHandle=function(e,t,r,n){for(var i=e[t],a=e[t];r*(a-i)<n;){if(!this.pushHandleOnePoint(e,t,r))return e[t]=i,!1;a=e[t];}return!0;},t.prototype.pushHandleOnePoint=function(e,t,r){var n=this.getPoints(),i=n.indexOf(e[t])+r;if(i>=n.length||i<0)return!1;var a=t+r,o=n[i],s=this.props.pushable,u=r*(e[a]-o);return!!this.pushHandle(e,a,r,+s-u)&&(e[t]=o,!0);},t.prototype.pushSurroundingHandles=function(e,t,r){var n=this.props.pushable,i=e[t],a=0;if(e[t+1]-i<n?a=1:i-e[t-1]<n&&(a=-1),0!==a){var o=t+a,s=a*(e[o]-i);this.pushHandle(e,o,a,+n-s)||(e[t]=r);}},t.prototype.removeEvents=function(e){\"touch\"===e?(document.removeEventListener(\"touchmove\",this.eventHandlers.touchmove),document.removeEventListener(\"touchend\",this.eventHandlers.touchend)):\"mouse\"===e&&(document.removeEventListener(\"mousemove\",this.eventHandlers.mousemove),document.removeEventListener(\"mouseup\",this.eventHandlers.mouseup));},t.prototype.trimAlignValue=function(e,t){var r=this.state||{},i=r.handle,a=r.bounds,o=Object(n.__assign)(Object(n.__assign)({},this.props),t||{}),s=o.marks,u=o.step,c=o.min,l=o.max,d=o.allowCross,f=e;f<=c&&(f=c),f>=l&&(f=l),!d&&null!=i&&i>0&&f<=a[i-1]&&(f=a[i-1]),!d&&null!=i&&i<a.length-1&&f>=a[i+1]&&(f=a[i+1]);var p=Object.keys(s).map(parseFloat);if(null!==u){var m=Math.round((f-c)/u)*u+c;p.push(m);}var h=p.map(function(e){return Math.abs(f-e);}),g=p[h.indexOf(Math.min.apply(Math,h))];return null!==u?parseFloat(g.toFixed(this.getPrecision(u))):g;},t.prototype.render=function(){var e,t=this,r=this.state,a=r.handle,s=r.bounds,u=this.props,l=u.className,d=u.prefixCls,f=u.disabled,p=u.vertical,m=u.range,h=u.step,g=u.marks,v=u.tipFormatter,b=this.props.handle,y=s.map(this.calcOffset),_=d+\"-handle\",S=s.map(function(e,t){var r;return c(((r={})[_]=!0,r[_+\"-\"+(t+1)]=!0,r[_+\"-lower\"]=0===t,r[_+\"-upper\"]=t===s.length-1,r));}),O={prefixCls:d,noTip:null===h||null===v,tipFormatter:v,vertical:p};if(this.handleElements.length!==s.length){this.handleElements=[];for(var x=0;x<s.length;x++)this.handleElements.push(i.createRef());}var C=s.map(function(e,r){return i.cloneElement(b,Object(n.__assign)(Object(n.__assign)({},O),{className:S[r],value:e,offset:y[r],dragging:a===r,index:r,key:r,ref:t.handleElements[r]}));});m||C.shift();var w=c(((e={})[d]=!0,e[d+\"-with-marks\"]=Object.keys(g).length,e[d+\"-disabled\"]=f,e[d+\"-vertical\"]=this.props.vertical,e[l]=!!l,e));return i.createElement(\"div\",{ref:this.sliderElement,className:w,onTouchStart:f?o.k:this.onTouchStart,onMouseDown:f?o.k:this.onMouseDown},i.createElement(\"div\",{className:d+\"-rail\"}),C);},t.defaultProps={prefixCls:\"msp-slider-base\",className:\"\",min:0,max:100,step:1,marks:{},handle:i.createElement(h,{className:\"\",vertical:!1,offset:0,tipFormatter:function tipFormatter(e){return e;},value:0,index:0}),onBeforeChange:o.k,onChange:o.k,onAfterChange:o.k,tipFormatter:function tipFormatter(e,t){return e;},disabled:!1,range:!1,vertical:!1,allowCross:!0,pushable:!1},t;}(i.Component);},function(e,t,r){\"use strict\";function n(e){return e.toISOString().replace(/T/,\" \").replace(/\\..+/,\"\");}function i(){var e=new Date();return e.getFullYear()+\"-\"+(e.getMonth()+1)+\"-\"+e.getDate()+\"-\"+e.getHours()+\"-\"+e.getMinutes()+\"-\"+e.getSeconds();}r.d(t,\"a\",function(){return n;}),r.d(t,\"b\",function(){return i;});},function(e,t,r){\"use strict\";function n(e){try{e.dispatchEvent(new MouseEvent(\"click\"));}catch(r){var t=document.createEvent(\"MouseEvents\");t.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t);}}function i(e,t){if(void 0===t&&(t=\"download\"),e)if(\"download\"in HTMLAnchorElement.prototype){var r=document.createElement(\"a\");r.download=t,r.rel=\"noopener\",\"string\"==typeof e?(r.href=e,n(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){return URL.revokeObjectURL(r.href);},4e4),setTimeout(function(){return n(r);}));}else if(\"undefined\"!=typeof navigator&&navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(e,t);else{var i=window.navigator.userAgent,a=/Safari/i.test(i),o=/CriOS\\/[\\d]+/.test(i),s=function s(e){var t;t=o?e:e.replace(/^data:[^;]*;/,\"data:attachment/file;\"),window.open(t,\"_blank\")||(window.location.href=t);};if((a||o)&&FileReader){if(e instanceof Blob){var u=new FileReader();u.onloadend=function(){return s(u.result);},u.readAsDataURL(e);}else s(e);}else{var c=URL.createObjectURL(e);location.href=c,setTimeout(function(){return URL.revokeObjectURL(c);},4e4);}}}r.d(t,\"a\",function(){return i;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return p;});var n=r(24),i=r(2),a=r(108),o=r(140),s=r(200),u=Object(n.Color)(13421772),c=Object(n.ColorMap)({HydrogenBond:2851770,Hydrophobic:8421504,HalogenBond:4259775,Ionic:15779860,MetalCoordination:9191577,CationPi:16744448,PiStacking:9220966,WeakHydrogenBond:12967404}),l=[[\"Hydrogen Bond\",c.HydrogenBond],[\"Hydrophobic\",c.Hydrophobic],[\"Halogen Bond\",c.HalogenBond],[\"Ionic\",c.Ionic],[\"Metal Coordination\",c.MetalCoordination],[\"Cation Pi\",c.CationPi],[\"Pi Stacking\",c.PiStacking],[\"Weak HydrogenBond\",c.WeakHydrogenBond]];function d(e){switch(e){case 4:return c.HydrogenBond;case 6:return c.Hydrophobic;case 5:return c.HalogenBond;case 1:return c.Ionic;case 7:return c.MetalCoordination;case 2:return c.CationPi;case 3:return c.PiStacking;case 8:return c.WeakHydrogenBond;case 0:return u;}}var f={};var p={name:\"interaction-type\",label:\"Interaction Type\",category:\"Miscellaneous\",factory:function e(t,r){var n=t.structure?a.a.get(t.structure):void 0,i=null==n?void 0:n.version;return{factory:e,granularity:\"group\",color:n&&n.value?function(e){if(s.a.isLocation(e)){var t=e.data.interactions,r=t.unitsContacts,n=t.contacts,i=e.element,a=i.unitA,o=i.unitB,c=i.indexA,l=i.indexB;if(a===o){var f=r.get(a.id),p=f.getDirectedEdgeIndex(c,l);return d(f.edgeProps.type[p]);}p=n.getEdgeIndex(c,a,l,o);return d(n.edges[p].props.type);}return u;}:function(){return u;},props:r,contextHash:i,description:\"Assigns colors according the interaction type of a link.\",legend:Object(o.b)(l)};},getParams:function getParams(e){return f;},defaultValues:i.ParamDefinition.getDefaultValues(f),isApplicable:function isApplicable(e){return!!e.structure;},ensureCustomProperties:{attach:function attach(e,t){return t.structure?a.a.attach(e,t.structure,void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.customPropertyDescriptors.reference(a.a.descriptor,!1);}}};},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return u;});var n=r(0),i=r(283),a=r(2),o={cameraHelper:a.ParamDefinition.Group(i.b)},s=a.ParamDefinition.getDefaultValues(o),u=function(){function e(e,t,r,a,o,u,c){void 0===c&&(c={}),this.webgl=e,this.renderer=t,this.scene=r,this.camera=a,this.debugHelper=o,this.handleHelper=u;var l=e.gl,d=e.extensions,f=e.resources,p=l.drawingBufferWidth,m=l.drawingBufferHeight;this.colorTarget=e.createRenderTarget(p,m),this.packedDepth=!d.depthTexture,this.depthTarget=this.packedDepth?e.createRenderTarget(p,m):null,this.depthTexture=this.depthTarget?this.depthTarget.texture:f.texture(\"image-depth\",\"depth\",\"ushort\",\"nearest\"),this.packedDepth||(this.depthTexture.define(p,m),this.depthTexture.attachFramebuffer(this.colorTarget.framebuffer,\"depth\"));var h=Object(n.__assign)(Object(n.__assign)({},s),c);this.cameraHelper=new i.a(e,h.cameraHelper);}return e.prototype.setSize=function(e,t){this.colorTarget.setSize(e,t),this.depthTarget?this.depthTarget.setSize(e,t):this.depthTexture.define(e,t);},e.prototype.setProps=function(e){e.cameraHelper&&this.cameraHelper.setProps(e.cameraHelper);},Object.defineProperty(e.prototype,\"props\",{get:function get(){return{cameraHelper:Object(n.__assign)({},this.cameraHelper.props)};},enumerable:!1,configurable:!0}),e.prototype.render=function(e,t){var r=this.webgl,n=this.renderer,i=this.colorTarget,a=this.depthTarget;e?r.unbindFramebuffer():(i.bind(),this.packedDepth||this.depthTexture.attachFramebuffer(this.colorTarget.framebuffer,\"depth\")),n.setViewport(0,0,i.getWidth(),i.getHeight()),this.renderInternal(\"color\",t),!e&&a&&(a.bind(),this.renderInternal(\"depth\",t));},e.prototype.renderInternal=function(e,t){var r=this,n=r.renderer,i=r.scene,a=r.camera,o=r.debugHelper,s=r.cameraHelper,u=r.handleHelper;n.render(i,a,e,!0,t),o.isEnabled&&(o.syncVisibility(),n.render(o.scene,a,e,!1,t)),u.isEnabled&&n.render(u.scene,a,e,!1,t),s.isEnabled&&(s.update(a),n.render(s.scene,s.camera,e,!1,t));},e;}();},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return i;}),r.d(t,\"a\",function(){return a;});var n=r(0);function i(e,t){var r=window.innerWidth,n=window.innerHeight;t!==document.body&&(r=t.offsetWidth,n=t.offsetHeight),function(e,t,r){e.width=Math.round(window.devicePixelRatio*t),e.height=Math.round(window.devicePixelRatio*r),Object.assign(e.style,{width:t+\"px\",height:r+\"px\"});}(e,r,n);}function a(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(n){return[2,new Promise(function(n,i){var a=function a(e){e?n(e):i(\"no blob returned\");};HTMLCanvasElement.prototype.toBlob?e.toBlob(a,t,r):function(e,t,r,n){for(var i=atob(e.toDataURL(r,n).split(\",\")[1]),a=i.length,o=a>>2,s=new Uint8Array(a),u=new Uint32Array(s.buffer,0,o),c=0,l=0;l<o;++l)u[l]=i.charCodeAt(c++)|i.charCodeAt(c++)<<8|i.charCodeAt(c++)<<16|i.charCodeAt(c++)<<24;for(var d=3&a;d--;)s[c]=i.charCodeAt(c++);t(new Blob([s],{type:r||\"image/png\"}));}(e,a,t,r);})];});});}},function(e,t,r){\"use strict\";r.d(t,\"c\",function(){return z;}),r.d(t,\"a\",function(){return H;}),r.d(t,\"d\",function(){return K;}),r.d(t,\"b\",function(){return Z;});var n,i=r(0),a=r(91),o=r(260),s=r(16),u=r(61);function c(e){var t=Object(a.g)(e);if(null===t)throw new Error('Could not find support for \"instanced_arrays\"');var r=Object(a.j)(e);if(null===r)throw new Error('Could not find support for \"texture_float\"');var n=Object(a.e)(e);if(null===n)throw new Error('Could not find support for \"element_index_uint\"');var i=Object(a.i)(e);u.a&&null===i&&console.log('Could not find support for \"standard_derivatives\"');var o=Object(a.k)(e);u.a&&null===o&&console.log('Could not find support for \"texture_float_linear\"');var s=Object(a.c)(e);u.a&&null===s&&console.log('Could not find support for \"depth_texture\"');var c=Object(a.a)(e);u.a&&null===c&&console.log('Could not find support for \"blend_minmax\"');var l=Object(a.l)(e);u.a&&null===l&&console.log('Could not find support for \"vertex_array_object\"');var d=Object(a.f)(e);u.a&&null===d&&console.log('Could not find support for \"frag_depth\"');var f=Object(a.b)(e);u.a&&null===f&&console.log('Could not find support for \"color_buffer_float\"');var p=Object(a.d)(e);u.a&&null===p&&console.log('Could not find support for \"draw_buffers\"');var m=Object(a.h)(e);return u.a&&null===m&&console.log('Could not find support for \"shader_texture_lod\"'),{instancedArrays:t,standardDerivatives:i,textureFloat:r,textureFloatLinear:o,elementIndexUint:n,depthTexture:s,blendMinMax:c,vertexArrayObject:l,fragDepth:d,colorBufferFloat:f,drawBuffers:p,shaderTextureLod:m};}!function(e){e.create=function(e,t,r){return{array:e,width:t,height:r};},e.flipY=function(e){for(var t=e.array,r=e.width,n=e.height,i=4*r,a=0,o=n/2;a<o;++a)for(var s=0,u=i;s<u;++s){var c=a*i+s,l=(n-a-1)*i+s,d=t[c];t[c]=t[l],t[l]=d;}return e;};}(n||(n={}));var l=r(92);function d(e,t){switch(t){case\"f\":case\"f[]\":return e.FLOAT;case\"i\":case\"i[]\":return e.INT;case\"v2\":case\"v2[]\":return e.FLOAT_VEC2;case\"v3\":case\"v3[]\":return e.FLOAT_VEC3;case\"v4\":case\"v4[]\":return e.FLOAT_VEC4;case\"m3\":case\"m3[]\":return e.FLOAT_MAT3;case\"m4\":case\"m4[]\":return e.FLOAT_MAT4;default:console.error(\"unknown uniform kind '\"+t+\"'\");}}function f(e,t,r){e.uniform1f(t,r);}function p(e,t,r){e.uniform1fv(t,r);}function m(e,t,r){e.uniform1i(t,r);}function h(e,t,r){e.uniform1iv(t,r);}function g(e,t,r){e.uniform2fv(t,r);}function v(e,t,r){e.uniform3fv(t,r);}function b(e,t,r){e.uniform4fv(t,r);}function y(e,t,r){e.uniformMatrix3fv(t,!1,r);}function _(e,t,r){e.uniformMatrix4fv(t,!1,r);}function S(e){switch(e){case\"f\":return f;case\"f[]\":return p;case\"i\":case\"t\":return m;case\"i[]\":case\"t[]\":return h;case\"v2\":case\"v2[]\":return g;case\"v3\":case\"v3[]\":return v;case\"v4\":case\"v4[]\":return b;case\"m3\":case\"m3[]\":return y;case\"m4\":case\"m4[]\":return _;}}var O=r(280),x=r(96),C=Object(x.a)();function w(e){var t=e.createProgram();if(null===t)throw new Error(\"Could not create WebGL program\");return t;}function P(e,t,r,n,i){var a,o,s=i.defineValues,c=i.shaderCode,f=i.schema,p=w(e),m=C(),h=Object(l.i)(e,r,s,c),g=n(\"vert\",h.vert),v=n(\"frag\",h.frag);function b(){g.attach(p),v.attach(p),e.linkProgram(p),u.a&&function(e,t){if(!e.getProgramParameter(t,e.LINK_STATUS))throw new Error(\"Could not compile WebGL program. \\n\\n\"+e.getProgramInfoLog(t));}(e,p),a=function(e,t,r){var n={};return Object.keys(r).forEach(function(i){var a=r[i];if(\"attribute\"===a.type){var o=e.getAttribLocation(t,i);n[i]=o;}else if(\"uniform\"===a.type||\"texture\"===a.type){o=e.getUniformLocation(t,i);n[i]=o;}}),n;}(e,p,f),o=function(e){var t={};return Object.keys(e).forEach(function(r){var n=e[r];\"uniform\"===n.type?t[r]=S(n.kind):\"texture\"===n.type&&(t[r]=S(\"t\"));}),t;}(f),u.a&&(function(e,t,r){for(var n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<n;++i){var a=e.getActiveAttrib(t,i);if(a){var o=a.name,s=a.type;if(o.startsWith(\"__activeAttribute\"))continue;var u=r[o];if(void 0===u)throw new Error(\"missing 'uniform' or 'texture' with name '\"+o+\"' in schema\");if(\"attribute\"!==u.type)throw new Error(\"'\"+o+\"' must be of type 'attribute' but is '\"+u.type+\"'\");if(Object(O.d)(e,u.kind,u.itemSize)!==s)throw new Error(\"unexpected attribute type for \"+o);}}}(e,p,f),function(e,t,r){for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<n;++i){var a=e.getActiveUniform(t,i);if(a){var o=a.name,s=a.type;if(o.startsWith(\"__activeUniform\"))continue;var u=r[o.replace(/[[0-9]+\\]$/,\"\")];if(void 0===u)throw new Error(\"missing 'uniform' or 'texture' with name '\"+o+\"' in schema\");if(\"uniform\"===u.type){if(d(e,u.kind)!==s)throw new Error(\"unexpected uniform type for \"+o);}else{if(\"texture\"!==u.type)throw new Error(\"'\"+o+\"' must be of type 'uniform' or 'texture' but is '\"+u.type+\"'\");if(\"image-float32\"===u.kind||\"image-uint8\"===u.kind){if(s!==e.SAMPLER_2D)throw new Error(\"unexpected sampler type for '\"+o+\"'\");}else if((\"volume-float32\"===u.kind||\"volume-uint8\"===u.kind)&&s!==e.SAMPLER_3D)throw new Error(\"unexpected sampler type for '\"+o+\"'\");}}}}(e,p,f));}b();var y=!1;return{id:m,use:function use(){t.currentProgramId=m,e.useProgram(p);},setUniforms:function setUniforms(t){for(var r=0,n=t.length;r<n;++r){var i=t[r],s=i[0],u=i[1];if(u){var c=a[s];null!==c&&o[s](e,c,u.ref.value);}}},bindAttributes:function bindAttributes(e){for(var t=0,r=e.length;t<r;++t){var n=e[t],i=n[0],o=n[1],s=a[i];-1!==s&&o.bind(s);}},bindTextures:function bindTextures(t){for(var r=0,n=t.length;r<n;++r){var i=t[r],s=i[0],u=i[1],c=a[s];null!==c&&(u.bind(r),o[s](e,c,r));}},reset:function reset(){p=w(e),b();},destroy:function destroy(){y||(g.destroy(),v.destroy(),e.deleteProgram(p),y=!0);}};}var j=Object(x.a)();function E(e,t){var r=t.type,n=t.source,i=e.createShader(\"vert\"===r?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(null===i)throw new Error(\"Error creating \"+r+\" shader\");if(e.shaderSource(i,n),e.compileShader(i),u.a&&!1===e.getShaderParameter(i,e.COMPILE_STATUS))throw console.warn(\"'\"+r+\"' shader info log '\"+e.getShaderInfoLog(i)+\"'\\n\"+function(e){for(var t=e.split(\"\\n\"),r=0;r<t.length;++r)t[r]=r+1+\": \"+t[r];return t.join(\"\\n\");}(n)),new Error(\"Error compiling \"+r+\" shader\");return i;}function A(e,t,r){var n=new Map();return{get:function get(r){var i,a,o=e(r),s=n.get(o);return s||(i=t(r),void 0===a&&(a=0),s={value:i,usageCount:a},n.set(o,s)),s.usageCount+=1,function(e){return{free:function free(){e.usageCount-=1;},value:e.value};}(s);},clear:function clear(){n.forEach(function(e,t){e.usageCount<=0&&(e.usageCount<0&&console.warn(\"Reference usageCount below zero.\"),r(e.value),n.delete(t));});},get count(){return n.size;},dispose:function dispose(){n.forEach(function(e){return r(e.value);}),n.clear();}};}var T=r(9),D=Object(x.a)();function I(e){var t=e.createRenderbuffer();if(null===t)throw new Error(\"Could not create WebGL renderbuffer\");return t;}var M=r(362),k=Object(x.a)();function B(e){var t=e.vertexArrayObject;if(!t)throw new Error(\"VertexArrayObject not supported\");var r=t.createVertexArray();if(!r)throw new Error(\"Could not create WebGL vertex array\");return r;}function V(e){var t=e.vertexArrayObject;if(null===t)throw new Error(\"VertexArrayObject not supported\");return t;}function R(e){return Object(i.__assign)(Object(i.__assign)({},e.value),{destroy:function destroy(){e.free();}});}function L(e,t,r,n){var a={attribute:new Set(),elements:new Set(),framebuffer:new Set(),program:new Set(),renderbuffer:new Set(),shader:new Set(),texture:new Set(),vertexArray:new Set()};function s(e,t){return a[e].add(t),r.resourceCounts[e]+=1,Object(i.__assign)(Object(i.__assign)({},t),{destroy:function destroy(){t.destroy(),a[e].delete(t),r.resourceCounts[e]-=1;}});}var c=A(function(e){return JSON.stringify(e);},function(t){return s(\"shader\",function(e,t){var r=E(e,t);return{id:j(),attach:function attach(t){e.attachShader(t,r);},reset:function reset(){r=E(e,t);},destroy:function destroy(){e.deleteShader(r);}};}(e,t));},function(e){e.destroy();});function l(e,t){return R(c.get({type:e,source:t}));}var d=A(function(e){var t=[e.shaderCode.id];return Object.keys(e.defineValues).forEach(function(r){return t.push(Object(T.m)(r),\"boolean\"==typeof(n=e.defineValues[r].ref.value)?n?1:0:\"number\"==typeof n?n:Object(T.m)(n));var n;}),Object(T.l)(t).toString();},function(r){return s(\"program\",P(e,t,n,l,r));},function(e){e.destroy();});return{attribute:function attribute(t,r,i,a){return s(\"attribute\",Object(O.a)(e,n,t,r,i,a));},elements:function elements(t,r){return s(\"elements\",Object(O.c)(e,t,r));},framebuffer:function framebuffer(){return s(\"framebuffer\",Object(o.b)(e));},program:function program(e,t,r){return R(d.get({defineValues:e,shaderCode:t,schema:r}));},renderbuffer:function renderbuffer(t,r,n,i){return s(\"renderbuffer\",function(e,t,r,n,i){var a=I(e),s=function s(){return e.bindRenderbuffer(e.RENDERBUFFER,a);},c=function(e,t){switch(t){case\"depth16\":return e.DEPTH_COMPONENT16;case\"stencil8\":return e.STENCIL_INDEX8;case\"rgba4\":return e.RGBA4;case\"depth-stencil\":return e.DEPTH_STENCIL;}}(e,t),l=function(e,t){switch(t){case\"depth\":return e.DEPTH_ATTACHMENT;case\"stencil\":return e.STENCIL_ATTACHMENT;case\"depth-stencil\":return e.DEPTH_STENCIL_ATTACHMENT;case\"color0\":return e.COLOR_ATTACHMENT0;}}(e,r);function d(){s(),e.renderbufferStorage(e.RENDERBUFFER,c,n,i);}d();var f=!1;return{id:D(),bind:s,attachFramebuffer:function attachFramebuffer(t){t.bind(),s(),e.framebufferRenderbuffer(e.FRAMEBUFFER,l,e.RENDERBUFFER,a),u.a&&Object(o.a)(e);},setSize:function setSize(e,t){n=e,i=t,d();},reset:function reset(){a=I(e),d();},destroy:function destroy(){f||(e.deleteRenderbuffer(a),f=!0);}};}(e,t,r,n,i));},shader:l,texture:function texture(t,r,i,a){return s(\"texture\",Object(M.a)(e,n,t,r,i,a));},vertexArray:function vertexArray(e,t,r){return s(\"vertexArray\",function(e,t,r,n){var i=k(),a=B(e),o=V(e);function s(){o.bindVertexArray(a),n&&n.bind(),t.bindAttributes(r),o.bindVertexArray(null);}s();var u=!1;return{id:i,bind:function bind(){o.bindVertexArray(a);},update:s,reset:function reset(){a=B(e),o=V(e),s();},destroy:function destroy(){u||(o.deleteVertexArray(a),u=!0);}};}(n,e,t,r));},reset:function reset(){a.attribute.forEach(function(e){return e.reset();}),a.elements.forEach(function(e){return e.reset();}),a.framebuffer.forEach(function(e){return e.reset();}),a.renderbuffer.forEach(function(e){return e.reset();}),a.shader.forEach(function(e){return e.reset();}),a.program.forEach(function(e){return e.reset();}),a.vertexArray.forEach(function(e){return e.reset();}),a.texture.forEach(function(e){return e.reset();});},destroy:function destroy(){a.attribute.forEach(function(e){return e.destroy();}),a.elements.forEach(function(e){return e.destroy();}),a.framebuffer.forEach(function(e){return e.destroy();}),a.renderbuffer.forEach(function(e){return e.destroy();}),a.shader.forEach(function(e){return e.destroy();}),a.program.forEach(function(e){return e.destroy();}),a.vertexArray.forEach(function(e){return e.destroy();}),a.texture.forEach(function(e){return e.destroy();}),c.clear(),d.clear();}};}var N=Object(x.a)();var F=r(278),U=r(83);function z(e,t){function r(r){try{return e.getContext(r,t);}catch(e){return null;}}return r(\"webgl2\")||r(\"webgl\")||r(\"experimental-webgl\");}function H(e){var t=e.getError();if(t!==e.NO_ERROR)throw new Error(\"WebGL error: '\"+function(e,t){switch(t){case e.NO_ERROR:return\"no error\";case e.INVALID_ENUM:return\"invalid enum\";case e.INVALID_VALUE:return\"invalid value\";case e.INVALID_OPERATION:return\"invalid operation\";case e.INVALID_FRAMEBUFFER_OPERATION:return\"invalid framebuffer operation\";case e.OUT_OF_MEMORY:return\"out of memory\";case e.CONTEXT_LOST_WEBGL:return\"context lost\";}return\"unknown error\";}(e,t)+\"'\");}function G(e){e.bindFramebuffer(e.FRAMEBUFFER,null);}var q=new Uint8Array(4);function W(e,t,r){e.getSyncParameter(t,e.SYNC_STATUS)===e.SIGNALED?(e.deleteSync(t),r()):s.a.setImmediate(W,e,t,r);}function Q(e,t){var r=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0);r?s.a.setImmediate(W,e,r,t):(console.warn(\"Could not create a WebGLSync object\"),e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,q),t());}var Y=!1;function X(e){e.bindFramebuffer(e.FRAMEBUFFER,null),e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,q);}function K(e,t,r,n,i,a){if(u.a&&Object(o.a)(e),a instanceof Uint8Array)e.readPixels(t,r,n,i,e.RGBA,e.UNSIGNED_BYTE,a);else{if(!(a instanceof Float32Array))throw new Error(\"unsupported readPixels buffer type\");e.readPixels(t,r,n,i,e.RGBA,e.FLOAT,a);}u.a&&H(e);}function Z(e){var t=this,r=c(e),o=function(e){var t={},r=e.getParameter(e.FRONT_FACE),n=e.getParameter(e.CULL_FACE_MODE),i=e.getParameter(e.DEPTH_WRITEMASK),a=e.getParameter(e.COLOR_WRITEMASK),o=e.getParameter(e.COLOR_CLEAR_VALUE),s=e.getParameter(e.BLEND_SRC_RGB),u=e.getParameter(e.BLEND_DST_RGB),c=e.getParameter(e.BLEND_SRC_ALPHA),l=e.getParameter(e.BLEND_DST_ALPHA),d=e.getParameter(e.BLEND_EQUATION_RGB),f=e.getParameter(e.BLEND_EQUATION_ALPHA);return{currentProgramId:-1,currentMaterialId:-1,currentRenderItemId:-1,enable:function enable(r){!0!==t[r]&&(e.enable(r),t[r]=!0);},disable:function disable(r){!1!==t[r]&&(e.disable(r),t[r]=!1);},frontFace:function frontFace(t){t!==r&&(e.frontFace(t),r=t);},cullFace:function cullFace(t){t!==n&&(e.cullFace(t),n=t);},depthMask:function depthMask(t){t!==i&&(e.depthMask(t),i=t);},colorMask:function colorMask(t,r,n,i){t===a[0]&&r===a[1]&&n===a[2]&&i===a[3]||(e.colorMask(t,r,n,i),a[0]=t,a[1]=r,a[2]=n,a[3]=i);},clearColor:function clearColor(t,r,n,i){t===o[0]&&r===o[1]&&n===o[2]&&i===o[3]||(e.clearColor(t,r,n,i),o[0]=t,o[1]=r,o[2]=n,o[3]=i);},blendFunc:function blendFunc(t,r){t===s&&r===u&&t===c&&r===l||(e.blendFunc(t,r),s=t,u=r,c=t,l=r);},blendFuncSeparate:function blendFuncSeparate(t,r,n,i){t===s&&r===u&&n===c&&i===l||(e.blendFuncSeparate(t,r,n,i),s=t,u=r,c=n,l=i);},blendEquation:function blendEquation(t){t===d&&t===f||(e.blendEquation(t),d=t,f=t);},blendEquationSeparate:function blendEquationSeparate(t,r){t===d&&r===f||(e.blendEquationSeparate(t,r),d=t,f=r);},reset:function reset(){t={},r=e.getParameter(e.FRONT_FACE),n=e.getParameter(e.CULL_FACE_MODE),i=e.getParameter(e.DEPTH_WRITEMASK),a=e.getParameter(e.COLOR_WRITEMASK),o=e.getParameter(e.COLOR_CLEAR_VALUE),s=e.getParameter(e.BLEND_SRC_RGB),u=e.getParameter(e.BLEND_DST_RGB),c=e.getParameter(e.BLEND_SRC_ALPHA),l=e.getParameter(e.BLEND_DST_ALPHA),d=e.getParameter(e.BLEND_EQUATION_RGB),f=e.getParameter(e.BLEND_EQUATION_ALPHA);}};}(e),s={resourceCounts:{attribute:0,elements:0,framebuffer:0,program:0,renderbuffer:0,shader:0,texture:0,vertexArray:0},drawCount:0,instanceCount:0,instancedDrawCount:0},u=L(e,o,s,r),l={maxTextureSize:e.getParameter(e.MAX_TEXTURE_SIZE),maxRenderbufferSize:e.getParameter(e.MAX_RENDERBUFFER_SIZE),maxDrawBuffers:Object(a.m)(e)?e.getParameter(e.MAX_DRAW_BUFFERS):0,maxVertexTextureImageUnits:e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)};if(l.maxVertexTextureImageUnits<8)throw new Error('Need \"MAX_VERTEX_TEXTURE_IMAGE_UNITS\" >= 8');var d,f=!1,p=new F.a(0);if(Object(a.m)(e)){var m=e.createBuffer(),h=void 0,g=void 0,v=!1,b=function b(){e.bindBuffer(e.PIXEL_PACK_BUFFER,m),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,h),e.bindBuffer(e.PIXEL_PACK_BUFFER,null),v=!1,g(),g=void 0,h=void 0;};d=function d(t,r,n,i,a){return new Promise(function(o,s){v?s(\"Can not call multiple readPixelsAsync at the same time\"):(v=!0,e.bindBuffer(e.PIXEL_PACK_BUFFER,m),e.bufferData(e.PIXEL_PACK_BUFFER,n*i*4,e.STREAM_READ),e.readPixels(t,r,n,i,e.RGBA,e.UNSIGNED_BYTE,0),e.bindBuffer(e.PIXEL_PACK_BUFFER,null),g=o,h=a,Q(e,b));});};}else d=function d(r,n,a,o,s){return Object(i.__awaiter)(t,void 0,void 0,function(){return Object(i.__generator)(this,function(t){return K(e,r,n,a,o,s),[2];});});};var y=new Set();return{gl:e,isWebGL2:Object(a.m)(e),get pixelRatio(){return\"undefined\"!=typeof window?window.devicePixelRatio:1;},extensions:r,state:o,stats:s,resources:u,get maxTextureSize(){return l.maxTextureSize;},get maxRenderbufferSize(){return l.maxRenderbufferSize;},get maxDrawBuffers(){return l.maxDrawBuffers;},get isContextLost(){return f||e.isContextLost();},contextRestored:p,setContextLost:function setContextLost(){f=!0;},handleContextRestored:function handleContextRestored(){Object.assign(r,c(e)),o.reset(),o.currentMaterialId=-1,o.currentProgramId=-1,o.currentRenderItemId=-1,u.reset(),y.forEach(function(e){return e.reset();}),f=!1,p.next(Object(U.b)());},createRenderTarget:function createRenderTarget(t,r){var a=function(e,t,r,i){var a={array:new Uint8Array(r*i*4),width:r,height:i},o=t.framebuffer(),s=t.texture(\"image-uint8\",\"rgba\",\"ubyte\",\"linear\"),u=t.renderbuffer(\"depth16\",\"depth\",r,i);function c(){s.load(a),s.attachFramebuffer(o,\"color0\"),u.attachFramebuffer(o);}c();var l=!1;function d(t,n,a,s,u){o.bind(),e.viewport(0,0,r,i),K(e,t,n,a,s,u);}function f(){return d(0,0,r,i,a.array),a.array;}return{id:N(),image:a,texture:s,framebuffer:o,getWidth:function getWidth(){return r;},getHeight:function getHeight(){return i;},bind:function bind(){o.bind(),e.viewport(0,0,r,i);},setSize:function setSize(e,t){r=e,i=t,a.array=new Uint8Array(r*i*4),a.width=r,a.height=i,s.load(a),u.setSize(r,i);},readBuffer:d,getBuffer:f,getPixelData:function getPixelData(){return n.flipY(n.create(f(),r,i));},reset:function reset(){c();},destroy:function destroy(){l||(s.destroy(),o.destroy(),u.destroy(),l=!0);}};}(e,u,t,r);return y.add(a),Object(i.__assign)(Object(i.__assign)({},a),{destroy:function destroy(){a.destroy(),y.delete(a);}});},unbindFramebuffer:function unbindFramebuffer(){return G(e);},readPixels:function readPixels(t,r,n,i,a){K(e,t,r,n,i,a);},readPixelsAsync:d,waitForGpuCommandsComplete:function waitForGpuCommandsComplete(){return function(e){return new Promise(function(t){Object(a.m)(e)?Q(e,t):(Y||(console.info(\"Sync object not supported in WebGL\"),Y=!0),X(e),t());});}(e);},waitForGpuCommandsCompleteSync:function waitForGpuCommandsCompleteSync(){return X(e);},getDrawingBufferPixelData:function getDrawingBufferPixelData(){return function(e){var t=e.drawingBufferWidth,r=e.drawingBufferHeight,i=new Uint8Array(t*r*4);return G(e),e.viewport(0,0,t,r),K(e,0,0,t,r,i),n.flipY(n.create(i,t,r));}(e);},destroy:function destroy(){u.destroy(),function(e){for(var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),r=0;r<t;++r)e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null),Object(a.m)(e)&&(e.bindTexture(e.TEXTURE_2D_ARRAY,null),e.bindTexture(e.TEXTURE_3D,null));var n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n);var i=e.getParameter(e.MAX_VERTEX_ATTRIBS);for(r=0;r<i;++r)e.vertexAttribPointer(r,1,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindRenderbuffer(e.RENDERBUFFER,null),G(e);}(e);}};}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return k;});var n=r(0),i=r(2),a=r(40),o=r(54),s=r(4),u=r(1),c=r(23),l=r(6),d=r(39),f=r(108),p=r(63),m=r(48),h=r(86),g=r(200);function v(e,t,r,i,a,o){return Object(n.__awaiter)(this,void 0,void 0,function(){var c,l,m,h,g,v,b,y,_,S,O,x,C,w,P;return Object(n.__generator)(this,function(n){return s.Unit.isAtomic(t)?(c=s.StructureElement.Location.create(r,t),l=f.a.get(r).value,m=l.unitsFeatures.get(t.id),h=l.unitsContacts.get(t.id),g=m.x,v=m.y,b=m.z,y=m.members,_=m.offsets,S=h.edgeCount,O=h.a,x=h.b,C=h.edgeProps.flag,w=a.sizeFactor,S?(P={linkCount:2*S,position:function position(e,t,r){u.Vec3.set(e,g[O[r]],v[O[r]],b[O[r]]),u.Vec3.set(t,g[x[r]],v[x[r]],b[x[r]]);},style:function style(e){return p.c.Dashed;},radius:function radius(e){c.element=t.elements[y[_[O[e]]]];var r=i.size.size(c);c.element=t.elements[y[_[x[e]]]];var n=i.size.size(c);return Math.min(r,n)*w;},ignore:function ignore(e){return 1===C[e];}},[2,Object(p.d)(e,P,a,o)]):[2,d.a.createEmpty(o)]):[2,d.a.createEmpty(o)];});});}var b=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},m.c),p.a),{sizeFactor:i.ParamDefinition.Numeric(.3,{min:0,max:10,step:.01})});function y(e){return Object(m.d)({defaultProps:i.ParamDefinition.getDefaultValues(b),createGeometry:v,createLocationIterator:O,getLoci:_,eachLocation:S,setUpdateState:function setUpdateState(e,t,r,n,i,a,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments;var s=f.a.get(a.structure).version;e.info.interactionsHash!==s&&(e.createGeometry=!0,e.updateTransform=!0,e.info.interactionsHash=s);}},e);}function _(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group,u=o.unitMap.get(s.units[i].id),l=f.a.get(o).value,d=l.unitsContacts.get(u.id),p=d.a,m=d.b;return g.a.Loci(o,l,[{unitA:u,indexA:p[a],unitB:u,indexB:m[a]},{unitA:u,indexA:m[a],unitB:u,indexB:p[a]}]);}return c.EmptyLoci;}function S(e,t,r){var n=!1;if(g.a.isLoci(e)){var i=t.structure,a=t.group;if(!s.Structure.areEquivalent(e.data.structure,i))return!1;var o=f.a.get(i).value;if(e.data.interactions!==o)return!1;for(var u=a.units[0],c=o.unitsContacts.get(u.id),d=2*c.edgeCount,p=0,m=e.elements;p<m.length;p++){var h=m[p],v=a.unitIndexMap.get(h.unitA.id);if(void 0!==v){var b=c.getDirectedEdgeIndex(h.indexA,h.indexB);-1!==b&&r(l.Interval.ofSingleton(v*d+b))&&(n=!0);}}}return n;}function O(e){var t=e.structure,r=e.group,n=r.units[0],i=f.a.get(t).value,a=i.unitsContacts.get(n.id),o=2*a.edgeCount,s=r.units.length,u=g.a.Location(i,t),c=u.element;return Object(h.a)(o,s,function(e,t){var n=r.units[t];return c.unitA=n,c.indexA=a.a[e],c.unitB=n,c.indexB=a.b[e],u;});}var x=r(110),C=s.StructureElement.Location.create(void 0);function w(e,t,r,n,i){if(!t.hasAtomic)return d.a.createEmpty(i);var a=f.a.get(t).value,o=a.contacts,s=a.unitsFeatures,c=o.edgeCount,l=o.edges,m=n.sizeFactor;if(!c)return d.a.createEmpty(i);var h={linkCount:c,position:function position(e,t,r){var n=l[r],i=n.unitA,a=n.indexA,o=n.unitB,c=n.indexB,d=s.get(i.id),f=s.get(o.id);u.Vec3.set(e,d.x[a],d.y[a],d.z[a]),u.Vec3.transformMat4(e,e,i.conformation.operator.matrix),u.Vec3.set(t,f.x[c],f.y[c],f.z[c]),u.Vec3.transformMat4(t,t,o.conformation.operator.matrix);},style:function style(e){return p.c.Dashed;},radius:function radius(e){var n=l[e],i=s.get(n.unitA.id);C.structure=t,C.unit=n.unitA,C.element=n.unitA.elements[i.members[i.offsets[n.indexA]]];var a=r.size.size(C),o=s.get(n.unitB.id);C.unit=n.unitB,C.element=n.unitB.elements[o.members[o.offsets[n.indexB]]];var u=r.size.size(C);return Math.min(a,u)*m;},ignore:function ignore(e){return 1===l[e].props.flag;}};return Object(p.d)(e,h,n,i);}var P=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},x.c),p.a),{sizeFactor:i.ParamDefinition.Numeric(.3,{min:0,max:10,step:.01})});function j(e){return Object(x.d)({defaultProps:i.ParamDefinition.getDefaultValues(P),createGeometry:w,createLocationIterator:T,getLoci:E,eachLocation:A,setUpdateState:function setUpdateState(e,t,r,n,i,a,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments;var s=f.a.get(a).version;e.info.interactionsHash!==s&&(e.createGeometry=!0,e.updateTransform=!0,e.info.interactionsHash=s);}},e);}function E(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=f.a.get(t).value,o=a.contacts.edges[i];return g.a.Loci(t,a,[{unitA:o.unitA,indexA:o.indexA,unitB:o.unitB,indexB:o.indexB},{unitA:o.unitB,indexA:o.indexB,unitB:o.unitA,indexB:o.indexA}]);}return c.EmptyLoci;}function A(e,t,r){var n=!1;if(g.a.isLoci(e)){if(!s.Structure.areEquivalent(e.data.structure,t))return!1;var i=f.a.get(t).value;if(e.data.interactions!==i)return!1;for(var a=i.contacts,o=0,u=e.elements;o<u.length;o++){var c=u[o],d=a.getEdgeIndex(c.indexA,c.unitA,c.indexB,c.unitB);-1!==d&&r(l.Interval.ofSingleton(d))&&(n=!0);}}return n;}function T(e){var t=f.a.get(e).value,r=t.contacts,n=r.edgeCount,i=g.a.Location(t,e),a=i.element;return Object(h.a)(n,1,function(e){var t=r.edges[e];return a.unitA=t.unitA,a.indexA=t.indexA,a.unitB=t.unitB,a.indexB=t.indexB,i;},!0);}var D=r(94),I={\"intra-unit\":function intraUnit(e,t){return Object(o.d)(\"Intra-unit interactions cylinder\",e,t,y);},\"inter-unit\":function interUnit(e,t){return Object(o.a)(\"Inter-unit interactions cylinder\",e,t,j);}},M=Object(n.__assign)(Object(n.__assign)(Object(n.__assign)({},b),P),{unitKinds:Object(D.i)([\"atomic\"]),sizeFactor:i.ParamDefinition.Numeric(.2,{min:.01,max:1,step:.01}),visuals:i.ParamDefinition.MultiSelect([\"intra-unit\",\"inter-unit\"],i.ParamDefinition.objectToOptions(I))});var k=Object(o.b)({name:\"interactions\",label:\"Non-covalent Interactions\",description:\"Displays non-covalent interactions as dashed cylinders.\",factory:function factory(e,t){return a.a.createMulti(\"Interactions\",e,t,o.c,I);},getParams:function getParams(e,t){return i.ParamDefinition.clone(M);},defaultValues:i.ParamDefinition.getDefaultValues(M),defaultColorTheme:{name:\"interaction-type\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;},ensureCustomProperties:{attach:function attach(e,t){return f.a.attach(e,t,void 0,!0);},detach:function detach(e){return f.a.ref(e,!1);}}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n={HIS:\"H\",ARG:\"R\",LYS:\"K\",ILE:\"I\",PHE:\"F\",LEU:\"L\",TRP:\"W\",ALA:\"A\",MET:\"M\",PRO:\"P\",CYS:\"C\",ASN:\"N\",VAL:\"V\",GLY:\"G\",SER:\"S\",GLN:\"Q\",TYR:\"Y\",ASP:\"D\",GLU:\"E\",THR:\"T\",SEC:\"U\",PYL:\"O\"},i={DA:\"A\",DC:\"C\",DG:\"G\",DT:\"T\",DU:\"U\"},a={A:\"A\",C:\"C\",G:\"G\",T:\"T\",U:\"U\"};function o(e){return n[e]||\"X\";}function s(e){return a[e]||\"X\";}function u(e){return i[e]||\"X\";}var c,l=r(7);!function(e){e.getSequenceString=function(e){var t=e.code.toArray();return(t instanceof Array?t:Array.from(t)).join(\"\");},e.ofResidueNames=function(e,r){if(0===r.rowCount)throw new Error(\"cannot be empty\");var n=function(e){for(var t=0,r=Math.min(e.rowCount,10);t<r;t++){var n=e.value(t)||\"\";if(\"X\"!==o(n))return\"protein\";if(\"X\"!==s(n))return\"RNA\";if(\"X\"!==u(n))return\"DNA\";}return\"generic\";}(e);return new t(n,e,r);};var t=function(){function e(e,t,r){this.kind=e,this.microHet=new Map();for(var n=function(e,t){var r;switch(e){case\"protein\":r=o;break;case\"DNA\":r=u;break;case\"RNA\":r=s;break;case\"generic\":r=function r(){return\"X\";};break;default:throw new Error(\"unknown kind '\"+e+\"'\");}return t&&t.size>0?function(e){var n=r(e);return\"X\"===n&&t.has(e)?r(t.get(e)):n;}:r;}(e),i=[],a=[],c=[],d=new Map(),f=0,p=new Map(),m=0,h=r.rowCount;m<h;++m){var g=r.value(m);if(p.has(g))d.has(g)?d.get(g).push(t.value(m)):d.set(g,[a[p.get(g)],t.value(m)]);else{p.set(g,f);var v=t.value(m);a[f]=v,c[f]=g,i[f]=n(v),f+=1;}}var b=[];for(m=0,h=f;m<h;++m){var y=d.get(c[m]);if(y){var _=y.map(function(e){var t=n(e);return\"X\"===t?e:t;});b[m]=\"(\"+_.join(\"|\")+\")\";}else b[m]=\"X\"===i[m]?a[f]:i[m];}this.length=f,this.code=l.a.ofStringArray(i),this.compId=l.a.ofStringArray(a),this.seqId=l.a.ofIntArray(c),this.label=l.a.ofStringArray(b),this.microHet=d,this.indexMap=p;}return e.prototype.index=function(e){return this.indexMap.get(e);},e;}();e.ofSequenceRanges=function(e,t){return new r(\"generic\",e,t);};var r=function(){function e(e,t,r){this.kind=e,this.seqIdStart=t,this.seqIdEnd=r,this.microHet=new Map();for(var n=0,i=Number.MAX_SAFE_INTEGER,a=0,o=this.seqIdStart.rowCount;a<o;a++){var s=this.seqIdStart.value(a),u=this.seqIdEnd.value(a);s<i&&(i=s),n<u&&(n=u);}var c=n-i+1;this.code=l.a.ofConst(\"X\",c,l.a.Schema.str),this.label=l.a.ofConst(\"\",c,l.a.Schema.str),this.seqId=l.a.ofLambda({value:function value(e){return e+i+1;},rowCount:c,schema:l.a.Schema.int}),this.compId=l.a.ofConst(\"\",c,l.a.Schema.str),this.length=c,this.minSeqId=i;}return e.prototype.index=function(e){return e-this.minSeqId;},e;}();}(c||(c={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return u;}),r.d(t,\"a\",function(){return f;});var n=r(21),i=r(35),a=r(69),o=r(44),s=r(60);function u(e,t,r,n){return function(i){return i.lift(new c(e,t,r,n));};}var c=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n;}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector));},e;}(),l=function(e){function t(t,r,n,i,a){var o=e.call(this,t)||this;return o.keySelector=r,o.elementSelector=n,o.durationSelector=i,o.subjectSelector=a,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o;}return n.a(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e);}catch(e){return void this.error(e);}this._group(e,t);},t.prototype._group=function(e,t){var r=this.groups;r||(r=this.groups=new Map());var n,i=r.get(t);if(this.elementSelector)try{n=this.elementSelector(e);}catch(e){this.error(e);}else n=e;if(!i){i=this.subjectSelector?this.subjectSelector():new s.a(),r.set(t,i);var a=new f(t,i,this);if(this.destination.next(a),this.durationSelector){var o=void 0;try{o=this.durationSelector(new f(t,i));}catch(e){return void this.error(e);}this.add(o.subscribe(new d(t,i,this)));}}i.closed||i.next(n);},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e);}),t.clear()),this.destination.error(e);},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete();}),e.clear()),this.destination.complete();},t.prototype.removeGroup=function(e){this.groups.delete(e);},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this));},t;}(i.a),d=function(e){function t(t,r,n){var i=e.call(this,r)||this;return i.key=t,i.group=r,i.parent=n,i;}return n.a(t,e),t.prototype._next=function(e){this.complete();},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t);},t;}(i.a),f=function(e){function t(t,r,n){var i=e.call(this)||this;return i.key=t,i.groupSubject=r,i.refCountSubscription=n,i;}return n.a(t,e),t.prototype._subscribe=function(e){var t=new a.a(),r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t;},t;}(o.a),p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r;}return n.a(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe());},t;}(a.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(43),o=r(88),s=r(5),u=r(140),c={domain:[0,1],reverse:!1,listOrName:\"red-yellow-blue\",minLabel:\"\",maxLabel:\"\"};!function(e){e.create=function(e){var t=Object(i.__assign)(Object(i.__assign)({},c),e),r=t.domain,n=t.reverse,l=t.listOrName,d=\"string\"==typeof l?Object(o.getColorListFromName)(l).list:l,f=n?d.slice().reverse():d,p=f.length-1,m=0,h=0,g=0;function v(e,t){m=(g=t)-(h=e)||1;}v(r[0],r[1]);var b=Object(s.i)(e.minLabel,h.toString()),y=Object(s.i)(e.maxLabel,g.toString());function _(e){var t=Math.min(f.length-1,Math.max(0,(e-h)/m*p)),r=Math.floor(t),n=f[r],i=f[Math.ceil(t)];return a.Color.interpolate(n,i,t-r);}return{color:_,colorToArray:function colorToArray(e,t,r){a.Color.toArray(_(e),t,r);},normalizedColorToArray:function normalizedColorToArray(e,t,r){a.Color.toArrayNormalized(_(e),t,r);},setDomain:v,get legend(){return Object(u.a)(b,y,f);}};};}(n||(n={}));},function(e,t,r){\"use strict\";function n(e,t){for(var r=0,n=e.length;r<n;r++)if(t(e[r]))return e[r];}function i(e){if(Array.from)return Array.from(e);for(var t=[];;){var r=e.next(),n=r.done,i=r.value;if(n)break;t[t.length]=i;}return t;}function a(e,t,r){for(var n=t-e+1,i=r?new r(n):new Int32Array(n),a=0;a<n;a++)i[a]=a+e;return i;}function o(e,t){for(var r=new(function(e){var t=e.constructor;if(!t)throw new Error(\"data does not define a constructor and it should\");return t;}(e))(t.length),n=0,i=t.length;n<i;n++)r[n]=e[t[n]];return r;}r.d(t,\"a\",function(){return n;}),r.d(t,\"d\",function(){return i;}),r.d(t,\"c\",function(){return a;}),r.d(t,\"b\",function(){return o;});},function(e,t,r){\"use strict\";(function(e,n,i){r.d(t,\"a\",function(){return u;});var a=r(0);var o=void 0!==n?\"undefined\"!=typeof window?{setImmediate:function setImmediate(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(t=window).setImmediate.apply(t,Object(a.__spreadArrays)([e],r));},clearImmediate:function clearImmediate(e){return window.clearImmediate(e);}}:{setImmediate:n,clearImmediate:i}:function(){var t,r,n,i,a,o,s,u=(t=\"undefined\"!=typeof window&&window,r=\"undefined\"!=typeof self&&\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,t||void 0!==u&&u||r),c={},l=\"undefined\"!=typeof document?document:void 0,d=1;function f(e){delete c[e];}function p(e){var t=c[e];f(e),function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r);}}(t);}return void 0!==e&&\"[object process]\"==={}.toString.call(e)?n=function n(t){e.nextTick(function(){p(t);});}:function(){if(u&&u.postMessage&&!u.importScripts){var e=!0,t=u.onmessage;return u.onmessage=function(){e=!1;},u.postMessage(\"\",\"*\"),u.onmessage=t,e;}}()?(o=\"setImmediate$\"+Math.random()+\"$\",s=function s(e){e.source===u&&\"string\"==typeof e.data&&0===e.data.indexOf(o)&&p(+e.data.slice(o.length));},window.addEventListener?window.addEventListener(\"message\",s,!1):window.attachEvent(\"onmessage\",s),n=function n(e){window.postMessage(o+e,\"*\");}):\"undefined\"!=typeof MessageChannel?((a=new MessageChannel()).port1.onmessage=function(e){p(e.data);},n=function n(e){a.port2.postMessage(e);}):l&&\"onreadystatechange\"in l.createElement(\"script\")?(i=l.documentElement,n=function n(e){var t=l.createElement(\"script\");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null;},i.appendChild(t);}):n=function n(e){setTimeout(p,0,e);},{setImmediate:function setImmediate(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];\"function\"!=typeof e&&(e=new Function(\"\"+e));var i={callback:e,args:t};return c[d]=i,n(d),d++;},clearImmediate:f};}();function s(e){o.setImmediate(e);}var u={setImmediate:o.setImmediate,clearImmediate:o.clearImmediate,immediatePromise:function immediatePromise(){return new Promise(s);},delay:function delay(e,t){return void 0===t&&(t=void 0),new Promise(function(r){return setTimeout(r,e,t);});}};}).call(this,r(383),r(384).setImmediate,r(384).clearImmediate);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(5),o=r(2);!function(e){function t(e){var t={create:function create(e){return{action:t,params:e};},id:a.c.create22(),definition:e,createDefaultParams:function createDefaultParams(t,r){return e.params?o.ParamDefinition.getDefaultValues(e.params(t,r)):{};}};return t;}var r;e.create=t,e.fromTransformer=function(e){var r=e.definition;return t({from:r.from,display:r.display,params:r.params,isApplicable:e.definition.isApplicable?function(t,r,n){return e.definition.isApplicable(t,n);}:void 0,run:function run(t){var r=t.cell,n=t.state,i=t.params,a=n.build().to(r.transform.ref).apply(e,i);return n.updateTree(a);}});},function(e){e.build=function(e){return function(e){return function(r){return t(Object(i.__assign)({from:e.from instanceof Array?e.from:e.from?[e.from]:[],display:\"string\"==typeof e.display?{name:e.display}:e.display?e.display:{name:\"Unnamed State Action\"},params:\"object\"==typeof_default()(e.params)?function(){return e.params;}:e.params?e.params:void 0,isApplicable:e.isApplicable},\"function\"==typeof r?{run:r}:r));};}(e);};}(r=e.Builder||(e.Builder={})),e.build=r.build;}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(5);!function(e){e.create=function(e,t,r,n){return{id:i.c.create22(),label:e,basic:t,sourceData:n,bonds:r};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(6),a=r(112),o=r(9),s=r(79),u=r(274),c=r(10),l=r(166);!function(e){function t(e){for(var t=[],r=0,n=e.elements;r<n.length;r++){var a=(y=n[r]).unit,u=y.indices;if(0!==i.OrderedSet.size(u)){var c=[],l=[];if(i.OrderedSet.isInterval(u))1===i.OrderedSet.size(u)?l.push(i.Interval.min(u)):c.push(i.Interval.min(u),i.Interval.max(u));else for(var d=0,f=u.length;d<f;){var p=d;for(d++;d<f&&u[d-1]+1===u[d];)d++;var m=d;if(m-p>2)c.push(u[p],u[m-1]);else for(var h=p;h<m;h++)l[l.length]=u[h];}t.push({unit:a,set:i.SortedArray.ofSortedArray(l),ranges:s.a.ofSortedRanges(c)});}}for(var g=new Map(),v=(d=0,t.length);d<v;++d){var b,y=t[d],_=Object(o.i)(Object(o.l)(y.ranges),Object(o.l)(y.set));if(g.has(_))(b=g.get(_).groupedUnits).has(y.unit.invariantId)?b.get(y.unit.invariantId).push(y.unit.id):b.set(y.unit.invariantId,[y.unit.id]);else(b=new Map()).set(y.unit.invariantId,[y.unit.id]),g.set(_,{groupedUnits:b,set:y.set,ranges:y.ranges});}var S=[];return g.forEach(function(e){var t=[];e.groupedUnits.forEach(function(e){return t.push(i.SortedArray.ofUnsortedArray(e));}),t.sort(function(e,t){return e[0]-t[0];}),S.push({groupedUnits:t,set:e.set,ranges:e.ranges});}),{hash:e.structure.hashCode,elements:S};}function r(e,t){for(var r=[],n=0,i=e.length;n<i;++n){var a=e[n];t.unitMap.has(a)&&r.push(t.unitMap.get(a));}return r;}function n(e){return c.MolScriptBuilder.internal.generator.bundleElement({groupedUnits:c.MolScriptBuilder.core.type.list(e.groupedUnits.map(function(e){return c.MolScriptBuilder.core.type.list(e);})),ranges:c.MolScriptBuilder.core.type.list(e.ranges),set:c.MolScriptBuilder.core.type.list(e.set)});}e.Empty={hash:-1,elements:[]},e.fromSubStructure=function(e,r){return t(l.d.toLociWithSourceUnits(l.d.Singletons(e,r)));},e.fromSelection=function(e){return t(l.d.toLociWithSourceUnits(e));},e.fromLoci=t,e.toLoci=function(e,t){-1!==e.hash&&e.hash!==t.hashCode&&new Error(\"Bundle not compatible with given structure\");for(var n=[],a=0,o=e.elements;a<o.length;a++)for(var c=o[a],l=function l(e){var a=r(e,t);if(0===a.length)return\"continue\";var o=void 0;if(0===c.ranges.length)o=c.set;else if(0===c.set.length){if(2===c.ranges.length)o=i.Interval.ofRange(c.ranges[0],c.ranges[1]);else{var u=new Int32Array(s.a.size(c.ranges));s.a.forEach(c.ranges,function(e,t){return u[t]=e;}),o=i.SortedArray.ofSortedArray(u);}}else{var l=s.a.size(c.ranges),d=new Int32Array(c.set.length+l);s.a.forEach(c.ranges,function(e,t){return d[t]=e;}),d.set(c.set,l),o=i.SortedArray.ofUnsortedArray(d);}for(var f=0,p=a;f<p.length;f++){var m=p[f];n.push({unit:m,indices:o});}},d=0,f=c.groupedUnits;d<f.length;d++){l(f[d]);}return Object(u.a)(t,n);},e.toStructure=function(e,t){-1!==e.hash&&e.hash!==t.hashCode&&new Error(\"Bundle not compatible with given structure\");for(var n=[],o=0,u=e.elements;o<u.length;o++)for(var c=u[o],l=function l(e){var a=r(e,t);if(0===a.length)return\"continue\";var o=a[0].elements,u=s.a.size(c.ranges),l=c.set.length,d=new Int32Array(l+u),f=void 0;if(0===u){for(var p=0,m=l;p<m;++p)d[p]=o[c.set[p]];f=i.SortedArray.ofSortedArray(d);}else if(0===l)s.a.forEach(c.ranges,function(e,t){return d[t]=o[e];}),f=i.SortedArray.ofSortedArray(d);else if(i.SortedArray.min(c.set)>s.a.max(c.ranges)){s.a.forEach(c.ranges,function(e,t){return d[t]=o[e];});for(p=0,m=l;p<m;++p)d[p+u]=o[c.set[p]];f=i.SortedArray.ofSortedArray(d);}else if(s.a.min(c.ranges)>i.SortedArray.max(c.set)){for(p=0,m=l;p<m;++p)d[p]=o[c.set[p]];s.a.forEach(c.ranges,function(e,t){return d[t+l]=o[e];}),f=i.SortedArray.ofSortedArray(d);}else{s.a.forEach(c.ranges,function(e,t){return d[t]=o[e];});for(p=0,m=l;p<m;++p)d[p+u]=o[c.set[p]];f=i.SortedArray.ofUnsortedArray(d);}for(var h=0,g=a;h<g.length;h++){var v=g[h];n.push(v.getChild(f));}},d=0,f=c.groupedUnits;d<f.length;d++){l(f[d]);}return a.a.create(n,{parent:t});},e.toExpression=function(e){return c.MolScriptBuilder.internal.generator.bundle({elements:c.MolScriptBuilder.core.type.list(e.elements.map(n))});},e.areEqual=function(e,t){if(e.elements.length!==t.elements.length)return!1;for(var r=0,n=e.elements.length;r<n;++r){var a=e.elements[r],o=t.elements[r];if(a.groupedUnits.length!==o.groupedUnits.length)return!1;for(var u=0,c=o.groupedUnits.length;u<c;++u)if(!i.SortedArray.areEqual(a.groupedUnits[u],o.groupedUnits[u]))return!1;if(!i.SortedArray.areEqual(a.set,o.set))return!1;if(!s.a.areEqual(a.ranges,o.ranges))return!1;}return!0;};}(n||(n={}));},function(e,t,r){\"use strict\";var n,i=r(7),a=r(335);!function(e){var t={byEntityKey:{},sequences:[]};function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=[],n={},i=0,a=e.length;i<a;++i)r.push.apply(r,e[i].sequences),Object.assign(n,e[i].byEntityKey);return{sequences:r,byEntityKey:n};}function n(e,t){var r=t.atoms.label_comp_id,n=t.residues.label_seq_id,o=t.chainAtomSegments,s=t.residueAtomSegments,u=o.count,c=o.offsets,l={},d=[];if(1===u&&0===c[0]&&0===c[1])return{byEntityKey:l,sequences:d};for(var f=0,p=t.chains._rowCount;f<p;f++){var m=t.index.getEntityFromChain(f);if(void 0===l[m]&&\"polymer\"===e.data.type.value(m)){var h=f;for(f++;f<p&&m===t.index.getEntityFromChain(f)&&\"polymer\"!==e.data.type.value(m);)f++;f--;for(var g=s.index[c[h]],v=s.index[c[f+1]-1]+1,b=i.a.window(n,g,v),y=[],_=g;_<v;++_)y.push(r.value(s.offsets[_]));var S=i.a.ofStringArray(y);l[m]={entityId:e.data.id.value(m),sequence:a.a.ofResidueNames(S,b)},d.push(l[m]);}}return{byEntityKey:l,sequences:d};}function o(e,t){return r(s(e,t.spheres),s(e,t.gaussians));}function s(e,t){var r=t.chainElementSegments,n=t.seq_id_begin,o=t.seq_id_end,s=r.count,u=r.offsets,c={},l=[];if(1===s&&0===u[0]&&0===u[1])return{byEntityKey:c,sequences:l};for(var d=0,f=s;d<f;d++){var p=t.getEntityFromChain(d);if(void 0===c[p]){var m=d;for(d++;d<f&&p===t.getEntityFromChain(d);)d++;d--;var h=u[m],g=u[d+1]-1,v=i.a.window(n,h,g),b=i.a.window(o,h,g);c[p]={entityId:e.data.id.value(p),sequence:a.a.ofSequenceRanges(v,b)},l.push(c[p]);}}return{byEntityKey:c,sequences:l};}e.fromHierarchy=function(e,i,a){return r(n(e,i),a.isDefined?o(e,a):t);},e.fromAtomicHierarchy=n,e.fromCoarseHierarchy=o,e.fromCoarseElements=s;}(n||(n={})),t.a=n;},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(44),i=r(103),a=r(231),o=r(122);function s(e,t,r){void 0===e&&(e=0);var s=-1;return Object(a.a)(t)?s=Number(t)<1?1:Number(t):Object(o.a)(t)&&(r=t),Object(o.a)(r)||(r=i.a),new n.a(function(t){var n=Object(a.a)(e)?e:+e-r.now();return r.schedule(u,n,{index:0,period:s,subscriber:t});});}function u(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r);}}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(291);function i(){return Object(n.a)(1);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return l;});var n=r(21),i=r(60),a=r(44),o=r(35),s=r(69),u=r(295),c=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n;}return n.a(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e);},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject;},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new s.a()).add(this.source.subscribe(new d(this.getSubject(),this))),e.closed&&(this._connection=null,e=s.a.EMPTY)),e;},t.prototype.refCount=function(){return Object(u.a)()(this);},t;}(a.a),l=function(){var e=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}};}(),d=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n;}return n.a(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t);},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this);},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe();}},t;}(i.b);o.a;},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return u;});var n=r(21),i=r(35),a=r(190);function o(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t));};}var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t;}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.scheduler,this.delay));},e;}(),u=function(e){function t(t,r,n){void 0===n&&(n=0);var i=e.call(this,t)||this;return i.scheduler=r,i.delay=n,i;}return n.a(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe();},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new c(e,this.destination)));},t.prototype._next=function(e){this.scheduleMessage(a.a.createNext(e));},t.prototype._error=function(e){this.scheduleMessage(a.a.createError(e)),this.unsubscribe();},t.prototype._complete=function(){this.scheduleMessage(a.a.createComplete()),this.unsubscribe();},t;}(i.a),c=function(){return function(e,t){this.notification=e,this.destination=t;};}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(21),i=r(100),a=r(224),o=r(52),s=r(50);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!Object(i.a)(e[0]))return e[0];e=e[0];}return Object(a.a)(e,void 0).lift(new c());}var c=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e));},e;}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r;}return n.a(t,e),t.prototype._next=function(e){this.observables.push(e);},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],i=Object(s.a)(this,n,n,r);this.subscriptions&&this.subscriptions.push(i),this.add(i);}this.observables=null;}},t.prototype.notifyNext=function(e,t,r,n,i){if(!this.hasFirst){this.hasFirst=!0;for(var a=0;a<this.subscriptions.length;a++)if(a!==r){var o=this.subscriptions[a];o.unsubscribe(),this.remove(o);}this.subscriptions=null;}this.destination.next(t);},t;}(o.a);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function(){function e(){return Error.call(this),this.message=\"Timeout has occurred\",this.name=\"TimeoutError\",this;}return e.prototype=Object.create(Error.prototype),e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(44),i=r(69),a=r(203);var o=r(310),s=r(197);var u=r(375),c=r(373);function l(e,t){if(null!=e){if(function(e){return e&&\"function\"==typeof e[a.a];}(e))return function(e,t){return new n.a(function(r){var n=new i.a();return n.add(t.schedule(function(){var i=e[a.a]();n.add(i.subscribe({next:function next(e){n.add(t.schedule(function(){return r.next(e);}));},error:function error(e){n.add(t.schedule(function(){return r.error(e);}));},complete:function complete(){n.add(t.schedule(function(){return r.complete();}));}}));})),n;});}(e,t);if(Object(u.a)(e))return function(e,t){return new n.a(function(r){var n=new i.a();return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete();}));}));},function(e){n.add(t.schedule(function(){return r.error(e);}));});})),n;});}(e,t);if(Object(c.a)(e))return Object(o.a)(e,t);if(function(e){return e&&\"function\"==typeof e[s.a];}(e)||\"string\"==typeof e)return function(e,t){if(!e)throw new Error(\"Iterable cannot be null\");return new n.a(function(r){var n,a=new i.a();return a.add(function(){n&&\"function\"==typeof n.return&&n.return();}),a.add(t.schedule(function(){n=e[s.a](),a.add(t.schedule(function(){if(!r.closed){var e,t;try{var i=n.next();e=i.value,t=i.done;}catch(e){return void r.error(e);}t?r.complete():(r.next(e),this.schedule());}}));})),a;});}(e,t);}throw new TypeError((null!==e&&typeof_default()(e)||e)+\" is not observable\");}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;});var n=r(21),i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n;}return n.a(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this);},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r);},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this);},t;}(r(229).a),a=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.a(t,e),t;}(r(225).a))(i);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;});var n=r(0),i=r(194),a=r(66),o=r(1),s=r(30);var u,c=r(165),l=r(16),d=r(173),f=r(154),p=r(72),m=r(113),h=r(7),g=r(306);!function(e){function t(e,t){for(var r=[],o=t.frames,s=e.atomicHierarchy.atoms.sourceIndex,u=h.a.isIdentity(s),l=u?void 0:s.toArray({array:Int32Array}),d=0,f=o.length;d<f;++d){var p=o[d],m=Object(n.__assign)(Object(n.__assign)({},e),{id:i.a.create22(),modelNum:d,atomicConformation:u?c.a.getAtomicConformation(p,e.atomicConformation.atomId):c.a.getAtomicConformationReordered(p,e.atomicConformation.atomId,l),customProperties:new a.CustomProperties(),_staticPropertyData:Object.create(null),_dynamicPropertyData:Object.create(null)});r.push(m);}return{trajectory:r,srcIndexArray:l};}e.trajectoryFromModelAndCoordinates=function(e,r){return t(e,r).trajectory;},e.trajectoryFromTopologyAndCoordinates=function(r,i){var a=this;return l.b.create(\"Create Trajectory\",function(o){return Object(n.__awaiter)(a,void 0,void 0,function(){var a,s,u,c,l,p,m,g,v,b,y,_;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,Object(f.a)(r.basic,r.sourceData,o)];case 1:if(!(a=n.sent()[0]))throw new Error(\"found no model\");for(s=t(a,i),u=s.trajectory,c=s.srcIndexArray,l=c?function(e){for(var t=new Int32Array(e.length),r=0,n=e.length;r<n;r++)t[e[r]]=r;return t;}(c):void 0,p=c?{indexA:h.a.ofIntArray(h.a.mapToArray(r.bonds.indexA,function(e){return l[e];},Int32Array)),indexB:h.a.ofIntArray(h.a.mapToArray(r.bonds.indexB,function(e){return l[e];},Int32Array)),order:r.bonds.order}:r.bonds,m={pairs:p,count:a.atomicHierarchy.atoms._rowCount},g=d.a.fromData(m),v=0,b=0,y=u;b<y.length;b++)_=y[b],d.a.Provider.set(_,g),e.TrajectoryInfo.set(_,{index:v++,size:u.length});return[2,u];}});});});};e.getCenter=function(e){if(e._dynamicPropertyData.__Center__)return e._dynamicPropertyData.__Center__;var t=function(e,t){var r=[],n=[],i=[];e.x.length&&(r.push.apply(r,Object(s.arrayMinMax)(e.x)),n.push.apply(n,Object(s.arrayMinMax)(e.y)),i.push.apply(i,Object(s.arrayMinMax)(e.z))),t&&(t.spheres.x.length&&(r.push.apply(r,Object(s.arrayMinMax)(t.spheres.x)),n.push.apply(n,Object(s.arrayMinMax)(t.spheres.y)),i.push.apply(i,Object(s.arrayMinMax)(t.spheres.z))),t.gaussians.x.length&&(r.push.apply(r,Object(s.arrayMinMax)(t.gaussians.x)),n.push.apply(n,Object(s.arrayMinMax)(t.gaussians.y)),i.push.apply(i,Object(s.arrayMinMax)(t.gaussians.z))));var a=Object(s.arrayMinMax)(r),u=a[0],c=a[1],l=Object(s.arrayMinMax)(n),d=l[0],f=l[1],p=Object(s.arrayMinMax)(i),m=p[0],h=u+(c-u)/2,g=d+(f-d)/2,v=m+(p[1]-m)/2;return o.Vec3.create(h,g,v);}(e.atomicConformation,e.coarseConformation);return e._dynamicPropertyData.__Center__=t,t;};e.TrajectoryInfo={get:function get(e){return e._staticPropertyData.__TrajectoryInfo__||{index:0,size:1};},set:function set(e,t){return e._staticPropertyData.__TrajectoryInfo__=t;}};function r(e){return!!p.a.is(e.sourceData)&&(e.sourceData.data.db.database_2.database_id.isDefined||null!==e.entryId.match(/^[1-9][a-z0-9]{3,3}$/i)||null!==e.entryId.match(/^pdb_[0-9]{4,4}[1-9][a-z0-9]{3,3}$/i));}e.AsymIdCount={get:function get(e){if(e._staticPropertyData.__AsymIdCount__)return e._staticPropertyData.__AsymIdCount__;var t=function(e){var t=new Set(),r=new Set();return e.properties.structAsymMap.forEach(function(e,n){var i=e.auth_id;t.add(i),r.add(n);}),{auth:t.size,label:r.size};}(e);return e._staticPropertyData.__AsymIdCount__=t,t;}},e.AsymIdOffset=g.CustomModelProperty.createSimple(\"asym_id_offset\",\"static\"),e.Index=g.CustomModelProperty.createSimple(\"index\",\"static\"),e.hasCarbohydrate=function(e){return e.properties.saccharideComponentMap.size>0;},e.hasProtein=function(e){for(var t=e.entities.subtype,r=0,n=t.rowCount;r<n;++r)if(t.value(r).startsWith(\"polypeptide\"))return!0;return!1;},e.hasNucleic=function(e){for(var t=e.entities.subtype,r=0,n=t.rowCount;r<n;++r){var i=t.value(r);if(i.endsWith(\"ribonucleotide hybrid\")||i.endsWith(\"ribonucleotide\"))return!0;}return!1;},e.isFromPdbArchive=r,e.hasSecondaryStructure=function(e){if(!p.a.is(e.sourceData))return!1;var t=e.sourceData.data.db;return t.struct_conf.id.isDefined||t.struct_sheet_range.id.isDefined;};var u=o.Vec3.create(1.5707963,1.5707963,1.5707963),v=o.Vec3.create(1,1,1);function b(e){if(!p.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=0;r<t.exptl.method.rowCount;r++){if(t.exptl.method.value(r).toUpperCase().indexOf(\"DIFFRACTION\")>=0)return!0;}return!1;}function y(e){if(!p.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=0;r<t.exptl.method.rowCount;r++){if(t.exptl.method.value(r).toUpperCase().indexOf(\"MICROSCOPY\")>=0)return!0;}return!1;}function _(e){if(!p.a.is(e.sourceData))return!1;if(!b(e))return!1;var t=e.sourceData.data.db.pdbx_database_status.status_code_sf;return t.isDefined&&\"REL\"===t.value(0);}function S(e){if(!p.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=t.pdbx_database_related,n=r.db_name,i=r.content_type,a=0,o=t.pdbx_database_related._rowCount;a<o;++a)if(\"EMDB\"===n.value(a).toUpperCase()&&\"associated EM volume\"===i.value(a))return!0;return!1;}function O(e){return!!p.a.is(e.sourceData)&&(_(e)||S(e));}e.hasCrystalSymmetry=function(e){var t,r=null===(t=m.a.Provider.get(e))||void 0===t?void 0:t.spacegroup;return!(!r||1===r.num&&o.Vec3.equals(r.cell.anglesInRadians,u)&&o.Vec3.equals(r.cell.size,v));},e.isFromXray=b,e.isFromEm=y,e.isFromNmr=function(e){if(!p.a.is(e.sourceData))return!1;for(var t=e.sourceData.data.db,r=0;r<t.exptl.method.rowCount;r++){if(t.exptl.method.value(r).toUpperCase().indexOf(\"NMR\")>=0)return!0;}return!1;},e.hasXrayMap=_,e.hasEmMap=S,e.hasDensityMap=O,e.probablyHasDensityMap=function(e){if(!p.a.is(e.sourceData))return!1;var t=e.sourceData.data.db;return O(e)||r(e)&&(!t.exptl.method.isDefined||b(e)&&(!t.pdbx_database_status.status_code_sf.isDefined||2===t.pdbx_database_status.status_code_sf.valueKind(0))||y(e)&&!t.pdbx_database_related.db_name.isDefined);};}(u||(u={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(21),i=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n;}return n.a(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1);}}},t;}(r(69).a);},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return c;}),r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(1),o=r(16),s=r(30),u=r(66);function c(e,t){var r=this;return o.b.create(\"Create Volume\",function(){return Object(i.__awaiter)(r,void 0,void 0,function(){var r,o,c,l,d,f,p,m,h,g,v,b,y,_,S,O,x;return Object(i.__generator)(this,function(i){if(r=e.header,o=e.values,c=a.Tensor.Space(r.dim,[0,1,2],Float64Array),0===r.dataSetIds.length)l=o;else for(d=r.dim,f=d[0],p=d[1],m=d[2],h=((null==t?void 0:t.dataIndex)||0)+1,g=0,v=0,l=new Float64Array(f*p*m),b=0;b<f;b++)for(y=0;y<p;y++)for(_=0;_<m;_++)l[g++]=o[v],v+=h;return S=a.Tensor.create(c,a.Tensor.Data1(l)),O=a.Mat4.fromTranslation(Object(a.Mat4)(),r.origin),x=a.Mat4.fromBasis(Object(a.Mat4)(),r.basisX,r.basisY,r.basisZ),a.Mat4.mul(O,O,x),[2,{label:null==t?void 0:t.label,grid:{transform:{kind:\"matrix\",matrix:O},cells:S,stats:{min:Object(s.arrayMin)(l),max:Object(s.arrayMax)(l),mean:Object(s.arrayMean)(l),sigma:Object(s.arrayRms)(l)}},sourceData:n.create(e),customProperties:new u.CustomProperties(),_propertyData:Object.create(null)}];});});});}!function(e){e.is=function(e){return\"cube\"===e.kind;},e.create=function(e){return{kind:\"cube\",name:e.name,data:e};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return l;});var n=r(24),i=r(2),a=r(140),o=r(5),s=Object(n.Color)(13421772),u={value:i.ParamDefinition.Color(s)};function c(e,t){var r=Object(o.i)(t.value,s);return{factory:c,granularity:\"uniform\",color:function color(){return r;},props:t,description:\"Gives everything the same, uniform color.\",legend:Object(a.b)([[\"uniform\",r]])};}var l={name:\"uniform\",label:\"Uniform\",category:\"Miscellaneous\",factory:c,getParams:function getParams(e){return u;},defaultValues:i.ParamDefinition.getDefaultValues(u),isApplicable:function isApplicable(e){return!0;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return a;}),r.d(t,\"b\",function(){return o;});var n=r(2),i={value:n.ParamDefinition.Numeric(1,{min:0,max:20,step:.1})};function a(e,t){var r=t.value;return{factory:a,granularity:\"uniform\",size:function size(){return r;},props:t,description:\"Gives everything the same, uniform size.\"};}var o={name:\"uniform\",label:\"Uniform\",category:\"\",factory:a,getParams:function getParams(e){return i;},defaultValues:n.ParamDefinition.getDefaultValues(i),isApplicable:function isApplicable(e){return!0;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(157);function i(e){return c({buffer:e,offset:0,dataView:new DataView(e.buffer)});}function a(e,t){for(var r={},n=0;n<t;n++){r[c(e)]=c(e);}return r;}function o(e,t){for(var r=new Uint8Array(t),n=e.offset,i=0;i<t;i++)r[i]=e.buffer[i+n];return e.offset+=t,r;}function s(e,t){var r=Object(n.b)(e.buffer,e.offset,t);return e.offset+=t,r;}function u(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=c(e);return r;}function c(e){var t,r,n=e.buffer[e.offset];if(0==(128&n))return e.offset++,n;if(128==(240&n))return r=15&n,e.offset++,a(e,r);if(144==(240&n))return r=15&n,e.offset++,u(e,r);if(160==(224&n))return r=31&n,e.offset++,s(e,r);if(224==(224&n))return t=e.dataView.getInt8(e.offset),e.offset++,t;switch(n){case 192:return e.offset++,null;case 194:return e.offset++,!1;case 195:return e.offset++,!0;case 196:return r=e.dataView.getUint8(e.offset+1),e.offset+=2,o(e,r);case 197:return r=e.dataView.getUint16(e.offset+1),e.offset+=3,o(e,r);case 198:return r=e.dataView.getUint32(e.offset+1),e.offset+=5,o(e,r);case 202:return t=e.dataView.getFloat32(e.offset+1),e.offset+=5,t;case 203:return t=e.dataView.getFloat64(e.offset+1),e.offset+=9,t;case 204:return t=e.buffer[e.offset+1],e.offset+=2,t;case 205:return t=e.dataView.getUint16(e.offset+1),e.offset+=3,t;case 206:return t=e.dataView.getUint32(e.offset+1),e.offset+=5,t;case 208:return t=e.dataView.getInt8(e.offset+1),e.offset+=2,t;case 209:return t=e.dataView.getInt16(e.offset+1),e.offset+=3,t;case 210:return t=e.dataView.getInt32(e.offset+1),e.offset+=5,t;case 217:return r=e.dataView.getUint8(e.offset+1),e.offset+=2,s(e,r);case 218:return r=e.dataView.getUint16(e.offset+1),e.offset+=3,s(e,r);case 219:return r=e.dataView.getUint32(e.offset+1),e.offset+=5,s(e,r);case 220:return r=e.dataView.getUint16(e.offset+1),e.offset+=3,u(e,r);case 221:return r=e.dataView.getUint32(e.offset+1),e.offset+=5,u(e,r);case 222:return r=e.dataView.getUint16(e.offset+1),e.offset+=3,a(e,r);case 223:return r=e.dataView.getUint32(e.offset+1),e.offset+=5,a(e,r);}throw new Error(\"Unknown type 0x\"+n.toString(16));}},function(e,t,r){\"use strict\";function n(e,t,r,n){return{type:e,key:t,elements:r,getIndex:n};}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return o;}),r.d(t,\"a\",function(){return s;});var n=r(0),i=r(57),a=r(7),o={label_comp_id:i.a.atom_site.label_comp_id,label_seq_id:i.a.atom_site.label_seq_id,pdbx_PDB_ins_code:i.a.atom_site.pdbx_PDB_ins_code,label_asym_id:i.a.atom_site.label_asym_id,label_entity_id:i.a.atom_site.label_entity_id,auth_comp_id:i.a.atom_site.auth_atom_id,auth_seq_id:i.a.atom_site.auth_seq_id,auth_asym_id:i.a.atom_site.auth_asym_id},s=(Object(n.__assign)(Object(n.__assign)({},i.a.chem_comp_bond),{molstar_protonation_variant:a.a.Schema.Str()}),Object(n.__assign)(Object(n.__assign)({},i.a.chem_comp),{type:a.a.Schema.Aliased(a.a.Schema.str)}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;}),r.d(t,\"b\",function(){return s;});var n=r(49),i=r(2),a={};function o(e,t){return{factory:o,granularity:\"groupInstance\",size:function size(e){return n.b.isLocation(e)?e.shape.getSize(e.group,e.instance):1;},props:t,description:\"Assigns sizes as defined by the shape object.\"};}var s={name:\"shape-group\",label:\"Shape Group\",category:\"\",factory:o,getParams:function getParams(e){return a;},defaultValues:i.ParamDefinition.getDefaultValues(a),isApplicable:function isApplicable(e){return!!e.shape;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return u;}),r.d(t,\"b\",function(){return c;});var n=r(24),i=r(49),a=r(2),o=Object(n.Color)(13421772),s={};function u(e,t){return{factory:u,granularity:\"groupInstance\",color:function color(e){return i.b.isLocation(e)?e.shape.getColor(e.group,e.instance):o;},props:t,description:\"Assigns colors as defined by the shape object.\"};}var c={name:\"shape-group\",label:\"Shape Group\",category:\"Miscellaneous\",factory:u,getParams:function getParams(e){return s;},defaultValues:a.ParamDefinition.getDefaultValues(s),isApplicable:function isApplicable(e){return!!e.shape;}};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;}),r.d(t,\"b\",function(){return l;});var n=r(96),i=r(91),a=Object(n.a)();function o(e,t,r){switch(t){case\"alpha\":return Object(i.m)(e)&&\"float\"===r?e.RED:e.ALPHA;case\"rgb\":return e.RGB;case\"rgba\":return e.RGBA;case\"depth\":return e.DEPTH_COMPONENT;}}function s(e,t,r){switch(r){case\"depth\":return e.DEPTH_ATTACHMENT;case\"stencil\":return e.STENCIL_ATTACHMENT;case\"color0\":case 0:return e.COLOR_ATTACHMENT0;}if(t.drawBuffers)switch(r){case\"color1\":case 1:return t.drawBuffers.COLOR_ATTACHMENT1;case\"color2\":case 2:return t.drawBuffers.COLOR_ATTACHMENT2;case\"color3\":case 3:return t.drawBuffers.COLOR_ATTACHMENT3;case\"color4\":case 4:return t.drawBuffers.COLOR_ATTACHMENT4;case\"color5\":case 5:return t.drawBuffers.COLOR_ATTACHMENT5;case\"color6\":case 6:return t.drawBuffers.COLOR_ATTACHMENT6;case\"color7\":case 7:return t.drawBuffers.COLOR_ATTACHMENT7;}throw new Error(\"unknown texture attachment\");}function u(e){var t=e.createTexture();if(null===t)throw new Error(\"Could not create WebGL texture\");return t;}function c(e,t,r,n,c,l){var d=a(),f=u(e);if(r.endsWith(\"float32\")&&\"float\"!==c||r.endsWith(\"uint8\")&&\"ubyte\"!==c||r.endsWith(\"depth\")&&\"ushort\"!==c)throw new Error(\"texture kind '\"+r+\"' and type '\"+c+\"' are incompatible\");var p=function(e,t){switch(t){case\"image-uint8\":case\"image-float32\":case\"image-depth\":return e.TEXTURE_2D;}if(Object(i.m)(e))switch(t){case\"volume-uint8\":case\"volume-float32\":return e.TEXTURE_3D;}throw new Error(\"unknown texture kind '\"+t+\"'\");}(e,r),m=function(e,t){switch(t){case\"nearest\":return e.NEAREST;case\"linear\":return e.LINEAR;}}(e,l),h=o(e,n,c),g=function(e,t,r){if(Object(i.m)(e))switch(t){case\"alpha\":switch(r){case\"ubyte\":return e.ALPHA;case\"float\":return e.R32F;}case\"rgb\":switch(r){case\"ubyte\":return e.RGB;case\"float\":return e.RGB32F;}case\"rgba\":switch(r){case\"ubyte\":return e.RGBA;case\"float\":return e.RGBA32F;}case\"depth\":return e.DEPTH_COMPONENT16;}return o(e,t,r);}(e,n,c),v=function(e,t){switch(t){case\"ubyte\":return e.UNSIGNED_BYTE;case\"ushort\":return e.UNSIGNED_SHORT;case\"float\":return e.FLOAT;}}(e,c);function b(){e.bindTexture(p,f),e.texParameteri(p,e.TEXTURE_MAG_FILTER,m),e.texParameteri(p,e.TEXTURE_MIN_FILTER,m),e.texParameteri(p,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(p,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(p,null);}b();var y,_=void 0,S=0,O=0,x=0,C=!1;function w(t,r,n){if(S=t,O=r,x=n||0,e.bindTexture(p,f),p===e.TEXTURE_2D)e.texImage2D(p,0,g,S,O,0,h,v,null);else{if(!Object(i.m)(e)||p!==e.TEXTURE_3D||void 0===x)throw new Error(\"unknown texture target\");e.texImage3D(p,0,g,S,O,x,0,h,v,null);}}function P(t){if(e.bindTexture(p,f),e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),function(e,t,r){return t===r.TEXTURE_2D;}(0,p,e))e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!t.flipY),S=t.width,O=t.height,e.texImage2D(p,0,g,S,O,0,h,v,t.array);else{if(!Object(i.m)(e)||!function(e,t,r){return t===r.TEXTURE_3D;}(0,p,e))throw new Error(\"unknown texture target\");S=t.width,O=t.height,x=t.depth,e.texImage3D(p,0,g,S,O,x,0,h,v,t.array);}e.bindTexture(p,null),y=t;}return{id:d,target:p,format:h,internalFormat:g,type:v,getWidth:function getWidth(){return S;},getHeight:function getHeight(){return O;},getDepth:function getDepth(){return x;},define:w,load:P,bind:function bind(t){e.activeTexture(e.TEXTURE0+t),e.bindTexture(p,f);},unbind:function unbind(t){e.activeTexture(e.TEXTURE0+t),e.bindTexture(p,null);},attachFramebuffer:function attachFramebuffer(r,n,a){if(!_||_.framebuffer!==r||_.attachment!==n||_.layer!==a){if(r.bind(),p===e.TEXTURE_2D)e.framebufferTexture2D(e.FRAMEBUFFER,s(e,t,n),e.TEXTURE_2D,f,0);else{if(!Object(i.m)(e)||p!==e.TEXTURE_3D)throw new Error(\"unknown texture target\");if(void 0===a)throw new Error(\"need `layer` to attach 3D texture\");e.framebufferTextureLayer(e.FRAMEBUFFER,s(e,t,n),f,0,a);}_={framebuffer:r,attachment:n,layer:a};}},detachFramebuffer:function detachFramebuffer(r,n){if(r.bind(),p===e.TEXTURE_2D)e.framebufferTexture2D(e.FRAMEBUFFER,s(e,t,n),e.TEXTURE_2D,null,0);else{if(!Object(i.m)(e)||p!==e.TEXTURE_3D)throw new Error(\"unknown texture target\");e.framebufferTextureLayer(e.FRAMEBUFFER,s(e,t,n),null,0,0);}_=void 0;},reset:function reset(){f=u(e),b(),y?P(y):w(S,O,x),_&&(_=void 0);},destroy:function destroy(){C||(e.deleteTexture(f),C=!0);}};}function l(e,t,r){var n=e.resources,i=[];return Object.keys(t).forEach(function(e){var a=t[e];if(\"texture\"===a.type)if(\"texture\"===a.kind)i[i.length]=[e,r[e].ref.value];else{var o=n.texture(a.kind,a.format,a.dataType,a.filter);o.load(r[e].ref.value),i[i.length]=[e,o];}}),i;}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n,i=r(0),a=r(16),o=r(11),s=r(1),u=r(66);function c(e){var t=this;return a.b.create(\"Create Volume\",function(r){return Object(i.__awaiter)(t,void 0,void 0,function(){var t,r,a,c,l,d,f,p,m,h;return Object(i.__generator)(this,function(i){return t=e.volume_data_3d_info,r=e.volume_data_3d,a=o.f.create(t.spacegroup_number.value(0),s.Vec3.ofArray(t.spacegroup_cell_size.value(0)),s.Vec3.scale(s.Vec3.zero(),s.Vec3.ofArray(t.spacegroup_cell_angles.value(0)),Math.PI/180)),c=t.axis_order.value(0),l=s.Tensor.convertToCanonicalAxisIndicesFastToSlow(c),d=l(t.sample_count.value(0)),f=s.Tensor.Space(d,s.Tensor.invertAxisOrder(c),Float32Array),p=s.Tensor.create(f,s.Tensor.Data1(r.values.toArray({array:Float32Array}))),m=s.Vec3.ofArray(l(t.origin.value(0))),h=s.Vec3.ofArray(l(t.dimensions.value(0))),[2,{grid:{transform:{kind:\"spacegroup\",cell:a,fractionalBox:o.b.create(m,s.Vec3.add(s.Vec3.zero(),m,h))},cells:p,stats:{min:t.min_sampled.value(0),max:t.max_sampled.value(0),mean:t.mean_sampled.value(0),sigma:t.sigma_sampled.value(0)}},sourceData:n.create(e),customProperties:new u.CustomProperties(),_propertyData:Object.create(null)}];});});});}!function(e){e.is=function(e){return\"dscif\"===e.kind;},e.create=function(e){return{kind:\"dscif\",name:e._name,data:e};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return d;});var n=r(0),i=r(102),a=r(118),o=r(157),s=r(316),u=r(177),c=r(85),l=r(313),d=function(e){function t(r){var a=e.call(this,{current:void 0,entries:Object(i.List)(),isPlaying:!1,nextSnapshotDelayInMs:t.DefaultNextSnapshotDelayInMs})||this;return a.plugin=r,a.entryMap=new Map(),a.events={changed:a.ev()},a.timeoutHandle=void 0,a.next=function(){return Object(n.__awaiter)(a,void 0,void 0,function(){var e,t,r;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return this.timeoutHandle=void 0,(e=this.getNextId(this.state.current,1))&&e!==this.state.current?(t=this.setCurrent(e),[4,this.plugin.state.setSnapshot(t)]):(this.stop(),[2]);case 1:return n.sent(),r=void 0!==t.durationInMs?t.durationInMs:this.state.nextSnapshotDelayInMs,this.state.isPlaying&&(this.timeoutHandle=setTimeout(this.next,r)),[2];}});});},a;}return Object(n.__extends)(t,e),t.prototype.getIndex=function(e){return this.state.entries.indexOf(e);},t.prototype.getEntry=function(e){if(e)return this.entryMap.get(e);},t.prototype.remove=function(e){var t=this.entryMap.get(e);t&&(this.entryMap.delete(e),this.updateState({current:this.state.current===e?void 0:this.state.current,entries:this.state.entries.delete(this.getIndex(t))}),this.events.changed.next());},t.prototype.add=function(e){this.entryMap.set(e.snapshot.id,e),this.updateState({current:e.snapshot.id,entries:this.state.entries.push(e)}),this.events.changed.next();},t.prototype.replace=function(e,r){var n=this.getEntry(e);if(n){var i=this.getIndex(n),a=t.Entry(r,{name:n.name,description:n.description});this.entryMap.set(r.id,a),this.updateState({current:a.snapshot.id,entries:this.state.entries.set(i,a)}),this.events.changed.next();}},t.prototype.move=function(e,t){var r=this.state.entries.size;if(!(r<2)){var n=this.getEntry(e);if(n){var i=this.getIndex(n),a=(i+t)%r;a<0&&(a+=r);var o=this.state.entries.get(a),s=this.state.entries.asMutable();s.set(a,n),s.set(i,o),this.updateState({current:n.snapshot.id,entries:s.asImmutable()}),this.events.changed.next();}}},t.prototype.clear=function(){0!==this.state.entries.size&&(this.entryMap.clear(),this.updateState({current:void 0,entries:Object(i.List)()}),this.events.changed.next());},t.prototype.setCurrent=function(e){var t=this.getEntry(e);return t&&(this.updateState({current:e}),this.events.changed.next()),t&&t.snapshot;},t.prototype.getNextId=function(e,t){var r=this.state.entries.size;if(!e){if(0===r)return;var n=-1===t?r-1:0;return this.state.entries.get(n).snapshot.id;}var i=this.getEntry(e);if(i){var a=this.getIndex(i);if(!(a<0))return(a=(a+t)%r)<0&&(a+=r),this.state.entries.get(a).snapshot.id;}},t.prototype.setStateSnapshot=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,a,o,s,u,c,d;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(e.version,l.a,this.clear(),r=Object(i.List)().asMutable(),a=0,o=e.entries;a<o.length;a++)s=o[a],this.entryMap.set(s.snapshot.id,s),r.push(s);return u=e.current?e.current:e.entries.length>0?e.entries[0].snapshot.id:void 0,this.updateState({current:u,entries:r.asImmutable(),isPlaying:!1,nextSnapshotDelayInMs:e.playback?e.playback.nextSnapshotDelayInMs:t.DefaultNextSnapshotDelayInMs}),this.events.changed.next(),u?(c=this.getEntry(u),(d=c&&c.snapshot)?[4,this.plugin.state.setSnapshot(d)]:[2]):[2];case 1:return n.sent(),e.playback&&e.playback.isPlaying&&this.play(!0),[2,d];}});});},t.prototype.syncCurrent=function(e){var r=this.plugin.state.getSnapshot(null==e?void 0:e.params);0!==this.state.entries.size&&this.state.current?this.replace(this.state.current,r):this.add(t.Entry(r,{name:null==e?void 0:e.name,description:null==e?void 0:e.description}));},t.prototype.getStateSnapshot=function(e){return this.syncCurrent(e),{timestamp:+new Date(),version:l.a,name:e&&e.name,description:e&&e.description,current:this.state.current,playback:{isPlaying:!(!e||!e.playOnLoad),nextSnapshotDelayInMs:this.state.nextSnapshotDelayInMs},entries:this.state.entries.valueSeq().toArray()};},t.prototype.serialize=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,u,c,l,d,f,p,m,h,g,v,b;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return t=JSON.stringify(this.getStateSnapshot({params:null==e?void 0:e.params}),null,2),(null==e?void 0:e.type)&&\"json\"!==e.type&&\"molj\"!==e.type?[3,1]:[2,new Blob([t],{type:\"application/json;charset=utf-8\"})];case 1:r=new Uint8Array(Object(o.a)(t)),Object(o.c)(r,0,t),i={\"state.json\":r},a=[],u=0,c=this.plugin.managers.asset.assets,n.label=2;case 2:return u<c.length?(l=c[u],d=l.asset,f=l.file,a.push([d.id,d]),p=i,m=\"assets/\"+d.id,h=Uint8Array.bind,[4,f.arrayBuffer()]):[3,5];case 3:p[m]=new(h.apply(Uint8Array,[void 0,n.sent()]))(),n.label=4;case 4:return u++,[3,2];case 5:return a.length>0&&(g=JSON.stringify(a,null,2),v=new Uint8Array(Object(o.a)(g)),Object(o.c)(v,0,g),i[\"assets.json\"]=v),b=Object(s.c)(i),[2,new Blob([b],{type:\"application/zip\"})];}});});},t.prototype.open=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,i,a,o,s,l,d,f,p,m,h,g,v,b,y,_;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,8,,9]),(r=e.name.toLowerCase()).endsWith(\"json\")||r.endsWith(\"molj\")?[4,this.plugin.runTask(Object(u.c)(e,\"string\"))]:[3,2];case 1:return i=n.sent(),y=JSON.parse(i),t.isStateSnapshot(y)?[2,this.setStateSnapshot(y)]:t.isStateSnapshot(y.data)?[2,this.setStateSnapshot(y.data)]:(this.plugin.state.setSnapshot(y),[3,7]);case 2:return[4,this.plugin.runTask(Object(u.c)(e,\"zip\"))];case 3:return i=n.sent(),a=Object.create(null),Object(c.c)(i,function(e,t){if(\"state.json\"!==t&&\"assets.json\"!==t){var r=t.substring(t.indexOf(\"/\")+1);a[r]=new File([e],r);}}),o=new File([i[\"state.json\"]],\"state.json\"),[4,this.plugin.runTask(Object(u.c)(o,\"string\"))];case 4:return s=n.sent(),i[\"assets.json\"]?(l=new File([i[\"assets.json\"]],\"assets.json\"),p=(f=JSON).parse,[4,this.plugin.runTask(Object(u.c)(l,\"string\"))]):[3,6];case 5:for(d=p.apply(f,[n.sent()]),m=0,h=d;m<h.length;m++)g=h[m],v=g[0],b=g[1],this.plugin.managers.asset.set(b,a[v]);n.label=6;case 6:return y=JSON.parse(s),[2,this.setStateSnapshot(y)];case 7:return[3,9];case 8:return _=n.sent(),this.plugin.log.error(\"Reading state: \"+_),[3,9];case 9:return[2];}});});},t.prototype.play=function(e){if(void 0===e&&(e=!1),this.updateState({isPlaying:!0}),e){var t=this.getEntry(this.state.current);if(!t)return void this.next();this.events.changed.next();var r=t.snapshot,n=void 0!==r.durationInMs?r.durationInMs:this.state.nextSnapshotDelayInMs;this.timeoutHandle=setTimeout(this.next,n);}else this.next();},t.prototype.stop=function(){this.updateState({isPlaying:!1}),void 0!==this.timeoutHandle&&clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0,this.events.changed.next();},t.prototype.togglePlay=function(){this.state.isPlaying?(this.stop(),this.plugin.managers.animation.stop()):this.play();},t.DefaultNextSnapshotDelayInMs=1500,t;}(a.b);!function(e){e.Entry=function(e,t){return Object(n.__assign)({timestamp:+new Date(),snapshot:e},t);},e.isStateSnapshot=function(e){var t=e;return!!t&&!!t.timestamp&&!!t.entries;};}(d||(d={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return f;}),r.d(t,\"b\",function(){return m;});var n=r(0),i=r(16),a=r(65),o=r(366),s=r(192),u=r(193);function c(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,o,s;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return 1024,[4,e.readBuffer(0,1024)];case 1:if(t=n.sent().buffer,\"MAP \"!==(r=String.fromCharCode(t.readUInt8(208),t.readUInt8(209),t.readUInt8(210),t.readUInt8(211))))throw new Error('ccp4 format error, missing \"MAP \" string');return i=[t.readUInt8(212),t.readUInt8(213)],a=!1,68===i[0]&&65===i[1]?a=!0:17===i[0]&&17===i[1]?a=!1:t.readInt32LE(12)<=16&&(a=!0),s=a?function(e){return t.readFloatLE(4*e);}:function(e){return t.readFloatBE(4*e);},[2,{header:{NC:(o=a?function(e){return t.readInt32LE(4*e);}:function(e){return t.readInt32BE(4*e);})(0),NR:o(1),NS:o(2),MODE:o(3),NCSTART:o(4),NRSTART:o(5),NSSTART:o(6),NX:o(7),NY:o(8),NZ:o(9),xLength:s(10),yLength:s(11),zLength:s(12),alpha:s(13),beta:s(14),gamma:s(15),MAPC:o(16),MAPR:o(17),MAPS:o(18),AMIN:s(19),AMAX:s(20),AMEAN:s(21),ISPG:o(22),NSYMBT:o(23),LSKFLG:o(24),SKWMAT:[],SKWTRN:[],userFlag1:o(39),userFlag2:o(40),originX:s(49),originY:s(50),originZ:s(51),MAP:r,MACHST:i,ARMS:s(54)},littleEndian:a}];}});});}function l(e){switch(e){case 0:return u.a.Int8;case 1:return u.a.Int16;case 2:return u.a.Float32;case 3:throw new Error(\"mode 3 unsupported, complex 16-bit integers\");case 4:throw new Error(\"mode 4 unsupported, complex 32-bit reals\");case 6:u.a.Uint16;case 16:throw new Error(\"mode 16 unsupported, unsigned char * 3 (for rgb data, non-standard)\");}throw new Error(\"unknown mode '\"+e+\"'\");}function d(e){return-128===e.userFlag1&&127===e.userFlag2;}function f(e){return d(e)?u.a.Float32:l(e.MODE);}function p(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,i,a,o,s,p,m,h,g,v;return Object(n.__generator)(this,function(b){switch(b.label){case 0:return[4,r.update({message:\"Parsing CCP4/MRC/MAP file...\"})];case 1:return b.sent(),[4,c(e)];case 2:return t=b.sent(),i=t.header,a=t.littleEndian,o=function(e){return 1024+e.NSYMBT;}(i),s=l(i.MODE),p=f(i),m=i.NC*i.NR*i.NS,h=Object(u.c)(s),g=m*h,v=Object(u.b)(m,p),function(e,t,r,i,a,o){Object(n.__awaiter)(this,void 0,void 0,function(){var s,c,l,f,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return d(e)?(s=3*a,[4,r.readBuffer(i,t.readBuffer,a,s)]):[3,2];case 1:for(n.sent(),c=new Int8Array(t.valuesBuffer.buffer,s),l=(e.AMAX-e.AMIN)/255,f=.5*(e.AMIN+e.AMAX+l),p=0,m=a;p<m;++p)t.values[p]=l*c[p]+f;return[3,4];case 2:return[4,Object(u.d)(t,r,i,a,0,o)];case 3:n.sent(),n.label=4;case 4:return[2];}});});}(i,v,e,o,g,a),[2,{header:i,values:v.values,name:e.name}];}});});}function m(e,t){return function(e,t){var r=this;return i.b.create(\"Parse CCP4/MRC/MAP\",function(t){return Object(n.__awaiter)(r,void 0,void 0,function(){var r,i,o;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),i=(r=a.a).success,[4,p(e,0,t)];case 1:return[2,i.apply(r,[n.sent()])];case 2:return o=n.sent(),[2,a.a.error(o)];case 3:return[2];}});});});}(o.a.fromBuffer(s.a.fromUint8Array(e),t),e.length);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(5),a=r(192),o=\"undefined\"==typeof document?r(429):void 0;!function(e){e.fromBuffer=function(e,t){return{name:t,readBuffer:function readBuffer(t,r,n,o){var s,u;if(\"number\"==typeof r){n=Object(i.i)(n,r);var c=t;s=(l=Math.min(e.length,c+n))-c,u=a.a.fromUint8Array(new Uint8Array(e.buffer,c,l-c));}else{n=Object(i.i)(n,r.length);c=t;var l=Math.min(e.length,c+n);r.set(e.subarray(c,l),o),s=l-c,u=r;}return n!==s&&console.warn(\"byteCount \"+n+\" and bytesRead \"+s+\" differ\"),Promise.resolve({bytesRead:s,buffer:u});},writeBuffer:function writeBuffer(e,t,r){return r=Object(i.i)(r,t.length),console.error(\".writeBuffer not implemented for FileHandle.fromBuffer\"),Promise.resolve(0);},writeBufferSync:function writeBufferSync(e,t,r){return r=Object(i.i)(r,t.length),console.error(\".writeSync not implemented for FileHandle.fromBuffer\"),0;},close:i.k};},e.fromDescriptor=function(e,t){if(void 0===o)throw new Error(\"fs module not available\");return{name:t,readBuffer:function readBuffer(t,r,n,s){return new Promise(function(u,c){var l;\"number\"==typeof r?(s=Object(i.i)(s,0),n=Object(i.i)(n,r),l=a.a.fromArrayBuffer(new ArrayBuffer(r))):(s=Object(i.i)(s,0),n=Object(i.i)(n,r.length),l=r),o.read(e,l,s,n,t,function(e,t,r){e?c(e):(n!==t&&console.warn(\"byteCount \"+n+\" and bytesRead \"+t+\" differ\"),u({bytesRead:t,buffer:r}));});});},writeBuffer:function writeBuffer(t,r,n){return n=Object(i.i)(n,r.length),new Promise(function(i,a){o.write(e,r,0,n,t,function(e,t){e?a(e):i(t);});});},writeBufferSync:function writeBufferSync(t,r,n){return n=Object(i.i)(n,r.length),o.writeSync(e,r,0,n,t);},close:function close(){try{void 0!==e&&o.close(e,i.k);}catch(e){}}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return c;});var n=r(0),i=r(28),a=r(179),o=\"Trajectory\";function s(e,t){return e.builders.structure.hierarchy.applyPreset(t.trajectory,\"default\");}function u(e){var t=this;return function(r,i,a){return Object(n.__awaiter)(t,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,r.state.data.build().to(i).apply(e,void 0,{tags:null==a?void 0:a.trajectoryTags}).commit({revertOnError:!0})];case 1:return[2,{trajectory:t.sent()}];}});});};}var c=[[\"mmcif\",{label:\"mmCIF\",description:\"mmCIF\",category:o,stringExtensions:[\"cif\",\"mmcif\",\"mcif\"],binaryExtensions:[\"bcif\"],isApplicable:function isApplicable(e,t){return\"mmcif\"===e.ext||\"mcif\"===e.ext||(\"cif\"===e.ext||\"bcif\"===e.ext)&&-1===Object(a.b)(e,t);},parse:function parse(e,t,r){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var a,o,s,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=e.state.data,[4,(o=a.build().to(t).apply(i.StateTransforms.Data.ParseCif,void 0,{state:{isGhost:!0}})).apply(i.StateTransforms.Model.TrajectoryFromMmCif,void 0,{tags:null==r?void 0:r.trajectoryTags}).commit({revertOnError:!0})];case 1:return s=n.sent(),((null===(c=null===(u=o.selector.cell)||void 0===u?void 0:u.obj)||void 0===c?void 0:c.data.blocks.length)||0)>1&&e.state.data.updateCellState(o.ref,{isGhost:!1}),[2,{trajectory:s}];}});});},visuals:s}],[\"cifCore\",{label:\"cifCore\",description:\"CIF Core\",category:o,stringExtensions:[\"cif\"],isApplicable:function isApplicable(e,t){return\"cif\"===e.ext&&\"coreCif\"===Object(a.b)(e,t);},parse:function parse(e,t,r){return Object(n.__awaiter)(void 0,void 0,void 0,function(){var a,o,s,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=e.state.data,[4,(o=a.build().to(t).apply(i.StateTransforms.Data.ParseCif,void 0,{state:{isGhost:!0}})).apply(i.StateTransforms.Model.TrajectoryFromCifCore,void 0,{tags:null==r?void 0:r.trajectoryTags}).commit({revertOnError:!0})];case 1:return s=n.sent(),((null===(c=null===(u=o.selector.cell)||void 0===u?void 0:u.obj)||void 0===c?void 0:c.data.blocks.length)||0)>1&&e.state.data.updateCellState(o.ref,{isGhost:!1}),[2,{trajectory:s}];}});});},visuals:s}],[\"pdb\",{label:\"PDB\",description:\"PDB\",category:o,stringExtensions:[\"pdb\",\"ent\"],parse:u(i.StateTransforms.Model.TrajectoryFromPDB),visuals:s}],[\"gro\",{label:\"GRO\",description:\"GRO\",category:o,stringExtensions:[\"gro\"],binaryExtensions:[],parse:u(i.StateTransforms.Model.TrajectoryFromGRO),visuals:s}],[\"3dg\",{label:\"3DG\",description:\"3DG\",category:o,stringExtensions:[\"3dg\"],parse:u(i.StateTransforms.Model.TrajectoryFrom3DG),visuals:s}],[\"mol\",{label:\"MOL/SDF\",description:\"MOL/SDF\",category:o,stringExtensions:[\"mol\",\"sdf\",\"sd\"],parse:u(i.StateTransforms.Model.TrajectoryFromMOL),visuals:s}],[\"mol2\",{label:\"MOL2\",description:\"MOL2\",category:o,stringExtensions:[\"mol2\"],parse:u(i.StateTransforms.Model.TrajectoryFromMOL2),visuals:s}]];},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"setStructureOverpaint\",function(){return l;}),r.d(t,\"clearStructureOverpaint\",function(){return d;});var n=r(0),i=r(4),a=r(28),o=r(13),s=r(130),u=r(24),c=r(23);function l(e,t,r,o,l){return Object(n.__awaiter)(this,void 0,void 0,function(){var d=this;return Object(n.__generator)(this,function(m){switch(m.label){case 0:return[4,f(e,t,function(e,t,f){return Object(n.__awaiter)(d,void 0,void 0,function(){var d,m,h,g,v;return Object(n.__generator)(this,function(b){switch(b.label){case 0:return l&&l.length>0&&!l.includes(t.params.values.type.name)?[2]:(d=t.obj.data.source.data,[4,o(d.root)]);case 1:return m=b.sent(),c.Loci.isEmpty(m)?[2]:(h={bundle:i.StructureElement.Bundle.fromLoci(m),color:-1===r?Object(u.Color)(0):r,clear:-1===r},f?(g=Object(n.__spreadArrays)(f.params.values.layers,[h]),v=p(g,d),e.to(f).update(s.a.toBundle(v))):(v=p([h],d),e.to(t.transform.ref).apply(a.StateTransforms.Representation.OverpaintStructureRepresentation3DFromBundle,s.a.toBundle(v),{tags:\"overpaint-controls\"})),[2]);}});});})];case 1:return m.sent(),[2];}});});}function d(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i=this;return Object(n.__generator)(this,function(a){switch(a.label){case 0:return[4,f(e,t,function(e,t,a){return Object(n.__awaiter)(i,void 0,void 0,function(){return Object(n.__generator)(this,function(n){return r&&r.length>0&&!r.includes(t.params.values.type.name)||a&&e.delete(a.transform.ref),[2];});});})];case 1:return a.sent(),[2];}});});}function f(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,s,u,c,l,d,f,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:i=e.state.data,s=i.build(),u=0,c=t,n.label=1;case 1:if(!(u<c.length))return[3,6];l=c[u],d=0,f=l.representations,n.label=2;case 2:return d<f.length?(p=f[d],m=i.select(o.StateSelection.Generators.ofTransformer(a.StateTransforms.Representation.OverpaintStructureRepresentation3DFromBundle,p.cell.transform.ref).withTag(\"overpaint-controls\")),[4,r(s,p.cell,m[0])]):[3,5];case 3:n.sent(),n.label=4;case 4:return d++,[3,2];case 5:return u++,[3,1];case 6:return[2,s.commit({doNotUpdateCurrent:!0})];}});});}function p(e,t){var r=s.a.ofBundle(e,t.root),n=s.a.merge(r);return s.a.filter(n,t);}},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return m;}),r.d(t,\"b\",function(){return f;});var n=r(0),i=r(4),a=r(13),o=r(28),s=r(26),u=r(30),c=r(118),l=r(2),d=r(221),f={distanceUnitLabel:l.ParamDefinition.Text(\"Å\",{isEssential:!0}),textColor:d.a.textColor},p=l.ParamDefinition.getDefaultValues(f),m=function(e){function t(t){var r=e.call(this,{labels:[],distances:[],angles:[],dihedrals:[],orientations:[],options:p})||this;return r.plugin=t,r.behaviors={state:r.ev.behavior(r.state)},r._empty=[],t.state.data.events.changed.subscribe(function(e){e.inTransaction||t.behaviors.state.isAnimating.value||r.sync();}),t.behaviors.state.isAnimating.subscribe(function(e){e||t.behaviors.state.isUpdating.value||r.sync();}),r;}return Object(n.__extends)(t,e),t.prototype.stateUpdated=function(){this.behaviors.state.next(this.state);},t.prototype.getGroup=function(){var e=this.plugin.state.data,t=a.StateSelection.findTagInSubtree(e.tree,a.StateTransform.RootRef,\"measurement-group\"),r=this.plugin.state.data.build();return t?r.to(t):r.toRoot().group(o.StateTransforms.Misc.CreateGroup,{label:\"Measurements\"},{tags:\"measurement-group\"});},t.prototype.setOptions=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,i,a,o,u,c,l,d,f;return Object(n.__generator)(this,function(n){switch(n.label){case 0:for(this.updateState({options:e})&&this.stateUpdated(),t=this.plugin.state.data.build(),r=0,i=this.state.distances;r<i.length;r++)f=i[r],t.to(f).update(function(t){t.unitLabel=e.distanceUnitLabel,t.textColor=e.textColor;});for(a=0,o=this.state.labels;a<o.length;a++)f=o[a],t.to(f).update(function(t){t.textColor=e.textColor;});for(u=0,c=this.state.angles;u<c.length;u++)f=c[u],t.to(f).update(function(t){t.textColor=e.textColor;});for(l=0,d=this.state.dihedrals;l<d.length;l++)f=d[l],t.to(f).update(function(t){t.textColor=e.textColor;});return 0===t.editInfo.count?[2]:[4,s.PluginCommands.State.Update(this.plugin,{state:this.plugin.state.data,tree:t,options:{doNotLogTiming:!0}})];case 1:return n.sent(),[2];}});});},t.prototype.addDistance=function(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,function(){var a,c,l,d,f;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return a=this.plugin.helpers.substructureParent.get(e.structure),c=this.plugin.helpers.substructureParent.get(t.structure),a&&c?(l=[a.transform.ref],Object(u.arraySetAdd)(l,c.transform.ref),(d=this.getGroup()).apply(o.StateTransforms.Model.MultiStructureSelectionFromExpression,{selections:[{key:\"a\",groupId:\"a\",ref:a.transform.ref,expression:i.StructureElement.Loci.toExpression(e)},{key:\"b\",groupId:\"b\",ref:c.transform.ref,expression:i.StructureElement.Loci.toExpression(t)}],isTransitive:!0,label:\"Distance\"},{dependsOn:l,tags:null==r?void 0:r.selectionTags}).apply(o.StateTransforms.Representation.StructureSelectionsDistance3D,{customText:(null==r?void 0:r.customText)||\"\",unitLabel:this.state.options.distanceUnitLabel,textColor:this.state.options.textColor},{tags:null==r?void 0:r.reprTags}),f=this.plugin.state.data,[4,s.PluginCommands.State.Update(this.plugin,{state:f,tree:d,options:{doNotLogTiming:!0}})]):[2];case 1:return n.sent(),[2];}});});},t.prototype.addAngle=function(e,t,r,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var c,l,d,f,p,m;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return c=this.plugin.helpers.substructureParent.get(e.structure),l=this.plugin.helpers.substructureParent.get(t.structure),d=this.plugin.helpers.substructureParent.get(r.structure),c&&l&&d?(f=[c.transform.ref],Object(u.arraySetAdd)(f,l.transform.ref),Object(u.arraySetAdd)(f,d.transform.ref),(p=this.getGroup()).apply(o.StateTransforms.Model.MultiStructureSelectionFromExpression,{selections:[{key:\"a\",ref:c.transform.ref,expression:i.StructureElement.Loci.toExpression(e)},{key:\"b\",ref:l.transform.ref,expression:i.StructureElement.Loci.toExpression(t)},{key:\"c\",ref:d.transform.ref,expression:i.StructureElement.Loci.toExpression(r)}],isTransitive:!0,label:\"Angle\"},{dependsOn:f,tags:null==a?void 0:a.selectionTags}).apply(o.StateTransforms.Representation.StructureSelectionsAngle3D,{customText:(null==a?void 0:a.customText)||\"\",textColor:this.state.options.textColor},{tags:null==a?void 0:a.reprTags}),m=this.plugin.state.data,[4,s.PluginCommands.State.Update(this.plugin,{state:m,tree:p,options:{doNotLogTiming:!0}})]):[2];case 1:return n.sent(),[2];}});});},t.prototype.addDihedral=function(e,t,r,a,c){return Object(n.__awaiter)(this,void 0,void 0,function(){var l,d,f,p,m,h,g;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return l=this.plugin.helpers.substructureParent.get(e.structure),d=this.plugin.helpers.substructureParent.get(t.structure),f=this.plugin.helpers.substructureParent.get(r.structure),p=this.plugin.helpers.substructureParent.get(a.structure),l&&d&&f&&p?(m=[l.transform.ref],Object(u.arraySetAdd)(m,d.transform.ref),Object(u.arraySetAdd)(m,f.transform.ref),Object(u.arraySetAdd)(m,p.transform.ref),(h=this.getGroup()).apply(o.StateTransforms.Model.MultiStructureSelectionFromExpression,{selections:[{key:\"a\",ref:l.transform.ref,expression:i.StructureElement.Loci.toExpression(e)},{key:\"b\",ref:d.transform.ref,expression:i.StructureElement.Loci.toExpression(t)},{key:\"c\",ref:f.transform.ref,expression:i.StructureElement.Loci.toExpression(r)},{key:\"d\",ref:p.transform.ref,expression:i.StructureElement.Loci.toExpression(a)}],isTransitive:!0,label:\"Dihedral\"},{dependsOn:m,tags:null==c?void 0:c.selectionTags}).apply(o.StateTransforms.Representation.StructureSelectionsDihedral3D,{customText:(null==c?void 0:c.customText)||\"\",textColor:this.state.options.textColor},{tags:null==c?void 0:c.reprTags}),g=this.plugin.state.data,[4,s.PluginCommands.State.Update(this.plugin,{state:g,tree:h,options:{doNotLogTiming:!0}})]):[2];case 1:return n.sent(),[2];}});});},t.prototype.addLabel=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,a,u,c;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return(r=this.plugin.helpers.substructureParent.get(e.structure))?(a=[r.transform.ref],(u=this.getGroup()).apply(o.StateTransforms.Model.MultiStructureSelectionFromExpression,{selections:[{key:\"a\",ref:r.transform.ref,expression:i.StructureElement.Loci.toExpression(e)}],isTransitive:!0,label:\"Label\"},{dependsOn:a,tags:null==t?void 0:t.selectionTags}).apply(o.StateTransforms.Representation.StructureSelectionsLabel3D,{textColor:this.state.options.textColor},{tags:null==t?void 0:t.reprTags}),c=this.plugin.state.data,[4,s.PluginCommands.State.Update(this.plugin,{state:c,tree:u,options:{doNotLogTiming:!0}})]):[2];case 1:return n.sent(),[2];}});});},t.prototype.addOrientation=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){var t,r,a,u;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return(t=this.plugin.helpers.substructureParent.get(e.structure))?(r=[t.transform.ref],(a=this.getGroup()).apply(o.StateTransforms.Model.MultiStructureSelectionFromExpression,{selections:[{key:\"a\",ref:t.transform.ref,expression:i.StructureElement.Loci.toExpression(e)}],isTransitive:!0,label:\"Orientation\"},{dependsOn:r}).apply(o.StateTransforms.Representation.StructureSelectionsOrientation3D),u=this.plugin.state.data,[4,s.PluginCommands.State.Update(this.plugin,{state:u,tree:a,options:{doNotLogTiming:!0}})]):[2];case 1:return n.sent(),[2];}});});},t.prototype.getTransforms=function(e){var t=this.plugin.state.data,r=a.StateSelection.findTagInSubtree(t.tree,a.StateTransform.RootRef,\"measurement-group\"),n=r?t.select(a.StateSelection.Generators.ofTransformer(e,r)):this._empty;return 0===n.length?this._empty:n;},t.prototype.sync=function(){this.updateState({labels:this.getTransforms(o.StateTransforms.Representation.StructureSelectionsLabel3D),distances:this.getTransforms(o.StateTransforms.Representation.StructureSelectionsDistance3D),angles:this.getTransforms(o.StateTransforms.Representation.StructureSelectionsAngle3D),dihedrals:this.getTransforms(o.StateTransforms.Representation.StructureSelectionsDihedral3D),orientations:this.getTransforms(o.StateTransforms.Representation.StructureSelectionsOrientation3D)})&&this.stateUpdated();},t;}(c.b);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(0),i=r(23),a=r(4),o=r(40),s=r(45),u=r(85),c=r(2),l=function(e){function t(r,i){void 0===i&&(i={});var a=e.call(this,{props:Object(n.__assign)(Object(n.__assign)({},c.ParamDefinition.getDefaultValues(t.Params)),i)})||this;return a.plugin=r,a._props=c.ParamDefinition.getDefaultValues(t.Params),a.events={propsUpdated:a.ev()},a.lociSelects=new t.LociSelectManager(r,a._props),a.lociHighlights=new t.LociHighlightManager(r,a._props),a;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"props\",{get:function get(){return Object(n.__assign)({},this.state.props);},enumerable:!1,configurable:!0}),t.prototype.setProps=function(e){var t=this.props,r=Object(n.__assign)(Object(n.__assign)({},this.state.props),e);Object(u.d)(t,r)||(this.updateState({props:r}),this.lociSelects.setProps(r),this.lociHighlights.setProps(r),this.events.propsUpdated.next());},t;}(r(118).b);!function(e){e.Params={granularity:c.ParamDefinition.Select(\"residue\",i.Loci.GranularityOptions,{label:\"Picking Level\",description:\"Controls if selections are expanded upon picking to whole residues, chains, structures, instances, or left as atoms and coarse elements\"})};var t=function(){function t(t,r){void 0===r&&(r={}),this.ctx=t,this.providers=[],this.props=c.ParamDefinition.getDefaultValues(e.Params),this.sel=t.managers.structure.selection,this.setProps(r);}return t.prototype.setProps=function(e){Object.assign(this.props,e);},t.prototype.addProvider=function(e){this.providers.push(e);},t.prototype.removeProvider=function(e){this.providers=this.providers.filter(function(t){return t!==e;});},t.prototype.normalizedLoci=function(e,t){void 0===t&&(t=!0);var r=e.loci,n=e.repr,a=t?this.props.granularity:void 0;return{loci:i.Loci.normalize(r,a),repr:n};},t.prototype.mark=function(e,t){for(var r=0,n=this.providers;r<n.length;r++){(0,n[r])(e,t);}},t;}();e.LociMarkManager=t;var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.prev=[],t.clearHighlights=function(){for(var e=0,r=t.prev;e<r.length;e++){var n=r[e];t.mark(n,s.a.RemoveHighlight);}t.prev.length=0;},t;}return Object(n.__extends)(t,e),t.prototype.isHighlighted=function(e){for(var t=0,r=this.prev;t<r.length;t++){var n=r[t];if(o.a.Loci.areEqual(n,e))return!0;}return!1;},t.prototype.addHighlight=function(e){this.mark(e,s.a.Highlight),this.prev.push(e);},t.prototype.highlight=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);this.isHighlighted(r)||this.addHighlight(r);},t.prototype.highlightOnly=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);this.isHighlighted(r)||(this.clearHighlights(),this.addHighlight(r));},t.prototype.highlightOnlyExtend=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);if(a.StructureElement.Loci.is(r.loci)){var n={loci:this.sel.tryGetRange(r.loci)||r.loci,repr:r.repr};this.isHighlighted(n)||(this.clearHighlights(),this.addHighlight(n));}},t;}(t);e.LociHighlightManager=r;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.toggle=function(t,r){if(void 0===r&&(r=!0),!i.Loci.isEmpty(t.loci)){var n=this.normalizedLoci(t,r);a.StructureElement.Loci.is(n.loci)?this.toggleSel(n):e.prototype.mark.call(this,n,s.a.Toggle);}},t.prototype.toggleExtend=function(e,t){if(void 0===t&&(t=!0),!i.Loci.isEmpty(e.loci)){var r=this.normalizedLoci(e,t);if(a.StructureElement.Loci.is(r.loci)){var n=this.sel.tryGetRange(r.loci)||r.loci;this.toggleSel({loci:n,repr:r.repr});}}},t.prototype.select=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);a.StructureElement.Loci.is(r.loci)&&this.sel.modify(\"add\",r.loci),this.mark(r,s.a.Select);},t.prototype.selectJoin=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);a.StructureElement.Loci.is(r.loci)&&this.sel.modify(\"intersect\",r.loci),this.mark(r,s.a.Select);},t.prototype.selectOnly=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);a.StructureElement.Loci.is(r.loci)&&(this.deselect({loci:a.Structure.toStructureElementLoci(r.loci.structure),repr:r.repr},!1),this.sel.modify(\"set\",r.loci)),this.mark(r,s.a.Select);},t.prototype.deselect=function(e,t){void 0===t&&(t=!0);var r=this.normalizedLoci(e,t);a.StructureElement.Loci.is(r.loci)&&this.sel.modify(\"remove\",r.loci),this.mark(r,s.a.Deselect);},t.prototype.deselectAll=function(){this.sel.clear(),this.mark({loci:i.EveryLoci},s.a.Deselect);},t.prototype.deselectAllOnEmpty=function(e){Object(i.isEmptyLoci)(e.loci)&&this.deselectAll();},t.prototype.mark=function(t,r){var n=t.loci;a.StructureElement.Loci.is(n)?(e.prototype.mark.call(this,{loci:a.Structure.Loci(n.structure)},s.a.Deselect),e.prototype.mark.call(this,{loci:this.sel.getLoci(n.structure)},s.a.Select)):e.prototype.mark.call(this,t,r);},t.prototype.toggleSel=function(e){this.sel.has(e.loci)?(this.sel.modify(\"remove\",e.loci),this.mark(e,s.a.Deselect)):(this.sel.modify(\"add\",e.loci),this.mark(e,s.a.Select));},t;}(t);e.LociSelectManager=u;}(l||(l={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"VolumeStreamingControls\",function(){return y;}),r.d(t,\"VolumeSourceControls\",function(){return _;});var n=r(0),i=r(3),a=r(275),o=r(380),s=r(223),u=r(160),c=r(299),l=r(13),d=r(32),f=r(56),p=r(19),m=r(309),h=r(183),g=r(189),v=r(26),b=r(14),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{header:\"Volume Streaming\",isCollapsed:!1,isBusy:!1,isHidden:!0,brand:{accent:\"cyan\",svg:b.BlurOnSvg}};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(){e.setState({isHidden:!e.canEnable(),description:a.StructureHierarchyManager.getSelectedStructuresDescription(e.plugin)});}),this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){l.StateTransform.hasTag(t.cell.transform,u.a.RootTag)&&e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"pivot\",{get:function get(){return this.plugin.managers.structure.hierarchy.selection.structures[0];},enumerable:!1,configurable:!0}),t.prototype.canEnable=function(){var e,t;if(1!==this.plugin.managers.structure.hierarchy.selection.structures.length)return!1;var r=this.pivot.cell;return!!r.obj&&!!(null===(t=(e=c.InitVolumeStreaming.definition).isApplicable)||void 0===t?void 0:t.call(e,r.obj,r.transform,this.plugin));},t.prototype.renderEnable=function(){var e,t=this.pivot;if(!t.cell.parent)return null;var r=l.StateSelection.findTagInSubtree(t.cell.parent.tree,this.pivot.cell.transform.ref,u.a.RootTag),n=r&&t.cell.parent.cells.get(r),a=n&&\"error\"===n.status?{header:\"Error enabling\",icon:b.ErrorSvg,title:n.errorText}:n&&0===(null===(e=n.obj)||void 0===e?void 0:e.data.entries.length)?{header:\"Error enabling\",icon:b.ErrorSvg,title:\"No entry for streaming found\"}:{header:\"Enable\",icon:b.CheckSvg,title:\"Enable\"};return i.createElement(m.a,{state:t.cell.parent,action:c.InitVolumeStreaming,initiallyCollapsed:!0,nodeRef:t.cell.transform.ref,simpleApply:a});},t.prototype.renderParams=function(){var e,t,r,n,a,o=this.pivot;if(!o.cell.parent)return null;var u=\"selection-box\"===(null===(t=null===(e=o.volumeStreaming)||void 0===e?void 0:e.cell.transform.params)||void 0===t?void 0:t.entry.params.view.name)&&(null===(a=null===(n=null===(r=this.plugin.state.behaviors.cells.get(s.FocusLoci.id))||void 0===r?void 0:r.params)||void 0===n?void 0:n.values)||void 0===a?void 0:a.bindings);return i.createElement(i.Fragment,null,i.createElement(h.UpdateTransformControl,{state:o.cell.parent,transform:o.volumeStreaming.cell.transform,customHeader:\"none\",noMargin:!0}),u&&i.createElement(p.ExpandGroup,{header:\"Controls Help\"},i.createElement(g.BindingsHelp,{bindings:u})));},t.prototype.renderControls=function(){var e=this.pivot;return e?e.volumeStreaming?this.renderParams():this.renderEnable():null;},t;}(d.CollapsableControls),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.item=function(e){var r,n=t.plugin.managers.volume.hierarchy.selection;return{kind:\"item\",label:(null===(r=e.cell.obj)||void 0===r?void 0:r.label)||\"Volume\"||e.kind,selected:n===e,value:e};},t.selectCurrent=function(e){t.toggleHierarchy(),e&&t.plugin.managers.volume.hierarchy.setCurrent(e.value);},t.selectAdd=function(e){e&&(t.setState({show:void 0}),e.value());},t.toggleHierarchy=function(){return t.setState({show:\"hierarchy\"!==t.state.show?\"hierarchy\":void 0});},t.toggleAddRepr=function(){return t.setState({show:\"add-repr\"!==t.state.show?\"add-repr\":void 0});},t;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{header:\"Volume\",isCollapsed:!1,isBusy:!1,isHidden:!0,brand:{accent:\"purple\",svg:b.BlurOnSvg}};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.volume.hierarchy.behaviors.selection,function(t){e.setState({isHidden:0===t.hierarchy.volumes.length});}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"hierarchyItems\",{get:function get(){for(var e=[],t=0,r=this.plugin.managers.volume.hierarchy.current.volumes;t<r.length;t++){var n=r[t];e.push(this.item(n));}return e;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"addActions\",{get:function get(){var e=this.plugin.managers.volume.hierarchy,t=e.selection;return Object(n.__spreadArrays)(o.a.getRepresentationTypes(this.plugin,t).map(function(r){return f.a.Item(r[1],function(){return e.addRepresentation(t,r[0]);});}));},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"isEmpty\",{get:function get(){return 0===this.plugin.managers.volume.hierarchy.current.volumes.length;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"label\",{get:function get(){var e,t=this.plugin.managers.volume.hierarchy.selection;return t?(null===(e=null==t?void 0:t.cell.obj)||void 0===e?void 0:e.label)||\"Volume\":\"Nothing Selected\";},enumerable:!1,configurable:!0}),t.prototype.renderControls=function(){var e=this.state.isBusy||this.isEmpty,t=this.label,r=this.plugin.managers.volume.hierarchy.selection;return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\",style:{marginTop:\"1px\"}},i.createElement(p.Button,{noOverflow:!0,flex:!0,onClick:this.toggleHierarchy,disabled:e,title:t},t),!this.isEmpty&&i.createElement(p.IconButton,{svg:b.AddSvg,onClick:this.toggleAddRepr,title:\"Apply a structure presets to the current hierarchy.\",toggleState:\"add-repr\"===this.state.show,disabled:e})),\"hierarchy\"===this.state.show&&i.createElement(f.a,{items:this.hierarchyItems,onSelect:this.selectCurrent}),\"add-repr\"===this.state.show&&i.createElement(f.a,{items:this.addActions,onSelect:this.selectAdd}),r&&r.representations.length>0&&i.createElement(\"div\",{style:{marginTop:\"6px\"}},r.representations.map(function(e){return i.createElement(S,{key:e.cell.transform.ref,representation:e});})));},t;}(d.CollapsableControls),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={action:void 0},t.remove=function(){return t.plugin.managers.volume.hierarchy.remove([t.props.representation],!0);},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.volume.hierarchy.toggleVisibility([t.props.representation]);},t.toggleUpdate=function(){return t.setState({action:\"update\"===t.state.action?void 0:\"update\"});},t.highlight=function(e){e.preventDefault(),t.props.representation.cell.parent&&v.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:t.props.representation.cell.parent,ref:t.props.representation.cell.transform.ref});},t.clearHighlight=function(e){e.preventDefault(),v.PluginCommands.Interactivity.ClearHighlights(t.plugin);},t.focus=function(){var e,r=t.props.representation,n=null===(e=t.props.representation.cell.obj)||void 0===e?void 0:e.data.repr.renderObjects;r.cell.state.isHidden&&t.plugin.managers.volume.hierarchy.toggleVisibility([t.props.representation],\"show\"),t.plugin.managers.camera.focusRenderObjects(n,{extraRadius:1});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){l.State.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate();});},t.prototype.render=function(){var e,t,r,n=this.props.representation.cell;return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(p.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:(null===(e=n.obj)||void 0===e?void 0:e.label)+\". Click to focus.\",onClick:this.focus,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:{textAlign:\"left\"}},null===(t=n.obj)||void 0===t?void 0:t.label,i.createElement(\"small\",{className:\"msp-25-lower-contrast-text\",style:{float:\"right\"}},null===(r=n.obj)||void 0===r?void 0:r.description)),i.createElement(p.IconButton,{svg:n.state.isHidden?b.VisibilityOffOutlinedSvg:b.VisibilityOutlinedSvg,toggleState:!1,onClick:this.toggleVisible,title:(n.state.isHidden?\"Show\":\"Hide\")+\" component\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(p.IconButton,{svg:b.DeleteOutlinedSvg,onClick:this.remove,title:\"Remove\",small:!0}),i.createElement(p.IconButton,{svg:b.MoreHorizSvg,onClick:this.toggleUpdate,title:\"Actions\",toggleState:\"update\"===this.state.action})),\"update\"===this.state.action&&!!n.parent&&i.createElement(\"div\",{style:{marginBottom:\"6px\"},className:\"msp-accent-offset\"},i.createElement(h.UpdateTransformControl,{state:n.parent,transform:n.transform,customHeader:\"none\",noMargin:!0})));},t;}(d.PurePluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return f;});var n=r(0),i=r(13),a=r(8),o=r(170),s=r(26),u=r(2),c=r(5),l=r(151),d=r(235),f=function(e){function t(r){var s=e.call(this)||this;return s.plugin=r,s.data=i.State.create(new a.a.Root({}),{runTask:s.plugin.runTask,globalContext:s.plugin}),s.behaviors=i.State.create(new o.PluginBehavior.Root({}),{runTask:s.plugin.runTask,globalContext:s.plugin,rootState:{isLocked:!0}}),s.events={cell:{stateUpdated:Object(d.a)(s.data.events.cell.stateUpdated,s.behaviors.events.cell.stateUpdated),created:Object(d.a)(s.data.events.cell.created,s.behaviors.events.cell.created),removed:Object(d.a)(s.data.events.cell.removed,s.behaviors.events.cell.removed)},object:{created:Object(d.a)(s.data.events.object.created,s.behaviors.events.object.created),removed:Object(d.a)(s.data.events.object.removed,s.behaviors.events.object.removed),updated:Object(d.a)(s.data.events.object.updated,s.behaviors.events.object.updated)}},s.snapshotParams=s.ev.behavior(t.DefaultSnapshotParams),s.setSnapshotParams=function(e){s.snapshotParams.next(Object(n.__assign)(Object(n.__assign)({},t.DefaultSnapshotParams),e));},s;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"animation\",{get:function get(){return this.plugin.managers.animation;},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(e){var t,r,i=Object(n.__assign)(Object(n.__assign)({},this.snapshotParams.value),e);return{id:c.c.create22(),data:i.data?this.data.getSnapshot():void 0,behaviour:i.behavior?this.behaviors.getSnapshot():void 0,animation:i.animation?this.animation.getSnapshot():void 0,startAnimation:i.startAnimation?!!i.startAnimation:void 0,camera:i.camera?{current:this.plugin.canvas3d.camera.getSnapshot(),transitionStyle:i.cameraTransition.name,transitionDurationInMs:\"animate\"===(null===(t=null==i?void 0:i.cameraTransition)||void 0===t?void 0:t.name)?i.cameraTransition.params.durationInMs:void 0}:void 0,canvas3d:i.canvas3d?{props:null===(r=this.plugin.canvas3d)||void 0===r?void 0:r.props}:void 0,interactivity:i.interactivity?{props:this.plugin.managers.interactivity.props}:void 0,structureFocus:this.plugin.managers.structure.focus.getSnapshot(),durationInMs:null==i?void 0:i.durationInMs};},t.prototype.setSnapshot=function(e){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(t){switch(t.label){case 0:return[4,this.animation.stop()];case 1:return t.sent(),e.behaviour?[4,this.plugin.runTask(this.behaviors.setSnapshot(e.behaviour))]:[3,3];case 2:t.sent(),t.label=3;case 3:return e.data?[4,this.plugin.runTask(this.data.setSnapshot(e.data))]:[3,5];case 4:t.sent(),t.label=5;case 5:return e.canvas3d&&e.canvas3d.props?[4,s.PluginCommands.Canvas3D.SetSettings(this.plugin,{settings:e.canvas3d.props})]:[3,7];case 6:t.sent(),t.label=7;case 7:return e.interactivity&&e.interactivity.props&&this.plugin.managers.interactivity.setProps(e.interactivity.props),e.structureFocus&&this.plugin.managers.structure.focus.setSnapshot(e.structureFocus),e.animation&&this.animation.setSnapshot(e.animation),e.camera&&s.PluginCommands.Camera.Reset(this.plugin,{snapshot:e.camera.current,durationMs:\"animate\"===e.camera.transitionStyle?e.camera.transitionDurationInMs:void 0}),e.startAnimation&&this.animation.start(),[2];}});});},t.prototype.updateTransform=function(e,t,r,n){var i=e.build().to(t).update(r);return s.PluginCommands.State.Update(this.plugin,{state:e,tree:i,options:{canUndo:n}});},t.prototype.updateBehavior=function(e,t){var r=this.behaviors.build();if(this.behaviors.tree.transforms.has(e.id))r.to(e.id).update(t);else{var n=e.createDefaultParams(void 0,this.plugin);r.to(o.PluginBehavior.getCategoryId(e)).apply(e,Object(l.b)(n,t),{ref:e.id});}return this.plugin.runTask(this.behaviors.updateTree(r));},t.prototype.dispose=function(){this.behaviors.cells.forEach(function(e){o.PluginBehavior.Behavior.is(e.obj)&&e.obj.data.unregister();}),e.prototype.dispose.call(this),this.data.dispose(),this.behaviors.dispose(),this.animation.dispose();},t;}(r(118).a);!function(e){e.SnapshotParams={durationInMs:u.ParamDefinition.Numeric(1500,{min:100,max:15e3,step:100},{label:\"Duration in ms\"}),data:u.ParamDefinition.Boolean(!0),behavior:u.ParamDefinition.Boolean(!1),animation:u.ParamDefinition.Boolean(!0),startAnimation:u.ParamDefinition.Boolean(!1),canvas3d:u.ParamDefinition.Boolean(!0),interactivity:u.ParamDefinition.Boolean(!0),camera:u.ParamDefinition.Boolean(!0),cameraTransition:u.ParamDefinition.MappedStatic(\"animate\",{animate:u.ParamDefinition.Group({durationInMs:u.ParamDefinition.Numeric(250,{min:100,max:5e3,step:500},{label:\"Duration in ms\"})}),instant:u.ParamDefinition.Group({})},{options:[[\"animate\",\"Animate\"],[\"instant\",\"Instant\"]]})},e.DefaultSnapshotParams=u.ParamDefinition.getDefaultValues(e.SnapshotParams);}(f||(f={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function n(e){return e&&\"number\"==typeof e.length&&\"function\"!=typeof e;};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n=function n(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete();};};},function(e,t,r){\"use strict\";function n(e){return!!e&&\"function\"!=typeof e.subscribe&&\"function\"==typeof e.then;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StateTree\",function(){return g;});var n=r(0),i=r(3),a=r(169),o=r(388),s=r(26),u=r(13),c=r(302),l=r(32),d=r(56),f=r(19),p=r(14),m=r(309),h=r(183),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showActions:!0},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.created,function(t){t.cell.transform.parent===u.StateTransform.RootRef&&e.forceUpdate();}),this.subscribe(this.plugin.state.events.cell.removed,function(t){t.parent===u.StateTransform.RootRef&&e.forceUpdate();});},t.getDerivedStateFromProps=function(e,t){var r=e.state.tree.root.ref,n=0===e.state.tree.children.get(r).size;return t.showActions===n?null:{showActions:n};},t.prototype.render=function(){var e=this.props.state.tree.root.ref;return this.state.showActions?i.createElement(\"div\",{style:{margin:\"10px\",cursor:\"default\"}},i.createElement(\"p\",null,\"Nothing to see here yet.\"),i.createElement(\"p\",null,\"Structures and Volumes can be loaded from the \",i.createElement(p.Icon,{svg:p.HomeOutlinedSvg}),\" tab.\")):i.createElement(v,{cell:this.props.state.cells.get(e),depth:0});},t;}(l.PluginUIComponent),v=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={isCollapsed:!!r.props.cell.state.isCollapsed,isNull:t.isNull(r.props.cell),showLabel:t.showLabel(r.props.cell)},r;}return Object(n.__extends)(t,e),t.prototype.is=function(e){return e.ref===this.ref&&e.state===this.props.cell.parent;},Object.defineProperty(t.prototype,\"ref\",{get:function get(){return this.props.cell.transform.ref;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(r){e.props.cell===r.cell&&e.is(r)&&r.state.cells.has(e.ref)&&(e.state.isCollapsed===!!r.cell.state.isCollapsed&&e.state.isNull===t.isNull(r.cell)&&e.state.showLabel===t.showLabel(r.cell)||e.forceUpdate());}),this.subscribe(this.plugin.state.events.cell.created,function(t){e.props.cell.parent===t.state&&e.ref===t.cell.transform.parent&&e.forceUpdate();}),this.subscribe(this.plugin.state.events.cell.removed,function(t){e.props.cell.parent===t.state&&e.ref===t.parent&&e.forceUpdate();});},t.getDerivedStateFromProps=function(e,r){var n=t.isNull(e.cell),i=t.showLabel(e.cell);return!!e.cell.state.isCollapsed===r.isCollapsed&&r.isNull===n&&r.showLabel===i?null:{isCollapsed:!!e.cell.state.isCollapsed,isNull:n,showLabel:i};},t.hasDecorator=function(e){var t,r=e.parent.tree.children.get(e.transform.ref);return 1===r.size&&!!(null===(t=e.parent)||void 0===t?void 0:t.tree.transforms.get(r.first()).transformer.definition.isDecorator);},t.isNull=function(e){return!e||!e.parent||e.obj===u.StateObject.Null||!e.parent.tree.transforms.has(e.transform.ref);},t.showLabel=function(e){return e.transform.ref!==u.StateTransform.RootRef&&(\"ok\"!==e.status||!e.state.isGhost&&!t.hasDecorator(e));},t.prototype.render=function(){var e=this;if(this.state.isNull)return null;var r=this.props.cell,n=r.parent.tree.children.get(this.ref);if(!this.state.showLabel)return 0===n.size?null:i.createElement(i.Fragment,null,n.map(function(n){return i.createElement(t,{cell:r.parent.cells.get(n),key:n,depth:e.props.depth});}));var a=this.props.depth+1;return i.createElement(i.Fragment,null,i.createElement(b,{cell:r,depth:this.props.depth}),0===n.size?void 0:i.createElement(\"div\",{style:{display:this.state.isCollapsed?\"none\":\"block\"}},n.map(function(e){return i.createElement(t,{cell:r.parent.cells.get(e),key:e,depth:a});})));},t;}(l.PluginUIComponent),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isCurrent:t.props.cell.parent.current===t.ref,isCollapsed:!!t.props.cell.state.isCollapsed,action:void 0,currentAction:void 0},t.setCurrent=function(e){null==e||e.preventDefault(),null==e||e.currentTarget.blur(),s.PluginCommands.State.SetCurrentObject(t.plugin,{state:t.props.cell.parent,ref:t.ref});},t.setCurrentRoot=function(e){null==e||e.preventDefault(),null==e||e.currentTarget.blur(),s.PluginCommands.State.SetCurrentObject(t.plugin,{state:t.props.cell.parent,ref:u.StateTransform.RootRef});},t.remove=function(e){null==e||e.preventDefault(),s.PluginCommands.State.RemoveObject(t.plugin,{state:t.props.cell.parent,ref:t.ref,removeParentGhosts:!0});},t.toggleVisible=function(e){e.preventDefault(),s.PluginCommands.State.ToggleVisibility(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur();},t.toggleExpanded=function(e){e.preventDefault(),s.PluginCommands.State.ToggleExpanded(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur();},t.highlight=function(e){e.preventDefault(),s.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:t.props.cell.parent,ref:t.ref}),e.currentTarget.blur();},t.clearHighlight=function(e){e.preventDefault(),s.PluginCommands.Interactivity.ClearHighlights(t.plugin),e.currentTarget.blur();},t.hideApply=function(){t.setCurrentRoot();},t.selectAction=function(e){e&&(null==e?void 0:e.value)();},t;}return Object(n.__extends)(t,e),t.prototype.is=function(e){return e.ref===this.ref&&e.state===this.props.cell.parent;},Object.defineProperty(t.prototype,\"ref\",{get:function get(){return this.props.cell.transform.ref;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated.pipe(Object(a.a)(function(t){return e.is(t);}),Object(o.a)(33)),function(t){e.forceUpdate();}),this.subscribe(this.props.cell.parent.behaviors.currentObject,function(t){e.is(t)?t.state.transforms.has(e.ref)&&e._setCurrent(e.props.cell.parent.current===e.ref,!!e.props.cell.state.isCollapsed):e.state.isCurrent&&t.state.transforms.has(e.ref)&&e._setCurrent(e.props.cell.parent.current===e.ref,e.state.isCollapsed);});},t.prototype._setCurrent=function(e,t){e?this.setState({isCurrent:e,action:\"options\",currentAction:void 0,isCollapsed:t}):this.setState({isCurrent:e,action:void 0,currentAction:void 0,isCollapsed:t});},t.getDerivedStateFromProps=function(e,t){var r=e.cell.parent.current===e.cell.transform.ref,n=!!e.cell.state.isCollapsed;return t.isCollapsed===n&&t.isCurrent===r?null:{isCurrent:r,isCollapsed:n,action:void 0,currentAction:void 0};},Object.defineProperty(t.prototype,\"actions\",{get:function get(){var e=this,t=this.props.cell,r=Object(n.__spreadArrays)(t.parent.actions.fromCell(t,this.plugin));if(0!==r.length)return r.sort(function(e,t){return e.definition.display.name<t.definition.display.name?-1:e.definition.display.name===t.definition.display.name?0:1;}),Object(n.__spreadArrays)([d.a.Header(\"Apply Action\")],r.map(function(t){return d.a.Item(t.definition.display.name,function(){return e.setState({action:\"apply\",currentAction:t});});}));},enumerable:!1,configurable:!0}),t.prototype.updates=function(e){for(var t=this.props.cell,r=c.a.getDecoratorChain(t.parent,t.transform.ref),n=[],a=r.length-1;a>=0;a--){var o=r[a];n.push(i.createElement(h.UpdateTransformControl,{key:o.transform.transformer.id+\"-\"+a,state:t.parent,transform:o.transform,noMargin:!0,wrapInExpander:!0,expanderHeaderLeftMargin:e}));}return i.createElement(\"div\",{className:\"msp-tree-updates-wrapper\"},n);},t.prototype.render=function(){var e=this.props.cell,t=e.transform;if(!e)return null;var r,n=this.is(e.parent.behaviors.currentObject.value),a=\"error\"!==e.status&&\"ok\"!==e.status;if(\"error\"!==e.status&&e.obj){var o=e.obj,s=o.label+\" \"+(o.description?o.description:\"\");r=i.createElement(f.Button,{className:\"msp-btn-tree-label msp-type-class-\"+o.type.typeClass,noOverflow:!0,disabled:a,title:s,onClick:this.state.isCurrent?this.setCurrentRoot:this.setCurrent},i.createElement(\"span\",null,o.label),\" \",o.description?i.createElement(\"small\",null,o.description):void 0);}else{var u=\"error\"===e.status?e.errorText:t.transformer.definition.display.name;r=i.createElement(f.Button,{className:\"msp-btn-tree-label msp-no-hover-outline\",noOverflow:!0,title:u,onClick:this.state.isCurrent?this.setCurrentRoot:this.setCurrent,disabled:a},\"error\"===e.status&&i.createElement(\"b\",null,\"[\",e.status,\"]\"),\" \",i.createElement(\"span\",null,u));}var c=e.parent.tree.children.get(this.ref),l=e.state,h=i.createElement(f.IconButton,{svg:l.isCollapsed?p.ArrowRightSvg:p.ArrowDropDownSvg,flex:\"20px\",disabled:a,onClick:this.toggleExpanded,transparent:!0,className:\"msp-no-hover-outline\",style:{visibility:c.size>0?\"visible\":\"hidden\"}}),g=e.state.isLocked?void 0:i.createElement(f.IconButton,{svg:p.DeleteOutlinedSvg,onClick:this.remove,disabled:a,small:!0,toggleState:!1}),v=i.createElement(f.IconButton,{svg:l.isHidden?p.VisibilityOffOutlinedSvg:p.VisibilityOutlinedSvg,toggleState:!1,disabled:a,small:!0,onClick:this.toggleVisible}),b={marginLeft:8*this.props.depth+\"px\"},y=i.createElement(\"div\",{className:\"msp-flex-row msp-tree-row\"+(n?\" msp-tree-row-current\":\"\"),onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight,style:b},h,r,g,v);if(!n)return y;if(\"apply\"===this.state.action&&this.state.currentAction)return i.createElement(\"div\",{style:{marginBottom:\"1px\"}},y,i.createElement(f.ControlGroup,{header:\"Apply \"+this.state.currentAction.definition.display.name,initialExpanded:!0,hideExpander:!0,hideOffset:!1,onHeaderClick:this.hideApply,topRightIcon:p.CloseSvg,headerLeftMargin:8*this.props.depth+21+\"px\"},i.createElement(m.a,{onApply:this.hideApply,state:this.props.cell.parent,action:this.state.currentAction,nodeRef:this.props.cell.transform.ref,hideHeader:!0,noMargin:!0})));if(\"options\"===this.state.action){var _=this.actions,S=this.updates(8*this.props.depth+21+\"px\");return i.createElement(\"div\",{style:{marginBottom:\"1px\"}},y,S,_&&i.createElement(\"div\",{style:{marginLeft:8*this.props.depth+21+\"px\",marginTop:\"-1px\"}},i.createElement(d.a,{items:_,onSelect:this.selectAction})));}return y;},t;}(l.PluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureQualityReportColorThemeParams\",function(){return l;}),r.d(t,\"StructureQualityReportColorTheme\",function(){return d;}),r.d(t,\"StructureQualityReportColorThemeProvider\",function(){return f;});var n=r(212),i=r(4),a=r(24),o=r(140),s=r(2),u=[a.Color.fromRgb(170,170,170),a.Color.fromRgb(0,255,0),a.Color.fromRgb(255,255,0),a.Color.fromRgb(255,128,0),a.Color.fromRgb(255,0,0)],c=[[\"No Issues\",u[1]],[\"One Issue\",u[2]],[\"Two Issues\",u[3]],[\"Three Or More Issues\",u[4]],[\"Not Applicable\",u[9]]],l={type:s.ParamDefinition.MappedStatic(\"issue-count\",{\"issue-count\":s.ParamDefinition.Group({}),\"specific-issue\":s.ParamDefinition.Group({kind:s.ParamDefinition.Text()})})};function d(e,t){var r;if(e.structure&&!e.structure.isEmpty&&e.structure.models[0].customProperties.has(n.b.descriptor)){var a=n.a.getIssues;if(\"issue-count\"===t.type.name)r=function r(e){return i.StructureElement.Location.is(e)?u[Math.min(3,a(e).length)+1]:u[0];};else{var s=t.type.params.kind;r=function r(e){return i.StructureElement.Location.is(e)&&a(e).indexOf(s)>=0?u[4]:u[0];};}}else r=function r(){return u[0];};return{factory:d,granularity:\"group\",color:r,props:t,description:\"Assigns residue colors according to the number of quality issues or a specific quality issue. Data from wwPDB Validation Report, obtained via PDBe.\",legend:Object(o.b)(c)};}var f={name:\"pdbe-structure-quality-report\",label:\"Structure Quality Report\",category:\"Validation\",factory:d,getParams:function getParams(e){var t=n.a.getIssueTypes(e.structure);return 0===t.length?{type:s.ParamDefinition.MappedStatic(\"issue-count\",{\"issue-count\":s.ParamDefinition.Group({})})}:{type:s.ParamDefinition.MappedStatic(\"issue-count\",{\"issue-count\":s.ParamDefinition.Group({}),\"specific-issue\":s.ParamDefinition.Group({kind:s.ParamDefinition.Select(t[0],s.ParamDefinition.arrayToOptions(t))},{isFlat:!0})})};},defaultValues:s.ParamDefinition.getDefaultValues(l),isApplicable:function isApplicable(e){var t;return n.a.isApplicable(null===(t=e.structure)||void 0===t?void 0:t.models[0]);},ensureCustomProperties:{attach:function attach(e,t){return t.structure?n.b.attach(e,t.structure.models[0],void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.models[0].customProperties.reference(n.b.descriptor,!1);}}};},function(e,t,r){\"use strict\";function n(e,t){function r(){return!r.pred.apply(r.thisArg,arguments);}return r.pred=e,r.thisArg=t,r;}r.d(t,\"a\",function(){return n;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return A;});var n=r(0),i=r(40),a=r(241),o=r(85),s=r(2),u=r(218),c=r(36),l=r(237),d=r(86),f=r(143),p=r(23),m=r(6),h=r(124),g=r(82),v=r(24),b=r(196);function y(e,t,r,i,a){return Object(n.__awaiter)(this,void 0,void 0,function(){var e,o,s,l,d,p,m,g,b,y,O,x,C,w,P,j,E,A,T,D,I,M,k,B,V,R,L,N,F,U,z,H,G,q,W,Q,Y,X;return Object(n.__generator)(this,function(n){for(e=i.dimension.name,o=i.isoValue,s=t.grid.cells,l=s.space,d=s.data,p=t.grid.stats,m=p.min,g=p.max,b=c.b.IsoValue.toAbsolute(o,t.grid.stats).absoluteValue,y=r.color.color(f.b,!1),O=v.Color.toRgbNormalized(y),x=O[0],C=O[1],w=O[2],P=_(t.grid,i),j=P.width,E=P.height,A=P.x,T=P.y,D=P.z,I=P.x0,M=P.y0,k=P.z0,B=P.nx,V=P.ny,R=P.nz,L=new Float32Array(\"x\"===e?[A,0,0,A,T,0,A,0,D,A,T,D]:\"y\"===e?[0,T,0,A,T,0,0,T,D,A,T,D]:[0,0,D,0,T,D,A,0,D,A,T,D]),N=new Float32Array(j*E*4),F=S(t.grid,i),U=0,z=M;z<V;++z)for(H=I;H<B;++H)for(G=k;G<R;++G)q=l.get(d,H,z,G),W=(q-m)/(g-m),N[U]=x*W*2,N[U+1]=C*W*2,N[U+2]=w*W*2,N[U+3]=q>=b?1:0,U+=4;return Q={width:j,height:E,array:N,flipY:!0},Y={width:j,height:E,array:F,flipY:!0},X=c.a.getGridToCartesianTransform(t.grid),Object(h.e)(X,L,0,4),[2,u.a.create(Q,L,Y,a)];});});}function _(e,t){var r,n,i,a,o,s=t.dimension,u=s.name,c=s.params,l=0,d=0,f=0,p=e.cells.space.dimensions,m=p[0],h=p[1],g=p[2];return\"x\"===u?(a=h-1,o=g-1,r=g,n=h,m=(l=i=c)+1):\"y\"===u?(i=m-1,o=g-1,r=g,n=m,h=(d=a=c)+1):(i=m-1,a=h-1,r=m,n=h,g=(f=o=c)+1),{width:r,height:n,x:i,y:a,z:o,x0:l,y0:d,z0:f,nx:m,ny:h,nz:g};}function S(e,t){for(var r=e.cells.space,n=_(e,t),i=n.width,a=n.height,o=n.x0,s=n.y0,u=n.z0,c=n.nx,l=n.ny,d=n.nz,f=new Float32Array(i*a),p=0,m=s;m<l;++m)for(var h=o;h<c;++h)for(var g=u;g<d;++g)f[p]=r.dataOffset(h,m,g),p+=1;return f;}function O(e,t){var r=S(e.grid,t);return c.b.Cell.Loci(e,m.SortedArray.ofUnsortedArray(r));}function x(e,t,r,n){var i=e.objectId,a=e.groupId;return n===i?c.b.Cell.Loci(t,m.Interval.ofSingleton(a)):p.EmptyLoci;}function C(e,t,r,n){var i=!1;if(c.b.isLoci(e)){if(!c.b.areEquivalent(e.volume,t))return!1;n(m.Interval.ofLength(t.grid.cells.data.length))&&(i=!0);}else if(c.b.Isosurface.isLoci(e)){if(!c.b.areEquivalent(e.volume,t))return!1;for(var a=t.grid,o=a.stats,s=a.cells.data,u=o.sigma,l=c.b.IsoValue.toAbsolute(e.isoValue,o).absoluteValue,d=0,f=s.length;d<f;++d)Object(g.b)(l,s[d],u)&&n(m.Interval.ofSingleton(d))&&(i=!0);}else if(c.b.Cell.isLoci(e)){if(!c.b.areEquivalent(e.volume,t))return!1;m.Interval.is(e.indices)?n(e.indices)&&(i=!0):m.OrderedSet.forEach(e.indices,function(e){n(m.Interval.ofSingleton(e))&&(i=!0);});}return i;}var w=Object(n.__assign)(Object(n.__assign)({},u.a.Params),{quality:Object(n.__assign)(Object(n.__assign)({},u.a.Params.quality),{isEssential:!1}),dimension:s.ParamDefinition.MappedStatic(\"x\",{x:s.ParamDefinition.Numeric(0,{min:0,max:0,step:1}),y:s.ParamDefinition.Numeric(0,{min:0,max:0,step:1}),z:s.ParamDefinition.Numeric(0,{min:0,max:0,step:1})},{isEssential:!0}),isoValue:a.a});function P(e){return Object(l.c)({defaultProps:s.ParamDefinition.getDefaultValues(w),createGeometry:y,createLocationIterator:function createLocationIterator(e){return Object(d.a)(e.grid.cells.data.length,1,function(){return f.b;});},getLoci:x,eachLocation:C,setUpdateState:function setUpdateState(e,t,r,n,i,a){e.createGeometry=r.dimension.name!==n.dimension.name||r.dimension.params!==n.dimension.params||!c.b.IsoValue.areSame(r.isoValue,n.isoValue,t.grid.stats)||!b.a.areEqual(i.color,a.color);},geometryUtils:Object(n.__assign)(Object(n.__assign)({},u.a.Utils),{createRenderableState:function createRenderableState(e){var t=u.a.Utils.createRenderableState(e);return j(t,e),t;},updateRenderableState:j})},e);}function j(e,t){u.a.Utils.updateRenderableState(e,t),e.opaque=!1,e.writeDepth=!0;}var E=Object(l.b)({name:\"slice\",label:\"Slice\",description:\"Slice of volume rendered as image with interpolation.\",factory:function factory(e,t){return Object(l.a)(\"Slice\",e,t,P,O);},getParams:function getParams(e,t){var r=s.ParamDefinition.clone(w),n=t.grid.cells.space.dimensions;return r.dimension=s.ParamDefinition.MappedStatic(\"x\",{x:s.ParamDefinition.Numeric(0,{min:0,max:n[0]-1,step:1}),y:s.ParamDefinition.Numeric(0,{min:0,max:n[1]-1,step:1}),z:s.ParamDefinition.Numeric(0,{min:0,max:n[2]-1,step:1})},{isEssential:!0}),r.isoValue=Object(a.c)(c.b.IsoValue.absolute(t.grid.stats.min),t.grid.stats),r;},defaultValues:s.ParamDefinition.getDefaultValues(w),defaultColorTheme:{name:\"uniform\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return!c.b.isEmpty(e);}}),A=function(e){function t(){var r=e.call(this)||this;return Object(o.c)(t.BuiltIn,function(e,t){if(e.name!==t)throw new Error(\"Fix BuiltInVolumeRepresentations to have matching names. \"+e.name+\" \"+t);r.add(e);}),r;}return Object(n.__extends)(t,e),t;}(i.b);(A||(A={})).BuiltIn={isosurface:a.b,slice:E};},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return _;});var n=r(0),i=r(216),a=r(118),o=r(8),s=r(13);function u(e,t){var r=function(e,t){return{state:e,oldHierarchy:t,hierarchy:c(),changed:!1,added:new Set()};}(e,t||c());return function(e,t){var r={tree:e,state:t};v(r,e.root);}(e.tree,r),t&&t.refs.forEach(h,r),{hierarchy:r.hierarchy,added:r.added,changed:r.changed};}function c(){return{volumes:[],refs:new Map()};}function l(e){return{kind:\"volume\",cell:e,version:e.transform.version,representations:[]};}function d(e,t){return{kind:\"volume-representation\",cell:e,version:e.transform.version,volume:t};}function f(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var o=n.apply(void 0,i);r.push(o),e.hierarchy.refs.set(t.transform.ref,o);var s=e.oldHierarchy.refs.get(t.transform.ref);return s?s.version!==t.transform.version&&(e.changed=!0):(e.added.add(o.cell.transform.ref),e.changed=!0),o;}var p=[[function(e,t){return function(r,n){return!t(n)&&e.is(r.obj);};}(o.a.Volume.Data,function(e){return e.currentVolume;}),function(e,t){e.currentVolume=f(e,t,e.hierarchy.volumes,l,t);},function(e){return e.currentVolume=void 0;}],[function(e,t){return!e.state.isGhost&&!!t.currentVolume&&o.a.Volume.Representation3D.is(e.obj);},function(e,t){return e.currentVolume&&f(e,t,e.currentVolume.representations,d,t,e.currentVolume),!1;},function(){}]];function m(e){if(!e||!(null==e?void 0:e.parent)||!e.parent.cells.has(e.transform.ref))return!1;var t=e.obj;return!(!t||t===s.StateObject.Null||\"ok\"!==e.status&&\"error\"!==e.status);}function h(e){m(e.cell)||(this.changed=!0);}function g(e){v(this,this.tree.transforms.get(e));}function v(e,t){var r=e.state,n=r.state.cells.get(t.ref);if(m(n)){for(var i=void 0,a=!1,o=0,s=p;o<s.length;o++){var u=s[o],c=u[0],l=u[1],d=u[2];if(c(n,r)){if(!1===l(r,n)){a=!0;break;}i=d;break;}}if(!a){var f=e.tree.children.get(t.ref);f&&f.size&&f.forEach(g,e),i&&i(r);}}}var b=r(314),y=r(28),_=function(e){function t(t){var r=e.call(this)||this;return r.plugin=t,r.state={syncedTree:r.dataState.tree,notified:!1,hierarchy:c(),selection:void 0},r.behaviors={selection:r.ev.behavior({hierarchy:r.current,volume:r.selection})},r.subscribe(t.state.data.events.changed,function(e){e.inTransaction||t.behaviors.state.isAnimating.value||r.sync(!0);}),r.subscribe(t.behaviors.state.isAnimating,function(e){e||t.behaviors.state.isUpdating.value||r.sync(!0);}),r;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this.sync(!1),this.state.hierarchy;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"selection\",{get:function get(){return this.sync(!1),this.state.selection;},enumerable:!1,configurable:!0}),t.prototype.sync=function(e){if(e||!this.dataState.inUpdate)if(this.state.syncedTree!==this.dataState.tree){this.state.syncedTree=this.dataState.tree;var t=u(this.plugin.state.data,this.current);if(t.changed){var r=t.hierarchy;this.state.hierarchy=r,this.state.selection?this.state.selection=r.refs.has(this.state.selection.cell.transform.ref)?r.refs.get(this.state.selection.cell.transform.ref):r.volumes[0]:this.state.selection=r.volumes[0],e?(this.state.notified=!0,this.behaviors.selection.next({hierarchy:r,volume:this.state.selection})):this.state.notified=!1;}}else e&&!this.state.notified&&(this.state.notified=!0,this.behaviors.selection.next({hierarchy:this.state.hierarchy,volume:this.state.selection}));},t.prototype.setCurrent=function(e){this.state.selection=e||this.state.hierarchy.volumes[0],this.behaviors.selection.next({hierarchy:this.state.hierarchy,volume:e||this.state.hierarchy.volumes[0]});},t.prototype.remove=function(e,t){if(0!==e.length){for(var r=this.plugin.state.data.build(),n=0,i=e;n<i.length;n++){var a=i[n];r.delete(\"string\"==typeof a?a:a.cell.transform.ref);}return r.commit({canUndo:!!t&&\"Remove\"});}},t.prototype.toggleVisibility=function(e,t){if(0!==e.length)for(var r=void 0!==t?\"show\"!==t:!e[0].cell.state.isHidden,n=0,a=e;n<a.length;n++){var o=a[n];Object(i.setSubtreeVisibility)(this.dataState,o.cell.transform.ref,r);}},t.prototype.addRepresentation=function(e,t){var r;return this.dataState.build().to(e.cell).apply(y.StateTransforms.Representation.VolumeRepresentation3D,Object(b.a)(this.plugin,null===(r=e.cell.obj)||void 0===r?void 0:r.data,{type:t})).commit({canUndo:\"Add Representation\"});},t;}(a.a);(_||(_={})).getRepresentationTypes=function(e,t){var r,n;return(null===(r=null==t?void 0:t.cell.obj)||void 0===r?void 0:r.data)?e.representation.volume.registry.getApplicableTypes(null===(n=t.cell.obj)||void 0===n?void 0:n.data):e.representation.volume.registry.types;};},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return c;}),r.d(t,\"a\",function(){return l;});var n=r(0),i=r(2);function a(e,t,r,n,i,a,s){for(var u=0;u<t;u++){for(var c=0;c<r;c++)n[c]=e[c*t+u];o(n,i,a,s,r);for(c=0;c<r;c++)e[c*t+u]=i[c];}for(c=0;c<r;c++){for(u=0;u<t;u++)n[u]=e[c*t+u];o(n,i,a,s,t);for(u=0;u<t;u++)e[c*t+u]=Math.sqrt(i[u]);}}function o(e,t,r,n,i){r[0]=0,n[0]=Number.MIN_SAFE_INTEGER,n[1]=Number.MAX_SAFE_INTEGER;for(var a=1,o=0;a<i;a++){for(var s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=Number.MAX_SAFE_INTEGER;}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;t[a]=(a-r[o])*(a-r[o])+e[r[o]];}}var s=r(53),u={};function c(e){var t=JSON.stringify(e);return void 0===u[t]&&(u[t]=new d(e)),u[t];}var l={fontFamily:i.ParamDefinition.Select(\"sans-serif\",[[\"sans-serif\",\"Sans Serif\"],[\"monospace\",\"Monospace\"],[\"serif\",\"Serif\"],[\"cursive\",\"Cursive\"]]),fontQuality:i.ParamDefinition.Select(3,[[0,\"lower\"],[1,\"low\"],[2,\"medium\"],[3,\"high\"],[4,\"higher\"]]),fontStyle:i.ParamDefinition.Select(\"normal\",[[\"normal\",\"Normal\"],[\"italic\",\"Italic\"],[\"oblique\",\"Oblique\"]]),fontVariant:i.ParamDefinition.Select(\"normal\",[[\"normal\",\"Normal\"],[\"small-caps\",\"Small Caps\"]]),fontWeight:i.ParamDefinition.Select(\"normal\",[[\"normal\",\"Normal\"],[\"bold\",\"Bold\"]])},d=function(){function e(e){void 0===e&&(e={}),this.mapped={},this.scratchW=0,this.scratchH=0,this.currentX=0,this.currentY=0,this.cutoff=.5;var t=Object(n.__assign)(Object(n.__assign)({},i.ParamDefinition.getDefaultValues(l)),e);this.props=t;var r=32*(t.fontQuality+1);this.buffer=r/8,this.radius=r/3,this.lineHeight=Math.round(r+2*this.buffer+this.radius),this.maxWidth=Math.round(.75*this.lineHeight),this.texture=Object(s.c)(350*this.lineHeight*this.maxWidth,1,Uint8Array),this.scratchCanvas=document.createElement(\"canvas\"),this.scratchCanvas.width=this.maxWidth,this.scratchCanvas.height=this.lineHeight,this.scratchContext=this.scratchCanvas.getContext(\"2d\"),this.scratchContext.font=t.fontStyle+\" \"+t.fontVariant+\" \"+t.fontWeight+\" \"+r+\"px \"+t.fontFamily,this.scratchContext.fillStyle=\"black\",this.scratchContext.textBaseline=\"middle\",this.scratchData=new Uint8Array(this.lineHeight*this.maxWidth),this.gridOuter=new Float64Array(this.lineHeight*this.maxWidth),this.gridInner=new Float64Array(this.lineHeight*this.maxWidth),this.f=new Float64Array(Math.max(this.lineHeight,this.maxWidth)),this.d=new Float64Array(Math.max(this.lineHeight,this.maxWidth)),this.z=new Float64Array(Math.max(this.lineHeight,this.maxWidth)+1),this.v=new Int16Array(Math.max(this.lineHeight,this.maxWidth)),this.middle=Math.ceil(this.lineHeight/2),this.placeholder=this.get(String.fromCharCode(65533));}return e.prototype.get=function(e){if(void 0===this.mapped[e]){this.draw(e);var t=this.texture,r=t.array,n=t.width,i=t.height,a=this.scratchData;if(this.currentX+this.scratchW>n&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>i)return console.warn(\"canvas to small\"),this.placeholder;this.mapped[e]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH,nw:this.scratchW/this.lineHeight,nh:this.scratchH/this.lineHeight};for(var o=0;o<this.scratchH;++o)for(var s=0;s<this.scratchW;++s)r[n*(this.currentY+o)+this.currentX+s]=a[o*this.scratchW+s];this.currentX+=this.scratchW;}return this.mapped[e];},e.prototype.draw=function(e){var t=this.lineHeight,r=this.scratchContext,n=this.scratchData,i=r.measureText(e),o=Math.min(this.maxWidth,Math.ceil(i.width+2*this.buffer)),s=o*t;r.clearRect(0,0,o,t),r.fillText(e,this.buffer,this.middle);for(var u=r.getImageData(0,0,o,t),c=0;c<s;c++){var l=u.data[4*c+3]/255;this.gridOuter[c]=1===l?0:0===l?Number.MAX_SAFE_INTEGER:Math.pow(Math.max(0,.5-l),2),this.gridInner[c]=1===l?Number.MAX_SAFE_INTEGER:0===l?0:Math.pow(Math.max(0,l-.5),2);}a(this.gridOuter,o,t,this.f,this.d,this.v,this.z),a(this.gridInner,o,t,this.f,this.d,this.v,this.z);for(c=0;c<s;c++){var d=this.gridOuter[c]-this.gridInner[c];n[c]=Math.max(0,Math.min(255,Math.round(255-255*(d/this.radius+this.cutoff))));}this.scratchW=o,this.scratchH=t;},e;}();},function(e,t){var r;r=function(){return this;}();try{r=r||new Function(\"return this\")();}catch(e){\"object\"==(typeof window===\"undefined\"?\"undefined\":typeof_default()(window))&&(r=window);}e.exports=r;},function(e,t){var r,n,i=e.exports={};function a(){throw new Error(\"setTimeout has not been defined\");}function o(){throw new Error(\"clearTimeout has not been defined\");}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0);}catch(t){try{return r.call(null,e,0);}catch(t){return r.call(this,e,0);}}}!function(){try{r=\"function\"==typeof setTimeout?setTimeout:a;}catch(e){r=a;}try{n=\"function\"==typeof clearTimeout?clearTimeout:o;}catch(e){n=o;}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&p());}function p(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length;}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e);}catch(t){try{return n.call(null,e);}catch(t){return n.call(this,e);}}}(e);}}function m(e,t){this.fun=e,this.array=t;}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||l||s(p);},m.prototype.run=function(){this.fun.apply(null,this.array);},i.title=\"browser\",i.browser=!0,i.env={},i.argv=[],i.version=\"\",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[];},i.binding=function(e){throw new Error(\"process.binding is not supported\");},i.cwd=function(){return\"/\";},i.chdir=function(e){throw new Error(\"process.chdir is not supported\");},i.umask=function(){return 0;};},function(e,t,r){(function(e){var n=void 0!==e&&e||\"undefined\"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t;}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout);},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval);},t.clearTimeout=t.clearInterval=function(e){e&&e.close();},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id);},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t;},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1;},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout();},t));},r(427),t.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate;}).call(this,r(382));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PDBeStructureQualityReport\",function(){return l;});var n=r(0),i=r(6),a=r(212),o=r(377),s=r(4),u=r(2),c=r(71),l=c.a.create({name:\"pdbe-structure-quality-report-prop\",category:\"custom-props\",display:{name:\"Structure Quality Report\",description:\"Data from wwPDB Validation Report, obtained via PDBe.\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=a.b,t.labelPDBeValidation={label:function label(e){if(t.params.showTooltip)switch(e.kind){case\"element-loci\":if(0===e.elements.length)return;var r=e.elements[0],n=r.unit;if(!n.model.customProperties.hasReference(a.b.descriptor))return;var o=s.StructureElement.Location.create(e.structure,n,n.elements[i.OrderedSet.getAt(r.indices,0)]),u=a.a.getIssues(o);return 0===u.length?\"Validation: No Issues\":\"Validation: \"+u.join(\", \");default:return;}}},t;}return Object(n.__extends)(t,e),t.prototype.register=function(){this.ctx.customModelProperties.register(this.provider,this.params.autoAttach),this.ctx.managers.lociLabels.addProvider(this.labelPDBeValidation),this.ctx.representation.structure.themes.colorThemeRegistry.add(o.StructureQualityReportColorThemeProvider);},t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach;return this.params.autoAttach=e.autoAttach,this.params.showTooltip=e.showTooltip,this.ctx.customModelProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.unregister=function(){this.ctx.customModelProperties.unregister(a.b.descriptor.name),this.ctx.managers.lociLabels.removeProvider(this.labelPDBeValidation),this.ctx.representation.structure.themes.colorThemeRegistry.remove(o.StructureQualityReportColorThemeProvider);},t;}(c.a.Handler),params:function params(){return{autoAttach:u.ParamDefinition.Boolean(!1),showTooltip:u.ParamDefinition.Boolean(!0)};}});},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureMeasurementsControls\",function(){return g;}),r.d(t,\"MeasurementList\",function(){return v;}),r.d(t,\"MeasurementControls\",function(){return b;});var n=r(0),i=r(3),a=r(23),o=r(369),s=r(26),u=r(70),c=r(32),l=r(56),d=r(19),f=r(14),p=r(67),m=r(183),h=r(206),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{isCollapsed:!1,header:\"Measurements\",brand:{accent:\"gray\",svg:f.PencilRulerSvg}};},t.prototype.renderControls=function(){return i.createElement(i.Fragment,null,i.createElement(b,null),i.createElement(v,null));},t;}(c.CollapsableControls),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.measurement.behaviors.state,function(){e.forceUpdate();});},t.prototype.renderGroup=function(e,t){for(var r=[],n=0,a=e;n<a.length;n++){var o=a[n];o.obj&&r.push(i.createElement(_,{key:o.obj.id,cell:o}));}return r.length?i.createElement(d.ExpandGroup,{header:t,initiallyExpanded:!0},r):null;},t.prototype.render=function(){var e=this.plugin.managers.structure.measurement.state;return i.createElement(\"div\",{style:{marginTop:\"6px\"}},this.renderGroup(e.labels,\"Labels\"),this.renderGroup(e.distances,\"Distances\"),this.renderGroup(e.angles,\"Angles\"),this.renderGroup(e.dihedrals,\"Dihedrals\"));},t;}(c.PurePluginUIComponent),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,action:void 0},t.measureDistance=function(){var e=t.plugin.managers.structure.selection.additionsHistory;t.plugin.managers.structure.measurement.addDistance(e[0].loci,e[1].loci);},t.measureAngle=function(){var e=t.plugin.managers.structure.selection.additionsHistory;t.plugin.managers.structure.measurement.addAngle(e[0].loci,e[1].loci,e[2].loci);},t.measureDihedral=function(){var e=t.plugin.managers.structure.selection.additionsHistory;t.plugin.managers.structure.measurement.addDihedral(e[0].loci,e[1].loci,e[2].loci,e[3].loci);},t.addLabel=function(){var e=t.plugin.managers.structure.selection.additionsHistory;t.plugin.managers.structure.measurement.addLabel(e[0].loci);},t.selectAction=function(e){t.toggleAdd(),e&&(null==e?void 0:e.value)();},t.toggleAdd=function(){return t.setState({action:\"add\"===t.state.action?void 0:\"add\"});},t.toggleOptions=function(){return t.setState({action:\"options\"===t.state.action?void 0:\"options\"});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.selection.events.additionsHistoryUpdated,function(){e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"selection\",{get:function get(){return this.plugin.managers.structure.selection;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"actions\",{get:function get(){var e=this.selection.additionsHistory;return[{kind:\"item\",label:\"Label \"+(0===e.length?\" (1 selection required)\":\" (1st selection)\"),value:this.addLabel,disabled:0===e.length},{kind:\"item\",label:\"Distance \"+(e.length<2?\" (2 selections required)\":\" (top 2 selections)\"),value:this.measureDistance,disabled:e.length<2},{kind:\"item\",label:\"Angle \"+(e.length<3?\" (3 selections required)\":\" (top 3 selections)\"),value:this.measureAngle,disabled:e.length<3},{kind:\"item\",label:\"Dihedral \"+(e.length<4?\" (4 selections required)\":\" (top 4 selections)\"),value:this.measureDihedral,disabled:e.length<4}];},enumerable:!1,configurable:!0}),t.prototype.highlight=function(e){this.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:e},!1);},t.prototype.moveHistory=function(e,t){this.plugin.managers.structure.selection.modifyHistory(e,t,4);},t.prototype.focusLoci=function(e){this.plugin.managers.camera.focusLoci(e);},t.prototype.historyEntry=function(e,t){var r=this,n=this.plugin.managers.structure.selection.additionsHistory;return i.createElement(\"div\",{className:\"msp-flex-row\",key:e.id},i.createElement(d.Button,{noOverflow:!0,title:\"Click to focus. Hover to highlight.\",onClick:function onClick(){return r.focusLoci(e.loci);},style:{width:\"auto\",textAlign:\"left\"},onMouseEnter:function onMouseEnter(){return r.highlight(e.loci);},onMouseLeave:this.plugin.managers.interactivity.lociHighlights.clearHighlights},t,\". \",i.createElement(\"span\",{dangerouslySetInnerHTML:{__html:e.label}})),n.length>1&&i.createElement(d.IconButton,{svg:f.ArrowUpwardSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.moveHistory(e,\"up\");},flex:\"20px\",title:\"Move up\"}),n.length>1&&i.createElement(d.IconButton,{svg:f.ArrowDownwardSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.moveHistory(e,\"down\");},flex:\"20px\",title:\"Move down\"}),i.createElement(d.IconButton,{svg:f.DeleteOutlinedSvg,small:!0,className:\"msp-form-control\",onClick:function onClick(){return r.plugin.managers.structure.selection.modifyHistory(e,\"remove\");},flex:!0,title:\"Remove\"}));},t.prototype.add=function(){for(var e=this.plugin.managers.structure.selection.additionsHistory,t=[],r=0,n=Math.min(e.length,4);r<n;r++)t.push(this.historyEntry(e[r],r+1));return i.createElement(i.Fragment,null,i.createElement(l.a,{items:this.actions,onSelect:this.selectAction}),t.length>0&&i.createElement(\"div\",{className:\"msp-control-offset\"},t),0===t.length&&i.createElement(\"div\",{className:\"msp-control-offset msp-help-text\"},i.createElement(\"div\",{className:\"msp-help-description\"},i.createElement(f.Icon,{svg:f.HelpOutlineSvg,inline:!0}),\"Add one or more selections (toggle \",i.createElement(h.ToggleSelectionModeButton,{inline:!0}),\" mode)\")));},t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(d.ToggleButton,{icon:f.AddSvg,label:\"Add\",toggle:this.toggleAdd,isSelected:\"add\"===this.state.action,disabled:this.state.isBusy,className:\"msp-btn-apply-simple\"}),i.createElement(d.ToggleButton,{icon:f.TuneSvg,label:\"\",title:\"Options\",toggle:this.toggleOptions,isSelected:\"options\"===this.state.action,disabled:this.state.isBusy,style:{flex:\"0 0 40px\",padding:0}})),\"add\"===this.state.action&&this.add(),\"options\"===this.state.action&&i.createElement(y,null));},t;}(c.PurePluginUIComponent),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isDisabled:!1},t.changed=function(e){t.plugin.managers.structure.measurement.setOptions(e);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.measurement.behaviors.state,function(){e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isDisabled:t});});},t.prototype.render=function(){var e=this.plugin.managers.structure.measurement.state;return i.createElement(\"div\",{className:\"msp-control-offset\"},i.createElement(p.ParameterControls,{params:o.b,values:e.options,onChangeValues:this.changed,isDisabled:this.state.isDisabled}));},t;}(c.PurePluginUIComponent),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showUpdate:!1},t.delete=function(){s.PluginCommands.State.RemoveObject(t.plugin,{state:t.props.cell.parent,ref:t.props.cell.transform.parent,removeParentGhosts:!0});},t.toggleVisibility=function(e){e.preventDefault(),s.PluginCommands.State.ToggleVisibility(t.plugin,{state:t.props.cell.parent,ref:t.props.cell.transform.parent}),e.currentTarget.blur();},t.highlight=function(){var e,r=t.selections;if(r){t.plugin.managers.interactivity.lociHighlights.clearHighlights();for(var n=0,i=r.data;n<i.length;n++){var a=i[n];t.plugin.managers.interactivity.lociHighlights.highlight({loci:a.loci},!1);}t.plugin.managers.interactivity.lociHighlights.highlight({loci:null===(e=t.props.cell.obj)||void 0===e?void 0:e.data.repr.getLoci()},!1);}},t.clearHighlight=function(){t.plugin.managers.interactivity.lociHighlights.clearHighlights();},t.toggleUpdate=function(){return t.setState({showUpdate:!t.state.showUpdate});},t.focus=function(){var e=t.selections;if(e){var r=a.Loci.getBundleBoundingSphere(S(e.data));r&&t.plugin.managers.camera.focusSphere(r);}},t.selectAction=function(e){e&&(t.setState({showUpdate:!1}),(null==e?void 0:e.value)());},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){e.forceUpdate();});},Object.defineProperty(t.prototype,\"selections\",{get:function get(){var e;return null===(e=this.props.cell.obj)||void 0===e?void 0:e.data.source;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"label\",{get:function get(){var e=this.selections;switch(null==e?void 0:e.data.length){case 1:return Object(u.lociLabel)(e.data[0].loci,{condensed:!0});case 2:return Object(u.distanceLabel)(S(e.data),{condensed:!0,unitLabel:this.plugin.managers.structure.measurement.state.options.distanceUnitLabel});case 3:return Object(u.angleLabel)(S(e.data),{condensed:!0});case 4:return Object(u.dihedralLabel)(S(e.data),{condensed:!0});default:return\"\";}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"actions\",{get:function get(){var e=this;return this.props.cell.sourceRef,[l.a.Item(\"Select This\",function(){return e.plugin.managers.structure.selection.fromSelections(e.props.cell.sourceRef);},{icon:f.SetSvg})];},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.props.cell,t=e.obj;return t?i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\",key:t.id,onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight},i.createElement(\"button\",{className:\"msp-form-control msp-control-button-label msp-no-overflow\",title:\"Click to focus. Hover to highlight.\",onClick:this.focus,style:{width:\"auto\",textAlign:\"left\"}},i.createElement(\"span\",{dangerouslySetInnerHTML:{__html:this.label}})),i.createElement(d.IconButton,{svg:e.state.isHidden?f.VisibilityOffOutlinedSvg:f.VisibilityOutlinedSvg,toggleState:!1,small:!0,className:\"msp-form-control\",onClick:this.toggleVisibility,flex:!0,title:e.state.isHidden?\"Show\":\"Hide\"}),i.createElement(d.IconButton,{svg:f.DeleteOutlinedSvg,small:!0,className:\"msp-form-control\",onClick:this.delete,flex:!0,title:\"Delete\",toggleState:!1}),i.createElement(d.IconButton,{svg:f.MoreHorizSvg,className:\"msp-form-control\",onClick:this.toggleUpdate,flex:!0,title:\"Actions\",toggleState:this.state.showUpdate})),this.state.showUpdate&&e.parent&&i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-accent-offset\"},i.createElement(l.a,{items:this.actions,onSelect:this.selectAction,noOffset:!0}),i.createElement(d.ExpandGroup,{header:\"Options\",noOffset:!0},i.createElement(m.UpdateTransformControl,{state:e.parent,transform:e.transform,customHeader:\"none\",autoHideApply:!0}))))):null;},t;}(c.PurePluginUIComponent);function S(e){return{loci:e.map(function(e){return e.loci;})};}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StateObjectActions\",function(){return u;});var n=r(0),i=r(3),a=r(32),o=r(14),s=r(309),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this.props.state.behaviors.currentObject.value;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.object.updated,function(t){var r=t.ref,n=t.state,i=e.current;i.ref===r&&i.state===n&&e.forceUpdate();}),this.subscribe(this.plugin.state.data.actions.events.added,function(){return e.forceUpdate();}),this.subscribe(this.plugin.state.data.actions.events.removed,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this,t=this.props,r=t.state,n=t.nodeRef,a=r.cells.get(n),u=r.actions.fromCell(a,this.plugin);if(0===u.length)return null;var c=a.transform.transformer.definition,l=a.obj?a.obj.label:c.display&&c.display.name||c.name;return i.createElement(\"div\",{className:\"msp-state-actions\"},!this.props.hideHeader&&i.createElement(\"div\",{className:\"msp-section-header\"},i.createElement(o.Icon,{svg:o.CodeSvg}),\" \",\"Actions (\"+l+\")\"),u.map(function(t,a){return i.createElement(s.a,{key:\"\"+t.id,state:r,action:t,nodeRef:n,initiallyCollapsed:0===a?!e.props.alwaysExpandFirst&&e.props.initiallyCollapsed:e.props.initiallyCollapsed});}));},t;}(a.PluginUIComponent);},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return o;});var n=r(21),i=r(35),a=r(103);function o(e,t){return void 0===t&&(t=a.a),function(r){return r.lift(new s(e,t));};}var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t;}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.dueTime,this.scheduler));},e;}(),u=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.dueTime=r,i.scheduler=n,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i;}return n.a(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this));},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete();},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e);}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null);},t;}(i.a);function c(e){e.debouncedNext();}},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"BackgroundTaskProgress\",function(){return l;});var n=r(0),i=r(3),a=r(32),o=r(102),s=r(169),u=r(19),c=r(14),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={tracked:Object(o.OrderedMap)()},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.task.progress.pipe(Object(s.a)(function(e){return\"none\"!==e.level;})),function(t){e.setState({tracked:e.state.tracked.set(t.id,t)});}),this.subscribe(this.plugin.events.task.finished,function(t){var r=t.id;e.setState({tracked:e.state.tracked.delete(r)});});},t.prototype.render=function(){return i.createElement(\"div\",{className:\"msp-background-tasks\"},this.state.tracked.valueSeq().map(function(e){return i.createElement(d,{key:e.id,event:e});}));},t;}(a.PluginUIComponent),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.abort=function(){t.plugin.requestTaskAbort(t.props.event.progress,\"User Request\");},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.event.progress.root,t=function e(t){if(0===t.children.length)return 1;for(var r=0,n=0,i=t.children;n<i.length;n++){var a=i[n];r+=e(a);}return r;}(this.props.event.progress.root)-1,r=e.progress.isIndeterminate?void 0:i.createElement(i.Fragment,null,\"[\",e.progress.current,\"/\",e.progress.max,\"]\"),n=t>0?i.createElement(i.Fragment,null,\"[\",t,\" subtask(s)]\"):void 0;return i.createElement(\"div\",{className:\"msp-task-state\"},i.createElement(\"div\",null,e.progress.canAbort&&i.createElement(u.IconButton,{svg:c.CancelSvg,onClick:this.abort,title:\"Abort\"}),i.createElement(\"div\",null,e.progress.message,\" \",r,\" \",n)));},t;}(a.PluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Toasts\",function(){return c;});var n=r(0),i=r(3),a=r(32),o=r(19),s=r(14),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hide=function(){(t.props.entry.hide||function(){}).call(null);},t;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.entry,r=\"string\"==typeof t.message?i.createElement(\"div\",{dangerouslySetInnerHTML:{__html:t.message}}):i.createElement(\"div\",null,i.createElement(t.message,null));return i.createElement(\"div\",{className:\"msp-toast-entry\"},i.createElement(\"div\",{className:\"msp-toast-title\",onClick:function onClick(){return e.hide();}},t.title),i.createElement(\"div\",{className:\"msp-toast-message\"},r),i.createElement(\"div\",{className:\"msp-toast-clear\"}),i.createElement(\"div\",{className:\"msp-toast-hide\"},i.createElement(o.IconButton,{svg:s.CancelSvg,onClick:this.hide,title:\"Hide\",className:\"msp-no-hover-outline\"})));},t;}(a.PluginUIComponent),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.toast.events.changed,function(){return e.forceUpdate();});},t.prototype.render=function(){var e=this.plugin.managers.toast.state;if(!e.entries.count())return null;var t=[];return e.entries.forEach(function(e,r){return t.push(e);}),t.sort(function(e,t){return e.serialNumber-t.serialNumber;}),i.createElement(\"div\",{className:\"msp-toast-container\"},t.map(function(e){return i.createElement(u,{key:e.serialNumber,entry:e});}));},t;}(a.PluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"StructureSourceControls\",function(){return x;});var n=r(0),i=r(3),a=r(28),o=r(32),s=r(56),u=r(19),c=r(67),l=r(6),d=r(4),f=r(223),p=r(70),m=r(59),h=r(155),g=r(14);function v(e,t,r,n){for(var i=l.SortedArray.indexOf(t.unit.elements,t.element),a=d.StructureElement.Loci(t.structure,[{unit:t.unit,indices:l.OrderedSet.ofSingleton(i)}]),o=\"residue\"===n?d.StructureElement.Loci.extendToWholeResidues(a):d.StructureElement.Loci.extendToWholeChains(a),s=d.StructureProperties.entity.pdbx_description(t).join(\", \"),u=0,c=r.units;u<c.length;u++){var f=c[u],m=d.StructureElement.Loci(o.structure,[{unit:f,indices:o.elements[0].indices}]),h=Object(p.lociLabel)(m,{reverse:!0,hidePrefix:!0,htmlStyling:!1,granularity:n});h||(h=Object(p.lociLabel)(m,{hidePrefix:!1,htmlStyling:!1})),r.units.length>1&&(h+=\" | \"+m.elements[0].unit.conformation.operator.name);var g={label:h,category:s,loci:m};e.has(s)?e.get(s).push(g):e.set(s,[g]);}}function b(e){for(var t=new Map(),r=d.StructureElement.Location.create(e),n=0,i=e.unitSymmetryGroups;n<i.length;n++){var a=i[n];if(d.Unit.isAtomic(a.units[0])){r.unit=a.units[0],r.element=a.elements[0];var o=d.Unit.Traits.is(r.unit.traits,1),s=d.StructureProperties.entity.type(r),u=\"non-polymer\"===s,c=\"branched\"===s;if(!!d.StructureProperties.entity.prd_id(r))v(t,r,a,\"chain\");else if(u&&!o)v(t,r,a,\"residue\");else if(c||u&&o)for(var l=r.unit,f=l.model.atomicHierarchy.residueAtomSegments.index,p=-1,m=0,h=l.elements.length;m<h;++m){var g=l.elements[m],b=f[g];b!==p&&(r.element=g,v(t,r,a,\"residue\"),p=b);}}}var y=[];return t.forEach(function(e,t){1===e.length?y.push({label:t+\": \"+e[0].label,loci:e[0].loci}):y.push.apply(y,e);}),y;}var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,showAction:!1},t.getSelectionItems=Object(h.b)(function(e){for(var t,r=[],i=0,a=e;i<a.length;i++){var o=null===(t=a[i].cell.obj)||void 0===t?void 0:t.data;if(o){var u=b(o);u.length>0&&r.push(Object(n.__spreadArrays)([s.a.Header(o.label,{description:o.label})],s.a.createItems(u,{label:function label(e){return e.label;},category:function category(e){return e.category;},description:function description(e){return e.label;}})));}}return r;}),t.selectAction=function(e,r){if(e&&t.state.showAction){var n=e.value;(null==r?void 0:r.shiftKey)?t.plugin.managers.structure.focus.addFromLoci(n.loci):t.plugin.managers.structure.focus.set(n),t.focusCamera();}else t.setState({showAction:!1});},t.toggleAction=function(){return t.setState({showAction:!t.state.showAction});},t.focusCamera=function(){var e=t.plugin.managers.structure.focus.current;e&&t.plugin.managers.camera.focusLoci(e.loci);},t.clear=function(){t.plugin.managers.structure.focus.clear(),t.plugin.managers.camera.reset();},t.highlightCurrent=function(){var e=t.plugin.managers.structure.focus.current;e&&t.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:e.loci},!1);},t.clearHighlights=function(){t.plugin.managers.interactivity.lociHighlights.clearHighlights();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.focus.behaviors.current,function(t){e.getSelectionItems([]),e.forceUpdate();}),this.subscribe(this.plugin.managers.structure.focus.events.historyUpdated,function(t){e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t,showAction:!1});});},Object.defineProperty(t.prototype,\"isDisabled\",{get:function get(){return this.state.isBusy||0===this.actionItems.length;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"actionItems\",{get:function get(){var e=[],t=this.plugin.managers.structure.focus.history;t.length>0&&e.push(Object(n.__spreadArrays)([s.a.Header(\"History\",{description:\"Previously focused on items.\"})],s.a.createItems(t,{label:function label(e){return e.label;},description:function description(e){return e.category&&e.label!==e.category?e.category+\" | \"+e.label:e.label;}})));var r=this.getSelectionItems(this.plugin.managers.structure.hierarchy.selection.structures);1===r.length&&(r[0][0].initiallyExpanded=!0);var i=[];return r.length>0&&i.push.apply(i,r),e.length>0&&i.push.apply(i,e),i;},enumerable:!1,configurable:!0}),t.prototype.getToggleBindingLabel=function(){var e,t=this.plugin.state.behaviors.transforms.get(f.FocusLoci.id);if(!t)return\"\";var r=null===(e=t.params)||void 0===e?void 0:e.bindings.clickFocus;return!r||m.a.isEmpty(r)?\"\":m.a.formatTriggers(r);},t.prototype.render=function(){var e=this.plugin.managers.structure.focus.current,t=(null==e?void 0:e.label)||\"Nothing Focused\",r=\"Click to Center Camera\";if(!e){r=\"Select focus using the menu\";var n=this.getToggleBindingLabel();n&&(r+=\"\\nor use '\"+n+\"' on element\");}return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(u.Button,{noOverflow:!0,onClick:this.focusCamera,title:r,onMouseEnter:this.highlightCurrent,onMouseLeave:this.clearHighlights,disabled:this.isDisabled||!e,style:{textAlignLast:e?\"left\":void 0}},t),e&&i.createElement(u.IconButton,{svg:g.CancelOutlinedSvg,onClick:this.clear,title:\"Clear\",className:\"msp-form-control\",flex:!0,disabled:this.isDisabled}),i.createElement(u.ToggleButton,{icon:g.CenterFocusStrongSvg,title:\"Select a focus target to center on an show its surroundings. Hold shift to focus on multiple targets.\",toggle:this.toggleAction,isSelected:this.state.showAction,disabled:this.isDisabled,style:{flex:\"0 0 40px\",padding:0}})),this.state.showAction&&i.createElement(s.a,{items:this.actionItems,onSelect:this.selectAction}));},t;}(o.PluginUIComponent),_=r(183),S=r(206),O=r(13),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.item=function(e){var r,n,i,a,o,s,u,c,l,f,p=t.plugin.managers.structure.hierarchy.seletionSet;switch(e.kind){case\"model\":(m=null===(r=e.cell.obj)||void 0===r?void 0:r.data)&&d.Model.TrajectoryInfo.get(m).size>1&&(f=(null===(n=e.cell.obj)||void 0===n?void 0:n.data.entryId)+\" | Model \"+(d.Model.TrajectoryInfo.get(m).index+1)+\" of \"+d.Model.TrajectoryInfo.get(m).size),f=(null===(i=e.cell.obj)||void 0===i?void 0:i.data.entryId)+\" | \"+(null===(a=e.cell.obj)||void 0===a?void 0:a.label);break;case\"structure\":var m;if((m=null===(o=e.cell.obj)||void 0===o?void 0:o.data.models[0])&&d.Model.TrajectoryInfo.get(m).size>1){f=m.entryId+\" | \"+(null===(s=e.cell.obj)||void 0===s?void 0:s.label)+\" (Model \"+(d.Model.TrajectoryInfo.get(m).index+1)+\" of \"+d.Model.TrajectoryInfo.get(m).size+\")\";break;}if(m){f=m.entryId+\" | \"+(null===(u=e.cell.obj)||void 0===u?void 0:u.label);break;}f=\"\"+(null===(c=e.cell.obj)||void 0===c?void 0:c.label);break;default:f=null===(l=e.cell.obj)||void 0===l?void 0:l.label;}return{kind:\"item\",label:f||e.kind,selected:p.has(e.cell.transform.ref),value:[e]};},t.getTrajectoryItems=function(e){var r;return 0===e.models.length?t.item(e):Object(n.__spreadArrays)([s.a.Header(null===(r=e.cell.obj)||void 0===r?void 0:r.label)],e.models.map(t.getModelItems));},t.getModelItems=function(e){var r,i,a;if(0===e.structures.length)return t.item(e);if(1===e.structures.length){var o=t.plugin.managers.structure.hierarchy.seletionSet,u=e.structures[0];return{label:(null===(r=e.cell.obj)||void 0===r?void 0:r.label)+\" | \"+(null===(i=u.cell.obj)||void 0===i?void 0:i.label),selected:o.has(u.cell.transform.ref),value:[e,u]};}return Object(n.__spreadArrays)([s.a.Header(null===(a=e.cell.obj)||void 0===a?void 0:a.label)],e.structures.map(t.item));},t.selectHierarchy=function(e){if(e&&0!==e.length){for(var r=[],n=0,i=e;n<i.length;n++)for(var a=0,o=i[n].value;a<o.length;a++){var s=o[a];r.push(s);}t.plugin.managers.structure.hierarchy.updateCurrent(r,e[0].selected?\"remove\":\"add\");}},t.toggleHierarchy=function(){return t.setState({show:\"hierarchy\"!==t.state.show?\"hierarchy\":void 0});},t.togglePreset=function(){return t.setState({show:\"presets\"!==t.state.show?\"presets\":void 0});},t.applyPreset=function(e){if(t.setState({show:void 0}),e){var r=t.plugin.managers.structure,n=r.hierarchy.selection.trajectories;r.hierarchy.applyPreset(n,e.value);}},t.updateStructureModel=function(e){return Object(n.__awaiter)(t,void 0,void 0,function(){var t,r;return Object(n.__generator)(this,function(n){return t=this.plugin.managers.structure.hierarchy.selection,r=t.structures[0].model,this.plugin.state.updateTransform(this.plugin.state.data,r.cell.transform.ref,e,\"Model Index\"),[2];});});},t.updateStructure=function(e){var r=t.plugin.managers.structure.hierarchy.selection.structures[0];return t.plugin.managers.structure.hierarchy.updateStructure(r,e);},t;}return Object(n.__extends)(t,e),t.prototype.defaultState=function(){return{header:\"Structure\",isCollapsed:!1,isBusy:!1,brand:{accent:\"purple\",svg:g.MoleculeSvg}};},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(){return e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},Object.defineProperty(t.prototype,\"hierarchyItems\",{get:function get(){var e=this.plugin.managers.structure.hierarchy.current,t=[];return e.trajectories.length>1&&t.push(Object(n.__spreadArrays)([s.a.Header(\"Trajectories\")],e.trajectories.map(this.item))),(e.models.length>1||e.trajectories.length>1)&&t.push(Object(n.__spreadArrays)([s.a.Header(\"Models\")],e.models.map(this.item))),1===e.trajectories.length&&1===e.models.length?t.push.apply(t,e.structures.map(this.item)):e.structures.length>0&&t.push(Object(n.__spreadArrays)([s.a.Header(\"Structures\")],e.structures.map(this.item))),t;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"isEmpty\",{get:function get(){var e=this.plugin.managers.structure.hierarchy.current,t=e.structures,r=e.models;return 0===e.trajectories.length&&0===r.length&&0===t.length;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"label\",{get:function get(){var e,t,r,n,i,a,o,s,u,c,l,f,p,m,h=this.plugin.managers.structure.hierarchy.selection,g=h.structures,v=h.models,b=h.trajectories;if(1===g.length)return(null===(t=null===(e=(C=g[0]).model)||void 0===e?void 0:e.trajectory)||void 0===t?void 0:t.models)&&1===C.model.trajectory.models.length?null===(r=C.cell.obj)||void 0===r?void 0:r.data.label:C.model?(null===(n=C.model.cell.obj)||void 0===n?void 0:n.label)+\" | \"+(null===(i=C.cell.obj)||void 0===i?void 0:i.data.label):null===(a=C.cell.obj)||void 0===a?void 0:a.data.label;if(g.length>1){for(var y=g[0],_=null===(o=null==y?void 0:y.model)||void 0===o?void 0:o.trajectory,S=!0,O=0,x=g;O<x.length;O++){var C;if((null===(s=null==(C=x[O])?void 0:C.model)||void 0===s?void 0:s.trajectory)!==_){S=!1;break;}}return S&&_?(null===(u=_.cell.obj)||void 0===u?void 0:u.label)+\" | \"+g.length+\" structures\":g.length+\" structures\";}if(v.length>0){_=v[0].trajectory;if(1===v.length){var w=null===(c=v[0].cell.obj)||void 0===c?void 0:c.data;return w&&d.Model.TrajectoryInfo.get(w).size>1?(null===(l=null==_?void 0:_.cell.obj)||void 0===l?void 0:l.label)+\" | Model \"+(d.Model.TrajectoryInfo.get(w).index+1)+\" of \"+d.Model.TrajectoryInfo.get(w).size:(null===(f=null==_?void 0:_.cell.obj)||void 0===f?void 0:f.label)+\" | Model\";}S=!0;for(var P=0,j=v;P<j.length;P++){if(j[P].trajectory!==_){S=!1;break;}}return S?(null===(p=null==_?void 0:_.cell.obj)||void 0===p?void 0:p.label)+\" | \"+v.length+\" models\":v.length+\" models\";}return b.length>0?1===b.length?(null===(m=b[0].cell.obj)||void 0===m?void 0:m.label)+\" trajectory\":b.length+\" trajectories\":0===b.length&&0===v.length&&0===g.length?\"Nothing Loaded\":\"Nothing Selected\";},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"presetActions\",{get:function get(){var e=[],t=this.plugin.managers.structure.hierarchy.selection.trajectories;if(1!==t.length)return e;for(var r=0,n=this.plugin.builders.structure.hierarchy.getPresets(t[0].cell.obj);r<n.length;r++){var i=n[r];e.push(s.a.Item(i.display.name,i,{description:i.display.description}));}return e;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"modelIndex\",{get:function get(){var e,t,r=this.plugin.managers.structure.hierarchy.selection;if(1!==r.structures.length)return null;var n=r.structures[0].model;if(!n||n.cell.transform.transformer!==a.StateTransforms.Model.ModelFromTrajectory)return null;if(!n.cell.obj||d.Model.TrajectoryInfo.get(n.cell.obj.data).size<=1)return null;var o=null===(e=n.cell.params)||void 0===e?void 0:e.definition;return o?i.createElement(c.ParameterControls,{params:o,values:null===(t=n.cell.params)||void 0===t?void 0:t.values,onChangeValues:this.updateStructureModel,isDisabled:this.state.isBusy}):null;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"structureType\",{get:function get(){var e,t=this.plugin.managers.structure.hierarchy.selection;if(1!==t.structures.length)return null;var r=t.structures[0];return(null===(e=r.cell.params)||void 0===e?void 0:e.definition)&&r.cell.parent?i.createElement(_.UpdateTransformControl,{state:r.cell.parent,transform:r.cell.transform,customHeader:\"none\",customUpdate:this.updateStructure,noMargin:!0,autoHideApply:!0}):null;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"transform\",{get:function get(){var e=this.plugin.managers.structure.hierarchy.selection;if(1!==e.structures.length)return null;var t=e.structures[0];if(!t.cell.parent)return null;var r=O.StateSelection.tryFindDecorator(this.plugin.state.data,t.cell.transform.ref,a.StateTransforms.Model.TransformStructureConformation);return r?i.createElement(u.ExpandGroup,{header:\"Conformation Transform\"},i.createElement(_.UpdateTransformControl,{state:r.parent,transform:r.transform,customHeader:\"none\",noMargin:!0,autoHideApply:!0})):void 0;},enumerable:!1,configurable:!0}),t.prototype.renderControls=function(){var e=this.state.isBusy||this.isEmpty,t=this.presetActions,r=this.label;return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\",style:{marginTop:\"1px\"}},i.createElement(u.Button,{noOverflow:!0,flex:!0,onClick:this.toggleHierarchy,disabled:e,title:r},r),t.length>0&&i.createElement(u.IconButton,{svg:g.BookmarksOutlinedSvg,className:\"msp-form-control\",flex:\"40px\",onClick:this.togglePreset,title:\"Apply a structure presets to the current hierarchy.\",toggleState:\"presets\"===this.state.show,disabled:e})),\"hierarchy\"===this.state.show&&i.createElement(s.a,{items:this.hierarchyItems,onSelect:this.selectHierarchy,multiselect:!0}),\"presets\"===this.state.show&&i.createElement(s.a,{items:t,onSelect:this.applyPreset}),this.modelIndex,this.structureType,this.transform,i.createElement(\"div\",{style:{marginTop:\"6px\"}},i.createElement(y,null),i.createElement(S.StructureSelectionStatsControls,{hideOnEmpty:!0})));},t;}(o.CollapsableControls);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"SimpleSettingsControl\",function(){return h;});var n=r(0),i=r(151),a=r(3),o=r(158),s=r(26),u=r(13),c=r(24),l=r(2);var d,f=r(32),p=r(67),m=r(189),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.canvas3d.camera.stateChanged,function(t){void 0===t.radiusMax&&void 0===t.radius||e.forceUpdate();});},t.prototype.render=function(){return this.plugin.canvas3d?a.createElement(a.Fragment,null,a.createElement(p.ParameterMappingControl,{mapping:b}),a.createElement(m.ViewportHelpContent,null)):null;},t;}(f.PluginUIComponent),g={sequence:\"Sequence\",log:\"Log\",left:\"Left Panel\"},v={spin:l.ParamDefinition.Group({spin:o.Canvas3DParams.trackball.params.spin,speed:o.Canvas3DParams.trackball.params.spinSpeed},{pivot:\"spin\"}),camera:o.Canvas3DParams.camera,background:l.ParamDefinition.Group({color:l.ParamDefinition.Color(Object(c.Color)(16579577),{label:\"Background\",description:\"Custom background color\"}),transparent:l.ParamDefinition.Boolean(!1)},{pivot:\"color\"}),lighting:l.ParamDefinition.Group({renderStyle:o.Canvas3DParams.renderer.params.style,occlusion:o.Canvas3DParams.postprocessing.params.occlusion,outline:o.Canvas3DParams.postprocessing.params.outline,fog:o.Canvas3DParams.cameraFog},{pivot:\"renderStyle\"}),clipping:l.ParamDefinition.Group(Object(n.__assign)(Object(n.__assign)({},o.Canvas3DParams.cameraClipping.params),o.Canvas3DParams.renderer.params.clip.params),{pivot:\"radius\"}),layout:l.ParamDefinition.MultiSelect([],l.ParamDefinition.objectToOptions(g))},b=(d={params:function params(e){var t,r=l.ParamDefinition.clone(v),n=null===(t=e.spec.layout)||void 0===t?void 0:t.controls;if(n){var i=[];\"none\"!==n.top&&i.push([\"sequence\",g.sequence]),\"none\"!==n.bottom&&i.push([\"log\",g.log]),\"none\"!==n.left&&i.push([\"left\",g.left]),r.layout.options=i;}return r;},target:function target(e){var t,r,n=null===(t=e.spec.layout)||void 0===t?void 0:t.controls,i=e.layout.state.regionState,a=[];return\"hidden\"===i.top||n&&\"none\"===n.top||a.push(\"sequence\"),\"hidden\"===i.bottom||n&&\"none\"===n.bottom||a.push(\"log\"),\"hidden\"===i.left||n&&\"none\"===n.left||a.push(\"left\"),{canvas:null===(r=e.canvas3d)||void 0===r?void 0:r.props,layout:a};}},function(e){var t=e.values,r=e.update,n=e.apply;return{params:\"function\"==typeof d.params?d.params:function(e){return d.params;},getTarget:d.target,getValues:t,update:function update(e,t){var n=d.target(t);return Object(i.b)(n,function(n){return r(e,n,t);});},apply:n||function(){}};})({values:function values(e,t){var r=e.canvas,i=r.renderer;return{layout:e.layout,spin:{spin:!!r.trackball.spin,speed:r.trackball.spinSpeed},camera:r.camera,background:{color:i.backgroundColor,transparent:r.transparentBackground},lighting:{renderStyle:i.style,occlusion:r.postprocessing.occlusion,outline:r.postprocessing.outline,fog:r.cameraFog},clipping:Object(n.__assign)(Object(n.__assign)({},r.cameraClipping),r.renderer.clip)};},update:function update(e,t){var r=t.canvas;r.trackball.spin=e.spin.spin,r.trackball.spinSpeed=e.spin.speed,r.camera=e.camera,r.transparentBackground=e.background.transparent,r.renderer.backgroundColor=e.background.color,r.renderer.style=e.lighting.renderStyle,r.postprocessing.occlusion=e.lighting.occlusion,r.postprocessing.outline=e.lighting.outline,r.cameraFog=e.lighting.fog,r.cameraClipping={radius:e.clipping.radius,far:e.clipping.far},r.renderer.clip={variant:e.clipping.variant,objects:e.clipping.objects},t.layout=e.layout;},apply:function apply(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var r,a;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,s.PluginCommands.Canvas3D.SetSettings(t,{settings:e.canvas})];case 1:return n.sent(),r=e.layout.indexOf(\"left\")<0,a=Object(i.b)(t.layout.state,function(n){n.regionState.top=e.layout.indexOf(\"sequence\")>=0?\"full\":\"hidden\",n.regionState.bottom=e.layout.indexOf(\"log\")>=0?\"full\":\"hidden\",n.regionState.left=r?\"hidden\":\"none\"===t.behaviors.layout.leftPanelTabName.value?\"collapsed\":\"full\";}),[4,s.PluginCommands.Layout.Update(t,{state:a})];case 2:return n.sent(),r&&s.PluginCommands.State.SetCurrentObject(t,{state:t.state.data,ref:u.StateTransform.RootRef}),[2];}});});}});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return l;});var n=r(176),i=r(1),a=r(24),o=r(5),s=r(2),u=r(77),c=r(41),l={backgroundColor:s.ParamDefinition.Color(Object(a.Color)(0),{description:\"Background color of the 3D canvas\"}),pickingAlphaThreshold:s.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01},{description:\"The minimum opacity value needed for an object to be pickable.\"}),transparencyVariant:s.ParamDefinition.Select(\"single\",s.ParamDefinition.arrayToOptions([\"single\",\"multi\"])),interiorDarkening:s.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01}),interiorColorFlag:s.ParamDefinition.Boolean(!0,{label:\"Use Interior Color\"}),interiorColor:s.ParamDefinition.Color(a.Color.fromNormalizedRgb(.3,.3,.3)),highlightColor:s.ParamDefinition.Color(a.Color.fromNormalizedRgb(1,.4,.6)),selectColor:s.ParamDefinition.Color(a.Color.fromNormalizedRgb(.2,1,.1)),style:s.ParamDefinition.MappedStatic(\"matte\",{custom:s.ParamDefinition.Group({lightIntensity:s.ParamDefinition.Numeric(.6,{min:0,max:1,step:.01}),ambientIntensity:s.ParamDefinition.Numeric(.4,{min:0,max:1,step:.01}),metalness:s.ParamDefinition.Numeric(0,{min:0,max:1,step:.01}),roughness:s.ParamDefinition.Numeric(1,{min:0,max:1,step:.01}),reflectivity:s.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01})},{isExpanded:!0}),flat:s.ParamDefinition.Group({}),matte:s.ParamDefinition.Group({}),glossy:s.ParamDefinition.Group({}),metallic:s.ParamDefinition.Group({}),plastic:s.ParamDefinition.Group({})},{label:\"Lighting\",description:\"Style in which the 3D scene is rendered/lighted\"}),clip:s.ParamDefinition.Group({variant:s.ParamDefinition.Select(\"instance\",s.ParamDefinition.arrayToOptions([\"instance\",\"pixel\"])),objects:s.ParamDefinition.ObjectList({type:s.ParamDefinition.Select(\"plane\",s.ParamDefinition.objectToOptions(u.a.Type,function(e){return Object(c.d)(e);})),position:s.ParamDefinition.Vec3(Object(i.Vec3)()),rotation:s.ParamDefinition.Group({axis:s.ParamDefinition.Vec3(i.Vec3.create(1,0,0)),angle:s.ParamDefinition.Numeric(0,{min:-180,max:180,step:.1})},{isExpanded:!0}),scale:s.ParamDefinition.Vec3(i.Vec3.create(1,1,1))},function(e){return Object(c.d)(e.type);})})};function d(e){switch(e.name){case\"custom\":return e.params;case\"flat\":return{lightIntensity:0,ambientIntensity:1,metalness:0,roughness:.4,reflectivity:.5};case\"matte\":return{lightIntensity:.6,ambientIntensity:.4,metalness:0,roughness:1,reflectivity:.5};case\"glossy\":return{lightIntensity:.6,ambientIntensity:.4,metalness:0,roughness:.4,reflectivity:.5};case\"metallic\":return{lightIntensity:.6,ambientIntensity:.4,metalness:.4,roughness:.6,reflectivity:.5};case\"plastic\":return{lightIntensity:.6,ambientIntensity:.4,metalness:0,roughness:.2,reflectivity:.5};}}var f,p=Object(i.Quat)();function m(e,t){for(var r=(null==t?void 0:t.objects)||{type:new Array(5).fill(1),position:new Array(15).fill(0),rotation:new Array(20).fill(0),scale:new Array(15).fill(1)},n=r.type,a=r.position,o=r.rotation,s=r.scale,c=0,l=e.objects.length;c<l;++c){var d=e.objects[c];n[c]=u.a.Type[d.type],i.Vec3.toArray(d.position,a,3*c),i.Quat.toArray(i.Quat.setAxisAngle(p,d.rotation.axis,d.rotation.angle),o,4*c),i.Vec3.toArray(d.scale,s,3*c);}return{variant:e.variant,objects:{count:e.objects.length,type:n,position:a,rotation:o,scale:s}};}!function(e){e.create=function(e,t){void 0===t&&(t={});var r=e.gl,u=e.state,c=e.stats,f=s.ParamDefinition.merge(l,s.ParamDefinition.getDefaultValues(l),t),p=d(f.style),h=m(f.clip),g=Object(n.a)(),v=a.Color.toVec3Normalized(Object(i.Vec3)(),f.backgroundColor),b=Object(i.Mat4)(),y=Object(i.Mat4)(),_=Object(i.Mat4)(),S=Object(i.Mat4)(),O=Object(i.Mat4)(),x=Object(i.Mat4)(),C=Object(i.Mat4)(),w=Object(i.Vec2)(),P={uModel:o.e.create(i.Mat4.identity()),uView:o.e.create(b),uInvView:o.e.create(y),uModelView:o.e.create(_),uInvModelView:o.e.create(S),uInvProjection:o.e.create(O),uProjection:o.e.create(Object(i.Mat4)()),uModelViewProjection:o.e.create(x),uInvModelViewProjection:o.e.create(C),uIsOrtho:o.e.create(1),uViewOffset:o.e.create(w),uPixelRatio:o.e.create(e.pixelRatio),uViewportHeight:o.e.create(g.height),uViewport:o.e.create(n.a.toVec4(Object(i.Vec4)(),g)),uCameraPosition:o.e.create(Object(i.Vec3)()),uNear:o.e.create(1),uFar:o.e.create(1e4),uFogNear:o.e.create(1),uFogFar:o.e.create(1e4),uFogColor:o.e.create(v),uTransparentBackground:o.e.create(0),uClipObjectType:o.e.create(h.objects.type),uClipObjectPosition:o.e.create(h.objects.position),uClipObjectRotation:o.e.create(h.objects.rotation),uClipObjectScale:o.e.create(h.objects.scale),uLightIntensity:o.e.create(p.lightIntensity),uAmbientIntensity:o.e.create(p.ambientIntensity),uMetalness:o.e.create(p.metalness),uRoughness:o.e.create(p.roughness),uReflectivity:o.e.create(p.reflectivity),uPickingAlphaThreshold:o.e.create(f.pickingAlphaThreshold),uInteriorDarkening:o.e.create(f.interiorDarkening),uInteriorColorFlag:o.e.create(f.interiorColorFlag?1:0),uInteriorColor:o.e.create(a.Color.toVec3Normalized(Object(i.Vec3)(),f.interiorColor)),uHighlightColor:o.e.create(a.Color.toVec3Normalized(Object(i.Vec3)(),f.highlightColor)),uSelectColor:o.e.create(a.Color.toVec3Normalized(Object(i.Vec3)(),f.selectColor))},j=Object.entries(P),E=!0,A=function A(e,t){if(e.state.visible&&(e.state.pickable||\"p\"!==t[0])){var n=!1;e.values.dClipObjectCount.ref.value!==h.objects.count&&(o.e.update(e.values.dClipObjectCount,h.objects.count),n=!0),e.values.dClipVariant.ref.value!==h.variant&&(o.e.update(e.values.dClipVariant,h.variant),n=!0),e.values.dTransparencyVariant.ref.value!==f.transparencyVariant&&(o.e.update(e.values.dTransparencyVariant,f.transparencyVariant),n=!0),n&&e.update();var i=e.getProgram(t);u.currentProgramId!==i.id&&(E=!0,i.use()),E&&(i.setUniforms(j),E=!1),e.values.dDoubleSided?e.values.dDoubleSided.ref.value?u.disable(r.CULL_FACE):u.enable(r.CULL_FACE):u.disable(r.CULL_FACE),e.values.dFlipSided&&e.values.dFlipSided.ref.value?(u.frontFace(r.CW),u.cullFace(r.FRONT)):(u.frontFace(r.CCW),u.cullFace(r.BACK)),\"color\"===t&&u.depthMask(e.state.writeDepth),e.render(t);}};return{clear:function clear(e){u.depthMask(!0),u.colorMask(!0,!0,!0,!0),u.clearColor(v[0],v[1],v[2],e?0:1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);},render:function render(e,t,n,a,s){o.e.update(P.uModel,e.view),o.e.update(P.uView,t.view),o.e.update(P.uInvView,i.Mat4.invert(y,t.view)),o.e.update(P.uModelView,i.Mat4.mul(_,e.view,t.view)),o.e.update(P.uInvModelView,i.Mat4.invert(S,_)),o.e.update(P.uProjection,t.projection),o.e.update(P.uInvProjection,i.Mat4.invert(O,t.projection)),o.e.update(P.uModelViewProjection,i.Mat4.mul(x,_,t.projection)),o.e.update(P.uInvModelViewProjection,i.Mat4.invert(C,x)),o.e.update(P.uIsOrtho,\"orthographic\"===t.state.mode?1:0),o.e.update(P.uViewOffset,t.viewOffset.enabled?i.Vec2.set(w,16*t.viewOffset.offsetX,16*t.viewOffset.offsetY):i.Vec2.set(w,0,0)),o.e.update(P.uCameraPosition,t.state.position),o.e.update(P.uFar,t.far),o.e.update(P.uNear,t.near),o.e.update(P.uFogFar,t.fogFar),o.e.update(P.uFogNear,t.fogNear),o.e.update(P.uTransparentBackground,s?1:0),E=!0,u.currentRenderItemId=-1;var c=e.renderables;if(u.disable(r.SCISSOR_TEST),u.disable(r.BLEND),u.colorMask(!0,!0,!0,!0),u.enable(r.DEPTH_TEST),a&&(u.depthMask(!0),\"color\"===n?u.clearColor(v[0],v[1],v[2],s?0:1):u.clearColor(1,1,1,1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)),\"color\"===n){for(var l=0,d=c.length;l<d;++l){(f=c[l]).state.opaque&&A(f,n);}u.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE),u.enable(r.BLEND);for(l=0,d=c.length;l<d;++l){!(f=c[l]).state.opaque&&f.state.writeDepth&&A(f,n);}for(l=0,d=c.length;l<d;++l){var f;(f=c[l]).state.opaque||f.state.writeDepth||A(f,n);}}else for(l=0,d=c.length;l<d;++l)A(c[l],n);r.finish();},setProps:function setProps(e){void 0!==e.backgroundColor&&e.backgroundColor!==f.backgroundColor&&(f.backgroundColor=e.backgroundColor,a.Color.toVec3Normalized(v,f.backgroundColor),o.e.update(P.uFogColor,i.Vec3.copy(P.uFogColor.ref.value,v))),void 0!==e.pickingAlphaThreshold&&e.pickingAlphaThreshold!==f.pickingAlphaThreshold&&(f.pickingAlphaThreshold=e.pickingAlphaThreshold,o.e.update(P.uPickingAlphaThreshold,f.pickingAlphaThreshold)),void 0!==e.transparencyVariant&&e.transparencyVariant!==f.transparencyVariant&&(f.transparencyVariant=e.transparencyVariant),void 0!==e.interiorDarkening&&e.interiorDarkening!==f.interiorDarkening&&(f.interiorDarkening=e.interiorDarkening,o.e.update(P.uInteriorDarkening,f.interiorDarkening)),void 0!==e.interiorColorFlag&&e.interiorColorFlag!==f.interiorColorFlag&&(f.interiorColorFlag=e.interiorColorFlag,o.e.update(P.uInteriorColorFlag,f.interiorColorFlag?1:0)),void 0!==e.interiorColor&&e.interiorColor!==f.interiorColor&&(f.interiorColor=e.interiorColor,o.e.update(P.uInteriorColor,a.Color.toVec3Normalized(P.uInteriorColor.ref.value,f.interiorColor))),void 0!==e.highlightColor&&e.highlightColor!==f.highlightColor&&(f.highlightColor=e.highlightColor,o.e.update(P.uHighlightColor,a.Color.toVec3Normalized(P.uHighlightColor.ref.value,f.highlightColor))),void 0!==e.selectColor&&e.selectColor!==f.selectColor&&(f.selectColor=e.selectColor,o.e.update(P.uSelectColor,a.Color.toVec3Normalized(P.uSelectColor.ref.value,f.selectColor))),void 0!==e.style&&(f.style=e.style,Object.assign(p,d(e.style)),o.e.updateIfChanged(P.uLightIntensity,p.lightIntensity),o.e.updateIfChanged(P.uAmbientIntensity,p.ambientIntensity),o.e.updateIfChanged(P.uMetalness,p.metalness),o.e.updateIfChanged(P.uRoughness,p.roughness),o.e.updateIfChanged(P.uReflectivity,p.reflectivity)),void 0===e.clip||Object(o.h)(e.clip,f.clip)||(f.clip=e.clip,Object.assign(h,m(e.clip,h)),o.e.update(P.uClipObjectPosition,h.objects.position),o.e.update(P.uClipObjectRotation,h.objects.rotation),o.e.update(P.uClipObjectScale,h.objects.scale),o.e.update(P.uClipObjectType,h.objects.type));},setViewport:function setViewport(e,t,a,s){r.viewport(e,t,a,s),e===g.x&&t===g.y&&a===g.width&&s===g.height||(n.a.set(g,e,t,a,s),o.e.update(P.uViewportHeight,s),o.e.update(P.uViewport,i.Vec4.set(P.uViewport.ref.value,e,t,a,s)));},get props(){return f;},get stats(){return{programCount:e.stats.resourceCounts.program,shaderCount:e.stats.resourceCounts.shader,attributeCount:e.stats.resourceCounts.attribute,elementsCount:e.stats.resourceCounts.elements,framebufferCount:e.stats.resourceCounts.framebuffer,renderbufferCount:e.stats.resourceCounts.renderbuffer,textureCount:e.stats.resourceCounts.texture,vertexArrayCount:e.stats.resourceCounts.vertexArray,drawCount:c.drawCount,instanceCount:c.instanceCount,instancedDrawCount:c.instancedDrawCount};},dispose:function dispose(){}};};}(f||(f={})),t.b=f;},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return m;}),r.d(t,\"a\",function(){return n;});var n,i=r(0),a=r(1),o=r(176),s=r(84),u=r(2),c=r(46),l=r(59),d=(s.a,s.b),f=l.a.Trigger,p={dragRotate:Object(l.a)([f(1,d.create())],\"Rotate\",\"Drag using ${triggers}\"),dragRotateZ:Object(l.a)([f(1,d.create({shift:!0}))],\"Rotate around z-axis\",\"Drag using ${triggers}\"),dragPan:Object(l.a)([f(2,d.create()),f(1,d.create({control:!0}))],\"Pan\",\"Drag using ${triggers}\"),dragZoom:l.a.Empty,dragFocus:Object(l.a)([f(8,d.create())],\"Focus\",\"Drag using ${triggers}\"),dragFocusZoom:Object(l.a)([f(4,d.create())],\"Focus and zoom\",\"Drag using ${triggers}\"),scrollZoom:Object(l.a)([f(4,d.create())],\"Zoom\",\"Scroll using ${triggers}\"),scrollFocus:Object(l.a)([f(4,d.create({shift:!0}))],\"Clip\",\"Scroll using ${triggers}\"),scrollFocusZoom:l.a.Empty},m={noScroll:u.ParamDefinition.Boolean(!0,{isHidden:!0}),rotateSpeed:u.ParamDefinition.Numeric(3,{min:.1,max:10,step:.1}),zoomSpeed:u.ParamDefinition.Numeric(6,{min:.1,max:10,step:.1}),panSpeed:u.ParamDefinition.Numeric(.8,{min:.1,max:5,step:.1}),spin:u.ParamDefinition.Boolean(!1,{description:\"Spin the 3D scene around the x-axis in view space\"}),spinSpeed:u.ParamDefinition.Numeric(1,{min:-20,max:20,step:1}),staticMoving:u.ParamDefinition.Boolean(!0,{isHidden:!0}),dynamicDampingFactor:u.ParamDefinition.Numeric(.2,{},{isHidden:!0}),minDistance:u.ParamDefinition.Numeric(.01,{},{isHidden:!0}),maxDistance:u.ParamDefinition.Numeric(1e150,{},{isHidden:!0}),bindings:u.ParamDefinition.Value(p,{isHidden:!0})};!function(e){e.create=function(e,t,r){void 0===r&&(r={});var n=Object(i.__assign)(Object(i.__assign)({},u.ParamDefinition.getDefaultValues(m)),r),s=Object(o.a)(),d=!1,f=e.drag.subscribe(function(e){var r=e.pageX,i=e.pageY,o=e.buttons,u=e.modifiers,c=e.isStart;v=!0;var d=l.a.match(n.bindings.dragRotate,o,u),f=l.a.match(n.bindings.dragRotateZ,o,u),p=l.a.match(n.bindings.dragPan,o,u),m=l.a.match(n.bindings.dragZoom,o,u),h=l.a.match(n.bindings.dragFocus,o,u),g=l.a.match(n.bindings.dragFocusZoom,o,u);(function(e,t){a.Vec2.set(R,(e-.5*s.width-s.x)/(.5*s.width),(s.height+2*(s.y-t))/s.width);})(r,i),function(e,t){a.Vec2.set(V,(e-s.x)/s.width,(t-s.y)/s.height);}(r,i),c&&(d&&(a.Vec2.copy(S,R),a.Vec2.copy(_,S)),f&&(a.Vec2.copy(w,R),a.Vec2.copy(C,w)),(m||g)&&(a.Vec2.copy(j,V),a.Vec2.copy(E,j)),h&&(a.Vec2.copy(A,V),a.Vec2.copy(T,A)),p&&(a.Vec2.copy(D,V),a.Vec2.copy(I,D)));d&&a.Vec2.copy(S,R);f&&a.Vec2.copy(w,R);(m||g)&&a.Vec2.copy(E,V);h&&a.Vec2.copy(T,V);if(g){var b=a.Vec3.distance(t.state.position,t.state.target);t.setState({radius:b/5});}p&&a.Vec2.copy(I,V);}),p=e.interactionEnd.subscribe(function(){v=!1;}),h=e.wheel.subscribe(function(e){var t=e.dx,r=e.dy,i=e.dz,a=e.buttons,o=e.modifiers,s=Object(c.a)(t,r,i);l.a.match(n.bindings.scrollZoom,a,o)&&(E[1]+=1e-4*s);l.a.match(n.bindings.scrollFocus,a,o)&&(T[1]+=1e-4*s);}),g=e.pinch.subscribe(function(e){var t=e.fraction,r=e.buttons,i=e.modifiers;l.a.match(n.bindings.scrollZoom,r,i)&&(v=!0,E[1]+=.1*(t-1));}),v=!1,b=Object(a.Vec3)(),y=Object(a.Vec3)(),_=Object(a.Vec2)(),S=Object(a.Vec2)(),O=Object(a.Vec3)(),x=0,C=Object(a.Vec2)(),w=Object(a.Vec2)(),P=0,j=Object(a.Vec2)(),E=Object(a.Vec2)(),A=Object(a.Vec2)(),T=Object(a.Vec2)(),D=Object(a.Vec2)(),I=Object(a.Vec2)(),M=a.Vec3.clone(t.target),k=a.Vec3.clone(t.position),B=a.Vec3.clone(t.up),V=Object(a.Vec2)(),R=Object(a.Vec2)(),L=Object(a.Vec3)(),N=Object(a.Quat)(),F=Object(a.Vec3)(),U=Object(a.Vec3)(),z=Object(a.Vec3)(),H=Object(a.Vec3)(),G=Object(a.Quat)(),q=Object(a.Vec2)(),W=Object(a.Vec3)(),Q=Object(a.Vec3)(),Y=-1;function X(e){var r,i,o,s,u,c,l;Y!==e&&(n.spin&&(r=e-Y,i=(n.spinSpeed||0)/1e3,K[0]=60*Math.min(Math.abs(r),125)/1e3*i,v||a.Vec2.add(S,_,K)),a.Vec3.sub(y,t.position,t.target),function(){var e=S[0]-_[0],r=S[1]-_[1];a.Vec3.set(H,e,r,0);var i=a.Vec3.magnitude(H)*n.rotateSpeed;i?(a.Vec3.sub(y,t.position,t.target),a.Vec3.normalize(F,y),a.Vec3.normalize(U,t.up),a.Vec3.normalize(z,a.Vec3.cross(z,U,F)),a.Vec3.setMagnitude(U,U,r),a.Vec3.setMagnitude(z,z,e),a.Vec3.add(H,U,z),a.Vec3.normalize(L,a.Vec3.cross(L,H,y)),a.Quat.setAxisAngle(N,L,i),a.Vec3.transformQuat(y,y,N),a.Vec3.transformQuat(t.up,t.up,N),a.Vec3.copy(O,L),x=i):!n.staticMoving&&x&&(x*=Math.sqrt(1-n.dynamicDampingFactor),a.Vec3.sub(y,t.position,t.target),a.Quat.setAxisAngle(N,O,x),a.Vec3.transformQuat(y,y,N),a.Vec3.transformQuat(t.up,t.up,N)),a.Vec2.copy(_,S);}(),o=w[0]-C[0],s=w[1]-C[1],(u=n.rotateSpeed*(-o+s)*-.05)?(a.Vec3.sub(y,t.position,t.target),a.Quat.setAxisAngle(G,y,u),a.Vec3.transformQuat(t.up,t.up,G),P=u):!n.staticMoving&&P&&(P*=Math.sqrt(1-n.dynamicDampingFactor),a.Vec3.sub(y,t.position,t.target),a.Quat.setAxisAngle(G,y,P),a.Vec3.transformQuat(t.up,t.up,G)),a.Vec2.copy(C,w),1!==(c=1+(E[1]-j[1])*n.zoomSpeed)&&c>0&&a.Vec3.scale(y,y,c),n.staticMoving?a.Vec2.copy(j,E):j[1]+=(E[1]-j[1])*n.dynamicDampingFactor,function(){var e=(T[1]-A[1])*n.zoomSpeed;if(0!==e){var r=Math.max(1,t.state.radius+t.state.radius*e);t.setState({radius:r});}n.staticMoving?a.Vec2.copy(A,T):A[1]+=(T[1]-A[1])*n.dynamicDampingFactor;}(),a.Vec2.sub(q,a.Vec2.copy(q,I),D),a.Vec2.squaredMagnitude(q)&&(a.Vec2.scale(q,q,a.Vec3.magnitude(y)*n.panSpeed),a.Vec3.cross(Q,a.Vec3.copy(Q,y),t.up),a.Vec3.setMagnitude(Q,Q,q[0]),a.Vec3.setMagnitude(W,t.up,q[1]),a.Vec3.add(Q,Q,W),a.Vec3.add(t.position,t.position,Q),a.Vec3.add(t.target,t.target,Q),n.staticMoving?a.Vec2.copy(D,I):(a.Vec2.sub(q,I,D),a.Vec2.scale(q,q,n.dynamicDampingFactor),a.Vec2.add(D,D,q))),a.Vec3.add(t.position,t.target,y),l=Math.min(Math.max(1e3*t.state.radiusMax,.01),n.maxDistance),a.Vec3.squaredMagnitude(y)>l*l&&(a.Vec3.setMagnitude(y,y,l),a.Vec3.add(t.position,t.target,y),a.Vec2.copy(j,E),a.Vec2.copy(A,T)),a.Vec3.squaredMagnitude(y)<n.minDistance*n.minDistance&&(a.Vec3.setMagnitude(y,y,n.minDistance),a.Vec3.add(t.position,t.target,y),a.Vec2.copy(j,E),a.Vec2.copy(A,T)),a.Vec3.squaredDistance(b,t.position)>a.EPSILON&&a.Vec3.copy(b,t.position),Y=e);}var K=a.Vec2.create(.005,0);return X(0),{viewport:s,get props(){return n;},setProps:function setProps(e){Object.assign(n,e);},update:X,reset:function reset(){a.Vec3.copy(t.target,M),a.Vec3.copy(t.position,k),a.Vec3.copy(t.up,B),a.Vec3.sub(y,t.position,t.target),a.Vec3.copy(b,t.position);},dispose:function dispose(){d||(d=!0,f.unsubscribe(),h.unsubscribe(),g.unsubscribe(),p.unsubscribe());}};};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return h;}),r.d(t,\"a\",function(){return g;});var n=r(0),i=r(115),a=r(34),o=r(75),s=r(39),u=r(2),c=r(262),l=r(11),d=r(47),f=r(263),p=r(5),m=r(144),h={sceneBoundingSpheres:u.ParamDefinition.Boolean(!1,{description:\"Show full scene bounding spheres.\"}),visibleSceneBoundingSpheres:u.ParamDefinition.Boolean(!1,{description:\"Show visible scene bounding spheres.\"}),objectBoundingSpheres:u.ParamDefinition.Boolean(!1,{description:\"Show bounding spheres of visible render objects.\"}),instanceBoundingSpheres:u.ParamDefinition.Boolean(!1,{description:\"Show bounding spheres of visible instances.\"})},g=function(){function e(e,t,r){this.objectsData=new Map(),this.instancesData=new Map(),this.scene=c.a.create(e),this.parent=t,this._props=Object(n.__assign)(Object(n.__assign)({},u.ParamDefinition.getDefaultValues(h)),r);}return e.prototype.update=function(){var e=this,t=v(this.scene,this.parent.boundingSphere,this.sceneData,d.a.lightgrey,b);t&&(this.sceneData=t);var r=v(this.scene,this.parent.boundingSphereVisible,this.visibleSceneData,d.a.black,y);r&&(this.visibleSceneData=r),this.parent.forEach(function(t,r){var n=e.objectsData.get(r),i=v(e.scene,t.values.boundingSphere.ref.value,n,d.a.tomato,_);i&&e.objectsData.set(r,i);var a=e.instancesData.get(r),o=v(e.scene,t.values.invariantBoundingSphere.ref.value,a,d.a.skyblue,S,{aTransform:r.values.aTransform,matrix:r.values.matrix,transform:r.values.transform,extraTransform:r.values.extraTransform,uInstanceCount:r.values.uInstanceCount,instanceCount:r.values.instanceCount,aInstance:r.values.aInstance});o&&e.instancesData.set(r,o);}),this.objectsData.forEach(function(t,r){e.parent.has(r)||(e.scene.remove(t.renderObject),e.objectsData.delete(r));}),this.instancesData.forEach(function(t,r){e.parent.has(r)||(e.scene.remove(t.renderObject),e.instancesData.delete(r));}),this.scene.update(void 0,!1),this.scene.commit();},e.prototype.syncVisibility=function(){var e=this;this.sceneData&&(this.sceneData.renderObject.state.visible=this._props.sceneBoundingSpheres),this.visibleSceneData&&(this.visibleSceneData.renderObject.state.visible=this._props.visibleSceneBoundingSpheres),this.parent.forEach(function(t,r){var n=e.objectsData.get(r);n&&(n.renderObject.state.visible=r.state.visible&&e._props.objectBoundingSpheres);var i=e.instancesData.get(r);i&&(i.renderObject.state.visible=r.state.visible&&e._props.instanceBoundingSpheres);});},e.prototype.clear=function(){this.sceneData=void 0,this.objectsData.clear(),this.scene.clear();},Object.defineProperty(e.prototype,\"isEnabled\",{get:function get(){return this._props.sceneBoundingSpheres||this._props.visibleSceneBoundingSpheres||this._props.objectBoundingSpheres||this._props.instanceBoundingSpheres;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"props\",{get:function get(){return this._props;},enumerable:!1,configurable:!0}),e.prototype.setProps=function(e){Object.assign(this._props,e),this.isEnabled&&this.update();},e;}();function v(e,t,r,n,u,c){if(!r||!l.g.equals(r.boundingSphere,t)){var d=function(e,t){var r=Object(f.b)(2),n=a.a.createState(r,r/2,t);if(e.radius&&(Object(o.a)(n,e.center,e.radius,2),l.g.hasExtrema(e)))for(var i=0,s=e.extrema;i<s.length;i++){var u=s[i];Object(o.a)(n,u,1,0);}return a.a.getMesh(n);}(t,r&&r.mesh),h=r?r.renderObject:function(e,t,r,n){var a=s.a.Utils.createValuesSimple(e,{alpha:.1,doubleSided:!1},t,1,n);return Object(i.a)(\"mesh\",a,{visible:!0,alphaFactor:1,pickable:!1,opaque:!1,writeDepth:!1},r);}(d,n,u,c);return r?p.e.update(h.values.drawCount,m.a.getDrawCount(d)):e.add(h),{boundingSphere:l.g.clone(t),renderObject:h,mesh:d};}}var b=Object(i.c)(),y=Object(i.c)(),_=Object(i.c)(),S=Object(i.c)();},function(e,t,r){\"use strict\";r.d(t,\"b\",function(){return S;}),r.d(t,\"a\",function(){return O;});var n=r(0),i=r(262),a=r(34),o=r(1),s=r(75),u=r(39),c=r(47),l=r(81),d=r(5),f=r(11),p=r(2),m=r(151),h=r(49),g=r(23),v=r(45),b=r(68),y=r(6),_=Object(n.__assign)(Object(n.__assign)({},u.a.Params),{alpha:Object(n.__assign)(Object(n.__assign)({},u.a.Params.alpha),{defaultValue:1}),ignoreLight:Object(n.__assign)(Object(n.__assign)({},u.a.Params.ignoreLight),{defaultValue:!0}),colorX:p.ParamDefinition.Color(c.a.red,{isEssential:!0}),colorY:p.ParamDefinition.Color(c.a.green,{isEssential:!0}),colorZ:p.ParamDefinition.Color(c.a.blue,{isEssential:!0}),scale:p.ParamDefinition.Numeric(.33,{min:.1,max:2,step:.1},{isEssential:!0})}),S={handle:p.ParamDefinition.MappedStatic(\"off\",{on:p.ParamDefinition.Group(_),off:p.ParamDefinition.Group({})},{cycle:!0,description:\"Show handle tool\"})},O=function(){function e(e,t){var r=this;void 0===t&&(t={}),this.webgl=e,this.props={handle:{name:\"off\",params:{}}},this._transform=Object(o.Mat4)(),this.eachGroup=function(e,t){if(!r.renderObject)return!1;if(!C(e))return!1;for(var n=!1,i=r.renderObject.values.uGroupCount.ref.value,a=0,o=e.elements;a<o.length;a++){var s=o[a],u=s.groupId,c=s.instanceId*i+u;t(y.Interval.ofSingleton(c))&&(n=!0);}return n;},this.scene=i.a.create(e),this.setProps(t);}return e.prototype.getBoundingSphere=function(e,t){return this.renderObject&&(f.g.copy(e,this.renderObject.values.invariantBoundingSphere.ref.value),o.Mat4.fromArray(this._transform,this.renderObject.values.aTransform.ref.value,16*t),f.g.transform(e,e,this._transform)),e;},e.prototype.setProps=function(e){var t=this;this.props=Object(m.a)(this.props,function(r){if(void 0!==e.handle&&(r.handle.name=e.handle.name,\"on\"===e.handle.name)){t.scene.clear();var i=Object(n.__assign)(Object(n.__assign)({},e.handle.params),{scale:e.handle.params.scale*t.webgl.pixelRatio});t.renderObject=function(e){var t=function(e,t){var r=10*e.scale,n=function(e,t){var r=a.a.createState(512,256,t),n=.05*e,i=o.Vec3.scale(Object(o.Vec3)(),o.Vec3.unitX,e),u=o.Vec3.scale(Object(o.Vec3)(),o.Vec3.unitY,e),c=o.Vec3.scale(Object(o.Vec3)(),o.Vec3.unitZ,e),d={radiusTop:n,radiusBottom:n,radialSegments:32};return r.currentGroup=x.TranslateScreenXY,Object(s.a)(r,o.Vec3.origin,3*n,2),r.currentGroup=x.TranslateObjectX,Object(s.a)(r,i,n,2),Object(l.a)(r,o.Vec3.origin,i,1,d),r.currentGroup=x.TranslateObjectY,Object(s.a)(r,u,n,2),Object(l.a)(r,o.Vec3.origin,u,1,d),r.currentGroup=x.TranslateObjectZ,Object(s.a)(r,c,n,2),Object(l.a)(r,o.Vec3.origin,c,1,d),a.a.getMesh(r);}(r,null==t?void 0:t.geometry);n.setBoundingSphere(f.g.create(o.Vec3.create(r/2,r/2,r/2),r+r/4));return h.a.create(\"handle\",{},n,function(t){switch(t){case x.TranslateObjectX:return e.colorX;case x.TranslateObjectY:return e.colorY;case x.TranslateObjectZ:return e.colorZ;default:return c.a.grey;}},function(){return 1;},function(){return\"\";});}(e);return h.a.createRenderObject(t,e);}(i),t.scene.add(t.renderObject),t.scene.commit(),r.handle.params=Object(n.__assign)({},e.handle.params);}});},Object.defineProperty(e.prototype,\"isEnabled\",{get:function get(){return\"on\"===this.props.handle.name;},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t,r){this.renderObject&&(o.Mat4.setTranslation(this.renderObject.values.aTransform.ref.value,t),o.Mat4.fromMat3(this.renderObject.values.aTransform.ref.value,r),d.e.update(this.renderObject.values.aTransform,this.renderObject.values.aTransform.ref.value),this.scene.update([this.renderObject],!0));},e.prototype.getLoci=function(e){var t=e.objectId,r=e.groupId,n=e.instanceId;return this.renderObject&&t===this.renderObject.id?function(e,t,r){return Object(g.DataLoci)(\"handle\",e,[{groupId:t,instanceId:r}],function(t){return e.getBoundingSphere(t,r);},function(){return\"Handle Helper | Group Id \"+t+\" | Instance Id \"+r;});}(this,r,n):g.EmptyLoci;},e.prototype.mark=function(e,t){return!!v.b.is(v.b.Highlighting,t)&&!!C(e)&&e.data===this&&b.a.mark(this.renderObject,e,t,this.eachGroup);},e;}();var x={None:0,TranslateScreenXY:1,TranslateObjectX:3,TranslateObjectY:4,TranslateObjectZ:5};function C(e){return\"data-loci\"===e.kind&&\"handle\"===e.tag;}},function(e,t,r){\"use strict\";/*\r\nobject-assign\r\n(c) Sindre Sorhus\r\n@license MIT\r\n*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e);}e.exports=function(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",\"5\"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t[\"_\"+String.fromCharCode(r)]=r;if(\"0123456789\"!==Object.getOwnPropertyNames(t).map(function(e){return t[e];}).join(\"\"))return!1;var n={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(e){n[e]=e;}),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},n)).join(\"\");}catch(e){return!1;}}()?Object.assign:function(e,t){for(var r,s,u=o(e),c=1;c<arguments.length;c++){for(var l in r=Object(arguments[c]))i.call(r,l)&&(u[l]=r[l]);if(n){s=n(r);for(var d=0;d<s.length;d++)a.call(r,s[d])&&(u[s[d]]=r[s[d]]);}}return u;};},function(e,t,r){\"use strict\";var n=r(341);r.d(t,\"a\",function(){return n.a;});},function(e,t){},function(e,t){},function(e,t,r){\"use strict\";var n;r.d(t,\"a\",function(){return n;}),function(e){e.Empty={isDefined:!1};}(n||(n={}));},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n;});var n,i=r(27),a=r(6),o=r(5);function s(e){for(var t=new Map(),r=0,n=e.length;r<n;r++)t.set(r,e[r]);return t;}!function(e){e.getCifDataSource=function(e,t,r){if(!t)return{rowCount:0};if(r&&r[t.id])return r[t.id];var n=t.getElements(e),i={data:n,rowCount:n.elements.length};return r&&(r[t.id]=i),i;},e.fromAtomMap=function(e){return new c(e);},e.fromAtomArray=function(e){return new c(s(e));};var t=function t(e){return e.atomicHierarchy.residueAtomSegments;};e.fromResidueMap=function(e){return new u(\"residue\",e,t,0);},e.fromResidueArray=function(e){return new u(\"residue\",s(e),t,0);};var r=function r(e){return e.atomicHierarchy.chainAtomSegments;};e.fromChainMap=function(e){return new u(\"chain\",e,r,0);},e.fromChainArray=function(e){return new u(\"chain\",s(e),r,0);},e.fromEntityMap=function(e){return new l(e);};}(n||(n={}));var u=function(){function e(e,t,r,n){this.level=e,this.map=t,this.segmentGetter=r,this.id=o.c.create22(),this.kind=n;}return e.prototype.has=function(e){return this.map.has(e);},e.prototype.get=function(e){return this.map.get(e);},e.prototype.getStructureElements=function(e){var t=e.models;if(1!==t.length)throw new Error(\"Only works on structures with a single model.\");for(var r=new Set(),n=e.unitSymmetryGroups,o=[],s=this.segmentGetter(t[0]),u=0,c=n;u<c.length;u++){var l=c[u].units[0];if(l.kind===this.kind)for(var d=a.Segmentation.transientSegments(s,l.elements);d.hasNext;){var f=d.move();this.has(f.index)&&!r.has(f.index)&&(r.add(f.index),o[o.length]=i.d.Location.create(e,l,l.elements[f.start]));}}return o.sort(function(e,t){return e.element-t.element;}),o;},e.prototype.getElements=function(e){var t=this,r=this.segmentGetter(e.model).index,n=this.getStructureElements(e);return{elements:n,property:function property(e){return t.get(r[n[e].element]);}};},e;}(),c=function(){function e(e){this.map=e,this.id=o.c.create22(),this.level=\"atom\",this.kind=0;}return e.prototype.has=function(e){return this.map.has(e);},e.prototype.get=function(e){return this.map.get(e);},e.prototype.getStructureElements=function(e){if(1!==e.models.length)throw new Error(\"Only works on structures with a single model.\");for(var t=new Set(),r=[],n=0,a=e.unitSymmetryGroups;n<a.length;n++){var o=a[n].units[0];if(o.kind===this.kind)for(var s=o.elements,u=0,c=s.length;u<c;u++){var l=s[u];this.has(l)&&!t.has(l)&&(t.add(s[u]),r[r.length]=i.d.Location.create(e,o,l));}}return r.sort(function(e,t){return e.element-t.element;}),r;},e.prototype.getElements=function(e){var t=this,r=this.getStructureElements(e);return{elements:r,property:function property(e){return t.get(r[e].element);}};},e;}(),l=function(){function e(e){this.map=e,this.id=o.c.create22(),this.level=\"entity\",this.kind=0;}return e.prototype.has=function(e){return this.map.has(e);},e.prototype.get=function(e){return this.map.get(e);},e.prototype.getStructureElements=function(e){var t=e.models;if(1!==t.length)throw new Error(\"Only works on structures with a single model.\");for(var r=t[0].atomicHierarchy.index,n=new Set(),o=e.unitSymmetryGroups,s=[],u=t[0].atomicHierarchy.chainAtomSegments,c=0,l=o;c<l.length;c++){var d=l[c].units[0];if(d.kind===this.kind)for(var f=a.Segmentation.transientSegments(u,d.elements);f.hasNext;){var p=f.move(),m=r.getEntityFromChain(p.index);this.has(m)&&!n.has(m)&&(n.add(m),s[s.length]=i.d.Location.create(e,d,d.elements[p.start]));}}return s.sort(function(e,t){return e.element-t.element;}),s;},e.prototype.getElements=function(e){var t=this,r=this.getStructureElements(e),n=e.model.atomicHierarchy.chainAtomSegments.index,i=e.model.atomicHierarchy.index;return{elements:r,property:function property(e){return t.get(i.getEntityFromChain(n[r[e].element]));}};},e;}();},function(e,t){},function(e,t,r){\"use strict\";var n;r.r(t),r.d(t,\"PluginSpec\",function(){return n;}),function(e){e.Action=function(e,t){return{action:e,customControl:t&&t.customControl,autoUpdate:t&&t.autoUpdate};},e.Behavior=function(e,t){return void 0===t&&(t={}),{transformer:e,defaultParams:t};};}(n||(n={}));},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ModelInfo=t.QueryHelper=t.LigandView=t.PDBeVolumes=void 0;var n=r(0),i=r(26),a=r(10),o=r(13),s=r(4),u=r(299),c=r(163);!function(e){e.mapParams=function(e,t,r){var i=n.__assign({},e);return i.options.behaviorRef=\"volume-streaming\"+Math.floor(Math.random()*Math.floor(100)),i.options.emContourProvider=\"pdbe\",i.options.serverUrl=\"https://www.ebi.ac.uk/pdbe/densities\",i.options.channelParams.em={opacity:t&&t.em&&t.em.opacity?t.em.opacity:.49,wireframe:!!(t&&t.em&&t.em.wireframe)&&t.em.wireframe},i.options.channelParams[\"2fo-fc\"]={opacity:t&&t[\"2fo-fc\"]&&t[\"2fo-fc\"].opacity?t[\"2fo-fc\"].opacity:.49,wireframe:!!(t&&t[\"2fo-fc\"]&&t[\"2fo-fc\"].wireframe)&&t[\"2fo-fc\"].wireframe},i.options.channelParams[\"fo-fc(+ve)\"]={opacity:t&&t[\"fo-fc(+ve)\"]&&t[\"fo-fc(+ve)\"].opacity?t[\"fo-fc(+ve)\"].opacity:.3,wireframe:!(t&&t[\"fo-fc(+ve)\"]&&t[\"fo-fc(+ve)\"].wireframe)||t[\"fo-fc(+ve)\"].wireframe},i.options.channelParams[\"fo-fc(-ve)\"]={opacity:t&&t[\"fo-fc(-ve)\"]&&t[\"fo-fc(-ve)\"].opacity?t[\"fo-fc(-ve)\"].opacity:.3,wireframe:!(t&&t[\"fo-fc(-ve)\"]&&t[\"fo-fc(-ve)\"].wireframe)||t[\"fo-fc(-ve)\"].wireframe},i;},e.displayUsibilityMessage=function(e){i.PluginCommands.Toast.Show(e,{title:\"Volume\",message:\"Streaming enabled, click on a residue or an atom to view the data.\",key:\"toast-1\",timeoutMs:7e3});},e.toggle=function(e){var t=e.state.data,r=t.select(o.StateSelection.Generators.ofTransformer(u.CreateVolumeStreamingInfo))[0];r&&i.PluginCommands.State.ToggleVisibility(e,{state:t,ref:r.transform.ref});};}(t.PDBeVolumes||(t.PDBeVolumes={})),function(e){e.query=function(e){var t,r={\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()])};e.auth_seq_id?t=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.auth_seq_id]):e.label_comp_id&&(t=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_comp_id(),e.label_comp_id])),t&&(r[\"residue-test\"]=t),e.auth_asym_id?r[\"chain-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),e.auth_asym_id]):e.struct_asym_id&&(r[\"chain-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(),e.struct_asym_id]));var n=e.show_all?a.MolScriptBuilder.struct.generator.atomGroups(r):a.MolScriptBuilder.struct.filter.first([a.MolScriptBuilder.struct.generator.atomGroups(r)]);return{core:n,surroundings:a.MolScriptBuilder.struct.modifier.includeSurroundings({0:n,radius:5,\"as-whole-residues\":!0})};},e.branchedQuery=function(e){var t=[];e.atom_site.forEach(function(e){var r={\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()]),\"residue-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.auth_seq_id])};t.push(r);});var r=[];t.forEach(function(e){r.push(a.MolScriptBuilder.struct.generator.atomGroups(e));});var n=a.MolScriptBuilder.struct.modifier.union([1===r.length?r[0]:a.MolScriptBuilder.struct.combinator.merge(r.map(function(e){return a.MolScriptBuilder.struct.modifier.union([e]);}))]);return{core:n,surroundings:a.MolScriptBuilder.struct.modifier.includeSurroundings({0:n,radius:5,\"as-whole-residues\":!0})};};}(t.LigandView||(t.LigandView={})),function(e){e.getQueryObject=function(e){var t=[];e.forEach(function(e){var r={};if(e.entity_id&&(r[\"entity-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_entity_id(),e.entity_id])),e.struct_asym_id?r[\"chain-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(),e.struct_asym_id]):e.auth_asym_id&&(r[\"chain-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),e.auth_asym_id])),e.label_comp_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_comp_id(),e.label_comp_id]):e.residue_number?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_seq_id(),e.residue_number]):e.start_residue_number&&e.end_residue_number&&e.end_residue_number>e.start_residue_number?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.inRange([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_seq_id(),e.start_residue_number,e.end_residue_number]):e.start_residue_number&&e.end_residue_number&&e.end_residue_number===e.start_residue_number?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_seq_id(),e.start_residue_number]):e.auth_seq_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.auth_seq_id]):e.auth_residue_number&&!e.auth_ins_code_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.auth_residue_number]):e.auth_residue_number&&e.auth_ins_code_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.authResidueId(),a.MolScriptBuilder.struct.type.authResidueId([void 0,e.auth_residue_number,e.auth_ins_code_id])]):e.start_auth_residue_number&&e.end_auth_residue_number&&e.end_auth_residue_number>e.start_auth_residue_number?e.start_auth_ins_code_id&&e.end_auth_ins_code_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.inRange([a.MolScriptBuilder.struct.atomProperty.macromolecular.authResidueId(),a.MolScriptBuilder.struct.type.authResidueId([void 0,e.start_auth_residue_number,e.start_auth_ins_code_id]),a.MolScriptBuilder.struct.type.authResidueId([void 0,e.start_auth_residue_number,e.start_auth_ins_code_id])]):r[\"residue-test\"]=a.MolScriptBuilder.core.rel.inRange([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.start_auth_residue_number,e.end_auth_residue_number]):e.start_auth_residue_number&&e.end_auth_residue_number&&e.end_auth_residue_number===e.start_auth_residue_number&&(e.start_auth_ins_code_id?r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.authResidueId(),a.MolScriptBuilder.struct.type.authResidueId([void 0,e.start_auth_residue_number,e.start_auth_ins_code_id])]):r[\"residue-test\"]=a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),e.start_auth_residue_number])),e.atoms){var n=[];e.atoms.forEach(function(e){n.push(a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.ammp(\"label_atom_id\"),e]));}),r[\"atom-test\"]=a.MolScriptBuilder.core.logic.or(n);}t.push(r);});var r=[];return t.forEach(function(e){r.push(a.MolScriptBuilder.struct.generator.atomGroups(e));}),a.MolScriptBuilder.struct.modifier.union([1===r.length?r[0]:a.MolScriptBuilder.struct.combinator.merge(r.map(function(e){return a.MolScriptBuilder.struct.modifier.union([e]);}))]);},e.getInteractivityLoci=function(t,r){var n=c.compile(e.getQueryObject(t))(new s.QueryContext(r));return s.StructureSelection.toLociWithSourceUnits(n);},e.getHetLoci=function(e,t){var r=c.compile(e)(new s.QueryContext(t));return s.StructureSelection.toLociWithSourceUnits(r);};}(t.QueryHelper||(t.QueryHelper={})),function(e){e.get=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var t,r,i,a,o,s,u,c,l,d;return n.__generator(this,function(n){for(t=e.atomicHierarchy.residues._rowCount,r=e.atomicHierarchy.residueAtomSegments.offsets,i=e.atomicHierarchy.chainAtomSegments.index,a=[],o=0,s=0;s<t;s++)u=i[r[s]],c=e.atomicHierarchy.index.getEntityFromChain(u),\"non-polymer\"!==(l=e.entities.data.type.value(c))&&\"branched\"!==l||(d=e.atomicHierarchy.atoms.label_comp_id.value(r[s]),\"branched\"===l?o++:-1===a.indexOf(d)&&a.push(d));return[2,{hetNames:a,carbEntityCount:o}];});});};}(t.ModelInfo||(t.ModelInfo={}));},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.DomainAnnotationsColorThemeProvider=t.DomainAnnotationsColorTheme=t.DomainAnnotationsColorThemeParams=void 0;var n=r(407),i=r(4),a=r(24),o=r(2),s=[a.Color.fromRgb(170,170,170),a.Color.fromRgb(255,112,3)];function u(e,t){var r;if(e.structure&&!e.structure.isEmpty&&e.structure.models[0].customProperties.has(n.DomainAnnotationsProvider.descriptor)){var a=n.DomainAnnotations.getDomains,o=t.type.params.kind;r=function r(e){return i.StructureElement.Location.is(e)&&a(e).indexOf(o)>=0?s[1]:s[0];};}else r=function r(){return s[0];};return{factory:u,granularity:\"group\",color:r,props:t,description:\"Highlights Sequnece and Structure Domain Annotations. Data obtained via PDBe.\"};}t.DomainAnnotationsColorThemeParams={type:o.ParamDefinition.MappedStatic(\"\",{\"\":o.ParamDefinition.EmptyGroup()})},t.DomainAnnotationsColorTheme=u,t.DomainAnnotationsColorThemeProvider={name:\"pdbe-domain-annotations\",label:\"Domain annotations\",category:\"Miscellaneous\",factory:u,getParams:function getParams(e){var t=n.DomainAnnotations.getDomainNames(e.structure),r=n.DomainAnnotations.getDomainTypes(e.structure),i={};return r.forEach(function(e,r){t[r].length>0&&(i[e]=o.ParamDefinition.Group({kind:o.ParamDefinition.Select(t[r][0],o.ParamDefinition.arrayToOptions(t[r]))},{isFlat:!0}));}),Object.keys(i).length>0?{type:o.ParamDefinition.MappedStatic(i[0],i)}:{type:o.ParamDefinition.MappedStatic(\"\",{\"\":o.ParamDefinition.EmptyGroup()})};},defaultValues:o.ParamDefinition.getDefaultValues(t.DomainAnnotationsColorThemeParams),isApplicable:function isApplicable(e){var t;return n.DomainAnnotations.isApplicable(null===(t=e.structure)||void 0===t?void 0:t.models[0]);},ensureCustomProperties:{attach:function attach(e,t){return t.structure?n.DomainAnnotationsProvider.attach(e,t.structure.models[0],void 0,!0):Promise.resolve();},detach:function detach(e){return e.structure&&e.structure.models[0].customProperties.reference(n.DomainAnnotationsProvider.descriptor,!1);}}};},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.DomainAnnotationsProvider=t.DomainAnnotationsParams=t.DomainAnnotations=void 0;var n,i=r(0),a=r(4),o=r(236),s=r(306),u=r(2),c=r(30),l=r(114),d=r(66);function f(e,t,r,n,i){var a=function(e,t,r){var n=(0,e.entities.getEntityIndex)(t);if(n<0||!e.entity_index_label_asym_id.has(n))return-1;var i=e.entity_index_label_asym_id.get(n);return i&&i.has(r)?i.get(r):-1;}(t,r,n);if(a<0)return-1;var o=t.chain_index_auth_seq_id.get(a);return o.has(i)?o.get(i):-1;}!function(e){function r(e,t){return t+\"/\"+e.toLowerCase();}function n(e,t){return{info:o.PropertyWrapper.createInfo(),data:function(e,t){for(var r=[],n=[],i=new Map(),o=[\"Pfam\",\"InterPro\",\"CATH\",\"SCOP\"],s=0,u=Object.keys(t);s<u.length;s++){var l=u[s];if(-1!==o.indexOf(l)){var d=[];r.push(l);for(var p=t[l],m=0,h=Object.keys(p);m<h.length;m++)for(var g=h[m],v=p[g],b=0,y=v.mappings;b<y.length;b++){var _=y[b];c.arraySetAdd(d,v.identifier);for(var S=e.atomicHierarchy.index.map,O=_.start.residue_number;O<=_.end.residue_number;O++){var x=O,C=f(e,S,_.entity_id+\"\",_.chain_id,x),w=[v.identifier],P=i.get(C);P&&(P.push(v.identifier),w=P),i.set(C,w);}}n.push(d);}}return{domains:a.IndexedCustomProperty.fromResidueMap(i),domainNames:n,domainTypes:r};}(e,t)};}e.DefaultServerUrl=\"https://www.ebi.ac.uk/pdbe/api/mappings\",e.getEntryUrl=r,e.isApplicable=function(e){return!!e&&a.Model.isFromPdbArchive(e);},e.fromJson=n,e.fromServer=function(e,t,a){return i.__awaiter(this,void 0,void 0,function(){var o,s,u;return i.__generator(this,function(i){switch(i.label){case 0:return o=l.Asset.getUrlAsset(e.assetManager,r(t.entryId,a.serverUrl)),[4,e.assetManager.resolve(o,\"json\").runInContext(e.runtime)];case 1:if(s=i.sent(),!(u=s.data[t.entryId.toLowerCase()]))throw new Error(\"missing data\");return[2,{value:n(t,u),assets:[s]}];}});});};var s=[];e.getDomains=function(e){if(!a.Unit.isAtomic(e.unit))return s;var r=t.DomainAnnotationsProvider.get(e.unit.model).value;if(!r||!r.data)return s;var n=e.unit.residueIndex[e.element];return r.data.domains.has(n)?r.data.domains.get(n):s;},e.getDomainTypes=function(e){if(!e)return s;var r=t.DomainAnnotationsProvider.get(e.models[0]).value;return r&&r.data?r.data.domainTypes:s;},e.getDomainNames=function(e){if(!e)return s;var r=t.DomainAnnotationsProvider.get(e.models[0]).value;return r&&r.data?r.data.domainNames:s;};}(n||(n={})),t.DomainAnnotations=n,t.DomainAnnotationsParams={serverUrl:u.ParamDefinition.Text(n.DefaultServerUrl,{description:\"JSON API Server URL\"})},t.DomainAnnotationsProvider=s.CustomModelProperty.createProvider({label:\"Domain annotations\",descriptor:d.CustomPropertyDescriptor({name:\"domain_annotations\"}),type:\"static\",defaultParams:t.DomainAnnotationsParams,getParams:function getParams(e){return t.DomainAnnotationsParams;},isApplicable:function isApplicable(e){return n.isApplicable(e);},obtain:function obtain(e,r,a){return i.__awaiter(void 0,void 0,void 0,function(){var o;return i.__generator(this,function(s){switch(s.label){case 0:return o=i.__assign(i.__assign({},u.ParamDefinition.getDefaultValues(t.DomainAnnotationsParams)),a),[4,n.fromServer(e,r,o)];case 1:return[2,s.sent()];}});});}});},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.PDBeDomainAnnotations=void 0;var n=r(0),i=r(407),a=r(406),o=r(2),s=r(170);t.PDBeDomainAnnotations=s.PluginBehavior.create({name:\"pdbe-domain-annotations-prop\",category:\"custom-props\",display:{name:\"Domain annotations\",description:\"Data for domain annotations, obtained via PDBe.\"},ctor:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.provider=i.DomainAnnotationsProvider,t.labelDomainAnnotations={label:function label(e){}},t;}return n.__extends(t,e),t.prototype.register=function(){this.ctx.customModelProperties.register(this.provider,this.params.autoAttach),this.ctx.managers.lociLabels.addProvider(this.labelDomainAnnotations),this.ctx.representation.structure.themes.colorThemeRegistry.add(a.DomainAnnotationsColorThemeProvider);},t.prototype.update=function(e){var t=this.params.autoAttach!==e.autoAttach;return this.params.autoAttach=e.autoAttach,this.params.showTooltip=e.showTooltip,this.ctx.customModelProperties.setDefaultAutoAttach(this.provider.descriptor.name,this.params.autoAttach),t;},t.prototype.unregister=function(){this.ctx.customModelProperties.unregister(i.DomainAnnotationsProvider.descriptor.name),this.ctx.managers.lociLabels.removeProvider(this.labelDomainAnnotations),this.ctx.representation.structure.themes.colorThemeRegistry.remove(a.DomainAnnotationsColorThemeProvider);},t;}(s.PluginBehavior.Handler),params:function params(){return{autoAttach:o.ParamDefinition.Boolean(!1),showTooltip:o.ParamDefinition.Boolean(!0)};}});},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.renderSuperposition=t.initSuperposition=void 0;var n=r(0),i=r(1),a=r(10),o=r(28),s=r(114),u=r(405),c=r(88),l=r(43),d=r(120);function f(e,t){var r=c.ColorLists,n=e.customState.superpositionState,i=n.colorState[t].palleteIndex,a=n.colorState[t].colorIndex;r[n.colorPalette[i]].list[a+1]?a+=1:(a=0,i=n.colorPalette[i+1]?i+1:0);var o=n.colorPalette[i];return e.customState.superpositionState.colorState[t].palleteIndex=i,e.customState.superpositionState.colorState[t].colorIndex=a,r[o].list[a];}function p(e,t,r){return n.__awaiter(this,void 0,void 0,function(){var o,s,u,c=this;return n.__generator(this,function(p){return o=e.customState,s=o.initParams.superpositionParams,u=!1,r.length>1&&(u=!0,o.events.isBusy.next(!0)),[2,e.dataTransaction(function(){return n.__awaiter(c,void 0,void 0,function(){var c,p,v,b,y,S,O,x,C,w,P,j,E,A,T,D,I,M,k,B,V,R,L,N,F,U,z,H,G,q,W,Q,Y,X,K,Z,J,$,ee,te,re,ne,ie,ae,oe,se,ue,ce,le,de,fe,pe,me,he,ge,ve,be,ye;return n.__generator(this,function(_e){switch(_e.label){case 0:c=e.customState.superpositionState,_e.label=1;case 1:_e.trys.push([1,41,42,47]),p=n.__asyncValues(r),_e.label=2;case 2:return[4,p.next()];case 3:return(v=_e.sent()).done?[3,40]:(b=v.value,c.matrixData[b.pdb_id+\"_\"+b.auth_asym_id]?(c.loadedStructs[t].push(b.pdb_id+\"_\"+b.struct_asym_id),y=o.initParams.pdbeUrl+\"model-server/v1/\"+b.pdb_id+\"/atoms?auth_asym_id=\"+b.auth_asym_id+\"&encoding=\"+o.initParams.encoding,s&&s.ligandView&&(y=\"https://www.ebi.ac.uk/pdbe/entry-files/download/\"+b.pdb_id+\".bcif\"),S=void 0,O=void 0,!0,s&&s.ligandView&&c.entries[b.pdb_id]?(x=e.state.data.select(c.entries[b.pdb_id])[0],O=x.transform.parent,C=e.state.data.select(O)[0],[4,e.builders.structure.createStructure(C,{name:\"model\",params:{}})]):[3,5]):(c.noMatrixStruct.push(b.pdb_id+\"_\"+b.struct_asym_id),c.invalidStruct.push(b.pdb_id+\"_\"+b.struct_asym_id),[3,39]));case 4:return S=_e.sent(),!1,[3,7];case 5:return w=\"bcif\"===o.initParams.encoding,[4,h(e,y,\"mmcif\",w)];case 6:P=_e.sent(),j=P.model,E=P.structure,S=E,O=j.ref,_e.label=7;case 7:return S?(c.models[b.pdb_id+\"_\"+b.struct_asym_id]||(c.models[b.pdb_id+\"_\"+b.struct_asym_id]=null==S?void 0:S.ref),s&&s.ligandView&&!c.entries[b.pdb_id]&&(c.entries[b.pdb_id]=null==S?void 0:S.ref),A=i.Mat4.ofRows(e.customState.superpositionState.matrixData[b.pdb_id+\"_\"+b.auth_asym_id].matrix),[4,g(e,S,A)]):[3,39];case 8:return _e.sent(),T=void 0,s&&s.ligandView&&b.is_representative?(D=f(e,t),[4,e.builders.structure.tryCreateComponentFromExpression(S,(Se=b.struct_asym_id,a.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(),Se])})),\"Chain-\"+t,{label:\"Chain\",tags:[\"superposition-sel\"]})]):[3,12];case 9:return(T=_e.sent())?[4,e.builders.structure.representation.addRepresentation(T,{type:\"putty\",color:\"uniform\",colorParams:{value:D},size:\"uniform\"},{tag:\"superposition-visual\"})]:[3,11];case 10:_e.sent(),c.refMaps[T.ref]=b.pdb_id+\"_\"+b.struct_asym_id,_e.label=11;case 11:return[3,16];case 12:return s&&s.ligandView&&!b.is_representative?[3,16]:[3,13];case 13:return I=f(e,t),[4,e.builders.structure.tryCreateComponentStatic(S,\"polymer\",{label:\"Chain\",tags:[\"Chain-\"+t,\"superposition-sel\"]})];case 14:return(T=_e.sent())?[4,e.builders.structure.representation.addRepresentation(T,{type:\"putty\",color:\"uniform\",colorParams:{value:I},size:\"uniform\"},{tag:\"superposition-visual\"})]:[3,16];case 15:_e.sent(),c.refMaps[T.ref]=b.pdb_id+\"_\"+b.struct_asym_id,_e.label=16;case 16:return M=!T,s&&s.ligandView?(k=e.state.data,[4,m(e,k,O)]):[3,39];case 17:if(B=_e.sent(),!((V=B?B.hetNames:[])&&V.length>0))return[3,31];_e.label=18;case 18:_e.trys.push([18,25,26,31]),be=void 0,R=n.__asyncValues(V),_e.label=19;case 19:return[4,R.next()];case 20:return(L=_e.sent()).done?[3,24]:(N=L.value,F=a.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),b.auth_asym_id]),\"residue-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.label_comp_id(),N]),\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()])}),fe={label:\"\"+N,tags:[\"superposition-ligand-sel\"]},U=l.Color.fromRgb(253,3,253),s&&s.ligandColor&&(z=s.ligandColor,H=z.r,G=z.g,q=z.b,U=l.Color.fromRgb(H,G,q)),[4,e.builders.structure.tryCreateComponentFromExpression(S,F,N+\"-\"+t,fe)]);case 21:return(pe=_e.sent())?[4,e.builders.structure.representation.addRepresentation(pe,{type:\"ball-and-stick\",color:\"uniform\",colorParams:{value:U}},{tag:\"superposition-ligand-visual\"})]:[3,23];case 22:_e.sent(),c.refMaps[pe.ref]=b.pdb_id+\"_\"+b.struct_asym_id,M=!1,_e.label=23;case 23:return[3,19];case 24:return[3,31];case 25:return W=_e.sent(),be={error:W},[3,31];case 26:return _e.trys.push([26,,29,30]),L&&!L.done&&(ye=R.return)?[4,ye.call(R)]:[3,28];case 27:_e.sent(),_e.label=28;case 28:return[3,30];case 29:if(be)throw be.error;return[7];case 30:return[7];case 31:return(B?B.carbEntityCount:0)>0?[4,_(e,b.pdb_id)]:[3,38];case 32:Q=_e.sent(),Y=a.MolScriptBuilder.struct.modifier.includeSurroundings({0:a.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.ammp(\"entityType\"),\"polymer\"]),\"chain-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),b.auth_asym_id]),\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()])}),radius:5,\"as-whole-residues\":!0}),X=0,K=0,Z=Q.branchedChains,_e.label=33;case 33:if(!(K<Z.length))return[3,38];if(J=Z[K],$=a.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.ammp(\"entityType\"),\"branched\"]),\"chain-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),J]),\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()])}),ee=a.MolScriptBuilder.struct.filter.intersectedBy({0:Y,by:$}),te=e.state.data.select(S.ref)[0].obj.data,!(re=d.Script.getStructureSelection(ee,te))||\"sequence\"!==re.kind)return[3,36];for(ne=[],ie={},ae=[],oe=0,se=Q.branchedLigands[X];oe<se.length;oe++)ue=se[oe],ce=ue.split(\"-\"),ne.push(a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_seq_id(),+ce[1]])),ie[ce[0]]?ie[ce[0]]++:ie[ce[0]]=1,ae.push(ce[0]);return le=function(e){var t=[];for(var r in e)t.push(r+\" (\"+e[r]+\")\");return t.join(\", \");}(ie),de=a.MolScriptBuilder.struct.generator.atomGroups({\"entity-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.ammp(\"entityType\"),\"branched\"]),\"group-by\":a.MolScriptBuilder.core.str.concat([a.MolScriptBuilder.struct.atomProperty.core.operatorName(),a.MolScriptBuilder.struct.atomProperty.macromolecular.residueKey()]),\"chain-test\":a.MolScriptBuilder.core.rel.eq([a.MolScriptBuilder.struct.atomProperty.macromolecular.auth_asym_id(),J]),\"residue-test\":a.MolScriptBuilder.core.logic.or(ne)}),fe={label:\"\"+le,tags:[\"superposition-carb-sel\"]},[4,e.builders.structure.tryCreateComponentFromExpression(S,de,ae.join(\"-\")+\"-\"+t,fe)];case 34:return(pe=_e.sent())?[4,e.builders.structure.representation.addRepresentation(pe,{type:\"carbohydrate\"},{tag:\"superposition-carb-visual\"})]:[3,36];case 35:_e.sent(),c.refMaps[pe.ref]=b.pdb_id+\"_\"+b.struct_asym_id,M=!1,_e.label=36;case 36:X++,_e.label=37;case 37:return K++,[3,33];case 38:M&&(c.invalidStruct.push(b.pdb_id+\"_\"+b.struct_asym_id),(me=c.loadedStructs[t].indexOf(b.pdb_id+\"_\"+b.struct_asym_id))>-1&&c.loadedStructs[t].splice(me,1)),_e.label=39;case 39:return[3,2];case 40:return[3,47];case 41:return he=_e.sent(),ge={error:he},[3,47];case 42:return _e.trys.push([42,,45,46]),v&&!v.done&&(ve=p.return)?[4,ve.call(p)]:[3,44];case 43:_e.sent(),_e.label=44;case 44:return[3,46];case 45:if(ge)throw ge.error;return[7];case 46:return[7];case 47:return u&&(u=!1,o.events.isBusy.next(!1)),[2];}var Se;});});})];});});}function m(e,t,r){var i;return n.__awaiter(this,void 0,void 0,function(){var a,o,s,c,l,d,f;return n.__generator(this,function(n){switch(n.label){case 0:if(!(a=t.select(r)[0])||!a.obj)return[2,void 0];if(!(o=a.obj.data))return[2];for(s=[],c=0,l=e.managers.structure.hierarchy.selection.structures;c<l.length;c++)d=l[c],(f=null===(i=d.cell.obj)||void 0===i?void 0:i.data)&&s.push(f);return[4,u.ModelInfo.get(o,s)];case 1:return[2,n.sent()];}});});}function h(e,t,r,i){return n.__awaiter(this,void 0,void 0,function(){var a,o,u,c;return n.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,e.builders.data.download({url:s.Asset.Url(t),isBinary:i})];case 1:return a=n.sent(),[4,e.builders.structure.parseTrajectory(a,r)];case 2:return o=n.sent(),[4,e.builders.structure.createModel(o)];case 3:return u=n.sent(),[4,e.builders.structure.createStructure(u,{name:\"model\",params:{}})];case 4:return c=n.sent(),[2,{data:a,trajectory:o,model:u,structure:c}];case 5:return n.sent(),[2,{structure:void 0}];case 6:return[2];}});});}function g(e,t,r){var n=e.state.data.build().to(t).insert(o.StateTransforms.Model.TransformStructureConformation,{transform:{name:\"matrix\",params:{data:r,transpose:!1}}});return e.runTask(e.state.data.updateTree(n));}function v(e){return n.__awaiter(this,void 0,void 0,function(){var t,r,i,a,o,u;return n.__generator(this,function(n){switch(n.label){case 0:t=e.customState,r=t.initParams.superpositionParams.matrixAccession?t.initParams.superpositionParams.matrixAccession:t.initParams.moleculeId,i=t.initParams.pdbeUrl+\"static/superpose/matrices/\"+r,a=e.managers.asset,o=s.Asset.getUrlAsset(a,i),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.runTask(a.resolve(o,\"json\",!1))];case 2:return(u=n.sent())&&u.data&&(e.customState.superpositionState.matrixData=u.data),[3,4];case 3:return n.sent(),t.superpositionError=\"Matrix data not available for \"+r,e.customState.events.superpositionInit.next(!0),[3,4];case 4:return[2];}});});}function b(e){return n.__awaiter(this,void 0,void 0,function(){var t,r,i,a,o;return n.__generator(this,function(n){switch(n.label){case 0:t=e.customState,r=t.initParams.pdbeUrl+\"graph-api/uniprot/superposition/\"+t.initParams.moleculeId,i=e.managers.asset,a=s.Asset.getUrlAsset(i,r),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.runTask(i.resolve(a,\"json\",!1))];case 2:return(o=n.sent())&&o.data&&(t.superpositionState.segmentData=o.data[t.initParams.moleculeId]),[3,4];case 3:return n.sent(),t.superpositionError=\"Superposition data not available for \"+t.initParams.moleculeId,e.customState.events.superpositionInit.next(!0),[3,4];case 4:return[2];}});});}function y(e){for(var t,r=[],n=[],i=[],a=[],o=0,s=e.chem_comp_list;o<s.length;o++){var u=s[o];a.push(u.chem_comp_id+\" (\"+u.count+\")\");}t=a.join(\", \");for(var c=0,l=e.chains;c<l.length;c++){var d=l[c];r.push(d.chain_id),n.push(t);for(var f=[],p=0,m=d.residues;p<m.length;p++){var h=m[p];f.push(h.chem_comp_id+\"-\"+h.residue_number);}i.push(f);}return{ligands:i,ligandChain:r,ligandLabels:n};}function _(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,i,a,o,u,c,l,d,f,p,m,h,g;return n.__generator(this,function(n){switch(n.label){case 0:r=e.customState,i=r.initParams.pdbeUrl+\"api/pdb/entry/carbohydrate_polymer/\"+t,a=e.managers.asset,o=s.Asset.getUrlAsset(a,i),u=[],c=[],l=[],n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.runTask(a.resolve(o,\"json\",!1))];case 2:if((d=n.sent())&&d.data)for(f=d.data[t],p=0,m=f;p<m.length;p++)h=m[p],g=y(h),u=u.concat(g.ligands),c=c.concat(g.ligandChain),l=l.concat(g.ligandLabels);return[3,4];case 3:return n.sent(),[3,4];case 4:return[2,{branchedChains:c,branchedLigands:u,branchedlabels:l}];}});});}t.initSuperposition=function(e){return n.__awaiter(this,void 0,void 0,function(){var t,r,i,a,o,s;return n.__generator(this,function(n){switch(n.label){case 0:return[4,e.clear()];case 1:return n.sent(),t=e.customState,r=t.initParams.superpositionParams,e.customState.superpositionState={models:{},entries:{},refMaps:{},segmentData:void 0,matrixData:{},activeSegment:0,loadedStructs:[],visibleRefs:[],invalidStruct:[],noMatrixStruct:[],hets:{},colorPalette:[\"dark-2\",\"red-yellow-green\",\"paired\",\"set-1\",\"accent\",\"set-2\",\"rainbow\"],colorState:[]},[4,b(e)];case 2:return n.sent(),(i=e.customState.superpositionState.segmentData)?[4,v(e)]:[2];case 3:return n.sent(),e.customState.superpositionState.segmentData?(i.forEach(function(){e.customState.superpositionState.loadedStructs.push([]),e.customState.superpositionState.visibleRefs.push([]),e.customState.superpositionState.colorState.push({palleteIndex:0,colorIndex:-1});}),a=r&&r.segment?r.segment-1:0,e.customState.superpositionState.activeSegment=a+1,o=r&&r.cluster?r.cluster:void 0,e.customState.events.superpositionInit.next(!0),s=[],i[a].clusters.forEach(function(e,t){o&&-1===o.indexOf(t)||(r&&r.superposeAll?s=s.concat(e):s.push(e[0]));}),[4,p(e,a,s)]):[2];case 4:return n.sent(),[2];}});});},t.renderSuperposition=p;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t._bundleLabel=t.bondLabel=t.lociDetails=void 0;var n=r(0),i=r(4),a=r(6);function o(e){switch(e.kind){case\"structure-loci\":return{models:e.structure.models.map(function(e){return e.entry;}).filter(function(e){return!!e;})};case\"element-loci\":return r=i.StructureElement.Stats.ofLoci(e),n=r.chainCount,a=r.residueCount,1===(o=r.elementCount)&&0===a&&0===n?s(r.firstElementLoc,\"element\"):0===o&&1===a&&0===n?s(r.firstResidueLoc,\"residue\"):void 0;case\"bond-loci\":var t=e.bonds[0];return t?u(t,\"element\"):\"\";default:return;}var r,n,a,o;}function s(e,t){void 0===t&&(t=\"element\");var r,a={},o=e.unit.model.entry;return o.length>30&&(o=o.substr(0,27)+\"…\"),a.entry_id=o,\"structure\"!==t&&(a.model=e.unit.model.modelNum,a.instance=e.unit.conformation.operator.name),i.Unit.isAtomic(e.unit)?r=function(e,t){var r={entity_id:i.StructureProperties.chain.label_entity_id(e),label_asym_id:i.StructureProperties.chain.label_asym_id(e),auth_asym_id:i.StructureProperties.chain.auth_asym_id(e),seq_id:i.StructureProperties.residue.label_seq_id(e),auth_seq_id:i.StructureProperties.residue.auth_seq_id(e),ins_code:i.StructureProperties.residue.pdbx_PDB_ins_code(e),comp_id:i.StructureProperties.atom.label_comp_id(e),atom_id:[i.StructureProperties.atom.label_atom_id(e)],alt_id:i.StructureProperties.atom.label_alt_id(e)},n=i.StructureProperties.residue.microheterogeneityCompIds(e);return r.micro_het_comp_ids=\"residue\"===t&&n.length>1?n:[r.comp_id],r;}(e,t):i.Unit.isCoarse(e.unit)&&(r=function(e,t){var r={asym_id:i.StructureProperties.coarse.asym_id(e),seq_id_begin:i.StructureProperties.coarse.seq_id_begin(e),seq_id_end:i.StructureProperties.coarse.seq_id_end(e)};if(\"residue\"===t&&r.seq_id_begin===r.seq_id_end){var n=i.StructureProperties.coarse.entityKey(e),a=e.unit.model.sequence.byEntityKey[n];r.comp_id=a.sequence.compId.value(r.seq_id_begin-1);}return r;}(e,t)),n.__assign(n.__assign({},a),r);}function u(e,t){return c({loci:[i.StructureElement.Loci(e.aStructure,[{unit:e.aUnit,indices:a.OrderedSet.ofSingleton(e.aIndex)}]),i.StructureElement.Loci(e.bStructure,[{unit:e.bUnit,indices:a.OrderedSet.ofSingleton(e.bIndex)}])]},t);}function c(e,t){for(var r=!0,n=0,u=e.loci;n<u.length;n++){var c=u[n];if(!i.StructureElement.Loci.is(c)||1!==i.StructureElement.Loci.size(c)){r=!1;break;}}if(r){var l,d=e.loci.map(function(e){var t=e.elements[0],r=t.unit,n=t.indices;return i.StructureElement.Location.create(e.structure,r,r.elements[a.OrderedSet.start(n)]);}).map(function(e){return s(e,t);}),f=[d[0].atom_id[0],d[1].atom_id[0]];return(l=d[0]).atom_id=f,l;}return l=e.loci.map(function(e){return o(e);});}t.lociDetails=o,t.bondLabel=u,t._bundleLabel=c;},function(e,t,r){\"use strict\";var n=r(400);r.o(n,\"CoarseHierarchy\")&&r.d(t,\"CoarseHierarchy\",function(){return n.CoarseHierarchy;});var i=r(401);r.d(t,\"CoarseHierarchy\",function(){return i.a;});},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return s;});var n=r(23),i=r(40),a=r(84),o=r(180),s=function(){function e(e,t,r,n){var s=this;void 0===n&&(n=30),this.canvasIdentify=e,this.getLoci=t,this.maxFps=n,this.ev=o.RxEventHelper.create(),this.events={hover:this.ev(),click:this.ev()},this.cX=-1,this.cY=-1,this.lastX=-1,this.lastY=-1,this.id=void 0,this.currentIdentifyT=0,this.prevLoci=i.a.Loci.Empty,this.prevT=0,this.inside=!1,this.buttons=a.a.create(0),this.button=a.a.create(0),this.modifiers=a.b.None,r.move.subscribe(function(e){var t=e.x,r=e.y,n=e.inside,i=e.buttons,a=e.button,o=e.modifiers;n&&s.move(t,r,i,a,o);}),r.leave.subscribe(function(){s.leave();}),r.click.subscribe(function(e){var t=e.x,r=e.y,n=e.buttons,i=e.button,a=e.modifiers;s.select(t,r,n,i,a);}),r.modifiers.subscribe(function(e){return s.modify(e);});}return e.prototype.identify=function(e,t){if(this.lastX===this.cX&&this.lastY===this.cY||(this.id=this.canvasIdentify(this.cX,this.cY),this.lastX=this.cX,this.lastY=this.cY),this.id)if(e)this.events.click.next({current:this.getLoci(this.id),buttons:this.buttons,button:this.button,modifiers:this.modifiers});else if(this.inside&&this.currentIdentifyT===t){var r=this.getLoci(this.id);i.a.Loci.areEqual(this.prevLoci,r)||(this.events.hover.next({current:r,buttons:this.buttons,button:this.button,modifiers:this.modifiers}),this.prevLoci=r);}},e.prototype.tick=function(e){this.inside&&e-this.prevT>1e3/this.maxFps&&(this.prevT=e,this.currentIdentifyT=e,this.identify(!1,e));},e.prototype.leave=function(){this.inside=!1,this.prevLoci.loci!==n.EmptyLoci&&(this.prevLoci=i.a.Loci.Empty,this.events.hover.next({current:this.prevLoci,buttons:this.buttons,button:this.button,modifiers:this.modifiers}));},e.prototype.move=function(e,t,r,n,i){this.inside=!0,this.buttons=r,this.button=n,this.modifiers=i,this.cX=e,this.cY=t;},e.prototype.select=function(e,t,r,n,i){this.cX=e,this.cY=t,this.buttons=r,this.button=n,this.modifiers=i,this.identify(!0,0);},e.prototype.modify=function(e){this.prevLoci.loci===n.EmptyLoci||a.b.areEqual(e,this.modifiers)||(this.modifiers=e,this.events.hover.next({current:this.prevLoci,buttons:this.buttons,button:this.button,modifiers:this.modifiers}));},e.prototype.dispose=function(){this.ev.dispose();},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return i;});var n=r(217),i=function(){function e(e,t,r,n,i,a){this.webgl=e,this.renderer=t,this.scene=r,this.camera=n,this.handleHelper=i,this.pickBaseScale=a,this.pickDirty=!0;var o=e.gl,s=o.drawingBufferWidth,u=o.drawingBufferHeight;this.pickScale=a/e.pixelRatio,this.pickWidth=Math.round(s*this.pickScale),this.pickHeight=Math.round(u*this.pickScale),this.objectPickTarget=e.createRenderTarget(this.pickWidth,this.pickHeight),this.instancePickTarget=e.createRenderTarget(this.pickWidth,this.pickHeight),this.groupPickTarget=e.createRenderTarget(this.pickWidth,this.pickHeight),this.setupBuffers();}return e.prototype.setupBuffers=function(){var e=this.pickWidth*this.pickHeight*4;this.objectBuffer&&this.objectBuffer.length===e||(this.objectBuffer=new Uint8Array(e),this.instanceBuffer=new Uint8Array(e),this.groupBuffer=new Uint8Array(e));},e.prototype.setSize=function(e,t){this.pickScale=this.pickBaseScale/this.webgl.pixelRatio,this.pickWidth=Math.round(e*this.pickScale),this.pickHeight=Math.round(t*this.pickScale),this.objectPickTarget.setSize(this.pickWidth,this.pickHeight),this.instancePickTarget.setSize(this.pickWidth,this.pickHeight),this.groupPickTarget.setSize(this.pickWidth,this.pickHeight),this.setupBuffers();},e.prototype.render=function(){var e=this.renderer,t=this.scene,r=this.camera,n=this.handleHelper.scene;e.setViewport(0,0,this.pickWidth,this.pickHeight),this.objectPickTarget.bind(),e.render(t,r,\"pickObject\",!0,!1),e.render(n,r,\"pickObject\",!1,!1),this.instancePickTarget.bind(),e.render(t,r,\"pickInstance\",!0,!1),e.render(n,r,\"pickInstance\",!1,!1),this.groupPickTarget.bind(),e.render(t,r,\"pickGroup\",!0,!1),e.render(n,r,\"pickGroup\",!1,!1),this.pickDirty=!1;},e.prototype.syncBuffers=function(){var e=this.webgl;this.objectPickTarget.bind(),e.readPixels(0,0,this.pickWidth,this.pickHeight,this.objectBuffer),this.instancePickTarget.bind(),e.readPixels(0,0,this.pickWidth,this.pickHeight,this.instanceBuffer),this.groupPickTarget.bind(),e.readPixels(0,0,this.pickWidth,this.pickHeight,this.groupBuffer);},e.prototype.getId=function(e,t,r){var i=4*(t*this.pickWidth+e);return Object(n.b)(r[i],r[i+1],r[i+2]);},e.prototype.identify=function(e,t){var r=this.webgl,n=this.pickScale;if(!r.isContextLost){var i=r.gl;this.pickDirty&&(this.render(),this.syncBuffers()),e*=r.pixelRatio,t*=r.pixelRatio,t=i.drawingBufferHeight-t;var a=Math.round(e*n),o=Math.round(t*n),s=this.getId(a,o,this.objectBuffer);if(-1!==s){var u=this.getId(a,o,this.instanceBuffer);if(-1!==u){var c=this.getId(a,o,this.groupBuffer);if(-1!==c)return{objectId:s,instanceId:u,groupId:c};}}}},e;}();},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return d;});var n=r(0),i=r(2),a=r(331),o=r(317),s=r(318),u=r(232),c=r(176),l={transparentBackground:i.ParamDefinition.Boolean(!1),multiSample:i.ParamDefinition.Group(s.a),postprocessing:i.ParamDefinition.Group(o.a),drawPass:i.ParamDefinition.Group(a.b)},d=function(){function e(e,t,r,c,d,f,p){this.renderer=t,this.camera=c,this._width=1024,this._height=768,this._camera=new u.a(),this._transparentBackground=!1;var m=Object(n.__assign)(Object(n.__assign)({},i.ParamDefinition.getDefaultValues(l)),p);this._transparentBackground=m.transparentBackground,this.drawPass=new a.a(e,t,r,this._camera,d,f,m.drawPass),this.postprocessing=new o.b(e,this._camera,this.drawPass,m.postprocessing),this.multiSample=new s.b(e,this._camera,this.drawPass,this.postprocessing,m.multiSample),this.setSize(this._width,this._height);}return Object.defineProperty(e.prototype,\"colorTarget\",{get:function get(){return this._colorTarget;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"width\",{get:function get(){return this._width;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"height\",{get:function get(){return this._height;},enumerable:!1,configurable:!0}),e.prototype.setSize=function(e,t){e===this._width&&t===this._height||(this._width=e,this._height=t,this.drawPass.setSize(e,t),this.postprocessing.setSize(e,t),this.multiSample.setSize(e,t));},e.prototype.setProps=function(e){void 0===e&&(e={}),void 0!==e.transparentBackground&&(this._transparentBackground=e.transparentBackground),e.postprocessing&&this.postprocessing.setProps(e.postprocessing),e.multiSample&&this.multiSample.setProps(e.multiSample),e.drawPass&&this.drawPass.setProps(e.drawPass);},Object.defineProperty(e.prototype,\"props\",{get:function get(){return{transparentBackground:this._transparentBackground,postprocessing:this.postprocessing.props,multiSample:this.multiSample.props,drawPass:this.drawPass.props};},enumerable:!1,configurable:!0}),e.prototype.render=function(){u.a.copySnapshot(this._camera.state,this.camera.state),c.a.set(this._camera.viewport,0,0,this._width,this._height),this._camera.update(),this.renderer.setViewport(0,0,this._width,this._height),this.multiSample.enabled?(this.multiSample.render(!1,this._transparentBackground),this._colorTarget=this.multiSample.colorTarget):(this.drawPass.render(!1,this._transparentBackground),this.postprocessing.enabled?(this.postprocessing.render(!1),this._colorTarget=this.postprocessing.target):this._colorTarget=this.drawPass.colorTarget);},e.prototype.getImageData=function(e,t){this.setSize(e,t),this.render();var r=this.colorTarget.getPixelData();return new ImageData(new Uint8ClampedArray(r.array),r.width,r.height);},e;}();},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(0),i=r(416),a=r(26),o=r(13),s=r(23),u=r(180),c=r(405),l=r(431),d=r(434),f=r(13),p=r(319),m=r(404),h=r(299),g=r(162),v=r(436),b=r(437),y=r(409),_=r(439),S=r(114),O=r(101),x=r(43),C=r(246),w=r(2),P=r(408),j=r(445),E=r(446),A=r(368),T=r(307),D=r(440),I=r(441);r(442),T.ElementSymbolColorThemeParams.carbonByChainId.defaultValue=!1;var M=function(){function e(){var e=this;this._ev=u.RxEventHelper.create(),this.events={loadComplete:this._ev()},this.assemblyRef=\"\",this.isHighlightColorUpdated=!1,this.isSelectedColorUpdated=!1,this.applyVisualParams=function(){var t={\"structure-component-static-polymer\":\"polymer\",\"structure-component-static-ligand\":\"het\",\"structure-component-static-branched\":\"carbs\",\"structure-component-static-water\":\"water\",\"structure-component-static-coarse\":\"coarse\",\"non-standard\":\"nonStandard\"};e.plugin.managers.structure.hierarchy.currentComponentGroups.forEach(function(r){var n,i=r[0].key,a=!1;if(i&&e.initParams.hideStructure){var o=t[i];o&&(null===(n=e.initParams.hideStructure)||void 0===n?void 0:n.indexOf(o))>-1&&(a=!0);}a&&e.plugin.managers.structure.hierarchy.remove(r),!a&&e.initParams.visualStyle&&r[0]&&r[0].representations&&r[0].representations.forEach(function(t){var n=g.createStructureRepresentationParams(e.plugin,void 0,{type:e.initParams.visualStyle});e.plugin.managers.structure.component.updateRepresentations(r,t,n);});});},this.canvas={toggleControls:function toggleControls(t){void 0===t&&(t=!e.plugin.layout.state.showControls),a.PluginCommands.Layout.Update(e.plugin,{state:{showControls:t}});},toggleExpanded:function toggleExpanded(t){void 0===t&&(t=!e.plugin.layout.state.isExpanded),a.PluginCommands.Layout.Update(e.plugin,{state:{isExpanded:t}});},setBgColor:function setBgColor(t){if(t){var r=e.plugin.canvas3d.props.renderer;a.PluginCommands.Canvas3D.SetSettings(e.plugin,{settings:{renderer:n.__assign(n.__assign({},r),{backgroundColor:x.Color.fromRgb(t.r,t.g,t.b)})}});}}},this.visual={highlight:function highlight(t){var r=e.getLociForParams(t.data);s.Loci.isEmpty(r)||(t.color&&e.visual.setColor({highlight:t.color}),e.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:r}),t.focus&&e.plugin.managers.camera.focusLoci(r));},clearHighlight:function clearHighlight(){return n.__awaiter(e,void 0,void 0,function(){return n.__generator(this,function(e){return this.plugin.managers.interactivity.lociHighlights.highlightOnly({loci:s.EmptyLoci}),this.isHighlightColorUpdated&&this.visual.reset({highlightColor:!0}),[2];});});},select:function select(t){return n.__awaiter(e,void 0,void 0,function(){var e,r,i,a,o,u,c,l,d,f,p,m,h,g,v,b,y,_,S,O,P,j,E,A;return n.__generator(this,function(T){switch(T.label){case 0:return this.selectedParams?[4,this.visual.clearSelection()]:[3,2];case 1:T.sent(),T.label=2;case 2:if(!t.nonSelectedColor)return[3,15];T.label=3;case 3:T.trys.push([3,9,10,15]),e=n.__asyncValues(this.plugin.managers.structure.hierarchy.current.structures),T.label=4;case 4:return[4,e.next()];case 5:return(r=T.sent()).done?[3,8]:(i=r.value,[4,this.plugin.managers.structure.component.updateRepresentationsTheme(i.components,{color:\"uniform\",colorParams:{value:this.normalizeColor(t.nonSelectedColor)}})]);case 6:T.sent(),T.label=7;case 7:return[3,4];case 8:return[3,15];case 9:return a=T.sent(),P={error:a},[3,15];case 10:return T.trys.push([10,,13,14]),r&&!r.done&&(j=e.return)?[4,j.call(e)]:[3,12];case 11:T.sent(),T.label=12;case 12:return[3,14];case 13:if(P)throw P.error;return[7];case 14:return[7];case 15:T.trys.push([15,23,24,29]),o=n.__asyncValues(t.data),T.label=16;case 16:return[4,o.next()];case 17:return(u=T.sent()).done?[3,22]:(c=u.value,l=this.getLociForParams([c]),s.Loci.isEmpty(l)?[2]:(this.visual.setColor({select:c.color?c.color:{r:255,g:112,b:3}}),this.plugin.managers.interactivity.lociSelects.selectOnly({loci:l}),d=C.StructureComponentManager.getThemeParams(this.plugin,this.plugin.managers.structure.component.pivotStructure),(f=w.ParamDefinition.getDefaultValues(d)).action.params={color:c.color?this.normalizeColor(c.color):x.Color.fromRgb(255,112,3),opacity:1},[4,this.plugin.managers.structure.component.applyTheme(f,this.plugin.managers.structure.hierarchy.current.structures)]));case 18:return T.sent(),c.sideChain||c.representation?(p=\"ball-and-stick\",c.representation&&(p=c.representation),m=C.StructureComponentManager.getAddParams(this.plugin,{allowNone:!1,hideSelection:!0,checkExisting:!0}),(h=w.ParamDefinition.getDefaultValues(m)).options={label:\"selection-by-script\",checkExisting:!0},g=n.__assign(n.__assign({},h),{representation:p}),v=this.plugin.managers.structure.hierarchy.getStructuresWithSelection(),[4,this.plugin.managers.structure.component.add(g,v)]):[3,20];case 19:T.sent(),c.representationColor&&(b=this.plugin.managers.structure.hierarchy.current.structures[0].components,y=b.length-1,_=[b[y]],S=c.representationColor?this.normalizeColor(c.representationColor):x.Color.fromRgb(255,112,3),this.plugin.managers.structure.component.updateRepresentationsTheme(_,{color:\"uniform\",colorParams:{value:S}})),t.addedRepr=!0,T.label=20;case 20:c.focus&&this.plugin.managers.camera.focusLoci(l),this.plugin.managers.interactivity.lociSelects.deselect({loci:l}),T.label=21;case 21:return[3,16];case 22:return[3,29];case 23:return O=T.sent(),E={error:O},[3,29];case 24:return T.trys.push([24,,27,28]),u&&!u.done&&(A=o.return)?[4,A.call(o)]:[3,26];case 25:T.sent(),T.label=26;case 26:return[3,28];case 27:if(E)throw E.error;return[7];case 28:return[7];case 29:return this.visual.reset({selectColor:!0}),this.selectedParams=t,[2];}});});},clearSelection:function clearSelection(){return n.__awaiter(e,void 0,void 0,function(){var e,t,r,i,o,s,u,c,l,d;return n.__generator(this,function(f){switch(f.label){case 0:return this.plugin.managers.interactivity.lociSelects.deselectAll(),this.selectedParams&&this.selectedParams.nonSelectedColor&&this.visual.reset({theme:!0}),[4,A.clearStructureOverpaint(this.plugin,this.plugin.managers.structure.hierarchy.current.structures[0].components)];case 1:if(f.sent(),!this.selectedParams||!this.selectedParams.addedRepr)return[3,15];for(e=[],t=0,r=this.plugin.managers.structure.hierarchy.current.structures[0].components;t<r.length;t++)(i=r[t]).cell&&i.cell.params&&i.cell.params.values&&\"selection-by-script\"===i.cell.params.values.label&&e.push(i.cell);if(!(e.length>0))return[3,15];f.label=2;case 2:f.trys.push([2,8,9,14]),o=n.__asyncValues(e),f.label=3;case 3:return[4,o.next()];case 4:return(s=f.sent()).done?[3,7]:(u=s.value,[4,a.PluginCommands.State.RemoveObject(this.plugin,{state:u.parent,ref:u.transform.ref})]);case 5:f.sent(),f.label=6;case 6:return[3,3];case 7:return[3,14];case 8:return c=f.sent(),l={error:c},[3,14];case 9:return f.trys.push([9,,12,13]),s&&!s.done&&(d=o.return)?[4,d.call(o)]:[3,11];case 10:f.sent(),f.label=11;case 11:return[3,13];case 12:if(l)throw l.error;return[7];case 13:return[7];case 14:f.label=15;case 15:return this.selectedParams=void 0,[2];}});});},update:function update(t,r){return n.__awaiter(e,void 0,void 0,function(){var e,a;return n.__generator(this,function(o){if(!t)return[2];for(e in this.initParams=n.__assign({},i.DefaultParams),i.DefaultParams)void 0!==t[e]&&(this.initParams[e]=t[e]);return this.initParams.moleculeId||this.initParams.customData?this.initParams.customData&&this.initParams.customData.url&&!this.initParams.customData.format?[2,!1]:(this.plugin.customState.initParams=this.initParams,this.initParams.bgColor&&this.canvas.setBgColor(this.initParams.bgColor),(a=this.getMoleculeSrcUrl())&&this.load({url:a.url,format:a.format,assemblyId:this.initParams.assemblyId,isBinary:a.isBinary},r),[2]):[2,!1];});});},visibility:function visibility(t){if(t){var r={polymer:\"structure-component-static-polymer\",het:\"structure-component-static-ligand\",water:\"structure-component-static-water\",carbs:\"structure-component-static-branched\",maps:\"volume-streaming-info\"};for(var n in t){var i=r[n],s=f.StateSelection.findTagInSubtree(e.plugin.state.data.tree,o.StateTransform.RootRef,i);if(s){var u=e.plugin.state.data.select(s)[0];if(u&&u.obj){var c=!u.state||!u.state.isHidden;t[n]!==c&&a.PluginCommands.State.ToggleVisibility(e.plugin,{state:e.state,ref:s});}}}}},toggleSpin:function toggleSpin(t,r){if(e.plugin.canvas3d){var i=e.plugin.canvas3d.props.trackball;void 0===t&&(t=!i.spin),a.PluginCommands.Canvas3D.SetSettings(e.plugin,{settings:{trackball:n.__assign(n.__assign({},i),{spin:t})}}),r&&a.PluginCommands.Camera.Reset(e.plugin,{});}},focus:function focus(t){return n.__awaiter(e,void 0,void 0,function(){var e;return n.__generator(this,function(r){return e=this.getLociForParams(t),this.plugin.managers.camera.focusLoci(e),[2];});});},setColor:function setColor(t){if(e.plugin.canvas3d){var r=e.plugin.canvas3d.props.renderer,i={};t.highlight&&(i.highlightColor=e.normalizeColor(t.highlight)),t.select&&(i.selectColor=e.normalizeColor(t.select)),a.PluginCommands.Canvas3D.SetSettings(e.plugin,{settings:{renderer:n.__assign(n.__assign({},r),i)}}),i.highlightColor&&(e.isHighlightColorUpdated=!0);}},reset:function reset(t){return n.__awaiter(e,void 0,void 0,function(){var e,r,i=this;return n.__generator(this,function(o){switch(o.label){case 0:return t.camera?[4,a.PluginCommands.Camera.Reset(this.plugin,{durationMs:250})]:[3,2];case 1:o.sent(),o.label=2;case 2:if(t.theme&&this.plugin.managers.structure.hierarchy.currentComponentGroups.forEach(function(e){i.plugin.managers.structure.component.updateRepresentationsTheme(e,{color:\"default\"});}),t.highlightColor||t.selectColor){if(!this.plugin.canvas3d)return[2];e=this.plugin.canvas3d.props.renderer,r={},t.highlightColor&&(r.highlightColor=this.defaultRendererProps.highlightColor),t.selectColor&&(r.selectColor=this.defaultRendererProps.selectColor),a.PluginCommands.Canvas3D.SetSettings(this.plugin,{settings:{renderer:n.__assign(n.__assign({},e),r)}}),r.highlightColor&&(this.isHighlightColorUpdated=!1);}return[2];}});});}};}return e.prototype.render=function(e,t){if(t){for(var r in this.initParams=n.__assign({},i.DefaultParams),i.DefaultParams)void 0!==t[r]&&(this.initParams[r]=t[r]);if(!this.initParams.moleculeId&&!this.initParams.customData)return!1;if(this.initParams.customData&&this.initParams.customData.url&&!this.initParams.customData.format)return!1;var o={actions:n.__spreadArrays(i.DefaultPluginSpec.actions),behaviors:n.__spreadArrays(i.DefaultPluginSpec.behaviors),animations:n.__spreadArrays(i.DefaultPluginSpec.animations||[]),customParamEditors:i.DefaultPluginSpec.customParamEditors,config:i.DefaultPluginSpec.config};if(this.initParams.ligandView||this.initParams.superposition||!this.initParams.selectInteraction||o.behaviors.push(m.PluginSpec.Behavior(p.StructureFocusRepresentation)),this.initParams.superposition){o.behaviors.push(m.PluginSpec.Behavior(D.SuperpositionFocusRepresentation));}if(this.initParams.domainAnnotation&&o.behaviors.push(m.PluginSpec.Behavior(P.PDBeDomainAnnotations,{autoAttach:!0,showTooltip:!1})),this.initParams.validationAnnotation&&o.behaviors.push(m.PluginSpec.Behavior(j.PDBeStructureQualityReport,{autoAttach:!0,showTooltip:!1})),o.layout={initial:{isExpanded:!this.initParams.landscape&&this.initParams.expanded,showControls:!this.initParams.hideControls},controls:{left:b.LeftPanelControls,top:\"none\",bottom:\"none\"}},o.components={viewport:{controls:d.PDBeViewportControls,view:this.initParams.superposition?I.SuperpostionViewport:void 0},remoteState:\"none\",structureTools:this.initParams.superposition?l.PDBeSuperpositionStructureTools:this.initParams.ligandView?l.PDBeLigandViewStructureTools:l.PDBeStructureTools},o.config=[[O.PluginConfig.Structure.DefaultRepresentationPresetParams,{theme:{carbonByChainId:!1,focus:{name:\"element-symbol\",params:{carbonByChainId:!1}}}}]],this.initParams.ligandView||this.initParams.superposition||(o.animations=[E.AnimateModelIndex]),this.initParams.hideCanvasControls&&(this.initParams.hideCanvasControls.indexOf(\"expand\")>-1&&o.config.push([O.PluginConfig.Viewport.ShowExpand,!1]),this.initParams.hideCanvasControls.indexOf(\"selection\")>-1&&o.config.push([O.PluginConfig.Viewport.ShowSelectionMode,!1]),this.initParams.hideCanvasControls.indexOf(\"animation\")>-1&&o.config.push([O.PluginConfig.Viewport.ShowAnimation,!1])),this.initParams.landscape&&o.layout&&o.layout.initial&&(o.layout.initial.controlsDisplay=\"landscape\"),this.targetElement=\"string\"==typeof e?document.getElementById(e):e,this.plugin=i.createPlugin(this.targetElement,o),this.plugin.customState.initParams=n.__assign({},this.initParams),this.plugin.customState.events={segmentUpdate:this._ev(),superpositionInit:this._ev(),isBusy:this._ev()},this.initParams.bgColor&&this.canvas.setBgColor(this.initParams.bgColor),this.initParams.granularity&&this.plugin.managers.interactivity.setProps({granularity:this.initParams.granularity}),(this.initParams.highlightColor||this.initParams.selectColor)&&this.visual.setColor({highlight:this.initParams.highlightColor,select:this.initParams.selectColor}),this.defaultRendererProps=n.__assign({},this.plugin.canvas3d.props.renderer),this.initParams.superposition)this.plugin.behaviors.layout.leftPanelTabName.next(\"segments\"),y.initSuperposition(this.plugin);else{a.PluginCommands.Layout.Update(this.plugin,{state:{regionState:n.__assign(n.__assign({},this.plugin.layout.state.regionState),{left:\"collapsed\"})}}),this.plugin.behaviors.layout.leftPanelTabName.next(\"none\");var s=this.getMoleculeSrcUrl();s&&this.load({url:s.url,format:s.format,assemblyId:this.initParams.assemblyId,isBinary:s.isBinary}),this.initParams.subscribeEvents&&v.subscribeToComponentEvents(this),_.CustomEvents.add(this.plugin,this.targetElement);}}},e.prototype.getMoleculeSrcUrl=function(){var e=this.initParams.moleculeId;if(!e&&!this.initParams.customData)throw new Error(\"Mandatory parameters missing!\");var t=\"full\",r=\"?\";if(this.initParams.ligandView){var n=[\"data_source=pdb-h\"];this.initParams.ligandView.label_comp_id_list||(this.initParams.ligandView.label_comp_id?n.push(\"label_comp_id=\"+this.initParams.ligandView.label_comp_id):this.initParams.ligandView.auth_seq_id&&n.push(\"auth_seq_id=\"+this.initParams.ligandView.auth_seq_id),this.initParams.ligandView.auth_asym_id&&n.push(\"auth_asym_id=\"+this.initParams.ligandView.auth_asym_id)),t=\"residueSurroundings?\"+n.join(\"&\"),r=\"&\";}var i=this.initParams.pdbeUrl+\"model-server/v1/\"+e+\"/\"+t+r+\"encoding=\"+this.initParams.encoding+(this.initParams.lowPrecisionCoords?\"&lowPrecisionCoords=1\":\"\"),a=\"bcif\"===this.initParams.encoding,o=\"mmcif\";if(this.initParams.customData){if(!this.initParams.customData.url||!this.initParams.customData.format)throw new Error(\"Provide all custom data parameters\");if(i=this.initParams.customData.url,\"cif\"!==(o=this.initParams.customData.format)&&\"bcif\"!==o||(o=\"mmcif\"),-1===[\"mmcif\",\"pdb\",\"sdf\"].indexOf(o))throw new Error(o+\" not supported.\");a=!!this.initParams.customData.binary&&this.initParams.customData.binary;}return{url:i,format:o,isBinary:a};},Object.defineProperty(e.prototype,\"state\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),e.prototype.createLigandStructure=function(e){var t,r,i;return n.__awaiter(this,void 0,void 0,function(){var s,u,l,d,p,m,h,g,v,b,y,_=this;return n.__generator(this,function(S){switch(S.label){case 0:if(\"\"===this.assemblyRef)return[2];S.label=1;case 1:S.trys.push([1,7,8,13]),s=n.__asyncValues(this.plugin.managers.structure.hierarchy.currentComponentGroups),S.label=2;case 2:return[4,s.next()];case 3:return(u=S.sent()).done?[3,6]:(l=u.value,[4,a.PluginCommands.State.RemoveObject(this.plugin,{state:l[0].cell.parent,ref:l[0].cell.transform.ref,removeParentGhosts:!0})]);case 4:S.sent(),S.label=5;case 5:return[3,2];case 6:return[3,13];case 7:return d=S.sent(),t={error:d},[3,13];case 8:return S.trys.push([8,,11,12]),u&&!u.done&&(r=s.return)?[4,r.call(s)]:[3,10];case 9:S.sent(),S.label=10;case 10:return[3,12];case 11:if(t)throw t.error;return[7];case 12:return[7];case 13:return p=this.state.select(this.assemblyRef)[0],m=e?c.LigandView.branchedQuery(null===(i=this.initParams.ligandView)||void 0===i?void 0:i.label_comp_id_list):c.LigandView.query(this.initParams.ligandView),[4,this.plugin.builders.structure.tryCreateComponentFromExpression(p,m.core,\"pivot\",{label:\"Ligand\"})];case 14:return(h=S.sent())?[4,this.plugin.builders.structure.representation.addRepresentation(h,{type:\"ball-and-stick\",color:\"element-symbol\",colorParams:{carbonByChainId:!1},size:\"uniform\",sizeParams:{value:2.5}},{tag:\"ligand-vis\"})]:[3,16];case 15:S.sent(),S.label=16;case 16:return[4,this.plugin.builders.structure.tryCreateComponentFromExpression(p,m.surroundings,\"rest\",{label:\"Surroundings\"})];case 17:return(g=S.sent())?[4,this.plugin.builders.structure.representation.addRepresentation(g,{type:\"ball-and-stick\",color:\"element-symbol\",colorParams:{carbonByChainId:!1},size:\"uniform\",sizeParams:{value:.8}})]:[3,19];case 18:S.sent(),S.label=19;case 19:return(v=f.StateSelection.findTagInSubtree(this.plugin.state.data.tree,o.StateTransform.RootRef,\"ligand-vis\"))?((b=this.plugin.state.data.cells.get(v))&&(y=b.obj.data.repr.getLoci(),this.plugin.managers.structure.focus.setFromLoci(y),setTimeout(function(){var e,t=null===(e=_.plugin.managers.structure.focus.current)||void 0===e?void 0:e.loci;t&&_.plugin.managers.camera.focusLoci(t);},500)),[2]):[2];}});});},e.prototype.load=function(e,t){var r=e.url,i=e.format,a=void 0===i?\"mmcif\":i,o=e.isBinary,s=void 0!==o&&o,u=e.assemblyId,l=void 0===u?\"\":u;return void 0===t&&(t=!0),n.__awaiter(this,void 0,void 0,function(){var e,i,o,u,d,f,p,m,g,v,b;return n.__generator(this,function(n){switch(n.label){case 0:return t&&this.clear(),e=!!this.initParams.ligandView,i=void 0,o=!1,this.initParams.ligandView&&this.initParams.ligandView.label_comp_id_list&&(o=!0,i={body:JSON.stringify(this.initParams.ligandView.label_comp_id_list),headers:[[\"Content-type\",\"application/json\"]]}),[4,this.plugin.builders.data.download({url:S.Asset.Url(r,i),isBinary:s},{state:{isGhost:!0}})];case 1:return u=n.sent(),[4,this.plugin.builders.structure.parseTrajectory(u,a)];case 2:return d=n.sent(),e?[3,4]:[4,this.plugin.builders.structure.hierarchy.applyPreset(d,\"default\",{structure:l?\"preferred\"===l?void 0:{name:\"assembly\",params:{id:l}}:{name:\"model\",params:{}},showUnitcell:!1,representationPreset:\"auto\"})];case 3:return n.sent(),(this.initParams.hideStructure||this.initParams.visualStyle)&&this.applyVisualParams(),[3,7];case 4:return[4,this.plugin.builders.structure.createModel(d)];case 5:return f=n.sent(),[4,this.plugin.builders.structure.createStructure(f,{name:\"model\",params:{}})];case 6:n.sent(),n.label=7;case 7:return this.initParams.selection&&this.visual.select(this.initParams.selection),p=this.plugin.managers.structure.hierarchy.selection.structures.length-1,(m=this.plugin.managers.structure.hierarchy.selection.structures[p])&&m.cell.parent&&(this.assemblyRef=m.cell.transform.ref),this.initParams.loadMaps?\"\"===this.assemblyRef?[2]:(g=this.state.select(this.assemblyRef)[0].obj,v=h.InitVolumeStreaming.createDefaultParams(g,this.plugin),(b=c.PDBeVolumes.mapParams(v,this.initParams.mapSettings,\"\"))?[4,this.plugin.runTask(this.state.applyAction(h.InitVolumeStreaming,b,this.assemblyRef))]:[3,9]):[3,9];case 8:n.sent(),\"em\"===b.method||this.initParams.ligandView||c.PDBeVolumes.displayUsibilityMessage(this.plugin),n.label=9;case 9:return e?[4,this.createLigandStructure(o)]:[3,11];case 10:n.sent(),n.label=11;case 11:return this.events.loadComplete.next(!0),[2];}});});},e.prototype.getLociForParams=function(e){if(\"\"===this.assemblyRef)return s.EmptyLoci;var t=this.plugin.state.data.select(this.assemblyRef)[0].obj.data;return t?c.QueryHelper.getInteractivityLoci(e,t):s.EmptyLoci;},e.prototype.normalizeColor=function(e,t){var r=x.Color.fromRgb(170,170,170);try{r=e.r?x.Color.fromRgb(e.r,e.g,e.b):\"#\"===e[0]?x.Color(Number(\"0x\"+e.substr(1))):x.Color(e);}catch(e){t&&(r=t);}return r;},e.prototype.clear=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return this.plugin.clear(),this.assemblyRef=\"\",this.selectedParams=void 0,this.isHighlightColorUpdated=!1,this.isSelectedColorUpdated=!1,[2];});});},e;}();window.PDBeMolstarPlugin=M;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.DefaultParams=t.createPlugin=t.DefaultPluginSpec=void 0;var n=r(0),i=n.__importStar(r(3)),a=n.__importStar(r(418)),o=r(422),s=r(444),u=r(170),c=r(299),l=r(443),d=r(404),f=r(101),p=r(430);t.DefaultPluginSpec={actions:[],behaviors:[d.PluginSpec.Behavior(u.PluginBehaviors.Representation.HighlightLoci),d.PluginSpec.Behavior(u.PluginBehaviors.Representation.SelectLoci),d.PluginSpec.Behavior(p.PDBeLociLabelProvider),d.PluginSpec.Behavior(u.PluginBehaviors.Representation.FocusLoci),d.PluginSpec.Behavior(u.PluginBehaviors.Camera.FocusLoci),d.PluginSpec.Behavior(u.PluginBehaviors.CustomProps.AccessibleSurfaceArea),d.PluginSpec.Behavior(u.PluginBehaviors.CustomProps.Interactions),d.PluginSpec.Behavior(u.PluginBehaviors.CustomProps.SecondaryStructure),d.PluginSpec.Behavior(u.PluginBehaviors.CustomProps.ValenceModel),d.PluginSpec.Behavior(u.PluginBehaviors.CustomProps.CrossLinkRestraint)],customParamEditors:[[c.CreateVolumeStreamingBehavior,o.VolumeStreamingCustomControls]],config:[[f.PluginConfig.VolumeStreaming.DefaultServer,\"https://www.ebi.ac.uk/pdbe/densities\"]]},t.createPlugin=function(e,r){var n=new l.PluginContext(r||t.DefaultPluginSpec);return a.render(i.createElement(s.Plugin,{plugin:n}),e),n;},t.DefaultParams={moleculeId:void 0,superposition:void 0,superpositionParams:void 0,customData:void 0,ligandView:void 0,assemblyId:void 0,visualStyle:void 0,highlightColor:void 0,selectColor:void 0,hideStructure:void 0,hideCanvasControls:void 0,granularity:void 0,selection:void 0,mapSettings:void 0,pdbeUrl:\"https://www.ebi.ac.uk/pdbe/\",bgColor:{r:0,g:0,b:0},encoding:\"bcif\",selectInteraction:!0,loadMaps:!1,validationAnnotation:!1,domainAnnotation:!1,lowPrecisionCoords:!1,expanded:!1,hideControls:!1,pdbeLink:!0,loadCartoonsOnly:!1,landscape:!1,subscribeEvents:!1};},function(e,t,r){\"use strict\";/** @license React v16.13.1\r\n * react.production.min.js\r\n *\r\n * Copyright (c) Facebook, Inc. and its affiliates.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */var n=r(397),i=\"function\"==typeof Symbol&&Symbol.for,a=i?Symbol.for(\"react.element\"):60103,o=i?Symbol.for(\"react.portal\"):60106,s=i?Symbol.for(\"react.fragment\"):60107,u=i?Symbol.for(\"react.strict_mode\"):60108,c=i?Symbol.for(\"react.profiler\"):60114,l=i?Symbol.for(\"react.provider\"):60109,d=i?Symbol.for(\"react.context\"):60110,f=i?Symbol.for(\"react.forward_ref\"):60112,p=i?Symbol.for(\"react.suspense\"):60113,m=i?Symbol.for(\"react.memo\"):60115,h=i?Symbol.for(\"react.lazy\"):60116,g=\"function\"==typeof Symbol&&Symbol.iterator;function v(e){for(var t=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+e,r=1;r<arguments.length;r++)t+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+e+\"; visit \"+t+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";}var b={isMounted:function isMounted(){return!1;},enqueueForceUpdate:function enqueueForceUpdate(){},enqueueReplaceState:function enqueueReplaceState(){},enqueueSetState:function enqueueSetState(){}},y={};function _(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||b;}function S(){}function O(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||b;}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(\"object\"!=typeof_default()(e)&&\"function\"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,\"setState\");},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\");},S.prototype=_.prototype;var x=O.prototype=new S();x.constructor=O,n(x,_.prototype),x.isPureReactComponent=!0;var C={current:null},w=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=\"\"+t.key),t)w.call(t,n)&&!P.hasOwnProperty(n)&&(i[n]=t[n]);var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c;}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===i[n]&&(i[n]=u[n]);return{$$typeof:a,type:e,key:o,ref:s,props:i,_owner:C.current};}function E(e){return\"object\"==typeof_default()(e)&&null!==e&&e.$$typeof===a;}var A=/\\/+/g,T=[];function D(e,t,r,n){if(T.length){var i=T.pop();return i.result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i;}return{result:e,keyPrefix:t,func:r,context:n,count:0};}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>T.length&&T.push(e);}function M(e,t,r){return null==e?0:function e(t,r,n,i){var s=typeof_default()(t);\"undefined\"!==s&&\"boolean\"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case\"string\":case\"number\":u=!0;break;case\"object\":switch(t.$$typeof){case a:case o:u=!0;}}if(u)return n(i,t,\"\"===r?\".\"+k(t,0):r),1;if(u=0,r=\"\"===r?\".\":r+\":\",Array.isArray(t))for(var c=0;c<t.length;c++){var l=r+k(s=t[c],c);u+=e(s,l,n,i);}else if(null===t||\"object\"!=typeof_default()(t)?l=null:l=\"function\"==typeof(l=g&&t[g]||t[\"@@iterator\"])?l:null,\"function\"==typeof l)for(t=l.call(t),c=0;!(s=t.next()).done;)u+=e(s=s.value,l=r+k(s,c++),n,i);else if(\"object\"===s)throw n=\"\"+t,Error(v(31,\"[object Object]\"===n?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":n,\"\"));return u;}(e,\"\",t,r);}function k(e,t){return\"object\"==typeof_default()(e)&&null!==e&&null!=e.key?function(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+e).replace(/[=:]/g,function(e){return t[e];});}(e.key):t.toString(36);}function B(e,t){e.func.call(e.context,t,e.count++);}function V(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?R(e,n,r,function(e){return e;}):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner};}(e,i+(!e.key||t&&t.key===e.key?\"\":(\"\"+e.key).replace(A,\"$&/\")+\"/\")+r)),n.push(e));}function R(e,t,r,n,i){var a=\"\";null!=r&&(a=(\"\"+r).replace(A,\"$&/\")+\"/\"),M(e,V,t=D(t,a,n,i)),I(t);}var L={current:null};function N(){var e=L.current;if(null===e)throw Error(v(321));return e;}var F={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:function map(e,t,r){if(null==e)return e;var n=[];return R(e,n,null,t,r),n;},forEach:function forEach(e,t,r){if(null==e)return e;M(e,B,t=D(null,null,t,r)),I(t);},count:function count(e){return M(e,function(){return null;},null);},toArray:function toArray(e){var t=[];return R(e,t,null,function(e){return e;}),t;},only:function only(e){if(!E(e))throw Error(v(143));return e;}},t.Component=_,t.Fragment=s,t.Profiler=c,t.PureComponent=O,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.cloneElement=function(e,t,r){if(null==e)throw Error(v(267,e));var i=n({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=C.current),void 0!==t.key&&(o=\"\"+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!P.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l]);}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){c=Array(l);for(var d=0;d<l;d++)c[d]=arguments[d+2];i.children=c;}return{$$typeof:a,type:e.type,key:o,ref:s,props:i,_owner:u};},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e;},t.createElement=j,t.createFactory=function(e){var t=j.bind(null,e);return t.type=e,t;},t.createRef=function(){return{current:null};},t.forwardRef=function(e){return{$$typeof:f,render:e};},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null};},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t};},t.useCallback=function(e,t){return N().useCallback(e,t);},t.useContext=function(e,t){return N().useContext(e,t);},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t);},t.useImperativeHandle=function(e,t,r){return N().useImperativeHandle(e,t,r);},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t);},t.useMemo=function(e,t){return N().useMemo(e,t);},t.useReducer=function(e,t,r){return N().useReducer(e,t,r);},t.useRef=function(e){return N().useRef(e);},t.useState=function(e){return N().useState(e);},t.version=\"16.13.1\";},function(e,t,r){\"use strict\";!function e(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);}catch(e){console.error(e);}}}(),e.exports=r(419);},function(e,t,r){\"use strict\";/** @license React v16.13.1\r\n * react-dom.production.min.js\r\n *\r\n * Copyright (c) Facebook, Inc. and its affiliates.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */var n=r(3),i=r(397),a=r(420);function o(e){for(var t=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+e,r=1;r<arguments.length;r++)t+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+e+\"; visit \"+t+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";}if(!n)throw Error(o(227));function s(e,t,r,n,i,a,o,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c);}catch(e){this.onError(e);}}var u=!1,c=null,l=!1,d=null,f={onError:function onError(e){u=!0,c=e;}};function p(e,t,r,n,i,a,o,l,d){u=!1,c=null,s.apply(f,arguments);}var m=null,h=null,g=null;function v(e,t,r){var n=e.type||\"unknown-event\";e.currentTarget=g(r),function(e,t,r,n,i,a,s,f,m){if(p.apply(this,arguments),u){if(!u)throw Error(o(198));var h=c;u=!1,c=null,l||(l=!0,d=h);}}(n,t,void 0,e),e.currentTarget=null;}var b=null,y={};function _(){if(b)for(var e in y){var t=y[e],r=b.indexOf(e);if(!(-1<r))throw Error(o(96,e));if(!O[r]){if(!t.extractEvents)throw Error(o(97,e));for(var n in O[r]=t,r=t.eventTypes){var i=void 0,a=r[n],s=t,u=n;if(x.hasOwnProperty(u))throw Error(o(99,u));x[u]=a;var c=a.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&S(c[i],s,u);i=!0;}else a.registrationName?(S(a.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(o(98,n,e));}}}}function S(e,t,r){if(C[e])throw Error(o(100,e));C[e]=t,w[e]=t.eventTypes[r].dependencies;}var O=[],x={},C={},w={};function P(e){var t,r=!1;for(t in e)if(e.hasOwnProperty(t)){var n=e[t];if(!y.hasOwnProperty(t)||y[t]!==n){if(y[t])throw Error(o(102,t));y[t]=n,r=!0;}}r&&_();}var j=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),E=null,A=null,T=null;function D(e){if(e=h(e)){if(\"function\"!=typeof E)throw Error(o(280));var t=e.stateNode;t&&(t=m(t),E(e.stateNode,e.type,t));}}function I(e){A?T?T.push(e):T=[e]:A=e;}function M(){if(A){var e=A,t=T;if(T=A=null,D(e),t)for(e=0;e<t.length;e++)D(t[e]);}}function k(e,t){return e(t);}function B(e,t,r,n,i){return e(t,r,n,i);}function V(){}var R=k,L=!1,N=!1;function F(){null===A&&null===T||(V(),M());}function U(e,t,r){if(N)return e(t,r);N=!0;try{return R(e,t,r);}finally{N=!1,F();}}var z=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,H=Object.prototype.hasOwnProperty,G={},q={};function W(e,t,r,n,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a;}var Q={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(e){Q[e]=new W(e,0,!1,e,null,!1);}),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(e){var t=e[0];Q[t]=new W(t,1,!1,e[1],null,!1);}),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(e){Q[e]=new W(e,2,!1,e.toLowerCase(),null,!1);}),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(e){Q[e]=new W(e,2,!1,e,null,!1);}),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(e){Q[e]=new W(e,3,!1,e.toLowerCase(),null,!1);}),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(e){Q[e]=new W(e,3,!0,e,null,!1);}),[\"capture\",\"download\"].forEach(function(e){Q[e]=new W(e,4,!1,e,null,!1);}),[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(e){Q[e]=new W(e,6,!1,e,null,!1);}),[\"rowSpan\",\"start\"].forEach(function(e){Q[e]=new W(e,5,!1,e.toLowerCase(),null,!1);});var Y=/[\\-:]([a-z])/g;function X(e){return e[1].toUpperCase();}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(e){var t=e.replace(Y,X);Q[t]=new W(t,1,!1,e,null,!1);}),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(e){var t=e.replace(Y,X);Q[t]=new W(t,1,!1,e,\"http://www.w3.org/1999/xlink\",!1);}),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(e){var t=e.replace(Y,X);Q[t]=new W(t,1,!1,e,\"http://www.w3.org/XML/1998/namespace\",!1);}),[\"tabIndex\",\"crossOrigin\"].forEach(function(e){Q[e]=new W(e,1,!1,e.toLowerCase(),null,!1);}),Q.xlinkHref=new W(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0),[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(e){Q[e]=new W(e,1,!1,e.toLowerCase(),null,!0);});var K=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Z(e,t,r,n){var i=Q.hasOwnProperty(t)?Q[t]:null;(null!==i?0===i.type:!n&&2<t.length&&(\"o\"===t[0]||\"O\"===t[0])&&(\"n\"===t[1]||\"N\"===t[1]))||(function(e,t,r,n){if(null==t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof_default()(t)){case\"function\":case\"symbol\":return!0;case\"boolean\":return!n&&(null!==r?!r.acceptsBooleans:\"data-\"!==(e=e.toLowerCase().slice(0,5))&&\"aria-\"!==e);default:return!1;}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t;}return!1;}(t,r,i,n)&&(r=null),n||null===i?function(e){return!!H.call(q,e)||!H.call(G,e)&&(z.test(e)?q[e]=!0:(G[e]=!0,!1));}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,\"\"+r)):i.mustUseProperty?e[i.propertyName]=null===r?3!==i.type&&\"\":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(i=i.type)||4===i&&!0===r?\"\":\"\"+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))));}K.hasOwnProperty(\"ReactCurrentDispatcher\")||(K.ReactCurrentDispatcher={current:null}),K.hasOwnProperty(\"ReactCurrentBatchConfig\")||(K.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\\\\/]/,$=\"function\"==typeof Symbol&&Symbol.for,ee=$?Symbol.for(\"react.element\"):60103,te=$?Symbol.for(\"react.portal\"):60106,re=$?Symbol.for(\"react.fragment\"):60107,ne=$?Symbol.for(\"react.strict_mode\"):60108,ie=$?Symbol.for(\"react.profiler\"):60114,ae=$?Symbol.for(\"react.provider\"):60109,oe=$?Symbol.for(\"react.context\"):60110,se=$?Symbol.for(\"react.concurrent_mode\"):60111,ue=$?Symbol.for(\"react.forward_ref\"):60112,ce=$?Symbol.for(\"react.suspense\"):60113,le=$?Symbol.for(\"react.suspense_list\"):60120,de=$?Symbol.for(\"react.memo\"):60115,fe=$?Symbol.for(\"react.lazy\"):60116,pe=$?Symbol.for(\"react.block\"):60121,me=\"function\"==typeof Symbol&&Symbol.iterator;function he(e){return null===e||\"object\"!=typeof_default()(e)?null:\"function\"==typeof(e=me&&e[me]||e[\"@@iterator\"])?e:null;}function ge(e){if(null==e)return null;if(\"function\"==typeof e)return e.displayName||e.name||null;if(\"string\"==typeof e)return e;switch(e){case re:return\"Fragment\";case te:return\"Portal\";case ie:return\"Profiler\";case ne:return\"StrictMode\";case ce:return\"Suspense\";case le:return\"SuspenseList\";}if(\"object\"==typeof_default()(e))switch(e.$$typeof){case oe:return\"Context.Consumer\";case ae:return\"Context.Provider\";case ue:var t=e.render;return t=t.displayName||t.name||\"\",e.displayName||(\"\"!==t?\"ForwardRef(\"+t+\")\":\"ForwardRef\");case de:return ge(e.type);case pe:return ge(e.render);case fe:if(e=1===e._status?e._result:null)return ge(e);}return null;}function ve(e){var t=\"\";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var r=\"\";break e;default:var n=e._debugOwner,i=e._debugSource,a=ge(e.type);r=null,n&&(r=ge(n.type)),n=a,a=\"\",i?a=\" (at \"+i.fileName.replace(J,\"\")+\":\"+i.lineNumber+\")\":r&&(a=\" (created by \"+r+\")\"),r=\"\\n    in \"+(n||\"Unknown\")+a;}t+=r,e=e.return;}while(e);return t;}function be(e){switch(typeof_default()(e)){case\"boolean\":case\"number\":case\"object\":case\"string\":case\"undefined\":return e;default:return\"\";}}function ye(e){var t=e.type;return(e=e.nodeName)&&\"input\"===e.toLowerCase()&&(\"checkbox\"===t||\"radio\"===t);}function _e(e){e._valueTracker||(e._valueTracker=function(e){var t=ye(e)?\"checked\":\"value\",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=\"\"+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&\"function\"==typeof r.get&&\"function\"==typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function get(){return i.call(this);},set:function set(e){n=\"\"+e,a.call(this,e);}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function getValue(){return n;},setValue:function setValue(e){n=\"\"+e;},stopTracking:function stopTracking(){e._valueTracker=null,delete e[t];}};}}(e));}function Se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n=\"\";return e&&(n=ye(e)?e.checked?\"true\":\"false\":e.value),(e=n)!==r&&(t.setValue(e),!0);}function Oe(e,t){var r=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked});}function xe(e,t){var r=null==t.defaultValue?\"\":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=be(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:\"checkbox\"===t.type||\"radio\"===t.type?null!=t.checked:null!=t.value};}function Ce(e,t){null!=(t=t.checked)&&Z(e,\"checked\",t,!1);}function we(e,t){Ce(e,t);var r=be(t.value),n=t.type;if(null!=r)\"number\"===n?(0===r&&\"\"===e.value||e.value!=r)&&(e.value=\"\"+r):e.value!==\"\"+r&&(e.value=\"\"+r);else if(\"submit\"===n||\"reset\"===n)return void e.removeAttribute(\"value\");t.hasOwnProperty(\"value\")?je(e,t.type,r):t.hasOwnProperty(\"defaultValue\")&&je(e,t.type,be(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked);}function Pe(e,t,r){if(t.hasOwnProperty(\"value\")||t.hasOwnProperty(\"defaultValue\")){var n=t.type;if(!(\"submit\"!==n&&\"reset\"!==n||void 0!==t.value&&null!==t.value))return;t=\"\"+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t;}\"\"!==(r=e.name)&&(e.name=\"\"),e.defaultChecked=!!e._wrapperState.initialChecked,\"\"!==r&&(e.name=r);}function je(e,t,r){\"number\"===t&&e.ownerDocument.activeElement===e||(null==r?e.defaultValue=\"\"+e._wrapperState.initialValue:e.defaultValue!==\"\"+r&&(e.defaultValue=\"\"+r));}function Ee(e,t){return e=i({children:void 0},t),(t=function(e){var t=\"\";return n.Children.forEach(e,function(e){null!=e&&(t+=e);}),t;}(t.children))&&(e.children=t),e;}function Ae(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t[\"$\"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty(\"$\"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0);}else{for(r=\"\"+be(r),t=null,i=0;i<e.length;i++){if(e[i].value===r)return e[i].selected=!0,void(n&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i]);}null!==t&&(t.selected=!0);}}function Te(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return i({},t,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue});}function De(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(o(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(o(93));r=r[0];}t=r;}null==t&&(t=\"\"),r=t;}e._wrapperState={initialValue:be(r)};}function Ie(e,t){var r=be(t.value),n=be(t.defaultValue);null!=r&&((r=\"\"+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=\"\"+n);}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&\"\"!==t&&null!==t&&(e.value=t);}var ke=\"http://www.w3.org/1999/xhtml\",Be=\"http://www.w3.org/2000/svg\";function Ve(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\";}}function Re(e,t){return null==e||\"http://www.w3.org/1999/xhtml\"===e?Ve(t):\"http://www.w3.org/2000/svg\"===e&&\"foreignObject\"===t?\"http://www.w3.org/1999/xhtml\":e;}var Le,Ne=function(e){return\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r);});}:e;}(function(e,t){if(e.namespaceURI!==Be||\"innerHTML\"in e)e.innerHTML=t;else{for((Le=Le||document.createElement(\"div\")).innerHTML=\"<svg>\"+t.valueOf().toString()+\"</svg>\",t=Le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild);}});function Fe(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t);}e.textContent=t;}function Ue(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r[\"Webkit\"+e]=\"webkit\"+t,r[\"Moz\"+e]=\"moz\"+t,r;}var ze={animationend:Ue(\"Animation\",\"AnimationEnd\"),animationiteration:Ue(\"Animation\",\"AnimationIteration\"),animationstart:Ue(\"Animation\",\"AnimationStart\"),transitionend:Ue(\"Transition\",\"TransitionEnd\")},He={},Ge={};function qe(e){if(He[e])return He[e];if(!ze[e])return e;var t,r=ze[e];for(t in r)if(r.hasOwnProperty(t)&&t in Ge)return He[e]=r[t];return e;}j&&(Ge=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete ze.animationend.animation,delete ze.animationiteration.animation,delete ze.animationstart.animation),\"TransitionEvent\"in window||delete ze.transitionend.transition);var We=qe(\"animationend\"),Qe=qe(\"animationiteration\"),Ye=qe(\"animationstart\"),Xe=qe(\"transitionend\"),Ke=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),Ze=new(\"function\"==typeof WeakMap?WeakMap:Map)();function Je(e){var t=Ze.get(e);return void 0===t&&(t=new Map(),Ze.set(e,t)),t;}function $e(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(r=t.return),e=t.return;}while(e);}return 3===t.tag?r:null;}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated;}return null;}function tt(e){if($e(e)!==e)throw Error(o(188));}function rt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(o(188));return t!==e?null:e;}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(n=i.return)){r=n;continue;}break;}if(i.child===a.child){for(a=i.child;a;){if(a===r)return tt(i),e;if(a===n)return tt(i),t;a=a.sibling;}throw Error(o(188));}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,u=i.child;u;){if(u===r){s=!0,r=i,n=a;break;}if(u===n){s=!0,n=i,r=a;break;}u=u.sibling;}if(!s){for(u=a.child;u;){if(u===r){s=!0,r=a,n=i;break;}if(u===n){s=!0,n=a,r=i;break;}u=u.sibling;}if(!s)throw Error(o(189));}}if(r.alternate!==n)throw Error(o(190));}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?e:t;}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return;}t.sibling.return=t.return,t=t.sibling;}}return null;}function nt(e,t){if(null==t)throw Error(o(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t];}function it(e,t,r){Array.isArray(e)?e.forEach(t,r):e&&t.call(r,e);}var at=null;function ot(e){if(e){var t=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(t))for(var n=0;n<t.length&&!e.isPropagationStopped();n++)v(e,t[n],r[n]);else t&&v(e,t,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e);}}function st(e){if(null!==e&&(at=nt(at,e)),e=at,at=null,e){if(it(e,ot),at)throw Error(o(95));if(l)throw e=d,l=!1,d=null,e;}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e;}function ct(e){if(!j)return!1;var t=(e=\"on\"+e)in document;return t||((t=document.createElement(\"div\")).setAttribute(e,\"return;\"),t=\"function\"==typeof t[e]),t;}var lt=[];function dt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>lt.length&&lt.push(e);}function ft(e,t,r,n){if(lt.length){var i=lt.pop();return i.topLevelType=e,i.eventSystemFlags=n,i.nativeEvent=t,i.targetInst=r,i;}return{topLevelType:e,eventSystemFlags:n,nativeEvent:t,targetInst:r,ancestors:[]};}function pt(e){var t=e.targetInst,r=t;do{if(!r){e.ancestors.push(r);break;}var n=r;if(3===n.tag)n=n.stateNode.containerInfo;else{for(;n.return;)n=n.return;n=3!==n.tag?null:n.stateNode.containerInfo;}if(!n)break;5!==(t=r.tag)&&6!==t||e.ancestors.push(r),r=Pr(n);}while(r);for(r=0;r<e.ancestors.length;r++){t=e.ancestors[r];var i=ut(e.nativeEvent);n=e.topLevelType;var a=e.nativeEvent,o=e.eventSystemFlags;0===r&&(o|=64);for(var s=null,u=0;u<O.length;u++){var c=O[u];c&&(c=c.extractEvents(n,t,a,i,o))&&(s=nt(s,c));}st(s);}}function mt(e,t,r){if(!r.has(e)){switch(e){case\"scroll\":Yt(t,\"scroll\",!0);break;case\"focus\":case\"blur\":Yt(t,\"focus\",!0),Yt(t,\"blur\",!0),r.set(\"blur\",null),r.set(\"focus\",null);break;case\"cancel\":case\"close\":ct(e)&&Yt(t,e,!0);break;case\"invalid\":case\"submit\":case\"reset\":break;default:-1===Ke.indexOf(e)&&Qt(e,t);}r.set(e,null);}}var ht,gt,vt,bt=!1,yt=[],_t=null,St=null,Ot=null,xt=new Map(),Ct=new Map(),wt=[],Pt=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit\".split(\" \"),jt=\"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture\".split(\" \");function Et(e,t,r,n,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|r,nativeEvent:i,container:n};}function At(e,t){switch(e){case\"focus\":case\"blur\":_t=null;break;case\"dragenter\":case\"dragleave\":St=null;break;case\"mouseover\":case\"mouseout\":Ot=null;break;case\"pointerover\":case\"pointerout\":xt.delete(t.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":Ct.delete(t.pointerId);}}function Tt(e,t,r,n,i,a){return null===e||e.nativeEvent!==a?(e=Et(t,r,n,i,a),null!==t&&null!==(t=jr(t))&&gt(t),e):(e.eventSystemFlags|=n,e);}function Dt(e){var t=Pr(e.target);if(null!==t){var r=$e(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=et(r)))return e.blockedOn=t,void a.unstable_runWithPriority(e.priority,function(){vt(r);});}else if(3===t&&r.stateNode.hydrate)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null);}e.blockedOn=null;}function It(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var r=jr(t);return null!==r&&gt(r),e.blockedOn=t,!1;}return!0;}function Mt(e,t,r){It(e)&&r.delete(t);}function kt(){for(bt=!1;0<yt.length;){var e=yt[0];if(null!==e.blockedOn){null!==(e=jr(e.blockedOn))&&ht(e);break;}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:yt.shift();}null!==_t&&It(_t)&&(_t=null),null!==St&&It(St)&&(St=null),null!==Ot&&It(Ot)&&(Ot=null),xt.forEach(Mt),Ct.forEach(Mt);}function Bt(e,t){e.blockedOn===t&&(e.blockedOn=null,bt||(bt=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,kt)));}function Vt(e){function t(t){return Bt(t,e);}if(0<yt.length){Bt(yt[0],e);for(var r=1;r<yt.length;r++){var n=yt[r];n.blockedOn===e&&(n.blockedOn=null);}}for(null!==_t&&Bt(_t,e),null!==St&&Bt(St,e),null!==Ot&&Bt(Ot,e),xt.forEach(t),Ct.forEach(t),r=0;r<wt.length;r++)(n=wt[r]).blockedOn===e&&(n.blockedOn=null);for(;0<wt.length&&null===(r=wt[0]).blockedOn;)Dt(r),null===r.blockedOn&&wt.shift();}var Rt={},Lt=new Map(),Nt=new Map(),Ft=[\"abort\",\"abort\",We,\"animationEnd\",Qe,\"animationIteration\",Ye,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",Xe,\"transitionEnd\",\"waiting\",\"waiting\"];function Ut(e,t){for(var r=0;r<e.length;r+=2){var n=e[r],i=e[r+1],a=\"on\"+(i[0].toUpperCase()+i.slice(1));a={phasedRegistrationNames:{bubbled:a,captured:a+\"Capture\"},dependencies:[n],eventPriority:t},Nt.set(n,t),Lt.set(n,a),Rt[i]=a;}}Ut(\"blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),0),Ut(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1),Ut(Ft,2);for(var zt=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),Ht=0;Ht<zt.length;Ht++)Nt.set(zt[Ht],0);var Gt=a.unstable_UserBlockingPriority,qt=a.unstable_runWithPriority,Wt=!0;function Qt(e,t){Yt(t,e,!1);}function Yt(e,t,r){var n=Nt.get(t);switch(void 0===n?2:n){case 0:n=Xt.bind(null,t,1,e);break;case 1:n=Kt.bind(null,t,1,e);break;default:n=Zt.bind(null,t,1,e);}r?e.addEventListener(t,n,!0):e.addEventListener(t,n,!1);}function Xt(e,t,r,n){L||V();var i=Zt,a=L;L=!0;try{B(i,e,t,r,n);}finally{(L=a)||F();}}function Kt(e,t,r,n){qt(Gt,Zt.bind(null,e,t,r,n));}function Zt(e,t,r,n){if(Wt)if(0<yt.length&&-1<Pt.indexOf(e))e=Et(null,e,t,r,n),yt.push(e);else{var i=Jt(e,t,r,n);if(null===i)At(e,n);else if(-1<Pt.indexOf(e))e=Et(i,e,t,r,n),yt.push(e);else if(!function(e,t,r,n,i){switch(t){case\"focus\":return _t=Tt(_t,e,t,r,n,i),!0;case\"dragenter\":return St=Tt(St,e,t,r,n,i),!0;case\"mouseover\":return Ot=Tt(Ot,e,t,r,n,i),!0;case\"pointerover\":var a=i.pointerId;return xt.set(a,Tt(xt.get(a)||null,e,t,r,n,i)),!0;case\"gotpointercapture\":return a=i.pointerId,Ct.set(a,Tt(Ct.get(a)||null,e,t,r,n,i)),!0;}return!1;}(i,e,t,r,n)){At(e,n),e=ft(e,n,null,t);try{U(pt,e);}finally{dt(e);}}}}function Jt(e,t,r,n){if(null!==(r=Pr(r=ut(n)))){var i=$e(r);if(null===i)r=null;else{var a=i.tag;if(13===a){if(null!==(r=et(i)))return r;r=null;}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;r=null;}else i!==r&&(r=null);}}e=ft(e,n,r,t);try{U(pt,e);}finally{dt(e);}return null;}var $t={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},er=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function tr(e,t,r){return null==t||\"boolean\"==typeof t||\"\"===t?\"\":r||\"number\"!=typeof t||0===t||$t.hasOwnProperty(e)&&$t[e]?(\"\"+t).trim():t+\"px\";}function rr(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf(\"--\"),i=tr(r,t[r],n);\"float\"===r&&(r=\"cssFloat\"),n?e.setProperty(r,i):e[r]=i;}}Object.keys($t).forEach(function(e){er.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$t[t]=$t[e];});});var nr=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ir(e,t){if(t){if(nr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e,\"\"));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if(\"object\"!=typeof_default()(t.dangerouslySetInnerHTML)||!(\"__html\"in t.dangerouslySetInnerHTML))throw Error(o(61));}if(null!=t.style&&\"object\"!=typeof_default()(t.style))throw Error(o(62,\"\"));}}function ar(e,t){if(-1===e.indexOf(\"-\"))return\"string\"==typeof t.is;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0;}}var or=ke;function sr(e,t){var r=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=w[t];for(var n=0;n<t.length;n++)mt(t[n],e,r);}function ur(){}function cr(e){if(void 0===(e=e||(\"undefined\"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body;}catch(t){return e.body;}}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e;}function dr(e,t){var r,n=lr(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r;}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e;}n=n.parentNode;}n=void 0;}n=lr(n);}}function fr(){for(var e=window,t=cr();t instanceof e.HTMLIFrameElement;){try{var r=\"string\"==typeof t.contentWindow.location.href;}catch(e){r=!1;}if(!r)break;t=cr((e=t.contentWindow).document);}return t;}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(\"input\"===t&&(\"text\"===e.type||\"search\"===e.type||\"tel\"===e.type||\"url\"===e.type||\"password\"===e.type)||\"textarea\"===t||\"true\"===e.contentEditable);}var mr=null,hr=null;function gr(e,t){switch(e){case\"button\":case\"input\":case\"select\":case\"textarea\":return!!t.autoFocus;}return!1;}function vr(e,t){return\"textarea\"===e||\"option\"===e||\"noscript\"===e||\"string\"==typeof t.children||\"number\"==typeof t.children||\"object\"==typeof_default()(t.dangerouslySetInnerHTML)&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html;}var br=\"function\"==typeof setTimeout?setTimeout:void 0,yr=\"function\"==typeof clearTimeout?clearTimeout:void 0;function _r(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;}return e;}function Sr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if(\"$\"===r||\"$!\"===r||\"$?\"===r){if(0===t)return e;t--;}else\"/$\"===r&&t++;}e=e.previousSibling;}return null;}var Or=Math.random().toString(36).slice(2),xr=\"__reactInternalInstance$\"+Or,Cr=\"__reactEventHandlers$\"+Or,wr=\"__reactContainere$\"+Or;function Pr(e){var t=e[xr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[wr]||r[xr]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=Sr(e);null!==e;){if(r=e[xr])return r;e=Sr(e);}return t;}r=(e=r).parentNode;}return null;}function jr(e){return!(e=e[xr]||e[wr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e;}function Er(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33));}function Ar(e){return e[Cr]||null;}function Tr(e){do{e=e.return;}while(e&&5!==e.tag);return e||null;}function Dr(e,t){var r=e.stateNode;if(!r)return null;var n=m(r);if(!n)return null;r=n[t];e:switch(t){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(n=!n.disabled)||(n=!(\"button\"===(e=e.type)||\"input\"===e||\"select\"===e||\"textarea\"===e)),e=!n;break e;default:e=!1;}if(e)return null;if(r&&\"function\"!=typeof r)throw Error(o(231,t,typeof_default()(r)));return r;}function Ir(e,t,r){(t=Dr(e,r.dispatchConfig.phasedRegistrationNames[t]))&&(r._dispatchListeners=nt(r._dispatchListeners,t),r._dispatchInstances=nt(r._dispatchInstances,e));}function Mr(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,r=[];t;)r.push(t),t=Tr(t);for(t=r.length;0<t--;)Ir(r[t],\"captured\",e);for(t=0;t<r.length;t++)Ir(r[t],\"bubbled\",e);}}function kr(e,t,r){e&&r&&r.dispatchConfig.registrationName&&(t=Dr(e,r.dispatchConfig.registrationName))&&(r._dispatchListeners=nt(r._dispatchListeners,t),r._dispatchInstances=nt(r._dispatchInstances,e));}function Br(e){e&&e.dispatchConfig.registrationName&&kr(e._targetInst,null,e);}function Vr(e){it(e,Mr);}var Rr=null,Lr=null,Nr=null;function Fr(){if(Nr)return Nr;var e,t,r=Lr,n=r.length,i=\"value\"in Rr?Rr.value:Rr.textContent,a=i.length;for(e=0;e<n&&r[e]===i[e];e++);var o=n-e;for(t=1;t<=o&&r[n-t]===i[a-t];t++);return Nr=i.slice(e,1<t?1-t:void 0);}function Ur(){return!0;}function zr(){return!1;}function Hr(e,t,r,n){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=r,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(r):\"target\"===i?this.target=n:this[i]=r[i]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?Ur:zr,this.isPropagationStopped=zr,this;}function Gr(e,t,r,n){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,r,n),i;}return new this(e,t,r,n);}function qr(e){if(!(e instanceof this))throw Error(o(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e);}function Wr(e){e.eventPool=[],e.getPooled=Gr,e.release=qr;}i(Hr.prototype,{preventDefault:function preventDefault(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():\"unknown\"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Ur);},stopPropagation:function stopPropagation(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():\"unknown\"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Ur);},persist:function persist(){this.isPersistent=Ur;},isPersistent:zr,destructor:function destructor(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=zr,this._dispatchInstances=this._dispatchListeners=null;}}),Hr.Interface={type:null,target:null,currentTarget:function currentTarget(){return null;},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function timeStamp(e){return e.timeStamp||Date.now();},defaultPrevented:null,isTrusted:null},Hr.extend=function(e){function t(){}function r(){return n.apply(this,arguments);}var n=this;t.prototype=n.prototype;var a=new t();return i(a,r.prototype),r.prototype=a,r.prototype.constructor=r,r.Interface=i({},n.Interface,e),r.extend=n.extend,Wr(r),r;},Wr(Hr);var Qr=Hr.extend({data:null}),Yr=Hr.extend({data:null}),Xr=[9,13,27,32],Kr=j&&\"CompositionEvent\"in window,Zr=null;j&&\"documentMode\"in document&&(Zr=document.documentMode);var Jr=j&&\"TextEvent\"in window&&!Zr,$r=j&&(!Kr||Zr&&8<Zr&&11>=Zr),en=String.fromCharCode(32),tn={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",captured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},rn=!1;function nn(e,t){switch(e){case\"keyup\":return-1!==Xr.indexOf(t.keyCode);case\"keydown\":return 229!==t.keyCode;case\"keypress\":case\"mousedown\":case\"blur\":return!0;default:return!1;}}function an(e){return\"object\"==typeof_default()(e=e.detail)&&\"data\"in e?e.data:null;}var on=!1;var sn={eventTypes:tn,extractEvents:function extractEvents(e,t,r,n){var i;if(Kr)e:{switch(e){case\"compositionstart\":var a=tn.compositionStart;break e;case\"compositionend\":a=tn.compositionEnd;break e;case\"compositionupdate\":a=tn.compositionUpdate;break e;}a=void 0;}else on?nn(e,r)&&(a=tn.compositionEnd):\"keydown\"===e&&229===r.keyCode&&(a=tn.compositionStart);return a?($r&&\"ko\"!==r.locale&&(on||a!==tn.compositionStart?a===tn.compositionEnd&&on&&(i=Fr()):(Lr=\"value\"in(Rr=n)?Rr.value:Rr.textContent,on=!0)),a=Qr.getPooled(a,t,r,n),i?a.data=i:null!==(i=an(r))&&(a.data=i),Vr(a),i=a):i=null,(e=Jr?function(e,t){switch(e){case\"compositionend\":return an(t);case\"keypress\":return 32!==t.which?null:(rn=!0,en);case\"textInput\":return(e=t.data)===en&&rn?null:e;default:return null;}}(e,r):function(e,t){if(on)return\"compositionend\"===e||!Kr&&nn(e,t)?(e=Fr(),Nr=Lr=Rr=null,on=!1,e):null;switch(e){case\"paste\":return null;case\"keypress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which);}return null;case\"compositionend\":return $r&&\"ko\"!==t.locale?null:t.data;default:return null;}}(e,r))?((t=Yr.getPooled(tn.beforeInput,t,r,n)).data=e,Vr(t)):t=null,null===i?t:null===t?i:[i,t];}},un={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return\"input\"===t?!!un[e.type]:\"textarea\"===t;}var ln={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"blur change click focus input keydown keyup selectionchange\".split(\" \")}};function dn(e,t,r){return(e=Hr.getPooled(ln.change,e,t,r)).type=\"change\",I(r),Vr(e),e;}var fn=null,pn=null;function mn(e){st(e);}function hn(e){if(Se(Er(e)))return e;}function gn(e,t){if(\"change\"===e)return t;}var vn=!1;function bn(){fn&&(fn.detachEvent(\"onpropertychange\",yn),pn=fn=null);}function yn(e){if(\"value\"===e.propertyName&&hn(pn))if(e=dn(pn,e,ut(e)),L)st(e);else{L=!0;try{k(mn,e);}finally{L=!1,F();}}}function _n(e,t,r){\"focus\"===e?(bn(),pn=r,(fn=t).attachEvent(\"onpropertychange\",yn)):\"blur\"===e&&bn();}function Sn(e){if(\"selectionchange\"===e||\"keyup\"===e||\"keydown\"===e)return hn(pn);}function On(e,t){if(\"click\"===e)return hn(t);}function xn(e,t){if(\"input\"===e||\"change\"===e)return hn(t);}j&&(vn=ct(\"input\")&&(!document.documentMode||9<document.documentMode));var Cn={eventTypes:ln,_isInputEventSupported:vn,extractEvents:function extractEvents(e,t,r,n){var i=t?Er(t):window,a=i.nodeName&&i.nodeName.toLowerCase();if(\"select\"===a||\"input\"===a&&\"file\"===i.type)var o=gn;else if(cn(i)){if(vn)o=xn;else{o=Sn;var s=_n;}}else(a=i.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===i.type||\"radio\"===i.type)&&(o=On);if(o&&(o=o(e,t)))return dn(o,r,n);s&&s(e,i,t),\"blur\"===e&&(e=i._wrapperState)&&e.controlled&&\"number\"===i.type&&je(i,\"number\",i.value);}},wn=Hr.extend({view:null,detail:null}),Pn={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pn[e])&&!!t[e];}function En(){return jn;}var An=0,Tn=0,Dn=!1,In=!1,Mn=wn.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:En,button:null,buttons:null,relatedTarget:function relatedTarget(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement);},movementX:function movementX(e){if(\"movementX\"in e)return e.movementX;var t=An;return An=e.screenX,Dn?\"mousemove\"===e.type?e.screenX-t:0:(Dn=!0,0);},movementY:function movementY(e){if(\"movementY\"in e)return e.movementY;var t=Tn;return Tn=e.screenY,In?\"mousemove\"===e.type?e.screenY-t:0:(In=!0,0);}}),kn=Mn.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Bn={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"mouseout\",\"mouseover\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"mouseout\",\"mouseover\"]},pointerEnter:{registrationName:\"onPointerEnter\",dependencies:[\"pointerout\",\"pointerover\"]},pointerLeave:{registrationName:\"onPointerLeave\",dependencies:[\"pointerout\",\"pointerover\"]}},Vn={eventTypes:Bn,extractEvents:function extractEvents(e,t,r,n,i){var a=\"mouseover\"===e||\"pointerover\"===e,o=\"mouseout\"===e||\"pointerout\"===e;if(a&&0==(32&i)&&(r.relatedTarget||r.fromElement)||!o&&!a)return null;(a=n.window===n?n:(a=n.ownerDocument)?a.defaultView||a.parentWindow:window,o)?(o=t,null!==(t=(t=r.relatedTarget||r.toElement)?Pr(t):null)&&(t!==$e(t)||5!==t.tag&&6!==t.tag)&&(t=null)):o=null;if(o===t)return null;if(\"mouseout\"===e||\"mouseover\"===e)var s=Mn,u=Bn.mouseLeave,c=Bn.mouseEnter,l=\"mouse\";else\"pointerout\"!==e&&\"pointerover\"!==e||(s=kn,u=Bn.pointerLeave,c=Bn.pointerEnter,l=\"pointer\");if(e=null==o?a:Er(o),a=null==t?a:Er(t),(u=s.getPooled(u,o,r,n)).type=l+\"leave\",u.target=e,u.relatedTarget=a,(r=s.getPooled(c,t,r,n)).type=l+\"enter\",r.target=a,r.relatedTarget=e,l=t,(n=o)&&l)e:{for(c=l,o=0,e=s=n;e;e=Tr(e))o++;for(e=0,t=c;t;t=Tr(t))e++;for(;0<o-e;)s=Tr(s),o--;for(;0<e-o;)c=Tr(c),e--;for(;o--;){if(s===c||s===c.alternate)break e;s=Tr(s),c=Tr(c);}s=null;}else s=null;for(c=s,s=[];n&&n!==c&&(null===(o=n.alternate)||o!==c);)s.push(n),n=Tr(n);for(n=[];l&&l!==c&&(null===(o=l.alternate)||o!==c);)n.push(l),l=Tr(l);for(l=0;l<s.length;l++)kr(s[l],\"bubbled\",u);for(l=n.length;0<l--;)kr(n[l],\"captured\",r);return 0==(64&i)?[u]:[u,r];}};var Rn=\"function\"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t;},Ln=Object.prototype.hasOwnProperty;function Nn(e,t){if(Rn(e,t))return!0;if(\"object\"!=typeof_default()(e)||null===e||\"object\"!=typeof_default()(t)||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!Ln.call(t,r[n])||!Rn(e[r[n]],t[r[n]]))return!1;return!0;}var Fn=j&&\"documentMode\"in document&&11>=document.documentMode,Un={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},zn=null,Hn=null,Gn=null,qn=!1;function Wn(e,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qn||null==zn||zn!==cr(r)?null:(\"selectionStart\"in(r=zn)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Gn&&Nn(Gn,r)?null:(Gn=r,(e=Hr.getPooled(Un.select,Hn,e,t)).type=\"select\",e.target=zn,Vr(e),e));}var Qn={eventTypes:Un,extractEvents:function extractEvents(e,t,r,n,i,a){if(!(a=!(i=a||(n.window===n?n.document:9===n.nodeType?n:n.ownerDocument)))){e:{i=Je(i),a=w.onSelect;for(var o=0;o<a.length;o++)if(!i.has(a[o])){i=!1;break e;}i=!0;}a=!i;}if(a)return null;switch(i=t?Er(t):window,e){case\"focus\":(cn(i)||\"true\"===i.contentEditable)&&(zn=i,Hn=t,Gn=null);break;case\"blur\":Gn=Hn=zn=null;break;case\"mousedown\":qn=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":return qn=!1,Wn(r,n);case\"selectionchange\":if(Fn)break;case\"keydown\":case\"keyup\":return Wn(r,n);}return null;}},Yn=Hr.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Xn=Hr.extend({clipboardData:function clipboardData(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData;}}),Kn=wn.extend({relatedTarget:null});function Zn(e){var t=e.keyCode;return\"charCode\"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0;}var Jn={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},$n={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},ei=wn.extend({key:function key(e){if(e.key){var t=Jn[e.key]||e.key;if(\"Unidentified\"!==t)return t;}return\"keypress\"===e.type?13===(e=Zn(e))?\"Enter\":String.fromCharCode(e):\"keydown\"===e.type||\"keyup\"===e.type?$n[e.keyCode]||\"Unidentified\":\"\";},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:En,charCode:function charCode(e){return\"keypress\"===e.type?Zn(e):0;},keyCode:function keyCode(e){return\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0;},which:function which(e){return\"keypress\"===e.type?Zn(e):\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0;}}),ti=Mn.extend({dataTransfer:null}),ri=wn.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:En}),ni=Hr.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Mn.extend({deltaX:function deltaX(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0;},deltaY:function deltaY(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0;},deltaZ:null,deltaMode:null}),ai={eventTypes:Rt,extractEvents:function extractEvents(e,t,r,n){var i=Lt.get(e);if(!i)return null;switch(e){case\"keypress\":if(0===Zn(r))return null;case\"keydown\":case\"keyup\":e=ei;break;case\"blur\":case\"focus\":e=Kn;break;case\"click\":if(2===r.button)return null;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":e=Mn;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":e=ti;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":e=ri;break;case We:case Qe:case Ye:e=Yn;break;case Xe:e=ni;break;case\"scroll\":e=wn;break;case\"wheel\":e=ii;break;case\"copy\":case\"cut\":case\"paste\":e=Xn;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":e=kn;break;default:e=Hr;}return Vr(t=e.getPooled(i,t,r,n)),t;}};if(b)throw Error(o(101));b=Array.prototype.slice.call(\"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \")),_(),m=Ar,h=jr,g=Er,P({SimpleEventPlugin:ai,EnterLeaveEventPlugin:Vn,ChangeEventPlugin:Cn,SelectEventPlugin:Qn,BeforeInputEventPlugin:sn});var oi=[],si=-1;function ui(e){0>si||(e.current=oi[si],oi[si]=null,si--);}function ci(e,t){si++,oi[si]=e.current,e.current=t;}var li={},di={current:li},fi={current:!1},pi=li;function mi(e,t){var r=e.type.contextTypes;if(!r)return li;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in r)a[i]=t[i];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a;}function hi(e){return null!=(e=e.childContextTypes);}function gi(){ui(fi),ui(di);}function vi(e,t,r){if(di.current!==li)throw Error(o(168));ci(di,t),ci(fi,r);}function bi(e,t,r){var n=e.stateNode;if(e=t.childContextTypes,\"function\"!=typeof n.getChildContext)return r;for(var a in n=n.getChildContext())if(!(a in e))throw Error(o(108,ge(t)||\"Unknown\",a));return i({},r,{},n);}function yi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,pi=di.current,ci(di,e),ci(fi,fi.current),!0;}function _i(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=bi(e,t,pi),n.__reactInternalMemoizedMergedChildContext=e,ui(fi),ui(di),ci(di,e)):ui(fi),ci(fi,r);}var Si=a.unstable_runWithPriority,Oi=a.unstable_scheduleCallback,xi=a.unstable_cancelCallback,Ci=a.unstable_requestPaint,wi=a.unstable_now,Pi=a.unstable_getCurrentPriorityLevel,ji=a.unstable_ImmediatePriority,Ei=a.unstable_UserBlockingPriority,Ai=a.unstable_NormalPriority,Ti=a.unstable_LowPriority,Di=a.unstable_IdlePriority,Ii={},Mi=a.unstable_shouldYield,ki=void 0!==Ci?Ci:function(){},Bi=null,Vi=null,Ri=!1,Li=wi(),Ni=1e4>Li?wi:function(){return wi()-Li;};function Fi(){switch(Pi()){case ji:return 99;case Ei:return 98;case Ai:return 97;case Ti:return 96;case Di:return 95;default:throw Error(o(332));}}function Ui(e){switch(e){case 99:return ji;case 98:return Ei;case 97:return Ai;case 96:return Ti;case 95:return Di;default:throw Error(o(332));}}function zi(e,t){return e=Ui(e),Si(e,t);}function Hi(e,t,r){return e=Ui(e),Oi(e,t,r);}function Gi(e){return null===Bi?(Bi=[e],Vi=Oi(ji,Wi)):Bi.push(e),Ii;}function qi(){if(null!==Vi){var e=Vi;Vi=null,xi(e);}Wi();}function Wi(){if(!Ri&&null!==Bi){Ri=!0;var e=0;try{var t=Bi;zi(99,function(){for(;e<t.length;e++){var r=t[e];do{r=r(!0);}while(null!==r);}}),Bi=null;}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),Oi(ji,qi),t;}finally{Ri=!1;}}}function Qi(e,t,r){return 1073741821-(1+((1073741821-e+t/10)/(r/=10)|0))*r;}function Yi(e,t){if(e&&e.defaultProps)for(var r in t=i({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t;}var Xi={current:null},Ki=null,Zi=null,Ji=null;function $i(){Ji=Zi=Ki=null;}function ea(e){var t=Xi.current;ui(Xi),e.type._context._currentValue=t;}function ta(e,t){for(;null!==e;){var r=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==r&&r.childExpirationTime<t&&(r.childExpirationTime=t);else{if(!(null!==r&&r.childExpirationTime<t))break;r.childExpirationTime=t;}e=e.return;}}function ra(e,t){Ki=e,Ji=Zi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(To=!0),e.firstContext=null);}function na(e,t){if(Ji!==e&&!1!==t&&0!==t)if(\"number\"==typeof t&&1073741823!==t||(Ji=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Zi){if(null===Ki)throw Error(o(308));Zi=t,Ki.dependencies={expirationTime:0,firstContext:t,responders:null};}else Zi=Zi.next=t;return e._currentValue;}var ia=!1;function aa(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null};}function oa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects});}function sa(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e;}function ua(e,t){if(null!==(e=e.updateQueue)){var r=(e=e.shared).pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t;}}function ca(e,t){var r=e.alternate;null!==r&&oa(r,e),null===(r=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=r.next,r.next=t);}function la(e,t,r,n){var a=e.updateQueue;ia=!1;var o=a.baseQueue,s=a.shared.pending;if(null!==s){if(null!==o){var u=o.next;o.next=s.next,s.next=u;}o=s,a.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=s);}if(null!==o){u=o.next;var c=a.baseState,l=0,d=null,f=null,p=null;if(null!==u)for(var m=u;;){if((s=m.expirationTime)<n){var h={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===p?(f=p=h,d=c):p=p.next=h,s>l&&(l=s);}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),au(s,m.suspenseConfig);e:{var g=e,v=m;switch(s=t,h=r,v.tag){case 1:if(\"function\"==typeof(g=v.payload)){c=g.call(h,c,s);break e;}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s=\"function\"==typeof(g=v.payload)?g.call(h,c,s):g))break e;c=i({},c,s);break e;case 2:ia=!0;}}null!==m.callback&&(e.effectTag|=32,null===(s=a.effects)?a.effects=[m]:s.push(m));}if(null===(m=m.next)||m===u){if(null===(s=a.shared.pending))break;m=o.next=s.next,s.next=u,a.baseQueue=o=s,a.shared.pending=null;}}null===p?d=c:p.next=f,a.baseState=d,a.baseQueue=p,ou(l),e.expirationTime=l,e.memoizedState=c;}}function da(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(null!==i){if(n.callback=null,n=i,i=r,\"function\"!=typeof n)throw Error(o(191,n));n.call(i);}}}var fa=K.ReactCurrentBatchConfig,pa=new n.Component().refs;function ma(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:i({},t,r),e.memoizedState=r,0===e.expirationTime&&(e.updateQueue.baseState=r);}var ha={isMounted:function isMounted(e){return!!(e=e._reactInternalFiber)&&$e(e)===e;},enqueueSetState:function enqueueSetState(e,t,r){e=e._reactInternalFiber;var n=Ws(),i=fa.suspense;(i=sa(n=Qs(n,e,i),i)).payload=t,null!=r&&(i.callback=r),ua(e,i),Ys(e,n);},enqueueReplaceState:function enqueueReplaceState(e,t,r){e=e._reactInternalFiber;var n=Ws(),i=fa.suspense;(i=sa(n=Qs(n,e,i),i)).tag=1,i.payload=t,null!=r&&(i.callback=r),ua(e,i),Ys(e,n);},enqueueForceUpdate:function enqueueForceUpdate(e,t){e=e._reactInternalFiber;var r=Ws(),n=fa.suspense;(n=sa(r=Qs(r,e,n),n)).tag=2,null!=t&&(n.callback=t),ua(e,n),Ys(e,r);}};function ga(e,t,r,n,i,a,o){return\"function\"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,a,o):!t.prototype||!t.prototype.isPureReactComponent||!Nn(r,n)||!Nn(i,a);}function va(e,t,r){var n=!1,i=li,a=t.contextType;return\"object\"==typeof_default()(a)&&null!==a?a=na(a):(i=hi(t)?pi:di.current,a=(n=null!=(n=t.contextTypes))?mi(e,i):li),t=new t(r,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ha,e.stateNode=t,t._reactInternalFiber=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t;}function ba(e,t,r,n){e=t.state,\"function\"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),\"function\"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ha.enqueueReplaceState(t,t.state,null);}function ya(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs=pa,aa(e);var a=t.contextType;\"object\"==typeof_default()(a)&&null!==a?i.context=na(a):(a=hi(t)?pi:di.current,i.context=mi(e,a)),la(e,r,i,n),i.state=e.memoizedState,\"function\"==typeof(a=t.getDerivedStateFromProps)&&(ma(e,t,a,r),i.state=e.memoizedState),\"function\"==typeof t.getDerivedStateFromProps||\"function\"==typeof i.getSnapshotBeforeUpdate||\"function\"!=typeof i.UNSAFE_componentWillMount&&\"function\"!=typeof i.componentWillMount||(t=i.state,\"function\"==typeof i.componentWillMount&&i.componentWillMount(),\"function\"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ha.enqueueReplaceState(i,i.state,null),la(e,r,i,n),i.state=e.memoizedState),\"function\"==typeof i.componentDidMount&&(e.effectTag|=4);}var _a=Array.isArray;function Sa(e,t,r){if(null!==(e=r.ref)&&\"function\"!=typeof e&&\"object\"!=typeof_default()(e)){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(o(309));var n=r.stateNode;}if(!n)throw Error(o(147,e));var i=\"\"+e;return null!==t&&null!==t.ref&&\"function\"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function t(e){var t=n.refs;t===pa&&(t=n.refs={}),null===e?delete t[i]:t[i]=e;})._stringRef=i,t);}if(\"string\"!=typeof e)throw Error(o(284));if(!r._owner)throw Error(o(290,e));}return e;}function Oa(e,t){if(\"textarea\"!==e.type)throw Error(o(31,\"[object Object]\"===Object.prototype.toString.call(t)?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":t,\"\"));}function xa(e){function t(t,r){if(e){var n=t.lastEffect;null!==n?(n.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r,r.nextEffect=null,r.effectTag=8;}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null;}function n(e,t){for(e=new Map();null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e;}function i(e,t){return(e=Pu(e,t)).index=0,e.sibling=null,e;}function a(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.effectTag=2,r):n:(t.effectTag=2,r):r;}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t;}function u(e,t,r,n){return null===t||6!==t.tag?((t=Au(r,e.mode,n)).return=e,t):((t=i(t,r)).return=e,t);}function c(e,t,r,n){return null!==t&&t.elementType===r.type?((n=i(t,r.props)).ref=Sa(e,t,r),n.return=e,n):((n=ju(r.type,r.key,r.props,null,e.mode,n)).ref=Sa(e,t,r),n.return=e,n);}function l(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Tu(r,e.mode,n)).return=e,t):((t=i(t,r.children||[])).return=e,t);}function d(e,t,r,n,a){return null===t||7!==t.tag?((t=Eu(r,e.mode,n,a)).return=e,t):((t=i(t,r)).return=e,t);}function f(e,t,r){if(\"string\"==typeof t||\"number\"==typeof t)return(t=Au(\"\"+t,e.mode,r)).return=e,t;if(\"object\"==typeof_default()(t)&&null!==t){switch(t.$$typeof){case ee:return(r=ju(t.type,t.key,t.props,null,e.mode,r)).ref=Sa(e,null,t),r.return=e,r;case te:return(t=Tu(t,e.mode,r)).return=e,t;}if(_a(t)||he(t))return(t=Eu(t,e.mode,r,null)).return=e,t;Oa(e,t);}return null;}function p(e,t,r,n){var i=null!==t?t.key:null;if(\"string\"==typeof r||\"number\"==typeof r)return null!==i?null:u(e,t,\"\"+r,n);if(\"object\"==typeof_default()(r)&&null!==r){switch(r.$$typeof){case ee:return r.key===i?r.type===re?d(e,t,r.props.children,n,i):c(e,t,r,n):null;case te:return r.key===i?l(e,t,r,n):null;}if(_a(r)||he(r))return null!==i?null:d(e,t,r,n,null);Oa(e,r);}return null;}function m(e,t,r,n,i){if(\"string\"==typeof n||\"number\"==typeof n)return u(t,e=e.get(r)||null,\"\"+n,i);if(\"object\"==typeof_default()(n)&&null!==n){switch(n.$$typeof){case ee:return e=e.get(null===n.key?r:n.key)||null,n.type===re?d(t,e,n.props.children,i,n.key):c(t,e,n,i);case te:return l(t,e=e.get(null===n.key?r:n.key)||null,n,i);}if(_a(n)||he(n))return d(t,e=e.get(r)||null,n,i,null);Oa(t,n);}return null;}function h(i,o,s,u){for(var c=null,l=null,d=o,h=o=0,g=null;null!==d&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var v=p(i,d,s[h],u);if(null===v){null===d&&(d=g);break;}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,h),null===l?c=v:l.sibling=v,l=v,d=g;}if(h===s.length)return r(i,d),c;if(null===d){for(;h<s.length;h++)null!==(d=f(i,s[h],u))&&(o=a(d,o,h),null===l?c=d:l.sibling=d,l=d);return c;}for(d=n(i,d);h<s.length;h++)null!==(g=m(d,i,h,s[h],u))&&(e&&null!==g.alternate&&d.delete(null===g.key?h:g.key),o=a(g,o,h),null===l?c=g:l.sibling=g,l=g);return e&&d.forEach(function(e){return t(i,e);}),c;}function g(i,s,u,c){var l=he(u);if(\"function\"!=typeof l)throw Error(o(150));if(null==(u=l.call(u)))throw Error(o(151));for(var d=l=null,h=s,g=s=0,v=null,b=u.next();null!==h&&!b.done;g++,b=u.next()){h.index>g?(v=h,h=null):v=h.sibling;var y=p(i,h,b.value,c);if(null===y){null===h&&(h=v);break;}e&&h&&null===y.alternate&&t(i,h),s=a(y,s,g),null===d?l=y:d.sibling=y,d=y,h=v;}if(b.done)return r(i,h),l;if(null===h){for(;!b.done;g++,b=u.next())null!==(b=f(i,b.value,c))&&(s=a(b,s,g),null===d?l=b:d.sibling=b,d=b);return l;}for(h=n(i,h);!b.done;g++,b=u.next())null!==(b=m(h,i,g,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?l=b:d.sibling=b,d=b);return e&&h.forEach(function(e){return t(i,e);}),l;}return function(e,n,a,u){var c=\"object\"==typeof_default()(a)&&null!==a&&a.type===re&&null===a.key;c&&(a=a.props.children);var l=\"object\"==typeof_default()(a)&&null!==a;if(l)switch(a.$$typeof){case ee:e:{for(l=a.key,c=n;null!==c;){if(c.key===l){switch(c.tag){case 7:if(a.type===re){r(e,c.sibling),(n=i(c,a.props.children)).return=e,e=n;break e;}break;default:if(c.elementType===a.type){r(e,c.sibling),(n=i(c,a.props)).ref=Sa(e,c,a),n.return=e,e=n;break e;}}r(e,c);break;}t(e,c),c=c.sibling;}a.type===re?((n=Eu(a.props.children,e.mode,u,a.key)).return=e,e=n):((u=ju(a.type,a.key,a.props,null,e.mode,u)).ref=Sa(e,n,a),u.return=e,e=u);}return s(e);case te:e:{for(c=a.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===a.containerInfo&&n.stateNode.implementation===a.implementation){r(e,n.sibling),(n=i(n,a.children||[])).return=e,e=n;break e;}r(e,n);break;}t(e,n),n=n.sibling;}(n=Tu(a,e.mode,u)).return=e,e=n;}return s(e);}if(\"string\"==typeof a||\"number\"==typeof a)return a=\"\"+a,null!==n&&6===n.tag?(r(e,n.sibling),(n=i(n,a)).return=e,e=n):(r(e,n),(n=Au(a,e.mode,u)).return=e,e=n),s(e);if(_a(a))return h(e,n,a,u);if(he(a))return g(e,n,a,u);if(l&&Oa(e,a),void 0===a&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(o(152,e.displayName||e.name||\"Component\"));}return r(e,n);};}var Ca=xa(!0),wa=xa(!1),Pa={},ja={current:Pa},Ea={current:Pa},Aa={current:Pa};function Ta(e){if(e===Pa)throw Error(o(174));return e;}function Da(e,t){switch(ci(Aa,t),ci(Ea,e),ci(ja,Pa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Re(null,\"\");break;default:t=Re(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName);}ui(ja),ci(ja,t);}function Ia(){ui(ja),ui(Ea),ui(Aa);}function Ma(e){Ta(Aa.current);var t=Ta(ja.current),r=Re(t,e.type);t!==r&&(ci(Ea,e),ci(ja,r));}function ka(e){Ea.current===e&&(ui(ja),ui(Ea));}var Ba={current:0};function Va(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||\"$?\"===r.data||\"$!\"===r.data))return t;}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t;}else if(null!==t.child){t.child.return=t,t=t.child;continue;}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return;}t.sibling.return=t.return,t=t.sibling;}return null;}function Ra(e,t){return{responder:e,props:t};}var La=K.ReactCurrentDispatcher,Na=K.ReactCurrentBatchConfig,Fa=0,Ua=null,za=null,Ha=null,Ga=!1;function qa(){throw Error(o(321));}function Wa(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Rn(e[r],t[r]))return!1;return!0;}function Qa(e,t,r,n,i,a){if(Fa=a,Ua=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,La.current=null===e||null===e.memoizedState?vo:bo,e=r(n,i),t.expirationTime===Fa){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(o(301));a+=1,Ha=za=null,t.updateQueue=null,La.current=yo,e=r(n,i);}while(t.expirationTime===Fa);}if(La.current=go,t=null!==za&&null!==za.next,Fa=0,Ha=za=Ua=null,Ga=!1,t)throw Error(o(300));return e;}function Ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ha?Ua.memoizedState=Ha=e:Ha=Ha.next=e,Ha;}function Xa(){if(null===za){var e=Ua.alternate;e=null!==e?e.memoizedState:null;}else e=za.next;var t=null===Ha?Ua.memoizedState:Ha.next;if(null!==t)Ha=t,za=e;else{if(null===e)throw Error(o(310));e={memoizedState:(za=e).memoizedState,baseState:za.baseState,baseQueue:za.baseQueue,queue:za.queue,next:null},null===Ha?Ua.memoizedState=Ha=e:Ha=Ha.next=e;}return Ha;}function Ka(e,t){return\"function\"==typeof t?t(e):t;}function Za(e){var t=Xa(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=za,i=n.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s;}n.baseQueue=i=a,r.pending=null;}if(null!==i){i=i.next,n=n.baseState;var u=s=a=null,c=i;do{var l=c.expirationTime;if(l<Fa){var d={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=d,a=n):u=u.next=d,l>Ua.expirationTime&&(Ua.expirationTime=l,ou(l));}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),au(l,c.suspenseConfig),n=c.eagerReducer===e?c.eagerState:e(n,c.action);c=c.next;}while(null!==c&&c!==i);null===u?a=n:u.next=s,Rn(n,t.memoizedState)||(To=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=u,r.lastRenderedState=n;}return[t.memoizedState,r.dispatch];}function Ja(e){var t=Xa(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next;}while(s!==i);Rn(a,t.memoizedState)||(To=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a;}return[a,n];}function $a(e){var t=Ya();return\"function\"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:e}).dispatch=ho.bind(null,Ua,e),[t.memoizedState,e];}function eo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=Ua.updateQueue)?(t={lastEffect:null},Ua.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e;}function to(){return Xa().memoizedState;}function ro(e,t,r,n){var i=Ya();Ua.effectTag|=e,i.memoizedState=eo(1|t,r,void 0,void 0===n?null:n);}function no(e,t,r,n){var i=Xa();n=void 0===n?null:n;var a=void 0;if(null!==za){var o=za.memoizedState;if(a=o.destroy,null!==n&&Wa(n,o.deps))return void eo(t,r,a,n);}Ua.effectTag|=e,i.memoizedState=eo(1|t,r,a,n);}function io(e,t){return ro(516,4,e,t);}function ao(e,t){return no(516,4,e,t);}function oo(e,t){return no(4,2,e,t);}function so(e,t){return\"function\"==typeof t?(e=e(),t(e),function(){t(null);}):null!=t?(e=e(),t.current=e,function(){t.current=null;}):void 0;}function uo(e,t,r){return r=null!=r?r.concat([e]):null,no(4,2,so.bind(null,t,e),r);}function co(){}function lo(e,t){return Ya().memoizedState=[e,void 0===t?null:t],e;}function fo(e,t){var r=Xa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Wa(t,n[1])?n[0]:(r.memoizedState=[e,t],e);}function po(e,t){var r=Xa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Wa(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e);}function mo(e,t,r){var n=Fi();zi(98>n?98:n,function(){e(!0);}),zi(97<n?97:n,function(){var n=Na.suspense;Na.suspense=void 0===t?null:t;try{e(!1),r();}finally{Na.suspense=n;}});}function ho(e,t,r){var n=Ws(),i=fa.suspense;i={expirationTime:n=Qs(n,e,i),suspenseConfig:i,action:r,eagerReducer:null,eagerState:null,next:null};var a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===Ua||null!==a&&a===Ua)Ga=!0,i.expirationTime=Fa,Ua.expirationTime=Fa;else{if(0===e.expirationTime&&(null===a||0===a.expirationTime)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,r);if(i.eagerReducer=a,i.eagerState=s,Rn(s,o))return;}catch(e){}Ys(e,n);}}var go={readContext:na,useCallback:qa,useContext:qa,useEffect:qa,useImperativeHandle:qa,useLayoutEffect:qa,useMemo:qa,useReducer:qa,useRef:qa,useState:qa,useDebugValue:qa,useResponder:qa,useDeferredValue:qa,useTransition:qa},vo={readContext:na,useCallback:lo,useContext:na,useEffect:io,useImperativeHandle:function useImperativeHandle(e,t,r){return r=null!=r?r.concat([e]):null,ro(4,2,so.bind(null,t,e),r);},useLayoutEffect:function useLayoutEffect(e,t){return ro(4,2,e,t);},useMemo:function useMemo(e,t){var r=Ya();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e;},useReducer:function useReducer(e,t,r){var n=Ya();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e=(e=n.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ho.bind(null,Ua,e),[n.memoizedState,e];},useRef:function useRef(e){return e={current:e},Ya().memoizedState=e;},useState:$a,useDebugValue:co,useResponder:Ra,useDeferredValue:function useDeferredValue(e,t){var r=$a(e),n=r[0],i=r[1];return io(function(){var r=Na.suspense;Na.suspense=void 0===t?null:t;try{i(e);}finally{Na.suspense=r;}},[e,t]),n;},useTransition:function useTransition(e){var t=$a(!1),r=t[0];return t=t[1],[lo(mo.bind(null,t,e),[t,e]),r];}},bo={readContext:na,useCallback:fo,useContext:na,useEffect:ao,useImperativeHandle:uo,useLayoutEffect:oo,useMemo:po,useReducer:Za,useRef:to,useState:function useState(){return Za(Ka);},useDebugValue:co,useResponder:Ra,useDeferredValue:function useDeferredValue(e,t){var r=Za(Ka),n=r[0],i=r[1];return ao(function(){var r=Na.suspense;Na.suspense=void 0===t?null:t;try{i(e);}finally{Na.suspense=r;}},[e,t]),n;},useTransition:function useTransition(e){var t=Za(Ka),r=t[0];return t=t[1],[fo(mo.bind(null,t,e),[t,e]),r];}},yo={readContext:na,useCallback:fo,useContext:na,useEffect:ao,useImperativeHandle:uo,useLayoutEffect:oo,useMemo:po,useReducer:Ja,useRef:to,useState:function useState(){return Ja(Ka);},useDebugValue:co,useResponder:Ra,useDeferredValue:function useDeferredValue(e,t){var r=Ja(Ka),n=r[0],i=r[1];return ao(function(){var r=Na.suspense;Na.suspense=void 0===t?null:t;try{i(e);}finally{Na.suspense=r;}},[e,t]),n;},useTransition:function useTransition(e){var t=Ja(Ka),r=t[0];return t=t[1],[fo(mo.bind(null,t,e),[t,e]),r];}},_o=null,So=null,Oo=!1;function xo(e,t){var r=Cu(5,null,null,0);r.elementType=\"DELETED\",r.type=\"DELETED\",r.stateNode=t,r.return=e,r.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r;}function Co(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=\"\"===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1;}}function wo(e){if(Oo){var t=So;if(t){var r=t;if(!Co(e,t)){if(!(t=_r(r.nextSibling))||!Co(e,t))return e.effectTag=-1025&e.effectTag|2,Oo=!1,void(_o=e);xo(_o,r);}_o=e,So=_r(t.firstChild);}else e.effectTag=-1025&e.effectTag|2,Oo=!1,_o=e;}}function Po(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;_o=e;}function jo(e){if(e!==_o)return!1;if(!Oo)return Po(e),Oo=!0,!1;var t=e.type;if(5!==e.tag||\"head\"!==t&&\"body\"!==t&&!vr(t,e.memoizedProps))for(t=So;t;)xo(e,t),t=_r(t.nextSibling);if(Po(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if(\"/$\"===r){if(0===t){So=_r(e.nextSibling);break e;}t--;}else\"$\"!==r&&\"$!\"!==r&&\"$?\"!==r||t++;}e=e.nextSibling;}So=null;}}else So=_o?_r(e.stateNode.nextSibling):null;return!0;}function Eo(){So=_o=null,Oo=!1;}var Ao=K.ReactCurrentOwner,To=!1;function Do(e,t,r,n){t.child=null===e?wa(t,null,r,n):Ca(t,e.child,r,n);}function Io(e,t,r,n,i){r=r.render;var a=t.ref;return ra(t,i),n=Qa(e,t,r,n,a,i),null===e||To?(t.effectTag|=1,Do(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Yo(e,t,i));}function Mo(e,t,r,n,i,a){if(null===e){var o=r.type;return\"function\"!=typeof o||wu(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=ju(r.type,null,n,null,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ko(e,t,o,n,i,a));}return o=e.child,i<a&&(i=o.memoizedProps,(r=null!==(r=r.compare)?r:Nn)(i,n)&&e.ref===t.ref)?Yo(e,t,a):(t.effectTag|=1,(e=Pu(o,n)).ref=t.ref,e.return=t,t.child=e);}function ko(e,t,r,n,i,a){return null!==e&&Nn(e.memoizedProps,n)&&e.ref===t.ref&&(To=!1,i<a)?(t.expirationTime=e.expirationTime,Yo(e,t,a)):Vo(e,t,r,n,a);}function Bo(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.effectTag|=128);}function Vo(e,t,r,n,i){var a=hi(r)?pi:di.current;return a=mi(t,a),ra(t,i),r=Qa(e,t,r,n,a,i),null===e||To?(t.effectTag|=1,Do(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Yo(e,t,i));}function Ro(e,t,r,n,i){if(hi(r)){var a=!0;yi(t);}else a=!1;if(ra(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),va(t,r,n),ya(t,r,n,i),n=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,c=r.contextType;\"object\"==typeof_default()(c)&&null!==c?c=na(c):c=mi(t,c=hi(r)?pi:di.current);var l=r.getDerivedStateFromProps,d=\"function\"==typeof l||\"function\"==typeof o.getSnapshotBeforeUpdate;d||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||(s!==n||u!==c)&&ba(t,o,n,c),ia=!1;var f=t.memoizedState;o.state=f,la(t,n,o,i),u=t.memoizedState,s!==n||f!==u||fi.current||ia?(\"function\"==typeof l&&(ma(t,r,l,n),u=t.memoizedState),(s=ia||ga(t,r,s,n,f,u,c))?(d||\"function\"!=typeof o.UNSAFE_componentWillMount&&\"function\"!=typeof o.componentWillMount||(\"function\"==typeof o.componentWillMount&&o.componentWillMount(),\"function\"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),\"function\"==typeof o.componentDidMount&&(t.effectTag|=4)):(\"function\"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=n,t.memoizedState=u),o.props=n,o.state=u,o.context=c,n=s):(\"function\"==typeof o.componentDidMount&&(t.effectTag|=4),n=!1);}else o=t.stateNode,oa(e,t),s=t.memoizedProps,o.props=t.type===t.elementType?s:Yi(t.type,s),u=o.context,\"object\"==typeof_default()(c=r.contextType)&&null!==c?c=na(c):c=mi(t,c=hi(r)?pi:di.current),(d=\"function\"==typeof(l=r.getDerivedStateFromProps)||\"function\"==typeof o.getSnapshotBeforeUpdate)||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||(s!==n||u!==c)&&ba(t,o,n,c),ia=!1,u=t.memoizedState,o.state=u,la(t,n,o,i),f=t.memoizedState,s!==n||u!==f||fi.current||ia?(\"function\"==typeof l&&(ma(t,r,l,n),f=t.memoizedState),(l=ia||ga(t,r,s,n,u,f,c))?(d||\"function\"!=typeof o.UNSAFE_componentWillUpdate&&\"function\"!=typeof o.componentWillUpdate||(\"function\"==typeof o.componentWillUpdate&&o.componentWillUpdate(n,f,c),\"function\"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(n,f,c)),\"function\"==typeof o.componentDidUpdate&&(t.effectTag|=4),\"function\"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):(\"function\"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=n,t.memoizedState=f),o.props=n,o.state=f,o.context=c,n=l):(\"function\"!=typeof o.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),n=!1);return Lo(e,t,r,n,a,i);}function Lo(e,t,r,n,i,a){Bo(e,t);var o=0!=(64&t.effectTag);if(!n&&!o)return i&&_i(t,r,!1),Yo(e,t,a);n=t.stateNode,Ao.current=t;var s=o&&\"function\"!=typeof r.getDerivedStateFromError?null:n.render();return t.effectTag|=1,null!==e&&o?(t.child=Ca(t,e.child,null,a),t.child=Ca(t,null,s,a)):Do(e,t,s,a),t.memoizedState=n.state,i&&_i(t,r,!0),t.child;}function No(e){var t=e.stateNode;t.pendingContext?vi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&vi(0,t.context,!1),Da(e,t.containerInfo);}var Fo,Uo,zo,Ho={dehydrated:null,retryTime:0};function Go(e,t,r){var n,i=t.mode,a=t.pendingProps,o=Ba.current,s=!1;if((n=0!=(64&t.effectTag))||(n=0!=(2&o)&&(null===e||null!==e.memoizedState)),n?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),ci(Ba,1&o),null===e){if(void 0!==a.fallback&&wo(t),s){if(s=a.fallback,(a=Eu(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(r=Eu(s,i,r,null)).return=t,a.sibling=r,t.memoizedState=Ho,t.child=a,r;}return i=a.children,t.memoizedState=null,t.child=wa(t,null,i,r);}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(a=a.fallback,(r=Pu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(r.child=s;null!==s;)s.return=r,s=s.sibling;return(i=Pu(i,a)).return=t,r.sibling=i,r.childExpirationTime=0,t.memoizedState=Ho,t.child=r,i;}return r=Ca(t,e.child,a.children,r),t.memoizedState=null,t.child=r;}if(e=e.child,s){if(s=a.fallback,(a=Eu(null,i,0,null)).return=t,a.child=e,null!==e&&(e.return=a),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(r=Eu(s,i,r,null)).return=t,a.sibling=r,r.effectTag|=2,a.childExpirationTime=0,t.memoizedState=Ho,t.child=a,r;}return t.memoizedState=null,t.child=Ca(t,e,a.children,r);}function qo(e,t){e.expirationTime<t&&(e.expirationTime=t);var r=e.alternate;null!==r&&r.expirationTime<t&&(r.expirationTime=t),ta(e.return,t);}function Wo(e,t,r,n,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailExpiration:0,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailExpiration=0,o.tailMode=i,o.lastEffect=a);}function Qo(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Do(e,t,n.children,r),0!=(2&(n=Ba.current)))n=1&n|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qo(e,r);else if(19===e.tag)qo(e,r);else if(null!==e.child){e.child.return=e,e=e.child;continue;}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return;}e.sibling.return=e.return,e=e.sibling;}n&=1;}if(ci(Ba,n),0==(2&t.mode))t.memoizedState=null;else switch(i){case\"forwards\":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===Va(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Wo(t,!1,i,r,a,t.lastEffect);break;case\"backwards\":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Va(e)){t.child=i;break;}e=i.sibling,i.sibling=r,r=i,i=e;}Wo(t,!0,r,null,a,t.lastEffect);break;case\"together\":Wo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null;}return t.child;}function Yo(e,t,r){null!==e&&(t.dependencies=e.dependencies);var n=t.expirationTime;if(0!==n&&ou(n),t.childExpirationTime<r)return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(r=Pu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Pu(e,e.pendingProps)).return=t;r.sibling=null;}return t.child;}function Xo(e,t){switch(e.tailMode){case\"hidden\":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case\"collapsed\":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null;}}function Ko(e,t,r){var n=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return hi(t.type)&&gi(),null;case 3:return Ia(),ui(fi),ui(di),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||!jo(t)||(t.effectTag|=4),null;case 5:ka(t),r=Ta(Aa.current);var a=t.type;if(null!==e&&null!=t.stateNode)Uo(e,t,a,n,r),e.ref!==t.ref&&(t.effectTag|=128);else{if(!n){if(null===t.stateNode)throw Error(o(166));return null;}if(e=Ta(ja.current),jo(t)){n=t.stateNode,a=t.type;var s=t.memoizedProps;switch(n[xr]=t,n[Cr]=s,a){case\"iframe\":case\"object\":case\"embed\":Qt(\"load\",n);break;case\"video\":case\"audio\":for(e=0;e<Ke.length;e++)Qt(Ke[e],n);break;case\"source\":Qt(\"error\",n);break;case\"img\":case\"image\":case\"link\":Qt(\"error\",n),Qt(\"load\",n);break;case\"form\":Qt(\"reset\",n),Qt(\"submit\",n);break;case\"details\":Qt(\"toggle\",n);break;case\"input\":xe(n,s),Qt(\"invalid\",n),sr(r,\"onChange\");break;case\"select\":n._wrapperState={wasMultiple:!!s.multiple},Qt(\"invalid\",n),sr(r,\"onChange\");break;case\"textarea\":De(n,s),Qt(\"invalid\",n),sr(r,\"onChange\");}for(var u in ir(a,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];\"children\"===u?\"string\"==typeof c?n.textContent!==c&&(e=[\"children\",c]):\"number\"==typeof c&&n.textContent!==\"\"+c&&(e=[\"children\",\"\"+c]):C.hasOwnProperty(u)&&null!=c&&sr(r,u);}switch(a){case\"input\":_e(n),Pe(n,s,!0);break;case\"textarea\":_e(n),Me(n);break;case\"select\":case\"option\":break;default:\"function\"==typeof s.onClick&&(n.onclick=ur);}r=e,t.updateQueue=r,null!==r&&(t.effectTag|=4);}else{switch(u=9===r.nodeType?r:r.ownerDocument,e===or&&(e=Ve(a)),e===or?\"script\"===a?((e=u.createElement(\"div\")).innerHTML=\"<script><\\/script>\",e=e.removeChild(e.firstChild)):\"string\"==typeof n.is?e=u.createElement(a,{is:n.is}):(e=u.createElement(a),\"select\"===a&&(u=e,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):e=u.createElementNS(e,a),e[xr]=t,e[Cr]=n,Fo(e,t),t.stateNode=e,u=ar(a,n),a){case\"iframe\":case\"object\":case\"embed\":Qt(\"load\",e),c=n;break;case\"video\":case\"audio\":for(c=0;c<Ke.length;c++)Qt(Ke[c],e);c=n;break;case\"source\":Qt(\"error\",e),c=n;break;case\"img\":case\"image\":case\"link\":Qt(\"error\",e),Qt(\"load\",e),c=n;break;case\"form\":Qt(\"reset\",e),Qt(\"submit\",e),c=n;break;case\"details\":Qt(\"toggle\",e),c=n;break;case\"input\":xe(e,n),c=Oe(e,n),Qt(\"invalid\",e),sr(r,\"onChange\");break;case\"option\":c=Ee(e,n);break;case\"select\":e._wrapperState={wasMultiple:!!n.multiple},c=i({},n,{value:void 0}),Qt(\"invalid\",e),sr(r,\"onChange\");break;case\"textarea\":De(e,n),c=Te(e,n),Qt(\"invalid\",e),sr(r,\"onChange\");break;default:c=n;}ir(a,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var d=l[s];\"style\"===s?rr(e,d):\"dangerouslySetInnerHTML\"===s?null!=(d=d?d.__html:void 0)&&Ne(e,d):\"children\"===s?\"string\"==typeof d?(\"textarea\"!==a||\"\"!==d)&&Fe(e,d):\"number\"==typeof d&&Fe(e,\"\"+d):\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&\"autoFocus\"!==s&&(C.hasOwnProperty(s)?null!=d&&sr(r,s):null!=d&&Z(e,s,d,u));}switch(a){case\"input\":_e(e),Pe(e,n,!1);break;case\"textarea\":_e(e),Me(e);break;case\"option\":null!=n.value&&e.setAttribute(\"value\",\"\"+be(n.value));break;case\"select\":e.multiple=!!n.multiple,null!=(r=n.value)?Ae(e,!!n.multiple,r,!1):null!=n.defaultValue&&Ae(e,!!n.multiple,n.defaultValue,!0);break;default:\"function\"==typeof c.onClick&&(e.onclick=ur);}gr(a,n)&&(t.effectTag|=4);}null!==t.ref&&(t.effectTag|=128);}return null;case 6:if(e&&null!=t.stateNode)zo(0,t,e.memoizedProps,n);else{if(\"string\"!=typeof n&&null===t.stateNode)throw Error(o(166));r=Ta(Aa.current),Ta(ja.current),jo(t)?(r=t.stateNode,n=t.memoizedProps,r[xr]=t,r.nodeValue!==n&&(t.effectTag|=4)):((r=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[xr]=t,t.stateNode=r);}return null;case 13:return ui(Ba),n=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=r,t):(r=null!==n,n=!1,null===e?void 0!==t.memoizedProps.fallback&&jo(t):(n=null!==(a=e.memoizedState),r||null===a||null!==(a=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=a,a.nextEffect=s):(t.firstEffect=t.lastEffect=a,a.nextEffect=null),a.effectTag=8)),r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ba.current)?js===_s&&(js=Ss):(js!==_s&&js!==Ss||(js=Os),0!==Is&&null!==Cs&&(Mu(Cs,Ps),ku(Cs,Is)))),(r||n)&&(t.effectTag|=4),null);case 4:return Ia(),null;case 10:return ea(t),null;case 17:return hi(t.type)&&gi(),null;case 19:if(ui(Ba),null===(n=t.memoizedState))return null;if(a=0!=(64&t.effectTag),null===(s=n.rendering)){if(a)Xo(n,!1);else if(js!==_s||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Va(s))){for(t.effectTag|=64,Xo(n,!1),null!==(a=e.updateQueue)&&(t.updateQueue=a,t.effectTag|=4),null===n.lastEffect&&(t.firstEffect=null),t.lastEffect=n.lastEffect,n=t.child;null!==n;)s=r,(a=n).effectTag&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(e=a.alternate)?(a.childExpirationTime=0,a.expirationTime=s,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null):(a.childExpirationTime=e.childExpirationTime,a.expirationTime=e.expirationTime,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,s=e.dependencies,a.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),n=n.sibling;return ci(Ba,1&Ba.current|2),t.child;}s=s.sibling;}}else{if(!a)if(null!==(e=Va(s))){if(t.effectTag|=64,a=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.effectTag|=4),Xo(n,!0),null===n.tail&&\"hidden\"===n.tailMode&&!s.alternate)return null!==(t=t.lastEffect=n.lastEffect)&&(t.nextEffect=null),null;}else 2*Ni()-n.renderingStartTime>n.tailExpiration&&1<r&&(t.effectTag|=64,a=!0,Xo(n,!1),t.expirationTime=t.childExpirationTime=r-1);n.isBackwards?(s.sibling=t.child,t.child=s):(null!==(r=n.last)?r.sibling=s:t.child=s,n.last=s);}return null!==n.tail?(0===n.tailExpiration&&(n.tailExpiration=Ni()+500),r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=Ni(),r.sibling=null,t=Ba.current,ci(Ba,a?1&t|2:1&t),r):null;}throw Error(o(156,t.tag));}function Zo(e){switch(e.tag){case 1:hi(e.type)&&gi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ia(),ui(fi),ui(di),0!=(64&(t=e.effectTag)))throw Error(o(285));return e.effectTag=-4097&t|64,e;case 5:return ka(e),null;case 13:return ui(Ba),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ui(Ba),null;case 4:return Ia(),null;case 10:return ea(e),null;default:return null;}}function Jo(e,t){return{value:e,source:t,stack:ve(t)};}Fo=function Fo(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue;}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return;}r.sibling.return=r.return,r=r.sibling;}},Uo=function Uo(e,t,r,n,a){var o=e.memoizedProps;if(o!==n){var s,u,c=t.stateNode;switch(Ta(ja.current),e=null,r){case\"input\":o=Oe(c,o),n=Oe(c,n),e=[];break;case\"option\":o=Ee(c,o),n=Ee(c,n),e=[];break;case\"select\":o=i({},o,{value:void 0}),n=i({},n,{value:void 0}),e=[];break;case\"textarea\":o=Te(c,o),n=Te(c,n),e=[];break;default:\"function\"!=typeof o.onClick&&\"function\"==typeof n.onClick&&(c.onclick=ur);}for(s in ir(r,n),r=null,o)if(!n.hasOwnProperty(s)&&o.hasOwnProperty(s)&&null!=o[s])if(\"style\"===s)for(u in c=o[s])c.hasOwnProperty(u)&&(r||(r={}),r[u]=\"\");else\"dangerouslySetInnerHTML\"!==s&&\"children\"!==s&&\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&\"autoFocus\"!==s&&(C.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in n){var l=n[s];if(c=null!=o?o[s]:void 0,n.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if(\"style\"===s){if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(r||(r={}),r[u]=\"\");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(r||(r={}),r[u]=l[u]);}else r||(e||(e=[]),e.push(s,r)),r=l;}else\"dangerouslySetInnerHTML\"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):\"children\"===s?c===l||\"string\"!=typeof l&&\"number\"!=typeof l||(e=e||[]).push(s,\"\"+l):\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&(C.hasOwnProperty(s)?(null!=l&&sr(a,s),e||c===l||(e=[])):(e=e||[]).push(s,l));}r&&(e=e||[]).push(\"style\",r),a=e,(t.updateQueue=a)&&(t.effectTag|=4);}},zo=function zo(e,t,r,n){r!==n&&(t.effectTag|=4);};var $o=\"function\"==typeof WeakSet?WeakSet:Set;function es(e,t){var r=t.source,n=t.stack;null===n&&null!==r&&(n=ve(r)),null!==r&&ge(r.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t);}catch(e){setTimeout(function(){throw e;});}}function ts(e){var t=e.ref;if(null!==t)if(\"function\"==typeof t)try{t(null);}catch(t){bu(e,t);}else t.current=null;}function rs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var r=e.memoizedProps,n=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?r:Yi(t.type,r),n),e.__reactInternalSnapshotBeforeUpdate=t;}return;case 3:case 5:case 6:case 4:case 17:return;}throw Error(o(163));}function ns(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.destroy;r.destroy=void 0,void 0!==n&&n();}r=r.next;}while(r!==t);}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n();}r=r.next;}while(r!==t);}}function as(e,t,r){switch(r.tag){case 0:case 11:case 15:case 22:return void is(3,r);case 1:if(e=r.stateNode,4&r.effectTag)if(null===t)e.componentDidMount();else{var n=r.elementType===r.type?t.memoizedProps:Yi(r.type,t.memoizedProps);e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate);}return void(null!==(t=r.updateQueue)&&da(r,t,e));case 3:if(null!==(t=r.updateQueue)){if(e=null,null!==r.child)switch(r.child.tag){case 5:e=r.child.stateNode;break;case 1:e=r.child.stateNode;}da(r,t,e);}return;case 5:return e=r.stateNode,void(null===t&&4&r.effectTag&&gr(r.type,r.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===r.memoizedState&&(r=r.alternate,null!==r&&(r=r.memoizedState,null!==r&&(r=r.dehydrated,null!==r&&Vt(r)))));case 19:case 17:case 20:case 21:return;}throw Error(o(163));}function os(e,t,r){switch(\"function\"==typeof Ou&&Ou(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e.next;zi(97<r?97:r,function(){var e=n;do{var r=e.destroy;if(void 0!==r){var i=t;try{r();}catch(e){bu(i,e);}}e=e.next;}while(e!==n);});}break;case 1:ts(t),\"function\"==typeof(r=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount();}catch(t){bu(e,t);}}(t,r);break;case 5:ts(t);break;case 4:ls(e,t,r);}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t);}function us(e){return 5===e.tag||3===e.tag||4===e.tag;}function cs(e){e:{for(var t=e.return;null!==t;){if(us(t)){var r=t;break e;}t=t.return;}throw Error(o(160));}switch(t=r.stateNode,r.tag){case 5:var n=!1;break;case 3:case 4:t=t.containerInfo,n=!0;break;default:throw Error(o(161));}16&r.effectTag&&(Fe(t,\"\"),r.effectTag&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||us(r.return)){r=null;break e;}r=r.return;}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag&&18!==r.tag;){if(2&r.effectTag)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child;}if(!(2&r.effectTag)){r=r.stateNode;break e;}}n?function e(t,r,n){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,r?8===n.nodeType?n.parentNode.insertBefore(t,r):n.insertBefore(t,r):(8===n.nodeType?(r=n.parentNode).insertBefore(t,n):(r=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==r.onclick||(r.onclick=ur));else if(4!==i&&null!==(t=t.child))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling;}(e,r,t):function e(t,r,n){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,r?n.insertBefore(t,r):n.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling;}(e,r,t);}function ls(e,t,r){for(var n,i,a=t,s=!1;;){if(!s){s=a.return;e:for(;;){if(null===s)throw Error(o(160));switch(n=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:n=n.containerInfo,i=!0;break e;}s=s.return;}s=!0;}if(5===a.tag||6===a.tag){e:for(var u=e,c=a,l=r,d=c;;)if(os(u,d,l),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===c)break e;for(;null===d.sibling;){if(null===d.return||d.return===c)break e;d=d.return;}d.sibling.return=d.return,d=d.sibling;}i?(u=n,c=a.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):n.removeChild(a.stateNode);}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue;}}else if(os(e,a,r),null!==a.child){a.child.return=a,a=a.child;continue;}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(s=!1);}a.sibling.return=a.return,a=a.sibling;}}function ds(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ns(3,t);case 1:return;case 5:var r=t.stateNode;if(null!=r){var n=t.memoizedProps,i=null!==e?e.memoizedProps:n;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(r[Cr]=n,\"input\"===e&&\"radio\"===n.type&&null!=n.name&&Ce(r,n),ar(e,i),t=ar(e,n),i=0;i<a.length;i+=2){var s=a[i],u=a[i+1];\"style\"===s?rr(r,u):\"dangerouslySetInnerHTML\"===s?Ne(r,u):\"children\"===s?Fe(r,u):Z(r,s,u,t);}switch(e){case\"input\":we(r,n);break;case\"textarea\":Ie(r,n);break;case\"select\":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,null!=(e=n.value)?Ae(r,!!n.multiple,e,!1):t!==!!n.multiple&&(null!=n.defaultValue?Ae(r,!!n.multiple,n.defaultValue,!0):Ae(r,!!n.multiple,n.multiple?[]:\"\",!1));}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Vt(t.containerInfo)));case 12:return;case 13:if(r=t,null===t.memoizedState?n=!1:(n=!0,r=t.child,ks=Ni()),null!==r)e:for(e=r;;){if(5===e.tag)a=e.stateNode,n?\"function\"==typeof(a=a.style).setProperty?a.setProperty(\"display\",\"none\",\"important\"):a.display=\"none\":(a=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty(\"display\")?i.display:null,a.style.display=tr(\"display\",i));else if(6===e.tag)e.stateNode.nodeValue=n?\"\":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(a=e.child.sibling).return=e,e=a;continue;}if(null!==e.child){e.child.return=e,e=e.child;continue;}}if(e===r)break;for(;null===e.sibling;){if(null===e.return||e.return===r)break e;e=e.return;}e.sibling.return=e.return,e=e.sibling;}return void fs(t);case 19:return void fs(t);case 17:return;}throw Error(o(163));}function fs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new $o()),t.forEach(function(t){var n=_u.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n));});}}var ps=\"function\"==typeof WeakMap?WeakMap:Map;function ms(e,t,r){(r=sa(r,null)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Vs||(Vs=!0,Rs=n),es(e,t);},r;}function hs(e,t,r){(r=sa(r,null)).tag=3;var n=e.type.getDerivedStateFromError;if(\"function\"==typeof n){var i=t.value;r.payload=function(){return es(e,t),n(i);};}var a=e.stateNode;return null!==a&&\"function\"==typeof a.componentDidCatch&&(r.callback=function(){\"function\"!=typeof n&&(null===Ls?Ls=new Set([this]):Ls.add(this),es(e,t));var r=t.stack;this.componentDidCatch(t.value,{componentStack:null!==r?r:\"\"});}),r;}var gs,vs=Math.ceil,bs=K.ReactCurrentDispatcher,ys=K.ReactCurrentOwner,_s=0,Ss=3,Os=4,xs=0,Cs=null,ws=null,Ps=0,js=_s,Es=null,As=1073741823,Ts=1073741823,Ds=null,Is=0,Ms=!1,ks=0,Bs=null,Vs=!1,Rs=null,Ls=null,Ns=!1,Fs=null,Us=90,zs=null,Hs=0,Gs=null,qs=0;function Ws(){return 0!=(48&xs)?1073741821-(Ni()/10|0):0!==qs?qs:qs=1073741821-(Ni()/10|0);}function Qs(e,t,r){if(0==(2&(t=t.mode)))return 1073741823;var n=Fi();if(0==(4&t))return 99===n?1073741823:1073741822;if(0!=(16&xs))return Ps;if(null!==r)e=Qi(e,0|r.timeoutMs||5e3,250);else switch(n){case 99:e=1073741823;break;case 98:e=Qi(e,150,100);break;case 97:case 96:e=Qi(e,5e3,250);break;case 95:e=2;break;default:throw Error(o(326));}return null!==Cs&&e===Ps&&--e,e;}function Ys(e,t){if(50<Hs)throw Hs=0,Gs=null,Error(o(185));if(null!==(e=Xs(e,t))){var r=Fi();1073741823===t?0!=(8&xs)&&0==(48&xs)?$s(e):(Zs(e),0===xs&&qi()):Zs(e),0==(4&xs)||98!==r&&99!==r||(null===zs?zs=new Map([[e,t]]):(void 0===(r=zs.get(e))||r>t)&&zs.set(e,t));}}function Xs(e,t){e.expirationTime<t&&(e.expirationTime=t);var r=e.alternate;null!==r&&r.expirationTime<t&&(r.expirationTime=t);var n=e.return,i=null;if(null===n&&3===e.tag)i=e.stateNode;else for(;null!==n;){if(r=n.alternate,n.childExpirationTime<t&&(n.childExpirationTime=t),null!==r&&r.childExpirationTime<t&&(r.childExpirationTime=t),null===n.return&&3===n.tag){i=n.stateNode;break;}n=n.return;}return null!==i&&(Cs===i&&(ou(t),js===Os&&Mu(i,Ps)),ku(i,t)),i;}function Ks(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Iu(e,t=e.firstPendingTime))return t;var r=e.lastPingedTime;return 2>=(e=r>(e=e.nextKnownPendingLevel)?r:e)&&t!==e?0:e;}function Zs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Gi($s.bind(null,e));else{var t=Ks(e),r=e.callbackNode;if(0===t)null!==r&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var n=Ws();if(1073741823===t?n=99:1===t||2===t?n=95:n=0>=(n=10*(1073741821-t)-10*(1073741821-n))?99:250>=n?98:5250>=n?97:95,null!==r){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=n)return;r!==Ii&&xi(r);}e.callbackExpirationTime=t,e.callbackPriority=n,t=1073741823===t?Gi($s.bind(null,e)):Hi(n,Js.bind(null,e),{timeout:10*(1073741821-t)-Ni()}),e.callbackNode=t;}}}function Js(e,t){if(qs=0,t)return Bu(e,t=Ws()),Zs(e),null;var r=Ks(e);if(0!==r){if(t=e.callbackNode,0!=(48&xs))throw Error(o(327));if(hu(),e===Cs&&r===Ps||ru(e,r),null!==ws){var n=xs;xs|=16;for(var i=iu();;)try{uu();break;}catch(t){nu(e,t);}if($i(),xs=n,bs.current=i,1===js)throw t=Es,ru(e,r),Mu(e,r),Zs(e),t;if(null===ws)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=r,n=js,Cs=null,n){case _s:case 1:throw Error(o(345));case 2:Bu(e,2<r?2:r);break;case Ss:if(Mu(e,r),r===(n=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=du(i)),1073741823===As&&10<(i=ks+500-Ni())){if(Ms){var a=e.lastPingedTime;if(0===a||a>=r){e.lastPingedTime=r,ru(e,r);break;}}if(0!==(a=Ks(e))&&a!==r)break;if(0!==n&&n!==r){e.lastPingedTime=n;break;}e.timeoutHandle=br(fu.bind(null,e),i);break;}fu(e);break;case Os:if(Mu(e,r),r===(n=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=du(i)),Ms&&(0===(i=e.lastPingedTime)||i>=r)){e.lastPingedTime=r,ru(e,r);break;}if(0!==(i=Ks(e))&&i!==r)break;if(0!==n&&n!==r){e.lastPingedTime=n;break;}if(1073741823!==Ts?n=10*(1073741821-Ts)-Ni():1073741823===As?n=0:(n=10*(1073741821-As)-5e3,0>(n=(i=Ni())-n)&&(n=0),(r=10*(1073741821-r)-i)<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vs(n/1960))-n)&&(n=r)),10<n){e.timeoutHandle=br(fu.bind(null,e),n);break;}fu(e);break;case 5:if(1073741823!==As&&null!==Ds){a=As;var s=Ds;if(0>=(n=0|s.busyMinDurationMs)?n=0:(i=0|s.busyDelayMs,n=(a=Ni()-(10*(1073741821-a)-(0|s.timeoutMs||5e3)))<=i?0:i+n-a),10<n){Mu(e,r),e.timeoutHandle=br(fu.bind(null,e),n);break;}}fu(e);break;default:throw Error(o(329));}if(Zs(e),e.callbackNode===t)return Js.bind(null,e);}}return null;}function $s(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&xs))throw Error(o(327));if(hu(),e===Cs&&t===Ps||ru(e,t),null!==ws){var r=xs;xs|=16;for(var n=iu();;)try{su();break;}catch(t){nu(e,t);}if($i(),xs=r,bs.current=n,1===js)throw r=Es,ru(e,t),Mu(e,t),Zs(e),r;if(null!==ws)throw Error(o(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Cs=null,fu(e),Zs(e);}return null;}function eu(e,t){var r=xs;xs|=1;try{return e(t);}finally{0===(xs=r)&&qi();}}function tu(e,t){var r=xs;xs&=-2,xs|=8;try{return e(t);}finally{0===(xs=r)&&qi();}}function ru(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,yr(r)),null!==ws)for(r=ws.return;null!==r;){var n=r;switch(n.tag){case 1:null!=(n=n.type.childContextTypes)&&gi();break;case 3:Ia(),ui(fi),ui(di);break;case 5:ka(n);break;case 4:Ia();break;case 13:case 19:ui(Ba);break;case 10:ea(n);}r=r.return;}Cs=e,ws=Pu(e.current,null),Ps=t,js=_s,Es=null,Ts=As=1073741823,Ds=null,Is=0,Ms=!1;}function nu(e,t){for(;;){try{if($i(),La.current=go,Ga)for(var r=Ua.memoizedState;null!==r;){var n=r.queue;null!==n&&(n.pending=null),r=r.next;}if(Fa=0,Ha=za=Ua=null,Ga=!1,null===ws||null===ws.return)return js=1,Es=t,ws=null;e:{var i=e,a=ws.return,o=ws,s=t;if(t=Ps,o.effectTag|=2048,o.firstEffect=o.lastEffect=null,null!==s&&\"object\"==typeof_default()(s)&&\"function\"==typeof s.then){var u=s;if(0==(2&o.mode)){var c=o.alternate;c?(o.updateQueue=c.updateQueue,o.memoizedState=c.memoizedState,o.expirationTime=c.expirationTime):(o.updateQueue=null,o.memoizedState=null);}var l=0!=(1&Ba.current),d=a;do{var f;if(f=13===d.tag){var p=d.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=d.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!l);}}if(f){var h=d.updateQueue;if(null===h){var g=new Set();g.add(u),d.updateQueue=g;}else h.add(u);if(0==(2&d.mode)){if(d.effectTag|=64,o.effectTag&=-2981,1===o.tag)if(null===o.alternate)o.tag=17;else{var v=sa(1073741823,null);v.tag=2,ua(o,v);}o.expirationTime=1073741823;break e;}s=void 0,o=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new ps(),s=new Set(),b.set(u,s)):void 0===(s=b.get(u))&&(s=new Set(),b.set(u,s)),!s.has(o)){s.add(o);var y=yu.bind(null,i,u,o);u.then(y,y);}d.effectTag|=4096,d.expirationTime=t;break e;}d=d.return;}while(null!==d);s=Error((ge(o.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\"+ve(o));}5!==js&&(js=2),s=Jo(s,o),d=a;do{switch(d.tag){case 3:u=s,d.effectTag|=4096,d.expirationTime=t,ca(d,ms(d,u,t));break e;case 1:u=s;var _=d.type,S=d.stateNode;if(0==(64&d.effectTag)&&(\"function\"==typeof _.getDerivedStateFromError||null!==S&&\"function\"==typeof S.componentDidCatch&&(null===Ls||!Ls.has(S)))){d.effectTag|=4096,d.expirationTime=t,ca(d,hs(d,u,t));break e;}}d=d.return;}while(null!==d);}ws=lu(ws);}catch(e){t=e;continue;}break;}}function iu(){var e=bs.current;return bs.current=go,null===e?go:e;}function au(e,t){e<As&&2<e&&(As=e),null!==t&&e<Ts&&2<e&&(Ts=e,Ds=t);}function ou(e){e>Is&&(Is=e);}function su(){for(;null!==ws;)ws=cu(ws);}function uu(){for(;null!==ws&&!Mi();)ws=cu(ws);}function cu(e){var t=gs(e.alternate,e,Ps);return e.memoizedProps=e.pendingProps,null===t&&(t=lu(e)),ys.current=null,t;}function lu(e){ws=e;do{var t=ws.alternate;if(e=ws.return,0==(2048&ws.effectTag)){if(t=Ko(t,ws,Ps),1===Ps||1!==ws.childExpirationTime){for(var r=0,n=ws.child;null!==n;){var i=n.expirationTime,a=n.childExpirationTime;i>r&&(r=i),a>r&&(r=a),n=n.sibling;}ws.childExpirationTime=r;}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=ws.firstEffect),null!==ws.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=ws.firstEffect),e.lastEffect=ws.lastEffect),1<ws.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=ws:e.firstEffect=ws,e.lastEffect=ws));}else{if(null!==(t=Zo(ws)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048);}if(null!==(t=ws.sibling))return t;ws=e;}while(null!==ws);return js===_s&&(js=5),null;}function du(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e;}function fu(e){var t=Fi();return zi(99,pu.bind(null,e,t)),null;}function pu(e,t){do{hu();}while(null!==Fs);if(0!=(48&xs))throw Error(o(327));var r=e.finishedWork,n=e.finishedExpirationTime;if(null===r)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,r===e.current)throw Error(o(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=du(r);if(e.firstPendingTime=i,n<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:n<=e.firstSuspendedTime&&(e.firstSuspendedTime=n-1),n<=e.lastPingedTime&&(e.lastPingedTime=0),n<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Cs&&(ws=Cs=null,Ps=0),1<r.effectTag?null!==r.lastEffect?(r.lastEffect.nextEffect=r,i=r.firstEffect):i=r:i=r.firstEffect,null!==i){var a=xs;xs|=32,ys.current=null,mr=Wt;var s=fr();if(pr(s)){if(\"selectionStart\"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{u.nodeType,d.nodeType;}catch(e){u=null;break e;}var f=0,p=-1,m=-1,h=0,g=0,v=s,b=null;t:for(;;){for(var y;v!==u||0!==l&&3!==v.nodeType||(p=f+l),v!==d||0!==c&&3!==v.nodeType||(m=f+c),3===v.nodeType&&(f+=v.nodeValue.length),null!==(y=v.firstChild);)b=v,v=y;for(;;){if(v===s)break t;if(b===u&&++h===l&&(p=f),b===d&&++g===c&&(m=f),null!==(y=v.nextSibling))break;b=(v=b).parentNode;}v=y;}u=-1===p||-1===m?null:{start:p,end:m};}else u=null;}u=u||{start:0,end:0};}else u=null;hr={activeElementDetached:null,focusedElem:s,selectionRange:u},Wt=!1,Bs=i;do{try{mu();}catch(e){if(null===Bs)throw Error(o(330));bu(Bs,e),Bs=Bs.nextEffect;}}while(null!==Bs);Bs=i;do{try{for(s=e,u=t;null!==Bs;){var _=Bs.effectTag;if(16&_&&Fe(Bs.stateNode,\"\"),128&_){var S=Bs.alternate;if(null!==S){var O=S.ref;null!==O&&(\"function\"==typeof O?O(null):O.current=null);}}switch(1038&_){case 2:cs(Bs),Bs.effectTag&=-3;break;case 6:cs(Bs),Bs.effectTag&=-3,ds(Bs.alternate,Bs);break;case 1024:Bs.effectTag&=-1025;break;case 1028:Bs.effectTag&=-1025,ds(Bs.alternate,Bs);break;case 4:ds(Bs.alternate,Bs);break;case 8:ls(s,l=Bs,u),ss(l);}Bs=Bs.nextEffect;}}catch(e){if(null===Bs)throw Error(o(330));bu(Bs,e),Bs=Bs.nextEffect;}}while(null!==Bs);if(O=hr,S=fr(),_=O.focusedElem,u=O.selectionRange,S!==_&&_&&_.ownerDocument&&function e(t,r){return!(!t||!r)&&(t===r||(!t||3!==t.nodeType)&&(r&&3===r.nodeType?e(t,r.parentNode):\"contains\"in t?t.contains(r):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(r))));}(_.ownerDocument.documentElement,_)){null!==u&&pr(_)&&(S=u.start,void 0===(O=u.end)&&(O=S),\"selectionStart\"in _?(_.selectionStart=S,_.selectionEnd=Math.min(O,_.value.length)):(O=(S=_.ownerDocument||document)&&S.defaultView||window).getSelection&&(O=O.getSelection(),l=_.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!O.extend&&s>u&&(l=u,u=s,s=l),l=dr(_,s),d=dr(_,u),l&&d&&(1!==O.rangeCount||O.anchorNode!==l.node||O.anchorOffset!==l.offset||O.focusNode!==d.node||O.focusOffset!==d.offset)&&((S=S.createRange()).setStart(l.node,l.offset),O.removeAllRanges(),s>u?(O.addRange(S),O.extend(d.node,d.offset)):(S.setEnd(d.node,d.offset),O.addRange(S))))),S=[];for(O=_;O=O.parentNode;)1===O.nodeType&&S.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(\"function\"==typeof _.focus&&_.focus(),_=0;_<S.length;_++)(O=S[_]).element.scrollLeft=O.left,O.element.scrollTop=O.top;}Wt=!!mr,hr=mr=null,e.current=r,Bs=i;do{try{for(_=e;null!==Bs;){var x=Bs.effectTag;if(36&x&&as(_,Bs.alternate,Bs),128&x){S=void 0;var C=Bs.ref;if(null!==C){var w=Bs.stateNode;switch(Bs.tag){case 5:S=w;break;default:S=w;}\"function\"==typeof C?C(S):C.current=S;}}Bs=Bs.nextEffect;}}catch(e){if(null===Bs)throw Error(o(330));bu(Bs,e),Bs=Bs.nextEffect;}}while(null!==Bs);Bs=null,ki(),xs=a;}else e.current=r;if(Ns)Ns=!1,Fs=e,Us=t;else for(Bs=i;null!==Bs;)t=Bs.nextEffect,Bs.nextEffect=null,Bs=t;if(0===(t=e.firstPendingTime)&&(Ls=null),1073741823===t?e===Gs?Hs++:(Hs=0,Gs=e):Hs=0,\"function\"==typeof Su&&Su(r.stateNode,n),Zs(e),Vs)throw Vs=!1,e=Rs,Rs=null,e;return 0!=(8&xs)||qi(),null;}function mu(){for(;null!==Bs;){var e=Bs.effectTag;0!=(256&e)&&rs(Bs.alternate,Bs),0==(512&e)||Ns||(Ns=!0,Hi(97,function(){return hu(),null;})),Bs=Bs.nextEffect;}}function hu(){if(90!==Us){var e=97<Us?97:Us;return Us=90,zi(e,gu);}}function gu(){if(null===Fs)return!1;var e=Fs;if(Fs=null,0!=(48&xs))throw Error(o(331));var t=xs;for(xs|=32,e=e.current.firstEffect;null!==e;){try{var r=e;if(0!=(512&r.effectTag))switch(r.tag){case 0:case 11:case 15:case 22:ns(5,r),is(5,r);}}catch(t){if(null===e)throw Error(o(330));bu(e,t);}r=e.nextEffect,e.nextEffect=null,e=r;}return xs=t,qi(),!0;}function vu(e,t,r){ua(e,t=ms(e,t=Jo(r,t),1073741823)),null!==(e=Xs(e,1073741823))&&Zs(e);}function bu(e,t){if(3===e.tag)vu(e,e,t);else for(var r=e.return;null!==r;){if(3===r.tag){vu(r,e,t);break;}if(1===r.tag){var n=r.stateNode;if(\"function\"==typeof r.type.getDerivedStateFromError||\"function\"==typeof n.componentDidCatch&&(null===Ls||!Ls.has(n))){ua(r,e=hs(r,e=Jo(t,e),1073741823)),null!==(r=Xs(r,1073741823))&&Zs(r);break;}}r=r.return;}}function yu(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),Cs===e&&Ps===r?js===Os||js===Ss&&1073741823===As&&Ni()-ks<500?ru(e,Ps):Ms=!0:Iu(e,r)&&(0!==(t=e.lastPingedTime)&&t<r||(e.lastPingedTime=r,Zs(e)));}function _u(e,t){var r=e.stateNode;null!==r&&r.delete(t),0===(t=0)&&(t=Qs(t=Ws(),e,null)),null!==(e=Xs(e,t))&&Zs(e);}gs=function gs(e,t,r){var n=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||fi.current)To=!0;else{if(n<r){switch(To=!1,t.tag){case 3:No(t),Eo();break;case 5:if(Ma(t),4&t.mode&&1!==r&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:hi(t.type)&&yi(t);break;case 4:Da(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value,i=t.type._context,ci(Xi,i._currentValue),i._currentValue=n;break;case 13:if(null!==t.memoizedState)return 0!==(n=t.child.childExpirationTime)&&n>=r?Go(e,t,r):(ci(Ba,1&Ba.current),null!==(t=Yo(e,t,r))?t.sibling:null);ci(Ba,1&Ba.current);break;case 19:if(n=t.childExpirationTime>=r,0!=(64&e.effectTag)){if(n)return Qo(e,t,r);t.effectTag|=64;}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),ci(Ba,Ba.current),!n)return null;}return Yo(e,t,r);}To=!1;}}else To=!1;switch(t.expirationTime=0,t.tag){case 2:if(n=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=mi(t,di.current),ra(t,r),i=Qa(null,t,n,e,i,r),t.effectTag|=1,\"object\"==typeof_default()(i)&&null!==i&&\"function\"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,hi(n)){var a=!0;yi(t);}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,aa(t);var s=n.getDerivedStateFromProps;\"function\"==typeof s&&ma(t,n,s,e),i.updater=ha,t.stateNode=i,i._reactInternalFiber=t,ya(t,n,e,r),t=Lo(null,t,n,!0,a,r);}else t.tag=0,Do(null,t,i,r),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t);},function(t){0===e._status&&(e._status=2,e._result=t);});}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=function(e){if(\"function\"==typeof e)return wu(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===de)return 14;}return 2;}(i),e=Yi(i,e),a){case 0:t=Vo(null,t,i,e,r);break e;case 1:t=Ro(null,t,i,e,r);break e;case 11:t=Io(null,t,i,e,r);break e;case 14:t=Mo(null,t,i,Yi(i.type,e),n,r);break e;}throw Error(o(306,i,\"\"));}return t;case 0:return n=t.type,i=t.pendingProps,Vo(e,t,n,i=t.elementType===n?i:Yi(n,i),r);case 1:return n=t.type,i=t.pendingProps,Ro(e,t,n,i=t.elementType===n?i:Yi(n,i),r);case 3:if(No(t),n=t.updateQueue,null===e||null===n)throw Error(o(282));if(n=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,oa(e,t),la(t,n,null,r),(n=t.memoizedState.element)===i)Eo(),t=Yo(e,t,r);else{if((i=t.stateNode.hydrate)&&(So=_r(t.stateNode.containerInfo.firstChild),_o=t,i=Oo=!0),i)for(r=wa(t,null,n,r),t.child=r;r;)r.effectTag=-3&r.effectTag|1024,r=r.sibling;else Do(e,t,n,r),Eo();t=t.child;}return t;case 5:return Ma(t),null===e&&wo(t),n=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,vr(n,i)?s=null:null!==a&&vr(n,a)&&(t.effectTag|=16),Bo(e,t),4&t.mode&&1!==r&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Do(e,t,s,r),t=t.child),t;case 6:return null===e&&wo(t),null;case 13:return Go(e,t,r);case 4:return Da(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=Ca(t,null,n,r):Do(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,Io(e,t,n,i=t.elementType===n?i:Yi(n,i),r);case 7:return Do(e,t,t.pendingProps,r),t.child;case 8:case 12:return Do(e,t,t.pendingProps.children,r),t.child;case 10:e:{n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value;var u=t.type._context;if(ci(Xi,u._currentValue),u._currentValue=a,null!==s)if(u=s.value,0===(a=Rn(u,a)?0:0|(\"function\"==typeof n._calculateChangedBits?n._calculateChangedBits(u,a):1073741823))){if(s.children===i.children&&!fi.current){t=Yo(e,t,r);break e;}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===n&&0!=(l.observedBits&a)){1===u.tag&&((l=sa(r,null)).tag=2,ua(u,l)),u.expirationTime<r&&(u.expirationTime=r),null!==(l=u.alternate)&&l.expirationTime<r&&(l.expirationTime=r),ta(u.return,r),c.expirationTime<r&&(c.expirationTime=r);break;}l=l.next;}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break;}if(null!==(u=s.sibling)){u.return=s.return,s=u;break;}s=s.return;}u=s;}Do(e,t,i.children,r),t=t.child;}return t;case 9:return i=t.type,n=(a=t.pendingProps).children,ra(t,r),n=n(i=na(i,a.unstable_observedBits)),t.effectTag|=1,Do(e,t,n,r),t.child;case 14:return a=Yi(i=t.type,t.pendingProps),Mo(e,t,i,a=Yi(i.type,a),n,r);case 15:return ko(e,t,t.type,t.pendingProps,n,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yi(n,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,hi(n)?(e=!0,yi(t)):e=!1,ra(t,r),va(t,n,i),ya(t,n,i,r),Lo(null,t,n,!0,e,r);case 19:return Qo(e,t,r);}throw Error(o(156,t.tag));};var Su=null,Ou=null;function xu(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null;}function Cu(e,t,r,n){return new xu(e,t,r,n);}function wu(e){return!(!(e=e.prototype)||!e.isReactComponent);}function Pu(e,t){var r=e.alternate;return null===r?((r=Cu(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childExpirationTime=e.childExpirationTime,r.expirationTime=e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r;}function ju(e,t,r,n,i,a){var s=2;if(n=e,\"function\"==typeof e)wu(e)&&(s=1);else if(\"string\"==typeof e)s=5;else e:switch(e){case re:return Eu(r.children,i,a,t);case se:s=8,i|=7;break;case ne:s=8,i|=1;break;case ie:return(e=Cu(12,r,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=a,e;case ce:return(e=Cu(13,r,t,i)).type=ce,e.elementType=ce,e.expirationTime=a,e;case le:return(e=Cu(19,r,t,i)).elementType=le,e.expirationTime=a,e;default:if(\"object\"==typeof_default()(e)&&null!==e)switch(e.$$typeof){case ae:s=10;break e;case oe:s=9;break e;case ue:s=11;break e;case de:s=14;break e;case fe:s=16,n=null;break e;case pe:s=22;break e;}throw Error(o(130,null==e?e:typeof_default()(e),\"\"));}return(t=Cu(s,r,t,i)).elementType=e,t.type=n,t.expirationTime=a,t;}function Eu(e,t,r,n){return(e=Cu(7,e,n,t)).expirationTime=r,e;}function Au(e,t,r){return(e=Cu(6,e,null,t)).expirationTime=r,e;}function Tu(e,t,r){return(t=Cu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t;}function Du(e,t,r){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0;}function Iu(e,t){var r=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==r&&r>=t&&e<=t;}function Mu(e,t){var r=e.firstSuspendedTime,n=e.lastSuspendedTime;r<t&&(e.firstSuspendedTime=t),(n>t||0===r)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0);}function ku(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var r=e.firstSuspendedTime;0!==r&&(t>=r?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t));}function Bu(e,t){var r=e.lastExpiredTime;(0===r||r>t)&&(e.lastExpiredTime=t);}function Vu(e,t,r,n){var i=t.current,a=Ws(),s=fa.suspense;a=Qs(a,i,s);e:if(r){t:{if($e(r=r._reactInternalFiber)!==r||1!==r.tag)throw Error(o(170));var u=r;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(hi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t;}}u=u.return;}while(null!==u);throw Error(o(171));}if(1===r.tag){var c=r.type;if(hi(c)){r=bi(r,c,u);break e;}}r=u;}else r=li;return null===t.context?t.context=r:t.pendingContext=r,(t=sa(a,s)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),ua(i,t),Ys(i,a),a;}function Ru(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode;}}function Lu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t);}function Nu(e,t){Lu(e,t),(e=e.alternate)&&Lu(e,t);}function Fu(e,t,r){var n=new Du(e,t,r=null!=r&&!0===r.hydrate),i=Cu(3,null,null,2===t?7:1===t?3:0);n.current=i,i.stateNode=n,aa(i),e[wr]=n.current,r&&0!==t&&function(e,t){var r=Je(t);Pt.forEach(function(e){mt(e,t,r);}),jt.forEach(function(e){mt(e,t,r);});}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=n;}function Uu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||\" react-mount-point-unstable \"!==e.nodeValue));}function zu(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a._internalRoot;if(\"function\"==typeof i){var s=i;i=function i(){var e=Ru(o);s.call(e);};}Vu(t,o,e,i);}else{if(a=r._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute(\"data-reactroot\"))),!t)for(var r;r=e.lastChild;)e.removeChild(r);return new Fu(e,0,t?{hydrate:!0}:void 0);}(r,n),o=a._internalRoot,\"function\"==typeof i){var u=i;i=function i(){var e=Ru(o);u.call(e);};}tu(function(){Vu(t,o,e,i);});}return Ru(o);}function Hu(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==n?null:\"\"+n,children:e,containerInfo:t,implementation:r};}function Gu(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uu(t))throw Error(o(200));return Hu(e,t,null,r);}Fu.prototype.render=function(e){Vu(e,this._internalRoot,null,null);},Fu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Vu(null,e,null,function(){t[wr]=null;});},ht=function ht(e){if(13===e.tag){var t=Qi(Ws(),150,100);Ys(e,t),Nu(e,t);}},gt=function gt(e){13===e.tag&&(Ys(e,3),Nu(e,3));},vt=function vt(e){if(13===e.tag){var t=Ws();Ys(e,t=Qs(t,e,null)),Nu(e,t);}},E=function E(e,t,r){switch(t){case\"input\":if(we(e,r),t=r.name,\"radio\"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+t)+'][type=\"radio\"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Ar(n);if(!i)throw Error(o(90));Se(n),we(n,i);}}}break;case\"textarea\":Ie(e,r);break;case\"select\":null!=(t=r.value)&&Ae(e,!!r.multiple,t,!1);}},k=eu,B=function B(e,t,r,n,i){var a=xs;xs|=4;try{return zi(98,e.bind(null,t,r,n,i));}finally{0===(xs=a)&&qi();}},V=function V(){0==(49&xs)&&(function(){if(null!==zs){var e=zs;zs=null,e.forEach(function(e,t){Bu(t,e),Zs(t);}),qi();}}(),hu());},R=function R(e,t){var r=xs;xs|=2;try{return e(t);}finally{0===(xs=r)&&qi();}};var qu,Wu,Qu={Events:[jr,Er,Ar,P,x,Vr,function(e){it(e,Br);},I,M,Zt,st,hu,{current:!1}]};Wu=(qu={findFiberByHostInstance:Pr,bundleType:0,version:\"16.13.1\",rendererPackageName:\"react-dom\"}).findFiberByHostInstance,function(e){if(\"undefined\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var r=t.inject(e);Su=function Su(e){try{t.onCommitFiberRoot(r,e,void 0,64==(64&e.current.effectTag));}catch(e){}},Ou=function Ou(e){try{t.onCommitFiberUnmount(r,e);}catch(e){}};}catch(e){}}(i({},qu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function findHostInstanceByFiber(e){return null===(e=rt(e))?null:e.stateNode;},findFiberByHostInstance:function findFiberByHostInstance(e){return Wu?Wu(e):null;},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qu,t.createPortal=Gu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if(\"function\"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)));}return e=null===(e=rt(t))?null:e.stateNode;},t.flushSync=function(e,t){if(0!=(48&xs))throw Error(o(187));var r=xs;xs|=1;try{return zi(99,e.bind(null,t));}finally{xs=r,qi();}},t.hydrate=function(e,t,r){if(!Uu(t))throw Error(o(200));return zu(null,e,t,!0,r);},t.render=function(e,t,r){if(!Uu(t))throw Error(o(200));return zu(null,e,t,!1,r);},t.unmountComponentAtNode=function(e){if(!Uu(e))throw Error(o(40));return!!e._reactRootContainer&&(tu(function(){zu(null,null,e,!1,function(){e._reactRootContainer=null,e[wr]=null;});}),!0);},t.unstable_batchedUpdates=eu,t.unstable_createPortal=function(e,t){return Gu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null);},t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Uu(r))throw Error(o(200));if(null==e||void 0===e._reactInternalFiber)throw Error(o(38));return zu(e,t,r,!1,n);},t.version=\"16.13.1\";},function(e,t,r){\"use strict\";e.exports=r(421);},function(e,t,r){\"use strict\";/** @license React v0.19.1\r\n * scheduler.production.min.js\r\n *\r\n * Copyright (c) Facebook, Inc. and its affiliates.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */var _n8,i,a,o,s;if(\"undefined\"==typeof window||\"function\"!=typeof MessageChannel){var u=null,c=null,_l=function l(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null;}catch(e){throw setTimeout(_l,0),e;}},d=Date.now();t.unstable_now=function(){return Date.now()-d;},_n8=function n(e){null!==u?setTimeout(_n8,0,e):(u=e,setTimeout(_l,0));},i=function i(e,t){c=setTimeout(e,t);},a=function a(){clearTimeout(c);},o=function o(){return!1;},s=t.unstable_forceFrameRate=function(){};}else{var f=window.performance,p=window.Date,m=window.setTimeout,h=window.clearTimeout;if(\"undefined\"!=typeof console){var g=window.cancelAnimationFrame;\"function\"!=typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\"),\"function\"!=typeof g&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\");}if(\"object\"==typeof_default()(f)&&\"function\"==typeof f.now)t.unstable_now=function(){return f.now();};else{var v=p.now();t.unstable_now=function(){return p.now()-v;};}var b=!1,y=null,_=-1,S=5,O=0;o=function o(){return t.unstable_now()>=O;},s=function s(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported\"):S=0<e?Math.floor(1e3/e):5;};var x=new MessageChannel(),C=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();O=e+S;try{y(!0,e)?C.postMessage(null):(b=!1,y=null);}catch(e){throw C.postMessage(null),e;}}else b=!1;},_n8=function _n8(e){y=e,b||(b=!0,C.postMessage(null));},i=function i(e,r){_=m(function(){e(t.unstable_now());},r);},a=function a(){h(_),_=-1;};}function w(e,t){var r=e.length;e.push(t);e:for(;;){var n=r-1>>>1,i=e[n];if(!(void 0!==i&&0<E(i,t)))break e;e[n]=t,e[r]=i,r=n;}}function P(e){return void 0===(e=e[0])?null:e;}function j(e){var t=e[0];if(void 0!==t){var r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length;n<i;){var a=2*(n+1)-1,o=e[a],s=a+1,u=e[s];if(void 0!==o&&0>E(o,r))void 0!==u&&0>E(u,o)?(e[n]=u,e[s]=r,n=s):(e[n]=o,e[a]=r,n=a);else{if(!(void 0!==u&&0>E(u,r)))break e;e[n]=u,e[s]=r,n=s;}}}return t;}return null;}function E(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id;}var A=[],T=[],D=1,I=null,M=3,k=!1,B=!1,V=!1;function R(e){for(var t=P(T);null!==t;){if(null===t.callback)j(T);else{if(!(t.startTime<=e))break;j(T),t.sortIndex=t.expirationTime,w(A,t);}t=P(T);}}function L(e){if(V=!1,R(e),!B)if(null!==P(A))B=!0,_n8(N);else{var t=P(T);null!==t&&i(L,t.startTime-e);}}function N(e,r){B=!1,V&&(V=!1,a()),k=!0;var n=M;try{for(R(r),I=P(A);null!==I&&(!(I.expirationTime>r)||e&&!o());){var s=I.callback;if(null!==s){I.callback=null,M=I.priorityLevel;var u=s(I.expirationTime<=r);r=t.unstable_now(),\"function\"==typeof u?I.callback=u:I===P(A)&&j(A),R(r);}else j(A);I=P(A);}if(null!==I)var c=!0;else{var l=P(T);null!==l&&i(L,l.startTime-r),c=!1;}return c;}finally{I=null,M=n,k=!1;}}function F(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3;}}var U=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null;},t.unstable_continueExecution=function(){B||k||(B=!0,_n8(N));},t.unstable_getCurrentPriorityLevel=function(){return M;},t.unstable_getFirstCallbackNode=function(){return P(A);},t.unstable_next=function(e){switch(M){case 1:case 2:case 3:var t=3;break;default:t=M;}var r=M;M=t;try{return e();}finally{M=r;}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3;}var r=M;M=e;try{return t();}finally{M=r;}},t.unstable_scheduleCallback=function(e,r,o){var s=t.unstable_now();if(\"object\"==typeof_default()(o)&&null!==o){var u=o.delay;u=\"number\"==typeof u&&0<u?s+u:s,o=\"number\"==typeof o.timeout?o.timeout:F(e);}else o=F(e),u=s;return e={id:D++,callback:r,priorityLevel:e,startTime:u,expirationTime:o=u+o,sortIndex:-1},u>s?(e.sortIndex=u,w(T,e),null===P(A)&&e===P(T)&&(V?a():V=!0,i(L,u-s))):(e.sortIndex=o,w(A,e),B||k||(B=!0,_n8(N))),e;},t.unstable_shouldYield=function(){var e=t.unstable_now();R(e);var r=P(A);return r!==I&&null!==I&&null!==r&&null!==r.callback&&r.startTime<=e&&r.expirationTime<I.expirationTime||o();},t.unstable_wrapCallback=function(e){var t=M;return function(){var r=M;M=t;try{return e.apply(this,arguments);}finally{M=r;}};};},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"VolumeStreamingCustomControls\",function(){return S;});var n=r(0),i=r(32),a=r(3),o=r(160),s=r(19),u=r(2),c=r(67),l=r(327),d=r(36),f=r(1),p=r(47),m=r(174),h=r(13),g=r(216),v=r(14),b={color:u.ParamDefinition.Color(p.a.black,{description:\"Display color of the volume.\"}),wireframe:u.ParamDefinition.Boolean(!1,{description:\"Control display of the volume as a wireframe.\"}),opacity:u.ParamDefinition.Numeric(.3,{min:0,max:1,step:.01},{description:\"Opacity of the volume.\"})},y=new Map([[\"em\",[-5,5]],[\"2fo-fc\",[0,3]],[\"fo-fc(+ve)\",[1,5]],[\"fo-fc(-ve)\",[-5,-1]]]),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ref=h.StateSelection.findTagInSubtree(t.plugin.state.data.tree,t.props.bCell.transform.ref,t.props.name),t.getVisible=function(){var e=t.plugin.state.data,r=t.ref;return!!r&&!e.cells.get(r).state.isHidden;},t.toggleVisible=function(){var e=t.plugin.state.data,r=t.ref;r&&Object(g.setSubtreeVisibility)(e,r,!e.cells.get(r).state.isHidden);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidUpdate=function(){this.ref=h.StateSelection.findTagInSubtree(this.plugin.state.data.tree,this.props.bCell.transform.ref,this.props.name);},t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.data.events.cell.stateUpdated,function(t){e.ref===t.ref&&e.forceUpdate();});},t.prototype.render=function(){var e=this.props,t=e.isRelative,r=e.stats,n=e.channels[e.name],i=r.min,o=r.max,u=r.mean,d=r.sigma,f=Math.round(100*(\"relative\"===n.isoValue.kind?n.isoValue.relativeValue:n.isoValue.absoluteValue))/100,p=(i-u)/d,h=(o-u)/d;if(!this.props.isUnbounded){var g=y.get(this.props.name);\"em\"===this.props.name?(p=Math.max(g[0],p),h=Math.min(g[1],h)):(p=g[0],h=g[1]);}var _=u+d*p,S=u+d*h,O=Object(m.e)(t?Math.round((S-_)/d)/100:d/100,2),x=t?p:_,C=t?h:S;return a.createElement(s.ExpandableControlRow,{label:e.label+(e.isRelative?\" σ\":\"\"),colorStripe:n.color,pivot:a.createElement(\"div\",{className:\"msp-volume-channel-inline-controls\"},a.createElement(l.a,{value:f,min:x,max:C,step:O,onChange:function onChange(r){return e.changeIso(e.name,r,t);},disabled:e.params.isDisabled,onEnter:e.params.events.onEnter}),a.createElement(s.IconButton,{svg:this.getVisible()?v.VisibilityOutlinedSvg:v.VisibilityOffOutlinedSvg,onClick:this.toggleVisible,toggleState:!1,disabled:e.params.isDisabled})),controls:a.createElement(c.ParameterControls,{onChange:function onChange(t){var r=t.name,n=t.value;return e.changeParams(e.name,r,n);},params:b,values:n,onEnter:e.params.events.onEnter,isDisabled:e.params.isDisabled})});},t;}(i.PluginUIComponent),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.changeIso=function(e,r,i){var a,o=t.props.params;t.newParams(Object(n.__assign)(Object(n.__assign)({},o),{entry:{name:o.entry.name,params:Object(n.__assign)(Object(n.__assign)({},o.entry.params),{channels:Object(n.__assign)(Object(n.__assign)({},o.entry.params.channels),(a={},a[e]=Object(n.__assign)(Object(n.__assign)({},o.entry.params.channels[e]),{isoValue:i?d.b.IsoValue.relative(r):d.b.IsoValue.absolute(r)}),a))})}}));},t.changeParams=function(e,r,i){var a,o,s=t.props.params;t.newParams(Object(n.__assign)(Object(n.__assign)({},s),{entry:{name:s.entry.name,params:Object(n.__assign)(Object(n.__assign)({},s.entry.params),{channels:Object(n.__assign)(Object(n.__assign)({},s.entry.params.channels),(a={},a[e]=Object(n.__assign)(Object(n.__assign)({},s.entry.params.channels[e]),(o={},o[r]=i,o)),a))})}}));},t.changeOption=function(e){var r=e.name,i=e.value,a=t.props.params;if(\"entry\"===r)t.newParams(Object(n.__assign)(Object(n.__assign)({},a),{entry:{name:i,params:a.entry.params}}));else{var o=t.props.b.data,s=\"em\"===o.info.kind,u=i.params.isRelative,c=o.info.header.sampling[0],l=a.entry.params.channels,d=a.entry.params.view.name===i.name?a.entry.params.view.params:t.props.info.params.entry.map(a.entry.name).params.view.map(i.name).defaultValue,f=Object(n.__assign)({},d);\"selection-box\"===i.name?f.radius=i.params.radius:\"box\"===i.name&&(f.bottomLeft=i.params.bottomLeft,f.topRight=i.params.topRight),f.isUnbounded=!!i.params.isUnbounded,t.newParams(Object(n.__assign)(Object(n.__assign)({},a),{entry:{name:a.entry.name,params:Object(n.__assign)(Object(n.__assign)({},a.entry.params),{view:{name:i.name,params:f},detailLevel:i.params.detailLevel,channels:s?{em:t.convert(l.em,c.valuesInfo[0],u)}:{\"2fo-fc\":t.convert(l[\"2fo-fc\"],c.valuesInfo[0],u),\"fo-fc(+ve)\":t.convert(l[\"fo-fc(+ve)\"],c.valuesInfo[1],u),\"fo-fc(-ve)\":t.convert(l[\"fo-fc(-ve)\"],c.valuesInfo[1],u)}})}}));}},t;}return Object(n.__extends)(t,e),t.prototype.areInitial=function(e){return u.ParamDefinition.areEqual(this.props.info.params,e,this.props.info.initialValues);},t.prototype.newParams=function(e){this.props.events.onChange(e,this.areInitial(e));},t.prototype.convert=function(e,t,r){return Object(n.__assign)(Object(n.__assign)({},e),{isoValue:r?d.b.IsoValue.toRelative(e.isoValue,t):d.b.IsoValue.toAbsolute(e.isoValue,t)});},t.prototype.render=function(){if(!this.props.b)return null;var e=this.props.b.data,t=\"em\"===e.info.kind,r=t?\"em\":\"2fo-fc\",n=this.props.params,i=this.props.info.params.entry.map(n.entry.name).params.detailLevel,s=\"relative\"===n.entry.params.channels[r].isoValue.kind,l=e.info.header.sampling[0],d=u.ParamDefinition.Boolean(s,{description:\"Use normalized or absolute isocontour scale.\",label:\"Normalized\"}),p=!!n.entry.params.view.params.isUnbounded,m=u.ParamDefinition.Boolean(p,{description:\"Show full/limited range of iso-values for more fine-grained control.\",label:\"Unbounded\"}),h=\"off\"===n.entry.params.view.name,g={entry:u.ParamDefinition.Select(n.entry.name,e.data.entries.map(function(e){return[e.dataId,e.dataId];}),{isHidden:h,description:\"Which entry with volume data to display.\"}),view:u.ParamDefinition.MappedStatic(n.entry.params.view.name,{off:u.ParamDefinition.Group({isRelative:u.ParamDefinition.Boolean(s,{isHidden:!0}),isUnbounded:u.ParamDefinition.Boolean(p,{isHidden:!0})},{description:\"Display off.\"}),box:u.ParamDefinition.Group({bottomLeft:u.ParamDefinition.Vec3(f.Vec3.zero()),topRight:u.ParamDefinition.Vec3(f.Vec3.zero()),detailLevel:i,isRelative:d,isUnbounded:m},{description:\"Static box defined by cartesian coords.\"}),\"selection-box\":u.ParamDefinition.Group({radius:u.ParamDefinition.Numeric(5,{min:0,max:50,step:.5},{description:\"Radius in Å within which the volume is shown.\"}),detailLevel:i,isRelative:d,isUnbounded:m},{description:\"Box around focused element.\"}),cell:u.ParamDefinition.Group({detailLevel:i,isRelative:d,isUnbounded:m},{description:\"Box around the structure's bounding box.\"})},{options:o.a.ViewTypeOptions,description:'Controls what of the volume is displayed. \"Off\" hides the volume alltogether. \"Bounded box\" shows the volume inside the given box. \"Around Focus\" shows the volume around the element/atom last interacted with. \"Whole Structure\" shows the volume for the whole structure.'})},v={entry:n.entry.name,view:{name:n.entry.params.view.name,params:{detailLevel:n.entry.params.detailLevel,radius:n.entry.params.view.params.radius,bottomLeft:n.entry.params.view.params.bottomLeft,topRight:n.entry.params.view.params.topRight,isRelative:s,isUnbounded:p}}};return h?a.createElement(c.ParameterControls,{onChange:this.changeOption,params:g,values:v,onEnter:this.props.events.onEnter,isDisabled:this.props.isDisabled}):a.createElement(a.Fragment,null,!t&&a.createElement(_,{label:\"2Fo-Fc\",name:\"2fo-fc\",bCell:this.props.bCell,channels:n.entry.params.channels,changeIso:this.changeIso,changeParams:this.changeParams,isRelative:s,params:this.props,stats:l.valuesInfo[0],isUnbounded:p}),!t&&a.createElement(_,{label:\"Fo-Fc(+ve)\",name:\"fo-fc(+ve)\",bCell:this.props.bCell,channels:n.entry.params.channels,changeIso:this.changeIso,changeParams:this.changeParams,isRelative:s,params:this.props,stats:l.valuesInfo[1],isUnbounded:p}),!t&&a.createElement(_,{label:\"Fo-Fc(-ve)\",name:\"fo-fc(-ve)\",bCell:this.props.bCell,channels:n.entry.params.channels,changeIso:this.changeIso,changeParams:this.changeParams,isRelative:s,params:this.props,stats:l.valuesInfo[1],isUnbounded:p}),t&&a.createElement(_,{label:\"EM\",name:\"em\",bCell:this.props.bCell,channels:n.entry.params.channels,changeIso:this.changeIso,changeParams:this.changeParams,isRelative:s,params:this.props,stats:l.valuesInfo[0],isUnbounded:p}),a.createElement(c.ParameterControls,{onChange:this.changeOption,params:g,values:v,onEnter:this.props.events.onEnter,isDisabled:this.props.isDisabled}));},t;}(i.PluginUIComponent);},function(e,t,r){\"use strict\";(function(e){/*!\r\n * The buffer module from node.js, for the browser.\r\n *\r\n * @author   Feross Aboukhadijeh <http://feross.org>\r\n * @license  MIT\r\n */var n=r(424),i=r(425),a=r(426);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823;}function s(e,t){if(o()<t)throw new RangeError(\"Invalid typed array length\");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e;}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if(\"number\"==typeof e){if(\"string\"==typeof t)throw new Error(\"If encoding is specified then the first argument must be a string\");return d(this,e);}return c(this,e,t,r);}function c(e,t,r,n){if(\"number\"==typeof t)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<r+(n||0))throw new RangeError(\"'length' is out of bounds\");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e;}(e,t,r,n):\"string\"==typeof t?function(e,t,r){\"string\"==typeof r&&\"\"!==r||(r=\"utf8\");if(!u.isEncoding(r))throw new TypeError('\"encoding\" must be a valid string encoding');var n=0|m(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e;}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|p(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e;}if(t){if(\"undefined\"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||\"length\"in t)return\"number\"!=typeof t.length||(n=t.length)!=n?s(e,0):f(e,t);if(\"Buffer\"===t.type&&a(t.data))return f(e,t.data);}var n;throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\");}(e,t);}function l(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be a number');if(e<0)throw new RangeError('\"size\" argument must not be negative');}function d(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e;}function f(e,t){var r=t.length<0?0:0|p(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e;}function p(e){if(e>=o())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o().toString(16)+\" bytes\");return 0|e;}function m(e,t){if(u.isBuffer(e))return e.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;\"string\"!=typeof e&&(e=\"\"+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return F(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return U(e).length;default:if(n)return F(e).length;t=(\"\"+t).toLowerCase(),n=!0;}}function h(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return A(this,t,r);case\"utf8\":case\"utf-8\":return P(this,t,r);case\"ascii\":return j(this,t,r);case\"latin1\":case\"binary\":return E(this,t,r);case\"base64\":return w(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return T(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0;}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n;}function v(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1;}else if(r<0){if(!i)return-1;r=0;}if(\"string\"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\");}function b(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2;}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o);}if(i){var l=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o;}else-1!==l&&(a-=a-l),l=-1;}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(c(e,a+f)!==c(t,f)){d=!1;break;}if(d)return a;}return-1;}function y(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError(\"Invalid hex string\");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s;}return o;}function _(e,t,r,n){return z(F(t,e.length-r),e,r,n);}function S(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t;}(t),e,r,n);}function O(e,t,r,n){return S(e,t,r,n);}function x(e,t,r,n){return z(U(t),e,r,n);}function C(e,t,r,n){return z(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a;}(t,e.length-r),e,r,n);}function w(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r));}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u);}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d;}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r;}(n);}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e);},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function foo(){return 42;}},42===e.foo()&&\"function\"==typeof e.subarray&&0===e.subarray(1,1).byteLength;}catch(e){return!1;}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e;},u.from=function(e,t,r){return c(null,e,t,r);},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?\"string\"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t);}(null,e,t,r);},u.allocUnsafe=function(e){return d(null,e);},u.allocUnsafeSlow=function(e){return d(null,e);},u.isBuffer=function(e){return!(null==e||!e._isBuffer);},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError(\"Arguments must be Buffers\");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break;}return r<n?-1:n<r?1:0;},u.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1;}},u.concat=function(e,t){if(!a(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!u.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(n,i),i+=o.length;}return n;},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t<e;t+=2)g(this,t,t+1);return this;},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this;},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this;},u.prototype.toString=function(){var e=0|this.length;return 0===e?\"\":0===arguments.length?P(this,0,e):h.apply(this,arguments);},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===u.compare(this,e);},u.prototype.inspect=function(){var e=\"\",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString(\"hex\",0,r).match(/.{2}/g).join(\" \"),this.length>r&&(e+=\" ... \")),\"<Buffer \"+e+\">\";},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),l=e.slice(t,r),d=0;d<s;++d)if(c[d]!==l[d]){a=c[d],o=l[d];break;}return a<o?-1:o<a?1:0;},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r);},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0);},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1);},u.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t|=0,isFinite(r)?(r|=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0);}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var a=!1;;)switch(n){case\"hex\":return y(this,e,t,r);case\"utf8\":case\"utf-8\":return _(this,e,t,r);case\"ascii\":return S(this,e,t,r);case\"latin1\":case\"binary\":return O(this,e,t,r);case\"base64\":return x(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return C(this,e,t,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0;}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)};};function j(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n;}function E(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n;}function A(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i=\"\",a=t;a<r;++a)i+=N(e[a]);return i;}function T(e,t,r){for(var n=e.slice(t,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i;}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\");}function I(e,t,r,n,i,a){if(!u.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\");}function M(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i);}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255;}function B(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\");}function V(e,t,r,n,a){return a||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4;}function R(e,t,r,n,a){return a||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8;}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e];}return r;},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n;},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n;},u.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e];},u.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8;},u.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1];},u.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3];},u.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3]);},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n;},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a;},u.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e];},u.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r;},u.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r;},u.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24;},u.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3];},u.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4);},u.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4);},u.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8);},u.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8);},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r;},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r;},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1;},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2;},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2;},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4;},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4;},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i);}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r;},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i);}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r;},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1;},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2;},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2;},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4;},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4;},u.prototype.writeFloatLE=function(e,t,r){return V(this,e,t,!0,r);},u.prototype.writeFloatBE=function(e,t,r){return V(this,e,t,!1,r);},u.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r);},u.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r);},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a;},u.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i);}if(void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!u.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);}else\"number\"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=u.isBuffer(e)?e:F(new u(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s];}return this;};var L=/[^+\\/0-9A-Za-z-_]/g;function N(e){return e<16?\"0\"+e.toString(16):e.toString(16);}function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue;}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue;}i=r;continue;}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue;}r=65536+(i-55296<<10|r-56320);}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r);}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128);}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128);}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return a;}function U(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\");}(e).replace(L,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e;}(e));}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i;}}).call(this,r(382));},function(e,t,r){\"use strict\";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n;},t.toByteArray=function(e){var t,r,n=c(e),o=n[0],s=n[1],u=new a(function(e,t,r){return 3*(t+r)/4-r;}(0,o,s)),l=0,d=s>0?o-4:o;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u;},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(l(e,o,o+16383>s?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+\"==\")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+\"=\"));return a.join(\"\");};for(var n=[],i=[],a=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0,u=o.length;s<u;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4];}function l(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join(\"\");}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63;},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=f,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c;}return(p?-1:1)*o*Math.pow(2,a-n);},t.write=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,m=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=m,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+p]=255&o,p+=m,o/=256,c-=8);e[r+p-m]|=128*h;};},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return\"[object Array]\"==r.call(e);};},function(e,t,r){(function(e,t){!function(e,r){\"use strict\";if(!e.setImmediate){var n,i,a,o,s,u=1,c={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,\"[object process]\"==={}.toString.call(e.process)?n=function n(e){t.nextTick(function(){m(e);});}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1;},e.postMessage(\"\",\"*\"),e.onmessage=r,t;}}()?e.MessageChannel?((a=new MessageChannel()).port1.onmessage=function(e){m(e.data);},n=function n(e){a.port2.postMessage(e);}):d&&\"onreadystatechange\"in d.createElement(\"script\")?(i=d.documentElement,n=function n(e){var t=d.createElement(\"script\");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null;},i.appendChild(t);}):n=function n(e){setTimeout(m,0,e);}:(o=\"setImmediate$\"+Math.random()+\"$\",s=function s(t){t.source===e&&\"string\"==typeof t.data&&0===t.data.indexOf(o)&&m(+t.data.slice(o.length));},e.addEventListener?e.addEventListener(\"message\",s,!1):e.attachEvent(\"onmessage\",s),n=function n(t){e.postMessage(o+t,\"*\");}),f.setImmediate=function(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return c[u]=i,n(u),u++;},f.clearImmediate=p;}function p(e){delete c[e];}function m(e){if(l)setTimeout(m,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r);}}(t);}finally{p(e),l=!1;}}}}}(\"undefined\"==typeof self?void 0===e?this:e:self);}).call(this,r(382),r(383));},function(e,t){e.exports=XMLHttpRequest;},function(e,t){},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.PDBeLociLabelProvider=void 0;var n=r(170),i=r(4),a=r(70);t.PDBeLociLabelProvider=n.PluginBehavior.create({name:\"pdbe-loci-label-provider\",category:\"interaction\",ctor:function(){function e(e){var t=this;this.ctx=e,this.f={label:function label(e){var r=t.ctx.customState,n=[];if(!!(!r||!r.initParams.superposition)&&i.StructureElement.Loci.is(e)&&1===e.elements.length){var o=e.elements[0].unit,s=i.StructureElement.Location.create(e.structure,o,o.elements[0]),u=i.StructureProperties.entity.pdbx_description(s).join(\", \");n.push(u);}return n.push(a.lociLabel(e)),n.filter(function(e){return!!e;}).join(\"</br>\");},group:function group(e){return e.toString().replace(/Model [0-9]+/g,\"Models\");},priority:100};}return e.prototype.register=function(){this.ctx.managers.lociLabels.addProvider(this.f);},e.prototype.unregister=function(){this.ctx.managers.lociLabels.removeProvider(this.f);},e;}(),display:{name:\"Provide PDBe Loci Label\"}});},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.PDBeSuperpositionStructureTools=t.PDBeLigandViewStructureTools=t.PDBeStructureTools=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(32),o=r(321),s=r(386),u=r(391),c=r(371),l=r(432),d=r(14),f=r(433),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-section-header\"},i.createElement(d.Icon,{svg:d.BuildSvg}),\"Structure Tools\"),i.createElement(u.StructureSourceControls,null),i.createElement(l.AnnotationsComponentControls,null),i.createElement(o.StructureComponentControls,null),i.createElement(c.VolumeStreamingControls,null),i.createElement(c.VolumeSourceControls,null),i.createElement(s.StructureMeasurementsControls,null));},t;}(a.PluginUIComponent);t.PDBeStructureTools=p;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-section-header\"},i.createElement(d.Icon,{svg:d.BuildSvg}),\"Structure Tools\"),i.createElement(o.StructureComponentControls,null),i.createElement(c.VolumeStreamingControls,null),i.createElement(s.StructureMeasurementsControls,null));},t;}(a.PluginUIComponent);t.PDBeLigandViewStructureTools=m;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.render=function(){return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-section-header\"},i.createElement(d.Icon,{svg:d.BuildSvg}),\"Structure Tools\"),i.createElement(f.SuperpositionComponentControls,null),i.createElement(s.StructureMeasurementsControls,null));},t;}(a.PluginUIComponent);t.PDBeSuperpositionStructureTools=h;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.AnnotationsComponentControls=t.TextsmsOutlinedSvg=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(19),o=r(32),s=r(377),u=r(13),c=r(67),l=r(406),d=r(385),f=r(408),p=r(14),m=r(275),h=i.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},i.createElement(\"path\",{fill:\"none\",d:\"M0 0h24v24H0V0z\"}),i.createElement(\"g\",null,i.createElement(\"path\",{d:\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z\"}),i.createElement(\"path\",{d:\"M7 9h2v2H7zM11 9h2v2h-2zM15 9h2v2h-2z\"})));function g(){return h;}t.TextsmsOutlinedSvg=g;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isCollapsed:!1,validationApplied:!1,domainAtnApplied:!1,validationOptions:!1,domainAtnOptions:!1},t.getOptionParams=function(){var e=!1,r=!1,n=t.plugin.customState;if(n&&n.initParams&&(n.initParams.validationAnnotation&&(e=!0),n.initParams.domainAnnotation&&(r=!0)),e&&!t.state.validationParams||r&&!t.state.domainAtnParams){var i=u.StateSelection.findTagInSubtree(t.plugin.state.data.tree,u.StateTransform.RootRef,\"structure-component-static-polymer\");if(i){var a=t.plugin.state.data.select(i)[0].obj;if(a){var o={structure:a.data};if(e&&!t.state.validationParams){var c=s.StructureQualityReportColorThemeProvider.getParams(o);c&&t.setState({validationParams:{params:c,values:{type:c.type.defaultValue}}});}if(r&&!t.state.domainAtnParams){var d=l.DomainAnnotationsColorThemeProvider.getParams(o);d&&t.setState({domainAtnParams:{params:d,values:{type:d.type.defaultValue}}});}}}}},t.toggleCollapsed=function(){t.setState({isCollapsed:!t.state.isCollapsed});},t.toggleOptions=function(e){0===e&&t.setState({validationOptions:!t.state.validationOptions}),1===e&&t.setState({domainAtnOptions:!t.state.domainAtnOptions});},t.applyAnnotation=function(e,r,n){var i,a=\"polymer-id\",o=d.PDBeStructureQualityReport,s=t.state.domainAtnParams?f.PDBeDomainAnnotations:void 0;if(0===e?(r&&(a=\"pdbe-structure-quality-report\"),t.setState({validationApplied:r}),t.setState({domainAtnApplied:!1})):(o=f.PDBeDomainAnnotations,s=t.state.validationParams?d.PDBeStructureQualityReport:void 0,r&&(a=\"pdbe-domain-annotations\"),t.setState({domainAtnApplied:r}),t.setState({validationApplied:!1})),r&&\"polymer-id\"!==a){var u=t.plugin.state.behaviors.build().to(o.id).update(o,function(e){e.showTooltip=!0;});if(t.plugin.runTask(t.plugin.state.behaviors.updateTree(u)),s){var c=t.plugin.state.behaviors.build().to(s.id).update(s,function(e){e.showTooltip=!1;});t.plugin.runTask(t.plugin.state.behaviors.updateTree(c));}}t.plugin.managers.structure.hierarchy.currentComponentGroups.forEach(function(e){\"structure-component-static-polymer\"===e[0].key&&(i=e);}),i&&t.plugin.managers.structure.component.updateRepresentationsTheme(i,{color:a,colorParams:n||void 0});},t.initApplyAnnotation=function(e){0===e&&t.applyAnnotation(0,!t.state.validationApplied,t.state.validationParams.values),1===e&&t.applyAnnotation(1,!t.state.domainAtnApplied,t.state.domainAtnParams.values);},t.updateValidationParams=function(e){var r=n.__assign({},t.state.validationParams);r.values=e,t.setState({validationParams:r}),t.state.validationApplied&&t.applyAnnotation(0,t.state.validationApplied,e);},t.updateDomainAtnParams=function(e){var r=n.__assign({},t.state.domainAtnParams);r.values=e,t.setState({domainAtnParams:r}),t.state.domainAtnApplied&&t.applyAnnotation(1,t.state.domainAtnApplied,e);},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(){e.getOptionParams(),e.forceUpdate();}),this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(t){return e.setState({description:m.StructureHierarchyManager.getSelectedStructuresDescription(e.plugin)});});},t.prototype.render=function(){var e=this;if(!this.state.validationParams&&!this.state.domainAtnParams)return i.createElement(i.Fragment,null);var t={accent:\"green\",svg:g},r=this.state.isCollapsed?\"msp-transform-wrapper msp-transform-wrapper-collapsed\":\"msp-transform-wrapper\";return i.createElement(\"div\",{className:r},i.createElement(\"div\",{className:\"msp-transform-header\"},i.createElement(a.Button,{icon:t?void 0:this.state.isCollapsed?p.ArrowRightSvg:p.ArrowDropDownSvg,noOverflow:!0,onClick:this.toggleCollapsed,className:t?\"msp-transform-header-brand msp-transform-header-brand-\"+t.accent:void 0,title:\"Click to \"+(this.state.isCollapsed?\"expand\":\"collapse\")},i.createElement(p.Icon,{svg:null==t?void 0:t.svg,inline:!0}),\"Annotations\",i.createElement(\"small\",{style:{margin:\"0 6px\"}},this.state.isCollapsed?\"\":this.state.description))),!this.state.isCollapsed&&this.state.validationParams&&i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(a.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:\"Validation Report Annotations.\",style:{textAlign:\"left\"}},\"Validation Report\"),i.createElement(a.IconButton,{onClick:function onClick(){return e.initApplyAnnotation(0);},toggleState:!1,svg:this.state.validationApplied?p.VisibilityOutlinedSvg:p.VisibilityOffOutlinedSvg,title:\"Click to \"+(this.state.validationApplied?\"Hide\":\"Show\")+\" Validation Report Annotation\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(a.IconButton,{onClick:function onClick(){return e.toggleOptions(0);},svg:p.MoreHorizSvg,title:\"Actions\",toggleState:this.state.validationOptions,className:\"msp-form-control\",flex:!0})),!this.state.isCollapsed&&this.state.validationParams&&this.state.validationOptions&&i.createElement(\"div\",{style:{marginBottom:\"6px\"}},i.createElement(\"div\",{className:\"msp-accent-offset\"},i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(c.ParameterControls,{params:this.state.validationParams.params,values:this.state.validationParams.values,onChangeValues:this.updateValidationParams})))),!this.state.isCollapsed&&this.state.domainAtnParams&&i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(a.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:\"Domain Annotations.\",style:{textAlign:\"left\"}},\"Domains\"),i.createElement(a.IconButton,{onClick:function onClick(){return e.initApplyAnnotation(1);},toggleState:!1,svg:this.state.domainAtnApplied?p.VisibilityOutlinedSvg:p.VisibilityOffOutlinedSvg,title:\"Click to \"+(this.state.domainAtnApplied?\"Hide\":\"Show\")+\" Domain Annotation\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(a.IconButton,{onClick:function onClick(){return e.toggleOptions(1);},svg:p.MoreHorizSvg,title:\"Actions\",toggleState:this.state.domainAtnOptions,className:\"msp-form-control\",flex:!0})),!this.state.isCollapsed&&this.state.domainAtnParams&&this.state.domainAtnOptions&&i.createElement(\"div\",{style:{marginBottom:\"6px\"}},i.createElement(\"div\",{className:\"msp-accent-offset\"},i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(c.ParameterControls,{params:this.state.domainAtnParams.params,values:this.state.domainAtnParams.values,onChangeValues:this.updateDomainAtnParams})))));},t;}(o.PurePluginUIComponent);t.AnnotationsComponentControls=v;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.SuperpositionComponentControls=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(26),o=r(13),s=r(2),u=r(32),c=r(19),l=r(14),d=r(67),f=r(238),p=r(138),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.defaultState=function(){return{header:\"Components\",isCollapsed:!1,isDisabled:!1,brand:{accent:\"blue\",svg:l.CubeOutlineSvg}};},t.prototype.renderControls=function(){return i.createElement(i.Fragment,null,i.createElement(h,null));},t;}(u.CollapsableControls);t.SuperpositionComponentControls=m;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={segmentWatch:!1,ligSearchText:\"\",carbSearchText:\"\",componentGroups:{nonLigGroups:[],ligGroups:[],carbGroups:[]},ligGroups:[],isLigCollapsed:!1,carbGroups:[],isCarbCollapsed:!1,isBusy:!1},t.ligInputStream=new p.Subject(),t.handleLigInputStream=function(e){t.setState({ligSearchText:e});var r=t.state.componentGroups.ligGroups.filter(function(t){return t[0].key.split(\",\")[0].split(\"-\")[2].toLowerCase().indexOf(e.toLowerCase())>=0;});t.setState({ligGroups:r});},t.carbInputStream=new p.Subject(),t.handleCarbInputStream=function(e){t.setState({carbSearchText:e});var r=t.state.componentGroups.carbGroups.filter(function(t){var r=t[0].key.split(\",\")[0].split(\"-\");return r.splice(0,2),r.pop(),r.join(\"-\").toLowerCase().indexOf(e.toLowerCase())>=0;});t.setState({carbGroups:r});},t.toggleVisible=function(e,r,i){e.preventDefault(),e.currentTarget.blur();var a=t.plugin.customState;a.events.isBusy.next(!0);var o=\"ligands\"===i?t.state.ligGroups:t.state.carbGroups;setTimeout(function(){return n.__awaiter(t,void 0,void 0,function(){var e,t,i,s,u,c;return n.__generator(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=n.__asyncValues(o),l.label=1;case 1:return[4,e.next()];case 2:if((t=l.sent()).done)return[3,4];i=t.value,this.plugin.managers.structure.hierarchy.toggleVisibility(i,r),l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),u={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),t&&!t.done&&(c=e.return)?[4,c.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return a.events.isBusy.next(!1),[2];}});});});},t.showHideAllControls=function(e){return i.createElement(i.Fragment,null,i.createElement(c.Button,{icon:l.CheckSvg,flex:!0,onClick:function onClick(r){return t.toggleVisible(r,\"show\",e);},style:{flex:\"0 0 50px\",textAlign:\"center\",fontSize:\"80%\",color:\"#9cacc3\",padding:0},title:\"Show all \"+e,disabled:!1},\"All\"),i.createElement(c.Button,{icon:l.CloseSvg,flex:!0,onClick:function onClick(r){return t.toggleVisible(r,\"hide\",e);},style:{flex:\"0 0 50px\",textAlign:\"center\",fontSize:\"80%\",color:\"#9cacc3\",padding:0},title:\"Hide all \"+e,disabled:!1},\"None\"));},t.clearLigSearch=function(e){e.preventDefault(),t.setState({ligSearchText:\"\"}),t.ligInputStream.next(\"\"),e.currentTarget.blur();},t.clearCarbSearch=function(e){e.preventDefault(),t.setState({carbSearchText:\"\"}),t.carbInputStream.next(\"\"),e.currentTarget.blur();},t.collapseSection=function(e,r){e.preventDefault(),e.currentTarget.blur(),\"ligands\"===r?t.setState({isLigCollapsed:!t.state.isLigCollapsed}):t.setState({isCarbCollapsed:!t.state.isCarbCollapsed});},t.sectionHeader=function(e){var r=\"ligands\"===e?t.showHideAllControls(\"ligands\"):t.showHideAllControls(\"carbohydrates\"),n=\"ligands\"===e?\"Ligand\":\"Carbohydrates\",a=\"ligands\"===e?t.state.ligGroups.length:t.state.carbGroups.length,o=\"ligands\"===e?t.state.componentGroups.ligGroups.length:t.state.componentGroups.carbGroups.length;return i.createElement(\"div\",{className:\"msp-flex-row\",style:{marginTop:\"6px\"}},i.createElement(\"button\",{className:\"msp-form-control msp-control-button-label msp-transform-header-brand-gray\",style:{textAlign:\"left\"},onClick:function onClick(r){return t.collapseSection(r,e);}},i.createElement(\"span\",null,i.createElement(\"strong\",null,n)),i.createElement(\"small\",{style:{color:\"#7d91b0\"}},\" ( \",a,a<o?\" / \"+o:\"\",\" )\")),a>1&&r);},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,function(){e.categoriseGroups(),e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});});},t.prototype.componentDidUpdate=function(){var e=this,t=this.plugin.customState;t.events&&!this.state.segmentWatch&&(this.setState({segmentWatch:!0}),this.subscribe(t.events.segmentUpdate,function(){e.categoriseGroups(),e.forceUpdate();})),this.subscribe(this.ligInputStream.pipe(f.debounceTime(1e3/24)),function(t){return e.handleLigInputStream(t);}),this.subscribe(this.carbInputStream.pipe(f.debounceTime(1e3/24)),function(t){return e.handleCarbInputStream(t);});},t.prototype.categoriseGroups=function(){var e={nonLigGroups:[],ligGroups:[],carbGroups:[]},t=this.plugin.managers.structure.hierarchy.currentComponentGroups,r=this.plugin.customState;t.forEach(function(t){var n=!1;if(r.initParams&&r.initParams.superpositionParams&&r.initParams.superpositionParams.ligandView&&(n=!0),n){var i=(a=t[0].key.split(\",\"))[0].split(\"-\");if(-1===a.indexOf(\"superposition-focus-surr-sel\")){if(i[i.length-1]!==r.superpositionState.activeSegment-1+\"\")return;a.indexOf(\"superposition-ligand-sel\")>=0?e.ligGroups.push(t):a.indexOf(\"superposition-carb-sel\")>=0?e.carbGroups.push(t):e.nonLigGroups.push(t);}else e.nonLigGroups.push(t);}else{var a;((a=t[0].key.split(\",\")).indexOf(\"superposition-focus-surr-sel\")>=0||a.indexOf(\"Chain-\"+(r.superpositionState.activeSegment-1))>=0)&&e.nonLigGroups.push(t);}}),this.setState({componentGroups:e,ligGroups:e.ligGroups,carbGroups:e.carbGroups,ligSearchText:\"\",carbSearchText:\"\"});},t.prototype.render=function(){var e=this,t=i.createElement(\"div\",{className:\"msp-mapped-parameter-group\",style:{fontSize:\"90%\"}},i.createElement(\"div\",{className:\"msp-control-row msp-transform-header-brand-gray\",style:{height:\"33px\"}},i.createElement(\"span\",{className:\"msp-control-row-label\"},\"Search Ligand\"),i.createElement(\"div\",{className:\"msp-control-row-ctrl\"},i.createElement(\"input\",{type:\"text\",placeholder:\"Enter HET code\",disabled:this.state.isBusy,onChange:function onChange(t){return e.ligInputStream.next(t.target.value);},value:this.state.ligSearchText,maxLength:3}))),i.createElement(c.IconButton,{svg:l.CloseSvg,flex:!0,onClick:this.clearLigSearch,style:{flex:\"0 0 24px\",padding:0},disabled:\"\"===this.state.ligSearchText||this.state.isBusy,toggleState:\"\"!==this.state.ligSearchText,title:\"Clear search input\"})),r=i.createElement(\"div\",{className:\"msp-mapped-parameter-group\",style:{fontSize:\"90%\"}},i.createElement(\"div\",{className:\"msp-control-row msp-transform-header-brand-gray\",style:{height:\"33px\"}},i.createElement(\"span\",{className:\"msp-control-row-label\"},\"Search Carbohydrate\"),i.createElement(\"div\",{className:\"msp-control-row-ctrl\"},i.createElement(\"input\",{type:\"text\",placeholder:\"Enter HET code\",disabled:this.state.isBusy,onChange:function onChange(t){return e.carbInputStream.next(t.target.value);},value:this.state.carbSearchText,maxLength:3}))),i.createElement(c.IconButton,{svg:l.CloseSvg,flex:!0,onClick:this.clearCarbSearch,style:{flex:\"0 0 24px\",padding:0},disabled:\"\"===this.state.carbSearchText||this.state.isBusy,toggleState:\"\"!==this.state.carbSearchText,title:\"Clear search input\"})),n=this.sectionHeader(\"ligands\"),a=this.sectionHeader(\"carbohydrates\");return i.createElement(i.Fragment,null,this.state.componentGroups.nonLigGroups.length>0&&i.createElement(\"div\",null,this.state.componentGroups.nonLigGroups.map(function(e){return i.createElement(g,{key:e[0].cell.transform.ref,group:e,boldHeader:!0});})),this.state.componentGroups.ligGroups.length>0&&n,!this.state.isLigCollapsed&&this.state.componentGroups.ligGroups.length>5&&t,this.state.componentGroups.ligGroups.length>0&&i.createElement(\"div\",{className:\"msp-control-offset\",style:{maxHeight:\"800px\",overflowY:\"auto\"}},!this.state.isLigCollapsed&&this.state.ligGroups.map(function(e){return i.createElement(g,{key:e[0].cell.transform.ref,group:e,boldHeader:!1});})),this.state.componentGroups.carbGroups.length>0&&a,!this.state.isCarbCollapsed&&this.state.componentGroups.carbGroups.length>5&&r,this.state.componentGroups.carbGroups.length>0&&i.createElement(\"div\",{className:\"msp-control-offset\",style:{maxHeight:\"800px\",overflowY:\"auto\"}},!this.state.isCarbCollapsed&&this.state.carbGroups.map(function(e){return i.createElement(g,{key:e[0].cell.transform.ref,group:e,boldHeader:!1});})));},t;}(u.PurePluginUIComponent),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={action:void 0,isHidden:!1,isBusy:!1},t.checkAllHidden=function(){return n.__awaiter(t,void 0,void 0,function(){var e,t,r;return n.__generator(this,function(n){for(e=!0,t=0,r=this.props.group;t<r.length;t++)if(!r[t].cell.state.isHidden){e=!1;break;}return e&&this.setState({isHidden:!0}),[2];});});},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.structure.component.toggleVisibility(t.props.group),t.setState({isHidden:!t.state.isHidden});},t.toggleAction=function(){return t.setState({action:\"action\"===t.state.action?void 0:\"action\"});},t.highlight=function(e){e.preventDefault(),t.props.group[0].cell.parent&&a.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:t.props.group[0].cell.parent,ref:t.props.group.map(function(e){return e.cell.transform.ref;})});},t.clearHighlight=function(e){e.preventDefault(),a.PluginCommands.Interactivity.ClearHighlights(t.plugin);},t.focus=function(){for(var e=!0,r=0,n=t.props.group;r<n.length;r++){if(!n[r].cell.state.isHidden){e=!1;break;}}e&&t.plugin.managers.structure.hierarchy.toggleVisibility(t.props.group,\"show\"),t.plugin.managers.camera.focusSpheres(t.props.group,function(e){var t;if(!e.cell.state.isHidden)return null===(t=e.cell.obj)||void 0===t?void 0:t.data.boundary.sphere;});},t;}return n.__extends(t,e),Object.defineProperty(t.prototype,\"pivot\",{get:function get(){return this.props.group[0];},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.checkAllHidden(),this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){var r,n;(null===(r=e.pivot.cell.obj)||void 0===r?void 0:r.label)===(null===(n=t.cell.obj)||void 0===n?void 0:n.label)&&(t.cell.state.isHidden?e.checkAllHidden():e.setState({isHidden:!1}));}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});}),this.subscribe(this.plugin.customState.events.isBusy,function(t){e.setState({isBusy:t});});},t.prototype.render=function(){var e,t=this,r=this.pivot,n=null===(e=r.cell.obj)||void 0===e?void 0:e.label,a=this.props.boldHeader?i.createElement(\"strong\",null,n):n;return i.createElement(i.Fragment,null,i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(c.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:n+\" - Click to focus.\",onClick:this.focus,style:{textAlign:\"left\"},disabled:this.state.isBusy},a),i.createElement(c.IconButton,{disabled:this.state.isBusy,svg:this.state.isHidden?l.VisibilityOffOutlinedSvg:l.VisibilityOutlinedSvg,toggleState:!1,onClick:this.toggleVisible,title:(this.state.isHidden?\"Show\":\"Hide\")+\" component\",small:!0,className:\"msp-form-control\",flex:!0}),i.createElement(c.IconButton,{disabled:this.state.isBusy,svg:l.MoreHorizSvg,onClick:this.toggleAction,title:\"Actions\",toggleState:\"action\"===this.state.action,className:\"msp-form-control\",flex:!0})),\"action\"===this.state.action&&i.createElement(\"div\",{className:\"msp-accent-offset\"},i.createElement(\"div\",{style:{marginBottom:\"6px\"}},r.representations.map(function(e){return i.createElement(v,{group:t.props.group,key:e.cell.transform.ref,representation:e});}))));},t;}(u.PurePluginUIComponent),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isBusy:!1,clusterVal:{cluster:\"All\"}},t.remove=function(){return t.plugin.managers.structure.component.removeRepresentations(t.props.group,t.props.representation);},t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur(),t.plugin.managers.structure.component.toggleVisibility(t.props.group,t.props.representation);},t.update=function(e){return t.updateRepresentations(t.props.group,t.props.representation,e);},t.selectCluster=function(e){t.setState({clusterVal:{cluster:e.cluster}});},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){o.State.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate();}),this.subscribe(this.plugin.behaviors.state.isBusy,function(t){e.setState({isBusy:t});}),this.subscribe(this.plugin.customState.events.isBusy,function(t){e.setState({isBusy:t});});},t.prototype.updateRepresentations=function(e,t,r){var n,i,a;if(0===e.length)return Promise.resolve();var o=e[0].representations.indexOf(t);if(o<0)return Promise.resolve();var s=this.plugin.customState.superpositionState,u=[];if(\"All\"!==this.state.clusterVal.cluster&&0===(u=s.segmentData[s.activeSegment-1].clusters[parseInt(this.state.clusterVal.cluster)-1].map(function(e){return e.pdb_id+\"_\"+e.struct_asym_id;})).length)return;for(var c=this.plugin.state.data.build(),l=0,d=e;l<d.length;l++){var f=d[l].representations[o];if(f&&f.cell.transform.transformer===t.cell.transform.transformer){if(\"All\"!==this.state.clusterVal.cluster)if(-1===u.indexOf(s.refMaps[f.cell.transform.parent]))continue;var p={type:r.type?r.type:null===(n=f.cell.params)||void 0===n?void 0:n.values.type,colorTheme:r.colorTheme?r.colorTheme:null===(i=f.cell.params)||void 0===i?void 0:i.values.colorTheme,sizeTheme:r.sizeTheme?r.sizeTheme:null===(a=f.cell.params)||void 0===a?void 0:a.values.sizeTheme};c.to(f.cell).update(p);}}return c.commit({canUndo:\"Update Representation\"});},t.prototype.render=function(){var e,t,r,n,a,o,u=this.props.representation.cell,c=this.plugin.customState.superpositionState,l=[[\"All\",\"All\"]];c.segmentData[c.activeSegment-1].clusters.forEach(function(e,t){l.push([t+1+\"\",t+1+\"\"]);});var f={cluster:s.ParamDefinition.Select(\"All\",l,{label:\"Select Cluster\"})},p=!1;if(u&&u.obj){var m=u.obj;m.tags&&m.tags.indexOf(\"superposition-focus-surr-repr\")>=0&&(p=!0);}return i.createElement(\"div\",{className:\"msp-representation-entry\"},u.parent&&i.createElement(\"div\",null,l.length>2&&!p&&i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(d.ParameterControls,{params:f,values:this.state.clusterVal,onChangeValues:this.selectCluster,isDisabled:this.state.isBusy})),i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(d.ParameterControls,{params:{type:null===(e=u.params)||void 0===e?void 0:e.definition.type},values:{type:null===(t=u.params)||void 0===t?void 0:t.values.type},onChangeValues:this.update,isDisabled:this.state.isBusy})),i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(d.ParameterControls,{params:{colorTheme:null===(r=u.params)||void 0===r?void 0:r.definition.colorTheme},values:{colorTheme:null===(n=u.params)||void 0===n?void 0:n.values.colorTheme},onChangeValues:this.update,isDisabled:this.state.isBusy})),i.createElement(\"div\",{className:\"msp-representation-entry\"},i.createElement(d.ParameterControls,{params:{sizeTheme:null===(a=u.params)||void 0===a?void 0:a.definition.sizeTheme},values:{sizeTheme:null===(o=u.params)||void 0===o?void 0:o.values.sizeTheme},onChangeValues:this.update,isDisabled:this.state.isBusy}))));},t;}(u.PurePluginUIComponent);},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.PDBeViewportControls=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(101),o=r(19),s=r(206),u=r(435),c=r(392),l=r(322),d=r(14),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.isBlack=function(e){if(e&&e.initParams&&e.initParams.bgColor){var t=e.initParams.bgColor;if(0===t.r&&0===t.g&&0===t.b)return!0;}return!1;},t.prototype.render=function(){var e=this.plugin.customState,t=!1;e&&e.initParams&&e.initParams.moleculeId&&e.initParams.pdbeLink&&(t=!0),e&&e.initParams&&e.initParams.superposition&&(t=!1);var r={parentStyle:{width:\"auto\"},containerStyle:{position:\"absolute\",right:\"10px\",top:\"10px\"},style:{display:\"inline-block\",fontSize:\"14px\",color:this.isBlack(e)?\"#fff\":\"#555\",borderBottom:\"none\",cursor:\"pointer\",textDecoration:\"none\"},pdbeImg:{src:\"https://www.ebi.ac.uk/pdbe/entry/static/images/logos/PDBe/logo_T_64.png\",alt:\"PDBe logo\",style:{height:\"12px\",width:\"12px\",border:0,position:\"absolute\",margin:\"4px 0 0 -13px\"}}};return i.createElement(i.Fragment,null,t&&i.createElement(\"div\",{style:r.containerStyle},i.createElement(\"a\",{className:\"msp-pdbe-link\",style:r.style,target:\"_blank\",href:\"https://pdbe.org/\"+e.initParams.moleculeId},i.createElement(\"img\",{src:r.pdbeImg.src,alt:r.pdbeImg.alt,style:r.pdbeImg.style}),e.initParams.moleculeId)),i.createElement(\"div\",{className:\"msp-viewport-controls\",onMouseMove:this.onMouseMove,style:t?{marginTop:\"22px\"}:void 0},i.createElement(\"div\",{className:\"msp-viewport-controls-buttons\"},i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(d.AutorenewSvg,this.resetCamera,\"Reset Camera\")),i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(d.CameraOutlinedSvg,this.toggleScreenshotExpanded,\"Screenshot / State Snapshot\",this.state.isScreenshotExpanded)),i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),this.icon(d.BuildOutlinedSvg,this.toggleControls,\"Toggle Controls Panel\",this.plugin.layout.state.showControls),this.plugin.config.get(a.PluginConfig.Viewport.ShowExpand)&&this.icon(d.FullscreenSvg,this.toggleExpanded,\"Toggle Expanded Viewport\",this.plugin.layout.state.isExpanded),this.icon(d.TuneSvg,this.toggleSettingsExpanded,\"Settings / Controls Info\",this.state.isSettingsExpanded)),this.plugin.config.get(a.PluginConfig.Viewport.ShowSelectionMode)&&i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-semi-transparent-background\"}),i.createElement(s.ToggleSelectionModeButton,null))),this.state.isScreenshotExpanded&&i.createElement(\"div\",{className:\"msp-viewport-controls-panel\"},i.createElement(o.ControlGroup,{header:\"Screenshot / State\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleScreenshotExpanded,topRightIcon:d.CloseSvg,noTopMargin:!0,childrenClassName:\"msp-viewport-controls-panel-controls\"},i.createElement(u.DownloadScreenshotControls,{close:this.toggleScreenshotExpanded}))),this.state.isSettingsExpanded&&i.createElement(\"div\",{className:\"msp-viewport-controls-panel\"},i.createElement(o.ControlGroup,{header:\"Settings / Controls Info\",title:\"Click to close.\",initialExpanded:!0,hideExpander:!0,hideOffset:!0,onHeaderClick:this.toggleSettingsExpanded,topRightIcon:d.CloseSvg,noTopMargin:!0,childrenClassName:\"msp-viewport-controls-panel-controls\"},i.createElement(c.SimpleSettingsControl,null)))));},t;}(l.ViewportControls);t.PDBeViewportControls=f;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.DownloadScreenshotControls=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(67),o=r(32),s=r(238),u=r(138),c=r(19),l=r(26),d=r(14),f=function(e){function t(){var t,r,a,o=e.apply(this,arguments)||this;return o.state={showPreview:!0,isDisabled:!1,resolution:null===(t=o.plugin.helpers.viewportScreenshot)||void 0===t?void 0:t.currentResolution,transparent:null===(r=o.plugin.helpers.viewportScreenshot)||void 0===r?void 0:r.transparent,axes:null===(a=o.plugin.helpers.viewportScreenshot)||void 0===a?void 0:a.axes},o.imgRef=i.createRef(),o.updateQueue=new u.Subject(),o.preview=function(){return n.__awaiter(o,void 0,void 0,function(){var e;return n.__generator(this,function(t){switch(t.label){case 0:return this.imgRef.current?(e=this.imgRef.current,[4,this.plugin.helpers.viewportScreenshot.imageData()]):[2];case 1:return e.src=t.sent(),[2];}});});},o.download=function(){var e;null===(e=o.plugin.helpers.viewportScreenshot)||void 0===e||e.download(),o.props.close();},o.openTab=function(){for(var e=o.imgRef.current.src,t=atob(e.substr(\"data:image/png;base64,\".length)),r=[],n=Math.min(t.length,1048576),i=0;i<t.length;i+=n){for(var a=new Uint8Array(Math.min(n,t.length-i)),s=0,u=a.length;s<u;s++)a[s]=t.charCodeAt(i+s);r.push(a);}var c=new Blob(r,{type:\"image/png\"}),l=URL.createObjectURL(c);window.open(l,\"_blank\"),o.props.close();},o.setProps=function(e){\"resolution\"===e.name?(o.plugin.helpers.viewportScreenshot.currentResolution=e.value,o.setState({resolution:e.value})):\"transparent\"===e.name?(o.plugin.helpers.viewportScreenshot.transparent=e.value,o.setState({transparent:e.value})):\"axes\"===e.name&&(o.plugin.helpers.viewportScreenshot.axes=e.value,o.setState({axes:e.value}));},o.downloadToFileJson=function(){l.PluginCommands.State.Snapshots.DownloadToFile(o.plugin,{type:\"json\"});},o.downloadToFileZip=function(){l.PluginCommands.State.Snapshots.DownloadToFile(o.plugin,{type:\"zip\"});},o.open=function(e){e.target.files&&e.target.files[0]&&l.PluginCommands.State.Snapshots.OpenFile(o.plugin,{file:e.target.files[0]});},o;}return n.__extends(t,e),t.prototype.handlePreview=function(){this.state.showPreview&&this.preview();},t.prototype.componentDidUpdate=function(){this.updateQueue.next();},t.prototype.componentDidMount=function(){var e=this;this.plugin.canvas3d&&(this.subscribe(s.debounceTime(250)(this.updateQueue),function(){return e.handlePreview();}),this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){var t;e.plugin.helpers.viewportScreenshot.imagePass.setProps({multiSample:{mode:\"on\",sampleLevel:2},postprocessing:null===(t=e.plugin.canvas3d)||void 0===t?void 0:t.props.postprocessing}),e.updateQueue.next();}),this.subscribe(s.debounceTime(250)(this.plugin.canvas3d.didDraw),function(){e.state.isDisabled||e.updateQueue.next();}),this.subscribe(this.plugin.state.data.behaviors.isUpdating,function(t){e.setState({isDisabled:t}),t||e.updateQueue.next();}),this.handlePreview());},t.prototype.render=function(){return i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-image-preview\"},i.createElement(\"img\",{ref:this.imgRef}),i.createElement(\"br\",null),i.createElement(\"span\",null,\"Right-click the image to Copy.\")),i.createElement(\"div\",{className:\"msp-flex-row\"},i.createElement(c.Button,{icon:d.GetAppSvg,onClick:this.download,disabled:this.state.isDisabled},\"Download\"),i.createElement(c.Button,{icon:d.LaunchSvg,onClick:this.openTab,disabled:this.state.isDisabled},\"Open in new Tab\")),i.createElement(a.ParameterControls,{params:this.plugin.helpers.viewportScreenshot.params,values:this.plugin.helpers.viewportScreenshot.values,onChange:this.setProps,isDisabled:this.state.isDisabled}));},t;}(o.PluginUIComponent);t.DownloadScreenshotControls=f;},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.subscribeToComponentEvents=void 0,t.subscribeToComponentEvents=function(e){document.addEventListener(\"PDB.interactions.click\",function(t){if(void 0!==t.detail){var r=t.detail.interacting_nodes?{data:t.detail.interacting_nodes}:{data:[t.detail.selected_node]};r.data[0].focus=!0,e.visual.select(r);}}),document.addEventListener(\"PDB.interactions.mouseover\",function(t){if(void 0!==t.detail){var r=t.detail.interacting_nodes?{data:t.detail.interacting_nodes}:{data:[t.detail.selected_node]};e.visual.highlight(r);}}),document.addEventListener(\"PDB.interactions.mouseout\",function(t){e.visual.clearHighlight();}),document.addEventListener(\"PDB.topologyViewer.click\",function(t){if(void 0!==t.eventData){var r={entity_id:t.eventData.entityId,struct_asym_id:t.eventData.structAsymId,start_residue_number:t.eventData.residueNumber,end_residue_number:t.eventData.residueNumber,sideChain:!0,focus:!0};e.visual.select({data:[r]});}}),document.addEventListener(\"PDB.topologyViewer.mouseover\",function(t){if(void 0!==t.eventData){var r={entity_id:t.eventData.entityId,struct_asym_id:t.eventData.structAsymId,start_residue_number:t.eventData.residueNumber,end_residue_number:t.eventData.residueNumber};e.visual.highlight({data:[r]});}}),document.addEventListener(\"PDB.topologyViewer.mouseout\",function(t){e.visual.clearHighlight();}),document.addEventListener(\"protvista-mouseover\",function(t){if(void 0!==t.detail){var r=void 0;t.detail.start&&t.detail.end&&(r={start_residue_number:parseInt(t.detail.start),end_residue_number:parseInt(t.detail.end)}),t.detail.feature&&t.detail.feature.entityId&&(r.entity_id=t.detail.feature.entityId+\"\"),t.detail.feature&&t.detail.feature.bestChainId&&(r.struct_asym_id=t.detail.feature.bestChainId),r&&e.visual.highlight({data:[r]});}}),document.addEventListener(\"protvista-mouseout\",function(t){e.visual.clearHighlight();}),document.addEventListener(\"protvista-click\",function(t){if(void 0!==t.detail){var r=!1,n=void 0;if(t.detail.start&&t.detail.end&&(n={start_residue_number:parseInt(t.detail.start),end_residue_number:parseInt(t.detail.end)}),t.detail.feature&&t.detail.feature.entityId&&(n.entity_id=t.detail.feature.entityId+\"\"),t.detail.feature&&t.detail.feature.bestChainId&&(n.struct_asym_id=t.detail.feature.bestChainId),(t.detail.feature&&t.detail.feature.accession&&\"Chain\"===t.detail.feature.accession.split(\" \")[0]||\"Ligand binding site\"===t.detail.feature.tooltipContent)&&(r=!0),t.detail.start===t.detail.end&&(r=!0),n){if(r)n.sideChain=!0;else{var i=void 0;if(t.detail.trackIndex>-1&&t.detail.feature.locations&&t.detail.feature.locations[0].fragments[t.detail.trackIndex].color&&(i=t.detail.feature.locations[0].fragments[t.detail.trackIndex].color),void 0===i&&t.detail.feature.color&&(i=t.detail.feature.color),void 0===i&&t.detail.color&&(i=t.detail.color),void 0===i)i={r:65,g:96,b:91};else{if(/rgb/g.test(i)){var a=i.substring(4,i.length-1).split(\",\");i={r:a[0],g:a[1],b:a[2]};}}n.color=i;}n.focus=!0,e.visual.select({data:[n]});}}});var t=[\"uniprot\",\"pfam\",\"cath\",\"scop\",\"strand\",\"helice\"],r=[\"chain\",\"quality\",\"quality_outlier\",\"binding site\",\"alternate conformer\"];document.addEventListener(\"PDB.seqViewer.click\",function(n){if(void 0!==n.eventData)if(void 0!==n.eventData.elementData&&r.indexOf(n.eventData.elementData.elementType)>-1){var i={entity_id:n.eventData.entityId,struct_asym_id:n.eventData.elementData.pathData.struct_asym_id,start_residue_number:n.eventData.residueNumber,end_residue_number:n.eventData.residueNumber,sideChain:!0,focus:!0};e.visual.select({data:[i]});}else if(void 0!==n.eventData.elementData&&t.indexOf(n.eventData.elementData.elementType)>-1){var a=n.eventData.elementData.color;i={entity_id:n.eventData.entityId,struct_asym_id:n.eventData.elementData.pathData.struct_asym_id,start_residue_number:n.eventData.elementData.pathData.start.residue_number,end_residue_number:n.eventData.elementData.pathData.end.residue_number,color:{r:a[0],g:a[1],b:a[2]},focus:!0};e.visual.select({data:[i]});}}),document.addEventListener(\"PDB.seqViewer.mouseover\",function(n){if(void 0!==n.eventData)if(void 0!==n.eventData.elementData&&r.indexOf(n.eventData.elementData.elementType)>-1){var i={entity_id:n.eventData.entityId,struct_asym_id:n.eventData.elementData.pathData.struct_asym_id,start_residue_number:n.eventData.residueNumber,end_residue_number:n.eventData.residueNumber,focus:!0};e.visual.select({data:[i]});}else if(void 0!==n.eventData.elementData&&t.indexOf(n.eventData.elementData.elementType)>-1){i={entity_id:n.eventData.entityId,struct_asym_id:n.eventData.elementData.pathData.struct_asym_id,start_residue_number:n.eventData.elementData.pathData.start.residue_number,end_residue_number:n.eventData.elementData.pathData.end.residue_number};e.visual.highlight({data:[i]});}}),document.addEventListener(\"PDB.seqViewer.mouseout\",function(t){e.visual.clearHighlight();});};},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.LeftPanelControls=t.WavesIconSvg=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(158),o=r(26),s=r(13),u=r(32),c=r(19),l=r(67),d=r(387),f=r(284),p=r(376),m=r(189),h=r(438),g=r(14),v=r(189),b=i.createElement(\"svg\",{width:\"24px\",height:\"24px\",viewBox:\"0 0 24 24\"},i.createElement(\"path\",{d:\"M17 16.99c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.42 2.95-.8c.65-.33 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm0-4.45c-1.35 0-2.2.43-2.95.8-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.32-1.17.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm2.95-8.08c-.75-.38-1.58-.8-2.95-.8s-2.2.42-2.95.8c-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.37-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.93c1.35 0 2.2-.43 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V5.04c-.9 0-1.4-.25-2.05-.58zM17 8.09c-1.35 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6s-1.4-.25-2.05-.6c-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.35-1.15.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V9.49c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8z\"}));function y(){return b;}t.WavesIconSvg=y;var _=function(e){function t(){var t,r=e.apply(this,arguments)||this;return r.state={tab:r.plugin.behaviors.layout.leftPanelTabName.value},r.set=function(e){if(r.state.tab===e)return r.setState({tab:\"none\"},function(){return r.plugin.behaviors.layout.leftPanelTabName.next(\"none\");}),void o.PluginCommands.Layout.Update(r.plugin,{state:{regionState:n.__assign(n.__assign({},r.plugin.layout.state.regionState),{left:\"collapsed\"})}});r.setState({tab:e},function(){return r.plugin.behaviors.layout.leftPanelTabName.next(e);}),\"full\"!==r.plugin.layout.state.regionState.left&&o.PluginCommands.Layout.Update(r.plugin,{state:{regionState:n.__assign(n.__assign({},r.plugin.layout.state.regionState),{left:\"full\"})}});},r.tabs={none:i.createElement(i.Fragment,null),root:i.createElement(i.Fragment,null,i.createElement(c.SectionHeader,{icon:g.HomeOutlinedSvg,title:\"Home\"}),i.createElement(d.StateObjectActions,{state:r.plugin.state.data,nodeRef:s.StateTransform.RootRef,hideHeader:!0,initiallyCollapsed:!0,alwaysExpandFirst:!0}),\"none\"!==(null===(t=r.plugin.spec.components)||void 0===t?void 0:t.remoteState)&&i.createElement(f.RemoteStateSnapshots,{listOnly:!0})),data:i.createElement(i.Fragment,null,i.createElement(c.SectionHeader,{icon:g.AccountTreeOutlinedSvg,title:i.createElement(i.Fragment,null,i.createElement(O,null),\" State Tree\")}),i.createElement(p.StateTree,{state:r.plugin.state.data})),segments:i.createElement(i.Fragment,null,i.createElement(h.SegmentTree,null)),states:i.createElement(f.StateSnapshots,null),settings:i.createElement(i.Fragment,null,i.createElement(c.SectionHeader,{icon:g.TuneSvg,title:\"Plugin Settings\"}),i.createElement(S,null)),help:i.createElement(i.Fragment,null,i.createElement(c.SectionHeader,{icon:g.HelpOutlineSvg,title:\"Help\"}),i.createElement(m.HelpContent,null),i.createElement(C,null))},r;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,function(t){e.state.tab!==t&&e.setState({tab:t}),\"none\"===t&&\"collapsed\"!==e.plugin.layout.state.regionState.left&&o.PluginCommands.Layout.Update(e.plugin,{state:{regionState:n.__assign(n.__assign({},e.plugin.layout.state.regionState),{left:\"collapsed\"})}});}),this.subscribe(this.plugin.state.data.events.changed,function(t){var r=t.state;\"data\"===e.state.tab&&1===r.cells.size&&e.set(\"root\");});},t.prototype.render=function(){var e=this,t=this.state.tab,r=this.plugin.customState;return i.createElement(\"div\",{className:\"msp-left-panel-controls\"},i.createElement(\"div\",{className:\"msp-left-panel-controls-buttons\"},i.createElement(c.IconButton,{svg:g.HelpOutlineSvg,toggleState:\"help\"===t,transparent:!0,onClick:function onClick(){return e.set(\"help\");},title:\"Help\"}),r&&r.initParams&&r.initParams.superposition&&i.createElement(c.IconButton,{svg:y,toggleState:\"segments\"===t,transparent:!0,onClick:function onClick(){return e.set(\"segments\");},title:\"Superpose segments\"}),i.createElement(\"div\",{className:\"msp-left-panel-controls-buttons-bottom\"},i.createElement(c.IconButton,{svg:g.TuneSvg,toggleState:\"settings\"===t,transparent:!0,onClick:function onClick(){return e.set(\"settings\");},title:\"Settings\"}))),i.createElement(\"div\",{className:\"msp-scrollable-container\"},this.tabs[t]));},t;}(u.PluginUIComponent);t.LeftPanelControls=_;var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setSettings=function(e){var r;o.PluginCommands.Canvas3D.SetSettings(t.plugin,{settings:(r={},r[e.name]=e.value,r)});},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.layout.events.updated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.canvas3d.camera.stateChanged,function(t){void 0===t.radiusMax&&void 0===t.radius||e.forceUpdate();});},t.prototype.render=function(){return i.createElement(i.Fragment,null,this.plugin.canvas3d&&i.createElement(i.Fragment,null,i.createElement(c.SectionHeader,{title:\"Viewport\"}),i.createElement(l.ParameterControls,{params:a.Canvas3DParams,values:this.plugin.canvas3d.props,onChange:this.setSettings})));},t;}(u.PluginUIComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remove=function(e){e.preventDefault(),o.PluginCommands.State.RemoveObject(t.plugin,{state:t.plugin.state.data,ref:s.StateTransform.RootRef});},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.created,function(t){t.cell.transform.parent===s.StateTransform.RootRef&&e.forceUpdate();}),this.subscribe(this.plugin.state.events.cell.removed,function(t){t.parent===s.StateTransform.RootRef&&e.forceUpdate();});},t.prototype.render=function(){return 0===this.plugin.state.data.tree.children.get(s.StateTransform.RootRef).size?null:i.createElement(c.IconButton,{svg:g.DeleteOutlinedSvg,onClick:this.remove,title:\"Remove All\",style:{display:\"inline-block\"},small:!0,className:\"msp-no-hover-outline\",transparent:!0});},t;}(u.PluginUIComponent);function x(e){return i.createElement(\"div\",{className:\"msp-simple-help-section\"},e.header);}var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();});},t.prototype.render=function(){return i.createElement(\"div\",null,i.createElement(x,{header:\"Superposition\"}),i.createElement(v.HelpGroup,{header:\"Segment\"},i.createElement(v.HelpText,null,i.createElement(\"p\",null,\"Discrete UniProt sequence range mapped to the structure\"))),i.createElement(v.HelpGroup,{header:\"Cluster\"},i.createElement(v.HelpText,null,i.createElement(\"p\",null,\"Structural chains that possess significantly close superposition Q-score\"))),i.createElement(v.HelpGroup,{header:\"Representative chain\"},i.createElement(v.HelpText,null,i.createElement(\"p\",null,\"The best-ranked chain within a cluster chosen based on the model quality, resolution, observed residues ratio and UniProt sequence coverage\"))));},t;}(u.PluginUIComponent);},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.SegmentTree=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(238),o=r(26),s=r(13),u=r(32),c=r(19),l=r(2),d=r(67),f=r(13),p=r(409),m=r(183),h=r(14),g=r(88),v=r(24),b=r(10),y=r(138),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getSegmentParams=function(){var e=t.customState;if(e.superpositionState&&e.superpositionState.segmentData){var r=e.superpositionState.segmentData.map(function(e,t){var r=t+1+\" ( \"+e.segment_start+\" - \"+e.segment_end+\" )\";return[r,r];}),n={segment:l.ParamDefinition.Select(\"\",r,{label:\"Select Segment\",description:\"Select segment to view its clusters below\"})},i=e.superpositionState.activeSegment-1;t.setState({segment:{params:n,value:{segment:r[i][0]}}}),t.setState({isBusy:!1});}},t.updateSegment=function(e){return n.__awaiter(t,void 0,void 0,function(){var t,r,i=this;return n.__generator(this,function(a){return this.state.segment?((t=this.customState).events.isBusy.next(!0),this.hideStructures(t.superpositionState.activeSegment-1),(r=n.__assign({},this.state.segment)).value=e,this.setState({segment:r}),setTimeout(function(){return n.__awaiter(i,void 0,void 0,function(){var r;return n.__generator(this,function(n){switch(n.label){case 0:return r=parseInt(e.segment.split(\" \")[0]),t.superpositionState.activeSegment=r,[4,this.displayStructures(t.superpositionState.activeSegment-1)];case 1:return n.sent(),t.events.isBusy.next(!1),this.plugin.customState.events.segmentUpdate.next(!0),[2];}});});},100),[2,!1]):[2];});});},t.hideStructures=function(e){t.plugin.managers.interactivity.lociSelects.deselectAll(),t.plugin.managers.structure.focus.clear();var r=t.plugin.managers.structure.measurement.state,n=void 0;[\"labels\",\"distances\",\"angles\",\"dihedrals\"].forEach(function(e){n||r[e][0]&&(n=t.plugin.state.data.cells.get(r[e][0].transform.parent));}),n&&o.PluginCommands.State.RemoveObject(t.plugin,{state:n.parent,ref:n.transform.parent,removeParentGhosts:!0});var i=t.customState;i.superpositionState.visibleRefs[e]=[];for(var a=0,s=i.superpositionState.loadedStructs[e];a<s.length;a++){var u=s[a],c=t.customState.superpositionState.models[u];if(c){var l=t.plugin.managers.structure.hierarchy.current.refs.get(c);if(l&&l.components)for(var d=0,f=l.components;d<f.length;d++){var p=f[d];p&&p.cell&&!p.cell.state.isHidden&&(i.superpositionState.visibleRefs[e].push(p.cell.transform.ref),o.PluginCommands.State.ToggleVisibility(t.plugin,{state:p.cell.parent,ref:p.cell.transform.ref}));}}}},t.displayStructures=function(e){return n.__awaiter(t,void 0,void 0,function(){var t,r,i,a,s,u,c=this;return n.__generator(this,function(n){switch(n.label){case 0:return 0!==(t=this.customState).superpositionState.visibleRefs[e].length?[3,3]:(r=[],t.superpositionState.segmentData[e].clusters.forEach(function(e){var n=[e[0]];t.initParams.superpositionParams&&t.initParams.superpositionParams.superposeAll&&(n=e),n.forEach(function(e){var n=e.pdb_id+\"_\"+e.struct_asym_id,i=t.superpositionState.models[n];if(i){var a=c.plugin.state.data.cells.get(i);!!a.state.isHidden&&o.PluginCommands.State.ToggleVisibility(c.plugin,{state:a.parent,ref:i});}else r.push(e);});}),o.PluginCommands.Camera.Reset(this.plugin),r.length>0?[4,p.renderSuperposition(this.plugin,e,r)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:for(i=0,a=t.superpositionState.visibleRefs[e];i<a.length;i++)s=a[i],(u=this.plugin.state.data.cells.get(s))&&u.state.isHidden&&o.PluginCommands.State.ToggleVisibility(this.plugin,{state:u.parent,ref:s});o.PluginCommands.Camera.Reset(this.plugin),n.label=4;case 4:return[2];}});});},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.customState.events.superpositionInit,function(){var t=e.customState;t&&!t.superpositionError&&e.getSegmentParams(),e.forceUpdate();}),this.subscribe(this.plugin.customState.events.isBusy,function(t){e.setState({isBusy:t}),t?o.PluginCommands.Toast.Show(e.plugin,{title:\"Process\",message:\"Loading / computing large dataset!\",key:\"is-busy-toast\"}):o.PluginCommands.Toast.Hide(e.plugin,{key:\"is-busy-toast\"});}),this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,function(t){\"segments\"===t&&(e.getSegmentParams(),e.forceUpdate());});},Object.defineProperty(t.prototype,\"customState\",{get:function get(){return this.plugin.customState;},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=i.createElement(c.SectionHeader,{title:\"Structure clusters\"}),t=this.customState;if(t&&t.initParams&&!t.initParams.superposition)return i.createElement(i.Fragment,null,e,i.createElement(\"div\",null,\"Functionality unavailable!\"));if(t&&t.initParams&&t.initParams.superposition){if(e=i.createElement(c.SectionHeader,{title:\"Structure clusters - \"+t.initParams.moleculeId}),t.superpositionError)return i.createElement(i.Fragment,null,e,i.createElement(\"div\",{style:{textAlign:\"center\"}},t.superpositionError));if(!t.superpositionState||!t.superpositionState.segmentData)return i.createElement(i.Fragment,null,e,i.createElement(\"div\",{style:{textAlign:\"center\"}},\"Loading Segment Data!\"));}if(this.state){var r=parseInt(this.state.segment.value.segment.split(\" \")[0])-1,n=t.superpositionState.segmentData,a=\"( \"+n[0].segment_start+\" - \"+n[n.length-1].segment_end+\" )\";return e=i.createElement(c.SectionHeader,{title:\"Structure clusters \"+t.initParams.moleculeId,desc:a}),i.createElement(i.Fragment,null,e,i.createElement(d.ParameterControls,{params:this.state.segment.params,values:this.state.segment.value,onChangeValues:this.updateSegment,isDisabled:this.state.isBusy}),n[r].clusters.map(function(e,t){return i.createElement(S,{cluster:e,totalClusters:n[r].clusters.length,segmentIndex:r,clusterIndex:t,key:\"cluster-\"+r+\"-\"+t});}));}return i.createElement(i.Fragment,null);},t;}(u.PurePluginUIComponent);t.SegmentTree=_;var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isCollapsed:!1,showAll:!1,showNone:!1,showSearch:!1,isBusy:!1,cluster:t.props.cluster,searchText:\"\"},t.inputStream=new y.Subject(),t.handleInputStream=function(e){t.setState({searchText:e});var r=t.props.cluster.filter(function(t){return t.pdb_id.toLowerCase().indexOf(e.toLowerCase())>=0;});t.setState({cluster:r});},t.toggleExpanded=function(e){e.preventDefault(),t.setState({isCollapsed:!t.state.isCollapsed}),e.currentTarget.blur();},t.selectAll=function(e){e.preventDefault(),t.setState({showAll:!t.state.showAll,showNone:!1}),e.currentTarget.blur();},t.selectNone=function(e){e.preventDefault(),t.setState({showAll:!1,showNone:!t.state.showNone}),e.currentTarget.blur();},t.applyAction=function(e){return n.__awaiter(t,void 0,void 0,function(){var t,r,i=this;return n.__generator(this,function(a){return e.preventDefault(),e.currentTarget.blur(),(t=this.customState).events.isBusy.next(!0),r=n.__assign({},this.state),this.setState({showAll:!1,showNone:!1}),setTimeout(function(){return n.__awaiter(i,void 0,void 0,function(){var e,i,a,s,u,c,l,d,f,m,h;return n.__generator(this,function(g){switch(g.label){case 0:e=[],g.label=1;case 1:g.trys.push([1,9,10,15]),i=n.__asyncValues(this.state.cluster),g.label=2;case 2:return[4,i.next()];case 3:return(a=g.sent()).done?[3,8]:(s=a.value,u=s.pdb_id+\"_\"+s.struct_asym_id,c=void 0,t&&t.superpositionState&&t.superpositionState.models[u]&&(c=this.customState.superpositionState.models[u]),c?(l=this.plugin.state.data.cells.get(c))&&((d=!!l.state.isHidden)&&r.showAll||!d&&r.showNone)?[4,o.PluginCommands.State.ToggleVisibility(this.plugin,{state:l.parent,ref:c})]:[3,5]:[3,6]);case 4:g.sent(),g.label=5;case 5:return[3,7];case 6:r.showAll&&e.push(s),g.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return f=g.sent(),m={error:f},[3,15];case 10:return g.trys.push([10,,13,14]),a&&!a.done&&(h=i.return)?[4,h.call(i)]:[3,12];case 11:g.sent(),g.label=12;case 12:return[3,14];case 13:if(m)throw m.error;return[7];case 14:return[7];case 15:return o.PluginCommands.Camera.Reset(this.plugin),e.length>0?[4,p.renderSuperposition(this.plugin,this.props.segmentIndex,e)]:[3,17];case 16:g.sent(),g.label=17;case 17:return t.events.isBusy.next(!1),[2];}});});}),[2];});});},t.cancelAction=function(e){e.preventDefault(),t.setState({showAll:!1,showNone:!1}),e.currentTarget.blur();},t.clearSearch=function(e){e.preventDefault(),t.setState({searchText:\"\"}),t.inputStream.next(\"\"),e.currentTarget.blur();},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.customState.events.isBusy,function(t){e.setState({isBusy:t,showAll:!1,showNone:!1});}),this.subscribe(this.inputStream.pipe(a.debounceTime(1e3/24)),function(t){return e.handleInputStream(t);});},Object.defineProperty(t.prototype,\"customState\",{get:function get(){return this.plugin.customState;},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.customState;if(!t.superpositionState||!t.superpositionState.segmentData)return i.createElement(i.Fragment,null);var r=i.createElement(c.IconButton,{svg:this.state.isCollapsed?h.ArrowRightSvg:h.ArrowDropDownSvg,flex:\"20px\",onClick:this.toggleExpanded,transparent:!0,disabled:this.state.isBusy,className:\"msp-no-hover-outline\"}),n=\"Segment \"+t.superpositionState.activeSegment+\" Cluster \"+(this.props.clusterIndex+1),a=i.createElement(c.Button,{className:\"msp-btn-tree-label\",noOverflow:!0,title:n,disabled:this.state.isBusy},i.createElement(\"span\",null,\"Cluster \",this.props.clusterIndex+1),\" \",i.createElement(\"small\",null,this.state.cluster.length<this.props.cluster.length?this.state.cluster.length+\" / \":\"\",this.props.cluster.length,\" chain\",this.props.cluster.length>1?\"s\":\"\")),o=i.createElement(i.Fragment,null,i.createElement(c.Button,{icon:h.CheckSvg,flex:!0,onClick:this.selectAll,style:{flex:\"0 0 50px\",textAlign:\"center\",fontSize:\"80%\",color:\"#9cacc3\",padding:0},disabled:this.state.isBusy,title:\"Show all chains\"},\"All\"),i.createElement(c.Button,{icon:h.CloseSvg,flex:!0,onClick:this.selectNone,style:{flex:\"0 0 50px\",textAlign:\"center\",fontSize:\"80%\",color:\"#9cacc3\",padding:0},disabled:this.state.isBusy,title:\"Hide all chains\"},\"None\")),s=i.createElement(\"div\",{className:\"msp-flex-row msp-tree-row\",style:{marginTop:\"10px\"}},r,a,this.props.cluster.length>1&&o),u=i.createElement(\"div\",{className:\"msp-mapped-parameter-group\",style:{fontSize:\"90%\"}},i.createElement(\"div\",{className:\"msp-control-row msp-transform-header-brand-gray\",style:{height:\"33px\",marginLeft:\"30px\"}},i.createElement(\"span\",{className:\"msp-control-row-label\"},\"Search PDB ID\"),i.createElement(\"div\",{className:\"msp-control-row-ctrl\"},i.createElement(\"input\",{type:\"text\",placeholder:\"Enter PDB ID..\",disabled:this.state.isBusy,onChange:function onChange(t){return e.inputStream.next(t.target.value);},value:this.state.searchText,maxLength:4}))),i.createElement(c.IconButton,{svg:h.CloseSvg,flex:!0,onClick:this.clearSearch,style:{flex:\"0 0 24px\",padding:0},disabled:this.state.isBusy||\"\"===this.state.searchText,toggleState:\"\"!==this.state.searchText,title:\"Clear search input\"}));return i.createElement(i.Fragment,null,s,(this.state.showAll||this.state.showNone)&&i.createElement(\"div\",null,i.createElement(\"div\",{className:\"msp-control-row msp-transform-header-brand-\"+(this.state.showAll?\"green\":\"red\"),style:{display:\"flex\",marginLeft:\"20px\",height:\"35px\"}},i.createElement(\"span\",{className:\"msp-control-row-label\",style:{flex:\"1 1 auto\",textAlign:\"left\",fontSize:\"85%\"}},this.state.showAll?\"Display\":\"Hide\",\" \",this.state.cluster.length<this.props.cluster.length?this.state.cluster.length+\" / \":\"all \",this.props.cluster.length,\" chains\"),i.createElement(c.Button,{icon:h.CheckSvg,flex:!0,onClick:this.applyAction,style:{flex:\"0 0 60px\",textAlign:\"center\",fontSize:\"78%\",color:\"#9cacc3\",padding:0,margin:\"0 1px\"},title:\"Apply action\"},\"Apply\"),i.createElement(c.Button,{icon:h.CloseSvg,flex:!0,onClick:this.cancelAction,style:{flex:\"0 0 60px\",textAlign:\"center\",fontSize:\"78%\",color:\"#9cacc3\",padding:0,margin:\"0 1px\"},title:\"Cancel action\"},\"Cancel\"))),!this.state.isCollapsed&&this.props.cluster.length>5&&u,!this.state.isCollapsed&&i.createElement(\"div\",{className:\"msp-tree-updates-wrapper\",style:{maxHeight:this.props.totalClusters>1?\"330px\":\"87%\",overflowY:\"auto\"}},this.state.cluster.map(function(t,r){return i.createElement(O,{segmentIndex:e.props.segmentIndex,structure:t,isRep:0===r,key:\"str-\"+t.pdb_id+t.struct_asym_id+r});})));},t;}(u.PluginUIComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showControls:!1,isBusy:!1,isProcessing:!1,isHidden:!0},t.toggleVisible=function(e){return n.__awaiter(t,void 0,void 0,function(){var t,r,i,a;return n.__generator(this,function(n){switch(n.label){case 0:if(e.preventDefault(),e.currentTarget.blur(),this.setState({isProcessing:!0,showControls:!1}),!this.ref)return[3,1];if((t=this.plugin.managers.structure.hierarchy.current.refs.get(this.ref))&&t.components){for(r=0,i=t.components;r<i.length;r++)a=i[r],!!a.cell.state.isHidden===this.state.isHidden&&o.PluginCommands.State.ToggleVisibility(this.plugin,{state:a.cell.parent,ref:a.cell.transform.ref});this.setState({isHidden:!this.state.isHidden});}return[3,3];case 1:return[4,p.renderSuperposition(this.plugin,this.props.segmentIndex,[this.props.structure])];case 2:n.sent(),n.label=3;case 3:return this.setState({isProcessing:!1}),o.PluginCommands.Camera.Reset(this.plugin),[2];}});});},t.selectAction=function(e){e&&(t.setState({showControls:!1}),(null==e?void 0:e.value)());},t.highlight=function(e){if(e.preventDefault(),t.ref){var r=t.plugin.state.data.cells.get(t.ref);o.PluginCommands.Interactivity.Object.Highlight(t.plugin,{state:r.parent,ref:t.ref});}e.currentTarget.blur();},t.clearHighlight=function(e){e.preventDefault(),o.PluginCommands.Interactivity.ClearHighlights(t.plugin),e.currentTarget.blur();},t.toggleControls=function(e){e.preventDefault(),t.setState({showControls:!t.state.showControls}),e.currentTarget.blur();},t;}return n.__extends(t,e),Object.defineProperty(t.prototype,\"customState\",{get:function get(){return this.plugin.customState;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"ref\",{get:function get(){return this.customState&&this.customState.superpositionState&&this.customState.superpositionState.models[this.props.structure.pdb_id+\"_\"+this.props.structure.struct_asym_id]?this.customState.superpositionState.models[this.props.structure.pdb_id+\"_\"+this.props.structure.struct_asym_id]:void 0;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"modelCell\",{get:function get(){return this.ref?this.plugin.state.data.cells.get(this.ref):void 0;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"isAllHidden\",{get:function get(){var e=!0;if(this.ref){var t=this.plugin.managers.structure.hierarchy.current.refs.get(this.ref);if(t&&t.components)for(var r=0,n=t.components;r<n.length;r++){var i=n[r];if(i&&i.cell&&!i.cell.state.isHidden){e=!1;break;}}else e=!1;}return e;},enumerable:!1,configurable:!0}),t.prototype.checkRelation=function(e){var t=!1,r=this.plugin.state.data.cells.get(e);if(r&&r.transform.parent){if(r&&r.transform.parent===this.ref)t=!0;else{var n=this.plugin.state.data.cells.get(r.transform.parent);n&&n.transform.parent===this.ref&&(t=!0);}}else{var i=this.plugin.state.data.cells.get(this.ref);i&&i.transform.parent===r.transform.parent&&(t=!0);}return t;},t.prototype.is=function(e){if(!this.ref)return!1;var t=!1;return this.ref&&e.ref!==this.ref&&(t=this.checkRelation(e.ref)),!(e.ref!==this.ref&&!t)||!!(this.customState.superpositionState.invalidStruct.indexOf(this.props.structure.pdb_id+\"_\"+this.props.structure.struct_asym_id)>-1);},t.prototype.componentDidMount=function(){var e=this;this.setState({isHidden:this.isAllHidden}),this.subscribe(this.plugin.customState.events.isBusy,function(t){e.setState({isBusy:t,showControls:!1});}),this.subscribe(this.plugin.state.events.cell.stateUpdated.pipe(a.filter(function(t){return e.is(t);}),a.debounceTime(33)),function(t){e.setState({isHidden:e.isAllHidden});});},t.prototype.getTagRefs=function(e){var t=new Set(e),r=this.plugin.state.data.tree;return f.StateSelection.findUniqueTagsInSubtree(r,this.modelCell.transform.ref,t);},t.prototype.getRandomColor=function(){var e=g.ColorLists,t=this.plugin.customState.superpositionState,r=t.colorState[this.props.segmentIndex].palleteIndex,n=t.colorState[this.props.segmentIndex].colorIndex;e[t.colorPalette[r]].list[n+1]?n+=1:(n=0,r=t.colorPalette[r+1]?r+1:0);var i=t.colorPalette[r];return this.plugin.customState.superpositionState.colorState[this.props.segmentIndex].palleteIndex=r,this.plugin.customState.superpositionState.colorState[this.props.segmentIndex].colorIndex=n,e[i].list[n];},t.prototype.addChainRepr=function(){return n.__awaiter(this,void 0,void 0,function(){var e,t,r,i;return n.__generator(this,function(n){switch(n.label){case 0:return e=this.getRandomColor(),t=this.plugin.state.data.select(this.ref)[0],r=b.MolScriptBuilder.struct.generator.atomGroups({\"chain-test\":b.MolScriptBuilder.core.rel.eq([b.MolScriptBuilder.struct.atomProperty.macromolecular.label_asym_id(),this.props.structure.struct_asym_id])}),[4,this.plugin.builders.structure.tryCreateComponentFromExpression(t,r,\"Chain-\"+this.props.segmentIndex,{label:\"Chain\",tags:[\"superposition-sel\"]})];case 1:return(i=n.sent())?[4,this.plugin.builders.structure.representation.addRepresentation(i,{type:\"cartoon\",color:\"uniform\",colorParams:{value:e}},{tag:\"superposition-visual\"})]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2];}});});},t.prototype.updates=function(){var e=this,t=this.plugin.managers.structure.hierarchy.current.refs.get(this.ref);if(t&&t.components){var r=[],n=!0;t.components.forEach(function(e){\"Chain\"===e.key.split(\",\")[0].split(\"-\")[2]&&(n=!1),e.representations&&e.representations.forEach(function(e){r.push(e);});});var a=this.plugin.customState;if(a.initParams&&a.initParams.superpositionParams&&!a.initParams.superpositionParams.ligandView&&(n=!1),r.length>0)return i.createElement(\"div\",{className:\"msp-accent-offset\",style:{marginLeft:\"40px\"}},r.length>0&&r.map(function(e,r){return i.createElement(x,{group:[t],key:e.cell.transform.ref+\"-\"+r,representation:e});}),n&&i.createElement(\"div\",{className:\"msp-control-group-header\",style:{marginTop:\"1px\"}},i.createElement(c.Button,{noOverflow:!0,className:\"msp-control-button-label\",title:\"Click to add chain representaion\",onClick:function onClick(){return e.addChainRepr();}},\"  Add Chain \",this.props.structure.struct_asym_id,\" Representation\")));}return i.createElement(i.Fragment,null);},t.prototype.getSubtitle=function(){var e,t=this.plugin.customState.superpositionState.hets[this.props.structure.pdb_id+\"_\"+this.props.structure.struct_asym_id];if(t){var r=this.props.structure.is_representative?1:4,n=t.length,i=t.join(\", \");n>r&&(i=t.slice(0,r).join(\", \"),i+=\" + \"+(n-r)),e=\" ( \"+i+\" )\",this.props.structure.is_representative&&(e=\" \"+e+\" ( Representative )\");}else this.props.structure.is_representative&&(e=\" ( Representative )\");return e;},Object.defineProperty(t.prototype,\"panelColor\",{get:function get(){var e=\"#808080\";if(!this.state.isHidden&&this.modelCell){var t=this.getTagRefs([\"superposition-visual\",\"superposition-ligand-visual\"]),r=t[\"superposition-ligand-visual\"]?t[\"superposition-ligand-visual\"]:t[\"superposition-visual\"]?t[\"superposition-visual\"]:void 0;if(r){var n=this.plugin.state.data.cells.get(r);if(n.params&&n.params.values&&n.params.values.colorTheme){var i=n.params.values.colorTheme;if(i.params&&i.params.value)e=\"\"+v.Color.toStyle(i.params.value);else if(i.params&&i.params.palette){var a=i.params.palette.params.list.colors;e=\"\"+v.Color.toStyle(a[0]);}else if(i.params&&i.params.list){var o=i.params.list.colors;e=\"\"+v.Color.toStyle(o[0]);}}}}return e;},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.customState.initParams.superpositionParams,t=this.props.structure.pdb_id+\"_\"+this.props.structure.struct_asym_id,r=this.customState.superpositionState.invalidStruct.indexOf(t)>-1,n=this.customState.superpositionState.noMatrixStruct.indexOf(t)>-1,a=r?n?\" Matrix not available!\":\" No Ligand found!\":this.getSubtitle(),o=this.props.structure.pdb_id+\" chain \"+this.props.structure.auth_asym_id;e&&e.ligandView&&(o=this.props.structure.pdb_id+\" \"+this.props.structure.struct_asym_id);var s=i.createElement(c.Button,{className:\"msp-btn-tree-label\",style:{borderLeftColor:this.panelColor},noOverflow:!0,title:o,disabled:!!(r||this.state.isBusy||this.state.isProcessing),onMouseEnter:this.highlight,onMouseLeave:this.clearHighlight},i.createElement(\"span\",null,o),a&&i.createElement(\"small\",null,a)),u=i.createElement(c.IconButton,{svg:this.state.showControls?h.ArrowDropDownSvg:h.ArrowRightSvg,flex:\"20px\",onClick:this.toggleControls,transparent:!0,className:\"msp-no-hover-outline\",disabled:!!(r||this.state.isBusy||this.state.isProcessing)}),l=i.createElement(c.IconButton,{svg:this.state.isHidden?h.VisibilityOffOutlinedSvg:h.VisibilityOutlinedSvg,toggleState:!1,small:!0,onClick:this.toggleVisible,disabled:!!(r||this.state.isBusy||this.state.isProcessing),title:this.state.isHidden?\"Show chain\":\"Hide chain\"}),d=i.createElement(\"div\",{className:\"msp-flex-row msp-tree-row\",style:{marginLeft:this.state.isHidden?\"31px\":\"10px\"}},!this.state.isHidden&&u,s,l);return i.createElement(\"div\",{style:{marginBottom:\"1px\"}},d,this.state.showControls&&this.updates());},t;}(u.PluginUIComponent),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleVisible=function(e){e.preventDefault(),e.currentTarget.blur();var r=t.props.representation.cell;o.PluginCommands.State.ToggleVisibility(t.plugin,{state:r.parent,ref:r.transform.parent});},t;}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.stateUpdated,function(t){s.State.ObjectEvent.isCell(t,e.props.representation.cell)&&e.forceUpdate();});},t.prototype.render=function(){var e,t,r,n,a,o,s,u=this.props.representation.cell,l=null===(e=u.obj)||void 0===e?void 0:e.label;if((null===(t=u.obj)||void 0===t?void 0:t.data.source)&&(null===(r=u.obj)||void 0===r?void 0:r.data.source.label)){var d=(null===(n=u.obj)||void 0===n?void 0:n.data.source.label.indexOf(\"[Focus]\"))>=0?\"[Focus]\":null===(a=u.obj)||void 0===a?void 0:a.data.source.label,f=d.length>10;d=\"\"+(f?d.substring(0,28)+\"...\":d),l=f?d:d+\" \"+(l&&l.length<21?\" - \"+l:\"\");}return(null===(o=u.obj)||void 0===o?void 0:o.data.source)&&\"Custom Selection\"===(null===(s=u.obj)||void 0===s?void 0:s.data.source.label)&&(l=\"Custom Selection\"),i.createElement(\"div\",{className:\"msp-representation-entry\"},u.parent&&i.createElement(c.ExpandGroup,{header:\"\"+(l||\"Representation\"),noOffset:!0,headerStyle:{overflow:\"hidden\"}},i.createElement(m.UpdateTransformControl,{state:u.parent,transform:u.transform,customHeader:\"none\",noMargin:!0})),i.createElement(c.IconButton,{svg:this.props.representation.cell.state.isHidden?h.VisibilityOffOutlinedSvg:h.VisibilityOutlinedSvg,toggleState:!1,onClick:this.toggleVisible,title:this.props.representation.cell.state.isHidden?\"Show representation\":\"Hide representation\",small:!0,className:\"msp-default-bg\",style:{position:\"absolute\",top:0,right:0,lineHeight:\"24px\",height:\"24px\",textAlign:\"right\",width:\"32px\",paddingRight:\"6px\",background:\"none\"}}));},t;}(u.PurePluginUIComponent);},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.CustomEvents=void 0;var n=r(410);!function(e){function t(e,t,r){void 0!==t&&(t.residueNumber=t.seq_id,e.eventData=t,e.eventData.residueNumber=t.seq_id,r.dispatchEvent(e));}e.add=function(e,r){var i=function(e){for(var t={},r=0,n=e.length;r<n;r++){var i=e[r],a=void 0;\"function\"==typeof MouseEvent?a=new MouseEvent(i,{view:window,bubbles:!0,cancelable:!0}):\"function\"==typeof document.createEvent&&(a=document.createEvent(\"MouseEvents\")).initEvent(i,!0,!0),t[i]=a;}return t;}([\"PDB.molstar.click\",\"PDB.molstar.mouseover\",\"PDB.molstar.mouseout\"]);e.behaviors.interaction.click.subscribe(function(e){if(1===e.button&&e.current&&\"empty-loci\"!==e.current.loci.kind){var a=n.lociDetails(e.current.loci);a&&t(i[\"PDB.molstar.click\"],a,r);}}),e.behaviors.interaction.hover.subscribe(function(e){if(e.current&&e.current.loci&&\"empty-loci\"!==e.current.loci.kind){var a=n.lociDetails(e.current.loci);a&&t(i[\"PDB.molstar.mouseover\"],a,r);}e.current&&e.current.loci&&\"empty-loci\"===e.current.loci.kind&&t(i[\"PDB.molstar.mouseout\"],{},r);});};}(t.CustomEvents||(t.CustomEvents={}));},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.SuperpositionFocusRepresentation=t.SuperpositionFocusRepresentationTags=void 0;var n,i=r(0),a=r(4),o=r(162),s=r(28),u=r(170),c=r(10),l=r(13),d=r(2),f=r(26),p=r(410);!function(e){e.SurrSel=\"superposition-focus-surr-sel\",e.SurrRepr=\"superposition-focus-surr-repr\";}(n=t.SuperpositionFocusRepresentationTags||(t.SuperpositionFocusRepresentationTags={}));var m=new Set([n.SurrSel,n.SurrRepr]),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return i.__extends(t,e),Object.defineProperty(t.prototype,\"surrLabel\",{get:function get(){return\"[Focus] Surroundings (\"+this.params.expandRadius+\" Å)\";},enumerable:!1,configurable:!0}),t.prototype.ensureShape=function(e){var t=this.plugin.state.data,r=t.tree,i=t.build(),a=l.StateSelection.findUniqueTagsInSubtree(r,e.transform.ref,m);return a[n.SurrSel]||(a[n.SurrSel]=i.to(e).apply(s.StateTransforms.Model.StructureSelectionFromExpression,{expression:c.MolScriptBuilder.struct.generator.empty(),label:this.surrLabel},{tags:n.SurrSel}).ref),a[n.SurrRepr]||(a[n.SurrRepr]=i.to(a[n.SurrSel]).apply(s.StateTransforms.Representation.StructureRepresentation3D,this.params.surroundingsParams,{tags:n.SurrRepr}).ref),{state:t,builder:i,refs:a};},t.prototype.clear=function(e){var t=this.plugin.state.data,r=t.select(l.StateSelection.Generators.byRef(e).subtree().withTag(n.SurrSel));if(0!==r.length){for(var a=t.build(),o=c.MolScriptBuilder.struct.generator.empty(),u=0,d=r;u<d.length;u++){var p=d[u];a.to(p).update(s.StateTransforms.Model.StructureSelectionFromExpression,function(e){return i.__assign(i.__assign({},e),{expression:o});});}return f.PluginCommands.State.Update(this.plugin,{state:t,tree:a,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}});}},t.prototype.focus=function(e){return i.__awaiter(this,void 0,void 0,function(){var t,r,o,u,l,d,m,h,g,v,b=this;return i.__generator(this,function(y){switch(y.label){case 0:return(t=this.plugin.helpers.substructureParent.get(e.structure))&&t.obj?(r=a.StructureElement.Loci.remap(e,t.obj.data),o=a.StructureElement.Loci.extendToWholeResidues(r),u=a.StructureElement.Bundle.fromLoci(o),l=a.StructureElement.Bundle.toExpression(u),d=c.MolScriptBuilder.struct.modifier.includeSurroundings({0:l,radius:this.params.expandRadius,\"as-whole-residues\":!0}),p.lociDetails(e)||(d=c.MolScriptBuilder.struct.modifier.exceptBy({0:d,by:l})),m=this.ensureShape(t),h=m.state,g=m.builder,v=m.refs,g.to(v[n.SurrSel]).update(s.StateTransforms.Model.StructureSelectionFromExpression,function(e){return i.__assign(i.__assign({},e),{expression:d,label:b.surrLabel});}),[4,f.PluginCommands.State.Update(this.plugin,{state:h,tree:g,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}})]):[2];case 1:return y.sent(),[2];}});});},t.prototype.register=function(e){var t=this;this.subscribeObservable(this.plugin.managers.structure.focus.behaviors.current,function(e){t.clear(l.StateTransform.RootRef),e&&t.focus(e.loci);});},t.prototype.update=function(e){return i.__awaiter(this,void 0,void 0,function(){var t,r,a,o,s,u,c;return i.__generator(this,function(i){switch(i.label){case 0:for(t=this.params,this.params=e,r=this.plugin.state.data,a=r.build(),o=l.StateSelection.Generators.root.subtree(),s=0,u=r.select(o.withTag(n.SurrRepr));s<u.length;s++)c=u[s],a.to(c).update(this.params.surroundingsParams);return[4,f.PluginCommands.State.Update(this.plugin,{state:r,tree:a,options:{doNotLogTiming:!0,doNotUpdateCurrent:!0}})];case 1:return i.sent(),e.expandRadius===t.expandRadius?[3,3]:[4,this.clear(l.StateTransform.RootRef)];case 2:i.sent(),i.label=3;case 3:return[2,!0];}});});},t;}(u.PluginBehavior.WithSubscribers);t.SuperpositionFocusRepresentation=u.PluginBehavior.create({name:\"create-superposition-focus-representation\",display:{name:\"Superposition Focus Representation\"},category:\"interaction\",ctor:h,params:function params(e,t){return function(e){var t=s.StateTransforms.Representation.StructureRepresentation3D.definition.params(void 0,e);return{expandRadius:d.ParamDefinition.Numeric(5,{min:1,max:10,step:1}),surroundingsParams:d.ParamDefinition.Group(t,{label:\"Surroundings\",customDefault:o.createStructureRepresentationParams(e,void 0,{type:\"ball-and-stick\",size:\"physical\",typeParams:{sizeFactor:.16},sizeParams:{scale:.3}})})};}(t);}});},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.SuperpostionViewport=void 0;var n=r(0),i=n.__importStar(r(3)),a=r(32),o=r(270),s=r(389),u=r(390),c=r(322),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return n.__extends(t,e),t.prototype.render=function(){var e,t,r=(null===(t=null===(e=this.plugin.spec.components)||void 0===e?void 0:e.viewport)||void 0===t?void 0:t.controls)||c.ViewportControls;return i.createElement(i.Fragment,null,i.createElement(c.Viewport,null),i.createElement(\"div\",{className:\"msp-viewport-top-left-controls\"},i.createElement(o.StateSnapshotViewportControls,null)),i.createElement(o.SelectionViewportControls,null),i.createElement(r,null),i.createElement(s.BackgroundTaskProgress,null),i.createElement(\"div\",{className:\"msp-highlight-toast-wrapper\"},i.createElement(o.LociLabels,null),i.createElement(u.Toasts,null)));},t;}(a.PluginUIComponent);t.SuperpostionViewport=l;},function(e,t,r){},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PluginContext\",function(){return Cu;});var n,i,a,o=r(0),s=r(151),u=r(102),c=r(235),l=r(158),d=r(2);i=n||(n={}),a=function(){function e(){this.providers=Object(u.OrderedMap)().asMutable(),this.defaultAutoAttachValues=new Map();}return e.prototype.getParams=function(e){var t={},r=[],n=[];if(e)for(var i=this.providers.values();;){var a=i.next();if(a.done)break;var s=a.value;s.isApplicable(e)&&(s.isHidden||(r.push([s.descriptor.name,s.label]),this.defaultAutoAttachValues.get(s.descriptor.name)&&n.push(s.descriptor.name)),t[s.descriptor.name]=d.ParamDefinition.Group(Object(o.__assign)({},s.getParams(e)),{label:s.label,isHidden:s.isHidden}));}return{autoAttach:d.ParamDefinition.MultiSelect(n,r),properties:d.ParamDefinition.Group(t,{isFlat:!0})};},e.prototype.setDefaultAutoAttach=function(e,t){this.defaultAutoAttachValues.set(e,t);},e.prototype.get=function(e){if(!this.providers.get(e))throw new Error(\"Custom property '\"+e+\"' is not registered.\");return this.providers.get(e);},e.prototype.register=function(e,t){this.providers.set(e.descriptor.name,e),this.defaultAutoAttachValues.set(e.descriptor.name,t);},e.prototype.unregister=function(e){this.providers.delete(e),this.defaultAutoAttachValues.delete(e);},e;}(),i.Registry=a;var f=r(287),p=[\"gz\",\"zip\"],m=[\"bcif\",\"ccp4\",\"dcd\"];var h=function(){function e(e){this.plugin=e;}return Object.defineProperty(e.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),e.prototype.rawData=function(e,t){return this.dataState.build().toRoot().apply(f.RawData,e,t).commit({revertOnError:!0});},e.prototype.download=function(e,t){return this.dataState.build().toRoot().apply(f.Download,e,t).commit({revertOnError:!0});},e.prototype.downloadBlob=function(e,t){return this.dataState.build().toRoot().apply(f.DownloadBlob,e,t).commit({revertOnError:!0});},e.prototype.readFile=function(e,t){var r;return Object(o.__awaiter)(this,void 0,void 0,function(){var n,i;return Object(o.__generator)(this,function(a){switch(a.label){case 0:return[4,this.dataState.build().toRoot().apply(f.ReadFile,e,t).commit({revertOnError:!0})];case 1:return n=a.sent(),i=function(e){var t,r,n=\"\",i=(t=e instanceof File?e.name:e instanceof Blob?\"\":e).lastIndexOf(\"?\"),a=-1!==i?t.substring(i):\"\",o=(t=t.substring(0,-1===i?t.length:i)).replace(/^.*[\\\\/]/,\"\"),s=o.substring(0,o.lastIndexOf(\".\")),u=o.split(\".\"),c=u.length>1?(u.pop()||\"\").toLowerCase():\"\",l=t.match(/^(.+):\\/\\/(.+)$/);l&&(n=l[1].toLowerCase(),t=l[2]||\"\");var d=t.substring(0,t.lastIndexOf(\"/\")+1);if(p.includes(c)){r=c;var f=t.length-c.length-1;c=(t.substr(0,f).split(\".\").pop()||\"\").toLowerCase();var h=s.length-c.length-1;s=s.substr(0,h);}else r=!1;return{path:t,name:o,ext:c,base:s,dir:d,compressed:r,binary:m.includes(c),protocol:n,query:a,src:e};}((null===(r=e.file)||void 0===r?void 0:r.file)||\"\"),[2,{data:n,fileInfo:i}];}});});},e;}(),g=r(13),v=r(8),b=r(28),y=r(9),_=r(16),S=r(61),O=r(85),x=r(162),C=r(198),w=r(269),P=r(30),j=r(101),E=function(){function e(e){var t=this;this.plugin=e,this._providers=[],this.providerMap=new Map(),this.defaultProvider=w.a.auto,Object(O.c)(w.a,function(e){return t.registerPreset(e);});}return Object.defineProperty(e.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),e.prototype.resolveProvider=function(e){var t;return\"string\"==typeof e?null!==(t=w.a[e])&&void 0!==t?t:Object(y.c)(this._providers,function(t){return t.id===e;}):e;},e.prototype.hasPreset=function(e){for(var t=0,r=this._providers;t<r.length;t++){var n=r[t];if(!n.isApplicable||n.isApplicable(e,this.plugin))return!0;}return!1;},Object.defineProperty(e.prototype,\"providers\",{get:function get(){return this._providers;},enumerable:!1,configurable:!0}),e.prototype.getPresets=function(e){if(!e)return this.providers;for(var t=[],r=0,n=this._providers;r<n.length;r++){var i=n[r];i.isApplicable&&!i.isApplicable(e,this.plugin)||t.push(i);}return t;},e.prototype.getPresetSelect=function(e){for(var t=[],r=0,n=this._providers;r<n.length;r++){var i=n[r];e&&i.isApplicable&&!i.isApplicable(e,this.plugin)||t.push([i.id,i.display.name,i.display.group]);}return d.ParamDefinition.Select(\"auto\",t);},e.prototype.getPresetsWithOptions=function(e){for(var t=[],r=Object.create(null),n=0,i=this._providers;n<i.length;n++){var a=i[n];a.isApplicable&&!a.isApplicable(e,this.plugin)||(t.push([a.id,a.display.name]),r[a.id]=a.params?d.ParamDefinition.Group(a.params(e,this.plugin)):d.ParamDefinition.EmptyGroup());}return 0===t.length?d.ParamDefinition.MappedStatic(\"\",{\"\":d.ParamDefinition.EmptyGroup()}):d.ParamDefinition.MappedStatic(t[0][0],r,{options:t});},e.prototype.registerPreset=function(e){if(this.providerMap.has(e.id))throw new Error(\"Representation provider with id '\"+e.id+\"' already registered.\");this._providers.push(e),this.providerMap.set(e.id,e);},e.prototype.unregisterPreset=function(e){this.providerMap.delete(e.id),Object(P.arrayRemoveInPlace)(this._providers,e);},e.prototype.applyPreset=function(e,t,r){var n,i=this,a=this.resolveProvider(t);if(a){var o=this.plugin.state.data,s=g.StateObjectRef.resolveAndCheck(o,e);if(s){var u=(null===(n=a.params)||void 0===n?void 0:n.call(a,s.obj,this.plugin))||{},c=r||(a.params?d.ParamDefinition.getDefaultValues(u):{}),l=this.plugin.config.get(j.PluginConfig.Structure.DefaultRepresentationPresetParams);c=d.ParamDefinition.merge(u,l,c);var f=_.b.create(\"\"+a.display.name,function(){return a.apply(s,c,i.plugin);});return this.plugin.runTask(f);}S.b||console.warn(\"Applying structure repr. provider to bad cell.\");}},e.prototype.addRepresentation=function(e,t,r){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,i;return Object(o.__generator)(this,function(a){switch(a.label){case 0:return n=this.dataState.build(),(i=this.buildRepresentation(n,e,t,r))?[4,n.commit()]:[2];case 1:return a.sent(),[2,i];}});});},e.prototype.buildRepresentation=function(e,t,r,n){var i,a;if(t){var o=null===(a=null===(i=g.StateObjectRef.resolveAndCheck(this.dataState,t))||void 0===i?void 0:i.obj)||void 0===a?void 0:a.data;if(o){var s=Object(x.createStructureRepresentationParams)(this.plugin,o,r);return(null==n?void 0:n.tag)?e.to(t).applyOrUpdateTagged(n.tag,C.StructureRepresentation3D,s,{state:null==n?void 0:n.initialState}).selector:e.to(t).apply(C.StructureRepresentation3D,s,{state:null==n?void 0:n.initialState}).selector;}}},e;}(),A=r(4),T=r(113),D=r(11),I=r(268),M=r(1),k=r(164);function B(e){return e;}(B||(B={})).CommonParams=function(e,t){return{modelProperties:d.ParamDefinition.Optional(d.ParamDefinition.Group(g.StateTransformer.getParamDefinition(b.StateTransforms.Model.CustomModelProperties,void 0,t))),structureProperties:d.ParamDefinition.Optional(d.ParamDefinition.Group(g.StateTransformer.getParamDefinition(b.StateTransforms.Model.CustomStructureProperties,void 0,t))),representationPreset:d.ParamDefinition.Optional(d.ParamDefinition.Text(\"auto\"))};};var V=B.CommonParams,R=function R(e,t){return Object(o.__assign)({model:d.ParamDefinition.Optional(d.ParamDefinition.Group(g.StateTransformer.getParamDefinition(b.StateTransforms.Model.ModelFromTrajectory,e,t)))},V(e,t));};function L(e,t,r,n){return Object(o.__awaiter)(this,void 0,void 0,function(){var i,a,s,u,c,l,d;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return[4,(i=n.builders.structure).createModel(t,r.model)];case 1:return a=o.sent(),[4,i.insertModelProperties(a,r.modelProperties)];case 2:return s=o.sent(),[4,i.createStructure(s||a,{name:\"symmetry\",params:e})];case 3:return u=o.sent(),[4,i.insertStructureProperties(u,r.structureProperties)];case 4:return c=o.sent(),[4,i.tryCreateUnitcell(s,void 0,{isHidden:!1})];case 5:return l=o.sent(),[4,n.builders.structure.representation.applyPreset(c,r.representationPreset||\"auto\",{globalThemeName:e.theme})];case 6:return d=o.sent(),[2,{model:a,modelProperties:s,unitcell:l,structure:u,structureProperties:c,representation:d}];}});});}var N={default:B({id:\"preset-trajectory-default\",display:{name:\"Default (Assembly)\",group:\"Preset\",description:\"Shows the first assembly or, if that is unavailable, the first model.\"},isApplicable:function isApplicable(e){return!0;},params:function params(e,t){return Object(o.__assign)({model:d.ParamDefinition.Optional(d.ParamDefinition.Group(g.StateTransformer.getParamDefinition(b.StateTransforms.Model.ModelFromTrajectory,e,t))),showUnitcell:d.ParamDefinition.Optional(d.ParamDefinition.Boolean(!1)),structure:d.ParamDefinition.Optional(I.a.getParams(void 0,\"assembly\").type)},V(e,t));},apply:function apply(e,t,r){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,i,a,s,u,c,l,d;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return[4,(n=r.builders.structure).createModel(e,t.model)];case 1:return i=o.sent(),[4,n.insertModelProperties(i,t.modelProperties)];case 2:return a=o.sent(),[4,n.createStructure(a||i,t.structure)];case 3:return s=o.sent(),[4,n.insertStructureProperties(s,t.structureProperties)];case 4:return u=o.sent(),void 0===t.showUnitcell||t.showUnitcell?[4,n.tryCreateUnitcell(a,void 0,{isHidden:!0})]:[3,6];case 5:return l=o.sent(),[3,7];case 6:l=void 0,o.label=7;case 7:return c=l,[4,r.builders.structure.representation.applyPreset(u,t.representationPreset||\"auto\")];case 8:return d=o.sent(),[2,{model:i,modelProperties:a,unitcell:c,structure:s,structureProperties:u,representation:d}];}});});}}),\"all-models\":B({id:\"preset-trajectory-all-models\",display:{name:\"All Models\",group:\"Preset\",description:\"Shows all models; colored by model-index.\"},isApplicable:function isApplicable(e){return e.data.length>1;},params:V,apply:function apply(e,t,r){var n,i;return Object(o.__awaiter)(this,void 0,void 0,function(){var a,s,u,c,l,d,f,p,m,h;return Object(o.__generator)(this,function(o){switch(o.label){case 0:if(!(a=null===(i=null===(n=g.StateObjectRef.resolveAndCheck(r.state.data,e))||void 0===n?void 0:n.obj)||void 0===i?void 0:i.data))return[2,{}];s=r.builders.structure,u=[],c=[],l=0,o.label=1;case 1:return l<a.length?[4,s.createModel(e,{modelIndex:l})]:[3,8];case 2:return d=o.sent(),[4,s.insertModelProperties(d,t.modelProperties,{isCollapsed:!0})];case 3:return f=o.sent(),[4,s.createStructure(f||d,{name:\"model\",params:{}})];case 4:return p=o.sent(),[4,s.insertStructureProperties(p,t.structureProperties)];case 5:return m=o.sent(),u.push(d),c.push(p),h=p.obj?Object(k.c)(p.obj.data,{elementCountFactor:a.length}):\"medium\",[4,s.representation.applyPreset(m,t.representationPreset||\"auto\",{globalThemeName:\"model-index\",quality:h})];case 6:o.sent(),o.label=7;case 7:return l++,[3,1];case 8:return[2,{models:u,structures:c}];}});});}}),unitcell:B({id:\"preset-trajectory-unitcell\",display:{name:\"Unit Cell\",group:\"Preset\",description:\"Shows the fully populated unit cell.\"},isApplicable:function isApplicable(e){return A.Model.hasCrystalSymmetry(e.data[0]);},params:R,apply:function apply(e,t,r){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(n){switch(n.label){case 0:return[4,L({ijkMin:M.Vec3.create(0,0,0),ijkMax:M.Vec3.create(0,0,0)},e,t,r)];case 1:return[2,n.sent()];}});});}}),supercell:B({id:\"preset-trajectory-supercell\",display:{name:\"Super Cell\",group:\"Preset\",description:\"Shows the super cell, i.e. the central unit cell and all adjacent unit cells.\"},isApplicable:function isApplicable(e){return A.Model.hasCrystalSymmetry(e.data[0]);},params:R,apply:function apply(e,t,r){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(n){switch(n.label){case 0:return[4,L({ijkMin:M.Vec3.create(-1,-1,-1),ijkMax:M.Vec3.create(1,1,1),theme:\"operator-hkl\"},e,t,r)];case 1:return[2,n.sent()];}});});}})},F=function(){function e(e){var t=this;this.plugin=e,this._providers=[],this.providerMap=new Map(),this.defaultProvider=N.default,Object(O.c)(N,function(e){return t.registerPreset(e);});}return e.prototype.resolveProvider=function(e){var t;return\"string\"==typeof e?null!==(t=N[e])&&void 0!==t?t:Object(y.c)(this._providers,function(t){return t.id===e;}):e;},e.prototype.hasPreset=function(e){for(var t=0,r=this._providers;t<r.length;t++){var n=r[t];if(!n.isApplicable||n.isApplicable(e,this.plugin))return!0;}return!1;},Object.defineProperty(e.prototype,\"providers\",{get:function get(){return this._providers;},enumerable:!1,configurable:!0}),e.prototype.getPresets=function(e){if(!e)return this.providers;for(var t=[],r=0,n=this._providers;r<n.length;r++){var i=n[r];i.isApplicable&&!i.isApplicable(e,this.plugin)||t.push(i);}return t;},e.prototype.getPresetSelect=function(e){for(var t=[],r=0,n=this._providers;r<n.length;r++){var i=n[r];e&&i.isApplicable&&!i.isApplicable(e,this.plugin)||t.push([i.id,i.display.name]);}return d.ParamDefinition.Select(\"auto\",t);},e.prototype.getPresetsWithOptions=function(e){for(var t=[],r=Object.create(null),n=0,i=this._providers;n<i.length;n++){var a=i[n];a.isApplicable&&!a.isApplicable(e,this.plugin)||(t.push([a.id,a.display.name]),r[a.id]=a.params?d.ParamDefinition.Group(a.params(e,this.plugin)):d.ParamDefinition.EmptyGroup());}return 0===t.length?d.ParamDefinition.MappedStatic(\"\",{\"\":d.ParamDefinition.EmptyGroup()}):d.ParamDefinition.MappedStatic(t[0][0],r,{options:t});},e.prototype.registerPreset=function(e){if(this.providerMap.has(e.id))throw new Error(\"Hierarchy provider with id '\"+e.id+\"' already registered.\");this._providers.push(e),this.providerMap.set(e.id,e);},e.prototype.unregisterPreset=function(e){this.providerMap.delete(e.id),Object(P.arrayRemoveInPlace)(this._providers,e);},e.prototype.applyPreset=function(e,t,r){var n=this,i=this.resolveProvider(t);if(i){var a=this.plugin.state.data,o=g.StateObjectRef.resolveAndCheck(a,e);if(o){var s=r||(i.params?d.ParamDefinition.getDefaultValues(i.params(o.obj,this.plugin)):{}),u=_.b.create(\"\"+i.display.name,function(){return i.apply(o,s,n.plugin);});return this.plugin.runTask(u);}S.b||console.warn(\"Applying hierarchy preset provider to bad cell.\");}},e;}(),U=function(){function e(e){this.plugin=e,this.hierarchy=new F(this.plugin),this.representation=new E(this.plugin);}return Object.defineProperty(e.prototype,\"dataState\",{get:function get(){return this.plugin.state.data;},enumerable:!1,configurable:!0}),e.prototype.parseTrajectoryData=function(e,t){return Object(o.__awaiter)(this,void 0,void 0,function(){var r;return Object(o.__generator)(this,function(n){switch(n.label){case 0:if(!(r=\"string\"==typeof t?this.plugin.dataFormats.get(t):t))throw new Error(\"'\"+t+\"' is not a supported data format.\");return[4,r.parse(this.plugin,e)];case 1:return[2,n.sent().trajectory];}});});},e.prototype.parseTrajectoryBlob=function(e,t){return this.dataState.build().to(e).apply(b.StateTransforms.Data.ParseBlob,t,{state:{isGhost:!0}}).apply(b.StateTransforms.Model.TrajectoryFromBlob,void 0).commit({revertOnError:!0});},e.prototype.parseTrajectory=function(e,t){var r=g.StateObjectRef.resolveAndCheck(this.dataState,e);if(!r)throw new Error(\"Invalid data cell.\");return v.a.Data.Blob.is(r.obj)?this.parseTrajectoryBlob(e,t):this.parseTrajectoryData(e,t);},e.prototype.createModel=function(e,t,r){return this.dataState.build().to(e).apply(b.StateTransforms.Model.ModelFromTrajectory,t||{modelIndex:0},{state:r}).commit({revertOnError:!0});},e.prototype.insertModelProperties=function(e,t,r){return this.dataState.build().to(e).apply(b.StateTransforms.Model.CustomModelProperties,t,{state:r}).commit({revertOnError:!0});},e.prototype.tryCreateUnitcell=function(e,t,r){var n,i,a,o=this.dataState,s=null===(i=null===(n=g.StateObjectRef.resolveAndCheck(o,e))||void 0===n?void 0:n.obj)||void 0===i?void 0:i.data;if(s){var u=null===(a=T.a.Provider.get(s))||void 0===a?void 0:a.spacegroup.cell;if(!D.f.isZero(u))return o.build().to(e).apply(b.StateTransforms.Representation.ModelUnitcell3D,t,{state:r}).commit({revertOnError:!0});}},e.prototype.createStructure=function(e,t,r){var n,i=this.dataState;if(!t){var a=g.StateObjectRef.resolveAndCheck(i,e);if(a){var o=T.a.Provider.get(null===(n=a.obj)||void 0===n?void 0:n.data);o&&0!==(null==o?void 0:o.assemblies.length)||(t={name:\"model\",params:{}});}}return i.build().to(e).apply(b.StateTransforms.Model.StructureFromModel,{type:t||{name:\"assembly\",params:{}}},{state:r}).commit({revertOnError:!0});},e.prototype.insertStructureProperties=function(e,t){return this.dataState.build().to(e).apply(b.StateTransforms.Model.CustomStructureProperties,t).commit({revertOnError:!0});},e.prototype.isComponentTransform=function(e){return e.transform.transformer===b.StateTransforms.Model.StructureComponent;},e.prototype.tryCreateComponent=function(e,t,r,n){var i,a;return Object(o.__awaiter)(this,void 0,void 0,function(){var s,u,c,l,d;return Object(o.__generator)(this,function(f){switch(f.label){case 0:return s=this.dataState,u=s.build().to(e),c=\"structure-component-\"+r,[4,(l=u.applyOrUpdateTagged(c,b.StateTransforms.Model.StructureComponent,t,{tags:n?Object(o.__spreadArrays)(n,[c]):[c]})).commit()];case 1:return f.sent(),(d=l.selector).isOk&&0!==(null===(a=null===(i=d.cell)||void 0===i?void 0:i.obj)||void 0===a?void 0:a.data.elementCount)?[3,3]:[4,s.build().delete(d.ref).commit()];case 2:return f.sent(),[2];case 3:return[2,d];}});});},e.prototype.tryCreateComponentFromExpression=function(e,t,r,n){return this.tryCreateComponent(e,{type:{name:\"expression\",params:t},nullIfEmpty:!0,label:((null==n?void 0:n.label)||\"\").trim()},r,null==n?void 0:n.tags);},e.prototype.tryCreateComponentStatic=function(e,t,r){return this.tryCreateComponent(e,{type:{name:\"static\",params:t},nullIfEmpty:!0,label:((null==r?void 0:r.label)||\"\").trim()},\"static-\"+t,null==r?void 0:r.tags);},e.prototype.tryCreateComponentFromSelection=function(e,t,r,n){var i=this;return this.plugin.runTask(_.b.create(\"Query Component\",function(a){return Object(o.__awaiter)(i,void 0,void 0,function(){var i,s,u,c,l,d,f,p,m,h,v,b;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return s=(i=n||{}).label,u=i.tags,s=(s||\"\").trim(),(c=null===(b=null===(v=g.StateObjectRef.resolveAndCheck(this.dataState,e))||void 0===v?void 0:v.obj)||void 0===b?void 0:b.data)?t.referencesCurrent?(f={},p={name:\"bundle\"},h=(m=A.StructureElement.Bundle).fromSelection,[4,t.getSelection(this.plugin,a,c)]):[3,2]:[2];case 1:return f.type=(p.params=h.apply(m,[o.sent()]),p),f.nullIfEmpty=!0,f.label=s||t.label,d=f,[3,3];case 2:d={type:{name:\"expression\",params:t.expression},nullIfEmpty:!0,label:s||t.label},o.label=3;case 3:return l=d,t.ensureCustomProperties?[4,t.ensureCustomProperties({runtime:a,assetManager:this.plugin.managers.asset},c)]:[3,5];case 4:o.sent(),o.label=5;case 5:return[2,this.tryCreateComponent(e,l,r,u)];}});});}));},e;}(),z=r(367),H=r(179),G=r(47),q=r(36),W=r(314);function Q(e,t){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(r){switch(r.label){case 0:return[4,e.build().to(t.volume).apply(b.StateTransforms.Representation.VolumeRepresentation3D).commit()];case 1:return[2,[r.sent()]];}});});}var Y=Object(H.a)({label:\"CCP4/MRC/BRIX\",description:\"CCP4/MRC/BRIX\",category:\"Volume\",binaryExtensions:[\"ccp4\",\"mrc\",\"map\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:return r=e.build().to(t).apply(b.StateTransforms.Data.ParseCcp4,{},{state:{isGhost:!0}}),n=r.apply(b.StateTransforms.Volume.VolumeFromCcp4),[4,r.commit({revertOnError:!0})];case 1:return i.sent(),[2,{format:r.selector,volume:n.selector}];}});});},visuals:Q}),X=Object(H.a)({label:\"DSN6/BRIX\",description:\"DSN6/BRIX\",category:\"Volume\",binaryExtensions:[\"dsn6\",\"brix\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:return r=e.build().to(t).apply(b.StateTransforms.Data.ParseDsn6,{},{state:{isGhost:!0}}),n=r.apply(b.StateTransforms.Volume.VolumeFromDsn6),[4,r.commit({revertOnError:!0})];case 1:return i.sent(),[2,{format:r.selector,volume:n.selector}];}});});},visuals:Q}),K=Object(H.a)({label:\"DX\",description:\"DX\",category:\"Volume\",stringExtensions:[\"dx\"],binaryExtensions:[\"dxbin\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:return r=e.build().to(t).apply(b.StateTransforms.Data.ParseDx,{},{state:{isGhost:!0}}),[4,(n=r.apply(b.StateTransforms.Volume.VolumeFromDx)).commit({revertOnError:!0})];case 1:return i.sent(),[2,{volume:n.selector}];}});});},visuals:Q}),Z=[[\"ccp4\",Y],[\"dsn6\",X],[\"cube\",Object(H.a)({label:\"Cube\",description:\"Cube\",category:\"Volume\",stringExtensions:[\"cub\",\"cube\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n,i;return Object(o.__generator)(this,function(a){switch(a.label){case 0:return r=e.build().to(t).apply(b.StateTransforms.Data.ParseCube,{},{state:{isGhost:!0}}),n=r.apply(b.StateTransforms.Volume.VolumeFromCube),i=r.apply(b.StateTransforms.Model.TrajectoryFromCube,void 0,{state:{isGhost:!0}}).apply(b.StateTransforms.Model.ModelFromTrajectory).apply(b.StateTransforms.Model.StructureFromModel),[4,r.commit({revertOnError:!0})];case 1:return a.sent(),[2,{format:r.selector,volume:n.selector,structure:i.selector}];}});});},visuals:function visuals(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n,i,a,s,u,c,l,d,f;return Object(o.__generator)(this,function(p){switch(p.label){case 0:return r=e.build(),n=[],(i=null===(f=null===(d=t.volume.cell)||void 0===d?void 0:d.obj)||void 0===f?void 0:f.data)&&q.b.isOrbitals(i)?(a=r.to(t.volume).apply(b.StateTransforms.Representation.VolumeRepresentation3D,Object(W.a)(e,i,{type:\"isosurface\",typeParams:{isoValue:q.b.IsoValue.relative(1),alpha:.4},color:\"uniform\",colorParams:{value:G.a.blue}})),s=r.to(t.volume).apply(b.StateTransforms.Representation.VolumeRepresentation3D,Object(W.a)(e,i,{type:\"isosurface\",typeParams:{isoValue:q.b.IsoValue.relative(-1),alpha:.4},color:\"uniform\",colorParams:{value:G.a.red}})),n.push(a.selector,s.selector)):(u=r.to(t.volume).apply(b.StateTransforms.Representation.VolumeRepresentation3D,Object(W.a)(e,i,{type:\"isosurface\",typeParams:{isoValue:q.b.IsoValue.relative(2),alpha:.4},color:\"uniform\",colorParams:{value:G.a.grey}})),n.push(u.selector)),[4,e.builders.structure.representation.applyPreset(t.structure,\"auto\")];case 1:return c=p.sent(),[4,r.commit()];case 2:return p.sent(),l=[],Object(O.c)(null==c?void 0:c.representations,function(e){e&&l.push(e);}),[2,Object(o.__spreadArrays)(n,l)];}});});}})],[\"dx\",K],[\"dscif\",Object(H.a)({label:\"DensityServer CIF\",description:\"DensityServer CIF\",category:\"Volume\",stringExtensions:[\"cif\"],binaryExtensions:[\"bcif\"],isApplicable:function isApplicable(e,t){return\"dscif\"===Object(H.b)(e,t);},parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return[4,e.build().to(t).apply(b.StateTransforms.Data.ParseCif).commit()];case 1:if(r=o.sent(),n=e.build().to(r),1!==(i=r.obj.data.blocks.slice(1)).length&&2!==i.length)throw new Error(\"unknown number of blocks\");for(a=[],s=0,u=i;s<u.length;s++)c=u[s],a.push(n.apply(b.StateTransforms.Volume.VolumeFromDensityServerCif,{blockHeader:c.header}).selector);return[4,n.commit()];case 2:return o.sent(),[2,{volumes:a}];}});});},visuals:function visuals(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n,i,a,s;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return r=t.volumes,n=e.build(),i=[],r.length>0&&(i[0]=n.to(r[0]).apply(b.StateTransforms.Representation.VolumeRepresentation3D,C.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,\"isosurface\",{isoValue:q.b.IsoValue.relative(1.5),alpha:1},\"uniform\",{value:G.a.teal})).selector),r.length>1&&(a=C.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,\"isosurface\",{isoValue:q.b.IsoValue.relative(3),alpha:.3},\"uniform\",{value:G.a.green}),s=C.VolumeRepresentation3DHelpers.getDefaultParamsStatic(e,\"isosurface\",{isoValue:q.b.IsoValue.relative(-3),alpha:.3},\"uniform\",{value:G.a.red}),i[i.length]=n.to(r[1]).apply(b.StateTransforms.Representation.VolumeRepresentation3D,a).selector,i[i.length]=n.to(r[1]).apply(b.StateTransforms.Representation.VolumeRepresentation3D,s).selector),[4,n.commit()];case 1:return o.sent(),[2,i];}});});}})]],J=[[\"ply\",Object(H.a)({label:\"PLY\",description:\"PLY\",category:\"Shape\",stringExtensions:[\"ply\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:return r=e.state.data.build().to(t).apply(b.StateTransforms.Data.ParsePly,{},{state:{isGhost:!0}}),n=r.apply(b.StateTransforms.Model.ShapeFromPly),[4,r.commit()];case 1:return i.sent(),[2,{format:r.selector,shape:n.selector}];}});});},visuals:function visuals(e,t){return e.state.data.build().to(t.shape).apply(b.StateTransforms.Representation.ShapeRepresentation3D).commit();}})]],$=[[\"psf\",Object(H.a)({label:\"PSF\",description:\"PSF\",category:\"Structure\",stringExtensions:[\"psf\"],parse:function parse(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:return r=e.state.data.build().to(t).apply(b.StateTransforms.Data.ParsePsf,{},{state:{isGhost:!0}}),n=r.apply(b.StateTransforms.Model.TopologyFromPsf),[4,r.commit()];case 1:return i.sent(),[2,{format:r.selector,topology:n.selector}];}});});}})],[\"dcd\",Object(H.a)({label:\"DCD\",description:\"DCD\",category:\"Structure\",binaryExtensions:[\"dcd\"],parse:function parse(e,t){return e.state.data.build().to(t).apply(b.StateTransforms.Model.CoordinatesFromDcd).commit();}})],[\"xtc\",Object(H.a)({label:\"XTC\",description:\"XTC\",category:\"Structure\",binaryExtensions:[\"xtc\"],parse:function parse(e,t){return e.state.data.build().to(t).apply(b.StateTransforms.Model.CoordinatesFromXtc).commit();}})]],ee=function(){function e(){this._list=[],this._map=new Map(),this._extensions=void 0,this._binaryExtensions=void 0,this._options=void 0;for(var e=0,t=Z;e<t.length;e++){var r=t[e],n=r[0],i=r[1];this.add(n,i);}for(var a=0,o=$;a<o.length;a++){var s=o[a];n=s[0],i=s[1];this.add(n,i);}for(var u=0,c=J;u<c.length;u++){var l=c[u];n=l[0],i=l[1];this.add(n,i);}for(var d=0,f=z.a;d<f.length;d++){var p=f[d];n=p[0],i=p[1];this.add(n,i);}}return Object.defineProperty(e.prototype,\"types\",{get:function get(){return this._list.map(function(e){return[e.name,e.provider.label];});},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"extensions\",{get:function get(){if(this._extensions)return this._extensions;var e=new Set();return this._list.forEach(function(t){var r,n,i=t.provider;null===(r=i.stringExtensions)||void 0===r||r.forEach(function(t){return e.add(t);}),null===(n=i.binaryExtensions)||void 0===n||n.forEach(function(t){return e.add(t);});}),this._extensions=e,e;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"binaryExtensions\",{get:function get(){if(this._binaryExtensions)return this._binaryExtensions;var e=new Set();return this._list.forEach(function(t){var r;return null===(r=t.provider.binaryExtensions)||void 0===r?void 0:r.forEach(function(t){return e.add(t);});}),this._binaryExtensions=e,e;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"options\",{get:function get(){if(this._options)return this._options;var e=[];return this._list.forEach(function(t){var r=t.name,n=t.provider;return e.push([r,n.label,n.category||\"\"]);}),this._options=e,e;},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._extensions=void 0,this._binaryExtensions=void 0,this._options=void 0;},e.prototype.add=function(e,t){this._clear(),this._list.push({name:e,provider:t}),this._map.set(e,t);},e.prototype.remove=function(e){this._clear(),this._list.splice(this._list.findIndex(function(t){return t.name===e;}),1),this._map.delete(e);},e.prototype.auto=function(e,t){for(var r=0,n=this.list.length;r<n;++r){var i=this._list[r].provider,a=!1;if((i.binaryExtensions&&i.binaryExtensions.indexOf(e.ext)>=0||i.stringExtensions&&i.stringExtensions.indexOf(e.ext)>=0)&&(a=!0),a&&(!i.isApplicable||i.isApplicable(e,t.data)))return i;}},e.prototype.get=function(e){if(this._map.has(e))return this._map.get(e);throw new Error(\"unknown data format name '\"+e+\"'\");},Object.defineProperty(e.prototype,\"list\",{get:function get(){return this._list;},enumerable:!1,configurable:!0}),e;}(),te=r(80),re=r(23),ne=r(126),ie={minRadius:5,extraRadius:6,durationMs:250},ae=function(){function e(e){this.plugin=e,this.boundaryHelper=new ne.a(\"98\");}return e.prototype.transformedLoci=function(e){var t,r;if(A.StructureElement.Loci.is(e)){var n=null===(r=null===(t=this.plugin.helpers.substructureParent.get(e.structure))||void 0===t?void 0:t.obj)||void 0===r?void 0:r.data;n&&(e=A.StructureElement.Loci.remap(e,n));}return e;},e.prototype.focusRenderObjects=function(e,t){if(e){for(var r=[],n=0,i=e;n<i.length;n++){var a=i[n].values.boundingSphere.ref.value;0!==a.radius&&r.push(a);}this.focusSpheres(r,function(e){return e;},t);}},e.prototype.focusLoci=function(e,t){var r;if(Array.isArray(e)&&e.length>1){for(var n=[],i=0,a=e;i<a.length;i++){var o=a[i];(c=re.Loci.getBoundingSphere(this.transformedLoci(o)))&&n.push(c);}if(0===n.length)return;this.boundaryHelper.reset();for(var s=0,u=n;s<u.length;s++){var c=u[s];this.boundaryHelper.includeSphere(c);}this.boundaryHelper.finishedIncludeStep();for(var l=0,d=n;l<d.length;l++){c=d[l];this.boundaryHelper.radiusSphere(c);}r=this.boundaryHelper.getSphere();}else if(Array.isArray(e)){if(0===e.length)return;r=re.Loci.getBoundingSphere(this.transformedLoci(e[0]));}else r=re.Loci.getBoundingSphere(this.transformedLoci(e));r&&this.focusSphere(r,t);},e.prototype.focusSpheres=function(e,t,r){for(var n=[],i=0,a=e;i<a.length;i++){(u=t(a[i]))&&n.push(u);}if(0!==n.length){if(1===n.length)return this.focusSphere(n[0],r);this.boundaryHelper.reset();for(var o=0,s=n;o<s.length;o++){var u=s[o];this.boundaryHelper.includeSphere(u);}this.boundaryHelper.finishedIncludeStep();for(var c=0,l=n;c<l.length;c++){u=l[c];this.boundaryHelper.radiusSphere(u);}this.focusSphere(this.boundaryHelper.getSphere(),r);}},e.prototype.focusSphere=function(e,t){var r,n,i,a,s=Object(o.__assign)(Object(o.__assign)({},ie),t),u=s.extraRadius,c=s.minRadius,l=s.durationMs,d=Math.max(e.radius+u,c);if(null==t?void 0:t.principalAxes){var f=null==t?void 0:t.principalAxes.boxAxes,p=f.origin,m=f.dirA,h=f.dirC,g=null===(r=this.plugin.canvas3d)||void 0===r?void 0:r.camera.getFocus(p,d,m,h);null===(n=this.plugin.canvas3d)||void 0===n||n.requestCameraReset({durationMs:l,snapshot:g});}else{g=null===(i=this.plugin.canvas3d)||void 0===i?void 0:i.camera.getFocus(e.center,d);null===(a=this.plugin.canvas3d)||void 0===a||a.requestCameraReset({durationMs:l,snapshot:g});}},e.prototype.setSnapshot=function(e,t){var r;null===(r=this.plugin.canvas3d)||void 0===r||r.requestCameraReset({snapshot:e,durationMs:t});},e.prototype.reset=function(e,t){var r;null===(r=this.plugin.canvas3d)||void 0===r||r.requestCameraReset({snapshot:e,durationMs:t});},e;}(),oe=r(370),se=r(40),ue=r(45),ce=function(){function e(e){var t=this;this.ctx=e,this.providers=[],this.locis=[],this.isDirty=!1,this.labels=[],this.groupedLabels=new Map(),e.managers.interactivity.lociHighlights.addProvider(function(e,r){t.mark(e,r),t.showLabels();});}return e.prototype.addProvider=function(e){this.providers.push(e),this.providers.sort(function(e,t){return(t.priority||0)-(e.priority||0);}),this.isDirty=!0,this.showLabels();},e.prototype.removeProvider=function(e){this.providers=this.providers.filter(function(t){return t!==e;}),this.isDirty=!0,this.showLabels();},e.prototype.mark=function(e,t){var r=this.locis.findIndex(function(t){return se.a.Loci.areEqual(e,t);});-1===r&&t===ue.a.Highlight?(this.locis.push(e),this.isDirty=!0):-1!==r&&t===ue.a.RemoveHighlight&&(Object(P.arrayRemoveAtInPlace)(this.locis,r),this.isDirty=!0);},e.prototype.showLabels=function(){this.ctx.behaviors.labels.highlight.next({labels:this.getLabels()});},e.prototype.getLabels=function(){var e=this;if(this.isDirty){this.groupedLabels.clear(),this.labels.length=0;for(var t=0,r=this.providers;t<r.length;t++)for(var n=r[t],i=0,a=this.locis;i<a.length;i++){var o=a[i];if(!re.Loci.isEmpty(o.loci)){var s=n.label(o.loci,o.repr);if(s){var u=n.group?n.group(s):s.toString(),c=this.groupedLabels.get(u);c?c.push(s):this.groupedLabels.set(u,[s]);}}}this.labels.length=0,this.groupedLabels.forEach(function(t,r){var n=t.length,i=n>1&&t[0]!==t[1]?r:t[0];e.labels.push(1===n?i:i+\" <small>|| × \"+n+\"</small>\");}),this.isDirty=!1;}return this.labels;},e;}(),le=r(246),de=r(118),fe=r(70),pe=function(e){function t(t){var r=e.call(this,{history:[]})||this;return r.plugin=t,r.events={historyUpdated:r.ev()},r.behaviors={current:r.ev.behavior(void 0)},t.state.data.events.object.removed.subscribe(function(e){var t,n;if(v.a.Molecule.Structure.is(e.obj)){(null===(n=r.current)||void 0===n?void 0:n.loci.structure)===e.obj.data&&r.clear();for(var i=[],a=0,o=r.history;a<o.length;a++){var s=o[a];s.loci.structure===e.obj.data&&i.push(s);}i.length!==r.history.length&&(r.history.length=0,(t=r.history).push.apply(t,i),r.events.historyUpdated.next());}}),r;}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this.state.current;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"history\",{get:function get(){return this.state.history;},enumerable:!1,configurable:!0}),t.prototype.tryAddHistory=function(e){if(!A.StructureElement.Loci.isEmpty(e.loci)){for(var t=0,r=void 0,n=0,i=this.state.history;n<i.length;n++){var a=i[n];if(A.StructureElement.Loci.areEqual(a.loci,e.loci)){r=a;break;}t++;}if(r)return Object(P.arrayRemoveAtInPlace)(this.state.history,t),this.state.history.unshift(e),void this.events.historyUpdated.next();this.state.history.unshift(e),this.state.history.length>8&&this.state.history.pop(),this.events.historyUpdated.next();}},t.prototype.set=function(e){this.tryAddHistory(e),this.state.current&&A.StructureElement.Loci.areEqual(this.state.current.loci,e.loci)||(this.state.current=e,this.behaviors.current.next(e));},t.prototype.setFromLoci=function(e){var t=re.Loci.normalize(e);A.StructureElement.Loci.is(t)&&!A.StructureElement.Loci.isEmpty(t)?this.set({loci:t,label:Object(fe.lociLabel)(t,{reverse:!0,hidePrefix:!0,htmlStyling:!1})}):this.clear();},t.prototype.addFromLoci=function(e){var t=this.state.current&&A.StructureElement.Loci.is(e)&&e.structure===this.state.current.loci.structure?A.StructureElement.Loci.union(e,this.state.current.loci):e;this.setFromLoci(t);},t.prototype.clear=function(){this.state.current&&(this.state.current=void 0,this.behaviors.current.next(void 0));},t.prototype.getSnapshot=function(){if(!this.current)return{};var e=this.plugin.helpers.substructureParent.get(this.current.loci.structure),t=null==e?void 0:e.transform.ref;return t?{current:{label:this.current.label,ref:t,bundle:A.StructureElement.Bundle.fromLoci(this.current.loci),category:this.current.category}}:{};},t.prototype.setSnapshot=function(e){var t,r;if(e.current){var n=e.current,i=n.label,a=n.ref,o=n.bundle,s=n.category,u=null===(r=null===(t=this.plugin.state.data.select(g.StateSelection.Generators.byRef(a))[0])||void 0===t?void 0:t.obj)||void 0===r?void 0:r.data;if(u){var c=A.StructureElement.Bundle.toLoci(o,u);this.set({label:i,loci:c,category:s});}}else this.clear();},t;}(de.b),me=r(275),he=r(369),ge=r(6),ve=r(227),be=r(5),ye=new ne.a(\"98\"),_e=function(e){function t(t){var r=e.call(this,{entries:new Map(),additionsHistory:[],stats:{structureCount:0,elementCount:0,label:\"Nothing Selected\"}})||this;return r.plugin=t,r.events={changed:r.ev(),additionsHistoryUpdated:r.ev(),loci:{add:r.ev(),remove:r.ev(),clear:r.ev()}},t.helpers.substructureParent.events.removed.subscribe(function(e){return r.onRemove(e.ref,e.obj);}),t.helpers.substructureParent.events.updated.subscribe(function(e){return r.onUpdate(e.ref,e.oldObj,e.obj);}),r;}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,\"entries\",{get:function get(){return this.state.entries;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"additionsHistory\",{get:function get(){return this.state.additionsHistory;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"stats\",{get:function get(){return this.state.stats||(this.state.stats=this.calcStats()),this.state.stats;},enumerable:!1,configurable:!0}),t.prototype.getEntry=function(e){var t=this.plugin.helpers.substructureParent.get(e,!0);if(t){var r=t.transform.ref;if(!this.entries.has(r)){var n=new Se(A.StructureElement.Loci(e,[]));return this.entries.set(r,n),n;}return this.entries.get(r);}},t.prototype.calcStats=function(){var e=0,t=0,r=A.StructureElement.Stats.create();this.entries.forEach(function(n){var i=n.selection.elements;if(i.length){e+=1;for(var a=0,o=i.length;a<o;++a)t+=ge.OrderedSet.size(i[a].indices);A.StructureElement.Stats.add(r,r,A.StructureElement.Stats.ofLoci(n.selection));}});var n=Object(fe.structureElementStatsLabel)(r,{countsOnly:!0});return{structureCount:e,elementCount:t,label:n};},t.prototype.add=function(e){if(!A.StructureElement.Loci.is(e))return!1;var t=this.getEntry(e.structure);if(!t)return!1;var r=t.selection;return t.selection=A.StructureElement.Loci.union(t.selection,e),this.tryAddHistory(e),this.referenceLoci=e,this.events.loci.add.next(e),!A.StructureElement.Loci.areEqual(r,t.selection);},t.prototype.remove=function(e){if(!A.StructureElement.Loci.is(e))return!1;var t=this.getEntry(e.structure);if(!t)return!1;var r=t.selection;return t.selection=A.StructureElement.Loci.subtract(t.selection,e),this.referenceLoci=e,this.events.loci.remove.next(e),!A.StructureElement.Loci.areEqual(r,t.selection);},t.prototype.intersect=function(e){if(!A.StructureElement.Loci.is(e))return!1;var t=this.getEntry(e.structure);if(!t)return!1;var r=t.selection;return t.selection=A.StructureElement.Loci.intersect(t.selection,e),this.referenceLoci=e,!A.StructureElement.Loci.areEqual(r,t.selection);},t.prototype.set=function(e){if(!A.StructureElement.Loci.is(e))return!1;var t=this.getEntry(e.structure);if(!t)return!1;var r=t.selection;return t.selection=e,this.tryAddHistory(e),this.referenceLoci=void 0,!A.StructureElement.Loci.areEqual(r,t.selection);},t.prototype.modifyHistory=function(e,t,r,n){void 0===n&&(n=!1);var i=this.additionsHistory,a=i.indexOf(e);if(!(a<0)){var o=void 0;switch(t){case\"remove\":Object(P.arrayRemoveAtInPlace)(i,a);break;case\"up\":o=a-1;break;case\"down\":o=a+1;}if(void 0!==o)for(var s=r?Math.min(i.length,r):i.length;;){if((o%=s)<0&&(o+=s),!n||i[a].loci.structure===i[o].loci.structure){var u=i[a];i[a]=i[o],i[o]=u;break;}o+=\"up\"===t?-1:1;}this.events.additionsHistoryUpdated.next();}},t.prototype.tryAddHistory=function(e){if(!re.Loci.isEmpty(e)){for(var t=0,r=void 0,n=0,i=this.additionsHistory;n<i.length;n++){var a=i[n];if(re.Loci.areEqual(a.loci,e)){r=a;break;}t++;}if(r)return Object(P.arrayRemoveAtInPlace)(this.additionsHistory,t),this.additionsHistory.unshift(r),void this.events.additionsHistoryUpdated.next();var o=A.StructureElement.Stats.ofLoci(e),s=Object(fe.structureElementStatsLabel)(o,{reverse:!0});this.additionsHistory.unshift({id:be.c.create22(),loci:e,label:s}),this.additionsHistory.length>24&&this.additionsHistory.pop(),this.events.additionsHistoryUpdated.next();}},t.prototype.clearHistory=function(){0!==this.state.additionsHistory.length&&(this.state.additionsHistory=[],this.events.additionsHistoryUpdated.next());},t.prototype.clearHistoryForStructure=function(e){for(var t=[],r=0,n=this.state.additionsHistory;r<n.length;r++){(o=n[r]).loci.structure.root===e.root&&t.push(o);}for(var i=0,a=t;i<a.length;i++){var o=a[i];this.modifyHistory(o,\"remove\");}0!==t.length&&this.events.additionsHistoryUpdated.next();},t.prototype.onRemove=function(e,t){var r;this.entries.has(e)&&(this.entries.delete(e),(null==t?void 0:t.data)&&this.clearHistoryForStructure(t.data),(null===(r=this.referenceLoci)||void 0===r?void 0:r.structure)===(null==t?void 0:t.data)&&(this.referenceLoci=void 0),this.state.stats=void 0,this.events.changed.next());},t.prototype.onUpdate=function(e,t,r){var n,i,a,o;if(t!==r&&(null==t?void 0:t.data)!==r.data){var s=this.plugin.helpers.substructureParent.get(r.data,!0);if(s&&(e=s.transform.ref,this.entries.has(e))){var u=null===(i=null===(n=this.plugin.helpers.substructureParent.get(r.data))||void 0===n?void 0:n.obj)||void 0===i?void 0:i.data;if(u)if(!(null==t?void 0:t.data)||A.Structure.areUnitAndIndicesEqual(t.data,r.data)){this.entries.set(e,function(e,t){return new Se(A.StructureElement.Loci.remap(e.selection,t));}(this.entries.get(e),u)),(null===(a=this.referenceLoci)||void 0===a?void 0:a.structure.root)===u.root&&(this.referenceLoci=A.StructureElement.Loci.remap(this.referenceLoci,u));for(var c=!1,l=0,d=this.state.additionsHistory;l<d.length;l++){var f=d[l];f.loci.structure.root===u.root&&(f.loci=A.StructureElement.Loci.remap(f.loci,u),c=!0);}c&&this.events.additionsHistoryUpdated.next();}else this.entries.set(e,new Se(A.StructureElement.Loci(u,[]))),(null===(o=this.referenceLoci)||void 0===o?void 0:o.structure.root)===u.root&&(this.referenceLoci=void 0),this.clearHistoryForStructure(u),this.state.stats=void 0,this.events.changed.next();}}},t.prototype.clear=function(){for(var e=this.entries.keys(),t=[];;){var r=e.next();if(r.done)break;var n=this.entries.get(r.value);A.StructureElement.Loci.isEmpty(n.selection)||t.push(n.selection),n.selection=A.StructureElement.Loci(n.selection.structure,[]);}return this.referenceLoci=void 0,this.state.stats=void 0,this.events.changed.next(),this.events.loci.clear.next(),this.clearHistory(),t;},t.prototype.getLoci=function(e){var t=this.getEntry(e);return t?t.selection:re.EmptyLoci;},t.prototype.getStructure=function(e){var t=this.getEntry(e);if(t)return t.structure;},t.prototype.structureHasSelection=function(e){var t,r,n=null===(r=null===(t=e.cell)||void 0===t?void 0:t.obj)||void 0===r?void 0:r.data;if(!n)return!1;var i=this.getEntry(n);return!!i&&!A.StructureElement.Loci.isEmpty(i.selection);},t.prototype.has=function(e){if(A.StructureElement.Loci.is(e)){var t=this.getEntry(e.structure);if(t)return A.StructureElement.Loci.isSubset(t.selection,e);}return!1;},t.prototype.tryGetRange=function(e){if(A.StructureElement.Loci.is(e)&&1===e.elements.length&&this.getEntry(e.structure)){var t=e.elements[0];if(t){var r=this.referenceLoci;if(r&&A.StructureElement.Loci.is(r)&&r.structure===e.structure){for(var n,i=0,a=r.elements;i<a.length;i++){var o=a[i];if(t.unit===o.unit){n=o;break;}}if(n&&t.unit===n.unit)return function(e,t,r){var n=Math.min(ge.OrderedSet.min(t.indices),ge.OrderedSet.min(r.indices)),i=Math.max(ge.OrderedSet.max(t.indices),ge.OrderedSet.max(r.indices));return A.StructureElement.Loci(e,[{unit:t.unit,indices:ge.OrderedSet.ofRange(n,i)}]);}(e.structure,n,t);}}}},t.prototype.elementCount=function(){var e=0;return this.entries.forEach(function(t){e+=A.StructureElement.Loci.size(t.selection);}),e;},t.prototype.getBoundary=function(){var e=M.Vec3.create(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=M.Vec3.create(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);ye.reset();var r=[];this.entries.forEach(function(e){var t=e.selection;A.StructureElement.Loci.isEmpty(t)||r.push(A.StructureElement.Loci.getBoundary(t));});for(var n=0,i=r.length;n<i;++n){var a=r[n],o=a.box,s=a.sphere;M.Vec3.min(e,e,o.min),M.Vec3.max(t,t,o.max),ye.includePositionRadius(s.center,s.radius);}ye.finishedIncludeStep();for(n=0,i=r.length;n<i;++n){s=r[n].sphere;ye.radiusPositionRadius(s.center,s.radius);}return{box:{min:e,max:t},sphere:ye.getSphere()};},t.prototype.getPrincipalAxes=function(){var e=this.elementCount(),t=new Float32Array(3*e),r=0;return this.entries.forEach(function(e){A.StructureElement.Loci.toPositionsArray(e.selection,t,r),r+=3*A.StructureElement.Loci.size(e.selection);}),ve.a.ofPositions(t);},t.prototype.modify=function(e,t){var r=!1;switch(e){case\"add\":r=this.add(t);break;case\"remove\":r=this.remove(t);break;case\"intersect\":r=this.intersect(t);break;case\"set\":r=this.set(t);}r&&(this.state.stats=void 0,this.events.changed.next());},Object.defineProperty(t.prototype,\"applicableStructures\",{get:function get(){return this.plugin.managers.structure.hierarchy.selection.structures.filter(function(e){return!!e.cell.obj;}).map(function(e){return e.cell.obj.data;});},enumerable:!1,configurable:!0}),t.prototype.triggerInteraction=function(e,t,r){switch(void 0===r&&(r=!0),e){case\"add\":this.plugin.managers.interactivity.lociSelects.select({loci:t},r);break;case\"remove\":this.plugin.managers.interactivity.lociSelects.deselect({loci:t},r);break;case\"intersect\":this.plugin.managers.interactivity.lociSelects.selectJoin({loci:t},r);break;case\"set\":this.plugin.managers.interactivity.lociSelects.selectOnly({loci:t},r);}},t.prototype.fromLoci=function(e,t,r){void 0===r&&(r=!0),this.triggerInteraction(e,t,r);},t.prototype.fromSelectionQuery=function(e,t,r){var n=this;void 0===r&&(r=!0),this.plugin.runTask(_.b.create(\"Structure Selection\",function(i){return Object(o.__awaiter)(n,void 0,void 0,function(){var n,a,s,u;return Object(o.__generator)(this,function(o){switch(o.label){case 0:n=0,a=this.applicableStructures,o.label=1;case 1:return n<a.length?(s=a[n],[4,t.getSelection(this.plugin,i,s)]):[3,4];case 2:u=o.sent(),this.triggerInteraction(e,A.StructureSelection.toLociWithSourceUnits(u),r),o.label=3;case 3:return n++,[3,1];case 4:return[2];}});});}));},t.prototype.fromSelections=function(e){var t,r=g.StateObjectRef.resolveAndCheck(this.plugin.state.data,e);if(r&&r.obj)if(v.a.Molecule.Structure.Selections.is(r.obj)){this.clear();for(var n=0,i=null===(t=r.obj)||void 0===t?void 0:t.data;n<i.length;n++){var a=i[n];this.fromLoci(\"set\",a.loci);}}else console.warn(\"fromSelections applied to wrong object type.\",r.obj);},t;}(de.b);var Se=function(){function e(e){this._structure=void 0,this._selection=e;}return Object.defineProperty(e.prototype,\"selection\",{get:function get(){return this._selection;},set:function set(e){this._selection=e,this._structure=void 0;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"structure\",{get:function get(){return this._structure||(re.Loci.isEmpty(this._selection)?this._structure=void 0:this._structure=A.StructureElement.Loci.toStructure(this._selection)),this._structure;},enumerable:!1,configurable:!0}),e;}();var Oe,xe=r(48),Ce=r(263),we=r(34),Pe=r(75),je=r(86),Ee=r(257),Ae=new Float32Array([-1,1,-1,-1,1,1,1,-1]),Te=new Uint16Array([0,1,2,1,3,2]);(Oe||(Oe={})).create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024),e*=4,t*=4;var n=y.a.create(Float32Array,3,t,r?r.centerBuffer.ref.value:e),i=y.a.create(Float32Array,2,t,r?r.mappingBuffer.ref.value:e),a=y.a.create(Uint32Array,3,t/2,r?r.indexBuffer.ref.value:e/2),o=y.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e);return{add:function add(e,t,r,s){for(var u=n.elementCount,c=0;c<4;++c)y.a.add3(n,e,t,r),y.a.add2(i,Ae[2*c],Ae[2*c+1]),y.a.add(o,s);y.a.add3(a,u+Te[0],u+Te[1],u+Te[2]),y.a.add3(a,u+Te[3],u+Te[4],u+Te[5]);},getSpheres:function getSpheres(){var e=y.a.compact(n,!0),t=y.a.compact(i,!0),s=y.a.compact(a,!0),u=y.a.compact(o,!0);return Ee.a.create(e,t,s,u,n.elementCount/4,r);}};};var De,Ie,Me=r(51);function ke(e,t,r,n,i,a){var o=i.detail,s=i.sizeFactor,u=i.ignoreHydrogens,c=i.traceOnly,l=t.elements,d=l.length,f=d*Object(Ce.b)(o),p=we.a.createState(f,f/2,a),m=M.Vec3.zero(),h=t.conformation.invariantPosition,g=A.StructureElement.Location.create(r);g.unit=t;for(var v=0;v<d;v++)u&&Object(Me.k)(t,l[v])||c&&!Object(Me.l)(t,l[v])||(g.element=l[v],h(l[v],m),p.currentGroup=v,Object(Pe.a)(p,m,n.size.size(g)*s,o));var b=we.a.getMesh(p),y=D.g.expand(Object(D.g)(),t.boundary.sphere,1*s);return b.setBoundingSphere(y),b;}function Be(e,t,r,n,i,a){for(var o=i.ignoreHydrogens,s=i.traceOnly,u=t.elements,c=u.length,l=Oe.create(c,c/2,a),d=M.Vec3.zero(),f=t.conformation.invariantPosition,p=0;p<c;p++)o&&Object(Me.k)(t,u[p])||s&&!Object(Me.l)(t,u[p])||(f(u[p],d),l.add(d[0],d[1],d[2],p));var m=l.getSpheres(),h=D.g.expand(Object(D.g)(),t.boundary.sphere,1);return m.setBoundingSphere(h),m;}function Ve(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;var i=t.structure,a=t.group;if(!A.Structure.areEquivalent(e.structure,i))return!1;for(var o=a.elements.length,s=0,u=e.elements;s<u.length;s++){var c=u[s],l=a.unitIndexMap.get(c.unit.id);if(void 0!==l){var d=l*o;if(ge.Interval.is(c.indices)){var f=d+ge.Interval.start(c.indices),p=d+ge.Interval.end(c.indices);r(ge.Interval.ofBounds(f,p))&&(n=!0);}else for(var m=0,h=c.indices.length;m<h;m++){f=c.indices[m];for(var g=m+1;g<h&&c.indices[g]===f;)g++;m=g-1;p=c.indices[m];n=r(ge.Interval.ofRange(d+f,d+p))||n;}}}return n;}function Re(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group.units[i],u=ge.OrderedSet.ofSingleton(a);return A.StructureElement.Loci(o,[{unit:s,indices:u}]);}return re.EmptyLoci;}function Le(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;if(!A.Structure.areEquivalent(e.structure,t))return!1;for(var i=t.serialMapping.cumulativeUnitElementCount,a=0,o=e.elements;a<o.length;a++){var s=o[a],u=t.unitIndexMap.get(s.unit.id);if(void 0!==u)if(ge.Interval.is(s.indices)){var c=i[u]+ge.Interval.start(s.indices),l=i[u]+ge.Interval.end(s.indices);r(ge.Interval.ofBounds(c,l))&&(n=!0);}else for(var d=0,f=s.indices.length;d<f;d++){var p=i[u]+s.indices[d];r(ge.Interval.ofSingleton(p))&&(n=!0);}}return n;}function Ne(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=t.serialMapping,o=a.unitIndices,s=a.cumulativeUnitElementCount,u=o[i],c=t.units[u],l=i-s[u],d=ge.OrderedSet.ofSingleton(l);return A.StructureElement.Loci(t,[{unit:c,indices:d}]);}return re.EmptyLoci;}(Ie=De||(De={})).fromGroup=function(e){var t=e.group,r=e.structure,n=t.elements.length,i=t.units.length,a=A.StructureElement.Location.create(r);return Object(je.a)(n,i,function(e,r){var n=t.units[r];return a.unit=n,a.element=n.elements[e],a;});},Ie.fromStructure=function(e){var t=e.units,r=e.elementCount,n=e.serialMapping,i=n.unitIndices,a=n.elementIndices,o=A.StructureElement.Location.create(e);return Object(je.a)(r,1,function(e){return o.unit=t[i[e]],o.element=a[e],o;},!0);};var Fe=r(33),Ue=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),xe.g),{sizeFactor:d.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo),ignoreHydrogens:d.ParamDefinition.Boolean(!1),traceOnly:d.ParamDefinition.Boolean(!1)});function ze(e){return e&&e.extensions.fragDepth?He:Ge;}function He(e){return Object(xe.h)({defaultProps:d.ParamDefinition.getDefaultValues(Ue),createGeometry:Be,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.ignoreHydrogens!==r.ignoreHydrogens||t.traceOnly!==r.traceOnly;}},e);}function Ge(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Ue),createGeometry:ke,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail||t.ignoreHydrogens!==r.ignoreHydrogens||t.traceOnly!==r.traceOnly;}},e);}var qe,We,Qe=r(39),Ye=r(63),Xe=r(22),Ke=r(282),Ze={includeTypes:d.ParamDefinition.MultiSelect(Object(Ke.a)(Xe.BondType.Names),d.ParamDefinition.objectToOptions(Xe.BondType.Names)),excludeTypes:d.ParamDefinition.MultiSelect([],d.ParamDefinition.objectToOptions(Xe.BondType.Names))},Je=(d.ParamDefinition.getDefaultValues(Ze),Object(o.__assign)(Object(o.__assign)({},Ye.a),Ze)),$e=(d.ParamDefinition.getDefaultValues(Je),Object(o.__assign)(Object(o.__assign)({},Ye.b),Ze));d.ParamDefinition.getDefaultValues($e);function et(e,t,r){return!Xe.BondType.is(e,r)||Xe.BondType.is(t,r);}function tt(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group.units[i];if(A.Unit.isAtomic(s))return A.Bond.Loci(o,[A.Bond.Location(o,s,s.bonds.a[a],o,s,s.bonds.b[a]),A.Bond.Location(o,s,s.bonds.b[a],o,s,s.bonds.a[a])]);}return re.EmptyLoci;}function rt(e,t,r,n){var i=!1;if(A.Bond.isLoci(e)){var a=t.structure,o=t.group;if(!A.Structure.areEquivalent(e.structure,a))return!1;var s=o.units[0];if(!A.Unit.isAtomic(s))return!1;for(var u=2*s.bonds.edgeCount,c=0,l=e.bonds;c<l.length;c++){var d=l[c],f=o.unitIndexMap.get(d.aUnit.id);if(void 0!==f){var p=s.bonds.getDirectedEdgeIndex(d.aIndex,d.bIndex);-1!==p&&r(ge.Interval.ofSingleton(f*u+p))&&(i=!0);}}}else if(A.StructureElement.Loci.is(e)){a=t.structure,o=t.group;if(!A.Structure.areEquivalent(e.structure,a))return!1;s=o.units[0];if(!A.Unit.isAtomic(s))return!1;for(var m=2*s.bonds.edgeCount,h=function h(e){var t=o.unitIndexMap.get(e.unit.id);if(void 0!==t){var a=s.bonds,u=a.offset,c=a.b;ge.OrderedSet.forEach(e.indices,function(a){for(var o=u[a],s=u[a+1];o<s;o++)n&&!ge.OrderedSet.has(e.indices,c[o])||r(ge.Interval.ofSingleton(t*m+o))&&(i=!0);});}},g=0,v=e.elements;g<v.length;g++){h(v[g]);}}return i;}function nt(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=t.interUnitBonds.edges[i];return A.Bond.Loci(t,[A.Bond.Location(t,a.unitA,a.indexA,t,a.unitB,a.indexB),A.Bond.Location(t,a.unitB,a.indexB,t,a.unitA,a.indexA)]);}return re.EmptyLoci;}function it(e,t,r,n){var i=!1;if(A.Bond.isLoci(e)){if(!A.Structure.areEquivalent(e.structure,t))return!1;for(var a=0,o=e.bonds;a<o.length;a++){var s=o[a],u=t.interUnitBonds.getBondIndexFromLocation(s);-1!==u&&r(ge.Interval.ofSingleton(u))&&(i=!0);}}else if(A.StructureElement.Loci.is(e)){if(!A.Structure.areEquivalent(e.structure,t))return!1;if(1===e.elements.length)return!1;for(var c=new Map(),l=0,d=e.elements;l<d.length;l++){var f=d[l];c.set(f.unit.id,f.indices);}for(var p=function p(e){var a=e.unit;if(!A.Unit.isAtomic(a))return\"continue\";t.interUnitBonds.getConnectedUnits(a).forEach(function(o){var s=c.get(o.unitB.id);s&&ge.OrderedSet.forEach(e.indices,function(e){o.connectedIndices.includes(e)&&o.getEdges(e).forEach(function(u){if(!n||ge.OrderedSet.has(s,u.indexB)){var c=t.interUnitBonds.getEdgeIndex(e,a,u.indexB,o.unitB);r(ge.Interval.ofSingleton(c))&&(i=!0);}});});});},m=0,h=e.elements;m<h.length;m++){p(f=h[m]);}}return i;}function at(e,t,r,n,i,a){if(!A.Unit.isAtomic(t))return Qe.a.createEmpty(a);var o=A.StructureElement.Location.create(r,t),s=t.elements,u=t.bonds,c=u.edgeCount,l=u.a,d=u.b,f=u.edgeProps,p=u.offset,m=f.order,h=f.flags,g=i.sizeFactor,v=i.sizeAspectRatio,b=i.ignoreHydrogens,y=i.includeTypes,_=i.excludeTypes,S=Xe.BondType.fromNames(y),O=Xe.BondType.fromNames(_),x=b?function(e){return Object(Me.k)(t,s[l[e]])||Object(Me.k)(t,s[d[e]]);}:function(){return!1;};if(!c)return Qe.a.createEmpty(a);var C=M.Vec3.zero(),w=t.conformation.invariantPosition,P={linkCount:2*c,referencePosition:function referencePosition(e){var t,r,n=l[e],i=d[e];n>i&&(n=(t=[i,n])[0],i=t[1]),p[n+1]-p[n]==1&&(n=(r=[i,n])[0],i=r[1]);for(var a=p[n],o=p[n+1];a<o;++a){var u=d[a];if(u!==i&&u!==n)return w(s[u],C);}for(a=p[i],o=p[i+1];a<o;++a){var c=l[a];if(c!==n&&c!==i)return w(s[c],C);}return null;},position:function position(e,t,r){w(s[l[r]],e),w(s[d[r]],t);},style:function style(e){var t=m[e],r=be.a.create(h[e]);return Xe.BondType.is(r,2)||Xe.BondType.is(r,4)?Ye.c.Dashed:2===t?Ye.c.Double:3===t?Ye.c.Triple:Ye.c.Solid;},radius:function radius(e){o.element=s[l[e]];var t=n.size.size(o);o.element=s[d[e]];var r=n.size.size(o);return Math.min(t,r)*g*v;},ignore:function ignore(e){return x(e)||et(S,O,h[e]);}},j=Object(Ye.d)(e,P,i,a),E=D.g.expand(Object(D.g)(),t.boundary.sphere,1*g);return j.setBoundingSphere(E),j;}(We=qe||(qe={})).fromGroup=function(e){var t=e.group,r=e.structure,n=t.units[0],i=A.Unit.isAtomic(n)?2*n.bonds.edgeCount:0,a=t.units.length,o=A.StructureElement.Location.create(r);return Object(je.a)(i,a,function(e,r){var n=t.units[r];return o.unit=n,o.element=n.elements[n.bonds.a[e]],o;});},We.fromStructure=function(e){var t=e.interUnitBonds.edgeCount,r=A.StructureElement.Location.create(e);return Object(je.a)(t,1,function(t){var n=e.interUnitBonds.edges[t];return r.unit=n.unitA,r.element=n.unitA.elements[n.indexA],r;},!0);};var ot=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),Je),{sizeFactor:d.ParamDefinition.Numeric(.3,{min:0,max:10,step:.01}),sizeAspectRatio:d.ParamDefinition.Numeric(2/3,{min:0,max:3,step:.01}),ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function st(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(ot),createGeometry:at,createLocationIterator:qe.fromGroup,getLoci:tt,eachLocation:rt,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.sizeAspectRatio!==r.sizeAspectRatio||t.radialSegments!==r.radialSegments||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||!Object(be.g)(t.includeTypes,r.includeTypes)||!Object(be.g)(t.excludeTypes,r.excludeTypes);}},e);}var ut=r(110),ct=new A.Bond.ElementBondIterator();function lt(e,t,r,n){for(ct.setElement(t,r,n);ct.hasNext;){var i=ct.move();return i.otherUnit.conformation.position(i.otherUnit.elements[i.otherIndex],e),e;}return null;}var dt=Object(M.Vec3)(),ft=A.StructureElement.Location.create(void 0);function pt(e,t,r,n,i){var a=t.interUnitBonds,o=a.edgeCount,s=a.edges,u=n.sizeFactor,c=n.sizeAspectRatio,l=n.ignoreHydrogens,d=n.includeTypes,f=n.excludeTypes,p=Xe.BondType.fromNames(d),m=Xe.BondType.fromNames(f),h=l?function(e){var t=s[e],r=t.unitA,n=t.unitB;return Object(Me.k)(r,r.elements[t.indexA])||Object(Me.k)(n,n.elements[t.indexB]);}:function(){return!1;};if(!o)return Qe.a.createEmpty(i);var g={linkCount:o,referencePosition:function referencePosition(e){var r,n,i,a,o=s[e];if(o.unitA.id<o.unitB.id)r=o.unitA,n=o.unitB,i=o.indexA,a=o.indexB;else{if(!(o.unitA.id>o.unitB.id))throw new Error(\"same units in createInterUnitBondCylinderMesh\");r=o.unitB,n=o.unitA,i=o.indexB,a=o.indexA;}return lt(dt,t,r,i)||lt(dt,t,n,a);},position:function position(e,t,r){var n=s[r],i=n.unitA,a=n.unitB;i.conformation.position(i.elements[n.indexA],e),a.conformation.position(a.elements[n.indexB],t);},style:function style(e){var t=s[e].props.order,r=be.a.create(s[e].props.flag);return Xe.BondType.is(r,2)||Xe.BondType.is(r,4)?Ye.c.Dashed:2===t?Ye.c.Double:3===t?Ye.c.Triple:Ye.c.Solid;},radius:function radius(e){var n=s[e];ft.structure=t,ft.unit=n.unitA,ft.element=n.unitA.elements[n.indexA];var i=r.size.size(ft);ft.unit=n.unitB,ft.element=n.unitB.elements[n.indexB];var a=r.size.size(ft);return Math.min(i,a)*u*c;},ignore:function ignore(e){return h(e)||et(p,m,s[e].props.flag);}};return Object(Ye.d)(e,g,n,i);}var mt=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},ut.c),Je),{sizeFactor:d.ParamDefinition.Numeric(.3,{min:0,max:10,step:.01}),sizeAspectRatio:d.ParamDefinition.Numeric(2/3,{min:0,max:3,step:.01}),ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function ht(e){return Object(ut.d)({defaultProps:d.ParamDefinition.getDefaultValues(mt),createGeometry:pt,createLocationIterator:qe.fromStructure,getLoci:nt,eachLocation:it,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.sizeAspectRatio!==r.sizeAspectRatio||t.radialSegments!==r.radialSegments||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||t.linkCap!==r.linkCap||!Object(be.g)(t.includeTypes,r.includeTypes)||!Object(be.g)(t.excludeTypes,r.excludeTypes);}},e);}var gt=r(104),vt=r(222),bt=r(54),yt=r(94),_t={\"element-sphere\":function elementSphere(e,t){return Object(gt.a)(\"Element sphere mesh\",e,t,ze(e.webgl));},\"intra-bond\":function intraBond(e,t){return Object(gt.a)(\"Intra-unit bond cylinder\",e,t,st);},\"inter-bond\":function interBond(e,t){return Object(vt.a)(\"Inter-unit bond cylinder\",e,t,ht);}},St=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},Ue),ot),mt),{unitKinds:Object(yt.i)([\"atomic\"]),sizeFactor:d.ParamDefinition.Numeric(.15,{min:.01,max:10,step:.01}),sizeAspectRatio:d.ParamDefinition.Numeric(2/3,{min:.01,max:3,step:.01}),visuals:d.ParamDefinition.MultiSelect([\"element-sphere\",\"intra-bond\",\"inter-bond\"],d.ParamDefinition.objectToOptions(_t))});var Ot=Object(bt.b)({name:\"ball-and-stick\",label:\"Ball & Stick\",description:\"Displays atoms as spheres and bonds as cylinders.\",factory:function factory(e,t){return se.a.createMulti(\"Ball & Stick\",e,t,bt.c,_t);},getParams:function getParams(e,t){return d.ParamDefinition.clone(St);},defaultValues:d.ParamDefinition.getDefaultValues(St),defaultColorTheme:{name:\"element-symbol\"},defaultSizeTheme:{name:\"physical\"},isApplicable:function isApplicable(e){return e.elementCount>0;}});function xt(e,t,r,n,i){var a=t.carbohydrates,o=a.links,s=a.elements,u=n.linkSizeFactor,c=A.StructureElement.Location.create(t),l={linkCount:o.length,position:function position(e,t,r){var n=o[r];M.Vec3.copy(e,s[n.carbohydrateIndexA].geometry.center),M.Vec3.copy(t,s[n.carbohydrateIndexB].geometry.center);},radius:function radius(e){var t=o[e],n=s[t.carbohydrateIndexA],i=n.unit.rings.all[n.ringIndex];return c.unit=n.unit,c.element=n.unit.elements[i[0]],r.size.size(c)*u;}};return Object(Ye.d)(e,l,n,i);}var Ct=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),Ye.a),{linkSizeFactor:d.ParamDefinition.Numeric(.3,{min:0,max:3,step:.01})});function wt(e){return Object(ut.d)({defaultProps:d.ParamDefinition.getDefaultValues(Ct),createGeometry:xt,createLocationIterator:Pt,getLoci:jt,eachLocation:Et,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.linkSizeFactor!==r.linkSizeFactor||t.radialSegments!==r.radialSegments||t.linkCap!==r.linkCap;}},e);}function Pt(e){var t=e.carbohydrates,r=t.elements,n=t.links,i=n.length,a=A.StructureElement.Location.create(e);return Object(je.a)(i,1,function(e){var t=n[e],i=r[t.carbohydrateIndexA],o=i.unit.rings.all[i.ringIndex];return a.unit=i.unit,a.element=i.unit.elements[o[0]],a;},!0);}function jt(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=t.carbohydrates,o=a.links,s=a.elements,u=o[i],c=s[u.carbohydrateIndexA],l=s[u.carbohydrateIndexB];return A.StructureElement.Loci.union(Object(Me.f)(t,c.unit,c.residueIndex,c.altId),Object(Me.f)(t,l.unit,l.residueIndex,l.altId));}return re.EmptyLoci;}function Et(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;if(!A.Structure.areEquivalent(e.structure,t))return!1;for(var i=t.carbohydrates.getLinkIndices,a=function a(e,t){if(!A.Unit.isAtomic(e))return\"continue\";ge.OrderedSet.forEach(t,function(t){for(var a=i(e,e.elements[t]),o=0,s=a.length;o<s;++o)r(ge.Interval.ofSingleton(a[o]))&&(n=!0);});},o=0,s=e.elements;o<s.length;o++){var u=s[o];a(u.unit,u.indices);}return n;}var At,Tt,Dt=r(242),It=r(127),Mt=r(149),kt=M.Vec3.create(0,0,-.5),Bt=M.Vec3.create(0,0,.5),Vt=M.Vec3.zero(),Rt=M.Vec3.zero(),Lt=M.Vec3.zero(),Nt=M.Vec3.zero();function Ft(e){for(var t=e.length/3,r=2*(3===t?1:4===t?2:t)+2*t,n=Object(It.a)(r),i=0;i<t;++i){var a=(i+1)%t;M.Vec3.set(Vt,e[3*i],e[3*i+1],-.5),M.Vec3.set(Rt,e[3*a],e[3*a+1],-.5),n.add(Vt,Rt,Bt);}if(3===t)M.Vec3.set(Vt,e[0],e[1],-.5),M.Vec3.set(Rt,e[3],e[4],-.5),M.Vec3.set(Lt,e[6],e[7],-.5),n.add(Lt,Rt,Vt);else if(4===t)M.Vec3.set(Vt,e[0],e[1],-.5),M.Vec3.set(Rt,e[3],e[4],-.5),M.Vec3.set(Lt,e[6],e[7],-.5),M.Vec3.set(Nt,e[9],e[10],-.5),n.add(Lt,Rt,Vt),n.add(Vt,Nt,Lt);else for(i=0;i<t;++i){a=(i+1)%t;M.Vec3.set(Vt,e[3*i],e[3*i+1],-.5),M.Vec3.set(Rt,e[3*a],e[3*a+1],-.5),n.add(kt,Rt,Vt);}return n.getPrimitive();}var Ut={pointCount:5,outerRadius:1,innerRadius:.5,thickness:.3},zt=M.Vec3.zero(),Ht=M.Vec3.zero(),Gt=M.Vec3.zero(),qt=M.Vec3.zero(),Wt=M.Vec3.zero();var Qt,Yt,Xt=r(184),Kt=[.5,0,0,-.5,0,0,0,.5,0,0,-.5,0,0,0,.5,0,0,-.5],Zt=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],Jt=[0,2,4,0,4,3,1,2,5,1,5,3];Object(Xt.b)(Kt,[0,2,1,3,2,1,3,0,0,4,1,4,2,4,3,4,0,5,1,5,2,5,3,5]);var $t=r(234),er=r(178),tr=M.Mat4.identity(),rr=M.Vec3.zero(),nr=M.Vec3.zero(),ir=Object(Dt.a)(),ar=Object(Dt.c)(),or=(At||(At=Ft(Object(Mt.a)(8,!0))),At),sr=function(){if(!Tt){for(var e=Object(Mt.a)(8,!0),t=new Float32Array(30),r=0;r<8;++r)t[3*r]=e[3*r],t[3*r+1]=e[3*r+1],t[3*r+2]=-.5;t[24]=0,t[25]=0,t[26]=-.5,t[27]=0,t[28]=0,t[29]=.5;Tt=Object(It.b)(t,[0,1,8,1,2,8,4,5,8,5,6,8,2,3,9,3,4,9,6,7,9,7,0,9]);}return Tt;}(),ur=function(e){for(var t=Object(o.__assign)(Object(o.__assign)({},Ut),e),r=t.outerRadius,n=t.innerRadius,i=t.thickness,a=t.pointCount,s=2*a*2,u=Object(It.a)(s),c=new Float32Array(2*a),l=new Float32Array(2*a),d=0;d<a;++d){var f=2*d,p=2*d+1,m=(f+1)/a*Math.PI,h=(p+1)/a*Math.PI;l[f]=Math.cos(m)*r,l[p]=Math.sin(m)*r,c[f]=Math.cos(h)*n,c[p]=Math.sin(h)*n;}for(M.Vec3.set(zt,0,0,i/2),M.Vec3.set(Ht,0,0,-i/2),d=0;d<a;++d){var g=(d+1)%a;M.Vec3.set(Gt,l[2*d],l[2*d+1],0),M.Vec3.set(qt,c[2*d],c[2*d+1],0),M.Vec3.set(Wt,l[2*g],l[2*g+1],0),u.add(zt,Gt,qt),u.add(qt,Gt,Ht),u.add(zt,qt,Wt),u.add(Wt,qt,Ht);}return u.getPrimitive();}({outerRadius:1,innerRadius:.5,thickness:.5,pointCount:5}),cr=(Qt||(Qt=Object(It.b)(Kt,Zt)),Qt),lr=(Yt||(Yt=Object(It.b)(Kt,Jt)),Yt),dr=Object($t.a)(),fr=Object($t.d)(),pr=Object($t.c)(),mr=Object($t.g)(),hr=Object($t.b)();function gr(e,t,r,n,i){for(var a=we.a.createState(256,128,i),o=n.detail,s=n.sizeFactor,u=t.carbohydrates,c=u.elements.length,l=A.StructureElement.Location.create(t),d=0;d<c;++d){var f=u.elements[d],p=f.unit.rings.all[f.ringIndex],m=Object(er.f)(f.component.type,p.length);l.unit=f.unit,l.element=f.unit.elements[p[0]];var h=r.size.size(l),g=h*s,v=h*s*1.612,b=f.geometry,y=b.center,_=b.normal,S=b.direction;switch(M.Vec3.add(nr,y,S),M.Mat4.targetTo(tr,y,nr,_),M.Mat4.setTranslation(tr,y),a.currentGroup=2*d,m){case 0:Object(Pe.a)(a,y,g,o);break;case 1:M.Mat4.scaleUniformly(tr,tr,v),we.a.addPrimitive(a,tr,ir);break;case 2:M.Mat4.scaleUniformly(tr,tr,v),we.a.addPrimitive(a,tr,ar),M.Mat4.mul(tr,tr,M.Mat4.rotZ90X180),a.currentGroup+=1,we.a.addPrimitive(a,tr,ar);break;case 4:M.Mat4.scaleUniformly(tr,tr,1.2*v),we.a.addPrimitive(a,tr,or);break;case 5:M.Mat4.scaleUniformly(tr,tr,1.2*v),we.a.addPrimitive(a,tr,sr),M.Mat4.mul(tr,tr,M.Mat4.rotZ90),a.currentGroup+=1,we.a.addPrimitive(a,tr,sr);break;case 6:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v,v/2)),we.a.addPrimitive(a,tr,ir);break;case 7:M.Mat4.scaleUniformly(tr,tr,v),M.Mat4.mul(tr,tr,M.Mat4.rotZY90),we.a.addPrimitive(a,tr,ur);break;case 8:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,1.4*v,1.4*v,1.4*v)),we.a.addPrimitive(a,tr,cr);break;case 3:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,1.4*v,1.4*v,1.4*v)),we.a.addPrimitive(a,tr,lr),M.Mat4.mul(tr,tr,M.Mat4.rotY90),a.currentGroup+=1,we.a.addPrimitive(a,tr,lr);break;case 9:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v/2,v/2)),we.a.addPrimitive(a,tr,dr);break;case 12:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v,v/2)),we.a.addPrimitive(a,tr,dr);break;case 13:case 11:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v,v/2)),we.a.addPrimitive(a,tr,fr);break;case 14:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v,v/2)),we.a.addPrimitive(a,tr,pr);break;case 15:M.Mat4.mul(tr,tr,M.Mat4.rotZY90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v,v,v/2)),we.a.addPrimitive(a,tr,hr);break;case 10:default:M.Mat4.mul(tr,tr,M.Mat4.rotZYZ90),M.Mat4.scale(tr,tr,M.Vec3.set(rr,v/1.5,v,v/2)),we.a.addPrimitive(a,tr,mr);}}return we.a.getMesh(a);}var vr=Object(o.__assign)(Object(o.__assign)({},ut.c),{detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo),sizeFactor:d.ParamDefinition.Numeric(1.75,{min:0,max:10,step:.01})});function br(e){return Object(ut.d)({defaultProps:d.ParamDefinition.getDefaultValues(vr),createGeometry:gr,createLocationIterator:yr,getLoci:_r,eachLocation:Sr,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail;}},e);}function yr(e){var t=e.carbohydrates.elements,r=2*t.length,n=A.StructureElement.Location.create(e);return Object(je.a)(r,1,function(e,r){var i=t[Math.floor(e/2)],a=i.unit.rings.all[i.ringIndex];return n.unit=i.unit,n.element=i.unit.elements[a[0]],n;},!0,function(e,t){return e%2==1;});}function _r(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=t.carbohydrates.elements[Math.floor(i/2)];return Object(Me.f)(t,a.unit,a.residueIndex,a.altId);}return re.EmptyLoci;}function Sr(e,t,r){var n=t.carbohydrates.getElementIndices,i=!1;if(!A.StructureElement.Loci.is(e))return!1;if(!A.Structure.areEquivalent(e.structure,t))return!1;for(var a=function a(e,t){if(!A.Unit.isAtomic(e))return\"continue\";ge.OrderedSet.forEach(t,function(t){for(var a=n(e,e.elements[t]),o=0,s=a.length;o<s;++o)r(ge.Interval.ofSingleton(2*a[o]))&&(i=!0);});},o=0,s=e.elements;o<s.length;o++){var u=s[o];a(u.unit,u.indices);}return i;}var Or=r(109);function xr(e,t,r,n,i){var a=t.carbohydrates,o=a.terminalLinks,s=a.elements,u=n.terminalLinkSizeFactor,c=A.StructureElement.Location.create(t),l={linkCount:o.length,position:function position(e,t,r){var n=o[r];n.fromCarbohydrate?(M.Vec3.copy(e,s[n.carbohydrateIndex].geometry.center),n.elementUnit.conformation.position(n.elementUnit.elements[n.elementIndex],t)):(n.elementUnit.conformation.position(n.elementUnit.elements[n.elementIndex],e),M.Vec3.copy(t,s[n.carbohydrateIndex].geometry.center));},radius:function radius(e){var t=o[e];if(t.fromCarbohydrate){var n=s[t.carbohydrateIndex],i=n.unit.rings.all[n.ringIndex];c.unit=n.unit,c.element=n.unit.elements[i[0]];}else c.unit=t.elementUnit,c.element=t.elementUnit.elements[t.elementIndex];return r.size.size(c)*u;},style:function style(e){var t=o[e],r=t.elementUnit.elements[t.elementIndex],n=Object(Or.c)(t.elementUnit.model.atomicHierarchy.atoms.type_symbol.value(r));return Or.b.has(n)?Ye.c.Dashed:Ye.c.Solid;}};return Object(Ye.d)(e,l,n,i);}var Cr=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),Ye.a),{terminalLinkSizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:3,step:.01})});function wr(e){return Object(ut.d)({defaultProps:d.ParamDefinition.getDefaultValues(Cr),createGeometry:xr,createLocationIterator:Pr,getLoci:jr,eachLocation:Er,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.terminalLinkSizeFactor!==r.terminalLinkSizeFactor||t.radialSegments!==r.radialSegments||t.linkCap!==r.linkCap;}},e);}function Pr(e){var t=e.carbohydrates,r=t.elements,n=t.terminalLinks,i=n.length,a=A.StructureElement.Location.create(e);return Object(je.a)(i,1,function(e){var t=n[e];if(t.fromCarbohydrate){var i=r[t.carbohydrateIndex],o=i.unit.rings.all[i.ringIndex];a.unit=i.unit,a.element=i.unit.elements[o[0]];}else a.unit=t.elementUnit,a.element=t.elementUnit.elements[t.elementIndex];return a;},!0);}function jr(e,t,r){var n=e.objectId,i=e.groupId;if(r===n){var a=t.carbohydrates,o=a.terminalLinks,s=a.elements,u=o[i],c=s[u.carbohydrateIndex];return A.StructureElement.Loci.union(Object(Me.f)(t,c.unit,c.residueIndex,c.altId),Object(Me.e)(t,u.elementUnit,u.elementUnit.elements[u.elementIndex]));}return re.EmptyLoci;}function Er(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;if(!A.Structure.areEquivalent(e.structure,t))return!1;for(var i=t.carbohydrates.getTerminalLinkIndices,a=function a(e,t){if(!A.Unit.isAtomic(e))return\"continue\";ge.OrderedSet.forEach(t,function(t){for(var a=i(e,e.elements[t]),o=0,s=a.length;o<s;++o)r(ge.Interval.ofSingleton(a[o]))&&(n=!0);});},o=0,s=e.elements;o<s.length;o++){var u=s[o];a(u.unit,u.indices);}return n;}var Ar={\"carbohydrate-symbol\":function carbohydrateSymbol(e,t){return Object(vt.a)(\"Carbohydrate symbol mesh\",e,t,br);},\"carbohydrate-link\":function carbohydrateLink(e,t){return Object(vt.a)(\"Carbohydrate link cylinder\",e,t,wt);},\"carbohydrate-terminal-link\":function carbohydrateTerminalLink(e,t){return Object(vt.a)(\"Carbohydrate terminal link cylinder\",e,t,wr);}},Tr=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},vr),Ct),Cr),{visuals:d.ParamDefinition.MultiSelect([\"carbohydrate-symbol\",\"carbohydrate-link\",\"carbohydrate-terminal-link\"],d.ParamDefinition.objectToOptions(Ar))});var Dr=Object(bt.b)({name:\"carbohydrate\",label:\"Carbohydrate\",description:\"Displays carbohydrate symbols (3D SNFG).\",factory:function factory(e,t){return se.a.createMulti(\"Carbohydrate\",e,t,bt.c,Ar);},getParams:function getParams(e,t){return d.ParamDefinition.clone(Tr);},defaultValues:d.ParamDefinition.getDefaultValues(Tr),defaultColorTheme:{name:\"carbohydrate-symbol\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.models.some(function(e){return A.Model.hasCarbohydrate(e);});}}),Ir=r(81),Mr=r(79);function kr(e,t){return{centerA:A.StructureElement.Location.create(e,t),centerB:A.StructureElement.Location.create(e,t)};}(function(){function e(e,t){this.unit=t,this.state=0,this.hasNext=!1,this.traceElementIndex=t.model.atomicHierarchy.derived.residue.traceElementIndex,this.polymerIt=Mr.a.transientSegments(pn(t),t.elements),this.residueIt=ge.Segmentation.transientSegments(t.model.atomicHierarchy.residueAtomSegments,t.elements),this.value=kr(e,t),this.hasNext=this.residueIt.hasNext&&this.polymerIt.hasNext;}e.prototype.move=function(){if(0===this.state)for(;this.polymerIt.hasNext;)if(this.residueIt.setSegment(this.polymerIt.move()),this.residueIt.hasNext){this.residueSegment=this.residueIt.move(),this.value.centerB.element=this.traceElementIndex[this.residueSegment.index],this.state=2;break;}if(2===this.state)this.residueSegment=this.residueIt.move(),this.value.centerA.element=this.value.centerB.element,this.value.centerB.element=this.traceElementIndex[this.residueSegment.index],this.residueIt.hasNext||(this.unit.model.atomicRanges.cyclicPolymerMap.has(this.residueSegment.index)?this.state=3:this.state=0);else if(3===this.state){var e=this.unit.model.atomicRanges.cyclicPolymerMap;this.value.centerA.element=this.value.centerB.element,this.value.centerB.element=this.traceElementIndex[e.get(this.residueSegment.index)],this.state=0;}return this.hasNext=this.residueIt.hasNext||this.polymerIt.hasNext||3===this.state,this.value;};})(),function(){function e(e,t){this.unit=t,this.state=0,this.hasNext=!1,this.polymerIt=Mr.a.transientSegments(pn(t),t.elements),this.value=kr(e,t),this.hasNext=this.polymerIt.hasNext;}e.prototype.move=function(){return 0===this.state&&this.polymerIt.hasNext&&(this.polymerSegment=this.polymerIt.move(),this.elementIndex=this.polymerSegment.start,this.elementIndex+1<this.polymerSegment.end?(this.value.centerB.element=this.unit.elements[this.elementIndex],this.state=1):this.state=0),1===this.state&&(this.elementIndex+=1,this.value.centerA.element=this.value.centerB.element,this.value.centerB.element=this.unit.elements[this.elementIndex],this.elementIndex+1>=this.polymerSegment.end&&(this.state=0)),this.hasNext=this.elementIndex+1<this.polymerSegment.end||this.polymerIt.hasNext,this.value;};}();function Br(e,t){return{centerA:A.StructureElement.Location.create(e,t),centerB:A.StructureElement.Location.create(e,t)};}var Vr=function(){function e(e,t){this.unit=t,this.hasNext=!1,this.traceElementIndex=t.model.atomicHierarchy.derived.residue.traceElementIndex,this.gapIt=Mr.a.transientSegments(mn(t),t.elements),this.value=Br(e,t),this.hasNext=this.gapIt.hasNext;}return e.prototype.move=function(){var e=this.unit,t=e.elements,r=e.residueIndex,n=this.gapIt.move();return this.value.centerA.element=this.traceElementIndex[r[t[n.start]]],this.value.centerB.element=this.traceElementIndex[r[t[n.end-1]]],this.hasNext=this.gapIt.hasNext,this.value;},e;}(),Rr=function(){function e(e,t){this.unit=t,this.hasNext=!1,this.gapIt=Mr.a.transientSegments(mn(t),t.elements),this.value=Br(e,t),this.hasNext=this.gapIt.hasNext;}return e.prototype.move=function(){var e=this.gapIt.move();return this.value.centerA.element=this.unit.elements[e.start],this.value.centerB.element=this.unit.elements[e.end-1],this.hasNext=this.gapIt.hasNext,this.value;},e;}(),Lr=r(152);function Nr(e,t){switch(e.kind){case 0:return new qr(e,t);case 1:case 2:return new Wr(e,t);}}var Fr=Xe.SecondaryStructureType.create(536870912);function Ur(e,t){return{center:A.StructureElement.Location.create(e,t),centerPrev:A.StructureElement.Location.create(e,t),centerNext:A.StructureElement.Location.create(e,t),first:!1,last:!1,initial:!1,final:!1,secStrucFirst:!1,secStrucLast:!1,secStrucType:Fr,moleculeType:0,coarseBackboneFirst:!1,coarseBackboneLast:!1,isCoarseBackbone:!1,p0:Object(M.Vec3)(),p1:Object(M.Vec3)(),p2:Object(M.Vec3)(),p3:Object(M.Vec3)(),p4:Object(M.Vec3)(),d12:Object(M.Vec3)(),d23:Object(M.Vec3)()};}var zr=Object(M.Vec3)(),Hr=Object(M.Vec3)(),Gr=Object(M.Vec3)(),qr=function(){function e(e,t){var r;this.unit=e,this.state=0,this.p0=Object(M.Vec3)(),this.p1=Object(M.Vec3)(),this.p2=Object(M.Vec3)(),this.p3=Object(M.Vec3)(),this.p4=Object(M.Vec3)(),this.p5=Object(M.Vec3)(),this.p6=Object(M.Vec3)(),this.d01=Object(M.Vec3)(),this.d12=Object(M.Vec3)(),this.d23=Object(M.Vec3)(),this.d34=Object(M.Vec3)(),this.hasNext=!1,this.atomicConformation=e.model.atomicConformation,this.residueAtomSegments=e.model.atomicHierarchy.residueAtomSegments,this.polymerRanges=e.model.atomicRanges.polymerRanges,this.traceElementIndex=e.model.atomicHierarchy.derived.residue.traceElementIndex,this.directionFromElementIndex=e.model.atomicHierarchy.derived.residue.directionFromElementIndex,this.directionToElementIndex=e.model.atomicHierarchy.derived.residue.directionToElementIndex,this.moleculeType=e.model.atomicHierarchy.derived.residue.moleculeType,this.cyclicPolymerMap=e.model.atomicRanges.cyclicPolymerMap,this.polymerIt=Mr.a.transientSegments(this.polymerRanges,e.elements),this.residueIt=ge.Segmentation.transientSegments(this.residueAtomSegments,e.elements),this.value=Ur(t,e),this.hasNext=this.residueIt.hasNext&&this.polymerIt.hasNext;var n=null===(r=Lr.a.get(t).value)||void 0===r?void 0:r.get(e.invariantId);if(!n)throw new Error(\"missing secondary structure\");this.secondaryStructureType=n.type,this.secondaryStructureGetIndex=n.getIndex;}return e.prototype.pos=function(e,t){-1!==t&&(e[0]=this.atomicConformation.x[t],e[1]=this.atomicConformation.y[t],e[2]=this.atomicConformation.z[t]);},e.prototype.updateResidueSegmentRange=function(e){var t=this.residueAtomSegments.index;this.residueSegmentMin=t[this.polymerRanges[2*e.index]],this.residueSegmentMax=t[this.polymerRanges[2*e.index+1]];},e.prototype.getResidueIndex=function(e){if(e<this.residueSegmentMin)e=void 0!==(t=this.cyclicPolymerMap.get(this.residueSegmentMin))?t-(this.residueSegmentMin-e-1):this.residueSegmentMin;else if(e>this.residueSegmentMax){var t;e=void 0!==(t=this.cyclicPolymerMap.get(this.residueSegmentMax))?t+(e-this.residueSegmentMax-1):this.residueSegmentMax;}return e;},e.prototype.getSecStruc=function(e){return this.secondaryStructureType[this.secondaryStructureGetIndex(e)];},e.prototype.setControlPoint=function(e,t,r,n,i){var a=this.getSecStruc(i);Xe.SecondaryStructureType.is(a,4)?M.Vec3.scale(e,M.Vec3.add(e,t,M.Vec3.add(e,n,M.Vec3.add(e,r,r))),1/4):M.Vec3.copy(e,r);},e.prototype.setFromToVector=function(e,t){this.value.isCoarseBackbone?M.Vec3.set(e,1,0,0):(this.pos(Hr,this.directionFromElementIndex[t]),this.pos(Gr,this.directionToElementIndex[t]),M.Vec3.sub(e,Gr,Hr));},e.prototype.setDirection=function(e,t,r,n){M.Vec3.matchDirection(Hr,t,r),M.Vec3.matchDirection(Gr,n,r),M.Vec3.scale(e,M.Vec3.add(e,Hr,M.Vec3.add(e,Gr,M.Vec3.add(e,r,r))),1/4);},e.prototype.move=function(){var e=this.residueIt,t=this.polymerIt,r=this.value;if(0===this.state)for(;t.hasNext;)if(this.polymerSegment=t.move(),e.setSegment(this.polymerSegment),this.updateResidueSegmentRange(this.polymerSegment),e.hasNext){this.state=1;var n=this.residueAtomSegments.index[this.unit.elements[this.polymerSegment.start]],i=this.getResidueIndex(n-1);this.currSecStrucType=n===i?Fr:this.getSecStruc(i),this.nextSecStrucType=this.getSecStruc(n),this.currCoarseBackbone=-1===this.directionFromElementIndex[i]||-1===this.directionToElementIndex[i],this.nextCoarseBackbone=-1===this.directionFromElementIndex[n]||-1===this.directionToElementIndex[n];break;}if(1===this.state){var a=e.move().index,o=this.getResidueIndex(a-3),s=this.getResidueIndex(a-2),u=this.getResidueIndex(a-1),c=this.getResidueIndex(a+1),l=this.getResidueIndex(a+2),d=this.getResidueIndex(a+3);this.prevSecStrucType=this.currSecStrucType,this.currSecStrucType=this.nextSecStrucType,this.nextSecStrucType=a===c?Fr:this.getSecStruc(c),this.prevCoarseBackbone=this.currCoarseBackbone,this.currCoarseBackbone=this.nextCoarseBackbone,this.nextCoarseBackbone=a!==c&&(-1===this.directionFromElementIndex[c]||-1===this.directionToElementIndex[c]),r.secStrucType=this.currSecStrucType,r.secStrucFirst=this.prevSecStrucType!==this.currSecStrucType,r.secStrucLast=this.currSecStrucType!==this.nextSecStrucType,r.isCoarseBackbone=this.currCoarseBackbone,r.coarseBackboneFirst=this.prevCoarseBackbone!==this.currCoarseBackbone,r.coarseBackboneLast=this.currCoarseBackbone!==this.nextCoarseBackbone,r.first=a===this.residueSegmentMin,r.last=a===this.residueSegmentMax,r.moleculeType=this.moleculeType[a],r.isCoarseBackbone=-1===this.directionFromElementIndex[a]||-1===this.directionToElementIndex[a],r.initial=a===u,r.final=a===c,r.centerPrev.element=this.traceElementIndex[u],r.center.element=this.traceElementIndex[a],r.centerNext.element=this.traceElementIndex[c],this.pos(this.p0,this.traceElementIndex[o]),this.pos(this.p1,this.traceElementIndex[s]),this.pos(this.p2,this.traceElementIndex[u]),this.pos(this.p3,this.traceElementIndex[a]),this.pos(this.p4,this.traceElementIndex[c]),this.pos(this.p5,this.traceElementIndex[l]),this.pos(this.p6,this.traceElementIndex[d]),this.setFromToVector(this.d01,u),this.setFromToVector(this.d12,a),this.setFromToVector(this.d23,c),this.setFromToVector(this.d34,l);var f=.5;a===u?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p3,this.p4),f),M.Vec3.add(this.p2,this.p3,zr),M.Vec3.add(this.p1,this.p2,zr),M.Vec3.add(this.p0,this.p1,zr)):u===s?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p2,this.p3),f),M.Vec3.add(this.p1,this.p2,zr),M.Vec3.add(this.p0,this.p1,zr)):s===o&&(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p1,this.p2),f),M.Vec3.add(this.p0,this.p1,zr)),a===c?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p3,this.p2),f),M.Vec3.add(this.p4,this.p3,zr),M.Vec3.add(this.p5,this.p4,zr),M.Vec3.add(this.p6,this.p5,zr)):c===l?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p4,this.p3),f),M.Vec3.add(this.p5,this.p4,zr),M.Vec3.add(this.p6,this.p5,zr)):l===d&&(M.Vec3.scale(zr,M.Vec3.sub(zr,this.p5,this.p4),f),M.Vec3.add(this.p6,this.p5,zr)),this.setControlPoint(r.p0,this.p0,this.p1,this.p2,s),this.setControlPoint(r.p1,this.p1,this.p2,this.p3,u),this.setControlPoint(r.p2,this.p2,this.p3,this.p4,a),this.setControlPoint(r.p3,this.p3,this.p4,this.p5,c),this.setControlPoint(r.p4,this.p4,this.p5,this.p6,l),this.setDirection(r.d12,this.d01,this.d12,this.d23),this.setDirection(r.d23,this.d12,this.d23,this.d34),e.hasNext||(this.state=0);}return this.hasNext=e.hasNext||t.hasNext,this.value;},e;}(),Wr=function(){function e(e,t){switch(this.unit=e,this.state=0,this.hasNext=!1,this.polymerIt=Mr.a.transientSegments(pn(e),e.elements),this.value=Ur(t,e),M.Vec3.set(this.value.d12,1,0,0),M.Vec3.set(this.value.d23,1,0,0),e.kind){case 1:this.conformation=e.model.coarseConformation.spheres;break;case 2:this.conformation=e.model.coarseConformation.gaussians;}this.hasNext=this.polymerIt.hasNext;}return e.prototype.getElementIndex=function(e){return Math.min(Math.max(this.polymerSegment.start,e),this.polymerSegment.end-1);},e.prototype.pos=function(e,t){var r=this.unit.elements[t];e[0]=this.conformation.x[r],e[1]=this.conformation.y[r],e[2]=this.conformation.z[r];},e.prototype.move=function(){if(0===this.state)for(;this.polymerIt.hasNext;)if(this.polymerSegment=this.polymerIt.move(),this.elementIndex=this.polymerSegment.start,this.elementIndex<this.polymerSegment.end){this.state=1;break;}if(1===this.state){var e=this.getElementIndex(this.elementIndex-2),t=this.getElementIndex(this.elementIndex-1),r=this.getElementIndex(this.elementIndex+1),n=this.getElementIndex(this.elementIndex+2);this.value.centerPrev.element=this.value.center.unit.elements[t],this.value.center.element=this.value.center.unit.elements[this.elementIndex],this.value.centerNext.element=this.value.center.unit.elements[r],this.pos(this.value.p0,e),this.pos(this.value.p1,t),this.pos(this.value.p2,this.elementIndex),this.pos(this.value.p3,r),this.pos(this.value.p4,n);var i=.5;this.elementIndex===t?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.value.p2,this.value.p3),i),M.Vec3.add(this.value.p1,this.value.p2,zr),M.Vec3.add(this.value.p0,this.value.p1,zr)):t===e&&(M.Vec3.scale(zr,M.Vec3.sub(zr,this.value.p1,this.value.p2),i),M.Vec3.add(this.value.p0,this.value.p1,zr)),this.elementIndex===r?(M.Vec3.scale(zr,M.Vec3.sub(zr,this.value.p2,this.value.p1),i),M.Vec3.add(this.value.p3,this.value.p2,zr),M.Vec3.add(this.value.p4,this.value.p3,zr)):r===n&&(M.Vec3.scale(zr,M.Vec3.sub(zr,this.value.p3,this.value.p2),i),M.Vec3.add(this.value.p4,this.value.p3,zr)),this.value.first=this.elementIndex===this.polymerSegment.start,this.value.last=this.elementIndex===this.polymerSegment.end-1,this.elementIndex+1>=this.polymerSegment.end&&(this.state=0);}return this.hasNext=this.elementIndex+1<this.polymerSegment.end||this.polymerIt.hasNext,this.elementIndex+=1,this.value;},e;}(),Qr=r(78);function Yr(e){var t=e+1,r=3*t;return{curvePoints:new Float32Array(r),tangentVectors:new Float32Array(r),normalVectors:new Float32Array(r),binormalVectors:new Float32Array(r),widthValues:new Float32Array(t),heightValues:new Float32Array(t),linearSegments:e};}function Xr(e,t,r,n){!function(e,t,r,n){for(var i=e.curvePoints,a=e.tangentVectors,o=e.linearSegments,s=t.p0,u=t.p1,c=t.p2,l=t.p3,d=t.p4,f=t.secStrucFirst,p=t.secStrucLast,m=1-n,h=f?.5:r,g=p?.5:r,v=0;v<=o;++v){var b=1*v/o;if(b<m){var y=Object(Qr.b)(h,r,b);M.Vec3.spline(Jr,s,u,c,l,b+n,y),M.Vec3.spline(Kr,s,u,c,l,b+n+.01,h),M.Vec3.spline(Zr,s,u,c,l,b+n-.01,h);}else{y=Object(Qr.b)(r,g,b);M.Vec3.spline(Jr,u,c,l,d,b-m,y),M.Vec3.spline(Kr,u,c,l,d,b-m+.01,y),M.Vec3.spline(Zr,u,c,l,d,b-m-.01,y);}M.Vec3.toArray(Jr,i,3*v),M.Vec3.normalize(en,M.Vec3.sub(en,Kr,Zr)),M.Vec3.toArray(en,a,3*v);}}(e,t,r,n),function(e,t){var r=e.curvePoints,n=e.tangentVectors,i=e.normalVectors,a=e.binormalVectors,o=t.d12,s=t.d23,u=r.length/3;M.Vec3.fromArray(an,n,0),M.Vec3.fromArray(on,n,3*(u-1)),M.Vec3.orthogonalize(sn,an,o),M.Vec3.orthogonalize(un,on,s),M.Vec3.matchDirection(un,un,sn),M.Vec3.copy(nn,sn);for(var c=0;c<u;++c){var l=0===c?0:1/(u-c);M.Vec3.fromArray(en,n,3*c),M.Vec3.orthogonalize(tn,en,M.Vec3.slerp($r,nn,un,l)),M.Vec3.toArray(tn,i,3*c),M.Vec3.copy(nn,tn),M.Vec3.normalize(rn,M.Vec3.cross(rn,en,tn)),M.Vec3.toArray(rn,a,3*c);}}(e,t);}var Kr=M.Vec3.zero(),Zr=M.Vec3.zero(),Jr=M.Vec3.zero();var $r=Object(M.Vec3)(),en=Object(M.Vec3)(),tn=Object(M.Vec3)(),rn=Object(M.Vec3)(),nn=Object(M.Vec3)(),an=Object(M.Vec3)(),on=Object(M.Vec3)(),sn=Object(M.Vec3)(),un=Object(M.Vec3)();function cn(e,t,r,n,i,a,o,s){for(var u=e.widthValues,c=e.heightValues,l=e.linearSegments,d=1-s,f=0;f<=l;++f){var p=1*f/l;p<d?(u[f]=Object(Qr.b)(t,r,p+s),c[f]=Object(Qr.b)(i,a,p+s)):(u[f]=Object(Qr.b)(r,n,p-d),c[f]=Object(Qr.b)(a,o,p-d));}}var ln,dn,fn;function pn(e){switch(e.kind){case 0:return e.model.atomicRanges.polymerRanges;case 1:return e.model.coarseHierarchy.spheres.polymerRanges;case 2:return e.model.coarseHierarchy.gaussians.polymerRanges;}}function mn(e){switch(e.kind){case 0:return e.model.atomicRanges.gapRanges;case 1:return e.model.coarseHierarchy.spheres.gapRanges;case 2:return e.model.coarseHierarchy.gaussians.gapRanges;}}function hn(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group.units[i];if(A.Unit.isAtomic(s))return Object(Me.g)(o,s,s.polymerElements[a]);var u=s.elements,c=s.polymerElements[a],l=ge.OrderedSet.indexOf(u,c);if(-1!==l){var d=ge.OrderedSet.ofSingleton(l);return A.StructureElement.Loci(o,[{unit:s,indices:d}]);}}return re.EmptyLoci;}function gn(e,t,r,n,i,a){for(var o=-1,s=-1,u=i;u<=a;u++){if(!((l=r[u])<0)&&(o=ge.OrderedSet.indexOf(t,l))>=0){s=u;break;}}if(o<0)return!1;var c=o;for(u=a;u>s;u--){var l;if(!((l=r[u])<0)){var d=ge.OrderedSet.indexOf(t,l);if(d>=0){c=d;break;}}}return n(ge.Interval.ofRange(e+o,e+c));}function vn(e,t,r,n,i){var a=!1,o=i.unit.elements,s=i.unit.model.atomicHierarchy.derived.residue.traceElementIndex,u=i.unit.model.atomicHierarchy.residueAtomSegments.index,c=r(i.unit);if(ge.Interval.is(i.indices))a=0===ge.Interval.start(i.indices)&&ge.Interval.end(i.indices)===i.unit.elements.length?n(ge.Interval.ofBounds(e,e+t))||a:gn(e,c,s,n,p=u[o[ge.Interval.min(i.indices)]],m=u[o[ge.Interval.max(i.indices)]])||a;else for(var l=i.indices,d=0,f=l.length;d<f;d++){for(var p,m=p=u[o[l[d]]],h=d+1;h<f;){var g=u[o[l[h]]];if(g-m>1)break;m=g,h++;}d=h-1,a=gn(e,c,s,n,p,m)||a;}return a;}function bn(e){return e.polymerElements;}function yn(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;var i=t.structure,a=t.group;if(!A.Structure.areEquivalent(e.structure,i))return!1;for(var o=a.units[0].polymerElements.length,s=0,u=e.elements;s<u.length;s++){var c=u[s];if(a.unitIndexMap.has(c.unit.id)){var l=a.unitIndexMap.get(c.unit.id)*o;if(A.Unit.isAtomic(c.unit))n=vn(l,o,bn,r,c)||n;else if(ge.Interval.is(c.indices)){var d=l+ge.Interval.start(c.indices),f=l+ge.Interval.end(c.indices);n=r(ge.Interval.ofBounds(d,f))||n;}else for(var p=0,m=c.indices.length;p<m;p++){d=c.indices[p];for(var h=p+1;h<m&&c.indices[h]===d;)h++;p=h-1;f=c.indices[p];n=r(ge.Interval.ofRange(l+d,l+f))||n;}}}return n;}function _n(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group.units[i],u=ge.OrderedSet.indexOf(s.elements,s.gapElements[a]),c=ge.OrderedSet.indexOf(s.elements,s.gapElements[a%2?a-1:a+1]);if(-1!==u&&-1!==c)return A.Bond.Loci(o,[A.Bond.Location(o,s,u,o,s,c),A.Bond.Location(o,s,c,o,s,u)]);}return re.EmptyLoci;}function Sn(e,t,r){var n=!1;if(A.Bond.isLoci(e)){var i=t.structure,a=t.group;if(!A.Structure.areRootsEquivalent(e.structure,i))return!1;e=A.Bond.remapLoci(e,i);for(var o=a.units[0].gapElements.length,s=0,u=e.bonds;s<u.length;s++){var c=u[s],l=a.unitIndexMap.get(c.aUnit.id);if(void 0!==l){var d=ge.OrderedSet.indexOf(c.aUnit.gapElements,c.aUnit.elements[c.aIndex]),f=ge.OrderedSet.indexOf(c.bUnit.gapElements,c.bUnit.elements[c.bIndex]);-1!==d&&-1!==f&&r(ge.Interval.ofSingleton(l*o+d))&&(n=!0);}}}else if(A.StructureElement.Loci.is(e)){i=t.structure,a=t.group;if(!A.Structure.areRootsEquivalent(e.structure,i))return!1;e=A.StructureElement.Loci.remap(e,i);for(var p=a.units[0].gapElements.length,m=function m(e){var t=a.unitIndexMap.get(e.unit.id);void 0!==t&&ge.OrderedSet.forEach(e.indices,function(i){var a=ge.OrderedSet.indexOf(e.unit.gapElements,e.unit.elements[i]);-1!==a&&r(ge.Interval.ofSingleton(t*p+a))&&(n=!0);});},h=0,g=e.elements;h<g.length;h++){m(g[h]);}}return n;}function On(e,t,r){var n=e.objectId,i=e.instanceId,a=e.groupId;if(r===n){var o=t.structure,s=t.group.units[i];if(A.Unit.isAtomic(s))return Object(Me.g)(o,s,s.nucleotideElements[a]);}return re.EmptyLoci;}function xn(e){return e.nucleotideElements;}function Cn(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;var i=t.structure,a=t.group;if(!A.Structure.areEquivalent(e.structure,i))return!1;var o=a.units[0];if(!A.Unit.isAtomic(o))return!1;for(var s=o.nucleotideElements.length,u=0,c=e.elements;u<c.length;u++){var l=c[u];if(A.Unit.isAtomic(l.unit)&&a.unitIndexMap.has(l.unit.id)){var d=a.unitIndexMap.get(l.unit.id)*s;A.Unit.isAtomic(l.unit)&&(n=vn(d,s,xn,r,l)||n);}}return n;}(ln||(ln={})).fromGroup=function(e){var t=e.group,r=e.structure,n=t.units[0].polymerElements,i=n.length,a=t.units.length,o=A.StructureElement.Location.create(r);return Object(je.a)(i,a,function(e,r){var i=t.units[r];return o.unit=i,o.element=n[e],o;});},(dn||(dn={})).fromGroup=function(e){var t=e.group,r=e.structure,n=t.units[0].gapElements,i=n.length,a=t.units.length,o=A.StructureElement.Location.create(r);return Object(je.a)(i,a,function(e,r){var i=t.units[r];return o.unit=i,o.element=n[e],o;});},(fn||(fn={})).fromGroup=function(e){var t=e.group,r=e.structure,n=t.units[0],i=A.Unit.isAtomic(n)?n.nucleotideElements:[],a=i.length,o=t.units.length,s=A.StructureElement.Location.create(r);return Object(je.a)(a,o,function(e,r){var n=t.units[r];return s.unit=n,s.element=i[e],s;});};var wn=M.Vec3.zero(),Pn=M.Vec3.zero(),jn=M.Vec3.zero(),En=M.Vec3.zero(),An=M.Vec3.zero(),Tn=M.Vec3.zero(),Dn=M.Vec3.zero(),In=M.Vec3.zero(),Mn=M.Vec3.zero(),kn=M.Vec3.zero(),Bn=M.Mat4.identity(),Vn=M.Vec3.zero(),Rn=Object(Dt.a)(),Ln={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),radialSegments:d.ParamDefinition.Numeric(16,{min:2,max:56,step:2},Fe.a.CustomQualityParamInfo)};d.ParamDefinition.getDefaultValues(Ln);function Nn(e,t,r,n,i,a){if(!A.Unit.isAtomic(t))return Qe.a.createEmpty(a);var o=t.nucleotideElements.length;if(!o)return Qe.a.createEmpty(a);for(var s=i.sizeFactor,u=i.radialSegments,c=o*(Rn.vertices.length/3+2*u),l=we.a.createState(c,c/4,a),d=t.elements,f=t.model,p=f.atomicHierarchy,m=p.chainAtomSegments,h=p.residueAtomSegments,g=p.atoms,v=p.index,b=f.atomicHierarchy.derived.residue,y=b.moleculeType,_=b.traceElementIndex,S=g.label_comp_id,O=t.conformation.invariantPosition,x=ge.Segmentation.transientSegments(m,d),C=ge.Segmentation.transientSegments(h,d),w={radiusTop:1*s,radiusBottom:1*s,radialSegments:u,bottomCap:!0},P=0;x.hasNext;)for(C.setSegment(x.move());C.hasNext;){var j=C.move().index;if(Object(Xe.isNucleic)(y[j])){var E=S.value(h.offsets[j]),T=-1,I=-1,k=-1,B=-1,V=-1,R=-1,L=4.5,N=2.5*s,F=Object(Xe.isPurineBase)(E),U=Object(Xe.isPyrimidineBase)(E);if(!F&&!U){var z=v.findAtomOnResidue(j,\"C4\"),H=v.findAtomOnResidue(j,\"N9\");-1!==z&&-1!==H&&M.Vec3.distance(O(z,wn),O(H,Pn))<1.6?F=!0:U=!0;}F?(L=4.5,T=v.findAtomOnResidue(j,\"N1\"),I=v.findAtomOnResidue(j,\"C4\"),k=v.findAtomOnResidue(j,\"C6\"),B=v.findAtomOnResidue(j,\"C2\"),V=v.findAtomOnResidue(j,\"N9\"),R=_[j]):U&&(L=3,T=v.findAtomOnResidue(j,\"N3\"),I=v.findAtomOnResidue(j,\"C6\"),k=v.findAtomOnResidue(j,\"C4\"),B=v.findAtomOnResidue(j,\"C2\"),-1===(V=v.findAtomOnResidue(j,\"N1\"))&&(V=v.findAtomOnResidue(j,\"C1\")),R=_[j]),-1!==V&&-1!==R&&(O(V,An),O(R,Tn),l.currentGroup=P,Object(Ir.a)(l,An,Tn,1,w),-1!==T&&-1!==I&&-1!==k&&-1!==B&&(O(T,wn),O(I,Pn),O(k,jn),O(B,En),M.Vec3.normalize(Dn,M.Vec3.sub(Dn,Pn,wn)),M.Vec3.normalize(In,M.Vec3.sub(In,En,jn)),M.Vec3.normalize(Mn,M.Vec3.cross(Mn,Dn,In)),M.Mat4.targetTo(Bn,wn,Pn,Mn),M.Vec3.scaleAndAdd(kn,wn,Dn,L/2-.2),M.Mat4.scale(Bn,Bn,M.Vec3.set(Vn,4.5,N,L)),M.Mat4.setTranslation(Bn,kn),we.a.addPrimitive(l,Bn,Rn))),++P;}}var G=we.a.getMesh(l),q=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return G.setBoundingSphere(q),G;}var Fn=Object(o.__assign)(Object(o.__assign)({},xe.c),Ln);function Un(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Fn),createGeometry:Nn,createLocationIterator:fn.fromGroup,getLoci:On,eachLocation:Cn,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments;}},e);}var zn=M.Vec3.zero(),Hn=M.Vec3.zero(),Gn=M.Vec3.zero(),qn=M.Vec3.zero(),Wn=M.Vec3.zero(),Qn=M.Vec3.zero(),Yn=M.Vec3.zero(),Xn=M.Vec3.zero(),Kn=M.Vec3.zero(),Zn=M.Vec3.zero(),Jn=M.Vec3.zero(),$n={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),radialSegments:d.ParamDefinition.Numeric(16,{min:2,max:56,step:2},Fe.a.CustomQualityParamInfo),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo)},ei=(d.ParamDefinition.getDefaultValues($n),new Float32Array(54)),ti=new Uint32Array([0,1,2,3,4,5,6,7,16,17,14,15,12,13,8,9,10,11,0,1]),ri=new Uint32Array([8,12,14,16,6,4,2,0,10]),ni=new Uint32Array([9,11,1,3,5,7,17,15,13]),ii=new Float32Array(36),ai=new Uint32Array([0,1,2,3,4,5,6,7,8,9,10,11,0,1]),oi=new Uint32Array([0,10,8,6,4,2]),si=new Uint32Array([1,3,5,7,9,11]),ui=M.Vec3.zero();function ci(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];for(var i=0,a=r.length;i<a;++i){var o=r[i];M.Vec3.toArray(M.Vec3.add(ui,o,t),e,2*i*3),M.Vec3.toArray(M.Vec3.sub(ui,o,t),e,3*(2*i+1));}}function li(e,t,r,n,i,a){if(!A.Unit.isAtomic(t))return Qe.a.createEmpty(a);var o=t.nucleotideElements.length;if(!o)return Qe.a.createEmpty(a);for(var s=i.sizeFactor,u=i.radialSegments,c=i.detail,l=o*(26+2*u),d=we.a.createState(l,l/4,a),f=t.elements,p=t.model,m=p.atomicHierarchy,h=m.chainAtomSegments,g=m.residueAtomSegments,v=m.atoms,b=m.index,y=p.atomicHierarchy.derived.residue,_=y.moleculeType,S=y.traceElementIndex,O=v.label_comp_id,x=t.conformation.invariantPosition,C=ge.Segmentation.transientSegments(h,f),w=ge.Segmentation.transientSegments(g,f),P=1*s,j=1.25*s,E={radiusTop:1*s,radiusBottom:1*s,radialSegments:u},T=0;C.hasNext;)for(w.setSegment(C.move());w.hasNext;){var I=w.move().index;if(Object(Xe.isNucleic)(_[I])){var k=O.value(g.offsets[I]),B=-1,V=-1,R=-1,L=-1,N=-1,F=-1,U=-1,z=-1,H=-1,G=-1;d.currentGroup=T;var q=Object(Xe.isPurineBase)(k),W=Object(Xe.isPyrimidineBase)(k);if(!q&&!W){var Q=b.findAtomOnResidue(I,\"C4\"),Y=b.findAtomOnResidue(I,\"N9\");-1!==Q&&-1!==Y&&M.Vec3.distance(x(Q,Wn),x(Y,Zn))<1.6?q=!0:W=!0;}q?(B=S[I],V=b.findAtomOnResidue(I,\"N1\"),R=b.findAtomOnResidue(I,\"C2\"),L=b.findAtomOnResidue(I,\"N3\"),N=b.findAtomOnResidue(I,\"C4\"),-1===(F=b.findAtomOnResidue(I,\"C5\"))&&(F=b.findAtomOnResidue(I,\"N5\")),U=b.findAtomOnResidue(I,\"C6\"),-1===(z=b.findAtomOnResidue(I,\"N7\"))&&(z=b.findAtomOnResidue(I,\"C7\")),H=b.findAtomOnResidue(I,\"C8\"),-1!==(G=b.findAtomOnResidue(I,\"N9\"))&&-1!==B&&(x(G,Zn),x(B,zn),d.currentGroup=T,Object(Ir.a)(d,Zn,zn,1,E),Object(Pe.a)(d,Zn,P,c)),-1!==V&&-1!==R&&-1!==L&&-1!==N&&-1!==F&&-1!==U&&-1!==z&&-1!==H&&-1!==G&&(x(V,Hn),x(R,Gn),x(L,qn),x(N,Wn),x(F,Qn),x(U,Yn),x(z,Xn),x(H,Kn),M.Vec3.triangleNormal(Jn,Hn,Wn,Qn),M.Vec3.scale(Jn,Jn,j),ci(ei,Jn,Hn,Gn,qn,Wn,Qn,Yn,Xn,Kn,Zn),we.a.addTriangleStrip(d,ei,ti),we.a.addTriangleFan(d,ei,ri),we.a.addTriangleFan(d,ei,ni))):W&&(B=S[I],-1===(V=b.findAtomOnResidue(I,\"N1\"))&&(V=b.findAtomOnResidue(I,\"C1\")),R=b.findAtomOnResidue(I,\"C2\"),L=b.findAtomOnResidue(I,\"N3\"),N=b.findAtomOnResidue(I,\"C4\"),F=b.findAtomOnResidue(I,\"C5\"),U=b.findAtomOnResidue(I,\"C6\"),-1!==V&&-1!==B&&(x(V,Hn),x(B,zn),d.currentGroup=T,Object(Ir.a)(d,Hn,zn,1,E),Object(Pe.a)(d,Hn,P,c)),-1!==V&&-1!==R&&-1!==L&&-1!==N&&-1!==F&&-1!==U&&(x(R,Gn),x(L,qn),x(N,Wn),x(F,Qn),x(U,Yn),M.Vec3.triangleNormal(Jn,Hn,Wn,Qn),M.Vec3.scale(Jn,Jn,j),ci(ii,Jn,Hn,Gn,qn,Wn,Qn,Yn),we.a.addTriangleStrip(d,ii,ai),we.a.addTriangleFan(d,ii,oi),we.a.addTriangleFan(d,ii,si))),++T;}}var X=we.a.getMesh(d),K=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return X.setBoundingSphere(K),X;}var di=Object(o.__assign)(Object(o.__assign)({},xe.c),$n);function fi(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(di),createGeometry:li,createLocationIterator:fn.fromGroup,getLoci:On,eachLocation:Cn,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments;}},e);}var pi,mi=M.Vec3.zero(),hi=M.Vec3.zero(),gi=M.Vec3.zero(),vi=M.Vec3.zero(),bi=Object(Mt.a)(3,!1);var yi=M.Mat4.identity(),_i=M.Vec3.zero(),Si=M.Vec3.zero(),Oi=M.Vec3.zero(),xi=M.Vec3.zero(),Ci=(pi||(pi=function(){for(var e=Object(It.a)(8),t=0;t<3;++t){var r=(t+1)%3;M.Vec3.set(mi,bi[3*t],bi[3*t+1],-.5),M.Vec3.set(hi,bi[3*r],bi[3*r+1],-.5),M.Vec3.set(gi,bi[3*r],bi[3*r+1],.5),M.Vec3.set(vi,bi[3*t],bi[3*t+1],.5),e.add(mi,hi,gi),e.add(gi,vi,mi);}return M.Vec3.set(mi,bi[0],bi[1],-.5),M.Vec3.set(hi,bi[3],bi[4],-.5),M.Vec3.set(gi,bi[6],bi[7],-.5),e.add(gi,hi,mi),M.Vec3.set(mi,bi[0],bi[1],.5),M.Vec3.set(hi,bi[3],bi[4],.5),M.Vec3.set(gi,bi[6],bi[7],.5),e.add(mi,hi,gi),e.getPrimitive();}()),pi),wi={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01})};d.ParamDefinition.getDefaultValues(wi);function Pi(e,t,r,n,i,a){var o=t.polymerElements.length;if(!o)return Qe.a.createEmpty(a);for(var s=i.sizeFactor,u=24*o,c=we.a.createState(u,u/10,a),l=Yr(1),d=l.normalVectors,f=l.binormalVectors,p=0,m=Nr(t,r);m.hasNext;){var h=m.move();c.currentGroup=p;var g=Object(Xe.isNucleic)(h.moleculeType),v=Xe.SecondaryStructureType.is(h.secStrucType,4);if(Xr(l,h,g||v?.5:.9,g?.3:.5),v&&!h.secStrucLast||!v){var b=n.size.size(h.center)*s,y=4*b,_=4*b,S=6*b,O=g?f:d;M.Vec3.fromArray(Si,O,0),M.Vec3.fromArray(Oi,O,3),M.Vec3.normalize(xi,M.Vec3.add(xi,Si,Oi)),M.Mat4.targetTo(yi,h.p3,h.p1,xi),M.Mat4.mul(yi,yi,M.Mat4.rotY90Z180),M.Mat4.scale(yi,yi,M.Vec3.set(_i,S,_,y)),M.Mat4.setTranslation(yi,h.p2),we.a.addPrimitive(c,yi,Ci);}++p;}var x=we.a.getMesh(c),C=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return x.setBoundingSphere(C),x;}var ji=Object(o.__assign)(Object(o.__assign)({},xe.c),wi);function Ei(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(ji),createGeometry:Pi,createLocationIterator:ln.fromGroup,getLoci:hn,eachLocation:yn,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor;}},e);}var Ai={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),radialSegments:d.ParamDefinition.Numeric(16,{min:2,max:56,step:2},Fe.a.CustomQualityParamInfo)};d.ParamDefinition.getDefaultValues(Ai);function Ti(e,t,r,n,i,a){var o=t.gapElements.length;if(!o)return Qe.a.createEmpty(a);for(var s=i.sizeFactor,u=i.radialSegments,c=10*u*2*o*2,l=we.a.createState(c,c/10,a),d=t.conformation.invariantPosition,f=M.Vec3.zero(),p=M.Vec3.zero(),m={radiusTop:1,radiusBottom:1,topCap:!0,bottomCap:!0,radialSegments:u},h=0,g=function(e,t){switch(t.kind){case 0:return new Vr(e,t);case 1:case 2:return new Rr(e,t);}}(r,t);g.hasNext;){var v=g.move(),b=v.centerA,y=v.centerB;b.element===y.element||(d(b.element,f),d(y.element,p),m.radiusTop=m.radiusBottom=n.size.size(b)*s,l.currentGroup=h,Object(Ir.c)(l,f,p,.5,10,m),m.radiusTop=m.radiusBottom=n.size.size(y)*s,l.currentGroup=h+1,Object(Ir.c)(l,p,f,.5,10,m)),h+=2;}var _=we.a.getMesh(l),S=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return _.setBoundingSphere(S),_;}var Di=Object(o.__assign)(Object(o.__assign)({},xe.c),Ai);function Ii(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Di),createGeometry:Ti,createLocationIterator:dn.fromGroup,getLoci:_n,eachLocation:Sn,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.radialSegments!==r.radialSegments;}},e);}var Mi=M.Vec3.zero(),ki=M.Vec3.zero(),Bi=M.Vec3.zero(),Vi=M.Vec3.zero(),Ri=M.Vec3.zero(),Li=M.Vec3.zero(),Ni=M.Vec3.zero(),Fi=M.Vec3.zero(),Ui=M.Vec3.zero(),zi=M.Vec3.zero(),Hi=M.Vec3.zero(),Gi=M.Vec3.zero(),qi=M.Vec3.zero(),Wi=M.Vec3.zero(),Qi=M.Vec3.zero();function Yi(e,t,r,n,i,a,o,s){var u=t.vertices,c=t.normals,l=t.indices,d=u.elementCount;M.Vec3.fromArray(Ni,n,e),M.Vec3.scale(Ni,Ni,o),M.Vec3.fromArray(Li,n,e),M.Vec3.scale(Li,Li,s),M.Vec3.fromArray(Vi,i,e),M.Vec3.scale(Vi,Vi,a),M.Vec3.fromArray(Ui,r,e),M.Vec3.add(Gi,M.Vec3.add(Gi,Ui,Vi),Li),M.Vec3.sub(qi,M.Vec3.add(qi,Ui,Vi),Ni),M.Vec3.sub(Wi,M.Vec3.sub(Wi,Ui,Vi),Ni),M.Vec3.add(Qi,M.Vec3.sub(Qi,Ui,Vi),Li),o<s?(y.a.add3(u,Qi[0],Qi[1],Qi[2]),y.a.add3(u,Wi[0],Wi[1],Wi[2]),y.a.add3(u,qi[0],qi[1],qi[2]),y.a.add3(u,Gi[0],Gi[1],Gi[2]),M.Vec3.copy(Ri,Li)):(y.a.add3(u,Gi[0],Gi[1],Gi[2]),y.a.add3(u,qi[0],qi[1],qi[2]),y.a.add3(u,Wi[0],Wi[1],Wi[2]),y.a.add3(u,Qi[0],Qi[1],Qi[2]),M.Vec3.copy(Ri,Ni)),M.Vec3.cross(zi,Vi,Ri);for(var f=0;f<4;++f)y.a.add3(c,zi[0],zi[1],zi[2]);y.a.add3(l,d+2,d+1,d),y.a.add3(l,d,d+3,d+2);}function Xi(e,t,r,n,i,a,o,s,u,c){var l=e.currentGroup,d=e.vertices,f=e.normals,p=e.indices,m=e.groups,h=d.elementCount,g=0;s>0&&(M.Vec3.fromArray(Mi,t,0),M.Vec3.fromArray(ki,t,3*i),g=s/M.Vec3.magnitude(M.Vec3.sub(Bi,ki,Mi)));for(var v=0;v<=i;++v){var b=a[v],_=o[v],S=0===s?_:s*(1-v/i),O=3*v;M.Vec3.fromArray(Ri,r,O),M.Vec3.scale(Ri,Ri,S),M.Vec3.fromArray(Vi,n,O),M.Vec3.scale(Vi,Vi,b),s>0&&(M.Vec3.fromArray(Mi,r,O),M.Vec3.fromArray(ki,n,O),M.Vec3.scale(Fi,M.Vec3.cross(Fi,Mi,ki),g)),M.Vec3.fromArray(Ui,t,O),M.Vec3.fromArray(zi,r,O),M.Vec3.fromArray(Hi,n,O),M.Vec3.add(Mi,M.Vec3.add(Mi,Ui,Vi),Ri),M.Vec3.copy(ki,zi),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.add(Mi,M.Vec3.sub(Mi,Ui,Vi),Ri),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.add(ki,M.Vec3.negate(ki,Hi),Fi),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.sub(Mi,M.Vec3.sub(Mi,Ui,Vi),Ri),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.negate(ki,zi),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.sub(Mi,M.Vec3.add(Mi,Ui,Vi),Ri),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.add(ki,Hi,Fi),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]),M.Vec3.add(Mi,M.Vec3.add(Mi,Ui,Vi),Ri),y.a.add3(d,Mi[0],Mi[1],Mi[2]),y.a.add3(f,ki[0],ki[1],ki[2]);}for(v=0;v<i;++v){for(var x=0;x<2;x++)y.a.add3(p,h+8*v+2*x,h+8*(v+1)+2*x+1,h+8*v+2*x+1),y.a.add3(p,h+8*v+2*x,h+8*(v+1)+2*x,h+8*(v+1)+2*x+1);for(x=2;x<4;x++)y.a.add3(p,h+8*v+2*x,h+8*(v+1)+2*x,h+8*v+2*x+1),y.a.add3(p,h+8*(v+1)+2*x,h+8*(v+1)+2*x+1,h+8*v+2*x+1);}if(u){var b=a[0],_=o[0],C=0===s?_:s;Yi(0,e,t,r,n,b,C,C);}else if(s>0){Yi(0,e,t,r,n,b=a[0],s,-(_=o[0])),Yi(0,e,t,r,n,b,-s,_);}c&&0===s&&Yi(3*i,e,t,r,n,b=a[i],-(_=o[i]),-_);v=0;for(var w=8*(i+1)+(u?4:s>0?8:0)+(c&&0===s?4:0);v<w;++v)y.a.add(m,l);}var Ki=M.Vec3.zero(),Zi=M.Vec3.zero(),Ji=M.Vec3.zero(),$i=M.Vec3.zero(),ea=M.Vec3.zero();function ta(e,t,r,n,i,a){e[0]=t[0]*i+r[0]*a+n[0],e[1]=t[1]*i+r[1]*a+n[1],e[2]=t[2]*i+r[2]*a+n[2];}function ra(e,t,r,n,i,a,o,s,u,c,l){for(var d,f,p,m,h,g=e.currentGroup,v=e.vertices,b=e.normals,_=e.indices,S=e.groups,O=v.elementCount,x=1/i,C=0;C<=i;++C){var w=3*C;M.Vec3.fromArray($i,r,w),M.Vec3.fromArray(ea,n,w),M.Vec3.fromArray(Ji,t,w);for(var P=o[C],j=s[C],E=x*C-.5,A=1+(u-1)*(Math.cos(2*Math.PI*E)+1),T=A*P,D=A*j,I=0;I<a;++I){var k=2*Math.PI*I/a;ta(Zi,$i,ea,Ji,D*Math.cos(k),T*Math.sin(k)),2===a?(M.Vec3.copy(Ki,ea),M.Vec3.normalize(Ki,Ki),0===k&&C%2!=0||M.Vec3.negate(Ki,Ki)):(d=Ki,f=$i,p=ea,m=T*Math.cos(k),h=D*Math.sin(k),d[0]=f[0]*m+p[0]*h,d[1]=f[1]*m+p[1]*h,d[2]=f[2]*m+p[2]*h),M.Vec3.normalize(Ki,Ki),y.a.add3(v,Zi[0],Zi[1],Zi[2]),y.a.add3(b,Ki[0],Ki[1],Ki[2]);}}for(C=0;C<i;++C)for(I=0;I<a;++I)y.a.add3(_,O+C*a+(I+1)%a,O+(C+1)*a+(I+1)%a,O+C*a+I),y.a.add3(_,O+(C+1)*a+(I+1)%a,O+(C+1)*a+I,O+C*a+I);if(c){var B=0,V=v.elementCount;M.Vec3.fromArray($i,r,B),M.Vec3.fromArray(ea,n,B),M.Vec3.fromArray(Ji,t,B),M.Vec3.cross(Ki,ea,$i),y.a.add3(v,Ji[0],Ji[1],Ji[2]),y.a.add3(b,Ki[0],Ki[1],Ki[2]);P=o[0],j=s[0];O=v.elementCount;for(C=0;C<a;++C){k=2*Math.PI*C/a;ta(Zi,$i,ea,Ji,j*Math.cos(k),P*Math.sin(k)),y.a.add3(v,Zi[0],Zi[1],Zi[2]),y.a.add3(b,Ki[0],Ki[1],Ki[2]),y.a.add3(_,O+(C+1)%a,O+C,V);}}if(l){B=3*i,V=v.elementCount;M.Vec3.fromArray($i,r,B),M.Vec3.fromArray(ea,n,B),M.Vec3.fromArray(Ji,t,B),M.Vec3.cross(Ki,$i,ea),y.a.add3(v,Ji[0],Ji[1],Ji[2]),y.a.add3(b,Ki[0],Ki[1],Ki[2]);P=o[i],j=s[i];O=v.elementCount;for(C=0;C<a;++C){k=2*Math.PI*C/a;ta(Zi,$i,ea,Ji,j*Math.cos(k),P*Math.sin(k)),y.a.add3(v,Zi[0],Zi[1],Zi[2]),y.a.add3(b,Ki[0],Ki[1],Ki[2]),y.a.add3(_,O+C,O+(C+1)%a,V);}}var R=(i+1)*a+(c?a+1:0)+(l?a+1:0);y.a.addRepeat(S,R,g);}var na=M.Vec3.zero(),ia=M.Vec3.zero(),aa=M.Vec3.zero(),oa=M.Vec3.zero(),sa=M.Vec3.zero(),ua=M.Vec3.zero(),ca=M.Vec3.zero(),la=M.Vec3.zero(),da=M.Vec3.zero();function fa(e,t,r,n,i,a,o,s){var u=e.currentGroup,c=e.vertices,l=e.normals,d=e.indices,f=e.groups,p=c.elementCount,m=0;s>0&&(M.Vec3.fromArray(na,t,0),M.Vec3.fromArray(ia,t,3*i),m=s/M.Vec3.magnitude(M.Vec3.sub(aa,ia,na)));for(var h=0;h<=i;++h){var g=a[h],v=o[h],b=0===s?v:s*(1-h/i),_=3*h;M.Vec3.fromArray(sa,r,_),M.Vec3.scale(sa,sa,b),M.Vec3.fromArray(oa,n,_),M.Vec3.scale(oa,oa,g),s>0&&(M.Vec3.fromArray(na,r,_),M.Vec3.fromArray(ia,n,_),M.Vec3.scale(ua,M.Vec3.cross(ua,na,ia),m)),M.Vec3.fromArray(ca,t,_),M.Vec3.fromArray(la,r,_),M.Vec3.fromArray(da,n,_),M.Vec3.add(na,ca,sa),M.Vec3.negate(ia,da),y.a.add3(c,na[0],na[1],na[2]),y.a.add3(l,ia[0],ia[1],ia[2]),M.Vec3.sub(na,ca,sa),y.a.add3(c,na[0],na[1],na[2]),y.a.add3(l,ia[0],ia[1],ia[2]),M.Vec3.add(na,ca,sa),M.Vec3.copy(ia,da),y.a.add3(c,na[0],na[1],na[2]),y.a.add3(l,ia[0],ia[1],ia[2]),M.Vec3.sub(na,ca,sa),y.a.add3(c,na[0],na[1],na[2]),y.a.add3(l,ia[0],ia[1],ia[2]);}for(h=0;h<i;++h)y.a.add3(d,p+4*h,p+4*(h+1)+1,p+4*h+1),y.a.add3(d,p+4*h,p+4*(h+1),p+4*(h+1)+1),y.a.add3(d,p+4*h+2+1,p+4*(h+1)+2+1,p+4*h+2),y.a.add3(d,p+4*h+2,p+4*(h+1)+2+1,p+4*(h+1)+2);h=0;for(var S=4*(i+1);h<S;++h)y.a.add(f,u);}var pa={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),aspectRatio:d.ParamDefinition.Numeric(5,{min:.1,max:10,step:.1}),arrowFactor:d.ParamDefinition.Numeric(1.5,{min:0,max:3,step:.1}),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo),linearSegments:d.ParamDefinition.Numeric(8,{min:1,max:48,step:1},Fe.a.CustomQualityParamInfo),radialSegments:d.ParamDefinition.Numeric(16,{min:2,max:56,step:2},Fe.a.CustomQualityParamInfo)},ma=(d.ParamDefinition.getDefaultValues(pa),Object(M.Vec3)());function ha(e,t,r,n,i,a){var o,s,u,c=t.polymerElements.length;if(!c)return Qe.a.createEmpty(a);for(var l=i.sizeFactor,d=i.detail,f=i.linearSegments,p=i.radialSegments,m=i.aspectRatio,h=i.arrowFactor,g=f*p*c+(p+1)*c*2,v=we.a.createState(g,g/10,a),b=A.Unit.isCoarse(t),y=Yr(f),_=y.curvePoints,S=y.normalVectors,O=y.binormalVectors,x=y.widthValues,C=y.heightValues,w=0,P=Nr(t,r);P.hasNext;){var j=P.move();v.currentGroup=w;var E=Object(Xe.isNucleic)(j.moleculeType),T=Xe.SecondaryStructureType.is(j.secStrucType,4),I=Xe.SecondaryStructureType.is(j.secStrucType,2),k=E?.3:.5;Xr(y,j,I?.9:.5,k);var B=n.size.size(j.centerPrev)*l,V=n.size.size(j.center)*l,R=n.size.size(j.centerNext)*l;b&&(B*=m/2,V*=m/2,R*=m/2);var L=j.secStrucFirst||j.coarseBackboneFirst||j.first,N=j.secStrucLast||j.coarseBackboneLast||j.last,F=f;if(j.initial){var U=f-(F=Math.max(Math.round(f*k),1));_.copyWithin(0,3*U),O.copyWithin(0,3*U),S.copyWithin(0,3*U),M.Vec3.fromArray(ma,_,3),M.Vec3.normalize(ma,M.Vec3.sub(ma,j.p2,ma)),M.Vec3.scaleAndAdd(ma,j.p2,ma,2*V),M.Vec3.toArray(ma,_,0);}else j.final&&(F=Math.max(Math.round(f*(1-k)),1),M.Vec3.fromArray(ma,_,3*F-3),M.Vec3.normalize(ma,M.Vec3.sub(ma,j.p2,ma)),M.Vec3.scaleAndAdd(ma,j.p2,ma,2*V),M.Vec3.toArray(ma,_,3*F));if(!0===j.initial&&!0===j.final)Object(Pe.a)(v,j.p2,2*V,d);else if(T){var z=B*m,H=V*m,G=R*m,q=j.secStrucLast?H*h:0;cn(y,B,V,R,z,H,G,k),2===p?fa(v,_,S,O,F,x,C,q):Xi(v,_,S,O,F,x,C,q,L,N);}else{z=void 0,H=void 0,G=void 0;if(I&&!j.isCoarseBackbone?(z=B*m,H=V*m,G=R*m):E&&!j.isCoarseBackbone?(B=(o=[z=B*m,B])[0],z=o[1],V=(s=[H=V*m,V])[0],H=s[1],R=(u=[G=R*m,R])[0],G=u[1]):(z=B,H=V,G=R),cn(y,B,V,R,z,H,G,k),2===p){if(E&&!j.isCoarseBackbone){for(var W=0,Q=O.length;W<Q;W++)O[W]*=-1;fa(v,_,O,S,F,C,x,0);}else fa(v,_,S,O,F,x,C,0);}else 4===p?Xi(v,_,S,O,F,x,C,0,L,N):ra(v,_,S,O,F,p,x,C,1,L,N);}++w;}var Y=we.a.getMesh(v),X=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return Y.setBoundingSphere(X),Y;}var ga=Object(o.__assign)(Object(o.__assign)({},xe.c),pa);function va(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(ga),createGeometry:ha,createLocationIterator:ln.fromGroup,getLoci:hn,eachLocation:yn,setUpdateState:function setUpdateState(e,t,r,n,i,a,o){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail||t.linearSegments!==r.linearSegments||t.radialSegments!==r.radialSegments||t.aspectRatio!==r.aspectRatio||t.arrowFactor!==r.arrowFactor;var s=Lr.a.get(a.structure).version;e.info.secondaryStructureHash!==s&&(e.createGeometry=!0,e.info.secondaryStructureHash=s);}},e);}var ba={\"polymer-trace\":function polymerTrace(e,t){return Object(gt.a)(\"Polymer trace mesh\",e,t,va);},\"polymer-gap\":function polymerGap(e,t){return Object(gt.a)(\"Polymer gap cylinder\",e,t,Ii);},\"nucleotide-block\":function nucleotideBlock(e,t){return Object(gt.a)(\"Nucleotide block mesh\",e,t,Un);},\"nucleotide-ring\":function nucleotideRing(e,t){return Object(gt.a)(\"Nucleotide ring mesh\",e,t,fi);},\"direction-wedge\":function directionWedge(e,t){return Object(gt.a)(\"Polymer direction wedge\",e,t,Ei);}},ya=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},ga),Di),Fn),di),ji),{sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),visuals:d.ParamDefinition.MultiSelect([\"polymer-trace\",\"polymer-gap\",\"nucleotide-block\"],d.ParamDefinition.objectToOptions(ba))});var _a=Object(bt.b)({name:\"cartoon\",label:\"Cartoon\",description:\"Displays ribbons, planks, tubes smoothly following the trace atoms of polymers.\",factory:function factory(e,t){return se.a.createMulti(\"Cartoon\",e,t,bt.c,ba);},getParams:function getParams(e,t){var r=d.ParamDefinition.clone(ya),n=!1,i=!1;return t.units.forEach(function(e){!n&&A.Unit.isAtomic(e)&&e.nucleotideElements.length&&(n=!0),!i&&e.gapElements.length&&(i=!0);}),r.visuals.defaultValue=[\"polymer-trace\"],n&&r.visuals.defaultValue.push(\"nucleotide-block\"),i&&r.visuals.defaultValue.push(\"polymer-gap\"),r;},defaultValues:d.ParamDefinition.getDefaultValues(ya),defaultColorTheme:{name:\"chain-id\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.polymerResidueCount>0;},ensureCustomProperties:{attach:function attach(e,t){return Lr.a.attach(e,t,void 0,!0);},detach:function detach(e){return Lr.a.ref(e,!1);}}}),Sa=r(308),Oa=r(211),xa=r(82),Ca=Object(o.__assign)(Object(o.__assign)({},xe.c),{sizeFactor:d.ParamDefinition.Numeric(1,{min:0,max:10,step:.1}),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo),ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function wa(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Ca),createGeometry:Pa,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail||t.ignoreHydrogens!==r.ignoreHydrogens;}},e);}function Pa(e,t,r,n,i,a){var o=i.detail,s=i.sizeFactor,u=t.elements,c=t.model,l=u.length,d=l*Object(Ce.b)(o),f=we.a.createState(d,d/2,a),p=Oa.a.Provider.get(c);if(!p)return Qe.a.createEmpty(a);var m=Object(M.Vec3)(),h=Object(M.Mat3)(),g=Object(M.Vec3)(),v=Object(M.Vec3)(),b=Object(M.Vec3)(),y=p.elementToAnsiotrop,_=p.data,S=_.U,O=_._schema.U.space,x=t.conformation.invariantPosition,C=A.StructureElement.Location.create(r);C.unit=t;for(var w=0;w<l;w++){var P=u[w],j=y[P];if(-1!==j&&(!i.ignoreHydrogens||!Object(Me.k)(t,P))){C.element=P,x(P,m),f.currentGroup=w,M.Tensor.toMat3(h,O,S.value(j)),M.Mat3.symmtricFromLower(h,h),M.Mat3.symmetricEigenvalues(g,h),M.Mat3.eigenvector(v,h,g[1]),M.Mat3.eigenvector(b,h,g[2]);for(var E=0;E<3;++E)g[E]=1.5958*s*Math.sqrt(Math.abs(g[E]));Object(xa.b)(g[0],g[1],M.EPSILON)&&Object(xa.b)(g[1],g[2],M.EPSILON)?Object(Pe.a)(f,m,g[0],o):Object(Sa.a)(f,m,b,v,g,o);}}var T=we.a.getMesh(f),I=D.g.expand(Object(D.g)(),t.boundary.sphere,1*s);return T.setBoundingSphere(I),T;}var ja={\"ellipsoid-mesh\":function ellipsoidMesh(e,t){return Object(bt.d)(\"Ellipsoid Mesh\",e,t,wa);},\"intra-bond\":function intraBond(e,t){return Object(bt.d)(\"Intra-unit bond cylinder\",e,t,st);},\"inter-bond\":function interBond(e,t){return Object(bt.a)(\"Inter-unit bond cylinder\",e,t,ht);}},Ea=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},Ca),ot),mt),{unitKinds:Object(yt.i)([\"atomic\"]),sizeFactor:d.ParamDefinition.Numeric(1,{min:.01,max:10,step:.01}),sizeAspectRatio:d.ParamDefinition.Numeric(.1,{min:.01,max:3,step:.01}),linkCap:d.ParamDefinition.Boolean(!0),visuals:d.ParamDefinition.MultiSelect([\"ellipsoid-mesh\",\"intra-bond\",\"inter-bond\"],d.ParamDefinition.objectToOptions(ja))});var Aa=Object(bt.b)({name:\"ellipsoid\",label:\"Ellipsoid\",description:\"Displays anisotropic displacement ellipsoids of atomic elements plus bonds as cylinders.\",factory:function factory(e,t){return se.a.createMulti(\"Ellipsoid\",e,t,bt.c,ja);},getParams:function getParams(e,t){return d.ParamDefinition.clone(Ea);},defaultValues:d.ParamDefinition.getDefaultValues(Ea),defaultColorTheme:{name:\"element-symbol\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0&&e.models.some(function(e){return Oa.a.Provider.isApplicable(e);});}});function Ta(e,t,r,n,i){return Object(o.__awaiter)(this,void 0,void 0,function(){function a(){return Object(o.__awaiter)(this,void 0,void 0,function(){var t;return Object(o.__generator)(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<g?(function(e,t){for(var r=e;r<t;++r)for(var n=ge.OrderedSet.getAt(d,r),i=f[n],a=p[n],o=m[n],s=v[r],u=1/(s*s),c=2*s,g=c*c,b=Math.ceil(c*l),y=Math.floor(l*(i-x[0])),_=Math.floor(l*(a-x[1])),S=Math.floor(l*(o-x[2])),O=Math.max(0,y-b),C=Math.max(0,_-b),w=Math.max(0,S-b),P=Math.min(I,y+b+2),E=Math.min(k,_+b+2),T=Math.min(B,S+b+2),D=O;D<P;++D)for(var M=L[D]-i,H=D*R,G=C;G<E;++G)for(var q=N[G]-a,W=M*M+q*q,Q=G*V+H,Y=w;Y<T;++Y){var X=F[Y]-o,K=W+X*X;if(K<=g){var Z=Math.exp(K*u*-z),J=Y+Q;j[J]+=Z,Z>U[J]&&(U[J]=Z,A[J]=h?h[r]:r);}}}(t,Math.min(t+H,g)),e.shouldUpdate?[4,e.update({message:\"filling density grid\",current:t,max:g})]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t+=H,[3,1];case 4:return[2];}});});}var s,u,c,l,d,f,p,m,h,g,v,b,y,_,S,O,x,C,w,P,j,E,A,T,I,k,B,V,R,L,N,F,U,z,H,G;return Object(o.__generator)(this,function(e){switch(e.label){case 0:for(s=i.resolution,u=i.radiusOffset,c=i.smoothness,l=1/s,d=t.indices,f=t.x,p=t.y,m=t.z,h=t.id,g=ge.OrderedSet.size(d),v=new Float32Array(g),b=0,y=0;y<g;++y)_=n(ge.OrderedSet.getAt(d,y))+u,b<_&&(b=_),v[y]=_;return S=2*b+s,O=D.b.expand(Object(D.b)(),r,M.Vec3.create(S,S,S)),x=O.min,C=D.b.scale(Object(D.b)(),O,l),w=D.b.size(Object(M.Vec3)(),C),M.Vec3.ceil(w,w),P=M.Tensor.Space(w,[0,1,2],Float32Array),j=P.create(),E=M.Tensor.create(P,j),(A=P.create()).fill(-1),T=M.Tensor.create(P,A),I=w[0],k=w[1],B=w[2],R=(V=B)*k,L=Object(D.i)(w[0],x[0],s),N=Object(D.i)(w[1],x[1],s),F=Object(D.i)(w[2],x[2],s),U=P.create(),z=c,H=Math.ceil(1e5/(Math.pow(Math.pow(b,3),3)*l)),[4,a()];case 1:return e.sent(),G=M.Mat4.identity(),M.Mat4.fromScaling(G,M.Vec3.create(s,s,s)),M.Mat4.setTranslation(G,O.min),[2,{field:E,idField:T,transform:G}];}});});}var Da=r(247),Ia=\"undefined\"!=typeof document?r(247).GaussianDensityGPU:void 0;\"undefined\"!=typeof document&&r(247).GaussianDensityTexture,Object(o.__assign)(Object(o.__assign)({},{resolution:1,radiusOffset:0,smoothness:1.5}),{useGpu:!0});function Ma(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(o){switch(o.label){case 0:if(!i.useGpu)return[3,1];if(!Ia)throw\"GPU computation not supported on this platform\";if(!a)throw\"No WebGL context provided\";return[2,Ia(t,r,n,i,a)];case 1:return[4,Ta(e,t,r,n,i)];case 2:return[2,o.sent()];}});});}var ka=Object(o.__assign)({resolution:d.ParamDefinition.Numeric(1,{min:.1,max:20,step:.1},Object(o.__assign)({description:\"Grid resolution/cell spacing.\"},Fe.a.CustomQualityParamInfo)),radiusOffset:d.ParamDefinition.Numeric(0,{min:0,max:10,step:.1},{description:\"Extra/offset radius added to the atoms/coarse elements for gaussian calculation. Useful to create coarse, low resolution surfaces.\"}),smoothness:d.ParamDefinition.Numeric(1.5,{min:.5,max:2.5,step:.1},{description:\"Smoothness of the gausian surface, lower is smoother.\"})},Me.a),Ba=Object(o.__assign)(Object(o.__assign)({},ka),{useGpu:d.ParamDefinition.Boolean(!1)}),Va=(d.ParamDefinition.getDefaultValues(Ba),Object(o.__assign)({},ka));d.ParamDefinition.getDefaultValues(Va);function Ra(e,t,r,n){var i=this,a=t.lookup3d.boundary.box,s=Object(Me.d)(a,r),u=Object(Me.i)(e,t,s),c=u.position,l=u.radius;return _.b.create(\"Gaussian Density\",function(e){return Object(o.__awaiter)(i,void 0,void 0,function(){return Object(o.__generator)(this,function(t){switch(t.label){case 0:return[4,Ma(e,c,a,l,s,n)];case 1:return[2,t.sent()];}});});});}function La(e,t,r,n,i){var a=this,s=t.lookup3d.boundary.box,u=Object(Me.d)(s,r),c=Object(Me.i)(e,t,u),l=c.position,d=c.radius;return _.b.create(\"Gaussian Density\",function(e){return Object(o.__awaiter)(a,void 0,void 0,function(){return Object(o.__generator)(this,function(e){return[2,Object(Da.GaussianDensityTexture2d)(n,l,s,d,u,i)];});});});}function Na(e,t,r){var n=this,i=e.lookup3d.boundary.box,a=Object(Me.d)(i,t),s=Object(Me.h)(e,t.ignoreHydrogens,t.traceOnly),u=s.position,c=s.radius;return _.b.create(\"Gaussian Density\",function(e){return Object(o.__awaiter)(n,void 0,void 0,function(){return Object(o.__generator)(this,function(t){switch(t.label){case 0:return[4,Ma(e,u,i,c,a,r)];case 1:return[2,t.sent()];}});});});}var Fa,Ua,za=r(210),Ha=r(258),Ga=r(98),qa=r(99),Wa=r(17),Qa=r(92),Ya=r(147),Xa=r(187),Ka=r(53);function Za(){if(void 0!==Fa)return Fa;for(var e=(Fa=Object(Ka.c)(256,1,Uint8Array)).array,t=0,r=Xa.e.length;t<r;++t)e[t]=Xa.e[t].length/3;return Fa;}function Ja(){if(void 0!==Ua)return Ua;for(var e=(Ua=Object(Ka.c)(4096,1,Uint8Array)).array,t=0,r=Xa.e.length;t<r;++t)for(var n=0;n<16;++n)n<Xa.e[t].length?e[16*t+n]=Xa.e[t][n]:e[16*t+n]=255;return Ua;}var $a=r(205),eo=Object(o.__assign)(Object(o.__assign)({},Ya.a),{tTriCount:Object(Wa.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),tVolumeData:Object(Wa.h)(\"texture\",\"rgba\",\"ubyte\",\"nearest\"),uIsoValue:Object(Wa.i)(\"f\"),uGridDim:Object(Wa.i)(\"v3\"),uGridTexDim:Object(Wa.i)(\"v3\"),uScale:Object(Wa.i)(\"v2\")});function to(e,t,r,n,i,a){var s=e.gl,u=e.resources,c=t.getWidth(),l=t.getHeight(),d=u.framebuffer();d.bind();var f=u.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\");f.define(c,l);var p=function(e,t,r,n,i,a){var s=Object(o.__assign)(Object(o.__assign)({},Ya.b),{uQuadScale:be.e.create(a),tTriCount:be.e.create(Za()),tVolumeData:be.e.create(t),uIsoValue:be.e.create(i),uGridDim:be.e.create(r),uGridTexDim:be.e.create(n),uScale:be.e.create(a)}),u=Object(o.__assign)({},eo),c=Object(Qa.f)(\"active-voxels\",$a.a,\"\\nprecision highp float;\\nprecision highp sampler2D;\\n\\nuniform sampler2D tTriCount;\\nuniform sampler2D tVolumeData;\\n\\nuniform float uIsoValue;\\nuniform vec3 uGridDim;\\nuniform vec3 uGridTexDim;\\nuniform vec2 uScale;\\n\\n// cube corners\\nconst vec3 c0 = vec3(0., 0., 0.);\\nconst vec3 c1 = vec3(1., 0., 0.);\\nconst vec3 c2 = vec3(1., 1., 0.);\\nconst vec3 c3 = vec3(0., 1., 0.);\\nconst vec3 c4 = vec3(0., 0., 1.);\\nconst vec3 c5 = vec3(1., 0., 1.);\\nconst vec3 c6 = vec3(1., 1., 1.);\\nconst vec3 c7 = vec3(0., 1., 1.);\\n\\nvec3 index3dFrom2d(vec2 coord) {\\n    vec2 gridTexPos = coord * uGridTexDim.xy;\\n    vec2 columnRow = floor(gridTexPos / uGridDim.xy);\\n    vec2 posXY = gridTexPos - columnRow * uGridDim.xy;\\n    float posZ = columnRow.y * floor(uGridTexDim.x / uGridDim.x) + columnRow.x;\\n    vec3 posXYZ = vec3(posXY, posZ) / uGridDim;\\n    return posXYZ;\\n}\\n\\nfloat intDiv(float a, float b) { return float(int(a) / int(b)); }\\nfloat intMod(float a, float b) { return a - b * float(int(a) / int(b)); }\\n\\nvec4 texture3dFrom2dNearest(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\\n    float zSlice = floor(pos.z * gridDim.z + 0.5); // round to nearest z-slice\\n    float column = intMod(zSlice * gridDim.x, texDim.x) / gridDim.x;\\n    float row = floor(intDiv(zSlice * gridDim.x, texDim.x));\\n    vec2 coord = (vec2(column * gridDim.x, row * gridDim.y) + (pos.xy * gridDim.xy)) / (texDim / uScale);\\n    // return texture2D(tex, coord + 0.5 / texDim);\\n    return texture2D(tex, coord);\\n}\\n\\nvec4 voxel(vec3 pos) {\\n    return texture3dFrom2dNearest(tVolumeData, pos, uGridDim, uGridTexDim.xy);\\n}\\n\\nvoid main(void) {\\n    vec2 uv = gl_FragCoord.xy / uGridTexDim.xy;\\n    vec3 posXYZ = index3dFrom2d(uv);\\n\\n    // get MC case as the sum of corners that are below the given iso level\\n    float c = step(voxel(posXYZ).a, uIsoValue)\\n        + 2. * step(voxel(posXYZ + c1 / uGridDim).a, uIsoValue)\\n        + 4. * step(voxel(posXYZ + c2 / uGridDim).a, uIsoValue)\\n        + 8. * step(voxel(posXYZ + c3 / uGridDim).a, uIsoValue)\\n        + 16. * step(voxel(posXYZ + c4 / uGridDim).a, uIsoValue)\\n        + 32. * step(voxel(posXYZ + c5 / uGridDim).a, uIsoValue)\\n        + 64. * step(voxel(posXYZ + c6 / uGridDim).a, uIsoValue)\\n        + 128. * step(voxel(posXYZ + c7 / uGridDim).a, uIsoValue);\\n    c *= step(c, 254.);\\n\\n    // get total triangles to generate for calculated MC case from triCount texture\\n    float totalTrianglesToGenerate = texture2D(tTriCount, vec2(intMod(c, 16.), floor(c / 16.)) / 16.).a;\\n    gl_FragColor = vec4(vec3(floor(totalTrianglesToGenerate * 255.0 + 0.5) * 3.0), c);\\n\\n    // gl_FragColor = vec4(255.0, 0.0, 0.0, voxel(posXYZ + c4 / uGridDim).a * 255.0);\\n    // gl_FragColor = vec4(255.0, 0.0, 0.0, voxel(posXYZ).a * 255.0);\\n\\n    // vec2 uv = vCoordinate;\\n    // uv = gl_FragCoord.xy / uGridTexDim.xy;\\n\\n    // if (uv.y < 0.91) discard;\\n    // gl_FragColor = vec4(vCoordinate * 255.0, 0.0, 255.0);\\n    // gl_FragColor = vec4(250.0, 0.0, 0.0, 255.0);\\n}\\n\"),l=Object(qa.a)(e,\"triangles\",c,u,s);return Object(Ga.a)(l,s);}(e,t,r,n,i,a);return e.state.currentRenderItemId=-1,f.attachFramebuffer(d,0),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0);}(e),s.viewport(0,0,c,l),p.render(),s.finish(),f;}var ro,no,io=r(217),ao=Object(o.__assign)(Object(o.__assign)({},Ya.a),{tTexture:Object(Wa.h)(\"texture\",\"rgba\",\"float\",\"nearest\")});var oo=new Uint8Array(4);function so(e,t){var r=e.gl,n=e.resources,i=function(e,t){if(ro)return be.e.update(ro.values.tTexture,t),ro.update(),ro;var r=Object(o.__assign)(Object(o.__assign)({},Ya.b),{tTexture:be.e.create(t)}),n=Object(o.__assign)({},ao),i=Object(Qa.f)(\"sum\",$a.a,\"\\nprecision highp float;\\nprecision highp sampler2D;\\n\\nuniform sampler2D tTexture;\\n\\n#include common\\n\\nvoid main(void) {\\n    gl_FragColor = vec4(encodeFloatRGB(texture2D(tTexture, vec2(0.5)).r), 1.0);\\n}\\n\"),a=Object(qa.a)(e,\"triangles\",i,n,r);return ro=Object(Ga.a)(a,r);}(e,t);e.state.currentRenderItemId=-1;var a=n.framebuffer();return function(e){return no||((no=e.resources.texture(\"image-uint8\",\"rgba\",\"ubyte\",\"nearest\")).define(1,1),no);}(e).attachFramebuffer(a,0),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0);}(e),r.viewport(0,0,1,1),i.render(),r.finish(),e.readPixels(0,0,1,1,oo),e.unbindFramebuffer(),Object(io.b)(oo[0],oo[1],oo[2]);}var uo,co=r(46),lo=Object(o.__assign)(Object(o.__assign)({},Ya.a),{tPreviousLevel:Object(Wa.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),uSize:Object(Wa.i)(\"f\"),uTexSize:Object(Wa.i)(\"f\")});var fo=[];function po(e,t){var r=fo[t],n=Math.pow(2,t);if(void 0===r){var i=e.resources.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\"),a=e.resources.framebuffer();i.attachFramebuffer(a,0),(r={texture:i,framebuffer:a}).texture.define(n,n),fo[t]=r;}return r;}function mo(e,t,r){var n=e.gl,i=e.resources;if(t.getWidth()!==t.getHeight()||!Object(co.e)(t.getWidth()))throw new Error(\"inputTexture must be of square power-of-two size\");var a=Math.ceil(Math.log(t.getWidth())/Math.log(2)),s=Math.pow(2,a),u=i.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\");u.define(s,s);var c=i.framebuffer();u.attachFramebuffer(c,0),n.clear(n.COLOR_BUFFER_BIT);for(var l=[],d=0;d<a;++d)l.push(po(e,d));var f=function(e,t){if(uo)return be.e.update(uo.values.tPreviousLevel,t),uo.update(),uo;var r=Object(o.__assign)(Object(o.__assign)({},Ya.b),{tPreviousLevel:be.e.create(t),uSize:be.e.create(0),uTexSize:be.e.create(0)}),n=Object(o.__assign)({},lo),i=Object(Qa.f)(\"reduction\",$a.a,\"\\nprecision highp float;\\nprecision highp sampler2D;\\n\\n// input texture (previous level used to evaluate the new level)\\nuniform sampler2D tPreviousLevel;\\n\\n// 1/size of the previous level texture.\\nuniform float uSize;\\nuniform float uTexSize;\\n\\nvoid main(void) {\\n    float k = 0.5 * uSize;\\n    vec2 position = floor((gl_FragCoord.xy / uTexSize) / uSize) * uSize;\\n    float a = texture2D(tPreviousLevel, position).r;\\n    float b = texture2D(tPreviousLevel, position + vec2(k, 0.)).r;\\n    float c = texture2D(tPreviousLevel, position + vec2(0., k)).r;\\n    float d = texture2D(tPreviousLevel, position + vec2(k, k)).r;\\n    gl_FragColor.a = a;\\n    gl_FragColor.b = a + b;\\n    gl_FragColor.g = gl_FragColor.b + c;\\n    gl_FragColor.r = gl_FragColor.g + d;\\n}\\n\"),a=Object(qa.a)(e,\"triangles\",i,n,r);return uo=Object(Ga.a)(a,r);}(e,t);e.state.currentRenderItemId=-1,function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0);}(e);var p=0;for(d=0;d<a;d++){var m=a-1-d;l[m].framebuffer.bind();var h=Math.pow(2,m);n.clear(n.COLOR_BUFFER_BIT),n.viewport(0,0,h,h),be.e.update(f.values.uSize,Math.pow(2,d+1)/s),be.e.update(f.values.uTexSize,h),d>0&&(be.e.update(f.values.tPreviousLevel,l[a-d].texture),f.update()),e.state.currentRenderItemId=-1,f.render(),u.bind(0),n.copyTexSubImage2D(n.TEXTURE_2D,0,p,0,0,0,h,h),u.unbind(0),p+=h;}n.finish();var g=so(e,l[0].texture);return{pyramidTex:u,count:g,height:Math.ceil(g/Math.pow(2,a)),levels:a,scale:r};}var ho=Object(o.__assign)(Object(o.__assign)({},Ya.a),{tTriIndices:Object(Wa.h)(\"image-uint8\",\"alpha\",\"ubyte\",\"nearest\"),tActiveVoxelsPyramid:Object(Wa.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),tActiveVoxelsBase:Object(Wa.h)(\"texture\",\"rgba\",\"float\",\"nearest\"),tVolumeData:Object(Wa.h)(\"texture\",\"rgba\",\"ubyte\",\"nearest\"),uIsoValue:Object(Wa.i)(\"f\"),uSize:Object(Wa.i)(\"f\"),uLevels:Object(Wa.i)(\"f\"),uCount:Object(Wa.i)(\"f\"),uGridDim:Object(Wa.i)(\"v3\"),uGridTexDim:Object(Wa.i)(\"v3\"),uGridTransform:Object(Wa.i)(\"m4\"),uScale:Object(Wa.i)(\"v2\")});function go(e,t,r,n,i,a,s,u,c,l){var d=e.gl,f=e.resources,p=n.pyramidTex,m=n.height,h=n.levels,g=n.scale,v=n.count,b=f.framebuffer(),y=!1;c?c.getWidth()!==p.getWidth()||c.getHeight()!==p.getHeight()?c.define(p.getWidth(),p.getHeight()):y=!0:(c=f.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\")).define(p.getWidth(),p.getHeight()),l?l.getWidth()!==p.getWidth()||l.getHeight()!==p.getHeight()?l.define(p.getWidth(),p.getHeight()):y=!0:(l=f.texture(\"image-float32\",\"rgba\",\"float\",\"nearest\")).define(p.getWidth(),p.getHeight());var _=function(e,t,r,n,i,a,s,u,c,l,d,f){var p=Object(o.__assign)(Object(o.__assign)({},Ya.b),{uQuadScale:be.e.create(M.Vec2.create(1,f/Math.pow(2,c))),tTriIndices:be.e.create(Ja()),tActiveVoxelsPyramid:be.e.create(t),tActiveVoxelsBase:be.e.create(r),tVolumeData:be.e.create(n),uIsoValue:be.e.create(u),uSize:be.e.create(Math.pow(2,c)),uLevels:be.e.create(c),uCount:be.e.create(d),uGridDim:be.e.create(i),uGridTexDim:be.e.create(a),uGridTransform:be.e.create(s),uScale:be.e.create(l)}),m=Object(o.__assign)({},ho),h=Object(Qa.f)(\"isosurface\",$a.a,\"\\nprecision highp float;\\nprecision highp sampler2D;\\n\\nuniform sampler2D tActiveVoxelsPyramid;\\nuniform sampler2D tActiveVoxelsBase;\\nuniform sampler2D tVolumeData;\\nuniform sampler2D tTriIndices;\\n\\nuniform float uIsoValue;\\nuniform float uLevels;\\nuniform float uSize;\\nuniform float uCount;\\n\\nuniform vec3 uGridDim;\\nuniform vec3 uGridTexDim;\\nuniform mat4 uGridTransform;\\n\\n// scale to volume data coord\\nuniform vec2 uScale;\\n\\n// varying vec2 vCoordinate;\\n\\n#include common\\n\\n// cube corners\\nconst vec3 c0 = vec3(0., 0., 0.);\\nconst vec3 c1 = vec3(1., 0., 0.);\\nconst vec3 c2 = vec3(1., 1., 0.);\\nconst vec3 c3 = vec3(0., 1., 0.);\\nconst vec3 c4 = vec3(0., 0., 1.);\\nconst vec3 c5 = vec3(1., 0., 1.);\\nconst vec3 c6 = vec3(1., 1., 1.);\\nconst vec3 c7 = vec3(0., 1., 1.);\\n\\nconst float EPS = 0.00001;\\n\\nvec3 index3dFrom2d(vec2 coord) {\\n    vec2 gridTexPos = coord * uGridTexDim.xy;\\n    vec2 columnRow = floor(gridTexPos / uGridDim.xy);\\n    vec2 posXY = gridTexPos - columnRow * uGridDim.xy;\\n    float posZ = columnRow.y * floor(uGridTexDim.x / uGridDim.x) + columnRow.x;\\n    vec3 posXYZ = vec3(posXY, posZ);\\n    return posXYZ;\\n}\\n\\nvec4 texture3dFrom2dNearest(sampler2D tex, vec3 pos, vec3 gridDim, vec2 texDim) {\\n    float zSlice = floor(pos.z * gridDim.z + 0.5); // round to nearest z-slice\\n    float column = intMod(zSlice * gridDim.x, texDim.x) / gridDim.x;\\n    float row = floor(intDiv(zSlice * gridDim.x, texDim.x));\\n    vec2 coord = (vec2(column * gridDim.x, row * gridDim.y) + (pos.xy * gridDim.xy)) / (texDim / uScale);\\n    return texture2D(tex, coord + 0.5 / (texDim / uScale));\\n    // return texture2D(tex, coord);\\n}\\n\\nvec4 voxel(vec3 pos) {\\n    return texture3dFrom2dNearest(tVolumeData, pos, uGridDim, uGridTexDim.xy);\\n}\\n\\nvoid main(void) {\\n    // get 1D index\\n    float vI = dot(floor(uSize * (gl_FragCoord.xy / uSize)), vec2(1.0, uSize));\\n\\n    // ignore 1D indices outside of the grid\\n    if(vI >= uCount) discard;\\n\\n    float offset = uSize - 2.;\\n    float k = 1. / uSize;\\n\\n    vec2 relativePosition = k * vec2(offset, 0.);\\n    vec4 partialSums = texture2D(tActiveVoxelsPyramid, relativePosition);\\n    float start = 0.;\\n    vec4 starts = vec4(0.);\\n    vec4 ends = vec4(0.);\\n    float diff = 2.;\\n    vec4 m = vec4(0.);\\n    vec2 position = vec2(0.);\\n    vec4 vI4 = vec4(vI);\\n\\n    // traverse the different levels of the pyramid\\n    for(int i = 1; i < 12; i++) {\\n        if(float(i) >= uLevels) break;\\n\\n        offset -= diff;\\n        diff *= 2.;\\n        relativePosition = position + k * vec2(offset, 0.);\\n\\n        ends = partialSums.wzyx + vec4(start);\\n        starts = vec4(start, ends.xyz);\\n        m = vec4(greaterThanEqual(vI4, starts)) * vec4(lessThan(vI4, ends));\\n        relativePosition += m.y * vec2(k, 0.) + m.z * vec2(0., k) + m.w * vec2(k, k);\\n\\n        start = dot(m, starts);\\n        position = 2. * (relativePosition - k * vec2(offset, 0.));\\n        partialSums = texture2D(tActiveVoxelsPyramid, relativePosition);\\n    }\\n\\n    ends = partialSums.wzyx + vec4(start);\\n    starts = vec4(start, ends.xyz);\\n    m = vec4(greaterThanEqual(vI4, starts)) * vec4(lessThan(vI4, ends));\\n    position += m.y * vec2(k, 0.) + m.z * vec2(0., k) + m.w * vec2(k, k);\\n\\n    vec2 coord2d = position / uScale;\\n    vec3 coord3d = floor(index3dFrom2d(coord2d) + 0.5);\\n\\n    float edgeIndex = floor(texture2D(tActiveVoxelsBase, position).a + 0.5);\\n\\n    // current vertex for the up to 15 MC cases\\n    float currentVertex = vI - dot(m, starts);\\n\\n    // get index into triIndices table\\n    float mcIndex = 16. * edgeIndex + currentVertex;\\n    vec4 mcData = texture2D(tTriIndices, vec2(intMod(mcIndex, 64.), floor(mcIndex / 64.)) / 64.);\\n\\n    // bit mask to avoid conditionals (see comment below) for getting MC case corner\\n    vec4 m0 = vec4(floor(mcData.a * 255.0 + 0.5));\\n\\n    // get edge value masks\\n    vec4 m1 = vec4(equal(m0, vec4(0., 1., 2., 3.)));\\n    vec4 m2 = vec4(equal(m0, vec4(4., 5., 6., 7.)));\\n    vec4 m3 = vec4(equal(m0, vec4(8., 9., 10., 11.)));\\n\\n    // apply bit masks\\n    vec3 b0 = coord3d +\\n                m1.y * c1 +\\n                m1.z * c2 +\\n                m1.w * c3 +\\n                m2.x * c4 +\\n                m2.y * c5 +\\n                m2.z * c6 +\\n                m2.w * c7 +\\n                m3.y * c1 +\\n                m3.z * c2 +\\n                m3.w * c3;\\n    vec3 b1 = coord3d +\\n                m1.x * c1 +\\n                m1.y * c2 +\\n                m1.z * c3 +\\n                m2.x * c5 +\\n                m2.y * c6 +\\n                m2.z * c7 +\\n                m2.w * c4 +\\n                m3.x * c4 +\\n                m3.y * c5 +\\n                m3.z * c6 +\\n                m3.w * c7;\\n\\n    // the conditionals that are avoided by above bitmasks\\n    // vec3 b0 = coord3d;\\n    // vec3 b1 = coord3d;\\n    // if (mcIndex == 0.0) {\\n    //     b0 += c0; b1 += c1;\\n    // } else if (mcIndex == 1.0) {\\n    //     b0 += c1; b1 += c2;\\n    // } else if (mcIndex == 2.0) {\\n    //     b0 += c2; b1 += c3;\\n    // } else if (mcIndex == 3.0) {\\n    //     b0 += c3; b1 += c0;\\n    // } else if (mcIndex == 4.0) {\\n    //     b0 += c4; b1 += c5;\\n    // } else if (mcIndex == 5.0) {\\n    //     b0 += c5; b1 += c6;\\n    // } else if (mcIndex == 6.0) {\\n    //     b0 += c6; b1 += c7;\\n    // } else if (mcIndex == 7.0) {\\n    //     b0 += c7; b1 += c4;\\n    // } else if (mcIndex == 8.0) {\\n    //     b0 += c0; b1 += c4;\\n    // } else if (mcIndex == 9.0) {\\n    //     b0 += c1; b1 += c5;\\n    // } else if (mcIndex == 10.0) {\\n    //     b0 += c2; b1 += c6;\\n    // } else if (mcIndex == 11.0) {\\n    //     b0 += c3; b1 += c7;\\n    // }\\n    // b0 = floor(b0 + 0.5);\\n    // b1 = floor(b1 + 0.5);\\n\\n    vec4 d0 = voxel(b0 / uGridDim);\\n    vec4 d1 = voxel(b1 / uGridDim);\\n\\n    float v0 = d0.a;\\n    float v1 = d1.a;\\n\\n    float t = (uIsoValue - v0) / (v0 - v1);\\n    // t = -0.5;\\n    gl_FragData[0].xyz = (uGridTransform * vec4(b0 + t * (b0 - b1), 1.0)).xyz;\\n    gl_FragData[0].w = decodeFloatRGB(d0.rgb); // group id\\n\\n    // normals from gradients\\n    vec3 n0 = -normalize(vec3(\\n        voxel((b0 - c1) / uGridDim).a - voxel((b0 + c1) / uGridDim).a,\\n        voxel((b0 - c3) / uGridDim).a - voxel((b0 + c3) / uGridDim).a,\\n        voxel((b0 - c4) / uGridDim).a - voxel((b0 + c4) / uGridDim).a\\n    ));\\n    vec3 n1 = -normalize(vec3(\\n        voxel((b1 - c1) / uGridDim).a - voxel((b1 + c1) / uGridDim).a,\\n        voxel((b1 - c3) / uGridDim).a - voxel((b1 + c3) / uGridDim).a,\\n        voxel((b1 - c4) / uGridDim).a - voxel((b1 + c4) / uGridDim).a\\n    ));\\n    gl_FragData[1].xyz = -vec3(\\n        n0.x + t * (n0.x - n1.x),\\n        n0.y + t * (n0.y - n1.y),\\n        n0.z + t * (n0.z - n1.z)\\n    );\\n\\n    mat3 normalMatrix = transpose3(inverse3(mat3(uGridTransform)));\\n    gl_FragData[1].xyz = normalMatrix * gl_FragData[1].xyz;\\n}\\n\",{drawBuffers:!0}),g=Object(qa.a)(e,\"triangles\",h,m,p);return Object(Ga.a)(g,p);}(e,p,t,r,i,a,s,u,h,g,v,m);e.state.currentRenderItemId=-1,c.attachFramebuffer(b,0),l.attachFramebuffer(b,1);var S=e.extensions.drawBuffers;if(!S)throw new Error(\"need WebGL draw buffers\");return S.drawBuffers([S.COLOR_ATTACHMENT0,S.COLOR_ATTACHMENT1]),function(e){var t=e.gl,r=e.state;r.disable(t.CULL_FACE),r.disable(t.BLEND),r.disable(t.DEPTH_TEST),r.disable(t.SCISSOR_TEST),r.depthMask(!1),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0);}(e),d.viewport(0,0,p.getWidth(),p.getHeight()),y&&d.clear(d.COLOR_BUFFER_BIT),_.render(),d.finish(),{vertexGroupTexture:c,normalTexture:l,vertexCount:v};}var vo=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),xe.i),Ba);function bo(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,s,u,c,l,d,f,p;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return n=i.smoothness,[4,Ra(r,t,i,e.webgl).runInContext(e.runtime)];case 1:return s=o.sent(),u=s.transform,c=s.field,l=s.idField,d={isoLevel:Math.exp(-n),scalarField:c,idField:l},[4,Object(za.b)(d,a).runAsChild(e.runtime)];case 2:return f=o.sent(),Qe.a.transform(f,u),e.webgl&&!e.webgl.isWebGL2&&Qe.a.uniformTriangleGroup(f),p=D.g.expand(Object(D.g)(),t.boundary.sphere,i.radiusOffset),f.setBoundingSphere(p),[2,f];}});});}function yo(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(vo),createGeometry:bo,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.useGpu!==r.useGpu&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0);}},e);}var _o=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},ut.c),Ba),{ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function So(e,t,r,n,i){return Object(o.__awaiter)(this,void 0,void 0,function(){var r,a,s,u,c,l,d,f;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return r=n.smoothness,[4,Na(t,n,e.webgl).runInContext(e.runtime)];case 1:return a=o.sent(),s=a.transform,u=a.field,c=a.idField,l={isoLevel:Math.exp(-r),scalarField:u,idField:c},[4,Object(za.b)(l,i).runAsChild(e.runtime)];case 2:return d=o.sent(),Qe.a.transform(d,s),e.webgl&&!e.webgl.isWebGL2&&Qe.a.uniformTriangleGroup(d),f=D.g.expand(Object(D.g)(),t.boundary.sphere,n.radiusOffset),d.setBoundingSphere(f),[2,d];}});});}function Oo(e){return Object(ut.d)({defaultProps:d.ParamDefinition.getDefaultValues(_o),createGeometry:So,createLocationIterator:De.fromStructure,getLoci:Ne,eachLocation:Le,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.useGpu!==r.useGpu&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0);}},e);}function xo(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,s,u,c,l,d;return Object(o.__generator)(this,function(o){switch(o.label){case 0:if(!e.webgl)throw new Error(\"webgl context required to create gaussian surface texture-mesh\");return n=Math.exp(-i.smoothness),[4,La(r,t,i,e.webgl).runInContext(e.runtime)];case 1:return s=o.sent(),u=to(e.webgl,s.texture,s.gridDim,s.gridTexDim,n,s.gridTexScale),c=mo(e.webgl,u,s.gridTexScale),l=go(e.webgl,u,s.texture,c,s.gridDim,s.gridTexDim,s.transform,n,a?a.vertexGroupTexture.ref.value:void 0,a?a.normalTexture.ref.value:void 0),d=D.g.fromBox3D(Object(D.g)(),s.bbox),[2,Ha.a.create(l.vertexCount,1,l.vertexGroupTexture,l.normalTexture,d,a)];}});});}function Co(e){return Object(xe.j)({defaultProps:d.ParamDefinition.getDefaultValues(vo),createGeometry:xo,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0);}},e);}var wo=r(74);function Po(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,s,u,c,l,d,f,p;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return n=i.smoothness,[4,Ra(r,t,i,e.webgl).runInContext(e.runtime)];case 1:return s=o.sent(),u=s.transform,c=s.field,l=s.idField,d={isoLevel:Math.exp(-n),scalarField:c,idField:l},[4,Object(za.a)(d,a).runAsChild(e.runtime)];case 2:return f=o.sent(),wo.a.transform(f,u),p=D.g.expand(Object(D.g)(),t.boundary.sphere,i.radiusOffset),f.setBoundingSphere(p),[2,f];}});});}var jo=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.a),Ba),{sizeFactor:d.ParamDefinition.Numeric(1.5,{min:0,max:10,step:.1}),lineSizeAttenuation:d.ParamDefinition.Boolean(!1),ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function Eo(e){return Object(xe.b)({defaultProps:d.ParamDefinition.getDefaultValues(jo),createGeometry:Po,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.radiusOffset!==r.radiusOffset&&(e.createGeometry=!0),t.smoothness!==r.smoothness&&(e.createGeometry=!0),t.useGpu!==r.useGpu&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.traceOnly!==r.traceOnly&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0);}},e);}var Ao={\"gaussian-surface-mesh\":function gaussianSurfaceMesh(e,t){return Object(gt.a)(\"Gaussian surface mesh\",e,t,yo);},\"structure-gaussian-surface-mesh\":function structureGaussianSurfaceMesh(e,t){return Object(bt.a)(\"Structure-Gaussian surface mesh\",e,t,Oo);},\"gaussian-surface-texture-mesh\":function gaussianSurfaceTextureMesh(e,t){return Object(gt.a)(\"Gaussian surface texture-mesh\",e,t,Co);},\"gaussian-surface-wireframe\":function gaussianSurfaceWireframe(e,t){return Object(gt.a)(\"Gaussian surface wireframe\",e,t,Eo);}},To=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},vo),jo),{visuals:d.ParamDefinition.MultiSelect([\"gaussian-surface-mesh\"],d.ParamDefinition.objectToOptions(Ao))});var Do=Object(bt.b)({name:\"gaussian-surface\",label:\"Gaussian Surface\",description:\"Displays a gaussian molecular surface.\",factory:function factory(e,t){return se.a.createMulti(\"Gaussian Surface\",e,t,bt.c,Ao);},getParams:function getParams(e,t){return d.ParamDefinition.clone(To);},defaultValues:d.ParamDefinition.getDefaultValues(To),defaultColorTheme:{name:\"chain-id\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),Io=r(209),Mo=r(281),ko=Object(o.__assign)(Object(o.__assign)({},ut.e),{background:d.ParamDefinition.Boolean(!0),backgroundMargin:d.ParamDefinition.Numeric(0,{min:0,max:1,step:.01}),backgroundColor:d.ParamDefinition.Color(G.a.black),backgroundOpacity:d.ParamDefinition.Numeric(.5,{min:0,max:1,step:.01}),level:d.ParamDefinition.Select(\"residue\",[[\"chain\",\"Chain\"],[\"residue\",\"Residue\"],[\"element\",\"Element\"]]),chainScale:d.ParamDefinition.Numeric(10,{min:0,max:20,step:.1}),residueScale:d.ParamDefinition.Numeric(1,{min:0,max:20,step:.1}),elementScale:d.ParamDefinition.Numeric(.5,{min:0,max:20,step:.1})});function Bo(e){return Object(ut.f)({defaultProps:d.ParamDefinition.getDefaultValues(ko),createGeometry:Vo,createLocationIterator:De.fromStructure,getLoci:Ne,eachLocation:Le,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.level!==r.level||\"chain\"===t.level&&t.chainScale!==r.chainScale||\"residue\"===t.level&&t.residueScale!==r.residueScale||\"element\"===t.level&&t.elementScale!==r.elementScale;}},e);}function Vo(e,t,r,n,i){switch(n.level){case\"chain\":return function(e,t,r,n,i){for(var a=A.StructureElement.Location.create(t),o=t.units,s=t.serialMapping,u=A.StructureProperties.chain,c=u.auth_asym_id,l=u.label_asym_id,d=s.cumulativeUnitElementCount,f=o.length,p=n.chainScale,m=Io.a.create(n,f,f/2,i),h=0,g=o.length;h<g;++h){var v=o[h];a.unit=v,a.element=v.elements[0];var b=v.lookup3d.boundary.sphere,y=b.center,_=b.radius;M.Vec3.transformMat4(Ro,y,v.conformation.operator.matrix);var S=c(a),O=l(a),x=S===O?O:O+\" [\"+S+\"]\";m.add(x,Ro[0],Ro[1],Ro[2],_,p,d[h]);}return m.getText();}(0,t,0,n,i);case\"residue\":return function(e,t,r,n,i){for(var a=A.StructureElement.Location.create(t),o=t.units,s=t.serialMapping,u=A.StructureProperties.atom.label_comp_id,c=A.StructureProperties.residue.auth_seq_id,l=s.cumulativeUnitElementCount,d=2*t.polymerResidueCount,f=n.residueScale,p=Io.a.create(n,d,d/2,i),m=0,h=o.length;m<h;++m){var g=o[m],v=g.conformation.position,b=g.elements;a.unit=g,a.element=g.elements[0];for(var y=g.model.atomicHierarchy.residueAtomSegments.index,_=l[m],S=0,O=b.length;S<O;){var x=S,C=y[b[S]];for(S++;S<O&&y[b[S]]===C;)S++;Lo.reset();for(var w=x;w<S;w++)v(b[w],Ro),Lo.includePosition(Ro);Lo.finishedIncludeStep();for(w=x;w<S;w++)v(b[w],Ro),Lo.radiusPosition(Ro);a.element=b[x];var P=Lo.getSphere(),j=P.center,E=P.radius,T=c(a),D=u(a)+\" \"+T;p.add(D,j[0],j[1],j[2],E,f,_+x);}}return p.getText();}(0,t,0,n,i);case\"element\":return function(e,t,r,n,i){for(var a=A.StructureElement.Location.create(t),o=t.units,s=t.serialMapping,u=A.StructureProperties.atom,c=u.label_atom_id,l=u.label_alt_id,d=s.cumulativeUnitElementCount,f=Object(Mo.a)({},{scale:1}),p=t.elementCount,m=n.elementScale,h=Io.a.create(n,p,p/2,i),g=0,v=o.length;g<v;++g){var b=o[g],y=b.conformation.position,_=b.elements;a.unit=b;for(var S=d[g],O=0,x=_.length;O<x;O++){a.element=_[O],y(a.element,Ro);var C=c(a),w=l(a),P=w?C+\"%\"+w:C;h.add(P,Ro[0],Ro[1],Ro[2],f.size(a),m,S+O);}}return h.getText();}(0,t,0,n,i);}}var Ro=Object(M.Vec3)(),Lo=new ne.a(\"98\");var No={\"label-text\":function labelText(e,t){return Object(bt.a)(\"Label text\",e,t,Bo);}},Fo=Object(o.__assign)(Object(o.__assign)({},ko),{visuals:d.ParamDefinition.MultiSelect([\"label-text\"],d.ParamDefinition.objectToOptions(No))});var Uo=Object(bt.b)({name:\"label\",label:\"Label\",description:\"Displays labels.\",factory:function factory(e,t){var r=se.a.createMulti(\"Label\",e,t,bt.c,No);return r.setState({pickable:!1,markerActions:ue.a.None}),r;},getParams:function getParams(e,t){return d.ParamDefinition.clone(Fo);},defaultValues:d.ParamDefinition.getDefaultValues(Fo),defaultColorTheme:{name:\"uniform\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),zo=r(25);var Ho={probeRadius:d.ParamDefinition.Numeric(1.4,{min:0,max:10,step:.1},{description:\"Radius of the probe tracing the molecular surface.\"}),resolution:d.ParamDefinition.Numeric(.5,{min:.01,max:20,step:.01},Object(o.__assign)({description:\"Grid resolution/cell spacing.\"},Fe.a.CustomQualityParamInfo)),probePositions:d.ParamDefinition.Numeric(30,{min:12,max:90,step:1},Object(o.__assign)({description:\"Number of positions tested for probe target intersection.\"},Fe.a.CustomQualityParamInfo))};d.ParamDefinition.getDefaultValues(Ho);function Go(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){function s(e,t,r,n,i){if(-1!==f){if((s=f)!==n&&s!==i&&u(s,e,t,r))return s;f=-1;}for(var a=0,o=C.count;a<o;++a){var s;if((s=ge.OrderedSet.getAt(w,C.indices[a]))!==n&&s!==i&&u(s,e,t,r))return f=s,s;}return-1;}function u(e,t,r,n){var i=T[e],a=P[e]-t,o=j[e]-r,s=E[e]-n;return a*a+o*o+s*s<i*i;}function c(){return Object(o.__awaiter)(this,void 0,void 0,function(){var t;return Object(o.__generator)(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<I?(function(e,t){for(var r=e;r<t;++r){var n=ge.OrderedSet.getAt(w,r),i=P[n],a=j[n],o=E[n],u=T[n],c=u*u;x.find(i,a,o,u);for(var l=Math.ceil(u*_),d=Math.floor(_*(i-R)),f=Math.floor(_*(a-L)),p=Math.floor(_*(o-N)),m=Math.max(0,d-l),h=Math.max(0,f-l),g=Math.max(0,p-l),v=Math.min(z,d+l+2),b=Math.min(H,f+l+2),y=Math.min(G,p+l+2),S=m;S<v;++S)for(var O=$[S]-i,C=S*W,D=h;D<b;++D)for(var I=ee[D]-a,M=O*O+I*I,k=D*q+C,B=g;B<y;++B){var V=te[B]-o,F=M+V*V;if(F<c){var U=B+k;Z[U]<0&&(Z[U]*=-1);var Q=Math.sqrt(F),Y=u/Q;if(-1===s(O*Y+i,I*Y+a,V*Y+o,n,-1)){var X=u-Q;X<Z[U]&&(Z[U]=X,J[U]=A[r]);}}}}}(t,Math.min(t+re,I)),e.shouldUpdate?[4,e.update({message:\"projecting points\",current:t,max:I})]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t+=re,[3,1];case 4:return[2];}});});}function l(e,t){var r,n,i=T[e],a=T[t],o=p[0]=P[t]-P[e],u=p[1]=j[t]-j[e],c=p[2]=E[t]-E[e],l=o*o+u*u+c*c,d=Math.sqrt(l),v=i*((i*i+d*d-a*a)/(2*i*d));M.Vec3.normalize(p,p),n=p,(r=h)[0]=r[1]=r[2]=1,0!==n[0]?r[0]=(n[1]+n[2])/-n[0]:0!==n[1]?r[1]=(n[0]+n[2])/-n[1]:0!==n[2]&&(r[2]=(n[0]+n[1])/-n[2]),M.Vec3.normalize(h,h),M.Vec3.cross(g,p,h),M.Vec3.normalize(g,g);var b=Math.sqrt(i*i-v*v);M.Vec3.scale(h,h,b),M.Vec3.scale(g,g,b),M.Vec3.scale(p,p,v),m[0]=p[0]+P[e],m[1]=p[1]+j[e],m[2]=p[2]+E[e],f=-1;for(var O=0;O<y;++O){var x=Y[O],C=X[O],D=m[0]+x*h[0]+C*g[0],I=m[1]+x*h[1]+C*g[1],k=m[2]+x*h[2]+C*g[2];if(-1===s(D,I,k,e,t))for(var B=Math.floor(_*(D-R)),V=Math.floor(_*(I-L)),F=Math.floor(_*(k-N)),U=Math.max(0,B-S),Q=Math.max(0,V-S),K=Math.max(0,F-S),re=Math.min(z,B+S+2),ne=Math.min(H,V+S+2),ie=Math.min(G,F+S+2),ae=U;ae<re;++ae)for(var oe=D-$[ae],se=ae*W,ue=Q;ue<ne;++ue)for(var ce=I-ee[ue],le=oe*oe+ce*ce,de=ue*q+se,fe=K;fe<ie;++fe){var pe=k-te[fe],me=le+pe*pe,he=fe+de,ve=Z[he];if(ve>0&&me<ve*ve){Z[he]=Math.sqrt(me);var be=oe*p[0]+ce*p[1]+pe*p[2];J[he]=A[ge.OrderedSet.indexOf(w,be<0?t:e)];}}}}function d(){return Object(o.__awaiter)(this,void 0,void 0,function(){var t;return Object(o.__generator)(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<I?(function(e,t){for(var r=e;r<t;++r){var n=ge.OrderedSet.getAt(w,r);x.find(P[n],j[n],E[n],T[n]);for(var i=0,a=C.count;i<a;++i){var o=ge.OrderedSet.getAt(w,C.indices[i]);n<o&&l(n,o);}}}(t,Math.min(t+re,I)),e.shouldUpdate?[4,e.update({message:\"projecting torii\",current:t,max:I})]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t+=re,[3,1];case 4:return[2];}});});}var f,p,m,h,g,v,b,y,_,S,O,x,C,w,P,j,E,A,T,I,k,B,V,R,L,N,F,U,z,H,G,q,W,Q,Y,X,K,Z,J,$,ee,te,re,ne,ie,ae;return Object(o.__generator)(this,function(e){switch(e.label){case 0:return f=-1,p=Object(M.Vec3)(),m=Object(M.Vec3)(),h=Object(M.Vec3)(),g=Object(M.Vec3)(),v=a.resolution,b=a.probeRadius,y=a.probePositions,_=1/v,S=Math.max(5,2+Math.floor(b*_)),O=M.Vec3.create(n,n,n),M.Vec3.scale(O,O,2),x=Object(D.c)(t,r,O),C=x.result,null===i&&(i=x.boundary.box),w=t.indices,P=t.x,j=t.y,E=t.z,A=t.id,T=t.radius,I=ge.OrderedSet.size(w),k=n+v,B=D.b.expand(Object(D.b)(),i,M.Vec3.create(k,k,k)),V=B.min,R=V[0],L=V[1],N=V[2],F=D.b.scale(Object(D.b)(),B,_),U=D.b.size(Object(M.Vec3)(),F),M.Vec3.ceil(U,U),z=U[0],H=U[1],G=U[2],W=(q=G)*H,Q=function(e){for(var t=0,r=2*Math.PI/e,n=new Float32Array(e),i=new Float32Array(e),a=0;a<e;a++)n[a]=Math.cos(t),i[a]=Math.sin(t),t+=r;return{cosTable:n,sinTable:i};}(y),Y=Q.cosTable,X=Q.sinTable,K=M.Tensor.Space(U,[0,1,2],Float32Array),Z=K.create(),J=K.create(),Z.fill(-1001),J.fill(-1),$=Object(D.i)(z,R,v),ee=Object(D.i)(H,L,v),te=Object(D.i)(G,N,v),re=Math.ceil(1e5/(Math.pow(Math.pow(n,3),3)*_)),[4,c()];case 1:return e.sent(),[4,d()];case 2:return e.sent(),ne=M.Tensor.create(K,Z),ie=M.Tensor.create(K,J),ae=zo.c.identity(),zo.c.fromScaling(ae,M.Vec3.create(v,v,v)),zo.c.setTranslation(ae,B.min),[2,{field:ne,idField:ie,transform:ae}];}});});}function qo(e,t,r){var n=this,i=t.lookup3d.boundary.box,a=Object(Me.d)(i,r),s=function(e,t,r){for(var n=r.probeRadius,i=Object(Me.i)(e,t,r),a=i.position,s=i.boundary,u=i.radius,c=a.indices,l=ge.OrderedSet.size(c),d=new Float32Array(ge.OrderedSet.end(c)),f=0,p=0;p<l;++p){var m=ge.OrderedSet.getAt(c,p),h=u(m);f<h&&(f=h),d[m]=h+n;}return{position:Object(o.__assign)(Object(o.__assign)({},a),{radius:d}),boundary:s,maxRadius:f};}(e,t,a),u=s.position,c=s.boundary,l=s.maxRadius;return _.b.create(\"Molecular Surface\",function(e){return Object(o.__awaiter)(n,void 0,void 0,function(){return Object(o.__generator)(this,function(t){switch(t.label){case 0:return[4,Wo(e,u,c,l,i,a)];case 1:return[2,t.sent()];}});});});}function Wo(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(o){return[2,Go(e,t,r,n,i,a)];});});}var Qo=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.c),Ho),Me.a);function Yo(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,s,u,c,l,d,f;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return[4,qo(r,t,i).runInContext(e.runtime)];case 1:return n=o.sent(),s=n.transform,u=n.field,c=n.idField,l={isoLevel:i.probeRadius,scalarField:u,idField:c},[4,Object(za.b)(l,a).runAsChild(e.runtime)];case 2:return d=o.sent(),Qe.a.transform(d,s),e.webgl&&!e.webgl.isWebGL2&&Qe.a.uniformTriangleGroup(d),f=D.g.expand(Object(D.g)(),t.boundary.sphere,i.probeRadius),d.setBoundingSphere(f),[2,d];}});});}function Xo(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Qo),createGeometry:Yo,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.probeRadius!==r.probeRadius&&(e.createGeometry=!0),t.probePositions!==r.probePositions&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0);}},e);}var Ko=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.a),Ho),Me.a),{sizeFactor:d.ParamDefinition.Numeric(1.5,{min:0,max:10,step:.1})});function Zo(e,t,r,n,i,a){return Object(o.__awaiter)(this,void 0,void 0,function(){var n,s,u,c,l,d,f;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return[4,qo(r,t,i).runInContext(e.runtime)];case 1:return n=o.sent(),s=n.transform,u=n.field,c=n.idField,l={isoLevel:i.probeRadius,scalarField:u,idField:c},[4,Object(za.a)(l,a).runAsChild(e.runtime)];case 2:return d=o.sent(),wo.a.transform(d,s),f=D.g.expand(Object(D.g)(),t.boundary.sphere,i.probeRadius),d.setBoundingSphere(f),[2,d];}});});}function Jo(e){return Object(xe.b)({defaultProps:d.ParamDefinition.getDefaultValues(Ko),createGeometry:Zo,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){t.resolution!==r.resolution&&(e.createGeometry=!0),t.probeRadius!==r.probeRadius&&(e.createGeometry=!0),t.probePositions!==r.probePositions&&(e.createGeometry=!0),t.ignoreHydrogens!==r.ignoreHydrogens&&(e.createGeometry=!0),t.includeParent!==r.includeParent&&(e.createGeometry=!0);}},e);}var $o={\"molecular-surface-mesh\":function molecularSurfaceMesh(e,t){return Object(gt.a)(\"Molecular surface mesh\",e,t,Xo);},\"molecular-surface-wireframe\":function molecularSurfaceWireframe(e,t){return Object(gt.a)(\"Molecular surface wireframe\",e,t,Jo);}},es=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},Qo),Ko),{visuals:d.ParamDefinition.MultiSelect([\"molecular-surface-mesh\"],d.ParamDefinition.objectToOptions($o))});var ts=Object(bt.b)({name:\"molecular-surface\",label:\"Molecular Surface\",description:\"Displays a molecular surface.\",factory:function factory(e,t){return se.a.createMulti(\"Molecular Surface\",e,t,bt.c,$o);},getParams:function getParams(e,t){return d.ParamDefinition.clone(es);},defaultValues:d.ParamDefinition.getDefaultValues(es),defaultColorTheme:{name:\"chain-id\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),rs=Object(o.__assign)(Object(o.__assign)({},xe.c),{sizeFactor:d.ParamDefinition.Numeric(1,{min:0,max:2,step:.1}),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo)});function ns(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(rs),createGeometry:is,createLocationIterator:as,getLoci:os,eachLocation:ss,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail;}},e);}function is(e,t,r,n,i,a){if(!function(e){if(A.Unit.Traits.is(e.traits,1))return!1;if(A.Unit.Traits.is(e.traits,2))return!1;if(A.Unit.isCoarse(e))return!0;if(0===e.elements.length)return!1;e.model.atomicHierarchy.derived.residue.moleculeType;var t=e.residueIndex[e.elements[0]],r=e.model.atomicHierarchy.derived.residue.moleculeType[t];return 3!==r&&2!==r;}(t))return Qe.a.createEmpty(a);var o=i.detail,s=i.sizeFactor,u=we.a.createState(256,128,a),c=t.principalAxes.boxAxes,l=c.origin,d=c.dirA,f=c.dirB,p=D.a.size(Object(M.Vec3)(),c);M.Vec3.scale(p,p,s/2);var m=M.Vec3.create(p[2],p[1],p[0]);u.currentGroup=0,Object(Sa.a)(u,l,d,f,m,o+1);var h=we.a.getMesh(u),g=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return h.setBoundingSphere(g),h;}function as(e){var t=e.group,r=e.structure,n=t.units.length,i=A.StructureElement.Location.create(r);return Object(je.a)(1,n,function(e,r){var n=t.units[r];return i.unit=n,i.element=n.elements[e],i;});}function os(e,t,r){var n=e.objectId,i=e.instanceId;if(r===n){var a=t.structure,o=t.group.units[i],s=ge.OrderedSet.ofBounds(0,o.elements.length);return A.StructureElement.Loci(a,[{unit:o,indices:s}]);}return re.EmptyLoci;}function ss(e,t,r){var n=!1;if(!A.StructureElement.Loci.is(e))return!1;var i=t.structure,a=t.group;if(!A.Structure.areEquivalent(e.structure,i))return!1;for(var o=a.elements.length,s=0,u=e.elements;s<u.length;s++){var c=u[s],l=a.unitIndexMap.get(c.unit.id);void 0!==l&&ge.OrderedSet.size(c.indices)===o&&r(ge.Interval.ofSingleton(l))&&(n=!0);}return n;}var us={\"orientation-ellipsoid-mesh\":function orientationEllipsoidMesh(e,t){return Object(gt.a)(\"Orientation ellipsoid mesh\",e,t,ns);}},cs=Object(o.__assign)(Object(o.__assign)({},rs),{visuals:d.ParamDefinition.MultiSelect([\"orientation-ellipsoid-mesh\"],d.ParamDefinition.objectToOptions(us))});var ls,ds=Object(bt.b)({name:\"orientation\",label:\"Orientation\",description:\"Displays orientation ellipsoids for polymer chains.\",factory:function factory(e,t){return se.a.createMulti(\"Orientation\",e,t,bt.c,us);},getParams:function getParams(e,t){return d.ParamDefinition.clone(cs);},defaultValues:d.ParamDefinition.getDefaultValues(cs),defaultColorTheme:{name:\"chain-id\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),fs=r(256);(ls||(ls={})).create=function(e,t,r){void 0===e&&(e=2048),void 0===t&&(t=1024);var n=y.a.create(Float32Array,3,t,r?r.centerBuffer.ref.value:e),i=y.a.create(Float32Array,1,t,r?r.groupBuffer.ref.value:e);return{add:function add(e,t,r,a){y.a.add3(n,e,t,r),y.a.add(i,a);},getPoints:function getPoints(){var e=y.a.compact(n,!0),t=y.a.compact(i,!0);return fs.a.create(e,t,n.elementCount,r);}};};var ps=Object(o.__assign)(Object(o.__assign)({},xe.e),{pointSizeAttenuation:d.ParamDefinition.Boolean(!1),ignoreHydrogens:d.ParamDefinition.Boolean(!1),traceOnly:d.ParamDefinition.Boolean(!1)});function ms(e,t,r,n,i,a){for(var o=i.ignoreHydrogens,s=i.traceOnly,u=t.elements,c=u.length,l=ls.create(c,c/10,a),d=t.conformation.invariantPosition,f=M.Vec3.zero(),p=0;p<c;++p)o&&Object(Me.k)(t,u[p])||s&&!Object(Me.l)(t,u[p])||(d(u[p],f),l.add(f[0],f[1],f[2],p));var m=l.getPoints(),h=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return m.setBoundingSphere(h),m;}function hs(e){return Object(xe.f)({defaultProps:d.ParamDefinition.getDefaultValues(ps),createGeometry:ms,createLocationIterator:De.fromGroup,getLoci:Re,eachLocation:Ve,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.ignoreHydrogens!==r.ignoreHydrogens||t.traceOnly!==r.traceOnly;}},e);}var gs={\"element-point\":function elementPoint(e,t){return Object(gt.a)(\"Points\",e,t,hs);}},vs=Object(o.__assign)({},ps);var bs=Object(bt.b)({name:\"point\",label:\"Point\",description:\"Displays elements (atoms, coarse spheres) as spheres.\",factory:function factory(e,t){return se.a.createMulti(\"Point\",e,t,bt.c,gs);},getParams:function getParams(e,t){return d.ParamDefinition.clone(vs);},defaultValues:d.ParamDefinition.getDefaultValues(vs),defaultColorTheme:{name:\"element-symbol\"},defaultSizeTheme:{name:\"physical\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),ys={sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),detail:d.ParamDefinition.Numeric(0,{min:0,max:3,step:1},Fe.a.CustomQualityParamInfo),linearSegments:d.ParamDefinition.Numeric(8,{min:1,max:48,step:1},Fe.a.CustomQualityParamInfo),radialSegments:d.ParamDefinition.Numeric(16,{min:2,max:56,step:2},Fe.a.CustomQualityParamInfo)},_s=(d.ParamDefinition.getDefaultValues(ys),Object(M.Vec3)());function Ss(e,t,r,n,i,a){var o=t.polymerElements.length;if(!o)return Qe.a.createEmpty(a);for(var s=i.sizeFactor,u=i.detail,c=i.linearSegments,l=i.radialSegments,d=c*l*o+(l+1)*o*2,f=we.a.createState(d,d/10,a),p=Yr(c),m=p.curvePoints,h=p.normalVectors,g=p.binormalVectors,v=p.widthValues,b=p.heightValues,y=0,_=Nr(t,r);_.hasNext;){var S=_.move();f.currentGroup=y;var O=Object(Xe.isNucleic)(S.moleculeType)?.3:.5;Xr(p,S,Xe.SecondaryStructureType.is(S.secStrucType,2)?.9:.5,O);var x=S.secStrucFirst||S.coarseBackboneFirst||S.first,C=S.secStrucLast||S.coarseBackboneLast||S.last,w=n.size.size(S.centerPrev)*s,P=n.size.size(S.center)*s,j=n.size.size(S.centerNext)*s;cn(p,w,P,j,w,P,j,O);var E=c;if(S.initial){var A=c-(E=Math.max(Math.round(c*O),1));m.copyWithin(0,3*A),g.copyWithin(0,3*A),h.copyWithin(0,3*A),v.copyWithin(0,3*A),b.copyWithin(0,3*A),M.Vec3.fromArray(_s,m,3),M.Vec3.normalize(_s,M.Vec3.sub(_s,S.p2,_s)),M.Vec3.scaleAndAdd(_s,S.p2,_s,2*P),M.Vec3.toArray(_s,m,0);}else S.final&&(E=Math.max(Math.round(c*(1-O)),1),M.Vec3.fromArray(_s,m,3*E-3),M.Vec3.normalize(_s,M.Vec3.sub(_s,S.p2,_s)),M.Vec3.scaleAndAdd(_s,S.p2,_s,2*P),M.Vec3.toArray(_s,m,3*E));!0===S.initial&&!0===S.final?Object(Pe.a)(f,S.p2,2*P,u):2===l?fa(f,m,h,g,E,v,b,0):4===l?Xi(f,m,h,g,E,v,b,0,x,C):ra(f,m,h,g,E,l,v,b,1,x,C),++y;}var T=we.a.getMesh(f),I=D.g.expand(Object(D.g)(),t.boundary.sphere,1*i.sizeFactor);return T.setBoundingSphere(I),T;}var Os=Object(o.__assign)(Object(o.__assign)({},xe.c),ys);function xs(e){return Object(xe.d)({defaultProps:d.ParamDefinition.getDefaultValues(Os),createGeometry:Ss,createLocationIterator:ln.fromGroup,getLoci:hn,eachLocation:yn,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.detail!==r.detail||t.linearSegments!==r.linearSegments||t.radialSegments!==r.radialSegments;}},e);}var Cs={\"polymer-tube\":function polymerTube(e,t){return Object(gt.a)(\"Polymer tube mesh\",e,t,xs);},\"polymer-gap\":function polymerGap(e,t){return Object(gt.a)(\"Polymer gap cylinder\",e,t,Ii);}},ws=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},Os),Di),{sizeFactor:d.ParamDefinition.Numeric(.2,{min:0,max:10,step:.01}),visuals:d.ParamDefinition.MultiSelect([\"polymer-tube\",\"polymer-gap\"],d.ParamDefinition.objectToOptions(Cs))});var Ps=Object(bt.b)({name:\"putty\",label:\"Putty\",description:\"Displays a tube smoothly following the trace atoms of polymers.\",factory:function factory(e,t){return se.a.createMulti(\"Putty\",e,t,bt.c,Cs);},getParams:function getParams(e,t){var r=d.ParamDefinition.clone(ws),n=!1,i=!1;return t.units.forEach(function(e){!n&&A.Unit.isAtomic(e)&&e.nucleotideElements.length&&(n=!0),!i&&e.gapElements.length&&(i=!0);}),r.visuals.defaultValue=[\"polymer-tube\"],i&&r.visuals.defaultValue.push(\"polymer-gap\"),r;},defaultValues:d.ParamDefinition.getDefaultValues(ws),defaultColorTheme:{name:\"chain-id\"},defaultSizeTheme:{name:\"uncertainty\"},isApplicable:function isApplicable(e){return e.polymerResidueCount>0;},ensureCustomProperties:{attach:function attach(e,t){return Lr.a.attach(e,t,void 0,!0);},detach:function detach(e){return Lr.a.ref(e,!1);}}}),js={\"element-sphere\":function elementSphere(e,t){return Object(gt.a)(\"Sphere mesh\",e,t,ze(e.webgl));}},Es=Object(o.__assign)({},Ue);var As=Object(bt.b)({name:\"spacefill\",label:\"Spacefill\",description:\"Displays atomic/coarse elements as spheres.\",factory:function factory(e,t){return se.a.createMulti(\"Spacefill\",e,t,bt.c,js);},getParams:function getParams(e,t){return d.ParamDefinition.clone(Es);},defaultValues:d.ParamDefinition.getDefaultValues(Es),defaultColorTheme:{name:\"element-symbol\"},defaultSizeTheme:{name:\"physical\"},isApplicable:function isApplicable(e){return e.elementCount>0;}});function Ts(e,t,r,n,i,a){if(!A.Unit.isAtomic(t))return wo.a.createEmpty(a);var o=A.StructureElement.Location.create(r,t),s=t.elements,u=t.bonds,c=u.edgeCount,l=u.a,d=u.b,f=u.edgeProps,p=u.offset,m=f.order,h=f.flags,g=i.sizeFactor,v=i.ignoreHydrogens,b=i.includeTypes,y=i.excludeTypes,_=Xe.BondType.fromNames(b),S=Xe.BondType.fromNames(y),O=v?function(e){return Object(Me.k)(t,s[l[e]])||Object(Me.k)(t,s[d[e]]);}:function(){return!1;};if(!c)return wo.a.createEmpty(a);var x=M.Vec3.zero(),C=t.conformation.invariantPosition,w={linkCount:2*c,referencePosition:function referencePosition(e){var t,r,n=l[e],i=d[e];n>i&&(n=(t=[i,n])[0],i=t[1]),p[n+1]-p[n]==1&&(n=(r=[i,n])[0],i=r[1]);for(var a=p[n],o=p[n+1];a<o;++a){var u=d[a];if(u!==i&&u!==n)return C(s[u],x);}for(a=p[i],o=p[i+1];a<o;++a){var c=l[a];if(c!==n&&c!==i)return C(s[c],x);}return null;},position:function position(e,t,r){C(s[l[r]],e),C(s[d[r]],t);},style:function style(e){var t=m[e],r=be.a.create(h[e]);return Xe.BondType.is(r,2)||Xe.BondType.is(r,4)?Ye.c.Dashed:2===t?Ye.c.Double:3===t?Ye.c.Triple:Ye.c.Solid;},radius:function radius(e){o.element=s[l[e]];var t=n.size.size(o);o.element=s[d[e]];var r=n.size.size(o);return Math.min(t,r)*g;},ignore:function ignore(e){return O(e)||et(_,S,h[e]);}},P=Object(Ye.e)(e,w,i,a),j=D.g.expand(Object(D.g)(),t.boundary.sphere,1*g);return P.setBoundingSphere(j),P;}var Ds=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},xe.a),$e),{ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function Is(e){return Object(xe.b)({defaultProps:d.ParamDefinition.getDefaultValues(Ds),createGeometry:Ts,createLocationIterator:qe.fromGroup,getLoci:tt,eachLocation:rt,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||!Object(be.g)(t.includeTypes,r.includeTypes)||!Object(be.g)(t.excludeTypes,r.excludeTypes);}},e);}var Ms=new A.Bond.ElementBondIterator();function ks(e,t,r,n){for(Ms.setElement(t,r,n);Ms.hasNext;){var i=Ms.move();return i.otherUnit.conformation.position(i.otherUnit.elements[i.otherIndex],e),e;}return null;}var Bs=Object(M.Vec3)(),Vs=A.StructureElement.Location.create(void 0);function Rs(e,t,r,n,i){var a=t.interUnitBonds,o=a.edgeCount,s=a.edges,u=n.sizeFactor,c=n.ignoreHydrogens,l=n.includeTypes,d=n.excludeTypes,f=Xe.BondType.fromNames(l),p=Xe.BondType.fromNames(d),m=c?function(e){var t=s[e],r=t.unitA,n=t.unitB;return Object(Me.k)(r,r.elements[t.indexA])||Object(Me.k)(n,n.elements[t.indexB]);}:function(){return!1;};if(!o)return wo.a.createEmpty(i);var h={linkCount:o,referencePosition:function referencePosition(e){var r,n,i,a,o=s[e];if(o.unitA.id<o.unitB.id)r=o.unitA,n=o.unitB,i=o.indexA,a=o.indexB;else{if(!(o.unitA.id>o.unitB.id))throw new Error(\"same units in createInterUnitBondCylinderMesh\");r=o.unitB,n=o.unitA,i=o.indexB,a=o.indexA;}return ks(Bs,t,r,i)||ks(Bs,t,n,a);},position:function position(e,t,r){var n=s[r],i=n.unitA,a=n.unitB;i.conformation.position(i.elements[n.indexA],e),a.conformation.position(a.elements[n.indexB],t);},style:function style(e){var t=s[e].props.order,r=be.a.create(s[e].props.flag);return Xe.BondType.is(r,2)||Xe.BondType.is(r,4)?Ye.c.Dashed:2===t?Ye.c.Double:3===t?Ye.c.Triple:Ye.c.Solid;},radius:function radius(e){var n=s[e];Vs.structure=t,Vs.unit=n.unitA,Vs.element=n.unitA.elements[n.indexA];var i=r.size.size(Vs);Vs.unit=n.unitB,Vs.element=n.unitB.elements[n.indexB];var a=r.size.size(Vs);return Math.min(i,a)*u;},ignore:function ignore(e){return m(e)||et(f,p,s[e].props.flag);}};return Object(Ye.e)(e,h,n,i);}var Ls=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},ut.a),$e),{ignoreHydrogens:d.ParamDefinition.Boolean(!1)});function Ns(e){return Object(ut.b)({defaultProps:d.ParamDefinition.getDefaultValues(Ls),createGeometry:Rs,createLocationIterator:qe.fromStructure,getLoci:nt,eachLocation:it,setUpdateState:function setUpdateState(e,t,r){e.createGeometry=t.sizeFactor!==r.sizeFactor||t.linkScale!==r.linkScale||t.linkSpacing!==r.linkSpacing||t.ignoreHydrogens!==r.ignoreHydrogens||!Object(be.g)(t.includeTypes,r.includeTypes)||!Object(be.g)(t.excludeTypes,r.excludeTypes);}},e);}var Fs={\"intra-bond\":function intraBond(e,t){return Object(gt.a)(\"Intra-unit bond line\",e,t,Is);},\"inter-bond\":function interBond(e,t){return Object(vt.a)(\"Inter-unit bond line\",e,t,Ns);}},Us=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},Ds),Ls),{sizeFactor:d.ParamDefinition.Numeric(1,{min:.01,max:10,step:.01}),unitKinds:Object(yt.i)([\"atomic\"]),visuals:d.ParamDefinition.MultiSelect([\"intra-bond\",\"inter-bond\"],d.ParamDefinition.objectToOptions(Fs))});var zs=Object(bt.b)({name:\"line\",label:\"Line\",description:\"Displays bonds as lines.\",factory:function factory(e,t){return se.a.createMulti(\"Line\",e,t,bt.c,Fs);},getParams:function getParams(e,t){return d.ParamDefinition.clone(Us);},defaultValues:d.ParamDefinition.getDefaultValues(Us),defaultColorTheme:{name:\"element-symbol\"},defaultSizeTheme:{name:\"uniform\"},isApplicable:function isApplicable(e){return e.elementCount>0;}}),Hs=function(e){function t(){var r=e.call(this)||this;return Object(O.c)(t.BuiltIn,function(e,t){if(e.name!==t)throw new Error(\"Fix BuiltInStructureRepresentations to have matching names. \"+e.name+\" \"+t);r.add(e);}),r;}return Object(o.__extends)(t,e),t;}(se.b);(Hs||(Hs={})).BuiltIn={cartoon:_a,\"ball-and-stick\":Ot,carbohydrate:Dr,ellipsoid:Aa,\"gaussian-surface\":Do,label:Uo,line:zs,\"molecular-surface\":ts,orientation:ds,point:bs,putty:Ps,spacefill:As};var Gs=r(379),qs=r(196),Ws=r(150),Qs=r(24),Ys=r(177),Xs=r(84),Ks=r(253),Zs=r(180),Js=r(170),$s=r(71),eu=r(95),tu=r(26),ru=[[\"full\",\"Full\"],[\"hidden\",\"Hidden\"]],nu={isExpanded:d.ParamDefinition.Boolean(!1),showControls:d.ParamDefinition.Boolean(!0),regionState:d.ParamDefinition.Group({left:d.ParamDefinition.Select(\"full\",[[\"full\",\"Full\"],[\"collapsed\",\"Collapsed\"],[\"hidden\",\"Hidden\"]]),top:d.ParamDefinition.Select(\"full\",ru),right:d.ParamDefinition.Select(\"full\",ru),bottom:d.ParamDefinition.Select(\"full\",ru)}),controlsDisplay:d.ParamDefinition.Value(\"outside\",{isHidden:!0})},iu=function(e){function t(t){var r=e.call(this,Object(o.__assign)(Object(o.__assign)({},d.ParamDefinition.getDefaultValues(nu)),t.spec.layout&&t.spec.layout.initial))||this;return r.context=t,r.events={updated:r.ev()},r.rootState=void 0,tu.PluginCommands.Layout.Update.subscribe(t,function(e){return r.updateProps(e.state);}),\"undefined\"!=typeof document&&(r.expandedViewport=document.createElement(\"meta\"),r.expandedViewport.name=\"viewport\",r.expandedViewport.content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\"),r;}return Object(o.__extends)(t,e),t.prototype.updateProps=function(e){var t=!!this.state.isExpanded;this.updateState(e),this.root&&\"boolean\"==typeof e.isExpanded&&e.isExpanded!==t&&this.handleExpand(),this.events.updated.next();},t.prototype.setProps=function(e){this.updateState(e);},t.prototype.setRoot=function(e){this.root=e,this.state.isExpanded&&this.handleExpand();},t.prototype.getScrollElement=function(){return document.scrollingElement?document.scrollingElement:document.documentElement?document.documentElement:document.body;},t.prototype.handleExpand=function(){try{var e=document.getElementsByTagName(\"body\")[0],t=document.getElementsByTagName(\"head\")[0];if(!e||!t||!this.root)return;if(this.state.isExpanded){for(var r=t.children,n=[],i=!1,a=0;a<r.length;a++)r[a]===this.expandedViewport?i=!0:\"viewport\"===(r[a].name||\"\").toLowerCase()&&n.push(r[a]);for(var o=0,s=n;o<s.length;o++){var u=s[o];t.removeChild(u);}i||t.appendChild(this.expandedViewport);var c=e.style,l=(h=this.getScrollElement()).scrollLeft,d=h.scrollTop;this.rootState={top:c.top,bottom:c.bottom,right:c.right,left:c.left,scrollTop:d,scrollLeft:l,position:c.position,overflow:c.overflow,viewports:n,zIndex:this.root.style.zIndex,width:c.width,height:c.height,maxWidth:c.maxWidth,maxHeight:c.maxHeight,margin:c.margin,marginLeft:c.marginLeft,marginRight:c.marginRight,marginTop:c.marginTop,marginBottom:c.marginBottom},c.overflow=\"hidden\",c.position=\"fixed\",c.top=\"0\",c.bottom=\"0\",c.right=\"0\",c.left=\"0\",c.width=\"100%\",c.height=\"100%\",c.maxWidth=\"100%\",c.maxHeight=\"100%\",c.margin=\"0\",c.marginLeft=\"0\",c.marginRight=\"0\",c.marginTop=\"0\",c.marginBottom=\"0\";}else{for(r=t.children,a=0;a<r.length;a++)if(r[a]===this.expandedViewport){t.removeChild(this.expandedViewport);break;}if(this.rootState){for(var f=this.rootState,p=0,m=f.viewports;p<m.length;p++){u=m[p];t.appendChild(u);}var h;(c=e.style).top=f.top,c.bottom=f.bottom,c.left=f.left,c.right=f.right,c.width=f.width,c.height=f.height,c.maxWidth=f.maxWidth,c.maxHeight=f.maxHeight,c.margin=f.margin,c.marginLeft=f.marginLeft,c.marginRight=f.marginRight,c.marginTop=f.marginTop,c.marginBottom=f.marginBottom,c.position=f.position,c.overflow=f.overflow||\"\",(h=this.getScrollElement()).scrollTop=f.scrollTop,h.scrollLeft=f.scrollLeft,this.rootState=void 0,this.root.style.zIndex=f.zIndex;}}}catch(e){var g=\"Layout change error, you might have to reload the page.\";this.context.log.error(g),console.error(g,e);}},t;}(de.b),au=r(372),ou=function(){function e(e){var t=this;this.plugin=e,this.ev=Zs.RxEventHelper.create(),this.events={updated:this.ev(),removed:this.ev()},this.root=new Map(),this.tracked=new Map(),e.state.data.events.object.created.subscribe(function(e){t.addMapping(e.state,e.ref,e.obj);}),e.state.data.events.object.removed.subscribe(function(e){t.removeMapping(e.ref)&&t.events.removed.next({ref:e.ref,obj:e.obj});}),e.state.data.events.object.updated.subscribe(function(e){t.updateMapping(e.state,e.ref,e.oldObj,e.obj)&&t.events.updated.next({ref:e.ref,oldObj:e.oldObj,obj:e.obj});});}return e.prototype.getDecorator=function(e){var t=this.plugin.state.data.tree,r=t.children.get(e);if(1!==r.size)return e;var n=r.first();return t.transforms.get(n).transformer.definition.isDecorator?this.getDecorator(n):e;},e.prototype.get=function(e,t){void 0===t&&(t=!1);var r=this.root.get(e);if(r)return t?this.plugin.state.data.cells.get(r.ref):this.plugin.state.data.cells.get(this.getDecorator(r.ref));},e.prototype.addMapping=function(e,t,r){if(!v.a.Molecule.Structure.is(r))return!1;if(this.tracked.set(t,r.data),this.root.has(r.data)){this.root.get(r.data).count++;}else{var n=e.select(g.StateSelection.Generators.byRef(t).rootOfType([v.a.Molecule.Structure]))[0];n?this.root.set(r.data,{ref:n.transform.ref,count:1}):this.root.set(r.data,{ref:t,count:1});}return!0;},e.prototype.removeMapping=function(e){if(!this.tracked.has(e))return!1;var t=this.tracked.get(e);this.tracked.delete(e);var r=this.root.get(t);return r.count>1?r.count--:this.root.delete(t),!0;},e.prototype.updateMapping=function(e,t,r,n){return!!v.a.Molecule.Structure.is(n)&&(this.removeMapping(t),this.addMapping(e,t,n),!0);},e.prototype.dispose=function(){this.ev.dispose();},e;}(),su=r(83),uu=r(288),cu=function(){function e(){this.ev=Zs.RxEventHelper.create(),this.id=0,this.abortRequests=new Map(),this.currentContext=[],this.events={progress:this.ev(),finished:this.ev()};}return e.prototype.track=function(e,t){var r=this;return function(n){n.canAbort&&n.requestAbort&&r.abortRequests.has(n.root.progress.taskId)&&n.requestAbort(r.abortRequests.get(t));var i=Object(su.b)()-n.root.progress.startedTime;r.events.progress.next({id:e,level:i<250?\"none\":i<1500?\"background\":\"overlay\",progress:n});};},e.prototype.run=function(e,t){return void 0===t&&(t=!1),Object(o.__awaiter)(this,void 0,void 0,function(){var r,n;return Object(o.__generator)(this,function(i){switch(i.label){case 0:r=this.id++,t||0===this.currentContext.length?n={ctx:Object(uu.a)(e,this.track(r,e.id),100),refCount:1}:(n=this.currentContext[this.currentContext.length-1]).refCount++,i.label=1;case 1:return i.trys.push([1,,3,4]),[4,Object(uu.b)(n.ctx,e)];case 2:return[2,i.sent()];case 3:return this.events.finished.next({id:r}),this.abortRequests.delete(e.id),n.refCount--,0===n.refCount&&Object(P.arrayRemoveInPlace)(this.currentContext,n),[7];case 4:return[2];}});});},e.prototype.requestAbort=function(e,t){this.abortRequests.set(e.root.progress.taskId,t);},e.prototype.dispose=function(){this.ev.dispose();},e;}();(cu||(cu={})).testTask=function(e){var t=this;return _.b.create(\"Test\",function(r){return Object(o.__awaiter)(t,void 0,void 0,function(){var t;return Object(o.__generator)(this,function(n){switch(n.label){case 0:t=0,n.label=1;case 1:return t<e?[4,(i=100+200*Math.random(),new Promise(function(e){return setTimeout(e,i);}))]:[3,5];case 2:return n.sent(),r.shouldUpdate?[4,r.update({message:\"Step \"+t,current:t,max:e,isIndeterminate:!1})]:[3,4];case 3:n.sent(),n.label=4;case 4:return t++,[3,1];case 5:return[2];}var i;});});});};var lu=function(e){function t(t){var r=e.call(this,{entries:Object(u.OrderedMap)()})||this;return r.events={changed:r.ev()},r.serialNumber=0,r.serialId=0,tu.PluginCommands.Toast.Show.subscribe(t,function(e){return r.show(e);}),tu.PluginCommands.Toast.Hide.subscribe(t,function(e){return r.hide(r.findByKey(e.key));}),r;}return Object(o.__extends)(t,e),t.prototype.findByKey=function(e){return this.state.entries.find(function(t){return!!t&&t.key===e;});},t.prototype.show=function(e){var t,r=this,n=this.state.entries,i=void 0,a=++this.serialId;e.key&&(i=this.findByKey(e.key))?(void 0!==i.timeout&&clearTimeout(i.timeout),t=i.serialNumber,n=n.remove(i.id)):t=++this.serialNumber,i={id:a,serialNumber:t,key:e.key,title:e.title,message:e.message,timeout:this.timeout(a,e.timeoutMs),hide:function hide(){return r.hideId(a);}},this.updateState({entries:n.set(a,i)})&&this.events.changed.next();},t.prototype.timeout=function(e,t){var r=this;if(void 0!==t)return t<0&&(t=500),setTimeout(function(){var t=r.state.entries.get(e);t.timeout=void 0,r.hide(t);},t);},t.prototype.hideId=function(e){this.hide(this.state.entries.get(e));},t.prototype.hide=function(e){e&&(void 0!==e.timeout&&clearTimeout(e.timeout),e.hide=void 0,this.updateState({entries:this.state.entries.delete(e.id)})&&this.events.changed.next());},t;}(de.b),du=r(332),fu=r(329),pu=r(265),mu=r(283),hu=r(90),gu=function(){function e(e){this.plugin=e,this._params=void 0,this.transparent=this.params.transparent.defaultValue,this.axes={name:\"off\",params:{}},this.currentResolution=this.params.resolution.defaultValue,this.canvas=document.createElement(\"canvas\");}return e.prototype.createParams=function(){var e=Math.min(this.plugin.canvas3d?this.plugin.canvas3d.webgl.maxRenderbufferSize:4096,4096);return{resolution:d.ParamDefinition.MappedStatic(\"viewport\",{viewport:d.ParamDefinition.Group({}),hd:d.ParamDefinition.Group({}),\"full-hd\":d.ParamDefinition.Group({}),\"ultra-hd\":d.ParamDefinition.Group({}),custom:d.ParamDefinition.Group({width:d.ParamDefinition.Numeric(1920,{min:128,max:e,step:1}),height:d.ParamDefinition.Numeric(1080,{min:128,max:e,step:1})},{isFlat:!0})},{options:[[\"viewport\",\"Viewport\"],[\"hd\",\"HD (1280 x 720)\"],[\"full-hd\",\"Full HD (1920 x 1080)\"],[\"ultra-hd\",\"Ultra HD (3840 x 2160)\"],[\"custom\",\"Custom\"]]}),transparent:d.ParamDefinition.Boolean(!1),axes:mu.b.axes};},Object.defineProperty(e.prototype,\"params\",{get:function get(){return this._params?this._params:this._params=this.createParams();},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"values\",{get:function get(){return{transparent:this.transparent,axes:this.axes,resolution:this.currentResolution};},enumerable:!1,configurable:!0}),e.prototype.getCanvasSize=function(){var e,t;return{width:(null===(e=this.plugin.canvas3d)||void 0===e?void 0:e.webgl.gl.drawingBufferWidth)||0,height:(null===(t=this.plugin.canvas3d)||void 0===t?void 0:t.webgl.gl.drawingBufferHeight)||0};},e.prototype.getSize=function(){switch(this.currentResolution.name){case\"viewport\":return this.getCanvasSize();case\"hd\":return{width:1280,height:720};case\"full-hd\":return{width:1920,height:1080};case\"ultra-hd\":return{width:3840,height:2160};default:return{width:this.currentResolution.params.width,height:this.currentResolution.params.height};}},Object.defineProperty(e.prototype,\"imagePass\",{get:function get(){return this._imagePass||(this._imagePass=this.plugin.canvas3d.getImagePass({transparentBackground:this.transparent,drawPass:{cameraHelper:{axes:this.axes}},multiSample:{mode:\"on\",sampleLevel:2},postprocessing:this.plugin.canvas3d.props.postprocessing})),this._imagePass;},enumerable:!1,configurable:!0}),e.prototype.getFilename=function(){var e=this.plugin.state.data.select(g.StateSelection.Generators.rootsOfType(v.a.Molecule.Model)).map(function(e){return e.obj.data;}),t=new Set();return e.forEach(function(e){return t.add(e.entryId.toUpperCase());}),(hu.a.toArray(t).join(\"-\")||\"molstar-image\")+\".png\";},e.prototype.draw=function(e){return Object(o.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,a,s;return Object(o.__generator)(this,function(o){switch(o.label){case 0:return t=this.getSize(),r=t.width,n=t.height,r<=0||n<=0?[2]:[4,e.update(\"Rendering image...\")];case 1:return o.sent(),this.imagePass.setProps({drawPass:{cameraHelper:{axes:this.axes}},transparentBackground:this.transparent,postprocessing:this.plugin.canvas3d.props.postprocessing}),i=this.imagePass.getImageData(r,n),[4,e.update(\"Encoding image...\")];case 2:if(o.sent(),(a=this.canvas).width=i.width,a.height=i.height,!(s=a.getContext(\"2d\")))throw new Error(\"Could not create canvas 2d context\");return s.putImageData(i,0,0),[2];}});});},e.prototype.downloadTask=function(){var e=this;return _.b.create(\"Download Image\",function(t){return Object(o.__awaiter)(e,void 0,void 0,function(){var e;return Object(o.__generator)(this,function(r){switch(r.label){case 0:return this.draw(t),[4,t.update(\"Downloading image...\")];case 1:return r.sent(),[4,Object(du.a)(this.canvas,\"png\")];case 2:return e=r.sent(),Object(fu.a)(e,this.getFilename()),[2];}});});});},e.prototype.downloadCurrent=function(){var e=this;return this.plugin.runTask(_.b.create(\"Download Image\",function(t){return Object(o.__awaiter)(e,void 0,void 0,function(){var e;return Object(o.__generator)(this,function(r){switch(r.label){case 0:return[4,t.update(\"Downloading image...\")];case 1:return r.sent(),[4,Object(du.a)(this.canvas,\"png\")];case 2:return e=r.sent(),Object(fu.a)(e,this.getFilename()),[2];}});});}));},e.prototype.imageData=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){return Object(o.__generator)(this,function(e){switch(e.label){case 0:return[4,this.draw(pu.a)];case 1:return e.sent(),[2,this.canvas.toDataURL()];}});});},e.prototype.download=function(){this.plugin.runTask(this.downloadTask());},e;}(),vu=r(313),bu=r(114),yu=r(364),_u=function(e){function t(t){var r=e.call(this,{params:{current:\"\"},animationState:\"stopped\"})||this;return r.context=t,r.map=new Map(),r.animations=[],r._params=void 0,r.events={updated:r.ev()},r._frame=void 0,r.animate=function(e){return Object(o.__awaiter)(r,void 0,void 0,function(){var t;return Object(o.__generator)(this,function(r){switch(r.label){case 0:return this._frame=void 0,this._current.startedTime<0&&(this._current.startedTime=e),[4,this._current.anim.apply(this._current.state,{lastApplied:this._current.lastTime,current:e-this._current.startedTime},{params:this._current.paramValues,plugin:this.context})];case 1:return\"finished\"===(t=r.sent()).kind?this.stop():\"next\"===t.kind?(this._current.state=t.state,this._current.lastTime=e-this._current.startedTime,\"playing\"===this.state.animationState&&(this._frame=requestAnimationFrame(this.animate))):\"skip\"===t.kind&&\"playing\"===this.state.animationState&&(this._frame=requestAnimationFrame(this.animate)),[2];}});});},r;}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,\"isEmpty\",{get:function get(){return 0===this.animations.length;},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"current\",{get:function get(){return this._current;},enumerable:!1,configurable:!0}),t.prototype.triggerUpdate=function(){this.events.updated.next();},t.prototype.getParams=function(){return this._params||(this._params={current:d.ParamDefinition.Select(this.animations[0]&&this.animations[0].name,this.animations.map(function(e){return[e.name,e.display.name];}),{label:\"Animation\"})}),this._params;},t.prototype.updateParams=function(e){if(!this.isEmpty){this.updateState({params:Object(o.__assign)(Object(o.__assign)({},this.state.params),e)});var t=this.map.get(this.state.params.current),r=t.params(this.context);this._current={anim:t,params:r,paramValues:d.ParamDefinition.getDefaultValues(r),state:{},startedTime:-1,lastTime:0},this.triggerUpdate();}},t.prototype.updateCurrentParams=function(e){this.isEmpty||(this._current.paramValues=Object(o.__assign)(Object(o.__assign)({},this._current.paramValues),e),this.triggerUpdate());},t.prototype.register=function(e){this.map.has(e.name)?this.context.log.error(\"Animation '\"+e.name+\"' is already registered.\"):(this._params=void 0,this.map.set(e.name,e),this.animations.push(e),1===this.animations.length?this.updateParams({current:e.name}):this.triggerUpdate());},t.prototype.play=function(e,t){this.stop(),this.map.has(e.name)||this.register(e),this.updateParams({current:e.name}),this.updateCurrentParams(t),this.start();},t.prototype.start=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){var e;return Object(o.__generator)(this,function(t){switch(t.label){case 0:return this.updateState({animationState:\"playing\"}),this.context.behaviors.state.isAnimating.value||this.context.behaviors.state.isAnimating.next(!0),this.triggerUpdate(),(e=this._current.anim).setup?[4,e.setup(this._current.paramValues,this.context)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._current.lastTime=0,this._current.startedTime=-1,this._current.state=this._current.anim.initialState(e,this.context),requestAnimationFrame(this.animate),[2];}});});},t.prototype.stop=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){var e;return Object(o.__generator)(this,function(t){switch(t.label){case 0:return void 0!==this._frame&&cancelAnimationFrame(this._frame),\"stopped\"===this.state.animationState?[3,3]:(e=this._current.anim).teardown?[4,e.teardown(this._current.paramValues,this.context)]:[3,2];case 1:t.sent(),t.label=2;case 2:this.updateState({animationState:\"stopped\"}),this.triggerUpdate(),t.label=3;case 3:return this.context.behaviors.state.isAnimating.value&&this.context.behaviors.state.isAnimating.next(!1),[2];}});});},Object.defineProperty(t.prototype,\"isAnimating\",{get:function get(){return\"playing\"===this.state.animationState;},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(){return this.current?{state:this.state,current:{paramValues:this._current.paramValues,state:this._current.anim.stateSerialization?this._current.anim.stateSerialization.toJSON(this._current.state):this._current.state}}:{state:this.state};},t.prototype.setSnapshot=function(e){this.isEmpty||(this.updateState({animationState:e.state.animationState}),this.updateParams(e.state.params),e.current&&(this.current.paramValues=e.current.paramValues,this.current.state=this._current.anim.stateSerialization?this._current.anim.stateSerialization.fromJSON(e.current.state):e.current.state,this.triggerUpdate(),\"playing\"===this.state.animationState&&this.resume()));},t.prototype.resume=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){var e;return Object(o.__generator)(this,function(t){switch(t.label){case 0:return this._current.lastTime=0,this._current.startedTime=-1,e=this._current.anim,this.context.behaviors.state.isAnimating.value||this.context.behaviors.state.isAnimating.next(!0),e.setup?[4,e.setup(this._current.paramValues,this.context)]:[3,2];case 1:t.sent(),t.label=2;case 2:return requestAnimationFrame(this.animate),[2];}});});},t;}(de.b),Su=r(380),Ou=r(169),xu=r(292),Cu=function(){function e(e){var t=this;this.spec=e,this.runTask=function(e){return t.tasks.run(e);},this.disposed=!1,this.ev=Zs.RxEventHelper.create(),this.tasks=new cu(),this.state=new au.a(this),this.commands=new eu.b(),this.events={log:this.ev(),task:this.tasks.events,canvas3d:{settingsUpdated:this.ev()}},this.config=new j.PluginConfigManager(this.spec.config),this.canvas3dInit=this.ev.behavior(!1),this.behaviors={state:{isAnimating:this.ev.behavior(!1),isUpdating:this.ev.behavior(!1),isBusy:this.ev.behavior(!1)},interaction:{hover:this.ev.behavior({current:se.a.Loci.Empty,modifiers:Xs.b.None,buttons:0,button:0}),click:this.ev.behavior({current:se.a.Loci.Empty,modifiers:Xs.b.None,buttons:0,button:0}),selectionMode:this.ev.behavior(!1)},labels:{highlight:this.ev.behavior({labels:[]})},layout:{leftPanelTabName:this.ev.behavior(\"root\")},canvas3d:{initialized:this.canvas3dInit.pipe(Object(Ou.a)(function(e){return!!e;}),Object(xu.a)(1))}},this.layout=new iu(this),this.representation={structure:{registry:new Hs(),themes:{colorThemeRegistry:qs.a.createRegistry(),sizeThemeRegistry:Ws.a.createRegistry()}},volume:{registry:new Gs.a(),themes:{colorThemeRegistry:qs.a.createRegistry(),sizeThemeRegistry:Ws.a.createRegistry()}}},this.query={structure:{registry:new te.d()}},this.dataFormats=new ee(),this.builders={data:new h(this),structure:void 0},this.helpers={substructureParent:new ou(this),viewportScreenshot:void 0},this.managers={structure:{hierarchy:new me.StructureHierarchyManager(this),component:new le.StructureComponentManager(this),measurement:new he.a(this),selection:new _e(this),focus:new pe(this)},volume:{hierarchy:new Su.a(this)},interactivity:void 0,camera:new ae(this),animation:new _u(this),snapshot:new yu.a(this),lociLabels:void 0,toast:new lu(this),asset:new bu.AssetManager()},this.customModelProperties=new n.Registry(),this.customStructureProperties=new n.Registry(),this.customParamEditors=new Map(),this.customStructureControls=new Map(),this.genericRepresentationControls=new Map(),this.customState=Object.create(null),this.log={entries:Object(u.List)(),entry:function entry(e){return t.events.log.next(e);},error:function error(e){return t.events.log.next(Ks.a.error(e));},message:function message(e){return t.events.log.next(Ks.a.message(e));},info:function info(e){return t.events.log.next(Ks.a.info(e));},warn:function warn(e){return t.events.log.next(Ks.a.warning(e));}},this.fetch=Ys.a,Object(s.c)(!1),this.events.log.subscribe(function(e){return t.log.entries=t.log.entries.push(e);}),this.initBehaviorEvents(),this.initBuiltInBehavior(),this.initBehaviors(),this.initDataActions(),this.initAnimations(),this.initCustomParamEditors(),this.managers.interactivity=new oe.a(this),this.managers.lociLabels=new ce(this),this.builders.structure=new U(this),this.log.message(\"Mol* Plugin \"+vu.a+\" [\"+vu.b.toLocaleString()+\"]\"),S.b||this.log.message(\"Development mode enabled\"),S.a&&this.log.message(\"Debug mode enabled\");}return e.prototype.build=function(){return this.state.data.build();},e.prototype.initViewer=function(e,t){try{this.layout.setRoot(t),this.spec.layout&&this.spec.layout.initial&&this.layout.setProps(this.spec.layout.initial),this.canvas3d=l.Canvas3D.fromCanvas(e),this.canvas3dInit.next(!0);var r=this.canvas3d.props.renderer;return tu.PluginCommands.Canvas3D.SetSettings(this,{settings:{renderer:Object(o.__assign)(Object(o.__assign)({},r),{backgroundColor:Object(Qs.Color)(16579577)})}}),this.canvas3d.animate(),this.helpers.viewportScreenshot=new gu(this),!0;}catch(e){return this.log.error(\"\"+e),console.error(e),!1;}},Object.defineProperty(e.prototype,\"isBusy\",{get:function get(){return this.behaviors.state.isAnimating.value||this.behaviors.state.isUpdating.value;},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"selectionMode\",{get:function get(){return this.behaviors.interaction.selectionMode.value;},set:function set(e){this.behaviors.interaction.selectionMode.next(e);},enumerable:!1,configurable:!0}),e.prototype.dataTransaction=function(e,t){return this.runTask(this.state.data.transaction(e,t));},e.prototype.requestTaskAbort=function(e,t){this.tasks.requestAbort(e,t);},e.prototype.clear=function(e){var t;return void 0===e&&(e=!1),e&&(null===(t=this.canvas3d)||void 0===t||t.setProps(l.DefaultCanvas3DParams)),tu.PluginCommands.State.RemoveObject(this,{state:this.state.data,ref:g.StateTransform.RootRef});},e.prototype.dispose=function(){var e;this.disposed||(this.commands.dispose(),null===(e=this.canvas3d)||void 0===e||e.dispose(),this.ev.dispose(),this.state.dispose(),this.tasks.dispose(),this.layout.dispose(),this.helpers.substructureParent.dispose(),Object(O.c)(this.managers,function(e){var t,r;return null===(r=null===(t=e)||void 0===t?void 0:t.dispose)||void 0===r?void 0:r.call(t);}),Object(O.c)(this.managers.structure,function(e){var t,r;return null===(r=null===(t=e)||void 0===t?void 0:t.dispose)||void 0===r?void 0:r.call(t);}),this.disposed=!0);},e.prototype.initBehaviorEvents=function(){var e=this;Object(c.a)(this.state.data.behaviors.isUpdating,this.state.behaviors.behaviors.isUpdating).subscribe(function(t){e.behaviors.state.isUpdating.value!==t&&e.behaviors.state.isUpdating.next(t);});var t=this.config.get(j.PluginConfig.General.IsBusyTimeoutMs)||750,r=this.behaviors.state.isBusy,n=void 0,i=function i(){r.value||r.next(!0);},a=function a(){void 0!==n&&clearTimeout(n),n=void 0;};Object(c.a)(this.behaviors.state.isUpdating,this.behaviors.state.isAnimating).subscribe(function(o){var s=e.behaviors.state.isUpdating.value,u=e.behaviors.state.isAnimating.value;s||u?r.value||(a(),n=setTimeout(i,t)):(a(),r.next(!1));}),this.behaviors.interaction.selectionMode.subscribe(function(t){var r;t||null===(r=e.managers.interactivity)||void 0===r||r.lociSelects.deselectAll();});},e.prototype.initBuiltInBehavior=function(){var e=this;Js.BuiltInPluginBehaviors.State.registerDefault(this),Js.BuiltInPluginBehaviors.Representation.registerDefault(this),Js.BuiltInPluginBehaviors.Camera.registerDefault(this),Js.BuiltInPluginBehaviors.Misc.registerDefault(this),Object(c.a)(this.state.data.events.log,this.state.behaviors.events.log).subscribe(function(t){return e.events.log.next(t);});},e.prototype.initBehaviors=function(){return Object(o.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,a,s,u,c;return Object(o.__generator)(this,function(o){switch(o.label){case 0:for(e=this.state.behaviors.build(),t=0,r=Object.keys($s.a.Categories);t<r.length;t++)c=r[t],e.toRoot().apply($s.a.CreateCategory,{label:$s.a.Categories[c]},{ref:c,state:{isLocked:!0}});for(n=0,i=this.spec.behaviors;n<i.length;n++)u=i[n],\"custom-props\"===(c=$s.a.getCategoryId(u.transformer))&&e.to($s.a.getCategoryId(u.transformer)).apply(u.transformer,u.defaultParams,{ref:u.transformer.id});return[4,this.runTask(this.state.behaviors.updateTree(e,{doNotUpdateCurrent:!0,doNotLogTiming:!0}))];case 1:for(o.sent(),e=this.state.behaviors.build(),a=0,s=this.spec.behaviors;a<s.length;a++)u=s[a],\"custom-props\"!==(c=$s.a.getCategoryId(u.transformer))&&e.to($s.a.getCategoryId(u.transformer)).apply(u.transformer,u.defaultParams,{ref:u.transformer.id});return[4,this.runTask(this.state.behaviors.updateTree(e,{doNotUpdateCurrent:!0,doNotLogTiming:!0}))];case 2:return o.sent(),[2];}});});},e.prototype.initDataActions=function(){for(var e=0,t=this.spec.actions;e<t.length;e++){var r=t[e];this.state.data.actions.add(r.action);}},e.prototype.initAnimations=function(){if(this.spec.animations)for(var e=0,t=this.spec.animations;e<t.length;e++){var r=t[e];this.managers.animation.register(r);}},e.prototype.initCustomParamEditors=function(){if(this.spec.customParamEditors)for(var e=0,t=this.spec.customParamEditors;e<t.length;e++){var r=t[e],n=r[0],i=r[1];this.customParamEditors.set(n.id,i);}},e;}();},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"Plugin\",function(){return J;}),r.d(t,\"PluginContextContainer\",function(){return $;}),r.d(t,\"ControlsWrapper\",function(){return te;}),r.d(t,\"DefaultViewport\",function(){return re;}),r.d(t,\"Log\",function(){return ne;});var n=r(0),i=r(3),a=r(5),o=r(32),s=r(270),u=r(158),c=r(26),l=r(13),d=r(19),f=r(67),p=r(387),m=r(284),h=r(376),g=r(189),v=r(14),b=function(e){function t(){var t,r=e.apply(this,arguments)||this;return r.state={tab:r.plugin.behaviors.layout.leftPanelTabName.value},r.set=function(e){if(r.state.tab===e)return r.setState({tab:\"none\"},function(){return r.plugin.behaviors.layout.leftPanelTabName.next(\"none\");}),void c.PluginCommands.Layout.Update(r.plugin,{state:{regionState:Object(n.__assign)(Object(n.__assign)({},r.plugin.layout.state.regionState),{left:\"collapsed\"})}});r.setState({tab:e},function(){return r.plugin.behaviors.layout.leftPanelTabName.next(e);}),\"full\"!==r.plugin.layout.state.regionState.left&&c.PluginCommands.Layout.Update(r.plugin,{state:{regionState:Object(n.__assign)(Object(n.__assign)({},r.plugin.layout.state.regionState),{left:\"full\"})}});},r.tabs={none:i.createElement(i.Fragment,null),root:i.createElement(i.Fragment,null,i.createElement(d.SectionHeader,{icon:v.HomeOutlinedSvg,title:\"Home\"}),i.createElement(p.StateObjectActions,{state:r.plugin.state.data,nodeRef:l.StateTransform.RootRef,hideHeader:!0,initiallyCollapsed:!0,alwaysExpandFirst:!0}),\"none\"!==(null===(t=r.plugin.spec.components)||void 0===t?void 0:t.remoteState)&&i.createElement(m.RemoteStateSnapshots,{listOnly:!0})),data:i.createElement(i.Fragment,null,i.createElement(d.SectionHeader,{icon:v.AccountTreeOutlinedSvg,title:i.createElement(i.Fragment,null,i.createElement(S,null),\" State Tree\")}),i.createElement(h.StateTree,{state:r.plugin.state.data})),states:i.createElement(m.StateSnapshots,null),settings:i.createElement(i.Fragment,null,i.createElement(d.SectionHeader,{icon:v.TuneSvg,title:\"Plugin Settings\"}),i.createElement(_,null)),help:i.createElement(i.Fragment,null,i.createElement(d.SectionHeader,{icon:v.HelpOutlineSvg,title:\"Help\"}),i.createElement(g.HelpContent,null))},r;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,function(t){e.state.tab!==t&&e.setState({tab:t}),\"none\"===t&&\"collapsed\"!==e.plugin.layout.state.regionState.left&&c.PluginCommands.Layout.Update(e.plugin,{state:{regionState:Object(n.__assign)(Object(n.__assign)({},e.plugin.layout.state.regionState),{left:\"collapsed\"})}});}),this.subscribe(this.plugin.state.data.events.changed,function(t){var r=t.state;\"data\"===e.state.tab&&1===r.cells.size&&e.set(\"root\");});},t.prototype.render=function(){var e=this,t=this.state.tab;return i.createElement(\"div\",{className:\"msp-left-panel-controls\"},i.createElement(\"div\",{className:\"msp-left-panel-controls-buttons\"},i.createElement(d.IconButton,{svg:v.HomeOutlinedSvg,toggleState:\"root\"===t,transparent:!0,onClick:function onClick(){return e.set(\"root\");},title:\"Home\"}),i.createElement(y,{set:this.set}),i.createElement(d.IconButton,{svg:v.SaveOutlinedSvg,toggleState:\"states\"===t,transparent:!0,onClick:function onClick(){return e.set(\"states\");},title:\"Plugin State\"}),i.createElement(d.IconButton,{svg:v.HelpOutlineSvg,toggleState:\"help\"===t,transparent:!0,onClick:function onClick(){return e.set(\"help\");},title:\"Help\"}),i.createElement(\"div\",{className:\"msp-left-panel-controls-buttons-bottom\"},i.createElement(d.IconButton,{svg:v.TuneSvg,toggleState:\"settings\"===t,transparent:!0,onClick:function onClick(){return e.set(\"settings\");},title:\"Settings\"}))),i.createElement(\"div\",{className:\"msp-scrollable-container\"},this.tabs[t]));},t;}(o.PluginUIComponent),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={changed:!1},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"tab\",{get:function get(){return this.plugin.behaviors.layout.leftPanelTabName.value;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.behaviors.layout.leftPanelTabName,function(t){\"data\"===e.tab?e.setState({changed:!1}):e.forceUpdate();}),this.subscribe(this.plugin.state.data.events.changed,function(t){\"data\"!==e.tab&&e.setState({changed:!0});});},t.prototype.render=function(){var e=this;return i.createElement(d.IconButton,{svg:v.AccountTreeOutlinedSvg,toggleState:\"data\"===this.tab,transparent:!0,onClick:function onClick(){return e.props.set(\"data\");},title:\"State Tree\",style:{position:\"relative\"},extraContent:this.state.changed?i.createElement(\"div\",{className:\"msp-left-panel-controls-button-data-dirty\"}):void 0});},t;}(o.PluginUIComponent),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setSettings=function(e){var r;c.PluginCommands.Canvas3D.SetSettings(t.plugin,{settings:(r={},r[e.name]=e.value,r)});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.canvas3d.settingsUpdated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.layout.events.updated,function(){return e.forceUpdate();}),this.subscribe(this.plugin.canvas3d.camera.stateChanged,function(t){void 0===t.radiusMax&&void 0===t.radius||e.forceUpdate();});},t.prototype.render=function(){return i.createElement(i.Fragment,null,this.plugin.canvas3d&&i.createElement(i.Fragment,null,i.createElement(d.SectionHeader,{title:\"Viewport\"}),i.createElement(f.ParameterControls,{params:u.Canvas3DParams,values:this.plugin.canvas3d.props,onChange:this.setSettings})),i.createElement(d.SectionHeader,{title:\"Behavior\"}),i.createElement(h.StateTree,{state:this.plugin.state.behaviors}));},t;}(o.PluginUIComponent),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remove=function(e){e.preventDefault(),c.PluginCommands.State.RemoveObject(t.plugin,{state:t.plugin.state.data,ref:l.StateTransform.RootRef});},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.state.events.cell.created,function(t){t.cell.transform.parent===l.StateTransform.RootRef&&e.forceUpdate();}),this.subscribe(this.plugin.state.events.cell.removed,function(t){t.parent===l.StateTransform.RootRef&&e.forceUpdate();});},t.prototype.render=function(){return 0===this.plugin.state.data.tree.children.get(l.StateTransform.RootRef).size?null:i.createElement(d.IconButton,{svg:v.DeleteOutlinedSvg,onClick:this.remove,title:\"Remove All\",style:{display:\"inline-block\"},small:!0,className:\"msp-no-hover-outline\",transparent:!0});},t;}(o.PluginUIComponent),O=r(8),x=r(84),C=r(4),w=r(60),P=r(388),j=r(6),E=r(40),A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.parentDiv=i.createRef(),t.lastMouseOverSeqIdx=-1,t.highlightQueue=new w.a(),t.lociHighlightProvider=function(e,r){t.props.sequenceWrapper.markResidue(e.loci,r)&&t.updateMarker();},t.lociSelectionProvider=function(e,r){t.props.sequenceWrapper.markResidue(e.loci,r)&&t.updateMarker();},t.contextMenu=function(e){e.preventDefault();},t.mouseDownLoci=void 0,t.mouseDown=function(e){e.stopPropagation();var r=t.getSeqIdx(e),n=t.getLoci(r),i=Object(x.e)(e.nativeEvent),a=Object(x.d)(e.nativeEvent),o=Object(x.f)(e.nativeEvent);t.click(n,i,a,o),t.mouseDownLoci=n;},t.mouseUp=function(e){if(e.stopPropagation(),void 0!==t.mouseDownLoci){var r=t.getSeqIdx(e),n=t.getLoci(r);if(n&&!C.StructureElement.Loci.areEqual(t.mouseDownLoci,n)){var i=Object(x.e)(e.nativeEvent),a=Object(x.d)(e.nativeEvent),o=Object(x.f)(e.nativeEvent),s=t.mouseDownLoci.elements[0],u=n.elements[0],c=Math.min(j.OrderedSet.min(s.indices),j.OrderedSet.min(u.indices)),l=Math.max(j.OrderedSet.max(s.indices),j.OrderedSet.max(u.indices)),d=C.StructureElement.Loci(n.structure,[{unit:s.unit,indices:j.OrderedSet.ofRange(c,l)}]);t.click(C.StructureElement.Loci.subtract(d,t.mouseDownLoci),i,a,o);}t.mouseDownLoci=void 0;}},t.location=C.StructureElement.Location.create(void 0),t.mouseMove=function(e){e.stopPropagation();var r=Object(x.e)(e.nativeEvent),i=Object(x.d)(e.nativeEvent),a=Object(x.f)(e.nativeEvent),o=e.target;if(!o||!o.getAttribute){if(-1===t.lastMouseOverSeqIdx)return;return t.lastMouseOverSeqIdx=-1,void t.highlightQueue.next({seqIdx:-1,buttons:r,button:i,modifiers:a});}var s=o.hasAttribute(\"data-seqid\")?+o.getAttribute(\"data-seqid\"):-1;if(t.lastMouseOverSeqIdx!==s)if(t.lastMouseOverSeqIdx=s,void 0!==t.mouseDownLoci){var u=t.getLoci(s);t.hover(u,0,0,Object(n.__assign)(Object(n.__assign)({},a),{shift:!0}));}else t.highlightQueue.next({seqIdx:s,buttons:r,button:i,modifiers:a});},t.mouseLeave=function(e){if(e.stopPropagation(),t.mouseDownLoci=void 0,-1!==t.lastMouseOverSeqIdx){t.lastMouseOverSeqIdx=-1;var r=Object(x.e)(e.nativeEvent),n=Object(x.d)(e.nativeEvent),i=Object(x.f)(e.nativeEvent);t.highlightQueue.next({seqIdx:-1,buttons:r,button:n,modifiers:i});}},t;}return Object(n.__extends)(t,e),Object.defineProperty(t.prototype,\"sequenceNumberPeriod\",{get:function get(){return void 0!==this.props.sequenceNumberPeriod?this.props.sequenceNumberPeriod:this.props.sequenceWrapper.length>10?10:this.getSequenceNumber(this.props.sequenceWrapper.length-1).length>1?5:1;},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;this.plugin.managers.interactivity.lociHighlights.addProvider(this.lociHighlightProvider),this.plugin.managers.interactivity.lociSelects.addProvider(this.lociSelectionProvider),this.subscribe(Object(P.a)(15)(this.highlightQueue),function(t){var r=e.getLoci(t.seqIdx<0?void 0:t.seqIdx);e.hover(r,t.buttons,t.button,t.modifiers);});},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.plugin.managers.interactivity.lociHighlights.removeProvider(this.lociHighlightProvider),this.plugin.managers.interactivity.lociSelects.removeProvider(this.lociSelectionProvider);},t.prototype.getLoci=function(e){if(void 0!==e){var t=this.props.sequenceWrapper.getLoci(e);if(!C.StructureElement.Loci.isEmpty(t))return t;}},t.prototype.getSeqIdx=function(e){var t=void 0,r=e.target;return r&&r.getAttribute&&(t=r.hasAttribute(\"data-seqid\")?+r.getAttribute(\"data-seqid\"):void 0),t;},t.prototype.hover=function(e,t,r,n){var i={current:E.a.Loci.Empty,buttons:t,button:r,modifiers:n};void 0===e||C.StructureElement.Loci.isEmpty(e)||(i.current={loci:e}),this.plugin.behaviors.interaction.hover.next(i);},t.prototype.click=function(e,t,r,n){var i={current:E.a.Loci.Empty,buttons:t,button:r,modifiers:n};void 0===e||C.StructureElement.Loci.isEmpty(e)||(i.current={loci:e}),this.plugin.behaviors.interaction.click.next(i);},t.prototype.getBackgroundColor=function(e){return void 0===e&&console.error(\"unexpected marker value\"),0===e?\"\":e%2==0?\"rgb(51, 255, 25)\":\"rgb(255, 102, 153)\";},t.prototype.getResidueClass=function(e,t){return t.length>1?this.props.sequenceWrapper.residueClass(e)+(0===e?\" msp-sequence-residue-long-begin\":\" msp-sequence-residue-long\"):this.props.sequenceWrapper.residueClass(e);},t.prototype.residue=function(e,t,r){return i.createElement(\"span\",{key:e,\"data-seqid\":e,style:{backgroundColor:this.getBackgroundColor(r)},className:this.getResidueClass(e,t)},\"​\"+t+\"​\");},t.prototype.getSequenceNumberClass=function(e,t,r){var n=[\"msp-sequence-number\"];return t.startsWith(\"-\")?r.length>1&&e>0?n.push(\"msp-sequence-number-long-negative\"):n.push(\"msp-sequence-number-negative\"):r.length>1&&e>0&&n.push(\"msp-sequence-number-long\"),n.join(\" \");},t.prototype.getSequenceNumber=function(e){var t=\"\",r=this.props.sequenceWrapper.getLoci(e),n=C.StructureElement.Loci.getFirstLocation(r,this.location);if(n)if(C.Unit.isAtomic(n.unit)){var i=C.StructureProperties.residue.auth_seq_id(n),a=C.StructureProperties.residue.pdbx_PDB_ins_code(n);t=\"\"+i+(a||\"\");}else C.Unit.isCoarse(n.unit)&&(t=\"\"+(e+1));return t;},t.prototype.padSeqNum=function(e){return e.length<5?e+new Array(5-e.length+1).join(\" \"):e;},t.prototype.getSequenceNumberSpan=function(e,t){var r=this.getSequenceNumber(e);return i.createElement(\"span\",{key:\"marker-\"+e,className:this.getSequenceNumberClass(e,r,t)},this.padSeqNum(r));},t.prototype.updateMarker=function(){if(this.parentDiv.current)for(var e=this.parentDiv.current.children,t=this.props.sequenceWrapper.markerArray,r=!this.props.hideSequenceNumbers,n=this.sequenceNumberPeriod,i=0,a=0,o=t.length;a<o;a++){r&&a%n==0&&a<o&&i++;var s=e[i];if(!s)return;i++;var u=this.getBackgroundColor(t[a]);s.style.backgroundColor!==u&&(s.style.backgroundColor=u);}},t.prototype.render=function(){for(var e=this.props.sequenceWrapper,t=[],r=!this.props.hideSequenceNumbers,n=this.sequenceNumberPeriod,a=0,o=e.length;a<o;++a){var s=e.residueLabel(a);r&&a%n==0&&a<o&&(t[t.length]=this.getSequenceNumberSpan(a,s)),t[t.length]=this.residue(a,s,e.markerArray[a]);}return this.updateMarker(),i.createElement(\"div\",{className:\"msp-sequence-wrapper msp-sequence-wrapper-non-empty\",onContextMenu:this.contextMenu,onMouseDown:this.mouseDown,onMouseUp:this.mouseUp,onMouseMove:this.mouseMove,onMouseLeave:this.mouseLeave,ref:this.parentDiv},t);},t;}(o.PluginUIComponent),T=r(23),D=r(45),I=function(){function e(e,t,r){this.data=e,this.markerArray=t,this.length=r;}return e.prototype.markResidue=function(e,t){return Object(T.isEveryLoci)(e)?Object(D.c)(this.markerArray,j.Interval.ofLength(this.length),t):this.mark(e,t);},e;}(),M=r(47),k=function(e){function t(t){var r=this,n=C.StructureElement.Location.create(t.structure,t.units[0],t.units[0].elements[0]),i=t.units[0].model.sequence.byEntityKey[C.StructureProperties.entity.key(n)],a=i.sequence.length,o=new Uint8Array(a);(r=e.call(this,t,o,a)||this).unitMap=new Map();for(var s=0,u=t.units;s<u.length;s++){var c=u[s];r.unitMap.set(c.id,c);}r.sequence=i.sequence,r.missing=t.units[0].model.properties.missingResidues,r.modelNum=t.units[0].model.modelNum,r.asymId=C.Unit.isAtomic(t.units[0])?C.StructureProperties.chain.label_asym_id(n):C.StructureProperties.coarse.asym_id(n);for(var l=[],d=0;d<a;++d)r.missing.has(r.modelNum,r.asymId,r.seqId(d))&&l.push(d);return r.observed=j.OrderedSet.subtract(j.Interval.ofBounds(0,a),j.SortedArray.ofSortedArray(l)),r;}return Object(n.__extends)(t,e),t.prototype.seqId=function(e){return this.sequence.seqId.value(e);},t.prototype.residueLabel=function(e){return this.sequence.label.value(e);},t.prototype.residueColor=function(e){return this.missing.has(this.modelNum,this.asymId,this.seqId(e))?M.a.grey:M.a.black;},t.prototype.residueClass=function(e){return this.missing.has(this.modelNum,this.asymId,this.seqId(e))?\"msp-sequence-missing\":\"msp-sequence-present\";},t.prototype.mark=function(e,t){var r=this,n=!1,i=this.data.structure,a=function a(e){return r.sequence.index(e);};if(C.StructureElement.Loci.is(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;for(var o=0,s=(e=C.StructureElement.Loci.remap(e,i)).elements;o<s.length;o++){var u=s[o];this.unitMap.has(u.unit.id)&&(n=C.Unit.isAtomic(u.unit)?B(u,t,this.markerArray,a)||n:V(u,t,this.markerArray,a)||n);}}else if(C.Structure.isLoci(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;Object(D.c)(this.markerArray,this.observed,t)&&(n=!0);}return n;},t.prototype.getLoci=function(e){var t,r,n,i=(t=this.data.units[0].chainGroupId,r=this.data.units[0].conformation.operator.name,n=this.seqId(e),C.Queries.generators.atoms({unitTest:function unitTest(e){return C.StructureProperties.unit.chainGroupId(e.element)===t&&C.StructureProperties.unit.operator_name(e.element)===r;},residueTest:function residueTest(e){return 0===e.element.unit.kind?C.StructureProperties.residue.label_seq_id(e.element)===n:C.StructureProperties.coarse.seq_id_begin(e.element)<=n&&C.StructureProperties.coarse.seq_id_end(e.element)>=n;}}));return C.StructureSelection.toLociWithSourceUnits(C.StructureQuery.run(i,this.data.structure));},t;}(I);function B(e,t,r,n){var i=e.unit,a=i.model,o=i.elements,s=a.atomicHierarchy.residueAtomSegments.index,u=a.atomicHierarchy.residues.label_seq_id,c=!1;return j.OrderedSet.forEachSegment(e.indices,function(e){return s[o[e]];},function(e){var i=u.value(e);c=Object(D.d)(r,n(i),t)||c;}),c;}function V(e,t,r,n){var i=e.unit,a=i.model,o=i.elements,s=C.Unit.isSpheres(e.unit)?a.coarseHierarchy.spheres.seq_id_begin:a.coarseHierarchy.gaussians.seq_id_begin,u=C.Unit.isSpheres(e.unit)?a.coarseHierarchy.spheres.seq_id_end:a.coarseHierarchy.gaussians.seq_id_end,c=!1;return j.OrderedSet.forEach(e.indices,function(e){for(var i=o[e],a=n(s.value(i)),l=n(u.value(i));a<=l;a++)c=Object(D.d)(r,a,t)||c;}),c;}var R=r(2),L=function(e){function t(t){for(var r=this,n=[],i=new Map(),a=new Map(),o=new Map(),s=0,u=t.units.length;s<u;++s)for(var c=(b=t.units[s]).model.atomicHierarchy,l=c.residueAtomSegments,d=c.atoms,f=j.Segmentation.transientSegments(l,b.elements);f.hasNext;){var p=f.move().index;i.set(p,n.length),a.set(n.length,p),o.set(n.length,b),n.push(d.label_comp_id.value(l.offsets[p]));}var m=n.length,h=new Uint8Array(m);(r=e.call(this,t,h,m)||this).unitMap=new Map();for(var g=0,v=t.units;g<v.length;g++){var b=v[g];r.unitMap.set(b.id,b);}return r.sequence=n,r.sequenceIndices=i,r.residueIndices=a,r.seqToUnit=o,r;}return Object(n.__extends)(t,e),t.prototype.residueLabel=function(e){return this.sequence[e];},t.prototype.residueColor=function(e){return M.a.black;},t.prototype.residueClass=function(e){return\"msp-sequence-present\";},t.prototype.mark=function(e,t){var r=this,n=!1,i=this.data.structure;if(C.StructureElement.Loci.is(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;e=C.StructureElement.Loci.remap(e,i);for(var a=function a(e){var i=o.unitMap.get(e.unit.id);if(i){var a=e.unit.model.atomicHierarchy.residueAtomSegments.index;j.OrderedSet.forEach(e.indices,function(e){var o=r.sequenceIndices.get(a[i.elements[e]]);void 0!==o&&Object(D.c)(r.markerArray,j.Interval.ofSingleton(o),t)&&(n=!0);});}},o=this,s=0,u=e.elements;s<u.length;s++){a(u[s]);}}else if(C.Structure.isLoci(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;Object(D.c)(this.markerArray,j.Interval.ofBounds(0,this.length),t)&&(n=!0);}return n;},t.prototype.getLoci=function(e){var t=[],r=this.residueIndices.get(e);if(void 0!==r){var n=this.seqToUnit.get(e),i=n.model.atomicHierarchy.residueAtomSegments.offsets,a=j.SortedArray.findPredecessorIndex(n.elements,i[r]),o=j.SortedArray.findPredecessorIndex(n.elements,i[r+1]);t.push({unit:n,indices:j.Interval.ofBounds(a,o)});}return C.StructureElement.Loci(this.data.structure,t);},t;}(I),N=function(e){function t(t){for(var r=this,n=0,i=0,a=[],o=C.StructureElement.Location.create(t.structure),s=new Map(),u=[],c=0,l=t.units.length;c<l;++c){var d=t.units[c];C.StructureElement.Location.set(o,t.structure,d,d.elements[0]);var f=d.model.sequence.byEntityKey[C.StructureProperties.entity.key(o)];f&&(n+=f.sequence.length),i+=d.elements.length;var p=j.Interval.ofBounds(0,d.elements.length);s.set(d.id,p),u.push({unit:d,indices:p});}n>0&&a.push(n+\" residues\"),a.push(i+\" elements\");var m=new Uint8Array(1);return(r=e.call(this,t,m,1)||this).label=\"Whole Chain (\"+a.join(\", \")+\")\",r.unitIndices=s,r.loci=C.StructureElement.Loci(r.data.structure,u),r;}return Object(n.__extends)(t,e),t.prototype.residueLabel=function(e){return this.label;},t.prototype.residueColor=function(e){return M.a.black;},t.prototype.residueClass=function(e){return\"msp-sequence-present\";},t.prototype.mark=function(e,t){var r=!1,n=this.data.structure;if(C.StructureElement.Loci.is(e)){if(!C.Structure.areRootsEquivalent(e.structure,n))return!1;for(var i=0,a=(e=C.StructureElement.Loci.remap(e,n)).elements;i<a.length;i++){var o=a[i],s=this.unitIndices.get(o.unit.id);s&&j.OrderedSet.isSubset(s,o.indices)&&Object(D.c)(this.markerArray,j.Interval.ofSingleton(0),t)&&(r=!0);}}else if(C.Structure.isLoci(e)){if(!C.Structure.areRootsEquivalent(e.structure,n))return!1;Object(D.c)(this.markerArray,j.Interval.ofSingleton(0),t)&&(r=!0);}return r;},t.prototype.getLoci=function(e){return this.loci;},t;}(I),F=function(e){function t(t){for(var r=this,n=0,i=new Map(),a=[],o=0,s=t.units.length;o<s;++o){var u=t.units[o];n+=u.elements.length;var c=j.Interval.ofBounds(0,u.elements.length);i.set(u.id,c),a.push({unit:u,indices:c});}var l=new Uint8Array(n);return(r=e.call(this,t,l,n)||this).unitIndices=i,r;}return Object(n.__extends)(t,e),t.prototype.residueLabel=function(e){return\"X\";},t.prototype.residueColor=function(e){return M.a.black;},t.prototype.residueClass=function(e){return\"msp-sequence-present\";},t.prototype.mark=function(e,t){var r=!1,n=this.data,i=n.structure,a=n.units;if(C.StructureElement.Loci.is(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;for(var o=0,s=(e=C.StructureElement.Loci.remap(e,i)).elements;o<s.length;o++){var u=s[o];(d=this.unitIndices.get(u.unit.id))&&j.OrderedSet.isSubset(d,u.indices)&&Object(D.c)(this.markerArray,u.indices,t)&&(r=!0);}}else if(C.Structure.isLoci(e)){if(!C.Structure.areRootsEquivalent(e.structure,i))return!1;for(var c=0,l=a.length;c<l;++c){var d=this.unitIndices.get(a[c].id);Object(D.c)(this.markerArray,d,t)&&(r=!0);}}return r;},t.prototype.getLoci=function(e){for(var t=this.data.units,r=[],n=0,i=0,a=t.length;i<a;++i){var o=t[i];if(e<n+o.elements.length){r.push({unit:o,indices:j.Interval.ofSingleton(e-n)});break;}n+=o.elements.length;}return C.StructureElement.Loci(this.data.structure,r);},t;}(I),U=r(70);function z(e){var t=C.StructureProperties.unit.pdbx_struct_oper_list_ids(e),r=C.StructureProperties.unit.struct_ncs_oper_id(e),n=C.StructureProperties.unit.hkl(e),i=C.StructureProperties.unit.spgrOp(e);return t.sort().join(\",\")+\"|\"+r+\"|\"+n+\"|\"+i;}function H(e){var t=e.split(\"|\"),r=t[0],n=t[1];return[parseInt(r),n];}function G(e){for(var t=[],r=C.StructureElement.Location.create(e),n=new Set(),i=0,a=e.units;i<a.length;i++){var o=a[i];C.StructureElement.Location.set(r,e,o,o.elements[0]);var s=C.StructureProperties.entity.id(r),u=e.getModelIndex(o.model),c=u+\"|\"+s;if(!n.has(c)){var l=C.StructureProperties.entity.pdbx_description(r).join(\", \");e.models.length&&(e.representativeModel?l+=\" (Model \"+e.models[u].modelNum+\")\":l.startsWith(\"Polymer \")&&(l+=\" (\"+e.models[u].entry+\")\"));var d=s+\": \"+l;t.push([c,d]),n.add(c);}}return 0===t.length&&t.push([\"\",\"No entities\"]),t;}function q(e,t){for(var r=[],n=C.StructureElement.Location.create(e),i=new Set(),a=H(t),o=a[0],s=a[1],u=0,c=e.units;u<c.length;u++){var l=c[u];if(C.StructureElement.Location.set(n,e,l,l.elements[0]),e.getModelIndex(l.model)===o&&C.StructureProperties.entity.id(n)===s){var d=l.chainGroupId;if(!i.has(d)){var f=Object(U.elementLabel)(n,{granularity:\"chain\",hidePrefix:!0,htmlStyling:!1});r.push([d,f]),i.add(d);}}}return 0===r.length&&r.push([-1,\"No units\"]),r;}function W(e,t,r){for(var n=[],i=C.StructureElement.Location.create(e),a=new Set(),o=H(t),s=o[0],u=o[1],c=0,l=e.units;c<l.length;c++){var d=l[c];if(C.StructureElement.Location.set(i,e,d,d.elements[0]),e.getModelIndex(d.model)===s&&C.StructureProperties.entity.id(i)===u&&d.chainGroupId===r){var f=z(i);if(!a.has(f)){var p=d.conformation.operator.name;n.push([f,p]),a.add(f);}}}return 0===n.length&&n.push([\"\",\"No operators\"]),n;}function Q(e){for(var t=[],r=0,n=e.select(l.StateSelection.Generators.rootsOfType(O.a.Molecule.Structure));r<n.length;r++){var i=n[r];t.push([i.transform.ref,i.obj.data.label]);}return 0===t.length&&t.push([\"\",\"No structure\"]),t;}var Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={structure:C.Structure.Empty,structureRef:\"\",modelEntityId:\"\",chainGroupId:-1,operatorKey:\"\"},t.setParamProps=function(e){var r=Object(n.__assign)({},t.state);switch(e.name){case\"structure\":r.structureRef=e.value,r.structure=t.getStructure(e.value),r.modelEntityId=G(r.structure)[0][0],r.chainGroupId=q(r.structure,r.modelEntityId)[0][0],r.operatorKey=W(r.structure,r.modelEntityId,r.chainGroupId)[0][0];break;case\"entity\":r.modelEntityId=e.value,r.chainGroupId=q(r.structure,r.modelEntityId)[0][0],r.operatorKey=W(r.structure,r.modelEntityId,r.chainGroupId)[0][0];break;case\"chain\":r.chainGroupId=e.value,r.operatorKey=W(r.structure,r.modelEntityId,r.chainGroupId)[0][0];break;case\"operator\":r.operatorKey=e.value;}t.setState(r);},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.plugin.state.data.select(l.StateSelection.Generators.rootsOfType(O.a.Molecule.Structure)).length>0&&this.setState(this.getInitialState()),this.subscribe(this.plugin.state.events.object.updated,function(t){var r=t.ref,n=t.obj;r===e.state.structureRef&&n&&n.type===O.a.Molecule.Structure.type&&n.data!==e.state.structure&&e.setState(e.getInitialState());}),this.subscribe(this.plugin.state.events.object.created,function(t){var r=t.obj;r&&r.type===O.a.Molecule.Structure.type&&e.setState(e.getInitialState());}),this.subscribe(this.plugin.state.events.object.removed,function(t){var r=t.obj;r&&r.type===O.a.Molecule.Structure.type&&r.data===e.state.structure&&e.setState(e.getInitialState());});},t.prototype.getStructure=function(e){var t=this.plugin.state.data.select(e)[0];return e&&t&&t.obj?t.obj.data:C.Structure.Empty;},t.prototype.getSequenceWrapper=function(){return function(e,t){for(var r=e.structure,n=e.modelEntityId,i=e.chainGroupId,a=e.operatorKey,o=C.StructureElement.Location.create(r),s=H(n),u=s[0],c=s[1],l=[],d=0,f=r.units;d<f.length;d++){var p=f[d];C.StructureElement.Location.set(o,r,p,p.elements[0]),r.getModelIndex(p.model)===u&&C.StructureProperties.entity.id(o)===c&&p.chainGroupId===i&&z(o)===a&&l.push(p);}if(l.length>0){var m={structure:r,units:l},h=void 0;if((p=l[0]).polymerElements.length){var g=C.StructureElement.Location.create(r,p,p.elements[0]),v=p.model.sequence.byEntityKey[C.StructureProperties.entity.key(g)];if(v&&v.sequence.length<=5e3)h=new k(m);else{var b=l.reduce(function(e,t){return e+t.polymerElements.length;},0);h=C.Unit.isAtomic(p)||b>5e3?new N(m):new F(m);}}else if(C.Unit.isAtomic(p)){h=l.reduce(function(e,t){return e+t.residueCount;},0)>5e3?new N(m):new L(m);}else console.warn(\"should not happen, expecting coarse units to be polymeric\"),h=new N(m);return h.markResidue(t.getLoci(r),D.a.Select),h;}return\"No sequence available\";}(this.state,this.plugin.managers.structure.selection);},t.prototype.getInitialState=function(){var e=Q(this.plugin.state.data)[0][0],t=this.getStructure(e),r=G(t)[0][0],n=q(t,r)[0][0],i=W(t,r,n)[0][0];return this.state.structure&&this.state.structure===t&&(r=this.state.modelEntityId,n=this.state.chainGroupId,i=this.state.operatorKey),{structure:t,structureRef:e,modelEntityId:r,chainGroupId:n,operatorKey:i};},Object.defineProperty(t.prototype,\"params\",{get:function get(){var e=this.state,t=e.structure,r=e.modelEntityId,n=e.chainGroupId,i=Q(this.plugin.state.data),a=G(t),o=q(t,r),s=W(t,r,n);return{structure:R.ParamDefinition.Select(i[0][0],i,{shortLabel:!0}),entity:R.ParamDefinition.Select(a[0][0],a,{shortLabel:!0}),chain:R.ParamDefinition.Select(o[0][0],o,{shortLabel:!0,twoColumns:!0,label:\"Chain\"}),operator:R.ParamDefinition.Select(s[0][0],s,{shortLabel:!0,twoColumns:!0})};},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"values\",{get:function get(){return{structure:this.state.structureRef,entity:this.state.modelEntityId,chain:this.state.chainGroupId,operator:this.state.operatorKey};},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(this.getStructure(this.state.structureRef)===C.Structure.Empty)return i.createElement(\"div\",{className:\"msp-sequence\"},i.createElement(\"div\",{className:\"msp-sequence-select\"},i.createElement(v.Icon,{svg:v.HelpOutlineSvg,style:{cursor:\"help\",position:\"absolute\",right:0,top:0},title:\"This shows a single sequence. Use the controls to show a different sequence.\"}),i.createElement(\"span\",null,\"Sequence\"),i.createElement(\"span\",{style:{fontWeight:\"normal\"}},\"No structure available\")));var e=this.getSequenceWrapper(),t=this.params,r=this.values;return i.createElement(\"div\",{className:\"msp-sequence\"},i.createElement(\"div\",{className:\"msp-sequence-select\"},i.createElement(v.Icon,{svg:v.HelpOutlineSvg,style:{cursor:\"help\",position:\"absolute\",right:0,top:0},title:\"This shows a single sequence. Use the controls to show a different sequence.\"}),i.createElement(\"span\",null,\"Sequence of\"),i.createElement(f.PureSelectControl,{title:\"[Structure] \"+R.ParamDefinition.optionLabel(t.structure,r.structure),param:t.structure,name:\"structure\",value:r.structure,onChange:this.setParamProps}),i.createElement(f.PureSelectControl,{title:\"[Entity] \"+R.ParamDefinition.optionLabel(t.entity,r.entity),param:t.entity,name:\"entity\",value:r.entity,onChange:this.setParamProps}),i.createElement(f.PureSelectControl,{title:\"[Chain] \"+R.ParamDefinition.optionLabel(t.chain,r.chain),param:t.chain,name:\"chain\",value:r.chain,onChange:this.setParamProps}),t.operator.options.length>1&&i.createElement(i.Fragment,null,i.createElement(f.PureSelectControl,{title:\"[Instance] \"+R.ParamDefinition.optionLabel(t.operator,r.operator),param:t.operator,name:\"operator\",value:r.operator,onChange:this.setParamProps}))),\"string\"==typeof e?i.createElement(\"div\",{className:\"msp-sequence-wrapper msp-sequence-wrapper-non-empty\"},e):i.createElement(A,{sequenceWrapper:e}));},t;}(o.PluginUIComponent),X=r(389),K=r(390),Z=r(322),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.region=function(e,t){return i.createElement(\"div\",{className:\"msp-layout-region msp-layout-\"+e},i.createElement(\"div\",{className:\"msp-layout-static\"},t));},t.prototype.render=function(){return i.createElement(o.PluginReactContext.Provider,{value:this.props.plugin},i.createElement(ee,null));},t;}(i.Component),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){return i.createElement(o.PluginReactContext.Provider,{value:this.props.plugin},i.createElement(\"div\",{className:\"msp-plugin\"},this.props.children));},t;}(i.Component),ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onDrop=function(e){var r;if(e.preventDefault(),e.dataTransfer.items){for(var n=0;n<e.dataTransfer.items.length;n++)if(\"file\"===e.dataTransfer.items[n].kind){r=e.dataTransfer.items[n].getAsFile();break;}}else r=e.dataTransfer.files[0];if(r){var i=(null==r?void 0:r.name.toLowerCase())||\"\";(i.endsWith(\"molx\")||i.endsWith(\"molj\"))&&c.PluginCommands.State.Snapshots.OpenFile(t.plugin,{file:r});}},t.onDragOver=function(e){e.preventDefault();},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.layout.events.updated,function(){return e.forceUpdate();});},t.prototype.region=function(e,t){return i.createElement(\"div\",{className:\"msp-layout-region msp-layout-\"+e},i.createElement(\"div\",{className:\"msp-layout-static\"},t?i.createElement(t,null):null));},Object.defineProperty(t.prototype,\"layoutVisibilityClassName\",{get:function get(){var e=this.plugin.layout.state,t=this.plugin.spec.layout&&this.plugin.spec.layout.controls||{},r=[];return\"none\"!==t.top&&e.showControls&&\"hidden\"!==e.regionState.top||r.push(\"msp-layout-hide-top\"),\"none\"!==t.left&&e.showControls&&\"hidden\"!==e.regionState.left?\"collapsed\"===e.regionState.left&&r.push(\"msp-layout-collapse-left\"):r.push(\"msp-layout-hide-left\"),\"none\"!==t.right&&e.showControls&&\"hidden\"!==e.regionState.right||r.push(\"msp-layout-hide-right\"),\"none\"!==t.bottom&&e.showControls&&\"hidden\"!==e.regionState.bottom||r.push(\"msp-layout-hide-bottom\"),r.join(\" \");},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"layoutClassName\",{get:function get(){var e=this.plugin.layout.state,t=[\"msp-plugin-content\"];return e.isExpanded?t.push(\"msp-layout-expanded\"):t.push(\"msp-layout-standard\",\"msp-layout-standard-\"+e.controlsDisplay),t.join(\" \");},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e,t,r,n=this.plugin.layout.state,a=(null===(e=this.plugin.spec.layout)||void 0===e?void 0:e.controls)||{},o=(null===(r=null===(t=this.plugin.spec.components)||void 0===t?void 0:t.viewport)||void 0===r?void 0:r.view)||re;return i.createElement(\"div\",{className:\"msp-plugin\",onDrop:this.onDrop,onDragOver:this.onDragOver},i.createElement(\"div\",{className:this.layoutClassName},i.createElement(\"div\",{className:this.layoutVisibilityClassName},this.region(\"main\",o),n.showControls&&\"none\"!==a.top&&this.region(\"top\",a.top||Y),n.showControls&&\"none\"!==a.left&&this.region(\"left\",a.left||b),n.showControls&&\"none\"!==a.right&&this.region(\"right\",a.right||te),n.showControls&&\"none\"!==a.bottom&&this.region(\"bottom\",a.bottom||ne))));},t;}(o.PluginUIComponent),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e,t=(null===(e=this.plugin.spec.components)||void 0===e?void 0:e.structureTools)||s.DefaultStructureTools;return i.createElement(\"div\",{className:\"msp-scrollable-container\"},i.createElement(t,null));},t;}(o.PluginUIComponent),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Object(n.__extends)(t,e),t.prototype.render=function(){var e,t,r=(null===(t=null===(e=this.plugin.spec.components)||void 0===e?void 0:e.viewport)||void 0===t?void 0:t.controls)||Z.ViewportControls;return i.createElement(i.Fragment,null,i.createElement(Z.Viewport,null),i.createElement(\"div\",{className:\"msp-viewport-top-left-controls\"},i.createElement(s.AnimationViewportControls,null),i.createElement(s.TrajectoryViewportControls,null),i.createElement(s.StateSnapshotViewportControls,null)),i.createElement(s.SelectionViewportControls,null),i.createElement(r,null),i.createElement(X.BackgroundTaskProgress,null),i.createElement(\"div\",{className:\"msp-highlight-toast-wrapper\"},i.createElement(s.LociLabels,null),i.createElement(K.Toasts,null)));},t;}(o.PluginUIComponent),ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrapper=i.createRef(),t.state={entries:t.plugin.log.entries},t;}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;this.subscribe(this.plugin.events.log,function(){return e.setState({entries:e.plugin.log.entries});});},t.prototype.componentDidUpdate=function(){this.scrollToBottom();},t.prototype.scrollToBottom=function(){var e=this.wrapper.current;e&&(e.scrollTop=e.scrollHeight-e.clientHeight-1);},t.prototype.render=function(){for(var e=this.state.entries,t=e.size,r=[],n=Math.max(0,t-10),o=0;n<t;n++){var s=e.get(n);r.push(i.createElement(\"li\",{key:o++},i.createElement(\"div\",{className:\"msp-log-entry-badge msp-log-entry-\"+s.type}),i.createElement(\"div\",{className:\"msp-log-timestamp\"},Object(a.j)(s.timestamp)),i.createElement(\"div\",{className:\"msp-log-entry\"},s.message)));}return i.createElement(\"div\",{ref:this.wrapper,className:\"msp-log\",style:{position:\"absolute\",top:\"0\",right:\"0\",bottom:\"0\",left:\"0\",overflowY:\"auto\"}},i.createElement(\"ul\",{className:\"msp-list-unstyled\"},r));},t;}(o.PluginUIComponent);},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"PDBeStructureQualityReport\",function(){return i.PDBeStructureQualityReport;}),r.d(t,\"PDBePreferredAssembly\",function(){return n;}),r.d(t,\"PDBeStructRefDomain\",function(){return f;});var n,i=r(385),a=r(0),o=r(7),s=r(148),u=r(62),c=r(113),l=r(72),d=r(66);!function(e){function t(e){var t=c.a.Provider.get(e);return(null==t?void 0:t.assemblies.length)?t.assemblies[0].id:\"\";}function r(e){return e._staticPropertyData.__PDBePreferredAssebly__||t(e);}e.getFirstFromModel=t,e.get=r,e.Schema={pdbe_preferred_assembly:{assembly_id:o.a.Schema.str}},e.Descriptor=Object(d.CustomPropertyDescriptor)({name:\"pdbe_preferred_assembly\",cifExport:{prefix:\"pdbe\",context:function context(e){return r(e.firstModel);},categories:[{name:\"pdbe_preferred_assembly\",instance:function instance(t){return u.a.Category.ofTable(o.d.ofArrays(e.Schema.pdbe_preferred_assembly,{assembly_id:[t]}));}}]}}),e.attachFromCifOrApi=function(r,i){return Object(a.__awaiter)(this,void 0,void 0,function(){var o,u;return Object(a.__generator)(this,function(a){switch(a.label){case 0:return r.customProperties.has(e.Descriptor)?[2,!0]:void 0===(o=function(r){if(l.a.is(r.sourceData)){var n=r.sourceData.data.frame.categories.pdbe_preferred_assembly;if(n)return Object(s.c)(e.Schema.pdbe_preferred_assembly,n).assembly_id.value(0)||t(r);}}(r))&&i.PDBe_apiSourceJson?[4,i.PDBe_apiSourceJson(r)]:[3,2];case 1:return(u=a.sent())?(o=function(e,t){var r=t[0]&&t[0].assemblies;if(!r||!r.length)return n.getFirstFromModel(e);for(var i=0,a=r;i<a.length;i++){var o=a[i];if(o.preferred)return o.assembly_id;}return r[0].assembly_id;}(r,u),[3,3]):[2,!1];case 2:return[2,!1];case 3:return o?(r.customProperties.add(e.Descriptor),function(e,t){e._staticPropertyData.__PDBePreferredAssebly__=t;}(r,o),[2,!0]):[2,!1];}});});};}(n||(n={}));var f,p=r(236);!function(e){function t(e){return e._staticPropertyData.__PDBeStructRefSeq__;}e.get=t,e.Schema={pdbe_struct_ref_domain:{id:o.a.Schema.int,db_name:o.a.Schema.str,db_code:o.a.Schema.str,identifier:o.a.Schema.str,name:o.a.Schema.str,label_entity_id:o.a.Schema.str,label_asym_id:o.a.Schema.str,beg_label_seq_id:o.a.Schema.int,beg_pdbx_PDB_ins_code:o.a.Schema.str,end_label_seq_id:o.a.Schema.int,end_pdbx_PDB_ins_code:o.a.Schema.str}},e.Descriptor=Object(d.CustomPropertyDescriptor)({name:\"pdbe_struct_ref_domain\",cifExport:{prefix:\"pdbe\",context:function context(e){return t(e.firstModel);},categories:[p.PropertyWrapper.defaultInfoCategory(\"pdbe_struct_ref_domain_info\",function(e){return e.info;}),{name:\"pdbe_struct_ref_domain\",instance:function instance(e){return e&&e.data?u.a.Category.ofTable(e.data):u.a.Category.Empty;}}]}}),e.attachFromCifOrApi=function(t,r){return Object(a.__awaiter)(this,void 0,void 0,function(){var n,i,u;return Object(a.__generator)(this,function(a){switch(a.label){case 0:return t.customProperties.has(e.Descriptor)?[2,!0]:(i=p.PropertyWrapper.tryGetInfoFromCif(\"pdbe_struct_ref_domain_info\",t))?(n=function(t){if(l.a.is(t.sourceData)){var r=t.sourceData.data.frame.categories.pdbe_struct_ref_domain;if(r)return Object(s.c)(e.Schema.pdbe_struct_ref_domain,r);}}(t),[3,4]):[3,1];case 1:return r.PDBe_apiSourceJson?[4,r.PDBe_apiSourceJson(t)]:[3,3];case 2:return(u=a.sent())?(i=p.PropertyWrapper.createInfo(),n=function(e,t){for(var r=[],n=1,i=0,a=Object.keys(t);i<a.length;i++)for(var s=a[i],u=t[s],c=0,l=Object.keys(u);c<l.length;c++)for(var d=l[c],p=u[d],m=0,h=p.mappings;m<h.length;m++){var g=h[m];r.push({id:n++,db_name:s,db_code:d,identifier:p.identifier,name:p.name,label_entity_id:\"\"+g.entity_id,label_asym_id:g.struct_asym_id,beg_label_seq_id:g.start.residue_number,beg_pdbx_PDB_ins_code:g.start.author_insertion_code,end_label_seq_id:g.end.residue_number,end_pdbx_PDB_ins_code:g.end.author_insertion_code});}return o.d.ofRows(f.Schema.pdbe_struct_ref_domain,r);}(0,u),[3,4]):[2,!1];case 3:return[2,!1];case 4:return t.customProperties.add(e.Descriptor),function(e,t){e._staticPropertyData.__PDBeStructRefSeq__=t;}(t,{info:i,data:n}),[2,!0];}});});};}(f||(f={}));},function(e,t,r){\"use strict\";r.r(t),r.d(t,\"AnimateModelIndex\",function(){return l;}),r.d(t,\"AnimateAssemblyUnwind\",function(){return d;}),r.d(t,\"AnimateUnitsExplode\",function(){return f;}),r.d(t,\"AnimateStateInterpolation\",function(){return p;});var n,i=r(0);!function(e){e.create=function(e){return e;};}(n||(n={}));var a=r(8),o=r(28),s=r(13),u=r(26),c=r(2),l=n.create({name:\"built-in.animate-model-index\",display:{name:\"Animate Trajectory\"},params:function params(){return{mode:c.ParamDefinition.MappedStatic(\"palindrome\",{palindrome:c.ParamDefinition.Group({}),loop:c.ParamDefinition.Group({}),once:c.ParamDefinition.Group({direction:c.ParamDefinition.Select(\"forward\",[[\"forward\",\"Forward\"],[\"backward\",\"Backward\"]])},{isFlat:!0})},{options:[[\"palindrome\",\"Palindrome\"],[\"loop\",\"Loop\"],[\"once\",\"Once\"]]}),maxFPS:c.ParamDefinition.Numeric(15,{min:1,max:30,step:1})};},canApply:function canApply(e){for(var t=e.state.data,r=0,n=t.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Model.ModelFromTrajectory));r<n.length;r++){var i=n[r],u=s.StateSelection.findAncestorOfType(t.tree,t.cells,i.transform.ref,[a.a.Molecule.Trajectory]);if(u&&u.obj&&u.obj.data.length>1)return{canApply:!0};}return{canApply:!1,reason:\"No trajectory to animate\"};},initialState:function initialState(){return{};},apply:function apply(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,c,l,d,f,p,m,h,g,v,b;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(t.current>0&&t.current-t.lastApplied<1e3/r.params.maxFPS)return[2,{kind:\"skip\"}];if(n=r.plugin.state.data,0===(c=n.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Model.ModelFromTrajectory))).length)return[2,{kind:\"finished\"}];for(l=n.build(),d=r.params,f=e.palindromeDirections||{},p=!1,m=!0,h=function h(e){var t=s.StateSelection.findAncestorOfType(n.tree,n.cells,e.transform.ref,[a.a.Molecule.Trajectory]);if(!t||!t.obj)return\"continue\";var r=t.obj;if(r.data.length<=1)return\"continue\";l.to(e).update(function(t){var n=r.data.length;if(1===n)return t;m=!1;var i=1;if(\"once\"===d.mode.name){if(-1===(i=\"backward\"===d.mode.params.direction?-1:1)&&0===t.modelIndex||1===i&&t.modelIndex===n-1)return p=!0,t;}else\"palindrome\"===d.mode.name&&(i=0===t.modelIndex?1:t.modelIndex===n-1?-1:f[e.transform.ref]||1);f[e.transform.ref]=i;var a=(t.modelIndex+i)%n;return a<0&&(a+=n),p=p||-1===i&&0===a||1===i&&a===n-1,{modelIndex:a};});},g=0,v=c;g<v.length;g++)b=v[g],h(b);return m?[3,2]:[4,u.PluginCommands.State.Update(r.plugin,{state:n,tree:l,options:{doNotLogTiming:!0}})];case 1:i.sent(),i.label=2;case 2:return m||\"once\"===d.mode.name&&p?[2,{kind:\"finished\"}]:\"palindrome\"===d.mode.name?[2,{kind:\"next\",state:{palindromeDirections:f}}]:[2,{kind:\"next\",state:{}}];}});});}}),d=n.create({name:\"built-in.animate-assembly-unwind\",display:{name:\"Unwind Assembly\"},params:function params(e){for(var t=[[\"all\",\"All\"]],r=0,n=e.state.data.select(s.StateSelection.Generators.rootsOfType(a.a.Molecule.Structure));r<n.length;r++){var i=n[r];t.push([i.transform.ref,i.obj.data.models[0].label]);}return{durationInMs:c.ParamDefinition.Numeric(3e3,{min:100,max:1e4,step:100}),playOnce:c.ParamDefinition.Boolean(!1),target:c.ParamDefinition.Select(t[0][0],t)};},canApply:function canApply(e){var t=e.state.data,r=s.StateTransform.RootRef;return{canApply:t.select(s.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3D,r)).length>0};},initialState:function initialState(){return{t:0};},setup:function setup(e,t){for(var r=t.state.data,n=e.target&&\"all\"!==e.target?e.target:s.StateTransform.RootRef,i=r.select(s.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3D,n)),u=r.build(),c=!1,l=0,d=i;l<d.length;l++){var f=d[l];r.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Representation.UnwindStructureAssemblyRepresentation3D,f.transform.ref)).length>0||(c=!0,u.to(f).apply(o.StateTransforms.Representation.UnwindStructureAssemblyRepresentation3D,{t:0},{tags:\"animate-assembly-unwind\"}));}if(c)return u.commit({doNotUpdateCurrent:!0});},teardown:function teardown(e,t){var r=t.state.data,n=r.select(s.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3DState).withTag(\"animate-assembly-unwind\"));if(0!==n.length){for(var i=r.build(),o=0,u=n;o<u.length;o++){var c=u[o];i.delete(c.transform.ref);}return i.commit();}},apply:function apply(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,a,c,l,d,f,p,m,h,g;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(n=r.plugin.state.data,a=r.params.target&&\"all\"!==r.params.target?r.params.target:s.StateTransform.RootRef,0===(c=n.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Representation.UnwindStructureAssemblyRepresentation3D,a))).length)return[2,{kind:\"finished\"}];for(l=n.build(),d=(t.current-t.lastApplied)/r.params.durationInMs,f=e.t+d,p=!1,r.params.playOnce&&f>=1?(p=!0,f=1):f%=1,m=0,h=c;m<h.length;m++)g=h[m],l.to(g).update({t:f});return[4,u.PluginCommands.State.Update(r.plugin,{state:n,tree:l,options:{doNotLogTiming:!0}})];case 1:return i.sent(),p?[2,{kind:\"finished\"}]:[2,{kind:\"next\",state:{t:f}}];}});});}}),f=n.create({name:\"built-in.animate-units-explode\",display:{name:\"Explode Units\"},params:function params(){return{durationInMs:c.ParamDefinition.Numeric(3e3,{min:100,max:1e4,step:100})};},initialState:function initialState(){return{t:0};},setup:function setup(e,t){return Object(i.__awaiter)(this,void 0,void 0,function(){var e,r,n,u,c,l,d;return Object(i.__generator)(this,function(i){for(e=t.state.data,r=e.select(s.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3D)),n=e.build(),u=!1,c=0,l=r;c<l.length;c++)d=l[c],e.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Representation.ExplodeStructureRepresentation3D,d.transform.ref)).length>0||(u=!0,n.to(d.transform.ref).apply(o.StateTransforms.Representation.ExplodeStructureRepresentation3D,{t:0},{tags:\"animate-units-explode\"}));return u?[2,n.commit({doNotUpdateCurrent:!0})]:[2];});});},teardown:function teardown(e,t){var r=t.state.data,n=r.select(s.StateSelection.Generators.ofType(a.a.Molecule.Structure.Representation3DState).withTag(\"animate-units-explode\"));if(0!==n.length){for(var i=r.build(),o=0,u=n;o<u.length;o++){var c=u[o];i.delete(c.transform.ref);}return i.commit();}},apply:function apply(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var n,a,c,l,d,f,p,m;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if(n=r.plugin.state.data,0===(a=n.select(s.StateSelection.Generators.ofTransformer(o.StateTransforms.Representation.ExplodeStructureRepresentation3D))).length)return[2,{kind:\"finished\"}];for(c=n.build(),l=(t.current-t.lastApplied)/r.params.durationInMs,d=(e.t+l)%1,f=0,p=a;f<p.length;f++)m=p[f],c.to(m).update({t:d});return[4,u.PluginCommands.State.Update(r.plugin,{state:n,tree:c,options:{doNotLogTiming:!0}})];case 1:return i.sent(),[2,{kind:\"next\",state:{t:d}}];}});});}}),p=n.create({name:\"built-in.animate-state-interpolation\",display:{name:\"Animate State Interpolation\"},params:function params(){return{transtionDurationInMs:c.ParamDefinition.Numeric(2e3,{min:100,max:3e4,step:10})};},canApply:function canApply(e){return{canApply:e.managers.snapshot.state.entries.size>1};},initialState:function initialState(){return{};},apply:function apply(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,function(){var e,n,a,o,c,l,d,f,p,m,h,g,v,b,y,_,S,O;return Object(i.__generator)(this,function(i){switch(i.label){case 0:if((e=r.plugin.managers.snapshot.state.entries).size<2)return[2,{kind:\"finished\"}];if(n=t.current%r.params.transtionDurationInMs/r.params.transtionDurationInMs,a=Math.floor(t.current/r.params.transtionDurationInMs)%e.size,(o=Math.ceil(t.current/r.params.transtionDurationInMs))===a&&o++,o%=e.size,c=e.get(a).snapshot,l=e.get(o).snapshot,!c.data||!l.data)return[2,{kind:\"skip\"}];for(d=c.data.tree.transforms,f=l.data.tree.transforms,p=r.plugin.state.data,m=p.build(),h=0,g=d;h<g.length;h++)for(v=g[h],b=0,y=f;b<y.length;b++)(_=y[b]).ref===v.ref&&_.version!==v.version&&(S=s.StateTransform.fromJSON(v),O=s.StateTransform.fromJSON(_),S.transformer.definition.interpolate?m.to(v.ref).update(S.transformer.definition.interpolate(S.params,O.params,n,r.plugin)):m.to(v.ref).update(n<=.5?S.params:O.params));return[4,u.PluginCommands.State.Update(r.plugin,{state:p,tree:m,options:{doNotLogTiming:!0}})];case 1:return i.sent(),[2,{kind:\"next\",state:{}}];}});});}});}]);!function(t){var e={};function i(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports;}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s});},i.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0});},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&\"object\"==typeof_default()(t)&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var r in t)i.d(s,r,function(e){return t[e];}.bind(null,r));return s;},i.n=function(t){var e=t&&t.__esModule?function(){return t.default;}:function(){return t;};return i.d(e,\"a\",e),e;},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e);},i.p=\"\",i(i.s=0);}([function(t,e,i){\"use strict\";i.r(e);/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */var s=\"undefined\"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,r=function r(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;for(;e!==i;){var _i3=e.nextSibling;t.removeChild(e),e=_i3;}},n=\"{{lit-\".concat(String(Math.random()).slice(2),\"}}\"),o=\"<!--\".concat(n,\"-->\"),a=new RegExp(\"\".concat(n,\"|\").concat(o));var l=/*#__PURE__*/createClass_default()(function l(t,e){classCallCheck_default()(this,l);this.parts=[],this.element=e;var i=[],s=[],r=document.createTreeWalker(e.content,133,null,!1);var o=0,_l2=-1,d=0;var p=t.strings,m=t.values.length;for(;d<m;){var _t6=r.nextNode();if(null!==_t6){if(_l2++,1===_t6.nodeType){if(_t6.hasAttributes()){var _e4=_t6.attributes,_i4=_e4.length;var _s3=0;for(var _t7=0;_t7<_i4;_t7++)h(_e4[_t7].name,\"$lit$\")&&_s3++;for(;_s3-->0;){var _e5=p[d],_i5=u.exec(_e5)[2],_s4=_i5.toLowerCase()+\"$lit$\",_r6=_t6.getAttribute(_s4);_t6.removeAttribute(_s4);var _n9=_r6.split(a);this.parts.push({type:\"attribute\",index:_l2,name:_i5,strings:_n9}),d+=_n9.length-1;}}\"TEMPLATE\"===_t6.tagName&&(s.push(_t6),r.currentNode=_t6.content);}else if(3===_t6.nodeType){var _e6=_t6.data;if(_e6.indexOf(n)>=0){var _s5=_t6.parentNode,_r7=_e6.split(a),_n0=_r7.length-1;for(var _e7=0;_e7<_n0;_e7++){var _i6=void 0,_n1=_r7[_e7];if(\"\"===_n1)_i6=c();else{var _t8=u.exec(_n1);null!==_t8&&h(_t8[2],\"$lit$\")&&(_n1=_n1.slice(0,_t8.index)+_t8[1]+_t8[2].slice(0,-\"$lit$\".length)+_t8[3]),_i6=document.createTextNode(_n1);}_s5.insertBefore(_i6,_t6),this.parts.push({type:\"node\",index:++_l2});}\"\"===_r7[_n0]?(_s5.insertBefore(c(),_t6),i.push(_t6)):_t6.data=_r7[_n0],d+=_n0;}}else if(8===_t6.nodeType)if(_t6.data===n){var _e8=_t6.parentNode;null!==_t6.previousSibling&&_l2!==o||(_l2++,_e8.insertBefore(c(),_t6)),o=_l2,this.parts.push({type:\"node\",index:_l2}),null===_t6.nextSibling?_t6.data=\"\":(i.push(_t6),_l2--),d++;}else{var _e9=-1;for(;-1!==(_e9=_t6.data.indexOf(n,_e9+1));)this.parts.push({type:\"node\",index:-1}),d++;}}else r.currentNode=s.pop();}for(var _i8=0,_i7=i;_i8<_i7.length;_i8++){var _t9=_i7[_i8];_t9.parentNode.removeChild(_t9);}});var h=function h(t,e){var i=t.length-e.length;return i>=0&&t.slice(i)===e;},d=function d(t){return-1!==t.index;},c=function c(){return document.createComment(\"\");},u=/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;function p(t,e){var i=t.element.content,s=t.parts,r=document.createTreeWalker(i,133,null,!1);var n=g(s),o=s[n],a=-1,l=0;var h=[];var d=null;for(;r.nextNode();){a++;var _t0=r.currentNode;for(_t0.previousSibling===d&&(d=null),e.has(_t0)&&(h.push(_t0),null===d&&(d=_t0)),null!==d&&l++;void 0!==o&&o.index===a;)o.index=null!==d?-1:o.index-l,n=g(s,n),o=s[n];}h.forEach(function(t){return t.parentNode.removeChild(t);});}var m=function m(t){var e=11===t.nodeType?0:1;var i=document.createTreeWalker(t,133,null,!1);for(;i.nextNode();)e++;return e;},g=function g(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;for(var _i9=e+1;_i9<t.length;_i9++){var _e0=t[_i9];if(d(_e0))return _i9;}return-1;};/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */var y=new WeakMap(),_=function _(t){return\"function\"==typeof t&&y.has(t);},f={},b={};/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */var S=/*#__PURE__*/function(){function S(t,e,i){classCallCheck_default()(this,S);this.__parts=[],this.template=t,this.processor=e,this.options=i;}return createClass_default()(S,[{key:\"update\",value:function update(t){var e=0;var _iterator=pdbe_molstar_component_1_1_1_createForOfIteratorHelper(this.__parts),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _i0=_step.value;void 0!==_i0&&_i0.setValue(t[e]),e++;}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _iterator2=pdbe_molstar_component_1_1_1_createForOfIteratorHelper(this.__parts),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t1=_step2.value;void 0!==_t1&&_t1.commit();}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}},{key:\"_clone\",value:function _clone(){var t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],i=this.template.parts,r=document.createTreeWalker(t,133,null,!1);var n,o=0,a=0,l=r.nextNode();for(;o<i.length;)if(n=i[o],d(n)){var _this$__parts;for(;a<n.index;)a++,\"TEMPLATE\"===l.nodeName&&(e.push(l),r.currentNode=l.content),null===(l=r.nextNode())&&(r.currentNode=e.pop(),l=r.nextNode());if(\"node\"===n.type){var _t10=this.processor.handleTextExpression(this.options);_t10.insertAfterNode(l.previousSibling),this.__parts.push(_t10);}else(_this$__parts=this.__parts).push.apply(_this$__parts,toConsumableArray_default()(this.processor.handleAttributeExpressions(l,n.name,n.strings,this.options)));o++;}else this.__parts.push(void 0),o++;return s&&(document.adoptNode(t),customElements.upgrade(t)),t;}}]);}();/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */var v=\" \".concat(n,\" \");var C=/*#__PURE__*/function(){function C(t,e,i,s){classCallCheck_default()(this,C);this.strings=t,this.values=e,this.type=i,this.processor=s;}return createClass_default()(C,[{key:\"getHTML\",value:function getHTML(){var t=this.strings.length-1;var e=\"\",i=!1;for(var _s6=0;_s6<t;_s6++){var _t11=this.strings[_s6],_r8=_t11.lastIndexOf(\"\\x3c!--\");i=(_r8>-1||i)&&-1===_t11.indexOf(\"--\\x3e\",_r8+1);var _a4=u.exec(_t11);e+=null===_a4?_t11+(i?v:o):_t11.substr(0,_a4.index)+_a4[1]+_a4[2]+\"$lit$\"+_a4[3]+n;}return e+=this.strings[t],e;}},{key:\"getTemplateElement\",value:function getTemplateElement(){var t=document.createElement(\"template\");return t.innerHTML=this.getHTML(),t;}}]);}();/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */var w=function w(t){return null===t||!(\"object\"==typeof_default()(t)||\"function\"==typeof t);},P=function P(t){return Array.isArray(t)||!(!t||!t[Symbol.iterator]);};var x=/*#__PURE__*/function(){function x(t,e,i){classCallCheck_default()(this,x);this.dirty=!0,this.element=t,this.name=e,this.strings=i,this.parts=[];for(var _t12=0;_t12<i.length-1;_t12++)this.parts[_t12]=this._createPart();}return createClass_default()(x,[{key:\"_createPart\",value:function _createPart(){return new N(this);}},{key:\"_getValue\",value:function _getValue(){var t=this.strings,e=t.length-1;var i=\"\";for(var _s7=0;_s7<e;_s7++){i+=t[_s7];var _e1=this.parts[_s7];if(void 0!==_e1){var _t13=_e1.value;if(w(_t13)||!P(_t13))i+=\"string\"==typeof _t13?_t13:String(_t13);else{var _iterator3=pdbe_molstar_component_1_1_1_createForOfIteratorHelper(_t13),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _e10=_step3.value;i+=\"string\"==typeof _e10?_e10:String(_e10);}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}}}}return i+=t[e],i;}},{key:\"commit\",value:function commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()));}}]);}();var N=/*#__PURE__*/function(){function N(t){classCallCheck_default()(this,N);this.value=void 0,this.committer=t;}return createClass_default()(N,[{key:\"setValue\",value:function setValue(t){t===f||w(t)&&t===this.value||(this.value=t,_(t)||(this.committer.dirty=!0));}},{key:\"commit\",value:function commit(){for(;_(this.value);){var _t14=this.value;this.value=f,_t14(this);}this.value!==f&&this.committer.commit();}}]);}();var A=/*#__PURE__*/function(){function A(t){classCallCheck_default()(this,A);this.value=void 0,this.__pendingValue=void 0,this.options=t;}return createClass_default()(A,[{key:\"appendInto\",value:function appendInto(t){this.startNode=t.appendChild(c()),this.endNode=t.appendChild(c());}},{key:\"insertAfterNode\",value:function insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling;}},{key:\"appendIntoPart\",value:function appendIntoPart(t){t.__insert(this.startNode=c()),t.__insert(this.endNode=c());}},{key:\"insertAfterPart\",value:function insertAfterPart(t){t.__insert(this.startNode=c()),this.endNode=t.endNode,t.endNode=this.startNode;}},{key:\"setValue\",value:function setValue(t){this.__pendingValue=t;}},{key:\"commit\",value:function commit(){if(null===this.startNode.parentNode)return;for(;_(this.__pendingValue);){var _t15=this.__pendingValue;this.__pendingValue=f,_t15(this);}var t=this.__pendingValue;t!==f&&(w(t)?t!==this.value&&this.__commitText(t):t instanceof C?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):P(t)?this.__commitIterable(t):t===b?(this.value=b,this.clear()):this.__commitText(t));}},{key:\"__insert\",value:function __insert(t){this.endNode.parentNode.insertBefore(t,this.endNode);}},{key:\"__commitNode\",value:function __commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t);}},{key:\"__commitText\",value:function __commitText(t){var e=this.startNode.nextSibling,i=\"string\"==typeof(t=null==t?\"\":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=i:this.__commitNode(document.createTextNode(i)),this.value=t;}},{key:\"__commitTemplateResult\",value:function __commitTemplateResult(t){var e=this.options.templateFactory(t);if(this.value instanceof S&&this.value.template===e)this.value.update(t.values);else{var _i1=new S(e,t.processor,this.options),_s8=_i1._clone();_i1.update(t.values),this.__commitNode(_s8),this.value=_i1;}}},{key:\"__commitIterable\",value:function __commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());var e=this.value;var i,s=0;var _iterator4=pdbe_molstar_component_1_1_1_createForOfIteratorHelper(t),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _r9=_step4.value;i=e[s],void 0===i&&(i=new A(this.options),e.push(i),0===s?i.appendIntoPart(this):i.insertAfterPart(e[s-1])),i.setValue(_r9),i.commit(),s++;}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}s<e.length&&(e.length=s,this.clear(i&&i.endNode));}},{key:\"clear\",value:function clear(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.startNode;r(this.startNode.parentNode,t.nextSibling,this.endNode);}}]);}();var E=/*#__PURE__*/function(){function E(t,e,i){classCallCheck_default()(this,E);if(this.value=void 0,this.__pendingValue=void 0,2!==i.length||\"\"!==i[0]||\"\"!==i[1])throw new Error(\"Boolean attributes can only contain a single expression\");this.element=t,this.name=e,this.strings=i;}return createClass_default()(E,[{key:\"setValue\",value:function setValue(t){this.__pendingValue=t;}},{key:\"commit\",value:function commit(){for(;_(this.__pendingValue);){var _t16=this.__pendingValue;this.__pendingValue=f,_t16(this);}if(this.__pendingValue===f)return;var t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,\"\"):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=f;}}]);}();var B=/*#__PURE__*/function(_x){function B(t,e,i){var _this;classCallCheck_default()(this,B);_this=pdbe_molstar_component_1_1_1_callSuper(this,B,[t,e,i]),_this.single=2===i.length&&\"\"===i[0]&&\"\"===i[1];return _this;}inherits_default()(B,_x);return createClass_default()(B,[{key:\"_createPart\",value:function _createPart(){return new O(this);}},{key:\"_getValue\",value:function _getValue(){return this.single?this.parts[0].value:_superPropGet(B,\"_getValue\",this,3)([]);}},{key:\"commit\",value:function commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue());}}]);}(x);var O=/*#__PURE__*/function(_N){function O(){classCallCheck_default()(this,O);return pdbe_molstar_component_1_1_1_callSuper(this,O,arguments);}inherits_default()(O,_N);return createClass_default()(O);}(N);var T=!1;(function(){try{var _t17={get capture(){return T=!0,!1;}};window.addEventListener(\"test\",_t17,_t17),window.removeEventListener(\"test\",_t17,_t17);}catch(t){}})();var V=/*#__PURE__*/function(){function V(t,e,i){var _this2=this;classCallCheck_default()(this,V);this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=i,this.__boundHandleEvent=function(t){return _this2.handleEvent(t);};}return createClass_default()(V,[{key:\"setValue\",value:function setValue(t){this.__pendingValue=t;}},{key:\"commit\",value:function commit(){for(;_(this.__pendingValue);){var _t18=this.__pendingValue;this.__pendingValue=f,_t18(this);}if(this.__pendingValue===f)return;var t=this.__pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),s=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=R(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=f;}},{key:\"handleEvent\",value:function handleEvent(t){\"function\"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t);}}]);}();var R=function R(t){return t&&(T?{capture:t.capture,passive:t.passive,once:t.once}:t.capture);}/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */;function U(t){var e=I.get(t.type);void 0===e&&(e={stringsArray:new WeakMap(),keyString:new Map()},I.set(t.type,e));var i=e.stringsArray.get(t.strings);if(void 0!==i)return i;var s=t.strings.join(n);return i=e.keyString.get(s),void 0===i&&(i=new l(t,t.getTemplateElement()),e.keyString.set(s,i)),e.stringsArray.set(t.strings,i),i;}var I=new Map(),k=new WeakMap();/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */new(/*#__PURE__*//**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */function(){function _class(){classCallCheck_default()(this,_class);}return createClass_default()(_class,[{key:\"handleAttributeExpressions\",value:function handleAttributeExpressions(t,e,i,s){var r=e[0];if(\".\"===r){return new B(t,e.slice(1),i).parts;}if(\"@\"===r)return[new V(t,e.slice(1),s.eventContext)];if(\"?\"===r)return[new E(t,e.slice(1),i)];return new x(t,e,i).parts;}},{key:\"handleTextExpression\",value:function handleTextExpression(t){return new A(t);}}]);}())();/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */\"undefined\"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push(\"1.2.1\");var M=function M(t,e){return\"\".concat(t,\"--\").concat(e);};var j=!0;void 0===window.ShadyCSS?j=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn(\"Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1.\"),j=!1);var q=function q(t){return function(e){var i=M(e.type,t);var s=I.get(i);void 0===s&&(s={stringsArray:new WeakMap(),keyString:new Map()},I.set(i,s));var r=s.stringsArray.get(e.strings);if(void 0!==r)return r;var o=e.strings.join(n);if(r=s.keyString.get(o),void 0===r){var _i10=e.getTemplateElement();j&&window.ShadyCSS.prepareTemplateDom(_i10,t),r=new l(e,_i10),s.keyString.set(o,r);}return s.stringsArray.set(e.strings,r),r;};},D=[\"html\",\"svg\"],F=new Set(),$=function $(t,e,i){F.add(t);var s=i?i.element:document.createElement(\"template\"),r=e.querySelectorAll(\"style\"),n=r.length;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(s,t);var o=document.createElement(\"style\");for(var _t19=0;_t19<n;_t19++){var _e11=r[_t19];_e11.parentNode.removeChild(_e11),o.textContent+=_e11.textContent;}(function(t){D.forEach(function(e){var i=I.get(M(e,t));void 0!==i&&i.keyString.forEach(function(t){var e=t.element.content,i=new Set();Array.from(e.querySelectorAll(\"style\")).forEach(function(t){i.add(t);}),p(t,i);});});})(t);var a=s.content;i?function(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var s=t.element.content,r=t.parts;if(null==i)return void s.appendChild(e);var n=document.createTreeWalker(s,133,null,!1);var o=g(r),a=0,l=-1;for(;n.nextNode();){l++;for(n.currentNode===i&&(a=m(e),i.parentNode.insertBefore(e,i));-1!==o&&r[o].index===l;){if(a>0){for(;-1!==o;)r[o].index+=a,o=g(r,o);return;}o=g(r,o);}}}(i,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(s,t);var l=a.querySelector(\"style\");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(i){a.insertBefore(o,a.firstChild);var _t20=new Set();_t20.add(o),p(i,_t20);}};window.JSCompiler_renameProperty=function(t,e){return t;};var H={toAttribute:function toAttribute(t,e){switch(e){case Boolean:return t?\"\":null;case Object:case Array:return null==t?t:JSON.stringify(t);}return t;},fromAttribute:function fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t);}return t;}},L=function L(t,e){return e!==t&&(e==e||t==t);},G={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:L};var W=/*#__PURE__*/function(_HTMLElement){function W(){var _this3;classCallCheck_default()(this,W);_this3=pdbe_molstar_component_1_1_1_callSuper(this,W),_this3._updateState=0,_this3._instanceProperties=void 0,_this3._updatePromise=new Promise(function(t){return _this3._enableUpdatingResolver=t;}),_this3._changedProperties=new Map(),_this3._reflectingProperties=void 0,_this3.initialize();return _this3;}inherits_default()(W,_HTMLElement);return createClass_default()(W,[{key:\"initialize\",value:function initialize(){this._saveInstanceProperties(),this._requestUpdate();}},{key:\"_saveInstanceProperties\",value:function _saveInstanceProperties(){var _this4=this;this.constructor._classProperties.forEach(function(t,e){if(_this4.hasOwnProperty(e)){var _t21=_this4[e];delete _this4[e],_this4._instanceProperties||(_this4._instanceProperties=new Map()),_this4._instanceProperties.set(e,_t21);}});}},{key:\"_applyInstanceProperties\",value:function _applyInstanceProperties(){var _this5=this;this._instanceProperties.forEach(function(t,e){return _this5[e]=t;}),this._instanceProperties=void 0;}},{key:\"connectedCallback\",value:function connectedCallback(){this.enableUpdating();}},{key:\"enableUpdating\",value:function enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0);}},{key:\"disconnectedCallback\",value:function disconnectedCallback(){}},{key:\"attributeChangedCallback\",value:function attributeChangedCallback(t,e,i){e!==i&&this._attributeToProperty(t,i);}},{key:\"_propertyToAttribute\",value:function _propertyToAttribute(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:G;var s=this.constructor,r=s._attributeNameForProperty(t,i);if(void 0!==r){var _t22=s._propertyValueToAttribute(e,i);if(void 0===_t22)return;this._updateState=8|this._updateState,null==_t22?this.removeAttribute(r):this.setAttribute(r,_t22),this._updateState=-9&this._updateState;}}},{key:\"_attributeToProperty\",value:function _attributeToProperty(t,e){if(8&this._updateState)return;var i=this.constructor,s=i._attributeToPropertyMap.get(t);if(void 0!==s){var _t23=i.getPropertyOptions(s);this._updateState=16|this._updateState,this[s]=i._propertyValueFromAttribute(e,_t23),this._updateState=-17&this._updateState;}}},{key:\"_requestUpdate\",value:function _requestUpdate(t,e){var i=!0;if(void 0!==t){var _s9=this.constructor,_r0=_s9.getPropertyOptions(t);_s9._valueHasChanged(this[t],e,_r0.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==_r0.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map()),this._reflectingProperties.set(t,_r0))):i=!1;}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate());}},{key:\"requestUpdate\",value:function requestUpdate(t,e){return this._requestUpdate(t,e),this.updateComplete;}},{key:\"_enqueueUpdate\",value:function(){var _enqueueUpdate2=asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(){var t;return regenerator_default.a.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:this._updateState=4|this._updateState;_context.prev=1;_context.next=4;return this._updatePromise;case 4:_context.next=8;break;case 6:_context.prev=6;_context.t0=_context[\"catch\"](1);case 8:t=this.performUpdate();_context.t1=null!=t;if(!_context.t1){_context.next=13;break;}_context.next=13;return t;case 13:return _context.abrupt(\"return\",!this._hasRequestedUpdate);case 14:case\"end\":return _context.stop();}},_callee,this,[[1,6]]);}));function _enqueueUpdate(){return _enqueueUpdate2.apply(this,arguments);}return _enqueueUpdate;}()},{key:\"_hasRequestedUpdate\",get:function get(){return 4&this._updateState;}},{key:\"hasUpdated\",get:function get(){return 1&this._updateState;}},{key:\"performUpdate\",value:function performUpdate(){this._instanceProperties&&this._applyInstanceProperties();var t=!1;var e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated();}catch(e){throw t=!1,this._markUpdated(),e;}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e));}},{key:\"_markUpdated\",value:function _markUpdated(){this._changedProperties=new Map(),this._updateState=-5&this._updateState;}},{key:\"updateComplete\",get:function get(){return this._getUpdateComplete();}},{key:\"_getUpdateComplete\",value:function _getUpdateComplete(){return this._updatePromise;}},{key:\"shouldUpdate\",value:function shouldUpdate(t){return!0;}},{key:\"update\",value:function update(t){var _this6=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(function(t,e){return _this6._propertyToAttribute(e,_this6[e],t);}),this._reflectingProperties=void 0),this._markUpdated();}},{key:\"updated\",value:function updated(t){}},{key:\"firstUpdated\",value:function firstUpdated(t){}}],[{key:\"observedAttributes\",get:function get(){var _this7=this;this.finalize();var t=[];return this._classProperties.forEach(function(e,i){var s=_this7._attributeNameForProperty(i,e);void 0!==s&&(_this7._attributeToPropertyMap.set(s,i),t.push(s));}),t;}},{key:\"_ensureClassProperties\",value:function _ensureClassProperties(){var _this8=this;if(!this.hasOwnProperty(JSCompiler_renameProperty(\"_classProperties\",this))){this._classProperties=new Map();var _t24=Object.getPrototypeOf(this)._classProperties;void 0!==_t24&&_t24.forEach(function(t,e){return _this8._classProperties.set(e,t);});}}},{key:\"createProperty\",value:function createProperty(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:G;if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;var i=\"symbol\"==typeof_default()(t)?Symbol():\"__\"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s);}},{key:\"getPropertyDescriptor\",value:function getPropertyDescriptor(t,e,i){return{get:function get(){return this[e];},set:function set(i){var s=this[t];this[e]=i,this._requestUpdate(t,s);},configurable:!0,enumerable:!0};}},{key:\"getPropertyOptions\",value:function getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||G;}},{key:\"finalize\",value:function finalize(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty(\"finalized\")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map(),this.hasOwnProperty(JSCompiler_renameProperty(\"properties\",this))){var _t25=this.properties,_e12=[].concat(toConsumableArray_default()(Object.getOwnPropertyNames(_t25)),toConsumableArray_default()(\"function\"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(_t25):[]));var _iterator5=pdbe_molstar_component_1_1_1_createForOfIteratorHelper(_e12),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _i11=_step5.value;this.createProperty(_i11,_t25[_i11]);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}}}},{key:\"_attributeNameForProperty\",value:function _attributeNameForProperty(t,e){var i=e.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0;}},{key:\"_valueHasChanged\",value:function _valueHasChanged(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:L;return i(t,e);}},{key:\"_propertyValueFromAttribute\",value:function _propertyValueFromAttribute(t,e){var i=e.type,s=e.converter||H,r=\"function\"==typeof s?s:s.fromAttribute;return r?r(t,i):t;}},{key:\"_propertyValueToAttribute\",value:function _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;var i=e.type,s=e.converter;return(s&&s.toAttribute||H.toAttribute)(t,i);}}]);}(/*#__PURE__*/wrapNativeSuper_default()(HTMLElement));W.finalized=!0;/**\r\n@license\r\nCopyright (c) 2019 The Polymer Project Authors. All rights reserved.\r\nThis code may only be used under the BSD style license found at\r\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\r\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\r\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\r\npart of the polymer project is also subject to an additional IP rights grant\r\nfound at http://polymer.github.io/PATENTS.txt\r\n*/var z=\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype;Symbol();/**\r\n * @license\r\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at\r\n * http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at\r\n * http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at\r\n * http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at\r\n * http://polymer.github.io/PATENTS.txt\r\n */(window.litElementVersions||(window.litElementVersions=[])).push(\"2.3.1\");var J={};var K=/*#__PURE__*/function(_W){function K(){classCallCheck_default()(this,K);return pdbe_molstar_component_1_1_1_callSuper(this,K,arguments);}inherits_default()(K,_W);return createClass_default()(K,[{key:\"initialize\",value:function initialize(){_superPropGet(K,\"initialize\",this,3)([]),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles();}},{key:\"createRenderRoot\",value:function createRenderRoot(){return this.attachShadow({mode:\"open\"});}},{key:\"adoptStyles\",value:function adoptStyles(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?z?this.renderRoot.adoptedStyleSheets=t.map(function(t){return t.styleSheet;}):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(function(t){return t.cssText;}),this.localName));}},{key:\"connectedCallback\",value:function connectedCallback(){_superPropGet(K,\"connectedCallback\",this,3)([]),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this);}},{key:\"update\",value:function update(t){var _this9=this;var e=this.render();_superPropGet(K,\"update\",this,3)([t]),e!==J&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(function(t){var e=document.createElement(\"style\");e.textContent=t.cssText,_this9.renderRoot.appendChild(e);}));}},{key:\"render\",value:function render(){return J;}}],[{key:\"getStyles\",value:function getStyles(){return this.styles;}},{key:\"_getUniqueStyles\",value:function _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty(\"_styles\",this)))return;var t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){var _e14=function _e13(t,i){return t.reduceRight(function(t,i){return Array.isArray(i)?_e14(i,t):(t.add(i),t);},i);},_i12=_e14(t,new Set()),_s0=[];_i12.forEach(function(t){return _s0.unshift(t);}),this._styles=_s0;}else this._styles=[t];}}]);}(W);K.finalized=!0,K.render=function(t,e,i){if(!i||\"object\"!=typeof_default()(i)||!i.scopeName)throw new Error(\"The `scopeName` option is required.\");var s=i.scopeName,n=k.has(e),o=j&&11===e.nodeType&&!!e.host,a=o&&!F.has(s),l=a?document.createDocumentFragment():e;if(function(t,e,i){var s=k.get(e);void 0===s&&(r(e,e.firstChild),k.set(e,s=new A(Object.assign({templateFactory:U},i))),s.appendInto(e)),s.setValue(t),s.commit();}(t,l,Object.assign({templateFactory:q(s)},i)),a){var _t26=k.get(l);k.delete(l);var _i13=_t26.value instanceof S?_t26.value.template:void 0;$(s,l,_i13),r(e,e.firstChild),e.appendChild(l),k.set(e,_t26);}!n&&o&&window.ShadyCSS.styleElement(e.host);};var Q=/*#__PURE__*/function(_K){function Q(){classCallCheck_default()(this,Q);return pdbe_molstar_component_1_1_1_callSuper(this,Q,arguments);}inherits_default()(Q,_K);return createClass_default()(Q,[{key:\"validateParams\",value:function validateParams(){return!(!this.moleculeId&&!this.customDataUrl)&&!(this.customDataUrl&&!this.customDataFormat);}},{key:\"formatParam\",value:function formatParam(t){var _this0=this;var e={ligandLabelCompId:\"label_comp_id\",ligandAuthAsymId:\"auth_asym_id\",ligandAuthSeqId:\"auth_seq_id\",ligandHydrogens:\"hydrogens\"},i=Object.keys(e),s={hidePolymer:\"polymer\",hideWater:\"water\",hideHet:\"het\",hideCarbs:\"carbs\",hideNonStandard:\"nonStandard\",hideCoarse:\"coarse\"},r=Object.keys(s),n={hideExpandIcon:\"expand\",hideSelectionIcon:\"selection\",hideAnimationIcon:\"animation\"},o=Object.keys(n);if(\"customDataUrl\"==t||\"customDataFormat\"==t){if(this.initParams.customData)return;this.initParams.customData={url:this.customDataUrl,format:this.customDataFormat};}else if(i.indexOf(t)>-1){if(this.initParams.ligandView)return;this.initParams.ligandView=Object.assign({},{}),i.forEach(function(t){_this0[t]&&(_this0.initParams.ligandView[e[t]]=_this0[t]);});}else if([\"highlightColorR\",\"highlightColorG\",\"highlightColorB\"].indexOf(t)>-1&&this.highlightColorR&&this.highlightColorG&&this.highlightColorB)this.initParams.highlightColor={r:this.highlightColorR,g:this.highlightColorG,b:this.highlightColorB};else if([\"selectColorR\",\"selectColorG\",\"selectColorB\"].indexOf(t)>-1&&this.selectColorR&&this.selectColorG&&this.selectColorB)this.initParams.selectColor={r:this.selectColorR,g:this.selectColorG,b:this.selectColorB};else if([\"bgColorR\",\"bgColorG\",\"bgColorB\"].indexOf(t)>-1&&this.bgColorR&&this.bgColorG&&this.bgColorB)this.initParams.bgColor={r:this.bgColorR,g:this.bgColorG,b:this.bgColorB};else if(r.indexOf(t)>-1){if(this.initParams.hideStructure)return;this.initParams.hideStructure=[],r.forEach(function(t){_this0[t]&&_this0.initParams.hideStructure.push(s[t]);});}else if(o.indexOf(t)>-1){if(this.initParams.hideCanvasControls)return;this.initParams.hideCanvasControls=[],o.forEach(function(t){_this0[t]&&_this0.initParams.hideCanvasControls.push(n[t]);});}}},{key:\"createParamModel\",value:function createParamModel(){var t=[\"customDataUrl\",\"customDataFormat\",\"ligandLabelCompId\",\"bgColorR\",\"bgColorG\",\"bgColorB\",\"ligandAuthAsymId\",\"ligandAuthSeqId\",\"ligandHydrogens\",\"highlightColorR\",\"highlightColorG\",\"highlightColorB\",\"selectColorR\",\"selectColorG\",\"selectColorB\",\"hidePolymer\",\"hideWater\",\"hideHet\",\"hideCarbs\",\"hideNonStandard\",\"hideCoarse\",\"hideExpandIcon\",\"hideSelectionIcon\",\"hideAnimationIcon\"],e=this.constructor.properties;if(e)for(var _i14 in e)this[_i14]&&(this.initParams||(this.initParams=Object.assign({},{})),-1==t.indexOf(_i14)?this.initParams[_i14]=this[_i14]:this.formatParam(_i14));}},{key:\"connectedCallback\",value:function connectedCallback(){_superPropGet(Q,\"connectedCallback\",this,3)([]),this.createParamModel(),this.viewerInstance=new PDBeMolstarPlugin(),this.validateParams()&&this.initParams&&this.viewerInstance.render(this,this.initParams);}},{key:\"createRenderRoot\",value:function createRenderRoot(){return this;}}],[{key:\"properties\",get:function get(){return{moleculeId:{type:String,attribute:\"molecule-id\"},assemblyId:{type:String,attribute:\"assembly-id\"},customDataUrl:{type:String,attribute:\"custom-data-url\"},customDataFormat:{type:String,attribute:\"custom-data-format\"},customDataBinary:{type:Boolean,attribute:\"custom-data-binary\"},ligandLabelCompId:{type:String,attribute:\"ligand-label-comp-id\"},ligandAuthAsymId:{type:String,attribute:\"ligand-auth-asym-Id\"},ligandAuthSeqId:{type:String,attribute:\"ligand-auth-seq-id\"},ligandHydrogens:{type:Boolean,attribute:\"ligand-hydrogens\"},pdbeUrl:{type:String,attribute:\"pdbe-url\"},bgColorR:{type:Number,attribute:\"bg-color-r\"},bgColorG:{type:Number,attribute:\"bg-color-g\"},bgColorB:{type:Number,attribute:\"bg-color-b\"},loadMaps:{type:Boolean,attribute:\"load-maps\"},validationAnnotation:{type:Boolean,attribute:\"validation-annotation\"},domainAnnotation:{type:Boolean,attribute:\"domain-annotation\"},lowPrecisionCoords:{type:Boolean,attribute:\"low-precision\"},expanded:{type:Boolean,attribute:\"expanded\"},hideControls:{type:Boolean,attribute:\"hide-controls\"},subscribeEvents:{type:Boolean,attribute:\"subscribe-events\"},pdbeLink:{type:Boolean,attribute:\"pdbe-link\"},loadCartoonsOnly:{type:Boolean,attribute:\"load-cartoons-only\"},selectInteraction:{type:Boolean,attribute:\"select-interaction\"},landscape:{type:Boolean,attribute:\"landscape\"},highlightColorR:{type:Number,attribute:\"highlight-color-r\"},highlightColorG:{type:Number,attribute:\"highlight-color-g\"},highlightColorB:{type:Number,attribute:\"highlight-color-b\"},selectColorR:{type:Number,attribute:\"select-color-r\"},selectColorG:{type:Number,attribute:\"select-color-g\"},selectColorB:{type:Number,attribute:\"select-color-b\"},hidePolymer:{type:Boolean,attribute:\"hide-polymer\"},hideWater:{type:Boolean,attribute:\"hide-water\"},hideHet:{type:Boolean,attribute:\"hide-het\"},hideCarbs:{type:Boolean,attribute:\"hide-carbs\"},hideNonStandard:{type:Boolean,attribute:\"hide-non-standard\"},hideCoarse:{type:Boolean,attribute:\"hide-coarse\"},visualStyle:{type:String,attribute:\"visual-style\"},hideExpandIcon:{type:Boolean,attribute:\"hide-expand-icon\"},hideSelectionIcon:{type:Boolean,attribute:\"hide-selection-icon\"},hideAnimationIcon:{type:Boolean,attribute:\"hide-animation-icon\"}};}}]);}(K);e.default=Q;customElements.define(\"pdbe-molstar\",Q);}]);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component.css\nvar pdbe_molstar_component = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component.css\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.less\nvar pbd_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.js\n\nfunction pbd_01_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = pbd_01_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction pbd_01_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return pbd_01_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? pbd_01_arrayLikeToArray(r, a) : void 0; } }\nfunction pbd_01_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction pbd_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction pbd_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? pbd_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : pbd_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n//https://www.ebi.ac.uk/pdbe/ -> modely ke stažení\n//https://github.com/molstar/pdbe-molstar/wiki -> dokumentace\n\n\n\n\n/* harmony default export */ var pbdviewer_pbd_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"pbd-01\",\n  title: \"PBD model viewer\",\n  subtitle: \"\",\n  contentSetting: {\n    useId: {\n      name: \"Do you want to use modelId instead of URL?\",\n      help: \"YES = ID, NO = URL\",\n      type: \"bool\"\n    },\n    modelUrl: {\n      name: \"Model URL (pdb) / Model ID (available at https://www.ebi.ac.uk/pdbe/)\",\n      type: \"textarea\"\n    },\n    ions: {\n      name: \"Ions\",\n      type: \"textarea\",\n      help: \"Multiple ions separate with comma (,)\"\n    },\n    assemblyId: {\n      name: \"Assembly ID\",\n      type: \"textarea\",\n      help: \"'prefered' is default\"\n    },\n    visualStyle: {\n      name: \"Visual style\",\n      type: \"select\",\n      options: [{\n        title: \"default\",\n        value: \"default\"\n      }, {\n        title: \"cartoon\",\n        value: \"cartoon\"\n      }, {\n        title: \"ball-and-stick\",\n        value: \"ball-and-stick\"\n      }, {\n        title: \"carbohydrate\",\n        value: \"carbohydrate\"\n      }, {\n        title: \"distance-restraint\",\n        value: \"distance-restraint\"\n      }, {\n        title: \"ellipsoid\",\n        value: \"ellipsoid\"\n      }, {\n        title: \"gaussian-surface\",\n        value: \"gaussian-surface\"\n      }, {\n        title: \"molecular-surface\",\n        value: \"molecular-surface\"\n      }, {\n        title: \"point\",\n        value: \"point\"\n      }, {\n        title: \"putty\",\n        value: \"putty\"\n      }, {\n        title: \"spacefill\",\n        value: \"spacefill\"\n      }]\n    },\n    modelDescription: {\n      name: \"Description of model\",\n      type: \"textEditor\"\n    },\n    rotate: {\n      name: \"Auto model rotation\",\n      help: \"Model do a one full spin (30s)\",\n      type: \"bool\",\n      hidden: {\n        infinitRotation: {\n          name: \"Infinite rotation\",\n          type: \"bool\"\n        }\n      }\n    },\n    hidePolymer: {\n      name: \"Hide polymer\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    useId: false,\n    modelUrl: \"https://raw.githubusercontent.com/creative-connections/Bodylight-Scenarios/master/ironmetabolism/heme.pdb\",\n    modelDescription: \"Model description\",\n    visualStyle: \"cartoon\",\n    hidePolymer: false,\n    rotate: true,\n    infinitRotation: true,\n    ions: \"\",\n    assemblyId: \"\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n            <div class=\\\"container\\\">\\n                <div class=\\\"pbd-view\\\" id=\\\"pbd-view-\".concat(builder.id, \"\\\" style=\\\"width: 100%;height: 500px;position: relative;\\\">\\n                </div>\\n            </div>\\n            <div class=\\\"model-description\\\">\").concat(content.modelDescription, \"</div>\\n           \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      try {\n        var app = builder.app;\n        var content = builder.params.content;\n        var viewerInstance = null;\n        viewerInstance = new PDBeMolstarPlugin();\n        var url = content.modelUrl;\n        url = app.apiManager.replaceMediaServerPlaceholder(url);\n        var id = \"#pbd-view-\" + builder.params.id;\n        var viewerContainer = $builderEl.find(id)[0];\n\n        //pokud existuje view odstranit a znovu přidat. (zůstava tam jinak vyset reactDOM a hazí errory při změně modelu)\n        if (viewerContainer) {\n          $$(viewerContainer).remove();\n          $$($builderEl.find(\".container\").append(\"  <div class=\\\"pbd-view\\\" id=\\\"pbd-view-\".concat(builder.params.id, \"\\\" style=\\\"width: 100%;height: 500px;position: relative;\\\">\")));\n          viewerContainer = $builderEl.find(id)[0];\n        }\n        var modelId = content.useId;\n        var options = {\n          pdbeLink: false,\n          visualStyle: \"\".concat(content.visualStyle == \"default\" ? \"\" : content.visualStyle),\n          hideStructure: [\"\".concat(content.hidePolymer ? \"polymer\" : \"\")],\n          assemblyId: \"\".concat(content.assemblyId.length > 0 ? content.assemblyId : \"prefered\")\n        };\n        if (!modelId) {\n          options = pbd_01_objectSpread(pbd_01_objectSpread({}, options), {}, {\n            customData: {\n              url: url,\n              format: \"pdb\"\n            }\n          });\n        } else {\n          options = pbd_01_objectSpread(pbd_01_objectSpread({}, options), {}, {\n            moleculeId: url\n          });\n        }\n        var color = builder.app.utils.colorHexToRgb(builder.app.book.params.color);\n        options = pbd_01_objectSpread(pbd_01_objectSpread({}, options), {}, {\n          bgColor: {\n            r: 255,\n            g: 255,\n            b: 255\n          },\n          highlightColor: {\n            r: color[0],\n            g: color[1],\n            b: color[2]\n          },\n          expanded: false,\n          hideControls: true,\n          lighting: \"plastic\"\n        });\n        // debugger;\n        viewerInstance.render(viewerContainer, options);\n\n        //IONS generace\n        var selectIonsSection = [];\n        if (content.ions.length > 0) {\n          var ions = content.ions.split(\",\");\n          var i = 3;\n          var _iterator = pbd_01_createForOfIteratorHelper(ions),\n            _step;\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var ion = _step.value;\n              var ionColor = this.params.methods.selectColor(i++);\n              selectIonsSection.push({\n                label_comp_id: ion,\n                representation: \"gaussian-surface\",\n                representationColor: {\n                  r: ionColor[0],\n                  g: ionColor[1],\n                  b: ionColor[2]\n                }\n              });\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n\n        //Rotace s opožděním (aby se stihlo vyrenderovat)\n        if (content.rotate) {\n          setTimeout(function () {\n            viewerInstance.visual.toggleSpin(true);\n          }, 1500);\n          if (!content.infinitRotation) {\n            setTimeout(function () {\n              viewerInstance.visual.toggleSpin(false);\n            }, 30000);\n          }\n        }\n        if (content.ions.length > 0) {\n          setTimeout(function () {\n            viewerInstance.visual.select({\n              data: selectIonsSection\n            });\n          }, 1500);\n        }\n      } catch (e) {\n        console.error(\"%c PDB Viewer\", e, \"color: red\");\n      }\n    }\n  },\n  methods: {\n    selectColor: function selectColor(index) {\n      var saturation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 75;\n      var lightness = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 65;\n      var app = this.app;\n      var hue = (index - 1) * 137.508; // use golden angle approximation\n      return app.utils.colorHslToRgb(hue / 360, saturation / 100, lightness / 100);\n    }\n  }\n});\n// EXTERNAL MODULE: ./node_modules/libgif/libgif.js\nvar libgif = __webpack_require__(\"./node_modules/libgif/libgif.js\");\nvar libgif_default = /*#__PURE__*/__webpack_require__.n(libgif);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-gif-01.js\n\n/* harmony default export */ var bodylight_gif_01 = ({\n  name: \"bodylight-gif-01\",\n  title: \"GIF\",\n  subtitle: \"Bodylight simulation\",\n  contentSetting: {\n    url: {\n      name: \"GIF URL\",\n      type: \"image\"\n    },\n    autoplay: {\n      name: \"Autoplay\",\n      type: \"bool\"\n    },\n    gifWidth: {\n      name: \"Width of GIF (px)\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    url: \"https://raw.githubusercontent.com/creative-connections/Bodylight-Scenarios/master/hemodynamics/heart.gif\",\n    autoplay: false,\n    gifWidth: 500\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"gif-container\\\">\\n      <img class=\\\"gif-\".concat(component.params.id, \"\\\" src=\\\"\").concat(content.url, \"\\\"/>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var content = component.params.content;\n      var app = component.app;\n      var container = $componentEl.find(\".gif-container\");\n      var parsedUrl = app.apiManager.replaceMediaServerPlaceholder(content.url);\n      container.html(\"<img class=\\\"gif-\".concat(component.params.id, \"\\\" src=\\\"\").concat(parsedUrl, \"\\\"/>\"));\n      var ref = \".gif-\" + component.params.id;\n      var refEl = $$($componentEl).find(ref)[0];\n      var gif = new libgif_default.a({\n        gif: refEl,\n        auto_play: content.autoplay,\n        rubbable: true,\n        max_width: content.gifWidth\n      });\n      gif.load(function () {});\n    }\n  },\n  methods: {\n    reset: function reset() {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js\nvar bodylight_adobe_anim_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js\nvar bodylignt_fmi_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.less\nvar bodylight_range_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.js\n/*\r\n * AURELIA ONLINE\r\n * COMPONENT LIFECYCLE:\r\n * 1. constructor();\r\n * 2. created()\r\n * 3. bind()\r\n * 4. attached()\r\n * 5. detached()\r\n * 6. unbind()\r\n */\n\n\n/* harmony default export */ var _lf1_devel_bodylight_range_01 = ({\n  name: \"bodylight-range-01\",\n  title: \"Range controller\",\n  subtitle: \"\",\n  contentSetting: {\n    controllerId: {\n      name: \"ID of this controller\",\n      type: \"textarea\"\n    },\n    title: {\n      name: \"Title of range\",\n      type: \"textEditor\"\n    },\n    unit: {\n      name: \"Unit of range\",\n      type: \"textEditor\"\n    },\n    step: {\n      name: \"Step size of slider\",\n      type: \"input-number\"\n    },\n    min: {\n      name: \"Min value of slider\",\n      type: \"input-number\"\n    },\n    max: {\n      name: \"Max value of slider\",\n      type: \"input-number\"\n    },\n    default: {\n      name: \"Default value of slider\",\n      type: \"input-number\"\n    }\n  },\n  content: {\n    controllerId: \"id1\",\n    min: 0,\n    max: 1000,\n    step: 1,\n    default: 219,\n    title: \"Koncentrace železa v potravě\",\n    unit: \"[[[\\\\frac{ug}{h}]]]\"\n  },\n  helpers: {},\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"range-container\\\">\\n        <div class=\\\"title\\\">\\n        \".concat(content.title, \"\\n        </div>\\n        <div class=\\\"range-select\\\">\\n            <button class=\\\"button button-fill button-raised range-reset\\\"><i class=\\\"icon material-icons\\\" data-icon=\\\"refresh\\\"></i></button>\\n            <div class=\\\"range-slider\\\"></div>\\n            <div class=\\\"input-container\\\">\\n              <input class=\\\"range-input\\\" type=\\\"number\\\" placeholder=\\\"\").concat(content.default, \"\\\" />\\n              <div class=\\\"unit-container\\\">  \\n              \").concat(content.unit, \"\\n              </div>\\n            </div>\\n        </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var app = this.app;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var input = $componentEl.find(\".range-input\");\n      var sliderEl = $componentEl.find(\".range-slider\");\n      var resetBtn = $componentEl.find(\".range-reset\");\n      var sliderInst = app.range.create({\n        el: sliderEl,\n        min: content.min,\n        max: content.max,\n        step: content.step,\n        value: content.default\n      });\n      var fixed = 0;\n      if (content.step) {\n        fixed = String(content.step).split(\".\").length - 1;\n      }\n      resetBtn.on(\"click\", function () {\n        sliderInst.setValue(content.default);\n        input.val(content.default);\n      });\n      input.on(\"change\", function () {\n        if (input > content.max) input.val(content.max);\n        if (input < content.min) input.val(content.min);\n        sliderInst.setValue(parseFloat(input.val()).toFixed(fixed));\n      });\n      sliderInst.on(\"change\", function () {\n        var newVal = sliderInst.getValue();\n        input.val(parseFloat(newVal).toFixed(fixed));\n        app.data.myEvents.emit(\"bodylight:changed\", {\n          id: content.controllerId,\n          value: newVal\n        });\n      });\n\n      // CONSTRUCTOR\n      //CREATED\n      //BIND\n\n      //ATTACHED\n    }\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.less\nvar bodylight_checkbox_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.js\n/*\r\n * AURELIA ONLINE\r\n * COMPONENT LIFECYCLE:\r\n * 1. constructor();\r\n * 2. created()\r\n * 3. bind()\r\n * 4. attached()\r\n * 5. detached()\r\n * 6. unbind()\r\n */\n\n\n/* harmony default export */ var _lf1_devel_bodylight_checkbox_01 = ({\n  name: \"bodylight-checkbox-01\",\n  title: \"Checkbox controller\",\n  subtitle: \"\",\n  contentSetting: {\n    controllerId: {\n      name: \"ID of this controller\",\n      type: \"textarea\"\n    },\n    title: {\n      name: \"Title text\",\n      type: \"textEditor\"\n    },\n    textActive: {\n      name: \"Text when active\",\n      type: \"textEditor\"\n    },\n    textInactive: {\n      name: \"Text when inactive\",\n      type: \"textEditor\"\n    },\n    defaultState: {\n      name: \"Checked as default?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    controllerId: \"id2\",\n    title: \"Knockout genu pro ferroportin(Fpn)\",\n    textActive: \"gen Fpn je aktivní\",\n    textInactive: \"gen Fpn je knockoutován\",\n    defaultState: \"true\"\n  },\n  helpers: {},\n  html: function html(content, builder, styles, component) {\n    return \"\\n      <div class=\\\"checkbox-container\\\">\\n        <div class=\\\"title\\\">\\n                \".concat(content.title, \"\\n        </div>\\n        <div class=\\\"selection-container\\\">\\n          <div class=\\\"checkbox-block\\\">\\n          <label class=\\\"checkbox\\\"><input class=\\\"checkbox-input\\\" \").concat(content.defaultState ? \"checked\" : \"\", \" type=\\\"checkbox\\\" /><i class=\\\"icon-checkbox\\\"></i></label>\\n          </div>\\n          <div class=\\\"text-after\\\">\\n              \").concat(content.defaultState ? content.textActive : content.textInactive, \"\\n          </div>\\n        </div>\\n      </div>\\n      \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var app = this.app;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var checkboxEl = $componentEl.find(\".checkbox-input\");\n      var textAfterEl = $componentEl.find(\".text-after\");\n      checkboxEl.on(\"change\", function () {\n        var checked = checkboxEl.prop(\"checked\");\n        var newVal = 0;\n        if (checked) {\n          newVal = 1;\n          textAfterEl.text(content.textActive);\n        } else {\n          textAfterEl.text(content.textInactive);\n        }\n        app.data.myEvents.emit(\"bodylight:changed\", {\n          id: content.controllerId,\n          value: newVal\n        });\n      });\n\n      // CONSTRUCTOR\n      //CREATED\n      //BIND\n\n      //ATTACHED\n    }\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.less\nvar bodylight_button_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.js\n/*\r\n * AURELIA ONLINE\r\n * COMPONENT LIFECYCLE:\r\n * 1. constructor();\r\n * 2. created()\r\n * 3. bind()\r\n * 4. attached()\r\n * 5. detached()\r\n * 6. unbind()\r\n */\n\n\n/* harmony default export */ var _lf1_devel_bodylight_button_01 = ({\n  name: \"bodylight-button-01\",\n  title: \"Button controller\",\n  subtitle: \"\",\n  contentSetting: {\n    controllerId: {\n      name: \"ID of this controller\",\n      type: \"textarea\"\n    },\n    title: {\n      name: \"Title text\",\n      type: \"textEditor\"\n    },\n    buttonText: {\n      name: \"Button texte\",\n      type: \"textEditor\"\n    },\n    value: {\n      name: \"Value of button\",\n      type: \"textarea\"\n    }\n    // resetValues: {\n    //   name: \"Reset values\",\n    //   type: \"bool\",\n    // },\n    // tickToReset: {\n    //   name: \"Ticks to reset\",\n    //   type: \"input-number\",\n    // },\n  },\n  content: {\n    controllerId: \"id3\",\n    title: \"LPS injekce jednorázová 1ug při stisknutí\",\n    buttonText: \"LPS injekce\",\n    value: \"1\"\n  },\n  helpers: {\n    currentTick: 0\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n        <div class=\\\"button-container\\\">\\n          <div class=\\\"title\\\">\\n            \".concat(content.title, \"\\n          </div>\\n          <button class=\\\"col button button-fill button-action\\\">\").concat(content.buttonText, \"</button>\\n        </div>\\n        \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var app = this.app;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var buttonEl = $componentEl.find(\".button-action\");\n      buttonEl.on(\"click\", function (e) {\n        app.data.myEvents.emit(\"bodylight:changed\", {\n          id: content.controllerId,\n          value: content.value\n        });\n      });\n\n      //TODO\n      //   if(content.resetValues){\n      //     app.data.myEvents.on(\"fmidata\", (e) =>{\n      //         helpers.currentTick++;\n      //         if(helpers.currentTick >= content.tickToReset){\n\n      //         }\n      //     });\n      //   }\n\n      // CONSTRUCTOR\n      //CREATED\n      //BIND\n\n      //ATTACHED\n    }\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.less\nvar icon_list_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.js\n\n\nfunction icon_list_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction icon_list_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? icon_list_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : icon_list_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var icon_list_icon_list_01 = ({\n  name: \"icon-list-01\",\n  title: \"List with icon\",\n  subtitle: \"horizontal\",\n  contentSetting: {\n    items: {\n      name: \"List item\",\n      type: \"array\",\n      values: {\n        icon: {\n          name: \"Icon\",\n          type: \"icon\"\n        },\n        iconText: {\n          name: \"Icon text\",\n          type: \"textarea\"\n        },\n        text: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        },\n        isLink: {\n          name: \"List item as link?\",\n          type: \"bool\",\n          hidden: {\n            itemLink: {\n              name: \"Item link\",\n              type: \"action\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    items: [{\n      icon: {\n        name: \"help\",\n        type: \"material-icons\",\n        custom: false,\n        id: \"\"\n      },\n      iconText: \"\",\n      text: \"Item list text\",\n      isLink: false,\n      itemLink: {\n        anchor: \"\",\n        class: \"\",\n        title: \"\",\n        type: \"\",\n        url: \"\"\n      }\n    }, {\n      icon: '<i class=\"icon f7-icons\" contenteditable=\"false\" data-icon=\"logo_google\"></i>',\n      iconText: \"\",\n      text: \"Google\",\n      isLink: true,\n      itemLink: {\n        anchor: \"\",\n        class: \"\",\n        title: \"\",\n        type: \"external\",\n        url: \"https://google.com\"\n      }\n    }]\n  },\n  helpers: {},\n  html: function html(content, builder, styles, component) {\n    var list = [];\n    //   debugger;\n    content.items.forEach(function (item, index) {\n      var innerEl = \"\\n              <span class=\\\"icon-container\\\">\\n                  <span class=\\\"icon\\\">\\n                  \".concat(typeof_default()(item.icon) == \"object\" ? \"<i class=\\\"icon \".concat(item.icon.type, \"\\\" data-icon=\\\"\").concat(item.icon.name, \"\\\"></i>\") : \"\".concat(item.icon), \"\\n                  </span>\\n                \").concat(item.iconText.length > 0 ? \"<span class=\\\"icon-text\\\">\".concat(item.iconText, \"</span>\") : \"\", \"\\n              </span>\\n              <span class=\\\"text-container\\\">\\n                  <span class=\\\"text\\\">\\n                  \").concat(item.text, \"\\n                  </span>\\n              </span>\\n              \").concat(index + 1 <= content.items.length ? \"<span class='divider'></span>\" : \"\", \"\\n      \");\n      // debugger;\n\n      var el = innerEl;\n      if (item.isLink) {\n        el = component.app.link.createLinkElement(icon_list_01_objectSpread(icon_list_01_objectSpread({}, item.itemLink), {}, {\n          title: innerEl\n        }));\n      }\n      list.push(el);\n    });\n    return \"\\n    <div class=\\\"icon-list-container\\\">\\n    \".concat(list.map(function (li, index) {\n      return \"\\n    <span class=\\\"icon-item\\\">\\n      \".concat(li, \"\\n    </span>\");\n    }).join(\"\"), \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      var self = this;\n    }\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.less\nvar icon_list_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.js\n\n\nvar iconList02 = _.cloneDeep(icon_list_icon_list_01);\niconList02.name = \"icon-list-02\";\niconList02.title = \"List with icon\";\niconList02.subtitle = \"vertical\";\n/* harmony default export */ var icon_list_icon_list_02 = (iconList02);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.less\nvar icon_list_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.js\n\n\nvar iconList03 = _.cloneDeep(icon_list_icon_list_01);\niconList03.name = \"icon-list-03\";\niconList03.title = \"List with icon\";\niconList03.subtitle = \"horizontal with icon on top\";\n/* harmony default export */ var icon_list_icon_list_03 = (iconList03);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_development/mm-01.less\nvar mm_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_development/mm-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_development/mm-01.js\n\nfunction mm_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction mm_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? mm_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : mm_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var _development_mm_01 = ({\n  name: \"mm-01\",\n  title: \"Mind map\",\n  subtitle: \"\",\n  contentSetting: {\n    instruction: {\n      name: \"How to set default MindMap\",\n      type: \"instruction\",\n      text: \"To save current mind map as default value, pleas click on save icon (<i style='color: var(--f7-theme-color);' class='material-icons'>save</i>) in the top right part of component.\"\n    }\n  },\n  content: {\n    mapData: \"{\\\"ideas\\\":{\\\"1\\\":{\\\"title\\\":\\\"Ko\\u0159en\\\",\\\"id\\\":1,\\\"attr\\\":{\\\"position\\\":[354,103.41665649414062,1]},\\\"ideas\\\":{}}},\\\"links\\\":[]}\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div id=\\\"mm-\".concat(builder.id, \"\\\" class=\\\"mindmap-container no-select swiper-no-swiping\\\" data-map-id=\\\"1\\\"></div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var id = component.params.id;\n      var app = component.app;\n      var dev = component.builder.params.development.enable;\n      var mapData = JSON.parse(component.params.content.mapData);\n      var container = $componentEl.find(\"#mm-\".concat(id));\n      var map1 = mm_01_objectSpread({\n        id: component.params.id,\n        formatVersion: 3\n      }, mapData);\n      container.empty();\n      app.mindMaps.create(\"#mm-\".concat(id), map1);\n      if (dev) {\n        var _container = $componentEl.find(\".save-container\");\n        var mapId = _container.data(\"map-id\");\n        var button = \"<a href=\\\"#\\\" class=\\\"save-btn btn\\\"><i class=\\\"material-icons\\\">save</i></a>\";\n        _container.append(button);\n        $componentEl.find(\".save-btn\").on(\"click\", function () {\n          var data = app.mindMaps.getData();\n          var dataToSave = JSON.stringify(data);\n          component.params.content.mapData = dataToSave;\n          var dialog = app.dialog.alert(app.translation.t(\"mindMaps:saveText\"), app.translation.t(\"mindMaps:saveTitle\"));\n          dialog.open();\n        });\n      }\n    },\n    update: function update($componentEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards.less\nvar match_cards = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards-01.js\n\n\n\n/* harmony default export */ var match_cards_01 = ({\n  name: \"match-cards-01\",\n  title: \"Match cards\",\n  subtitle: \"with background revealing\",\n  cast: ['dd-pairs-01'],\n  contentSetting: {\n    label: {\n      name: \"Task label\",\n      type: \"textEditor\"\n    },\n    useImage: {\n      name: \"Use background image?\",\n      type: \"bool\",\n      hidden: {\n        bgImage: {\n          name: \"Background Image\",\n          type: \"image\"\n        }\n      }\n    },\n    items: {\n      name: \"Items\",\n      type: \"array\",\n      values: {\n        left: {\n          name: \"First of pair\",\n          type: \"textEditor\"\n        },\n        right: {\n          name: \"Second of pair\",\n          type: \"textEditor\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Match cards\",\n    useImage: true,\n    bgImage: \"{{mediaServerDomain}}/public/nnhji1k7bt397bar2nd9iodmpapn7kkh9djlw0aa8h0p7sydhixgsvvlfbsb6z24.jpeg\",\n    items: [{\n      left: \"Question 1\",\n      right: \"Answer 1\",\n      value: 1\n    }, {\n      left: \"Question 2\",\n      right: \"Answer 2\",\n      value: 1\n    }]\n  },\n  helpers: {\n    selRef: null,\n    selId: null,\n    cardArray: [],\n    score: 0,\n    inProgress: false,\n    originalCards: [],\n    reset: false\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var cardsChanged = false;\n    if (!_.isEqual(component.params.helpers.originalCards, content.items)) {\n      cardsChanged = true;\n    }\n    if (component.params.helpers.reset || cardsChanged) {\n      component.params.helpers.originalCards = content.items;\n      component.params.helpers.cardArray = [];\n      content.items.forEach(function (card) {\n        component.params.helpers.cardArray.push({\n          id: card.id,\n          text: card.left\n        });\n        component.params.helpers.cardArray.push({\n          id: card.id,\n          text: card.right\n        });\n      });\n      component.params.helpers.cardArray = _.shuffle(component.params.helpers.cardArray);\n      component.params.helpers.reset = false;\n    }\n    var size = Math.round(Math.sqrt(component.params.helpers.cardArray.length));\n\n    // debugger;\n\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    \".concat(content.label.length > 0 ? \"<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n    <div class=\\\"match-cards-container\\\" style=\\\"--size: \").concat(size, \" ; \").concat(content.useImage ? \"background-image: url('\".concat(content.bgImage, \"')\") : \"\", \"\\\">\\n        <div class=\\\"inner-container\\\">\\n            \").concat(component.params.helpers.cardArray.map(function (data) {\n      return \"\\n                <div class=\\\"match-card no-select\\\" data-id=\\\"\".concat(data.id, \"\\\">\\n                  <div class=\\\"card-inner\\\">\\n                    <span class=\\\"card-text\\\">\").concat(data.text, \"</span>\\n                    </div>\\n                </div>\\n              \");\n    }).join(\"\"), \"\\n        </div>\\n    </div>\");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var cards = $builderEl.find(\".match-card\");\n      var params = component.params;\n      var helpers = params.helpers;\n      cards.off(\"click\");\n      cards.on(\"click\", function (e) {\n        if (!helpers.inProgress) {\n          helpers.inProgress = true;\n          var target = $$(e.target);\n          if (!target.hasClass(\"match-card\")) {\n            target = target.parents(\".match-card\");\n          }\n          var id = target.data(\"id\");\n          if (!target.hasClass(\"correct\")) {\n            if (target.hasClass(\"sel\")) {\n              target.removeClass(\"sel\");\n              helpers.selId = null;\n              helpers.selRef = null;\n              helpers.inProgress = false;\n            } else {\n              if (helpers.selId == null) {\n                target.addClass(\"sel\");\n                helpers.selId = id;\n                helpers.selRef = target;\n                helpers.inProgress = false;\n              } else {\n                component.params.methods.checkMatch(target, $builderEl, component);\n              }\n            }\n          } else {\n            helpers.inProgress = false;\n          }\n        }\n      });\n      component.app.data.myEvents.on(\"form:reset\", function (e) {\n        component.params.helpers = params.methods.helpersReset(helpers);\n        component.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var helpers = builder.params.helpers;\n      var id = $builderEl[0].id;\n      var content = builder.params.content;\n      var points = helpers.score;\n      var maxPoints = parseFloat(_.sumBy(content.items, function (card) {\n        if (!card.deleted) return parseFloat(card.value);\n      }));\n      var res = false;\n      if (points == maxPoints) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    checkMatch: function checkMatch(target, $builderEl, builder) {\n      var params = this.params;\n      var helpers = params.helpers;\n      var id = target.data(\"id\");\n      if (helpers.selId == id) {\n        helpers.selRef.addClass(\"correct\");\n        target.addClass(\"correct\");\n        // helpers.score++;\n        var item = _.find(params.content.items, function (o) {\n          return o.id == id;\n        });\n        // debugger;\n        helpers.score += parseFloat(item.value);\n        builder.params.methods.answerEmittor($builderEl, builder);\n      } else {\n        helpers.selRef.addClass(\"incorrect\");\n        target.addClass(\"incorrect\");\n      }\n      helpers.selRef.removeClass(\"sel\");\n      setTimeout(function () {\n        helpers.selRef.removeClass(\"incorrect\");\n        target.removeClass(\"incorrect\");\n        helpers.selId = null;\n        helpers.selRef = null;\n        helpers.inProgress = false;\n      }, 500);\n    },\n    helpersReset: function helpersReset(helpersRef) {\n      return helpersRef = {\n        selRef: null,\n        selId: null,\n        cardArray: [],\n        score: 0,\n        inProgress: false,\n        originalCards: [],\n        reset: true\n      };\n    },\n    eval: function _eval(component, formComponent) {\n      // let _this = this;\n      //   debugger;\n      var $builderEl = component.$block;\n      var showResult = formComponent.params.content.showResult;\n      var showCorrect = formComponent.params.content.showCorrectAnswers;\n      var helpers = component.params.helpers;\n      var el = component.$block;\n\n      //Získání bodů\n      var points = helpers.score;\n      var maxPoints = parseFloat(_.sumBy(component.params.content.items, function (card) {\n        if (!card.deleted) return parseFloat(card.value);\n      }));\n      // debugger;\n\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      maxPoints = Object(parsePoints[\"formatNumber\"])(maxPoints);\n\n      //Show result badge\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        var $canvas = $builderEl.find(\"canvas\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-fail\")) $canvas.removeClass(\"result-fail\");\n        if ($canvas.hasClass(\"result-success\")) $canvas.removeClass(\"result-success\");\n        $resultBadge.addClass(classResult);\n        $canvas.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrect) {\n        component.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var $builderEl = component.$block;\n      var obj = [];\n      var al = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n      component.params.content.items.forEach(function (card, index) {\n        if (!card.deleted) {\n          obj.push({\n            id: card.id,\n            index: al[index]\n          });\n        }\n      });\n      var cards = $builderEl.find(\".match-card\");\n      cards.forEach(function (card) {\n        var cardEl = $$(card);\n        var id = cardEl.data(\"id\");\n        var find = _.find(obj, function (o) {\n          return o.id == id;\n        });\n        // debugger;\n        var index = find.index;\n        if (!cardEl.hasClass(\"correct\")) {\n          cardEl.append(\"<span class=\\\"solution-badge\\\">\".concat(index, \"</span>\"));\n        }\n      });\n    }\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards-02.js\n\n\n\n// import lodash from \"lodash\";\n\nvar matchCards02 = _.cloneDeep(match_cards_01);\nmatchCards02.name = \"match-cards-02\";\nmatchCards02.subtitle = \"with reaveling text\";\nmatchCards02.contentSetting = {\n  label: {\n    name: \"Task label\",\n    type: \"textEditor\"\n  },\n  items: {\n    name: \"Items\",\n    type: \"array\",\n    values: {\n      left: {\n        name: \"First of pair\",\n        type: \"textEditor\"\n      },\n      firstText: {\n        name: \"Text of firs card after correct match\",\n        type: \"textarea\"\n      },\n      right: {\n        name: \"Second of pair\",\n        type: \"textEditor\"\n      },\n      secondText: {\n        name: \"Text of second card after correct match\",\n        type: \"textarea\"\n      },\n      value: {\n        name: \"Point value\",\n        type: \"input-number\"\n      }\n    }\n  }\n};\nmatchCards02.content = {\n  label: \"Match cards\",\n  items: [defineProperty_default()(defineProperty_default()({\n    left: \"Question 1\",\n    firstText: \"Result 1 A\",\n    right: \"Answer 1\",\n    secondText: \"Result 1 B\"\n  }, \"left\", \"Question 1\"), \"value\", 1), {\n    left: \"Question 2\",\n    firstText: \"Result 2 A\",\n    right: \"Answer 2\",\n    secondText: \"Result 2 B\",\n    value: 1\n  }]\n};\nmatchCards02.on.init = function ($builderEl, component) {\n  var cards = $builderEl.find(\".match-card\");\n  var params = component.params;\n  var helpers = params.helpers;\n  cards.off(\"click\");\n  cards.on(\"click\", function (e) {\n    // debugger;\n    var target = $$(e.target);\n    if (!helpers.inProgress && !target.hasClass(\"correct\")) {\n      helpers.inProgress = true;\n      if (!target.hasClass(\"match-card\")) {\n        target = target.parents(\".match-card\");\n      }\n      var id = target.data(\"id\");\n      if (!target.hasClass(\"correct\")) {\n        if (target.hasClass(\"sel\")) {\n          target.removeClass(\"sel\");\n          helpers.selId = null;\n          helpers.selRef = null;\n          helpers.inProgress = false;\n        } else {\n          if (helpers.selId == null) {\n            target.addClass(\"sel\");\n            helpers.selId = id;\n            helpers.selRef = target;\n            helpers.inProgress = false;\n          } else {\n            component.params.methods.checkMatch(target, $builderEl, component);\n          }\n        }\n      } else {\n        helpers.inProgress = false;\n      }\n    }\n  });\n  component.app.data.myEvents.on(\"form:reset\", function (e) {\n    component.params.helpers = params.methods.helpersReset(helpers);\n    component.app.data.myEvents.off(\"form:reset\");\n  });\n};\nmatchCards02.methods.checkMatch = function (target, $builderEl, builder) {\n  var params = this.params;\n  var helpers = params.helpers;\n  var id = target.data(\"id\");\n  if (helpers.selId == id) {\n    helpers.selRef.addClass(\"correct\");\n    target.addClass(\"correct\");\n    // helpers.score++;\n    var item = _.find(params.content.items, function (o) {\n      return o.id == id;\n    });\n    var textElOne = helpers.selRef.find(\".card-text\");\n    var textElTwo = target.find(\".card-text\");\n    textElOne.addClass(\"fadeOut\");\n    textElTwo.addClass(\"fadeOut\");\n    setTimeout(function () {\n      textElOne.removeClass(\"fadeOut\");\n      textElTwo.removeClass(\"fadeOut\");\n      textElOne.html(item.firstText);\n      textElTwo.html(item.secondText);\n    }, 500);\n\n    // textElOne.css(\"opacity\", 1);\n    // textElTwo.css(\"opacity\", 1);\n\n    // debugger;\n    helpers.score += parseFloat(item.value);\n    builder.params.methods.answerEmittor($builderEl, builder);\n  } else {\n    helpers.selRef.addClass(\"incorrect\");\n    target.addClass(\"incorrect\");\n  }\n  helpers.selRef.removeClass(\"sel\");\n  setTimeout(function () {\n    helpers.selRef.removeClass(\"incorrect\");\n    target.removeClass(\"incorrect\");\n    helpers.selId = null;\n    helpers.selRef = null;\n    helpers.inProgress = false;\n  }, 500);\n};\n/* harmony default export */ var match_cards_02 = (matchCards02);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards-03.js\n\n\n/* harmony default export */ var match_cards_03 = ({\n  name: \"match-cards-03\",\n  title: \"Match cards\",\n  subtitle: \"simple\",\n  // cast: ['dd-pairs-01'],\n  contentSetting: {\n    label: {\n      name: \"Task label\",\n      type: \"textEditor\"\n    },\n    shuffleLeft: {\n      name: \"Shuffle first column\",\n      type: \"bool\"\n    },\n    items: {\n      name: \"Items\",\n      type: \"array\",\n      values: {\n        left: {\n          name: \"First of pair\",\n          type: \"textEditor\"\n        },\n        right: {\n          name: \"Second of pair\",\n          type: \"textEditor\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Match cards - simple\",\n    shuffleLeft: true,\n    items: [{\n      left: \"Question 1\",\n      right: \"Answer 1\",\n      value: 1\n    }, {\n      left: \"Question 2\",\n      right: \"Answer 2\",\n      value: 1\n    }]\n  },\n  helpers: {\n    leftCards: [],\n    rightCards: [],\n    originalCards: [],\n    selectedLeft: null,\n    selectedRight: null,\n    scoreIndex: 0,\n    reset: false\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpers = component.params.helpers;\n    var cardsChanged = false;\n    if (!_.isEqual(helpers.originalCards, content.items)) {\n      cardsChanged = true;\n    }\n    if (helpers.reset || cardsChanged) {\n      component.params.helpers.originalCards = content.items;\n      helpers.leftCards = [];\n      helpers.rightCards = [];\n      content.items.forEach(function (item) {\n        helpers.leftCards.push({\n          id: item.id,\n          text: item.left\n        });\n        helpers.rightCards.push({\n          id: item.id,\n          text: item.right\n        });\n      });\n      if (content.shuffleLeft) {\n        helpers.leftCards = _.shuffle(helpers.leftCards);\n      }\n      helpers.rightCards = _.shuffle(helpers.rightCards);\n      helpers.reset = false;\n    }\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n    <div class=\\\"game-container\\\">\\n        <div class=\\\"grid\\\">\\n          <div class=\\\"grid-col\\\">\\n          \").concat(helpers.leftCards.map(function (data) {\n      return \"\\n             <div class=\\\"item question\\\"  data-id=\\\"\".concat(data.id, \"\\\">\\n             \").concat(data.text, \"\\n             </div>\\n            \");\n    }).join(\"\"), \"\\n          </div>\\n          <div class=\\\"grid-col\\\">\\n          \").concat(helpers.rightCards.map(function (data) {\n      return \"\\n             <div class=\\\"item answer\\\" data-id=\\\"\".concat(data.id, \"\\\">\\n             \").concat(data.text, \"\\n             </div>\\n            \");\n    }).join(\"\"), \"\\n          </div>\\n        </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var helpers = component.params.helpers;\n      var $items = $builderEl.find(\".item\");\n      var $questions = $builderEl.find(\".question\");\n      var $answers = $builderEl.find(\".answer\");\n      $items.on(\"click\", function (e) {\n        var target = e.target;\n\n        //if there is a link, do not select the item\n        if (e.target.tagName === 'A') return false;\n        if (!e.target.classList.contains(\"item\")) {\n          target = $$(target).parents(\".item\")[0];\n        }\n        if (target && !target.classList.contains(\"good\") && !target.classList.contains(\"wrong\")) {\n          var targetType = target.classList.contains(\"question\") ? 'question' : 'answer';\n          var id = $$(target).data(\"id\");\n          if (targetType == 'question') {\n            $questions.removeClass(\"active\");\n            $questions.removeClass(\"wrong\");\n          } else {\n            $answers.removeClass(\"active\");\n            $answers.removeClass(\"wrong\");\n          }\n          target.classList.add(\"active\");\n          if (targetType == 'question') {\n            helpers.selectedLeft = id;\n          } else {\n            helpers.selectedRight = id;\n          }\n          if (helpers.selectedLeft && helpers.selectedRight) {\n            var $active = $builderEl.find(\".active\");\n            if (helpers.selectedLeft == helpers.selectedRight) {\n              $active.addClass(\"good\");\n              helpers.scoreIndex++;\n              var color = component.params.methods.selectColor(helpers.scoreIndex);\n              // debugger;\n              var darekrColor = component.params.methods.darkenColor(color);\n              $active.css('background-color', \"rgb(\".concat(color.r, \",\").concat(color.g, \",\").concat(color.b, \")\"));\n              $active.css('border', \"1px solid rgb(\".concat(darekrColor.r, \",\").concat(darekrColor.g, \",\").concat(darekrColor.b, \")\"));\n              $active.css('color', \"rgb(\".concat(darekrColor.r, \",\").concat(darekrColor.g, \",\").concat(darekrColor.b, \")\"));\n              $active.removeClass(\"active\");\n              $active.removeClass(\"wrong\");\n              helpers.selectedLeft = null;\n              helpers.selectedRight = null;\n            } else {\n              $active.addClass(\"wrong\");\n            }\n          }\n          component.params.methods.answerEmittor($builderEl, component);\n        }\n      });\n      component.app.data.myEvents.on(\"form:reset\", function (e) {\n        helpers.reset = true;\n        helpers.selectedLeft = null;\n        helpers.selectedRight = null;\n        helpers.scoreIndex = 0;\n        component.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var helpers = builder.params.helpers;\n      var id = $builderEl[0].id;\n      var content = builder.params.content;\n      var scoreIndex = helpers.scoreIndex;\n      var maxPoints = _.filter(content.items, function (o) {\n        return !o.deleted;\n      });\n      if (maxPoints.length == scoreIndex) {\n        app.data.myEvents.emit(\"form:answer\", {\n          id: id,\n          isAnswered: true\n        });\n      }\n    },\n    selectColor: function selectColor(index) {\n      var saturation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 75;\n      var lightness = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 65;\n      var hue = index * 137.508 % 360;\n      // debugger;\n      return this.params.methods.hslToRgb(hue / 360, saturation / 100, lightness / 100);\n    },\n    hslToRgb: function hslToRgb(h, s, l) {\n      var r;\n      var g;\n      var b;\n      if (s === 0) {\n        r = g = b = l; // achromatic\n      } else {\n        var hue2rgb = function hue2rgb(p, q, t) {\n          if (t < 0) t += 1;\n          if (t > 1) t -= 1;\n          if (t < 1 / 6) return p + (q - p) * 6 * t;\n          if (t < 1 / 2) return q;\n          if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n          return p;\n        };\n        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n        var p = 2 * l - q;\n        r = hue2rgb(p, q, h + 1 / 3);\n        g = hue2rgb(p, q, h);\n        b = hue2rgb(p, q, h - 1 / 3);\n      }\n      return {\n        r: Math.round(r * 255),\n        g: Math.round(g * 255),\n        b: Math.round(b * 255)\n      };\n    },\n    darkenColor: function darkenColor(rgbObject) {\n      var percentage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 50;\n      // Calculate the new RGB values by reducing each component\n      var darkenedRgbObject = {\n        r: Math.round(rgbObject.r * (100 - percentage) / 100),\n        g: Math.round(rgbObject.g * (100 - percentage) / 100),\n        b: Math.round(rgbObject.b * (100 - percentage) / 100)\n      };\n\n      // Convert the darkened RGB values to strings\n      var darkenedRgbStrings = {\n        r: String(darkenedRgbObject.r),\n        g: String(darkenedRgbObject.g),\n        b: String(darkenedRgbObject.b)\n      };\n      return darkenedRgbStrings;\n    },\n    eval: function _eval(component, formComponent) {\n      var $builderEl = component.$block;\n      var content = component.params.content;\n      var showResult = formComponent.params.content.showResult;\n      var showCorrect = formComponent.params.content.showCorrectAnswers;\n      var points = 0;\n      var totalPoints = 0;\n      var questions = component.$block.find(\".question\");\n      questions.forEach(function (item) {\n        var $item = $$(item);\n        var id = $item.data(\"id\");\n        var comp = _.find(content.items, function (o) {\n          return o.id == id;\n        });\n        if ($item[0].classList.contains(\"good\")) {\n          points += comp.value;\n        }\n        totalPoints += comp.value;\n      });\n      points = Object(parsePoints[\"formatNumber\"])(points);\n      totalPoints = Object(parsePoints[\"formatNumber\"])(totalPoints);\n      if (showResult) {\n        var classResult = points == totalPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(totalPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrect) {\n        component.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: totalPoints\n      };\n    },\n    solution: function solution(component) {\n      var $builderEl = component.$block;\n      var obj = [];\n      var al = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n      component.params.content.items.forEach(function (card, index) {\n        if (!card.deleted) {\n          obj.push({\n            id: card.id,\n            index: al[index]\n          });\n        }\n      });\n      var items = $builderEl.find(\".item\");\n      items.forEach(function (card) {\n        var cardEl = $$(card);\n        cardEl.find(\".solution-badge\").remove();\n        if (!card.classList.contains(\"good\")) {\n          var id = cardEl.data(\"id\");\n          var find = _.find(obj, function (o) {\n            return o.id == id;\n          });\n          // debugger;\n          var index = find.index;\n          cardEl.append(\"<span class=\\\"solution-badge\\\">\".concat(index, \"</span>\"));\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./node_modules/svg-injector/svg-injector.js\nvar svg_injector = __webpack_require__(\"./node_modules/svg-injector/svg-injector.js\");\nvar svg_injector_default = /*#__PURE__*/__webpack_require__.n(svg_injector);\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.less\nvar coloring_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.js\n\n\n/* harmony default export */ var coloring_book_coloring_01 = ({\n  name: \"coloring-book-01\",\n  title: \"Coloring book (SVG)\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Title\",\n      // not necessary there\n      type: \"textEditor\"\n    },\n    colorText: {\n      name: \"Color text\",\n      type: \"textEditor\"\n    },\n    sourceImage: {\n      name: \"Source image\",\n      type: \"image\"\n    },\n    backgroundImage: {\n      name: \"Source image\",\n      type: \"image\"\n    }\n  },\n  content: {\n    title: \"Omalovánky\",\n    colorText: \"Vybraná barva\",\n    sourceImage: \"{{mediaServerDomain}}/public/efqvo9nn10jvsl65zdx6kbsfnkjgd0brr7zn1lj3jhqjn8abdqn1i6savc1t0k54.svg\"\n  },\n  helpers: {\n    selectedColor: \"\"\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n    \".concat(content.title.length > 0 ? \"<h2>\".concat(content.title, \"</h2>\") : \"\", \"\\n    <div class=\\\"coloring-book-container\\\">\\n        <div class=\\\"bg-image\\\" style=\\\"background-image: url('\").concat(content.backgroundImage, \"')\\\">\\n            <img class=\\\"ttt svg-inject\\\" data-src=\\\"\").concat(content.sourceImage, \"\\\" />\\n        </div>\\n        <div class=\\\"controls-container\\\">\\n        \").concat(content.colorText, \"\\n        </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(componentEl, component) {\n      var $block = componentEl;\n      var app = component.app;\n      var self = this;\n      var injectPoint = $block.find(\".svg-inject\");\n      component.params.helpers.selectedColor = app.book.params.color;\n      svg_injector_default()(injectPoint, {}, function () {\n        var paths = $block.find(\"path\");\n        var ellipses = $block.find(\"ellipse\");\n        var rects = $block.find(\"rect\");\n        var circles = $block.find(\"circle\");\n        paths.on(\"click\", function (e) {\n          self.params.methods.paintElement(e.target);\n        });\n        ellipses.on(\"click\", function (e) {\n          self.params.methods.paintElement(e.target);\n        });\n        rects.on(\"click\", function (e) {\n          self.params.methods.paintElement(e.target);\n        });\n        circles.on(\"click\", function (e) {\n          self.params.methods.paintElement(e.target);\n        });\n        var styleEl = componentEl.find(\"style\");\n        if (styleEl && styleEl.length > 0) {\n          var text = styleEl.text();\n          text = text.replaceAll(\".\", \"#\".concat(component.params.id, \" .\"));\n          styleEl.text(text);\n        }\n        // debugger;\n      });\n      var colorPicker = $block.find(\".controls-container\");\n      colorPicker.on(\"click\", function (e) {\n        app.colors.openColorPallete(e.target, {\n          showCustomColors: false,\n          showThemeColors: false,\n          showDeleteButton: false\n          // defaultColors: [\n          //   {\n          //     name: \"Red\",\n          //     id: \"red\",\n          //     hex: \"#ff0000ff\",\n          //   },\n          // ],\n        }).then(function (res) {\n          component.params.helpers.selectedColor = res.hex;\n          $$(colorPicker).css(\"background\", res.hex);\n          $$(colorPicker).css(\"color\", \"#fff\");\n        });\n      });\n    }\n  },\n  methods: {\n    paintElement: function paintElement(target) {\n      //   let clr = params.helpers.selectedColor;\n      //   let color = () => {\n      //     return component.params.helpers.selectedColor;\n      //   };\n      target.style.fill = this.params.helpers.selectedColor;\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.less\nvar coloring_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.js\n\n\n\nvar coloring02 = _.cloneDeep(coloring_book_coloring_01);\ncoloring02.name = \"coloring-book-02\";\ncoloring02.subtitle = \"with selected pallete of colors\";\ncoloring02.contentSetting.colorText.name = \"Select color text\";\ncoloring02.contentSetting[\"colors\"] = {\n  name: \"Color pallete\",\n  type: \"array\",\n  values: {\n    color: {\n      name: \"Color\",\n      type: \"color\"\n    }\n  }\n};\ncoloring02.content = {\n  title: \"Omalovánky\",\n  colorText: \"Vybraná barva\",\n  sourceImage: \"{{mediaServerDomain}}/public/efqvo9nn10jvsl65zdx6kbsfnkjgd0brr7zn1lj3jhqjn8abdqn1i6savc1t0k54.svg\",\n  colors: [{\n    color: \"#ff0000\"\n  }, {\n    color: \"#00ff00\"\n  }, {\n    color: \"#0000ff\"\n  }]\n};\ncoloring02.html = function (content, builder, styles, component, userContent) {\n  return \"\\n  \".concat(content.title.length > 0 ? \"<h2>\".concat(content.title, \"</h2>\") : \"\", \"\\n  <div class=\\\"coloring-book-container\\\">\\n      <div class=\\\"bg-image\\\" style=\\\"background-image: url('\").concat(content.backgroundImage, \"')\\\"><img class=\\\"ttt svg-inject\\\" data-src=\\\"\").concat(content.sourceImage, \"\\\" /></div>\\n<!--      <div class=\\\"controls-container\\\">-->\\n<!--      <p class=\\\"selected-color\\\">\").concat(content.colorText, \"</p>-->\\n      <div class=\\\"color-container\\\">\\n        \").concat(content.colors.map(function (data) {\n    return \"\\n            <div class=\\\"color\\\" data-color=\\\"\".concat(data.color, \"\\\" style=\\\"background: \").concat(data.color, \"\\\"></div>\\n          \");\n  }).join(\"\"), \"\\n      </div>\\n<!--      </div>-->\\n  </div>\\n  \");\n};\ncoloring02.on.init = function (componentEl, component) {\n  var $block = componentEl;\n  var app = component.app;\n  var self = this;\n  var injectPoint = $block.find(\".svg-inject\");\n  svg_injector_default()(injectPoint, {}, function () {\n    var paths = $block.find(\"path\");\n    var ellipses = $block.find(\"ellipse\");\n    var rects = $block.find(\"rect\");\n    var circles = $block.find(\"circle\");\n    paths.on(\"click\", function (e) {\n      self.params.methods.paintElement(e.target);\n    });\n    ellipses.on(\"click\", function (e) {\n      self.params.methods.paintElement(e.target);\n    });\n    rects.on(\"click\", function (e) {\n      self.params.methods.paintElement(e.target);\n    });\n    circles.on(\"click\", function (e) {\n      self.params.methods.paintElement(e.target);\n    });\n    var styleEl = componentEl.find(\"style\");\n    if (styleEl && styleEl.length > 0) {\n      var text = styleEl.text();\n      text = text.replaceAll(\".\", \"#\".concat(component.params.id, \" .\"));\n      styleEl.text(text);\n    }\n    // debugger;\n  });\n  var colorPicker = $block.find(\".color\");\n  var selectEl = $block.find(\".selected-color\");\n  colorPicker.on(\"click\", function (e) {\n    var target = e.target;\n    var color = $$(target).data(\"color\");\n    colorPicker.removeClass('active');\n    $$(target).addClass('active');\n    component.params.helpers.selectedColor = color;\n    $$(selectEl).css(\"color\", color);\n  });\n  var defaultClr = $$(colorPicker[0]).data(\"color\");\n  $$(colorPicker[0]).addClass('active');\n  component.params.helpers.selectedColor = defaultClr;\n};\n/* harmony default export */ var coloring_book_coloring_02 = (coloring02);\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.less\nvar clickable_img_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.js\n\nfunction clickable_img_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction clickable_img_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? clickable_img_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : clickable_img_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var clickable_image_clickable_img_01 = ({\n  name: \"clickable-img-01\",\n  title: \"Clickable image\",\n  subtitle: \"with interactive points\",\n  contentSetting: {\n    bgImage: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    icon: {\n      name: \"Icon\",\n      type: \"icon\"\n    },\n    color: {\n      name: \"Icon color\",\n      type: \"color\"\n    },\n    pointArray: {\n      name: \"Interactive points\",\n      type: \"array\",\n      values: {\n        point: {\n          name: \"Interactive point\",\n          type: \"interactive-point\",\n          ref: \"bgImage\"\n        },\n        action: {\n          name: \"Action on click\",\n          type: \"action\"\n        }\n      }\n    }\n  },\n  content: {\n    bgImage: \"{{mediaServerDomain}}/public/0t37hd1g87p2n17d73z8g40uym3moo4vgu7hbqjhpe7gryt8p1cl2dmqm5yzg82r.jpeg\",\n    icon: '<i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"help\"></i>',\n    color: \"#ff0000\",\n    pointArray: [{\n      point: {\n        left: 50,\n        top: 50\n      },\n      action: {\n        anchor: \"Ukázkový popup\",\n        class: \"\",\n        title: \"\",\n        type: \"popover\",\n        url: \"\"\n      }\n    }]\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"img-container\\\">\\n        <img src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.pointArray.map(function (data) {\n      return \"\\n              <span class=\\\"icon-container\\\"  style=\\\"--icon-color: \".concat(content.color, \"; position: absolute; left: calc(\").concat(data.point.left, \"% - (var(--fb-font-size)/2)); top: calc(\").concat(data.point.top, \"% - (var(--fb-font-size)/2))\\\">\\n              \").concat(data.action && data.action.type ? component.app.link.createLinkElement(clickable_img_01_objectSpread(clickable_img_01_objectSpread({}, data.action), {}, {\n        title: \"\\n                  <span>\".concat(content.icon, \"</span>\")\n      })) : '<span>${content.icon}</span>', \"   \\n              </span>    \\n          \");\n    }).join(\"\"), \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.less\nvar clickable_img_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.js\n\nfunction clickable_img_02_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction clickable_img_02_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? clickable_img_02_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : clickable_img_02_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var clickable_image_clickable_img_02 = ({\n  name: \"clickable-img-02\",\n  title: \"Clickable image\",\n  subtitle: \"with interactive areas\",\n  contentSetting: {\n    bgImage: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    dropableZone: {\n      name: \"Interactive areas\",\n      type: \"array\",\n      values: {\n        zone: {\n          name: \"Interactive area\",\n          type: \"interactive-area\",\n          ref: \"bgImage\"\n        },\n        action: {\n          name: \"Action when clicked\",\n          type: \"action\"\n        }\n      }\n    }\n  },\n  helpers: {\n    minus: 0\n  },\n  content: {\n    bgImage: \"{{mediaServerDomain}}/public/8m243kwtq5xboeil1s2il988cabn3e8ryy7uodosxyd8qz2nkav2o4b51ojrcjk2.png\",\n    dropableZone: [{\n      zone: {\n        left: 1.2698412698412698,\n        top: 1.152867325146054,\n        width: 28.86904761904762,\n        height: 24.984796562149636\n      },\n      action: {\n        url: \"\",\n        anchor: \"<div>Sample pop-up</div>\",\n        type: \"popover\",\n        class: \"\"\n      }\n    }, {\n      zone: {\n        left: 69.68253968253968,\n        top: 72.05420782162837,\n        width: 29.02777777777778,\n        height: 24.9825484708656\n      },\n      action: {\n        url: \"https://www.google.com/\",\n        title: \"undefined\",\n        anchor: \"\",\n        type: \"external\",\n        class: \"\"\n      }\n    }]\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"img-container\\\">\\n        <img src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.dropableZone.map(function (data) {\n      return \"\\n                <div class=\\\"drop-area\\\" data-id=\\\"\".concat(data.id, \"\\\" style=\\\"position: absolute; width: \").concat(data.zone.width, \"%; height: \").concat(data.zone.height, \"%; top: \").concat(data.zone.top, \"%; left: \").concat(data.zone.left, \"%;\\\">\\n                \").concat(component.app.link.createLinkElement(clickable_img_02_objectSpread(clickable_img_02_objectSpread({}, data.action), {}, {\n        title: ''\n      })), \"\\n</div>\\n          \");\n    }).join(\"\"), \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var helpers = component.params.helpers;\n    }\n  },\n  methods: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js\nvar interactive_img_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js\nvar interactive_img_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js\nvar interactive_img_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js\nvar interactive_img_04 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.less\nvar random_words_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.js\n\n/* harmony default export */ var random_words_random_words_01 = ({\n  name: \"random-words-01\",\n  title: \"Random words\",\n  subtitle: \"Generates random word on click\",\n  contentSetting: {\n    showReset: {\n      name: \"Show reset button\",\n      type: \"bool\",\n      hidden: {\n        resetText: {\n          name: \"Lable of reset button\",\n          type: \"textarea\"\n        }\n      }\n    },\n    list: {\n      name: \"List of clickable elements\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Clickable item\",\n          type: \"image\"\n        },\n        color: {\n          name: \"Text color\",\n          type: \"color\"\n        },\n        wordList: {\n          name: \"Battery of words\",\n          type: \"array\",\n          values: {\n            word: {\n              name: \"Word\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    list: [{\n      item: \"{{mediaServerDomain}}/public/51hjmaqpatp6tmowcvksvzoc7q0s4mb8dpbcdlg6wzviyu5flaz3khpdph1tbucz.png\",\n      color: \"#000000ff\",\n      wordList: [{\n        word: \"Fox\"\n      }, {\n        word: \"Dog\"\n      }, {\n        word: \"Cat\"\n      }, {\n        word: \"Rat\"\n      }, {\n        word: \"Bear\"\n      }, {\n        word: \"Snake\"\n      }]\n    }],\n    showReset: true,\n    resetText: \"Restartovat\"\n  },\n  helpers: {\n    words: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n  <div class=\\\"main-container\\\">\\n    <div class=\\\"row\\\">\\n    \".concat(content.list.map(function (data, i) {\n      return \"\\n          <div class=\\\"col-25\\\">\\n            <div class=\\\"word-container color-\".concat(i, \"\\\" style=\\\"color: \").concat(data.color, \"\\\" data-id=\\\"\").concat(data.id, \"\\\"></div>\\n            <div class=\\\"gen-btn\\\" data-id=\\\"\").concat(data.id, \"\\\">\\n                <img src=\\\"\").concat(data.item, \"\\\"></img>\\n            </div>\\n          </div>\\n            \");\n    }).join(\"\"), \"\\n    </div>\\n                \").concat(content.showReset ? \"<div class=\\\"reset-container\\\">\\n                        <button class=\\\"reset-btn button button-fill\\\">\".concat(content.resetText, \"</button>\\n                    </div>\") : \"\", \"\\n        </div>\\n    \");\n  },\n  on: {\n    init: function init($compnenetEl, builder) {\n      var methods = builder.params.methods;\n      var content = builder.params.content;\n      var helpers = builder.params.helpers;\n      var btns = $compnenetEl.find(\".gen-btn\");\n      var reset = $compnenetEl.find(\".reset-btn\");\n\n      //initWords\n      methods.initWords();\n      btns.off(\"click\");\n      btns.on(\"click\", function (e) {\n        var target = $$(e.target);\n        if (!target.hasClass(\"gen-btn\")) {\n          target = target.parents(\".gen-btn\");\n        }\n        var id = target.data(\"id\");\n        var word = methods.showWord(id);\n\n        //TODO SHOW WORD\n        var resultEl = $compnenetEl.find(\".word-container[data-id=\\\"\".concat(id, \"\\\"]\"));\n        resultEl.html(word);\n      });\n      reset.off(\"click\");\n      reset.on(\"click\", function (e) {\n        methods.initWords();\n      });\n    }\n  },\n  methods: {\n    showWord: function showWord(id) {\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      var wordPool = _.find(helpers.words, function (o) {\n        return o.id == id;\n      });\n      if (wordPool.data.length > 0) {\n        var randomizer = Math.floor(Math.random() * wordPool.data.length);\n        var word = wordPool.data[randomizer].word;\n        wordPool.data.splice(randomizer, 1);\n        return word;\n      } else {\n        return \"...\";\n      }\n    },\n    initWords: function initWords() {\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      var $el = this.$block;\n      var conts = $el.find(\".word-container\");\n\n      //   debugger;\n\n      conts.forEach(function (el) {\n        $$(el).html(\"\");\n      });\n      helpers.words = [];\n      content.list.forEach(function (o) {\n        if (!o.deleted) {\n          var arr = _.cloneDeep(o.wordList);\n          arr = _.filter(arr, function (o) {\n            return !o.deleted;\n          });\n          var newObj = {\n            id: o.id,\n            data: arr\n          };\n          helpers.words.push(newObj);\n        }\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js\nvar _new_tables_table_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.less\nvar recipe_layout_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.js\n\nfunction recipe_layout_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction recipe_layout_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? recipe_layout_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : recipe_layout_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var layout_recipe_layout_01 = ({\n  name: \"recipe-layout-01\",\n  title: \"Recipe layout\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Layout title\",\n      type: \"textEditor\"\n    },\n    time: {\n      name: \"Time text\",\n      type: \"textEditor\"\n    },\n    showLeft: {\n      name: \"Show left column\",\n      type: \"bool\"\n    },\n    icons: {\n      name: \"Icon links\",\n      type: \"array\",\n      values: {\n        icon: {\n          name: \"Icon\",\n          type: \"icon\"\n        },\n        link: {\n          name: \"Link to asset\",\n          type: \"action\"\n        }\n      }\n    },\n    chips: {\n      name: \"Cips\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Chip text\",\n          type: \"textEditor\"\n        },\n        color: {\n          name: \"Chip color\",\n          type: \"color\"\n        }\n      }\n    }\n  },\n  content: {\n    title: \"Hrnečkový koláč\",\n    time: \"80 min\",\n    showLeft: true,\n    chips: [{\n      text: \"Pečení\",\n      color: \"#2ecc71\"\n    }, {\n      text: \"Pečené\",\n      color: \"#8e44ad\"\n    }],\n    icons: [{\n      icon: '<i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"format_quote\"></i>',\n      link: {\n        anchor: \"\",\n        class: \"\",\n        title: \"\",\n        type: \"external\",\n        url: \"https://google.com\"\n      }\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  components: {\n    left: [],\n    right: []\n  },\n  html: function html(content, builder, styles, component) {\n    var icoArray = [];\n    content.icons.forEach(function (item, index) {\n      var innerEl = \"\".concat(item.icon);\n      var el = innerEl;\n      el = component.app.link.createLinkElement(recipe_layout_01_objectSpread(recipe_layout_01_objectSpread({}, item.link), {}, {\n        title: innerEl\n      }));\n      //   debugger;\n      icoArray.push(el);\n    });\n    return \"\\n    <div class=\\\"layout-container\\\">\\n        <div class=\\\"layout-head\\\">\\n            <div class=\\\"title\\\">\".concat(content.title, \"</div>\\n            <div class=\\\"icon-container\\\">\\n                \").concat(icoArray.map(function (data) {\n      return \"\\n                      \".concat(data, \"\\n\\n                  \");\n    }).join(\"\"), \"\\n            </div>\\n        </div>\\n        <div class=\\\"layout-body\\\">\\n          \").concat(content.showLeft ? \"\\n            <div class=\\\"layout-left\\\">\\n              \".concat(component.renderComponents(\"left\"), \"\\n            </div>         \\n          \") : \"\", \"\\n\\n            <div class=\\\"layout-right \").concat(content.showLeft ? \"\" : \"full\", \"\\\">\\n                <div class=\\\"right-top\\\">\\n                    <div class=\\\"chip-container\\\">\\n                    \").concat(content.chips.map(function (data) {\n      return \"\\n                        <div class=\\\"chip\\\" style=\\\"background-color: \".concat(data.color, \";\\\">\").concat(data.text, \"</div>\\n\\n                    \");\n    }).join(\"\"), \"\\n                    </div>\\n                    <div class=\\\"time-container\\\">\\n                        \").concat(content.time.length > 0 ? \"<div>\".concat(content.time, \"</div>\\n                        <i class=\\\"icon f7-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"timer\\\"></i>\") : \"\", \"\\n                    </div>\\n                </div>\\n                <div class=\\\"inner-container\\\">\\n                     \").concat(component.renderComponents(\"right\"), \"\\n                </div>\\n            </div>\\n        </div>\\n    </div>\\n  \");\n  },\n  on: {\n    init: function init(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/rating/rating-01.js\nvar rating_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/rating/rating-01.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.less\nvar showcase_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.less\");\n\n// EXTERNAL MODULE: ./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js\nvar videojs_hls_quality_selector_es = __webpack_require__(\"./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js\");\n\n// EXTERNAL MODULE: ./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\nvar videojs_contrib_quality_levels_es = __webpack_require__(\"./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.js\n\n\n\n\n/* harmony default export */ var showcase_showcase_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"showcase-01\",\n  title: \"Showcase with video in background\",\n  subtitle: \"\",\n  contentSetting: {\n    buttonText: {\n      name: \"Next step button text\",\n      type: \"textarea\"\n    },\n    steps: {\n      name: \"Steps\",\n      type: \"array\",\n      values: {\n        title: {\n          name: \"Showcase Title\",\n          type: \"textEditor\"\n        },\n        animation: {\n          name: \"Lottie animation file\",\n          type: \"video\"\n        },\n        text: {\n          name: \"Step text\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    buttonText: \"Další krok\",\n    steps: [{\n      title: \"Fotosyntéza suchozemských rostlin\",\n      animation: \"\",\n      text: \"Biomasa vzniká růstem. K růstu potřebuje rostlina organické látky, které si sama vyrobí během fotosyntézy. Suchozemské rostliny pro fotosyntézu využívají sluneční energii, dále oxid uhličitý, který přijímají z atmosféry prostřednictvím průduchů v listech a  vodu, kterou čerpají  z půdy kořeny společně s minerálními látkami. \"\n    }]\n  },\n  helpers: {\n    currentStep: 1,\n    data: []\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var helpers = component.params.helpers;\n    var data = [];\n    content.steps.forEach(function (step, index) {\n      data.push({\n        step: index + 1,\n        id: step.id\n      });\n    });\n    helpers.data = data;\n    return \"\\n    <div class=\\\"container\\\">\\n      <div class=\\\"video-container\\\">\\n\\n      <video key=\\\"vp1\\\" id=\\\"video-new\\\" class=\\\"video-js vjs-16-9\\\"  autoplay=\\\"true\\\"\\n      muted=\\\"muted\\\">\\n          <source\\n            src=\\\"\".concat(content.steps[0].animation, \"\\\"\\n            type=\\\"application/x-mpegURL\\\">\\n      </video>\\n      </div>\\n      <div class=\\\"side-block\\\">\\n        <div class=\\\"inner-content\\\">\\n          <div class=\\\"texts\\\">\\n            <div class='title'>\").concat(content.steps[0].title, \"</div>\\n            <div class=\\\"text\\\">\").concat(content.steps[0].text, \"</div>\\n          </div>\\n          <div class=\\\"controls\\\">\\n             <div class=\\\"stepper\\\">\\n              \").concat(content.steps.map(function (data, index) {\n      return \"\\n              <div class=\\\"circle \".concat(index + 1 > 4 ? \"hidden\" : \"\", \" \").concat(index == 0 ? \"active\" : \"\", \"\\\" data-step=\\\"\").concat(index + 1, \"\\\">\").concat(index + 1, \"</div>\\n              \");\n    }).join(\"\"), \"\\n             </div>\\n             \").concat(content.buttonText ? \"<div class=\\\"btn next-btn\\\">\".concat(content.buttonText, \"</div>\") : \"\", \"\\n          </div>\\n        </div>\\n      </div>\\n    </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var content = builder.params.content;\n      var helpers = builder.params.helpers;\n      var methods = builder.params.methods;\n      var nextBtn = $builderEl.find(\".next-btn\");\n      var circleBtn = $builderEl.find(\".circle\");\n      var data = _.filter(content.steps, function (o) {\n        return !o.deleted;\n      });\n      circleBtn.off(\"click\");\n      circleBtn.on(\"click\", function (o) {\n        var $target = $$(o.target);\n        var step = $target.data(\"step\");\n        methods.makeStepTo(step);\n      });\n      nextBtn.off(\"click\");\n      nextBtn.on(\"click\", function () {\n        methods.makeStepTo(parseInt(helpers.currentStep) + 1);\n      });\n      var player = Object(video_es[\"default\"])($builderEl.find(\"#video-new\")[0], {\n        preload: \"none\",\n        html5: {\n          hls: {\n            overrideNative: true\n          }\n        }\n      });\n      // player.hlsQualitySelector({\n      //   displayCurrentQuality: false,\n      // });\n\n      player.qualityLevels();\n\n      // //console.log(\"player\", player, player.qualityLevels());\n      // setTimeout(() => {\n      //   player.play();\n      // }, 1000);\n      // let sourceDefault = content.steps[0];\n      // sourceDefault = sourceDefault.replaceAll(\n      //   \"{{mediaServerDomain}}\",\n      //   app.apiManager.params.mediaUrlDomain\n      // );\n      // const player = $builderEl.find(\"lottie-player\");\n      // player.addEventListener(\"rendered\", (e) => {\n      //   //Load via URL\n      //   player.load(content.steps[0], animation);\n      // });\n    }\n  },\n  methods: {\n    makeStepTo: function makeStepTo(to) {\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      // debugger;\n      var oldEl = this.$block.find(\"#video-new\");\n      var video = video_es[\"default\"].getPlayer(oldEl[0]);\n      var cont = this.$block.find(\".video-container\");\n\n      // debugger;\n\n      video.pause();\n      helpers.currentStep = parseInt(to);\n      var allSteps = _.filter(content.steps, function (o) {\n        return !o.deleted;\n      });\n      var data = _.find(helpers.data, function (o) {\n        return o.step == to;\n      });\n      data = _.find(allSteps, function (o) {\n        return data.id == o.id;\n      });\n\n      //odstranit active old btn\n      var active = this.$block.find(\".active\");\n      active.removeClass(\"active\");\n\n      //změnit active btn\n      var cicles = this.$block.find(\".circle\");\n      cicles.forEach(function (c) {\n        var step = parseInt($$(c).data(\"step\"));\n        // debugger;\n        if (helpers.currentStep >= 4) {\n          if (step >= helpers.currentStep - 2 && step <= helpers.currentStep + 1 || helpers.currentStep == allSteps.length && step + 3 == helpers.currentStep) {\n            $$(c).removeClass(\"hidden\");\n          } else {\n            $$(c).addClass(\"hidden\");\n          }\n        } else {\n          if (step <= 4) {\n            $$(c).removeClass(\"hidden\");\n          } else {\n            $$(c).addClass(\"hidden\");\n          }\n        }\n        if (step == helpers.currentStep) {\n          $$(c).addClass(\"active\");\n        }\n\n        // if (helpers.currentStep > 3 && allSteps.length > 4) {\n        //   if (\n        //     helpers.currentStep - 3 >= step ||\n        //     helpers.currentStep + 1 < step\n        //   ) {\n        //     $$(c).addClass(\"hidden\");\n        //   } else {\n        //     $$(c).removeClass(\"hidden\");\n        //   }\n        // }\n      });\n\n      //změnit text\n      var titleEl = this.$block.find(\".title\");\n      this.$block.find(\".text\").html(data.text);\n      if (data.title != undefined && data.title.length > 0) {\n        titleEl.removeClass(\"hidden\");\n        titleEl.html(data.title);\n      } else {\n        titleEl.addClass(\"hidden\");\n      }\n\n      // if (to == 1) {\n      //   this.$block.find(\".title\").removeClass(\"hidden\");\n      // } else {\n      //   this.$block.find(\".title\").addClass(\"hidden\");\n      // }\n\n      //schovat btn když poslední kork\n      var btn = this.$block.find(\".next-btn\");\n      var nextData = _.find(helpers.data, function (o) {\n        return o.step == parseInt(to) + 1 && !o.deleted;\n      });\n      if (nextData) {\n        btn.removeClass(\"disabled\");\n      } else {\n        btn.addClass(\"disabled\");\n      }\n\n      // //console.log(video.getVideoPlaybackQuality());\n\n      // video.src = data.animation.replaceAll(\n      //   \"{{mediaServerDomain}}\",\n      //   this.app.apiManager.params.mediaUrlDomain\n      // );\n      // setTimeout(() => video.play(), 500);\n      var url = this.app.apiManager.replaceMediaServerPlaceholder(data.animation);\n      var el = \"<video key=\\\"vp1\\\" id=\\\"video-new\\\" class=\\\"video-js vjs-16-9 \\\"  autoplay=\\\"false\\\" muted=\\\"muted\\\">\\n                    <source\\n                      src=\\\"\".concat(url, \"\\\"\\n                      type=\\\"application/x-mpegURL\\\">\\n                </video>\");\n      cont.append(el);\n      oldEl.addClass(\"old\");\n      oldEl.removeAttr(\"id\");\n      var videoNew = Object(video_es[\"default\"])(this.$block.find(\"#video-new\")[0], {\n        preload: \"auto\",\n        html5: {\n          hls: {\n            overrideNative: true\n          }\n        }\n      });\n      videoNew.qualityLevels();\n      // videoNew.load();\n      // debugger;\n      // video.load();\n      var newEl = this.$block.find(\"#video-new\");\n      newEl.removeClass(\"hidden\");\n      setTimeout(function () {\n        oldEl.remove();\n        videoNew.play();\n      }, 1000);\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.less\nvar bg_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.js\n\n/* harmony default export */ var backgrounds_bg_01 = ({\n  name: \"bg-01\",\n  title: \"Background layout 1\",\n  subtitle: \"with background image\",\n  contentSetting: {\n    bgImage: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    bgWidth: {\n      name: \"Width of background (with units)\",\n      help: \"px | %\",\n      type: \"textarea\"\n    },\n    bgHeight: {\n      name: \"Height of background (with units)\",\n      help: \"px | %\",\n      type: \"textarea\"\n    },\n    bgPositonX: {\n      name: \"Offset X\",\n      help: \"left | center | right | [number]px/%\",\n      type: \"textarea\"\n    },\n    bgPositionY: {\n      name: \"Offset Y\",\n      help: \"top | center | bottom | [number]px/%\",\n      type: \"textarea\"\n    }\n  },\n  content: {\n    bgWidth: \"150px\",\n    bgHeight: \"auto\",\n    bgPositonX: \"center\",\n    bgPositionY: \"center\",\n    bgImage: \"{{mediaServerDomain}}/public/9mfyrvy2tu35cz2us7r1sfhgkn3fji95vc7gdpjpjxd37z4bvp5cp7mf7buv3s8b.png\"\n  },\n  components: {\n    foregroundItems: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"bg-layout\\\">\\n    <img src=\\\"\".concat(content.bgImage, \"\\\"  class=\\\"abs-img\\\"/>\\n      <div class=\\\"inside-wrapper\\\">\\n      \").concat(component.renderComponents(\"foregroundItems\"), \"\\n      </div>\\n    </div>\\n            \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var methods = component.params.methods;\n      var imgEl = $componentEl.find(\".abs-img\");\n      if (imgEl[0].complete && imgEl[0].naturalHeight !== 0) {\n        methods.setParams();\n      } else {\n        $$(imgEl[0]).on(\"load\", function () {\n          methods.setParams();\n        });\n      }\n    }\n  },\n  methods: {\n    setParams: function setParams() {\n      var $componentEl = this.$block;\n      var content = this.params.content;\n      var bgCont = $componentEl.find(\".bg-layout\");\n      var imgEl = $componentEl.find(\".abs-img\")[0];\n      var wrapper = $componentEl.find(\".bm-wrapper\")[0];\n\n      // bgCont.css({\n      //   \"background-image\": `url(${content.bgImage})`,\n      //   \"background-size\": `${content.bgWidth} ${content.bgHeight}`,\n      //   \"background-repeat\": `${content.bgRepeat}`,\n      //   \"background-position\": `${content.bgPositonX} ${content.bgPositionY}`,\n      // });\n\n      $$(imgEl).css({\n        width: content.bgWidth,\n        height: content.bgHeight\n      });\n      var height = content.bgHeight;\n      var width = content.bgWidth;\n      if (content.bgWidth == \"auto\") {\n        width = \"\".concat($$(imgEl).width(), \"px\");\n      }\n      if (content.bgHeight == \"auto\") {\n        height = \"\".concat($$(imgEl).height(), \"px\");\n      }\n      var offsetX = 0;\n      switch (content.bgPositonX) {\n        case \"left\":\n          offsetX = 0;\n          break;\n        case \"right\":\n          offsetX = \"calc(100% - \".concat(width, \")\");\n          break;\n        case \"center\":\n          offsetX = \"calc(50% - (\".concat(width, \" / 2))\");\n          break;\n        default:\n          offsetX = content.bgPositonX;\n      }\n      var offsetY = 0;\n      switch (content.bgPositionY) {\n        case \"top\":\n          offsetY = 0;\n          break;\n        case \"bottom\":\n          offsetY = \"calc(100% - \".concat(height, \")\");\n          break;\n        case \"center\":\n          offsetY = \"calc(50% - (\".concat(height, \" / 2))\");\n          break;\n        default:\n          offsetY = content.bgPositionY;\n      }\n      // debugger;\n      $$(imgEl).css({\n        left: offsetX,\n        top: offsetY\n      });\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.less\nvar form_c_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.js\n\n/* harmony default export */ var cards_form_c_01 = ({\n  name: \"form-c-01\",\n  title: \"Form card 1\",\n  subtitle: \"with numbering\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    numbering: {\n      name: \"Show numbering?\",\n      type: \"bool\",\n      hidden: {\n        numberingText: {\n          name: \"Text of numbering\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    footer: \"Pati\\u010Dka karty\",\n    numbering: true,\n    numberingText: \"{{position}}\"\n  },\n  componentsAllowedGroup: {\n    x0: \"formElGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"card\\\" >\\n    \".concat(content.numbering ? \"\\n      <div class=\\\"card-numbering\\\">\\n        <div>\".concat(content.numberingText, \"</div>\\n      </div>\\n    \") : \"\", \"\\n    \").concat(content.header ? \"<div class=\\\"card-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n    <div class=\\\"card-content\\\">\\n\\n    \").concat(component.renderComponents(\"x0\"), \"\\n    </div>\\n    \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/link/link-block-01.less\nvar link_block_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/link/link-block-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/link/link-block-01.js\n\nfunction link_block_01_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction link_block_01_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? link_block_01_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : link_block_01_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n/* harmony default export */ var link_link_block_01 = ({\n  name: \"link-block-01\",\n  title: \"Link block\",\n  subtitle: \"make link from anything\",\n  contentSetting: {\n    link: {\n      name: \"Action\",\n      type: \"action\"\n    }\n  },\n  content: {\n    link: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"external\",\n      url: \"https://google.com\"\n    }\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"link-container \".concat(component.app.builder.params.development.enable ? 'link-dev' : '', \"\\\">\\n        <div class=\\\"link-content\\\">\\n        \").concat(component.renderComponents(\"x0\"), \"\\n        </div>\\n    </div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var containerEl = $builderEl.find(\".link-content\");\n\n      // let link = builder.app.link.createLinkElement({\n      //     ...builder.params.content.link,\n      //     title: \"\"\n      //   });\n\n      // $(el[0]).wrap(link);\n\n      var app = builder.app;\n      var link = builder.params.content.link;\n      var linkEl = builder.app.link.createLinkElement(link_block_01_objectSpread(link_block_01_objectSpread({}, builder.params.content.link), {}, {\n        title: \"\"\n      }));\n      $$(containerEl).on(\"click\", function (e) {\n        var target = e.target;\n        var parentTarget = $$(e.target).parent()[0];\n        if (target.nodeName !== 'A' && parentTarget.nodeName !== 'A') {\n          var arr = [];\n          if (target.classList) {\n            arr = arr.concat(Array.from(target.classList));\n          }\n          if (target.id) {\n            arr.push(target.id);\n          }\n          if (parentTarget.classList) {\n            arr = arr.concat(Array.from(parentTarget.classList));\n          }\n          if (parentTarget.id) {\n            arr.push(parentTarget.id);\n          }\n          var isProhibited = arr.includes(\"bm-content\") || arr.includes(\"bm-check-component\") || arr.includes(\"bm-copy\") || arr.includes(\"bm-delete\") || arr.includes(\"bm-move-up\") || arr.includes(\"bm-move-down\") || arr.includes(\"bm-more\") || arr.includes(\"bm-add-next\");\n          if (!isProhibited) {\n            if (link.type == 'external') {\n              window.open(link.url, \"_blank\");\n            } else {\n              app.navigation.toggleClicked($$(linkEl));\n            }\n          }\n        }\n      });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-01.less\nvar tile_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tiles/tile-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-01.js\n\n/* harmony default export */ var tiles_tile_01 = ({\n  name: \"tile-01\",\n  title: \"Tile 01 - Tile with an image\",\n  subtitle: 'title, and optional subtitle on bottom',\n  contentSetting: {\n    header: {\n      name: \"Tile header\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Tile subtitle\",\n      type: \"textEditor\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format width/height, 3/2\"\n    },\n    imageBool: {\n      name: \"Image on background?\",\n      type: \"bool\",\n      hidden: {\n        image: {\n          name: \"Background\",\n          type: \"image\"\n        }\n      }\n    },\n    fillColor: {\n      name: \"Graph color (line and fill)\",\n      type: \"color\"\n    }\n  },\n  content: {\n    header: \"Tile header\",\n    footer: \"Tile subtitle\",\n    aspectRatio: \"3/2\",\n    imageBool: true,\n    image: \"{{mediaServerDomain}}/public/i8o449gc5jy0ki7bykpq2tb75yjg50a623lf74xdlacwwqbny4ut48he9jp16nal.jpeg\",\n    fillColor: \"#00000099\"\n  },\n  html: function html(content, builder, styles, component) {\n    var backgroundStyle = \" background-color: \".concat(content.fillColor, \"; \");\n    if (content.imageBool) {\n      backgroundStyle = \" background-image: url('\".concat(content.image, \"'); \");\n    }\n    var aspectRatioStyle = \"--fb-tile-aspect-ratio: \".concat(content.aspectRatio, \";\");\n    return \"\\n <div class=\\\"tile\\\" style=\\\"\".concat(backgroundStyle, \" \").concat(aspectRatioStyle, \"\\\">\\n    <div class=\\\"tile-content\\\" style=\\\"background-color: \").concat(content.fillColor, \";\\\">\\n      <div class=\\\"tile-title\\\">\").concat(content.header, \"</div>\\n      <div class=\\\"tile-subtitle\\\">\").concat(content.footer, \"</div>\\n    </div>\\n  </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-02.less\nvar tile_02 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tiles/tile-02.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-02.js\n\n/* harmony default export */ var tiles_tile_02 = ({\n  name: \"tile-02\",\n  title: \"Tile 02 - Tile with an image\",\n  subtitle: 'title, and optional subtitle on top',\n  contentSetting: {\n    header: {\n      name: \"Tile header\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Tile subtitle\",\n      type: \"textEditor\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format width/height, 3/2\"\n    },\n    imageBool: {\n      name: \"Image on background?\",\n      type: \"bool\",\n      hidden: {\n        image: {\n          name: \"Background\",\n          type: \"image\"\n        }\n      }\n    },\n    fillColor: {\n      name: \"Graph color (line and fill)\",\n      type: \"color\"\n    }\n  },\n  content: {\n    header: \"Tile header\",\n    footer: \"Tile subtitle\",\n    aspectRatio: \"3/2\",\n    imageBool: true,\n    image: \"{{mediaServerDomain}}/public/i8o449gc5jy0ki7bykpq2tb75yjg50a623lf74xdlacwwqbny4ut48he9jp16nal.jpeg\",\n    fillColor: \"#00000099\"\n  },\n  html: function html(content, builder, styles, component) {\n    var backgroundStyle = \" background-color: \".concat(content.fillColor, \"; \");\n    if (content.imageBool) {\n      backgroundStyle = \" background-image: url('\".concat(content.image, \"'); \");\n    }\n    var aspectRatioStyle = \"--fb-tile-aspect-ratio: \".concat(content.aspectRatio, \";\");\n    return \"\\n <div class=\\\"tile\\\" style=\\\"\".concat(backgroundStyle, \" \").concat(aspectRatioStyle, \"\\\">\\n    <div class=\\\"tile-content\\\" style=\\\"background-color: \").concat(content.fillColor, \";\\\">\\n      <div class=\\\"tile-title\\\">\").concat(content.header, \"</div>\\n      <div class=\\\"tile-subtitle\\\">\").concat(content.footer, \"</div>\\n    </div>\\n  </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-03.less\nvar tile_03 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/tiles/tile-03.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/tiles/tile-03.js\n\n/* harmony default export */ var tiles_tile_03 = ({\n  name: \"tile-03\",\n  title: \"Tile 03 - Tile with an image\",\n  subtitle: 'title, and optional subtitle, full background cover',\n  contentSetting: {\n    header: {\n      name: \"Tile header\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Tile subtitle\",\n      type: \"textEditor\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format width/height, 3/2\"\n    },\n    imageBool: {\n      name: \"Image on background?\",\n      type: \"bool\",\n      hidden: {\n        image: {\n          name: \"Background\",\n          type: \"image\"\n        }\n      }\n    },\n    fillColor: {\n      name: \"Graph color (line and fill)\",\n      type: \"color\"\n    }\n  },\n  content: {\n    header: \"Tile header\",\n    footer: \"Tile subtitle\",\n    aspectRatio: \"3/2\",\n    imageBool: true,\n    image: \"{{mediaServerDomain}}/public/i8o449gc5jy0ki7bykpq2tb75yjg50a623lf74xdlacwwqbny4ut48he9jp16nal.jpeg\",\n    fillColor: \"#00000099\"\n  },\n  html: function html(content, builder, styles, component) {\n    var backgroundStyle = \" background-color: \".concat(content.fillColor, \"; \");\n    if (content.imageBool) {\n      backgroundStyle = \" background-image: url('\".concat(content.image, \"'); \");\n    }\n    var aspectRatioStyle = \"--fb-tile-aspect-ratio: \".concat(content.aspectRatio, \";\");\n    var header = '';\n    if (content.header && content.header != '') {\n      header = \"<div class=\\\"tile-title\\\">\".concat(content.header, \"</div>\");\n    }\n    var footer = '';\n    if (content.footer && content.footer != '') {\n      footer = \"<div class=\\\"tile-subtitle\\\">\".concat(content.footer, \"</div>\");\n    }\n    return \"\\n <div class=\\\"tile\\\" style=\\\"\".concat(backgroundStyle, \" \").concat(aspectRatioStyle, \"\\\">\\n    <div class=\\\"tile-content\\\" style=\\\"background-color: \").concat(content.fillColor, \";\\\">\\n      \").concat(header, \"\\n      \").concat(footer, \"\\n    </div>\\n  </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/games/magnify-01.less\nvar magnify_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/games/magnify-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/games/magnify-01.js\n\n/* harmony default export */ var games_magnify_01 = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"magnify-01\",\n  group: \"gallery\",\n  title: \"Magnify 01\",\n  subtitle: \"\",\n  contentSetting: {\n    path: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    aspectRatio: {\n      name: \"Aspect ratio\",\n      type: \"textarea\",\n      help: \"In format (width / height)\"\n    }\n  },\n  content: {\n    path: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n    aspectRatio: \"16/9\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"img-magnifier-container\\\" style=\\\"\".concat(content.aspectRatio ? \"--magnify-01-aspect-ratio: \".concat(content.aspectRatio) : \"\", \"\\\">\\n    <img\\n    id=\\\"myimage\\\"\\n\\n    src=\\\"\").concat(content.path, \"\\\"  />\\n    </div>\\n  \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var elem = $builderEl.find('#myimage')[0];\n      elem.onload = function () {\n        //console.log(\"INIT magnify\", elem);\n        builder.params.methods.magnify(elem, 3);\n      };\n      // document.getElementById('myimage')\n    }\n  },\n  methods: {\n    getImagesReference: function getImagesReference() {\n      return getRef.bind(this)();\n    },\n    magnify: function magnify(elem, zoom) {\n      var img, glass, w, h, bw;\n      img = elem;\n\n      /* Create magnifier glass: */\n      glass = document.createElement(\"DIV\");\n      glass.setAttribute(\"class\", \"img-magnifier-glass\");\n\n      /* Insert magnifier glass: */\n      img.parentElement.insertBefore(glass, img);\n\n      /* Set background properties for the magnifier glass: */\n      glass.style.backgroundImage = \"url('\" + img.src + \"')\";\n      glass.style.backgroundRepeat = \"no-repeat\";\n      glass.style.backgroundSize = img.width * zoom + \"px \" + img.height * zoom + \"px\";\n      bw = 3;\n      w = glass.offsetWidth / 2;\n      h = glass.offsetHeight / 2;\n\n      /* Execute a function when someone moves the magnifier glass over the image: */\n      glass.addEventListener(\"mousemove\", moveMagnifier);\n      img.addEventListener(\"mousemove\", moveMagnifier);\n\n      /*and also for touch screens:*/\n      glass.addEventListener(\"touchmove\", moveMagnifier);\n      img.addEventListener(\"touchmove\", moveMagnifier);\n      glass.addEventListener(\"mouseout\", hideMagnifier);\n      img.addEventListener(\"mouseout\", hideMagnifier);\n      function hideMagnifier() {\n        // alert('hide');\n        glass.style.display = \"none\";\n      }\n      function moveMagnifier(e) {\n        var pos, x, y;\n        /* Prevent any other actions that may occur when moving over the image */\n        e.preventDefault();\n        /* Get the cursor's x and y positions: */\n        pos = getCursorPos(e);\n        x = pos.x;\n        y = pos.y;\n        /* Prevent the magnifier glass from being positioned outside the image: */\n        if (x > img.width - w / zoom) {\n          x = img.width - w / zoom;\n        }\n        if (x < w / zoom) {\n          x = w / zoom;\n        }\n        if (y > img.height - h / zoom) {\n          y = img.height - h / zoom;\n        }\n        if (y < h / zoom) {\n          y = h / zoom;\n        }\n        glass.style.display = \"block\";\n\n        // let timeoutId = setTimeout(function() {\n        //   glass.style.display = \"none\";\n        // }, 2000); // Timeout 2 sekundy\n        // clearTimeout(timeoutId);\n\n        /* Set the position of the magnifier glass: */\n\n        glass.style.left = x - w + \"px\";\n        glass.style.top = y - h + \"px\";\n        /* Display what the magnifier glass \"sees\": */\n        glass.style.backgroundPosition = \"-\" + (x * zoom - w + bw) + \"px -\" + (y * zoom - h + bw) + \"px\";\n      }\n      function getCursorPos(e) {\n        var a,\n          x = 0,\n          y = 0;\n        e = e || window.event;\n        /* Get the x and y positions of the image: */\n        a = img.getBoundingClientRect();\n        /* Calculate the cursor's x and y coordinates, relative to the image: */\n        x = e.pageX - a.left;\n        y = e.pageY - a.top;\n        /* Consider any page scrolling: */\n        x = x - window.pageXOffset;\n        y = y - window.pageYOffset;\n        return {\n          x: x,\n          y: y\n        };\n      }\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js\nvar interactive_math = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.less\nvar ggb_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.js\n\n\n\n\n//DOKUMENTACE\n// základní spuštění: https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding\n// api reference: https://geogebra.github.io/docs/reference/en/GeoGebra_App_Parameters/\n/* harmony default export */ var geogebra_ggb_01 = ({\n  name: \"ggb-01\",\n  title: \"Geogebra\",\n  subtitle: \"Main block\",\n  contentSetting: {\n    material_id: {\n      name: \"GGB Online Material ID\",\n      // not necessary there\n      help: \"GeoGebra Materials id to load. Use only to devel purpose, before publishing download GGB file to media server first & add path to GGB Local URL.\",\n      type: \"textarea\"\n    },\n    url2: {\n      name: \"GGB Local URL\",\n      // not necessary there\n      help: \"Download the ggb file from the project, upload it to the Mediaserver, copy the URL using the right-click button, and paste it here.\",\n      type: \"textarea\"\n    },\n    height: {\n      name: \"Height of element\",\n      // not necessary there\n      help: \"100 % is aspect ratio 1/1. 50 % have is half 2/1 etc.\",\n      type: \"input-number\"\n    },\n    showToolBar: {\n      name: \"showToolBar\",\n      // not necessary there\n      help: \"States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false\",\n      type: \"bool\"\n    },\n    showAlgebraInput: {\n      name: \"showAlgebraInput\",\n      // not necessary there\n      help: \"States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false\",\n      type: \"bool\"\n    },\n    showMenuBar: {\n      name: \"showMenuBar\",\n      // not necessary there\n      help: \"States whether the menubar of GeoGebra should be shown in the applet. Default: false\",\n      type: \"bool\"\n    },\n    url: {\n      name: \"GG aplet URL\",\n      // not necessary there\n      help: \"\",\n      type: \"textarea\"\n    }\n  },\n  content: {\n    material_id: '17499',\n    url: 'https://www.geogebra.org/apps/deployggb.js',\n    url2: 'https://mediats.futurebooks.cz/public/9e7bk55el0nkli4flyjfvqw51jk37q5v12snh2zv6hs5usv1qsvijg0uzy5ycl2p.ggb',\n    height: 50,\n    showToolBar: false,\n    showAlgebraInput: false,\n    showMenuBar: false\n  },\n  methods: {\n    start: function () {\n      var _start = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n        var app, $componentEl, methods, content, helpers;\n        return regenerator_default.a.wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              app = this.app;\n              $componentEl = this.$block;\n              methods = this.params.methods;\n              content = this.params.content;\n              helpers = this.params.helpers;\n              return _context2.abrupt(\"return\", new Promise(/*#__PURE__*/function () {\n                var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(resolve, reject) {\n                  return regenerator_default.a.wrap(function _callee$(_context) {\n                    while (1) switch (_context.prev = _context.next) {\n                      case 0:\n                        _context.prev = 0;\n                        _context.next = 3;\n                        return methods.loadScript(content.url);\n                      case 3:\n                        //console.info(\"GEOGEBRA script loaded\");\n                        // Zde můžeš provést další asynchronní operace, pokud jsou potřeba\n                        // Po dokončení všech operací zavolej resolve\n                        resolve();\n                        _context.next = 9;\n                        break;\n                      case 6:\n                        _context.prev = 6;\n                        _context.t0 = _context[\"catch\"](0);\n                        reject(_context.t0);\n                      case 9:\n                      case \"end\":\n                        return _context.stop();\n                    }\n                  }, _callee, null, [[0, 6]]);\n                }));\n                return function (_x, _x2) {\n                  return _ref.apply(this, arguments);\n                };\n              }()));\n            case 6:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function start() {\n        return _start.apply(this, arguments);\n      }\n      return start;\n    }(),\n    loadScript: function () {\n      var _loadScript = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(url) {\n        var app;\n        return regenerator_default.a.wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              app = this.app;\n              return _context3.abrupt(\"return\", new Promise(function (resolve, reject) {\n                var check = $$(document).find(\"script\");\n                check = _.filter(check, function (o) {\n                  return o.src == url;\n                });\n                var isLoaded = false;\n                if (check.length > 0) {\n                  isLoaded = check[0].getAttribute('data-loaded') === 'true';\n                }\n                var prior = document.getElementsByTagName(\"script\")[0];\n                //\n                if (check.length > 0 && isLoaded) {\n                  console.log('GG - sript already loaded');\n                  resolve({\n                    msg: \"sript already loaded\"\n                  });\n                } else {\n                  var script = document.createElement(\"script\");\n                  script.async = 1;\n                  script.onload = function (_, isAbort) {\n                    if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {\n                      script.onerror = script.onload = null;\n                      script.setAttribute('data-loaded', 'true');\n                      script = undefined;\n                      console.log('GG - načteno');\n                      resolve({\n                        msg: \"script added\"\n                      });\n                    }\n                  };\n                  script.onerror = function (e) {\n                    if (!script.readyState || /loaded|complete/.test(script.readyState)) {\n                      script.onerror = script.onload = null;\n                      script = undefined;\n                      // try to insert script by other app for previewing - scripts might be inserted into DOM\n                      if (window.editorapi && typeof window.editorapi.insertScriptById === \"function\") {\n                        //console.log(\"inserting script by thirdparty api\");\n                        window.editorapi.insertScriptById(source, \"fmiobj\");\n                      }\n                    }\n                    console.warn(\"%c loadScript Geogebra\", e, \"color: red;\");\n                    resolve({\n                      msg: \"error\"\n                    });\n                  };\n                  script.src = url;\n                  prior.parentNode.insertBefore(script, prior);\n                }\n              }));\n            case 2:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3, this);\n      }));\n      function loadScript(_x3) {\n        return _loadScript.apply(this, arguments);\n      }\n      return loadScript;\n    }()\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n  <div class=\\\"scale-ggb-element-\".concat(builder.id, \"\\\">\\n  <div id=\\\"ggb-element-\").concat(builder.id, \"\\\" class=\\\"ggb-element\\\" style=\\\"\\n  padding-bottom: \").concat(content.height, \"%;\\n  margin-bottom: -\").concat(content.height, \"%;\\\"></div>\\n</div>\\n\");\n  },\n  on: {\n    init: function () {\n      var _init = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4(builderEl, builder) {\n        var $block, $ggbElem, content, app, methods, params, applet;\n        return regenerator_default.a.wrap(function _callee4$(_context4) {\n          while (1) switch (_context4.prev = _context4.next) {\n            case 0:\n              $block = builderEl;\n              $ggbElem = $block.find(\"#ggb-element-\".concat(builder.params.id));\n              console.log(\"$ggbElem\", $ggbElem);\n              $ggbElem.html('');\n              $ggbElem.css('width', '');\n              $ggbElem.css('height', '');\n              content = builder.params.content;\n              app = builder.app;\n              console.log(\"AAAAAAA\", builderEl, builder, builder.params.id);\n              methods = this.params.methods;\n              console.log('GG - start');\n              _context4.next = 13;\n              return methods.start();\n            case 13:\n              console.log('GG - mělo by být hotovo');\n              console.warn(\"%c INIT Geogebra \", \"color: red;\");\n              params = {\n                \"appName\": \"gg_name_\".concat(content.material_id),\n                \"filename\": \"\".concat(content.url2),\n                \"showToolBar\": \"\".concat(content.showToolBar),\n                \"showAlgebraInput\": \"\".concat(content.showAlgebraInput),\n                \"showMenuBar\": \"\".concat(content.showMenuBar),\n                \"scaleContainerClass\": \"scale-ggb-element-\".concat(builder.params.id)\n              };\n              if (content.material_id && content.material_id != '') {\n                params['material_id'] = \"\".concat(content.material_id);\n              }\n              applet = new GGBApplet(params, true);\n              applet.inject(\"ggb-element-\".concat(builder.params.id));\n            case 19:\n            case \"end\":\n              return _context4.stop();\n          }\n        }, _callee4, this);\n      }));\n      function init(_x4, _x5) {\n        return _init.apply(this, arguments);\n      }\n      return init;\n    }(),\n    visible: function visible(builderEl, builder) {}\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.less\nvar food_calc_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.js\n\n/* harmony default export */ var food_calculator_food_calc_01 = ({\n  name: \"food-calc-01\",\n  title: \"Food portion calculator\",\n  subtitle: \"\",\n  contentSetting: {\n    text: {\n      name: \"Intro text\",\n      type: \"textarea\"\n    },\n    background: {\n      name: \"Backgrauond image\",\n      type: \"image\"\n    },\n    buyRound: {\n      name: \"Closest number to round the buy amount\",\n      type: \"input-number\"\n    },\n    food: {\n      name: \"Food\",\n      type: \"array\",\n      values: {\n        name: {\n          name: \"Food name\",\n          type: \"textarea\"\n        },\n        man: {\n          name: \"Man portion\",\n          type: \"textarea\",\n          help: \"Add only number without unit, if you want to add range separate two numbers with '-' (example: 150-200) \"\n        },\n        woman: {\n          name: \"Woman portion\",\n          type: \"textarea\",\n          help: \"Add only number without unit, if you want to add range separate two numbers with '-' (example: 150-200) \"\n        },\n        child: {\n          name: \"Child portion\",\n          type: \"textarea\",\n          help: \"Add only number without unit, if you want to add range separate two numbers with '-' (example: 150-200) \"\n        }\n      }\n    }\n  },\n  content: {\n    text: \"Začněte plánovat své jídlo lépe\",\n    background: \"{{mediaServerDomain}}/public/rs3x8aa0dq3dvvg7zjwtcvaic5vi10cv66w0nox1jqxlb1pnuyqzy9tmda05ije6.png\",\n    buyRound: \"100\",\n    food: [{\n      name: \"Drůbeží maso\",\n      man: \"175\",\n      woman: \"150\",\n      child: \"120\"\n    }]\n  },\n  helpers: {\n    manCounter: 0,\n    womanCounter: 0,\n    childCounter: 0,\n    needAmount: 0,\n    buyAmount: 0,\n    amountCounter: 0,\n    selectedFood: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var bgItem = content.background;\n    return \"\\n    <div class=\\\"calc-container\\\">\\n     <div class=\\\"control-container\\\">\\n        <div class=\\\"food\\\">\\n          <label>Potravina:</label>\\n          <select class=\\\"food-select\\\">\\n          <option value=\\\"null\\\">Vyberte potravinu</option>\\n          \".concat(content.food.map(function (data, index) {\n      return \"<option value=\\\"\".concat(data.id, \"\\\">\").concat(data.name, \"</option>\");\n    }), \"\\n          </select>\\n        </div>\\n        <div class=\\\"gendre\\\">\\n          <label>Po\\u010Det osob, pro kter\\xE9 va\\u0159\\xEDte/nakupujete:</label>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n            <div>\\n            <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_520_2637)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M12.3496 9.28952L10.5636 11.0756C10.4991 11.14 10.4629 11.2275 10.4629 11.3186V12.7072L8.58 14.5901L9.86703 8.58402L9.19478 8.43999L7.99999 14.0157L6.80521 8.43999L6.13295 8.58402L7.41999 14.5901L5.5371 12.7072V11.3186C5.5371 11.2274 5.50089 11.14 5.43642 11.0756L3.65034 9.28952L3.16418 9.77568L4.8496 11.4611V12.8496C4.8496 12.9407 4.88582 13.0282 4.95029 13.0926L7.75693 15.8993C7.75818 15.9006 7.75959 15.9016 7.76087 15.9028C7.76634 15.9082 7.77202 15.9132 7.77787 15.9182C7.78034 15.9203 7.78274 15.9225 7.78527 15.9245C7.79202 15.9299 7.79906 15.935 7.80627 15.9399C7.80787 15.941 7.8094 15.9423 7.81102 15.9433C7.81899 15.9486 7.82724 15.9535 7.83574 15.9582C7.83618 15.9584 7.83668 15.9586 7.83712 15.9588C7.84884 15.9651 7.86087 15.9707 7.87315 15.9756C7.87624 15.9768 7.87943 15.9777 7.88252 15.9789C7.89165 15.9822 7.90081 15.9852 7.91015 15.9877C7.91459 15.9889 7.91899 15.99 7.92343 15.991C7.93199 15.9929 7.94062 15.9945 7.94931 15.9958C7.95352 15.9964 7.95768 15.9972 7.9619 15.9977C7.97418 15.999 7.98652 15.9999 7.99893 15.9999C7.99962 16 8.00031 16 8.00099 15.9999C8.0134 15.9999 8.02574 15.999 8.03802 15.9977C8.04224 15.9972 8.0464 15.9964 8.05062 15.9958C8.05931 15.9945 8.0679 15.9929 8.07649 15.991C8.08096 15.99 8.0854 15.9889 8.08984 15.9877C8.09909 15.9852 8.10821 15.9823 8.11728 15.979C8.12049 15.9778 8.12371 15.9768 8.1269 15.9756C8.13915 15.9707 8.15112 15.9652 8.16281 15.9589C8.16328 15.9586 8.16378 15.9585 8.16424 15.9582C8.17278 15.9536 8.18103 15.9486 8.18903 15.9433C8.19053 15.9423 8.19193 15.9412 8.19343 15.9402C8.20078 15.9352 8.20787 15.93 8.21475 15.9245C8.21721 15.9225 8.21962 15.9203 8.22209 15.9183C8.22796 15.9133 8.23365 15.9082 8.23915 15.9028C8.2404 15.9016 8.24181 15.9006 8.24306 15.8993L11.0497 13.0926C11.1141 13.0282 11.1504 12.9407 11.1504 12.8496V11.4611L12.8358 9.77568L12.3496 9.28952Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path d=\\\"M12.7015 9.2065C12.6998 9.20597 12.6982 9.20544 12.6966 9.20491L12.6956 9.20459C12.6953 9.20447 12.6949 9.20434 12.6945 9.20422L9.90921 8.27578C10.0907 8.15343 10.259 8.01296 10.4104 7.85577C11.0521 7.21292 11.4055 6.35873 11.4055 5.45017V1.87808C11.4055 0.844388 10.5645 0.00341453 9.53083 0.00341453H6.98222L6.94644 0.00282077C6.31759 -0.00771054 5.72399 -0.0176168 5.14343 0.552637C4.78933 0.90667 4.59433 1.37739 4.59433 1.87808V5.4502C4.59433 6.35883 4.94771 7.21302 5.58943 7.85587C5.74087 8.01302 5.90909 8.15346 6.09062 8.27581L3.30526 9.20425C3.30489 9.20437 3.30454 9.2045 3.30417 9.20462L3.3032 9.20494C3.30157 9.20547 3.29995 9.206 3.29829 9.20653C1.63166 9.76219 0.511902 11.3159 0.511902 13.0726V15.6563C0.511902 15.8461 0.665809 16 0.855654 16H15.1441C15.334 16 15.4879 15.8461 15.4879 15.6563V13.0726C15.4879 11.3158 14.3681 9.76216 12.7015 9.2065ZM10.718 1.87808V3.06524H10.0406C8.70736 3.09143 7.48713 2.01121 7.34519 0.690919H9.53083C10.1854 0.690919 10.718 1.22345 10.718 1.87808ZM5.62734 1.04095C5.93175 0.741981 6.22234 0.691044 6.63553 0.687669V1.36777C6.63553 2.18602 6.05356 2.87084 5.28184 3.03018V1.87808C5.28184 1.56105 5.40531 1.26298 5.62734 1.04095ZM6.07787 7.37205C5.56453 6.8588 5.2818 6.17623 5.2818 5.4502V3.72762C6.15634 3.60078 6.87875 2.99796 7.17647 2.19096C7.30666 2.39237 7.459 2.58155 7.6326 2.75521C8.27579 3.3985 9.13092 3.75278 10.0406 3.75275H10.7179V5.4502C10.7179 6.17626 10.4352 6.8588 9.92186 7.37205C9.92024 7.37365 9.91868 7.3753 9.91708 7.37693C8.97061 8.41234 7.0291 8.41228 6.08265 7.37693C6.08109 7.3753 6.0795 7.37365 6.07787 7.37205ZM7.99988 8.84847C8.34679 8.84847 8.6872 8.7975 9.00926 8.7005L12.2489 9.78035V15.3125H3.75092V9.78038L6.99053 8.70053C7.3126 8.79753 7.65301 8.84847 7.99988 8.84847ZM1.19941 13.0726C1.19941 11.7777 1.93166 10.616 3.06342 10.0473V15.3125H1.19941V13.0726ZM14.8004 15.3125H12.9364V10.0473C14.0681 10.616 14.8004 11.7777 14.8004 13.0726V15.3125Z\\\" fill=\\\"#353535\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_520_2637\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n            </svg>\\n          </div>\\n             Mu\\u017E\\n            </div>\\n            <div class=\\\"selector\\\">\\n              <div class=\\\"minus\\\" data-type=\\\"manCounter\\\">\\n                <i class=\\\"material-icons\\\">remove</i>\\n              </div>\\n              <div class=\\\"num\\\">\\n                0\\n              </div>\\n              <div class=\\\"plus\\\" data-type=\\\"manCounter\\\">\\n                  <i class=\\\"material-icons\\\">add</i>\\n              </div>\\n            </div>\\n          </div>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n              <div>\\n              <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_520_2640)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M10.4312 14.3881H5.50178C4.93856 14.3881 4.40619 14.1112 4.07769 13.6473L3.48566 12.8113L4.04672 12.414L4.63875 13.2499C4.83859 13.5321 5.16122 13.7005 5.50181 13.7005H10.4312C10.8103 13.7005 11.1637 13.492 11.3537 13.1564L11.8207 12.3309L12.419 12.6695L11.952 13.4949C11.6403 14.0458 11.0576 14.3881 10.4312 14.3881Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path d=\\\"M13.948 15.2686L13.5411 13.5576C13.4793 13.2975 13.3653 13.0588 13.211 12.8529V5.29534C13.211 2.37634 10.8747 0.00146875 8.00252 3.125e-05C8.0023 3.125e-05 8.00208 0 8.00187 0C8.00174 0 8.00162 3.125e-05 8.00149 3.125e-05C8.00099 3.125e-05 8.00046 0 7.99996 0C5.12655 0 2.78887 2.37547 2.78887 5.29534V12.8775C2.59733 13.1089 2.4593 13.3867 2.39346 13.6908L2.04918 15.2803C2.01077 15.4576 2.0539 15.64 2.16749 15.7808C2.27983 15.9201 2.44643 16 2.62462 16H13.3753C13.5558 16 13.7238 15.9184 13.8361 15.7762C13.9497 15.6324 13.9905 15.4474 13.948 15.2686ZM12.5235 5.29534V12.2864C12.4241 12.2384 12.3198 12.1989 12.2114 12.1689L10.5764 11.7172C10.2016 11.6137 9.89952 11.3287 9.76849 10.955L9.46974 10.1031C10.5993 9.51562 11.3801 8.27172 11.3801 6.83553V5.26066C11.38 5.16147 11.3355 5.06459 11.2604 4.99988L8.34558 2.49647V0.700844C10.679 0.881281 12.5235 2.87303 12.5235 5.29534ZM5.31368 6.83553V5.42647L8.0023 3.10791L10.6926 5.41856V6.83553C10.6926 8.45687 9.48615 9.77594 8.00318 9.77594C6.52018 9.77594 5.31368 8.45687 5.31368 6.83553ZM7.65812 0.700594V2.49691L4.74546 5.00869C4.67062 5.07341 4.62633 5.17006 4.62621 5.269V6.83553C4.62621 8.22116 5.35315 9.42762 6.41874 10.0385L6.11905 10.9687C5.99946 11.34 5.71021 11.6312 5.34524 11.7477L3.66162 12.2852C3.5983 12.3054 3.53655 12.329 3.4764 12.3556V5.29534C3.47637 2.87169 5.32287 0.879156 7.65812 0.700594ZM2.74565 15.3125L3.06537 13.8363C3.1124 13.6192 3.21677 13.4233 3.36162 13.2663C3.3754 13.254 3.38833 13.2407 3.39999 13.2263C3.53105 13.0967 3.69133 12.9974 3.87068 12.9401L5.5543 12.4026C6.13021 12.2188 6.58593 11.7615 6.77343 11.1795L7.05143 10.3165C7.35343 10.412 7.67277 10.4634 8.00318 10.4634C8.28799 10.4634 8.56462 10.4252 8.82902 10.3535L9.11974 11.1826C9.3253 11.7688 9.80143 12.2164 10.3934 12.3799L12.0283 12.8316C12.4465 12.9472 12.7699 13.2863 12.8723 13.7167L13.2518 15.3125H2.74565Z\\\" fill=\\\"#353535\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_520_2640\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n              </svg>\\n              </div>\\n\\n              \\u017Dena\\n            </div>\\n            <div class=\\\"selector\\\">\\n              <div class=\\\"minus\\\" data-type=\\\"womanCounter\\\">\\n                <i class=\\\"material-icons\\\">remove</i>\\n              </div>\\n              <div class=\\\"num\\\">\\n                0\\n              </div>\\n              <div class=\\\"plus\\\" data-type=\\\"womanCounter\\\">\\n                  <i class=\\\"material-icons\\\">add</i>\\n              </div>\\n            </div>\\n          </div>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n            <div>\\n            <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n              <g clip-path=\\\"url(#clip0_520_2628)\\\">\\n              <path d=\\\"M11.187 10.9633C11.9698 10.261 12.4351 9.30747 12.5178 8.25003H13C13.8788 8.25003 14.5938 7.53506 14.5938 6.65628C14.5938 5.7775 13.8788 5.06253 13 5.06253C12.8102 5.06253 12.6563 5.21644 12.6563 5.40628C12.6563 5.59612 12.8102 5.75003 13 5.75003C13.4997 5.75003 13.9063 6.15656 13.9063 6.65628C13.9063 7.156 13.4997 7.56253 13 7.56253H12.5313V5.56253C12.5313 5.37269 12.3773 5.21878 12.1875 5.21878C11.9977 5.21878 11.8438 5.37269 11.8438 5.56253V7.90628C11.8438 9.91941 10.1913 11.4375 8 11.4375C5.80869 11.4375 4.15625 9.91941 4.15625 7.90628V5.56253C4.15625 5.37269 4.00235 5.21878 3.8125 5.21878C3.62266 5.21878 3.46875 5.37269 3.46875 5.56253V7.56253H3C2.50028 7.56253 2.09375 7.15597 2.09375 6.65628C2.09375 6.15659 2.50028 5.75003 3 5.75003C3.18984 5.75003 3.34375 5.59612 3.34375 5.40628C3.34375 5.21644 3.18984 5.06253 3 5.06253C2.12119 5.06253 1.40625 5.77747 1.40625 6.65628C1.40625 7.53509 2.12119 8.25003 3 8.25003H3.48213C3.56494 9.3075 4.03016 10.261 4.81303 10.9633C5.26735 11.3709 5.8095 11.6788 6.40591 11.8749V12.1069C5.61997 12.3153 4.89191 12.7146 4.2861 13.272C3.60997 13.894 3.11653 14.6848 2.85906 15.5592C2.82847 15.6631 2.84866 15.7754 2.91356 15.8622C2.97847 15.9489 3.08047 16 3.18884 16H12.8103C12.9187 16 13.0207 15.9489 13.0856 15.8621C13.1505 15.7754 13.1707 15.6631 13.1401 15.5591C12.8826 14.6848 12.3892 13.8939 11.7132 13.272C11.1074 12.7146 10.3793 12.3153 9.59341 12.1069V11.8751C10.1901 11.6791 10.7325 11.371 11.187 10.9633ZM12.3236 15.3125H3.67547C4.05497 14.4078 4.7391 13.6528 5.5871 13.1769C6.04247 14.0757 6.97719 14.6613 7.99966 14.6613C9.02213 14.6613 9.95682 14.0757 10.4122 13.1769C11.2601 13.6528 11.9442 14.4078 12.3236 15.3125ZM9.1806 12.7159C9.38794 12.7584 9.59066 12.8165 9.78735 12.8888C9.44382 13.5466 8.75372 13.9738 7.99963 13.9738C7.2455 13.9738 6.55541 13.5466 6.21188 12.8888C6.4086 12.8165 6.61132 12.7585 6.81866 12.7159C6.97857 12.6832 7.09335 12.5424 7.09335 12.3792V12.0469C7.38763 12.0986 7.69097 12.125 7.99997 12.125C8.30872 12.125 8.61178 12.0986 8.90585 12.047V12.3792C8.90591 12.5424 9.02069 12.6831 9.1806 12.7159Z\\\" fill=\\\"#353535\\\"/>\\n              <path d=\\\"M8.01985 9.96219C8.52604 9.96219 8.99773 9.68987 9.25085 9.2515C9.34579 9.08709 9.28945 8.87684 9.12504 8.78193C8.96064 8.68706 8.75042 8.74334 8.65548 8.90775C8.52479 9.13409 8.28126 9.27468 8.01989 9.27468C7.75851 9.27468 7.51498 9.13406 7.38429 8.90775C7.28935 8.74334 7.0791 8.68703 6.91473 8.78193C6.75032 8.87687 6.69398 9.08709 6.78892 9.2515C7.04195 9.68984 7.51367 9.96219 8.01985 9.96219Z\\\" fill=\\\"#353535\\\"/>\\n              <path d=\\\"M6.30963 8.25003C6.49948 8.25003 6.65338 8.09612 6.65338 7.90628V7.66362C6.65338 7.47377 6.49948 7.31987 6.30963 7.31987C6.11979 7.31987 5.96588 7.47377 5.96588 7.66362V7.90628C5.96588 8.09612 6.11979 8.25003 6.30963 8.25003Z\\\" fill=\\\"#353535\\\"/>\\n              <path d=\\\"M9.69043 8.25003C9.88027 8.25003 10.0342 8.09612 10.0342 7.90628V7.66362C10.0342 7.47377 9.88027 7.31987 9.69043 7.31987C9.50059 7.31987 9.34668 7.47377 9.34668 7.66362V7.90628C9.34668 8.09612 9.50059 8.25003 9.69043 8.25003Z\\\" fill=\\\"#353535\\\"/>\\n              <path class=\\\"svg-theme\\\" d=\\\"M13 5.75003H10.625C10.4992 5.75003 10.3835 5.68131 10.3232 5.57091L9.6875 4.4054L9.05178 5.57087C8.99157 5.68131 8.87582 5.75 8.75 5.75H3C2.81016 5.75 2.65625 5.59609 2.65625 5.40625V4.125C2.65625 1.85047 4.50672 -3.8147e-06 6.78125 -3.8147e-06H9.21875C11.4933 -3.8147e-06 13.3438 1.85047 13.3438 4.125V5.40628C13.3438 5.59612 13.1898 5.75003 13 5.75003ZM10.829 5.06253H12.6563V4.125C12.6563 2.22956 11.1142 0.687497 9.21875 0.687497H6.78125C4.88581 0.687497 3.34375 2.22956 3.34375 4.125V5.06253H8.54594L9.38572 3.52294C9.44594 3.4125 9.56169 3.34378 9.6875 3.34378C9.81332 3.34378 9.92904 3.4125 9.98928 3.5229L10.829 5.06253Z\\\" fill=\\\"#94BE33\\\"/>\\n              </g>\\n              <defs>\\n              <clipPath id=\\\"clip0_520_2628\\\">\\n              <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n              </clipPath>\\n              </defs>\\n            </svg>\\n\\n            </div>\\n              D\\xEDt\\u011B\\n            </div>\\n            <div class=\\\"selector\\\">\\n              <div class=\\\"minus\\\" data-type=\\\"childCounter\\\">\\n                <i class=\\\"material-icons\\\">remove</i>\\n              </div>\\n              <div class=\\\"num\\\">\\n                0\\n              </div>\\n              <div class=\\\"plus\\\" data-type=\\\"childCounter\\\">\\n                  <i class=\\\"material-icons\\\">add</i>\\n              </div>\\n            </div>\\n          </div>\\n        </div>\\n        <div class=\\\"portion\\\">\\n          <label>Po\\u010Det porc\\xED:</label>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n              <div>\\n              <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_521_2690)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M15.3584 6.50203L14.6718 6.46737C14.6736 6.431 14.6745 6.39446 14.6745 6.35875C14.6745 5.4794 14.1201 4.68537 13.2948 4.3829C13.1574 4.33253 13.0669 4.20065 13.0694 4.05431C13.0792 3.47834 12.8607 2.93728 12.4542 2.53075C11.8429 1.91946 10.9013 1.74493 10.1112 2.09643C9.96363 2.16206 9.79047 2.11618 9.69475 1.98621C9.29913 1.44912 8.66557 1.12843 7.99997 1.12843C7.33438 1.12843 6.70081 1.44909 6.30519 1.98621C6.2095 2.11615 6.03631 2.16206 5.88872 2.09643C5.0986 1.74496 4.157 1.91956 3.54575 2.53078C3.13922 2.93728 2.92075 3.47837 2.93053 4.05431C2.93303 4.20065 2.8426 4.33253 2.70513 4.3829C1.87988 4.68537 1.32541 5.47937 1.32541 6.35875C1.32541 6.38859 1.32606 6.41868 1.32731 6.44818L0.640439 6.47737C0.638783 6.43818 0.637939 6.39828 0.637939 6.35878C0.637939 5.272 1.27631 4.28346 2.24894 3.82884C2.29335 3.1544 2.57641 2.52796 3.05963 2.04468C3.46656 1.63775 3.98028 1.36996 4.54522 1.27025C5.0086 1.1884 5.47888 1.22375 5.91994 1.37168C6.44644 0.784652 7.20597 0.440933 7.99997 0.440933C8.79397 0.440933 9.5535 0.784652 10.08 1.37165C10.5211 1.22368 10.9914 1.1884 11.4548 1.27021C12.0197 1.3699 12.5334 1.63771 12.9403 2.04462C13.4236 2.5279 13.7066 3.15434 13.751 3.82878C14.7237 4.2834 15.362 5.27193 15.362 6.35872C15.362 6.40597 15.3608 6.45418 15.3584 6.50203Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path d=\\\"M16 6.50087C16 6.31103 15.8461 6.15712 15.6562 6.15712H0.34375C0.153906 6.15712 0 6.31103 0 6.50087C0 9.4544 1.57063 12.1846 4.11241 13.6758V15.2153C4.11241 15.4052 4.26631 15.5591 4.45616 15.5591H11.5439C11.7337 15.5591 11.8876 15.4052 11.8876 15.2153V13.6758C14.4294 12.1846 16 9.4544 16 6.50087ZM15.3048 6.84462C15.2838 7.31046 15.22 7.76893 15.1169 8.21531H0.883125C0.779969 7.76893 0.71625 7.31046 0.69525 6.84462H15.3048ZM11.2001 14.8716H4.79991V13.8042H11.2001L11.2001 14.8716ZM11.4818 13.1167H4.51816C2.86997 12.1691 1.65928 10.6567 1.07631 8.90281H14.9237C14.3407 10.6567 13.1301 12.1691 11.4818 13.1167Z\\\" fill=\\\"#353535\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M5.61438 4.43377C5.52641 4.43377 5.43844 4.40021 5.37132 4.33309C5.23707 4.19884 5.23707 3.98118 5.37132 3.84696L5.72197 3.49634C5.85629 3.36212 6.07388 3.36209 6.20813 3.49634C6.34238 3.63059 6.34238 3.84821 6.20813 3.98246L5.85747 4.33309C5.79032 4.40021 5.70235 4.43377 5.61438 4.43377Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M9.27199 3.71968C9.22571 3.71968 9.17871 3.71027 9.13359 3.69043L8.67981 3.49056C8.50606 3.41402 8.42727 3.21115 8.50381 3.0374C8.58034 2.86365 8.78309 2.78484 8.95696 2.86137L9.41074 3.06124C9.58449 3.13777 9.66327 3.34065 9.58674 3.5144C9.53009 3.64306 9.40412 3.71968 9.27199 3.71968Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M8.01452 5.02921H7.51868C7.32883 5.02921 7.17493 4.87531 7.17493 4.68546C7.17493 4.49562 7.32883 4.34171 7.51868 4.34171H8.01452C8.20436 4.34171 8.35827 4.49562 8.35827 4.68546C8.35827 4.87531 8.20436 5.02921 8.01452 5.02921Z\\\" fill=\\\"#94BE33\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_521_2690\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n              </svg>\\n\\n              </div>\\n              Po\\u010Det porc\\xED p\\u0159i n\\xE1kupu/va\\u0159en\\xED\\n            </div>\\n            <div class=\\\"selector\\\">\\n              <div class=\\\"minus\\\" data-type=\\\"amountCounter\\\" >\\n                <i class=\\\"material-icons\\\">remove</i>\\n              </div>\\n              <div class=\\\"num\\\">\\n                0\\n              </div>\\n              <div class=\\\"plus\\\" data-type=\\\"amountCounter\\\">\\n                  <i class=\\\"material-icons\\\">add</i>\\n              </div>\\n            </div>\\n          </div>\\n        </div>\\n        <div class=\\\"btn-container\\\">\\n          <div class=\\\"button button-raised btn-reset hidden\\\">Restartovat</div>\\n          <div class=\\\"button button-fill btn-calc disabled\\\">V\\xFDpo\\u010Det porc\\xED</div>\\n        </div>\\n     </div>\\n     <div class=\\\"result-container\\\" >\\n          <div class=\\\"arrow\\\"></div>\\n        <div class=\\\"stage1\\\" style=\\\"--bg: url('\").concat(bgItem, \"');\\\">\\n          <div class=\\\"overlay\\\"></div>\\n          <div class=\\\"text\\\">\").concat(content.text, \"</div>\\n        </div>\\n        <div class=\\\"stage2 hidden\\\">\\n        </div>\\n     </div>\\n\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var inputMinus = $builderEl.find(\".minus\");\n      var inputPlus = $builderEl.find(\".plus\");\n      var btn = $builderEl.find(\".btn-calc\");\n      var reset = $builderEl.find(\".btn-reset\");\n      var select = $builderEl.find(\".food-select\");\n      inputMinus.off(\"click\");\n      inputMinus.on(\"click\", function (e) {\n        var target = e.target;\n        if (!$$(target).hasClass('minus')) {\n          target = $$(target).parent(\".minus\");\n        }\n        builder.params.methods.changeInput(target, \"minus\", builder);\n      });\n      inputPlus.off(\"click\");\n      inputPlus.on(\"click\", function (e) {\n        var target = e.target;\n        if (!$$(target).hasClass('plus')) {\n          target = $$(target).parent(\".plus\");\n        }\n        builder.params.methods.changeInput(target, \"plus\", builder);\n      });\n      btn.off(\"click\");\n      btn.on(\"click\", function (e) {\n        builder.params.methods.calcResult($builderEl, builder);\n      });\n      reset.off(\"click\");\n      reset.on(\"click\", function (e) {\n        builder.params.methods.reset($builderEl, builder);\n      });\n      select.off(\"change\");\n      select.on(\"change\", function (e) {\n        var value = $$(e.target).val();\n        var btn = $builderEl.find(\".btn-calc\");\n        if (value == 'null') {\n          $$(btn).addClass(\"disabled\");\n          return;\n        }\n        var food = _.find(builder.params.content.food, function (o) {\n          return o.id == value;\n        });\n        $$(btn).removeClass(\"disabled\");\n        builder.params.helpers.selectedFood = food;\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    changeInput: function changeInput(target, operation, builder) {\n      var helpers = builder.params.helpers;\n      var type = $$(target).data(\"type\");\n      var input = $$(target).siblings(\".num\");\n      if (helpers[type] == 0 && operation == \"minus\") {\n        return;\n      }\n      if (operation == \"minus\") {\n        helpers[type] -= 1;\n      } else {\n        helpers[type] += 1;\n      }\n      input.text(helpers[type]);\n    },\n    calcResult: function calcResult($builderEl, builder) {\n      var helpers = builder.params.helpers;\n      var content = builder.params.content;\n      // manCounter: 0,\n      // womanCounter: 0,\n      // childCounter: 0,\n      // needAmount: 0,\n      // buyAmount: 0,\n      // amountCounter: 0,\n      // selectedFood: {}\n\n      var manAmount = 0;\n      var womanAmount = 0;\n      var childAmount = 0;\n      if (helpers.selectedFood.man.includes(\"-\")) {\n        var part = helpers.selectedFood.man.trim().split(\"-\");\n        manAmount = Math.floor((parseInt(part[0]) + parseInt(part[1])) / 2);\n      } else {\n        manAmount = parseInt(helpers.selectedFood.man);\n      }\n      if (helpers.selectedFood.woman.includes(\"-\")) {\n        var _part = helpers.selectedFood.woman.trim().split(\"-\");\n        womanAmount = (parseInt(_part[0]) + parseInt(_part[1])) / 2;\n      } else {\n        womanAmount = parseInt(helpers.selectedFood.woman);\n      }\n      if (helpers.selectedFood.child.includes(\"-\")) {\n        var _part2 = helpers.selectedFood.child.trim().split(\"-\");\n        childAmount = (parseInt(_part2[0]) + parseInt(_part2[1])) / 2;\n      } else {\n        childAmount = parseInt(helpers.selectedFood.child);\n      }\n      helpers.needAmount = (manAmount * helpers.manCounter + womanAmount * helpers.womanCounter + childAmount * helpers.childCounter) * helpers.amountCounter;\n      helpers.buyAmount = Math.ceil(helpers.needAmount / content.buyRound) * content.buyRound;\n      builder.params.methods.genResult($builderEl, builder);\n    },\n    genResult: function genResult($builderEl, builder) {\n      var helpers = builder.params.helpers;\n      var stage1 = $builderEl.find(\".stage1\");\n      var stage2 = $builderEl.find(\".stage2\");\n      var btnReset = $builderEl.find(\".btn-reset\");\n      stage1.addClass(\"hidden\");\n      stage2.removeClass(\"hidden\");\n      btnReset.removeClass(\"hidden\");\n      var renderEl = \"\\n      <div>\\n        <div class=\\\"food\\\">\\n          <label>Vypo\\u010Dten\\xE1 porce pro:</label>\\n          <div class=\\\"food-title\\\">\\n              \".concat(helpers.selectedFood.name, \"\\n          </div>\\n        </div>\\n        <div class=\\\"gendre\\\">\\n          <label>Standardn\\xED porce:</label>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n            <div>\\n            <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_520_2637)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M12.3496 9.28952L10.5636 11.0756C10.4991 11.14 10.4629 11.2275 10.4629 11.3186V12.7072L8.58 14.5901L9.86703 8.58402L9.19478 8.43999L7.99999 14.0157L6.80521 8.43999L6.13295 8.58402L7.41999 14.5901L5.5371 12.7072V11.3186C5.5371 11.2274 5.50089 11.14 5.43642 11.0756L3.65034 9.28952L3.16418 9.77568L4.8496 11.4611V12.8496C4.8496 12.9407 4.88582 13.0282 4.95029 13.0926L7.75693 15.8993C7.75818 15.9006 7.75959 15.9016 7.76087 15.9028C7.76634 15.9082 7.77202 15.9132 7.77787 15.9182C7.78034 15.9203 7.78274 15.9225 7.78527 15.9245C7.79202 15.9299 7.79906 15.935 7.80627 15.9399C7.80787 15.941 7.8094 15.9423 7.81102 15.9433C7.81899 15.9486 7.82724 15.9535 7.83574 15.9582C7.83618 15.9584 7.83668 15.9586 7.83712 15.9588C7.84884 15.9651 7.86087 15.9707 7.87315 15.9756C7.87624 15.9768 7.87943 15.9777 7.88252 15.9789C7.89165 15.9822 7.90081 15.9852 7.91015 15.9877C7.91459 15.9889 7.91899 15.99 7.92343 15.991C7.93199 15.9929 7.94062 15.9945 7.94931 15.9958C7.95352 15.9964 7.95768 15.9972 7.9619 15.9977C7.97418 15.999 7.98652 15.9999 7.99893 15.9999C7.99962 16 8.00031 16 8.00099 15.9999C8.0134 15.9999 8.02574 15.999 8.03802 15.9977C8.04224 15.9972 8.0464 15.9964 8.05062 15.9958C8.05931 15.9945 8.0679 15.9929 8.07649 15.991C8.08096 15.99 8.0854 15.9889 8.08984 15.9877C8.09909 15.9852 8.10821 15.9823 8.11728 15.979C8.12049 15.9778 8.12371 15.9768 8.1269 15.9756C8.13915 15.9707 8.15112 15.9652 8.16281 15.9589C8.16328 15.9586 8.16378 15.9585 8.16424 15.9582C8.17278 15.9536 8.18103 15.9486 8.18903 15.9433C8.19053 15.9423 8.19193 15.9412 8.19343 15.9402C8.20078 15.9352 8.20787 15.93 8.21475 15.9245C8.21721 15.9225 8.21962 15.9203 8.22209 15.9183C8.22796 15.9133 8.23365 15.9082 8.23915 15.9028C8.2404 15.9016 8.24181 15.9006 8.24306 15.8993L11.0497 13.0926C11.1141 13.0282 11.1504 12.9407 11.1504 12.8496V11.4611L12.8358 9.77568L12.3496 9.28952Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-white\\\" d=\\\"M12.7015 9.2065C12.6998 9.20597 12.6982 9.20544 12.6966 9.20491L12.6956 9.20459C12.6953 9.20447 12.6949 9.20434 12.6945 9.20422L9.90921 8.27578C10.0907 8.15343 10.259 8.01296 10.4104 7.85577C11.0521 7.21292 11.4055 6.35873 11.4055 5.45017V1.87808C11.4055 0.844388 10.5645 0.00341453 9.53083 0.00341453H6.98222L6.94644 0.00282077C6.31759 -0.00771054 5.72399 -0.0176168 5.14343 0.552637C4.78933 0.90667 4.59433 1.37739 4.59433 1.87808V5.4502C4.59433 6.35883 4.94771 7.21302 5.58943 7.85587C5.74087 8.01302 5.90909 8.15346 6.09062 8.27581L3.30526 9.20425C3.30489 9.20437 3.30454 9.2045 3.30417 9.20462L3.3032 9.20494C3.30157 9.20547 3.29995 9.206 3.29829 9.20653C1.63166 9.76219 0.511902 11.3159 0.511902 13.0726V15.6563C0.511902 15.8461 0.665809 16 0.855654 16H15.1441C15.334 16 15.4879 15.8461 15.4879 15.6563V13.0726C15.4879 11.3158 14.3681 9.76216 12.7015 9.2065ZM10.718 1.87808V3.06524H10.0406C8.70736 3.09143 7.48713 2.01121 7.34519 0.690919H9.53083C10.1854 0.690919 10.718 1.22345 10.718 1.87808ZM5.62734 1.04095C5.93175 0.741981 6.22234 0.691044 6.63553 0.687669V1.36777C6.63553 2.18602 6.05356 2.87084 5.28184 3.03018V1.87808C5.28184 1.56105 5.40531 1.26298 5.62734 1.04095ZM6.07787 7.37205C5.56453 6.8588 5.2818 6.17623 5.2818 5.4502V3.72762C6.15634 3.60078 6.87875 2.99796 7.17647 2.19096C7.30666 2.39237 7.459 2.58155 7.6326 2.75521C8.27579 3.3985 9.13092 3.75278 10.0406 3.75275H10.7179V5.4502C10.7179 6.17626 10.4352 6.8588 9.92186 7.37205C9.92024 7.37365 9.91868 7.3753 9.91708 7.37693C8.97061 8.41234 7.0291 8.41228 6.08265 7.37693C6.08109 7.3753 6.0795 7.37365 6.07787 7.37205ZM7.99988 8.84847C8.34679 8.84847 8.6872 8.7975 9.00926 8.7005L12.2489 9.78035V15.3125H3.75092V9.78038L6.99053 8.70053C7.3126 8.79753 7.65301 8.84847 7.99988 8.84847ZM1.19941 13.0726C1.19941 11.7777 1.93166 10.616 3.06342 10.0473V15.3125H1.19941V13.0726ZM14.8004 15.3125H12.9364V10.0473C14.0681 10.616 14.8004 11.7777 14.8004 13.0726V15.3125Z\\\" fill=\\\"#353535\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_520_2637\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n            </svg>\\n          </div>\\n             Mu\\u017E\\n            </div>\\n            <div>\\n              \").concat(helpers.selectedFood.man, \" g\\n            </div>\\n          </div>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n              <div>\\n              <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_520_2640)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M10.4312 14.3881H5.50178C4.93856 14.3881 4.40619 14.1112 4.07769 13.6473L3.48566 12.8113L4.04672 12.414L4.63875 13.2499C4.83859 13.5321 5.16122 13.7005 5.50181 13.7005H10.4312C10.8103 13.7005 11.1637 13.492 11.3537 13.1564L11.8207 12.3309L12.419 12.6695L11.952 13.4949C11.6403 14.0458 11.0576 14.3881 10.4312 14.3881Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-white\\\" d=\\\"M13.948 15.2686L13.5411 13.5576C13.4793 13.2975 13.3653 13.0588 13.211 12.8529V5.29534C13.211 2.37634 10.8747 0.00146875 8.00252 3.125e-05C8.0023 3.125e-05 8.00208 0 8.00187 0C8.00174 0 8.00162 3.125e-05 8.00149 3.125e-05C8.00099 3.125e-05 8.00046 0 7.99996 0C5.12655 0 2.78887 2.37547 2.78887 5.29534V12.8775C2.59733 13.1089 2.4593 13.3867 2.39346 13.6908L2.04918 15.2803C2.01077 15.4576 2.0539 15.64 2.16749 15.7808C2.27983 15.9201 2.44643 16 2.62462 16H13.3753C13.5558 16 13.7238 15.9184 13.8361 15.7762C13.9497 15.6324 13.9905 15.4474 13.948 15.2686ZM12.5235 5.29534V12.2864C12.4241 12.2384 12.3198 12.1989 12.2114 12.1689L10.5764 11.7172C10.2016 11.6137 9.89952 11.3287 9.76849 10.955L9.46974 10.1031C10.5993 9.51562 11.3801 8.27172 11.3801 6.83553V5.26066C11.38 5.16147 11.3355 5.06459 11.2604 4.99988L8.34558 2.49647V0.700844C10.679 0.881281 12.5235 2.87303 12.5235 5.29534ZM5.31368 6.83553V5.42647L8.0023 3.10791L10.6926 5.41856V6.83553C10.6926 8.45687 9.48615 9.77594 8.00318 9.77594C6.52018 9.77594 5.31368 8.45687 5.31368 6.83553ZM7.65812 0.700594V2.49691L4.74546 5.00869C4.67062 5.07341 4.62633 5.17006 4.62621 5.269V6.83553C4.62621 8.22116 5.35315 9.42762 6.41874 10.0385L6.11905 10.9687C5.99946 11.34 5.71021 11.6312 5.34524 11.7477L3.66162 12.2852C3.5983 12.3054 3.53655 12.329 3.4764 12.3556V5.29534C3.47637 2.87169 5.32287 0.879156 7.65812 0.700594ZM2.74565 15.3125L3.06537 13.8363C3.1124 13.6192 3.21677 13.4233 3.36162 13.2663C3.3754 13.254 3.38833 13.2407 3.39999 13.2263C3.53105 13.0967 3.69133 12.9974 3.87068 12.9401L5.5543 12.4026C6.13021 12.2188 6.58593 11.7615 6.77343 11.1795L7.05143 10.3165C7.35343 10.412 7.67277 10.4634 8.00318 10.4634C8.28799 10.4634 8.56462 10.4252 8.82902 10.3535L9.11974 11.1826C9.3253 11.7688 9.80143 12.2164 10.3934 12.3799L12.0283 12.8316C12.4465 12.9472 12.7699 13.2863 12.8723 13.7167L13.2518 15.3125H2.74565Z\\\" fill=\\\"#353535\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_520_2640\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n              </svg>\\n              </div>\\n\\n              \\u017Dena\\n            </div>\\n            <div>\\n             \").concat(helpers.selectedFood.woman, \" g\\n            </div>\\n          </div>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n            <div>\\n            <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n              <g clip-path=\\\"url(#clip0_520_2628)\\\">\\n              <path class=\\\"svg-white\\\" d=\\\"M11.187 10.9633C11.9698 10.261 12.4351 9.30747 12.5178 8.25003H13C13.8788 8.25003 14.5938 7.53506 14.5938 6.65628C14.5938 5.7775 13.8788 5.06253 13 5.06253C12.8102 5.06253 12.6563 5.21644 12.6563 5.40628C12.6563 5.59612 12.8102 5.75003 13 5.75003C13.4997 5.75003 13.9063 6.15656 13.9063 6.65628C13.9063 7.156 13.4997 7.56253 13 7.56253H12.5313V5.56253C12.5313 5.37269 12.3773 5.21878 12.1875 5.21878C11.9977 5.21878 11.8438 5.37269 11.8438 5.56253V7.90628C11.8438 9.91941 10.1913 11.4375 8 11.4375C5.80869 11.4375 4.15625 9.91941 4.15625 7.90628V5.56253C4.15625 5.37269 4.00235 5.21878 3.8125 5.21878C3.62266 5.21878 3.46875 5.37269 3.46875 5.56253V7.56253H3C2.50028 7.56253 2.09375 7.15597 2.09375 6.65628C2.09375 6.15659 2.50028 5.75003 3 5.75003C3.18984 5.75003 3.34375 5.59612 3.34375 5.40628C3.34375 5.21644 3.18984 5.06253 3 5.06253C2.12119 5.06253 1.40625 5.77747 1.40625 6.65628C1.40625 7.53509 2.12119 8.25003 3 8.25003H3.48213C3.56494 9.3075 4.03016 10.261 4.81303 10.9633C5.26735 11.3709 5.8095 11.6788 6.40591 11.8749V12.1069C5.61997 12.3153 4.89191 12.7146 4.2861 13.272C3.60997 13.894 3.11653 14.6848 2.85906 15.5592C2.82847 15.6631 2.84866 15.7754 2.91356 15.8622C2.97847 15.9489 3.08047 16 3.18884 16H12.8103C12.9187 16 13.0207 15.9489 13.0856 15.8621C13.1505 15.7754 13.1707 15.6631 13.1401 15.5591C12.8826 14.6848 12.3892 13.8939 11.7132 13.272C11.1074 12.7146 10.3793 12.3153 9.59341 12.1069V11.8751C10.1901 11.6791 10.7325 11.371 11.187 10.9633ZM12.3236 15.3125H3.67547C4.05497 14.4078 4.7391 13.6528 5.5871 13.1769C6.04247 14.0757 6.97719 14.6613 7.99966 14.6613C9.02213 14.6613 9.95682 14.0757 10.4122 13.1769C11.2601 13.6528 11.9442 14.4078 12.3236 15.3125ZM9.1806 12.7159C9.38794 12.7584 9.59066 12.8165 9.78735 12.8888C9.44382 13.5466 8.75372 13.9738 7.99963 13.9738C7.2455 13.9738 6.55541 13.5466 6.21188 12.8888C6.4086 12.8165 6.61132 12.7585 6.81866 12.7159C6.97857 12.6832 7.09335 12.5424 7.09335 12.3792V12.0469C7.38763 12.0986 7.69097 12.125 7.99997 12.125C8.30872 12.125 8.61178 12.0986 8.90585 12.047V12.3792C8.90591 12.5424 9.02069 12.6831 9.1806 12.7159Z\\\" fill=\\\"#353535\\\"/>\\n              <path class=\\\"svg-white\\\" d=\\\"M8.01985 9.96219C8.52604 9.96219 8.99773 9.68987 9.25085 9.2515C9.34579 9.08709 9.28945 8.87684 9.12504 8.78193C8.96064 8.68706 8.75042 8.74334 8.65548 8.90775C8.52479 9.13409 8.28126 9.27468 8.01989 9.27468C7.75851 9.27468 7.51498 9.13406 7.38429 8.90775C7.28935 8.74334 7.0791 8.68703 6.91473 8.78193C6.75032 8.87687 6.69398 9.08709 6.78892 9.2515C7.04195 9.68984 7.51367 9.96219 8.01985 9.96219Z\\\" fill=\\\"#353535\\\"/>\\n              <path class=\\\"svg-white\\\" d=\\\"M6.30963 8.25003C6.49948 8.25003 6.65338 8.09612 6.65338 7.90628V7.66362C6.65338 7.47377 6.49948 7.31987 6.30963 7.31987C6.11979 7.31987 5.96588 7.47377 5.96588 7.66362V7.90628C5.96588 8.09612 6.11979 8.25003 6.30963 8.25003Z\\\" fill=\\\"#353535\\\"/>\\n              <path class=\\\"svg-white\\\" d=\\\"M9.69043 8.25003C9.88027 8.25003 10.0342 8.09612 10.0342 7.90628V7.66362C10.0342 7.47377 9.88027 7.31987 9.69043 7.31987C9.50059 7.31987 9.34668 7.47377 9.34668 7.66362V7.90628C9.34668 8.09612 9.50059 8.25003 9.69043 8.25003Z\\\" fill=\\\"#353535\\\"/>\\n              <path class=\\\"svg-theme\\\" d=\\\"M13 5.75003H10.625C10.4992 5.75003 10.3835 5.68131 10.3232 5.57091L9.6875 4.4054L9.05178 5.57087C8.99157 5.68131 8.87582 5.75 8.75 5.75H3C2.81016 5.75 2.65625 5.59609 2.65625 5.40625V4.125C2.65625 1.85047 4.50672 -3.8147e-06 6.78125 -3.8147e-06H9.21875C11.4933 -3.8147e-06 13.3438 1.85047 13.3438 4.125V5.40628C13.3438 5.59612 13.1898 5.75003 13 5.75003ZM10.829 5.06253H12.6563V4.125C12.6563 2.22956 11.1142 0.687497 9.21875 0.687497H6.78125C4.88581 0.687497 3.34375 2.22956 3.34375 4.125V5.06253H8.54594L9.38572 3.52294C9.44594 3.4125 9.56169 3.34378 9.6875 3.34378C9.81332 3.34378 9.92904 3.4125 9.98928 3.5229L10.829 5.06253Z\\\" fill=\\\"#94BE33\\\"/>\\n              </g>\\n              <defs>\\n              <clipPath id=\\\"clip0_520_2628\\\">\\n              <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n              </clipPath>\\n              </defs>\\n            </svg>\\n\\n            </div>\\n              D\\xEDt\\u011B\\n            </div>\\n            <div>\\n            \").concat(helpers.selectedFood.child, \" g\\n            </div>\\n          </div>\\n        </div>\\n         <div class=\\\"portion\\\">\\n          <label>Po\\u010Det porc\\xED:</label>\\n          <div class=\\\"number-select-container\\\">\\n            <div class=\\\"desc\\\">\\n              <div>\\n              <svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n                <g clip-path=\\\"url(#clip0_521_2690)\\\">\\n                <path class=\\\"svg-theme\\\" d=\\\"M15.3584 6.50203L14.6718 6.46737C14.6736 6.431 14.6745 6.39446 14.6745 6.35875C14.6745 5.4794 14.1201 4.68537 13.2948 4.3829C13.1574 4.33253 13.0669 4.20065 13.0694 4.05431C13.0792 3.47834 12.8607 2.93728 12.4542 2.53075C11.8429 1.91946 10.9013 1.74493 10.1112 2.09643C9.96363 2.16206 9.79047 2.11618 9.69475 1.98621C9.29913 1.44912 8.66557 1.12843 7.99997 1.12843C7.33438 1.12843 6.70081 1.44909 6.30519 1.98621C6.2095 2.11615 6.03631 2.16206 5.88872 2.09643C5.0986 1.74496 4.157 1.91956 3.54575 2.53078C3.13922 2.93728 2.92075 3.47837 2.93053 4.05431C2.93303 4.20065 2.8426 4.33253 2.70513 4.3829C1.87988 4.68537 1.32541 5.47937 1.32541 6.35875C1.32541 6.38859 1.32606 6.41868 1.32731 6.44818L0.640439 6.47737C0.638783 6.43818 0.637939 6.39828 0.637939 6.35878C0.637939 5.272 1.27631 4.28346 2.24894 3.82884C2.29335 3.1544 2.57641 2.52796 3.05963 2.04468C3.46656 1.63775 3.98028 1.36996 4.54522 1.27025C5.0086 1.1884 5.47888 1.22375 5.91994 1.37168C6.44644 0.784652 7.20597 0.440933 7.99997 0.440933C8.79397 0.440933 9.5535 0.784652 10.08 1.37165C10.5211 1.22368 10.9914 1.1884 11.4548 1.27021C12.0197 1.3699 12.5334 1.63771 12.9403 2.04462C13.4236 2.5279 13.7066 3.15434 13.751 3.82878C14.7237 4.2834 15.362 5.27193 15.362 6.35872C15.362 6.40597 15.3608 6.45418 15.3584 6.50203Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-white\\\" d=\\\"M16 6.50087C16 6.31103 15.8461 6.15712 15.6562 6.15712H0.34375C0.153906 6.15712 0 6.31103 0 6.50087C0 9.4544 1.57063 12.1846 4.11241 13.6758V15.2153C4.11241 15.4052 4.26631 15.5591 4.45616 15.5591H11.5439C11.7337 15.5591 11.8876 15.4052 11.8876 15.2153V13.6758C14.4294 12.1846 16 9.4544 16 6.50087ZM15.3048 6.84462C15.2838 7.31046 15.22 7.76893 15.1169 8.21531H0.883125C0.779969 7.76893 0.71625 7.31046 0.69525 6.84462H15.3048ZM11.2001 14.8716H4.79991V13.8042H11.2001L11.2001 14.8716ZM11.4818 13.1167H4.51816C2.86997 12.1691 1.65928 10.6567 1.07631 8.90281H14.9237C14.3407 10.6567 13.1301 12.1691 11.4818 13.1167Z\\\" fill=\\\"#353535\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M5.61438 4.43377C5.52641 4.43377 5.43844 4.40021 5.37132 4.33309C5.23707 4.19884 5.23707 3.98118 5.37132 3.84696L5.72197 3.49634C5.85629 3.36212 6.07388 3.36209 6.20813 3.49634C6.34238 3.63059 6.34238 3.84821 6.20813 3.98246L5.85747 4.33309C5.79032 4.40021 5.70235 4.43377 5.61438 4.43377Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M9.27199 3.71968C9.22571 3.71968 9.17871 3.71027 9.13359 3.69043L8.67981 3.49056C8.50606 3.41402 8.42727 3.21115 8.50381 3.0374C8.58034 2.86365 8.78309 2.78484 8.95696 2.86137L9.41074 3.06124C9.58449 3.13777 9.66327 3.34065 9.58674 3.5144C9.53009 3.64306 9.40412 3.71968 9.27199 3.71968Z\\\" fill=\\\"#94BE33\\\"/>\\n                <path class=\\\"svg-theme\\\" d=\\\"M8.01452 5.02921H7.51868C7.32883 5.02921 7.17493 4.87531 7.17493 4.68546C7.17493 4.49562 7.32883 4.34171 7.51868 4.34171H8.01452C8.20436 4.34171 8.35827 4.49562 8.35827 4.68546C8.35827 4.87531 8.20436 5.02921 8.01452 5.02921Z\\\" fill=\\\"#94BE33\\\"/>\\n                </g>\\n                <defs>\\n                <clipPath id=\\\"clip0_521_2690\\\">\\n                <rect width=\\\"16\\\" height=\\\"16\\\" fill=\\\"white\\\"/>\\n                </clipPath>\\n                </defs>\\n              </svg>\\n\\n              </div>\\n              Po\\u010Det porc\\xED p\\u0159i n\\xE1kupu/va\\u0159en\\xED\\n            </div>\\n            <div>\\n            \").concat(helpers.amountCounter, \" x\\n            </div>\\n          </div>\\n        </div>\\n        <div class=\\\"final-amount\\\">\\n          <div class=\\\"title\\\">\\n          \").concat(helpers.needAmount, \" g\\n          </div>\\n          <div>\\n            (po\\u010D\\xEDtat tedy cca \").concat(helpers.buyAmount, \"g p\\u0159i n\\xE1kupu)\\n          </div>\\n        </div>\\n      </div>\\n      \");\n      $$(stage2).html(renderEl);\n    },\n    reset: function reset($el, builder) {\n      builder.params.helpers = {\n        manCounter: 0,\n        womanCounter: 0,\n        childCounter: 0,\n        needAmount: 0,\n        buyAmount: 0,\n        amountCounter: 0,\n        selectedFood: {}\n      };\n      builder.reRender();\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.less\nvar ideofon_01 = __webpack_require__(\"./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.js\n\n/* harmony default export */ var ideofon_ideofon_01 = ({\n  name: \"ideofon-01\",\n  title: \"Mongolian ideofon\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Title\",\n      type: \"textarea\"\n    },\n    pronunciation: {\n      name: \"Pronunciation\",\n      type: \"textarea\"\n    },\n    audio: {\n      name: \"Audio\",\n      type: \"audio\"\n    },\n    romanization: {\n      name: \"Romanization\",\n      type: \"textarea\"\n    },\n    phonetic: {\n      name: \"Phonetic transcription\",\n      type: \"textEditor\"\n    },\n    grammar: {\n      name: \"Grammar notes\",\n      type: \"textEditor\"\n    },\n    nativeText: {\n      name: \"Mongolian text\",\n      type: \"image\"\n    },\n    nativeRomanization: {\n      name: \"Mongolian text romanization\",\n      type: \"textarea\"\n    }\n  },\n  content: {\n    title: \"ЦУЛХГАНАХ\",\n    pronunciation: \"culhganah\",\n    audio: \"\",\n    romanization: \"culhganah\",\n    phonetic: \"ʦʰoɬχəqəχ\",\n    grammar: \"verb, root: culh-\",\n    nativeText: \"\",\n    nativeRomanization: \"čulquγanaqu\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n\\n            <div>\\n            <div class=\\\"title-container\\\">\\n                <div>\".concat(content.title, \"</div> - <div>\").concat(content.pronunciation, \"</div> <i id=\\\"start-player\\\" class=\\\"icon material-icons\\\" contenteditable=\\\"false\\\" data-icon=\\\"volume_up\\\"></i>\\n                <audio id=\\\"mp3\\\" preload=\\\"auto\\\" controls style=\\\"display:none;\\\">\\n                    <source src=\\\"\").concat(content.audio, \"\\\" type=\\\"audio/mpeg\\\">\\n                    Your browser does not support the audio element.\\n                </audio>\\n            </div>\\n            <h1>\").concat(content.title, \"</h1>\\n            <div class=\\\"content-container\\\">\\n                <div>\\n                    <div class=\\\"item\\\">\\n                        <div>\").concat(content.romanization, \"</div>\\n                        <div class=\\\"lable\\\">Romanization</div>\\n                    </div>\\n                    <div class=\\\"item\\\">\\n                        <div>[\").concat(content.phonetic, \"]</div>\\n                        <div class=\\\"lable\\\">IPA phonetic transcription</div>\\n                    </div>\\n                    <div class=\\\"item\\\">\\n                        <div>\").concat(content.grammar, \"</div>\\n                        <div class=\\\"lable\\\">Grammar notes</div>\\n                    </div>\\n                </div>\\n                  <div>\\n                    <div class=\\\"item right\\\">\\n                        <div class=\\\"img-cont\\\">\\n                            <img src=\\\"\").concat(content.nativeText, \"\\\" />\\n                        </div>\\n                        <div class=\\\"lable\\\">Mongolian script</div>\\n                    </div>\\n                    <div class=\\\"item right\\\">\\n                        <div>\").concat(content.nativeRomanization, \"</div>\\n                        <div class=\\\"lable\\\">Mongolian script Romanization</div>\\n                    </div>\\n                </div>\\n            </div>\\n            </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $player = $builderEl.find(\"#mp3\");\n      var player = $player[0];\n      player.muted = false;\n      player.pause();\n      player.currentTime = 0;\n      $builderEl.find(\"#start-player\").off(\"click\");\n      $builderEl.find(\"#start-player\").on(\"click\", function () {\n        player.currentTime = 0;\n        player.play();\n      });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/components/category-en.js\n\n\n// import \"./_en/builder-page.less\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//TODO dodělat více správných odpověddí\n\n\n\n//sentences\n\n\n\n\n\n\n\n\n\n// import ac01 from './accordion/ac-01';\n\n\n\n\n //removed\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//modal popups\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//Charts\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//tiles\n\n\n\n\n//magnify\n\n\n\n//geogebra\n\n\n//Food calculator\n\n\n\n//LOAD JS\n// https://github.com/muicss/loadjs\n\n//Webpack externals\n// https://www.npmjs.com/package/webpack-require-http\n\n//https://webpack.js.org/guides/lazy-loading/\nfunction getComponent() {\n  return _getComponent.apply(this, arguments);\n}\nfunction _getComponent() {\n  _getComponent = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n    return regenerator_default.a.wrap(function _callee$(_context) {\n      while (1) switch (_context.prev = _context.next) {\n        case 0:\n          return _context.abrupt(\"return\", Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! ./_en/cards/c-01 */ \"./src/core/custom_plugins/builder/components/_en/cards/c-01.js\")).then(function (_ref) {\n            var c01 = _ref.default;\n            // const element = document.createElement('div');\n\n            return c01;\n          }).catch(function (error) {\n            return \"An error occurred while loading the component\";\n          }));\n        case 1:\n        case \"end\":\n          return _context.stop();\n      }\n    }, _callee);\n  }));\n  return _getComponent.apply(this, arguments);\n}\nfunction getAccordion() {\n  return _getAccordion.apply(this, arguments);\n}\nfunction _getAccordion() {\n  _getAccordion = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n    return regenerator_default.a.wrap(function _callee2$(_context2) {\n      while (1) switch (_context2.prev = _context2.next) {\n        case 0:\n          return _context2.abrupt(\"return\", __webpack_require__.e(/*! import() | ac01 */ \"ac01\").then(__webpack_require__.bind(null, /*! ./_en/accordion/ac-01 */ \"./src/core/custom_plugins/builder/components/_en/accordion/ac-01.js\")).then(function (_ref2) {\n            var accordion = _ref2.default;\n            // const element = document.createElement('div');\n\n            return accordion;\n          }).catch(function (error) {\n            return \"An error occurred while loading the component\";\n          }));\n        case 1:\n        case \"end\":\n          return _context2.stop();\n      }\n    }, _callee2);\n  }));\n  return _getAccordion.apply(this, arguments);\n}\nfunction getAccordion2() {\n  return _getAccordion2.apply(this, arguments);\n} // let cxx = await getComponent();\nfunction _getAccordion2() {\n  _getAccordion2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n    return regenerator_default.a.wrap(function _callee3$(_context3) {\n      while (1) switch (_context3.prev = _context3.next) {\n        case 0:\n          return _context3.abrupt(\"return\", __webpack_require__.e(/*! import() | ac02 */ \"ac02\").then(__webpack_require__.bind(null, /*! ./_en/accordion/ac-02 */ \"./src/core/custom_plugins/builder/components/_en/accordion/ac-02.js\")).then(function (_ref3) {\n            var accordion = _ref3.default;\n            // const element = document.createElement('div');\n\n            return accordion;\n          }).catch(function (error) {\n            return \"An error occurred while loading the component\";\n          }));\n        case 1:\n        case \"end\":\n          return _context3.stop();\n      }\n    }, _callee3);\n  }));\n  return _getAccordion2.apply(this, arguments);\n}\nvar formElGroup = [{\n  name: \"Text inputs\",\n  id: \"inp\",\n  components: [input_inp_01, input_tarea_01]\n}, {\n  name: \"Layout Cards\",\n  id: \"cards\",\n  components: [cards_form_c_01]\n}, {\n  name: \"Select answers\",\n  id: \"sel\",\n  cast: \"all\",\n  components: [rad_01[\"default\"], radiolist_rad_img_01, selectbox_sel_01, sel_03[\"default\"], checkbox_multiple_chm_01, chm_img_01[\"default\"]]\n}, {\n  name: \"Sentences\",\n  id: \"inp\",\n  cast: \"all\",\n  components: [sentences_inp_02, sentences_inp_select_01, inp_drag_01[\"default\"], sentences_sent_inp_math_range]\n},\n// {\n//   name: \"Checkboxes (Multiple correct answers)\",\n//   id: \"chm\",\n//   components: [chm01, chmimg01],\n// },\n// {\n//   name: \"Selectboxes\",\n//   id: \"sel\",\n//   components: [sel01],\n// },\n// {\n//   name: \"Radiobuttons (One correct answers)\",\n//   id: \"rad\",\n//   components: [rad01, radimg01],\n// },\n{\n  name: \"Chips\",\n  id: \"chip\",\n  cast: \"all\",\n  components: [chip_01[\"default\"], chip_img_01, chip_sorted_01, chip_img_sorted_01]\n}, {\n  name: \"Drag & Drop exercises\",\n  id: \"dd\",\n  components: [dd_01[\"default\"], dd_02[\"default\"], dd_groups_01[\"default\"], dd_pairs_01[\"default\"], dd_03[\"default\"], drag_drop_dd_04]\n}, {\n  name: \"Tables\",\n  id: \"tamInp\",\n  components: [table_input_table_input_01, table_radio_01[\"default\"]]\n}, {\n  name: \"Crosswords\",\n  id: \"cross-words\",\n  components: [crossword_cross_01, crossword_cross_02, fw_01[\"default\"]]\n}, {\n  name: \"Memory cards\",\n  components: [puzzle_puzzle_01]\n}, {\n  name: \"Match cards\",\n  cast: \"all\",\n  components: [match_cards_01, match_cards_02, match_cards_03]\n}, {\n  name: \"Pexeso\",\n  components: [pexeso_pexeso_01]\n}, {\n  name: \"Interactive images\",\n  id: \"intImg\",\n  components: [interactive_img_01[\"default\"], interactive_img_02[\"default\"], interactive_img_03[\"default\"], interactive_img_04[\"default\"]]\n}, {\n  name: \"Columns\",\n  id: \"forms-grid\",\n  components: [grid_grid_01, grid_grid_02]\n}, {\n  name: \"Tables\",\n  id: \"forms-tables\",\n  components: [tables_table_01]\n}];\nvar formElGroup2 = [{\n  name: \"Text inputs\",\n  id: \"inp\",\n  components: [input_inp_01]\n}, {\n  name: \"Select answers\",\n  id: \"sel\",\n  cast: \"all\",\n  components: [rad_01[\"default\"], radiolist_rad_img_01, selectbox_sel_01, sel_03[\"default\"], checkbox_multiple_chm_01, chm_img_01[\"default\"]]\n}, {\n  name: \"Chips\",\n  id: \"chip\",\n  cast: \"all\",\n  components: [chip_01[\"default\"], chip_img_01, chip_sorted_01, chip_img_sorted_01]\n}, {\n  name: \"Drag & Drop exercises\",\n  id: \"dd\",\n  components: [dd_01[\"default\"], dd_02[\"default\"], dd_groups_01[\"default\"], dd_pairs_01[\"default\"], dd_03[\"default\"], drag_drop_dd_04]\n}, {\n  name: \"Sentences\",\n  id: \"inp\",\n  cast: \"all\",\n  components: [sentences_inp_02, sentences_inp_select_01, inp_drag_01[\"default\"]]\n}, {\n  name: \"Tables\",\n  id: \"tamInp\",\n  components: [table_input_table_input_01, table_radio_01[\"default\"]]\n}, {\n  name: \"Match cards\",\n  cast: \"all\",\n  components: [match_cards_01, match_cards_02]\n}, {\n  name: \"Pexeso\",\n  components: [pexeso_pexeso_01]\n}, {\n  name: \"Memory cards\",\n  components: [puzzle_puzzle_01]\n}];\nvar basicGroup = [{\n  name: \"Titles\",\n  id: \"titles\",\n  components: [title_tl_01, title_tl_02, geogebra_ggb_01]\n}, {\n  name: \"Text blocks\",\n  //todo\n  id: \"texts\",\n  cast: \"all\",\n  components: [text_tx_01, text_tx_02, text_tx_03, text_tx_04, text_tx_05, text_tx_06, text_tx_07, text_tx_08, text_tx_09, text_tx_10, text_todo_01] // todo tx3 do layoutu?\n}, {\n  name: \"Headers\",\n  //todo\n  id: \"headers\",\n  cast: \"all\",\n  components: [header_hdr_01, header_hdr_02, header_hdr_03, header_hdr_04, header_hdr_05, header_hdr_06, header_hdr_07, header_hdr_08, header_hdr_09, header_hdr_10]\n}, {\n  name: \"Covers\",\n  //todo\n  id: \"covers\",\n  components: [cover_cover_01]\n}, {\n  name: \"Backgrounds\",\n  id: \"backgrounds\",\n  components: [backgrounds_bg_01]\n}, {\n  name: \"Charts\",\n  id: \"charts\",\n  cast: \"all\",\n  components: [chart_01[\"default\"], chart_02, chart_03, chart_04, chart_05, new_chart_01, new_chart_02, new_chart_03, new_chart_04, new_chart_05, new_chart_06]\n}, {\n  name: \"Equations\",\n  id: \"equations\",\n  components: [equation_eq_01]\n}, {\n  name: \"Buttons\",\n  id: \"btns\",\n  cast: \"all\",\n  components: [buttons_btn_01, buttons_btn_02, buttons_btn_03, buttons_btn_04]\n}, {\n  name: \"Impressum\",\n  //todo\n  id: \"impressum\",\n  components: [impressum_imp_01]\n}, {\n  name: \"Contents\",\n  //todo\n  id: \"contents\",\n  cast: \"all\",\n  components: [contents_contents_01, contents_contents_02, contents_contents_03]\n}, {\n  name: \"Layouts\",\n  id: \"layout\",\n  components: [side_menu_01[\"default\"], side_menu_02[\"default\"], side_menu_03[\"default\"], layout_swiper_menu_01, layout_recipe_layout_01]\n}, {\n  name: \"Accordions\",\n  id: \"accordions\",\n  components: [accordions_accordion_menu_01, accordions_accordion_menu_02, accordions_accordion_menu_03]\n}, {\n  name: \"Tabs\",\n  id: \"tabs\",\n  cast: \"all\",\n  components: [tabs_tab_menu_01, tabs_tab_menu_02\n  //tabLayout03,\n  ]\n}, {\n  name: \"Contract\",\n  id: \"contract\",\n  components: [contract_con_01]\n}, {\n  name: \"Dividers\",\n  //todo\n  id: \"dividers\",\n  cast: \"all\",\n  components: [divider_divider_01, divider_divider_02]\n}, {\n  name: \"Modal popups\",\n  id: \"modal-popups\",\n  components: [popups_pop_01]\n}, {\n  name: \"Hidden texts\",\n  //todo - hidtext01, hidtext02\n  id: \"hidden-texts\",\n  components: [hid_txt_01[\"default\"], hidden_text_hid_txt_02, hidden_text_hid_txt_03, hidden_text_hid_txt_timeline_01]\n}, {\n  name: \"Lists\",\n  //todo\n  id: \"lists\",\n  cast: \"all\",\n  components: [list_li_01, list_li_02]\n}, {\n  name: \"Icon List\",\n  id: \"iconList\",\n  cast: \"all\",\n  components: [icon_list_icon_list_01, icon_list_icon_list_02, icon_list_icon_list_03]\n}, {\n  name: \"Remember cards\",\n  //todo\n  id: \"cm\",\n  components: [sc_01[\"default\"], sc_02[\"default\"], sc_03[\"default\"]]\n}, {\n  name: \"Clickable images\",\n  id: \"intImg\",\n  components: [clickable_image_clickable_img_01, clickable_image_clickable_img_02, random_words_random_words_01]\n}, {\n  name: \"Video\",\n  id: \"vids\",\n  components: [video_player_vp_01]\n}, {\n  name: \"Gallery\",\n  //todo\n  id: \"galeries\",\n  cast: \"all\",\n  components: [gallery_gl_01, gallery_gl_02, gallery_gl_03, gallery_gl_04, gallery_gl_05]\n}, {\n  name: \"Image with layers\",\n  //todo\n  id: \"Imagelayers\",\n  cast: \"all\",\n  components: [layers01[\"default\"], image_layers_layers02]\n}, {\n  name: \"Forms\",\n  //todo!!!!\n  id: \"forms\",\n  components: [forms_frm_01, forms_frm_02]\n}, {\n  name: \"Columns (layout)\",\n  //todo rozložení? tx03?\n  id: \"grid\",\n  cast: \"all\",\n  components: [components_en_grid_grid_01, components_en_grid_grid_02, grid_grid_03, grid_grid_04]\n}, {\n  name: \"Cards\",\n  //todo!\n  id: \"cards\",\n  cast: \"all\",\n  components: [c_01[\"default\"], deleted_c_02, cards_c_03, deleted_c_04, cards_c_05, cards_c_06, cards_c_07, deleted_c_08, cards_c_09, cards_c_10, cards_c_11, cards_c_12, cards_c_13, cards_c_14, cards_c_15, cards_c_paper_01, cards_c_paper_02, cards_c_paper_03, cards_c_sf_01, cards_c_sf_02, cards_c_sf_03, cards_c_sf_04, cards_c_sf_05, cards_c_sf_06, cards_c_sf_07]\n}, {\n  name: \"Tiles\",\n  //todo!\n  id: \"tiles\",\n  cast: \"all\",\n  components: [tiles_tile_01, tiles_tile_02, tiles_tile_03]\n}, {\n  name: \"Music abc notation sheet\",\n  id: \"abc\",\n  cast: \"all\",\n  components: [nr_01[\"default\"], nr_02[\"default\"], nr_03[\"default\"]]\n}, {\n  name: \"Music notes\",\n  id: \"notes\",\n  components: [musicnotation_mnote_01]\n}, {\n  name: \"Music piano\",\n  id: \"piano\",\n  components: [piano_pn_01]\n}, {\n  name: \"References\",\n  //todo\n  id: \"refs\",\n  components: [citations_cit_01, ref_img_01, ref_vid_01, ref_eq_01, ref_popover_01[\"default\"], ref_table_01]\n}, {\n  name: \"Tables\",\n  id: \"table\",\n  components: [components_en_tables_table_01, tables_table_02, _new_tables_table_01[\"default\"]]\n}, {\n  name: \"Others\",\n  id: \"codes\",\n  components: [code_code_01, iframe_if_01, link_link_block_01, ideofon_ideofon_01]\n}, {\n  name: \"Games\",\n  id: \"ge\",\n  components: [ge_01[\"default\"], interactive_math[\"default\"], hangman_hangman, hangman_hangman_02, wheel_of_fortune_wheel_01, coloring_book_coloring_01, coloring_book_coloring_02, games_magnify_01, chbot_01[\"default\"], _development_recipe_01, _development_recipe_02, _development_resizable_grid_01, _development_mm_01, rating_01[\"default\"], showcase_showcase_01, food_calculator_food_calc_01]\n}, {\n  name: \"LF1\",\n  id: \"lf\",\n  components: [pbdviewer_pbd_01, bodylight_gif_01, _lf1_devel_bodylight_range_01, _lf1_devel_bodylight_button_01, _lf1_devel_bodylight_checkbox_01, bodylignt_fmi_01[\"default\"], bodylight_adobe_anim_01[\"default\"]]\n}];\nvar tableGroup = [{\n  name: \"Cell\",\n  id: \"cells\",\n  components: [cells_cell_01, cells_cell_02, cells_cell_03]\n}, {\n  name: \"Nested table\",\n  id: \"tb\",\n  components: [components_en_tables_table_01]\n}];\nvar formTableGroup = tableGroup.concat(formElGroup);\nvar category = {\n  basicGroup: {\n    name: \"Basic component sets\",\n    components: basicGroup\n  },\n  formElGroup: {\n    name: \"Components for form\",\n    components: formElGroup\n  },\n  formElGroup2: {\n    name: \"Components for step form\",\n    components: formElGroup2\n  },\n  tableGroup: {\n    name: \"Components for table\",\n    components: tableGroup\n  },\n  formTableGroup: {\n    name: \"Components for table inside form\",\n    components: formTableGroup\n  }\n};\n/* harmony default export */ var category_en = (category);\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder/builder.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import \"./css/builder-page/builder-page_new.less\";\n\n\n\n\n\n//cesta nadefinovaná v webpack.config.app.js\n\n/* harmony default export */ var builder_builder = ({\n  name: \"builder\",\n  static: {\n    Builder: builderClass\n  },\n  params: {\n    builder: {\n      enable: false,\n      dataChapters: [],\n      //je napleněno voláním /get-version, nebo přímo v šabloně pro čtení\n      dataComponents: [],\n      //je napleněno voláním /get-version, nebo přímo v šabloně pro čtení\n      chapterNumbers: [],\n      development: {\n        enable: true,\n        syncServer: true,\n        mediaServerPath: null,\n        controls: {\n          editChapters: true,\n          enable: true,\n          saveButton: {\n            enable: false,\n            onSaveCallback: function onSaveCallback(data) {}\n          }\n        }\n      },\n      categories: category_en,\n      lang: {\n        cs: {\n          menu: {\n            navigation: \"Navigace\",\n            development: \"Vývoj\",\n            chapters: \"Správa kapitol\",\n            variables: \"Nastavení proměnných\",\n            citations: \"Správa citací\",\n            audio: \"Správa audio stop\",\n            translate: \"Správa překladu\",\n            media: \"Spravovat přílohy\",\n            history: \"Historie\"\n          },\n          chapters: {\n            add: \"Přidat kapitolu\",\n            creation: \"Tvorba kapitol\",\n            typeNewChapterName: \"Zadejte nový název kapitoly\",\n            typeChapterName: \"Zadejte název kapitoly\",\n            chapterOptions: \"Možnosti kapitoly\",\n            addChapterAfter: \"Přidat za tuto kapitolu další\",\n            addSubchapter: \"Přidat podkapitolu\",\n            addAnchor: \"Přidat kotvu\",\n            renameChapter: \"Přejmenovat kapitolu\",\n            deleteChapter: \"Odstranit kapitolu\",\n            anchorOptions: \"Možnosti kotvy\",\n            renameAnchor: \"Přejmenovat kotvy\",\n            changeAnchorElement: \"Změnit element kotvy\",\n            deleteAnchor: \"Smazat kotvu\",\n            typeAnchorId: \"Zadejte nové ID elementu pro tuto kotvu:\",\n            typeNewAnchorName: \"Zadejte nové jméno kotvy\",\n            anchorName: \"Název kotvy\",\n            anchorId: \"ID kotvy\"\n          },\n          bottomMenu: {\n            selectAll: \"Vybrat vše\",\n            cancelSelection: \"Zrušit výběr\",\n            copyToGlobalClip: \"Kopírovat do globální schránky\",\n            chapterCreation: \"Správa kapitol\",\n            versionText: \"Verze\",\n            active: \"Aktivní\",\n            inactive: \"Neaktivní\"\n          },\n          versionSelect: {\n            createNewVersion: \"Vytvořit novou verzi\",\n            versionSelect: \"Správa verzí\",\n            selectOptions: \"Možnosti verze\",\n            publish: \"Publikovat tuto verzi\",\n            edit: \"Editovat tuto verzi\",\n            publication: \"Publikování verze\",\n            publicationConfirm: \"Opravdu chcete publikovat tuto verzi?\",\n            loadVersion: \"Načtení verze\",\n            loadVersionConfirm: \"Opravdu chcete načíst tuto verzi k editaci?\",\n            typeVersionName: \"Zadejte jméno verze\",\n            actual: \"Aktualní\"\n          },\n          version: {\n            wasLoaded: \"Byla načtena verze\",\n            loading: \"Načítání verze knihy\",\n            published: \"Verze byla úspěšně publikována\",\n            error: \"(Verze) Došlo k chybě.\"\n          },\n          variables: {\n            variables: \"Proměnné\",\n            variablesSettings: \"Nastavení proměnných\"\n          },\n          emptyPage: {\n            chapterMenu: \"Kapitolu vytvo\\u0159\\xEDte kliknut\\xEDm na <i class=\\\"material-icons\\\">book</i> v lev\\xE9m doln\\xEDm rohu.\",\n            makeChapter: \"Pro začátek je potřeba vytvořit úvodní kapitolu.\",\n            starting: \"Začínáme s editací\"\n          },\n          componentsMenu: {\n            components: \"Komponenty\",\n            paste: \"Vložit ze schránky\",\n            componentSelect: \"Výběr komponent\",\n            pasteAndPersist: \"Vložit a ponechat ve schránce\",\n            globalPaste: \"Vložit z globální schránky\"\n          },\n          content: {\n            switchComponent: \"Přepnutí na jiný typ komponenty\",\n            tooltipHistory: \"Zobrazit historii úprav\",\n            openInNextWindow: \"Otevřít v novém okně\",\n            eqTitle: \"Editor vzorce\",\n            eqText: \"K vytvo\\u0159en\\xED rovnice pou\\u017Eijte z\\xE1pis KaTeX.\\n            <a class=\\\"link external\\\" target=\\\"_blank\\\" href=\\\"https://katex.org/docs/supported.html\\\"> Manu\\xE1l je dostupn\\xFD zde</a>. <a class=\\\"link external\\\" target=\\\"_blank\\\" href=\\\"https://www.wordtolatex.com/blog/how-to-convert-mathtype-equations-and-microsoft-word-equations-to-latex/\\\">Jak p\\u0159ev\\xE9st Microsoft Word vzorce na LaTeX</a>.\\n            <br/>\\n            Pro editaci rovnice, ozna\\u010Dte v textu v lev\\xE9m sloupci celou rovnici my\\u0161\\xED a to v\\u010Detn\\u011B obalovac\\xEDch hranat\\xFDch z\\xE1vorek.\\n            Ozna\\u010D\\xEDte tedy nap\\u0159. <span style=\\\"letter-spacing: 3px; padding-left: 3px; padding-right: 3px;\\\" class=\\\"bg-color-theme text-color-white\\\">[[[x]]]</span>\",\n            eqTex: \"Zadejte TeX funkci\",\n            eqAdd: \"Přidat rovnici\",\n            eqErr: \"Vzorec se nepodařilo vykreslit!\",\n            eqInfo: \"Informace\",\n            tooltipText: \"Text tooltipu\",\n            tooltipAdd: \"Přidat tooltip\",\n            tooltipEdit: \"Upravit tooltip\",\n            tooltipDelete: \"Smazat tooltip\",\n            imgTitle: \"Obrázek\",\n            imgUrl: \"URL obázku\",\n            imgMedia: \"Načíst z media serveru\",\n            imgSize: \"Zadejte hodnotu velikosti i s jednotkou\",\n            imgWidth: \"Šířka\",\n            imgHeight: \"Výška\",\n            imgWrongSize: \"Nesprávně zadané rozměry!\",\n            imgUse: \"Použít\",\n            imgDel: \"Smazat obrázek\",\n            audioTitle: \"Audio\",\n            audioAdd: \"Přidat novou audiostopu\",\n            audioDelete: \"Odstranit odkaz na audiostopu.\",\n            audioNew: \"Nová audio stopa\",\n            audioName: \"Název\",\n            audioEdit: \"Přejmenovat audio stopu\",\n            audioPath: \"Cesta k souboru\",\n            audioLength: \"Délka\",\n            audioCreate: \"Vytvořit\",\n            linkTitle: \"Tvorba odkazu\",\n            linkContent: \"Text k zobrazení\",\n            linkClass: \"Třída popupu\",\n            linkAdd: \"Přidat odkaz\",\n            linkDelete: \"Odebrat odkaz\",\n            linkUpdate: \"Upravit odkaz\",\n            linkIn: \"V rámci knihy\",\n            linkExternal: \"Externí\",\n            linkTarget: \"Cíl odkazu\",\n            linkLinkText: \"Text odkazu\",\n            linkUseAnchor: \"Použít kotvu?\",\n            anchorTutorial: \"ID kotvy lze z\\xEDskat kliknut\\xEDm na ikonu <i class=\\\"material-icons\\\">more_vert</i>, kter\\xE1 se nach\\xE1z\\xED v prav\\xE9m rohu dan\\xE9 komponenty (p\\u0159i najet\\xED my\\u0161\\xED na danou komponentu). Pot\\xE9 v kontextov\\xE9 nab\\xEDdce vyberte mo\\u017Enost \\\"Zkop\\xEDrovat ID kotvy\\\" ozna\\u010Denou ikonou <i class=\\\"f7-icons\\\">link</i>.\",\n            linkAnchorId: \"ID kotvy\",\n            linkClassUrl: \"Třída odkazu\",\n            linkChapter: \"Kapitola\",\n            linkUrl: \"Url odkazu\",\n            linkUse: \"Použít\",\n            linkErrorEmpty: \"Text odkazu nesmí být prázdný.\",\n            linkNextPage: \"NÁSLEDUJÍCÍ STRANA\",\n            linkCurrPage: \"SOUČASNÁ STRANA\",\n            linkPrevPage: \"PŘEDCHOZÍ STRANA\",\n            linkNoValidUrl: \"Zadaná URL adresa není validní. Zadejte prosím valdiní URL.\",\n            imgChange: \"Kliknutím změníte obrázek.\",\n            audioChange: \"Kliknutím zvolte zvuk.\",\n            videoChange: \"Kliknutím změníte stream.\",\n            citation: \"Citace\",\n            addNext: \"Přidat další\",\n            editEquation: \"Upravit rovnici\",\n            iconChange: \"Kliknutím změníte ikonu.\",\n            iconTitle: \"Výběr ikony\",\n            linkAction: \"Akce\",\n            actionType: \"Typ akce\",\n            customClass: \"Vlastní třída komponenty\",\n            animation: \"Animace\",\n            animationSelect: \"Výběr animace\",\n            animationName: \"Jméno animace\",\n            animationDelay: \"Zpoždění animace\",\n            animationRepeat: \"Opakující se animace?\",\n            animationDuration: \"Délka animace [ms] (0 = výchozí délka)\",\n            animationEnable: \"Povolit animaci\",\n            controlYes: \"ANO\",\n            controlNo: \"NE\",\n            deletePopup: \"Smazat popup\",\n            popupTitle: \"Tvorba popupu\",\n            requestAnswerTitle: \"Vyhodnocení pouze s vyplněnou odpovědí.\",\n            requestAnswerText: \"Pro vyhodnocení prosím vyplňte všechna pole.\",\n            clearTitle: \"Vymazat obsah?\",\n            clearText: \"Opravdu chcete smazat celý obsah tohoto textového editoru?\"\n          },\n          controls: {\n            copy: \"Kopírovat do schránky\",\n            console: \"Vypsat komponentu do konzole\",\n            anchor: \"Vytvřit kotvu\",\n            copyAnchor: \"Zkopírovat ID kotvy\"\n          },\n          history: {\n            undo: \"Zpět\",\n            redo: \"Vpřed\"\n          }\n        },\n        en: {\n          menu: {\n            navigation: \"Navigation\",\n            development: \"Development\",\n            chapters: \"Chapters management\",\n            variables: \"Variables settings\",\n            citations: \"Citations management\",\n            audio: \"Audio track management\",\n            translate: \"Translation management\",\n            media: \"Media management\",\n            history: \"History\"\n          },\n          chapters: {\n            add: \"Add chapter\",\n            typeNewChapterName: \"Enter new chapter name\",\n            typeChapterName: \"Enter chapter name\",\n            chapterOptions: \"Chapter options\",\n            addChapterAfter: \"Add chapter after this one\",\n            addSubchapter: \"Add subchapter\",\n            addAnchor: \"Add anchor\",\n            renameChapter: \"Rename chapter\",\n            deleteChapter: \"Delete chapter\",\n            anchorOptions: \"Anchor options\",\n            renameAnchor: \"Rename anchor\",\n            changeAnchorElement: \"Change element ID of anchor\",\n            deleteAnchor: \"Delete anchor\",\n            typeAnchorId: \"Enter new element ID of anchor\",\n            typeNewAnchorName: \"Enter new anchor name\",\n            anchorName: \"Anchor name\",\n            anchorId: \"Anchor ID\"\n          },\n          bottomMenu: {\n            selectAll: \"Select all\",\n            cancelSelection: \"Cancel selection\",\n            copyToGlobalClip: \"Copy to global clipboard\",\n            chapterCreation: \"Chapters management\",\n            versionText: \"Version\",\n            active: \"Active\",\n            inactive: \"Inactive\"\n          },\n          versionSelect: {\n            createNewVersion: \"Create new version\",\n            versionSelect: \"Version management\",\n            selectOptions: \"Version options\",\n            publish: \"Publish this version\",\n            edit: \"Edit this version\",\n            publication: \"Version publication\",\n            publicationConfirm: \"Are you sure you want to publish this version?\",\n            loadVersion: \"Load version\",\n            loadVersionConfirm: \"Are you sure you want to load this version?\",\n            typeVersionName: \"Enter the version name\",\n            actual: \"Current\"\n          },\n          version: {\n            wasLoaded: \"Book version was loaded\",\n            loading: \"Book version is loading\",\n            published: \"Version was successfully published\",\n            error: \"(Version) Error occured.\"\n          },\n          variables: {\n            variables: \"Variables\",\n            variablesSettings: \"Variables setting\"\n          },\n          emptyPage: {\n            chapterMenu: \"Create new chapter by clicking on <i class=\\\"material-icons\\\">book</i> in bottom left corner.\",\n            makeChapter: \"In the begining, you need to create first chapter.\",\n            starting: \"Start with editing\"\n          },\n          componentsMenu: {\n            components: \"Components\",\n            paste: \"Paste from clipboard\",\n            componentSelect: \"Component selection\",\n            pasteAndPersist: \"Paste and keep in clipboard\",\n            globalPaste: \"Paste from global clipboard\"\n          },\n          content: {\n            settings: \"Settings\",\n            switchComponent: \"Swap component type\",\n            tooltipHistory: \"Show edit history\",\n            openInNextWindow: \"Open in new window\",\n            eqTitle: \"Equation editor\",\n            eqText: \"To create equation use KatEX\\n            <a class=\\\"link external\\\" target=\\\"_blank\\\" href=\\\"https://katex.org/docs/supported.html\\\">Manual is available here</a>. <a class=\\\"link external\\\" target=\\\"_blank\\\" href=\\\"https://www.wordtolatex.com/blog/how-to-convert-mathtype-equations-and-microsoft-word-equations-to-latex/\\\">How to convert Microsoft Word equation into LaTeX</a>.\\n            <br/>\\n            To edit the equation, select the entire equation in the text in the left column with the mouse, including the enclosing square brackets.\\n            For example select <span style=\\\"letter-spacing: 3px; padding-left: 3px; padding-right: 3px;\\\" class=\\\"bg-color-theme text-color-white\\\">[[[x]]]</span>\",\n            eqTex: \"Enter TeX function\",\n            eqAdd: \"Add equation\",\n            eqErr: \"Error in equation render!\",\n            eqInfo: \"Information\",\n            tooltipText: \"Tooltip text\",\n            tooltipAdd: \"Add tooltip\",\n            tooltipEdit: \"Edit tooltip\",\n            tooltipDelete: \"Delete tooltip\",\n            imgTitle: \"Image\",\n            imgUrl: \"URL of image\",\n            imgMedia: \"Load from Media server\",\n            imgSize: \"Enter the size value with the unit\",\n            imgWidth: \"Width\",\n            imgHeight: \"Height\",\n            imgUse: \"Add\",\n            imgDel: \"Remove image\",\n            imgWrongSize: \"Wrong value of image size!\",\n            audioTitle: \"Audio\",\n            audioAdd: \"Add new audio track\",\n            audioDelete: \"Remove link to audio track.\",\n            audioNew: \"New audio track\",\n            audioName: \"Name\",\n            audioEdit: \"Rename audio track\",\n            audioPath: \"Path to file\",\n            audioLength: \"Length\",\n            audioCreate: \"Create\",\n            linkUrl: \"Url link\",\n            linkTitle: \"Link creation\",\n            linkClass: \"Popup class\",\n            linkClassUrl: \"Link class\",\n            linkAdd: \"Add link\",\n            linkDelete: \"Remove link\",\n            linkIn: \"Inside book\",\n            linkChapter: \"Chapter\",\n            linkExternal: \"External\",\n            linkTarget: \"Link target\",\n            linkLinkText: \"Link text\",\n            linkUseAnchor: \"Use anchor?\",\n            linkUse: \"Use\",\n            anchorTutorial: \"Anchor ID can be obtained by clicking on icon <i class=\\\"material-icons\\\">more_vert</i>, which is placed in right top corner of the component (On mouse over). Then select option \\\"Copy anchor ID\\\" from context menu marked this icon: <i class=\\\"f7-icons\\\">link</i>.\",\n            linkAnchorId: \"Anchor ID\",\n            linkErrorEmpty: \"Link text cannot be empty.\",\n            linkNextPage: \"NEXT PAGE\",\n            linkPrevPage: \"PREVIOUS PAGE\",\n            linkCurrPage: \"CURRENT PAGE\",\n            linkNoValidUrl: \"Entered URL address is not valid. Pleas enter valid URL.\",\n            imgChange: \"Click to change image.\",\n            audioChange: \"Click to change audio track.\",\n            videoChange: \"Click to change video stream.\",\n            citation: \"Citations\",\n            addNext: \"Add next\",\n            editEquation: \"Edit equation\",\n            iconChange: \"Click to change the icon.\",\n            iconTitle: \"Icon picker\",\n            linkAction: \"Action\",\n            actionType: \"Type of the action\",\n            customClass: \"Component's custom class\",\n            animation: \"Animation\",\n            animationSelect: \"Animation select\",\n            animationName: \"Animations name\",\n            animationDelay: \"Animations delay\",\n            animationRepeat: \"Repeat the animation?\",\n            animationDuration: \"Animations duration [ms] (0 = default duration)\",\n            animationEnable: \"Enable animation\",\n            controlYes: \"YES\",\n            controlNo: \"NO\",\n            deletePopup: \"Delete popup\",\n            popupTitle: \"Popup creation\",\n            requestAnswerTitle: \"Evaluation only with filled answer.\",\n            requestAnswerText: \"To evaluate this question please fill all answers\",\n            clearTitle: \"Clear content?\",\n            clearText: \"Are you really want to delete content of this text editor?\"\n          },\n          controls: {\n            copy: \"Copy to clipboard\",\n            console: \"Print component to console\",\n            anchor: \"Create anchor\",\n            copyAnchor: \"Copy anchor ID\"\n          },\n          history: {\n            undo: \"Undo\",\n            redo: \"Redo\"\n          }\n        }\n      }\n    }\n  },\n  create: function create() {\n    var _this = this;\n    return asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3() {\n      var app;\n      return regenerator_default.a.wrap(function _callee3$(_context3) {\n        while (1) switch (_context3.prev = _context3.next) {\n          case 0:\n            app = _this;\n            if (app.params.builder.enable) {\n              app.routes.push({\n                name: \"Builder Menu\",\n                path: \"/builder-menu/\",\n                component: builder_menu_f7\n              });\n              app.routes.push({\n                name: \"Builder Menu\",\n                path: \"/builder-variables/\",\n                component: builder_variables_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Citations\",\n                path: \"/builder-citations/\",\n                component: citation_list_f7_es[\"default\"]\n              });\n              app.routes.push({\n                name: \"Builder Equation\",\n                path: \"/builder-equation/\",\n                component: equation_editor_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Icons\",\n                path: \"/builder-icons/\",\n                component: icon_picker_f7_es\n              });\n              app.routes.push({\n                name: \"Builder create icon\",\n                path: \"/builder-icons-create/\",\n                component: new_icon_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Link\",\n                path: \"/builder-link/:paramId\",\n                component: link_creation_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Link\",\n                path: \"/builder-colors/\",\n                component: color_picker_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Styles\",\n                path: \"/builder-styles/\",\n                component: styles_editor_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Audio\",\n                path: \"/builder-audio-list/:paramId\",\n                component: audio_list_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Audio Create\",\n                path: \"/builder-audio-create/\",\n                component: create_audio_f7_es[\"default\"]\n              });\n              app.routes.push({\n                name: \"Builder Citations Create\",\n                path: \"/builder-citations-create/\",\n                component: citation_popup_f7_es\n              });\n              app.routes.push({\n                name: \"Builder\",\n                path: \"/builder/\",\n                component: builder_components_f7[\"default\"]\n              });\n              app.routes.push({\n                name: \"Builder\",\n                path: \"/builder-form-share/\",\n                component: builder_form_share_f7_es\n              });\n              app.routes.push({\n                name: \"Builder Content\",\n                path: \"/builder-content/\",\n                component: builder_content_f7\n              });\n              app.routes.push({\n                name: \"Builder Css\",\n                path: \"/builder-css/\",\n                component: builder_css_generator_f7[\"default\"]\n              });\n              app.routes.push({\n                name: \"Kapitoly\",\n                path: \"/builder-chapters/\",\n                component: builder_chapters_new_f7_es\n              });\n              app.routes.push({\n                name: \"Správa verzí\",\n                path: \"/builder-select-version/\",\n                component: builder_version_select_f7_es\n              });\n              app.routes.push({\n                name: \"Builder History\",\n                path: \"/builder-history/\",\n                options: {\n                  props: {\n                    inComponent: false\n                  }\n                },\n                component: builder_history_f7[\"default\"]\n              });\n              app.routes.push({\n                name: \"Builder History\",\n                path: \"/builder-navigation-bottom/\",\n                component: builder_navigation_bottom_f7\n              });\n              app.routes.push({\n                name: \"Prázdná\",\n                path: \"/c/empty/\",\n                id: \"empty\",\n                component: builder_empty_book_chapters_f7\n              });\n              app.routes.push({\n                name: \"c\",\n                path: \"/c/:id(.*)\",\n                component: builder_page_component_f7_es\n              });\n              app.routes.push({\n                name: \"d\",\n                path: \"/d/:id(.*)\",\n                component: builder_page_component_f7_es\n              });\n              app.routes.push({\n                name: \"Slovník\",\n                path: \"/builder-dictionary/\",\n                component: dictionary_f7_es\n              });\n              app.on(\"init\", function (page) {\n                app.builder = new builderClass(app);\n                app.builder.categories = app.params.builder.categories;\n                app.builder.static = builderClass;\n                app.data.myEvents.on(\"logged\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n                  return regenerator_default.a.wrap(function _callee$(_context) {\n                    while (1) switch (_context.prev = _context.next) {\n                      case 0:\n                        app.builder.api.getBookVersionList();\n                      case 1:\n                      case \"end\":\n                        return _context.stop();\n                    }\n                  }, _callee);\n                })));\n\n                // Jakmile se načte main view v book.js\n                app.data.myEvents.on(\"view:main\", /*#__PURE__*/function () {\n                  var _ref2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(page) {\n                    var builder, chapterCount;\n                    return regenerator_default.a.wrap(function _callee2$(_context2) {\n                      while (1) switch (_context2.prev = _context2.next) {\n                        case 0:\n                          builder = app.builder;\n                          app.builder.defaultComponentsFlatten(app.builder.categories);\n                          if (!(app.params.hasOwnProperty(\"builder\") && app.params.builder.development.enable && app.params.builder.development.syncServer)) {\n                            _context2.next = 11;\n                            break;\n                          }\n                          _context2.next = 5;\n                          return app.builder.api.getBookbyVersion();\n                        case 5:\n                          app.data.myEvents.off(\"builder:empty\");\n                          app.data.myEvents.on(\"builder:empty\", function (e) {\n                            app.book.bookChapters.push({\n                              name: \"Prázdná\",\n                              path: \"/empty/\",\n                              id: \"empty\",\n                              component: builder_empty_book_chapters_f7\n                            });\n                          });\n                          chapterCount = _.filter(app.book.bookChapters, function (o) {\n                            return o.deleted == false;\n                          });\n                          if (chapterCount.length === 0) {\n                            app.data.myEvents.emit(\"builder:empty\");\n                          }\n                          _context2.next = 12;\n                          break;\n                        case 11:\n                          if (!app.params.builder.development.enable || app.params.builder.development.syncServer === false) {\n                            // debugger;\n                            app.builder.chapters.setBookChapters();\n                            app.builder.createComponentsFromData();\n                          }\n                        case 12:\n                          if (app.params.builder.development.enable) {\n                            app.root.addClass(\"builder-mode-edit\");\n                          } else {\n                            app.root.addClass(\"builder-mode-read\");\n                          }\n\n                          // builder.setDataFromRoutes();\n                          // alert('2');\n\n                          // let emptyPage;\n\n                          app.data.myEvents.emit(\"book:chaptersLoaded\");\n                          // }\n\n                          if (app.params.builder.development.enable) {\n                            app.views.create(\"#hook-under-swiper\", {\n                              url: \"/builder-navigation-bottom/\",\n                              pushState: false\n                            });\n                          }\n                          app.data.myEvents.emit(\"builder:ready\");\n                        case 16:\n                        case \"end\":\n                          return _context2.stop();\n                      }\n                    }, _callee2);\n                  }));\n                  return function (_x) {\n                    return _ref2.apply(this, arguments);\n                  };\n                }());\n              });\n            }\n            // app.builder.components = [];\n            app.translation.addResourceBundle(\"cs\", \"builder\", app.params.builder.lang.cs);\n            app.translation.addResourceBundle(\"en\", \"builder\", app.params.builder.lang.en);\n          case 4:\n          case \"end\":\n            return _context3.stop();\n        }\n      }, _callee3);\n    }))();\n  },\n  on: {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/iframe-message/iframe-message.js\n\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n// import Framework7 from './../../framework7.esm.bundle.v4.4.3.js';\n//\n//  let myEvents = new Framework7.Events();\n\n\nvar iframe_message_IframeMessage = /*#__PURE__*/function () {\n  function IframeMessage(app, params) {\n    classCallCheck_default()(this, IframeMessage);\n    var iframeMessage = this;\n\n    // const defaults = Utils.extend({}, app.params);\n    // user.params = Utils.extend(defaults, params);\n\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.iframeMessage, params);\n\n    // debugger\n    iframeMessage.params = extendedParams;\n    this.app = app;\n    app.on(\"init\", function (page) {\n      // alert(\"MESS\");\n      iframeMessage.initialMessage();\n      iframeMessage.appendMessageListener();\n    });\n  }\n  return createClass_default()(IframeMessage, [{\n    key: \"appendMessageListener\",\n    value: function appendMessageListener() {\n      var context = this;\n      context.messageEventAdded = false;\n      context.listenMessage = null;\n      var app = context.app;\n      app.data.myEvents.on(\"message:close\", function (token) {\n        // alert(\"mám message1\");\n        app.data.backTolibraryButton = true;\n      });\n      if (!context.listenMessage) {\n        // jestliže neexistuje metoda listenMessage, vytvoř ji\n        context.listenMessage = function (message) {\n          if (message && message.origin === app.apiManager.params.authUrl) {\n            // debugger\n            try {\n              var newVals = JSON.parse(message.data);\n              var action = newVals.action;\n              if (action === \"sendToken\") {\n                var token = newVals.token;\n                var user = newVals.user;\n                // debugger;\n\n                if (user) {\n                  console.info(\"[IframeMessage] (appendMessageListener) New user info from iframe recived: (\".concat(user.id, \") \").concat(user.name, \" \").concat(user.surname, \" | \").concat(token));\n                }\n                if (token && token !== \"\" && !newVals.redirectLength) {\n                  // alert(token+ 'token');\n                  app.data.myEvents.emit(\"message:auth\", token, user);\n                } else if (token === \"\" || !token) {\n                  app.data.myEvents.emit(\"message:logout\");\n                }\n              }\n            } catch (e) {\n              // console.warn(\"parse error\", e);\n            }\n          } else if (message && message.origin === app.apiManager.params.mediaUrlDomain) {\n            // alert(\"media\");\n            try {\n              var _newVals = JSON.parse(message.data);\n              var url = _newVals.url;\n              var folder = _newVals.urlFolder;\n              if (url && url != null) {\n                app.data.myEvents.emit(\"message:media\", url);\n              }\n              if (folder && folder != null) {\n                app.apiManager.params.mediaUrl = folder;\n              }\n            } catch (e) {\n              console.warn(\"parse error\", e);\n            }\n          } else if (message) {\n            if (message && message.data) {\n              try {\n                var _newVals2 = \"\";\n                if (typeof_default()(message.data) !== \"object\") {\n                  _newVals2 = JSON.parse(message.data);\n                } else {\n                  _newVals2 = message.data;\n                }\n                if (_newVals2 && _newVals2.close) {\n                  var close = _newVals2.close;\n                  if (close && close != null) {\n                    app.data.myEvents.emit(\"message:close\", close);\n                  }\n                }\n                if (_newVals2 && _newVals2.iframeHistory) {\n                  // alert(\"Book:\" + newVals.iframeHistory);\n                  app.book.ignorePushState = true;\n                  var flattenRoutes = app.router.flattenRoutes(app.book.getBookChaptersTree());\n                  var obj = flattenRoutes.find(function (o) {\n                    return o.path == _newVals2.iframeHistory;\n                  });\n                  var chapterindex = flattenRoutes.indexOf(obj);\n                  app.swiper.get(\"#main-swiper\").slideTo(chapterindex);\n                }\n              } catch (e) {\n                // console.warn(\"parse error\", e);\n              }\n            }\n          } else {}\n          // debugger;\n          // setNewUrlToReference(newVals.url);\n        };\n      }\n      if (window.addEventListener) {\n        if (!context.messageEventAdded) {\n          window.addEventListener(\"message\", context.listenMessage, true);\n          context.messageEventAdded = true;\n        } else {\n          window.removeEventListener(\"message\", context.listenMessage, true);\n          window.addEventListener(\"message\", context.listenMessage, true);\n        }\n      } else {\n        if (!context.messageEventAdded) {\n          window.attachEvent(\"onmessage\", context.listenMessage);\n          context.messageEventAdded = true;\n        }\n      }\n    }\n  }, {\n    key: \"initialMessage\",\n    value: function initialMessage() {\n      var msg = JSON.stringify({\n        bookReady: true\n      });\n      window.parent.postMessage(msg, \"*\");\n    }\n  }]);\n}();\n/* harmony default export */ var iframe_message = ({\n  name: \"iframeMessage\",\n  params: {\n    iframeMessage: {\n      active: true\n    }\n  },\n  static: {\n    user: iframe_message_IframeMessage\n  },\n  create: function create(params) {\n    var app = this;\n    app.iframeMessage = new iframe_message_IframeMessage(app, params);\n\n    // app.data.user = app.user;\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-dictionary/dictionary.js\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\nvar dictionary_Dictionary = /*#__PURE__*/function () {\n  function Dictionary(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Dictionary);\n    this.app = app;\n    var dictionary = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.dictionary, params);\n    dictionary.params = extendedParams;\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"builder:ready\", function (e) {\n        app.builder.beforeRender = app.utils.extender(app.builder.beforeRender, function (f) {\n          if (app.bookSettings.params.showTranslation && dictionary.params.data.length > 0) {\n            var datas = _.filter(dictionary.params.data, function (o) {\n              return o.deleted == false;\n            });\n            var findString = \"\";\n            var helper = 0;\n            for (var i = 0; i < datas.length; i++) {\n              helper = 0;\n              var subStr = datas[i].original;\n              subStr = subStr.replace(\"(\", \"(?:\");\n              if (subStr.includes(\"*\")) {\n                if (subStr.indexOf(\"*\") == 0) {\n                  helper = 1;\n                  subStr = subStr.replace(\"*\", \"[a-z0-9\\\\u0400-\\\\u04FF]*(\");\n                } else {\n                  helper = 2;\n                  subStr = subStr.replace(\"*\", \")[a-z0-9\\\\u0400-\\\\u04FF]*\");\n                }\n              }\n              if (i !== 0) {\n                findString = findString + \"|\";\n              }\n              if (helper == 1) {\n                findString = findString + subStr + \")\";\n              } else if (helper == 2) {\n                findString = findString + \"(?:\" + subStr;\n              } else {\n                findString = findString + subStr;\n              }\n            }\n            var pat = \"([\\\\s|\\\\.|^>])(\" + findString + \")([\\\\s|\\\\.|,|<])\";\n            if (findString.length > 0) {\n              var icon = app.bookSettings.params.translationIcon;\n              var re4 = new RegExp(pat, \"gmi\");\n              f = f.replace(re4, function (fullMatch, g1, g2, g3, offset, string) {\n                return \"\".concat(g1, \"<span class='dictionary' data-translate='\").concat(g2, \"'><span style='white-space: nowrap;'><i class='icon material-icons translation-icon'>\").concat(icon, \"</i><span>\").concat(g2, \"</span></span></span>\").concat(g3);\n              });\n            } else {\n              return f;\n            }\n          }\n          return f;\n        });\n      });\n    });\n    this.openTranslation = this.openTranslation.bind(this);\n  }\n  return createClass_default()(Dictionary, [{\n    key: \"openTranslation\",\n    value: function openTranslation($clickedEl) {\n      var translate = _.find(this.app.dictionary.params.data, function (o) {\n        //   \"finding...\",\n        //   o.original.toLowerCase().replace(/\\*/g, \"\"),\n        //   $clickedEl.data(\"translate\").toLowerCase()\n        // );\n        // debugger;\n        return o.original.toLowerCase().replace(/\\*/g, \"\") == $clickedEl.data(\"translate\").toLowerCase();\n      });\n      if (translate) {\n        var popover = this.app.popover.create({\n          targetEl: $clickedEl,\n          content: '<div class=\"popover\">' + '<div class=\"popover-inner\">' + '<div class=\"block\" style=\"text-align: center\">' + \"<p>\" + translate.translated + \"</p>\" + \"</div>\" + \"</div>\" + \"</div>\"\n        });\n        popover.open();\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var builder_dictionary_dictionary = ({\n  name: \"dictionary\",\n  params: {\n    dictionary: {\n      data: []\n    }\n  },\n  static: {\n    Dictionary: dictionary_Dictionary\n  },\n  create: function create() {\n    var app = this;\n    app.dictionary = new dictionary_Dictionary(app);\n  },\n  clicks: {\n    \".dictionary\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      return new dictionary_Dictionary(app).openTranslation($clickedEl);\n    }\n  }\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-typography/typography.js\n\n\n\nvar typography_Typography = /*#__PURE__*/createClass_default()(function Typography(app) {\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  classCallCheck_default()(this, Typography);\n  this.app = app;\n  var typography = this;\n  var extendedParams = utils[\"default\"].extend({\n    on: {}\n  }, app.params.typography, params);\n  typography.params = extendedParams;\n  app.on(\"init\", function () {\n    app.data.myEvents.on(\"builder:ready\", function (e) {\n      app.builder.beforeRender = app.utils.extender(app.builder.beforeRender, function (f) {\n        //Pozice;\n        // f = f.replace(\"{{position}}\", arguments[3].params.content.position);\n\n        //spojk/předložky na konci řádku\n        var re = new RegExp(\"(&nbsp;|\\\\s)([a|i|o|u|v|s|z|k])(\\\\s+)\", \"gmi\");\n        f = f.replace(re, \"$1$2&nbsp;\");\n\n        //styly seznamu\n        var re3 = new RegExp(\"(<ul>)\", \"gmi\");\n        f = f.replace(re3, \"<ul class='b-inner-list-ul'>\");\n        var re4 = new RegExp(\"(<ol>)\", \"gmi\");\n        f = f.replace(re4, \"<ol class='b-inner-list-ol'>\");\n        var re44 = new RegExp(\"(<\\\\s*li[^>]*>)\", \"gmi\");\n        f = f.replace(re44, \"<li><div class='li-inner'>\");\n        var re444 = new RegExp(\"(</li>)\", \"gmi\");\n        f = f.replace(re444, \"</div></li>\");\n\n        //https://regex101.com/r/ShFizt/1\n        //Odstraní kompletně atribut \"style\"\n        // let re5 = new RegExp(\"(<?(style)=\\\"[^\\\"]*\\\")\", \"gmi\");\n        // f = f.replace(re5, 'style=\"color:red\"');\n\n        //https://regex101.com/r/KTFSlu/1\n        // odstraní font-size a font-family\n        var re6 = new RegExp(\"((font-size|font-family):[^;'\\\"]*(;|\\\"|'))\", \"gmi\");\n        f = f.replace(re6, '');\n        // ü\n        // let chars = {\n        //    'u&#x308;':'ü',\n        //   // 'ě':'ě'\n        // };\n        //\n        // f = f.replace(/[u&#x308;]/g, m => chars[m]);\n\n        // f = escape(f);\n\n        var re7 = new RegExp(/ü/, \"gmi\");\n        f = f.replace(re7, 'ü');\n        return f;\n      });\n    });\n  });\n});\n/* harmony default export */ var builder_typography_typography = ({\n  name: \"typography\",\n  params: {\n    typography: {}\n  },\n  static: {\n    Typography: typography_Typography\n  },\n  create: function create() {\n    var app = this;\n    app.typography = new typography_Typography(app);\n  },\n  clicks: {}\n});\n// EXTERNAL MODULE: ./node_modules/katex/dist/katex.css\nvar dist_katex = __webpack_require__(\"./node_modules/katex/dist/katex.css\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-equation/equation.js\n\n\n\n\n\nvar equation_Equation = /*#__PURE__*/function () {\n  function Equation(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Equation);\n    this.app = app;\n    var equation = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.equation, params);\n    equation.params = extendedParams;\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"builder:ready\", function (e) {\n        app.builder.beforeRender = app.utils.extender(app.builder.beforeRender, function (f) {\n          var re2 = new RegExp(/\\[\\[\\[((.|\\n)*?)\\]\\]\\]/gim, \"gmi\");\n          f = f.replace(re2, function (matched) {\n            // debugger\n            matched = matched.substring(3);\n            matched = matched.slice(0, -3);\n            matched = matched.replaceAll(\"amp;\", \"\");\n            matched = matched.replace(/[\\n\\r]/g, \"\");\n            matched = matched.replace(/&nbsp;/g, \" \");\n            matched = matched.replace(/&amp;nbsp;/g, \" \");\n\n            // debugger;\n            var katexEquationTextRendered;\n            // debugger\n            try {\n              katexEquationTextRendered = katex_default.a.renderToString(matched, {\n                throwOnError: true,\n                displayMode: false\n              });\n            } catch (err) {\n              katexEquationTextRendered = \"Vzorec se nepodařilo vykreslit!\";\n            }\n            return katexEquationTextRendered;\n          });\n          return f;\n        });\n      });\n    });\n    this.replaceWhiteSpaces = this.replaceWhiteSpaces.bind(this);\n    this.openEquationPopup = this.openEquationPopup.bind(this);\n  }\n  return createClass_default()(Equation, [{\n    key: \"replaceWhiteSpaces\",\n    value: function replaceWhiteSpaces(val) {\n      var bracket = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var matched = \"[[[\".concat(val, \"]]]\");\n      if (!bracket) {\n        matched = matched.substring(3);\n        matched = matched.slice(0, -3);\n      }\n      matched = matched.replaceAll(\"amp;\", \"\");\n      matched = matched.replace(/[\\n\\r]/g, \"\");\n      matched = matched.replace(/&nbsp;/g, \" \");\n      matched = matched.replace(/&amp;nbsp;/g, \" \");\n      return matched;\n    }\n  }, {\n    key: \"openEquationPopup\",\n    value: function openEquationPopup(value) {\n      var app = this.app;\n      var val = value;\n      if (value.includes(\"[[[\")) {\n        val = val.substring(3);\n      }\n      if (value.includes(\"]]]\")) {\n        val = val.slice(0, -3);\n      }\n      return new Promise(function (resolve, reject) {\n        var eqModal = app.popup.create({\n          content: \"\\n      <div class=\\\"popup popup-eq\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.eqTitle\"), \"</h2>\\n            </div>\\n          </div>\\n          <div class=\\\"view view-main-equation-popup\\\"></div>\\n      </div>\\n      \"),\n          on: {\n            open: function open(popover) {\n              app.views.create(\".view-main-equation-popup\", {\n                name: \"equation\",\n                url: \"/builder-equation/\",\n                pushState: false,\n                eqContent: val\n              });\n            },\n            opened: function opened(popover) {\n              app.data.myEvents.off(\"equation:useEquation\");\n              app.data.myEvents.on(\"equation:useEquation\", function (res) {\n                resolve(res);\n                eqModal.close();\n              });\n            }\n          }\n        });\n        eqModal.open();\n      });\n    }\n  }]);\n}();\n/* harmony default export */ var builder_equation_equation = ({\n  name: \"equation\",\n  params: {\n    equation: {}\n  },\n  static: {\n    Equation: equation_Equation\n  },\n  create: function create() {\n    var app = this;\n    app.equation = new equation_Equation(app);\n  },\n  clicks: {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-icons/icons.js\n\n\n//TODO offline stažení\n\n\nvar icons_Icons = /*#__PURE__*/function () {\n  function Icons(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Icons);\n    this.app = app;\n    var icons = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.icons, params);\n    icons.params = extendedParams;\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"builder:ready\", function (e) {\n        app.builder.beforeRender = app.utils.extender(app.builder.beforeRender, function (f) {\n          // debugger;\n          if (typeof f === \"string\") {\n            var reIcon = new RegExp(/{{icon:[\\d+:]*}}/gm, \"gmi\");\n            var iconMatch = f.match(reIcon);\n            if (iconMatch != null) {\n              iconMatch.forEach(function (item) {\n                var id = item.match(/\\d+/gm);\n                var icon = _.find(app.icons.params.customIcons, function (o) {\n                  return o.id == id && o.deleted === false;\n                });\n                var reIcon2 = new RegExp(/{{icon:[\\d+:]*}}/m, \"mi\");\n                var iconEl = \"\";\n                if (icon != undefined) {\n                  iconEl = \"<img class=\\\"custom-icon\\\" src=\\\"\".concat(icon.url, \"\\\" />\");\n                }\n                f = f.replace(reIcon2, iconEl);\n              });\n            }\n          }\n          return f;\n        });\n      });\n    });\n    this.openIconPopup = this.openIconPopup.bind(this);\n    this.createIconElement = this.createIconElement.bind(this);\n  }\n  return createClass_default()(Icons, [{\n    key: \"createIconElement\",\n    value: function createIconElement(obj) {\n      if (obj == null) {\n        return \"\";\n      }\n      if (!obj.custom) {\n        return \"<i class=\\\"icon \".concat(obj.type, \"\\\" contenteditable=\\\"false\\\" data-icon=\\\"\").concat(obj.name, \"\\\"></i>\");\n      } else {\n        return \"{{icon:\".concat(obj.id, \"}}\");\n      }\n    }\n  }, {\n    key: \"openIconPopup\",\n    value: function openIconPopup() {\n      var app = this.app;\n      return new Promise(function (resolve, reject) {\n        var iconModal = app.popup.create({\n          content: \"\\n      <div class=\\\"popup popup-icons\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.iconTitle\"), \"</h2>\\n            </div>\\n          </div>\\n          <div class=\\\"view view-main-icon-popup\\\"></div>\\n      </div>\\n      \"),\n          on: {\n            open: function open(popover) {\n              app.views.create(\".view-main-icon-popup\", {\n                name: \"icons\",\n                url: \"/builder-icons/\",\n                pushState: false\n              });\n            },\n            opened: function opened(popover) {\n              app.data.myEvents.off(\"icons:useIcon\");\n              app.data.myEvents.on(\"icons:useIcon\", function (res) {\n                resolve(res);\n                iconModal.close();\n              });\n            }\n          }\n        });\n        iconModal.open();\n      });\n    }\n  }]);\n}();\n/* harmony default export */ var builder_icons_icons = ({\n  name: \"icons\",\n  params: {\n    icons: {\n      customIcons: []\n    }\n  },\n  static: {\n    Icons: icons_Icons\n  },\n  create: function create() {\n    var app = this;\n    app.icons = new icons_Icons(app);\n  },\n  clicks: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-colors/colors.less\nvar builder_colors_colors = __webpack_require__(\"./src/core/custom_plugins/builder-colors/colors.less\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-colors/colors.js\n\n\n\n\nvar colors_Colors = /*#__PURE__*/function () {\n  function Colors(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Colors);\n    this.app = app;\n    var colors = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.colors, params);\n    colors.params = extendedParams;\n    this.openColorPallete = this.openColorPallete.bind(this);\n    this.generateStyles = this.generateStyles.bind(this);\n    this.getVariableStirng = this.getVariableStirng.bind(this);\n    this.substractAlphaChannel = this.substractAlphaChannel.bind(this);\n    this.rgbToHex = this.rgbToHex.bind(this);\n    app.on(\"init\", function () {\n      // debugger;\n      if (app.data.hasOwnProperty(\"myEvents\")) {\n        app.data.myEvents.on(\"builder:ready\", function (e) {\n          colors.setDefaultStyles();\n          colors.generateStyles();\n          app.translation.addResourceBundle(\"cs\", \"colors\", app.colors.params.lang.cs);\n          app.translation.addResourceBundle(\"en\", \"colors\", app.colors.params.lang.en);\n        });\n      }\n    });\n  }\n  return createClass_default()(Colors, [{\n    key: \"openColorPallete\",\n    value: function openColorPallete(target) {\n      var settings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      var defaultColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n      var app = this.app;\n      var colorPicker = null;\n      // debugger;\n      app.colors.params.currentSettings = _.cloneDeep(app.colors.params.defaultSettings);\n      if (settings != null) {\n        if (settings.hasOwnProperty(\"showCustomColors\")) {\n          app.colors.params.currentSettings.showCustomColors = settings.showCustomColors;\n        }\n        if (settings.hasOwnProperty(\"showCustomColors\")) {\n          app.colors.params.currentSettings.showThemeColors = settings.showThemeColors;\n        }\n        if (settings.hasOwnProperty(\"defaultColors\")) {\n          app.colors.params.currentSettings.defaultColors = settings.defaultColors;\n        }\n        if (settings.hasOwnProperty(\"showDeleteButton\")) {\n          app.colors.params.currentSettings.showDeleteButton = settings.showDeleteButton;\n        }\n      } else {}\n      return new Promise(function (resolve, reject) {\n        var popoverHTML = \"\\n        <div class=\\\"popover colors-popover\\\">\\n            <div class=\\\"popover-angle\\\"></div>\\n            <div class=\\\"popover-inner\\\">\\n                <div class=\\\"view-color-picker-container\\\" data-value=\\\"\".concat(defaultColor, \"\\\"></div>\\n                </div>\\n            </div>\\n        </div>\\n        \");\n        var colorPopover = app.popover.create({\n          content: popoverHTML,\n          targetEl: target,\n          closeByBackdropClick: true,\n          closeByOutsideClick: false,\n          on: {\n            open: function open() {\n              app.views.create(\".view-color-picker-container\", {\n                name: \"colors\",\n                url: \"/builder-colors/\",\n                pushState: false\n              });\n            },\n            close: function close() {\n              app.data.myEvents.emit(\"colors:closeParent\");\n            }\n          }\n        });\n        app.data.myEvents.off(\"colors:close\");\n        app.data.myEvents.on(\"colors:close\", function (use) {\n          colorPopover.close();\n          if (use) {\n            var selColor = app.colors.params.selectedColor;\n            app.colors.params.selectedColor = null;\n            resolve(selColor);\n          } else {\n            app.colors.params.selectedColor = null;\n            reject();\n          }\n        });\n        colorPopover.open();\n      });\n    }\n  }, {\n    key: \"setDefaultStyles\",\n    value: function setDefaultStyles() {\n      var app = this.app;\n      var styles = $$(\"head\").find(\".custom-colors-styles-default\");\n      var html = \"<style class=\\\"custom-colors-styles-default\\\">\";\n      html += \".theme-default{\";\n      app.colors.params.defaultColors.forEach(function (obj) {\n        if (!obj.deleted) {\n          html += \"\\n       --fb-color-\".concat(obj.id, \": \").concat(obj.hex, \";\\n      \");\n        }\n      });\n      html += \"\\n    --fb-color-theme: var(--f7-theme-color);\\n    --fb-color-theme-tint: var(--f7-theme-color-tint);\\n    --fb-color-theme-shade: var(--f7-theme-color-shade);\\n  }\";\n      app.colors.params.defaultColors.forEach(function (obj) {\n        if (!obj.deleted) {\n          html += \"\\n       .fb-color-\".concat(obj.id, \"{color:var(--fb-color-\").concat(obj.id, \")}\\n      \");\n        }\n      });\n      html += \"\\n    .fb-color-theme{color:var(--fb-color-theme)}\\n    .fb-color-theme-tint{color:var(--fb-color-theme-tint)}\\n    .fb-color-theme-shade{color:var(--fb-color-theme-shade)}\\n    </style>\";\n\n      // debugger;\n\n      if (styles.length > 0) {\n        styles.remove();\n      }\n      $$(\"head\").append(html);\n    }\n  }, {\n    key: \"generateStyles\",\n    value: function generateStyles() {\n      var app = this.app;\n      var styles = $$(\"head\").find(\".custom-colors-styles\");\n      var html = \"<style class=\\\"custom-colors-styles\\\">\";\n      html += \":root{\";\n      app.colors.params.data.forEach(function (obj) {\n        if (!obj.deleted) {\n          html += \"\\n        --fb-color-\".concat(obj.id, \": \").concat(obj.hex, \";\\n      \");\n        }\n      });\n      html += \"}\";\n      app.colors.params.data.forEach(function (obj) {\n        if (!obj.deleted) {\n          html += \"\\n       .fb-color-\".concat(obj.id, \"{color:var(--fb-color-\").concat(obj.id, \")}\\n      \");\n        }\n      });\n      html += \"</style>\";\n\n      // debugger;\n\n      if (styles.length > 0) {\n        styles.remove();\n      }\n      $$(\"head\").append(html);\n    }\n  }, {\n    key: \"getVariableStirng\",\n    value: function getVariableStirng(id) {\n      return \"var(--fb-color-\".concat(id, \")\");\n    }\n  }, {\n    key: \"substractAlphaChannel\",\n    value: function substractAlphaChannel(hex) {\n      var obj = {};\n      if (hex.length == 9) {\n        var alphaPart = hex.slice(-2);\n        var alpha = parseInt(alphaPart, 16) / 255;\n        obj = {\n          hex: hex.slice(0, -2),\n          alpha: alpha.toFixed(2)\n        };\n      } else {\n        obj = {\n          hex: hex,\n          alpha: 1.0\n        };\n      }\n      return obj;\n    }\n  }, {\n    key: \"rgbToHex\",\n    value: function rgbToHex(rgb) {\n      return \"#\".concat(rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/).slice(1).map(function (n) {\n        return parseInt(n, 10).toString(16).padStart(2, \"0\");\n      }).join(\"\"));\n    }\n  }]);\n}();\n/* harmony default export */ var custom_plugins_builder_colors_colors = ({\n  name: \"colors\",\n  params: {\n    colors: {\n      selectedColor: null,\n      data: [],\n      defaultSettings: {\n        showCustomColors: true,\n        showThemeColors: true,\n        showDeleteButton: true,\n        defaultColors: null //overwrite default colors\n      },\n      currentSettings: {},\n      defaultColors: [{\n        id: \"a\",\n        hex: \"#000000ff\",\n        name: \"Black\"\n      }, {\n        id: \"b\",\n        hex: \"#1abc9cff\",\n        name: \"Turquoise\"\n      }, {\n        id: \"c\",\n        hex: \"#2ecc71ff\",\n        name: \"Emerald\"\n      }, {\n        id: \"d\",\n        hex: \"#3498dbff\",\n        name: \"River\"\n      }, {\n        id: \"e\",\n        hex: \"#8e44adff\",\n        name: \"Wisteria\"\n      }, {\n        id: \"f\",\n        hex: \"#f1c40fff\",\n        name: \"Sunflower\"\n      }, {\n        id: \"g\",\n        hex: \"#e74c3c\",\n        name: \"Alizarin\"\n      }, {\n        id: \"h\",\n        hex: \"#e67e22\",\n        name: \"Carrot\"\n      }],\n      lang: {\n        cs: {\n          themeColors: \"Barvy šablony\",\n          defaultColors: \"Výchozí barvy\",\n          customColors: \"Vlastní barvy\",\n          newColor: \"Nová barva\",\n          newColorText: \"Zadejte jméno nové barvy.\",\n          removeColor: \"Odstranit uloženou barvu\",\n          removeColorText: \"Opravdu chcete odstranit vybranou barvu?\",\n          colorName: \"Jméno barvy\",\n          remove: \"Odebrat zbarvení\",\n          cancel: \"Zrušit\"\n        },\n        en: {\n          themeColors: \"Theme colors\",\n          defaultColors: \"Default colors\",\n          customColors: \"Custom colors\",\n          newColor: \"New color\",\n          newColorText: \"Type name of the new color.\",\n          removeColor: \"Remove saved color\",\n          removeColorText: \"Do you really want to remove selected color?\",\n          colorName: \"Color name\",\n          remove: \"Remove coloring\",\n          cancel: \"Cancel\"\n        }\n      }\n    }\n  },\n  static: {\n    Colors: colors_Colors\n  },\n  create: function create() {\n    var app = this;\n    app.colors = new colors_Colors(app);\n  },\n  clicks: {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-link/link.js\n\n\n\nvar link_Link = /*#__PURE__*/function () {\n  function Link(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Link);\n    this.app = app;\n    var link = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.link, params);\n    link.params = extendedParams;\n    this.openLinkPopup = this.openLinkPopup.bind(this);\n    this.createLinkElement = this.createLinkElement.bind(this);\n  }\n  return createClass_default()(Link, [{\n    key: \"openLinkPopup\",\n    value: function openLinkPopup(linkObject) {\n      var app = this.app;\n      return new Promise(function (resolve, reject) {\n        var id = app.utils.id(\"xxxx-xxxx-xxxx\");\n        var linkModal = app.popup.create({\n          content: \"\\n      <div class=\\\"popup popup-link\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.linkTitle\"), \"</h2>\\n            </div>\\n          </div>\\n          <div class=\\\"view view-main-link-popup-\").concat(id, \" act-view\\\" data-compId=\\\"\").concat(id, \"\\\"></div>\\n      </div>\\n      \"),\n          on: {\n            open: function open(popover) {\n              app.views.create(\".view-main-link-popup-\".concat(id), {\n                name: \"link-\".concat(id),\n                url: \"/builder-link/\".concat(id),\n                type: \"modal\",\n                pushState: false,\n                link: linkObject\n              });\n            },\n            opened: function opened(popover) {\n              app.data.myEvents.off(\"link:useLink\");\n              app.data.myEvents.on(\"link:useLink\", function (res) {\n                var data = res.data;\n                var link = app.link.createLinkElement(data);\n                resolve(link);\n                linkModal.close();\n              });\n            }\n          }\n        });\n        linkModal.open();\n      });\n    }\n  }, {\n    key: \"createLinkElement\",\n    value: function createLinkElement(res) {\n      var app = this.app;\n      var link = \"\";\n      switch (res.type) {\n        case \"internal\":\n          if (res.url == \"NEXT\") {\n            link = \"<a href=\\\"NEXT\\\" class=\\\"link link-next-page \".concat(res.class, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(res.title, \"</a>\");\n          } else if (res.url == \"PREV\") {\n            link = \"<a href=\\\"PREV\\\" class=\\\"link link-prev-page \".concat(res.class, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(res.title, \"</a>\");\n          } else if (res.url == \"ANCHOR\") {\n            link = \"<a href=\\\"ANCHOR\\\" class=\\\"link link-anchor-page \".concat(res.class, \"\\\" data-scroll-to=\\\"#\").concat(res.anchor, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(res.title, \"</a>\");\n          } else {\n            link = \"<a class=\\\"navigate link prevent-router \".concat(res.anchor != \"\" ? \"anchor\" : \"route\", \" \").concat(res.class, \"\\\" href=\\\"\").concat(res.url, \"\\\" \").concat(res.anchor == \"\" ? \"\" : \"data-scroll-to=\\\"#\".concat(res.anchor, \"\\\" data-scroll-to-highlight=\\\"true\\\"\"), \" >\").concat(res.title, \"</a>\");\n          }\n          break;\n        case \"external\":\n          link = \"<a target=\\\"_blank\\\" class=\\\"link external \".concat(res.class, \"\\\" href=\\\"\").concat(res.url, \"\\\">\").concat(res.title, \"</a>\");\n          break;\n        case \"audio\":\n          var obj = {};\n          obj[\"title\"] = res.title;\n          obj[\"trackNumber\"] = res.anchor;\n          link = app.audio.createAudioElement(obj);\n          break;\n        case \"modal\":\n          link = \"<a class=\\\"popup-open \".concat(res.class, \"\\\" href=\\\"#\\\" data-popup=\\\"#\").concat(res.anchor, \"\\\" >\").concat(res.title, \"</a>\");\n          break;\n        case \"popover\":\n          link = \"<a class=\\\"link popover-with-data not-icon \".concat(res.class, \"\\\" href=\\\"#\\\" data-text=\\\"\").concat(encodeURIComponent(res.anchor), \"\\\">\").concat(res.title, \"</a>\");\n          break;\n        case \"deleted\":\n          link = \"<span>\".concat(res.title, \"</span>\");\n          break;\n        default:\n          link = res.title;\n          break;\n      }\n      return link;\n    }\n  }]);\n}();\n/* harmony default export */ var builder_link_link = ({\n  name: \"link\",\n  params: {\n    link: {}\n  },\n  static: {\n    Link: link_Link\n  },\n  create: function create() {\n    var app = this;\n    app.link = new link_Link(app);\n  },\n  clicks: {\n    \".link-next-page, a.link-next-page\": function open($clickedEl, e) {\n      var app = this;\n      var anchor = $clickedEl.attr(\"data-scroll-to\");\n      app.swiper.get(\"#main-swiper\").slideNext();\n      if (anchor) {\n        setTimeout(function () {\n          app.navigation.scrollTo(anchor, 500, true, true);\n        }, 500);\n      }\n    },\n    \".link-prev-page, a.link-prev-page\": function open($clickedEl, e) {\n      var app = this;\n      var anchor = $clickedEl.attr(\"data-scroll-to\");\n      app.swiper.get(\"#main-swiper\").slidePrev();\n      if (anchor) {\n        setTimeout(function () {\n          app.navigation.scrollTo(anchor, 500, true, true);\n        }, 500);\n      }\n    },\n    \".link-anchor-page, a.link-anchor-page\": function open($clickedEl, e) {\n      var app = this;\n      var anchor = $clickedEl.attr(\"data-scroll-to\");\n      anchor = anchor.replaceAll(\"#\", \"\");\n      var component = app.builder.helpers.findComponentById(anchor);\n      var pageId = component.params.pageId;\n      var page = app.builder.chapters.findChapterById(pageId);\n      var path = page.fullPath;\n      var link = document.createElement('a');\n      link.setAttribute('href', path);\n      link.setAttribute('data-scroll-to', \"#\" + anchor);\n      link.setAttribute('data-scroll-to-highlight', true);\n      app.navigation.toggleClicked.call(app, $$(link));\n    }\n  }\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/style.css\nvar jsNodeEditor_style = __webpack_require__(\"./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/style.css\");\n\n// EXTERNAL MODULE: ./node_modules/jquery-ui/ui/widget.js\nvar widget = __webpack_require__(\"./node_modules/jquery-ui/ui/widget.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/noteeditor.js\nvar noteeditor = __webpack_require__(\"./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/noteeditor.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-music-sheet/music-sheet.js\n\n\n\n\n\n\nvar music_sheet_MusicSheet = /*#__PURE__*/function () {\n  function MusicSheet(app) {\n    classCallCheck_default()(this, MusicSheet);\n    this.app = app;\n    var musicSheet = this;\n    musicSheet.app = app;\n\n    // window.$ = $;\n\n    return musicSheet;\n  }\n  return createClass_default()(MusicSheet, [{\n    key: \"createMusicNotation\",\n    value: function createMusicNotation($noteWrapper) {\n      // debugger;\n      // $($noteWrapper).empty();\n      jquery_default()($noteWrapper).empty();\n      var ne_el = jquery_default()($noteWrapper).noteEditor();\n      var ne = ne_el;\n\n      // debugger;\n\n      // debugger;\n\n      return ne;\n    }\n  }, {\n    key: \"loadJsonNotation\",\n    value: function loadJsonNotation(enInstance, data) {\n      var ne = enInstance;\n      // debugger;\n      if (data.length > 0) {\n        try {\n          var parsedData = JSON.parse(data);\n          ne.func(\"importFromJSONString\", parsedData); // importing JSON data\n          // alert(\"Notová osnova: Data načtena!\");\n        } catch (e) {\n          debugger;\n          alert(\"Notová osnova: Data nejsou validní!\");\n        }\n      }\n    }\n  }]);\n}();\n/* harmony default export */ var music_sheet = ({\n  name: \"MusicSheet\",\n  params: {},\n  create: function create(params) {\n    var app = this;\n    app.on(\"init\", function () {\n      app.musicSheet = new music_sheet_MusicSheet(app, params);\n      app.data.myEvents.on(\"page:show\", function (page) {});\n    });\n  },\n  on: {},\n  clicks: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/gallery/gallery.js\nvar gallery = __webpack_require__(\"./src/core/custom_plugins/gallery/gallery.js\");\n\n// EXTERNAL MODULE: ./src/core/custom_plugins/video-player/video-player.js\nvar video_player = __webpack_require__(\"./src/core/custom_plugins/video-player/video-player.js\");\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/page-height-checker/page-height-checker.js\n\n\nvar page_height_checker_PageHeightChecker = /*#__PURE__*/function () {\n  function PageHeightChecker(app) {\n    classCallCheck_default()(this, PageHeightChecker);\n    this.app = app;\n  }\n  return createClass_default()(PageHeightChecker, [{\n    key: \"startHeightWatcher\",\n    value: function startHeightWatcher(page) {\n      var _this = this;\n      // debugger;\n      var el = page.pageEl;\n      var resizeObserver = new ResizeObserver(function (entries) {\n        _this.triggerEvent(el.offsetHeight);\n      });\n      resizeObserver.observe(el);\n    }\n  }, {\n    key: \"triggerEvent\",\n    value: function triggerEvent(height) {\n      var msg = {\n        action: \"pageHeight\",\n        value: height\n      };\n      window.parent.postMessage(JSON.stringify(msg), \"*\");\n    }\n  }]);\n}();\n/* harmony default export */ var page_height_checker = ({\n  name: \"PageHeightChecker\",\n  params: {},\n  create: function create() {\n    var app = this;\n    app.pageheightchecker = new page_height_checker_PageHeightChecker(app);\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"page:show\", function (page) {\n        page.app.pageheightchecker.startHeightWatcher(page);\n      });\n    });\n  },\n  on: {}\n});\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/constants.js\n/* MAIN */\nconst TOKEN_TYPE = {\n    SELECTOR: 1,\n    BODY_START: 2,\n    BODY_END: 3\n};\n/* EXPORT */\n\n\n// CONCATENATED MODULE: ./node_modules/string-indexes/dist/index.js\n/* MAIN */\nconst indexes = (str, substr) => {\n    const indexes = [];\n    const substrLength = substr.length;\n    let indexFrom = 0;\n    while (true) {\n        const index = str.indexOf(substr, indexFrom);\n        if (index === -1)\n            return indexes;\n        indexes.push(index);\n        indexFrom = index + substrLength;\n    }\n};\n/* EXPORT */\n/* harmony default export */ var dist = (indexes);\n\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/tokenizer.js\n/* IMPORT */\n\n\nconst { SELECTOR, BODY_START, BODY_END } = TOKEN_TYPE;\n/* HELPERS */\nconst mergeTokensSorted = (t1, t2) => {\n    let length = t1.length + t2.length;\n    let i = t1.length - 1;\n    let j = t2.length - 1;\n    const merged = new Array(length);\n    while (length > 0) {\n        merged[--length] = (j < 0 || (i >= 0 && t1[i].index > t2[j].index)) ? t1[i--] : t2[j--];\n    }\n    return merged;\n};\nconst mergeTokensSortedEvenOdd = (t1, t2) => {\n    const length = t1.length;\n    const merged = new Array(length * 2);\n    for (let i = 0, j = 0; i < length; i++, j += 2) {\n        merged[j] = t1[i];\n        merged[j + 1] = t2[i];\n    }\n    return merged;\n};\nconst findSelectorStartIndex = (tokens, tokenIndexStart = 0, limit) => {\n    let lastIndex = 0;\n    let lastTokenIndex = tokenIndexStart;\n    for (let i = tokenIndexStart, l = tokens.length; i < l; i++) {\n        const token = tokens[i];\n        const index = token.index;\n        if (index >= limit)\n            break;\n        lastIndex = (token.type === BODY_START) ? index : index + 1;\n        lastTokenIndex = i + 1;\n    }\n    return [lastIndex, lastTokenIndex];\n};\n/* MAIN */\nconst tokenizer = (css) => {\n    /* VARIABLES */\n    const startIndexes = dist(css, '{');\n    const endIndexes = dist(css, '}');\n    const selectorTokens = new Array(startIndexes.length);\n    const startTokens = new Array(startIndexes.length);\n    const endTokens = new Array(endIndexes.length);\n    let selectorIndex = 0;\n    let startIndex = 0;\n    let endIndex = 0;\n    /* BODY_START */\n    for (let i = 0, l = startIndexes.length; i < l; i++) {\n        startTokens[startIndex++] = {\n            type: BODY_START,\n            index: startIndexes[i] + 1 // Start index\n        };\n    }\n    /* BODY_END */\n    for (let i = 0, l = endIndexes.length; i < l; i++) {\n        endTokens[endIndex++] = {\n            type: BODY_END,\n            index: endIndexes[i] // End index\n        };\n    }\n    /* SELECTOR */\n    let prevStartTokenIndex = 0;\n    let prevEndTokenIndex = 0;\n    for (let i = 0, l = startIndexes.length; i < l; i++) {\n        const indexEnd = startIndexes[i];\n        const findStartData = findSelectorStartIndex(startTokens, prevStartTokenIndex, indexEnd);\n        const findEndData = findSelectorStartIndex(endTokens, prevEndTokenIndex, indexEnd);\n        prevStartTokenIndex = findStartData[1];\n        prevEndTokenIndex = findEndData[1];\n        let index = (findStartData[0] >= findEndData[0]) ? findStartData[0] : findEndData[0];\n        let selector = css.slice(index, indexEnd);\n        let semicolonIndex = index + selector.lastIndexOf(';', indexEnd) + 1;\n        if (semicolonIndex > index) {\n            index = semicolonIndex;\n            selector = css.slice(index, indexEnd);\n        }\n        selectorTokens[selectorIndex++] = {\n            type: SELECTOR,\n            index,\n            indexEnd,\n            selector\n        };\n    }\n    /* RETURN */\n    return mergeTokensSorted(mergeTokensSortedEvenOdd(selectorTokens, startTokens), endTokens);\n};\n/* EXPORT */\n/* harmony default export */ var dist_tokenizer = (tokenizer);\n\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/parse.js\n/* IMPORT */\n\n\nconst { SELECTOR: parse_SELECTOR, BODY_START: parse_BODY_START, BODY_END: parse_BODY_END } = TOKEN_TYPE;\n/* HELPERS */\nconst getNodeBody = (node, css) => {\n    const { children } = node;\n    let body = '';\n    let start = node.bodyIndex;\n    for (let i = 0, l = children.length; i < l; i++) {\n        const child = children[i];\n        body += css.slice(start, child.index);\n        start = child.indexEnd + 1;\n    }\n    body += css.slice(start, node.bodyIndexEnd);\n    return body;\n};\n/* MAIN */\nconst parse_parse = (css) => {\n    const tokens = dist_tokenizer(css);\n    const AST = { parent: null, children: [] };\n    let parent = AST;\n    let index = 0;\n    while (true) {\n        if (!parent)\n            throw new Error('Parent node not found');\n        const token = tokens[index];\n        if (!token)\n            break;\n        if (token.type === parse_SELECTOR) {\n            const tokenBodyStart = tokens[index + 1];\n            if (!tokenBodyStart || tokenBodyStart.type !== parse_BODY_START)\n                throw new Error('Found \"selector\" token without expected subsequent \"body_start\" token');\n            const node = {\n                parent,\n                index: token.index,\n                indexEnd: -1,\n                selector: token.selector,\n                selectorIndex: token.index,\n                selectorIndexEnd: token.indexEnd,\n                body: '',\n                bodyIndex: tokenBodyStart.index,\n                bodyIndexEnd: -1,\n                children: []\n            };\n            parent.children.push(node);\n            parent = node;\n            index += 2;\n        }\n        else if (token.type === parse_BODY_END) {\n            const node = parent; //TSC\n            node.indexEnd = token.index + 1;\n            node.bodyIndexEnd = token.index;\n            node.body = getNodeBody(node, css);\n            parent = node.parent;\n            index += 1;\n        }\n        else {\n            throw new Error(`Unexpected token of type: \"${token.type}\"`);\n        }\n    }\n    return AST;\n};\n/* EXPORT */\n/* harmony default export */ var dist_parse = (parse_parse);\n\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/stringify.js\n/* IMPORT */\n/* HELPERS */\nconst stringifyNode = (node) => {\n    return `${node.selector}{${node.body}${stringifyChildren(node.children)}}`;\n};\nconst stringifyChildren = (children) => {\n    let css = '';\n    for (let i = 0, l = children.length; i < l; i++) {\n        css += stringifyNode(children[i]);\n    }\n    return css;\n};\n/* MAIN */\nconst stringify = (ast) => {\n    return stringifyChildren(ast.children);\n};\n/* EXPORT */\n/* harmony default export */ var dist_stringify = (stringify);\n\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/traverse.js\n/* IMPORT */\n/* MAIN */\nconst traverse = (ast, fn) => {\n    const { children } = ast;\n    for (let i = 0, l = children.length; i < l; i++) {\n        const node = children[i];\n        fn(node);\n        traverse(node, fn);\n    }\n};\n/* EXPORT */\n/* harmony default export */ var dist_traverse = (traverse);\n\n// CONCATENATED MODULE: ./node_modules/css-simple-parser/dist/index.js\n/* IMPORT */\n\n\n\n/* MAIN */\nconst Parser = { parse: dist_parse, stringify: dist_stringify, traverse: dist_traverse };\n/* EXPORT */\n/* harmony default export */ var css_simple_parser_dist = (Parser);\n\n// CONCATENATED MODULE: ./node_modules/css-flatten/dist/resolve.js\n/* MAIN */\nconst Resolve = {\n    ampersand: (resolved, selector, parents) => {\n        for (let pi = 0, pl = parents.length; pi < pl; pi++) {\n            const temp = selector.replace('&', parents[pi]);\n            if (temp.indexOf('&') >= 0) { // Ampersand selector\n                Resolve.ampersand(resolved, temp, parents);\n            }\n            else { // Regular selector\n                resolved.push(temp);\n            }\n        }\n    },\n    selectors: (selectors, parents) => {\n        const resolved = [];\n        for (let i = 0, l = selectors.length; i < l; i++) {\n            const selector = selectors[i];\n            if (selector.indexOf('&') >= 0) { // Ampersand selector\n                Resolve.ampersand(resolved, selector, parents);\n            }\n            else { // Regular selector\n                for (let pi = 0, pl = parents.length; pi < pl; pi++) {\n                    resolved.push(`${parents[pi]} ${selector}`);\n                }\n            }\n        }\n        return resolved;\n    }\n};\n/* EXPORT */\n/* harmony default export */ var dist_resolve = (Resolve);\n\n// CONCATENATED MODULE: ./node_modules/css-flatten/dist/index.js\n/* IMPORT */\n\n\n/* MAIN */\nconst flatten = (css) => {\n    /* PARSING */\n    const AST = css_simple_parser_dist.parse(css);\n    /* RESOLVING SELECTORS */\n    const selectorsCache = new Map();\n    css_simple_parser_dist.traverse(AST, node => {\n        const { selector, parent } = node;\n        let selectors = selector.trim().split(/\\s*,\\s*/g); // Splitting and cleaning up\n        if ('selector' in parent) { // Regular node\n            selectors = dist_resolve.selectors(selectors, selectorsCache.get(parent) || []);\n            node.selector = selectors.join(',');\n        }\n        else { // Top-level node\n            if (selector.indexOf('&') >= 0)\n                throw new Error('Top-level ampersand placeholders are invalid');\n        }\n        selectorsCache.set(node, selectors);\n    });\n    /* FLATTENING */\n    const nodes = [];\n    css_simple_parser_dist.traverse(AST, node => {\n        if (!/\\S/.test(node.body))\n            return; // Ignoring empty blocks, nothing to output\n        nodes.push(node);\n    });\n    AST.children = nodes;\n    /* WIDOWING */\n    const empty = [];\n    for (let i = 0, l = nodes.length; i < l; i++) {\n        nodes[i].children = empty;\n    }\n    /* STRINGIFYING */\n    return css_simple_parser_dist.stringify(AST);\n};\n/* EXPORT */\n/* harmony default export */ var css_flatten_dist = (flatten);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-styles/styles.js\n\n\n\n\nvar styles_Styles = /*#__PURE__*/function () {\n  function Styles(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Styles);\n    this.app = app;\n    var styles = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.styles, params);\n    styles.params = extendedParams;\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"builder:ready\", function (e) {\n        styles.generateStyles();\n      });\n      app.data.myEvents.on(\"styles:regenerate\", function (e) {\n        styles.generateStyles(); //volá se z mergeAppContent\n      });\n    });\n  }\n  return createClass_default()(Styles, [{\n    key: \"generatestyleElement\",\n    value: function generatestyleElement(id, name, value, type, wrapper) {\n      // return value.replace(/^\\s*([\\w|\\s|\\.|]+){/gm, `${key} $1`);\n      // let css = `${type == \"local\" ? `#inner-` : `.inner-`}${key}{ ${value} }`;\n      var css = \"\";\n      if (type == \"local\") {\n        css = \"#inner-\".concat(id, \"{ \").concat(value, \"}\");\n      } else {\n        css = \".inner-\".concat(name, \"{\").concat(value, \"}\");\n      }\n      css = css_flatten_dist(css);\n      if (wrapper.length > 0) {\n        css = \"\".concat(wrapper, \"{ \").concat(css, \" }\");\n      }\n      return css;\n    }\n  }, {\n    key: \"generateStyles\",\n    value: function generateStyles() {\n      var app = this.app;\n      var data = this.params.data;\n      var styles = $$(\"head\").find(\".custom-styles-container\");\n      var styleEl = \"<style class=\\\"custom-styles-container\\\">\";\n      var sortedData = _.sortBy(data, function (o) {\n        return o.type;\n      });\n      sortedData = _.filter(sortedData, function (o) {\n        return !o.delted;\n      });\n      for (var i = 0; i < sortedData.length; i++) {\n        if (!data[i].deleted) {\n          var id = data[i].id;\n          var name = data[i].name;\n          var value = data[i].css;\n          var type = data[i].type;\n          var wrapper = data[i].wrappedBy;\n          var currCss = this.generatestyleElement(id, name, value, type, wrapper);\n          styleEl += currCss;\n          styleEl += \"\\n\";\n        }\n      }\n      styleEl += \"</style>\";\n      if (styles.length > 0) {\n        styles.remove();\n      }\n      // debugger;\n      $$(\"head\").append(styleEl);\n    }\n  }, {\n    key: \"deleteStyle\",\n    value: function deleteStyle(id) {\n      var app = this.app;\n      var data = this.params.data;\n      var styleToDel = _.findIndex(data, function (o) {\n        return o.id == id;\n      });\n      if (styleToDel >= 0) {\n        data[styleToDel].deleted = true;\n      }\n    }\n  }, {\n    key: \"updateStyle\",\n    value: function updateStyle(item, prop, value) {\n      item[prop] = value;\n      this.generateStyles();\n    }\n  }, {\n    key: \"createStyle\",\n    value: function createStyle(name) {\n      var data = this.params.data;\n      var app = this.app;\n      var styleId = app.utils.id(\"xxxx-xxxx-xxxx-xxxx\");\n      data.push({\n        styleId: styleId,\n        id: \"\",\n        name: name,\n        css: \"\",\n        type: \"global\",\n        deleted: false,\n        wrappedBy: \"\"\n      });\n      return styleId;\n    }\n    // updateStyle(id, name, css, type, wrappedBy) {\n    //   let app = this.app;\n    //   let data = this.params.data;\n    //   // debugger;\n    //   let findIndex = -1;\n\n    //   if (type == \"local\") {\n    //     findIndex = _.findIndex(data, (o) => {\n    //       return o.id == id && !o.deleted && o.wrappedBy == wrappedBy;\n    //     });\n    //   } else {\n    //     findIndex = _.findIndex(data, (o) => {\n    //       return (\n    //         o.name == name && o.id == \"\" && !o.deleted && o.wrappedBy == wrappedBy\n    //       );\n    //     });\n    //   }\n\n    //   if (findIndex >= 0) {\n    //     data[findIndex].css = css;\n    //   } else {\n    //     data.push({\n    //       id: id,\n    //       name: name,\n    //       css: css,\n    //       type: type,\n    //       deleted: false,\n    //       wrappedBy: \"\",\n    //     });\n    //   }\n\n    //   this.generateStyles();\n    // }\n  }]);\n}();\n/* harmony default export */ var builder_styles_styles = ({\n  name: \"styles\",\n  params: {\n    styles: {\n      data: []\n    }\n  },\n  static: {\n    Styles: styles_Styles\n  },\n  create: function create() {\n    var app = this;\n    app.styles = new styles_Styles(app);\n  },\n  clicks: {}\n});\n// EXTERNAL MODULE: ./node_modules/rollbar/dist/rollbar.umd.min.js\nvar rollbar_umd_min = __webpack_require__(\"./node_modules/rollbar/dist/rollbar.umd.min.js\");\nvar rollbar_umd_min_default = /*#__PURE__*/__webpack_require__.n(rollbar_umd_min);\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/error-handler/errorHandler.js\n\n\n\n\nvar errorHandler_ErrorHandler = /*#__PURE__*/function () {\n  function ErrorHandler(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, ErrorHandler);\n    this.app = app;\n    var errorHandler = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, params, app.params.errorHandler);\n    errorHandler.params = extendedParams;\n    this.rollbar = new rollbar_umd_min_default.a();\n    this.initErrorHandler = this.initErrorHandler.bind(this);\n    this.throwErrorTest = this.throwErrorTest.bind(this);\n    this.throwAxiosErrorTest = this.throwAxiosErrorTest.bind(this);\n    this.throwRollbarEvent = this.throwRollbarEvent.bind(this);\n    this.initErrorHandler();\n    app.data.myEvents.on(\"logged\", function () {\n      errorHandler.rollbar.configure({\n        payload: {\n          person: {\n            id: errorHandler.app.user.identity.id,\n            username: errorHandler.app.user.identity.name + \" \" + errorHandler.app.user.identity.surname,\n            email: errorHandler.app.user.identity.email\n          }\n        }\n      });\n    });\n\n    //pokud localhost neodesílat do Rollbar\n    if (location.hostname === \"localhost\" || location.hostname === \"127.0.0.1\") {\n      this.rollbar.configure({\n        enabled: false\n      });\n    }\n  }\n  return createClass_default()(ErrorHandler, [{\n    key: \"initErrorHandler\",\n    value: function initErrorHandler() {\n      this.rollbar.configure({\n        accessToken: \"80d302bafec44689a76849309506fd69\",\n        captureUncaught: true,\n        captureUnhandledRejections: true,\n        payload: {\n          environment: \"production\",\n          book: {\n            bookId: this.app.id,\n            bookName: this.app.book.params.nazevKnihy\n          }\n        }\n      });\n    }\n  }, {\n    key: \"throwRollbarEvent\",\n    value: function throwRollbarEvent(type, id, event) {\n      var specification = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"\";\n      var msg = event.message;\n      var spec = \"\";\n      if (specification.length > 0) {\n        spec = \"(\".concat(specification, \")\");\n      }\n      //Rollbar\n      switch (type) {\n        case \"critical\":\n          this.rollbar.critical(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n        case \"error\":\n          this.rollbar.error(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n        case \"warning\":\n          this.rollbar.warning(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n        case \"info\":\n          this.rollbar.info(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n        case \"debug\":\n          this.rollbar.debug(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n        default:\n          this.rollbar.debug(\"[\".concat(id, \"] \").concat(spec, \" \").concat(msg));\n          break;\n      }\n      console.info(\"|Rollbar| \".concat(type, \": [\").concat(id, \"] \").concat(spec, \" \").concat(msg));\n    }\n  }, {\n    key: \"throwErrorTest\",\n    value: function throwErrorTest() {\n      window.setTimeout(function () {\n        throw new Error();\n      }, 0);\n    }\n  }, {\n    key: \"throwAxiosErrorTest\",\n    value: function throwAxiosErrorTest() {\n      var app = this.app;\n      app.utils.axios.get(\"Unknown\").then(function (res) {});\n    }\n  }]);\n}();\n/* harmony default export */ var error_handler_errorHandler = ({\n  name: \"errorHandler\",\n  params: {\n    errorHandler: {\n      enabled: true\n    }\n  },\n  static: {\n    ErrorHandler: errorHandler_ErrorHandler\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      app.errorHandler = new errorHandler_ErrorHandler(app);\n    }\n  },\n  create: function create() {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-stats/stats.js\n\n\n\nfunction stats_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction stats_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? stats_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : stats_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\nvar stats_Stats = /*#__PURE__*/function () {\n  //Třída která by mohla být využívána pro zaznamenávání různých \"satistik\" - prozatím jen aktivní uživatelé\n  function Stats(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Stats);\n    this.app = app;\n    var stats = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.stats, params);\n    stats.params = extendedParams;\n    app.on(\"init\", function () {});\n    this.addUser = this.addUser.bind(this);\n    this.getAllUsers = this.getAllUsers.bind(this);\n    this.removeUser = this.removeUser.bind(this);\n    this.setInactive = this.setInactive.bind(this);\n    this.resetActivity = this.resetActivity.bind(this);\n  }\n\n  //Přidá záznam o uživateli, přiřadí mu barvu a nastaví timer aktivity\n  return createClass_default()(Stats, [{\n    key: \"addUser\",\n    value: function addUser(user) {\n      var _this = this;\n      //všechny dostupné barvy\n      var check = lodash_default.a.find(this.params.users, function (o) {\n        return o.id == user.id;\n      });\n      if (check == undefined) {\n        var colors = [\"red\", \"green\", \"blue\", \"orange\", \"purple\", \"cyan\", \"magenta\", \"teal\", \"brown\", \"maroon\", \"olive\", \"navy\"];\n\n        //vyfiltrovat již použité barvy\n        var usedColors = [];\n        this.params.users.forEach(function (user) {\n          usedColors.push(user.color);\n        });\n        var availableColors = lodash_default.a.cloneDeep(colors);\n        lodash_default.a.remove(availableColors, function (o) {\n          return usedColors.includes(o);\n        });\n\n        //pokud byly použity již všechny, použít jakoukoliv\n        if (availableColors.length == 0) {\n          availableColors = colors;\n        }\n\n        //objekt nového uživatele\n        var newUser = stats_objectSpread(stats_objectSpread({}, user), {}, {\n          color: availableColors[Math.floor(Math.random() * availableColors.length)],\n          active: true,\n          activityTimer: setTimeout(function () {\n            //nastaví se timer aktivity\n            _this.setInactive(user.id);\n          }, this.params.timeoutTime)\n        });\n        this.params.users.push(newUser);\n\n        //event na propsání změn\n        // timeout, protože po nastartování knihy stránky nemusí být ještě načtená spodní lišta\n        setTimeout(function () {\n          _this.app.data.myEvents.emit(\"stats:usersChanged\");\n        }, 500);\n      }\n    }\n\n    //odebrání uživatele, pokud opustí knihu\n  }, {\n    key: \"removeUser\",\n    value: function removeUser(user) {\n      lodash_default.a.remove(this.params.users, function (o) {\n        return o.id == user.id;\n      });\n      this.app.data.myEvents.emit(\"stats:usersChanged\");\n    }\n    //nastaví neaktivitu uživatele\n  }, {\n    key: \"setInactive\",\n    value: function setInactive(id) {\n      var index = lodash_default.a.findIndex(this.params.users, function (o) {\n        return o.id == id;\n      });\n      if (index != -1) {\n        this.params.users[index].active = false;\n        this.app.data.myEvents.emit(\"stats:usersChanged\");\n      }\n    }\n    //Nastaví aktivitu uživateli a vyresetuje timer\n  }, {\n    key: \"resetActivity\",\n    value: function resetActivity(id) {\n      var _this2 = this;\n      var index = lodash_default.a.findIndex(this.params.users, function (o) {\n        return o.id == id;\n      });\n      if (index != -1) {\n        this.params.users[index].active = true;\n        clearTimeout(this.params.users[index].activityTimer);\n        this.params.users[index].activityTimer = setTimeout(function () {\n          _this2.setInactive(id);\n        }, this.params.timeoutTime), this.app.data.myEvents.emit(\"stats:usersChanged\");\n      }\n    }\n    //vrací všechny uživatele, kteří mají knihu otevřenou\n  }, {\n    key: \"getAllUsers\",\n    value: function getAllUsers() {\n      return this.params.users;\n    }\n  }]);\n}();\n/* harmony default export */ var builder_stats_stats = ({\n  name: \"Stats\",\n  params: {\n    stats: {\n      users: [],\n      // timeoutTime: 600000, //10 minut\n      timeoutTime: 60000 //1min\n    }\n  },\n  static: {\n    Stats: stats_Stats\n  },\n  create: function create() {\n    var app = this;\n    app.stats = new stats_Stats(app);\n  },\n  clicks: {}\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-offline/templates/access-denied.f7.html\n/* harmony default export */ var access_denied_f7 = ({\n  data: function (e, page) {\n    let app = this.$app;\n    return {};\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n    }\n  },\n  id: '76112b7562',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n  \\n      <div class=\"navbar\">\\n        <div class=\"navbar-bg\"></div>\\n        <div class=\"navbar-inner sliding\">\\n          <!-- <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('offline:access'), ctx_1);\n      r += '</div> -->\\n          <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('offline:accessDenied'), ctx_1);\n      r += '</div>\\n          <div class=\"right\"></div>\\n        </div>\\n      </div>\\n  \\n  \\n      <div class=\"page-content \">\\n  \\n        <div class=\"master-access\">\\n            <h1>';\n      r += c(ctx_1.$app.translation.t('offline:accessDenied'), ctx_1);\n      r += '</h1>\\n            <p><strong>';\n      r += c(ctx_1.$app.translation.t('offline:licenseMissing'), ctx_1);\n      r += '</strong></p>\\n            <p>';\n      r += c(ctx_1.$app.translation.t('offline:accessWrong'), ctx_1);\n      r += '</p>\\n        </div>\\n      </div>\\n  </div></body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n[data-f7-76112b7562] .master-access {\n    top: 50%;\n    position: relative;\n    height: 350px;\n    margin-top: -239px;\n    text-align: center;\n  }\n  `,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"offline:accessDenied\")}} {{$app.translation.t(\"offline:accessDenied\")}} {{$app.translation.t(\"offline:licenseMissing\")}} {{$app.translation.t(\"offline:accessWrong\")}} `\n});\n// CONCATENATED MODULE: ./src/core/custom_plugins/builder-offline/offline.js\n\n\n\nfunction offline_createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = offline_unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction offline_unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return offline_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? offline_arrayLikeToArray(r, a) : void 0; } }\nfunction offline_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n\n\n\n\nvar offline_Offline = /*#__PURE__*/function () {\n  function Offline(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    classCallCheck_default()(this, Offline);\n    this.app = app;\n    var offline = this;\n    var extendedParams = utils[\"default\"].extend({\n      on: {}\n    }, app.params.offline, params);\n    offline.params = extendedParams;\n    app.on(\"init\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4() {\n      var response, assets, bookUrl, size, _iterator, _step, _loop, canAccess;\n      return regenerator_default.a.wrap(function _callee4$(_context5) {\n        while (1) switch (_context5.prev = _context5.next) {\n          case 0:\n            // book-admin/comparison/\n\n            // //Safari disable\n            // let chromeAgent = navigator.userAgent.indexOf(\"Chrome\") > -1;\n            // let safariAgent = navigator.userAgent.indexOf(\"Safari\") > -1;\n\n            // if (chromeAgent && safariAgent) safariAgent = false;\n\n            // if (!app.browserSupport.params.isSupported) {\n            //   offline.params.enabled = false;\n            // }\n            //Safari disable\n\n            app.data.myEvents.on(\"logged\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee() {\n              return regenerator_default.a.wrap(function _callee$(_context) {\n                while (1) switch (_context.prev = _context.next) {\n                  case 0:\n                    offline.updateAccessListDb();\n                  case 1:\n                  case \"end\":\n                    return _context.stop();\n                }\n              }, _callee);\n            })));\n            app.data.myEvents.on(\"user:logout\", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2() {\n              return regenerator_default.a.wrap(function _callee2$(_context2) {\n                while (1) switch (_context2.prev = _context2.next) {\n                  case 0:\n                    offline.removeAccessListDb();\n                  case 1:\n                  case \"end\":\n                    return _context2.stop();\n                }\n              }, _callee2);\n            })));\n            if (!offline.params.enabled) {\n              _context5.next = 35;\n              break;\n            }\n            app.on(\"connection\", function (isOnline) {\n              if (isOnline) {\n                //console.log(\"app is online now\");\n              } else {\n                app.data.myEvents.emit(\"offline:chacheStateChanged\", \"offline\");\n              }\n            });\n            if (!navigator.onLine) {\n              _context5.next = 35;\n              break;\n            }\n            _context5.next = 7;\n            return app.utils.axios.get(app.apiManager.params.psCheckBookHash);\n          case 7:\n            response = _context5.sent;\n            if (!response) {\n              _context5.next = 35;\n              break;\n            }\n            offline.params.fileHash = response.data.data.hash;\n            offline.params.cacheName = \"book-\".concat(app.id);\n            assets = app.offline.params.bookFiles;\n            bookUrl = app.offline.params.indexBasePath;\n            size = 0;\n            if (!(assets && Array.isArray(assets))) {\n              _context5.next = 35;\n              break;\n            }\n            offline.params.fileArray.push({\n              url: bookUrl,\n              size: 0,\n              force: true,\n              hash: offline.params.fileHash,\n              expire: null\n            });\n            _iterator = offline_createForOfIteratorHelper(assets);\n            _context5.prev = 17;\n            _loop = /*#__PURE__*/regenerator_default.a.mark(function _loop() {\n              var asset, url, obj, find;\n              return regenerator_default.a.wrap(function _loop$(_context4) {\n                while (1) switch (_context4.prev = _context4.next) {\n                  case 0:\n                    asset = _step.value;\n                    url = asset.url;\n                    if (url.charAt(0) === \"/\") {\n                      url = url.replace(\"/\", \"\");\n                    }\n                    obj = {\n                      url: app.offline.params.filesBasePath + url,\n                      size: asset.size,\n                      force: false,\n                      hash: asset.hash,\n                      expire: null\n                    };\n                    find = lodash_default.a.find(offline.params.fileArray, function (o) {\n                      return o.url == obj.url;\n                    });\n                    if (!find) {\n                      offline.params.fileArray.push(obj);\n                      size += asset.size;\n                    }\n                  case 6:\n                  case \"end\":\n                    return _context4.stop();\n                }\n              }, _loop);\n            });\n            _iterator.s();\n          case 20:\n            if ((_step = _iterator.n()).done) {\n              _context5.next = 24;\n              break;\n            }\n            return _context5.delegateYield(_loop(), \"t0\", 22);\n          case 22:\n            _context5.next = 20;\n            break;\n          case 24:\n            _context5.next = 29;\n            break;\n          case 26:\n            _context5.prev = 26;\n            _context5.t1 = _context5[\"catch\"](17);\n            _iterator.e(_context5.t1);\n          case 29:\n            _context5.prev = 29;\n            _iterator.f();\n            return _context5.finish(29);\n          case 32:\n            // debugger;\n            offline.params.bookSize = size;\n\n            //console.log(\"REGISTERING SW IN BOOK\");\n            offline.registerServiceWorker();\n            app.data.myEvents.on(\"sw:active\", /*#__PURE__*/function () {\n              var _ref4 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee3(e) {\n                return regenerator_default.a.wrap(function _callee3$(_context3) {\n                  while (1) switch (_context3.prev = _context3.next) {\n                    case 0:\n                      _context3.next = 2;\n                      return offline.registerListeners();\n                    case 2:\n                      offline.checkCache();\n                    case 3:\n                    case \"end\":\n                      return _context3.stop();\n                  }\n                }, _callee3);\n              }));\n              return function (_x) {\n                return _ref4.apply(this, arguments);\n              };\n            }());\n          case 35:\n            if (!(!navigator.onLine && app.book.params.limited == 1 && app.book.params.limitationType != \"password\")) {\n              _context5.next = 40;\n              break;\n            }\n            _context5.next = 38;\n            return offline.checkIfCanAccess();\n          case 38:\n            canAccess = _context5.sent;\n            app.data.myEvents.emit(\"offline:access\", canAccess);\n          case 40:\n            app.translation.addResourceBundle(\"cs\", \"offline\", app.offline.params.lang.cs);\n            app.translation.addResourceBundle(\"en\", \"offline\", app.offline.params.lang.en);\n          case 42:\n          case \"end\":\n            return _context5.stop();\n        }\n      }, _callee4, null, [[17, 26, 29, 32]]);\n    })));\n    this.registerServiceWorker = this.registerServiceWorker.bind(this);\n    this.checkCache = this.checkCache.bind(this);\n    this.registerListeners = this.registerListeners.bind(this);\n    this.installCache = this.installCache.bind(this);\n    this.checkIfCanAccess = this.checkIfCanAccess.bind(this);\n    this.updateAccessListDb = this.updateAccessListDb.bind(this);\n    this.removeAccessListDb = this.removeAccessListDb.bind(this);\n  }\n  return createClass_default()(Offline, [{\n    key: \"removeAccessListDb\",\n    value: function () {\n      var _removeAccessListDb = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5() {\n        var self, app, request;\n        return regenerator_default.a.wrap(function _callee5$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              self = this;\n              app = this.app;\n              request = indexedDB.open(\"futurebooks\");\n              request.onsuccess = function (event) {\n                var db = event.target.result;\n                if (db.objectStoreNames.contains(\"count\")) {\n                  var transaction = db.transaction(\"count\", \"readwrite\");\n                  var objectStore = transaction.objectStore(\"count\");\n                  var clearData = objectStore.clear();\n                  clearData.onsuccess = function (event) {\n                    return true;\n                  };\n                } else {\n                  return false;\n                }\n              };\n            case 4:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee5, this);\n      }));\n      function removeAccessListDb() {\n        return _removeAccessListDb.apply(this, arguments);\n      }\n      return removeAccessListDb;\n    }()\n  }, {\n    key: \"updateAccessListDb\",\n    value: function () {\n      var _updateAccessListDb = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6() {\n        var self, app;\n        return regenerator_default.a.wrap(function _callee6$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              self = this;\n              app = this.app;\n              app.utils.axios.get(app.apiManager.params.psUserAccessData, {\n                headers: {\n                  Authorization: \"Bearer \" + app.user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              }).then(function (response) {\n                var data = response.data.data;\n                var request = indexedDB.open(\"futurebooks\");\n                request.onsuccess = function (event) {\n                  var db = event.target.result;\n                  if (db.objectStoreNames.contains(\"count\")) {\n                    var transaction = db.transaction(\"count\", \"readwrite\");\n                    var objectStore = transaction.objectStore(\"count\");\n                    var allKeyes = objectStore.getAllKeys();\n                    allKeyes.onsuccess = function (event) {\n                      var keysInDB = event.target.result;\n                      data.forEach(function (item) {\n                        objectStore.put({\n                          id: item.id,\n                          expire: item.date_to_timestamp\n                        }, item.id);\n                      });\n                      var keysToRemove = lodash_default.a.filter(keysInDB, function (key) {\n                        var find = lodash_default.a.find(data, function (o) {\n                          return o.id == key;\n                        });\n                        if (!find) return true;\n                        return false;\n                      });\n                      keysToRemove.forEach(function (key) {\n                        objectStore.delete(key);\n                      });\n                      transaction.oncomplete = function () {\n                        //console.log(\"Access keyes updated in database.\");\n                        return true;\n                      };\n                    };\n                  } else {\n                    return false;\n                  }\n                };\n              });\n            case 3:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee6, this);\n      }));\n      function updateAccessListDb() {\n        return _updateAccessListDb.apply(this, arguments);\n      }\n      return updateAccessListDb;\n    }()\n  }, {\n    key: \"checkIfCanAccess\",\n    value: function () {\n      var _checkIfCanAccess = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee7() {\n        var self, app;\n        return regenerator_default.a.wrap(function _callee7$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              self = this;\n              app = this.app;\n              return _context8.abrupt(\"return\", new Promise(function (resolve, reject) {\n                var request = indexedDB.open(\"futurebooks\");\n                request.onsuccess = function (event) {\n                  var db = event.target.result;\n                  if (db.objectStoreNames.contains(\"count\")) {\n                    var transaction = db.transaction(\"count\", \"readonly\");\n                    var objectStore = transaction.objectStore(\"count\");\n                    var allKeyes = objectStore.getAll();\n                    allKeyes.onsuccess = function (event) {\n                      var access = false;\n                      var valuesInDB = event.target.result;\n                      var valueFound = valuesInDB.some(function (value) {\n                        return value.id == app.id;\n                      });\n                      //console.log(\"valueFound\", valueFound, \"valueFound.expire\", valueFound.expire * 1000 >= Date.now())\n                      if (valueFound) {\n                        if (!valueFound.expire) {\n                          access = true;\n                        } else if (valueFound.expire * 1000 >= Date.now()) {\n                          access = true;\n                        }\n                      }\n                      //console.log(\"ACCESS\", access)\n                      resolve(access);\n                    };\n                  } else {\n                    resolve(false);\n                  }\n                };\n              }));\n            case 3:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee7, this);\n      }));\n      function checkIfCanAccess() {\n        return _checkIfCanAccess.apply(this, arguments);\n      }\n      return checkIfCanAccess;\n    }()\n  }, {\n    key: \"registerServiceWorker\",\n    value: function () {\n      var _registerServiceWorker = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee8() {\n        var self, app, registration;\n        return regenerator_default.a.wrap(function _callee8$(_context9) {\n          while (1) switch (_context9.prev = _context9.next) {\n            case 0:\n              self = this;\n              app = this.app;\n              if (!(\"serviceWorker\" in navigator)) {\n                _context9.next = 15;\n                break;\n              }\n              _context9.prev = 3;\n              _context9.next = 6;\n              return navigator.serviceWorker.register(app.offline.params.swUrl, {\n                scope: app.offline.params.swScope\n              });\n            case 6:\n              registration = _context9.sent;\n              if (registration.installing) {\n                //console.log(\"Service worker installing\");\n                self.swState = \"installing\";\n              } else if (registration.waiting) {\n                //console.log(\"Service worker installed\");\n                self.swState = \"installed\";\n              } else if (registration.active) {\n                //console.log(\"Service worker active\");\n                self.swState = \"active\";\n              }\n              app.data.myEvents.emit(\"sw:active\");\n              _context9.next = 15;\n              break;\n            case 11:\n              _context9.prev = 11;\n              _context9.t0 = _context9[\"catch\"](3);\n              self.swState = \"error\";\n              console.error(\"Registration failed with \".concat(_context9.t0));\n            case 15:\n            case \"end\":\n              return _context9.stop();\n          }\n        }, _callee8, this, [[3, 11]]);\n      }));\n      function registerServiceWorker() {\n        return _registerServiceWorker.apply(this, arguments);\n      }\n      return registerServiceWorker;\n    }()\n  }, {\n    key: \"registerListeners\",\n    value: function () {\n      var _registerListeners = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee9() {\n        var self, app;\n        return regenerator_default.a.wrap(function _callee9$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              self = this;\n              app = this.app;\n              navigator.serviceWorker.onmessage = function (event) {\n                if (event.data) {\n                  var data = event.data.data;\n                  var id = data.id;\n                  var res = null;\n                  if (id == app.id) {\n                    switch (event.data.type) {\n                      case \"CACHE_CHECKED\":\n                        self.params.cacheState = data.status;\n                        self.params.updateDate = data.data;\n                        //console.log(data.status, \"CACHE_CHECKED return\");\n                        app.data.myEvents.emit(\"offline:chacheStateChanged\", data.status);\n                        switch (data.status) {\n                          case \"update\":\n                            self.installCache(data.data, \"update\");\n                            break;\n                          case \"expired\":\n                            break;\n                          case \"none\":\n                          case \"installed\":\n                            break;\n                        }\n                        break;\n                      case \"INSTALL_CACHE_MESSAGE_STATUS_DONE\":\n                        var fileDone = lodash_default.a.find(self.params.fileArray, function (o) {\n                          return o.url == data.url;\n                        });\n                        if (fileDone) {\n                          app.data.myEvents.emit(\"offline:fileDone\", fileDone.size);\n                          self.params.downloadedSize += fileDone.size;\n                          //console.log(\"DONE_URL\", data);\n                          var isOnline = navigator.onLine;\n                          navigator.serviceWorker.ready.then(function (worker) {\n                            worker.active.postMessage({\n                              type: \"WAKE_UP\",\n                              data: {\n                                isOnline: isOnline,\n                                bookId: app.id\n                              }\n                            });\n                            //console.log(\"Wake up call\");\n                          });\n                        }\n                        break;\n                      case \"INSTALL_CACHE_MESSAGE\":\n                        if (data.msg == \"started\") {\n                          app.data.myEvents.emit(\"offline:installing\", true);\n                        }\n                        if (data.msg == \"finished\") {\n                          app.data.myEvents.emit(\"offline:installing\", false);\n                          self.params.cacheState = \"installed\";\n                          app.data.myEvents.emit(\"offline:chacheStateChanged\", self.params.cacheState);\n                        }\n                        break;\n                      case \"ABORTED\":\n                        self.params.cacheState = \"none\";\n                        //console.log(\"ABORTED DOWNLOAD\");\n                        app.data.myEvents.emit(\"offline:aborted\", self.params.cacheState);\n                        break;\n                      case \"CACHE_DELETED\":\n                        app.dialog.alert(\"Kniha byla vymazána z lokální paměti.\", \"Data byly smazány.\");\n                        self.params.cacheState = \"none\";\n                        app.data.myEvents.emit(\"offline:chacheStateChanged\", self.params.cacheState);\n                        break;\n                      default:\n                        break;\n                    }\n                  }\n                }\n              };\n            case 3:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee9, this);\n      }));\n      function registerListeners() {\n        return _registerListeners.apply(this, arguments);\n      }\n      return registerListeners;\n    }()\n  }, {\n    key: \"installCache\",\n    value: function installCache() {\n      var installData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"install\";\n      var self = this;\n      var app = this.app;\n      var array = [];\n      var toDownload = [];\n      app.offline.params.fileArray.forEach(function (o) {\n        array.push(o.url);\n      });\n      if (!installData) {\n        toDownload = app.offline.params.fileArray;\n      } else {\n        toDownload = installData;\n      }\n      var totalSize = toDownload.reduce(function (accumulator, currentValue) {\n        return accumulator + currentValue.size;\n      }, 0);\n      navigator.serviceWorker.ready.then(function (worker) {\n        worker.active.postMessage({\n          type: \"INSTALL_CACHE\",\n          data: {\n            status: status,\n            bookId: app.id,\n            fileArray: toDownload,\n            size: totalSize\n          }\n        });\n      });\n    }\n  }, {\n    key: \"abort\",\n    value: function abort() {\n      var self = this;\n      var app = this.app;\n      navigator.serviceWorker.ready.then(function (worker) {\n        if (worker) {\n          worker.active.postMessage({\n            type: \"ABORT\",\n            data: {\n              bookId: app.id\n            }\n          });\n        }\n      });\n    }\n  }, {\n    key: \"checkCache\",\n    value: function checkCache() {\n      var self = this;\n      var app = this.app;\n      navigator.serviceWorker.ready.then(function (worker) {\n        //console.log(worker, \"WORKER\");\n        worker.active.postMessage({\n          type: \"CHECK_CACHE\",\n          data: {\n            bookId: app.id,\n            fileArray: app.offline.params.fileArray\n          }\n        });\n      });\n    }\n  }, {\n    key: \"deleteCache\",\n    value: function deleteCache() {\n      var self = this;\n      var app = this.app;\n      navigator.serviceWorker.ready.then(function (worker) {\n        worker.active.postMessage({\n          type: \"DELETE_CACHE\",\n          data: {\n            bookId: app.id\n          }\n        });\n      });\n    }\n  }]);\n}();\n/* harmony default export */ var builder_offline_offline = ({\n  name: \"Offline\",\n  params: {\n    offline: {\n      enabled: false,\n      filesBasePath: \"\",\n      swState: \"\",\n      cacheState: \"none\",\n      fileHash: \"\",\n      cacheName: \"\",\n      fileArray: [],\n      downloadedSize: 0,\n      bookSize: 0,\n      bookFiles: [],\n      swUrl: \"\",\n      swScope: \"/book/\",\n      lang: {\n        cs: {\n          title: \"Offline čtení\",\n          description: \"Tento n\\xE1stroj V\\xE1m umo\\u017En\\xED ulo\\u017Eit si Va\\u0161i knihu do prohl\\xED\\u017Ee\\u010De. To V\\xE1m umo\\u017En\\xED ji pozd\\u011Bji otev\\u0159\\xEDt a \\u010D\\xEDst i kdy\\u017E nebudete p\\u0159ipojen\\xED k internetu, v\\u010Detn\\u011B obr\\xE1zk\\u016F a dal\\u0161\\xEDch p\\u0159\\xEDloh.\\n          Pokud kniha obsahuje videa, tak budou ulo\\u017Eena v nejmen\\u0161\\xEDm mo\\u017En\\xE9m rozli\\u0161en\\xED.\\n          Abyste svoji knihu pozd\\u011Bji snadno na\\u0161li, doporu\\u010Dujeme si ji p\\u0159idat do z\\xE1lo\\u017Eek prohl\\xED\\u017Ee\\u010De, nebo otev\\u0159\\xEDt adresu knihovny.\\n          \\n\\n          V\\xEDce v <a target=\\\"_blank\\\" class=\\\"link external\\\" href=\\\"https://futurebooks.cz/clanky/jak-ulozit-knihu-do-zarizeni-aby-ji-bylo-mozne-cist-offline\\\">\\u010Cl\\xE1nku o Offline \\u010Dten\\xED</a>.\",\n          usage: \"Využítí uložistě\",\n          used: \"Využito\",\n          available: \"Dostupné\",\n          max: \"Celkově\",\n          cancel: \"Přerušit stahování\",\n          action: \"Akce offline knihy\",\n          saving: \"Probíhá ukládání...\",\n          download: \"Stáhnout knihu\",\n          remove: \"Smazat soubory knihy\",\n          availableToDownload: \"Kniha je dostupná offline\",\n          accessDenied: \"Přístup zamítnut\",\n          licenseMissing: \"K této knize nevlastníte licenci.\",\n          accessWrong: \"Pokud si myslíte, že se jedná o chybu. Zkuste se v online režimu opětovně přihlásit nebo kontaktujte podporu.\"\n        },\n        en: {\n          title: \"Read offline\",\n          description: \"This tool allows you to save your book to your browser. This allows you to open it later and read it\\n          even when you are not connected to the Internet, including pictures and other attachments. There are no\\n          support for videos in offline version. If you want your book offline with videos, we recommend to use our mobile apps.\\n          To find your saved offline book later, we recomend to add it into your browser booksmark.\",\n          usage: \"Storage usage\",\n          used: \"Used\",\n          available: \"Available\",\n          max: \"Total\",\n          cancel: \"Cancel download\",\n          action: \"Offline reading actions\",\n          saving: \"Saving...\",\n          download: \"Download book\",\n          remove: \"Remove book files\",\n          availableToDownload: \"Already saved for offline use\",\n          accessDenied: \"Access Denied\",\n          licenseMissing: \"You don't own licese to this book.\",\n          accessWrong: \"If you think this is a mistake. Try logging back in online or contact support.\"\n        }\n      }\n    }\n  },\n  static: {\n    Offline: offline_Offline\n  },\n  create: function create() {\n    var app = this;\n    app.offline = new offline_Offline(app);\n    app.routes.push({\n      name: \"Přístup odepřen\",\n      path: \"/access-denied\",\n      component: access_denied_f7\n    });\n  },\n  clicks: {}\n});\n// EXTERNAL MODULE: ./src/core/custom_plugins/builder-mind-maps/mm-comp.js\nvar mm_comp = __webpack_require__(\"./src/core/custom_plugins/builder-mind-maps/mm-comp.js\");\n\n// CONCATENATED MODULE: ./src/core/builder-book.js\n/**\r\n * Framework7 5.2.0\r\n * Full featured mobile HTML framework for building iOS & Android apps\r\n * http://framework7.io/\r\n *\r\n * Copyright 2014-2019 Vladimir Kharlampidi\r\n *\r\n * Released under the MIT License\r\n *\r\n * Released on: December 8, 2019\r\n */\n\n\n\n\n// F7 Class\n\n\n// Import Helpers\n\n\n\n\n\n// Core Modules\n\n\n\n\n\n\n\n\n //NO_LITE\n //NO_LITE\n //NO_LITE\n\n\n\n// Core Components\n\n\n\n\n\n\n\n //NO_LITE\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import Vi from \"framework7-v575/components/vi/vi\";\n\nif (false) {}\n\n// Install Core Modules & Components\nrouter_class.use([\n//NO_LITE\ntemplate_loader,\n//NO_LITE\ncomponent_loader //NO_LITE\n]); //NO_LITE\n\napp_class.use([device_device, support_support, utils_utils, resize_resize, request_request, touch_touch, clicks, router_router, history_history, component_component,\n//NO_LITE\nservice_worker, statusbar, view_view, navbar, toolbar, subnavbar_subnavbar, touch_ripple, modal_modal, appbar, dialog_dialog, popup_popup, login_screen, popover_popover, actions_actions, sheet_sheet, toast_toast, preloader_preloader, progressbar, sortable_sortable, swipeout_swipeout, accordion, contacts_list, virtual_list, list_index, timeline, tabs, panel_panel, card, chip_chip, form_form, input_input, checkbox_checkbox, radio_radio, toggle_toggle, range_range, stepper_stepper, smart_select, grid, calendar_calendar, picker_picker, infinite_scroll, pull_to_refresh, lazy, data_table, fab_fab, searchbar, messages, messagebar_messagebar, swiper_swiper, photo_browser, notification_notification, autocomplete, tooltip_tooltip, gauge_gauge, skeleton, menu_menu, color_picker, treeview, text_editor, elevation, typography_typography]);\n\n// SR Components\n\n// SR Components\n\n\n\n\n\n// import AudioPlayer from \"./custom_plugins/audio-player/audio-player\"; player pro starou knihu\n\n\n\n\n// import Grid from \"framework7-v575/components/grid/grid\";\n\napp_class.use([translation[\"default\"], book_navigation[\"default\"], builder_citations_citations, search_search,\n// AudioPlayer,\npopover_with_data_popover_with_data, book_navbar_bookNavbar, book_settings_bookSettings, builder_audio_player_builder_audio_player]);\n\n\n\n\n\n\n\n\n//\n //3MB\n\n/*async function loadBuilder() {\r\n  try {\r\n    const lessModule = await import(/!* webpackChunkName: \"builder\" *!/'./custom_plugins/builder/builder');\r\n    // LESS soubor byl úspěšně načten, můžete provést další akce\r\n  } catch (error) {\r\n    console.error('Chyba při načítání LESS souboru:', error);\r\n  }\r\n}\r\n\r\nlet Builder = loadBuilder(); 5MB + 5 MB */\n\n\n\n\n //0.6 MB\n\n\n\n //0.1MB\n //0.1MB\n //1.85 MB\n\n\n //0.1 MB\n\n\napp_class.use([error_handler_errorHandler, book_book[\"default\"], browser_support, api_manager_apiManager, database_database, user_user, websocket, reading_position, gallery[\"default\"], video_player[\"default\"], builder_builder, highlights_comments_highlights_comments, iframe_message, builder_dictionary_dictionary, builder_typography_typography, builder_equation_equation, builder_icons_icons, custom_plugins_builder_colors_colors, builder_styles_styles, builder_link_link, music_sheet, page_height_checker, builder_stats_stats, builder_offline_offline]);\n\napp_class.use([mm_comp[\"default\"]]);\n\n/* harmony default export */ var core_builder_book = (app_class);\n// EXTERNAL MODULE: ./src/core/utils-extend/utils-extend-2.js\nvar utils_extend_2 = __webpack_require__(\"./src/core/utils-extend/utils-extend-2.js\");\n\n// EXTERNAL MODULE: ./src/core/css/core-entry.less\nvar core_entry = __webpack_require__(\"./src/core/css/core-entry.less\");\n\n// CONCATENATED MODULE: ./src/core/app.f7.html\n/* harmony default export */ var app_f7 = ({\n  data() {\n    let basePath = './static';\n    if (true) {\n      basePath = './' + \"app_builder_new_en\" + '/static';\n    }\n    let app = this.$app;\n    return {\n      bookNavbarParams: app.bookNavbar.params,\n      basePath: basePath\n    };\n  },\n  methods: {\n    login() {\n      this.$setState({ loggedIn: true });\n    },\n    logout() {\n      this.$setState({ loggedIn: false });\n    }\n  },\n  id: 'e0a80e06db',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div id=\"app\" class=\"color-theme-cvut\">\\n\\n    <div id=\"fb-panel-left\" class=\"panel panel-left panel-cover panel-resizable panel-init\">\\n      <div class=\"view  view-left\" name=\"left\">\\n      </div>\\n    </div>\\n\\n    <div id=\"fb-panel-right\" class=\"panel panel-right panel-reveal panel-resizable panel-init\">\\n      <div class=\"view  view-right\" name=\"right\">\\n      </div>\\n    </div>\\n    <div class=\"view view-main ios-edges\"></div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  styleScoped: false,\n  cleanText: ` `\n});\n// CONCATENATED MODULE: ./src/core/core.js\n\n\n//TODO implementace analitik https://getanalytics.io/plugins/perfumejs/\n\n// import Framework7, { Template7, Dom7, Request, Utils, Device, Support } from './vendor/framework7.esm.bundle.v4.4.3.js';\n// import \"./framework7.v5.2.less\";\n\n\nwindow.$$ = dom7_module[\"default\"];\nwindow.Dom7 = dom7_module[\"default\"];\nwindow.Template7 = template7_esm[\"default\"];\nwindow.Framework7 = core_builder_book;\n\n// STYLES\n// import './vendor/framework7.v4.4.3.less';\n\n\n\n// SCRIPTS\n\n// import  routes  from './js/routes.js';\n// import './js/partials.js';\n// import Impressum from \"../books/zdrv_1_virus_builder/02_impressum.f7.html\";\n\nvar myEvents = new core_builder_book.Events();\n\nvar core_Book = /*#__PURE__*/function () {\n  function Book() {\n    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    classCallCheck_default()(this, Book);\n    var book = this;\n    book.params = params;\n    // debugger\n\n    this.pushState = true;\n    this.getApp = true;\n    if (true) {\n      this.basePath = \"./\" + \"app_builder_new_en\" + \"/static\";\n    } else {}\n\n    //futurebooks.cz/books/<nazev>/get-settings\n\n    book.app = book.init();\n    if (true) {\n      window.xapp = book.app;\n      window.book = book;\n    }\n    console.info(\"[Book] App init\");\n    return book.app;\n\n    // Perform other work here ...\n\n    // Set another completion function for the request above\n  }\n  return createClass_default()(Book, [{\n    key: \"init\",\n    value: function init() {\n      var bookContext = this;\n      var f7Settings = {\n        component: app_f7,\n        id: null,\n        root: \"#app\",\n        iosDynamicNavbar: false,\n        view: {\n          pushState: false,\n          pushStateSeparator: \"?\",\n          pushStateRoot: location.href.split(\"?\")[0],\n          //location.href.split('/c/')[0],//location.href.split(location.host)[1].split('/kniha')[0]//'http://localhost:8080/',\n          pushStateOnLoad: false\n        },\n        highlightComments: {\n          autostart: true\n        },\n        clicks: {\n          externalLinks: \".external\"\n        },\n        methods: {\n          // test: function () {\n          //   alert(\"ok\");\n          // },\n          // getSlideByUrl: function (url) {\n          //   return bookContext.getSlideByUrl(url)\n          // },\n          // getSlideIndexByUrl: function (url) {\n          //   return bookContext.getSlideIndexByUrl(url)\n          // },\n          // getUser: function () {\n          //   return bookContext.app.user;\n          // },\n          // getBookChaptersFlatten: function () {\n          //   return bookContext.getBookChaptersFlatten()\n          // },\n          // getBookChaptersTree: function () {\n          //   return bookContext.getBookChaptersTree()\n          // }\n          // ,\n          // getBookChaptersInactive: function () {\n          //   return bookContext.getBookChaptersInactive()\n          // },\n          // addToBookChapters: function (bookChapters) {\n          //   return  bookContext.bookChapters = bookContext.addToBookChapters(bookChapters)\n          // },\n          // getChaptersUrl: function () {\n          //   return bookContext.getChaptersUrl();\n          // },\n          // preloadViews(swiper, force = false, init = false){\n          //   return bookContext.preloadViews(swiper, force = false, init = false);\n          // }\n        },\n        data: function data() {\n          return {\n            basePath: bookContext.basePath,\n            citationsData: bookContext.citationsData,\n            isLogged: false,\n            myEvents: myEvents,\n            development: true,\n            backTolibraryButton: false\n          };\n        },\n        theme: \"md\",\n        touch: {\n          touchClicksDistanceThreshold: 20\n        },\n        // routes: routes,//.concat(bookContext.xa),\n        on: {\n          init: function init(f) {},\n          pageInit: function pageInit(page) {}\n        }\n        //TODO my way\n        // panel: {\n        //   leftBreakpoint: 960,\n        // },\n      };\n\n      // let fu = f7Settings;\n      // debugger\n      core_builder_book.utils.extend(f7Settings, bookContext.params);\n      // let fu2 = f7Settings;\n\n      this.app = new core_builder_book(f7Settings);\n      Object(utils_extend_2[\"initUtils2\"])(this.app);\n      return this.app;\n    }\n\n    //Jenom kvůli zpětné kompatibilitě\n  }, {\n    key: \"getApp\",\n    value: function getApp() {\n      return this.app;\n    }\n  }]);\n}(); // window.Book = Book;\nvar FB = {};\nFB.Book = core_Book;\nFB.Framework7 = core_builder_book;\nFB.Template7 = template7_esm[\"default\"];\nFB.Dom7 = dom7_module[\"default\"];\nFB.Request = utils_request;\nFB.Utils = utils[\"default\"];\nFB.Device = device[\"default\"];\nFB.Support = utils_support[\"default\"];\nFB.Component = component_class;\n\n// let FutureBooks = function (version = \"v1\") {\n//   return new Promise(function (resolve, reject) {\n//     resolve(FB);\n//   });\n// };\n\n/* harmony default export */ var core = __webpack_exports__[\"default\"] = (FB);\n\n//# sourceURL=webpack://futureBooks/./src/core/core.js_+_565_modules?");

/***/ }),

/***/ "./src/core/css/core-entry.less":
/*!**************************************!*\
  !*** ./src/core/css/core-entry.less ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/css/core-entry.less?");

/***/ }),

/***/ "./src/core/custom_plugins/book-navigation/6_highlight-v5.js":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/book-navigation/6_highlight-v5.js ***!
  \*******************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var dom7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7 */ \"./node_modules/dom7/dist/dom7.module.js\");\n\n\n/**\r\n * Created by stejsi on 26.08.16.\r\n */\n\n/*\r\n\r\n highlight v5\r\n\r\n Highlights arbitrary terms.\r\n\r\n <http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>\r\n\r\n MIT license.\r\n\r\n Johann Burkard\r\n <http://johannburkard.de>\r\n <mailto:jb@eaio.com>\r\n\r\n */\n\n// Remove Diacritics\nvar defaultDiacriticsRemovalap = [{\n  base: \"A\",\n  letters: \"A\\u24B6\\uFF21\\xC0\\xC1\\xC2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\xC3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\xC4\\u01DE\\u1EA2\\xC5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F\"\n}, {\n  base: \"AA\",\n  letters: \"\\uA732\"\n}, {\n  base: \"AE\",\n  letters: \"\\xC6\\u01FC\\u01E2\"\n}, {\n  base: \"AO\",\n  letters: \"\\uA734\"\n}, {\n  base: \"AU\",\n  letters: \"\\uA736\"\n}, {\n  base: \"AV\",\n  letters: \"\\uA738\\uA73A\"\n}, {\n  base: \"AY\",\n  letters: \"\\uA73C\"\n}, {\n  base: \"B\",\n  letters: \"B\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181\"\n}, {\n  base: \"C\",\n  letters: \"C\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\xC7\\u1E08\\u0187\\u023B\\uA73E\"\n}, {\n  base: \"D\",\n  letters: \"D\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\"\n}, {\n  base: \"DZ\",\n  letters: \"\\u01F1\\u01C4\"\n}, {\n  base: \"Dz\",\n  letters: \"\\u01F2\\u01C5\"\n}, {\n  base: \"E\",\n  letters: \"E\\u24BA\\uFF25\\xC8\\xC9\\xCA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\xCB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E\"\n}, {\n  base: \"F\",\n  letters: \"F\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B\"\n}, {\n  base: \"G\",\n  letters: \"G\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E\"\n}, {\n  base: \"H\",\n  letters: \"H\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D\"\n}, {\n  base: \"I\",\n  letters: \"I\\u24BE\\uFF29\\xCC\\xCD\\xCE\\u0128\\u012A\\u012C\\u0130\\xCF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197\"\n}, {\n  base: \"J\",\n  letters: \"J\\u24BF\\uFF2A\\u0134\\u0248\"\n}, {\n  base: \"K\",\n  letters: \"K\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2\"\n}, {\n  base: \"L\",\n  letters: \"L\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780\"\n}, {\n  base: \"LJ\",\n  letters: \"\\u01C7\"\n}, {\n  base: \"Lj\",\n  letters: \"\\u01C8\"\n}, {\n  base: \"M\",\n  letters: \"M\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C\"\n}, {\n  base: \"N\",\n  letters: \"N\\u24C3\\uFF2E\\u01F8\\u0143\\xD1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4\"\n}, {\n  base: \"NJ\",\n  letters: \"\\u01CA\"\n}, {\n  base: \"Nj\",\n  letters: \"\\u01CB\"\n}, {\n  base: \"O\",\n  letters: \"O\\u24C4\\uFF2F\\xD2\\xD3\\xD4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\xD5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\xD6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\xD8\\u01FE\\u0186\\u019F\\uA74A\\uA74C\"\n}, {\n  base: \"OI\",\n  letters: \"\\u01A2\"\n}, {\n  base: \"OO\",\n  letters: \"\\uA74E\"\n}, {\n  base: \"OU\",\n  letters: \"\\u0222\"\n}, {\n  base: \"OE\",\n  letters: \"\\x8C\\u0152\"\n}, {\n  base: \"oe\",\n  letters: \"\\x9C\\u0153\"\n}, {\n  base: \"P\",\n  letters: \"P\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754\"\n}, {\n  base: \"Q\",\n  letters: \"Q\\u24C6\\uFF31\\uA756\\uA758\\u024A\"\n}, {\n  base: \"R\",\n  letters: \"R\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782\"\n}, {\n  base: \"S\",\n  letters: \"S\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784\"\n}, {\n  base: \"T\",\n  letters: \"T\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786\"\n}, {\n  base: \"TZ\",\n  letters: \"\\uA728\"\n}, {\n  base: \"U\",\n  letters: \"U\\u24CA\\uFF35\\xD9\\xDA\\xDB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\xDC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244\"\n}, {\n  base: \"V\",\n  letters: \"V\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245\"\n}, {\n  base: \"VY\",\n  letters: \"\\uA760\"\n}, {\n  base: \"W\",\n  letters: \"W\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72\"\n}, {\n  base: \"X\",\n  letters: \"X\\u24CD\\uFF38\\u1E8A\\u1E8C\"\n}, {\n  base: \"Y\",\n  letters: \"Y\\u24CE\\uFF39\\u1EF2\\xDD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE\"\n}, {\n  base: \"Z\",\n  letters: \"Z\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762\"\n}, {\n  base: \"a\",\n  letters: \"a\\u24D0\\uFF41\\u1E9A\\xE0\\xE1\\xE2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\xE3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\xE4\\u01DF\\u1EA3\\xE5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250\"\n}, {\n  base: \"aa\",\n  letters: \"\\uA733\"\n}, {\n  base: \"ae\",\n  letters: \"\\xE6\\u01FD\\u01E3\"\n}, {\n  base: \"ao\",\n  letters: \"\\uA735\"\n}, {\n  base: \"au\",\n  letters: \"\\uA737\"\n}, {\n  base: \"av\",\n  letters: \"\\uA739\\uA73B\"\n}, {\n  base: \"ay\",\n  letters: \"\\uA73D\"\n}, {\n  base: \"b\",\n  letters: \"b\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253\"\n}, {\n  base: \"c\",\n  letters: \"c\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\xE7\\u1E09\\u0188\\u023C\\uA73F\\u2184\"\n}, {\n  base: \"d\",\n  letters: \"d\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A\"\n}, {\n  base: \"dz\",\n  letters: \"\\u01F3\\u01C6\"\n}, {\n  base: \"e\",\n  letters: \"e\\u24D4\\uFF45\\xE8\\xE9\\xEA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\xEB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD\"\n}, {\n  base: \"f\",\n  letters: \"f\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C\"\n}, {\n  base: \"g\",\n  letters: \"g\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F\"\n}, {\n  base: \"h\",\n  letters: \"h\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265\"\n}, {\n  base: \"hv\",\n  letters: \"\\u0195\"\n}, {\n  base: \"i\",\n  letters: \"i\\u24D8\\uFF49\\xEC\\xED\\xEE\\u0129\\u012B\\u012D\\xEF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131\"\n}, {\n  base: \"j\",\n  letters: \"j\\u24D9\\uFF4A\\u0135\\u01F0\\u0249\"\n}, {\n  base: \"k\",\n  letters: \"k\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3\"\n}, {\n  base: \"l\",\n  letters: \"l\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747\"\n}, {\n  base: \"lj\",\n  letters: \"\\u01C9\"\n}, {\n  base: \"m\",\n  letters: \"m\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F\"\n}, {\n  base: \"n\",\n  letters: \"n\\u24DD\\uFF4E\\u01F9\\u0144\\xF1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5\"\n}, {\n  base: \"nj\",\n  letters: \"\\u01CC\"\n}, {\n  base: \"o\",\n  letters: \"o\\u24DE\\uFF4F\\xF2\\xF3\\xF4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\xF5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\xF6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\xF8\\u01FF\\u0254\\uA74B\\uA74D\\u0275\"\n}, {\n  base: \"oi\",\n  letters: \"\\u01A3\"\n}, {\n  base: \"ou\",\n  letters: \"\\u0223\"\n}, {\n  base: \"oo\",\n  letters: \"\\uA74F\"\n}, {\n  base: \"p\",\n  letters: \"p\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755\"\n}, {\n  base: \"q\",\n  letters: \"q\\u24E0\\uFF51\\u024B\\uA757\\uA759\"\n}, {\n  base: \"r\",\n  letters: \"r\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783\"\n}, {\n  base: \"s\",\n  letters: \"s\\u24E2\\uFF53\\xDF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B\"\n}, {\n  base: \"t\",\n  letters: \"t\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787\"\n}, {\n  base: \"tz\",\n  letters: \"\\uA729\"\n}, {\n  base: \"u\",\n  letters: \"u\\u24E4\\uFF55\\xF9\\xFA\\xFB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\xFC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289\"\n}, {\n  base: \"v\",\n  letters: \"v\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C\"\n}, {\n  base: \"vy\",\n  letters: \"\\uA761\"\n}, {\n  base: \"w\",\n  letters: \"w\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73\"\n}, {\n  base: \"x\",\n  letters: \"x\\u24E7\\uFF58\\u1E8B\\u1E8D\"\n}, {\n  base: \"y\",\n  letters: \"y\\u24E8\\uFF59\\u1EF3\\xFD\\u0177\\u1EF9\\u0233\\u1E8F\\xFF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF\"\n}, {\n  base: \"z\",\n  letters: \"z\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763\"\n}];\nvar diacriticsMap = {};\nfor (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) {\n  var letters = defaultDiacriticsRemovalap[i].letters;\n  for (var j = 0; j < letters.length; j += 1) {\n    diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base;\n  }\n}\nfunction removeDiacritics(str) {\n  return str.replace(/[^\\u0000-\\u007E]/g, function (a) {\n    return diacriticsMap[a] || a;\n  });\n}\ndom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].fn.highlight = function (pat) {\n  var index2 = 0;\n  function innerHighlight(node, pat, index) {\n    var skip = 0;\n    if (node.nodeType == 3) {\n      var xdata = removeDiacritics(node.data).toUpperCase();\n      var pos = xdata.indexOf(pat);\n      pos -= xdata.substr(0, pos).length - node.data.substr(0, pos).length;\n      if (pos >= 0) {\n        index2 = index2 + 1;\n        var spannode = document.createElement(\"span\");\n        spannode.className = \"search-highlight idclass-\" + index2;\n        spannode.id = \"search-highlight-\" + index2;\n        spannode.setAttribute(\"data-pos\", index2);\n        var middlebit = node.splitText(pos);\n        var endbit = middlebit.splitText(pat.length);\n        var middleclone = middlebit.cloneNode(true);\n        spannode.appendChild(middleclone);\n        middlebit.parentNode.replaceChild(spannode, middlebit);\n        skip = 1;\n      }\n    } else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {\n      for (var i = 0; i < node.childNodes.length; ++i) {\n        i += innerHighlight(node.childNodes[i], pat, index);\n      }\n    }\n    return skip;\n  }\n  return this.length && pat && pat.length ? this.each(function (index) {\n    innerHighlight(this, removeDiacritics(pat).toUpperCase(), index);\n  }) : this;\n};\ndom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].fn.removeHighlight = function () {\n  return this.find(\"span.search-highlight\").each(function () {\n    this.parentNode.firstChild.nodeName;\n    var oldParent = this.parentNode;\n    this.parentNode.replaceChild(this.firstChild, this);\n    oldParent.normalize();\n  });\n};\n\n// Dom7.fn.removeHighlight = function () {\n//     return this.find(\"span.search-highlight\").each(function () {\n//         this.parentNode.firstChild.nodeName;\n//         with (this.parentNode) {\n//             replaceChild(this.firstChild, this);\n//             normalize();\n//         }\n//     }).end();\n// };\n//highlight\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book-navigation/6_highlight-v5.js?");

/***/ }),

/***/ "./src/core/custom_plugins/book-navigation/book-navigation.js":
/*!********************************************************************!*\
  !*** ./src/core/custom_plugins/book-navigation/book-navigation.js ***!
  \********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var dom7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7 */ \"./node_modules/dom7/dist/dom7.module.js\");\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var _search_toast_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./search-toast.less */ \"./src/core/custom_plugins/book-navigation/search-toast.less\");\n/* harmony import */ var _search_toast_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_search_toast_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _highlights_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./highlights.less */ \"./src/core/custom_plugins/book-navigation/highlights.less\");\n/* harmony import */ var _highlights_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_highlights_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _6_highlight_v5__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./6_highlight-v5 */ \"./src/core/custom_plugins/book-navigation/6_highlight-v5.js\");\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n\n\n\n\n// import {Navigation} from \"../../../../../vendor/libs_external/swiper/js/swiper.esm\";\n\nvar Navigation = {\n  scrollTo: function scrollTo(selector, speed, middle, highlight) {\n    // debugger;\n\n    var app = this;\n    var $page = app.view.main.$el;\n    var $selector = null;\n    if (selector instanceof jQuery) {\n      $selector = selector;\n    } else {\n      $selector = $page.find(selector);\n    }\n    app.on(\"init\", function (page) {});\n\n    //var $page = $(\"body\").find(\".swiper-slide-active\");\n    if (!$selector || $selector.length < 1) {\n      app.dialog.alert('Odkaz \"' + selector + '\" nenalezen.', \"Upozornění\");\n      return false;\n    }\n    window.yyy = $selector;\n    if (highlight) {\n      //Rozbalí accordion pokud je element uvnitř\n      var parentAcord = $selector.parents(\".accordion-item\");\n      if (parentAcord.length > 0) {\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(parentAcord).addClass(\"accordion-item-opened\");\n      }\n      $selector.addClass(\"time-highlight\");\n      setTimeout(function () {\n        $selector.removeClass(\"time-highlight\");\n      }, 5000);\n    }\n    var x = $selector.offset().top;\n    var y = $page.scrollTop();\n    var z = 0;\n    if (middle) {\n      z = window.innerHeight / 2;\n    }\n\n    // debugger\n    var finalPosition = x + y - z;\n    if (finalPosition < 0) {\n      // debugger\n      finalPosition = 0;\n    }\n    $page.scrollTop(finalPosition, speed);\n\n    //$page.animate({\n    //  scrollTop: $selector.offset().top + $page.scrollTop()\n    //}, 1000);\n  },\n  swipeTo: function swipeTo(slide) {\n    var skip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var highlight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  },\n  toggleClicked: function toggleClicked($clickedEl) {\n    var app = this;\n    var flattenRoutes = app.router.flattenRoutes(app.book.getBookChaptersTree());\n    var url = $clickedEl.attr(\"href\");\n    // app.router.updateCurrentUrl(url);\n    if (url == \"SAME\") {\n      url = app.router.params.name;\n    }\n    function removeAllHighlights() {\n      $$(document).find(\".swiper-slide\").each(function () {\n        var fp = Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).find(\".page\").eq(0)[0];\n        // debugger\n        fp.f7Page.$el.removeHighlight();\n      });\n    }\n    // removeAllHighlights();\n\n    var urlSplitted = url.split(\"#\");\n    url = urlSplitted[0];\n    var hash = false;\n    if (urlSplitted.hasOwnProperty(1)) {\n      hash = urlSplitted[1];\n    }\n    var obj = flattenRoutes.find(function (o) {\n      return o.path === url;\n    });\n    var chapterindex = flattenRoutes.indexOf(obj);\n    var dataSet = $clickedEl.dataset();\n    var dataHighlightString = dataSet.highlight; //$clickedEl.attr(\"data-highlight\");\n    var currentIndex = parseInt($$(document).find(\".swiper-slide-active\").attr(\"data-swiper-slide-index\"));\n    var toastWithCallback = false;\n    function highlights(page) {\n      page.$el.removeHighlight();\n      page.$el.highlight(dataHighlightString);\n      var currentHighlightInt = 0;\n      var activeHighlight = page.$el.find(\"#search-highlight-1\");\n      if (activeHighlight.length) {\n        activeHighlight.addClass(\"active\");\n        currentHighlightInt = 1;\n      }\n      var countHighlights = page.$el.find(\".search-highlight\").length;\n      // debugger;\n\n      // let nextHighlight = $('<i id=\"next-highlight\" class=\"f7-icons toast-button2\">chevron_down</i>');\n      // let prevHighlight = $('<i id=\"next-highlight\" class=\"f7-icons toast-button2\">chevron_up</i>');\n      //\n\n      if (dataHighlightString !== \"\") {\n        var cancelSearch = function cancelSearch() {\n          dataHighlightString = \"\";\n          var searchbarx = Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(document).find(\".searchbarx\");\n          // $$(searchbarx).val(\"\");\n          // $$(document).find(\"#search-result\").addClass(\"hidden\");\n          // $$(document).find(\"#search-not-found\").removeClass(\"hidden\");\n        }; // Create toast with callback on close\n        if (toastWithCallback === false) {\n          var toastText = \"\\n        <table>\\n          <tbody>\\n          <tr>\\n              <td>\\n                  Zv\\xFDrazn\\u011Bn hledan\\xFD v\\xFDraz <em>\" + dataHighlightString + \"</em> <span id=\\\"current-higlight-index\\\">\" + currentHighlightInt + \"</span>\\n                  /<span id=\\\"current-higlight-count\\\">\" + countHighlights + \"</span>\\n              </td>\\n              <td>\\n                  <a id=\\\"next-highlight\\\" href=\\\"#\\\"><i class=\\\"f7-icons toast-button2\\\">chevron_down</i></a>\\n              </td>\\n              <td>\\n                  <a id=\\\"prev-highlight\\\" href=\\\"#\\\"><i class=\\\"f7-icons toast-button2\\\">chevron_up</i></a>\\n              </td>\\n              <td>\\n                  <a id=\\\"higlights-close\\\" href=\\\"#\\\"><i  class=\\\"f7-icons toast-button2\\\">close</i></a>\\n              </td>\\n          </tr>\\n          </tbody>\\n        </table>\\n        \";\n          toastWithCallback = app.toast.create({\n            text: toastText,\n            closeButton: false,\n            closeButtonText: '<i class=\"f7-icons md-only\">close</i>',\n            on: {\n              close: function close() {\n                //page.$el.removeHighlight();\n              }\n            }\n          });\n        }\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"#current-higlight-count\").text(countHighlights);\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"#current-higlight-index\").text(currentHighlightInt);\n        toastWithCallback.open();\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"body\").find(\"#higlights-close\").off(\"click \").on(\"click \", function () {\n          toastWithCallback.close();\n          $$(document).off(\"page:show\", \".page\");\n          cancelSearch();\n          removeAllHighlights();\n        });\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"body\").find(\"#next-highlight\").off(\"click \").on(\"click \", function () {\n          currentHighlightInt = parseInt(activeHighlight.attr(\"data-pos\")) + 1;\n          activeHighlight.removeClass(\"active\");\n          if (currentHighlightInt > countHighlights) {\n            currentHighlightInt = 1;\n          }\n          activeHighlight = page.$el.find(\"#search-highlight-\" + currentHighlightInt).addClass(\"active\");\n          app.navigation.scrollTo(\"#search-highlight-\" + currentHighlightInt, 0, true);\n          Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"#current-higlight-index\").text(currentHighlightInt);\n        });\n        Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"body\").find(\"#prev-highlight\").off(\"click \").on(\"click \", function () {\n          currentHighlightInt = parseInt(activeHighlight.attr(\"data-pos\")) - 1;\n          activeHighlight.removeClass(\"active\");\n          if (currentHighlightInt < 1) {\n            currentHighlightInt = countHighlights;\n          }\n          activeHighlight = page.$el.find(\"#search-highlight-\" + currentHighlightInt).addClass(\"active\");\n          app.navigation.scrollTo(\"#search-highlight-\" + currentHighlightInt, 0, true);\n          Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"#current-higlight-index\").text(currentHighlightInt);\n        });\n      }\n    }\n    if (dataHighlightString !== undefined) {\n      if (dataHighlightString.length > 0) {\n        if (currentIndex === chapterindex) {\n          var pagem = $$(document).find(\".swiper-slide-active\").find(\".page\")[0].f7Page;\n          highlights(pagem);\n        }\n        app.data.myEvents.on(\"page:show\", function (page) {\n          highlights(page);\n        });\n      }\n    }\n    var dataHiglightId = dataSet.highlightId;\n    if (dataHiglightId !== undefined) {\n      if (dataHiglightId.length > 0) {\n        var $haveHiglight;\n        app.data.myEvents.off(\"highlights:apliedToCurrentPage\");\n        app.data.myEvents.on(\"highlights:apliedToCurrentPage\", function ($pageEl) {\n          $haveHiglight = $pageEl.find(dataHiglightId);\n          if ($haveHiglight.length) {\n            app.navigation.scrollTo(dataHiglightId, 500, true, false);\n            window.xxx = $haveHiglight;\n            setTimeout(function () {\n              $haveHiglight.eq($haveHiglight.length - 1).click();\n            }, 200);\n          }\n        });\n        if (currentIndex === chapterindex) {\n          $haveHiglight = app.view.main.$el.find(dataHiglightId);\n          app.data.myEvents.emit(\"highlights:apliedToCurrentPage\", app.view.main.$el);\n        }\n      }\n    }\n    var dataSkipTo = dataSet.scrollTo;\n    if (dataSkipTo !== undefined) {\n      var dataSkipToHiglight = dataSet.scrollToHighlight;\n      if (dataSkipToHiglight !== undefined) dataSkipToHiglight = true;\n      if (currentIndex === chapterindex) {\n        app.navigation.scrollTo(dataSkipTo, 0, true, dataSkipToHiglight);\n      } else {\n        app.data.myEvents.once(\"page:show\", function (e, page) {\n          app.navigation.scrollTo(dataSkipTo, 0, true, dataSkipToHiglight);\n        });\n      }\n    }\n    if (chapterindex >= 0) {\n      app.swiper.get(\"#main-swiper\").slideTo(chapterindex);\n    } else {\n      app.dialog.alert(\"Url \" + $clickedEl.attr(\"href\") + \" nenalezeno. Kontaktujte prosím správce knihy.\", \"Upozornění\");\n    }\n    return false;\n  },\n  swipeNext: function swipeNext(app) {\n    app.swiper.get(\"#main-swiper\").slideNext();\n  },\n  swipePrev: function swipePrev(app) {\n    app.swiper.get(\"#main-swiper\").slidePrev();\n  }\n};\n\n/*\r\n* <a\r\n   class=\"navigate prevent-router\" //povinné třídy\r\n   href=\"/virus-herpes-simplex/\" // url stránky z routeru\r\n   data-scroll-to=\"#skip-replikace\" //nepovinné. Specifikace elementu na který se má skočit po změně stránky\r\n   data-scroll-to-highlight=\"true\" //nepovinné. Touto volbou se vysvítí na 3s element na který stránka skočí\r\n   >\r\n\tvirus - skip to herpes // název odkazu\r\n</a>\r\n* */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"navigation\",\n  create: function create() {\n    var app = this;\n    framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].extend(app, {\n      navigation: {\n        scrollTo: function scrollTo(selector) {\n          var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n          var middle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n          var highlight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n          return Navigation.scrollTo.call(app, selector, speed, middle, highlight);\n        },\n        toggleClicked: function toggleClicked($clickedEl) {\n          return Navigation.toggleClicked.call(app, $clickedEl);\n        }\n      }\n    });\n  },\n  clicks: {\n    \".navigate, navigate a\": function open($clickedEl, e) {\n      // alert('ok');\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      Navigation.toggleClicked.call(app, $clickedEl);\n      return false;\n    },\n    \".navigate-next, .navigate-next a\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      Navigation.swipeNext(app);\n    },\n    \".navigate-prev, .navigate-prev a\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      Navigation.swipePrev(app);\n    },\n    \"a.scroll-to\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      var data = $clickedEl.dataset();\n      var href = $clickedEl.attr(\"href\");\n      app.navigation.scrollTo(href, data.speed, data.middle, data.highlight);\n    }\n  },\n  keyup: {\n    37: function _() {\n      // alert(\"a\");\n    }\n  },\n  on: {\n    init: function init() {\n      var app = this;\n      document.onkeydown = checkKey;\n      function checkKey(e) {\n        e = e || window.event;\n\n        //Aby se neodeslal formulářový prvek na enter\n        if (e.keyCode == \"13\") {\n          if (Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e.target).is(\"input:not(textarea)\")) {\n            e.preventDefault();\n            return;\n          }\n        }\n        if (Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e.target).is(\"input, select,button,textarea, *[contenteditable]\")) return;\n\n        //pouze pokud neí otevřen photobrowser, ten má také navigaci šipkama na klávesnici\n\n        if (e.keyCode == \"38\") {\n          // up arrow\n        } else if (e.keyCode == \"40\") {\n          // down arrow\n        } else if (e.keyCode == \"37\") {\n          // left arrow\n          if (!app.gallery.myPhotoBrowserPage.opened) {\n            Navigation.swipePrev(app);\n          }\n        } else if (e.keyCode == \"39\") {\n          // right arrow\n          if (!app.gallery.myPhotoBrowserPage.opened) {\n            Navigation.swipeNext(app);\n          }\n        }\n      }\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book-navigation/book-navigation.js?");

/***/ }),

/***/ "./src/core/custom_plugins/book-navigation/highlights.less":
/*!*****************************************************************!*\
  !*** ./src/core/custom_plugins/book-navigation/highlights.less ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book-navigation/highlights.less?");

/***/ }),

/***/ "./src/core/custom_plugins/book-navigation/search-toast.less":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/book-navigation/search-toast.less ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book-navigation/search-toast.less?");

/***/ }),

/***/ "./src/core/custom_plugins/book-settings/book-setting.less":
/*!*****************************************************************!*\
  !*** ./src/core/custom_plugins/book-settings/book-setting.less ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book-settings/book-setting.less?");

/***/ }),

/***/ "./src/core/custom_plugins/book/book.js":
/*!**********************************************!*\
  !*** ./src/core/custom_plugins/book/book.js ***!
  \**********************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var _template_color_themes_f7_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./template/color-themes.f7.html */ \"./src/core/custom_plugins/book/template/color-themes.f7.html\");\n/* harmony import */ var _builder_offline_templates_book_offline_f7_es_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../builder-offline/templates/book-offline.f7.es.html */ \"./src/core/custom_plugins/builder-offline/templates/book-offline.f7.es.html\");\n/* harmony import */ var _template_chapters_f7_html__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./template/chapters.f7.html */ \"./src/core/custom_plugins/book/template/chapters.f7.html\");\n/* harmony import */ var _template_groups_groups_default_f7_html__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./template/groups/groups-default.f7.html */ \"./src/core/custom_plugins/book/template/groups/groups-default.f7.html\");\n/* harmony import */ var _template_groups_groups_discussion_f7_html__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./template/groups/groups-discussion.f7.html */ \"./src/core/custom_plugins/book/template/groups/groups-discussion.f7.html\");\n/* harmony import */ var _template_help_help_default_f7_html__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./template/help/help-default.f7.html */ \"./src/core/custom_plugins/book/template/help/help-default.f7.html\");\n/* harmony import */ var _template_main_view_f7_html__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./template/main_view.f7.html */ \"./src/core/custom_plugins/book/template/main_view.f7.html\");\n/* harmony import */ var _template_left_menu_f7_html__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./template/left_menu.f7.html */ \"./src/core/custom_plugins/book/template/left_menu.f7.html\");\n/* harmony import */ var _translation_translation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../translation/translation */ \"./src/core/custom_plugins/translation/translation.js\");\n\n\n\n\n/* eslint no-underscore-dangle: [\"error\", { \"allow\": [\"_clientLeft\"] }] */\n\n\n// import Framework7 from \"@bookCorePath/vendor/framework7.esm.bundle.v5.2\";\n// import PageComponent from \"@bookCorePath/vendor/custom_plugins/builder/templates/builder_page_component.f7.es.html\";\n// import MainView from \"@bookCorePath/template/main_view.f7.html\";\n// import LeftMenu from \"@bookCorePath/template/left_menu.f7.html\";\n// import ColorThemes from \"@bookCorePath/template/color-themes.f7.html\";\n// import Help from \"@bookCorePath/template/help/help-default.f7.html\";\n// import Chapters from \"@bookCorePath/template/chapters.f7.html\";\n// import Groups from \"@bookCorePath/template/groups/groups-default.f7.html\";\n// import GroupsDiscussion from \"@bookCorePath/template/groups/groups-discussion.f7.html\";\n\n\n\n\n\n\n\n\n\n\nvar Book = /*#__PURE__*/function () {\n  function Book(app, params) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Book);\n    var bookContext = this;\n    //--\n    bookContext.scrollProgress = [];\n    //--\n    bookContext.app = app;\n    bookContext.params = framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].extend({\n      on: {}\n    }, app.params.book, params);\n    bookContext.mainSwiper = null;\n    bookContext.ignorePushState = false;\n    bookContext.bookChapters = [];\n    bookContext.app.views.currentBookViews = [];\n    bookContext.bookChapters = bookContext.addToBookChapters(bookContext.params.bookChapters);\n    bookContext.initialPageLoad = true;\n    app.on(\"init\", /*#__PURE__*/function () {\n      var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee(page) {\n        var app, currentColorClass, loginView, offlineView;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              app = this;\n              $$(document).on(\"click\", \"a.external\", function (e) {\n                // e.target still can be some element that is inside of a link\n                // but \"this\" here always refer to a.external\n                var url = $(this).attr(\"href\");\n                if (app.device.android || app.device.ios) {\n                  if (window.self !== window.top) {\n                    this.onclick = undefined;\n                    e.stopImmediatePropagation();\n                    e.stopPropagation();\n                    e.preventDefault();\n                    var msg = JSON.stringify({\n                      windowOpenUrl: url\n                    });\n                    window.parent.postMessage(msg, \"*\");\n                    return false;\n                  }\n                  // window.open(url, '_system', '');\n                }\n              });\n              Array.prototype.push.apply(app.routes, bookContext.params.bookChapters);\n              currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n              if (currentColorClass) app.root.removeClass(currentColorClass[0]);\n              // app.root.addClass(bookContext.colorTheme);\n\n              //Manuální řešení historie prohlížeče zbytek na řádku 567\n              window.addEventListener(\"popstate\", function (e) {\n                // debugger\n                var swiper = bookContext.mainSwiper;\n                if (location.search) {\n                  var v = location.search.substring(1);\n                  var w = bookContext.getSlideIndexByUrl(v);\n                  bookContext.ignorePushState = true;\n                  swiper.slideTo(w);\n                  // bookContext.preloadViews();\n                  return false;\n                } else {\n                  swiper.slideTo(0);\n                  return false;\n                }\n              });\n              app.root.addClass(\"theme-default\");\n              bookContext.setThemeColor(bookContext.params.color);\n              // bookContext.createMainViews();\n\n              app.data.myEvents.on(\"user:loadBook\", function () {\n                //console.log(\"user:loadBook\");\n                if (loginView) {\n                  loginView.destroy();\n                }\n                if (offlineView) {\n                  offlineView.destroy();\n                }\n\n                //OFFLINE | přerušit loading pokud je kniha offline, je limitováno a limit není password\n                if (!navigator.onLine && app.book.params.limited == 1 && app.book.params.limitationType != \"password\") {\n                  return;\n                }\n                bookContext.createMainViews();\n              });\n              app.data.myEvents.on(\"offline:access\", function (access) {\n                //console.log(\"offline:access\", access);\n                if (loginView) {\n                  loginView.destroy();\n                }\n                if (access) {\n                  bookContext.createMainViews();\n                } else {\n                  offlineView = bookContext.createOfflineView();\n                }\n              });\n              app.data.myEvents.on(\"user:loadMasterLogin\", function () {\n                // alert(\"LOADMASTER GET\");\n                loginView = bookContext.createMasterLogin();\n                // loginView = bookContext.createOfflineView();\n              });\n            case 11:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      return function (_x) {\n        return _ref.apply(this, arguments);\n      };\n    }());\n    bookContext.basePathName = window.location.pathname;\n    bookContext.app.translation.addResourceBundle(\"cs\", \"book\", bookContext.params.lang.cs);\n    bookContext.app.translation.addResourceBundle(\"en\", \"book\", bookContext.params.lang.en);\n    return bookContext;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Book, [{\n    key: \"setThemeColor\",\n    value: function setThemeColor(color) {\n      var bookContext = this;\n      var app = bookContext.app;\n      var $exist = $$(\"head\").find(\"#app-theme-color\");\n      if ($exist.length) {\n        $exist.remove();\n      }\n      $$(\"head\").prepend('<style id=\"app-theme-color\">.theme-default' + JSON.stringify(app.utils.colorThemeCSSProperties(color)).replace(/\"/g, \"\").replace(/,--/g, \";--\") + \"</style>\");\n    }\n  }, {\n    key: \"createMasterLogin\",\n    value: function createMasterLogin() {\n      var bookContext = this;\n      var app = bookContext.app;\n      // alert(\"creating Master!\");\n      var loginView = app.views.create(\".view-main\", {\n        url: \"/login/false\",\n        pushState: false,\n        on: {\n          pageInit: function () {\n            var _pageInit = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee2(page) {\n              return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee2$(_context2) {\n                while (1) switch (_context2.prev = _context2.next) {\n                  case 0:\n                  case \"end\":\n                    return _context2.stop();\n                }\n              }, _callee2);\n            }));\n            function pageInit(_x2) {\n              return _pageInit.apply(this, arguments);\n            }\n            return pageInit;\n          }()\n        }\n      });\n      // debugger;\n      return loginView;\n    }\n  }, {\n    key: \"createOfflineView\",\n    value: function createOfflineView() {\n      var bookContext = this;\n      var app = bookContext.app;\n      // alert(\"creating Master!\");\n      var loginView = app.views.create(\".view-main\", {\n        url: \"/access-denied\",\n        pushState: false,\n        on: {\n          pageInit: function () {\n            var _pageInit2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee3(page) {\n              return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee3$(_context3) {\n                while (1) switch (_context3.prev = _context3.next) {\n                  case 0:\n                  case \"end\":\n                    return _context3.stop();\n                }\n              }, _callee3);\n            }));\n            function pageInit(_x3) {\n              return _pageInit2.apply(this, arguments);\n            }\n            return pageInit;\n          }()\n        }\n      });\n      // debugger;\n      return loginView;\n    }\n  }, {\n    key: \"createMainViews\",\n    value: function createMainViews() {\n      var bookContext = this;\n      var app = bookContext.app;\n      if (bookContext.params.readMode) {\n        // this.swiper = this.createSwiper();\n\n        bookContext.app.views.create(\".view-left\", {\n          url: bookContext.params.leftMenuDefaultUrl,\n          pushState: false\n        });\n      } else {\n        bookContext.app.views.create(\"#main-swiper\", {\n          url: \"/obsah222xy/\",\n          pushState: false\n        });\n      }\n      var mainView = bookContext.app.views.create(\".view-main\", {\n        url: \"/main-view/\",\n        pushState: false,\n        on: {\n          pageInit: function () {\n            var _pageInit3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee4(page) {\n              return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee4$(_context4) {\n                while (1) switch (_context4.prev = _context4.next) {\n                  case 0:\n                    // debugger\n                    //\n                    //\n                    //   debugger\n\n                    app.data.myEvents.on(\"book:chaptersLoaded\", function () {\n                      app.root.find(\"#main-swiper\").addClass(\"zoom-\" + bookContext.params.defaultZoom);\n                      bookContext.createSwiper(page);\n                      console.info(\"[Book] (createMainViews) Book chapters was loaded.\");\n                    });\n                    app.data.myEvents.emit(\"view:main\", page);\n                    //book:chaptersLoaded se vrací z builder.js\n\n                    if (app.params.hasOwnProperty(\"builder\") === false || !app.params.builder.enable) {\n                      app.data.myEvents.emit(\"book:chaptersLoaded\");\n                    }\n                  case 3:\n                  case \"end\":\n                    return _context4.stop();\n                }\n              }, _callee4);\n            }));\n            function pageInit(_x4) {\n              return _pageInit3.apply(this, arguments);\n            }\n            return pageInit;\n          }()\n        }\n      });\n\n      // mainView.router.navigate(\"/main-view/\");\n    }\n  }, {\n    key: \"createSwiper\",\n    value: function createSwiper(page) {\n      var bookContext = this;\n      var swEl = page.$el.find(\"#main-swiper\");\n      var app = page.app;\n      var treshold = 25; //TODO deaktivovat pro mobil;\n      var simulateTouch = true;\n      if (!app.support.touch) {\n        treshold = 8000;\n        simulateTouch = false;\n      }\n\n      //\n      // swEl.length;\n      return bookContext.app.swiper.create(swEl, {\n        navigation: {\n          nextEl: \".main-swipe-next\",\n          prevEl: \".main-swipe-prev\"\n        },\n        draggable: false,\n        runCallbacksOnInit: true,\n        freeMode: false,\n        grabCursor: false,\n        threshold: treshold,\n        //TODO deaktivovat pro mobil\n        simulateTouch: simulateTouch,\n        allowTouchMove: true,\n        virtual: {\n          cache: false,\n          slides: bookContext.getChaptersUrl(),\n          renderSlide: function renderSlide(slide, index) {\n            return '<div class=\"swiper-slide view\" data-component=\"' + slide + '\" data-rendered=\"false\" id=\"' + slide + '\"></div>';\n          }\n          // addSlidesBefore: 1000,\n          // addSlidesAfter: 1000\n        },\n        on: {\n          slideChangeTransitionEnd: function slideChangeTransitionEnd() {\n            //alert(\"ok\");\n\n            bookContext.preloadViews();\n            bookContext.app.navbar.show(\"#main-navbar\", true);\n          },\n          slideChangeTransitionStart: function slideChangeTransitionStart() {\n            // alert(\"změna\");\n          },\n          reachEnd: function reachEnd() {\n            // alert(\"konec\");\n          },\n          init: function init() {\n            bookContext.mainSwiper = this;\n            if (bookContext.getBookChaptersTree().length) {\n              bookContext.initialUrl = bookContext.getBookChaptersTree()[0].path;\n\n              //TODO umožnit předávat parametry v prvních uvozovkách\n              var hu = Framework7.utils.parseUrlQuery(window.location.href);\n              var curl = Object.keys(hu)[0];\n              var len = Object.keys(hu).lenght;\n              // debugger\n\n              if (curl !== undefined) {\n                // var matchingRoute = bookContext.app.router.findMatchingRoute(\n                //   curl\n                // );\n\n                var slideIndex = bookContext.getSlideIndexByUrl(curl);\n                if (slideIndex > 0) {\n                  bookContext.initialUrl = curl;\n                  this.slideTo(slideIndex);\n                }\n              }\n              bookContext.preloadViews(false);\n            }\n          }\n        }\n      });\n    }\n  }, {\n    key: \"setProgress\",\n    value: function setProgress(p) {\n      var progress = Math.ceil(p);\n      var $pp = $$(\"#page-progress2\");\n      $pp.css(\"width\", progress + \"%\");\n      var $pp3 = $$(\"#page-progress3\");\n      if (progress > 0) {\n        $pp3.text(progress + \" %\");\n      } else {\n        $pp3.text(\"\");\n      }\n    }\n  }, {\n    key: \"preloadViews\",\n    value: function preloadViews() {\n      var _this = this;\n      var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n      var context = this;\n      var app = context.app;\n      var swiper = context.mainSwiper;\n      // swiper.virtual.update(true);\n      app.views.currentBookViews = [];\n      var prevIndex = swiper.slides[swiper.activeIndex - 1];\n      var currentIndex = swiper.slides[swiper.activeIndex];\n      var nextIndex = swiper.slides[swiper.activeIndex + 1];\n\n      //swiper.slides\n      var currentIndexesOfSlides = [];\n      app.book.currentPages = [];\n      var _loop = function _loop() {\n          var ii = swiper.slides[i].dataset.swiperSlideIndex;\n          var rendered = swiper.slides[i].dataset.rendered;\n          var currentSlide = swiper.slides[i];\n\n          // debugger;\n          var componentName = currentSlide.dataset.component;\n          var currentPage = _this.getSlideByUrl(componentName);\n          currentIndexesOfSlides.push(componentName);\n          app.book.currentPages.push(componentName);\n          if (swiper.slides[i].className.indexOf(\"slide-active\") > -1) {\n            var _fu = {};\n            // if(componentName === \"/test2/\"){\n            //     debugger;\n            // }\n          } else {\n            var _fu2 = {\n              pushState: false,\n              history: false,\n              ignoreCache: true\n            };\n          }\n          fu = {\n            pushState: false,\n            history: false,\n            ignoreCache: true\n          };\n          if (rendered === \"false\" || force === true) {\n            viewToDestroy = _this.app.views[componentName];\n            if (viewToDestroy) {\n              if (typeof viewToDestroy.router !== \"undefined\") {\n                // debugger\n                // viewToDestroy.router.refreshPage();\n              }\n            }\n            // debugger\n            if (force === true) {\n              var x = swiper.slides[i];\n              x.innerHTML = \"\";\n              _this.app.views.get(x).destroy();\n            }\n            var prefix = \"\";\n            if (app.params.hasOwnProperty(\"builder\") === true && app.hasOwnProperty(\"builder\")) {\n              if (app.builder.params.enable) {\n                prefix = \"/c\";\n              }\n            }\n            currentView = _this.app.views.create(swiper.slides[i], {\n              url: prefix + componentName,\n              preloadPreviousPage: false,\n              uniqueHistory: false,\n              name: componentName,\n              xhrCache: false,\n              reloadCurrent: true,\n              on: {\n                init: function init(page) {\n                  var view = page;\n                  view.url = componentName;\n                  context.app.views.currentBookViews.push(view);\n                  var myEvents = new Framework7.Events();\n                  var cv2 = view;\n                  cv2.events = myEvents;\n                },\n                pageInit: function pageInit(page) {\n                  var i2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : i;\n                  // alert(\"pi\");\n\n                  // let pagex = $$(swiper.slides[i]).find(\".page\")[0].f7Page;;\n\n                  var p = page;\n                  // scroll progress\n                  var $scroll = page.$el.parent(\".swiper-slide\");\n                  var div = $scroll[0];\n                  div.addEventListener(\"scroll\", function () {\n                    var scrollTop = div.scrollTop;\n                    var scrollHeight = div.scrollHeight - div.clientHeight;\n                    var scrollPercentage = scrollTop / scrollHeight * 100;\n\n                    //console.log(\"Procentuální posun na scrollu: \" + scrollPercentage + \"%\",componentName);\n                    //scrollPercentage\n                    //componentName\n\n                    context.scrollProgress[componentName] = scrollPercentage;\n                    var currentUrl = null;\n                    if (app.params.hasOwnProperty(\"builder\") === false || !app.params.builder.enable) {\n                      currentUrl = app.router.currentRoute.path;\n                    } else {\n                      currentUrl = \"/\" + app.router.currentRoute.params.id;\n                    }\n                    // currentUrl;\n                    // componentName;\n                    // debugger\n                    if (currentUrl == componentName) {\n                      context.setProgress(scrollPercentage);\n                    }\n                  });\n                  if (context.scrollProgress.hasOwnProperty(componentName) && context.scrollProgress[componentName] > 0) {\n                    var scrollPercentage = context.scrollProgress[componentName]; // Zde nahraďte uloženou procentuální hodnotou scrollu\n\n                    // Nastavení počátečního posunu scrollu na základě procentuální hodnoty\n                    div.scrollTop = (div.scrollHeight - div.clientHeight) * (scrollPercentage / 100);\n                  }\n                  // END scroll progress\n\n                  //debugger\n\n                  p.url = page.view.name;\n                  this.app.data.myEvents.emit(\"page:init\", p);\n                  if (page.view.el.className.indexOf(\"slide-active\") > -1) {\n                    //alert('pi');\n\n                    this.app.data.myEvents.emit(\"page:show\", page);\n                    page.view.events.emit(\"page:show\", page);\n                    this.app.router.pageCallback(\"show\", page, page, \"current\", undefined, {});\n                  }\n                }\n              }\n            }); // alert(\"navigate: \"+componentName);\n            //current.router.navigate(componentName,{pushState:true,history:false, ignoreCache: true,reloadCurrent: false,reloadPrevious:false,reloadAll:false,clearPreviousHistory:false,animate:false});\n            swiper.slides[i].dataset.rendered = true;\n            if (force === true) {\n              swiper.slides[i].dataset.rendered = \"xxx\";\n            }\n          } else {\n            var viewToInsert = _this.app.views.get(\"#\" + componentName);\n            viewToInsert.url = componentName;\n            context.app.views.currentBookViews.push(viewToInsert);\n          }\n\n          // alert(\"ii: \"+ii);\n          if (swiper.slides[i].className.indexOf(\"slide-active\") > -1) {\n            // current.main = true;\n            //  alert(componentName +'|'+swiper.activeIndex +'|'+ii);\n            cv = _this.app.views.get(\"#\" + componentName);\n            if (!cv.$el) {\n              alert(\"není view\");\n            }\n            var inIframe = function inIframe() {\n              try {\n                return window.self !== window.top;\n              } catch (e) {\n                return true;\n              }\n            };\n\n            // Manuálná historie prohlížeče, popstate na řádku 269\n            if (!history.state || \"#\" + componentName !== history.state) {\n              if (inIframe()) {\n                // alert(\"PUSHSTATE: \" + context.ignorePushState);\n                if (!context.ignorePushState) {\n                  var msg = JSON.stringify({\n                    iframeHistory: componentName.substr(1)\n                  });\n                  window.parent.postMessage(msg, \"*\");\n                } else {\n                  // alert(\"IGNORING PUSHSTATE\");\n                  context.ignorePushState = false;\n                }\n                // window.parent.history.pushState(\n                //   componentName,\n                //   componentName,\n                //   window.parent.location.pathname + \"?/\" + componentName.substr(1)\n                // );\n              } else {\n                if (!context.ignorePushState) {\n                  var url = context.basePathName + \"?/\" + componentName.substr(1);\n                  if (componentName !== window.history.state) {\n                    // debugger\n\n                    if (!window.history.state) {\n                      window.history.replaceState(componentName, componentName, context.basePathName + \"?/\" + componentName.substr(1));\n                    } else {\n                      window.history.pushState(componentName, componentName, context.basePathName + \"?/\" + componentName.substr(1));\n                    }\n                  }\n                } else {\n                  context.ignorePushState = false;\n                }\n              }\n            }\n            cv.router.updateCurrentUrl(componentName);\n\n            //  nastavení main view TODO current je prázdné\n            // cv.main = true;\n            // app.views.current = cv;\n\n            _this.app.views.main = cv;\n            _this.app.router = cv.router;\n            //alert(\"componentName: \"+componentName);\n            $$(\".view-main\").find(\".navbar .title\").html(currentPage.name);\n            var string = currentPage.name.replace(/(<([^>]+)>)/gi, \"\");\n            $$(\"head\").find(\"title\").text(string);\n            if (rendered === \"true\") {\n              // alert('pi2');\n\n              var page = $$(swiper.slides[i]).find(\".page\")[0].f7Page;\n              page.url = componentName;\n              if (context.scrollProgress.hasOwnProperty(componentName) && context.scrollProgress[componentName] > 0) {\n                sp = context.scrollProgress[componentName];\n                context.setProgress(sp);\n              } else {\n                context.setProgress(0);\n              }\n              _this.app.data.myEvents.emit(\"page:show\", page);\n\n              //Ukládat postup čtení, ignorovat prvotní načtení\n\n              // page.events.emit('show', page);\n              cv.events.emit(\"page:show\");\n              _this.app.router.pageCallback(\"show\", page, page, \"current\", undefined, {});\n            }\n          } else {\n            cv = _this.app.views.get(\"#\" + componentName);\n            cv.events.emit(\"page:hide\");\n          }\n        },\n        fu,\n        viewToDestroy,\n        currentView,\n        cv,\n        sp;\n      for (var i = 0; i < swiper.slides.length; i++) {\n        _loop();\n      }\n\n      //Promazání kontextu komponetn v poli xxx\n      if (app.hasOwnProperty(\"builder\")) {\n        var builder = app.builder;\n        for (var _i in builder.xxx) {\n          var ttt = _.cloneDeep(app.book.currentPages);\n          if (!app.book.currentPages.includes(builder.xxx[_i].url)) {\n            delete builder.xxx[_i];\n          }\n        }\n      }\n      var bookChapters = this.getBookChaptersFlatten();\n      this.getBookChaptersInactive(currentIndexesOfSlides);\n    }\n  }, {\n    key: \"bindSwipeClick\",\n    value: function bindSwipeClick(page) {\n      page.$el.find(\".swipe-to-event\").on(\"click\", function (e) {\n        this.onclick = undefined;\n        e.stopImmediatePropagation;\n        e.preventDefault;\n\n        // debugger\n\n        var chapterindex = this.getSlideIndexByUrl($$(this).attr(\"data-path\"));\n        if (chapterindex >= 0) {\n          page.app.swiper.get(\"#main-swiper\").slideTo(chapterindex);\n        } else {\n          page.app.dialog.alert(\"Url \" + $$(this).attr(\"href\") + \" nenalezeno. Kontaktujte prosím správce knihy.\", \"Upozornění\");\n        }\n        // $$(this).data(\"chapterindex\")\n\n        return false;\n      });\n    }\n  }, {\n    key: \"getSlideByUrl\",\n    value: function getSlideByUrl(url) {\n      var flattenRoutes = this.app.router.flattenRoutes(this.bookChapters);\n      return flattenRoutes.find(function (o) {\n        return o.path === url && !o.deleted;\n      });\n    }\n  }, {\n    key: \"getSlideIndexByUrl\",\n    value: function getSlideIndexByUrl(url) {\n      var flattenRoutes = this.app.router.flattenRoutes(this.getBookChaptersTree());\n      var obj = flattenRoutes.find(function (o) {\n        return o.path === url && !o.deleted;\n      });\n      return flattenRoutes.indexOf(obj);\n    }\n  }, {\n    key: \"getBookChaptersFlatten\",\n    value: function getBookChaptersFlatten() {\n      return this.app.router.flattenRoutes(this.getBookChaptersTree());\n    }\n  }, {\n    key: \"getBookChaptersInactive\",\n    value: function getBookChaptersInactive(actives) {\n      var bookChapters = this.getBookChaptersFlatten();\n      for (var i = 0; i < bookChapters.length; i++) {\n        if (!actives.includes(bookChapters[i].path)) {\n          var viewToDestroy = this.app.views[bookChapters[i].path];\n          if (viewToDestroy) {\n            //HERE TODO\n            viewToDestroy.events.emit(\"page:destroy\");\n            viewToDestroy.router.clearPreviousHistory();\n            viewToDestroy.destroy();\n          }\n        }\n      }\n    }\n  }, {\n    key: \"getChaptersUrl\",\n    value: function getChaptersUrl() {\n      var urls = [];\n      this.app.router.flattenRoutes(this.getBookChaptersTree()).forEach(function (route) {\n        urls.push(route.path);\n      });\n      // if(urls.length ===0){\n      //   return ['/empty']\n      // }\n      return urls;\n    }\n\n    // getChaptersUrl() {\n    //   var urls = [];\n    //   this.app.builder.params.dataChapters.forEach(function (route) {\n    //     urls.push(route.fullPath);\n    //   })\n    //   return urls;\n    // }\n  }, {\n    key: \"setBookChapter\",\n    value: function setBookChapter(bookChapters) {\n      this.bookChapters = bookChapters;\n    }\n  }, {\n    key: \"getApp\",\n    value: function getApp() {\n      return this.app;\n    }\n  }, {\n    key: \"getBookChaptersTree\",\n    value: function getBookChaptersTree() {\n      var deleted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n      var context = this;\n      var bookChapters = _.cloneDeep(context.bookChapters);\n      if (!deleted) {\n        var _removeDeleted = function removeDeleted(bookChapters) {\n          bookChapters = _.orderBy(bookChapters, [\"position\"], [\"asc\"]);\n          var i;\n          for (i = 0; i < bookChapters.length; i++) {\n            var chapter = bookChapters[i];\n            if (chapter.hasOwnProperty(\"deleted\") && chapter.deleted) {\n              bookChapters.splice(i, 1);\n              i -= 1;\n            } else {\n              if (chapter.hasOwnProperty(\"routes\") && chapter.routes) {\n                chapter.routes = _removeDeleted(chapter.routes);\n              }\n              if (chapter.hasOwnProperty(\"anchors\") && chapter.anchors) {\n                chapter.anchors = _removeDeleted(chapter.anchors);\n              }\n              var myString = chapter.name;\n              var myRegexp = new RegExp(\"(^\\\\d+[\\\\.\\\\d+]*[\\\\.]?)(.*)\", \"g\");\n              var match = myRegexp.exec(myString);\n              if (match) {\n                chapter.nameNumber = match[1].trim();\n                chapter.nameText = match[2].trim();\n              } else {\n                chapter.nameNumber = null;\n                chapter.nameText = chapter.name;\n              }\n            }\n          }\n          return bookChapters;\n        };\n        if (bookChapters) {\n          bookChapters = _removeDeleted(bookChapters);\n        }\n      }\n      return bookChapters;\n    }\n  }, {\n    key: \"addUrlToAnchors\",\n    value: function addUrlToAnchors(anchors, url) {\n      var bookContext = this;\n      anchors.forEach(function (val) {\n        val.fullPath = url;\n        if (val.hasOwnProperty(\"anchors\")) {\n          bookContext.addUrlToAnchors(val.anchors, url);\n        }\n      });\n      return anchors;\n    }\n  }, {\n    key: \"addToBookChapters\",\n    value: function addToBookChapters(bookchapters) {\n      var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var appendUrl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n      var parentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n      var bookContext = this;\n      var app = bookContext.app;\n      if (bookchapters) {\n        bookchapters.forEach(function (val) {\n          val.chapter = true;\n          if (!val.hasOwnProperty(\"id\") || !val.id) {\n            val.id = parentId = app.utils.id(\"xxxx-xxxx-xxxx\");\n          }\n          if (!val.hasOwnProperty(\"parentId\") || !val.parentId) {\n            val.parentId = parentId;\n          }\n          val.position = position;\n          position++;\n          // debugger;\n          val.fullPath = appendUrl + val.path;\n          if (val.hasOwnProperty(\"routes\")) {\n            var xurl = \"\";\n            xurl = appendUrl + val.path.slice(0, -1);\n            val.routes = bookContext.addToBookChapters(val.routes, 1, xurl, val.id);\n          }\n          if (val.hasOwnProperty(\"anchors\")) {\n            val.anchors = bookContext.addUrlToAnchors(val.anchors, val.fullPath);\n          }\n\n          // bookchapters.push(val);\n          parentId = null;\n        });\n      }\n      return bookchapters;\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"book\",\n  params: {\n    book: {\n      leftMenuDefaultUrl: \"/left-menu/\",\n      bookChapters: null,\n      color: \"#22a2ff\",\n      colorTheme: \"theme-light\",\n      //theme-light, theme-dark, auto\n      citations: false,\n      hideNavbarOnScroll: true,\n      defaultZoom: 100,\n      defaultFontSizeCoef: null,\n      defaultPageWidth: null,\n      params: {},\n      readMode: true,\n      lang: {\n        cs: {\n          chapters: \"Kapitoly\",\n          tools: \"Nástroje\",\n          fullscreen: \"Zobrazit na celou obrazovku\",\n          bookDesign: \"Design knihy\",\n          help: \"Nápověda\",\n          settings: \"Nastavení\",\n          navigation: \"Navigace\",\n          backToLibrary: \"Zpět do knihovny\",\n          library: \"Knihovna\",\n          welcomeInBook: \"Vítejte ve Vaší knize, tato část slouží k navigaci a nastavení knihy.\",\n          anotation: \"Anotace\",\n          comments: \"Komentáře\",\n          comment: \"Komentář\",\n          highlightAndNotes: \"Zvýraznění a poznámky\",\n          groupComments: \"Skupinové komentáře\",\n          openEditor: \"Otevřít editor\",\n          logIn: \"Přihlásit se\",\n          development: \"Vývoj\",\n          design: \"Design\",\n          sizeZoom: \"Velikost/přiblížení\",\n          auto: \"Automaticky\",\n          zoomText: \"Touto volbou si můžete zvětšit, nebo zmenšit celý obsah knihy včetně obrázků a všech elementů, využijte např. pro snadnější čtení, nebo pokud máte potíže se zrakem. Níže můžete samostatně nastavit i šířku sloupce a velikost písma.\",\n          colorTheme: \"Barevné schéma\",\n          daily: \"Denní\",\n          lightTheme: \"Světlé zobrazení\",\n          nightly: \"Noční\",\n          darkTheme: \"Tmavé zobrazení\",\n          autoSettings: \"Automatické nastavení\",\n          autoSettingsText: \"Dle nastavení režimu zařízení\",\n          autoSettingsCurrent: \"Současné\",\n          font: \"Písmo\",\n          book: \"Kniha\",\n          keyboardShortcuts: \"Klávesové zkratky\",\n          arrowR: \"Šipka vpravo\",\n          arrowL: \"Šipka vlevo\",\n          arrowU: \"Šipka nahoru\",\n          arrowD: \"Šipka dolu\",\n          nextPage: \"Přechod na následující stranu\",\n          prevPage: \"Přechod na předchozí stranu\",\n          moveUp: \"Posun vzhůru v rámci aktuální strany\",\n          moveDown: \"Posun dolů v rámci aktuální strany\",\n          annotationAndGroupComments: \"Anotace a skupinové komentáře\",\n          highlight: \"Zvýraznění\",\n          highlightText: \"Zv\\xFDrazn\\xED text zvolenou barvou. Kniha si posledn\\xED zvolenou barvu pamatuje automaticky.\\n          P\\u0159ehled v\\u0161ech zv\\xFDrazn\\u011Bn\\xED naleznete v Hlavn\\xED nab\\xEDdce <i class=\\\"icon material-icons\\\"\\n            style=\\\"font-size: 12px;\\\">menu</i> pod odkazem Annotace.\",\n          openMenu: \"Vyvolání nabídky\",\n          openMenuText: \"Nab\\xEDdku vyvol\\xE1te ozna\\u010Den\\xEDm libovoln\\xE9ho textu, kter\\xFD je sou\\u010D\\xE1st\\xED kapitol knihy/publikace.\\n            <div class=\\\"elevation-9 help-highlights\\\"><i class=\\\"material-icons\\\">format_paint</i> <i\\n                class=\\\"material-icons\\\">rate_review</i> <i class=\\\"material-icons\\\">search</i> <i\\n                class=\\\"material-icons\\\">comment</i></div>\\n            Vyvolan\\xE1 nab\\xEDdka se zav\\u0159e automaticky po kliknut\\xED kdekoliv mimo nab\\xEDzen\\xE9 mo\\u017Enosti.\\n            Pokud jste v knize p\\u0159ihl\\xE1\\u0161eni, Zv\\xFDrazn\\u011Bn\\xED i Zv\\xFDrazn\\u011Bn\\xED s pozn\\xE1mkou se automaticky synchronizuje\\n            s va\\u0161\\xEDm \\xFA\\u010Dtem a d\\xEDky tomu je m\\xE1te k dispozici okam\\u017Eit\\u011B na v\\u0161ech sv\\xFDch za\\u0159\\xEDzen\\xEDch, kde knihu \\u010Dtete.\\n            Zv\\xFDrazn\\u011Bn\\xED a Zv\\xFDrazn\\u011Bn\\xED s pozn\\xE1mkou vid\\xEDte pouze vy, jin\\xED u\\u017Eivatel\\xE9, ani administr\\xE1to\\u0159i\\n            k nim nemaj\\xED p\\u0159\\xEDstup.\\n            Po zobrazen\\xED nab\\xEDdky m\\u016F\\u017Eete nad ozna\\u010Den\\xFDm textem\\n            d\\u011Blat tyto akce:\",\n          highlightWithNote: \"Zvýraznění s poznámkou\",\n          highlightWithNoteText: \"Funguje stejn\\u011B jako zv\\xFDrazn\\u011Bn\\xED textu, ale nav\\xEDc si m\\u016F\\u017Eete k textu ud\\u011Blat pozn\\xE1mku.\\n            Pozn\\xE1mka nen\\xED povinn\\xE1 a ulo\\u017E\\xED se automaticky po zav\\u0159en\\xED okna.\",\n          search: \"Vyhledávání\",\n          searchText: \"Text, kter\\xFD m\\xE1te v danou chv\\xEDli ozna\\u010Den\\xFD se vyhled\\xE1 v cel\\xE9 knize. Doporu\\u010Dujeme vyhled\\xE1vat pouze\\n            slova, nebo fr\\xE1ze. Nikoliv dlouh\\xE9 v\\u011Bty a odstavce.\",\n          groupComment: \"Skupinový komentář\",\n          groupCommentText: \"Skupinov\\xE9 koment\\xE1\\u0159e slou\\u017E\\xED k p\\u0159edev\\u0161\\xEDm autor\\u016Fm, editor\\u016Fm a program\\xE1tor\\u016Fm k\\n            p\\u0159ipom\\xEDnkov\\xE1n\\xED knihy,\\n            upozor\\u0148ov\\xE1n\\xED na p\\u0159eklepy, \\u017E\\xE1dosti o zm\\u011Bnu textu, p\\u0159ipom\\xEDnky k funk\\u010Dnosti \\u010Di grafice.\\n            Abyste tuto funkci mohli vyu\\u017E\\xEDvat, mus\\xEDte b\\xFDt p\\u0159ihl\\xE1\\u0161eni a tak\\xE9 mus\\xEDte m\\xEDt povolenou \\u017E\\xE1dost o\\n            editorstv\\xED knihy.\\n            \\u017D\\xE1dost o editorstv\\xED knihy m\\u016F\\u017Eete podat pod sv\\xFDm u\\u017Eivatelsk\\xFDm \\xFA\\u010Dtem <i class=\\\"material-icons\\\"\\n              style=\\\"font-size: 12px;\\\">person_round</i>, kter\\xFD naleznete v hlavn\\xED nab\\xEDdce <i\\n              class=\\\"icon material-icons\\\" style=\\\"font-size: 12px;\\\">menu</i>.\\n            O schv\\xE1len\\xED, nebo zam\\xEDtnut\\xED editorstv\\xED budete informov\\xE1ni e-mailem.\",\n          interactiveHelp: \"Interaktivní nápověda\",\n          onOff: \"Vypnuta / zapnuta\",\n          discussion: \"Diskuze\",\n          pageWidthTitle: \"Maximální šířka stránky\",\n          pageFontTile: \"Velikost písma\"\n        },\n        en: {\n          chapters: \"Chapters\",\n          tools: \"Tools\",\n          fullscreen: \"Go fullscreen\",\n          bookDesign: \"Book design\",\n          help: \"Help\",\n          settings: \"Settings\",\n          navigation: \"Navigation\",\n          backToLibrary: \"Back to library\",\n          library: \"Library\",\n          welcomeInBook: \"Welcome to your book, this section is used to navigate and set up your book.\",\n          anotation: \"Anotation\",\n          comment: \"Comment\",\n          comments: \"Comments\",\n          highlightAndNotes: \"Highlights and notes\",\n          groupComments: \"Group comments\",\n          openEditor: \"Open Editor\",\n          logIn: \"Log in\",\n          development: \"Development\",\n          design: \"Design\",\n          sizeZoom: \"Size/zoom\",\n          auto: \"Automatically\",\n          zoomText: \"By selecting this option, you can enlarge or reduce the entire content of the book, including images and all elements, use it for easier reading, or if you have visual difficulties. Below, you can also independently adjust the column width and font size.\",\n          colorTheme: \"Color theme\",\n          daily: \"Daily\",\n          lightTheme: \"Light theme\",\n          nightly: \"Nightly\",\n          darkTheme: \"Dark theme\",\n          autoSettings: \"Auto settings\",\n          autoSettingsText: \"Reflects settings of your device\",\n          autoSettingsCurrent: \"Current\",\n          font: \"Font\",\n          book: \"Books\",\n          keyboardShortcuts: \"Keyboard shortcuts\",\n          arrowR: \"Right arrow\",\n          arrowL: \"Left arrow\",\n          arrowU: \"Arrow up\",\n          arrowD: \"Arrow down\",\n          nextPage: \"Go to the next page\",\n          prevPage: \"Go to the previous page\",\n          moveUp: \"Scroll page up\",\n          moveDown: \"Scroll page down\",\n          annotationAndGroupComments: \"Annotations and group comments\",\n          highlight: \"Highlight\",\n          highlightText: \"Highlight the text with the selected colour. The book remembers the last selected colour automatically.\\n          An overview of all highlights can be found in the Main Menu <i class=\\\"icon material-icons\\\"\\n            style=\\\"font-size: 12px;\\\">menu</i> under the Annotation link.\",\n          openMenu: \"Open up menu\",\n          openMenuText: \"You can open up the menu by selecting any text that is part of the chapters of the book/publication.\\n            <div class=\\\"elevation-9 help-highlights\\\"><i class=\\\"material-icons\\\">format_paint</i> <i\\n                class=\\\"material-icons\\\">rate_review</i> <i class=\\\"material-icons\\\">search</i> <i\\n                class=\\\"material-icons\\\">comment</i></div>\\n                The pop-up menu will close automatically when clicked anywhere outside the options offered.\\n                If you are logged into the book, both Highlight and Highlight with comment will automatically sync\\n                with your account, making them instantly available on all your devices where you're reading the book.\\n                The Highlight and Highlight with a note are only visible to you. Other users nor administrator can't see them.\\n                Once the menu is displayed, you can hover over the highlighted text to\\n                do the following:\",\n          highlightWithNote: \"Highlight with a note\",\n          highlightWithNoteText: \"It works just like highlighting text, but you can also mark a note to the highlight.\\n          The note is optional and is saved automatically when you close the window.\",\n          search: \"Search\",\n          searchText: \"The text you have currently marked is searched throughout the whole book. We recommend that you search only\\n          words or phrases. Not long sentences or paragraphs.\",\n          groupComment: \"Group comments\",\n          groupCommentText: \"Group comments are primarily used by authors, editors and programmers to\\n          to comment on the book,\\n          pointing out typos, requests for changes to the text, comments on functionality or graphics.\\n          To use this feature, you must be logged in and also have enabled the request for\\n          editorship of the book.\\n            You can submit the editorship request under your user account <i class=\\\"material-icons\\\"\\n              style=\\\"font-size: 12px;\\\">person_round</i>, which can be found in the left menu <i\\n              class=\\\"icon material-icons\\\" style=\\\"font-size: 12px;\\\">menu</i>.\\n          You will be notified by email about the result of your request.\",\n          interactiveHelp: \"Interactive help\",\n          onOff: \" Off / On\",\n          discussion: \"Discussion\",\n          pageWidthTitle: \"Maximum page width\",\n          pageFontTile: \"Font size\"\n        }\n      }\n    }\n  },\n  static: {\n    book: Book\n  },\n  create: function create(params) {\n    var app = this;\n    app.routes.push({\n      name: \"Main View\",\n      path: \"/main-view/\",\n      component: _template_main_view_f7_html__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Levé menu\",\n      path: \"/left-menu/\",\n      component: _template_left_menu_f7_html__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Barevná schémata\",\n      path: \"/color-themes/\",\n      component: _template_color_themes_f7_html__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Offline kniha\",\n      path: \"/book-offline/\",\n      component: _builder_offline_templates_book_offline_f7_es_html__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Nápověda\",\n      path: \"/help/\",\n      component: _template_help_help_default_f7_html__WEBPACK_IMPORTED_MODULE_10__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Kapitoly\",\n      path: \"/kapitoly/\",\n      component: _template_chapters_f7_html__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Skupiny\",\n      path: \"/groups/\",\n      component: _template_groups_groups_default_f7_html__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n    });\n    app.routes.push({\n      name: \"Diskuze\",\n      path: \"/discussion/\",\n      component: _template_groups_groups_discussion_f7_html__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n    });\n    app.book = new Book(app, params);\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/book.js?");

/***/ }),

/***/ "./src/core/custom_plugins/book/images/czech.svg":
/*!*******************************************************!*\
  !*** ./src/core/custom_plugins/book/images/czech.svg ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MDAiIGhlaWdodD0iNjAwIj4NCgk8cmVjdCB3aWR0aD0iOTAwIiBoZWlnaHQ9IjYwMCIgZmlsbD0iI2Q3MTQxYSIvPg0KCTxyZWN0IHdpZHRoPSI5MDAiIGhlaWdodD0iMzAwIiBmaWxsPSIjZmZmIi8+DQoJPHBhdGggZD0iTSA0NTAsMzAwIDAsMCBWIDYwMCB6IiBmaWxsPSIjMTE0NTdlIi8+DQo8L3N2Zz4=\"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/images/czech.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/book/images/english.svg":
/*!*********************************************************!*\
  !*** ./src/core/custom_plugins/book/images/english.svg ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEzMDAiIGhlaWdodD0iNjUwIj4NCjxkZWZzPg0KPHBvbHlnb24gaWQ9InB0IiBwb2ludHM9Ii0wLjE2MjQ1OTg0ODExNjQ1MzEsMCAwLC0wLjUgMC4xNjI0NTk4NDgxMTY0NTMxLDAiIHRyYW5zZm9ybT0ic2NhbGUoMC4wNjE2KSIgZmlsbD0iI0ZGRiIvPg0KPGcgaWQ9InN0YXIiPg0KCTx1c2UgeGxpbms6aHJlZj0iI3B0IiB0cmFuc2Zvcm09InJvdGF0ZSgtMTQ0KSIvPg0KCTx1c2UgeGxpbms6aHJlZj0iI3B0IiB0cmFuc2Zvcm09InJvdGF0ZSgtNzIpIi8+DQoJPHVzZSB4bGluazpocmVmPSIjcHQiLz4NCgk8dXNlIHhsaW5rOmhyZWY9IiNwdCIgdHJhbnNmb3JtPSJyb3RhdGUoNzIpIi8+DQoJPHVzZSB4bGluazpocmVmPSIjcHQiIHRyYW5zZm9ybT0icm90YXRlKDE0NCkiLz4NCjwvZz4NCjxnIGlkPSJzNSI+DQoJPHVzZSB4bGluazpocmVmPSIjc3RhciIgeD0iLTAuMjUyIi8+DQoJPHVzZSB4bGluazpocmVmPSIjc3RhciIgeD0iLTAuMTI2Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjc3RhciIvPg0KCTx1c2UgeGxpbms6aHJlZj0iI3N0YXIiIHg9IjAuMTI2Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjc3RhciIgeD0iMC4yNTIiLz4NCjwvZz4NCjxnIGlkPSJzNiI+DQoJPHVzZSB4bGluazpocmVmPSIjczUiIHg9Ii0wLjA2MyIvPg0KCTx1c2UgeGxpbms6aHJlZj0iI3N0YXIiIHg9IjAuMzE1Ii8+DQo8L2c+DQo8ZyBpZD0ieDQiPg0KCTx1c2UgeGxpbms6aHJlZj0iI3M2Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjczUiIHk9IjAuMDU0Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjczYiIHk9IjAuMTA4Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjczUiIHk9IjAuMTYyIi8+DQo8L2c+DQo8ZyBpZD0idSI+DQoJPHVzZSB4bGluazpocmVmPSIjeDQiIHk9Ii0wLjIxNiIvPg0KCTx1c2UgeGxpbms6aHJlZj0iI3g0Ii8+DQoJPHVzZSB4bGluazpocmVmPSIjczYiIHk9IjAuMjE2Ii8+DQo8L2c+DQo8cmVjdCBpZD0ic3RyaXBlIiB3aWR0aD0iMTMwMCIgaGVpZ2h0PSI1MCIgZmlsbD0iI0IyMjIzNCIvPg0KPC9kZWZzPg0KPHJlY3Qgd2lkdGg9IjEzMDAiIGhlaWdodD0iNjUwIiBmaWxsPSIjRkZGIi8+DQo8dXNlIHhsaW5rOmhyZWY9IiNzdHJpcGUiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3N0cmlwZSIgeT0iMTAwIi8+DQo8dXNlIHhsaW5rOmhyZWY9IiNzdHJpcGUiIHk9IjIwMCIvPg0KPHVzZSB4bGluazpocmVmPSIjc3RyaXBlIiB5PSIzMDAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3N0cmlwZSIgeT0iNDAwIi8+DQo8dXNlIHhsaW5rOmhyZWY9IiNzdHJpcGUiIHk9IjUwMCIvPg0KPHVzZSB4bGluazpocmVmPSIjc3RyaXBlIiB5PSI2MDAiLz4NCjxyZWN0IHdpZHRoPSI0OTQiIGhlaWdodD0iMzUwIiBmaWxsPSIjM0MzQjZFIi8+DQo8dXNlIHhsaW5rOmhyZWY9IiN1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNDcsMTc1KSBzY2FsZSg2NTApIi8+DQo8c3ZnIHZpZXdCb3g9IjAgMCA2MCAzMCIgd2lkdGg9IjEzMDAiIGhlaWdodD0iNjUwIj4NCgk8Y2xpcFBhdGggaWQ9InQiPg0KCQk8cGF0aCBkPSJNMzAsMTVMNjAsMzBWMTVIMFYzMEgzMHoiLz4NCgk8L2NsaXBQYXRoPg0KCTxjbGlwUGF0aCBpZD0idWsiPg0KCQk8cGF0aCBkPSJNMCwzMEg2MFYweiIvPg0KCTwvY2xpcFBhdGg+DQoJPGcgY2xpcC1wYXRoPSJ1cmwoI3VrKSI+DQoJCTxwYXRoIGQ9Ik0wLDAgdjMwIGg2MCB2LTMwIHoiIGZpbGw9IiMwMDI0N2QiLz4NCgkJPHBhdGggZD0iTTAsMCBMNjAsMzAgTTYwLDAgTDAsMzAiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSI2Ii8+DQoJCTxwYXRoIGQ9Ik0wLDMwIEwzMCwxNSBMNjAsMzAiIGNsaXAtcGF0aD0idXJsKCN0KSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2YxNDJiIiBzdHJva2Utd2lkdGg9IjQiLz4NCgkJPHBhdGggZD0iTTMwLDAgdjMwIE0wLDE1IGg2MCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEwIi8+DQoJCTxwYXRoIGQ9Ik0zMCwwIHYzMCBNMCwxNSBoNjAiIHN0cm9rZT0iI2NmMTQyYiIgc3Ryb2tlLXdpZHRoPSI2Ii8+DQoJPC9nPg0KPC9zdmc+DQo8L3N2Zz4=\"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/images/english.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/chapters.f7.html":
/*!****************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/chapters.f7.html ***!
  \****************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].registerPartial('routes', '<ul class=\"{{#if ../name}}accordion-item-content{{else}}accordion-item-content root{{/if}}\">    {{#if anchors}}    {{#each anchors}}    <li class=\"accordion-item accordion-anchor {{#if hide}}hide{{/if}}\">      <div class=\"item-content\">        <div class=\"item-inner\">          <div class=\"item-title\">            <a class=\"navigate link prevent-router anchor search-route\" data-name=\"{{name}}\" href=\"{{../fullPath}}\"              data-scroll-to=\"#{{id}}\" data-scroll-to-highlight=\"true\">{{name}}</a>          </div>          {{#if anchors}}          <div class=\"item-after accordion-item-toggle\">            <i class=\"f7-icons sublist-switch down\">chevron_right</i>            <i class=\"f7-icons sublist-switch up\">chevron_down</i>          </div>          {{/if}}        </div>      </div>      {{#if anchors}}{{> \"routes\"}}{{/if}}    </li>    {{/each}}    {{/if}}    {{#if routes}}    {{#each routes}}    <li class=\"accordion-item accordion-route {{#if hide}}hide{{/if}}\">      <div class=\"item-content\">        <div class=\"item-inner\">          <div class=\"item-title\">            <a class=\"navigate link prevent-router route search-route\" data-name=\"{{name}}\"              href=\"{{fullPath}}\">{{name}}</a>          </div>          {{#js_if \"this.routes != undefined\"}}<div class=\"item-after accordion-item-toggle\">            <i class=\"f7-icons sublist-switch down yy\">chevron_right</i>            <i class=\"f7-icons sublist-switch up yy\">chevron_down</i>          </div>          {{else}}          {{#js_if \"this.anchors && this.anchors.length > 0\"}}<div class=\"item-after accordion-item-toggle\">            <i class=\"f7-icons sublist-switch down zz\">chevron_right</i>            <i class=\"f7-icons sublist-switch up zz\">chevron_down</i>          </div>{{/js_if}}          {{/js_if}}        </div>      </div>      {{#if anchors}}      {{> \"routes\"}}      {{else}}      {{#if routes}}      {{> \"routes\"}}      {{/if}}      {{/if}}    </li>    {{/each}}    {{/if}}  </ul>');\n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    return { routes: this.$app.book.getBookChaptersTree() };\n  },\n  methods: {\n    openAlert: function () {\n      var self = this.$app.dialog.alert('Hello world!');\n    },\n    swipeTo: function (a, e) {\n      this.$app.swiper.get('#main-swiper').slideTo(2);\n    },\n    changeActive: (app, page, curr = null) => {\n      let currPage = curr;\n      if (!curr) {\n        currPage = '/' + app.router.currentRoute.params.id;\n      }\n      page.$el.find('.kapitoly').find('li').forEach(ch => {\n        let a = $$(ch).find('a');\n        let href = $$(a).attr('href');\n        if (href == currPage && !a.hasClass('anchor')) {\n          $$(ch).addClass('active');\n          let parents = $$(ch).parents('li');\n          parents.forEach(p => {\n            $$(p).addClass('accordion-item-opened');\n          });\n        } else {\n          $$(ch).removeClass('active');\n        }\n      });\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = this.$app;\n      let self = this;\n      function resetSearch() {\n        let allChapterEl = page.$el.find('.search-route');\n        allChapterEl.forEach(function (chapter) {\n          $$(chapter).closest('li').removeClass('hidden');\n          $$(chapter).closest('li').removeClass('accordion-item-opened');\n        });\n      }\n      let searchBar = this.$app.searchbar.create({\n        el: '#chapters-page .searchbar',\n        inputEl: '#chapters-page .searchbarx',\n        customSearch: true,\n        backdrop: false,\n        disableButton: false,\n        on: {\n          search: function (searchbar, q) {\n            let query = q;\n            query = $.trim(query).toLowerCase();\n            query = app.utils.removeDiacritics(query);\n            if (query.length > 0) {\n              let allChapterEl = page.$el.find('.search-route');\n              allChapterEl.forEach(function (chapter) {\n                let chEl = $$(chapter);\n                let name = chEl.data('name').toLowerCase();\n                name = app.utils.removeDiacritics(name);\n                if (name.includes(query)) {\n                  chEl.closest('li').removeClass('hidden');\n                  chEl.parents('.accordion-route').forEach(el => {\n                    $$(el).addClass('accordion-item-opened');\n                    $$(el).removeClass('hidden');\n                  });\n                  chEl.closest('li').removeClass('accordion-item-opened');\n                } else {\n                  chEl.closest('li').addClass('hidden');\n                  chEl.parents('.accordion-route').forEach(el => {\n                    if (!$$(el).hasClass('hidden')) {\n                      chEl.closest('li').removeClass('hidden');\n                    }\n                  });\n                }\n              });\n            } else {\n              resetSearch();\n            }\n          },\n          clear: function (searchbar, q) {\n            resetSearch();\n          },\n          disable: function (searchbar, q) {\n            resetSearch();\n          }\n        }\n      });\n      app.data.myEvents.on('book:chaptersLoaded', () => {\n        this.$setState({ routes: this.$app.book.getBookChaptersTree() });\n      });\n      app.data.myEvents.on('page:show', () => {\n        if (this.hasOwnProperty('changeActive')) {\n          this.changeActive(app, page, app.router.params.name);\n        }\n      });\n      setTimeout(() => {\n        this.changeActive(app, page, app.router.params.name);\n      }, 2500);\n      page.$el.find('.navigate').on('click', e => {\n        if (app.bookSettings.params.hideLeftMenuOnRedirect) {\n          let leftPanel = app.panel.get('.panel-left');\n          leftPanel.close();\n        }\n      });\n    }\n  },\n  id: 'ca28ad99b5',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div id=\"chapters-page\" class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a class=\"link\" href=\"/left-menu/\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:chapters'), ctx_1);\n      r += '</div>\\n        <div class=\"subnavbar\">\\n          <form data-search-container=\".search-list\" data-search-in=\".swipe-to-event\" class=\"searchbar searchbar-init\">\\n            <div class=\"searchbar-inner\">\\n              <div class=\"searchbar-input-wrap\">\\n                <input type=\"search\" class=\"searchbarx\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('book:search'), ctx_1);\n      r += '\">\\n                <i class=\"searchbar-icon\"></i>\\n                <span class=\"input-clear-button\"></span>\\n              </div>\\n              <span class=\"searchbar-disable-button\">';\n      r += c(ctx_1.$app.translation.t('cancel'), ctx_1);\n      r += '</span>\\n            </div>\\n          </form>\\n        </div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n      <div class=\"searchbar-backdrop\"></div>\\n\\n      <div class=\"list simple-list searchbar-not-found\">\\n        <ul>\\n          <li>';\n      r += c(ctx_1.$app.translation.t('notFound'), ctx_1);\n      r += '</li>\\n        </ul>\\n      </div>\\n      <div class=\"list search-list searchbar-found list kapitoly\">\\n        ';\n      r += Template7Helpers._partial.call(ctx_1, 'routes', {\n        hash: {},\n        data: data_1 || {},\n        fn: function empty() {\n          return '';\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      </div>\\n    </div>\\n  </div>\\n\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-ca28ad99b5] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n\n[data-f7-ca28ad99b5] .kapitoly>ul.accordion-item-content {\n    height: auto;\n  }\n\n[data-f7-ca28ad99b5] .sublist-switch {\n    font-size: 20px;\n  }\n\n[data-f7-ca28ad99b5] .accordion-item-opened>.item-content>.item-inner>.accordion-item-toggle>.sublist-switch.down {\n    display: none;\n  }\n\n[data-f7-ca28ad99b5] .accordion-item-opened>.item-content>.item-inner>.accordion-item-toggle>.sublist-switch.up {\n    display: block;\n  }\n\n[data-f7-ca28ad99b5] .sublist-switch.up {\n    display: none;\n  }\n\n[data-f7-ca28ad99b5] .sublist-switch.down {\n    display: block;\n  }\n\n[data-f7-ca28ad99b5] .kapitoly a {\n    color: inherit;\n  }\n\n[data-f7-ca28ad99b5] .hidden {\n    display: none;\n  }\n\n[data-f7-ca28ad99b5] .active>.item-content>.item-inner>.item-title>a {\n    color: var(--f7-theme-color);\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět {{$app.translation.t(\"book:chapters\")}} {{$app.translation.t(\"cancel\")}} {{$app.translation.t(\"notFound\")}} {{> \"routes\"}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/chapters.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/color-themes.f7.html":
/*!********************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/color-themes.f7.html ***!
  \********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let colors = {\n      red: 'Červená',\n      green: 'Zelená',\n      blue: 'Modrá',\n      pink: 'Růžová',\n      yellow: 'Žlutá',\n      orange: 'Oranžová',\n      gray: 'Šedá',\n      black: 'Černá',\n      brown: 'brown'\n    };\n    let self = this;\n    let app = self.$app;\n    let fonts = [\n      {\n        name: 'PT Sans',\n        value: 'PT Sans, sans-serif'\n      },\n      {\n        name: 'Nunito',\n        value: 'Nunito, sans-serif'\n      },\n      {\n        name: 'Poppins',\n        value: 'Poppins, sans-serif'\n      },\n      {\n        name: 'Ubuntu',\n        value: 'Ubuntu, sans-serif'\n      },\n      {\n        name: 'Palanquin',\n        value: 'Palanquin, sans-serif'\n      },\n      {\n        name: 'Georgia',\n        value: 'Georgia, serif'\n      },\n      {\n        name: 'Palatino Linotype',\n        value: `'Palatino Linotype', 'Book Antiqua', Palatino, serif`\n      },\n      {\n        name: 'Montserrat',\n        value: `'Montserrat', sans-serif`\n      },\n      {\n        name: 'Times New Roman',\n        value: `'Times New Roman', Times, serif`\n      },\n      {\n        name: 'Arial',\n        value: 'Arial, Helvetica, sans-serif'\n      },\n      {\n        name: 'Lucida Sans Unicode',\n        value: `'Lucida Sans Unicode', 'Lucida Grande', sans-serif`\n      },\n      {\n        name: 'Tahoma',\n        value: 'Tahoma, Geneva, sans-serif'\n      },\n      {\n        name: 'Trebuchet MS',\n        value: `'Trebuchet MS', Helvetica, sans-serif`\n      },\n      {\n        name: 'Verdana',\n        value: 'Verdana, Geneva, sans-serif'\n      },\n      {\n        name: 'Courier New',\n        value: `'Courier New', Courier, monospace`\n      },\n      {\n        name: 'Lucida Console',\n        value: `'Lucida Console', Monaco, monospace`\n      },\n      {\n        name: 'Comic Sans',\n        value: `'Comic Sans MS', cursive, sans-serif`\n      },\n      {\n        name: 'Impact',\n        value: 'Impact, Charcoal, sans-serif'\n      },\n      {\n        name: 'Tabac',\n        value: `Tabac Sans, sans-serif`\n      },\n      {\n        name: 'Source Sans 3',\n        value: `'SourceSans3', sans-serif`\n      }\n    ];\n    fonts.forEach(function (val) {\n      let escapedString = val.value.replace(/(['\"\\s])/g, '');\n      val['esc'] = escapedString.trim().toLowerCase();\n    });\n    return {\n      colors: colors,\n      colorsAmount: colors.length,\n      fonts: fonts,\n      themeName: app.bookSettings.getCurrentThemeName()\n    };\n  },\n  methods: {\n    setLayoutTheme: function (theme) {\n      let self = this;\n      let app = self.$app;\n      app.bookSettings.setTheme(theme);\n    },\n    setFont: function (font) {\n      document.body.style.setProperty('--fb-font-family', font);\n    },\n    setColorTheme: function (color) {\n      let self = this;\n      let app = self.$app;\n      let currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n      if (currentColorClass)\n        app.root.removeClass(currentColorClass[0]);\n      app.root.addClass('color-theme-' + color);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let $el = page.$el;\n      let style = getComputedStyle(document.body);\n      let defaultFont = style.getPropertyValue('--fb-font-family');\n      defaultFont = defaultFont.replace(/(['\"\\s])/g, '');\n      defaultFont = defaultFont.trim().toLowerCase();\n      $el.find('input[value=\"' + defaultFont + '\"]').attr('checked', 'checked');\n      let currentTheme = app.bookSettings.getCurrentThemeSettings();\n      $el.find('input[value=\"' + currentTheme + '\"].theme').attr('checked', 'checked');\n      let $body = $('body');\n      let $mainSwiper = $body.find('#main-swiper');\n      let zoomValue = page.$el.find('#zoom-value');\n      let range = page.app.range.create({\n        el: '#range-slider-zoom',\n        label: true,\n        min: 50,\n        max: 200,\n        step: 5,\n        value: 100,\n        on: {\n          change: function (range) {\n            let value = Math.round(range.value);\n            zoomValue.text(value);\n            $mainSwiper.removeClass(function (index, className) {\n              return (className.match(/(^|\\s)zoom-\\S+/g) || []).join(' ');\n            });\n            let xval = value;\n            $mainSwiper.addClass('zoom-' + xval);\n            page.app.swiper.get('#main-swiper').update();\n            this.updateScale();\n          }\n        }\n      });\n      range.setValue(page.app.book.params.defaultZoom);\n      page.$el.find('#zoom-plus').on('click', function () {\n        let val = range.getValue() + 5;\n        range.setValue(val);\n      });\n      page.$el.find('#zoom-minus').on('click', function () {\n        let val = range.getValue() - 5;\n        range.setValue(val);\n      });\n      const root = document.documentElement;\n      const computedStyle = getComputedStyle(root);\n      let rangePageWidth = page.app.range.create({\n        el: '#range-slider-page-width',\n        label: true,\n        min: 30,\n        max: 100,\n        step: 1,\n        value: 1,\n        on: {\n          change: function (range) {\n            root.style.setProperty('--fb-font-coeficient', range.value);\n            let widthValEl = page.$el.find('#width-value');\n            widthValEl.text(`${ range.value }`);\n            if (app.book.params.defaultPageWidth != range.value) {\n              page.$el.find('#reset-width-value').show();\n            } else {\n              page.$el.find('#reset-width-value').hide();\n            }\n          }\n        }\n      });\n      const fontCoefficient = computedStyle.getPropertyValue('--fb-font-coeficient');\n      if (!app.book.params.defaultPageWidth) {\n        app.book.params.defaultPageWidth = fontCoefficient;\n      }\n      rangePageWidth.setValue(fontCoefficient);\n      page.$el.find('#reset-width-value').on('click', function () {\n        rangePageWidth.setValue(app.book.params.defaultPageWidth);\n      });\n      page.$el.find('#page-plus').on('click', function () {\n        let val = rangePageWidth.getValue() + 1;\n        rangePageWidth.setValue(val);\n      });\n      page.$el.find('#page-minus').on('click', function () {\n        let val = rangePageWidth.getValue() - 1;\n        rangePageWidth.setValue(val);\n      });\n      let $fontSizeEl = page.$el.find('#font-size');\n      let fontValues = page.$el.find('#font-values');\n      let $fs2El = page.$el.find('#fs2');\n      let fsCo = page.app.range.create({\n        el: '#range-slider-fs2',\n        label: true,\n        min: 0.8,\n        max: 1.6,\n        step: 0.1,\n        value: 1,\n        on: {\n          change: function (range) {\n            let round = range.value.toFixed(1);\n            if (round == 1) {\n              round = 1;\n            }\n            root.style.setProperty('--fb-font-size-coeficient', round);\n            if (app.book.params.defaultFontSizeCoef != round) {\n              page.$el.find('#reset-font-value').show();\n            } else {\n              page.$el.find('#reset-font-value').hide();\n            }\n            $fs2El.text(`${ round }`);\n          }\n        }\n      });\n      const fs2Val = computedStyle.getPropertyValue('--fb-font-size-coeficient');\n      page.$el.find('#reset-font-value').on('click', function () {\n        fsCo.setValue(app.book.params.defaultFontSizeCoef);\n      });\n      if (!app.book.params.defaultFontSizeCoef) {\n        app.book.params.defaultFontSizeCoef = fs2Val;\n      }\n      $fs2El.text(fs2Val);\n      fsCo.setValue(fs2Val);\n      page.$el.find('#font-plus').on('click', function () {\n        let val = fsCo.getValue() + 0.1;\n        fsCo.setValue(val);\n      });\n      page.$el.find('#font-minus').on('click', function () {\n        let val = fsCo.getValue() - 0.1;\n        fsCo.setValue(val);\n      });\n    }\n  },\n  id: 'ed5e9da44f',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:design'), ctx_1);\n      r += '</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n\\n      <div class=\"block\">\\n        <span class=\"float-right\"><span id=\"zoom-value\">100</span>%</span>\\n      </div>\\n      <div class=\"block-title display-flex align-items-center\">';\n      r += c(ctx_1.$app.translation.t('book:sizeZoom'), ctx_1);\n      r += ' <i class=\"material-icons help tooltip-init\" data-tooltip=\"';\n      r += c(ctx_1.$app.translation.t('book:zoomText'), ctx_1);\n      r += '\">help</i></div>\\n      <div class=\"list simple-list\" style=\"zoom: 1 !important;\">\\n        <ul>\\n          <li>\\n            <div id=\"zoom-minus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_out</i>\\n              <i class=\"icon material-icons md-only\">zoom_out</i>\\n            </div>\\n            <div class=\"item-cell flex-shrink-3\">\\n              <!-- range slider -->\\n              <div id=\"range-slider-zoom\" class=\"range-slider\">\\n                <input type=\"range\">\\n              </div>\\n            </div>\\n            <div id=\"zoom-plus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_in</i>\\n              <i class=\"icon material-icons md-only\">zoom_in</i>\\n            </div>\\n          </li>\\n<!--          <li><button id=\"auto-size\" class=\"button\">';\n      r += c(ctx_1.$app.translation.t('book:auto'), ctx_1);\n      r += '</button></li>-->\\n        </ul>\\n      </div>\\n\\n<!--      <div class=\"block\">-->\\n<!--        <p></p>-->\\n<!--      </div>-->\\n\\n<!--      <div class=\"block-title display-flex justify-content-space-between\">-->\\n<!--        Velikost písma (<span id=\"font-size\">px</span>) <span id=\"font-values\">12px - 17px</span>-->\\n<!--      </div>-->\\n<!--      <div class=\"list simple-list\" style=\"zoom: 1 !important;\">-->\\n<!--        <ul>-->\\n<!--          <li>-->\\n<!--            <div class=\"item-cell width-auto flex-shrink-0\">-->\\n<!--              <i class=\"icon f7-icons ios-only\">zoom_out</i>-->\\n<!--              <i class=\"icon material-icons md-only\">zoom_out</i>-->\\n<!--            </div>-->\\n<!--            <div class=\"item-cell flex-shrink-3\">-->\\n<!--              &lt;!&ndash; range slider &ndash;&gt;-->\\n<!--              <div id=\"range-slider-font-size\" class=\"range-slider\">-->\\n<!--                <input type=\"range\">-->\\n<!--              </div>-->\\n<!--            </div>-->\\n<!--            <div class=\"item-cell width-auto flex-shrink-0\">-->\\n<!--              <i class=\"icon f7-icons ios-only\">zoom_in</i>-->\\n<!--              <i class=\"icon material-icons md-only\">zoom_in</i>-->\\n<!--            </div>-->\\n<!--          </li>-->\\n<!--        </ul>-->\\n<!--      </div>-->\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:colorTheme'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <label class=\"item-radio item-radio-icon-end item-content\">\\n              <input class=\"theme\" type=\"radio\" name=\"color-theme\" value=\"theme-light\">\\n              <i class=\"icon icon-radio\"></i>\\n              <div class=\"item-inner\" @click=\"setLayoutTheme(\\'theme-light\\')\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:daily'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">';\n      r += c(ctx_1.$app.translation.t('book:lightTheme'), ctx_1);\n      r += '</div>\\n                </div>\\n\\n              </div>\\n            </label>\\n          </li>\\n          <li>\\n            <label class=\"item-radio item-radio-icon-end item-content\">\\n              <input class=\"theme\" type=\"radio\" name=\"color-theme\" value=\"theme-dark\">\\n              <i class=\"icon icon-radio\"></i>\\n              <div class=\"item-inner\" @click=\"setLayoutTheme(\\'theme-dark\\')\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:nightly'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">';\n      r += c(ctx_1.$app.translation.t('book:darkTheme'), ctx_1);\n      r += '\\n                  </div>\\n\\n                </div>\\n              </div>\\n            </label>\\n          </li>\\n          <li>\\n            <label class=\"item-radio item-radio-icon-end item-content\">\\n              <input class=\"theme\" type=\"radio\" name=\"color-theme\" value=\"auto\">\\n              <i class=\"icon icon-radio\"></i>\\n              <div class=\"item-inner\" @click=\"setLayoutTheme(\\'auto\\')\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:autoSettings'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:autoSettingsText'), ctx_1);\n      r += '\\n                    <br>';\n      r += c(ctx_1.$app.translation.t('book:autoSettingsCurrent'), ctx_1);\n      r += ': ';\n      r += c(ctx_1.themeName, ctx_1);\n      r += '\\n                  </div>\\n\\n                </div>\\n              </div>\\n            </label>\\n          </li>\\n\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title display-flex justify-content-space-between\">\\n        <span>';\n      r += c(ctx_1.$app.translation.t('book:pageWidthTitle'), ctx_1);\n      r += '<i id=\"reset-width-value\" class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"autorenew\"></i></span> <span id=\"width-value\"></span>\\n      </div>\\n      <div class=\"list simple-list\" style=\"zoom: 1 !important;\">\\n        <ul>\\n          <li>\\n            <div id=\"page-minus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_out</i>\\n              <i class=\"icon material-icons md-only\">zoom_out</i>\\n            </div>\\n            <div class=\"item-cell flex-shrink-3\">\\n              <!-- range slider -->\\n              <div id=\"range-slider-page-width\" class=\"range-slider\">\\n                <input type=\"range\">\\n              </div>\\n            </div>\\n            <div id=\"page-plus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_in</i>\\n              <i class=\"icon material-icons md-only\">zoom_in</i>\\n            </div>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title display-flex justify-content-space-between\">\\n        <span>';\n      r += c(ctx_1.$app.translation.t('book:pageFontTile'), ctx_1);\n      r += '<i id=\"reset-font-value\" class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"autorenew\"></i></span> <span id=\"fs2\"></span>\\n      </div>\\n      <div class=\"list simple-list\" style=\"zoom: 1 !important;\">\\n        <ul>\\n          <li>\\n            <div id=\"font-minus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_out</i>\\n              <i class=\"icon material-icons md-only\">zoom_out</i>\\n            </div>\\n            <div class=\"item-cell flex-shrink-3\">\\n              <!-- range slider -->\\n              <div id=\"range-slider-fs2\" class=\"range-slider\">\\n                <input type=\"range\">\\n              </div>\\n            </div>\\n            <div id=\"font-plus\" class=\"item-cell width-auto flex-shrink-0\">\\n              <i class=\"icon f7-icons ios-only\">zoom_in</i>\\n              <i class=\"icon material-icons md-only\">zoom_in</i>\\n            </div>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title\"> ';\n      r += c(ctx_1.$app.translation.t('book:font'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n\\n\\n          ';\n      r += Template7Helpers.each.call(ctx_1, ctx_1.fonts, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          <li style=\"font-family: ';\n          r += c(ctx_2.value, ctx_2);\n          r += '\">\\n            <label class=\"item-radio item-radio-icon-end item-content\">\\n              <input type=\"radio\" name=\"font\" value=\"';\n          r += c(ctx_2.esc, ctx_2);\n          r += '\">\\n              <i class=\"icon icon-radio\"></i>\\n              <div class=\"item-inner\" @click=\"setFont(\\'';\n          r += c(ctx_2.value, ctx_2);\n          r += '\\')\">\\n                <div class=\"item-title\">';\n          r += c(ctx_2.name, ctx_2);\n          r += '\\n                  <div class=\"item-footer\">';\n          r += c(ctx_2.value, ctx_2);\n          r += '</div>\\n                </div>\\n              </div>\\n            </label>\\n          </li>\\n          ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n        </ul>\\n      </div>\\n\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n[data-f7-ed5e9da44f] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n[data-f7-ed5e9da44f] i:hover{\n    cursor: pointer;\n  }\n[data-f7-ed5e9da44f] i{\n      font-size: 17px;padding-left: 5px;color: var(--f7-theme-color);\n    -webkit-touch-callout: none; /* iOS Safari */\n    -webkit-user-select: none; /* Safari */\n    -khtml-user-select: none; /* Konqueror HTML */\n    -moz-user-select: none; /* Old versions of Firefox */\n    -ms-user-select: none; /* Internet Explorer/Edge */\n    user-select: none;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"book:design\")}} 100 % {{$app.translation.t(\"book:sizeZoom\")}} {{$app.translation.t(\"book:colorTheme\")}} {{$app.translation.t(\"book:daily\")}} {{$app.translation.t(\"book:lightTheme\")}} {{$app.translation.t(\"book:nightly\")}} {{$app.translation.t(\"book:darkTheme\")}} {{$app.translation.t(\"book:autoSettings\")}} {{$app.translation.t(\"book:autoSettingsText\")}} {{$app.translation.t(\"book:autoSettingsCurrent\")}}: {{themeName}} {{$app.translation.t(\"book:pageWidthTitle\")}} {{$app.translation.t(\"book:pageFontTile\")}} {{$app.translation.t(\"book:font\")}} {{#each fonts}} {{name}} {{value}} {{/each}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/color-themes.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/groups/groups-default.f7.html":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/groups/groups-default.f7.html ***!
  \*****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    var colors = {\n      red: 'Červená',\n      green: 'Zelená',\n      blue: 'Modrá',\n      pink: 'Růžová',\n      yellow: 'Žlutá',\n      orange: 'Oranžová',\n      gray: 'Šedá',\n      black: 'Černá',\n      brown: 'brown'\n    };\n    return {\n      colors: colors,\n      colorsAmount: colors.length\n    };\n  },\n  methods: {\n    setLayoutTheme: function (theme) {\n      var self = this;\n      var app = self.$app;\n      app.root.removeClass('theme-dark theme-light').addClass('theme-' + theme);\n    },\n    setColorTheme: function (color) {\n      var self = this;\n      var app = self.$app;\n      var currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n      if (currentColorClass)\n        app.root.removeClass(currentColorClass[0]);\n      app.root.addClass('color-theme-' + color);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      var $body = $$('body');\n      var range = app.range.create({\n        el: '.range-slider',\n        on: {\n          change: function (range) {\n            $body.css('zoom', range.value);\n          }\n        }\n      });\n    }\n  },\n  id: 'c05b9036ba',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:tools'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n      </div>\\n    </div>\\n\\n\\n    <div class=\"page-content\">\\n      <div class=\"list links-list\">\\n        <ul>\\n          <!--<li><a href=\"/discussion/\">Diskuze</a></li>\\n          <li><a href=\"/search/\">Vyhledávání</a></li>-->\\n          <li>\\n            <a href=\"/discussion/\">\\n              <div class=\"item-media\"><i class=\"f7-icons\">chat</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:discusion'), ctx_1);\n      r += '</div>\\n                <div class=\"item-after\">12</div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n            <a href=\"/comments/\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:comments'), ctx_1);\n      r += '</div>\\n                <div class=\"item-after\">4</div>\\n              </div>\\n            </a>\\n          </li>\\n\\n\\n        </ul>\\n      </div>\\n    </div>\\n\\n\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-c05b9036ba] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"book:tools\")}} Diskuze Vyhledávání --> {{$app.translation.t(\"book:discusion\")}} 12 {{$app.translation.t(\"book:comments\")}} 4 `\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/groups/groups-default.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/groups/groups-discussion.f7.html":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/groups/groups-discussion.f7.html ***!
  \********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    var colors = {\n      red: 'Červená',\n      green: 'Zelená',\n      blue: 'Modrá',\n      pink: 'Růžová',\n      yellow: 'Žlutá',\n      orange: 'Oranžová',\n      gray: 'Šedá',\n      black: 'Černá',\n      brown: 'brown'\n    };\n    return {\n      colors: colors,\n      colorsAmount: colors.length\n    };\n  },\n  methods: {\n    setLayoutTheme: function (theme) {\n      var self = this;\n      var app = self.$app;\n      app.root.removeClass('theme-dark theme-light').addClass('theme-' + theme);\n    },\n    setColorTheme: function (color) {\n      var self = this;\n      var app = self.$app;\n      var currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n      if (currentColorClass)\n        app.root.removeClass(currentColorClass[0]);\n      app.root.addClass('color-theme-' + color);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      var $body = $$('body');\n      var range = app.range.create({\n        el: '.range-slider',\n        on: {\n          change: function (range) {\n            $body.css('zoom', range.value);\n          }\n        }\n      });\n    }\n  },\n  id: 'ec330ed9f4',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:discusion'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"toolbar messagebar\">\\n      <div class=\"toolbar-inner\">\\n        <a class=\"link toggle-sheet\" href=\"#\">\\n          <i class=\"icon f7-icons ios-only\">camera_fill</i>\\n          <i class=\"icon material-icons md-only\">camera_alt</i>\\n        </a>\\n        <div class=\"messagebar-area\">\\n          <textarea placeholder=\"Zpráva\"></textarea>\\n        </div>\\n        <a class=\"link\" href=\"#\">';\n      r += c(ctx_1.$app.translation.t('send'), ctx_1);\n      r += '</a>\\n      </div>\\n      <div class=\"messagebar-sheet\"></div>\\n    </div>\\n\\n    <div class=\"page-content\">\\n\\n      <div class=\"tabs\">\\n        <div class=\"tab tab-active\" id=\"tab1\">\\n          <div class=\"block\">\\n            <p>';\n      r += c(ctx_1.$app.translation.t('book:discusion'), ctx_1);\n      r += '</p>\\n          </div>\\n        </div>\\n        <div class=\"tab\" id=\"tab2\">\\n          <div class=\"block\">\\n            <p>';\n      r += c(ctx_1.$app.translation.t('book:comments'), ctx_1);\n      r += '</p>\\n          </div>\\n        </div>\\n\\n      </div>\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-ec330ed9f4] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"book:discusion\")}} {{$app.translation.t(\"send\")}} {{$app.translation.t(\"book:discusion\")}} {{$app.translation.t(\"book:comments\")}} `\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/groups/groups-discussion.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/help/help-default.f7.html":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/help/help-default.f7.html ***!
  \*************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n    }\n  },\n  id: '8008574204',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:help'), ctx_1);\n      r += '</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:keyboardShortcuts'), ctx_1);\n      r += '</div>\\n\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"f7-icons\">arrow_right</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:arrowR'), ctx_1);\n      r += '\\n                  <div class=\"item-header\">';\n      r += c(ctx_1.$app.translation.t('book:nextPage'), ctx_1);\n      r += '</div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"f7-icons\">arrow_left</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:arrowL'), ctx_1);\n      r += '\\n                  <div class=\"item-header\">';\n      r += c(ctx_1.$app.translation.t('book:prevPage'), ctx_1);\n      r += '</div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"f7-icons\">arrow_up</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:arrowU'), ctx_1);\n      r += '\\n                  <div class=\"item-header\">';\n      r += c(ctx_1.$app.translation.t('book:moveUp'), ctx_1);\n      r += '</div>\\n\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"f7-icons\">arrow_down</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:arrowD'), ctx_1);\n      r += '\\n                  <div class=\"item-header\">';\n      r += c(ctx_1.$app.translation.t('book:moveDown'), ctx_1);\n      r += '</div>\\n\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:annotationAndGroupComments'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:openMenu'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:openMenuText'), ctx_1);\n      r += '\\n                  </div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"material-icons\">format_paint</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:highlight'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:highlightText'), ctx_1);\n      r += '\\n                  </div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"material-icons\">rate_review</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:highlightWithNote'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:highlightWithNoteText'), ctx_1);\n      r += '\\n                  </div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"material-icons\">search</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:search'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:searchText'), ctx_1);\n      r += '\\n                  </div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media elevation-9 shortcut\"><i class=\"material-icons\">comment</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:groupComment'), ctx_1);\n      r += '\\n                  <div class=\"item-footer\">\\n                    ';\n      r += c(ctx_1.$app.translation.t('book:groupCommentText'), ctx_1);\n      r += '\\n                  </div>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:interactiveHelp'), ctx_1);\n      r += '</div>\\n\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <div class=\"item-content\">\\n              <div class=\"item-media\"><i class=\"f7-icons\">bulb</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n      r += c(ctx_1.$app.translation.t('book:onOff'), ctx_1);\n      r += '</div>\\n                <div class=\"item-after\">\\n                  <label class=\"toggle toggle-init\">\\n                    <input type=\"checkbox\">\\n                    <span class=\"toggle-icon\"></span>\\n                  </label>\\n                </div>\\n              </div>\\n            </div>\\n          </li>\\n        </ul>\\n      </div>\\n\\n\\n    </div>\\n\\n\\n\\n  </div>\\n  \\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-8008574204] .shortcut {\n    width: 40px;\n    text-align: center;\n    height: 40px;\n    border-radius: 10px;\n  }\n\n[data-f7-8008574204] .shortcut i {\n    margin-left: auto;\n    margin-right: auto;\n  }\n\n[data-f7-8008574204] .help-highlights {\n    width: fit-content;\n    border-radius: 10px;\n    margin: auto;\n    margin-top: 5px;\n    margin-bottom: 5px;\n  }\n\n[data-f7-8008574204] .help-highlights i {\n    margin-left: auto;\n    margin-right: auto;\n    vertical-align: middle;\n    font-size: 24px;\n    line-height: 24px;\n    height: 24px;\n    padding: 8px;\n    color: black;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"book:help\")}} {{$app.translation.t(\"book:keyboardShortcuts\")}} {{$app.translation.t(\"book:arrowR\")}} {{$app.translation.t(\"book:nextPage\")}} {{$app.translation.t(\"book:arrowL\")}} {{$app.translation.t(\"book:prevPage\")}} {{$app.translation.t(\"book:arrowU\")}} {{$app.translation.t(\"book:moveUp\")}} {{$app.translation.t(\"book:arrowD\")}} {{$app.translation.t(\"book:moveDown\")}} {{$app.translation.t(\"book:annotationAndGroupComments\")}} {{$app.translation.t(\"book:openMenu\")}} {{$app.translation.t(\"book:openMenuText\")}} {{$app.translation.t(\"book:highlight\")}} {{$app.translation.t(\"book:highlightText\")}} {{$app.translation.t(\"book:highlightWithNote\")}} {{$app.translation.t(\"book:highlightWithNoteText\")}} {{$app.translation.t(\"book:search\")}} {{$app.translation.t(\"book:searchText\")}} {{$app.translation.t(\"book:groupComment\")}} {{$app.translation.t(\"book:groupCommentText\")}} {{$app.translation.t(\"book:interactiveHelp\")}} {{$app.translation.t(\"book:onOff\")}} `\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/help/help-default.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/left_menu.f7.html":
/*!*****************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/left_menu.f7.html ***!
  \*****************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let cacheState = 'none';\n    if (this.$app.offline) {\n      cacheState = this.$app.offline.params.cacheState;\n    }\n    return {\n      chapters: this.$app.book.getBookChaptersTree(),\n      gcUnread: 0,\n      backTolibraryButton: this.$app.data.backTolibraryButton,\n      bookId: this.$app.id,\n      cacheState: cacheState,\n      czechFlag: __webpack_require__(/*! ../images/czech.svg */ \"./src/core/custom_plugins/book/images/czech.svg\"),\n      engFlag: __webpack_require__(/*! ../images/english.svg */ \"./src/core/custom_plugins/book/images/english.svg\"),\n      downloadAllowed: true\n    };\n  },\n  methods: {\n    isPwa: function () {\n      return [\n        'fullscreen',\n        'standalone',\n        'minimal-ui'\n      ].some(displayMode => window.matchMedia('(display-mode: ' + displayMode + ')').matches);\n    },\n    openAlert: function () {\n      var self = this.$app.dialog.alert('Hello world!');\n    },\n    swipeTo: function (a, e) {\n      this.$app.swiper.get('#main-swiper').slideTo(2);\n    },\n    updateGcCount: async function (a, e) {\n      let app = this.$app;\n      let gcUnread = await app.highlightComments.getUnreadCount();\n      this.$setState({ gcUnread: gcUnread });\n    },\n    backtoLib: function () {\n      let app = this.$app;\n      window.open(app.book.params.libraryUrl, '_self');\n    },\n    backtoLibInApp: function () {\n      let msg = JSON.stringify({ closeBook: true });\n      window.parent.postMessage(msg, '*');\n    },\n    changeLan: function (lang) {\n      let app = this.$app;\n      app.translation.changeLanguage(lang);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      function closeParentFrame() {\n      }\n      let c = this;\n      let registerButton = (isInApp = false) => {\n        c.$setState({ backTolibraryButton: true });\n        setTimeout(() => {\n          page.$el.find('#fb-back-to-lib').off('click');\n          if ((app.device.android || app.device.ios) && window.self !== window.top) {\n            page.$el.find('#fb-back-to-lib').on('click', function () {\n              c.backtoLibInApp();\n              return true;\n            });\n          } else {\n            page.$el.find('#fb-back-to-lib').on('click', function () {\n              c.backtoLib();\n              return true;\n            });\n          }\n        }, 1000);\n      };\n      registerButton();\n      app.data.myEvents.on('message:close', function (token) {\n        if (typeof c.$setState !== 'undefined') {\n          c.$setState({ downloadAllowed: false });\n        }\n      });\n      app.data.myEvents.off('offline:chacheStateChanged');\n      app.data.myEvents.on('offline:chacheStateChanged', function (res) {\n        c.$setState({ cacheState: res });\n      });\n      app.data.myEvents.on('api:syncGroupComments', function (serverComments) {\n        if (typeof c.updateGcCount !== 'undefined') {\n          c.updateGcCount();\n        }\n      });\n      function toggleFullScreen() {\n        if (document.fullScreenElement && document.fullScreenElement !== null || !document.mozFullScreen && !document.webkitIsFullScreen) {\n          if (document.documentElement.requestFullScreen) {\n            document.documentElement.requestFullScreen();\n          } else if (document.documentElement.mozRequestFullScreen) {\n            document.documentElement.mozRequestFullScreen();\n          } else if (document.documentElement.webkitRequestFullScreen) {\n            document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);\n          }\n        } else {\n          if (document.cancelFullScreen) {\n            document.cancelFullScreen();\n          } else if (document.mozCancelFullScreen) {\n            document.mozCancelFullScreen();\n          } else if (document.webkitCancelFullScreen) {\n            document.webkitCancelFullScreen();\n          }\n        }\n      }\n      page.$el.find('#fullscreen').on('click', function () {\n        toggleFullScreen();\n      });\n      $('.swipe-to-event').on('click', function (e) {\n        page.app.swiper.get('#main-swiper').slideTo($$(this).data('chapterindex'));\n        e.stopImmediatePropagation;\n        e.preventDefault;\n        this.onclick = undefined;\n        return false;\n      });\n      app.data.myEvents.on('logged', function () {\n        if (typeof c.$setState !== 'undefined') {\n          c.$setState({ isLogged: app.user.isLogged() });\n        }\n      });\n    },\n    pageAfterOut: function () {\n    },\n    pageAfterIn: async function () {\n    }\n  },\n  id: 'dafcd20f1b',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left left-top\">\\n\\n          <a href=\"#\" class=\"link panel-close\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('book:navigation'), ctx_1);\n      r += '</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.$app.builder, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      ';\n          r += Template7Helpers.if.call(ctx_2, ctx_2.$app.builder.params.development.enable, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n      <div class=\"block-title\">';\n              r += c(ctx_3.$app.translation.t('book:development'), ctx_3);\n              r += '</div>\\n      <div class=\"list links-list\">\\n        <ul>\\n\\n          <li><a href=\"/builder-menu/\">Builder</a></li>\\n\\n        </ul>\\n      </div>\\n\\n      ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n      <div class=\"block\">\\n        <p>';\n      r += c(ctx_1.$app.translation.t('book:welcomeInBook'), ctx_1);\n      r += '</p>\\n      </div>\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:chapters'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <a class=\"item-link item-content\" href=\"/kapitoly/\">\\n\\n              <div class=\"item-media\"><i class=\"material-icons\">book</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:chapters'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n        </ul>\\n      </div>\\n      <div class=\"block-title\"> ';\n      r += c(ctx_1.$app.translation.t('book:tools'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <a class=\"item-link item-content\" id=\"fullscreen\" href=\"#\">\\n              <div class=\"item-media\"><i class=\"material-icons\">fullscreen</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:fullscreen'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n            <a class=\"item-link item-content\" href=\"/color-themes/\">\\n              <div class=\"item-media\"><i class=\"material-icons\">settings_brightness</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:bookDesign'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n\\n          <li>\\n            <a class=\"item-link item-content\" href=\"/help/\">\\n              <div class=\"item-media\"><i class=\"material-icons\">help_outline</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:help'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n            <a class=\"item-link item-content\" href=\"/settings-default/\">\\n              <div class=\"item-media\"><i class=\"material-icons\">settings_applications</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:settings'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n\\n          ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$app.offline.params.enabled', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          ';\n          r += Template7Helpers.js_if.call(ctx_2, 'this.downloadAllowed', {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          <li>\\n            <a class=\"item-link item-content\" href=\"/book-offline/\">\\n              ';\n              r += Template7Helpers.js_if.call(ctx_3, 'this.cacheState == \\'none\\' && window.navigator.onLine', {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n              <div class=\"item-media\"><i class=\"material-icons\">wifi</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n                  r += c(ctx_4.$app.translation.t('offline:title'), ctx_4);\n                  r += '\\n                </div>\\n              </div>\\n              ';\n                  return r;\n                },\n                inverse: function empty() {\n                  return '';\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n              ';\n              r += Template7Helpers.js_if.call(ctx_3, 'this.cacheState != \\'none\\'', {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n              <div class=\"item-media\"><i class=\"material-icons\" style=\"color: #7BBC33;\">wifi</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n                  r += c(ctx_4.$app.translation.t('offline:availableToDownload'), ctx_4);\n                  r += '\\n                </div>\\n              </div>\\n              ';\n                  return r;\n                },\n                inverse: function empty() {\n                  return '';\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n            </a>\\n          </li>\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n          ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n\\n        </ul>\\n      </div>\\n      ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$app.highlightComments.params.enabled', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <div class=\"block-title\">';\n          r += c(ctx_2.$app.translation.t('book:anotation'), ctx_2);\n          r += ',\\n        ';\n          r += c(ctx_2.$app.translation.t('book:comments'), ctx_2);\n          r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n\\n\\n          <li>\\n            <a href=\"/nastroje/\" data-force=\"true\" data-ignore-cache=\"true\" class=\"item-link item-content\">\\n              <div class=\"item-media\"><i class=\"material-icons\">format_paint</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n          r += c(ctx_2.$app.translation.t('book:anotation'), ctx_2);\n          r += '\\n                  <div class=\"item-footer\">';\n          r += c(ctx_2.$app.translation.t('book:highlightAndNotes'), ctx_2);\n          r += '</div>\\n                </div>\\n\\n              </div>\\n            </a>\\n          </li>\\n          <li>\\n            <a href=\"/gc-list/\" data-force=\"true\" data-ignore-cache=\"true\" class=\"item-content item-link\">\\n              <div class=\"item-media\"><i class=\"material-icons\">comment</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n          r += c(ctx_2.$app.translation.t('book:groupComments'), ctx_2);\n          r += '</div>\\n                ';\n          r += Template7Helpers.if.call(ctx_2, ctx_2.gcUnread, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n                <div class=\"item-after\"><span class=\"badge color-red\" style=\"color: #fff;\">';\n              r += c(ctx_3.gcUnread, ctx_3);\n              r += '</span></div>\\n                ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n              </div>\\n            </a>\\n          </li>\\n\\n\\n\\n        </ul>\\n      </div>\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('book:library'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n          <li>\\n            <a id=\"fb-back-to-lib\" class=\"item-link item-content\" href=\"#\">\\n\\n              <div class=\"item-media\"><i class=\"material-icons\">backspace</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n      r += c(ctx_1.$app.translation.t('book:backToLibrary'), ctx_1);\n      r += '\\n                </div>\\n              </div>\\n            </a>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('user'), ctx_1);\n      r += '</div>\\n      <div class=\"list\">\\n        <ul>\\n\\n\\n          ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.$app.user.isLogged(), {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n\\n\\n          <li>\\n            <a href=\"/user/\" data-force=\"true\" data-ignore-cache=\"true\" class=\"item-link item-content\">\\n              <div class=\"item-media\"><i class=\"material-icons\">person_round</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n          r += c(ctx_2.$app.user.identity.fullname, ctx_2);\n          r += '\\n                </div>\\n\\n              </div>\\n            </a>\\n          </li>\\n\\n          ';\n          r += Template7Helpers.if.call(ctx_2, ctx_2.$app.user.isEditor, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n          ';\n              r += Template7Helpers.if.call(ctx_3, ctx_3.$app.params.builder, {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n          ';\n                  r += Template7Helpers.unless.call(ctx_4, ctx_4.$app.params.builder.development.enable, {\n                    hash: {},\n                    data: data_4 || {},\n                    fn: function (ctx_5, data_5) {\n                      var r = '';\n                      r += '\\n          <li>\\n            <a href=\"';\n                      r += c(ctx_5.$app.apiManager.params.bookBuilderUrl, ctx_5);\n                      r += '\" id=\"open-builder\" class=\"item-link item-content external\">\\n              <div class=\"item-media\"><i class=\"material-icons\">build_circle</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n                      r += c(ctx_5.$app.translation.t('book:openEditor'), ctx_5);\n                      r += '\\n                </div>\\n\\n              </div>\\n            </a>\\n          </li>\\n          ';\n                      return r;\n                    },\n                    inverse: function empty() {\n                      return '';\n                    },\n                    root: root,\n                    parents: [\n                      ctx_3,\n                      ctx_2,\n                      ctx_1\n                    ]\n                  });\n                  r += '\\n          ';\n                  return r;\n                },\n                inverse: function empty() {\n                  return '';\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n          ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n          ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n\\n          <li>\\n            <a href=\"/login/true\" data-force=\"true\" data-ignore-cache=\"true\" class=\"item-link item-content\">\\n              <div class=\"item-media\"><i class=\"material-icons\">person_round</i></div>\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">\\n                  ';\n          r += c(ctx_2.$app.translation.t('book:logIn'), ctx_2);\n          r += '\\n                </div>\\n\\n              </div>\\n            </a>\\n          </li>\\n\\n          ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n        </ul>\\n      </div>\\n\\n\\n      <div class=\"block-title\">';\n      r += c(ctx_1.$app.translation.t('language'), ctx_1);\n      r += '</div>\\n\\n      <div class=\"list \">\\n        <ul>\\n\\n          <li>\\n            <div class=\"item-inner flag-container\">\\n\\n              ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$app.translation.params.language == \\'cs\\'', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n              <img class=\"flag selected\" @click=\"changeLan(\\'cs\\')\" src=\"';\n          r += c(ctx_2.czechFlag, ctx_2);\n          r += '\" alt=\"cs\">\\n\\n              <img class=\"flag\" @click=\"changeLan(\\'en\\')\" src=\"';\n          r += c(ctx_2.engFlag, ctx_2);\n          r += '\" alt=\"eng\">\\n              ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n              ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$app.translation.params.language == \\'en\\'', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n              <img class=\"flag\" @click=\"changeLan(\\'cs\\')\" src=\"';\n          r += c(ctx_2.czechFlag, ctx_2);\n          r += '\" alt=\"cs\">\\n\\n              <img class=\"flag selected\" @click=\"changeLan(\\'en\\')\" src=\"';\n          r += c(ctx_2.engFlag, ctx_2);\n          r += '\" alt=\"eng\">\\n              ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n            </div>\\n          </li>\\n\\n\\n        </ul>\\n      </div>\\n\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n  .red-link {\n    color: red;\n  }\n\n  .flag-container {\n    justify-content: space-around !important;\n  }\n\n  .flag {\n    max-width: 55px;\n    height: 35px;\n    border: 3px solid var(--f7-list-border-color);\n    cursor: pointer;\n  }\n\n  .selected {\n    border-color: var(--f7-theme-color);\n  }\n`,\n  styleScoped: false,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"book:navigation\")}} {{#if $app.builder}} {{#if $app.builder.params.development.enable}} {{$app.translation.t(\"book:development\")}} Builder {{/if}} {{/if}} {{$app.translation.t(\"book:welcomeInBook\")}} {{$app.translation.t(\"book:chapters\")}} {{$app.translation.t(\"book:chapters\")}} {{$app.translation.t(\"book:tools\")}} {{$app.translation.t(\"book:fullscreen\")}} {{$app.translation.t(\"book:bookDesign\")}} {{$app.translation.t(\"book:help\")}} {{$app.translation.t(\"book:settings\")}} {{#js_if \"this.$app.offline.params.enabled\" }} {{#js_if \"this.downloadAllowed\"}} {{#js_if \"this.cacheState == 'none' && window.navigator.onLine\" }} {{$app.translation.t(\"offline:title\")}} {{/js_if}} {{#js_if \"this.cacheState != 'none'\" }} {{$app.translation.t(\"offline:availableToDownload\")}} {{/js_if}} {{/js_if}} {{/js_if}} {{#js_if \"this.$app.highlightComments.params.enabled\"}} {{$app.translation.t(\"book:anotation\")}}, {{$app.translation.t(\"book:comments\")}} {{$app.translation.t(\"book:anotation\")}} {{$app.translation.t(\"book:highlightAndNotes\")}} {{$app.translation.t(\"book:groupComments\")}} {{#if gcUnread}} {{gcUnread}} {{/if}} {{/js_if}} {{$app.translation.t(\"book:library\")}} {{$app.translation.t(\"book:backToLibrary\")}} {{$app.translation.t(\"user\")}} {{#if $app.user.isLogged()}} {{$app.user.identity.fullname}} {{#if $app.user.isEditor}} {{#if $app.params.builder}} {{#unless $app.params.builder.development.enable}} {{$app.translation.t(\"book:openEditor\")}} {{/unless}} {{/if}} {{/if}} {{else}} {{$app.translation.t(\"book:logIn\")}} {{/if}} {{$app.translation.t(\"language\")}} {{#js_if \"this.$app.translation.params.language == 'cs'\"}} {{/js_if}} {{#js_if \"this.$app.translation.params.language == 'en'\"}} {{/js_if}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/left_menu.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/book/template/main_view.f7.html":
/*!*****************************************************************!*\
  !*** ./src/core/custom_plugins/book/template/main_view.f7.html ***!
  \*****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      readMode: app.book.params.readMode,\n      bookNavbarParams: app.bookNavbar.params\n    };\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      page.$el.find('#left-panel-opener').on('click', function () {\n        alert('ok');\n        app.panel.get('left').open();\n        let leftView = app.views.get($$('.view-left'));\n        leftView.router.navigate('/left-menu/', {\n          reloadCurrent: true,\n          ignoreCache: true\n        });\n      });\n      page.$el.find('#chapters-open').on('click', () => {\n        app.panel.get('left').open();\n        let leftView = app.views.get($$('.view-left'));\n        leftView.router.navigate('/kapitoly/', {\n          reloadCurrent: true,\n          ignoreCache: true\n        });\n      });\n    }\n  },\n  id: '827502e722',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\" data-name=\"home\">\\n\\n\\n\\n    ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.readMode, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n    <div id=\"main-navbar\" class=\"navbar\">\\n      <div id=\"page-progress2\"></div>\\n      <div id=\"page-progress3\" class></div>\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link icon-only panel-open\" data-panel=\"left\">\\n            <i class=\"icon f7-icons ios-only\">menu</i>\\n            <i class=\"icon material-icons md-only\">menu</i>\\n          </a>\\n        </div>\\n        <div id=\"chapters-open\" class=\"title sliding\">';\n          r += c(ctx_2.$app.translation.t('book:book'), ctx_2);\n          r += '</div>\\n<!--        <div id=\"page-progress\">0 %</div>-->\\n        <div class=\"right\">\\n          <a href=\"#\" class=\"link icon-only main-swipe-prev\">\\n            <i class=\"icon f7-icons ios-only\">chevron_left</i>\\n            <i class=\"f7-icons md-only\">chevron_left</i>\\n          </a>\\n          <a href=\"#\" class=\"link icon-only main-swipe-next\">\\n            <i class=\"icon f7-icons ios-only\">chevron_right</i>\\n            <i class=\"f7-icons md-only\">chevron_right</i>\\n          </a>\\n          <a class=\"link icon-only panel-open\" data-panel=\"right\">\\n            <i class=\"icon f7-icons ios-only\">search_strong</i>\\n            <i class=\"icon material-icons md-only\">search</i>\\n          </a>\\n        </div>\\n        <form class=\"searchbar searchbar-expandable \">\\n          <div class=\"searchbar-inner\">\\n            <div class=\"searchbar-input-wrap\">\\n              <input id=\"main-search-input\" type=\"search\" placeholder=\"Vyhledávání v\\xA0knize\">\\n              <i class=\"searchbar-icon\"></i>\\n              <span class=\"input-clear-button\"></span>\\n            </div>\\n            <span class=\"searchbar-disable-button\">';\n          r += c(ctx_2.$app.translation.t('cancel'), ctx_2);\n          r += '</span>\\n          </div>\\n        </form>\\n      </div>\\n    </div>\\n    ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n    ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.bookNavbarParams.enable, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n\\n    ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n    <style id=\"test\">\\n      :root {\\n        --f7-navbar-height: 0px;\\n      }\\n      #main-navbar{\\n        display: none;\\n      }\\n    </style>\\n    ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n\\n    ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.readMode, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n    <!-- Scrollable page content-->\\n    <div class=\"main-swiper-wrapper\">\\n      <!-- Slider container -->\\n      <div id=\"main-swiper\" class=\"swiper-container\">\\n        <!-- Slides wrapper -->\\n        <div class=\"swiper-wrapper\">\\n        </div>\\n        <!-- Pagination, if required -->\\n        <div class=\"swiper-pagination\"></div>\\n      </div>\\n    </div>\\n    ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n\\n\\n    <div id=\"gjs-edit\">\\n      <style>\\n        .gjs-dashed .sheet-modal {\\n          min-height: 1.5rem !important;\\n          display: block !important;\\n        }\\n\\n        .gjs-dashed .popover {\\n          min-height: 1.5rem !important;\\n          display: block !important;\\n        }\\n\\n        /* :root {\\n          --f7-theme-color: #c33c8f;\\n          --f7-theme-color-rgb: 195, 60, 143;\\n          --f7-theme-color-shade: #a43278;\\n          --f7-theme-color-tint: #cd5ba1\\n        } */\\n\\n        #chapters-open {\\n          cursor: pointer !important;\\n        }\\n\\n        #page-progress{\\n          width: 30px;\\n          height: 30px;\\n          line-height: 30px;\\n          text-align: center;\\n          background-color: red;\\n          border-radius: 50%;\\n          font-size: 8px;\\n          color: #fff;\\n        }\\n        #page-progress2{\\n          width: 0%;\\n          height: 2px;\\n          z-index: 99999999;\\n          background-color: var(--f7-theme-color-tint);;\\n          position: absolute;\\n          bottom: 0px;\\n        }\\n\\n        #page-progress3{\\n          left: 50%;\\n          transform: translate(-50%, -50%);\\n          font-size: 8px;\\n          color: lightgrey;\\n          display: inline-block;\\n          position: absolute;\\n          bottom: 1px;\\n          height: 8px;\\n          z-index: 99;\\n        }\\n\\n        .show-hide-text {\\n          /*visibility: hidden;*/\\n          opacity: 0;\\n          transition: visibility 0s linear 3s, opacity 3s;\\n        }\\n\\n        .show-hide-text.show {\\n          visibility: visible;\\n          opacity: 1;\\n        }\\n      </style>\\n      <div id=\"main-swiper\" class=\"md\">\\n\\n      </div>\\n    </div>\\n    ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n\\n    <div id=\"hook-under-swiper\"></div>\\n\\n  </div>\\n\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n        .gjs-dashed .sheet-modal {\n          min-height: 1.5rem !important;\n          display: block !important;\n        }\n\n        .gjs-dashed .popover {\n          min-height: 1.5rem !important;\n          display: block !important;\n        }\n\n        /* :root {\n          --f7-theme-color: #c33c8f;\n          --f7-theme-color-rgb: 195, 60, 143;\n          --f7-theme-color-shade: #a43278;\n          --f7-theme-color-tint: #cd5ba1\n        } */\n\n        #chapters-open {\n          cursor: pointer !important;\n        }\n\n        #page-progress{\n          width: 30px;\n          height: 30px;\n          line-height: 30px;\n          text-align: center;\n          background-color: red;\n          border-radius: 50%;\n          font-size: 8px;\n          color: #fff;\n        }\n        #page-progress2{\n          width: 0%;\n          height: 2px;\n          z-index: 99999999;\n          background-color: var(--f7-theme-color-tint);;\n          position: absolute;\n          bottom: 0px;\n        }\n\n        #page-progress3{\n          left: 50%;\n          transform: translate(-50%, -50%);\n          font-size: 8px;\n          color: lightgrey;\n          display: inline-block;\n          position: absolute;\n          bottom: 1px;\n          height: 8px;\n          z-index: 99;\n        }\n\n        .show-hide-text {\n          /*visibility: hidden;*/\n          opacity: 0;\n          transition: visibility 0s linear 3s, opacity 3s;\n        }\n\n        .show-hide-text.show {\n          visibility: visible;\n          opacity: 1;\n        }\n      `,\n  styleScoped: false,\n  cleanText: ` {{#if readMode}} {{$app.translation.t(\"book:book\")}} {{$app.translation.t(\"cancel\")}} {{/if}} {{#if bookNavbarParams.enable}} {{else}} :root { --f7-navbar-height: 0px; } #main-navbar{ display: none; } {{/if}} {{#if readMode}} {{else}} .gjs-dashed .sheet-modal { min-height: 1.5rem !important; display: block !important; } .gjs-dashed .popover { min-height: 1.5rem !important; display: block !important; } /* :root { --f7-theme-color: #c33c8f; --f7-theme-color-rgb: 195, 60, 143; --f7-theme-color-shade: #a43278; --f7-theme-color-tint: #cd5ba1 } */ #chapters-open { cursor: pointer !important; } #page-progress{ width: 30px; height: 30px; line-height: 30px; text-align: center; background-color: red; border-radius: 50%; font-size: 8px; color: #fff; } #page-progress2{ width: 0%; height: 2px; z-index: 99999999; background-color: var(--f7-theme-color-tint);; position: absolute; bottom: 0px; } #page-progress3{ left: 50%; transform: translate(-50%, -50%); font-size: 8px; color: lightgrey; display: inline-block; position: absolute; bottom: 1px; height: 8px; z-index: 99; } .show-hide-text { /*visibility: hidden;*/ opacity: 0; transition: visibility 0s linear 3s, opacity 3s; } .show-hide-text.show { visibility: visible; opacity: 1; } {{/if}} `\n});\n    \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/book/template/main_view.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-audio-player/css/audio.less":
/*!*********************************************************************!*\
  !*** ./src/core/custom_plugins/builder-audio-player/css/audio.less ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-audio-player/css/audio.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-audio-player/css/builder-audio-player.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-audio-player/css/builder-audio-player.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-audio-player/css/builder-audio-player.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html":
/*!****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html ***!
  \****************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let app = this.$app;\n    let paramId = $$(this.$router.$el).closest('.view-audio-create-popup').data('compId');\n    let params = {};\n    if (paramId == 'undefined') {\n      params.isAction = false;\n      params.selectedText = '';\n    } else {\n      params = this.$f7.views[`audio-${ paramId }`].params;\n    }\n    return {\n      isAction: params.isAction,\n      text: params.selectedText,\n      audioList: app.audio.params.data.filter(o => {\n        return !o.deleted;\n      })\n    };\n  },\n  methods: {\n    createAudio: function () {\n      let app = this.$app;\n      let formData = app.form.convertToData('#audio-form');\n      if (app.input.validateInputs('#audio-form')) {\n        let numId = _.maxBy(app.audio.params['data'], o => {\n          return o.track;\n        });\n        if (numId === null || numId === undefined) {\n          numId = 1;\n        } else {\n          numId = numId.track + 1;\n        }\n        let obj = {};\n        obj['name'] = formData.name;\n        obj['duration'] = formData.duration;\n        obj['file'] = formData.file;\n        obj['track'] = numId;\n        obj['deleted'] = false;\n        app.audio.params['data'].push(obj);\n        app.data.myEvents.emit('audio:audioCreated');\n      }\n    },\n    selectAudio: async function (e) {\n      let app = this.$app;\n      let self = this;\n      let durationEl = self.$el.find('.audio-duration');\n      let input = self.$el.find('.audio-path');\n      let button = self.$el.find('.create-new-audio');\n      app.data.myEvents.off('message:media');\n      app.builder.audioPopup.open();\n      app.data.myEvents.on('message:media', async function (url) {\n        let source = url;\n        source = app.apiManager.replaceMediaServerPlaceholder(source);\n        let duration = await self.getAudioDuration(source);\n        if (!duration) {\n          durationEl.val('Error - Invalid format');\n          durationEl.css('color', 'red');\n          button.addClass('disabled');\n        } else {\n          durationEl.val(duration);\n          button.removeClass('disabled');\n          durationEl.css('color', 'var(--fb-color)');\n        }\n        input.val(source);\n        app.builder.audioPopup.close();\n      });\n    },\n    getAudioDuration: function (url) {\n      return new Promise(function (resolve) {\n        var audio = new Audio();\n        $(audio).on('loadedmetadata', function () {\n          let minutes = parseInt(audio.duration / 60, 10);\n          let seconds = parseInt(audio.duration % 60);\n          let audioDur = minutes + ':' + seconds;\n          resolve(audioDur);\n        });\n        $(audio).on('error', function () {\n          resolve(false);\n        });\n        audio.src = url;\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let $block = page.$el;\n      let self = this;\n      let input = $block.find('.audio-path');\n      let button = $block.find('.create-new-audio');\n      let durationEl = $block.find('.audio-duration');\n      input.on('change', async o => {\n        let source = $$(o.target).val();\n        source = app.apiManager.replaceMediaServerPlaceholder(source);\n        let duration = await self.getAudioDuration(source);\n        if (!duration) {\n          durationEl.val('Error - Invalid format');\n          durationEl.css('color', 'red');\n          button.addClass('disabled');\n        } else {\n          durationEl.val(duration);\n          button.removeClass('disabled');\n          durationEl.css('color', 'var(--fb-color)');\n        }\n      });\n    }\n  },\n  id: 'a54596d071',\n  render() {\n    return `\n    <div class=\"page create-audio\">\n        <div class=\"block\">\n            <form class=\"list\" id=\"audio-form\">\n                <ul>\n                    <li class=\"item-content no-hairlines-between\">\n                        <div class=\"item-inner\">\n                            <div class=\"row\">\n                                <div class=\"col-100 item-input\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.audioName') }*\n                                    </div>\n                                    <div class=\"item-input-wrap\">\n                                        <input type=\"text\" name=\"name\"\n                                            placeholder=\"${ this.$app.translation.t('builder:content.audioName') }\"\n                                            required validate>\n                                        <span class=\"input-clear-button\"></span>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                    <li class=\"item-content no-hairlines-between\">\n                        <div class=\"item-inner\">\n                            <div class=\"row\">\n                                <div class=\"col-90 item-input\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.audioPath') }*\n                                    </div>\n                                    <div class=\"item-input-wrap\">\n                                        <input class=\"audio-path\" type=\"text\" name=\"file\"\n                                            placeholder=\"${ this.$app.translation.t('builder:content.audioPath') }\"\n                                            required validate>\n                                        <span class=\"input-clear-button\"></span>\n                                    </div>\n                                </div>\n                                <div class=\"col-10 item-input\">\n                                    <i class=\"icon material-icons select-audio\"\n                                        @click=\"this.selectAudio()\">library_add</i>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                    <li class=\"item-content no-hairlines-between\">\n                        <div class=\"item-inner\">\n                            <div class=\"row\">\n                                <div class=\"col-100 item-input\">\n                                    <div class=\"item-title item-label\">\n                                        ${ this.$app.translation.t('builder:content.audioLength') }*\n                                    </div>\n                                    <div class=\"item-input-wrap\">\n                                        <input type=\"text\" class=\"disabled audio-duration\" name=\"duration\"\n                                            placeholder=\"${ this.$app.translation.t('builder:content.audioLength') }\"\n                                            required validate>\n                                        <span class=\"input-clear-button\"></span>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                    <li class=\"item-content no-hairlines-between\">\n                        <div class=\"item-inner\">\n                            <div class=\"item-after\">\n                                <div class=\"button  button-fill create-new-audio\" @click=\"this.createAudio()\">\n                                    ${ this.$app.translation.t('builder:content.audioCreate') }</div>\n                            </div>\n                        </div>\n                    </li>\n\n                </ul>\n            </form>\n\n        </div>\n    </div>\n`;\n  },\n  styleScoped: false\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-audio-player/templates/create_audio.f7.es.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-citations/css/citations-popup.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-citations/css/citations-popup.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-citations/css/citations-popup.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-citations/standards/iso690.js":
/*!***********************************************************************!*\
  !*** ./src/core/custom_plugins/builder-citations/standards/iso690.js ***!
  \***********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar ISO690 = /*#__PURE__*/function () {\n  function ISO690(app) {\n    var _this = this;\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ISO690);\n    this.app = app;\n    this.book = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.book\");\n      },\n      key: \"book\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"edition\", \"publishPlace\", \"publisher\", \"publishYear\", \"isbn\", \"url\"]\n    };\n    this.web = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.web\");\n      },\n      key: \"web\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"organization\", \"webName\", \"url\", \"publishYear\", \"where\", \"date\"]\n    };\n    this.note = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.custom\");\n      },\n      key: \"note\",\n      items: [\"description\"]\n    };\n    this.periodical = {\n      name: function name() {\n        return _this.app.translation.t(\"citations:types.article\");\n      },\n      key: \"periodical\",\n      items: [\"title\", \"subtitle\", \"author\", \"authorsCol\", \"periodicName\", \"periodicSubname\", \"periodicNumber\", \"publisher\", \"publishPlace\", \"publishYear\", \"issn\"]\n    };\n    this.standard = {\n      name: \"iso690\",\n      items: [this.book, this.periodical, this.web, this.note]\n    };\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ISO690, [{\n    key: \"bookString\",\n    value: function bookString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n\n      // autoři\n      citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n\n      // název knihy\n      if (citation.hasOwnProperty(\"title\") && citation.title !== \"\" && typeof citation.title !== \"undefined\") {\n        citationString = citationString + \"<em>\" + citation.title + \"</em>\";\n      }\n\n      // podnázev knihy\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString = citationString + \"<em>: \" + citation.subtitle + \"</em>\";\n      }\n      citationString = citationString + \". \";\n\n      //poradi vydani\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString = citationString + citation.edition + \". \";\n      }\n\n      //[DEPRECATED] dalsi tvurci\n      if (citation.hasOwnProperty(\"otherCreators\") && citation.otherCreators !== \"\" && typeof citation.otherCreators !== \"undefined\") {\n        citationString = citationString + citation.otherCreators + \". \";\n      }\n\n      //místo vydání\n      var placeFlag = false;\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\") {\n        citationString = citationString + citation.publishPlace;\n        placeFlag = true;\n      }\n\n      //  vydavatel\n      var publisherFlag = false;\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        if (placeFlag) {\n          citationString += \": \";\n        }\n        citationString += citation.publisher;\n        publisherFlag = true;\n      }\n\n      //rok vydání\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        if (publisherFlag) {\n          citationString += \", \";\n        }\n        citationString += citation.publishYear;\n      }\n\n      //[DEPRECATED] datum citace\n      if (citation.hasOwnProperty(\"citationDate\") && citation.citationDate !== \"\" && typeof citation.citationDate !== \"undefined\") {\n        citationString = citationString + \"[cit. \" + citation.citationDate + \"]. \";\n      }\n\n      //Rozsah v knize\n      if (citation.hasOwnProperty(\"range\") && citation.range !== \"\" && typeof citation.range !== \"undefined\") {\n        citationString += \", \" + citation.range + \". \";\n      }\n\n      //  ISBN\n      if (citation.hasOwnProperty(\"isbn\") && citation.isbn !== \"\" && typeof citation.isbn !== \"undefined\") {\n        if (!citationString.endsWith(\" \")) {\n          citationString += \" \";\n        }\n        citationString = citationString + \"ISBN \" + citation.isbn;\n        citationString = citationString + \". \";\n      }\n      if (citation.hasOwnProperty(\"url\") && citation.url !== \"\" && typeof citation.url !== \"undefined\") {\n        if (!citationString.endsWith(\" \")) {\n          citationString += \" \";\n        }\n        citationString += app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      }\n      return citationString;\n    }\n  }, {\n    key: \"periodicalString\",\n    value: function periodicalString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n\n      // debugger\n      // autoři\n      citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n      citationString += \" \" + citation.title;\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString = citationString + \": \" + citation.subtitle;\n        citationString = citationString + \". \";\n      }\n      citationString = citationString + \"<em>\" + citation.name;\n      if (citation.hasOwnProperty(\"subname\") && citation.subname !== \"\" && typeof citation.subname !== \"undefined\") {\n        citationString = citationString + \": \" + citation.subname;\n      }\n      citationString = citationString + \". </em>\";\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\") {\n        citationString = citationString + citation.publishPlace;\n      }\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\" && citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString = citationString + \": \";\n      }\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString = citationString + citation.publisher;\n      }\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\" || citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\" && citation.hasOwnProperty(\"publisher\")) {\n        citationString = citationString + \", \";\n      }\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString = citationString + citation.publishYear;\n      }\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString = citationString + \", \";\n      } else {\n        citationString = citationString + \". \";\n      }\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString = citationString + citation.edition + \". \";\n      }\n      if (citation.hasOwnProperty(\"isbn\") && citation.isbn !== \"\" && typeof citation.isbn !== \"undefined\") {\n        citationString = citationString + \"ISSN \" + citation.issn + \". \";\n      }\n      return citationString;\n    }\n  }, {\n    key: \"webString\",\n    value: function webString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n      var authorCount = citation.authors.length;\n      if (authorCount == 0 || citation.authors[0].name == \"\" && citation.authors[0].surname == \"\") {\n        if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n          citationString += citation.publisher + \". \";\n        }\n      } else {\n        citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n      }\n      citationString += citation.title;\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString = citationString + \": \" + citation.subtitle;\n      }\n      citationString = citationString + \". \";\n      if (citation.hasOwnProperty(\"name\") && citation.name !== \"\" && typeof citation.name !== \"undefined\") {\n        citationString = citationString + \"<em>\" + citation.name + \"</em>\";\n      }\n      if (citation.hasOwnProperty(\"where\") && citation.where !== \"\" && typeof citation.where !== \"undefined\") {\n        citationString = citationString + \" [\" + citation.where + \"].\";\n      }\n\n      // if (\n      //   citation.hasOwnProperty(\"publishPlace\") &&\n      //   citation.publishPlace !== \"\" &&\n      //   typeof citation.publishPlace !== \"undefined\"\n      // ) {\n      //   citationString = citationString + citation.publishPlace;\n      // }\n\n      // if (\n      //   citation.hasOwnProperty(\"publishPlace\") &&\n      //   citation.publishPlace !== \"\" &&\n      //   typeof citation.publishPlace !== \"undefined\" &&\n      //   citation.hasOwnProperty(\"publisher\") &&\n      //   citation.publisher !== \"\" &&\n      //   typeof citation.publisher !== \"undefined\"\n      // ) {\n      //   citationString = citationString + \": \";\n      // }\n\n      // if (\n      //   citation.hasOwnProperty(\"publisher\") &&\n      //   citation.publisher !== \"\" &&\n      //   typeof citation.publisher !== \"undefined\"\n      // ) {\n      //   citationString = citationString + citation.publisher;\n      // }\n\n      // if (\n      //   (citation.hasOwnProperty(\"publisher\") &&\n      //     citation.publisher !== \"\" &&\n      //     typeof citation.publisher !== \"undefined\") ||\n      //   (citation.hasOwnProperty(\"publishPlace\") &&\n      //     citation.publishPlace !== \"\" &&\n      //     typeof citation.publishPlace !== \"undefined\" &&\n      //     citation.hasOwnProperty(\"publisher\"))\n      // ) {\n      //   citationString = citationString + \", \";\n      // }\n\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString = citationString + \" \" + citation.publishYear;\n      }\n      if (citation.hasOwnProperty(\"date\") && citation.date !== \"\" && typeof citation.date !== \"undefined\") {\n        citationString += \" [cit. \" + citation.date + \"]\";\n      }\n      if (citation.hasOwnProperty(\"url\") && citation.url !== \"\" && typeof citation.url !== \"undefined\") {\n        citationString += \" \" + app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      }\n      return citationString;\n    }\n  }, {\n    key: \"createCitationAuthorString\",\n    value: function createCitationAuthorString(authors, col) {\n      var app = this.app;\n      var authorsString = \"\";\n      var countAuthors = authors.length;\n      $.each(authors, function (i, author) {\n        var last = false;\n        if (countAuthors > 1 && i > 0) {\n          if (i === countAuthors - 1) {\n            authorsString = authorsString + \" \" + app.translation.t(\"citations:strings.and\") + \" \";\n          } else {\n            authorsString = authorsString + \", \";\n          }\n        }\n        authorsString = authorsString + author.surname.toUpperCase() + \", \";\n        if (author.name.includes(\".\")) {\n          authorsString += author.name.charAt(0).toUpperCase() + author.name.slice(1);\n        } else {\n          authorsString += author.name.charAt(0).toUpperCase() + author.name.slice(1).toLowerCase();\n        }\n        if (col && col.length > 0) {\n          authorsString += app.translation.t(\"citations:strings.colective\");\n        }\n      });\n      if (authorsString !== \"\") {\n        authorsString = authorsString + \". \";\n      }\n      return authorsString;\n    }\n\n    //[DEPRECATED]\n  }, {\n    key: \"jurnalString\",\n    value: function jurnalString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n      citationString = \"<em>\" + citation.title;\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString = citationString + \": \" + citation.subtitle;\n      }\n      citationString = citationString + \". </em>\";\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString = citationString + citation.edition + \". \";\n      }\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\") {\n        citationString = citationString + citation.publishPlace;\n      }\n      if (citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\" && citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString = citationString + \": \";\n      }\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\") {\n        citationString = citationString + citation.publisher;\n      }\n      if (citation.hasOwnProperty(\"publisher\") && citation.publisher !== \"\" && typeof citation.publisher !== \"undefined\" || citation.hasOwnProperty(\"publishPlace\") && citation.publishPlace !== \"\" && typeof citation.publishPlace !== \"undefined\" && citation.hasOwnProperty(\"publisher\")) {\n        citationString = citationString + \", \";\n      }\n      if (citation.hasOwnProperty(\"publishYear\") && citation.publishYear !== \"\" && typeof citation.publishYear !== \"undefined\") {\n        citationString = citationString + citation.publishYear + \". \";\n      }\n      citationString = citationString + \"ISSN \" + citation.issn + \".\";\n      return citationString;\n    }\n    //[DEPRECATED]\n  }, {\n    key: \"onlineString\",\n    value: function onlineString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n      citationString = citation.title + \". \";\n      if (citation.hasOwnProperty(\"name\") && citation.name !== \"\" && typeof citation.name !== \"undefined\") {\n        citationString = citationString + \"<em>\" + citation.name + \"</em>\";\n      }\n      citationString = citationString + \" [\" + citation.type + \"]. \";\n      citationString = citationString + citation.range;\n      citationString = citationString + \" [cit. \" + citation.date + \"]. \" + app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      return citationString;\n      //return citation.title + '<em>'+citation.name +'</em>' + ' ['+citation.type+']., ' +citation.range +' [cit. '+citation.date+']. Dostupné z: <a href=\"'+citation.url+'\" class=\"external\" target=\"_blank\">'+citation.url+'</a>';\n    }\n    //[DEPRECATED]\n  }, {\n    key: \"academicString\",\n    value: function academicString(citation) {\n      var app = this.app;\n      var citationString = \"\";\n\n      // autoři\n      citationString = this.createCitationAuthorString(citation.authors, citation.authorsCol);\n\n      // název knihy\n      citationString = citationString + \"<em>\" + citation.title + \"</em>\";\n\n      // podnázev knihy\n      if (citation.hasOwnProperty(\"subtitle\") && citation.subtitle !== \"\" && typeof citation.subtitle !== \"undefined\") {\n        citationString = citationString + \"<em>: \" + citation.subtitle + \"</em>\";\n      }\n      citationString = citationString + \". \";\n\n      //místo vydání\n      citationString = citationString + citation.publishPlace + \", \";\n\n      //rok vydání\n      citationString = citationString + citation.publishYear + \", \";\n\n      //rozsah\n      citationString = citationString + citation.range + \". \";\n\n      //druh práce\n      citationString = citationString + citation.kind + \". \";\n\n      //  vydavatel\n      citationString = citationString + citation.school + \".\";\n\n      //  ISBN\n      if (citation.hasOwnProperty(\"isbn\") && citation.isbn !== \"\" && typeof citation.isbn !== \"undefined\") {\n        citationString = citationString + \"ISBN \" + citation.isbn;\n        citationString = citationString + \".\";\n      }\n      return citationString;\n    }\n    //[DEPRECATED]\n  }, {\n    key: \"technicalReportOnline\",\n    value: function technicalReportOnline(citation) {\n      var app = this.app;\n      var citationString = \"\";\n\n      // autoři\n      citationString = this.createCitationAuthorString(citation.authors);\n\n      // název zpravy\n      citationString = citationString + \"<em>\" + citation.title + \"</em>\";\n\n      //typ media\n      citationString = citationString + \" [online]. \";\n\n      //poradi vydani\n      if (citation.hasOwnProperty(\"edition\") && citation.edition !== \"\" && typeof citation.edition !== \"undefined\") {\n        citationString = citationString + citation.edition + \". \";\n      }\n\n      // oznaceni a cislo vyzkumne zpravy\n      citationString = citationString + citation.designation + \". \";\n\n      //  vydavatel\n      citationString = citationString + citation.institution + \".\";\n\n      //rok vydání\n      citationString = citationString + citation.publishYear + \". \";\n\n      //datum citovani\n      citationString = citationString + \"[cit. \" + citation.date + \"]. \";\n\n      //url\n      citationString = citationString + app.translation.t(\"citations:strings.available\") + ': <a href=\"' + citation.url + '\" class=\"external\" target=\"_blank\">' + citation.url + \"</a>\";\n      return citationString;\n    }\n    //[DEPRECATED]\n  }, {\n    key: \"rangeString\",\n    value: function rangeString(citation) {\n      var rangeString = \"\";\n      var refCit = _.find(this.app.citations.params.data, function (o) {\n        return o.id == citation.ref && !o.deleted;\n      });\n      var refCitCopy = _.cloneDeep(refCit);\n      refCitCopy[\"range\"] = citation.range;\n      switch (refCit.type) {\n        case \"book\":\n          rangeString = this.bookString(refCitCopy);\n          break;\n        case \"web\":\n          rangeString = this.webString(refCitCopy);\n          break;\n        case \"academic_work\":\n          rangeString = this.academicString(refCitCopy);\n          break;\n        case \"jurnal\":\n          rangeString = this.jurnalString(refCitCopy);\n          break;\n        case \"periodical\":\n          rangeString = this.periodicalString(refCitCopy);\n          break;\n      }\n      return rangeString;\n    }\n  }, {\n    key: \"getStandard\",\n    value: function getStandard() {\n      return this.standard;\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  ISO690: ISO690\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-citations/standards/iso690.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html ***!
  \**************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      citations: app.citations,\n      citationsData: app.citations.params.data.filter(citation => {\n        return !citation.deleted;\n      }),\n      citationsFunctions: app.citations.standardFunctions,\n      currentStandard: app.citations.params.standard\n    };\n  },\n  methods: {\n    addCitation() {\n      let app = this.$app;\n      let self = this;\n      let citCreationPopup = app.popup.create({\n        content: `\n                    <div class=\"popup popup-citations-create\">\n                        <a class=\"link popup-close\"><i class=\"icon material-icons\">highlight_off</i></a>\n                        <div class=\"toolbar\">\n                            <div class=\"toolbar-inner\">\n                                <h2 class=\"\">${ app.translation.t('citations:list.create') }</h2>\n                            </div>\n                        </div>\n                        <div class=\"view view-citation-popup\"></div>\n                    </div>\n                `,\n        on: {\n          open: el => {\n            app.views.create('.view-citation-popup', {\n              url: '/builder-citations-create/',\n              pushState: false\n            });\n          },\n          close: el => {\n            self.$setState({\n              citationsData: app.citations.params.data.filter(citation => {\n                return !citation.deleted;\n              })\n            });\n          }\n        }\n      });\n      citCreationPopup.open();\n    },\n    useCitation(e) {\n      let app = this.$app;\n      let citationNumber = $$(e.target).data('id');\n      app.data.myEvents.emit('citations:useCitation', citationNumber);\n    },\n    editCitation(e) {\n      let app = this.$app;\n      let citationNumber = $$(e.target).data('id');\n      let self = this;\n      let citCreationPopup = app.popup.create({\n        content: `\n                    <div class=\"popup popup-citations-create\" data-edit=\"${ citationNumber }\">\n                        <a class=\"link popup-close\"><i class=\"icon material-icons\">highlight_off</i></a>\n                        <div class=\"toolbar\">\n                            <div class=\"toolbar-inner\">\n                                <h2 class=\"\">${ app.translation.t('citations:list.edit') }</h2>\n                            </div>\n                        </div>\n                        <div class=\"view view-citation-popup\"></div>\n                    </div>\n                `,\n        on: {\n          open: el => {\n            app.views.create('.view-citation-popup', {\n              url: '/builder-citations-create/',\n              pushState: false,\n              reloadCurrent: true\n            });\n          },\n          close: el => {\n            self.$setState({\n              citationsData: app.citations.params.data.filter(citation => {\n                return !citation.deleted;\n              })\n            });\n          }\n        }\n      });\n      citCreationPopup.open();\n    },\n    rangeCitation(e) {\n      let app = this.$app;\n      let self = this;\n      let citationNumber = $$(e.target).data('id');\n      let citationList = app.citations.params.data;\n      let numId = _.maxBy(citationList, o => {\n        return o.id;\n      });\n      let pos = _.maxBy(citationList, o => {\n        if (!o.deleted) {\n          return o.position;\n        }\n      });\n      app.dialog.prompt(app.translation.t('citations:list.selectRange'), app.translation.t('citations:list.range'), function (range) {\n        let deep = {};\n        deep['position'] = pos.position + 1;\n        deep['id'] = numId.id + 1;\n        deep['range'] = range;\n        deep['ref'] = citationNumber;\n        deep['type'] = 'range';\n        deep['deleted'] = false;\n        app.citations.params['data'].push(deep);\n        self.$setState({\n          citationsData: app.citations.params.data.filter(citation => {\n            return !citation.deleted;\n          })\n        });\n      });\n    },\n    deleteCitation(e) {\n      let app = this.$app;\n      let citationNumber = $$(e.target).data('id');\n      let citationList = app.citations.params.data;\n      let citationIndex = _.findIndex(citationList, o => {\n        return o.id == citationNumber;\n      });\n      let citation = citationList[citationIndex];\n      citationList[citationIndex]['deleted'] = true;\n      citationList.forEach(item => {\n        if (item.position > citation.position && !item.deleted) {\n          item.position -= 1;\n        }\n      });\n      this.$setState({\n        citationsData: app.citations.params.data.filter(citation => {\n          return !citation.deleted;\n        })\n      });\n    },\n    editRange(e) {\n      let app = this.$app;\n      let self = this;\n      let citationNumber = $$(e.target).data('id');\n      let citationList = app.citations.params.data;\n      let numId = _.maxBy(citationList, o => {\n        return o.id;\n      });\n      let pos = _.maxBy(citationList, o => {\n        if (!o.deleted) {\n          return o.position;\n        }\n      });\n      let citation = _.find(citationList, o => {\n        return o.id == citationNumber;\n      });\n      app.dialog.prompt(app.translation.t('citations:list.selectRange'), app.translation.t('citations:list.editRange'), function (range) {\n        citation['range'] = range;\n        self.$setState({\n          citationsData: app.citations.params.data.filter(citation => {\n            return !citation.deleted;\n          })\n        });\n      }, () => {\n      }, citation.range);\n    },\n    resetSearch(pageEl) {\n      let allCitEl = pageEl.find('.citation-item');\n      allCitEl.forEach(function (cit) {\n        $$(cit).closest('li').removeClass('hide');\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let self = this;\n      let app = page.app;\n      if (!page.$el.parent().hasClass('view-left')) {\n        let navEl = page.$el.find('.left-panel-nav')[0];\n        $$(navEl).hide();\n      } else {\n        let useEl = page.$el.find('.use-citation');\n        $$(useEl).hide();\n      }\n      let selectEl = page.$el.find('#citationStandard-select');\n      $$(selectEl).val(this.currentStandard);\n      selectEl.off('change');\n      selectEl.on('change', el => {\n        page.app.citations.params.standard = $$(selectEl).val();\n        self.$setState({\n          citationsData: page.app.citations.params.data.filter(citation => {\n            return !citation.deleted;\n          })\n        });\n      });\n      let searchBar = this.$app.searchbar.create({\n        el: '#citations .searchbar',\n        inputEl: '#citations .searchbarx',\n        customSearch: true,\n        backdrop: false,\n        disableButton: false,\n        on: {\n          search: function (searchbar, q) {\n            let query = q;\n            query = $.trim(query).toLowerCase();\n            query = app.utils.removeDiacritics(query);\n            if (query.length > 0) {\n              let allCitations = page.$el.find('.citation-item');\n              allCitations.forEach(function (cit) {\n                let citEl = $$(cit);\n                let name = citEl.find('.item-title').text().toLowerCase();\n                name = app.utils.removeDiacritics(name);\n                if (name.includes(query)) {\n                  citEl.closest('li').removeClass('hide');\n                } else {\n                  citEl.closest('li').addClass('hide');\n                }\n              });\n            } else {\n              self.resetSearch(page.$el);\n            }\n          },\n          clear: function (searchbar, q) {\n            self.resetSearch(page.$el);\n          },\n          disable: function (searchbar, q) {\n            self.resetSearch(page.$el);\n          }\n        }\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '1ea2754925',\n  render() {\n    return `\n    <div class=\"page\" id=\"citations\">\n        <div class=\"navbar left-panel-nav\">\n            <div class=\"navbar-bg\"></div>\n            <div class=\"navbar-inner sliding\">\n                <div class=\"left\">\n                    <a href=\"#\" class=\"link back\">\n                        <i class=\"icon icon-back\"></i>\n                        <span class=\"ios-only\">${ this.$app.translation.t('back') }</span>\n                    </a>\n                </div>\n                <div class=\"title\">${ this.$app.translation.t('citations:list.title') }</div>\n            </div>\n        </div>\n        <div class=\"page-content\">\n            <div class=\"list citation-list\">\n                <ul class=\"list-citation-select\">\n                    <li class=\"item-content item-input item-input-with-value\">\n                        <div class=\"item-inner\">\n                            <div class=\"item-title item-label\">${ this.$app.translation.t('citations:list.norm') }</div>\n                            <label class=\"select-label\">\n                                <select name=\" citationStandards\" id=\"citationStandard-select\" class=\"\">\n                                    ${ this.citations.allStandards.map(el => `\n                                    <option value=\"${ el }\">${ el }</option>\n                                    `).join('') }\n                                </select>\n                            </label>\n                        </div>\n                    </li>\n                    <li>\n                        <form class=\"searchbar\">\n                            <div class=\"searchbar-inner\">\n                                <div class=\"searchbar-input-wrap\">\n                                    <input type=\"search\" class=\"searchbarx\" placeholder=\"Search\" />\n                                    <i class=\"searchbar-icon\"></i>\n                                    <span class=\"input-clear-button\"></span>\n                                </div>\n                                <span class=\"searchbar-disable-button if-not-aurora\">Cancel</span>\n                            </div>\n                        </form>\n                    </li>\n                </ul>\n                <ul>\n                    ${ this.citationsData.map(cit => `\n                    ${ cit.type == 'range' ? '' : `\n\n                    <li class=\"citation-item\">\n                        <div class=\"item-content\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-media range-icon\">\n                                    ${ cit.type == 'book' ? `<i class=\"icon f7-icons\">book</i>` : '' }\n                                    ${ cit.type == 'web' ? `<i class=\"icon material-icons\">language</i>` : '' }\n                                    ${ cit.type == 'periodical' ? `<i class=\"icon material-icons\">description</i>` : '' }\n                                    ${ cit.type == 'note' ? `<i class=\"icon material-icons\">text_fields</i>` : '' }\n                                </div>\n                                <div class=\"item-title\">\n                                    ${ this.citations.createCitationString(cit.id) }\n                                </div>\n                                <div class=\"item-after\">\n                                    <i class=\"material-icons use-citation\" @click=\"useCitation\"\n                                        data-id=\"${ cit.id }\">done</i>\n\n                                    ${ cit.type != 'periodical' ? `<i data-id=\"${ cit.id }\" @click=\"rangeCitation\"\n                                        class=\"material-icons range-${ cit.id }\">add</i>` : '' }\n                                    <i class=\"material-icons range-${ cit.id }\" @click=\"editCitation\"\n                                        data-id=\"${ cit.id }\">edit</i>\n                                    <i data-id=\"${ cit.id }\" @click=\"deleteCitation\" class=\"material-icons\">delete</i>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n\n                    ` }\n\n                    ${ this.citationsData.map(citRange => `\n                    ${ citRange.type == 'range' && citRange.hasOwnProperty('ref') && citRange.ref == cit.id ? `\n\n                    <li class=\"citation-item\">\n                        <div class=\"item-content item-content-range\">\n                            <div class=\"item-inner\">\n                                <div class=\"item-media range-icon\">\n                                    <i class=\"icon material-icons\">straighten</i>\n                                </div>\n                                <div class=\"item-title\">\n                                    ${ this.citations.createCitationString(citRange.id) }\n                                </div>\n\n                                <div class=\"item-after\">\n                                    <i class=\"material-icons use-citation\" @click=\"useCitation\"\n                                        data-id=\"${ citRange.id }\">done</i>\n                                    <i class=\"material-icons range-${ citRange.id }\" @click=\"editRange\"\n                                        data-id=\"${ citRange.id }\">edit</i>\n                                    <i data-id=\"${ citRange.id }\" @click=\"deleteCitation\"\n                                        class=\"material-icons\">delete</i>\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n\n                    ` : '' }\n\n                    `).join('') }\n\n                    `).join('') }\n                </ul>\n            </div>\n            <div class=\"list\">\n                <ul class=\"button-list\">\n                    <li class=\"item-content\">\n                        <div class=\"item-inner\">\n                            <div class=\"item-after\">\n                                <div class=\"button\" @click=\"addCitation()\"><i class=\"icon material-icons\">add_circle</i>\n                                    ${ this.$app.translation.t('citations:list.add') }\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n\n        </div>\n    </div>\n`;\n  },\n  style: `\n\n`,\n  styleScoped: false\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-citations/templates/citation_list.f7.es.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-colors/colors.less":
/*!************************************************************!*\
  !*** ./src/core/custom_plugins/builder-colors/colors.less ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-colors/colors.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-link/css/link.less":
/*!************************************************************!*\
  !*** ./src/core/custom_plugins/builder-link/css/link.less ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-link/css/link.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/example-map.json":
/*!********************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/example-map.json ***!
  \********************************************************************/
/*! exports provided: id, formatVersion, ideas, attr, title, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = JSON.parse(\"{\\\"id\\\":\\\"root\\\",\\\"formatVersion\\\":3,\\\"ideas\\\":{\\\"1\\\":{\\\"title\\\":\\\"Press Space or double-click to edit\\\",\\\"id\\\":1,\\\"attr\\\":{\\\"position\\\":[200,80,1]}},\\\"2\\\":{\\\"title\\\":\\\"joj\\\",\\\"id\\\":2,\\\"attr\\\":{\\\"position\\\":[40,217.19999998807907,1],\\\"style\\\":{\\\"width\\\":50,\\\"textAlign\\\":\\\"center\\\"}}}},\\\"attr\\\":{},\\\"title\\\":\\\"text options\\\"}\");\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/example-map.json?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/calculate-layout.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/calculate-layout.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar contentUpgrade = __webpack_require__(/*! mindmup-mapjs-model */ \"./node_modules/mindmup-mapjs-model/index.js\").contentUpgrade,\n  Theme = __webpack_require__(/*! ./theme */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js\"),\n  extractConnectors = __webpack_require__(/*! ./layouts/extract-connectors */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/extract-connectors.js\"),\n  layoutLinks = __webpack_require__(/*! ./layouts/links */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/links.js\"),\n  MultiRootLayout = __webpack_require__(/*! ./multi-root-layout */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/multi-root-layout.js\"),\n  defaultLayouts = {\n    'standard': __webpack_require__(/*! ./layouts/standard */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/standard.js\"),\n    'top-down': __webpack_require__(/*! ./layouts/top-down */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/top-down.js\")\n  },\n  attachStyles = function attachStyles(nodes, theme) {\n    'use strict';\n\n    Object.keys(nodes).forEach(function (nodeKey) {\n      var node = nodes[nodeKey];\n      node.styles = theme.nodeStyles(node.level, node.attr);\n    });\n    return nodes;\n  },\n  formatResult = function formatResult(result, idea, theme, orientation) {\n    'use strict';\n\n    return {\n      orientation: orientation,\n      nodes: attachStyles(result, theme),\n      connectors: extractConnectors(idea, result, theme),\n      links: layoutLinks(idea, result),\n      theme: idea.attr && idea.attr.theme\n    };\n  };\nmodule.exports = function calculateLayout(idea, dimensionProvider, optional) {\n  'use strict';\n\n  var layouts = optional && optional.layouts || defaultLayouts,\n    theme = optional && optional.theme || new Theme({}),\n    multiRootLayout = new MultiRootLayout(),\n    margin = theme.attributeValue(['layout'], [], ['spacing'], {\n      h: 20,\n      v: 20\n    }),\n    orientation = theme.attributeValue(['layout'], [], ['orientation'], 'standard'),\n    calculator = layouts[orientation] || layouts.standard;\n  idea = contentUpgrade(idea);\n  Object.keys(idea.ideas).forEach(function (rank) {\n    var rootIdea = idea.ideas[rank],\n      rootResult = calculator(rootIdea, dimensionProvider, {\n        h: margin.h || margin,\n        v: margin.v || margin\n      });\n    multiRootLayout.appendRootNodeLayout(rootResult, rootIdea);\n  });\n  return formatResult(multiRootLayout.getCombinedLayout(10), idea, theme, orientation);\n  // result = calculator(idea, dimensionProvider, {h: (margin.h || margin), v: (margin.v || margin)});\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/calculate-layout.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-parser.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-parser.js ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar convertToRGB = __webpack_require__(/*! ./color-to-rgb */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js\");\nmodule.exports = function colorParser(colorObj) {\n  'use strict';\n\n  if (!colorObj.color || colorObj.opacity === 0) {\n    return 'transparent';\n  }\n  if (colorObj.opacity) {\n    return 'rgba(' + convertToRGB(colorObj.color).join(',') + ',' + colorObj.opacity + ')';\n  } else {\n    return colorObj.color;\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-parser.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  regCSSRGB = new RegExp(/^rgba?\\(([^,\\s]+)[,\\s]*([^,\\s]+)[,\\s]*([^,\\s\\()]+).*$/),\n  fromCSSRGB = function fromCSSRGB(colorString) {\n    'use strict';\n\n    var matched;\n    if (regCSSRGB.test(colorString)) {\n      matched = colorString.match(regCSSRGB);\n      if (matched.length === 4) {\n        return _.map(matched.slice(1), function (i) {\n          return parseInt(i);\n        });\n      }\n    }\n  },\n  fromHexString = function fromHexString(colorString) {\n    'use strict';\n\n    var match = colorString.toString(16).match(/[a-f0-9]{6}/i);\n    var integer, r, g, b;\n    if (match) {\n      integer = parseInt(match[0], 16);\n      r = integer >> 16 & 0xFF;\n      g = integer >> 8 & 0xFF;\n      b = integer & 0xFF;\n      return [r, g, b];\n    }\n  };\nmodule.exports = function convertToRGB(colorString) {\n  'use strict';\n\n  return fromCSSRGB(colorString) || fromHexString(colorString) || [0, 0, 0];\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connector-paths.js":
/*!***********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connector-paths.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\n\nvar straight = function straight(calculatedConnector, position) {\n  'use strict';\n\n  return {\n    'd': 'M' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.from.y - position.top) + 'L' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n    'position': position\n  };\n};\nmodule.exports = {\n  'quadratic': function quadratic(calculatedConnector, position, parent, child) {\n    'use strict';\n\n    var maxOffset = Math.min(child.height, parent.height) * 1.2,\n      requestedOffset = calculatedConnector.connectorTheme.controlPoint.height * (calculatedConnector.from.y - calculatedConnector.to.y),\n      offset = Math.max(-maxOffset, Math.min(maxOffset, requestedOffset));\n    if (Math.round(calculatedConnector.from.y) === Math.round(calculatedConnector.to.y - offset)) {\n      return straight(calculatedConnector, position);\n    }\n    return {\n      'd': 'M' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.from.y - position.top) + 'Q' + Math.round(calculatedConnector.from.x - position.left) + ',' + Math.round(calculatedConnector.to.y - offset - position.top) + ' ' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n      'position': position\n    };\n  },\n  's-curve': function sCurve(calculatedConnector, position) {\n    'use strict';\n\n    var initialRadius = 10,\n      dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n      dy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n      dxIncrement = initialRadius < Math.abs(dx * 0.5) ? initialRadius * Math.sign(dx) : Math.round(dx * 0.5),\n      dyIncrement = initialRadius < Math.abs(dy * 0.5) ? initialRadius * Math.sign(dy) : Math.round(dy * 0.5);\n    return {\n      'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement + 'c0,' + (dy - 2 * dyIncrement) + ' ' + Math.round(dx / 2 - dxIncrement) + ',' + (dy - dyIncrement) + ' ' + (dx - dxIncrement) + ',' + (dy - dyIncrement),\n      'position': position\n    };\n  },\n  'top-down-s-curve': function topDownSCurve(calculatedConnector, position) {\n    'use strict';\n\n    var dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n      dy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n      initialRadius = 15,\n      dxIncrement = initialRadius * Math.sign(dx),\n      dyIncrement = initialRadius * Math.sign(dy),\n      verticalLine = Math.round(0.5 * dy) - dyIncrement,\n      flatLine = function flatLine() {\n        var yIncrement = verticalLine + Math.round(0.5 * dyIncrement);\n        return {\n          'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'v' + yIncrement + 'l' + dx + ',' + (dy - yIncrement),\n          'position': position,\n          'initialRadius': 5\n        };\n      };\n    if (initialRadius > Math.abs(dx / 2)) {\n      return flatLine();\n    }\n    return {\n      'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'v' + verticalLine + 'q0,' + dyIncrement + ' ' + dxIncrement + ',' + dyIncrement + 'h' + (dx - 2 * dxIncrement) + 'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement + 'v' + verticalLine,\n      'position': position,\n      'initialRadius': 5\n    };\n  },\n  'compact-s-curve': function compactSCurve(calculatedConnector, position) {\n    'use strict';\n\n    var initialRadius = 10,\n      dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n      dy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n      dxIncrement = initialRadius * Math.sign(dx),\n      dyIncrement = initialRadius * Math.sign(dy),\n      flatLine = function flatLine() {\n        var xIncrement = Math.round(dx / 2);\n        return {\n          'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'l' + xIncrement + ',0 ' + 'l' + (dx - xIncrement) + ',' + dy,\n          'position': position\n        };\n      };\n    if (initialRadius > Math.abs(dx * 0.5) || initialRadius > Math.abs(dy * 0.5)) {\n      return flatLine();\n    }\n    return {\n      'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement + 'v' + (dy - 2 * dyIncrement) + 'q0,' + dyIncrement + ' ' + dxIncrement + ',' + dyIncrement + 'h' + (dx - 2 * dxIncrement),\n      'position': position\n    };\n  },\n  'vertical-quadratic-s-curve': function verticalQuadraticSCurve(calculatedConnector, position) {\n    'use strict';\n\n    var dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n      dy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n      dxIncrement = dx / 2,\n      dyIncrement = dy / 2;\n    if (Math.abs(dx) < 20) {\n      return {\n        'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'l' + dx + ',' + dy,\n        initialRadius: 10,\n        'position': position\n      };\n    }\n    return {\n      'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'q0,' + Math.round(dyIncrement / 2) + ' ' + dxIncrement + ',' + dyIncrement + 'q' + dxIncrement + ',' + Math.round(dyIncrement / 2) + ' ' + dxIncrement + ',' + dyIncrement,\n      initialRadius: 10,\n      'position': position\n    };\n  },\n  'vertical-s-curve': function verticalSCurve(calculatedConnector, position) {\n    'use strict';\n\n    var initialRadius = 10,\n      dx = Math.round(calculatedConnector.to.x - calculatedConnector.from.x),\n      dy = Math.round(calculatedConnector.to.y - calculatedConnector.from.y),\n      dxIncrement = initialRadius * Math.sign(dx),\n      dyIncrement = initialRadius * Math.sign(dy);\n    if (initialRadius > Math.abs(dx * 0.5) || initialRadius > Math.abs(dy * 0.5)) {\n      return {\n        'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'l' + dx + ',' + dy,\n        'position': position\n      };\n    }\n    return {\n      'd': 'M' + (calculatedConnector.from.x - position.left) + ',' + (calculatedConnector.from.y - position.top) + 'q0,' + dyIncrement + ' ' + dxIncrement + ',' + dyIncrement + 'h' + (dx - 2 * dxIncrement) + 'q' + dxIncrement + ',0 ' + dxIncrement + ',' + dyIncrement + 'v' + (dy - 2 * dyIncrement),\n      'position': position\n    };\n  },\n  'straight': straight,\n  'no-connector': function noConnector(calculatedConnector, position) {\n    'use strict';\n\n    return {\n      'd': 'M' + Math.round(calculatedConnector.to.x - position.left) + ',' + Math.round(calculatedConnector.to.y - position.top),\n      'position': position\n    };\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connector-paths.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connectors.js":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connectors.js ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, module */\nvar Theme = __webpack_require__(/*! ./theme */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js\"),\n  _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  lineStyles = __webpack_require__(/*! ./line-styles */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-styles.js\"),\n  nodeConnectionPointX = __webpack_require__(/*! ./layouts/node-connection-point-x */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js\"),\n  appendUnderLine = function appendUnderLine(connectorCurve, calculatedConnector, position) {\n    'use strict';\n\n    if (calculatedConnector.nodeUnderline) {\n      connectorCurve.d += 'M' + (calculatedConnector.nodeUnderline.from.x - position.left) + ',' + (calculatedConnector.nodeUnderline.from.y - position.top) + ' H' + (calculatedConnector.nodeUnderline.to.x - position.left);\n    }\n    return connectorCurve;\n  },\n  appendOverLine = function appendOverLine(connectorCurve, calculatedConnector) {\n    'use strict';\n\n    var initialRadius = connectorCurve.initialRadius || 0,\n      halfWidth = calculatedConnector.nodeOverline && Math.floor(0.5 * Math.abs(calculatedConnector.nodeOverline.to.x - calculatedConnector.nodeOverline.from.x)) - 1;\n    if (calculatedConnector.nodeOverline) {\n      connectorCurve.d += 'm' + -1 * halfWidth + ',' + initialRadius + 'q0,' + -1 * initialRadius + ' ' + initialRadius + ',' + -1 * initialRadius + ' h' + 2 * (halfWidth - initialRadius) + 'q' + initialRadius + ',0 ' + initialRadius + ',' + initialRadius;\n    }\n    return connectorCurve;\n  },\n  appendBorderLines = function appendBorderLines(connectorCurve, calculatedConnector, position) {\n    'use strict';\n\n    return appendOverLine(appendUnderLine(connectorCurve, calculatedConnector, position), calculatedConnector);\n  },\n  nodeConnectionPointY = {\n    'center': function center(node) {\n      'use strict';\n\n      return Math.round(node.top + node.height * 0.5);\n    },\n    'base': function base(node) {\n      'use strict';\n\n      return node.top + node.height + 1;\n    },\n    'base-inset': function baseInset(node, inset) {\n      'use strict';\n\n      return node.top + node.height + 1 - inset;\n    },\n    'top': function top(node) {\n      'use strict';\n\n      return node.top;\n    }\n  },\n  connectorPaths = __webpack_require__(/*! ./connector-paths */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connector-paths.js\"),\n  calculateConnector = function calculateConnector(parent, child, theme) {\n    'use strict';\n\n    var calcChildPosition = function calcChildPosition() {\n        var tolerance = 10,\n          childMid = child.top + child.height * 0.5,\n          parentMid = parent.top + parent.height * 0.5;\n        if (Math.abs(parentMid - childMid) + tolerance < Math.max(child.height, parent.height * 0.75)) {\n          return 'horizontal';\n        }\n        return childMid < parentMid ? 'above' : 'below';\n      },\n      childPosition = calcChildPosition(),\n      fromStyles = parent.styles,\n      toStyles = child.styles,\n      connectionPositionDefaultFrom = theme.attributeValue(['node'], fromStyles, ['connections', 'default'], {\n        h: 'center',\n        v: 'center'\n      }),\n      connectionPositionDefaultTo = theme.attributeValue(['node'], toStyles, ['connections', 'default'], {\n        h: 'nearest-inset',\n        v: 'center'\n      }),\n      connectionPositionFrom = _.extend({}, connectionPositionDefaultFrom, theme.attributeValue(['node'], fromStyles, ['connections', 'from', childPosition], {})),\n      connectionPositionTo = _.extend({}, connectionPositionDefaultTo, theme.attributeValue(['node'], toStyles, ['connections', 'to'], {})),\n      connectorTheme = theme.connectorTheme(childPosition, toStyles, fromStyles),\n      fromInset = theme.attributeValue(['node'], fromStyles, ['cornerRadius'], 10),\n      toInset = theme.attributeValue(['node'], toStyles, ['cornerRadius'], 10),\n      borderType = theme.attributeValue(['node'], toStyles, ['border', 'type'], '');\n    var nodeUnderline = false,\n      nodeOverline = false;\n    if (borderType === 'underline' || borderType === 'under-overline') {\n      nodeUnderline = {\n        from: {\n          x: child.left,\n          y: child.top + child.height + 1\n        },\n        to: {\n          x: child.left + child.width,\n          y: child.top + child.height + 1\n        }\n      };\n    }\n    if (borderType === 'overline' || borderType === 'under-overline') {\n      nodeOverline = {\n        from: {\n          x: child.left,\n          y: child.top\n        },\n        to: {\n          x: child.left + child.width,\n          y: child.top\n        }\n      };\n    }\n    return {\n      from: {\n        x: nodeConnectionPointX[connectionPositionFrom.h](parent, child, fromInset),\n        y: nodeConnectionPointY[connectionPositionFrom.v](parent, fromInset)\n      },\n      to: {\n        x: nodeConnectionPointX[connectionPositionTo.h](child, parent, toInset),\n        y: nodeConnectionPointY[connectionPositionTo.v](child, toInset)\n      },\n      connectorTheme: connectorTheme,\n      nodeUnderline: nodeUnderline,\n      nodeOverline: nodeOverline\n    };\n  },\n  themePath = function themePath(parent, child, themeArg) {\n    'use strict';\n\n    var left = Math.min(parent.left, child.left),\n      top = Math.min(parent.top, child.top),\n      position = {\n        left: left,\n        top: top,\n        width: Math.max(parent.left + parent.width, child.left + child.width, left + 1) - left,\n        height: Math.max(parent.top + parent.height, child.top + child.height, top + 1) - top + 2\n      },\n      theme = themeArg || new Theme({}),\n      calculatedConnector = calculateConnector(parent, child, theme),\n      result = appendBorderLines(connectorPaths[calculatedConnector.connectorTheme.type](calculatedConnector, position, parent, child), calculatedConnector, position);\n    result.color = calculatedConnector.connectorTheme.line.color;\n    result.width = calculatedConnector.connectorTheme.line.width;\n    result.theme = calculatedConnector.connectorTheme;\n    return result;\n  },\n  linkPath = function linkPath(parent, child, linkAttrArg, themeArg) {\n    'use strict';\n\n    var calculateConnector = function calculateConnector(parent, child) {\n        var parentPoints = [{\n            x: parent.left + Math.round(0.5 * parent.width),\n            y: parent.top\n          }, {\n            x: parent.left + parent.width,\n            y: parent.top + Math.round(0.5 * parent.height)\n          }, {\n            x: parent.left + Math.round(0.5 * parent.width),\n            y: parent.top + parent.height\n          }, {\n            x: parent.left,\n            y: parent.top + Math.round(0.5 * parent.height)\n          }],\n          childPoints = [{\n            x: child.left + Math.round(0.5 * child.width),\n            y: child.top\n          }, {\n            x: child.left + child.width,\n            y: child.top + Math.round(0.5 * child.height)\n          }, {\n            x: child.left + Math.round(0.5 * child.width),\n            y: child.top + child.height\n          }, {\n            x: child.left,\n            y: child.top + Math.round(0.5 * child.height)\n          }];\n        var i,\n          j,\n          min = Infinity,\n          bestParent,\n          bestChild,\n          dx,\n          dy,\n          current;\n        for (i = 0; i < parentPoints.length; i += 1) {\n          for (j = 0; j < childPoints.length; j += 1) {\n            dx = parentPoints[i].x - childPoints[j].x;\n            dy = parentPoints[i].y - childPoints[j].y;\n            current = dx * dx + dy * dy;\n            if (current < min) {\n              bestParent = i;\n              bestChild = j;\n              min = current;\n            }\n          }\n        }\n        return {\n          from: parentPoints[bestParent],\n          to: childPoints[bestChild]\n        };\n      },\n      conn = calculateConnector(parent, child),\n      theme = themeArg || new Theme({}),\n      linkAttr = linkAttrArg || {},\n      left = Math.min(parent.left, child.left),\n      top = Math.min(parent.top, child.top),\n      position = {\n        left: left,\n        top: top,\n        width: Math.max(parent.left + parent.width, child.left + child.width, left) - left,\n        height: Math.max(parent.top + parent.height, child.top + child.height, top) - top\n      },\n      arrowPath = function arrowPath() {\n        var n = Math.tan(Math.PI / 9),\n          dx = conn.to.x - conn.from.x,\n          dy = conn.to.y - conn.from.y;\n        var len = 14,\n          iy,\n          a1x,\n          a2x,\n          a1y,\n          a2y,\n          m;\n        if (dx === 0) {\n          iy = dy < 0 ? -1 : 1;\n          a1x = conn.to.x + len * Math.sin(n) * iy;\n          a2x = conn.to.x - len * Math.sin(n) * iy;\n          a1y = conn.to.y - len * Math.cos(n) * iy;\n          a2y = conn.to.y - len * Math.cos(n) * iy;\n        } else {\n          m = dy / dx;\n          if (conn.from.x < conn.to.x) {\n            len = -len;\n          }\n          a1x = conn.to.x + (1 - m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n          a1y = conn.to.y + (m + n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n          a2x = conn.to.x + (1 + m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n          a2y = conn.to.y + (m - n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n        }\n        return 'M' + Math.round(a1x - position.left) + ',' + Math.round(a1y - position.top) + 'L' + Math.round(conn.to.x - position.left) + ',' + Math.round(conn.to.y - position.top) + 'L' + Math.round(a2x - position.left) + ',' + Math.round(a2y - position.top) + 'Z';\n      },\n      linkTheme = theme.linkTheme(linkAttr.type),\n      width = linkAttr.width || linkTheme.line.width,\n      lineStyle = linkAttr.lineStyle || linkTheme.line.lineStyle,\n      lineProps = {\n        color: linkAttr.color || linkTheme.line.color,\n        strokes: lineStyles.strokes(lineStyle, width),\n        linecap: lineStyles.linecap(lineStyle, width),\n        width: width\n      };\n    return {\n      d: 'M' + Math.round(conn.from.x - position.left) + ',' + Math.round(conn.from.y - position.top) + 'L' + Math.round(conn.to.x - position.left) + ',' + Math.round(conn.to.y - position.top),\n      position: position,\n      arrow: linkAttr.arrow && arrowPath(),\n      theme: linkTheme,\n      lineProps: lineProps,\n      conn: conn,\n      connection: conn\n    };\n  };\nMath.sign = Math.sign || function (val) {\n  'use strict';\n\n  return val >= 0 ? 1 : -1;\n};\nmodule.exports = {\n  themePath: themePath,\n  linkPath: linkPath\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connectors.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/default-theme.js":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/default-theme.js ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nmodule.exports = {\n  'name': 'MindMup Default',\n  'node': [{\n    'name': 'default',\n    'cornerRadius': 10.0,\n    'backgroundColor': '#E0E0E0',\n    'border': {\n      'type': 'surround',\n      'line': {\n        'color': '#707070',\n        'width': 1.0\n      }\n    },\n    'shadow': [{\n      'color': '#070707',\n      'opacity': 0.4,\n      'offset': {\n        'width': 2,\n        'height': 2\n      },\n      'radius': 2\n    }],\n    'text': {\n      'margin': 5.0,\n      'alignment': 'center',\n      'color': '#4F4F4F',\n      'lightColor': '#EEEEEE',\n      'darkColor': '#000000',\n      'font': {\n        'lineSpacing': 2.5,\n        'size': 9,\n        'weight': 'bold'\n      }\n    },\n    'connections': {\n      'default': {\n        'h': 'center',\n        'v': 'center'\n      },\n      'from': {\n        'horizontal': {\n          'h': 'nearest-inset',\n          'v': 'center'\n        }\n      },\n      'to': {\n        'h': 'nearest',\n        'v': 'center'\n      }\n    },\n    'decorations': {\n      'height': 20,\n      'edge': 'top',\n      'overlap': true,\n      'position': 'end'\n    }\n  }, {\n    'name': 'level_1',\n    'backgroundColor': '#22AAE0'\n  }, {\n    'name': 'activated',\n    'border': {\n      'type': 'surround',\n      'line': {\n        'color': '#22AAE0',\n        'width': 2.0,\n        'style': 'dashed'\n      }\n    }\n  }, {\n    'name': 'selected',\n    'shadow': [{\n      'color': '#000000',\n      'opacity': 0.9,\n      'offset': {\n        'width': 2,\n        'height': 2\n      },\n      'radius': 2\n    }]\n  }, {\n    'name': 'collapsed',\n    'shadow': [{\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 1\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 3\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 4\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 6\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 7\n      },\n      'radius': 0\n    }]\n  }, {\n    'name': 'collapsed.selected',\n    'shadow': [{\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 1\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 3\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 6\n      },\n      'radius': 0\n    }, {\n      'color': '#555555',\n      'offset': {\n        'width': 0,\n        'height': 7\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 10\n      },\n      'radius': 0\n    }, {\n      'color': '#333333',\n      'offset': {\n        'width': 0,\n        'height': 11\n      },\n      'radius': 0\n    }]\n  }],\n  'connector': {\n    'default': {\n      'type': 'quadratic',\n      'label': {\n        'position': {\n          'ratio': 0.5\n        },\n        'backgroundColor': 'transparent',\n        'borderColor': 'transparent',\n        'text': {\n          'color': '#4F4F4F',\n          'font': {\n            'size': 9,\n            'sizePx': 12,\n            'weight': 'normal'\n          }\n        }\n      },\n      'controlPoint': {\n        'above': {\n          'width': 0,\n          'height': 1.75\n        },\n        'below': {\n          'width': 0,\n          'height': 1.75\n        },\n        'horizontal': {\n          'width': 0,\n          'height': 1\n        }\n      },\n      'line': {\n        'color': '#707070',\n        'width': 1.0\n      }\n    }\n  },\n  link: {\n    default: {\n      line: {\n        color: 'red',\n        lineStyle: 'dashed',\n        width: 1.0\n      },\n      label: {\n        position: {\n          ratio: 0.5\n        },\n        backgroundColor: '#FFFFFF',\n        borderColor: '#FFFFFF',\n        text: {\n          color: '#4F4F4F',\n          font: {\n            'size': 9,\n            'sizePx': 12,\n            'weight': 'normal'\n          }\n        }\n      }\n    }\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/default-theme.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/foreground-style.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/foreground-style.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar convertToRGB = __webpack_require__(/*! ./color-to-rgb */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js\");\nmodule.exports = function foregroundStyle(backgroundColor) {\n  'use strict';\n\n  /*jslint newcap:true*/\n  // var luminosity = Color(backgroundColor).mix(Color('#EEEEEE')).luminosity();\n  var mix = function mix(color1, color2) {\n      return [Math.round(0.5 * (color1[0] + color2[0])), Math.round(0.5 * (color1[1] + color2[1])), Math.round(0.5 * (color1[2] + color2[2]))];\n    },\n    calcLuminosity = function calcLuminosity() {\n      // http://www.w3.org/TR/WCAG20/#relativeluminancedef\n      var rgb = mix(convertToRGB(backgroundColor), convertToRGB('#EEEEEE')),\n        lum = [];\n      var chan;\n      for (var i = 0; i < rgb.length; i++) {\n        chan = rgb[i] / 255;\n        lum[i] = chan <= 0.03928 ? chan / 12.92 : Math.pow((chan + 0.055) / 1.055, 2.4);\n      }\n      return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n    },\n    luminosity = calcLuminosity();\n  if (luminosity < 0.5) {\n    return 'lightColor';\n  } else if (luminosity < 0.9) {\n    return 'color';\n  }\n  return 'darkColor';\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/foreground-style.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* global require, module */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function isEmptyGroup(contentIdea) {\n  'use strict';\n\n  return contentIdea.attr && contentIdea.attr.group && _.isEmpty(contentIdea.ideas);\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-geometry.js":
/*!***********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-geometry.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require, isNaN, console*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  PolyBool = __webpack_require__(/*! polybooljs */ \"./node_modules/polybooljs/index.js\"),\n  convexHull = __webpack_require__(/*! monotone-convex-hull-2d */ \"./node_modules/monotone-convex-hull-2d/index.js\"),\n  dotProduct = function dotProduct(p1, p2) {\n    'use strict';\n\n    return p1[0] * p2[0] + p1[1] * p2[1];\n  },\n  unitVector = function unitVector(vector) {\n    'use strict';\n\n    var magnitude = Math.sqrt(Math.pow(vector[0], 2) + Math.pow(vector[1], 2));\n    if (magnitude === 0) {\n      return [0, 0];\n    }\n    return [vector[0] / magnitude, vector[1] / magnitude];\n  },\n  toPolyBoolPoly = function toPolyBoolPoly(poly) {\n    'use strict';\n\n    return {\n      regions: poly,\n      inverted: false\n    };\n  },\n  arePointsEqual = function arePointsEqual(p1, p2) {\n    'use strict';\n\n    return p1 && p2 && p1.length === 2 && p2.length === 2 && p1[0] === p2[0] && p1[1] === p2[1];\n  },\n  areShapesEqual = function areShapesEqual(shape1, shape2) {\n    'use strict';\n\n    if (!shape1 || !shape2 || shape1.length !== shape2.length) {\n      return false;\n    }\n    return _.filter(shape1, function (p1) {\n      return _.filter(shape2, function (p2) {\n        return arePointsEqual(p1, p2);\n      }).length;\n    }).length === shape1.length;\n  },\n  polygonsAreEqual = function polygonsAreEqual(poly1, poly2) {\n    'use strict';\n\n    var matchingShapes = function matchingShapes() {\n      return _.filter(poly1, function (shape1) {\n        return _.filter(poly2, function (shape2) {\n          return areShapesEqual(shape1, shape2);\n        }).length;\n      });\n    };\n    if (poly1.length > poly2.length) {\n      return false;\n    }\n\n    // if (true || matchingShapes.length) {\n    // \t//console.log('matchingShapes.length === poly1.length', matchingShapes.length === poly1.length, 'matchingShapes', matchingShapes, 'poly1', poly1, 'poly2', poly2);\n\n    // }\n    return matchingShapes().length === poly1.length;\n  },\n  shapeContainingIntersection = function shapeContainingIntersection(poly, intersection) {\n    'use strict';\n\n    var pbIntersection = toPolyBoolPoly(intersection),\n      containingShape = _.find(poly, function (shape) {\n        var pbShape = toPolyBoolPoly([shape]),\n          shapeIntersection = PolyBool.intersect(pbIntersection, pbShape);\n        return polygonsAreEqual(intersection, shapeIntersection.regions);\n      });\n    return containingShape && containingShape.length && containingShape;\n  },\n  polygonIntersectionPoints = function polygonIntersectionPoints(poly1, poly2) {\n    'use strict';\n\n    var pbPoly1 = toPolyBoolPoly(poly1),\n      pbPoly2 = toPolyBoolPoly(poly2),\n      intersection = PolyBool.intersect(pbPoly1, pbPoly2),\n      isSameAsPoly1 = polygonsAreEqual(poly1, intersection.regions),\n      isContained = isSameAsPoly1 && !polygonsAreEqual(intersection.regions, poly2),\n      containingShape = isContained && shapeContainingIntersection(poly2, intersection.regions);\n    if (containingShape) {\n      return containingShape;\n    }\n    return _.flatten(intersection.regions, true);\n  },\n  projectPointOnLineVector = function projectPointOnLineVector(point, vectorOrigin, vector) {\n    'use strict';\n\n    var pointVector = [point[0] - vectorOrigin[0], point[1] - vectorOrigin[1]],\n      valDp = dotProduct(vector, pointVector),\n      len2 = dotProduct(vector, vector),\n      resultVector = [vectorOrigin[0] + valDp * vector[0] / len2, vectorOrigin[1] + valDp * vector[1] / len2];\n    if (!vector[0] && !vector[1]) {\n      throw 'invalid-args';\n    }\n    return resultVector;\n  },\n  orderPointsOnVector = function orderPointsOnVector(points, vectorOrigin, vector, pointsBeforeOriginOnly) {\n    'use strict';\n\n    var pointScale = function pointScale(point) {\n        var dx = point[0] - vectorOrigin[0],\n          dy = point[1] - vectorOrigin[1],\n          val = function () {\n            if (dx === 0) {\n              if (vector[1] === 0) {\n                return 1;\n              }\n              return dy / vector[1];\n            } else {\n              if (vector[0] === 0) {\n                return 1;\n              }\n              return dx / vector[0];\n            }\n          }(),\n          pointSign = val >= 0 ? 1 : -1,\n          vectorScale = pointSign * (Math.pow(dx, 2) + Math.pow(dy, 2));\n        return vectorScale;\n      },\n      filteredPoints = _.filter(points, function (point) {\n        if (pointsBeforeOriginOnly) {\n          return pointScale(point) < 0;\n        }\n        return pointScale(point) >= 0;\n      });\n    return _.sortBy(filteredPoints, pointScale);\n  },\n  buildPoints = function buildPoints(layout, margin) {\n    'use strict';\n\n    var points = [];\n    _.each(layout, function (node) {\n      var x1 = Math.round(node.x - margin),\n        x2 = Math.round(node.x + node.width + margin),\n        y1 = Math.round(node.y - margin),\n        y2 = Math.round(node.y + node.height + margin);\n      points.push([x1, y1]);\n      points.push([x1, y2]);\n      points.push([x2, y2]);\n      points.push([x2, y1]);\n    });\n    return points;\n  },\n  tolayoutPolygonHull = function tolayoutPolygonHull(layout, margin) {\n    'use strict';\n\n    var points = buildPoints(layout, margin),\n      hullIndices = convexHull(points),\n      hull = _.map(hullIndices, function (hullIndex) {\n        return points[hullIndex];\n      });\n    return [hull];\n  },\n  roundVector = function roundVector(vector) {\n    'use strict';\n\n    return [Math.round(vector[0]), Math.round(vector[1])];\n  },\n  tolayoutPolygonRect = function tolayoutPolygonRect(layout, margin) {\n    'use strict';\n\n    var minX = 0,\n      maxX = 0,\n      minY = 0,\n      maxY = 0;\n    _.each(layout, function (node) {\n      minX = Math.min(minX, node.x);\n      maxX = Math.max(maxX, node.x + node.width);\n      minY = Math.min(minY, node.y);\n      maxY = Math.max(maxY, node.y + node.width);\n    });\n    minX = minX - margin;\n    maxX = maxX + margin;\n    minY = minY - margin;\n    maxY = maxY + margin;\n    return [[roundVector([minX, minY]), roundVector([maxX, minY]), roundVector([maxX, maxY]), roundVector([minX, maxY])]];\n  },\n  addVectors = function addVectors(vector1, vector2) {\n    'use strict';\n\n    var x = vector1[0] + vector2[0],\n      y = vector1[1] + vector2[1];\n    if (isNaN(x) || isNaN(y)) {\n      //console.log('addVectors invalid-args x', x, 'y', y, 'vector1', vector1, 'vector2', vector2);\n      throw 'invalid-args';\n    }\n    return [x, y];\n  },\n  subtractVectors = function subtractVectors(vector1, vector2) {\n    'use strict';\n\n    var x = vector1[0] - vector2[0],\n      y = vector1[1] - vector2[1];\n    if (isNaN(x) || isNaN(y)) {\n      //console.log('subtractVectors invalid-args vector1', vector1, 'vector2', vector2);\n      throw 'invalid-args';\n    }\n    return [x, y];\n  },\n  translatePoly = function translatePoly(poly, translation) {\n    'use strict';\n\n    return poly.map(function (region) {\n      return region.map(function (vector) {\n        return roundVector(addVectors(vector, translation));\n      });\n    });\n  },\n  firstProjectedPolyPointOnVector = function firstProjectedPolyPointOnVector(poly, vectorOrigin, vector) {\n    'use strict';\n\n    var polyPoints = _.flatten(poly, true),\n      intersectionsOnLine = polyPoints.map(function (intersection) {\n        return projectPointOnLineVector(intersection, vectorOrigin, vector);\n      }),\n      orderedIntersectionsOnLine = orderPointsOnVector(intersectionsOnLine, vectorOrigin, vector, true);\n    return orderedIntersectionsOnLine.length && orderedIntersectionsOnLine[0];\n  },\n  furthestIntersectionPoint = function furthestIntersectionPoint(poly1, poly2, vectorOrigin, vector) {\n    'use strict';\n\n    var intersections = polygonIntersectionPoints(poly1, poly2),\n      intersectionsOnLine = intersections.map(function (intersection) {\n        return projectPointOnLineVector(intersection, vectorOrigin, vector);\n      }),\n      orderedIntersectionsOnLine = orderPointsOnVector(intersectionsOnLine, vectorOrigin, vector);\n    return orderedIntersectionsOnLine.length && orderedIntersectionsOnLine.pop();\n  },\n  translatePolyToIntersecton = function translatePolyToIntersecton(polyToTranslate, intersectionPoint, vector) {\n    'use strict';\n\n    var firstPolyPoint = firstProjectedPolyPointOnVector(polyToTranslate, intersectionPoint, vector),\n      translation = firstPolyPoint && roundVector(subtractVectors(intersectionPoint, firstPolyPoint));\n    if (!firstPolyPoint) {\n      return false;\n    }\n    return {\n      translation: translation,\n      translatedPoly: translatePoly(polyToTranslate, translation)\n    };\n  },\n  _translatePolyToNotOverlap = function translatePolyToNotOverlap(polyToFit, existingRegions, polyRootCenter, vector, previousTranslation, depth) {\n    'use strict';\n\n    var firstPolyPoint = firstProjectedPolyPointOnVector(polyToFit, polyRootCenter, vector) || polyRootCenter,\n      intersectionPoint = furthestIntersectionPoint(polyToFit, existingRegions, firstPolyPoint, vector);\n    var polyTranslation;\n    depth = depth || 0;\n    previousTranslation = previousTranslation || [0, 0];\n    if (intersectionPoint) {\n      polyTranslation = translatePolyToIntersecton(polyToFit, intersectionPoint, vector);\n      if (polyTranslation) {\n        previousTranslation = addVectors(previousTranslation, polyTranslation.translation);\n        polyRootCenter = addVectors(polyRootCenter, polyTranslation.translation);\n        if (depth < 100) {\n          return _translatePolyToNotOverlap(polyTranslation.translatedPoly, existingRegions, polyRootCenter, vector, previousTranslation, depth + 1);\n        }\n      } else {\n        //console.log('unable to translate poly', polyToFit, 'to intersectionPoint', intersectionPoint, 'with vector', vector);\n      }\n    }\n    return {\n      translation: previousTranslation,\n      translatedPoly: polyToFit\n    };\n  };\nmodule.exports = {\n  tolayoutPolygonRect: tolayoutPolygonRect,\n  tolayoutPolygonHull: tolayoutPolygonHull,\n  furthestIntersectionPoint: furthestIntersectionPoint,\n  projectPointOnLineVector: projectPointOnLineVector,\n  orderPointsOnVector: orderPointsOnVector,\n  firstProjectedPolyPointOnVector: firstProjectedPolyPointOnVector,\n  translatePoly: translatePoly,\n  addVectors: addVectors,\n  subtractVectors: subtractVectors,\n  translatePolyToIntersecton: translatePolyToIntersecton,\n  translatePolyToNotOverlap: _translatePolyToNotOverlap,\n  unitVector: unitVector,\n  roundVector: roundVector,\n  polygonIntersectionPoints: polygonIntersectionPoints,\n  shapeContainingIntersection: shapeContainingIntersection\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-geometry.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-model.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-model.js ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  nodeToBox = __webpack_require__(/*! ./node-to-box */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/node-to-box.js\");\nmodule.exports = function LayoutModel(emptyLayout) {\n  'use strict';\n\n  var layout;\n  var self = this,\n    options = {\n      coneRatio: 0.5,\n      majorAxisRatio: 3\n    },\n    getNodesForPredicate = function getNodesForPredicate(predicate) {\n      var nodes = layout && _.values(layout.nodes),\n        filtered = nodes && _.filter(nodes, predicate);\n      return nodes && filtered.length && filtered;\n    },\n    getNodesDown = function getNodesDown(referenceNode, coneRatio) {\n      var predicate = function predicate(node) {\n        var dy = node.y + node.height - (referenceNode.y + referenceNode.height),\n          x1 = referenceNode.x - Math.abs(dy * coneRatio),\n          x2 = referenceNode.x + referenceNode.width + Math.abs(dy * coneRatio);\n        if (node.id === referenceNode.id || node.y <= Math.round(referenceNode.y + referenceNode.height * 0.5)) {\n          return false;\n        }\n        if (coneRatio !== undefined && (node.x > x2 || node.x + node.width < x1)) {\n          return false;\n        }\n        return true;\n      };\n      return getNodesForPredicate(predicate);\n    },\n    getNodesRight = function getNodesRight(referenceNode, coneRatio) {\n      var predicate = function predicate(node) {\n        var dx = node.x + node.width - (referenceNode.x + referenceNode.width),\n          y1 = referenceNode.y - Math.abs(dx * coneRatio),\n          y2 = referenceNode.y + referenceNode.height + Math.abs(dx * coneRatio);\n        if (node.id === referenceNode.id || node.x <= Math.round(referenceNode.x + referenceNode.width * 0.5)) {\n          return false;\n        }\n        if (coneRatio !== undefined && (node.y > y2 || node.y + node.height < y1)) {\n          return false;\n        }\n        return true;\n      };\n      return getNodesForPredicate(predicate);\n    },\n    getNodesUp = function getNodesUp(referenceNode, coneRatio) {\n      var predicate = function predicate(node) {\n        var dy = node.y - referenceNode.y,\n          x1 = referenceNode.x - Math.abs(dy * coneRatio),\n          x2 = referenceNode.x + referenceNode.width + Math.abs(dy * coneRatio);\n        if (node.id === referenceNode.id || node.y + node.height >= Math.round(referenceNode.y + referenceNode.height * 0.5)) {\n          return false;\n        }\n        if (coneRatio !== undefined && (node.x > x2 || node.x + node.width < x1)) {\n          return false;\n        }\n        return true;\n      };\n      return getNodesForPredicate(predicate);\n    },\n    getNodesLeft = function getNodesLeft(referenceNode, coneRatio) {\n      var predicate = function predicate(node) {\n        var dx = node.x - referenceNode.x,\n          y1 = referenceNode.y - Math.abs(dx * coneRatio),\n          y2 = referenceNode.y + referenceNode.height + Math.abs(dx * coneRatio);\n        if (node.id === referenceNode.id || node.x + node.width >= Math.round(referenceNode.x + referenceNode.width * 0.5)) {\n          return false;\n        }\n        if (coneRatio !== undefined && (node.y > y2 || node.y + node.height < y1)) {\n          return false;\n        }\n        return true;\n      };\n      return getNodesForPredicate(predicate);\n    },\n    getNearest = function getNearest(referenceNode, nodes, xRatio, yRatio) {\n      var referenceNodeCenter = {\n          x: Math.round(referenceNode.x + referenceNode.width * 0.5),\n          y: Math.round(referenceNode.y + referenceNode.height * 0.5)\n        },\n        calculateDistance = function calculateDistance(point1, point2) {\n          var dx = xRatio * (point1.x - point2.x),\n            dy = yRatio * (point1.y - point2.y);\n          return Math.pow(dx, 2) + Math.pow(dy, 2);\n        };\n      if (!nodes) {\n        return false;\n      }\n      if (nodes.length === 1) {\n        return nodes[0];\n      }\n      return _.min(nodes, function (node) {\n        var d = [calculateDistance(node, referenceNodeCenter), calculateDistance({\n          x: node.x + node.width,\n          y: node.y + node.height\n        }, referenceNodeCenter), calculateDistance({\n          x: node.x + node.width,\n          y: node.y\n        }, referenceNodeCenter), calculateDistance({\n          x: node.x,\n          y: node.y + node.height\n        }, referenceNodeCenter), calculateDistance({\n          x: Math.round(node.x + node.width * 0.5),\n          y: Math.round(node.y + node.height * 0.5)\n        }, referenceNodeCenter)];\n        return _.min(d);\n      });\n    };\n  self.getNode = function (nodeId) {\n    return layout && layout.nodes && layout.nodes[nodeId];\n  };\n  self.isRootNode = function (nodeId) {\n    return layout && layout.nodes && layout.nodes[nodeId] && layout.nodes[nodeId].level === 1;\n  };\n  self.getNodeBox = function (nodeId) {\n    return nodeToBox(self.getNode(nodeId));\n  };\n  self.setLayout = function (newLayout) {\n    layout = newLayout || emptyLayout;\n  };\n  self.getLayout = function () {\n    return layout || emptyLayout;\n  };\n  self.nodeIdLeft = function (nodeId) {\n    var referenceNode = self.getNode(nodeId),\n      nodes = referenceNode && (getNodesLeft(referenceNode, options.coneRatio) || getNodesLeft(referenceNode)),\n      node = nodes && getNearest(referenceNode, nodes, 1, options.majorAxisRatio);\n    return node && node.id;\n  };\n  self.nodeIdRight = function (nodeId) {\n    var referenceNode = self.getNode(nodeId),\n      nodes = referenceNode && (getNodesRight(referenceNode, options.coneRatio) || getNodesRight(referenceNode)),\n      node = nodes && getNearest(referenceNode, nodes, 1, options.majorAxisRatio);\n    return node && node.id;\n  };\n  self.nodeIdUp = function (nodeId) {\n    var referenceNode = self.getNode(nodeId),\n      nodes = referenceNode && (getNodesUp(referenceNode, options.coneRatio) || getNodesUp(referenceNode)),\n      node = nodes && getNearest(referenceNode, nodes, options.majorAxisRatio, 1);\n    return node && node.id;\n  };\n  self.nodeIdDown = function (nodeId) {\n    var referenceNode = self.getNode(nodeId),\n      nodes = referenceNode && (getNodesDown(referenceNode, options.coneRatio) || getNodesDown(referenceNode)),\n      node = nodes && getNearest(referenceNode, nodes, options.majorAxisRatio, 1);\n    return node && node.id;\n  };\n  self.getOrientation = function () {\n    return layout && layout.orientation || 'standard';\n  };\n  self.layoutBounds = function () {\n    var minx, miny, maxx, maxy;\n    if (_.isEmpty(layout.nodes)) {\n      return false;\n    }\n    _.each(layout.nodes, function (node) {\n      if (!minx) {\n        minx = node.x;\n        miny = node.y;\n        maxx = node.x + node.width;\n        maxy = node.y + node.height;\n      } else {\n        minx = Math.min(node.x, minx);\n        miny = Math.min(node.y, miny);\n        maxx = Math.max(node.x + node.width, maxx);\n        maxy = Math.max(node.y + node.height, maxy);\n      }\n    });\n    return {\n      minX: minx,\n      minY: miny,\n      maxX: maxx,\n      maxY: maxy,\n      width: maxx - minx,\n      height: maxy - miny\n    };\n  };\n  self.clipRectTransform = function (centerNodeId, options) {\n    var scale = options && options.scale || 1;\n    var centerNode = self.getNode(centerNodeId),\n      bounds = self.layoutBounds(),\n      padding = options && options.padding || 0,\n      imgCenter = {\n        x: centerNode.x + centerNode.width / 2,\n        y: centerNode.y + centerNode.height / 2\n      };\n    if (options && options.clipRect) {\n      return {\n        x: options.clipRect.width / 2 - imgCenter.x,\n        y: options.clipRect.height / 2 - imgCenter.y,\n        width: options.clipRect.width,\n        height: options.clipRect.height,\n        scale: scale\n      };\n    } else if (options && options.page) {\n      scale = Math.min((options.page.width - 2 * padding) / bounds.width, (options.page.height - 2 * padding) / bounds.height);\n      return {\n        x: -1 * bounds.minX + Math.floor(0.5 * (options.page.width / scale - bounds.width)),\n        // in scaled coordinates\n        y: -1 * bounds.minY + Math.floor(0.5 * (options.page.height / scale - bounds.height)),\n        // in scaled coordinates\n        width: options.page.width,\n        height: options.page.height,\n        scale: scale\n      };\n    } else {\n      return {\n        x: -1 * bounds.minX + Math.floor(padding / scale),\n        // in scaled coordinates\n        y: -1 * bounds.minY + Math.floor(padding / scale),\n        // in scaled coordinates\n        width: bounds.width * scale + 2 * padding,\n        height: bounds.height * scale + 2 * padding,\n        scale: scale\n      };\n    }\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-model.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/align-group.js":
/*!***************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/align-group.js ***!
  \***************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function alignGroup(result, rootIdea) {\n  'use strict';\n\n  var nodes = result.nodes,\n    childIds = _.values(rootIdea.ideas).map(function (idea) {\n      return idea.id;\n    }),\n    childNodes = childIds.map(function (id) {\n      return nodes[id];\n    }).filter(function (node) {\n      return node;\n    }),\n    leftBorders = _.map(childNodes, function (node) {\n      return node.x;\n    }),\n    rightBorders = _.map(childNodes, function (node) {\n      return node.x + node.width;\n    }),\n    minLeft = _.min(leftBorders),\n    maxRight = _.max(rightBorders),\n    rootNode = nodes[rootIdea.id],\n    sameLevelNodes = _.values(nodes).filter(function (node) {\n      return node.level === rootNode.level && node.id !== rootNode.id;\n    });\n  if (childNodes.length) {\n    rootNode.x = minLeft;\n    rootNode.width = maxRight - rootNode.x;\n  }\n  sameLevelNodes.forEach(function (node) {\n    node.verticalOffset = (node.verticalOffset || 0) + rootNode.height;\n  });\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/align-group.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js":
/*!*****************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js ***!
  \*****************************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  VerticalSubtreeCollection = __webpack_require__(/*! ./vertical-subtree-collection */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js\");\nmodule.exports = function combineVerticalSubtrees(node, childLayouts, margin, sameLevel) {\n  'use strict';\n\n  var result = {\n      nodes: {}\n    },\n    shift = function shift(nodes, xOffset) {\n      _.each(nodes, function (node) {\n        node.x += xOffset;\n      });\n      return nodes;\n    },\n    verticalSubtreeCollection = new VerticalSubtreeCollection(childLayouts, margin);\n  var treeOffset;\n  if (Array.isArray(childLayouts)) {\n    throw 'child layouts are an array!';\n  }\n  result.nodes[node.id] = node;\n  node.x = Math.round(-0.5 * node.width);\n  result.levels = [{\n    width: node.width,\n    xOffset: node.x\n  }];\n  if (!verticalSubtreeCollection.isEmpty()) {\n    if (sameLevel) {\n      result.levels = verticalSubtreeCollection.getMergedLevels();\n      treeOffset = result.levels[0].xOffset;\n    } else {\n      result.levels = result.levels.concat(verticalSubtreeCollection.getMergedLevels());\n      treeOffset = result.levels[1].xOffset;\n    }\n    Object.keys(childLayouts).forEach(function (subtreeRank) {\n      _.extend(result.nodes, shift(childLayouts[subtreeRank].nodes, treeOffset + verticalSubtreeCollection.getExpectedTranslation(subtreeRank)));\n    });\n  }\n  return result;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/extract-connectors.js":
/*!**********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/extract-connectors.js ***!
  \**********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function extractConnectors(aggregate, visibleNodes, theme) {\n  'use strict';\n\n  var result = {},\n    allowParentConnectorOverride = !(theme && theme.blockParentConnectorOverride),\n    _traverse = function traverse(idea, parentId, isChildNode) {\n      if (isChildNode) {\n        if (!visibleNodes[idea.id]) {\n          return;\n        }\n        if (parentId !== aggregate.id) {\n          result[idea.id] = {\n            type: 'connector',\n            from: parentId,\n            to: idea.id\n          };\n          if (allowParentConnectorOverride && idea.attr && idea.attr.parentConnector) {\n            result[idea.id].attr = _.clone(idea.attr.parentConnector);\n          }\n        }\n      }\n      if (idea.ideas) {\n        Object.keys(idea.ideas).forEach(function (subNodeRank) {\n          _traverse(idea.ideas[subNodeRank], idea.id, true);\n        });\n      }\n    };\n  _traverse(aggregate);\n  return result;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/extract-connectors.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/links.js":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/links.js ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function (idea, visibleNodes) {\n  'use strict';\n\n  var result = {};\n  _.each(idea.links, function (link) {\n    if (visibleNodes[link.ideaIdFrom] && visibleNodes[link.ideaIdTo]) {\n      result[link.ideaIdFrom + '_' + link.ideaIdTo] = {\n        type: 'link',\n        ideaIdFrom: link.ideaIdFrom,\n        ideaIdTo: link.ideaIdTo,\n        attr: _.clone(link.attr)\n      };\n    }\n  });\n  return result;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/links.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js":
/*!***************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js ***!
  \***************************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nvar nearestInset = function nearestInset(node, relatedNode, inset) {\n  'use strict';\n\n  if (node.left + node.width < relatedNode.left) {\n    return node.left + node.width - inset;\n  }\n  return node.left + inset;\n};\nmodule.exports = {\n  'center': function center(node) {\n    'use strict';\n\n    return Math.round(node.left + node.width * 0.5);\n  },\n  'center-separated': function centerSeparated(node, relatedNode, horizontalInset, verticalInsetRatio) {\n    'use strict';\n\n    var insetY = node.height * (verticalInsetRatio || 0.2),\n      insetX = horizontalInset || 10,\n      halfWidth = node.width / 2,\n      nodeMidX = node.left + halfWidth,\n      relatedNodeMidX = relatedNode.left + relatedNode.width / 2,\n      relatedNodeRight = relatedNode.left + relatedNode.width,\n      dy = relatedNode.top - node.top + node.height - insetY,\n      calcDx = function calcDx() {\n        if (relatedNode.left > node.left + node.width) {\n          return relatedNode.left - nodeMidX;\n        } else if (relatedNodeRight < node.left) {\n          return relatedNodeRight - nodeMidX;\n        } else if (relatedNode.left < nodeMidX) {\n          return relatedNodeMidX - nodeMidX;\n        } else {\n          return relatedNodeMidX - nodeMidX;\n        }\n      },\n      dx = calcDx(),\n      requestedOffset = dx / Math.abs(dy) * insetY,\n      cappedOffset = Math.max(requestedOffset, halfWidth * -1 + insetX),\n      offsetX = Math.min(cappedOffset, halfWidth - insetX);\n    return Math.round(node.left + node.width * 0.5 + offsetX);\n  },\n  'nearest': function nearest(node, relatedNode) {\n    'use strict';\n\n    return nearestInset(node, relatedNode, 0);\n  },\n  'nearest-inset': nearestInset\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/node-connection-point-x.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/standard.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/standard.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  treeUtils = __webpack_require__(/*! ../tree */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/tree.js\");\nmodule.exports = function standardLayout(idea, dimensionProvider, margin) {\n  'use strict';\n\n  var positive = function positive(rank, parentId) {\n      return parentId !== idea.id || rank > 0;\n    },\n    negative = function negative(rank, parentId) {\n      return parentId !== idea.id || rank < 0;\n    },\n    positiveTree = treeUtils.calculateTree(idea, dimensionProvider, margin.h, positive),\n    negativeTree = treeUtils.calculateTree(idea, dimensionProvider, margin.h, negative),\n    layout = positiveTree.toLayout(),\n    negativeLayout = negativeTree.toLayout();\n  _.each(negativeLayout.nodes, function (n) {\n    n.x = -1 * n.x - n.width;\n  });\n  return _.extend(negativeLayout.nodes, layout.nodes);\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/standard.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/top-down.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/top-down.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  isEmptyGroup = __webpack_require__(/*! ../is-empty-group */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js\"),\n  alignGroup = __webpack_require__(/*! ./align-group */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/align-group.js\"),\n  combineVerticalSubtrees = __webpack_require__(/*! ./combine-vertical-subtrees */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/combine-vertical-subtrees.js\");\nmodule.exports = function topdownLayout(aggregate, dimensionProvider, margin) {\n  'use strict';\n\n  var isGroup = function isGroup(node) {\n      return node.attr && node.attr.group;\n    },\n    toNode = function toNode(idea, level) {\n      var dimensions = dimensionProvider(idea, level);\n      return _.extend({\n        level: level,\n        verticalOffset: 0,\n        title: isGroup(idea) ? '' : idea.title\n      }, dimensions, _.pick(idea, ['id', 'attr']));\n    },\n    _traverse = function traverse(idea, predicate, level) {\n      var childResults = {},\n        shouldIncludeSubIdeas = !(_.isEmpty(idea.ideas) || idea.attr && idea.attr.collapsed);\n      level = level || 1;\n      if (shouldIncludeSubIdeas) {\n        Object.keys(idea.ideas).forEach(function (subNodeRank) {\n          var newLevel = isGroup(idea) ? level : level + 1,\n            result = _traverse(idea.ideas[subNodeRank], predicate, newLevel);\n          if (result) {\n            childResults[subNodeRank] = result;\n          }\n        });\n      }\n      return predicate(idea, childResults, level);\n    },\n    traversalLayout = function traversalLayout(idea, childLayouts, level) {\n      var node = toNode(idea, level);\n      var result;\n      if (isGroup(node) && !_.isEmpty(idea.ideas)) {\n        result = combineVerticalSubtrees(node, childLayouts, margin.h, true);\n        alignGroup(result, idea);\n      } else {\n        result = combineVerticalSubtrees(node, childLayouts, margin.h);\n      }\n      return result;\n    },\n    traversalLayoutWithoutEmptyGroups = function traversalLayoutWithoutEmptyGroups(idea, childLayouts, level) {\n      return (idea === aggregate || !isEmptyGroup(idea)) && traversalLayout(idea, childLayouts, level);\n    },\n    setLevelHeights = function setLevelHeights(nodes, levelHeights) {\n      _.each(nodes, function (node) {\n        node.y = levelHeights[node.level - 1] + node.verticalOffset;\n        delete node.verticalOffset;\n      });\n    },\n    getLevelHeights = function getLevelHeights(nodes) {\n      var maxHeights = [],\n        heights = [];\n      var level,\n        totalHeight = 0;\n      _.each(nodes, function (node) {\n        maxHeights[node.level - 1] = Math.max(maxHeights[node.level - 1] || 0, node.height + node.verticalOffset);\n      });\n      totalHeight = maxHeights.reduce(function (memo, item) {\n        return memo + item;\n      }, 0) + margin.v * (maxHeights.length - 1);\n      heights[0] = Math.round(-0.5 * totalHeight);\n      for (level = 1; level < maxHeights.length; level++) {\n        heights[level] = heights[level - 1] + margin.v + maxHeights[level - 1];\n      }\n      return heights;\n    },\n    tree = _traverse(aggregate, traversalLayoutWithoutEmptyGroups);\n  setLevelHeights(tree.nodes, getLevelHeights(tree.nodes));\n  return tree.nodes;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/top-down.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js":
/*!*******************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js ***!
  \*******************************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function VerticalSubtreeCollection(subtreeMap, marginArg) {\n  'use strict';\n\n  var self = this,\n    sortedRanks = function sortedRanks() {\n      if (!subtreeMap) {\n        return [];\n      }\n      return _.sortBy(Object.keys(subtreeMap), parseFloat);\n    },\n    margin = marginArg || 0,\n    calculateExpectedTranslations = function calculateExpectedTranslations() {\n      var ranks = sortedRanks(),\n        translations = {},\n        sortByRank = function sortByRank() {\n          /* todo: cache */\n          if (_.isEmpty(subtreeMap)) {\n            return [];\n          }\n          return sortedRanks().map(function (key) {\n            return subtreeMap[key];\n          });\n        };\n      var currentWidthByLevel;\n      sortByRank().forEach(function (childLayout, rankIndex) {\n        var currentRank = ranks[rankIndex];\n        if (currentWidthByLevel === undefined) {\n          translations[currentRank] = 0 - childLayout.levels[0].xOffset;\n          currentWidthByLevel = childLayout.levels.map(function (level) {\n            return level.width + translations[currentRank] + level.xOffset;\n          });\n        } else {\n          childLayout.levels.forEach(function (level, levelIndex) {\n            var currentLevelWidth = currentWidthByLevel[levelIndex];\n            if (currentLevelWidth !== undefined) {\n              if (translations[currentRank] === undefined) {\n                translations[currentRank] = currentLevelWidth + margin - level.xOffset;\n              } else {\n                translations[currentRank] = Math.max(translations[currentRank], currentLevelWidth + margin - level.xOffset);\n              }\n            }\n          });\n          childLayout.levels.forEach(function (level, levelIndex) {\n            currentWidthByLevel[levelIndex] = translations[currentRank] + level.xOffset + level.width;\n          });\n        }\n      });\n      return translations;\n    },\n    translationsByRank = calculateExpectedTranslations();\n  self.getLevelWidth = function (level) {\n    var candidateRanks = sortedRanks().filter(function (rank) {\n        return self.existsOnLevel(rank, level);\n      }),\n      referenceLeft = candidateRanks[0],\n      /* won't work if the first child layout does not exist on the widest level */\n      referenceRight = candidateRanks[candidateRanks.length - 1],\n      leftLayout = subtreeMap[referenceLeft],\n      rightLayout = subtreeMap[referenceRight],\n      leftx = leftLayout.levels[level].xOffset + self.getExpectedTranslation(referenceLeft),\n      rightx = rightLayout.levels[level].xOffset + self.getExpectedTranslation(referenceRight);\n    return rightx + rightLayout.levels[level].width - leftx;\n  };\n  self.getLevelWidths = function () {\n    /* todo: cache */\n    var result = [],\n      maxLevel = _.max(_.map(subtreeMap, function (childLayout) {\n        return childLayout.levels.length;\n      }));\n    for (var levelIdx = 0; levelIdx < maxLevel; levelIdx++) {\n      result.push(self.getLevelWidth(levelIdx));\n    }\n    return result;\n  };\n  self.isEmpty = function () {\n    return _.isEmpty(subtreeMap);\n  };\n  self.getExpectedTranslation = function (rank) {\n    return translationsByRank[rank];\n  };\n  self.existsOnLevel = function (rank, level) {\n    return subtreeMap[rank].levels.length > level;\n  };\n  self.getMergedLevels = function () {\n    var targetCombinedLeftOffset = Math.round(self.getLevelWidth(0) * -0.5);\n    return self.getLevelWidths().map(function (levelWidth, index) {\n      var candidateRanks = sortedRanks().filter(function (rank) {\n          return self.existsOnLevel(rank, index);\n        }),\n        referenceLeft = candidateRanks[0],\n        /* won't work if the first child layout does not exist on the widest level */\n        leftLayout = subtreeMap[referenceLeft];\n      return {\n        width: levelWidth,\n        xOffset: leftLayout.levels[index].xOffset + self.getExpectedTranslation(referenceLeft) + targetCombinedLeftOffset\n      };\n    });\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layouts/vertical-subtree-collection.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-strokes.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-strokes.js ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nmodule.exports = {\n  dashed: '8, 8',\n  solid: ''\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-strokes.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-styles.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-styles.js ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\n\nmodule.exports = {\n  strokes: function strokes(name, width) {\n    'use strict';\n\n    if (!name || name === 'solid') {\n      return '';\n    }\n    var multipleWidth = Math.max(width || 1, 1) * 4;\n    if (name === 'dashed') {\n      return [multipleWidth, multipleWidth].join(', ');\n    } else {\n      return [1, multipleWidth].join(', ');\n    }\n  },\n  linecap: function linecap(name) {\n    'use strict';\n\n    if (!name || name === 'solid') {\n      return 'square';\n    }\n    if (name === 'dotted') {\n      return 'round';\n    }\n    return '';\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-styles.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\n\nmodule.exports = {\n  calculateLayout: __webpack_require__(/*! ./calculate-layout */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/calculate-layout.js\"),\n  colorToRGB: __webpack_require__(/*! ./color-to-rgb */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-to-rgb.js\"),\n  Connectors: __webpack_require__(/*! ./connectors */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/connectors.js\"),\n  foregroundStyle: __webpack_require__(/*! ./foreground-style */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/foreground-style.js\"),\n  LayoutModel: __webpack_require__(/*! ./layout-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-model.js\"),\n  nodeToBox: __webpack_require__(/*! ./node-to-box */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/node-to-box.js\"),\n  Theme: __webpack_require__(/*! ./theme */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js\"),\n  ThemeProcessor: __webpack_require__(/*! ./theme-processor */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-processor.js\"),\n  ThemeDimensionProvider: __webpack_require__(/*! ./theme-dimension-provider */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-dimension-provider.js\"),\n  Themes: {\n    default: __webpack_require__(/*! ./default-theme */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/default-theme.js\")\n  },\n  lineStrokes: __webpack_require__(/*! ./line-strokes */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/line-strokes.js\")\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/multi-root-layout.js":
/*!*************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/multi-root-layout.js ***!
  \*************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  layoutGeometry = __webpack_require__(/*! ./layout-geometry */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/layout-geometry.js\");\nmodule.exports = function MultiRootLayout() {\n  'use strict';\n\n  var self = this,\n    mergeNodes = function mergeNodes(storedLayout, offset) {\n      _.each(storedLayout.rootLayout, function (node) {\n        node.x = node.x + offset.x;\n        node.y = node.y + offset.y;\n        node.rootId = storedLayout.rootIdea.id;\n      });\n    },\n    globalIdeaTopLeftPosition = function globalIdeaTopLeftPosition(idea) {\n      var positionArray = idea && idea.attr && idea.attr.position || [0, 0, 0];\n      return {\n        x: positionArray[0],\n        y: positionArray[1],\n        priority: positionArray[2]\n      };\n    },\n    toStoredLayout = function toStoredLayout(rootLayout, rootIdea) {\n      var storedLayout = {\n        rootIdea: rootIdea,\n        rootNode: rootLayout[rootIdea.id],\n        rootLayout: rootLayout\n      };\n      return storedLayout;\n    },\n    isPositioned = function isPositioned(rootIdea) {\n      return globalIdeaTopLeftPosition(rootIdea).priority;\n    },\n    calcDesiredRootNodeCenter = function calcDesiredRootNodeCenter(storedLayout) {\n      var rootPosition = globalIdeaTopLeftPosition(storedLayout.rootIdea);\n      if (!rootPosition || !rootPosition.priority || !storedLayout.rootNode) {\n        return {\n          x: 0,\n          y: 0\n        };\n      }\n      return {\n        x: rootPosition.x + storedLayout.rootNode.width / 2,\n        y: rootPosition.y + storedLayout.rootNode.height / 2\n      };\n    },\n    positionedLayouts = [],\n    unpositionedLayouts = [];\n  self.appendRootNodeLayout = function (rootLayout, rootIdea) {\n    var storedLayout = toStoredLayout(rootLayout, rootIdea);\n    if (isPositioned(rootIdea)) {\n      positionedLayouts.push(storedLayout);\n    } else {\n      unpositionedLayouts.push(storedLayout);\n    }\n  };\n  self.getCombinedLayout = function (margin) {\n    var placedLayoutPoly = [],\n      result = {};\n    var mostRecentlyPositioned = positionedLayouts.length && _.max(positionedLayouts, function (layout) {\n        return globalIdeaTopLeftPosition(layout.rootIdea).priority;\n      }),\n      origin = {\n        x: 0,\n        y: 0\n      },\n      //mostRecentlyPositioned && calcDesiredRootNodeCenter(mostRecentlyPositioned),\n      rootDistance = function rootDistance(storedLayout) {\n        // return globalIdeaTopLeftPosition(storedLayout.rootIdea).priority * -1;\n        // return storedLayout.rootIdea.id;\n        var rootCenter = calcDesiredRootNodeCenter(storedLayout);\n        return Math.pow(rootCenter.x - origin.x, 2) + Math.pow(rootCenter.y - origin.y, 2);\n      },\n      sortedPositionedLayouts = _.sortBy(positionedLayouts, rootDistance),\n      placedLayouts = [],\n      layoutCount = positionedLayouts.length + unpositionedLayouts.length,\n      hasMultipleLayouts = layoutCount > 1,\n      positionLayout = function positionLayout(storedLayout) {\n        var offset, translationResult, storedLayoutPoly;\n        var placedRootCenter = calcDesiredRootNodeCenter(storedLayout),\n          initialTranslation = layoutGeometry.roundVector([placedRootCenter.x, placedRootCenter.y]),\n          placeNewLayout = function placeNewLayout() {\n            var vector = layoutGeometry.unitVector([placedRootCenter.x - origin.x, placedRootCenter.y - origin.y]);\n            if (vector[0] === 0 && vector[1] === 0) {\n              vector = [1, 0];\n            }\n            translationResult = layoutGeometry.translatePolyToNotOverlap(storedLayoutPoly, placedLayoutPoly, initialTranslation, vector, initialTranslation);\n            offset = {\n              x: translationResult.translation[0],\n              y: translationResult.translation[1]\n            };\n            storedLayoutPoly = translationResult.translatedPoly;\n          };\n        storedLayoutPoly = hasMultipleLayouts && layoutGeometry.translatePoly(layoutGeometry.tolayoutPolygonHull(storedLayout.rootLayout, margin), initialTranslation);\n        if (!storedLayout || _.contains(placedLayouts, storedLayout)) {\n          return;\n        }\n        if (placedLayouts.length) {\n          placeNewLayout();\n        } else {\n          offset = placedRootCenter;\n        }\n        mergeNodes(storedLayout, offset);\n        placedLayouts.push(storedLayout);\n        if (hasMultipleLayouts) {\n          placedLayoutPoly = placedLayoutPoly.concat(storedLayoutPoly);\n        }\n      };\n    if (!margin) {\n      throw 'invalid-args';\n    }\n    if (mostRecentlyPositioned) {\n      positionLayout(mostRecentlyPositioned);\n    }\n    sortedPositionedLayouts.forEach(positionLayout);\n    unpositionedLayouts.forEach(positionLayout);\n    placedLayouts.forEach(function (placedLayout) {\n      result = _.extend(result, placedLayout.rootLayout);\n    });\n    return result;\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/multi-root-layout.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/node-to-box.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/node-to-box.js ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nmodule.exports = function nodeToBox(node) {\n  'use strict';\n\n  if (!node) {\n    return false;\n  }\n  return {\n    left: node.x,\n    top: node.y,\n    width: node.width,\n    height: node.height,\n    level: node.level,\n    styles: node.styles || ['default']\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/node-to-box.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/outline.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/outline.js ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, module*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  borderLength = function borderLength(border) {\n    'use strict';\n\n    return _.reduce(border, function (seed, el) {\n      return seed + el.l;\n    }, 0);\n  },\n  borderSegmentIndexAt = function borderSegmentIndexAt(border, length) {\n    'use strict';\n\n    var l = 0,\n      i = -1;\n    while (l <= length) {\n      i += 1;\n      if (i >= border.length) {\n        return -1;\n      }\n      l += border[i].l;\n    }\n    return i;\n  },\n  extendBorder = function extendBorder(originalBorder, extension) {\n    'use strict';\n\n    var lengthToCut,\n      result = originalBorder.slice();\n    var origLength = borderLength(originalBorder),\n      i = borderSegmentIndexAt(extension, origLength);\n    if (i >= 0) {\n      lengthToCut = borderLength(extension.slice(0, i + 1));\n      result.push({\n        h: extension[i].h,\n        l: lengthToCut - origLength\n      });\n      result = result.concat(extension.slice(i + 1));\n    }\n    return result;\n  },\n  _Outline = function Outline(topBorder, bottomBorder) {\n    'use strict';\n\n    var shiftBorder = function shiftBorder(border, deltaH) {\n      return _.map(border, function (segment) {\n        return {\n          l: segment.l,\n          h: segment.h + deltaH\n        };\n      });\n    };\n    this.initialHeight = function () {\n      return this.bottom[0].h - this.top[0].h;\n    };\n    this.borders = function () {\n      return _.pick(this, 'top', 'bottom');\n    };\n    this.spacingAbove = function (outline) {\n      var i = 0,\n        j = 0,\n        result = 0,\n        li = 0,\n        lj = 0;\n      while (i < this.bottom.length && j < outline.top.length) {\n        result = Math.max(result, this.bottom[i].h - outline.top[j].h);\n        if (li + this.bottom[i].l < lj + outline.top[j].l) {\n          li += this.bottom[i].l;\n          i += 1;\n        } else if (li + this.bottom[i].l === lj + outline.top[j].l) {\n          li += this.bottom[i].l;\n          i += 1;\n          lj += outline.top[j].l;\n          j += 1;\n        } else {\n          lj += outline.top[j].l;\n          j += 1;\n        }\n      }\n      return result;\n    };\n    this.indent = function (horizontalIndent, margin) {\n      var top = this.top.slice(),\n        bottom = this.bottom.slice(),\n        vertCenter = Math.round((bottom[0].h + top[0].h) / 2);\n      if (!horizontalIndent) {\n        return this;\n      }\n      ;\n      top.unshift({\n        h: Math.round(vertCenter - margin / 2),\n        l: horizontalIndent\n      });\n      bottom.unshift({\n        h: Math.round(vertCenter + margin / 2),\n        l: horizontalIndent\n      });\n      return new _Outline(top, bottom);\n    };\n    this.stackBelow = function (outline, margin) {\n      var spacing = outline.spacingAbove(this),\n        top = extendBorder(outline.top, shiftBorder(this.top, spacing + margin)),\n        bottom = extendBorder(shiftBorder(this.bottom, spacing + margin), outline.bottom);\n      return new _Outline(top, bottom);\n    };\n    this.expand = function (initialTopHeight, initialBottomHeight) {\n      var topAlignment = initialTopHeight - this.top[0].h,\n        bottomAlignment = initialBottomHeight - this.bottom[0].h,\n        top = shiftBorder(this.top, topAlignment),\n        bottom = shiftBorder(this.bottom, bottomAlignment);\n      return new _Outline(top, bottom);\n    };\n    this.insertAtStart = function (dimensions, margin) {\n      var alignment = 0,\n        //-1 * this.top[0].h - suboutlineHeight * 0.5,\n        topBorder = shiftBorder(this.top, alignment),\n        bottomBorder = shiftBorder(this.bottom, alignment),\n        easeIn = function easeIn(border) {\n          border[0].l *= 0.5;\n          border[1].l += border[0].l;\n        };\n      topBorder[0].l += margin;\n      bottomBorder[0].l += margin;\n      topBorder.unshift({\n        h: Math.round(-0.5 * dimensions.height),\n        l: dimensions.width\n      });\n      bottomBorder.unshift({\n        h: Math.round(0.5 * dimensions.height),\n        l: dimensions.width\n      });\n      if (topBorder[0].h > topBorder[1].h) {\n        easeIn(topBorder);\n      }\n      if (bottomBorder[0].h < bottomBorder[1].h) {\n        easeIn(bottomBorder);\n      }\n      return new _Outline(topBorder, bottomBorder);\n    };\n    this.top = topBorder.slice();\n    this.bottom = bottomBorder.slice();\n  },\n  outlineFromDimensions = function outlineFromDimensions(dimensions) {\n    'use strict';\n\n    return new _Outline([{\n      h: Math.round(-0.5 * dimensions.height),\n      l: dimensions.width\n    }], [{\n      h: Math.round(0.5 * dimensions.height),\n      l: dimensions.width\n    }]);\n  };\nmodule.exports = {\n  borderLength: borderLength,\n  borderSegmentIndexAt: borderSegmentIndexAt,\n  extendBorder: extendBorder,\n  Outline: _Outline,\n  outlineFromDimensions: outlineFromDimensions\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/outline.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-dimension-provider.js":
/*!********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-dimension-provider.js ***!
  \********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar formattedNodeTitle = __webpack_require__(/*! ../../mindmup-mapjs-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js\").formattedNodeTitle,\n  _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function ThemeDimensionProvider(textSizer, options) {\n  'use strict';\n\n  var self = this,\n    calcMaxWidth = function calcMaxWidth(attr, nodeTheme) {\n      var maxWidth = attr && attr.style && attr.style.width || nodeTheme.maxWidth,\n        margin = nodeTheme && nodeTheme.margin || nodeTheme && nodeTheme.text && nodeTheme.text.margin || 0;\n      if (options && options.substractMarginFromMaxWidth && margin) {\n        return maxWidth - 2 * margin;\n      }\n      return maxWidth;\n    };\n  self.dimensionProviderForTheme = function (theme) {\n    return function (idea, level) {\n      var icon = idea.attr && idea.attr.icon,\n        nodeTheme = theme.nodeTheme(theme.nodeStyles(level, idea.attr)),\n        title = formattedNodeTitle(idea.title),\n        maxWidth = calcMaxWidth(idea.attr, nodeTheme),\n        requestedWidth = idea.attr && idea.attr.style && idea.attr.style.width || 0,\n        textBox = _.extend({}, textSizer(title, maxWidth, nodeTheme.font));\n      textBox.textSize = {\n        width: textBox.width,\n        height: textBox.height\n      };\n      if (icon) {\n        if (icon.position === 'left' || icon.position === 'right') {\n          if (textBox.width && icon.width && nodeTheme.margin) {\n            textBox.width = textBox.width + nodeTheme.margin;\n          }\n          textBox.width = textBox.width + icon.width;\n        }\n        if (icon.position === 'top' || icon.position === 'bottom') {\n          if (textBox.height && icon.height && nodeTheme.margin) {\n            textBox.height = textBox.height + nodeTheme.margin;\n          }\n          textBox.height = textBox.height + icon.height;\n        }\n        textBox.height = Math.max(textBox.height, icon.height);\n        textBox.width = Math.max(textBox.width, icon.width);\n      }\n      textBox.width = Math.max(textBox.width + 2 * nodeTheme.margin, nodeTheme.cornerRadius * 2);\n      textBox.width = Math.max(requestedWidth, textBox.width);\n      textBox.height = Math.max(textBox.height + 2 * nodeTheme.margin, nodeTheme.cornerRadius * 2);\n      return textBox;\n    };\n  };\n  self.nodeLayoutProviderForTheme = function (theme) {\n    return function (node) {\n      var image = node.attr && node.attr.icon,\n        nodeTheme = theme.nodeTheme(theme.nodeStyles(node.level, node.attr)),\n        title = formattedNodeTitle(node.title),\n        maxWidth = calcMaxWidth(node.attr, nodeTheme),\n        textBox = textSizer(title, maxWidth, nodeTheme.font);\n      var textWidth = Math.min(node.width - 2 * nodeTheme.margin, textBox.width),\n        textLayout,\n        imageLayout,\n        offset;\n      if (image) {\n        imageLayout = {\n          x: nodeTheme.margin,\n          y: nodeTheme.margin,\n          width: image.width,\n          height: image.height\n        };\n        switch (image.position) {\n          case 'top':\n            imageLayout.x = Math.round((node.width - image.width) / 2);\n            textLayout = {\n              x: Math.round((node.width - textWidth) / 2),\n              y: imageLayout.y + imageLayout.height + nodeTheme.margin,\n              width: textWidth,\n              height: node.height - image.height - 3 * nodeTheme.margin\n            };\n            break;\n          case 'bottom':\n            imageLayout.x = Math.round((node.width - image.width) / 2);\n            imageLayout.y = node.height - image.height - nodeTheme.margin;\n            textLayout = {\n              x: Math.round((node.width - textWidth) / 2),\n              y: nodeTheme.margin,\n              width: textWidth,\n              height: node.height - image.height - 3 * nodeTheme.margin\n            };\n            break;\n          case 'left':\n            textWidth = Math.min(node.width - imageLayout.width - 3 * nodeTheme.margin, textBox.width);\n            imageLayout.y = Math.round((node.height - image.height) / 2);\n            offset = imageLayout.x + imageLayout.width;\n            textLayout = {\n              x: Math.round(offset + (node.width - offset - textWidth) / 2),\n              y: nodeTheme.margin,\n              width: textWidth,\n              height: node.height - 2 * nodeTheme.margin\n            };\n            break;\n          case 'right':\n            textWidth = Math.min(node.width - imageLayout.width - 3 * nodeTheme.margin, textBox.width);\n            imageLayout.x = node.width - image.width - nodeTheme.margin;\n            imageLayout.y = Math.round((node.height - image.height) / 2);\n            textLayout = {\n              x: Math.round((imageLayout.x - textWidth) / 2),\n              y: nodeTheme.margin,\n              width: textWidth,\n              height: node.height - 2 * nodeTheme.margin\n            };\n            break;\n          default:\n            imageLayout.x = Math.round((node.width - image.width) / 2);\n            imageLayout.y = Math.round((node.height - image.height) / 2);\n            textLayout = {\n              x: Math.round((node.width - textWidth) / 2),\n              y: nodeTheme.margin,\n              width: textWidth,\n              height: node.height - 2 * nodeTheme.margin\n            };\n        }\n        if (_.contains(['left', 'right', 'center'], image.position)) {\n          textLayout.y = Math.round((node.height - textBox.height) / 2);\n        }\n      } else {\n        textLayout = {\n          x: Math.round((node.width - textBox.width) / 2),\n          y: nodeTheme.margin,\n          width: Math.min(textBox.width, node.width - 2 * nodeTheme.margin),\n          height: node.height - 2 * nodeTheme.margin\n        };\n      }\n      return {\n        text: textLayout,\n        image: imageLayout\n      };\n    };\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-dimension-provider.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-processor.js":
/*!***********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-processor.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  colorParser = __webpack_require__(/*! ./color-parser */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-parser.js\");\nmodule.exports = function ThemeProcessor() {\n  'use strict';\n\n  var self = this,\n    addPx = function addPx(val) {\n      return val + 'px';\n    },\n    cssProp = {\n      cornerRadius: 'border-radius',\n      'text.color': 'color',\n      'text.margin': 'padding',\n      background: 'background-color',\n      backgroundColor: 'background-color',\n      border: 'border',\n      shadow: 'box-shadow',\n      'text.font': 'font',\n      'text.alignment': 'text-align'\n    },\n    fontWeightParser = function fontWeightParser(fontObj) {\n      var weightMap = {\n        'light': '200',\n        'semi-bold': '600'\n      };\n      if (!fontObj || !fontObj.weight) {\n        return 'bold';\n      }\n      return weightMap[fontObj.weight] || fontObj.weight;\n    },\n    fontSizeParser = function fontSizeParser(fontObj) {\n      var fontSize = fontObj && fontObj.size || 12,\n        lineSpacing = fontObj && fontObj.lineSpacing || 3;\n      return fontSize + 'pt/' + (lineSpacing + fontSize) + 'pt';\n    },\n    parsers = {\n      cornerRadius: addPx,\n      'text.margin': addPx,\n      background: colorParser,\n      border: function border(borderOb) {\n        if (!borderOb.line) {\n          return '0';\n        }\n        return borderOb.line.width + 'px ' + (borderOb.line.style || 'solid') + ' ' + borderOb.line.color + ';margin:' + -1 * borderOb.line.width + 'px';\n      },\n      shadow: function shadow(shadowArray) {\n        var boxshadows = [];\n        if (shadowArray.length === 1 && shadowArray[0].color === 'transparent') {\n          return 'none';\n        }\n        shadowArray.forEach(function (shadow) {\n          boxshadows.push(shadow.offset.width + 'px ' + shadow.offset.height + 'px ' + shadow.radius + 'px ' + colorParser(shadow));\n        });\n        return boxshadows.join(',');\n      },\n      'text.font': function textFont(fontObj) {\n        return 'normal normal ' + fontWeightParser(fontObj) + ' ' + fontSizeParser(fontObj) + ' NotoSans, \"Helvetica Neue\", Roboto, Helvetica, Arial, sans-serif';\n      }\n    },\n    processNodeStyles = function processNodeStyles(nodeStyleArray) {\n      var parser, cssVal;\n      var result = [],\n        _pushProperties = function pushProperties(styleObject, keyPrefix) {\n          _.each(styleObject, function (val, propKey) {\n            var key = (keyPrefix || '') + propKey;\n            if (cssProp[key]) {\n              parser = parsers[key] || _.identity;\n              cssVal = parser(val);\n              if (cssVal) {\n                result.push(cssProp[key]);\n                result.push(':');\n                result.push(cssVal);\n                result.push(';');\n              }\n            } else if (_.isObject(val)) {\n              _pushProperties(val, key + '.');\n            }\n          });\n        },\n        appendColorVariants = function appendColorVariants(styleSelector, nodeStyle) {\n          if (!nodeStyle.text) {\n            return;\n          }\n          if (nodeStyle.text.color) {\n            result.push(styleSelector);\n            result.push('.mapjs-node-light{color:');\n            result.push(nodeStyle.text.color);\n            result.push(';}');\n          }\n          if (nodeStyle.text.lightColor) {\n            result.push(styleSelector);\n            result.push('.mapjs-node-dark{color:');\n            result.push(nodeStyle.text.lightColor);\n            result.push(';}');\n          }\n          if (nodeStyle.text.darkColor) {\n            result.push(styleSelector);\n            result.push('.mapjs-node-white{color:');\n            result.push(nodeStyle.text.darkColor);\n            result.push(';}');\n          }\n        },\n        appendDecorationStyles = function appendDecorationStyles(styleSelector, nodeStyle) {\n          var style = nodeStyle.decorations,\n            margin = nodeStyle.text && nodeStyle.text.margin || 0;\n          if (!style) {\n            return;\n          }\n          result.push(styleSelector);\n          result.push(' .mapjs-decorations{position:absolute;');\n          if (style.edge === 'top' || style.edge === 'bottom') {\n            if (style.position === 'end') {\n              result.push('right:0;');\n            } else if (style.position === 'start') {\n              result.push('left:0;');\n            } else {\n              result.push('left:0;width:100%;text-align:center;');\n            }\n            result.push(style.edge);\n            result.push(':-');\n            result.push(style.overlap ? Math.round(style.height / 2) + margin : style.height);\n            result.push('px;');\n          } else if (style.edge === 'left' || style.edge === 'right') {\n            result.push(style.edge === 'left' ? 'right' : 'left');\n            result.push(':100%;');\n            if (style.position === 'end') {\n              result.push('bottom:0;');\n            } else if (style.position === 'start') {\n              result.push('top:0;');\n            } else {\n              result.push('top:calc(50% - ');\n              result.push(Math.round(style.height / 2));\n              result.push('px);');\n            }\n          }\n          result.push('}');\n        };\n      nodeStyleArray.forEach(function (nodeStyle) {\n        var styleSelector = '.mapjs-node';\n        if (nodeStyle.name !== 'default') {\n          styleSelector = styleSelector + '.' + nodeStyle.name.replace(/\\s/g, '_');\n        }\n        result.push(styleSelector);\n        result.push('{');\n        _pushProperties(nodeStyle);\n        result.push('}');\n        appendColorVariants(styleSelector, nodeStyle);\n        appendDecorationStyles(styleSelector, nodeStyle);\n      });\n      return result.join('');\n    };\n  self.process = function (theme) {\n    var nodeStyles = '';\n    if (theme.node) {\n      nodeStyles = processNodeStyles(theme.node);\n    }\n    return {\n      css: nodeStyles\n    };\n  };\n  self.cssFont = parsers['text.font'];\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme-processor.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  colorParser = __webpack_require__(/*! ./color-parser */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/color-parser.js\"),\n  defaultTheme = __webpack_require__(/*! ./default-theme */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/default-theme.js\");\nmodule.exports = function Theme(themeJson) {\n  'use strict';\n\n  var self = this,\n    themeDictionary = _.extend({}, themeJson),\n    getElementForPath = function getElementForPath(object, pathArray) {\n      var remaining = pathArray.slice(0),\n        current = object;\n      while (remaining.length > 0) {\n        current = current[remaining[0]];\n        if (current === undefined) {\n          return;\n        }\n        remaining = remaining.slice(1);\n      }\n      return current;\n    },\n    extractElement = function extractElement(merged, postfixes, fallback) {\n      var result = getElementForPath(merged, postfixes);\n      if (result === undefined) {\n        return fallback;\n      }\n      return result;\n    };\n  self.getFontForStyles = function (themeStyles) {\n    var weight = self.attributeValue(['node'], themeStyles, ['text', 'font', 'weight'], 'semibold'),\n      size = self.attributeValue(['node'], themeStyles, ['text', 'font', 'size'], 12),\n      lineSpacing = self.attributeValue(['node'], themeStyles, ['text', 'font', 'lineSpacing'], 3.5);\n    return {\n      size: size,\n      weight: weight,\n      lineGap: lineSpacing\n    };\n  };\n  self.getNodeMargin = function (themeStyles) {\n    return self.attributeValue(['node'], themeStyles, ['text', 'margin'], 5);\n  };\n  self.name = themeJson && themeJson.name;\n  self.blockParentConnectorOverride = themeJson && themeJson.blockParentConnectorOverride;\n  self.attributeValue = function (prefixes, styles, postfixes, fallback) {\n    var rootElement = getElementForPath(themeDictionary, prefixes);\n    var merged = {};\n    if (!rootElement) {\n      return fallback;\n    }\n    if (styles && styles.length) {\n      styles.slice(0).reverse().forEach(function (style) {\n        merged = _.extend(merged, rootElement[style]);\n      });\n    } else {\n      merged = _.extend({}, rootElement);\n    }\n    return extractElement(merged, postfixes, fallback);\n  };\n  self.nodeStyles = function (nodeLevel, nodeAttr) {\n    var result = ['level_' + nodeLevel, 'default'];\n    if (nodeAttr && nodeAttr.group) {\n      result.unshift('attr_group');\n      if (typeof nodeAttr.group === 'string' || typeof nodeAttr.group === 'number') {\n        result.unshift('attr_group_' + nodeAttr.group);\n      }\n    }\n    return result;\n  };\n  self.nodeTheme = function (styles) {\n    var merged = {};\n    var getBackgroundColor = function getBackgroundColor() {\n        var colorObj = getElementForPath(merged, ['background']);\n        if (colorObj) {\n          return colorParser(colorObj);\n        }\n        return getElementForPath(merged, ['backgroundColor']);\n      },\n      rootElement = getElementForPath(themeDictionary, ['node']),\n      result = {\n        margin: 5,\n        font: {\n          size: 12,\n          weight: 'semibold',\n          lineSpacing: 3.5\n        },\n        maxWidth: 146,\n        backgroundColor: '#E0E0E0',\n        borderType: 'surround',\n        cornerRadius: 5,\n        lineColor: '#707070',\n        text: {\n          color: '#4F4F4F',\n          lightColor: '#EEEEEE',\n          darkColor: '#000000'\n        }\n      };\n    if (!rootElement) {\n      return result;\n    }\n    styles.slice(0).reverse().forEach(function (style) {\n      merged = _.extend(merged, rootElement[style]);\n    });\n    result.margin = getElementForPath(merged, ['text', 'margin']) || result.margin;\n    result.font = _.extend(result.font, getElementForPath(merged, ['text', 'font']));\n    result.text = _.extend(result.text, getElementForPath(merged, ['text']));\n    result.borderType = getElementForPath(merged, ['border', 'type']) || result.borderType;\n    result.backgroundColor = getBackgroundColor() || result.backgroundColor;\n    result.cornerRadius = getElementForPath(merged, ['cornerRadius']) || result.cornerRadius;\n    result.lineColor = getElementForPath(merged, ['border', 'line', 'color']) || result.lineColor;\n    return result;\n  };\n  self.connectorControlPoint = function (childPosition, connectorStyle) {\n    var controlPointOffset = childPosition === 'horizontal' ? 1 : 1.75,\n      defaultControlPoint = {\n        'width': 0,\n        'height': controlPointOffset\n      },\n      configuredControlPoint = connectorStyle && getElementForPath(themeDictionary, ['connector', connectorStyle, 'controlPoint', childPosition]);\n    return configuredControlPoint && _.extend({}, configuredControlPoint) || defaultControlPoint;\n  };\n  self.connectorTheme = function (childPosition, childStyles, parentStyles) {\n    var position = childPosition || 'horizontal',\n      childConnectorStyle = self.attributeValue(['node'], childStyles, ['connections', 'style'], 'default'),\n      parentConnectorStyle = parentStyles && self.attributeValue(['node'], parentStyles, ['connections', 'childstyle'], false),\n      childConnector = getElementForPath(themeDictionary, ['connector', childConnectorStyle]),\n      parentConnector = parentConnectorStyle && getElementForPath(themeDictionary, ['connector', parentConnectorStyle]),\n      combinedStyle = parentConnectorStyle && parentConnectorStyle + '.' + childConnectorStyle,\n      combinedConnector = combinedStyle && getElementForPath(themeDictionary, ['connector', combinedStyle]),\n      connectorStyle = combinedConnector && combinedStyle || parentConnector && parentConnectorStyle || childConnectorStyle || 'default',\n      controlPoint = self.connectorControlPoint(position, connectorStyle),\n      connectorDefaults = {\n        type: 'quadratic',\n        label: defaultTheme.connector.default.label,\n        line: {\n          color: '#707070',\n          width: 1.0\n        }\n      },\n      returnedConnector = _.extend({}, combinedConnector || parentConnector || childConnector || connectorDefaults);\n    if (!returnedConnector.label) {\n      returnedConnector.label = connectorDefaults.label;\n    }\n    returnedConnector.controlPoint = controlPoint;\n    returnedConnector.line = returnedConnector.line || connectorDefaults.line;\n    return returnedConnector;\n  };\n  self.linkTheme = function (linkStyle) {\n    var fromCurrentTheme = getElementForPath(themeDictionary, ['link', linkStyle || 'default']),\n      fromDefaultTheme = defaultTheme.link.default;\n    return _.extend({}, fromDefaultTheme, fromCurrentTheme);\n  };\n  if (themeDictionary && themeDictionary.node && themeDictionary.node.forEach) {\n    themeDictionary.nodeArray = themeDictionary.node;\n    themeDictionary.node = {};\n    themeDictionary.nodeArray.forEach(function (nodeStyle) {\n      themeDictionary.node[nodeStyle.name] = nodeStyle;\n    });\n    delete themeDictionary.nodeArray;\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/theme.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/tree.js":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/tree.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  isEmptyGroup = __webpack_require__(/*! ./is-empty-group */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/is-empty-group.js\"),\n  outlineUtils = __webpack_require__(/*! ./outline */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/outline.js\"),\n  Tree = function Tree(options) {\n    'use strict';\n\n    _.extend(this, options);\n    this.toLayout = function (x, y, parentId) {\n      var result = {\n          nodes: {},\n          connectors: {}\n        },\n        self = _.pick(this, 'id', 'title', 'attr', 'width', 'height', 'level');\n      x = x || 0;\n      y = y || 0;\n      if (self.level === 1) {\n        self.x = Math.round(-0.5 * this.width);\n        self.y = Math.round(-0.5 * this.height);\n      } else {\n        self.x = x + this.deltaX || 0;\n        self.y = y + this.deltaY || 0;\n      }\n      result.nodes[this.id] = self;\n      if (parentId !== undefined) {\n        result.connectors[self.id] = {\n          from: parentId,\n          to: self.id\n        };\n      }\n      if (this.subtrees) {\n        this.subtrees.forEach(function (t) {\n          var subLayout = t.toLayout(self.x, self.y, self.id);\n          _.extend(result.nodes, subLayout.nodes);\n          _.extend(result.connectors, subLayout.connectors);\n        });\n      }\n      return result;\n    };\n  },\n  _calculateTree = function calculateTree(content, dimensionProvider, margin, rankAndParentPredicate, level) {\n    'use strict';\n\n    var options = {\n        id: content.id,\n        title: content.title,\n        attr: content.attr,\n        deltaY: 0,\n        deltaX: 0,\n        level: level || 1\n      },\n      buildReferenceTree = function buildReferenceTree(treeArray, dy, oldPositions) {\n        var referenceTree, tree;\n        var adjustSpacing = function adjustSpacing(i) {\n          var oldSpacing = oldPositions[i].deltaY - oldPositions[i - 1].deltaY,\n            newSpacing = treeArray[i].deltaY - treeArray[i - 1].deltaY;\n          if (newSpacing < oldSpacing) {\n            tree.deltaY += oldSpacing - newSpacing;\n          }\n        };\n        for (var i = 0; i < treeArray.length; i += 1) {\n          tree = treeArray[i];\n          if (tree.attr && tree.attr.position) {\n            tree.deltaY = tree.attr.position[1];\n            if (referenceTree === undefined || tree.attr.position[2] > treeArray[referenceTree].attr.position[2]) {\n              referenceTree = i;\n            }\n          } else {\n            tree.deltaY += dy;\n          }\n          if (i > 0) {\n            adjustSpacing(i);\n          }\n        }\n        return referenceTree;\n      },\n      setVerticalSpacing = function setVerticalSpacing(treeArray, dy) {\n        var oldPositions = _.map(treeArray, function (t) {\n            return _.pick(t, 'deltaX', 'deltaY');\n          }),\n          referenceTree = buildReferenceTree(treeArray, dy, oldPositions),\n          alignment = referenceTree && treeArray[referenceTree].attr.position[1] - treeArray[referenceTree].deltaY;\n        if (alignment) {\n          for (var i = 0; i < treeArray.length; i += 1) {\n            treeArray[i].deltaY += alignment;\n          }\n        }\n      },\n      shouldIncludeSubIdeas = function shouldIncludeSubIdeas() {\n        return !(_.isEmpty(content.ideas) || content.attr && content.attr.collapsed);\n      },\n      includedSubIdeaKeys = function includedSubIdeaKeys() {\n        var allRanks = _.map(_.keys(content.ideas), parseFloat),\n          candidateRanks = rankAndParentPredicate ? _.filter(allRanks, function (rank) {\n            return rankAndParentPredicate(rank, content.id);\n          }) : allRanks,\n          includedRanks = _.filter(candidateRanks, function (rank) {\n            return !isEmptyGroup(content.ideas[rank]);\n          });\n        return _.sortBy(includedRanks, Math.abs);\n      },\n      includedSubIdeas = function includedSubIdeas() {\n        var result = [];\n        _.each(includedSubIdeaKeys(), function (key) {\n          result.push(content.ideas[key]);\n        });\n        return result;\n      },\n      nodeDimensions = dimensionProvider(content, options.level),\n      appendSubtrees = function appendSubtrees(subtrees) {\n        var suboutline, deltaHeight, subtreePosition, horizontal, treeOutline;\n        _.each(subtrees, function (subtree) {\n          subtree.deltaX = nodeDimensions.width + margin;\n          subtreePosition = subtree.attr && subtree.attr.position && subtree.attr.position[0];\n          if (subtreePosition && subtreePosition > subtree.deltaX) {\n            horizontal = subtreePosition - subtree.deltaX;\n            subtree.deltaX = subtreePosition;\n          } else {\n            horizontal = 0;\n          }\n          if (!suboutline) {\n            suboutline = subtree.outline.indent(horizontal, margin);\n          } else {\n            treeOutline = subtree.outline.indent(horizontal, margin);\n            deltaHeight = treeOutline.initialHeight();\n            suboutline = treeOutline.stackBelow(suboutline, margin);\n            subtree.deltaY = Math.round(suboutline.initialHeight() - deltaHeight / 2 - subtree.height / 2);\n          }\n        });\n        if (subtrees && subtrees.length) {\n          setVerticalSpacing(subtrees, Math.round(0.5 * (nodeDimensions.height - suboutline.initialHeight())));\n          suboutline = suboutline.expand(Math.round(subtrees[0].deltaY - nodeDimensions.height * 0.5), Math.round(subtrees[subtrees.length - 1].deltaY + subtrees[subtrees.length - 1].height - nodeDimensions.height * 0.5));\n        }\n        options.outline = suboutline.insertAtStart(nodeDimensions, margin);\n      };\n    _.extend(options, nodeDimensions);\n    options.outline = outlineUtils.outlineFromDimensions(nodeDimensions);\n    if (shouldIncludeSubIdeas()) {\n      options.subtrees = _.map(includedSubIdeas(), function (i) {\n        return _calculateTree(i, dimensionProvider, margin, rankAndParentPredicate, options.level + 1);\n      });\n      if (!_.isEmpty(options.subtrees)) {\n        appendSubtrees(options.subtrees);\n      }\n    }\n    return new Tree(options);\n  };\nmodule.exports = {\n  Tree: Tree,\n  calculateTree: _calculateTree\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/tree.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nmodule.exports = {\n  URLHelper: __webpack_require__(/*! ./src/url-helper */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/url-helper.js\"),\n  sortedSubIdeas: __webpack_require__(/*! ./src/sorted-sub-ideas */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/sorted-sub-ideas.js\"),\n  traverse: __webpack_require__(/*! ./src/traverse */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/traverse.js\"),\n  formattedNodeTitle: __webpack_require__(/*! ./src/formatted-node-title */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/formatted-node-title.js\"),\n  contentUpgrade: __webpack_require__(/*! ./src/content-upgrade */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js\"),\n  content: __webpack_require__(/*! ./src/content */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content.js\"),\n  observable: __webpack_require__(/*! ./src/observable */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/observable.js\")\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nmodule.exports = function contentUpgrade(content) {\n  'use strict';\n\n  var upgradeV2 = function upgradeV2() {\n      var _doUpgrade = function doUpgrade(idea) {\n        var collapsed;\n        if (idea.style) {\n          idea.attr = {};\n          collapsed = idea.style.collapsed;\n          delete idea.style.collapsed;\n          idea.attr.style = idea.style;\n          if (collapsed) {\n            idea.attr.collapsed = collapsed;\n          }\n          delete idea.style;\n        }\n        if (idea.ideas) {\n          _.each(idea.ideas, _doUpgrade);\n        }\n      };\n      if (content.formatVersion && content.formatVersion >= 2) {\n        return;\n      }\n      _doUpgrade(content);\n      content.formatVersion = 2;\n    },\n    upgradeV3 = function upgradeV3() {\n      var doUpgrade = function doUpgrade() {\n        var rootAttrKeys = ['theme', 'measurements-config', 'storyboards', 'progress-statuses'],\n          oldRootAttr = content && content.attr || {},\n          newRootAttr = _.pick(oldRootAttr, rootAttrKeys),\n          newRootNodeAttr = _.omit(oldRootAttr, rootAttrKeys),\n          firstLevel = content && content.ideas,\n          newRoot = {\n            id: content.id,\n            title: content.title,\n            attr: newRootNodeAttr\n          };\n        if (firstLevel) {\n          newRoot.ideas = firstLevel;\n        }\n        content.id = 'root';\n        content.ideas = {\n          1: newRoot\n        };\n        delete content.title;\n        content.attr = newRootAttr;\n      };\n      if (content.formatVersion && content.formatVersion >= 3) {\n        return;\n      }\n      doUpgrade();\n      content.formatVersion = 3;\n    };\n  upgradeV2();\n  upgradeV3();\n  return content;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content.js":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*jshint loopfunc:true */\n/*global module, require*/\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  observable = __webpack_require__(/*! ./observable */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/observable.js\"),\n  contentUpgrade = __webpack_require__(/*! ./content-upgrade */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content-upgrade.js\");\nmodule.exports = function content(contentAggregate, sessionKey) {\n  'use strict';\n\n  var cachedId,\n    configuration = {},\n    isRedoInProgress = false;\n  var invalidateIdCache = function invalidateIdCache() {\n      cachedId = undefined;\n    },\n    maxId = function maxId(idea) {\n      idea = idea || contentAggregate;\n      if (!idea.ideas) {\n        return parseInt(idea.id, 10) || 0;\n      }\n      return _.reduce(idea.ideas, function (result, subidea) {\n        return Math.max(result, maxId(subidea));\n      }, parseInt(idea.id, 10) || 0);\n    },\n    nextId = function nextId(originSession) {\n      originSession = originSession || sessionKey;\n      if (!cachedId) {\n        cachedId = maxId();\n      }\n      cachedId += 1;\n      if (originSession) {\n        return cachedId + '.' + originSession;\n      }\n      return cachedId;\n    },\n    _init = function init(contentIdea, originSession) {\n      var initOfRoot = contentIdea.id === contentAggregate.id;\n      if (!contentIdea.id) {\n        contentIdea.id = nextId(originSession);\n      } else {\n        invalidateIdCache();\n      }\n      if (contentIdea.ideas) {\n        _.each(contentIdea.ideas, function (value, key) {\n          if (!initOfRoot && value.attr && value.attr.group && _.isEmpty(value.ideas)) {\n            delete contentIdea.ideas[key];\n          } else {\n            contentIdea.ideas[parseFloat(key)] = _init(value, originSession);\n          }\n        });\n      }\n      if (!contentIdea.title) {\n        contentIdea.title = '';\n      }\n      contentIdea.containsDirectChild = contentIdea.findChildRankById = function (childIdeaId) {\n        return parseFloat(_.reduce(contentIdea.ideas, function (res, value, key) {\n          return value.id == childIdeaId ? key : res; //eslint-disable-line eqeqeq\n        }, undefined));\n      };\n      contentIdea.findSubIdeaById = function (childIdeaId) {\n        var myChild = _.find(contentIdea.ideas, function (idea) {\n          return idea.id == childIdeaId; //eslint-disable-line eqeqeq\n        });\n        return myChild || _.reduce(contentIdea.ideas, function (result, idea) {\n          return result || idea.findSubIdeaById(childIdeaId);\n        }, undefined);\n      };\n      contentIdea.isEmptyGroup = function () {\n        return !contentAggregate.isRootNode(contentIdea.id) && contentIdea.attr && contentIdea.attr.group && _.isEmpty(contentIdea.ideas);\n      };\n      contentIdea.find = function (predicate) {\n        var current = predicate(contentIdea) ? [_.pick(contentIdea, 'id', 'title')] : [];\n        if (_.size(contentIdea.ideas) === 0) {\n          return current;\n        }\n        return _.reduce(contentIdea.ideas, function (result, idea) {\n          return _.union(result, idea.find(predicate));\n        }, current);\n      };\n      contentIdea.getAttr = function (name) {\n        if (contentIdea.attr && contentIdea.attr[name]) {\n          return _.clone(contentIdea.attr[name]);\n        }\n        return false;\n      };\n      contentIdea.sortedSubIdeas = function () {\n        var result = [],\n          childKeys = contentIdea.ideas && _.groupBy(_.map(_.keys(contentIdea.ideas), parseFloat), function (key) {\n            return key > 0;\n          }),\n          sortedChildKeys = childKeys && _.sortBy(childKeys[true], Math.abs).concat(_.sortBy(childKeys[false], Math.abs)); //eslint-disable-line dot-notation\n\n        if (!contentIdea.ideas) {\n          return [];\n        }\n        _.each(sortedChildKeys, function (key) {\n          result.push(contentIdea.ideas[key]);\n        });\n        return result;\n      };\n      contentIdea.traverse = function (iterator, postOrder) {\n        if (!postOrder && contentIdea !== contentAggregate) {\n          iterator(contentIdea);\n        }\n        _.each(contentIdea.sortedSubIdeas(), function (subIdea) {\n          subIdea.traverse(iterator, postOrder);\n        });\n        if (postOrder && contentIdea !== contentAggregate) {\n          iterator(contentIdea);\n        }\n      };\n      return contentIdea;\n    },\n    maxKey = function maxKey(kvMap, sign) {\n      var currentKeys = [];\n      sign = sign || 1;\n      if (_.size(kvMap) === 0) {\n        return 0;\n      }\n      currentKeys = _.keys(kvMap);\n      currentKeys.push(0); /* ensure at least 0 is there for negative ranks */\n      return _.max(_.map(currentKeys, parseFloat), function (x) {\n        return x * sign;\n      });\n    },\n    isRootNode = function isRootNode(id) {\n      return !!_.find(contentAggregate.ideas, function (idea) {\n        return idea.id === id;\n      });\n    },\n    nextChildRank = function nextChildRank(parentIdea) {\n      var newRank = 0,\n        counts = 0,\n        childRankSign = 1;\n      if (isRootNode(parentIdea.id)) {\n        counts = _.countBy(parentIdea.ideas, function (v, k) {\n          return k < 0;\n        });\n        if ((counts['true'] || 0) < counts['false']) {\n          //eslint-disable-line dot-notation\n          childRankSign = -1;\n        }\n      }\n      newRank = maxKey(parentIdea.ideas, childRankSign) + childRankSign;\n      return newRank;\n    },\n    appendSubIdea = function appendSubIdea(parentIdea, subIdea) {\n      var rank = 0;\n      parentIdea.ideas = parentIdea.ideas || {};\n      rank = nextChildRank(parentIdea);\n      parentIdea.ideas[rank] = subIdea;\n      return rank;\n    },\n    findIdeaById = function findIdeaById(ideaId) {\n      return contentAggregate.id == ideaId ? contentAggregate : contentAggregate.findSubIdeaById(ideaId); //eslint-disable-line eqeqeq\n    },\n    sameSideSiblingRanks = function sameSideSiblingRanks(parentIdea, ideaRank) {\n      //TODO https://stackoverflow.com/questions/41085189/using-underscore-variable-with-arrow-functions-in-es6-typescript\n      var keys = _.keys(parentIdea.ideas);\n      var map = _.map(keys, parseFloat);\n\n      // debugger\n      return;\n      _.reject(map, function (k) {\n        return k * ideaRank < 0;\n      });\n    },\n    sign = function sign(number) {\n      /* intentionally not returning 0 case, to help with split sorting into 2 groups */\n      return number < 0 ? -1 : 1;\n    },\n    eventStacks = {},\n    redoStacks = {},\n    batches = {},\n    notifyChange = function notifyChange(method, args, originSession) {\n      if (originSession) {\n        contentAggregate.dispatchEvent('changed', method, args, originSession);\n      } else {\n        contentAggregate.dispatchEvent('changed', method, args);\n      }\n    },\n    logChange = function logChange(method, args, undofunc, originSession) {\n      var event = {\n        eventMethod: method,\n        eventArgs: args,\n        undoFunction: undofunc\n      };\n      if (batches[originSession]) {\n        batches[originSession].push(event);\n        return;\n      }\n      if (!eventStacks[originSession]) {\n        eventStacks[originSession] = [];\n      }\n      eventStacks[originSession].push(event);\n      if (isRedoInProgress) {\n        contentAggregate.dispatchEvent('changed', 'redo', undefined, originSession);\n      } else {\n        notifyChange(method, args, originSession);\n        redoStacks[originSession] = [];\n      }\n    },\n    appendChange = function appendChange(method, args, undofunc, originSession) {\n      var executeOutsideBatch = function executeOutsideBatch() {\n        var prev = eventStacks[originSession].pop();\n        if (prev.eventMethod === 'batch') {\n          eventStacks[originSession].push({\n            eventMethod: 'batch',\n            eventArgs: prev.eventArgs.concat([[method].concat(args)]),\n            undoFunction: function undoFunction() {\n              undofunc();\n              prev.undoFunction();\n            }\n          });\n        } else {\n          eventStacks[originSession].push({\n            eventMethod: 'batch',\n            eventArgs: [[prev.eventMethod].concat(prev.eventArgs)].concat([[method].concat(args)]),\n            undoFunction: function undoFunction() {\n              undofunc();\n              prev.undoFunction();\n            }\n          });\n        }\n        if (isRedoInProgress) {\n          contentAggregate.dispatchEvent('changed', 'redo', undefined, originSession);\n        } else {\n          notifyChange(method, args, originSession);\n          redoStacks[originSession] = [];\n        }\n      };\n      if (method === 'batch' || batches[originSession] || !eventStacks || !eventStacks[originSession] || eventStacks[originSession].length === 0) {\n        logChange(method, args, undofunc, originSession);\n        return;\n      } else {\n        executeOutsideBatch();\n      }\n    },\n    reorderChild = function reorderChild(parentIdea, newRank, oldRank) {\n      var undoFunction = function undoFunction() {\n        if (parentIdea.ideas[oldRank] || !parentIdea.ideas[newRank]) {\n          return false;\n        }\n        parentIdea.ideas[oldRank] = parentIdea.ideas[newRank];\n        delete parentIdea.ideas[newRank];\n      };\n      parentIdea.ideas[newRank] = parentIdea.ideas[oldRank];\n      delete parentIdea.ideas[oldRank];\n      return undoFunction;\n    },\n    sessionFromId = function sessionFromId(id) {\n      var dotIndex = String(id).indexOf('.');\n      return dotIndex > 0 && id.substr(dotIndex + 1);\n    },\n    commandProcessors = {},\n    uniqueResourcePostfix = '/xxxxxxxx-yxxx-yxxx-yxxx-xxxxxxxxxxxx/'.replace(/[xy]/g, function (c) {\n      var r = Math.random() * 16 | 0,\n        v = c === 'x' ? r : r & 0x3 | 0x8;\n      return v.toString(16);\n    }) + (sessionKey || ''),\n    updateAttr = function updateAttr(object, attrName, attrValue) {\n      var oldAttr = object && _.extend({}, object.attr);\n      if (!object) {\n        return false;\n      }\n      object.attr = _.extend({}, object.attr);\n      if (!attrValue || attrValue === 'false' || _.isObject(attrValue) && _.isEmpty(attrValue)) {\n        if (!object.attr[attrName]) {\n          return false;\n        }\n        delete object.attr[attrName];\n      } else {\n        if (_.isEqual(object.attr[attrName], attrValue)) {\n          return false;\n        }\n        object.attr[attrName] = JSON.parse(JSON.stringify(attrValue));\n      }\n      if (_.size(object.attr) === 0) {\n        delete object.attr;\n      }\n      return function () {\n        object.attr = oldAttr;\n      };\n    },\n    findLinkBetween = function findLinkBetween(ideaIdFrom, ideaIdTo) {\n      return _.find(contentAggregate.links, function (link) {\n        return link.ideaIdFrom === ideaIdFrom && link.ideaIdTo === ideaIdTo || link.ideaIdFrom === ideaIdTo && link.ideaIdTo === ideaIdFrom;\n      });\n    },\n    isLinkValid = function isLinkValid(ideaIdFrom, ideaIdTo) {\n      var ideaFrom = findIdeaById(ideaIdFrom),\n        ideaTo = findIdeaById(ideaIdTo),\n        isParentChild = ideaFrom && ideaTo && (_.find(ideaFrom.ideas, function (node) {\n          return node.id === ideaIdTo;\n        }) || _.find(ideaTo.ideas, function (node) {\n          return node.id === ideaIdFrom;\n        }));\n      if (ideaIdFrom === ideaIdTo) {\n        return false;\n      }\n      if (!ideaFrom) {\n        return false;\n      }\n      if (!ideaTo) {\n        return false;\n      }\n      if (isParentChild) {\n        return false;\n      }\n      return true;\n    },\n    findLinkDirectional = function findLinkDirectional(ideaIdFrom, ideaIdTo) {\n      return _.find(contentAggregate.links, function (link) {\n        return link.ideaIdFrom == ideaIdFrom && link.ideaIdTo == ideaIdTo; //eslint-disable-line eqeqeq\n      });\n    };\n  contentAggregate.setConfiguration = function (config) {\n    configuration = config || {};\n  };\n  contentAggregate.getSessionKey = function () {\n    return sessionKey;\n  };\n  contentAggregate.nextSiblingId = function (subIdeaId) {\n    var parentIdea = contentAggregate.findParent(subIdeaId),\n      currentRank = parentIdea && parentIdea.findChildRankById(subIdeaId),\n      candidateSiblingRanks = currentRank && sameSideSiblingRanks(parentIdea, currentRank),\n      siblingsAfter = candidateSiblingRanks && _.reject(candidateSiblingRanks, function (k) {\n        return Math.abs(k) <= Math.abs(currentRank);\n      });\n    if (!parentIdea) {\n      return false;\n    }\n    if (siblingsAfter.length === 0) {\n      return false;\n    }\n    return false;\n    return parentIdea.ideas[_.min(siblingsAfter, Math.abs)].id;\n  };\n  contentAggregate.sameSideSiblingIds = function (subIdeaId) {\n    var parentIdea = contentAggregate.findParent(subIdeaId),\n      currentRank = parentIdea.findChildRankById(subIdeaId);\n    return _.without(_.map(_.pick(parentIdea.ideas, sameSideSiblingRanks(parentIdea, currentRank)), function (i) {\n      return i.id;\n    }), subIdeaId);\n  };\n  contentAggregate.getAttrById = function (ideaId, attrName) {\n    var idea = findIdeaById(ideaId);\n    return idea && idea.getAttr(attrName);\n  };\n  contentAggregate.previousSiblingId = function (subIdeaId) {\n    var parentIdea = contentAggregate.findParent(subIdeaId),\n      currentRank = parentIdea && parentIdea.findChildRankById(subIdeaId),\n      candidateSiblingRanks = currentRank && sameSideSiblingRanks(parentIdea, currentRank),\n      siblingsBefore = candidateSiblingRanks && _.reject(candidateSiblingRanks, function (k) {\n        return Math.abs(k) >= Math.abs(currentRank);\n      });\n    if (!parentIdea) {\n      return false;\n    }\n    if (siblingsBefore.length === 0) {\n      return false;\n    }\n    return parentIdea.ideas[_.max(siblingsBefore, Math.abs)].id;\n  };\n  contentAggregate.clone = function (subIdeaId) {\n    var toClone = subIdeaId && subIdeaId != contentAggregate.id && contentAggregate.findSubIdeaById(subIdeaId) || contentAggregate; //eslint-disable-line eqeqeq\n    return JSON.parse(JSON.stringify(toClone));\n  };\n  contentAggregate.cloneMultiple = function (subIdeaIdArray) {\n    return _.map(subIdeaIdArray, contentAggregate.clone);\n  };\n  contentAggregate.calculatePath = function (ideaId, currentPath, potentialParent) {\n    if (contentAggregate.isRootNode(ideaId)) {\n      return [];\n    }\n    currentPath = currentPath || [contentAggregate];\n    potentialParent = potentialParent || contentAggregate;\n    if (potentialParent.containsDirectChild(ideaId)) {\n      return currentPath;\n    }\n    return _.reduce(potentialParent.ideas, function (result, child) {\n      return result || contentAggregate.calculatePath(ideaId, [child].concat(currentPath), child);\n    }, false);\n  };\n  contentAggregate.getSubTreeIds = function (rootIdeaId) {\n    var result = [],\n      _collectIds = function collectIds(idea) {\n        if (_.isEmpty(idea.ideas)) {\n          return [];\n        }\n        _.each(idea.sortedSubIdeas(), function (child) {\n          _collectIds(child);\n          result.push(child.id);\n        });\n      };\n    _collectIds(contentAggregate.findSubIdeaById(rootIdeaId) || contentAggregate);\n    return result;\n  };\n  contentAggregate.findParent = function (subIdeaId, parentIdea) {\n    parentIdea = parentIdea || contentAggregate;\n    if (contentAggregate.isRootNode(subIdeaId)) {\n      return false;\n    }\n    if (parentIdea.containsDirectChild(subIdeaId)) {\n      return parentIdea;\n    }\n    return _.reduce(parentIdea.ideas, function (result, child) {\n      return result || contentAggregate.findParent(subIdeaId, child);\n    }, false);\n  };\n\n  /**** aggregate command processing methods ****/\n  contentAggregate.isBatchActive = function (originSession) {\n    var activeSession = originSession || sessionKey;\n    return !!batches[activeSession];\n  };\n  contentAggregate.startBatch = function (originSession) {\n    var activeSession = originSession || sessionKey;\n    contentAggregate.endBatch(originSession);\n    batches[activeSession] = [];\n  };\n  contentAggregate.discardBatch = function (originSession) {\n    var activeSession = originSession || sessionKey;\n    batches[activeSession] = undefined;\n  };\n  contentAggregate.endBatch = function (originSession) {\n    var activeSession = originSession || sessionKey,\n      inBatch = batches[activeSession],\n      performBatchOperations = function performBatchOperations() {\n        var batchArgs = _.map(inBatch, function (event) {\n            return [event.eventMethod].concat(event.eventArgs);\n          }),\n          batchUndoFunctions = _.sortBy(_.map(inBatch, function (event) {\n            return event.undoFunction;\n          }), function (f, idx) {\n            return -1 * idx;\n          }),\n          undo = function undo() {\n            _.each(batchUndoFunctions, function (eventUndo) {\n              eventUndo();\n            });\n          };\n        logChange('batch', batchArgs, undo, activeSession);\n      };\n    batches[activeSession] = undefined;\n    if (_.isEmpty(inBatch)) {\n      return;\n    }\n    if (_.size(inBatch) === 1) {\n      logChange(inBatch[0].eventMethod, inBatch[0].eventArgs, inBatch[0].undoFunction, activeSession);\n    } else {\n      performBatchOperations();\n    }\n  };\n  contentAggregate.execCommand = function (cmd, args, originSession) {\n    if (!commandProcessors[cmd]) {\n      return false;\n    }\n    return commandProcessors[cmd].apply(contentAggregate, [originSession || sessionKey].concat(_.toArray(args)));\n  };\n  contentAggregate.batch = function (batchOp) {\n    var hasActiveBatch = contentAggregate.isBatchActive();\n    var results;\n    if (!hasActiveBatch) {\n      contentAggregate.startBatch();\n    }\n    try {\n      results = batchOp();\n    } catch (e) {\n      if (!hasActiveBatch) {\n        contentAggregate.discardBatch();\n      }\n      throw e;\n    }\n    if (!hasActiveBatch) {\n      contentAggregate.endBatch();\n    }\n    return results;\n  };\n  commandProcessors.batch = function (originSession) {\n    contentAggregate.startBatch(originSession);\n    try {\n      _.each(_.toArray(arguments).slice(1), function (event) {\n        contentAggregate.execCommand(event[0], event.slice(1), originSession);\n      });\n    } finally {\n      contentAggregate.endBatch(originSession);\n    }\n  };\n  contentAggregate.pasteMultiple = function (parentIdeaId, jsonArrayToPaste) {\n    return contentAggregate.batch(function () {\n      return _.map(jsonArrayToPaste, function (json) {\n        return contentAggregate.paste(parentIdeaId, json);\n      });\n    });\n  };\n  contentAggregate.paste = function /*parentIdeaId, jsonToPaste, initialId*/\n  () {\n    return contentAggregate.execCommand('paste', arguments);\n  };\n  commandProcessors.paste = function (originSession, parentIdeaId, jsonToPaste, initialId) {\n    var pasteParent = parentIdeaId == contentAggregate.id ? contentAggregate : contentAggregate.findSubIdeaById(parentIdeaId),\n      //eslint-disable-line eqeqeq\n      _cleanUp = function cleanUp(json) {\n        var result = _.omit(json, 'ideas', 'id', 'attr');\n        var index = 1,\n          childKeys,\n          sortedChildKeys;\n        result.attr = _.omit(json.attr, configuration.nonClonedAttributes);\n        if (_.isEmpty(result.attr)) {\n          delete result.attr;\n        }\n        if (json.ideas) {\n          childKeys = _.groupBy(_.map(_.keys(json.ideas), parseFloat), function (key) {\n            return key > 0;\n          });\n          sortedChildKeys = _.sortBy(childKeys[true], Math.abs).concat(_.sortBy(childKeys[false], Math.abs)); //eslint-disable-line dot-notation\n          result.ideas = {};\n          _.each(sortedChildKeys, function (key) {\n            result.ideas[index++] = _cleanUp(json.ideas[key]); // eslint-disable-line no-plusplus\n          });\n        }\n        return result;\n      };\n    var newIdea = undefined,\n      newRank = 0;\n    if (initialId) {\n      cachedId = parseInt(initialId, 10) - 1;\n    }\n    newIdea = jsonToPaste && (jsonToPaste.title || jsonToPaste.attr) && _init(_cleanUp(jsonToPaste), sessionFromId(initialId));\n    if (!pasteParent || !newIdea) {\n      return false;\n    }\n    newRank = appendSubIdea(pasteParent, newIdea);\n    if (initialId) {\n      invalidateIdCache();\n    }\n    updateAttr(newIdea, 'position');\n    logChange('paste', [parentIdeaId, jsonToPaste, newIdea.id], function () {\n      delete pasteParent.ideas[newRank];\n    }, originSession);\n    return newIdea.id;\n  };\n  contentAggregate.flip = function /*ideaId*/\n  () {\n    return contentAggregate.execCommand('flip', arguments);\n  };\n  commandProcessors.flip = function (originSession, ideaId) {\n    var parentIdea = contentAggregate.findParent(ideaId),\n      currentRank = parentIdea && contentAggregate.isRootNode(parentIdea.id) && parentIdea.findChildRankById(ideaId),\n      performFlip = function performFlip() {\n        var maxRank = maxKey(parentIdea.ideas, -1 * sign(currentRank)),\n          newRank = maxRank - 10 * sign(currentRank),\n          undoFunction = reorderChild(parentIdea, newRank, currentRank);\n        logChange('flip', [ideaId], undoFunction, originSession);\n      };\n    if (!currentRank) {\n      return false;\n    }\n    performFlip();\n    return true;\n  };\n  contentAggregate.initialiseTitle = function /*ideaId, title*/\n  () {\n    return contentAggregate.execCommand('initialiseTitle', arguments);\n  };\n  commandProcessors.initialiseTitle = function (originSession, ideaId, title) {\n    var idea = findIdeaById(ideaId),\n      originalTitle = idea && idea.title;\n    if (!idea) {\n      return false;\n    }\n    if (originalTitle === title) {\n      return false;\n    }\n    idea.title = title;\n    appendChange('initialiseTitle', [ideaId, title], function () {\n      idea.title = originalTitle;\n    }, originSession);\n    return true;\n  };\n  contentAggregate.updateTitle = function /*ideaId, title*/\n  () {\n    return contentAggregate.execCommand('updateTitle', arguments);\n  };\n  commandProcessors.updateTitle = function (originSession, ideaId, title) {\n    var idea = findIdeaById(ideaId),\n      originalTitle = idea && idea.title;\n    if (!idea) {\n      return false;\n    }\n    if (originalTitle === title) {\n      return false;\n    }\n    idea.title = title;\n    logChange('updateTitle', [ideaId, title], function () {\n      idea.title = originalTitle;\n    }, originSession);\n    return true;\n  };\n  contentAggregate.addSubIdea = function /*parentId, ideaTitle, optionalNewId*/\n  () {\n    return contentAggregate.execCommand('addSubIdea', arguments);\n  };\n  commandProcessors.addSubIdea = function (originSession, parentId, ideaTitle, optionalNewId) {\n    var parent = findIdeaById(parentId),\n      performAdd = function performAdd() {\n        var idea = _init({\n            title: ideaTitle,\n            id: optionalNewId\n          }),\n          newRank = appendSubIdea(parent, idea);\n        logChange('addSubIdea', [parentId, ideaTitle, idea.id], function () {\n          delete parent.ideas[newRank];\n        }, originSession);\n        return idea.id;\n      };\n    if (!parent) {\n      return false;\n    }\n    if (optionalNewId && findIdeaById(optionalNewId)) {\n      return false;\n    }\n    return performAdd();\n  };\n  contentAggregate.removeMultiple = function (subIdeaIdArray) {\n    var results = false;\n    contentAggregate.startBatch();\n    results = _.map(subIdeaIdArray, contentAggregate.removeSubIdea);\n    contentAggregate.endBatch();\n    return results;\n  };\n  contentAggregate.removeSubIdea = function /*subIdeaId*/\n  () {\n    return contentAggregate.execCommand('removeSubIdea', arguments);\n  };\n  commandProcessors.removeSubIdea = function (originSession, subIdeaId) {\n    var canRemove = function canRemove() {\n        return !contentAggregate.isRootNode(subIdeaId) || _.size(contentAggregate.ideas) > 1;\n      },\n      performRemove = function performRemove() {\n        var parent = contentAggregate.findParent(subIdeaId) || contentAggregate,\n          oldRank = parent && parent.findChildRankById(subIdeaId),\n          oldIdea = parent && parent.ideas[oldRank],\n          oldLinks = contentAggregate.links,\n          removedNodeIds = {};\n        if (!oldRank) {\n          return false;\n        }\n        oldIdea.traverse(function (traversed) {\n          return removedNodeIds[traversed.id] = true;\n        });\n        delete parent.ideas[oldRank];\n        contentAggregate.links = _.reject(contentAggregate.links, function (link) {\n          return removedNodeIds[link.ideaIdFrom] || removedNodeIds[link.ideaIdTo];\n        });\n        logChange('removeSubIdea', [subIdeaId], function () {\n          parent.ideas[oldRank] = oldIdea;\n          contentAggregate.links = oldLinks;\n        }, originSession);\n        return true;\n      };\n    if (!canRemove()) {\n      return false;\n    }\n    return performRemove();\n  };\n  contentAggregate.insertIntermediateMultiple = function (idArray, ideaOptions) {\n    return contentAggregate.batch(function () {\n      var newId = contentAggregate.insertIntermediate(idArray[0], ideaOptions && ideaOptions.title);\n      if (ideaOptions && ideaOptions.attr) {\n        Object.keys(ideaOptions.attr).forEach(function (key) {\n          contentAggregate.updateAttr(newId, key, ideaOptions.attr[key]);\n        });\n      }\n      _.each(idArray.slice(1), function (id) {\n        contentAggregate.changeParent(id, newId);\n      });\n      return newId;\n    });\n  };\n  contentAggregate.insertIntermediate = function /*inFrontOfIdeaId, title, optionalNewId*/\n  () {\n    return contentAggregate.execCommand('insertIntermediate', arguments);\n  };\n  commandProcessors.insertIntermediate = function (originSession, inFrontOfIdeaId, title, optionalNewId) {\n    var parentIdea = contentAggregate.isRootNode(inFrontOfIdeaId) ? contentAggregate : contentAggregate.findParent(inFrontOfIdeaId),\n      childRank = parentIdea && parentIdea.findChildRankById(inFrontOfIdeaId),\n      canInsert = function canInsert() {\n        if (contentAggregate.id == inFrontOfIdeaId) {\n          //eslint-disable-line eqeqeq\n          return false;\n        }\n        if (!parentIdea) {\n          return false;\n        }\n        if (optionalNewId && findIdeaById(optionalNewId)) {\n          return false;\n        }\n        if (!childRank) {\n          return false;\n        }\n        return true;\n      },\n      performInsert = function performInsert() {\n        var oldIdea = parentIdea.ideas[childRank],\n          newIdea = _init({\n            title: title,\n            id: optionalNewId\n          });\n        parentIdea.ideas[childRank] = newIdea;\n        newIdea.ideas = {\n          1: oldIdea\n        };\n        logChange('insertIntermediate', [inFrontOfIdeaId, title, newIdea.id], function () {\n          parentIdea.ideas[childRank] = oldIdea;\n        }, originSession);\n        return newIdea.id;\n      };\n    if (!canInsert()) {\n      return false;\n    }\n    return performInsert();\n  };\n  contentAggregate.changeParent = function /*ideaId, newParentId*/\n  () {\n    return contentAggregate.execCommand('changeParent', arguments);\n  };\n  commandProcessors.changeParent = function (originSession, ideaId, newParentId) {\n    var parent = findIdeaById(newParentId),\n      idea = contentAggregate.findSubIdeaById(ideaId),\n      oldParent = contentAggregate.isRootNode(ideaId) ? contentAggregate : contentAggregate.findParent(ideaId),\n      canChangeParent = function canChangeParent() {\n        if (ideaId == newParentId) {\n          // eslint-disable-line eqeqeq\n          return false;\n        }\n        if (!parent) {\n          return false;\n        }\n        if (!idea) {\n          return false;\n        }\n        if (idea.findSubIdeaById(newParentId)) {\n          return false;\n        }\n        if (parent.containsDirectChild(ideaId)) {\n          return false;\n        }\n        if (!oldParent) {\n          return false;\n        }\n        return true;\n      },\n      performChangeParent = function performChangeParent() {\n        var oldRank = oldParent.findChildRankById(ideaId),\n          newRank = appendSubIdea(parent, idea),\n          oldPosition = idea.getAttr('position');\n        updateAttr(idea, 'position');\n        delete oldParent.ideas[oldRank];\n        logChange('changeParent', [ideaId, newParentId], function () {\n          updateAttr(idea, 'position', oldPosition);\n          oldParent.ideas[oldRank] = idea;\n          delete parent.ideas[newRank];\n        }, originSession);\n      };\n    if (!canChangeParent()) {\n      return false;\n    }\n    performChangeParent();\n    return true;\n  };\n  contentAggregate.mergeAttrProperty = function (ideaId, attrName, attrPropertyName, attrPropertyValue) {\n    var val = contentAggregate.getAttrById(ideaId, attrName) || {};\n    if (attrPropertyValue) {\n      val[attrPropertyName] = attrPropertyValue;\n    } else {\n      delete val[attrPropertyName];\n    }\n    if (_.isEmpty(val)) {\n      val = false;\n    }\n    return contentAggregate.updateAttr(ideaId, attrName, val);\n  };\n  contentAggregate.updateAttr = function /*ideaId, attrName, attrValue*/\n  () {\n    return contentAggregate.execCommand('updateAttr', arguments);\n  };\n  commandProcessors.updateAttr = function (originSession, ideaId, attrName, attrValue) {\n    var idea = findIdeaById(ideaId),\n      undoAction = updateAttr(idea, attrName, attrValue);\n    if (undoAction) {\n      logChange('updateAttr', [ideaId, attrName, attrValue], undoAction, originSession);\n    }\n    return !!undoAction;\n  };\n  contentAggregate.getOrderedSiblingRanks = function (ideaId, options) {\n    var parentIdea = contentAggregate.findParent(ideaId),\n      currentRank = parentIdea && parentIdea.findChildRankById(ideaId);\n    if (!currentRank) {\n      return false;\n    }\n    if (options && options.ignoreRankSide) {\n      return _.sortBy(_.map(_.keys(parentIdea.ideas), parseFloat));\n    } else {\n      return _.sortBy(sameSideSiblingRanks(parentIdea, currentRank), Math.abs);\n    }\n  };\n  contentAggregate.moveRelative = function (ideaId, relativeMovement, options) {\n    var parentIdea = contentAggregate.findParent(ideaId),\n      currentRank = parentIdea && parentIdea.findChildRankById(ideaId),\n      siblingRanks = contentAggregate.getOrderedSiblingRanks(ideaId, options),\n      currentIndex = siblingRanks && siblingRanks.indexOf(currentRank),\n      calcNewIndex = function calcNewIndex() {\n        var calcIndex = currentIndex + (relativeMovement > 0 ? relativeMovement + 1 : relativeMovement);\n        if (options && options.ignoreRankSide) {\n          if (currentRank < 0) {\n            calcIndex = currentIndex + (relativeMovement < 0 ? relativeMovement - 1 : relativeMovement);\n            if (siblingRanks[calcIndex] > 0) {\n              calcIndex = calcIndex + 1;\n            }\n          } else if (siblingRanks[calcIndex] < 0) {\n            calcIndex = calcIndex - 1;\n          }\n        }\n        return calcIndex;\n      },\n      /* we call positionBefore, so movement down is actually 2 spaces, not 1 */\n      newIndex = calcNewIndex(),\n      beforeRank = newIndex >= 0 && siblingRanks && siblingRanks.length && siblingRanks[newIndex],\n      beforeSibling = beforeRank && parentIdea && parentIdea.ideas[beforeRank],\n      shouldNotPosition = function shouldNotPosition() {\n        if (!parentIdea) {\n          return false;\n        }\n        if (options && options.ignoreRankSide && currentRank < 0) {\n          return newIndex > siblingRanks.length - 1;\n        }\n        return newIndex < 0;\n      };\n    var result = false;\n    if (shouldNotPosition()) {\n      return false;\n    }\n    contentAggregate.startBatch();\n    //handle reordering on top down maps where moving from positive to negative or vice versa\n    if (options && options.ignoreRankSide && beforeRank && beforeSibling && beforeRank * currentRank < 0) {\n      contentAggregate.flip(ideaId);\n    }\n    result = contentAggregate.positionBefore(ideaId, beforeSibling && beforeSibling.id, parentIdea);\n    contentAggregate.endBatch();\n    return result;\n  };\n  contentAggregate.positionBefore = function /*ideaId, positionBeforeIdeaId, parentIdea*/\n  () {\n    return contentAggregate.execCommand('positionBefore', arguments);\n  };\n  commandProcessors.positionBefore = function (originSession, ideaId, positionBeforeIdeaId, parentIdeaArg) {\n    var newRank,\n      afterRank,\n      siblingRanks,\n      candidateSiblings,\n      beforeRank,\n      maxRank,\n      undoFunction = undefined;\n    var parentIdea = parentIdeaArg || contentAggregate.findParent(ideaId),\n      currentRank = parentIdea && parentIdea.findChildRankById(ideaId);\n    if (!parentIdea) {\n      return false;\n    }\n    if (ideaId == positionBeforeIdeaId) {\n      //eslint-disable-line eqeqeq\n      return false;\n    }\n    newRank = 0;\n    if (positionBeforeIdeaId) {\n      afterRank = parentIdea.findChildRankById(positionBeforeIdeaId);\n      if (!afterRank) {\n        return false;\n      }\n      siblingRanks = sameSideSiblingRanks(parentIdea, afterRank);\n      candidateSiblings = _.reject(_.sortBy(siblingRanks, Math.abs), function (k) {\n        return Math.abs(k) >= Math.abs(afterRank);\n      });\n      beforeRank = candidateSiblings.length > 0 ? _.max(candidateSiblings, Math.abs) : 0;\n      if (beforeRank == currentRank) {\n        //eslint-disable-line eqeqeq\n        return false;\n      }\n      newRank = beforeRank + (afterRank - beforeRank) / 2;\n    } else {\n      maxRank = maxKey(parentIdea.ideas, currentRank < 0 ? -1 : 1);\n      if (maxRank == currentRank) {\n        //eslint-disable-line eqeqeq\n        return false;\n      }\n      newRank = maxRank + 10 * (currentRank < 0 ? -1 : 1);\n    }\n    if (newRank == currentRank) {\n      //eslint-disable-line eqeqeq\n      return false;\n    }\n    undoFunction = reorderChild(parentIdea, newRank, currentRank);\n    logChange('positionBefore', [ideaId, positionBeforeIdeaId], undoFunction, originSession);\n    return true;\n  };\n  contentAggregate.addLink = function /*ideaIdFrom, ideaIdTo*/\n  () {\n    return contentAggregate.execCommand('addLink', arguments);\n  };\n  commandProcessors.addLink = function (originSession, ideaIdFrom, ideaIdTo) {\n    var link = {\n      ideaIdFrom: ideaIdFrom,\n      ideaIdTo: ideaIdTo,\n      attr: {\n        style: {\n          color: '#FF0000',\n          lineStyle: 'dashed'\n        }\n      }\n    };\n    if (!isLinkValid(ideaIdFrom, ideaIdTo)) {\n      return false;\n    }\n    if (findLinkBetween(ideaIdFrom, ideaIdTo)) {\n      return false;\n    }\n    contentAggregate.links = contentAggregate.links || [];\n    contentAggregate.links.push(link);\n    logChange('addLink', [ideaIdFrom, ideaIdTo], function () {\n      contentAggregate.links.pop();\n    }, originSession);\n    return true;\n  };\n  contentAggregate.removeLink = function /*ideaIdOne, ideaIdTwo*/\n  () {\n    return contentAggregate.execCommand('removeLink', arguments);\n  };\n  commandProcessors.removeLink = function (originSession, ideaIdOne, ideaIdTwo) {\n    var i = 0,\n      link;\n    while (contentAggregate.links && i < contentAggregate.links.length) {\n      link = contentAggregate.links[i];\n      if (link.ideaIdFrom === ideaIdOne && link.ideaIdTo === ideaIdTwo) {\n        //eslint-disable-line eqeqeq\n        contentAggregate.links.splice(i, 1);\n        logChange('removeLink', [ideaIdOne, ideaIdTwo], function () {\n          contentAggregate.links.push(_.clone(link));\n        }, originSession);\n        return true;\n      }\n      i += 1;\n    }\n    return false;\n  };\n  contentAggregate.getLinkAttr = function (ideaIdFrom, ideaIdTo, name) {\n    var link = findLinkDirectional(ideaIdFrom, ideaIdTo);\n    if (link && link.attr && link.attr[name]) {\n      return link.attr[name];\n    }\n    return false;\n  };\n  contentAggregate.updateLinkAttr = function /*ideaIdFrom, ideaIdTo, attrName, attrValue*/\n  () {\n    return contentAggregate.execCommand('updateLinkAttr', arguments);\n  };\n  commandProcessors.updateLinkAttr = function (originSession, ideaIdFrom, ideaIdTo, attrName, attrValue) {\n    var link = findLinkDirectional(ideaIdFrom, ideaIdTo),\n      undoAction = updateAttr(link, attrName, attrValue);\n    if (undoAction) {\n      logChange('updateLinkAttr', [ideaIdFrom, ideaIdTo, attrName, attrValue], undoAction, originSession);\n    }\n    return !!undoAction;\n  };\n\n  /* undo/redo */\n  contentAggregate.canUndo = function () {\n    return !!(eventStacks[sessionKey] && eventStacks[sessionKey].length > 0);\n  };\n  contentAggregate.canRedo = function () {\n    return !!(redoStacks[sessionKey] && redoStacks[sessionKey].length > 0);\n  };\n  contentAggregate.undo = function () {\n    return contentAggregate.execCommand('undo', arguments);\n  };\n  commandProcessors.undo = function (originSession) {\n    var topEvent = false;\n    contentAggregate.endBatch();\n    topEvent = eventStacks[originSession] && eventStacks[originSession].pop();\n    if (topEvent && topEvent.undoFunction) {\n      topEvent.undoFunction();\n      if (!redoStacks[originSession]) {\n        redoStacks[originSession] = [];\n      }\n      redoStacks[originSession].push(topEvent);\n      contentAggregate.dispatchEvent('changed', 'undo', [], originSession);\n      return true;\n    }\n    return false;\n  };\n  contentAggregate.redo = function () {\n    return contentAggregate.execCommand('redo', arguments);\n  };\n  commandProcessors.redo = function (originSession) {\n    var topEvent = false;\n    contentAggregate.endBatch();\n    topEvent = redoStacks[originSession] && redoStacks[originSession].pop();\n    if (topEvent) {\n      isRedoInProgress = true;\n      contentAggregate.execCommand(topEvent.eventMethod, topEvent.eventArgs, originSession);\n      isRedoInProgress = false;\n      return true;\n    }\n    return false;\n  };\n  contentAggregate.storeResource = function /*resourceBody, optionalKey*/\n  () {\n    return contentAggregate.execCommand('storeResource', arguments);\n  };\n  commandProcessors.storeResource = function (originSession, resourceBody, optionalKey) {\n    var maxIdForSession = function maxIdForSession() {\n        var keys = _.keys(contentAggregate.resources),\n          filteredKeys = sessionKey ? _.filter(keys, RegExp.prototype.test.bind(new RegExp('\\\\/' + sessionKey + '$'))) : keys,\n          intKeys = _.map(filteredKeys, function (string) {\n            return parseInt(string, 10);\n          });\n        return _.isEmpty(intKeys) ? 0 : _.max(intKeys);\n      },\n      nextResourceId = function nextResourceId() {\n        var intId = maxIdForSession() + 1;\n        return intId + uniqueResourcePostfix;\n      },\n      getExistingResourceId = function getExistingResourceId() {\n        if (!optionalKey && contentAggregate.resources) {\n          return _.find(_.keys(contentAggregate.resources), function (key) {\n            return contentAggregate.resources[key] === resourceBody;\n          });\n        }\n      },\n      storeNewResource = function storeNewResource() {\n        var id = optionalKey || nextResourceId();\n        contentAggregate.resources = contentAggregate.resources || {};\n        contentAggregate.resources[id] = resourceBody;\n        contentAggregate.dispatchEvent('resourceStored', resourceBody, id, originSession);\n        return id;\n      };\n    return getExistingResourceId() || storeNewResource();\n  };\n  contentAggregate.getResource = function (id) {\n    return contentAggregate.resources && contentAggregate.resources[id];\n  };\n  contentAggregate.hasSiblings = function (id) {\n    var parent = contentAggregate.findParent(id);\n    if (contentAggregate.isRootNode(id)) {\n      return false;\n    }\n    return parent && _.size(parent.ideas) > 1;\n  };\n  contentAggregate.isRootNode = function (id) {\n    return isRootNode(id);\n  };\n  contentAggregate.getDefaultRootId = function () {\n    var rootNodes = contentAggregate && _.values(contentAggregate.ideas);\n    return rootNodes && rootNodes.length && rootNodes[0].id;\n  };\n  contentUpgrade(contentAggregate);\n  observable(contentAggregate);\n  _init(contentAggregate);\n  return contentAggregate;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/content.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/formatted-node-title.js":
/*!***************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/formatted-node-title.js ***!
  \***************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require*/\nvar urlHelper = __webpack_require__(/*! ./url-helper */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/url-helper.js\"),\n  removeLinks = function removeLinks(nodeTitle, maxUrlLength) {\n    'use strict';\n\n    var strippedTitle = nodeTitle && urlHelper.stripLink(nodeTitle);\n    if (!nodeTitle) {\n      return '';\n    }\n    if (strippedTitle.trim() === '') {\n      return !maxUrlLength || nodeTitle.length < maxUrlLength ? nodeTitle : nodeTitle.substring(0, maxUrlLength) + '...';\n    } else {\n      return strippedTitle;\n    }\n  },\n  removeExtraSpaces = function removeExtraSpaces(nodeTitle) {\n    'use strict';\n\n    return nodeTitle.replace(/[ \\t]+/g, ' ');\n  },\n  trimLines = function trimLines(nodeTitle) {\n    'use strict';\n\n    return nodeTitle.replace(/\\r/g, '').split('\\n').map(function (line) {\n      return line.trim();\n    }).join('\\n');\n  };\nmodule.exports = function (nodeTitle, maxUrlLength) {\n  'use strict';\n\n  return trimLines(removeExtraSpaces(removeLinks(nodeTitle, maxUrlLength)));\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/formatted-node-title.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/observable.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/observable.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module, console*/\nmodule.exports = function observable(base) {\n  'use strict';\n\n  var listeners = [];\n  base.addEventListener = function (types, listener, priority) {\n    types.split(' ').forEach(function (type) {\n      if (type) {\n        listeners.push({\n          type: type,\n          listener: listener,\n          priority: priority || 0\n        });\n      }\n    });\n  };\n  base.listeners = function (type) {\n    return listeners.filter(function (listenerDetails) {\n      return listenerDetails.type === type;\n    }).map(function (listenerDetails) {\n      return listenerDetails.listener;\n    });\n  };\n  base.removeEventListener = function (type, listener) {\n    listeners = listeners.filter(function (details) {\n      return details.listener !== listener;\n    });\n  };\n  base.dispatchEvent = function (type) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    listeners.filter(function (listenerDetails) {\n      return listenerDetails.type === type;\n    }).sort(function (firstListenerDetails, secondListenerDetails) {\n      return secondListenerDetails.priority - firstListenerDetails.priority;\n    }).some(function (listenerDetails) {\n      try {\n        return listenerDetails.listener.apply(undefined, args) === false;\n      } catch (e) {\n        //console.log('dispatchEvent failed', e, listenerDetails);\n      }\n    });\n  };\n  return base;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/observable.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/sorted-sub-ideas.js":
/*!***********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/sorted-sub-ideas.js ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nvar positive = function positive(key) {\n    'use strict';\n\n    return key >= 0;\n  },\n  negative = function negative(key) {\n    'use strict';\n\n    return !positive(key);\n  },\n  absCompare = function absCompare(a, b) {\n    'use strict';\n\n    return Math.abs(a) - Math.abs(b);\n  },\n  safeSort = function safeSort(contentIdea) {\n    'use strict';\n\n    var childKeys = Object.keys(contentIdea.ideas).map(parseFloat),\n      sortedChildKeys = childKeys.filter(positive).sort(absCompare).concat(childKeys.filter(negative).sort(absCompare));\n    return sortedChildKeys.map(function (key) {\n      return contentIdea.ideas[key];\n    });\n  };\nmodule.exports = function sortedSubIdeas(contentIdea) {\n  'use strict';\n\n  if (!contentIdea.ideas) {\n    return [];\n  }\n  return safeSort(contentIdea);\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/sorted-sub-ideas.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/traverse.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/traverse.js ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\nvar sortedSubIdeas = __webpack_require__(/*! ./sorted-sub-ideas */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/sorted-sub-ideas.js\");\nmodule.exports = function traverse(contentIdea, iterator, postOrder, level) {\n  'use strict';\n\n  var isSingleRootMap = !level && (!contentIdea.formatVersion || contentIdea.formatVersion < 3);\n  level = level || (isSingleRootMap ? 1 : 0);\n  if (!postOrder && (isSingleRootMap || level)) {\n    iterator(contentIdea, level);\n  }\n  sortedSubIdeas(contentIdea).forEach(function (subIdea) {\n    traverse(subIdea, iterator, postOrder, level + 1);\n  });\n  if (postOrder && (isSingleRootMap || level)) {\n    iterator(contentIdea, level);\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/traverse.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/url-helper.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/url-helper.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module*/\nvar URLHelper = function URLHelper() {\n  'use strict';\n\n  var self = this,\n    urlPattern = /(https?:\\/\\/|www\\.)[\\w-]+(\\.[\\w-]+)+([\\w\\(\\)\\u0080-\\u00FF.,!@?^=%&amp;:\\/~+#-]*[\\w\\(\\)\\u0080-\\u00FF!@?^=%&amp;\\/~+#-])?/i;\n  self.containsLink = function (text) {\n    return urlPattern.test(text);\n  };\n  self.getLink = function (text) {\n    var url = text && text.match(urlPattern);\n    if (url && url[0]) {\n      url = url[0];\n      if (!/https?:\\/\\//i.test(url)) {\n        url = 'http://' + url;\n      }\n    }\n    return url;\n  };\n  self.stripLink = function (text) {\n    if (!text) {\n      return '';\n    }\n    return text.replace(urlPattern, '').trim();\n  };\n};\nmodule.exports = new URLHelper();\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/src/url-helper.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/clipboard.js":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/clipboard.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nmodule.exports = function MemoryClipboard() {\n  'use strict';\n\n  var self = this,\n    clone = function clone(something) {\n      if (!something) {\n        return undefined;\n      }\n      return JSON.parse(JSON.stringify(something));\n    };\n  var contents;\n  self.get = function () {\n    return clone(contents);\n  };\n  self.put = function (c) {\n    contents = clone(c);\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/clipboard.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/create-svg.js":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/create-svg.js ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require, document */\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nmodule.exports = function createSVG(tag) {\n  'use strict';\n\n  return jQuery(document.createElementNS('http://www.w3.org/2000/svg', tag || 'svg'));\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/create-svg.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-view.js":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-view.js ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global document, window, require */\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  DOMRender = __webpack_require__(/*! ./dom-render */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js\"),\n  Connectors = __webpack_require__(/*! ../../mindmup-mapjs-layout */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js\").Connectors,\n  URLHelper = __webpack_require__(/*! ../../mindmup-mapjs-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js\").URLHelper,\n  foregroundStyle = __webpack_require__(/*! ../../mindmup-mapjs-layout */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js\").foregroundStyle,\n  formattedNodeTitle = __webpack_require__(/*! ../../mindmup-mapjs-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js\").formattedNodeTitle,\n  createSVG = __webpack_require__(/*! ./create-svg */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/create-svg.js\"),\n  cleanDOMId = function cleanDOMId(s) {\n    'use strict';\n\n    return s.replace(/[^A-Za-z0-9_-]/g, '_');\n  },\n  connectorKey = function connectorKey(connectorObj) {\n    'use strict';\n\n    return cleanDOMId('connector_' + connectorObj.from + '_' + connectorObj.to);\n  },\n  linkKey = function linkKey(linkObj) {\n    'use strict';\n\n    return cleanDOMId('link_' + linkObj.ideaIdFrom + '_' + linkObj.ideaIdTo);\n  },\n  nodeKey = function nodeKey(id) {\n    'use strict';\n\n    return cleanDOMId('node_' + id);\n  };\n__webpack_require__(/*! ./hammer-draggable */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/hammer-draggable.js\");\n__webpack_require__(/*! ./node-resize-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/node-resize-widget.js\");\njQuery.fn.setThemeClassList = function (classList) {\n  'use strict';\n\n  var domElement = this[0],\n    filterClasses = function filterClasses(classes) {\n      return _.filter(classes, function (c) {\n        return /^level_.+/.test(c) || /^attr_.+/.test(c);\n      });\n    },\n    toRemove = filterClasses(domElement.classList),\n    toAdd = classList && classList.length && filterClasses(classList);\n  domElement.classList.remove.apply(domElement.classList, toRemove);\n  if (toAdd && toAdd.length) {\n    domElement.classList.add.apply(domElement.classList, toAdd);\n  }\n  return this;\n};\njQuery.fn.getBox = function () {\n  'use strict';\n\n  var domShape = this && this[0];\n  if (!domShape) {\n    return false;\n  }\n  return {\n    top: domShape.offsetTop,\n    left: domShape.offsetLeft,\n    width: domShape.offsetWidth,\n    height: domShape.offsetHeight\n  };\n};\njQuery.fn.getDataBox = function () {\n  'use strict';\n\n  var domShapeData = this.data();\n  if (domShapeData && domShapeData.width && domShapeData.height) {\n    return {\n      top: domShapeData.y,\n      left: domShapeData.x,\n      width: domShapeData.width,\n      height: domShapeData.height\n    };\n  }\n  return this.getBox();\n};\njQuery.fn.animateConnectorToPosition = function (animationOptions, tolerance) {\n  'use strict';\n\n  var element = jQuery(this),\n    shapeFrom = element.data('nodeFrom'),\n    shapeTo = element.data('nodeTo'),\n    fromBox = shapeFrom && shapeFrom.getDataBox(),\n    toBox = shapeTo && shapeTo.getDataBox(),\n    oldBox = {\n      from: shapeFrom && shapeFrom.getBox(),\n      to: shapeTo && shapeTo.getBox()\n    };\n  tolerance = tolerance || 1;\n  if (fromBox && toBox && oldBox && oldBox.from.width === fromBox.width && oldBox.to.width === toBox.width && oldBox.from.height === fromBox.height && oldBox.to.height === toBox.height && Math.abs(oldBox.from.top - oldBox.to.top - (fromBox.top - toBox.top)) < tolerance && Math.abs(oldBox.from.left - oldBox.to.left - (fromBox.left - toBox.left)) < tolerance) {\n    element.animate({\n      left: Math.round(Math.min(fromBox.left, toBox.left)),\n      top: Math.round(Math.min(fromBox.top, toBox.top))\n    }, animationOptions);\n    return true;\n  }\n  return false;\n};\njQuery.fn.queueFadeOut = function (options) {\n  'use strict';\n\n  var element = this;\n  return element.fadeOut(_.extend({\n    complete: function complete() {\n      if (element.is(':focus')) {\n        element.parents('[tabindex]').focus();\n      }\n      element.remove();\n    }\n  }, options));\n};\njQuery.fn.queueFadeIn = function (options) {\n  'use strict';\n\n  var element = this;\n  return element.css('opacity', 0).animate({\n    'opacity': 1\n  }, _.extend({\n    complete: function complete() {\n      element.css('opacity', '');\n    }\n  }, options));\n};\njQuery.fn.updateStage = function () {\n  'use strict';\n\n  var data = this.data(),\n    size = {\n      'min-width': Math.round(data.width - data.offsetX),\n      'min-height': Math.round(data.height - data.offsetY),\n      'width': Math.round(data.width - data.offsetX),\n      'height': Math.round(data.height - data.offsetY),\n      'transform-origin': 'top left',\n      'transform': 'translate3d(' + Math.round(data.offsetX) + 'px, ' + Math.round(data.offsetY) + 'px, 0)'\n    };\n  if (data.scale && data.scale !== 1) {\n    size.transform = 'scale(' + data.scale + ') translate(' + Math.round(data.offsetX) + 'px, ' + Math.round(data.offsetY) + 'px)';\n  }\n  this.css(size);\n  return this;\n};\nDOMRender.appendUnderLine = function (connectorCurve, calculatedConnector, position) {\n  'use strict';\n\n  if (calculatedConnector.nodeUnderline) {\n    connectorCurve.d += 'M' + (calculatedConnector.nodeUnderline.from.x - position.left) + ',' + (calculatedConnector.nodeUnderline.from.y - position.top) + ' H' + (calculatedConnector.nodeUnderline.to.x - position.left);\n  }\n  return connectorCurve;\n};\njQuery.fn.updateConnector = function (canUseData) {\n  'use strict';\n\n  return jQuery.each(this, function () {\n    var connection = false,\n      pathElement,\n      fromBox,\n      toBox,\n      changeCheck = false;\n    var element = jQuery(this),\n      shapeFrom = element.data('nodeFrom'),\n      shapeTo = element.data('nodeTo'),\n      applyInnerRect = function applyInnerRect(shape, box) {\n        var innerRect = shape.data().innerRect;\n        if (innerRect) {\n          box.left += innerRect.dx;\n          box.top += innerRect.dy;\n          box.width = innerRect.width;\n          box.height = innerRect.height;\n        }\n      };\n    if (!shapeFrom || !shapeTo || shapeFrom.length === 0 || shapeTo.length === 0) {\n      element.hide();\n      return;\n    }\n    if (canUseData) {\n      fromBox = shapeFrom.getDataBox();\n      toBox = shapeTo.getDataBox();\n    } else {\n      fromBox = shapeFrom.getBox();\n      toBox = shapeTo.getBox();\n    }\n    applyInnerRect(shapeFrom, fromBox);\n    applyInnerRect(shapeTo, toBox);\n    /*\r\n    fromBox.level = shapeFrom.attr('mapjs-level');\r\n    toBox.level = shapeTo.attr('mapjs-level');\r\n    */\n    fromBox.styles = shapeFrom.data('styles');\n    toBox.styles = shapeTo.data('styles');\n    changeCheck = {\n      from: fromBox,\n      to: toBox,\n      theme: DOMRender.theme && DOMRender.theme.name\n    };\n    if (_.isEqual(changeCheck, element.data('changeCheck'))) {\n      return;\n    }\n    element.data('changeCheck', changeCheck);\n    connection = Connectors.themePath(fromBox, toBox, DOMRender.theme);\n    pathElement = element.find('path');\n    element.css(connection.position);\n    if (pathElement.length === 0) {\n      pathElement = createSVG('path').attr('class', 'mapjs-connector').appendTo(element);\n    }\n\n    // if only the relative position changed, do not re-update the curve!!!!\n    pathElement.attr({\n      'd': connection.d,\n      'stroke': connection.color,\n      'stroke-width': connection.width,\n      fill: 'transparent'\n    });\n  });\n};\njQuery.fn.updateLink = function () {\n  'use strict';\n\n  return jQuery.each(this, function () {\n    var element = jQuery(this),\n      shapeFrom = element.data('nodeFrom'),\n      shapeTo = element.data('nodeTo'),\n      n = Math.tan(Math.PI / 9),\n      dashes = {\n        dashed: '8, 8',\n        solid: ''\n      },\n      attrs = _.pick(element.data(), 'lineStyle', 'arrow', 'color');\n    var connection = false,\n      pathElement = element.find('path.mapjs-link'),\n      hitElement = element.find('path.mapjs-link-hit'),\n      arrowElement = element.find('path.mapjs-arrow'),\n      fromBox = false,\n      toBox = false,\n      changeCheck = false,\n      a1x,\n      a1y,\n      a2x,\n      a2y,\n      len,\n      iy,\n      m,\n      dx,\n      dy;\n    if (!shapeFrom || !shapeTo || shapeFrom.length === 0 || shapeTo.length === 0) {\n      element.hide();\n      return;\n    }\n    fromBox = shapeFrom.getBox();\n    toBox = shapeTo.getBox();\n    changeCheck = {\n      from: fromBox,\n      to: toBox,\n      attrs: attrs\n    };\n    if (_.isEqual(changeCheck, element.data('changeCheck'))) {\n      return;\n    }\n    element.data('changeCheck', changeCheck);\n    connection = Connectors.linkPath(fromBox, toBox);\n    element.css(connection.position);\n    if (pathElement.length === 0) {\n      pathElement = createSVG('path').attr('class', 'mapjs-link').appendTo(element);\n    }\n    pathElement.attr({\n      'd': connection.d,\n      'stroke-dasharray': dashes[attrs.lineStyle]\n    }).css('stroke', attrs.color);\n    if (hitElement.length === 0) {\n      hitElement = createSVG('path').attr('class', 'mapjs-link-hit').appendTo(element);\n    }\n    hitElement.attr({\n      'd': connection.d\n    });\n    if (attrs.arrow) {\n      if (arrowElement.length === 0) {\n        arrowElement = createSVG('path').attr('class', 'mapjs-arrow').appendTo(element);\n      }\n      len = 14;\n      dx = connection.conn.to.x - connection.conn.from.x;\n      dy = connection.conn.to.y - connection.conn.from.y;\n      if (dx === 0) {\n        iy = dy < 0 ? -1 : 1;\n        a1x = connection.conn.to.x + len * Math.sin(n) * iy;\n        a2x = connection.conn.to.x - len * Math.sin(n) * iy;\n        a1y = connection.conn.to.y - len * Math.cos(n) * iy;\n        a2y = connection.conn.to.y - len * Math.cos(n) * iy;\n      } else {\n        m = dy / dx;\n        if (connection.conn.from.x < connection.conn.to.x) {\n          len = -len;\n        }\n        a1x = connection.conn.to.x + (1 - m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n        a1y = connection.conn.to.y + (m + n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n        a2x = connection.conn.to.x + (1 + m * n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n        a2y = connection.conn.to.y + (m - n) * len / Math.sqrt((1 + m * m) * (1 + n * n));\n      }\n      arrowElement.attr('d', 'M' + Math.round(a1x - connection.position.left) + ',' + Math.round(a1y - connection.position.top) + 'L' + Math.round(connection.conn.to.x - connection.position.left) + ',' + Math.round(connection.conn.to.y - connection.position.top) + 'L' + Math.round(a2x - connection.position.left) + ',' + Math.round(a2y - connection.position.top) + 'Z').css('fill', attrs.color).show();\n    } else {\n      arrowElement.hide();\n    }\n  });\n};\njQuery.fn.addNodeCacheMark = function (idea) {\n  'use strict';\n\n  this.data('nodeCacheMark', DOMRender.nodeCacheMark(idea));\n};\njQuery.fn.updateNodeContent = function (nodeContent, resourceTranslator, forcedLevel) {\n  'use strict';\n\n  var self = jQuery(this),\n    textSpan = function textSpan() {\n      var span = self.find('[data-mapjs-role=title]');\n      if (span.length === 0) {\n        span = jQuery('<span>').attr('data-mapjs-role', 'title').appendTo(self);\n      }\n      return span;\n    },\n    decorations = function decorations() {\n      var element = self.find('[data-mapjs-role=decorations]');\n      if (element.length === 0) {\n        element = jQuery('<div data-mapjs-role=\"decorations\" class=\"mapjs-decorations\">').on('mousedown click', function (e) {\n          e.stopPropagation();\n          e.stopImmediatePropagation();\n        }).appendTo(self);\n      }\n      return element;\n    },\n    applyLinkUrl = function applyLinkUrl(title) {\n      var url = URLHelper.getLink(title);\n      var element = self.find('a.mapjs-hyperlink');\n      if (!url) {\n        element.hide();\n        return;\n      }\n      if (element.length === 0) {\n        element = jQuery('<a target=\"_blank\" class=\"mapjs-hyperlink icon-hyperlink\"></a>').addClass().appendTo(decorations());\n      }\n      element.attr('href', url).show();\n    },\n    applyLabel = function applyLabel(label) {\n      var element = self.find('.mapjs-label');\n      if (!label && label !== 0) {\n        element.hide();\n        return;\n      }\n      if (element.length === 0) {\n        element = jQuery('<span class=\"mapjs-label\"></span>').appendTo(decorations());\n      }\n      element.text(label).show();\n    },\n    applyAttachment = function applyAttachment() {\n      var attachment = nodeContent.attr && nodeContent.attr.attachment;\n      var element = self.find('a.mapjs-attachment');\n      if (!attachment) {\n        element.hide();\n        return;\n      }\n      if (element.length === 0) {\n        element = jQuery('<a href=\"#\" class=\"mapjs-attachment icon-attachment\"></a>').appendTo(decorations()).click(function () {\n          self.trigger('attachment-click');\n          self.trigger('decoration-click', 'attachment');\n        });\n      }\n      element.show();\n    },\n    applyNote = function applyNote() {\n      var note = nodeContent.attr && nodeContent.attr.note;\n      var element = self.find('a.mapjs-note');\n      if (!note) {\n        element.hide();\n        return;\n      }\n      if (element.length === 0) {\n        element = jQuery('<a href=\"#\" class=\"mapjs-note icon-note\"></a>').appendTo(decorations()).click(function () {\n          self.trigger('decoration-click', 'note');\n        });\n      }\n      element.show();\n    },\n    updateText = function updateText(title) {\n      var text = formattedNodeTitle(title, 25),\n        nodeTextPadding = DOMRender.nodeTextPadding || 11,\n        element = textSpan(),\n        domElement = element[0],\n        preferredWidth = nodeContent.attr && nodeContent.attr.style && nodeContent.attr.style.width;\n      var height;\n      element.text(text.trim());\n      self.data('title', title);\n      element.css({\n        'max-width': '',\n        'min-width': ''\n      });\n      if (preferredWidth) {\n        element.css({\n          'max-width': preferredWidth,\n          'min-width': preferredWidth\n        });\n      }\n      if (domElement.scrollWidth - nodeTextPadding > domElement.offsetWidth) {\n        element.css('max-width', domElement.scrollWidth + 'px');\n      } else if (!preferredWidth) {\n        height = domElement.offsetHeight;\n        element.css('min-width', element.css('max-width'));\n        if (domElement.offsetHeight === height) {\n          element.css('min-width', '');\n        }\n      }\n    },\n    setCollapseClass = function setCollapseClass() {\n      if (nodeContent.attr && nodeContent.attr.collapsed) {\n        self.addClass('collapsed');\n      } else {\n        self.removeClass('collapsed');\n      }\n    },\n    setColors = function setColors(colorText) {\n      var fromStyle = nodeContent.attr && nodeContent.attr.style && nodeContent.attr.style.background;\n      var textColorClasses = {\n        'color': 'mapjs-node-light',\n        'lightColor': 'mapjs-node-dark',\n        'darkColor': 'mapjs-node-white'\n      };\n      if (fromStyle === 'false' || fromStyle === 'transparent') {\n        fromStyle = false;\n      }\n      self.removeClass('mapjs-node-dark mapjs-node-white mapjs-node-light mapjs-node-colortext');\n      self.css({\n        'color': '',\n        'background-color': ''\n      });\n      if (fromStyle) {\n        if (colorText) {\n          self.css('color', fromStyle);\n        } else {\n          self.css('background-color', fromStyle);\n          self.addClass(textColorClasses[foregroundStyle(fromStyle)]);\n        }\n      }\n      if (colorText) {\n        self.addClass('mapjs-node-colortext');\n      }\n    },\n    setIcon = function setIcon(icon) {\n      var textHeight, textWidth, maxTextWidth, padding;\n      var textBox = textSpan(),\n        selfProps = {\n          'min-height': '',\n          'min-width': '',\n          'background-image': '',\n          'background-repeat': '',\n          'background-size': '',\n          'background-position': ''\n        },\n        textProps = {\n          'margin-top': '',\n          'margin-left': ''\n        };\n      self.css({\n        padding: ''\n      });\n      if (icon) {\n        padding = parseInt(self.css('padding-left'), 10);\n        textHeight = textBox.outerHeight();\n        textWidth = textBox.outerWidth();\n        maxTextWidth = parseInt(textBox.css('max-width'), 10);\n        _.extend(selfProps, {\n          'background-image': 'url(\"' + (resourceTranslator ? resourceTranslator(icon.url) : icon.url) + '\")',\n          'background-repeat': 'no-repeat',\n          'background-size': icon.width + 'px ' + icon.height + 'px',\n          'background-position': 'center center'\n        });\n        if (icon.position === 'top' || icon.position === 'bottom') {\n          if (icon.position === 'top') {\n            selfProps['background-position'] = 'center ' + padding + 'px';\n          } else if (DOMRender.fixedLayout) {\n            selfProps['background-position'] = 'center ' + (padding + textHeight) + 'px';\n          } else {\n            selfProps['background-position'] = 'center ' + icon.position + ' ' + padding + 'px';\n          }\n          selfProps['padding-' + icon.position] = icon.height + padding * 2;\n          selfProps['min-width'] = icon.width;\n          if (icon.width > maxTextWidth) {\n            textProps['margin-left'] = Math.round((icon.width - maxTextWidth) / 2);\n          }\n        } else if (icon.position === 'left' || icon.position === 'right') {\n          if (icon.position === 'left') {\n            selfProps['background-position'] = padding + 'px center';\n          } else if (DOMRender.fixedLayout) {\n            selfProps['background-position'] = textWidth + 2 * padding + 'px center ';\n          } else {\n            selfProps['background-position'] = icon.position + ' ' + padding + 'px center';\n          }\n          selfProps['padding-' + icon.position] = icon.width + padding * 2;\n          if (icon.height > textHeight) {\n            textProps['margin-top'] = Math.round((icon.height - textHeight) / 2);\n            selfProps['min-height'] = icon.height;\n          }\n        } else {\n          if (icon.height > textHeight) {\n            textProps['margin-top'] = Math.round((icon.height - textHeight) / 2);\n            selfProps['min-height'] = icon.height;\n          }\n          selfProps['min-width'] = icon.width;\n          if (icon.width > maxTextWidth) {\n            textProps['margin-left'] = Math.round((icon.width - maxTextWidth) / 2);\n          }\n        }\n      }\n      self.css(selfProps);\n      textBox.css(textProps);\n    },\n    nodeLevel = forcedLevel || nodeContent.level,\n    themeDefault = function themeDefault(a, b, c, d) {\n      return d;\n    },\n    styleDefault = function styleDefault() {\n      return ['default'];\n    },\n    attrValue = DOMRender.theme && DOMRender.theme.attributeValue || themeDefault,\n    nodeStyles = DOMRender.theme && DOMRender.theme.nodeStyles || styleDefault,\n    effectiveStyles = nodeStyles(nodeLevel, nodeContent.attr),\n    borderType = attrValue(['node'], effectiveStyles, ['border', 'type'], 'surround'),\n    decorationEdge = attrValue(['node'], effectiveStyles, ['decorations', 'edge'], ''),\n    decorationOverlap = attrValue(['node'], effectiveStyles, ['decorations', 'overlap'], ''),\n    colorText = borderType !== 'surround',\n    isGroup = nodeContent.attr && nodeContent.attr.group,\n    nodeCacheData = {\n      x: Math.round(nodeContent.x),\n      y: Math.round(nodeContent.y),\n      width: Math.round(nodeContent.width),\n      height: Math.round(nodeContent.height),\n      nodeId: nodeContent.id,\n      styles: effectiveStyles\n    };\n  var offset;\n  nodeCacheData.innerRect = _.pick(nodeCacheData, ['width', 'height']);\n  nodeCacheData.innerRect.dx = 0;\n  nodeCacheData.innerRect.dy = 0;\n  if (isGroup) {\n    this.css({\n      margin: '',\n      width: nodeContent.width,\n      height: nodeContent.height\n    });\n    updateText('');\n  } else {\n    updateText(nodeContent.title);\n    applyLinkUrl(nodeContent.title);\n    applyLabel(nodeContent.label);\n    applyNote();\n    applyAttachment();\n    this.css({\n      margin: '',\n      width: '',\n      height: ''\n    });\n    if (decorationEdge === 'left') {\n      nodeCacheData.innerRect.dx = decorations().outerWidth();\n      nodeCacheData.innerRect.width = nodeCacheData.width - decorations().outerWidth();\n      self.css('margin-left', decorations().outerWidth());\n    } else if (decorationEdge === 'right') {\n      nodeCacheData.innerRect.width = nodeCacheData.width - decorations().outerWidth();\n      self.css('margin-right', decorations().outerWidth());\n    } else if (decorationEdge === 'top') {\n      offset = decorations().outerHeight() * (decorationOverlap ? 0.5 : 1);\n      nodeCacheData.innerRect.dy = offset;\n      nodeCacheData.innerRect.height = nodeCacheData.height - offset;\n      if (offset) {\n        self.css('margin-top', offset);\n      }\n    } else if (decorationEdge === 'bottom') {\n      offset = decorations().outerHeight() * (decorationOverlap ? 0.5 : 1);\n      nodeCacheData.innerRect.height = nodeCacheData.height - offset;\n      self.css('margin-bottom', decorations().outerHeight() * (decorationOverlap ? 0.5 : 1));\n    }\n  }\n  self.setThemeClassList(effectiveStyles).attr('mapjs-level', nodeLevel);\n  self.data(nodeCacheData).addNodeCacheMark(nodeContent);\n  setColors(colorText);\n  setIcon(nodeContent.attr && nodeContent.attr.icon);\n  setCollapseClass();\n  self.trigger('mapjs:resize');\n  return self;\n};\njQuery.fn.placeCaretAtEnd = function () {\n  'use strict';\n\n  var el = this[0];\n  var range, sel, textRange;\n  if (window.getSelection && document.createRange) {\n    range = document.createRange();\n    range.selectNodeContents(el);\n    range.collapse(false);\n    sel = window.getSelection();\n    sel.removeAllRanges();\n    sel.addRange(range);\n  } else if (document.body.createTextRange) {\n    textRange = document.body.createTextRange();\n    textRange.moveToElementText(el);\n    textRange.collapse(false);\n    textRange.select();\n  }\n};\njQuery.fn.selectAll = function () {\n  'use strict';\n\n  var el = this[0];\n  var range, sel, textRange;\n  if (window.getSelection && document.createRange) {\n    range = document.createRange();\n    //TS debugger\n    range.selectNodeContents(el);\n    sel = window.getSelection();\n    sel.removeAllRanges();\n    sel.addRange(range);\n  } else if (document.body.createTextRange) {\n    textRange = document.body.createTextRange();\n    textRange.moveToElementText(el);\n    textRange.select();\n  }\n};\njQuery.fn.innerText = function () {\n  'use strict';\n\n  var htmlContent = this.html(),\n    containsBr = /<br\\/?>/.test(htmlContent),\n    containsDiv = /<div>/.test(htmlContent);\n  if (containsDiv && this[0].innerText) {\n    /* broken safari jquery text */\n    return this[0].innerText.trim();\n  } else if (containsBr) {\n    /*broken firefox innerText */\n    return htmlContent.replace(/<br\\/?>/gi, '\\n').replace(/(<([^>]+)>)/gi, '');\n  }\n  return this.text();\n};\njQuery.fn.editNode = function (shouldSelectAll) {\n  'use strict';\n\n  //debugger\n  var node = this,\n    textBox = this.find('[data-mapjs-role=title]'),\n    unformattedText = this.data('title'),\n    originalText = textBox.text(),\n    result = jQuery.Deferred(),\n    clear = function clear() {\n      detachListeners(); //eslint-disable-line no-use-before-define\n      textBox.css('word-break', '');\n      textBox.removeAttr('contenteditable');\n      node.shadowDraggable();\n    },\n    finishEditing = function finishEditing() {\n      var content = textBox.innerText();\n      if (content === unformattedText) {\n        return cancelEditing(); //eslint-disable-line no-use-before-define\n      }\n      clear();\n      result.resolve(content);\n    },\n    cancelEditing = function cancelEditing() {\n      clear();\n      textBox.text(originalText);\n      result.reject();\n    },\n    keyboardEvents = function keyboardEvents(e) {\n      var ENTER_KEY_CODE = 13,\n        ESC_KEY_CODE = 27,\n        TAB_KEY_CODE = 9,\n        S_KEY_CODE = 83,\n        Z_KEY_CODE = 90;\n      if (e.shiftKey && e.which === ENTER_KEY_CODE) {\n        return; // allow shift+enter to break lines\n      } else if (e.which === ENTER_KEY_CODE) {\n        finishEditing();\n        e.stopPropagation();\n      } else if (e.which === ESC_KEY_CODE) {\n        cancelEditing();\n        e.stopPropagation();\n      } else if (e.which === TAB_KEY_CODE || e.which === S_KEY_CODE && (e.metaKey || e.ctrlKey) && !e.altKey) {\n        finishEditing();\n        e.preventDefault(); /* stop focus on another object */\n      } else if (!e.shiftKey && e.which === Z_KEY_CODE && (e.metaKey || e.ctrlKey) && !e.altKey) {\n        /* undo node edit on ctrl+z if text was not changed */\n        if (textBox.text() === unformattedText) {\n          cancelEditing();\n        }\n        e.stopPropagation();\n      }\n    },\n    attachListeners = function attachListeners() {\n      textBox.on('blur', finishEditing).on('keydown', keyboardEvents);\n    },\n    detachListeners = function detachListeners() {\n      textBox.off('blur', finishEditing).off('keydown', keyboardEvents);\n    };\n  attachListeners();\n  if (unformattedText !== originalText) {\n    /* links or some other potential formatting issues */\n    textBox.css('word-break', 'break-all');\n  }\n  textBox.text(unformattedText).attr('contenteditable', true).focus();\n  if (shouldSelectAll) {\n    textBox.selectAll();\n  } else if (unformattedText) {\n    textBox.placeCaretAtEnd();\n  }\n  node.shadowDraggable({\n    disable: true\n  });\n  return result.promise();\n};\njQuery.fn.updateReorderBounds = function (border, box, dropCoords) {\n  'use strict';\n\n  var element = this;\n  if (!border) {\n    element.hide();\n    return;\n  }\n  element.show();\n  element.attr('mapjs-edge', border.edge);\n  if (border.edge === 'top') {\n    element.css({\n      top: border.minY,\n      left: Math.round(dropCoords.x - element.width() / 2)\n    });\n  } else {\n    element.css({\n      top: Math.round(dropCoords.y - element.height() / 2),\n      left: border.x - (border.edge === 'left' ? element.width() : 0)\n    });\n  }\n};\njQuery.fn.createNode = function (node) {\n  'use strict';\n\n  //debugger\n  return jQuery('<div>').attr({\n    'id': nodeKey(node.id),\n    'tabindex': 0,\n    'data-mapjs-role': 'node'\n  }).css({\n    display: 'block',\n    position: 'absolute'\n  }).addClass('mapjs-node').appendTo(this);\n};\njQuery.fn.createConnector = function (connector) {\n  'use strict';\n\n  return createSVG().attr({\n    'id': connectorKey(connector),\n    'data-mapjs-role': 'connector',\n    'class': 'mapjs-draw-container'\n  }).data({\n    'nodeFrom': this.nodeWithId(connector.from),\n    'nodeTo': this.nodeWithId(connector.to)\n  }).appendTo(this);\n};\njQuery.fn.createLink = function (l) {\n  'use strict';\n\n  var defaults = _.extend({\n    color: 'red',\n    lineStyle: 'dashed'\n  }, l.attr && l.attr.style);\n  return createSVG().attr({\n    'id': linkKey(l),\n    'data-mapjs-role': 'link',\n    'class': 'mapjs-draw-container'\n  }).data({\n    'nodeFrom': this.nodeWithId(l.ideaIdFrom),\n    'nodeTo': this.nodeWithId(l.ideaIdTo)\n  }).data(defaults).appendTo(this);\n};\njQuery.fn.nodeWithId = function (id) {\n  'use strict';\n\n  return this.find('#' + nodeKey(id));\n};\njQuery.fn.findConnector = function (connectorObj) {\n  'use strict';\n\n  return this.find('#' + connectorKey(connectorObj));\n};\njQuery.fn.findLink = function (linkObj) {\n  'use strict';\n\n  return this.find('#' + linkKey(linkObj));\n};\njQuery.fn.createReorderBounds = function () {\n  'use strict';\n\n  var result = jQuery('<div>').attr({\n    'data-mapjs-role': 'reorder-bounds',\n    'class': 'mapjs-reorder-bounds'\n  }).hide().css('position', 'absolute').appendTo(this);\n  return result;\n};\nDOMRender.viewController = function (mapModel, stageElement, touchEnabled, imageInsertController, resourceTranslator, options) {\n  'use strict';\n\n  var currentDroppable = false,\n    connectorsForAnimation = jQuery(),\n    linksForAnimation = jQuery(),\n    viewPortDimensions;\n  var viewPort = stageElement.parent(),\n    nodeAnimOptions = {\n      duration: 400,\n      queue: 'nodeQueue',\n      easing: 'linear'\n    },\n    reorderBounds = mapModel.isEditingEnabled() ? stageElement.createReorderBounds() : jQuery('<div>'),\n    getViewPortDimensions = function getViewPortDimensions() {\n      if (viewPortDimensions) {\n        return viewPortDimensions;\n      }\n      viewPortDimensions = {\n        left: viewPort.scrollLeft(),\n        top: viewPort.scrollTop(),\n        innerWidth: viewPort.innerWidth(),\n        innerHeight: viewPort.innerHeight()\n      };\n      return viewPortDimensions;\n    },\n    stageToViewCoordinates = function stageToViewCoordinates(x, y) {\n      var stage = stageElement.data(),\n        scrollPosition = getViewPortDimensions();\n      return {\n        x: stage.scale * (x + stage.offsetX) - scrollPosition.left,\n        y: stage.scale * (y + stage.offsetY) - scrollPosition.top\n      };\n    },\n    viewToStageCoordinates = function viewToStageCoordinates(x, y) {\n      var stage = stageElement.data(),\n        scrollPosition = getViewPortDimensions();\n      return {\n        x: (scrollPosition.left + x) / stage.scale - stage.offsetX,\n        y: (scrollPosition.top + y) / stage.scale - stage.offsetY\n      };\n    },\n    updateScreenCoordinates = function updateScreenCoordinates() {\n      var element = jQuery(this);\n      element.css({\n        'left': element.data('x'),\n        'top': element.data('y')\n      }).trigger('mapjs:move');\n    },\n    animateToPositionCoordinates = function animateToPositionCoordinates() {\n      var element = jQuery(this);\n      element.clearQueue(nodeAnimOptions.queue).animate({\n        'left': element.data('x'),\n        'top': element.data('y'),\n        'opacity': 1 /* previous animation can be cancelled with clearqueue, so ensure it gets visible */\n      }, _.extend({\n        complete: function complete() {\n          element.css('opacity', '');\n          element.each(updateScreenCoordinates);\n        }\n      }, nodeAnimOptions)).trigger('mapjs:animatemove');\n    },\n    ensureSpaceForPoint = function ensureSpaceForPoint(x, y) {\n      /* in stage coordinates */\n      var stage = stageElement.data();\n      var dirty = false;\n      if (x < -1 * stage.offsetX) {\n        stage.width = stage.width - stage.offsetX - x;\n        stage.offsetX = -1 * x;\n        dirty = true;\n      }\n      if (y < -1 * stage.offsetY) {\n        stage.height = stage.height - stage.offsetY - y;\n        stage.offsetY = -1 * y;\n        dirty = true;\n      }\n      if (x > stage.width - stage.offsetX) {\n        stage.width = stage.offsetX + x;\n        dirty = true;\n      }\n      if (y > stage.height - stage.offsetY) {\n        stage.height = stage.offsetY + y;\n        dirty = true;\n      }\n      if (dirty) {\n        stageElement.updateStage();\n      }\n    },\n    ensureSpaceForNode = function ensureSpaceForNode() {\n      return jQuery(this).each(function () {\n        var node = jQuery(this).data(),\n          margin = DOMRender.stageMargin || {\n            top: 0,\n            left: 0,\n            bottom: 0,\n            right: 0\n          };\n        /* sequence of calculations is important because maxX and maxY take into consideration the new offsetX snd offsetY */\n        ensureSpaceForPoint(node.x - margin.left, node.y - margin.top);\n        ensureSpaceForPoint(node.x + node.width + margin.right, node.y + node.height + margin.bottom);\n      });\n    },\n    centerViewOn = function centerViewOn(x, y, animate) {\n      /*in the stage coordinate system*/\n      var stage = stageElement.data(),\n        viewPortCenter = {\n          x: Math.round(viewPort.innerWidth() / 2),\n          y: Math.round(viewPort.innerHeight() / 2)\n        },\n        margin = DOMRender.stageVisibilityMargin || {\n          top: 0,\n          left: 0,\n          bottom: 0,\n          right: 0\n        };\n      var newLeftScroll = false,\n        newTopScroll = false;\n      ensureSpaceForPoint(x - viewPortCenter.x / stage.scale, y - viewPortCenter.y / stage.scale);\n      ensureSpaceForPoint(x + viewPortCenter.x / stage.scale - margin.left, y + viewPortCenter.y / stage.scale - margin.top);\n      newLeftScroll = stage.scale * (x + stage.offsetX) - viewPortCenter.x;\n      newTopScroll = stage.scale * (y + stage.offsetY) - viewPortCenter.y;\n      viewPort.finish();\n      if (animate) {\n        viewPort.animate({\n          scrollLeft: newLeftScroll,\n          scrollTop: newTopScroll\n        }, {\n          duration: 400\n        });\n      } else {\n        viewPort.scrollLeft(newLeftScroll);\n        viewPort.scrollTop(newTopScroll);\n      }\n    },\n    stagePointAtViewportCenter = function stagePointAtViewportCenter() {\n      return viewToStageCoordinates(Math.round(viewPort.innerWidth() / 2), Math.round(viewPort.innerHeight() / 2));\n    },\n    ensureNodeVisible = function ensureNodeVisible(domElement) {\n      if (!domElement || domElement.length === 0) {\n        return;\n      }\n      viewPort.finish();\n      var node = domElement.data(),\n        nodeTopLeft = stageToViewCoordinates(node.x, node.y),\n        nodeBottomRight = stageToViewCoordinates(node.x + node.width, node.y + node.height),\n        animation = {},\n        margin = DOMRender.stageVisibilityMargin || {\n          top: 10,\n          left: 10,\n          bottom: 10,\n          right: 10\n        };\n      if (nodeTopLeft.x - margin.left < 0) {\n        animation.scrollLeft = viewPort.scrollLeft() + nodeTopLeft.x - margin.left;\n      } else if (nodeBottomRight.x + margin.right > viewPort.innerWidth()) {\n        animation.scrollLeft = viewPort.scrollLeft() + nodeBottomRight.x - viewPort.innerWidth() + margin.right;\n      }\n      if (nodeTopLeft.y - margin.top < 0) {\n        animation.scrollTop = viewPort.scrollTop() + nodeTopLeft.y - margin.top;\n      } else if (nodeBottomRight.y + margin.bottom > viewPort.innerHeight()) {\n        animation.scrollTop = viewPort.scrollTop() + nodeBottomRight.y - viewPort.innerHeight() + margin.bottom;\n      }\n      if (!_.isEmpty(animation)) {\n        viewPort.animate(animation, {\n          duration: 100\n        });\n      }\n    },\n    viewportCoordinatesForPointEvent = function viewportCoordinatesForPointEvent(evt) {\n      var dropPosition = evt && evt.gesture && evt.gesture.center || evt,\n        vpOffset = viewPort.offset();\n      var result;\n      if (dropPosition) {\n        result = {\n          x: dropPosition.pageX - vpOffset.left,\n          y: dropPosition.pageY - vpOffset.top\n        };\n        if (result.x >= 0 && result.x <= viewPort.innerWidth() && result.y >= 0 && result.y <= viewPort.innerHeight()) {\n          return result;\n        }\n      }\n    },\n    stagePositionForPointEvent = function stagePositionForPointEvent(evt) {\n      var viewportDropCoordinates = viewportCoordinatesForPointEvent(evt);\n      if (viewportDropCoordinates) {\n        return viewToStageCoordinates(viewportDropCoordinates.x, viewportDropCoordinates.y);\n      }\n    },\n    clearCurrentDroppable = function clearCurrentDroppable() {\n      if (currentDroppable || currentDroppable === false) {\n        jQuery('.mapjs-node').removeClass('droppable');\n        currentDroppable = undefined;\n      }\n    },\n    showDroppable = function showDroppable(nodeId) {\n      stageElement.nodeWithId(nodeId).addClass('droppable');\n      currentDroppable = nodeId;\n    },\n    withinReorderBoundary = function withinReorderBoundary(boundaries, box) {\n      var closeTo = function closeTo(reorderBoundary) {\n        var nodeX = box.x;\n        if (reorderBoundary.edge === 'right') {\n          nodeX += box.width;\n        }\n        if (reorderBoundary.x && reorderBoundary.margin) {\n          return Math.abs(nodeX - reorderBoundary.x) < reorderBoundary.margin * 2 && box.y < reorderBoundary.maxY && box.y > reorderBoundary.minY;\n        } else {\n          return box.y < reorderBoundary.maxY && box.y > reorderBoundary.minY && box.x < reorderBoundary.maxX && box.x > reorderBoundary.minX;\n        }\n      };\n      if (_.isEmpty(boundaries)) {\n        return false;\n      }\n      if (!box) {\n        return false;\n      }\n      return _.find(boundaries, closeTo);\n    };\n  viewPort.on('scroll', function () {\n    viewPortDimensions = undefined;\n  });\n  if (imageInsertController) {\n    imageInsertController.addEventListener('imageInserted', function (dataUrl, imgWidth, imgHeight, evt) {\n      var point = stagePositionForPointEvent(evt);\n      mapModel.dropImage(dataUrl, imgWidth, imgHeight, point && point.x, point && point.y);\n    });\n  }\n  mapModel.addEventListener('nodeCreated', function (node) {\n    var currentReorderBoundary;\n    var element = stageElement.createNode(node).queueFadeIn(nodeAnimOptions).updateNodeContent(node, resourceTranslator).nodeResizeWidget(node.id, mapModel, stagePositionForPointEvent).on('tap', function (evt) {\n      var realEvent = evt.gesture && evt.gesture.srcEvent || evt;\n      if (realEvent.button && realEvent.button !== -1) {\n        return;\n      }\n      mapModel.clickNode(node.id, realEvent);\n      if (evt) {\n        evt.stopPropagation();\n      }\n      if (evt && evt.gesture) {\n        evt.gesture.stopPropagation();\n      }\n    }).on('doubletap', function (event) {\n      if (event) {\n        event.stopPropagation();\n        if (event.gesture) {\n          event.gesture.stopPropagation();\n        }\n      }\n      if (!mapModel.isEditingEnabled()) {\n        mapModel.toggleCollapse('mouse');\n        return;\n      }\n      mapModel.editNode('mouse');\n    }).on('attachment-click', function () {\n      mapModel.openAttachment('mouse', node.id);\n    }).on('decoration-click', function (evt, decorationType) {\n      mapModel.decorationAction('mouse', node.id, decorationType);\n    }).each(ensureSpaceForNode).each(updateScreenCoordinates).on('mm:start-dragging mm:start-dragging-shadow', function (evt) {\n      if (evt && evt.relatedTarget === this) {\n        mapModel.selectNode(node.id);\n        currentReorderBoundary = mapModel.getReorderBoundary(node.id);\n        element.addClass('dragging');\n      }\n    }).on('mm:drag', function (evt) {\n      var dropCoords = stagePositionForPointEvent(evt),\n        currentPosition = evt.currentPosition && stagePositionForPointEvent({\n          pageX: evt.currentPosition.left,\n          pageY: evt.currentPosition.top\n        }),\n        hasShift = evt && evt.gesture && evt.gesture.srcEvent && evt.gesture.srcEvent.shiftKey,\n        nodeId = dropCoords && mapModel.getNodeIdAtPosition(dropCoords.x, dropCoords.y);\n      var border;\n      if (!dropCoords) {\n        clearCurrentDroppable();\n        return;\n      }\n      if (!hasShift && !nodeId && currentPosition) {\n        currentPosition.width = element.outerWidth();\n        currentPosition.height = element.outerHeight();\n        border = withinReorderBoundary(currentReorderBoundary, currentPosition);\n        reorderBounds.updateReorderBounds(border, currentPosition, dropCoords);\n      } else {\n        reorderBounds.hide();\n      }\n      if (!nodeId || nodeId === node.id) {\n        clearCurrentDroppable();\n      } else if (nodeId !== currentDroppable) {\n        clearCurrentDroppable();\n        if (nodeId) {\n          showDroppable(nodeId);\n        }\n      }\n    }).on('contextmenu', function (event) {\n      mapModel.selectNode(node.id);\n      if (mapModel.requestContextMenu(event.pageX, event.pageY)) {\n        event.preventDefault();\n        alert(\"Context x: \" + event.pageX + \" y: \" + event.pageY);\n        return false;\n      }\n    }).on('mm:stop-dragging', function (evt) {\n      element.removeClass('dragging');\n      reorderBounds.hide();\n      var dropResult, manualPosition;\n      var isShift = evt && evt.gesture && evt.gesture.srcEvent && evt.gesture.srcEvent.shiftKey,\n        stageDropCoordinates = stagePositionForPointEvent(evt),\n        nodeAtDrop = stageDropCoordinates && mapModel.getNodeIdAtPosition(stageDropCoordinates.x, stageDropCoordinates.y),\n        finalPosition = evt.finalPosition && stagePositionForPointEvent({\n          pageX: evt.finalPosition.left,\n          pageY: evt.finalPosition.top\n        });\n      clearCurrentDroppable();\n      if (!stageDropCoordinates) {\n        return;\n      }\n      if (nodeAtDrop && nodeAtDrop !== node.id) {\n        dropResult = mapModel.dropNode(node.id, nodeAtDrop, !!isShift);\n      } else {\n        finalPosition.width = element.outerWidth();\n        finalPosition.height = element.outerHeight();\n        manualPosition = !!isShift || !withinReorderBoundary(currentReorderBoundary, finalPosition);\n        if (manualPosition) {\n          dropResult = mapModel.positionNodeAt(node.id, finalPosition.x, finalPosition.y, manualPosition);\n        } else {\n          dropResult = mapModel.positionNodeAt(node.id, stageDropCoordinates.x, stageDropCoordinates.y, manualPosition);\n        }\n      }\n      return dropResult;\n    }).on('mm:cancel-dragging', function () {\n      clearCurrentDroppable();\n      element.removeClass('dragging');\n      reorderBounds.hide();\n    }).on('mm:resize', function (event) {\n      mapModel.setNodeWidth('mouse', node.id, event.nodeWidth);\n    });\n    if (touchEnabled) {\n      element.on('hold', function (evt) {\n        var realEvent = evt.gesture && evt.gesture.srcEvent || evt;\n        mapModel.clickNode(node.id, realEvent);\n        if (mapModel.requestContextMenu(evt.gesture.center.pageX, evt.gesture.center.pageY)) {\n          evt.preventDefault();\n          if (evt.gesture) {\n            evt.gesture.preventDefault();\n            evt.gesture.stopPropagation();\n          }\n          return false;\n        }\n      });\n    }\n    element.css('min-width', element.css('width'));\n    if (mapModel.isEditingEnabled()) {\n      element.shadowDraggable();\n    }\n  });\n  mapModel.addEventListener('nodeSelectionChanged', function (ideaId, isSelected) {\n    var node = stageElement.nodeWithId(ideaId);\n    if (isSelected) {\n      node.addClass('selected');\n      ensureNodeVisible(node);\n    } else {\n      node.removeClass('selected');\n    }\n  });\n  mapModel.addEventListener('nodeRemoved', function (node) {\n    stageElement.nodeWithId(node.id).queueFadeOut(nodeAnimOptions);\n  });\n  mapModel.addEventListener('nodeMoved', function (node /*, reason*/) {\n    var currentViewPortDimensions = getViewPortDimensions(),\n      nodeDom = stageElement.nodeWithId(node.id).data({\n        'x': Math.round(node.x),\n        'y': Math.round(node.y),\n        'width': Math.round(node.width),\n        'height': Math.round(node.height)\n      }).each(ensureSpaceForNode),\n      screenTopLeft = stageToViewCoordinates(Math.round(node.x), Math.round(node.y)),\n      screenBottomRight = stageToViewCoordinates(Math.round(node.x + node.width), Math.round(node.y + node.height));\n    if (screenBottomRight.x < 0 || screenBottomRight.y < 0 || screenTopLeft.x > currentViewPortDimensions.innerWidth || screenTopLeft.y > currentViewPortDimensions.innerHeight) {\n      nodeDom.each(updateScreenCoordinates);\n    } else {\n      nodeDom.each(animateToPositionCoordinates);\n    }\n  });\n  mapModel.addEventListener('nodeTitleChanged nodeAttrChanged nodeLabelChanged', function (n) {\n    stageElement.nodeWithId(n.id).updateNodeContent(n, resourceTranslator);\n  });\n  mapModel.addEventListener('connectorCreated', function (connector) {\n    var element = stageElement.createConnector(connector).queueFadeIn(nodeAnimOptions).updateConnector(true);\n    stageElement.nodeWithId(connector.from).add(stageElement.nodeWithId(connector.to)).on('mapjs:move', function () {\n      element.updateConnector(true);\n    }).on('mapjs:resize', function () {\n      element.updateConnector(true);\n    }).on('mm:drag', function () {\n      element.updateConnector();\n    }).on('mapjs:animatemove', function () {\n      connectorsForAnimation = connectorsForAnimation.add(element);\n    });\n  });\n  mapModel.addEventListener('connectorRemoved', function (connector) {\n    stageElement.findConnector(connector).queueFadeOut(nodeAnimOptions);\n  });\n  mapModel.addEventListener('linkCreated', function (l) {\n    var link = stageElement.createLink(l).queueFadeIn(nodeAnimOptions).updateLink();\n    link.find('.mapjs-link-hit').on('tap', function (event) {\n      mapModel.selectLink('mouse', l, {\n        x: event.gesture.center.pageX,\n        y: event.gesture.center.pageY\n      });\n      // alert(\"context-from link x: \" + event.gesture.center.pageX + \" y: \" + event.gesture.center.pageY);\n\n      event.stopPropagation();\n      event.gesture.stopPropagation();\n    });\n    stageElement.nodeWithId(l.ideaIdFrom).add(stageElement.nodeWithId(l.ideaIdTo)).on('mapjs:move mm:drag', function () {\n      link.updateLink();\n    }).on('mapjs:animatemove', function () {\n      linksForAnimation = linksForAnimation.add(link);\n    });\n  });\n  mapModel.addEventListener('linkRemoved', function (l) {\n    stageElement.findLink(l).queueFadeOut(nodeAnimOptions);\n  });\n  mapModel.addEventListener('mapScaleChanged', function (scaleMultiplier /*, zoomPoint */) {\n    var currentScale = stageElement.data('scale'),\n      targetScale = Math.max(Math.min(currentScale * scaleMultiplier, 5), 0.2),\n      currentCenter = stagePointAtViewportCenter();\n    if (currentScale === targetScale) {\n      return;\n    }\n    stageElement.data('scale', targetScale).updateStage();\n    centerViewOn(currentCenter.x, currentCenter.y);\n  });\n  mapModel.addEventListener('nodeVisibilityRequested', function (ideaId) {\n    var id = ideaId || mapModel.getCurrentlySelectedIdeaId(),\n      node = stageElement.nodeWithId(id);\n    if (node) {\n      ensureNodeVisible(node);\n      viewPort.finish();\n    }\n  });\n  mapModel.addEventListener('nodeFocusRequested', function (ideaId) {\n    var node = stageElement.nodeWithId(ideaId).data(),\n      nodeCenterX = Math.round(node.x + node.width / 2),\n      nodeCenterY = Math.round(node.y + node.height / 2);\n    if (stageElement.data('scale') !== 1) {\n      stageElement.data('scale', 1).updateStage();\n    }\n    centerViewOn(nodeCenterX, nodeCenterY, true);\n  });\n  mapModel.addEventListener('mapViewResetRequested', function () {\n    stageElement.data({\n      'scale': 1,\n      'height': 0,\n      'width': 0,\n      'offsetX': 0,\n      'offsetY': 0\n    }).updateStage();\n    stageElement.children().andSelf().finish(nodeAnimOptions.queue);\n    jQuery(stageElement).find('.mapjs-node').each(ensureSpaceForNode);\n    jQuery(stageElement).find('[data-mapjs-role=connector]').updateConnector(true);\n    jQuery(stageElement).find('[data-mapjs-role=link]').updateLink(true);\n    centerViewOn(0, 0);\n    viewPort.focus();\n  });\n  mapModel.addEventListener('layoutChangeStarting', function () {\n    viewPortDimensions = undefined;\n    stageElement.children().finish(nodeAnimOptions.queue);\n    stageElement.finish(nodeAnimOptions.queue);\n  });\n  mapModel.addEventListener('layoutChangeComplete', function (options) {\n    var connectorGroupClone = jQuery(),\n      linkGroupClone = jQuery();\n    if (options && options.themeChanged) {\n      stageElement.children().andSelf().finish(nodeAnimOptions.queue);\n      jQuery(stageElement).find('[data-mapjs-role=connector]').updateConnector(true);\n      jQuery(stageElement).find('[data-mapjs-role=link]').updateLink(true);\n    } else {\n      connectorsForAnimation.each(function () {\n        if (!jQuery(this).animateConnectorToPosition(nodeAnimOptions, 2)) {\n          connectorGroupClone = connectorGroupClone.add(this);\n        }\n      });\n      linksForAnimation.each(function () {\n        if (!jQuery(this).animateConnectorToPosition(nodeAnimOptions, 2)) {\n          linkGroupClone = linkGroupClone.add(this);\n        }\n      });\n      stageElement.animate({\n        'opacity': 1\n      }, _.extend({\n        progress: function progress() {\n          connectorGroupClone.updateConnector();\n          linkGroupClone.updateLink();\n        },\n        complete: function complete() {\n          connectorGroupClone.updateConnector(true);\n          linkGroupClone.updateLink(true);\n        }\n      }, nodeAnimOptions));\n      stageElement.children().dequeue(nodeAnimOptions.queue);\n      stageElement.dequeue(nodeAnimOptions.queue);\n    }\n    connectorsForAnimation = jQuery();\n    linksForAnimation = jQuery();\n    ensureNodeVisible(stageElement.nodeWithId(mapModel.getCurrentlySelectedIdeaId()));\n  });\n\n  /* editing */\n  if (!options || !options.inlineEditingDisabled) {\n    mapModel.addEventListener('nodeEditRequested', function (nodeId, shouldSelectAll, editingNew) {\n      // debugger\n      var editingElement = stageElement.nodeWithId(nodeId);\n      mapModel.setInputEnabled(false);\n      viewPort.finish(); /* close any pending animations */\n      editingElement.editNode(shouldSelectAll).done(function (newText) {\n        mapModel.setInputEnabled(true);\n        mapModel.updateTitle(nodeId, newText, editingNew);\n        editingElement.focus();\n      }).fail(function () {\n        mapModel.setInputEnabled(true);\n        if (editingNew) {\n          mapModel.undo('internal');\n        }\n        editingElement.focus();\n      });\n    });\n  }\n  mapModel.addEventListener('addLinkModeToggled', function (isOn) {\n    if (isOn) {\n      stageElement.addClass('mapjs-add-link');\n    } else {\n      stageElement.removeClass('mapjs-add-link');\n    }\n  });\n  mapModel.addEventListener('linkAttrChanged', function (l) {\n    var attr = _.extend({\n      arrow: false\n    }, l.attr && l.attr.style);\n    stageElement.findLink(l).data(attr).updateLink();\n  });\n  mapModel.addEventListener('activatedNodesChanged', function (activatedNodes, deactivatedNodes) {\n    _.each(activatedNodes, function (nodeId) {\n      stageElement.nodeWithId(nodeId).addClass('activated');\n    });\n    _.each(deactivatedNodes, function (nodeId) {\n      stageElement.nodeWithId(nodeId).removeClass('activated');\n    });\n  });\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-view.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-widget.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-widget.js ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, document, window */\nvar $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  DOMRender = __webpack_require__(/*! ./dom-render */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js\");\n\n// require('imports-loader?jQuery=jquery!jquery.hotkeys');\n__webpack_require__(/*! ./dom-map-view */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-view.js\");\n$.fn.scrollWhenDragging = function (scrollPredicate) {\n  'use strict';\n\n  return this.each(function () {\n    var element = $(this);\n    var dragOrigin;\n    element.on('dragstart', function () {\n      if (scrollPredicate()) {\n        dragOrigin = {\n          top: element.scrollTop(),\n          left: element.scrollLeft()\n        };\n      }\n    }).on('drag', function (e) {\n      if (e.gesture && dragOrigin) {\n        element.scrollTop(dragOrigin.top - e.gesture.deltaY);\n        element.scrollLeft(dragOrigin.left - e.gesture.deltaX);\n      }\n    }).on('dragend', function () {\n      dragOrigin = undefined;\n    });\n  });\n};\n$.fn.domMapWidget = function (activityLog, mapModel, touchEnabled, imageInsertController, dragContainer, resourceTranslator, centerSelectedNodeOnOrientationChange, options) {\n  'use strict';\n\n  var hotkeyEventHandlers = {\n      'return': 'insertDown',\n      'shift+return': 'insertUp',\n      'shift+tab': 'insertLeft',\n      'tab insert': 'insertRight',\n      'del backspace': 'removeSubIdea',\n      'left': 'selectNodeLeft',\n      'up': 'selectNodeUp',\n      'right': 'selectNodeRight',\n      'shift+right': 'activateNodeRight',\n      'shift+left': 'activateNodeLeft',\n      'meta+right ctrl+right': 'moveRight',\n      'meta+left ctrl+left': 'moveLeft',\n      'meta+up ctrl+up': 'moveUp',\n      'meta+down ctrl+down': 'moveDown',\n      'shift+up': 'activateNodeUp',\n      'shift+down': 'activateNodeDown',\n      'down': 'selectNodeDown',\n      'space f2': 'editNode',\n      'f': 'toggleCollapse',\n      'c meta+x ctrl+x': 'cut',\n      'p meta+v ctrl+v': 'paste',\n      'y meta+c ctrl+c': 'copy',\n      'u meta+z ctrl+z': 'undo',\n      'Esc 0 meta+0 ctrl+0': 'resetView',\n      'r meta+shift+z ctrl+shift+z meta+y ctrl+y': 'redo',\n      'meta+plus ctrl+plus z': 'scaleUp',\n      'meta+minus ctrl+minus shift+z': 'scaleDown',\n      'ctrl+shift+v meta+shift+v': 'pasteStyle',\n      'Esc': 'cancelCurrentAction'\n    },\n    charEventHandlers = {\n      '[': 'activateChildren',\n      '{': 'activateNodeAndChildren',\n      '=': 'activateSiblingNodes',\n      '.': 'activateSelectedNode',\n      '/': 'toggleCollapse',\n      'a': 'openAttachment',\n      'i': 'editIcon'\n    },\n    self = this;\n  var actOnKeys = true;\n  mapModel.addEventListener('inputEnabledChanged', function (canInput, holdFocus) {\n    actOnKeys = canInput;\n    if (canInput && !holdFocus) {\n      self.focus();\n    }\n  });\n  return this.each(function () {\n    var element = $(this),\n      stage = $('<div>').css({\n        position: 'relative'\n      }).attr('data-mapjs-role', 'stage').appendTo(element).data({\n        'offsetX': element.innerWidth() / 2,\n        'offsetY': element.innerHeight() / 2,\n        'width': element.innerWidth() - 20,\n        'height': element.innerHeight() - 20,\n        'scale': 1\n      }).updateStage();\n    var previousPinchScale = false;\n    element.css('overflow', 'auto').attr('tabindex', 1);\n    if (mapModel.isEditingEnabled()) {\n      (dragContainer || element).simpleDraggableContainer();\n    }\n    if (!touchEnabled) {\n      element.scrollWhenDragging(mapModel.getInputEnabled); //no need to do this for touch, this is native\n      element.on('mousedown', function (e) {\n        if (e.target !== element[0]) {\n          element.css('overflow', 'hidden');\n        }\n      });\n      $(document).on('mouseup', function () {\n        if (element.css('overflow') !== 'auto') {\n          element.css('overflow', 'auto');\n        }\n      });\n      element.imageDropWidget(imageInsertController);\n    } else {\n      element.on('doubletap', function (event) {\n        if (mapModel.requestContextMenu(event.gesture.center.pageX, event.gesture.center.pageY)) {\n          event.preventDefault();\n          event.gesture.preventDefault();\n          return false;\n        }\n      }).on('pinch', function (event) {\n        var scale;\n        if (!event || !event.gesture || !event.gesture.scale) {\n          return;\n        }\n        event.preventDefault();\n        event.gesture.preventDefault();\n        scale = event.gesture.scale;\n        if (previousPinchScale) {\n          scale = scale / previousPinchScale;\n        }\n        if (Math.abs(scale - 1) < 0.05) {\n          return;\n        }\n        previousPinchScale = event.gesture.scale;\n        mapModel.scale('touch', scale, {\n          x: event.gesture.center.pageX - stage.data('offsetX'),\n          y: event.gesture.center.pageY - stage.data('offsetY')\n        });\n      }).on('gestureend', function () {\n        previousPinchScale = false;\n      });\n    }\n    //debugger\n    DOMRender.viewController(mapModel, stage, touchEnabled, imageInsertController, resourceTranslator, options);\n    _.each(hotkeyEventHandlers, function (mappedFunction, keysPressed) {\n      element.keydown(keysPressed, function (event) {\n        if (actOnKeys) {\n          event.stopImmediatePropagation();\n          event.preventDefault();\n          mapModel[mappedFunction]('keyboard');\n        }\n      });\n    });\n    if (!touchEnabled) {\n      $(window).on('resize', function () {\n        mapModel.resetView();\n      });\n    }\n    $(window).on('orientationchange', function () {\n      if (centerSelectedNodeOnOrientationChange) {\n        mapModel.centerOnNode(mapModel.getSelectedNodeId());\n      } else {\n        mapModel.resetView();\n      }\n    });\n    $(document).on('keydown', function (e) {\n      var functions = {\n        'U+003D': 'scaleUp',\n        'U+002D': 'scaleDown',\n        61: 'scaleUp',\n        173: 'scaleDown'\n      };\n      var mappedFunction;\n      if (e && !e.altKey && (e.ctrlKey || e.metaKey)) {\n        if (e.originalEvent && e.originalEvent.keyIdentifier) {\n          /* webkit */\n          mappedFunction = functions[e.originalEvent.keyIdentifier];\n        } else if (e.key === 'MozPrintableKey') {\n          mappedFunction = functions[e.which];\n        }\n        if (mappedFunction) {\n          if (actOnKeys) {\n            e.preventDefault();\n            mapModel[mappedFunction]('keyboard');\n          }\n        }\n      }\n    }).on('wheel mousewheel', function (e) {\n      var scroll = e.originalEvent.deltaX || -1 * e.originalEvent.wheelDeltaX;\n      if (scroll < 0 && element.scrollLeft() === 0) {\n        e.preventDefault();\n      }\n      if (scroll > 0 && element[0].scrollWidth - element.width() - element.scrollLeft() === 0) {\n        e.preventDefault();\n      }\n    });\n    element.on('keypress', function (evt) {\n      if (!actOnKeys) {\n        return;\n      }\n      if (/INPUT|TEXTAREA/.test(evt && evt.target && evt.target.tagName)) {\n        return;\n      }\n      var unicode = evt.charCode || evt.keyCode,\n        actualkey = String.fromCharCode(unicode),\n        mappedFunction = charEventHandlers[actualkey];\n      if (mappedFunction) {\n        evt.preventDefault();\n        mapModel[mappedFunction]('keyboard');\n      } else if (Number(actualkey) <= 9 && Number(actualkey) >= 1) {\n        evt.preventDefault();\n        mapModel.activateLevel('keyboard', Number(actualkey) + 1);\n      }\n    });\n  });\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, document, module */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  calculateLayout = __webpack_require__(/*! mindmup-mapjs-layout */ \"./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js\").calculateLayout,\n  DOMRender = {\n    svgPixel: 'data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"></svg>',\n    nodeCacheMark: function nodeCacheMark(idea, levelOverride) {\n      'use strict';\n\n      return {\n        title: idea.title,\n        width: idea.attr && idea.attr.style && idea.attr.style.width,\n        theme: DOMRender.theme && DOMRender.theme.name,\n        icon: idea.attr && idea.attr.icon && _.pick(idea.attr.icon, 'width', 'height', 'position'),\n        collapsed: idea.attr && idea.attr.collapsed,\n        note: !!(idea.attr && idea.attr.note),\n        styles: DOMRender.theme && DOMRender.theme.nodeStyles(idea.level || levelOverride, idea.attr),\n        level: idea.level || levelOverride\n      };\n    },\n    dummyTextBox: jQuery('<div>').addClass('mapjs-node').css({\n      position: 'absolute',\n      visibility: 'hidden'\n    }),\n    dimensionProvider: function dimensionProvider(idea, level) {\n      'use strict';\n\n      /* support multiple stages? */\n      var translateToPixel = function translateToPixel() {\n        return DOMRender.svgPixel;\n      };\n      var result = false,\n        textBox = jQuery(document).nodeWithId(idea.id);\n      if (textBox && textBox.length > 0) {\n        if (_.isEqual(textBox.data('nodeCacheMark'), DOMRender.nodeCacheMark(idea, level))) {\n          return _.pick(textBox.data(), 'width', 'height');\n        }\n      }\n      textBox = DOMRender.dummyTextBox;\n      textBox.appendTo('body').updateNodeContent(idea, translateToPixel, level);\n      result = {\n        width: textBox.outerWidth(true),\n        height: textBox.outerHeight(true)\n      };\n      textBox.detach();\n      return result;\n    },\n    layoutCalculator: function layoutCalculator(contentAggregate) {\n      'use strict';\n\n      return calculateLayout(contentAggregate, DOMRender.dimensionProvider, {\n        theme: DOMRender.theme\n      });\n    },\n    fixedLayout: false\n  };\nmodule.exports = DOMRender;\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/get-data-uri-and-dimensions.js":
/*!****************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/get-data-uri-and-dimensions.js ***!
  \****************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, document, Image, require */\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nmodule.exports = function getDataURIAndDimensions(src, corsProxyUrl) {\n  'use strict';\n\n  var isDataUri = function isDataUri(string) {\n      return /^data:image/.test(string);\n    },\n    convertSrcToDataUri = function convertSrcToDataUri(img) {\n      var ctx = false;\n      if (isDataUri(img.src)) {\n        return img.src;\n      }\n      var canvas = document.createElement('canvas');\n      canvas.width = img.width;\n      canvas.height = img.height;\n      ctx = canvas.getContext('2d');\n      ctx.drawImage(img, 0, 0);\n      return canvas.toDataURL('image/png');\n    },\n    deferred = jQuery.Deferred(),\n    domImg = new Image();\n  domImg.onload = function () {\n    try {\n      deferred.resolve({\n        dataUri: convertSrcToDataUri(domImg),\n        width: domImg.width,\n        height: domImg.height\n      });\n    } catch (e) {\n      deferred.reject();\n    }\n  };\n  domImg.onerror = function () {\n    deferred.reject();\n  };\n  if (!isDataUri(src)) {\n    if (corsProxyUrl) {\n      domImg.crossOrigin = 'Anonymous';\n      src = corsProxyUrl + encodeURIComponent(src);\n    } else {\n      deferred.reject('no-cors');\n    }\n  }\n  domImg.src = src;\n  return deferred.promise();\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/get-data-uri-and-dimensions.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/hammer-draggable.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/hammer-draggable.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require*/\nvar $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  Hammer = __webpack_require__(/*! exports-loader?Hammer!jquery-hammerjs/jquery.hammer-full.js */ \"./node_modules/exports-loader/index.js?Hammer!./node_modules/jquery-hammerjs/jquery.hammer-full.js\"),\n  onDrag = function onDrag(e) {\n    'use strict';\n\n    $(this).trigger($.Event('mm:start-dragging', {\n      relatedTarget: this,\n      gesture: e.gesture\n    }));\n    e.stopPropagation();\n    e.preventDefault();\n    if (e.gesture) {\n      e.gesture.stopPropagation();\n      e.gesture.preventDefault();\n    }\n  },\n  onShadowDrag = function onShadowDrag(e) {\n    'use strict';\n\n    $(this).trigger($.Event('mm:start-dragging-shadow', {\n      relatedTarget: this,\n      gesture: e.gesture\n    }));\n    e.stopPropagation();\n    e.preventDefault();\n    if (e.gesture) {\n      e.gesture.stopPropagation();\n      e.gesture.preventDefault();\n    }\n  };\n$.fn.simpleDraggableContainer = function () {\n  'use strict';\n\n  var currentDragObject, originalDragObjectPosition;\n  var container = this,\n    drag = function drag(event) {\n      if (currentDragObject && event.gesture) {\n        var newpos = {\n          top: Math.round(parseInt(originalDragObjectPosition.top, 10) + event.gesture.deltaY),\n          left: Math.round(parseInt(originalDragObjectPosition.left, 10) + event.gesture.deltaX)\n        };\n        currentDragObject.css(newpos).trigger($.Event('mm:drag', {\n          currentPosition: newpos,\n          gesture: event.gesture\n        }));\n        if (event.gesture) {\n          event.gesture.preventDefault();\n        }\n        return false;\n      }\n    },\n    rollback = function rollback(e) {\n      var target = currentDragObject; // allow it to be cleared while animating\n      if (target.attr('mapjs-drag-role') !== 'shadow') {\n        target.animate(originalDragObjectPosition, {\n          complete: function complete() {\n            target.trigger($.Event('mm:cancel-dragging', {\n              gesture: e.gesture\n            }));\n          },\n          progress: function progress() {\n            target.trigger('mm:drag');\n          }\n        });\n      } else {\n        target.trigger($.Event('mm:cancel-dragging', {\n          gesture: e.gesture\n        }));\n      }\n    };\n  Hammer(this, {\n    'drag_min_distance': 2\n  }); //eslint-disable-line new-cap\n  return this.on('mm:start-dragging', function (event) {\n    if (!currentDragObject) {\n      currentDragObject = $(event.relatedTarget);\n      originalDragObjectPosition = {\n        top: currentDragObject.css('top'),\n        left: currentDragObject.css('left')\n      };\n      $(this).on('drag', drag);\n    }\n  }).on('mm:start-dragging-shadow', function (event) {\n    var target = $(event.relatedTarget),\n      clone = function clone() {\n        var result = target.clone().addClass('drag-shadow').appendTo(container).offset(target.offset()).data(target.data()).attr('mapjs-drag-role', 'shadow'),\n          scale = target.parent().data('scale') || 1;\n        if (scale !== 0) {\n          result.css({\n            'transform': 'scale(' + scale + ')',\n            'transform-origin': 'top left'\n          });\n        }\n        return result;\n      };\n    if (!currentDragObject) {\n      currentDragObject = clone();\n      originalDragObjectPosition = {\n        top: currentDragObject.css('top'),\n        left: currentDragObject.css('left')\n      };\n      currentDragObject.on('mm:stop-dragging mm:cancel-dragging', function (e) {\n        this.remove();\n        e.stopPropagation();\n        e.stopImmediatePropagation();\n        var evt = $.Event(e.type, {\n          gesture: e.gesture,\n          finalPosition: e.finalPosition\n        });\n        target.trigger(evt);\n      }).on('mm:drag', function (e) {\n        target.trigger(e);\n      });\n      $(this).on('drag', drag);\n    }\n  }).on('dragend', function (e) {\n    $(this).off('drag', drag);\n    if (currentDragObject) {\n      var evt = $.Event('mm:stop-dragging', {\n        gesture: e.gesture,\n        finalPosition: currentDragObject.offset()\n      });\n      currentDragObject.trigger(evt);\n      if (evt.result === false) {\n        rollback(e);\n      }\n      currentDragObject = undefined;\n    }\n  }).on('mouseleave', function (e) {\n    if (currentDragObject) {\n      $(this).off('drag', drag);\n      rollback(e);\n      currentDragObject = undefined;\n    }\n  }).attr('data-drag-role', 'container');\n};\n$.fn.simpleDraggable = function (options) {\n  'use strict';\n\n  if (!options || !options.disable) {\n    return $(this).on('dragstart', onDrag);\n  } else {\n    return $(this).off('dragstart', onDrag);\n  }\n};\n$.fn.shadowDraggable = function (options) {\n  'use strict';\n\n  if (!options || !options.disable) {\n    return $(this).on('dragstart', onShadowDrag);\n  } else {\n    return $(this).off('dragstart', onShadowDrag);\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/hammer-draggable.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-drop-widget.js":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-drop-widget.js ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require */\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\njQuery.fn.imageDropWidget = function (imageInsertController) {\n  'use strict';\n\n  this.on('dragenter dragover', function (e) {\n    if (e.originalEvent.dataTransfer) {\n      return false;\n    }\n  }).on('drop', function (e) {\n    var dataTransfer = e.originalEvent.dataTransfer;\n    var htmlContent;\n    e.stopPropagation();\n    e.preventDefault();\n    if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {\n      imageInsertController.insertFiles(dataTransfer.files, e.originalEvent);\n    } else if (dataTransfer) {\n      htmlContent = dataTransfer.getData('text/html');\n      imageInsertController.insertHtmlContent(htmlContent, e.originalEvent);\n    }\n  });\n  return this;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-drop-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-insert-controller.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-insert-controller.js ***!
  \************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require, FileReader */\nvar observable = __webpack_require__(/*! mindmup-mapjs-model */ \"./node_modules/mindmup-mapjs-model/index.js\").observable,\n  jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  getDataURIAndDimensions = __webpack_require__(/*! ./get-data-uri-and-dimensions */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/get-data-uri-and-dimensions.js\");\nmodule.exports = function ImageInsertController(corsProxyUrl, resourceConverter) {\n  'use strict';\n\n  var self = observable(this),\n    readFileIntoDataUrl = function readFileIntoDataUrl(fileInfo) {\n      var loader = jQuery.Deferred(),\n        fReader = new FileReader();\n      fReader.onload = function (e) {\n        loader.resolve(e.target.result);\n      };\n      fReader.onerror = loader.reject;\n      fReader.onprogress = loader.notify;\n      fReader.readAsDataURL(fileInfo);\n      return loader.promise();\n    };\n  self.insertDataUrl = function (dataUrl, evt) {\n    self.dispatchEvent('imageLoadStarted');\n    getDataURIAndDimensions(dataUrl, corsProxyUrl).then(function (result) {\n      var storeUrl = result.dataUri;\n      if (resourceConverter) {\n        storeUrl = resourceConverter(storeUrl);\n      }\n      self.dispatchEvent('imageInserted', storeUrl, result.width, result.height, evt);\n    }, function (reason) {\n      self.dispatchEvent('imageInsertError', reason);\n    });\n  };\n  self.insertFiles = function (files, evt) {\n    jQuery.each(files, function (idx, fileInfo) {\n      if (/^image\\//.test(fileInfo.type)) {\n        jQuery.when(readFileIntoDataUrl(fileInfo)).done(function (dataUrl) {\n          self.insertDataUrl(dataUrl, evt);\n        });\n      }\n    });\n  };\n  self.insertHtmlContent = function (htmlContent, evt) {\n    var images = htmlContent.match(/img[^>]*src=\"([^\"]*)\"/);\n    if (images && images.length > 0) {\n      _.each(images.slice(1), function (dataUrl) {\n        self.insertDataUrl(dataUrl, evt);\n      });\n    }\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-insert-controller.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/link-edit-widget.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/link-edit-widget.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(jQuery, $) {/*global require */\n// const jQuery = require('jquery');\n// const $ = jQuery;\n\njQuery.fn.linkEditWidget = function (mapModel, app) {\n  'use strict';\n\n  return this.each(function () {\n    var element = jQuery(this),\n      colorElement = element.find('.color'),\n      lineStyleElement = element.find('.lineStyle'),\n      arrowElement = element.find('.arrow');\n    var currentLink;\n    mapModel.addEventListener('linkSelected', function (link, selectionPoint, linkStyle) {\n      var rect = element[0].parentElement.getBoundingClientRect();\n      var $currentPage = app.router.$el;\n      // let scroll = $currentPage.scrollTop();\n\n      currentLink = link;\n      element.show();\n      element.css({\n        // top: ((selectionPoint.y + scroll - 80) - rectH.top) + 'px',\n        top: selectionPoint.y - rect.top - 80 + 'px',\n        left: selectionPoint.x - rect.left - 100 + 'px'\n      });\n      colorElement.val(linkStyle.color).change();\n      lineStyleElement.val(linkStyle.lineStyle).change();\n      if (linkStyle.arrow == undefined || linkStyle.arrow == false) {\n        arrowElement.val(\"false\").change();\n      } else {\n        arrowElement.val(\"true\").change();\n      }\n    });\n    mapModel.addEventListener('mapMoveRequested', function () {\n      element.hide();\n    });\n    element.find('.delete').click(function () {\n      mapModel.removeLink('mouse', currentLink.ideaIdFrom, currentLink.ideaIdTo);\n      element.hide();\n    });\n    colorElement.change(function () {\n      mapModel.updateLinkStyle('mouse', currentLink.ideaIdFrom, currentLink.ideaIdTo, 'color', jQuery(this).val());\n    });\n    lineStyleElement.change(function () {\n      mapModel.updateLinkStyle('mouse', currentLink.ideaIdFrom, currentLink.ideaIdTo, 'lineStyle', jQuery(this).val());\n    });\n    arrowElement.change(function () {\n      if (jQuery(this).val() == \"true\") {\n        mapModel.updateLinkStyle('mouse', currentLink.ideaIdFrom, currentLink.ideaIdTo, 'arrow', true);\n      } else {\n        mapModel.updateLinkStyle('mouse', currentLink.ideaIdFrom, currentLink.ideaIdTo, 'arrow', false);\n      }\n    });\n    element.on(\"focusout\", function () {\n      element.hide.bind(element);\n    });\n\n    // element.mouseleave(element.hide.bind(element));\n  });\n};\n$(document).mouseup(function (e) {\n  if ($(e.target).closest(\"#linkEditWidget\").length === 0) {\n    $(\".mindmap-context\").each(function () {\n      $(this).hide();\n    });\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/link-edit-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-model.js":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-model.js ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require, module */\nvar _ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\"),\n  MemoryClipboard = __webpack_require__(/*! ./clipboard */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/clipboard.js\"),\n  LayoutModel = __webpack_require__(/*! mindmup-mapjs-layout */ \"./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js\").LayoutModel,\n  observable = __webpack_require__(/*! mindmup-mapjs-model */ \"./node_modules/mindmup-mapjs-model/index.js\").observable;\nmodule.exports = function MapModel(layoutCalculatorArg, selectAllTitles, clipboardProvider, defaultReorderMargin, optional) {\n  'use strict';\n\n  var idea,\n    isAddLinkMode,\n    currentLabelGenerator,\n    isInputEnabled = true,\n    isEditingEnabled = true,\n    revertSelectionForUndo,\n    revertActivatedForUndo,\n    paused = false,\n    activatedNodes = [],\n    layoutCalculator = layoutCalculatorArg,\n    currentlySelectedIdeaId;\n  var self = this,\n    reorderMargin = defaultReorderMargin || 20,\n    clipboard = clipboardProvider || new MemoryClipboard(),\n    layoutModel = optional && optional.layoutModel || new LayoutModel({\n      nodes: {},\n      connectors: {}\n    }),\n    setActiveNodes = function setActiveNodes(activated) {\n      var wasActivated = _.clone(activatedNodes);\n      if (activated.length === 0) {\n        activatedNodes = [currentlySelectedIdeaId];\n      } else {\n        activatedNodes = activated;\n      }\n      self.dispatchEvent('activatedNodesChanged', _.difference(activatedNodes, wasActivated), _.difference(wasActivated, activatedNodes));\n    },\n    applyLabels = function applyLabels(newLayout) {\n      var labelMap = currentLabelGenerator && currentLabelGenerator(idea);\n      if (!labelMap) {\n        return;\n      }\n      _.each(newLayout.nodes, function (node, id) {\n        if (labelMap[id] || labelMap[id] === 0) {\n          node.label = labelMap[id];\n        }\n      });\n    },\n    closestNodeId = function closestNodeId(nodeList, referenceNode) {\n      var closestNode = _.min(nodeList, function (node) {\n        return Math.pow(node.x + node.width / 2 - referenceNode.x - referenceNode.width / 2, 2) + Math.pow(node.y + node.height / 2 - referenceNode.y - referenceNode.height / 2, 2);\n      });\n      return closestNode && closestNode.id;\n    },\n    updateCurrentLayout = function updateCurrentLayout(newLayout, sessionId) {\n      var layoutCompleteOptions;\n      var currentLayout = layoutModel.getLayout(),\n        themeChanged = currentLayout.theme !== newLayout.theme;\n      self.dispatchEvent('layoutChangeStarting', _.size(newLayout.nodes) - _.size(currentLayout.nodes));\n      applyLabels(newLayout);\n      _.each(currentLayout.connectors, function (oldConnector, connectorId) {\n        var newConnector = newLayout.connectors[connectorId];\n        if (!newConnector || newConnector.from !== oldConnector.from || newConnector.to !== oldConnector.to) {\n          self.dispatchEvent('connectorRemoved', oldConnector);\n        }\n      });\n      _.each(currentLayout.links, function (oldLink, linkId) {\n        var newLink = newLayout.links && newLayout.links[linkId];\n        if (!newLink) {\n          self.dispatchEvent('linkRemoved', oldLink);\n        }\n      });\n      _.each(currentLayout.nodes, function (oldNode, nodeId) {\n        var newNode = newLayout.nodes[nodeId];\n        var newActive;\n        if (!newNode) {\n          /*jslint eqeq: true*/\n          if (nodeId == currentlySelectedIdeaId) {\n            //eslint-disable-line eqeqeq\n            self.selectNode(closestNodeId(newLayout.nodes, oldNode));\n          }\n          newActive = _.reject(activatedNodes, function (e) {\n            return e == nodeId; // eslint-disable-line eqeqeq\n          });\n          if (newActive.length !== activatedNodes.length) {\n            setActiveNodes(newActive);\n          }\n          self.dispatchEvent('nodeRemoved', oldNode, nodeId, sessionId);\n        }\n      });\n      _.each(newLayout.nodes, function (newNode, nodeId) {\n        var oldNode = currentLayout.nodes[nodeId];\n        //debugger\n        if (!oldNode) {\n          self.dispatchEvent('nodeCreated', newNode, sessionId);\n        } else {\n          if (newNode.x !== oldNode.x || newNode.y !== oldNode.y) {\n            self.dispatchEvent('nodeMoved', newNode, sessionId);\n          }\n          if (newNode.width !== oldNode.width || newNode.height !== oldNode.height || newNode.level !== oldNode.level || !_.isEqual(newNode.attr || {}, oldNode.attr || {}) || themeChanged) {\n            self.dispatchEvent('nodeAttrChanged', newNode, sessionId);\n          }\n          if (newNode.title !== oldNode.title) {\n            self.dispatchEvent('nodeTitleChanged', newNode, sessionId);\n          }\n          if (newNode.label !== oldNode.label) {\n            self.dispatchEvent('nodeLabelChanged', newNode, sessionId);\n          }\n        }\n      });\n      _.each(newLayout.connectors, function (newConnector, connectorId) {\n        var oldConnector = currentLayout.connectors[connectorId];\n        if (!oldConnector || newConnector.from !== oldConnector.from || newConnector.to !== oldConnector.to) {\n          self.dispatchEvent('connectorCreated', newConnector, sessionId);\n        }\n      });\n      _.each(newLayout.links, function (newLink, linkId) {\n        var oldLink = currentLayout.links && currentLayout.links[linkId];\n        if (oldLink) {\n          if (!_.isEqual(newLink.attr || {}, oldLink && oldLink.attr || {})) {\n            self.dispatchEvent('linkAttrChanged', newLink, sessionId);\n          }\n        } else {\n          self.dispatchEvent('linkCreated', newLink, sessionId);\n        }\n      });\n      if (themeChanged) {\n        layoutCompleteOptions = {\n          themeChanged: true\n        };\n      }\n      layoutModel.setLayout(newLayout);\n      if (!self.isInCollapse) {\n        self.dispatchEvent('layoutChangeComplete', layoutCompleteOptions);\n      }\n    },\n    selectNewIdea = function selectNewIdea(newIdeaId) {\n      revertSelectionForUndo = currentlySelectedIdeaId;\n      revertActivatedForUndo = activatedNodes.slice(0);\n      self.selectNode(newIdeaId);\n    },\n    editNewIdea = function editNewIdea(newIdeaId) {\n      selectNewIdea(newIdeaId);\n      self.editNode(false, true, true);\n    },\n    getCurrentlySelectedIdeaId = function getCurrentlySelectedIdeaId() {\n      return currentlySelectedIdeaId || idea.getDefaultRootId();\n    },\n    onIdeaChanged = function onIdeaChanged(action, args, sessionId) {\n      if (paused) {\n        return;\n      }\n      revertSelectionForUndo = false;\n      revertActivatedForUndo = false;\n      self.rebuildRequired(sessionId);\n    },\n    currentlySelectedIdea = function currentlySelectedIdea() {\n      return idea.findSubIdeaById(currentlySelectedIdeaId) || idea;\n    },\n    ensureNodeIsExpanded = function ensureNodeIsExpanded(source, nodeId) {\n      var node = idea.findSubIdeaById(nodeId) || idea;\n      if (node.getAttr('collapsed')) {\n        idea.updateAttr(nodeId, 'collapsed', false);\n      }\n    },\n    addSubIdeaToTargetNode = function addSubIdeaToTargetNode(source, targetId, initialTitle) {\n      // debugger\n      var targetNode = idea.findSubIdeaById(targetId) || idea;\n      var newId;\n      ensureNodeIsExpanded(source, targetId);\n      if (initialTitle) {\n        newId = idea.addSubIdea(targetId, initialTitle);\n      } else {\n        newId = idea.addSubIdea(targetId);\n      }\n      if (layoutModel.getOrientation() === 'top-down') {\n        if (targetNode.findChildRankById(newId) < 0) {\n          idea.flip(newId);\n        }\n      }\n      return newId;\n    },\n    setNodePositionFromCurrentLayout = function setNodePositionFromCurrentLayout(nodeId) {\n      var node = nodeId && layoutModel.getNode(nodeId);\n      if (node) {\n        idea.updateAttr(nodeId, 'position', [node.x, node.y, 1]);\n      }\n    },\n    analytic = function analytic(eventName, eventArg) {\n      //debugger\n      if (eventArg) {\n        self.dispatchEvent('analytic', 'mapModel', eventName, eventArg);\n      } else {\n        self.dispatchEvent('analytic', 'mapModel', eventName);\n      }\n    };\n  observable(this);\n  self.pause = function () {\n    paused = true;\n  };\n  self.resume = function () {\n    paused = false;\n    self.rebuildRequired();\n  };\n  self.getIdea = function () {\n    return idea;\n  };\n  self.isEditingEnabled = function () {\n    return isEditingEnabled;\n  };\n  self.getCurrentLayout = function () {\n    return layoutModel.getLayout();\n  };\n  self.analytic = analytic;\n  self.getCurrentlySelectedIdeaId = getCurrentlySelectedIdeaId;\n  self.rebuildRequired = function (sessionId) {\n    if (!idea) {\n      return;\n    }\n    if (layoutModel.getLayout().theme !== (idea.attr && idea.attr.theme)) {\n      self.dispatchEvent('themeChanged', idea.attr && idea.attr.theme);\n    }\n    updateCurrentLayout(self.reactivate(layoutCalculator(idea)), sessionId);\n  };\n  this.setIdea = function (anIdea) {\n    if (idea) {\n      idea.removeEventListener('changed', onIdeaChanged);\n      paused = false;\n      setActiveNodes([]);\n      self.dispatchEvent('nodeSelectionChanged', currentlySelectedIdeaId, false);\n      currentlySelectedIdeaId = undefined;\n    }\n    idea = anIdea;\n    idea.addEventListener('changed', onIdeaChanged);\n    onIdeaChanged();\n    self.selectNode(idea.getDefaultRootId(), true);\n    self.dispatchEvent('mapViewResetRequested');\n  };\n  this.setEditingEnabled = function (value) {\n    isEditingEnabled = value;\n  };\n  this.getEditingEnabled = function () {\n    return isEditingEnabled;\n  };\n  this.setInputEnabled = function (value, holdFocus) {\n    if (isInputEnabled !== value) {\n      isInputEnabled = value;\n      self.dispatchEvent('inputEnabledChanged', value, !!holdFocus);\n    }\n  };\n  this.getInputEnabled = function () {\n    return isInputEnabled;\n  };\n  this.selectNode = function (id, force, appendToActive) {\n    if (force || isInputEnabled && (id !== currentlySelectedIdeaId || !self.isActivated(id))) {\n      if (currentlySelectedIdeaId) {\n        self.dispatchEvent('nodeSelectionChanged', currentlySelectedIdeaId, false);\n      }\n      currentlySelectedIdeaId = id;\n      if (appendToActive) {\n        self.activateNode('internal', id);\n      } else {\n        setActiveNodes([id]);\n      }\n      self.dispatchEvent('nodeSelectionChanged', id, true);\n    }\n  };\n  this.clickNode = function (id, event) {\n    var button = event && event.button && event.button !== -1;\n    if (event && event.altKey) {\n      self.toggleLink('mouse', id);\n    } else if (event && event.shiftKey) {\n      /*don't stop propagation, this is needed for drop targets*/\n      self.toggleActivationOnNode('mouse', id);\n    } else if (isAddLinkMode && !button) {\n      this.toggleLink('mouse', id);\n      this.toggleAddLinkMode();\n    } else {\n      this.selectNode(id);\n      if (button && button !== -1 && isInputEnabled) {\n        self.dispatchEvent('contextMenuRequested', id, event.layerX, event.layerY);\n      }\n    }\n  };\n  this.findIdeaById = function (id) {\n    if (idea.id == id) {\n      //eslint-disable-line eqeqeq\n      return idea;\n    }\n    return idea.findSubIdeaById(id);\n  };\n  this.getSelectedStyle = function (prop) {\n    return this.getStyleForId(currentlySelectedIdeaId, prop);\n  };\n  this.getStyleForId = function (id, prop) {\n    var node = layoutModel.getNode(id);\n    return node && node.attr && node.attr.style && node.attr.style[prop];\n  };\n  this.toggleCollapse = function (source) {\n    var selectedIdea = currentlySelectedIdea();\n    var isCollapsed;\n    if (self.isActivated(selectedIdea.id) && _.size(selectedIdea.ideas) > 0) {\n      isCollapsed = selectedIdea.getAttr('collapsed');\n    } else {\n      isCollapsed = self.everyActivatedIs(function (id) {\n        var node = self.findIdeaById(id);\n        if (node && _.size(node.ideas) > 0) {\n          return node.getAttr('collapsed');\n        }\n        return true;\n      });\n    }\n    this.collapse(source, !isCollapsed);\n  };\n  this.collapse = function (source, doCollapse) {\n    var contextNodeId = getCurrentlySelectedIdeaId(),\n      contextNode = function contextNode() {\n        return layoutModel.getNode(contextNodeId);\n      },\n      moveNodes = function moveNodes(nodes, deltaX, deltaY) {\n        if (deltaX || deltaY) {\n          _.each(nodes, function (node) {\n            node.x += deltaX;\n            node.y += deltaY;\n            self.dispatchEvent('nodeMoved', node, 'scroll');\n          });\n        }\n      },\n      oldContext = contextNode();\n    var newContext = false;\n    analytic('collapse:' + doCollapse, source);\n    self.isInCollapse = true;\n    if (isInputEnabled) {\n      self.applyToActivated(function (id) {\n        var node = self.findIdeaById(id);\n        if (node && (!doCollapse || node.ideas && _.size(node.ideas) > 0)) {\n          idea.updateAttr(id, 'collapsed', doCollapse);\n        }\n      });\n    }\n    newContext = contextNode();\n    if (oldContext && newContext) {\n      moveNodes(layoutModel.getLayout().nodes, oldContext.x - newContext.x, oldContext.y - newContext.y);\n    }\n    self.isInCollapse = false;\n    self.dispatchEvent('layoutChangeComplete');\n  };\n  this.updateStyle = function (source, prop, value) {\n    /*jslint eqeq:true */\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (isInputEnabled) {\n      analytic('updateStyle:' + prop, source);\n      self.applyToActivated(function (id) {\n        if (self.getStyleForId(id, prop) != value) {\n          //eslint-disable-line eqeqeq\n          idea.mergeAttrProperty(id, 'style', prop, value);\n        }\n      });\n    }\n  };\n  this.updateLinkStyle = function (source, ideaIdFrom, ideaIdTo, prop, value) {\n    var merged = _.extend({}, idea.getLinkAttr(ideaIdFrom, ideaIdTo, 'style'));\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (isInputEnabled) {\n      analytic('updateLinkStyle:' + prop, source);\n      merged[prop] = value;\n      idea.updateLinkAttr(ideaIdFrom, ideaIdTo, 'style', merged);\n    }\n  };\n  this.addSubIdea = function (source, parentId, initialTitle) {\n    var target = parentId || currentlySelectedIdeaId;\n    var newId;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addSubIdea', source);\n    if (isInputEnabled) {\n      idea.batch(function () {\n        newId = addSubIdeaToTargetNode(source, target, initialTitle);\n      });\n      //debugger\n      if (newId) {\n        if (initialTitle) {\n          selectNewIdea(newId);\n        } else {\n          editNewIdea(newId);\n        }\n      }\n    }\n  };\n  self.addGroupSubidea = function (source, options) {\n    var parentId = options && options.parentId,\n      group = options && options.group || true,\n      target = parentId || currentlySelectedIdeaId;\n    var newGroupId, newId;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addGroupSubidea', source);\n    if (isInputEnabled) {\n      idea.batch(function () {\n        newGroupId = addSubIdeaToTargetNode(source, target, 'group');\n        if (newGroupId) {\n          idea.updateAttr(newGroupId, 'contentLocked', true);\n          idea.updateAttr(newGroupId, 'group', group);\n          newId = idea.addSubIdea(newGroupId);\n        }\n      });\n      if (newId) {\n        editNewIdea(newId);\n      }\n    }\n  };\n  this.insertIntermediateGroup = function (source, options) {\n    var activeNodes = [],\n      group = options && options.group || true;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (!isInputEnabled || idea.isRootNode(currentlySelectedIdeaId)) {\n      return false;\n    }\n    analytic('insertIntermediate', source);\n    self.applyToActivated(function (i) {\n      activeNodes.push(i);\n    });\n    idea.insertIntermediateMultiple(activeNodes, {\n      title: 'group',\n      attr: {\n        group: group,\n        contentLocked: true\n      }\n    });\n  };\n  this.insertIntermediate = function (source) {\n    var activeNodes = [];\n    var newId = false;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (!isInputEnabled) {\n      return false;\n    }\n    analytic('insertIntermediate', source);\n    self.applyToActivated(function (i) {\n      activeNodes.push(i);\n    });\n    newId = idea.insertIntermediateMultiple(activeNodes);\n    if (newId) {\n      editNewIdea(newId);\n    }\n  };\n  this.flip = function (source) {\n    var node = layoutModel.getNode(currentlySelectedIdeaId);\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('flip', source);\n    if (!isInputEnabled || idea.isRootNode(currentlySelectedIdeaId)) {\n      return false;\n    }\n    if (!node || node.level !== 2) {\n      return false;\n    }\n    return idea.flip(currentlySelectedIdeaId);\n  };\n  this.addSiblingIdeaBefore = function (source) {\n    var newId, parent, contextRank, newRank;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addSiblingIdeaBefore', source);\n    if (!isInputEnabled) {\n      return false;\n    }\n    if (idea.isRootNode(currentlySelectedIdeaId)) {\n      parent = idea;\n    } else {\n      parent = idea.findParent(currentlySelectedIdeaId);\n    }\n    idea.batch(function () {\n      if (parent !== idea) {\n        ensureNodeIsExpanded(source, parent.id);\n      }\n      newId = idea.addSubIdea(parent.id);\n      if (newId) {\n        contextRank = parent.findChildRankById(currentlySelectedIdeaId);\n        newRank = parent.findChildRankById(newId);\n        if (contextRank * newRank < 0) {\n          idea.flip(newId);\n        }\n        idea.positionBefore(newId, currentlySelectedIdeaId);\n      }\n    });\n    if (newId) {\n      editNewIdea(newId);\n    }\n  };\n  this.addSiblingIdea = function (source, optionalNodeId, optionalInitialText) {\n    var newId, nextId, parent, contextRank, newRank;\n    var currentId = optionalNodeId || currentlySelectedIdeaId;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addSiblingIdea', source);\n    if (isInputEnabled) {\n      if (idea.isRootNode(currentId)) {\n        parent = idea;\n      } else {\n        parent = idea.findParent(currentId);\n      }\n      idea.batch(function () {\n        if (parent !== idea) {\n          ensureNodeIsExpanded(source, parent.id);\n        }\n        if (optionalInitialText) {\n          newId = idea.addSubIdea(parent.id, optionalInitialText);\n        } else {\n          newId = idea.addSubIdea(parent.id);\n        }\n        if (newId) {\n          nextId = idea.nextSiblingId(currentId);\n          contextRank = parent.findChildRankById(currentId);\n          newRank = parent.findChildRankById(newId);\n          if (contextRank * newRank < 0) {\n            idea.flip(newId);\n          }\n          if (nextId) {\n            idea.positionBefore(newId, nextId);\n          }\n        }\n      });\n      if (newId) {\n        if (optionalInitialText) {\n          selectNewIdea(newId);\n        } else {\n          editNewIdea(newId);\n        }\n      }\n    }\n  };\n  this.removeSubIdea = function (source) {\n    var removed;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('removeSubIdea', source);\n    if (isInputEnabled) {\n      self.applyToActivated(function (id) {\n        removed = idea.removeSubIdea(id);\n      });\n    }\n    return removed;\n  };\n  this.updateTitle = function (ideaId, title, isNew) {\n    if (isNew) {\n      idea.initialiseTitle(ideaId, title);\n    } else {\n      idea.updateTitle(ideaId, title);\n    }\n  };\n  this.editNode = function (source, shouldSelectAll, editingNew) {\n    var currentIdea = currentlySelectedIdea(),\n      title = currentIdea.title;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (source) {\n      analytic('editNode', source);\n    }\n    if (!isInputEnabled) {\n      return false;\n    }\n    if (currentIdea.attr && currentIdea.attr.contentLocked) {\n      return false;\n    }\n    if (_.include(selectAllTitles, title)) {\n      // === 'Press Space or double-click to edit') {\n      shouldSelectAll = true;\n    }\n    self.dispatchEvent('nodeEditRequested', currentlySelectedIdeaId, shouldSelectAll, !!editingNew);\n  };\n  this.editIcon = function (source) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (source) {\n      analytic('editIcon', source);\n    }\n    if (!isInputEnabled) {\n      return false;\n    }\n    self.dispatchEvent('nodeIconEditRequested', currentlySelectedIdeaId);\n  };\n  this.scaleUp = function (source) {\n    self.scale(source, 1.25);\n  };\n  this.scaleDown = function (source) {\n    self.scale(source, 0.8);\n  };\n  this.scale = function (source, scaleMultiplier, zoomPoint) {\n    if (isInputEnabled) {\n      self.dispatchEvent('mapScaleChanged', scaleMultiplier, zoomPoint);\n      analytic(scaleMultiplier < 1 ? 'scaleDown' : 'scaleUp', source);\n    }\n  };\n  this.move = function (source, deltaX, deltaY) {\n    if (isInputEnabled) {\n      self.dispatchEvent('mapMoveRequested', deltaX, deltaY);\n      analytic('move', source);\n    }\n  };\n  this.resetView = function (source) {\n    var selectedNode = layoutModel.getNode(currentlySelectedIdeaId),\n      localRoot = selectedNode && selectedNode.rootId || idea && idea.getDefaultRootId();\n    if (!localRoot) {\n      return;\n    }\n    if (isInputEnabled) {\n      self.selectNode(localRoot);\n      self.dispatchEvent('mapViewResetRequested');\n      analytic('resetView', source);\n    }\n  };\n  this.decorationAction = function (source, nodeId, decorationType) {\n    analytic('decorationAction', source);\n    self.dispatchEvent('decorationActionRequested', nodeId, decorationType);\n  };\n  this.openAttachment = function (source, nodeId) {\n    analytic('openAttachment', source);\n    nodeId = nodeId || currentlySelectedIdeaId;\n    var node = layoutModel.getNode(nodeId),\n      attachment = node && node.attr && node.attr.attachment;\n    if (node) {\n      self.dispatchEvent('attachmentOpened', nodeId, attachment);\n    }\n  };\n  this.setAttachment = function (source, nodeId, attachment) {\n    var hasAttachment = !!(attachment && attachment.content);\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('setAttachment', source);\n    idea.updateAttr(nodeId, 'attachment', hasAttachment && attachment);\n  };\n  this.toggleLink = function (source, nodeIdTo) {\n    var exists = _.find(idea.links, function (link) {\n      return String(link.ideaIdFrom) === String(nodeIdTo) && String(link.ideaIdTo) === String(currentlySelectedIdeaId) || String(link.ideaIdTo) === String(nodeIdTo) && String(link.ideaIdFrom) === String(currentlySelectedIdeaId);\n    });\n    if (exists) {\n      self.removeLink(source, exists.ideaIdFrom, exists.ideaIdTo);\n    } else {\n      self.addLink(source, nodeIdTo);\n    }\n  };\n  this.addLink = function (source, nodeIdTo) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addLink', source);\n    idea.addLink(currentlySelectedIdeaId, nodeIdTo);\n  };\n  this.selectLink = function (source, link, selectionPoint) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('selectLink', source);\n    if (!link) {\n      return false;\n    }\n    self.dispatchEvent('linkSelected', link, selectionPoint, idea.getLinkAttr(link.ideaIdFrom, link.ideaIdTo, 'style'));\n    // alert(\"link\");\n  };\n  this.removeLink = function (source, nodeIdFrom, nodeIdTo) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('removeLink', source);\n    idea.removeLink(nodeIdFrom, nodeIdTo);\n  };\n  this.toggleAddLinkMode = function (source) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (!isInputEnabled) {\n      return false;\n    }\n    analytic('toggleAddLinkMode', source);\n    isAddLinkMode = !isAddLinkMode;\n    self.dispatchEvent('addLinkModeToggled', isAddLinkMode);\n  };\n  this.cancelCurrentAction = function (source) {\n    if (!isInputEnabled) {\n      return false;\n    }\n    if (!isEditingEnabled) {\n      return false;\n    }\n    if (isAddLinkMode) {\n      this.toggleAddLinkMode(source);\n    }\n  };\n  self.undo = function (source) {\n    var undoSelectionClone = revertSelectionForUndo,\n      undoActivationClone = revertActivatedForUndo;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('undo', source);\n    if (isInputEnabled) {\n      idea.undo();\n      if (undoSelectionClone) {\n        self.selectNode(undoSelectionClone);\n      }\n      if (undoActivationClone) {\n        setActiveNodes(undoActivationClone);\n      }\n    }\n  };\n  self.redo = function (source) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('redo', source);\n    if (isInputEnabled) {\n      idea.redo();\n    }\n  };\n  self.moveRelative = function (source, relativeMovement) {\n    var options;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('moveRelative', source);\n    if (isInputEnabled) {\n      if (layoutModel.getOrientation() === 'top-down') {\n        options = {\n          ignoreRankSide: true\n        };\n      }\n      idea.moveRelative(currentlySelectedIdeaId, relativeMovement, options);\n    }\n  };\n  self.cut = function (source) {\n    var activeNodeIds = [],\n      parents = [];\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('cut', source);\n    if (isInputEnabled) {\n      self.applyToActivated(function (nodeId) {\n        activeNodeIds.push(nodeId);\n        parents.push(idea.findParent(nodeId).id);\n      });\n      clipboard.put(idea.cloneMultiple(activeNodeIds));\n      idea.removeMultiple(activeNodeIds);\n    }\n  };\n  self.contextForNode = function (nodeId) {\n    var node = self.findIdeaById(nodeId),\n      hasChildren = node && node.ideas && _.size(node.ideas) > 0,\n      rootCount = _.size(idea.ideas),\n      hasSiblings = idea.hasSiblings(nodeId),\n      hasPreferredWidth = node && node.attr && node.attr.style && node.attr.style.width,\n      isCollapsed = node && node.getAttr('collapsed'),\n      canPaste = node && isEditingEnabled && clipboard && clipboard.get(),\n      isRoot = idea.isRootNode(nodeId);\n    if (node) {\n      return {\n        hasChildren: !!hasChildren,\n        hasSiblings: !!hasSiblings,\n        hasPreferredWidth: !!hasPreferredWidth,\n        canPaste: !!canPaste,\n        notRoot: !isRoot,\n        notLastRoot: !isRoot || rootCount > 1,\n        canUndo: idea.canUndo(),\n        canRedo: idea.canRedo(),\n        canCollapse: hasChildren && !isCollapsed,\n        canExpand: hasChildren && isCollapsed\n      };\n    }\n  };\n  self.copy = function (source) {\n    var activeNodeIds = [];\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('copy', source);\n    if (isInputEnabled) {\n      self.applyToActivated(function (node) {\n        activeNodeIds.push(node);\n      });\n      clipboard.put(idea.cloneMultiple(activeNodeIds));\n    }\n  };\n  self.paste = function (source) {\n    var result;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('paste', source);\n    if (isInputEnabled) {\n      result = idea.pasteMultiple(currentlySelectedIdeaId, clipboard.get());\n      if (result && result[0]) {\n        self.selectNode(result[0]);\n      }\n    }\n    return result;\n  };\n  self.pasteStyle = function (source) {\n    var clipContents = clipboard.get();\n    var pastingStyle;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('pasteStyle', source);\n    if (isInputEnabled && clipContents && clipContents[0]) {\n      pastingStyle = clipContents[0].attr && clipContents[0].attr.style;\n      self.applyToActivated(function (id) {\n        idea.updateAttr(id, 'style', pastingStyle);\n      });\n    }\n  };\n  self.getIcon = function (nodeId) {\n    var node = layoutModel.getNode(nodeId || currentlySelectedIdeaId);\n    if (!node) {\n      return false;\n    }\n    return node.attr && node.attr.icon;\n  };\n  self.setIcon = function (source, url, imgWidth, imgHeight, position, nodeId, metaData) {\n    var nodeIdea = false,\n      iconObject;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('setIcon', source);\n    nodeId = nodeId || currentlySelectedIdeaId;\n    nodeIdea = self.findIdeaById(nodeId);\n    if (!nodeIdea) {\n      return false;\n    }\n    if (url) {\n      iconObject = {\n        url: url,\n        width: imgWidth,\n        height: imgHeight,\n        position: position\n      };\n      if (metaData) {\n        iconObject.metaData = metaData;\n      }\n      idea.updateAttr(nodeId, 'icon', iconObject);\n    } else {\n      idea.updateAttr(nodeId, 'icon', false);\n      if (!nodeIdea.title && _.size(nodeIdea.ideas) === 0) {\n        idea.removeSubIdea(nodeId);\n      }\n    }\n  };\n  self.insertUp = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.addSiblingIdeaBefore(source);\n    } else {\n      self.insertIntermediate(source);\n    }\n  };\n  self.insertDown = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.addSiblingIdea(source);\n    } else {\n      self.addSubIdea(source);\n    }\n  };\n  self.insertLeft = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.insertIntermediate(source);\n    } else {\n      self.addSiblingIdeaBefore(source);\n    }\n  };\n  self.insertRight = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.addSubIdea(source);\n    } else {\n      self.addSiblingIdea(source);\n    }\n  };\n  self.moveUp = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.moveRelative(source, -1);\n    }\n  };\n  self.moveDown = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.moveRelative(source, 1);\n    }\n  };\n  self.moveLeft = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.flip(source);\n    } else {\n      self.moveRelative(source, -1);\n    }\n  };\n  self.moveRight = function (source) {\n    if (layoutModel.getOrientation() === 'standard') {\n      self.flip(source);\n    } else {\n      self.moveRelative(source, 1);\n    }\n  };\n  self.getSelectedNodeId = function () {\n    return getCurrentlySelectedIdeaId();\n  };\n  self.centerOnNode = function (nodeId) {\n    if (!layoutModel.getNode(nodeId)) {\n      idea.startBatch();\n      _.each(idea.calculatePath(nodeId), function (parent) {\n        idea.updateAttr(parent.id, 'collapsed', false);\n      });\n      idea.endBatch();\n    }\n    self.dispatchEvent('nodeFocusRequested', nodeId);\n    self.selectNode(nodeId);\n  };\n  self.search = function (query) {\n    var result = [];\n    query = query.toLocaleLowerCase();\n    idea.traverse(function (contentIdea) {\n      if (contentIdea.title && contentIdea.title.toLocaleLowerCase().indexOf(query) >= 0) {\n        result.push({\n          id: contentIdea.id,\n          title: contentIdea.title\n        });\n      }\n    });\n    return result;\n  };\n  //node activation and selection\n  (function () {\n    var applyToNodeDirection = function applyToNodeDirection(source, analyticTag, method, direction) {\n        if (!isInputEnabled) {\n          return;\n        }\n        analytic(analyticTag, source);\n        var relId = layoutModel['nodeId' + direction](currentlySelectedIdeaId);\n        if (relId) {\n          method.apply(self, [relId]);\n        }\n      },\n      applyFuncs = {};\n    ['Left', 'Right', 'Up', 'Down'].forEach(function (direction) {\n      applyFuncs[direction] = function (source, analyticTag, method) {\n        applyToNodeDirection(source, analyticTag, method, direction);\n      };\n    });\n    self.getActivatedNodeIds = function () {\n      return activatedNodes.slice(0);\n    };\n    self.activateSiblingNodes = function (source) {\n      var parent = idea.findParent(currentlySelectedIdeaId),\n        siblingIds = parent && parent.ideas && _.map(parent.ideas, function (child) {\n          return child.id;\n        });\n      analytic('activateSiblingNodes', source);\n      if (!siblingIds) {\n        return;\n      }\n      setActiveNodes(siblingIds);\n    };\n    self.activateNodeAndChildren = function (source) {\n      var contextId = getCurrentlySelectedIdeaId(),\n        subtree = idea.getSubTreeIds(contextId);\n      analytic('activateNodeAndChildren', source);\n      subtree.push(contextId);\n      setActiveNodes(subtree);\n    };\n    _.each(['Left', 'Right', 'Up', 'Down'], function (position) {\n      self['activateNode' + position] = function (source) {\n        applyFuncs[position](source, 'activateNode' + position, function (nodeId) {\n          self.selectNode(nodeId, false, true);\n        });\n      };\n      self['selectNode' + position] = function (source) {\n        applyFuncs[position](source, 'selectNode' + position, self.selectNode);\n      };\n    });\n    self.toggleActivationOnNode = function (source, nodeId) {\n      analytic('toggleActivated', source);\n      if (!self.isActivated(nodeId)) {\n        setActiveNodes([nodeId].concat(activatedNodes));\n      } else {\n        setActiveNodes(_.without(activatedNodes, nodeId));\n      }\n    };\n    self.activateNode = function (source, nodeId) {\n      analytic('activateNode', source);\n      if (!self.isActivated(nodeId)) {\n        activatedNodes.push(nodeId);\n        self.dispatchEvent('activatedNodesChanged', [nodeId], []);\n      }\n    };\n    self.activateChildren = function (source) {\n      var context = currentlySelectedIdea();\n      analytic('activateChildren', source);\n      if (!context || _.isEmpty(context.ideas) || context.getAttr('collapsed')) {\n        return;\n      }\n      setActiveNodes(idea.getSubTreeIds(context.id));\n    };\n    self.activateSelectedNode = function (source) {\n      analytic('activateSelectedNode', source);\n      setActiveNodes([getCurrentlySelectedIdeaId()]);\n    };\n    self.isActivated = function (id) {\n      return _.find(activatedNodes, function (activeId) {\n        return id == activeId; //eslint-disable-line eqeqeq\n      });\n    };\n    self.applyToActivated = function (toApply) {\n      idea.batch(function () {\n        _.each(activatedNodes, toApply);\n      });\n    };\n    self.everyActivatedIs = function (predicate) {\n      return _.every(activatedNodes, predicate);\n    };\n    self.activateLevel = function (source, level) {\n      var toActivate = _.map(_.filter(layoutModel.getLayout().nodes, function (node) {\n        return node.level == level; //eslint-disable-line eqeqeq\n      }), function (node) {\n        return node.id;\n      });\n      analytic('activateLevel', source);\n      if (!_.isEmpty(toActivate)) {\n        setActiveNodes(toActivate);\n      }\n    };\n    self.reactivate = function (layout) {\n      _.each(layout.nodes, function (node) {\n        if (_.contains(activatedNodes, node.id)) {\n          node.activated = true;\n        }\n      });\n      return layout;\n    };\n  })();\n  self.getNodeIdAtPosition = function (x, y) {\n    var isPointOverNode = function isPointOverNode(node) {\n        //move to mapModel candidate\n        /*jslint eqeq: true*/\n        return x >= node.x && y >= node.y && x <= node.x + node.width && y <= node.y + node.height;\n      },\n      node = _.find(layoutModel.getLayout().nodes, isPointOverNode);\n    return node && node.id;\n  };\n  self.autoPosition = function (nodeId) {\n    return idea.updateAttr(nodeId, 'position', false);\n  };\n  self.standardPositionNodeAt = function (nodeId, x, y, manualPosition) {\n    var result = false;\n    var rootNode = layoutModel.getNode(layoutModel.getNode(nodeId).rootId),\n      getVerticallyClosestNode = function getVerticallyClosestNode() {\n        var verticallyClosestNode = {\n          id: null,\n          y: Infinity\n        };\n        _.each(idea.sameSideSiblingIds(nodeId), function (id) {\n          var node = layoutModel.getNode(id);\n          if (y < node.y && node.y < verticallyClosestNode.y) {\n            verticallyClosestNode = node;\n          }\n        });\n        return verticallyClosestNode;\n      },\n      parentIdea = idea.findParent(nodeId),\n      parentNode = layoutModel.getNode(parentIdea.id),\n      thisNode = layoutModel.getNode(nodeId),\n      nodeBeingDragged = layoutModel.getNode(nodeId),\n      tryFlip = function tryFlip(rootNode, nodeBeingDragged, nodeDragEndX) {\n        var flipRightToLeft = rootNode.x < nodeBeingDragged.x && nodeDragEndX < rootNode.x,\n          flipLeftToRight = rootNode.x > nodeBeingDragged.x && rootNode.x < nodeDragEndX;\n        if (flipRightToLeft || flipLeftToRight) {\n          return idea.flip(nodeId);\n        }\n        return false;\n      },\n      validReposition = function validReposition() {\n        return nodeBeingDragged.level <= 2 || (nodeBeingDragged.x - parentNode.x) * (x - parentNode.x) > 0;\n      },\n      getMaxSequence = function getMaxSequence() {\n        if (_.isEmpty(parentIdea.ideas)) {\n          return 0;\n        }\n        return _.max(_.map(parentIdea.ideas, function (i) {\n          return i.id !== nodeId && i.attr && i.attr.position && i.attr.position[2] || 0;\n        })) || 0;\n      },\n      manuallyPositionSubNode = function manuallyPositionSubNode() {\n        var xOffset;\n        if (x < parentNode.x) {\n          xOffset = parentNode.x - x - nodeBeingDragged.width + parentNode.width; /* negative nodes will get flipped so distance is not correct out of the box */\n        } else {\n          xOffset = x - parentNode.x;\n        }\n        analytic('nodeManuallyPositioned');\n        return idea.updateAttr(nodeId, 'position', [xOffset, y - parentNode.y, getMaxSequence() + 1]);\n      },\n      manuallyPositionRootNode = function manuallyPositionRootNode() {\n        return idea.updateAttr(nodeId, 'position', [x, y, getMaxSequence() + 1]);\n      };\n    idea.startBatch();\n    if (thisNode && thisNode.level === 2) {\n      result = tryFlip(rootNode, nodeBeingDragged, x);\n    }\n    if (!manualPosition && validReposition()) {\n      self.autoPosition(nodeId);\n    }\n    if (nodeBeingDragged.level > 1) {\n      result = idea.positionBefore(nodeId, getVerticallyClosestNode().id) || result;\n    }\n    if (manualPosition && validReposition()) {\n      if (nodeBeingDragged.level === 1) {\n        result = manuallyPositionRootNode();\n      } else {\n        result = manuallyPositionSubNode() || result;\n      }\n    }\n    idea.endBatch();\n    return result;\n  };\n  self.topDownPositionNodeAt = function (nodeId, x, y, manualPosition) {\n    var result, closestNodeToRight, closestNodeToLeft;\n    var parentNode = idea.findParent(nodeId),\n      nodeBeingDragged = layoutModel.getNode(nodeId),\n      isRoot = function isRoot() {\n        return nodeBeingDragged.level < 2;\n      },\n      manuallyPositionRootNode = function manuallyPositionRootNode() {\n        return idea.updateAttr(nodeId, 'position', [x, y, 1]);\n      };\n    if (manualPosition) {\n      if (isRoot()) {\n        return manuallyPositionRootNode();\n      } else {\n        return idea.batch(function () {\n          idea.changeParent(nodeId, 'root');\n          return manuallyPositionRootNode();\n        });\n      }\n    }\n    if (!parentNode) {\n      return false;\n    }\n    _.each(parentNode.ideas, function (sibling) {\n      var node = layoutModel.getNode(sibling.id);\n      if (sibling.id === nodeId) {\n        return;\n      }\n      if (x < node.x && (!closestNodeToRight || Math.abs(x - node.x) < Math.abs(x - layoutModel.getNode(closestNodeToRight.id).x))) {\n        closestNodeToRight = sibling;\n      }\n      if (x > node.x + node.width && (!closestNodeToLeft || Math.abs(x - node.x) < Math.abs(x - layoutModel.getNode(closestNodeToLeft.id).x))) {\n        closestNodeToLeft = sibling;\n      }\n    });\n    idea.batch(function () {\n      var useLeftNode = !!(closestNodeToRight && closestNodeToRight.id && idea.findChildRankById(closestNodeToRight.id) < 0),\n        closestNode = useLeftNode ? closestNodeToLeft : closestNodeToRight,\n        shouldFlip = useLeftNode && idea.findChildRankById(nodeId) > 0;\n      self.autoPosition(nodeId);\n      if (shouldFlip) {\n        idea.flip(nodeId);\n      }\n      result = idea.positionBefore(nodeId, closestNode && closestNode.id);\n    });\n    return result;\n  };\n  self.positionNodeAt = function (nodeId, x, y, manualPosition) {\n    if (layoutModel.getOrientation() === 'standard') {\n      return self.standardPositionNodeAt(nodeId, x, y, manualPosition);\n    } else {\n      return self.topDownPositionNodeAt(nodeId, x, y, manualPosition);\n    }\n  };\n  self.dropNode = function (nodeId, dropTargetId, shiftKey) {\n    var clone;\n    var parentIdea = idea.findParent(nodeId);\n    if (dropTargetId === nodeId) {\n      return false;\n    }\n    if (shiftKey) {\n      clone = idea.clone(nodeId);\n      if (clone) {\n        idea.paste(dropTargetId, clone);\n      }\n      return false;\n    }\n    if (dropTargetId === parentIdea.id) {\n      return self.autoPosition(nodeId);\n    } else {\n      return idea.changeParent(nodeId, dropTargetId);\n    }\n  };\n  self.setLayoutCalculator = function (newCalculator) {\n    layoutCalculator = newCalculator;\n  };\n  self.dropImage = function (dataUrl, imgWidth, imgHeight, x, y, metaData) {\n    var dropOn = function dropOn(ideaId, position) {\n        var scaleX = Math.min(imgWidth, 300) / imgWidth,\n          scaleY = Math.min(imgHeight, 300) / imgHeight,\n          scale = Math.min(scaleX, scaleY),\n          existing = idea.getAttrById(ideaId, 'icon');\n        self.setIcon('drag and drop', dataUrl, Math.round(imgWidth * scale), Math.round(imgHeight * scale), existing && existing.position || position, ideaId, metaData);\n      },\n      addNew = function addNew() {\n        idea.startBatch();\n        var newId = idea.addSubIdea(currentlySelectedIdeaId);\n        dropOn(newId, 'center');\n        idea.endBatch();\n        self.selectNode(newId);\n      },\n      nodeId = self.getNodeIdAtPosition(x, y);\n    if (nodeId) {\n      return dropOn(nodeId, 'left');\n    }\n    addNew();\n  };\n  self.setLabelGenerator = function (labelGenerator, labelGeneratorName) {\n    currentLabelGenerator = labelGenerator;\n    self.dispatchEvent('labelGeneratorChange', labelGeneratorName, !!labelGenerator);\n    self.rebuildRequired();\n  };\n  self.getStandardReorderBoundary = function (nodeId) {\n    var node = layoutModel.getNode(nodeId),\n      nonRootStandardReorderBoundary = function nonRootStandardReorderBoundary(nodeId) {\n        var opposite;\n        var boundaries = [],\n          node = layoutModel.getNode(nodeId),\n          rootNode = layoutModel.getNode(node && node.rootId),\n          isRightHalf = function isRightHalf(node, rootNode) {\n            return node && rootNode && node.x >= rootNode.x;\n          },\n          parentIdea = idea.findParent(nodeId),\n          parentNode = layoutModel.getNode(parentIdea.id),\n          primaryEdge = isRightHalf(node, rootNode) ? 'left' : 'right',\n          secondaryEdge = isRightHalf(node, rootNode) ? 'right' : 'left',\n          siblingBoundary = function siblingBoundary(siblings, side) {\n            var tops = _.map(siblings, function (node) {\n                return node.y;\n              }),\n              bottoms = _.map(siblings, function (node) {\n                return node.y + node.height;\n              }),\n              result = {\n                'minY': _.min(tops) - reorderMargin - node.height,\n                'maxY': _.max(bottoms) + reorderMargin,\n                'margin': reorderMargin\n              };\n            result.edge = side;\n            if (side === 'left') {\n              result.x = parentNode.x + parentNode.width + reorderMargin;\n            } else {\n              result.x = parentNode.x - reorderMargin;\n            }\n            return result;\n          },\n          parentBoundary = function parentBoundary(side) {\n            var result = {\n              'minY': parentNode.y - reorderMargin - node.height,\n              'maxY': parentNode.y + parentNode.height + reorderMargin,\n              'margin': reorderMargin\n            };\n            result.edge = side;\n            if (side === 'left') {\n              result.x = parentNode.x + parentNode.width + reorderMargin;\n            } else {\n              result.x = parentNode.x - reorderMargin;\n            }\n            return result;\n          },\n          sameSide = _.map(idea.sameSideSiblingIds(nodeId), function (id) {\n            return layoutModel.getNode(id);\n          }),\n          otherSideSiblings = function otherSideSiblings() {\n            var otherSide = _.map(parentIdea.ideas, function (subIdea) {\n              return layoutModel.getNode(subIdea.id);\n            });\n            otherSide = _.without(otherSide, node);\n            if (!_.isEmpty(sameSide)) {\n              otherSide = _.difference(otherSide, sameSide);\n            }\n            return otherSide;\n          };\n        if (!_.isEmpty(sameSide)) {\n          boundaries.push(siblingBoundary(sameSide, primaryEdge));\n        }\n        boundaries.push(parentBoundary(primaryEdge));\n        if (node.level === 2) {\n          opposite = otherSideSiblings();\n          if (!_.isEmpty(opposite)) {\n            boundaries.push(siblingBoundary(opposite, secondaryEdge));\n          }\n          boundaries.push(parentBoundary(secondaryEdge));\n        }\n        return boundaries;\n      };\n    if (node.level === 1) {\n      return false;\n    }\n    return nonRootStandardReorderBoundary(nodeId);\n  };\n  self.getTopDownReorderBoundary = function (nodeId) {\n    var node = layoutModel.getNode(nodeId),\n      parentNode = idea.findParent(nodeId),\n      tolerance = 10;\n    var minX = Infinity,\n      maxX = -Infinity,\n      maxY = -Infinity,\n      hasSiblings = false;\n    if (!parentNode) {\n      return [];\n    }\n    _.each(parentNode.ideas, function (subIdea) {\n      var siblingNode = layoutModel.getNode(subIdea.id);\n      if (siblingNode && subIdea.id !== nodeId) {\n        hasSiblings = true;\n        minX = Math.min(siblingNode.x, minX);\n        maxX = Math.max(siblingNode.x + siblingNode.width, maxX);\n        maxY = Math.max(siblingNode.y + siblingNode.height, maxY);\n      }\n    });\n    if (!hasSiblings) {\n      return [];\n    }\n    return [{\n      minY: node.y - node.height - tolerance,\n      maxY: maxY + tolerance,\n      minX: minX - node.width - tolerance,\n      maxX: maxX + tolerance,\n      edge: 'top'\n    }];\n  };\n  self.getReorderBoundary = function (nodeId) {\n    if (layoutModel.getOrientation() === 'standard') {\n      return self.getStandardReorderBoundary(nodeId);\n    } else {\n      return self.getTopDownReorderBoundary(nodeId);\n    }\n  };\n  self.focusAndSelect = function (nodeId) {\n    self.selectNode(nodeId);\n    self.dispatchEvent('nodeFocusRequested', nodeId);\n  };\n  self.requestContextMenu = function (eventPointX, eventPointY) {\n    if (isInputEnabled && isEditingEnabled) {\n      self.dispatchEvent('contextMenuRequested', currentlySelectedIdeaId, eventPointX, eventPointY);\n      return true;\n    }\n    return false;\n  };\n  self.setTheme = function (themeId) {\n    if (!isEditingEnabled) {\n      return false;\n    }\n    idea.updateAttr(idea.id, 'theme', themeId);\n  };\n  self.makeSelectedNodeRoot = function () {\n    var nodeId = self.getSelectedNodeId(),\n      node = nodeId && layoutModel.getNode(nodeId),\n      oldRootId = node && node.rootId;\n    if (!nodeId || idea.isRootNode(nodeId)) {\n      return false;\n    }\n    if (isInputEnabled && isEditingEnabled) {\n      return idea.batch(function () {\n        var result = idea.changeParent(nodeId, 'root');\n        if (layoutModel.getOrientation() === 'top-down') {\n          if (!idea.getAttrById(oldRootId, 'position')) {\n            setNodePositionFromCurrentLayout(oldRootId);\n          }\n          setNodePositionFromCurrentLayout(nodeId);\n        }\n        return result;\n      });\n    }\n  };\n  self.setNodeWidth = function (source, id, width) {\n    idea.mergeAttrProperty(id, 'style', 'width', width);\n  };\n  self.unsetSelectedNodeWidth = function () {\n    var id = self.getSelectedNodeId();\n    idea.mergeAttrProperty(id, 'style', 'width', false);\n  };\n  self.insertRoot = function (source, initialTitle) {\n    var newId;\n    if (!isEditingEnabled) {\n      return false;\n    }\n    analytic('addRootNode', source);\n    if (isInputEnabled) {\n      if (initialTitle) {\n        newId = idea.addSubIdea(idea.id, initialTitle);\n      } else {\n        newId = idea.addSubIdea(idea.id);\n      }\n      if (newId) {\n        if (initialTitle) {\n          selectNewIdea(newId);\n        } else {\n          editNewIdea(newId);\n        }\n      }\n    }\n  };\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-model.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-toolbar-widget.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-toolbar-widget.js ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require */\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\njQuery.fn.mapToolbarWidget = function (mapModel) {\n  'use strict';\n\n  var clickMethodNames = ['insertIntermediate', 'scaleUp', 'scaleDown', 'addSubIdea', 'editNode', 'removeSubIdea', 'toggleCollapse', 'addSiblingIdea', 'undo', 'redo', 'copy', 'cut', 'paste', 'resetView', 'openAttachment', 'toggleAddLinkMode', 'activateChildren', 'activateNodeAndChildren', 'activateSiblingNodes', 'editIcon', 'insertRoot', 'makeSelectedNodeRoot'],\n    changeMethodNames = ['updateStyle'];\n  return this.each(function () {\n    var element = jQuery(this);\n    var preventRoundtrip = false;\n    mapModel.addEventListener('nodeSelectionChanged', function () {\n      preventRoundtrip = true;\n      element.find('.updateStyle[data-mm-target-property]').val(function () {\n        return mapModel.getSelectedStyle(jQuery(this).data('mm-target-property'));\n      }).change();\n      preventRoundtrip = false;\n    });\n    mapModel.addEventListener('addLinkModeToggled', function () {\n      element.find('.toggleAddLinkMode').toggleClass('active');\n    });\n    clickMethodNames.forEach(function (methodName) {\n      element.find('.' + methodName).click(function () {\n        if (mapModel[methodName]) {\n          mapModel[methodName]('toolbar');\n        }\n      });\n    });\n    changeMethodNames.forEach(function (methodName) {\n      element.find('.' + methodName).change(function () {\n        if (preventRoundtrip) {\n          return;\n        }\n        var tool = jQuery(this);\n        if (tool.data('mm-target-property')) {\n          mapModel[methodName]('toolbar', tool.data('mm-target-property'), tool.val());\n        }\n      });\n    });\n  });\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-toolbar-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/node-resize-widget.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/node-resize-widget.js ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require*/\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n__webpack_require__(/*! ./hammer-draggable */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/hammer-draggable.js\");\njQuery.fn.nodeResizeWidget = function (nodeId, mapModel, stagePositionForPointEvent) {\n  'use strict';\n\n  return this.each(function () {\n    var initialPosition, initialWidth, initialStyle;\n    var element = jQuery(this),\n      minAllowedWidth = 50,\n      nodeTextElement = element.find('span[data-mapjs-role=title]'),\n      nodeTextDOM = nodeTextElement[0],\n      calcDragWidth = function calcDragWidth(evt) {\n        var pos = stagePositionForPointEvent(evt),\n          dx = pos && initialPosition && pos.x - initialPosition.x,\n          dragWidth = dx && Math.max(minAllowedWidth, initialWidth + dx);\n        return dragWidth;\n      },\n      dragHandle = jQuery('<div>').addClass('resize-node').shadowDraggable().on('mm:start-dragging mm:start-dragging-shadow', function (evt) {\n        mapModel.selectNode(nodeId);\n        initialPosition = stagePositionForPointEvent(evt);\n        initialWidth = nodeTextElement.innerWidth();\n        initialStyle = {\n          'node.min-width': element.css('min-width'),\n          'span.min-width': nodeTextElement.css('min-width'),\n          'span.max-width': nodeTextElement.css('max-width')\n        };\n      }).on('mm:stop-dragging mm:cancel-dragging', function (evt) {\n        var dragWidth = nodeTextElement.outerWidth();\n        nodeTextElement.css({\n          'max-width': initialStyle['span.max-width'],\n          'min-width': initialStyle['span.min-width']\n        });\n        element.css('min-width', initialStyle['node.min-width']);\n        if (evt) {\n          evt.stopPropagation();\n        }\n        if (evt && evt.gesture) {\n          evt.gesture.stopPropagation();\n        }\n        element.trigger(jQuery.Event('mm:resize', {\n          nodeWidth: dragWidth\n        }));\n      }).on('mm:drag', function (evt) {\n        var dragWidth = calcDragWidth(evt);\n        if (dragWidth) {\n          nodeTextElement.css({\n            'max-width': dragWidth,\n            'min-width': dragWidth\n          });\n          element.css('min-width', nodeTextElement.outerWidth());\n          if (nodeTextDOM.scrollWidth > nodeTextDOM.offsetWidth) {\n            dragWidth = nodeTextDOM.scrollWidth;\n            nodeTextElement.css({\n              'max-width': dragWidth,\n              'min-width': dragWidth\n            });\n            element.css('min-width', nodeTextElement.outerWidth());\n          }\n        }\n        if (evt) {\n          evt.stopPropagation();\n        }\n        if (evt && evt.gesture) {\n          evt.gesture.stopPropagation();\n        }\n      });\n    dragHandle.appendTo(element);\n  });\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/node-resize-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/npm-main.js":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/npm-main.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global module, require */\n\n__webpack_require__(/*! ./theme-css-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/theme-css-widget.js\");\n__webpack_require__(/*! ./dom-map-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-map-widget.js\");\n__webpack_require__(/*! ./map-toolbar-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-toolbar-widget.js\");\n__webpack_require__(/*! ./link-edit-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/link-edit-widget.js\");\n__webpack_require__(/*! ./image-drop-widget */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-drop-widget.js\");\n// require('mindmup-mapjs-layout');\n\nmodule.exports = {\n  MemoryClipboard: __webpack_require__(/*! ./clipboard */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/clipboard.js\"),\n  MapModel: __webpack_require__(/*! ./map-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/map-model.js\"),\n  ImageInsertController: __webpack_require__(/*! ./image-insert-controller */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/image-insert-controller.js\"),\n  DOMRender: __webpack_require__(/*! ./dom-render */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js\"),\n  version: 2\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/npm-main.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/render-structure.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/render-structure.js ***!
  \*****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var dom7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7 */ \"./node_modules/dom7/dist/dom7.module.js\");\n\nvar tooltip = '<div id=\"linkEditWidget\" class=\"mindmap-context\" style=\"display: none\">' + '<div class=\"input-color-container\">' + '<input class=\"color input-color tooltip-init-my\" data-tooltip=\"Změnit barvu\" type=\"color\">' + \"</div>\" + '<div class=\"lineStyle-container\">' + '<select class=\"lineStyle tooltip-init-my\" data-tooltip=\"Změnit styl čáry\">' + '<option value=\"solid\">&mdash;</option>' + '<option value=\"dashed\">- -</option>' + \"</select>\" + \"</div>\" + '<div class=\"arrow-container\">' + '<select class=\"arrow tooltip-init-my\" data-tooltip=\"Změnit šipku\" value=\"1\">' + '<option value=\"false\">x</option>' + '<option value=\"true\">&#8594;</option>' + \"</select>\" + \"</div>\" + '<div class=\"delete  tooltip-init-my\" data-tooltip=\"Vymazat čáru\"><i class=\"material-icons\">delete_forever</i></div>' + \"</div>\";\nfunction createStructure(targetId, mapId, createMenu, app) {\n  // let testApp = app;\n  // debugger\n\n  // debugger\n\n  if (createMenu) {\n    var $menu = Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('<div id=\"testcontrols\" class=\"menu\">' + '<div class=\"menu-inner\">' + '<a href=\"#\" class=\"resetView tooltip-init-my\" data-tooltip=\"Resetovat přiblížení\"><i class=\"material-icons\">youtube_searched_for</i></a>' + '<a href=\"#\" class=\"scaleUp tooltip-init-my\" data-tooltip=\"Přiblížit\"><i class=\"material-icons\">zoom_in</i></a>' + '<a href=\"#\" class=\"scaleDown tooltip-init-my\" data-tooltip=\"Oddálit\"><i class=\"material-icons\">zoom_out</i></a>' + '<div class=\"menu-divider\"></div>' + '<a href=\"#\" class=\"addSubIdea tooltip-init-my\" data-tooltip=\"Přidat potomka (vybranému uzlu)\"><i class=\"material-icons\" style=\"transform: rotate(-90deg)\">library_add</i></a>' + '<a href=\"#\" class=\"insertIntermediate tooltip-init-my\" data-tooltip=\"Přidat předchůdce (vybranému uzlu)\"><i class=\"material-icons\" style=\"transform: rotate(90deg)\">library_add</i></a>' + '<a href=\"#\" class=\"editNode tooltip-init-my\" data-tooltip=\"Upravit text (vybranému uzlu)\"><i class=\"material-icons\">edit</i></a>' + '<a href=\"#\" class=\"removeSubIdea tooltip-init-my\" data-tooltip=\"Vymazat uzel\"><i class=\"material-icons\">delete</i></a>' + '<div class=\"menu-divider\"></div>' + '<a href=\"#\" class=\"insertRoot tooltip-init-my\" data-tooltip=\"Vložit kořenový uzel\"><i class=\"material-icons\">add_to_queue</i></a>' + '<div class=\"menu-divider\"></div>' + '<a href=\"#\" class=\"toggleAddLinkMode tooltip-init-my\" data-tooltip=\"Vložit propojení (po této volbě klikněte na vybraný uzel a poté na ten, který chcete propojit)\"><i class=\"material-icons\">call_made</i></a>' + '<div class=\"menu-divider\"></div>' + '<a href=\"#\" class=\"undo tooltip-init-my\" data-tooltip=\"Krok zpět\"><i class=\"material-icons\">undo</i></a>' + '<a href=\"#\" class=\"redo tooltip-init-my\" data-tooltip=\"Krok vpřed\"><i class=\"material-icons\">redo</i></a>' + '<div class=\"menu-divider\"></div>' + '<a href=\"#\" class=\"help tooltip-init-my dynamic-popup\" data-tooltip=\"Nápověda\"><i class=\"material-icons\">help</i></a>' +\n    // '<a href=\"#\" class=\"help tooltip-init-my save-map\" data-tooltip=\"Uložit mapu\" data-map-id=\"' + mapId + '\"><i class=\"material-icons\">save</i></a>' +\n    '<a href=\"#\" class=\"help tooltip-init-my reset-map\" data-tooltip=\"Resetovat mapu\" data-map-id=\"' + mapId + '\"><i class=\"material-icons\">restore</i></a>' + '<span class=\"save-container\" data-map-id=\"' + mapId + '\"></span>' + \"</div>\" + \"</div>\");\n    var $tooltips = $menu.find(\".tooltip-init-my\");\n    $tooltips.each(function (val, i) {\n      var $this = Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this);\n      app.tooltip.create({\n        targetEl: $this,\n        text: $this.attr(\"data-tooltip\")\n      });\n    });\n    var x = \"cokoliv\";\n\n    // let wrapper = `<div id=\"testcontrols\" class=\"menu\">\n    //   <div class=\"menu-inner\">\n    //     <a href=\"#\" class=\"resetView tooltip-init-my\" data-tooltip=\"${x} přiblížení\"><i class=\"material-icons\">youtube_searched_for</i></a>\n    //     <a href=\"#\" class=\"scaleUp tooltip-init-my\" data-tooltip=\"Přiblížit\"><i class=\"material-icons\">zoom_in</i></a><a href=\"#\" class=\"scaleDown tooltip-init-my\" data-tooltip=\"Oddálit\"><i class=\"material-icons\">zoom_out</i></a><div class=\"menu-divider\"></div><a href=\"#\" class=\"addSubIdea tooltip-init-my\" data-tooltip=\"Přidat potomka (vybranému uzlu)\"><i class=\"material-icons\" style=\"transform: rotate(-90deg)\">library_add</i></a><a href=\"#\" class=\"insertIntermediate tooltip-init-my\" data-tooltip=\"Přidat předchůdce (vybranému uzlu)\"><i class=\"material-icons\" style=\"transform: rotate(90deg)\">library_add</i></a><a href=\"#\" class=\"editNode tooltip-init-my\" data-tooltip=\"Upravit text (vybranému uzlu)\"><i class=\"material-icons\">edit</i></a><a href=\"#\" class=\"makeSelectedNodeRoot tooltip-init-my\" data-tooltip=\"Převést na kořenový uzel (vybraný uzel)\"><i class=\"material-icons\">queue_play_next</i></a><a href=\"#\" class=\"removeSubIdea tooltip-init-my\" data-tooltip=\"Vymazat uzel\"><i class=\"material-icons\">delete</i></a><div class=\"menu-divider\"></div><a href=\"#\" class=\"insertRoot tooltip-init-my\" mdata-tooltip=\"Vložit kořenový uzel\"><i class=\"material-icons\">add_to_queue</i></a><div class=\"menu-divider\"></div><a href=\"#\" class=\"toggleAddLinkMode tooltip-init-my\" data-tooltip=\"Vložit propojení (po této volbě klikněte na vybraný uzel a poté na ten, který chcete propojit)\"><i class=\"material-icons\">call_made</i></a><div class=\"menu-divider\"></div><a href=\"#\" class=\"undo tooltip-init-my\" data-tooltip=\"Krok zpět\"><i class=\"material-icons\">undo</i></a><a href=\"#\" class=\"redo tooltip-init-my\" data-tooltip=\"Krok vpřed\"><i class=\"material-icons\">redo</i></a><div class=\"menu-divider\"></div><a href=\"#\" class=\"help tooltip-init-my dynamic-popup\" data-tooltip=\"Nápověda\"><i class=\"material-icons\">help</i></a><a href=\"#\" class=\"help tooltip-init-my save-map\" data-tooltip=\"Uložit mapu\" data-map-id=\"2\"><i class=\"material-icons\">save</i></a><a href=\"#\" class=\"help tooltip-init-my reset-map\" data-tooltip=\"Restartovat mapu\" data-map-id=\"2\"><i class=\"material-icons\">restore</i></a></div></div>`;\n    //\n\n    Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(targetId).append($menu);\n  }\n  Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(targetId).append('<div class=\"container\"></div>');\n  Object(dom7__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(targetId).append(tooltip);\n}\nfunction createPopup(app) {\n  var popup = app.popup.create({\n    content: '<div class=\"popup\">' + '<div class=\"block\">' + \"<strong>Nápověda</strong>\" + \"<p>Jednotlivé uzly můžete přesouvat uchopením kurzorem. Upravit text uzlu lze dvojklikem na daný uzel.</p>\" + \"<p>Po kliknutí na propojení je možné tomuto propojení editovat jeho barvu, styl čáry, šipku po směru propojení a popřípadě propojení vymazat.</p>\" + '<ul style=\"list-style: none\">' + '<li><i class=\"material-icons\">youtube_searched_for</i> - Obnovení přiblížení do původního stavu.</li>' + '<li><i class=\"material-icons\">zoom_in</i> - Přiblížení myšlenkové mapy.</li>' + '<li><i class=\"material-icons\">zoom_out</i> - Oddálení myšlenkové mapy.</li>' + '<li><i class=\"material-icons\">library_add</i> - Přidat uzel za aktuálně vybraný uzel (potomek)</li>' + '<li><i class=\"material-icons\" style=\"transform: rotate(90deg)\">library_add</i> - Přidat uzel před aktuálně vybraný uzel (předchůdce)</li>' + '<li><i class=\"material-icons\">edit</i> - Upravit text aktuálně vybraného uzlu.</li>' + '<li><i class=\"material-icons\">queue_play_next</i> - Převést akutálně vybraný uzel na kořenový.</li>' + '<li><i class=\"material-icons\">delete</i> - Odstranit aktálně vybraný uzel.</li>' + '<li><i class=\"material-icons\">add_to_queue</i> - Vytvořit nový kořenový uzel.</li>' + '<li><i class=\"material-icons\">call_made</i> - Vytvořit propojení z aktálně vybraného uzlu do uzlu vybraného kliknutím.</li>' + '<li><i class=\"material-icons\">undo</i> - Vrátit zpět poslední provedenou akci.</li>' + '<li><i class=\"material-icons\">redo</i> - Znovu provést vrácenou akci.</li>' + \"</ul>\" + '<p><a href=\"#\" class=\"link popup-close\">Zavřít</a></p>' + \"</div>\" + \"</div>\"\n  });\n  popup.open();\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  createStructure: createStructure,\n  createPopup: createPopup\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/render-structure.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/theme-css-widget.js":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/theme-css-widget.js ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/*global require */\nvar $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"),\n  Theme = __webpack_require__(/*! mindmup-mapjs-layout */ \"./node_modules/mindmup-mapjs-layout/src/mapjs-layout.js\").Theme,\n  DOMRender = __webpack_require__(/*! ./dom-render */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/dom-render.js\");\n$.fn.themeCssWidget = function (themeProvider, themeProcessor, mapModel) {\n  'use strict';\n\n  var element = $(this),\n    activateTheme = function activateTheme(theme) {\n      var themeJson = themeProvider[theme || 'default'];\n      if (!themeJson) {\n        return;\n      }\n      DOMRender.theme = new Theme(themeJson);\n      element.text(themeProcessor.process(themeJson).css);\n    };\n  activateTheme('default');\n  mapModel.addEventListener('themeChanged', activateTheme);\n  return element;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/theme-css-widget.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mm-comp.js":
/*!**************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mm-comp.js ***!
  \**************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mm_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mm.less */ \"./src/core/custom_plugins/builder-mind-maps/mm.less\");\n/* harmony import */ var _mm_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_mm_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var _mindmup_mapjs_src_render_structure__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mindmup-mapjs/src/render-structure */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/render-structure.js\");\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! os */ \"./node_modules/os-browserify/browser.js\");\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n\n\n// import \"./main\";\n// import jQuery from 'jquery';\nvar MAPJS = __webpack_require__(/*! ./mindmup-mapjs/src/npm-main */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs/src/npm-main.js\"),\n  // jQuery = require('jquery'),\n  themeProvider = __webpack_require__(/*! ./theme */ \"./src/core/custom_plugins/builder-mind-maps/theme.js\"),\n  ThemeProcessor = __webpack_require__(/*! ./mindmup-mapjs-layout */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-layout/src/mapjs-layout.js\").ThemeProcessor,\n  testMap = __webpack_require__(/*! ./example-map */ \"./src/core/custom_plugins/builder-mind-maps/example-map.json\"),\n  content = __webpack_require__(/*! ./mindmup-mapjs-model */ \"./src/core/custom_plugins/builder-mind-maps/mindmup-mapjs-model/index.js\").content;\nvar MindMaps = /*#__PURE__*/function () {\n  function MindMaps(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, MindMaps);\n    // debugger\n    this.app = app;\n    var mindMaps = this;\n    var extendedParams = framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].extend({\n      on: {}\n    }, app.params.mindMaps, params);\n    mindMaps.params = extendedParams;\n    app.on(\"init\", function () {\n      // debugger;\n      if (app.data.hasOwnProperty(\"myEvents\")) {\n        app.data.myEvents.on(\"builder:ready\", function (e) {\n          app.translation.addResourceBundle(\"cs\", \"mindMaps\", app.mindMaps.params.lang.cs);\n          app.translation.addResourceBundle(\"en\", \"mindMaps\", app.mindMaps.params.lang.en);\n        });\n      }\n    });\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(MindMaps, [{\n    key: \"create\",\n    value: function create(containerSelectorString, defaultMap, createMenu) {\n      \"use strict\";\n\n      var self = this;\n      var mapId = jquery__WEBPACK_IMPORTED_MODULE_4___default()(containerSelectorString).data(\"map-id\");\n      createMenu = typeof createMenu !== \"undefined\" ? createMenu : true;\n      _mindmup_mapjs_src_render_structure__WEBPACK_IMPORTED_MODULE_6__[\"default\"].createStructure(containerSelectorString, mapId, createMenu, this.app);\n      var map;\n      var copyMap = JSON.parse(JSON.stringify(defaultMap));\n      if (defaultMap == undefined) {\n        map = testMap;\n      } else {\n        map = defaultMap;\n      }\n\n      // containerSelectorString = '#container';\n      var container = jQuery(\"body\").find(containerSelectorString).find(\".container\"),\n        touchEnabled = true,\n        idea = content(map),\n        imageInsertController = new MAPJS.ImageInsertController(\"http://localhost:4999?u=\"),\n        mapModel = new MAPJS.MapModel(MAPJS.DOMRender.layoutCalculator, []);\n\n      // debugger\n\n      jQuery.fn.attachmentEditorWidget = function (mapModel) {\n        return this.each(function () {\n          mapModel.addEventListener(\"attachmentOpened\", function (nodeId, attachment) {\n            mapModel.setAttachment(\"attachmentEditorWidget\", nodeId, {\n              contentType: \"text/html\",\n              content: window.prompt(\"attachment\", attachment && attachment.content)\n            });\n          });\n        });\n      };\n      // window.onerror = window.alert;\n\n      jQuery(\"body\").find(containerSelectorString).find(\".dynamic-popup\").on(\"click\", function () {\n        _mindmup_mapjs_src_render_structure__WEBPACK_IMPORTED_MODULE_6__[\"default\"].createPopup(self.app);\n      });\n      jQuery(\"body\").find(containerSelectorString).find(\".reset-map\").on(\"click\", function () {\n        jquery__WEBPACK_IMPORTED_MODULE_4___default()(\".tooltip-in\").remove();\n        jquery__WEBPACK_IMPORTED_MODULE_4___default()(containerSelectorString).empty();\n        var xx = copyMap;\n        self.create(containerSelectorString, copyMap);\n      });\n\n      //uložení mapy\n      jQuery(\"body\").find(containerSelectorString).find(\".save-map\").on(\"click\", function () {\n        //console.log(mapModel.getIdea());\n      });\n      this.getModel = function () {\n        return mapModel.getIdea();\n      };\n      this.getData = function () {\n        var model = this.getModel();\n        var dirtyIdeas = model.ideas;\n        var links = model.links;\n        var stringified = JSON.stringify(dirtyIdeas);\n        var cleanedData = JSON.parse(stringified);\n        var returnData = {\n          ideas: _objectSpread({}, cleanedData),\n          links: links\n        };\n        return returnData;\n      };\n\n      // jQuery('body').find('#themecss').themeCssWidget(themeProvider, new ThemeProcessor(), mapModel);\n\n      container.domMapWidget(console, mapModel, true, imageInsertController);\n      jQuery(\"body\").find(containerSelectorString).mapToolbarWidget(mapModel);\n      jQuery(\"body\").find(containerSelectorString).find(containerSelectorString).attachmentEditorWidget(mapModel);\n      mapModel.setIdea(idea);\n      jQuery(\"body\").find(containerSelectorString).find(\"#linkEditWidget\").linkEditWidget(mapModel, this.app);\n      if (window.mapModel == undefined) window.mapModel = new Array();\n      if (window.mapDefault == undefined) window.mapDefault = new Array();\n      window.mapModel[mapId] = mapModel;\n      window.mapDefault[mapId] = copyMap;\n      jQuery(\"body\").find(containerSelectorString).find(\".mapjs-draw-container\").click(function () {\n        jQuery(this).toggleClass(\"active\");\n        // alert(\"fu\");\n      });\n      imageInsertController.addEventListener(\"imageInsertError\", function (reason) {\n        //console.log(\"image insert error\", reason);\n      });\n      container.on(\"drop\", function (e) {\n        var dataTransfer = e.originalEvent.dataTransfer;\n        e.stopPropagation();\n        e.preventDefault();\n        if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {\n          var fileInfo = dataTransfer.files[0];\n          if (/\\.mup$/.test(fileInfo.name)) {\n            var oFReader = new window.FileReader();\n            oFReader.onload = function (oFREvent) {\n              mapModel.setIdea(content(JSON.parse(oFREvent.target.result)));\n            };\n            oFReader.readAsText(fileInfo, \"UTF-8\");\n          }\n        }\n      });\n      return containerSelectorString;\n    }\n  }, {\n    key: \"get\",\n    value: function get(containerSelectorString) {\n      this.app.views.main.$el.find(containerSelectorString);\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"mindMaps\",\n  params: {\n    mindMaps: {\n      lang: {\n        cs: {\n          saveText: \"Aktualní mind mapa byla uložena jako výchozí.\",\n          saveTitle: \"MindMapa byla uložena\"\n        },\n        en: {\n          saveText: \"Current mind map was saved as default\",\n          saveTitle: \"MindMap saved\"\n        }\n      }\n    }\n  },\n  static: {\n    MindMaps: MindMaps\n  },\n  create: function create() {\n    var app = this;\n    app.mindMaps = new MindMaps(app);\n  },\n  clicks: {}\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mm-comp.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/mm.less":
/*!***********************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/mm.less ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/mm.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-mind-maps/theme.js":
/*!************************************************************!*\
  !*** ./src/core/custom_plugins/builder-mind-maps/theme.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*global module */\nmodule.exports = {};\nmodule.exports.default = {\n  'name': 'MindMup V1',\n  'node': [{\n    'name': 'default',\n    'cornerRadius': 10.0,\n    'backgroundColor': '#E0E0E0',\n    'border': {\n      'type': 'surround',\n      'line': {\n        'color': '#707070',\n        'width': 1.0\n      }\n    },\n    'shadow': [{\n      'color': '#070707',\n      'opacity': 0.4,\n      'offset': {\n        'width': 2,\n        'height': 2\n      },\n      'radius': 2\n    }],\n    'text': {\n      'margin': 5.0,\n      'alignment': 'center',\n      'color': '#4F4F4F',\n      'lightColor': '#EEEEEE',\n      'darkColor': '#000000',\n      'font': {\n        'lineSpacing': 2.5,\n        'size': 9,\n        'weight': 'bold'\n      }\n    },\n    'connections': {\n      'default': {\n        'h': 'center',\n        'v': 'center'\n      },\n      'from': {\n        'horizontal': {\n          'h': 'nearest-inset',\n          'v': 'center'\n        }\n      },\n      'to': {\n        'h': 'nearest',\n        'v': 'center'\n      }\n    },\n    'decorations': {\n      'height': 20,\n      'edge': 'top',\n      'overlap': true,\n      'position': 'end'\n    }\n  }, {\n    'name': 'level_1',\n    'backgroundColor': '#22AAE0'\n  }, {\n    'name': 'activated',\n    'border': {\n      'type': 'surround',\n      'line': {\n        'color': '#22AAE0',\n        'width': 3.0,\n        'style': 'dotted'\n      }\n    }\n  }, {\n    'name': 'level_1.activated',\n    'border': {\n      'type': 'surround',\n      'line': {\n        'color': '#EEEEEE',\n        'width': 3.0,\n        'style': 'dotted'\n      }\n    }\n  }, {\n    'name': 'selected',\n    'shadow': [{\n      'color': '#000000',\n      'opacity': 0.9,\n      'offset': {\n        'width': 2,\n        'height': 2\n      },\n      'radius': 2\n    }]\n  }, {\n    'name': 'collapsed',\n    'shadow': [{\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 1\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 3\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 4\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 6\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 7\n      },\n      'radius': 0\n    }]\n  }, {\n    'name': 'collapsed.selected',\n    'shadow': [{\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 1\n      },\n      'radius': 0\n    }, {\n      'color': '#888888',\n      'offset': {\n        'width': 0,\n        'height': 3\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 6\n      },\n      'radius': 0\n    }, {\n      'color': '#555555',\n      'offset': {\n        'width': 0,\n        'height': 7\n      },\n      'radius': 0\n    }, {\n      'color': '#FFFFFF',\n      'offset': {\n        'width': 0,\n        'height': 10\n      },\n      'radius': 0\n    }, {\n      'color': '#333333',\n      'offset': {\n        'width': 0,\n        'height': 11\n      },\n      'radius': 0\n    }]\n  }, {\n    'name': 'attr_group_supporting',\n    'backgroundColor': '#00FF00'\n  }, {\n    'name': 'attr_group_opposing',\n    'backgroundColor': '#FF0000'\n  }],\n  'connector': {\n    'default': {\n      'type': 'quadratic',\n      'controlPoint': {\n        'above': {\n          'width': 0,\n          'height': 0.75\n        },\n        'below': {\n          'width': 0,\n          'height': 0.75\n        },\n        'horizontal': {\n          'width': 0,\n          'height': 0\n        }\n      },\n      'line': {\n        'color': '#707070',\n        'width': 1.0\n      }\n    }\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-mind-maps/theme.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/noteeditor.js":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/noteeditor.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(jQuery) {// noteeditor.js: A one-voice music notes editor.\n// Version 0.1.1\n//\n// Copyright (c) 2015 Ildar Ahmadullin\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n(function ($) {\n  jQuery.fn.noteEditor = function (options) {\n    var self = this;\n    // debugger\n\n    if (options === undefined) {\n      options = {};\n    }\n    if (options.lang === undefined) {\n      options.lang = \"cs\";\n    }\n\n    // Strings translations\n    messagesTranslations = {\n      en: {\n        deleteButtonTitle: \"Delete selected symbol\",\n        deleteButtonTitleRight: \"Delete symbol on the right\",\n        deleteButtonTitleLeft: \"Delete symbol on the left\",\n        insertNote: \"Insert note\",\n        insertRest: \"Insert rest\",\n        onOffFlat: \"Flat on/off\",\n        onOffSharp: \"Sharp on/off\",\n        onOffDotted: \"Dotted on/off\",\n        transposeDown: \"Transpose half-step down\",\n        transposeUp: \"Transpose half-step up\",\n        lyrics: \"Lyrics\"\n      },\n      ru: {\n        deleteButtonTitle: \"Удалить выбранную ноту\",\n        deleteButtonTitleRight: \"Удалить справа от курсора\",\n        deleteButtonTitleLeft: \"Удалить слева от курсора\",\n        insertNote: \"Вставить ноту\",\n        insertRest: \"Вставить паузу\",\n        onOffFlat: \"Вкл/выкл бемоль\",\n        onOffSharp: \"Вкл/выкл диез\",\n        onOffDotted: \"Вкл/выкл увеличение длительности\",\n        transposeDown: \"Транспонировать на полтона вниз\",\n        transposeUp: \"Транспонировать на полтона вверх\",\n        lyrics: \"Слова\"\n      },\n      cs: {\n        deleteButtonTitle: \"Smazat vybraný symbol\",\n        deleteButtonTitleRight: \"Smazat symbol vpravo\",\n        deleteButtonTitleLeft: \"Smazat symbol vlevo\",\n        insertNote: \"Vložit notu\",\n        insertRest: \"Vložit pauzu\",\n        onOffFlat: \"Bé přidat/odebrat\",\n        onOffSharp: \"Křížek přidat/odebrat\",\n        onOffDotted: \"Tečka přidat/odebrat\",\n        transposeDown: \"Transponovat o půl tónu dolů\",\n        transposeUp: \"Transponovat o půl tónu nahoru\",\n        lyrics: \"Text\"\n      }\n    };\n    langMsgs = messagesTranslations[options.lang];\n    var C0Y = 182;\n    var HalfToneY = 7;\n    var CursorInterval = 56;\n    var UpperStaffLineStep = 10;\n    var LowerStaffLineStep = 2;\n    function GetNoteFromY(y) {\n      var StaffSteps = (C0Y - y) / HalfToneY;\n      var Octave = Math.floor(StaffSteps / 7);\n      var NotePos = StaffSteps % 7;\n      if (NotePos < 0) {\n        NotePos = NotePos + 7;\n      }\n      return {\n        octave: Octave,\n        notePos: NotePos,\n        staffSteps: StaffSteps\n      };\n    }\n    function ProcessNoteDisplaying(noteElement, staffSteps) {\n      if (staffSteps > UpperStaffLineStep) {\n        noteElement.addClass(\"lined\");\n        var LineElement = noteElement.find(\".line\");\n        LineElement.css(\"height\", 14 + (staffSteps - UpperStaffLineStep) * 7 + \"px\");\n        // LineElement.css('top', '38px');\n        if (staffSteps & 1) {\n          // LineElement.css('background-position-y', '7px');\n          LineElement.css(\"top\", \"45px\");\n        } else {\n          // LineElement.css('background-position-y', '0px');\n          LineElement.css(\"top\", \"38px\");\n        }\n      } else if (staffSteps < LowerStaffLineStep) {\n        noteElement.addClass(\"lined\");\n        var LineElement = noteElement.find(\".line\");\n        var DeltaHeight = (LowerStaffLineStep - staffSteps - 2) * 7;\n        LineElement.css(\"height\", 20 + DeltaHeight + \"px\");\n        LineElement.css(\"top\", 24 - DeltaHeight + \"px\");\n        LineElement.css(\"background-position-y\", \"0px\");\n      } else {\n        noteElement.removeClass(\"lined\");\n      }\n    }\n\n    // X-coordinate of staff beginning\n    var Left0 = 130;\n    // The most left X-coordinate of cursor\n    var CursorLeft0 = Left0;\n    // X-coordinate of the first note\n    var NotesLeft0 = Left0 + 25;\n    // X-coordinate of the first lyric\n    var LyricsLeft0 = Left0 + 22;\n    return this.each(function (x) {\n      function DeselectAllNotes() {\n        $(\".note\").removeClass(\"selected\");\n      }\n      function GetSelectedNote(Elem) {\n        if (Elem == null) {\n          Elem = Notesheet.find(\".note.selected\").eq(0);\n        }\n        var NoteIndex = parseInt(Elem.find('input[name=\"index\"]').eq(0).val());\n        return {\n          elem: Elem,\n          index: NoteIndex\n        };\n      }\n      function DisableNoteAttributesToolbar() {\n        var NoteAttrToolbar = Toolbar.find(\".note_attributes\").eq(0);\n        NoteAttrToolbar.find(\"input\").prop(\"disabled\", true);\n        Toolbar.find(\".delete_note\").eq(0).prop(\"disabled\", true);\n      }\n      function EnableNoteAttributesToolbar(name) {\n        var NoteAttrToolbar = Toolbar.find(\".note_attributes\").eq(0);\n        if (name) {\n          NoteAttrToolbar.find('input[name=\"' + name + '\"]').prop(\"disabled\", false);\n        } else {\n          NoteAttrToolbar.find(\"input\").prop(\"disabled\", false);\n        }\n        Toolbar.find(\".delete_note\").eq(0).prop(\"disabled\", false);\n      }\n      function LoadNotePropertiesToToolbar(elem) {\n        var SelectedNote = GetSelectedNote(elem);\n        var note = Notes[SelectedNote.index];\n        if (note.elementType == \"note\") {\n          EnableNoteAttributesToolbar();\n          var NoteAttrToolbar = Toolbar.find(\".note_attributes\").eq(0);\n\n          // alteration\n          if (note.alter == \"bemol\") {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"bemol\"]').prop(\"checked\", true);\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"sharp\"]').prop(\"checked\", false);\n          } else if (note.alter == \"sharp\") {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"bemol\"]').prop(\"checked\", false);\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"sharp\"]').prop(\"checked\", true);\n          } else {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"bemol\"]').prop(\"checked\", false);\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"sharp\"]').prop(\"checked\", false);\n          }\n\n          // dotted\n          if (note.dotted == true) {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"dotted\"]').prop(\"checked\", true);\n          } else {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"dotted\"]').prop(\"checked\", false);\n          }\n        } else if (note.elementType == \"rest\") {\n          EnableNoteAttributesToolbar(\"dotted\");\n          var NoteAttrToolbar = Toolbar.find(\".note_attributes\").eq(0);\n\n          // dotted\n          if (note.dotted == true) {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"dotted\"]').prop(\"checked\", true);\n          } else {\n            NoteAttrToolbar.find('label.checkbox_button input[name=\"dotted\"]').prop(\"checked\", false);\n          }\n        } else {\n          DisableNoteAttributesToolbar();\n        }\n      }\n      function SelectNote(note) {\n        CursorOff();\n        DeselectAllNotes();\n        note.addClass(\"selected\");\n        LoadNotePropertiesToToolbar(note);\n      }\n\n      // Set note element position\n      function SetNoteElementPosition(elem, pos) {\n        var NewX = NotesLeft0 + pos * CursorInterval;\n        elem.find('input[name=\"index\"]').eq(0).val(pos);\n        elem.css(\"left\", NewX + \"px\");\n      }\n\n      // Returns note ID.\n      // Note with ID = 0 is C in the 0th octave.\n      // ID = 1 is C# in the 0th octave,\n      // ID = 2 is D in the 0th octave,\n      // ID = -1 is B in the -1st octave etc.\n      function GetNoteID(note, clef) {\n        if (clef == null) {\n          clef = \"treble\";\n        }\n\n        // Key-value variable: notePosInOctave: noteIdInOctave\n        var noteIDs = {\n          0: 0,\n          // C\n          1: 2,\n          // D\n          2: 4,\n          // E\n          3: 5,\n          // F\n          4: 7,\n          // G\n          5: 9,\n          // A\n          6: 11 // B\n        };\n        var Ret = note.octave * 12 + noteIDs[Math.floor(note.notePos)];\n        if (note.alter == \"sharp\") {\n          Ret = Ret + 1;\n        } else if (note.alter == \"bemol\") {\n          Ret = Ret - 1;\n        }\n        return Ret;\n      }\n\n      // Returns note by note ID\n      function GetNoteByID(noteID) {\n        var octave = Math.floor(noteID / 12);\n        var octaveNoteID = noteID % 12;\n        if (octaveNoteID < 0) {\n          octaveNoteID = octaveNoteID + 12;\n        }\n\n        // Getting staff steps and alteration\n        var notesByID = {\n          0: {\n            notePos: 0,\n            alter: \"\"\n          },\n          1: {\n            notePos: 0,\n            alter: \"sharp\"\n          },\n          2: {\n            notePos: 1,\n            alter: \"\"\n          },\n          3: {\n            notePos: 2,\n            alter: \"bemol\"\n          },\n          4: {\n            notePos: 2,\n            alter: \"\"\n          },\n          5: {\n            notePos: 3,\n            alter: \"\"\n          },\n          6: {\n            notePos: 3,\n            alter: \"sharp\"\n          },\n          7: {\n            notePos: 4,\n            alter: \"\"\n          },\n          8: {\n            notePos: 4,\n            alter: \"sharp\"\n          },\n          9: {\n            notePos: 5,\n            alter: \"\"\n          },\n          10: {\n            notePos: 6,\n            alter: \"bemol\"\n          },\n          11: {\n            notePos: 6,\n            alter: \"\"\n          }\n        };\n        var Ret = notesByID[octaveNoteID];\n        Ret[\"octave\"] = octave;\n        Ret[\"staffSteps\"] = octave * 7 + Ret.notePos;\n        return Ret;\n      }\n\n      // Invoked on note addition/removing.\n      function ResizeLyricsBar() {\n        var NewWidth = NotesLeft0 + Notes.length * CursorInterval + 150;\n        LyricsBar.width(NewWidth + \"px\");\n      }\n\n      // Adds note element\n      function AddNoteElement(pos, options) {\n        // New note element position\n        var NewX = NotesLeft0 + pos * CursorInterval;\n        var NewY = C0Y - options.staffSteps * HalfToneY;\n        var DottedClass = \"\";\n        if (options.dotted == true) {\n          DottedClass = \"dotted\";\n        }\n        var noteElemClass = \"note \";\n        if (options.elementType == \"rest\") {\n          noteElemClass = noteElemClass + \"rest \";\n        }\n        var NewNote = $('<div class=\"' + noteElemClass + options.elementType + options.duration + \" \" + options.alter + \" \" + DottedClass + '\">' + '<input type=\"hidden\" name=\"index\" value=\"' + pos + '\"/>' + '<div class=\"alteration\"></div>' + '<div class=\"dot\"></div>' + '<div class=\"line\"></div>' + \"</div>\");\n        NewNote.css(\"left\", NewX + \"px\");\n        NewNote.css(\"top\", NewY + \"px\");\n        Notesheet.append(NewNote);\n        if (options.elementType == \"note\") {\n          ProcessNoteDisplaying(NewNote, options.staffSteps);\n          NewNote.draggable({\n            grid: [CursorInterval, HalfToneY],\n            containment: Notesheet,\n            scroll: false,\n            axis: \"y\",\n            cursor: \"move\",\n            start: function start() {\n              SelectNote($(this));\n            },\n            drag: function drag(event, ui) {\n              var p = ui.position;\n              var Note = GetNoteFromY(p.top);\n              ProcessNoteDisplaying($(this), Note.staffSteps);\n            },\n            stop: function stop(event, ui) {\n              var noteIndex = parseInt($(this).find('input[name=\"index\"]').eq(0).val());\n              var note = GetNoteFromY(parseInt($(this).css(\"top\")));\n              Notes[noteIndex].staffSteps = note.staffSteps;\n              Notes[noteIndex].octave = note.octave;\n              Notes[noteIndex].notePos = note.notePos;\n            }\n          });\n        }\n        NewNote.click(function () {\n          SelectNote($(this));\n          return false;\n        });\n        return NewNote;\n      }\n      function DeleteNoteElement(elem) {\n        if (elem.hasClass(\"selected\")) {\n          DisableNoteAttributesToolbar();\n        }\n        elem.remove();\n      }\n\n      // Shifts a note element horizontally\n      function ShiftNoteElement(elem, shiftValue) {\n        var NoteIndexElement = elem.find('input[name=\"index\"]').eq(0);\n        var NewNoteIndex = parseInt(NoteIndexElement.val()) + shiftValue;\n        SetNoteElementPosition(elem, NewNoteIndex);\n      }\n\n      // Shifts a lyrics element horizontally.\n      // lyric is an element of the Lyrics array.\n      function ShiftLyricsElement(index, shiftValue) {\n        if (Lyrics[index] != null) {\n          var newX = LyricsLeft0 + index * CursorInterval;\n          var elem = Lyrics[index].elem;\n          elem.css(\"left\", newX + \"px\");\n        }\n      }\n\n      // Deletes lyrics element\n      function DeleteLyricsElement(index) {\n        if (Lyrics[index] != null) {\n          Lyrics[index].elem.remove();\n          Lyrics[index] = null;\n        }\n      }\n\n      // Adds note to position\n      function AddNote(pos, options) {\n        if (pos == null) {\n          pos = Notes.length;\n        }\n        if (pos > Notes.length) {\n          pos = Notes.length;\n        }\n\n        // Default options\n        Options = {\n          elementType: \"note\",\n          octave: 0,\n          notePos: 4,\n          staffSteps: 4,\n          duration: 8,\n          alter: \"\",\n          dotted: false\n        };\n        $.extend(Options, options);\n        Notes.splice(pos, 0, {\n          elementType: Options.elementType,\n          octave: Options.octave,\n          staffSteps: Options.staffSteps,\n          notePos: Options.notePos,\n          duration: Options.duration,\n          alter: Options.alter,\n          dotted: Options.dotted,\n          elem: AddNoteElement(pos, Options)\n        });\n\n        // Shifting note elements\n        for (var i = pos + 1; i < Notes.length; i++) {\n          ShiftNoteElement(Notes[i].elem, 1);\n        }\n\n        // Shifting lyrics elements\n        for (var i = Lyrics.length; i >= pos; i--) {\n          // Copying array element\n          if (Lyrics[i] != null) {\n            Lyrics[i + 1] = {\n              elem: Lyrics[i].elem,\n              value: Lyrics[i].value\n            };\n            Lyrics[i] = null;\n            ShiftLyricsElement(i + 1, 1);\n          }\n        }\n\n        // Shifting tabs elements\n        for (var i = Tabs.length; i >= pos; i--) {\n          // Copying array element\n          if (Tabs[i] != null) {\n            Tabs[i + 1] = {\n              value: Tabs[i].value\n            };\n            Tabs[i] = null;\n          }\n        }\n        ResizeLyricsBar();\n      }\n      function DeleteNote(pos) {\n        if (pos == null) {\n          return;\n        }\n        if (pos >= Notes.length || pos < 0) {\n          return;\n        }\n        DeleteNoteElement(Notes[pos].elem);\n        Notes.splice(pos, 1);\n\n        // Shifting note elements\n        for (var i = pos; i < Notes.length; i++) {\n          ShiftNoteElement(Notes[i].elem, -1);\n        }\n\n        // Deleting lyrics element if exists\n        if (Lyrics[pos] != null) {\n          DeleteLyricsElement(pos);\n        }\n\n        // Shifting lyrics elements\n        for (var i = pos + 1; i < Lyrics.length; i++) {\n          // Copying array element\n          if (Lyrics[i] != null) {\n            Lyrics[i - 1] = {\n              elem: Lyrics[i].elem,\n              value: Lyrics[i].value\n            };\n            Lyrics[i] = null;\n            ShiftLyricsElement(i - 1, -1);\n          }\n        }\n\n        // Shifting tabs elements\n        for (var i = pos + 1; i < Tabs.length; i++) {\n          // Copying array element\n          if (Tabs[i] != null) {\n            Tabs[i - 1] = {\n              value: Tabs[i].value\n            };\n            Tabs[i] = null;\n          }\n        }\n        ResizeLyricsBar();\n      }\n      function ProcessNoteElement(noteIndex) {\n        // Y\n        var NewY = C0Y - Notes[noteIndex].staffSteps * HalfToneY;\n        Notes[noteIndex].elem.css(\"top\", NewY + \"px\");\n\n        // Alteration\n        Notes[noteIndex].elem.removeClass(\"sharp\");\n        Notes[noteIndex].elem.removeClass(\"bemol\");\n        Notes[noteIndex].elem.addClass(Notes[noteIndex].alter);\n      }\n\n      // Transposes melody. tv -- transposition value.\n      function TransposeMelody(tv) {\n        if (tv != 0) {\n          for (var i = 0; i < Notes.length; i++) {\n            if (Notes[i].elementType == \"note\") {\n              var newNoteID = GetNoteID(Notes[i]) + tv;\n              $.extend(Notes[i], GetNoteByID(newNoteID));\n              var newNote = GetNoteByID(newNoteID);\n              Notes[i].notePos = newNote.notePos;\n              Notes[i].octave = newNote.octave;\n              Notes[i].staffSteps = newNote.staffSteps;\n              Notes[i].alter = newNote.alter;\n              ProcessNoteElement(i);\n              ProcessNoteDisplaying(Notes[i].elem, Notes[i].staffSteps);\n            }\n          }\n        }\n      }\n      function CursorOn() {\n        Cursor.addClass(\"on\");\n      }\n      function CursorOff() {\n        // Cursor.removeClass('on');\n      }\n      function GetCursorPosition() {\n        return parseInt(Cursor.find('input[name=\"position\"]').eq(0).val());\n      }\n      function SetCursorPosition(pos) {\n        var cursorX = CursorLeft0 + CursorInterval * pos;\n        Cursor.find('input[name=\"position\"]').eq(0).val(pos);\n        Cursor.css(\"left\", cursorX + \"px\");\n      }\n      function AddNoteAtCursor(options) {\n        var cursorPosition = GetCursorPosition();\n        CursorOn();\n        AddNote(cursorPosition, options);\n        SetCursorPosition(cursorPosition + 1);\n      }\n      function DeleteSelectedNote() {\n        var CurNote = GetSelectedNote();\n        if (CurNote[\"index\"] !== null) {\n          DeleteNote(CurNote[\"index\"]);\n        }\n      }\n      function DeleteNoteAtCursor() {\n        var cursorPosition = GetCursorPosition();\n        DeleteNote(cursorPosition);\n        SetCursorPosition(cursorPosition);\n      }\n      function DeleteNoteBeforeCursor() {\n        var cursorPosition = GetCursorPosition();\n        if (cursorPosition > 0) {\n          DeleteNote(cursorPosition - 1);\n          SetCursorPosition(cursorPosition - 1);\n        }\n      }\n      this.Notes = [];\n      // Array with lyrics\n      this.Lyrics = [];\n      // Array with tabs\n      this.Tabs = [];\n\n      // Array with notes\n      var Notes = this.Notes;\n      // Array with lyrics\n      var Lyrics = this.Lyrics;\n      // Array with tabs\n      var Tabs = this.Tabs;\n\n      // Returns melody object\n      function GetMelodyObject() {\n        var Ret = {\n          meta: {},\n          notes: []\n        };\n        for (var i = 0; i < Notes.length; i++) {\n          Ret[\"notes\"].push({});\n          Ret[\"notes\"][i][\"element_type\"] = Notes[i].elementType;\n          Ret[\"notes\"][i][\"octave\"] = Notes[i].octave;\n          Ret[\"notes\"][i][\"staffSteps\"] = Notes[i].staffSteps;\n          Ret[\"notes\"][i][\"notePos\"] = Notes[i].notePos;\n          Ret[\"notes\"][i][\"duration\"] = Notes[i].duration;\n          Ret[\"notes\"][i][\"alter\"] = Notes[i].alter;\n          Ret[\"notes\"][i][\"dotted\"] = Notes[i].dotted;\n          Ret[\"notes\"][i][\"note_id\"] = GetNoteID(Notes[i]);\n          Ret[\"notes\"][i][\"lyrics\"] = \"\";\n          Ret[\"notes\"][i][\"tabs\"] = \"\";\n          if (Lyrics[i] != null) {\n            Ret[\"notes\"][i][\"lyrics\"] = Lyrics[i].value;\n          }\n          if (Tabs[i] != null) {\n            Ret[\"notes\"][i][\"tabs\"] = Tabs[i].value;\n          }\n        }\n        return Ret;\n      }\n\n      // Returns note in abc notation\n      function GetNoteABC(note, isFlat) {\n        var NoteStr = \"\";\n        if (note.elementType == \"note\") {\n          // Alteration\n          if (note.alter == \"sharp\") {\n            NoteStr = NoteStr + \"^\";\n          } else if (note.alter == \"bemol\") {\n            NoteStr = NoteStr + \"_\";\n          } else if (isFlat) {\n            NoteStr = NoteStr + \"=\";\n          }\n\n          // Note letter\n          var NoteLetter = {\n            0: \"C\",\n            1: \"D\",\n            2: \"E\",\n            3: \"F\",\n            4: \"G\",\n            5: \"A\",\n            6: \"B\"\n          };\n          NoteStr = NoteStr + NoteLetter[note.notePos];\n\n          // Octave\n          if (note.octave > 0) {\n            for (var j = 0; j < note.octave; j++) {\n              NoteStr = NoteStr + \"'\";\n            }\n          } else if (note.octave < 0) {\n            for (var j = 0; j < -note.octave; j++) {\n              NoteStr = NoteStr + \",\";\n            }\n          }\n        } else if (note.elementType == \"rest\") {\n          NoteStr = NoteStr + \"z\";\n        }\n\n        // Note duration\n        if (note.dotted) {\n          NoteStr = NoteStr + \"3/\" + note.duration * 2;\n        } else {\n          NoteStr = NoteStr + \"/\" + note.duration;\n        }\n        return NoteStr;\n      }\n\n      // Returns lyrics element in abc notation\n      function GetLyricABC(lyricElem) {\n        if (lyricElem == null) {\n          return \"~ \";\n        }\n        if (lyricElem.value == \"\") {\n          return \"~ \";\n        }\n        return lyricElem.value.replace(/ /g, \"~\");\n      }\n\n      // Chooses note symbol (4th, 8th etc.) and dot presence by note duration (e.g. 0.125 is a 8th note).\n      function ChooseNoteDuration(note_duration) {\n        // this function is to be rewritten.\n\n        var possibleChoices = [{\n          duration: 0.03125,\n          note_duration: 32,\n          dotted: false\n        }, {\n          duration: 0.046875,\n          note_duration: 32,\n          dotted: true\n        }, {\n          duration: 0.0625,\n          note_duration: 16,\n          dotted: false\n        }, {\n          duration: 0.09375,\n          note_duration: 16,\n          dotted: true\n        }, {\n          duration: 0.125,\n          note_duration: 8,\n          dotted: false\n        }, {\n          duration: 0.1875,\n          note_duration: 8,\n          dotted: true\n        }, {\n          duration: 0.25,\n          note_duration: 4,\n          dotted: false\n        }, {\n          duration: 0.375,\n          note_duration: 4,\n          dotted: true\n        }, {\n          duration: 0.5,\n          note_duration: 2,\n          dotted: false\n        }, {\n          duration: 0.75,\n          note_duration: 2,\n          dotted: true\n        }, {\n          duration: 1.0,\n          note_duration: 1,\n          dotted: false\n        }, {\n          duration: 1.5,\n          note_duration: 1,\n          dotted: true\n        }];\n        if (note_duration < possibleChoices[0][\"duration\"]) {\n          return possibleChoices[0];\n        } else if (note_duration > possibleChoices[possibleChoices.length - 1][\"duration\"]) {\n          return possibleChoices[possibleChoices.length - 1];\n        } else {\n          for (var i = 0; i < possibleChoices.length; i++) {\n            if (note_duration == possibleChoices[i][\"duration\"]) {\n              return possibleChoices[i];\n            } else if (note_duration < possibleChoices[i][\"duration\"]) {\n              if (note_duration < (possibleChoices[i][\"duration\"] + possibleChoices[i - 1][\"duration\"]) / 2) {\n                return possibleChoices[i - 1];\n              } else {\n                return possibleChoices[i];\n              }\n            }\n          }\n        }\n      }\n\n      // Clears everything\n      function ClearEditor() {\n        for (var i = 0; i < Notes.length; i++) {\n          Notes[i].elem.remove();\n          if (Lyrics[i] != null) {\n            if (Lyrics[i].elem != null) {\n              Lyrics[i].elem.remove();\n            }\n          }\n        }\n\n        // Cleaning notes, lyrics and tabs\n        while (Notes.length > 0) {\n          Notes.pop();\n        }\n        while (Lyrics.length > 0) {\n          Lyrics.pop();\n        }\n        while (Tabs.length > 0) {\n          Tabs.pop();\n        }\n        SetCursorPosition(0);\n      }\n      var methods = {\n        // Returns melody object\n        getMelodyObject: function getMelodyObject() {\n          return GetMelodyObject();\n        },\n        // Returns melody object in JSON format\n        getJSON: function getJSON() {\n          return JSON.stringify(GetMelodyObject());\n        },\n        // Returns melody in abc notation (visit http://abcnotation.com/ for more information)\n        getABC: function getABC() {\n          var Ret = \"\" + \"X: 1\\n\" + \"M: 8/8\\n\" + \"L: 1/1\\n\" + \"K: Cmaj\\n\";\n          // Splitting melody into lines 16 notes each\n          var NotesLine = \"\";\n          var LyricsLine = \"\";\n          var TabsLine = \"\";\n          var notesCount = 0;\n\n          // For saving alterations\n          var alterations = {};\n          for (var i = 0; i < Notes.length; i++) {\n            var isFlat = false;\n            if (Notes[i].elementType == \"note\") {\n              // Saving alteration\n              if (Notes[i].alter != \"\") {\n                alterations[Notes[i].notePos + \" : \" + Notes[i].octave] = Notes[i].alter;\n              }\n              // Adding 'flat'\n              else if (alterations[Notes[i].notePos + \" : \" + Notes[i].octave]) {\n                isFlat = true;\n                delete alterations[Notes[i].notePos + \" : \" + Notes[i].octave];\n              }\n            }\n            var NoteStr = GetNoteABC(Notes[i], isFlat);\n            NotesLine = NotesLine + NoteStr + \" \";\n            if (Notes[i].elementType == \"note\") {\n              LyricsLine = LyricsLine + GetLyricABC(Lyrics[i]) + \" \";\n              TabsLine = TabsLine + GetLyricABC(Tabs[i]) + \" \";\n            }\n            notesCount = notesCount + 1;\n            if (notesCount >= 16) {\n              Ret = Ret + NotesLine + \"\\n\";\n              Ret = Ret + \"w: \" + LyricsLine + \"\\n\";\n              Ret = Ret + \"w: \" + TabsLine + \"\\n\";\n              var NotesLine = \"\";\n              var LyricsLine = \"\";\n              var TabsLine = \"\";\n              notesCount = 0;\n            }\n          }\n          if (NotesLine != \"\" || LyricsLine || TabsLine) {\n            Ret = Ret + NotesLine + \"\\n\";\n            Ret = Ret + \"w: \" + LyricsLine + \"\\n\";\n            Ret = Ret + \"w: \" + TabsLine + \"\\n\";\n          }\n          return Ret;\n        },\n        // Imports melody from JSON\n        importFromJSONString: function importFromJSONString(jsonStr) {\n          try {\n            var obj = JSON.parse(jsonStr);\n            ClearEditor();\n            for (var i = 0; i < obj[\"notes\"].length; i++) {\n              var noteObj = {};\n              if (obj[\"notes\"][i][\"element_type\"] == \"note\") {\n                var note = GetNoteByID(obj[\"notes\"][i][\"note_id\"]);\n                noteObj[\"elementType\"] = \"note\";\n                noteObj[\"octave\"] = note[\"octave\"];\n                noteObj[\"staffSteps\"] = note[\"staffSteps\"];\n                noteObj[\"notePos\"] = note[\"notePos\"];\n                if (obj[\"notes\"][i][\"duration\"] != null && obj[\"notes\"][i][\"dotted\"] != null) {\n                  noteObj[\"duration\"] = obj[\"notes\"][i][\"duration\"];\n                  noteObj[\"dotted\"] = obj[\"notes\"][i][\"dotted\"];\n                } else {\n                  var noteDurationObj = ChooseNoteDuration(obj[\"notes\"][i][\"duration_float\"]);\n                  noteObj[\"duration\"] = noteDurationObj[\"note_duration\"];\n                  noteObj[\"dotted\"] = noteDurationObj[\"dotted\"];\n                }\n                noteObj[\"alter\"] = note[\"alter\"];\n                noteObj[\"note_id\"] = obj[\"notes\"][i][\"note_id\"];\n                noteObj[\"lyrics\"] = \"\";\n                AddNote(i, noteObj);\n                if (obj[\"notes\"][i][\"lyrics\"] != null) {\n                  SetLyricElementText(i, obj[\"notes\"][i][\"lyrics\"]);\n                }\n                if (obj[\"notes\"][i][\"tabs\"] != null) {\n                  SetTabElementText(i, obj[\"notes\"][i][\"tabs\"]);\n                }\n              } else if (obj[\"notes\"][i][\"element_type\"] == \"rest\") {\n                if (obj[\"notes\"][i][\"duration\"] != null && obj[\"notes\"][i][\"dotted\"] != null) {\n                  noteObj[\"duration\"] = obj[\"notes\"][i][\"duration\"];\n                  noteObj[\"dotted\"] = obj[\"notes\"][i][\"dotted\"];\n                } else {\n                  var noteDurationObj = ChooseNoteDuration(obj[\"notes\"][i][\"duration_float\"]);\n                  noteObj[\"duration\"] = noteDurationObj[\"note_duration\"];\n                  noteObj[\"dotted\"] = noteDurationObj[\"dotted\"];\n                }\n                noteObj[\"elementType\"] = \"rest\";\n                AddNote(i, noteObj);\n                if (obj[\"notes\"][i][\"lyrics\"] != null) {\n                  SetLyricElementText(i, obj[\"notes\"][i][\"lyrics\"]);\n                }\n              }\n            }\n            return true;\n          } catch (e) {\n            return false;\n          }\n        }\n      };\n      $.fn.func = function (method, params) {\n        if (methods[method]) {\n          return methods[method](params);\n        }\n      };\n\n      // this.fn.xa = function () {\n      //   return JSON.stringify(GetMelodyObject());\n      // };\n\n      self.getMelodyObject = function () {\n        return JSON.stringify(GetMelodyObject());\n      };\n      self.func = function (method, params) {\n        if (methods[method]) {\n          return methods[method](params);\n        }\n      };\n\n      // Creating note sheet and cursor\n      var Notesheet = $(\"<div></div>\");\n      var Cursor = $('<div class=\"cursor\"><input type=\"hidden\" name=\"position\" value=\"0\"/></div>');\n      Notesheet.append(Cursor);\n\n      //   Creating lyrics element\n      //   var LyricsBar = $(''\n      //   \t+'<div class=\"lyrics\">'\n      //   \t\t+'<div class=\"caption\">'\n      //   \t\t\t+'<span>'+langMsgs['lyrics']+':</span>'\n      //   \t\t+'</div>'\n      //   \t+'</div>'\n      //   \t);\n      var LyricsBar = $(\"\");\n      Notesheet.append(LyricsBar);\n\n      // Creating toolbar\n      var Toolbar = $(\"\" + '<div class=\"toolbar\" style=\"justify-content: flex-start\">' + \"<span>Předznamenání: </span>\" + '<select name=\"beforSign\" class=\"select\" id=\"signs\">' + '<option value=\"none\">-</option>' + '<option value=\"h\">#</option>' + '<option value=\"hh\">2 #</option>' + '<option value=\"b\">b</option>' + '<option value=\"bb\">2 b</option>' + \"</select>\" + \"<span>Takt: </span>\" + '<select name=\"takt\" class=\"select\" id=\"takt\">' + '<option value=\"none\">-</option>' + '<option value=\"twofour\">2/4</option>' + '<option value=\"threefour\">3/4</option>' + '<option value=\"fourfour\">4/4</option>' + '<option value=\"sixeight\">6/8</option>' + \"</select>\" + \"</div>\" + '<div class=\"toolbar\">' + '<div class=\"panel note_remove\">' + '<button class=\"delete_note_left\" title=\"' + langMsgs[\"deleteButtonTitleLeft\"] + '\"><i class=\"icon material-icons\">skip_previous</i></button>' + '<button class=\"delete_note\" title=\"' + langMsgs[\"deleteButtonTitle\"] + '\"><i class=\"icon material-icons\">clear</i></button>' + '<button class=\"delete_note_right\" title=\"' + langMsgs[\"deleteButtonTitleRight\"] + '\"><i class=\"icon material-icons\">skip_next</i></button>' + \"</div>\" + '<div class=\"divider\"></div>' + '<div class=\"panel note_main\">' + '<button class=\"add_note add_note_1\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_note_2\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_note_4\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_note_8\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_note_16\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_note_32\" title=\"' + langMsgs[\"insertNote\"] + '\"></button>' + '<button class=\"add_note add_rest_0\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_1\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_2\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_4\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_8\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_16\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + '<button class=\"add_note add_rest_32\" title=\"' + langMsgs[\"insertRest\"] + '\"></button>' + \"</div>\" + '<div class=\"divider\"></div>' + '<div class=\"panel note_attributes\">' + '<label class=\"checkbox_button\"><input name=\"bemol\" type=\"checkbox\"/><div class=\"button bemol\" title=\"' + langMsgs[\"onOffFlat\"] + '\"></div></label>' + '<label class=\"checkbox_button\"><input name=\"sharp\" type=\"checkbox\"/><div class=\"button sharp\" title=\"' + langMsgs[\"onOffSharp\"] + '\"></div></label>' + '<label class=\"checkbox_button\"><input name=\"dotted\" type=\"checkbox\"/><div class=\"button dot\" title=\"' + langMsgs[\"onOffDotted\"] + '\"></div></label>' + \"</div>\" + '<div class=\"divider\"></div>' + '<div class=\"panel transposition_panel\">' + '<button class=\"transpose_up\" title=\"' + langMsgs[\"transposeUp\"] + '\"><i class=\"icon material-icons\">vertical_align_top</i></button>' + '<button class=\"transpose_down\" title=\"' + langMsgs[\"transposeDown\"] + '\"><i class=\"icon material-icons\">vertical_align_bottom</i></button>' + \"</div>\" + '<div class=\"clear\"></div>' + \"</div>\");\n      Notesheet.append('<div class=\"clef treble\"></div>');\n      Notesheet.append('<div class=\"beforeSign none\"></div>');\n      Notesheet.append('<div class=\"noteTakt none\"></div>');\n      $(this).append(Notesheet);\n      $(this).append(Toolbar);\n      $(this).addClass(\"noteeditor\");\n      Notesheet.addClass(\"notesheet\");\n      SetCursorPosition(Notes.length);\n      CursorOn();\n      DisableNoteAttributesToolbar();\n      function GetCursorPositionByEvent(e, elem) {\n        if (elem == null) {\n          elem = Notesheet;\n        }\n\n        // Getting mouse coordinates:\n        // Note sheet coordinates\n        var notesheetPos = Notesheet.offset();\n        // Mouse coordinates\n        var mousePos = {\n          x: e.pageX - notesheetPos.left + elem.scrollLeft(),\n          y: e.pageY - notesheetPos.top\n        };\n        var newCursorPosition = Math.round((mousePos.x - CursorLeft0) / CursorInterval);\n        if (newCursorPosition < 0) {\n          newCursorPosition = 0;\n        } else if (newCursorPosition > Notes.length) {\n          newCursorPosition = Notes.length;\n        }\n        return newCursorPosition;\n      }\n      function AddLyricElement(index, text) {\n        if (text == null) {\n          text = \"\";\n        }\n        var LyricElem = $('<span class=\"lyric\">' + text + \"</span>\");\n        var newX = LyricsLeft0 + index * CursorInterval;\n        LyricElem.css(\"left\", newX + \"px\");\n        LyricsBar.append(LyricElem);\n        return LyricElem;\n      }\n      function SetLyricElementText(index, text) {\n        if (Lyrics[index] == null) {\n          Lyrics[index] = {\n            elem: AddLyricElement(index, text),\n            value: text\n          };\n        } else {\n          Lyrics[index].value = text;\n          Lyrics[index].elem.text(text);\n        }\n      }\n      function SetTabElementText(index, text) {\n        if (Tabs[index] == null) {\n          Tabs[index] = {\n            value: text\n          };\n        } else {\n          Tabs[index].value = text;\n        }\n      }\n      function ShowLyricsEdit(index) {\n        if (index < 0) {\n          index = 0;\n        }\n        var LyricElem = $('<input type=\"text\"/>');\n        var newX = LyricsLeft0 + index * CursorInterval;\n        LyricElem.css(\"left\", newX + \"px\");\n        if (Lyrics[index] != null) {\n          LyricElem.val(Lyrics[index].value);\n        }\n        LyricsBar.append(LyricElem);\n\n        // Binding events\n        LyricElem.click(function (e) {\n          e.stopPropagation();\n        });\n        LyricElem.focusout(function () {\n          var LyricText = $(this).val();\n          SetLyricElementText(index, LyricText);\n          $(this).remove();\n        });\n        LyricElem.focus();\n      }\n      Notesheet.click(function (e) {\n        DeselectAllNotes();\n        DisableNoteAttributesToolbar();\n        var cursorPosition = GetCursorPositionByEvent(e);\n        SetCursorPosition(cursorPosition);\n        CursorOn();\n      });\n      LyricsBar.click(function (e) {\n        if (Notes.length > 0) {\n          var cursorPosition = GetCursorPositionByEvent(e);\n          ShowLyricsEdit(cursorPosition - 1);\n        }\n        e.stopPropagation();\n      });\n\n      // \"Add note\" buttons\n      Toolbar.find(\"button.add_note_1\").click(function () {\n        AddNoteAtCursor({\n          duration: 1\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_note_2\").click(function () {\n        AddNoteAtCursor({\n          duration: 2\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_note_4\").click(function () {\n        AddNoteAtCursor({\n          duration: 4\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_note_8\").click(function () {\n        AddNoteAtCursor({\n          duration: 8\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_note_16\").click(function () {\n        AddNoteAtCursor({\n          duration: 16\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_note_32\").click(function () {\n        AddNoteAtCursor({\n          duration: 32\n        });\n        return false;\n      });\n\n      // \"Add rest\" buttons\n      Toolbar.find(\"button.add_rest_0\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 0\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_1\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 1\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_2\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 2\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_4\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 4\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_8\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 8\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_16\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 16\n        });\n        return false;\n      });\n      Toolbar.find(\"button.add_rest_32\").click(function () {\n        AddNoteAtCursor({\n          elementType: \"rest\",\n          duration: 32\n        });\n        return false;\n      });\n\n      // \"Delete note\" button\n      Toolbar.find(\"button.delete_note\").click(function () {\n        DeleteSelectedNote();\n        return false;\n      });\n\n      // \"Delete note on the right\" button\n      Toolbar.find(\"button.delete_note_right\").click(function () {\n        DeleteNoteAtCursor();\n        return false;\n      });\n\n      //Select beforeSign\n      Toolbar.find(\"select#signs\").change(function (e) {\n        var val = $(e.target).val();\n        var el = Notesheet.find(\".beforeSign\");\n        $(el).attr(\"class\", \"beforeSign \" + val);\n        return false;\n      });\n\n      //selectTakt\n      Toolbar.find(\"select#takt\").change(function (e) {\n        var val = $(e.target).val();\n        var el = Notesheet.find(\".noteTakt\");\n        $(el).attr(\"class\", \"noteTakt \" + val);\n        return false;\n      });\n\n      // \"Delete note on the left\" button\n      Toolbar.find(\"button.delete_note_left\").click(function () {\n        DeleteNoteBeforeCursor();\n        return false;\n      });\n\n      // ---------------------------------------------\n      // Note attributres toolbar actions\n      // ---------------------------------------------\n\n      // bemol checkbox\n      var cbBemol = Toolbar.find('.note_attributes input[type=\"checkbox\"][name=\"bemol\"]').eq(0);\n      // sharp checkbox\n      var cbSharp = Toolbar.find('.note_attributes input[type=\"checkbox\"][name=\"sharp\"]').eq(0);\n      // dotted checkbox\n      var cbDotted = Toolbar.find('.note_attributes input[type=\"checkbox\"][name=\"dotted\"]').eq(0);\n\n      // Bemol checkbox\n      cbBemol.change(function () {\n        var CurNote = GetSelectedNote();\n        if ($(this).prop(\"checked\")) {\n          CurNote.elem.removeClass(\"sharp\");\n          CurNote.elem.addClass(\"bemol\");\n          Notes[CurNote.index].alter = \"bemol\";\n        } else {\n          CurNote.elem.removeClass(\"bemol\");\n          Notes[CurNote.index].alter = \"\";\n        }\n        LoadNotePropertiesToToolbar(CurNote.elem);\n      });\n\n      // Sharp checkbox\n      cbSharp.change(function () {\n        var CurNote = GetSelectedNote();\n        if ($(this).prop(\"checked\")) {\n          CurNote.elem.removeClass(\"bemol\");\n          CurNote.elem.addClass(\"sharp\");\n          Notes[CurNote.index].alter = \"sharp\";\n        } else {\n          CurNote.elem.removeClass(\"sharp\");\n          Notes[CurNote.index].alter = \"\";\n        }\n        LoadNotePropertiesToToolbar(CurNote.elem);\n      });\n\n      // Dotted checkbox\n      cbDotted.change(function () {\n        var CurNote = GetSelectedNote();\n        if ($(this).prop(\"checked\")) {\n          CurNote.elem.addClass(\"dotted\");\n          Notes[CurNote.index].dotted = true;\n        } else {\n          CurNote.elem.removeClass(\"dotted\");\n          Notes[CurNote.index].dotted = false;\n        }\n        LoadNotePropertiesToToolbar(CurNote.elem);\n      });\n\n      // ---------------------------------------------\n      // Transpositions\n      // ---------------------------------------------\n\n      // Transpose melody buttons\n      Toolbar.find(\"button.transpose_up\").click(function () {\n        TransposeMelody(1);\n        return false;\n      });\n      Toolbar.find(\"button.transpose_down\").click(function () {\n        TransposeMelody(-1);\n        return false;\n      });\n    });\n  };\n})(jQuery);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/noteeditor.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/style.css":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/style.css ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-music-sheet/jsNodeEditor/style.css?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-offline/templates/book-offline.f7.es.html":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder-offline/templates/book-offline.f7.es.html ***!
  \***********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! chart.js */ \"./node_modules/chart.js/dist/Chart.js\");\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      cacheState: app.offline.params.cacheState,\n      installing: false,\n      maxSize: '0 MB',\n      usedSize: '0 MB',\n      bookSize: '0 MB',\n      availableSize: '0 MB',\n      progress: 0,\n      progressSize: 0,\n      bookDone: 0\n    };\n  },\n  methods: {\n    downloadOfflineBook: function () {\n      let app = this.$app;\n      if (navigator.storage && navigator.storage.persist) {\n        navigator.storage.persist().then(function (result) {\n        });\n      }\n      app.offline.installCache();\n    },\n    abortDownload: function () {\n      let app = this.$app;\n      app.offline.abort();\n    },\n    removeOfflineBook: function () {\n      let app = this.$app;\n      app.offline.params.downloadedSize = 0;\n      app.offline.deleteCache();\n    },\n    bytesToSize: function (bytes, decimals = 3) {\n      const sizes = [\n        'Bytes',\n        'KB',\n        'MB',\n        'GB',\n        'TB',\n        'PB',\n        'EB',\n        'ZB',\n        'YB'\n      ];\n      const k = 1024;\n      const dm = decimals < 0 ? 0 : decimals;\n      if (bytes == 0)\n        return {\n          size: 100,\n          unit: sizes[1]\n        };\n      const i = Math.floor(Math.log(bytes) / Math.log(k));\n      let object = {\n        size: parseFloat((bytes / Math.pow(k, i)).toFixed(dm)),\n        unit: sizes[i]\n      };\n      return object;\n    },\n    setSizes: async function (page) {\n      let self = this;\n      navigator.storage.estimate().then(({usage, quota}) => {\n        let used = self.bytesToSize(usage);\n        let max = self.bytesToSize(quota);\n        let diff = quota - usage;\n        let available = self.bytesToSize(diff);\n        self.$setState({\n          maxSize: max.size + ' ' + max.unit,\n          usedSize: used.size + ' ' + used.unit,\n          availableSize: available.size + ' ' + available.unit\n        });\n        const data = {\n          labels: [\n            `${ this.$app.translation.t('offline:used') } (kB)`,\n            `${ this.$app.translation.t('offline:available') } (kB)`\n          ],\n          datasets: [{\n              data: [\n                usage / 1000,\n                diff / 1000\n              ],\n              backgroundColor: [\n                'rgb(255, 0, 0)',\n                'rgb(0, 255, 0)'\n              ],\n              hoverOffset: 4\n            }]\n        };\n        const config = {\n          type: 'doughnut',\n          data: data,\n          options: { responsive: false }\n        };\n        let contEl = page.$el.find('.size-canvas');\n        contEl.empty();\n        contEl.append(`<canvas id=\"sizeChart\" width=\"250\" height=\"250\"></canvas>`);\n        let chartEl = page.$el.find('#sizeChart');\n        let chart = new chart_js__WEBPACK_IMPORTED_MODULE_0___default.a(chartEl, config);\n      });\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = page.app;\n      let self = this;\n      let $block = page.$el;\n      let progressBarEl = $block.find('#download-progressbar');\n      if (navigator.storage && navigator.storage.estimate) {\n        self.setSizes(page);\n      }\n      let bSize = self.bytesToSize(app.offline.params.bookSize);\n      self.$setState({ bookSize: bSize.size + ' ' + bSize.unit });\n      app.data.myEvents.off('offline:fileDone');\n      app.data.myEvents.on('offline:fileDone', function (res) {\n        if (!self.bookDone) {\n          let size = res + app.offline.params.downloadedSize;\n          let percentage = 100 * (size / app.offline.params.bookSize);\n          percentage = Math.round(percentage);\n          self.$setState({\n            progress: percentage,\n            progressSize: size,\n            installing: true\n          });\n          app.progressbar.set('#download-progressbar', self.progress);\n        }\n      });\n      app.data.myEvents.off('offline:aborted');\n      app.data.myEvents.on('offline:aborted', function (res) {\n        app.progressbar.hide('#download-progressbar');\n        self.$setState({\n          cacheState: res,\n          installing: false,\n          progress: 0,\n          progressSize: 0,\n          bookDone: 0\n        });\n        app.offline.params.downloadedSize = 0;\n        if (navigator.storage && navigator.storage.estimate) {\n          self.setSizes(page);\n        }\n      });\n      app.data.myEvents.off('offline:chacheStateChanged');\n      app.data.myEvents.on('offline:chacheStateChanged', function (res) {\n        self.$setState({ cacheState: res });\n        if (res == 'none') {\n          self.$setState({ bookDone: 0 });\n        }\n        if (navigator.storage && navigator.storage.estimate) {\n          self.setSizes(page);\n        }\n      });\n      app.data.myEvents.off('offline:installing');\n      app.data.myEvents.on('offline:installing', function (res) {\n        if (res) {\n          app.progressbar.show('#download-progressbar');\n          self.$setState({\n            installing: res,\n            progress: 0,\n            progressSize: 0,\n            bookDone: 0\n          });\n          app.offline.params.downloadedSize = 0;\n        } else {\n          app.progressbar.hide('#download-progressbar');\n          self.$setState({\n            installing: res,\n            progress: 0,\n            progressSize: 0,\n            bookDone: 1\n          });\n          app.offline.params.downloadedSize = 0;\n          if (navigator.storage && navigator.storage.estimate) {\n            self.setSizes(page);\n          }\n        }\n      });\n    }\n  },\n  id: 'c99e4547a9',\n  render() {\n    return `\n    <div class=\"page\">\n        <div class=\"navbar\">\n            <div class=\"navbar-bg\"></div>\n            <div class=\"navbar-inner sliding\">\n                <div class=\"left\">\n                    <a class=\"link\" href=\"/left-menu/\">\n                        <i class=\"icon icon-back\"></i>\n                        <span class=\"ios-only\">Zpět</span>\n                    </a>\n                </div>\n\n                <div class=\"title\">${ this.$app.translation.t('offline:title') }</div>\n            </div>\n        </div>\n        <div class=\"page-content\">\n\n            ${ navigator.storage && navigator.storage.estimate ? `\n\n\n            ` : '' }\n            <div class=\"description-container block\">\n                <p>\n                    ${ this.$app.translation.t('offline:description') }\n                </p>\n            </div>\n            ${ this.$app.browserSupport.params.browser.parsedResult.browser.name != 'Safari' ? `\n            <div class=\"info-container\">\n                <div class=\"block-title\">${ this.$app.translation.t('offline:usage') }</div>\n                <div class=\"size-canvas\">\n                </div>\n\n                <div>\n                    <table>\n                        <tr>\n                            <th>\n                                ${ this.$app.translation.t('offline:used') }\n                            </th>\n                            <th>\n                                ${ this.$app.translation.t('offline:available') }\n                            </th>\n                            <th>\n                                ${ this.$app.translation.t('offline:max') }\n                            </th>\n                        </tr>\n                        <tr>\n                            <td>\n                                ${ this.usedSize }\n                            </td>\n                            <td>\n                                ${ this.availableSize }\n                            </td>\n                            <td>\n                                ${ this.maxSize }\n                            </td>\n                        </tr>\n                    </table>\n                </div>\n            </div>\n            ` : '' }\n\n            <div class=\"action-container\">\n                <div class=\"block-title\">${ this.$app.translation.t('offline:action') }</div>\n\n\n\n                <div class=\"install-contianer ${ this.installing ? `` : 'hide' }\">\n                    <span class=\"progressbar\" id=\"download-progressbar\"></span>\n                    <p><strong>${ this.progress } %</strong></p>\n                    <p>${ this.$app.translation.t('offline:saving') }</p>\n                    <div class=\"cancel-btn\" @click=\"abortDownload\">${ this.$app.translation.t('offline:cancel') }</div>\n                </div>\n\n                <div class=\"list\">\n                    <ul>\n                        ${ this.cacheState == 'none' ? `\n                        <li>\n                            <a href=\"#\" @click=\"downloadOfflineBook\"\n                                class=\"list-button ${ this.installing ? `disabled` : `` }\">${ this.$app.translation.t('offline:download') }\n                                (${ this.bookSize })</a>\n                        </li>\n                        ` : `\n                        <li>\n                            <a href=\"#\" @click=\"removeOfflineBook\"\n                                class=\"list-button ${ this.installing ? `disabled` : `` }\">${ this.$app.translation.t('offline:remove') }\n                                (${ this.bookSize })</a>\n                        </li>\n                        ` }\n                    </ul>\n                </div>\n            </div>\n        </div>\n    </div>\n`;\n  },\n  style: `\n    .info-container,\n[data-f7-c99e4547a9] .action-container {\n        margin: var(--fb-padding) auto;\n        /* text-align: center; */\n    }\n\n[data-f7-c99e4547a9] .info-container .size-canvas #sizeChart {\n        margin: 0 auto;\n    }\n\n[data-f7-c99e4547a9] .info-container table {\n        margin: var(--fb-padding) auto;\n    }\n\n[data-f7-c99e4547a9] .info-container table td {\n        padding: 0 calc(var(--fb-padding)/2);\n    }\n\n[data-f7-c99e4547a9] .install-contianer {\n        margin: var(--fb-padding) auto;\n        text-align: center;\n        padding: 0 var(--fb-padding);\n    }\n[data-f7-c99e4547a9] .cancel-btn{\n        color: var(--f7-theme-color);\n        margin: var(--fb-padding) auto;\n        font-size: bold;\n        cursor: pointer;\n    }\n`,\n  styleScoped: true\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-offline/templates/book-offline.f7.es.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-styles/css/styles.less":
/*!****************************************************************!*\
  !*** ./src/core/custom_plugins/builder-styles/css/styles.less ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-styles/css/styles.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-styles/libs/prism.css":
/*!***************************************************************!*\
  !*** ./src/core/custom_plugins/builder-styles/libs/prism.css ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-styles/libs/prism.css?");

/***/ }),

/***/ "./src/core/custom_plugins/builder-styles/libs/prism.js":
/*!**************************************************************!*\
  !*** ./src/core/custom_plugins/builder-styles/libs/prism.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {/* PrismJS 1.28.0\r\nhttps://prismjs.com/download.html#themes=prism&languages=css+scss */\nvar _self = \"undefined\" != typeof window ? window : \"undefined\" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {},\n  Prism = function (e) {\n    var n = /(?:^|\\s)lang(?:uage)?-([\\w-]+)(?=\\s|$)/i,\n      t = 0,\n      r = {},\n      a = {\n        manual: e.Prism && e.Prism.manual,\n        disableWorkerMessageHandler: e.Prism && e.Prism.disableWorkerMessageHandler,\n        util: {\n          encode: function e(n) {\n            return n instanceof i ? new i(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/\\u00a0/g, \" \");\n          },\n          type: function type(e) {\n            return Object.prototype.toString.call(e).slice(8, -1);\n          },\n          objId: function objId(e) {\n            return e.__id || Object.defineProperty(e, \"__id\", {\n              value: ++t\n            }), e.__id;\n          },\n          clone: function e(n, t) {\n            var r, i;\n            switch (t = t || {}, a.util.type(n)) {\n              case \"Object\":\n                if (i = a.util.objId(n), t[i]) return t[i];\n                for (var l in r = {}, t[i] = r, n) n.hasOwnProperty(l) && (r[l] = e(n[l], t));\n                return r;\n              case \"Array\":\n                return i = a.util.objId(n), t[i] ? t[i] : (r = [], t[i] = r, n.forEach(function (n, a) {\n                  r[a] = e(n, t);\n                }), r);\n              default:\n                return n;\n            }\n          },\n          getLanguage: function getLanguage(e) {\n            for (; e;) {\n              var t = n.exec(e.className);\n              if (t) return t[1].toLowerCase();\n              e = e.parentElement;\n            }\n            return \"none\";\n          },\n          setLanguage: function setLanguage(e, t) {\n            e.className = e.className.replace(RegExp(n, \"gi\"), \"\"), e.classList.add(\"language-\" + t);\n          },\n          currentScript: function currentScript() {\n            if (\"undefined\" == typeof document) return null;\n            if (\"currentScript\" in document) return document.currentScript;\n            try {\n              throw new Error();\n            } catch (r) {\n              var e = (/at [^(\\r\\n]*\\((.*):[^:]+:[^:]+\\)$/i.exec(r.stack) || [])[1];\n              if (e) {\n                var n = document.getElementsByTagName(\"script\");\n                for (var t in n) if (n[t].src == e) return n[t];\n              }\n              return null;\n            }\n          },\n          isActive: function isActive(e, n, t) {\n            for (var r = \"no-\" + n; e;) {\n              var a = e.classList;\n              if (a.contains(n)) return !0;\n              if (a.contains(r)) return !1;\n              e = e.parentElement;\n            }\n            return !!t;\n          }\n        },\n        languages: {\n          plain: r,\n          plaintext: r,\n          text: r,\n          txt: r,\n          extend: function extend(e, n) {\n            var t = a.util.clone(a.languages[e]);\n            for (var r in n) t[r] = n[r];\n            return t;\n          },\n          insertBefore: function insertBefore(e, n, t, r) {\n            var i = (r = r || a.languages)[e],\n              l = {};\n            for (var o in i) if (i.hasOwnProperty(o)) {\n              if (o == n) for (var s in t) t.hasOwnProperty(s) && (l[s] = t[s]);\n              t.hasOwnProperty(o) || (l[o] = i[o]);\n            }\n            var u = r[e];\n            return r[e] = l, a.languages.DFS(a.languages, function (n, t) {\n              t === u && n != e && (this[n] = l);\n            }), l;\n          },\n          DFS: function e(n, t, r, i) {\n            i = i || {};\n            var l = a.util.objId;\n            for (var o in n) if (n.hasOwnProperty(o)) {\n              t.call(n, o, n[o], r || o);\n              var s = n[o],\n                u = a.util.type(s);\n              \"Object\" !== u || i[l(s)] ? \"Array\" !== u || i[l(s)] || (i[l(s)] = !0, e(s, t, o, i)) : (i[l(s)] = !0, e(s, t, null, i));\n            }\n          }\n        },\n        plugins: {},\n        highlightAll: function highlightAll(e, n) {\n          a.highlightAllUnder(document, e, n);\n        },\n        highlightAllUnder: function highlightAllUnder(e, n, t) {\n          var r = {\n            callback: t,\n            container: e,\n            selector: 'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'\n          };\n          a.hooks.run(\"before-highlightall\", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), a.hooks.run(\"before-all-elements-highlight\", r);\n          for (var i, l = 0; i = r.elements[l++];) a.highlightElement(i, !0 === n, r.callback);\n        },\n        highlightElement: function highlightElement(n, t, r) {\n          var i = a.util.getLanguage(n),\n            l = a.languages[i];\n          a.util.setLanguage(n, i);\n          var o = n.parentElement;\n          o && \"pre\" === o.nodeName.toLowerCase() && a.util.setLanguage(o, i);\n          var s = {\n            element: n,\n            language: i,\n            grammar: l,\n            code: n.textContent\n          };\n          function u(e) {\n            s.highlightedCode = e, a.hooks.run(\"before-insert\", s), s.element.innerHTML = s.highlightedCode, a.hooks.run(\"after-highlight\", s), a.hooks.run(\"complete\", s), r && r.call(s.element);\n          }\n          if (a.hooks.run(\"before-sanity-check\", s), (o = s.element.parentElement) && \"pre\" === o.nodeName.toLowerCase() && !o.hasAttribute(\"tabindex\") && o.setAttribute(\"tabindex\", \"0\"), !s.code) return a.hooks.run(\"complete\", s), void (r && r.call(s.element));\n          if (a.hooks.run(\"before-highlight\", s), s.grammar) {\n            if (t && e.Worker) {\n              var c = new Worker(a.filename);\n              c.onmessage = function (e) {\n                u(e.data);\n              }, c.postMessage(JSON.stringify({\n                language: s.language,\n                code: s.code,\n                immediateClose: !0\n              }));\n            } else u(a.highlight(s.code, s.grammar, s.language));\n          } else u(a.util.encode(s.code));\n        },\n        highlight: function highlight(e, n, t) {\n          var r = {\n            code: e,\n            grammar: n,\n            language: t\n          };\n          if (a.hooks.run(\"before-tokenize\", r), !r.grammar) throw new Error('The language \"' + r.language + '\" has no grammar.');\n          return r.tokens = a.tokenize(r.code, r.grammar), a.hooks.run(\"after-tokenize\", r), i.stringify(a.util.encode(r.tokens), r.language);\n        },\n        tokenize: function tokenize(e, n) {\n          var t = n.rest;\n          if (t) {\n            for (var r in t) n[r] = t[r];\n            delete n.rest;\n          }\n          var a = new s();\n          return u(a, a.head, e), o(e, a, n, a.head, 0), function (e) {\n            for (var n = [], t = e.head.next; t !== e.tail;) n.push(t.value), t = t.next;\n            return n;\n          }(a);\n        },\n        hooks: {\n          all: {},\n          add: function add(e, n) {\n            var t = a.hooks.all;\n            t[e] = t[e] || [], t[e].push(n);\n          },\n          run: function run(e, n) {\n            var t = a.hooks.all[e];\n            if (t && t.length) for (var r, i = 0; r = t[i++];) r(n);\n          }\n        },\n        Token: i\n      };\n    function i(e, n, t, r) {\n      this.type = e, this.content = n, this.alias = t, this.length = 0 | (r || \"\").length;\n    }\n    function l(e, n, t, r) {\n      e.lastIndex = n;\n      var a = e.exec(t);\n      if (a && r && a[1]) {\n        var i = a[1].length;\n        a.index += i, a[0] = a[0].slice(i);\n      }\n      return a;\n    }\n    function o(e, n, t, r, s, g) {\n      for (var f in t) if (t.hasOwnProperty(f) && t[f]) {\n        var h = t[f];\n        h = Array.isArray(h) ? h : [h];\n        for (var d = 0; d < h.length; ++d) {\n          if (g && g.cause == f + \",\" + d) return;\n          var v = h[d],\n            p = v.inside,\n            m = !!v.lookbehind,\n            y = !!v.greedy,\n            k = v.alias;\n          if (y && !v.pattern.global) {\n            var x = v.pattern.toString().match(/[imsuy]*$/)[0];\n            v.pattern = RegExp(v.pattern.source, x + \"g\");\n          }\n          for (var b = v.pattern || v, w = r.next, A = s; w !== n.tail && !(g && A >= g.reach); A += w.value.length, w = w.next) {\n            var E = w.value;\n            if (n.length > e.length) return;\n            if (!(E instanceof i)) {\n              var P,\n                L = 1;\n              if (y) {\n                if (!(P = l(b, A, e, m)) || P.index >= e.length) break;\n                var S = P.index,\n                  O = P.index + P[0].length,\n                  j = A;\n                for (j += w.value.length; S >= j;) j += (w = w.next).value.length;\n                if (A = j -= w.value.length, w.value instanceof i) continue;\n                for (var C = w; C !== n.tail && (j < O || \"string\" == typeof C.value); C = C.next) L++, j += C.value.length;\n                L--, E = e.slice(A, j), P.index -= A;\n              } else if (!(P = l(b, 0, E, m))) continue;\n              S = P.index;\n              var N = P[0],\n                _ = E.slice(0, S),\n                M = E.slice(S + N.length),\n                W = A + E.length;\n              g && W > g.reach && (g.reach = W);\n              var z = w.prev;\n              if (_ && (z = u(n, z, _), A += _.length), c(n, z, L), w = u(n, z, new i(f, p ? a.tokenize(N, p) : N, k, N)), M && u(n, w, M), L > 1) {\n                var I = {\n                  cause: f + \",\" + d,\n                  reach: W\n                };\n                o(e, n, t, w.prev, A, I), g && I.reach > g.reach && (g.reach = I.reach);\n              }\n            }\n          }\n        }\n      }\n    }\n    function s() {\n      var e = {\n          value: null,\n          prev: null,\n          next: null\n        },\n        n = {\n          value: null,\n          prev: e,\n          next: null\n        };\n      e.next = n, this.head = e, this.tail = n, this.length = 0;\n    }\n    function u(e, n, t) {\n      var r = n.next,\n        a = {\n          value: t,\n          prev: n,\n          next: r\n        };\n      return n.next = a, r.prev = a, e.length++, a;\n    }\n    function c(e, n, t) {\n      for (var r = n.next, a = 0; a < t && r !== e.tail; a++) r = r.next;\n      n.next = r, r.prev = n, e.length -= a;\n    }\n    if (e.Prism = a, i.stringify = function e(n, t) {\n      if (\"string\" == typeof n) return n;\n      if (Array.isArray(n)) {\n        var r = \"\";\n        return n.forEach(function (n) {\n          r += e(n, t);\n        }), r;\n      }\n      var i = {\n          type: n.type,\n          content: e(n.content, t),\n          tag: \"span\",\n          classes: [\"token\", n.type],\n          attributes: {},\n          language: t\n        },\n        l = n.alias;\n      l && (Array.isArray(l) ? Array.prototype.push.apply(i.classes, l) : i.classes.push(l)), a.hooks.run(\"wrap\", i);\n      var o = \"\";\n      for (var s in i.attributes) o += \" \" + s + '=\"' + (i.attributes[s] || \"\").replace(/\"/g, \"&quot;\") + '\"';\n      return \"<\" + i.tag + ' class=\"' + i.classes.join(\" \") + '\"' + o + \">\" + i.content + \"</\" + i.tag + \">\";\n    }, !e.document) return e.addEventListener ? (a.disableWorkerMessageHandler || e.addEventListener(\"message\", function (n) {\n      var t = JSON.parse(n.data),\n        r = t.language,\n        i = t.code,\n        l = t.immediateClose;\n      e.postMessage(a.highlight(i, a.languages[r], r)), l && e.close();\n    }, !1), a) : a;\n    var g = a.util.currentScript();\n    function f() {\n      a.manual || a.highlightAll();\n    }\n    if (g && (a.filename = g.src, g.hasAttribute(\"data-manual\") && (a.manual = !0)), !a.manual) {\n      var h = document.readyState;\n      \"loading\" === h || \"interactive\" === h && g && g.defer ? document.addEventListener(\"DOMContentLoaded\", f) : window.requestAnimationFrame ? window.requestAnimationFrame(f) : window.setTimeout(f, 16);\n    }\n    return a;\n  }(_self);\n true && module.exports && (module.exports = Prism), \"undefined\" != typeof global && (global.Prism = Prism);\n!function (s) {\n  var e = /(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/;\n  s.languages.css = {\n    comment: /\\/\\*[\\s\\S]*?\\*\\//,\n    atrule: {\n      pattern: RegExp(\"@[\\\\w-](?:[^;{\\\\s\\\"']|\\\\s+(?!\\\\s)|\" + e.source + \")*?(?:;|(?=\\\\s*\\\\{))\"),\n      inside: {\n        rule: /^@[\\w-]+/,\n        \"selector-function-argument\": {\n          pattern: /(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,\n          lookbehind: !0,\n          alias: \"selector\"\n        },\n        keyword: {\n          pattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/,\n          lookbehind: !0\n        }\n      }\n    },\n    url: {\n      pattern: RegExp(\"\\\\burl\\\\((?:\" + e.source + \"|(?:[^\\\\\\\\\\r\\n()\\\"']|\\\\\\\\[^])*)\\\\)\", \"i\"),\n      greedy: !0,\n      inside: {\n        function: /^url/i,\n        punctuation: /^\\(|\\)$/,\n        string: {\n          pattern: RegExp(\"^\" + e.source + \"$\"),\n          alias: \"url\"\n        }\n      }\n    },\n    selector: {\n      pattern: RegExp(\"(^|[{}\\\\s])[^{}\\\\s](?:[^{};\\\"'\\\\s]|\\\\s+(?![\\\\s{])|\" + e.source + \")*(?=\\\\s*\\\\{)\"),\n      lookbehind: !0\n    },\n    string: {\n      pattern: e,\n      greedy: !0\n    },\n    property: {\n      pattern: /(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i,\n      lookbehind: !0\n    },\n    important: /!important\\b/i,\n    function: {\n      pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i,\n      lookbehind: !0\n    },\n    punctuation: /[(){};:,]/\n  }, s.languages.css.atrule.inside.rest = s.languages.css;\n  var t = s.languages.markup;\n  t && (t.tag.addInlined(\"style\", \"css\"), t.tag.addAttribute(\"style\", \"css\"));\n}(Prism);\nPrism.languages.scss = Prism.languages.extend(\"css\", {\n  comment: {\n    pattern: /(^|[^\\\\])(?:\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*)/,\n    lookbehind: !0\n  },\n  atrule: {\n    pattern: /@[\\w-](?:\\([^()]+\\)|[^()\\s]|\\s+(?!\\s))*?(?=\\s+[{;])/,\n    inside: {\n      rule: /@[\\w-]+/\n    }\n  },\n  url: /(?:[-a-z]+-)?url(?=\\()/i,\n  selector: {\n    pattern: /(?=\\S)[^@;{}()]?(?:[^@;{}()\\s]|\\s+(?!\\s)|#\\{\\$[-\\w]+\\})+(?=\\s*\\{(?:\\}|\\s|[^}][^:{}]*[:{][^}]))/,\n    inside: {\n      parent: {\n        pattern: /&/,\n        alias: \"important\"\n      },\n      placeholder: /%[-\\w]+/,\n      variable: /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n    }\n  },\n  property: {\n    pattern: /(?:[-\\w]|\\$[-\\w]|#\\{\\$[-\\w]+\\})+(?=\\s*:)/,\n    inside: {\n      variable: /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n    }\n  }\n}), Prism.languages.insertBefore(\"scss\", \"atrule\", {\n  keyword: [/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\\b/i, {\n    pattern: /( )(?:from|through)(?= )/,\n    lookbehind: !0\n  }]\n}), Prism.languages.insertBefore(\"scss\", \"important\", {\n  variable: /\\$[-\\w]+|#\\{\\$[-\\w]+\\}/\n}), Prism.languages.insertBefore(\"scss\", \"function\", {\n  \"module-modifier\": {\n    pattern: /\\b(?:as|hide|show|with)\\b/i,\n    alias: \"keyword\"\n  },\n  placeholder: {\n    pattern: /%[-\\w]+/,\n    alias: \"selector\"\n  },\n  statement: {\n    pattern: /\\B!(?:default|optional)\\b/i,\n    alias: \"keyword\"\n  },\n  boolean: /\\b(?:false|true)\\b/,\n  null: {\n    pattern: /\\bnull\\b/,\n    alias: \"keyword\"\n  },\n  operator: {\n    pattern: /(\\s)(?:[-+*\\/%]|[=!]=|<=?|>=?|and|not|or)(?=\\s)/,\n    lookbehind: !0\n  }\n}), Prism.languages.scss.atrule.inside.rest = Prism.languages.scss;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder-styles/libs/prism.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/genHelp.js":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/genHelp.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction genHelp(obj) {\n  if (obj.hasOwnProperty(\"help\") && obj.help != \"\") {\n    return \"<i class=\\\"material-icons help\\\">help</i>\";\n  } else {\n    return \"\";\n  }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (genHelp);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/genHelp.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js ***!
  \*************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _genHelp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./genHelp */ \"./src/core/custom_plugins/builder/builder-content-settings/genHelp.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nfunction interactiveArea(contentSettingObj, content, key, $apEl, globalContent) {\n  var app = this;\n  var $input;\n  var $name = $$(\"<div class=\\\"item-content item-title item-label\\\">\".concat(contentSettingObj.name, \"</div></li>\"));\n  $input = $$(\"<div class=\\\"item-content img-container\\\"><i class=\\\"video-icon icon material-icons\\\">crop_free</i><span>Select area</span></div>\");\n  $apEl.append($name[0]);\n  $apEl.append($input[0]);\n  var help = \"\";\n  help = Object(_genHelp__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $apEl.find(\".item-title\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  $input.on(\"click\", function () {\n    var left = content[key].left;\n    var top = content[key].top;\n    var height = content[key].height;\n    var width = content[key].width;\n    var imgPopup = app.popup.create({\n      content: \"\\n          <div class=\\\"popup\\\">\\n          <div class=\\\"navbar\\\">\\n          <div class=\\\"navbar-bg\\\"></div>\\n          <div class=\\\"navbar-inner\\\">\\n            <div class=\\\"title\\\">V\\xFDb\\u011Br bodu</div>\\n            <div class=\\\"right\\\"><a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a></div> \\n          </div>\\n        </div>\\n            <div>\\n              <div style=\\\"position: relative; overflow:hidden; width:fit-content; margin: 0 auto;\\\" class=\\\"area-select-container\\\">\\n              <img style=\\\"display: block; object-fit: contain; max-height: 500px; width: auto; max-width: 100%;\\\" class=\\\"point-select-img\\\" src=\\\"\".concat(globalContent[contentSettingObj.ref].replace(\"{{mediaServerDomain}}\", app.apiManager.params.mediaUrlDomain), \"\\\"></img>\\n              <div class=\\\"area-selected\\\" style=\\\"width: 50px; height: 50px; border: 2px dashed var(--f7-theme-color); border-left: 2px solid var(--f7-theme-color);; border-top: 2px solid var(--f7-theme-color);;  background-color: rgba(128,128,128,0.5); position: absolute; top: 10px; left: 10px;\\\" ></div>\\n              </div>\\n\\n              <button class=\\\"margin-top select-point button button-fill\\\">Vybrat</button>\\n            </div>\\n          </div>\\n        \"),\n      // Events\n      on: {\n        open: function open(popup) {\n          var $area = popup.$el.find(\".area-selected\");\n          $area.css({\n            left: \"\".concat(left, \"%\"),\n            top: \"\".concat(top, \"%\"),\n            width: \"\".concat(width, \"%\"),\n            height: \"\".concat(height, \"%\")\n          });\n        },\n        opened: function opened(popup) {\n          var $clickEl = popup.$el.find(\".point-select-img\");\n          var $selectBtn = popup.$el.find(\".select-point\");\n          var $area = popup.$el.find(\".area-selected\");\n          var $container = popup.$el.find(\".area-select-container\");\n          var contWidth = $($container).width();\n          var contHeight = $($container).height();\n          $($area).draggable({\n            containment: $container,\n            scroll: false\n          });\n          $($area).resizable({\n            containment: $container,\n            scroll: false\n          });\n          $selectBtn.on(\"click\", function (event) {\n            var pHeight = $($area).height();\n            var pWidth = $($area).width();\n            var pLeft = $area[0].offsetLeft;\n            var pTop = $area[0].offsetTop;\n            pHeight = pHeight * 100 / contHeight;\n            pWidth = pWidth * 100 / contWidth;\n            pLeft = pLeft * 100 / contWidth;\n            pTop = pTop * 100 / contHeight;\n            content[key].left = pLeft;\n            content[key].top = pTop;\n            content[key].height = pHeight;\n            content[key].width = pWidth;\n            popup.close();\n          });\n        }\n      }\n    });\n    imgPopup.open();\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (interactiveArea);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/interactiveArea.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js ***!
  \**************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _genHelp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./genHelp */ \"./src/core/custom_plugins/builder/builder-content-settings/genHelp.js\");\n\nfunction interactivePoint(contentSettingObj, content, key, $apEl, globalContent) {\n  var app = this;\n  var $input;\n  var $name = $$(\"<div class=\\\"item-content item-title item-label\\\">\".concat(contentSettingObj.name, \"</div></li>\"));\n  $input = $$(\"<div class=\\\"item-content img-container\\\"><i class=\\\"video-icon icon material-icons\\\">my_location</i><span>Vyberte bod</span></div>\");\n  $apEl.append($name[0]);\n  $apEl.append($input[0]);\n  var help = \"\";\n  help = Object(_genHelp__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(contentSettingObj);\n  if (help != \"\") {\n    var $helpEl = $apEl.find(\".item-title\");\n    $helpEl.append($$(help)[0]);\n    var $tooltipHelp = $helpEl.find(\".help\");\n    app.tooltip.create({\n      targetEl: $tooltipHelp,\n      text: contentSettingObj.help\n    });\n  }\n  $input.on(\"click\", function () {\n    var left = content[key].left;\n    var top = content[key].top;\n    var imgPopup = app.popup.create({\n      content: \"\\n          <div class=\\\"popup\\\">\\n          <div class=\\\"navbar\\\">\\n          <div class=\\\"navbar-bg\\\"></div>\\n          <div class=\\\"navbar-inner\\\">\\n            <div class=\\\"title\\\">V\\xFDb\\u011Br bodu</div>\\n            <div class=\\\"right\\\"><a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a></div>\\n          </div>\\n        </div>\\n            <div>\\n            <div style=\\\"position: relative; overflow:hidden; width:fit-content; margin: 0 auto;\\\" class=\\\"area-select-container\\\">\\n            <img style=\\\"display: block; object-fit: contain; max-height: 500px; width: auto;     max-width: 100%;\\\" class=\\\"point-select-img\\\" src=\\\"\".concat(globalContent[contentSettingObj.ref].replace(\"{{mediaServerDomain}}\", app.apiManager.params.mediaUrlDomain), \"\\\"></img>\\n              <i class=\\\"point-select-cursor icon material-icons\\\">my_location</i>\\n              </div>\\n\\n              <button class=\\\"margin-top select-point button button-fill\\\">Vybrat</button>\\n            </div>\\n          </div>\\n        \"),\n      // Events\n      on: {\n        open: function open(popup) {\n          var $cursor = popup.$el.find(\".point-select-cursor\");\n          $cursor.css({\n            left: \"calc(\".concat(left, \"% - 12px)\"),\n            top: \"calc(\".concat(top, \"% - 12px)\"),\n            position: \"absolute\",\n            color: \"var(--f7-theme-color)\"\n          });\n        },\n        opened: function opened(popup) {\n          var $clickEl = popup.$el.find(\".point-select-img\");\n          var $selectBtn = popup.$el.find(\".select-point\");\n          var $cursor = popup.$el.find(\".point-select-cursor\");\n          $clickEl.on(\"click\", function (event) {\n            var $this = $(this);\n            var offset = $this.offset();\n            var x = event.pageX - offset.left;\n            var y = event.pageY - offset.top;\n            var xInPercent = x / $this.width() * 100;\n            var yInPercent = y / $this.height() * 100;\n            left = xInPercent < 0 ? 0 : xInPercent > 100 ? 100 : xInPercent;\n            top = yInPercent < 0 ? 0 : yInPercent > 100 ? 100 : yInPercent;\n\n            // left = ((event.clientX - this.offsetLeft) / this.offsetWidth) * 100;\n            // top = ((event.clientY - this.offsetTop) / this.offsetHeight) * 100;\n\n            //console.log(\"left\", left);\n            //console.log(\"top\", top);\n            $cursor.css({\n              left: \"calc(\".concat(left, \"% - 12px)\"),\n              top: \"calc(\".concat(top, \"% - 12px)\")\n            });\n          });\n          $selectBtn.on(\"click\", function (event) {\n            content[key].left = left;\n            content[key].top = top;\n            popup.close();\n          });\n        }\n      }\n    });\n    imgPopup.open();\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (interactivePoint);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/interactivePoint.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js":
/*!********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js ***!
  \********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\n\n\nfunction openAudioModal() {\n  return _openAudioModal.apply(this, arguments);\n}\nfunction _openAudioModal() {\n  _openAudioModal = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n    var $clickedEl,\n      app,\n      editing,\n      id,\n      currentRange,\n      currentSelection,\n      selectedText,\n      _args = arguments;\n    return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n      while (1) switch (_context.prev = _context.next) {\n        case 0:\n          $clickedEl = _args.length > 0 && _args[0] !== undefined ? _args[0] : null;\n          app = this;\n          editing = false;\n          id = null;\n          if ($clickedEl) {\n            Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"addToSelection\"])($clickedEl[0]);\n            editing = true;\n            id = $clickedEl.data(\"track\");\n          }\n          currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"getSelectionRange\"])();\n          currentSelection = window.getSelection();\n          selectedText = currentSelection.toString();\n          app.audio.openAudioPopup(selectedText, editing, id).then(function (o) {\n            Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"setSelectionRange\"])(currentRange);\n            var res = document.execCommand(\"insertHTML\", false, _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"parserIn\"].call(app, o));\n          });\n        case 9:\n        case \"end\":\n          return _context.stop();\n      }\n    }, _callee, this);\n  }));\n  return _openAudioModal.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openAudioModal);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js":
/*!***********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js ***!
  \***********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\nfunction openCitationModal(buttonEl) {\n  var app = this;\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"getSelectionRange\"])();\n  var citationModal = app.popup.create({\n    targetEl: buttonEl,\n    content: \"\\n      <div class=\\\"popup popup-citations popup-citations-main\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.citation\"), \"</h2>\\n            </div>\\n\\n          </div>\\n          <div class=\\\"view view-main-citation-popup\\\"></div>\\n      </div>\"),\n    // Events\n    on: {\n      open: function open(popover) {\n        app.views.create(\".view-main-citation-popup\", {\n          url: \"/builder-citations/\",\n          pushState: false\n        });\n      },\n      opened: function opened(popover) {\n        app.data.myEvents.off(\"citations:useCitation\");\n        app.data.myEvents.on(\"citations:useCitation\", function (res) {\n          Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionRange\"])(currentRange);\n          document.execCommand(\"insertHTML\", false, \"{{citation:\".concat(res, \"}}\"));\n          citationModal.close();\n        });\n      }\n    }\n  });\n  citationModal.open();\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openCitationModal);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\nfunction openIconModal(buttonEl) {\n  var app = this;\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"getSelectionRange\"])();\n  app.icons.openIconPopup().then(function (o) {\n    var icon = app.icons.createIconElement(o);\n    // debugger;\n    Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionRange\"])(currentRange);\n    if (!o.custom) {\n      document.execCommand(\"insertHTML\", false, icon);\n    } else {\n      document.execCommand(\"insertText\", false, icon);\n    }\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openIconModal);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js":
/*!********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js ***!
  \********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\n\n\nfunction openCustomImageModal(buttonEl) {\n  var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n  var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"100%\";\n  var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"auto\";\n  var app = this;\n  return new Promise(function (resolve, reject) {\n    var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"getSelectionRange\"])();\n    var edit = false;\n    if (url != \"\") {\n      edit = true;\n    }\n    var customImageModal = app.popup.create({\n      targetEl: buttonEl,\n      content: \"\\n      <div class=\\\"popup popup-audio\\\">\\n        <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n          <div class=\\\"toolbar tabbar\\\">\\n            <div class=\\\"toolbar-inner\\\">\\n             <h2>\".concat(app.translation.t(\"builder:content.imgTitle\"), \"</h2>\\n            </div>\\n\\n          </div>\\n          <div class=\\\"block\\\">\\n            <div class=\\\"list\\\">\\n              <ul>\\n                <li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                  <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.imgUrl\"), \"</div>\\n                  <div class=\\\"item-input-wrap\\\">\\n                    <input type=\\\"text\\\" id=\\\"urlMedia\\\" name=\\\"url\\\" value=\\\"\").concat(url, \"\\\">\\n                    <span class=\\\"input-clear-button\\\"></span>\\n                  </div>\\n                </div>\\n              </li>\\n              <li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                    <button id=\\\"loadMedia\\\" class=\\\"col button button-fill\\\">\").concat(app.translation.t(\"builder:content.imgMedia\"), \"</button>\\n                </div>\\n              </li>\\n              <li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                    <p>\").concat(app.translation.t(\"builder:content.imgSize\"), \"</p>\\n                    <div class=\\\"row\\\" style=\\\"width:100%\\\">\\n                      <div class=\\\"col-50\\\">\\n                        <div class=\\\"item-input-wrap\\\">\\n                        <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.imgWidth\"), \" (px | %)</div>\\n                          <div class=\\\"item-input-wrap\\\">\\n                            <input type=\\\"text\\\" id=\\\"widthMedia\\\" name=\\\"widthMedia\\\" value=\\\"\").concat(width, \"\\\">\\n                            <span class=\\\"input-clear-button\\\"></span>\\n                          </div>\\n                        </div>\\n                      </div>\\n                      <div class=\\\"col-50\\\">\\n                        <div class=\\\"item-input-wrap\\\">\\n                        <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.imgHeight\"), \" (px | % | auto)</div>\\n                          <div class=\\\"item-input-wrap\\\">\\n                            <input type=\\\"text\\\" id=\\\"heightMedia\\\" name=\\\"heightMedia\\\" value=\\\"\").concat(height, \"\\\">\\n                            <span class=\\\"input-clear-button\\\"></span>\\n                          </div>\\n                        </div>\\n                      </div>\\n                    </div>\\n\\n                </div>\\n              </li>\\n              <li class=\\\"item-content item-input\\\">\\n                <div class=\\\"item-inner\\\">\\n                    <button id=\\\"useMedia\\\" class=\\\"col button button-fill\\\">\").concat(app.translation.t(\"builder:content.imgUse\"), \"</button>\\n                </div>\\n              </li>\\n              \").concat(url != \"\" ? \"\\n              <li class=\\\"item-content item-input\\\">\\n              <div class=\\\"item-inner\\\">\\n                  <button id=\\\"deleteMedia\\\" class=\\\"col button button\\\">\".concat(app.translation.t(\"builder:content.imgDel\"), \"</button>\\n              </div>\\n              </li>\\n              \") : \"\", \"\\n         \\n              </ul>\\n            </div>\\n          </div>\\n      </div>\"),\n      on: {\n        open: function open(popover) {},\n        opened: function opened(popover) {}\n      }\n    });\n    customImageModal.open();\n    var urlMedia = $$(\"#urlMedia\");\n    var useMedia = $$(\"#useMedia\");\n    var mediaBtn = $$(\"#loadMedia\");\n    var widthMedia = $$(\"#widthMedia\");\n    var heightMedia = $$(\"#heightMedia\");\n    var deleteMedia = $$(\"#deleteMedia\");\n    mediaBtn.on(\"click\", function () {\n      app.data.myEvents.off(\"message:media\");\n      app.builder.imagePopup.open();\n      app.data.myEvents.on(\"message:media\", /*#__PURE__*/function () {\n        var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(url) {\n          var source;\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n            while (1) switch (_context.prev = _context.next) {\n              case 0:\n                source = url;\n                urlMedia.val(url);\n                app.builder.imagePopup.close();\n              case 3:\n              case \"end\":\n                return _context.stop();\n            }\n          }, _callee);\n        }));\n        return function (_x) {\n          return _ref.apply(this, arguments);\n        };\n      }());\n    });\n    useMedia.on(\"click\", function () {\n      Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"setSelectionRange\"])(currentRange);\n      if (urlMedia.val().length == 0) {\n        app.dialog.alert(\"URL nesmí být prázdná!\");\n      } else {\n        var urlFinal = _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"parserIn\"].call(app, urlMedia.val());\n        if ((widthMedia.val().slice(-1) == \"%\" || widthMedia.val().slice(-2) == \"px\") && (heightMedia.val().slice(-1) == \"%\" || heightMedia.val().slice(-2) == \"px\" || heightMedia.val() == \"auto\")) {\n          if (edit) {\n            customImageModal.close();\n            resolve({\n              url: urlFinal,\n              width: widthMedia.val(),\n              height: heightMedia.val()\n            });\n          } else {\n            var imgEl = \"<img src=\\\"\".concat(urlFinal, \"\\\" style=\\\"width: \").concat(widthMedia.val(), \"; height: \").concat(heightMedia.val(), \";\\\" />\");\n            document.execCommand(\"insertHTML\", false, imgEl);\n            customImageModal.close();\n          }\n        } else {\n          app.dialog.alert(app.translation.t(\"builder:content.imgWrongSize\"));\n        }\n      }\n    });\n    deleteMedia.on(\"click\", function () {\n      customImageModal.close();\n      resolve({\n        delete: true\n      });\n    });\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openCustomImageModal);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\nfunction openLinkModal() {\n  var $clickedEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n  var app = this;\n\n  // const selectedNodes = [];\n  // let $selectedLinks;\n\n  // if (\n  //   currentSelection &&\n  //   currentSelection.anchorNode &&\n  //   $(currentSelection.anchorNode).parents(self.$el).length\n  // ) {\n  //   let anchorNode = currentSelection.anchorNode;\n  //   while (anchorNode) {\n  //     selectedNodes.push(anchorNode);\n  //     if (\n  //       !anchorNode.nextSibling ||\n  //       anchorNode === currentSelection.focusNode\n  //     ) {\n  //       anchorNode = null;\n  //     }\n  //     if (anchorNode) {\n  //       anchorNode = anchorNode.nextSibling;\n  //     }\n  //   }\n  //   $selectedLinks = $(selectedNodes)\n  //     .closest(\"a\")\n  //     .add($(selectedNodes).children(\"a\"));\n  // }\n\n  var currentSelection = window.getSelection();\n  var selectedText = currentSelection.toString();\n  var linkType = null;\n  var linkUrl = null;\n  var linkText = selectedText;\n  var linkClass = \"\";\n  var linkAnchor = null;\n\n  // debugger;\n\n  //pokud vybraný text je link vytvořit popover edit/delete\n\n  if ($clickedEl) {\n    if ($clickedEl.hasClass(\"external\")) {\n      linkType = \"external\";\n    } else if ($clickedEl.hasClass(\"disabled-popup-open\")) {\n      linkType = \"modal\";\n      linkAnchor = $clickedEl.data(\"popup\");\n    } else {\n      linkType = \"internal\";\n      linkAnchor = $clickedEl.attr(\"data-scroll-to\");\n    }\n    linkUrl = $clickedEl.attr(\"href\");\n    linkText = $clickedEl.text();\n    if (linkAnchor) {\n      linkAnchor = linkAnchor.replace(\"#\", \"\");\n    }\n    var classes = $clickedEl.prop(\"className\");\n    if (classes) {\n      classes = classes.split(\" \");\n      classes.forEach(function (el) {\n        if (el != \"navigate\" && el != \"prevent-router\" && el != \"anchor\" && el != \"external\" && el != \"link\" && el != \"route\" && el != \"disabled-navigate\" && el != \"disabled-link-next-page\" && el != \"disabled-link-prev-page\" && el != \"disabled-link-anchor-page\" && el != \"disabled-popup-open\" && el != \"disabled-popover-with-data\") {\n          linkClass += el;\n        }\n      });\n    }\n    Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"addToSelection\"])($clickedEl[0]);\n  }\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"getSelectionRange\"])();\n  var linkObject = {\n    text: linkText,\n    type: linkType,\n    url: linkUrl,\n    anchor: linkAnchor,\n    class: linkClass\n  };\n  if ($clickedEl) {\n    linkCreation.call(app, linkObject, currentRange, $clickedEl);\n  } else {\n    linkCreation.call(app, linkObject, currentRange);\n  }\n}\nfunction linkCreation(linkObject, currentRange, oldLink) {\n  var app = this;\n  app.link.openLinkPopup(linkObject).then(function (res) {\n    // if (oldLink) {\n    //   oldLink.remove();\n    // }\n\n    Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionRange\"])(currentRange);\n    document.execCommand(\"insertHTML\", false, _textEditor_utils__WEBPACK_IMPORTED_MODULE_0__[\"parserIn\"].call(app, res));\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openLinkModal);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js":
/*!************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js ***!
  \************************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n\n\nfunction nbElement2(buttonEl) {\n  var app = this;\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"getSelectionRange\"])();\n  currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"getSelectionRange\"])();\n  var currentSelection = window.getSelection();\n  var selectedText = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"getSelectionHtml\"])();\n\n  // Check if the selected text contains a span with the class \"nb-element\"\n  var deleteExist = selectedText.includes('<span class=\"nb-element\">');\n\n  // If the selected text contains the span, remove it, otherwise add it\n  var newEl = \"\";\n  if (deleteExist) {\n    var tempDiv = document.createElement(\"div\");\n    tempDiv.innerHTML = selectedText;\n    var span = tempDiv.querySelector('span.nb-element');\n    if (span) {\n      span.replaceWith.apply(span, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(span.childNodes));\n      newEl = tempDiv.innerHTML;\n    }\n  } else {\n    newEl = \"<span class=\\\"nb-element\\\">\".concat(selectedText, \"</span>\");\n  }\n\n  // Insert the new HTML\n  Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"setSelectionRange\"])(currentRange);\n  document.execCommand(\"insertHTML\", false, newEl);\n}\nfunction nbElement(buttonEl) {\n  var self = this;\n  //debugger\n  var currentSelection = window.getSelection();\n  var selectedNodes = [];\n  var $selectedSpans;\n  if (currentSelection && currentSelection.anchorNode) {\n    var anchorNode = currentSelection.anchorNode;\n    while (anchorNode) {\n      selectedNodes.push(anchorNode);\n      if (!anchorNode.nextSibling || anchorNode === currentSelection.focusNode) {\n        anchorNode = null;\n      }\n      if (anchorNode) {\n        anchorNode = anchorNode.nextSibling;\n      }\n    }\n    $selectedSpans = $(selectedNodes).closest('span.nb-element').add($(selectedNodes).children('span.nb-element'));\n  }\n  var deleted = true;\n  if ($selectedSpans && $selectedSpans.length) {\n    $selectedSpans.each(function (spanIndex, spanNode) {\n      var selection = window.getSelection();\n      var range = document.createRange();\n      range.selectNodeContents(spanNode);\n      selection.removeAllRanges();\n      selection.addRange(range);\n      var fragment = document.createDocumentFragment();\n      while (spanNode.firstChild) {\n        fragment.appendChild(spanNode.firstChild);\n      }\n      spanNode.parentNode.replaceChild(fragment, spanNode);\n      selection.removeAllRanges();\n    });\n    deleted = false;\n  }\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"getSelectionRange\"])();\n  if (deleted && currentRange && currentSelection.rangeCount) {\n    var span = document.createElement('span');\n    span.className = 'nb-element';\n    var fragment = currentRange.cloneContents();\n    span.appendChild(fragment);\n    currentRange.deleteContents();\n    currentRange.insertNode(span);\n    var newRange = document.createRange();\n    newRange.selectNodeContents(span);\n    currentSelection.removeAllRanges();\n    currentSelection.addRange(newRange);\n  }\n  Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_1__[\"setSelectionRange\"])(currentRange);\n  console.log(\"nbelement 1\", self.contentEl.getHTML());\n  console.log(\"nbelement 1.1\", self);\n  self.emit('local::change textEditorChange', self, self.contentEl.getHTML());\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (nbElement);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/nbelement.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js":
/*!**********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js ***!
  \**********************************************************************************************************/
/*! exports provided: default, bindButtonsToEditor */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindButtonsToEditor\", function() { return bindButtonsToEditor; });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../textEditor-utils */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js\");\n/* harmony import */ var _audio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./audio */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/audio.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icon */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/icon.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./image */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/image.js\");\n/* harmony import */ var _citation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./citation */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/citation.js\");\n/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link */ \"./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/link.js\");\n\n\n\n\n\n\n\n\nfunction openPopoverModal() {\n  var $clickedEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n  var inAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var app = this;\n  var content,\n    classText = \"\";\n  var buttonText = app.translation.t(\"builder:content.linkAdd\");\n  // Editační mód\n  if ($clickedEl) {\n    buttonText = app.translation.t(\"builder:content.linkUpdate\");\n    content = $clickedEl.data(\"text\");\n    content = decodeURIComponent(content);\n    var allClasses = $clickedEl.attr(\"class\");\n    classText = allClasses.replace(\"link\", \"\").replace(\"disabled-popover-with-data\", \"\").replace(\"input-with-value\", \"\").replace(\"input-focused\", \"\").trim();\n    Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"addToSelection\"])($clickedEl[0]);\n  }\n  var currentRange = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"getSelectionRange\"])();\n  var currentSelection = window.getSelection();\n  var selectedText = currentSelection.toString();\n  var selectedNodes = [];\n  var $selectedLinks;\n  // debugger\n  if (currentSelection && currentSelection.anchorNode && $(currentSelection.anchorNode).parents(self.$el).length) {\n    var anchorNode = currentSelection.anchorNode;\n    while (anchorNode) {\n      selectedNodes.push(anchorNode);\n      if (!anchorNode.nextSibling || anchorNode === currentSelection.focusNode) {\n        anchorNode = null;\n      }\n      if (anchorNode) {\n        anchorNode = anchorNode.nextSibling;\n      }\n    }\n    $selectedLinks = $(selectedNodes).closest(\"a\").add($(selectedNodes).children(\"a\"));\n  }\n  var popoverModal = app.popup.create({\n    content: \"\\n              <div class=\\\"popup popup-citations\\\">\\n                <a class=\\\"link popup-close\\\"><i class=\\\"icon material-icons\\\">highlight_off</i></a>\\n                  <div class=\\\"toolbar tabbar\\\">\\n                    <div class=\\\"toolbar-inner\\\">\\n                     <h2>\".concat(app.translation.t(\"builder:content.popupTitle\"), \"</h2>\\n                    </div>\\n  \\n                  </div>\\n                  <div class=\\\"block\\\">\\n                    <div class=\\\"list inline-labels no-hairlines-md\\\">\\n                      <ul>\\n                          <li class=\\\"item-content item-input\\\">\\n                          <div class=\\\"item-inner\\\">\\n                            <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.linkContent\"), \"</div>\\n                            <div class=\\\"item-input-wrap\\\">\\n                              <input id=\\\"content\\\" type=\\\"text\\\" value=\\\"\").concat(selectedText, \"\\\">\\n                              <span class=\\\"input-clear-button\\\"></span>\\n                            </div>\\n                          </div>\\n                        </li>\\n                        <li class=\\\"item-content item-input\\\">\\n                          <div class=\\\"item-inner\\\">\\n                            <div class=\\\"item-title item-label\\\">\").concat(app.translation.t(\"builder:content.linkClass\"), \"</div>\\n                            <div class=\\\"item-input-wrap\\\">\\n                              <input type=\\\"text\\\" class=\\\"classInput\\\" value=\\\"\").concat(classText, \"\\\" placeholder=\\\"\").concat(app.translation.t(\"builder:content.linkClass\"), \"\\\">\\n                              <span class=\\\"input-clear-button\\\"></span>\\n                            </div>\\n                          </div>\\n                        </li>\\n                      </ul>\\n                      </div>\\n                      <div class=\\\"text-editor text-editor-resizable\\\" data-placeholder=\\\"Enter text...\\\" data-buttons='[\\\"bold\\\", \\\"italic\\\", \\\"underline\\\", \\\"strikeThrough\\\"]'>\\n                      <div class=\\\"text-editor-content\\\" contenteditable>\\n                      \").concat(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"parserIn\"].call(app, content), \"\\n                      </div>\\n                      </div>\\n\\n                      <button class=\\\"popover-add button button-fill\\\">\").concat(buttonText, \"</button>\\n                      \").concat($clickedEl ? \"<button class=\\\"popover-remove button\\\">\".concat(app.translation.t(\"builder:content.deletePopup\"), \"</button>\") : \"\", \"\\n                  </div>\\n              </div>\\n              \")\n  });\n  popoverModal.open();\n  var $popOverEl = popoverModal.$el;\n  var $container = $popOverEl.find(\".text-editor\");\n  var textEditor = app.textEditor.create({\n    el: $container,\n    mode: \"toolbar\",\n    clearFormattingOnPaste: false,\n    customButtons: {\n      // property key is the button id\n      icon: {\n        content: '<i class=\"icon material-icons\" data-icon=\"widgets\" ></i>',\n        onClick: function onClick(event, buttonEl) {\n          _icon__WEBPACK_IMPORTED_MODULE_4__[\"default\"].call(app, buttonEl);\n        }\n      },\n      customLink: {\n        content: '<i class=\"icon material-icons\" data-icon=\"link\" ></i>',\n        onClick: function onClick(event, buttonEl) {\n          _link__WEBPACK_IMPORTED_MODULE_7__[\"default\"].call(app);\n        }\n      },\n      citation: {\n        content: '<i class=\"icon material-icons\" data-icon=\"format_quote\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          _citation__WEBPACK_IMPORTED_MODULE_6__[\"default\"].call(app, buttonEl);\n        }\n      },\n      audio: {\n        content: '<i class=\"icon material-icons\" data-icon=\"audiotrack\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          _audio__WEBPACK_IMPORTED_MODULE_3__[\"default\"].call(app);\n        }\n      },\n      customImage: {\n        content: '<i class=\"icon material-icons\" data-icon=\"insert_photo\"></i>',\n        onClick: function onClick(event, buttonEl) {\n          _image__WEBPACK_IMPORTED_MODULE_5__[\"default\"].call(app, buttonEl);\n        }\n      }\n    },\n    buttons: [[\"bold\", \"italic\", \"underline\", \"strikeThrough\", \"subscript\", \"superscript\"], [\"customLink\", \"citation\", \"customImage\", \"icon\", \"audio\"]],\n    on: {\n      change: function change(editor, value) {\n        value = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"removeBadInlineStyles\"])(value);\n        // editor.setValue(`${value}`);\n\n        // debugger;\n        // editor.setValue(parserIn.call(app, value)); //skáče kurzor\n        content = \"\".concat(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"parserOut\"].call(app, value));\n        // debugger;\n        bindButtonsToEditor.call(app, editor);\n      },\n      input: function input(editor, value) {}\n    }\n  });\n  bindButtonsToEditor.call(app, textEditor);\n  $container.off(\"paste\");\n  $container.on(\"paste\", function (e) {\n    e.preventDefault();\n    var range = textEditor.getSelectionRange(); // uložení výběru textu\n    var html = e.clipboardData.getData(\"text/html\"); //získání html ze schránky\n    var formatedText = \"\";\n    if (!html || html == \"\") {\n      //pokud kopírovaný text není html je nutné získat plain text\n      formatedText = e.clipboardData.getData(\"text/plain\");\n    } else {\n      formatedText = Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"formatPasteHtml\"])(html); //funkce na očištění html\n    }\n    textEditor.setSelectionRange(range); //nastavení původního výběru\n\n    document.execCommand(\"insertHTML\", false, formatedText); // vložení očištěního html do editoru\n  });\n\n  // if (content) {\n  //   textEditor.setValue(content);\n  // }\n\n  $popOverEl.find(\".popover-add\").on(\"click\", function (e) {\n    var val = \"\";\n    var customText = $popOverEl.find(\"#content\").val();\n    var customClass = $popOverEl.find(\".classInput\").val();\n    if (textEditor.value.length > 0) {\n      val = encodeURIComponent(Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"removeBadInlineStyles\"])(textEditor.value));\n      if (inAction) {\n        return {\n          anchor: val,\n          titel: customText,\n          class: customClass\n        };\n      } else {\n        var popupLink = \"<a class=\\\"link disabled-popover-with-data \".concat(customClass, \"\\\" href=\\\"#\\\" data-text=\\\"\").concat(val, \"\\\">\").concat(customText, \"</a>\");\n        Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"setSelectionRange\"])(currentRange);\n        document.execCommand(\"insertHTML\", false, popupLink);\n      }\n    }\n    popoverModal.close();\n  });\n  $popOverEl.find(\".popover-remove\").on(\"click\", function (e) {\n    var customText = $popOverEl.find(\"#content\").val();\n    var popupLink = \"<span>\".concat(customText, \"</span>\");\n    Object(_textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"setSelectionRange\"])(currentRange);\n    document.execCommand(\"insertHTML\", false, popupLink);\n    popoverModal.close();\n  });\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (openPopoverModal);\nfunction bindButtonsToEditor(textEditor) {\n  var app = this;\n  var $editorContent = textEditor.$contentEl;\n\n  // debugger;\n  // $editorContent.html(parserIn.call(app, $editorContent.html()));\n\n  //-------- Links --------\n  var $link = $editorContent.find(\".disabled-navigate\");\n  $link.css(\"pointer-events\", \"auto\");\n  $link.off(\"click\");\n  $link.on(\"click\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    var $el = $$(this);\n    _link__WEBPACK_IMPORTED_MODULE_7__[\"default\"].call(app, $el);\n    return false;\n  });\n\n  //-------- Image --------\n  var $img = $editorContent.find(\"img\");\n  $img.off(\"click\");\n  $img.on(\"click\", /*#__PURE__*/function () {\n    var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(e) {\n      var target, url, style, split, width, height;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            target = $$(e.target);\n            url = _textEditor_utils__WEBPACK_IMPORTED_MODULE_2__[\"parserOut\"].call(app, target.attr(\"src\"));\n            style = target.attr(\"style\");\n            split = style.split(\";\");\n            width = \"100%\";\n            height = \"auto\";\n            if (split.length > 0) {\n              split.forEach(function (o) {\n                var val = o.split(\":\");\n                if (val[0].includes(\"height\")) height = val[1].trim();\n                if (val[0].includes(\"width\")) width = val[1].trim();\n              });\n            }\n            _image__WEBPACK_IMPORTED_MODULE_5__[\"default\"].call(app, null, url, width, height).then(function (ret) {\n              if (ret.delete) {\n                target.remove();\n              } else {\n                target.attr(\"src\", ret.url);\n                target.css(\"width\", ret.width);\n                target.css(\"height\", ret.height);\n              }\n              var val = $editorContent.html();\n              textEditor.emit(\"change\", textEditor, val);\n            });\n          case 8:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    }));\n    return function (_x) {\n      return _ref.apply(this, arguments);\n    };\n  }());\n  $img.off(\"dragstart drop\");\n  $img.on(\"dragstart drop\", function (e) {\n    e.preventDefault();\n    return false;\n  });\n\n  //-------- Audio --------\n  var $audio = $editorContent.find(\".disabled-builder-audio-player\");\n  $audio.css(\"pointer-events\", \"auto\");\n  $audio.off(\"click\");\n  $audio.on(\"click\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    var $el = $$(this);\n    _audio__WEBPACK_IMPORTED_MODULE_3__[\"default\"].call(app, $el);\n    return false;\n  });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/custom-components/popover.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js":
/*!*************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js ***!
  \*************************************************************************************************/
/*! exports provided: formatPasteHtml, removeBadInlineStyles, getSelectionRange, setSelectionRange, getSelectionHtml, parserIn, parserOut, addToSelection */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatPasteHtml\", function() { return formatPasteHtml; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeBadInlineStyles\", function() { return removeBadInlineStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSelectionRange\", function() { return getSelectionRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setSelectionRange\", function() { return setSelectionRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSelectionHtml\", function() { return getSelectionHtml; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parserIn\", function() { return parserIn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parserOut\", function() { return parserOut; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addToSelection\", function() { return addToSelection; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! sanitize-html */ \"./node_modules/sanitize-html/index.js\");\n/* harmony import */ var sanitize_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(sanitize_html__WEBPACK_IMPORTED_MODULE_1__);\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\nfunction formatPasteHtml(text) {\n  // debugger;\n  var bodyHtml = \"\";\n  var regex = /<body.*?>([\\s  \\S]*)<\\/body>/;\n  if (regex.test(text)) {\n    bodyHtml = regex.exec(text)[1];\n  } else {\n    bodyHtml = text;\n  }\n  //Sanatize HTML\n  var cleanHtml = sanitize_html__WEBPACK_IMPORTED_MODULE_1___default()(bodyHtml, {\n    allowedTags: [\"b\", \"i\", \"u\", \"em\", \"strong\", \"span\", \"a\", \"li\", \"ul\", \"ol\", \"sup\", \"sub\", \"strike\", \"div\"],\n    //povolené tagy k ponechání\n    allowedAttributes: {\n      // povolené atributy\n      \"*\": [\"style\"],\n      a: [\"href\", \"target\", \"class\", \"data-*\"],\n      i: [\"class\", \"data-*\", \"contenteditable\"]\n    },\n    allowedStyles: {\n      \"*\": {\n        //povolené styly\n        \"font-weight\": [/^[7,8,9]0*$/],\n        \"text-decoration\": [/^underline$/],\n        \"font-style\": [/^italic$/]\n        // 'vertical-align': [/^sub|super$/]\n      }\n    },\n    transformTags: {\n      //nahrazení tagů\n      i: function i(tagName, attribs) {\n        if (attribs.hasOwnProperty(\"class\") && attribs.class.includes(\"icon\")) {\n          return {\n            tagName: \"i\",\n            attribs: _objectSpread({}, attribs)\n          };\n        } else {\n          return {\n            tagName: \"em\"\n          };\n        }\n      },\n      p: \"div\",\n      b: function b(tagName, attribs) {\n        if (attribs.style && attribs.style.includes(\"font-weight\") && !/font-weight:\\s*([7,8,9]00|bold)*;/.test(attribs.style)) {\n          // google docs obaluje <b style=\"font-weight: 400\"> -> normalní text\n          return {\n            tagName: \"span\"\n          };\n        } else {\n          return {\n            tagName: \"strong\"\n          };\n        }\n      },\n      a: function a(tagName, attribs) {\n        var cls = \"link external\";\n        var trgt = \"_blank\";\n        var elem = \"a\";\n        var changed = false;\n\n        // debugger;\n\n        if (attribs.hasOwnProperty(\"class\") && (attribs.class.includes(\"disabled-navigate\") || attribs.class.includes(\"navigate\"))) {\n          cls = \"disabled-navigate link prevent-router route\";\n          trgt = \"\";\n          attribs.href = attribs.href.replaceAll(window.location.origin, \"\");\n          changed = true;\n        }\n        if (attribs.hasOwnProperty(\"class\") && (attribs.class.includes(\"disabled-builder-audio-player\") || attribs.class.includes(\"builder-audio-player\"))) {\n          cls = \"link disabled-builder-audio-player\";\n          trgt = \"\";\n          attribs.href = \"#\";\n          changed = true;\n        }\n        if (attribs.hasOwnProperty(\"class\") && attribs.class.includes(\"popover-with-data\")) {\n          cls = \"link popover-with-data\";\n          trgt = \"\";\n          attribs.href = \"#\";\n          changed = true;\n        }\n        if (!attribs.hasOwnProperty(\"href\") && !changed) {\n          elem = \"span\";\n          return {\n            tagName: elem,\n            attribs: _objectSpread({}, attribs)\n          };\n        } else {\n          return {\n            tagName: elem,\n            attribs: _objectSpread(_objectSpread({}, attribs), {}, {\n              class: cls,\n              target: trgt\n            })\n          };\n        }\n      },\n      span: function span(tagName, attribs) {\n        if (attribs.style && attribs.style.includes(\"vertical-align\") && /vertical-align:\\s*sub*;/.test(attribs.style)) {\n          // google docs obaluje <b style=\"font-weight: 400\"> -> normalní text\n          return {\n            tagName: \"sub\",\n            attribs: _objectSpread({}, attribs)\n          };\n        } else if (attribs.style && attribs.style.includes(\"vertical-align\") && /vertical-align:\\s*super*;/.test(attribs.style)) {\n          return {\n            tagName: \"sup\",\n            attribs: _objectSpread({}, attribs)\n          };\n        } else {\n          return {\n            tagName: \"span\",\n            attribs: _objectSpread({}, attribs)\n          };\n        }\n      }\n    }\n  });\n  return cleanHtml;\n}\nfunction removeBadInlineStyles(dirty) {\n  // debugger;\n  var clean = sanitize_html__WEBPACK_IMPORTED_MODULE_1___default()(dirty, {\n    allowedTags: [\"b\", \"i\", \"u\", \"em\", \"strong\", \"span\", \"a\", \"li\", \"ul\", \"ol\", \"sup\", \"sub\", \"div\", \"img\", \"blockquote\", \"br\", \"strike\"],\n    allowedAttributes: {\n      // povolené atributy\n      \"*\": [\"style\", \"class\", \"data-*\", \"align\"],\n      a: [\"href\", \"target\", \"class\"],\n      span: [\"class\"],\n      i: [\"contenteditable\"],\n      img: [\"src\"]\n    },\n    allowedStyles: {\n      \"*\": {\n        //povolené styly\n        \"font-weight\": [/^([7,8,9]0*|normal)$/],\n        \"text-decoration\": [/^underline$/],\n        \"text-decoration-line\": [/^underline$/],\n        \"font-style\": [/^italic$/],\n        \"text-align\": [/^(left|right|justify|center)*$/],\n        color: [/^#(0x)?[0-9a-f]+$/i, /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/, /^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/, /^var\\(--f7-theme-color\\)$/, /^var\\(--f7-theme-color-tint\\)$/, /^var\\(--f7-theme-color-shade\\)$/]\n        // 'vertical-align': [/^sub|super$/]\n      },\n      img: {\n        height: [/^\\d*(px|%|auto)$/],\n        width: [/^\\d*(px|%)$/]\n      }\n    },\n    transformTags: {\n      span: function span(tagName, attribs) {\n        if (attribs.style && attribs.style.includes(\"font-weight\") && /ont-weight:\\s*normal*;/.test(attribs.style)) {\n          // google docs obaluje <b style=\"font-weight: 400\"> -> normalní text\n          return {\n            tagName: \"strong\"\n          };\n        } else {\n          return {\n            tagName: \"span\",\n            attribs: _objectSpread({}, attribs)\n          };\n        }\n      }\n    }\n  });\n  // debugger;\n  return clean;\n}\nfunction getSelectionRange() {\n  if (window.getSelection) {\n    var sel = window.getSelection();\n    if (sel.getRangeAt && sel.rangeCount) {\n      return sel.getRangeAt(0);\n    }\n  } else if (document.selection && document.selection.createRange) {\n    return document.selection.createRange();\n  }\n  return null;\n}\nfunction setSelectionRange(range) {\n  if (range) {\n    if (window.getSelection) {\n      var sel = window.getSelection();\n      sel.removeAllRanges();\n      sel.addRange(range);\n    } else if (document.selection && range.select) {\n      range.select();\n    }\n  }\n}\nfunction getSelectionHtml() {\n  var html = \"\";\n  if (typeof window.getSelection != \"undefined\") {\n    var sel = window.getSelection();\n    if (sel.rangeCount) {\n      var container = document.createElement(\"div\");\n      for (var i = 0, len = sel.rangeCount; i < len; ++i) {\n        container.appendChild(sel.getRangeAt(i).cloneContents());\n      }\n      html = container.innerHTML;\n\n      // html = $$(container.innerHTML);\n      // if (html.length == 1) {\n      //   html = html[0].innerHTML;\n      // } else {\n      //   html = container.innerHTML;\n      // }\n    }\n  } else if (typeof document.selection != \"undefined\") {\n    if (document.selection.type == \"Text\") {\n      html = document.selection.createRange().htmlText;\n    }\n  }\n  return html;\n}\nfunction parserIn(text) {\n  var app = this;\n  if (text && text != \"\" && text.length > 0) {\n    var res = app.apiManager.replaceMediaServerPlaceholder(text);\n    res = res.replaceAll('\"navigate', '\"disabled-navigate');\n    res = res.replaceAll('%22navigate', '%22disabled-navigate');\n    res = res.replaceAll(\"builder-audio-player\", \"disabled-builder-audio-player\");\n    res = res.replaceAll(\"popup-open\", \"link disabled-popup-open\");\n    res = res.replaceAll(\"popover-with-data\", \"disabled-popover-with-data\");\n    res = res.replaceAll(\"tooltip-init\", \"disabled-tooltip-init\");\n    res = res.replaceAll(\"link-prev-page\", \"disabled-link-prev-page\");\n    res = res.replaceAll(\"link-next-page\", \"disabled-link-next-page\");\n    res = res.replaceAll(\"link-anchor-page\", \"disabled-link-anchor-page\");\n    return res;\n  } else {\n    return \"\";\n  }\n}\nfunction parserOut(text) {\n  var app = this;\n  var res = app.apiManager.replaceMediaServerPlaceholder(text);\n  res = res.replaceAll('\"disabled-navigate', '\"navigate');\n  res = res.replaceAll('%22disabled-navigate', \"%22navigate\");\n  res = res.replaceAll(\"disabled-builder-audio-player\", \"builder-audio-player\");\n  res = res.replaceAll(\"link disabled-popup-open\", \"popup-open\");\n  res = res.replaceAll(\"disabled-popover-with-data\", \"popover-with-data\");\n  res = res.replaceAll(\"disabled-tooltip-init\", \"tooltip-init\");\n  res = res.replaceAll(\"disabled-link-prev-page\", \"link-prev-page\");\n  res = res.replaceAll(\"disabled-link-next-page\", \"link-next-page\");\n  res = res.replaceAll(\"disabled-link-anchor-page\", \"link-anchor-page\");\n  return res;\n}\nfunction addToSelection(element) {\n  if (window.getSelection) {\n    var sel = window.getSelection();\n    sel.removeAllRanges();\n    var range = document.createRange();\n    range.selectNode(element);\n    sel.addRange(range);\n  } else if (document.selection) {\n    var textRange = document.body.createTextRange();\n    textRange.moveToElementText(element);\n    textRange.select();\n  }\n}\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/builder-content-settings/textEditor/textEditor-utils.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_development/geogebra/ggb-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_development/mm-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_development/mm-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_development/mm-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_development/recipe-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_development/recipe-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_development/recipe-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_development/recipe-02.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_development/recipe-02.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_development/recipe-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.less":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.less ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_development/resizable-grid-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js ***!
  \**********************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var latest_createjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! latest-createjs */ \"./node_modules/latest-createjs/index.js\");\n/* harmony import */ var latest_createjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(latest_createjs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_bodylight_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/bodylight-utils */ \"./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bodylight-utils.js\");\n\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n/*\r\n * AURELIA ONLINE\r\n * COMPONENT LIFECYCLE:\r\n * 1. constructor();\r\n * 2. created()\r\n * 3. bind()\r\n * 4. attached()\r\n * 5. detached()\r\n * 6. unbind()\r\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"bodylight-adobe-anim-01\",\n  title: \"Adobe animation\",\n  subtitle: \"\",\n  contentSetting: {\n    url: {\n      name: \"Anime source URL\",\n      type: \"textarea\"\n    },\n    animName: {\n      name: \"Animation name\",\n      type: \"textarea\"\n    },\n    animWidth: {\n      name: \"Width (px)\",\n      type: \"input-number\"\n    },\n    animHeight: {\n      name: \"Height (px)\",\n      type: \"input-number\"\n    },\n    autoPlay: {\n      name: \"Auto Play?\",\n      type: \"bool\"\n    },\n    responsive: {\n      name: \"Is responsive?\",\n      type: \"bool\"\n    },\n    bindingsAnim: {\n      name: \"Animation bindings (bind2anim)\",\n      type: \"array\",\n      values: {\n        findex: {\n          name: \"Array index of variable in simulation model (findex)\",\n          type: \"textarea\"\n        },\n        aname: {\n          name: \"Animation name (aname)\",\n          type: \"textarea\"\n        },\n        amin: {\n          name: \"Min value in animation (amin)\",\n          type: \"textarea\"\n        },\n        amax: {\n          name: \"Max value in animation (amax)\",\n          type: \"textarea\"\n        },\n        fmin: {\n          name: \"Min value from model (fmin)\",\n          type: \"textarea\"\n        },\n        fmax: {\n          name: \"Max value from model (fmax)\",\n          type: \"textarea\"\n        },\n        convertor: {\n          name: \"Convertor\",\n          type: \"textarea\"\n        }\n      }\n    },\n    bindingsText: {\n      name: \"Text of animation bindings (bind2animText)\",\n      type: \"array\",\n      values: {\n        findex: {\n          name: \"Array index of variable in simulation model\",\n          type: \"textarea\"\n        },\n        aname: {\n          name: \"Animation name\",\n          type: \"textarea\"\n        },\n        precision: {\n          name: \"Precision\",\n          type: \"textarea\"\n        },\n        convertor: {\n          name: \"Convertor\",\n          type: \"textarea\"\n        },\n        fixed: {\n          name: \"Fixed\",\n          type: \"textarea\"\n        },\n        prefix: {\n          name: \"Prefix\",\n          type: \"textarea\"\n        },\n        suffix: {\n          name: \"Suffix\",\n          type: \"textarea\"\n        }\n      }\n    },\n    bindingsPlay: {\n      name: \"Switch play bindings (bind2play)\",\n      type: \"array\",\n      values: {\n        findex: {\n          name: \"Array index of variable in simulation model\",\n          type: \"textarea\"\n        },\n        aname: {\n          name: \"Animation name\",\n          type: \"textarea\"\n        },\n        limit: {\n          name: \"Limit\",\n          type: \"textarea\"\n        }\n      }\n    }\n  },\n  content: {\n    url: \"https://bodylight.physiome.cz/Bodylight-Scenarios/ironmetabolism/DuodenumFinalObrazovka1.js\",\n    animName: \"DuodenumFinalObrazovka1\",\n    animWidth: 800,\n    animHeight: 600,\n    autoPlay: false,\n    responsive: true,\n    bindingsPlay: [],\n    bindingsAnim: [{\n      findex: 3,\n      aname: \"children.0.SipkaCervena1_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0,\n      fmax: 1000,\n      convertor: \"\"\n    }, {\n      findex: 3,\n      aname: \"Merak1_anim\",\n      amin: 0,\n      amax: 99,\n      fmin: 0,\n      fmax: 1000,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"children.0.SipkaCervena2_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"SipkaZlutaH_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"children.0.SipkaZlutaH1_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"SipkaFialovaHorni_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"SipkaModra_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"SipkaModraModryKanalSpodni_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"SipkaCervena3_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"CervenaPoolIn_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"Hemox_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 6,\n      aname: \"DcytB_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.91,\n      fmax: 2.74,\n      convertor: \"\"\n    }, {\n      findex: 8,\n      aname: \"CervenaKos_anim\",\n      amin: 0,\n      amax: 159,\n      fmin: 0.1,\n      fmax: 0.4,\n      convertor: \"\"\n    }, {\n      findex: 8,\n      aname: \"Merak5_anim\",\n      amin: 0,\n      amax: 100,\n      fmin: 0.1,\n      fmax: 0.4,\n      convertor: \"\"\n    }, {\n      findex: 7,\n      aname: \"Merak2Cerveny_anim\",\n      amin: 0,\n      amax: 99,\n      fmin: 0,\n      fmax: 16,\n      convertor: \"\"\n    }, {\n      findex: 7,\n      aname: \"SipkaSeda_anim\",\n      amin: 0,\n      amax: 100,\n      fmin: 0,\n      fmax: 16,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"Fe2Skupina_anim\",\n      amin: 100,\n      amax: 0,\n      fmin: 0.5,\n      fmax: 1.5,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"children.0.KanalCerveny_anim\",\n      amin: 0,\n      amax: 99,\n      fmin: 0.64,\n      fmax: 0.88,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"children.0.KanalModry_anim\",\n      amin: 0,\n      amax: 99,\n      fmin: 0.64,\n      fmax: 0.88,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"children.0.CervenaSrafovanaZastaveni1_anim\",\n      amin: 159,\n      amax: 0,\n      fmin: 0.5,\n      fmax: 1.5,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"children.0.CervenaSrafovanaZastaveni2_anim\",\n      amin: 159,\n      amax: 0,\n      fmin: 0.5,\n      fmax: 1.5,\n      convertor: \"\"\n    }, {\n      findex: 4,\n      aname: \"Merak4_anim\",\n      amin: 0,\n      amax: 99,\n      fmin: 0.5,\n      fmax: 1.5,\n      convertor: \"\"\n    }],\n    bindingsText: [{\n      findex: 3,\n      aname: \"Hodnota1_text\",\n      precision: 0,\n      convertor: \"1,219\",\n      fixed: 1,\n      suffix: \"\",\n      prefix: \"\"\n    }, {\n      findex: 8,\n      aname: \"Hodnota5_text\",\n      precision: 0,\n      convertor: \"10,2.73\",\n      fixed: 1,\n      suffix: \"\",\n      prefix: \"\"\n    }, {\n      findex: 7,\n      aname: \"Hodnota2Cerveny_text\",\n      precision: 0,\n      convertor: \"1,3.612\",\n      fixed: 1,\n      suffix: \"\",\n      prefix: \"\"\n    }, {\n      findex: 4,\n      aname: \"Hodnota4_text\",\n      precision: 0,\n      convertor: \"1,0.7428\",\n      fixed: 1,\n      suffix: \"\",\n      prefix: \"\"\n    }]\n  },\n  helpers: {\n    ani: {\n      cid: null,\n      container: null,\n      canvas: null,\n      overlay: null\n    },\n    stage: null,\n    bindings: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"component-main-container\\\">\\n      <div class=\\\"adobe-container\\\" style=\\\"width: \".concat(content.animWidth, \"; height: \").concat(content.animHeight, \";\\\">\\n        <canvas class=\\\"adobe-canvas\\\" id=\\\"adobeAnim\\\" width=\\\"\").concat(content.animWidth, \"\\\" height=\\\"\").concat(content.animHeight, \"\\\" style=\\\"display: block; background-color:rgba(255, 255, 255, 1.00);\\\"></canvas>\\n        <div  class=\\\"adobe-overlay\\\" style=\\\"pointer-events:none; overflow:hidden; width:\").concat(content.animWidth, \"px; height:\").concat(content.animHeight, \"px; position: absolute; left: 0px; top: 0px; display: block;\\\">\\n        </div>\\n      </div>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var methods = this.params.methods;\n      var pageEvents = component.pageComponentContext.$router.view.events;\n\n      // pageEvents.off(\"page:show\");\n      pageEvents.on(\"page:show\", function () {\n        methods.start();\n      });\n      // pageEvents.off(\"page:hide\");\n      pageEvents.on(\"page:hide\", function () {\n        methods.detached();\n      });\n      // pageEvents.off(\"page:destroy\");\n      pageEvents.once(\"page:destroy\", function () {\n        methods.detached();\n      });\n    }\n  },\n  methods: {\n    start: function start() {\n      var _helpers$bindings, _helpers$bindings2, _helpers$bindings3;\n      var $componentEl = this.$block;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n\n      //console.log(\"Adobe anim - init startup\");\n      //CONSTRUCTOR\n      // methods.detach();\n\n      methods.registerEvents();\n\n      //\n      //BIND\n\n      helpers.ani.container = $componentEl.find(\".adobe-container\")[0];\n      helpers.ani.canvas = $componentEl.find(\".adobe-canvas\")[0];\n      helpers.ani.overlay = $componentEl.find(\".adobe-overlay\")[0];\n\n      //ATTATCHED\n      if (helpers.ani) methods.disableAnimation();\n\n      //TODO: Play after start?\n\n      if (typeof createjs === \"undefined\") console.warn(\"WARN: createjs not present\");\n      var afterCreatejSLoad = function afterCreatejSLoad() {\n        //console.log(\"After CreatedJs\");\n        methods.loadScript(content.url).then(function (res) {\n          methods.initAdobeAnim();\n        }).catch(function (e) {\n          //\n          console.error(e);\n        });\n      };\n      var isCreatejsLoaded = function isCreatejsLoaded() {\n        //console.log(\"Is available CreatedJs\");\n        // if (typeof createjs === \"undefined\") {\n        //   setTimeout(() => isCreatejsLoaded, 500);\n        // } else afterCreatejSLoad();\n        var isCjsLoaded = false;\n        while (!isCjsLoaded) {\n          if (typeof createjs !== \"undefined\") {\n            isCjsLoaded = true;\n          }\n        }\n        afterCreatejSLoad();\n      };\n      (_helpers$bindings = helpers.bindings).push.apply(_helpers$bindings, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object(_utils_bodylight_utils__WEBPACK_IMPORTED_MODULE_2__[\"genAnimBindings\"])(content.bindingsAnim)));\n      (_helpers$bindings2 = helpers.bindings).push.apply(_helpers$bindings2, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object(_utils_bodylight_utils__WEBPACK_IMPORTED_MODULE_2__[\"genAnimTextBindings\"])(content.bindingsText)));\n      (_helpers$bindings3 = helpers.bindings).push.apply(_helpers$bindings3, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object(_utils_bodylight_utils__WEBPACK_IMPORTED_MODULE_2__[\"genAnimSwitchBindings\"])(content.bindingsPlay)));\n      isCreatejsLoaded();\n\n      // genAnimBindings(content.bindingsAnim);\n    },\n    detached: function detached() {\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      // let events = this.app.data.myEvents;\n      var events = this.pageComponentContext.$router.view.events;\n      console.info(\"Anim deatached\");\n      methods.disableAnimation();\n      methods.removeScript();\n      helpers = {\n        ani: {\n          cid: null,\n          container: null,\n          canvas: null,\n          overlay: null\n        },\n        stage: null,\n        bindings: []\n      };\n      events.off(\"fmidata\");\n      events.off(\"fmistart\");\n      events.off(\"fmistop\");\n      methods.destroyAdobe();\n    },\n    removeScript: function removeScript() {\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var src = content.url;\n      var tags = document.getElementsByTagName(\"script\");\n      for (var i = tags.length; i >= 0; i--) {\n        if (tags[i] && tags[i].getAttribute(\"src\") !== null && tags[i].getAttribute(\"src\").indexOf(src) !== -1) {\n          tags[i].parentNode.removeChild(tags[i]);\n        }\n      }\n    },\n    destroyAdobe: function destroyAdobe() {\n      var helpers = this.params.helpers;\n\n      //console.log(\"animate adobe destroy()\");\n\n      if (helpers.stage) {\n        helpers.stage.enableMouseOver(-1);\n        helpers.stage.enableDOMEvents(false);\n        helpers.stage.removeAllEventListeners();\n        helpers.stage.removeAllChildren();\n        helpers.stage.canvas = null;\n        helpers.stage = null;\n      }\n      if (helpers.ani && helpers.ani.exportRoot) helpers.ani.exportRoot = null;\n      if (helpers.ani && helpers.ani.ss) helpers.ani.ss = null;\n      if (helpers.ani && helpers.ani.lib) helpers.ani.lib = null;\n      if (helpers.ani && helpers.ani.comp) helpers.ani.comp = null;\n      if (helpers.ani && helpers.ani.cid) helpers.ani.cid = null;\n      if (helpers.ani && helpers.ani.objs) helpers.ani.objs = null;\n      if (helpers.ani && helpers.ani.animobjs) helpers.ani.animobjs = null;\n      if (helpers.ani && helpers.ani.textobjs) helpers.ani.textobjs = null;\n      if (helpers.ani && helpers.ani.playobjs) helpers.ani.playobjs = null;\n      window.AdobeAn = null;\n    },\n    registerEvents: function registerEvents() {\n      var app = this.app;\n      var methods = this.params.methods;\n      // let events = app.data.myEvents;\n      var events = this.pageComponentContext.$router.view.events;\n\n      //   events.on(\"animatestart\", (e) => {});\n      //   events.on(\"animatestop\", (e) => {});\n      events.on(\"fmidata\", function (e) {\n        methods.handleData(e);\n      });\n      events.on(\"fmistart\", function (e) {\n        //\n        methods.enableAnimation();\n        methods.startAllAnimation();\n      });\n      events.on(\"fmistop\", function (e) {\n        methods.stopAllAnimation();\n        methods.disableAnimation();\n      });\n    },\n    loadScript: function loadScript(url) {\n      var app = this.app;\n      var methods = this.params.methods;\n      var events = app.data.myEvents;\n      var content = this.params.content;\n      return new Promise(function (resolve, reject) {\n        //\n        var check = $$(document).find(\"script\");\n        check = _.filter(check, function (o) {\n          return o.src == url;\n        });\n        if (check.length > 0) {\n          var checkAvailability = setInterval(function () {\n            if (window.AdobeAn) {\n              clearInterval(checkAvailability);\n              //console.log(\"intIn\");\n              resolve({\n                msg: \"sript already loaded\"\n              });\n            }\n          }, 500);\n          // checkAvailability();\n          // resolve({ msg: \"sript already loaded\" });\n        } else {\n          var script = document.createElement(\"script\");\n          var prior = document.getElementsByTagName(\"script\")[0];\n          script.async = 1;\n          script.onload = function (o) {\n            var checkAvailability = setInterval(function () {\n              if (window.AdobeAn) {\n                clearInterval(checkAvailability);\n                //console.log(\"intIn2\");\n                resolve({\n                  msg: \"script added\"\n                });\n              }\n            }, 500);\n            // checkAvailability();\n            // resolve({ msg: \"script added\" });\n          };\n          script.onerror = function (e) {\n            if (!script.readyState || /loaded|complete/.test(script.readyState)) {\n              script.onerror = script.onload = script.onreadystatechange = null;\n              script = undefined;\n              // try to insert script by other app for previewing - scripts might be inserted into DOM\n              if (window.editorapi && typeof window.editorapi.insertScriptById === \"function\") {\n                //disable previoues definition\n                helpers.ani.destroyAdobe();\n                //enable current def\n                ////console.log('inserting script by thirdparty api');\n                window.editorapi.insertScriptById(source, \"adobeobj\").then(function (innerscript) {\n                  ////console.log('third party script node', innerscript);\n                  try {\n                    // eslint-disable-next-line no-eval\n                    eval(innerscript.innerHTML);\n                  } catch (e) {\n                    console.warn(\"Error during evaluation of adobe script. Probably OK to ignore\", e.message);\n                  }\n                  if (callback) setTimeout(callback, 1000);\n                });\n              }\n            }\n            console.warn(\"%c loadScript Adobe anim\", e, \"color: red;\");\n          };\n          script.src = url;\n          prior.parentNode.insertBefore(script, prior);\n        }\n      });\n    },\n    makeResponsive: function makeResponsive(isResp, respDim, isScale, scaleType, domContainers) {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      window.addEventListener(\"resize\", methods.handleResize);\n      helpers.ani.isResp = isResp;\n      helpers.ani.respDim = respDim;\n      helpers.ani.isScale = isScale;\n      helpers.ani.scaleType = scaleType;\n      helpers.ani.domContainers = domContainers;\n      methods.handleResize();\n    },\n    handleResize: function handleResize() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n\n      //console.log(\"animateadobe handleResize()\");\n      //do not run if ani.lib is not defined - no adobe component is available\n      if (!helpers.ani.lib) return;\n      var w = helpers.ani.lib.properties.width;\n      var h = helpers.ani.lib.properties.height;\n      var iw = window.innerWidth;\n      var ih = window.innerHeight;\n      if (helpers.ani.canvas && helpers.ani.canvas.parentElement && helpers.ani.canvas.parentElement.parentElement && helpers.ani.canvas.parentElement.parentElement.parentElement) {\n        iw = helpers.ani.canvas.parentElement.parentElement.parentElement.offsetWidth;\n        ih = helpers.ani.canvas.parentElement.parentElement.parentElement.offsetHeight;\n      }\n      ih = iw / (w / h);\n      //let iw = window.innerWidth; let ih = window.innerHeight;\n      var pRatio = window.devicePixelRatio || 1;\n      var xRatio = iw / w;\n      var yRatio = ih / h;\n      var sRatio = 1;\n      if (helpers.ani.isResp) {\n        if (helpers.ani.respDim === \"width\" && helpers.ani.lastW === iw || helpers.ani.respDim === \"height\" && helpers.ani.lastH === ih) {\n          sRatio = helpers.ani.lastS;\n        } else if (!helpers.ani.isScale) {\n          if (iw < w || ih < h) {\n            sRatio = Math.min(xRatio, yRatio);\n          }\n        } else if (helpers.ani.scaleType === 1) {\n          sRatio = Math.min(xRatio, yRatio);\n        } else if (helpers.ani.scaleType === 2) {\n          sRatio = Math.max(xRatio, yRatio);\n        }\n      }\n      helpers.ani.domContainers[0].width = w * pRatio * sRatio;\n      helpers.ani.domContainers[0].height = h * pRatio * sRatio;\n      helpers.ani.domContainers.forEach(function (container) {\n        container.style.width = w * sRatio + \"px\";\n        container.style.height = h * sRatio + \"px\";\n      });\n      helpers.ani.stage.scaleX = pRatio * sRatio;\n      helpers.ani.stage.scaleY = pRatio * sRatio;\n      helpers.ani.lastW = iw;\n      helpers.ani.lastH = ih;\n      helpers.ani.lastS = sRatio;\n      helpers.ani.stage.tickOnUpdate = false;\n      helpers.ani.stage.update();\n      helpers.ani.stage.tickOnUpdate = true;\n    },\n    initAdobeAnim: function initAdobeAnim() {\n      //console.log(\"init Adobe\");\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var id = \"#adobeAnim\";\n      var el = this.$block.find(id)[0];\n\n      // if (!helpers.ani.cid) {\n      //   let keys = [];\n      //   let loadedAnimsEl = $$(document).find(\".bodylight-adobe-anim-01\");\n      //   //\n      //   loadedAnimsEl.forEach((el) => {\n      //     let id = $$(el).attr(\"id\");\n      //     let comp = app.builder.helpers.findComponentById(id);\n      //     //\n      //     if (comp.params.helpers.ani.cid)\n      //       keys.push(comp.params.helpers.ani.cid);\n      //   });\n      //   //\n      //   for (let cid of Object.keys(window.AdobeAn.compositions)) {\n      //     if (!keys.includes(cid)) {\n      //       helpers.ani.cid = cid;\n      //       break;\n      //     }\n      //   }\n      // }\n\n      for (var _i = 0, _Object$keys = Object.keys(window.AdobeAn.compositions); _i < _Object$keys.length; _i++) {\n        var cid = _Object$keys[_i];\n        var comp = window.AdobeAn.getComposition(cid);\n        var lib = comp.getLibrary();\n        //\n        if (lib[content.animName] || lib[\"_\" + content.animName]) {\n          // helpers.ani.cid = cid;\n          helpers.ani.lib = lib;\n          helpers.ani.comp = comp;\n          break;\n        }\n      }\n\n      // helpers.ani.lib = helpers.ani.comp.getLibrary();\n\n      helpers.ani.ss = helpers.ani.comp.getSpriteSheet();\n      helpers.ani.exportRoot = new helpers.ani.lib[content.animName]();\n      helpers.ani.stage = new helpers.ani.lib.Stage(el);\n      helpers.stage = helpers.ani.stage;\n      // debugger;\n      // MAKE RESPONSIVE?\n      if (content.responsive) methods.makeResponsive(true, \"both\", true, 1, [helpers.ani.canvas, helpers.ani.container, helpers.ani.overlay]);\n      window.AdobeAn.compositionLoaded(helpers.ani.lib.properties.id);\n      methods.fnStartAnimation();\n      setTimeout(function () {\n        //get anim object\n        helpers.ani.objs = Object.keys(helpers.ani.exportRoot.children[0]);\n        //filter objects by purpose - so it can be bind to model value\n        helpers.ani.animobjs = helpers.ani.objs.filter(function (name) {\n          return name.includes(\"_anim\");\n        });\n        helpers.ani.textobjs = helpers.ani.objs.filter(function (name) {\n          return name.includes(\"_text\");\n        });\n        helpers.ani.playobjs = helpers.ani.objs.filter(function (name) {\n          return name.includes(\"_play\");\n        });\n\n        //stop animation if it is not yet started by other events, adobe automatically starts animation\n\n        // if(!content.autoPlay){\n        // //   methods.enableAnimation();\n        // // }else{\n        //   methods.stopAllAnimation();\n        //   methods.disableAnimation();\n        // }\n\n        // debugger;\n        if (!helpers.ani.animationstarted && !content.autoPlay) {\n          //stop all animation\n          methods.stopAllAnimation();\n          methods.disableAnimation();\n          //sent ready signal - fmu may make step if oneshot\n          // let event = new CustomEvent(\"fmiregister\");\n          // document.dispatchEvent(event);\n          app.data.myEvents.emit(\"fmiregister\");\n        }\n      }, 1000);\n    },\n    fnStartAnimation: function fnStartAnimation() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      helpers.ani.stage.addChild(helpers.ani.exportRoot);\n\n      //\n      //by default tickr uses setTimeout API, force to use requestAnimationFrame APIe\n      window.createjs.Ticker.timingMode = window.createjs.Ticker.RAF_SYNCHED;\n      window.createjs.Ticker.framerate = helpers.ani.lib.properties.fps;\n      methods.enableAnimation();\n      if (!helpers.ani.playafterstart) helpers.ani.animationstarted = false; //initial animation is not started\n    },\n    enableAnimation: function enableAnimation() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      if (helpers.ani.stage) {\n        window.createjs.Ticker.addEventListener(\"tick\", helpers.ani.stage);\n      }\n      helpers.ani.animationstarted = true;\n    },\n    stopAllAnimation: function stopAllAnimation() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      // debugger;\n      if (helpers.ani.stage) {\n        helpers.ani.stage.stop();\n      }\n    },\n    startAllAnimation: function startAllAnimation() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      if (helpers.ani.stage) {\n        //TODO call removeEventListener and refactor adding listener when animation should start\n        if (!helpers.ani.animationstarted) methods.enableAnimation(); //window.createjs.Ticker.addEventListener('tick', helpers.ani.stage);\n        helpers.ani.stage.play();\n      }\n    },\n    disableAnimation: function disableAnimation() {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n\n      // alert(\"disabled\");\n\n      if (helpers.ani) {\n        helpers.ani.animationstarted = false;\n        if (helpers.ani.stage) {\n          window.createjs.Ticker.removeEventListener(\"tick\", helpers.ani.stage);\n        }\n      }\n    },\n    // asignBindings: function (data) {\n    //   let helpers = this.params.helpers;\n\n    //   for (let i = 0; i < data.length; i++) {\n    //     let _fmax = parseFloat(data[i].fmax);\n    //     let _fmin = parseFloat(data[i].fmin);\n    //     let _amax = parseFloat(data[i].amax);\n    //     let _amin = parseFloat(data[i].amin);\n    //     let _k1 = 1 / (_fmax - _fmin);\n    //     let _k2 = _fmin / (_fmax - _fmin);\n    //     let _k3 = _amax - _amin;\n\n    //     let bindObject = {\n    //       findex: data[i].findex,\n    //       aname: data[i].aname,\n    //       amin: _amin,\n    //       amax: _amax,\n    //       fmin: _fmin,\n    //       fmax: _fmax,\n    //       k1: _k1,\n    //       k2: _k2,\n    //       k3: _k3,\n    //     };\n\n    //     helpers.bindings.push(bindObject);\n    //   }\n    // },\n    // convertf2a: function (x, binding) {\n    //   if (x < binding.fmin) return binding.amin;\n    //   if (x < binding.fmax)\n    //     return binding.amin + (x * binding.k1 - binding.k2) * binding.k3;\n    //   return binding.amax;\n    // },\n    handleData: function handleData(data) {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      //\n      var bindings = helpers.bindings;\n      if (!bindings) return;\n      var index = 0;\n      var _iterator = _createForOfIteratorHelper(bindings),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var binding = _step.value;\n          //binding = {findex:findex,aname:aname,amin:amin,amax:amax,fmin:fmin,fmax:fmax}\n          // let value = data.detail.data[binding.findex];\n          var value = binding.findex == -1 ? data.detail.time : data.detail.data[binding.findex];\n          switch (binding.constructor.name) {\n            case \"Bind2Anim\":\n              methods.setAnimationValue(binding.aname, binding.convertf2a(value));\n              break;\n            case \"Bind2AnimText\":\n              methods.setText(binding.aname, binding.convertf2a(value));\n              break;\n            case \"Bind2AnimSwitch\":\n              if (!binding.triggered) {\n                if (value > binding.limit) {\n                  // debugger;\n                  methods.startAnimation(binding.aname);\n                  bindings[index].triggered = true;\n                }\n              } else {\n                if (value <= binding.limit) {\n                  methods.stopAnimation(binding.aname);\n                  bindings[index].triggered = false;\n                }\n              }\n              break;\n          }\n          index++;\n\n          // if (binding.constructor.name == \"Bind2Anim\") {\n          //   methods.setText(binding.aname, value);\n          // } else if (binding.aname.endsWith(\"_anim\")) {\n          //   let convertedvalue = methods.convertf2a(value, binding);\n          //   methods.setAnimationValue(binding.aname, convertedvalue);\n          // }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n    },\n    startAnimation: function startAnimation(objname) {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var resolvePath = function resolvePath(object, path, defaultValue) {\n        return path.split(\".\").reduce(function (o, p) {\n          return o ? o[p] : defaultValue;\n        }, object);\n      };\n      var myobj = resolvePath(helpers.ani.exportRoot, objname, undefined);\n      if (!myobj) myobj = resolvePath(helpers.ani.exportRoot.children[0], objname, undefined);\n      if (myobj) myobj.play();\n    },\n    stopAnimation: function stopAnimation(objname) {\n      var app = this.app;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var resolvePath = function resolvePath(object, path, defaultValue) {\n        return path.split(\".\").reduce(function (o, p) {\n          return o ? o[p] : defaultValue;\n        }, object);\n      };\n      var myobj = resolvePath(helpers.ani.exportRoot, objname, undefined);\n      //backward compatibility\n      if (!myobj) myobj = resolvePath(helpers.ani.exportRoot.children[0], objname, undefined);\n      if (myobj) myobj.stop();\n    },\n    setText: function setText(objname, textvalue) {\n      var helpers = this.params.helpers;\n      if (helpers.ani.exportRoot) {\n        var resolvePath = function resolvePath(object, path, defaultValue) {\n          return path.split(\".\").reduce(function (o, p) {\n            return o ? o[p] : defaultValue;\n          }, object);\n        };\n        var myobj = resolvePath(helpers.ani.exportRoot, objname, undefined);\n        if (!myobj) myobj = resolvePath(helpers.ani.exportRoot.children[0], objname, undefined);\n        if (myobj) myobj.text = textvalue;\n        // else\n        //   console.warn(\n        //     \"objname is undefined for helpers.ani.exportRoot\",\n        //     objname\n        //   );\n      }\n    },\n    setAnimationValue: function setAnimationValue(objname, value) {\n      var helpers = this.params.helpers;\n      ////console.log('adobe-animate() setting helpers.ani.exportRoot.children[0][' + objname + '].gotoAndStop(' + value + ')');\n      if (helpers.ani.exportRoot) {\n        //resolve path from string\n        var resolvePath = function resolvePath(object, path, defaultValue) {\n          return path.split(\".\").reduce(function (o, p) {\n            return o ? o[p] : defaultValue;\n          }, object);\n        };\n        var myobj = resolvePath(helpers.ani.exportRoot, objname, undefined);\n        if (!myobj) myobj = resolvePath(helpers.ani.exportRoot.children[0], objname, undefined);\n        //\n        if (myobj) myobj.gotoAndStop(Math.floor(value));\n        // else\n        //   console.warn(\n        //     \"objname is undefined for helpers.ani.exportRoot\",\n        //     objname\n        //   );\n        //helpers.ani.exportRoot.children[0][objname].gotoAndStop(value);\n      }\n    }\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-adobe-anim-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.less":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.less ***!
  \********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-button-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.less":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.less ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-checkbox-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.less":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.less ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylight-range-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js ***!
  \***************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _bodylignt_fmi_01_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bodylignt-fmi-01.less */ \"./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.less\");\n/* harmony import */ var _bodylignt_fmi_01_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_bodylignt_fmi_01_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/*\r\n * AURELIA ONLINE\r\n * COMPONENT LIFECYCLE:\r\n * 1. constructor();\r\n * 2. created()\r\n * 3. bind()\r\n * 4. attached()\r\n * 5. detached()\r\n * 6. unbind()\r\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"bodylight-fmi-01\",\n  title: \"Adobe simulation controls\",\n  subtitle: \"\",\n  contentSetting: {\n    // simulationId: {\n    //   name: \"Simulation ID\",\n    //   type: \"textarea\",\n    //   help: \"Id that will be refered from control components.\",\n    // },\n    url: {\n      name: \"Simulation source URL\",\n      type: \"textarea\"\n    },\n    fminame: {\n      name: \"Simulation model name\",\n      type: \"textarea\"\n    },\n    guid: {\n      name: \"Simulation GUID\",\n      type: \"textarea\"\n    },\n    mode: {\n      name: \"Is animation continous?\",\n      type: \"bool\"\n    },\n    tolerance: {\n      name: \"Tolerance\",\n      type: \"input-number\"\n    },\n    startTime: {\n      name: \"Start time\",\n      type: \"input-number\"\n    },\n    fStepSize: {\n      //fstepsize\n      name: \"Step size\",\n      type: \"input-number\"\n    },\n    fpsLimit: {\n      name: \"FPS limit\",\n      type: \"input-number\"\n    },\n    ticksToUpdate: {\n      name: \"Ticks to update\",\n      type: \"input-number\"\n    },\n    stepsperframe: {\n      name: \"stepsperframe\",\n      type: \"input-number\"\n    },\n    showTime: {\n      name: \"Show simulation time\",\n      type: \"bool\",\n      hidden: {\n        showTimeMultiply: {\n          name: \"Time multiplier\",\n          type: \"input-number\"\n        }\n      }\n    },\n    showInfo: {\n      name: \"Show legend for simulation\",\n      type: \"bool\",\n      hidden: {\n        legend: {\n          name: \"Legend\",\n          type: \"action\"\n        }\n      }\n    },\n    valuereferences: {\n      name: \"Number of the reference\",\n      type: \"textarea\",\n      help: \"Each of the reference separate by comma (,)\"\n    },\n    controllers: {\n      name: \"Controllers array\",\n      type: \"array\",\n      values: {\n        controllerId: {\n          name: \"Controller ID\",\n          type: \"textarea\"\n        },\n        variableRef: {\n          name: \"Variable ref\",\n          type: \"textarea\"\n        },\n        numerator: {\n          name: \"Numerator\",\n          type: \"input-number\"\n        },\n        denominator: {\n          name: \"Denumerator\",\n          type: \"input-number\"\n        },\n        addconst: {\n          name: \"Addconst\",\n          type: \"textarea\"\n        },\n        fixed: {\n          name: \"Fixed\",\n          type: \"textarea\"\n        }\n      }\n    }\n  },\n  content: {\n    // simulationId: \"id1\",\n    mode: true,\n    url: \"https://bodylight.physiome.cz/Bodylight-Scenarios/ironmetabolism/FeMetabolism_FeMetabolismModel.js\",\n    fminame: \"FeMetabolism_FeMetabolismModel\",\n    guid: \"{ff6d8a55-f24a-4855-bbf0-86edcafe471e}\",\n    tolerance: 0.000001,\n    startTime: 0,\n    fStepSize: 0.005,\n    showTime: true,\n    showTimeMultiply: 3600,\n    showInfo: false,\n    ticksToUpdate: 30,\n    fpsLimit: 60,\n    stepsperframe: 1,\n    controllers: [{\n      controllerId: \"id1\",\n      variableRef: \"16777260\",\n      numerator: 1,\n      denominator: 1,\n      addconst: \"\",\n      fixed: \"\"\n    }],\n    valuereferences: \"637534208,637534209,100663315,16777260,33554448,33554449,637534228,905969688,637534231,16777271,16777272\",\n    legend: {\n      anchor: \"\",\n      class: \"\",\n      title: \"\",\n      type: \"external\",\n      url: \"https://google.com\"\n    }\n  },\n  helpers: {\n    animationStarted: false,\n    doingStep: false,\n    initialized: false,\n    changes: [],\n    simulationInstance: {},\n    fmiinst: {},\n    stepIndex: 0,\n    changeinputs: [],\n    inputRefs: [],\n    references: [],\n    simulationTime: \"0 00:00:00\",\n    resetBeforeChange: false,\n    isOneshot: false,\n    measureFPS: false,\n    fmuspeed: 1.0,\n    fpsTick: 0,\n    startfpstime: null,\n    fpsInterval: null,\n    ticksToUpdate: 0\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"control-container\\\">\\n        \".concat(content.mode ? \"\\n       <div class=\\\"main-controls\\\">\\n        <button class=\\\"button button-outline button-raised play\\\"><i class=\\\"icon material-icons play-icon\\\" data-icon=\\\"play_arrow\\\"></i></button>\\n        <button class=\\\"button button-outline button-raised step\\\"><i class=\\\"icon material-icons\\\" data-icon=\\\"skip_next\\\"></i></button>\\n        <button class=\\\"button button-fill button-raised reset\\\"><i class=\\\"icon material-icons\\\" data-icon=\\\"refresh\\\"></i></button>\\n       </div>\\n       \".concat(content.showInfo ? \"\\n       <div class=\\\"info-container\\\">\\n        \\n        \".concat(content.legend ? component.app.link.createLinkElement(_objectSpread(_objectSpread({}, content.legend), {}, {\n      title: \"\\n            <i class=\\\"icon material-icons\\\" data-icon=\\\"info\\\"></i>\"\n    })) : '', \" \\n       </div>\\n       \") : \"\", \"\\n        \") : \"\", \"\\n        </div>\\n        <div class=\\\"timer-container\\\">\\n          <div class=\\\"col\\\">\\n            \").concat(content.showTime ? \"<div class=\\\"time-container\\\">\\n                    <div>d hh:mm:ss</div>\\n                    <div class=\\\"time-input\\\">0 00:00:00</div>\\n                    </div>\\n                  \" : \"\", \"\\n          </div>\\n          <div class=\\\"col\\\">\\n          <label class=\\\"checkbox\\\"><input class=\\\"checkbox-input\\\" type=\\\"checkbox\\\" /><i class=\\\"icon-checkbox\\\"></i></label>\\n          </div>\\n          <span class=\\\"speed-container col hide\\\">\\n          <div class=\\\"fps-counter\\\">\\n            FPS: \").concat(content.fpsLimit, \"\\n          </div>\\n          <label class=\\\"select-label\\\">\\n            <select class=\\\"select\\\">\\n                  <option value=\\\"0.1\\\">0.1x</option>\\n                  <option selected value=\\\"1\\\">1.0x</option>\\n                  <option value=\\\"10\\\">10.0x</option>\\n                  <option value=\\\"100\\\">100.0x</option>\\n            </select>\\n          </label>\\n          </span>\\n    </div>\");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var app = this.app;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      var pageEvents = component.pageComponentContext.$router.view.events;\n\n      // pageEvents.off(\"page:show\");\n      pageEvents.on(\"page:show\", function () {\n        methods.start();\n      });\n      // pageEvents.off(\"page:hide\");\n      pageEvents.on(\"page:hide\", function () {\n        // console.log(component, page);\n        // debugger;\n        methods.reset();\n        methods.detach();\n      });\n      // pageEvents.off(\"page:destroy\");\n      pageEvents.once(\"page:destroy\", function () {\n        methods.detach();\n      });\n    }\n  },\n  methods: {\n    start: function start() {\n      var app = this.app;\n      var $componentEl = this.$block;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      //\n      // CONSTRUCTOR\n      helpers.changeinputs = [];\n      //CREATED\n      //BIND\n      helpers.isOneshot = !content.mode;\n      helpers.ticksToUpdate = content.ticksToUpdate;\n      //ATTACHED\n\n      helpers.mydata = [0, 0];\n\n      // content.valuereferences.forEach(function (ref) {\n      //   helpers.references.push(ref.val);\n      // });\n      var refsSplited = content.valuereferences.split(\",\");\n      refsSplited.forEach(function (ref) {\n        helpers.references.push(parseInt(ref));\n      });\n      // helpers.references = refsSplited;\n\n      methods.loadScript(content.url).then(function (ret) {\n        console.info(\"FML\", ret.msg);\n        // setTimeout(() => {\n        methods.initFmi();\n        // }, 1000);\n      });\n      var playBtn = $componentEl.find(\".play\");\n      var stepBtn = $componentEl.find(\".step\");\n      var resetBtn = $componentEl.find(\".reset\");\n      var checkboxEl = $componentEl.find(\".checkbox-input\");\n      var speedEl = $componentEl.find(\".speed-container\");\n      var selectEl = $componentEl.find(\".select\");\n      checkboxEl.off(\"change\");\n      checkboxEl.on(\"change\", function () {\n        var checked = checkboxEl.prop(\"checked\");\n        if (checked) {\n          helpers.measureFPS = true;\n          speedEl.removeClass(\"hide\");\n        } else {\n          helpers.measureFPS = false;\n          speedEl.addClass(\"hide\");\n        }\n      });\n      selectEl.off(\"change\");\n      selectEl.on(\"change\", function (e) {\n        var val = selectEl.val();\n        methods.fmuspeedChanged(val);\n      });\n\n      //\n      playBtn.off(\"click\");\n      playBtn.on(\"click\", function (e) {\n        methods.startStop();\n      });\n      resetBtn.off(\"click\");\n      resetBtn.on(\"click\", function (e) {\n        methods.reset();\n      });\n      stepBtn.off(\"click\");\n      stepBtn.on(\"click\", function (e) {\n        methods.step();\n      });\n      //Event catchers\n      app.data.myEvents.off(\"bodylight:changed\");\n      app.data.myEvents.on(\"bodylight:changed\", function (data) {\n        //\n        var check = _.find(content.controllers, function (o) {\n          return o.controllerId == data.id && !o.deleted;\n        });\n        if (check) {\n          if (check.fixed == \"f\" || isNaN(check.addconst) && check.addconst == \"f\") {\n            helpers.resetBeforeChange = true;\n          } else {\n            helpers.resetBeforeChange = false;\n          }\n\n          // console.info(\"bodylight:changed\", data);\n          helpers.changeinputs.push({\n            id: data.id,\n            value: data.value\n          });\n        }\n      });\n    },\n    detach: function detach() {\n      var $componentEl = this.$block;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      if (helpers.animationStarted) {\n        methods.startStop();\n      }\n\n      // window[content.fminame] = null;\n\n      // //console.log(window[content.fminame]);\n      // window[content.fminame] = null;\n\n      // helpers = {\n      //   animationStarted: false,\n      //   doingStep: false,\n      //   initialized: false,\n      //   changes: [],\n      //   simulationInstance: {},\n      //   fmiinst: {},\n      //   stepIndex: 0,\n      //   changeinputs: [],\n      //   inputRefs: [],\n      //   references: [],\n      //   simulationTime: \"0 00:00:00\",\n      //   resetBeforeChange: false,\n      //   isOneshot: false,\n      //   measureFPS: false,\n      //   fmuspeed: 1.0,\n      //   fpsTick: 0,\n      //   startfpstime: null,\n      //   fpsInterval: null,\n      //   ticksToUpdate: 0,\n      // };\n\n      var playBtn = $componentEl.find(\".play\");\n      var stepBtn = $componentEl.find(\".step\");\n      var resetBtn = $componentEl.find(\".reset\");\n      var checkboxEl = $componentEl.find(\".checkbox-input\");\n      var selectEl = $componentEl.find(\".select\");\n      checkboxEl.off(\"change\");\n      selectEl.off(\"change\");\n      playBtn.off(\"click\");\n      resetBtn.off(\"click\");\n      stepBtn.off(\"click\");\n      this.reRender();\n\n      // methods.removeScript();\n    },\n    loadScript: function loadScript(url) {\n      var app = this.app;\n      return new Promise(function (resolve, reject) {\n        var check = $$(document).find(\"script\");\n        check = _.filter(check, function (o) {\n          return o.src == url;\n        });\n        var prior = document.getElementsByTagName(\"script\")[0];\n        //\n        if (check.length > 0) {\n          resolve({\n            msg: \"sript already loaded\"\n          });\n        } else {\n          var script = document.createElement(\"script\");\n          script.async = 1;\n          script.onload = function (_, isAbort) {\n            if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {\n              script.onerror = script.onload = null;\n              script = undefined;\n              resolve({\n                msg: \"script added\"\n              });\n            }\n          };\n          script.onerror = function (e) {\n            if (!script.readyState || /loaded|complete/.test(script.readyState)) {\n              script.onerror = script.onload = null;\n              script = undefined;\n              // try to insert script by other app for previewing - scripts might be inserted into DOM\n              if (window.editorapi && typeof window.editorapi.insertScriptById === \"function\") {\n                //console.log(\"inserting script by thirdparty api\");\n                window.editorapi.insertScriptById(source, \"fmiobj\");\n              }\n            }\n            console.warn(\"%c loadScript Adobe anim\", e, \"color: red;\");\n            resolve({\n              msg: \"error\"\n            });\n          };\n          script.src = url;\n          prior.parentNode.insertBefore(script, prior);\n        }\n      });\n    },\n    removeScript: function removeScript() {\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var src = content.url;\n      var tags = document.getElementsByTagName(\"script\");\n      for (var i = tags.length; i >= 0; i--) {\n        if (tags[i] && tags[i].getAttribute(\"src\") !== null && tags[i].getAttribute(\"src\").indexOf(src) !== -1) {\n          tags[i].parentNode.removeChild(tags[i]);\n        }\n      }\n    },\n    startStop: function startStop() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var icon = this.$block.find(\".play-icon\")[0];\n      if (helpers.animationStarted) {\n        $(icon).attr(\"data-icon\", \"play_arrow\");\n        methods.stopSimulation();\n        methods.sendStopEvent();\n      } else {\n        $(icon).attr(\"data-icon\", \"stop\");\n        methods.sendStartEvent();\n        methods.startSimulation();\n      }\n    },\n    reset: function reset() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      helpers.stepTime = 0;\n      helpers.stepSize = typeof content.fStepSize === \"string\" ? parseFloat(content.fStepSize) : content.fStepSize;\n      helpers.mystep = helpers.stepSize;\n      try {\n        methods.setupExperiment();\n        helpers.fmiReset(helpers.fmiinst);\n      } catch (e) {}\n\n      //set input variables for possible change of non-tunable - fixed parameter values\n\n      methods.setInputVariables();\n      methods.initialize();\n\n      //Emit reset? fmireset\n    },\n    setInputVariables: function setInputVariables() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      if (helpers.changeinputs.length > 0) {\n        var _loop = function _loop() {\n          var myinput = helpers.changeinputs.shift(); //remove first item\n          var inputRef = _.find(content.controllers, function (o) {\n            return o.controllerId == myinput.id && !o.deleted;\n          });\n          var addC = inputRef.addconst;\n          if (isNaN(addC) || addC == \"\") {\n            addC = 0;\n          }\n          var normalizedvalue = myinput.value * inputRef.numerator / inputRef.denominator + addC;\n          if (myinput.id) methods.setSingleReal(inputRef.variableRef, normalizedvalue);\n        };\n        while (helpers.changeinputs.length > 0) {\n          _loop();\n        }\n        methods.flushRealQueue();\n      }\n    },\n    startSimulation: function startSimulation() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      helpers.animationStarted = true;\n      helpers.fpsInterval = 1000 / (isNaN(content.fpsLimit) ? parseInt(content.fpsLimit, 10) : content.fpsLimit);\n      var then = window.performance.now();\n      var _performAnimation = function performAnimation(newtime) {\n        if (!helpers.animationStarted) return;\n        helpers.request = requestAnimationFrame(_performAnimation);\n        var elapsed = 0;\n        var now = 0;\n        if (content.fpsLimit && content.fpsLimit < 60) {\n          if (isNaN(content.fpsLimit)) content.fpsLimit = parseInt(content.fpsLimit, 10);\n          now = newtime;\n          ////console.log('limiting fps to fpsLimit, newtime, now, then, fpsinterval', this.fpsLimit, newtime, this.now, this.then, this.fpsInterval);\n          elapsed = now - then;\n          ////console.log('elapsed,fpsinterval', this.elapsed, this.fpsInterval);\n          if (elapsed > helpers.fpsInterval) {\n            then = now - elapsed % helpers.fpsInterval;\n            methods.step();\n          }\n        } else {\n          for (var i = 0; i < content.stepsperframe; i++) methods.step();\n        }\n      };\n      _performAnimation();\n    },\n    stopSimulation: function stopSimulation() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var content = this.params.content;\n      helpers.animationStarted = false;\n      cancelAnimationFrame(helpers.request);\n    },\n    initFmi: function () {\n      var _initFmi = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee() {\n        var app, helpers, content, that, myinst;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              app = this.app;\n              helpers = this.params.helpers;\n              content = this.params.content;\n              that = {}; //helpers.inst = await window[content.fminame]();\n              that.fminame = content.fminame;\n              _context.next = 7;\n              return window[that.fminame]();\n            case 7:\n              myinst = _context.sent;\n              if (myinst instanceof Promise) {\n                alert(\"promise\");\n              } else {\n                that.inst = myinst;\n                if (!window.fmiinst) {\n                  window.fmiinst = [];\n                }\n                window.fmiinst[that.fminame] = that;\n              }\n\n              // let myinst = await window[content.fminame]();\n\n              // // helpers.fmiinst =helpers.inst;\n              // // let inst = {};\n              // that.inst = myinst;\n              // that.fminame = content.fminame;\n              // helpers.fmiinst[content.fminame] = myinst;\n\n              // //console.log(\"INSTANCE\",helpers.inst instanceof Promise);\n            case 9:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function initFmi() {\n        return _initFmi.apply(this, arguments);\n      }\n      return initFmi;\n    }(),\n    step: function step() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var timeEl = this.$block.find(\".time-input\");\n      var fpsEl = this.$block.find(\".fps-counter\");\n      var events = this.pageComponentContext.$router.view.events;\n      // debugger;\n      try {\n        if (!helpers.doingstep) {\n          helpers.doingstep = true;\n          if (!helpers.instantiated) {\n            methods.instantiate();\n            methods.initialize();\n          }\n          helpers.stepIndex++;\n          if (helpers.resetBeforeChange) {\n            methods.setupExperiment();\n            helpers.fmiReset(helpers.fmiinst);\n            methods.setInputVariables();\n            methods.initialize();\n            if (!helpers.isOneshot) {\n              helpers.fmiDoStep(helpers.fmiinst, 0, helpers.stepTime, 1);\n            } else {\n              stepTime = 0;\n            }\n            helpers.resetBeforeChange = false;\n          } else {\n            methods.setInputVariables();\n          }\n          var res = helpers.fmiDoStep(helpers.fmiinst, helpers.stepTime, helpers.mystep, 1);\n          helpers.stepTime = helpers.stepTime + helpers.mystep;\n          helpers.mystep = helpers.stepSize;\n          if (res === 1 || res === 2) {\n            helpers.fmiReset(helpers.fmiinst);\n            helpers.initialize();\n          }\n\n          //distribute simulation data to listeners\n          helpers.mydata = methods.getReals(helpers.references);\n          events.emit(\"fmidata\", {\n            detail: {\n              time: methods.round(helpers.stepTime, helpers.pow),\n              data: helpers.mydata\n            }\n          });\n          if (content.showTime) {\n            helpers.simulationTime = methods.secondsToTime(helpers.stepTime, content.showTimeMultiply);\n            timeEl.text(helpers.simulationTime);\n          }\n          if (helpers.measureFPS) {\n            if (helpers.fpsTick === 0) {\n              helpers.startfpstime = window.performance.now();\n            }\n            helpers.fpsTick++;\n            if (helpers.fpsTick >= helpers.ticksToUpdate) {\n              helpers.fpsInterval = 1000 / (isNaN(content.fpsLimit) ? parseInt(content.fpsLimit, 10) : content.fpsLimit);\n              //update ticks - so it will be every 3 seconds\n              helpers.ticksToUpdate = Math.round(3000 / helpers.fpsInterval);\n              //do correction step calculation\n              if (helpers.stepSize < 1) {\n                helpers.pow = -Math.ceil(-Math.log10(helpers.stepSize));\n              } else {\n                helpers.pow = Math.ceil(Math.log10(helpers.stepSize));\n              }\n              helpers.mystep = methods.round(helpers.stepTime + helpers.stepSize, helpers.pow) - helpers.stepTime;\n              //do fps calculation\n              helpers.fps = (1000 * helpers.ticksToUpdate / (window.performance.now() - helpers.startfpstime)).toPrecision(4);\n              fpsEl.text(\"FPS: \" + helpers.fps);\n              helpers.fpsTick = 0;\n            }\n          }\n        }\n      } catch (err) {\n        console.error(\"error catched during fmu step\", err);\n      } finally {\n        helpers.doingstep = false;\n      }\n    },\n    secondsToTime: function secondsToTime(sec) {\n      var multiply = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var x = Math.floor(sec * multiply);\n      var seconds = Math.floor(x % 60).toString().padStart(2, \"0\");\n      x /= 60;\n      var minutes = Math.floor(x % 60).toString().padStart(2, \"0\");\n      x /= 60;\n      var hours = Math.floor(x % 24).toString().padStart(2, \"0\");\n      x /= 24;\n      var days = Math.floor(x);\n      return \" \" + days + \" \" + hours + \":\" + minutes + \":\" + seconds;\n    },\n    flushRealQueue: function flushRealQueue() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      if (helpers.setRealQueue) {\n        var referenceBuffer = methods.createAndFillBuffer(new Int32Array(helpers.setRealQueue.references));\n        var references = methods.viewBuffer(referenceBuffer);\n        var valueBuffer = methods.createAndFillBuffer(new Float64Array(helpers.setRealQueue.values));\n        var values = methods.viewBuffer(valueBuffer);\n        methods.setReal(references, values, helpers.setRealQueue.references.length);\n        methods.freeBuffer(referenceBuffer);\n        methods.freeBuffer(valueBuffer);\n        helpers.setRealQueue = false;\n      }\n    },\n    //buffers\n    createBuffer: function createBuffer(arr) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var size = arr.length * arr.BYTES_PER_ELEMENT;\n      var ptr = helpers.inst._malloc(size);\n      return {\n        ptr: ptr,\n        size: size\n      };\n    },\n    createAndFillBuffer: function createAndFillBuffer(arr) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var buffer = methods.createBuffer(arr);\n      methods.fillBuffer(buffer, arr);\n      return buffer;\n    },\n    freeBuffer: function freeBuffer(buffer) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      if (buffer.ptr !== null) {\n        helpers.inst._free(buffer.ptr);\n      }\n      buffer.ptr = null;\n      buffer.size = null;\n    },\n    viewBuffer: function viewBuffer(buffer) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      return new Uint8Array(helpers.inst.HEAPU8.buffer, buffer.ptr, buffer.size);\n    },\n    fillBuffer: function fillBuffer(buffer, arr) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var view = methods.viewBuffer(buffer);\n      view.set(new Uint8Array(arr.buffer));\n      return buffer;\n    },\n    //buffers end\n\n    //Reals\n    setSingleReal: function setSingleReal(reference, value) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n\n      // //console.log(\"setSingleReal reference,value\", reference, value);\n      if (!helpers.setRealQueue) {\n        helpers.setRealQueue = {\n          references: [],\n          values: []\n        };\n      }\n      helpers.setRealQueue.references.push(reference);\n      helpers.setRealQueue.values.push(value);\n    },\n    setReal: function setReal(query, value, count) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n\n      // //console.log(\"setreal query,value,count\", query, value, count);\n      return helpers.fmiSetReal(helpers.fmiinst, query.byteOffset, count, value.byteOffset);\n    },\n    getReal: function getReal(query, output, count) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      // debugger;\n      return helpers.fmiGetReal(helpers.fmiinst, query.byteOffset, count, output.byteOffset);\n    },\n    getReals: function getReals(references) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      // debugger;\n      var queryBuffer = methods.createAndFillBuffer(new Int32Array(references));\n      var query = methods.viewBuffer(queryBuffer);\n      var outputBuffer = methods.createBuffer(new Float64Array(references.length));\n      var output = methods.viewBuffer(outputBuffer);\n      methods.getReal(query, output, references.length);\n      var real = new Float64Array(output.buffer, output.byteOffset, references.length);\n      methods.freeBuffer(queryBuffer);\n      methods.freeBuffer(outputBuffer);\n      return real;\n    },\n    getSingleReal: function getSingleReal(reference) {\n      var queryBuffer = methods.createAndFillBuffer(new Int32Array([reference]));\n      var query = methods.viewBuffer(queryBuffer);\n      var outputBuffer = methods.createBuffer(new Float64Array(1));\n      var output = methods.viewBuffer(outputBuffer);\n      methods.getReal(query, output, 1);\n      var real = new Float64Array(output.buffer, output.byteOffset, 1);\n      methods.freeBuffer(queryBuffer);\n      methods.freeBuffer(outputBuffer);\n      return real[0];\n    },\n    //Reals End\n    instantiate: function instantiate() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n\n      // debugger;\n\n      var sReset = \"fmi2Reset\";\n      var sInstantiate = \"fmi2Instantiate\";\n      var sSetup = \"fmi2SetupExperiment\";\n      var sEnterinit = \"fmi2EnterInitializationMode\";\n      var sExitinit = \"fmi2ExitInitializationMode\";\n      var sSetreal = \"fmi2SetReal\";\n      var sSetboolean = \"fmi2SetBoolean\";\n      var sGetreal = \"fmi2GetReal\";\n      var sGetboolean = \"fmi2GetBoolean\";\n      var sDostep = \"fmi2DoStep\";\n      var sCreateCallback = \"createFmi2CallbackFunctions\";\n      helpers.stepTime = 0;\n      helpers.stepSize = typeof content.fStepSize === \"string\" ? parseFloat(content.fStepSize) : content.fStepSize;\n      helpers.mystep = helpers.stepSize;\n\n      //console callback ptr, per emsripten create int ptr with signature viiiiii\n      //helpers.inst = window.fmiinst[this.fminame].inst; //if (window.thisfmi) {this.inst = window.thisfmi.inst;}\n      // //console.log(\"instantiate() this.inst\", this.inst);\n      //set the fminame and JS WASM function references\n\n      if (window.fmiinst && window.fmiinst[content.fminame]) {\n        helpers.inst = window.fmiinst[content.fminame].inst;\n      } else {\n        alert(\"ERRROR\");\n      }\n      var separator = \"_\";\n      var prefix = content.fminame;\n      if (typeof window._fmi2GetVersion === \"function\") {\n        prefix = \"\";\n        separator = \"\";\n      }\n      helpers.fmiCreateCallback = helpers.inst.cwrap(sCreateCallback, \"number\", [\"number\"]);\n      helpers.fmiReset = helpers.inst.cwrap(prefix + separator + sReset, \"number\", [\"number\"]);\n      helpers.fmiInstantiate = helpers.inst.cwrap(prefix + separator + sInstantiate, \"number\", [\"string\", \"number\", \"string\", \"string\", \"number\", \"number\", \"number\"]);\n      helpers.fmiSetup = helpers.inst.cwrap(prefix + separator + sSetup, \"number\", [\"number\", \"number\", \"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiEnterInit = helpers.inst.cwrap(prefix + separator + sEnterinit, \"number\", [\"number\"]);\n      helpers.fmiExitInit = helpers.inst.cwrap(prefix + separator + sExitinit, \"number\", [\"number\"]);\n      helpers.fmiSetReal = helpers.inst.cwrap(prefix + separator + sSetreal, \"number\", [\"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiGetReal = helpers.inst.cwrap(prefix + separator + sGetreal, \"number\", [\"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiSetBoolean = helpers.inst.cwrap(prefix + separator + sSetboolean, \"number\", [\"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiGetBoolean = helpers.inst.cwrap(prefix + separator + sGetboolean, \"number\", [\"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiDoStep = helpers.inst.cwrap(prefix + separator + sDostep, \"number\", [\"number\", \"number\", \"number\", \"number\"]);\n      helpers.fmiGetVersion = helpers.inst.cwrap(prefix + separator + \"fmi2GetVersion\", \"string\");\n      helpers.fmiGetTypesPlatform = helpers.inst.cwrap(prefix + separator + \"fmi2GetTypesPlatform\", \"string\");\n      helpers.fmi2FreeInstance = helpers.inst.cwrap(prefix + separator + \"fmi2FreeInstance\", \"number\", [\"number\"]);\n      helpers.instantiated = false;\n      //calculate pow, power of stepsize\n      helpers.pow = helpers.stepSize < 1 ? -Math.ceil(-Math.log10(helpers.stepSize)) : Math.ceil(Math.log10(helpers.stepSize)); //use Math.trunc ??\n      // //console.log(\"instantiate() this.inst\",helpers.inst);\n\n      //LOOKUP\n\n      // this.consoleLoggerPtr = this.inst.addFunction(\n      //   this.consoleLogger.bind(this),\n      //   \"viiiiii\"\n      // );\n\n      // helpers.callbackptr = this.fmiCreateCallback(this.consoleLoggerPtr);\n      helpers.callbackptr = helpers.fmiCreateCallback(function () {\n        return \"\";\n      });\n      //LOOKUP END\n\n      //create instance of model simulation\n      helpers.fmiinst = helpers.fmiInstantiate(content.fminame, 1,\n      //this.cosimulation,\n      content.guid, \"\", helpers.callbackptr, 0, 0); //last 1 debug, 0 nodebug\n\n      //\n      try {\n        methods.setupExperiment();\n      } catch (e) {}\n    },\n    sendStartEvent: function sendStartEvent() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var events = this.pageComponentContext.$router.view.events;\n      events.emit(\"fmistart\", {\n        detail: {\n          time: methods.round(helpers.stepTime, helpers.pow)\n        }\n      });\n    },\n    sendStopEvent: function sendStopEvent() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var events = this.pageComponentContext.$router.view.events;\n      events.emit(\"fmistop\", {\n        detail: {\n          time: methods.round(helpers.stepTime, helpers.pow)\n        }\n      });\n    },\n    round: function round(value, decimals) {\n      if (decimals < 0) {\n        var posdecimals = -decimals;\n        return Number(Math.round(value + \"e\" + posdecimals) + \"e-\" + posdecimals);\n      }\n      return Number(Math.round(value + \"e-\" + decimals) + \"e+\" + decimals);\n    },\n    setupExperiment: function setupExperiment() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      //setup experiment\n      helpers.fmiSetup(helpers.fmiinst, 1, content.tolerance, content.startTime, 0);\n      helpers.instantiated = true;\n    },\n    initialize: function initialize() {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      console.log(\"INITIALIZE\", helpers);\n      try {\n        helpers.fmiEnterInit(helpers.fmiinst);\n        helpers.fmiExitInit(helpers.fmiinst);\n      } catch (e) {\n        console.warn(\"INIT FMI\", e);\n      }\n    },\n    fmuspeedChanged: function fmuspeedChanged(newVal) {\n      var app = this.app;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      helpers.fmuspeed = parseFloat(newVal);\n      helpers.stepSize = helpers.fmuspeed * (typeof content.fStepSize === \"string\" ? parseFloat(content.fStepSize) : content.fStepSize);\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.less":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.less ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/bodylignt-fmi-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.less":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.less ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pbd-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component.css":
/*!********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component.css ***!
  \********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/pbdviewer/pdbe-molstar-component.css?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2Anim.js":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2Anim.js ***!
  \**************************************************************************************/
/*! exports provided: Bind2Anim */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Bind2Anim\", function() { return Bind2Anim; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar Bind2Anim = /*#__PURE__*/function () {\n  function Bind2Anim(item) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Bind2Anim);\n    this.afminset = false;\n    this.afmaxset = false;\n    this.autofmax = false;\n    this.autofmin = false;\n    this.fmax = 100;\n    // //console.log(\"ANIM\", item.fmax, item.fmax.toString().length);\n    if (item.fmax.toString().length > 0) {\n      this.fmax = parseFloat(item.fmax);\n    } else {\n      this.autofmax = true;\n    }\n    this.fmin = 0;\n    if (item.fmin.toString().length > 0) {\n      this.fmin = parseFloat(item.fmin);\n    } else {\n      this.autofmin = true;\n    }\n    this.amax = parseFloat(item.amax);\n    this.amin = parseFloat(item.amin);\n    this.operation = this.parseConvertors();\n    this.k1 = 0;\n    this.k2 = 0;\n    this.updateK();\n    this.k3 = this.amax - this.amin;\n    this.findex = item.findex;\n    this.aname = item.aname;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Bind2Anim, [{\n    key: \"convertf2a\",\n    value: function convertf2a(x) {\n      //do conversion if operation is defined\n      if (this.operation) x = this.operation(x);\n      // debugger;\n      if (this.autofmin) {\n        //initially sets minimum as 1/2 of current value, otherwise update it\n        if (!this.afminset) {\n          // debugger;\n          this.fmin = x * 0.9;\n          this.afminset = true;\n          this.updateK();\n        } else {\n          if (x < this.fmin) {\n            this.fmin = x;\n            this.updateK();\n          }\n        }\n      }\n      if (x <= this.fmin) return this.amin;\n      if (this.autofmax) {\n        //initially sets maximum as 2x of current value, otherwise update it\n        if (!this.afmaxset) {\n          this.fmax = x * 1.1;\n          this.afmaxset = true;\n          this.updateK();\n        } else {\n          if (x > this.fmax) {\n            this.fmax = x;\n            this.updateK();\n          }\n        }\n      }\n      if (x < this.fmax) return this.amin + (x * this.k1 - this.k2) * this.k3;\n      return this.amax;\n    }\n  }, {\n    key: \"parseConvertors\",\n    value: function parseConvertors() {\n      //configure convertors - used to convert units received from fmi\n      if (this.convertor) {\n        var convertvalues = this.convertor.split(\";\");\n        var identity = function identity(x) {\n          return x;\n        };\n        var operations = [];\n        var _loop = function _loop() {\n          if (convertvalues[i].includes(\",\")) {\n            //convert values are in form numerator,denominator,addend contains comma ','\n            var convertitems = convertvalues[i].split(\",\");\n            if (convertitems[0] === \"1\" && convertitems[1] === \"1\" && (convertitems.length <= 2 || convertitems[2] === \"0\")) operations.push(identity);else {\n              var numerator = parseFloat(convertitems[0]);\n              var denominator = parseFloat(convertitems[1]);\n              var addend = convertitems.length > 2 ? parseFloat(convertitems[2]) : 0;\n              operations.push(function (x) {\n                return x * numerator / denominator + addend;\n              });\n            }\n          } else {\n            //convert values are in form of expression, do not contain comma\n            if (convertvalues === \"1/x\") operations.push(function (x) {\n              return 1 / x;\n            });else {\n              //filter only allowed characters: algebraic, digits, e, dot, modulo, parenthesis and 'x' is allowed\n              var expression = convertvalues[i].replace(/[^-\\d/*+.\\^()%xeMathsincopw]/g, \"\");\n              ////console.log('bind2a bind(), evaluating expression:' + convertvalues[i] + ' securely filtered to :' + expression);\n              // eslint-disable-next-line no-eval\n              operations.push(function (x) {\n                return eval(expression);\n              });\n            }\n          }\n        };\n        for (var i = 0; i < convertvalues.length; i++) {\n          _loop();\n        }\n        //only one onvertor is usable in this component - return first\n        return operations[0];\n      }\n      return null;\n    }\n  }, {\n    key: \"updateK\",\n    value: function updateK() {\n      this.k1 = this.fmax != this.fmin ? 1 / (this.fmax - this.fmin) : 0;\n      this.k2 = this.fmax != this.fmin ? this.fmin / (this.fmax - this.fmin) : 0;\n    }\n  }]);\n}();\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2Anim.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimSwitch.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimSwitch.js ***!
  \********************************************************************************************/
/*! exports provided: Bind2AnimSwitch */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Bind2AnimSwitch\", function() { return Bind2AnimSwitch; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar Bind2AnimSwitch = /*#__PURE__*/function () {\n  function Bind2AnimSwitch(item) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Bind2AnimSwitch);\n    this.aname = item.aname;\n    this.findex = item.findex;\n    this.triggered = true;\n    var mylimit = 1e-12;\n    if (this.limit && this.limit != \"\") mylimit = parseFloat(this.limit);\n    this.limit = mylimit;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Bind2AnimSwitch, [{\n    key: \"convertf2a\",\n    value: function convertf2a(x) {\n      return x;\n    }\n  }, {\n    key: \"parseConvertors\",\n    value: function parseConvertors() {\n      //configure convertors - used to convert units received from fmi\n      if (this.convertor) {\n        var convertvalues = this.convertor.split(\";\");\n        var identity = function identity(x) {\n          return x;\n        };\n        var operations = [];\n        var _loop = function _loop() {\n          if (convertvalues[i].includes(\",\")) {\n            //convert values are in form numerator,denominator,addend contains comma ','\n            var convertitems = convertvalues[i].split(\",\");\n            if (convertitems[0] === \"1\" && convertitems[1] === \"1\" && (convertitems.length <= 2 || convertitems[2] === \"0\")) operations.push(identity);else {\n              var numerator = parseFloat(convertitems[0]);\n              var denominator = parseFloat(convertitems[1]);\n              var addend = convertitems.length > 2 ? parseFloat(convertitems[2]) : 0;\n              operations.push(function (x) {\n                return x * numerator / denominator + addend;\n              });\n            }\n          } else {\n            //convert values are in form of expression, do not contain comma\n            if (convertvalues === \"1/x\") operations.push(function (x) {\n              return 1 / x;\n            });else {\n              //filter only allowed characters: algebraic, digits, e, dot, modulo, parenthesis and 'x' is allowed\n              var expression = convertvalues[i].replace(/[^-\\d/*+.\\^()%xeMathsincopw]/g, \"\");\n              ////console.log('bind2a bind(), evaluating expression:' + convertvalues[i] + ' securely filtered to :' + expression);\n              // eslint-disable-next-line no-eval\n              operations.push(function (x) {\n                return eval(expression);\n              });\n            }\n          }\n        };\n        for (var i = 0; i < convertvalues.length; i++) {\n          _loop();\n        }\n        //only one onvertor is usable in this component - return first\n        return operations[0];\n      }\n      return null;\n    }\n  }]);\n}();\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimSwitch.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimText.js":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimText.js ***!
  \******************************************************************************************/
/*! exports provided: Bind2AnimText */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Bind2AnimText\", function() { return Bind2AnimText; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar Bind2AnimText = /*#__PURE__*/function () {\n  function Bind2AnimText(item) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Bind2AnimText);\n    this.prefix = item.prefix;\n    this.suffix = item.suffix;\n    this.fixed = item.fixed;\n    this.precision = item.precision;\n    this.convertor = item.convertor;\n    this.operation = this.parseConvertors();\n    this.findex = item.findex;\n    this.aname = item.aname;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Bind2AnimText, [{\n    key: \"convertf2a\",\n    value: function convertf2a(x) {\n      // debugger;\n      if (this.operation) x = this.operation(x);\n      //let xstr = x.toPrecision(4);\n      //return x.toPrecision(4);\n      return this.prefix + (this.precision > 0 ? x.toPrecision(this.precision) : x.toFixed(this.fixed)) + this.suffix;\n    }\n  }, {\n    key: \"parseConvertors\",\n    value: function parseConvertors() {\n      //configure convertors - used to convert units received from fmi\n      if (this.convertor) {\n        var convertvalues = this.convertor.split(\";\");\n        var identity = function identity(x) {\n          return x;\n        };\n        var operations = [];\n        var _loop = function _loop() {\n          if (convertvalues[i].includes(\",\")) {\n            //convert values are in form numerator,denominator,addend contains comma ','\n            var convertitems = convertvalues[i].split(\",\");\n            if (convertitems[0] === \"1\" && convertitems[1] === \"1\" && (convertitems.length <= 2 || convertitems[2] === \"0\")) operations.push(identity);else {\n              var numerator = parseFloat(convertitems[0]);\n              var denominator = parseFloat(convertitems[1]);\n              var addend = convertitems.length > 2 ? parseFloat(convertitems[2]) : 0;\n              operations.push(function (x) {\n                return x * numerator / denominator + addend;\n              });\n            }\n          } else {\n            //convert values are in form of expression, do not contain comma\n            if (convertvalues === \"1/x\") operations.push(function (x) {\n              return 1 / x;\n            });else {\n              //filter only allowed characters: algebraic, digits, e, dot, modulo, parenthesis and 'x' is allowed\n              var expression = convertvalues[i].replace(/[^-\\d/*+.\\^()%xeMathsincopw]/g, \"\");\n              ////console.log('bind2a bind(), evaluating expression:' + convertvalues[i] + ' securely filtered to :' + expression);\n              // eslint-disable-next-line no-eval\n              operations.push(function (x) {\n                return eval(expression);\n              });\n            }\n          }\n        };\n        for (var i = 0; i < convertvalues.length; i++) {\n          _loop();\n        }\n        //only one onvertor is usable in this component - return first\n        return operations[0];\n      }\n      return null;\n    }\n  }]);\n}();\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimText.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bodylight-utils.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bodylight-utils.js ***!
  \********************************************************************************************/
/*! exports provided: genAnimBindings, genAnimTextBindings, genAnimSwitchBindings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genAnimBindings\", function() { return genAnimBindings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genAnimTextBindings\", function() { return genAnimTextBindings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genAnimSwitchBindings\", function() { return genAnimSwitchBindings; });\n/* harmony import */ var _bind2Anim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bind2Anim */ \"./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2Anim.js\");\n/* harmony import */ var _bind2AnimText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bind2AnimText */ \"./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimText.js\");\n/* harmony import */ var _bind2AnimSwitch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bind2AnimSwitch */ \"./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bind2AnimSwitch.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n\n\n\nvar genAnimBindings = function genAnimBindings(data) {\n  var resArr = [];\n  data = lodash__WEBPACK_IMPORTED_MODULE_3___default.a.filter(data, function (o) {\n    return !o.deleted;\n  });\n  var _iterator = _createForOfIteratorHelper(data),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var item = _step.value;\n      var obj = new _bind2Anim__WEBPACK_IMPORTED_MODULE_0__[\"Bind2Anim\"](item);\n      // //console.log(\"CECHK\", obj.constructor.name);\n      resArr.push(obj);\n    }\n    // debugger;\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  return resArr;\n};\nvar genAnimTextBindings = function genAnimTextBindings(data) {\n  var resArr = [];\n  data = lodash__WEBPACK_IMPORTED_MODULE_3___default.a.filter(data, function (o) {\n    return !o.deleted;\n  });\n  var _iterator2 = _createForOfIteratorHelper(data),\n    _step2;\n  try {\n    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n      var item = _step2.value;\n      var obj = new _bind2AnimText__WEBPACK_IMPORTED_MODULE_1__[\"Bind2AnimText\"](item);\n      resArr.push(obj);\n    }\n    // debugger;\n  } catch (err) {\n    _iterator2.e(err);\n  } finally {\n    _iterator2.f();\n  }\n  return resArr;\n};\nvar genAnimSwitchBindings = function genAnimSwitchBindings(data) {\n  var resArr = [];\n  data = lodash__WEBPACK_IMPORTED_MODULE_3___default.a.filter(data, function (o) {\n    return !o.deleted;\n  });\n  var _iterator3 = _createForOfIteratorHelper(data),\n    _step3;\n  try {\n    for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n      var item = _step3.value;\n      var obj = new _bind2AnimSwitch__WEBPACK_IMPORTED_MODULE_2__[\"Bind2AnimSwitch\"](item);\n      resArr.push(obj);\n    }\n    // debugger;\n  } catch (err) {\n    _iterator3.e(err);\n  } finally {\n    _iterator3.f();\n  }\n  return resArr;\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_lf1_devel/utils/bodylight-utils.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js ***!
  \********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var table_dragger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! table-dragger */ \"./node_modules/table-dragger/dist/table-dragger.js\");\n/* harmony import */ var table_dragger__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(table_dragger__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _table_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./table-utils */ \"./src/core/custom_plugins/builder/components/_en/_new-tables/table-utils.js\");\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! chart.js */ \"./node_modules/chart.js/dist/Chart.js\");\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _table_01_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./table-01.less */ \"./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.less\");\n/* harmony import */ var _table_01_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_table_01_less__WEBPACK_IMPORTED_MODULE_3__);\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n//https://brainbell.com/javascript/making-resizable-table-js.html\n//https://plnkr.co/edit/8wZvcU1SgmieStsqg3lD?p=preview&preview\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"new-table-01\",\n  title: \"Table New\",\n  subtitle: \"\",\n  contentSetting: {\n    tableDescription: {\n      name: \"Table Description\",\n      type: \"textarea\"\n    },\n    showNumbering: {\n      name: \"Show numbering in image description\",\n      type: \"bool\"\n    },\n    dynamicWidth: {\n      name: \"Use manual width?\",\n      help: \"If not, width of table is 100%\",\n      type: \"bool\",\n      hidden: {\n        tableWidth: {\n          name: \"Table width\",\n          type: \"input-number\"\n        }\n      }\n    },\n    minWidth: {\n      name: \"Min width\",\n      type: \"input-number\"\n    }\n    // pasteDataButton: {\n    //   name: \"Load data from CSV\",\n    //   type: \"button\",\n    //   method: \"pasteFromClipboard\",\n    // },\n  },\n  content: {\n    tableDescription: \"Tabulka\",\n    tableWidth: 500,\n    showNumbering: false,\n    minWidth: 500,\n    dynamicWidth: true,\n    rowsSettings: [{\n      position: 1,\n      height: \"\",\n      deleted: false\n    }, {\n      position: 2,\n      height: \"\",\n      deleted: false\n    }],\n    colsSettings: [{\n      position: 1,\n      width: \"50%\",\n      deleted: false\n    }, {\n      position: 2,\n      width: \"50%\",\n      deleted: false\n    }],\n    // rowsSettings: [],\n    // colsSettings: [],\n    tableData: [{\n      position: 1,\n      deleted: false,\n      cells: [{\n        dataKey: \"0_0\",\n        props: {\n          colspan: 1,\n          rowspan: 1\n        }\n      }, {\n        dataKey: \"0_1\",\n        props: {\n          colspan: 1,\n          rowspan: 1\n        }\n      }]\n    }, {\n      position: 2,\n      deleted: false,\n      cells: [{\n        dataKey: \"1_0\",\n        props: {\n          colspan: 1,\n          rowspan: 1\n        }\n      }, {\n        dataKey: \"1_1\",\n        props: {\n          colspan: 1,\n          rowspan: 1\n        }\n      }]\n    }]\n  },\n  helpers: {\n    isMouseDown: false,\n    startRowIndex: null,\n    startCell: null,\n    selectedIds: [],\n    currentX: 1,\n    currentY: 1,\n    numberOfRows: 2,\n    numberOfCols: 2,\n    resizing: {\n      inProgress: false,\n      originalSize: 0,\n      defaultMousePos: 0,\n      target: null,\n      maxResize: 0,\n      pos: 0\n    }\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var ref = component.params.methods.getTablesReference();\n    return \"\\n          <div class=\\\"table-container \".concat(component.app.builder.params.development.enable ? \"dev\" : \"\", \"\\\">\\n            \").concat(builder.genTable(component.params.content, component, true), \"\\n\\n          </div>\\n          \").concat(content.tableDescription.length > 0 ? \"<div class=\\\"table-description\\\"> \".concat(content.showNumbering ? \"\".concat(ref[0].string, \":\") : \"\", \" \").concat(content.tableDescription, \"</div>\") : \"\", \"\\n    \");\n  },\n  genTable: function genTable(content, component) {\n    var dev = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var methods = this.methods;\n    var helpers = this.helpers;\n    var renderer = \"<table style=\\\"min-width: \".concat(content.minWidth, \"px; width: \").concat(content.dynamicWidth ? content.tableWidth + \"px\" : \"100%\", \"\\\"><colgroup>\");\n    var renderContent = _.cloneDeep(content);\n    var colPosSettings = _.sortBy(renderContent.colsSettings, function (o) {\n      return o.position;\n    });\n    for (var i = 0; i < colPosSettings.length; i++) {\n      if (!colPosSettings[i].deleted) {\n        renderer += \"<col class=\\\"col-group col-\".concat(i, \"\\\" style=\\\"width: \").concat(colPosSettings[i] != \"\" ? colPosSettings[i].width : \"\", \"\\\">\");\n      }\n    }\n    renderer += \"</colgroup>\";\n    var table = _.sortBy(renderContent.tableData, function (o) {\n      return o.position;\n    });\n    var colCounter = 0;\n    var rowCounter = 0;\n    var offsetArray = methods.getOffsetArray();\n    var continous = methods.getContinousBlock(offsetArray);\n    var _loop = function _loop(x) {\n      if (!table[x].deleted) {\n        renderer += \"<tr style=\\\"height: \".concat(content.rowsSettings[x] && content.rowsSettings[x] != \"\" ? content.rowsSettings[x].height : \"\", \"\\\">\");\n        table[x].cells = _.sortBy(table[x].cells, function (o) {\n          return o.position;\n        });\n        for (var y = 0; y < table[x].cells.length; y++) {\n          if (!table[x].cells[y].deleted) {\n            var renderHandler = undefined;\n            if (continous) {\n              renderHandler = _.find(continous, function (o) {\n                return table[x].position > o.startPos && table[x].position <= o.endPos;\n              });\n            }\n            renderer += \"<td class=\\\"td\\\"\\n            data-pos=\\\"\".concat(table[x].cells[y].position, \"\\\"\\n            data-rowpos=\\\"\").concat(table[x].position, \"\\\"\\n            data-id=\\\"\").concat(table[x].cells[y].id, \"\\\" data-row=\\\"\").concat(rowCounter, \"\\\" data-col=\\\"\").concat(colCounter, \"\\\" colspan=\\\"\").concat(table[x].cells[y].props.colspan, \"\\\" rowspan=\\\"\").concat(table[x].cells[y].props.rowspan, \"\\\">\\n            \").concat(colCounter == 0 && !renderHandler ? \"<div class=\\\"handle\\\"><i class=\\\"icon material-icons\\\">drag_handle</i></div>\" : \"\", \"\\n            \").concat(component.renderComponents(table[x].cells[y].dataKey), \"\\n            </td>\");\n            colCounter++;\n          }\n          methods.setVars(table[x].cells[y].dataKey);\n        }\n        renderer += \"</tr>\";\n        if (colCounter > helpers.numberOfCols) helpers.numberOfCols = colCounter;\n        colCounter = 0;\n        rowCounter++;\n      }\n      if (rowCounter > helpers.numberOfRows) helpers.numberOfRows = rowCounter;\n    };\n    for (var x = 0; x < table.length; x++) {\n      _loop(x);\n    }\n    renderer += \"</table>\";\n    return renderer;\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var _this = this;\n      var app = this.app;\n      var row = $componentEl.find(\"tr\")[0];\n      var cols = row ? row.children : undefined;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var content = this.params.content;\n      if (app.builder.params.development.enable) {\n        var tds = $componentEl.find(\"td\");\n        $(tds).off(\"contextmenu\");\n        $(tds).contextmenu(function (e) {\n          e.preventDefault();\n          var target = $$(e.target);\n          //console.log(e.target.tagName.toLowerCase());\n\n          if (e.target.tagName.toLowerCase() != \"td\") {\n            target = $$(e.target).parents(\"td\");\n          }\n          var colIndex = target.data(\"col\");\n          var rowIndex = target.data(\"row\");\n          var posIndex = target.data(\"pos\");\n          var rowPosIndex = target.data(\"rowpos\");\n          var offsetCol = parseInt(target.attr(\"colspan\"));\n          var offsetRow = parseInt(target.attr(\"rowspan\"));\n          target.addClass(\"col-selected\");\n\n          // let old = app.popover.get(\".popover-table-edit\");\n          // old.destroy();\n          // debugger;\n\n          var eventContext = app.popover.create({\n            targetEl: $$(e.target),\n            backdrop: true,\n            content: \"\\n          <div class=\\\"popover popover-table-edit\\\">\\n            <div class=\\\"popover-inner\\\">\\n              <div class=\\\"list\\\" style=\\\"margin-top: 0; margin-bottom: 0; color: var(--f7-theme-color);\\\">\\n              <div class=\\\"list-group\\\">\\n                <ul>\\n                <li class=\\\"list-group-title\\\">Columns action</li>\\n                  <li id=\\\"table_add_col_before\\\">\\n                    <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                      <div class=\\\"item-inner\\\">\\n                        <div class=\\\"item-title\\\">Add column before</div>\\n\\n                      </div>\\n                    </a>\\n                  </li>\\n                  <li id=\\\"table_add_col_after\\\">\\n                    <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                      <div class=\\\"item-inner\\\">\\n                        <div class=\\\"item-title\\\">Add column after</div>\\n                        <!--<div class=\\\"item-after\\\">CEO</div>-->\\n                      </div>\\n                    </a>\\n                  </li>\\n                  <li id=\\\"table_delete_col\\\">\\n                  <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title\\\">Delete column</div>\\n                    </div>\\n                  </a>\\n                </li>\\n                </ul\\n                </div>\\n                <div class=\\\"list-group\\\">\\n                <ul>\\n                <li class=\\\"list-group-title\\\">Row action</li>\\n                <li id=\\\"table_add_row_before\\\">\\n                <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                  <div class=\\\"item-inner\\\">\\n                    <div class=\\\"item-title\\\">Add row before</div>\\n                  </div>\\n                </a>\\n              </li>\\n                <li id=\\\"table_add_row_after\\\">\\n                <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                  <div class=\\\"item-inner\\\">\\n                    <div class=\\\"item-title\\\">Add row after</div>\\n                  </div>\\n                </a>\\n              </li>\\n            <li id=\\\"table_delete_row\\\">\\n            <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title\\\">Delete row</div>\\n              </div>\\n            </a>\\n          </li>\\n          <li id=\\\"table_move_row_up\\\">\\n            <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title\\\">Move row UP</div>\\n              </div>\\n            </a>\\n          </li>\\n          <li id=\\\"table_move_row_down\\\">\\n          <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n            <div class=\\\"item-inner\\\">\\n              <div class=\\\"item-title\\\">Move row DOWN</div>\\n            </div>\\n          </a>\\n        </li>\\n          </ul>\\n          </div>\\n          <div class=\\\"list-group table_split_cell_group\\\">\\n          <ul>\\n          <li class=\\\"list-group-title\\\">Cells action</li>\\n            <li id=\\\"table_split_cell\\\">\\n            <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title\\\">Split cells</div>\\n              </div>\\n            </a>\\n          </li>\\n                </ul>\\n              </div>\\n            </div>\\n          </div>\\n          \",\n            // Events\n            on: {\n              open: function open(popover) {\n                var splitContainer = popover.$el.find(\".table_split_cell_group\");\n                // debugger;\n                if (offsetCol == 1 && offsetRow == 1) {\n                  splitContainer.css(\"display\", \"none\");\n                }\n              },\n              opened: function opened(popover) {\n                // debugger;\n                var btnAddColAfter = popover.$el.find(\"#table_add_col_after\");\n                var btnAddColBefore = popover.$el.find(\"#table_add_col_before\");\n                var btnDeleteCol = popover.$el.find(\"#table_delete_col\");\n                var btnAddRowBefore = popover.$el.find(\"#table_add_row_before\");\n                var btnAddRowAfter = popover.$el.find(\"#table_add_row_after\");\n                var btnDeleteRow = popover.$el.find(\"#table_delete_row\");\n                var btnSplitCell = popover.$el.find(\"#table_split_cell\");\n                var btnMoveUp = popover.$el.find(\"#table_move_row_up\");\n                var btnMoveDown = popover.$el.find(\"#table_move_row_down\");\n                btnMoveUp.off(\"click\");\n                btnMoveUp.on(\"click\", function (e) {\n                  methods.moveRow(parseInt(rowIndex), parseInt(rowIndex) - 1, true);\n                  eventContext.close();\n                });\n                btnMoveDown.off(\"click\");\n                btnMoveDown.on(\"click\", function (e) {\n                  methods.moveRow(parseInt(rowIndex), parseInt(rowIndex) + 1, true);\n                  eventContext.close();\n                });\n                btnSplitCell.off(\"click\");\n                btnSplitCell.on(\"click\", function (e) {\n                  methods.splitCell(parseInt(rowPosIndex), parseInt(posIndex));\n                  eventContext.close();\n                });\n                btnAddColAfter.off(\"click\");\n                btnAddColAfter.on(\"click\", function (e) {\n                  methods.addCol(parseInt(posIndex) + offsetCol);\n                  eventContext.close();\n                });\n                btnAddColBefore.off(\"click\");\n                btnAddColBefore.on(\"click\", function (e) {\n                  methods.addCol(parseInt(posIndex), true);\n                  eventContext.close();\n                });\n                btnDeleteCol.off(\"click\");\n                btnDeleteCol.on(\"click\", function (e) {\n                  methods.deleteCol(parseInt(posIndex), parseInt(offsetCol));\n                  eventContext.close();\n                });\n                btnAddRowAfter.off(\"click\");\n                btnAddRowAfter.on(\"click\", function (e) {\n                  methods.addRow(parseInt(rowPosIndex) + offsetRow);\n                  eventContext.close();\n                });\n                btnAddRowBefore.off(\"click\");\n                btnAddRowBefore.on(\"click\", function (e) {\n                  methods.addRow(parseInt(rowPosIndex));\n                  eventContext.close();\n                });\n                btnDeleteRow.off(\"click\");\n                btnDeleteRow.on(\"click\", function (e) {\n                  methods.deleteRow(parseInt(rowPosIndex), parseInt(offsetRow));\n                  eventContext.close();\n                });\n              },\n              closed: function closed(popover) {\n                target.removeClass(\"col-selected\");\n                // debugger;\n              }\n            }\n          });\n          eventContext.open();\n        });\n        $(document).mouseup(function () {\n          var target = $componentEl.find(\".col-selected\");\n          var popupEl = target[target.length - 1];\n          if (target.length > 1) {\n            if (helpers.isMouseDown) {\n              var eventContext = app.popover.create({\n                targetEl: $$(popupEl),\n                backdrop: true,\n                content: \"\\n                      <div class=\\\"popover popover-table-edit\\\">\\n                        <div class=\\\"popover-inner\\\">\\n                          <div class=\\\"list\\\" style=\\\"margin-top: 0; margin-bottom: 0; color: var(--f7-theme-color);\\\">\\n                            <ul>\\n                              <li id=\\\"table_merge_cells\\\">\\n                                <a href=\\\"#\\\" class=\\\"item-link item-content\\\">\\n                                  <div class=\\\"item-inner\\\">\\n                                    <div class=\\\"item-title\\\">Merge cells</div>\\n                                  </div>\\n                                </a>\\n                              </li>\\n                            </ul>\\n                          </div>\\n                        </div>\\n                      </div>\\n                      \",\n                // Events\n                on: {\n                  open: function open(popover) {},\n                  opened: function opened(popover) {\n                    var btnMergeCells = popover.$el.find(\"#table_merge_cells\");\n                    btnMergeCells.off(\"click\");\n                    btnMergeCells.on(\"click\", function (e) {\n                      methods.mergeCells(target);\n                      eventContext.close();\n                    });\n                  },\n                  closed: function closed(popover) {\n                    target.removeClass(\"col-selected\");\n                  }\n                }\n              });\n              eventContext.open();\n            }\n          } else {\n            target.removeClass(\"col-selected\");\n          }\n          helpers.isMouseDown = false;\n        });\n        $(tds).mousedown(function (e) {\n          var target = $(e.target);\n          var parent = target.parents(\".bm-controls\");\n          if (target.hasClass(\"bm-add-next\") || parent.length > 0) {\n            return false;\n          }\n          helpers.isMouseDown = true;\n          var cell = $(this);\n          $componentEl.find(\".col-selected\").removeClass(\"col-selected\"); // deselect everything\n\n          cell.addClass(\"col-selected\");\n          helpers.startCell = cell;\n        }).mouseenter(function () {\n          if (!helpers.isMouseDown) return;\n          $componentEl.find(\".col-selected\").removeClass(\"col-selected\");\n          methods.setEndCell($(this));\n        }).bind(\"selectstart\", function () {\n          return false;\n        });\n        var oldResizers = $componentEl.find(\".resizer\");\n        oldResizers.forEach(function (el) {\n          $$(el).remove();\n        });\n        var numberOfCols = methods.getNumberOfRenderedCols();\n        var table = $componentEl.find(\"table\")[0];\n        for (var i = 0; i < numberOfCols; i++) {\n          if (!content.dynamicWidth && i + 1 == numberOfCols) break;\n          var cel = $componentEl.find(\"td[data-pos=\\\"\".concat(i + 1, \"\\\"][colspan=\\\"1\\\"]\"))[0];\n          if (i + 1 == numberOfCols) {\n            cel = $componentEl.find(\"td[data-rowpos=\\\"1\\\"]\");\n            cel = cel[cel.length - 1];\n          }\n          var resizerEl = methods.createResizerDiv(table.offsetHeight, i + 1);\n          $$(cel).append(resizerEl);\n        }\n        var resizers = $componentEl.find(\".resizer\");\n        resizers.off(\"mousedown\");\n        resizers.on(\"mousedown\", function (e) {\n          e.preventDefault();\n          e.stopPropagation();\n          var target = $$(e.target);\n          var lastPos = _.maxBy(content.colsSettings, function (o) {\n            if (!o.deleted) {\n              return o.position;\n            }\n          });\n          var pos = target.data(\"pos\");\n          var isLast = lastPos.position == pos;\n          var parent = target.parents(\"td\")[0];\n          var originalSize = parent.offsetWidth;\n\n          // debugger;\n          if (!isLast) {\n            var neighbour = $componentEl.find(\"td[data-pos=\\\"\".concat(parseInt(pos) + 1, \"\\\"]\"))[0];\n            // debugger;\n            var maxResize = neighbour.offsetWidth;\n            helpers.resizing.maxResize = maxResize;\n          }\n          if (isLast) {}\n          // debugger;\n\n          target.css(\"background\", _this.app.book.params.color);\n          // debugger;\n          helpers.resizing.inProgress = true;\n          helpers.resizing.originalSize = originalSize;\n          helpers.resizing.defaultMousePos = e.pageX;\n          helpers.resizing.target = target;\n          helpers.resizing.isLast = isLast;\n          helpers.resizing.pos = pos;\n          helpers.resizing.difference = 0;\n          // alert(\"mousedown\");\n        });\n        $(document).on(\"mouseup\", function (e) {\n          var resizing = helpers.resizing;\n          if (helpers.resizing.inProgress) {\n            if (resizing.isLast) {\n              methods.makeTableResize();\n            } else {\n              methods.makeColResize();\n            }\n            // //console.log(\"resizing.difference\", resizing.difference);\n\n            resizing.target.css(\"background\", \"none\");\n            helpers.resizing = {\n              inProgress: false,\n              originalSize: 0,\n              defaultMousePos: 0,\n              target: null,\n              maxResize: 0,\n              pos: 0\n            };\n          }\n        });\n        $(document).on(\"mousemove\", function (e) {\n          if (helpers.resizing.inProgress) {\n            var resizing = helpers.resizing;\n            var newPos = e.pageX;\n            var diff = newPos - resizing.defaultMousePos;\n            var newResizerPos = resizing.originalSize + diff;\n            var maxRes = resizing.originalSize + resizing.maxResize - 5;\n            if (resizing.isLast || newResizerPos > 0 && newResizerPos < maxRes) {\n              resizing.target.css(\"left\", \"\".concat(newResizerPos, \"px\"));\n              resizing.difference = diff;\n            }\n          }\n        });\n      }\n\n      //Dragger\n      var tableEl = $componentEl.find(\"table\")[0];\n      var dragger = table_dragger__WEBPACK_IMPORTED_MODULE_0___default()(tableEl, {\n        mode: \"row\",\n        dragHandler: \".handle\",\n        onlyBody: true,\n        animation: 300\n      });\n      dragger.on(\"drop\", function (fromIndex, toIndex) {\n        methods.moveRow(fromIndex, toIndex);\n      });\n    }\n  },\n  methods: {\n    moveRow: function moveRow(fromIndex, toIndex) {\n      var byOne = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var app = this.app;\n      this.builder.history.ignoreAddHistory = true;\n      var fromPos = fromIndex + 1;\n      var toPos = toIndex + 1;\n      var offsetArray = methods.getOffsetArray();\n      var continousBlock = methods.getContinousBlock(offsetArray);\n      var last = _.maxBy(content.tableData, function (o) {\n        if (!o.deleted) {\n          return o.position;\n        }\n      });\n      var sign = 1;\n      if (toPos > fromPos) {\n        sign = -1;\n      }\n\n      //console.log(\"FROM:\", fromPos, \"| TO:\", toPos);\n\n      // debugger;\n      var _iterator = _createForOfIteratorHelper(continousBlock),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var block = _step.value;\n          if (sign == 1) {\n            if (fromPos > block.startPos && fromPos <= block.endPos) {\n              fromPos = block.startPos;\n              toPos = parseInt(block.startPos) - 1;\n            }\n            if (toPos > block.startPos && toPos <= block.endPos && toPos != last.position && toPos != 1) {\n              if (!byOne) {\n                app.dialog.alert(\"Rows cannot be moved in between merged rows.\", \"Invalid move\", function () {});\n                this.reRender();\n                return;\n              } else {\n                toPos = block.startPos;\n              }\n            }\n          } else {\n            if (fromPos >= block.startPos && fromPos < block.endPos) {\n              fromPos = block.startPos;\n              toPos = parseInt(block.endPos) + 1;\n            }\n            if (toPos >= block.startPos && toPos < block.endPos && toPos != last.position && toPos != 1) {\n              if (!byOne) {\n                app.dialog.alert(\"Rows cannot be moved in between merged rows.\", \"Invalid move\", function () {});\n                this.reRender();\n                return;\n              } else {\n                toPos = block.endPos;\n              }\n            }\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      if (toPos < 0 || toPos > last.position) {\n        //posun mimo tabulku\n        return;\n      }\n      var movingElementIndex = _.findIndex(content.tableData, function (o) {\n        return o.position == fromPos && !o.deleted;\n      });\n      var movingElement = content.tableData[movingElementIndex];\n      var moveOffset = sign == 1 ? fromPos - toPos : toPos - fromPos;\n      var betweenOffset = 1;\n      var movingRows = {\n        startPos: fromPos,\n        endPos: fromPos,\n        blocks: [movingElement]\n      };\n      for (var i = 0; i < continousBlock.length; i++) {\n        var item = continousBlock[i];\n        if (item.startPos <= movingElement.position && item.endPos >= movingElement.position) {\n          betweenOffset = Math.abs(item.endPos - item.startPos + 1);\n          if (sign == 1) {\n            moveOffset = item.startPos - toPos;\n          } else {\n            moveOffset = toPos - item.endPos;\n          }\n          movingRows = item;\n          break;\n        }\n      }\n\n      //POSITION RECALC\n      for (var _i = 0; _i < content.tableData.length; _i++) {\n        var _item = content.tableData[_i];\n        if (!_item.deleted) {\n          var pos = _item.position;\n          if (sign == 1) {\n            //pohyb nahoru\n            //if (pos < movingRows.startPos && pos  || pos > movingRows.endPos) {\n            //  continue;\n            //}\n            if (pos >= toPos && pos < movingRows.startPos) {\n              _item.position = _item.position + betweenOffset;\n            }\n            if (pos >= movingRows.startPos && pos <= movingRows.endPos) {\n              _item.position = _item.position - moveOffset;\n            }\n          } else {\n            //pohyb dolu\n            if (pos > movingRows.endPos && pos <= toPos) {\n              _item.position = _item.position - betweenOffset;\n            }\n            if (pos >= movingRows.startPos && pos <= movingRows.endPos) {\n              _item.position = _item.position + moveOffset;\n            }\n          }\n        }\n      }\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n      if (!byOne) {\n        this.reRender();\n      }\n    },\n    getTablesReference: function getTablesReference() {\n      return _table_utils__WEBPACK_IMPORTED_MODULE_1__[\"getRef\"].bind(this)();\n    },\n    getContinousBlock: function getContinousBlock(array) {\n      // debugger;\n      array = _.sortBy(array, function (o) {\n        return o.posRow;\n      });\n      var allBlocks = [];\n      if (array.length > 0) {\n        var counter = array[0].posRow + array[0].rowspan;\n        var block = [array[0]];\n        for (var i = 1; i < array.length; i++) {\n          //console.log(\"RUN,\", i);\n          var item = array[i];\n          if (item.posRow <= counter && i != array.length) {\n            block.push(item);\n          } else {\n            var endEl = _.maxBy(block, function (o) {\n              return o.posRow + o.rowspan;\n            });\n            var startEl = _.minBy(block, function (o) {\n              return o.posRow;\n            });\n            var start = startEl.posRow;\n            var end = endEl.posRow + endEl.rowspan;\n            allBlocks.push({\n              startPos: start,\n              endPos: end,\n              blocks: block\n            });\n            block = [];\n            block.push(item);\n          }\n          counter = item.posRow + item.rowspan;\n        }\n        if (block.length > 0) {\n          var _endEl = _.maxBy(block, function (o) {\n            return o.posRow + o.rowspan;\n          });\n          var _startEl = _.minBy(block, function (o) {\n            return o.posRow;\n          });\n          var _start = _startEl.posRow;\n          var _end = _endEl.posRow + _endEl.rowspan;\n          allBlocks.push({\n            startPos: _start,\n            endPos: _end,\n            blocks: block\n          });\n        }\n      }\n      return allBlocks;\n    },\n    //MERGE\n    mergeCells: function mergeCells(cells) {\n      var content = this.params.content;\n      this.builder.history.ignoreAddHistory = true;\n      var mainCell = cells[0];\n      var mainId = $$(mainCell).data(\"id\");\n      var mainColIndex = $$(mainCell).data(\"col\");\n      var mainRowIndex = $$(mainCell).data(\"row\");\n      var mainPos = $$(mainCell).data(\"pos\");\n      var colspan = parseInt($$(mainCell).attr(\"colspan\"));\n      var rowspan = parseInt($$(mainCell).attr(\"rowspan\"));\n      var delArray = [];\n      for (var i = 1; i < cells.length; i++) {\n        var colS = $$(cells[i]).attr(\"colspan\");\n        var rowS = $$(cells[i]).attr(\"rowspan\");\n        var col = $$(cells[i]).data(\"col\");\n        var row = $$(cells[i]).data(\"row\");\n        var pos = $$(cells[i]).data(\"pos\");\n        var id = $$(cells[i]).data(\"id\");\n        delArray.push(id);\n        if (mainColIndex < col && mainRowIndex == row) {\n          colspan += parseInt(colS);\n        }\n        // debugger;\n        if (mainRowIndex < row && mainPos == pos) {\n          rowspan += parseInt(rowS);\n        }\n      }\n      //   debugger;\n\n      for (var x = 0; x < content.tableData.length; x++) {\n        for (var y = 0; y < content.tableData[x].cells.length; y++) {\n          if (delArray.includes(content.tableData[x].cells[y].id)) {\n            content.tableData[x].cells[y].deleted = true;\n          }\n          if (content.tableData[x].cells[y].id == mainId) {\n            content.tableData[x].cells[y].props.colspan = colspan;\n            content.tableData[x].cells[y].props.rowspan = rowspan;\n          }\n        }\n      }\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n    },\n    splitCell: function splitCell(posRow, posCol) {\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var offsetArr = methods.getOffsetArray();\n      var cellToSplit = _.find(offsetArr, function (o) {\n        return o.posRow == posRow && posCol == o.posCol;\n      });\n      content.tableData[cellToSplit.x].cells[cellToSplit.y].props.colspan = 1;\n      content.tableData[cellToSplit.x].cells[cellToSplit.y].props.rowspan = 1;\n      // debugger;\n      var _loop2 = function _loop2() {\n        var posRow = cellToSplit.posRow + x;\n        var posRowIndex = _.findIndex(content.tableData, function (o) {\n          return o.position == posRow && !o.deleted;\n        });\n        if (posRow >= cellToSplit.posRow && posRow <= cellToSplit.posRow + cellToSplit.rowspan) {\n          var iterateTo = cellToSplit.posRow == posRow ? cellToSplit.colspan : cellToSplit.colspan + 1;\n          for (var i = 0; i < iterateTo; i++) {\n            var pos = cellToSplit.posRow == posRow ? cellToSplit.posCol + i + 1 : cellToSplit.posCol + i;\n            content.tableData[posRowIndex].cells.push(methods.createCellData(helpers.currentX + x + 1, helpers.currentY + i + 1, pos, false));\n          }\n        }\n      };\n      for (var x = 0; x < content.tableData.length; x++) {\n        _loop2();\n      }\n\n      // debugger;\n    },\n    //UTILS\n    makeTableResize: function makeTableResize() {\n      var helpers = this.params.helpers;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var resizing = helpers.resizing;\n      var newSize = parseFloat(content.tableWidth) + parseFloat(resizing.difference);\n      if (newSize < content.minWidth) {\n        newSize = content.minWidth;\n        var parent = resizing.target.parents(\"td\");\n        var w = parent[0].offsetWidth;\n        // debugger;\n        resizing.target.css(\"left\", w - 6 + \"px\");\n      }\n      content.tableWidth = newSize;\n\n      // //console.log(newSize);\n    },\n    makeColResize: function makeColResize() {\n      var helpers = this.params.helpers;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var resizing = helpers.resizing;\n      var minColWidth = 20;\n      // debugger;\n\n      this.builder.history.ignoreAddHistory = true;\n      var nextPos = parseInt(resizing.pos) + 1;\n      var colOne = _.find(content.colsSettings, function (o) {\n        return o.position == resizing.pos && !o.deleted;\n      });\n      var colTwo = _.find(content.colsSettings, function (o) {\n        return o.position == parseInt(resizing.pos) + 1 && !o.deleted;\n      });\n      var newSize = resizing.originalSize + resizing.difference;\n      var newSizeTwo = resizing.maxResize - resizing.difference;\n      var percentage = colOne.width.replace(\"%\", \"\");\n      percentage = parseFloat(percentage);\n      var percentageTwo = colTwo.width.replace(\"%\", \"\");\n      percentageTwo = parseFloat(percentageTwo);\n      var newPercentage = _.round(percentage * (newSize / resizing.originalSize), 2);\n      var percentageDiff = percentage - newPercentage;\n      var colTwoNew = _.round(percentageTwo + percentageDiff, 2);\n      var table = this.$block.find(\"table\")[0];\n      var w = table.offsetWidth;\n      var pixelwidthOne = w * (newPercentage / 100);\n      var pixelwidthTwo = w * (colTwoNew / 100);\n      var minimalPercentage = 100 * (minColWidth / w);\n      if (pixelwidthOne < minColWidth) {\n        var dif = minimalPercentage - newPercentage;\n        newPercentage = minimalPercentage;\n        colTwoNew -= dif;\n      }\n      if (pixelwidthTwo < minColWidth) {\n        var _dif = minimalPercentage - colTwoNew;\n        colTwoNew = minimalPercentage;\n        newPercentage -= _dif;\n      }\n      colOne.width = \"\".concat(newPercentage, \"%\");\n      colTwo.width = \"\".concat(colTwoNew, \"%\");\n      this.builder.history.ignoreAddHistory = true;\n      if (newPercentage != percentage || colTwoNew != percentageTwo) {\n        this.builder.history.addHistory(this.params.id, \"tableContent\");\n      } else {\n        var parent = resizing.target.parents(\"td\");\n        var _w = parent[0].offsetWidth;\n        resizing.target.css(\"left\", _w - 6 + \"px\");\n      }\n    },\n    correctPercentage: function correctPercentage() {\n      var helpers = this.params.helpers;\n      var content = this.params.content;\n      var resizing = helpers.resizing;\n      var tds = this.$block.find(\"td[data-rowpos=\\\"1\\\"]\");\n      var table = this.$block.find(\"table\")[0];\n      var tableW = table.offsetWidth;\n      tds.forEach(function (el) {\n        var pos = $$(el).data(\"pos\");\n        var tdW = el.offsetWidth;\n        var colspanSettings = _.find(content.colsSettings, function (o) {\n          return o.position == pos && !o.deleted;\n        });\n        var percentage = _.round(100 * (tdW / tableW), 2);\n        var size = colspanSettings.width.replace(\"%\", \"\");\n        // debugger;\n        if (size != percentage) {\n          colspanSettings.width = percentage + \"%\";\n        }\n        //console.log(this.app.builder.history.conetent);\n        // debugger;\n\n        // this.builder.history.ignoreAddHistory = false;\n        // this.builder.history.addHistory(this.params.id, \"tableContent\");\n      });\n    },\n    getOffsetArray: function getOffsetArray() {\n      var content = this.params.content;\n      var offsetArr = [];\n      for (var x = 0; x < content.tableData.length; x++) {\n        for (var y = 0; y < content.tableData[x].cells.length; y++) {\n          var data = content.tableData[x].cells[y];\n          if (!data.deleted) {\n            // debugger;\n            if (data.props.colspan > 1 || data.props.rowspan > 1) {\n              var obj = {\n                x: x,\n                y: y,\n                posCol: data.position,\n                posRow: content.tableData[x].position,\n                colspan: data.props.colspan - 1,\n                rowspan: data.props.rowspan - 1\n              };\n              offsetArr.push(obj);\n            }\n          }\n        }\n      }\n      return offsetArr;\n    },\n    getNumberOfRenderedCols: function getNumberOfRenderedCols() {\n      var block = this.$block;\n      var numberOfCols = 0;\n      var rows = block.find(\"table\")[0].rows;\n      var _iterator2 = _createForOfIteratorHelper(rows),\n        _step2;\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var row = _step2.value;\n          var len = 0;\n          var _iterator3 = _createForOfIteratorHelper(row.cells),\n            _step3;\n          try {\n            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n              var cell = _step3.value;\n              len += parseInt($(cell).attr(\"colspan\"));\n            }\n          } catch (err) {\n            _iterator3.e(err);\n          } finally {\n            _iterator3.f();\n          }\n          if (len > numberOfCols) {\n            numberOfCols = len;\n          }\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n      return numberOfCols;\n    },\n    setColSettings: function setColSettings(newPos) {\n      var before = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var content = this.params.content;\n      var index = null;\n      if (newPos == 1 || before) {\n        index = _.findIndex(content.colsSettings, function (o) {\n          return o.position == newPos && !o.deleted;\n        });\n      } else {\n        index = _.findIndex(content.colsSettings, function (o) {\n          return o.position == newPos - 1 && !o.deleted;\n        });\n      }\n      // debugger;\n      if (index >= 0) {\n        var colStoSplit = content.colsSettings[index];\n        var split = colStoSplit.width;\n        split = split.replace(\"%\", \"\");\n        split = parseFloat(split);\n        split = split / 2;\n        content.colsSettings[index].width = split + \"%\";\n        for (var i = 0; i < content.colsSettings.length; i++) {\n          if (content.colsSettings[i].position >= newPos) {\n            content.colsSettings[i].position += 1;\n          }\n        }\n        content.colsSettings.push({\n          position: newPos,\n          width: \"\".concat(split, \"%\"),\n          deleted: false,\n          id: this.app.utils.id(\"xxxx-xxxx-xxxx\")\n        });\n      }\n    },\n    delColSettings: function delColSettings(delPos) {\n      var content = this.params.content;\n      var prevPos = delPos == 1 ? delPos : delPos - 1;\n\n      // debugger;\n\n      var indexPrev = _.findIndex(content.colsSettings, function (o) {\n        return o.position == prevPos && !o.deleted;\n      });\n      var colToEnlarge = content.colsSettings[indexPrev];\n      var index = _.findIndex(content.colsSettings, function (o) {\n        return o.position == delPos && !o.deleted;\n      });\n      var origSize = content.colsSettings[index].width;\n      origSize = origSize.replace(\"%\", \"\");\n      var addSize = content.colsSettings[indexPrev].width;\n      addSize = addSize.replace(\"%\", \"\");\n      var newSize = parseFloat(origSize) + parseFloat(addSize);\n      colToEnlarge.width = newSize + \"%\";\n      if (index >= 0) {\n        var delCol = content.colsSettings[index];\n        delCol.deleted = true;\n        for (var i = 0; i < content.colsSettings.length; i++) {\n          if (content.colsSettings[i].position >= delPos) {\n            content.colsSettings[i].position -= 1;\n          }\n        }\n      }\n    },\n    createCellData: function createCellData(x, y, pos) {\n      var del = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n      var colspan = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\n      var rowspan = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;\n      return {\n        dataKey: \"\".concat(x, \"_\").concat(y),\n        position: pos,\n        id: this.app.utils.id(\"xxxx-xxxx-xxxx\"),\n        deleted: del,\n        props: {\n          colspan: colspan,\n          rowspan: rowspan\n        }\n      };\n    },\n    setVars: function setVars(string) {\n      // debugger;\n      var helpers = this.params.helpers;\n      var arr = string.split(\"_\");\n      var varX = parseInt(arr[0]);\n      var varY = parseInt(arr[1]);\n      if (varX > helpers.currentX) {\n        helpers.currentX = varX;\n      }\n      if (varY > helpers.currentY) {\n        helpers.currentY = varY;\n      }\n    },\n    setEndCell: function setEndCell(cell) {\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var $componentEl = this.$block;\n      helpers.selectedIds = [];\n      //   debugger;\n      var betweenCells = methods.getCellsBetween(helpers.startCell, cell);\n      betweenCells.forEach(function (el) {\n        var $el = $(el);\n        $el.addClass(\"col-selected\");\n        helpers.selectedIds.push($el.attr(\"id\"));\n      });\n    },\n    getCellsBetween: function getCellsBetween(start, end) {\n      var methods = this.params.methods;\n      var block = this.$block;\n      block.find(\"table\").css(\"border-collapse\", \"separate\");\n      var bounds, elementsInside;\n      elementsInside = [start, end];\n      do {\n        bounds = methods.getBoundsForElements(elementsInside);\n        // debugger;\n        var elementsInsideAfterExpansion = methods.rectangleSelect(\"td\", bounds);\n        if (elementsInside.length == elementsInsideAfterExpansion.length) {\n          block.find(\"table\").css(\"border-collapse\", \"collapse\");\n          return elementsInside;\n        } else elementsInside = elementsInsideAfterExpansion;\n      } while (true);\n    },\n    getBoundsForElements: function getBoundsForElements(elements) {\n      //   debugger;\n      var x1 = elements.reduce(function (currMinX, element) {\n        var elementLeft = $(element).offset().left;\n        return currMinX && currMinX < elementLeft ? currMinX : elementLeft;\n      }, undefined);\n      var x2 = elements.reduce(function (currMaxX, element) {\n        var elementRight = $(element).offset().left + $(element).outerWidth();\n        return currMaxX && currMaxX > elementRight ? currMaxX : elementRight;\n      }, undefined);\n      var y1 = elements.reduce(function (currMinY, element) {\n        var elementTop = $(element).offset().top;\n        return currMinY && currMinY < elementTop ? currMinY : elementTop;\n      }, undefined);\n      var y2 = elements.reduce(function (currMaxY, element) {\n        var elementBottom = $(element).offset().top + $(element).outerHeight();\n        return currMaxY && currMaxY > elementBottom ? currMaxY : elementBottom;\n      }, undefined);\n      //   //console.log(\"Bounds\", elements, \":\", x1, x2, \"|\", y1, y1);\n      return {\n        minX: x1,\n        maxX: x2,\n        minY: y1,\n        maxY: y2\n      };\n    },\n    rectangleSelect: function rectangleSelect(selector, bounds) {\n      var methods = this.params.methods;\n      var block = this.$block;\n      var tds = block.find(selector);\n      var elements = [];\n      // //console.log(\"B\", bounds);\n      $(tds).each(function () {\n        // debugger;\n\n        var $this = $(this);\n        var offset = $this.offset();\n        var x = offset.left;\n        var y = offset.top;\n        var w = $this.outerWidth();\n        var h = $this.outerHeight();\n        // debugger;\n        if (methods.isPointBetween(x, bounds.minX, bounds.maxX) && methods.isPointBetween(y, bounds.minY, bounds.maxY) || methods.isPointBetween(x + w, bounds.minX, bounds.maxX) && methods.isPointBetween(y + h, bounds.minY, bounds.maxY)) {\n          // //console.log(\"YES\");\n          elements.push($this.get(0));\n        }\n      });\n      return elements;\n    },\n    isPointBetween: function isPointBetween(point, x1, x2) {\n      return point >= x1 && point <= x2 || point <= x1 && point >= x2;\n    },\n    //ROWS\n    addRow: function addRow(newPos) {\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var block = this.$block;\n      this.builder.history.ignoreAddHistory = true;\n\n      //Předpřipravená strukutra pro řádek\n      var rowStructure = {\n        position: newPos,\n        id: this.app.utils.id(\"xxxx-xxxx-xxxx\"),\n        deleted: false,\n        cells: []\n      };\n      var isFirst = newPos == 1; //Přidává se na první místo?\n\n      content.tableData.push(rowStructure); // přidat do tabulky\n\n      var numberOfCols = methods.getNumberOfRenderedCols(); //počet vyrenderovaných (nesmazanych) sloupcu\n\n      var allRows = content.tableData[0].cells.length; //celková délka pole sloupců\n\n      var offsetArr = methods.getOffsetArray(); //Získat pole s infromacemi o buňkách s col/row spanem\n\n      var alreadyEnlarged = []; //pokud buňka s rowspan má zároveň i colspan, nezvětšovat víckrát\n      var _loop3 = function _loop3() {\n        var delFlag = false;\n        var pos = y + 1;\n        var offsetItem = _.find(offsetArr, function (o) {\n          //Zjistit zda do místa nové buňky zasahuje buňka z vyššího řádku (rowspan)\n          return o.posCol <= pos && o.posCol + o.colspan >= pos && o.posRow <= newPos && o.posRow + o.rowspan >= newPos && o.posRow != newPos;\n        });\n        // debugger;\n        if (offsetItem && !isFirst) {\n          //pokud zasahuje a nejedná se o zařazení na první pozici zvětši rowspan\n          if (!alreadyEnlarged.includes(content.tableData[offsetItem.x].cells[offsetItem.y].id)) {\n            content.tableData[offsetItem.x].cells[offsetItem.y].props.rowspan++;\n            alreadyEnlarged.push(content.tableData[offsetItem.x].cells[offsetItem.y].id);\n          }\n          delFlag = true;\n        }\n        if (pos > numberOfCols) {\n          //všechny buňky za realnou hranicí přidávat s deleted true (udržuje se NxM matice)\n          delFlag = true;\n        }\n\n        //přidat buňku do řádku\n\n        content.tableData[content.tableData.length - 1].cells.push(methods.createCellData(helpers.currentX + 1, y, pos, delFlag));\n      };\n      for (var y = 0; y < allRows; y++) {\n        _loop3();\n      }\n      methods.enlargeRowsPos(newPos); //zvětšit pozice řádků\n\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n    },\n    enlargeColPos: function enlargeColPos(x, startPos) {\n      var content = this.params.content;\n      for (var y = 0; y < content.tableData[x].cells.length; y++) {\n        if (content.tableData[x].cells[y].position >= startPos) {\n          content.tableData[x].cells[y].position = content.tableData[x].cells[y].position + 1;\n        }\n      }\n    },\n    enlargeRowsPos: function enlargeRowsPos(startPos) {\n      var increacer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var content = this.params.content;\n      for (var x = 0; x < content.tableData.length - 1; x++) {\n        if (content.tableData[x].position >= startPos) {\n          content.tableData[x].position = content.tableData[x].position + increacer;\n        }\n      }\n    },\n    reduceRowsPos: function reduceRowsPos(startPos) {\n      var reducer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var content = this.params.content;\n      for (var x = 0; x < content.tableData.length; x++) {\n        if (content.tableData[x].position > startPos) {\n          content.tableData[x].position = content.tableData[x].position - reducer;\n        }\n      }\n    },\n    //COLS\n    deleteCol: function deleteCol(delPos) {\n      var delLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      this.builder.history.ignoreAddHistory = true;\n      var alreadyAffected = [];\n      var _loop4 = function _loop4() {\n        // debugger;\n        var currDelPos = delPos;\n        var offsetArr = methods.getOffsetArray();\n        var colspanItems = _.filter(offsetArr, function (o) {\n          return o.posCol <= currDelPos && o.posCol + o.colspan >= currDelPos && o.colspan > 0;\n        });\n        var _iterator4 = _createForOfIteratorHelper(colspanItems),\n          _step4;\n        try {\n          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n            var element = _step4.value;\n            //pokud element s colspanem začíná na této pozici\n            if (element.posCol == currDelPos) {\n              //tak posunout a zmenšit colspan\n              content.tableData[element.x].cells[element.y].props.colspan -= 1;\n              content.tableData[element.x].cells[element.y].position += 1;\n            } else {\n              //jinak jen zmenšit colspan\n              content.tableData[element.x].cells[element.y].props.colspan -= 1;\n            }\n          }\n        } catch (err) {\n          _iterator4.e(err);\n        } finally {\n          _iterator4.f();\n        }\n        for (var x = 0; x < content.tableData.length; x++) {\n          var index = _.findIndex(content.tableData[x].cells, function (o) {\n            return o.position == currDelPos && !o.deleted;\n          });\n          if (index >= 0) {\n            content.tableData[x].cells[index].deleted = true;\n          }\n          methods.reduceColPos(x, currDelPos);\n        }\n        methods.delColSettings(currDelPos);\n      };\n      for (var i = 0; i < delLength; i++) {\n        _loop4();\n      }\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n    },\n    addCol: function addCol(newPos) {\n      var before = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      var block = this.$block;\n      this.builder.history.ignoreAddHistory = true;\n      var numberOfCols = methods.getNumberOfRenderedCols(); // získat počet vykreslených buněk na řádku\n\n      var isLast = newPos > numberOfCols; //vkládá se na konec?\n      var isFirst = newPos == 1; //vkládá se na začatek?\n\n      var offsetArr = methods.getOffsetArray(); //získat pole informací o buňkách s row/colspan\n\n      var alreadyEnlarged = [];\n      var _loop5 = function _loop5(x) {\n        var cellIsInRow = _.find(content.tableData[x].cells, function (o) {\n          //Existuje v řádku buňka na této pozici\n          return o.position == newPos && !o.deleted;\n        });\n        var isStartOfOffset = _.find(offsetArr, function (o) {\n          //zaříná na řádku buňka s offsetem?\n          return o.posCol == newPos && o.posRow + o.rowspan >= content.tableData[x].position;\n        });\n        var delFlag = false;\n        //Pokud buňka neexistuje a nejedná se ani o vložení na první či poslední místo\n        //najdi a zvětši colspan buňky co přesahuje\n        if (cellIsInRow || isLast || isFirst || isStartOfOffset) {} else {\n          // //console.log(\"Is offsetItem\");\n          var offsetCell = _.find(offsetArr, function (o) {\n            return o.x == content.tableData[x].position && o.posCol <= newPos && o.posCol + o.colspan >= newPos || o.posRow + o.rowspan >= content.tableData[x].position && o.posCol <= newPos && o.posCol + o.colspan >= newPos;\n          });\n          if (offsetCell) {\n            if (!alreadyEnlarged.includes(content.tableData[offsetCell.x].cells[offsetCell.y].id)) {\n              content.tableData[offsetCell.x].cells[offsetCell.y].props.colspan += 1;\n              alreadyEnlarged.push(content.tableData[offsetCell.x].cells[offsetCell.y].id);\n            }\n          }\n          delFlag = true;\n        }\n        methods.enlargeColPos(x, newPos);\n        content.tableData[x].cells.push(methods.createCellData(x, helpers.currentY + 1, newPos, delFlag));\n        // }\n      };\n      for (var x = 0; x < content.tableData.length; x++) {\n        _loop5(x);\n      }\n      methods.setColSettings(newPos, before);\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n    },\n    reduceColPos: function reduceColPos(x, startPos) {\n      var content = this.params.content;\n      // debugger;\n      for (var y = 0; y < content.tableData[x].cells.length; y++) {\n        if (content.tableData[x].cells[y].position > startPos) {\n          content.tableData[x].cells[y].position = content.tableData[x].cells[y].position - 1;\n        }\n      }\n    },\n    deleteRow: function deleteRow(delPos) {\n      var delLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n      var content = this.params.content;\n      var methods = this.params.methods;\n      var helpers = this.params.helpers;\n      this.builder.history.ignoreAddHistory = true;\n      var index = _.findIndex(content.tableData, function (o) {\n        return o.position == delPos;\n      });\n      var tracker = 0;\n      var _loop6 = function _loop6() {\n        var rowPos = content.tableData[x].position;\n        if (!content.tableData[x].deleted && rowPos >= delPos && rowPos <= delPos + (delLength - 1)) {\n          var offsetArr = methods.getOffsetArray();\n          var rowspanOnLine = _.filter(offsetArr, function (o) {\n            return delPos >= o.posRow && delPos <= o.posRow + o.rowspan && o.rowspan > 0;\n          });\n          var _iterator5 = _createForOfIteratorHelper(rowspanOnLine),\n            _step5;\n          try {\n            for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n              var element = _step5.value;\n              tracker++;\n              if (element.posRow == rowPos) {\n                //smazat a vytvořit pod nový el\n                var nextIndex = _.findIndex(content.tableData, function (o) {\n                  return o.position == rowPos + 1 && !o.deleted;\n                });\n                content.tableData[nextIndex].cells.push(methods.createCellData(helpers.currentX + tracker, helpers.currentY + tracker, element.posCol, false, element.colspan + 1, element.rowspan));\n              } else {\n                //snížit rowspan\n                content.tableData[element.x].cells[element.y].props.rowspan -= 1;\n              }\n            }\n          } catch (err) {\n            _iterator5.e(err);\n          } finally {\n            _iterator5.f();\n          }\n          for (var y = 0; y < content.tableData[x].cells.length; y++) {\n            content.tableData[x].cells[y].deleted = true;\n          }\n        }\n      };\n      for (var x = 0; x < content.tableData.length; x++) {\n        _loop6();\n      }\n      content.tableData[index].deleted = true;\n      methods.reduceRowsPos(delPos, delLength);\n      this.builder.history.ignoreAddHistory = false;\n      this.builder.history.addHistory(this.params.id, \"tableContent\");\n    },\n    //SELECT\n    createResizerDiv: function createResizerDiv(height, i) {\n      var div = \"<div class=\\\"resizer\\\" style=\\\"height: \".concat(height, \"px\\\" data-pos=\\\"\").concat(i, \"\\\"></div>\");\n      return div;\n    },\n    pasteFromClipboard: function pasteFromClipboard() {\n      var app = this.app;\n      var methods = this.params.methods;\n      var pastePopup = app.popup.create({\n        content: \"\\n          <div class=\\\"popup\\\">\\n            <div class=\\\"block\\\">\\n                <h2>Create data from clipboard (CSV)</h2>\\n                <div class=\\\"list no-hairlines-md\\\">\\n                <ul>\\n                  <li class=\\\"item-content item-input\\\">\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title item-label\\\">CSV data</div>\\n                      <div class=\\\"item-input-wrap\\\">\\n                        <textArea placeholder=\\\"CSV\\\" class=\\\"resizable table-data\\\"></textArea>\\n                        <span class=\\\"input-clear-button\\\"></span>\\n                      </div>\\n                    </div>\\n                  </li>\\n                  <li class=\\\"item-content item-input\\\">\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title item-label\\\">Line separator</div>\\n                      <div class=\\\"item-input-wrap\\\">\\n                        <input class=\\\"line-separator\\\" value=\\\"\\\\n\\\"  type=\\\"text\\\" placeholder=\\\"Line separator\\\" />\\n                        <span class=\\\"input-clear-button\\\"></span>\\n                      </div>\\n                    </div>\\n                  </li>\\n                  <li class=\\\"item-content item-input\\\">\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title item-label\\\">Cell separator</div>\\n                      <div class=\\\"item-input-wrap\\\">\\n                        <input class=\\\"cell-separator\\\" value=\\\",\\\" type=\\\"text\\\" placeholder=\\\"Cell separator\\\" />\\n                        <span class=\\\"input-clear-button\\\"></span>\\n                      </div>\\n                    </div>\\n                  </li>\\n                  <li>\\n                    <button class=\\\"button button-fill load-button\\\">Load</button>\\n                  </li>\\n                </ul>\\n              </div>\\n            </div>\\n          </div>\\n        \",\n        // Events\n        on: {\n          open: function open(popup) {\n            //console.log(\"Popup open\");\n\n            var buttonEl = popup.$el.find(\".load-button\");\n            buttonEl.on(\"click\", function (e) {\n              var data = popup.$el.find(\".table-data\").val();\n              var lineSeparator = popup.$el.find(\".line-separator\").val();\n              var cellSeparator = popup.$el.find(\".cell-separator\").val();\n              methods.parseCSV(data, lineSeparator, cellSeparator);\n            });\n          },\n          opened: function opened(popup) {\n            //console.log(\"Popup opened\");\n          }\n        }\n      });\n      pastePopup.open();\n    },\n    parseCSV: function parseCSV(data, lineSeparator, cellSeparator) {\n      var component = this;\n      var colSeparator = cellSeparator;\n      var rowSeparator = lineSeparator;\n      if (rowSeparator == \"\\\\n\") {\n        rowSeparator = \"\\n\";\n      }\n      var clipText = data;\n      function render(data, cells, rows) {\n        // alert(\"rendering\");\n\n        for (var val in component.components) {\n          component.components[val].forEach(function (element) {\n            component.app.builder.action.remove(element);\n          });\n        }\n        component.app.builder.history.ignoreAddHistory = true;\n        component.params.content.rows = rows;\n        component.params.content.cels = cells;\n        for (var i = 0; i < data.length; i++) {\n          var cellsToRender = data[i];\n          for (var y = 0; y < cellsToRender.length; y++) {\n            var cellData = cellsToRender[y];\n            var a = i + 1;\n            var b = y + 1;\n            var key = a + \"_\" + b;\n            var obj = {\n              name: \"cell-02\",\n              parentId: component.params.id,\n              subKey: key,\n              content: {\n                data: cellData\n              }\n            };\n            component.app.builder.createComponent(obj, component.params.content.pageId);\n          }\n        }\n        component.app.builder.history.ignoreAddHistory = false;\n        component.app.builder.history.addHistory(component.params.id, \"add\");\n        // component.app.builder.history.ignoreHistory = false;\n\n        // app.builder.history.addHistory(id, \"chapters\", \"chapters\");\n      }\n      function clip() {\n        // get the clipboard text\n        // alert(\"ok\");\n\n        var clipRows = clipText.split(rowSeparator);\n        // split rows into columns\n        var numberOfCels = 0;\n        for (var i = 0; i < clipRows.length; i++) {\n          clipRows[i] = clipRows[i].split(colSeparator);\n          if (clipRows[i].length > numberOfCels) {\n            numberOfCels = clipRows[i].length;\n          }\n        }\n        var numberOfRows = clipRows.length;\n        component.app.dialog.confirm(\"Dojde k přepsání stavajících hodnot tabulky.\", \"Chcete pokračovat?\", function () {\n          render(clipRows, numberOfCels, numberOfRows);\n        });\n      }\n      clip();\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_new-tables/table-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/_new-tables/table-utils.js":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/_new-tables/table-utils.js ***!
  \***********************************************************************************/
/*! exports provided: getRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRef\", function() { return getRef; });\nfunction getRef() {\n  var _this = this;\n  var refArray = [];\n  var components = this.getPageComponentsReference();\n  var chapter = this.chapterReference;\n  var counter = 1;\n  var flag = true;\n  components.forEach(function (el, index) {\n    if (el.params.id == _this.params.id) {\n      flag = false;\n      return;\n    }\n    var methods = el.params.methods;\n    if (methods && methods.hasOwnProperty(\"getTablesReference\") && flag) {\n      counter++;\n    }\n  });\n\n  // debugger;\n\n  var chapterNumber = \"\";\n  var numbered = true;\n  if (chapter.isNumbered) {\n    chapterNumber = chapter.number;\n  } else {\n    chapterNumber = chapter.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") + \".\";\n    numbered = false;\n  }\n  var refObj = {};\n  refObj[\"string\"] = chapterNumber + counter;\n  refObj[\"id\"] = this.params.id;\n  refObj[\"chapterName\"] = chapter.name;\n  refObj[\"chapterLink\"] = chapter.fullPath;\n  refObj[\"isNumbered\"] = numbered;\n  refArray.push(refObj);\n\n  //   debugger;\n\n  return refArray;\n}\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/_new-tables/table-utils.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/accordions/accordion-menu-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js ***!
  \*******************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! abcjs */ \"./node_modules/abcjs/index.js\");\n/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(abcjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _nr_01_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nr-01.less */ \"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.less\");\n/* harmony import */ var _nr_01_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nr_01_less__WEBPACK_IMPORTED_MODULE_1__);\n\n// import \"abcjs/abcjs-midi.css\";\n// import abcjsMidi from \"abcjs/midi\";\n//DOKUMENTACE\n// https://paulrosen.github.io/abcjs/audio/synthesized-sound.html#example\n\n//Konfigurátor\n// https://configurator.abcjs.net/audio\n\n//Dokumentace ABC notace\n//http://abcnotation.com/learn\n// dobrý návod http://www.lesession.co.uk/abc/abc_notation.htm\n// https://abcnotation.com/wiki/abc:standard:v2.1\n\n// Online konvertor musicxml na ABC\n// https://wim.vree.org/js/xml2abc-js.html\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"nr-01\",\n  title: \"Interactive music sheet\",\n  subtitle: \"\",\n  deleted: true,\n  contentSetting: {\n    title: {\n      name: \"Track title\",\n      type: \"textarea\"\n    },\n    subTitle: {\n      name: \"Track subtitle\",\n      type: \"textarea\"\n    },\n    abcjs: {\n      name: \"ABC notation\",\n      type: \"textarea\"\n    },\n    player: {\n      name: \"Enable player?\",\n      type: \"bool\",\n      hidden: {\n        mp3Delay: {\n          name: \"Delay of mp3 file\",\n          type: \"input-number\"\n        },\n        abcDelay: {\n          name: \"Delay of  note highlight.\",\n          type: \"input-number\"\n        },\n        audioPath: {\n          name: \"MP3 file\",\n          type: \"audio\"\n        }\n      }\n    }\n  },\n  content: {\n    title: \"\",\n    subTitle: \"\",\n    player: true,\n    abcjs: \"X:1\\nL:1/8\\nQ:1/4=60\\nM:2/4\\nI:linebreak $\\nK:C\\nV:1 treble nm=\\\"Piano\\\" snm=\\\\\\\"Pno.\\\\\\\"\\nV:1\\nx4 |\\\"M\\xEDrn\\u011B\\\" EE EE | EE E2 | EE EE | EE E2 | EE E2 | EE E2 | EE EE | EE E2 |] %9\\nw: |\\u0160lo d\\u011Bv- \\u010D\\xE1t- ko|pro vo- du,|po ces- t\\u011B ke|pra- me- nu.|P\\u0159i- \\u0161el p\\xE1n,|roz- bil d\\u017Eb\\xE1n,|tra- la- la- la,|roz- bil d\\u017Eb\\xE1n.|\",\n    drumIntro: 0,\n    mp3Delay: 0,\n    abcDelay: 0,\n    audioPath: \"https://devbook.futurebooks.cz/1.mp3\"\n  },\n  html: function html(content, builder, styles) {\n    var player = \"\";\n    if (content.player) {\n      player = \"<div class=\\\"notes-player\\\">\\n      <div class=\\\"np-bar\\\">\\n        <span class=\\\"np-left\\\" id=\\\"time-player\\\"></span>\\n        <span class=\\\"np-right\\\" id=\\\"duration-player\\\"></span>\\n      </div>\\n      <div class=\\\"np-control\\\">\\n        <a href=\\\"#\\\" id=\\\"start-player\\\"><i class=\\\"icon material-icons\\\">play_arrow</i></a>\\n        <a href=\\\"#\\\" id=\\\"refresh-player\\\"  class=\\\"disabled\\\"><i class=\\\"icon material-icons rotating\\\">refresh</i></a>\\n        <a href=\\\"#\\\" id=\\\"stop-player\\\" class=\\\"disabled\\\"><i class=\\\"icon material-icons\\\">stop</i></a>\\n      </div>\\n    </div>\";\n    }\n    return \"\\n<div class=\\\"nr-head-wrapper\\\">\\n<div class=\\\"nr-head\\\">\".concat(content.title, \"</div>\\n<div class=\\\"nr-right-side\\\">\").concat(content.subTitle, \"</div>\\n</div>\\n<div id='abc-midi-\").concat(builder.id, \"' style=\\\"display:none;\\\"></div>\\n    <div id='abc-paper-\").concat(builder.id, \"'></div>\\n\\n    <audio id=\\\"mp3\\\" preload=\\\"auto\\\" controls style=\\\"display:none;\\\">\\n  <source src=\\\"\").concat(content.audioPath, \"\\\" type=\\\"audio/mpeg\\\">\\nYour browser does not support the audio element.\\n</audio>\\n\\n    \").concat(player, \"\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find\n      // debugger\n\n      //TODO\n      //Funkřní nastavení: fuck + drumIntro 1 + delay 1900\n\n      var id = builder.params.id;\n      var app = builder.app;\n      // debugger\n      // debugger\n      var prev = id;\n      var tune1 = abcjs__WEBPACK_IMPORTED_MODULE_0___default.a.renderAbc(\"abc-paper-\" + id, builder.params.content.abcjs, {\n        responsive: \"resize\"\n      });\n      var colorRange = function colorRange(range, color) {\n        if (range && range.elements) {\n          range.elements.forEach(function (set) {\n            set.forEach(function (item) {\n              $(item).attr({\n                fill: color\n              });\n              prev = id;\n            });\n          });\n        }\n      };\n      var $player = $builderEl.find(\"#mp3\");\n      var player = $player[0];\n      player.muted = true;\n      player.pause();\n      player.currentTime = 0;\n      window.player = player;\n      var abcTimer;\n      var p = function p() {\n        player.pause();\n\n        // abcjsMidi.midi.startPlaying(\n        //   $builderEl.find(\".abcjs-inline-midi\").eq(0)[0]\n        // );\n      };\n      var ended = function ended() {\n        // $player.once('play', p);\n        $builderEl.find(\"#stop-player\").addClass(\"disabled\");\n        $builderEl.find(\"#start-player\").removeClass(\"disabled\");\n        // alert('c');\n\n        // abcjsMidi.midi.stopPlaying();\n        clearTimeout(timer);\n        player.muted = true;\n        player.pause();\n        player.currentTime = 0;\n        player.pause();\n        setTimeout(function () {\n          first = true;\n        }, 100);\n        $timeBlock.html(\"\");\n      };\n      var first = true;\n      $player.off(\"ended\", ended);\n      $player.on(\"ended\", ended);\n\n      // $player.off('play', p);\n      // $player.once('play', p);\n\n      // player.removeEventListener('ended', ended);\n      // player.addEventListener('ended', ended)\n      //\n      // player.removeEventListener('play', p);\n      // player.addEventListener('play', p)\n\n      var timer;\n\n      // let midi1 = abcjsMidi.renderMidi(\n      //   \"abc-midi-\" + id,\n      //   builder.params.content.abcjs,\n      //   {\n      //     midiListener: function () {\n      //       if (first) {\n      //         // $player.off('play', p);\n      //         // player.removeEventListener('play', p);\n      //         timer = setTimeout(function () {\n      //           $builderEl.find(\"#start-player\").addClass(\"disabled\");\n      //           $builderEl.find(\"#stop-player\").removeClass(\"disabled\");\n      //           $builderEl.find(\"#refresh-player\").addClass(\"disabled\");\n      //           player.currentTime = 0;\n      //           player.muted = false;\n      //\n      //           player.play();\n      //           // setTimeout(function () {\n      //           //   $player.on('play', p);\n      //           //   // player.addEventListener('play', p)\n      //           // }, 1000)\n      //         }, builder.params.content.mp3Delay);\n      //\n      //       }\n      //       first = false;\n      //     },\n      //     voicesOff: true,\n      //     drumIntro: builder.params.content.drumIntro,\n      //     animate: {\n      //       listener: function (lastRange, currentRange, context) {\n      //         abcTimer = setTimeout(function () {\n      //           colorRange(lastRange, \"#000000\");\n      //           colorRange(currentRange, app.book.params.color);\n      //         }, builder.params.content.abcDelay);\n      //       },\n      //       target: tune1[0],\n      //       qpm: 120,\n      //     },\n      //   }\n      // );\n\n      // window.midi1 = midi1;\n      // window.abcjsMidi = abcjsMidi;\n\n      $builderEl.find(\"#start-player\").off(\"click\");\n      $builderEl.find(\"#start-player\").on(\"click\", function () {\n        $builderEl.find(\"#start-player\").addClass(\"disabled\");\n        $builderEl.find(\"#stop-player\").addClass(\"disabled\");\n        $builderEl.find(\"#refresh-player\").removeClass(\"disabled\");\n\n        // builder.pageComponentContext.$el.find('#stop-player').click();\n\n        $player.once(\"play\", p);\n        player.play();\n      });\n      $builderEl.find(\"#stop-player\").off(\"click\");\n      $builderEl.find(\"#stop-player\").on(\"click\", function () {\n        ended();\n      });\n      var $timeBlock = $builderEl.find(\"#time-player\");\n      var $durationBlock = $builderEl.find(\"#duration-player\");\n      // let audio = new Audio('https://devbook.futurebooks.cz/1.mp3')\n\n      $(player).on(\"loadedmetadata\", function () {\n        var duration = player.duration;\n        var sec = new Number();\n        var min = new Number();\n        sec = Math.floor(duration);\n        min = Math.floor(sec / 60);\n        min = min >= 10 ? min : \"0\" + min;\n        sec = Math.floor(sec % 60);\n        sec = sec >= 10 ? sec : \"0\" + sec;\n        $durationBlock.html(min + \":\" + sec);\n        $durationBlock.attr(\"title\", duration);\n        $timeBlock.html(\"00:00\");\n      });\n      player.addEventListener(\"timeupdate\", function () {\n        var duration = player.currentTime; //song is object of audio.  song= new Audio();\n\n        var sec = new Number();\n        var min = new Number();\n        sec = Math.floor(duration);\n        min = Math.floor(sec / 60);\n        min = min >= 10 ? min : \"0\" + min;\n        sec = Math.floor(sec % 60);\n        sec = sec >= 10 ? sec : \"0\" + sec;\n        $timeBlock.html(min + \":\" + sec); //Id where i have to print the total duration of song.\n      });\n\n      //\n      // abcjsMidi.midi.stopPlaying();\n      //\n      // abcjsMidi.midi.restartPlaying();\n      //\n      // abcjsMidi.midi.setLoop(document.querySelector(\".abcjs-inline-midi\"), true);\n      //\n      // abcjsMidi.midi.setRandomProgress(0.33);\n\n      //abcjs.midi.setSoundFont(\"\");\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.less":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.less ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js ***!
  \*******************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! abcjs */ \"./node_modules/abcjs/index.js\");\n/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(abcjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _nr_01__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nr-01 */ \"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-01.js\");\n/* harmony import */ var _nr_02_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nr-02.less */ \"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.less\");\n/* harmony import */ var _nr_02_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nr_02_less__WEBPACK_IMPORTED_MODULE_2__);\n\n// import \"abcjs/abcjs-midi.css\";\n// import abcjsMidi from \"abcjs/midi\";\n\n\n\nvar nr2 = _.cloneDeep(_nr_01__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\ndelete nr2.contentSetting.player.hidden.mp3Delay;\ndelete nr2.contentSetting.player.hidden.abcDelay;\nnr2.name = \"nr-02\";\nnr2.subtitle = \"without highlight\";\nnr2.on.init = function ($builderEl, builder) {\n  var id = builder.params.id;\n  var app = builder.app;\n  var prev = id;\n  var tune1 = abcjs__WEBPACK_IMPORTED_MODULE_0___default.a.renderAbc(\"abc-paper-\" + id, builder.params.content.abcjs, {\n    responsive: \"resize\"\n  });\n  var $player = $builderEl.find(\"#mp3\");\n  var player = $player[0];\n  player.muted = true;\n  player.pause();\n  player.currentTime = 0;\n\n  // window.player = player;\n\n  var p = function p() {\n    player.pause();\n    $builderEl.find(\"#start-player\").addClass(\"disabled\");\n    $builderEl.find(\"#stop-player\").removeClass(\"disabled\");\n    $builderEl.find(\"#refresh-player\").addClass(\"disabled\");\n    player.currentTime = 0;\n    player.muted = false;\n    player.play();\n  };\n  var ended = function ended() {\n    $builderEl.find(\"#stop-player\").addClass(\"disabled\");\n    $builderEl.find(\"#start-player\").removeClass(\"disabled\");\n    player.muted = true;\n    player.pause();\n    player.currentTime = 0;\n    player.pause();\n    $timeBlock.html(\"\");\n  };\n  var first = true;\n  $player.off(\"ended\", ended);\n  $player.on(\"ended\", ended);\n\n  // let midi1 = abcjsMidi.renderMidi(\n  //   \"abc-midi-\" + id,\n  //   builder.params.content.abcjs,\n  //   {\n  //     voicesOff: true,\n  //   }\n  // );\n\n  // window.midi1 = midi1;\n  // window.abcjsMidi = abcjsMidi;\n\n  $builderEl.find(\"#start-player\").off(\"click\");\n  $builderEl.find(\"#start-player\").on(\"click\", function () {\n    $builderEl.find(\"#start-player\").addClass(\"disabled\");\n    $builderEl.find(\"#stop-player\").addClass(\"disabled\");\n    $builderEl.find(\"#refresh-player\").removeClass(\"disabled\");\n    debugger;\n    $player.once(\"play\", p);\n    player.play();\n  });\n  $builderEl.find(\"#stop-player\").off(\"click\");\n  $builderEl.find(\"#stop-player\").on(\"click\", function () {\n    ended();\n  });\n  var $timeBlock = $builderEl.find(\"#time-player\");\n  var $durationBlock = $builderEl.find(\"#duration-player\");\n  // let audio = new Audio('https://devbook.futurebooks.cz/1.mp3')\n\n  $(player).on(\"loadedmetadata\", function () {\n    var duration = player.duration;\n    var sec = new Number();\n    var min = new Number();\n    sec = Math.floor(duration);\n    min = Math.floor(sec / 60);\n    min = min >= 10 ? min : \"0\" + min;\n    sec = Math.floor(sec % 60);\n    sec = sec >= 10 ? sec : \"0\" + sec;\n    $durationBlock.html(min + \":\" + sec);\n    $durationBlock.attr(\"title\", duration);\n    $timeBlock.html(\"00:00\");\n  });\n  player.addEventListener(\"timeupdate\", function () {\n    var duration = player.currentTime; //song is object of audio.  song= new Audio();\n\n    var sec = new Number();\n    var min = new Number();\n    sec = Math.floor(duration);\n    min = Math.floor(sec / 60);\n    min = min >= 10 ? min : \"0\" + min;\n    sec = Math.floor(sec % 60);\n    sec = sec >= 10 ? sec : \"0\" + sec;\n    $timeBlock.html(min + \":\" + sec); //Id where i have to print the total duration of song.\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (nr2);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.less":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.less ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js ***!
  \*******************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _nr_03_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nr-03.less */ \"./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.less\");\n/* harmony import */ var _nr_03_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nr_03_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! abcjs */ \"./node_modules/abcjs/index.js\");\n/* harmony import */ var abcjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(abcjs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var abcjs_abcjs_audio_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! abcjs/abcjs-audio.css */ \"./node_modules/abcjs/abcjs-audio.css\");\n/* harmony import */ var abcjs_abcjs_audio_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(abcjs_abcjs_audio_css__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n//DOKUMENTACE\n// https://paulrosen.github.io/abcjs/audio/synthesized-sound.html#example\n\n//Konfigurátor\n// https://configurator.abcjs.net/audio\n\n//Dokumentace ABC notace\n//http://abcnotation.com/learn\n// dobrý návod http://www.lesession.co.uk/abc/abc_notation.htm\n// https://abcnotation.com/wiki/abc:standard:v2.1\n\n// Online konvertor musicxml na ABC\n// https://wim.vree.org/js/xml2abc-js.html\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"nr-03\",\n  title: \"Interactive music sheet\",\n  subtitle: \"\",\n  contentSetting: {\n    title: {\n      name: \"Track title\",\n      type: \"textarea\"\n    },\n    subTitle: {\n      name: \"Track subtitle\",\n      type: \"textarea\"\n    },\n    tempo: {\n      name: \"Tempo\",\n      type: \"input-number\"\n    },\n    abcjs: {\n      name: \"ABC notation\",\n      type: \"textarea\"\n    },\n    player: {\n      name: \"Enable player?\",\n      type: \"bool\",\n      hidden: {\n        abcAnim: {\n          name: \"Animate (highlight) notes while mp3 is playing?\",\n          type: \"bool\"\n        },\n        mp3Delay: {\n          name: \"Delay of mp3 file (ms)\",\n          type: \"input-number\"\n        },\n        abcDelay: {\n          name: \"Delay of  note highlight. (ms)\",\n          type: \"input-number\"\n        },\n        audioPath: {\n          name: \"MP3 file\",\n          type: \"audio\"\n        }\n      }\n    }\n  },\n  content: {\n    title: \"\",\n    tempo: 120,\n    subTitle: \"\",\n    player: true,\n    abcjs: \"X:1\\nL:1/8\\nQ:1/4=60\\nM:2/4\\nI:linebreak $\\nK:C\\nV:1 treble nm=\\\"Piano\\\" snm=\\\\\\\"Pno.\\\\\\\"\\nV:1\\nx4 |\\\"M\\xEDrn\\u011B\\\" EE EE | EE E2 | EE EE | EE E2 | EE E2 | EE E2 | EE EE | EE E2 |] %9\\nw: |\\u0160lo d\\u011Bv- \\u010D\\xE1t- ko|pro vo- du,|po ces- t\\u011B ke|pra- me- nu.|P\\u0159i- \\u0161el p\\xE1n,|roz- bil d\\u017Eb\\xE1n,|tra- la- la- la,|roz- bil d\\u017Eb\\xE1n.|\",\n    abcAnim: true,\n    drumIntro: 0,\n    mp3Delay: 0,\n    abcDelay: 0,\n    audioPath: \"https://devbook.futurebooks.cz/1.mp3\"\n  },\n  html: function html(content, builder, styles) {\n    var player = \"\";\n    if (content.player) {\n      player = \"<div class=\\\"notes-player\\\">\\n      <div class=\\\"np-bar\\\">\\n        <span class=\\\"np-left\\\" id=\\\"time-player\\\"></span>\\n        <span class=\\\"np-right\\\" id=\\\"duration-player\\\"></span>\\n      </div>\\n      <div class=\\\"np-control\\\">\\n        <a href=\\\"#\\\" id=\\\"start-player\\\" class=\\\"disabled\\\"><i class=\\\"icon material-icons\\\">play_arrow</i></a>\\n        <a href=\\\"#\\\" id=\\\"pause-player\\\"  class=\\\"disabled\\\"><i class=\\\"icon material-icons\\\">pause</i></a>\\n        <a href=\\\"#\\\" id=\\\"refresh-player\\\"><i class=\\\"icon material-icons rotating\\\">refresh</i></a>\\n        <a href=\\\"#\\\" id=\\\"stop-player\\\" class=\\\"disabled\\\"><i class=\\\"icon material-icons\\\">stop</i></a>\\n      </div>\\n    </div>\";\n    }\n    return \"\\n        <div class=\\\"nr-head-wrapper\\\">\\n            <div class=\\\"nr-head\\\">\".concat(content.title, \"</div>\\n            <div class=\\\"nr-right-side\\\">\").concat(content.subTitle, \"</div>\\n        </div>\\n        <div id='abc-show-\").concat(builder.id, \"'></div>\\n        <audio id=\\\"abc-player-\").concat(builder.id, \"\\\" preload=\\\"auto\\\" controls style=\\\"display:none;\\\"></audio>\\n        \").concat(player, \"\\n\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var self = this;\n      var app = builder.app;\n      var content = builder.params.content;\n      var color = builder.app.book.params.color;\n      var abcString = content.abcjs;\n      var play = $builderEl.find(\"#start-player\");\n      var stop = $builderEl.find(\"#stop-player\");\n      var refresh = $builderEl.find(\"#refresh-player\");\n      var playerEl = $builderEl.find(\"#abc-player-\".concat(builder.params.id))[0];\n      playerEl.volume = 0.5;\n      var timingCallbacks = null;\n      var oldEl = [];\n\n      /* ----------------- Pomocné funkce ----------------- */\n\n      //generuje string času ve formatu mm:ss\n      var genDurationString = function genDurationString(duration) {\n        var sec = new Number();\n        var min = new Number();\n        sec = Math.floor(duration);\n        min = Math.floor(sec / 60);\n        min = min >= 10 ? min : \"0\" + min;\n        sec = Math.floor(sec % 60);\n        sec = sec >= 10 ? sec : \"0\" + sec;\n        return \"\".concat(min, \":\").concat(sec);\n      };\n\n      //spustí mp3 s případným zpožděním\n      var playMP3 = function playMP3() {\n        setTimeout(function () {\n          playerEl.play();\n        }, content.mp3Delay);\n      };\n\n      //ukončí zvýrazění i přehrávání mp3\n      var stopPlayer = function stopPlayer() {\n        timingCallbacks.stop();\n        timingCallbacks.setProgress(-1, \"beats\");\n        playerEl.pause();\n        playerEl.currentTime = 0;\n        oldEl.forEach(function (el) {\n          $(el).attr({\n            fill: \"#000\"\n          });\n        });\n        oldEl = [];\n        stop.addClass(\"disabled\");\n        play.removeClass(\"disabled\");\n      };\n\n      //spustí zvýraznení s případným zpožděním\n      var playAbc = function playAbc() {\n        if (content.abcAnim) {\n          setTimeout(function () {\n            timingCallbacks.start();\n          }, content.abcDelay);\n        }\n      };\n\n      /* ----------------- Pomocné funkce ------------------ */\n\n      var audio = app.apiManager.replaceMediaServerPlaceholder(content.audioPath);\n\n      //nastaví mp3 do audio bloku\n      playerEl.setAttribute(\"src\", audio);\n      var durationEl = $builderEl.find(\"#duration-player\");\n      var timeEl = $builderEl.find(\"#time-player\");\n\n      //Po načtení mp3 nastaví čas a umožní přehrávání\n      playerEl.addEventListener(\"canplay\", function () {\n        durationEl.text(genDurationString(playerEl.duration));\n        timeEl.text(\"00:00\");\n        play.removeClass(\"disabled\");\n        refresh.addClass(\"disabled\");\n      });\n\n      //Aktualizuje přehrávací čas\n      playerEl.addEventListener(\"timeupdate\", function () {\n        timeEl.text(genDurationString(playerEl.currentTime));\n      });\n      playerEl.addEventListener(\"ended\", function (e) {\n        stopPlayer();\n      }, false);\n\n      //Render ABC notace\n      var visualObjs = abcjs__WEBPACK_IMPORTED_MODULE_1___default.a.renderAbc(\"abc-show-\".concat(builder.params.id), abcString, {\n        responsive: \"resize\",\n        add_classes: true\n      });\n\n      //Animace ABC notace\n      timingCallbacks = new abcjs__WEBPACK_IMPORTED_MODULE_1___default.a.TimingCallbacks(visualObjs[0], {\n        qpm: content.tempo,\n        extraMeasuresAtBeginning: 0,\n        beatCallback: function beatCallback(beatNumber, totalBeats) {\n          //Callback - volá se \"per beat\"\n          if (beatNumber == totalBeats) {\n            this.stop();\n            // this.setProgress(-1, \"beats\");\n          }\n        },\n        eventCallback: function eventCallback(ev) {\n          //Callback - volá se každý krok (každá nota)\n          oldEl.forEach(function (el) {\n            //smaže předchozí zvýrazněné\n            $(el).attr({\n              fill: \"#000\"\n            });\n          });\n          oldEl = [];\n          if (ev && ev.elements) {\n            ev.elements.forEach(function (el) {\n              //Zvýrazní aktualní část\n              $(el).attr({\n                fill: color\n              });\n              oldEl.push(el);\n            });\n          }\n        },\n        lineEndCallback: null,\n        lineEndAnticipation: 0,\n        beatSubdivisions: 1\n      });\n\n      /* ----------------- Ovladání playeru ------------------ */\n      play.off(\"click\");\n      play.on(\"click\", function () {\n        playAbc();\n        playMP3();\n        play.addClass(\"disabled\");\n        stop.removeClass(\"disabled\");\n      });\n      stop.off(\"click\");\n      stop.on(\"click\", function () {\n        stopPlayer();\n      });\n      /* ----------------- Ovladání playeru ------------------ */\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.less":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.less ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/notes-render/nr-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.less":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.less ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/audio-player/piano/pn-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.less":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.less ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/backgrounds/bg-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/book/book-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/book/book-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/book/book-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/buttons/btn-01.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/buttons/btn-01.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/buttons/btn-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/buttons/btn-02.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/buttons/btn-02.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/buttons/btn-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/buttons/btn-03.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/buttons/btn-03.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/buttons/btn-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/buttons/btn-04.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/buttons/btn-04.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/buttons/btn-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-01.js":
/*!**********************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-01.js ***!
  \**********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/core/custom_plugins/builder/components/category-en.js (referenced with import()) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _c_01_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./c-01.less */ \"./src/core/custom_plugins/builder/components/_en/cards/c-01.less\");\n/* harmony import */ var _c_01_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_c_01_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n// async function loadLessFile() {\n//   try {\n//     const lessModule = await import('./c-01.less');\n//     // LESS soubor byl úspěšně načten, můžete provést další akce\n//   } catch (error) {\n//     console.error('Chyba při načítání LESS souboru:', error);\n//   }\n// }\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"c-01\",\n  title: \"Card 1\",\n  subtitle: \"\",\n  contentSetting: {\n    header: {\n      name: \"Card title\",\n      type: \"textEditor\"\n    },\n    footer: {\n      name: \"Card footer\",\n      type: \"textEditor\"\n    },\n    iconNew: {\n      name: \"Icon\",\n      type: \"icon\"\n    }\n  },\n  content: {\n    header: \"Nadpis karty\",\n    body: \"Obsah karty\",\n    footer: \"Pati\\u010Dka karty\",\n    iconNew: \"\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    var icon = \"\";\n    var customStyle = \"\";\n    if (content.iconNew != \"\") {\n      icon = \"<div class=\\\"card-icon\\\">\\n        \".concat(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(content.iconNew) == \"object\" ? \"<i class=\\\"icon \".concat(content.iconNew.type, \"\\\" data-icon=\\\"\").concat(content.iconNew.name, \"\\\"></i>\") : \"\".concat(content.iconNew), \"\\n    </div>\");\n      customStyle = \" style=\\\"margin-top: var(--fb-card-01-icon-top)\\\" \";\n    }\n    return \"\\n    <div class=\\\"card\\\" \".concat(customStyle, \">\\n\\n    \").concat(icon, \"\\n\\n  \").concat(content.header ? \"<div class=\\\"card-header\\\">\".concat(content.header, \"</div>\") : \"\", \"\\n  <div class=\\\"card-content\\\">\\n\\n  \").concat(component.renderComponents(\"x0\"), \"\\n </div>\\n  \").concat(content.footer ? \"<div class=\\\"fb-card-footer\\\">\".concat(content.footer, \"</div>\") : \"\", \"\\n</div>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.on('click', function () {\n        //loadLessFile();\n      });\n    },\n    update: function update($builderEl, builder) {}\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-01.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-01.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-03.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-03.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-05.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-05.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-05.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-06.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-06.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-06.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-07.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-07.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-07.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-09.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-09.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-09.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-10.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-10.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-10.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-11.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-11.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-11.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-12.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-12.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-12.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-13.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-13.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-13.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-14.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-14.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-14.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-15.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-15.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-15.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-paper-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-paper-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-paper-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-05.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-06.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/c-sf-07.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/deleted/c-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/deleted/c-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cards/deleted/c-08.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/charts/chart-01.js":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/charts/chart-01.js ***!
  \***************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _charts_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./charts.less */ \"./src/core/custom_plugins/builder/components/_en/charts/charts.less\");\n/* harmony import */ var _charts_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_charts_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! chart.js */ \"./node_modules/chart.js/dist/Chart.js\");\n/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"chart-01\",\n  title: \"Bar chart\",\n  deleted: true,\n  subtitle: \"\",\n  contentSetting: {\n    height: {\n      name: \"Height (px)\",\n      type: \"textarea\",\n      help: \"In order to correctly resize the chart, pleas set option value 'maintainAspectRatio false. Otherwise leave this input empty (chart will expend to full size)\"\n    },\n    width: {\n      name: \"Width (px)\",\n      type: \"textarea\",\n      help: \"In order to correctly resize the chart, pleas set option value 'maintainAspectRatio false. Otherwise leave this input empty (chart will expend to full size)\"\n    },\n    options: {\n      name: \"Options\",\n      type: \"textarea\"\n    },\n    data: {\n      name: \"Data\",\n      type: \"textarea\"\n    }\n  },\n  content: {\n    height: \"\",\n    width: \"\",\n    options: \"{\\n      responsive: true,\\n      plugins: {\\n        legend: {\\n          position: \\\"top\\\"\\n        },\\n        title: {\\n          display: true,\\n          text: \\\"Chart.js Bar Chart\\\"\\n        },\\n      },\\n    }\",\n    data: \"{\\n    labels: [\\\"January\\\", \\\"February\\\", \\\"March\\\", \\\"April\\\", \\\"May\\\", \\\"June\\\"],\\n      datasets: [\\n        {\\n          label: \\\"Earnings\\\",\\n          data: [65000, 59000, 80000, 81000, 56000, 55000, 40000],\\n          backgroundColor: \\\"rgba(255, 99, 132, 0.2)\\\",\\n          borderColor: \\\"rgb(255, 99, 132)\\\",\\n          borderWidth: 1,\\n        },\\n      ],\\n    }\"\n  },\n  helpers: {\n    type: \"bar\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <canvas id=\\\"chart-\".concat(builder.id, \"\\\" width=\\\"500\\\" height=\\\"500\\\">CHART CANNOT BE RENDERED. Your browser does not support the canvas element.</canvas>\\n    \");\n  },\n  on: {\n    init: function init($builderEl, builder, content) {\n      try {\n        var id = \"chart-\" + builder.params.id;\n        var graphEl = $builderEl.find(\"#\" + id);\n        var oldInstance = _.find(chart_js__WEBPACK_IMPORTED_MODULE_1___default.a.instances, function (o) {\n          return o.canvas.id == id;\n        });\n        if (oldInstance != undefined) {\n          oldInstance.destroy();\n        }\n        var opt = eval(\"(\" + content.options + \")\");\n        var dta = eval(\"(\" + content.data + \")\");\n        var config = {\n          type: builder.params.helpers.type,\n          options: opt,\n          data: dta\n        };\n        var graph = new chart_js__WEBPACK_IMPORTED_MODULE_1___default.a(graphEl, config);\n        if (content.height.length != 0) {\n          graph.canvas.parentNode.style.height = content.height + \"px\";\n        } else {\n          graph.canvas.parentNode.style.height = \"100%\";\n        }\n        if (content.width.length != 0) {\n          graph.canvas.parentNode.style.width = content.width + \"px\";\n        } else {\n          graph.canvas.parentNode.style.width = \"100%\";\n        }\n      } catch (e) {\n        console.warn(\"Nepodařilo se vykreslit graf. (Chyba v zápisu)\", e);\n      }\n    }\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/charts/chart-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/charts/chart-utils.js":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/charts/chart-utils.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/charts/chart-utils.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/charts/charts.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/charts/charts.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/charts/charts.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _chbot_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chbot-01.less */ \"./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.less\");\n/* harmony import */ var _chbot_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_chbot_01_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"chbot-01\",\n  title: \"Chatbot\",\n  subtitle: \"with a choice of options\",\n  contentSetting: {\n    messengerTitle: {\n      name: \"Name of the chat\",\n      type: \"textEditor\"\n    },\n    botName: {\n      name: \"Name of the bot\",\n      type: \"textEditor\"\n    },\n    avatar: {\n      name: \"Avatar\",\n      type: \"image\"\n    },\n    firstMessage: {\n      name: \"Initial message\",\n      type: \"textEditor\"\n    },\n    messages: {\n      name: \"Questions\",\n      type: \"array\",\n      values: {\n        question: {\n          name: \"Text of the question\",\n          type: \"textEditor\"\n        },\n        answers: {\n          name: \"Answers\",\n          type: \"array\",\n          values: {\n            text: {\n              name: \"Text of the answer\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    messengerTitle: \"Messenger\",\n    botName: \"pan Kecal\",\n    firstMessage: \"Dobrý den, já jsem pan Kecal.\",\n    avatar: \"\",\n    messages: [{\n      question: \"Ahoj\",\n      answers: [{\n        text: \"Zdravím!\"\n      }, {\n        text: \"Ahoj\"\n      }, {\n        text: \"Dobrý den\"\n      }]\n    }, {\n      question: \"Jak se máš?\",\n      answers: [{\n        text: \"Dobře.\"\n      }, {\n        text: \"Skvěle.\"\n      }, {\n        text: \"Výborně.\"\n      }]\n    }]\n  },\n  helpers: {\n    userName: \"\",\n    messageInProgress: \"\",\n    messagesObj: null,\n    avatar: \"\",\n    userAvatar: \"\"\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n    <div class=\\\"chatbot-container\\\">\\n      <div class=\\\"navbar\\\">\\n        <div class=\\\"navbar-bg\\\"></div>\\n          <div class=\\\"navbar-inner\\\">\\n            <div class=\\\"messenger-title\\\">\".concat(content.messengerTitle, \"</div>\\n          </div>\\n        </div>\\n\\n      <div class=\\\"page-content messages-content\\\">\\n      <div class=\\\"messages\\\">\\n        <div class=\\\"list no-hairlines-md\\\">\\n          <ul class=\\\"enter-name\\\">\\n            <li class=\\\"item-content item-input elevation-10\\\">\\n              <div class=\\\"item-media\\\">\\n                <i class=\\\"icon demo-list-icon\\\"></i>\\n              </div>\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title item-label\\\">Zadej svoje jm\\xE9no.</div>\\n                <div class=\\\"item-input-wrap\\\">\\n                  <input class=\\\"input-name\\\" autocomplete=\\\"off\\\" type=\\\"text\\\" name=\\\"name\\\" placeholder=\\\"Tvoje jm\\xE9no\\\" />\\n                  <span class=\\\"input-clear-button\\\"></span>\\n                </div>\\n                <br>\\n                <button class=\\\"col button start-btn\\\">Za\\u010D\\xEDt</button>\\n              </div>\\n            </li>\\n          </ul>\\n        </div>\\n        </div>\\n        <div class=\\\"questions-container\\\">\\n        </div>\\n      </div>\\n    </div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, component) {\n      var self = this;\n      // debugger\n\n      // debugger;\n\n      var btn = builderEl.find(\".start-btn\");\n      var $msgBlock = builderEl.find(\".messages\");\n      btn.off(\"click\");\n      btn.on(\"click\", function (e) {\n        var name = builderEl.find(\".input-name\").val();\n        component.params.methods.initChat($msgBlock, name);\n      });\n    }\n  },\n  methods: {\n    initChat: function initChat($msgBlock, name) {\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var content = this.params.content;\n      var app = this.app;\n      var date = new Date();\n      var day = date.getDate();\n      var month = date.getMonth();\n      var year = date.getFullYear();\n      var d = day + \".\" + month + \".\" + year;\n      if (content.avatar.length != 0) {\n        helpers.avatar = content.avatar;\n        helpers.avatar = app.apiManager.replaceMediaServerPlaceholder(helpers.avatar);\n      } else {\n        var _nameEscaped = encodeURI(content.botName);\n        helpers.avatar = \"https://avatars.dicebear.com/api/bottts/\".concat(_nameEscaped, \".svg?mood[]=happy\");\n      }\n      var nameEscaped = encodeURI(name);\n      helpers.userAvatar = \"https://avatars.dicebear.com/api/initials/\".concat(nameEscaped, \".svg\");\n      if (name.length == 0) {\n        alert(\"Musíš zadat jméno.\");\n      } else {\n        $msgBlock.html(\"\");\n        helpers.messagesObj = this.app.messages.create({\n          el: \".messages\",\n          lastMessageRule: function lastMessageRule() {\n            return true;\n          },\n          tailMessageRule: function tailMessageRule() {\n            return true;\n          }\n        });\n        helpers.messagesObj.addMessage({\n          text: d,\n          isTitle: true\n        });\n        methods.renderQuestion(name);\n        methods.reciveMessage(null);\n      }\n    },\n    renderQuestion: function renderQuestion(name) {\n      var container = this.$block.find(\".questions-container\");\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var questions = this.params.content.messages;\n      var el = \"\";\n      questions.forEach(function (o) {\n        el = el + \"<div class=\\\"chip\\\" data-id=\\\"\".concat(o.id, \"\\\"><div data-id=\\\"\").concat(o.id, \"\\\" class=\\\"chip-label\\\">\").concat(o.question, \"</div></div>\");\n      });\n      container.html(el);\n      var chips = this.$block.find(\".chip\");\n      chips.off(\"click\");\n      chips.on(\"click\", function (e) {\n        if (!helpers.messageInProgress) {\n          var id = $$(e.target).data(\"id\");\n          $$(e.target).parent(\".chip\").remove();\n          $$(e.target).remove();\n          methods.sendMessage(id, name);\n        }\n      });\n    },\n    sendMessage: function sendMessage(id, name) {\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      var methods = this.params.methods;\n      var messenger = helpers.messagesObj;\n      var date = new Date();\n      var hrs = date.getHours();\n      var mins = date.getMinutes();\n      if (hrs.length == 1) {\n        hrs = \"0\" + hrs;\n      }\n      if (mins.length == 1) {\n        mins = \"0\" + mins;\n      }\n      var time = hrs + \":\" + mins;\n      var text = \"\";\n      var quest = _.find(content.messages, function (o) {\n        return o.id == id && !o.deleted;\n      });\n      text = quest.question;\n      messenger.addMessage({\n        text: text,\n        type: \"sent\",\n        name: name,\n        avatar: helpers.userAvatar,\n        textFooter: time,\n        header: name\n      });\n      $(this.$block).find(\".messages\").scrollTop($(\".messages\")[0].scrollHeight + 50);\n      methods.reciveMessage(quest);\n    },\n    reciveMessage: function reciveMessage(question) {\n      var date = new Date();\n      var hrs = date.getHours();\n      var mins = date.getMinutes();\n      if (hrs < 10) {\n        hrs = \"0\" + hrs;\n      }\n      if (mins < 10) {\n        mins = \"0\" + mins;\n      }\n      var time = hrs + \":\" + mins;\n      var content = this.params.content;\n      var helpers = this.params.helpers;\n      var messenger = helpers.messagesObj;\n      var avatar = helpers.avatar;\n      var botName = content.botName;\n      var block = this.$block;\n      helpers.messageInProgress = true;\n      var chips = this.$block.find(\".chip\");\n      chips.css(\"opacity\", 0);\n      var msg = \"\";\n      if (question == null) {\n        msg = content.firstMessage;\n      } else {\n        var answers = _.filter(question.answers, function (o) {\n          return o.deleted == false;\n        });\n        var random = Math.floor(Math.random() * answers.length);\n        msg = answers[random].text;\n      }\n      messenger.showTyping({\n        header: botName + \" právě píše\",\n        avatar: avatar\n      });\n      setTimeout(function (id) {\n        messenger.hideTyping();\n        messenger.addMessage({\n          text: msg,\n          type: \"received\",\n          name: botName,\n          avatar: avatar,\n          textFooter: time,\n          header: botName\n        });\n        chips.css(\"opacity\", 1);\n        helpers.messageInProgress = false;\n        $(block).find(\".messages\").scrollTop($(\".messages\")[0].scrollHeight + 50);\n      }, 2000);\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.less":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.less ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/chat-bot/chbot-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/citations/cit-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/citations/cit-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/citations/cit-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.less":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.less ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.less":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.less ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/clickable-image/clickable-img-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/code/code-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/code/code-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/code/code-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.less":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.less ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.less":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.less ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/coloring-book/coloring-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/contents/contents-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/contents/contents-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/contents/contents-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/contents/contents-02.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/contents/contents-02.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/contents/contents-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/contents/contents-03.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/contents/contents-03.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/contents/contents-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/contract/con-01.less":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/contract/con-01.less ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/contract/con-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/cover/cover-01.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/cover/cover-01.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/cover/cover-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/divider/divider-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/divider/divider-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/divider/divider-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/divider/divider-02.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/divider/divider-02.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/divider/divider-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/equation/eq-01.less":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/equation/eq-01.less ***!
  \****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/equation/eq-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/food-calculator/food-calc-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js":
/*!****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js ***!
  \****************************************************************************************/
/*! exports provided: getParentForm */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getParentForm\", function() { return _getParentForm; });\nvar _getParentForm = function getParentForm(component) {\n  if (component && component.params.categoryId === \"forms\") {\n    return component;\n  }\n  if (component && component.parentComponent) {\n    return _getParentForm(component.parentComponent);\n  }\n  return null;\n};\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js ***!
  \**************************************************************************************/
/*! exports provided: formatNumber */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatNumber\", function() { return formatNumber; });\nvar formatNumber = function formatNumber(num) {\n  num = typeof num === 'string' ? parseFloat(num) : num;\n  if (Number.isInteger(num)) {\n    return num.toString();\n  } else {\n    var formattedNum = num.toFixed(2);\n    if (formattedNum.endsWith('.00')) {\n      return formattedNum.slice(0, -3);\n    }\n    if (formattedNum.endsWith('0')) {\n      return formattedNum.slice(0, -1);\n    }\n    return formattedNum;\n  }\n};\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/_helpers/res-text.less":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/_helpers/res-text.less ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/_helpers/res-text.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js ***!
  \*************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _res_text_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./res-text.less */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/res-text.less\");\n/* harmony import */ var _res_text_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_res_text_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  contentSetting: {\n    showResultText: {\n      name: \"Show text after evaluation?\",\n      type: \"bool\",\n      hidden: {\n        resultTexts: {\n          name: \"Text after evaluation\",\n          type: \"array\",\n          values: {\n            pointsFrom: {\n              name: \"If result value is less or equal then:\",\n              type: \"input-number\"\n            },\n            pointsTo: {\n              name: \"If result value is greater or equal then:\",\n              type: \"input-number\"\n            },\n            text: {\n              name: \"Text to display\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    resultTexts: [{\n      pointsFrom: \"0\",\n      pointsTo: \"1\",\n      text: \"Information\"\n    }]\n  },\n  helpVariables: {\n    resText: \"\"\n  },\n  methods: {\n    resultText: function resultText(userPoints) {\n      var app = this.app;\n      var content = this.params.content;\n      var helpVariables = this.params.helpVariables;\n      var resText = \"\";\n      if (content.showResultText) {\n        for (var i = 0; i < content.resultTexts.length; i++) {\n          if (parseFloat(userPoints) >= parseFloat(content.resultTexts[i].pointsFrom) && parseFloat(userPoints) <= parseFloat(content.resultTexts[i].pointsTo)) {\n            resText = \"<div class=\\\"important-note\\\">\".concat(content.resultTexts[i].text, \"</div>\");\n            resText = app.apiManager.replaceMediaServerPlaceholder(resText);\n            break;\n          }\n        }\n      }\n      return resText;\n    }\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/cards/form-c-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js ***!
  \*******************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _chip_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chip.less */ \"./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less\");\n/* harmony import */ var _chip_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_chip_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"chip-01\",\n  title: \"Chips\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    },\n    negativePoints: {\n      name: \"Possibility to get negative points?\",\n      type: \"bool\"\n    },\n    chips: {\n      name: \"Chips\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Chip text\",\n          type: \"textEditor\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        },\n        color: {\n          name: \"Color\",\n          type: \"select\",\n          options: [{\n            title: \"Black\",\n            value: \"black\"\n          }, {\n            title: \"Red\",\n            value: \"red\"\n          }, {\n            title: \"Blue\",\n            value: \"blue\"\n          }, {\n            title: \"Green\",\n            value: \"green\"\n          }]\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Question with the answer of the type of clicking the correct words. Can be used to select the correct words. <b>Choose animals.</b>\",\n    negativePoints: false,\n    chips: [{\n      label: \"dog\",\n      value: \"1\",\n      color: \"black\"\n    }, {\n      label: \"elephant\",\n      value: \"1\",\n      color: \"black\"\n    }, {\n      label: \"house\",\n      value: \"-1\",\n      color: \"black\"\n    }, {\n      label: \"mouse\",\n      value: \"1\",\n      color: \"black\"\n    }]\n  },\n  helpers: {\n    shuffledChips: [],\n    reset: false\n  },\n  html: function html(content, builder, styles, component) {\n    var helpers = component.params.helpers;\n    var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_2__[\"getParentForm\"])(component);\n    var parentContent = null;\n    if (parentForm) {\n      parentContent = parentForm.params.content;\n    }\n    var preFillChips = content.hasOwnProperty(\"preFillChips\") ? content.preFillChips : [];\n    // let filteredChips = _.xor(content.chips, preFillChips);\n    var filteredChips = [];\n    var predefChips = [];\n    var i = 0;\n    for (i; i < content.chips.length; i++) {\n      var chip = content.chips[i];\n      if (_.find(preFillChips, {\n        label: chip.label\n      })) {\n        predefChips.push(chip);\n      } else {\n        filteredChips.push(chip);\n      }\n    }\n    var changed = false;\n    if (parentContent && parentContent.shuffleAnswers) {\n      var diff = _.differenceBy(component.params.helpers.shuffledChips, filteredChips, \"label\");\n      if (diff.length > 0 || component.params.helpers.shuffledChips.length == 0) {\n        changed = true;\n      }\n      if (helpers.reset || changed) {\n        helpers.shuffledChips = [];\n        helpers.shuffledChips = _.shuffle(filteredChips);\n        helpers.reset = false;\n      }\n    } else {\n      helpers.shuffledChips = filteredChips;\n    }\n    return \"\\n    \\n  <span class=\\\"result-badge\\\"></span>\\n      <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n      <div class=\\\"chips-excersise\\\">\\n        <div class=\\\"chips-target\\\">\\n        \").concat(predefChips.map(function (data) {\n      return \"\\n            <a href=\\\"#\\\" class=\\\"chip-item \".concat(data.color, \"\\\" id=\\\"chip-\").concat(data.id, \"\\\"><div class=\\\"chip-text\\\" data-id=\\\"\").concat(data.id, \"\\\">\").concat(data.label, \"</div></a>\\n          \");\n    }).join(\"\"), \"\\n</div>\\n        <div class=\\\"chips-source\\\">\\n          \").concat(helpers.shuffledChips.map(function (data) {\n      return \"\\n            <a href=\\\"#\\\" class=\\\"chip-item \".concat(data.color, \"\\\" id=\\\"chip-\").concat(data.id, \"\\\"><div class=\\\"chip-text\\\" data-id=\\\"\").concat(data.id, \"\\\">\").concat(data.label, \"</div></a>\\n          \");\n    }).join(\"\"), \"\\n        </div>\\n      </div>\\n\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n\n      $builderEl.find(\".chip-item\").off(\"click\").on(\"click\", function (e) {\n        e.preventDefault();\n        var $chipsTarget = $(this).parent().parent().find(\".chips-target\");\n        var $chipsSource = $(this).parent().parent().find(\".chips-source\");\n        var $chipItem = $(this);\n        var $chipItemParent = $chipItem.parent();\n        if ($chipItemParent.hasClass(\"chips-source\")) {\n          $chipItem.appendTo($chipsTarget);\n        } else if ($chipItemParent.hasClass(\"chips-target\")) {\n          $chipItem.appendTo($chipsSource);\n        }\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n        return false;\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpers.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var $target = $builderEl.find(\".chips-target\");\n      var $input = $$($target).find(\".chip-item\");\n      var res = false;\n      if ($input.length > 0) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData(component) {\n      var preFillChips = [];\n      component.$block.find(\".chips-target .chip-text\").each(function () {\n        var val = $$(this).text();\n        var ud = {\n          label: val\n        };\n        preFillChips.push(ud);\n      });\n      return {\n        preFillChips: preFillChips\n      };\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $target = $builderEl.find(\".chips-target\");\n      var $input = $$($target).find(\".chip-text\");\n      var points = 0;\n      var maxPoints = 0;\n      var answears = [];\n      $input.forEach(function (element) {\n        answears.push($$(element).data(\"id\"));\n      });\n      answears.forEach(function (element) {\n        var res = _.find(component.params.content.chips, function (o) {\n          return o.id == element;\n        });\n        points += parseFloat(res.value);\n      });\n      component.params.content.chips.forEach(function (element) {\n        if (element.value > 0 && !element.deleted) {\n          maxPoints += parseFloat(element.value);\n        }\n      });\n      if (!component.params.content.negativePoints) {\n        if (points < 0) {\n          points = 0;\n        }\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var correctAnswer = component.params.content.chips;\n      var source = $builderEl.find(\".chips-source\");\n      var trg = $builderEl.find(\".chips-target\");\n      var selectedChips = trg.find(\".chip-text\");\n      var nonSelectedChips = source.find(\".chip-text\");\n      selectedChips.forEach(function (element) {\n        var text = $$(element).data(\"id\");\n        var res = _.find(correctAnswer, function (o) {\n          return o.id == text;\n        });\n        if (res) {\n          if (res.value > 0) {\n            var correct = '<span class=\"selected solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n            $$(element).append(correct);\n            var target = $$(element).find(\".solution\");\n            app.tooltip.create({\n              targetEl: $$(target),\n              text: res.value + \"b\"\n            });\n          }\n        }\n      });\n      nonSelectedChips.forEach(function (element) {\n        var text = $$(element).data(\"id\");\n        var res = _.find(correctAnswer, function (o) {\n          return o.id == text;\n        });\n        if (res) {\n          if (res.value > 0) {\n            var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n            $$(element).append(correct);\n            var target = $$(element).find(\".solution\");\n            app.tooltip.create({\n              targetEl: $$(target),\n              text: res.value + \"b\"\n            });\n          }\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/chips/chip-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/chips/chip-img.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/chips/chip.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.less":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.less ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.less":
/*!**************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.less ***!
  \**************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/crossword/cross-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _dd_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dd-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.less\");\n/* harmony import */ var _dd_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dd_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"dd-01\",\n  title: \"Dragging in order\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Value\",\n      type: \"textEditor\"\n    },\n    items: {\n      name: \"Values in sliders\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        },\n        pos: {\n          name: \"Correct item position\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>Sort</b> numbers by dragging from smallest to largest\",\n    items: [{\n      label: \"Number 2\",\n      value: 1,\n      pos: 2\n    }, {\n      label: \"Number 1\",\n      value: 1,\n      pos: 1\n    }, {\n      label: \"Number 3\",\n      value: 1,\n      pos: 3\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n\\n\\n<div class=\\\"swiper-no-swiping\\\">\\n                               <span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<!--<div class=\\\"list\\\">-->\\n\\n                                <div class=\\\"list position-exercise no-margin row\\\" data-points=\\\"1\\\">\\n                                  <ul class=\\\"sortable-vertical col-50\\\" style=\\\"width: 100%\\\">\\n\\n                                      \").concat(content.items.map(function (data) {\n      return \"\\n                                      <li>\\n                                      <div class=\\\"item-content\\\">\\n                                        <div class=\\\"item-media\\\"><i class=\\\"icon f7-icons\\\">resize_v</i></div>\\n                                        <div class=\\\"item-inner\\\">\\n                                          <div data-id=\\\"\".concat(data.id, \"\\\" class=\\\"item-title drag-item\\\">\").concat(data.label, \"</div>\\n                                        </div>\\n                                      </div>\\n                                    </li>\\n\\n                                    \");\n    }).join(\"\"), \"\\n                                    </ul>\\n                                  </div>\\n</div>\\n\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n\n      var sortableContainers = $builderEl.find(\".sortable-vertical\");\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children(\"*\");\n        if ($dragItems.length > 0) {\n          $dragItems.each(function (i) {\n            var $dragItem = $(this);\n            $dragItem.attr(\"data-orig-position\", i);\n          });\n          var dragItemId = \"sortableItemContainer-\" + i;\n          $(this).attr(\"id\", dragItemId);\n          $dragItems.attr(\"data-parent-id\", dragItemId);\n        }\n        $(this).sortable({\n          placeholder: \"ui-state-highlight\",\n          update: function update(event, ui) {\n            builder.params.methods.answerEmittor($builderEl, builder);\n          }\n        }).disableSelection();\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    getUserData: function getUserData() {},\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var componentParams = component.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrect = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $dragItems = $builderEl.find(\".drag-item\");\n      var points = 0;\n      var maxPoints = 0;\n      var items = componentParams.content.items;\n      items = _.sortBy(items, [function (o) {\n        return o.pos;\n      }]);\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      var i = 0;\n      var realPos = 0;\n      var correct;\n      for (i; i < items.length; i++) {\n        if (!items[i].deleted) {\n          var correctId = items[i].id;\n          var $dragItem = $dragItems.eq(realPos);\n          var userId = $dragItem.attr(\"data-id\");\n\n          //Odstranění výsledků\n          $dragItem.closest(\"li\").removeClass(\"result-success\");\n          $dragItem.closest(\"li\").removeClass(\"result-fail\");\n\n          // debugger\n          if (correctId === userId) {\n            points = points + parseFloat(items[i].value);\n            if (showCorrect) {\n              $dragItems.eq(realPos).closest(\"li\").addClass(\"result-success\");\n              correct = '<span class=\"selected solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n              $dragItem.append(correct);\n            }\n          } else {\n            if (showCorrect) {\n              $dragItems.eq(realPos).closest(\"li\").addClass(\"result-fail\");\n              correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n              $dragItem.append(correct);\n            }\n          }\n          maxPoints = maxPoints + parseFloat(items[i].value);\n          realPos = realPos + 1;\n          if (showCorrect) {\n            app.tooltip.create({\n              targetEl: $dragItem.find(\".solution\"),\n              text: \"Pozice: \" + realPos + \" (\" + items[i].value + \"b)\"\n            });\n          }\n        }\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(maxPoints);\n\n      //Celkový výsledek\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _dd_02_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dd-02.less */ \"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.less\");\n/* harmony import */ var _dd_02_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dd_02_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"dd-02\",\n  title: \"Dragging in order\",\n  subtitle: \"with images\",\n  contentSetting: {\n    label: {\n      name: \"Value\",\n      type: \"textEditor\"\n    },\n    items: {\n      name: \"Values in sliders\",\n      type: \"array\",\n      values: {\n        image: {\n          name: \"Image file\",\n          type: \"image\"\n        },\n        pos: {\n          name: \"Correct item position\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>Sort</b> images by dragging them.\",\n    items: [{\n      image: \"{{mediaServerDomain}}/public/umlzf9t0j2w8ub2plnbh7ttgklf3pspgawg7rfp756ujyb7pozs3diocuakwyci1.png\",\n      value: 1,\n      pos: 2\n    }, {\n      image: \"{{mediaServerDomain}}/public/gqdmuwvqnabox8c8uj4ochupvfszo2d0380cgg0u2zv5s0bverguumycyt2gb7nn.png\",\n      value: 1,\n      pos: 1\n    }, {\n      image: \"{{mediaServerDomain}}/public/ai5goiljol1t5qrkeluwljeu0623vfw5qbnzc8bybqp7a4lcmzyw0gljozp3evhw.png\",\n      value: 1,\n      pos: 3\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n\\n\\n    <div class=\\\"swiper-no-swiping\\\">\\n                               <span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<!--<div class=\\\"list\\\">-->\\n\\n                                <div class=\\\"list position-exercise no-margin row\\\" data-points=\\\"1\\\">\\n                                  <ul class=\\\"sortable-vertical col-50\\\">\\n\\n                                      \").concat(content.items.map(function (data) {\n      return \"\\n                                      <li>\\n                                      <div class=\\\"item-content\\\">\\n                                        <div class=\\\"item-media\\\"><i class=\\\"icon f7-icons\\\">resize_v</i></div>\\n                                        <div class=\\\"item-inner\\\">\\n                                          <div class=\\\"item-title drag-item\\\" data-id=\\\"\".concat(data.id, \"\\\">\\n                                          <img class=\\\"open-gallery\\\" src=\\\"\").concat(data.image, \"\\\">\\n                                          </div>\\n                                        </div>\\n                                      </div>\\n                                    </li>\\n\\n                                    \");\n    }).join(\"\"), \"\\n                                    </ul>\\n                                  </div>\\n</div>\\n\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n\n      var sortableContainers = $builderEl.find(\".sortable-vertical\");\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children(\"*\");\n        if ($dragItems.length > 0) {\n          $dragItems.each(function (i) {\n            var $dragItem = $(this);\n            $dragItem.attr(\"data-orig-position\", i);\n          });\n          var dragItemId = \"sortableItemContainer-\" + i;\n          $(this).attr(\"id\", dragItemId);\n          $dragItems.attr(\"data-parent-id\", dragItemId);\n        }\n        $(this).sortable({\n          placeholder: \"ui-state-highlight\",\n          update: function update(event, ui) {\n            builder.params.methods.answerEmittor($builderEl, builder);\n          }\n        }).disableSelection();\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    getUserData: function getUserData() {},\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var componentParams = component.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrect = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $dragItems = $builderEl.find(\".drag-item\");\n      var points = 0;\n      var maxPoints = 0;\n      var items = componentParams.content.items;\n      items = _.sortBy(items, [function (o) {\n        return o.pos;\n      }]);\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      var i = 0;\n      var realPos = 0;\n      var correct;\n      for (i; i < items.length; i++) {\n        if (!items[i].deleted) {\n          var correctId = items[i].id;\n          var $dragItem = $dragItems.eq(realPos);\n          var userId = $dragItem.attr(\"data-id\");\n\n          //Odstranění výsledků\n          $dragItem.closest(\"li\").removeClass(\"result-success\");\n          $dragItem.closest(\"li\").removeClass(\"result-fail\");\n          if (correctId === userId) {\n            points = points + parseFloat(items[i].value);\n            if (showCorrect) {\n              $dragItems.eq(realPos).closest(\"li\").addClass(\"result-success\");\n              correct = '<span class=\"selected solution\"><i class=\"icon result-icon material-icons\"></i></span>';\n              $dragItem.append(correct);\n            }\n          } else {\n            if (showCorrect) {\n              $dragItems.eq(realPos).closest(\"li\").addClass(\"result-fail\");\n              correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\"></i></span>';\n              $dragItem.append(correct);\n            }\n          }\n          maxPoints = maxPoints + parseFloat(items[i].value);\n          realPos = realPos + 1;\n          if (showCorrect) {\n            app.tooltip.create({\n              targetEl: $dragItem.find(\".solution\"),\n              text: \"Pozice: \" + realPos + \" (\" + items[i].value + \"b)\"\n            });\n          }\n        }\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(maxPoints);\n\n      //Celkový výsledek\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answer = _.cloneDeep(component.params.content.items);\n      answer = _.sortBy(answer, [\"pos\"]);\n      var $items = $builderEl.find(\".item-inner\");\n\n      // $items.forEach((element, i) => {\n      //   let txt = $$(element).find(\"img\").attr(\"src\");\n      //   let correct = \"\";\n      //   if (answer[i].image == txt) {\n      //     correct =\n      //       '<span class=\"selected solution\"><i class=\"icon result-icon material-icons\">check_circleheck_circle</i></span>';\n      //   } else {\n      //     correct =\n      //       '<span class=\"solution\"><i class=\"icon result-icon material-icons\">check_circleheck_circle</i></span>';\n      //   }\n      //   $$(element).append(correct);\n      //   let target = $$(element).find(\".solution\");\n      //   let realPos = _.find(answer, (o) => {\n      //     return o.label == txt;\n      //   });\n      //   app.tooltip.create({\n      //     targetEl: $$(target),\n      //     text: \"Pozice: \" + realPos.position + \" (\" + answer[i].value + \"b)\",\n      //   });\n      // });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _dd_03_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dd-03.less */ \"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.less\");\n/* harmony import */ var _dd_03_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dd_03_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"dd-03\",\n  title: \"Dragging in order\",\n  subtitle: \"\",\n  deleted: true,\n  contentSetting: {\n    label: {\n      name: \"Value\",\n      type: \"textEditor\"\n    },\n    items: {\n      name: \"Values in sliders\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        },\n        pos: {\n          name: \"Correct item position\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>{{position}})</b> Se\\u0159a\\u010Fte p\\u0159eta\\u017Een\\xEDm historick\\xE9 ud\\xE1losti od nejstar\\u0161\\xED po nejmlad\\u0161\\xED.\",\n    items: [{\n      label: \"Narození Jindřicha VI. Lucemburského\",\n      value: 1,\n      pos: 2\n    }, {\n      label: \"Vydání zlaté buly sicilské\",\n      value: 1,\n      pos: 1\n    }, {\n      label: \"Narození Karla IV.\",\n      value: 1,\n      pos: 3\n    }]\n  },\n  useContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n\\n\\n    <div class=\\\"swiper-no-swiping\\\">\\n<table>\\n<tr>\\n<td>1</td><td rowspan=\\\"3\\\">\\n  <div class=\\\"list position-exercise no-margin row\\\" data-points=\\\"1\\\">\\n                                  <ul class=\\\"sortable-vertical col-50\\\">\\n                                                                       \\n                                      \".concat(content.items.map(function (data) {\n      return \"\\n                                      <li>\\n                                      <div class=\\\"item-content\\\">\\n                                        <div class=\\\"item-media\\\"><i class=\\\"icon f7-icons\\\">resize_v</i></div>\\n                                        <div class=\\\"item-inner\\\">\\n                                          <div class=\\\"item-title drag-item\\\">\".concat(data.label, \"</div>\\n                                        </div>\\n                                      </div>\\n                                    </li>\\n      \\n                                    \");\n    }).join(\"\"), \"\\n                                    </ul>\\n                                  </div>\\n</td>\\n</tr>\\n<tr>\\n<td>2</td>\\n</tr>\\n<tr>\\n<td>3</td>\\n</tr>\\n</table>\\n\\n                               <span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\").concat(content.label, \"</div>\\n<!--<div class=\\\"list\\\">-->\\n</div>\\n                              \\n  \\n\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n\n      var sortableContainers = $builderEl.find(\".sortable-vertical\");\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children(\"*\");\n        if ($dragItems.length > 0) {\n          $dragItems.each(function (i) {\n            var $dragItem = $(this);\n            $dragItem.attr(\"data-orig-position\", i);\n          });\n          var dragItemId = \"sortableItemContainer-\" + i;\n          $(this).attr(\"id\", dragItemId);\n          $dragItems.attr(\"data-parent-id\", dragItemId);\n        }\n        $(this).sortable({\n          placeholder: \"ui-state-highlight\"\n        }).disableSelection();\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    getUserData: function getUserData() {},\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var componentParams = component.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrect = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $dragItems = $builderEl.find(\".drag-item\");\n      var points = 0;\n      var maxPoints = 0;\n      var items = componentParams.content.items;\n      items = _.sortBy(items, [\"pos\"]);\n      var i;\n      for (i = 0; i < items.length; i++) {\n        var correctLabel = items[i].label;\n        var userLabel = $dragItems.eq(i).text();\n        if (correctLabel === userLabel) {\n          points = points + parseFloat(items[i].value);\n        }\n        if (!items[i].deleted) {\n          maxPoints = maxPoints + parseFloat(items[i].value);\n        }\n      }\n\n      //  $dragItems.forEach(element => {\n      //    let value = parseFloat(element.value);\n      //    if(value > 0){\n      //      maxPoints += value;\n      //    }\n      //    if(element.checked){\n      //      points += value;\n      //    }\n      // });\n\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n        for (i = 0; i < items.length; i++) {\n          $dragItems.eq(i).closest(\"li\").removeClass(\"result-success\");\n          $dragItems.eq(i).closest(\"li\").removeClass(\"result-fail\");\n          var _correctLabel = items[i].label;\n          var _userLabel = $dragItems.eq(i).text();\n          if (_correctLabel === _userLabel) {\n            $dragItems.eq(i).closest(\"li\").addClass(\"result-success\");\n          } else {\n            $dragItems.eq(i).closest(\"li\").addClass(\"result-fail\");\n          }\n        }\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrect) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answer = component.params.content.items;\n      answer = _.sortBy(answer, [\"pos\"]);\n      var $items = $builderEl.find(\".item-inner\");\n      $items.forEach(function (element, i) {\n        var txt = $$(element).find(\".drag-item\").text();\n        var correct = \"\";\n        if (answer[i].label == txt) {\n          correct = '<span class=\"selected solution\"><i class=\"icon result-iconresult-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n        } else {\n          correct = '<span class=\"solution\"><i class=\"icon result-iconresult-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n        }\n        $$(element).append(correct);\n        var target = $$(element).find(\".solution\");\n        var realPos = _.find(answer, function (o) {\n          return o.label == txt;\n        });\n        app.tooltip.create({\n          targetEl: $$(target),\n          text: \"Pozice: \" + realPos.pos + \" (\" + answer[i].value + \"b)\"\n        });\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js":
/*!****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js ***!
  \****************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _dd_groups_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dd-groups-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.less\");\n/* harmony import */ var _dd_groups_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dd_groups_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"dd-groups-01\",\n  title: \"Dragging\",\n  subtitle: \"into groups\",\n  contentSetting: {\n    label: {\n      name: \"Value\",\n      type: \"textEditor\"\n    },\n    groups: {\n      name: \"Groups\",\n      type: \"array\",\n      values: {\n        name: {\n          name: \"Group name\",\n          type: \"textEditor\"\n        },\n        id: {\n          name: \"Group ID\",\n          type: \"textarea\"\n        }\n      }\n    },\n    items: {\n      name: \"Values in sliders\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Item text\",\n          type: \"textEditor\"\n        },\n        group: {\n          name: \"Correct group ID\",\n          type: \"textarea\",\n          help: \"Multiple right answers separate by comma (example: 1,2) | 0 = none group is right\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Properly classify states <b>by dragging</b> them into continents.\",\n    groups: [{\n      name: \"Europe\",\n      id: 1\n    }, {\n      name: \"Asia\",\n      id: 2\n    }],\n    items: [{\n      label: \"Sweden\",\n      value: 1,\n      group: \"1\"\n    }, {\n      label: \"Spain\",\n      value: 1,\n      group: \"1\"\n    }, {\n      label: \"Taiwan\",\n      value: 1,\n      group: \"2\"\n    }, {\n      label: \"Japan\",\n      value: 1,\n      group: \"2\"\n    }, {\n      label: \"Czech republic\",\n      value: 1,\n      group: \"1\"\n    }, {\n      label: \"Deutschland\",\n      value: 1,\n      group: \"1\"\n    }]\n  },\n  helpers: {\n    reset: false,\n    shuffledItems: []\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var helpers = component.params.helpers;\n    var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_8__[\"getParentForm\"])(component);\n    var parentContent = null;\n    if (parentForm) {\n      parentContent = parentForm.params.content;\n    }\n    var changed = false;\n    if (parentContent && parentContent.shuffleAnswers) {\n      var diff = _.differenceBy(helpers.shuffledItems, content.items, \"label\");\n      if (diff.length > 0 || helpers.shuffledItems.length == 0) {\n        changed = true;\n      }\n      if (helpers.reset || changed) {\n        helpers.shuffledItems = [];\n        helpers.shuffledItems = _.shuffle(content.items);\n        helpers.reset = false;\n      }\n    } else {\n      helpers.shuffledItems = content.items;\n    }\n    return \"\\n<div class=\\\"swiper-no-swiping\\\">\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n    <div class=\\\"row drag-box-excersise\\\">\\n      <div class=\\\"options-container col-100\\\">\\n          <div class=\\\"list\\\" style=\\\"margin: 0;\\\">\\n            <ul style=\\\"\\\" class=\\\"connectedSortable position-box sortable-item sortable-two-col sortable ui-sortable\\\">\\n              \").concat(helpers.shuffledItems.map(function (data) {\n      return \"\\n                  <li class=\\\"ui-sortable-handle\\\">\\n                  <div class=\\\"item-content\\\">\\n                    <div class=\\\"item-media\\\"><i class=\\\"material-icons\\\">repeat</i></div>\\n                    <div class=\\\"item-inner\\\">\\n                      <div class=\\\"item-title drag-item\\\" data-id=\\\"\".concat(data.id, \"\\\">\").concat(data.label, \"</div>\\n                    </div>\\n                  </div>\\n                </li>\\n            \");\n    }).join(\"\"), \"\\n            </ul>\\n      </div>\\n    </div>\\n      <div class=\\\"group-container col-100\\\">\\n        <div class=\\\"row\\\">\\n                  \").concat(content.groups.map(function (data) {\n      return \"\\n                      <div class=\\\"group-container col-50\\\">\\n                      <div class=\\\"group-title\\\" style=\\\"text-align: center; font-weight: bold\\\">\".concat(data.name, \"</div>\\n                      <div class=\\\"list\\\" style=\\\"margin: 0;\\\">\\n                        <ul class=\\\"finalBox connectedSortable position-box sortable-item sortable ui-sortable\\\" data-id=\").concat(data.id, \">\\n\\n                          </ul>\\n                        </div>\\n                      </div>\\n\\n                  \");\n    }).join(\"\"), \"\\n            </div>\\n        </div>\\n     </div>\\n</div>\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n\n      var sortableContainers = $builderEl.find(\".connectedSortable\");\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children();\n        if ($dragItems.length > 0) {\n          var dragItemId = \"dragitemContainer-\" + i;\n          $(this).attr(\"id\", dragItemId);\n          $dragItems.attr(\"data-parent-id\", dragItemId);\n        }\n        $(this).sortable({\n          connectWith: \".connectedSortable\",\n          placeholder: \"ui-state-highlight\",\n          update: function update(event, ui) {\n            builder.params.methods.answerEmittor($builderEl, builder);\n          }\n        }).disableSelection();\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpers.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    },\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var input = $builderEl.find(\".finalBox .ui-sortable-handle\");\n      var res = false;\n      if (input.length > 0) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {},\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var componentParams = component.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrect = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $groupBox = $builderEl.find(\".finalBox\");\n      var points = 0;\n      var maxPoints = 0;\n      var $allItems = $builderEl.find(\".drag-item\");\n      $allItems.forEach(function (element) {\n        $$(element).closest(\"li\").removeClass(\"result-success\");\n        $$(element).closest(\"li\").removeClass(\"result-fail\");\n      });\n      $groupBox.forEach(function (element) {\n        var boxId = $(element).attr(\"data-id\");\n        var $items = $$(element).find(\".drag-item\");\n        $items.forEach(function (element) {\n          // let name = $(element).text();\n          var elemId = $(element).attr(\"data-id\");\n\n          // debugger\n\n          var res = _.find(componentParams.content.items, function (o) {\n            return o.id === elemId;\n          });\n          if (res) {\n            var cg = res.group + \"\";\n            var correctGroups = cg.split(\",\");\n\n            // debugger;\n            if (correctGroups.indexOf(boxId) > -1) {\n              points += parseFloat(res.value);\n              if (showResult) {\n                $$(element).closest(\"li\").addClass(\"result-success\");\n              }\n            } else {\n              if (showResult) {\n                $$(element).closest(\"li\").addClass(\"result-fail\");\n              }\n            }\n          }\n        });\n      });\n      componentParams.content.items.forEach(function (element) {\n        if (element.value > 0 && !element.deleted && element.group != 0) {\n          maxPoints += parseFloat(element.value);\n        }\n      });\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(maxPoints);\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_7__[\"formatNumber\"])(points);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrect) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var boxes = $builderEl.find(\".connectedSortable\");\n      var answers = component.params.content.items;\n      var groups = component.params.content.groups.filter(function (o) {\n        return !o.deleted;\n      });\n      boxes.forEach(function (element) {\n        var id = $$(element).data(\"id\");\n        var answerIcon = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n        if (id) {\n          var items = $$(element).find(\".drag-item\");\n          items.forEach(function (element) {\n            var elemId = $(element).attr(\"data-id\");\n\n            // debugger;\n\n            var res = _.find(answers, function (o) {\n              return o.id == elemId && o.group != 0;\n            });\n            if (res) {\n              $$(element).parent(\".item-inner\").append(answerIcon);\n              var target = $$(element).parent(\".item-inner\").find(\".solution\");\n              var gName = \"\";\n              res.group = res.group + \"\"; //fix pro starší verze, kde byl group integer\n\n              if (res.group.includes(\",\")) {\n                var split = res.group.split(\",\");\n                split.forEach(function (gr, i) {\n                  var group = _.find(groups, function (o) {\n                    return o.id == gr && !o.deleted;\n                  });\n                  gName += group.name;\n                  if (i + 1 != split.length) {\n                    gName += \" | \";\n                  }\n                });\n              } else {\n                var group = _.find(groups, function (o) {\n                  return o.id == res.group && !o.deleted;\n                });\n                gName = group.name;\n              }\n\n              // debugger;\n              if (res.group.includes(id)) {\n                $$(target).addClass(\"selected\");\n              }\n              app.tooltip.create({\n                targetEl: $$(target),\n                text: \"Skupina: \" + gName + \" (\" + res.value + \"b)\"\n              });\n            }\n          });\n        } else {\n          var _items = $$(element).find(\".drag-item\");\n          _items.forEach(function (element) {\n            var txt = $$(element).attr(\"data-id\");\n            var res = _.find(answers, function (o) {\n              return o.id == txt && o.group != 0;\n            });\n            if (res) {\n              $$(element).parent(\".item-inner\").append(answerIcon);\n              var target = $$(element).parent(\".item-inner\").find(\".solution\");\n              var gName = \"\";\n              res.group = res.group + \"\"; //fix pro starší verze, kde byl group integer\n\n              if (res.group.includes(\",\")) {\n                var split = res.group.split(\",\");\n                split.forEach(function (gr, i) {\n                  var group = _.find(groups, function (o) {\n                    return o.id == gr && !o.deleted;\n                  });\n                  gName += group.name;\n                  if (i + 1 != split.length) {\n                    gName += \" | \";\n                  }\n                });\n              } else {\n                var group = _.find(groups, function (o) {\n                  return o.id == res.group && !o.deleted;\n                });\n                gName = group.name;\n              }\n              app.tooltip.create({\n                targetEl: $$(target),\n                text: \"Skupina: \" + gName + \" (\" + res.value + \"b)\"\n              });\n            }\n          });\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-groups-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js ***!
  \***************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _dd_pairs_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dd-pairs-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.less\");\n/* harmony import */ var _dd_pairs_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dd_pairs_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"dd-pairs-01\",\n  title: \"Dragging\",\n  subtitle: \"pairs\",\n  cast: [\"match-cards-01\"],\n  contentSetting: {\n    label: {\n      name: \"Value\",\n      type: \"textEditor\"\n    },\n    rWidth: {\n      name: \"Width of right list (%)\",\n      type: \"input-number\"\n    },\n    items: {\n      name: \"Pair\",\n      type: \"array\",\n      values: {\n        left: {\n          name: \"Left side of pair\",\n          type: \"textEditor\",\n          box: true\n        },\n        right: {\n          name: \"Right side of pair\",\n          type: \"textEditor\",\n          box: true\n        },\n        positionx: {\n          name: \"Default position of right side\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Create the correct pair's <b>by dragging</b> the right item's up or down.\",\n    rWidth: \"60\",\n    items: [{\n      left: \"Švédsko\",\n      right: \"Stockholm\",\n      value: 1,\n      positionx: 3\n    }, {\n      left: \"Finsko\",\n      right: \"Helsinky\",\n      value: 1,\n      positionx: 2\n    }, {\n      left: \"Rusko\",\n      right: \"Moskva\",\n      value: 1,\n      positionx: 4\n    }, {\n      left: \"Česká Republika\",\n      right: \"Praha\",\n      value: 1,\n      positionx: 1\n    }]\n  },\n  helpers: {\n    left: [],\n    right: [],\n    shuffledRight: [],\n    reset: false,\n    elHeight: 0\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component) {\n    var helpers = component.params.helpers;\n    var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_7__[\"getParentForm\"])(component);\n    var parentContent = null;\n    if (parentForm) {\n      parentContent = parentForm.params.content;\n    }\n    var right = [];\n    var left = [];\n    content.items.forEach(function (element) {\n      left.push(element);\n      right.push(element);\n    });\n\n    // right = _.orderBy(right, \"positionx\");\n\n    right = _.sortBy(right, function (obj) {\n      return parseFloat(obj.positionx, 10);\n    });\n    var rounded = Math.ceil(content.rWidth / 5) * 5;\n    // debugger;\n    var lWidth = 100 - rounded;\n    var changed = false;\n    if (parentContent && parentContent.shuffleAnswers) {\n      var diff = _.differenceBy(helpers.shuffledRight, right, \"label\");\n      if (diff.length > 0 || helpers.shuffledRight.length == 0) {\n        changed = true;\n      }\n      if (helpers.reset || changed) {\n        helpers.shuffledRight = [];\n        helpers.shuffledRight = _.shuffle(right);\n        helpers.reset = false;\n      }\n    } else {\n      helpers.shuffledRight = right;\n    }\n    return \"\\n    <div class=\\\"swiper-no-swiping\\\">\\n     <span class=\\\"result-badge\\\"></span>\\n     \".concat(content.label.length > 0 ? \"<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n          <div class=\\\"row drag-box-excersise\\\" style=\\\"--highlight-height: 45px;\\\">\\n          <div class=\\\"col-\").concat(lWidth, \"\\\">\\n          <ul class=\\\"left-pair-list\\\">\\n          \").concat(left.map(function (data) {\n      return \"\\n              <li>\\n              <div class=\\\"item-content\\\">\\n                <div class=\\\"item-inner\\\">\\n                  <div class=\\\"item-title\\\">\".concat(data.left, \"</div>\\n                </div>\\n              </div>\\n            </li>\\n        \");\n    }).join(\"\"), \"\\n          </ul>\\n          </div>\\n          <div class=\\\"col-\").concat(rounded, \"\\\">\\n            <ul class=\\\"sortablePairs right-pairs-list\\\">\\n            \").concat(helpers.shuffledRight.map(function (data) {\n      return \"\\n                <li class=\\\"ui-sortable-handle sortable-item\\\" data-id=\\\"\".concat(data.id, \"\\\">\\n                <div class=\\\"item-content\\\">\\n                    <div class=\\\"item-media\\\"><i class=\\\"f7-icons\\\">resize_v</i></div>\\n                    <div class=\\\"item-inner\\\">\\n                    <div class=\\\"item-title drag-item\\\">\").concat(data.right, \"</div>\\n                    </div>\\n                </div>\\n                </li>\\n            \");\n    }).join(\"\"), \"\\n            </ul>\\n          </div>\\n           </div>\\n           </div>\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      // $builderEl.find('.accordion-item').on('accordion:closed', function (e) {\n      //   builder.app.dialog.alert('Accordion item closed');\n      // });\n      var params = builder.params;\n      var content = params.content;\n      var helpers = params.helpers;\n      var container = $builderEl.find(\".drag-box-excersise\");\n\n      // if (helpers.left.length == 0) {\n      // content.items.forEach((element) => {\n      //   helpers.left.push(element.left);\n      //   helpers.right.push({ right: element.right, id: element.id });\n      // });\n      //\n      // helpers.right = _.shuffle(helpers.right);\n      // }\n\n      var sortableContainers = $builderEl.find(\".sortablePairs\");\n\n      // let list = $builderEl.find(\".drag-box-excersise\").find(\".item-title\");\n      // let maxH = _.maxBy(list, (o) => {\n      //   return $$(o).height();\n      // });\n      // let heightVal = $$(maxH).height();\n      // list.forEach((element) => {\n      //   $$(element).css({\n      //     height: heightVal + \"px\",\n      //     lineHeight: heightVal + \"px\",\n      //   });\n      // });\n\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children(\"*\");\n        if ($dragItems.length > 0) {\n          $dragItems.each(function (i) {\n            var $dragItem = $(this);\n            $dragItem.attr(\"data-orig-position\", i);\n          });\n        }\n        $(this).sortable({\n          placeholder: \"ui-state-highlight\",\n          update: function update(event, ui) {\n            builder.params.methods.updateHeight();\n            builder.params.methods.answerEmittor($builderEl, builder);\n          },\n          start: function start(event, ui) {\n            var height = ui.item.height();\n            // debugger;\n            $$(container)[0].style.setProperty(\"--highlight-height\", \"\".concat(height, \"px\"));\n          }\n        }).disableSelection();\n        var target = $builderEl.find(\"img\");\n        var len = target.length;\n        var loaded = 0;\n        if (len > 0) {\n          target.on(\"load\", function (o) {\n            loaded++;\n            if (loaded == len) {\n              builder.params.methods.updateHeight();\n            }\n          });\n        } else {\n          setTimeout(function () {\n            builder.params.methods.updateHeight();\n          }, 500);\n        }\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpers.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    },\n    update: function update($builderEl, builder) {},\n    visible: function visible($builderEl, builder) {\n      //alert('cip!');\n      var helpers = builder.params.helpers;\n      var height = $builderEl.height();\n      if (height != helpers.elHeight) {\n        helpers.elHeight = height;\n        // debugger;\n        builder.params.methods.updateHeight();\n      }\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    updateHeight: function updateHeight() {\n      var $block = this.$block;\n      var leftEls = $block.find(\".left-pair-list\").children(\"li\");\n      var rightEls = $block.find(\".right-pairs-list\").children(\"li\");\n      // debugger;\n      leftEls.forEach(function (el, i) {\n        el = $$(el);\n        var rEl = $$(rightEls[i]);\n        el.css(\"height\", \"\");\n        rEl.css(\"height\", \"\");\n        var lHeight = $$(el).height();\n        var rHeight = rEl.height();\n        var max = Math.max(lHeight, rHeight);\n        el.css(\"height\", \"\".concat(max, \"px\"));\n        rEl.css(\"height\", \"\".concat(max, \"px\"));\n      });\n    },\n    getUserData: function getUserData() {},\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var componentParams = component.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrect = formComponentParams.content.showCorrectAnswers;\n      var content = componentParams.content;\n      var $builderEl = component.$block;\n      var app = component.app;\n      //   debugger;\n\n      var points = 0;\n      var maxPoints = 0;\n      content.items.forEach(function (element) {\n        if (!element.deleted) {\n          maxPoints += parseFloat(element.value);\n        }\n      });\n      var $sortableBox = $builderEl.find(\".sortablePairs\");\n      var $items = $sortableBox.find(\"li\");\n      var cnt = content.items.filter(function (o) {\n        return !o.deleted;\n      });\n      $items.forEach(function (element) {\n        $$(element).closest(\"li\").removeClass(\"result-success\");\n        $$(element).closest(\"li\").removeClass(\"result-fail\");\n      });\n      $items.forEach(function (element, index) {\n        var id = $$(element).data(\"id\");\n        var findIndex = _.findIndex(cnt, function (o) {\n          return o.id == id;\n        });\n        if (findIndex == index) {\n          points++;\n        }\n      });\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_8__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_8__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      this.params.methods.updateHeight();\n      if (showCorrect) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var container = $builderEl.find(\".sortablePairs\");\n      var answers = component.params.content.items;\n      var cnt = answers.filter(function (o) {\n        return !o.deleted;\n      });\n      var $items = container.find(\"li\");\n      $items.forEach(function (element, index) {\n        var id = $$(element).data(\"id\");\n        var findIndex = _.findIndex(cnt, function (o) {\n          return o.id == id;\n        });\n        // debugger;\n        if (findIndex == index) {\n          $$(element).addClass(\"result-success\");\n        } else {\n          $$(element).addClass(\"result-fail\");\n          //   debugger;\n\n          var el = $$(element).find(\".item-title\")[0];\n          $$(el).append(\"<span class=\\\"right-answer solution\\\"><small>(\".concat(cnt[findIndex].left, \")</small></span>\"));\n        }\n      });\n      this.params.methods.updateHeight();\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.less":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.less ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/drag-drop/dd-pairs-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js ***!
  \********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _fw_01_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fw-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.less\");\n/* harmony import */ var _fw_01_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_fw_01_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordfind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wordfind */ \"./src/core/custom_plugins/builder/components/_en/forms/findword/wordfind.js\");\n/* harmony import */ var _wordfind__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordfind__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"fw-01\",\n  title: \"Word search\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    showWord: {\n      name: \"Show words to find\",\n      type: \"bool\",\n      help: \"If this settings is off, word will show up after user find them\"\n    },\n    findedWordsText: {\n      name: \"Description above words to find (or finded words)\",\n      type: \"textEditor\"\n    },\n    words: {\n      name: \"Words to find\",\n      type: \"array\",\n      values: {\n        answer: {\n          name: \"Word\",\n          type: \"textarea\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Find all words by push and hold mouse button and move cursor through correct letters.\",\n    words: [{\n      answer: \"car\",\n      value: 1\n    }, {\n      answer: \"cat\",\n      value: 1\n    }, {\n      answer: \"thor\",\n      value: 1\n    }, {\n      answer: \"harry\",\n      value: 1\n    }, {\n      answer: \"super\",\n      value: 1\n    }],\n    findedWordsText: \"Founded words\",\n    showWord: true\n  },\n  helpers: {\n    selectedSquares: [],\n    alreadyFound: [],\n    currentWord: \"\",\n    startSquare: null,\n    endSquare: \"\"\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    return \"\\n<div class=\\\"swiper-no-swiping\\\">\\n<h3>\".concat(content.label, \"</h3>\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"row\\\">\\n<div class=\\\"col-100 medium-70\\\">\\n  <div class=\\\"puzzle-grid swiper-no-swiping\\\">\\n  </div>\\n</div>\\n<div class=\\\"col-100 medium-30 answer-cont\\\">\\n  \").concat(content.showWord ? \"<h3>\".concat(content.findedWordsText, \"</h3>\") : \"<h3>\".concat(content.findedWordsText, \" (celkem \").concat(content.words.length, \")</h3>\"), \"\\n  <div class=\\\"answer-grid\\\">\\n    <ul class=\\\"answer-list\\\">\\n      \").concat(content.showWord ? \"\\n        \".concat(content.words.map(function (data) {\n      return \"\\n          <li id=\\\"answer-\".concat(data.id, \"\\\">\").concat(data.answer, \"</li>\\n        \");\n    }).join(\"\"), \"\\n       \") : \"\", \"\\n    </ul>\\n  </div>\\n</div>\\n</div>\\n</div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, component) {\n      var content = component.params.content;\n      // debugger\n      var wordArray = [];\n      content.words.forEach(function (element) {\n        wordArray.push(element.answer);\n      });\n      var wf = _wordfind__WEBPACK_IMPORTED_MODULE_2___default.a.wordfind;\n      var options = {\n        height: undefined,\n        width: undefined,\n        orientation: undefined,\n        fillBlanks: true,\n        allowExtraBlanks: false,\n        maxAttempts: 5,\n        maxGridGrowth: undefined,\n        preferOverlap: undefined\n      };\n      var puzzle = wf.newPuzzle(wordArray, options);\n      var grid = \"\";\n      for (var i = 0; i < puzzle.length; i++) {\n        var row = puzzle[i];\n        grid += \"<div>\";\n        for (var j = 0; j < row.length; j++) {\n          grid += '<span type=\"button\" class=\"puzzleSquare\" data-x=\"' + j + '\" data-y=\"' + i + '\">';\n          grid += row[j];\n          grid += \"</span>\";\n        }\n        grid += \"</div>\";\n      }\n      var methods = component.params.methods;\n      var $gridWrapper = $builderEl.find(\".puzzle-grid\");\n      $gridWrapper.html(grid);\n      var btns = $builderEl.find(\".puzzleSquare\");\n      if (window.navigator.msPointerEnabled) {\n        btns.off(\"MSPointerDown\");\n        btns.off(\"MSPointerOver\");\n        btns.off(\"MSPointerUp\");\n        btns.on(\"MSPointerDown\", methods.startTurn);\n        btns.on(\"MSPointerOver\", methods.mouseMove);\n        btns.on(\"MSPointerUp\", methods.endTurn);\n      } else {\n        btns.off(\"mousedown\");\n        btns.off(\"mouseenter\");\n        btns.off(\"mouseup\");\n        btns.off(\"touchstart\");\n        btns.off(\"touchmove\");\n        btns.off(\"touchend\");\n        btns.mousedown(methods.startTurn);\n        btns.mouseenter(methods.mouseMove);\n        btns.mouseup(methods.endTurn);\n        btns.on(\"touchstart\", methods.startTurn);\n        btns.on(\"touchmove\", methods.touchMove);\n        btns.on(\"touchend\", methods.endTurn);\n      }\n    }\n  },\n  methods: {\n    validate: function validate() {\n      var word = this.params.helpers.currentWord;\n      var rWord = word.split(\"\").reverse().join(\"\");\n      var targets = this.params.helpers.selectedSquares;\n      var id = \"\";\n      var isGood = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(this.params.content.words, function (o) {\n        return o.answer == word || o.answer == rWord;\n      });\n      if (isGood && !this.params.helpers.alreadyFound.includes(isGood.id)) {\n        targets.forEach(function (element) {\n          $$(element).addClass(\"found\");\n        });\n        this.params.helpers.alreadyFound.push(isGood.id);\n        id = isGood.id;\n        this.params.methods.updateStats(id);\n      }\n    },\n    updateStats: function updateStats(idenifier) {\n      var isShowned = this.params.content.showWord;\n      var af = this.params.helpers.alreadyFound;\n      // this.$block;\n\n      if (isShowned) {\n        var id = \"answer-\" + idenifier;\n        var el = this.$block.find(\"#\".concat(id));\n        $$(el).css(\"text-decoration\", \"line-through\");\n      } else {\n        var word = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(this.params.content.words, function (o) {\n          return o.id == af[af.length - 1];\n        });\n        var list = \"<li>\".concat(word.answer, \"</li>\");\n        this.$block.find(\".answer-grid\").find(\"ul\").append(list);\n      }\n    },\n    startTurn: function startTurn(e) {\n      e.preventDefault();\n      var target = e.target;\n      $$(target).addClass(\"selected\");\n      // this.params.helpers.selectedSquares.push(target);\n      this.params.helpers.startSquare = target;\n      // this.params.helpers.currentWord += $(target).text();\n    },\n    endTurn: function endTurn() {\n      if (this.params.helpers.currentWord != \"\") {\n        this.params.methods.validate();\n      }\n      this.params.methods.resetTurn();\n    },\n    resetTurn: function resetTurn() {\n      this.$block.find(\".selected\").removeClass(\"selected\");\n      this.params.helpers.selectedSquares = [];\n      this.params.helpers.startSquare = null;\n    },\n    updateTurn: function updateTurn() {\n      var touchTr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var e = arguments.length > 1 ? arguments[1] : undefined;\n      e.preventDefault();\n      var target = null;\n      if (touchTr == null) {\n        target = e.target;\n      } else {\n        target = touchTr;\n      }\n      var startSquare = this.params.helpers.startSquare;\n      if (this.params.helpers.startSquare == null\n      // || selectedSquares[selectedSquares.length - 1] == target\n      ) {\n        return;\n      }\n      this.params.methods.getPath($$(startSquare).data(\"x\"), $$(startSquare).data(\"y\"), $$(target).data(\"x\"), $$(target).data(\"y\"), startSquare, target);\n    },\n    getPath: function getPath(x1, y1, x2, y2, startSquare, endSquare) {\n      var verticalDir = parseInt(y1) - parseInt(y2);\n      var horizontalDir = parseInt(x1) - parseInt(x2);\n      this.$block.find(\".selected\").removeClass(\"selected\");\n      this.params.helpers.selectedSquares = [];\n      var word = \"\";\n      $$(startSquare).addClass(\"selected\");\n      if (Math.abs(verticalDir) == Math.abs(horizontalDir)) {\n        if (horizontalDir > 0) {\n          if (verticalDir > 0) {\n            for (var index = 0; index <= Math.abs(verticalDir); index += 1) {\n              var nextSquareY = parseInt(y2) + index;\n              var nextSquareX = parseInt(x2) + index;\n              var target = $(this.$block).find(\"[data-x=\".concat(nextSquareX, \"][data-y=\").concat(nextSquareY, \"]\"));\n              target.addClass(\"selected\");\n              word += target.text();\n              this.params.helpers.selectedSquares.push(target);\n            }\n          } else {\n            for (var _index = 0; _index <= Math.abs(verticalDir); _index += 1) {\n              var _nextSquareY = parseInt(y2) - _index;\n              var _nextSquareX = parseInt(x2) + _index;\n              var _target = $(this.$block).find(\"[data-x=\".concat(_nextSquareX, \"][data-y=\").concat(_nextSquareY, \"]\"));\n              _target.addClass(\"selected\");\n              word += _target.text();\n              this.params.helpers.selectedSquares.push(_target);\n            }\n          }\n        } else {\n          if (verticalDir > 0) {\n            for (var _index2 = 0; _index2 <= Math.abs(verticalDir); _index2 += 1) {\n              var _nextSquareY2 = parseInt(y2) + _index2;\n              var _nextSquareX2 = parseInt(x2) - _index2;\n              var _target2 = $(this.$block).find(\"[data-x=\".concat(_nextSquareX2, \"][data-y=\").concat(_nextSquareY2, \"]\"));\n              _target2.addClass(\"selected\");\n              word += _target2.text();\n              this.params.helpers.selectedSquares.push(_target2);\n            }\n          } else {\n            for (var _index3 = 0; _index3 <= Math.abs(verticalDir); _index3 += 1) {\n              var _nextSquareY3 = parseInt(y2) - _index3;\n              var _nextSquareX3 = parseInt(x2) - _index3;\n              var _target3 = $(this.$block).find(\"[data-x=\".concat(_nextSquareX3, \"][data-y=\").concat(_nextSquareY3, \"]\"));\n              _target3.addClass(\"selected\");\n              word += _target3.text();\n              this.params.helpers.selectedSquares.push(_target3);\n            }\n          }\n        }\n      } else if (horizontalDir == 0) {\n        //verticaly\n\n        var iterator = 0;\n        if (verticalDir > 0) {\n          for (var _index4 = 0; _index4 <= Math.abs(verticalDir); _index4 += 1) {\n            var nextSquare = parseInt(y2) + _index4;\n            var _target4 = $(\"[data-x=\".concat(x1, \"][data-y=\").concat(nextSquare, \"]\")).addClass(\"selected\");\n            _target4.addClass(\"selected\");\n            word += _target4.text();\n            this.params.helpers.selectedSquares.push(_target4);\n          }\n        } else {\n          for (var _index5 = 0; _index5 <= Math.abs(verticalDir); _index5 += 1) {\n            var _nextSquare = parseInt(y2) - _index5;\n            var _target5 = $(this.$block).find(\"[data-x=\".concat(x1, \"][data-y=\").concat(_nextSquare, \"]\")).addClass(\"selected\");\n            _target5.addClass(\"selected\");\n            word += _target5.text();\n            this.params.helpers.selectedSquares.push(_target5);\n          }\n        }\n      } else if (verticalDir == 0) {\n        //horrizontal\n        var _iterator = 0;\n        if (horizontalDir > 0) {\n          for (var _index6 = 0; _index6 <= Math.abs(horizontalDir); _index6 += 1) {\n            var _nextSquare2 = parseInt(x2) + _index6;\n            var _target6 = $(this.$block).find(\"[data-y=\".concat(y1, \"][data-x=\").concat(_nextSquare2, \"]\")).addClass(\"selected\");\n            _target6.addClass(\"selected\");\n            word += _target6.text();\n            this.params.helpers.selectedSquares.push(_target6);\n          }\n        } else {\n          for (var _index7 = 0; _index7 <= Math.abs(horizontalDir); _index7 += 1) {\n            var _nextSquare3 = parseInt(x2) - _index7;\n            var _target7 = $(this.$block).find(\"[data-y=\".concat(y1, \"][data-x=\").concat(_nextSquare3, \"]\")).addClass(\"selected\");\n            _target7.addClass(\"selected\");\n            word += _target7.text();\n            this.params.helpers.selectedSquares.push(_target7);\n          }\n        }\n      }\n      this.params.helpers.currentWord = word;\n    },\n    touchMove: function touchMove(e) {\n      e.preventDefault();\n      // debugger;\n      var xPos = e.touches[0].pageX;\n      var yPos = e.touches[0].pageY;\n      var targetElement = document.elementFromPoint(xPos, yPos);\n      this.params.methods.updateTurn(targetElement, e);\n    },\n    mouseMove: function mouseMove(e) {\n      this.params.methods.updateTurn(null, e);\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var $builderEl = component.$block;\n      var af = this.params.helpers.alreadyFound;\n      var contentW = this.params.content.words;\n      var points = 0;\n      var maxPoints = 0;\n      af.forEach(function (element) {\n        var answer = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(contentW, function (o) {\n          return o.id == element;\n        });\n        points += parseFloat(answer.value);\n      });\n      maxPoints = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.sumBy(contentW, function (o) {\n        if (!o.deleted) {\n          return parseFloat(o.value);\n        }\n      });\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_3__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_3__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {},\n    getUserData: function getUserData() {}\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/findword/fw-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/findword/wordfind.js":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/findword/wordfind.js ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/**\r\n * Wordfind.js 0.0.1\r\n * (c) 2012 Bill, BunKat LLC.\r\n * Wordfind is freely distributable under the MIT license.\r\n * For all details and documentation:\r\n *     http://github.com/bunkat/wordfind\r\n */\n\n(function () {\n  \"use strict\";\n\n  /**\r\n   * Generates a new word find (word search) puzzle provided a set of words.\r\n   * Can automatically determine the smallest puzzle size in which all words\r\n   * fit, or the puzzle size can be manually configured.  Will automatically\r\n   * increase puzzle size until a valid puzzle is found.\r\n   *\r\n   * WordFind has no dependencies.\r\n   */\n\n  /**\r\n   * Initializes the WordFind object.\r\n   *\r\n   * @api private\r\n   */\n  var WordFind = function WordFind() {\n    // Letters used to fill blank spots in the puzzle\n    var LETTERS = \"abcdefghijklmnoprstuvwy\";\n\n    /**\r\n     * Definitions for all the different orientations in which words can be\r\n     * placed within a puzzle. New orientation definitions can be added and they\r\n     * will be automatically available.\r\n     */\n\n    // The list of all the possible orientations\n    var allOrientations = [\"horizontal\", \"horizontalBack\", \"vertical\", \"verticalUp\", \"diagonal\", \"diagonalUp\", \"diagonalBack\", \"diagonalUpBack\"];\n\n    // The definition of the orientation, calculates the next square given a\n    // starting square (x,y) and distance (i) from that square.\n    var orientations = {\n      horizontal: function horizontal(x, y, i) {\n        return {\n          x: x + i,\n          y: y\n        };\n      },\n      horizontalBack: function horizontalBack(x, y, i) {\n        return {\n          x: x - i,\n          y: y\n        };\n      },\n      vertical: function vertical(x, y, i) {\n        return {\n          x: x,\n          y: y + i\n        };\n      },\n      verticalUp: function verticalUp(x, y, i) {\n        return {\n          x: x,\n          y: y - i\n        };\n      },\n      diagonal: function diagonal(x, y, i) {\n        return {\n          x: x + i,\n          y: y + i\n        };\n      },\n      diagonalBack: function diagonalBack(x, y, i) {\n        return {\n          x: x - i,\n          y: y + i\n        };\n      },\n      diagonalUp: function diagonalUp(x, y, i) {\n        return {\n          x: x + i,\n          y: y - i\n        };\n      },\n      diagonalUpBack: function diagonalUpBack(x, y, i) {\n        return {\n          x: x - i,\n          y: y - i\n        };\n      }\n    };\n\n    // Determines if an orientation is possible given the starting square (x,y),\n    // the height (h) and width (w) of the puzzle, and the length of the word (l).\n    // Returns true if the word will fit starting at the square provided using\n    // the specified orientation.\n    var checkOrientations = {\n      horizontal: function horizontal(x, y, h, w, l) {\n        return w >= x + l;\n      },\n      horizontalBack: function horizontalBack(x, y, h, w, l) {\n        return x + 1 >= l;\n      },\n      vertical: function vertical(x, y, h, w, l) {\n        return h >= y + l;\n      },\n      verticalUp: function verticalUp(x, y, h, w, l) {\n        return y + 1 >= l;\n      },\n      diagonal: function diagonal(x, y, h, w, l) {\n        return w >= x + l && h >= y + l;\n      },\n      diagonalBack: function diagonalBack(x, y, h, w, l) {\n        return x + 1 >= l && h >= y + l;\n      },\n      diagonalUp: function diagonalUp(x, y, h, w, l) {\n        return w >= x + l && y + 1 >= l;\n      },\n      diagonalUpBack: function diagonalUpBack(x, y, h, w, l) {\n        return x + 1 >= l && y + 1 >= l;\n      }\n    };\n\n    // Determines the next possible valid square given the square (x,y) was ]\n    // invalid and a word lenght of (l).  This greatly reduces the number of\n    // squares that must be checked. Returning {x: x+1, y: y} will always work\n    // but will not be optimal.\n    var skipOrientations = {\n      horizontal: function horizontal(x, y, l) {\n        return {\n          x: 0,\n          y: y + 1\n        };\n      },\n      horizontalBack: function horizontalBack(x, y, l) {\n        return {\n          x: l - 1,\n          y: y\n        };\n      },\n      vertical: function vertical(x, y, l) {\n        return {\n          x: 0,\n          y: y + 100\n        };\n      },\n      verticalUp: function verticalUp(x, y, l) {\n        return {\n          x: 0,\n          y: l - 1\n        };\n      },\n      diagonal: function diagonal(x, y, l) {\n        return {\n          x: 0,\n          y: y + 1\n        };\n      },\n      diagonalBack: function diagonalBack(x, y, l) {\n        return {\n          x: l - 1,\n          y: x >= l - 1 ? y + 1 : y\n        };\n      },\n      diagonalUp: function diagonalUp(x, y, l) {\n        return {\n          x: 0,\n          y: y < l - 1 ? l - 1 : y + 1\n        };\n      },\n      diagonalUpBack: function diagonalUpBack(x, y, l) {\n        return {\n          x: l - 1,\n          y: x >= l - 1 ? y + 1 : y\n        };\n      }\n    };\n\n    /**\r\n     * Initializes the puzzle and places words in the puzzle one at a time.\r\n     *\r\n     * Returns either a valid puzzle with all of the words or null if a valid\r\n     * puzzle was not found.\r\n     *\r\n     * @param {[String]} words: The list of words to fit into the puzzle\r\n     * @param {[Options]} options: The options to use when filling the puzzle\r\n     */\n    var fillPuzzle = function fillPuzzle(words, options) {\n      var puzzle = [],\n        i,\n        j,\n        len;\n\n      // initialize the puzzle with blanks\n      for (i = 0; i < options.height; i++) {\n        puzzle.push([]);\n        for (j = 0; j < options.width; j++) {\n          puzzle[i].push(\"\");\n        }\n      }\n\n      // add each word into the puzzle one at a time\n      for (i = 0, len = words.length; i < len; i++) {\n        if (!placeWordInPuzzle(puzzle, options, words[i])) {\n          // if a word didn't fit in the puzzle, give up\n          return null;\n        }\n      }\n\n      // return the puzzle\n      return puzzle;\n    };\n\n    /**\r\n     * Adds the specified word to the puzzle by finding all of the possible\r\n     * locations where the word will fit and then randomly selecting one. Options\r\n     * controls whether or not word overlap should be maximized.\r\n     *\r\n     * Returns true if the word was successfully placed, false otherwise.\r\n     *\r\n     * @param {[[String]]} puzzle: The current state of the puzzle\r\n     * @param {[Options]} options: The options to use when filling the puzzle\r\n     * @param {String} word: The word to fit into the puzzle.\r\n     */\n    var placeWordInPuzzle = function placeWordInPuzzle(puzzle, options, word) {\n      // find all of the best locations where this word would fit\n      var locations = findBestLocations(puzzle, options, word);\n      if (locations.length === 0) {\n        return false;\n      }\n\n      // select a location at random and place the word there\n      var sel = locations[Math.floor(Math.random() * locations.length)];\n      placeWord(puzzle, word, sel.x, sel.y, orientations[sel.orientation]);\n      return true;\n    };\n\n    /**\r\n     * Iterates through the puzzle and determines all of the locations where\r\n     * the word will fit. Options determines if overlap should be maximized or\r\n     * not.\r\n     *\r\n     * Returns a list of location objects which contain an x,y cooridinate\r\n     * indicating the start of the word, the orientation of the word, and the\r\n     * number of letters that overlapped with existing letter.\r\n     *\r\n     * @param {[[String]]} puzzle: The current state of the puzzle\r\n     * @param {[Options]} options: The options to use when filling the puzzle\r\n     * @param {String} word: The word to fit into the puzzle.\r\n     */\n    var findBestLocations = function findBestLocations(puzzle, options, word) {\n      var locations = [],\n        height = options.height,\n        width = options.width,\n        wordLength = word.length,\n        maxOverlap = 0; // we'll start looking at overlap = 0\n\n      // loop through all of the possible orientations at this position\n      for (var k = 0, len = options.orientations.length; k < len; k++) {\n        var orientation = options.orientations[k],\n          check = checkOrientations[orientation],\n          next = orientations[orientation],\n          skipTo = skipOrientations[orientation],\n          x = 0,\n          y = 0;\n\n        // loop through every position on the board\n        while (y < height) {\n          // see if this orientation is even possible at this location\n          if (check(x, y, height, width, wordLength)) {\n            // determine if the word fits at the current position\n            var overlap = calcOverlap(word, puzzle, x, y, next);\n\n            // if the overlap was bigger than previous overlaps that we've seen\n            if (overlap >= maxOverlap || !options.preferOverlap && overlap > -1) {\n              maxOverlap = overlap;\n              locations.push({\n                x: x,\n                y: y,\n                orientation: orientation,\n                overlap: overlap\n              });\n            }\n            x++;\n            if (x >= width) {\n              x = 0;\n              y++;\n            }\n          } else {\n            // if current cell is invalid, then skip to the next cell where\n            // this orientation is possible. this greatly reduces the number\n            // of checks that we have to do overall\n            var nextPossible = skipTo(x, y, wordLength);\n            x = nextPossible.x;\n            y = nextPossible.y;\n          }\n        }\n      }\n\n      // finally prune down all of the possible locations we found by\n      // only using the ones with the maximum overlap that we calculated\n      return options.preferOverlap ? pruneLocations(locations, maxOverlap) : locations;\n    };\n\n    /**\r\n     * Determines whether or not a particular word fits in a particular\r\n     * orientation within the puzzle.\r\n     *\r\n     * Returns the number of letters overlapped with existing words if the word\r\n     * fits in the specified position, -1 if the word does not fit.\r\n     *\r\n     * @param {String} word: The word to fit into the puzzle.\r\n     * @param {[[String]]} puzzle: The current state of the puzzle\r\n     * @param {int} x: The x position to check\r\n     * @param {int} y: The y position to check\r\n     * @param {function} fnGetSquare: Function that returns the next square\r\n     */\n    var calcOverlap = function calcOverlap(word, puzzle, x, y, fnGetSquare) {\n      var overlap = 0;\n\n      // traverse the squares to determine if the word fits\n      for (var i = 0, len = word.length; i < len; i++) {\n        var next = fnGetSquare(x, y, i),\n          square = puzzle[next.y][next.x];\n\n        // if the puzzle square already contains the letter we\n        // are looking for, then count it as an overlap square\n        if (square === word[i]) {\n          overlap++;\n        }\n        // if it contains a different letter, than our word doesn't fit\n        // here, return -1\n        else if (square !== \"\") {\n          return -1;\n        }\n      }\n\n      // if the entire word is overlapping, skip it to ensure words aren't\n      // hidden in other words\n      return overlap;\n    };\n\n    /**\r\n     * If overlap maximization was indicated, this function is used to prune the\r\n     * list of valid locations down to the ones that contain the maximum overlap\r\n     * that was previously calculated.\r\n     *\r\n     * Returns the pruned set of locations.\r\n     *\r\n     * @param {[Location]} locations: The set of locations to prune\r\n     * @param {int} overlap: The required level of overlap\r\n     */\n    var pruneLocations = function pruneLocations(locations, overlap) {\n      var pruned = [];\n      for (var i = 0, len = locations.length; i < len; i++) {\n        if (locations[i].overlap >= overlap) {\n          pruned.push(locations[i]);\n        }\n      }\n      return pruned;\n    };\n\n    /**\r\n     * Places a word in the puzzle given a starting position and orientation.\r\n     *\r\n     * @param {[[String]]} puzzle: The current state of the puzzle\r\n     * @param {String} word: The word to fit into the puzzle.\r\n     * @param {int} x: The x position to check\r\n     * @param {int} y: The y position to check\r\n     * @param {function} fnGetSquare: Function that returns the next square\r\n     */\n    var placeWord = function placeWord(puzzle, word, x, y, fnGetSquare) {\n      for (var i = 0, len = word.length; i < len; i++) {\n        var next = fnGetSquare(x, y, i);\n        puzzle[next.y][next.x] = word[i];\n      }\n    };\n    return {\n      /**\r\n       * Returns the list of all of the possible orientations.\r\n       * @api public\r\n       */\n      validOrientations: allOrientations,\n      /**\r\n       * Returns the orientation functions for traversing words.\r\n       * @api public\r\n       */\n      orientations: orientations,\n      /**\r\n       * Generates a new word find (word search) puzzle.\r\n       *\r\n       * Settings:\r\n       *\r\n       * height: desired height of the puzzle, default: smallest possible\r\n       * width:  desired width of the puzzle, default: smallest possible\r\n       * orientations: list of orientations to use, default: all orientations\r\n       * fillBlanks: true to fill in the blanks, default: true\r\n       * maxAttempts: number of tries before increasing puzzle size, default:3\r\n       * maxGridGrowth: number of puzzle grid increases, default:10\r\n       * preferOverlap: maximize word overlap or not, default: true\r\n       *\r\n       * Returns the puzzle that was created.\r\n       *\r\n       * @param {[String]} words: List of words to include in the puzzle\r\n       * @param {options} settings: The options to use for this puzzle\r\n       * @api public\r\n       */\n      newPuzzle: function newPuzzle(words, settings) {\n        if (!words.length) {\n          throw new Error(\"Zero words provided\");\n        }\n        var wordList,\n          puzzle,\n          attempts = 0,\n          gridGrowths = 0,\n          opts = settings || {};\n\n        // copy and sort the words by length, inserting words into the puzzle\n        // from longest to shortest works out the best\n        wordList = words.slice(0).sort();\n\n        // initialize the options\n        var maxWordLength = wordList[0].length;\n        var options = {\n          height: opts.height || maxWordLength,\n          width: opts.width || maxWordLength,\n          orientations: opts.orientations || allOrientations,\n          fillBlanks: opts.fillBlanks !== undefined ? opts.fillBlanks : true,\n          allowExtraBlanks: opts.allowExtraBlanks !== undefined ? opts.allowExtraBlanks : true,\n          maxAttempts: opts.maxAttempts || 3,\n          maxGridGrowth: opts.maxGridGrowth !== undefined ? opts.maxGridGrowth : 10,\n          preferOverlap: opts.preferOverlap !== undefined ? opts.preferOverlap : true\n        };\n\n        // add the words to the puzzle\n        // since puzzles are random, attempt to create a valid one up to\n        // maxAttempts and then increase the puzzle size and try again\n        while (!puzzle) {\n          while (!puzzle && attempts++ < options.maxAttempts) {\n            puzzle = fillPuzzle(wordList, options);\n          }\n          if (!puzzle) {\n            gridGrowths++;\n            if (gridGrowths > options.maxGridGrowth) {\n              throw new Error(\"No valid \".concat(options.width, \"x\").concat(options.height, \" grid found and not allowed to grow more\"));\n            }\n            options.height++;\n            options.width++;\n            attempts = 0;\n          }\n        }\n\n        // fill in empty spaces with random letters\n        if (options.fillBlanks) {\n          var lettersToAdd,\n            fillingBlanksCount = 0,\n            extraLetterGenerator;\n          if (typeof options.fillBlanks === \"function\") {\n            extraLetterGenerator = options.fillBlanks;\n          } else if (typeof options.fillBlanks === \"string\") {\n            lettersToAdd = options.fillBlanks.toLowerCase().split(\"\");\n            extraLetterGenerator = function extraLetterGenerator() {\n              return lettersToAdd.pop() || fillingBlanksCount++ && \"\";\n            };\n          } else {\n            extraLetterGenerator = function extraLetterGenerator() {\n              return LETTERS[Math.floor(Math.random() * LETTERS.length)];\n            };\n          }\n          var extraLettersCount = this.fillBlanks({\n            puzzle: puzzle,\n            extraLetterGenerator: extraLetterGenerator\n          });\n          if (lettersToAdd && lettersToAdd.length) {\n            throw new Error(\"Some extra letters provided were not used: \".concat(lettersToAdd));\n          }\n          if (lettersToAdd && fillingBlanksCount && !options.allowExtraBlanks) {\n            throw new Error(\"\".concat(fillingBlanksCount, \" extra letters were missing to fill the grid\"));\n          }\n          var gridFillPercent = 100 * (1 - extraLettersCount / (options.width * options.height));\n        }\n        return puzzle;\n      },\n      /**\r\n       * Wrapper around `newPuzzle` allowing to find a solution without some words.\r\n       *\r\n       * @param {options} settings: The options to use for this puzzle.\r\n       * Same as `newPuzzle` + allowedMissingWords\r\n       */\n      newPuzzleLax: function newPuzzleLax(words, opts) {\n        try {\n          return this.newPuzzle(words, opts);\n        } catch (e) {\n          if (!opts.allowedMissingWords) {\n            throw e;\n          }\n          var opts = Object.assign({}, opts); // shallow copy\n          opts.allowedMissingWords--;\n          for (var i = 0; i < words.length; i++) {\n            var wordList = words.slice(0);\n            wordList.splice(i, 1);\n            try {\n              var puzzle = this.newPuzzleLax(wordList, opts);\n              return puzzle;\n            } catch (e) {} // continue if error\n          }\n          throw e;\n        }\n      },\n      /**\r\n       * Fills in any empty spaces in the puzzle with random letters.\r\n       *\r\n       * @param {[[String]]} puzzle: The current state of the puzzle\r\n       * @api public\r\n       */\n      fillBlanks: function fillBlanks(_ref) {\n        var puzzle = _ref.puzzle,\n          extraLetterGenerator = _ref.extraLetterGenerator;\n        var extraLettersCount = 0;\n        for (var i = 0, height = puzzle.length; i < height; i++) {\n          var row = puzzle[i];\n          for (var j = 0, width = row.length; j < width; j++) {\n            if (!puzzle[i][j]) {\n              puzzle[i][j] = extraLetterGenerator();\n              extraLettersCount++;\n            }\n          }\n        }\n        return extraLettersCount;\n      },\n      /**\r\n       * Returns the starting location and orientation of the specified words\r\n       * within the puzzle. Any words that are not found are returned in the\r\n       * notFound array.\r\n       *\r\n       * Returns\r\n       *   x position of start of word\r\n       *   y position of start of word\r\n       *   orientation of word\r\n       *   word\r\n       *   overlap (always equal to word.length)\r\n       *\r\n       * @param {[[String]]} puzzle: The current state of the puzzle\r\n       * @param {[String]} words: The list of words to find\r\n       * @api public\r\n       */\n      solve: function solve(puzzle, words) {\n        var options = {\n            height: puzzle.length,\n            width: puzzle[0].length,\n            orientations: allOrientations,\n            preferOverlap: true\n          },\n          found = [],\n          notFound = [];\n        for (var i = 0, len = words.length; i < len; i++) {\n          var word = words[i],\n            locations = findBestLocations(puzzle, options, word);\n          if (locations.length > 0 && locations[0].overlap === word.length) {\n            locations[0].word = word;\n            found.push(locations[0]);\n          } else {\n            notFound.push(word);\n          }\n        }\n        return {\n          found: found,\n          notFound: notFound\n        };\n      },\n      /**\r\n       * Outputs a puzzle to the console, useful for debugging.\r\n       * Returns a formatted string representing the puzzle.\r\n       *\r\n       * @param {[[String]]} puzzle: The current state of the puzzle\r\n       * @api public\r\n       */\n      print: function print(puzzle) {\n        var puzzleString = \"\";\n        for (var i = 0, height = puzzle.length; i < height; i++) {\n          var row = puzzle[i];\n          for (var j = 0, width = row.length; j < width; j++) {\n            puzzleString += (row[j] === \"\" ? \" \" : row[j]) + \" \";\n          }\n          puzzleString += \"\\n\";\n        }\n        return puzzleString;\n      }\n    };\n  };\n\n  /**\r\n   * Allow library to be used within both the browser and node.js\r\n   */\n  var root =  true && exports !== null ? exports : window;\n  root.wordfind = WordFind();\n}).call(this);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/findword/wordfind.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/frm-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/frm-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/frm-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/frm-02.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/frm-02.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/frm-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/grid/grid-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/grid/grid-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/input/inp-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/input/tarea-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _interactive_img_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interactive-img-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.less\");\n/* harmony import */ var _interactive_img_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interactive_img_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"interactive-img-01\",\n  title: \"Interactive image\",\n  subtitle: \"image with clickable areas\",\n  contentSetting: {\n    bgImage: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    wrongClick: {\n      name: \"Show wrong click?\",\n      type: \"bool\",\n      hidden: {\n        minusPoints: {\n          name: \"Substract points on wrong click\",\n          type: \"bool\"\n        }\n      }\n    },\n    dropableZone: {\n      name: \"Interactive points\",\n      type: \"array\",\n      values: {\n        zone: {\n          name: \"Interactive point\",\n          type: \"interactive-area\",\n          ref: \"bgImage\"\n        },\n        text: {\n          name: \"Text when clicked\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  helpers: {\n    minus: 0\n  },\n  content: {\n    bgImage: \"{{mediaServerDomain}}/public/3xd8qk6t4i3zw45ohgdcb6cf2uw1mq3ns3z1mb9jjtne7kciq3emwz9wca4hiux7.jpeg\",\n    wrongClick: false,\n    minusPoints: false,\n    dropableZone: [{\n      zone: {\n        left: 36,\n        top: 17.4,\n        width: 7.6,\n        height: 16.2\n      },\n      text: \"kokos\"\n    }]\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"img-container\\\">\\n        <img src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.dropableZone.map(function (data) {\n      return \"\\n                <div class=\\\"drop-area\\\" data-id=\\\"\".concat(data.id, \"\\\" style=\\\"position: absolute; width: \").concat(data.zone.width, \"%; height: \").concat(data.zone.height, \"%; top: \").concat(data.zone.top, \"%; left: \").concat(data.zone.left, \"%;\\\"></div>\\n          \");\n    }).join(\"\"), \"\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var helpers = component.params.helpers;\n      helpers.minus = 0;\n      var $areas = $componentEl.find(\".drop-area\");\n      var $cont = $componentEl.find(\".img-container\");\n      if (component.params.content.wrongClick) {\n        $cont.off(\"click\");\n        $cont.on(\"click\", function (e) {\n          var target = $$(e.target);\n          var wrapper = $(this).parent(),\n            position = wrapper.offset(),\n            posX = position.left,\n            posY = position.top,\n            positionX = Math.floor(e.pageX - posX),\n            positionY = Math.floor(e.pageY - posY),\n            marker = $('<i class=\"icon err f7-icons\" data-type=\"f7-icons\" data-icon=\"delete_round_fill\"></i>');\n          marker.css({\n            position: \"absolute\",\n            top: positionY + \"px\",\n            left: positionX + \"px\"\n          });\n          $cont.append(marker[0]);\n          helpers.minus++;\n        });\n      }\n      $areas.off(\"click\");\n      $areas.on(\"click\", function (e) {\n        e.stopImmediatePropagation();\n        e.stopPropagation();\n        e.preventDefault();\n        var target = $$(e.target);\n        if (!target.hasClass(\"clicked\") && !target.hasClass(\"not-clicked\")) {\n          var id = target.data(\"id\");\n          target.addClass(\"clicked\");\n          var find = _.find(component.params.content.dropableZone, function (o) {\n            return o.id == id;\n          });\n          if (find.text.length > 0) {\n            target.html(\"<span class=\\\"text\\\">\".concat(find.text, \"</span>\"));\n          } else {\n            target.html(\"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"check_circle\\\"></i>\");\n          }\n        }\n      });\n    }\n  },\n  methods: {\n    eval: function _eval(component, formComponent) {\n      var $componentEl = component.$block;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var content = component.params.content;\n      var helpers = component.params.helpers;\n      var areas = component.$block.find(\".drop-area\");\n      var clicked = component.$block.find(\".clicked\");\n      var points = clicked.length;\n      if (content.wrongClick && content.minusPoints) {\n        points = points - helpers.minus;\n      }\n      if (points < 0) {\n        points = 0;\n      }\n      var maxPoints = areas.length;\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $componentEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $componentEl = component.$block;\n      var $areas = $componentEl.find(\".drop-area\");\n      $areas.forEach(function (el) {\n        var $el = $$(el);\n        var id = $el.data(\"id\");\n        if ($el.hasClass(\"clicked\")) {\n          $el.addClass(\"success\");\n        } else {\n          var find = _.find(component.params.content.dropableZone, function (o) {\n            return o.id == id;\n          });\n          if (find.text.length > 0) {\n            $el.html(\"<span class=\\\"text\\\">\".concat(find.text, \"</span>\"));\n          } else {\n            $el.html(\"<i class=\\\"icon material-icons\\\" data-type=\\\"material-icons\\\" data-icon=\\\"check_circle\\\"></i>\");\n          }\n          $el.addClass(\"not-clicked\");\n          $el.addClass(\"fail\");\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.less":
/*!*********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.less ***!
  \*********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _interactive_img_02_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interactive-img-02.less */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.less\");\n/* harmony import */ var _interactive_img_02_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_interactive_img_02_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"interactive-img-02\",\n  title: \"Interactive image\",\n  subtitle: \"drag and drop (text)\",\n  contentSetting: {\n    bgImage: {\n      name: \"Image\",\n      type: \"image\"\n    },\n    tolerance: {\n      name: \"Tolerance of dropped item\",\n      type: \"select\",\n      options: [{\n        title: \"Atleast 50%\",\n        value: \"intersect\"\n      }, {\n        title: \"Atleast touch\",\n        value: \"touch\"\n      }, {\n        title: \"Must be full in\",\n        value: \"fit\"\n      }]\n    },\n    showZones: {\n      name: \"Show zones after evaluation\",\n      type: \"bool\"\n    },\n    dropableZone: {\n      name: \"Interactive points\",\n      type: \"array\",\n      values: {\n        zone: {\n          name: \"Interactive point\",\n          type: \"interactive-area\",\n          ref: \"bgImage\"\n        },\n        items: {\n          name: \"items\",\n          type: \"array\",\n          values: {\n            val: {\n              name: \"Item text\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    bgImage: \"{{mediaServerDomain}}/public/3xd8qk6t4i3zw45ohgdcb6cf2uw1mq3ns3z1mb9jjtne7kciq3emwz9wca4hiux7.jpeg\",\n    tolerance: \"intersect\",\n    showZones: true,\n    dropableZone: [{\n      zone: {\n        left: 36,\n        top: 17.4,\n        width: 7.6,\n        height: 16.2\n      },\n      items: [{\n        val: \"kokos\"\n      }, {\n        val: \"palma\"\n      }, {\n        val: \"strom\"\n      }]\n    }]\n  },\n  helpers: {\n    correct: [],\n    elems: [],\n    shuffledItems: [],\n    reset: false\n  },\n  html: function html(content, builder, styles, component) {\n    var allDragElement = [];\n    var helpers = component.params.helpers;\n    content.dropableZone.forEach(function (dropZone) {\n      allDragElement.push.apply(allDragElement, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(dropZone.items));\n    });\n    helpers.elems = allDragElement;\n    var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_3__[\"getParentForm\"])(component);\n    var parentContent = null;\n    if (parentForm) {\n      parentContent = parentForm.params.content;\n    }\n    var changed = false;\n    if (parentContent) {\n      var diff = _.differenceBy(helpers.shuffledItems, helpers.elems, \"name\");\n      if (diff.length > 0 || helpers.shuffledItems.length == 0) {\n        changed = true;\n      }\n      if (helpers.reset || changed) {\n        helpers.shuffledItems = [];\n        helpers.shuffledItems = _.shuffle(helpers.elems);\n        helpers.reset = false;\n      }\n    } else {\n      helpers.shuffledItems = helpers.elems;\n    }\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n   <div class=\\\"drop-container swiper-no-swiping\\\">\\n      <div class=\\\"img-container\\\">\\n        <img src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.dropableZone.map(function (data) {\n      return \"\\n                <div class=\\\"drop-area\\\" data-id=\\\"\".concat(data.id, \"\\\" style=\\\"position: absolute; width: \").concat(data.zone.width, \"%; height: \").concat(data.zone.height, \"%; top: \").concat(data.zone.top, \"%; left: \").concat(data.zone.left, \"%;\\\"></div>\\n          \");\n    }).join(\"\"), \"\\n      </div>\\n      <div class=\\\"default-container\\\">\\n      \").concat(helpers.shuffledItems.map(function (data) {\n      return \"\\n            <span href=\\\"#\\\" class=\\\"drag-item\\\" data-id=\\\"\".concat(data.id, \"\\\">\").concat(data.val, \"</span>\\n              \");\n    }).join(\"\"), \"\\n      </div>\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init($componentEl, component) {\n      var content = component.params.content;\n      var helpers = component.params.helpers;\n      var $areas = $componentEl.find(\".drop-area\");\n      var $items = $componentEl.find(\".drag-item\");\n      var $container = $componentEl.find(\".drop-container\");\n      helpers.correct = [];\n      $($items).draggable({\n        containment: $container,\n        scroll: false\n      });\n      $($areas).droppable({\n        tolerance: component.params.content.tolerance,\n        drop: function drop(event, ui) {\n          var areaEl = event.target;\n          var droppableEl = $$(ui.draggable[0]);\n          var areaId = $$(areaEl).data(\"id\");\n          if (!droppableEl.hasClass(\"drag-item\")) {\n            droppableEl = droppableEl.parents(\".drag-item\");\n          }\n          var droppableId = $$(droppableEl).data(\"id\");\n          var zoneFind = _.find(content.dropableZone, function (o) {\n            return o.id == areaId;\n          });\n          if (zoneFind) {\n            var find = _.find(zoneFind.items, function (o) {\n              return o.id == droppableId;\n            });\n            if (find && !helpers.correct.includes(find.id)) {\n              helpers.correct.push(find.id);\n            }\n          }\n          //console.log(\"drop\", helpers.correct);\n        },\n        out: function out(event, ui) {\n          var droppableEl = $$(ui.draggable[0]);\n          var droppableId = $$(droppableEl).data(\"id\");\n          _.remove(helpers.correct, function (id) {\n            return id == droppableId;\n          });\n          // debugger;\n          //console.log(\"out\", helpers.correct);\n        }\n      });\n      component.app.data.myEvents.on(\"form:reset\", function (e) {\n        component.params.helpers.reset = true;\n        component.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    eval: function _eval(component, formComponent) {\n      var $componentEl = component.$block;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var points = 0;\n      var maxPoints = 0;\n      component.params.helpers.shuffledItems.forEach(function (item) {\n        // debugger;\n        if (!item.pointValue) {\n          item.pointValue = 1;\n        }\n        if (component.params.helpers.correct.includes(item.id)) {\n          points += parseFloat(item.pointValue);\n        }\n        maxPoints += parseFloat(item.pointValue);\n      });\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $componentEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $compnenetEl = component.$block;\n      var $areas = $compnenetEl.find(\".drop-area\");\n      var allAreas = [];\n      $areas.forEach(function (area, index) {\n        var $el = $$(area);\n        var id = $el.data(\"id\");\n        allAreas.push({\n          index: index + 1,\n          id: id\n        });\n        if (component.params.content.showZones) {\n          $el.html(\"<span class=\\\"solution-id\\\">\".concat(index + 1, \"</span>\"));\n          $el.addClass(\"solution\");\n        }\n      });\n      var dragable = $compnenetEl.find(\".drag-item\");\n      dragable.forEach(function (item, index) {\n        var $el = $$(item);\n        var id = $el.data(\"id\");\n        component.params.content.dropableZone.forEach(function (zone) {\n          var find = _.find(zone.items, function (o) {\n            return o.id == id;\n          });\n          if (find && (!find.pointValue || find.pointValue > 0)) {\n            $el.addClass(\"fail\");\n            var areaIndex = _.find(allAreas, function (o) {\n              return o.id == zone.id;\n            });\n            areaIndex = areaIndex.index;\n            if (component.params.helpers.correct.includes(id)) {\n              $el.addClass(\"success\");\n              $el.removeClass(\"fail\");\n            }\n            app.tooltip.create({\n              targetEl: $el,\n              text: areaIndex\n            });\n          }\n        });\n\n        // $el.append(`<span class=\"solution-id\">${index + 1}</span>`);\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.less":
/*!*********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.less ***!
  \*********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _interactive_img_03_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interactive-img-03.less */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.less\");\n/* harmony import */ var _interactive_img_03_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_interactive_img_03_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _interactive_img_02__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interactive-img-02 */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js\");\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n// import _ from \"lodash\";\n\nvar interactiveImg03 = _.cloneDeep(_interactive_img_02__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\ninteractiveImg03.name = \"interactive-img-03\";\ninteractiveImg03.subtitle = \"drag multiple images to one zone\";\ninteractiveImg03.contentSetting = {\n  bgImage: _objectSpread({}, _interactive_img_02__WEBPACK_IMPORTED_MODULE_3__[\"default\"].contentSetting.bgImage),\n  tolerance: _objectSpread({}, interactiveImg03.contentSetting.tolerance),\n  autoSize: {\n    name: \"Keep proportion to original size\",\n    help: \"If checked, dragable items will resize automatically to keep original proportions\",\n    type: \"bool\"\n  },\n  showZones: _objectSpread({}, interactiveImg03.contentSetting.showZones),\n  dropableZone: _objectSpread({}, interactiveImg03.contentSetting.dropableZone)\n};\ninteractiveImg03.contentSetting.dropableZone.values.items.values[\"val\"] = {\n  name: \"Item image\",\n  type: \"image\"\n};\ninteractiveImg03.contentSetting.dropableZone.values.items.values[\"pointValue\"] = {\n  name: \"Number of points for drop into area\",\n  type: \"input-number\"\n};\ninteractiveImg03.contentSetting.dropableZone.values.items.values[\"manualSize\"] = {\n  name: \"Set size of image maualy?\",\n  help: \"If set to false, then image will adjust to container size\",\n  type: \"bool\"\n};\ninteractiveImg03.contentSetting.dropableZone.values.items.values.manualSize[\"hidden\"] = {};\ninteractiveImg03.contentSetting.dropableZone.values.items.values.manualSize.hidden[\"width\"] = {\n  name: \"Width (px)\",\n  type: \"input-number\"\n};\n// interactiveImg03.contentSetting.dropableZone.values.items.values.manualSize.hidden[\n//   \"height\"\n// ] = {\n//   name: \"height (px)\",\n//   type: \"input-number\",\n// };\ninteractiveImg03.content = {\n  bgImage: \"{{mediaServerDomain}}/public/3xd8qk6t4i3zw45ohgdcb6cf2uw1mq3ns3z1mb9jjtne7kciq3emwz9wca4hiux7.jpeg\",\n  showZones: true,\n  autoSize: true,\n  dropableZone: [{\n    zone: {\n      left: 36,\n      top: 17.4,\n      width: 7.6,\n      height: 16.2\n    },\n    items: [{\n      val: \"{{mediaServerDomain}}/public/w0twe1jnww2l5cgbushdasea9hz08smou93mu0gb7ffswwkoireu3igkh9qe8q5n.png\",\n      manualSize: false,\n      pointValue: 1,\n      width: 150,\n      height: 150\n    }]\n  }],\n  tolerance: \"intersect\"\n};\ninteractiveImg03.helpers = {\n  correct: [],\n  elems: [],\n  shuffledItems: [],\n  reset: false\n};\ninteractiveImg03.html = function (content, builder, styles, component) {\n  var allDragElement = [];\n  var helpers = component.params.helpers;\n  var dropableElems = [];\n  content.dropableZone.forEach(function (dropZone) {\n    allDragElement.push.apply(allDragElement, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(dropZone.items));\n    dropZone.items.forEach(function (item) {\n      var obj = {\n        img: item.val,\n        id: item.id,\n        parentId: dropZone.id,\n        width: item.width\n      };\n      dropableElems.push(obj);\n    });\n  });\n  helpers.elems = allDragElement;\n  var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_4__[\"getParentForm\"])(component);\n  var parentContent = null;\n  if (parentForm) {\n    parentContent = parentForm.params.content;\n  }\n  var changed = false;\n  if (parentContent) {\n    var diff = _.differenceBy(helpers.shuffledItems, dropableElems, \"name\");\n    if (diff.length > 0 || helpers.shuffledItems.length == 0) {\n      changed = true;\n    }\n    if (helpers.reset || changed) {\n      helpers.shuffledItems = [];\n      helpers.shuffledItems = _.shuffle(dropableElems);\n      helpers.reset = false;\n    }\n  } else {\n    helpers.shuffledItems = dropableElems;\n  }\n  return \"\\n  <span class=\\\"result-badge\\\"></span>\\n   <div class=\\\"drop-container swiper-no-swiping\\\">\\n      <div class=\\\"img-container\\\">\\n        <img class=\\\"drop-bg\\\" src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.dropableZone.map(function (data) {\n    return \"\\n                <div class=\\\"drop-area\\\" id=\\\"area-\".concat(data.id, \"\\\" data-id=\\\"\").concat(data.id, \"\\\" style=\\\"position: absolute; width: \").concat(data.zone.width, \"%; height: \").concat(data.zone.height, \"%; top: \").concat(data.zone.top, \"%; left: \").concat(data.zone.left, \"%;\\\"></div>\\n          \");\n  }).join(\"\"), \"\\n      </div>\\n      <div class=\\\"default-container\\\">\\n\\n      \").concat(helpers.shuffledItems.map(function (item) {\n    return \"\\n                  <span data-parent=\\\"\".concat(item.parentId, \"\\\" class=\\\"drag-item\\\" data-id=\\\"\").concat(item.id, \"\\\" style=\\\"\").concat(content.manualSize ? \"width: \".concat(item.width, \"px; height: fit-content;\") : \"\", \"\\\"><img src=\\\"\").concat(item.img, \"\\\" class=\\\"drag-img\\\" data-id=\\\"\").concat(item.id, \"\\\"></img></span>\\n                    \");\n  }).join(\"\"), \"\\n\\n      </div>\\n   </div>\\n    \");\n};\ninteractiveImg03.on.init = function ($componentEl, component) {\n  var cont = $componentEl.find(\".drop-bg\");\n  cont.on(\"load\", function () {\n    var content = component.params.content;\n    var helpers = component.params.helpers;\n    var methods = component.params.methods;\n    var $areas = $componentEl.find(\".drop-area\");\n    var $items = $componentEl.find(\".drag-item\");\n    var $container = $componentEl.find(\".drop-container\");\n    helpers.correct = [];\n    $items.forEach(function (item, index) {\n      var id = $(item).data(\"id\");\n      var parentId = $(item).data(\"parent\");\n      var identifier = \"#area-\" + parentId;\n      var parent = $$(identifier);\n      var width = $(parent).width();\n      var contentItem = _.find(component.params.helpers.shuffledItems, function (o) {\n        return o.id == id;\n      });\n      if (contentItem.manualSize) {\n        $$(item).css({\n          width: contentItem.width + \"px\",\n          height: \"fit-content\"\n        });\n      } else if (content.autoSize) {\n        var $itemEl = $componentEl.find(\"img[data-id='\".concat(contentItem.id, \"']\"));\n\n        //Pokud je obrázek již načtený přepočti šířku\n        if ($itemEl[0].complete && $itemEl[0].naturalHeight !== 0) {\n          var propW = methods.calcProportion($itemEl[0]);\n          $$(item).css({\n            width: propW + \"%\",\n            height: \"fit-content\"\n          });\n        } else {\n          //pokud ne počkej na načtení a přepočítej šířku\n          $itemEl.on(\"load\", function (o) {\n            var propW = methods.calcProportion($itemEl[0]);\n            $$(item).css({\n              width: propW + \"%\",\n              height: \"fit-content\"\n            });\n          });\n        }\n      } else {\n        $$(item).css({\n          width: width + \"px\",\n          height: \"auto\"\n        });\n      }\n    });\n    $($items).draggable({\n      containment: $container,\n      scroll: false\n    });\n    $($areas).droppable({\n      tolerance: component.params.content.tolerance,\n      drop: function drop(event, ui) {\n        var areaEl = event.target;\n        // let droppableEl = event.originalEvent.target;\n        var droppableEl = ui.draggable[0];\n        var areaId = $$(areaEl).data(\"id\");\n        var droppableId = $$(droppableEl).data(\"id\");\n        var zoneFind = _.find(content.dropableZone, function (o) {\n          return o.id == areaId;\n        });\n        if (zoneFind) {\n          var find = _.find(zoneFind.items, function (o) {\n            return o.id == droppableId;\n          });\n          if (find && !helpers.correct.includes(find.id)) {\n            helpers.correct.push(find.id);\n          }\n        }\n\n        //console.log(\"drop\", helpers.correct);\n      },\n      out: function out(event, ui) {\n        // let droppableEl = event.originalEvent.target;\n        var droppableEl = ui.draggable[0];\n        // debugger;\n        var droppableId = $$(droppableEl).data(\"id\");\n        _.remove(helpers.correct, function (id) {\n          return id == droppableId;\n        });\n\n        // //console.log(\"out\", helpers.correct);\n      }\n    });\n  });\n  component.app.data.myEvents.on(\"form:reset\", function (e) {\n    component.params.helpers = {\n      correct: [],\n      elems: [],\n      shuffledItems: [],\n      reset: false\n    };\n    component.app.data.myEvents.off(\"form:reset\");\n  });\n};\ninteractiveImg03.methods.calcProportion = function (itemElement) {\n  var $el = this.$block;\n  var $contEl = $el.find(\".img-container > img\")[0];\n  var originalContW = $contEl.naturalWidth;\n  var contW = $contEl.width;\n  var originalItemW = itemElement.naturalWidth;\n  var itemW = originalItemW * contW / originalContW;\n  return itemW * 100 / contW;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (interactiveImg03);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.less":
/*!*********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.less ***!
  \*********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js":
/*!*******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _interactive_img_04_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interactive-img-04.less */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.less\");\n/* harmony import */ var _interactive_img_04_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interactive_img_04_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _interactive_img_02__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interactive-img-02 */ \"./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-02.js\");\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\nvar interactiveImg04 = _.cloneDeep(_interactive_img_02__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\ninteractiveImg04.name = \"interactive-img-04\";\ninteractiveImg04.subtitle = \"drag one image to multiple zones\";\ninteractiveImg04.contentSetting[\"dropableZone\"] = {\n  name: \"Interactive points\",\n  type: \"array\",\n  values: {\n    zone: {\n      name: \"Interactive Area\",\n      type: \"interactive-area\",\n      ref: \"bgImage\"\n    },\n    zoneId: {\n      name: \"Zone ID\",\n      type: \"textarea\"\n    }\n  }\n};\ninteractiveImg04.contentSetting[\"items\"] = {\n  name: \"Items to drag\",\n  type: \"array\",\n  values: {\n    val: {\n      name: \"Item image\",\n      type: \"image\"\n    },\n    width: {\n      name: \"width (px)\",\n      type: \"input-number\"\n    },\n    height: {\n      name: \"height (px)\",\n      type: \"input-number\"\n    },\n    dropParams: {\n      name: \"Drop parameters\",\n      type: \"array\",\n      values: {\n        dropId: {\n          name: \"Id of dropableZone\",\n          type: \"textarea\"\n        },\n        dropPoints: {\n          name: \"Points for drop\",\n          type: \"input-number\"\n        },\n        dropText: {\n          name: \"Drop text after evaluation\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  }\n};\ninteractiveImg04.content = {\n  bgImage: \"{{mediaServerDomain}}/public/3xd8qk6t4i3zw45ohgdcb6cf2uw1mq3ns3z1mb9jjtne7kciq3emwz9wca4hiux7.jpeg\",\n  showZones: true,\n  tolerance: \"intersect\",\n  dropableZone: [{\n    zone: {\n      left: 27.61904761904762,\n      top: 6.095238095238095,\n      width: 24.107142857142858,\n      height: 41.590603174603174\n    },\n    zoneId: \"1\"\n  }, {\n    zone: {\n      left: 55.23809523809524,\n      top: 0,\n      width: 44.16126984126984,\n      height: 98.98819047619047\n    },\n    zoneId: \"2\"\n  }],\n  items: [{\n    val: \"{{mediaServerDomain}}/public/w0twe1jnww2l5cgbushdasea9hz08smou93mu0gb7ffswwkoireu3igkh9qe8q5n.png\",\n    manualSize: false,\n    width: \"100\",\n    height: \"50\",\n    dropParams: [{\n      dropId: \"1\",\n      dropPoints: 1,\n      dropText: \"Ano, kokos patří na palmu!\"\n    }, {\n      dropId: \"2\",\n      dropPoints: \"0\",\n      dropText: \"Ne, sem kokos nepatří.\"\n    }]\n  }, {\n    val: \"{{mediaServerDomain}}/public/gu2i910g0vq39e4vmr055nkk1nldmgizfle9l6qq2e94eqacaym1wx7jweite77g.png\",\n    manualSize: false,\n    width: \"100\",\n    height: \"50\",\n    dropParams: [{\n      dropId: \"1\",\n      dropPoints: \"0\",\n      dropText: \"Ne, smajlík na strom nepatří.\"\n    }, {\n      dropId: \"2\",\n      dropPoints: \"1\",\n      dropText: \"Ano, smajlík patří sem.\"\n    }]\n  }]\n};\ninteractiveImg04.html = function (content, builder, styles, component) {\n  // let allDragElement = [];\n\n  // content.dropableZone.forEach((dropZone) => {\n  //   allDragElement.push(...dropZone.items);\n  // });\n  // component.params.helpers.elems = allDragElement;\n\n  return \"\\n  <span class=\\\"result-badge\\\"></span>\\n   <div class=\\\"drop-container swiper-no-swiping\\\">\\n      <div class=\\\"img-container\\\">\\n        <img class=\\\"drop-bg\\\" src=\\\"\".concat(content.bgImage, \"\\\" />\\n        \").concat(content.dropableZone.map(function (data) {\n    return \"\\n                <div class=\\\"drop-area\\\" id=\\\"area-\".concat(data.zoneId, \"\\\" data-id=\\\"\").concat(data.zoneId, \"\\\" style=\\\"position: absolute; width: \").concat(data.zone.width, \"%; height: \").concat(data.zone.height, \"%; top: \").concat(data.zone.top, \"%; left: \").concat(data.zone.left, \"%;\\\"></div>\\n          \");\n  }).join(\"\"), \"\\n      </div>\\n      <div class=\\\"default-container\\\">\\n\\n      \").concat(content.items.map(function (data) {\n    return \"\\n          <span style=\\\"width: \".concat(data.width, \"px; height: \").concat(data.height, \"px;\\\" class=\\\"drag-item\\\" data-id=\\\"\").concat(data.id, \"\\\"><img src=\\\"\").concat(data.val, \"\\\" class=\\\"drag-img\\\" data-id=\\\"\").concat(data.id, \"\\\"></img></span>\\n        \");\n  }).join(\"\"), \"\\n      </div>\\n\\n      <div class=\\\"res-container\\\">\\n      </div>\\n\\n   </div>\\n    \");\n};\ninteractiveImg04.on.init = function ($componentEl, component) {\n  var cont = $componentEl.find(\".drop-bg\");\n  cont.on(\"load\", function () {\n    var content = component.params.content;\n    var helpers = component.params.helpers;\n    var $areas = $componentEl.find(\".drop-area\");\n    var $items = $componentEl.find(\".drag-item\");\n    var $container = $componentEl.find(\".drop-container\");\n    var $resContainer = $componentEl.find(\".res-container\");\n    helpers.correct = [];\n    $resContainer.empty();\n    $($items).draggable({\n      containment: $container,\n      scroll: false\n    });\n    $($areas).droppable({\n      tolerance: component.params.content.tolerance,\n      drop: function drop(event, ui) {\n        var areaEl = event.target;\n        var droppableEl = event.originalEvent.target;\n        var areaId = $$(areaEl).data(\"id\");\n        var droppableId = $$(droppableEl).data(\"id\");\n        var zoneFind = _.find(content.dropableZone, function (o) {\n          return o.zoneId == areaId;\n        });\n        if (zoneFind) {\n          var controlObj = {\n            id: droppableId,\n            zone: areaId\n          };\n          var _find = _.find(helpers.correct, function (o) {\n            return o.id == droppableId && o.zone == areaId;\n          });\n          if (!_find) {\n            helpers.correct.push(controlObj);\n          }\n        }\n        //console.log(\"drop\", helpers.correct);\n      },\n      out: function out(event, ui) {\n        var droppableEl = event.originalEvent.target;\n        var droppableId = $$(droppableEl).data(\"id\");\n        _.remove(helpers.correct, function (o) {\n          return o.id == droppableId;\n        });\n\n        //console.log(\"out\", helpers.correct);\n      }\n    });\n  });\n};\ninteractiveImg04.methods = {\n  eval: function _eval(component, formComponent) {\n    var $componentEl = component.$block;\n    var formComponentParams = formComponent.params;\n    var showResult = formComponentParams.content.showResult;\n    var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n    var helpers = component.params.helpers;\n    var content = component.params.content;\n    var points = 0;\n    var maxPoints = 0;\n    content.items.forEach(function (item) {\n      if (!item.deleted) {\n        var maxP = _.maxBy(item.dropParams, function (o) {\n          return o.dropPoints;\n        });\n        // debugger;\n        maxPoints += parseFloat(maxP.dropPoints);\n      }\n    });\n    helpers.correct.forEach(function (item) {\n      var contItem = _.find(content.items, function (o) {\n        return o.id == item.id && !o.deleted;\n      });\n      var findZone = _.find(contItem.dropParams, function (o) {\n        return o.dropId == item.zone && !o.deleted;\n      });\n      if (find) {\n        points += parseFloat(findZone.dropPoints);\n      }\n    });\n    points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(points);\n    maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(maxPoints);\n    if (showResult) {\n      var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n      var $resultBadge = $componentEl.find(\".result-badge\");\n      $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n      if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n      if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n      $resultBadge.addClass(classResult);\n      $resultBadge.css(\"display\", \"block\");\n    }\n    if (showCorrectAnswers) {\n      this.params.methods.solution(component);\n    }\n    return {\n      points: points,\n      totalPoints: maxPoints\n    };\n  },\n  solution: function solution(component) {\n    var app = component.app;\n    var helpers = component.params.helpers;\n    var content = component.params.content;\n    var $componentEl = component.$block;\n    var $resContainer = $componentEl.find(\".res-container\");\n    if (content.showZones) {\n      var $areas = $componentEl.find(\".drop-area\");\n      $areas.forEach(function (area) {\n        $$(area).addClass(\"solution\");\n      });\n    }\n    var resultArr = [];\n    $resContainer.empty();\n    helpers.correct.forEach(function (item) {\n      var elem = _.find(content.items, function (o) {\n        return item.id == o.id && !o.deleted;\n      });\n      var resZone = _.find(elem.dropParams, function (o) {\n        return o.dropId == item.zone;\n      });\n      resultArr.push({\n        image: app.apiManager.replaceMediaServerPlaceholder(elem.val),\n        text: resZone.dropText\n      });\n    });\n    var resEl = \"\";\n    resultArr.forEach(function (res) {\n      resEl += \"<div class=\\\"res-item\\\"><span class=\\\"res-img\\\"><img src=\\\"\".concat(res.image, \"\\\"/></span><span class=\\\"res-text\\\">\").concat(res.text, \"</span></div>\");\n    });\n    $resContainer.append(resEl);\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (interactiveImg04);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.less":
/*!*********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.less ***!
  \*********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/interactive-images/interactive-img-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards.less":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards.less ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/match-cards/match-cards.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/pexeso/pexeso-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/puzzle/puzzle-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.less":
/*!**********************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.less ***!
  \**********************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js":
/*!************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js ***!
  \************************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _chm_img_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chm-img-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.less\");\n/* harmony import */ var _chm_img_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_chm_img_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _helpers_resultText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_helpers/resultText */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/resultText.js\");\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\nvar o = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"chm-img-01\",\n  title: \"Checkbox\",\n  subtitle: \"with images\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    negativePoints: {\n      name: \"Possibility to get negative points?\",\n      type: \"bool\"\n    },\n    shuffle: {\n      name: \"Automatically shufle answers?\",\n      type: \"bool\"\n    },\n    checkboxes: {\n      name: \"Values of checkboxes\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Image\",\n          type: \"image\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"A question with one or <b>more correct answers</b>. Choose the flags of EU states.\",\n    negativePoints: false,\n    checkboxes: [{\n      path: \"{{mediaServerDomain}}/public/omdgtg7sfh3p3yphj4iuzs9ngl57dv87qnokwgw79wq4kn2y6ktj24cuwbc6qj41.jpg\",\n      value: \"1\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/4n08nm7iq5s0d35fsjwka4rjmpjo2ydk2x9o0vnibgr406by54ofwe8jw7qe63gk.jpg\",\n      value: \"-1\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/og7980m5aemiaww2mqboyyn5f4956gk95kny9mqb6g3c8y56c3o55a1kq0dxyj9h.jpg\",\n      value: \"-1\",\n      userCheck: true\n    }, {\n      path: \"{{mediaServerDomain}}/public/shh38uvlqxbaua1s5p1si4val0p7pi2hhqw1973ah7hisz4hawfncibrm2x1hiw0.jpg\",\n      value: \"1\"\n    }],\n    shuffle: false\n  },\n  userContent: {\n    data: {}\n  },\n  helpVariables: {\n    resText: \"\",\n    shuffledCheckboxes: [],\n    reset: false\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpVariables = component.params.helpVariables;\n    var changed = false;\n    if (content.shuffle) {\n      var diff = _.differenceBy(helpVariables.shuffledCheckboxes, content.checkboxes, \"id\");\n      if (diff.length > 0 || component.params.helpVariables.shuffledCheckboxes.length == 0) {\n        changed = true;\n      }\n      if (helpVariables.reset || changed) {\n        helpVariables.shuffledCheckboxes = [];\n        helpVariables.shuffledCheckboxes = _.shuffle(content.checkboxes);\n        helpVariables.reset = false;\n      }\n    } else {\n      helpVariables.shuffledCheckboxes = content.checkboxes;\n    }\n    return \"\\n\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"list\\\">\\n  <div class=\\\"row\\\">\\n\\n  \").concat(helpVariables.shuffledCheckboxes.map(function (data) {\n      return \"\\n\\n    <div class=\\\"col-100 medium-50\\\">\\n    <label class=\\\"item-checkbox item-content\\\">\\n    <input type=\\\"checkbox\\\" id=\\\"\".concat(data.id, \"\\\" name=\\\"demo-checkbox\\\" \").concat(userContent.data[data.id] ? \"checked\" : \"\", \"/>\\n      <div class=\\\"item-inner\\\">\\n        <div class=\\\"img-container\\\"> <img data-id=\\\"\").concat(data.id, \"\\\" src=\\\"\").concat(data.path, \"\\\"></div>\\n      </div>\\n    </label>\\n  </div>\\n\\n          \");\n    }).join(\"\"), \"\\n\\n\\n  </div>\\n</div>\\n\").concat(helpVariables.resText, \"\\n       \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var checkBox = $builderEl.find(\"input[type='checkbox']\");\n      checkBox.off(\"change\");\n      checkBox.on(\"change\", function () {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(checkBox, $builderEl, builder);\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpVariables.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(elems, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var isAnswered = false;\n      elems.forEach(function (el) {\n        var check = el.checked;\n        if (check) {\n          isAnswered = true;\n        }\n      });\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: isAnswered\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find('input[type=\"checkbox\"]').each(function () {\n        var val = $$(this).is(\":checked\");\n        var id = $$(this).attr(\"id\");\n        if (val) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\"input\");\n      var points = 0;\n      var maxPoints = 0;\n      $input.forEach(function (element) {\n        $$(element).removeClass(\"success\");\n        $$(element).removeClass(\"fail\");\n        var id = $$(element).siblings(\"div\").find(\"img\").data(\"id\");\n        // if(id == '9b94-e5b2-22e2'){\n        //   debugger\n        // }\n        var res = _.find(component.params.content.checkboxes, function (o) {\n          return o.id == id;\n        });\n        if (element.checked) {\n          var value = parseFloat(res.value);\n          points += value;\n          if (showResult) {\n            if (value > 0) {\n              $$(element).addClass(\"success\");\n            } else {\n              $$(element).addClass(\"fail\");\n            }\n          }\n        }\n        // if (showCorrectAnswers) {\n        //   if (res.value > 0) {\n        //     if (\n        //       !$$(element).hasClass(\"success\") &&\n        //       !$$(element).hasClass(\"showResult\")\n        //     ) {\n        //       $$(element).addClass(\"showResult\");\n        //     }\n        //   }\n        // }\n      });\n      component.params.content.checkboxes.forEach(function (element) {\n        if (element.value > 0 && !element.deleted) {\n          maxPoints += parseFloat(element.value);\n        }\n      });\n      if (!component.params.content.negativePoints) {\n        if (points < 0) {\n          points = 0;\n        }\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      this.params.helpVariables.resText = this.params.methods.resultText(points);\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $input = $builderEl.find(\"input\");\n      $input.forEach(function (element) {\n        var id = $$(element).siblings(\"div\").find(\"img\").data(\"id\");\n        var res = _.find(component.params.content.checkboxes, function (o) {\n          return o.id == id;\n        });\n        if (res.value > 0) {\n          var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n          var parent = $$(element).next(\".item-inner\").find(\".img-container\");\n          $$(parent).append(answerIcon);\n          var target = $$(parent).find(\".solution\");\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: res.value + \"b\"\n          });\n          if (element.checked) {\n            $(target).addClass(\"selected\");\n          }\n        }\n      });\n    }\n  }\n};\nvar x = _.merge({}, o, _helpers_resultText__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (x);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.less":
/*!**************************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.less ***!
  \**************************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/checkbox-multiple/chm-img-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js ***!
  \************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _rad_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rad-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.less\");\n/* harmony import */ var _rad_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rad_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _helpers_getParentForm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_helpers/getParentForm */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/getParentForm.js\");\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"rad-01\",\n  title: \"Radiolist\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    },\n    checkboxes: {\n      name: \"Radiobutton values\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Text\",\n          type: \"textEditor\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    },\n    showResultText: {\n      name: \"Show text after evaluation?\",\n      type: \"bool\",\n      hidden: {\n        resultTexts: {\n          name: \"Text after evaluation\",\n          type: \"array\",\n          values: {\n            pointsFrom: {\n              name: \"If result value is less or equal then:\",\n              type: \"input-number\"\n            },\n            pointsTo: {\n              name: \"If result value is greater or equal then:\",\n              type: \"input-number\"\n            },\n            text: {\n              name: \"Text to display\",\n              type: \"textEditor\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"A question with <b>one correct answer</b>\",\n    checkboxes: [{\n      label: \"Truth\",\n      value: \"1\"\n    }, {\n      label: \"Lie\",\n      value: \"0\"\n    }, {\n      label: \"Lie\",\n      value: \"0\"\n    }],\n    resultTexts: [{\n      pointsFrom: \"0\",\n      pointsTo: \"1\",\n      text: \"Information\"\n    }]\n  },\n  helpVariables: {\n    resText: \"\",\n    shuffledCheckboxes: [],\n    reset: false\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpVariables = component.params.helpVariables;\n    var parentForm = Object(_helpers_getParentForm__WEBPACK_IMPORTED_MODULE_1__[\"getParentForm\"])(component);\n    var parentContent = null;\n    if (parentForm) {\n      parentContent = parentForm.params.content;\n    }\n    var changed = false;\n    if (parentContent && parentContent.shuffleAnswers) {\n      var diff = _.differenceBy(component.params.helpVariables.shuffledCheckboxes, content.checkboxes, \"label\");\n      if (diff.length > 0 || component.params.helpVariables.shuffledCheckboxes.length == 0) {\n        changed = true;\n      }\n      if (helpVariables.reset || changed) {\n        helpVariables.shuffledCheckboxes = [];\n        helpVariables.shuffledCheckboxes = _.shuffle(content.checkboxes);\n        helpVariables.reset = false;\n      }\n    } else {\n      helpVariables.shuffledCheckboxes = content.checkboxes;\n    }\n    return \"\\n\\n\\n<span class=\\\"result-badge\\\"></span>\\n<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n<div class=\\\"list\\\">\\n  <ul class=\\\"answers\\\">\\n\\n\\n    \").concat(helpVariables.shuffledCheckboxes.map(function (data) {\n      return \"\\n\\n\\n    <li>\\n      <label class=\\\"item-radio item-content\\\">\\n        <input type=\\\"radio\\\" name=\\\"\".concat(builder.id, \"\\\" id=\\\"\").concat(data.id, \"\\\"  \").concat(userContent.data[data.id] ? \"checked\" : \"\", \" />\\n        <i class=\\\"icon icon-radio\\\"></i>\\n        <div class=\\\"item-inner\\\">\\n          <div class=\\\"item-title\\\">\").concat(data.label, \"</div>\\n        </div>\\n      </label>\\n    </li>\\n\\n          \");\n    }).join(\"\"), \"\\n  </ul>\\n</div>\\n\").concat(helpVariables.resText, \"\\n\\n\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      $builderEl.find(\".accordion-item\").on(\"accordion:closed\", function (e) {\n        builder.app.dialog.alert(\"Accordion item closed\");\n      });\n      var radioBtns = $builderEl.find(\"input[type='radio']\");\n      radioBtns.off(\"change\");\n      radioBtns.on(\"change\", function (e) {\n        builder.params.methods.getUserData();\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n      builder.app.data.myEvents.on(\"form:reset\", function (e) {\n        builder.params.helpVariables.reset = true;\n        builder.app.data.myEvents.off(\"form:reset\");\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find('input[type=\"radio\"]').each(function (index) {\n        var val = $$(this).is(\":checked\");\n        var id = $$(this).attr(\"id\");\n        if (val) {\n          ud[id] = val;\n        }\n        // checkboxes.push(ud);\n      });\n\n      // let obj = {};\n\n      // checkboxes[component.params.id] = ud;\n      component.params.userContent.data = ud;\n\n      // return { checkboxes: checkboxes };\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var $input = $builderEl.find(\"input\");\n      var points = 0;\n      var fchb = _.filter(component.params.content.checkboxes, function (o) {\n        return o.deleted !== true;\n      });\n      var maxPoints = _.maxBy(fchb, function (o) {\n        return parseFloat(o.value);\n      });\n      maxPoints = maxPoints.value;\n      $input.forEach(function (el) {\n        var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n        if (el.checked) {\n          var id = $$(el).attr(\"id\");\n          // let elem = fchb[i];\n\n          var elem = _.find(fchb, function (o) {\n            return o.id == id;\n          });\n          if (!elem.deleted) {\n            points = parseFloat(elem.value);\n          }\n        }\n        i++;\n      });\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      this.params.helpVariables.resText = this.params.methods.resultText(points);\n      this.reload();\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var array = component.params.content.checkboxes;\n      var $input = $builderEl.find(\".item-radio\");\n      $input.forEach(function (element, i) {\n        var value = $$(element).find(\".item-title\");\n        var check = $$(element).find(\"input\");\n        var id = $$(check).attr(\"id\");\n        var res = _.find(array, function (o) {\n          return o.id == id;\n        });\n        if (res != undefined) {\n          if (parseFloat(res.value) > 0) {\n            var correct = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n            $$(correct).insertAfter($(value));\n            var target = $$(value).next(\".solution\");\n            if (check[0].checked) {\n              $$(target).addClass(\"selected\");\n            }\n            app.tooltip.create({\n              targetEl: $$(target),\n              text: res.value + \"b\"\n            });\n          }\n        }\n      });\n    },\n    resultText: function resultText(userPoints) {\n      var content = this.params.content;\n      var helpVariables = this.params.helpVariables;\n      var resText = \"\";\n      if (content.showResultText) {\n        for (var i = 0; i < content.resultTexts.length; i++) {\n          if (parseFloat(userPoints) >= parseFloat(content.resultTexts[i].pointsFrom) && parseFloat(userPoints) <= parseFloat(content.resultTexts[i].pointsTo)) {\n            resText = \"<div class=\\\"important-note\\\">\".concat(content.resultTexts[i].text, \"</div>\");\n            break;\n          }\n        }\n      }\n      return resText;\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.less":
/*!**************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.less ***!
  \**************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.less":
/*!******************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.less ***!
  \******************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/radiolist/rad-img-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.less":
/*!**************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.less ***!
  \**************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js":
/*!************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js ***!
  \************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _sel_03_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sel-03.less */ \"./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.less\");\n/* harmony import */ var _sel_03_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sel_03_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sel-03\",\n  title: \"Selectbox\",\n  subtitle: \"smart select with images\",\n  contentSetting: {\n    text: {\n      name: \"Question text\",\n      type: \"textEditor\"\n    },\n    placeholder: {\n      name: \"Placeholder text\",\n      type: \"textEditor\"\n    },\n    multipleAnswers: {\n      name: \"Multiple answers\",\n      help: \"Allows to select more then one option\",\n      type: \"bool\"\n    },\n    // showSearchBar: {\n    //   name: \"Show search bar\",\n    //   type: \"bool\",\n    // },\n    checkboxes: {\n      name: \"Selectbox values\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Text\",\n          type: \"textarea\"\n        },\n        useImg: {\n          name: \"Use image?\",\n          type: \"bool\",\n          hidden: {\n            image: {\n              name: \"image\",\n              type: \"image\"\n            }\n          }\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    text: \"Select <b>one correct answer</b> from the list\",\n    multipleAnswers: false,\n    placeholder: \"Select na option\",\n    // showSearchBar: false,\n    checkboxes: [{\n      label: \"Item one\",\n      value: 1,\n      useImg: true,\n      image: \"{{mediaServerDomain}}/public/j5gamn3legldmbtv8nu7fppxbd6y0fzvtz9gu2ucqd8ple2esgei2vgqxyr3bm6e.png\"\n    }, {\n      label: \"Item two\",\n      useImg: false,\n      value: 0,\n      image: \"{{mediaServerDomain}}/public/j5gamn3legldmbtv8nu7fppxbd6y0fzvtz9gu2ucqd8ple2esgei2vgqxyr3bm6e.png\"\n    }, {\n      label: \"\",\n      value: 0,\n      useImg: true,\n      image: \"{{mediaServerDomain}}/public/j5gamn3legldmbtv8nu7fppxbd6y0fzvtz9gu2ucqd8ple2esgei2vgqxyr3bm6e.png\"\n    }, {\n      label: \"Item four\",\n      useImg: false,\n      value: 0,\n      image: \"{{mediaServerDomain}}/public/j5gamn3legldmbtv8nu7fppxbd6y0fzvtz9gu2ucqd8ple2esgei2vgqxyr3bm6e.png\"\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var options = \"\";\n    var app = component.app;\n    content.checkboxes.forEach(function (item) {\n      var url = \"\";\n      if (item.hasOwnProperty(\"image\")) {\n        url = app.apiManager.replaceMediaServerPlaceholder(item.image);\n      }\n      var el = \"<option value=\\\"\".concat(item.id, \"\\\" \").concat(item.useImg ? \"data-option-image=\\\"\".concat(url, \"\\\"\") : \"\", \">\").concat(item.label, \"</option>\");\n      options += el;\n    });\n    return \"\\n\\n        <span class=\\\"result-badge\\\"></span>\\n        <div class=\\\"item-title item-label\\\">\".concat(content.text, \"</div>\\n        <a href=\\\"#\\\" class=\\\"item-link smart-select\\\" >\\n            <select name=\\\"select-\").concat(builder.id, \"\\\" \").concat(content.multipleAnswers ? \"multiple\" : \"\", \">\\n            \").concat(!content.multipleAnswers ? \"<option value=\\\"null\\\">\".concat(content.placeholder, \"</option>\") : \"\", \"\\n            \").concat(options, \"\\n            </select>\\n            <div class=\\\"item-content\\\">\\n                <div class=\\\"item-inner\\\">\\n                    <span class=\\\"item-title\\\">\").concat(content.placeholder, \"</span>\\n                </div>\\n            </div>\\n        </a>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var app = builder.app;\n      var el = $builderEl.find(\".smart-select\");\n      var titleEl = $(el).find(\".item-title\");\n      var ss = app.smartSelect.get(el);\n      if (ss) {\n        ss.destroy();\n      }\n      var select = app.smartSelect.create({\n        el: el,\n        openIn: \"popover\",\n        cssClass: \"sel-03-select\",\n        valueEl: titleEl,\n        formatValueText: builder.params.methods.formatText,\n        closeOnSelect: true\n        // searchbar: builder.params.content.showSearchBar,\n      });\n      select.off(\"change\");\n      select.on(\"change\", function (e) {\n        builder.params.methods.answerEmittor(e, $builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor(e, $builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: true\n      });\n    },\n    eval: function _eval(component, formComponent) {\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var $builderEl = component.$block;\n      var el = component.$block.find(\".smart-select\");\n      var ss = component.app.smartSelect.get(el);\n      var value = ss.getValue();\n      if (!Array.isArray(value)) {\n        value = [value];\n      }\n      var points = 0;\n      if (value != \"null\") {\n        value.forEach(function (val) {\n          var res = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(component.params.content.checkboxes, function (o) {\n            return o.id == val;\n          });\n          points += parseFloat(res.value);\n        });\n      }\n      var maxPoints = 0;\n      if (component.params.content.multipleAnswers) {\n        maxPoints = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.sumBy(component.params.content.checkboxes, function (o) {\n          if (!o.deleted) {\n            return parseFloat(o.value);\n          }\n        });\n      } else {\n        maxPoints = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(component.params.content.checkboxes, function (o) {\n          if (!o.deleted) {\n            return parseFloat(o.value);\n          }\n        }).value;\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_2__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        var correct = points == maxPoints ? true : false;\n        this.params.methods.solution(component, correct);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component, correct) {\n      var app = component.app;\n      var $builderEl = component.$block;\n      var answers = component.params.content.checkboxes;\n      var container = $builderEl.find(\".item-content\");\n      var answerIcon = '<span class=\"solution\"><i class=\"icon result-icon material-icons\" data-icon=\"check_circle\"></i></span>';\n      $$(container).append(answerIcon);\n      var target = $$(container).find(\".solution\");\n      var answerString = \"\";\n      answers.forEach(function (element, i) {\n        if (element.value > 0 && !element.deleted) {\n          answerString += element.label + \" (\" + element.value + \"b)\";\n          if (i != answers.length - 1) {\n            answerString += \", \";\n          }\n        }\n      });\n      if (correct) {\n        $$(target).addClass(\"selected\");\n      }\n      app.tooltip.create({\n        targetEl: $$(target),\n        text: answerString\n      });\n    },\n    formatText: function formatText(values) {\n      var content = this.params.content;\n      var resEl = this.$block.find(\".item-inner\");\n      var el = this.$block.find(\".smart-select\");\n      var ss = this.app.smartSelect.get(el);\n      values = ss.getValue();\n      if (!Array.isArray(values)) {\n        values = [values];\n      }\n      var app = this.app;\n      resEl.empty();\n      var obj = undefined;\n      values.forEach(function (value, index) {\n        var print = \"\";\n        obj = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(content.checkboxes, function (o) {\n          if (!o.deleted) {\n            return o.id == value;\n          }\n        });\n        if (value && obj != undefined && obj.useImg) {\n          var url = app.apiManager.replaceMediaServerPlaceholder(obj.image);\n          print += \"<img class=\\\"select-img\\\" src=\\\"\".concat(url, \"\\\" />\");\n        }\n        if (obj == null) {\n          obj = {};\n          obj.label = content.placeholder;\n        }\n        print += \"<span class=\\\"select-txt\\\">\".concat(obj.label, \"</span>\");\n        if (index != values.length - 1) {\n          print += \"<span class=\\\"divider\\\"></span>\";\n        }\n        resEl.append(print);\n      });\n      return \"\";\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.less":
/*!**************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.less ***!
  \**************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/select-answer/selectbox/sel-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js ***!
  \***************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _inp_drag_01_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./inp-drag-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.less\");\n/* harmony import */ var _inp_drag_01_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_inp_drag_01_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\n\n\n\nvar myoBj;\n/* harmony default export */ __webpack_exports__[\"default\"] = (myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"inp-drag-01\",\n  title: \"Draggin into sentences\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    diacritics: {\n      name: \"Ignore diacritics\",\n      type: \"bool\",\n      hidden: {\n        text: {\n          name: \"Text\",\n          type: \"textarea\"\n        }\n      }\n    },\n    points: {\n      name: \"Evaluate answer with points?\",\n      type: \"bool\"\n    },\n    uppercase: {\n      name: \"Ignore case sensitivity\",\n      type: \"bool\"\n    },\n    spaces: {\n      name: \"Ignore spaces?\",\n      type: \"bool\"\n    },\n    sentences: {\n      name: \"Sentences (enter text and other parameters)\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Sentence text (BEFORE field for answer)\",\n          type: \"textEditor\"\n        },\n        textAfterInput: {\n          name: \"Sentence text (AFTER field for answer)\",\n          type: \"textEditor\"\n        },\n        input: {\n          name: \"Length of field for answer\",\n          type: \"input-number\"\n        },\n        correctAnswers: {\n          name: \"Correct answers. (One or more)\",\n          type: \"array\",\n          dependOn: \"content.points\",\n          values: {\n            value: {\n              name: \"Text\",\n              type: \"textarea\"\n            },\n            point: {\n              name: \"Point value\",\n              type: \"input-number\"\n            }\n          }\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Add colors to the text <b>by dragging</b>\",\n    diacritics: true,\n    uppercase: false,\n    spaces: false,\n    text: \"ano\",\n    points: true,\n    sentences: [{\n      text: \"The fruit includes a banana, which is \",\n      textAfterInput: \". \",\n      input: 7,\n      correctAnswers: [{\n        value: \"yellow\",\n        point: 1\n      }]\n    }, {\n      text: \"Watermelon is a vegetable,  \",\n      textAfterInput: \"\",\n      input: 6,\n      correctAnswers: [{\n        value: \"green\",\n        point: 1\n      }]\n    }, {\n      text: \"on the surface and \",\n      textAfterInput: \"on the inside. \",\n      input: 4,\n      correctAnswers: [{\n        value: \"red\",\n        point: 1\n      }]\n    }]\n  },\n  helpers: {\n    flag: false,\n    rightAns: []\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var helpArr = [];\n    content.sentences.forEach(function (el) {\n      el.correctAnswers.forEach(function (o) {\n        helpArr.push(o);\n      });\n    });\n    if (_.differenceBy(helpArr, component.params.helpers.rightAns, \"value\").length > 0) {\n      component.params.helpers.flag = false;\n    }\n    if (!component.params.helpers.flag) {\n      component.params.helpers.rightAns = [];\n      // content.sentences.forEach((el) => {\n      //   el.correctAnswers.forEach((o) => {\n      //     component.params.helpers.rightAns.push(o);\n      //   });\n      // });\n\n      component.params.helpers.rightAns = helpArr;\n      component.params.helpers.rightAns = _.shuffle(component.params.helpers.rightAns);\n      component.params.helpers.flag = true;\n    }\n    return \"\\n    <div class=\\\"swiper-no-swiping\\\">\\n    <span class=\\\"result-badge\\\"></span>\\n    <div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\\n    <div class=\\\"list\\\" style=\\\"margin: 0;\\\">\\n      <ul class=\\\"sortable connectedSortable sortable-item sortable-start border ui-sortable\\\" id=\\\"dragitemContainer-0\\\">\\n      \").concat(component.params.helpers.rightAns.map(function (ans) {\n      return \" <li data-parent-id=\\\"dragitemContainer-0\\\" class=\\\"ui-sortable-handle ans\\\" data-id=\\\"\".concat(ans.id, \"\\\"><div class=\\\"item-title drag-item\\\">\").concat(ans.value, \"</div></li>\");\n    }).join(\"\"), \"\\n      </ul>\\n    </div>\\n\\n      \").concat(content.sentences.map(function (data, index) {\n      return \"\\n    <span class=\\\"inp-text\\\">\\n    \".concat(data.text, \"<span class=\\\"ce sortable connectedSortable sortable-item border position-box ui-sortable\\\" data-limit=\\\"1\\\" data-limit=\\\"1\\\" style=\\\"min-width: \").concat(data.input * 7, \"px; \").concat(!data.input || data.input === \"0\" ? \"display: none;\" : \"\", \"\\\" id=\\\"\").concat(builder.id + \"-\" + index, \"\\\"\\n\\n          data-id=\\\"\").concat(data.correctAnswers.map(function (cor) {\n        return \"\".concat(cor.id, \" \");\n      }).join(\"\"), \"\\\">\\n                </span>\\n                \").concat(data.textAfterInput, \"\\n    </span>\\n    \\n          \");\n    }).join(\"\"), \"\\n        </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var sortableContainers = $builderEl.find(\".connectedSortable\");\n      sortableContainers.each(function (i) {\n        var $dragItems = $(this).children();\n        if ($dragItems.length > 0) {\n          var dragItemId = \"dragitemContainer-\" + i;\n          $(this).attr(\"id\", dragItemId);\n          $dragItems.attr(\"data-parent-id\", dragItemId);\n        }\n        $(this).sortable({\n          connectWith: \".connectedSortable\",\n          placeholder: \"ui-state-highlight\",\n          update: function update(event, ui) {\n            builder.params.methods.answerEmittor($builderEl, builder);\n          }\n        }).disableSelection();\n      });\n      var sortables = $builderEl.find(\".sortable\");\n      // debugger;\n      sortables.forEach(function (el) {\n        $(el).sortable({\n          receive: function receive(event, ui) {\n            var target = $$(event.target)[0];\n            var sender = $$(ui.sender)[0];\n            if (target.children.length > 1 && !target.classList.value.includes(\"sortable-start\")) {\n              $(ui.sender).sortable(\"cancel\");\n            }\n            target.classList.add(\"occupied\");\n            if (sender.children.length == 0) {\n              sender.classList.remove(\"occupied\");\n            }\n          }\n        });\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var inputs = $builderEl.find(\".sortable-start .ui-sortable-handle\");\n      var res = true;\n      if (inputs.length > 0) {\n        res = false;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find(\".ce\").each(function () {\n        var val = $$(this).text();\n        var id = $$(this).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var checkAnswers = component.params.content.points;\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      if (!component.hasOwnProperty(\"$block\")) {\n        debugger;\n      }\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n      var $inputs = $builderEl.find(\".ce\");\n      $inputs.forEach(function (element, i) {\n        $$(element).removeClass(\"success\");\n        $$(element).removeClass(\"fail\");\n        if (checkAnswers) {\n          var answer = $$(element).find(\".ans\");\n          if (answer.length == 0) {\n            answer = \" \";\n          } else {\n            answer = answer.data(\"id\");\n          }\n          // let answer = $$(element).text();\n          var rightAnswers = _.filter(rightAnswersPool[i].correctAnswers, function (o) {\n            return o.point >= 1;\n          });\n          if (rightAnswers.length > 0) {\n            // let findedAnswer = _.find(rightAnswers, (o) => {\n            //   let ra = o.value;\n\n            //   ra = self.params.methods.parse(ra, uppercase, diacritic, spaces);\n            //   answer = self.params.methods.parse(\n            //     answer,\n            //     uppercase,\n            //     diacritic,\n            //     spaces\n            //   );\n\n            //   return ra == answer;\n            // });\n\n            var findedAnswer = _.find(rightAnswers, function (o) {\n              return answer.includes(o.id);\n            });\n            // debugger;\n\n            if (findedAnswer && answer != \" \") {\n              points += parseFloat(findedAnswer.point);\n              if (showResult) {\n                $$(element).addClass(\"success\");\n              }\n            } else {\n              if (showResult) {\n                $$(element).addClass(\"fail\");\n              }\n            }\n          }\n        }\n      });\n      if (checkAnswers) {\n        component.params.content.sentences.forEach(function (element) {\n          if (!element.deleted) {\n            var ca = _.filter(element.correctAnswers, function (o) {\n              return o.deleted === false;\n            });\n            var mPoints = _.maxBy(ca, function (o) {\n              return parseFloat(o.point);\n            });\n            if (mPoints) {\n              maxPoints += parseFloat(mPoints.point);\n            }\n          }\n        });\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_4__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_4__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      var $solutions = $builderEl.find(\".solution\");\n      $solutions.remove();\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    parse: function parse(word, uppercase, diacritic, spaces) {\n      if (uppercase) {\n        word = word.toUpperCase();\n      }\n      if (diacritic) {\n        word = word.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n      }\n      if (spaces) {\n        word = word.replace(/\\s+/g, \"\");\n      }\n      return word;\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\".ce\");\n      var diacritic = component.params.content.diacritics;\n      var uppercase = component.params.content.uppercase;\n      var spaces = component.params.content.spaces;\n      var rightAnswersPool = _.filter(component.params.content.sentences, function (o) {\n        return o.deleted == false;\n      });\n      $inputs.forEach(function (element, i) {\n        // debugger;\n        var rightAnswers = rightAnswersPool[i].correctAnswers;\n        var answerIcon = '<i class=\"icon result-icon solution result-icon material-icons\" data-icon=\"check_circle\"></i>';\n        var answerString = \"\";\n        var flag = false;\n        for (var _i = 0; _i < rightAnswers.length; _i++) {\n          // debugger;\n          if (!rightAnswers[_i].deleted && rightAnswers[_i].point >= 1) {\n            answerString += rightAnswers[_i].value + \" (\" + rightAnswers[_i].point + \"b)\";\n            if (_i != rightAnswers.length - 1) {\n              answerString += \", \";\n            }\n          }\n\n          // let ra = self.params.methods\n          //   .parse(rightAnswers[i].value, uppercase, diacritic, spaces)\n          //   .trim();\n          // let el = self.params.methods\n          //   .parse($$(element).text(), uppercase, diacritic, spaces)\n          //   .trim();\n\n          var el = $$(element).find(\"li\")[0];\n          var elId = $$(el).data(\"id\");\n          if (rightAnswers[_i].id == elId && rightAnswers[_i].point > 0) {\n            flag = true;\n          }\n\n          // if (ra == el) {\n          //   flag = true;\n          // }\n        }\n        if (rightAnswers.length > 0) {\n          $$(answerIcon).insertAfter($$(element));\n          var target = $$(element).next(\".solution\");\n          if (flag) {\n            $$(target).addClass(\"selected\");\n          }\n          app.tooltip.create({\n            targetEl: $$(target),\n            text: answerString\n          });\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.less":
/*!*****************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.less ***!
  \*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-drag-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.less":
/*!*******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.less ***!
  \*******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/sentences/inp-select-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.less":
/*!*************************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.less ***!
  \*************************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/sentences/sent-inp-math-range.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.less":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.less ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/table-input/table-input-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js":
/*!********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js ***!
  \********************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _table_radio_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./table-radio-01.less */ \"./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.less\");\n/* harmony import */ var _table_radio_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_table_radio_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_helpers/parsePoints */ \"./src/core/custom_plugins/builder/components/_en/forms/_helpers/parsePoints.js\");\n\n\nvar myoBj;\n/* harmony default export */ __webpack_exports__[\"default\"] = (myoBj = {\n  el: \"f\",\n  url: \"/components/\",\n  name: \"table-radio-01\",\n  title: \"Table with radiobuttons\",\n  subtitle: \"\",\n  contentSetting: {\n    label: {\n      name: \"Label\",\n      type: \"textEditor\"\n    },\n    header: {\n      name: \"Header\",\n      type: \"array\",\n      values: {\n        label: {\n          name: \"Header text\",\n          type: \"textarea\"\n        }\n      }\n    },\n    answers: {\n      name: \"Row with answer\",\n      type: \"array\",\n      values: {\n        text: {\n          name: \"Row text\",\n          type: \"textEditor\"\n        },\n        rightAnswers: {\n          name: \"Right column position\",\n          type: \"input-number\"\n        },\n        value: {\n          name: \"Point value\",\n          type: \"input-number\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"<b>Click a table cell</b> to assign correct color.\",\n    header: [{\n      label: \" \"\n    }, {\n      label: \"Green\"\n    }, {\n      label: \"Red\"\n    }, {\n      label: \"Yellow\"\n    }],\n    answers: [{\n      text: \"Banana\",\n      value: 1,\n      rightAnswers: 3\n    }, {\n      text: \"Strawberry\",\n      value: 1,\n      rightAnswers: 2\n    }, {\n      text: \"Cucumber\",\n      value: 1,\n      rightAnswers: 1\n    }]\n  },\n  userContent: {\n    data: {}\n  },\n  html: function html(content, builder, styles, component, userContent) {\n    var headerCount = content.header.length;\n    var answersCount = content.answers.length;\n\n    ////console.log('content-answers1', content.answers);\n\n    var imputArr = [];\n    for (var i = 0; i < answersCount; i++) {\n      var inputs = \"\";\n      for (var index = 1; index < headerCount; index++) {\n        inputs += \"<td> <label class=\\\"item-radio item-content\\\"><input type=\\\"radio\\\" class=\\\"choice\\\" name=\\\"\".concat(builder.id, \"-\").concat(i, \"\\\" data-id=\\\"\").concat(index, \"\\\"/><span class=\\\"check\\\"></span></label></td>\");\n      }\n      imputArr.push(inputs);\n    }\n    return \"\\n    <span class=\\\"result-badge\\\"></span>\\n    \".concat(content.label.length > 0 ? \"<div class=\\\"item-title item-label\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n    <div class=\\\"table-container swiper-no-swiping\\\">\\n    <table >\\n    <tbody>\\n    <tr class=\\\"thead\\\">\\n    \").concat(content.header.map(function (data, index) {\n      return \"\\n          <td>\\n          \".concat(data.label, \"\\n          </td>\\n        \");\n    }).join(\"\"), \"\\n      </tr>\\n      \").concat(content.answers.map(function (data, index) {\n      return \"\\n            <tr class=\\\"answer-row\\\" data-id=\\\"\".concat(index, \"\\\">\\n              <td>\").concat(data.text, \"</td>\\n              \").concat(imputArr[index], \"\\n            </tr>\\n          \");\n    }).join(\"\"), \"\\n    </tbody>\\n  </table>\\n    </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var radioBtns = $builderEl.find(\"input[type='radio']\");\n      radioBtns.off(\"change\");\n      radioBtns.on(\"change\", function (e) {\n        builder.params.methods.answerEmittor($builderEl, builder);\n      });\n    }\n  },\n  methods: {\n    answerEmittor: function answerEmittor($builderEl, builder) {\n      var app = builder.app;\n      var id = $builderEl[0].id;\n      var checked = 0;\n      var rows = $builderEl.find(\".answer-row\");\n      // debugger;\n\n      rows.forEach(function (el) {\n        var choice = $$(el).find(\".choice\");\n        choice.forEach(function (element) {\n          if ($(element).prop(\"checked\")) {\n            checked++;\n          }\n        });\n      });\n      var res = false;\n      if (checked == rows.length) {\n        res = true;\n      }\n      app.data.myEvents.emit(\"form:answer\", {\n        id: id,\n        isAnswered: res\n      });\n    },\n    getUserData: function getUserData() {\n      var component = this;\n      // let checkboxes = [];\n      var ud = {};\n      component.$block.find(\".ce\").each(function () {\n        var val = $$(this).text();\n        var id = $$(this).attr(\"id\");\n        if (val.length > 0) {\n          ud[id] = val;\n          // checkboxes.push(ud);\n        }\n      });\n      // checkboxes.push(ud);\n\n      component.params.userContent.data = ud;\n    },\n    eval: function _eval(component, formComponent) {\n      var self = this;\n      var formComponentParams = formComponent.params;\n      var showResult = formComponentParams.content.showResult;\n      var showCorrectAnswers = formComponentParams.content.showCorrectAnswers;\n      var content = component.params.content;\n      var $builderEl = component.$block;\n      var app = component.app;\n      var points = 0;\n      var maxPoints = 0;\n      maxPoints = _.sumBy(content.answers, function (o) {\n        if (!o.deleted) return parseFloat(o.value);\n        return false;\n      });\n      // debugger;\n      var answersNotDeleted = content.answers.filter(function (o) {\n        return !o.deleted;\n      });\n      ////console.log('content-answers2', answersNotDeleted);\n\n      var rows = $builderEl.find(\".answer-row\");\n      // debugger;\n\n      rows.forEach(function (el) {\n        var index = 0;\n        var rowIndex = $$(el).data(\"id\");\n        var choice = $$(el).find(\".choice\");\n        choice.forEach(function (element) {\n          if ($(element).prop(\"checked\")) {\n            var choiceId = $$(element).data(\"id\");\n            if (answersNotDeleted[rowIndex].rightAnswers == choiceId) {\n              points += parseFloat(answersNotDeleted[rowIndex].value);\n            }\n          }\n        });\n        index++;\n      });\n      if (showCorrectAnswers) {\n        this.params.methods.solution(component);\n      }\n      points = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(points);\n      maxPoints = Object(_helpers_parsePoints__WEBPACK_IMPORTED_MODULE_1__[\"formatNumber\"])(maxPoints);\n      if (showResult) {\n        var classResult = points == maxPoints ? \"result-success\" : \"result-fail\";\n        var $resultBadge = $builderEl.find(\".result-badge\");\n        $resultBadge.text(\"\".concat(points, \"/\").concat(maxPoints));\n        if ($resultBadge.hasClass(\"result-success\")) $resultBadge.removeClass(\"result-success\");\n        if ($resultBadge.hasClass(\"result-fail\")) $resultBadge.removeClass(\"result-fail\");\n        $resultBadge.addClass(classResult);\n        $resultBadge.css(\"display\", \"block\");\n      }\n      return {\n        points: points,\n        totalPoints: maxPoints\n      };\n    },\n    solution: function solution(component) {\n      var self = this;\n      var app = component.app;\n      var $builderEl = component.$block;\n      var $inputs = $builderEl.find(\"input\");\n      var content = component.params.content;\n      var answerPool = [];\n      var rows = $builderEl.find(\".answer-row\");\n      // debugger;\n\n      var answersNotDeleted = content.answers.filter(function (o) {\n        return !o.deleted;\n      });\n      rows.forEach(function (el) {\n        var index = 0;\n        var rowIndex = $$(el).data(\"id\");\n        var choice = $$(el).find(\".choice\");\n        choice.forEach(function (element) {\n          var corr = answersNotDeleted[rowIndex].rightAnswers;\n          var choiceId = $$(element).data(\"id\");\n          if (choiceId == corr) {\n            $$(element).next(\".check\").addClass(\"success\");\n          } else {\n            $$(element).next(\".check\").addClass(\"fail\");\n          }\n        });\n        index++;\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.less":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.less ***!
  \**********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/table-input/table-radio-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/forms/tables/table-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/gallery/gl-01.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/gallery/gl-01.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/gallery/gl-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/gallery/gl-02.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/gallery/gl-02.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/gallery/gl-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/gallery/gl-03.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/gallery/gl-03.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/gallery/gl-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/gallery/gl-04.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/gallery/gl-04.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/gallery/gl-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/gallery/gl-05.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/gallery/gl-05.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/gallery/gl-05.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/games/ge-01.js":
/*!***********************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/games/ge-01.js ***!
  \***********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($, jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($, jQuery) {/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ge_01_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ge-01.less */ \"./src/core/custom_plugins/builder/components/_en/games/ge-01.less\");\n/* harmony import */ var _ge_01_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ge_01_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! webpack-jquery-ui/draggable */ \"./node_modules/webpack-jquery-ui/draggable.js\");\n/* harmony import */ var webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_draggable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! webpack-jquery-ui/droppable */ \"./node_modules/webpack-jquery-ui/droppable.js\");\n/* harmony import */ var webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_droppable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! webpack-jquery-ui/resizable */ \"./node_modules/webpack-jquery-ui/resizable.js\");\n/* harmony import */ var webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_resizable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! webpack-jquery-ui/selectable */ \"./node_modules/webpack-jquery-ui/selectable.js\");\n/* harmony import */ var webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_selectable__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! webpack-jquery-ui/sortable */ \"./node_modules/webpack-jquery-ui/sortable.js\");\n/* harmony import */ var webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(webpack_jquery_ui_sortable__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! jquery-ui-touch-punch */ \"./node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js\");\n/* harmony import */ var jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_touch_punch__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n// make css rules\n// let rule =\n\n// možnost, jak udělat náhled elementu:\n//   https://github.com/tsayen/dom-to-image\n\nvar globalFont = 30;\nvar sg = \"green\";\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"ge-01\",\n  title: \"Algorithmic game\",\n  subtitle: \"A game that allows you to move blocks of code and solve puzzles\",\n  contentSetting: {\n    grid_x: {\n      type: \"input-number\",\n      name: \"X - Num of boxes\"\n    },\n    grid_y: {\n      type: \"input-number\",\n      name: \"Y - Num of boxes\"\n    },\n    start: {\n      type: \"input-number\",\n      name: \"Start position\"\n    },\n    blockMinPossible: {\n      type: \"input-number\",\n      name: \"Block min. possible\"\n    },\n    direction: {\n      name: \"Start direction\",\n      type: \"select\",\n      options: [{\n        title: \"Up\",\n        value: \"up\"\n      }, {\n        title: \"Right\",\n        value: \"right\"\n      }, {\n        title: \"Down\",\n        value: \"down\"\n      }, {\n        title: \"Left\",\n        value: \"left\"\n      }]\n    },\n    startProgramText: {\n      type: \"textarea\",\n      name: \"Start Button Text\"\n    },\n    resetProgramText: {\n      type: \"textarea\",\n      name: \"Clear Button Text\"\n    },\n    objects: {\n      name: \"Objects\",\n      type: \"array\",\n      values: {\n        positionx: {\n          name: \"Position\",\n          type: \"input-number\"\n        },\n        type: {\n          name: \"Object type\",\n          type: \"select\",\n          options: [{\n            title: \"Box\",\n            value: \"box\"\n          }, {\n            title: \"Finish\",\n            value: \"finish\"\n          }]\n        }\n      }\n    }\n  },\n  content: {\n    start: 14,\n    grid_x: 4,\n    grid_y: 4,\n    direction: \"down\",\n    blockMinPossible: 4,\n    startProgramText: \"Spustit program\",\n    resetProgramText: \"Vymazat program\",\n    objects: [{\n      positionx: 11,\n      type: \"box\"\n    }, {\n      positionx: 6,\n      type: \"box\"\n    }, {\n      positionx: 7,\n      type: \"finish\"\n    }]\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n  <div id=\\\"ts-game-1\\\" class=\\\"game row no-gap\\\">\\n\\n  <div class=\\\"col-66\\\">\\n  <div id=\\\"ts-snap-grid\\\" class=\\\" demo ts-swipe-left-right-background\\\">\\n                        <div style=\\\"display: inline-block; float: left; padding: 20px; \\\">\\n\\n                            <div style=\\\"\\\">\\n                                <span>P\\u0159\\xEDkazy</span>\\n                            </div>\\n\\n                            <ul id=\\\"sss\\\" class=\\\"connectedSortable ui-sortable\\\">\\n                                <li class=\\\"ui-state-default draggable draggable2 ui-draggable ui-draggable-handle\\\" data-action=\\\"mf\\\">Jdi vp\\u0159ed</li>\\n                                <li class=\\\"ui-state-default draggable draggable2 ui-draggable ui-draggable-handle\\\" data-action=\\\"chdl\\\">Oto\\u010D se vlevo</li>\\n                                <li class=\\\"ui-state-default draggable draggable2 ui-draggable ui-draggable-handle\\\" data-action=\\\"chdr\\\">Oto\\u010D se vpravo</li>\\n                                <li class=\\\"ui-state-default draggable ts-foreach ui-draggable ui-draggable-handle\\\" data-action=\\\"foreach\\\">Opakuj\\n                                    <select class=\\\"foreach-form form-control\\\" style=\\\"width: auto; display: inline;\\\">\\n                                        <option value=\\\"2\\\">2</option>\\n                                        <option value=\\\"3\\\">3</option>\\n                                        <option value=\\\"4\\\">4</option>\\n                                        <option value=\\\"5\\\">5</option>\\n                                        <option value=\\\"6\\\">6</option>\\n                                        <option value=\\\"7\\\">7</option>\\n                                        <option value=\\\"8\\\">8</option>\\n                                        <option value=\\\"9\\\">9</option>\\n                                    </select>\\n                                    <ul class=\\\"ts-sortable connectedSortable ui-sortable\\\">\\n                                    </ul>\\n                                </li>\\n                            </ul>\\n                            <ul id=\\\"ts-sortable-trash\\\" class=\\\"connectedSortable ts-sortable  ui-sortable\\\">\\n\\n\\n                            </ul>\\n\\n                        </div>\\n\\n                        <div style=\\\"display: inline-block; float: left;padding: 20px; \\\">\\n\\n\\n                            <div style=\\\"\\\">\\n                                <span id=\\\"ts-blocks-used\\\">3</span>/<span id=\\\"ts-blocks-possible-min\\\">4</span>\\n                            </div>\\n\\n                            <div class=\\\"ts-after-start\\\">Po spu\\u0161t\\u011Bn\\xED</div>\\n                            <ul id=\\\"ts-program-list\\\" class=\\\"ts-sortable connectedSortable ui-sortable\\\"></ul>\\n\\n                        </div>\\n                        <div class=\\\"clearfix\\\"></div>\\n\\n                    </div>\\n</div>\\n\\n<div class=\\\"col-33\\\">\\n  <div id=\\\"grid\\\"></div>\\n\\n  </div>\\n\\n<!-- <button id=\\\"ts-start-program\\\" class=\\\"button button-large button-fill\\\"></button>-->\\n\\n<!--      <button id=\\\"ts-restart-program\\\" class=\\\"button button-outline\\\"><i class=\\\"icon material-icons quote-img\\\">autorenew</i> Vymazat program</button>-->\\n\\n<div class=\\\"segmented ge-01-controls\\\">\\n  <a id=\\\"ts-start-program\\\" class=\\\"button button-active\\\"><i class=\\\"icon material-icons quote-img\\\">play_circle_filled</i> \".concat(content.startProgramText, \"</a>\\n  <a id=\\\"ts-restart-program\\\" class=\\\"button button-outline\\\"><i class=\\\"icon material-icons quote-img\\\">autorenew</i> \").concat(content.resetProgramText, \"</a>\\n</div>\\n\\n</div>\\n\");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var content = builder.params.content;\n      var $game = $block.find(\".game\");\n      var options = {\n        start: parseInt(content.start),\n        grid_x: parseInt(content.grid_x),\n        grid_y: parseInt(content.grid_y),\n        direction: content.direction,\n        blockMinPossible: parseInt(content.blockMinPossible),\n        objects: content.objects\n      };\n      builder.params.methods.makeGame($game, options);\n\n      // $block.append(\"<h1>x</h1>\");\n    }\n  },\n  methods: {\n    makeGame: function makeGame($game, options) {\n      var app = this.app;\n\n      //konverze na jQuery\n      $game = $($game[0]);\n      var settings = app.utils.extend({\n        start: 1,\n        grid_x: 3,\n        grid_y: 1,\n        direction: \"right\",\n        blockMinPossible: 2,\n        objects: [{\n          positionx: 3,\n          type: \"finish\"\n        }]\n      }, options);\n\n      /*addObject(11, objectTypes.box);\r\n       addObject(6, objectTypes.box);\r\n       addObject(7, objectTypes.finish);*/\n\n      var start = settings.start;\n      var grids = settings.grid_x;\n      var gridy = settings.grid_y;\n      var direction = settings.direction;\n      var tsBlocksPossibleMin = settings.blockMinPossible;\n      var myTimeout;\n      var xindex = 0;\n      var finallIndex = 0;\n      var ll = 0;\n      $game.find(\"#ts-blocks-possible-min\").html(tsBlocksPossibleMin);\n      $game.find(\"#ts-blocks-used\").html(ll);\n      function resetGridSettings() {\n        direction = settings.direction;\n        start = settings.start;\n        grids = settings.grid_x;\n        gridy = settings.grid_y;\n        xindex = 0;\n        finallIndex = 0;\n      }\n      function startGame() {\n        resetGridSettings();\n        prepareGrid();\n        $.each(settings.objects, function (index, value) {\n          if (!value.deleted) {\n            addObject(value.positionx, objectTypes[value.type]);\n          }\n        });\n      }\n      var objects = [];\n      var objectTypes = {\n        box: {\n          movable: 1,\n          destructable: 0,\n          is_passable: 0,\n          class: \"ts-game-box\",\n          is_finish: 0\n        },\n        finish: {\n          movable: 0,\n          destructable: 0,\n          is_passable: 1,\n          class: \"ts-game-finish\",\n          is_finish: 1\n        },\n        cell: {\n          movable: 0,\n          destructable: 0,\n          is_passable: 1,\n          class: \"ts-game-cell\",\n          is_finish: 0\n        }\n      };\n      function addObject(indexPosition, object) {\n        $game.find(\"#cell-\" + indexPosition).addClass(object.class).addClass(\"ts-game-object\").attr(\"data-movable\", object.movable).attr(\"data-destructable\", object.destructable).attr(\"data-is_passable\", object.is_passable).attr(\"data-is_finish\", object.is_finish);\n      }\n      function gameOver(ix) {\n        debugger;\n        if (ix == undefined) {\n          ix = \"nic\";\n        }\n        clearTimeout();\n        alert(\"Konec hry :-(\");\n        startGame();\n      }\n      function gameSucces() {\n        clearTimeout();\n        alert(\"Výborně, vyhrálu jste hru!\");\n        startGame();\n      }\n      function clearTimeout() {\n        myTimeout++;\n        while (myTimeout--) {\n          window.clearTimeout(myTimeout); // will do nothing if no timeout with id is present\n        }\n      }\n      function drawCell(move) {\n        start = move;\n        $game.find(\".ts-game-cell[class*=ts-game-figure-]\").removeClass(\"ts-game-figure-left\").removeClass(\"ts-game-figure-right\").removeClass(\"ts-game-figure-up\").removeClass(\"ts-game-figure-down\");\n        if (!$game.find(\"#cell-\" + move).length) {\n          debugger;\n          gameOver(1);\n          return;\n        }\n        if (!parseInt($game.find(\"#cell-\" + move).attr(\"data-is_passable\"))) {\n          gameOver(2);\n          return;\n        }\n        $game.find(\"#cell-\" + move).addClass(\"ts-game-figure-\" + direction);\n        if (parseInt($game.find(\"#cell-\" + move).attr(\"data-is_finish\"))) {\n          setTimeout(function () {\n            gameSucces();\n          }, 500);\n          return;\n        }\n        finallIndex++;\n        if (finallIndex == xindex) {\n          setTimeout(function () {\n            gameOver(3);\n            return;\n          }, 500);\n        }\n      }\n      function changeDirection(dir) {\n        var dirArray = [\"up\", \"right\", \"down\", \"left\"];\n        var x = 0;\n        if (dir == \"right\") {\n          var counter = +1;\n        }\n        $.each(dirArray, function (index, value) {\n          if (value == direction && dir == \"right\") {\n            x = index + 1;\n            if (x > 3) {\n              x = 0;\n            }\n          } else if (value == direction && dir == \"left\") {\n            x = index - 1;\n            if (x < 0) {\n              x = 3;\n            }\n          }\n        });\n        direction = dirArray[x];\n        drawCell(start);\n      }\n      function moveForward() {\n        moveCell(direction);\n      }\n      function moveCell(dir) {\n        direction = dir;\n        switch (direction) {\n          case \"right\":\n            start = start + 1;\n            if (start % grids == 1) {\n              gameOver();\n            }\n            drawCell(start);\n            break;\n          case \"left\":\n            start = start - 1;\n            if (start % grids == 0) {\n              gameOver();\n            }\n            drawCell(start);\n            break;\n          case \"up\":\n            start = start - grids;\n            drawCell(start);\n            break;\n          case \"down\":\n            start = start + grids;\n            drawCell(start);\n            break;\n          default:\n            drawCell(start);\n        }\n      }\n      function prepareGrid() {\n        //TODO - když je element skrytý, např. v popopu, tak je šířka 0 a výpočet selže.\n        var gridWidth = $game.find(\"#grid\").width();\n        var a = gridWidth / grids;\n        var colWidth = Math.floor(a - 1);\n        if (colWidth > 50) {\n          colWidth = 50;\n        }\n        var gridWidth = colWidth * grids;\n        var i = 0;\n        $game.find(\"#grid\").css(\"width\", gridWidth + \"px\").empty();\n        while (i < grids * gridy) {\n          i++;\n          var cell = $$(\"<div></div>\").attr(\"id\", \"cell-\" + i).css(\"width\", colWidth + \"px\").css(\"height\", colWidth + \"px\").css(\"line-height\", colWidth + \"px\");\n          $game.find(\"#grid\").append(cell);\n          addObject(i, objectTypes.cell);\n        }\n        $game.find(\"#cell-\" + start).addClass(\"ts-game-figure-\" + direction);\n      }\n      startGame();\n      $game.find(\"#move-right\").on(\"click\", function () {\n        moveCell(\"right\");\n      });\n      $game.find(\"#move-left\").on(\"click\", function () {\n        moveCell(\"left\");\n      });\n      $game.find(\"#move-up\").on(\"click\", function () {\n        moveCell(\"up\");\n      });\n      $game.find(\"#move-down\").on(\"click\", function () {\n        moveCell(\"down\");\n      });\n      $game.find(\"#rotate-right\").on(\"click\", function () {\n        changeDirection(\"right\");\n      });\n      $game.find(\"#rotate-left\").on(\"click\", function () {\n        changeDirection(\"left\");\n      });\n      $game.find(\"#move-direct\").on(\"click\", function () {\n        moveForward();\n      });\n      var index = -1;\n      var timeOutOne;\n      function execute(action, timeIndex) {\n        myTimeout = setTimeout(function () {\n          switch (action) {\n            case \"mf\":\n              moveForward();\n              break;\n            case \"chdl\":\n              changeDirection(\"left\");\n              break;\n            case \"chdr\":\n              changeDirection(\"right\");\n              break;\n            default:\n              gameOver();\n          }\n        }, timeIndex * 1000);\n      }\n      $game.find(\"#ts-restart-program\").on(\"click\", function () {\n        //$game.find(\".ts-sortable\").sortable(\"refreshPositions\");\n        //$game.find(\".ts-sortable\").sortable(\"refresh\");\n        $(\"#ts-program-list\").empty();\n      });\n      $game.find(\"#ts-start-program\").off(\"click\");\n      $game.find(\"#ts-start-program\").on(\"click\", function () {\n        var myArr2 = [];\n        myArr2.push({\n          opakuj: 1,\n          prvky: []\n        });\n        myArr2[0].prvky.push({\n          1: {\n            opakuj: 1,\n            prvky: [\"jdi vpřed 2\", \"otoč se vlevo 2\", \"otoč se v pravo 2\"]\n          }\n        });\n        myArr2[0].prvky.push({\n          1: {\n            opakuj: 1,\n            prvky: [\"jdi vpřed 3\"]\n          }\n        });\n        function readObject(object, timeIndex) {\n          jQuery.each(object, function (index, value) {\n            var values = value[\"prvky\"].length;\n            var repeatValue = value[\"opakuj\"];\n            var ri = 0;\n            while (ri != repeatValue) {\n              var i = 0;\n              while (i < values) {\n                var prvek = value[\"prvky\"][i];\n\n                //alert(typeof(prvek));\n                if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(prvek) == \"object\") {\n                  readObject(prvek, xindex);\n                } else {\n                  //console.log('XA', prvek, xindex);\n                  execute(prvek, xindex);\n                  xindex++;\n                }\n                i++;\n              }\n              ri++;\n            }\n          });\n        }\n        var myArr3 = [];\n        $game.find(\"ul#ts-program-list\").children(\"li\").each(function (index) {\n          var action = $(this).data(\"action\");\n          myArr3.push({\n            opakuj: 1,\n            prvky: []\n          });\n          var mujPrvek = myArr3[index];\n          var myThis = $(this);\n          var myIndex = index;\n          function foreachx(action, myThis, mujPrvek) {\n            var mujPrvekOld = mujPrvek;\n            var sublis = myThis.find(\"ul:first>li\");\n            var counter = parseInt(myThis.find(\".foreach-form:first option:selected\").text());\n            mujPrvek.opakuj = counter;\n            jQuery.each(sublis, function (indexx, valuee) {\n              myThis = $(this);\n              action = myThis.data(\"action\");\n              if (action != \"foreach\") {\n                mujPrvekOld.prvky.push({\n                  1: {\n                    opakuj: 1,\n                    prvky: [action]\n                  }\n                });\n              } else {\n                mujPrvek.prvky.push({\n                  1: {\n                    opakuj: 1,\n                    prvky: []\n                  }\n                });\n                var mujPrvekx = mujPrvek.prvky[indexx][1];\n                foreachx(action, myThis, mujPrvekx);\n              }\n            });\n          }\n          if (action == \"foreach\") {\n            foreachx(action, myThis, mujPrvek, myIndex);\n          } else {\n            myArr3[index].opakuj = 1;\n            myArr3[index].prvky.push(action);\n          }\n        });\n\n        //console.log('myArr3',myArr3);\n\n        readObject(myArr3, 0);\n      });\n      var c1 = $game.find(\".ts-sortable\");\n      var c2 = $game.find(\".ts-sortable\").find(\"#ts-snap-grid\");\n      var sortSettings = {\n        connectWith: c1,\n        //revert: true,\n        placeholder: \"ts-state-highlight\",\n        over: function over(event, iu) {},\n        receive: function receive(event, ui) {\n          c1 = $game.find(\".ts-sortable\");\n          var sortSettings2 = {\n            connectWith: c1,\n            placeholder: \"ts-state-highlight\",\n            update: function update() {\n              var ll = $game.find(\"#ts-program-list li\").length;\n              $game.find(\"#ts-blocks-used\").html(ll);\n            }\n          };\n          $game.find(\".ts-sortable\").sortable(sortSettings2);\n          $game.find(\"#ts-sortable-trash > li\").remove();\n        },\n        update: function update() {\n          var ll = $game.find(\"#ts-program-list li\").length;\n          $game.find(\"#ts-blocks-used\").html(ll);\n        }\n      };\n      $game.find(\".ts-sortable\").sortable(sortSettings);\n      $game.find(\".draggable\").draggable({\n        connectToSortable: c1,\n        helper: \"clone\",\n        revert: \"invalid\",\n        containment: c2\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/games/ge-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/games/ge-01.less":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/games/ge-01.less ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/games/ge-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/games/magnify-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/games/magnify-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/games/magnify-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/grid/grid-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/grid/grid-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/grid/grid-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/grid/grid-02.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/grid/grid-02.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/grid/grid-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/grid/grid-03.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/grid/grid-03.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/grid/grid-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/grid/grid-04.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/grid/grid-04.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/grid/grid-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/hangman-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/hangman.less":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/hangman.less ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/hangman.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_0.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_1.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_2.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_3.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_4.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_5.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_6.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/svg+xml;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hangman/images/step_7.svg?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-01.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-01.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-02.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-02.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-03.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-03.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-04.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-04.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-05.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-05.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-05.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-06.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-06.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-06.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-07.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-07.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-07.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-08.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-08.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-08.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-09.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-09.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-09.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/header/hdr-10.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/header/hdr-10.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/header/hdr-10.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js ***!
  \**********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _hid_txt_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hid-txt-01.less */ \"./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.less\");\n/* harmony import */ var _hid_txt_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_hid_txt_01_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"hid-txt-01\",\n  title: \"Hidden text\",\n  subtitle: \"with blur\",\n  contentSetting: {\n    buttonShow: {\n      name: \"Reveal button text\",\n      type: \"textEditor\"\n    },\n    buttonHide: {\n      name: \"Hide button text\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    buttonShow: \"Odkrýt\",\n    buttonHide: \"Skrýt\"\n  },\n  componentsAllowedGroup: {\n    x0: \"basicGroup\"\n  },\n  components: {\n    x0: []\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n    <div class=\\\"rozmazani-container rozmazani\\\">\\n      <div class=\\\"text\\\">\".concat(component.renderComponents(\"x0\"), \"</div>\\n      <button class=\\\"button btn-tgl button-outline rozmazaniButton\\\" style=\\\"width: 100px;\\\">\").concat(content.buttonShow, \"</button>\\n    </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $block = builderEl;\n      var content = builder.params.content;\n      builderEl.find(\".rozmazaniButton\").on(\"click\", function () {\n        $(this).closest(\".rozmazani-container\").toggleClass(\"rozmazani\");\n        if ($(this).closest(\".rozmazani-container\").hasClass(\"rozmazani\")) {\n          $(this).text(content.buttonShow);\n        } else {\n          $(this).text(content.buttonHide);\n        }\n      });\n      // $block.append(\"<h1>x</h1>\");\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.less":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.less ***!
  \*********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/hidden-text/hid-txt-timeline-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/icon-list/icon-list-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/ideofon/ideofon-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/iframe/if-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/iframe/if-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/iframe/if-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _layers01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layers01.less */ \"./src/core/custom_plugins/builder/components/_en/image-layers/layers01.less\");\n/* harmony import */ var _layers01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_layers01_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"layers-01\",\n  title: \"Image with layers\",\n  subtitle: \"\",\n  contentSetting: {\n    visible: {\n      name: \"All alyers are visible by default\",\n      type: \"bool\"\n    },\n    photo: {\n      name: \"Starting image\",\n      type: \"image\"\n    },\n    layers: {\n      name: \"Image of layer\",\n      help: \"Layers must be the same size as starting item\",\n      type: \"array\",\n      values: {\n        path: {\n          name: \"Layer\",\n          type: \"image\"\n        },\n        title: {\n          name: \"Layer description\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    visible: false,\n    photo: \"{{mediaServerDomain}}/public/2s2wknj81x9y5orbobtw2sxnjpaa1cu2j2nq8uikuarql69wy7vbuir8dxuqt02x.png\",\n    layers: [{\n      path: \"{{mediaServerDomain}}/public/rvwzhms13mlsstzmwehtxyg23xx9u4w5rrg8tr6s2u6ynza1pz8znqh12ign6tv2.png\",\n      title: \"Oranžové puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/8kew1okwalt7d1dld3jkl3aa1iuf2kxnla7gyfdtminev94t4z6jl9cv6nv1nvql.png\",\n      title: \"Zelené puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/1khslrbj9ymd75np5e4gpmtpckjud8588zdmu758hdbjf6ju4y7v41vn3rdoja9h.png\",\n      title: \"Růžové puzzle\"\n    }, {\n      path: \"{{mediaServerDomain}}/public/n9dcn1lpf0xn0x322l7w1bs0045dgk6xjk9orcd4dlnh6ugarytplv8v6mxfk2w9.png\",\n      title: \"Modré puzzle\"\n    }]\n  },\n  styles: {\n    authorx: {}\n  },\n  html: function html(content, builder, styles) {\n    return \"\\n      <div class=\\\"image-container\\\">\\n          <img class=\\\"image image-main\\\" src=\\\"\".concat(content.photo, \"\\\" />\\n          \").concat(content.layers.map(function (layer, index) {\n      return \"\\n              <img class=\\\"image image-layer\\\" src=\\\"\".concat(layer.path, \"\\\" data-imageid=\\\"\").concat(layer.id, \"\\\" style=\\\"\").concat(content.visible ? \"display: inline\" : \"display: none\", \"; z-index: \").concat(100 - index, \"\\\"/>\\n            \");\n    }).join(\"\"), \"\\n      </div>\\n      <div class=\\\"controls-container\\\">\\n\\n        \").concat(content.layers.map(function (layer) {\n      return \"\\n\\n              <span class=\\\"layer-button\\\" data-visible=\\\"\".concat(content.visible ? \"true\" : \"false\", \"\\\" data-btnid=\\\"\").concat(layer.id, \"\\\"><span class=\\\"icon layer-icon material-icons\\\">\").concat(content.visible ? \"visibility\" : \"visibility_off\", \"</span>&nbsp;\").concat(layer.title, \"</span>\\n\\n            \");\n    }).join(\"\"), \"\\n\\n      </div>\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var $block = $builderEl;\n      // alert(builder.params.id);\n      var layers = $block.find(\".image-layer\");\n      $block.find(\".layer-button\").off(\"click\").off(\"click\").on(\"click\", function (e) {\n        var target = $$(e.target);\n        var targetId = target.data(\"btnid\");\n        var isShown = target.data(\"visible\");\n        var targetIcon = target.find(\".layer-icon\");\n        layers.forEach(function (element) {\n          var elId = $(element).data(\"imageid\");\n          if (elId == targetId) {\n            if (isShown == \"true\") {\n              $(element).hide();\n              target.attr(\"data-visible\", false);\n              targetIcon.text(\"visibility_off\");\n              // target\n            } else {\n              $(element).show();\n              target.attr(\"data-visible\", true);\n              targetIcon.text(\"visibility\");\n            }\n          }\n        });\n      });\n\n      // alert('gl');\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/image-layers/layers01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/image-layers/layers01.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/image-layers/layers01.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/image-layers/layers01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/image-layers/layers02.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/image-layers/layers02.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/image-layers/layers02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = \"data:image/png;base64, \"\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/impressum/cc_icon.png?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/impressum/imp-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/impressum/imp-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/impressum/imp-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js":
/*!*********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js ***!
  \*********************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses eval() */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _interactive_math_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interactive-math.less */ \"./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.less\");\n/* harmony import */ var _interactive_math_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interactive_math_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"interactive-math-01\",\n  title: \"Interactive math\",\n  subtitle: \"\",\n  contentSetting: {\n    instruction: {\n      name: \"Instruction\",\n      type: \"instruction\",\n      text: \"Use 'X' for user input. <br /> Does not support nested brackets. <br /> '/' render fraction. <br /> Allowed symbols [0-9] / : * + - . ( ) <br /><br />\"\n    },\n    title: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    equation: {\n      name: \"Equation\",\n      type: \"textarea\"\n    },\n    description: {\n      name: \"Result desctiption\",\n      type: \"textEditor\"\n    },\n    round: {\n      name: \"Number of decimal places to round\",\n      type: \"input-number\",\n      help: \"-1 to not round, 0 to integer, 1+ to number of decimal places\"\n    }\n  },\n  content: {\n    equation: \"(12+X)/(5*2)*11+X\",\n    description: \"\",\n    title: \"Interaktivní příklad\",\n    round: 0\n  },\n  html: function html(content, builder, styles, component) {\n    var token = \"\";\n    var eq = content.equation.split(\"\");\n    var blocks = [];\n    var cont = false;\n    var contN = false;\n    eq.forEach(function (element, index) {\n      token += element;\n      if (element == '(') {\n        cont = true;\n      } else if (element == ')') {\n        cont = false;\n      }\n      if ((!isNaN(element) || eq[index] == \".\" || eq[index] == \",\") && (!isNaN(eq[index + 1]) || eq[index + 1] == \".\" || eq[index + 1] == \",\")) {\n        contN = true;\n      } else {\n        contN = false;\n      }\n      if (!cont && !contN) {\n        blocks.push(token);\n        cont = false;\n        contN = false;\n        token = \"\";\n      }\n    });\n    var elem = \"\";\n    var id = 1;\n    blocks.forEach(function (block, index) {\n      var e = block;\n      var newE = \"\";\n      e = e.replaceAll('*', '&#x2022;');\n      if (e.includes(\"X\")) {\n        e = e.replaceAll(\"X\", \"<input id='x\".concat(id, \"' />\"));\n        id++;\n      }\n      if (blocks[index + 1] == '/') {\n        elem += \"<div class=\\\"frac\\\">\";\n        e = e.replaceAll(\"(\", \"\");\n        e = e.replaceAll(\")\", \"\");\n        elem += \"<div class=\\\"frac-top\\\">\".concat(e, \"</div>\");\n      } else if (blocks[index - 1] == '/') {\n        e = e.replaceAll(\"(\", \"\");\n        e = e.replaceAll(\")\", \"\");\n        elem += \"<div class=\\\"frac-bot\\\">\".concat(e, \"</div>\");\n        elem += \"</div>\";\n      } else {\n        if (e != '/') {\n          elem += \"<div class=\\\"cont\\\">\";\n          elem += e;\n          elem += \"</div>\";\n        } else {\n          elem += \"<div class=\\\"frac-separator\\\"></div>\";\n        }\n      }\n    });\n    elem += \"<div class=\\\"cont\\\">=</div> <div class=\\\"cont result\\\"></div><div class=\\\"description\\\">\".concat(content.description, \"</div>\");\n    return \"\\n    \".concat(content.title ? \"<h2>\".concat(content.title, \"</h2>\") : \"\", \"\\n    <div class=\\\"container\\\">\").concat(elem, \"</div>\");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var inputs = $builderEl.find(\"input\");\n      inputs.on(\"input\", function () {\n        builder.params.methods.doMath();\n      });\n    }\n  },\n  methods: {\n    doMath: function doMath() {\n      var block = this.$block;\n      var inputs = block.find(\"input\");\n      var res = this.params.content.equation;\n      var round = this.params.content.round;\n      inputs.forEach(function (element) {\n        var val = $$(element).val();\n        if (val.length > 0) {\n          res = res.replace(\"X\", val);\n        }\n      });\n      res = res.replaceAll(\":\", \"/\");\n      res = res.replaceAll(\",\", \".\");\n      var validRegex = /^[0-9+\\-*/().\\s]+$/;\n      var text = \"\";\n      if (!validRegex.test(res)) {\n        text = \"Nepodařilo se vypočítat rovnici\";\n      } else {\n        text = eval(res);\n      }\n      var finalEl = block.find(\".result\");\n      if (!isNaN(text) && round >= 0) {\n        text = Math.round(Number.parseFloat(text), round);\n      }\n      finalEl.text(text);\n    }\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.less":
/*!***********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.less ***!
  \***********************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/interactive-math/interactive-math.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.less":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.less ***!
  \*************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/recipe-layout-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js ***!
  \*******************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _side_menu_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./side-menu-01.less */ \"./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.less\");\n/* harmony import */ var _side_menu_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_side_menu_01_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"side-menu-01\",\n  title: \"Menu layout\",\n  subtitle: \"menu on right side\",\n  contentSetting: {\n    sticky: {\n      name: \"Keep menu on screen\",\n      type: \"bool\",\n      help: \"Menu stays on screen while scrolling.\"\n    },\n    label: {\n      name: \"Menu title\",\n      type: \"textEditor\"\n    },\n    layoutItems: {\n      name: \"Menu items\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Podkapitoly\",\n    sticky: false,\n    layoutItems: [{\n      item: \"Podkapitola 1\"\n    }, {\n      item: \"Podkapitola 2\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    var layoutCont = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = builder.id + \"_\" + index;\n      menu += \"<li><a class=\\\"scroll-to\\\" href=\\\"#\".concat(key, \"\\\" data-highlight=\\\"true\\\" data-speed=\\\"500\\\" data-middle=\\\"true\\\">\").concat(el.item, \"</a></li>\");\n      layoutCont += \"<div class=\\\"layout-item\\\" id=\\\"\".concat(key, \"\\\">\").concat(component.renderComponents(key), \"</div>\");\n    });\n    return \"\\n    <div class=\\\"side-layout\\\">\\n\\n            <div class=\\\"card menu-card\\\" id=\\\"sticky\\\">\\n            <div class=\\\"card-header\\\">\".concat(content.label, \"</div>\\n            <div class=\\\"list links-list no-margin\\\">\\n                <ul>\\n                \").concat(menu, \"\\n                </ul>\\n            </div>\\n            </div>\\n\\n            <div class=\\\"layout-container\\\">\\n                \").concat(layoutCont, \"\\n            </div>\\n\\n\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $sticky = builderEl.find(\"#sticky\");\n      var initialTop = $(builderEl).offset().top - 50;\n      var sticky_height = $($sticky).height();\n      var el_height = $(builderEl).height();\n      var sticky_bot = $(builderEl).offset().top + el_height - sticky_height - 100;\n\n      // let page = $$(document).find(\".swiper-slide-active\");\n\n      var page = builder.pageComponentContext.$el.parent();\n      var imgs = $$(builderEl).find(\"img\");\n      var loaded = 0;\n      if (imgs.length > 0) {\n        imgs.on(\"load\", function (o) {\n          loaded++;\n          if (loaded == imgs.length) {\n            el_height = $$(builderEl).height();\n            sticky_bot = $$(builderEl).offset().top + el_height - sticky_height - 100;\n          }\n        });\n      }\n      $$(window).resize(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(page).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n      page.scroll(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(this).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.less":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.less ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js ***!
  \*******************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _side_menu_02_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./side-menu-02.less */ \"./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.less\");\n/* harmony import */ var _side_menu_02_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_side_menu_02_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"side-menu-02\",\n  title: \"Menu layout\",\n  subtitle: \"on the right side (possibility to insert components)\",\n  contentSetting: {\n    sticky: {\n      name: \"Keep menu on screen\",\n      type: \"bool\",\n      help: \"Menu stays on screen while scrolling.\"\n    },\n    label: {\n      name: \"Menu title\",\n      type: \"textEditor\"\n    }\n  },\n  content: {\n    label: \"Podkapitoly\",\n    sticky: false\n  },\n  components: {\n    page: [],\n    menu: []\n  },\n  componentsAllowedGroup: {\n    page: \"basicGroup\",\n    menu: \"basicGroup\"\n  },\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    var layoutCont = \"\";\n    return \"\\n    <div class=\\\"side-layout\\\">\\n\\n            <div class=\\\"card menu-card\\\" id=\\\"sticky\\\">\\n            \".concat(content.label.length > 0 ? \"<div class=\\\"card-header\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n              <div class=\\\"no-margin\\\">\\n              \").concat(component.renderComponents(\"menu\"), \"\\n              </div>\\n            </div>\\n\\n            <div class=\\\"layout-container\\\">\\n              \").concat(component.renderComponents(\"page\"), \"\\n            </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $sticky = builderEl.find(\"#sticky\");\n      var initialTop = $(builderEl).offset().top - 50;\n      var sticky_height = $($sticky).height();\n      var el_height = $(builderEl).height();\n      var sticky_bot = $(builderEl).offset().top + el_height - sticky_height - 100;\n\n      // let page = $$(document).find(\".swiper-slide-active\");\n\n      var page = builder.pageComponentContext.$el.parent();\n      $$(window).resize(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(page).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n      page.scroll(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(this).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.less":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.less ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js ***!
  \*******************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _side_menu_03_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./side-menu-03.less */ \"./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.less\");\n/* harmony import */ var _side_menu_03_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_side_menu_03_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"side-menu-03\",\n  title: \"Layout with menu\",\n  subtitle: \"on side (accordion)\",\n  contentSetting: {\n    sticky: {\n      name: \"Keep menu on screen\",\n      type: \"bool\",\n      help: \"Menu stays on screen while scrolling.\"\n    },\n    label: {\n      name: \"Menu title\",\n      type: \"textEditor\"\n    },\n    layoutItems: {\n      name: \"Menu items\",\n      type: \"array\",\n      values: {\n        item: {\n          name: \"Item name\",\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    label: \"Podkapitoly\",\n    sticky: false,\n    layoutItems: [{\n      item: \"Podkapitola 1\"\n    }, {\n      item: \"Podkapitola 2\"\n    }]\n  },\n  componentsAllowedGroup: \"basicGroup\",\n  html: function html(content, builder, styles, component) {\n    var menu = \"\";\n    content.layoutItems.forEach(function (el, index) {\n      var key = builder.id + \"_\" + index;\n      menu += \"\\n      <li class=\\\"accordion-item \\\">\\n        <a class=\\\"item-content item-link\\\" href=\\\"#\\\">\\n              <div class=\\\"item-inner\\\">\\n                <div class=\\\"item-title\\\">\".concat(el.item, \"</div>\\n              </div>\\n            </a>\\n            <div class=\\\"accordion-item-content\\\">\\n             <div class=\\\"block\\\">\\n             \").concat(component.renderComponents(key), \" \\n             </div>\\n            </div>\\n          </li>\\n      \");\n    });\n    return \"\\n    <div class=\\\"side-layout\\\">\\n\\n            <div class=\\\"card menu-card\\\" id=\\\"sticky\\\">\\n            \".concat(content.label.length > 0 ? \"<div class=\\\"card-header\\\">\".concat(content.label, \"</div>\") : \"\", \"\\n              <div class=\\\"list accordion-list no-margin\\\">\\n                <ul>\\n                \").concat(menu, \"\\n                </ul>\\n              </div>\\n            </div>\\n\\n            <div class=\\\"layout-container\\\">\\n              \").concat(component.renderComponents(\"page\"), \"\\n            </div>\\n\\n   </div>\\n    \");\n  },\n  on: {\n    init: function init(builderEl, builder) {\n      var $sticky = builderEl.find(\"#sticky\");\n      var initialTop = $(builderEl).offset().top - 50;\n      var sticky_height = $($sticky).height();\n      var el_height = $(builderEl).height();\n      var sticky_bot = $(builderEl).offset().top + el_height - sticky_height - 100;\n\n      // let page = $$(document).find(\".swiper-slide-active\");\n\n      var page = builder.pageComponentContext.$el.parent();\n      var resizeComp = $$(\".swiper-slide-active\").find(\".page\")[0];\n      var resizeObserver = new ResizeObserver(function (entries) {\n        el_height = $(builderEl).height();\n        sticky_bot = el_height - sticky_height - 100;\n      });\n      resizeObserver.observe(resizeComp);\n      $$(builderEl).resize(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(page).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n      page.scroll(function (event) {\n        if (builder.params.content.sticky) {\n          if ($$(\"body\").width() > \"768\") {\n            var st = $$(this).scrollTop();\n            if (initialTop < st) {\n              if (st < sticky_bot) {\n                var offsetTop = st - initialTop;\n                $sticky.css(\"top\", offsetTop + \"px\");\n              }\n            } else {\n              $sticky.css(\"top\", 0 + \"px\");\n            }\n          } else {\n            $sticky.css(\"top\", 0 + \"px\");\n          }\n        }\n      });\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.less":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.less ***!
  \*********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/side-menu-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/layout/swiper-menu-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/link/link-block-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/link/link-block-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/link/link-block-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/list/li-01.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/list/li-01.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/list/li-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/list/li-02.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/list/li-02.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/list/li-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.less":
/*!************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.less ***!
  \************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/musicnotation/mnote-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/popups/pop-01.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/popups/pop-01.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/popups/pop-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.less":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.less ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/random-words/random-words-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/rating/rating-01.js":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/rating/rating-01.js ***!
  \****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _rating_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rating-01.less */ \"./src/core/custom_plugins/builder/components/_en/rating/rating-01.less\");\n/* harmony import */ var _rating_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rating_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var raty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raty-js */ \"./node_modules/raty-js/lib/jquery.raty.js\");\n/* harmony import */ var raty_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(raty_js__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"rating-01\",\n  title: \"Rating\",\n  subtitle: \"Asign points to categories\",\n  contentSetting: {\n    scale: {\n      name: \"Scale number (number of max items per one category)\",\n      type: \"input-number\"\n    },\n    limit: {\n      name: \"Use limited number of total points?\",\n      type: \"bool\",\n      hidden: {\n        maxText: {\n          name: \"Text of remaining points to asign\",\n          type: \"textEditor\"\n        },\n        maxStars: {\n          name: \"Number of max stars in all categories\",\n          type: \"input-number\"\n        },\n        overLimitText: {\n          name: \"Text of alert when new click is over limit\",\n          type: \"textEditor\"\n        }\n      }\n    },\n    items: {\n      name: \"Categoires on scale\",\n      type: \"array\",\n      values: {\n        category: {\n          name: \"Category name\",\n          type: \"textEditor\"\n        }\n      }\n    },\n    emptyImage: {\n      name: \"Empty image\",\n      type: \"image\"\n    },\n    fullImage: {\n      name: \"Full image\",\n      type: \"image\"\n    },\n    enableHalf: {\n      name: \"Enable half score\",\n      type: \"bool\",\n      hidden: {\n        halfImage: {\n          name: \"Half image\",\n          type: \"image\"\n        }\n      }\n    }\n  },\n  content: {\n    scale: 5,\n    maxStars: 0,\n    enableHalf: false,\n    maxText: \"Zbývá bodů\",\n    overLimitText: \"Na to již nemáš dostatek bodů\",\n    limit: false,\n    items: [{\n      category: \"Zemědělec\"\n    }, {\n      category: \"Obchod\"\n    }, {\n      category: \"Domácnost\"\n    }],\n    emptyImage: \"{{mediaServerDomain}}/public/h9a09e991fylpqrpxnaevlq7g8fkrhy5irqw7ft6pdb097l2kgtrcut0a5656oc5.png\",\n    fullImage: \"{{mediaServerDomain}}/public/ui296rbsam0dhsapekqe5stape6c0hd0h01np628d6tvf0a2a1glsp7lbclgd5nh.png\",\n    halfImage: \"{{mediaServerDomain}}/public/a5vb2g606784tlwobceomzwq69lycdi7n5qr4a3wrk66od6zhlmk457ql8v3jmrt.png\"\n  },\n  html: function html(content, builder, styles, component) {\n    return \"\\n  <div class=\\\"rating-container\\\">\\n    \".concat(content.items.map(function (data, i) {\n      return \"\\n            <div class=\\\"rating-row\\\">\\n                <div class=\\\"rating-category\\\">\\n                    \".concat(data.category, \"\\n                </div>\\n                <div class=\\\"rating-stars\\\" data-index=\\\"\").concat(i, \"\\\">\\n                </div>\\n            </div>\\n        \");\n    }).join(\"\"), \"\\n    \").concat(!content.limit ? \"\" : \"\\n            <div class=\\\"remaining-container\\\">\\n                \".concat(content.maxText, \" <span class=\\\"remaining-stars\\\">\").concat(content.maxStars, \"</span>\\n            </div>\\n        \"), \"\\n      </div>\\n    \");\n  },\n  on: {\n    init: function init($compnenetEl, builder) {\n      var content = builder.params.content;\n      var helpers = builder.params.helpers;\n      var methods = builder.params.methods;\n      var app = builder.app;\n      var allRatingEls = $compnenetEl.find(\".rating-stars\");\n      allRatingEls.forEach(function (element) {\n        $(element).empty();\n        $(element).raty({\n          starOff: app.apiManager.replaceMediaServerPlaceholder(content.emptyImage),\n          starOn: app.apiManager.replaceMediaServerPlaceholder(content.fullImage),\n          number: content.scale,\n          half: content.enableHalf,\n          starHalf: app.apiManager.replaceMediaServerPlaceholder(content.halfImage),\n          cancelButton: true,\n          cancelOff: app.apiManager.replaceMediaServerPlaceholder(\"{{mediaServerDomain}}/public/lcyulq8tm2lm7c844laac4nvtp21587qcmyu6tj495phsuoqdhw4ddhgqyr3x5xj.png\"),\n          cancelOn: app.apiManager.replaceMediaServerPlaceholder(\"{{mediaServerDomain}}/public/vp0l6mziga7k915sjg5yn99lqce86cmr5ibpulrfyka06komdwlrc3fumzrmy52l.png\"),\n          hints: \"\",\n          score: 0,\n          scoreName: \"score\",\n          click: function click(score, evt) {\n            //let parent = $(evt.target).parents(\".rating-stars\");\n            //let index = parent.data(\"index\");\n          }\n        });\n        $(element).on('click', function () {\n          setTimeout(function () {\n            if (content.limit) {\n              //let usedNew = methods.getUsed(index) + score;\n              var usedNew = methods.getUsed();\n              //console.log('usedNew', usedNew);\n              if (usedNew > content.maxStars) {\n                builder.app.dialog.alert(content.overLimitText, \"\");\n                return false;\n              } else {\n                var remain = content.maxStars - usedNew;\n                $compnenetEl.find(\".remaining-stars\").html(remain);\n              }\n            }\n          }, 100);\n        });\n      });\n    }\n  },\n  methods: {\n    getUsed: function getUsed() {\n      var $block = this.$block;\n      var ratingEl = $block.find(\".rating-stars\");\n      var score = 0;\n      ratingEl.forEach(function (element) {\n        // let score = $(element).raty().score();\n        //let index = $$(element).data(\"index\");\n        // if (index != id) {\n        var val = $(element).find(\"input[name='score']\").attr(\"value\");\n        if (val) {\n          score += parseFloat(val);\n        }\n        // }\n      });\n      return score;\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/rating/rating-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/rating/rating-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/rating/rating-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/rating/rating-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js":
/*!*************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js ***!
  \*************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _ref_styles_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ref-styles.less */ \"./src/core/custom_plugins/builder/components/_en/references/ref-styles.less\");\n/* harmony import */ var _ref_styles_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ref_styles_less__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"ref-popover-01\",\n  title: \"Popover list\",\n  subtitle: \"List of all popovers\",\n  contentSetting: {\n    heading: {\n      name: \"Title\",\n      type: \"textEditor\"\n    },\n    itemLabel: {\n      name: \"label\",\n      type: \"textEditor\"\n    },\n    showNonNumbered: {\n      name: \"Show images from non numbered pages?\",\n      type: \"bool\"\n    }\n  },\n  content: {\n    heading: \"Popovers\",\n    itemLabel: \"\",\n    showNonNumbered: true\n  },\n  html: function html(content, builder, styles, component) {\n    // debugger;\n    var app = component.app;\n    var refArray = app.builder.helpers.findAndGet(component.params.methods.regexFunction);\n    refArray.forEach(function (ref, index) {\n      var f = _.find(app.builder.params.dataChapters, function (o) {\n        return o.id == ref.pageId;\n      });\n      if (f) {\n        // debugger;\n        refArray[index][\"chapterName\"] = f.name;\n        refArray[index][\"link\"] = f.fullPath;\n        refArray[index][\"render\"] = true;\n        if (!f.isNumbered && !component.params.content.showNonNumbered) {\n          refArray[index][\"render\"] = false;\n        }\n      }\n    });\n    return \"\\n      \".concat(content.heading ? \"<h2>\".concat(content.heading, \"</h2>\") : \"\", \"\\n      <div class=\\\"data-table ref-table\\\">\\n          <table>\\n          \").concat(refArray.map(function (data) {\n      return \"\\n              \".concat(data.render ? \"\\n              <tr>\\n                  <td>\\n                    <a class=\\\"navigate link prevent-router anchor\\\" href=\\\"\".concat(data.link, \"\\\" data-scroll-to=\\\"#\").concat(data.id, \"\\\" data-scroll-to-highlight=\\\"true\\\">\").concat(content.itemLabel, \" \\n                    \").concat(data.title.length == 0 ? \" [No title] \" : data.title, \"\\n                    </a>\\n                  </td>\\n                  <td class=\\\"text-field\\\">\\n                    <p>\").concat(decodeURIComponent(data.text), \"</p>\\n                  </td>\\n                  <td style=\\\"text-align:right\\\">\\n                    \").concat(data.chapterName, \"\\n                  </td>\\n              </tr>\\n              \") : \"\", \"\\n          \");\n    }).join(\"\"), \"\\n          </table>\\n      </div>\\n      \");\n  },\n  on: {\n    init: function init($builderEl, builder) {},\n    update: function update($builderEl, builder) {}\n  },\n  methods: {\n    regexFunction: function regexFunction(f, component) {\n      // debugger;\n      var context = this;\n      var app = context.app;\n      var pageId = component.params.pageId;\n      var regex = /<\\s*a class=\"[^>]*popover-with-data[^>]*\"[^>]*data-text=\"(.*?)\"[^>]*>(.*?)<\\s*\\/\\s*a>/gm;\n      var found = f.match(regex);\n      var result = [];\n      if (found) {\n        found.forEach(function (element) {\n          var el = $.parseHTML(element);\n          el = $$(el);\n          var title = el.text();\n          var text = el.data(\"text\");\n          result.push({\n            title: title,\n            text: text,\n            pageId: pageId,\n            id: component.params.id\n          });\n        });\n      }\n      return result;\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/references/ref-popover-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/references/ref-styles.less":
/*!***********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/references/ref-styles.less ***!
  \***********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/references/ref-styles.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(jQuery) {/*! flip - v1.1.2 - 2016-10-20\r\n* https://github.com/nnattawat/flip\r\n* Copyright (c) 2016 Nattawat Nonsung; Licensed MIT */\n\n!function (a) {\n  var b = function b() {\n      var a,\n        b = document.createElement(\"fakeelement\"),\n        c = {\n          transition: \"transitionend\",\n          OTransition: \"oTransitionEnd\",\n          MozTransition: \"transitionend\",\n          WebkitTransition: \"webkitTransitionEnd\"\n        };\n      for (a in c) if (void 0 !== b.style[a]) return c[a];\n    },\n    c = function c(b, _c, d) {\n      this.setting = {\n        axis: \"y\",\n        reverse: !1,\n        trigger: \"click\",\n        speed: 500,\n        forceHeight: !1,\n        forceWidth: !1,\n        autoSize: !0,\n        front: \".front\",\n        back: \".back\"\n      }, this.setting = a.extend(this.setting, _c), \"string\" != typeof _c.axis || \"x\" !== _c.axis.toLowerCase() && \"y\" !== _c.axis.toLowerCase() || (this.setting.axis = _c.axis.toLowerCase()), \"boolean\" == typeof _c.reverse && (this.setting.reverse = _c.reverse), \"string\" == typeof _c.trigger && (this.setting.trigger = _c.trigger.toLowerCase());\n      var e = parseInt(_c.speed);\n      isNaN(e) || (this.setting.speed = e), \"boolean\" == typeof _c.forceHeight && (this.setting.forceHeight = _c.forceHeight), \"boolean\" == typeof _c.forceWidth && (this.setting.forceWidth = _c.forceWidth), \"boolean\" == typeof _c.autoSize && (this.setting.autoSize = _c.autoSize), (\"string\" == typeof _c.front || _c.front instanceof a) && (this.setting.front = _c.front), (\"string\" == typeof _c.back || _c.back instanceof a) && (this.setting.back = _c.back), this.element = b, this.frontElement = this.getFrontElement(), this.backElement = this.getBackElement(), this.isFlipped = !1, this.init(d);\n    };\n  a.extend(c.prototype, {\n    flipDone: function flipDone(a) {\n      var c = this;\n      c.element.one(b(), function () {\n        c.element.trigger(\"flip:done\"), \"function\" == typeof a && a.call(c.element);\n      });\n    },\n    flip: function flip(a) {\n      if (!this.isFlipped) {\n        this.isFlipped = !0;\n        var b = \"rotate\" + this.setting.axis;\n        this.frontElement.css({\n          transform: b + (this.setting.reverse ? \"(-180deg)\" : \"(180deg)\"),\n          \"z-index\": \"0\"\n        }), this.backElement.css({\n          transform: b + \"(0deg)\",\n          \"z-index\": \"1\"\n        }), this.flipDone(a);\n      }\n    },\n    unflip: function unflip(a) {\n      if (this.isFlipped) {\n        this.isFlipped = !1;\n        var b = \"rotate\" + this.setting.axis;\n        this.frontElement.css({\n          transform: b + \"(0deg)\",\n          \"z-index\": \"1\"\n        }), this.backElement.css({\n          transform: b + (this.setting.reverse ? \"(180deg)\" : \"(-180deg)\"),\n          \"z-index\": \"0\"\n        }), this.flipDone(a);\n      }\n    },\n    getFrontElement: function getFrontElement() {\n      return this.setting.front instanceof a ? this.setting.front : this.element.find(this.setting.front);\n    },\n    getBackElement: function getBackElement() {\n      return this.setting.back instanceof a ? this.setting.back : this.element.find(this.setting.back);\n    },\n    init: function init(a) {\n      var b = this,\n        c = b.frontElement.add(b.backElement),\n        d = \"rotate\" + b.setting.axis,\n        e = 2 * b.element[\"outer\" + (\"rotatex\" === d ? \"Height\" : \"Width\")](),\n        f = {\n          perspective: e,\n          position: \"relative\"\n        },\n        g = {\n          transform: d + \"(\" + (b.setting.reverse ? \"180deg\" : \"-180deg\") + \")\",\n          \"z-index\": \"0\",\n          position: \"relative\"\n        },\n        h = {\n          \"backface-visibility\": \"hidden\",\n          \"transform-style\": \"preserve-3d\",\n          position: \"absolute\",\n          \"z-index\": \"1\"\n        };\n      b.setting.forceHeight ? c.outerHeight(b.element.height()) : b.setting.autoSize && (h.height = \"100%\"), b.setting.forceWidth ? c.outerWidth(b.element.width()) : b.setting.autoSize && (h.width = \"100%\"), (window.chrome || window.Intl && Intl.v8BreakIterator) && \"CSS\" in window && (f[\"-webkit-transform-style\"] = \"preserve-3d\"), c.css(h).find(\"*\").css({\n        \"backface-visibility\": \"hidden\"\n      }), b.element.css(f), b.backElement.css(g), setTimeout(function () {\n        var d = b.setting.speed / 1e3 || .5;\n        c.css({\n          transition: \"all \" + d + \"s ease-out\"\n        }), \"function\" == typeof a && a.call(b.element);\n      }, 20), b.attachEvents();\n    },\n    clickHandler: function clickHandler(b) {\n      b || (b = window.event), this.element.find(a(b.target).closest('button, a, input[type=\"submit\"]')).length || (this.isFlipped ? this.unflip() : this.flip());\n    },\n    hoverHandler: function hoverHandler() {\n      var b = this;\n      b.element.off(\"mouseleave.flip\"), b.flip(), setTimeout(function () {\n        b.element.on(\"mouseleave.flip\", a.proxy(b.unflip, b)), b.element.is(\":hover\") || b.unflip();\n      }, b.setting.speed + 150);\n    },\n    attachEvents: function attachEvents() {\n      var b = this;\n      \"click\" === b.setting.trigger ? b.element.on(a.fn.tap ? \"tap.flip\" : \"click.flip\", a.proxy(b.clickHandler, b)) : \"hover\" === b.setting.trigger && (b.element.on(\"mouseenter.flip\", a.proxy(b.hoverHandler, b)), b.element.on(\"mouseleave.flip\", a.proxy(b.unflip, b)));\n    },\n    flipChanged: function flipChanged(a) {\n      this.element.trigger(\"flip:change\"), \"function\" == typeof a && a.call(this.element);\n    },\n    changeSettings: function changeSettings(a, b) {\n      var c = this,\n        d = !1;\n      if (void 0 !== a.axis && c.setting.axis !== a.axis.toLowerCase() && (c.setting.axis = a.axis.toLowerCase(), d = !0), void 0 !== a.reverse && c.setting.reverse !== a.reverse && (c.setting.reverse = a.reverse, d = !0), d) {\n        var e = c.frontElement.add(c.backElement),\n          f = e.css([\"transition-property\", \"transition-timing-function\", \"transition-duration\", \"transition-delay\"]);\n        e.css({\n          transition: \"none\"\n        });\n        var g = \"rotate\" + c.setting.axis;\n        c.isFlipped ? c.frontElement.css({\n          transform: g + (c.setting.reverse ? \"(-180deg)\" : \"(180deg)\"),\n          \"z-index\": \"0\"\n        }) : c.backElement.css({\n          transform: g + (c.setting.reverse ? \"(180deg)\" : \"(-180deg)\"),\n          \"z-index\": \"0\"\n        }), setTimeout(function () {\n          e.css(f), c.flipChanged(b);\n        }, 0);\n      } else c.flipChanged(b);\n    }\n  }), a.fn.flip = function (b, d) {\n    return \"function\" == typeof b && (d = b), \"string\" == typeof b || \"boolean\" == typeof b ? this.each(function () {\n      var c = a(this).data(\"flip-model\");\n      \"toggle\" === b && (b = !c.isFlipped), b ? c.flip(d) : c.unflip(d);\n    }) : this.each(function () {\n      if (a(this).data(\"flip-model\")) {\n        var e = a(this).data(\"flip-model\");\n        !b || void 0 === b.axis && void 0 === b.reverse || e.changeSettings(b, d);\n      } else a(this).data(\"flip-model\", new c(a(this), b || {}, d));\n    }), this;\n  };\n}(jQuery);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _sc_01_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sc-01.less */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.less\");\n/* harmony import */ var _sc_01_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_sc_01_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jquery.flip.min */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js\");\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sc-01\",\n  title: \"Double-sided cards\",\n  subtitle: \"to memorize concepts with text\",\n  contentSetting: {\n    shuffle: {\n      name: \"Shuffle cards?\",\n      type: \"bool\",\n      hidden: {\n        btn: {\n          type: \"textEditor\",\n          name: \"Button text\"\n        }\n      }\n    },\n    cards: {\n      name: \"Card parametters\",\n      // not necessary there\n      type: \"array\",\n      values: {\n        front: {\n          name: \"Front of the card\",\n          // not necessary there\n          type: \"textEditor\"\n        },\n        back: {\n          name: \"Back of the card\",\n          // not necessary there\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    cards: [{\n      front: \"Front\",\n      back: \"Back\"\n    }, {\n      front: \"Front 2\",\n      back: \"Back 2\"\n    }],\n    shuffle: false,\n    btn: \"zamíchat\"\n  },\n  html: function html(content, builder) {\n    return \"\\n\\n<div class=\\\"row\\\">\\n              \".concat(content.cards.map(function (card) {\n      return \"\\n<div class=\\\"col-100 small-50\\\">\\n            <div class=\\\"shake-card-item\\\">\\n                            <div class=\\\"flip-card card-rotate-img\\\">\\n                                <div class=\\\"face front elevation-9\\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_right</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n                                            \".concat(card.front, \"\\n                                        </div>\\n\\n                                    </div>\\n                                </div>\\n\\n                                <div class=\\\"face back elevation-9\\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_left</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n                                            <div class=\\\"block\\\">\\n                                              \").concat(card.back, \"\\n                                            </div>\\n                                        </div>\\n                                    </div>\\n                                </div>\\n                            </div>\\n                        </div>\\n            </div>\\n          \");\n    }).join(\"\"), \"\\n              </div>\\n              \").concat(content.shuffle ? \"<button class=\\\"button-fill button button-shuffle\\\">\".concat(content.btn, \"</button>\") : \"\", \"\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n      var $btn = $builderEl.find(\".button-shuffle\");\n      $btn.off(\"click\");\n      $btn.on(\"click\", function (o) {\n        $$(o.target).prop({\n          disabled: true\n        });\n        var $shakeCardsItems = $builderEl.find(\".small-50\");\n        var j;\n        var _loop = function _loop() {\n          var $elem = $($shakeCardsItems[i]);\n          j = Math.floor(Math.random() * $shakeCardsItems.length);\n          var topOld = $elem.position().top;\n          var leftOld = $elem.position().left;\n          var width = $elem.width();\n          var $clon = $elem.clone().appendTo($($shakeCardsItems[i]).parent());\n          $elem.insertBefore($($shakeCardsItems[j])).css(\"opacity\", 0);\n          $clon.css(\"position\", \"absolute\").css(\"width\", width).css(\"top\", topOld).css(\"left\", leftOld).css(\"opacity\", 1);\n          setTimeout(function () {\n            var top = $elem.position().top;\n            var left = $elem.position().left;\n            $clon.animate({\n              top: top + \"px\",\n              left: left + \"px\"\n            }, 1000, function () {}).promise().done(function () {\n              $elem.css(\"opacity\", 1);\n              $(this).remove();\n            });\n          }, 100);\n        };\n        for (var i = 0; i < $shakeCardsItems.length; i++) {\n          _loop();\n        }\n        setTimeout(function () {\n          $$(o.target).prop({\n            disabled: false\n          });\n        }, 1000);\n      });\n    },\n    update: function update($builderEl, builder) {\n      // alert('update');\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.less":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.less ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _sc_02_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sc-02.less */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.less\");\n/* harmony import */ var _sc_02_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_sc_02_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jquery.flip.min */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js\");\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sc-02\",\n  title: \"Double-sided cards\",\n  subtitle: \"with images\",\n  contentSetting: {\n    shuffle: {\n      name: \"Shuffle cards?\",\n      type: \"bool\",\n      hidden: {\n        btn: {\n          type: \"textEditor\",\n          name: \"Button text\"\n        }\n      }\n    },\n    cards: {\n      name: \"Card parametters\",\n      // not necessary there\n      type: \"array\",\n      values: {\n        imgFront: {\n          name: \"Image on front of the card\",\n          // not necessary there\n          type: \"image\"\n        },\n        imgBack: {\n          name: \"Image on back of the card\",\n          // not necessary there\n          type: \"image\"\n        }\n      }\n    }\n  },\n  content: {\n    cards: [{\n      imgFront: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\",\n      imgBack: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\"\n    }, {\n      imgFront: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      imgBack: \"{{mediaServerDomain}}/public/ud7r0q98m96y5bvuz9pf3py3brfiapg92hgxneioqnl7gdg2xejxzcj6yphn7lfi.jpg\"\n    }],\n    shuffle: false,\n    btn: \"zamíchat\"\n  },\n  html: function html(content, builder) {\n    return \"\\n\\n<div class=\\\"row align-items-stretch\\\">\\n              \".concat(content.cards.map(function (card) {\n      return \"\\n<div class=\\\"col-50\\\">\\n            <div class=\\\"shake-card-item\\\">\\n                            <div class=\\\"flip-card card-rotate-img\\\">\\n                                <div class=\\\"face front elevation-9\\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_right</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n                                          <img class=\\\"cardImg\\\" src=\\\"\".concat(card.imgFront, \"\\\" />\\n                                        </div>\\n                                    </div>\\n                                </div>\\n\\n                                <div class=\\\"face back elevation-9\\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_left</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n\\n                                            <img class=\\\"cardImg\\\" src=\\\"\").concat(card.imgBack, \"\\\" />\\n\\n                                        </div>\\n                                    </div>\\n                                </div>\\n                            </div>\\n                        </div>\\n            </div>\\n          \");\n    }).join(\"\"), \"\\n              </div>\\n              \").concat(content.shuffle ? \"<button class=\\\"button-fill button button-shuffle\\\">\".concat(content.btn, \"</button>\") : \"\", \"\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n      var $btn = $builderEl.find(\".button-shuffle\");\n      $btn.off(\"click\");\n      $btn.on(\"click\", function (o) {\n        $$(o.target).prop({\n          disabled: true\n        });\n        var $shakeCardsItems = $builderEl.find(\".shake-card-item\");\n        var j;\n        var _loop = function _loop() {\n          var $elem = $($shakeCardsItems[i]);\n          j = Math.floor(Math.random() * $shakeCardsItems.length);\n          var topOld = $elem.position().top;\n          var leftOld = $elem.position().left;\n          var width = $elem.width();\n          var $clon = $elem.clone().appendTo($($shakeCardsItems[i]).parent());\n          $elem.insertBefore($($shakeCardsItems[j])).css(\"opacity\", 0);\n          $clon.css(\"position\", \"absolute\").css(\"width\", width).css(\"top\", topOld).css(\"left\", leftOld).css(\"opacity\", 1);\n          setTimeout(function () {\n            var top = $elem.position().top;\n            var left = $elem.position().left;\n            $clon.animate({\n              top: top + \"px\",\n              left: left + \"px\"\n            }, 1000, function () {}).promise().done(function () {\n              $elem.css(\"opacity\", 1);\n              $(this).remove();\n            });\n          }, 100);\n        };\n        for (var i = 0; i < $shakeCardsItems.length; i++) {\n          _loop();\n        }\n        setTimeout(function () {\n          $$(o.target).prop({\n            disabled: false\n          });\n        }, 1000);\n      });\n    },\n    update: function update($builderEl, builder) {\n      // alert('update');\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.less":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.less ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _sc_03_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sc-03.less */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.less\");\n/* harmony import */ var _sc_03_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_sc_03_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jquery.flip.min */ \"./src/core/custom_plugins/builder/components/_en/shake-cards/jquery.flip.min.js\");\n/* harmony import */ var _jquery_flip_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jquery_flip_min__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  el: \"f\",\n  url: \"/components/\",\n  name: \"sc-03\",\n  title: \"Double-sided cards\",\n  subtitle: \"with image and text\",\n  contentSetting: {\n    shuffle: {\n      name: \"Shuffle cards?\",\n      type: \"bool\",\n      hidden: {\n        btn: {\n          type: \"textEditor\",\n          name: \"Button text\"\n        }\n      }\n    },\n    imageBack: {\n      name: \"Show image on back side\",\n      type: \"bool\",\n      help: \"When this switch is off, image will be shown on front side\"\n    },\n    cards: {\n      name: \"Card parametters\",\n      // not necessary there\n      type: \"array\",\n      values: {\n        imgFront: {\n          name: \"Card image\",\n          // not necessary there\n          type: \"image\"\n        },\n        back: {\n          name: \"Card text\",\n          // not necessary there\n          type: \"textEditor\"\n        }\n      }\n    }\n  },\n  content: {\n    cards: [{\n      imgFront: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      back: \"Back\"\n    }, {\n      imgFront: \"{{mediaServerDomain}}/public/5r0iv5lmbh757s8bzhkmt14qxcwimfpqy2norc8ajrmh97cbnv66boytletutxof.jpg\",\n      back: \"Back 2\"\n    }],\n    imageBack: false,\n    shuffle: false,\n    btn: \"zamíchat\"\n  },\n  html: function html(content, builder) {\n    return \"\\n    <div class=\\\"row align-items-stretch\\\">\\n              \".concat(content.cards.map(function (card) {\n      return \"\\n<div class=\\\"col-50\\\">\\n            <div class=\\\"shake-card-item\\\">\\n                            <div class=\\\"flip-card card-rotate-img\\\">\\n                                <div class=\\\"face front \\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_right</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n                                        \".concat(!content.imageBack ? \"<img class=\\\"cardImg\\\" src=\\\"\".concat(card.imgFront, \"\\\" />\") : \"\".concat(card.back), \"\\n\\n\\n                                        </div>\\n                                    </div>\\n                                </div>\\n\\n                                <div class=\\\"face back \\\">\\n                                    <div class=\\\"flip-card-content\\\">\\n                                        <div class=\\\"flip-icon\\\">\\n                                            <i class=\\\"icon material-icons\\\">rotate_left</i>\\n                                        </div>\\n                                        <div class=\\\"head\\\">\\n\\n                                        \").concat(content.imageBack ? \"<img class=\\\"cardImg\\\" src=\\\"\".concat(card.imgFront, \"\\\" />\") : \"  <div class=\\\"block\\\">\\n                                                  \".concat(card.back, \"\\n                                                </div>\"), \"\\n\\n                                        </div>\\n                                    </div>\\n                                </div>\\n                            </div>\\n                        </div>\\n            </div>\\n          \");\n    }).join(\"\"), \"\\n              </div>\\n              \").concat(content.shuffle ? \"<button class=\\\"button-fill button button-shuffle\\\">\".concat(content.btn, \"</button>\") : \"\", \"\\n            \");\n  },\n  on: {\n    init: function init($builderEl, builder) {\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n      var $btn = $builderEl.find(\".button-shuffle\");\n      $btn.off(\"click\");\n      $btn.on(\"click\", function (o) {\n        $$(o.target).prop({\n          disabled: true\n        });\n        var $shakeCardsItems = $builderEl.find(\".align-items-stretch\");\n        var j;\n        var _loop = function _loop() {\n          var $elem = $($shakeCardsItems[i]);\n          j = Math.floor(Math.random() * $shakeCardsItems.length);\n          var topOld = $elem.position().top;\n          var leftOld = $elem.position().left;\n          var width = $elem.width();\n          var $clon = $elem.clone().appendTo($($shakeCardsItems[i]).parent());\n          $elem.insertBefore($($shakeCardsItems[j])).css(\"opacity\", 0);\n          $clon.css(\"position\", \"absolute\").css(\"width\", width).css(\"top\", topOld).css(\"left\", leftOld).css(\"opacity\", 1);\n          setTimeout(function () {\n            var top = $elem.position().top;\n            var left = $elem.position().left;\n            $clon.animate({\n              top: top + \"px\",\n              left: left + \"px\"\n            }, 1000, function () {}).promise().done(function () {\n              $elem.css(\"opacity\", 1);\n              $(this).remove();\n            });\n          }, 100);\n        };\n        for (var i = 0; i < $shakeCardsItems.length; i++) {\n          _loop();\n        }\n        setTimeout(function () {\n          $$(o.target).prop({\n            disabled: false\n          });\n        }, 1000);\n      });\n    },\n    update: function update($builderEl, builder) {\n      // alert('update');\n      var jBlock = $(builder.block);\n      jBlock.find(\".flip-card\").flip();\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.less":
/*!*******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.less ***!
  \*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/shake-cards/sc-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/showcase/showcase-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tables/cells/cell-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tables/cells/cell-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.less":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.less ***!
  \**********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tables/cells/cell-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tables/table-01.less":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tables/table-01.less ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tables/table-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tables/table-02.less":
/*!*****************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tables/table-02.less ***!
  \*****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tables/table-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tabs/tab-menu-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/todo-01.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/todo-01.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/todo-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-01.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-01.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-02.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-02.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-03.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-03.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-04.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-04.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-04.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-05.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-05.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-05.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-06.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-06.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-06.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-07.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-07.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-07.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-08.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-08.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-08.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-09.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-09.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-09.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/text/tx-10.less":
/*!************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/text/tx-10.less ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/text/tx-10.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tiles/tile-01.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tiles/tile-01.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tiles/tile-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tiles/tile-02.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tiles/tile-02.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tiles/tile-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/tiles/tile-03.less":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/tiles/tile-03.less ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/tiles/tile-03.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/title/tl-01.less":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/title/tl-01.less ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/title/tl-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/title/tl-02.less":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/title/tl-02.less ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/title/tl-02.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/video-player/vp-01.less":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/video-player/vp-01.less ***!
  \********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/video-player/vp-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js":
/*!**********************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js ***!
  \**********************************************************************************************/
/*! no exports provided */
/*! ModuleConcatenation bailout: Module uses injected variables (module, global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(module, global) {/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n\n/*!\r\n * VERSION: 1.18.0\r\n * DATE: 2015-09-05\r\n * UPDATES AND DOCS AT: http://greensock.com\r\n *\r\n * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin\r\n *\r\n * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.\r\n * This work is subject to the terms at http://greensock.com/standard-license or for\r\n * Club GreenSock members, the software agreement that was issued with your membership.\r\n *\r\n * @author: Jack Doyle, jack@greensock.com\r\n **/\nvar _gsScope =  true && module.exports && \"undefined\" != typeof global ? global : undefined || window;\n(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push(function () {\n  \"use strict\";\n\n  _gsScope._gsDefine(\"TweenMax\", [\"core.Animation\", \"core.SimpleTimeline\", \"TweenLite\"], function (t, e, i) {\n    var s = function s(t) {\n        var e,\n          i = [],\n          s = t.length;\n        for (e = 0; e !== s; i.push(t[e++]));\n        return i;\n      },\n      r = function r(t, e, i) {\n        var s,\n          r,\n          n = t.cycle;\n        for (s in n) r = n[s], t[s] = \"function\" == typeof r ? r.call(e[i], i) : r[i % r.length];\n        delete t.cycle;\n      },\n      _n = function n(t, e, s) {\n        i.call(this, t, e, s), this._cycle = 0, this._yoyo = this.vars.yoyo === !0, this._repeat = this.vars.repeat || 0, this._repeatDelay = this.vars.repeatDelay || 0, this._dirty = !0, this.render = _n.prototype.render;\n      },\n      a = 1e-10,\n      o = i._internals,\n      l = o.isSelector,\n      h = o.isArray,\n      _ = _n.prototype = i.to({}, .1, {}),\n      u = [];\n    _n.version = \"1.18.0\", _.constructor = _n, _.kill()._gc = !1, _n.killTweensOf = _n.killDelayedCallsTo = i.killTweensOf, _n.getTweensOf = i.getTweensOf, _n.lagSmoothing = i.lagSmoothing, _n.ticker = i.ticker, _n.render = i.render, _.invalidate = function () {\n      return this._yoyo = this.vars.yoyo === !0, this._repeat = this.vars.repeat || 0, this._repeatDelay = this.vars.repeatDelay || 0, this._uncache(!0), i.prototype.invalidate.call(this);\n    }, _.updateTo = function (t, e) {\n      var s,\n        r = this.ratio,\n        n = this.vars.immediateRender || t.immediateRender;\n      e && this._startTime < this._timeline._time && (this._startTime = this._timeline._time, this._uncache(!1), this._gc ? this._enabled(!0, !1) : this._timeline.insert(this, this._startTime - this._delay));\n      for (s in t) this.vars[s] = t[s];\n      if (this._initted || n) if (e) this._initted = !1, n && this.render(0, !0, !0);else if (this._gc && this._enabled(!0, !1), this._notifyPluginsOfEnabled && this._firstPT && i._onPluginEvent(\"_onDisable\", this), this._time / this._duration > .998) {\n        var a = this._time;\n        this.render(0, !0, !1), this._initted = !1, this.render(a, !0, !1);\n      } else if (this._time > 0 || n) {\n        this._initted = !1, this._init();\n        for (var o, l = 1 / (1 - r), h = this._firstPT; h;) o = h.s + h.c, h.c *= l, h.s = o - h.c, h = h._next;\n      }\n      return this;\n    }, _.render = function (t, e, i) {\n      this._initted || 0 === this._duration && this.vars.repeat && this.invalidate();\n      var s,\n        r,\n        n,\n        l,\n        h,\n        _,\n        u,\n        c,\n        f = this._dirty ? this.totalDuration() : this._totalDuration,\n        p = this._time,\n        m = this._totalTime,\n        d = this._cycle,\n        g = this._duration,\n        v = this._rawPrevTime;\n      if (t >= f ? (this._totalTime = f, this._cycle = this._repeat, this._yoyo && 0 !== (1 & this._cycle) ? (this._time = 0, this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0) : (this._time = g, this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1), this._reversed || (s = !0, r = \"onComplete\", i = i || this._timeline.autoRemoveChildren), 0 === g && (this._initted || !this.vars.lazy || i) && (this._startTime === this._timeline._duration && (t = 0), (0 === t || 0 > v || v === a) && v !== t && (i = !0, v > a && (r = \"onReverseComplete\")), this._rawPrevTime = c = !e || t || v === t ? t : a)) : 1e-7 > t ? (this._totalTime = this._time = this._cycle = 0, this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0, (0 !== m || 0 === g && v > 0) && (r = \"onReverseComplete\", s = this._reversed), 0 > t && (this._active = !1, 0 === g && (this._initted || !this.vars.lazy || i) && (v >= 0 && (i = !0), this._rawPrevTime = c = !e || t || v === t ? t : a)), this._initted || (i = !0)) : (this._totalTime = this._time = t, 0 !== this._repeat && (l = g + this._repeatDelay, this._cycle = this._totalTime / l >> 0, 0 !== this._cycle && this._cycle === this._totalTime / l && this._cycle--, this._time = this._totalTime - this._cycle * l, this._yoyo && 0 !== (1 & this._cycle) && (this._time = g - this._time), this._time > g ? this._time = g : 0 > this._time && (this._time = 0)), this._easeType ? (h = this._time / g, _ = this._easeType, u = this._easePower, (1 === _ || 3 === _ && h >= .5) && (h = 1 - h), 3 === _ && (h *= 2), 1 === u ? h *= h : 2 === u ? h *= h * h : 3 === u ? h *= h * h * h : 4 === u && (h *= h * h * h * h), this.ratio = 1 === _ ? 1 - h : 2 === _ ? h : .5 > this._time / g ? h / 2 : 1 - h / 2) : this.ratio = this._ease.getRatio(this._time / g)), p === this._time && !i && d === this._cycle) return m !== this._totalTime && this._onUpdate && (e || this._callback(\"onUpdate\")), void 0;\n      if (!this._initted) {\n        if (this._init(), !this._initted || this._gc) return;\n        if (!i && this._firstPT && (this.vars.lazy !== !1 && this._duration || this.vars.lazy && !this._duration)) return this._time = p, this._totalTime = m, this._rawPrevTime = v, this._cycle = d, o.lazyTweens.push(this), this._lazy = [t, e], void 0;\n        this._time && !s ? this.ratio = this._ease.getRatio(this._time / g) : s && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1));\n      }\n      for (this._lazy !== !1 && (this._lazy = !1), this._active || !this._paused && this._time !== p && t >= 0 && (this._active = !0), 0 === m && (2 === this._initted && t > 0 && this._init(), this._startAt && (t >= 0 ? this._startAt.render(t, e, i) : r || (r = \"_dummyGS\")), this.vars.onStart && (0 !== this._totalTime || 0 === g) && (e || this._callback(\"onStart\"))), n = this._firstPT; n;) n.f ? n.t[n.p](n.c * this.ratio + n.s) : n.t[n.p] = n.c * this.ratio + n.s, n = n._next;\n      this._onUpdate && (0 > t && this._startAt && this._startTime && this._startAt.render(t, e, i), e || (this._totalTime !== m || s) && this._callback(\"onUpdate\")), this._cycle !== d && (e || this._gc || this.vars.onRepeat && this._callback(\"onRepeat\")), r && (!this._gc || i) && (0 > t && this._startAt && !this._onUpdate && this._startTime && this._startAt.render(t, e, i), s && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), this._active = !1), !e && this.vars[r] && this._callback(r), 0 === g && this._rawPrevTime === a && c !== a && (this._rawPrevTime = 0));\n    }, _n.to = function (t, e, i) {\n      return new _n(t, e, i);\n    }, _n.from = function (t, e, i) {\n      return i.runBackwards = !0, i.immediateRender = 0 != i.immediateRender, new _n(t, e, i);\n    }, _n.fromTo = function (t, e, i, s) {\n      return s.startAt = i, s.immediateRender = 0 != s.immediateRender && 0 != i.immediateRender, new _n(t, e, s);\n    }, _n.staggerTo = _n.allTo = function (t, e, a, o, _, c, f) {\n      o = o || 0;\n      var p,\n        m,\n        d,\n        g,\n        v = a.delay || 0,\n        y = [],\n        T = function T() {\n          a.onComplete && a.onComplete.apply(a.onCompleteScope || this, arguments), _.apply(f || a.callbackScope || this, c || u);\n        },\n        x = a.cycle,\n        w = a.startAt && a.startAt.cycle;\n      for (h(t) || (\"string\" == typeof t && (t = i.selector(t) || t), l(t) && (t = s(t))), t = t || [], 0 > o && (t = s(t), t.reverse(), o *= -1), p = t.length - 1, d = 0; p >= d; d++) {\n        m = {};\n        for (g in a) m[g] = a[g];\n        if (x && r(m, t, d), w) {\n          w = m.startAt = {};\n          for (g in a.startAt) w[g] = a.startAt[g];\n          r(m.startAt, t, d);\n        }\n        m.delay = v, d === p && _ && (m.onComplete = T), y[d] = new _n(t[d], e, m), v += o;\n      }\n      return y;\n    }, _n.staggerFrom = _n.allFrom = function (t, e, i, s, r, a, o) {\n      return i.runBackwards = !0, i.immediateRender = 0 != i.immediateRender, _n.staggerTo(t, e, i, s, r, a, o);\n    }, _n.staggerFromTo = _n.allFromTo = function (t, e, i, s, r, a, o, l) {\n      return s.startAt = i, s.immediateRender = 0 != s.immediateRender && 0 != i.immediateRender, _n.staggerTo(t, e, s, r, a, o, l);\n    }, _n.delayedCall = function (t, e, i, s, r) {\n      return new _n(e, 0, {\n        delay: t,\n        onComplete: e,\n        onCompleteParams: i,\n        callbackScope: s,\n        onReverseComplete: e,\n        onReverseCompleteParams: i,\n        immediateRender: !1,\n        useFrames: r,\n        overwrite: 0\n      });\n    }, _n.set = function (t, e) {\n      return new _n(t, 0, e);\n    }, _n.isTweening = function (t) {\n      return i.getTweensOf(t, !0).length > 0;\n    };\n    var _c = function c(t, e) {\n        for (var s = [], r = 0, n = t._first; n;) n instanceof i ? s[r++] = n : (e && (s[r++] = n), s = s.concat(_c(n, e)), r = s.length), n = n._next;\n        return s;\n      },\n      f = _n.getAllTweens = function (e) {\n        return _c(t._rootTimeline, e).concat(_c(t._rootFramesTimeline, e));\n      };\n    _n.killAll = function (t, i, s, r) {\n      null == i && (i = !0), null == s && (s = !0);\n      var n,\n        a,\n        o,\n        l = f(0 != r),\n        h = l.length,\n        _ = i && s && r;\n      for (o = 0; h > o; o++) a = l[o], (_ || a instanceof e || (n = a.target === a.vars.onComplete) && s || i && !n) && (t ? a.totalTime(a._reversed ? 0 : a.totalDuration()) : a._enabled(!1, !1));\n    }, _n.killChildTweensOf = function (t, e) {\n      if (null != t) {\n        var r,\n          a,\n          _,\n          u,\n          c,\n          f = o.tweenLookup;\n        if (\"string\" == typeof t && (t = i.selector(t) || t), l(t) && (t = s(t)), h(t)) for (u = t.length; --u > -1;) _n.killChildTweensOf(t[u], e);else {\n          r = [];\n          for (_ in f) for (a = f[_].target.parentNode; a;) a === t && (r = r.concat(f[_].tweens)), a = a.parentNode;\n          for (c = r.length, u = 0; c > u; u++) e && r[u].totalTime(r[u].totalDuration()), r[u]._enabled(!1, !1);\n        }\n      }\n    };\n    var p = function p(t, i, s, r) {\n      i = i !== !1, s = s !== !1, r = r !== !1;\n      for (var n, a, o = f(r), l = i && s && r, h = o.length; --h > -1;) a = o[h], (l || a instanceof e || (n = a.target === a.vars.onComplete) && s || i && !n) && a.paused(t);\n    };\n    return _n.pauseAll = function (t, e, i) {\n      p(!0, t, e, i);\n    }, _n.resumeAll = function (t, e, i) {\n      p(!1, t, e, i);\n    }, _n.globalTimeScale = function (e) {\n      var s = t._rootTimeline,\n        r = i.ticker.time;\n      return arguments.length ? (e = e || a, s._startTime = r - (r - s._startTime) * s._timeScale / e, s = t._rootFramesTimeline, r = i.ticker.frame, s._startTime = r - (r - s._startTime) * s._timeScale / e, s._timeScale = t._rootTimeline._timeScale = e, e) : s._timeScale;\n    }, _.progress = function (t) {\n      return arguments.length ? this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - t : t) + this._cycle * (this._duration + this._repeatDelay), !1) : this._time / this.duration();\n    }, _.totalProgress = function (t) {\n      return arguments.length ? this.totalTime(this.totalDuration() * t, !1) : this._totalTime / this.totalDuration();\n    }, _.time = function (t, e) {\n      return arguments.length ? (this._dirty && this.totalDuration(), t > this._duration && (t = this._duration), this._yoyo && 0 !== (1 & this._cycle) ? t = this._duration - t + this._cycle * (this._duration + this._repeatDelay) : 0 !== this._repeat && (t += this._cycle * (this._duration + this._repeatDelay)), this.totalTime(t, e)) : this._time;\n    }, _.duration = function (e) {\n      return arguments.length ? t.prototype.duration.call(this, e) : this._duration;\n    }, _.totalDuration = function (t) {\n      return arguments.length ? -1 === this._repeat ? this : this.duration((t - this._repeat * this._repeatDelay) / (this._repeat + 1)) : (this._dirty && (this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat, this._dirty = !1), this._totalDuration);\n    }, _.repeat = function (t) {\n      return arguments.length ? (this._repeat = t, this._uncache(!0)) : this._repeat;\n    }, _.repeatDelay = function (t) {\n      return arguments.length ? (this._repeatDelay = t, this._uncache(!0)) : this._repeatDelay;\n    }, _.yoyo = function (t) {\n      return arguments.length ? (this._yoyo = t, this) : this._yoyo;\n    }, _n;\n  }, !0), _gsScope._gsDefine(\"TimelineLite\", [\"core.Animation\", \"core.SimpleTimeline\", \"TweenLite\"], function (t, e, i) {\n    var s = function s(t) {\n        e.call(this, t), this._labels = {}, this.autoRemoveChildren = this.vars.autoRemoveChildren === !0, this.smoothChildTiming = this.vars.smoothChildTiming === !0, this._sortChildren = !0, this._onUpdate = this.vars.onUpdate;\n        var i,\n          s,\n          r = this.vars;\n        for (s in r) i = r[s], l(i) && -1 !== i.join(\"\").indexOf(\"{self}\") && (r[s] = this._swapSelfInParams(i));\n        l(r.tweens) && this.add(r.tweens, 0, r.align, r.stagger);\n      },\n      r = 1e-10,\n      n = i._internals,\n      a = s._internals = {},\n      o = n.isSelector,\n      l = n.isArray,\n      h = n.lazyTweens,\n      _ = n.lazyRender,\n      u = _gsScope._gsDefine.globals,\n      c = function c(t) {\n        var e,\n          i = {};\n        for (e in t) i[e] = t[e];\n        return i;\n      },\n      f = function f(t, e, i) {\n        var s,\n          r,\n          n = t.cycle;\n        for (s in n) r = n[s], t[s] = \"function\" == typeof r ? r.call(e[i], i) : r[i % r.length];\n        delete t.cycle;\n      },\n      p = a.pauseCallback = function () {},\n      m = function m(t) {\n        var e,\n          i = [],\n          s = t.length;\n        for (e = 0; e !== s; i.push(t[e++]));\n        return i;\n      },\n      d = s.prototype = new e();\n    return s.version = \"1.18.0\", d.constructor = s, d.kill()._gc = d._forcingPlayhead = d._hasPause = !1, d.to = function (t, e, s, r) {\n      var n = s.repeat && u.TweenMax || i;\n      return e ? this.add(new n(t, e, s), r) : this.set(t, s, r);\n    }, d.from = function (t, e, s, r) {\n      return this.add((s.repeat && u.TweenMax || i).from(t, e, s), r);\n    }, d.fromTo = function (t, e, s, r, n) {\n      var a = r.repeat && u.TweenMax || i;\n      return e ? this.add(a.fromTo(t, e, s, r), n) : this.set(t, r, n);\n    }, d.staggerTo = function (t, e, r, n, a, l, h, _) {\n      var u,\n        p,\n        d = new s({\n          onComplete: l,\n          onCompleteParams: h,\n          callbackScope: _,\n          smoothChildTiming: this.smoothChildTiming\n        }),\n        g = r.cycle;\n      for (\"string\" == typeof t && (t = i.selector(t) || t), t = t || [], o(t) && (t = m(t)), n = n || 0, 0 > n && (t = m(t), t.reverse(), n *= -1), p = 0; t.length > p; p++) u = c(r), u.startAt && (u.startAt = c(u.startAt), u.startAt.cycle && f(u.startAt, t, p)), g && f(u, t, p), d.to(t[p], e, u, p * n);\n      return this.add(d, a);\n    }, d.staggerFrom = function (t, e, i, s, r, n, a, o) {\n      return i.immediateRender = 0 != i.immediateRender, i.runBackwards = !0, this.staggerTo(t, e, i, s, r, n, a, o);\n    }, d.staggerFromTo = function (t, e, i, s, r, n, a, o, l) {\n      return s.startAt = i, s.immediateRender = 0 != s.immediateRender && 0 != i.immediateRender, this.staggerTo(t, e, s, r, n, a, o, l);\n    }, d.call = function (t, e, s, r) {\n      return this.add(i.delayedCall(0, t, e, s), r);\n    }, d.set = function (t, e, s) {\n      return s = this._parseTimeOrLabel(s, 0, !0), null == e.immediateRender && (e.immediateRender = s === this._time && !this._paused), this.add(new i(t, 0, e), s);\n    }, s.exportRoot = function (t, e) {\n      t = t || {}, null == t.smoothChildTiming && (t.smoothChildTiming = !0);\n      var r,\n        n,\n        a = new s(t),\n        o = a._timeline;\n      for (null == e && (e = !0), o._remove(a, !0), a._startTime = 0, a._rawPrevTime = a._time = a._totalTime = o._time, r = o._first; r;) n = r._next, e && r instanceof i && r.target === r.vars.onComplete || a.add(r, r._startTime - r._delay), r = n;\n      return o.add(a, 0), a;\n    }, d.add = function (r, n, a, o) {\n      var h, _, u, c, f, p;\n      if (\"number\" != typeof n && (n = this._parseTimeOrLabel(n, 0, !0, r)), !(r instanceof t)) {\n        if (r instanceof Array || r && r.push && l(r)) {\n          for (a = a || \"normal\", o = o || 0, h = n, _ = r.length, u = 0; _ > u; u++) l(c = r[u]) && (c = new s({\n            tweens: c\n          })), this.add(c, h), \"string\" != typeof c && \"function\" != typeof c && (\"sequence\" === a ? h = c._startTime + c.totalDuration() / c._timeScale : \"start\" === a && (c._startTime -= c.delay())), h += o;\n          return this._uncache(!0);\n        }\n        if (\"string\" == typeof r) return this.addLabel(r, n);\n        if (\"function\" != typeof r) throw \"Cannot add \" + r + \" into the timeline; it is not a tween, timeline, function, or string.\";\n        r = i.delayedCall(0, r);\n      }\n      if (e.prototype.add.call(this, r, n), (this._gc || this._time === this._duration) && !this._paused && this._duration < this.duration()) for (f = this, p = f.rawTime() > r._startTime; f._timeline;) p && f._timeline.smoothChildTiming ? f.totalTime(f._totalTime, !0) : f._gc && f._enabled(!0, !1), f = f._timeline;\n      return this;\n    }, d.remove = function (e) {\n      if (e instanceof t) {\n        this._remove(e, !1);\n        var i = e._timeline = e.vars.useFrames ? t._rootFramesTimeline : t._rootTimeline;\n        return e._startTime = (e._paused ? e._pauseTime : i._time) - (e._reversed ? e.totalDuration() - e._totalTime : e._totalTime) / e._timeScale, this;\n      }\n      if (e instanceof Array || e && e.push && l(e)) {\n        for (var s = e.length; --s > -1;) this.remove(e[s]);\n        return this;\n      }\n      return \"string\" == typeof e ? this.removeLabel(e) : this.kill(null, e);\n    }, d._remove = function (t, i) {\n      e.prototype._remove.call(this, t, i);\n      var s = this._last;\n      return s ? this._time > s._startTime + s._totalDuration / s._timeScale && (this._time = this.duration(), this._totalTime = this._totalDuration) : this._time = this._totalTime = this._duration = this._totalDuration = 0, this;\n    }, d.append = function (t, e) {\n      return this.add(t, this._parseTimeOrLabel(null, e, !0, t));\n    }, d.insert = d.insertMultiple = function (t, e, i, s) {\n      return this.add(t, e || 0, i, s);\n    }, d.appendMultiple = function (t, e, i, s) {\n      return this.add(t, this._parseTimeOrLabel(null, e, !0, t), i, s);\n    }, d.addLabel = function (t, e) {\n      return this._labels[t] = this._parseTimeOrLabel(e), this;\n    }, d.addPause = function (t, e, s, r) {\n      var n = i.delayedCall(0, p, s, r || this);\n      return n.vars.onComplete = n.vars.onReverseComplete = e, n.data = \"isPause\", this._hasPause = !0, this.add(n, t);\n    }, d.removeLabel = function (t) {\n      return delete this._labels[t], this;\n    }, d.getLabelTime = function (t) {\n      return null != this._labels[t] ? this._labels[t] : -1;\n    }, d._parseTimeOrLabel = function (e, i, s, r) {\n      var n;\n      if (r instanceof t && r.timeline === this) this.remove(r);else if (r && (r instanceof Array || r.push && l(r))) for (n = r.length; --n > -1;) r[n] instanceof t && r[n].timeline === this && this.remove(r[n]);\n      if (\"string\" == typeof i) return this._parseTimeOrLabel(i, s && \"number\" == typeof e && null == this._labels[i] ? e - this.duration() : 0, s);\n      if (i = i || 0, \"string\" != typeof e || !isNaN(e) && null == this._labels[e]) null == e && (e = this.duration());else {\n        if (n = e.indexOf(\"=\"), -1 === n) return null == this._labels[e] ? s ? this._labels[e] = this.duration() + i : i : this._labels[e] + i;\n        i = parseInt(e.charAt(n - 1) + \"1\", 10) * Number(e.substr(n + 1)), e = n > 1 ? this._parseTimeOrLabel(e.substr(0, n - 1), 0, s) : this.duration();\n      }\n      return Number(e) + i;\n    }, d.seek = function (t, e) {\n      return this.totalTime(\"number\" == typeof t ? t : this._parseTimeOrLabel(t), e !== !1);\n    }, d.stop = function () {\n      return this.paused(!0);\n    }, d.gotoAndPlay = function (t, e) {\n      return this.play(t, e);\n    }, d.gotoAndStop = function (t, e) {\n      return this.pause(t, e);\n    }, d.render = function (t, e, i) {\n      this._gc && this._enabled(!0, !1);\n      var s,\n        n,\n        a,\n        o,\n        l,\n        u,\n        c = this._dirty ? this.totalDuration() : this._totalDuration,\n        f = this._time,\n        p = this._startTime,\n        m = this._timeScale,\n        d = this._paused;\n      if (t >= c) this._totalTime = this._time = c, this._reversed || this._hasPausedChild() || (n = !0, o = \"onComplete\", l = !!this._timeline.autoRemoveChildren, 0 === this._duration && (0 === t || 0 > this._rawPrevTime || this._rawPrevTime === r) && this._rawPrevTime !== t && this._first && (l = !0, this._rawPrevTime > r && (o = \"onReverseComplete\"))), this._rawPrevTime = this._duration || !e || t || this._rawPrevTime === t ? t : r, t = c + 1e-4;else if (1e-7 > t) {\n        if (this._totalTime = this._time = 0, (0 !== f || 0 === this._duration && this._rawPrevTime !== r && (this._rawPrevTime > 0 || 0 > t && this._rawPrevTime >= 0)) && (o = \"onReverseComplete\", n = this._reversed), 0 > t) this._active = !1, this._timeline.autoRemoveChildren && this._reversed ? (l = n = !0, o = \"onReverseComplete\") : this._rawPrevTime >= 0 && this._first && (l = !0), this._rawPrevTime = t;else {\n          if (this._rawPrevTime = this._duration || !e || t || this._rawPrevTime === t ? t : r, 0 === t && n) for (s = this._first; s && 0 === s._startTime;) s._duration || (n = !1), s = s._next;\n          t = 0, this._initted || (l = !0);\n        }\n      } else {\n        if (this._hasPause && !this._forcingPlayhead && !e) {\n          if (t >= f) for (s = this._first; s && t >= s._startTime && !u;) s._duration || \"isPause\" !== s.data || s.ratio || 0 === s._startTime && 0 === this._rawPrevTime || (u = s), s = s._next;else for (s = this._last; s && s._startTime >= t && !u;) s._duration || \"isPause\" === s.data && s._rawPrevTime > 0 && (u = s), s = s._prev;\n          u && (this._time = t = u._startTime, this._totalTime = t + this._cycle * (this._totalDuration + this._repeatDelay));\n        }\n        this._totalTime = this._time = this._rawPrevTime = t;\n      }\n      if (this._time !== f && this._first || i || l || u) {\n        if (this._initted || (this._initted = !0), this._active || !this._paused && this._time !== f && t > 0 && (this._active = !0), 0 === f && this.vars.onStart && 0 !== this._time && (e || this._callback(\"onStart\")), this._time >= f) for (s = this._first; s && (a = s._next, !this._paused || d);) (s._active || s._startTime <= this._time && !s._paused && !s._gc) && (u === s && this.pause(), s._reversed ? s.render((s._dirty ? s.totalDuration() : s._totalDuration) - (t - s._startTime) * s._timeScale, e, i) : s.render((t - s._startTime) * s._timeScale, e, i)), s = a;else for (s = this._last; s && (a = s._prev, !this._paused || d);) {\n          if (s._active || f >= s._startTime && !s._paused && !s._gc) {\n            if (u === s) {\n              for (u = s._prev; u && u.endTime() > this._time;) u.render(u._reversed ? u.totalDuration() - (t - u._startTime) * u._timeScale : (t - u._startTime) * u._timeScale, e, i), u = u._prev;\n              u = null, this.pause();\n            }\n            s._reversed ? s.render((s._dirty ? s.totalDuration() : s._totalDuration) - (t - s._startTime) * s._timeScale, e, i) : s.render((t - s._startTime) * s._timeScale, e, i);\n          }\n          s = a;\n        }\n        this._onUpdate && (e || (h.length && _(), this._callback(\"onUpdate\"))), o && (this._gc || (p === this._startTime || m !== this._timeScale) && (0 === this._time || c >= this.totalDuration()) && (n && (h.length && _(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), this._active = !1), !e && this.vars[o] && this._callback(o)));\n      }\n    }, d._hasPausedChild = function () {\n      for (var t = this._first; t;) {\n        if (t._paused || t instanceof s && t._hasPausedChild()) return !0;\n        t = t._next;\n      }\n      return !1;\n    }, d.getChildren = function (t, e, s, r) {\n      r = r || -9999999999;\n      for (var n = [], a = this._first, o = 0; a;) r > a._startTime || (a instanceof i ? e !== !1 && (n[o++] = a) : (s !== !1 && (n[o++] = a), t !== !1 && (n = n.concat(a.getChildren(!0, e, s)), o = n.length))), a = a._next;\n      return n;\n    }, d.getTweensOf = function (t, e) {\n      var s,\n        r,\n        n = this._gc,\n        a = [],\n        o = 0;\n      for (n && this._enabled(!0, !0), s = i.getTweensOf(t), r = s.length; --r > -1;) (s[r].timeline === this || e && this._contains(s[r])) && (a[o++] = s[r]);\n      return n && this._enabled(!1, !0), a;\n    }, d.recent = function () {\n      return this._recent;\n    }, d._contains = function (t) {\n      for (var e = t.timeline; e;) {\n        if (e === this) return !0;\n        e = e.timeline;\n      }\n      return !1;\n    }, d.shiftChildren = function (t, e, i) {\n      i = i || 0;\n      for (var s, r = this._first, n = this._labels; r;) r._startTime >= i && (r._startTime += t), r = r._next;\n      if (e) for (s in n) n[s] >= i && (n[s] += t);\n      return this._uncache(!0);\n    }, d._kill = function (t, e) {\n      if (!t && !e) return this._enabled(!1, !1);\n      for (var i = e ? this.getTweensOf(e) : this.getChildren(!0, !0, !1), s = i.length, r = !1; --s > -1;) i[s]._kill(t, e) && (r = !0);\n      return r;\n    }, d.clear = function (t) {\n      var e = this.getChildren(!1, !0, !0),\n        i = e.length;\n      for (this._time = this._totalTime = 0; --i > -1;) e[i]._enabled(!1, !1);\n      return t !== !1 && (this._labels = {}), this._uncache(!0);\n    }, d.invalidate = function () {\n      for (var e = this._first; e;) e.invalidate(), e = e._next;\n      return t.prototype.invalidate.call(this);\n    }, d._enabled = function (t, i) {\n      if (t === this._gc) for (var s = this._first; s;) s._enabled(t, !0), s = s._next;\n      return e.prototype._enabled.call(this, t, i);\n    }, d.totalTime = function () {\n      this._forcingPlayhead = !0;\n      var e = t.prototype.totalTime.apply(this, arguments);\n      return this._forcingPlayhead = !1, e;\n    }, d.duration = function (t) {\n      return arguments.length ? (0 !== this.duration() && 0 !== t && this.timeScale(this._duration / t), this) : (this._dirty && this.totalDuration(), this._duration);\n    }, d.totalDuration = function (t) {\n      if (!arguments.length) {\n        if (this._dirty) {\n          for (var e, i, s = 0, r = this._last, n = 999999999999; r;) e = r._prev, r._dirty && r.totalDuration(), r._startTime > n && this._sortChildren && !r._paused ? this.add(r, r._startTime - r._delay) : n = r._startTime, 0 > r._startTime && !r._paused && (s -= r._startTime, this._timeline.smoothChildTiming && (this._startTime += r._startTime / this._timeScale), this.shiftChildren(-r._startTime, !1, -9999999999), n = 0), i = r._startTime + r._totalDuration / r._timeScale, i > s && (s = i), r = e;\n          this._duration = this._totalDuration = s, this._dirty = !1;\n        }\n        return this._totalDuration;\n      }\n      return 0 !== this.totalDuration() && 0 !== t && this.timeScale(this._totalDuration / t), this;\n    }, d.paused = function (e) {\n      if (!e) for (var i = this._first, s = this._time; i;) i._startTime === s && \"isPause\" === i.data && (i._rawPrevTime = 0), i = i._next;\n      return t.prototype.paused.apply(this, arguments);\n    }, d.usesFrames = function () {\n      for (var e = this._timeline; e._timeline;) e = e._timeline;\n      return e === t._rootFramesTimeline;\n    }, d.rawTime = function () {\n      return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;\n    }, s;\n  }, !0), _gsScope._gsDefine(\"TimelineMax\", [\"TimelineLite\", \"TweenLite\", \"easing.Ease\"], function (t, e, i) {\n    var s = function s(e) {\n        t.call(this, e), this._repeat = this.vars.repeat || 0, this._repeatDelay = this.vars.repeatDelay || 0, this._cycle = 0, this._yoyo = this.vars.yoyo === !0, this._dirty = !0;\n      },\n      r = 1e-10,\n      n = e._internals,\n      a = n.lazyTweens,\n      o = n.lazyRender,\n      l = new i(null, null, 1, 0),\n      h = s.prototype = new t();\n    return h.constructor = s, h.kill()._gc = !1, s.version = \"1.18.0\", h.invalidate = function () {\n      return this._yoyo = this.vars.yoyo === !0, this._repeat = this.vars.repeat || 0, this._repeatDelay = this.vars.repeatDelay || 0, this._uncache(!0), t.prototype.invalidate.call(this);\n    }, h.addCallback = function (t, i, s, r) {\n      return this.add(e.delayedCall(0, t, s, r), i);\n    }, h.removeCallback = function (t, e) {\n      if (t) if (null == e) this._kill(null, t);else for (var i = this.getTweensOf(t, !1), s = i.length, r = this._parseTimeOrLabel(e); --s > -1;) i[s]._startTime === r && i[s]._enabled(!1, !1);\n      return this;\n    }, h.removePause = function (e) {\n      return this.removeCallback(t._internals.pauseCallback, e);\n    }, h.tweenTo = function (t, i) {\n      i = i || {};\n      var s,\n        r,\n        n,\n        a = {\n          ease: l,\n          useFrames: this.usesFrames(),\n          immediateRender: !1\n        };\n      for (r in i) a[r] = i[r];\n      return a.time = this._parseTimeOrLabel(t), s = Math.abs(Number(a.time) - this._time) / this._timeScale || .001, n = new e(this, s, a), a.onStart = function () {\n        n.target.paused(!0), n.vars.time !== n.target.time() && s === n.duration() && n.duration(Math.abs(n.vars.time - n.target.time()) / n.target._timeScale), i.onStart && n._callback(\"onStart\");\n      }, n;\n    }, h.tweenFromTo = function (t, e, i) {\n      i = i || {}, t = this._parseTimeOrLabel(t), i.startAt = {\n        onComplete: this.seek,\n        onCompleteParams: [t],\n        callbackScope: this\n      }, i.immediateRender = i.immediateRender !== !1;\n      var s = this.tweenTo(e, i);\n      return s.duration(Math.abs(s.vars.time - t) / this._timeScale || .001);\n    }, h.render = function (t, e, i) {\n      this._gc && this._enabled(!0, !1);\n      var s,\n        n,\n        l,\n        h,\n        _,\n        u,\n        c,\n        f = this._dirty ? this.totalDuration() : this._totalDuration,\n        p = this._duration,\n        m = this._time,\n        d = this._totalTime,\n        g = this._startTime,\n        v = this._timeScale,\n        y = this._rawPrevTime,\n        T = this._paused,\n        x = this._cycle;\n      if (t >= f) this._locked || (this._totalTime = f, this._cycle = this._repeat), this._reversed || this._hasPausedChild() || (n = !0, h = \"onComplete\", _ = !!this._timeline.autoRemoveChildren, 0 === this._duration && (0 === t || 0 > y || y === r) && y !== t && this._first && (_ = !0, y > r && (h = \"onReverseComplete\"))), this._rawPrevTime = this._duration || !e || t || this._rawPrevTime === t ? t : r, this._yoyo && 0 !== (1 & this._cycle) ? this._time = t = 0 : (this._time = p, t = p + 1e-4);else if (1e-7 > t) {\n        if (this._locked || (this._totalTime = this._cycle = 0), this._time = 0, (0 !== m || 0 === p && y !== r && (y > 0 || 0 > t && y >= 0) && !this._locked) && (h = \"onReverseComplete\", n = this._reversed), 0 > t) this._active = !1, this._timeline.autoRemoveChildren && this._reversed ? (_ = n = !0, h = \"onReverseComplete\") : y >= 0 && this._first && (_ = !0), this._rawPrevTime = t;else {\n          if (this._rawPrevTime = p || !e || t || this._rawPrevTime === t ? t : r, 0 === t && n) for (s = this._first; s && 0 === s._startTime;) s._duration || (n = !1), s = s._next;\n          t = 0, this._initted || (_ = !0);\n        }\n      } else if (0 === p && 0 > y && (_ = !0), this._time = this._rawPrevTime = t, this._locked || (this._totalTime = t, 0 !== this._repeat && (u = p + this._repeatDelay, this._cycle = this._totalTime / u >> 0, 0 !== this._cycle && this._cycle === this._totalTime / u && this._cycle--, this._time = this._totalTime - this._cycle * u, this._yoyo && 0 !== (1 & this._cycle) && (this._time = p - this._time), this._time > p ? (this._time = p, t = p + 1e-4) : 0 > this._time ? this._time = t = 0 : t = this._time)), this._hasPause && !this._forcingPlayhead && !e) {\n        if (t = this._time, t >= m) for (s = this._first; s && t >= s._startTime && !c;) s._duration || \"isPause\" !== s.data || s.ratio || 0 === s._startTime && 0 === this._rawPrevTime || (c = s), s = s._next;else for (s = this._last; s && s._startTime >= t && !c;) s._duration || \"isPause\" === s.data && s._rawPrevTime > 0 && (c = s), s = s._prev;\n        c && (this._time = t = c._startTime, this._totalTime = t + this._cycle * (this._totalDuration + this._repeatDelay));\n      }\n      if (this._cycle !== x && !this._locked) {\n        var w = this._yoyo && 0 !== (1 & x),\n          b = w === (this._yoyo && 0 !== (1 & this._cycle)),\n          P = this._totalTime,\n          k = this._cycle,\n          S = this._rawPrevTime,\n          R = this._time;\n        if (this._totalTime = x * p, x > this._cycle ? w = !w : this._totalTime += p, this._time = m, this._rawPrevTime = 0 === p ? y - 1e-4 : y, this._cycle = x, this._locked = !0, m = w ? 0 : p, this.render(m, e, 0 === p), e || this._gc || this.vars.onRepeat && this._callback(\"onRepeat\"), b && (m = w ? p + 1e-4 : -1e-4, this.render(m, !0, !1)), this._locked = !1, this._paused && !T) return;\n        this._time = R, this._totalTime = P, this._cycle = k, this._rawPrevTime = S;\n      }\n      if (!(this._time !== m && this._first || i || _ || c)) return d !== this._totalTime && this._onUpdate && (e || this._callback(\"onUpdate\")), void 0;\n      if (this._initted || (this._initted = !0), this._active || !this._paused && this._totalTime !== d && t > 0 && (this._active = !0), 0 === d && this.vars.onStart && 0 !== this._totalTime && (e || this._callback(\"onStart\")), this._time >= m) for (s = this._first; s && (l = s._next, !this._paused || T);) (s._active || s._startTime <= this._time && !s._paused && !s._gc) && (c === s && this.pause(), s._reversed ? s.render((s._dirty ? s.totalDuration() : s._totalDuration) - (t - s._startTime) * s._timeScale, e, i) : s.render((t - s._startTime) * s._timeScale, e, i)), s = l;else for (s = this._last; s && (l = s._prev, !this._paused || T);) {\n        if (s._active || m >= s._startTime && !s._paused && !s._gc) {\n          if (c === s) {\n            for (c = s._prev; c && c.endTime() > this._time;) c.render(c._reversed ? c.totalDuration() - (t - c._startTime) * c._timeScale : (t - c._startTime) * c._timeScale, e, i), c = c._prev;\n            c = null, this.pause();\n          }\n          s._reversed ? s.render((s._dirty ? s.totalDuration() : s._totalDuration) - (t - s._startTime) * s._timeScale, e, i) : s.render((t - s._startTime) * s._timeScale, e, i);\n        }\n        s = l;\n      }\n      this._onUpdate && (e || (a.length && o(), this._callback(\"onUpdate\"))), h && (this._locked || this._gc || (g === this._startTime || v !== this._timeScale) && (0 === this._time || f >= this.totalDuration()) && (n && (a.length && o(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), this._active = !1), !e && this.vars[h] && this._callback(h)));\n    }, h.getActive = function (t, e, i) {\n      null == t && (t = !0), null == e && (e = !0), null == i && (i = !1);\n      var s,\n        r,\n        n = [],\n        a = this.getChildren(t, e, i),\n        o = 0,\n        l = a.length;\n      for (s = 0; l > s; s++) r = a[s], r.isActive() && (n[o++] = r);\n      return n;\n    }, h.getLabelAfter = function (t) {\n      t || 0 !== t && (t = this._time);\n      var e,\n        i = this.getLabelsArray(),\n        s = i.length;\n      for (e = 0; s > e; e++) if (i[e].time > t) return i[e].name;\n      return null;\n    }, h.getLabelBefore = function (t) {\n      null == t && (t = this._time);\n      for (var e = this.getLabelsArray(), i = e.length; --i > -1;) if (t > e[i].time) return e[i].name;\n      return null;\n    }, h.getLabelsArray = function () {\n      var t,\n        e = [],\n        i = 0;\n      for (t in this._labels) e[i++] = {\n        time: this._labels[t],\n        name: t\n      };\n      return e.sort(function (t, e) {\n        return t.time - e.time;\n      }), e;\n    }, h.progress = function (t, e) {\n      return arguments.length ? this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - t : t) + this._cycle * (this._duration + this._repeatDelay), e) : this._time / this.duration();\n    }, h.totalProgress = function (t, e) {\n      return arguments.length ? this.totalTime(this.totalDuration() * t, e) : this._totalTime / this.totalDuration();\n    }, h.totalDuration = function (e) {\n      return arguments.length ? -1 === this._repeat ? this : this.duration((e - this._repeat * this._repeatDelay) / (this._repeat + 1)) : (this._dirty && (t.prototype.totalDuration.call(this), this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat), this._totalDuration);\n    }, h.time = function (t, e) {\n      return arguments.length ? (this._dirty && this.totalDuration(), t > this._duration && (t = this._duration), this._yoyo && 0 !== (1 & this._cycle) ? t = this._duration - t + this._cycle * (this._duration + this._repeatDelay) : 0 !== this._repeat && (t += this._cycle * (this._duration + this._repeatDelay)), this.totalTime(t, e)) : this._time;\n    }, h.repeat = function (t) {\n      return arguments.length ? (this._repeat = t, this._uncache(!0)) : this._repeat;\n    }, h.repeatDelay = function (t) {\n      return arguments.length ? (this._repeatDelay = t, this._uncache(!0)) : this._repeatDelay;\n    }, h.yoyo = function (t) {\n      return arguments.length ? (this._yoyo = t, this) : this._yoyo;\n    }, h.currentLabel = function (t) {\n      return arguments.length ? this.seek(t, !0) : this.getLabelBefore(this._time + 1e-8);\n    }, s;\n  }, !0), function () {\n    var t = 180 / Math.PI,\n      e = [],\n      i = [],\n      s = [],\n      r = {},\n      n = _gsScope._gsDefine.globals,\n      a = function a(t, e, i, s) {\n        this.a = t, this.b = e, this.c = i, this.d = s, this.da = s - t, this.ca = i - t, this.ba = e - t;\n      },\n      o = \",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,\",\n      l = function l(t, e, i, s) {\n        var r = {\n            a: t\n          },\n          n = {},\n          a = {},\n          o = {\n            c: s\n          },\n          l = (t + e) / 2,\n          h = (e + i) / 2,\n          _ = (i + s) / 2,\n          u = (l + h) / 2,\n          c = (h + _) / 2,\n          f = (c - u) / 8;\n        return r.b = l + (t - l) / 4, n.b = u + f, r.c = n.a = (r.b + n.b) / 2, n.c = a.a = (u + c) / 2, a.b = c - f, o.b = _ + (s - _) / 4, a.c = o.a = (a.b + o.b) / 2, [r, n, a, o];\n      },\n      h = function h(t, r, n, a, o) {\n        var h,\n          _,\n          u,\n          c,\n          f,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y,\n          T,\n          x,\n          w = t.length - 1,\n          b = 0,\n          P = t[0].a;\n        for (h = 0; w > h; h++) f = t[b], _ = f.a, u = f.d, c = t[b + 1].d, o ? (y = e[h], T = i[h], x = .25 * (T + y) * r / (a ? .5 : s[h] || .5), p = u - (u - _) * (a ? .5 * r : 0 !== y ? x / y : 0), m = u + (c - u) * (a ? .5 * r : 0 !== T ? x / T : 0), d = u - (p + ((m - p) * (3 * y / (y + T) + .5) / 4 || 0))) : (p = u - .5 * (u - _) * r, m = u + .5 * (c - u) * r, d = u - (p + m) / 2), p += d, m += d, f.c = g = p, f.b = 0 !== h ? P : P = f.a + .6 * (f.c - f.a), f.da = u - _, f.ca = g - _, f.ba = P - _, n ? (v = l(_, P, g, u), t.splice(b, 1, v[0], v[1], v[2], v[3]), b += 4) : b++, P = m;\n        f = t[b], f.b = P, f.c = P + .4 * (f.d - P), f.da = f.d - f.a, f.ca = f.c - f.a, f.ba = P - f.a, n && (v = l(f.a, P, f.c, f.d), t.splice(b, 1, v[0], v[1], v[2], v[3]));\n      },\n      _ = function _(t, s, r, n) {\n        var o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f = [];\n        if (n) for (t = [n].concat(t), l = t.length; --l > -1;) \"string\" == typeof (c = t[l][s]) && \"=\" === c.charAt(1) && (t[l][s] = n[s] + Number(c.charAt(0) + c.substr(2)));\n        if (o = t.length - 2, 0 > o) return f[0] = new a(t[0][s], 0, 0, t[-1 > o ? 0 : 1][s]), f;\n        for (l = 0; o > l; l++) h = t[l][s], _ = t[l + 1][s], f[l] = new a(h, 0, 0, _), r && (u = t[l + 2][s], e[l] = (e[l] || 0) + (_ - h) * (_ - h), i[l] = (i[l] || 0) + (u - _) * (u - _));\n        return f[l] = new a(t[l][s], 0, 0, t[l + 1][s]), f;\n      },\n      u = function u(t, n, a, l, _u, c) {\n        var f,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y,\n          T,\n          x = {},\n          w = [],\n          b = c || t[0];\n        _u = \"string\" == typeof _u ? \",\" + _u + \",\" : o, null == n && (n = 1);\n        for (p in t[0]) w.push(p);\n        if (t.length > 1) {\n          for (T = t[t.length - 1], y = !0, f = w.length; --f > -1;) if (p = w[f], Math.abs(b[p] - T[p]) > .05) {\n            y = !1;\n            break;\n          }\n          y && (t = t.concat(), c && t.unshift(c), t.push(t[1]), c = t[t.length - 3]);\n        }\n        for (e.length = i.length = s.length = 0, f = w.length; --f > -1;) p = w[f], r[p] = -1 !== _u.indexOf(\",\" + p + \",\"), x[p] = _(t, p, r[p], c);\n        for (f = e.length; --f > -1;) e[f] = Math.sqrt(e[f]), i[f] = Math.sqrt(i[f]);\n        if (!l) {\n          for (f = w.length; --f > -1;) if (r[p]) for (m = x[w[f]], v = m.length - 1, d = 0; v > d; d++) g = m[d + 1].da / i[d] + m[d].da / e[d], s[d] = (s[d] || 0) + g * g;\n          for (f = s.length; --f > -1;) s[f] = Math.sqrt(s[f]);\n        }\n        for (f = w.length, d = a ? 4 : 1; --f > -1;) p = w[f], m = x[p], h(m, n, a, l, r[p]), y && (m.splice(0, d), m.splice(m.length - d, d));\n        return x;\n      },\n      c = function c(t, e, i) {\n        e = e || \"soft\";\n        var s,\n          r,\n          n,\n          o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f,\n          p,\n          m = {},\n          d = \"cubic\" === e ? 3 : 2,\n          g = \"soft\" === e,\n          v = [];\n        if (g && i && (t = [i].concat(t)), null == t || d + 1 > t.length) throw \"invalid Bezier data\";\n        for (c in t[0]) v.push(c);\n        for (h = v.length; --h > -1;) {\n          for (c = v[h], m[c] = l = [], f = 0, u = t.length, _ = 0; u > _; _++) s = null == i ? t[_][c] : \"string\" == typeof (p = t[_][c]) && \"=\" === p.charAt(1) ? i[c] + Number(p.charAt(0) + p.substr(2)) : Number(p), g && _ > 1 && u - 1 > _ && (l[f++] = (s + l[f - 2]) / 2), l[f++] = s;\n          for (u = f - d + 1, f = 0, _ = 0; u > _; _ += d) s = l[_], r = l[_ + 1], n = l[_ + 2], o = 2 === d ? 0 : l[_ + 3], l[f++] = p = 3 === d ? new a(s, r, n, o) : new a(s, (2 * r + s) / 3, (2 * r + n) / 3, n);\n          l.length = f;\n        }\n        return m;\n      },\n      f = function f(t, e, i) {\n        for (var s, r, n, a, o, l, h, _, u, c, f, p = 1 / i, m = t.length; --m > -1;) for (c = t[m], n = c.a, a = c.d - n, o = c.c - n, l = c.b - n, s = r = 0, _ = 1; i >= _; _++) h = p * _, u = 1 - h, s = r - (r = (h * h * a + 3 * u * (h * o + u * l)) * h), f = m * i + _ - 1, e[f] = (e[f] || 0) + s * s;\n      },\n      p = function p(t, e) {\n        e = e >> 0 || 6;\n        var i,\n          s,\n          r,\n          n,\n          a = [],\n          o = [],\n          l = 0,\n          h = 0,\n          _ = e - 1,\n          u = [],\n          c = [];\n        for (i in t) f(t[i], a, e);\n        for (r = a.length, s = 0; r > s; s++) l += Math.sqrt(a[s]), n = s % e, c[n] = l, n === _ && (h += l, n = s / e >> 0, u[n] = c, o[n] = h, l = 0, c = []);\n        return {\n          length: h,\n          lengths: o,\n          segments: u\n        };\n      },\n      m = _gsScope._gsDefine.plugin({\n        propName: \"bezier\",\n        priority: -1,\n        version: \"1.3.4\",\n        API: 2,\n        global: !0,\n        init: function init(t, e, i) {\n          this._target = t, e instanceof Array && (e = {\n            values: e\n          }), this._func = {}, this._round = {}, this._props = [], this._timeRes = null == e.timeResolution ? 6 : parseInt(e.timeResolution, 10);\n          var s,\n            r,\n            n,\n            a,\n            o,\n            l = e.values || [],\n            h = {},\n            _ = l[0],\n            f = e.autoRotate || i.vars.orientToBezier;\n          this._autoRotate = f ? f instanceof Array ? f : [[\"x\", \"y\", \"rotation\", f === !0 ? 0 : Number(f) || 0]] : null;\n          for (s in _) this._props.push(s);\n          for (n = this._props.length; --n > -1;) s = this._props[n], this._overwriteProps.push(s), r = this._func[s] = \"function\" == typeof t[s], h[s] = r ? t[s.indexOf(\"set\") || \"function\" != typeof t[\"get\" + s.substr(3)] ? s : \"get\" + s.substr(3)]() : parseFloat(t[s]), o || h[s] !== l[0][s] && (o = h);\n          if (this._beziers = \"cubic\" !== e.type && \"quadratic\" !== e.type && \"soft\" !== e.type ? u(l, isNaN(e.curviness) ? 1 : e.curviness, !1, \"thruBasic\" === e.type, e.correlate, o) : c(l, e.type, h), this._segCount = this._beziers[s].length, this._timeRes) {\n            var m = p(this._beziers, this._timeRes);\n            this._length = m.length, this._lengths = m.lengths, this._segments = m.segments, this._l1 = this._li = this._s1 = this._si = 0, this._l2 = this._lengths[0], this._curSeg = this._segments[0], this._s2 = this._curSeg[0], this._prec = 1 / this._curSeg.length;\n          }\n          if (f = this._autoRotate) for (this._initialRotations = [], f[0] instanceof Array || (this._autoRotate = f = [f]), n = f.length; --n > -1;) {\n            for (a = 0; 3 > a; a++) s = f[n][a], this._func[s] = \"function\" == typeof t[s] ? t[s.indexOf(\"set\") || \"function\" != typeof t[\"get\" + s.substr(3)] ? s : \"get\" + s.substr(3)] : !1;\n            s = f[n][2], this._initialRotations[n] = this._func[s] ? this._func[s].call(this._target) : this._target[s];\n          }\n          return this._startRatio = i.vars.runBackwards ? 1 : 0, !0;\n        },\n        set: function set(e) {\n          var i,\n            s,\n            r,\n            n,\n            a,\n            o,\n            l,\n            h,\n            _,\n            u,\n            c = this._segCount,\n            f = this._func,\n            p = this._target,\n            m = e !== this._startRatio;\n          if (this._timeRes) {\n            if (_ = this._lengths, u = this._curSeg, e *= this._length, r = this._li, e > this._l2 && c - 1 > r) {\n              for (h = c - 1; h > r && e >= (this._l2 = _[++r]););\n              this._l1 = _[r - 1], this._li = r, this._curSeg = u = this._segments[r], this._s2 = u[this._s1 = this._si = 0];\n            } else if (this._l1 > e && r > 0) {\n              for (; r > 0 && (this._l1 = _[--r]) >= e;);\n              0 === r && this._l1 > e ? this._l1 = 0 : r++, this._l2 = _[r], this._li = r, this._curSeg = u = this._segments[r], this._s1 = u[(this._si = u.length - 1) - 1] || 0, this._s2 = u[this._si];\n            }\n            if (i = r, e -= this._l1, r = this._si, e > this._s2 && u.length - 1 > r) {\n              for (h = u.length - 1; h > r && e >= (this._s2 = u[++r]););\n              this._s1 = u[r - 1], this._si = r;\n            } else if (this._s1 > e && r > 0) {\n              for (; r > 0 && (this._s1 = u[--r]) >= e;);\n              0 === r && this._s1 > e ? this._s1 = 0 : r++, this._s2 = u[r], this._si = r;\n            }\n            o = (r + (e - this._s1) / (this._s2 - this._s1)) * this._prec;\n          } else i = 0 > e ? 0 : e >= 1 ? c - 1 : c * e >> 0, o = (e - i * (1 / c)) * c;\n          for (s = 1 - o, r = this._props.length; --r > -1;) n = this._props[r], a = this._beziers[n][i], l = (o * o * a.da + 3 * s * (o * a.ca + s * a.ba)) * o + a.a, this._round[n] && (l = Math.round(l)), f[n] ? p[n](l) : p[n] = l;\n          if (this._autoRotate) {\n            var d,\n              g,\n              v,\n              y,\n              T,\n              x,\n              w,\n              b = this._autoRotate;\n            for (r = b.length; --r > -1;) n = b[r][2], x = b[r][3] || 0, w = b[r][4] === !0 ? 1 : t, a = this._beziers[b[r][0]], d = this._beziers[b[r][1]], a && d && (a = a[i], d = d[i], g = a.a + (a.b - a.a) * o, y = a.b + (a.c - a.b) * o, g += (y - g) * o, y += (a.c + (a.d - a.c) * o - y) * o, v = d.a + (d.b - d.a) * o, T = d.b + (d.c - d.b) * o, v += (T - v) * o, T += (d.c + (d.d - d.c) * o - T) * o, l = m ? Math.atan2(T - v, y - g) * w + x : this._initialRotations[r], f[n] ? p[n](l) : p[n] = l);\n          }\n        }\n      }),\n      d = m.prototype;\n    m.bezierThrough = u, m.cubicToQuadratic = l, m._autoCSS = !0, m.quadraticToCubic = function (t, e, i) {\n      return new a(t, (2 * e + t) / 3, (2 * e + i) / 3, i);\n    }, m._cssRegister = function () {\n      var t = n.CSSPlugin;\n      if (t) {\n        var e = t._internals,\n          i = e._parseToProxy,\n          s = e._setPluginRatio,\n          r = e.CSSPropTween;\n        e._registerComplexSpecialProp(\"bezier\", {\n          parser: function parser(t, e, n, a, o, l) {\n            e instanceof Array && (e = {\n              values: e\n            }), l = new m();\n            var h,\n              _,\n              u,\n              c = e.values,\n              f = c.length - 1,\n              p = [],\n              d = {};\n            if (0 > f) return o;\n            for (h = 0; f >= h; h++) u = i(t, c[h], a, o, l, f !== h), p[h] = u.end;\n            for (_ in e) d[_] = e[_];\n            return d.values = p, o = new r(t, \"bezier\", 0, 0, u.pt, 2), o.data = u, o.plugin = l, o.setRatio = s, 0 === d.autoRotate && (d.autoRotate = !0), !d.autoRotate || d.autoRotate instanceof Array || (h = d.autoRotate === !0 ? 0 : Number(d.autoRotate), d.autoRotate = null != u.end.left ? [[\"left\", \"top\", \"rotation\", h, !1]] : null != u.end.x ? [[\"x\", \"y\", \"rotation\", h, !1]] : !1), d.autoRotate && (a._transform || a._enableTransforms(!1), u.autoRotate = a._target._gsTransform), l._onInitTween(u.proxy, d, a._tween), o;\n          }\n        });\n      }\n    }, d._roundProps = function (t, e) {\n      for (var i = this._overwriteProps, s = i.length; --s > -1;) (t[i[s]] || t.bezier || t.bezierThrough) && (this._round[i[s]] = e);\n    }, d._kill = function (t) {\n      var e,\n        i,\n        s = this._props;\n      for (e in this._beziers) if (e in t) for (delete this._beziers[e], delete this._func[e], i = s.length; --i > -1;) s[i] === e && s.splice(i, 1);\n      return this._super._kill.call(this, t);\n    };\n  }(), _gsScope._gsDefine(\"plugins.CSSPlugin\", [\"plugins.TweenPlugin\", \"TweenLite\"], function (t, e) {\n    var i,\n      s,\n      r,\n      n,\n      _a = function a() {\n        t.call(this, \"css\"), this._overwriteProps.length = 0, this.setRatio = _a.prototype.setRatio;\n      },\n      o = _gsScope._gsDefine.globals,\n      l = {},\n      h = _a.prototype = new t(\"css\");\n    h.constructor = _a, _a.version = \"1.18.0\", _a.API = 2, _a.defaultTransformPerspective = 0, _a.defaultSkewType = \"compensated\", _a.defaultSmoothOrigin = !0, h = \"px\", _a.suffixMap = {\n      top: h,\n      right: h,\n      bottom: h,\n      left: h,\n      width: h,\n      height: h,\n      fontSize: h,\n      padding: h,\n      margin: h,\n      perspective: h,\n      lineHeight: \"\"\n    };\n    var _,\n      u,\n      c,\n      f,\n      p,\n      m,\n      d = /(?:\\d|\\-\\d|\\.\\d|\\-\\.\\d)+/g,\n      g = /(?:\\d|\\-\\d|\\.\\d|\\-\\.\\d|\\+=\\d|\\-=\\d|\\+=.\\d|\\-=\\.\\d)+/g,\n      v = /(?:\\+=|\\-=|\\-|\\b)[\\d\\-\\.]+[a-zA-Z0-9]*(?:%|\\b)/gi,\n      y = /(?![+-]?\\d*\\.?\\d+|[+-]|e[+-]\\d+)[^0-9]/g,\n      T = /(?:\\d|\\-|\\+|=|#|\\.)*/g,\n      x = /opacity *= *([^)]*)/i,\n      w = /opacity:([^;]*)/i,\n      b = /alpha\\(opacity *=.+?\\)/i,\n      P = /^(rgb|hsl)/,\n      k = /([A-Z])/g,\n      S = /-([a-z])/gi,\n      R = /(^(?:url\\(\\\"|url\\())|(?:(\\\"\\))$|\\)$)/gi,\n      O = function O(t, e) {\n        return e.toUpperCase();\n      },\n      A = /(?:Left|Right|Width)/i,\n      C = /(M11|M12|M21|M22)=[\\d\\-\\.e]+/gi,\n      D = /progid\\:DXImageTransform\\.Microsoft\\.Matrix\\(.+?\\)/i,\n      M = /,(?=[^\\)]*(?:\\(|$))/gi,\n      z = Math.PI / 180,\n      F = 180 / Math.PI,\n      I = {},\n      E = document,\n      N = function N(t) {\n        return E.createElementNS ? E.createElementNS(\"http://www.w3.org/1999/xhtml\", t) : E.createElement(t);\n      },\n      L = N(\"div\"),\n      X = N(\"img\"),\n      B = _a._internals = {\n        _specialProps: l\n      },\n      j = navigator.userAgent,\n      Y = function () {\n        var t = j.indexOf(\"Android\"),\n          e = N(\"a\");\n        return c = -1 !== j.indexOf(\"Safari\") && -1 === j.indexOf(\"Chrome\") && (-1 === t || Number(j.substr(t + 8, 1)) > 3), p = c && 6 > Number(j.substr(j.indexOf(\"Version/\") + 8, 1)), f = -1 !== j.indexOf(\"Firefox\"), (/MSIE ([0-9]{1,}[\\.0-9]{0,})/.exec(j) || /Trident\\/.*rv:([0-9]{1,}[\\.0-9]{0,})/.exec(j)) && (m = parseFloat(RegExp.$1)), e ? (e.style.cssText = \"top:1px;opacity:.55;\", /^0.55/.test(e.style.opacity)) : !1;\n      }(),\n      U = function U(t) {\n        return x.test(\"string\" == typeof t ? t : (t.currentStyle ? t.currentStyle.filter : t.style.filter) || \"\") ? parseFloat(RegExp.$1) / 100 : 1;\n      },\n      q = function q(t) {\n        window.console && console.log(t);\n      },\n      V = \"\",\n      G = \"\",\n      W = function W(t, e) {\n        e = e || L;\n        var i,\n          s,\n          r = e.style;\n        if (void 0 !== r[t]) return t;\n        for (t = t.charAt(0).toUpperCase() + t.substr(1), i = [\"O\", \"Moz\", \"ms\", \"Ms\", \"Webkit\"], s = 5; --s > -1 && void 0 === r[i[s] + t];);\n        return s >= 0 ? (G = 3 === s ? \"ms\" : i[s], V = \"-\" + G.toLowerCase() + \"-\", G + t) : null;\n      },\n      Z = E.defaultView ? E.defaultView.getComputedStyle : function () {},\n      Q = _a.getStyle = function (t, e, i, s, r) {\n        var n;\n        return Y || \"opacity\" !== e ? (!s && t.style[e] ? n = t.style[e] : (i = i || Z(t)) ? n = i[e] || i.getPropertyValue(e) || i.getPropertyValue(e.replace(k, \"-$1\").toLowerCase()) : t.currentStyle && (n = t.currentStyle[e]), null == r || n && \"none\" !== n && \"auto\" !== n && \"auto auto\" !== n ? n : r) : U(t);\n      },\n      $ = B.convertToPixels = function (t, i, s, r, n) {\n        if (\"px\" === r || !r) return s;\n        if (\"auto\" === r || !s) return 0;\n        var o,\n          l,\n          h,\n          _ = A.test(i),\n          u = t,\n          c = L.style,\n          f = 0 > s;\n        if (f && (s = -s), \"%\" === r && -1 !== i.indexOf(\"border\")) o = s / 100 * (_ ? t.clientWidth : t.clientHeight);else {\n          if (c.cssText = \"border:0 solid red;position:\" + Q(t, \"position\") + \";line-height:0;\", \"%\" !== r && u.appendChild && \"v\" !== r.charAt(0) && \"rem\" !== r) c[_ ? \"borderLeftWidth\" : \"borderTopWidth\"] = s + r;else {\n            if (u = t.parentNode || E.body, l = u._gsCache, h = e.ticker.frame, l && _ && l.time === h) return l.width * s / 100;\n            c[_ ? \"width\" : \"height\"] = s + r;\n          }\n          u.appendChild(L), o = parseFloat(L[_ ? \"offsetWidth\" : \"offsetHeight\"]), u.removeChild(L), _ && \"%\" === r && _a.cacheWidths !== !1 && (l = u._gsCache = u._gsCache || {}, l.time = h, l.width = 100 * (o / s)), 0 !== o || n || (o = $(t, i, s, r, !0));\n        }\n        return f ? -o : o;\n      },\n      H = B.calculateOffset = function (t, e, i) {\n        if (\"absolute\" !== Q(t, \"position\", i)) return 0;\n        var s = \"left\" === e ? \"Left\" : \"Top\",\n          r = Q(t, \"margin\" + s, i);\n        return t[\"offset\" + s] - ($(t, e, parseFloat(r), r.replace(T, \"\")) || 0);\n      },\n      K = function K(t, e) {\n        var i,\n          s,\n          r,\n          n = {};\n        if (e = e || Z(t, null)) {\n          if (i = e.length) for (; --i > -1;) r = e[i], (-1 === r.indexOf(\"-transform\") || ke === r) && (n[r.replace(S, O)] = e.getPropertyValue(r));else for (i in e) (-1 === i.indexOf(\"Transform\") || Pe === i) && (n[i] = e[i]);\n        } else if (e = t.currentStyle || t.style) for (i in e) \"string\" == typeof i && void 0 === n[i] && (n[i.replace(S, O)] = e[i]);\n        return Y || (n.opacity = U(t)), s = Ne(t, e, !1), n.rotation = s.rotation, n.skewX = s.skewX, n.scaleX = s.scaleX, n.scaleY = s.scaleY, n.x = s.x, n.y = s.y, Re && (n.z = s.z, n.rotationX = s.rotationX, n.rotationY = s.rotationY, n.scaleZ = s.scaleZ), n.filters && delete n.filters, n;\n      },\n      J = function J(t, e, i, s, r) {\n        var n,\n          a,\n          o,\n          l = {},\n          h = t.style;\n        for (a in i) \"cssText\" !== a && \"length\" !== a && isNaN(a) && (e[a] !== (n = i[a]) || r && r[a]) && -1 === a.indexOf(\"Origin\") && (\"number\" == typeof n || \"string\" == typeof n) && (l[a] = \"auto\" !== n || \"left\" !== a && \"top\" !== a ? \"\" !== n && \"auto\" !== n && \"none\" !== n || \"string\" != typeof e[a] || \"\" === e[a].replace(y, \"\") ? n : 0 : H(t, a), void 0 !== h[a] && (o = new pe(h, a, h[a], o)));\n        if (s) for (a in s) \"className\" !== a && (l[a] = s[a]);\n        return {\n          difs: l,\n          firstMPT: o\n        };\n      },\n      te = {\n        width: [\"Left\", \"Right\"],\n        height: [\"Top\", \"Bottom\"]\n      },\n      ee = [\"marginLeft\", \"marginRight\", \"marginTop\", \"marginBottom\"],\n      ie = function ie(t, e, i) {\n        var s = parseFloat(\"width\" === e ? t.offsetWidth : t.offsetHeight),\n          r = te[e],\n          n = r.length;\n        for (i = i || Z(t, null); --n > -1;) s -= parseFloat(Q(t, \"padding\" + r[n], i, !0)) || 0, s -= parseFloat(Q(t, \"border\" + r[n] + \"Width\", i, !0)) || 0;\n        return s;\n      },\n      se = function se(t, e) {\n        if (\"contain\" === t || \"auto\" === t || \"auto auto\" === t) return t + \" \";\n        (null == t || \"\" === t) && (t = \"0 0\");\n        var i = t.split(\" \"),\n          s = -1 !== t.indexOf(\"left\") ? \"0%\" : -1 !== t.indexOf(\"right\") ? \"100%\" : i[0],\n          r = -1 !== t.indexOf(\"top\") ? \"0%\" : -1 !== t.indexOf(\"bottom\") ? \"100%\" : i[1];\n        return null == r ? r = \"center\" === s ? \"50%\" : \"0\" : \"center\" === r && (r = \"50%\"), (\"center\" === s || isNaN(parseFloat(s)) && -1 === (s + \"\").indexOf(\"=\")) && (s = \"50%\"), t = s + \" \" + r + (i.length > 2 ? \" \" + i[2] : \"\"), e && (e.oxp = -1 !== s.indexOf(\"%\"), e.oyp = -1 !== r.indexOf(\"%\"), e.oxr = \"=\" === s.charAt(1), e.oyr = \"=\" === r.charAt(1), e.ox = parseFloat(s.replace(y, \"\")), e.oy = parseFloat(r.replace(y, \"\")), e.v = t), e || t;\n      },\n      re = function re(t, e) {\n        return \"string\" == typeof t && \"=\" === t.charAt(1) ? parseInt(t.charAt(0) + \"1\", 10) * parseFloat(t.substr(2)) : parseFloat(t) - parseFloat(e);\n      },\n      ne = function ne(t, e) {\n        return null == t ? e : \"string\" == typeof t && \"=\" === t.charAt(1) ? parseInt(t.charAt(0) + \"1\", 10) * parseFloat(t.substr(2)) + e : parseFloat(t);\n      },\n      ae = function ae(t, e, i, s) {\n        var r,\n          n,\n          a,\n          o,\n          l,\n          h = 1e-6;\n        return null == t ? o = e : \"number\" == typeof t ? o = t : (r = 360, n = t.split(\"_\"), l = \"=\" === t.charAt(1), a = (l ? parseInt(t.charAt(0) + \"1\", 10) * parseFloat(n[0].substr(2)) : parseFloat(n[0])) * (-1 === t.indexOf(\"rad\") ? 1 : F) - (l ? 0 : e), n.length && (s && (s[i] = e + a), -1 !== t.indexOf(\"short\") && (a %= r, a !== a % (r / 2) && (a = 0 > a ? a + r : a - r)), -1 !== t.indexOf(\"_cw\") && 0 > a ? a = (a + 9999999999 * r) % r - (0 | a / r) * r : -1 !== t.indexOf(\"ccw\") && a > 0 && (a = (a - 9999999999 * r) % r - (0 | a / r) * r)), o = e + a), h > o && o > -h && (o = 0), o;\n      },\n      oe = {\n        aqua: [0, 255, 255],\n        lime: [0, 255, 0],\n        silver: [192, 192, 192],\n        black: [0, 0, 0],\n        maroon: [128, 0, 0],\n        teal: [0, 128, 128],\n        blue: [0, 0, 255],\n        navy: [0, 0, 128],\n        white: [255, 255, 255],\n        fuchsia: [255, 0, 255],\n        olive: [128, 128, 0],\n        yellow: [255, 255, 0],\n        orange: [255, 165, 0],\n        gray: [128, 128, 128],\n        purple: [128, 0, 128],\n        green: [0, 128, 0],\n        red: [255, 0, 0],\n        pink: [255, 192, 203],\n        cyan: [0, 255, 255],\n        transparent: [255, 255, 255, 0]\n      },\n      le = function le(t, e, i) {\n        return t = 0 > t ? t + 1 : t > 1 ? t - 1 : t, 0 | 255 * (1 > 6 * t ? e + 6 * (i - e) * t : .5 > t ? i : 2 > 3 * t ? e + 6 * (i - e) * (2 / 3 - t) : e) + .5;\n      },\n      he = _a.parseColor = function (t, e) {\n        var i, s, r, n, a, o, l, h, _, u, c;\n        if (t) {\n          if (\"number\" == typeof t) i = [t >> 16, 255 & t >> 8, 255 & t];else {\n            if (\",\" === t.charAt(t.length - 1) && (t = t.substr(0, t.length - 1)), oe[t]) i = oe[t];else if (\"#\" === t.charAt(0)) 4 === t.length && (s = t.charAt(1), r = t.charAt(2), n = t.charAt(3), t = \"#\" + s + s + r + r + n + n), t = parseInt(t.substr(1), 16), i = [t >> 16, 255 & t >> 8, 255 & t];else if (\"hsl\" === t.substr(0, 3)) {\n              if (i = c = t.match(d), e) {\n                if (-1 !== t.indexOf(\"=\")) return t.match(g);\n              } else a = Number(i[0]) % 360 / 360, o = Number(i[1]) / 100, l = Number(i[2]) / 100, r = .5 >= l ? l * (o + 1) : l + o - l * o, s = 2 * l - r, i.length > 3 && (i[3] = Number(t[3])), i[0] = le(a + 1 / 3, s, r), i[1] = le(a, s, r), i[2] = le(a - 1 / 3, s, r);\n            } else i = t.match(d) || oe.transparent;\n            i[0] = Number(i[0]), i[1] = Number(i[1]), i[2] = Number(i[2]), i.length > 3 && (i[3] = Number(i[3]));\n          }\n        } else i = oe.black;\n        return e && !c && (s = i[0] / 255, r = i[1] / 255, n = i[2] / 255, h = Math.max(s, r, n), _ = Math.min(s, r, n), l = (h + _) / 2, h === _ ? a = o = 0 : (u = h - _, o = l > .5 ? u / (2 - h - _) : u / (h + _), a = h === s ? (r - n) / u + (n > r ? 6 : 0) : h === r ? (n - s) / u + 2 : (s - r) / u + 4, a *= 60), i[0] = 0 | a + .5, i[1] = 0 | 100 * o + .5, i[2] = 0 | 100 * l + .5), i;\n      },\n      _e = function _e(t, e) {\n        var i,\n          s,\n          r,\n          n = t.match(ue) || [],\n          a = 0,\n          o = n.length ? \"\" : t;\n        for (i = 0; n.length > i; i++) s = n[i], r = t.substr(a, t.indexOf(s, a) - a), a += r.length + s.length, s = he(s, e), 3 === s.length && s.push(1), o += r + (e ? \"hsla(\" + s[0] + \",\" + s[1] + \"%,\" + s[2] + \"%,\" + s[3] : \"rgba(\" + s.join(\",\")) + \")\";\n        return o;\n      },\n      ue = \"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#.+?\\\\b\";\n    for (h in oe) ue += \"|\" + h + \"\\\\b\";\n    ue = RegExp(ue + \")\", \"gi\"), _a.colorStringFilter = function (t) {\n      var e,\n        i = t[0] + t[1];\n      ue.lastIndex = 0, ue.test(i) && (e = -1 !== i.indexOf(\"hsl(\") || -1 !== i.indexOf(\"hsla(\"), t[0] = _e(t[0], e), t[1] = _e(t[1], e));\n    }, e.defaultStringFilter || (e.defaultStringFilter = _a.colorStringFilter);\n    var ce = function ce(t, e, i, s) {\n        if (null == t) return function (t) {\n          return t;\n        };\n        var r,\n          n = e ? (t.match(ue) || [\"\"])[0] : \"\",\n          a = t.split(n).join(\"\").match(v) || [],\n          o = t.substr(0, t.indexOf(a[0])),\n          l = \")\" === t.charAt(t.length - 1) ? \")\" : \"\",\n          h = -1 !== t.indexOf(\" \") ? \" \" : \",\",\n          _ = a.length,\n          u = _ > 0 ? a[0].replace(d, \"\") : \"\";\n        return _ ? r = e ? function (t) {\n          var e, c, f, p;\n          if (\"number\" == typeof t) t += u;else if (s && M.test(t)) {\n            for (p = t.replace(M, \"|\").split(\"|\"), f = 0; p.length > f; f++) p[f] = r(p[f]);\n            return p.join(\",\");\n          }\n          if (e = (t.match(ue) || [n])[0], c = t.split(e).join(\"\").match(v) || [], f = c.length, _ > f--) for (; _ > ++f;) c[f] = i ? c[0 | (f - 1) / 2] : a[f];\n          return o + c.join(h) + h + e + l + (-1 !== t.indexOf(\"inset\") ? \" inset\" : \"\");\n        } : function (t) {\n          var e, n, c;\n          if (\"number\" == typeof t) t += u;else if (s && M.test(t)) {\n            for (n = t.replace(M, \"|\").split(\"|\"), c = 0; n.length > c; c++) n[c] = r(n[c]);\n            return n.join(\",\");\n          }\n          if (e = t.match(v) || [], c = e.length, _ > c--) for (; _ > ++c;) e[c] = i ? e[0 | (c - 1) / 2] : a[c];\n          return o + e.join(h) + l;\n        } : function (t) {\n          return t;\n        };\n      },\n      fe = function fe(t) {\n        return t = t.split(\",\"), function (e, i, s, r, n, a, o) {\n          var l,\n            h = (i + \"\").split(\" \");\n          for (o = {}, l = 0; 4 > l; l++) o[t[l]] = h[l] = h[l] || h[(l - 1) / 2 >> 0];\n          return r.parse(e, o, n, a);\n        };\n      },\n      pe = (B._setPluginRatio = function (t) {\n        this.plugin.setRatio(t);\n        for (var e, i, s, r, n = this.data, a = n.proxy, o = n.firstMPT, l = 1e-6; o;) e = a[o.v], o.r ? e = Math.round(e) : l > e && e > -l && (e = 0), o.t[o.p] = e, o = o._next;\n        if (n.autoRotate && (n.autoRotate.rotation = a.rotation), 1 === t) for (o = n.firstMPT; o;) {\n          if (i = o.t, i.type) {\n            if (1 === i.type) {\n              for (r = i.xs0 + i.s + i.xs1, s = 1; i.l > s; s++) r += i[\"xn\" + s] + i[\"xs\" + (s + 1)];\n              i.e = r;\n            }\n          } else i.e = i.s + i.xs0;\n          o = o._next;\n        }\n      }, function (t, e, i, s, r) {\n        this.t = t, this.p = e, this.v = i, this.r = r, s && (s._prev = this, this._next = s);\n      }),\n      me = (B._parseToProxy = function (t, e, i, s, r, n) {\n        var a,\n          o,\n          l,\n          h,\n          _,\n          u = s,\n          c = {},\n          f = {},\n          p = i._transform,\n          m = I;\n        for (i._transform = null, I = e, s = _ = i.parse(t, e, s, r), I = m, n && (i._transform = p, u && (u._prev = null, u._prev && (u._prev._next = null))); s && s !== u;) {\n          if (1 >= s.type && (o = s.p, f[o] = s.s + s.c, c[o] = s.s, n || (h = new pe(s, \"s\", o, h, s.r), s.c = 0), 1 === s.type)) for (a = s.l; --a > 0;) l = \"xn\" + a, o = s.p + \"_\" + l, f[o] = s.data[l], c[o] = s[l], n || (h = new pe(s, l, o, h, s.rxp[l]));\n          s = s._next;\n        }\n        return {\n          proxy: c,\n          end: f,\n          firstMPT: h,\n          pt: _\n        };\n      }, B.CSSPropTween = function (t, e, s, r, a, o, l, h, _, u, c) {\n        this.t = t, this.p = e, this.s = s, this.c = r, this.n = l || e, t instanceof me || n.push(this.n), this.r = h, this.type = o || 0, _ && (this.pr = _, i = !0), this.b = void 0 === u ? s : u, this.e = void 0 === c ? s + r : c, a && (this._next = a, a._prev = this);\n      }),\n      de = function de(t, e, i, s, r, n) {\n        var a = new me(t, e, i, s - i, r, -1, n);\n        return a.b = i, a.e = a.xs0 = s, a;\n      },\n      ge = _a.parseComplex = function (t, e, i, s, r, n, a, o, l, h) {\n        i = i || n || \"\", a = new me(t, e, 0, 0, a, h ? 2 : 1, null, !1, o, i, s), s += \"\";\n        var u,\n          c,\n          f,\n          p,\n          m,\n          v,\n          y,\n          T,\n          x,\n          w,\n          b,\n          P,\n          k,\n          S = i.split(\", \").join(\",\").split(\" \"),\n          R = s.split(\", \").join(\",\").split(\" \"),\n          O = S.length,\n          A = _ !== !1;\n        for ((-1 !== s.indexOf(\",\") || -1 !== i.indexOf(\",\")) && (S = S.join(\" \").replace(M, \", \").split(\" \"), R = R.join(\" \").replace(M, \", \").split(\" \"), O = S.length), O !== R.length && (S = (n || \"\").split(\" \"), O = S.length), a.plugin = l, a.setRatio = h, ue.lastIndex = 0, u = 0; O > u; u++) if (p = S[u], m = R[u], T = parseFloat(p), T || 0 === T) a.appendXtra(\"\", T, re(m, T), m.replace(g, \"\"), A && -1 !== m.indexOf(\"px\"), !0);else if (r && ue.test(p)) P = \",\" === m.charAt(m.length - 1) ? \"),\" : \")\", k = -1 !== m.indexOf(\"hsl\") && Y, p = he(p, k), m = he(m, k), x = p.length + m.length > 6, x && !Y && 0 === m[3] ? (a[\"xs\" + a.l] += a.l ? \" transparent\" : \"transparent\", a.e = a.e.split(R[u]).join(\"transparent\")) : (Y || (x = !1), k ? a.appendXtra(x ? \"hsla(\" : \"hsl(\", p[0], re(m[0], p[0]), \",\", !1, !0).appendXtra(\"\", p[1], re(m[1], p[1]), \"%,\", !1).appendXtra(\"\", p[2], re(m[2], p[2]), x ? \"%,\" : \"%\" + P, !1) : a.appendXtra(x ? \"rgba(\" : \"rgb(\", p[0], m[0] - p[0], \",\", !0, !0).appendXtra(\"\", p[1], m[1] - p[1], \",\", !0).appendXtra(\"\", p[2], m[2] - p[2], x ? \",\" : P, !0), x && (p = 4 > p.length ? 1 : p[3], a.appendXtra(\"\", p, (4 > m.length ? 1 : m[3]) - p, P, !1))), ue.lastIndex = 0;else if (v = p.match(d)) {\n          if (y = m.match(g), !y || y.length !== v.length) return a;\n          for (f = 0, c = 0; v.length > c; c++) b = v[c], w = p.indexOf(b, f), a.appendXtra(p.substr(f, w - f), Number(b), re(y[c], b), \"\", A && \"px\" === p.substr(w + b.length, 2), 0 === c), f = w + b.length;\n          a[\"xs\" + a.l] += p.substr(f);\n        } else a[\"xs\" + a.l] += a.l ? \" \" + p : p;\n        if (-1 !== s.indexOf(\"=\") && a.data) {\n          for (P = a.xs0 + a.data.s, u = 1; a.l > u; u++) P += a[\"xs\" + u] + a.data[\"xn\" + u];\n          a.e = P + a[\"xs\" + u];\n        }\n        return a.l || (a.type = -1, a.xs0 = a.e), a.xfirst || a;\n      },\n      ve = 9;\n    for (h = me.prototype, h.l = h.pr = 0; --ve > 0;) h[\"xn\" + ve] = 0, h[\"xs\" + ve] = \"\";\n    h.xs0 = \"\", h._next = h._prev = h.xfirst = h.data = h.plugin = h.setRatio = h.rxp = null, h.appendXtra = function (t, e, i, s, r, n) {\n      var a = this,\n        o = a.l;\n      return a[\"xs\" + o] += n && o ? \" \" + t : t || \"\", i || 0 === o || a.plugin ? (a.l++, a.type = a.setRatio ? 2 : 1, a[\"xs\" + a.l] = s || \"\", o > 0 ? (a.data[\"xn\" + o] = e + i, a.rxp[\"xn\" + o] = r, a[\"xn\" + o] = e, a.plugin || (a.xfirst = new me(a, \"xn\" + o, e, i, a.xfirst || a, 0, a.n, r, a.pr), a.xfirst.xs0 = 0), a) : (a.data = {\n        s: e + i\n      }, a.rxp = {}, a.s = e, a.c = i, a.r = r, a)) : (a[\"xs\" + o] += e + (s || \"\"), a);\n    };\n    var ye = function ye(t, e) {\n        e = e || {}, this.p = e.prefix ? W(t) || t : t, l[t] = l[this.p] = this, this.format = e.formatter || ce(e.defaultValue, e.color, e.collapsible, e.multi), e.parser && (this.parse = e.parser), this.clrs = e.color, this.multi = e.multi, this.keyword = e.keyword, this.dflt = e.defaultValue, this.pr = e.priority || 0;\n      },\n      Te = B._registerComplexSpecialProp = function (t, e, i) {\n        \"object\" != _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(e) && (e = {\n          parser: i\n        });\n        var s,\n          r,\n          n = t.split(\",\"),\n          a = e.defaultValue;\n        for (i = i || [a], s = 0; n.length > s; s++) e.prefix = 0 === s && e.prefix, e.defaultValue = i[s] || a, r = new ye(n[s], e);\n      },\n      xe = function xe(t) {\n        if (!l[t]) {\n          var e = t.charAt(0).toUpperCase() + t.substr(1) + \"Plugin\";\n          Te(t, {\n            parser: function parser(t, i, s, r, n, a, h) {\n              var _ = o.com.greensock.plugins[e];\n              return _ ? (_._cssRegister(), l[s].parse(t, i, s, r, n, a, h)) : (q(\"Error: \" + e + \" js file not loaded.\"), n);\n            }\n          });\n        }\n      };\n    h = ye.prototype, h.parseComplex = function (t, e, i, s, r, n) {\n      var a,\n        o,\n        l,\n        h,\n        _,\n        u,\n        c = this.keyword;\n      if (this.multi && (M.test(i) || M.test(e) ? (o = e.replace(M, \"|\").split(\"|\"), l = i.replace(M, \"|\").split(\"|\")) : c && (o = [e], l = [i])), l) {\n        for (h = l.length > o.length ? l.length : o.length, a = 0; h > a; a++) e = o[a] = o[a] || this.dflt, i = l[a] = l[a] || this.dflt, c && (_ = e.indexOf(c), u = i.indexOf(c), _ !== u && (-1 === u ? o[a] = o[a].split(c).join(\"\") : -1 === _ && (o[a] += \" \" + c)));\n        e = o.join(\", \"), i = l.join(\", \");\n      }\n      return ge(t, this.p, e, i, this.clrs, this.dflt, s, this.pr, r, n);\n    }, h.parse = function (t, e, i, s, n, a) {\n      return this.parseComplex(t.style, this.format(Q(t, this.p, r, !1, this.dflt)), this.format(e), n, a);\n    }, _a.registerSpecialProp = function (t, e, i) {\n      Te(t, {\n        parser: function parser(t, s, r, n, a, o) {\n          var l = new me(t, r, 0, 0, a, 2, r, !1, i);\n          return l.plugin = o, l.setRatio = e(t, s, n._tween, r), l;\n        },\n        priority: i\n      });\n    }, _a.useSVGTransformAttr = c || f;\n    var we,\n      be = \"scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent\".split(\",\"),\n      Pe = W(\"transform\"),\n      ke = V + \"transform\",\n      Se = W(\"transformOrigin\"),\n      Re = null !== W(\"perspective\"),\n      Oe = B.Transform = function () {\n        this.perspective = parseFloat(_a.defaultTransformPerspective) || 0, this.force3D = _a.defaultForce3D !== !1 && Re ? _a.defaultForce3D || \"auto\" : !1;\n      },\n      Ae = window.SVGElement,\n      Ce = function Ce(t, e, i) {\n        var s,\n          r = E.createElementNS(\"http://www.w3.org/2000/svg\", t),\n          n = /([a-z])([A-Z])/g;\n        for (s in i) r.setAttributeNS(null, s.replace(n, \"$1-$2\").toLowerCase(), i[s]);\n        return e.appendChild(r), r;\n      },\n      De = E.documentElement,\n      Me = function () {\n        var t,\n          e,\n          i,\n          s = m || /Android/i.test(j) && !window.chrome;\n        return E.createElementNS && !s && (t = Ce(\"svg\", De), e = Ce(\"rect\", t, {\n          width: 100,\n          height: 50,\n          x: 100\n        }), i = e.getBoundingClientRect().width, e.style[Se] = \"50% 50%\", e.style[Pe] = \"scaleX(0.5)\", s = i === e.getBoundingClientRect().width && !(f && Re), De.removeChild(t)), s;\n      }(),\n      ze = function ze(t, e, i, s, r) {\n        var n,\n          o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y,\n          T = t._gsTransform,\n          x = Ee(t, !0);\n        T && (v = T.xOrigin, y = T.yOrigin), (!s || 2 > (n = s.split(\" \")).length) && (c = t.getBBox(), e = se(e).split(\" \"), n = [(-1 !== e[0].indexOf(\"%\") ? parseFloat(e[0]) / 100 * c.width : parseFloat(e[0])) + c.x, (-1 !== e[1].indexOf(\"%\") ? parseFloat(e[1]) / 100 * c.height : parseFloat(e[1])) + c.y]), i.xOrigin = h = parseFloat(n[0]), i.yOrigin = _ = parseFloat(n[1]), s && x !== Ie && (u = x[0], c = x[1], f = x[2], p = x[3], m = x[4], d = x[5], g = u * p - c * f, o = h * (p / g) + _ * (-f / g) + (f * d - p * m) / g, l = h * (-c / g) + _ * (u / g) - (u * d - c * m) / g, h = i.xOrigin = n[0] = o, _ = i.yOrigin = n[1] = l), T && (r || r !== !1 && _a.defaultSmoothOrigin !== !1 ? (o = h - v, l = _ - y, T.xOffset += o * x[0] + l * x[2] - o, T.yOffset += o * x[1] + l * x[3] - l) : T.xOffset = T.yOffset = 0), t.setAttribute(\"data-svg-origin\", n.join(\" \"));\n      },\n      Fe = function Fe(t) {\n        return !!(Ae && \"function\" == typeof t.getBBox && t.getCTM && (!t.parentNode || t.parentNode.getBBox && t.parentNode.getCTM));\n      },\n      Ie = [1, 0, 0, 1, 0, 0],\n      Ee = function Ee(t, e) {\n        var i,\n          s,\n          r,\n          n,\n          a,\n          o = t._gsTransform || new Oe(),\n          l = 1e5;\n        if (Pe ? s = Q(t, ke, null, !0) : t.currentStyle && (s = t.currentStyle.filter.match(C), s = s && 4 === s.length ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), o.x || 0, o.y || 0].join(\",\") : \"\"), i = !s || \"none\" === s || \"matrix(1, 0, 0, 1, 0, 0)\" === s, (o.svg || t.getBBox && Fe(t)) && (i && -1 !== (t.style[Pe] + \"\").indexOf(\"matrix\") && (s = t.style[Pe], i = 0), r = t.getAttribute(\"transform\"), i && r && (-1 !== r.indexOf(\"matrix\") ? (s = r, i = 0) : -1 !== r.indexOf(\"translate\") && (s = \"matrix(1,0,0,1,\" + r.match(/(?:\\-|\\b)[\\d\\-\\.e]+\\b/gi).join(\",\") + \")\", i = 0))), i) return Ie;\n        for (r = (s || \"\").match(/(?:\\-|\\b)[\\d\\-\\.e]+\\b/gi) || [], ve = r.length; --ve > -1;) n = Number(r[ve]), r[ve] = (a = n - (n |= 0)) ? (0 | a * l + (0 > a ? -.5 : .5)) / l + n : n;\n        return e && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r;\n      },\n      Ne = B.getTransform = function (t, i, s, n) {\n        if (t._gsTransform && s && !n) return t._gsTransform;\n        var o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f = s ? t._gsTransform || new Oe() : new Oe(),\n          p = 0 > f.scaleX,\n          m = 2e-5,\n          d = 1e5,\n          g = Re ? parseFloat(Q(t, Se, i, !1, \"0 0 0\").split(\" \")[2]) || f.zOrigin || 0 : 0,\n          v = parseFloat(_a.defaultTransformPerspective) || 0;\n        if (f.svg = !(!t.getBBox || !Fe(t)), f.svg && (ze(t, Q(t, Se, r, !1, \"50% 50%\") + \"\", f, t.getAttribute(\"data-svg-origin\")), we = _a.useSVGTransformAttr || Me), o = Ee(t), o !== Ie) {\n          if (16 === o.length) {\n            var y,\n              T,\n              x,\n              w,\n              b,\n              P = o[0],\n              k = o[1],\n              S = o[2],\n              R = o[3],\n              O = o[4],\n              A = o[5],\n              C = o[6],\n              D = o[7],\n              M = o[8],\n              z = o[9],\n              I = o[10],\n              E = o[12],\n              N = o[13],\n              L = o[14],\n              X = o[11],\n              B = Math.atan2(C, I);\n            f.zOrigin && (L = -f.zOrigin, E = M * L - o[12], N = z * L - o[13], L = I * L + f.zOrigin - o[14]), f.rotationX = B * F, B && (w = Math.cos(-B), b = Math.sin(-B), y = O * w + M * b, T = A * w + z * b, x = C * w + I * b, M = O * -b + M * w, z = A * -b + z * w, I = C * -b + I * w, X = D * -b + X * w, O = y, A = T, C = x), B = Math.atan2(M, I), f.rotationY = B * F, B && (w = Math.cos(-B), b = Math.sin(-B), y = P * w - M * b, T = k * w - z * b, x = S * w - I * b, z = k * b + z * w, I = S * b + I * w, X = R * b + X * w, P = y, k = T, S = x), B = Math.atan2(k, P), f.rotation = B * F, B && (w = Math.cos(-B), b = Math.sin(-B), P = P * w + O * b, T = k * w + A * b, A = k * -b + A * w, C = S * -b + C * w, k = T), f.rotationX && Math.abs(f.rotationX) + Math.abs(f.rotation) > 359.9 && (f.rotationX = f.rotation = 0, f.rotationY += 180), f.scaleX = (0 | Math.sqrt(P * P + k * k) * d + .5) / d, f.scaleY = (0 | Math.sqrt(A * A + z * z) * d + .5) / d, f.scaleZ = (0 | Math.sqrt(C * C + I * I) * d + .5) / d, f.skewX = 0, f.perspective = X ? 1 / (0 > X ? -X : X) : 0, f.x = E, f.y = N, f.z = L, f.svg && (f.x -= f.xOrigin - (f.xOrigin * P - f.yOrigin * O), f.y -= f.yOrigin - (f.yOrigin * k - f.xOrigin * A));\n          } else if (!(Re && !n && o.length && f.x === o[4] && f.y === o[5] && (f.rotationX || f.rotationY) || void 0 !== f.x && \"none\" === Q(t, \"display\", i))) {\n            var j = o.length >= 6,\n              Y = j ? o[0] : 1,\n              U = o[1] || 0,\n              q = o[2] || 0,\n              V = j ? o[3] : 1;\n            f.x = o[4] || 0, f.y = o[5] || 0, h = Math.sqrt(Y * Y + U * U), _ = Math.sqrt(V * V + q * q), u = Y || U ? Math.atan2(U, Y) * F : f.rotation || 0, c = q || V ? Math.atan2(q, V) * F + u : f.skewX || 0, Math.abs(c) > 90 && 270 > Math.abs(c) && (p ? (h *= -1, c += 0 >= u ? 180 : -180, u += 0 >= u ? 180 : -180) : (_ *= -1, c += 0 >= c ? 180 : -180)), f.scaleX = h, f.scaleY = _, f.rotation = u, f.skewX = c, Re && (f.rotationX = f.rotationY = f.z = 0, f.perspective = v, f.scaleZ = 1), f.svg && (f.x -= f.xOrigin - (f.xOrigin * Y + f.yOrigin * q), f.y -= f.yOrigin - (f.xOrigin * U + f.yOrigin * V));\n          }\n          f.zOrigin = g;\n          for (l in f) m > f[l] && f[l] > -m && (f[l] = 0);\n        }\n        return s && (t._gsTransform = f, f.svg && (we && t.style[Pe] ? e.delayedCall(.001, function () {\n          je(t.style, Pe);\n        }) : !we && t.getAttribute(\"transform\") && e.delayedCall(.001, function () {\n          t.removeAttribute(\"transform\");\n        }))), f;\n      },\n      Le = function Le(t) {\n        var e,\n          i,\n          s = this.data,\n          r = -s.rotation * z,\n          n = r + s.skewX * z,\n          a = 1e5,\n          o = (0 | Math.cos(r) * s.scaleX * a) / a,\n          l = (0 | Math.sin(r) * s.scaleX * a) / a,\n          h = (0 | Math.sin(n) * -s.scaleY * a) / a,\n          _ = (0 | Math.cos(n) * s.scaleY * a) / a,\n          u = this.t.style,\n          c = this.t.currentStyle;\n        if (c) {\n          i = l, l = -h, h = -i, e = c.filter, u.filter = \"\";\n          var f,\n            p,\n            d = this.t.offsetWidth,\n            g = this.t.offsetHeight,\n            v = \"absolute\" !== c.position,\n            y = \"progid:DXImageTransform.Microsoft.Matrix(M11=\" + o + \", M12=\" + l + \", M21=\" + h + \", M22=\" + _,\n            w = s.x + d * s.xPercent / 100,\n            b = s.y + g * s.yPercent / 100;\n          if (null != s.ox && (f = (s.oxp ? .01 * d * s.ox : s.ox) - d / 2, p = (s.oyp ? .01 * g * s.oy : s.oy) - g / 2, w += f - (f * o + p * l), b += p - (f * h + p * _)), v ? (f = d / 2, p = g / 2, y += \", Dx=\" + (f - (f * o + p * l) + w) + \", Dy=\" + (p - (f * h + p * _) + b) + \")\") : y += \", sizingMethod='auto expand')\", u.filter = -1 !== e.indexOf(\"DXImageTransform.Microsoft.Matrix(\") ? e.replace(D, y) : y + \" \" + e, (0 === t || 1 === t) && 1 === o && 0 === l && 0 === h && 1 === _ && (v && -1 === y.indexOf(\"Dx=0, Dy=0\") || x.test(e) && 100 !== parseFloat(RegExp.$1) || -1 === e.indexOf( true && e.indexOf(\"Alpha\")) && u.removeAttribute(\"filter\")), !v) {\n            var P,\n              k,\n              S,\n              R = 8 > m ? 1 : -1;\n            for (f = s.ieOffsetX || 0, p = s.ieOffsetY || 0, s.ieOffsetX = Math.round((d - ((0 > o ? -o : o) * d + (0 > l ? -l : l) * g)) / 2 + w), s.ieOffsetY = Math.round((g - ((0 > _ ? -_ : _) * g + (0 > h ? -h : h) * d)) / 2 + b), ve = 0; 4 > ve; ve++) k = ee[ve], P = c[k], i = -1 !== P.indexOf(\"px\") ? parseFloat(P) : $(this.t, k, parseFloat(P), P.replace(T, \"\")) || 0, S = i !== s[k] ? 2 > ve ? -s.ieOffsetX : -s.ieOffsetY : 2 > ve ? f - s.ieOffsetX : p - s.ieOffsetY, u[k] = (s[k] = Math.round(i - S * (0 === ve || 2 === ve ? 1 : R))) + \"px\";\n          }\n        }\n      },\n      Xe = B.set3DTransformRatio = B.setTransformRatio = function (t) {\n        var e,\n          i,\n          s,\n          r,\n          n,\n          a,\n          o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y,\n          T,\n          x,\n          w,\n          b,\n          P,\n          k = this.data,\n          S = this.t.style,\n          R = k.rotation,\n          O = k.rotationX,\n          A = k.rotationY,\n          C = k.scaleX,\n          D = k.scaleY,\n          M = k.scaleZ,\n          F = k.x,\n          I = k.y,\n          E = k.z,\n          N = k.svg,\n          L = k.perspective,\n          X = k.force3D;\n        if (!(((1 !== t && 0 !== t || \"auto\" !== X || this.tween._totalTime !== this.tween._totalDuration && this.tween._totalTime) && X || E || L || A || O) && (!we || !N) && Re)) return R || k.skewX || N ? (R *= z, b = k.skewX * z, P = 1e5, e = Math.cos(R) * C, r = Math.sin(R) * C, i = Math.sin(R - b) * -D, n = Math.cos(R - b) * D, b && \"simple\" === k.skewType && (v = Math.tan(b), v = Math.sqrt(1 + v * v), i *= v, n *= v, k.skewY && (e *= v, r *= v)), N && (F += k.xOrigin - (k.xOrigin * e + k.yOrigin * i) + k.xOffset, I += k.yOrigin - (k.xOrigin * r + k.yOrigin * n) + k.yOffset, we && (k.xPercent || k.yPercent) && (m = this.t.getBBox(), F += .01 * k.xPercent * m.width, I += .01 * k.yPercent * m.height), m = 1e-6, m > F && F > -m && (F = 0), m > I && I > -m && (I = 0)), T = (0 | e * P) / P + \",\" + (0 | r * P) / P + \",\" + (0 | i * P) / P + \",\" + (0 | n * P) / P + \",\" + F + \",\" + I + \")\", N && we ? this.t.setAttribute(\"transform\", \"matrix(\" + T) : S[Pe] = (k.xPercent || k.yPercent ? \"translate(\" + k.xPercent + \"%,\" + k.yPercent + \"%) matrix(\" : \"matrix(\") + T) : S[Pe] = (k.xPercent || k.yPercent ? \"translate(\" + k.xPercent + \"%,\" + k.yPercent + \"%) matrix(\" : \"matrix(\") + C + \",0,0,\" + D + \",\" + F + \",\" + I + \")\", void 0;\n        if (f && (m = 1e-4, m > C && C > -m && (C = M = 2e-5), m > D && D > -m && (D = M = 2e-5), !L || k.z || k.rotationX || k.rotationY || (L = 0)), R || k.skewX) R *= z, d = e = Math.cos(R), g = r = Math.sin(R), k.skewX && (R -= k.skewX * z, d = Math.cos(R), g = Math.sin(R), \"simple\" === k.skewType && (v = Math.tan(k.skewX * z), v = Math.sqrt(1 + v * v), d *= v, g *= v, k.skewY && (e *= v, r *= v))), i = -g, n = d;else {\n          if (!(A || O || 1 !== M || L || N)) return S[Pe] = (k.xPercent || k.yPercent ? \"translate(\" + k.xPercent + \"%,\" + k.yPercent + \"%) translate3d(\" : \"translate3d(\") + F + \"px,\" + I + \"px,\" + E + \"px)\" + (1 !== C || 1 !== D ? \" scale(\" + C + \",\" + D + \")\" : \"\"), void 0;\n          e = n = 1, i = r = 0;\n        }\n        h = 1, s = a = o = l = _ = u = 0, c = L ? -1 / L : 0, p = k.zOrigin, m = 1e-6, x = \",\", w = \"0\", R = A * z, R && (d = Math.cos(R), g = Math.sin(R), o = -g, _ = c * -g, s = e * g, a = r * g, h = d, c *= d, e *= d, r *= d), R = O * z, R && (d = Math.cos(R), g = Math.sin(R), v = i * d + s * g, y = n * d + a * g, l = h * g, u = c * g, s = i * -g + s * d, a = n * -g + a * d, h *= d, c *= d, i = v, n = y), 1 !== M && (s *= M, a *= M, h *= M, c *= M), 1 !== D && (i *= D, n *= D, l *= D, u *= D), 1 !== C && (e *= C, r *= C, o *= C, _ *= C), (p || N) && (p && (F += s * -p, I += a * -p, E += h * -p + p), N && (F += k.xOrigin - (k.xOrigin * e + k.yOrigin * i) + k.xOffset, I += k.yOrigin - (k.xOrigin * r + k.yOrigin * n) + k.yOffset), m > F && F > -m && (F = w), m > I && I > -m && (I = w), m > E && E > -m && (E = 0)), T = k.xPercent || k.yPercent ? \"translate(\" + k.xPercent + \"%,\" + k.yPercent + \"%) matrix3d(\" : \"matrix3d(\", T += (m > e && e > -m ? w : e) + x + (m > r && r > -m ? w : r) + x + (m > o && o > -m ? w : o), T += x + (m > _ && _ > -m ? w : _) + x + (m > i && i > -m ? w : i) + x + (m > n && n > -m ? w : n), O || A ? (T += x + (m > l && l > -m ? w : l) + x + (m > u && u > -m ? w : u) + x + (m > s && s > -m ? w : s), T += x + (m > a && a > -m ? w : a) + x + (m > h && h > -m ? w : h) + x + (m > c && c > -m ? w : c) + x) : T += \",0,0,0,0,1,0,\", T += F + x + I + x + E + x + (L ? 1 + -E / L : 1) + \")\", S[Pe] = T;\n      };\n    h = Oe.prototype, h.x = h.y = h.z = h.skewX = h.skewY = h.rotation = h.rotationX = h.rotationY = h.zOrigin = h.xPercent = h.yPercent = h.xOffset = h.yOffset = 0, h.scaleX = h.scaleY = h.scaleZ = 1, Te(\"transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin\", {\n      parser: function parser(t, e, i, s, n, o, l) {\n        if (s._lastParsedTransform === l) return n;\n        s._lastParsedTransform = l;\n        var h,\n          _,\n          u,\n          c,\n          f,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y = t._gsTransform,\n          T = t.style,\n          x = 1e-6,\n          w = be.length,\n          b = l,\n          P = {},\n          k = \"transformOrigin\";\n        if (l.display ? (c = Q(t, \"display\"), T.display = \"block\", h = Ne(t, r, !0, l.parseTransform), T.display = c) : h = Ne(t, r, !0, l.parseTransform), s._transform = h, \"string\" == typeof b.transform && Pe) c = L.style, c[Pe] = b.transform, c.display = \"block\", c.position = \"absolute\", E.body.appendChild(L), _ = Ne(L, null, !1), E.body.removeChild(L), _.perspective || (_.perspective = h.perspective), null != b.xPercent && (_.xPercent = ne(b.xPercent, h.xPercent)), null != b.yPercent && (_.yPercent = ne(b.yPercent, h.yPercent));else if (\"object\" == _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(b)) {\n          if (_ = {\n            scaleX: ne(null != b.scaleX ? b.scaleX : b.scale, h.scaleX),\n            scaleY: ne(null != b.scaleY ? b.scaleY : b.scale, h.scaleY),\n            scaleZ: ne(b.scaleZ, h.scaleZ),\n            x: ne(b.x, h.x),\n            y: ne(b.y, h.y),\n            z: ne(b.z, h.z),\n            xPercent: ne(b.xPercent, h.xPercent),\n            yPercent: ne(b.yPercent, h.yPercent),\n            perspective: ne(b.transformPerspective, h.perspective)\n          }, d = b.directionalRotation, null != d) if (\"object\" == _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(d)) for (c in d) b[c] = d[c];else b.rotation = d;\n          \"string\" == typeof b.x && -1 !== b.x.indexOf(\"%\") && (_.x = 0, _.xPercent = ne(b.x, h.xPercent)), \"string\" == typeof b.y && -1 !== b.y.indexOf(\"%\") && (_.y = 0, _.yPercent = ne(b.y, h.yPercent)), _.rotation = ae(\"rotation\" in b ? b.rotation : \"shortRotation\" in b ? b.shortRotation + \"_short\" : \"rotationZ\" in b ? b.rotationZ : h.rotation, h.rotation, \"rotation\", P), Re && (_.rotationX = ae(\"rotationX\" in b ? b.rotationX : \"shortRotationX\" in b ? b.shortRotationX + \"_short\" : h.rotationX || 0, h.rotationX, \"rotationX\", P), _.rotationY = ae(\"rotationY\" in b ? b.rotationY : \"shortRotationY\" in b ? b.shortRotationY + \"_short\" : h.rotationY || 0, h.rotationY, \"rotationY\", P)), _.skewX = null == b.skewX ? h.skewX : ae(b.skewX, h.skewX), _.skewY = null == b.skewY ? h.skewY : ae(b.skewY, h.skewY), (u = _.skewY - h.skewY) && (_.skewX += u, _.rotation += u);\n        }\n        for (Re && null != b.force3D && (h.force3D = b.force3D, m = !0), h.skewType = b.skewType || h.skewType || _a.defaultSkewType, p = h.force3D || h.z || h.rotationX || h.rotationY || _.z || _.rotationX || _.rotationY || _.perspective, p || null == b.scale || (_.scaleZ = 1); --w > -1;) i = be[w], f = _[i] - h[i], (f > x || -x > f || null != b[i] || null != I[i]) && (m = !0, n = new me(h, i, h[i], f, n), i in P && (n.e = P[i]), n.xs0 = 0, n.plugin = o, s._overwriteProps.push(n.n));\n        return f = b.transformOrigin, h.svg && (f || b.svgOrigin) && (g = h.xOffset, v = h.yOffset, ze(t, se(f), _, b.svgOrigin, b.smoothOrigin), n = de(h, \"xOrigin\", (y ? h : _).xOrigin, _.xOrigin, n, k), n = de(h, \"yOrigin\", (y ? h : _).yOrigin, _.yOrigin, n, k), (g !== h.xOffset || v !== h.yOffset) && (n = de(h, \"xOffset\", y ? g : h.xOffset, h.xOffset, n, k), n = de(h, \"yOffset\", y ? v : h.yOffset, h.yOffset, n, k)), f = we ? null : \"0px 0px\"), (f || Re && p && h.zOrigin) && (Pe ? (m = !0, i = Se, f = (f || Q(t, i, r, !1, \"50% 50%\")) + \"\", n = new me(T, i, 0, 0, n, -1, k), n.b = T[i], n.plugin = o, Re ? (c = h.zOrigin, f = f.split(\" \"), h.zOrigin = (f.length > 2 && (0 === c || \"0px\" !== f[2]) ? parseFloat(f[2]) : c) || 0, n.xs0 = n.e = f[0] + \" \" + (f[1] || \"50%\") + \" 0px\", n = new me(h, \"zOrigin\", 0, 0, n, -1, n.n), n.b = c, n.xs0 = n.e = h.zOrigin) : n.xs0 = n.e = f) : se(f + \"\", h)), m && (s._transformType = h.svg && we || !p && 3 !== this._transformType ? 2 : 3), n;\n      },\n      prefix: !0\n    }), Te(\"boxShadow\", {\n      defaultValue: \"0px 0px 0px 0px #999\",\n      prefix: !0,\n      color: !0,\n      multi: !0,\n      keyword: \"inset\"\n    }), Te(\"borderRadius\", {\n      defaultValue: \"0px\",\n      parser: function parser(t, e, i, n, a) {\n        e = this.format(e);\n        var o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f,\n          p,\n          m,\n          d,\n          g,\n          v,\n          y,\n          T,\n          x,\n          w,\n          b = [\"borderTopLeftRadius\", \"borderTopRightRadius\", \"borderBottomRightRadius\", \"borderBottomLeftRadius\"],\n          P = t.style;\n        for (m = parseFloat(t.offsetWidth), d = parseFloat(t.offsetHeight), o = e.split(\" \"), l = 0; b.length > l; l++) this.p.indexOf(\"border\") && (b[l] = W(b[l])), u = _ = Q(t, b[l], r, !1, \"0px\"), -1 !== u.indexOf(\" \") && (_ = u.split(\" \"), u = _[0], _ = _[1]), c = h = o[l], f = parseFloat(u), v = u.substr((f + \"\").length), y = \"=\" === c.charAt(1), y ? (p = parseInt(c.charAt(0) + \"1\", 10), c = c.substr(2), p *= parseFloat(c), g = c.substr((p + \"\").length - (0 > p ? 1 : 0)) || \"\") : (p = parseFloat(c), g = c.substr((p + \"\").length)), \"\" === g && (g = s[i] || v), g !== v && (T = $(t, \"borderLeft\", f, v), x = $(t, \"borderTop\", f, v), \"%\" === g ? (u = 100 * (T / m) + \"%\", _ = 100 * (x / d) + \"%\") : \"em\" === g ? (w = $(t, \"borderLeft\", 1, \"em\"), u = T / w + \"em\", _ = x / w + \"em\") : (u = T + \"px\", _ = x + \"px\"), y && (c = parseFloat(u) + p + g, h = parseFloat(_) + p + g)), a = ge(P, b[l], u + \" \" + _, c + \" \" + h, !1, \"0px\", a);\n        return a;\n      },\n      prefix: !0,\n      formatter: ce(\"0px 0px 0px 0px\", !1, !0)\n    }), Te(\"backgroundPosition\", {\n      defaultValue: \"0 0\",\n      parser: function parser(t, e, i, s, n, a) {\n        var o,\n          l,\n          h,\n          _,\n          u,\n          c,\n          f = \"background-position\",\n          p = r || Z(t, null),\n          d = this.format((p ? m ? p.getPropertyValue(f + \"-x\") + \" \" + p.getPropertyValue(f + \"-y\") : p.getPropertyValue(f) : t.currentStyle.backgroundPositionX + \" \" + t.currentStyle.backgroundPositionY) || \"0 0\"),\n          g = this.format(e);\n        if (-1 !== d.indexOf(\"%\") != (-1 !== g.indexOf(\"%\")) && (c = Q(t, \"backgroundImage\").replace(R, \"\"), c && \"none\" !== c)) {\n          for (o = d.split(\" \"), l = g.split(\" \"), X.setAttribute(\"src\", c), h = 2; --h > -1;) d = o[h], _ = -1 !== d.indexOf(\"%\"), _ !== (-1 !== l[h].indexOf(\"%\")) && (u = 0 === h ? t.offsetWidth - X.width : t.offsetHeight - X.height, o[h] = _ ? parseFloat(d) / 100 * u + \"px\" : 100 * (parseFloat(d) / u) + \"%\");\n          d = o.join(\" \");\n        }\n        return this.parseComplex(t.style, d, g, n, a);\n      },\n      formatter: se\n    }), Te(\"backgroundSize\", {\n      defaultValue: \"0 0\",\n      formatter: se\n    }), Te(\"perspective\", {\n      defaultValue: \"0px\",\n      prefix: !0\n    }), Te(\"perspectiveOrigin\", {\n      defaultValue: \"50% 50%\",\n      prefix: !0\n    }), Te(\"transformStyle\", {\n      prefix: !0\n    }), Te(\"backfaceVisibility\", {\n      prefix: !0\n    }), Te(\"userSelect\", {\n      prefix: !0\n    }), Te(\"margin\", {\n      parser: fe(\"marginTop,marginRight,marginBottom,marginLeft\")\n    }), Te(\"padding\", {\n      parser: fe(\"paddingTop,paddingRight,paddingBottom,paddingLeft\")\n    }), Te(\"clip\", {\n      defaultValue: \"rect(0px,0px,0px,0px)\",\n      parser: function parser(t, e, i, s, n, a) {\n        var o, l, h;\n        return 9 > m ? (l = t.currentStyle, h = 8 > m ? \" \" : \",\", o = \"rect(\" + l.clipTop + h + l.clipRight + h + l.clipBottom + h + l.clipLeft + \")\", e = this.format(e).split(\",\").join(h)) : (o = this.format(Q(t, this.p, r, !1, this.dflt)), e = this.format(e)), this.parseComplex(t.style, o, e, n, a);\n      }\n    }), Te(\"textShadow\", {\n      defaultValue: \"0px 0px 0px #999\",\n      color: !0,\n      multi: !0\n    }), Te(\"autoRound,strictUnits\", {\n      parser: function parser(t, e, i, s, r) {\n        return r;\n      }\n    }), Te(\"border\", {\n      defaultValue: \"0px solid #000\",\n      parser: function parser(t, e, i, s, n, a) {\n        return this.parseComplex(t.style, this.format(Q(t, \"borderTopWidth\", r, !1, \"0px\") + \" \" + Q(t, \"borderTopStyle\", r, !1, \"solid\") + \" \" + Q(t, \"borderTopColor\", r, !1, \"#000\")), this.format(e), n, a);\n      },\n      color: !0,\n      formatter: function formatter(t) {\n        var e = t.split(\" \");\n        return e[0] + \" \" + (e[1] || \"solid\") + \" \" + (t.match(ue) || [\"#000\"])[0];\n      }\n    }), Te(\"borderWidth\", {\n      parser: fe(\"borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth\")\n    }), Te(\"float,cssFloat,styleFloat\", {\n      parser: function parser(t, e, i, s, r) {\n        var n = t.style,\n          a = \"cssFloat\" in n ? \"cssFloat\" : \"styleFloat\";\n        return new me(n, a, 0, 0, r, -1, i, !1, 0, n[a], e);\n      }\n    });\n    var Be = function Be(t) {\n      var e,\n        i = this.t,\n        s = i.filter || Q(this.data, \"filter\") || \"\",\n        r = 0 | this.s + this.c * t;\n      100 === r && (-1 === s.indexOf(\"atrix(\") && -1 === s.indexOf(\"radient(\") && -1 === s.indexOf(\"oader(\") ? (i.removeAttribute(\"filter\"), e = !Q(this.data, \"filter\")) : (i.filter = s.replace(b, \"\"), e = !0)), e || (this.xn1 && (i.filter = s = s || \"alpha(opacity=\" + r + \")\"), -1 === s.indexOf(\"pacity\") ? 0 === r && this.xn1 || (i.filter = s + \" alpha(opacity=\" + r + \")\") : i.filter = s.replace(x, \"opacity=\" + r));\n    };\n    Te(\"opacity,alpha,autoAlpha\", {\n      defaultValue: \"1\",\n      parser: function parser(t, e, i, s, n, a) {\n        var o = parseFloat(Q(t, \"opacity\", r, !1, \"1\")),\n          l = t.style,\n          h = \"autoAlpha\" === i;\n        return \"string\" == typeof e && \"=\" === e.charAt(1) && (e = (\"-\" === e.charAt(0) ? -1 : 1) * parseFloat(e.substr(2)) + o), h && 1 === o && \"hidden\" === Q(t, \"visibility\", r) && 0 !== e && (o = 0), Y ? n = new me(l, \"opacity\", o, e - o, n) : (n = new me(l, \"opacity\", 100 * o, 100 * (e - o), n), n.xn1 = h ? 1 : 0, l.zoom = 1, n.type = 2, n.b = \"alpha(opacity=\" + n.s + \")\", n.e = \"alpha(opacity=\" + (n.s + n.c) + \")\", n.data = t, n.plugin = a, n.setRatio = Be), h && (n = new me(l, \"visibility\", 0, 0, n, -1, null, !1, 0, 0 !== o ? \"inherit\" : \"hidden\", 0 === e ? \"hidden\" : \"inherit\"), n.xs0 = \"inherit\", s._overwriteProps.push(n.n), s._overwriteProps.push(i)), n;\n      }\n    });\n    var je = function je(t, e) {\n        e && (t.removeProperty ? ((\"ms\" === e.substr(0, 2) || \"webkit\" === e.substr(0, 6)) && (e = \"-\" + e), t.removeProperty(e.replace(k, \"-$1\").toLowerCase())) : t.removeAttribute(e));\n      },\n      Ye = function Ye(t) {\n        if (this.t._gsClassPT = this, 1 === t || 0 === t) {\n          this.t.setAttribute(\"class\", 0 === t ? this.b : this.e);\n          for (var e = this.data, i = this.t.style; e;) e.v ? i[e.p] = e.v : je(i, e.p), e = e._next;\n          1 === t && this.t._gsClassPT === this && (this.t._gsClassPT = null);\n        } else this.t.getAttribute(\"class\") !== this.e && this.t.setAttribute(\"class\", this.e);\n      };\n    Te(\"className\", {\n      parser: function parser(t, e, s, n, a, o, l) {\n        var h,\n          _,\n          u,\n          c,\n          f,\n          p = t.getAttribute(\"class\") || \"\",\n          m = t.style.cssText;\n        if (a = n._classNamePT = new me(t, s, 0, 0, a, 2), a.setRatio = Ye, a.pr = -11, i = !0, a.b = p, _ = K(t, r), u = t._gsClassPT) {\n          for (c = {}, f = u.data; f;) c[f.p] = 1, f = f._next;\n          u.setRatio(1);\n        }\n        return t._gsClassPT = a, a.e = \"=\" !== e.charAt(1) ? e : p.replace(RegExp(\"\\\\s*\\\\b\" + e.substr(2) + \"\\\\b\"), \"\") + (\"+\" === e.charAt(0) ? \" \" + e.substr(2) : \"\"), t.setAttribute(\"class\", a.e), h = J(t, _, K(t), l, c), t.setAttribute(\"class\", p), a.data = h.firstMPT, t.style.cssText = m, a = a.xfirst = n.parse(t, h.difs, a, o);\n      }\n    });\n    var Ue = function Ue(t) {\n      if ((1 === t || 0 === t) && this.data._totalTime === this.data._totalDuration && \"isFromStart\" !== this.data.data) {\n        var e,\n          i,\n          s,\n          r,\n          n,\n          a = this.t.style,\n          o = l.transform.parse;\n        if (\"all\" === this.e) a.cssText = \"\", r = !0;else for (e = this.e.split(\" \").join(\"\").split(\",\"), s = e.length; --s > -1;) i = e[s], l[i] && (l[i].parse === o ? r = !0 : i = \"transformOrigin\" === i ? Se : l[i].p), je(a, i);\n        r && (je(a, Pe), n = this.t._gsTransform, n && (n.svg && this.t.removeAttribute(\"data-svg-origin\"), delete this.t._gsTransform));\n      }\n    };\n    for (Te(\"clearProps\", {\n      parser: function parser(t, e, s, r, n) {\n        return n = new me(t, s, 0, 0, n, 2), n.setRatio = Ue, n.e = e, n.pr = -10, n.data = r._tween, i = !0, n;\n      }\n    }), h = \"bezier,throwProps,physicsProps,physics2D\".split(\",\"), ve = h.length; ve--;) xe(h[ve]);\n    h = _a.prototype, h._firstPT = h._lastParsedTransform = h._transform = null, h._onInitTween = function (t, e, o) {\n      if (!t.nodeType) return !1;\n      this._target = t, this._tween = o, this._vars = e, _ = e.autoRound, i = !1, s = e.suffixMap || _a.suffixMap, r = Z(t, \"\"), n = this._overwriteProps;\n      var h,\n        f,\n        m,\n        d,\n        g,\n        v,\n        y,\n        T,\n        x,\n        b = t.style;\n      if (u && \"\" === b.zIndex && (h = Q(t, \"zIndex\", r), (\"auto\" === h || \"\" === h) && this._addLazySet(b, \"zIndex\", 0)), \"string\" == typeof e && (d = b.cssText, h = K(t, r), b.cssText = d + \";\" + e, h = J(t, h, K(t)).difs, !Y && w.test(e) && (h.opacity = parseFloat(RegExp.$1)), e = h, b.cssText = d), this._firstPT = f = e.className ? l.className.parse(t, e.className, \"className\", this, null, null, e) : this.parse(t, e, null), this._transformType) {\n        for (x = 3 === this._transformType, Pe ? c && (u = !0, \"\" === b.zIndex && (y = Q(t, \"zIndex\", r), (\"auto\" === y || \"\" === y) && this._addLazySet(b, \"zIndex\", 0)), p && this._addLazySet(b, \"WebkitBackfaceVisibility\", this._vars.WebkitBackfaceVisibility || (x ? \"visible\" : \"hidden\"))) : b.zoom = 1, m = f; m && m._next;) m = m._next;\n        T = new me(t, \"transform\", 0, 0, null, 2), this._linkCSSP(T, null, m), T.setRatio = Pe ? Xe : Le, T.data = this._transform || Ne(t, r, !0), T.tween = o, T.pr = -1, n.pop();\n      }\n      if (i) {\n        for (; f;) {\n          for (v = f._next, m = d; m && m.pr > f.pr;) m = m._next;\n          (f._prev = m ? m._prev : g) ? f._prev._next = f : d = f, (f._next = m) ? m._prev = f : g = f, f = v;\n        }\n        this._firstPT = d;\n      }\n      return !0;\n    }, h.parse = function (t, e, i, n) {\n      var a,\n        o,\n        h,\n        u,\n        c,\n        f,\n        p,\n        m,\n        d,\n        g,\n        v = t.style;\n      for (a in e) f = e[a], o = l[a], o ? i = o.parse(t, f, a, this, i, n, e) : (c = Q(t, a, r) + \"\", d = \"string\" == typeof f, \"color\" === a || \"fill\" === a || \"stroke\" === a || -1 !== a.indexOf(\"Color\") || d && P.test(f) ? (d || (f = he(f), f = (f.length > 3 ? \"rgba(\" : \"rgb(\") + f.join(\",\") + \")\"), i = ge(v, a, c, f, !0, \"transparent\", i, 0, n)) : !d || -1 === f.indexOf(\" \") && -1 === f.indexOf(\",\") ? (h = parseFloat(c), p = h || 0 === h ? c.substr((h + \"\").length) : \"\", (\"\" === c || \"auto\" === c) && (\"width\" === a || \"height\" === a ? (h = ie(t, a, r), p = \"px\") : \"left\" === a || \"top\" === a ? (h = H(t, a, r), p = \"px\") : (h = \"opacity\" !== a ? 0 : 1, p = \"\")), g = d && \"=\" === f.charAt(1), g ? (u = parseInt(f.charAt(0) + \"1\", 10), f = f.substr(2), u *= parseFloat(f), m = f.replace(T, \"\")) : (u = parseFloat(f), m = d ? f.replace(T, \"\") : \"\"), \"\" === m && (m = a in s ? s[a] : p), f = u || 0 === u ? (g ? u + h : u) + m : e[a], p !== m && \"\" !== m && (u || 0 === u) && h && (h = $(t, a, h, p), \"%\" === m ? (h /= $(t, a, 100, \"%\") / 100, e.strictUnits !== !0 && (c = h + \"%\")) : \"em\" === m || \"rem\" === m ? h /= $(t, a, 1, m) : \"px\" !== m && (u = $(t, a, u, m), m = \"px\"), g && (u || 0 === u) && (f = u + h + m)), g && (u += h), !h && 0 !== h || !u && 0 !== u ? void 0 !== v[a] && (f || \"NaN\" != f + \"\" && null != f) ? (i = new me(v, a, u || h || 0, 0, i, -1, a, !1, 0, c, f), i.xs0 = \"none\" !== f || \"display\" !== a && -1 === a.indexOf(\"Style\") ? f : c) : q(\"invalid \" + a + \" tween value: \" + e[a]) : (i = new me(v, a, h, u - h, i, 0, a, _ !== !1 && (\"px\" === m || \"zIndex\" === a), 0, c, f), i.xs0 = m)) : i = ge(v, a, c, f, !0, null, i, 0, n)), n && i && !i.plugin && (i.plugin = n);\n      return i;\n    }, h.setRatio = function (t) {\n      var e,\n        i,\n        s,\n        r = this._firstPT,\n        n = 1e-6;\n      if (1 !== t || this._tween._time !== this._tween._duration && 0 !== this._tween._time) {\n        if (t || this._tween._time !== this._tween._duration && 0 !== this._tween._time || this._tween._rawPrevTime === -1e-6) for (; r;) {\n          if (e = r.c * t + r.s, r.r ? e = Math.round(e) : n > e && e > -n && (e = 0), r.type) {\n            if (1 === r.type) {\n              if (s = r.l, 2 === s) r.t[r.p] = r.xs0 + e + r.xs1 + r.xn1 + r.xs2;else if (3 === s) r.t[r.p] = r.xs0 + e + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3;else if (4 === s) r.t[r.p] = r.xs0 + e + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4;else if (5 === s) r.t[r.p] = r.xs0 + e + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4 + r.xn4 + r.xs5;else {\n                for (i = r.xs0 + e + r.xs1, s = 1; r.l > s; s++) i += r[\"xn\" + s] + r[\"xs\" + (s + 1)];\n                r.t[r.p] = i;\n              }\n            } else -1 === r.type ? r.t[r.p] = r.xs0 : r.setRatio && r.setRatio(t);\n          } else r.t[r.p] = e + r.xs0;\n          r = r._next;\n        } else for (; r;) 2 !== r.type ? r.t[r.p] = r.b : r.setRatio(t), r = r._next;\n      } else for (; r;) {\n        if (2 !== r.type) {\n          if (r.r && -1 !== r.type) {\n            if (e = Math.round(r.s + r.c), r.type) {\n              if (1 === r.type) {\n                for (s = r.l, i = r.xs0 + e + r.xs1, s = 1; r.l > s; s++) i += r[\"xn\" + s] + r[\"xs\" + (s + 1)];\n                r.t[r.p] = i;\n              }\n            } else r.t[r.p] = e + r.xs0;\n          } else r.t[r.p] = r.e;\n        } else r.setRatio(t);\n        r = r._next;\n      }\n    }, h._enableTransforms = function (t) {\n      this._transform = this._transform || Ne(this._target, r, !0), this._transformType = this._transform.svg && we || !t && 3 !== this._transformType ? 2 : 3;\n    };\n    var qe = function qe() {\n      this.t[this.p] = this.e, this.data._linkCSSP(this, this._next, null, !0);\n    };\n    h._addLazySet = function (t, e, i) {\n      var s = this._firstPT = new me(t, e, 0, 0, this._firstPT, 2);\n      s.e = i, s.setRatio = qe, s.data = this;\n    }, h._linkCSSP = function (t, e, i, s) {\n      return t && (e && (e._prev = t), t._next && (t._next._prev = t._prev), t._prev ? t._prev._next = t._next : this._firstPT === t && (this._firstPT = t._next, s = !0), i ? i._next = t : s || null !== this._firstPT || (this._firstPT = t), t._next = e, t._prev = i), t;\n    }, h._kill = function (e) {\n      var i,\n        s,\n        r,\n        n = e;\n      if (e.autoAlpha || e.alpha) {\n        n = {};\n        for (s in e) n[s] = e[s];\n        n.opacity = 1, n.autoAlpha && (n.visibility = 1);\n      }\n      return e.className && (i = this._classNamePT) && (r = i.xfirst, r && r._prev ? this._linkCSSP(r._prev, i._next, r._prev._prev) : r === this._firstPT && (this._firstPT = i._next), i._next && this._linkCSSP(i._next, i._next._next, r._prev), this._classNamePT = null), t.prototype._kill.call(this, n);\n    };\n    var _Ve = function Ve(t, e, i) {\n      var s, r, n, a;\n      if (t.slice) for (r = t.length; --r > -1;) _Ve(t[r], e, i);else for (s = t.childNodes, r = s.length; --r > -1;) n = s[r], a = n.type, n.style && (e.push(K(n)), i && i.push(n)), 1 !== a && 9 !== a && 11 !== a || !n.childNodes.length || _Ve(n, e, i);\n    };\n    return _a.cascadeTo = function (t, i, s) {\n      var r,\n        n,\n        a,\n        o,\n        l = e.to(t, i, s),\n        h = [l],\n        _ = [],\n        u = [],\n        c = [],\n        f = e._internals.reservedProps;\n      for (t = l._targets || l.target, _Ve(t, _, c), l.render(i, !0, !0), _Ve(t, u), l.render(0, !0, !0), l._enabled(!0), r = c.length; --r > -1;) if (n = J(c[r], _[r], u[r]), n.firstMPT) {\n        n = n.difs;\n        for (a in s) f[a] && (n[a] = s[a]);\n        o = {};\n        for (a in n) o[a] = _[r][a];\n        h.push(e.fromTo(c[r], i, o, n));\n      }\n      return h;\n    }, t.activate([_a]), _a;\n  }, !0), function () {\n    var t = _gsScope._gsDefine.plugin({\n        propName: \"roundProps\",\n        version: \"1.5\",\n        priority: -1,\n        API: 2,\n        init: function init(t, e, i) {\n          return this._tween = i, !0;\n        }\n      }),\n      e = function e(t) {\n        for (; t;) t.f || t.blob || (t.r = 1), t = t._next;\n      },\n      i = t.prototype;\n    i._onInitAllProps = function () {\n      for (var t, i, s, r = this._tween, n = r.vars.roundProps.join ? r.vars.roundProps : r.vars.roundProps.split(\",\"), a = n.length, o = {}, l = r._propLookup.roundProps; --a > -1;) o[n[a]] = 1;\n      for (a = n.length; --a > -1;) for (t = n[a], i = r._firstPT; i;) s = i._next, i.pg ? i.t._roundProps(o, !0) : i.n === t && (2 === i.f && i.t ? e(i.t._firstPT) : (this._add(i.t, t, i.s, i.c), s && (s._prev = i._prev), i._prev ? i._prev._next = s : r._firstPT === i && (r._firstPT = s), i._next = i._prev = null, r._propLookup[t] = l)), i = s;\n      return !1;\n    }, i._add = function (t, e, i, s) {\n      this._addTween(t, e, i, i + s, e, !0), this._overwriteProps.push(e);\n    };\n  }(), function () {\n    _gsScope._gsDefine.plugin({\n      propName: \"attr\",\n      API: 2,\n      version: \"0.5.0\",\n      init: function init(t, e) {\n        var i;\n        if (\"function\" != typeof t.setAttribute) return !1;\n        for (i in e) this._addTween(t, \"setAttribute\", t.getAttribute(i) + \"\", e[i] + \"\", i, !1, i), this._overwriteProps.push(i);\n        return !0;\n      }\n    });\n  }(), _gsScope._gsDefine.plugin({\n    propName: \"directionalRotation\",\n    version: \"0.2.1\",\n    API: 2,\n    init: function init(t, e) {\n      \"object\" != _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(e) && (e = {\n        rotation: e\n      }), this.finals = {};\n      var i,\n        s,\n        r,\n        n,\n        a,\n        o,\n        l = e.useRadians === !0 ? 2 * Math.PI : 360,\n        h = 1e-6;\n      for (i in e) \"useRadians\" !== i && (o = (e[i] + \"\").split(\"_\"), s = o[0], r = parseFloat(\"function\" != typeof t[i] ? t[i] : t[i.indexOf(\"set\") || \"function\" != typeof t[\"get\" + i.substr(3)] ? i : \"get\" + i.substr(3)]()), n = this.finals[i] = \"string\" == typeof s && \"=\" === s.charAt(1) ? r + parseInt(s.charAt(0) + \"1\", 10) * Number(s.substr(2)) : Number(s) || 0, a = n - r, o.length && (s = o.join(\"_\"), -1 !== s.indexOf(\"short\") && (a %= l, a !== a % (l / 2) && (a = 0 > a ? a + l : a - l)), -1 !== s.indexOf(\"_cw\") && 0 > a ? a = (a + 9999999999 * l) % l - (0 | a / l) * l : -1 !== s.indexOf(\"ccw\") && a > 0 && (a = (a - 9999999999 * l) % l - (0 | a / l) * l)), (a > h || -h > a) && (this._addTween(t, i, r, r + a, i), this._overwriteProps.push(i)));\n      return !0;\n    },\n    set: function set(t) {\n      var e;\n      if (1 !== t) this._super.setRatio.call(this, t);else for (e = this._firstPT; e;) e.f ? e.t[e.p](this.finals[e.p]) : e.t[e.p] = this.finals[e.p], e = e._next;\n    }\n  })._autoCSS = !0, _gsScope._gsDefine(\"easing.Back\", [\"easing.Ease\"], function (t) {\n    var e,\n      i,\n      s,\n      r = _gsScope.GreenSockGlobals || _gsScope,\n      n = r.com.greensock,\n      a = 2 * Math.PI,\n      o = Math.PI / 2,\n      l = n._class,\n      h = function h(e, i) {\n        var s = l(\"easing.\" + e, function () {}, !0),\n          r = s.prototype = new t();\n        return r.constructor = s, r.getRatio = i, s;\n      },\n      _ = t.register || function () {},\n      u = function u(t, e, i, s) {\n        var r = l(\"easing.\" + t, {\n          easeOut: new e(),\n          easeIn: new i(),\n          easeInOut: new s()\n        }, !0);\n        return _(r, t), r;\n      },\n      c = function c(t, e, i) {\n        this.t = t, this.v = e, i && (this.next = i, i.prev = this, this.c = i.v - e, this.gap = i.t - t);\n      },\n      f = function f(e, i) {\n        var s = l(\"easing.\" + e, function (t) {\n            this._p1 = t || 0 === t ? t : 1.70158, this._p2 = 1.525 * this._p1;\n          }, !0),\n          r = s.prototype = new t();\n        return r.constructor = s, r.getRatio = i, r.config = function (t) {\n          return new s(t);\n        }, s;\n      },\n      p = u(\"Back\", f(\"BackOut\", function (t) {\n        return (t -= 1) * t * ((this._p1 + 1) * t + this._p1) + 1;\n      }), f(\"BackIn\", function (t) {\n        return t * t * ((this._p1 + 1) * t - this._p1);\n      }), f(\"BackInOut\", function (t) {\n        return 1 > (t *= 2) ? .5 * t * t * ((this._p2 + 1) * t - this._p2) : .5 * ((t -= 2) * t * ((this._p2 + 1) * t + this._p2) + 2);\n      })),\n      m = l(\"easing.SlowMo\", function (t, e, i) {\n        e = e || 0 === e ? e : .7, null == t ? t = .7 : t > 1 && (t = 1), this._p = 1 !== t ? e : 0, this._p1 = (1 - t) / 2, this._p2 = t, this._p3 = this._p1 + this._p2, this._calcEnd = i === !0;\n      }, !0),\n      d = m.prototype = new t();\n    return d.constructor = m, d.getRatio = function (t) {\n      var e = t + (.5 - t) * this._p;\n      return this._p1 > t ? this._calcEnd ? 1 - (t = 1 - t / this._p1) * t : e - (t = 1 - t / this._p1) * t * t * t * e : t > this._p3 ? this._calcEnd ? 1 - (t = (t - this._p3) / this._p1) * t : e + (t - e) * (t = (t - this._p3) / this._p1) * t * t * t : this._calcEnd ? 1 : e;\n    }, m.ease = new m(.7, .7), d.config = m.config = function (t, e, i) {\n      return new m(t, e, i);\n    }, e = l(\"easing.SteppedEase\", function (t) {\n      t = t || 1, this._p1 = 1 / t, this._p2 = t + 1;\n    }, !0), d = e.prototype = new t(), d.constructor = e, d.getRatio = function (t) {\n      return 0 > t ? t = 0 : t >= 1 && (t = .999999999), (this._p2 * t >> 0) * this._p1;\n    }, d.config = e.config = function (t) {\n      return new e(t);\n    }, i = l(\"easing.RoughEase\", function (e) {\n      e = e || {};\n      for (var i, s, r, n, a, o, l = e.taper || \"none\", h = [], _ = 0, u = 0 | (e.points || 20), f = u, p = e.randomize !== !1, m = e.clamp === !0, d = e.template instanceof t ? e.template : null, g = \"number\" == typeof e.strength ? .4 * e.strength : .4; --f > -1;) i = p ? Math.random() : 1 / u * f, s = d ? d.getRatio(i) : i, \"none\" === l ? r = g : \"out\" === l ? (n = 1 - i, r = n * n * g) : \"in\" === l ? r = i * i * g : .5 > i ? (n = 2 * i, r = .5 * n * n * g) : (n = 2 * (1 - i), r = .5 * n * n * g), p ? s += Math.random() * r - .5 * r : f % 2 ? s += .5 * r : s -= .5 * r, m && (s > 1 ? s = 1 : 0 > s && (s = 0)), h[_++] = {\n        x: i,\n        y: s\n      };\n      for (h.sort(function (t, e) {\n        return t.x - e.x;\n      }), o = new c(1, 1, null), f = u; --f > -1;) a = h[f], o = new c(a.x, a.y, o);\n      this._prev = new c(0, 0, 0 !== o.t ? o : o.next);\n    }, !0), d = i.prototype = new t(), d.constructor = i, d.getRatio = function (t) {\n      var e = this._prev;\n      if (t > e.t) {\n        for (; e.next && t >= e.t;) e = e.next;\n        e = e.prev;\n      } else for (; e.prev && e.t >= t;) e = e.prev;\n      return this._prev = e, e.v + (t - e.t) / e.gap * e.c;\n    }, d.config = function (t) {\n      return new i(t);\n    }, i.ease = new i(), u(\"Bounce\", h(\"BounceOut\", function (t) {\n      return 1 / 2.75 > t ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;\n    }), h(\"BounceIn\", function (t) {\n      return 1 / 2.75 > (t = 1 - t) ? 1 - 7.5625 * t * t : 2 / 2.75 > t ? 1 - (7.5625 * (t -= 1.5 / 2.75) * t + .75) : 2.5 / 2.75 > t ? 1 - (7.5625 * (t -= 2.25 / 2.75) * t + .9375) : 1 - (7.5625 * (t -= 2.625 / 2.75) * t + .984375);\n    }), h(\"BounceInOut\", function (t) {\n      var e = .5 > t;\n      return t = e ? 1 - 2 * t : 2 * t - 1, t = 1 / 2.75 > t ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375, e ? .5 * (1 - t) : .5 * t + .5;\n    })), u(\"Circ\", h(\"CircOut\", function (t) {\n      return Math.sqrt(1 - (t -= 1) * t);\n    }), h(\"CircIn\", function (t) {\n      return -(Math.sqrt(1 - t * t) - 1);\n    }), h(\"CircInOut\", function (t) {\n      return 1 > (t *= 2) ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n    })), s = function s(e, i, _s) {\n      var r = l(\"easing.\" + e, function (t, e) {\n          this._p1 = t >= 1 ? t : 1, this._p2 = (e || _s) / (1 > t ? t : 1), this._p3 = this._p2 / a * (Math.asin(1 / this._p1) || 0), this._p2 = a / this._p2;\n        }, !0),\n        n = r.prototype = new t();\n      return n.constructor = r, n.getRatio = i, n.config = function (t, e) {\n        return new r(t, e);\n      }, r;\n    }, u(\"Elastic\", s(\"ElasticOut\", function (t) {\n      return this._p1 * Math.pow(2, -10 * t) * Math.sin((t - this._p3) * this._p2) + 1;\n    }, .3), s(\"ElasticIn\", function (t) {\n      return -(this._p1 * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - this._p3) * this._p2));\n    }, .3), s(\"ElasticInOut\", function (t) {\n      return 1 > (t *= 2) ? -.5 * this._p1 * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - this._p3) * this._p2) : .5 * this._p1 * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - this._p3) * this._p2) + 1;\n    }, .45)), u(\"Expo\", h(\"ExpoOut\", function (t) {\n      return 1 - Math.pow(2, -10 * t);\n    }), h(\"ExpoIn\", function (t) {\n      return Math.pow(2, 10 * (t - 1)) - .001;\n    }), h(\"ExpoInOut\", function (t) {\n      return 1 > (t *= 2) ? .5 * Math.pow(2, 10 * (t - 1)) : .5 * (2 - Math.pow(2, -10 * (t - 1)));\n    })), u(\"Sine\", h(\"SineOut\", function (t) {\n      return Math.sin(t * o);\n    }), h(\"SineIn\", function (t) {\n      return -Math.cos(t * o) + 1;\n    }), h(\"SineInOut\", function (t) {\n      return -.5 * (Math.cos(Math.PI * t) - 1);\n    })), l(\"easing.EaseLookup\", {\n      find: function find(e) {\n        return t.map[e];\n      }\n    }, !0), _(r.SlowMo, \"SlowMo\", \"ease,\"), _(i, \"RoughEase\", \"ease,\"), _(e, \"SteppedEase\", \"ease,\"), p;\n  }, !0);\n}), _gsScope._gsDefine && _gsScope._gsQueue.pop()(), function (t, e) {\n  \"use strict\";\n\n  var i = t.GreenSockGlobals = t.GreenSockGlobals || t;\n  if (!i.TweenLite) {\n    var s,\n      r,\n      n,\n      a,\n      o,\n      l = function l(t) {\n        var e,\n          s = t.split(\".\"),\n          r = i;\n        for (e = 0; s.length > e; e++) r[s[e]] = r = r[s[e]] || {};\n        return r;\n      },\n      h = l(\"com.greensock\"),\n      _ = 1e-10,\n      u = function u(t) {\n        var e,\n          i = [],\n          s = t.length;\n        for (e = 0; e !== s; i.push(t[e++]));\n        return i;\n      },\n      c = function c() {},\n      f = function () {\n        var t = Object.prototype.toString,\n          e = t.call([]);\n        return function (i) {\n          return null != i && (i instanceof Array || \"object\" == _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(i) && !!i.push && t.call(i) === e);\n        };\n      }(),\n      p = {},\n      _m = function m(s, r, n, a) {\n        this.sc = p[s] ? p[s].sc : [], p[s] = this, this.gsClass = null, this.func = n;\n        var o = [];\n        this.check = function (h) {\n          for (var _, u, c, f, d, g = r.length, v = g; --g > -1;) (_ = p[r[g]] || new _m(r[g], [])).gsClass ? (o[g] = _.gsClass, v--) : h && _.sc.push(this);\n          if (0 === v && n) for (u = (\"com.greensock.\" + s).split(\".\"), c = u.pop(), f = l(u.join(\".\"))[c] = this.gsClass = n.apply(n, o), a && (i[c] = f, d =  true && module.exports, !d && \"function\" == typeof define && __webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\") ? define((t.GreenSockAMDPath ? t.GreenSockAMDPath + \"/\" : \"\") + s.split(\".\").pop(), [], function () {\n            return f;\n          }) : s === e && d && (module.exports = f)), g = 0; this.sc.length > g; g++) this.sc[g].check();\n        }, this.check(!0);\n      },\n      d = t._gsDefine = function (t, e, i, s) {\n        return new _m(t, e, i, s);\n      },\n      g = h._class = function (t, e, i) {\n        return e = e || function () {}, d(t, [], function () {\n          return e;\n        }, i), e;\n      };\n    d.globals = i;\n    var v = [0, 0, 1, 1],\n      y = [],\n      T = g(\"easing.Ease\", function (t, e, i, s) {\n        this._func = t, this._type = i || 0, this._power = s || 0, this._params = e ? v.concat(e) : v;\n      }, !0),\n      x = T.map = {},\n      w = T.register = function (t, e, i, s) {\n        for (var r, n, a, o, l = e.split(\",\"), _ = l.length, u = (i || \"easeIn,easeOut,easeInOut\").split(\",\"); --_ > -1;) for (n = l[_], r = s ? g(\"easing.\" + n, null, !0) : h.easing[n] || {}, a = u.length; --a > -1;) o = u[a], x[n + \".\" + o] = x[o + n] = r[o] = t.getRatio ? t : t[o] || new t();\n      };\n    for (n = T.prototype, n._calcEnd = !1, n.getRatio = function (t) {\n      if (this._func) return this._params[0] = t, this._func.apply(null, this._params);\n      var e = this._type,\n        i = this._power,\n        s = 1 === e ? 1 - t : 2 === e ? t : .5 > t ? 2 * t : 2 * (1 - t);\n      return 1 === i ? s *= s : 2 === i ? s *= s * s : 3 === i ? s *= s * s * s : 4 === i && (s *= s * s * s * s), 1 === e ? 1 - s : 2 === e ? s : .5 > t ? s / 2 : 1 - s / 2;\n    }, s = [\"Linear\", \"Quad\", \"Cubic\", \"Quart\", \"Quint,Strong\"], r = s.length; --r > -1;) n = s[r] + \",Power\" + r, w(new T(null, null, 1, r), n, \"easeOut\", !0), w(new T(null, null, 2, r), n, \"easeIn\" + (0 === r ? \",easeNone\" : \"\")), w(new T(null, null, 3, r), n, \"easeInOut\");\n    x.linear = h.easing.Linear.easeIn, x.swing = h.easing.Quad.easeInOut;\n    var b = g(\"events.EventDispatcher\", function (t) {\n      this._listeners = {}, this._eventTarget = t || this;\n    });\n    n = b.prototype, n.addEventListener = function (t, e, i, s, r) {\n      r = r || 0;\n      var n,\n        l,\n        h = this._listeners[t],\n        _ = 0;\n      for (null == h && (this._listeners[t] = h = []), l = h.length; --l > -1;) n = h[l], n.c === e && n.s === i ? h.splice(l, 1) : 0 === _ && r > n.pr && (_ = l + 1);\n      h.splice(_, 0, {\n        c: e,\n        s: i,\n        up: s,\n        pr: r\n      }), this !== a || o || a.wake();\n    }, n.removeEventListener = function (t, e) {\n      var i,\n        s = this._listeners[t];\n      if (s) for (i = s.length; --i > -1;) if (s[i].c === e) return s.splice(i, 1), void 0;\n    }, n.dispatchEvent = function (t) {\n      var e,\n        i,\n        s,\n        r = this._listeners[t];\n      if (r) for (e = r.length, i = this._eventTarget; --e > -1;) s = r[e], s && (s.up ? s.c.call(s.s || i, {\n        type: t,\n        target: i\n      }) : s.c.call(s.s || i));\n    };\n    var P = t.requestAnimationFrame,\n      k = t.cancelAnimationFrame,\n      S = Date.now || function () {\n        return new Date().getTime();\n      },\n      R = S();\n    for (s = [\"ms\", \"moz\", \"webkit\", \"o\"], r = s.length; --r > -1 && !P;) P = t[s[r] + \"RequestAnimationFrame\"], k = t[s[r] + \"CancelAnimationFrame\"] || t[s[r] + \"CancelRequestAnimationFrame\"];\n    g(\"Ticker\", function (t, e) {\n      var i,\n        s,\n        r,\n        n,\n        l,\n        h = this,\n        u = S(),\n        f = e !== !1 && P,\n        p = 500,\n        m = 33,\n        d = \"tick\",\n        _g = function g(t) {\n          var e,\n            a,\n            o = S() - R;\n          o > p && (u += o - m), R += o, h.time = (R - u) / 1e3, e = h.time - l, (!i || e > 0 || t === !0) && (h.frame++, l += e + (e >= n ? .004 : n - e), a = !0), t !== !0 && (r = s(_g)), a && h.dispatchEvent(d);\n        };\n      b.call(h), h.time = h.frame = 0, h.tick = function () {\n        _g(!0);\n      }, h.lagSmoothing = function (t, e) {\n        p = t || 1 / _, m = Math.min(e, p, 0);\n      }, h.sleep = function () {\n        null != r && (f && k ? k(r) : clearTimeout(r), s = c, r = null, h === a && (o = !1));\n      }, h.wake = function () {\n        null !== r ? h.sleep() : h.frame > 10 && (R = S() - p + 5), s = 0 === i ? c : f && P ? P : function (t) {\n          return setTimeout(t, 0 | 1e3 * (l - h.time) + 1);\n        }, h === a && (o = !0), _g(2);\n      }, h.fps = function (t) {\n        return arguments.length ? (i = t, n = 1 / (i || 60), l = this.time + n, h.wake(), void 0) : i;\n      }, h.useRAF = function (t) {\n        return arguments.length ? (h.sleep(), f = t, h.fps(i), void 0) : f;\n      }, h.fps(t), setTimeout(function () {\n        f && 5 > h.frame && h.useRAF(!1);\n      }, 1500);\n    }), n = h.Ticker.prototype = new h.events.EventDispatcher(), n.constructor = h.Ticker;\n    var O = g(\"core.Animation\", function (t, e) {\n      if (this.vars = e = e || {}, this._duration = this._totalDuration = t || 0, this._delay = Number(e.delay) || 0, this._timeScale = 1, this._active = e.immediateRender === !0, this.data = e.data, this._reversed = e.reversed === !0, W) {\n        o || a.wake();\n        var i = this.vars.useFrames ? G : W;\n        i.add(this, i._time), this.vars.paused && this.paused(!0);\n      }\n    });\n    a = O.ticker = new h.Ticker(), n = O.prototype, n._dirty = n._gc = n._initted = n._paused = !1, n._totalTime = n._time = 0, n._rawPrevTime = -1, n._next = n._last = n._onUpdate = n._timeline = n.timeline = null, n._paused = !1;\n    var _A = function A() {\n      o && S() - R > 2e3 && a.wake(), setTimeout(_A, 2e3);\n    };\n    _A(), n.play = function (t, e) {\n      return null != t && this.seek(t, e), this.reversed(!1).paused(!1);\n    }, n.pause = function (t, e) {\n      return null != t && this.seek(t, e), this.paused(!0);\n    }, n.resume = function (t, e) {\n      return null != t && this.seek(t, e), this.paused(!1);\n    }, n.seek = function (t, e) {\n      return this.totalTime(Number(t), e !== !1);\n    }, n.restart = function (t, e) {\n      return this.reversed(!1).paused(!1).totalTime(t ? -this._delay : 0, e !== !1, !0);\n    }, n.reverse = function (t, e) {\n      return null != t && this.seek(t || this.totalDuration(), e), this.reversed(!0).paused(!1);\n    }, n.render = function () {}, n.invalidate = function () {\n      return this._time = this._totalTime = 0, this._initted = this._gc = !1, this._rawPrevTime = -1, (this._gc || !this.timeline) && this._enabled(!0), this;\n    }, n.isActive = function () {\n      var t,\n        e = this._timeline,\n        i = this._startTime;\n      return !e || !this._gc && !this._paused && e.isActive() && (t = e.rawTime()) >= i && i + this.totalDuration() / this._timeScale > t;\n    }, n._enabled = function (t, e) {\n      return o || a.wake(), this._gc = !t, this._active = this.isActive(), e !== !0 && (t && !this.timeline ? this._timeline.add(this, this._startTime - this._delay) : !t && this.timeline && this._timeline._remove(this, !0)), !1;\n    }, n._kill = function () {\n      return this._enabled(!1, !1);\n    }, n.kill = function (t, e) {\n      return this._kill(t, e), this;\n    }, n._uncache = function (t) {\n      for (var e = t ? this : this.timeline; e;) e._dirty = !0, e = e.timeline;\n      return this;\n    }, n._swapSelfInParams = function (t) {\n      for (var e = t.length, i = t.concat(); --e > -1;) \"{self}\" === t[e] && (i[e] = this);\n      return i;\n    }, n._callback = function (t) {\n      var e = this.vars;\n      e[t].apply(e[t + \"Scope\"] || e.callbackScope || this, e[t + \"Params\"] || y);\n    }, n.eventCallback = function (t, e, i, s) {\n      if (\"on\" === (t || \"\").substr(0, 2)) {\n        var r = this.vars;\n        if (1 === arguments.length) return r[t];\n        null == e ? delete r[t] : (r[t] = e, r[t + \"Params\"] = f(i) && -1 !== i.join(\"\").indexOf(\"{self}\") ? this._swapSelfInParams(i) : i, r[t + \"Scope\"] = s), \"onUpdate\" === t && (this._onUpdate = e);\n      }\n      return this;\n    }, n.delay = function (t) {\n      return arguments.length ? (this._timeline.smoothChildTiming && this.startTime(this._startTime + t - this._delay), this._delay = t, this) : this._delay;\n    }, n.duration = function (t) {\n      return arguments.length ? (this._duration = this._totalDuration = t, this._uncache(!0), this._timeline.smoothChildTiming && this._time > 0 && this._time < this._duration && 0 !== t && this.totalTime(this._totalTime * (t / this._duration), !0), this) : (this._dirty = !1, this._duration);\n    }, n.totalDuration = function (t) {\n      return this._dirty = !1, arguments.length ? this.duration(t) : this._totalDuration;\n    }, n.time = function (t, e) {\n      return arguments.length ? (this._dirty && this.totalDuration(), this.totalTime(t > this._duration ? this._duration : t, e)) : this._time;\n    }, n.totalTime = function (t, e, i) {\n      if (o || a.wake(), !arguments.length) return this._totalTime;\n      if (this._timeline) {\n        if (0 > t && !i && (t += this.totalDuration()), this._timeline.smoothChildTiming) {\n          this._dirty && this.totalDuration();\n          var s = this._totalDuration,\n            r = this._timeline;\n          if (t > s && !i && (t = s), this._startTime = (this._paused ? this._pauseTime : r._time) - (this._reversed ? s - t : t) / this._timeScale, r._dirty || this._uncache(!1), r._timeline) for (; r._timeline;) r._timeline._time !== (r._startTime + r._totalTime) / r._timeScale && r.totalTime(r._totalTime, !0), r = r._timeline;\n        }\n        this._gc && this._enabled(!0, !1), (this._totalTime !== t || 0 === this._duration) && (F.length && Q(), this.render(t, e, !1), F.length && Q());\n      }\n      return this;\n    }, n.progress = n.totalProgress = function (t, e) {\n      var i = this.duration();\n      return arguments.length ? this.totalTime(i * t, e) : i ? this._time / i : this.ratio;\n    }, n.startTime = function (t) {\n      return arguments.length ? (t !== this._startTime && (this._startTime = t, this.timeline && this.timeline._sortChildren && this.timeline.add(this, t - this._delay)), this) : this._startTime;\n    }, n.endTime = function (t) {\n      return this._startTime + (0 != t ? this.totalDuration() : this.duration()) / this._timeScale;\n    }, n.timeScale = function (t) {\n      if (!arguments.length) return this._timeScale;\n      if (t = t || _, this._timeline && this._timeline.smoothChildTiming) {\n        var e = this._pauseTime,\n          i = e || 0 === e ? e : this._timeline.totalTime();\n        this._startTime = i - (i - this._startTime) * this._timeScale / t;\n      }\n      return this._timeScale = t, this._uncache(!1);\n    }, n.reversed = function (t) {\n      return arguments.length ? (t != this._reversed && (this._reversed = t, this.totalTime(this._timeline && !this._timeline.smoothChildTiming ? this.totalDuration() - this._totalTime : this._totalTime, !0)), this) : this._reversed;\n    }, n.paused = function (t) {\n      if (!arguments.length) return this._paused;\n      var e,\n        i,\n        s = this._timeline;\n      return t != this._paused && s && (o || t || a.wake(), e = s.rawTime(), i = e - this._pauseTime, !t && s.smoothChildTiming && (this._startTime += i, this._uncache(!1)), this._pauseTime = t ? e : null, this._paused = t, this._active = this.isActive(), !t && 0 !== i && this._initted && this.duration() && (e = s.smoothChildTiming ? this._totalTime : (e - this._startTime) / this._timeScale, this.render(e, e === this._totalTime, !0))), this._gc && !t && this._enabled(!0, !1), this;\n    };\n    var C = g(\"core.SimpleTimeline\", function (t) {\n      O.call(this, 0, t), this.autoRemoveChildren = this.smoothChildTiming = !0;\n    });\n    n = C.prototype = new O(), n.constructor = C, n.kill()._gc = !1, n._first = n._last = n._recent = null, n._sortChildren = !1, n.add = n.insert = function (t, e) {\n      var i, s;\n      if (t._startTime = Number(e || 0) + t._delay, t._paused && this !== t._timeline && (t._pauseTime = t._startTime + (this.rawTime() - t._startTime) / t._timeScale), t.timeline && t.timeline._remove(t, !0), t.timeline = t._timeline = this, t._gc && t._enabled(!0, !0), i = this._last, this._sortChildren) for (s = t._startTime; i && i._startTime > s;) i = i._prev;\n      return i ? (t._next = i._next, i._next = t) : (t._next = this._first, this._first = t), t._next ? t._next._prev = t : this._last = t, t._prev = i, this._recent = t, this._timeline && this._uncache(!0), this;\n    }, n._remove = function (t, e) {\n      return t.timeline === this && (e || t._enabled(!1, !0), t._prev ? t._prev._next = t._next : this._first === t && (this._first = t._next), t._next ? t._next._prev = t._prev : this._last === t && (this._last = t._prev), t._next = t._prev = t.timeline = null, t === this._recent && (this._recent = this._last), this._timeline && this._uncache(!0)), this;\n    }, n.render = function (t, e, i) {\n      var s,\n        r = this._first;\n      for (this._totalTime = this._time = this._rawPrevTime = t; r;) s = r._next, (r._active || t >= r._startTime && !r._paused) && (r._reversed ? r.render((r._dirty ? r.totalDuration() : r._totalDuration) - (t - r._startTime) * r._timeScale, e, i) : r.render((t - r._startTime) * r._timeScale, e, i)), r = s;\n    }, n.rawTime = function () {\n      return o || a.wake(), this._totalTime;\n    };\n    var D = g(\"TweenLite\", function (e, i, s) {\n        if (O.call(this, i, s), this.render = D.prototype.render, null == e) throw \"Cannot tween a null target.\";\n        this.target = e = \"string\" != typeof e ? e : D.selector(e) || e;\n        var r,\n          n,\n          a,\n          o = e.jquery || e.length && e !== t && e[0] && (e[0] === t || e[0].nodeType && e[0].style && !e.nodeType),\n          l = this.vars.overwrite;\n        if (this._overwrite = l = null == l ? V[D.defaultOverwrite] : \"number\" == typeof l ? l >> 0 : V[l], (o || e instanceof Array || e.push && f(e)) && \"number\" != typeof e[0]) for (this._targets = a = u(e), this._propLookup = [], this._siblings = [], r = 0; a.length > r; r++) n = a[r], n ? \"string\" != typeof n ? n.length && n !== t && n[0] && (n[0] === t || n[0].nodeType && n[0].style && !n.nodeType) ? (a.splice(r--, 1), this._targets = a = a.concat(u(n))) : (this._siblings[r] = $(n, this, !1), 1 === l && this._siblings[r].length > 1 && K(n, this, null, 1, this._siblings[r])) : (n = a[r--] = D.selector(n), \"string\" == typeof n && a.splice(r + 1, 1)) : a.splice(r--, 1);else this._propLookup = {}, this._siblings = $(e, this, !1), 1 === l && this._siblings.length > 1 && K(e, this, null, 1, this._siblings);\n        (this.vars.immediateRender || 0 === i && 0 === this._delay && this.vars.immediateRender !== !1) && (this._time = -_, this.render(-this._delay));\n      }, !0),\n      M = function M(e) {\n        return e && e.length && e !== t && e[0] && (e[0] === t || e[0].nodeType && e[0].style && !e.nodeType);\n      },\n      z = function z(t, e) {\n        var i,\n          s = {};\n        for (i in t) q[i] || i in e && \"transform\" !== i && \"x\" !== i && \"y\" !== i && \"width\" !== i && \"height\" !== i && \"className\" !== i && \"border\" !== i || !(!j[i] || j[i] && j[i]._autoCSS) || (s[i] = t[i], delete t[i]);\n        t.css = s;\n      };\n    n = D.prototype = new O(), n.constructor = D, n.kill()._gc = !1, n.ratio = 0, n._firstPT = n._targets = n._overwrittenProps = n._startAt = null, n._notifyPluginsOfEnabled = n._lazy = !1, D.version = \"1.18.0\", D.defaultEase = n._ease = new T(null, null, 1, 1), D.defaultOverwrite = \"auto\", D.ticker = a, D.autoSleep = 120, D.lagSmoothing = function (t, e) {\n      a.lagSmoothing(t, e);\n    }, D.selector = t.$ || t.jQuery || function (e) {\n      var i = t.$ || t.jQuery;\n      return i ? (D.selector = i, i(e)) : \"undefined\" == typeof document ? e : document.querySelectorAll ? document.querySelectorAll(e) : document.getElementById(\"#\" === e.charAt(0) ? e.substr(1) : e);\n    };\n    var F = [],\n      I = {},\n      E = /(?:(-|-=|\\+=)?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[0-9]/gi,\n      N = function N(t) {\n        for (var e, i = this._firstPT, s = 1e-6; i;) e = i.blob ? t ? this.join(\"\") : this.start : i.c * t + i.s, i.r ? e = Math.round(e) : s > e && e > -s && (e = 0), i.f ? i.fp ? i.t[i.p](i.fp, e) : i.t[i.p](e) : i.t[i.p] = e, i = i._next;\n      },\n      L = function L(t, e, i, s) {\n        var r,\n          n,\n          a,\n          o,\n          l,\n          h,\n          _,\n          u = [t, e],\n          c = 0,\n          f = \"\",\n          p = 0;\n        for (u.start = t, i && (i(u), t = u[0], e = u[1]), u.length = 0, r = t.match(E) || [], n = e.match(E) || [], s && (s._next = null, s.blob = 1, u._firstPT = s), l = n.length, o = 0; l > o; o++) _ = n[o], h = e.substr(c, e.indexOf(_, c) - c), f += h || !o ? h : \",\", c += h.length, p ? p = (p + 1) % 5 : \"rgba(\" === h.substr(-5) && (p = 1), _ === r[o] || o >= r.length ? f += _ : (f && (u.push(f), f = \"\"), a = parseFloat(r[o]), u.push(a), u._firstPT = {\n          _next: u._firstPT,\n          t: u,\n          p: u.length - 1,\n          s: a,\n          c: (\"=\" === _.charAt(1) ? parseInt(_.charAt(0) + \"1\", 10) * parseFloat(_.substr(2)) : parseFloat(_) - a) || 0,\n          f: 0,\n          r: p && 4 > p\n        }), c += _.length;\n        return f += e.substr(c), f && u.push(f), u.setRatio = N, u;\n      },\n      X = function X(t, e, i, s, r, n, a, o) {\n        var l,\n          h,\n          _ = \"get\" === i ? t[e] : i,\n          u = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(t[e]),\n          c = \"string\" == typeof s && \"=\" === s.charAt(1),\n          f = {\n            t: t,\n            p: e,\n            s: _,\n            f: \"function\" === u,\n            pg: 0,\n            n: r || e,\n            r: n,\n            pr: 0,\n            c: c ? parseInt(s.charAt(0) + \"1\", 10) * parseFloat(s.substr(2)) : parseFloat(s) - _ || 0\n          };\n        return \"number\" !== u && (\"function\" === u && \"get\" === i && (h = e.indexOf(\"set\") || \"function\" != typeof t[\"get\" + e.substr(3)] ? e : \"get\" + e.substr(3), f.s = _ = a ? t[h](a) : t[h]()), \"string\" == typeof _ && (a || isNaN(_)) ? (f.fp = a, l = L(_, s, o || D.defaultStringFilter, f), f = {\n          t: l,\n          p: \"setRatio\",\n          s: 0,\n          c: 1,\n          f: 2,\n          pg: 0,\n          n: r || e,\n          pr: 0\n        }) : c || (f.c = parseFloat(s) - parseFloat(_) || 0)), f.c ? ((f._next = this._firstPT) && (f._next._prev = f), this._firstPT = f, f) : void 0;\n      },\n      B = D._internals = {\n        isArray: f,\n        isSelector: M,\n        lazyTweens: F,\n        blobDif: L\n      },\n      j = D._plugins = {},\n      Y = B.tweenLookup = {},\n      U = 0,\n      q = B.reservedProps = {\n        ease: 1,\n        delay: 1,\n        overwrite: 1,\n        onComplete: 1,\n        onCompleteParams: 1,\n        onCompleteScope: 1,\n        useFrames: 1,\n        runBackwards: 1,\n        startAt: 1,\n        onUpdate: 1,\n        onUpdateParams: 1,\n        onUpdateScope: 1,\n        onStart: 1,\n        onStartParams: 1,\n        onStartScope: 1,\n        onReverseComplete: 1,\n        onReverseCompleteParams: 1,\n        onReverseCompleteScope: 1,\n        onRepeat: 1,\n        onRepeatParams: 1,\n        onRepeatScope: 1,\n        easeParams: 1,\n        yoyo: 1,\n        immediateRender: 1,\n        repeat: 1,\n        repeatDelay: 1,\n        data: 1,\n        paused: 1,\n        reversed: 1,\n        autoCSS: 1,\n        lazy: 1,\n        onOverwrite: 1,\n        callbackScope: 1,\n        stringFilter: 1\n      },\n      V = {\n        none: 0,\n        all: 1,\n        auto: 2,\n        concurrent: 3,\n        allOnStart: 4,\n        preexisting: 5,\n        \"true\": 1,\n        \"false\": 0\n      },\n      G = O._rootFramesTimeline = new C(),\n      W = O._rootTimeline = new C(),\n      Z = 30,\n      Q = B.lazyRender = function () {\n        var t,\n          e = F.length;\n        for (I = {}; --e > -1;) t = F[e], t && t._lazy !== !1 && (t.render(t._lazy[0], t._lazy[1], !0), t._lazy = !1);\n        F.length = 0;\n      };\n    W._startTime = a.time, G._startTime = a.frame, W._active = G._active = !0, setTimeout(Q, 1), O._updateRoot = D.render = function () {\n      var t, e, i;\n      if (F.length && Q(), W.render((a.time - W._startTime) * W._timeScale, !1, !1), G.render((a.frame - G._startTime) * G._timeScale, !1, !1), F.length && Q(), a.frame >= Z) {\n        Z = a.frame + (parseInt(D.autoSleep, 10) || 120);\n        for (i in Y) {\n          for (e = Y[i].tweens, t = e.length; --t > -1;) e[t]._gc && e.splice(t, 1);\n          0 === e.length && delete Y[i];\n        }\n        if (i = W._first, (!i || i._paused) && D.autoSleep && !G._first && 1 === a._listeners.tick.length) {\n          for (; i && i._paused;) i = i._next;\n          i || a.sleep();\n        }\n      }\n    }, a.addEventListener(\"tick\", O._updateRoot);\n    var $ = function $(t, e, i) {\n        var s,\n          r,\n          n = t._gsTweenID;\n        if (Y[n || (t._gsTweenID = n = \"t\" + U++)] || (Y[n] = {\n          target: t,\n          tweens: []\n        }), e && (s = Y[n].tweens, s[r = s.length] = e, i)) for (; --r > -1;) s[r] === e && s.splice(r, 1);\n        return Y[n].tweens;\n      },\n      H = function H(t, e, i, s) {\n        var r,\n          n,\n          a = t.vars.onOverwrite;\n        return a && (r = a(t, e, i, s)), a = D.onOverwrite, a && (n = a(t, e, i, s)), r !== !1 && n !== !1;\n      },\n      K = function K(t, e, i, s, r) {\n        var n, a, o, l;\n        if (1 === s || s >= 4) {\n          for (l = r.length, n = 0; l > n; n++) if ((o = r[n]) !== e) o._gc || o._kill(null, t, e) && (a = !0);else if (5 === s) break;\n          return a;\n        }\n        var h,\n          u = e._startTime + _,\n          c = [],\n          f = 0,\n          p = 0 === e._duration;\n        for (n = r.length; --n > -1;) (o = r[n]) === e || o._gc || o._paused || (o._timeline !== e._timeline ? (h = h || J(e, 0, p), 0 === J(o, h, p) && (c[f++] = o)) : u >= o._startTime && o._startTime + o.totalDuration() / o._timeScale > u && ((p || !o._initted) && 2e-10 >= u - o._startTime || (c[f++] = o)));\n        for (n = f; --n > -1;) if (o = c[n], 2 === s && o._kill(i, t, e) && (a = !0), 2 !== s || !o._firstPT && o._initted) {\n          if (2 !== s && !H(o, e)) continue;\n          o._enabled(!1, !1) && (a = !0);\n        }\n        return a;\n      },\n      J = function J(t, e, i) {\n        for (var s = t._timeline, r = s._timeScale, n = t._startTime; s._timeline;) {\n          if (n += s._startTime, r *= s._timeScale, s._paused) return -100;\n          s = s._timeline;\n        }\n        return n /= r, n > e ? n - e : i && n === e || !t._initted && 2 * _ > n - e ? _ : (n += t.totalDuration() / t._timeScale / r) > e + _ ? 0 : n - e - _;\n      };\n    n._init = function () {\n      var t,\n        e,\n        i,\n        s,\n        r,\n        n = this.vars,\n        a = this._overwrittenProps,\n        o = this._duration,\n        l = !!n.immediateRender,\n        h = n.ease;\n      if (n.startAt) {\n        this._startAt && (this._startAt.render(-1, !0), this._startAt.kill()), r = {};\n        for (s in n.startAt) r[s] = n.startAt[s];\n        if (r.overwrite = !1, r.immediateRender = !0, r.lazy = l && n.lazy !== !1, r.startAt = r.delay = null, this._startAt = D.to(this.target, 0, r), l) if (this._time > 0) this._startAt = null;else if (0 !== o) return;\n      } else if (n.runBackwards && 0 !== o) if (this._startAt) this._startAt.render(-1, !0), this._startAt.kill(), this._startAt = null;else {\n        0 !== this._time && (l = !1), i = {};\n        for (s in n) q[s] && \"autoCSS\" !== s || (i[s] = n[s]);\n        if (i.overwrite = 0, i.data = \"isFromStart\", i.lazy = l && n.lazy !== !1, i.immediateRender = l, this._startAt = D.to(this.target, 0, i), l) {\n          if (0 === this._time) return;\n        } else this._startAt._init(), this._startAt._enabled(!1), this.vars.immediateRender && (this._startAt = null);\n      }\n      if (this._ease = h = h ? h instanceof T ? h : \"function\" == typeof h ? new T(h, n.easeParams) : x[h] || D.defaultEase : D.defaultEase, n.easeParams instanceof Array && h.config && (this._ease = h.config.apply(h, n.easeParams)), this._easeType = this._ease._type, this._easePower = this._ease._power, this._firstPT = null, this._targets) for (t = this._targets.length; --t > -1;) this._initProps(this._targets[t], this._propLookup[t] = {}, this._siblings[t], a ? a[t] : null) && (e = !0);else e = this._initProps(this.target, this._propLookup, this._siblings, a);\n      if (e && D._onPluginEvent(\"_onInitAllProps\", this), a && (this._firstPT || \"function\" != typeof this.target && this._enabled(!1, !1)), n.runBackwards) for (i = this._firstPT; i;) i.s += i.c, i.c = -i.c, i = i._next;\n      this._onUpdate = n.onUpdate, this._initted = !0;\n    }, n._initProps = function (e, i, s, r) {\n      var n, a, o, l, h, _;\n      if (null == e) return !1;\n      I[e._gsTweenID] && Q(), this.vars.css || e.style && e !== t && e.nodeType && j.css && this.vars.autoCSS !== !1 && z(this.vars, e);\n      for (n in this.vars) if (_ = this.vars[n], q[n]) _ && (_ instanceof Array || _.push && f(_)) && -1 !== _.join(\"\").indexOf(\"{self}\") && (this.vars[n] = _ = this._swapSelfInParams(_, this));else if (j[n] && (l = new j[n]())._onInitTween(e, this.vars[n], this)) {\n        for (this._firstPT = h = {\n          _next: this._firstPT,\n          t: l,\n          p: \"setRatio\",\n          s: 0,\n          c: 1,\n          f: 1,\n          n: n,\n          pg: 1,\n          pr: l._priority\n        }, a = l._overwriteProps.length; --a > -1;) i[l._overwriteProps[a]] = this._firstPT;\n        (l._priority || l._onInitAllProps) && (o = !0), (l._onDisable || l._onEnable) && (this._notifyPluginsOfEnabled = !0), h._next && (h._next._prev = h);\n      } else i[n] = X.call(this, e, n, \"get\", _, n, 0, null, this.vars.stringFilter);\n      return r && this._kill(r, e) ? this._initProps(e, i, s, r) : this._overwrite > 1 && this._firstPT && s.length > 1 && K(e, this, i, this._overwrite, s) ? (this._kill(i, e), this._initProps(e, i, s, r)) : (this._firstPT && (this.vars.lazy !== !1 && this._duration || this.vars.lazy && !this._duration) && (I[e._gsTweenID] = !0), o);\n    }, n.render = function (t, e, i) {\n      var s,\n        r,\n        n,\n        a,\n        o = this._time,\n        l = this._duration,\n        h = this._rawPrevTime;\n      if (t >= l) this._totalTime = this._time = l, this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1, this._reversed || (s = !0, r = \"onComplete\", i = i || this._timeline.autoRemoveChildren), 0 === l && (this._initted || !this.vars.lazy || i) && (this._startTime === this._timeline._duration && (t = 0), (0 === t || 0 > h || h === _ && \"isPause\" !== this.data) && h !== t && (i = !0, h > _ && (r = \"onReverseComplete\")), this._rawPrevTime = a = !e || t || h === t ? t : _);else if (1e-7 > t) this._totalTime = this._time = 0, this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0, (0 !== o || 0 === l && h > 0) && (r = \"onReverseComplete\", s = this._reversed), 0 > t && (this._active = !1, 0 === l && (this._initted || !this.vars.lazy || i) && (h >= 0 && (h !== _ || \"isPause\" !== this.data) && (i = !0), this._rawPrevTime = a = !e || t || h === t ? t : _)), this._initted || (i = !0);else if (this._totalTime = this._time = t, this._easeType) {\n        var u = t / l,\n          c = this._easeType,\n          f = this._easePower;\n        (1 === c || 3 === c && u >= .5) && (u = 1 - u), 3 === c && (u *= 2), 1 === f ? u *= u : 2 === f ? u *= u * u : 3 === f ? u *= u * u * u : 4 === f && (u *= u * u * u * u), this.ratio = 1 === c ? 1 - u : 2 === c ? u : .5 > t / l ? u / 2 : 1 - u / 2;\n      } else this.ratio = this._ease.getRatio(t / l);\n      if (this._time !== o || i) {\n        if (!this._initted) {\n          if (this._init(), !this._initted || this._gc) return;\n          if (!i && this._firstPT && (this.vars.lazy !== !1 && this._duration || this.vars.lazy && !this._duration)) return this._time = this._totalTime = o, this._rawPrevTime = h, F.push(this), this._lazy = [t, e], void 0;\n          this._time && !s ? this.ratio = this._ease.getRatio(this._time / l) : s && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1));\n        }\n        for (this._lazy !== !1 && (this._lazy = !1), this._active || !this._paused && this._time !== o && t >= 0 && (this._active = !0), 0 === o && (this._startAt && (t >= 0 ? this._startAt.render(t, e, i) : r || (r = \"_dummyGS\")), this.vars.onStart && (0 !== this._time || 0 === l) && (e || this._callback(\"onStart\"))), n = this._firstPT; n;) n.f ? n.t[n.p](n.c * this.ratio + n.s) : n.t[n.p] = n.c * this.ratio + n.s, n = n._next;\n        this._onUpdate && (0 > t && this._startAt && t !== -1e-4 && this._startAt.render(t, e, i), e || (this._time !== o || s) && this._callback(\"onUpdate\")), r && (!this._gc || i) && (0 > t && this._startAt && !this._onUpdate && t !== -1e-4 && this._startAt.render(t, e, i), s && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), this._active = !1), !e && this.vars[r] && this._callback(r), 0 === l && this._rawPrevTime === _ && a !== _ && (this._rawPrevTime = 0));\n      }\n    }, n._kill = function (t, e, i) {\n      if (\"all\" === t && (t = null), null == t && (null == e || e === this.target)) return this._lazy = !1, this._enabled(!1, !1);\n      e = \"string\" != typeof e ? e || this._targets || this.target : D.selector(e) || e;\n      var s,\n        r,\n        n,\n        a,\n        o,\n        l,\n        h,\n        _,\n        u,\n        c = i && this._time && i._startTime === this._startTime && this._timeline === i._timeline;\n      if ((f(e) || M(e)) && \"number\" != typeof e[0]) for (s = e.length; --s > -1;) this._kill(t, e[s], i) && (l = !0);else {\n        if (this._targets) {\n          for (s = this._targets.length; --s > -1;) if (e === this._targets[s]) {\n            o = this._propLookup[s] || {}, this._overwrittenProps = this._overwrittenProps || [], r = this._overwrittenProps[s] = t ? this._overwrittenProps[s] || {} : \"all\";\n            break;\n          }\n        } else {\n          if (e !== this.target) return !1;\n          o = this._propLookup, r = this._overwrittenProps = t ? this._overwrittenProps || {} : \"all\";\n        }\n        if (o) {\n          if (h = t || o, _ = t !== r && \"all\" !== r && t !== o && (\"object\" != _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(t) || !t._tempKill), i && (D.onOverwrite || this.vars.onOverwrite)) {\n            for (n in h) o[n] && (u || (u = []), u.push(n));\n            if ((u || !t) && !H(this, i, e, u)) return !1;\n          }\n          for (n in h) (a = o[n]) && (c && (a.f ? a.t[a.p](a.s) : a.t[a.p] = a.s, l = !0), a.pg && a.t._kill(h) && (l = !0), a.pg && 0 !== a.t._overwriteProps.length || (a._prev ? a._prev._next = a._next : a === this._firstPT && (this._firstPT = a._next), a._next && (a._next._prev = a._prev), a._next = a._prev = null), delete o[n]), _ && (r[n] = 1);\n          !this._firstPT && this._initted && this._enabled(!1, !1);\n        }\n      }\n      return l;\n    }, n.invalidate = function () {\n      return this._notifyPluginsOfEnabled && D._onPluginEvent(\"_onDisable\", this), this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null, this._notifyPluginsOfEnabled = this._active = this._lazy = !1, this._propLookup = this._targets ? {} : [], O.prototype.invalidate.call(this), this.vars.immediateRender && (this._time = -_, this.render(-this._delay)), this;\n    }, n._enabled = function (t, e) {\n      if (o || a.wake(), t && this._gc) {\n        var i,\n          s = this._targets;\n        if (s) for (i = s.length; --i > -1;) this._siblings[i] = $(s[i], this, !0);else this._siblings = $(this.target, this, !0);\n      }\n      return O.prototype._enabled.call(this, t, e), this._notifyPluginsOfEnabled && this._firstPT ? D._onPluginEvent(t ? \"_onEnable\" : \"_onDisable\", this) : !1;\n    }, D.to = function (t, e, i) {\n      return new D(t, e, i);\n    }, D.from = function (t, e, i) {\n      return i.runBackwards = !0, i.immediateRender = 0 != i.immediateRender, new D(t, e, i);\n    }, D.fromTo = function (t, e, i, s) {\n      return s.startAt = i, s.immediateRender = 0 != s.immediateRender && 0 != i.immediateRender, new D(t, e, s);\n    }, D.delayedCall = function (t, e, i, s, r) {\n      return new D(e, 0, {\n        delay: t,\n        onComplete: e,\n        onCompleteParams: i,\n        callbackScope: s,\n        onReverseComplete: e,\n        onReverseCompleteParams: i,\n        immediateRender: !1,\n        lazy: !1,\n        useFrames: r,\n        overwrite: 0\n      });\n    }, D.set = function (t, e) {\n      return new D(t, 0, e);\n    }, D.getTweensOf = function (t, e) {\n      if (null == t) return [];\n      t = \"string\" != typeof t ? t : D.selector(t) || t;\n      var i, s, r, n;\n      if ((f(t) || M(t)) && \"number\" != typeof t[0]) {\n        for (i = t.length, s = []; --i > -1;) s = s.concat(D.getTweensOf(t[i], e));\n        for (i = s.length; --i > -1;) for (n = s[i], r = i; --r > -1;) n === s[r] && s.splice(i, 1);\n      } else for (s = $(t).concat(), i = s.length; --i > -1;) (s[i]._gc || e && !s[i].isActive()) && s.splice(i, 1);\n      return s;\n    }, D.killTweensOf = D.killDelayedCallsTo = function (t, e, i) {\n      \"object\" == _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(e) && (i = e, e = !1);\n      for (var s = D.getTweensOf(t, e), r = s.length; --r > -1;) s[r]._kill(i, t);\n    };\n    var te = g(\"plugins.TweenPlugin\", function (t, e) {\n      this._overwriteProps = (t || \"\").split(\",\"), this._propName = this._overwriteProps[0], this._priority = e || 0, this._super = te.prototype;\n    }, !0);\n    if (n = te.prototype, te.version = \"1.18.0\", te.API = 2, n._firstPT = null, n._addTween = X, n.setRatio = N, n._kill = function (t) {\n      var e,\n        i = this._overwriteProps,\n        s = this._firstPT;\n      if (null != t[this._propName]) this._overwriteProps = [];else for (e = i.length; --e > -1;) null != t[i[e]] && i.splice(e, 1);\n      for (; s;) null != t[s.n] && (s._next && (s._next._prev = s._prev), s._prev ? (s._prev._next = s._next, s._prev = null) : this._firstPT === s && (this._firstPT = s._next)), s = s._next;\n      return !1;\n    }, n._roundProps = function (t, e) {\n      for (var i = this._firstPT; i;) (t[this._propName] || null != i.n && t[i.n.split(this._propName + \"_\").join(\"\")]) && (i.r = e), i = i._next;\n    }, D._onPluginEvent = function (t, e) {\n      var i,\n        s,\n        r,\n        n,\n        a,\n        o = e._firstPT;\n      if (\"_onInitAllProps\" === t) {\n        for (; o;) {\n          for (a = o._next, s = r; s && s.pr > o.pr;) s = s._next;\n          (o._prev = s ? s._prev : n) ? o._prev._next = o : r = o, (o._next = s) ? s._prev = o : n = o, o = a;\n        }\n        o = e._firstPT = r;\n      }\n      for (; o;) o.pg && \"function\" == typeof o.t[t] && o.t[t]() && (i = !0), o = o._next;\n      return i;\n    }, te.activate = function (t) {\n      for (var e = t.length; --e > -1;) t[e].API === te.API && (j[new t[e]()._propName] = t[e]);\n      return !0;\n    }, d.plugin = function (t) {\n      if (!(t && t.propName && t.init && t.API)) throw \"illegal plugin definition.\";\n      var e,\n        i = t.propName,\n        s = t.priority || 0,\n        r = t.overwriteProps,\n        n = {\n          init: \"_onInitTween\",\n          set: \"setRatio\",\n          kill: \"_kill\",\n          round: \"_roundProps\",\n          initAll: \"_onInitAllProps\"\n        },\n        a = g(\"plugins.\" + i.charAt(0).toUpperCase() + i.substr(1) + \"Plugin\", function () {\n          te.call(this, i, s), this._overwriteProps = r || [];\n        }, t.global === !0),\n        o = a.prototype = new te(i);\n      o.constructor = a, a.API = t.API;\n      for (e in n) \"function\" == typeof t[e] && (o[n[e]] = t[e]);\n      return a.version = t.version, te.activate([a]), a;\n    }, s = t._gsQueue) {\n      for (r = 0; s.length > r; r++) s[r]();\n      for (n in p) p[n].func || t.console.log(\"GSAP encountered missing dependency: com.greensock.\" + n);\n    }\n    o = !1;\n  }\n}( true && module.exports && \"undefined\" != typeof global ? global : undefined || window, \"TweenMax\");\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../../node_modules/webpack/buildin/harmony-module.js */ \"./node_modules/webpack/buildin/harmony-module.js\")(module), __webpack_require__(/*! ./../../../../../../../../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/TweenMax.min.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js":
/*!******************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js ***!
  \******************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = Winwheel;\n/*\r\n    Winwheel.js, by Douglas McKechie @ www.dougtesting.net\r\n    See website for tutorials and other documentation.\r\n\r\n    The MIT License (MIT)\r\n\r\n    Copyright (c) 2012-2019 Douglas McKechie\r\n\r\n    Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    of this software and associated documentation files (the \"Software\"), to deal\r\n    in the Software without restriction, including without limitation the rights\r\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    copies of the Software, and to permit persons to whom the Software is\r\n    furnished to do so, subject to the following conditions:\r\n\r\n    The above copyright notice and this permission notice shall be included in all\r\n    copies or substantial portions of the Software.\r\n\r\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n    SOFTWARE.\r\n*/\n\n// ====================================================================================================================\n// The constructor for the WinWheel object, a JSON-like array of options can be passed in.\n// By default the wheel is drawn if canvas object exists on the page, but can pass false as second parameter if don't want this to happen.\n// ====================================================================================================================\nfunction Winwheel(options, drawWheel) {\n  defaultOptions = {\n    canvasId: \"canvas\",\n    // Id of the canvas which the wheel is to draw on to.\n    centerX: null,\n    // X position of the center of the wheel. The default of these are null which means will be placed in center of the canvas.\n    centerY: null,\n    // Y position of the wheel center. If left null at time of construct the center of the canvas is used.\n    outerRadius: null,\n    // The radius of the outside of the wheel. If left null it will be set to the radius from the center of the canvas to its shortest side.\n    innerRadius: 0,\n    // Normally 0. Allows the creation of rings / doughnuts if set to value > 0. Should not exceed outer radius.\n    numSegments: 1,\n    // The number of segments. Need at least one to draw.\n    drawMode: \"code\",\n    // The draw mode. Possible values are 'code', 'image', 'segmentImage'. Default is code which means segments are drawn using canvas arc() function.\n    rotationAngle: 0,\n    // The angle of rotation of the wheel - 0 is 12 o'clock position.\n    textFontFamily: \"Arial\",\n    // Segment text font, you should use web safe fonts.\n    textFontSize: 20,\n    // Size of the segment text.\n    textFontWeight: \"bold\",\n    // Font weight.\n    textOrientation: \"horizontal\",\n    // Either horizontal, vertical, or curved.\n    textAlignment: \"center\",\n    // Either center, inner, or outer.\n    textDirection: \"normal\",\n    // Either normal or reversed. In normal mode for horizontal text in segment at 3 o'clock is correct way up, in reversed text at 9 o'clock segment is correct way up.\n    textMargin: null,\n    // Margin between the inner or outer of the wheel (depends on textAlignment).\n    textFillStyle: \"black\",\n    // This is basically the text colour.\n    textStrokeStyle: null,\n    // Basically the line colour for segment text, only looks good for large text so off by default.\n    textLineWidth: 1,\n    // Width of the lines around the text. Even though this defaults to 1, a line is only drawn if textStrokeStyle specified.\n    fillStyle: \"silver\",\n    // The segment background colour.\n    strokeStyle: \"black\",\n    // Segment line colour. Again segment lines only drawn if this is specified.\n    lineWidth: 1,\n    // Width of lines around segments.\n    clearTheCanvas: true,\n    // When set to true the canvas will be cleared before the wheel is drawn.\n    imageOverlay: false,\n    // If set to true in image drawing mode the outline of the segments will be displayed over the image. Does nothing in code drawMode.\n    drawText: true,\n    // By default the text of the segments is rendered in code drawMode and not in image drawMode.\n    pointerAngle: 0,\n    // Location of the pointer that indicates the prize when wheel has stopped. Default is 0 so the (corrected) 12 o'clock position.\n    wheelImage: null,\n    // Must be set to image data in order to use image to draw the wheel - drawMode must also be 'image'.\n    imageDirection: \"N\",\n    // Used when drawMode is segmentImage. Default is north, can also be (E)ast, (S)outh, (W)est.\n    responsive: false,\n    // If set to true the wheel will resize when the window first loads and also onResize.\n    scaleFactor: 1 // Set by the responsive function. Used in many calculations to scale the wheel.\n  };\n\n  // -----------------------------------------\n  // Loop through the default options and create properties of this class set to the value for the option passed in\n  // or if not value for the option was passed in then to the default.\n  for (var key in defaultOptions) {\n    if (options != null && typeof options[key] !== \"undefined\") {\n      this[key] = options[key];\n    } else {\n      this[key] = defaultOptions[key];\n    }\n  }\n\n  // Also loop though the passed in options and add anything specified not part of the class in to it as a property.\n  if (options != null) {\n    for (var _key in options) {\n      if (typeof this[_key] === \"undefined\") {\n        this[_key] = options[_key];\n      }\n    }\n  }\n\n  // ------------------------------------------\n  // If the id of the canvas is set, try to get the canvas as we need it for drawing.\n  if (this.canvasId) {\n    this.canvas = document.getElementById(this.canvasId);\n    if (this.canvas) {\n      // If the centerX and centerY have not been specified in the options then default to center of the canvas\n      // and make the outerRadius half of the canvas width - this means the wheel will fill the canvas.\n      if (this.centerX == null) {\n        this.centerX = this.canvas.width / 2;\n      }\n      if (this.centerY == null) {\n        this.centerY = this.canvas.height / 2;\n      }\n      if (this.outerRadius == null) {\n        // Need to set to half the width of the shortest dimension of the canvas as the canvas may not be square.\n        // Minus the line segment line width otherwise the lines around the segments on the top,left,bottom,right\n        // side are chopped by the edge of the canvas.\n        if (this.canvas.width < this.canvas.height) {\n          this.outerRadius = this.canvas.width / 2 - this.lineWidth;\n        } else {\n          this.outerRadius = this.canvas.height / 2 - this.lineWidth;\n        }\n      }\n\n      // Also get a 2D context to the canvas as we need this to draw with.\n      this.ctx = this.canvas.getContext(\"2d\");\n    } else {\n      this.canvas = null;\n      this.ctx = null;\n    }\n  } else {\n    this.canvas = null;\n    this.ctx = null;\n  }\n\n  // ------------------------------------------\n  // Add array of segments to the wheel, then populate with segments if number of segments is specified for this object.\n  this.segments = new Array(null);\n  for (var x = 1; x <= this.numSegments; x++) {\n    // If options for the segments have been specified then create a segment sending these options so\n    // the specified values are used instead of the defaults.\n    if (options != null && options[\"segments\"] && typeof options[\"segments\"][x - 1] !== \"undefined\") {\n      this.segments[x] = new Segment(options[\"segments\"][x - 1]);\n    } else {\n      this.segments[x] = new Segment();\n    }\n  }\n\n  // ------------------------------------------\n  // Call function to update the segment sizes setting the starting and ending angles.\n  this.updateSegmentSizes();\n\n  // If the text margin is null then set to same as font size as we want some by default.\n  if (this.textMargin === null) {\n    this.textMargin = this.textFontSize / 1.7;\n  }\n\n  // ------------------------------------------\n  // If the animation options have been passed in then create animation object as a property of this class\n  // and pass the options to it so the animation is set. Otherwise create default animation object.\n  if (options != null && options[\"animation\"] && typeof options[\"animation\"] !== \"undefined\") {\n    this.animation = new Animation(options[\"animation\"]);\n  } else {\n    this.animation = new Animation();\n  }\n\n  // ------------------------------------------\n  // If some pin options then create create a pin object and then pass them in.\n  if (options != null && options[\"pins\"] && typeof options[\"pins\"] !== \"undefined\") {\n    this.pins = new Pin(options[\"pins\"]);\n  }\n\n  // ------------------------------------------\n  // If the drawMode is image change some defaults provided a value has not been specified.\n  if (this.drawMode == \"image\" || this.drawMode == \"segmentImage\") {\n    // Remove grey fillStyle.\n    if (typeof options[\"fillStyle\"] === \"undefined\") {\n      this.fillStyle = null;\n    }\n\n    // Set strokeStyle to red.\n    if (typeof options[\"strokeStyle\"] === \"undefined\") {\n      this.strokeStyle = \"red\";\n    }\n\n    // Set drawText to false as we will assume any text is part of the image.\n    if (typeof options[\"drawText\"] === \"undefined\") {\n      this.drawText = false;\n    }\n\n    // Also set the lineWidth to 1 so that segment overlay will look correct.\n    if (typeof options[\"lineWidth\"] === \"undefined\") {\n      this.lineWidth = 1;\n    }\n\n    // Set drawWheel to false as normally the image needs to be loaded first.\n    if (typeof drawWheel === \"undefined\") {\n      drawWheel = false;\n    }\n  } else {\n    // When in code drawMode the default is the wheel will draw.\n    if (typeof drawWheel === \"undefined\") {\n      drawWheel = true;\n    }\n  }\n\n  // Create pointer guide.\n  if (options != null && options[\"pointerGuide\"] && typeof options[\"pointerGuide\"] !== \"undefined\") {\n    this.pointerGuide = new PointerGuide(options[\"pointerGuide\"]);\n  } else {\n    this.pointerGuide = new PointerGuide();\n  }\n\n  // Check if the wheel is to be responsive, if so then need to save the original size of the canvas\n  // and also check for data- attributes on the canvas which help control the scaling.\n  if (this.responsive) {\n    winwheelToDrawDuringAnimation = this;\n\n    // Save the original defined width and height of the canvas, this is needed later to work out the scaling.\n    this._originalCanvasWidth = this.canvas.width;\n    this._originalCanvasHeight = this.canvas.height;\n\n    // Get data-attributes on the canvas.\n    this._responsiveScaleHeight = this.canvas.dataset.responsivescaleheight;\n    this._responsiveMinWidth = this.canvas.dataset.responsiveminwidth;\n    this._responsiveMinHeight = this.canvas.dataset.responsiveminheight;\n    this._responsiveMargin = this.canvas.dataset.responsivemargin;\n\n    // Add event listeners for onload and onresize and call a function defined at the bottom\n    // of this script which will handle that and work out the scale factor.\n    window.addEventListener(\"load\", winwheelResize);\n    window.addEventListener(\"resize\", winwheelResize);\n  }\n\n  // Finally if drawWheel is true then call function to render the wheel, segment text, overlay etc.\n  if (drawWheel == true) {\n    this.draw(this.clearTheCanvas);\n  } else if (this.drawMode == \"segmentImage\") {\n    // If segment image then loop though all the segments and load the images for them setting a callback\n    // which will call the draw function of the wheel once all the images have been loaded.\n    winwheelToDrawDuringAnimation = this;\n    winhweelAlreadyDrawn = false;\n    for (var y = 1; y <= this.numSegments; y++) {\n      if (this.segments[y].image !== null) {\n        this.segments[y].imgData = new Image();\n        this.segments[y].imgData.onload = winwheelLoadedImage;\n        this.segments[y].imgData.src = this.segments[y].image;\n      }\n    }\n  }\n}\n\n// ====================================================================================================================\n// This function sorts out the segment sizes. Some segments may have set sizes, for the others what is left out of\n// 360 degrees is shared evenly. What this function actually does is set the start and end angle of the arcs.\n// ====================================================================================================================\nWinwheel.prototype.updateSegmentSizes = function () {\n  // If this object actually contains some segments\n  if (this.segments) {\n    // First add up the arc used for the segments where the size has been set.\n    var arcUsed = 0;\n    var numSet = 0;\n\n    // Remember, to make it easy to access segments, the position of the segments in the array starts from 1 (not 0).\n    for (var x = 1; x <= this.numSegments; x++) {\n      if (this.segments[x].size !== null) {\n        arcUsed += this.segments[x].size;\n        numSet++;\n      }\n    }\n    var arcLeft = 360 - arcUsed;\n\n    // Create variable to hold how much each segment with non-set size will get in terms of degrees.\n    var degreesEach = 0;\n    if (arcLeft > 0) {\n      degreesEach = arcLeft / (this.numSegments - numSet);\n    }\n\n    // ------------------------------------------\n    // Now loop though and set the start and end angle of each segment.\n    var currentDegree = 0;\n    for (var _x = 1; _x <= this.numSegments; _x++) {\n      // Set start angle.\n      this.segments[_x].startAngle = currentDegree;\n\n      // If the size is set then add this to the current degree to get the end, else add the degreesEach to it.\n      if (this.segments[_x].size) {\n        currentDegree += this.segments[_x].size;\n      } else {\n        currentDegree += degreesEach;\n      }\n\n      // Set end angle.\n      this.segments[_x].endAngle = currentDegree;\n    }\n  }\n};\n\n// ====================================================================================================================\n// This function clears the canvas. Will wipe anything else which happens to be drawn on it.\n// ====================================================================================================================\nWinwheel.prototype.clearCanvas = function () {\n  if (this.ctx) {\n    this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n  }\n};\n\n// ====================================================================================================================\n// This function draws / re-draws the wheel on the canvas therefore rendering any changes.\n// ====================================================================================================================\nWinwheel.prototype.draw = function (clearTheCanvas) {\n  // If have the canvas context.\n  if (this.ctx) {\n    // Clear the canvas, unless told not to.\n    if (typeof clearTheCanvas !== \"undefined\") {\n      if (clearTheCanvas == true) {\n        this.clearCanvas();\n      }\n    } else {\n      this.clearCanvas();\n    }\n\n    // Call functions to draw the segments and then segment text.\n    if (this.drawMode == \"image\") {\n      // Draw the wheel by loading and drawing an image such as a png on the canvas.\n      this.drawWheelImage();\n\n      // If we are to draw the text, do so before the overlay is drawn\n      // as this allows the overlay to be used to create some interesting effects.\n      if (this.drawText == true) {\n        this.drawSegmentText();\n      }\n\n      // If image overlay is true then call function to draw the segments over the top of the image.\n      // This is useful during development to check alignment between where the code thinks the segments are and where they appear on the image.\n      if (this.imageOverlay == true) {\n        this.drawSegments();\n      }\n    } else if (this.drawMode == \"segmentImage\") {\n      // Draw the wheel by rendering the image for each segment.\n      this.drawSegmentImages();\n\n      // If we are to draw the text, do so before the overlay is drawn\n      // as this allows the overlay to be used to create some interesting effects.\n      if (this.drawText == true) {\n        this.drawSegmentText();\n      }\n\n      // If image overlay is true then call function to draw the segments over the top of the image.\n      // This is useful during development to check alignment between where the code thinks the segments are and where they appear on the image.\n      if (this.imageOverlay == true) {\n        this.drawSegments();\n      }\n    } else {\n      // The default operation is to draw the segments using code via the canvas arc() method.\n      this.drawSegments();\n\n      // The text is drawn on top.\n      if (this.drawText == true) {\n        this.drawSegmentText();\n      }\n    }\n\n    // If this class has pins.\n    if (typeof this.pins !== \"undefined\") {\n      // If they are to be visible then draw them.\n      if (this.pins.visible == true) {\n        this.drawPins();\n      }\n    }\n\n    // If pointer guide is display property is set to true then call function to draw the pointer guide.\n    if (this.pointerGuide.display == true) {\n      this.drawPointerGuide();\n    }\n  }\n};\n\n// ====================================================================================================================\n// Draws the pins around the outside of the wheel.\n// ====================================================================================================================\nWinwheel.prototype.drawPins = function () {\n  if (this.pins && this.pins.number) {\n    // Get scaled centerX and centerY to use in the code below so pins will draw responsively too.\n    var centerX = this.centerX * this.scaleFactor;\n    var centerY = this.centerY * this.scaleFactor;\n    var outerRadius = this.outerRadius * this.scaleFactor;\n\n    // Check if the pin's size is to be responsive too, if so set the pinOuterRadius to a scaled version number.\n    var pinOuterRadius = this.pins.outerRadius;\n    var pinMargin = this.pins.margin;\n    if (this.pins.responsive) {\n      pinOuterRadius = this.pins.outerRadius * this.scaleFactor;\n      pinMargin = this.pins.margin * this.scaleFactor;\n    }\n\n    // Work out the angle to draw each pin a which is simply 360 / the number of pins as they space evenly around.\n    //++ There is a slight oddity with the pins in that there is a pin at 0 and also one at 360 and these will be drawn\n    //++ directly over the top of each other. Also pins are 0 indexed which could possibly cause some confusion\n    //++ with the getCurrentPin function - for now this is just used for audio so probably not a problem.\n    var pinSpacing = 360 / this.pins.number;\n    for (var i = 1; i <= this.pins.number; i++) {\n      this.ctx.save();\n\n      // Set the stroke style and line width.\n      this.ctx.strokeStyle = this.pins.strokeStyle;\n      this.ctx.lineWidth = this.pins.lineWidth;\n      this.ctx.fillStyle = this.pins.fillStyle;\n\n      // Move to the center.\n      this.ctx.translate(centerX, centerY);\n\n      // Rotate to to the pin location which is i * the pinSpacing.\n      this.ctx.rotate(this.degToRad(i * pinSpacing + this.rotationAngle));\n\n      // Move back out.\n      this.ctx.translate(-centerX, -centerY);\n\n      // Create a path for the pin circle.\n      this.ctx.beginPath();\n      // x, y, radius, startAngle, endAngle.\n      this.ctx.arc(centerX, centerY - outerRadius + pinOuterRadius + pinMargin, pinOuterRadius, 0, 2 * Math.PI);\n      if (this.pins.fillStyle) {\n        this.ctx.fill();\n      }\n      if (this.pins.strokeStyle) {\n        this.ctx.stroke();\n      }\n      this.ctx.restore();\n    }\n  }\n};\n\n// ====================================================================================================================\n// Draws a line from the center of the wheel to the outside at the angle where the code thinks the pointer is.\n// ====================================================================================================================\nWinwheel.prototype.drawPointerGuide = function () {\n  // If have canvas context.\n  if (this.ctx) {\n    // Get scaled center x an y and also the outer radius.\n    var centerX = this.centerX * this.scaleFactor;\n    var centerY = this.centerY * this.scaleFactor;\n    var outerRadius = this.outerRadius * this.scaleFactor;\n    this.ctx.save();\n\n    // Rotate the canvas to the line goes towards the location of the pointer.\n    this.ctx.translate(centerX, centerY);\n    this.ctx.rotate(this.degToRad(this.pointerAngle));\n    this.ctx.translate(-centerX, -centerY);\n\n    // Set line colour and width.\n    this.ctx.strokeStyle = this.pointerGuide.strokeStyle;\n    this.ctx.lineWidth = this.pointerGuide.lineWidth;\n\n    // Draw from the center of the wheel outwards past the wheel outer radius.\n    this.ctx.beginPath();\n    this.ctx.moveTo(centerX, centerY);\n    this.ctx.lineTo(centerX, -(outerRadius / 4));\n    this.ctx.stroke();\n    this.ctx.restore();\n  }\n};\n\n// ====================================================================================================================\n// This function takes an image such as PNG and draws it on the canvas making its center at the centerX and center for the wheel.\n// ====================================================================================================================\nWinwheel.prototype.drawWheelImage = function () {\n  // Double check the wheelImage property of this class is not null. This does not actually detect that an image\n  // source was set and actually loaded so might get error if this is not the case. This is why the initial call\n  // to draw() should be done from a wheelImage.onload callback as detailed in example documentation.\n  if (this.wheelImage != null) {\n    // Get the centerX and centerY in to variables, adjust by the scaleFactor.\n    var centerX = this.centerX * this.scaleFactor;\n    var centerY = this.centerY * this.scaleFactor;\n\n    // Get the scaled width and height of the image.\n    var scaledWidth = this.wheelImage.width * this.scaleFactor;\n    var scaledHeight = this.wheelImage.height * this.scaleFactor;\n\n    // Work out the correct X and Y to draw the image at. We need to get the center point of the image\n    // aligned over the center point of the wheel, we can't just place it at 0, 0.\n    var imageLeft = centerX - scaledWidth / 2;\n    var imageTop = centerY - scaledHeight / 2;\n\n    // Rotate and then draw the wheel.\n    // We must rotate by the rotationAngle before drawing to ensure that image wheels will spin.\n    this.ctx.save();\n    this.ctx.translate(centerX, centerY);\n    this.ctx.rotate(this.degToRad(this.rotationAngle));\n    this.ctx.translate(-centerX, -centerY);\n\n    // Draw the image passing the scaled width and height which will ensure the image will be responsive.\n    this.ctx.drawImage(this.wheelImage, imageLeft, imageTop, scaledWidth, scaledHeight);\n    this.ctx.restore();\n  }\n};\n\n// ====================================================================================================================\n// This function draws the wheel on the canvas by rendering the image for each segment.\n// ====================================================================================================================\nWinwheel.prototype.drawSegmentImages = function () {\n  // Again check have context in case this function was called directly and not via draw function.\n  if (this.ctx) {\n    // Get the centerX and centerY of the wheel adjusted with the scale factor.\n    var centerX = this.centerX * this.scaleFactor;\n    var centerY = this.centerY * this.scaleFactor;\n\n    // Draw the segments if there is at least one in the segments array.\n    if (this.segments) {\n      // Loop though and output all segments - position 0 of the array is not used, so start loop from index 1\n      // this is to avoid confusion when talking about the first segment.\n      for (var x = 1; x <= this.numSegments; x++) {\n        // Get the segment object as we need it to read options from.\n        var seg = this.segments[x];\n\n        // Check image has loaded so a property such as height has a value.\n        if (seg.imgData.height) {\n          // Work out the correct X and Y to draw the image at which depends on the direction of the image.\n          // Images can be created in 4 directions. North, South, East, West.\n          // North: Outside at top, inside at bottom. Sits evenly over the 0 degrees angle.\n          // South: Outside at bottom, inside at top. Sits evenly over the 180 degrees angle.\n          // East: Outside at right, inside at left. Sits evenly over the 90 degrees angle.\n          // West: Outside at left, inside at right. Sits evenly over the 270 degrees angle.\n          var imageLeft = 0;\n          var imageTop = 0;\n          var imageAngle = 0;\n          var imageDirection = \"\";\n\n          // Get scaled width and height of the segment image.\n          var scaledWidth = seg.imgData.width * this.scaleFactor;\n          var scaledHeight = seg.imgData.height * this.scaleFactor;\n          if (seg.imageDirection !== null) {\n            imageDirection = seg.imageDirection;\n          } else {\n            imageDirection = this.imageDirection;\n          }\n          if (imageDirection == \"S\") {\n            // Left set so image sits half/half over the 180 degrees point.\n            imageLeft = centerX - scaledWidth / 2;\n\n            // Top so image starts at the centerY.\n            imageTop = centerY;\n\n            // Angle to draw the image is its starting angle + half its size.\n            // Here we add 180 to the angle to the segment is poistioned correctly.\n            imageAngle = seg.startAngle + 180 + (seg.endAngle - seg.startAngle) / 2;\n          } else if (imageDirection == \"E\") {\n            // Left set so image starts and the center point.\n            imageLeft = centerX;\n\n            // Top is so that it sits half/half over the 90 degree point.\n            imageTop = centerY - scaledHeight / 2;\n\n            // Again get the angle in the center of the segment and add it to the rotation angle.\n            // this time we need to add 270 to that to the segment is rendered the correct place.\n            imageAngle = seg.startAngle + 270 + (seg.endAngle - seg.startAngle) / 2;\n          } else if (imageDirection == \"W\") {\n            // Left is the centerX minus the width of the image.\n            imageLeft = centerX - scaledWidth;\n\n            // Top is so that it sits half/half over the 270 degree point.\n            imageTop = centerY - scaledHeight / 2;\n\n            // Again get the angle in the center of the segment and add it to the rotation angle.\n            // this time we need to add 90 to that to the segment is rendered the correct place.\n            imageAngle = seg.startAngle + 90 + (seg.endAngle - seg.startAngle) / 2;\n          } else {\n            // North is the default.\n            // Left set so image sits half/half over the 0 degrees point.\n            imageLeft = centerX - scaledWidth / 2;\n\n            // Top so image is its height out (above) the center point.\n            imageTop = centerY - scaledHeight;\n\n            // Angle to draw the image is its starting angle + half its size.\n            // this sits it half/half over the center angle of the segment.\n            imageAngle = seg.startAngle + (seg.endAngle - seg.startAngle) / 2;\n          }\n\n          // --------------------------------------------------\n          // Rotate to the position of the segment and then draw the image.\n          this.ctx.save();\n          this.ctx.translate(centerX, centerY);\n\n          // So math here is the rotation angle of the wheel plus half way between the start and end angle of the segment.\n          this.ctx.rotate(this.degToRad(this.rotationAngle + imageAngle));\n          this.ctx.translate(-centerX, -centerY);\n\n          // Draw the image passing the scaled width and height so that it can be responsive.\n          this.ctx.drawImage(seg.imgData, imageLeft, imageTop, scaledWidth, scaledHeight);\n          this.ctx.restore();\n        } else {\n          //console.log(\"Segment \" + x + \" imgData is not loaded\");\n        }\n      }\n    }\n  }\n};\n\n// ====================================================================================================================\n// This function draws the wheel on the page by rendering the segments on the canvas.\n// ====================================================================================================================\nWinwheel.prototype.drawSegments = function () {\n  // Again check have context in case this function was called directly and not via draw function.\n  if (this.ctx) {\n    // Draw the segments if there is at least one in the segments array.\n    if (this.segments) {\n      // Get scaled centerX and centerY and also scaled inner and outer radius.\n      var centerX = this.centerX * this.scaleFactor;\n      var centerY = this.centerY * this.scaleFactor;\n      var innerRadius = this.innerRadius * this.scaleFactor;\n      var outerRadius = this.outerRadius * this.scaleFactor;\n\n      // Loop though and output all segments - position 0 of the array is not used, so start loop from index 1\n      // this is to avoid confusion when talking about the first segment.\n      for (var x = 1; x <= this.numSegments; x++) {\n        // Get the segment object as we need it to read options from.\n        var seg = this.segments[x];\n        var fillStyle = void 0;\n        var lineWidth = void 0;\n        var strokeStyle = void 0;\n\n        // Set the variables that defined in the segment, or use the default options.\n        if (seg.fillStyle !== null) {\n          fillStyle = seg.fillStyle;\n        } else {\n          fillStyle = this.fillStyle;\n        }\n        this.ctx.fillStyle = fillStyle;\n        if (seg.lineWidth !== null) {\n          lineWidth = seg.lineWidth;\n        } else {\n          lineWidth = this.lineWidth;\n        }\n        this.ctx.lineWidth = lineWidth;\n        if (seg.strokeStyle !== null) {\n          strokeStyle = seg.strokeStyle;\n        } else {\n          strokeStyle = this.strokeStyle;\n        }\n        this.ctx.strokeStyle = strokeStyle;\n\n        // Check there is a strokeStyle or fillStyle, if not the segment is invisible so should not try to draw it otherwise a path is began but not ended.\n        if (strokeStyle || fillStyle) {\n          // Begin a path as the segment consists of an arc and 2 lines.\n          this.ctx.beginPath();\n\n          // If don't have an inner radius then move to the center of the wheel as we want a line out from the center\n          // to the start of the arc for the outside of the wheel when we arc. Canvas will draw the connecting line for us.\n          if (!this.innerRadius) {\n            this.ctx.moveTo(centerX, centerY);\n          } else {\n            // Work out the x and y values for the starting point of the segment which is at its starting angle\n            // but out from the center point of the wheel by the value of the innerRadius. Some correction for line width is needed.\n            var iX = Math.cos(this.degToRad(seg.startAngle + this.rotationAngle - 90)) * (innerRadius - lineWidth / 2);\n            var iY = Math.sin(this.degToRad(seg.startAngle + this.rotationAngle - 90)) * (innerRadius - lineWidth / 2);\n\n            // Now move here relative to the center point of the wheel.\n            this.ctx.moveTo(centerX + iX, centerY + iY);\n          }\n\n          // Draw the outer arc of the segment clockwise in direction -->\n          this.ctx.arc(centerX, centerY, outerRadius, this.degToRad(seg.startAngle + this.rotationAngle - 90), this.degToRad(seg.endAngle + this.rotationAngle - 90), false);\n          if (this.innerRadius) {\n            // Draw another arc, this time anticlockwise <-- at the innerRadius between the end angle and the start angle.\n            // Canvas will draw a connecting line from the end of the outer arc to the beginning of the inner arc completing the shape.\n            this.ctx.arc(centerX, centerY, innerRadius, this.degToRad(seg.endAngle + this.rotationAngle - 90), this.degToRad(seg.startAngle + this.rotationAngle - 90), true);\n          } else {\n            // If no inner radius then we draw a line back to the center of the wheel.\n            this.ctx.lineTo(centerX, centerY);\n          }\n\n          // Fill and stroke the segment. Only do either if a style was specified, if the style is null then\n          // we assume the developer did not want that particular thing.\n          // For example no stroke style so no lines to be drawn.\n          if (fillStyle) {\n            this.ctx.fill();\n          }\n          if (strokeStyle) {\n            this.ctx.stroke();\n          }\n        }\n      }\n    }\n  }\n};\n\n// ====================================================================================================================\n// This draws the text on the segments using the specified text options.\n// ====================================================================================================================\nWinwheel.prototype.drawSegmentText = function () {\n  // Again only draw the text if have a canvas context.\n  if (this.ctx && window.innerWidth > 425) {\n    // Declare variables to hold the values. These are populated either with the value for the specific segment,\n    // or if not specified then the global default value.\n    var fontFamily;\n    var fontSize;\n    var fontWeight;\n    var orientation;\n    var alignment;\n    var direction;\n    var margin;\n    var fillStyle;\n    var strokeStyle;\n    var lineWidth;\n    var fontSetting;\n\n    // Get the centerX and centerY scaled with the scale factor, also the same for outer and inner radius.\n    var centerX = this.centerX * this.scaleFactor;\n    var centerY = this.centerY * this.scaleFactor;\n    var outerRadius = this.outerRadius * this.scaleFactor;\n    var innerRadius = this.innerRadius * this.scaleFactor;\n\n    // Loop though all the segments.\n    for (var x = 1; x <= this.numSegments; x++) {\n      // Save the context so it is certain that each segment text option will not affect the other.\n      this.ctx.save();\n\n      // Get the segment object as we need it to read options from.\n      var seg = this.segments[x];\n\n      // Check is text as no point trying to draw if there is no text to render.\n      if (seg.text) {\n        // Set values to those for the specific segment or use global default if null.\n        if (seg.textFontFamily !== null) fontFamily = seg.textFontFamily;else fontFamily = this.textFontFamily;\n        if (seg.textFontSize !== null) fontSize = seg.textFontSize;else fontSize = this.textFontSize;\n        if (seg.textFontWeight !== null) fontWeight = seg.textFontWeight;else fontWeight = this.textFontWeight;\n        if (seg.textOrientation !== null) orientation = seg.textOrientation;else orientation = this.textOrientation;\n        if (seg.textAlignment !== null) alignment = seg.textAlignment;else alignment = this.textAlignment;\n        if (seg.textDirection !== null) direction = seg.textDirection;else direction = this.textDirection;\n        if (seg.textMargin !== null) margin = seg.textMargin;else margin = this.textMargin;\n        if (seg.textFillStyle !== null) fillStyle = seg.textFillStyle;else fillStyle = this.textFillStyle;\n        if (seg.textStrokeStyle !== null) strokeStyle = seg.textStrokeStyle;else strokeStyle = this.textStrokeStyle;\n        if (seg.textLineWidth !== null) lineWidth = seg.textLineWidth;else lineWidth = this.textLineWidth;\n\n        // Scale the font size and the margin by the scale factor so the text can be responsive.\n        fontSize = fontSize * this.scaleFactor;\n        margin = margin * this.scaleFactor;\n\n        // ------------------------------\n        // We need to put the font bits together in to one string.\n        var _fontSetting = \"\";\n        if (fontWeight != null) {\n          _fontSetting += fontWeight + \" \";\n        }\n        if (fontSize != null) {\n          _fontSetting += fontSize + \"px \"; // Fonts on canvas are always a px value.\n        }\n        if (fontFamily != null) {\n          _fontSetting += fontFamily;\n        }\n\n        // Now set the canvas context to the decided values.\n        this.ctx.font = _fontSetting;\n        this.ctx.fillStyle = fillStyle;\n        this.ctx.strokeStyle = strokeStyle;\n        this.ctx.lineWidth = lineWidth;\n\n        // Split the text in to multiple lines on the \\n character.\n        var lines = seg.text.split(\"\\n\");\n\n        // Figure out the starting offset for the lines as when there are multiple lines need to center the text\n        // vertically in the segment (when thinking of normal horozontal text).\n        var lineOffset = 0 - fontSize * (lines.length / 2) + fontSize / 2;\n\n        // The offset works great for horozontal and vertial text, also centered curved. But when the text is curved\n        // and the alignment is outer then the multiline text should not have some text outside the wheel. Same if inner curved.\n        if (orientation == \"curved\" && (alignment == \"inner\" || alignment == \"outer\")) {\n          lineOffset = 0;\n        }\n        for (var i = 0; i < lines.length; i++) {\n          // If direction is reversed then do things differently than if normal (which is the default - see further down)\n          if (direction == \"reversed\") {\n            // When drawing reversed or 'upside down' we need to do some trickery on our part.\n            // The canvas text rendering function still draws the text left to right and the correct way up,\n            // so we need to overcome this with rotating the opposite side of the wheel the correct way up then pulling the text\n            // through the center point to the correct segment it is supposed to be on.\n            if (orientation == \"horizontal\") {\n              if (alignment == \"inner\") {\n                this.ctx.textAlign = \"right\";\n              } else if (alignment == \"outer\") {\n                this.ctx.textAlign = \"left\";\n              } else {\n                this.ctx.textAlign = \"center\";\n              }\n              this.ctx.textBaseline = \"middle\";\n\n              // Work out the angle to rotate the wheel, this is in the center of the segment but on the opposite side of the wheel which is why do -180.\n              var textAngle = this.degToRad(seg.endAngle - (seg.endAngle - seg.startAngle) / 2 + this.rotationAngle - 90 - 180);\n              this.ctx.save();\n              this.ctx.translate(centerX, centerY);\n              this.ctx.rotate(textAngle);\n              this.ctx.translate(-centerX, -centerY);\n              if (alignment == \"inner\") {\n                // In reversed state the margin is subtracted from the innerX.\n                // When inner the inner radius also comes in to play.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX - innerRadius - margin, centerY + lineOffset);\n                }\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX - innerRadius - margin, centerY + lineOffset);\n                }\n              } else if (alignment == \"outer\") {\n                // In reversed state the position is the center minus the radius + the margin for outer aligned text.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX - outerRadius + margin, centerY + lineOffset);\n                }\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX - outerRadius + margin, centerY + lineOffset);\n                }\n              } else {\n                // In reversed state the everything in minused.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX - innerRadius - (outerRadius - innerRadius) / 2 - margin, centerY + lineOffset);\n                }\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX - innerRadius - (outerRadius - innerRadius) / 2 - margin, centerY + lineOffset);\n                }\n              }\n              this.ctx.restore();\n            } else if (orientation == \"vertical\") {\n              // See normal code further down for comments on how it works, this is similar by plus/minus is reversed.\n              this.ctx.textAlign = \"center\";\n\n              // In reversed mode this are reversed.\n              if (alignment == \"inner\") {\n                this.ctx.textBaseline = \"top\";\n              } else if (alignment == \"outer\") {\n                this.ctx.textBaseline = \"bottom\";\n              } else {\n                this.ctx.textBaseline = \"middle\";\n              }\n              var _textAngle = seg.endAngle - (seg.endAngle - seg.startAngle) / 2 - 180;\n              _textAngle += this.rotationAngle;\n              this.ctx.save();\n              this.ctx.translate(centerX, centerY);\n              this.ctx.rotate(this.degToRad(_textAngle));\n              this.ctx.translate(-centerX, -centerY);\n\n              //++ @TODO double-check the default of 0 is correct.\n              var yPos = 0;\n              if (alignment == \"outer\") {\n                yPos = centerY + outerRadius - margin;\n              } else if (alignment == \"inner\") {\n                yPos = centerY + innerRadius + margin;\n              }\n\n              // I have found that the text looks best when a fraction of the font size is shaved off.\n              var yInc = fontSize - fontSize / 9;\n\n              // Loop though and output the characters.\n              if (alignment == \"outer\") {\n                // In reversed mode outer means text in 6 o'clock segment sits at bottom of the wheel and we draw up.\n                for (var c = lines[i].length - 1; c >= 0; c--) {\n                  var character = lines[i].charAt(c);\n                  if (fillStyle) {\n                    this.ctx.fillText(character, centerX + lineOffset, yPos);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(character, centerX + lineOffset, yPos);\n                  }\n                  yPos -= yInc;\n                }\n              } else if (alignment == \"inner\") {\n                // In reversed mode inner text is drawn from top of segment at 6 o'clock position to bottom of the wheel.\n                for (var _c = 0; _c < lines[i].length; _c++) {\n                  var _character = lines[i].charAt(_c);\n                  if (fillStyle) {\n                    this.ctx.fillText(_character, centerX + lineOffset, yPos);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(_character, centerX + lineOffset, yPos);\n                  }\n                  yPos += yInc;\n                }\n              } else if (alignment == \"center\") {\n                // Again for reversed this is the opposite of before.\n                // If there is more than one character in the text then an adjustment to the position needs to be done.\n                // What we are aiming for is to position the center of the text at the center point between the inner and outer radius.\n                var centerAdjustment = 0;\n                if (lines[i].length > 1) {\n                  centerAdjustment = yInc * (lines[i].length - 1) / 2;\n                }\n                var _yPos = centerY + innerRadius + (outerRadius - innerRadius) / 2 + centerAdjustment + margin;\n                for (var _c2 = lines[i].length - 1; _c2 >= 0; _c2--) {\n                  var _character2 = lines[i].charAt(_c2);\n                  if (fillStyle) {\n                    this.ctx.fillText(_character2, centerX + lineOffset, _yPos);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(_character2, centerX + lineOffset, _yPos);\n                  }\n                  _yPos -= yInc;\n                }\n              }\n              this.ctx.restore();\n            } else if (orientation == \"curved\") {\n              // There is no built in canvas function to draw text around an arc,\n              // so we need to do this ourselves.\n              var radius = 0;\n\n              // Set the alignment of the text - inner, outer, or center by calculating\n              // how far out from the center point of the wheel the text is drawn.\n              if (alignment == \"inner\") {\n                // When alignment is inner the radius is the innerRadius plus any margin.\n                radius = innerRadius + margin;\n                this.ctx.textBaseline = \"top\";\n              } else if (alignment == \"outer\") {\n                // Outer it is the outerRadius minus any margin.\n                radius = outerRadius - margin;\n                this.ctx.textBaseline = \"bottom\";\n\n                // We need to adjust the radius in this case to take in to multiline text.\n                // In this case the radius needs to be further out, not at the inner radius.\n                radius -= fontSize * (lines.length - 1);\n              } else if (alignment == \"center\") {\n                // When center we want the text halfway between the inner and outer radius.\n                radius = innerRadius + margin + (outerRadius - innerRadius) / 2;\n                this.ctx.textBaseline = \"middle\";\n              }\n\n              // Set the angle to increment by when looping though and outputting the characters in the text\n              // as we do this by rotating the wheel small amounts adding each character.\n              var anglePerChar = 0;\n              var drawAngle = 0;\n\n              // If more than one character in the text then...\n              if (lines[i].length > 1) {\n                // Text is drawn from the left.\n                this.ctx.textAlign = \"left\";\n\n                // Work out how much angle the text rendering loop below needs to rotate by for each character to render them next to each other.\n                // I have discovered that 4 * the font size / 10 at 100px radius is the correct spacing for between the characters\n                // using a monospace font, non monospace may look a little odd as in there will appear to be extra spaces between chars.\n                anglePerChar = 4 * (fontSize / 10);\n\n                // Work out what percentage the radius the text will be drawn at is of 100px.\n                var radiusPercent = 100 / radius;\n\n                // Then use this to scale up or down the anglePerChar value.\n                // When the radius is less than 100px we need more angle between the letters, when radius is greater (so the text is further\n                // away from the center of the wheel) the angle needs to be less otherwise the characters will appear further apart.\n                anglePerChar = anglePerChar * radiusPercent;\n\n                // Next we want the text to be drawn in the middle of the segment, without this it would start at the beginning of the segment.\n                // To do this we need to work out how much arc the text will take up in total then subtract half of this from the center\n                // of the segment so that it sits centred.\n                var totalArc = anglePerChar * lines[i].length;\n\n                // Now set initial draw angle to half way between the start and end of the segment.\n                drawAngle = seg.startAngle + ((seg.endAngle - seg.startAngle) / 2 - totalArc / 2);\n              } else {\n                // The initial draw angle is the center of the segment when only one character.\n                drawAngle = seg.startAngle + (seg.endAngle - seg.startAngle) / 2;\n\n                // To ensure is dead-center the text alignment also needs to be centered.\n                this.ctx.textAlign = \"center\";\n              }\n\n              // ----------------------\n              // Adjust the initial draw angle as needed to take in to account the rotationAngle of the wheel.\n              drawAngle += this.rotationAngle;\n\n              // And as with other 'reverse' text direction functions we need to subtract 180 degrees from the angle\n              // because when it comes to draw the characters in the loop below we add the radius instead of subtract it.\n              drawAngle -= 180;\n\n              // ----------------------\n              // Now the drawing itself.\n              // In reversed direction mode we loop through the characters in the text backwards in order for them to appear on screen correctly\n              for (var _c3 = lines[i].length; _c3 >= 0; _c3--) {\n                this.ctx.save();\n                var _character3 = lines[i].charAt(_c3);\n\n                // Rotate the wheel to the draw angle as we need to add the character at this location.\n                this.ctx.translate(centerX, centerY);\n                this.ctx.rotate(this.degToRad(drawAngle));\n                this.ctx.translate(-centerX, -centerY);\n\n                // Now draw the character directly below the center point of the wheel at the appropriate radius.\n                // Note in the reversed mode we add the radius to the this.centerY instead of subtract.\n                if (strokeStyle) {\n                  this.ctx.strokeText(_character3, centerX, centerY + radius + lineOffset);\n                }\n                if (fillStyle) {\n                  this.ctx.fillText(_character3, centerX, centerY + radius + lineOffset);\n                }\n\n                // Increment the drawAngle by the angle per character so next loop we rotate\n                // to the next angle required to draw the character at.\n                drawAngle += anglePerChar;\n                this.ctx.restore();\n              }\n            }\n          } else {\n            // Normal direction so do things normally.\n            // Check text orientation, of horizontal then reasonably straight forward, if vertical then a bit more work to do.\n            if (orientation == \"horizontal\") {\n              // Based on the text alignment, set the correct value in the context.\n              if (alignment == \"inner\") {\n                this.ctx.textAlign = \"left\";\n              } else if (alignment == \"outer\") {\n                this.ctx.textAlign = \"right\";\n              } else {\n                this.ctx.textAlign = \"center\";\n              }\n\n              // Set this too.\n              this.ctx.textBaseline = \"middle\";\n\n              // Work out the angle around the wheel to draw the text at, which is simply in the middle of the segment the text is for.\n              // The rotation angle is added in to correct the annoyance with the canvas arc drawing functions which put the 0 degrees at the 3 oclock\n              var _textAngle2 = this.degToRad(seg.endAngle - (seg.endAngle - seg.startAngle) / 2 + this.rotationAngle - 90);\n\n              // We need to rotate in order to draw the text because it is output horizontally, so to\n              // place correctly around the wheel for all but a segment at 3 o'clock we need to rotate.\n              this.ctx.save();\n              this.ctx.translate(centerX, centerY);\n              this.ctx.rotate(_textAngle2);\n              this.ctx.translate(-centerX, -centerY);\n\n              // --------------------------\n              // Draw the text based on its alignment adding margin if inner or outer.\n              if (alignment == \"inner\") {\n                // Inner means that the text is aligned with the inner of the wheel. If looking at a segment in in the 3 o'clock position\n                // it would look like the text is left aligned within the segment.\n\n                // Because the segments are smaller towards the inner of the wheel, in order for the text to fit is is a good idea that\n                // a margin is added which pushes the text towards the outer a bit.\n\n                // The inner radius also needs to be taken in to account as when inner aligned.\n\n                // If fillstyle is set the draw the text filled in.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX + innerRadius + margin, centerY + lineOffset);\n                }\n\n                // If stroke style is set draw the text outline.\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX + innerRadius + margin, centerY + lineOffset);\n                }\n              } else if (alignment == \"outer\") {\n                // Outer means the text is aligned with the outside of the wheel, so if looking at a segment in the 3 o'clock position\n                // it would appear the text is right aligned. To position we add the radius of the wheel in to the equation\n                // and subtract the margin this time, rather than add it.\n\n                // I don't understand why, but in order of the text to render correctly with stroke and fill, the stroke needs to\n                // come first when drawing outer, rather than second when doing inner.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX + outerRadius - margin, centerY + lineOffset);\n                }\n\n                // If fillstyle the fill the text.\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX + outerRadius - margin, centerY + lineOffset);\n                }\n              } else {\n                // In this case the text is to drawn centred in the segment.\n                // Typically no margin is required, however even though centred the text can look closer to the inner of the wheel\n                // due to the way the segments narrow in (is optical effect), so if a margin is specified it is placed on the inner\n                // side so the text is pushed towards the outer.\n\n                // If stoke style the stroke the text.\n                if (fillStyle) {\n                  this.ctx.fillText(lines[i], centerX + innerRadius + (outerRadius - innerRadius) / 2 + margin, centerY + lineOffset);\n                }\n\n                // If fillstyle the fill the text.\n                if (strokeStyle) {\n                  this.ctx.strokeText(lines[i], centerX + innerRadius + (outerRadius - innerRadius) / 2 + margin, centerY + lineOffset);\n                }\n              }\n\n              // Restore the context so that wheel is returned to original position.\n              this.ctx.restore();\n            } else if (orientation == \"vertical\") {\n              // If vertical then we need to do this ourselves because as far as I am aware there is no option built in to html canvas\n              // which causes the text to draw downwards or upwards one character after another.\n\n              // In this case the textAlign is always center, but the baseline is either top or bottom\n              // depending on if inner or outer alignment has been specified.\n              this.ctx.textAlign = \"center\";\n              if (alignment == \"inner\") {\n                this.ctx.textBaseline = \"bottom\";\n              } else if (alignment == \"outer\") {\n                this.ctx.textBaseline = \"top\";\n              } else {\n                this.ctx.textBaseline = \"middle\";\n              }\n\n              // The angle to draw the text at is halfway between the end and the starting angle of the segment.\n              var _textAngle3 = seg.endAngle - (seg.endAngle - seg.startAngle) / 2;\n\n              // Ensure the rotation angle of the wheel is added in, otherwise the test placement won't match\n              // the segments they are supposed to be for.\n              _textAngle3 += this.rotationAngle;\n\n              // Rotate so can begin to place the text.\n              this.ctx.save();\n              this.ctx.translate(centerX, centerY);\n              this.ctx.rotate(this.degToRad(_textAngle3));\n              this.ctx.translate(-centerX, -centerY);\n\n              // Work out the position to start drawing in based on the alignment.\n              // If outer then when considering a segment at the 12 o'clock position want to start drawing down from the top of the wheel.\n              //++ TODO check this as yPos did not seem to have a defualt before.\n              var _yPos2 = 0;\n              if (alignment == \"outer\") {\n                _yPos2 = centerY - outerRadius + margin;\n              } else if (alignment == \"inner\") {\n                _yPos2 = centerY - innerRadius - margin;\n              }\n\n              // We need to know how much to move the y axis each time.\n              // This is not quite simply the font size as that puts a larger gap in between the letters\n              // than expected, especially with monospace fonts. I found that shaving a little off makes it look \"right\".\n              var _yInc = fontSize - fontSize / 9;\n\n              // Loop though and output the characters.\n              if (alignment == \"outer\") {\n                // For this alignment we draw down from the top of a segment at the 12 o'clock position to simply\n                // loop though the characters in order.\n                for (var _c4 = 0; _c4 < lines[i].length; _c4++) {\n                  var _character4 = lines[i].charAt(_c4);\n                  if (fillStyle) {\n                    this.ctx.fillText(_character4, centerX + lineOffset, _yPos2);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(_character4, centerX + lineOffset, _yPos2);\n                  }\n                  _yPos2 += _yInc;\n                }\n              } else if (alignment == \"inner\") {\n                // Here we draw from the inner of the wheel up, but in order for the letters in the text text to\n                // remain in the correct order when reading, we actually need to loop though the text characters backwards.\n                for (var _c5 = lines[i].length - 1; _c5 >= 0; _c5--) {\n                  var _character5 = lines[i].charAt(_c5);\n                  if (fillStyle) {\n                    this.ctx.fillText(_character5, centerX + lineOffset, _yPos2);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(_character5, centerX + lineOffset, _yPos2);\n                  }\n                  _yPos2 -= _yInc;\n                }\n              } else if (alignment == \"center\") {\n                // This is the most complex of the three as we need to draw the text top down centred between the inner and outer of the wheel.\n                // So logically we have to put the middle character of the text in the center then put the others each side of it.\n                // In reality that is a really bad way to do it, we can achieve the same if not better positioning using a\n                // variation on the method used for the rendering of outer aligned text once we have figured out the height of the text.\n\n                // If there is more than one character in the text then an adjustment to the position needs to be done.\n                // What we are aiming for is to position the center of the text at the center point between the inner and outer radius.\n                var _centerAdjustment = 0;\n                if (lines[i].length > 1) {\n                  _centerAdjustment = _yInc * (lines[i].length - 1) / 2;\n                }\n\n                // Now work out where to start rendering the string. This is half way between the inner and outer of the wheel, with the\n                // centerAdjustment included to correctly position texts with more than one character over the center.\n                // If there is a margin it is used to push the text away from the center of the wheel.\n                var _yPos3 = centerY - innerRadius - (outerRadius - innerRadius) / 2 - _centerAdjustment - margin;\n\n                // Now loop and draw just like outer text rendering.\n                for (var _c6 = 0; _c6 < lines[i].length; _c6++) {\n                  var _character6 = lines[i].charAt(_c6);\n                  if (fillStyle) {\n                    this.ctx.fillText(_character6, centerX + lineOffset, _yPos3);\n                  }\n                  if (strokeStyle) {\n                    this.ctx.strokeText(_character6, centerX + lineOffset, _yPos3);\n                  }\n                  _yPos3 += _yInc;\n                }\n              }\n              this.ctx.restore();\n            } else if (orientation == \"curved\") {\n              // There is no built in canvas function to draw text around an arc, so\n              // we need to do this ourselves.\n              var _radius = 0;\n\n              // Set the alignment of the text - inner, outer, or center by calculating\n              // how far out from the center point of the wheel the text is drawn.\n              if (alignment == \"inner\") {\n                // When alignment is inner the radius is the innerRadius plus any margin.\n                _radius = innerRadius + margin;\n                this.ctx.textBaseline = \"bottom\";\n\n                // We need to adjust the radius in this case to take in to multiline text.\n                // In this case the radius needs to be further out, not at the inner radius.\n                _radius += fontSize * (lines.length - 1);\n              } else if (alignment == \"outer\") {\n                // Outer it is the outerRadius minus any margin.\n                _radius = outerRadius - margin;\n                this.ctx.textBaseline = \"top\";\n              } else if (alignment == \"center\") {\n                // When center we want the text halfway between the inner and outer radius.\n                _radius = innerRadius + margin + (outerRadius - innerRadius) / 2;\n                this.ctx.textBaseline = \"middle\";\n              }\n\n              // Set the angle to increment by when looping though and outputting the characters in the text\n              // as we do this by rotating the wheel small amounts adding each character.\n              var _anglePerChar = 0;\n              var _drawAngle = 0;\n\n              // If more than one character in the text then...\n              if (lines[i].length > 1) {\n                // Text is drawn from the left.\n                this.ctx.textAlign = \"left\";\n\n                // Work out how much angle the text rendering loop below needs to rotate by for each character to render them next to each other.\n                // I have discovered that 4 * the font size / 10 at 100px radius is the correct spacing for between the characters\n                // using a monospace font, non monospace may look a little odd as in there will appear to be extra spaces between chars.\n                _anglePerChar = 4 * (fontSize / 10);\n\n                // Work out what percentage the radius the text will be drawn at is of 100px.\n                var _radiusPercent = 100 / _radius;\n\n                // Then use this to scale up or down the anglePerChar value.\n                // When the radius is less than 100px we need more angle between the letters, when radius is greater (so the text is further\n                // away from the center of the wheel) the angle needs to be less otherwise the characters will appear further apart.\n                _anglePerChar = _anglePerChar * _radiusPercent;\n\n                // Next we want the text to be drawn in the middle of the segment, without this it would start at the beginning of the segment.\n                // To do this we need to work out how much arc the text will take up in total then subtract half of this from the center\n                // of the segment so that it sits centred.\n                var _totalArc = _anglePerChar * lines[i].length;\n\n                // Now set initial draw angle to half way between the start and end of the segment.\n                _drawAngle = seg.startAngle + ((seg.endAngle - seg.startAngle) / 2 - _totalArc / 2);\n              } else {\n                // The initial draw angle is the center of the segment when only one character.\n                _drawAngle = seg.startAngle + (seg.endAngle - seg.startAngle) / 2;\n\n                // To ensure is dead-center the text alignment also needs to be centred.\n                this.ctx.textAlign = \"center\";\n              }\n\n              // ----------------------\n              // Adjust the initial draw angle as needed to take in to account the rotationAngle of the wheel.\n              _drawAngle += this.rotationAngle;\n\n              // ----------------------\n              // Now the drawing itself.\n              // Loop for each character in the text.\n              for (var _c7 = 0; _c7 < lines[i].length; _c7++) {\n                this.ctx.save();\n                var _character7 = lines[i].charAt(_c7);\n\n                // Rotate the wheel to the draw angle as we need to add the character at this location.\n                this.ctx.translate(centerX, centerY);\n                this.ctx.rotate(this.degToRad(_drawAngle));\n                this.ctx.translate(-centerX, -centerY);\n\n                // Now draw the character directly above the center point of the wheel at the appropriate radius.\n                if (strokeStyle) {\n                  this.ctx.strokeText(_character7, centerX, centerY - _radius + lineOffset);\n                }\n                if (fillStyle) {\n                  this.ctx.fillText(_character7, centerX, centerY - _radius + lineOffset);\n                }\n\n                // Increment the drawAngle by the angle per character so next loop we rotate\n                // to the next angle required to draw the character at.\n                _drawAngle += _anglePerChar;\n                this.ctx.restore();\n              }\n            }\n          }\n\n          // Increment this ready for the next time.\n          lineOffset += fontSize;\n        }\n      }\n\n      // Restore so all text options are reset ready for the next text.\n      this.ctx.restore();\n    }\n  }\n};\n\n// ====================================================================================================================\n// Converts degrees to radians which is what is used when specifying the angles on HTML5 canvas arcs.\n// ====================================================================================================================\nWinwheel.prototype.degToRad = function (d) {\n  return d * 0.0174532925199432957;\n};\n\n// ====================================================================================================================\n// This function sets the center location of the wheel, saves a function call to set x then y.\n// ====================================================================================================================\nWinwheel.prototype.setCenter = function (x, y) {\n  this.centerX = x;\n  this.centerY = y;\n};\n\n// ====================================================================================================================\n// This function allows a segment to be added to the wheel. The position of the segment is optional,\n// if not specified the new segment will be added to the end of the wheel.\n// ====================================================================================================================\nWinwheel.prototype.addSegment = function (options, position) {\n  // Create a new segment object passing the options in.\n  var newSegment = new Segment(options);\n\n  // Increment the numSegments property of the class since new segment being added.\n  this.numSegments++;\n  var segmentPos;\n\n  // Work out where to place the segment, the default is simply as a new segment at the end of the wheel.\n  if (typeof position !== \"undefined\") {\n    // Because we need to insert the segment at this position, not overwrite it, we need to move all segments after this\n    // location along one in the segments array, before finally adding this new segment at the specified location.\n    for (var x = this.numSegments; x > position; x--) {\n      this.segments[x] = this.segments[x - 1];\n    }\n    this.segments[position] = newSegment;\n    segmentPos = position;\n  } else {\n    this.segments[this.numSegments] = newSegment;\n    segmentPos = this.numSegments;\n  }\n\n  // Since a segment has been added the segment sizes need to be re-computed so call function to do this.\n  this.updateSegmentSizes();\n\n  // Return the segment object just created in the wheel (JavaScript will return it by reference), so that\n  // further things can be done with it by the calling code if desired.\n  return this.segments[segmentPos];\n};\n\n// ====================================================================================================================\n// This function must be used if the canvasId is changed as we also need to get the context of the new canvas.\n// ====================================================================================================================\nWinwheel.prototype.setCanvasId = function (canvasId) {\n  if (canvasId) {\n    this.canvasId = canvasId;\n    this.canvas = document.getElementById(this.canvasId);\n    if (this.canvas) {\n      this.ctx = this.canvas.getContext(\"2d\");\n    }\n  } else {\n    this.canvasId = null;\n    this.ctx = null;\n    this.canvas = null;\n  }\n};\n\n// ====================================================================================================================\n// This function deletes the specified segment from the wheel by removing it from the segments array.\n// It then sorts out the other bits such as update of the numSegments.\n// ====================================================================================================================\nWinwheel.prototype.deleteSegment = function (position) {\n  // There needs to be at least one segment in order for the wheel to draw, so only allow delete if there\n  // is more than one segment currently left in the wheel.\n\n  //++ check that specifying a position that does not exist - say 10 in a 6 segment wheel does not cause issues.\n  if (this.numSegments > 1) {\n    // If the position of the segment to remove has been specified.\n    if (typeof position !== \"undefined\") {\n      // The array is to be shortened so we need to move all segments after the one\n      // to be removed down one so there is no gap.\n      for (var x = position; x < this.numSegments; x++) {\n        this.segments[x] = this.segments[x + 1];\n      }\n    }\n\n    // Unset the last item in the segments array since there is now one less.\n    this.segments[this.numSegments] = undefined;\n\n    // Decrement the number of segments,\n    // then call function to update the segment sizes.\n    this.numSegments--;\n    this.updateSegmentSizes();\n  }\n};\n\n// ====================================================================================================================\n// This function takes the x an the y of a mouse event, such as click or move, and converts the x and the y in to\n// co-ordinates on the canvas as the raw values are the x and the y from the top and left of the user's browser.\n// ====================================================================================================================\nWinwheel.prototype.windowToCanvas = function (x, y) {\n  var bbox = this.canvas.getBoundingClientRect();\n  return {\n    x: Math.floor(x - bbox.left * (this.canvas.width / bbox.width)),\n    y: Math.floor(y - bbox.top * (this.canvas.height / bbox.height))\n  };\n};\n\n// ====================================================================================================================\n// This function returns the segment object located at the specified x and y coordinates on the canvas.\n// It is used to allow things to be done with a segment clicked by the user, such as highlight, display or change some values, etc.\n// ====================================================================================================================\nWinwheel.prototype.getSegmentAt = function (x, y) {\n  var foundSegment = null;\n\n  // Call function to return segment number.\n  var segmentNumber = this.getSegmentNumberAt(x, y);\n\n  // If found one then set found segment to pointer to the segment object.\n  if (segmentNumber !== null) {\n    foundSegment = this.segments[segmentNumber];\n  }\n  return foundSegment;\n};\n\n// ====================================================================================================================\n// Returns the number of the segment clicked instead of the segment object.\n// This does not work correctly if the canvas width or height is altered by CSS but does work correctly with the scale factor.\n// ====================================================================================================================\nWinwheel.prototype.getSegmentNumberAt = function (x, y) {\n  // Call function above to convert the raw x and y from the user's browser to canvas coordinates\n  // i.e. top and left is top and left of canvas, not top and left of the user's browser.\n  var loc = this.windowToCanvas(x, y);\n\n  // ------------------------------------------\n  // Now start the process of working out the segment clicked.\n  // First we need to figure out the angle of an imaginary line between the centerX and centerY of the wheel and\n  // the X and Y of the location (for example a mouse click).\n  var topBottom;\n  var leftRight;\n  var adjacentSideLength;\n  var oppositeSideLength;\n  var hypotenuseSideLength;\n\n  // Get the centerX and centerY scaled with the scale factor, also the same for outer and inner radius.\n  var centerX = this.centerX * this.scaleFactor;\n  var centerY = this.centerY * this.scaleFactor;\n  var outerRadius = this.outerRadius * this.scaleFactor;\n  var innerRadius = this.innerRadius * this.scaleFactor;\n\n  // We will use right triangle maths with the TAN function.\n  // The start of the triangle is the wheel center, the adjacent side is along the x axis, and the opposite side is along the y axis.\n\n  // We only ever use positive numbers to work out the triangle and the center of the wheel needs to be considered as 0 for the numbers\n  // in the maths which is why there is the subtractions below. We also remember what quadrant of the wheel the location is in as we\n  // need this information later to add 90, 180, 270 degrees to the angle worked out from the triangle to get the position around a 360 degree wheel.\n  if (loc.x > centerX) {\n    adjacentSideLength = loc.x - centerX;\n    leftRight = \"R\"; // Location is in the right half of the wheel.\n  } else {\n    adjacentSideLength = centerX - loc.x;\n    leftRight = \"L\"; // Location is in the left half of the wheel.\n  }\n  if (loc.y > centerY) {\n    oppositeSideLength = loc.y - centerY;\n    topBottom = \"B\"; // Bottom half of wheel.\n  } else {\n    oppositeSideLength = centerY - loc.y;\n    topBottom = \"T\"; // Top Half of wheel.\n  }\n\n  // Now divide opposite by adjacent to get tan value.\n  var tanVal = oppositeSideLength / adjacentSideLength;\n\n  // Use the tan function and convert results to degrees since that is what we work with.\n  var result = Math.atan(tanVal) * 180 / Math.PI;\n  var locationAngle = 0;\n\n  // We also need the length of the hypotenuse as later on we need to compare this to the outerRadius of the segment / circle.\n  hypotenuseSideLength = Math.sqrt(oppositeSideLength * oppositeSideLength + adjacentSideLength * adjacentSideLength);\n\n  // ------------------------------------------\n  // Now to make sense around the wheel we need to alter the values based on if the location was in top or bottom half\n  // and also right or left half of the wheel, by adding 90, 180, 270 etc. Also for some the initial locationAngle needs to be inverted.\n  if (topBottom == \"T\" && leftRight == \"R\") {\n    locationAngle = Math.round(90 - result);\n  } else if (topBottom == \"B\" && leftRight == \"R\") {\n    locationAngle = Math.round(result + 90);\n  } else if (topBottom == \"B\" && leftRight == \"L\") {\n    locationAngle = Math.round(90 - result + 180);\n  } else if (topBottom == \"T\" && leftRight == \"L\") {\n    locationAngle = Math.round(result + 270);\n  }\n\n  // ------------------------------------------\n  // And now we have to adjust to make sense when the wheel is rotated from the 0 degrees either\n  // positive or negative and it can be many times past 360 degrees.\n  if (this.rotationAngle != 0) {\n    var rotatedPosition = this.getRotationPosition();\n\n    // So we have this, now we need to alter the locationAngle as a result of this.\n    locationAngle = locationAngle - rotatedPosition;\n\n    // If negative then take the location away from 360.\n    if (locationAngle < 0) {\n      locationAngle = 360 - Math.abs(locationAngle);\n    }\n  }\n\n  // ------------------------------------------\n  // OK, so after all of that we have the angle of a line between the centerX and centerY of the wheel and\n  // the X and Y of the location on the canvas where the mouse was clicked. Now time to work out the segment\n  // this corresponds to. We can use the segment start and end angles for this.\n  var foundSegmentNumber = null;\n  for (var _x2 = 1; _x2 <= this.numSegments; _x2++) {\n    // Due to segments sharing start and end angles, if line is clicked will pick earlier segment.\n    if (locationAngle >= this.segments[_x2].startAngle && locationAngle <= this.segments[_x2].endAngle) {\n      // To ensure that a click anywhere on the canvas in the segment direction will not cause a\n      // segment to be matched, as well as the angles, we need to ensure the click was within the radius\n      // of the segment (or circle if no segment radius).\n\n      // If the hypotenuseSideLength (length of location from the center of the wheel) is with the radius\n      // then we can assign the segment to the found segment and break out the loop.\n\n      // Have to take in to account hollow wheels (doughnuts) so check is greater than innerRadius as\n      // well as less than or equal to the outerRadius of the wheel.\n      if (hypotenuseSideLength >= innerRadius && hypotenuseSideLength <= outerRadius) {\n        foundSegmentNumber = _x2;\n        break;\n      }\n    }\n  }\n\n  // Finally return the number.\n  return foundSegmentNumber;\n};\n\n// ====================================================================================================================\n// Returns a reference to the segment that is at the location of the pointer on the wheel.\n// ====================================================================================================================\nWinwheel.prototype.getIndicatedSegment = function () {\n  // Call function below to work this out and return the prizeNumber.\n  var prizeNumber = this.getIndicatedSegmentNumber();\n\n  // Then simply return the segment in the segments array at that position.\n  return this.segments[prizeNumber];\n};\n\n// ====================================================================================================================\n// Works out the segment currently pointed to by the pointer of the wheel. Normally called when the spinning has stopped\n// to work out the prize the user has won. Returns the number of the segment in the segments array.\n// ====================================================================================================================\nWinwheel.prototype.getIndicatedSegmentNumber = function () {\n  var indicatedPrize = 0;\n  var rawAngle = this.getRotationPosition();\n\n  // Now we have the angle of the wheel, but we need to take in to account where the pointer is because\n  // will not always be at the 12 o'clock 0 degrees location.\n  var relativeAngle = Math.floor(this.pointerAngle - rawAngle);\n  if (relativeAngle < 0) {\n    relativeAngle = 360 - Math.abs(relativeAngle);\n  }\n\n  // Now we can work out the prize won by seeing what prize segment startAngle and endAngle the relativeAngle is between.\n  for (var x = 1; x < this.segments.length; x++) {\n    if (relativeAngle >= this.segments[x][\"startAngle\"] && relativeAngle <= this.segments[x][\"endAngle\"]) {\n      indicatedPrize = x;\n      break;\n    }\n  }\n  return indicatedPrize;\n};\n\n// ====================================================================================================================\n// Works out what Pin around the wheel is considered the current one which is the one which just passed the pointer.\n// Used to work out if the pin has changed during the animation to tigger a sound.\n// ====================================================================================================================\nWinwheel.prototype.getCurrentPinNumber = function () {\n  var currentPin = 0;\n  if (this.pins) {\n    var rawAngle = this.getRotationPosition();\n\n    // Now we have the angle of the wheel, but we need to take in to account where the pointer is because\n    // will not always be at the 12 o'clock 0 degrees location.\n    var relativeAngle = Math.floor(this.pointerAngle - rawAngle);\n    if (relativeAngle < 0) {\n      relativeAngle = 360 - Math.abs(relativeAngle);\n    }\n\n    // Work out the angle of the pins as this is simply 360 / the number of pins as they space evenly around.\n    var pinSpacing = 360 / this.pins.number;\n    var totalPinAngle = 0;\n\n    // Now we can work out the pin by seeing what pins relativeAngle is between.\n    for (var x = 0; x < this.pins.number; x++) {\n      if (relativeAngle >= totalPinAngle && relativeAngle <= totalPinAngle + pinSpacing) {\n        currentPin = x;\n        break;\n      }\n      totalPinAngle += pinSpacing;\n    }\n\n    // Now if rotating clockwise we must add 1 to the current pin as we want the pin which has just passed\n    // the pointer to be returned as the current pin, not the start of the one we are between.\n    if (this.animation.direction == \"clockwise\") {\n      currentPin++;\n      if (currentPin > this.pins.number) {\n        currentPin = 0;\n      }\n    }\n  }\n  return currentPin;\n};\n\n// ==================================================================================================================================================\n// Returns the rotation angle of the wheel corrected to 0-360 (i.e. removes all the multiples of 360).\n// ==================================================================================================================================================\nWinwheel.prototype.getRotationPosition = function () {\n  var rawAngle = this.rotationAngle; // Get current rotation angle of wheel.\n\n  // If positive work out how many times past 360 this is and then take the floor of this off the rawAngle.\n  if (rawAngle >= 0) {\n    if (rawAngle > 360) {\n      // Get floor of the number of times past 360 degrees.\n      var timesPast360 = Math.floor(rawAngle / 360);\n\n      // Take all this extra off to get just the angle 0-360 degrees.\n      rawAngle = rawAngle - 360 * timesPast360;\n    }\n  } else {\n    // Is negative, need to take off the extra then convert in to 0-360 degree value\n    // so if, for example, was -90 then final value will be (360 - 90) = 270 degrees.\n    if (rawAngle < -360) {\n      var _timesPast = Math.ceil(rawAngle / 360); // Ceil when negative.\n\n      rawAngle = rawAngle - 360 * _timesPast; // Is minus because dealing with negative.\n    }\n    rawAngle = 360 + rawAngle; // Make in the range 0-360. Is plus because raw is still negative.\n  }\n  return rawAngle;\n};\n\n// ==================================================================================================================================================\n// This function starts the wheel's animation by using the properties of the animation object of of the wheel to begin the a greensock tween.\n// ==================================================================================================================================================\nWinwheel.prototype.startAnimation = function () {\n  if (this.animation) {\n    // Call function to compute the animation properties.\n    this.computeAnimation();\n\n    // Set this global variable to this object as an external function is required to call the draw() function on the wheel\n    // each loop of the animation as Greensock cannot call the draw function directly on this class.\n    winwheelToDrawDuringAnimation = this;\n\n    // Put together the properties of the greesock animation.\n    var properties = new Array(null);\n    properties[this.animation.propertyName] = this.animation.propertyValue; // Here we set the property to be animated and its value.\n    properties[\"yoyo\"] = this.animation.yoyo; // Set others.\n    properties[\"repeat\"] = this.animation.repeat;\n    properties[\"ease\"] = this.animation.easing;\n    properties[\"onUpdate\"] = winwheelAnimationLoop; // Call function to re-draw the canvas.\n    properties[\"onComplete\"] = winwheelStopAnimation; // Call function to perform actions when animation has finished.\n\n    // Do the tween animation passing the properties from the animation object as an array of key => value pairs.\n    // Keep reference to the tween object in the wheel as that allows pausing, resuming, and stopping while the animation is still running.\n    this.tween = TweenMax.to(this, this.animation.duration, properties);\n  }\n};\n\n// ==================================================================================================================================================\n// Use same function which needs to be outside the class for the callback when it stops because is finished.\n// ==================================================================================================================================================\nWinwheel.prototype.stopAnimation = function (canCallback) {\n  // @TODO as part of multiwheel, need to work out how to stop the tween for a single wheel but allow others to continue.\n\n  // We can kill the animation using our tween object.\n  if (winwheelToDrawDuringAnimation) {\n    // If the wheel has a tween animation then kill it.\n    if (winwheelToDrawDuringAnimation.tween) {\n      winwheelToDrawDuringAnimation.tween.kill();\n    }\n\n    // Call the callback function.\n    winwheelStopAnimation(canCallback);\n  }\n\n  // Ensure the winwheelToDrawDuringAnimation is set to this class.\n  winwheelToDrawDuringAnimation = this;\n};\n\n// ==================================================================================================================================================\n// Pause animation by telling tween to pause.\n// ==================================================================================================================================================\nWinwheel.prototype.pauseAnimation = function () {\n  if (this.tween) {\n    this.tween.pause();\n  }\n};\n\n// ==================================================================================================================================================\n// Resume the animation by telling tween to continue playing it.\n// ==================================================================================================================================================\nWinwheel.prototype.resumeAnimation = function () {\n  if (this.tween) {\n    this.tween.play();\n  }\n};\n\n// ====================================================================================================================\n// Called at the beginning of the startAnimation function and computes the values needed to do the animation\n// before it starts. This allows the developer to change the animation properties after the wheel has been created\n// and have the animation use the new values of the animation properties.\n// ====================================================================================================================\nWinwheel.prototype.computeAnimation = function () {\n  if (this.animation) {\n    // Set the animation parameters for the specified animation type including some sensible defaults if values have not been specified.\n    if (this.animation.type == \"spinOngoing\") {\n      // When spinning the rotationAngle is the wheel property which is animated.\n      this.animation.propertyName = \"rotationAngle\";\n      if (this.animation.spins == null) {\n        this.animation.spins = 5;\n      }\n      if (this.animation.repeat == null) {\n        this.animation.repeat = -1; // -1 means it will repeat forever.\n      }\n      if (this.animation.easing == null) {\n        this.animation.easing = \"Linear.easeNone\";\n      }\n      if (this.animation.yoyo == null) {\n        this.animation.yoyo = false;\n      }\n\n      // We need to calculate the propertyValue and this is the spins * 360 degrees.\n      this.animation.propertyValue = this.animation.spins * 360;\n\n      // If the direction is anti-clockwise then make the property value negative.\n      if (this.animation.direction == \"anti-clockwise\") {\n        this.animation.propertyValue = 0 - this.animation.propertyValue;\n      }\n    } else if (this.animation.type == \"spinToStop\") {\n      // Spin to stop the rotation angle is affected.\n      this.animation.propertyName = \"rotationAngle\";\n      if (this.animation.spins == null) {\n        this.animation.spins = 5;\n      }\n      if (this.animation.repeat == null) {\n        this.animation.repeat = 0; // As this is spin to stop we don't normally want it repeated.\n      }\n      if (this.animation.easing == null) {\n        this.animation.easing = \"Power3.easeOut\"; // This easing is fast start and slows over time.\n      }\n      if (this.animation.stopAngle == null) {\n        // If the stop angle has not been specified then pick random between 0 and 359.\n        this.animation._stopAngle = Math.floor(Math.random() * 359);\n      } else {\n        // We need to set the internal to 360 minus what the user entered because the wheel spins past 0 without\n        // this it would indicate the prize on the opposite side of the wheel. We aslo need to take in to account\n        // the pointerAngle as the stop angle needs to be relative to that.\n        this.animation._stopAngle = 360 - this.animation.stopAngle + this.pointerAngle;\n      }\n      if (this.animation.yoyo == null) {\n        this.animation.yoyo = false;\n      }\n\n      // The property value is the spins * 360 then plus or minus the stopAngle depending on if the rotation is clockwise or anti-clockwise.\n      this.animation.propertyValue = this.animation.spins * 360;\n      if (this.animation.direction == \"anti-clockwise\") {\n        this.animation.propertyValue = 0 - this.animation.propertyValue;\n\n        // Also if the value is anti-clockwise we need subtract the stopAngle (but to get the wheel to stop in the correct\n        // place this is 360 minus the stop angle as the wheel is rotating backwards).\n        this.animation.propertyValue -= 360 - this.animation._stopAngle;\n      } else {\n        // Add the stopAngle to the propertyValue as the wheel must rotate around to this place and stop there.\n        this.animation.propertyValue += this.animation._stopAngle;\n      }\n    } else if (this.animation.type == \"spinAndBack\") {\n      // This is basically is a spin for a number of times then the animation reverses and goes back to start.\n      // If a repeat is specified then this can be used to make the wheel \"rock\" left and right.\n\n      // Again this is a spin so the rotationAngle the property which is animated.\n      this.animation.propertyName = \"rotationAngle\";\n      if (this.animation.spins == null) {\n        this.animation.spins = 5;\n      }\n      if (this.animation.repeat == null) {\n        this.animation.repeat = 1; // This needs to be set to at least 1 in order for the animation to reverse.\n      }\n      if (this.animation.easing == null) {\n        this.animation.easing = \"Power2.easeInOut\"; // This is slow at the start and end and fast in the middle.\n      }\n      if (this.animation.yoyo == null) {\n        this.animation.yoyo = true; // This needs to be set to true to have the animation reverse back like a yo-yo.\n      }\n      if (this.animation.stopAngle == null) {\n        this.animation._stopAngle = 0;\n      } else {\n        // We need to set the internal to 360 minus what the user entered\n        // because the wheel spins past 0 without this it would indicate the\n        // prize on the opposite side of the wheel.\n        this.animation._stopAngle = 360 - this.animation.stopAngle;\n      }\n\n      // The property value is the spins * 360 then plus or minus the stopAngle depending on if the rotation is clockwise or anti-clockwise.\n      this.animation.propertyValue = this.animation.spins * 360;\n      if (this.animation.direction == \"anti-clockwise\") {\n        this.animation.propertyValue = 0 - this.animation.propertyValue;\n\n        // Also if the value is anti-clockwise we need subtract the stopAngle (but to get the wheel to stop in the correct\n        // place this is 360 minus the stop angle as the wheel is rotating backwards).\n        this.animation.propertyValue -= 360 - this.animation._stopAngle;\n      } else {\n        // Add the stopAngle to the propertyValue as the wheel must rotate around to this place and stop there.\n        this.animation.propertyValue += this.animation._stopAngle;\n      }\n    } else if (this.animation.type == \"custom\") {\n      // Do nothing as all values must be set by the developer in the parameters\n      // especially the propertyName and propertyValue.\n    }\n  }\n};\n\n// ====================================================================================================================\n// Calculates and returns a random stop angle inside the specified segment number. Value will always be 1 degree inside\n// the start and end of the segment to avoid issue with the segment overlap.\n// ====================================================================================================================\nWinwheel.prototype.getRandomForSegment = function (segmentNumber) {\n  var stopAngle = 0;\n  if (segmentNumber) {\n    if (typeof this.segments[segmentNumber] !== \"undefined\") {\n      var startAngle = this.segments[segmentNumber].startAngle;\n      var endAngle = this.segments[segmentNumber].endAngle;\n      var range = endAngle - startAngle - 2;\n      if (range > 0) {\n        stopAngle = startAngle + 1 + Math.floor(Math.random() * range);\n      } else {\n        //console.log(\"Segment size is too small to safely get random angle inside it\");\n      }\n    } else {\n      //console.log(\"Segment \" + segmentNumber + \" undefined\");\n    }\n  } else {\n    //console.log(\"Segment number not specified\");\n  }\n  return stopAngle;\n};\n\n// ====================================================================================================================\n// Class for the wheel pins.\n// ====================================================================================================================\nfunction Pin(options) {\n  var defaultOptions = {\n    visible: true,\n    // In future there might be some functionality related to the pins even if they are not displayed.\n    number: 36,\n    // The number of pins. These are evenly distributed around the wheel.\n    outerRadius: 3,\n    // Radius of the pins which determines their size.\n    fillStyle: \"grey\",\n    // Fill colour of the pins.\n    strokeStyle: \"black\",\n    // Line colour of the pins.\n    lineWidth: 1,\n    // Line width of the pins.\n    margin: 3,\n    // The space between outside edge of the wheel and the pins.\n    responsive: false // If set to true the diameter of the pin will resize when the wheel is responsive.\n  };\n\n  // Now loop through the default options and create properties of this class set to the value for\n  // the option passed in if a value was, or if not then set the value of the default.\n  for (var key in defaultOptions) {\n    if (options != null && typeof options[key] !== \"undefined\") {\n      this[key] = options[key];\n    } else {\n      this[key] = defaultOptions[key];\n    }\n  }\n\n  // Also loop though the passed in options and add anything specified not part of the class in to it as a property.\n  if (options != null) {\n    for (var _key2 in options) {\n      if (typeof this[_key2] === \"undefined\") {\n        this[_key2] = options[_key2];\n      }\n    }\n  }\n}\n\n// ====================================================================================================================\n// Class for the wheel spinning animation which like a segment becomes a property of the wheel.\n// ====================================================================================================================\nfunction Animation(options) {\n  // Most of these options are null because the defaults are different depending on the type of animation.\n  var defaultOptions = {\n    type: \"spinOngoing\",\n    // For now there are only supported types are spinOngoing (continuous), spinToStop, spinAndBack, custom.\n    direction: \"clockwise\",\n    // clockwise or anti-clockwise.\n    propertyName: null,\n    // The name of the winning wheel property to be affected by the animation.\n    propertyValue: null,\n    // The value the property is to be set to at the end of the animation.\n    duration: 10,\n    // Duration of the animation.\n    yoyo: false,\n    // If the animation is to reverse back again i.e. yo-yo.\n    repeat: null,\n    // The number of times the animation is to repeat, -1 will cause it to repeat forever.\n    easing: null,\n    // The easing to use for the animation, default is the best for spin to stop. Use Linear.easeNone for no easing.\n    stopAngle: null,\n    // Used for spinning, the angle at which the wheel is to stop.\n    spins: null,\n    // Used for spinning, the number of complete 360 degree rotations the wheel is to do.\n    clearTheCanvas: null,\n    // If set to true the canvas will be cleared before the wheel is re-drawn, false it will not, null the animation will abide by the value of this property for the parent wheel object.\n    callbackFinished: null,\n    // Function to callback when the animation has finished.\n    callbackBefore: null,\n    // Function to callback before the wheel is drawn each animation loop.\n    callbackAfter: null,\n    // Function to callback after the wheel is drawn each animation loop.\n    callbackSound: null,\n    // Function to callback if a sound should be triggered on change of segment or pin.\n    soundTrigger: \"segment\" // Sound trigger type. Default is segment which triggers when segment changes, can be pin if to trigger when pin passes the pointer.\n  };\n\n  // Now loop through the default options and create properties of this class set to the value for\n  // the option passed in if a value was, or if not then set the value of the default.\n  for (var key in defaultOptions) {\n    if (options != null && typeof options[key] !== \"undefined\") {\n      this[key] = options[key];\n    } else {\n      this[key] = defaultOptions[key];\n    }\n  }\n\n  // Also loop though the passed in options and add anything specified not part of the class in to it as a property.\n  if (options != null) {\n    for (var _key3 in options) {\n      if (typeof this[_key3] === \"undefined\") {\n        this[_key3] = options[_key3];\n      }\n    }\n  }\n}\n\n// ====================================================================================================================\n// Class for segments. When creating a json of options can be passed in.\n// ====================================================================================================================\nfunction Segment(options) {\n  // Define default options for segments, most are null so that the global defaults for the wheel\n  // are used if the values for a particular segment are not specifically set.\n  var defaultOptions = {\n    size: null,\n    // Leave null for automatic. Valid values are degrees 0-360. Use percentToDegrees function if needed to convert.\n    text: \"\",\n    // Default is blank.\n    fillStyle: null,\n    // If null for the rest the global default will be used.\n    strokeStyle: null,\n    lineWidth: null,\n    textFontFamily: null,\n    textFontSize: null,\n    textFontWeight: null,\n    textOrientation: null,\n    textAlignment: null,\n    textDirection: null,\n    textMargin: null,\n    textFillStyle: null,\n    textStrokeStyle: null,\n    textLineWidth: null,\n    image: null,\n    // Name/path to the image\n    imageDirection: null,\n    // Direction of the image, can be set globally for the whole wheel.\n    imgData: null // Image object created here and loaded with image data.\n  };\n\n  // Now loop through the default options and create properties of this class set to the value for\n  // the option passed in if a value was, or if not then set the value of the default.\n  for (var key in defaultOptions) {\n    if (options != null && typeof options[key] !== \"undefined\") {\n      this[key] = options[key];\n    } else {\n      this[key] = defaultOptions[key];\n    }\n  }\n\n  // Also loop though the passed in options and add anything specified not part of the class in to it as a property.\n  // This allows the developer to easily add properties to segments at construction time.\n  if (options != null) {\n    for (var _key4 in options) {\n      if (typeof this[_key4] === \"undefined\") {\n        this[_key4] = options[_key4];\n      }\n    }\n  }\n\n  // There are 2 additional properties which are set by the code, so need to define them here.\n  // They are not in the default options because they are not something that should be set by the user,\n  // the values are updated every time the updateSegmentSizes() function is called.\n  this.startAngle = 0;\n  this.endAngle = 0;\n}\n\n// ====================================================================================================================\n// Changes an image for a segment by setting a callback to render the wheel once the image has loaded.\n// ====================================================================================================================\nSegment.prototype.changeImage = function (image, imageDirection) {\n  // Change image name, blank image data.\n  this.image = image;\n  this.imgData = null;\n\n  // Set direction.\n  if (imageDirection) {\n    this.imageDirection = imageDirection;\n  }\n\n  // Set imgData to a new image object, change set callback and change src (just like in wheel constructor).\n  winhweelAlreadyDrawn = false;\n  this.imgData = new Image();\n  this.imgData.onload = winwheelLoadedImage;\n  this.imgData.src = this.image;\n};\n\n// ====================================================================================================================\n// Class that is created as property of the wheel. Draws line from center of the wheel out to edge of canvas to\n// indicate where the code thinks the pointer location is. Helpful to get alignment correct esp when using images.\n// ====================================================================================================================\nfunction PointerGuide(options) {\n  var defaultOptions = {\n    display: false,\n    strokeStyle: \"red\",\n    lineWidth: 3\n  };\n\n  // Now loop through the default options and create properties of this class set to the value for\n  // the option passed in if a value was, or if not then set the value of the default.\n  for (var key in defaultOptions) {\n    if (options != null && typeof options[key] !== \"undefined\") {\n      this[key] = options[key];\n    } else {\n      this[key] = defaultOptions[key];\n    }\n  }\n}\n\n// ====================================================================================================================\n// This function takes the percent 0-100 and returns the number of degrees 0-360 this equates to.\n// ====================================================================================================================\nfunction winwheelPercentToDegrees(percentValue) {\n  var degrees = 0;\n  if (percentValue > 0 && percentValue <= 100) {\n    var divider = percentValue / 100;\n    degrees = 360 * divider;\n  }\n  return degrees;\n}\n\n// ====================================================================================================================\n// In order for the wheel to be re-drawn during the spin animation the function greesock calls needs to be outside\n// of the class as for some reason it errors if try to call winwheel.draw() directly.\n// ====================================================================================================================\nfunction winwheelAnimationLoop() {\n  if (winwheelToDrawDuringAnimation) {\n    // Check if the clearTheCanvas is specified for this animation, if not or it is not false then clear the canvas.\n    if (winwheelToDrawDuringAnimation.animation.clearTheCanvas != false) {\n      winwheelToDrawDuringAnimation.ctx.clearRect(0, 0, winwheelToDrawDuringAnimation.canvas.width, winwheelToDrawDuringAnimation.canvas.height);\n    }\n    var callbackBefore = winwheelToDrawDuringAnimation.animation.callbackBefore;\n    var callbackAfter = winwheelToDrawDuringAnimation.animation.callbackAfter;\n\n    // If there is a callback function which is supposed to be called before the wheel is drawn then do that.\n    if (callbackBefore != null) {\n      // If the property is a function then call it, otherwise eval the proptery as javascript code.\n      if (typeof callbackBefore === \"function\") {\n        callbackBefore();\n      } else {\n        eval(callbackBefore);\n      }\n    }\n\n    // Call code to draw the wheel, pass in false as we never want it to clear the canvas as that would wipe anything drawn in the callbackBefore.\n    winwheelToDrawDuringAnimation.draw(false);\n\n    // If there is a callback function which is supposed to be called after the wheel has been drawn then do that.\n    if (callbackAfter != null) {\n      // If the property is a function then call it, otherwise eval the proptery as javascript code.\n      if (typeof callbackAfter === \"function\") {\n        callbackAfter();\n      } else {\n        eval(callbackAfter);\n      }\n    }\n\n    // If there is a sound callback then call a function which figures out if the sound should be triggered\n    // and if so then call the function specified by the developer.\n    if (winwheelToDrawDuringAnimation.animation.callbackSound) {\n      winwheelTriggerSound();\n    }\n  }\n}\n\n// ====================================================================================================================\n// This function figures out if the callbackSound function needs to be called by working out if the segment or pin\n// has changed since the last animation loop.\n// ====================================================================================================================\nfunction winwheelTriggerSound() {\n  // If this property does not exist then add it as a property of the winwheel.\n  if (winwheelToDrawDuringAnimation.hasOwnProperty(\"_lastSoundTriggerNumber\") == false) {\n    winwheelToDrawDuringAnimation._lastSoundTriggerNumber = 0;\n  }\n  var callbackSound = winwheelToDrawDuringAnimation.animation.callbackSound;\n  var currentTriggerNumber = 0;\n\n  // Now figure out if the sound callback should be called depending on the sound trigger type.\n  if (winwheelToDrawDuringAnimation.animation.soundTrigger == \"pin\") {\n    // So for the pin type we need to work out which pin we are between.\n    currentTriggerNumber = winwheelToDrawDuringAnimation.getCurrentPinNumber();\n  } else {\n    // Check on the change of segment by working out which segment we are in.\n    // We can utilise the existing getIndiatedSegmentNumber function.\n    currentTriggerNumber = winwheelToDrawDuringAnimation.getIndicatedSegmentNumber();\n  }\n\n  // If the current number is not the same as last time then call the sound callback.\n  if (currentTriggerNumber != winwheelToDrawDuringAnimation._lastSoundTriggerNumber) {\n    // If the property is a function then call it, otherwise eval the proptery as javascript code.\n    if (typeof callbackSound === \"function\") {\n      callbackSound();\n    } else {\n      eval(callbackSound);\n    }\n\n    // Also update the last sound trigger with the current number.\n    winwheelToDrawDuringAnimation._lastSoundTriggerNumber = currentTriggerNumber;\n  }\n}\n\n// ====================================================================================================================\n// This function is called-back when the greensock animation has finished.\n// ====================================================================================================================\nvar winwheelToDrawDuringAnimation = null; // This global is set by the winwheel class to the wheel object to be re-drawn.\n\nfunction winwheelStopAnimation(canCallback) {\n  // When the animation is stopped if canCallback is not false then try to call the callback.\n  // false can be passed in to stop the after happening if the animation has been stopped before it ended normally.\n  if (canCallback != false) {\n    var callback = winwheelToDrawDuringAnimation.animation.callbackFinished;\n    if (callback != null) {\n      // If the callback is a function then call it, otherwise evaluate the property as javascript code.\n      if (typeof callback === \"function\") {\n        // Pass back the indicated segment as 99% of the time you will want to know this to inform the user of their prize.\n        callback(winwheelToDrawDuringAnimation.getIndicatedSegment());\n      } else {\n        eval(callback);\n      }\n    }\n  }\n}\n\n// ====================================================================================================================\n// Called after the image has loaded for each segment. Once all the images are loaded it then calls the draw function\n// on the wheel to render it. Used in constructor and also when a segment image is changed.\n// ====================================================================================================================\nvar winhweelAlreadyDrawn = false;\nfunction winwheelLoadedImage() {\n  // Prevent multiple drawings of the wheel which ocurrs without this check due to timing of function calls.\n  if (winhweelAlreadyDrawn == false) {\n    // Set to 0.\n    var winwheelImageLoadCount = 0;\n\n    // Loop though all the segments of the wheel and check if image data loaded, if so increment counter.\n    for (var i = 1; i <= winwheelToDrawDuringAnimation.numSegments; i++) {\n      // Check the image data object is not null and also that the image has completed loading by checking\n      // that a property of it such as the height has some sort of true value.\n      if (winwheelToDrawDuringAnimation.segments[i].imgData != null && winwheelToDrawDuringAnimation.segments[i].imgData.height) {\n        winwheelImageLoadCount++;\n      }\n    }\n\n    // If number of images loaded matches the segments then all the images for the wheel are loaded.\n    if (winwheelImageLoadCount == winwheelToDrawDuringAnimation.numSegments) {\n      // Call draw function to render the wheel.\n      winhweelAlreadyDrawn = true;\n      winwheelToDrawDuringAnimation.draw();\n    }\n  }\n}\n\n// ====================================================================================================================\n// Called when the wheel is to resize. This is normally called from a onresize of the window, also called from onload\n// so the initial size is correct. Here we must re-size the canvas and work out the scaleFactor for the wheel.\n// ====================================================================================================================\nfunction winwheelResize() {\n  // By default set the margin to 40px, this can be overridden if needed.\n  // This is to stop the canvas going right to the right edge of the screen and being overlayed by a scrollbar though\n  // if the canvas is center aligned, half the magin will be applied to each side since the margin actually reduces the width of the canvas.\n  var margin = 40;\n\n  // If a value has been specified for this then update the margin to it.\n  if (typeof winwheelToDrawDuringAnimation._responsiveMargin !== \"undefined\") {\n    margin = winwheelToDrawDuringAnimation._responsiveMargin;\n  }\n\n  // Get the current width and also optional min and max width properties.\n  var width = window.innerWidth - margin;\n  var minWidth = winwheelToDrawDuringAnimation._responsiveMinWidth;\n  var minHeight = winwheelToDrawDuringAnimation._responsiveMinHeight;\n\n  // Adjust the width as it cannot be larger than the original size of the wheel and we don't want\n  // the canvas and wheel inside it to be too small so check the min width.\n  if (width < minWidth) {\n    width = minWidth;\n  } else if (width > winwheelToDrawDuringAnimation._originalCanvasWidth) {\n    width = winwheelToDrawDuringAnimation._originalCanvasWidth;\n  }\n\n  // Work out the percent the new width is smaller than the original width.\n  var percent = width / winwheelToDrawDuringAnimation._originalCanvasWidth;\n\n  // Set the canvas width to the width to a percentage of the original width.\n  winwheelToDrawDuringAnimation.canvas.width = winwheelToDrawDuringAnimation._originalCanvasWidth * percent;\n\n  // Scale the height if we are supposed to but ensure it does not go below the minHeight.\n  if (winwheelToDrawDuringAnimation._responsiveScaleHeight) {\n    var height = winwheelToDrawDuringAnimation._originalCanvasHeight * percent;\n    if (height < minHeight) {\n      height = minHeight;\n    } else if (height > winwheelToDrawDuringAnimation._originalCanvasHeight) {\n      height = winwheelToDrawDuringAnimation._originalCanvasHeight;\n    }\n    winwheelToDrawDuringAnimation.canvas.height = height;\n  }\n\n  // OK so now we have the percent, set the scaleFactor of the wheel to this.\n  winwheelToDrawDuringAnimation.scaleFactor = percent;\n\n  // Now re-draw the wheel to ensure the changes in size are rendered.\n  winwheelToDrawDuringAnimation.draw();\n}\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/libs/Winwheel.js?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.less":
/*!***************************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.less ***!
  \***************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/_en/wheel-of-fortune/wheel-01.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/components/builder-page_new.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/components/builder-page_new.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/components/builder-page_new.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/add-first-button.less":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/add-first-button.less ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/add-first-button.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/bounce.less":
/*!*********************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/bounce.less ***!
  \*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/bounce.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/builder-controls.less":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/builder-controls.less ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/builder-controls.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/builderMenu.less":
/*!**************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/builderMenu.less ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/builderMenu.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/edit-content.less":
/*!***************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/edit-content.less ***!
  \***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/edit-content.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/list-numbering.less":
/*!*****************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/list-numbering.less ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/list-numbering.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/navigationBottom.less":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/navigationBottom.less ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/navigationBottom.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/css/selectable.less":
/*!*************************************************************!*\
  !*** ./src/core/custom_plugins/builder/css/selectable.less ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/css/selectable.less?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/templates/builder_components.f7.html":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/templates/builder_components.f7.html ***!
  \******************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: async function () {\n    let app = this.$app;\n    let currentGroup;\n    if (!app.builder.currentGroup) {\n      currentGroup = 'basicGroup';\n    } else {\n      currentGroup = app.builder.currentGroup;\n    }\n    let inClipboard = await this.isClipBoard();\n    return {\n      categories: app.builder.categories[currentGroup].components,\n      copyToCb: app.builder.copyToCb,\n      clip: inClipboard\n    };\n  },\n  methods: {\n    close: function () {\n      let app = this.$app;\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.close();\n    },\n    addComponent: async function (categoryIndex, componentIndex) {\n      let app = this.$app;\n      let currentGroup;\n      if (!app.builder.currentGroup) {\n        currentGroup = 'basicGroup';\n      } else {\n        currentGroup = app.builder.currentGroup;\n      }\n      let catI = parseInt(categoryIndex);\n      let catC = parseInt(componentIndex);\n      let comp = await app.builder.categories[currentGroup].components[catI].components[catC];\n      app.builder.addComponent(comp, app.builder.componentsReference, null, app.builder.parentComponent, app.builder.subKey);\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.close();\n    },\n    addComponentByCopy: async function (flush) {\n      let app = this.$app;\n      let builder = app.builder;\n      let parentId = null;\n      if (app.builder.parentComponent) {\n        parentId = app.builder.parentComponent.params.id;\n      }\n      let subKey = null;\n      if (app.builder.subKey) {\n        subKey = app.builder.subKey;\n      }\n      app.builder.pasteComponent(app.builder.copyToCb, null, parentId, subKey);\n      if (flush) {\n        app.builder.copyToCb = null;\n        navigator.clipboard.writeText('');\n        this.flush();\n      }\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.close();\n    },\n    flush: async function () {\n      let app = this.$app;\n      let page = app.router.currentPageEl;\n      let checked = $$(page).find('.checked');\n      checked.forEach(element => {\n        $$(element).removeClass('checked');\n        let ico = $$(element).find('#bm-check-component');\n        ico.html('<i class=\"material-icons\">check_box_outline_blank</i>');\n      });\n      app.data.myEvents.emit('copyToCb:changed');\n    },\n    removeClipboard: async function (e) {\n      let app = this.$app;\n      let $button = $(e.target).closest('#copy-to-cb').remove();\n      navigator.clipboard.writeText('');\n      this.flush();\n    },\n    removeComponentByCopy: async function (e) {\n      let app = this.$app;\n      let $button = $(e.target).closest('#copy-to-cb').remove();\n      app.builder.copyToCb = null;\n      this.flush();\n    },\n    isClipBoard: async function () {\n      let flag = true;\n      try {\n        const text = await navigator.clipboard.readText();\n        try {\n          JSON.parse(text);\n        } catch (error) {\n          flag = false;\n        }\n        if (flag) {\n          return true;\n        } else {\n          return false;\n        }\n      } catch (err) {\n        return false;\n      }\n    },\n    addComponentFromClipboard: async function (flush) {\n      let app = this.$app;\n      const text = await navigator.clipboard.readText();\n      let paste = JSON.parse(text);\n      let parentId = null;\n      if (app.builder.parentComponent) {\n        parentId = app.builder.parentComponent.params.id;\n      }\n      let subKey = null;\n      if (app.builder.subKey) {\n        subKey = app.builder.subKey;\n      }\n      app.builder.pasteComponent(paste, null, parentId, subKey);\n      if (flush) {\n        app.builder.copyToCb = null;\n        this.flush();\n      }\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.close();\n    }\n  },\n  on: {\n    pageInit: function (i, page) {\n      let app = this.$app;\n      function resetSearch() {\n        let allCat = page.$el.find('.component-list').find('.accordion-item');\n        allCat.forEach(cat => {\n          let catEl = $$(cat);\n          let allComponents = catEl.find('.component-list-item');\n          catEl.removeClass('hide');\n          catEl.removeClass('accordion-item-opened');\n          allComponents.forEach(comp => {\n            let compEl = $$(comp);\n            compEl.removeClass('hide');\n          });\n        });\n      }\n      let searchBar = app.searchbar.create({\n        el: '#components .searchbar',\n        inputEl: '#components .searchbarx',\n        customSearch: true,\n        backdrop: false,\n        disableButton: false,\n        on: {\n          search: function (searchbar, q) {\n            let query = q;\n            query = $.trim(query).toLowerCase();\n            query = app.utils.removeDiacritics(query);\n            if (query.length > 0) {\n              let allCat = page.$el.find('.component-list').find('.accordion-item');\n              allCat.forEach(cat => {\n                let catEl = $$(cat);\n                let allComponents = catEl.find('.component-list-item');\n                let findFlag = false;\n                allComponents.forEach(comp => {\n                  let compEl = $$(comp);\n                  let name = compEl.data('name').toLowerCase();\n                  name = app.utils.removeDiacritics(name);\n                  let desc = compEl.data('description');\n                  if (desc) {\n                    desc.toLowerCase();\n                    desc = app.utils.removeDiacritics(desc);\n                  } else {\n                    desc = '';\n                  }\n                  let title = compEl.data('title').toLowerCase();\n                  title = app.utils.removeDiacritics(title);\n                  if (name.includes(query) || desc.includes(query) || title.includes(query)) {\n                    findFlag = true;\n                    compEl.removeClass('hide');\n                  } else {\n                    compEl.addClass('hide');\n                  }\n                  if (findFlag) {\n                    catEl.addClass('accordion-item-opened');\n                    catEl.removeClass('hide');\n                  } else {\n                    catEl.removeClass('accordion-item-opened');\n                    catEl.addClass('hide');\n                  }\n                });\n              });\n            } else {\n              resetSearch();\n            }\n          },\n          clear: function (searchbar, q) {\n            resetSearch();\n          },\n          disable: function (searchbar, q) {\n            resetSearch();\n          }\n        }\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '3873c8cc47',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\" id=\"components\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" @click=\"close\" class=\"link\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('builder:componentsMenu.components'), ctx_1);\n      r += '</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <div class=\"list search-list\">\\n        <ul>\\n          <li>\\n            <form class=\"searchbar\">\\n              <div class=\"searchbar-inner\">\\n                <div class=\"searchbar-input-wrap\">\\n                  <input type=\"search\" class=\"searchbarx\" placeholder=\"Search\">\\n                  <i class=\"searchbar-icon\"></i>\\n                  <span class=\"input-clear-button\"></span>\\n                </div>\\n                <span class=\"searchbar-disable-button if-not-aurora\">Cancel</span>\\n              </div>\\n            </form>\\n          </li>\\n        </ul>\\n      </div>\\n\\n      <!--<div class=\"block-title\">List View Accordion</div>-->\\n\\n      <!--<ul>-->\\n      <!--<li>-->\\n      <!--<a href=\"/builder-chapters/\">Tvorba kapitol</a>-->\\n      <!--</li>-->\\n      <!--</ul>-->\\n\\n      ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.copyToCb, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      ';\n          r += Template7Helpers.js_if.call(ctx_2, 'Array.isArray(this.$app.builder.copyToCb)', {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n      <div id=\"copy-to-cb\">\\n        <div class=\"block-title\">';\n              r += c(ctx_3.$app.translation.t('builder:componentsMenu.paste'), ctx_3);\n              r += '</div>\\n        <div class=\"list media-list\">\\n          <ul>\\n            <li>\\n              <div class=\"item-content\">\\n                <!-- <div class=\"item-media\"><img src=\"http://media.softresource.cz/public/su99k6lnmo63t5jlbndj67uc53si7v17zofw4azweh2g6f9xsopta92bawybvc56.png\" style=\"width: 150px\" /></div> -->\\n                <a href=\"#\" @click=\"addComponentByCopy(true)\" class=\"item-inner\">\\n                  <div class=\"item-title-row\">\\n                    <div class=\"item-title\">';\n              r += c(ctx_3.$app.translation.t('builder:componentsMenu.componentSelect'), ctx_3);\n              r += '\\n                      (';\n              r += Template7Helpers.js.call(ctx_3, 'this.$app.builder.copyToCb.length', {\n                hash: {},\n                data: data_3 || {},\n                fn: function empty() {\n                  return '';\n                },\n                inverse: function empty() {\n                  return '';\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += ')</div>\\n                  </div>\\n                </a>\\n                <a href=\"#\" @click=\"addComponentByCopy(false)\" class=\" item-after\"><i data-tooltip=\"';\n              r += c(ctx_3.$app.translation.t('builder:componentsMenu.pasteAndPersist'), ctx_3);\n              r += '\" class=\"tooltip-init material-icons\">content_copy</i></a>\\n                <a href=\"#\" @click=\"removeComponentByCopy\" class=\" item-after\"><i data-tooltip=\"';\n              r += c(ctx_3.$app.translation.t('delete'), ctx_3);\n              r += '\" class=\"tooltip-init material-icons\">delete</i></a>\\n              </div>\\n            </li>\\n\\n          </ul>\\n        </div>\\n      </div>\\n      ';\n              return r;\n            },\n            inverse: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n      <div id=\"copy-to-cb\">\\n        <div class=\"block-title\">';\n              r += c(ctx_3.$app.translation.t('builder:componentsMenu.paste'), ctx_3);\n              r += '</div>\\n        <div class=\"list media-list\">\\n          <ul>\\n            <li>\\n              <div class=\"item-content\">\\n                <!-- <div class=\"item-media\"><img src=\"http://media.softresource.cz/public/su99k6lnmo63t5jlbndj67uc53si7v17zofw4azweh2g6f9xsopta92bawybvc56.png\" style=\"width: 150px\" /></div> -->\\n                <a href=\"#\" @click=\"addComponentByCopy\" class=\"item-inner\">\\n                  <div class=\"item-title-row\">\\n                    <div class=\"item-title\">';\n              r += c(ctx_3.copyToCb.params.title, ctx_3);\n              r += '</div>\\n                  </div>\\n                  <div class=\"item-text\">';\n              r += c(ctx_3.copyToCb.params.subtitle, ctx_3);\n              r += '</div>\\n                </a>\\n                <a href=\"#\" @click=\"removeComponentByCopy\" class=\"item-after\"><i class=\"material-icons\">delete</i></a>\\n              </div>\\n            </li>\\n\\n          </ul>\\n        </div>\\n      </div>\\n      ';\n              return r;\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n\\n      ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.clip, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <div id=\"copy-to-cb\">\\n        <div class=\"block-title\">';\n          r += c(ctx_2.$app.translation.t('builder:componentsMenu.globalPaste'), ctx_2);\n          r += '</div>\\n        <div class=\"list media-list\">\\n          <ul>\\n            <li>\\n              <div class=\"item-content\">\\n                <!-- <div class=\"item-media\"><img src=\"http://media.softresource.cz/public/su99k6lnmo63t5jlbndj67uc53si7v17zofw4azweh2g6f9xsopta92bawybvc56.png\" style=\"width: 150px\" /></div> -->\\n                <a href=\"#\" @click=\"addComponentFromClipboard(true)\" class=\"item-inner\">\\n                  <div class=\"item-title-row\">\\n                    <div class=\"item-title\">';\n          r += c(ctx_2.$app.translation.t('builder:componentsMenu.globalPaste'), ctx_2);\n          r += '</div>\\n                  </div>\\n                </a>\\n                <a href=\"#\" @click=\"addComponentFromClipboard(false)\" class=\" item-after\"><i data-tooltip=\"';\n          r += c(ctx_2.$app.translation.t('builder:componentsMenu.pasteAndPersist'), ctx_2);\n          r += '\" class=\"tooltip-init material-icons\">content_copy</i></a>\\n                <a href=\"#\" @click=\"removeClipboard\" class=\"item-after\"><i class=\"material-icons\">delete</i></a>\\n              </div>\\n            </li>\\n\\n          </ul>\\n        </div>\\n      </div>\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n      <div class=\"list component-list\">\\n        <ul>\\n          ';\n      r += Template7Helpers.each.call(ctx_1, ctx_1.categories, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n          <li class=\"accordion-item\"><a href=\"#\" class=\"item-content item-link\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">';\n          r += c(ctx_2.name, ctx_2);\n          r += '</div>\\n              </div>\\n            </a>\\n            <div class=\"accordion-item-content\">\\n              <div class=\"list media-list\">\\n                <ul>\\n                  ';\n          r += Template7Helpers.each.call(ctx_2, ctx_2.components, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n                  ';\n              r += Template7Helpers.js_if.call(ctx_3, '!this.deleted', {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n                  <li class=\"component-list-item\" data-title=\"';\n                  r += c(ctx_4.title, ctx_4);\n                  r += '\" data-description=\"';\n                  r += c(ctx_4.subtitle, ctx_4);\n                  r += '\" data-category=\"';\n                  r += c(ctx_2.name, ctx_4);\n                  r += '\" data-name=\"';\n                  r += c(ctx_4.name, ctx_4);\n                  r += '\">\\n                    <a href=\"#\" @click=\"addComponent(';\n                  r += c(data_2 && data_2.index, ctx_4);\n                  r += ', ';\n                  r += c(data_3 && data_3.index, ctx_4);\n                  r += ')\" class=\"item-link item-content\">\\n                      <!-- <div class=\"item-media\"><img src=\"http://media.softresource.cz/public/su99k6lnmo63t5jlbndj67uc53si7v17zofw4azweh2g6f9xsopta92bawybvc56.png\" style=\"width: 150px\" /></div> -->\\n                      <div class=\"item-inner\">\\n                        <div class=\"item-title-row\">\\n                          <div class=\"item-title\">';\n                  r += c(ctx_4.title, ctx_4);\n                  r += ' [';\n                  r += c(ctx_4.name, ctx_4);\n                  r += ']</div>\\n                        </div>\\n                        <div class=\"item-text\">';\n                  r += c(ctx_4.subtitle, ctx_4);\n                  r += '</div>\\n                      </div>\\n                    </a>\\n                  </li>\\n                  ';\n                  return r;\n                },\n                inverse: function empty() {\n                  return '';\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n                  ';\n              return r;\n            },\n            inverse: function empty() {\n              return '';\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n                </ul>\\n              </div>\\n            </div>\\n          </li>\\n          ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n        </ul>\\n      </div>\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-3873c8cc47] a.item-inner {\n    color: #303030;\n  }\n\n[data-f7-3873c8cc47] .block-title+.list {\n    margin-top: 0;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"builder:componentsMenu.components\")}} Cancel {{#if copyToCb}} {{#js_if \"Array.isArray(this.$app.builder.copyToCb)\"}} {{$app.translation.t(\"builder:componentsMenu.paste\")}} {{$app.translation.t(\"builder:componentsMenu.componentSelect\")}} ({{js \"this.$app.builder.copyToCb.length\"}}) {{else}} {{$app.translation.t(\"builder:componentsMenu.paste\")}} {{copyToCb.params.title}} {{copyToCb.params.subtitle}} {{/js_if}} {{/if}} {{#if clip}} {{$app.translation.t(\"builder:componentsMenu.globalPaste\")}} {{$app.translation.t(\"builder:componentsMenu.globalPaste\")}} {{/if}} {{#each categories}} {{name}} {{#each components}} {{#js_if \"!this.deleted\"}} {{title}} [{{name}}] {{subtitle}} {{/js_if}} {{/each}} {{/each}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/templates/builder_components.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {const rgbaToArray = __webpack_require__(/*! hex-and-rgba */ \"./node_modules/hex-and-rgba/index.js\").rgbaToArray;\nconst unitsx = __webpack_require__(/*! units-css */ \"./node_modules/units-css/index.js\");\nconst {parse} = __webpack_require__(/*! postcss-values-parser */ \"./node_modules/postcss-values-parser/lib/index.js\");\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n  },\n  methods: {},\n  on: {\n    pageInit: function (i, page) {\n      let validUnits = [\n        '%',\n        'ch',\n        'cm',\n        'em',\n        'ex',\n        'in',\n        'mm',\n        'pc',\n        'pt',\n        'px',\n        'rem',\n        'vh',\n        'vmax',\n        'vmin',\n        'vw'\n      ];\n      let x = { 'background-attachment': 'a' };\n      let app = page.app;\n      let component = app.builder.editComponent;\n      let backgroundColor = component.styleSheet.bm.$el.css('background-color');\n      let rgbaField = rgbaToArray(backgroundColor);\n      var colorPickerWheel = app.colorPicker.create({\n        inputEl: '#demo-color-picker-wheel',\n        targetEl: '#demo-color-picker-wheel-value',\n        targetElSetBackgroundColor: true,\n        modules: [\n          'wheel',\n          'alpha-slider'\n        ],\n        openIn: 'popover',\n        value: { rgba: rgbaField },\n        backdrop: false,\n        on: {\n          change: function (colorPicker) {\n            let value = colorPicker.value;\n            component.params.styles['bm']['background-color'] = `rgba(${ value.rgba.join(', ') })`;\n            component.update = true;\n            app.builder.componentContext.$setState();\n          }\n        }\n      });\n      let borderTopLeft = page.$el.find('#border-top-left-radius');\n      let borderTopLeftVals = parse(component.styleSheet.bm.$el.css('border-top-left-radius'));\n      let borderTopLeftNodes = [];\n      borderTopLeftVals.walkNumerics(node => borderTopLeftNodes.push(node));\n      let borderTopLeftVal = borderTopLeftNodes[0];\n      borderTopLeft.val(borderTopLeftVal.value);\n      page.$el.find('#border-top-left-radius').on('change', function () {\n        component.styleSheet.bm.$el.css('border-top-left-radius', $(this).val() + 'px');\n        component.params.styles['bm']['border-top-left-radius'] = $(this).val() + 'px';\n      });\n      let defaults = {\n        border: {\n          radius: 'border-radius',\n          image: 'border-image',\n          width: 'border-width',\n          style: 'border-style',\n          color: 'border-color'\n        }\n      };\n      let units = [\n        'px',\n        '%'\n      ];\n      let borderStyle = [\n        'none',\n        'dotted',\n        'dashed',\n        'solid',\n        'double',\n        'groove',\n        'ridge',\n        'inset',\n        'outset'\n      ];\n      let borderDefaults = {\n        'border': function () {\n          return `${ 'border-width' } ${ 'border-style' } ${ 'border-color' }`;\n        },\n        'border-width': units,\n        'border-style': 'border-style',\n        'border-color': 'border-color',\n        'border-top': function () {\n          return `${ 'border-top-width' } ${ 'border-top-style' } ${ 'border-top-color' }`;\n        },\n        'border-top-width': units,\n        'border-top-style': 'border-style',\n        'border-top-color': 'border-color',\n        'border-right': function () {\n          return `${ 'border-right-width' } ${ 'border-right-style' } ${ 'border-right-color' }`;\n        },\n        'border-right-width': units,\n        'border-right-style': 'border-style',\n        'border-right-color': 'border-color',\n        'border-bottom': function () {\n          return `${ 'border-bottom-width' } ${ 'border-bottom-style' } ${ 'border-bottom-color' }`;\n        },\n        'border-bottom-width': units,\n        'border-bottom-style': 'border-style',\n        'border-bottom-color': 'border-color',\n        'border-left': function () {\n          return `${ 'border-left-width' } ${ 'border-left-style' } ${ 'border-left-color' }`;\n        },\n        'border-left-width': units,\n        'border-left-style': 'border-style',\n        'border-left-color': 'border-color',\n        'border-radius': function () {\n          return `${ 'border-top-left-radius' } ${ 'border-top-right-radius' } ${ 'border-bottom-left-radius' } ${ 'border-bottom-right-radius' }`;\n        },\n        'border-top-left-radius': '',\n        'border-top-right-radius': '',\n        'border-bottom-left-radius': '',\n        'border-bottom-right-radius': ''\n      };\n      page.$el.find('#border-radius').on('change', function () {\n        let val = $(this).val();\n        component.styleSheet.getRule('author').prop('border-radius', parseInt(val));\n        component.styleSheet.getRule('author').prop('background', 'linear-gradient(top, #000000, #999)');\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: '2eefd516ac',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Back</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Nastavení</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n\\n      <!--<ul>-->\\n      <!---->\\n      <!--</ul>-->\\n      <!--</div>-->\\n\\n      <div class=\"list accordion-list\">\\n        <ul>\\n\\n          <li class=\"accordion-item\"><a href=\"#\" class=\"item-content item-link\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">Head</div>\\n              </div>\\n            </a>\\n            <div class=\"accordion-item-content\">\\n              <div class=\"list accordion-list\">\\n                <ul>\\n\\n                  <li class=\"accordion-item\"><a href=\"#\" class=\"item-content item-link\">\\n                      <div class=\"item-inner\">\\n                        <div class=\"item-title\">Pozadí, radius, okraje a\\xA0stín</div>\\n                      </div>\\n                    </a>\\n                    <div class=\"accordion-item-content\">\\n                      <div class=\"list no-hairlines-md\">\\n                        <ul>\\n                          <li>\\n                            <div class=\"item-content item-input\">\\n                              <div class=\"item-media\">\\n                                <i class=\"icon demo-list-icon\" id=\"demo-color-picker-wheel-value\"></i>\\n                              </div>\\n                              <div class=\"item-inner\">\\n                                <div class=\"item-input-wrap\">\\n                                  <input type=\"text\" placeholder=\"Color\" readonly=\"readonly\" id=\"demo-color-picker-wheel\">\\n                                </div>\\n                              </div>\\n                            </div>\\n                          </li>\\n\\n                          <li>\\n                            border-top-left-radius <input id=\"border-top-left-radius\" type=\"number\"><br>\\n                            border-top-right-radius <input id=\"border-top-right-radius\" type=\"number\" value=\"0\"><br>\\n                            border-bottom-left-radius <input id=\"border-bottom-left-radius\" type=\"number\" value=\"0\"><br>\\n                            border-bottom-right-radius <input id=\"border-bottom-right-radius\" type=\"number\" value=\"0\"><br>\\n                          </li>\\n                          <li>box-shadow-offset</li>\\n                          <li>box-shadow-blur</li>\\n                          <li>box-shadow-color</li>\\n\\n                          <li><input id=\"background-color\" type=\"color\" name=\"favcolor\" value=\"rgba(0, 0, 0, 0)\" style=\"background-color: rgba(0, 0, 0, 0)\"></li>\\n                        </ul>\\n                      </div>\\n                    </div>\\n                  </li>\\n\\n                  <li class=\"accordion-item\"><a href=\"#\" class=\"item-content item-link\">\\n                      <div class=\"item-inner\">\\n                        <div class=\"item-title\">Text</div>\\n                      </div>\\n                    </a>\\n                    <div class=\"accordion-item-content\">\\n                      text\\n                    </div>\\n                  </li>\\n\\n                </ul>\\n              </div>\\n            </div>\\n          </li>\\n          <li class=\"accordion-item\"><a href=\"#\" class=\"item-content item-link\">\\n              <div class=\"item-inner\">\\n                <div class=\"item-title\">Atd</div>\\n              </div>\\n            </a>\\n            <div class=\"accordion-item-content\">\\n            </div>\\n          </li>\\n        </ul>\\n      </div>\\n\\n\\n\\n\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n  #demo-color-picker-wheel-value {\n    width: 50px;\n    height: 50px;\n  }\n`,\n  styleScoped: false,\n  cleanText: ` Back Nastavení Head Pozadí, radius, okraje a stín border-top-left-radius border-top-right-radius border-bottom-left-radius border-bottom-right-radius box-shadow-offset box-shadow-blur box-shadow-color Text text Atd `\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/templates/builder_css_generator.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/builder/templates/builder_history.f7.html":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/builder/templates/builder_history.f7.html ***!
  \***************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var tui_pagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tui-pagination */ \"./node_modules/tui-pagination/dist/tui-pagination.js\");\n/* harmony import */ var tui_pagination__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tui_pagination__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var tui_pagination_dist_tui_pagination_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tui-pagination/dist/tui-pagination.css */ \"./node_modules/tui-pagination/dist/tui-pagination.css\");\n/* harmony import */ var tui_pagination_dist_tui_pagination_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tui_pagination_dist_tui_pagination_css__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    return {\n      data: [],\n      timestampFrom: null,\n      timestampTo: null,\n      name: null,\n      type: [\n        'add',\n        'content',\n        'moveup',\n        'movedown',\n        'remove',\n        'chapters'\n      ],\n      page: 0,\n      limit: 30,\n      currCountMin: 0,\n      currCountMax: 0,\n      maxCount: 0,\n      filterToggler: ''\n    };\n  },\n  methods: {\n    initComponentData: function () {\n      let app = this.$app;\n      let historyData = app.builder.versions.createHistoryList(app.builder.versions.componentHistory);\n      this.$setState({ data: historyData });\n    },\n    bindRevertButtons: function () {\n      let $el = this.$el;\n      let app = this.$app;\n      app.utils.nextFrame(() => {\n        let revertBtns = $el.find('.revert-action');\n        revertBtns.off('click');\n        revertBtns.on('click', e => {\n          let target = e.target;\n          let id = $$(e.target).data('id');\n          let item = _.find(app.builder.versions.currentHistory, o => {\n            return o.historyId == id;\n          });\n          app.dialog.confirm('Opravdu si přejete vrátit akce této změny?', 'Vrátit změnu', () => {\n            if (item.h == 'undo') {\n              app.builder.history.undo(item);\n            } else {\n              app.builder.history.redo(item);\n            }\n          });\n        });\n      });\n    },\n    updateContent: async function (forceToFirstPage = false, viewShowType) {\n      let $el = this.$el;\n      let app = this.$app;\n      let el = $el.find('.loading-area');\n      let templateFilter = app.builder.versions.templateFilter;\n      let filter = {};\n      if (templateFilter.timestampFrom) {\n        filter['timestamp_from'] = templateFilter.timestampFrom;\n      }\n      if (templateFilter.timestampTo) {\n        filter['timestamp_to'] = templateFilter.timestampTo;\n      }\n      if (templateFilter.name) {\n        filter['userName'] = templateFilter.name;\n      }\n      if (templateFilter.type) {\n        filter['type'] = templateFilter.type;\n      }\n      if (forceToFirstPage) {\n        templateFilter.page = 0;\n      }\n      let historyData = null;\n      if (viewShowType == 'view_history') {\n        let id = app.builder.editComponent.params.id;\n        let version = app.builder.versions.currentVersion;\n        historyData = await app.builder.api.getComponentHistoryApi(id, version, this.limit, templateFilter.page, filter);\n      } else {\n        historyData = await app.builder.api.getBookHistory(this.limit, templateFilter.page, filter);\n      }\n      app.builder.versions.currentHistory = historyData.data;\n      let count = historyData.params.countAll;\n      this.maxCount = count;\n      this.currCountMin = templateFilter.page * this.limit + 1;\n      let max = (templateFilter.page + 1) * this.limit + 1;\n      this.currCountMax = max > this.maxCount ? this.maxCount : max;\n      await this.updatePagination(viewShowType);\n      let formatedData = await app.builder.versions.createHistoryList(historyData, true);\n      this.$setState({ data: formatedData });\n      let cont = $el.find('.page-content');\n      cont[0].scrollTop = 10;\n      this.bindRevertButtons();\n      let users = [];\n      users = historyData.params.users;\n      app.preloader.hideIn(el);\n      return users;\n    },\n    updatePagination: async function (viewShowType) {\n      let $el = this.$el;\n      let el = $el.find('.loading-area');\n      let app = this.$app;\n      let templateFilter = app.builder.versions.templateFilter;\n      let paginationEl = $el.find('#pagination');\n      if (paginationEl) {\n        paginationEl.empty();\n        const options = {\n          totalItems: this.maxCount,\n          itemsPerPage: this.limit,\n          visiblePages: 4,\n          page: templateFilter.page + 1,\n          usageStatistics: false,\n          centerAlign: true,\n          firstItemClassName: 'tui-first-child',\n          lastItemClassName: 'tui-last-child',\n          template: {\n            page: '<span  class=\"tui-page-btn\">{{page}}</span>',\n            currentPage: '<strong class=\"tui-page-btn tui-is-selected\">{{page}}</strong>',\n            moveButton: '<span  class=\"tui-page-btn tui-{{type}}\">' + '<span class=\"tui-ico-{{type}}\">{{type}}</span>' + '</span>',\n            disabledMoveButton: '<span class=\"tui-page-btn tui-is-disabled tui-{{type}}\">' + '<span class=\"tui-ico-{{type}}\">{{type}}</span>' + '</span>',\n            moreButton: '<span class=\"tui-page-btn tui-{{type}}-is-ellip\">' + '<span class=\"tui-ico-ellip\">...</span>' + '</span>'\n          }\n        };\n        const pagination = new tui_pagination__WEBPACK_IMPORTED_MODULE_0___default.a('pagination', options);\n        pagination.on('afterMove', event => {\n          app.preloader.showIn(el);\n          templateFilter.page = event.page - 1;\n          this.currCountMin = templateFilter.page * this.limit + 1;\n          let max = (templateFilter.page + 1) * this.limit + 1;\n          this.currCountMax = max > this.maxCount ? this.maxCount : max;\n          this.$setState({\n            currCountMin: this.currCountMin,\n            currCountMax: this.currCountMax\n          });\n          this.updateContent(false, viewShowType);\n        });\n      }\n    }\n  },\n  on: {\n    pageInit: async function (e, page) {\n      e.stopImmediatePropagation();\n      let app = page.app;\n      let $el = page.$el;\n      let viewShowType = page.view.id;\n      let el = $el.find('.loading-area');\n      let templateFilter = app.builder.versions.templateFilter;\n      if (viewShowType != templateFilter.lastViewId) {\n        templateFilter.page = null;\n      }\n      templateFilter.lastViewId = page.view.id;\n      app.preloader.showIn(el);\n      if (templateFilter.smartSelectValues || templateFilter.calendarRange) {\n        this.$setState({ filterToggler: 'accordion-item-opened' });\n      }\n      let users = await this.updateContent(false, viewShowType);\n      let calendarRange = app.calendar.create({\n        inputEl: '#date-range',\n        rangePicker: true,\n        closeOnSelect: true\n      });\n      if (templateFilter.calendarRange) {\n        calendarRange.setValue(templateFilter.calendarRange);\n      }\n      let calendarReset = $el.find('#date-reset');\n      let calendarInput = $el.find('#date-range');\n      calendarReset.on('click', () => {\n        calendarInput.val('');\n        calendarRange.setValue([]);\n        templateFilter.timestamTo = null;\n        templateFilter.timestampFrom = null;\n        templateFilter.calendarRange = null;\n        this.updateContent(true, viewShowType);\n      });\n      calendarRange.on('close', e => {\n        app.preloader.showIn(el);\n        let val = calendarRange.getValue();\n        templateFilter.calendarRange = val;\n        if (val && val.length > 0) {\n          let stringFrom = val[0];\n          let stringTo = val[1];\n          let dateFrom = new Date(stringFrom);\n          let dateTo = new Date(stringTo);\n          if (dateTo) {\n            dateTo.setMinutes(59);\n            dateTo.setHours(23);\n            dateTo.setSeconds(59);\n          }\n          let timestampTo = dateTo.getTime();\n          let timestampFrom = dateFrom.getTime();\n          if (timestampTo) {\n            templateFilter.timestampTo = timestampTo / 1000;\n          }\n          if (timestampFrom) {\n            templateFilter.timestampFrom = timestampFrom / 1000;\n          }\n        }\n        this.updateContent(true, viewShowType);\n      });\n      let userSelect = $el.find('#user-select');\n      users.forEach(user => {\n        let opt = `<option selected value=\"${ user }\">${ user }</option>`;\n        $(userSelect).append(opt);\n      });\n      let maxFilterLength = users.length + 6;\n      let filterEl = $el.find('#filter-select');\n      let smartSelect = page.app.smartSelect.create({\n        el: filterEl,\n        searchbar: false,\n        pageBackLinkText: 'Save'\n      });\n      if (templateFilter.smartSelectValues) {\n        smartSelect.setValue(templateFilter.smartSelectValues);\n      }\n      smartSelect.on('close', e => {\n        let val = smartSelect.getValue();\n        templateFilter.smartSelectValues = val;\n        if (maxFilterLength === val.length) {\n          templateFilter.smartSelectValues = null;\n        }\n        let items = e.items;\n        let types = [];\n        let users = [];\n        items.forEach(item => {\n          if (val.includes(item.value)) {\n            if (item.groupLabel == 'Type') {\n              types.push(item.value);\n            } else {\n              users.push(item.value);\n            }\n          }\n        });\n        templateFilter.name = users;\n        templateFilter.type = types;\n        this.updateContent(true, viewShowType);\n      });\n      let helpBtn = $el.find('.history-help-btn');\n      helpBtn.on('click', () => {\n        let helpPopup = app.popover.create({\n          targetEl: helpBtn,\n          content: `\n            <div class=\"popover popover-history\" data-close-on-escape=\"true\" data-close-by-backdrop-click=\"true\" data-backdrop=\"false\">\n             <h3 class=\"header\">Nápověda</h3>\n              <div class=\"list\">\n              <ul>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"add_circle_outline\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Přidání komponenty</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" contenteditable=\"false\" data-icon=\"edit\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Změna obsahu komponenty</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon f7-icons\" contenteditable=\"false\" data-icon=\"chevron_up_round\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Posun komponenty nahoru</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon f7-icons\" contenteditable=\"false\" data-icon=\"chevron_down_round\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Posun komponenty dolů</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"remove_circle\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Odstranění komponenty</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"add_to_photos\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Kopírování</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"settings\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Úprava nastavení knihy</div>\n                    </div>\n                  </div>\n                </li>\n                <li>\n                  <div class=\"item-content\">\n                    <div class=\"item-media\">\n                      <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"book\"></i>\n                      </div>\n                    <div class=\"item-inner\">\n                      <div class=\"item-title\">Změna v nastavení kapitol</div>\n                    </div>\n                  </div>\n                </li>\n              </ul>\n              </div>\n            </div>\n            `,\n          on: {\n            open: function (popover) {\n            },\n            opened: function (popover) {\n            }\n          }\n        });\n        helpPopup.open();\n      });\n    }\n  },\n  id: '820387481a',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page history-view\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">';\n      r += c(ctx_1.$app.translation.t('back'), ctx_1);\n      r += '</span>\\n          </a>\\n        </div>\\n\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('builder:menu.history'), ctx_1);\n      r += '</div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n      <div class=\"header\">\\n        <div class=\"content-title\">\\n          <h1>History changes</h1>\\n          <span><i class=\"icon material-icons history-help-btn tooltip-init\" data-type=\"material-icons\" data-icon=\"help\" data-tooltip=\"Help\"></i></span>\\n        </div>\\n        <div class=\"filter-container\">\\n          <div class=\"accordion-item ';\n      r += c(ctx_1.filterToggler, ctx_1);\n      r += '\">\\n            <div class=\"filter-toggle accordion-item-toggle\">\\n              <i class=\"icon material-icons tooltip-init\" contenteditable=\"false\" data-icon=\"filter_list\" data-tooltip=\"Filter\"></i> Filter\\n            </div>\\n            <div class=\"filter-content accordion-item-content\">\\n              <div class=\"list\">\\n                <ul>\\n                  <li class=\"item-content item-input\">\\n                    <div class=\"item-inner\">\\n                      <div class=\"item-title item-label\">Date Filter</div>\\n                      <div class=\"item-input-wrap\">\\n                        <input type=\"text\" placeholder=\"Vyberte datum\" readonly=\"readonly\" id=\"date-range\">\\n                      </div>\\n\\n                    </div>\\n                    <div class=\"item-after\" id=\"date-reset\">\\n                      <i class=\"icon material-icons\" data-type=\"material-icons\" data-icon=\"close\"></i>\\n                    </div>\\n                  </li>\\n                  <li class>\\n                    <a class=\"item-link smart-select\" id=\"filter-select\" data-open-in=\"popup\" data-searchbar=\"false\">\\n                      <select name=\"Filter\" multiple>\\n                        <optgroup id=\"user-select\" label=\"User\"></optgroup>\\n                        <optgroup label=\"Type\">\\n                          <option value=\"add\" selected>Add</option>\\n                          <option value=\"content\" selected>Content</option>\\n                          <option value=\"moveUp\" selected>Move Up</option>\\n                          <option value=\"moveDown\" selected>Move down</option>\\n                          <option value=\"remove\" selected>Remove</option>\\n                          <option value=\"chapters\" selected>Chapters</option>\\n                          <option value=\"addMultiple\">Add Multiple</option>\\n                          <option value=\"settings\">Settings</option>\\n                        </optgroup>\\n                      </select>\\n                      <div class=\"item-content\">\\n                        <div class=\"item-inner\">\\n                          <div class=\"item-title\">Filter</div>\\n                        </div>\\n                      </div>\\n                    </a>\\n                  </li>\\n                  <!-- <li class=\"item-content item-input\">\\n                    <div class=\"item-inner\">\\n                      <div class=\"item-title item-label\">Uživatel</div>\\n                      <div class=\"item-input-wrap\">\\n                        <select id=\"user-select\">\\n                          <option value=\"null\">-------</option>\\n                        </select>\\n                      </div>\\n                    </div>\\n                  </li> -->\\n                </ul>\\n              </div>\\n            </div>\\n          </div>\\n        </div>\\n\\n      </div>\\n      <div class=\"loading-area\">\\n        ';\n      r += c(ctx_1.data, ctx_1);\n      r += '\\n      </div>\\n      <div class=\"pagination-container\">\\n        <div class=\"tui-pagination\" id=\"pagination\">\\n\\n        </div>\\n        <div class=\"counter\">\\n          <span>';\n      r += c(ctx_1.currCountMin, ctx_1);\n      r += ' - ';\n      r += c(ctx_1.currCountMax, ctx_1);\n      r += ' of ';\n      r += c(ctx_1.maxCount, ctx_1);\n      r += '</span>\\n        </div>\\n      </div>\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n`,\n  styleScoped: false,\n  cleanText: ` {{$app.translation.t(\"back\")}} {{$app.translation.t(\"builder:menu.history\")}} History changes Filter Date Filter Add Content Move Up Move down Remove Chapters Add Multiple Settings Filter Uživatel ------- --> {{this.data}} {{this.currCountMin}} - {{this.currCountMax}} of {{this.maxCount}} `\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/builder/templates/builder_history.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/gallery/gallery.js":
/*!****************************************************!*\
  !*** ./src/core/custom_plugins/gallery/gallery.js ***!
  \****************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var _gallery_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gallery.less */ \"./src/core/custom_plugins/gallery/gallery.less\");\n/* harmony import */ var _gallery_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_gallery_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nvar Gallery = /*#__PURE__*/function () {\n  function Gallery(app) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Gallery);\n    this.app = app;\n    this.photoArray = [];\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Gallery, [{\n    key: \"createGallery\",\n    value: function createGallery(page) {\n      this.pageMy = page;\n      this.findElementForGallery();\n      var _this = this;\n      function myEscapeKeyListener(event) {\n        if (event.key === 'Escape') {\n          // Zde provedete akci po stisknutí klávesy Escape\n          //alert('Stiskli jste klávesu Escape!');\n          _this.myPhotoBrowserPage.close();\n        } else if (event.keyCode === 37) {\n          // Stisknuta klávesa šipka doleva\n\n          //alert('Stisknuta klávesa šipka doleva');\n          _this.myPhotoBrowserPage.$el.find(\".photo-browser-prev\").click();\n        } else if (event.keyCode === 39) {\n          // Stisknuta klávesa šipka doprava\n\n          //alert('Stisknuta klávesa šipka doprava');\n          _this.myPhotoBrowserPage.$el.find(\".photo-browser-next\").click();\n        }\n      }\n      var defaults = {\n        photos: this.photoArray,\n        routableModals: false,\n        navbarShowCount: true,\n        on: {\n          opened: function opened() {\n            ////console.log('TOMX photo browser opened');\n            document.addEventListener('keydown', myEscapeKeyListener);\n          },\n          closed: function closed() {\n            ////console.log('TOMX photo browser closed');\n            document.removeEventListener('keydown', myEscapeKeyListener);\n          }\n        }\n      };\n      var params = framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].extend(defaults, this.app.params.gallery);\n      this.myPhotoBrowserPage = this.app.photoBrowser.create(params);\n    }\n  }, {\n    key: \"findElementForGallery\",\n    value: function findElementForGallery() {\n      var array = [];\n      this.pageMy.find(\".open-gallery\").each(function () {\n        var tmpOneImg = [];\n        tmpOneImg[\"url\"] = $(this).attr(\"src\");\n        tmpOneImg[\"caption\"] = decodeURIComponent($(this).attr(\"alt\"));\n        array.push(tmpOneImg);\n      });\n      if (array.length) {\n        this.photoArray = array;\n      }\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"Gallery\",\n  params: {\n    gallery: {\n      popupCloseLinkText: \"Zavřít\",\n      navbarOfText: \"ze\"\n    }\n  },\n  create: function create() {\n    var app = this;\n    app.gallery = new Gallery(app);\n    // TODO lazy modul\n    //app.gallery.createGallery(app.views.main.$el);\n\n    app.on(\"init\", function () {\n      app.data.myEvents.on(\"page:show\", function (page) {\n        page.app.gallery.createGallery(page.$el);\n      });\n    });\n  },\n  on: {},\n  clicks: {\n    \".open-gallery\": function open($clickedEl, e) {\n      this.onclick = undefined;\n      e.stopImmediatePropagation;\n      e.preventDefault;\n      $clickedEl.stopImmediatePropagation;\n      $clickedEl.preventDefault;\n      var app = this;\n      var photoId = app.gallery.myPhotoBrowserPage.params.photos.findIndex(function (obj) {\n        return obj.url === $clickedEl.attr(\"src\");\n      });\n      if (photoId > -1) {\n        app.gallery.myPhotoBrowserPage.open(photoId);\n      } else {\n        app.dialog.alert(\"Galerie pro obrázek \" + $(this).attr(\"src\") + \" nenalezena.\", \"Upozornění\");\n      }\n    }\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/gallery/gallery.js?");

/***/ }),

/***/ "./src/core/custom_plugins/gallery/gallery.less":
/*!******************************************************!*\
  !*** ./src/core/custom_plugins/gallery/gallery.less ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/gallery/gallery.less?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/highlights-comments-class.js":
/*!**********************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/highlights-comments-class.js ***!
  \**********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _rangy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./rangy */ \"./src/core/custom_plugins/highlights-comments/rangy.js\");\n/* harmony import */ var _hisghlight_comments_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hisghlight-comments-api */ \"./src/core/custom_plugins/highlights-comments/hisghlight-comments-api.js\");\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n\n\n\n\n\n\n\nvar HighlightComments = /*#__PURE__*/function () {\n  function HighlightComments(app) {\n    var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, HighlightComments);\n    var highlightComments = this;\n    var defaults = framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].extend({}, app.params.highlightComments);\n    highlightComments.params = framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_6__[\"default\"].extend(defaults, params);\n    this.app = app;\n    if (app.params.highlightComments.enabled || app.builder == undefined) {\n      highlightComments.api = new _hisghlight_comments_api__WEBPACK_IMPORTED_MODULE_5__[\"default\"](app);\n      this.selll = function getSelectionText() {\n        var text = \"\";\n        var activeEl = document.activeElement;\n        var activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null;\n        if (activeElTagName == \"textarea\" || activeElTagName == \"input\" && /^(?:text|search|password|tel|url)$/i.test(activeEl.type) && typeof activeEl.selectionStart == \"number\") {\n          text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd);\n        } else if (window.getSelection) {\n          text = window.getSelection().toString();\n        }\n        return text;\n      };\n      this.highligtId = null;\n      this.lastHighlightClass = highlightComments.params.highlightClasses[0];\n      this.lastHighlightCommentClass = highlightComments.params.highlightCommentClasses[0];\n      if (highlightComments.params.autostart) {\n        this.create();\n      }\n      app.data.myEvents.on(\"page:init\", /*#__PURE__*/function () {\n        var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee($page) {\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n            while (1) switch (_context.prev = _context.next) {\n              case 0:\n                _context.next = 2;\n                return highlightComments.applyToPage(null, $page);\n              case 2:\n                if (app.view.main.url === $page.url) {\n                  app.data.myEvents.emit(\"highlights:apliedToCurrentPage\", $page.$el);\n                }\n              case 3:\n              case \"end\":\n                return _context.stop();\n            }\n          }, _callee);\n        }));\n        return function (_x) {\n          return _ref.apply(this, arguments);\n        };\n      }());\n      app.data.myEvents.on(\"logged\", /*#__PURE__*/function () {\n        var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee4(user) {\n          var noUserHL, countOfHLNoUser;\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee4$(_context4) {\n            while (1) switch (_context4.prev = _context4.next) {\n              case 0:\n                _context4.next = 2;\n                return app.database.table(\"notes-select\");\n              case 2:\n                _context4.next = 4;\n                return _context4.sent.where(\"user\", null).where(\"del\", 0);\n              case 4:\n                noUserHL = _context4.sent;\n                countOfHLNoUser = noUserHL.count();\n                if (countOfHLNoUser) {\n                  app.dialog.create({\n                    title: \"Poznámky a zvýraznění, které zatím nejsou pod Vaším účtem\",\n                    text: \"V této knize máte \" + countOfHLNoUser + \" zvýraznění, nebo poznámky, které zde byly již před Vaším přihlášením a nejsou dosud synchronizovány. Přejete si je přidat do Vašeho účtu a synchronizovat na server, nebo je zahodit?\",\n                    buttons: [{\n                      text: \"Synchronizovat\",\n                      bold: true,\n                      onClick: function () {\n                        var _onClick = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee2(dialog, e) {\n                          var u;\n                          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee2$(_context2) {\n                            while (1) switch (_context2.prev = _context2.next) {\n                              case 0:\n                                u = user;\n                                _context2.next = 3;\n                                return app.database.table(\"notes-select\");\n                              case 3:\n                                _context2.next = 5;\n                                return _context2.sent.where(\"user\", null).update({\n                                  user: user.id\n                                });\n                              case 5:\n                                dialog.close();\n                                app.data.myEvents.emit(\"comment:toSend\");\n                              case 7:\n                              case \"end\":\n                                return _context2.stop();\n                            }\n                          }, _callee2);\n                        }));\n                        function onClick(_x3, _x4) {\n                          return _onClick.apply(this, arguments);\n                        }\n                        return onClick;\n                      }()\n                    }, {\n                      text: \"Zahodit\",\n                      onClick: function () {\n                        var _onClick2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee3(dialog, e) {\n                          var toDelete, toDeleteVals;\n                          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee3$(_context3) {\n                            while (1) switch (_context3.prev = _context3.next) {\n                              case 0:\n                                _context3.next = 2;\n                                return app.database.table(\"notes-select\");\n                              case 2:\n                                toDelete = _context3.sent.where(\"user\", null);\n                                _context3.next = 5;\n                                return toDelete.update({\n                                  del: 1\n                                });\n                              case 5:\n                                toDeleteVals = _context3.sent.getValue();\n                                highlightComments.applyToPages(toDeleteVals);\n                                _context3.next = 9;\n                                return toDelete.delete();\n                              case 9:\n                                dialog.close();\n                              case 10:\n                              case \"end\":\n                                return _context3.stop();\n                            }\n                          }, _callee3);\n                        }));\n                        function onClick(_x5, _x6) {\n                          return _onClick2.apply(this, arguments);\n                        }\n                        return onClick;\n                      }()\n                    }],\n                    verticalButtons: true\n                  }).open();\n                }\n              case 7:\n              case \"end\":\n                return _context4.stop();\n            }\n          }, _callee4);\n        }));\n        return function (_x2) {\n          return _ref2.apply(this, arguments);\n        };\n      }());\n      app.data.myEvents.on(\"user:logout\", /*#__PURE__*/function () {\n        var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee5(user) {\n          var notes, pageUrl;\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee5$(_context5) {\n            while (1) switch (_context5.prev = _context5.next) {\n              case 0:\n                _context5.next = 2;\n                return app.database.table(\"notes-select\");\n              case 2:\n                _context5.next = 4;\n                return _context5.sent.getAll();\n              case 4:\n                notes = _context5.sent;\n                pageUrl = app.router.params.url;\n                notes.forEach(function (note) {\n                  highlightComments.removeHighlight(note.js_id, false);\n                });\n                _context5.next = 9;\n                return app.database.table(\"notes-select\");\n              case 9:\n                _context5.sent.delete();\n                _context5.next = 12;\n                return app.database.table(\"notes-select-gc\");\n              case 12:\n                _context5.sent.delete();\n              case 13:\n              case \"end\":\n                return _context5.stop();\n            }\n          }, _callee5);\n        }));\n        return function (_x7) {\n          return _ref3.apply(this, arguments);\n        };\n      }());\n      this.Rangy = new _rangy__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n    }\n    return highlightComments;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(HighlightComments, [{\n    key: \"setHighlightId\",\n    value: function setHighlightId(id) {\n      this.highligtId = id;\n    }\n  }, {\n    key: \"getHighlightId\",\n    value: function getHighlightId() {\n      return this.highligtId;\n    }\n  }, {\n    key: \"clearSelection\",\n    value: function clearSelection() {\n      if (document.selection) {\n        document.selection.empty();\n      } else if (window.getSelection) {\n        window.getSelection().removeAllRanges();\n      }\n    }\n  }, {\n    key: \"getUnreadCount\",\n    value: function () {\n      var _getUnreadCount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee6() {\n        var app, count;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              app = this.app;\n              _context6.next = 3;\n              return app.database.table(\"notes-select-gc\");\n            case 3:\n              _context6.next = 5;\n              return _context6.sent.where(\"readed\", 0).count();\n            case 5:\n              count = _context6.sent;\n              return _context6.abrupt(\"return\", count);\n            case 7:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6, this);\n      }));\n      function getUnreadCount() {\n        return _getUnreadCount.apply(this, arguments);\n      }\n      return getUnreadCount;\n    }()\n  }, {\n    key: \"getAllHighlights\",\n    value: function () {\n      var _getAllHighlights = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee7() {\n        var self, highlights;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee7$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              self = this;\n              _context7.next = 3;\n              return this.app.database.table(\"notes-select\");\n            case 3:\n              highlights = _context7.sent.filter(function (item) {\n                return item[\"del\"] === 0;\n              }).getValue();\n              highlights.forEach(function (highlight, index) {\n                var slide = self.app.book.getSlideByUrl(highlight.pageUrl);\n                var slideIndex = self.app.book.getSlideIndexByUrl(highlight.pageUrl);\n                var slideName = slide ? slide.name : null;\n                highlights[index].pageName = slideName;\n                highlights[index].pagePosition = slideIndex;\n              });\n              return _context7.abrupt(\"return\", highlights);\n            case 6:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee7, this);\n      }));\n      function getAllHighlights() {\n        return _getAllHighlights.apply(this, arguments);\n      }\n      return getAllHighlights;\n    }()\n  }, {\n    key: \"getHighlightById\",\n    value: function () {\n      var _getHighlightById = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee8(highlightId) {\n        var app;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee8$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              app = this.app;\n              _context8.next = 3;\n              return app.database.table(\"notes-select\");\n            case 3:\n              return _context8.abrupt(\"return\", _context8.sent.filter(function (item) {\n                return item[\"js_id\"] === highlightId;\n              }).getValue()[0]);\n            case 4:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee8, this);\n      }));\n      function getHighlightById(_x8) {\n        return _getHighlightById.apply(this, arguments);\n      }\n      return getHighlightById;\n    }()\n  }, {\n    key: \"closeGCComment\",\n    value: function () {\n      var _closeGCComment = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee0(highlightId) {\n        var app, c;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee0$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              app = this.app;\n              c = this;\n              app.dialog.confirm(\"Tato volba se používá v případě, že diskutovaný problém je již vyřešen.\", \"Opravdu si přejete uzavřít vlákno?\", /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee9() {\n                var testRowIndex;\n                return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee9$(_context9) {\n                  while (1) switch (_context9.prev = _context9.next) {\n                    case 0:\n                      _context9.next = 2;\n                      return app.database.table(\"notes-select\");\n                    case 2:\n                      _context9.sent.filter(function (item) {\n                        return item[\"js_id\"] === parseInt(highlightId);\n                      }).update({\n                        resolved: 1,\n                        df: 1\n                      });\n                      testRowIndex = {\n                        text: \"UZAVŘENO UŽIVATELEM.\",\n                        del: 0,\n                        df: 1,\n                        ts: Math.round(new Date().getTime() / 1000),\n                        parent_js_id: highlightId,\n                        js_id: Date.now(),\n                        ts_edit: \"nyní\",\n                        id: null,\n                        name: app.user.identity.fullname,\n                        user: app.user.getUserId(),\n                        readed: 1\n                      };\n                      _context9.next = 6;\n                      return app.database.table(\"notes-select-gc\");\n                    case 6:\n                      _context9.next = 8;\n                      return _context9.sent.insert(testRowIndex);\n                    case 8:\n                      app.data.myEvents.emit(\"comment:toSend\");\n                      c.removeHighlight(highlightId, false);\n                    case 10:\n                    case \"end\":\n                      return _context9.stop();\n                  }\n                }, _callee9);\n              })));\n            case 3:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee0, this);\n      }));\n      function closeGCComment(_x9) {\n        return _closeGCComment.apply(this, arguments);\n      }\n      return closeGCComment;\n    }()\n  }, {\n    key: \"removeHighlight\",\n    value: function () {\n      var _removeHighlight = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee1(highlightId) {\n        var fromDatabase,\n          app,\n          bookVies,\n          i,\n          $currentPage,\n          $newEls,\n          note,\n          _args1 = arguments;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee1$(_context1) {\n          while (1) switch (_context1.prev = _context1.next) {\n            case 0:\n              fromDatabase = _args1.length > 1 && _args1[1] !== undefined ? _args1[1] : true;\n              app = this.app;\n              bookVies = app.views.currentBookViews;\n              for (i = 0; i < bookVies.length; i++) {\n                $currentPage = bookVies[i].$el;\n                $newEls = $currentPage.find('highlight[data-id=\"' + highlightId + '\"]');\n                if ($newEls) {\n                  $newEls.each(function () {\n                    var _this = $(this)[0];\n                    var parent = $(this).parent()[0];\n                    var html = _this.firstChild;\n                    parent.insertBefore(html, _this);\n                    parent.removeChild(_this);\n                    parent.normalize();\n                  });\n                }\n              }\n              if (!fromDatabase) {\n                _context1.next = 11;\n                break;\n              }\n              _context1.next = 7;\n              return app.database.table(\"notes-select\");\n            case 7:\n              _context1.next = 9;\n              return _context1.sent.filter(function (item) {\n                return item[\"js_id\"] === highlightId;\n              }).update({\n                del: 1,\n                df: 1\n              });\n            case 9:\n              note = _context1.sent;\n              app.data.myEvents.emit(\"comment:toSend\");\n            case 11:\n            case \"end\":\n              return _context1.stop();\n          }\n        }, _callee1, this);\n      }));\n      function removeHighlight(_x0) {\n        return _removeHighlight.apply(this, arguments);\n      }\n      return removeHighlight;\n    }()\n  }, {\n    key: \"addNoteIcon\",\n    value: function addNoteIcon(idOfNote, $page) {\n      var app = this.app;\n      var $currentPage = $page;\n      var $noteLastEl = $currentPage.find('highlight[data-id=\"' + idOfNote + '\"]');\n      var len = $noteLastEl.length;\n      if (len) {\n        var f = $noteLastEl.eq(len - 1);\n        f.addClass(\"h-icon\");\n      }\n    }\n  }, {\n    key: \"applyToPages\",\n    value: function () {\n      var _applyToPages = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee10(notes) {\n        var app, bookVies, context, i;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee10$(_context10) {\n          while (1) switch (_context10.prev = _context10.next) {\n            case 0:\n              app = this.app;\n              bookVies = app.views.currentBookViews;\n              context = this;\n              i = 0;\n            case 4:\n              if (!(i < bookVies.length)) {\n                _context10.next = 10;\n                break;\n              }\n              _context10.next = 7;\n              return context.applyToPage(notes, bookVies[i]);\n            case 7:\n              i++;\n              _context10.next = 4;\n              break;\n            case 10:\n            case \"end\":\n              return _context10.stop();\n          }\n        }, _callee10, this);\n      }));\n      function applyToPages(_x1) {\n        return _applyToPages.apply(this, arguments);\n      }\n      return applyToPages;\n    }()\n  }, {\n    key: \"applyToPage\",\n    value: function () {\n      var _applyToPage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee11() {\n        var notes,\n          $page,\n          app,\n          highlightComments,\n          pageUrl,\n          isUpdate,\n          _args11 = arguments;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee11$(_context11) {\n          while (1) switch (_context11.prev = _context11.next) {\n            case 0:\n              notes = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : null;\n              $page = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : null;\n              // debugger\n              app = this.app;\n              highlightComments = this; // let page = highlightComments.currentPage;\n              if ($page) {\n                pageUrl = $page.url;\n                $page = $page.$el;\n              } else {\n                $page = app.router.$el;\n                pageUrl = app.router.params.url;\n              }\n\n              // alert(pageUrl);\n              isUpdate = false;\n              if (notes) {\n                _context11.next = 14;\n                break;\n              }\n              _context11.next = 9;\n              return this.app.database.table(\"notes-select\");\n            case 9:\n              _context11.next = 11;\n              return _context11.sent.getAll();\n            case 11:\n              notes = _context11.sent;\n              _context11.next = 15;\n              break;\n            case 14:\n              isUpdate = true;\n            case 15:\n              // console.time(\"APPLYITEMS - \" + pageUrl);\n\n              notes.forEach(function (note) {\n                if (pageUrl === note.pageUrl && note.del === 0 && note.resolved !== 1) {\n                  if (isUpdate) {\n                    highlightComments.removeHighlight(note.js_id, false);\n                  }\n                  highlightComments.Rangy.applyFromItem(note, note.js_id, note.wrapper_id);\n                  if (note.type === \"c\") {\n                    highlightComments.addNoteIcon(note.js_id, $page);\n                  }\n                } else if (pageUrl === note.pageUrl && note.del === 1 && isUpdate) {\n                  highlightComments.removeHighlight(note.js_id, false);\n                } else if (pageUrl === note.pageUrl && note.resolved == 1) {\n                  highlightComments.removeHighlight(note.js_id, false);\n                }\n              });\n              // console.timeEnd(\"APPLYITEMS - \" + pageUrl);\n\n              this.clearSelection();\n              return _context11.abrupt(\"return\", true);\n            case 18:\n            case \"end\":\n              return _context11.stop();\n          }\n        }, _callee11, this);\n      }));\n      function applyToPage() {\n        return _applyToPage.apply(this, arguments);\n      }\n      return applyToPage;\n    }()\n  }, {\n    key: \"removeSelection\",\n    value: function removeSelection() {\n      var selection = window.getSelection ? window.getSelection() : document.selection ? document.selection : null;\n      if (!!selection) selection.empty ? selection.empty() : selection.removeAllRanges();\n    }\n  }, {\n    key: \"clickHighlightColor\",\n    value: function () {\n      var _clickHighlightColor = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee12($el, content) {\n        var highlightComments, app, $currentPage, position;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee12$(_context12) {\n          while (1) switch (_context12.prev = _context12.next) {\n            case 0:\n              highlightComments = this;\n              app = highlightComments.app;\n              if (!highlightComments.$popover.opened) {\n                highlightComments.$popover.open();\n              }\n              $currentPage = app.router.$el;\n              $currentPage.append(highlightComments.$pop[0]);\n\n              //počkám na vykreslení obsahu, abych mohl správně spočítat šířku popoveru\n              _context12.next = 7;\n              return highlightComments.setPopoverContent(content);\n            case 7:\n              position = highlightComments.getElementPosition($el);\n              highlightComments.$pop.css(\"top\", position.y + \"px\").css(\"left\", position.x + \"px\");\n              highlightComments.setHighlightId(parseInt($el.data(\"id\")));\n            case 10:\n            case \"end\":\n              return _context12.stop();\n          }\n        }, _callee12, this);\n      }));\n      function clickHighlightColor(_x10, _x11) {\n        return _clickHighlightColor.apply(this, arguments);\n      }\n      return clickHighlightColor;\n    }()\n  }, {\n    key: \"setPopoverContent\",\n    value: function () {\n      var _setPopoverContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee14(content) {\n        var app, highlightComments, promise;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee14$(_context14) {\n          while (1) switch (_context14.prev = _context14.next) {\n            case 0:\n              app = this.app;\n              highlightComments = this;\n              promise = new Promise(/*#__PURE__*/function () {\n                var _ref5 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee13(resolve, reject) {\n                  var comment;\n                  return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee13$(_context13) {\n                    while (1) switch (_context13.prev = _context13.next) {\n                      case 0:\n                        if (!(content === 1)) {\n                          _context13.next = 4;\n                          break;\n                        }\n                        // app.views.get('##popover-')\n\n                        app.views.get(\"#popover-view\").router.navigate(\"/hc-default/\", {\n                          reloadCurrent: true,\n                          ignoreCache: true,\n                          on: {\n                            pageInit: function pageInit() {\n                              resolve(\"done!\");\n                            }\n                          }\n                        });\n                        _context13.next = 17;\n                        break;\n                      case 4:\n                        if (!(content === 2)) {\n                          _context13.next = 8;\n                          break;\n                        }\n                        // Lišta se změnou barvy zvýraznění\n\n                        app.views.get(\"#popover-view\").router.navigate(\"/hc-highlight/\", {\n                          reloadCurrent: true,\n                          ignoreCache: true,\n                          on: {\n                            pageInit: function pageInit() {\n                              resolve(\"done!\");\n                            }\n                          }\n                        });\n                        _context13.next = 17;\n                        break;\n                      case 8:\n                        if (!(content === 3)) {\n                          _context13.next = 16;\n                          break;\n                        }\n                        app.views.get(\"#popover-view\").router.navigate(\"/hc-highlight-comment/\", {\n                          reloadCurrent: true,\n                          ignoreCache: true,\n                          on: {\n                            pageInit: function pageInit() {\n                              resolve(\"done!\");\n                            }\n                          }\n                        });\n                        _context13.next = 12;\n                        return app.database.table(\"notes-select\");\n                      case 12:\n                        comment = _context13.sent.where(\"js_id\", highlightComments.getHighlightId()).getValue()[0];\n                        highlightComments.$textareaComment.val(comment.note);\n                        _context13.next = 17;\n                        break;\n                      case 16:\n                        if (content === 4) {\n                          // Lišta se změnou barvy poznámek a textovou částí\n                          app.views.get(\"#popover-view\").router.navigate(\"/gc-detail/0/\", {\n                            reloadCurrent: true,\n                            ignoreCache: true,\n                            on: {\n                              pageInit: function pageInit() {\n                                resolve(\"done!\");\n                              }\n                            }\n                          });\n                        }\n                      case 17:\n                      case \"end\":\n                        return _context13.stop();\n                    }\n                  }, _callee13);\n                }));\n                return function (_x13, _x14) {\n                  return _ref5.apply(this, arguments);\n                };\n              }());\n              _context14.next = 5;\n              return promise;\n            case 5:\n              return _context14.abrupt(\"return\", _context14.sent);\n            case 6:\n            case \"end\":\n              return _context14.stop();\n          }\n        }, _callee14, this);\n      }));\n      function setPopoverContent(_x12) {\n        return _setPopoverContent.apply(this, arguments);\n      }\n      return setPopoverContent;\n    }()\n  }, {\n    key: \"getSelectionPositionPoints\",\n    value: function getSelectionPositionPoints() {\n      var rect, sel, rectLeft, rectTop, rectBottom, rectRight;\n      if (window.getSelection) {\n        sel = window.getSelection();\n        if (sel.rangeCount) {\n          if (sel.rangeCount > 0) {\n            rect = sel.getRangeAt(0).getBoundingClientRect();\n            rectLeft = rect.left;\n            rectTop = rect.top; //rect.top + rect.bottom;\n            rectRight = rect.right;\n            rectBottom = rect.bottom;\n          }\n        } else {\n          // TODO: can this happen in any browser? what to do then?\n        }\n      } else if (document.selection) {\n        // IE8-\n        var range = document.selection.createRange();\n        rectLeft = range.boundingLeft;\n        rectRight = range.boundingRight;\n        rectTop = range.boundingTop;\n        rectBottom = range.boundingBottom;\n      }\n      return {\n        top: rectTop,\n        left: rectLeft,\n        right: rectRight,\n        bottom: rectBottom\n      };\n    }\n  }, {\n    key: \"getElementPositionPoints\",\n    value: function getElementPositionPoints($elem) {\n      var offsets = $elem.offset();\n      return {\n        top: offsets.top,\n        left: offsets.left,\n        right: offsets.left + $elem.outerWidth(),\n        bottom: offsets.top + $elem.outerHeight()\n      };\n    }\n  }, {\n    key: \"calculateCenterPosition\",\n    value: function calculateCenterPosition(selectionPosition) {\n      var x, y;\n      var $currentPage = this.app.router.$el;\n      var w = this.$pop.outerWidth() / 2;\n      x = (selectionPosition.right - selectionPosition.left) / 2 - w + selectionPosition.left;\n      y = selectionPosition.bottom + 16 + $currentPage.scrollTop();\n      if (x < 2) {\n        x = 2;\n      }\n      if (y < 2) {\n        y = 2;\n      }\n      return {\n        x: x,\n        y: y\n      };\n    }\n  }, {\n    key: \"getSelectionPosition\",\n    value: function getSelectionPosition() {\n      return this.calculateCenterPosition(this.getSelectionPositionPoints());\n    }\n  }, {\n    key: \"getElementPosition\",\n    value: function getElementPosition($elem) {\n      return this.calculateCenterPosition(this.getElementPositionPoints($elem));\n    }\n  }, {\n    key: \"create\",\n    value: function create() {\n      var app = this.app;\n      var highlightComments = this;\n      highlightComments.open = false;\n      var $pop2 = $(\"\\n    <div id=\\\"highlihlight-popover\\\" class=\\\"highlight-popover-inner1\\\">\\n      <div class=\\\"highlight-wrapper\\\">\\n        <div id=\\\"popover-view\\\" class=\\\"highlight-inner \\\">\\n        </div>\\n        <div class=\\\"highlight-angle\\\"></div>\\n      </div>\\n    </div>\\n    \");\n      this.$popover = app.popover.create({\n        content: $pop2,\n        backdrop: false,\n        closeByBackdropClick: true,\n        closeByOutsideClick: true\n      });\n      var inner44 = this.$popover.$el.find(\"#popover-view\");\n      app.views.create(inner44, {\n        url: \"/hc-default/\",\n        pushState: false,\n        history: false,\n        preloadPreviousPage: false,\n        animate: false\n      });\n      var $pop = $pop2;\n      highlightComments.$pop = $pop;\n      var $popover = this.$popover;\n      $(\"body\").on(\"click\", 'highlight[data-hc-type=\"c\"]', function () {\n        highlightComments.clickHighlightColor($(this), 3);\n        // app.panel.get('left').open();\n        // let leftView = app.views.get($$('.view-left'));\n        // leftView.router.navigate('/vlozit-komentar/');\n      });\n      $(\"body\").on(\"click\", 'highlight[data-hc-type=\"h\"]', function () {\n        highlightComments.clickHighlightColor($(this), 2);\n      });\n      $(\"body\").on(\"click\", 'highlight[data-hc-type=\"gc\"]', function () {\n        highlightComments.clickHighlightColor($(this), 4);\n      });\n      var selectionText = \"\";\n      document.addEventListener(\"selectionchange\", function (evt) {\n        var selection = highlightComments.Rangy.rangy().getSelection();\n        selectionText = selection.toString().trim();\n        var isContentEditable = false;\n        var focusNode = selection.focusNode;\n        if (focusNode && focusNode.hasOwnProperty(\"parentNode\")) {\n          var parentNode = focusNode.parentNode;\n          isContentEditable = parentNode.hasAttribute(\"contenteditable\");\n        }\n        if (selectionText.length > 0 && selectionText.length < 1000 && !isContentEditable) {\n          // debugger\n\n          highlightComments.open = true;\n          if (!$popover.opened) {\n            $popover.open();\n            highlightComments.setPopoverContent(1);\n          }\n\n          // let have = $currentPage.find('#highlihlight-popover').length;\n\n          var position = highlightComments.getSelectionPosition();\n          $pop.css(\"top\", position.y + \"px\").css(\"left\", position.x + \"px\");\n          var $currentPage = app.router.$el;\n          $currentPage.append($pop[0]);\n        } else {\n          if ($popover.opened && highlightComments.open) {\n            // alert(\"close by selection\");\n            // debugger\n            $popover.close();\n          }\n          highlightComments.open = false;\n        }\n      }, false);\n      $(\"body\").on(\"click\", /*#__PURE__*/function () {\n        var _ref6 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee15(event) {\n          var $target;\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee15$(_context15) {\n            while (1) switch (_context15.prev = _context15.next) {\n              case 0:\n                $target = $(event.target); // debugger\n                if (!($target.prop(\"tagName\") === \"HIGHLIGHT\" || $target.prop(\"tagName\") === \"LABEL\" || $target.prop(\"tagName\") === \"INPUT\" || $target.hasClass(\"panel-backdrop\"))) {\n                  _context15.next = 3;\n                  break;\n                }\n                return _context15.abrupt(\"return\", false);\n              case 3:\n                if (!(!$target.closest(\"#highlihlight-popover\").length && $popover.opened && !selectionText.length)) {\n                  _context15.next = 12;\n                  break;\n                }\n                if (!highlightComments.removeGroupComment) {\n                  _context15.next = 11;\n                  break;\n                }\n                highlightComments.removeGroupComment = false;\n                highlightComments.removeHighlight(highlightComments.getHighlightId(), false);\n                _context15.next = 9;\n                return app.database.table(\"notes-select\");\n              case 9:\n                _context15.next = 11;\n                return _context15.sent.filter(function (item) {\n                  return item[\"js_id\"] === highlightComments.getHighlightId();\n                }).delete();\n              case 11:\n                $popover.close();\n              case 12:\n              case \"end\":\n                return _context15.stop();\n            }\n          }, _callee15);\n        }));\n        return function (_x15) {\n          return _ref6.apply(this, arguments);\n        };\n      }());\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = (HighlightComments);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/highlights-comments-class.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/highlights-comments.less":
/*!******************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/highlights-comments.less ***!
  \******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/highlights-comments.less?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/hisghlight-comments-api.js":
/*!********************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/hisghlight-comments-api.js ***!
  \********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n\n\nvar HcApi = /*#__PURE__*/function () {\n  function HcApi(app) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, HcApi);\n    var hcApi = this;\n    hcApi.app = app;\n    hcApi.init();\n    return hcApi;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(HcApi, [{\n    key: \"init\",\n    value: function init() {\n      var hcApi = this;\n      var app = hcApi.app;\n      app.data.myEvents.on(\"ws:connected\", /*#__PURE__*/function () {\n        var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee(socket) {\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n            while (1) switch (_context.prev = _context.next) {\n              case 0:\n                // pro hromadné komentáře přihlásíme pouze pokud je editor\n                if (app.user.isEditor) {\n                  /**\r\n                   *  Naslouchá WS pro hormadné komentáře\r\n                   *  Volá funkci pro propsání komentáře od local db\r\n                   */\n                  socket.private(\"book-comment.\" + app.id).listen(\".CommentGroupEvent\", function (event) {\n                    hcApi.setWSGroupComment(event);\n                  });\n\n                  /**\r\n                   *  Naslouchá WS pro zobrazené komentáře\r\n                   */\n                  socket.private(\"book-comment.\" + app.id).listen(\".CommentGroupReadedEvent\", function (event) {\n                    // apiManager.markWSreaded(event);\n                  });\n                }\n\n                /**\r\n                 *  Naslouchá WS pro zvýraznění\r\n                 *  Volá funkci pro propsání zvýraznění od local db\r\n                 */\n                socket.private(\"book-comment.\" + app.id).listen(\".CommentEvent\", function (event) {\n                  hcApi.setWSHighlight(event);\n                });\n                socket.private(\"user-book.\" + app.user.identity.id).listen(\".CommentPrivateEvent\", function (event) {\n                  hcApi.setWSHighlight(event);\n                });\n              case 3:\n              case \"end\":\n                return _context.stop();\n            }\n          }, _callee);\n        }));\n        return function (_x) {\n          return _ref.apply(this, arguments);\n        };\n      }());\n      var timer = null;\n      app.data.myEvents.on(\"logged\", /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee6() {\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee6$(_context6) {\n          while (1) switch (_context6.prev = _context6.next) {\n            case 0:\n              // alert('loged');\n              if (timer) {\n                clearTimeout(timer); //cancel the previous timer.\n                timer = null;\n              }\n              timer = setTimeout(/*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee2() {\n                return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee2$(_context2) {\n                  while (1) switch (_context2.prev = _context2.next) {\n                    case 0:\n                      hcApi.syncHighlights(); //stáhne zvýraznění ze serveru\n                      hcApi.syncGroupComments(); //stáhne komentáře ze serveru\n                      hcApi.sendWSHighlight(); // odešle na server nesesynchronizované zvýraznění z local db\n                      hcApi.sendWSGroupComment(); // odešle na server nesesynchronizované komentáře z local db\n                    case 4:\n                    case \"end\":\n                      return _context2.stop();\n                  }\n                }, _callee2);\n              })), 100);\n\n              // }\n\n              /**\r\n               *  Event pro odeslání komentáře a zvýraznění na WS.\r\n               *  Emituje se po odeslání komentáře.\r\n               */\n              app.data.myEvents.on(\"comment:toSend\", /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee3() {\n                return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee3$(_context3) {\n                  while (1) switch (_context3.prev = _context3.next) {\n                    case 0:\n                      _context3.next = 2;\n                      return hcApi.sendWSHighlight();\n                    case 2:\n                      _context3.next = 4;\n                      return hcApi.sendWSGroupComment();\n                    case 4:\n                    case \"end\":\n                      return _context3.stop();\n                  }\n                }, _callee3);\n              })));\n              app.data.myEvents.on(\"highlights:change\", /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee4() {\n                return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee4$(_context4) {\n                  while (1) switch (_context4.prev = _context4.next) {\n                    case 0:\n                      _context4.next = 2;\n                      return hcApi.sendWSHighlight();\n                    case 2:\n                    case \"end\":\n                      return _context4.stop();\n                  }\n                }, _callee4);\n              })));\n\n              /**\r\n               *  Event pro odeslání informace o zobrazení\r\n               *  Emituje se po zobrazení nového komentáře.\r\n               */\n              app.data.myEvents.on(\"comment:readed\", /*#__PURE__*/function () {\n                var _ref6 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee5(data) {\n                  return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee5$(_context5) {\n                    while (1) switch (_context5.prev = _context5.next) {\n                      case 0:\n                        _context5.next = 2;\n                        return hcApi.sendWSreaded(data);\n                      case 2:\n                      case \"end\":\n                        return _context5.stop();\n                    }\n                  }, _callee5);\n                }));\n                return function (_x2) {\n                  return _ref6.apply(this, arguments);\n                };\n              }());\n            case 5:\n            case \"end\":\n              return _context6.stop();\n          }\n        }, _callee6);\n      })));\n    }\n\n    /**\r\n     * Funkce odešle zvýraznění na WS endpoint, který jej dále rozešle přes WS.\r\n     * API navrátí zvýraznění, které se následně propíše do lokalní db.\r\n     * @return {bool} Vrací True/False dle úspěchu provedení.\r\n     */\n  }, {\n    key: \"sendWSHighlight\",\n    value: (function () {\n      var _sendWSHighlight = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee7() {\n        var _this, app, notes, user, formData, response, serverComments, _iterator, _step, item, serverComment, localComment;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee7$(_context7) {\n          while (1) switch (_context7.prev = _context7.next) {\n            case 0:\n              _this = this;\n              app = this.app;\n              _context7.next = 4;\n              return app.database.table(\"notes-select\");\n            case 4:\n              _context7.next = 6;\n              return _context7.sent.where(\"df\", 1).whereNot(\"user\", null).getValue();\n            case 6:\n              notes = _context7.sent;\n              if (!(notes.length == 0)) {\n                _context7.next = 9;\n                break;\n              }\n              return _context7.abrupt(\"return\", false);\n            case 9:\n              if (!app.user.isLoggedBool) {\n                _context7.next = 60;\n                break;\n              }\n              user = app.user;\n              _context7.prev = 11;\n              formData = new FormData();\n              formData.append(\"book_id\", app.id); //15 TODO app.id\n              formData.append(\"data\", JSON.stringify(notes));\n              _context7.next = 17;\n              return app.utils.axios.post(app.apiManager.params.domainPath + \"/api/comment/save\", formData, {\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 17:\n              response = _context7.sent;\n              serverComments = response.data.data;\n              if (!Array.isArray(serverComments)) {\n                _context7.next = 52;\n                break;\n              }\n              // musí být použít forcyklus, jinak negunguje await při použití forEach\n              _iterator = _createForOfIteratorHelper(serverComments);\n              _context7.prev = 21;\n              _iterator.s();\n            case 23:\n              if ((_step = _iterator.n()).done) {\n                _context7.next = 43;\n                break;\n              }\n              item = _step.value;\n              serverComment = item;\n              serverComment.js_id = parseInt(serverComment.js_id);\n              _context7.next = 29;\n              return app.database.table(\"notes-select\");\n            case 29:\n              _context7.next = 31;\n              return _context7.sent.where(\"js_id\", serverComment.js_id);\n            case 31:\n              localComment = _context7.sent;\n              if (!localComment.count()) {\n                _context7.next = 37;\n                break;\n              }\n              _context7.next = 35;\n              return localComment.update(serverComment);\n            case 35:\n              _context7.next = 41;\n              break;\n            case 37:\n              _context7.next = 39;\n              return app.database.table(\"notes-select\");\n            case 39:\n              _context7.next = 41;\n              return _context7.sent.insert(serverComment);\n            case 41:\n              _context7.next = 23;\n              break;\n            case 43:\n              _context7.next = 48;\n              break;\n            case 45:\n              _context7.prev = 45;\n              _context7.t0 = _context7[\"catch\"](21);\n              _iterator.e(_context7.t0);\n            case 48:\n              _context7.prev = 48;\n              _iterator.f();\n              return _context7.finish(48);\n            case 51:\n              app.highlightComments.applyToPages(serverComments);\n            case 52:\n              return _context7.abrupt(\"return\", true);\n            case 55:\n              _context7.prev = 55;\n              _context7.t1 = _context7[\"catch\"](11);\n              return _context7.abrupt(\"return\", false);\n            case 58:\n              _context7.next = 61;\n              break;\n            case 60:\n              return _context7.abrupt(\"return\", false);\n            case 61:\n            case \"end\":\n              return _context7.stop();\n          }\n        }, _callee7, this, [[11, 55], [21, 45, 48, 51]]);\n      }));\n      function sendWSHighlight() {\n        return _sendWSHighlight.apply(this, arguments);\n      }\n      return sendWSHighlight;\n    }()\n    /**\r\n     * Funkce odešle komentáře na WS endpoint, který jej dále rozešle přes WS.\r\n     * API navrátí komentáře, které se následně propíše do lokalní db.\r\n     * @return {bool} Vrací True/False dle úspěchu provedení.\r\n     */\n    )\n  }, {\n    key: \"sendWSGroupComment\",\n    value: (function () {\n      var _sendWSGroupComment = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee8() {\n        var app, notes, user, formData, response, serverComments, _iterator2, _step2, item, serverComment, localComment;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee8$(_context8) {\n          while (1) switch (_context8.prev = _context8.next) {\n            case 0:\n              app = this.app; // let lastItem = [];\n              _context8.next = 3;\n              return app.database.table(\"notes-select-gc\");\n            case 3:\n              _context8.next = 5;\n              return _context8.sent.where(\"df\", 1).whereNot(\"user\", null).getValue();\n            case 5:\n              notes = _context8.sent;\n              if (!(notes.length == 0)) {\n                _context8.next = 8;\n                break;\n              }\n              return _context8.abrupt(\"return\", false);\n            case 8:\n              if (!app.user.isEditor) {\n                _context8.next = 53;\n                break;\n              }\n              user = app.user;\n              formData = new FormData();\n              formData.append(\"book_id\", app.id); //15 TODO app.id\n              formData.append(\"data\", JSON.stringify(notes));\n              _context8.next = 15;\n              return app.utils.axios.post(app.apiManager.params.domainPath + \"/api/comments/group/save\", formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 15:\n              response = _context8.sent;\n              serverComments = response.data.data;\n              if (!Array.isArray(serverComments)) {\n                _context8.next = 50;\n                break;\n              }\n              // musí být použít forcyklus, jinak negunguje await při použití forEach\n              _iterator2 = _createForOfIteratorHelper(serverComments);\n              _context8.prev = 19;\n              _iterator2.s();\n            case 21:\n              if ((_step2 = _iterator2.n()).done) {\n                _context8.next = 41;\n                break;\n              }\n              item = _step2.value;\n              serverComment = item;\n              serverComment.js_id = parseInt(serverComment.js_id);\n              _context8.next = 27;\n              return app.database.table(\"notes-select-gc\");\n            case 27:\n              _context8.next = 29;\n              return _context8.sent.where(\"js_id\", serverComment.js_id);\n            case 29:\n              localComment = _context8.sent;\n              if (!localComment.count()) {\n                _context8.next = 35;\n                break;\n              }\n              _context8.next = 33;\n              return localComment.update(serverComment);\n            case 33:\n              _context8.next = 39;\n              break;\n            case 35:\n              _context8.next = 37;\n              return app.database.table(\"notes-select-gc\");\n            case 37:\n              _context8.next = 39;\n              return _context8.sent.insert(serverComment);\n            case 39:\n              _context8.next = 21;\n              break;\n            case 41:\n              _context8.next = 46;\n              break;\n            case 43:\n              _context8.prev = 43;\n              _context8.t0 = _context8[\"catch\"](19);\n              _iterator2.e(_context8.t0);\n            case 46:\n              _context8.prev = 46;\n              _iterator2.f();\n              return _context8.finish(46);\n            case 49:\n              this.app.data.myEvents.emit(\"api:syncGroupComments\", serverComments);\n            case 50:\n              return _context8.abrupt(\"return\", true);\n            case 53:\n              return _context8.abrupt(\"return\", false);\n            case 54:\n            case \"end\":\n              return _context8.stop();\n          }\n        }, _callee8, this, [[19, 43, 46, 49]]);\n      }));\n      function sendWSGroupComment() {\n        return _sendWSGroupComment.apply(this, arguments);\n      }\n      return sendWSGroupComment;\n    }()\n    /**\r\n     * Funkce ukládá zvýraznění zachycné z WS do lokální db.\r\n     * @param {object} data\r\n     *    Objekt s daty o zvýraznění z WS (book-comment - CommentEvent)\r\n     */\n    )\n  }, {\n    key: \"setWSHighlight\",\n    value: (function () {\n      var _setWSHighlight = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee9(data) {\n        var app, commentArray, localComment, subtitle, text, notificationCallbackOnClose;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee9$(_context9) {\n          while (1) switch (_context9.prev = _context9.next) {\n            case 0:\n              app = this.app;\n              data.comment.js_id = parseInt(data.comment.js_id);\n              data.comment.selPos = parseInt(data.comment.selPos);\n              commentArray = [];\n              _context9.next = 6;\n              return app.database.table(\"notes-select\");\n            case 6:\n              _context9.next = 8;\n              return _context9.sent.where(\"js_id\", data.comment.js_id);\n            case 8:\n              localComment = _context9.sent;\n              if (!localComment.count()) {\n                _context9.next = 14;\n                break;\n              }\n              _context9.next = 12;\n              return localComment.update(data.comment);\n            case 12:\n              _context9.next = 18;\n              break;\n            case 14:\n              _context9.next = 16;\n              return app.database.table(\"notes-select\");\n            case 16:\n              _context9.next = 18;\n              return _context9.sent.insert(data.comment);\n            case 18:\n              commentArray.push(data.comment);\n              app.highlightComments.applyToPages(commentArray);\n              app.data.myEvents.emit(\"highlight:wsupdate\", data.comment);\n              if (data.comment.resolved) {\n                subtitle = \"Právě došlo k uzavření vlákna na textu <b> \" + data.comment.text + \" </b>\";\n                text = \"Vlákno uzavřeno\";\n                notificationCallbackOnClose = app.notification.create({\n                  icon: '<i class=\"icon demo-icon\">7</i>',\n                  title: \"Upozornění\",\n                  titleRightText: \"nyní\",\n                  subtitle: subtitle,\n                  text: text,\n                  closeOnClick: true,\n                  on: {\n                    click: function click() {\n                      var leftPanel = app.panel.get(\".panel-left\");\n                      leftPanel.open();\n                      var leftView = app.views.get($$(\".view-left\"));\n                      var path = \"/gc-list/\";\n                      leftView.router.navigate(path, {\n                        reloadCurrent: true,\n                        ignoreCache: true\n                      });\n                    }\n                  }\n                });\n                notificationCallbackOnClose.open();\n              }\n              return _context9.abrupt(\"return\", true);\n            case 23:\n            case \"end\":\n              return _context9.stop();\n          }\n        }, _callee9, this);\n      }));\n      function setWSHighlight(_x3) {\n        return _setWSHighlight.apply(this, arguments);\n      }\n      return setWSHighlight;\n    }()\n    /**\r\n     * Funkce ukládá komentáře zachycné z WS do lokální db.\r\n     * @param {object} data\r\n     *    Objekt s daty o komentářích z WS (book-comment - CommentGroupEvent)\r\n     */\n    )\n  }, {\n    key: \"setWSGroupComment\",\n    value: (function () {\n      var _setWSGroupComment = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee0(data, nm) {\n        var app, commentArray, localComment, parent, subtitle, text, notificationCallbackOnClose;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee0$(_context0) {\n          while (1) switch (_context0.prev = _context0.next) {\n            case 0:\n              app = this.app;\n              commentArray = [];\n              data.comment.js_id = parseInt(data.comment.js_id);\n              data.comment.parent_js_id = parseInt(data.comment.parent_js_id);\n              if (data.comment.user_id == app.user.identity.id) {\n                data.comment.readed = 1;\n              }\n              _context0.next = 7;\n              return app.database.table(\"notes-select-gc\");\n            case 7:\n              _context0.next = 9;\n              return _context0.sent.where(\"js_id\", data.comment.js_id);\n            case 9:\n              localComment = _context0.sent;\n              if (!localComment.count()) {\n                _context0.next = 15;\n                break;\n              }\n              _context0.next = 13;\n              return localComment.update(data.comment);\n            case 13:\n              _context0.next = 19;\n              break;\n            case 15:\n              _context0.next = 17;\n              return app.database.table(\"notes-select-gc\");\n            case 17:\n              _context0.next = 19;\n              return _context0.sent.insert(data.comment);\n            case 19:\n              commentArray.push(data.comment);\n              app.data.myEvents.emit(\"comment:wsupdate\", data.comment);\n              _context0.next = 23;\n              return app.database.table(\"notes-select\");\n            case 23:\n              _context0.next = 25;\n              return _context0.sent.where(\"js_id\", data.comment.parent_js_id).getValue();\n            case 25:\n              parent = _context0.sent;\n              if (!data.comment.readed && !parent[0].resolved) {\n                subtitle = \"Právě jste obdržel nový komentář\";\n                text = \"Nový komentář\";\n                notificationCallbackOnClose = app.notification.create({\n                  icon: '<i class=\"icon demo-icon\">7</i>',\n                  title: \"Upozornění\",\n                  titleRightText: \"nyní\",\n                  subtitle: subtitle,\n                  text: text,\n                  closeOnClick: true,\n                  on: {\n                    click: function click() {\n                      var leftPanel = app.panel.get(\".panel-left\");\n                      leftPanel.open();\n                      var leftView = app.views.get($$(\".view-left\"));\n                      var path = \"/gc-list/\";\n                      leftView.router.navigate(path, {\n                        reloadCurrent: true,\n                        ignoreCache: true\n                      });\n                    }\n                  }\n                });\n                notificationCallbackOnClose.open();\n              }\n            case 27:\n            case \"end\":\n              return _context0.stop();\n          }\n        }, _callee0, this);\n      }));\n      function setWSGroupComment(_x4, _x5) {\n        return _setWSGroupComment.apply(this, arguments);\n      }\n      return setWSGroupComment;\n    }()\n    /**\r\n     * Funkce pošle na server označení že je komentář přečtený a server rozešle na WS\r\n     * @param {object} data\r\n     *    Objekt s informacemi o přečtených komentářích\r\n     */\n    )\n  }, {\n    key: \"sendWSreaded\",\n    value: (function () {\n      var _sendWSreaded = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee1(data) {\n        var _this, app, ids, _iterator3, _step3, item, user, formData, response;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee1$(_context1) {\n          while (1) switch (_context1.prev = _context1.next) {\n            case 0:\n              _this = this;\n              app = this.app;\n              ids = [];\n              app.data.myEvents.emit(\"api:syncGroupComments\", data);\n              _iterator3 = _createForOfIteratorHelper(data);\n              try {\n                for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n                  item = _step3.value;\n                  ids.push(JSON.stringify(item.id));\n                }\n              } catch (err) {\n                _iterator3.e(err);\n              } finally {\n                _iterator3.f();\n              }\n              if (!(ids.length > 0)) {\n                _context1.next = 20;\n                break;\n              }\n              user = app.user;\n              formData = new FormData();\n              formData.append(\"comments_id\", JSON.stringify(ids));\n              _context1.prev = 10;\n              _context1.next = 13;\n              return app.utils.axios.post(app.apiManager.params.domainPath + \"/api/comments/group/readed\", formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 13:\n              response = _context1.sent;\n              _context1.next = 19;\n              break;\n            case 16:\n              _context1.prev = 16;\n              _context1.t0 = _context1[\"catch\"](10);\n              console.warn(\"ERROR API READED\", error);\n            case 19:\n              return _context1.abrupt(\"return\", true);\n            case 20:\n            case \"end\":\n              return _context1.stop();\n          }\n        }, _callee1, this, [[10, 16]]);\n      }));\n      function sendWSreaded(_x6) {\n        return _sendWSreaded.apply(this, arguments);\n      }\n      return sendWSreaded;\n    }())\n  }, {\n    key: \"markWSreaded\",\n    value: function () {\n      var _markWSreaded = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee10(data) {\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee10$(_context10) {\n          while (1) switch (_context10.prev = _context10.next) {\n            case 0:\n            case \"end\":\n              return _context10.stop();\n          }\n        }, _callee10);\n      }));\n      function markWSreaded(_x7) {\n        return _markWSreaded.apply(this, arguments);\n      }\n      return markWSreaded;\n    }()\n    /**\r\n     * Funkce slouží k získání dat o zvýraznění ze serveru, které nejsou v lokální db.\r\n     */\n  }, {\n    key: \"syncHighlights\",\n    value: (function () {\n      var _syncHighlights = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee11() {\n        var _this, app, user, ts, formData, response, serverComments, notes, _iterator4, _step4, item, serverComment, localComment;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee11$(_context11) {\n          while (1) switch (_context11.prev = _context11.next) {\n            case 0:\n              _this = this;\n              app = this.app;\n              user = app.user;\n              _context11.prev = 3;\n              _context11.next = 6;\n              return app.database.table(\"notes-select\");\n            case 6:\n              _context11.next = 8;\n              return _context11.sent.max(\"ts\");\n            case 8:\n              ts = _context11.sent;\n              formData = new FormData();\n              formData.append(\"timestamp\", ts);\n              formData.append(\"book_id\", app.id); //15 TODO app.id\n              _context11.next = 14;\n              return app.utils.axios.post(app.apiManager.params.psUrl + \"/api/comment/synchronization\", formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 14:\n              response = _context11.sent;\n              serverComments = response.data.data; // if (Array.isArray(serverComments)) {\n              //\n              //   // musí být použít forcyklus, jinak negunguje await při použití forEach\n              //   console.time('ZZZZZZZZZ')\n              //   for (const item of serverComments) {\n              //     let serverComment = item;\n              //     serverComment.js_id = parseInt(serverComment.js_id);\n              //     let localComment = await (\n              //       await app.database.table(\"notes-select\")\n              //     ).where(\"js_id\", serverComment.js_id);\n              //     if (localComment.count()) {\n              //       await localComment.update(serverComment);\n              //     } else {\n              //       await (await app.database.table(\"notes-select\")).insert(\n              //         serverComment\n              //       );\n              //     }\n              //   }\n              //   console.timeEnd('ZZZZZZZZZ')\n              //   app.highlightComments.applyToPages(serverComments);\n              //\n              // }\n              if (!(Array.isArray(serverComments) && serverComments.length)) {\n                _context11.next = 27;\n                break;\n              }\n              _context11.next = 19;\n              return app.database.table(\"notes-select\");\n            case 19:\n              _context11.next = 21;\n              return _context11.sent.getAll();\n            case 21:\n              notes = _context11.sent;\n              if (notes.length) {\n                _iterator4 = _createForOfIteratorHelper(serverComments);\n                try {\n                  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n                    item = _step4.value;\n                    serverComment = item;\n                    serverComment.js_id = parseInt(serverComment.js_id);\n                    localComment = _.find(notes, {\n                      js_id: serverComment.js_id\n                    });\n                    if (localComment && localComment.length) {\n                      localComment = serverComment;\n                    } else {\n                      notes.push(serverComment);\n                    }\n                  }\n                } catch (err) {\n                  _iterator4.e(err);\n                } finally {\n                  _iterator4.f();\n                }\n              } else {\n                notes = serverComments;\n              }\n              _context11.next = 25;\n              return app.database.table(\"notes-select\");\n            case 25:\n              _context11.sent.localForage.setItem(\"notes-select\", notes);\n              app.highlightComments.applyToPages(serverComments);\n            case 27:\n              return _context11.abrupt(\"return\", true);\n            case 30:\n              _context11.prev = 30;\n              _context11.t0 = _context11[\"catch\"](3);\n            case 32:\n            case \"end\":\n              return _context11.stop();\n          }\n        }, _callee11, this, [[3, 30]]);\n      }));\n      function syncHighlights() {\n        return _syncHighlights.apply(this, arguments);\n      }\n      return syncHighlights;\n    }()\n    /**\r\n     * Funkce slouží k odeslání informací o přečtení koementářů.\r\n     * @param {object} notes\r\n     *    Objekt s objekty koemntářů, které byly přečteny\r\n     */\n    )\n  }, {\n    key: \"markAsReaded\",\n    value: (function () {\n      var _markAsReaded = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee12(notes) {\n        var _this, app, user, formData, response;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee12$(_context12) {\n          while (1) switch (_context12.prev = _context12.next) {\n            case 0:\n              _this = this;\n              app = this.app;\n              if (!(notes && notes.length)) {\n                _context12.next = 5;\n                break;\n              }\n              _context12.next = 6;\n              break;\n            case 5:\n              return _context12.abrupt(\"return\", false);\n            case 6:\n              app.data.myEvents.emit(\"api:syncGroupComments\", notes);\n              user = app.user;\n              formData = new FormData();\n              formData.append(\"data\", JSON.stringify(notes));\n              _context12.next = 12;\n              return app.utils.axios.post(app.apiManager.params.psUrl + \"/api/comment/comment-group-readed\", formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 12:\n              response = _context12.sent;\n              return _context12.abrupt(\"return\", true);\n            case 14:\n            case \"end\":\n              return _context12.stop();\n          }\n        }, _callee12, this);\n      }));\n      function markAsReaded(_x8) {\n        return _markAsReaded.apply(this, arguments);\n      }\n      return markAsReaded;\n    }()\n    /**\r\n     * Funkce slouží k získání dat o komentářích ze serveru, které nejsou v lokální db.\r\n     */\n    )\n  }, {\n    key: \"syncGroupComments\",\n    value: (function () {\n      var _syncGroupComments = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee13() {\n        var showNotification, notificationCount, _this, app, user, ts, formData, response, serverComments, notes, _iterator5, _step5, item, serverComment, localComment, notificationText, notificationCallbackOnClose;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee13$(_context13) {\n          while (1) switch (_context13.prev = _context13.next) {\n            case 0:\n              // alert('sync');\n              showNotification = false;\n              notificationCount = 0;\n              _this = this;\n              app = this.app;\n              user = app.user; // try {\n              _context13.next = 7;\n              return app.database.table(\"notes-select-gc\");\n            case 7:\n              _context13.next = 9;\n              return _context13.sent.max(\"ts\");\n            case 9:\n              ts = _context13.sent;\n              formData = new FormData();\n              formData.append(\"timestamp\", ts);\n              formData.append(\"book_id\", app.id); //15 TODO app.id\n              // formData.append(\"data\", JSON.stringify(notes));\n              _context13.next = 15;\n              return app.utils.axios.post(app.apiManager.params.psUrl + \"/api/comment/synchronization-group\", formData, {\n                // withCredentials: true,\n                headers: {\n                  Authorization: \"Bearer \" + user.jwt,\n                  \"Content-Type\": \"multipart/form-data; boundary=BOUNDARY\"\n                }\n              });\n            case 15:\n              response = _context13.sent;\n              serverComments = response.data.data;\n              if (!(Array.isArray(serverComments) && serverComments.length)) {\n                _context13.next = 31;\n                break;\n              }\n              _context13.next = 20;\n              return app.database.table(\"notes-select-gc\");\n            case 20:\n              _context13.next = 22;\n              return _context13.sent.getAll();\n            case 22:\n              notes = _context13.sent;\n              _iterator5 = _createForOfIteratorHelper(serverComments);\n              try {\n                for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n                  item = _step5.value;\n                  serverComment = item;\n                  serverComment.js_id = parseInt(serverComment.js_id);\n                  localComment = _.find(notes, {\n                    js_id: serverComment.js_id\n                  });\n                  if (localComment && localComment.length) {\n                    // debugger\n                    localComment = serverComment;\n                  } else {\n                    // debugger\n\n                    notes.push(serverComment);\n                    if (user.identity.id !== serverComment.user && serverComment.readed === 0) {\n                      notificationCount++;\n                    }\n                  }\n                }\n              } catch (err) {\n                _iterator5.e(err);\n              } finally {\n                _iterator5.f();\n              }\n              _context13.next = 27;\n              return app.database.table(\"notes-select\");\n            case 27:\n              _context13.sent.localForage.setItem(\"notes-select-gc\", notes);\n              this.app.data.myEvents.emit(\"api:syncGroupComments\", serverComments);\n              // app.highlightComments.applyToPage(serverComments);\n              _context13.next = 32;\n              break;\n            case 31:\n              this.app.data.myEvents.emit(\"api:syncGroupComments\", []);\n            case 32:\n              if (notificationCount) {\n                if (notificationCount === 1) {\n                  notificationText = \"nový komentář\";\n                } else if (notificationCount === 2 || notificationCount === 3 || notificationCount === 4) {\n                  notificationText = \"nové komentáře\";\n                } else {\n                  notificationText = \"nových komentářů\";\n                }\n                notificationCallbackOnClose = app.notification.create({\n                  icon: '<i class=\"icon demo-icon\">7</i>',\n                  title: \"Upozornění\",\n                  titleRightText: \"now\",\n                  subtitle: \"V knize máte \" + notificationCount + \" \" + notificationText + \" .\",\n                  text: notificationText,\n                  closeOnClick: true,\n                  on: {\n                    close: function close() {\n                      var leftPanel = app.panel.get(\".panel-left\");\n                      leftPanel.open();\n                      var leftView = app.views.get($$(\".view-left\"));\n                      var path = \"/gc-list/\";\n                      leftView.router.navigate(path, {\n                        reloadCurrent: true,\n                        ignoreCache: true\n                      });\n                    }\n                  }\n                });\n                notificationCallbackOnClose.open();\n              }\n              return _context13.abrupt(\"return\", true);\n            case 34:\n            case \"end\":\n              return _context13.stop();\n          }\n        }, _callee13, this);\n      }));\n      function syncGroupComments() {\n        return _syncGroupComments.apply(this, arguments);\n      }\n      return syncGroupComments;\n    }())\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = (HcApi);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/hisghlight-comments-api.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/rangy-classapplier.js":
/*!***************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/rangy-classapplier.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Class Applier module for Rangy.\r\n * Adds, removes and toggles classes on Ranges and Selections\r\n *\r\n * Part of Rangy, a cross-browser JavaScript range and selection library\r\n * https://github.com/timdown/rangy\r\n *\r\n * Depends on Rangy core.\r\n *\r\n * Copyright 2015, Tim Down\r\n * Licensed under the MIT license.\r\n * Version: 1.3.0\r\n * Build date: 10 May 2015\r\n */\r\n(function (factory, root) {\r\n  if (true) {\r\n    // AMD. Register as an anonymous module with a dependency on Rangy.\r\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./rangy-core */ \"./src/core/custom_plugins/highlights-comments/rangy-core.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n  } else {}\r\n})(function (rangy) {\r\n  rangy.createModule(\r\n    \"ClassApplier\",\r\n    [\"WrappedSelection\"],\r\n    function (api, module) {\r\n      var dom = api.dom;\r\n      var DomPosition = dom.DomPosition;\r\n      var contains = dom.arrayContains;\r\n      var util = api.util;\r\n      var forEach = util.forEach;\r\n\r\n      var defaultTagName = \"span\";\r\n      var createElementNSSupported = util.isHostMethod(\r\n        document,\r\n        \"createElementNS\"\r\n      );\r\n\r\n      function each(obj, func) {\r\n        for (var i in obj) {\r\n          if (obj.hasOwnProperty(i)) {\r\n            if (func(i, obj[i]) === false) {\r\n              return false;\r\n            }\r\n          }\r\n        }\r\n        return true;\r\n      }\r\n\r\n      function trim(str) {\r\n        return str.replace(/^\\s\\s*/, \"\").replace(/\\s\\s*$/, \"\");\r\n      }\r\n\r\n      function classNameContainsClass(fullClassName, className) {\r\n        return (\r\n          !!fullClassName &&\r\n          new RegExp(\"(?:^|\\\\s)\" + className + \"(?:\\\\s|$)\").test(fullClassName)\r\n        );\r\n      }\r\n\r\n      // Inefficient, inelegant nonsense for IE's svg element, which has no classList and non-HTML className implementation\r\n      function hasClass(el, className) {\r\n        if (typeof el.classList == \"object\") {\r\n          return el.classList.contains(className);\r\n        } else {\r\n          var classNameSupported = typeof el.className == \"string\";\r\n          var elClass = classNameSupported\r\n            ? el.className\r\n            : el.getAttribute(\"class\");\r\n          return classNameContainsClass(elClass, className);\r\n        }\r\n      }\r\n\r\n      function addClass(el, className) {\r\n        if (typeof el.classList == \"object\") {\r\n          el.classList.add(className);\r\n        } else {\r\n          var classNameSupported = typeof el.className == \"string\";\r\n          var elClass = classNameSupported\r\n            ? el.className\r\n            : el.getAttribute(\"class\");\r\n          if (elClass) {\r\n            if (!classNameContainsClass(elClass, className)) {\r\n              elClass += \" \" + className;\r\n            }\r\n          } else {\r\n            elClass = className;\r\n          }\r\n          if (classNameSupported) {\r\n            el.className = elClass;\r\n          } else {\r\n            el.setAttribute(\"class\", elClass);\r\n          }\r\n        }\r\n      }\r\n\r\n      var removeClass = (function () {\r\n        function replacer(matched, whiteSpaceBefore, whiteSpaceAfter) {\r\n          return whiteSpaceBefore && whiteSpaceAfter ? \" \" : \"\";\r\n        }\r\n\r\n        return function (el, className) {\r\n          if (typeof el.classList == \"object\") {\r\n            el.classList.remove(className);\r\n          } else {\r\n            var classNameSupported = typeof el.className == \"string\";\r\n            var elClass = classNameSupported\r\n              ? el.className\r\n              : el.getAttribute(\"class\");\r\n            elClass = elClass.replace(\r\n              new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\"),\r\n              replacer\r\n            );\r\n            if (classNameSupported) {\r\n              el.className = elClass;\r\n            } else {\r\n              el.setAttribute(\"class\", elClass);\r\n            }\r\n          }\r\n        };\r\n      })();\r\n\r\n      function getClass(el) {\r\n        var classNameSupported = typeof el.className == \"string\";\r\n        return classNameSupported ? el.className : el.getAttribute(\"class\");\r\n      }\r\n\r\n      function sortClassName(className) {\r\n        return className && className.split(/\\s+/).sort().join(\" \");\r\n      }\r\n\r\n      function getSortedClassName(el) {\r\n        return sortClassName(getClass(el));\r\n      }\r\n\r\n      function haveSameClasses(el1, el2) {\r\n        return getSortedClassName(el1) == getSortedClassName(el2);\r\n      }\r\n\r\n      function hasAllClasses(el, className) {\r\n        var classes = className.split(/\\s+/);\r\n        for (var i = 0, len = classes.length; i < len; ++i) {\r\n          if (!hasClass(el, trim(classes[i]))) {\r\n            return false;\r\n          }\r\n        }\r\n        return true;\r\n      }\r\n\r\n      function canTextBeStyled(textNode) {\r\n        var parent = textNode.parentNode;\r\n        return (\r\n          parent &&\r\n          parent.nodeType == 1 &&\r\n          !/^(textarea|style|script|select|iframe)$/i.test(parent.nodeName)\r\n        );\r\n      }\r\n\r\n      function movePosition(\r\n        position,\r\n        oldParent,\r\n        oldIndex,\r\n        newParent,\r\n        newIndex\r\n      ) {\r\n        var posNode = position.node,\r\n          posOffset = position.offset;\r\n        var newNode = posNode,\r\n          newOffset = posOffset;\r\n\r\n        if (posNode == newParent && posOffset > newIndex) {\r\n          ++newOffset;\r\n        }\r\n\r\n        if (\r\n          posNode == oldParent &&\r\n          (posOffset == oldIndex || posOffset == oldIndex + 1)\r\n        ) {\r\n          newNode = newParent;\r\n          newOffset += newIndex - oldIndex;\r\n        }\r\n\r\n        if (posNode == oldParent && posOffset > oldIndex + 1) {\r\n          --newOffset;\r\n        }\r\n\r\n        position.node = newNode;\r\n        position.offset = newOffset;\r\n      }\r\n\r\n      function movePositionWhenRemovingNode(position, parentNode, index) {\r\n        if (position.node == parentNode && position.offset > index) {\r\n          --position.offset;\r\n        }\r\n      }\r\n\r\n      function movePreservingPositions(\r\n        node,\r\n        newParent,\r\n        newIndex,\r\n        positionsToPreserve\r\n      ) {\r\n        // For convenience, allow newIndex to be -1 to mean \"insert at the end\".\r\n        if (newIndex == -1) {\r\n          newIndex = newParent.childNodes.length;\r\n        }\r\n\r\n        var oldParent = node.parentNode;\r\n        var oldIndex = dom.getNodeIndex(node);\r\n\r\n        forEach(positionsToPreserve, function (position) {\r\n          movePosition(position, oldParent, oldIndex, newParent, newIndex);\r\n        });\r\n\r\n        // Now actually move the node.\r\n        if (newParent.childNodes.length == newIndex) {\r\n          newParent.appendChild(node);\r\n        } else {\r\n          newParent.insertBefore(node, newParent.childNodes[newIndex]);\r\n        }\r\n      }\r\n\r\n      function removePreservingPositions(node, positionsToPreserve) {\r\n        var oldParent = node.parentNode;\r\n        var oldIndex = dom.getNodeIndex(node);\r\n\r\n        forEach(positionsToPreserve, function (position) {\r\n          movePositionWhenRemovingNode(position, oldParent, oldIndex);\r\n        });\r\n\r\n        dom.removeNode(node);\r\n      }\r\n\r\n      function moveChildrenPreservingPositions(\r\n        node,\r\n        newParent,\r\n        newIndex,\r\n        removeNode,\r\n        positionsToPreserve\r\n      ) {\r\n        var child,\r\n          children = [];\r\n        while ((child = node.firstChild)) {\r\n          movePreservingPositions(\r\n            child,\r\n            newParent,\r\n            newIndex++,\r\n            positionsToPreserve\r\n          );\r\n          children.push(child);\r\n        }\r\n        if (removeNode) {\r\n          removePreservingPositions(node, positionsToPreserve);\r\n        }\r\n        return children;\r\n      }\r\n\r\n      function replaceWithOwnChildrenPreservingPositions(\r\n        element,\r\n        positionsToPreserve\r\n      ) {\r\n        return moveChildrenPreservingPositions(\r\n          element,\r\n          element.parentNode,\r\n          dom.getNodeIndex(element),\r\n          true,\r\n          positionsToPreserve\r\n        );\r\n      }\r\n\r\n      function rangeSelectsAnyText(range, textNode) {\r\n        var textNodeRange = range.cloneRange();\r\n        textNodeRange.selectNodeContents(textNode);\r\n\r\n        var intersectionRange = textNodeRange.intersection(range);\r\n        var text = intersectionRange ? intersectionRange.toString() : \"\";\r\n        // TS TODO přidáno trim\r\n        text = text.trim();\r\n        return text != \"\";\r\n      }\r\n\r\n      // TS TODO\r\n      function getEffectiveTextNodes(range) {\r\n        var nodes = range.getNodes([3]);\r\n\r\n        // Optimization as per issue 145\r\n\r\n        // Remove non-intersecting text nodes from the start of the range\r\n        var start = 0,\r\n          node;\r\n        while ((node = nodes[start]) && !rangeSelectsAnyText(range, node)) {\r\n          ++start;\r\n        }\r\n\r\n        // Remove non-intersecting text nodes from the start of the range\r\n        var end = nodes.length - 1;\r\n        while ((node = nodes[end]) && !rangeSelectsAnyText(range, node)) {\r\n          --end;\r\n        }\r\n\r\n        return nodes.slice(start, end + 1);\r\n      }\r\n\r\n      function elementsHaveSameNonClassAttributes(el1, el2) {\r\n        if (el1.attributes.length != el2.attributes.length) return false;\r\n        for (\r\n          var i = 0, len = el1.attributes.length, attr1, attr2, name;\r\n          i < len;\r\n          ++i\r\n        ) {\r\n          attr1 = el1.attributes[i];\r\n          name = attr1.name;\r\n          if (name != \"class\") {\r\n            attr2 = el2.attributes.getNamedItem(name);\r\n            if ((attr1 === null) != (attr2 === null)) return false;\r\n            if (attr1.specified != attr2.specified) return false;\r\n            if (attr1.specified && attr1.nodeValue !== attr2.nodeValue)\r\n              return false;\r\n          }\r\n        }\r\n        return true;\r\n      }\r\n\r\n      function elementHasNonClassAttributes(el, exceptions) {\r\n        for (var i = 0, len = el.attributes.length, attrName; i < len; ++i) {\r\n          attrName = el.attributes[i].name;\r\n          if (\r\n            !(exceptions && contains(exceptions, attrName)) &&\r\n            el.attributes[i].specified &&\r\n            attrName != \"class\"\r\n          ) {\r\n            return true;\r\n          }\r\n        }\r\n        return false;\r\n      }\r\n\r\n      var getComputedStyleProperty = dom.getComputedStyleProperty;\r\n      var isEditableElement = (function () {\r\n        var testEl = document.createElement(\"div\");\r\n        return typeof testEl.isContentEditable == \"boolean\"\r\n          ? function (node) {\r\n              return node && node.nodeType == 1 && node.isContentEditable;\r\n            }\r\n          : function (node) {\r\n              if (\r\n                !node ||\r\n                node.nodeType != 1 ||\r\n                node.contentEditable == \"false\"\r\n              ) {\r\n                return false;\r\n              }\r\n              return (\r\n                node.contentEditable == \"true\" ||\r\n                isEditableElement(node.parentNode)\r\n              );\r\n            };\r\n      })();\r\n\r\n      function isEditingHost(node) {\r\n        var parent;\r\n        return (\r\n          node &&\r\n          node.nodeType == 1 &&\r\n          (((parent = node.parentNode) &&\r\n            parent.nodeType == 9 &&\r\n            parent.designMode == \"on\") ||\r\n            (isEditableElement(node) && !isEditableElement(node.parentNode)))\r\n        );\r\n      }\r\n\r\n      function isEditable(node) {\r\n        return (\r\n          (isEditableElement(node) ||\r\n            (node.nodeType != 1 && isEditableElement(node.parentNode))) &&\r\n          !isEditingHost(node)\r\n        );\r\n      }\r\n\r\n      var inlineDisplayRegex = /^inline(-block|-table)?$/i;\r\n\r\n      function isNonInlineElement(node) {\r\n        return (\r\n          node &&\r\n          node.nodeType == 1 &&\r\n          !inlineDisplayRegex.test(getComputedStyleProperty(node, \"display\"))\r\n        );\r\n      }\r\n\r\n      // White space characters as defined by HTML 4 (http://www.w3.org/TR/html401/struct/text.html)\r\n      var htmlNonWhiteSpaceRegex = /[^\\r\\n\\t\\f \\u200B]/;\r\n\r\n      function isUnrenderedWhiteSpaceNode(node) {\r\n        if (node.data.length == 0) {\r\n          return true;\r\n        }\r\n        if (htmlNonWhiteSpaceRegex.test(node.data)) {\r\n          return false;\r\n        }\r\n        var cssWhiteSpace = getComputedStyleProperty(\r\n          node.parentNode,\r\n          \"whiteSpace\"\r\n        );\r\n        switch (cssWhiteSpace) {\r\n          case \"pre\":\r\n          case \"pre-wrap\":\r\n          case \"-moz-pre-wrap\":\r\n            return false;\r\n          case \"pre-line\":\r\n            if (/[\\r\\n]/.test(node.data)) {\r\n              return false;\r\n            }\r\n        }\r\n\r\n        // We now have a whitespace-only text node that may be rendered depending on its context. If it is adjacent to a\r\n        // non-inline element, it will not be rendered. This seems to be a good enough definition.\r\n        return (\r\n          isNonInlineElement(node.previousSibling) ||\r\n          isNonInlineElement(node.nextSibling)\r\n        );\r\n      }\r\n\r\n      function getRangeBoundaries(ranges) {\r\n        var positions = [],\r\n          i,\r\n          range;\r\n        for (i = 0; (range = ranges[i++]); ) {\r\n          positions.push(\r\n            new DomPosition(range.startContainer, range.startOffset),\r\n            new DomPosition(range.endContainer, range.endOffset)\r\n          );\r\n        }\r\n        return positions;\r\n      }\r\n\r\n      function updateRangesFromBoundaries(ranges, positions) {\r\n        for (var i = 0, range, start, end, len = ranges.length; i < len; ++i) {\r\n          range = ranges[i];\r\n          start = positions[i * 2];\r\n          end = positions[i * 2 + 1];\r\n          range.setStartAndEnd(start.node, start.offset, end.node, end.offset);\r\n        }\r\n      }\r\n\r\n      function isSplitPoint(node, offset) {\r\n        if (dom.isCharacterDataNode(node)) {\r\n          if (offset == 0) {\r\n            return !!node.previousSibling;\r\n          } else if (offset == node.length) {\r\n            return !!node.nextSibling;\r\n          } else {\r\n            return true;\r\n          }\r\n        }\r\n\r\n        return offset > 0 && offset < node.childNodes.length;\r\n      }\r\n\r\n      function splitNodeAt(\r\n        node,\r\n        descendantNode,\r\n        descendantOffset,\r\n        positionsToPreserve\r\n      ) {\r\n        var newNode, parentNode;\r\n        var splitAtStart = descendantOffset == 0;\r\n\r\n        if (dom.isAncestorOf(descendantNode, node)) {\r\n          return node;\r\n        }\r\n\r\n        if (dom.isCharacterDataNode(descendantNode)) {\r\n          var descendantIndex = dom.getNodeIndex(descendantNode);\r\n          if (descendantOffset == 0) {\r\n            descendantOffset = descendantIndex;\r\n          } else if (descendantOffset == descendantNode.length) {\r\n            descendantOffset = descendantIndex + 1;\r\n          } else {\r\n            throw module.createError(\r\n              \"splitNodeAt() should not be called with offset in the middle of a data node (\" +\r\n                descendantOffset +\r\n                \" in \" +\r\n                descendantNode.data\r\n            );\r\n          }\r\n          descendantNode = descendantNode.parentNode;\r\n        }\r\n\r\n        if (isSplitPoint(descendantNode, descendantOffset)) {\r\n          // descendantNode is now guaranteed not to be a text or other character node\r\n          newNode = descendantNode.cloneNode(false);\r\n          parentNode = descendantNode.parentNode;\r\n          if (newNode.id) {\r\n            newNode.removeAttribute(\"id\");\r\n          }\r\n          var child,\r\n            newChildIndex = 0;\r\n\r\n          while ((child = descendantNode.childNodes[descendantOffset])) {\r\n            movePreservingPositions(\r\n              child,\r\n              newNode,\r\n              newChildIndex++,\r\n              positionsToPreserve\r\n            );\r\n          }\r\n          movePreservingPositions(\r\n            newNode,\r\n            parentNode,\r\n            dom.getNodeIndex(descendantNode) + 1,\r\n            positionsToPreserve\r\n          );\r\n          return descendantNode == node\r\n            ? newNode\r\n            : splitNodeAt(\r\n                node,\r\n                parentNode,\r\n                dom.getNodeIndex(newNode),\r\n                positionsToPreserve\r\n              );\r\n        } else if (node != descendantNode) {\r\n          newNode = descendantNode.parentNode;\r\n\r\n          // Work out a new split point in the parent node\r\n          var newNodeIndex = dom.getNodeIndex(descendantNode);\r\n\r\n          if (!splitAtStart) {\r\n            newNodeIndex++;\r\n          }\r\n          return splitNodeAt(node, newNode, newNodeIndex, positionsToPreserve);\r\n        }\r\n        return node;\r\n      }\r\n\r\n      function areElementsMergeable(el1, el2) {\r\n        return (\r\n          el1.namespaceURI == el2.namespaceURI &&\r\n          el1.tagName.toLowerCase() == el2.tagName.toLowerCase() &&\r\n          haveSameClasses(el1, el2) &&\r\n          elementsHaveSameNonClassAttributes(el1, el2) &&\r\n          getComputedStyleProperty(el1, \"display\") == \"inline\" &&\r\n          getComputedStyleProperty(el2, \"display\") == \"inline\"\r\n        );\r\n      }\r\n\r\n      function createAdjacentMergeableTextNodeGetter(forward) {\r\n        var siblingPropName = forward ? \"nextSibling\" : \"previousSibling\";\r\n\r\n        return function (textNode, checkParentElement) {\r\n          var el = textNode.parentNode;\r\n          var adjacentNode = textNode[siblingPropName];\r\n          if (adjacentNode) {\r\n            // Can merge if the node's previous/next sibling is a text node\r\n            if (adjacentNode && adjacentNode.nodeType == 3) {\r\n              return adjacentNode;\r\n            }\r\n          } else if (checkParentElement) {\r\n            // Compare text node parent element with its sibling\r\n            adjacentNode = el[siblingPropName];\r\n            if (\r\n              adjacentNode &&\r\n              adjacentNode.nodeType == 1 &&\r\n              areElementsMergeable(el, adjacentNode)\r\n            ) {\r\n              var adjacentNodeChild =\r\n                adjacentNode[forward ? \"firstChild\" : \"lastChild\"];\r\n              if (adjacentNodeChild && adjacentNodeChild.nodeType == 3) {\r\n                return adjacentNodeChild;\r\n              }\r\n            }\r\n          }\r\n          return null;\r\n        };\r\n      }\r\n\r\n      var getPreviousMergeableTextNode =\r\n          createAdjacentMergeableTextNodeGetter(false),\r\n        getNextMergeableTextNode = createAdjacentMergeableTextNodeGetter(true);\r\n\r\n      function Merge(firstNode) {\r\n        this.isElementMerge = firstNode.nodeType == 1;\r\n        this.textNodes = [];\r\n        var firstTextNode = this.isElementMerge\r\n          ? firstNode.lastChild\r\n          : firstNode;\r\n        if (firstTextNode) {\r\n          this.textNodes[0] = firstTextNode;\r\n        }\r\n      }\r\n\r\n      Merge.prototype = {\r\n        doMerge: function (positionsToPreserve) {\r\n          var textNodes = this.textNodes;\r\n          var firstTextNode = textNodes[0];\r\n          if (textNodes.length > 1) {\r\n            var firstTextNodeIndex = dom.getNodeIndex(firstTextNode);\r\n            var textParts = [],\r\n              combinedTextLength = 0,\r\n              textNode,\r\n              parent;\r\n            forEach(textNodes, function (textNode, i) {\r\n              parent = textNode.parentNode;\r\n              if (i > 0) {\r\n                parent.removeChild(textNode);\r\n                if (!parent.hasChildNodes()) {\r\n                  dom.removeNode(parent);\r\n                }\r\n                if (positionsToPreserve) {\r\n                  forEach(positionsToPreserve, function (position) {\r\n                    // Handle case where position is inside the text node being merged into a preceding node\r\n                    if (position.node == textNode) {\r\n                      position.node = firstTextNode;\r\n                      position.offset += combinedTextLength;\r\n                    }\r\n                    // Handle case where both text nodes precede the position within the same parent node\r\n                    if (\r\n                      position.node == parent &&\r\n                      position.offset > firstTextNodeIndex\r\n                    ) {\r\n                      --position.offset;\r\n                      if (\r\n                        position.offset == firstTextNodeIndex + 1 &&\r\n                        i < len - 1\r\n                      ) {\r\n                        position.node = firstTextNode;\r\n                        position.offset = combinedTextLength;\r\n                      }\r\n                    }\r\n                  });\r\n                }\r\n              }\r\n              textParts[i] = textNode.data;\r\n              combinedTextLength += textNode.data.length;\r\n            });\r\n            firstTextNode.data = textParts.join(\"\");\r\n          }\r\n          return firstTextNode.data;\r\n        },\r\n\r\n        getLength: function () {\r\n          var i = this.textNodes.length,\r\n            len = 0;\r\n          while (i--) {\r\n            len += this.textNodes[i].length;\r\n          }\r\n          return len;\r\n        },\r\n\r\n        toString: function () {\r\n          var textParts = [];\r\n          forEach(this.textNodes, function (textNode, i) {\r\n            textParts[i] = \"'\" + textNode.data + \"'\";\r\n          });\r\n          return \"[Merge(\" + textParts.join(\",\") + \")]\";\r\n        },\r\n      };\r\n\r\n      var optionProperties = [\r\n        \"elementTagName\",\r\n        \"ignoreWhiteSpace\",\r\n        \"applyToEditableOnly\",\r\n        \"useExistingElements\",\r\n        \"removeEmptyElements\",\r\n        \"onElementCreate\",\r\n      ];\r\n\r\n      // TODO: Populate this with every attribute name that corresponds to a property with a different name. Really??\r\n      var attrNamesForProperties = {};\r\n\r\n      function ClassApplier(className, options, tagNames) {\r\n        var normalize,\r\n          i,\r\n          len,\r\n          propName,\r\n          applier = this;\r\n        applier.cssClass = applier.className = className; // cssClass property is for backward compatibility\r\n\r\n        var elementPropertiesFromOptions = null,\r\n          elementAttributes = {};\r\n\r\n        // Initialize from options object\r\n        if (typeof options == \"object\" && options !== null) {\r\n          if (typeof options.elementTagName !== \"undefined\") {\r\n            options.elementTagName = options.elementTagName.toLowerCase();\r\n          }\r\n          tagNames = options.tagNames;\r\n          elementPropertiesFromOptions = options.elementProperties;\r\n          elementAttributes = options.elementAttributes;\r\n\r\n          for (i = 0; (propName = optionProperties[i++]); ) {\r\n            if (options.hasOwnProperty(propName)) {\r\n              applier[propName] = options[propName];\r\n            }\r\n          }\r\n          normalize = options.normalize;\r\n        } else {\r\n          normalize = options;\r\n        }\r\n\r\n        // Backward compatibility: the second parameter can also be a Boolean indicating to normalize after unapplying\r\n        applier.normalize = typeof normalize == \"undefined\" ? true : normalize;\r\n\r\n        // Initialize element properties and attribute exceptions\r\n        applier.attrExceptions = [];\r\n        var el = document.createElement(applier.elementTagName);\r\n        applier.elementProperties = applier.copyPropertiesToElement(\r\n          elementPropertiesFromOptions,\r\n          el,\r\n          true\r\n        );\r\n        each(elementAttributes, function (attrName, attrValue) {\r\n          applier.attrExceptions.push(attrName);\r\n          // Ensure each attribute value is a string\r\n          elementAttributes[attrName] = \"\" + attrValue;\r\n        });\r\n        applier.elementAttributes = elementAttributes;\r\n\r\n        applier.elementSortedClassName =\r\n          applier.elementProperties.hasOwnProperty(\"className\")\r\n            ? sortClassName(\r\n                applier.elementProperties.className + \" \" + className\r\n              )\r\n            : className;\r\n\r\n        // Initialize tag names\r\n        applier.applyToAnyTagName = false;\r\n        var type = typeof tagNames;\r\n        if (type == \"string\") {\r\n          if (tagNames == \"*\") {\r\n            applier.applyToAnyTagName = true;\r\n          } else {\r\n            applier.tagNames = trim(tagNames.toLowerCase()).split(/\\s*,\\s*/);\r\n          }\r\n        } else if (type == \"object\" && typeof tagNames.length == \"number\") {\r\n          applier.tagNames = [];\r\n          for (i = 0, len = tagNames.length; i < len; ++i) {\r\n            if (tagNames[i] == \"*\") {\r\n              applier.applyToAnyTagName = true;\r\n            } else {\r\n              applier.tagNames.push(tagNames[i].toLowerCase());\r\n            }\r\n          }\r\n        } else {\r\n          applier.tagNames = [applier.elementTagName];\r\n        }\r\n      }\r\n\r\n      ClassApplier.prototype = {\r\n        elementTagName: defaultTagName,\r\n        elementProperties: {},\r\n        elementAttributes: {},\r\n        ignoreWhiteSpace: true,\r\n        applyToEditableOnly: false,\r\n        useExistingElements: true,\r\n        removeEmptyElements: true,\r\n        onElementCreate: null,\r\n\r\n        copyPropertiesToElement: function (props, el, createCopy) {\r\n          var s,\r\n            elStyle,\r\n            elProps = {},\r\n            elPropsStyle,\r\n            propValue,\r\n            elPropValue,\r\n            attrName;\r\n\r\n          for (var p in props) {\r\n            if (props.hasOwnProperty(p)) {\r\n              propValue = props[p];\r\n              elPropValue = el[p];\r\n\r\n              // Special case for class. The copied properties object has the applier's class as well as its own\r\n              // to simplify checks when removing styling elements\r\n              if (p == \"className\") {\r\n                addClass(el, propValue);\r\n                addClass(el, this.className);\r\n                el[p] = sortClassName(el[p]);\r\n                if (createCopy) {\r\n                  elProps[p] = propValue;\r\n                }\r\n              }\r\n\r\n              // Special case for style\r\n              else if (p == \"style\") {\r\n                elStyle = elPropValue;\r\n                if (createCopy) {\r\n                  elProps[p] = elPropsStyle = {};\r\n                }\r\n                for (s in props[p]) {\r\n                  if (props[p].hasOwnProperty(s)) {\r\n                    elStyle[s] = propValue[s];\r\n                    if (createCopy) {\r\n                      elPropsStyle[s] = elStyle[s];\r\n                    }\r\n                  }\r\n                }\r\n                this.attrExceptions.push(p);\r\n              } else {\r\n                el[p] = propValue;\r\n                // Copy the property back from the dummy element so that later comparisons to check whether\r\n                // elements may be removed are checking against the right value. For example, the href property\r\n                // of an element returns a fully qualified URL even if it was previously assigned a relative\r\n                // URL.\r\n                if (createCopy) {\r\n                  elProps[p] = el[p];\r\n\r\n                  // Not all properties map to identically-named attributes\r\n                  attrName = attrNamesForProperties.hasOwnProperty(p)\r\n                    ? attrNamesForProperties[p]\r\n                    : p;\r\n                  this.attrExceptions.push(attrName);\r\n                }\r\n              }\r\n            }\r\n          }\r\n\r\n          return createCopy ? elProps : \"\";\r\n        },\r\n\r\n        copyAttributesToElement: function (attrs, el) {\r\n          for (var attrName in attrs) {\r\n            if (\r\n              attrs.hasOwnProperty(attrName) &&\r\n              !/^class(?:Name)?$/i.test(attrName)\r\n            ) {\r\n              el.setAttribute(attrName, attrs[attrName]);\r\n            }\r\n          }\r\n        },\r\n\r\n        appliesToElement: function (el) {\r\n          return contains(this.tagNames, el.tagName.toLowerCase());\r\n        },\r\n\r\n        getEmptyElements: function (range) {\r\n          var applier = this;\r\n          return range.getNodes([1], function (el) {\r\n            return applier.appliesToElement(el) && !el.hasChildNodes();\r\n          });\r\n        },\r\n\r\n        hasClass: function (node) {\r\n          return (\r\n            node.nodeType == 1 &&\r\n            (this.applyToAnyTagName || this.appliesToElement(node)) &&\r\n            hasClass(node, this.className)\r\n          );\r\n        },\r\n\r\n        getSelfOrAncestorWithClass: function (node) {\r\n          while (node) {\r\n            if (this.hasClass(node)) {\r\n              return node;\r\n            }\r\n            node = node.parentNode;\r\n          }\r\n          return null;\r\n        },\r\n\r\n        isModifiable: function (node) {\r\n          return !this.applyToEditableOnly || isEditable(node);\r\n        },\r\n\r\n        // White space adjacent to an unwrappable node can be ignored for wrapping\r\n        isIgnorableWhiteSpaceNode: function (node) {\r\n          return (\r\n            this.ignoreWhiteSpace &&\r\n            node &&\r\n            node.nodeType == 3 &&\r\n            isUnrenderedWhiteSpaceNode(node)\r\n          );\r\n        },\r\n\r\n        // Normalizes nodes after applying a class to a Range.\r\n        postApply: function (textNodes, range, positionsToPreserve, isUndo) {\r\n          var firstNode = textNodes[0],\r\n            lastNode = textNodes[textNodes.length - 1];\r\n\r\n          var merges = [],\r\n            currentMerge;\r\n\r\n          var rangeStartNode = firstNode,\r\n            rangeEndNode = lastNode;\r\n          var rangeStartOffset = 0,\r\n            rangeEndOffset = lastNode.length;\r\n\r\n          var textNode, precedingTextNode;\r\n\r\n          // Check for every required merge and create a Merge object for each\r\n          forEach(textNodes, function (textNode) {\r\n            precedingTextNode = getPreviousMergeableTextNode(textNode, !isUndo);\r\n            if (precedingTextNode) {\r\n              if (!currentMerge) {\r\n                currentMerge = new Merge(precedingTextNode);\r\n                merges.push(currentMerge);\r\n              }\r\n              currentMerge.textNodes.push(textNode);\r\n              if (textNode === firstNode) {\r\n                rangeStartNode = currentMerge.textNodes[0];\r\n                rangeStartOffset = rangeStartNode.length;\r\n              }\r\n              if (textNode === lastNode) {\r\n                rangeEndNode = currentMerge.textNodes[0];\r\n                rangeEndOffset = currentMerge.getLength();\r\n              }\r\n            } else {\r\n              currentMerge = null;\r\n            }\r\n          });\r\n\r\n          // Test whether the first node after the range needs merging\r\n          var nextTextNode = getNextMergeableTextNode(lastNode, !isUndo);\r\n\r\n          if (nextTextNode) {\r\n            if (!currentMerge) {\r\n              currentMerge = new Merge(lastNode);\r\n              merges.push(currentMerge);\r\n            }\r\n            currentMerge.textNodes.push(nextTextNode);\r\n          }\r\n\r\n          // Apply the merges\r\n          if (merges.length) {\r\n            for (i = 0, len = merges.length; i < len; ++i) {\r\n              merges[i].doMerge(positionsToPreserve);\r\n            }\r\n\r\n            // Set the range boundaries\r\n            range.setStartAndEnd(\r\n              rangeStartNode,\r\n              rangeStartOffset,\r\n              rangeEndNode,\r\n              rangeEndOffset\r\n            );\r\n          }\r\n        },\r\n\r\n        createContainer: function (parentNode) {\r\n          var doc = dom.getDocument(parentNode);\r\n          var namespace;\r\n          var el =\r\n            createElementNSSupported &&\r\n            !dom.isHtmlNamespace(parentNode) &&\r\n            (namespace = parentNode.namespaceURI)\r\n              ? doc.createElementNS(\r\n                  parentNode.namespaceURI,\r\n                  this.elementTagName\r\n                )\r\n              : doc.createElement(this.elementTagName);\r\n\r\n          this.copyPropertiesToElement(this.elementProperties, el, false);\r\n          this.copyAttributesToElement(this.elementAttributes, el);\r\n          addClass(el, this.className);\r\n          if (this.onElementCreate) {\r\n            this.onElementCreate(el, this);\r\n          }\r\n          return el;\r\n        },\r\n\r\n        elementHasProperties: function (el, props) {\r\n          var applier = this;\r\n          return each(props, function (p, propValue) {\r\n            if (p == \"className\") {\r\n              // For checking whether we should reuse an existing element, we just want to check that the element\r\n              // has all the classes specified in the className property. When deciding whether the element is\r\n              // removable when unapplying a class, there is separate special handling to check whether the\r\n              // element has extra classes so the same simple check will do.\r\n              return hasAllClasses(el, propValue);\r\n            } else if (typeof propValue == \"object\") {\r\n              if (!applier.elementHasProperties(el[p], propValue)) {\r\n                return false;\r\n              }\r\n            } else if (el[p] !== propValue) {\r\n              return false;\r\n            }\r\n          });\r\n        },\r\n\r\n        elementHasAttributes: function (el, attrs) {\r\n          return each(attrs, function (name, value) {\r\n            if (el.getAttribute(name) !== value) {\r\n              return false;\r\n            }\r\n          });\r\n        },\r\n\r\n        applyToTextNode: function (textNode, positionsToPreserve) {\r\n          // Check whether the text node can be styled. Text within a <style> or <script> element, for example,\r\n          // should not be styled. See issue 283.\r\n          if (canTextBeStyled(textNode)) {\r\n            var parent = textNode.parentNode;\r\n            if (\r\n              parent.childNodes.length == 1 &&\r\n              this.useExistingElements &&\r\n              this.appliesToElement(parent) &&\r\n              this.elementHasProperties(parent, this.elementProperties) &&\r\n              this.elementHasAttributes(parent, this.elementAttributes)\r\n            ) {\r\n              addClass(parent, this.className);\r\n            } else {\r\n              var textNodeParent = textNode.parentNode;\r\n              var el = this.createContainer(textNodeParent);\r\n              textNodeParent.insertBefore(el, textNode);\r\n              el.appendChild(textNode);\r\n            }\r\n          }\r\n        },\r\n\r\n        isRemovable: function (el) {\r\n          return (\r\n            el.tagName.toLowerCase() == this.elementTagName &&\r\n            getSortedClassName(el) == this.elementSortedClassName &&\r\n            this.elementHasProperties(el, this.elementProperties) &&\r\n            !elementHasNonClassAttributes(el, this.attrExceptions) &&\r\n            this.elementHasAttributes(el, this.elementAttributes) &&\r\n            this.isModifiable(el)\r\n          );\r\n        },\r\n\r\n        isEmptyContainer: function (el) {\r\n          var childNodeCount = el.childNodes.length;\r\n          return (\r\n            el.nodeType == 1 &&\r\n            this.isRemovable(el) &&\r\n            (childNodeCount == 0 ||\r\n              (childNodeCount == 1 && this.isEmptyContainer(el.firstChild)))\r\n          );\r\n        },\r\n\r\n        removeEmptyContainers: function (range) {\r\n          var applier = this;\r\n          var nodesToRemove = range.getNodes([1], function (el) {\r\n            return applier.isEmptyContainer(el);\r\n          });\r\n\r\n          var rangesToPreserve = [range];\r\n          var positionsToPreserve = getRangeBoundaries(rangesToPreserve);\r\n\r\n          forEach(nodesToRemove, function (node) {\r\n            removePreservingPositions(node, positionsToPreserve);\r\n          });\r\n\r\n          // Update the range from the preserved boundary positions\r\n          updateRangesFromBoundaries(rangesToPreserve, positionsToPreserve);\r\n        },\r\n\r\n        undoToTextNode: function (\r\n          textNode,\r\n          range,\r\n          ancestorWithClass,\r\n          positionsToPreserve\r\n        ) {\r\n          if (!range.containsNode(ancestorWithClass)) {\r\n            // Split out the portion of the ancestor from which we can remove the class\r\n            //var parent = ancestorWithClass.parentNode, index = dom.getNodeIndex(ancestorWithClass);\r\n            var ancestorRange = range.cloneRange();\r\n            ancestorRange.selectNode(ancestorWithClass);\r\n            if (\r\n              ancestorRange.isPointInRange(range.endContainer, range.endOffset)\r\n            ) {\r\n              splitNodeAt(\r\n                ancestorWithClass,\r\n                range.endContainer,\r\n                range.endOffset,\r\n                positionsToPreserve\r\n              );\r\n              range.setEndAfter(ancestorWithClass);\r\n            }\r\n            if (\r\n              ancestorRange.isPointInRange(\r\n                range.startContainer,\r\n                range.startOffset\r\n              )\r\n            ) {\r\n              ancestorWithClass = splitNodeAt(\r\n                ancestorWithClass,\r\n                range.startContainer,\r\n                range.startOffset,\r\n                positionsToPreserve\r\n              );\r\n            }\r\n          }\r\n\r\n          if (this.isRemovable(ancestorWithClass)) {\r\n            replaceWithOwnChildrenPreservingPositions(\r\n              ancestorWithClass,\r\n              positionsToPreserve\r\n            );\r\n          } else {\r\n            removeClass(ancestorWithClass, this.className);\r\n          }\r\n        },\r\n\r\n        splitAncestorWithClass: function (\r\n          container,\r\n          offset,\r\n          positionsToPreserve\r\n        ) {\r\n          var ancestorWithClass = this.getSelfOrAncestorWithClass(container);\r\n          if (ancestorWithClass) {\r\n            splitNodeAt(\r\n              ancestorWithClass,\r\n              container,\r\n              offset,\r\n              positionsToPreserve\r\n            );\r\n          }\r\n        },\r\n\r\n        undoToAncestor: function (ancestorWithClass, positionsToPreserve) {\r\n          if (this.isRemovable(ancestorWithClass)) {\r\n            replaceWithOwnChildrenPreservingPositions(\r\n              ancestorWithClass,\r\n              positionsToPreserve\r\n            );\r\n          } else {\r\n            removeClass(ancestorWithClass, this.className);\r\n          }\r\n        },\r\n\r\n        applyToRange: function (range, rangesToPreserve) {\r\n          var applier = this;\r\n          rangesToPreserve = rangesToPreserve || [];\r\n\r\n          // Create an array of range boundaries to preserve\r\n          var positionsToPreserve = getRangeBoundaries(rangesToPreserve || []);\r\n\r\n          range.splitBoundariesPreservingPositions(positionsToPreserve);\r\n\r\n          // Tidy up the DOM by removing empty containers\r\n\r\n          if (applier.removeEmptyElements) {\r\n            applier.removeEmptyContainers(range);\r\n          }\r\n\r\n          var textNodes = getEffectiveTextNodes(range);\r\n\r\n          if (textNodes.length) {\r\n            forEach(textNodes, function (textNode) {\r\n              if (\r\n                !applier.isIgnorableWhiteSpaceNode(textNode) &&\r\n                !applier.getSelfOrAncestorWithClass(textNode) &&\r\n                applier.isModifiable(textNode)\r\n              ) {\r\n                applier.applyToTextNode(textNode, positionsToPreserve);\r\n              }\r\n            });\r\n            var lastTextNode = textNodes[textNodes.length - 1];\r\n            range.setStartAndEnd(\r\n              textNodes[0],\r\n              0,\r\n              lastTextNode,\r\n              lastTextNode.length\r\n            );\r\n            if (applier.normalize) {\r\n              applier.postApply(textNodes, range, positionsToPreserve, false);\r\n            }\r\n\r\n            // Update the ranges from the preserved boundary positions\r\n            updateRangesFromBoundaries(rangesToPreserve, positionsToPreserve);\r\n          }\r\n\r\n          // Apply classes to any appropriate empty elements\r\n          var emptyElements = applier.getEmptyElements(range);\r\n\r\n          forEach(emptyElements, function (el) {\r\n            addClass(el, applier.className);\r\n          });\r\n        },\r\n\r\n        applyToRanges: function (ranges) {\r\n          var i = ranges.length;\r\n          while (i--) {\r\n            this.applyToRange(ranges[i], ranges);\r\n          }\r\n\r\n          return ranges;\r\n        },\r\n\r\n        applyToSelection: function (win) {\r\n          var sel = api.getSelection(win);\r\n          sel.setRanges(this.applyToRanges(sel.getAllRanges()));\r\n        },\r\n\r\n        undoToRange: function (range, rangesToPreserve) {\r\n          var applier = this;\r\n          // Create an array of range boundaries to preserve\r\n          rangesToPreserve = rangesToPreserve || [];\r\n          var positionsToPreserve = getRangeBoundaries(rangesToPreserve);\r\n\r\n          range.splitBoundariesPreservingPositions(positionsToPreserve);\r\n\r\n          // Tidy up the DOM by removing empty containers\r\n          if (applier.removeEmptyElements) {\r\n            applier.removeEmptyContainers(range, positionsToPreserve);\r\n          }\r\n\r\n          var textNodes = getEffectiveTextNodes(range);\r\n          var textNode, ancestorWithClass;\r\n          var lastTextNode = textNodes[textNodes.length - 1];\r\n\r\n          if (textNodes.length) {\r\n            applier.splitAncestorWithClass(\r\n              range.endContainer,\r\n              range.endOffset,\r\n              positionsToPreserve\r\n            );\r\n            applier.splitAncestorWithClass(\r\n              range.startContainer,\r\n              range.startOffset,\r\n              positionsToPreserve\r\n            );\r\n            for (var i = 0, len = textNodes.length; i < len; ++i) {\r\n              textNode = textNodes[i];\r\n              ancestorWithClass = applier.getSelfOrAncestorWithClass(textNode);\r\n              if (ancestorWithClass && applier.isModifiable(textNode)) {\r\n                applier.undoToAncestor(ancestorWithClass, positionsToPreserve);\r\n              }\r\n            }\r\n            // Ensure the range is still valid\r\n            range.setStartAndEnd(\r\n              textNodes[0],\r\n              0,\r\n              lastTextNode,\r\n              lastTextNode.length\r\n            );\r\n\r\n            if (applier.normalize) {\r\n              applier.postApply(textNodes, range, positionsToPreserve, true);\r\n            }\r\n\r\n            // Update the ranges from the preserved boundary positions\r\n            updateRangesFromBoundaries(rangesToPreserve, positionsToPreserve);\r\n          }\r\n\r\n          // Remove class from any appropriate empty elements\r\n          var emptyElements = applier.getEmptyElements(range);\r\n\r\n          forEach(emptyElements, function (el) {\r\n            removeClass(el, applier.className);\r\n          });\r\n        },\r\n\r\n        undoToRanges: function (ranges) {\r\n          // Get ranges returned in document order\r\n          var i = ranges.length;\r\n\r\n          while (i--) {\r\n            this.undoToRange(ranges[i], ranges);\r\n          }\r\n\r\n          return ranges;\r\n        },\r\n\r\n        undoToSelection: function (win) {\r\n          var sel = api.getSelection(win);\r\n          var ranges = api.getSelection(win).getAllRanges();\r\n          this.undoToRanges(ranges);\r\n          sel.setRanges(ranges);\r\n        },\r\n\r\n        isAppliedToRange: function (range) {\r\n          if (range.collapsed || range.toString() == \"\") {\r\n            return !!this.getSelfOrAncestorWithClass(\r\n              range.commonAncestorContainer\r\n            );\r\n          } else {\r\n            var textNodes = range.getNodes([3]);\r\n            if (textNodes.length)\r\n              for (var i = 0, textNode; (textNode = textNodes[i++]); ) {\r\n                if (\r\n                  !this.isIgnorableWhiteSpaceNode(textNode) &&\r\n                  rangeSelectsAnyText(range, textNode) &&\r\n                  this.isModifiable(textNode) &&\r\n                  !this.getSelfOrAncestorWithClass(textNode)\r\n                ) {\r\n                  return false;\r\n                }\r\n              }\r\n            return true;\r\n          }\r\n        },\r\n\r\n        isAppliedToRanges: function (ranges) {\r\n          var i = ranges.length;\r\n          if (i == 0) {\r\n            return false;\r\n          }\r\n          while (i--) {\r\n            if (!this.isAppliedToRange(ranges[i])) {\r\n              return false;\r\n            }\r\n          }\r\n          return true;\r\n        },\r\n\r\n        isAppliedToSelection: function (win) {\r\n          var sel = api.getSelection(win);\r\n          return this.isAppliedToRanges(sel.getAllRanges());\r\n        },\r\n\r\n        toggleRange: function (range) {\r\n          if (this.isAppliedToRange(range)) {\r\n            this.undoToRange(range);\r\n          } else {\r\n            this.applyToRange(range);\r\n          }\r\n        },\r\n\r\n        toggleSelection: function (win) {\r\n          if (this.isAppliedToSelection(win)) {\r\n            this.undoToSelection(win);\r\n          } else {\r\n            this.applyToSelection(win);\r\n          }\r\n        },\r\n\r\n        getElementsWithClassIntersectingRange: function (range) {\r\n          var elements = [];\r\n          var applier = this;\r\n          range.getNodes([3], function (textNode) {\r\n            var el = applier.getSelfOrAncestorWithClass(textNode);\r\n            if (el && !contains(elements, el)) {\r\n              elements.push(el);\r\n            }\r\n          });\r\n          return elements;\r\n        },\r\n\r\n        detach: function () {},\r\n      };\r\n\r\n      function createClassApplier(className, options, tagNames) {\r\n        return new ClassApplier(className, options, tagNames);\r\n      }\r\n\r\n      ClassApplier.util = {\r\n        hasClass: hasClass,\r\n        addClass: addClass,\r\n        removeClass: removeClass,\r\n        getClass: getClass,\r\n        hasSameClasses: haveSameClasses,\r\n        hasAllClasses: hasAllClasses,\r\n        replaceWithOwnChildren: replaceWithOwnChildrenPreservingPositions,\r\n        elementsHaveSameNonClassAttributes: elementsHaveSameNonClassAttributes,\r\n        elementHasNonClassAttributes: elementHasNonClassAttributes,\r\n        splitNodeAt: splitNodeAt,\r\n        isEditableElement: isEditableElement,\r\n        isEditingHost: isEditingHost,\r\n        isEditable: isEditable,\r\n      };\r\n\r\n      api.CssClassApplier = api.ClassApplier = ClassApplier;\r\n      api.createClassApplier = createClassApplier;\r\n      util.createAliasForDeprecatedMethod(\r\n        api,\r\n        \"createCssClassApplier\",\r\n        \"createClassApplier\",\r\n        module\r\n      );\r\n    }\r\n  );\r\n\r\n  return rangy;\r\n}, this);\r\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/rangy-classapplier.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/rangy-core.js":
/*!*******************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/rangy-core.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Rangy, a cross-browser JavaScript range and selection library\r\n * https://github.com/timdown/rangy\r\n *\r\n * Copyright 2015, Tim Down\r\n * Licensed under the MIT license.\r\n * Version: 1.3.0\r\n * Build date: 10 May 2015\r\n */\r\n\r\n(function (factory, root) {\r\n  if (true) {\r\n    // AMD. Register as an anonymous module.\r\n    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n  } else {}\r\n})(function () {\r\n  var OBJECT = \"object\",\r\n    FUNCTION = \"function\",\r\n    UNDEFINED = \"undefined\";\r\n\r\n  // Minimal set of properties required for DOM Level 2 Range compliance. Comparison constants such as START_TO_START\r\n  // are omitted because ranges in KHTML do not have them but otherwise work perfectly well. See issue 113.\r\n  var domRangeProperties = [\r\n    \"startContainer\",\r\n    \"startOffset\",\r\n    \"endContainer\",\r\n    \"endOffset\",\r\n    \"collapsed\",\r\n    \"commonAncestorContainer\",\r\n  ];\r\n\r\n  // Minimal set of methods required for DOM Level 2 Range compliance\r\n  var domRangeMethods = [\r\n    \"setStart\",\r\n    \"setStartBefore\",\r\n    \"setStartAfter\",\r\n    \"setEnd\",\r\n    \"setEndBefore\",\r\n    \"setEndAfter\",\r\n    \"collapse\",\r\n    \"selectNode\",\r\n    \"selectNodeContents\",\r\n    \"compareBoundaryPoints\",\r\n    \"deleteContents\",\r\n    \"extractContents\",\r\n    \"cloneContents\",\r\n    \"insertNode\",\r\n    \"surroundContents\",\r\n    \"cloneRange\",\r\n    \"toString\",\r\n    \"detach\",\r\n  ];\r\n\r\n  var textRangeProperties = [\r\n    \"boundingHeight\",\r\n    \"boundingLeft\",\r\n    \"boundingTop\",\r\n    \"boundingWidth\",\r\n    \"htmlText\",\r\n    \"text\",\r\n  ];\r\n\r\n  // Subset of TextRange's full set of methods that we're interested in\r\n  var textRangeMethods = [\r\n    \"collapse\",\r\n    \"compareEndPoints\",\r\n    \"duplicate\",\r\n    \"moveToElementText\",\r\n    \"parentElement\",\r\n    \"select\",\r\n    \"setEndPoint\",\r\n    \"getBoundingClientRect\",\r\n  ];\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // Trio of functions taken from Peter Michaux's article:\r\n  // http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting\r\n  function isHostMethod(o, p) {\r\n    var t = typeof o[p];\r\n    return t == FUNCTION || !!(t == OBJECT && o[p]) || t == \"unknown\";\r\n  }\r\n\r\n  function isHostObject(o, p) {\r\n    return !!(typeof o[p] == OBJECT && o[p]);\r\n  }\r\n\r\n  function isHostProperty(o, p) {\r\n    return typeof o[p] != UNDEFINED;\r\n  }\r\n\r\n  // Creates a convenience function to save verbose repeated calls to tests functions\r\n  function createMultiplePropertyTest(testFunc) {\r\n    return function (o, props) {\r\n      var i = props.length;\r\n      while (i--) {\r\n        if (!testFunc(o, props[i])) {\r\n          return false;\r\n        }\r\n      }\r\n      return true;\r\n    };\r\n  }\r\n\r\n  // Next trio of functions are a convenience to save verbose repeated calls to previous two functions\r\n  var areHostMethods = createMultiplePropertyTest(isHostMethod);\r\n  var areHostObjects = createMultiplePropertyTest(isHostObject);\r\n  var areHostProperties = createMultiplePropertyTest(isHostProperty);\r\n\r\n  function isTextRange(range) {\r\n    return (\r\n      range &&\r\n      areHostMethods(range, textRangeMethods) &&\r\n      areHostProperties(range, textRangeProperties)\r\n    );\r\n  }\r\n\r\n  function getBody(doc) {\r\n    return isHostObject(doc, \"body\")\r\n      ? doc.body\r\n      : doc.getElementsByTagName(\"body\")[0];\r\n  }\r\n\r\n  var forEach = [].forEach\r\n    ? function (arr, func) {\r\n        arr.forEach(func);\r\n      }\r\n    : function (arr, func) {\r\n        for (var i = 0, len = arr.length; i < len; ++i) {\r\n          func(arr[i], i);\r\n        }\r\n      };\r\n\r\n  var modules = {};\r\n\r\n  var isBrowser = typeof window != UNDEFINED && typeof document != UNDEFINED;\r\n\r\n  var util = {\r\n    isHostMethod: isHostMethod,\r\n    isHostObject: isHostObject,\r\n    isHostProperty: isHostProperty,\r\n    areHostMethods: areHostMethods,\r\n    areHostObjects: areHostObjects,\r\n    areHostProperties: areHostProperties,\r\n    isTextRange: isTextRange,\r\n    getBody: getBody,\r\n    forEach: forEach,\r\n  };\r\n\r\n  var api = {\r\n    version: \"1.3.0\",\r\n    initialized: false,\r\n    isBrowser: isBrowser,\r\n    supported: true,\r\n    util: util,\r\n    features: {},\r\n    modules: modules,\r\n    config: {\r\n      alertOnFail: false,\r\n      alertOnWarn: false,\r\n      preferTextRange: false,\r\n      autoInitialize:\r\n        typeof rangyAutoInitialize == UNDEFINED ? true : rangyAutoInitialize,\r\n    },\r\n  };\r\n\r\n  function consoleLog(msg) {\r\n    if (typeof console != UNDEFINED && isHostMethod(console, \"log\")) {\r\n    }\r\n  }\r\n\r\n  function alertOrLog(msg, shouldAlert) {\r\n    if (isBrowser && shouldAlert) {\r\n      alert(msg);\r\n    } else {\r\n      consoleLog(msg);\r\n    }\r\n  }\r\n\r\n  function fail(reason) {\r\n    api.initialized = true;\r\n    api.supported = false;\r\n    alertOrLog(\r\n      \"Rangy is not supported in this environment. Reason: \" + reason,\r\n      api.config.alertOnFail\r\n    );\r\n  }\r\n\r\n  api.fail = fail;\r\n\r\n  function warn(msg) {\r\n    alertOrLog(\"Rangy warning: \" + msg, api.config.alertOnWarn);\r\n  }\r\n\r\n  api.warn = warn;\r\n\r\n  // Add utility extend() method\r\n  var extend;\r\n  if ({}.hasOwnProperty) {\r\n    util.extend = extend = function (obj, props, deep) {\r\n      var o, p;\r\n      for (var i in props) {\r\n        if (props.hasOwnProperty(i)) {\r\n          o = obj[i];\r\n          p = props[i];\r\n          if (\r\n            deep &&\r\n            o !== null &&\r\n            typeof o == \"object\" &&\r\n            p !== null &&\r\n            typeof p == \"object\"\r\n          ) {\r\n            extend(o, p, true);\r\n          }\r\n          obj[i] = p;\r\n        }\r\n      }\r\n      // Special case for toString, which does not show up in for...in loops in IE <= 8\r\n      if (props.hasOwnProperty(\"toString\")) {\r\n        obj.toString = props.toString;\r\n      }\r\n      return obj;\r\n    };\r\n\r\n    util.createOptions = function (optionsParam, defaults) {\r\n      var options = {};\r\n      extend(options, defaults);\r\n      if (optionsParam) {\r\n        extend(options, optionsParam);\r\n      }\r\n      return options;\r\n    };\r\n  } else {\r\n    fail(\"hasOwnProperty not supported\");\r\n  }\r\n\r\n  // Test whether we're in a browser and bail out if not\r\n  if (!isBrowser) {\r\n    fail(\"Rangy can only run in a browser\");\r\n  }\r\n\r\n  // Test whether Array.prototype.slice can be relied on for NodeLists and use an alternative toArray() if not\r\n  (function () {\r\n    var toArray;\r\n\r\n    if (isBrowser) {\r\n      var el = document.createElement(\"div\");\r\n      el.appendChild(document.createElement(\"span\"));\r\n      var slice = [].slice;\r\n      try {\r\n        if (slice.call(el.childNodes, 0)[0].nodeType == 1) {\r\n          toArray = function (arrayLike) {\r\n            return slice.call(arrayLike, 0);\r\n          };\r\n        }\r\n      } catch (e) {}\r\n    }\r\n\r\n    if (!toArray) {\r\n      toArray = function (arrayLike) {\r\n        var arr = [];\r\n        for (var i = 0, len = arrayLike.length; i < len; ++i) {\r\n          arr[i] = arrayLike[i];\r\n        }\r\n        return arr;\r\n      };\r\n    }\r\n\r\n    util.toArray = toArray;\r\n  })();\r\n\r\n  // Very simple event handler wrapper function that doesn't attempt to solve issues such as \"this\" handling or\r\n  // normalization of event properties\r\n  var addListener;\r\n  if (isBrowser) {\r\n    if (isHostMethod(document, \"addEventListener\")) {\r\n      addListener = function (obj, eventType, listener) {\r\n        obj.addEventListener(eventType, listener, false);\r\n      };\r\n    } else if (isHostMethod(document, \"attachEvent\")) {\r\n      addListener = function (obj, eventType, listener) {\r\n        obj.attachEvent(\"on\" + eventType, listener);\r\n      };\r\n    } else {\r\n      fail(\r\n        \"Document does not have required addEventListener or attachEvent method\"\r\n      );\r\n    }\r\n\r\n    util.addListener = addListener;\r\n  }\r\n\r\n  var initListeners = [];\r\n\r\n  function getErrorDesc(ex) {\r\n    return ex.message || ex.description || String(ex);\r\n  }\r\n\r\n  // Initialization\r\n  function init() {\r\n    if (!isBrowser || api.initialized) {\r\n      return;\r\n    }\r\n    var testRange;\r\n    var implementsDomRange = false,\r\n      implementsTextRange = false;\r\n\r\n    // First, perform basic feature tests\r\n\r\n    if (isHostMethod(document, \"createRange\")) {\r\n      testRange = document.createRange();\r\n      if (\r\n        areHostMethods(testRange, domRangeMethods) &&\r\n        areHostProperties(testRange, domRangeProperties)\r\n      ) {\r\n        implementsDomRange = true;\r\n      }\r\n    }\r\n\r\n    var body = getBody(document);\r\n    if (!body || body.nodeName.toLowerCase() != \"body\") {\r\n      fail(\"No body element found\");\r\n      return;\r\n    }\r\n\r\n    if (body && isHostMethod(body, \"createTextRange\")) {\r\n      testRange = body.createTextRange();\r\n      if (isTextRange(testRange)) {\r\n        implementsTextRange = true;\r\n      }\r\n    }\r\n\r\n    if (!implementsDomRange && !implementsTextRange) {\r\n      fail(\"Neither Range nor TextRange are available\");\r\n      return;\r\n    }\r\n\r\n    api.initialized = true;\r\n    api.features = {\r\n      implementsDomRange: implementsDomRange,\r\n      implementsTextRange: implementsTextRange,\r\n    };\r\n\r\n    // Initialize modules\r\n    var module, errorMessage;\r\n    for (var moduleName in modules) {\r\n      if ((module = modules[moduleName]) instanceof Module) {\r\n        module.init(module, api);\r\n      }\r\n    }\r\n\r\n    // Call init listeners\r\n    for (var i = 0, len = initListeners.length; i < len; ++i) {\r\n      try {\r\n        initListeners[i](api);\r\n      } catch (ex) {\r\n        errorMessage =\r\n          \"Rangy init listener threw an exception. Continuing. Detail: \" +\r\n          getErrorDesc(ex);\r\n        consoleLog(errorMessage);\r\n      }\r\n    }\r\n  }\r\n\r\n  function deprecationNotice(deprecated, replacement, module) {\r\n    if (module) {\r\n      deprecated += \" in module \" + module.name;\r\n    }\r\n    api.warn(\r\n      \"DEPRECATED: \" +\r\n        deprecated +\r\n        \" is deprecated. Please use \" +\r\n        replacement +\r\n        \" instead.\"\r\n    );\r\n  }\r\n\r\n  function createAliasForDeprecatedMethod(\r\n    owner,\r\n    deprecated,\r\n    replacement,\r\n    module\r\n  ) {\r\n    owner[deprecated] = function () {\r\n      deprecationNotice(deprecated, replacement, module);\r\n      return owner[replacement].apply(owner, util.toArray(arguments));\r\n    };\r\n  }\r\n\r\n  util.deprecationNotice = deprecationNotice;\r\n  util.createAliasForDeprecatedMethod = createAliasForDeprecatedMethod;\r\n\r\n  // Allow external scripts to initialize this library in case it's loaded after the document has loaded\r\n  api.init = init;\r\n\r\n  // Execute listener immediately if already initialized\r\n  api.addInitListener = function (listener) {\r\n    if (api.initialized) {\r\n      listener(api);\r\n    } else {\r\n      initListeners.push(listener);\r\n    }\r\n  };\r\n\r\n  var shimListeners = [];\r\n\r\n  api.addShimListener = function (listener) {\r\n    shimListeners.push(listener);\r\n  };\r\n\r\n  function shim(win) {\r\n    win = win || window;\r\n    init();\r\n\r\n    // Notify listeners\r\n    for (var i = 0, len = shimListeners.length; i < len; ++i) {\r\n      shimListeners[i](win);\r\n    }\r\n  }\r\n\r\n  if (isBrowser) {\r\n    api.shim = api.createMissingNativeApi = shim;\r\n    createAliasForDeprecatedMethod(api, \"createMissingNativeApi\", \"shim\");\r\n  }\r\n\r\n  function Module(name, dependencies, initializer) {\r\n    this.name = name;\r\n    this.dependencies = dependencies;\r\n    this.initialized = false;\r\n    this.supported = false;\r\n    this.initializer = initializer;\r\n  }\r\n\r\n  Module.prototype = {\r\n    init: function () {\r\n      var requiredModuleNames = this.dependencies || [];\r\n      for (\r\n        var i = 0, len = requiredModuleNames.length, requiredModule, moduleName;\r\n        i < len;\r\n        ++i\r\n      ) {\r\n        moduleName = requiredModuleNames[i];\r\n\r\n        requiredModule = modules[moduleName];\r\n        if (!requiredModule || !(requiredModule instanceof Module)) {\r\n          throw new Error(\"required module '\" + moduleName + \"' not found\");\r\n        }\r\n\r\n        requiredModule.init();\r\n\r\n        if (!requiredModule.supported) {\r\n          throw new Error(\"required module '\" + moduleName + \"' not supported\");\r\n        }\r\n      }\r\n\r\n      // Now run initializer\r\n      this.initializer(this);\r\n    },\r\n\r\n    fail: function (reason) {\r\n      this.initialized = true;\r\n      this.supported = false;\r\n      throw new Error(reason);\r\n    },\r\n\r\n    warn: function (msg) {\r\n      api.warn(\"Module \" + this.name + \": \" + msg);\r\n    },\r\n\r\n    deprecationNotice: function (deprecated, replacement) {\r\n      api.warn(\r\n        \"DEPRECATED: \" +\r\n          deprecated +\r\n          \" in module \" +\r\n          this.name +\r\n          \" is deprecated. Please use \" +\r\n          replacement +\r\n          \" instead\"\r\n      );\r\n    },\r\n\r\n    createError: function (msg) {\r\n      return new Error(\"Error in Rangy \" + this.name + \" module: \" + msg);\r\n    },\r\n  };\r\n\r\n  function createModule(name, dependencies, initFunc) {\r\n    var newModule = new Module(name, dependencies, function (module) {\r\n      if (!module.initialized) {\r\n        module.initialized = true;\r\n        try {\r\n          initFunc(api, module);\r\n          module.supported = true;\r\n        } catch (ex) {\r\n          var errorMessage =\r\n            \"Module '\" + name + \"' failed to load: \" + getErrorDesc(ex);\r\n          consoleLog(errorMessage);\r\n          if (ex.stack) {\r\n            consoleLog(ex.stack);\r\n          }\r\n        }\r\n      }\r\n    });\r\n    modules[name] = newModule;\r\n    return newModule;\r\n  }\r\n\r\n  api.createModule = function (name) {\r\n    // Allow 2 or 3 arguments (second argument is an optional array of dependencies)\r\n    var initFunc, dependencies;\r\n    if (arguments.length == 2) {\r\n      initFunc = arguments[1];\r\n      dependencies = [];\r\n    } else {\r\n      initFunc = arguments[2];\r\n      dependencies = arguments[1];\r\n    }\r\n\r\n    var module = createModule(name, dependencies, initFunc);\r\n\r\n    // Initialize the module immediately if the core is already initialized\r\n    if (api.initialized && api.supported) {\r\n      module.init();\r\n    }\r\n  };\r\n\r\n  api.createCoreModule = function (name, dependencies, initFunc) {\r\n    createModule(name, dependencies, initFunc);\r\n  };\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // Ensure rangy.rangePrototype and rangy.selectionPrototype are available immediately\r\n\r\n  function RangePrototype() {}\r\n  api.RangePrototype = RangePrototype;\r\n  api.rangePrototype = new RangePrototype();\r\n\r\n  function SelectionPrototype() {}\r\n  api.selectionPrototype = new SelectionPrototype();\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // DOM utility methods used by Rangy\r\n  api.createCoreModule(\"DomUtil\", [], function (api, module) {\r\n    var UNDEF = \"undefined\";\r\n    var util = api.util;\r\n    var getBody = util.getBody;\r\n\r\n    // Perform feature tests\r\n    if (\r\n      !util.areHostMethods(document, [\r\n        \"createDocumentFragment\",\r\n        \"createElement\",\r\n        \"createTextNode\",\r\n      ])\r\n    ) {\r\n      module.fail(\"document missing a Node creation method\");\r\n    }\r\n\r\n    if (!util.isHostMethod(document, \"getElementsByTagName\")) {\r\n      module.fail(\"document missing getElementsByTagName method\");\r\n    }\r\n\r\n    var el = document.createElement(\"div\");\r\n    if (\r\n      !util.areHostMethods(\r\n        el,\r\n        [\"insertBefore\", \"appendChild\", \"cloneNode\"] ||\r\n          false\r\n      )\r\n    ) {\r\n      module.fail(\"Incomplete Element implementation\");\r\n    }\r\n\r\n    // innerHTML is required for Range's createContextualFragment method\r\n    if (!util.isHostProperty(el, \"innerHTML\")) {\r\n      module.fail(\"Element is missing innerHTML property\");\r\n    }\r\n\r\n    var textNode = document.createTextNode(\"test\");\r\n    if (\r\n      !util.areHostMethods(\r\n        textNode,\r\n        [\"splitText\", \"deleteData\", \"insertData\", \"appendData\", \"cloneNode\"] ||\r\n          false ||\r\n          false\r\n      )\r\n    ) {\r\n      module.fail(\"Incomplete Text Node implementation\");\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Removed use of indexOf because of a bizarre bug in Opera that is thrown in one of the Acid3 tests. I haven't been\r\n    // able to replicate it outside of the test. The bug is that indexOf returns -1 when called on an Array that\r\n    // contains just the document as a single element and the value searched for is the document.\r\n    var arrayContains =\r\n      /*Array.prototype.indexOf ?\r\n            function(arr, val) {\r\n                return arr.indexOf(val) > -1;\r\n            }:*/\r\n\r\n      function (arr, val) {\r\n        var i = arr.length;\r\n        while (i--) {\r\n          if (arr[i] === val) {\r\n            return true;\r\n          }\r\n        }\r\n        return false;\r\n      };\r\n\r\n    // Opera 11 puts HTML elements in the null namespace, it seems, and IE 7 has undefined namespaceURI\r\n    function isHtmlNamespace(node) {\r\n      var ns;\r\n      return (\r\n        typeof node.namespaceURI == UNDEF ||\r\n        (ns = node.namespaceURI) === null ||\r\n        ns == \"http://www.w3.org/1999/xhtml\"\r\n      );\r\n    }\r\n\r\n    function parentElement(node) {\r\n      var parent = node.parentNode;\r\n      return parent.nodeType == 1 ? parent : null;\r\n    }\r\n\r\n    function getNodeIndex(node) {\r\n      var i = 0;\r\n      while ((node = node.previousSibling)) {\r\n        ++i;\r\n      }\r\n      return i;\r\n    }\r\n\r\n    function getNodeLength(node) {\r\n      switch (node.nodeType) {\r\n        case 7:\r\n        case 10:\r\n          return 0;\r\n        case 3:\r\n        case 8:\r\n          return node.length;\r\n        default:\r\n          return node.childNodes.length;\r\n      }\r\n    }\r\n\r\n    function getCommonAncestor(node1, node2) {\r\n      var ancestors = [],\r\n        n;\r\n      for (n = node1; n; n = n.parentNode) {\r\n        ancestors.push(n);\r\n      }\r\n\r\n      for (n = node2; n; n = n.parentNode) {\r\n        if (arrayContains(ancestors, n)) {\r\n          return n;\r\n        }\r\n      }\r\n\r\n      return null;\r\n    }\r\n\r\n    function isAncestorOf(ancestor, descendant, selfIsAncestor) {\r\n      var n = selfIsAncestor ? descendant : descendant.parentNode;\r\n      while (n) {\r\n        if (n === ancestor) {\r\n          return true;\r\n        } else {\r\n          n = n.parentNode;\r\n        }\r\n      }\r\n      return false;\r\n    }\r\n\r\n    function isOrIsAncestorOf(ancestor, descendant) {\r\n      return isAncestorOf(ancestor, descendant, true);\r\n    }\r\n\r\n    function getClosestAncestorIn(node, ancestor, selfIsAncestor) {\r\n      var p,\r\n        n = selfIsAncestor ? node : node.parentNode;\r\n      while (n) {\r\n        p = n.parentNode;\r\n        if (p === ancestor) {\r\n          return n;\r\n        }\r\n        n = p;\r\n      }\r\n      return null;\r\n    }\r\n\r\n    function isCharacterDataNode(node) {\r\n      var t = node.nodeType;\r\n      return t == 3 || t == 4 || t == 8; // Text, CDataSection or Comment\r\n    }\r\n\r\n    function isTextOrCommentNode(node) {\r\n      if (!node) {\r\n        return false;\r\n      }\r\n      var t = node.nodeType;\r\n      return t == 3 || t == 8; // Text or Comment\r\n    }\r\n\r\n    function insertAfter(node, precedingNode) {\r\n      var nextNode = precedingNode.nextSibling,\r\n        parent = precedingNode.parentNode;\r\n      if (nextNode) {\r\n        parent.insertBefore(node, nextNode);\r\n      } else {\r\n        parent.appendChild(node);\r\n      }\r\n      return node;\r\n    }\r\n\r\n    // Note that we cannot use splitText() because it is bugridden in IE 9.\r\n    function splitDataNode(node, index, positionsToPreserve) {\r\n      var newNode = node.cloneNode(false);\r\n      newNode.deleteData(0, index);\r\n      node.deleteData(index, node.length - index);\r\n      insertAfter(newNode, node);\r\n\r\n      // Preserve positions\r\n      if (positionsToPreserve) {\r\n        for (var i = 0, position; (position = positionsToPreserve[i++]); ) {\r\n          // Handle case where position was inside the portion of node after the split point\r\n          if (position.node == node && position.offset > index) {\r\n            position.node = newNode;\r\n            position.offset -= index;\r\n          }\r\n          // Handle the case where the position is a node offset within node's parent\r\n          else if (\r\n            position.node == node.parentNode &&\r\n            position.offset > getNodeIndex(node)\r\n          ) {\r\n            ++position.offset;\r\n          }\r\n        }\r\n      }\r\n      return newNode;\r\n    }\r\n\r\n    function getDocument(node) {\r\n      if (node.nodeType == 9) {\r\n        return node;\r\n      } else if (typeof node.ownerDocument != UNDEF) {\r\n        return node.ownerDocument;\r\n      } else if (typeof node.document != UNDEF) {\r\n        return node.document;\r\n      } else if (node.parentNode) {\r\n        return getDocument(node.parentNode);\r\n      } else {\r\n        throw module.createError(\"getDocument: no document found for node\");\r\n      }\r\n    }\r\n\r\n    function getWindow(node) {\r\n      var doc = getDocument(node);\r\n      if (typeof doc.defaultView != UNDEF) {\r\n        return doc.defaultView;\r\n      } else if (typeof doc.parentWindow != UNDEF) {\r\n        return doc.parentWindow;\r\n      } else {\r\n        throw module.createError(\"Cannot get a window object for node\");\r\n      }\r\n    }\r\n\r\n    function getIframeDocument(iframeEl) {\r\n      if (typeof iframeEl.contentDocument != UNDEF) {\r\n        return iframeEl.contentDocument;\r\n      } else if (typeof iframeEl.contentWindow != UNDEF) {\r\n        return iframeEl.contentWindow.document;\r\n      } else {\r\n        throw module.createError(\r\n          \"getIframeDocument: No Document object found for iframe element\"\r\n        );\r\n      }\r\n    }\r\n\r\n    function getIframeWindow(iframeEl) {\r\n      if (typeof iframeEl.contentWindow != UNDEF) {\r\n        return iframeEl.contentWindow;\r\n      } else if (typeof iframeEl.contentDocument != UNDEF) {\r\n        return iframeEl.contentDocument.defaultView;\r\n      } else {\r\n        throw module.createError(\r\n          \"getIframeWindow: No Window object found for iframe element\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // This looks bad. Is it worth it?\r\n    function isWindow(obj) {\r\n      return (\r\n        obj &&\r\n        util.isHostMethod(obj, \"setTimeout\") &&\r\n        util.isHostObject(obj, \"document\")\r\n      );\r\n    }\r\n\r\n    function getContentDocument(obj, module, methodName) {\r\n      var doc;\r\n\r\n      if (!obj) {\r\n        doc = document;\r\n      }\r\n\r\n      // Test if a DOM node has been passed and obtain a document object for it if so\r\n      else if (util.isHostProperty(obj, \"nodeType\")) {\r\n        doc =\r\n          obj.nodeType == 1 && obj.tagName.toLowerCase() == \"iframe\"\r\n            ? getIframeDocument(obj)\r\n            : getDocument(obj);\r\n      }\r\n\r\n      // Test if the doc parameter appears to be a Window object\r\n      else if (isWindow(obj)) {\r\n        doc = obj.document;\r\n      }\r\n\r\n      if (!doc) {\r\n        throw module.createError(\r\n          methodName + \"(): Parameter must be a Window object or DOM node\"\r\n        );\r\n      }\r\n\r\n      return doc;\r\n    }\r\n\r\n    function getRootContainer(node) {\r\n      var parent;\r\n      while ((parent = node.parentNode)) {\r\n        node = parent;\r\n      }\r\n      return node;\r\n    }\r\n\r\n    function comparePoints(nodeA, offsetA, nodeB, offsetB) {\r\n      // See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Comparing\r\n      var nodeC, root, childA, childB, n;\r\n      if (nodeA == nodeB) {\r\n        // Case 1: nodes are the same\r\n        return offsetA === offsetB ? 0 : offsetA < offsetB ? -1 : 1;\r\n      } else if ((nodeC = getClosestAncestorIn(nodeB, nodeA, true))) {\r\n        // Case 2: node C (container B or an ancestor) is a child node of A\r\n        return offsetA <= getNodeIndex(nodeC) ? -1 : 1;\r\n      } else if ((nodeC = getClosestAncestorIn(nodeA, nodeB, true))) {\r\n        // Case 3: node C (container A or an ancestor) is a child node of B\r\n        return getNodeIndex(nodeC) < offsetB ? -1 : 1;\r\n      } else {\r\n        root = getCommonAncestor(nodeA, nodeB);\r\n        if (!root) {\r\n          throw new Error(\"comparePoints error: nodes have no common ancestor\");\r\n        }\r\n\r\n        // Case 4: containers are siblings or descendants of siblings\r\n        childA =\r\n          nodeA === root ? root : getClosestAncestorIn(nodeA, root, true);\r\n        childB =\r\n          nodeB === root ? root : getClosestAncestorIn(nodeB, root, true);\r\n\r\n        if (childA === childB) {\r\n          // This shouldn't be possible\r\n          throw module.createError(\r\n            \"comparePoints got to case 4 and childA and childB are the same!\"\r\n          );\r\n        } else {\r\n          n = root.firstChild;\r\n          while (n) {\r\n            if (n === childA) {\r\n              return -1;\r\n            } else if (n === childB) {\r\n              return 1;\r\n            }\r\n            n = n.nextSibling;\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Test for IE's crash (IE 6/7) or exception (IE >= 8) when a reference to garbage-collected text node is queried\r\n    var crashyTextNodes = false;\r\n\r\n    function isBrokenNode(node) {\r\n      var n;\r\n      try {\r\n        n = node.parentNode;\r\n        return false;\r\n      } catch (e) {\r\n        return true;\r\n      }\r\n    }\r\n\r\n    (function () {\r\n      var el = document.createElement(\"b\");\r\n      el.innerHTML = \"1\";\r\n      var textNode = el.firstChild;\r\n      el.innerHTML = \"<br />\";\r\n      crashyTextNodes = isBrokenNode(textNode);\r\n\r\n      api.features.crashyTextNodes = crashyTextNodes;\r\n    })();\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function inspectNode(node) {\r\n      if (!node) {\r\n        return \"[No node]\";\r\n      }\r\n      if (crashyTextNodes && isBrokenNode(node)) {\r\n        return \"[Broken node]\";\r\n      }\r\n      if (isCharacterDataNode(node)) {\r\n        return '\"' + node.data + '\"';\r\n      }\r\n      if (node.nodeType == 1) {\r\n        var idAttr = node.id ? ' id=\"' + node.id + '\"' : \"\";\r\n        return (\r\n          \"<\" +\r\n          node.nodeName +\r\n          idAttr +\r\n          \">[index:\" +\r\n          getNodeIndex(node) +\r\n          \",length:\" +\r\n          node.childNodes.length +\r\n          \"][\" +\r\n          (node.innerHTML || \"[innerHTML not supported]\").slice(0, 25) +\r\n          \"]\"\r\n        );\r\n      }\r\n      return node.nodeName;\r\n    }\r\n\r\n    function fragmentFromNodeChildren(node) {\r\n      var fragment = getDocument(node).createDocumentFragment(),\r\n        child;\r\n      while ((child = node.firstChild)) {\r\n        fragment.appendChild(child);\r\n      }\r\n      return fragment;\r\n    }\r\n\r\n    var getComputedStyleProperty;\r\n    if (typeof window.getComputedStyle != UNDEF) {\r\n      getComputedStyleProperty = function (el, propName) {\r\n        return getWindow(el).getComputedStyle(el, null)[propName];\r\n      };\r\n    } else if (typeof document.documentElement.currentStyle != UNDEF) {\r\n      getComputedStyleProperty = function (el, propName) {\r\n        return el.currentStyle ? el.currentStyle[propName] : \"\";\r\n      };\r\n    } else {\r\n      module.fail(\"No means of obtaining computed style properties found\");\r\n    }\r\n\r\n    function createTestElement(doc, html, contentEditable) {\r\n      var body = getBody(doc);\r\n      var el = doc.createElement(\"div\");\r\n      el.contentEditable = \"\" + !!contentEditable;\r\n      if (html) {\r\n        el.innerHTML = html;\r\n      }\r\n\r\n      // Insert the test element at the start of the body to prevent scrolling to the bottom in iOS (issue #292)\r\n      var bodyFirstChild = body.firstChild;\r\n      if (bodyFirstChild) {\r\n        body.insertBefore(el, bodyFirstChild);\r\n      } else {\r\n        body.appendChild(el);\r\n      }\r\n\r\n      return el;\r\n    }\r\n\r\n    function removeNode(node) {\r\n      return node.parentNode.removeChild(node);\r\n    }\r\n\r\n    function NodeIterator(root) {\r\n      this.root = root;\r\n      this._next = root;\r\n    }\r\n\r\n    NodeIterator.prototype = {\r\n      _current: null,\r\n\r\n      hasNext: function () {\r\n        return !!this._next;\r\n      },\r\n\r\n      next: function () {\r\n        var n = (this._current = this._next);\r\n        var child, next;\r\n        if (this._current) {\r\n          child = n.firstChild;\r\n          if (child) {\r\n            this._next = child;\r\n          } else {\r\n            next = null;\r\n            while (n !== this.root && !(next = n.nextSibling)) {\r\n              n = n.parentNode;\r\n            }\r\n            this._next = next;\r\n          }\r\n        }\r\n\r\n        return this._current;\r\n      },\r\n\r\n      detach: function () {\r\n        this._current = this._next = this.root = null;\r\n      },\r\n    };\r\n\r\n    function createIterator(root) {\r\n      return new NodeIterator(root);\r\n    }\r\n\r\n    function DomPosition(node, offset) {\r\n      this.node = node;\r\n      this.offset = offset;\r\n    }\r\n\r\n    DomPosition.prototype = {\r\n      equals: function (pos) {\r\n        return !!pos && this.node === pos.node && this.offset == pos.offset;\r\n      },\r\n\r\n      inspect: function () {\r\n        return (\r\n          \"[DomPosition(\" + inspectNode(this.node) + \":\" + this.offset + \")]\"\r\n        );\r\n      },\r\n\r\n      toString: function () {\r\n        return this.inspect();\r\n      },\r\n    };\r\n\r\n    function DOMException(codeName) {\r\n      this.code = this[codeName];\r\n      this.codeName = codeName;\r\n      this.message = \"DOMException: \" + this.codeName;\r\n    }\r\n\r\n    DOMException.prototype = {\r\n      INDEX_SIZE_ERR: 1,\r\n      HIERARCHY_REQUEST_ERR: 3,\r\n      WRONG_DOCUMENT_ERR: 4,\r\n      NO_MODIFICATION_ALLOWED_ERR: 7,\r\n      NOT_FOUND_ERR: 8,\r\n      NOT_SUPPORTED_ERR: 9,\r\n      INVALID_STATE_ERR: 11,\r\n      INVALID_NODE_TYPE_ERR: 24,\r\n    };\r\n\r\n    DOMException.prototype.toString = function () {\r\n      return this.message;\r\n    };\r\n\r\n    api.dom = {\r\n      arrayContains: arrayContains,\r\n      isHtmlNamespace: isHtmlNamespace,\r\n      parentElement: parentElement,\r\n      getNodeIndex: getNodeIndex,\r\n      getNodeLength: getNodeLength,\r\n      getCommonAncestor: getCommonAncestor,\r\n      isAncestorOf: isAncestorOf,\r\n      isOrIsAncestorOf: isOrIsAncestorOf,\r\n      getClosestAncestorIn: getClosestAncestorIn,\r\n      isCharacterDataNode: isCharacterDataNode,\r\n      isTextOrCommentNode: isTextOrCommentNode,\r\n      insertAfter: insertAfter,\r\n      splitDataNode: splitDataNode,\r\n      getDocument: getDocument,\r\n      getWindow: getWindow,\r\n      getIframeWindow: getIframeWindow,\r\n      getIframeDocument: getIframeDocument,\r\n      getBody: getBody,\r\n      isWindow: isWindow,\r\n      getContentDocument: getContentDocument,\r\n      getRootContainer: getRootContainer,\r\n      comparePoints: comparePoints,\r\n      isBrokenNode: isBrokenNode,\r\n      inspectNode: inspectNode,\r\n      getComputedStyleProperty: getComputedStyleProperty,\r\n      createTestElement: createTestElement,\r\n      removeNode: removeNode,\r\n      fragmentFromNodeChildren: fragmentFromNodeChildren,\r\n      createIterator: createIterator,\r\n      DomPosition: DomPosition,\r\n    };\r\n\r\n    api.DOMException = DOMException;\r\n  });\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // Pure JavaScript implementation of DOM Range\r\n  api.createCoreModule(\"DomRange\", [\"DomUtil\"], function (api, module) {\r\n    var dom = api.dom;\r\n    var util = api.util;\r\n    var DomPosition = dom.DomPosition;\r\n    var DOMException = api.DOMException;\r\n\r\n    var isCharacterDataNode = dom.isCharacterDataNode;\r\n    var getNodeIndex = dom.getNodeIndex;\r\n    var isOrIsAncestorOf = dom.isOrIsAncestorOf;\r\n    var getDocument = dom.getDocument;\r\n    var comparePoints = dom.comparePoints;\r\n    var splitDataNode = dom.splitDataNode;\r\n    var getClosestAncestorIn = dom.getClosestAncestorIn;\r\n    var getNodeLength = dom.getNodeLength;\r\n    var arrayContains = dom.arrayContains;\r\n    var getRootContainer = dom.getRootContainer;\r\n    var crashyTextNodes = api.features.crashyTextNodes;\r\n\r\n    var removeNode = dom.removeNode;\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Utility functions\r\n\r\n    function isNonTextPartiallySelected(node, range) {\r\n      return (\r\n        node.nodeType != 3 &&\r\n        (isOrIsAncestorOf(node, range.startContainer) ||\r\n          isOrIsAncestorOf(node, range.endContainer))\r\n      );\r\n    }\r\n\r\n    function getRangeDocument(range) {\r\n      return range.document || getDocument(range.startContainer);\r\n    }\r\n\r\n    function getRangeRoot(range) {\r\n      return getRootContainer(range.startContainer);\r\n    }\r\n\r\n    function getBoundaryBeforeNode(node) {\r\n      return new DomPosition(node.parentNode, getNodeIndex(node));\r\n    }\r\n\r\n    function getBoundaryAfterNode(node) {\r\n      return new DomPosition(node.parentNode, getNodeIndex(node) + 1);\r\n    }\r\n\r\n    function insertNodeAtPosition(node, n, o) {\r\n      var firstNodeInserted = node.nodeType == 11 ? node.firstChild : node;\r\n      if (isCharacterDataNode(n)) {\r\n        if (o == n.length) {\r\n          dom.insertAfter(node, n);\r\n        } else {\r\n          n.parentNode.insertBefore(node, o == 0 ? n : splitDataNode(n, o));\r\n        }\r\n      } else if (o >= n.childNodes.length) {\r\n        n.appendChild(node);\r\n      } else {\r\n        n.insertBefore(node, n.childNodes[o]);\r\n      }\r\n      return firstNodeInserted;\r\n    }\r\n\r\n    function rangesIntersect(rangeA, rangeB, touchingIsIntersecting) {\r\n      assertRangeValid(rangeA);\r\n      assertRangeValid(rangeB);\r\n\r\n      if (getRangeDocument(rangeB) != getRangeDocument(rangeA)) {\r\n        throw new DOMException(\"WRONG_DOCUMENT_ERR\");\r\n      }\r\n\r\n      var startComparison = comparePoints(\r\n          rangeA.startContainer,\r\n          rangeA.startOffset,\r\n          rangeB.endContainer,\r\n          rangeB.endOffset\r\n        ),\r\n        endComparison = comparePoints(\r\n          rangeA.endContainer,\r\n          rangeA.endOffset,\r\n          rangeB.startContainer,\r\n          rangeB.startOffset\r\n        );\r\n\r\n      return touchingIsIntersecting\r\n        ? startComparison <= 0 && endComparison >= 0\r\n        : startComparison < 0 && endComparison > 0;\r\n    }\r\n\r\n    function cloneSubtree(iterator) {\r\n      var partiallySelected;\r\n      for (\r\n        var node,\r\n          frag = getRangeDocument(iterator.range).createDocumentFragment(),\r\n          subIterator;\r\n        (node = iterator.next());\r\n\r\n      ) {\r\n        partiallySelected = iterator.isPartiallySelectedSubtree();\r\n        node = node.cloneNode(!partiallySelected);\r\n        if (partiallySelected) {\r\n          subIterator = iterator.getSubtreeIterator();\r\n          node.appendChild(cloneSubtree(subIterator));\r\n          subIterator.detach();\r\n        }\r\n\r\n        if (node.nodeType == 10) {\r\n          // DocumentType\r\n          throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\r\n        }\r\n        frag.appendChild(node);\r\n      }\r\n      return frag;\r\n    }\r\n\r\n    function iterateSubtree(rangeIterator, func, iteratorState) {\r\n      var it, n;\r\n      iteratorState = iteratorState || { stop: false };\r\n      for (var node, subRangeIterator; (node = rangeIterator.next()); ) {\r\n        if (rangeIterator.isPartiallySelectedSubtree()) {\r\n          if (func(node) === false) {\r\n            iteratorState.stop = true;\r\n            return;\r\n          } else {\r\n            // The node is partially selected by the Range, so we can use a new RangeIterator on the portion of\r\n            // the node selected by the Range.\r\n            subRangeIterator = rangeIterator.getSubtreeIterator();\r\n            iterateSubtree(subRangeIterator, func, iteratorState);\r\n            subRangeIterator.detach();\r\n            if (iteratorState.stop) {\r\n              return;\r\n            }\r\n          }\r\n        } else {\r\n          // The whole node is selected, so we can use efficient DOM iteration to iterate over the node and its\r\n          // descendants\r\n          it = dom.createIterator(node);\r\n          while ((n = it.next())) {\r\n            if (func(n) === false) {\r\n              iteratorState.stop = true;\r\n              return;\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    function deleteSubtree(iterator) {\r\n      var subIterator;\r\n      while (iterator.next()) {\r\n        if (iterator.isPartiallySelectedSubtree()) {\r\n          subIterator = iterator.getSubtreeIterator();\r\n          deleteSubtree(subIterator);\r\n          subIterator.detach();\r\n        } else {\r\n          iterator.remove();\r\n        }\r\n      }\r\n    }\r\n\r\n    function extractSubtree(iterator) {\r\n      for (\r\n        var node,\r\n          frag = getRangeDocument(iterator.range).createDocumentFragment(),\r\n          subIterator;\r\n        (node = iterator.next());\r\n\r\n      ) {\r\n        if (iterator.isPartiallySelectedSubtree()) {\r\n          node = node.cloneNode(false);\r\n          subIterator = iterator.getSubtreeIterator();\r\n          node.appendChild(extractSubtree(subIterator));\r\n          subIterator.detach();\r\n        } else {\r\n          iterator.remove();\r\n        }\r\n        if (node.nodeType == 10) {\r\n          // DocumentType\r\n          throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\r\n        }\r\n        frag.appendChild(node);\r\n      }\r\n      return frag;\r\n    }\r\n\r\n    function getNodesInRange(range, nodeTypes, filter) {\r\n      var filterNodeTypes = !!(nodeTypes && nodeTypes.length),\r\n        regex;\r\n      var filterExists = !!filter;\r\n      if (filterNodeTypes) {\r\n        regex = new RegExp(\"^(\" + nodeTypes.join(\"|\") + \")$\");\r\n      }\r\n\r\n      var nodes = [];\r\n      iterateSubtree(new RangeIterator(range, false), function (node) {\r\n        if (filterNodeTypes && !regex.test(node.nodeType)) {\r\n          return;\r\n        }\r\n        if (filterExists && !filter(node)) {\r\n          return;\r\n        }\r\n        // Don't include a boundary container if it is a character data node and the range does not contain any\r\n        // of its character data. See issue 190.\r\n        var sc = range.startContainer;\r\n        if (\r\n          node == sc &&\r\n          isCharacterDataNode(sc) &&\r\n          range.startOffset == sc.length\r\n        ) {\r\n          return;\r\n        }\r\n\r\n        var ec = range.endContainer;\r\n        if (node == ec && isCharacterDataNode(ec) && range.endOffset == 0) {\r\n          return;\r\n        }\r\n\r\n        nodes.push(node);\r\n      });\r\n      return nodes;\r\n    }\r\n\r\n    function inspect(range) {\r\n      var name =\r\n        typeof range.getName == \"undefined\" ? \"Range\" : range.getName();\r\n      return (\r\n        \"[\" +\r\n        name +\r\n        \"(\" +\r\n        dom.inspectNode(range.startContainer) +\r\n        \":\" +\r\n        range.startOffset +\r\n        \", \" +\r\n        dom.inspectNode(range.endContainer) +\r\n        \":\" +\r\n        range.endOffset +\r\n        \")]\"\r\n      );\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // RangeIterator code partially borrows from IERange by Tim Ryan (http://github.com/timcameronryan/IERange)\r\n\r\n    function RangeIterator(range, clonePartiallySelectedTextNodes) {\r\n      this.range = range;\r\n      this.clonePartiallySelectedTextNodes = clonePartiallySelectedTextNodes;\r\n\r\n      if (!range.collapsed) {\r\n        this.sc = range.startContainer;\r\n        // debugger\r\n        this.so = range.startOffset;\r\n        this.ec = range.endContainer;\r\n        this.eo = range.endOffset;\r\n        var root = range.commonAncestorContainer;\r\n\r\n        if (this.sc === this.ec && isCharacterDataNode(this.sc)) {\r\n          this.isSingleCharacterDataNode = true;\r\n          this._first = this._last = this._next = this.sc;\r\n        } else {\r\n          this._first = this._next =\r\n            this.sc === root && !isCharacterDataNode(this.sc)\r\n              ? this.sc.childNodes[this.so]\r\n              : getClosestAncestorIn(this.sc, root, true);\r\n          this._last =\r\n            this.ec === root && !isCharacterDataNode(this.ec)\r\n              ? this.ec.childNodes[this.eo - 1]\r\n              : getClosestAncestorIn(this.ec, root, true);\r\n        }\r\n      }\r\n    }\r\n\r\n    RangeIterator.prototype = {\r\n      _current: null,\r\n      _next: null,\r\n      _first: null,\r\n      _last: null,\r\n      isSingleCharacterDataNode: false,\r\n\r\n      reset: function () {\r\n        this._current = null;\r\n        this._next = this._first;\r\n      },\r\n\r\n      hasNext: function () {\r\n        return !!this._next;\r\n      },\r\n\r\n      next: function () {\r\n        // Move to next node\r\n\r\n        var current = (this._current = this._next);\r\n        if (current) {\r\n          this._next = current !== this._last ? current.nextSibling : null;\r\n\r\n          // Check for partially selected text nodes\r\n          if (\r\n            isCharacterDataNode(current) &&\r\n            this.clonePartiallySelectedTextNodes\r\n          ) {\r\n            if (current === this.ec) {\r\n              (current = current.cloneNode(true)).deleteData(\r\n                this.eo,\r\n                current.length - this.eo\r\n              );\r\n            }\r\n            if (this._current === this.sc) {\r\n              (current = current.cloneNode(true)).deleteData(0, this.so);\r\n            }\r\n          }\r\n        }\r\n\r\n        return current;\r\n      },\r\n\r\n      remove: function () {\r\n        var current = this._current,\r\n          start,\r\n          end;\r\n\r\n        if (\r\n          isCharacterDataNode(current) &&\r\n          (current === this.sc || current === this.ec)\r\n        ) {\r\n          start = current === this.sc ? this.so : 0;\r\n          end = current === this.ec ? this.eo : current.length;\r\n          if (start != end) {\r\n            current.deleteData(start, end - start);\r\n          }\r\n        } else {\r\n          if (current.parentNode) {\r\n            removeNode(current);\r\n          } else {\r\n          }\r\n        }\r\n      },\r\n\r\n      // Checks if the current node is partially selected\r\n      isPartiallySelectedSubtree: function () {\r\n        var current = this._current;\r\n        return isNonTextPartiallySelected(current, this.range);\r\n      },\r\n\r\n      getSubtreeIterator: function () {\r\n        var subRange;\r\n        if (this.isSingleCharacterDataNode) {\r\n          subRange = this.range.cloneRange();\r\n          subRange.collapse(false);\r\n        } else {\r\n          subRange = new Range(getRangeDocument(this.range));\r\n          var current = this._current;\r\n\r\n          var startContainer = current,\r\n            startOffset = 0,\r\n            endContainer = current,\r\n            endOffset = getNodeLength(current);\r\n          // debugger\r\n          if (isOrIsAncestorOf(current, this.sc)) {\r\n            startContainer = this.sc;\r\n            startOffset = this.so;\r\n          }\r\n          if (isOrIsAncestorOf(current, this.ec)) {\r\n            endContainer = this.ec;\r\n            endOffset = this.eo;\r\n          }\r\n\r\n          updateBoundaries(\r\n            subRange,\r\n            startContainer,\r\n            startOffset,\r\n            endContainer,\r\n            endOffset\r\n          );\r\n        }\r\n        return new RangeIterator(\r\n          subRange,\r\n          this.clonePartiallySelectedTextNodes\r\n        );\r\n      },\r\n\r\n      detach: function () {\r\n        this.range =\r\n          this._current =\r\n          this._next =\r\n          this._first =\r\n          this._last =\r\n          this.sc =\r\n          this.so =\r\n          this.ec =\r\n          this.eo =\r\n            null;\r\n      },\r\n    };\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    var beforeAfterNodeTypes = [1, 3, 4, 5, 7, 8, 10];\r\n    var rootContainerNodeTypes = [2, 9, 11];\r\n    var readonlyNodeTypes = [5, 6, 10, 12];\r\n    var insertableNodeTypes = [1, 3, 4, 5, 7, 8, 10, 11];\r\n    var surroundNodeTypes = [1, 3, 4, 5, 7, 8];\r\n\r\n    function createAncestorFinder(nodeTypes) {\r\n      return function (node, selfIsAncestor) {\r\n        var t,\r\n          n = selfIsAncestor ? node : node.parentNode;\r\n        while (n) {\r\n          t = n.nodeType;\r\n          if (arrayContains(nodeTypes, t)) {\r\n            return n;\r\n          }\r\n          n = n.parentNode;\r\n        }\r\n        return null;\r\n      };\r\n    }\r\n\r\n    var getDocumentOrFragmentContainer = createAncestorFinder([9, 11]);\r\n    var getReadonlyAncestor = createAncestorFinder(readonlyNodeTypes);\r\n    var getDocTypeNotationEntityAncestor = createAncestorFinder([6, 10, 12]);\r\n\r\n    function assertNoDocTypeNotationEntityAncestor(node, allowSelf) {\r\n      if (getDocTypeNotationEntityAncestor(node, allowSelf)) {\r\n        throw new DOMException(\"INVALID_NODE_TYPE_ERR\");\r\n      }\r\n    }\r\n\r\n    function assertValidNodeType(node, invalidTypes) {\r\n      if (!arrayContains(invalidTypes, node.nodeType)) {\r\n        throw new DOMException(\"INVALID_NODE_TYPE_ERR\");\r\n      }\r\n    }\r\n\r\n    function assertValidOffset(node, offset) {\r\n      if (\r\n        offset < 0 ||\r\n        offset >\r\n          (isCharacterDataNode(node) ? node.length : node.childNodes.length)\r\n      ) {\r\n        throw new DOMException(\"INDEX_SIZE_ERR\");\r\n      }\r\n    }\r\n\r\n    function assertSameDocumentOrFragment(node1, node2) {\r\n      if (\r\n        getDocumentOrFragmentContainer(node1, true) !==\r\n        getDocumentOrFragmentContainer(node2, true)\r\n      ) {\r\n        throw new DOMException(\"WRONG_DOCUMENT_ERR\");\r\n      }\r\n    }\r\n\r\n    function assertNodeNotReadOnly(node) {\r\n      if (getReadonlyAncestor(node, true)) {\r\n        throw new DOMException(\"NO_MODIFICATION_ALLOWED_ERR\");\r\n      }\r\n    }\r\n\r\n    function assertNode(node, codeName) {\r\n      if (!node) {\r\n        throw new DOMException(codeName);\r\n      }\r\n    }\r\n\r\n    function isValidOffset(node, offset) {\r\n      return (\r\n        offset <=\r\n        (isCharacterDataNode(node) ? node.length : node.childNodes.length)\r\n      );\r\n    }\r\n\r\n    function isRangeValid(range) {\r\n      return (\r\n        !!range.startContainer &&\r\n        !!range.endContainer &&\r\n        !(\r\n          crashyTextNodes &&\r\n          (dom.isBrokenNode(range.startContainer) ||\r\n            dom.isBrokenNode(range.endContainer))\r\n        ) &&\r\n        getRootContainer(range.startContainer) ==\r\n          getRootContainer(range.endContainer) &&\r\n        isValidOffset(range.startContainer, range.startOffset) &&\r\n        isValidOffset(range.endContainer, range.endOffset)\r\n      );\r\n    }\r\n\r\n    function assertRangeValid(range) {\r\n      if (!isRangeValid(range)) {\r\n        throw new Error(\r\n          \"Range error: Range is not valid. This usually happens after DOM mutation. Range: (\" +\r\n            range.inspect() +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Test the browser's innerHTML support to decide how to implement createContextualFragment\r\n    var styleEl = document.createElement(\"style\");\r\n    var htmlParsingConforms = false;\r\n    try {\r\n      styleEl.innerHTML = \"<b>x</b>\";\r\n      htmlParsingConforms = styleEl.firstChild.nodeType == 3; // Opera incorrectly creates an element node\r\n    } catch (e) {\r\n      // IE 6 and 7 throw\r\n    }\r\n\r\n    api.features.htmlParsingConforms = htmlParsingConforms;\r\n\r\n    var createContextualFragment = htmlParsingConforms\r\n      ? // Implementation as per HTML parsing spec, trusting in the browser's implementation of innerHTML. See\r\n        // discussion and base code for this implementation at issue 67.\r\n        // Spec: http://html5.org/specs/dom-parsing.html#extensions-to-the-range-interface\r\n        // Thanks to Aleks Williams.\r\n        function (fragmentStr) {\r\n          // \"Let node the context object's start's node.\"\r\n          var node = this.startContainer;\r\n          var doc = getDocument(node);\r\n\r\n          // \"If the context object's start's node is null, raise an INVALID_STATE_ERR\r\n          // exception and abort these steps.\"\r\n          if (!node) {\r\n            throw new DOMException(\"INVALID_STATE_ERR\");\r\n          }\r\n\r\n          // \"Let element be as follows, depending on node's interface:\"\r\n          // Document, Document Fragment: null\r\n          var el = null;\r\n\r\n          // \"Element: node\"\r\n          if (node.nodeType == 1) {\r\n            el = node;\r\n\r\n            // \"Text, Comment: node's parentElement\"\r\n          } else if (isCharacterDataNode(node)) {\r\n            el = dom.parentElement(node);\r\n          }\r\n\r\n          // \"If either element is null or element's ownerDocument is an HTML document\r\n          // and element's local name is \"html\" and element's namespace is the HTML\r\n          // namespace\"\r\n          if (\r\n            el === null ||\r\n            (el.nodeName == \"HTML\" &&\r\n              dom.isHtmlNamespace(getDocument(el).documentElement) &&\r\n              dom.isHtmlNamespace(el))\r\n          ) {\r\n            // \"let element be a new Element with \"body\" as its local name and the HTML\r\n            // namespace as its namespace.\"\"\r\n            el = doc.createElement(\"body\");\r\n          } else {\r\n            el = el.cloneNode(false);\r\n          }\r\n\r\n          // \"If the node's document is an HTML document: Invoke the HTML fragment parsing algorithm.\"\r\n          // \"If the node's document is an XML document: Invoke the XML fragment parsing algorithm.\"\r\n          // \"In either case, the algorithm must be invoked with fragment as the input\r\n          // and element as the context element.\"\r\n          el.innerHTML = fragmentStr;\r\n\r\n          // \"If this raises an exception, then abort these steps. Otherwise, let new\r\n          // children be the nodes returned.\"\r\n\r\n          // \"Let fragment be a new DocumentFragment.\"\r\n          // \"Append all new children to fragment.\"\r\n          // \"Return fragment.\"\r\n          return dom.fragmentFromNodeChildren(el);\r\n        }\r\n      : // In this case, innerHTML cannot be trusted, so fall back to a simpler, non-conformant implementation that\r\n        // previous versions of Rangy used (with the exception of using a body element rather than a div)\r\n        function (fragmentStr) {\r\n          var doc = getRangeDocument(this);\r\n          var el = doc.createElement(\"body\");\r\n          el.innerHTML = fragmentStr;\r\n\r\n          return dom.fragmentFromNodeChildren(el);\r\n        };\r\n\r\n    function splitRangeBoundaries(range, positionsToPreserve) {\r\n      assertRangeValid(range);\r\n\r\n      var sc = range.startContainer,\r\n        so = range.startOffset,\r\n        ec = range.endContainer,\r\n        eo = range.endOffset;\r\n      var startEndSame = sc === ec;\r\n\r\n      if (isCharacterDataNode(ec) && eo > 0 && eo < ec.length) {\r\n        splitDataNode(ec, eo, positionsToPreserve);\r\n      }\r\n\r\n      if (isCharacterDataNode(sc) && so > 0 && so < sc.length) {\r\n        sc = splitDataNode(sc, so, positionsToPreserve);\r\n        if (startEndSame) {\r\n          eo -= so;\r\n          ec = sc;\r\n        } else if (ec == sc.parentNode && eo >= getNodeIndex(sc)) {\r\n          eo++;\r\n        }\r\n        so = 0;\r\n      }\r\n      range.setStartAndEnd(sc, so, ec, eo);\r\n    }\r\n\r\n    function rangeToHtml(range) {\r\n      assertRangeValid(range);\r\n      var container = range.commonAncestorContainer.parentNode.cloneNode(false);\r\n      container.appendChild(range.cloneContents());\r\n      return container.innerHTML;\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    var rangeProperties = [\r\n      \"startContainer\",\r\n      \"startOffset\",\r\n      \"endContainer\",\r\n      \"endOffset\",\r\n      \"collapsed\",\r\n      \"commonAncestorContainer\",\r\n    ];\r\n\r\n    var s2s = 0,\r\n      s2e = 1,\r\n      e2e = 2,\r\n      e2s = 3;\r\n    var n_b = 0,\r\n      n_a = 1,\r\n      n_b_a = 2,\r\n      n_i = 3;\r\n\r\n    util.extend(api.rangePrototype, {\r\n      compareBoundaryPoints: function (how, range) {\r\n        assertRangeValid(this);\r\n        assertSameDocumentOrFragment(this.startContainer, range.startContainer);\r\n\r\n        var nodeA, offsetA, nodeB, offsetB;\r\n        var prefixA = how == e2s || how == s2s ? \"start\" : \"end\";\r\n        var prefixB = how == s2e || how == s2s ? \"start\" : \"end\";\r\n        nodeA = this[prefixA + \"Container\"];\r\n        offsetA = this[prefixA + \"Offset\"];\r\n        nodeB = range[prefixB + \"Container\"];\r\n        offsetB = range[prefixB + \"Offset\"];\r\n        return comparePoints(nodeA, offsetA, nodeB, offsetB);\r\n      },\r\n\r\n      insertNode: function (node) {\r\n        assertRangeValid(this);\r\n        assertValidNodeType(node, insertableNodeTypes);\r\n        assertNodeNotReadOnly(this.startContainer);\r\n\r\n        if (isOrIsAncestorOf(node, this.startContainer)) {\r\n          throw new DOMException(\"HIERARCHY_REQUEST_ERR\");\r\n        }\r\n\r\n        // No check for whether the container of the start of the Range is of a type that does not allow\r\n        // children of the type of node: the browser's DOM implementation should do this for us when we attempt\r\n        // to add the node\r\n\r\n        var firstNodeInserted = insertNodeAtPosition(\r\n          node,\r\n          this.startContainer,\r\n          this.startOffset\r\n        );\r\n        this.setStartBefore(firstNodeInserted);\r\n      },\r\n\r\n      cloneContents: function () {\r\n        assertRangeValid(this);\r\n\r\n        var clone, frag;\r\n        if (this.collapsed) {\r\n          return getRangeDocument(this).createDocumentFragment();\r\n        } else {\r\n          if (\r\n            this.startContainer === this.endContainer &&\r\n            isCharacterDataNode(this.startContainer)\r\n          ) {\r\n            clone = this.startContainer.cloneNode(true);\r\n            clone.data = clone.data.slice(this.startOffset, this.endOffset);\r\n            frag = getRangeDocument(this).createDocumentFragment();\r\n            frag.appendChild(clone);\r\n            return frag;\r\n          } else {\r\n            var iterator = new RangeIterator(this, true);\r\n            clone = cloneSubtree(iterator);\r\n            iterator.detach();\r\n          }\r\n          return clone;\r\n        }\r\n      },\r\n\r\n      canSurroundContents: function () {\r\n        assertRangeValid(this);\r\n        assertNodeNotReadOnly(this.startContainer);\r\n        assertNodeNotReadOnly(this.endContainer);\r\n\r\n        // Check if the contents can be surrounded. Specifically, this means whether the range partially selects\r\n        // no non-text nodes.\r\n        var iterator = new RangeIterator(this, true);\r\n        var boundariesInvalid =\r\n          (iterator._first &&\r\n            isNonTextPartiallySelected(iterator._first, this)) ||\r\n          (iterator._last && isNonTextPartiallySelected(iterator._last, this));\r\n        iterator.detach();\r\n        return !boundariesInvalid;\r\n      },\r\n\r\n      surroundContents: function (node) {\r\n        assertValidNodeType(node, surroundNodeTypes);\r\n\r\n        if (!this.canSurroundContents()) {\r\n          throw new DOMException(\"INVALID_STATE_ERR\");\r\n        }\r\n\r\n        // Extract the contents\r\n        var content = this.extractContents();\r\n\r\n        // Clear the children of the node\r\n        if (node.hasChildNodes()) {\r\n          while (node.lastChild) {\r\n            node.removeChild(node.lastChild);\r\n          }\r\n        }\r\n\r\n        // Insert the new node and add the extracted contents\r\n        insertNodeAtPosition(node, this.startContainer, this.startOffset);\r\n        node.appendChild(content);\r\n\r\n        this.selectNode(node);\r\n      },\r\n\r\n      cloneRange: function () {\r\n        assertRangeValid(this);\r\n        var range = new Range(getRangeDocument(this));\r\n        var i = rangeProperties.length,\r\n          prop;\r\n        while (i--) {\r\n          prop = rangeProperties[i];\r\n          range[prop] = this[prop];\r\n        }\r\n        return range;\r\n      },\r\n\r\n      toString: function () {\r\n        assertRangeValid(this);\r\n        var sc = this.startContainer;\r\n        if (sc === this.endContainer && isCharacterDataNode(sc)) {\r\n          return sc.nodeType == 3 || sc.nodeType == 4\r\n            ? sc.data.slice(this.startOffset, this.endOffset)\r\n            : \"\";\r\n        } else {\r\n          var textParts = [],\r\n            iterator = new RangeIterator(this, true);\r\n          iterateSubtree(iterator, function (node) {\r\n            // Accept only text or CDATA nodes, not comments\r\n            if (node.nodeType == 3 || node.nodeType == 4) {\r\n              textParts.push(node.data);\r\n            }\r\n          });\r\n          iterator.detach();\r\n          return textParts.join(\"\");\r\n        }\r\n      },\r\n\r\n      // The methods below are all non-standard. The following batch were introduced by Mozilla but have since\r\n      // been removed from Mozilla.\r\n\r\n      compareNode: function (node) {\r\n        assertRangeValid(this);\r\n\r\n        var parent = node.parentNode;\r\n        var nodeIndex = getNodeIndex(node);\r\n\r\n        if (!parent) {\r\n          throw new DOMException(\"NOT_FOUND_ERR\");\r\n        }\r\n\r\n        var startComparison = this.comparePoint(parent, nodeIndex),\r\n          endComparison = this.comparePoint(parent, nodeIndex + 1);\r\n\r\n        if (startComparison < 0) {\r\n          // Node starts before\r\n          return endComparison > 0 ? n_b_a : n_b;\r\n        } else {\r\n          return endComparison > 0 ? n_a : n_i;\r\n        }\r\n      },\r\n\r\n      comparePoint: function (node, offset) {\r\n        assertRangeValid(this);\r\n        assertNode(node, \"HIERARCHY_REQUEST_ERR\");\r\n        assertSameDocumentOrFragment(node, this.startContainer);\r\n\r\n        if (\r\n          comparePoints(node, offset, this.startContainer, this.startOffset) < 0\r\n        ) {\r\n          return -1;\r\n        } else if (\r\n          comparePoints(node, offset, this.endContainer, this.endOffset) > 0\r\n        ) {\r\n          return 1;\r\n        }\r\n        return 0;\r\n      },\r\n\r\n      createContextualFragment: createContextualFragment,\r\n\r\n      toHtml: function () {\r\n        return rangeToHtml(this);\r\n      },\r\n\r\n      // touchingIsIntersecting determines whether this method considers a node that borders a range intersects\r\n      // with it (as in WebKit) or not (as in Gecko pre-1.9, and the default)\r\n      intersectsNode: function (node, touchingIsIntersecting) {\r\n        assertRangeValid(this);\r\n        if (getRootContainer(node) != getRangeRoot(this)) {\r\n          return false;\r\n        }\r\n\r\n        var parent = node.parentNode,\r\n          offset = getNodeIndex(node);\r\n        if (!parent) {\r\n          return true;\r\n        }\r\n\r\n        var startComparison = comparePoints(\r\n            parent,\r\n            offset,\r\n            this.endContainer,\r\n            this.endOffset\r\n          ),\r\n          endComparison = comparePoints(\r\n            parent,\r\n            offset + 1,\r\n            this.startContainer,\r\n            this.startOffset\r\n          );\r\n\r\n        return touchingIsIntersecting\r\n          ? startComparison <= 0 && endComparison >= 0\r\n          : startComparison < 0 && endComparison > 0;\r\n      },\r\n\r\n      isPointInRange: function (node, offset) {\r\n        assertRangeValid(this);\r\n        assertNode(node, \"HIERARCHY_REQUEST_ERR\");\r\n        assertSameDocumentOrFragment(node, this.startContainer);\r\n\r\n        return (\r\n          comparePoints(node, offset, this.startContainer, this.startOffset) >=\r\n            0 &&\r\n          comparePoints(node, offset, this.endContainer, this.endOffset) <= 0\r\n        );\r\n      },\r\n\r\n      // The methods below are non-standard and invented by me.\r\n\r\n      // Sharing a boundary start-to-end or end-to-start does not count as intersection.\r\n      intersectsRange: function (range) {\r\n        return rangesIntersect(this, range, false);\r\n      },\r\n\r\n      // Sharing a boundary start-to-end or end-to-start does count as intersection.\r\n      intersectsOrTouchesRange: function (range) {\r\n        return rangesIntersect(this, range, true);\r\n      },\r\n\r\n      intersection: function (range) {\r\n        if (this.intersectsRange(range)) {\r\n          var startComparison = comparePoints(\r\n              this.startContainer,\r\n              this.startOffset,\r\n              range.startContainer,\r\n              range.startOffset\r\n            ),\r\n            endComparison = comparePoints(\r\n              this.endContainer,\r\n              this.endOffset,\r\n              range.endContainer,\r\n              range.endOffset\r\n            );\r\n\r\n          var intersectionRange = this.cloneRange();\r\n          if (startComparison == -1) {\r\n            intersectionRange.setStart(range.startContainer, range.startOffset);\r\n          }\r\n          if (endComparison == 1) {\r\n            intersectionRange.setEnd(range.endContainer, range.endOffset);\r\n          }\r\n          return intersectionRange;\r\n        }\r\n        return null;\r\n      },\r\n\r\n      union: function (range) {\r\n        if (this.intersectsOrTouchesRange(range)) {\r\n          var unionRange = this.cloneRange();\r\n          if (\r\n            comparePoints(\r\n              range.startContainer,\r\n              range.startOffset,\r\n              this.startContainer,\r\n              this.startOffset\r\n            ) == -1\r\n          ) {\r\n            unionRange.setStart(range.startContainer, range.startOffset);\r\n          }\r\n          if (\r\n            comparePoints(\r\n              range.endContainer,\r\n              range.endOffset,\r\n              this.endContainer,\r\n              this.endOffset\r\n            ) == 1\r\n          ) {\r\n            unionRange.setEnd(range.endContainer, range.endOffset);\r\n          }\r\n          return unionRange;\r\n        } else {\r\n          throw new DOMException(\"Ranges do not intersect\");\r\n        }\r\n      },\r\n\r\n      containsNode: function (node, allowPartial) {\r\n        if (allowPartial) {\r\n          return this.intersectsNode(node, false);\r\n        } else {\r\n          return this.compareNode(node) == n_i;\r\n        }\r\n      },\r\n\r\n      containsNodeContents: function (node) {\r\n        return (\r\n          this.comparePoint(node, 0) >= 0 &&\r\n          this.comparePoint(node, getNodeLength(node)) <= 0\r\n        );\r\n      },\r\n\r\n      containsRange: function (range) {\r\n        var intersection = this.intersection(range);\r\n        return intersection !== null && range.equals(intersection);\r\n      },\r\n\r\n      containsNodeText: function (node) {\r\n        var nodeRange = this.cloneRange();\r\n        nodeRange.selectNode(node);\r\n        var textNodes = nodeRange.getNodes([3]);\r\n        if (textNodes.length > 0) {\r\n          nodeRange.setStart(textNodes[0], 0);\r\n          var lastTextNode = textNodes.pop();\r\n          nodeRange.setEnd(lastTextNode, lastTextNode.length);\r\n          return this.containsRange(nodeRange);\r\n        } else {\r\n          return this.containsNodeContents(node);\r\n        }\r\n      },\r\n\r\n      getNodes: function (nodeTypes, filter) {\r\n        assertRangeValid(this);\r\n        return getNodesInRange(this, nodeTypes, filter);\r\n      },\r\n\r\n      getDocument: function () {\r\n        return getRangeDocument(this);\r\n      },\r\n\r\n      collapseBefore: function (node) {\r\n        this.setEndBefore(node);\r\n        this.collapse(false);\r\n      },\r\n\r\n      collapseAfter: function (node) {\r\n        this.setStartAfter(node);\r\n        this.collapse(true);\r\n      },\r\n\r\n      getBookmark: function (containerNode) {\r\n        var doc = getRangeDocument(this);\r\n        var preSelectionRange = api.createRange(doc);\r\n        containerNode = containerNode || dom.getBody(doc);\r\n        preSelectionRange.selectNodeContents(containerNode);\r\n        var range = this.intersection(preSelectionRange);\r\n        var start = 0,\r\n          end = 0;\r\n        if (range) {\r\n          preSelectionRange.setEnd(range.startContainer, range.startOffset);\r\n          start = preSelectionRange.toString().length;\r\n          end = start + range.toString().length;\r\n        }\r\n\r\n        return {\r\n          start: start,\r\n          end: end,\r\n          containerNode: containerNode,\r\n        };\r\n      },\r\n\r\n      moveToBookmark: function (bookmark) {\r\n        var containerNode = bookmark.containerNode;\r\n        var charIndex = 0;\r\n        this.setStart(containerNode, 0);\r\n        this.collapse(true);\r\n        var nodeStack = [containerNode],\r\n          node,\r\n          foundStart = false,\r\n          stop = false;\r\n        var nextCharIndex, i, childNodes;\r\n\r\n        while (!stop && (node = nodeStack.pop())) {\r\n          if (node.nodeType == 3) {\r\n            nextCharIndex = charIndex + node.length;\r\n            if (\r\n              !foundStart &&\r\n              bookmark.start >= charIndex &&\r\n              bookmark.start <= nextCharIndex\r\n            ) {\r\n              this.setStart(node, bookmark.start - charIndex);\r\n              foundStart = true;\r\n            }\r\n            if (\r\n              foundStart &&\r\n              bookmark.end >= charIndex &&\r\n              bookmark.end <= nextCharIndex\r\n            ) {\r\n              this.setEnd(node, bookmark.end - charIndex);\r\n              stop = true;\r\n            }\r\n            charIndex = nextCharIndex;\r\n          } else {\r\n            childNodes = node.childNodes;\r\n            i = childNodes.length;\r\n            while (i--) {\r\n              nodeStack.push(childNodes[i]);\r\n            }\r\n          }\r\n        }\r\n      },\r\n\r\n      getName: function () {\r\n        return \"DomRange\";\r\n      },\r\n\r\n      equals: function (range) {\r\n        return Range.rangesEqual(this, range);\r\n      },\r\n\r\n      isValid: function () {\r\n        return isRangeValid(this);\r\n      },\r\n\r\n      inspect: function () {\r\n        return inspect(this);\r\n      },\r\n\r\n      detach: function () {\r\n        // In DOM4, detach() is now a no-op.\r\n      },\r\n    });\r\n\r\n    function copyComparisonConstantsToObject(obj) {\r\n      obj.START_TO_START = s2s;\r\n      obj.START_TO_END = s2e;\r\n      obj.END_TO_END = e2e;\r\n      obj.END_TO_START = e2s;\r\n\r\n      obj.NODE_BEFORE = n_b;\r\n      obj.NODE_AFTER = n_a;\r\n      obj.NODE_BEFORE_AND_AFTER = n_b_a;\r\n      obj.NODE_INSIDE = n_i;\r\n    }\r\n\r\n    function copyComparisonConstants(constructor) {\r\n      copyComparisonConstantsToObject(constructor);\r\n      copyComparisonConstantsToObject(constructor.prototype);\r\n    }\r\n\r\n    function createRangeContentRemover(remover, boundaryUpdater) {\r\n      return function () {\r\n        assertRangeValid(this);\r\n\r\n        var sc = this.startContainer,\r\n          so = this.startOffset,\r\n          root = this.commonAncestorContainer;\r\n\r\n        var iterator = new RangeIterator(this, true);\r\n\r\n        // Work out where to position the range after content removal\r\n        var node, boundary;\r\n        if (sc !== root) {\r\n          node = getClosestAncestorIn(sc, root, true);\r\n          boundary = getBoundaryAfterNode(node);\r\n          sc = boundary.node;\r\n          so = boundary.offset;\r\n        }\r\n\r\n        // Check none of the range is read-only\r\n        iterateSubtree(iterator, assertNodeNotReadOnly);\r\n\r\n        iterator.reset();\r\n\r\n        // Remove the content\r\n        var returnValue = remover(iterator);\r\n        iterator.detach();\r\n\r\n        // Move to the new position\r\n        boundaryUpdater(this, sc, so, sc, so);\r\n\r\n        return returnValue;\r\n      };\r\n    }\r\n\r\n    function createPrototypeRange(constructor, boundaryUpdater) {\r\n      function createBeforeAfterNodeSetter(isBefore, isStart) {\r\n        return function (node) {\r\n          assertValidNodeType(node, beforeAfterNodeTypes);\r\n          assertValidNodeType(getRootContainer(node), rootContainerNodeTypes);\r\n\r\n          var boundary = (\r\n            isBefore ? getBoundaryBeforeNode : getBoundaryAfterNode\r\n          )(node);\r\n          (isStart\r\n            ? setRangeStart\r\n            : setRangeEnd)(this, boundary.node, boundary.offset);\r\n        };\r\n      }\r\n\r\n      function setRangeStart(range, node, offset) {\r\n        var ec = range.endContainer,\r\n          eo = range.endOffset;\r\n        if (node !== range.startContainer || offset !== range.startOffset) {\r\n          // Check the root containers of the range and the new boundary, and also check whether the new boundary\r\n          // is after the current end. In either case, collapse the range to the new position\r\n          if (\r\n            getRootContainer(node) != getRootContainer(ec) ||\r\n            comparePoints(node, offset, ec, eo) == 1\r\n          ) {\r\n            ec = node;\r\n            eo = offset;\r\n          }\r\n          boundaryUpdater(range, node, offset, ec, eo);\r\n        }\r\n      }\r\n\r\n      function setRangeEnd(range, node, offset) {\r\n        var sc = range.startContainer,\r\n          so = range.startOffset;\r\n        if (node !== range.endContainer || offset !== range.endOffset) {\r\n          // Check the root containers of the range and the new boundary, and also check whether the new boundary\r\n          // is after the current end. In either case, collapse the range to the new position\r\n          if (\r\n            getRootContainer(node) != getRootContainer(sc) ||\r\n            comparePoints(node, offset, sc, so) == -1\r\n          ) {\r\n            sc = node;\r\n            so = offset;\r\n          }\r\n          boundaryUpdater(range, sc, so, node, offset);\r\n        }\r\n      }\r\n\r\n      // Set up inheritance\r\n      var F = function () {};\r\n      F.prototype = api.rangePrototype;\r\n      constructor.prototype = new F();\r\n\r\n      util.extend(constructor.prototype, {\r\n        setStart: function (node, offset) {\r\n          assertNoDocTypeNotationEntityAncestor(node, true);\r\n          assertValidOffset(node, offset);\r\n\r\n          setRangeStart(this, node, offset);\r\n        },\r\n\r\n        setEnd: function (node, offset) {\r\n          assertNoDocTypeNotationEntityAncestor(node, true);\r\n          assertValidOffset(node, offset);\r\n\r\n          setRangeEnd(this, node, offset);\r\n        },\r\n\r\n        /**\r\n         * Convenience method to set a range's start and end boundaries. Overloaded as follows:\r\n         * - Two parameters (node, offset) creates a collapsed range at that position\r\n         * - Three parameters (node, startOffset, endOffset) creates a range contained with node starting at\r\n         *   startOffset and ending at endOffset\r\n         * - Four parameters (startNode, startOffset, endNode, endOffset) creates a range starting at startOffset in\r\n         *   startNode and ending at endOffset in endNode\r\n         */\r\n        setStartAndEnd: function () {\r\n          var args = arguments;\r\n          var sc = args[0],\r\n            so = args[1],\r\n            ec = sc,\r\n            eo = so;\r\n\r\n          switch (args.length) {\r\n            case 3:\r\n              eo = args[2];\r\n              break;\r\n            case 4:\r\n              ec = args[2];\r\n              eo = args[3];\r\n              break;\r\n          }\r\n\r\n          boundaryUpdater(this, sc, so, ec, eo);\r\n        },\r\n\r\n        setBoundary: function (node, offset, isStart) {\r\n          this[\"set\" + (isStart ? \"Start\" : \"End\")](node, offset);\r\n        },\r\n\r\n        setStartBefore: createBeforeAfterNodeSetter(true, true),\r\n        setStartAfter: createBeforeAfterNodeSetter(false, true),\r\n        setEndBefore: createBeforeAfterNodeSetter(true, false),\r\n        setEndAfter: createBeforeAfterNodeSetter(false, false),\r\n\r\n        collapse: function (isStart) {\r\n          assertRangeValid(this);\r\n          if (isStart) {\r\n            boundaryUpdater(\r\n              this,\r\n              this.startContainer,\r\n              this.startOffset,\r\n              this.startContainer,\r\n              this.startOffset\r\n            );\r\n          } else {\r\n            boundaryUpdater(\r\n              this,\r\n              this.endContainer,\r\n              this.endOffset,\r\n              this.endContainer,\r\n              this.endOffset\r\n            );\r\n          }\r\n        },\r\n\r\n        selectNodeContents: function (node) {\r\n          assertNoDocTypeNotationEntityAncestor(node, true);\r\n\r\n          boundaryUpdater(this, node, 0, node, getNodeLength(node));\r\n        },\r\n\r\n        selectNode: function (node) {\r\n          assertNoDocTypeNotationEntityAncestor(node, false);\r\n          assertValidNodeType(node, beforeAfterNodeTypes);\r\n\r\n          var start = getBoundaryBeforeNode(node),\r\n            end = getBoundaryAfterNode(node);\r\n          boundaryUpdater(this, start.node, start.offset, end.node, end.offset);\r\n        },\r\n\r\n        extractContents: createRangeContentRemover(\r\n          extractSubtree,\r\n          boundaryUpdater\r\n        ),\r\n\r\n        deleteContents: createRangeContentRemover(\r\n          deleteSubtree,\r\n          boundaryUpdater\r\n        ),\r\n\r\n        canSurroundContents: function () {\r\n          assertRangeValid(this);\r\n          assertNodeNotReadOnly(this.startContainer);\r\n          assertNodeNotReadOnly(this.endContainer);\r\n\r\n          // Check if the contents can be surrounded. Specifically, this means whether the range partially selects\r\n          // no non-text nodes.\r\n          var iterator = new RangeIterator(this, true);\r\n          var boundariesInvalid =\r\n            (iterator._first &&\r\n              isNonTextPartiallySelected(iterator._first, this)) ||\r\n            (iterator._last &&\r\n              isNonTextPartiallySelected(iterator._last, this));\r\n          iterator.detach();\r\n          return !boundariesInvalid;\r\n        },\r\n\r\n        splitBoundaries: function () {\r\n          splitRangeBoundaries(this);\r\n        },\r\n\r\n        splitBoundariesPreservingPositions: function (positionsToPreserve) {\r\n          splitRangeBoundaries(this, positionsToPreserve);\r\n        },\r\n\r\n        normalizeBoundaries: function () {\r\n          assertRangeValid(this);\r\n\r\n          var sc = this.startContainer,\r\n            so = this.startOffset,\r\n            ec = this.endContainer,\r\n            eo = this.endOffset;\r\n\r\n          var mergeForward = function (node) {\r\n            var sibling = node.nextSibling;\r\n            if (sibling && sibling.nodeType == node.nodeType) {\r\n              ec = node;\r\n              eo = node.length;\r\n              node.appendData(sibling.data);\r\n              removeNode(sibling);\r\n            }\r\n          };\r\n\r\n          var mergeBackward = function (node) {\r\n            var sibling = node.previousSibling;\r\n            if (sibling && sibling.nodeType == node.nodeType) {\r\n              sc = node;\r\n              var nodeLength = node.length;\r\n              so = sibling.length;\r\n              node.insertData(0, sibling.data);\r\n              removeNode(sibling);\r\n              if (sc == ec) {\r\n                eo += so;\r\n                ec = sc;\r\n              } else if (ec == node.parentNode) {\r\n                var nodeIndex = getNodeIndex(node);\r\n                if (eo == nodeIndex) {\r\n                  ec = node;\r\n                  eo = nodeLength;\r\n                } else if (eo > nodeIndex) {\r\n                  eo--;\r\n                }\r\n              }\r\n            }\r\n          };\r\n\r\n          var normalizeStart = true;\r\n          var sibling;\r\n\r\n          if (isCharacterDataNode(ec)) {\r\n            if (eo == ec.length) {\r\n              mergeForward(ec);\r\n            } else if (eo == 0) {\r\n              sibling = ec.previousSibling;\r\n              if (sibling && sibling.nodeType == ec.nodeType) {\r\n                eo = sibling.length;\r\n                if (sc == ec) {\r\n                  normalizeStart = false;\r\n                }\r\n                sibling.appendData(ec.data);\r\n                removeNode(ec);\r\n                ec = sibling;\r\n              }\r\n            }\r\n          } else {\r\n            if (eo > 0) {\r\n              var endNode = ec.childNodes[eo - 1];\r\n              if (endNode && isCharacterDataNode(endNode)) {\r\n                mergeForward(endNode);\r\n              }\r\n            }\r\n            normalizeStart = !this.collapsed;\r\n          }\r\n\r\n          if (normalizeStart) {\r\n            if (isCharacterDataNode(sc)) {\r\n              if (so == 0) {\r\n                mergeBackward(sc);\r\n              } else if (so == sc.length) {\r\n                sibling = sc.nextSibling;\r\n                if (sibling && sibling.nodeType == sc.nodeType) {\r\n                  if (ec == sibling) {\r\n                    ec = sc;\r\n                    eo += sc.length;\r\n                  }\r\n                  sc.appendData(sibling.data);\r\n                  removeNode(sibling);\r\n                }\r\n              }\r\n            } else {\r\n              if (so < sc.childNodes.length) {\r\n                var startNode = sc.childNodes[so];\r\n                if (startNode && isCharacterDataNode(startNode)) {\r\n                  mergeBackward(startNode);\r\n                }\r\n              }\r\n            }\r\n          } else {\r\n            sc = ec;\r\n            so = eo;\r\n          }\r\n\r\n          boundaryUpdater(this, sc, so, ec, eo);\r\n        },\r\n\r\n        collapseToPoint: function (node, offset) {\r\n          assertNoDocTypeNotationEntityAncestor(node, true);\r\n          assertValidOffset(node, offset);\r\n          this.setStartAndEnd(node, offset);\r\n        },\r\n      });\r\n\r\n      copyComparisonConstants(constructor);\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Updates commonAncestorContainer and collapsed after boundary change\r\n    function updateCollapsedAndCommonAncestor(range) {\r\n      range.collapsed =\r\n        range.startContainer === range.endContainer &&\r\n        range.startOffset === range.endOffset;\r\n      range.commonAncestorContainer = range.collapsed\r\n        ? range.startContainer\r\n        : dom.getCommonAncestor(range.startContainer, range.endContainer);\r\n    }\r\n\r\n    function updateBoundaries(\r\n      range,\r\n      startContainer,\r\n      startOffset,\r\n      endContainer,\r\n      endOffset\r\n    ) {\r\n      range.startContainer = startContainer;\r\n      range.startOffset = startOffset;\r\n      range.endContainer = endContainer;\r\n      range.endOffset = endOffset;\r\n      range.document = dom.getDocument(startContainer);\r\n\r\n      updateCollapsedAndCommonAncestor(range);\r\n    }\r\n\r\n    function Range(doc) {\r\n      this.startContainer = doc;\r\n      this.startOffset = 0;\r\n      this.endContainer = doc;\r\n      this.endOffset = 0;\r\n      this.document = doc;\r\n      updateCollapsedAndCommonAncestor(this);\r\n    }\r\n\r\n    createPrototypeRange(Range, updateBoundaries);\r\n\r\n    util.extend(Range, {\r\n      rangeProperties: rangeProperties,\r\n      RangeIterator: RangeIterator,\r\n      copyComparisonConstants: copyComparisonConstants,\r\n      createPrototypeRange: createPrototypeRange,\r\n      inspect: inspect,\r\n      toHtml: rangeToHtml,\r\n      getRangeDocument: getRangeDocument,\r\n      rangesEqual: function (r1, r2) {\r\n        return (\r\n          r1.startContainer === r2.startContainer &&\r\n          r1.startOffset === r2.startOffset &&\r\n          r1.endContainer === r2.endContainer &&\r\n          r1.endOffset === r2.endOffset\r\n        );\r\n      },\r\n    });\r\n\r\n    api.DomRange = Range;\r\n  });\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // Wrappers for the browser's native DOM Range and/or TextRange implementation\r\n  api.createCoreModule(\"WrappedRange\", [\"DomRange\"], function (api, module) {\r\n    var WrappedRange, WrappedTextRange;\r\n    var dom = api.dom;\r\n    var util = api.util;\r\n    var DomPosition = dom.DomPosition;\r\n    var DomRange = api.DomRange;\r\n    var getBody = dom.getBody;\r\n    var getContentDocument = dom.getContentDocument;\r\n    var isCharacterDataNode = dom.isCharacterDataNode;\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    if (api.features.implementsDomRange) {\r\n      // This is a wrapper around the browser's native DOM Range. It has two aims:\r\n      // - Provide workarounds for specific browser bugs\r\n      // - provide convenient extensions, which are inherited from Rangy's DomRange\r\n\r\n      (function () {\r\n        var rangeProto;\r\n        var rangeProperties = DomRange.rangeProperties;\r\n\r\n        function updateRangeProperties(range) {\r\n          var i = rangeProperties.length,\r\n            prop;\r\n          while (i--) {\r\n            prop = rangeProperties[i];\r\n            range[prop] = range.nativeRange[prop];\r\n          }\r\n          // Fix for broken collapsed property in IE 9.\r\n          range.collapsed =\r\n            range.startContainer === range.endContainer &&\r\n            range.startOffset === range.endOffset;\r\n        }\r\n\r\n        function updateNativeRange(\r\n          range,\r\n          startContainer,\r\n          startOffset,\r\n          endContainer,\r\n          endOffset\r\n        ) {\r\n          var startMoved =\r\n            range.startContainer !== startContainer ||\r\n            range.startOffset != startOffset;\r\n          var endMoved =\r\n            range.endContainer !== endContainer || range.endOffset != endOffset;\r\n          var nativeRangeDifferent = !range.equals(range.nativeRange);\r\n\r\n          // Always set both boundaries for the benefit of IE9 (see issue 35)\r\n          if (startMoved || endMoved || nativeRangeDifferent) {\r\n            range.setEnd(endContainer, endOffset);\r\n            range.setStart(startContainer, startOffset);\r\n          }\r\n        }\r\n\r\n        var createBeforeAfterNodeSetter;\r\n\r\n        WrappedRange = function (range) {\r\n          if (!range) {\r\n            throw module.createError(\"WrappedRange: Range must be specified\");\r\n          }\r\n          this.nativeRange = range;\r\n          updateRangeProperties(this);\r\n        };\r\n\r\n        DomRange.createPrototypeRange(WrappedRange, updateNativeRange);\r\n\r\n        rangeProto = WrappedRange.prototype;\r\n\r\n        rangeProto.selectNode = function (node) {\r\n          this.nativeRange.selectNode(node);\r\n          updateRangeProperties(this);\r\n        };\r\n\r\n        rangeProto.cloneContents = function () {\r\n          return this.nativeRange.cloneContents();\r\n        };\r\n\r\n        // Due to a long-standing Firefox bug that I have not been able to find a reliable way to detect,\r\n        // insertNode() is never delegated to the native range.\r\n\r\n        rangeProto.surroundContents = function (node) {\r\n          this.nativeRange.surroundContents(node);\r\n          updateRangeProperties(this);\r\n        };\r\n\r\n        rangeProto.collapse = function (isStart) {\r\n          this.nativeRange.collapse(isStart);\r\n          updateRangeProperties(this);\r\n        };\r\n\r\n        rangeProto.cloneRange = function () {\r\n          return new WrappedRange(this.nativeRange.cloneRange());\r\n        };\r\n\r\n        rangeProto.refresh = function () {\r\n          updateRangeProperties(this);\r\n        };\r\n\r\n        rangeProto.toString = function () {\r\n          return this.nativeRange.toString();\r\n        };\r\n\r\n        // Create test range and node for feature detection\r\n\r\n        var testTextNode = document.createTextNode(\"test\");\r\n        getBody(document).appendChild(testTextNode);\r\n        var range = document.createRange();\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Test for Firefox 2 bug that prevents moving the start of a Range to a point after its current end and\r\n        // correct for it\r\n\r\n        range.setStart(testTextNode, 0);\r\n        range.setEnd(testTextNode, 0);\r\n\r\n        try {\r\n          range.setStart(testTextNode, 1);\r\n\r\n          rangeProto.setStart = function (node, offset) {\r\n            this.nativeRange.setStart(node, offset);\r\n            updateRangeProperties(this);\r\n          };\r\n\r\n          rangeProto.setEnd = function (node, offset) {\r\n            this.nativeRange.setEnd(node, offset);\r\n            updateRangeProperties(this);\r\n          };\r\n\r\n          createBeforeAfterNodeSetter = function (name) {\r\n            return function (node) {\r\n              this.nativeRange[name](node);\r\n              updateRangeProperties(this);\r\n            };\r\n          };\r\n        } catch (ex) {\r\n          rangeProto.setStart = function (node, offset) {\r\n            try {\r\n              this.nativeRange.setStart(node, offset);\r\n            } catch (ex) {\r\n              this.nativeRange.setEnd(node, offset);\r\n              this.nativeRange.setStart(node, offset);\r\n            }\r\n            updateRangeProperties(this);\r\n          };\r\n\r\n          rangeProto.setEnd = function (node, offset) {\r\n            try {\r\n              this.nativeRange.setEnd(node, offset);\r\n            } catch (ex) {\r\n              this.nativeRange.setStart(node, offset);\r\n              this.nativeRange.setEnd(node, offset);\r\n            }\r\n            updateRangeProperties(this);\r\n          };\r\n\r\n          createBeforeAfterNodeSetter = function (name, oppositeName) {\r\n            return function (node) {\r\n              try {\r\n                this.nativeRange[name](node);\r\n              } catch (ex) {\r\n                this.nativeRange[oppositeName](node);\r\n                this.nativeRange[name](node);\r\n              }\r\n              updateRangeProperties(this);\r\n            };\r\n          };\r\n        }\r\n\r\n        rangeProto.setStartBefore = createBeforeAfterNodeSetter(\r\n          \"setStartBefore\",\r\n          \"setEndBefore\"\r\n        );\r\n        rangeProto.setStartAfter = createBeforeAfterNodeSetter(\r\n          \"setStartAfter\",\r\n          \"setEndAfter\"\r\n        );\r\n        rangeProto.setEndBefore = createBeforeAfterNodeSetter(\r\n          \"setEndBefore\",\r\n          \"setStartBefore\"\r\n        );\r\n        rangeProto.setEndAfter = createBeforeAfterNodeSetter(\r\n          \"setEndAfter\",\r\n          \"setStartAfter\"\r\n        );\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Always use DOM4-compliant selectNodeContents implementation: it's simpler and less code than testing\r\n        // whether the native implementation can be trusted\r\n        rangeProto.selectNodeContents = function (node) {\r\n          this.setStartAndEnd(node, 0, dom.getNodeLength(node));\r\n        };\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Test for and correct WebKit bug that has the behaviour of compareBoundaryPoints round the wrong way for\r\n        // constants START_TO_END and END_TO_START: https://bugs.webkit.org/show_bug.cgi?id=20738\r\n\r\n        range.selectNodeContents(testTextNode);\r\n        range.setEnd(testTextNode, 3);\r\n\r\n        var range2 = document.createRange();\r\n        range2.selectNodeContents(testTextNode);\r\n        range2.setEnd(testTextNode, 4);\r\n        range2.setStart(testTextNode, 2);\r\n\r\n        if (\r\n          range.compareBoundaryPoints(range.START_TO_END, range2) == -1 &&\r\n          range.compareBoundaryPoints(range.END_TO_START, range2) == 1\r\n        ) {\r\n          // This is the wrong way round, so correct for it\r\n\r\n          rangeProto.compareBoundaryPoints = function (type, range) {\r\n            range = range.nativeRange || range;\r\n            if (type == range.START_TO_END) {\r\n              type = range.END_TO_START;\r\n            } else if (type == range.END_TO_START) {\r\n              type = range.START_TO_END;\r\n            }\r\n            return this.nativeRange.compareBoundaryPoints(type, range);\r\n          };\r\n        } else {\r\n          rangeProto.compareBoundaryPoints = function (type, range) {\r\n            return this.nativeRange.compareBoundaryPoints(\r\n              type,\r\n              range.nativeRange || range\r\n            );\r\n          };\r\n        }\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Test for IE deleteContents() and extractContents() bug and correct it. See issue 107.\r\n\r\n        var el = document.createElement(\"div\");\r\n        el.innerHTML = \"123\";\r\n        var textNode = el.firstChild;\r\n        var body = getBody(document);\r\n        body.appendChild(el);\r\n\r\n        range.setStart(textNode, 1);\r\n        range.setEnd(textNode, 2);\r\n        range.deleteContents();\r\n\r\n        if (textNode.data == \"13\") {\r\n          // Behaviour is correct per DOM4 Range so wrap the browser's implementation of deleteContents() and\r\n          // extractContents()\r\n          rangeProto.deleteContents = function () {\r\n            this.nativeRange.deleteContents();\r\n            updateRangeProperties(this);\r\n          };\r\n\r\n          rangeProto.extractContents = function () {\r\n            var frag = this.nativeRange.extractContents();\r\n            updateRangeProperties(this);\r\n            return frag;\r\n          };\r\n        } else {\r\n        }\r\n\r\n        body.removeChild(el);\r\n        body = null;\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Test for existence of createContextualFragment and delegate to it if it exists\r\n        if (util.isHostMethod(range, \"createContextualFragment\")) {\r\n          rangeProto.createContextualFragment = function (fragmentStr) {\r\n            return this.nativeRange.createContextualFragment(fragmentStr);\r\n          };\r\n        }\r\n\r\n        /*--------------------------------------------------------------------------------------------------------*/\r\n\r\n        // Clean up\r\n        getBody(document).removeChild(testTextNode);\r\n\r\n        rangeProto.getName = function () {\r\n          return \"WrappedRange\";\r\n        };\r\n\r\n        api.WrappedRange = WrappedRange;\r\n\r\n        api.createNativeRange = function (doc) {\r\n          doc = getContentDocument(doc, module, \"createNativeRange\");\r\n          return doc.createRange();\r\n        };\r\n      })();\r\n    }\r\n\r\n    if (api.features.implementsTextRange) {\r\n      /*\r\n            This is a workaround for a bug where IE returns the wrong container element from the TextRange's parentElement()\r\n            method. For example, in the following (where pipes denote the selection boundaries):\r\n\r\n            <ul id=\"ul\"><li id=\"a\">| a </li><li id=\"b\"> b |</li></ul>\r\n\r\n            var range = document.selection.createRange();\r\n            alert(range.parentElement().id); // Should alert \"ul\" but alerts \"b\"\r\n\r\n            This method returns the common ancestor node of the following:\r\n            - the parentElement() of the textRange\r\n            - the parentElement() of the textRange after calling collapse(true)\r\n            - the parentElement() of the textRange after calling collapse(false)\r\n            */\r\n      var getTextRangeContainerElement = function (textRange) {\r\n        var parentEl = textRange.parentElement();\r\n        var range = textRange.duplicate();\r\n        range.collapse(true);\r\n        var startEl = range.parentElement();\r\n        range = textRange.duplicate();\r\n        range.collapse(false);\r\n        var endEl = range.parentElement();\r\n        var startEndContainer =\r\n          startEl == endEl ? startEl : dom.getCommonAncestor(startEl, endEl);\r\n\r\n        // debugger\r\n        return startEndContainer == parentEl\r\n          ? startEndContainer\r\n          : dom.getCommonAncestor(parentEl, startEndContainer);\r\n      };\r\n\r\n      var textRangeIsCollapsed = function (textRange) {\r\n        return textRange.compareEndPoints(\"StartToEnd\", textRange) == 0;\r\n      };\r\n\r\n      // Gets the boundary of a TextRange expressed as a node and an offset within that node. This function started\r\n      // out as an improved version of code found in Tim Cameron Ryan's IERange (http://code.google.com/p/ierange/)\r\n      // but has grown, fixing problems with line breaks in preformatted text, adding workaround for IE TextRange\r\n      // bugs, handling for inputs and images, plus optimizations.\r\n      var getTextRangeBoundaryPosition = function (\r\n        textRange,\r\n        wholeRangeContainerElement,\r\n        isStart,\r\n        isCollapsed,\r\n        startInfo\r\n      ) {\r\n        var workingRange = textRange.duplicate();\r\n        workingRange.collapse(isStart);\r\n        var containerElement = workingRange.parentElement();\r\n\r\n        // Sometimes collapsing a TextRange that's at the start of a text node can move it into the previous node, so\r\n        // check for that\r\n        if (\r\n          !dom.isOrIsAncestorOf(wholeRangeContainerElement, containerElement)\r\n        ) {\r\n          containerElement = wholeRangeContainerElement;\r\n        }\r\n\r\n        // Deal with nodes that cannot \"contain rich HTML markup\". In practice, this means form inputs, images and\r\n        // similar. See http://msdn.microsoft.com/en-us/library/aa703950%28VS.85%29.aspx\r\n        if (!containerElement.canHaveHTML) {\r\n          var pos = new DomPosition(\r\n            containerElement.parentNode,\r\n            dom.getNodeIndex(containerElement)\r\n          );\r\n          return {\r\n            boundaryPosition: pos,\r\n            nodeInfo: {\r\n              nodeIndex: pos.offset,\r\n              containerElement: pos.node,\r\n            },\r\n          };\r\n        }\r\n\r\n        var workingNode = dom\r\n          .getDocument(containerElement)\r\n          .createElement(\"span\");\r\n\r\n        // Workaround for HTML5 Shiv's insane violation of document.createElement(). See Rangy issue 104 and HTML5\r\n        // Shiv issue 64: https://github.com/aFarkas/html5shiv/issues/64\r\n        if (workingNode.parentNode) {\r\n          dom.removeNode(workingNode);\r\n        }\r\n\r\n        var comparison,\r\n          workingComparisonType = isStart ? \"StartToStart\" : \"StartToEnd\";\r\n        var previousNode, nextNode, boundaryPosition, boundaryNode;\r\n        var start =\r\n          startInfo && startInfo.containerElement == containerElement\r\n            ? startInfo.nodeIndex\r\n            : 0;\r\n        var childNodeCount = containerElement.childNodes.length;\r\n        var end = childNodeCount;\r\n\r\n        // Check end first. Code within the loop assumes that the endth child node of the container is definitely\r\n        // after the range boundary.\r\n        var nodeIndex = end;\r\n\r\n        while (true) {\r\n          if (nodeIndex == childNodeCount) {\r\n            containerElement.appendChild(workingNode);\r\n          } else {\r\n            containerElement.insertBefore(\r\n              workingNode,\r\n              containerElement.childNodes[nodeIndex]\r\n            );\r\n          }\r\n          workingRange.moveToElementText(workingNode);\r\n          comparison = workingRange.compareEndPoints(\r\n            workingComparisonType,\r\n            textRange\r\n          );\r\n          if (comparison == 0 || start == end) {\r\n            break;\r\n          } else if (comparison == -1) {\r\n            if (end == start + 1) {\r\n              // We know the endth child node is after the range boundary, so we must be done.\r\n              break;\r\n            } else {\r\n              start = nodeIndex;\r\n            }\r\n          } else {\r\n            end = end == start + 1 ? start : nodeIndex;\r\n          }\r\n          nodeIndex = Math.floor((start + end) / 2);\r\n          containerElement.removeChild(workingNode);\r\n        }\r\n\r\n        // We've now reached or gone past the boundary of the text range we're interested in\r\n        // so have identified the node we want\r\n        boundaryNode = workingNode.nextSibling;\r\n\r\n        if (\r\n          comparison == -1 &&\r\n          boundaryNode &&\r\n          isCharacterDataNode(boundaryNode)\r\n        ) {\r\n          // This is a character data node (text, comment, cdata). The working range is collapsed at the start of\r\n          // the node containing the text range's boundary, so we move the end of the working range to the\r\n          // boundary point and measure the length of its text to get the boundary's offset within the node.\r\n          workingRange.setEndPoint(\r\n            isStart ? \"EndToStart\" : \"EndToEnd\",\r\n            textRange\r\n          );\r\n\r\n          var offset;\r\n\r\n          if (/[\\r\\n]/.test(boundaryNode.data)) {\r\n            /*\r\n                        For the particular case of a boundary within a text node containing rendered line breaks (within a\r\n                        <pre> element, for example), we need a slightly complicated approach to get the boundary's offset in\r\n                        IE. The facts:\r\n\r\n                        - Each line break is represented as \\r in the text node's data/nodeValue properties\r\n                        - Each line break is represented as \\r\\n in the TextRange's 'text' property\r\n                        - The 'text' property of the TextRange does not contain trailing line breaks\r\n\r\n                        To get round the problem presented by the final fact above, we can use the fact that TextRange's\r\n                        moveStart() and moveEnd() methods return the actual number of characters moved, which is not\r\n                        necessarily the same as the number of characters it was instructed to move. The simplest approach is\r\n                        to use this to store the characters moved when moving both the start and end of the range to the\r\n                        start of the document body and subtracting the start offset from the end offset (the\r\n                        \"move-negative-gazillion\" method). However, this is extremely slow when the document is large and\r\n                        the range is near the end of it. Clearly doing the mirror image (i.e. moving the range boundaries to\r\n                        the end of the document) has the same problem.\r\n\r\n                        Another approach that works is to use moveStart() to move the start boundary of the range up to the\r\n                        end boundary one character at a time and incrementing a counter with the value returned by the\r\n                        moveStart() call. However, the check for whether the start boundary has reached the end boundary is\r\n                        expensive, so this method is slow (although unlike \"move-negative-gazillion\" is largely unaffected\r\n                        by the location of the range within the document).\r\n\r\n                        The approach used below is a hybrid of the two methods above. It uses the fact that a string\r\n                        containing the TextRange's 'text' property with each \\r\\n converted to a single \\r character cannot\r\n                        be longer than the text of the TextRange, so the start of the range is moved that length initially\r\n                        and then a character at a time to make up for any trailing line breaks not contained in the 'text'\r\n                        property. This has good performance in most situations compared to the previous two methods.\r\n                        */\r\n            var tempRange = workingRange.duplicate();\r\n            var rangeLength = tempRange.text.replace(/\\r\\n/g, \"\\r\").length;\r\n\r\n            offset = tempRange.moveStart(\"character\", rangeLength);\r\n            while (\r\n              (comparison = tempRange.compareEndPoints(\r\n                \"StartToEnd\",\r\n                tempRange\r\n              )) == -1\r\n            ) {\r\n              offset++;\r\n              tempRange.moveStart(\"character\", 1);\r\n            }\r\n          } else {\r\n            offset = workingRange.text.length;\r\n          }\r\n          boundaryPosition = new DomPosition(boundaryNode, offset);\r\n        } else {\r\n          // If the boundary immediately follows a character data node and this is the end boundary, we should favour\r\n          // a position within that, and likewise for a start boundary preceding a character data node\r\n          previousNode =\r\n            (isCollapsed || !isStart) && workingNode.previousSibling;\r\n          nextNode = (isCollapsed || isStart) && workingNode.nextSibling;\r\n          if (nextNode && isCharacterDataNode(nextNode)) {\r\n            boundaryPosition = new DomPosition(nextNode, 0);\r\n          } else if (previousNode && isCharacterDataNode(previousNode)) {\r\n            boundaryPosition = new DomPosition(\r\n              previousNode,\r\n              previousNode.data.length\r\n            );\r\n          } else {\r\n            boundaryPosition = new DomPosition(\r\n              containerElement,\r\n              dom.getNodeIndex(workingNode)\r\n            );\r\n          }\r\n        }\r\n\r\n        // Clean up\r\n        dom.removeNode(workingNode);\r\n\r\n        return {\r\n          boundaryPosition: boundaryPosition,\r\n          nodeInfo: {\r\n            nodeIndex: nodeIndex,\r\n            containerElement: containerElement,\r\n          },\r\n        };\r\n      };\r\n\r\n      // Returns a TextRange representing the boundary of a TextRange expressed as a node and an offset within that\r\n      // node. This function started out as an optimized version of code found in Tim Cameron Ryan's IERange\r\n      // (http://code.google.com/p/ierange/)\r\n      var createBoundaryTextRange = function (boundaryPosition, isStart) {\r\n        var boundaryNode,\r\n          boundaryParent,\r\n          boundaryOffset = boundaryPosition.offset;\r\n        var doc = dom.getDocument(boundaryPosition.node);\r\n        var workingNode,\r\n          childNodes,\r\n          workingRange = getBody(doc).createTextRange();\r\n        var nodeIsDataNode = isCharacterDataNode(boundaryPosition.node);\r\n\r\n        if (nodeIsDataNode) {\r\n          boundaryNode = boundaryPosition.node;\r\n          boundaryParent = boundaryNode.parentNode;\r\n        } else {\r\n          childNodes = boundaryPosition.node.childNodes;\r\n          boundaryNode =\r\n            boundaryOffset < childNodes.length\r\n              ? childNodes[boundaryOffset]\r\n              : null;\r\n          boundaryParent = boundaryPosition.node;\r\n        }\r\n\r\n        // Position the range immediately before the node containing the boundary\r\n        workingNode = doc.createElement(\"span\");\r\n\r\n        // Making the working element non-empty element persuades IE to consider the TextRange boundary to be within\r\n        // the element rather than immediately before or after it\r\n        workingNode.innerHTML = \"&#feff;\";\r\n\r\n        // insertBefore is supposed to work like appendChild if the second parameter is null. However, a bug report\r\n        // for IERange suggests that it can crash the browser: http://code.google.com/p/ierange/issues/detail?id=12\r\n        if (boundaryNode) {\r\n          boundaryParent.insertBefore(workingNode, boundaryNode);\r\n        } else {\r\n          boundaryParent.appendChild(workingNode);\r\n        }\r\n\r\n        workingRange.moveToElementText(workingNode);\r\n        workingRange.collapse(!isStart);\r\n\r\n        // Clean up\r\n        boundaryParent.removeChild(workingNode);\r\n\r\n        // Move the working range to the text offset, if required\r\n        if (nodeIsDataNode) {\r\n          workingRange[isStart ? \"moveStart\" : \"moveEnd\"](\r\n            \"character\",\r\n            boundaryOffset\r\n          );\r\n        }\r\n\r\n        return workingRange;\r\n      };\r\n\r\n      /*------------------------------------------------------------------------------------------------------------*/\r\n\r\n      // This is a wrapper around a TextRange, providing full DOM Range functionality using rangy's DomRange as a\r\n      // prototype\r\n\r\n      WrappedTextRange = function (textRange) {\r\n        this.textRange = textRange;\r\n        this.refresh();\r\n      };\r\n\r\n      WrappedTextRange.prototype = new DomRange(document);\r\n\r\n      WrappedTextRange.prototype.refresh = function () {\r\n        var start, end, startBoundary;\r\n\r\n        // TextRange's parentElement() method cannot be trusted. getTextRangeContainerElement() works around that.\r\n        var rangeContainerElement = getTextRangeContainerElement(\r\n          this.textRange\r\n        );\r\n\r\n        if (textRangeIsCollapsed(this.textRange)) {\r\n          end = start = getTextRangeBoundaryPosition(\r\n            this.textRange,\r\n            rangeContainerElement,\r\n            true,\r\n            true\r\n          ).boundaryPosition;\r\n        } else {\r\n          startBoundary = getTextRangeBoundaryPosition(\r\n            this.textRange,\r\n            rangeContainerElement,\r\n            true,\r\n            false\r\n          );\r\n          start = startBoundary.boundaryPosition;\r\n\r\n          // An optimization used here is that if the start and end boundaries have the same parent element, the\r\n          // search scope for the end boundary can be limited to exclude the portion of the element that precedes\r\n          // the start boundary\r\n          end = getTextRangeBoundaryPosition(\r\n            this.textRange,\r\n            rangeContainerElement,\r\n            false,\r\n            false,\r\n            startBoundary.nodeInfo\r\n          ).boundaryPosition;\r\n        }\r\n\r\n        this.setStart(start.node, start.offset);\r\n        this.setEnd(end.node, end.offset);\r\n      };\r\n\r\n      WrappedTextRange.prototype.getName = function () {\r\n        return \"WrappedTextRange\";\r\n      };\r\n\r\n      DomRange.copyComparisonConstants(WrappedTextRange);\r\n\r\n      var rangeToTextRange = function (range) {\r\n        if (range.collapsed) {\r\n          return createBoundaryTextRange(\r\n            new DomPosition(range.startContainer, range.startOffset),\r\n            true\r\n          );\r\n        } else {\r\n          var startRange = createBoundaryTextRange(\r\n            new DomPosition(range.startContainer, range.startOffset),\r\n            true\r\n          );\r\n          var endRange = createBoundaryTextRange(\r\n            new DomPosition(range.endContainer, range.endOffset),\r\n            false\r\n          );\r\n          var textRange = getBody(\r\n            DomRange.getRangeDocument(range)\r\n          ).createTextRange();\r\n          textRange.setEndPoint(\"StartToStart\", startRange);\r\n          textRange.setEndPoint(\"EndToEnd\", endRange);\r\n          return textRange;\r\n        }\r\n      };\r\n\r\n      WrappedTextRange.rangeToTextRange = rangeToTextRange;\r\n\r\n      WrappedTextRange.prototype.toTextRange = function () {\r\n        return rangeToTextRange(this);\r\n      };\r\n\r\n      api.WrappedTextRange = WrappedTextRange;\r\n\r\n      // IE 9 and above have both implementations and Rangy makes both available. The next few lines sets which\r\n      // implementation to use by default.\r\n      if (!api.features.implementsDomRange || api.config.preferTextRange) {\r\n        // Add WrappedTextRange as the Range property of the global object to allow expression like Range.END_TO_END to work\r\n        var globalObj = (function (f) {\r\n          return f(\"return this;\")();\r\n        })(Function);\r\n        if (typeof globalObj.Range == \"undefined\") {\r\n          globalObj.Range = WrappedTextRange;\r\n        }\r\n\r\n        api.createNativeRange = function (doc) {\r\n          doc = getContentDocument(doc, module, \"createNativeRange\");\r\n          return getBody(doc).createTextRange();\r\n        };\r\n\r\n        api.WrappedRange = WrappedTextRange;\r\n      }\r\n    }\r\n\r\n    api.createRange = function (doc) {\r\n      doc = getContentDocument(doc, module, \"createRange\");\r\n      return new api.WrappedRange(api.createNativeRange(doc));\r\n    };\r\n\r\n    api.createRangyRange = function (doc) {\r\n      doc = getContentDocument(doc, module, \"createRangyRange\");\r\n      return new DomRange(doc);\r\n    };\r\n\r\n    util.createAliasForDeprecatedMethod(\r\n      api,\r\n      \"createIframeRange\",\r\n      \"createRange\"\r\n    );\r\n    util.createAliasForDeprecatedMethod(\r\n      api,\r\n      \"createIframeRangyRange\",\r\n      \"createRangyRange\"\r\n    );\r\n\r\n    api.addShimListener(function (win) {\r\n      var doc = win.document;\r\n      if (typeof doc.createRange == \"undefined\") {\r\n        doc.createRange = function () {\r\n          return api.createRange(doc);\r\n        };\r\n      }\r\n      doc = win = null;\r\n    });\r\n  });\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // This module creates a selection object wrapper that conforms as closely as possible to the Selection specification\r\n  // in the HTML Editing spec (http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections)\r\n  api.createCoreModule(\r\n    \"WrappedSelection\",\r\n    [\"DomRange\", \"WrappedRange\"],\r\n    function (api, module) {\r\n      api.config.checkSelectionRanges = true;\r\n\r\n      var BOOLEAN = \"boolean\";\r\n      var NUMBER = \"number\";\r\n      var dom = api.dom;\r\n      var util = api.util;\r\n      var isHostMethod = util.isHostMethod;\r\n      var DomRange = api.DomRange;\r\n      var WrappedRange = api.WrappedRange;\r\n      var DOMException = api.DOMException;\r\n      var DomPosition = dom.DomPosition;\r\n      var getNativeSelection;\r\n      var selectionIsCollapsed;\r\n      var features = api.features;\r\n      var CONTROL = \"Control\";\r\n      var getDocument = dom.getDocument;\r\n      var getBody = dom.getBody;\r\n      var rangesEqual = DomRange.rangesEqual;\r\n\r\n      // Utility function to support direction parameters in the API that may be a string (\"backward\", \"backwards\",\r\n      // \"forward\" or \"forwards\") or a Boolean (true for backwards).\r\n      function isDirectionBackward(dir) {\r\n        return typeof dir == \"string\" ? /^backward(s)?$/i.test(dir) : !!dir;\r\n      }\r\n\r\n      function getWindow(win, methodName) {\r\n        if (!win) {\r\n          return window;\r\n        } else if (dom.isWindow(win)) {\r\n          return win;\r\n        } else if (win instanceof WrappedSelection) {\r\n          return win.win;\r\n        } else {\r\n          var doc = dom.getContentDocument(win, module, methodName);\r\n          return dom.getWindow(doc);\r\n        }\r\n      }\r\n\r\n      function getWinSelection(winParam) {\r\n        return getWindow(winParam, \"getWinSelection\").getSelection();\r\n      }\r\n\r\n      function getDocSelection(winParam) {\r\n        return getWindow(winParam, \"getDocSelection\").document.selection;\r\n      }\r\n\r\n      function winSelectionIsBackward(sel) {\r\n        var backward = false;\r\n        if (sel.anchorNode) {\r\n          backward =\r\n            dom.comparePoints(\r\n              sel.anchorNode,\r\n              sel.anchorOffset,\r\n              sel.focusNode,\r\n              sel.focusOffset\r\n            ) == 1;\r\n        }\r\n        return backward;\r\n      }\r\n\r\n      // Test for the Range/TextRange and Selection features required\r\n      // Test for ability to retrieve selection\r\n      var implementsWinGetSelection = isHostMethod(window, \"getSelection\"),\r\n        implementsDocSelection = util.isHostObject(document, \"selection\");\r\n\r\n      features.implementsWinGetSelection = implementsWinGetSelection;\r\n      features.implementsDocSelection = implementsDocSelection;\r\n\r\n      var useDocumentSelection =\r\n        implementsDocSelection &&\r\n        (!implementsWinGetSelection || api.config.preferTextRange);\r\n\r\n      if (useDocumentSelection) {\r\n        getNativeSelection = getDocSelection;\r\n        api.isSelectionValid = function (winParam) {\r\n          var doc = getWindow(winParam, \"isSelectionValid\").document,\r\n            nativeSel = doc.selection;\r\n\r\n          // Check whether the selection TextRange is actually contained within the correct document\r\n          return (\r\n            nativeSel.type != \"None\" ||\r\n            getDocument(nativeSel.createRange().parentElement()) == doc\r\n          );\r\n        };\r\n      } else if (implementsWinGetSelection) {\r\n        getNativeSelection = getWinSelection;\r\n        api.isSelectionValid = function () {\r\n          return true;\r\n        };\r\n      } else {\r\n        module.fail(\r\n          \"Neither document.selection or window.getSelection() detected.\"\r\n        );\r\n        return false;\r\n      }\r\n\r\n      api.getNativeSelection = getNativeSelection;\r\n\r\n      var testSelection = getNativeSelection();\r\n\r\n      // In Firefox, the selection is null in an iframe with display: none. See issue #138.\r\n      if (!testSelection) {\r\n        module.fail(\"Native selection was null (possibly issue 138?)\");\r\n        return false;\r\n      }\r\n\r\n      var testRange = api.createNativeRange(document);\r\n      var body = getBody(document);\r\n\r\n      // Obtaining a range from a selection\r\n      var selectionHasAnchorAndFocus = util.areHostProperties(testSelection, [\r\n        \"anchorNode\",\r\n        \"focusNode\",\r\n        \"anchorOffset\",\r\n        \"focusOffset\",\r\n      ]);\r\n\r\n      features.selectionHasAnchorAndFocus = selectionHasAnchorAndFocus;\r\n\r\n      // Test for existence of native selection extend() method\r\n      var selectionHasExtend = isHostMethod(testSelection, \"extend\");\r\n      features.selectionHasExtend = selectionHasExtend;\r\n\r\n      // Test if rangeCount exists\r\n      var selectionHasRangeCount = typeof testSelection.rangeCount == NUMBER;\r\n      features.selectionHasRangeCount = selectionHasRangeCount;\r\n\r\n      var selectionSupportsMultipleRanges = false;\r\n      var collapsedNonEditableSelectionsSupported = true;\r\n\r\n      var addRangeBackwardToNative = selectionHasExtend\r\n        ? function (nativeSelection, range) {\r\n            var doc = DomRange.getRangeDocument(range);\r\n            var endRange = api.createRange(doc);\r\n            endRange.collapseToPoint(range.endContainer, range.endOffset);\r\n            nativeSelection.addRange(getNativeRange(endRange));\r\n            nativeSelection.extend(range.startContainer, range.startOffset);\r\n          }\r\n        : null;\r\n\r\n      if (\r\n        util.areHostMethods(testSelection, [\r\n          \"addRange\",\r\n          \"getRangeAt\",\r\n          \"removeAllRanges\",\r\n        ]) &&\r\n        typeof testSelection.rangeCount == NUMBER &&\r\n        features.implementsDomRange\r\n      ) {\r\n        (function () {\r\n          // Previously an iframe was used but this caused problems in some circumstances in IE, so tests are\r\n          // performed on the current document's selection. See issue 109.\r\n\r\n          // Note also that if a selection previously existed, it is wiped and later restored by these tests. This\r\n          // will result in the selection direction begin reversed if the original selection was backwards and the\r\n          // browser does not support setting backwards selections (Internet Explorer, I'm looking at you).\r\n          var sel = window.getSelection();\r\n          if (sel) {\r\n            // Store the current selection\r\n            var originalSelectionRangeCount = sel.rangeCount;\r\n            var selectionHasMultipleRanges = originalSelectionRangeCount > 1;\r\n            var originalSelectionRanges = [];\r\n            var originalSelectionBackward = winSelectionIsBackward(sel);\r\n            for (var i = 0; i < originalSelectionRangeCount; ++i) {\r\n              originalSelectionRanges[i] = sel.getRangeAt(i);\r\n            }\r\n\r\n            // Create some test elements\r\n            var testEl = dom.createTestElement(document, \"\", false);\r\n            var textNode = testEl.appendChild(\r\n              document.createTextNode(\"\\u00a0\\u00a0\\u00a0\")\r\n            );\r\n\r\n            // Test whether the native selection will allow a collapsed selection within a non-editable element\r\n            var r1 = document.createRange();\r\n\r\n            r1.setStart(textNode, 1);\r\n            r1.collapse(true);\r\n            sel.removeAllRanges();\r\n            sel.addRange(r1);\r\n            collapsedNonEditableSelectionsSupported = sel.rangeCount == 1;\r\n            sel.removeAllRanges();\r\n\r\n            // Test whether the native selection is capable of supporting multiple ranges.\r\n            if (!selectionHasMultipleRanges) {\r\n              // Doing the original feature test here in Chrome 36 (and presumably later versions) prints a\r\n              // console error of \"Discontiguous selection is not supported.\" that cannot be suppressed. There's\r\n              // nothing we can do about this while retaining the feature test so we have to resort to a browser\r\n              // sniff. I'm not happy about it. See\r\n              // https://code.google.com/p/chromium/issues/detail?id=399791\r\n              var chromeMatch =\r\n                window.navigator.appVersion.match(/Chrome\\/(.*?) /);\r\n              if (chromeMatch && parseInt(chromeMatch[1]) >= 36) {\r\n                selectionSupportsMultipleRanges = false;\r\n              } else {\r\n                var r2 = r1.cloneRange();\r\n                r1.setStart(textNode, 0);\r\n                r2.setEnd(textNode, 3);\r\n                r2.setStart(textNode, 2);\r\n                sel.addRange(r1);\r\n                sel.addRange(r2);\r\n                selectionSupportsMultipleRanges = sel.rangeCount == 2;\r\n              }\r\n            }\r\n\r\n            // Clean up\r\n            dom.removeNode(testEl);\r\n            sel.removeAllRanges();\r\n\r\n            for (i = 0; i < originalSelectionRangeCount; ++i) {\r\n              if (i == 0 && originalSelectionBackward) {\r\n                if (addRangeBackwardToNative) {\r\n                  addRangeBackwardToNative(sel, originalSelectionRanges[i]);\r\n                } else {\r\n                  api.warn(\r\n                    \"Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend\"\r\n                  );\r\n                  sel.addRange(originalSelectionRanges[i]);\r\n                }\r\n              } else {\r\n                sel.addRange(originalSelectionRanges[i]);\r\n              }\r\n            }\r\n          }\r\n        })();\r\n      }\r\n\r\n      features.selectionSupportsMultipleRanges =\r\n        selectionSupportsMultipleRanges;\r\n      features.collapsedNonEditableSelectionsSupported =\r\n        collapsedNonEditableSelectionsSupported;\r\n\r\n      // ControlRanges\r\n      var implementsControlRange = false,\r\n        testControlRange;\r\n\r\n      if (body && isHostMethod(body, \"createControlRange\")) {\r\n        testControlRange = body.createControlRange();\r\n        if (util.areHostProperties(testControlRange, [\"item\", \"add\"])) {\r\n          implementsControlRange = true;\r\n        }\r\n      }\r\n      features.implementsControlRange = implementsControlRange;\r\n\r\n      // Selection collapsedness\r\n      if (selectionHasAnchorAndFocus) {\r\n        selectionIsCollapsed = function (sel) {\r\n          return (\r\n            sel.anchorNode === sel.focusNode &&\r\n            sel.anchorOffset === sel.focusOffset\r\n          );\r\n        };\r\n      } else {\r\n        selectionIsCollapsed = function (sel) {\r\n          return sel.rangeCount\r\n            ? sel.getRangeAt(sel.rangeCount - 1).collapsed\r\n            : false;\r\n        };\r\n      }\r\n\r\n      function updateAnchorAndFocusFromRange(sel, range, backward) {\r\n        var anchorPrefix = backward ? \"end\" : \"start\",\r\n          focusPrefix = backward ? \"start\" : \"end\";\r\n        sel.anchorNode = range[anchorPrefix + \"Container\"];\r\n        sel.anchorOffset = range[anchorPrefix + \"Offset\"];\r\n        sel.focusNode = range[focusPrefix + \"Container\"];\r\n        sel.focusOffset = range[focusPrefix + \"Offset\"];\r\n      }\r\n\r\n      function updateAnchorAndFocusFromNativeSelection(sel) {\r\n        var nativeSel = sel.nativeSelection;\r\n        sel.anchorNode = nativeSel.anchorNode;\r\n        sel.anchorOffset = nativeSel.anchorOffset;\r\n        sel.focusNode = nativeSel.focusNode;\r\n        sel.focusOffset = nativeSel.focusOffset;\r\n      }\r\n\r\n      function updateEmptySelection(sel) {\r\n        sel.anchorNode = sel.focusNode = null;\r\n        sel.anchorOffset = sel.focusOffset = 0;\r\n        sel.rangeCount = 0;\r\n        sel.isCollapsed = true;\r\n        sel._ranges.length = 0;\r\n      }\r\n\r\n      function getNativeRange(range) {\r\n        var nativeRange;\r\n        if (range instanceof DomRange) {\r\n          nativeRange = api.createNativeRange(range.getDocument());\r\n          nativeRange.setEnd(range.endContainer, range.endOffset);\r\n          nativeRange.setStart(range.startContainer, range.startOffset);\r\n        } else if (range instanceof WrappedRange) {\r\n          nativeRange = range.nativeRange;\r\n        } else if (\r\n          features.implementsDomRange &&\r\n          range instanceof dom.getWindow(range.startContainer).Range\r\n        ) {\r\n          nativeRange = range;\r\n        }\r\n        return nativeRange;\r\n      }\r\n\r\n      function rangeContainsSingleElement(rangeNodes) {\r\n        if (!rangeNodes.length || rangeNodes[0].nodeType != 1) {\r\n          return false;\r\n        }\r\n        for (var i = 1, len = rangeNodes.length; i < len; ++i) {\r\n          if (!dom.isAncestorOf(rangeNodes[0], rangeNodes[i])) {\r\n            return false;\r\n          }\r\n        }\r\n        return true;\r\n      }\r\n\r\n      function getSingleElementFromRange(range) {\r\n        var nodes = range.getNodes();\r\n        if (!rangeContainsSingleElement(nodes)) {\r\n          throw module.createError(\r\n            \"getSingleElementFromRange: range \" +\r\n              range.inspect() +\r\n              \" did not consist of a single element\"\r\n          );\r\n        }\r\n        return nodes[0];\r\n      }\r\n\r\n      // Simple, quick test which only needs to distinguish between a TextRange and a ControlRange\r\n      function isTextRange(range) {\r\n        return !!range && typeof range.text != \"undefined\";\r\n      }\r\n\r\n      function updateFromTextRange(sel, range) {\r\n        // Create a Range from the selected TextRange\r\n        var wrappedRange = new WrappedRange(range);\r\n        sel._ranges = [wrappedRange];\r\n\r\n        updateAnchorAndFocusFromRange(sel, wrappedRange, false);\r\n        sel.rangeCount = 1;\r\n        sel.isCollapsed = wrappedRange.collapsed;\r\n      }\r\n\r\n      function updateControlSelection(sel) {\r\n        // Update the wrapped selection based on what's now in the native selection\r\n        sel._ranges.length = 0;\r\n        if (sel.docSelection.type == \"None\") {\r\n          updateEmptySelection(sel);\r\n        } else {\r\n          var controlRange = sel.docSelection.createRange();\r\n          if (isTextRange(controlRange)) {\r\n            // This case (where the selection type is \"Control\" and calling createRange() on the selection returns\r\n            // a TextRange) can happen in IE 9. It happens, for example, when all elements in the selected\r\n            // ControlRange have been removed from the ControlRange and removed from the document.\r\n            updateFromTextRange(sel, controlRange);\r\n          } else {\r\n            sel.rangeCount = controlRange.length;\r\n            var range,\r\n              doc = getDocument(controlRange.item(0));\r\n            for (var i = 0; i < sel.rangeCount; ++i) {\r\n              range = api.createRange(doc);\r\n              range.selectNode(controlRange.item(i));\r\n              sel._ranges.push(range);\r\n            }\r\n            sel.isCollapsed = sel.rangeCount == 1 && sel._ranges[0].collapsed;\r\n            updateAnchorAndFocusFromRange(\r\n              sel,\r\n              sel._ranges[sel.rangeCount - 1],\r\n              false\r\n            );\r\n          }\r\n        }\r\n      }\r\n\r\n      function addRangeToControlSelection(sel, range) {\r\n        var controlRange = sel.docSelection.createRange();\r\n        var rangeElement = getSingleElementFromRange(range);\r\n\r\n        // Create a new ControlRange containing all the elements in the selected ControlRange plus the element\r\n        // contained by the supplied range\r\n        var doc = getDocument(controlRange.item(0));\r\n        var newControlRange = getBody(doc).createControlRange();\r\n        for (var i = 0, len = controlRange.length; i < len; ++i) {\r\n          newControlRange.add(controlRange.item(i));\r\n        }\r\n        try {\r\n          newControlRange.add(rangeElement);\r\n        } catch (ex) {\r\n          throw module.createError(\r\n            \"addRange(): Element within the specified Range could not be added to control selection (does it have layout?)\"\r\n          );\r\n        }\r\n        newControlRange.select();\r\n\r\n        // Update the wrapped selection based on what's now in the native selection\r\n        updateControlSelection(sel);\r\n      }\r\n\r\n      var getSelectionRangeAt;\r\n\r\n      if (isHostMethod(testSelection, \"getRangeAt\")) {\r\n        // try/catch is present because getRangeAt() must have thrown an error in some browser and some situation.\r\n        // Unfortunately, I didn't write a comment about the specifics and am now scared to take it out. Let that be a\r\n        // lesson to us all, especially me.\r\n        getSelectionRangeAt = function (sel, index) {\r\n          try {\r\n            return sel.getRangeAt(index);\r\n          } catch (ex) {\r\n            return null;\r\n          }\r\n        };\r\n      } else if (selectionHasAnchorAndFocus) {\r\n        getSelectionRangeAt = function (sel) {\r\n          var doc = getDocument(sel.anchorNode);\r\n          var range = api.createRange(doc);\r\n          range.setStartAndEnd(\r\n            sel.anchorNode,\r\n            sel.anchorOffset,\r\n            sel.focusNode,\r\n            sel.focusOffset\r\n          );\r\n\r\n          // Handle the case when the selection was selected backwards (from the end to the start in the\r\n          // document)\r\n          if (range.collapsed !== this.isCollapsed) {\r\n            range.setStartAndEnd(\r\n              sel.focusNode,\r\n              sel.focusOffset,\r\n              sel.anchorNode,\r\n              sel.anchorOffset\r\n            );\r\n          }\r\n\r\n          return range;\r\n        };\r\n      }\r\n\r\n      function WrappedSelection(selection, docSelection, win) {\r\n        this.nativeSelection = selection;\r\n        this.docSelection = docSelection;\r\n        this._ranges = [];\r\n        this.win = win;\r\n        this.refresh();\r\n      }\r\n\r\n      WrappedSelection.prototype = api.selectionPrototype;\r\n\r\n      function deleteProperties(sel) {\r\n        sel.win = sel.anchorNode = sel.focusNode = sel._ranges = null;\r\n        sel.rangeCount = sel.anchorOffset = sel.focusOffset = 0;\r\n        sel.detached = true;\r\n      }\r\n\r\n      var cachedRangySelections = [];\r\n\r\n      function actOnCachedSelection(win, action) {\r\n        var i = cachedRangySelections.length,\r\n          cached,\r\n          sel;\r\n        while (i--) {\r\n          cached = cachedRangySelections[i];\r\n          sel = cached.selection;\r\n          if (action == \"deleteAll\") {\r\n            deleteProperties(sel);\r\n          } else if (cached.win == win) {\r\n            if (action == \"delete\") {\r\n              cachedRangySelections.splice(i, 1);\r\n              return true;\r\n            } else {\r\n              return sel;\r\n            }\r\n          }\r\n        }\r\n        if (action == \"deleteAll\") {\r\n          cachedRangySelections.length = 0;\r\n        }\r\n        return null;\r\n      }\r\n\r\n      var getSelection = function (win) {\r\n        // Check if the parameter is a Rangy Selection object\r\n        if (win && win instanceof WrappedSelection) {\r\n          win.refresh();\r\n          return win;\r\n        }\r\n\r\n        win = getWindow(win, \"getNativeSelection\");\r\n\r\n        var sel = actOnCachedSelection(win);\r\n        var nativeSel = getNativeSelection(win),\r\n          docSel = implementsDocSelection ? getDocSelection(win) : null;\r\n        if (sel) {\r\n          sel.nativeSelection = nativeSel;\r\n          sel.docSelection = docSel;\r\n          sel.refresh();\r\n        } else {\r\n          sel = new WrappedSelection(nativeSel, docSel, win);\r\n          cachedRangySelections.push({ win: win, selection: sel });\r\n        }\r\n        return sel;\r\n      };\r\n\r\n      api.getSelection = getSelection;\r\n\r\n      util.createAliasForDeprecatedMethod(\r\n        api,\r\n        \"getIframeSelection\",\r\n        \"getSelection\"\r\n      );\r\n\r\n      var selProto = WrappedSelection.prototype;\r\n\r\n      function createControlSelection(sel, ranges) {\r\n        // Ensure that the selection becomes of type \"Control\"\r\n        var doc = getDocument(ranges[0].startContainer);\r\n        var controlRange = getBody(doc).createControlRange();\r\n        for (var i = 0, el, len = ranges.length; i < len; ++i) {\r\n          el = getSingleElementFromRange(ranges[i]);\r\n          try {\r\n            controlRange.add(el);\r\n          } catch (ex) {\r\n            throw module.createError(\r\n              \"setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)\"\r\n            );\r\n          }\r\n        }\r\n        controlRange.select();\r\n\r\n        // Update the wrapped selection based on what's now in the native selection\r\n        updateControlSelection(sel);\r\n      }\r\n\r\n      // Selecting a range\r\n      if (\r\n        !useDocumentSelection &&\r\n        selectionHasAnchorAndFocus &&\r\n        util.areHostMethods(testSelection, [\"removeAllRanges\", \"addRange\"])\r\n      ) {\r\n        selProto.removeAllRanges = function () {\r\n          this.nativeSelection.removeAllRanges();\r\n          updateEmptySelection(this);\r\n        };\r\n\r\n        var addRangeBackward = function (sel, range) {\r\n          addRangeBackwardToNative(sel.nativeSelection, range);\r\n          sel.refresh();\r\n        };\r\n\r\n        if (selectionHasRangeCount) {\r\n          selProto.addRange = function (range, direction) {\r\n            if (\r\n              implementsControlRange &&\r\n              implementsDocSelection &&\r\n              this.docSelection.type == CONTROL\r\n            ) {\r\n              addRangeToControlSelection(this, range);\r\n            } else {\r\n              if (isDirectionBackward(direction) && selectionHasExtend) {\r\n                addRangeBackward(this, range);\r\n              } else {\r\n                var previousRangeCount;\r\n                if (selectionSupportsMultipleRanges) {\r\n                  previousRangeCount = this.rangeCount;\r\n                } else {\r\n                  this.removeAllRanges();\r\n                  previousRangeCount = 0;\r\n                }\r\n                // Clone the native range so that changing the selected range does not affect the selection.\r\n                // This is contrary to the spec but is the only way to achieve consistency between browsers. See\r\n                // issue 80.\r\n                var clonedNativeRange = getNativeRange(range).cloneRange();\r\n                try {\r\n                  this.nativeSelection.addRange(clonedNativeRange);\r\n                } catch (ex) {}\r\n\r\n                // Check whether adding the range was successful\r\n                this.rangeCount = this.nativeSelection.rangeCount;\r\n\r\n                if (this.rangeCount == previousRangeCount + 1) {\r\n                  // The range was added successfully\r\n\r\n                  // Check whether the range that we added to the selection is reflected in the last range extracted from\r\n                  // the selection\r\n                  if (api.config.checkSelectionRanges) {\r\n                    var nativeRange = getSelectionRangeAt(\r\n                      this.nativeSelection,\r\n                      this.rangeCount - 1\r\n                    );\r\n                    if (nativeRange && !rangesEqual(nativeRange, range)) {\r\n                      // Happens in WebKit with, for example, a selection placed at the start of a text node\r\n                      range = new WrappedRange(nativeRange);\r\n                    }\r\n                  }\r\n                  this._ranges[this.rangeCount - 1] = range;\r\n                  updateAnchorAndFocusFromRange(\r\n                    this,\r\n                    range,\r\n                    selectionIsBackward(this.nativeSelection)\r\n                  );\r\n                  this.isCollapsed = selectionIsCollapsed(this);\r\n                } else {\r\n                  // The range was not added successfully. The simplest thing is to refresh\r\n                  this.refresh();\r\n                }\r\n              }\r\n            }\r\n          };\r\n        } else {\r\n          selProto.addRange = function (range, direction) {\r\n            if (isDirectionBackward(direction) && selectionHasExtend) {\r\n              addRangeBackward(this, range);\r\n            } else {\r\n              this.nativeSelection.addRange(getNativeRange(range));\r\n              this.refresh();\r\n            }\r\n          };\r\n        }\r\n\r\n        selProto.setRanges = function (ranges) {\r\n          if (\r\n            implementsControlRange &&\r\n            implementsDocSelection &&\r\n            ranges.length > 1\r\n          ) {\r\n            createControlSelection(this, ranges);\r\n          } else {\r\n            this.removeAllRanges();\r\n            for (var i = 0, len = ranges.length; i < len; ++i) {\r\n              this.addRange(ranges[i]);\r\n            }\r\n          }\r\n        };\r\n      } else if (\r\n        isHostMethod(testSelection, \"empty\") &&\r\n        isHostMethod(testRange, \"select\") &&\r\n        implementsControlRange &&\r\n        useDocumentSelection\r\n      ) {\r\n        selProto.removeAllRanges = function () {\r\n          // Added try/catch as fix for issue #21\r\n          try {\r\n            this.docSelection.empty();\r\n\r\n            // Check for empty() not working (issue #24)\r\n            if (this.docSelection.type != \"None\") {\r\n              // Work around failure to empty a control selection by instead selecting a TextRange and then\r\n              // calling empty()\r\n              var doc;\r\n              if (this.anchorNode) {\r\n                doc = getDocument(this.anchorNode);\r\n              } else if (this.docSelection.type == CONTROL) {\r\n                var controlRange = this.docSelection.createRange();\r\n                if (controlRange.length) {\r\n                  doc = getDocument(controlRange.item(0));\r\n                }\r\n              }\r\n              if (doc) {\r\n                var textRange = getBody(doc).createTextRange();\r\n                textRange.select();\r\n                this.docSelection.empty();\r\n              }\r\n            }\r\n          } catch (ex) {}\r\n          updateEmptySelection(this);\r\n        };\r\n\r\n        selProto.addRange = function (range) {\r\n          if (this.docSelection.type == CONTROL) {\r\n            addRangeToControlSelection(this, range);\r\n          } else {\r\n            api.WrappedTextRange.rangeToTextRange(range).select();\r\n            this._ranges[0] = range;\r\n            this.rangeCount = 1;\r\n            this.isCollapsed = this._ranges[0].collapsed;\r\n            updateAnchorAndFocusFromRange(this, range, false);\r\n          }\r\n        };\r\n\r\n        selProto.setRanges = function (ranges) {\r\n          this.removeAllRanges();\r\n          var rangeCount = ranges.length;\r\n          if (rangeCount > 1) {\r\n            createControlSelection(this, ranges);\r\n          } else if (rangeCount) {\r\n            this.addRange(ranges[0]);\r\n          }\r\n        };\r\n      } else {\r\n        module.fail(\"No means of selecting a Range or TextRange was found\");\r\n        return false;\r\n      }\r\n\r\n      selProto.getRangeAt = function (index) {\r\n        if (index < 0 || index >= this.rangeCount) {\r\n          throw new DOMException(\"INDEX_SIZE_ERR\");\r\n        } else {\r\n          // Clone the range to preserve selection-range independence. See issue 80.\r\n          return this._ranges[index].cloneRange();\r\n        }\r\n      };\r\n\r\n      var refreshSelection;\r\n\r\n      if (useDocumentSelection) {\r\n        refreshSelection = function (sel) {\r\n          var range;\r\n          if (api.isSelectionValid(sel.win)) {\r\n            range = sel.docSelection.createRange();\r\n          } else {\r\n            range = getBody(sel.win.document).createTextRange();\r\n            range.collapse(true);\r\n          }\r\n\r\n          if (sel.docSelection.type == CONTROL) {\r\n            updateControlSelection(sel);\r\n          } else if (isTextRange(range)) {\r\n            updateFromTextRange(sel, range);\r\n          } else {\r\n            updateEmptySelection(sel);\r\n          }\r\n        };\r\n      } else if (\r\n        isHostMethod(testSelection, \"getRangeAt\") &&\r\n        typeof testSelection.rangeCount == NUMBER\r\n      ) {\r\n        refreshSelection = function (sel) {\r\n          if (\r\n            implementsControlRange &&\r\n            implementsDocSelection &&\r\n            sel.docSelection.type == CONTROL\r\n          ) {\r\n            updateControlSelection(sel);\r\n          } else {\r\n            sel._ranges.length = sel.rangeCount =\r\n              sel.nativeSelection.rangeCount;\r\n            if (sel.rangeCount) {\r\n              for (var i = 0, len = sel.rangeCount; i < len; ++i) {\r\n                sel._ranges[i] = new api.WrappedRange(\r\n                  sel.nativeSelection.getRangeAt(i)\r\n                );\r\n              }\r\n              updateAnchorAndFocusFromRange(\r\n                sel,\r\n                sel._ranges[sel.rangeCount - 1],\r\n                selectionIsBackward(sel.nativeSelection)\r\n              );\r\n              sel.isCollapsed = selectionIsCollapsed(sel);\r\n            } else {\r\n              updateEmptySelection(sel);\r\n            }\r\n          }\r\n        };\r\n      } else if (\r\n        selectionHasAnchorAndFocus &&\r\n        typeof testSelection.isCollapsed == BOOLEAN &&\r\n        typeof testRange.collapsed == BOOLEAN &&\r\n        features.implementsDomRange\r\n      ) {\r\n        refreshSelection = function (sel) {\r\n          var range,\r\n            nativeSel = sel.nativeSelection;\r\n          if (nativeSel.anchorNode) {\r\n            range = getSelectionRangeAt(nativeSel, 0);\r\n            sel._ranges = [range];\r\n            sel.rangeCount = 1;\r\n            updateAnchorAndFocusFromNativeSelection(sel);\r\n            sel.isCollapsed = selectionIsCollapsed(sel);\r\n          } else {\r\n            updateEmptySelection(sel);\r\n          }\r\n        };\r\n      } else {\r\n        module.fail(\r\n          \"No means of obtaining a Range or TextRange from the user's selection was found\"\r\n        );\r\n        return false;\r\n      }\r\n\r\n      selProto.refresh = function (checkForChanges) {\r\n        var oldRanges = checkForChanges ? this._ranges.slice(0) : null;\r\n        var oldAnchorNode = this.anchorNode,\r\n          oldAnchorOffset = this.anchorOffset;\r\n\r\n        refreshSelection(this);\r\n        if (checkForChanges) {\r\n          // Check the range count first\r\n          var i = oldRanges.length;\r\n          if (i != this._ranges.length) {\r\n            return true;\r\n          }\r\n\r\n          // Now check the direction. Checking the anchor position is the same is enough since we're checking all the\r\n          // ranges after this\r\n          if (\r\n            this.anchorNode != oldAnchorNode ||\r\n            this.anchorOffset != oldAnchorOffset\r\n          ) {\r\n            return true;\r\n          }\r\n\r\n          // Finally, compare each range in turn\r\n          while (i--) {\r\n            if (!rangesEqual(oldRanges[i], this._ranges[i])) {\r\n              return true;\r\n            }\r\n          }\r\n          return false;\r\n        }\r\n      };\r\n\r\n      // Removal of a single range\r\n      var removeRangeManually = function (sel, range) {\r\n        var ranges = sel.getAllRanges();\r\n        sel.removeAllRanges();\r\n        for (var i = 0, len = ranges.length; i < len; ++i) {\r\n          if (!rangesEqual(range, ranges[i])) {\r\n            sel.addRange(ranges[i]);\r\n          }\r\n        }\r\n        if (!sel.rangeCount) {\r\n          updateEmptySelection(sel);\r\n        }\r\n      };\r\n\r\n      if (implementsControlRange && implementsDocSelection) {\r\n        selProto.removeRange = function (range) {\r\n          if (this.docSelection.type == CONTROL) {\r\n            var controlRange = this.docSelection.createRange();\r\n            var rangeElement = getSingleElementFromRange(range);\r\n\r\n            // Create a new ControlRange containing all the elements in the selected ControlRange minus the\r\n            // element contained by the supplied range\r\n            var doc = getDocument(controlRange.item(0));\r\n            var newControlRange = getBody(doc).createControlRange();\r\n            var el,\r\n              removed = false;\r\n            for (var i = 0, len = controlRange.length; i < len; ++i) {\r\n              el = controlRange.item(i);\r\n              if (el !== rangeElement || removed) {\r\n                newControlRange.add(controlRange.item(i));\r\n              } else {\r\n                removed = true;\r\n              }\r\n            }\r\n            newControlRange.select();\r\n\r\n            // Update the wrapped selection based on what's now in the native selection\r\n            updateControlSelection(this);\r\n          } else {\r\n            removeRangeManually(this, range);\r\n          }\r\n        };\r\n      } else {\r\n        selProto.removeRange = function (range) {\r\n          removeRangeManually(this, range);\r\n        };\r\n      }\r\n\r\n      // Detecting if a selection is backward\r\n      var selectionIsBackward;\r\n      if (\r\n        !useDocumentSelection &&\r\n        selectionHasAnchorAndFocus &&\r\n        features.implementsDomRange\r\n      ) {\r\n        selectionIsBackward = winSelectionIsBackward;\r\n\r\n        selProto.isBackward = function () {\r\n          return selectionIsBackward(this);\r\n        };\r\n      } else {\r\n        selectionIsBackward = selProto.isBackward = function () {\r\n          return false;\r\n        };\r\n      }\r\n\r\n      // Create an alias for backwards compatibility. From 1.3, everything is \"backward\" rather than \"backwards\"\r\n      selProto.isBackwards = selProto.isBackward;\r\n\r\n      // Selection stringifier\r\n      // This is conformant to the old HTML5 selections draft spec but differs from WebKit and Mozilla's implementation.\r\n      // The current spec does not yet define this method.\r\n      selProto.toString = function () {\r\n        var rangeTexts = [];\r\n        for (var i = 0, len = this.rangeCount; i < len; ++i) {\r\n          rangeTexts[i] = \"\" + this._ranges[i];\r\n        }\r\n        return rangeTexts.join(\"\");\r\n      };\r\n\r\n      function assertNodeInSameDocument(sel, node) {\r\n        if (sel.win.document != getDocument(node)) {\r\n          throw new DOMException(\"WRONG_DOCUMENT_ERR\");\r\n        }\r\n      }\r\n\r\n      // No current browser conforms fully to the spec for this method, so Rangy's own method is always used\r\n      selProto.collapse = function (node, offset) {\r\n        assertNodeInSameDocument(this, node);\r\n        var range = api.createRange(node);\r\n        range.collapseToPoint(node, offset);\r\n        this.setSingleRange(range);\r\n        this.isCollapsed = true;\r\n      };\r\n\r\n      selProto.collapseToStart = function () {\r\n        if (this.rangeCount) {\r\n          var range = this._ranges[0];\r\n          this.collapse(range.startContainer, range.startOffset);\r\n        } else {\r\n          throw new DOMException(\"INVALID_STATE_ERR\");\r\n        }\r\n      };\r\n\r\n      selProto.collapseToEnd = function () {\r\n        if (this.rangeCount) {\r\n          var range = this._ranges[this.rangeCount - 1];\r\n          this.collapse(range.endContainer, range.endOffset);\r\n        } else {\r\n          throw new DOMException(\"INVALID_STATE_ERR\");\r\n        }\r\n      };\r\n\r\n      // The spec is very specific on how selectAllChildren should be implemented and not all browsers implement it as\r\n      // specified so the native implementation is never used by Rangy.\r\n      selProto.selectAllChildren = function (node) {\r\n        assertNodeInSameDocument(this, node);\r\n        var range = api.createRange(node);\r\n        range.selectNodeContents(node);\r\n        this.setSingleRange(range);\r\n      };\r\n\r\n      selProto.deleteFromDocument = function () {\r\n        // Sepcial behaviour required for IE's control selections\r\n        if (\r\n          implementsControlRange &&\r\n          implementsDocSelection &&\r\n          this.docSelection.type == CONTROL\r\n        ) {\r\n          var controlRange = this.docSelection.createRange();\r\n          var element;\r\n          while (controlRange.length) {\r\n            element = controlRange.item(0);\r\n            controlRange.remove(element);\r\n            dom.removeNode(element);\r\n          }\r\n          this.refresh();\r\n        } else if (this.rangeCount) {\r\n          var ranges = this.getAllRanges();\r\n          if (ranges.length) {\r\n            this.removeAllRanges();\r\n            for (var i = 0, len = ranges.length; i < len; ++i) {\r\n              ranges[i].deleteContents();\r\n            }\r\n            // The spec says nothing about what the selection should contain after calling deleteContents on each\r\n            // range. Firefox moves the selection to where the final selected range was, so we emulate that\r\n            this.addRange(ranges[len - 1]);\r\n          }\r\n        }\r\n      };\r\n\r\n      // The following are non-standard extensions\r\n      selProto.eachRange = function (func, returnValue) {\r\n        for (var i = 0, len = this._ranges.length; i < len; ++i) {\r\n          if (func(this.getRangeAt(i))) {\r\n            return returnValue;\r\n          }\r\n        }\r\n      };\r\n\r\n      selProto.getAllRanges = function () {\r\n        var ranges = [];\r\n        this.eachRange(function (range) {\r\n          ranges.push(range);\r\n        });\r\n        return ranges;\r\n      };\r\n\r\n      selProto.setSingleRange = function (range, direction) {\r\n        this.removeAllRanges();\r\n        this.addRange(range, direction);\r\n      };\r\n\r\n      selProto.callMethodOnEachRange = function (methodName, params) {\r\n        var results = [];\r\n        this.eachRange(function (range) {\r\n          results.push(range[methodName].apply(range, params || []));\r\n        });\r\n        return results;\r\n      };\r\n\r\n      function createStartOrEndSetter(isStart) {\r\n        return function (node, offset) {\r\n          var range;\r\n          if (this.rangeCount) {\r\n            range = this.getRangeAt(0);\r\n            range[\"set\" + (isStart ? \"Start\" : \"End\")](node, offset);\r\n          } else {\r\n            range = api.createRange(this.win.document);\r\n            range.setStartAndEnd(node, offset);\r\n          }\r\n          this.setSingleRange(range, this.isBackward());\r\n        };\r\n      }\r\n\r\n      selProto.setStart = createStartOrEndSetter(true);\r\n      selProto.setEnd = createStartOrEndSetter(false);\r\n\r\n      // Add select() method to Range prototype. Any existing selection will be removed.\r\n      api.rangePrototype.select = function (direction) {\r\n        getSelection(this.getDocument()).setSingleRange(this, direction);\r\n      };\r\n\r\n      selProto.changeEachRange = function (func) {\r\n        var ranges = [];\r\n        var backward = this.isBackward();\r\n\r\n        this.eachRange(function (range) {\r\n          func(range);\r\n          ranges.push(range);\r\n        });\r\n\r\n        this.removeAllRanges();\r\n        if (backward && ranges.length == 1) {\r\n          this.addRange(ranges[0], \"backward\");\r\n        } else {\r\n          this.setRanges(ranges);\r\n        }\r\n      };\r\n\r\n      selProto.containsNode = function (node, allowPartial) {\r\n        return (\r\n          this.eachRange(function (range) {\r\n            return range.containsNode(node, allowPartial);\r\n          }, true) || false\r\n        );\r\n      };\r\n\r\n      selProto.getBookmark = function (containerNode) {\r\n        return {\r\n          backward: this.isBackward(),\r\n          rangeBookmarks: this.callMethodOnEachRange(\"getBookmark\", [\r\n            containerNode,\r\n          ]),\r\n        };\r\n      };\r\n\r\n      selProto.moveToBookmark = function (bookmark) {\r\n        var selRanges = [];\r\n        for (\r\n          var i = 0, rangeBookmark, range;\r\n          (rangeBookmark = bookmark.rangeBookmarks[i++]);\r\n\r\n        ) {\r\n          range = api.createRange(this.win);\r\n          range.moveToBookmark(rangeBookmark);\r\n          selRanges.push(range);\r\n        }\r\n        if (bookmark.backward) {\r\n          this.setSingleRange(selRanges[0], \"backward\");\r\n        } else {\r\n          this.setRanges(selRanges);\r\n        }\r\n      };\r\n\r\n      selProto.saveRanges = function () {\r\n        return {\r\n          backward: this.isBackward(),\r\n          ranges: this.callMethodOnEachRange(\"cloneRange\"),\r\n        };\r\n      };\r\n\r\n      selProto.restoreRanges = function (selRanges) {\r\n        this.removeAllRanges();\r\n        for (var i = 0, range; (range = selRanges.ranges[i]); ++i) {\r\n          this.addRange(range, selRanges.backward && i == 0);\r\n        }\r\n      };\r\n\r\n      selProto.toHtml = function () {\r\n        var rangeHtmls = [];\r\n        this.eachRange(function (range) {\r\n          rangeHtmls.push(DomRange.toHtml(range));\r\n        });\r\n        return rangeHtmls.join(\"\");\r\n      };\r\n\r\n      if (features.implementsTextRange) {\r\n        selProto.getNativeTextRange = function () {\r\n          var sel, textRange;\r\n          if ((sel = this.docSelection)) {\r\n            var range = sel.createRange();\r\n            if (isTextRange(range)) {\r\n              return range;\r\n            } else {\r\n              throw module.createError(\r\n                \"getNativeTextRange: selection is a control selection\"\r\n              );\r\n            }\r\n          } else if (this.rangeCount > 0) {\r\n            return api.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));\r\n          } else {\r\n            throw module.createError(\r\n              \"getNativeTextRange: selection contains no range\"\r\n            );\r\n          }\r\n        };\r\n      }\r\n\r\n      function inspect(sel) {\r\n        var rangeInspects = [];\r\n        var anchor = new DomPosition(sel.anchorNode, sel.anchorOffset);\r\n        var focus = new DomPosition(sel.focusNode, sel.focusOffset);\r\n        var name =\r\n          typeof sel.getName == \"function\" ? sel.getName() : \"Selection\";\r\n\r\n        if (typeof sel.rangeCount != \"undefined\") {\r\n          for (var i = 0, len = sel.rangeCount; i < len; ++i) {\r\n            rangeInspects[i] = DomRange.inspect(sel.getRangeAt(i));\r\n          }\r\n        }\r\n        return (\r\n          \"[\" +\r\n          name +\r\n          \"(Ranges: \" +\r\n          rangeInspects.join(\", \") +\r\n          \")(anchor: \" +\r\n          anchor.inspect() +\r\n          \", focus: \" +\r\n          focus.inspect() +\r\n          \"]\"\r\n        );\r\n      }\r\n\r\n      selProto.getName = function () {\r\n        return \"WrappedSelection\";\r\n      };\r\n\r\n      selProto.inspect = function () {\r\n        return inspect(this);\r\n      };\r\n\r\n      selProto.detach = function () {\r\n        actOnCachedSelection(this.win, \"delete\");\r\n        deleteProperties(this);\r\n      };\r\n\r\n      WrappedSelection.detachAll = function () {\r\n        actOnCachedSelection(null, \"deleteAll\");\r\n      };\r\n\r\n      WrappedSelection.inspect = inspect;\r\n      WrappedSelection.isDirectionBackward = isDirectionBackward;\r\n\r\n      api.Selection = WrappedSelection;\r\n\r\n      api.selectionPrototype = selProto;\r\n\r\n      api.addShimListener(function (win) {\r\n        if (typeof win.getSelection == \"undefined\") {\r\n          win.getSelection = function () {\r\n            return getSelection(win);\r\n          };\r\n        }\r\n        win = null;\r\n      });\r\n    }\r\n  );\r\n\r\n  /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n  // Wait for document to load before initializing\r\n  var docReady = false;\r\n\r\n  var loadHandler = function (e) {\r\n    if (!docReady) {\r\n      docReady = true;\r\n      if (!api.initialized && api.config.autoInitialize) {\r\n        init();\r\n      }\r\n    }\r\n  };\r\n\r\n  if (isBrowser) {\r\n    // Test whether the document has already been loaded and initialize immediately if so\r\n    if (document.readyState == \"complete\") {\r\n      loadHandler();\r\n    } else {\r\n      if (isHostMethod(document, \"addEventListener\")) {\r\n        document.addEventListener(\"DOMContentLoaded\", loadHandler, false);\r\n      }\r\n\r\n      // Add a fallback in case the DOMContentLoaded event isn't supported\r\n      addListener(window, \"load\", loadHandler);\r\n    }\r\n  }\r\n\r\n  return api;\r\n}, this);\r\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/rangy-core.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/rangy-highlighter.js":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/rangy-highlighter.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Highlighter module for Rangy, a cross-browser JavaScript range and selection library\r\n * https://github.com/timdown/rangy\r\n *\r\n * Depends on Rangy core, ClassApplier and optionally TextRange modules.\r\n *\r\n * Copyright 2015, Tim Down\r\n * Licensed under the MIT license.\r\n * Version: 1.3.0\r\n * Build date: 10 May 2015\r\n */\r\n(function (factory, root) {\r\n  if (true) {\r\n    // AMD. Register as an anonymous module with a dependency on Rangy.\r\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./rangy-core */ \"./src/core/custom_plugins/highlights-comments/rangy-core.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n  } else {}\r\n})(function (rangy) {\r\n  rangy.createModule(\"Highlighter\", [\"ClassApplier\"], function (api, module) {\r\n    var dom = api.dom;\r\n    var contains = dom.arrayContains;\r\n    var getBody = dom.getBody;\r\n    var createOptions = api.util.createOptions;\r\n    var forEach = api.util.forEach;\r\n    var nextHighlightId = 1;\r\n\r\n    // Puts highlights in order, last in document first.\r\n    function compareHighlights(h1, h2) {\r\n      return h1.characterRange.start - h2.characterRange.start;\r\n    }\r\n\r\n    function getContainerElement(doc, id) {\r\n      return id ? doc.getElementById(id) : getBody(doc);\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    var highlighterTypes = {};\r\n\r\n    function HighlighterType(type, converterCreator) {\r\n      this.type = type;\r\n      this.converterCreator = converterCreator;\r\n    }\r\n\r\n    HighlighterType.prototype.create = function () {\r\n      var converter = this.converterCreator();\r\n      converter.type = this.type;\r\n      return converter;\r\n    };\r\n\r\n    function registerHighlighterType(type, converterCreator) {\r\n      highlighterTypes[type] = new HighlighterType(type, converterCreator);\r\n    }\r\n\r\n    function getConverter(type) {\r\n      var highlighterType = highlighterTypes[type];\r\n      if (highlighterType instanceof HighlighterType) {\r\n        return highlighterType.create();\r\n      } else {\r\n        throw new Error(\"Highlighter type '\" + type + \"' is not valid\");\r\n      }\r\n    }\r\n\r\n    api.registerHighlighterType = registerHighlighterType;\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function CharacterRange(start, end) {\r\n      this.start = start;\r\n      this.end = end;\r\n    }\r\n\r\n    CharacterRange.prototype = {\r\n      intersects: function (charRange) {\r\n        return this.start < charRange.end && this.end > charRange.start;\r\n      },\r\n\r\n      isContiguousWith: function (charRange) {\r\n        return this.start == charRange.end || this.end == charRange.start;\r\n      },\r\n\r\n      union: function (charRange) {\r\n        return new CharacterRange(\r\n          Math.min(this.start, charRange.start),\r\n          Math.max(this.end, charRange.end)\r\n        );\r\n      },\r\n\r\n      intersection: function (charRange) {\r\n        return new CharacterRange(\r\n          Math.max(this.start, charRange.start),\r\n          Math.min(this.end, charRange.end)\r\n        );\r\n      },\r\n\r\n      getComplements: function (charRange) {\r\n        var ranges = [];\r\n        if (this.start >= charRange.start) {\r\n          if (this.end <= charRange.end) {\r\n            return [];\r\n          }\r\n          ranges.push(new CharacterRange(charRange.end, this.end));\r\n        } else {\r\n          ranges.push(\r\n            new CharacterRange(this.start, Math.min(this.end, charRange.start))\r\n          );\r\n          if (this.end > charRange.end) {\r\n            ranges.push(new CharacterRange(charRange.end, this.end));\r\n          }\r\n        }\r\n        return ranges;\r\n      },\r\n\r\n      toString: function () {\r\n        return \"[CharacterRange(\" + this.start + \", \" + this.end + \")]\";\r\n      },\r\n    };\r\n\r\n    CharacterRange.fromCharacterRange = function (charRange) {\r\n      return new CharacterRange(charRange.start, charRange.end);\r\n    };\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    var textContentConverter = {\r\n      rangeToCharacterRange: function (range, containerNode) {\r\n        var bookmark = range.getBookmark(containerNode);\r\n        return new CharacterRange(bookmark.start, bookmark.end);\r\n      },\r\n\r\n      characterRangeToRange: function (doc, characterRange, containerNode) {\r\n        var range = api.createRange(doc);\r\n        range.moveToBookmark({\r\n          start: characterRange.start,\r\n          end: characterRange.end,\r\n          containerNode: containerNode,\r\n        });\r\n\r\n        return range;\r\n      },\r\n\r\n      serializeSelection: function (selection, containerNode) {\r\n        var ranges = selection.getAllRanges(),\r\n          rangeCount = ranges.length;\r\n        var rangeInfos = [];\r\n\r\n        var backward = rangeCount == 1 && selection.isBackward();\r\n\r\n        for (var i = 0, len = ranges.length; i < len; ++i) {\r\n          rangeInfos[i] = {\r\n            characterRange: this.rangeToCharacterRange(\r\n              ranges[i],\r\n              containerNode\r\n            ),\r\n            backward: backward,\r\n          };\r\n        }\r\n\r\n        return rangeInfos;\r\n      },\r\n\r\n      restoreSelection: function (selection, savedSelection, containerNode) {\r\n        selection.removeAllRanges();\r\n        var doc = selection.win.document;\r\n        for (\r\n          var i = 0,\r\n            len = savedSelection.length,\r\n            range,\r\n            rangeInfo,\r\n            characterRange;\r\n          i < len;\r\n          ++i\r\n        ) {\r\n          rangeInfo = savedSelection[i];\r\n          characterRange = rangeInfo.characterRange;\r\n          range = this.characterRangeToRange(\r\n            doc,\r\n            rangeInfo.characterRange,\r\n            containerNode\r\n          );\r\n          selection.addRange(range, rangeInfo.backward);\r\n        }\r\n      },\r\n    };\r\n\r\n    registerHighlighterType(\"textContent\", function () {\r\n      return textContentConverter;\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Lazily load the TextRange-based converter so that the dependency is only checked when required.\r\n    registerHighlighterType(\r\n      \"TextRange\",\r\n      (function () {\r\n        var converter;\r\n\r\n        return function () {\r\n          if (!converter) {\r\n            // Test that textRangeModule exists and is supported\r\n            var textRangeModule = api.modules.TextRange;\r\n            if (!textRangeModule) {\r\n              throw new Error(\"TextRange module is missing.\");\r\n            } else if (!textRangeModule.supported) {\r\n              throw new Error(\"TextRange module is present but not supported.\");\r\n            }\r\n\r\n            converter = {\r\n              rangeToCharacterRange: function (range, containerNode) {\r\n                return CharacterRange.fromCharacterRange(\r\n                  range.toCharacterRange(containerNode)\r\n                );\r\n              },\r\n\r\n              characterRangeToRange: function (\r\n                doc,\r\n                characterRange,\r\n                containerNode\r\n              ) {\r\n                var range = api.createRange(doc);\r\n\r\n                range.selectCharacters(\r\n                  containerNode,\r\n                  characterRange.start,\r\n                  characterRange.end\r\n                );\r\n                return range;\r\n              },\r\n\r\n              serializeSelection: function (selection, containerNode) {\r\n                return selection.saveCharacterRanges(containerNode);\r\n              },\r\n\r\n              restoreSelection: function (\r\n                selection,\r\n                savedSelection,\r\n                containerNode\r\n              ) {\r\n                selection.restoreCharacterRanges(containerNode, savedSelection);\r\n              },\r\n            };\r\n          }\r\n\r\n          return converter;\r\n        };\r\n      })()\r\n    );\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function Highlight(\r\n      doc,\r\n      characterRange,\r\n      classApplier,\r\n      converter,\r\n      id,\r\n      containerElementId\r\n    ) {\r\n      if (id) {\r\n        this.id = id;\r\n        nextHighlightId = Math.max(nextHighlightId, id + 1);\r\n      } else {\r\n        this.id = nextHighlightId++;\r\n      }\r\n      this.characterRange = characterRange;\r\n      this.doc = doc;\r\n      this.classApplier = classApplier;\r\n      this.converter = converter;\r\n      this.containerElementId = containerElementId || null;\r\n      this.applied = false;\r\n    }\r\n\r\n    Highlight.prototype = {\r\n      getContainerElement: function () {\r\n        return getContainerElement(this.doc, this.containerElementId);\r\n      },\r\n\r\n      getRange: function () {\r\n        return this.converter.characterRangeToRange(\r\n          this.doc,\r\n          this.characterRange,\r\n          this.getContainerElement()\r\n        );\r\n      },\r\n\r\n      fromRange: function (range) {\r\n        this.characterRange = this.converter.rangeToCharacterRange(\r\n          range,\r\n          this.getContainerElement()\r\n        );\r\n      },\r\n\r\n      getText: function () {\r\n        return this.getRange().toString();\r\n      },\r\n\r\n      containsElement: function (el) {\r\n        return this.getRange().containsNodeContents(el.firstChild);\r\n      },\r\n\r\n      unapply: function () {\r\n        this.classApplier.undoToRange(this.getRange());\r\n        this.applied = false;\r\n      },\r\n\r\n      apply: function () {\r\n        this.classApplier.applyToRange(this.getRange());\r\n        this.applied = true;\r\n      },\r\n\r\n      getHighlightElements: function () {\r\n        return this.classApplier.getElementsWithClassIntersectingRange(\r\n          this.getRange()\r\n        );\r\n      },\r\n\r\n      toString: function () {\r\n        return (\r\n          \"[Highlight(ID: \" +\r\n          this.id +\r\n          \", class: \" +\r\n          this.classApplier.className +\r\n          \", character range: \" +\r\n          this.characterRange.start +\r\n          \" - \" +\r\n          this.characterRange.end +\r\n          \")]\"\r\n        );\r\n      },\r\n    };\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function Highlighter(doc, type) {\r\n      type = type || \"textContent\";\r\n      this.doc = doc || document;\r\n      this.classAppliers = {};\r\n      this.highlights = [];\r\n      this.converter = getConverter(type);\r\n    }\r\n\r\n    Highlighter.prototype = {\r\n      addClassApplier: function (classApplier) {\r\n        this.classAppliers[classApplier.className] = classApplier;\r\n      },\r\n\r\n      getHighlightForElement: function (el) {\r\n        var highlights = this.highlights;\r\n        for (var i = 0, len = highlights.length; i < len; ++i) {\r\n          if (highlights[i].containsElement(el)) {\r\n            return highlights[i];\r\n          }\r\n        }\r\n        return null;\r\n      },\r\n\r\n      removeHighlights: function (highlights) {\r\n        for (var i = 0, len = this.highlights.length, highlight; i < len; ++i) {\r\n          highlight = this.highlights[i];\r\n          if (contains(highlights, highlight)) {\r\n            highlight.unapply();\r\n            this.highlights.splice(i--, 1);\r\n          }\r\n        }\r\n      },\r\n\r\n      removeAllHighlights: function () {\r\n        this.removeHighlights(this.highlights);\r\n      },\r\n\r\n      getIntersectingHighlights: function (ranges) {\r\n        // Test each range against each of the highlighted ranges to see whether they overlap\r\n        var intersectingHighlights = [],\r\n          highlights = this.highlights;\r\n        forEach(ranges, function (range) {\r\n          //var selCharRange = converter.rangeToCharacterRange(range);\r\n          forEach(highlights, function (highlight) {\r\n            if (\r\n              range.intersectsRange(highlight.getRange()) &&\r\n              !contains(intersectingHighlights, highlight)\r\n            ) {\r\n              intersectingHighlights.push(highlight);\r\n            }\r\n          });\r\n        });\r\n\r\n        return intersectingHighlights;\r\n      },\r\n\r\n      highlightCharacterRanges: function (className, charRanges, options) {\r\n        var i, len, j;\r\n        var highlights = this.highlights;\r\n        var converter = this.converter;\r\n        var doc = this.doc;\r\n        var highlightsToRemove = [];\r\n        var classApplier = className ? this.classAppliers[className] : null;\r\n\r\n        options = createOptions(options, {\r\n          containerElementId: null,\r\n          exclusive: true,\r\n        });\r\n\r\n        var containerElementId = options.containerElementId;\r\n        var exclusive = options.exclusive;\r\n\r\n        var containerElement, containerElementRange, containerElementCharRange;\r\n        if (containerElementId) {\r\n          containerElement = this.doc.getElementById(containerElementId);\r\n          if (containerElement) {\r\n            containerElementRange = api.createRange(this.doc);\r\n            containerElementRange.selectNodeContents(containerElement);\r\n            containerElementCharRange = new CharacterRange(\r\n              0,\r\n              containerElementRange.toString().length\r\n            );\r\n          }\r\n        }\r\n\r\n        var charRange,\r\n          highlightCharRange,\r\n          removeHighlight,\r\n          isSameClassApplier,\r\n          highlightsToKeep,\r\n          splitHighlight;\r\n\r\n        for (i = 0, len = charRanges.length; i < len; ++i) {\r\n          charRange = charRanges[i];\r\n          highlightsToKeep = [];\r\n\r\n          // Restrict character range to container element, if it exists\r\n          if (containerElementCharRange) {\r\n            charRange = charRange.intersection(containerElementCharRange);\r\n          }\r\n\r\n          // Ignore empty ranges\r\n          if (charRange.start == charRange.end) {\r\n            continue;\r\n          }\r\n\r\n          // Check for intersection with existing highlights. For each intersection, create a new highlight\r\n          // which is the union of the highlight range and the selected range\r\n          for (j = 0; j < highlights.length; ++j) {\r\n            removeHighlight = false;\r\n\r\n            if (containerElementId == highlights[j].containerElementId) {\r\n              highlightCharRange = highlights[j].characterRange;\r\n              //TS TODO nenechávám obalovat už existující prvky znovu\r\n              isSameClassApplier = true; // (classApplier == highlights[j].classApplier);\r\n              splitHighlight = !isSameClassApplier && exclusive;\r\n\r\n              // Replace the existing highlight if it needs to be:\r\n              //  1. merged (isSameClassApplier)\r\n              //  2. partially or entirely erased (className === null)\r\n              //  3. partially or entirely replaced (isSameClassApplier == false && exclusive == true)\r\n              if (\r\n                (highlightCharRange.intersects(charRange) ||\r\n                  highlightCharRange.isContiguousWith(charRange)) &&\r\n                (isSameClassApplier || splitHighlight)\r\n              ) {\r\n                // Remove existing highlights, keeping the unselected parts\r\n                if (splitHighlight) {\r\n                  forEach(\r\n                    highlightCharRange.getComplements(charRange),\r\n                    function (rangeToAdd) {\r\n                      highlightsToKeep.push(\r\n                        new Highlight(\r\n                          doc,\r\n                          rangeToAdd,\r\n                          highlights[j].classApplier,\r\n                          converter,\r\n                          null,\r\n                          containerElementId\r\n                        )\r\n                      );\r\n                    }\r\n                  );\r\n                }\r\n\r\n                removeHighlight = true;\r\n                if (isSameClassApplier) {\r\n                  charRange = highlightCharRange.union(charRange);\r\n                }\r\n              }\r\n            }\r\n\r\n            if (removeHighlight) {\r\n              highlightsToRemove.push(highlights[j]);\r\n              highlights[j] = new Highlight(\r\n                doc,\r\n                highlightCharRange.union(charRange),\r\n                classApplier,\r\n                converter,\r\n                null,\r\n                containerElementId\r\n              );\r\n            } else {\r\n              highlightsToKeep.push(highlights[j]);\r\n            }\r\n          }\r\n\r\n          // Add new range\r\n          if (classApplier) {\r\n            highlightsToKeep.push(\r\n              new Highlight(\r\n                doc,\r\n                charRange,\r\n                classApplier,\r\n                converter,\r\n                null,\r\n                containerElementId\r\n              )\r\n            );\r\n          }\r\n          this.highlights = highlights = highlightsToKeep;\r\n        }\r\n\r\n        // Remove the old highlights\r\n        forEach(highlightsToRemove, function (highlightToRemove) {\r\n          highlightToRemove.unapply();\r\n        });\r\n\r\n        // Apply new highlights\r\n        var newHighlights = [];\r\n        forEach(highlights, function (highlight) {\r\n          if (!highlight.applied) {\r\n            highlight.apply();\r\n            newHighlights.push(highlight);\r\n          }\r\n        });\r\n\r\n        return newHighlights;\r\n      },\r\n\r\n      highlightRanges: function (className, ranges, options) {\r\n        var selCharRanges = [];\r\n        var converter = this.converter;\r\n\r\n        options = createOptions(options, {\r\n          containerElement: null,\r\n          exclusive: true,\r\n        });\r\n\r\n        var containerElement = options.containerElement;\r\n        var containerElementId = containerElement ? containerElement.id : null;\r\n        var containerElementRange;\r\n        if (containerElement) {\r\n          containerElementRange = api.createRange(containerElement);\r\n          containerElementRange.selectNodeContents(containerElement);\r\n        }\r\n\r\n        forEach(ranges, function (range) {\r\n          var scopedRange = containerElement\r\n            ? containerElementRange.intersection(range)\r\n            : range;\r\n          selCharRanges.push(\r\n            converter.rangeToCharacterRange(\r\n              scopedRange,\r\n              containerElement || getBody(range.getDocument())\r\n            )\r\n          );\r\n        });\r\n\r\n        return this.highlightCharacterRanges(className, selCharRanges, {\r\n          containerElementId: containerElementId,\r\n          exclusive: options.exclusive,\r\n        });\r\n      },\r\n\r\n      highlightSelection: function (className, options) {\r\n        var converter = this.converter;\r\n        var classApplier = className ? this.classAppliers[className] : false;\r\n\r\n        options = createOptions(options, {\r\n          containerElementId: null,\r\n          selection: api.getSelection(this.doc),\r\n          exclusive: true,\r\n        });\r\n\r\n        var containerElementId = options.containerElementId;\r\n        var exclusive = options.exclusive;\r\n        var selection = options.selection;\r\n        var doc = selection.win.document;\r\n        var containerElement = getContainerElement(doc, containerElementId);\r\n\r\n        //debugger\r\n        if (!classApplier && className !== false) {\r\n          throw new Error(\r\n            \"No class applier found for class '\" + className + \"'\"\r\n          );\r\n        }\r\n\r\n        // Store the existing selection as character ranges\r\n        var serializedSelection = converter.serializeSelection(\r\n          selection,\r\n          containerElement\r\n        );\r\n\r\n        // Create an array of selected character ranges\r\n        var selCharRanges = [];\r\n        forEach(serializedSelection, function (rangeInfo) {\r\n          selCharRanges.push(\r\n            CharacterRange.fromCharacterRange(rangeInfo.characterRange)\r\n          );\r\n        });\r\n\r\n        var newHighlights = this.highlightCharacterRanges(\r\n          className,\r\n          selCharRanges,\r\n          {\r\n            containerElementId: containerElementId,\r\n            exclusive: exclusive,\r\n          }\r\n        );\r\n\r\n        // Restore selection\r\n        converter.restoreSelection(\r\n          selection,\r\n          serializedSelection,\r\n          containerElement\r\n        );\r\n\r\n        return newHighlights;\r\n      },\r\n\r\n      unhighlightSelection: function (selection) {\r\n        selection = selection || api.getSelection(this.doc);\r\n        var intersectingHighlights = this.getIntersectingHighlights(\r\n          selection.getAllRanges()\r\n        );\r\n        this.removeHighlights(intersectingHighlights);\r\n        selection.removeAllRanges();\r\n        return intersectingHighlights;\r\n      },\r\n\r\n      getHighlightsInSelection: function (selection) {\r\n        selection = selection || api.getSelection(this.doc);\r\n        return this.getIntersectingHighlights(selection.getAllRanges());\r\n      },\r\n\r\n      selectionOverlapsHighlight: function (selection) {\r\n        return this.getHighlightsInSelection(selection).length > 0;\r\n      },\r\n\r\n      serialize: function (options) {\r\n        var highlighter = this;\r\n        var highlights = highlighter.highlights;\r\n        var serializedType,\r\n          serializedHighlights,\r\n          convertType,\r\n          serializationConverter;\r\n\r\n        highlights.sort(compareHighlights);\r\n        options = createOptions(options, {\r\n          serializeHighlightText: false,\r\n          type: highlighter.converter.type,\r\n        });\r\n\r\n        serializedType = options.type;\r\n        convertType = serializedType != highlighter.converter.type;\r\n\r\n        if (convertType) {\r\n          serializationConverter = getConverter(serializedType);\r\n        }\r\n\r\n        serializedHighlights = [\"type:\" + serializedType];\r\n\r\n        forEach(highlights, function (highlight) {\r\n          var characterRange = highlight.characterRange;\r\n          var containerElement;\r\n\r\n          // Convert to the current Highlighter's type, if different from the serialization type\r\n          if (convertType) {\r\n            containerElement = highlight.getContainerElement();\r\n            characterRange = serializationConverter.rangeToCharacterRange(\r\n              highlighter.converter.characterRangeToRange(\r\n                highlighter.doc,\r\n                characterRange,\r\n                containerElement\r\n              ),\r\n              containerElement\r\n            );\r\n          }\r\n\r\n          var parts = [\r\n            characterRange.start,\r\n            characterRange.end,\r\n            highlight.id,\r\n            highlight.classApplier.className,\r\n            highlight.containerElementId,\r\n          ];\r\n\r\n          if (options.serializeHighlightText) {\r\n            parts.push(highlight.getText());\r\n          }\r\n          serializedHighlights.push(parts.join(\"$\"));\r\n        });\r\n\r\n        return serializedHighlights.join(\"|\");\r\n      },\r\n\r\n      deserialize: function (serialized) {\r\n        var serializedHighlights = serialized.split(\"|\");\r\n        var highlights = [];\r\n\r\n        var firstHighlight = serializedHighlights[0];\r\n        var regexResult;\r\n        var serializationType,\r\n          serializationConverter,\r\n          convertType = false;\r\n        if (\r\n          firstHighlight &&\r\n          (regexResult = /^type:(\\w+)$/.exec(firstHighlight))\r\n        ) {\r\n          serializationType = regexResult[1];\r\n          if (serializationType != this.converter.type) {\r\n            serializationConverter = getConverter(serializationType);\r\n            convertType = true;\r\n          }\r\n          serializedHighlights.shift();\r\n        } else {\r\n          throw new Error(\"Serialized highlights are invalid.\");\r\n        }\r\n\r\n        var classApplier,\r\n          highlight,\r\n          characterRange,\r\n          containerElementId,\r\n          containerElement;\r\n\r\n        for (var i = serializedHighlights.length, parts; i-- > 0; ) {\r\n          parts = serializedHighlights[i].split(\"$\");\r\n          characterRange = new CharacterRange(+parts[0], +parts[1]);\r\n          containerElementId = parts[4] || null;\r\n\r\n          // Convert to the current Highlighter's type, if different from the serialization type\r\n          if (convertType) {\r\n            containerElement = getContainerElement(\r\n              this.doc,\r\n              containerElementId\r\n            );\r\n            characterRange = this.converter.rangeToCharacterRange(\r\n              serializationConverter.characterRangeToRange(\r\n                this.doc,\r\n                characterRange,\r\n                containerElement\r\n              ),\r\n              containerElement\r\n            );\r\n          }\r\n\r\n          classApplier = this.classAppliers[parts[3]];\r\n\r\n          if (!classApplier) {\r\n            throw new Error(\r\n              \"No class applier found for class '\" + parts[3] + \"'\"\r\n            );\r\n          }\r\n\r\n          highlight = new Highlight(\r\n            this.doc,\r\n            characterRange,\r\n            classApplier,\r\n            this.converter,\r\n            parseInt(parts[2]),\r\n            containerElementId\r\n          );\r\n          highlight.apply();\r\n          highlights.push(highlight);\r\n        }\r\n        this.highlights = highlights;\r\n      },\r\n    };\r\n\r\n    api.Highlighter = Highlighter;\r\n\r\n    api.createHighlighter = function (doc, rangeCharacterOffsetConverterType) {\r\n      return new Highlighter(doc, rangeCharacterOffsetConverterType);\r\n    };\r\n  });\r\n\r\n  return rangy;\r\n}, this);\r\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/rangy-highlighter.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/rangy-text-range.js":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/rangy-text-range.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Text range module for Rangy.\r\n * Text-based manipulation and searching of ranges and selections.\r\n *\r\n * Features\r\n *\r\n * - Ability to move range boundaries by character or word offsets\r\n * - Customizable word tokenizer\r\n * - Ignores text nodes inside <script> or <style> elements or those hidden by CSS display and visibility properties\r\n * - Range findText method to search for text or regex within the page or within a range. Flags for whole words and case\r\n *   sensitivity\r\n * - Selection and range save/restore as text offsets within a node\r\n * - Methods to return visible text within a range or selection\r\n * - innerText method for elements\r\n *\r\n * References\r\n *\r\n * https://www.w3.org/Bugs/Public/show_bug.cgi?id=13145\r\n * http://aryeh.name/spec/innertext/innertext.html\r\n * http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html\r\n *\r\n * Part of Rangy, a cross-browser JavaScript range and selection library\r\n * https://github.com/timdown/rangy\r\n *\r\n * Depends on Rangy core.\r\n *\r\n * Copyright 2015, Tim Down\r\n * Licensed under the MIT license.\r\n * Version: 1.3.0\r\n * Build date: 10 May 2015\r\n */\r\n\r\n/**\r\n * Problem: handling of trailing spaces before line breaks is handled inconsistently between browsers.\r\n *\r\n * First, a <br>: this is relatively simple. For the following HTML:\r\n *\r\n * 1 <br>2\r\n *\r\n * - IE and WebKit render the space, include it in the selection (i.e. when the content is selected and pasted into a\r\n *   textarea, the space is present) and allow the caret to be placed after it.\r\n * - Firefox does not acknowledge the space in the selection but it is possible to place the caret after it.\r\n * - Opera does not render the space but has two separate caret positions on either side of the space (left and right\r\n *   arrow keys show this) and includes the space in the selection.\r\n *\r\n * The other case is the line break or breaks implied by block elements. For the following HTML:\r\n *\r\n * <p>1 </p><p>2<p>\r\n *\r\n * - WebKit does not acknowledge the space in any way\r\n * - Firefox, IE and Opera as per <br>\r\n *\r\n * One more case is trailing spaces before line breaks in elements with white-space: pre-line. For the following HTML:\r\n *\r\n * <p style=\"white-space: pre-line\">1\r\n * 2</p>\r\n *\r\n * - Firefox and WebKit include the space in caret positions\r\n * - IE does not support pre-line up to and including version 9\r\n * - Opera ignores the space\r\n * - Trailing space only renders if there is a non-collapsed character in the line\r\n *\r\n * Problem is whether Rangy should ever acknowledge the space and if so, when. Another problem is whether this can be\r\n * feature-tested\r\n */\r\n(function (factory, root) {\r\n  if (true) {\r\n    // AMD. Register as an anonymous module with a dependency on Rangy.\r\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./rangy-core */ \"./src/core/custom_plugins/highlights-comments/rangy-core.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n  } else {}\r\n})(function (rangy) {\r\n  rangy.createModule(\"TextRange\", [\"WrappedSelection\"], function (api, module) {\r\n    var UNDEF = \"undefined\";\r\n    var CHARACTER = \"character\",\r\n      WORD = \"word\";\r\n    var dom = api.dom,\r\n      util = api.util;\r\n    var extend = util.extend;\r\n    var createOptions = util.createOptions;\r\n    var getBody = dom.getBody;\r\n\r\n    var spacesRegex = /^[ \\t\\f\\r\\n]+$/;\r\n    var spacesMinusLineBreaksRegex = /^[ \\t\\f\\r]+$/;\r\n    var allWhiteSpaceRegex =\r\n      /^[\\t-\\r \\u0085\\u00A0\\u1680\\u180E\\u2000-\\u200B\\u2028\\u2029\\u202F\\u205F\\u3000]+$/;\r\n    var nonLineBreakWhiteSpaceRegex =\r\n      /^[\\t \\u00A0\\u1680\\u180E\\u2000-\\u200B\\u202F\\u205F\\u3000]+$/;\r\n    var lineBreakRegex = /^[\\n-\\r\\u0085\\u2028\\u2029]$/;\r\n\r\n    var defaultLanguage = \"en\";\r\n\r\n    var isDirectionBackward = api.Selection.isDirectionBackward;\r\n\r\n    // Properties representing whether trailing spaces inside blocks are completely collapsed (as they are in WebKit,\r\n    // but not other browsers). Also test whether trailing spaces before <br> elements are collapsed.\r\n    var trailingSpaceInBlockCollapses = false;\r\n    var trailingSpaceBeforeBrCollapses = false;\r\n    var trailingSpaceBeforeBlockCollapses = false;\r\n    var trailingSpaceBeforeLineBreakInPreLineCollapses = true;\r\n\r\n    (function () {\r\n      var el = dom.createTestElement(document, \"<p>1 </p><p></p>\", true);\r\n      var p = el.firstChild;\r\n      var sel = api.getSelection();\r\n      sel.collapse(p.lastChild, 2);\r\n      sel.setStart(p.firstChild, 0);\r\n      trailingSpaceInBlockCollapses = (\"\" + sel).length == 1;\r\n\r\n      el.innerHTML = \"1 <br />\";\r\n      sel.collapse(el, 2);\r\n      sel.setStart(el.firstChild, 0);\r\n      trailingSpaceBeforeBrCollapses = (\"\" + sel).length == 1;\r\n\r\n      el.innerHTML = \"1 <p>1</p>\";\r\n      sel.collapse(el, 2);\r\n      sel.setStart(el.firstChild, 0);\r\n      trailingSpaceBeforeBlockCollapses = (\"\" + sel).length == 1;\r\n\r\n      dom.removeNode(el);\r\n      sel.removeAllRanges();\r\n    })();\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // This function must create word and non-word tokens for the whole of the text supplied to it\r\n    function defaultTokenizer(chars, wordOptions) {\r\n      var word = chars.join(\"\"),\r\n        result,\r\n        tokenRanges = [];\r\n\r\n      function createTokenRange(start, end, isWord) {\r\n        tokenRanges.push({ start: start, end: end, isWord: isWord });\r\n      }\r\n\r\n      // Match words and mark characters\r\n      var lastWordEnd = 0,\r\n        wordStart,\r\n        wordEnd;\r\n      while ((result = wordOptions.wordRegex.exec(word))) {\r\n        wordStart = result.index;\r\n        wordEnd = wordStart + result[0].length;\r\n\r\n        // Create token for non-word characters preceding this word\r\n        if (wordStart > lastWordEnd) {\r\n          createTokenRange(lastWordEnd, wordStart, false);\r\n        }\r\n\r\n        // Get trailing space characters for word\r\n        if (wordOptions.includeTrailingSpace) {\r\n          while (nonLineBreakWhiteSpaceRegex.test(chars[wordEnd])) {\r\n            ++wordEnd;\r\n          }\r\n        }\r\n        createTokenRange(wordStart, wordEnd, true);\r\n        lastWordEnd = wordEnd;\r\n      }\r\n\r\n      // Create token for trailing non-word characters, if any exist\r\n      if (lastWordEnd < chars.length) {\r\n        createTokenRange(lastWordEnd, chars.length, false);\r\n      }\r\n\r\n      return tokenRanges;\r\n    }\r\n\r\n    function convertCharRangeToToken(chars, tokenRange) {\r\n      var tokenChars = chars.slice(tokenRange.start, tokenRange.end);\r\n      var token = {\r\n        isWord: tokenRange.isWord,\r\n        chars: tokenChars,\r\n        toString: function () {\r\n          return tokenChars.join(\"\");\r\n        },\r\n      };\r\n      for (var i = 0, len = tokenChars.length; i < len; ++i) {\r\n        tokenChars[i].token = token;\r\n      }\r\n      return token;\r\n    }\r\n\r\n    function tokenize(chars, wordOptions, tokenizer) {\r\n      var tokenRanges = tokenizer(chars, wordOptions);\r\n      var tokens = [];\r\n      for (var i = 0, tokenRange; (tokenRange = tokenRanges[i++]); ) {\r\n        tokens.push(convertCharRangeToToken(chars, tokenRange));\r\n      }\r\n      return tokens;\r\n    }\r\n\r\n    var defaultCharacterOptions = {\r\n      includeBlockContentTrailingSpace: true,\r\n      includeSpaceBeforeBr: true,\r\n      includeSpaceBeforeBlock: true,\r\n      includePreLineTrailingSpace: true,\r\n      ignoreCharacters: \"\",\r\n    };\r\n\r\n    function normalizeIgnoredCharacters(ignoredCharacters) {\r\n      // Check if character is ignored\r\n      var ignoredChars = ignoredCharacters || \"\";\r\n\r\n      // Normalize ignored characters into a string consisting of characters in ascending order of character code\r\n      var ignoredCharsArray =\r\n        typeof ignoredChars == \"string\" ? ignoredChars.split(\"\") : ignoredChars;\r\n      ignoredCharsArray.sort(function (char1, char2) {\r\n        return char1.charCodeAt(0) - char2.charCodeAt(0);\r\n      });\r\n\r\n      /// Convert back to a string and remove duplicates\r\n      return ignoredCharsArray.join(\"\").replace(/(.)\\1+/g, \"$1\");\r\n    }\r\n\r\n    var defaultCaretCharacterOptions = {\r\n      includeBlockContentTrailingSpace:\r\n        !trailingSpaceBeforeLineBreakInPreLineCollapses,\r\n      includeSpaceBeforeBr: !trailingSpaceBeforeBrCollapses,\r\n      includeSpaceBeforeBlock: !trailingSpaceBeforeBlockCollapses,\r\n      includePreLineTrailingSpace: true,\r\n    };\r\n\r\n    var defaultWordOptions = {\r\n      en: {\r\n        wordRegex: /[a-z0-9]+('[a-z0-9]+)*/gi,\r\n        includeTrailingSpace: false,\r\n        tokenizer: defaultTokenizer,\r\n      },\r\n    };\r\n\r\n    var defaultFindOptions = {\r\n      caseSensitive: false,\r\n      withinRange: null,\r\n      wholeWordsOnly: false,\r\n      wrap: false,\r\n      direction: \"forward\",\r\n      wordOptions: null,\r\n      characterOptions: null,\r\n    };\r\n\r\n    var defaultMoveOptions = {\r\n      wordOptions: null,\r\n      characterOptions: null,\r\n    };\r\n\r\n    var defaultExpandOptions = {\r\n      wordOptions: null,\r\n      characterOptions: null,\r\n      trim: false,\r\n      trimStart: true,\r\n      trimEnd: true,\r\n    };\r\n\r\n    var defaultWordIteratorOptions = {\r\n      wordOptions: null,\r\n      characterOptions: null,\r\n      direction: \"forward\",\r\n    };\r\n\r\n    function createWordOptions(options) {\r\n      var lang, defaults;\r\n      if (!options) {\r\n        return defaultWordOptions[defaultLanguage];\r\n      } else {\r\n        lang = options.language || defaultLanguage;\r\n        defaults = {};\r\n        extend(\r\n          defaults,\r\n          defaultWordOptions[lang] || defaultWordOptions[defaultLanguage]\r\n        );\r\n        extend(defaults, options);\r\n        return defaults;\r\n      }\r\n    }\r\n\r\n    function createNestedOptions(optionsParam, defaults) {\r\n      var options = createOptions(optionsParam, defaults);\r\n      if (defaults.hasOwnProperty(\"wordOptions\")) {\r\n        options.wordOptions = createWordOptions(options.wordOptions);\r\n      }\r\n      if (defaults.hasOwnProperty(\"characterOptions\")) {\r\n        options.characterOptions = createOptions(\r\n          options.characterOptions,\r\n          defaultCharacterOptions\r\n        );\r\n      }\r\n      return options;\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    /* DOM utility functions */\r\n    var getComputedStyleProperty = dom.getComputedStyleProperty;\r\n\r\n    // Create cachable versions of DOM functions\r\n\r\n    // Test for old IE's incorrect display properties\r\n    var tableCssDisplayBlock;\r\n    (function () {\r\n      var table = document.createElement(\"table\");\r\n      var body = getBody(document);\r\n      body.appendChild(table);\r\n      tableCssDisplayBlock =\r\n        getComputedStyleProperty(table, \"display\") == \"block\";\r\n      body.removeChild(table);\r\n    })();\r\n\r\n    var defaultDisplayValueForTag = {\r\n      table: \"table\",\r\n      caption: \"table-caption\",\r\n      colgroup: \"table-column-group\",\r\n      col: \"table-column\",\r\n      thead: \"table-header-group\",\r\n      tbody: \"table-row-group\",\r\n      tfoot: \"table-footer-group\",\r\n      tr: \"table-row\",\r\n      td: \"table-cell\",\r\n      th: \"table-cell\",\r\n    };\r\n\r\n    // Corrects IE's \"block\" value for table-related elements\r\n    //TODO TS\r\n    function getComputedDisplay(el, win) {\r\n      var display = getComputedStyleProperty(el, \"user-select\", win);\r\n      // var display = 'block';\r\n      // var tagName = el.tagName.toLowerCase();\r\n      // return (display == \"none\");\r\n\r\n      if (display == \"none\") {\r\n        // debugger\r\n        return \"none\";\r\n      } else {\r\n        return \"xxxx\";\r\n      }\r\n\r\n      /*return (display == \"none\" &&\r\n        tableCssDisplayBlock &&\r\n        defaultDisplayValueForTag.hasOwnProperty(tagName)) ?\r\n        defaultDisplayValueForTag[tagName] : display;*/\r\n    }\r\n\r\n    function isHidden(node) {\r\n      //  return false;\r\n      //\r\n      // var className =  [\"skiprangy\", \"gauge\", \"validate\", \"test-revalidate\", \"count\", \"katex\"];\r\n      // var fux = \"skiprangy|gauge|validate|test-revalidate|count|katex\";\r\n      // var fux = \"skiprangy\";\r\n      //\r\n      // let target = node;\r\n      // var rex = new RegExp('(\\\\s|^)skiprangy|gauge|validate|count|katex(\\\\s|$)').test(target.className);\r\n      // var rexx= rex;\r\n      // // debugger\r\n      // if(rex){\r\n      //   // debugger\r\n      // }\r\n      // return rex;\r\n\r\n      // var ancestors = getAncestorsAndSelf(node);\r\n      //\r\n      // let gc = false;\r\n      // for (var i = 0, len = ancestors.length; i < len; ++i) {\r\n      //   var target = ancestors[i];\r\n      //\r\n      //     var fu = new RegExp('(\\\\s|^)' + fux + '(\\\\s|$)').test(target.className);\r\n      //     if(fu){\r\n      //\r\n      //\r\n      //       target.classList.add('ttttt');\r\n      //     gc =true;\r\n      //     }\r\n      //\r\n      // }\r\n      //\r\n      //\r\n      //\r\n      // return gc;\r\n\r\n      // if(node.nodeType == 1 && getComputedDisplay(node) == \"none\"){\r\n      //   return true;\r\n      // }\r\n\r\n      var ancestors = getAncestorsAndSelf(node);\r\n      for (var i = 0, len = ancestors.length; i < len; ++i) {\r\n        if (\r\n          ancestors[i].nodeType == 1 &&\r\n          getComputedDisplay(ancestors[i]) == \"none\"\r\n        ) {\r\n          return true;\r\n        }\r\n      }\r\n\r\n      return false;\r\n    }\r\n\r\n    function isVisibilityHiddenTextNode(textNode) {\r\n      return false;\r\n      var el;\r\n      return (\r\n        textNode.nodeType == 3 &&\r\n        (el = textNode.parentNode) &&\r\n        getComputedStyleProperty(el, \"visibility\") == \"hidden\"\r\n      );\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // \"A block node is either an Element whose \"display\" property does not have\r\n    // resolved value \"inline\" or \"inline-block\" or \"inline-table\" or \"none\", or a\r\n    // Document, or a DocumentFragment.\"\r\n    function isBlockNode(node) {\r\n      return (\r\n        node &&\r\n        ((node.nodeType == 1 &&\r\n          !/^(inline(-block|-table)?|none)$/.test(getComputedDisplay(node))) ||\r\n          node.nodeType == 9 ||\r\n          node.nodeType == 11)\r\n      );\r\n    }\r\n\r\n    function getLastDescendantOrSelf(node) {\r\n      var lastChild = node.lastChild;\r\n      return lastChild ? getLastDescendantOrSelf(lastChild) : node;\r\n    }\r\n\r\n    function containsPositions(node) {\r\n      return (\r\n        dom.isCharacterDataNode(node) ||\r\n        !/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(\r\n          node.nodeName\r\n        )\r\n      );\r\n    }\r\n\r\n    function getAncestors(node) {\r\n      var ancestors = [];\r\n      while (node.parentNode) {\r\n        ancestors.unshift(node.parentNode);\r\n        node = node.parentNode;\r\n      }\r\n      return ancestors;\r\n    }\r\n\r\n    function getAncestorsAndSelf(node) {\r\n      return getAncestors(node).concat([node]);\r\n    }\r\n\r\n    function nextNodeDescendants(node) {\r\n      while (node && !node.nextSibling) {\r\n        node = node.parentNode;\r\n      }\r\n      if (!node) {\r\n        return null;\r\n      }\r\n      return node.nextSibling;\r\n    }\r\n\r\n    function nextNode(node, excludeChildren) {\r\n      if (!excludeChildren && node.hasChildNodes()) {\r\n        return node.firstChild;\r\n      }\r\n      return nextNodeDescendants(node);\r\n    }\r\n\r\n    function previousNode(node) {\r\n      var previous = node.previousSibling;\r\n      if (previous) {\r\n        node = previous;\r\n        while (node.hasChildNodes()) {\r\n          node = node.lastChild;\r\n        }\r\n        return node;\r\n      }\r\n      var parent = node.parentNode;\r\n      if (parent && parent.nodeType == 1) {\r\n        return parent;\r\n      }\r\n      return null;\r\n    }\r\n\r\n    // Adpated from Aryeh's code.\r\n    // \"A whitespace node is either a Text node whose data is the empty string; or\r\n    // a Text node whose data consists only of one or more tabs (0x0009), line\r\n    // feeds (0x000A), carriage returns (0x000D), and/or spaces (0x0020), and whose\r\n    // parent is an Element whose resolved value for \"white-space\" is \"normal\" or\r\n    // \"nowrap\"; or a Text node whose data consists only of one or more tabs\r\n    // (0x0009), carriage returns (0x000D), and/or spaces (0x0020), and whose\r\n    // parent is an Element whose resolved value for \"white-space\" is \"pre-line\".\"\r\n    function isWhitespaceNode(node) {\r\n      if (!node || node.nodeType != 3) {\r\n        return false;\r\n      }\r\n      var text = node.data;\r\n      if (text === \"\") {\r\n        return true;\r\n      }\r\n      var parent = node.parentNode;\r\n      if (!parent || parent.nodeType != 1) {\r\n        return false;\r\n      }\r\n      var computedWhiteSpace = getComputedStyleProperty(\r\n        node.parentNode,\r\n        \"whiteSpace\"\r\n      );\r\n\r\n      return (\r\n        (/^[\\t\\n\\r ]+$/.test(text) &&\r\n          /^(normal|nowrap)$/.test(computedWhiteSpace)) ||\r\n        (/^[\\t\\r ]+$/.test(text) && computedWhiteSpace == \"pre-line\")\r\n      );\r\n    }\r\n\r\n    // Adpated from Aryeh's code.\r\n    // \"node is a collapsed whitespace node if the following algorithm returns\r\n    // true:\"\r\n    function isCollapsedWhitespaceNode(node) {\r\n      // \"If node's data is the empty string, return true.\"\r\n      if (node.data === \"\") {\r\n        return true;\r\n      }\r\n\r\n      // \"If node is not a whitespace node, return false.\"\r\n      if (!isWhitespaceNode(node)) {\r\n        return false;\r\n      }\r\n\r\n      // \"Let ancestor be node's parent.\"\r\n      var ancestor = node.parentNode;\r\n\r\n      // \"If ancestor is null, return true.\"\r\n      if (!ancestor) {\r\n        return true;\r\n      }\r\n\r\n      // \"If the \"display\" property of some ancestor of node has resolved value \"none\", return true.\"\r\n      if (isHidden(node)) {\r\n        return true;\r\n      }\r\n\r\n      return false;\r\n    }\r\n\r\n    function isCollapsedNode(node) {\r\n      var type = node.nodeType;\r\n      return (\r\n        type == 7 /* PROCESSING_INSTRUCTION */ ||\r\n        type == 8 /* COMMENT */ ||\r\n        isHidden(node) ||\r\n        /^(script|style)$/i.test(node.nodeName) ||\r\n        isVisibilityHiddenTextNode(node) ||\r\n        isCollapsedWhitespaceNode(node)\r\n      );\r\n    }\r\n\r\n    function isIgnoredNode(node, win) {\r\n      var type = node.nodeType;\r\n      return (\r\n        type == 7 /* PROCESSING_INSTRUCTION */ ||\r\n        type == 8 /* COMMENT */ ||\r\n        (type == 1 && getComputedDisplay(node, win) == \"none\")\r\n      );\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Possibly overengineered caching system to prevent repeated DOM calls slowing everything down\r\n\r\n    function Cache() {\r\n      this.store = {};\r\n    }\r\n\r\n    Cache.prototype = {\r\n      get: function (key) {\r\n        return this.store.hasOwnProperty(key) ? this.store[key] : null;\r\n      },\r\n\r\n      set: function (key, value) {\r\n        return (this.store[key] = value);\r\n      },\r\n    };\r\n\r\n    var cachedCount = 0,\r\n      uncachedCount = 0;\r\n\r\n    function createCachingGetter(methodName, func, objProperty) {\r\n      return function (args) {\r\n        var cache = this.cache;\r\n        if (cache.hasOwnProperty(methodName)) {\r\n          cachedCount++;\r\n          return cache[methodName];\r\n        } else {\r\n          uncachedCount++;\r\n          var value = func.call(\r\n            this,\r\n            objProperty ? this[objProperty] : this,\r\n            args\r\n          );\r\n          cache[methodName] = value;\r\n          return value;\r\n        }\r\n      };\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function NodeWrapper(node, session) {\r\n      this.node = node;\r\n      this.session = session;\r\n      this.cache = new Cache();\r\n      this.positions = new Cache();\r\n    }\r\n\r\n    var nodeProto = {\r\n      getPosition: function (offset) {\r\n        var positions = this.positions;\r\n        return (\r\n          positions.get(offset) ||\r\n          positions.set(offset, new Position(this, offset))\r\n        );\r\n      },\r\n\r\n      toString: function () {\r\n        return \"[NodeWrapper(\" + dom.inspectNode(this.node) + \")]\";\r\n      },\r\n    };\r\n\r\n    NodeWrapper.prototype = nodeProto;\r\n\r\n    var EMPTY = \"EMPTY\",\r\n      NON_SPACE = \"NON_SPACE\",\r\n      UNCOLLAPSIBLE_SPACE = \"UNCOLLAPSIBLE_SPACE\",\r\n      COLLAPSIBLE_SPACE = \"COLLAPSIBLE_SPACE\",\r\n      TRAILING_SPACE_BEFORE_BLOCK = \"TRAILING_SPACE_BEFORE_BLOCK\",\r\n      TRAILING_SPACE_IN_BLOCK = \"TRAILING_SPACE_IN_BLOCK\",\r\n      TRAILING_SPACE_BEFORE_BR = \"TRAILING_SPACE_BEFORE_BR\",\r\n      PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK =\r\n        \"PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK\",\r\n      TRAILING_LINE_BREAK_AFTER_BR = \"TRAILING_LINE_BREAK_AFTER_BR\",\r\n      INCLUDED_TRAILING_LINE_BREAK_AFTER_BR =\r\n        \"INCLUDED_TRAILING_LINE_BREAK_AFTER_BR\";\r\n\r\n    extend(nodeProto, {\r\n      isCharacterDataNode: createCachingGetter(\r\n        \"isCharacterDataNode\",\r\n        dom.isCharacterDataNode,\r\n        \"node\"\r\n      ),\r\n      getNodeIndex: createCachingGetter(\"nodeIndex\", dom.getNodeIndex, \"node\"),\r\n      getLength: createCachingGetter(\"nodeLength\", dom.getNodeLength, \"node\"),\r\n      containsPositions: createCachingGetter(\r\n        \"containsPositions\",\r\n        containsPositions,\r\n        \"node\"\r\n      ),\r\n      isWhitespace: createCachingGetter(\r\n        \"isWhitespace\",\r\n        isWhitespaceNode,\r\n        \"node\"\r\n      ),\r\n      isCollapsedWhitespace: createCachingGetter(\r\n        \"isCollapsedWhitespace\",\r\n        isCollapsedWhitespaceNode,\r\n        \"node\"\r\n      ),\r\n      getComputedDisplay: createCachingGetter(\r\n        \"computedDisplay\",\r\n        getComputedDisplay,\r\n        \"node\"\r\n      ),\r\n      isCollapsed: createCachingGetter(\"collapsed\", isCollapsedNode, \"node\"),\r\n      isIgnored: createCachingGetter(\"ignored\", isIgnoredNode, \"node\"),\r\n      next: createCachingGetter(\"nextPos\", nextNode, \"node\"),\r\n      previous: createCachingGetter(\"previous\", previousNode, \"node\"),\r\n\r\n      getTextNodeInfo: createCachingGetter(\r\n        \"textNodeInfo\",\r\n        function (textNode) {\r\n          var spaceRegex = null,\r\n            collapseSpaces = false;\r\n          var cssWhitespace = getComputedStyleProperty(\r\n            textNode.parentNode,\r\n            \"whiteSpace\"\r\n          );\r\n          var preLine = cssWhitespace == \"pre-line\";\r\n          if (preLine) {\r\n            spaceRegex = spacesMinusLineBreaksRegex;\r\n            collapseSpaces = true;\r\n          } else if (cssWhitespace == \"normal\" || cssWhitespace == \"nowrap\") {\r\n            spaceRegex = spacesRegex;\r\n            collapseSpaces = true;\r\n          }\r\n\r\n          return {\r\n            node: textNode,\r\n            text: textNode.data,\r\n            spaceRegex: spaceRegex,\r\n            collapseSpaces: collapseSpaces,\r\n            preLine: preLine,\r\n          };\r\n        },\r\n        \"node\"\r\n      ),\r\n\r\n      hasInnerText: createCachingGetter(\r\n        \"hasInnerText\",\r\n        function (el, backward) {\r\n          var session = this.session;\r\n          var posAfterEl = session.getPosition(\r\n            el.parentNode,\r\n            this.getNodeIndex() + 1\r\n          );\r\n          var firstPosInEl = session.getPosition(el, 0);\r\n\r\n          var pos = backward ? posAfterEl : firstPosInEl;\r\n          var endPos = backward ? firstPosInEl : posAfterEl;\r\n\r\n          /*\r\n         <body><p>X  </p><p>Y</p></body>\r\n\r\n         Positions:\r\n\r\n         body:0:\"\"\r\n         p:0:\"\"\r\n         text:0:\"\"\r\n         text:1:\"X\"\r\n         text:2:TRAILING_SPACE_IN_BLOCK\r\n         text:3:COLLAPSED_SPACE\r\n         p:1:\"\"\r\n         body:1:\"\\n\"\r\n         p:0:\"\"\r\n         text:0:\"\"\r\n         text:1:\"Y\"\r\n\r\n         A character is a TRAILING_SPACE_IN_BLOCK iff:\r\n\r\n         - There is no uncollapsed character after it within the visible containing block element\r\n\r\n         A character is a TRAILING_SPACE_BEFORE_BR iff:\r\n\r\n         - There is no uncollapsed character after it preceding a <br> element\r\n\r\n         An element has inner text iff\r\n\r\n         - It is not hidden\r\n         - It contains an uncollapsed character\r\n\r\n         All trailing spaces (pre-line, before <br>, end of block) require definite non-empty characters to render.\r\n         */\r\n\r\n          while (pos !== endPos) {\r\n            pos.prepopulateChar();\r\n            if (pos.isDefinitelyNonEmpty()) {\r\n              return true;\r\n            }\r\n            pos = backward ? pos.previousVisible() : pos.nextVisible();\r\n          }\r\n\r\n          return false;\r\n        },\r\n        \"node\"\r\n      ),\r\n\r\n      isRenderedBlock: createCachingGetter(\r\n        \"isRenderedBlock\",\r\n        function (el) {\r\n          // Ensure that a block element containing a <br> is considered to have inner text\r\n          var brs = el.getElementsByTagName(\"br\");\r\n          for (var i = 0, len = brs.length; i < len; ++i) {\r\n            if (!isCollapsedNode(brs[i])) {\r\n              return true;\r\n            }\r\n          }\r\n          return this.hasInnerText();\r\n        },\r\n        \"node\"\r\n      ),\r\n\r\n      getTrailingSpace: createCachingGetter(\r\n        \"trailingSpace\",\r\n        function (el) {\r\n          if (el.tagName.toLowerCase() == \"br\") {\r\n            return \"\";\r\n          } else {\r\n            switch (this.getComputedDisplay()) {\r\n              case \"inline\":\r\n                var child = el.lastChild;\r\n                while (child) {\r\n                  if (!isIgnoredNode(child)) {\r\n                    return child.nodeType == 1\r\n                      ? this.session.getNodeWrapper(child).getTrailingSpace()\r\n                      : \"\";\r\n                  }\r\n                  child = child.previousSibling;\r\n                }\r\n                break;\r\n              case \"inline-block\":\r\n              case \"inline-table\":\r\n              case \"none\":\r\n              case \"table-column\":\r\n              case \"table-column-group\":\r\n                break;\r\n              case \"table-cell\":\r\n                return \"\\t\";\r\n              default:\r\n                return this.isRenderedBlock(true) ? \"\\n\" : \"\";\r\n            }\r\n          }\r\n          return \"\";\r\n        },\r\n        \"node\"\r\n      ),\r\n\r\n      getLeadingSpace: createCachingGetter(\r\n        \"leadingSpace\",\r\n        function (el) {\r\n          switch (this.getComputedDisplay()) {\r\n            case \"inline\":\r\n            case \"inline-block\":\r\n            case \"inline-table\":\r\n            case \"none\":\r\n            case \"table-column\":\r\n            case \"table-column-group\":\r\n            case \"table-cell\":\r\n              break;\r\n            default:\r\n              return this.isRenderedBlock(false) ? \"\\n\" : \"\";\r\n          }\r\n          return \"\";\r\n        },\r\n        \"node\"\r\n      ),\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function Position(nodeWrapper, offset) {\r\n      this.offset = offset;\r\n      this.nodeWrapper = nodeWrapper;\r\n      this.node = nodeWrapper.node;\r\n      this.session = nodeWrapper.session;\r\n      this.cache = new Cache();\r\n    }\r\n\r\n    function inspectPosition() {\r\n      return (\r\n        \"[Position(\" + dom.inspectNode(this.node) + \":\" + this.offset + \")]\"\r\n      );\r\n    }\r\n\r\n    var positionProto = {\r\n      character: \"\",\r\n      characterType: EMPTY,\r\n      isBr: false,\r\n\r\n      /*\r\n      This method:\r\n      - Fully populates positions that have characters that can be determined independently of any other characters.\r\n      - Populates most types of space positions with a provisional character. The character is finalized later.\r\n       */\r\n      prepopulateChar: function () {\r\n        var pos = this;\r\n        if (!pos.prepopulatedChar) {\r\n          var node = pos.node,\r\n            offset = pos.offset;\r\n          var visibleChar = \"\",\r\n            charType = EMPTY;\r\n          var finalizedChar = false;\r\n          if (offset > 0) {\r\n            if (node.nodeType == 3) {\r\n              var text = node.data;\r\n              var textChar = text.charAt(offset - 1);\r\n\r\n              var nodeInfo = pos.nodeWrapper.getTextNodeInfo();\r\n              var spaceRegex = nodeInfo.spaceRegex;\r\n              if (nodeInfo.collapseSpaces) {\r\n                if (spaceRegex.test(textChar)) {\r\n                  // \"If the character at position is from set, append a single space (U+0020) to newdata and advance\r\n                  // position until the character at position is not from set.\"\r\n\r\n                  // We also need to check for the case where we're in a pre-line and we have a space preceding a\r\n                  // line break, because such spaces are collapsed in some browsers\r\n                  if (offset > 1 && spaceRegex.test(text.charAt(offset - 2))) {\r\n                  } else if (nodeInfo.preLine && text.charAt(offset) === \"\\n\") {\r\n                    visibleChar = \" \";\r\n                    charType = PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK;\r\n                  } else {\r\n                    visibleChar = \" \";\r\n                    //pos.checkForFollowingLineBreak = true;\r\n                    charType = COLLAPSIBLE_SPACE;\r\n                  }\r\n                } else {\r\n                  visibleChar = textChar;\r\n                  charType = NON_SPACE;\r\n                  finalizedChar = true;\r\n                }\r\n              } else {\r\n                visibleChar = textChar;\r\n                charType = UNCOLLAPSIBLE_SPACE;\r\n                finalizedChar = true;\r\n              }\r\n            } else {\r\n              var nodePassed = node.childNodes[offset - 1];\r\n              if (\r\n                nodePassed &&\r\n                nodePassed.nodeType == 1 &&\r\n                !isCollapsedNode(nodePassed)\r\n              ) {\r\n                if (nodePassed.tagName.toLowerCase() == \"br\") {\r\n                  visibleChar = \"\\n\";\r\n                  pos.isBr = true;\r\n                  charType = COLLAPSIBLE_SPACE;\r\n                  finalizedChar = false;\r\n                } else {\r\n                  pos.checkForTrailingSpace = true;\r\n                }\r\n              }\r\n\r\n              // Check the leading space of the next node for the case when a block element follows an inline\r\n              // element or text node. In that case, there is an implied line break between the two nodes.\r\n              if (!visibleChar) {\r\n                var nextNode = node.childNodes[offset];\r\n                if (\r\n                  nextNode &&\r\n                  nextNode.nodeType == 1 &&\r\n                  !isCollapsedNode(nextNode)\r\n                ) {\r\n                  pos.checkForLeadingSpace = true;\r\n                }\r\n              }\r\n            }\r\n          }\r\n\r\n          pos.prepopulatedChar = true;\r\n          pos.character = visibleChar;\r\n          pos.characterType = charType;\r\n          pos.isCharInvariant = finalizedChar;\r\n        }\r\n      },\r\n\r\n      isDefinitelyNonEmpty: function () {\r\n        var charType = this.characterType;\r\n        return charType == NON_SPACE || charType == UNCOLLAPSIBLE_SPACE;\r\n      },\r\n\r\n      // Resolve leading and trailing spaces, which may involve prepopulating other positions\r\n      resolveLeadingAndTrailingSpaces: function () {\r\n        if (!this.prepopulatedChar) {\r\n          this.prepopulateChar();\r\n        }\r\n        if (this.checkForTrailingSpace) {\r\n          var trailingSpace = this.session\r\n            .getNodeWrapper(this.node.childNodes[this.offset - 1])\r\n            .getTrailingSpace();\r\n          if (trailingSpace) {\r\n            this.isTrailingSpace = true;\r\n            this.character = trailingSpace;\r\n            this.characterType = COLLAPSIBLE_SPACE;\r\n          }\r\n          this.checkForTrailingSpace = false;\r\n        }\r\n        if (this.checkForLeadingSpace) {\r\n          var leadingSpace = this.session\r\n            .getNodeWrapper(this.node.childNodes[this.offset])\r\n            .getLeadingSpace();\r\n          if (leadingSpace) {\r\n            this.isLeadingSpace = true;\r\n            this.character = leadingSpace;\r\n            this.characterType = COLLAPSIBLE_SPACE;\r\n          }\r\n          this.checkForLeadingSpace = false;\r\n        }\r\n      },\r\n\r\n      getPrecedingUncollapsedPosition: function (characterOptions) {\r\n        var pos = this,\r\n          character;\r\n        while ((pos = pos.previousVisible())) {\r\n          character = pos.getCharacter(characterOptions);\r\n          if (character !== \"\") {\r\n            return pos;\r\n          }\r\n        }\r\n\r\n        return null;\r\n      },\r\n\r\n      getCharacter: function (characterOptions) {\r\n        // includeBlockContentTrailingSpace: false,\r\n        //   includeSpaceBeforeBr: false,\r\n        //   includePreLineTrailingSpace: false,\r\n        //   ignoreCharacters: '↵',\r\n        this.resolveLeadingAndTrailingSpaces();\r\n\r\n        var thisChar = this.character,\r\n          returnChar;\r\n\r\n        // Check if character is ignored\r\n        var ignoredChars = normalizeIgnoredCharacters(\r\n          characterOptions.ignoreCharacters\r\n        );\r\n        var isIgnoredCharacter =\r\n          thisChar !== \"\" && ignoredChars.indexOf(thisChar) > -1;\r\n\r\n        // Check if this position's  character is invariant (i.e. not dependent on character options) and return it\r\n        // if so\r\n        if (this.isCharInvariant) {\r\n          returnChar = isIgnoredCharacter ? \"\" : thisChar;\r\n          return returnChar;\r\n        }\r\n\r\n        var cacheKey = [\r\n          \"character\",\r\n          characterOptions.includeSpaceBeforeBr,\r\n          characterOptions.includeBlockContentTrailingSpace,\r\n          characterOptions.includePreLineTrailingSpace,\r\n          ignoredChars,\r\n        ].join(\"_\");\r\n        var cachedChar = this.cache.get(cacheKey);\r\n        if (cachedChar !== null) {\r\n          return cachedChar;\r\n        }\r\n\r\n        // We need to actually get the character now\r\n        var character = \"\";\r\n        var collapsible = this.characterType == COLLAPSIBLE_SPACE;\r\n\r\n        var nextPos, previousPos;\r\n        var gotPreviousPos = false;\r\n        var pos = this;\r\n\r\n        function getPreviousPos() {\r\n          if (!gotPreviousPos) {\r\n            previousPos = pos.getPrecedingUncollapsedPosition(characterOptions);\r\n            gotPreviousPos = true;\r\n          }\r\n          return previousPos;\r\n        }\r\n\r\n        // Disallow a collapsible space that is followed by a line break or is the last character\r\n        if (collapsible) {\r\n          // Allow a trailing space that we've previously determined should be included\r\n          if (this.type == INCLUDED_TRAILING_LINE_BREAK_AFTER_BR) {\r\n            character = \"\\n\";\r\n          }\r\n          // Disallow a collapsible space that follows a trailing space or line break, or is the first character,\r\n          // or follows a collapsible included space\r\n          else if (\r\n            thisChar == \" \" &&\r\n            (!getPreviousPos() ||\r\n              previousPos.isTrailingSpace ||\r\n              previousPos.character == \"\\n\" ||\r\n              (previousPos.character == \" \" &&\r\n                previousPos.characterType == COLLAPSIBLE_SPACE))\r\n          ) {\r\n          }\r\n          // Allow a leading line break unless it follows a line break\r\n          else if (thisChar == \"\\n\" && this.isLeadingSpace) {\r\n            if (getPreviousPos() && previousPos.character != \"\\n\") {\r\n              character = \"\\n\";\r\n            } else {\r\n            }\r\n          } else {\r\n            nextPos = this.nextUncollapsed();\r\n            if (nextPos) {\r\n              if (nextPos.isBr) {\r\n                this.type = TRAILING_SPACE_BEFORE_BR;\r\n              } else if (nextPos.isTrailingSpace && nextPos.character == \"\\n\") {\r\n                this.type = TRAILING_SPACE_IN_BLOCK;\r\n              } else if (nextPos.isLeadingSpace && nextPos.character == \"\\n\") {\r\n                this.type = TRAILING_SPACE_BEFORE_BLOCK;\r\n              }\r\n\r\n              if (nextPos.character == \"\\n\") {\r\n                if (\r\n                  this.type == TRAILING_SPACE_BEFORE_BR &&\r\n                  !characterOptions.includeSpaceBeforeBr\r\n                ) {\r\n                } else if (\r\n                  this.type == TRAILING_SPACE_BEFORE_BLOCK &&\r\n                  !characterOptions.includeSpaceBeforeBlock\r\n                ) {\r\n                } else if (\r\n                  this.type == TRAILING_SPACE_IN_BLOCK &&\r\n                  nextPos.isTrailingSpace &&\r\n                  !characterOptions.includeBlockContentTrailingSpace\r\n                ) {\r\n                } else if (\r\n                  this.type == PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK &&\r\n                  nextPos.type == NON_SPACE &&\r\n                  !characterOptions.includePreLineTrailingSpace\r\n                ) {\r\n                } else if (thisChar == \"\\n\") {\r\n                  if (nextPos.isTrailingSpace) {\r\n                    if (this.isTrailingSpace) {\r\n                    } else if (this.isBr) {\r\n                      nextPos.type = TRAILING_LINE_BREAK_AFTER_BR;\r\n\r\n                      if (\r\n                        getPreviousPos() &&\r\n                        previousPos.isLeadingSpace &&\r\n                        !previousPos.isTrailingSpace &&\r\n                        previousPos.character == \"\\n\"\r\n                      ) {\r\n                        nextPos.character = \"\";\r\n                      } else {\r\n                        nextPos.type = INCLUDED_TRAILING_LINE_BREAK_AFTER_BR;\r\n                      }\r\n                    }\r\n                  } else {\r\n                    character = \"\\n\";\r\n                  }\r\n                } else if (thisChar == \" \") {\r\n                  character = \" \";\r\n                } else {\r\n                }\r\n              } else {\r\n                character = thisChar;\r\n              }\r\n            } else {\r\n            }\r\n          }\r\n        }\r\n\r\n        if (ignoredChars.indexOf(character) > -1) {\r\n          character = \"\";\r\n        }\r\n\r\n        this.cache.set(cacheKey, character);\r\n\r\n        return character;\r\n      },\r\n\r\n      equals: function (pos) {\r\n        return !!pos && this.node === pos.node && this.offset === pos.offset;\r\n      },\r\n\r\n      inspect: inspectPosition,\r\n\r\n      toString: function () {\r\n        return this.character;\r\n      },\r\n    };\r\n\r\n    Position.prototype = positionProto;\r\n\r\n    extend(positionProto, {\r\n      next: createCachingGetter(\"nextPos\", function (pos) {\r\n        var nodeWrapper = pos.nodeWrapper,\r\n          node = pos.node,\r\n          offset = pos.offset,\r\n          session = nodeWrapper.session;\r\n        if (!node) {\r\n          return null;\r\n        }\r\n        var nextNode, nextOffset, child;\r\n        if (offset == nodeWrapper.getLength()) {\r\n          // Move onto the next node\r\n          nextNode = node.parentNode;\r\n          nextOffset = nextNode ? nodeWrapper.getNodeIndex() + 1 : 0;\r\n        } else {\r\n          if (nodeWrapper.isCharacterDataNode()) {\r\n            nextNode = node;\r\n            nextOffset = offset + 1;\r\n          } else {\r\n            child = node.childNodes[offset];\r\n            // Go into the children next, if children there are\r\n            if (session.getNodeWrapper(child).containsPositions()) {\r\n              nextNode = child;\r\n              nextOffset = 0;\r\n            } else {\r\n              nextNode = node;\r\n              nextOffset = offset + 1;\r\n            }\r\n          }\r\n        }\r\n\r\n        return nextNode ? session.getPosition(nextNode, nextOffset) : null;\r\n      }),\r\n\r\n      previous: createCachingGetter(\"previous\", function (pos) {\r\n        var nodeWrapper = pos.nodeWrapper,\r\n          node = pos.node,\r\n          offset = pos.offset,\r\n          session = nodeWrapper.session;\r\n        var previousNode, previousOffset, child;\r\n        if (offset == 0) {\r\n          previousNode = node.parentNode;\r\n          previousOffset = previousNode ? nodeWrapper.getNodeIndex() : 0;\r\n        } else {\r\n          if (nodeWrapper.isCharacterDataNode()) {\r\n            previousNode = node;\r\n            previousOffset = offset - 1;\r\n          } else {\r\n            child = node.childNodes[offset - 1];\r\n            // Go into the children next, if children there are\r\n            if (session.getNodeWrapper(child).containsPositions()) {\r\n              previousNode = child;\r\n              previousOffset = dom.getNodeLength(child);\r\n            } else {\r\n              previousNode = node;\r\n              previousOffset = offset - 1;\r\n            }\r\n          }\r\n        }\r\n        return previousNode\r\n          ? session.getPosition(previousNode, previousOffset)\r\n          : null;\r\n      }),\r\n\r\n      /*\r\n       Next and previous position moving functions that filter out\r\n\r\n       - Hidden (CSS visibility/display) elements\r\n       - Script and style elements\r\n       */\r\n      //todo\r\n      nextVisible: createCachingGetter(\"nextVisible\", function (pos) {\r\n        var next = pos.next();\r\n        if (!next) {\r\n          return null;\r\n        }\r\n        var nodeWrapper = next.nodeWrapper,\r\n          node = next.node;\r\n        var newPos = next;\r\n        if (nodeWrapper.isCollapsed()) {\r\n          // We're skipping this node and all its descendants\r\n          newPos = nodeWrapper.session.getPosition(\r\n            node.parentNode,\r\n            nodeWrapper.getNodeIndex() + 1\r\n          );\r\n        }\r\n        return newPos;\r\n      }),\r\n\r\n      nextUncollapsed: createCachingGetter(\"nextUncollapsed\", function (pos) {\r\n        var nextPos = pos;\r\n        while ((nextPos = nextPos.nextVisible())) {\r\n          nextPos.resolveLeadingAndTrailingSpaces();\r\n          if (nextPos.character !== \"\") {\r\n            return nextPos;\r\n          }\r\n        }\r\n        return null;\r\n      }),\r\n\r\n      previousVisible: createCachingGetter(\"previousVisible\", function (pos) {\r\n        var previous = pos.previous();\r\n        if (!previous) {\r\n          return null;\r\n        }\r\n        var nodeWrapper = previous.nodeWrapper,\r\n          node = previous.node;\r\n        var newPos = previous;\r\n        if (nodeWrapper.isCollapsed()) {\r\n          // We're skipping this node and all its descendants\r\n          newPos = nodeWrapper.session.getPosition(\r\n            node.parentNode,\r\n            nodeWrapper.getNodeIndex()\r\n          );\r\n        }\r\n        return newPos;\r\n      }),\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    var currentSession = null;\r\n\r\n    var Session = (function () {\r\n      function createWrapperCache(nodeProperty) {\r\n        var cache = new Cache();\r\n\r\n        return {\r\n          get: function (node) {\r\n            var wrappersByProperty = cache.get(node[nodeProperty]);\r\n            if (wrappersByProperty) {\r\n              for (var i = 0, wrapper; (wrapper = wrappersByProperty[i++]); ) {\r\n                if (wrapper.node === node) {\r\n                  return wrapper;\r\n                }\r\n              }\r\n            }\r\n            return null;\r\n          },\r\n\r\n          set: function (nodeWrapper) {\r\n            var property = nodeWrapper.node[nodeProperty];\r\n            var wrappersByProperty =\r\n              cache.get(property) || cache.set(property, []);\r\n            wrappersByProperty.push(nodeWrapper);\r\n          },\r\n        };\r\n      }\r\n\r\n      var uniqueIDSupported = util.isHostProperty(\r\n        document.documentElement,\r\n        \"uniqueID\"\r\n      );\r\n\r\n      function Session() {\r\n        this.initCaches();\r\n      }\r\n\r\n      Session.prototype = {\r\n        initCaches: function () {\r\n          this.elementCache = uniqueIDSupported\r\n            ? (function () {\r\n                var elementsCache = new Cache();\r\n\r\n                return {\r\n                  get: function (el) {\r\n                    return elementsCache.get(el.uniqueID);\r\n                  },\r\n\r\n                  set: function (elWrapper) {\r\n                    elementsCache.set(elWrapper.node.uniqueID, elWrapper);\r\n                  },\r\n                };\r\n              })()\r\n            : createWrapperCache(\"tagName\");\r\n\r\n          // Store text nodes keyed by data, although we may need to truncate this\r\n          this.textNodeCache = createWrapperCache(\"data\");\r\n          this.otherNodeCache = createWrapperCache(\"nodeName\");\r\n        },\r\n\r\n        getNodeWrapper: function (node) {\r\n          var wrapperCache;\r\n          switch (node.nodeType) {\r\n            case 1:\r\n              wrapperCache = this.elementCache;\r\n              break;\r\n            case 3:\r\n              wrapperCache = this.textNodeCache;\r\n              break;\r\n            default:\r\n              wrapperCache = this.otherNodeCache;\r\n              break;\r\n          }\r\n\r\n          var wrapper = wrapperCache.get(node);\r\n          if (!wrapper) {\r\n            wrapper = new NodeWrapper(node, this);\r\n            wrapperCache.set(wrapper);\r\n          }\r\n          return wrapper;\r\n        },\r\n\r\n        getPosition: function (node, offset) {\r\n          return this.getNodeWrapper(node).getPosition(offset);\r\n        },\r\n\r\n        getRangeBoundaryPosition: function (range, isStart) {\r\n          var prefix = isStart ? \"start\" : \"end\";\r\n          return this.getPosition(\r\n            range[prefix + \"Container\"],\r\n            range[prefix + \"Offset\"]\r\n          );\r\n        },\r\n\r\n        detach: function () {\r\n          this.elementCache = this.textNodeCache = this.otherNodeCache = null;\r\n        },\r\n      };\r\n\r\n      return Session;\r\n    })();\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    function startSession() {\r\n      endSession();\r\n      return (currentSession = new Session());\r\n    }\r\n\r\n    function getSession() {\r\n      return currentSession || startSession();\r\n    }\r\n\r\n    function endSession() {\r\n      if (currentSession) {\r\n        currentSession.detach();\r\n      }\r\n      currentSession = null;\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Extensions to the rangy.dom utility object\r\n\r\n    extend(dom, {\r\n      nextNode: nextNode,\r\n      previousNode: previousNode,\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // TODO\r\n    function createCharacterIterator(\r\n      startPos,\r\n      backward,\r\n      endPos,\r\n      characterOptions\r\n    ) {\r\n      // characterOptions = {\r\n      //   includeBlockContentTrailingSpace: false,\r\n      //   includeSpaceBeforeBr: false,\r\n      //   includePreLineTrailingSpace: false,\r\n      //   ignoreCharacters: '↵',\r\n      // }\r\n      // Adjust the end position to ensure that it is actually reached\r\n      if (endPos) {\r\n        if (backward) {\r\n          if (isCollapsedNode(endPos.node)) {\r\n            endPos = startPos.previousVisible();\r\n          }\r\n        } else {\r\n          if (isCollapsedNode(endPos.node)) {\r\n            endPos = endPos.nextVisible();\r\n          }\r\n        }\r\n      }\r\n\r\n      var pos = startPos,\r\n        finished = false;\r\n\r\n      function next() {\r\n        var charPos = null;\r\n        if (backward) {\r\n          charPos = pos;\r\n          if (!finished) {\r\n            pos = pos.previousVisible();\r\n            finished = !pos || (endPos && pos.equals(endPos));\r\n          }\r\n        } else {\r\n          if (!finished) {\r\n            charPos = pos = pos.nextVisible();\r\n            finished = !pos || (endPos && pos.equals(endPos));\r\n          }\r\n        }\r\n        if (finished) {\r\n          pos = null;\r\n        }\r\n        return charPos;\r\n      }\r\n\r\n      var previousTextPos,\r\n        returnPreviousTextPos = false;\r\n\r\n      return {\r\n        next: function () {\r\n          if (returnPreviousTextPos) {\r\n            returnPreviousTextPos = false;\r\n            return previousTextPos;\r\n          } else {\r\n            var pos, character;\r\n            while ((pos = next())) {\r\n              character = pos.getCharacter(characterOptions);\r\n              if (character) {\r\n                previousTextPos = pos;\r\n                return pos;\r\n              }\r\n            }\r\n            return null;\r\n          }\r\n        },\r\n\r\n        rewind: function () {\r\n          if (previousTextPos) {\r\n            returnPreviousTextPos = true;\r\n          } else {\r\n            throw module.createError(\r\n              \"createCharacterIterator: cannot rewind. Only one position can be rewound.\"\r\n            );\r\n          }\r\n        },\r\n\r\n        dispose: function () {\r\n          startPos = endPos = null;\r\n        },\r\n      };\r\n    }\r\n\r\n    var arrayIndexOf = Array.prototype.indexOf\r\n      ? function (arr, val) {\r\n          return arr.indexOf(val);\r\n        }\r\n      : function (arr, val) {\r\n          for (var i = 0, len = arr.length; i < len; ++i) {\r\n            if (arr[i] === val) {\r\n              return i;\r\n            }\r\n          }\r\n          return -1;\r\n        };\r\n\r\n    // Provides a pair of iterators over text positions, tokenized. Transparently requests more text when next()\r\n    // is called and there is no more tokenized text\r\n    function createTokenizedTextProvider(pos, characterOptions, wordOptions) {\r\n      var forwardIterator = createCharacterIterator(\r\n        pos,\r\n        false,\r\n        null,\r\n        characterOptions\r\n      );\r\n      var backwardIterator = createCharacterIterator(\r\n        pos,\r\n        true,\r\n        null,\r\n        characterOptions\r\n      );\r\n      var tokenizer = wordOptions.tokenizer;\r\n\r\n      // Consumes a word and the whitespace beyond it\r\n      function consumeWord(forward) {\r\n        var pos, textChar;\r\n        var newChars = [],\r\n          it = forward ? forwardIterator : backwardIterator;\r\n\r\n        var passedWordBoundary = false,\r\n          insideWord = false;\r\n\r\n        while ((pos = it.next())) {\r\n          textChar = pos.character;\r\n\r\n          if (allWhiteSpaceRegex.test(textChar)) {\r\n            if (insideWord) {\r\n              insideWord = false;\r\n              passedWordBoundary = true;\r\n            }\r\n          } else {\r\n            if (passedWordBoundary) {\r\n              it.rewind();\r\n              break;\r\n            } else {\r\n              insideWord = true;\r\n            }\r\n          }\r\n          newChars.push(pos);\r\n        }\r\n\r\n        return newChars;\r\n      }\r\n\r\n      // Get initial word surrounding initial position and tokenize it\r\n      var forwardChars = consumeWord(true);\r\n      var backwardChars = consumeWord(false).reverse();\r\n      var tokens = tokenize(\r\n        backwardChars.concat(forwardChars),\r\n        wordOptions,\r\n        tokenizer\r\n      );\r\n\r\n      // Create initial token buffers\r\n      var forwardTokensBuffer = forwardChars.length\r\n        ? tokens.slice(arrayIndexOf(tokens, forwardChars[0].token))\r\n        : [];\r\n\r\n      var backwardTokensBuffer = backwardChars.length\r\n        ? tokens.slice(0, arrayIndexOf(tokens, backwardChars.pop().token) + 1)\r\n        : [];\r\n\r\n      function inspectBuffer(buffer) {\r\n        var textPositions = [\"[\" + buffer.length + \"]\"];\r\n        for (var i = 0; i < buffer.length; ++i) {\r\n          textPositions.push(\r\n            \"(word: \" + buffer[i] + \", is word: \" + buffer[i].isWord + \")\"\r\n          );\r\n        }\r\n        return textPositions;\r\n      }\r\n\r\n      return {\r\n        nextEndToken: function () {\r\n          var lastToken, forwardChars;\r\n\r\n          // If we're down to the last token, consume character chunks until we have a word or run out of\r\n          // characters to consume\r\n          while (\r\n            forwardTokensBuffer.length == 1 &&\r\n            !(lastToken = forwardTokensBuffer[0]).isWord &&\r\n            (forwardChars = consumeWord(true)).length > 0\r\n          ) {\r\n            // Merge trailing non-word into next word and tokenize\r\n            forwardTokensBuffer = tokenize(\r\n              lastToken.chars.concat(forwardChars),\r\n              wordOptions,\r\n              tokenizer\r\n            );\r\n          }\r\n\r\n          return forwardTokensBuffer.shift();\r\n        },\r\n\r\n        previousStartToken: function () {\r\n          var lastToken, backwardChars;\r\n\r\n          // If we're down to the last token, consume character chunks until we have a word or run out of\r\n          // characters to consume\r\n          while (\r\n            backwardTokensBuffer.length == 1 &&\r\n            !(lastToken = backwardTokensBuffer[0]).isWord &&\r\n            (backwardChars = consumeWord(false)).length > 0\r\n          ) {\r\n            // Merge leading non-word into next word and tokenize\r\n            backwardTokensBuffer = tokenize(\r\n              backwardChars.reverse().concat(lastToken.chars),\r\n              wordOptions,\r\n              tokenizer\r\n            );\r\n          }\r\n\r\n          return backwardTokensBuffer.pop();\r\n        },\r\n\r\n        dispose: function () {\r\n          forwardIterator.dispose();\r\n          backwardIterator.dispose();\r\n          forwardTokensBuffer = backwardTokensBuffer = null;\r\n        },\r\n      };\r\n    }\r\n\r\n    //todo ts\r\n    function movePositionBy(pos, unit, count, characterOptions, wordOptions) {\r\n      var unitsMoved = 0,\r\n        currentPos,\r\n        newPos = pos,\r\n        charIterator,\r\n        nextPos,\r\n        absCount = Math.abs(count),\r\n        token;\r\n      if (count !== 0) {\r\n        var backward = count < 0;\r\n\r\n        switch (unit) {\r\n          case CHARACTER:\r\n            charIterator = createCharacterIterator(\r\n              pos,\r\n              backward,\r\n              null,\r\n              characterOptions\r\n            );\r\n            while (\r\n              (currentPos = charIterator.next()) &&\r\n              unitsMoved < absCount\r\n            ) {\r\n              // if(currentPos.characterType !== \"COLLAPSIBLE_SPACE\"){\r\n              ++unitsMoved;\r\n              newPos = currentPos;\r\n              // }\r\n            }\r\n            nextPos = currentPos;\r\n\r\n            charIterator.dispose();\r\n            break;\r\n          case WORD:\r\n            var tokenizedTextProvider = createTokenizedTextProvider(\r\n              pos,\r\n              characterOptions,\r\n              wordOptions\r\n            );\r\n            var next = backward\r\n              ? tokenizedTextProvider.previousStartToken\r\n              : tokenizedTextProvider.nextEndToken;\r\n\r\n            while ((token = next()) && unitsMoved < absCount) {\r\n              if (token.isWord) {\r\n                ++unitsMoved;\r\n                newPos = backward\r\n                  ? token.chars[0]\r\n                  : token.chars[token.chars.length - 1];\r\n              }\r\n            }\r\n            break;\r\n          default:\r\n            throw new Error(\r\n              \"movePositionBy: unit '\" + unit + \"' not implemented\"\r\n            );\r\n        }\r\n\r\n        // Perform any necessary position tweaks\r\n        if (backward) {\r\n          newPos = newPos.previousVisible();\r\n          unitsMoved = -unitsMoved;\r\n        } else if (newPos && newPos.isLeadingSpace && !newPos.isTrailingSpace) {\r\n          // Tweak the position for the case of a leading space. The problem is that an uncollapsed leading space\r\n          // before a block element (for example, the line break between \"1\" and \"2\" in the following HTML:\r\n          // \"1<p>2</p>\") is considered to be attached to the position immediately before the block element, which\r\n          // corresponds with a different selection position in most browsers from the one we want (i.e. at the\r\n          // start of the contents of the block element). We get round this by advancing the position returned to\r\n          // the last possible equivalent visible position.\r\n          if (unit == WORD) {\r\n            charIterator = createCharacterIterator(\r\n              pos,\r\n              false,\r\n              null,\r\n              characterOptions\r\n            );\r\n            nextPos = charIterator.next();\r\n            charIterator.dispose();\r\n          }\r\n          if (nextPos) {\r\n            newPos = nextPos.previousVisible();\r\n          }\r\n        }\r\n      }\r\n\r\n      return {\r\n        position: newPos,\r\n        unitsMoved: unitsMoved,\r\n      };\r\n    }\r\n\r\n    function createRangeCharacterIterator(\r\n      session,\r\n      range,\r\n      characterOptions,\r\n      backward\r\n    ) {\r\n      var rangeStart = session.getRangeBoundaryPosition(range, true);\r\n      var rangeEnd = session.getRangeBoundaryPosition(range, false);\r\n      var itStart = backward ? rangeEnd : rangeStart;\r\n      var itEnd = backward ? rangeStart : rangeEnd;\r\n\r\n      return createCharacterIterator(\r\n        itStart,\r\n        !!backward,\r\n        itEnd,\r\n        characterOptions\r\n      );\r\n    }\r\n\r\n    function getRangeCharacters(session, range, characterOptions) {\r\n      var chars = [],\r\n        it = createRangeCharacterIterator(session, range, characterOptions),\r\n        pos;\r\n      while ((pos = it.next())) {\r\n        chars.push(pos);\r\n      }\r\n\r\n      it.dispose();\r\n      return chars;\r\n    }\r\n\r\n    function isWholeWord(startPos, endPos, wordOptions) {\r\n      var range = api.createRange(startPos.node);\r\n      range.setStartAndEnd(\r\n        startPos.node,\r\n        startPos.offset,\r\n        endPos.node,\r\n        endPos.offset\r\n      );\r\n      return !range.expand(\"word\", { wordOptions: wordOptions });\r\n    }\r\n\r\n    function findTextFromPosition(\r\n      initialPos,\r\n      searchTerm,\r\n      isRegex,\r\n      searchScopeRange,\r\n      findOptions\r\n    ) {\r\n      var backward = isDirectionBackward(findOptions.direction);\r\n      var it = createCharacterIterator(\r\n        initialPos,\r\n        backward,\r\n        initialPos.session.getRangeBoundaryPosition(searchScopeRange, backward),\r\n        findOptions.characterOptions\r\n      );\r\n      var text = \"\",\r\n        chars = [],\r\n        pos,\r\n        currentChar,\r\n        matchStartIndex,\r\n        matchEndIndex;\r\n      var result, insideRegexMatch;\r\n      var returnValue = null;\r\n\r\n      function handleMatch(startIndex, endIndex) {\r\n        var startPos = chars[startIndex].previousVisible();\r\n        var endPos = chars[endIndex - 1];\r\n        var valid =\r\n          !findOptions.wholeWordsOnly ||\r\n          isWholeWord(startPos, endPos, findOptions.wordOptions);\r\n\r\n        return {\r\n          startPos: startPos,\r\n          endPos: endPos,\r\n          valid: valid,\r\n        };\r\n      }\r\n\r\n      while ((pos = it.next())) {\r\n        currentChar = pos.character;\r\n        if (!isRegex && !findOptions.caseSensitive) {\r\n          currentChar = currentChar.toLowerCase();\r\n        }\r\n\r\n        if (backward) {\r\n          chars.unshift(pos);\r\n          text = currentChar + text;\r\n        } else {\r\n          chars.push(pos);\r\n          text += currentChar;\r\n        }\r\n\r\n        if (isRegex) {\r\n          result = searchTerm.exec(text);\r\n          if (result) {\r\n            matchStartIndex = result.index;\r\n            matchEndIndex = matchStartIndex + result[0].length;\r\n            if (insideRegexMatch) {\r\n              // Check whether the match is now over\r\n              if (\r\n                (!backward && matchEndIndex < text.length) ||\r\n                (backward && matchStartIndex > 0)\r\n              ) {\r\n                returnValue = handleMatch(matchStartIndex, matchEndIndex);\r\n                break;\r\n              }\r\n            } else {\r\n              insideRegexMatch = true;\r\n            }\r\n          }\r\n        } else if ((matchStartIndex = text.indexOf(searchTerm)) != -1) {\r\n          returnValue = handleMatch(\r\n            matchStartIndex,\r\n            matchStartIndex + searchTerm.length\r\n          );\r\n          break;\r\n        }\r\n      }\r\n\r\n      // Check whether regex match extends to the end of the range\r\n      if (insideRegexMatch) {\r\n        returnValue = handleMatch(matchStartIndex, matchEndIndex);\r\n      }\r\n      it.dispose();\r\n\r\n      return returnValue;\r\n    }\r\n\r\n    //TODO chyba při nultém řádku\r\n    function createEntryPointFunction(func) {\r\n      return function () {\r\n        var sessionRunning = !!currentSession;\r\n        var session = getSession();\r\n        var args = [session].concat(util.toArray(arguments));\r\n        var returnValue = func.apply(this, args);\r\n        if (!sessionRunning) {\r\n          endSession();\r\n        }\r\n        return returnValue;\r\n      };\r\n    }\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Extensions to the Rangy Range object\r\n\r\n    function createRangeBoundaryMover(isStart, collapse) {\r\n      /*\r\n       Unit can be \"character\" or \"word\"\r\n       Options:\r\n\r\n       - includeTrailingSpace\r\n       - wordRegex\r\n       - tokenizer\r\n       - collapseSpaceBeforeLineBreak\r\n       */\r\n      return createEntryPointFunction(function (\r\n        session,\r\n        unit,\r\n        count,\r\n        moveOptions\r\n      ) {\r\n        if (typeof count == UNDEF) {\r\n          count = unit;\r\n          unit = CHARACTER;\r\n        }\r\n        moveOptions = createNestedOptions(moveOptions, defaultMoveOptions);\r\n\r\n        var boundaryIsStart = isStart;\r\n        if (collapse) {\r\n          boundaryIsStart = count >= 0;\r\n          this.collapse(!boundaryIsStart);\r\n        }\r\n        //todo\r\n        var moveResult = movePositionBy(\r\n          session.getRangeBoundaryPosition(this, boundaryIsStart),\r\n          unit,\r\n          count,\r\n          moveOptions.characterOptions,\r\n          moveOptions.wordOptions\r\n        );\r\n        var newPos = moveResult.position;\r\n        //this[ (boundaryIsStart && newPos.characterType !== \"COLLAPSIBLE_SPACE\") ? \"setStart\" : \"setEnd\"](newPos.node, newPos.offset);\r\n        this[boundaryIsStart ? \"setStart\" : \"setEnd\"](\r\n          newPos.node,\r\n          newPos.offset\r\n        );\r\n        var ismoved = moveResult.unitsMoved;\r\n        return ismoved;\r\n      });\r\n    }\r\n\r\n    function createRangeTrimmer(isStart) {\r\n      return createEntryPointFunction(function (session, characterOptions) {\r\n        characterOptions = createOptions(\r\n          characterOptions,\r\n          defaultCharacterOptions\r\n        );\r\n        var pos;\r\n        var it = createRangeCharacterIterator(\r\n          session,\r\n          this,\r\n          characterOptions,\r\n          !isStart\r\n        );\r\n        var trimCharCount = 0;\r\n        while ((pos = it.next()) && allWhiteSpaceRegex.test(pos.character)) {\r\n          ++trimCharCount;\r\n        }\r\n        it.dispose();\r\n        var trimmed = trimCharCount > 0;\r\n        if (trimmed) {\r\n          this[isStart ? \"moveStart\" : \"moveEnd\"](\r\n            \"character\",\r\n            isStart ? trimCharCount : -trimCharCount,\r\n            { characterOptions: characterOptions }\r\n          );\r\n        }\r\n        return trimmed;\r\n      });\r\n    }\r\n\r\n    extend(api.rangePrototype, {\r\n      moveStart: createRangeBoundaryMover(true, false),\r\n\r\n      moveEnd: createRangeBoundaryMover(false, false),\r\n\r\n      move: createRangeBoundaryMover(true, true),\r\n\r\n      trimStart: createRangeTrimmer(true),\r\n\r\n      trimEnd: createRangeTrimmer(false),\r\n\r\n      trim: createEntryPointFunction(function (session, characterOptions) {\r\n        var startTrimmed = this.trimStart(characterOptions),\r\n          endTrimmed = this.trimEnd(characterOptions);\r\n        return startTrimmed || endTrimmed;\r\n      }),\r\n\r\n      expand: createEntryPointFunction(function (session, unit, expandOptions) {\r\n        var moved = false;\r\n        expandOptions = createNestedOptions(\r\n          expandOptions,\r\n          defaultExpandOptions\r\n        );\r\n        var characterOptions = expandOptions.characterOptions;\r\n        if (!unit) {\r\n          unit = CHARACTER;\r\n        }\r\n        if (unit == WORD) {\r\n          var wordOptions = expandOptions.wordOptions;\r\n          var startPos = session.getRangeBoundaryPosition(this, true);\r\n          var endPos = session.getRangeBoundaryPosition(this, false);\r\n\r\n          var startTokenizedTextProvider = createTokenizedTextProvider(\r\n            startPos,\r\n            characterOptions,\r\n            wordOptions\r\n          );\r\n          var startToken = startTokenizedTextProvider.nextEndToken();\r\n          var newStartPos = startToken.chars[0].previousVisible();\r\n          var endToken, newEndPos;\r\n\r\n          if (this.collapsed) {\r\n            endToken = startToken;\r\n          } else {\r\n            var endTokenizedTextProvider = createTokenizedTextProvider(\r\n              endPos,\r\n              characterOptions,\r\n              wordOptions\r\n            );\r\n            endToken = endTokenizedTextProvider.previousStartToken();\r\n          }\r\n          newEndPos = endToken.chars[endToken.chars.length - 1];\r\n\r\n          if (!newStartPos.equals(startPos)) {\r\n            this.setStart(newStartPos.node, newStartPos.offset);\r\n            moved = true;\r\n          }\r\n          if (newEndPos && !newEndPos.equals(endPos)) {\r\n            this.setEnd(newEndPos.node, newEndPos.offset);\r\n            moved = true;\r\n          }\r\n\r\n          if (expandOptions.trim) {\r\n            if (expandOptions.trimStart) {\r\n              moved = this.trimStart(characterOptions) || moved;\r\n            }\r\n            if (expandOptions.trimEnd) {\r\n              moved = this.trimEnd(characterOptions) || moved;\r\n            }\r\n          }\r\n\r\n          return moved;\r\n        } else {\r\n          return this.moveEnd(CHARACTER, 1, expandOptions);\r\n        }\r\n      }),\r\n\r\n      text: createEntryPointFunction(function (session, characterOptions) {\r\n        return this.collapsed\r\n          ? \"\"\r\n          : getRangeCharacters(\r\n              session,\r\n              this,\r\n              createOptions(characterOptions, defaultCharacterOptions)\r\n            ).join(\"\");\r\n      }),\r\n\r\n      selectCharacters: createEntryPointFunction(function (\r\n        session,\r\n        containerNode,\r\n        startIndex,\r\n        endIndex,\r\n        characterOptions\r\n      ) {\r\n        // debugger\r\n        var moveOptions = { characterOptions: characterOptions };\r\n        if (!containerNode) {\r\n          containerNode = getBody(this.getDocument());\r\n        }\r\n        this.selectNodeContents(containerNode);\r\n        this.collapse(true);\r\n        this.moveStart(\"character\", startIndex, moveOptions);\r\n        this.collapse(true);\r\n        this.moveEnd(\"character\", endIndex - startIndex, moveOptions);\r\n      }),\r\n\r\n      // Character indexes are relative to the start of node\r\n      toCharacterRange: createEntryPointFunction(function (\r\n        session,\r\n        containerNode,\r\n        characterOptions\r\n      ) {\r\n        if (!containerNode) {\r\n          containerNode = getBody(this.getDocument());\r\n        }\r\n        var parent = containerNode.parentNode,\r\n          nodeIndex = dom.getNodeIndex(containerNode);\r\n        var rangeStartsBeforeNode =\r\n          dom.comparePoints(\r\n            this.startContainer,\r\n            this.endContainer,\r\n            parent,\r\n            nodeIndex\r\n          ) == -1;\r\n        var rangeBetween = this.cloneRange();\r\n        var startIndex, endIndex;\r\n        if (rangeStartsBeforeNode) {\r\n          rangeBetween.setStartAndEnd(\r\n            this.startContainer,\r\n            this.startOffset,\r\n            parent,\r\n            nodeIndex\r\n          );\r\n          startIndex = -rangeBetween.text(characterOptions).length;\r\n        } else {\r\n          rangeBetween.setStartAndEnd(\r\n            parent,\r\n            nodeIndex,\r\n            this.startContainer,\r\n            this.startOffset\r\n          );\r\n          startIndex = rangeBetween.text(characterOptions).length;\r\n        }\r\n        endIndex = startIndex + this.text(characterOptions).length;\r\n\r\n        return {\r\n          start: startIndex,\r\n          end: endIndex,\r\n        };\r\n      }),\r\n\r\n      findText: createEntryPointFunction(function (\r\n        session,\r\n        searchTermParam,\r\n        findOptions\r\n      ) {\r\n        // Set up options\r\n        findOptions = createNestedOptions(findOptions, defaultFindOptions);\r\n\r\n        // Create word options if we're matching whole words only\r\n        if (findOptions.wholeWordsOnly) {\r\n          // We don't ever want trailing spaces for search results\r\n          findOptions.wordOptions.includeTrailingSpace = false;\r\n        }\r\n\r\n        var backward = isDirectionBackward(findOptions.direction);\r\n\r\n        // Create a range representing the search scope if none was provided\r\n        var searchScopeRange = findOptions.withinRange;\r\n        if (!searchScopeRange) {\r\n          searchScopeRange = api.createRange();\r\n          searchScopeRange.selectNodeContents(this.getDocument());\r\n        }\r\n\r\n        // Examine and prepare the search term\r\n        var searchTerm = searchTermParam,\r\n          isRegex = false;\r\n        if (typeof searchTerm == \"string\") {\r\n          if (!findOptions.caseSensitive) {\r\n            searchTerm = searchTerm.toLowerCase();\r\n          }\r\n        } else {\r\n          isRegex = true;\r\n        }\r\n\r\n        var initialPos = session.getRangeBoundaryPosition(this, !backward);\r\n\r\n        // Adjust initial position if it lies outside the search scope\r\n        var comparison = searchScopeRange.comparePoint(\r\n          initialPos.node,\r\n          initialPos.offset\r\n        );\r\n\r\n        if (comparison === -1) {\r\n          initialPos = session.getRangeBoundaryPosition(searchScopeRange, true);\r\n        } else if (comparison === 1) {\r\n          initialPos = session.getRangeBoundaryPosition(\r\n            searchScopeRange,\r\n            false\r\n          );\r\n        }\r\n\r\n        var pos = initialPos;\r\n        var wrappedAround = false;\r\n\r\n        // Try to find a match and ignore invalid ones\r\n        var findResult;\r\n        while (true) {\r\n          findResult = findTextFromPosition(\r\n            pos,\r\n            searchTerm,\r\n            isRegex,\r\n            searchScopeRange,\r\n            findOptions\r\n          );\r\n\r\n          if (findResult) {\r\n            if (findResult.valid) {\r\n              this.setStartAndEnd(\r\n                findResult.startPos.node,\r\n                findResult.startPos.offset,\r\n                findResult.endPos.node,\r\n                findResult.endPos.offset\r\n              );\r\n              return true;\r\n            } else {\r\n              // We've found a match that is not a whole word, so we carry on searching from the point immediately\r\n              // after the match\r\n              pos = backward ? findResult.startPos : findResult.endPos;\r\n            }\r\n          } else if (findOptions.wrap && !wrappedAround) {\r\n            // No result found but we're wrapping around and limiting the scope to the unsearched part of the range\r\n            searchScopeRange = searchScopeRange.cloneRange();\r\n            pos = session.getRangeBoundaryPosition(searchScopeRange, !backward);\r\n            searchScopeRange.setBoundary(\r\n              initialPos.node,\r\n              initialPos.offset,\r\n              backward\r\n            );\r\n            wrappedAround = true;\r\n          } else {\r\n            // Nothing found and we can't wrap around, so we're done\r\n            return false;\r\n          }\r\n        }\r\n      }),\r\n\r\n      pasteHtml: function (html) {\r\n        this.deleteContents();\r\n        if (html) {\r\n          var frag = this.createContextualFragment(html);\r\n          var lastChild = frag.lastChild;\r\n          this.insertNode(frag);\r\n          this.collapseAfter(lastChild);\r\n        }\r\n      },\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Extensions to the Rangy Selection object\r\n\r\n    function createSelectionTrimmer(methodName) {\r\n      return createEntryPointFunction(function (session, characterOptions) {\r\n        var trimmed = false;\r\n        this.changeEachRange(function (range) {\r\n          trimmed = range[methodName](characterOptions) || trimmed;\r\n        });\r\n        return trimmed;\r\n      });\r\n    }\r\n\r\n    extend(api.selectionPrototype, {\r\n      expand: createEntryPointFunction(function (session, unit, expandOptions) {\r\n        this.changeEachRange(function (range) {\r\n          range.expand(unit, expandOptions);\r\n        });\r\n      }),\r\n\r\n      move: createEntryPointFunction(function (session, unit, count, options) {\r\n        var unitsMoved = 0;\r\n        if (this.focusNode) {\r\n          this.collapse(this.focusNode, this.focusOffset);\r\n          var range = this.getRangeAt(0);\r\n          if (!options) {\r\n            options = {};\r\n          }\r\n          options.characterOptions = createOptions(\r\n            options.characterOptions,\r\n            defaultCaretCharacterOptions\r\n          );\r\n          unitsMoved = range.move(unit, count, options);\r\n          this.setSingleRange(range);\r\n        }\r\n        return unitsMoved;\r\n      }),\r\n\r\n      trimStart: createSelectionTrimmer(\"trimStart\"),\r\n      trimEnd: createSelectionTrimmer(\"trimEnd\"),\r\n      trim: createSelectionTrimmer(\"trim\"),\r\n\r\n      selectCharacters: createEntryPointFunction(function (\r\n        session,\r\n        containerNode,\r\n        startIndex,\r\n        endIndex,\r\n        direction,\r\n        characterOptions\r\n      ) {\r\n        var range = api.createRange(containerNode);\r\n        range.selectCharacters(\r\n          containerNode,\r\n          startIndex,\r\n          endIndex,\r\n          characterOptions\r\n        );\r\n        this.setSingleRange(range, direction);\r\n      }),\r\n\r\n      saveCharacterRanges: createEntryPointFunction(function (\r\n        session,\r\n        containerNode,\r\n        characterOptions\r\n      ) {\r\n        var ranges = this.getAllRanges(),\r\n          rangeCount = ranges.length;\r\n        var rangeInfos = [];\r\n\r\n        var backward = rangeCount == 1 && this.isBackward();\r\n\r\n        for (var i = 0, len = ranges.length; i < len; ++i) {\r\n          rangeInfos[i] = {\r\n            characterRange: ranges[i].toCharacterRange(\r\n              containerNode,\r\n              characterOptions\r\n            ),\r\n            backward: backward,\r\n            characterOptions: characterOptions,\r\n          };\r\n        }\r\n\r\n        return rangeInfos;\r\n      }),\r\n\r\n      restoreCharacterRanges: createEntryPointFunction(function (\r\n        session,\r\n        containerNode,\r\n        saved\r\n      ) {\r\n        this.removeAllRanges();\r\n        for (\r\n          var i = 0, len = saved.length, range, rangeInfo, characterRange;\r\n          i < len;\r\n          ++i\r\n        ) {\r\n          rangeInfo = saved[i];\r\n          characterRange = rangeInfo.characterRange;\r\n          range = api.createRange(containerNode);\r\n          range.selectCharacters(\r\n            containerNode,\r\n            characterRange.start,\r\n            characterRange.end,\r\n            rangeInfo.characterOptions\r\n          );\r\n          this.addRange(range, rangeInfo.backward);\r\n        }\r\n      }),\r\n\r\n      text: createEntryPointFunction(function (session, characterOptions) {\r\n        var rangeTexts = [];\r\n        for (var i = 0, len = this.rangeCount; i < len; ++i) {\r\n          rangeTexts[i] = this.getRangeAt(i).text(characterOptions);\r\n        }\r\n        return rangeTexts.join(\"\");\r\n      }),\r\n    });\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    // Extensions to the core rangy object\r\n\r\n    api.innerText = function (el, characterOptions) {\r\n      var range = api.createRange(el);\r\n      range.selectNodeContents(el);\r\n      var text = range.text(characterOptions);\r\n      return text;\r\n    };\r\n\r\n    api.createWordIterator = function (\r\n      startNode,\r\n      startOffset,\r\n      iteratorOptions\r\n    ) {\r\n      var session = getSession();\r\n      iteratorOptions = createNestedOptions(\r\n        iteratorOptions,\r\n        defaultWordIteratorOptions\r\n      );\r\n      var startPos = session.getPosition(startNode, startOffset);\r\n      var tokenizedTextProvider = createTokenizedTextProvider(\r\n        startPos,\r\n        iteratorOptions.characterOptions,\r\n        iteratorOptions.wordOptions\r\n      );\r\n      var backward = isDirectionBackward(iteratorOptions.direction);\r\n\r\n      return {\r\n        next: function () {\r\n          return backward\r\n            ? tokenizedTextProvider.previousStartToken()\r\n            : tokenizedTextProvider.nextEndToken();\r\n        },\r\n\r\n        dispose: function () {\r\n          tokenizedTextProvider.dispose();\r\n          this.next = function () {};\r\n        },\r\n      };\r\n    };\r\n\r\n    /*----------------------------------------------------------------------------------------------------------------*/\r\n\r\n    api.noMutation = function (func) {\r\n      var session = getSession();\r\n      func(session);\r\n      endSession();\r\n    };\r\n\r\n    api.noMutation.createEntryPointFunction = createEntryPointFunction;\r\n\r\n    api.textRange = {\r\n      isBlockNode: isBlockNode,\r\n      isCollapsedWhitespaceNode: isCollapsedWhitespaceNode,\r\n\r\n      createPosition: createEntryPointFunction(function (\r\n        session,\r\n        node,\r\n        offset\r\n      ) {\r\n        return session.getPosition(node, offset);\r\n      }),\r\n    };\r\n  });\r\n\r\n  return rangy;\r\n}, this);\r\n\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/rangy-text-range.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/rangy.js":
/*!**************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/rangy.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _rangy_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rangy-core */ \"./src/core/custom_plugins/highlights-comments/rangy-core.js\");\n/* harmony import */ var _rangy_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_rangy_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var rangy_lib_rangy_serializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rangy/lib/rangy-serializer */ \"./node_modules/rangy/lib/rangy-serializer.js\");\n/* harmony import */ var rangy_lib_rangy_serializer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(rangy_lib_rangy_serializer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var rangy_lib_rangy_selectionsaverestore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rangy/lib/rangy-selectionsaverestore */ \"./node_modules/rangy/lib/rangy-selectionsaverestore.js\");\n/* harmony import */ var rangy_lib_rangy_selectionsaverestore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(rangy_lib_rangy_selectionsaverestore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _rangy_text_range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./rangy-text-range */ \"./src/core/custom_plugins/highlights-comments/rangy-text-range.js\");\n/* harmony import */ var _rangy_text_range__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_rangy_text_range__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _rangy_classapplier__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./rangy-classapplier */ \"./src/core/custom_plugins/highlights-comments/rangy-classapplier.js\");\n/* harmony import */ var _rangy_classapplier__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_rangy_classapplier__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _rangy_highlighter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./rangy-highlighter */ \"./src/core/custom_plugins/highlights-comments/rangy-highlighter.js\");\n/* harmony import */ var _rangy_highlighter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_rangy_highlighter__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n// import 'rangy/lib/rangy-classapplier';\n\n\n// import 'rangy/lib/rangy-textrange';\n\n// import 'rangy/lib/rangy-highlighter';\n\n\n\n// https://github.com/timdown/rangy/wiki/Highlighter-Module\nvar Rangy = /*#__PURE__*/function () {\n  function Rangy() {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Rangy);\n    _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.init();\n    var iframe = document.getElementById(\"/impressum/\");\n    window.range = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createRange(iframe);\n    window.rangy = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a;\n    // range = rangy.createRange();\n    // this.highlighter = rangy.createHighlighter(document, \"TextRange\");\n    //\n    // this.addClassApliers();\n\n    return this;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Rangy, [{\n    key: \"addClassApliers\",\n    value: function addClassApliers() {\n      var _Rangy = this;\n      [\"highlight-1\", \"highlight-2\", \"highlight-3\", \"highlight-4\", \"highlight-5\"].forEach(function (color, i) {\n        var boldRedApplier = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createClassApplier(color, {\n          ignoreWhiteSpace: true,\n          elementTagName: \"highlight\",\n          elementProperties: {\n            id: function id() {\n              return \"xx\";\n            },\n            \"data-hc-type\": \"t\"\n          }\n        });\n        _Rangy.highlighter.addClassApplier(boldRedApplier);\n      });\n    }\n\n    // apply(sel, i, color, type) {\n    //   //boldRedApplier.toggleSelection();\n    //   let boldRedApplier = rangy.createClassApplier( color, {\n    //     elementTagName: 'highlight',\n    //     elementAttributes: {\n    //       \"data-id\": i,\n    //       \"data-hc-type\": type\n    //     }\n    //   });\n    //\n    //   // boldRedApplier.applyToSelection(sel);\n    //\n    //\n    //   this.highlighter.addClassApplier(boldRedApplier);\n    //   this.highlighter.highlightSelection(color, sel);\n    //\n    //   let ser = this.highlighter.serialize(sel);\n    //   debugger;\n    // }\n  }, {\n    key: \"apply\",\n    value: function apply(sel, i, color, type, idOfWrapper) {\n      //boldRedApplier.toggleSelection();\n      //debugger\n      /* let p = page;\r\n        var parser = new DOMParser();\r\n        var doc = parser.parseFromString(\"<html_string>\", \"text/html\");\r\n          debugger*/\n      // https://github.com/timdown/rangy/wiki/Highlighter-Module\n      var highlighter = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createHighlighter(document, \"TextRange\");\n      var boldRedApplier = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createClassApplier(color, {\n        elementTagName: \"highlight\",\n        elementAttributes: {\n          id: \"h\" + i,\n          \"data-id\": i,\n          \"data-hc-type\": type\n        }\n      });\n\n      // boldRedApplier.applyToSelection(sel);\n\n      highlighter.addClassApplier(boldRedApplier);\n      var newHiglights = highlighter.highlightSelection(color, {\n        selection: sel,\n        exclusive: true,\n        containerElementId: idOfWrapper\n      });\n      var ser = highlighter.serialize(sel);\n      window.selection = sel;\n      window.highlighter = highlighter;\n      ser = ser.replace(\"type:TextRange|\", \"\");\n      ser = ser.replace(color + \"$\", \"\");\n      ser = ser.replace(idOfWrapper, \"\");\n      // debugger;\n      return ser;\n    }\n  }, {\n    key: \"reapply\",\n    value: function reapply(sel, i, color, type, idOfWrapper) {\n      var text = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : \"\";\n      //boldRedApplier.toggleSelection();\n\n      var sell = \"type:TextRange|\" + sel + color + \"$\" + idOfWrapper;\n      var highlighter = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createHighlighter(document, \"TextRange\");\n      var boldRedApplier = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createClassApplier(color, {\n        elementTagName: \"highlight\",\n        elementAttributes: {\n          id: \"h\" + i,\n          \"data-id\": i,\n          \"data-hc-type\": type,\n          title: text\n        }\n      });\n      window.highlighter = highlighter;\n\n      // boldRedApplier.applyToSelection(sel);\n\n      highlighter.addClassApplier(boldRedApplier);\n      highlighter.deserialize(sell);\n      // debugger;\n    }\n  }, {\n    key: \"applyFromItem\",\n    value: function applyFromItem(note, index, idOfWrapper) {\n      this.reapply(note.selection, index, note.color, note.type, idOfWrapper, note.text);\n    }\n  }, {\n    key: \"save\",\n    value: function save() {\n      // let ser = this.highlighter.serialize();\n      // debugger;\n    }\n  }, {\n    key: \"des\",\n    value: function des() {\n      // // this.highlighter.deserialize(\"type:TextRange|231$233$1$highlight-1$\");\n      // this.highlighter.deserialize(\"type:TextRange|578$592$5$highlight-3$\");\n      // this.highlighter.deserialize(\"type:TextRange|868$880$4$highlight-2$\");\n      // // this.highlighter.deserialize(\"type:TextRange|911$919$2$highlight-1$\");\n      // this.highlighter.deserialize(\"type:TextRange|947$957$3$highlight-1$\");\n    }\n\n    // applyFromItem(note,index,page){\n    //   try {\n    //     let canDeserialize = Rangy.rangy().canDeserializeSelection(note.selection, page.$el[0]);\n    //     if(canDeserialize){\n    //       var selection = Rangy.rangy().deserializeSelection(note.selection, page.$el[0]);\n    //       Rangy.apply(selection, index, note.color, note.type);\n    //     }else {\n    //       alert(\"nejde deserializovat\");\n    //     }\n    //   }catch (err) {\n    //       //message.innerHTML = \"Input \" + err;\n    //     alert(index);\n    //       // x[i].works = 0;\n    //     }\n    // }\n  }, {\n    key: \"remove\",\n    value: function remove(sel, i, color, type) {\n      //boldRedApplier.toggleSelection();\n      var boldRedApplier = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.createClassApplier(color, {\n        elementAttributes: {\n          id: i,\n          \"data-id\": i,\n          \"data-hc-type\": type\n        }\n      });\n      boldRedApplier.undoToSelection(sel);\n    }\n  }, {\n    key: \"selection\",\n    value: function selection(el) {\n      return _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.getSelection(el);\n    }\n  }, {\n    key: \"stringSelection\",\n    value: function stringSelection() {\n      var sel = _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.getSelection();\n      return sel.toString();\n    }\n  }, {\n    key: \"serializedSelection\",\n    value: function serializedSelection(el) {\n      return _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a.serializeSelection(Rangy.selection(el), true, el);\n    }\n  }, {\n    key: \"rangy\",\n    value: function rangy() {\n      return _rangy_core__WEBPACK_IMPORTED_MODULE_2___default.a;\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Rangy);\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/rangy.js?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html":
/*!*********************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html ***!
  \*********************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    let app = this.$app;\n    return {\n      gc: null,\n      app: this.$app,\n      count: 0,\n      savedInput: null,\n      isLogged: app.user.isLogged()\n    };\n  },\n  methods: {\n    removeHighlight: async function (id) {\n      let app = this.app;\n    },\n    loadgc: async function (page) {\n      let app = this.app;\n      let c = this;\n      let highlightComments = app.highlightComments;\n      if (!app.user.isLogged()) {\n        return false;\n      }\n      let gc = await (await app.database.table('notes-select-gc')).where('parent_js_id', app.highlightComments.getHighlightId()).getValue();\n      let _ = this.app.database.lodash();\n      gc = _.orderBy(gc, ['js_id'], ['asc']);\n      let savedInput = await (await app.database.table('notes-select')).where('js_id', app.highlightComments.getHighlightId()).getValue();\n      let predefinedComment = '';\n      if (savedInput.length > 0 && app.user.isLogged()) {\n        savedInput = savedInput[0];\n        if (savedInput.user === app.user.identity.id) {\n          predefinedComment = savedInput.note;\n        }\n      }\n      let highlight = await (await this.app.database.table('notes-select')).filter(item => item['del'] === 0 && item['js_id'] === app.highlightComments.getHighlightId()).getValue();\n      this.$setState({\n        gc: gc,\n        savedInput: predefinedComment,\n        isLogged: true,\n        resolved: savedInput.resolved,\n        highlight: highlight[0]\n      });\n      this.$tick(function () {\n        let $addGroupComment = page.$el.find('#addGroupComment');\n        if (predefinedComment !== '') {\n          $addGroupComment.addClass('button-fill');\n          $addGroupComment.removeClass('color-gray');\n        }\n        $addGroupComment.off('click');\n        $addGroupComment.on('click', async function () {\n          let val = highlightComments.$textareaGroupComment.val().trim();\n          if (!app.user.isLogged()) {\n            app.dialog.alert('Pro tuto akci musíte být přihlášeni.', 'Upozornění');\n            return false;\n          }\n          if (val.length > 0 && highlightComments.removeGroupComment === false) {\n            let id = Date.now();\n            let testRowIndex = {\n              text: val,\n              del: 0,\n              df: 1,\n              ts: Math.round(new Date().getTime() / 1000),\n              parent_js_id: highlightComments.getHighlightId(),\n              js_id: id,\n              ts_edit: 'nyní',\n              id: null,\n              name: app.user.identity.fullname,\n              user: app.user.getUserId(),\n              readed: 1\n            };\n            await (await app.database.table('notes-select-gc')).insert(testRowIndex);\n            await (await app.database.table('notes-select')).where('js_id', app.highlightComments.getHighlightId()).update({\n              'note': '',\n              'df': 1\n            });\n            app.data.myEvents.emit('comment:toSend');\n            c.loadgc(page);\n          }\n        });\n        let $closeGC = page.$el.find('#gc-close');\n        $closeGC.off('click');\n        $closeGC.on('click', function () {\n          app.highlightComments.closeGCComment(highlightComments.getHighlightId());\n        });\n        highlightComments.$textareaGroupComment = page.$el.find('#textarea-group-comment');\n        highlightComments.$textareaGroupComment.off('change keyup');\n        highlightComments.$textareaGroupComment.on('change keyup', async function () {\n          let val = $(this).val().trim();\n          if (val.length > 0) {\n            $addGroupComment.addClass('button-fill');\n            $addGroupComment.removeClass('color-gray');\n            highlightComments.removeGroupComment = false;\n          } else {\n            highlightComments.removeGroupComment = true;\n            $addGroupComment.removeClass('button-fill');\n            $addGroupComment.addClass('color-gray');\n          }\n          (await app.database.table('notes-select')).where('js_id', highlightComments.getHighlightId()).update({\n            'note': $(this).val(),\n            'df': 0\n          });\n        });\n      });\n    },\n    navigateRole: function () {\n      let app = this.app;\n      let leftPanel = app.panel.get('.panel-left');\n      leftPanel.open();\n      let leftView = app.views.get($$('.view-left'));\n      let path = '/user-role/';\n      leftView.router.navigate(path, {\n        reloadCurrent: true,\n        ignoreCache: true\n      });\n    }\n  },\n  on: {\n    pageInit: async function (e, page) {\n      let app = page.app;\n      let params = page.router.currentRoute.params;\n      let hid = parseInt(params.id);\n      if (hid) {\n        app.highlightComments.setHighlightId(hid);\n      }\n      let c = this;\n      this.loadgc(page);\n      let highlightComments = app.highlightComments;\n      app.data.myEvents.off('api:syncGroupComments');\n      app.data.myEvents.on('api:syncGroupComments', function (serverComments) {\n        if (typeof c.loadgc !== 'undefined') {\n          for (const item of serverComments) {\n            let serverComment = item;\n            serverComment.parent_js_id = parseInt(serverComment.parent_js_id);\n            if (serverComment.parent_js_id === highlightComments.getHighlightId()) {\n              c.loadgc(page);\n              return false;\n            }\n          }\n        }\n      });\n      app.data.myEvents.off('comment:wsupdate');\n      app.data.myEvents.on('comment:wsupdate', function (item) {\n        if (typeof c.loadgc !== 'undefined') {\n          item.parent_js_id = parseInt(item.parent_js_id);\n          if (item.parent_js_id === highlightComments.getHighlightId()) {\n            c.loadgc(page);\n            return false;\n          }\n        }\n      });\n      let unreaded = await (await app.database.table('notes-select-gc')).where('parent_js_id', app.highlightComments.getHighlightId()).where('readed', 0).whereNot('user', null);\n      unreaded.update({ 'readed': 1 });\n      app.data.myEvents.emit('comment:readed', unreaded.getValue());\n    }\n  },\n  id: 'ef89459e50',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\" style=\"min-width: 280px;\">\\n    ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$route.params.id !== \\'0\\'', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"/gc-list/\" data-force=\"true\" data-ignore-cache=\"true\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět </span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Detail komentáře ';\n          r += c(ctx_2.$route.params.id, ctx_2);\n          r += '</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n\\n    <!--<div id=\"highlight-popover-inner-4\">-->\\n    <div class=\"page-content\">\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n      <!--<a class=\"navigate prevent-router\" href=\"/impressum/\" data-scroll-to=\"#h1587043336320\">test</a>-->\\n\\n\\n\\n      <!--<a class=\"scroll-to\" href=\"#1583932743779\" data-middle=\"true\" data-highlight=\"true\" data-speed=\"50\">test2</a>-->\\n\\n      <div class=\"highlight-gc-wrapper\">\\n        ';\n      r += Template7Helpers.if.call(ctx_1, ctx_1.isLogged, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        ';\n          r += Template7Helpers.if.call(ctx_2, ctx_2.$app.user.isEditor, {\n            hash: {},\n            data: data_2 || {},\n            fn: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n        ';\n              r += Template7Helpers.if.call(ctx_3, ctx_3.gc, {\n                hash: {},\n                data: data_3 || {},\n                fn: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n        ';\n                  r += Template7Helpers.each.call(ctx_4, ctx_4.gc, {\n                    hash: {},\n                    data: data_4 || {},\n                    fn: function (ctx_5, data_5) {\n                      var r = '';\n                      r += '\\n        <div class=\"highlight-gc-unit ';\n                      r += Template7Helpers.if.call(ctx_5, ctx_5.readed, {\n                        hash: {},\n                        data: data_5 || {},\n                        fn: function empty() {\n                          return '';\n                        },\n                        inverse: function (ctx_6, data_6) {\n                          var r = '';\n                          r += 'gc-unread-message';\n                          return r;\n                        },\n                        root: root,\n                        parents: [\n                          ctx_4,\n                          ctx_3,\n                          ctx_2,\n                          ctx_1\n                        ]\n                      });\n                      r += '\">\\n          <div class=\"highlight-gc-header\">\\n            <div class=\"highlight-gc-header-left\">\\n              <div class=\"hgc-name\">';\n                      r += c(ctx_5.name, ctx_5);\n                      r += '</div>\\n              <div class=\"hgc-role\">';\n                      r += c(ctx_5.ts_edit, ctx_5);\n                      r += '</div>\\n              <div class=\"hgc-date\"></div>\\n            </div>\\n            <!--<div class=\"highlight-gc-header-right\">-->\\n            <!--<a href=\"#\" class=\"dynamic-popover\"><i class=\"material-icons\">more_vert</i></a>-->\\n            <!--</div>-->\\n            <div style=\"clear: both;\"></div>\\n          </div>\\n          <div class=\"highlight-gc-content\">\\n            ';\n                      r += c(ctx_5.text, ctx_5);\n                      r += '\\n          </div>\\n        </div>\\n        ';\n                      return r;\n                    },\n                    inverse: function empty() {\n                      return '';\n                    },\n                    root: root,\n                    parents: [\n                      ctx_3,\n                      ctx_2,\n                      ctx_1\n                    ]\n                  });\n                  r += '\\n\\n\\n        <div class=\"highlight-gc-unit\" style=\"border-bottom: none;\">\\n          <div class=\"highlight-gc-header\">\\n            <div class=\"highlight-gc-header-left\">\\n              <div class=\"hgc-name\">';\n                  r += Template7Helpers.if.call(ctx_4, ctx_4.isLogged, {\n                    hash: {},\n                    data: data_4 || {},\n                    fn: function (ctx_5, data_5) {\n                      var r = '';\n                      r += ' ';\n                      r += c(ctx_5.$app.user.identity.fullname, ctx_5);\n                      r += ' ';\n                      return r;\n                    },\n                    inverse: function empty() {\n                      return '';\n                    },\n                    root: root,\n                    parents: [\n                      ctx_3,\n                      ctx_2,\n                      ctx_1\n                    ]\n                  });\n                  r += '</div>\\n            </div>\\n            <div style=\"clear: both;\"></div>\\n          </div>\\n        </div>\\n\\n        ';\n                  r += Template7Helpers.if.call(ctx_4, ctx_4.resolved, {\n                    hash: {},\n                    data: data_4 || {},\n                    fn: function (ctx_5, data_5) {\n                      var r = '';\n                      r += '\\n        <h3>Vlákno je uzavřeno</h3>\\n        ';\n                      return r;\n                    },\n                    inverse: function (ctx_5, data_5) {\n                      var r = '';\n                      r += '\\n        <div class=\"hgc-comment\">\\n          <div class=\"hgc-comment-textarea\">\\n            <textarea id=\"textarea-group-comment\" class=\"resizable comments\">';\n                      r += c(ctx_5.savedInput, ctx_5);\n                      r += '</textarea>\\n          </div>\\n          <div class=\"row hgc-comment-buttons\">\\n            <a id=\"addGroupComment\" href=\"#\" class=\"col button button-small color-gray\">Přidat</a>\\n            <!--<a id=\"cancelGroupComment\" href=\"#\" class=\"col button button-small button-outline\">Zrušit</a>-->\\n          </div>\\n        </div>\\n\\n        <div class=\"list\">\\n          <ul>\\n            ';\n                      r += Template7Helpers.js_if.call(ctx_5, 'this.$route.params.id !== \\'0\\'', {\n                        hash: {},\n                        data: data_5 || {},\n                        fn: function (ctx_6, data_6) {\n                          var r = '';\n                          r += '\\n            <li><a class=\"navigate prevent-router item-link item-content\" href=\"';\n                          r += c(ctx_6.highlight.pageUrl, ctx_6);\n                          r += '\" data-highlight-id=\"#h';\n                          r += c(ctx_6.highlight.js_id, ctx_6);\n                          r += '\">Zobrazit na stránce</a></li>\\n            ';\n                          return r;\n                        },\n                        inverse: function empty() {\n                          return '';\n                        },\n                        root: root,\n                        parents: [\n                          ctx_4,\n                          ctx_3,\n                          ctx_2,\n                          ctx_1\n                        ]\n                      });\n                      r += '\\n            <li><a id=\"gc-close\" class=\"item-link list-button\" href=\"#\">Uzavřít vlákno</a></li>\\n          </ul>\\n        </div>\\n\\n        ';\n                      return r;\n                    },\n                    root: root,\n                    parents: [\n                      ctx_3,\n                      ctx_2,\n                      ctx_1\n                    ]\n                  });\n                  r += '\\n\\n        ';\n                  return r;\n                },\n                inverse: function (ctx_4, data_4) {\n                  var r = '';\n                  r += '\\n        <div class=\"preloader\" style=\"width: 44px; height: 44px; margin: auto;\"></div>\\n        ';\n                  return r;\n                },\n                root: root,\n                parents: [\n                  ctx_2,\n                  ctx_1\n                ]\n              });\n              r += '\\n        ';\n              return r;\n            },\n            inverse: function (ctx_3, data_3) {\n              var r = '';\n              r += '\\n        <div style=\"padding: 10px;\">\\n          <h3 style=\"margin: 0;\">Sdílené komentování</h3>\\n          <div>Tato funkce je dostupná pouze schváleným editorům knihy.</div>\\n          <a @click=\"navigateRole\" href=\"#\" class=\"col button button-small\">Zažádat o\\xA0editorství</a>\\n        </div>\\n        ';\n              return r;\n            },\n            root: root,\n            parents: [ctx_1]\n          });\n          r += '\\n\\n\\n        ';\n          return r;\n        },\n        inverse: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n        <div class=\"hc-unsigned-user\">\\n          <div class=\"list media-list\">\\n            <ul>\\n              <li>\\n                <a id=\"hc-group-login\" href=\"/login/true\" data-view=\".view-left\" data-panel=\".panel-left\" class=\"item-link item-content panel-open\">\\n                  <div class=\"item-media\">\\n                    <i class=\"material-icons\">\\n                      person\\n                    </i>\\n                  </div>\\n                  <div class=\"item-inner\">\\n                    <div class=\"item-title-row\">\\n                      <div class=\"item-title\">PŘIHLASTE SE</div>\\n\\n                    </div>\\n\\n                    <div class=\"item-text\">Přihlášením získáte možnost komentovat knihu v\\xA0rámci sdílené diskuze.</div>\\n                  </div>\\n                </a>\\n              </li>\\n\\n            </ul>\\n          </div>\\n        </div>\\n        ';\n          return r;\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n\\n      </div>\\n\\n      ';\n      r += Template7Helpers.js_if.call(ctx_1, 'this.$route.params.id !== \\'0\\'', {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n    </div>\\n    ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n  </div>\\n  <!--</div>-->\\n\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-ef89459e50] .page {\n    position: inherit;\n  }\n\n[data-f7-ef89459e50] :root {\n    position: inherit;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{#js_if \"this.$route.params.id !== '0'\"}} Zpět Detail komentáře {{this.$route.params.id}} {{/js_if}} {{#if isLogged}} {{#if $app.user.isEditor}} {{#if gc}} {{#each gc}} {{name}} {{ts_edit}} {{text}} {{/each}} {{#if isLogged}} {{$app.user.identity.fullname}} {{/if}} {{#if resolved}} Vlákno je uzavřeno {{else}} {{savedInput}} Přidat {{#js_if \"this.$route.params.id !== '0'\"}} Zobrazit na stránce {{/js_if}} Uzavřít vlákno {{/if}} {{else}} {{/if}} {{else}} Sdílené komentování Tato funkce je dostupná pouze schváleným editorům knihy. Zažádat o editorství {{/if}} {{else}} person PŘIHLASTE SE Přihlášením získáte možnost komentovat knihu v rámci sdílené diskuze. {{/if}} {{#js_if \"this.$route.params.id !== '0'\"}} {{/js_if}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/templates/gc-detail.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/templates/info.f7.html":
/*!****************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/templates/info.f7.html ***!
  \****************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (jQuery) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    var colors = {\n      red: 'Červená',\n      green: 'Zelená',\n      blue: 'Modrá',\n      pink: 'Růžová',\n      yellow: 'Žlutá',\n      orange: 'Oranžová',\n      gray: 'Šedá',\n      black: 'Černá',\n      brown: 'brown'\n    };\n    return {\n      colors: colors,\n      colorsAmount: colors.length\n    };\n  },\n  methods: {\n    setLayoutTheme: function (theme) {\n      var self = this;\n      var app = self.$app;\n      app.root.removeClass('theme-dark theme-light').addClass('theme-' + theme);\n    },\n    setColorTheme: function (color) {\n      var self = this;\n      var app = self.$app;\n      var currentColorClass = app.root[0].className.match(/color-theme-([a-z]*)/);\n      if (currentColorClass)\n        app.root.removeClass(currentColorClass[0]);\n      app.root.addClass('color-theme-' + color);\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      var options = { timerCounter: 1000 * 60 * 555 };\n      var timer = jQuery(page.el).find('#timer').first().timer(options).start();\n    }\n  },\n  id: '422edf54f7',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n        <div class=\"left\">\\n          <a href=\"#\" class=\"link back\">\\n            <i class=\"icon icon-back\"></i>\\n            <span class=\"ios-only\">Zpět</span>\\n          </a>\\n        </div>\\n        <div class=\"title\">Informace</div>\\n        <div class=\"right\"></div>\\n\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n\\n      <div class=\"block-title\">Celkově přečteno z\\xA0knihy</div>\\n      <div class=\"block block-strong\">\\n        <div class=\"row\">\\n          <div class=\"col text-align-center\">\\n            <div class=\"gauge gauge-init\" data-type=\"circle\" data-value=\"0.67\" data-value-text=\"67%\"></div>\\n          </div>\\n        </div>\\n      </div>\\n\\n      <div class=\"block-title\">Čas strávený čtením</div>\\n      <div class=\"block block-strong\">\\n        <div id=\"timer\">aaa</div>\\n      </div>\\n\\n    </div>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-422edf54f7] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` Zpět Informace Celkově přečteno z knihy Čas strávený čtením aaa `\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/templates/info.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html":
/*!****************************************************************************************************!*\
  !*** ./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html ***!
  \****************************************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      \n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    return {\n      highlights: null,\n      app: this.$app,\n      count: 0,\n      highlightCommentClasses: [\n        'highlight-comment-1',\n        'highlight-comment-2',\n        'highlight-comment-3',\n        'highlight-comment-4',\n        'highlight-comment-5'\n      ]\n    };\n  },\n  methods: {\n    removeHighlight: async function (id) {\n      let app = this.app;\n    }\n  },\n  on: {\n    pageInit: function (e, page) {\n      let app = page.app;\n      let c = this;\n      let highlightComments = app.highlightComments;\n      highlightComments.$textareaComment = page.$el.find('#textarea-comment');\n      highlightComments.$textareaComment.on('change keyup', async function () {\n        (await app.database.table('notes-select')).where('js_id', highlightComments.getHighlightId()).update({\n          'note': $(this).val(),\n          'df': 1\n        });\n      });\n      let $highlightColorChangeButton = page.$el.find('.highlight-colorchange');\n      let $highlightColorRemoveButton = page.$el.find('.highlight-remove');\n      $highlightColorChangeButton.on('click', async function () {\n        let highlightId = app.highlightComments.getHighlightId();\n        let $currentPage = app.router.$el;\n        let $newEl = $currentPage.find('highlight[data-id=\"' + highlightId + '\"]');\n        let type = $newEl.attr('data-hc-type');\n        let color = $$(this).data('color');\n        $newEl.removeAttr('class').addClass(color);\n        if (type === 'c') {\n          $newEl.addClass('h-icon');\n        }\n        await (await app.database.table('notes-select')).filter(item => item['js_id'] === highlightId).update({\n          color: color,\n          df: 1\n        });\n        app.data.myEvents.emit('highlights:change');\n        app.highlightComments.lastHighlightClass = color;\n      });\n      $highlightColorRemoveButton.on('click', async function () {\n        let highlightId = highlightComments.getHighlightId();\n        highlightComments.removeHighlight(highlightId);\n        highlightComments.open = false;\n        highlightComments.$popover.close();\n      });\n    }\n  },\n  id: '00b06380ea',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div class=\"page\">\\n    <ul id=\"highlight-popover-inner-2\" class=\"highlight-color-list\">\\n      ';\n      r += Template7Helpers.each.call(ctx_1, ctx_1.highlightCommentClasses, {\n        hash: {},\n        data: data_1 || {},\n        fn: function (ctx_2, data_2) {\n          var r = '';\n          r += '\\n      <li class=\"highlight-color-list-item\">\\n        <a href=\"#\" class=\"highlight-colorchange ';\n          r += c(ctx_2, ctx_2);\n          r += '\" data-color=\"';\n          r += c(ctx_2, ctx_2);\n          r += '\">\\n          <i class=\"material-icons\">rate_review</i>\\n        </a>\\n      </li>\\n      ';\n          return r;\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      <li class=\"highlight-color-list-item\">\\n        <a href=\"#\" class=\"highlight-remove\">\\n          <i class=\"material-icons\">delete</i>\\n        </a>\\n      </li>\\n    </ul>\\n    <textarea id=\"textarea-comment\" class=\"resizable comments\"></textarea>\\n  </div>\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n\n\n`,\n  styleScoped: true,\n  cleanText: ` {{#each highlightCommentClasses}} {{/each}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/highlights-comments/templates/popover/hc-highlight-comment.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/popover-with-data/popover-with-data.less":
/*!**************************************************************************!*\
  !*** ./src/core/custom_plugins/popover-with-data/popover-with-data.less ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/popover-with-data/popover-with-data.less?");

/***/ }),

/***/ "./src/core/custom_plugins/search/templates/right_menu.f7.html":
/*!*********************************************************************!*\
  !*** ./src/core/custom_plugins/search/templates/right_menu.f7.html ***!
  \*********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var template7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! template7 */ \"./node_modules/template7/dist/template7.esm.js\");\n\n      \n      const Template7Helpers = template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].helpers;\n\n      template7__WEBPACK_IMPORTED_MODULE_0__[\"default\"].registerPartial('searchroutes', '<ul class=\"accordion-item-content\">    {{#each routes}}    <li id=\"search{{id}}\" class=\"routes hidden {{#if routes}}accordion-item-opened{{/if}}\">      <div class=\"item-content\">        <div class=\"item-media\"><span class=\"badge elevation-9\">0</span></div>        <div class=\"item-inner\">          <div class=\"item-title\">            <!-- <a class=\"swipe-to-event\" data-chapterindex=\"{{@index}}\" data-path=\"{{fullPath}}\" href=\"#\">{{name}}</a> -->            <a class=\"navigate link prevent-router\" href=\"{{fullPath}}\">{{name}}</a>          </div>          {{#if routes}}<div class=\"item-after accordion-item-toggle\">            <i class=\"f7-icons sublist-switch down\">chevron_right</i>            <i class=\"f7-icons sublist-switch up\">chevron_down</i>          </div>{{/if}}        </div>      </div>      {{#if routes}}{{> \"searchroutes\"}}{{/if}}    </li>    {{/each}}  </ul>');\n\n      /* harmony default export */ __webpack_exports__[\"default\"] = ({\n  data: function () {\n    return { routes: this.$app.book.getBookChaptersTree() };\n  },\n  methods: {},\n  on: {\n    pageInit: function (e, page) {\n      let $jqueryPage = $(page.el);\n      let app = this.$app;\n      function hideResult() {\n        $jqueryPage.find('#search-result').addClass('hidden');\n        $jqueryPage.find('#search-not-found').removeClass('hidden');\n      }\n      let searchBar = this.$app.searchbar.create({\n        el: '#search-page .searchbar',\n        inputEl: '#search-page .searchbarx',\n        customSearch: true,\n        backdrop: false,\n        disableButton: false,\n        on: {\n          search: function (searchbar, q) {\n            let query = q;\n            query = $.trim(query);\n            if (query.length > 0) {\n              let visible = false;\n              let founded = app.search.chapterSearch(query);\n              founded.forEach(function (v) {\n                let el = $jqueryPage.find('#search' + v.id);\n                if (v.val > 0) {\n                  el.removeClass('hidden');\n                  el.find('.badge').addClass('bg-color-theme').text(v.val);\n                  el.parents('.hidden').removeClass('hidden');\n                  el.find('a').attr('data-highlight', query);\n                  visible = true;\n                } else {\n                  el.addClass('hidden');\n                  el.find('a').attr('data-highlight', '');\n                  el.find('.badge').removeClass('bg-color-theme').text(v.val);\n                }\n              });\n              if (visible) {\n                $jqueryPage.find('#search-result').removeClass('hidden');\n                $jqueryPage.find('#search-not-found').addClass('hidden');\n              } else {\n                hideResult();\n              }\n            } else {\n              hideResult();\n            }\n          },\n          clear: function (searchbar, q) {\n            hideResult();\n          },\n          disable: function (searchbar, q) {\n            hideResult();\n          }\n        }\n      });\n    },\n    pageAfterOut: function () {\n    }\n  },\n  id: 'b9869bb179',\n  render() {\n    return function (ctx_1, data_1, root) {\n      function isArray(arr) {\n        return Array.isArray(arr);\n      }\n      function isFunction(func) {\n        return typeof func === 'function';\n      }\n      function c(val, ctx) {\n        if (typeof val !== 'undefined' && val !== null) {\n          if (isFunction(val)) {\n            return val.call(ctx);\n          } else\n            return val;\n        } else\n          return '';\n      }\n      root = root || ctx_1 || {};\n      var r = '';\n      r += '<html><head></head><body><div id=\"search-page\" class=\"page\">\\n    <div class=\"navbar\">\\n      <div class=\"navbar-bg\"></div>\\n      <div class=\"navbar-inner sliding\">\\n\\n        <div class=\"title\">';\n      r += c(ctx_1.$app.translation.t('search:search'), ctx_1);\n      r += '</div>\\n        <div class=\"subnavbar\">\\n          <form class=\"searchbar\">\\n            <div class=\"searchbar-inner\">\\n              <div class=\"searchbar-input-wrap\">\\n                <input type=\"search\" class=\"searchbarx\" placeholder=\"';\n      r += c(ctx_1.$app.translation.t('search:lookingFor'), ctx_1);\n      r += '\">\\n                <i class=\"searchbar-icon\"></i>\\n                <span class=\"input-clear-button\"></span>\\n              </div>\\n              <span class=\"searchbar-disable-button\">Cancel</span>\\n            </div>\\n          </form>\\n        </div>\\n      </div>\\n    </div>\\n    <div class=\"page-content\">\\n      <div class=\"searchbar-backdrop\"></div>\\n\\n\\n      <!--links-list-->\\n\\n\\n      <div id=\"search-result\" class=\"list search-list searchbar-found list accordion-list kapitoly hidden\">\\n        ';\n      r += Template7Helpers._partial.call(ctx_1, 'searchroutes', {\n        hash: {},\n        data: data_1 || {},\n        fn: function empty() {\n          return '';\n        },\n        inverse: function empty() {\n          return '';\n        },\n        root: root,\n        parents: [ctx_1]\n      });\n      r += '\\n      </div>\\n      <div id=\"search-not-found\">\\n        <h3 class=\"text-align-center margin\">';\n      r += c(ctx_1.$app.translation.t('search:notFound'), ctx_1);\n      r += '</h3>\\n      </div>\\n    </div>\\n  </div>\\n\\n</body></html>';\n      return r;\n    }(this);\n  },\n  style: `\n[data-f7-b9869bb179] #search-not-found h3 {\n    color: #444444;\n  }\n\n[data-f7-b9869bb179] .button {\n    margin-bottom: 1em;\n    text-transform: capitalize;\n  }\n\n[data-f7-b9869bb179] .accordion-list>ul.accordion-item-content {\n    height: auto;\n  }\n\n[data-f7-b9869bb179] .sublist-switch {\n    font-size: 20px;\n  }\n\n[data-f7-b9869bb179] .accordion-item-opened>.item-content>.item-inner>.accordion-item-toggle>.sublist-switch.down {\n    display: none;\n  }\n\n[data-f7-b9869bb179] .accordion-item-opened>.item-content>.item-inner>.accordion-item-toggle>.sublist-switch.up {\n    display: block;\n  }\n\n[data-f7-b9869bb179] .sublist-switch.up {\n    display: none;\n  }\n\n[data-f7-b9869bb179] .sublist-switch.down {\n    display: block;\n  }\n\n[data-f7-b9869bb179] .kapitoly a {\n    color: inherit;\n  }\n\n[data-f7-b9869bb179] .hidden {\n    display: none;\n  }\n`,\n  styleScoped: true,\n  cleanText: ` {{$app.translation.t(\"search:search\")}} Cancel {{> \"searchroutes\"}} {{$app.translation.t(\"search:notFound\")}} `\n});\n    \n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/search/templates/right_menu.f7.html?");

/***/ }),

/***/ "./src/core/custom_plugins/translation/translation.js":
/*!*************************************************************************!*\
  !*** ./src/core/custom_plugins/translation/translation.js + 12 modules ***!
  \*************************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/framework7-v575/utils/utils.js because of ./src/core/core.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(\"./node_modules/@babel/runtime/helpers/defineProperty.js\");\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js\nvar createClass = __webpack_require__(\"./node_modules/@babel/runtime/helpers/createClass.js\");\nvar createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js\nvar classCallCheck = __webpack_require__(\"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\nvar classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);\n\n// EXTERNAL MODULE: ./node_modules/framework7-v575/utils/utils.js\nvar utils = __webpack_require__(\"./node_modules/framework7-v575/utils/utils.js\");\n\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? Object(arguments[i]) : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\n\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n\n  return _assertThisInitialized(self);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n// CONCATENATED MODULE: ./node_modules/i18next/dist/esm/i18next.js\n\n\n\n\n\n\n\n\n\nvar consoleLogger = {\n  type: 'logger',\n  log: function log(args) {\n    this.output('log', args);\n  },\n  warn: function warn(args) {\n    this.output('warn', args);\n  },\n  error: function error(args) {\n    this.output('error', args);\n  },\n  output: function output(type, args) {\n    if (console && console[type]) console[type].apply(console, args);\n  }\n};\n\nvar i18next_Logger = function () {\n  function Logger(concreteLogger) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Logger);\n\n    this.init(concreteLogger, options);\n  }\n\n  _createClass(Logger, [{\n    key: \"init\",\n    value: function init(concreteLogger) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      this.prefix = options.prefix || 'i18next:';\n      this.logger = concreteLogger || consoleLogger;\n      this.options = options;\n      this.debug = options.debug;\n    }\n  }, {\n    key: \"setDebug\",\n    value: function setDebug(bool) {\n      this.debug = bool;\n    }\n  }, {\n    key: \"log\",\n    value: function log() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      return this.forward(args, 'log', '', true);\n    }\n  }, {\n    key: \"warn\",\n    value: function warn() {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return this.forward(args, 'warn', '', true);\n    }\n  }, {\n    key: \"error\",\n    value: function error() {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      return this.forward(args, 'error', '');\n    }\n  }, {\n    key: \"deprecate\",\n    value: function deprecate() {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n    }\n  }, {\n    key: \"forward\",\n    value: function forward(args, lvl, prefix, debugOnly) {\n      if (debugOnly && !this.debug) return null;\n      if (typeof args[0] === 'string') args[0] = \"\".concat(prefix).concat(this.prefix, \" \").concat(args[0]);\n      return this.logger[lvl](args);\n    }\n  }, {\n    key: \"create\",\n    value: function create(moduleName) {\n      return new Logger(this.logger, _objectSpread({}, {\n        prefix: \"\".concat(this.prefix, \":\").concat(moduleName, \":\")\n      }, this.options));\n    }\n  }]);\n\n  return Logger;\n}();\n\nvar baseLogger = new i18next_Logger();\n\nvar i18next_EventEmitter = function () {\n  function EventEmitter() {\n    _classCallCheck(this, EventEmitter);\n\n    this.observers = {};\n  }\n\n  _createClass(EventEmitter, [{\n    key: \"on\",\n    value: function on(events, listener) {\n      var _this = this;\n\n      events.split(' ').forEach(function (event) {\n        _this.observers[event] = _this.observers[event] || [];\n\n        _this.observers[event].push(listener);\n      });\n      return this;\n    }\n  }, {\n    key: \"off\",\n    value: function off(event, listener) {\n      if (!this.observers[event]) return;\n\n      if (!listener) {\n        delete this.observers[event];\n        return;\n      }\n\n      this.observers[event] = this.observers[event].filter(function (l) {\n        return l !== listener;\n      });\n    }\n  }, {\n    key: \"emit\",\n    value: function emit(event) {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      if (this.observers[event]) {\n        var cloned = [].concat(this.observers[event]);\n        cloned.forEach(function (observer) {\n          observer.apply(void 0, args);\n        });\n      }\n\n      if (this.observers['*']) {\n        var _cloned = [].concat(this.observers['*']);\n\n        _cloned.forEach(function (observer) {\n          observer.apply(observer, [event].concat(args));\n        });\n      }\n    }\n  }]);\n\n  return EventEmitter;\n}();\n\nfunction defer() {\n  var res;\n  var rej;\n  var promise = new Promise(function (resolve, reject) {\n    res = resolve;\n    rej = reject;\n  });\n  promise.resolve = res;\n  promise.reject = rej;\n  return promise;\n}\nfunction makeString(object) {\n  if (object == null) return '';\n  return '' + object;\n}\nfunction i18next_copy(a, s, t) {\n  a.forEach(function (m) {\n    if (s[m]) t[m] = s[m];\n  });\n}\n\nfunction getLastOfPath(object, path, Empty) {\n  function cleanKey(key) {\n    return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n  }\n\n  function canNotTraverseDeeper() {\n    return !object || typeof object === 'string';\n  }\n\n  var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n\n  while (stack.length > 1) {\n    if (canNotTraverseDeeper()) return {};\n    var key = cleanKey(stack.shift());\n    if (!object[key] && Empty) object[key] = new Empty();\n\n    if (Object.prototype.hasOwnProperty.call(object, key)) {\n      object = object[key];\n    } else {\n      object = {};\n    }\n  }\n\n  if (canNotTraverseDeeper()) return {};\n  return {\n    obj: object,\n    k: cleanKey(stack.shift())\n  };\n}\n\nfunction setPath(object, path, newValue) {\n  var _getLastOfPath = getLastOfPath(object, path, Object),\n      obj = _getLastOfPath.obj,\n      k = _getLastOfPath.k;\n\n  obj[k] = newValue;\n}\nfunction pushPath(object, path, newValue, concat) {\n  var _getLastOfPath2 = getLastOfPath(object, path, Object),\n      obj = _getLastOfPath2.obj,\n      k = _getLastOfPath2.k;\n\n  obj[k] = obj[k] || [];\n  if (concat) obj[k] = obj[k].concat(newValue);\n  if (!concat) obj[k].push(newValue);\n}\nfunction getPath(object, path) {\n  var _getLastOfPath3 = getLastOfPath(object, path),\n      obj = _getLastOfPath3.obj,\n      k = _getLastOfPath3.k;\n\n  if (!obj) return undefined;\n  return obj[k];\n}\nfunction getPathWithDefaults(data, defaultData, key) {\n  var value = getPath(data, key);\n\n  if (value !== undefined) {\n    return value;\n  }\n\n  return getPath(defaultData, key);\n}\nfunction deepExtend(target, source, overwrite) {\n  for (var prop in source) {\n    if (prop !== '__proto__' && prop !== 'constructor') {\n      if (prop in target) {\n        if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {\n          if (overwrite) target[prop] = source[prop];\n        } else {\n          deepExtend(target[prop], source[prop], overwrite);\n        }\n      } else {\n        target[prop] = source[prop];\n      }\n    }\n  }\n\n  return target;\n}\nfunction regexEscape(str) {\n  return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\nvar _entityMap = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n  '/': '&#x2F;'\n};\nfunction i18next_escape(data) {\n  if (typeof data === 'string') {\n    return data.replace(/[&<>\"'\\/]/g, function (s) {\n      return _entityMap[s];\n    });\n  }\n\n  return data;\n}\nvar isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;\n\nfunction deepFind(obj, path) {\n  var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';\n  if (!obj) return undefined;\n  if (obj[path]) return obj[path];\n  var paths = path.split(keySeparator);\n  var current = obj;\n\n  for (var i = 0; i < paths.length; ++i) {\n    if (!current) return undefined;\n\n    if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {\n      return undefined;\n    }\n\n    if (current[paths[i]] === undefined) {\n      var j = 2;\n      var p = paths.slice(i, i + j).join(keySeparator);\n      var mix = current[p];\n\n      while (mix === undefined && paths.length > i + j) {\n        j++;\n        p = paths.slice(i, i + j).join(keySeparator);\n        mix = current[p];\n      }\n\n      if (mix === undefined) return undefined;\n      if (typeof mix === 'string') return mix;\n      if (p && typeof mix[p] === 'string') return mix[p];\n      var joinedPath = paths.slice(i + j).join(keySeparator);\n      if (joinedPath) return deepFind(mix, joinedPath, keySeparator);\n      return undefined;\n    }\n\n    current = current[paths[i]];\n  }\n\n  return current;\n}\n\nvar i18next_ResourceStore = function (_EventEmitter) {\n  _inherits(ResourceStore, _EventEmitter);\n\n  function ResourceStore(data) {\n    var _this;\n\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n      ns: ['translation'],\n      defaultNS: 'translation'\n    };\n\n    _classCallCheck(this, ResourceStore);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));\n\n    if (isIE10) {\n      i18next_EventEmitter.call(_assertThisInitialized(_this));\n    }\n\n    _this.data = data || {};\n    _this.options = options;\n\n    if (_this.options.keySeparator === undefined) {\n      _this.options.keySeparator = '.';\n    }\n\n    if (_this.options.ignoreJSONStructure === undefined) {\n      _this.options.ignoreJSONStructure = true;\n    }\n\n    return _this;\n  }\n\n  _createClass(ResourceStore, [{\n    key: \"addNamespaces\",\n    value: function addNamespaces(ns) {\n      if (this.options.ns.indexOf(ns) < 0) {\n        this.options.ns.push(ns);\n      }\n    }\n  }, {\n    key: \"removeNamespaces\",\n    value: function removeNamespaces(ns) {\n      var index = this.options.ns.indexOf(ns);\n\n      if (index > -1) {\n        this.options.ns.splice(index, 1);\n      }\n    }\n  }, {\n    key: \"getResource\",\n    value: function getResource(lng, ns, key) {\n      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n      var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n      var path = [lng, ns];\n      if (key && typeof key !== 'string') path = path.concat(key);\n      if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n      if (lng.indexOf('.') > -1) {\n        path = lng.split('.');\n      }\n\n      var result = getPath(this.data, path);\n      if (result || !ignoreJSONStructure || typeof key !== 'string') return result;\n      return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);\n    }\n  }, {\n    key: \"addResource\",\n    value: function addResource(lng, ns, key, value) {\n      var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n        silent: false\n      };\n      var keySeparator = this.options.keySeparator;\n      if (keySeparator === undefined) keySeparator = '.';\n      var path = [lng, ns];\n      if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n      if (lng.indexOf('.') > -1) {\n        path = lng.split('.');\n        value = ns;\n        ns = path[1];\n      }\n\n      this.addNamespaces(ns);\n      setPath(this.data, path, value);\n      if (!options.silent) this.emit('added', lng, ns, key, value);\n    }\n  }, {\n    key: \"addResources\",\n    value: function addResources(lng, ns, resources) {\n      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n        silent: false\n      };\n\n      for (var m in resources) {\n        if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {\n          silent: true\n        });\n      }\n\n      if (!options.silent) this.emit('added', lng, ns, resources);\n    }\n  }, {\n    key: \"addResourceBundle\",\n    value: function addResourceBundle(lng, ns, resources, deep, overwrite) {\n      var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n        silent: false\n      };\n      var path = [lng, ns];\n\n      if (lng.indexOf('.') > -1) {\n        path = lng.split('.');\n        deep = resources;\n        resources = ns;\n        ns = path[1];\n      }\n\n      this.addNamespaces(ns);\n      var pack = getPath(this.data, path) || {};\n\n      if (deep) {\n        deepExtend(pack, resources, overwrite);\n      } else {\n        pack = _objectSpread({}, pack, resources);\n      }\n\n      setPath(this.data, path, pack);\n      if (!options.silent) this.emit('added', lng, ns, resources);\n    }\n  }, {\n    key: \"removeResourceBundle\",\n    value: function removeResourceBundle(lng, ns) {\n      if (this.hasResourceBundle(lng, ns)) {\n        delete this.data[lng][ns];\n      }\n\n      this.removeNamespaces(ns);\n      this.emit('removed', lng, ns);\n    }\n  }, {\n    key: \"hasResourceBundle\",\n    value: function hasResourceBundle(lng, ns) {\n      return this.getResource(lng, ns) !== undefined;\n    }\n  }, {\n    key: \"getResourceBundle\",\n    value: function getResourceBundle(lng, ns) {\n      if (!ns) ns = this.options.defaultNS;\n      if (this.options.compatibilityAPI === 'v1') return _objectSpread({}, {}, this.getResource(lng, ns));\n      return this.getResource(lng, ns);\n    }\n  }, {\n    key: \"getDataByLanguage\",\n    value: function getDataByLanguage(lng) {\n      return this.data[lng];\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return this.data;\n    }\n  }]);\n\n  return ResourceStore;\n}(i18next_EventEmitter);\n\nvar postProcessor = {\n  processors: {},\n  addPostProcessor: function addPostProcessor(module) {\n    this.processors[module.name] = module;\n  },\n  handle: function handle(processors, value, key, options, translator) {\n    var _this = this;\n\n    processors.forEach(function (processor) {\n      if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);\n    });\n    return value;\n  }\n};\n\nvar checkedLoadedFor = {};\n\nvar i18next_Translator = function (_EventEmitter) {\n  _inherits(Translator, _EventEmitter);\n\n  function Translator(services) {\n    var _this;\n\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Translator);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));\n\n    if (isIE10) {\n      i18next_EventEmitter.call(_assertThisInitialized(_this));\n    }\n\n    i18next_copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));\n    _this.options = options;\n\n    if (_this.options.keySeparator === undefined) {\n      _this.options.keySeparator = '.';\n    }\n\n    _this.logger = baseLogger.create('translator');\n    return _this;\n  }\n\n  _createClass(Translator, [{\n    key: \"changeLanguage\",\n    value: function changeLanguage(lng) {\n      if (lng) this.language = lng;\n    }\n  }, {\n    key: \"exists\",\n    value: function exists(key) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n        interpolation: {}\n      };\n\n      if (key === undefined || key === null) {\n        return false;\n      }\n\n      var resolved = this.resolve(key, options);\n      return resolved && resolved.res !== undefined;\n    }\n  }, {\n    key: \"extractFromKey\",\n    value: function extractFromKey(key, options) {\n      var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;\n      if (nsSeparator === undefined) nsSeparator = ':';\n      var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n      var namespaces = options.ns || this.options.defaultNS;\n\n      if (nsSeparator && key.indexOf(nsSeparator) > -1) {\n        var m = key.match(this.interpolator.nestingRegexp);\n\n        if (m && m.length > 0) {\n          return {\n            key: key,\n            namespaces: namespaces\n          };\n        }\n\n        var parts = key.split(nsSeparator);\n        if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n        key = parts.join(keySeparator);\n      }\n\n      if (typeof namespaces === 'string') namespaces = [namespaces];\n      return {\n        key: key,\n        namespaces: namespaces\n      };\n    }\n  }, {\n    key: \"translate\",\n    value: function translate(keys, options, lastKey) {\n      var _this2 = this;\n\n      if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {\n        options = this.options.overloadTranslationOptionHandler(arguments);\n      }\n\n      if (!options) options = {};\n      if (keys === undefined || keys === null) return '';\n      if (!Array.isArray(keys)) keys = [String(keys)];\n      var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n      var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),\n          key = _this$extractFromKey.key,\n          namespaces = _this$extractFromKey.namespaces;\n\n      var namespace = namespaces[namespaces.length - 1];\n      var lng = options.lng || this.language;\n      var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n\n      if (lng && lng.toLowerCase() === 'cimode') {\n        if (appendNamespaceToCIMode) {\n          var nsSeparator = options.nsSeparator || this.options.nsSeparator;\n          return namespace + nsSeparator + key;\n        }\n\n        return key;\n      }\n\n      var resolved = this.resolve(keys, options);\n      var res = resolved && resolved.res;\n      var resUsedKey = resolved && resolved.usedKey || key;\n      var resExactUsedKey = resolved && resolved.exactUsedKey || key;\n      var resType = Object.prototype.toString.apply(res);\n      var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n      var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n      var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n      var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';\n\n      if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {\n        if (!options.returnObjects && !this.options.returnObjects) {\n          if (!this.options.returnedObjectHandler) {\n            this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n          }\n\n          return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread({}, options, {\n            ns: namespaces\n          })) : \"key '\".concat(key, \" (\").concat(this.language, \")' returned an object instead of string.\");\n        }\n\n        if (keySeparator) {\n          var resTypeIsArray = resType === '[object Array]';\n          var copy = resTypeIsArray ? [] : {};\n          var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n\n          for (var m in res) {\n            if (Object.prototype.hasOwnProperty.call(res, m)) {\n              var deepKey = \"\".concat(newKeyToUse).concat(keySeparator).concat(m);\n              copy[m] = this.translate(deepKey, _objectSpread({}, options, {\n                joinArrays: false,\n                ns: namespaces\n              }));\n              if (copy[m] === deepKey) copy[m] = res[m];\n            }\n          }\n\n          res = copy;\n        }\n      } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {\n        res = res.join(joinArrays);\n        if (res) res = this.extendTranslation(res, keys, options, lastKey);\n      } else {\n        var usedDefault = false;\n        var usedKey = false;\n        var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n        var hasDefaultValue = Translator.hasDefaultValue(options);\n        var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count) : '';\n        var defaultValue = options[\"defaultValue\".concat(defaultValueSuffix)] || options.defaultValue;\n\n        if (!this.isValidLookup(res) && hasDefaultValue) {\n          usedDefault = true;\n          res = defaultValue;\n        }\n\n        if (!this.isValidLookup(res)) {\n          usedKey = true;\n          res = key;\n        }\n\n        var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n        var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n        var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n\n        if (usedKey || usedDefault || updateMissing) {\n          this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n\n          if (keySeparator) {\n            var fk = this.resolve(key, _objectSpread({}, options, {\n              keySeparator: false\n            }));\n            if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n          }\n\n          var lngs = [];\n          var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n\n          if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n            for (var i = 0; i < fallbackLngs.length; i++) {\n              lngs.push(fallbackLngs[i]);\n            }\n          } else if (this.options.saveMissingTo === 'all') {\n            lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n          } else {\n            lngs.push(options.lng || this.language);\n          }\n\n          var send = function send(l, k, fallbackValue) {\n            if (_this2.options.missingKeyHandler) {\n              _this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);\n            } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {\n              _this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);\n            }\n\n            _this2.emit('missingKey', l, namespace, k, res);\n          };\n\n          if (this.options.saveMissing) {\n            if (this.options.saveMissingPlurals && needsPluralHandling) {\n              lngs.forEach(function (language) {\n                _this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {\n                  send([language], key + suffix, options[\"defaultValue\".concat(suffix)] || defaultValue);\n                });\n              });\n            } else {\n              send(lngs, key, defaultValue);\n            }\n          }\n        }\n\n        res = this.extendTranslation(res, keys, options, resolved, lastKey);\n        if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = \"\".concat(namespace, \":\").concat(key);\n        if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);\n      }\n\n      return res;\n    }\n  }, {\n    key: \"extendTranslation\",\n    value: function extendTranslation(res, key, options, resolved, lastKey) {\n      var _this3 = this;\n\n      if (this.i18nFormat && this.i18nFormat.parse) {\n        res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n          resolved: resolved\n        });\n      } else if (!options.skipInterpolation) {\n        if (options.interpolation) this.interpolator.init(_objectSpread({}, options, {\n          interpolation: _objectSpread({}, this.options.interpolation, options.interpolation)\n        }));\n        var skipOnVariables = options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n        var nestBef;\n\n        if (skipOnVariables) {\n          var nb = res.match(this.interpolator.nestingRegexp);\n          nestBef = nb && nb.length;\n        }\n\n        var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;\n        if (this.options.interpolation.defaultVariables) data = _objectSpread({}, this.options.interpolation.defaultVariables, data);\n        res = this.interpolator.interpolate(res, data, options.lng || this.language, options);\n\n        if (skipOnVariables) {\n          var na = res.match(this.interpolator.nestingRegexp);\n          var nestAft = na && na.length;\n          if (nestBef < nestAft) options.nest = false;\n        }\n\n        if (options.nest !== false) res = this.interpolator.nest(res, function () {\n          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n            args[_key] = arguments[_key];\n          }\n\n          if (lastKey && lastKey[0] === args[0] && !options.context) {\n            _this3.logger.warn(\"It seems you are nesting recursively key: \".concat(args[0], \" in key: \").concat(key[0]));\n\n            return null;\n          }\n\n          return _this3.translate.apply(_this3, args.concat([key]));\n        }, options);\n        if (options.interpolation) this.interpolator.reset();\n      }\n\n      var postProcess = options.postProcess || this.options.postProcess;\n      var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;\n\n      if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {\n        res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread({\n          i18nResolved: resolved\n        }, options) : options, this);\n      }\n\n      return res;\n    }\n  }, {\n    key: \"resolve\",\n    value: function resolve(keys) {\n      var _this4 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var found;\n      var usedKey;\n      var exactUsedKey;\n      var usedLng;\n      var usedNS;\n      if (typeof keys === 'string') keys = [keys];\n      keys.forEach(function (k) {\n        if (_this4.isValidLookup(found)) return;\n\n        var extracted = _this4.extractFromKey(k, options);\n\n        var key = extracted.key;\n        usedKey = key;\n        var namespaces = extracted.namespaces;\n        if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);\n        var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n        var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';\n        var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);\n        namespaces.forEach(function (ns) {\n          if (_this4.isValidLookup(found)) return;\n          usedNS = ns;\n\n          if (!checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {\n            checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] = true;\n\n            _this4.logger.warn(\"key \\\"\".concat(usedKey, \"\\\" for languages \\\"\").concat(codes.join(', '), \"\\\" won't get resolved as namespace \\\"\").concat(usedNS, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n          }\n\n          codes.forEach(function (code) {\n            if (_this4.isValidLookup(found)) return;\n            usedLng = code;\n            var finalKey = key;\n            var finalKeys = [finalKey];\n\n            if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {\n              _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n            } else {\n              var pluralSuffix;\n              if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);\n              if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);\n              if (needsContextHandling) finalKeys.push(finalKey += \"\".concat(_this4.options.contextSeparator).concat(options.context));\n              if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);\n            }\n\n            var possibleKey;\n\n            while (possibleKey = finalKeys.pop()) {\n              if (!_this4.isValidLookup(found)) {\n                exactUsedKey = possibleKey;\n                found = _this4.getResource(code, ns, possibleKey, options);\n              }\n            }\n          });\n        });\n      });\n      return {\n        res: found,\n        usedKey: usedKey,\n        exactUsedKey: exactUsedKey,\n        usedLng: usedLng,\n        usedNS: usedNS\n      };\n    }\n  }, {\n    key: \"isValidLookup\",\n    value: function isValidLookup(res) {\n      return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n    }\n  }, {\n    key: \"getResource\",\n    value: function getResource(code, ns, key) {\n      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n      return this.resourceStore.getResource(code, ns, key, options);\n    }\n  }], [{\n    key: \"hasDefaultValue\",\n    value: function hasDefaultValue(options) {\n      var prefix = 'defaultValue';\n\n      for (var option in options) {\n        if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n          return true;\n        }\n      }\n\n      return false;\n    }\n  }]);\n\n  return Translator;\n}(i18next_EventEmitter);\n\nfunction capitalize(string) {\n  return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar i18next_LanguageUtil = function () {\n  function LanguageUtil(options) {\n    _classCallCheck(this, LanguageUtil);\n\n    this.options = options;\n    this.whitelist = this.options.supportedLngs || false;\n    this.supportedLngs = this.options.supportedLngs || false;\n    this.logger = baseLogger.create('languageUtils');\n  }\n\n  _createClass(LanguageUtil, [{\n    key: \"getScriptPartFromCode\",\n    value: function getScriptPartFromCode(code) {\n      if (!code || code.indexOf('-') < 0) return null;\n      var p = code.split('-');\n      if (p.length === 2) return null;\n      p.pop();\n      if (p[p.length - 1].toLowerCase() === 'x') return null;\n      return this.formatLanguageCode(p.join('-'));\n    }\n  }, {\n    key: \"getLanguagePartFromCode\",\n    value: function getLanguagePartFromCode(code) {\n      if (!code || code.indexOf('-') < 0) return code;\n      var p = code.split('-');\n      return this.formatLanguageCode(p[0]);\n    }\n  }, {\n    key: \"formatLanguageCode\",\n    value: function formatLanguageCode(code) {\n      if (typeof code === 'string' && code.indexOf('-') > -1) {\n        var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];\n        var p = code.split('-');\n\n        if (this.options.lowerCaseLng) {\n          p = p.map(function (part) {\n            return part.toLowerCase();\n          });\n        } else if (p.length === 2) {\n          p[0] = p[0].toLowerCase();\n          p[1] = p[1].toUpperCase();\n          if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n        } else if (p.length === 3) {\n          p[0] = p[0].toLowerCase();\n          if (p[1].length === 2) p[1] = p[1].toUpperCase();\n          if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();\n          if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n          if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());\n        }\n\n        return p.join('-');\n      }\n\n      return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n    }\n  }, {\n    key: \"isWhitelisted\",\n    value: function isWhitelisted(code) {\n      this.logger.deprecate('languageUtils.isWhitelisted', 'function \"isWhitelisted\" will be renamed to \"isSupportedCode\" in the next major - please make sure to rename it\\'s usage asap.');\n      return this.isSupportedCode(code);\n    }\n  }, {\n    key: \"isSupportedCode\",\n    value: function isSupportedCode(code) {\n      if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n        code = this.getLanguagePartFromCode(code);\n      }\n\n      return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n    }\n  }, {\n    key: \"getBestMatchFromCodes\",\n    value: function getBestMatchFromCodes(codes) {\n      var _this = this;\n\n      if (!codes) return null;\n      var found;\n      codes.forEach(function (code) {\n        if (found) return;\n\n        var cleanedLng = _this.formatLanguageCode(code);\n\n        if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;\n      });\n\n      if (!found && this.options.supportedLngs) {\n        codes.forEach(function (code) {\n          if (found) return;\n\n          var lngOnly = _this.getLanguagePartFromCode(code);\n\n          if (_this.isSupportedCode(lngOnly)) return found = lngOnly;\n          found = _this.options.supportedLngs.find(function (supportedLng) {\n            if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;\n          });\n        });\n      }\n\n      if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n      return found;\n    }\n  }, {\n    key: \"getFallbackCodes\",\n    value: function getFallbackCodes(fallbacks, code) {\n      if (!fallbacks) return [];\n      if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n      if (typeof fallbacks === 'string') fallbacks = [fallbacks];\n      if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;\n      if (!code) return fallbacks[\"default\"] || [];\n      var found = fallbacks[code];\n      if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n      if (!found) found = fallbacks[this.formatLanguageCode(code)];\n      if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n      if (!found) found = fallbacks[\"default\"];\n      return found || [];\n    }\n  }, {\n    key: \"toResolveHierarchy\",\n    value: function toResolveHierarchy(code, fallbackCode) {\n      var _this2 = this;\n\n      var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n      var codes = [];\n\n      var addCode = function addCode(c) {\n        if (!c) return;\n\n        if (_this2.isSupportedCode(c)) {\n          codes.push(c);\n        } else {\n          _this2.logger.warn(\"rejecting language code not found in supportedLngs: \".concat(c));\n        }\n      };\n\n      if (typeof code === 'string' && code.indexOf('-') > -1) {\n        if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n        if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n        if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n      } else if (typeof code === 'string') {\n        addCode(this.formatLanguageCode(code));\n      }\n\n      fallbackCodes.forEach(function (fc) {\n        if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));\n      });\n      return codes;\n    }\n  }]);\n\n  return LanguageUtil;\n}();\n\nvar sets = [{\n  lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],\n  nr: [1, 2],\n  fc: 1\n}, {\n  lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],\n  nr: [1, 2],\n  fc: 2\n}, {\n  lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],\n  nr: [1],\n  fc: 3\n}, {\n  lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],\n  nr: [1, 2, 5],\n  fc: 4\n}, {\n  lngs: ['ar'],\n  nr: [0, 1, 2, 3, 11, 100],\n  fc: 5\n}, {\n  lngs: ['cs', 'sk'],\n  nr: [1, 2, 5],\n  fc: 6\n}, {\n  lngs: ['csb', 'pl'],\n  nr: [1, 2, 5],\n  fc: 7\n}, {\n  lngs: ['cy'],\n  nr: [1, 2, 3, 8],\n  fc: 8\n}, {\n  lngs: ['fr'],\n  nr: [1, 2],\n  fc: 9\n}, {\n  lngs: ['ga'],\n  nr: [1, 2, 3, 7, 11],\n  fc: 10\n}, {\n  lngs: ['gd'],\n  nr: [1, 2, 3, 20],\n  fc: 11\n}, {\n  lngs: ['is'],\n  nr: [1, 2],\n  fc: 12\n}, {\n  lngs: ['jv'],\n  nr: [0, 1],\n  fc: 13\n}, {\n  lngs: ['kw'],\n  nr: [1, 2, 3, 4],\n  fc: 14\n}, {\n  lngs: ['lt'],\n  nr: [1, 2, 10],\n  fc: 15\n}, {\n  lngs: ['lv'],\n  nr: [1, 2, 0],\n  fc: 16\n}, {\n  lngs: ['mk'],\n  nr: [1, 2],\n  fc: 17\n}, {\n  lngs: ['mnk'],\n  nr: [0, 1, 2],\n  fc: 18\n}, {\n  lngs: ['mt'],\n  nr: [1, 2, 11, 20],\n  fc: 19\n}, {\n  lngs: ['or'],\n  nr: [2, 1],\n  fc: 2\n}, {\n  lngs: ['ro'],\n  nr: [1, 2, 20],\n  fc: 20\n}, {\n  lngs: ['sl'],\n  nr: [5, 1, 2, 3],\n  fc: 21\n}, {\n  lngs: ['he', 'iw'],\n  nr: [1, 2, 20, 21],\n  fc: 22\n}];\nvar _rulesPluralsTypes = {\n  1: function _(n) {\n    return Number(n > 1);\n  },\n  2: function _(n) {\n    return Number(n != 1);\n  },\n  3: function _(n) {\n    return 0;\n  },\n  4: function _(n) {\n    return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n  },\n  5: function _(n) {\n    return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);\n  },\n  6: function _(n) {\n    return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);\n  },\n  7: function _(n) {\n    return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n  },\n  8: function _(n) {\n    return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);\n  },\n  9: function _(n) {\n    return Number(n >= 2);\n  },\n  10: function _(n) {\n    return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);\n  },\n  11: function _(n) {\n    return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);\n  },\n  12: function _(n) {\n    return Number(n % 10 != 1 || n % 100 == 11);\n  },\n  13: function _(n) {\n    return Number(n !== 0);\n  },\n  14: function _(n) {\n    return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);\n  },\n  15: function _(n) {\n    return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n  },\n  16: function _(n) {\n    return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);\n  },\n  17: function _(n) {\n    return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);\n  },\n  18: function _(n) {\n    return Number(n == 0 ? 0 : n == 1 ? 1 : 2);\n  },\n  19: function _(n) {\n    return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);\n  },\n  20: function _(n) {\n    return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);\n  },\n  21: function _(n) {\n    return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);\n  },\n  22: function _(n) {\n    return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);\n  }\n};\n\nfunction createRules() {\n  var rules = {};\n  sets.forEach(function (set) {\n    set.lngs.forEach(function (l) {\n      rules[l] = {\n        numbers: set.nr,\n        plurals: _rulesPluralsTypes[set.fc]\n      };\n    });\n  });\n  return rules;\n}\n\nvar i18next_PluralResolver = function () {\n  function PluralResolver(languageUtils) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, PluralResolver);\n\n    this.languageUtils = languageUtils;\n    this.options = options;\n    this.logger = baseLogger.create('pluralResolver');\n    this.rules = createRules();\n  }\n\n  _createClass(PluralResolver, [{\n    key: \"addRule\",\n    value: function addRule(lng, obj) {\n      this.rules[lng] = obj;\n    }\n  }, {\n    key: \"getRule\",\n    value: function getRule(code) {\n      return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];\n    }\n  }, {\n    key: \"needsPlural\",\n    value: function needsPlural(code) {\n      var rule = this.getRule(code);\n      return rule && rule.numbers.length > 1;\n    }\n  }, {\n    key: \"getPluralFormsOfKey\",\n    value: function getPluralFormsOfKey(code, key) {\n      return this.getSuffixes(code).map(function (suffix) {\n        return key + suffix;\n      });\n    }\n  }, {\n    key: \"getSuffixes\",\n    value: function getSuffixes(code) {\n      var _this = this;\n\n      var rule = this.getRule(code);\n\n      if (!rule) {\n        return [];\n      }\n\n      return rule.numbers.map(function (number) {\n        return _this.getSuffix(code, number);\n      });\n    }\n  }, {\n    key: \"getSuffix\",\n    value: function getSuffix(code, count) {\n      var _this2 = this;\n\n      var rule = this.getRule(code);\n\n      if (rule) {\n        var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));\n        var suffix = rule.numbers[idx];\n\n        if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n          if (suffix === 2) {\n            suffix = 'plural';\n          } else if (suffix === 1) {\n            suffix = '';\n          }\n        }\n\n        var returnSuffix = function returnSuffix() {\n          return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();\n        };\n\n        if (this.options.compatibilityJSON === 'v1') {\n          if (suffix === 1) return '';\n          if (typeof suffix === 'number') return \"_plural_\".concat(suffix.toString());\n          return returnSuffix();\n        } else if (this.options.compatibilityJSON === 'v2') {\n          return returnSuffix();\n        } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n          return returnSuffix();\n        }\n\n        return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();\n      }\n\n      this.logger.warn(\"no plural rule found for: \".concat(code));\n      return '';\n    }\n  }]);\n\n  return PluralResolver;\n}();\n\nvar i18next_Interpolator = function () {\n  function Interpolator() {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    _classCallCheck(this, Interpolator);\n\n    this.logger = baseLogger.create('interpolator');\n    this.options = options;\n\n    this.format = options.interpolation && options.interpolation.format || function (value) {\n      return value;\n    };\n\n    this.init(options);\n  }\n\n  _createClass(Interpolator, [{\n    key: \"init\",\n    value: function init() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      if (!options.interpolation) options.interpolation = {\n        escapeValue: true\n      };\n      var iOpts = options.interpolation;\n      this.escape = iOpts.escape !== undefined ? iOpts.escape : i18next_escape;\n      this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;\n      this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;\n      this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';\n      this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';\n      this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n      this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';\n      this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';\n      this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');\n      this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');\n      this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';\n      this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;\n      this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;\n      this.resetRegExp();\n    }\n  }, {\n    key: \"reset\",\n    value: function reset() {\n      if (this.options) this.init(this.options);\n    }\n  }, {\n    key: \"resetRegExp\",\n    value: function resetRegExp() {\n      var regexpStr = \"\".concat(this.prefix, \"(.+?)\").concat(this.suffix);\n      this.regexp = new RegExp(regexpStr, 'g');\n      var regexpUnescapeStr = \"\".concat(this.prefix).concat(this.unescapePrefix, \"(.+?)\").concat(this.unescapeSuffix).concat(this.suffix);\n      this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');\n      var nestingRegexpStr = \"\".concat(this.nestingPrefix, \"(.+?)\").concat(this.nestingSuffix);\n      this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');\n    }\n  }, {\n    key: \"interpolate\",\n    value: function interpolate(str, data, lng, options) {\n      var _this = this;\n\n      var match;\n      var value;\n      var replaces;\n      var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n\n      function regexSafe(val) {\n        return val.replace(/\\$/g, '$$$$');\n      }\n\n      var handleFormat = function handleFormat(key) {\n        if (key.indexOf(_this.formatSeparator) < 0) {\n          var path = getPathWithDefaults(data, defaultData, key);\n          return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread({}, options, data, {\n            interpolationkey: key\n          })) : path;\n        }\n\n        var p = key.split(_this.formatSeparator);\n        var k = p.shift().trim();\n        var f = p.join(_this.formatSeparator).trim();\n        return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread({}, options, data, {\n          interpolationkey: k\n        }));\n      };\n\n      this.resetRegExp();\n      var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;\n      var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n      var todos = [{\n        regex: this.regexpUnescape,\n        safeValue: function safeValue(val) {\n          return regexSafe(val);\n        }\n      }, {\n        regex: this.regexp,\n        safeValue: function safeValue(val) {\n          return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);\n        }\n      }];\n      todos.forEach(function (todo) {\n        replaces = 0;\n\n        while (match = todo.regex.exec(str)) {\n          value = handleFormat(match[1].trim());\n\n          if (value === undefined) {\n            if (typeof missingInterpolationHandler === 'function') {\n              var temp = missingInterpolationHandler(str, match, options);\n              value = typeof temp === 'string' ? temp : '';\n            } else if (skipOnVariables) {\n              value = match[0];\n              continue;\n            } else {\n              _this.logger.warn(\"missed to pass in variable \".concat(match[1], \" for interpolating \").concat(str));\n\n              value = '';\n            }\n          } else if (typeof value !== 'string' && !_this.useRawValueToEscape) {\n            value = makeString(value);\n          }\n\n          var safeValue = todo.safeValue(value);\n          str = str.replace(match[0], safeValue);\n\n          if (skipOnVariables) {\n            todo.regex.lastIndex += safeValue.length;\n            todo.regex.lastIndex -= match[0].length;\n          } else {\n            todo.regex.lastIndex = 0;\n          }\n\n          replaces++;\n\n          if (replaces >= _this.maxReplaces) {\n            break;\n          }\n        }\n      });\n      return str;\n    }\n  }, {\n    key: \"nest\",\n    value: function nest(str, fc) {\n      var _this2 = this;\n\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var match;\n      var value;\n\n      var clonedOptions = _objectSpread({}, options);\n\n      clonedOptions.applyPostProcessor = false;\n      delete clonedOptions.defaultValue;\n\n      function handleHasOptions(key, inheritedOptions) {\n        var sep = this.nestingOptionsSeparator;\n        if (key.indexOf(sep) < 0) return key;\n        var c = key.split(new RegExp(\"\".concat(sep, \"[ ]*{\")));\n        var optionsString = \"{\".concat(c[1]);\n        key = c[0];\n        optionsString = this.interpolate(optionsString, clonedOptions);\n        optionsString = optionsString.replace(/'/g, '\"');\n\n        try {\n          clonedOptions = JSON.parse(optionsString);\n          if (inheritedOptions) clonedOptions = _objectSpread({}, inheritedOptions, clonedOptions);\n        } catch (e) {\n          this.logger.warn(\"failed parsing options string in nesting for key \".concat(key), e);\n          return \"\".concat(key).concat(sep).concat(optionsString);\n        }\n\n        delete clonedOptions.defaultValue;\n        return key;\n      }\n\n      while (match = this.nestingRegexp.exec(str)) {\n        var formatters = [];\n        var doReduce = false;\n\n        if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {\n          var r = match[1].split(this.formatSeparator).map(function (elem) {\n            return elem.trim();\n          });\n          match[1] = r.shift();\n          formatters = r;\n          doReduce = true;\n        }\n\n        value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n        if (value && match[0] === str && typeof value !== 'string') return value;\n        if (typeof value !== 'string') value = makeString(value);\n\n        if (!value) {\n          this.logger.warn(\"missed to resolve \".concat(match[1], \" for nesting \").concat(str));\n          value = '';\n        }\n\n        if (doReduce) {\n          value = formatters.reduce(function (v, f) {\n            return _this2.format(v, f, options.lng, _objectSpread({}, options, {\n              interpolationkey: match[1].trim()\n            }));\n          }, value.trim());\n        }\n\n        str = str.replace(match[0], value);\n        this.regexp.lastIndex = 0;\n      }\n\n      return str;\n    }\n  }]);\n\n  return Interpolator;\n}();\n\nfunction remove(arr, what) {\n  var found = arr.indexOf(what);\n\n  while (found !== -1) {\n    arr.splice(found, 1);\n    found = arr.indexOf(what);\n  }\n}\n\nvar i18next_Connector = function (_EventEmitter) {\n  _inherits(Connector, _EventEmitter);\n\n  function Connector(backend, store, services) {\n    var _this;\n\n    var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n    _classCallCheck(this, Connector);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));\n\n    if (isIE10) {\n      i18next_EventEmitter.call(_assertThisInitialized(_this));\n    }\n\n    _this.backend = backend;\n    _this.store = store;\n    _this.services = services;\n    _this.languageUtils = services.languageUtils;\n    _this.options = options;\n    _this.logger = baseLogger.create('backendConnector');\n    _this.state = {};\n    _this.queue = [];\n\n    if (_this.backend && _this.backend.init) {\n      _this.backend.init(services, options.backend, options);\n    }\n\n    return _this;\n  }\n\n  _createClass(Connector, [{\n    key: \"queueLoad\",\n    value: function queueLoad(languages, namespaces, options, callback) {\n      var _this2 = this;\n\n      var toLoad = [];\n      var pending = [];\n      var toLoadLanguages = [];\n      var toLoadNamespaces = [];\n      languages.forEach(function (lng) {\n        var hasAllNamespaces = true;\n        namespaces.forEach(function (ns) {\n          var name = \"\".concat(lng, \"|\").concat(ns);\n\n          if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {\n            _this2.state[name] = 2;\n          } else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {\n            if (pending.indexOf(name) < 0) pending.push(name);\n          } else {\n            _this2.state[name] = 1;\n            hasAllNamespaces = false;\n            if (pending.indexOf(name) < 0) pending.push(name);\n            if (toLoad.indexOf(name) < 0) toLoad.push(name);\n            if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);\n          }\n        });\n        if (!hasAllNamespaces) toLoadLanguages.push(lng);\n      });\n\n      if (toLoad.length || pending.length) {\n        this.queue.push({\n          pending: pending,\n          loaded: {},\n          errors: [],\n          callback: callback\n        });\n      }\n\n      return {\n        toLoad: toLoad,\n        pending: pending,\n        toLoadLanguages: toLoadLanguages,\n        toLoadNamespaces: toLoadNamespaces\n      };\n    }\n  }, {\n    key: \"loaded\",\n    value: function loaded(name, err, data) {\n      var s = name.split('|');\n      var lng = s[0];\n      var ns = s[1];\n      if (err) this.emit('failedLoading', lng, ns, err);\n\n      if (data) {\n        this.store.addResourceBundle(lng, ns, data);\n      }\n\n      this.state[name] = err ? -1 : 2;\n      var loaded = {};\n      this.queue.forEach(function (q) {\n        pushPath(q.loaded, [lng], ns);\n        remove(q.pending, name);\n        if (err) q.errors.push(err);\n\n        if (q.pending.length === 0 && !q.done) {\n          Object.keys(q.loaded).forEach(function (l) {\n            if (!loaded[l]) loaded[l] = [];\n\n            if (q.loaded[l].length) {\n              q.loaded[l].forEach(function (ns) {\n                if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);\n              });\n            }\n          });\n          q.done = true;\n\n          if (q.errors.length) {\n            q.callback(q.errors);\n          } else {\n            q.callback();\n          }\n        }\n      });\n      this.emit('loaded', loaded);\n      this.queue = this.queue.filter(function (q) {\n        return !q.done;\n      });\n    }\n  }, {\n    key: \"read\",\n    value: function read(lng, ns, fcName) {\n      var _this3 = this;\n\n      var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n      var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;\n      var callback = arguments.length > 5 ? arguments[5] : undefined;\n      if (!lng.length) return callback(null, {});\n      return this.backend[fcName](lng, ns, function (err, data) {\n        if (err && data && tried < 5) {\n          setTimeout(function () {\n            _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);\n          }, wait);\n          return;\n        }\n\n        callback(err, data);\n      });\n    }\n  }, {\n    key: \"prepareLoading\",\n    value: function prepareLoading(languages, namespaces) {\n      var _this4 = this;\n\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var callback = arguments.length > 3 ? arguments[3] : undefined;\n\n      if (!this.backend) {\n        this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n        return callback && callback();\n      }\n\n      if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);\n      if (typeof namespaces === 'string') namespaces = [namespaces];\n      var toLoad = this.queueLoad(languages, namespaces, options, callback);\n\n      if (!toLoad.toLoad.length) {\n        if (!toLoad.pending.length) callback();\n        return null;\n      }\n\n      toLoad.toLoad.forEach(function (name) {\n        _this4.loadOne(name);\n      });\n    }\n  }, {\n    key: \"load\",\n    value: function load(languages, namespaces, callback) {\n      this.prepareLoading(languages, namespaces, {}, callback);\n    }\n  }, {\n    key: \"reload\",\n    value: function reload(languages, namespaces, callback) {\n      this.prepareLoading(languages, namespaces, {\n        reload: true\n      }, callback);\n    }\n  }, {\n    key: \"loadOne\",\n    value: function loadOne(name) {\n      var _this5 = this;\n\n      var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      var s = name.split('|');\n      var lng = s[0];\n      var ns = s[1];\n      this.read(lng, ns, 'read', undefined, undefined, function (err, data) {\n        if (err) _this5.logger.warn(\"\".concat(prefix, \"loading namespace \").concat(ns, \" for language \").concat(lng, \" failed\"), err);\n        if (!err && data) _this5.logger.log(\"\".concat(prefix, \"loaded namespace \").concat(ns, \" for language \").concat(lng), data);\n\n        _this5.loaded(name, err, data);\n      });\n    }\n  }, {\n    key: \"saveMissing\",\n    value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n      var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n\n      if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {\n        this.logger.warn(\"did not save key \\\"\".concat(key, \"\\\" as the namespace \\\"\").concat(namespace, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n        return;\n      }\n\n      if (key === undefined || key === null || key === '') return;\n\n      if (this.backend && this.backend.create) {\n        this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread({}, options, {\n          isUpdate: isUpdate\n        }));\n      }\n\n      if (!languages || !languages[0]) return;\n      this.store.addResource(languages[0], namespace, key, fallbackValue);\n    }\n  }]);\n\n  return Connector;\n}(i18next_EventEmitter);\n\nfunction get() {\n  return {\n    debug: false,\n    initImmediate: true,\n    ns: ['translation'],\n    defaultNS: ['translation'],\n    fallbackLng: ['dev'],\n    fallbackNS: false,\n    whitelist: false,\n    nonExplicitWhitelist: false,\n    supportedLngs: false,\n    nonExplicitSupportedLngs: false,\n    load: 'all',\n    preload: false,\n    simplifyPluralSuffix: true,\n    keySeparator: '.',\n    nsSeparator: ':',\n    pluralSeparator: '_',\n    contextSeparator: '_',\n    partialBundledLanguages: false,\n    saveMissing: false,\n    updateMissing: false,\n    saveMissingTo: 'fallback',\n    saveMissingPlurals: true,\n    missingKeyHandler: false,\n    missingInterpolationHandler: false,\n    postProcess: false,\n    postProcessPassResolved: false,\n    returnNull: true,\n    returnEmptyString: true,\n    returnObjects: false,\n    joinArrays: false,\n    returnedObjectHandler: false,\n    parseMissingKeyHandler: false,\n    appendNamespaceToMissingKey: false,\n    appendNamespaceToCIMode: false,\n    overloadTranslationOptionHandler: function handle(args) {\n      var ret = {};\n      if (_typeof(args[1]) === 'object') ret = args[1];\n      if (typeof args[1] === 'string') ret.defaultValue = args[1];\n      if (typeof args[2] === 'string') ret.tDescription = args[2];\n\n      if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {\n        var options = args[3] || args[2];\n        Object.keys(options).forEach(function (key) {\n          ret[key] = options[key];\n        });\n      }\n\n      return ret;\n    },\n    interpolation: {\n      escapeValue: true,\n      format: function format(value, _format, lng, options) {\n        return value;\n      },\n      prefix: '{{',\n      suffix: '}}',\n      formatSeparator: ',',\n      unescapePrefix: '-',\n      nestingPrefix: '$t(',\n      nestingSuffix: ')',\n      nestingOptionsSeparator: ',',\n      maxReplaces: 1000,\n      skipOnVariables: false\n    }\n  };\n}\nfunction transformOptions(options) {\n  if (typeof options.ns === 'string') options.ns = [options.ns];\n  if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];\n  if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];\n\n  if (options.whitelist) {\n    if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {\n      options.whitelist = options.whitelist.concat(['cimode']);\n    }\n\n    options.supportedLngs = options.whitelist;\n  }\n\n  if (options.nonExplicitWhitelist) {\n    options.nonExplicitSupportedLngs = options.nonExplicitWhitelist;\n  }\n\n  if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {\n    options.supportedLngs = options.supportedLngs.concat(['cimode']);\n  }\n\n  return options;\n}\n\nfunction noop() {}\n\nvar i18next_I18n = function (_EventEmitter) {\n  _inherits(I18n, _EventEmitter);\n\n  function I18n() {\n    var _this;\n\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n    _classCallCheck(this, I18n);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));\n\n    if (isIE10) {\n      i18next_EventEmitter.call(_assertThisInitialized(_this));\n    }\n\n    _this.options = transformOptions(options);\n    _this.services = {};\n    _this.logger = baseLogger;\n    _this.modules = {\n      external: []\n    };\n\n    if (callback && !_this.isInitialized && !options.isClone) {\n      if (!_this.options.initImmediate) {\n        _this.init(options, callback);\n\n        return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n      }\n\n      setTimeout(function () {\n        _this.init(options, callback);\n      }, 0);\n    }\n\n    return _this;\n  }\n\n  _createClass(I18n, [{\n    key: \"init\",\n    value: function init() {\n      var _this2 = this;\n\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n      if (typeof options === 'function') {\n        callback = options;\n        options = {};\n      }\n\n      if (options.whitelist && !options.supportedLngs) {\n        this.logger.deprecate('whitelist', 'option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap.');\n      }\n\n      if (options.nonExplicitWhitelist && !options.nonExplicitSupportedLngs) {\n        this.logger.deprecate('whitelist', 'options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap.');\n      }\n\n      this.options = _objectSpread({}, get(), this.options, transformOptions(options));\n      this.format = this.options.interpolation.format;\n      if (!callback) callback = noop;\n\n      function createClassOnDemand(ClassOrObject) {\n        if (!ClassOrObject) return null;\n        if (typeof ClassOrObject === 'function') return new ClassOrObject();\n        return ClassOrObject;\n      }\n\n      if (!this.options.isClone) {\n        if (this.modules.logger) {\n          baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n        } else {\n          baseLogger.init(null, this.options);\n        }\n\n        var lu = new i18next_LanguageUtil(this.options);\n        this.store = new i18next_ResourceStore(this.options.resources, this.options);\n        var s = this.services;\n        s.logger = baseLogger;\n        s.resourceStore = this.store;\n        s.languageUtils = lu;\n        s.pluralResolver = new i18next_PluralResolver(lu, {\n          prepend: this.options.pluralSeparator,\n          compatibilityJSON: this.options.compatibilityJSON,\n          simplifyPluralSuffix: this.options.simplifyPluralSuffix\n        });\n        s.interpolator = new i18next_Interpolator(this.options);\n        s.utils = {\n          hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n        };\n        s.backendConnector = new i18next_Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n        s.backendConnector.on('*', function (event) {\n          for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n            args[_key - 1] = arguments[_key];\n          }\n\n          _this2.emit.apply(_this2, [event].concat(args));\n        });\n\n        if (this.modules.languageDetector) {\n          s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n          s.languageDetector.init(s, this.options.detection, this.options);\n        }\n\n        if (this.modules.i18nFormat) {\n          s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n          if (s.i18nFormat.init) s.i18nFormat.init(this);\n        }\n\n        this.translator = new i18next_Translator(this.services, this.options);\n        this.translator.on('*', function (event) {\n          for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n            args[_key2 - 1] = arguments[_key2];\n          }\n\n          _this2.emit.apply(_this2, [event].concat(args));\n        });\n        this.modules.external.forEach(function (m) {\n          if (m.init) m.init(_this2);\n        });\n      }\n\n      if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n        var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n        if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n      }\n\n      if (!this.services.languageDetector && !this.options.lng) {\n        this.logger.warn('init: no languageDetector is used and no lng is defined');\n      }\n\n      var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n      storeApi.forEach(function (fcName) {\n        _this2[fcName] = function () {\n          var _this2$store;\n\n          return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);\n        };\n      });\n      var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n      storeApiChained.forEach(function (fcName) {\n        _this2[fcName] = function () {\n          var _this2$store2;\n\n          (_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);\n\n          return _this2;\n        };\n      });\n      var deferred = defer();\n\n      var load = function load() {\n        var finish = function finish(err, t) {\n          if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');\n          _this2.isInitialized = true;\n          if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);\n\n          _this2.emit('initialized', _this2.options);\n\n          deferred.resolve(t);\n          callback(err, t);\n        };\n\n        if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));\n\n        _this2.changeLanguage(_this2.options.lng, finish);\n      };\n\n      if (this.options.resources || !this.options.initImmediate) {\n        load();\n      } else {\n        setTimeout(load, 0);\n      }\n\n      return deferred;\n    }\n  }, {\n    key: \"loadResources\",\n    value: function loadResources(language) {\n      var _this3 = this;\n\n      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n      var usedCallback = callback;\n      var usedLng = typeof language === 'string' ? language : this.language;\n      if (typeof language === 'function') usedCallback = language;\n\n      if (!this.options.resources || this.options.partialBundledLanguages) {\n        if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();\n        var toLoad = [];\n\n        var append = function append(lng) {\n          if (!lng) return;\n\n          var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);\n\n          lngs.forEach(function (l) {\n            if (toLoad.indexOf(l) < 0) toLoad.push(l);\n          });\n        };\n\n        if (!usedLng) {\n          var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n          fallbacks.forEach(function (l) {\n            return append(l);\n          });\n        } else {\n          append(usedLng);\n        }\n\n        if (this.options.preload) {\n          this.options.preload.forEach(function (l) {\n            return append(l);\n          });\n        }\n\n        this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);\n      } else {\n        usedCallback(null);\n      }\n    }\n  }, {\n    key: \"reloadResources\",\n    value: function reloadResources(lngs, ns, callback) {\n      var deferred = defer();\n      if (!lngs) lngs = this.languages;\n      if (!ns) ns = this.options.ns;\n      if (!callback) callback = noop;\n      this.services.backendConnector.reload(lngs, ns, function (err) {\n        deferred.resolve();\n        callback(err);\n      });\n      return deferred;\n    }\n  }, {\n    key: \"use\",\n    value: function use(module) {\n      if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n      if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n\n      if (module.type === 'backend') {\n        this.modules.backend = module;\n      }\n\n      if (module.type === 'logger' || module.log && module.warn && module.error) {\n        this.modules.logger = module;\n      }\n\n      if (module.type === 'languageDetector') {\n        this.modules.languageDetector = module;\n      }\n\n      if (module.type === 'i18nFormat') {\n        this.modules.i18nFormat = module;\n      }\n\n      if (module.type === 'postProcessor') {\n        postProcessor.addPostProcessor(module);\n      }\n\n      if (module.type === '3rdParty') {\n        this.modules.external.push(module);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"changeLanguage\",\n    value: function changeLanguage(lng, callback) {\n      var _this4 = this;\n\n      this.isLanguageChangingTo = lng;\n      var deferred = defer();\n      this.emit('languageChanging', lng);\n\n      var done = function done(err, l) {\n        if (l) {\n          _this4.language = l;\n          _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n\n          _this4.translator.changeLanguage(l);\n\n          _this4.isLanguageChangingTo = undefined;\n\n          _this4.emit('languageChanged', l);\n\n          _this4.logger.log('languageChanged', l);\n        } else {\n          _this4.isLanguageChangingTo = undefined;\n        }\n\n        deferred.resolve(function () {\n          return _this4.t.apply(_this4, arguments);\n        });\n        if (callback) callback(err, function () {\n          return _this4.t.apply(_this4, arguments);\n        });\n      };\n\n      var setLng = function setLng(lngs) {\n        if (!lng && !lngs && _this4.services.languageDetector) lngs = [];\n        var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);\n\n        if (l) {\n          if (!_this4.language) {\n            _this4.language = l;\n            _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n          }\n\n          if (!_this4.translator.language) _this4.translator.changeLanguage(l);\n          if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);\n        }\n\n        _this4.loadResources(l, function (err) {\n          done(err, l);\n        });\n      };\n\n      if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n        setLng(this.services.languageDetector.detect());\n      } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n        this.services.languageDetector.detect(setLng);\n      } else {\n        setLng(lng);\n      }\n\n      return deferred;\n    }\n  }, {\n    key: \"getFixedT\",\n    value: function getFixedT(lng, ns, keyPrefix) {\n      var _this5 = this;\n\n      var fixedT = function fixedT(key, opts) {\n        var options;\n\n        if (_typeof(opts) !== 'object') {\n          for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n            rest[_key3 - 2] = arguments[_key3];\n          }\n\n          options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n        } else {\n          options = _objectSpread({}, opts);\n        }\n\n        options.lng = options.lng || fixedT.lng;\n        options.lngs = options.lngs || fixedT.lngs;\n        options.ns = options.ns || fixedT.ns;\n        var keySeparator = _this5.options.keySeparator || '.';\n        var resultKey = keyPrefix ? \"\".concat(keyPrefix).concat(keySeparator).concat(key) : key;\n        return _this5.t(resultKey, options);\n      };\n\n      if (typeof lng === 'string') {\n        fixedT.lng = lng;\n      } else {\n        fixedT.lngs = lng;\n      }\n\n      fixedT.ns = ns;\n      fixedT.keyPrefix = keyPrefix;\n      return fixedT;\n    }\n  }, {\n    key: \"t\",\n    value: function t() {\n      var _this$translator;\n\n      return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);\n    }\n  }, {\n    key: \"exists\",\n    value: function exists() {\n      var _this$translator2;\n\n      return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);\n    }\n  }, {\n    key: \"setDefaultNamespace\",\n    value: function setDefaultNamespace(ns) {\n      this.options.defaultNS = ns;\n    }\n  }, {\n    key: \"hasLoadedNamespace\",\n    value: function hasLoadedNamespace(ns) {\n      var _this6 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      if (!this.isInitialized) {\n        this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n        return false;\n      }\n\n      if (!this.languages || !this.languages.length) {\n        this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n        return false;\n      }\n\n      var lng = this.languages[0];\n      var fallbackLng = this.options ? this.options.fallbackLng : false;\n      var lastLng = this.languages[this.languages.length - 1];\n      if (lng.toLowerCase() === 'cimode') return true;\n\n      var loadNotPending = function loadNotPending(l, n) {\n        var loadState = _this6.services.backendConnector.state[\"\".concat(l, \"|\").concat(n)];\n\n        return loadState === -1 || loadState === 2;\n      };\n\n      if (options.precheck) {\n        var preResult = options.precheck(this, loadNotPending);\n        if (preResult !== undefined) return preResult;\n      }\n\n      if (this.hasResourceBundle(lng, ns)) return true;\n      if (!this.services.backendConnector.backend) return true;\n      if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n      return false;\n    }\n  }, {\n    key: \"loadNamespaces\",\n    value: function loadNamespaces(ns, callback) {\n      var _this7 = this;\n\n      var deferred = defer();\n\n      if (!this.options.ns) {\n        callback && callback();\n        return Promise.resolve();\n      }\n\n      if (typeof ns === 'string') ns = [ns];\n      ns.forEach(function (n) {\n        if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);\n      });\n      this.loadResources(function (err) {\n        deferred.resolve();\n        if (callback) callback(err);\n      });\n      return deferred;\n    }\n  }, {\n    key: \"loadLanguages\",\n    value: function loadLanguages(lngs, callback) {\n      var deferred = defer();\n      if (typeof lngs === 'string') lngs = [lngs];\n      var preloaded = this.options.preload || [];\n      var newLngs = lngs.filter(function (lng) {\n        return preloaded.indexOf(lng) < 0;\n      });\n\n      if (!newLngs.length) {\n        if (callback) callback();\n        return Promise.resolve();\n      }\n\n      this.options.preload = preloaded.concat(newLngs);\n      this.loadResources(function (err) {\n        deferred.resolve();\n        if (callback) callback(err);\n      });\n      return deferred;\n    }\n  }, {\n    key: \"dir\",\n    value: function dir(lng) {\n      if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;\n      if (!lng) return 'rtl';\n      var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];\n      return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';\n    }\n  }, {\n    key: \"createInstance\",\n    value: function createInstance() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var callback = arguments.length > 1 ? arguments[1] : undefined;\n      return new I18n(options, callback);\n    }\n  }, {\n    key: \"cloneInstance\",\n    value: function cloneInstance() {\n      var _this8 = this;\n\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n\n      var mergedOptions = _objectSpread({}, this.options, options, {\n        isClone: true\n      });\n\n      var clone = new I18n(mergedOptions);\n      var membersToCopy = ['store', 'services', 'language'];\n      membersToCopy.forEach(function (m) {\n        clone[m] = _this8[m];\n      });\n      clone.services = _objectSpread({}, this.services);\n      clone.services.utils = {\n        hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n      };\n      clone.translator = new i18next_Translator(clone.services, clone.options);\n      clone.translator.on('*', function (event) {\n        for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n          args[_key4 - 1] = arguments[_key4];\n        }\n\n        clone.emit.apply(clone, [event].concat(args));\n      });\n      clone.init(mergedOptions, callback);\n      clone.translator.options = clone.options;\n      clone.translator.backendConnector.services.utils = {\n        hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n      };\n      return clone;\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return {\n        options: this.options,\n        store: this.store,\n        language: this.language,\n        languages: this.languages\n      };\n    }\n  }]);\n\n  return I18n;\n}(i18next_EventEmitter);\n\nvar i18next = new i18next_I18n();\n\n/* harmony default export */ var esm_i18next = (i18next);\n\n// CONCATENATED MODULE: ./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js\n\n\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nfunction defaults(obj) {\n  each.call(slice.call(arguments, 1), function (source) {\n    if (source) {\n      for (var prop in source) {\n        if (obj[prop] === undefined) obj[prop] = source[prop];\n      }\n    }\n  });\n  return obj;\n}\n\n// eslint-disable-next-line no-control-regex\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nvar serializeCookie = function serializeCookie(name, val, options) {\n  var opt = options || {};\n  opt.path = opt.path || '/';\n  var value = encodeURIComponent(val);\n  var str = name + '=' + value;\n\n  if (opt.maxAge > 0) {\n    var maxAge = opt.maxAge - 0;\n    if (isNaN(maxAge)) throw new Error('maxAge should be a Number');\n    str += '; Max-Age=' + Math.floor(maxAge);\n  }\n\n  if (opt.domain) {\n    if (!fieldContentRegExp.test(opt.domain)) {\n      throw new TypeError('option domain is invalid');\n    }\n\n    str += '; Domain=' + opt.domain;\n  }\n\n  if (opt.path) {\n    if (!fieldContentRegExp.test(opt.path)) {\n      throw new TypeError('option path is invalid');\n    }\n\n    str += '; Path=' + opt.path;\n  }\n\n  if (opt.expires) {\n    if (typeof opt.expires.toUTCString !== 'function') {\n      throw new TypeError('option expires is invalid');\n    }\n\n    str += '; Expires=' + opt.expires.toUTCString();\n  }\n\n  if (opt.httpOnly) str += '; HttpOnly';\n  if (opt.secure) str += '; Secure';\n\n  if (opt.sameSite) {\n    var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n    switch (sameSite) {\n      case true:\n        str += '; SameSite=Strict';\n        break;\n\n      case 'lax':\n        str += '; SameSite=Lax';\n        break;\n\n      case 'strict':\n        str += '; SameSite=Strict';\n        break;\n\n      case 'none':\n        str += '; SameSite=None';\n        break;\n\n      default:\n        throw new TypeError('option sameSite is invalid');\n    }\n  }\n\n  return str;\n};\n\nvar cookie = {\n  create: function create(name, value, minutes, domain) {\n    var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n      path: '/',\n      sameSite: 'strict'\n    };\n\n    if (minutes) {\n      cookieOptions.expires = new Date();\n      cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n    }\n\n    if (domain) cookieOptions.domain = domain;\n    document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);\n  },\n  read: function read(name) {\n    var nameEQ = name + '=';\n    var ca = document.cookie.split(';');\n\n    for (var i = 0; i < ca.length; i++) {\n      var c = ca[i];\n\n      while (c.charAt(0) === ' ') {\n        c = c.substring(1, c.length);\n      }\n\n      if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n    }\n\n    return null;\n  },\n  remove: function remove(name) {\n    this.create(name, '', -1);\n  }\n};\nvar cookie$1 = {\n  name: 'cookie',\n  lookup: function lookup(options) {\n    var found;\n\n    if (options.lookupCookie && typeof document !== 'undefined') {\n      var c = cookie.read(options.lookupCookie);\n      if (c) found = c;\n    }\n\n    return found;\n  },\n  cacheUserLanguage: function cacheUserLanguage(lng, options) {\n    if (options.lookupCookie && typeof document !== 'undefined') {\n      cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);\n    }\n  }\n};\n\nvar querystring = {\n  name: 'querystring',\n  lookup: function lookup(options) {\n    var found;\n\n    if (typeof window !== 'undefined') {\n      var search = window.location.search;\n\n      if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {\n        search = window.location.hash.substring(window.location.hash.indexOf('?'));\n      }\n\n      var query = search.substring(1);\n      var params = query.split('&');\n\n      for (var i = 0; i < params.length; i++) {\n        var pos = params[i].indexOf('=');\n\n        if (pos > 0) {\n          var key = params[i].substring(0, pos);\n\n          if (key === options.lookupQuerystring) {\n            found = params[i].substring(pos + 1);\n          }\n        }\n      }\n    }\n\n    return found;\n  }\n};\n\nvar hasLocalStorageSupport = null;\n\nvar localStorageAvailable = function localStorageAvailable() {\n  if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n\n  try {\n    hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;\n    var testKey = 'i18next.translate.boo';\n    window.localStorage.setItem(testKey, 'foo');\n    window.localStorage.removeItem(testKey);\n  } catch (e) {\n    hasLocalStorageSupport = false;\n  }\n\n  return hasLocalStorageSupport;\n};\n\nvar i18nextBrowserLanguageDetector_localStorage = {\n  name: 'localStorage',\n  lookup: function lookup(options) {\n    var found;\n\n    if (options.lookupLocalStorage && localStorageAvailable()) {\n      var lng = window.localStorage.getItem(options.lookupLocalStorage);\n      if (lng) found = lng;\n    }\n\n    return found;\n  },\n  cacheUserLanguage: function cacheUserLanguage(lng, options) {\n    if (options.lookupLocalStorage && localStorageAvailable()) {\n      window.localStorage.setItem(options.lookupLocalStorage, lng);\n    }\n  }\n};\n\nvar hasSessionStorageSupport = null;\n\nvar sessionStorageAvailable = function sessionStorageAvailable() {\n  if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n\n  try {\n    hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;\n    var testKey = 'i18next.translate.boo';\n    window.sessionStorage.setItem(testKey, 'foo');\n    window.sessionStorage.removeItem(testKey);\n  } catch (e) {\n    hasSessionStorageSupport = false;\n  }\n\n  return hasSessionStorageSupport;\n};\n\nvar sessionStorage = {\n  name: 'sessionStorage',\n  lookup: function lookup(options) {\n    var found;\n\n    if (options.lookupSessionStorage && sessionStorageAvailable()) {\n      var lng = window.sessionStorage.getItem(options.lookupSessionStorage);\n      if (lng) found = lng;\n    }\n\n    return found;\n  },\n  cacheUserLanguage: function cacheUserLanguage(lng, options) {\n    if (options.lookupSessionStorage && sessionStorageAvailable()) {\n      window.sessionStorage.setItem(options.lookupSessionStorage, lng);\n    }\n  }\n};\n\nvar navigator$1 = {\n  name: 'navigator',\n  lookup: function lookup(options) {\n    var found = [];\n\n    if (typeof navigator !== 'undefined') {\n      if (navigator.languages) {\n        // chrome only; not an array, so can't use .push.apply instead of iterating\n        for (var i = 0; i < navigator.languages.length; i++) {\n          found.push(navigator.languages[i]);\n        }\n      }\n\n      if (navigator.userLanguage) {\n        found.push(navigator.userLanguage);\n      }\n\n      if (navigator.language) {\n        found.push(navigator.language);\n      }\n    }\n\n    return found.length > 0 ? found : undefined;\n  }\n};\n\nvar htmlTag = {\n  name: 'htmlTag',\n  lookup: function lookup(options) {\n    var found;\n    var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n\n    if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n      found = htmlTag.getAttribute('lang');\n    }\n\n    return found;\n  }\n};\n\nvar i18nextBrowserLanguageDetector_path = {\n  name: 'path',\n  lookup: function lookup(options) {\n    var found;\n\n    if (typeof window !== 'undefined') {\n      var language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n\n      if (language instanceof Array) {\n        if (typeof options.lookupFromPathIndex === 'number') {\n          if (typeof language[options.lookupFromPathIndex] !== 'string') {\n            return undefined;\n          }\n\n          found = language[options.lookupFromPathIndex].replace('/', '');\n        } else {\n          found = language[0].replace('/', '');\n        }\n      }\n    }\n\n    return found;\n  }\n};\n\nvar subdomain = {\n  name: 'subdomain',\n  lookup: function lookup(options) {\n    var found;\n\n    if (typeof window !== 'undefined') {\n      var language = window.location.href.match(/(?:http[s]*\\:\\/\\/)*(.*?)\\.(?=[^\\/]*\\..{2,5})/gi);\n\n      if (language instanceof Array) {\n        if (typeof options.lookupFromSubdomainIndex === 'number') {\n          found = language[options.lookupFromSubdomainIndex].replace('http://', '').replace('https://', '').replace('.', '');\n        } else {\n          found = language[0].replace('http://', '').replace('https://', '').replace('.', '');\n        }\n      }\n    }\n\n    return found;\n  }\n};\n\nfunction getDefaults() {\n  return {\n    order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],\n    lookupQuerystring: 'lng',\n    lookupCookie: 'i18next',\n    lookupLocalStorage: 'i18nextLng',\n    lookupSessionStorage: 'i18nextLng',\n    // cache user language\n    caches: ['localStorage'],\n    excludeCacheFor: ['cimode'] //cookieMinutes: 10,\n    //cookieDomain: 'myDomain'\n\n  };\n}\n\nvar i18nextBrowserLanguageDetector_Browser = /*#__PURE__*/function () {\n  function Browser(services) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Browser);\n\n    this.type = 'languageDetector';\n    this.detectors = {};\n    this.init(services, options);\n  }\n\n  _createClass(Browser, [{\n    key: \"init\",\n    value: function init(services) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      this.services = services;\n      this.options = defaults(options, this.options || {}, getDefaults()); // backwards compatibility\n\n      if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n      this.i18nOptions = i18nOptions;\n      this.addDetector(cookie$1);\n      this.addDetector(querystring);\n      this.addDetector(i18nextBrowserLanguageDetector_localStorage);\n      this.addDetector(sessionStorage);\n      this.addDetector(navigator$1);\n      this.addDetector(htmlTag);\n      this.addDetector(i18nextBrowserLanguageDetector_path);\n      this.addDetector(subdomain);\n    }\n  }, {\n    key: \"addDetector\",\n    value: function addDetector(detector) {\n      this.detectors[detector.name] = detector;\n    }\n  }, {\n    key: \"detect\",\n    value: function detect(detectionOrder) {\n      var _this = this;\n\n      if (!detectionOrder) detectionOrder = this.options.order;\n      var detected = [];\n      detectionOrder.forEach(function (detectorName) {\n        if (_this.detectors[detectorName]) {\n          var lookup = _this.detectors[detectorName].lookup(_this.options);\n\n          if (lookup && typeof lookup === 'string') lookup = [lookup];\n          if (lookup) detected = detected.concat(lookup);\n        }\n      });\n      if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n\n      return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n    }\n  }, {\n    key: \"cacheUserLanguage\",\n    value: function cacheUserLanguage(lng, caches) {\n      var _this2 = this;\n\n      if (!caches) caches = this.options.caches;\n      if (!caches) return;\n      if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n      caches.forEach(function (cacheName) {\n        if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);\n      });\n    }\n  }]);\n\n  return Browser;\n}();\n\ni18nextBrowserLanguageDetector_Browser.type = 'languageDetector';\n\n\n\n// CONCATENATED MODULE: ./src/core/custom_plugins/translation/translation.js\n\n\n\nfunction translation_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction translation_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? translation_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : translation_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\nvar translation_Translation = /*#__PURE__*/createClass_default()(function Translation(app, params) {\n  classCallCheck_default()(this, Translation);\n  var translation = this;\n  this.app = app;\n\n  // const Globalize = require(\"globalize\");\n\n  translation.app = app;\n  var extendedParams = utils[\"default\"].extend({\n    on: {}\n  }, app.params.translation, params);\n  translation.params = extendedParams;\n  translation.i18n = esm_i18next;\n  translation.i18n.use(i18nextBrowserLanguageDetector_Browser).init({\n    detection: {\n      order: [\"localStorage\", \"navigator\"],\n      lookupLocalStorage: \"bookLang\",\n      caches: []\n    },\n    fallbackLng: \"en\",\n    ns: [\"base\"],\n    defaultNS: \"base\",\n    debug: false,\n    supportedLngs: [\"cs\", \"en\"],\n    whitelist: [\"cs\", \"en\"],\n    resources: {\n      cs: {\n        base: translation_objectSpread({}, translation.params.lang.cs)\n      },\n      en: {\n        base: translation_objectSpread({}, translation.params.lang.en)\n      }\n    }\n  }).then(function (res) {\n    console.info(\"[Translation] Translation was loaded\");\n    translation.params.language = translation.i18n.language;\n  });\n\n  //nabindování nejpoužívanějších funkcí i18n do rootu Translation komponenty\n  translation.changeLanguage = function (lang) {\n    localStorage.setItem(\"bookLang\", lang);\n    if (translation.params.books && translation.params.books[lang] && translation.params.books[lang] != \"\") {\n      window.location = translation.params.books[lang];\n    } else {\n      location.reload();\n    }\n  };\n  translation.t = function (key) {\n    return translation.i18n.t(key);\n  };\n  translation.addResourceBundle = function (language, namespace, bundle) {\n    return translation.i18n.addResourceBundle(language, namespace, bundle);\n  };\n});\n/* harmony default export */ var translation_translation = __webpack_exports__[\"default\"] = ({\n  name: \"translation\",\n  params: {\n    translation: {\n      // books: {\n      //   en: \"link\",\n      // },\n      books: {},\n      data: null,\n      language: \"cs\",\n      lang: {\n        cs: {\n          back: \"Zpět\",\n          forwar: \"Vpřed\",\n          cancel: \"Zrušit\",\n          apply: \"Použít\",\n          yes: \"Ano\",\n          no: \"ne\",\n          and: \"a\",\n          user: \"Uživatel\",\n          notFound: \"Nenalezeno\",\n          send: \"Odeslat\",\n          more: \"více\",\n          settings: \"Nastavení\",\n          save: \"Uložit\",\n          selectAction: \"Zvolit akci\",\n          select: \"Vybrat\",\n          ok: \"Ok\",\n          warning: \"Upozornění!\",\n          language: \"Jazyk\",\n          edit: \"Upravit\",\n          delete: \"Smazat\"\n        },\n        en: {\n          back: \"Back\",\n          forwar: \"Forward\",\n          cancel: \"Cancel\",\n          apply: \"Apply\",\n          yes: \"Yes\",\n          no: \"No\",\n          and: \"and\",\n          user: \"User\",\n          notFound: \"Not found\",\n          send: \"Send\",\n          more: \"more\",\n          settings: \"Settings\",\n          save: \"Save\",\n          selectAction: \"Select action\",\n          select: \"Select\",\n          ok: \"Ok\",\n          warning: \"Warning!\",\n          language: \"Language\",\n          edit: \"Edit\",\n          delete: \"Delete\"\n        }\n      }\n    }\n  },\n  static: {\n    Translation: translation_Translation\n  },\n  create: function create(params) {\n    var app = this;\n    app.translation = new translation_Translation(app, params);\n  }\n});\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/translation/translation.js_+_12_modules?");

/***/ }),

/***/ "./src/core/custom_plugins/video-player/sublime-skin.less":
/*!****************************************************************!*\
  !*** ./src/core/custom_plugins/video-player/sublime-skin.less ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/video-player/sublime-skin.less?");

/***/ }),

/***/ "./src/core/custom_plugins/video-player/video-player.js":
/*!**************************************************************!*\
  !*** ./src/core/custom_plugins/video-player/video-player.js ***!
  \**************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var framework7_v575_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! framework7-v575/utils/utils */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! video.js */ \"./node_modules/video.js/dist/video.es.js\");\n/* harmony import */ var videojs_hls_quality_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! videojs-hls-quality-selector */ \"./node_modules/videojs-hls-quality-selector/dist/videojs-hls-quality-selector.es.js\");\n/* harmony import */ var videojs_contrib_quality_levels__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! videojs-contrib-quality-levels */ \"./node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\");\n/* harmony import */ var _video_player_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./video-player.less */ \"./src/core/custom_plugins/video-player/video-player.less\");\n/* harmony import */ var _video_player_less__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_video_player_less__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _sublime_skin_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sublime-skin.less */ \"./src/core/custom_plugins/video-player/sublime-skin.less\");\n/* harmony import */ var _sublime_skin_less__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_sublime_skin_less__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\nvar VideoPlayer = /*#__PURE__*/function () {\n  function VideoPlayer(app) {\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, VideoPlayer);\n    this.app = app;\n    var videoPlayer = this;\n    videoPlayer.app = app;\n    return videoPlayer;\n  }\n  return _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(VideoPlayer, [{\n    key: \"createVideoPlayer\",\n    value: function createVideoPlayer($videoWrapper) {\n      var videoPlayer = this;\n      var active = $videoWrapper.find(\"div.vjs-controls-enabled\");\n      var id = videoPlayer.app.utils.id(\"xxxxxxxx\");\n      var src = $videoWrapper.attr(\"data-src\");\n      var poster = $videoWrapper.attr(\"data-poster\");\n      id = \"p-\" + id;\n      var target = id;\n      var video = \"<video key=\\\"vp1\\\" id=\\\"\".concat(id, \"\\\" class=\\\"video-js vjs-sublime-skin\\\" controls poster=\\\"\").concat(poster, \"\\\">\\n          <source key=\\\"vp2\\\"\\n            src=\\\"\").concat(src, \"\\\"\\n            type=\\\"application/x-mpegURL\\\">\\n          </video>\");\n      if (active.length) {\n        var oldId = active.attr(\"id\");\n        Object(video_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(oldId).dispose();\n      }\n      $videoWrapper.empty();\n      $(video).appendTo($videoWrapper);\n\n      // videojs(target, {}, function () {\n      if (video_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getPlayers()[target]) {\n        delete video_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getPlayers()[target];\n      }\n      // debugger\n      // let keys = Object.keys(videojs.players);\n      // if (!keys.includes(target)) {\n      var player = Object(video_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(target, {\n        preload: \"none\",\n        html5: {\n          hls: {\n            overrideNative: true\n          }\n        }\n      });\n      player.hlsQualitySelector({\n        displayCurrentQuality: false\n      });\n      player.source = {\n        poster: poster\n      };\n      // }\n      // });\n    }\n  }]);\n}();\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  name: \"VideoPlayer\",\n  params: {},\n  create: function create(params) {\n    var app = this;\n    app.on(\"init\", function () {\n      app.videoPlayer = new VideoPlayer(app, params);\n      app.data.myEvents.on(\"page:show\", function (page) {\n        // debugger\n        // let container = page.find(\"video\");\n        // if (container.length > 0) {\n        //   app.videoPlayer.createVideoPlayer();\n        // }\n      });\n    });\n  },\n  on: {},\n  clicks: {}\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/video-player/video-player.js?");

/***/ }),

/***/ "./src/core/custom_plugins/video-player/video-player.less":
/*!****************************************************************!*\
  !*** ./src/core/custom_plugins/video-player/video-player.less ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/core/custom_plugins/video-player/video-player.less?");

/***/ }),

/***/ "./src/core/utils-extend/utils-extend-2.js":
/*!*************************************************!*\
  !*** ./src/core/utils-extend/utils-extend-2.js ***!
  \*************************************************/
/*! exports provided: initUtils2 */
/*! ModuleConcatenation bailout: Module uses injected variables ($) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initUtils2\", function() { return initUtils2; });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! framework7-v575/utils/utils.js */ \"./node_modules/framework7-v575/utils/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _custom_plugins_highlights_comments_rangy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../custom_plugins/highlights-comments/rangy */ \"./src/core/custom_plugins/highlights-comments/rangy.js\");\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/**\r\n * Author: Softresource\r\n * Date: 11.07.2019\r\n */\n\n\n\n\n\nfunction initUtils2(app) {\n  //Path like path.to.object\n  //object where to make resolve\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"resolve\"] = function (path) {\n    var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : self;\n    var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \".\";\n    var properties = Array.isArray(path) ? path : path.split(separator);\n    return properties.reduce(function (prev, curr) {\n      return prev && prev[curr];\n    }, obj);\n  };\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"extender\"] = function (container, append) {\n    return function () {\n      var proxied = container;\n      return function () {\n        var result = proxied.apply(this, arguments);\n        result = append(result);\n        return result;\n      };\n    }();\n  };\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"rangy\"] = _custom_plugins_highlights_comments_rangy__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n  window.nodes = {};\n  var gn = 0;\n\n  //https://javascript.info/selection-range\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"gsn2\"] = function getTextNodesBetween() {\n    gn++;\n    var selection = window.getSelection();\n    var range = selection.getRangeAt(0),\n      rootNode = range.commonAncestorContainer,\n      startNode = range.startContainer,\n      endNode = range.endContainer,\n      startOffset = range.startOffset,\n      endOffset = range.endOffset,\n      pastStartNode = false,\n      reachedEndNode = false,\n      textNodes = [];\n    function findParentSelectable(node) {\n      var bool = false;\n      if (node.classList) {\n        bool = node.classList.contains(\"selectable\");\n      }\n      if (bool) {\n        return {\n          node: node,\n          id: node.dataset.c\n        };\n      } else {\n        return findParentSelectable(node.parentElement);\n      }\n    }\n    function findParentComponentNode(node) {\n      var bool = false;\n      if (node.classList) {\n        bool = node.classList.contains(\"bm-top\");\n      }\n      if (bool) {\n        return node;\n      } else {\n        return findParentComponentNode(node.parentElement);\n      }\n    }\n    function fp(node, pn) {\n      var defaultOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n      if (pn.childNodes.length) {\n        for (var i = 0, len = pn.childNodes.length; !reachedEndNode && i < len; ++i) {\n          if (pn.childNodes[i].length) {\n            return fp(node, pn.childNodes[i], defaultOffset);\n            break;\n          }\n          if (pn.childNodes[i] != node) {\n            var val = pn.childNodes[i].nodeValue;\n            if (val) defaultOffset = defaultOffset + val.length;\n          } else {\n            var _val = pn.childNodes[i].nodeValue;\n            if (_val) defaultOffset = defaultOffset + _val.length;\n            return defaultOffset;\n            break;\n          }\n          return defaultOffset;\n        }\n      } else {\n        if (pn != node) {\n          var _val2 = pn.nodeValue;\n          if (_val2) defaultOffset = defaultOffset + _val2.length;\n          return defaultOffset;\n        } else {\n          return 0;\n        }\n      }\n    }\n    function pushNode(type, node, val) {\n      var startOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n      var endOffset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var nodes = window.nodes;\n      var parentComponentNode = findParentComponentNode(node);\n      var id = parentComponentNode.id;\n      var defaultOffset = 0;\n      var sel = findParentSelectable(node);\n      if (type === \"2\") {\n        var pn = sel.node;\n        defaultOffset = fp(node, pn);\n        if (defaultOffset) {\n          startOffset = defaultOffset + startOffset;\n        }\n      }\n      if (!nodes[gn]) {\n        nodes[gn] = {};\n      }\n      if (!nodes[gn][id]) {\n        nodes[gn][id] = {};\n      }\n      if (!nodes[gn][id][sel.id]) {\n        nodes[gn][id][sel.id] = {\n          so: startOffset,\n          eo: endOffset,\n          l: 0,\n          v: \"\",\n          t: type\n        };\n      }\n      nodes[gn][id][sel.id].l = nodes[gn][id][sel.id].l + val.length;\n      nodes[gn][id][sel.id].v = nodes[gn][id][sel.id].v + val;\n    }\n    function getTextNodes(node) {\n      var bool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      //debugger\n      var val = node.nodeValue;\n\n      //bool = true;\n\n      if (node == startNode && node == endNode) {\n        if (val && bool) {\n          textNodes.push(val.substring(startOffset, endOffset));\n          val = val.substring(startOffset, endOffset);\n          pushNode(\"1\", node, val, startOffset, endOffset);\n        }\n        pastStartNode = reachedEndNode = true;\n      } else if (node == startNode) {\n        if (val && bool) {\n          textNodes.push(val.substring(startOffset));\n          val = val.substring(startOffset);\n          pushNode(\"2\", node, val, startOffset);\n        }\n        pastStartNode = true;\n      } else if (node == endNode) {\n        if (val && bool) {\n          textNodes.push(val.substring(0, endOffset));\n          val = val.substring(0, endOffset);\n          pushNode(\"3\", node, val, 0, endOffset);\n        }\n        reachedEndNode = true;\n      } else {\n        if (val && bool && pastStartNode && !reachedEndNode && !/^\\s*$/.test(val)) {\n          textNodes.push(val);\n          pushNode(\"4\", node, val);\n        }\n      }\n      for (var i = 0, len = node.childNodes.length; !reachedEndNode && i < len; ++i) {\n        if (!bool && node.classList) {\n          bool = node.classList.contains(\"selectable\");\n        }\n        if (node) getTextNodes(node.childNodes[i], bool);\n      }\n    }\n    var b = false;\n    if (rootNode.parentElement.classList) {\n      b = rootNode.parentElement.classList.contains(\"selectable\");\n      alert(\"ok\");\n    }\n    getTextNodes(rootNode, b);\n    return {\n      textNodes: textNodes,\n      nodes: nodes\n    };\n  };\n\n  // Lazy Range object detection.\n  function isRange(obj) {\n    return \"type\" in obj && obj.type === \"Range\";\n  }\n\n  // Good-enough Range object comparison.\n  function rangeChange(data1, data2) {\n    return data1.type !== data2.type || data1.focusNode !== data2.focusNode || data1.focusOffset !== data2.focusOffset;\n  }\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"gsn\"] = function getSelectedNodes() {\n    // from https://developer.mozilla.org/en-US/docs/Web/API/Selection\n    var selection = window.getSelection();\n    if (selection.isCollapsed) {\n      return [];\n    }\n    var node1 = selection.anchorNode;\n    var node2 = selection.focusNode;\n    var selectionAncestor = get_common_ancestor(node1, node2);\n    if (selectionAncestor == null) {\n      return [];\n    }\n    var finalNodes = [];\n    var nodes = getNodesBetween(selectionAncestor, node1, node2);\n    //return nodes;\n    for (var i = 0; i < nodes.length; i++) {\n      /*let $node = $$(node);\r\n      if($node && $node[0].nodeType !== 3){\r\n        //debugger\r\n        if($node.attr('class') && $node.hasClass('selectable')){\r\n          finalNodes.push($node);\r\n        }else{\r\n          let $nodes = $node.find('.selectable');\r\n          finalNodes.push($nodes);\r\n        }\r\n      }*/\n    }\n    return finalNodes;\n  };\n  function get_common_ancestor(a, b) {\n    // from http://stackoverflow.com/questions/3960843/how-to-find-the-nearest-common-ancestors-of-two-or-more-nodes\n    var $parentsa = $(a).parents();\n    var $parentsb = $(b).parents();\n    var found = null;\n    $parentsa.each(function () {\n      var thisa = this;\n      $parentsb.each(function () {\n        if (thisa == this) {\n          found = this;\n          return false;\n        }\n      });\n      if (found) return false;\n    });\n    return found;\n  }\n  function isDescendant(parent, child) {\n    // from http://stackoverflow.com/questions/2234979/how-to-check-in-javascript-if-one-element-is-a-child-of-another\n    var node = child;\n    while (node != null) {\n      if (node == parent) {\n        return true;\n      }\n      node = node.parentNode;\n    }\n    return false;\n  }\n  function getNodesBetween(rootNode, node1, node2) {\n    var resultNodes = [];\n    var isBetweenNodes = false;\n    for (var i = 0; i < rootNode.childNodes.length; i += 1) {\n      if (isDescendant(rootNode.childNodes[i], node1) || isDescendant(rootNode.childNodes[i], node2)) {\n        if (resultNodes.length == 0) {\n          isBetweenNodes = true;\n        } else {\n          isBetweenNodes = false;\n        }\n        resultNodes.push(rootNode.childNodes[i]);\n      } else if (resultNodes.length == 0) {} else if (isBetweenNodes) {\n        resultNodes.push(rootNode.childNodes[i]);\n      } else {\n        return resultNodes;\n      }\n    }\n    if (resultNodes.length == 0) {\n      return [rootNode];\n    } else if (isDescendant(resultNodes[resultNodes.length - 1], node1) || isDescendant(resultNodes[resultNodes.length - 1], node2)) {\n      return resultNodes;\n    } else {\n      // same child node for both should never happen\n      return [resultNodes[0]];\n    }\n  }\n\n  /* -----------------------------  AXIOS ----------------------------- */\n\n  //timeout je v milisekundách, zde je nastaveno 30 sekund\n  var axios = axios__WEBPACK_IMPORTED_MODULE_4___default.a.create({\n    timeout: 30000\n  });\n  axios.defaults.validateStatus = function (status) {\n    return status <= 400;\n  };\n\n  // LOGOVANI REQUESTU\n  var onRequest = function onRequest(config) {\n    // debugger;\n    var method = config.method.toUpperCase();\n    var url = config.url;\n    var headers = _objectSpread({\n      Authorization: config.headers.Authorization\n    }, config.headers.common);\n    var d = {};\n    if (config.hasOwnProperty(\"data\") && config.data instanceof FormData) {\n      config.data.forEach(function (value, key) {\n        d[key] = value;\n      });\n    } else {\n      d = config.data;\n    }\n    var object = {\n      headers: headers,\n      data: d\n    };\n    console.info(\"[AXIOS REQUEST] \".concat(method, \" \").concat(url, \" [\").concat(JSON.stringify(object), \"]\"));\n    return config;\n  };\n\n  // LOGOVANI REQUEST ERRORU\n  var onRequestError = function onRequestError(error) {\n    // console.error(`[AXIOS REQUEST ERROR] [${JSON.stringify(error)}]`);\n    //TODO ???\n    return Promise.reject(error);\n  };\n\n  // LOGOVANI RESPONSE\n  var onResponse = function onResponse(response) {\n    var method = response.config.method.toUpperCase();\n    var url = response.config.url;\n    var status = response.status;\n    var statusText = response.statusText;\n    var object = {\n      data: response.data\n    };\n    console.info(\"[AXIOS RESPONSE] \".concat(method, \" \").concat(status, \":\").concat(statusText, \" \").concat(url, \" \").concat(JSON.stringify(object)));\n    return response;\n  };\n\n  // HANDLE RESPONSE ERRORU\n  var onResponseError = /*#__PURE__*/function () {\n    var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(error) {\n      var enableLog, repeat, method, url, originalRequest, data, _status, _url;\n      return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n        while (1) switch (_context.prev = _context.next) {\n          case 0:\n            enableLog = true;\n            repeat = false;\n            method = error.config.method.toUpperCase();\n            url = error.config.url;\n            originalRequest = error.config;\n            if (!(error.response != undefined)) {\n              _context.next = 29;\n              break;\n            }\n            data = error.response.data;\n            console.error(\"[AXIOS RESPONSE ERROR] \".concat(method, \" \").concat(_url, \" \").concat(JSON.stringify(data)));\n            _status = error.response.status;\n            _url = error.response.config.url;\n            _context.t0 = _status;\n            _context.next = _context.t0 === 401 ? 13 : _context.t0 === 403 ? 21 : _context.t0 === 500 ? 23 : 25;\n            break;\n          case 13:\n            if (!error.config.url.includes(\"auth/login\")) {\n              _context.next = 18;\n              break;\n            }\n            console.info(\"Incorrect credentials for login\");\n            //nelogovat login attempty\n            enableLog = false;\n            _context.next = 20;\n            break;\n          case 18:\n            _context.next = 20;\n            return app.user.refreshToken().then(function (refresh) {\n              repeat = true;\n            }).catch(function (error) {\n              app.dialog.alert(\"Neplatný přihlašovací token. Prosím obnovte stránku.\", \"Error 401\");\n            });\n          case 20:\n            return _context.abrupt(\"break\", 27);\n          case 21:\n            //Pokud se se předělá na 403 redirect tohle asi nebude potřeba\n            app.dialog.alert(\"Akce se neprovedla, jelikož nejste editorem této knihy.\", \"Nemáte oprávnění editora!\");\n            return _context.abrupt(\"break\", 27);\n          case 23:\n            //Pokud se se předělá na 403 redirect tohle asi nebude potřeba\n            app.dialog.alert(\"Server error!\", \"Server returns 500. Please contact developers.\");\n            return _context.abrupt(\"break\", 27);\n          case 25:\n            if (_url.includes(\"list-version\")) {\n              app.dialog.alert(error.response.data.message, \"Chyba při načítání verzí!\");\n            } else if (_url.includes(\"save\")) {\n              app.dialog.alert(error.response.data.message, \"Chyba s uložením akce!\");\n            }\n            return _context.abrupt(\"break\", 27);\n          case 27:\n            _context.next = 39;\n            break;\n          case 29:\n            if (!(status == \"408\" || error.code === \"ECONNABORTED\")) {\n              _context.next = 38;\n              break;\n            }\n            if (!originalRequest.isRepetition) {\n              _context.next = 34;\n              break;\n            }\n            app.dialog.alert(error.message, \"Spojení se serverem vypršelo!\", function () {});\n            _context.next = 36;\n            break;\n          case 34:\n            originalRequest.isRepetition = true;\n            return _context.abrupt(\"return\", axios(error.config));\n          case 36:\n            _context.next = 39;\n            break;\n          case 38:\n            if (error.hasOwnProperty(\"message\")) {\n              app.dialog.alert(error.message, \"Neznámá chyba!\", function () {});\n            }\n          case 39:\n            //ROLLBAR LOG\n            if (enableLog) {\n              app.errorHandler.throwRollbarEvent(\"error\", \"Axios\", error, \"onResponseError\");\n            }\n            if (!repeat) {\n              _context.next = 43;\n              break;\n            }\n            error.config.headers[\"Authorization\"] = \"Bearer \" + app.user.jwt;\n            return _context.abrupt(\"return\", axios(error.config));\n          case 43:\n            return _context.abrupt(\"return\", Promise.resolve(error.response));\n          case 44:\n          case \"end\":\n            return _context.stop();\n        }\n      }, _callee);\n    }));\n    return function onResponseError(_x) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n\n  //REQUEST INTERSEPTOR\n  axios.interceptors.request.use(onRequest, onRequestError);\n\n  //RESPONSE INTERSEPTOR\n  axios.interceptors.response.use(onResponse, onResponseError);\n  framework7_v575_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"][\"axios\"] = axios;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack://futureBooks/./src/core/utils-extend/utils-extend-2.js?");

/***/ }),

/***/ "./src/vendor/libs_external/plyr/dist/plyr.css":
/*!*****************************************************!*\
  !*** ./src/vendor/libs_external/plyr/dist/plyr.css ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// extracted by mini-css-extract-plugin\n    if(false) { var cssReload; }\n  \n\n//# sourceURL=webpack://futureBooks/./src/vendor/libs_external/plyr/dist/plyr.css?");

/***/ }),

/***/ 0:
/*!********************!*\
  !*** ws (ignored) ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/ws_(ignored)?");

/***/ }),

/***/ 1:
/*!**************************************!*\
  !*** ./terminal-highlight (ignored) ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/./terminal-highlight_(ignored)?");

/***/ }),

/***/ 2:
/*!**********************!*\
  !*** path (ignored) ***!
  \**********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/path_(ignored)?");

/***/ }),

/***/ 3:
/*!*******************************!*\
  !*** source-map-js (ignored) ***!
  \*******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/source-map-js_(ignored)?");

/***/ }),

/***/ 4:
/*!*********************!*\
  !*** url (ignored) ***!
  \*********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/url_(ignored)?");

/***/ }),

/***/ 5:
/*!********************!*\
  !*** fs (ignored) ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/fs_(ignored)?");

/***/ }),

/***/ 6:
/*!**************************************!*\
  !*** ./terminal-highlight (ignored) ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/./terminal-highlight_(ignored)?");

/***/ }),

/***/ 7:
/*!********************!*\
  !*** fs (ignored) ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/fs_(ignored)?");

/***/ }),

/***/ 8:
/*!******************************!*\
  !*** min-document (ignored) ***!
  \******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack://futureBooks/min-document_(ignored)?");

/***/ })

/******/ })["default"];